package com.changhong.epc.admin.controller.master;
|
|
import com.changhong.epc.admin.service.master.impl.MasterValueServiceImpl;
|
import com.changhong.epc.bean.tenant.master.AutoMasterVal;
|
import com.changhong.epc.bean.tenant.master.MasterEleValue;
|
import com.changhong.epc.bean.tenant.master.MasterValue;
|
import com.changhong.epc.constter.admin.AdminUrlConst;
|
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.web.bind.annotation.PostMapping;
|
import org.springframework.web.bind.annotation.RequestBody;
|
import org.springframework.web.bind.annotation.RestController;
|
|
import java.util.List;
|
import java.util.Map;
|
|
@RestController
|
public class MasterValueController implements AdminUrlConst {
|
|
@Autowired
|
private MasterValueServiceImpl masterValueService;
|
|
/**
|
* Code转Value
|
*/
|
@PostMapping(VALUE_CODECONVAL)
|
public MasterValue CodeConVal(@RequestBody MasterEleValue masterEleValue){
|
return masterValueService.CodeConVal(masterEleValue);
|
}
|
|
/**
|
* Value转Code
|
*/
|
@PostMapping(VALUE_VALCONCODE)
|
public MasterValue ValConCode(@RequestBody MasterEleValue masterEleValue){
|
return masterValueService.ValConCode(masterEleValue);
|
}
|
|
/**
|
* 查询主数据
|
*/
|
@PostMapping(VALUE_SELECTMASTERVALUELISTEXTEND)
|
public List<?> selectMasterValueListExtend(@RequestBody MasterValue masterValue) {
|
return masterValue.getDefineCode()==null?null:masterValueService.selectMasterValueListExtend(masterValue);
|
}
|
|
/**
|
* 查询主数据下所有值
|
*/
|
@PostMapping(VALUE_SELECTVALUE)
|
public Object selectValue(@RequestBody MasterValue masterValue){
|
return masterValueService.selectValue(masterValue);
|
}
|
|
/**
|
* 根据多条主数据 获得第一条返回结果 String类型
|
*/
|
@PostMapping(VALUE_GETVALSTRING)
|
public String getValString(@RequestBody AutoMasterVal autoMasterVal) {
|
return masterValueService.getValString(
|
autoMasterVal.getMdCode()
|
, autoMasterVal.getMeCode()
|
, autoMasterVal.getParams());
|
}
|
|
/**
|
* 元素表中没有code ,name 的主数据根据code获取name
|
*/
|
@PostMapping(VALUE_GETMASTERVALSTRING)
|
public Map<String,Object> getMasterValString(@RequestBody Map<String,Object> parm) {
|
return masterValueService.getMasterValString(parm);
|
}
|
|
/**
|
* 查询主数据下所有值添加查询功能
|
*/
|
@PostMapping(VALUE_SELECTVALUESEACHE)
|
public Object selectValueSeache(@RequestBody MasterValue masterValue){
|
return masterValueService.selectValueSeache(masterValue);
|
}
|
|
@PostMapping(ADMIN_SELECT_MASTERVALUE_LIST)
|
public List<MasterValue> selectMasterValueList(@RequestBody MasterValue masterValue){
|
return masterValueService.selectMasterValueList(masterValue);
|
}
|
|
@PostMapping(ADMIN_MASTER_TWO_DIMENSIONAL)
|
public String getValTwoDimensional(@RequestBody AutoMasterVal autoMasterVal){
|
return masterValueService.getValTwoDimensional(
|
autoMasterVal.getMdCode()
|
, autoMasterVal.getMeCode()
|
, autoMasterVal.getParams());
|
}
|
|
@PostMapping(ADMIN_MASTER_CODECONVALUE)
|
public MasterValue getCodeConValue(@RequestBody MasterEleValue master){
|
return masterValueService.getCodeConValue(master);
|
}
|
|
/**
|
* 查询主数据下所有值添加查询功能二维表
|
*/
|
@PostMapping(VALUE_SEACHEVALUES)
|
public Object seacheValues(@RequestBody MasterValue masterValue){
|
return masterValueService.seacheValues(masterValue);
|
}
|
|
}
|