commit | author | age
|
a18bfa
|
1 |
package com.changhong.epc.admin.controller.master; |
Z |
2 |
|
|
3 |
import com.changhong.epc.admin.service.master.impl.MasterValueServiceImpl; |
|
4 |
import com.changhong.epc.bean.tenant.master.AutoMasterVal; |
|
5 |
import com.changhong.epc.bean.tenant.master.MasterEleValue; |
|
6 |
import com.changhong.epc.bean.tenant.master.MasterValue; |
|
7 |
import com.changhong.epc.constter.admin.AdminUrlConst; |
|
8 |
import org.springframework.beans.factory.annotation.Autowired; |
|
9 |
import org.springframework.web.bind.annotation.PostMapping; |
|
10 |
import org.springframework.web.bind.annotation.RequestBody; |
|
11 |
import org.springframework.web.bind.annotation.RestController; |
|
12 |
|
|
13 |
import java.util.List; |
|
14 |
import java.util.Map; |
|
15 |
|
|
16 |
@RestController |
|
17 |
public class MasterValueController implements AdminUrlConst { |
|
18 |
|
|
19 |
@Autowired |
|
20 |
private MasterValueServiceImpl masterValueService; |
|
21 |
|
|
22 |
/** |
|
23 |
* Code转Value |
|
24 |
*/ |
|
25 |
@PostMapping(VALUE_CODECONVAL) |
|
26 |
public MasterValue CodeConVal(@RequestBody MasterEleValue masterEleValue){ |
|
27 |
return masterValueService.CodeConVal(masterEleValue); |
|
28 |
} |
|
29 |
|
|
30 |
/** |
|
31 |
* Value转Code |
|
32 |
*/ |
|
33 |
@PostMapping(VALUE_VALCONCODE) |
|
34 |
public MasterValue ValConCode(@RequestBody MasterEleValue masterEleValue){ |
|
35 |
return masterValueService.ValConCode(masterEleValue); |
|
36 |
} |
|
37 |
|
|
38 |
/** |
|
39 |
* 查询主数据 |
|
40 |
*/ |
|
41 |
@PostMapping(VALUE_SELECTMASTERVALUELISTEXTEND) |
|
42 |
public List<?> selectMasterValueListExtend(@RequestBody MasterValue masterValue) { |
|
43 |
return masterValue.getDefineCode()==null?null:masterValueService.selectMasterValueListExtend(masterValue); |
|
44 |
} |
|
45 |
|
|
46 |
/** |
|
47 |
* 查询主数据下所有值 |
|
48 |
*/ |
|
49 |
@PostMapping(VALUE_SELECTVALUE) |
|
50 |
public Object selectValue(@RequestBody MasterValue masterValue){ |
|
51 |
return masterValueService.selectValue(masterValue); |
|
52 |
} |
|
53 |
|
|
54 |
/** |
|
55 |
* 根据多条主数据 获得第一条返回结果 String类型 |
|
56 |
*/ |
|
57 |
@PostMapping(VALUE_GETVALSTRING) |
|
58 |
public String getValString(@RequestBody AutoMasterVal autoMasterVal) { |
|
59 |
return masterValueService.getValString( |
|
60 |
autoMasterVal.getMdCode() |
|
61 |
, autoMasterVal.getMeCode() |
|
62 |
, autoMasterVal.getParams()); |
|
63 |
} |
|
64 |
|
|
65 |
/** |
|
66 |
* 元素表中没有code ,name 的主数据根据code获取name |
|
67 |
*/ |
|
68 |
@PostMapping(VALUE_GETMASTERVALSTRING) |
|
69 |
public Map<String,Object> getMasterValString(@RequestBody Map<String,Object> parm) { |
|
70 |
return masterValueService.getMasterValString(parm); |
|
71 |
} |
|
72 |
|
|
73 |
/** |
|
74 |
* 查询主数据下所有值添加查询功能 |
|
75 |
*/ |
|
76 |
@PostMapping(VALUE_SELECTVALUESEACHE) |
|
77 |
public Object selectValueSeache(@RequestBody MasterValue masterValue){ |
|
78 |
return masterValueService.selectValueSeache(masterValue); |
|
79 |
} |
|
80 |
|
|
81 |
@PostMapping(ADMIN_SELECT_MASTERVALUE_LIST) |
|
82 |
public List<MasterValue> selectMasterValueList(@RequestBody MasterValue masterValue){ |
|
83 |
return masterValueService.selectMasterValueList(masterValue); |
|
84 |
} |
|
85 |
|
|
86 |
@PostMapping(ADMIN_MASTER_TWO_DIMENSIONAL) |
|
87 |
public String getValTwoDimensional(@RequestBody AutoMasterVal autoMasterVal){ |
|
88 |
return masterValueService.getValTwoDimensional( |
|
89 |
autoMasterVal.getMdCode() |
|
90 |
, autoMasterVal.getMeCode() |
|
91 |
, autoMasterVal.getParams()); |
|
92 |
} |
|
93 |
|
|
94 |
@PostMapping(ADMIN_MASTER_CODECONVALUE) |
|
95 |
public MasterValue getCodeConValue(@RequestBody MasterEleValue master){ |
|
96 |
return masterValueService.getCodeConValue(master); |
|
97 |
} |
|
98 |
|
|
99 |
/** |
|
100 |
* 查询主数据下所有值添加查询功能二维表 |
|
101 |
*/ |
|
102 |
@PostMapping(VALUE_SEACHEVALUES) |
|
103 |
public Object seacheValues(@RequestBody MasterValue masterValue){ |
|
104 |
return masterValueService.seacheValues(masterValue); |
|
105 |
} |
|
106 |
|
|
107 |
} |