出库统计分析 物料/设备
正在显示
3 个修改的文件
包含
26 行增加
和
30 行删除
... | @@ -21,37 +21,28 @@ public class BusinessServiceImpl implements IBusinessService { | ... | @@ -21,37 +21,28 @@ public class BusinessServiceImpl implements IBusinessService { |
21 | @Autowired | 21 | @Autowired |
22 | private IBaseService baseService; | 22 | private IBaseService baseService; |
23 | 23 | ||
24 | /** | ||
25 | * table0 => (key0, value0) | ||
26 | */ | ||
27 | private static final Map<String, String[]> DICT_MAP = new HashMap<String, String[]>() {{ | ||
28 | put("equipment_info", new String[]{"id", "equipment_name"}); | ||
29 | put("sys_user", new String[]{"id", "realname"}); | ||
30 | put("sys_struct_dict", new String[]{"id", "struct_name"}); | ||
31 | put("equipment_category", new String[]{"id", "des"}); | ||
32 | put("evaluate_score_desc", new String[]{"id", "score_desc"}); | ||
33 | put("carbon_qualitative_desc", new String[]{"id", "qualitative_desc"}); | ||
34 | put("sys_depart", new String[]{"id", "depart_name"}); | ||
35 | put("equipment_sparepart_type", new String[]{"id", "item_text"}); | ||
36 | }}; | ||
37 | |||
24 | @Override | 38 | @Override |
25 | public Map<String, String> dictMap(String dictCode, Collection<?> inCol) { | 39 | public Map<String, String> dictMap(String dictCode, Collection<?> inCol) { |
26 | String key0, value0, table0; | 40 | String key0, value0, table0; |
27 | QueryWrapper<?> queryWrapper0 = new QueryWrapper<>(); | 41 | QueryWrapper<?> queryWrapper0 = new QueryWrapper<>(); |
28 | if ("equipment_info".equals(dictCode)) { | 42 | if (DICT_MAP.containsKey(dictCode)) { |
29 | key0 = "id"; | 43 | String[] dictArray = DICT_MAP.get(dictCode); |
30 | value0 = "equipment_name"; | 44 | key0 = dictArray[0]; |
31 | table0 = dictCode; | 45 | value0 = dictArray[1]; |
32 | } else if ("sys_user".equals(dictCode)) { | ||
33 | key0 = "id"; | ||
34 | value0 = "realname"; | ||
35 | table0 = dictCode; | ||
36 | } else if ("sys_struct_dict".equals(dictCode)) { | ||
37 | key0 = "id"; | ||
38 | value0 = "struct_name"; | ||
39 | table0 = dictCode; | ||
40 | } else if ("equipment_category".equals(dictCode)) { | ||
41 | key0 = "id"; | ||
42 | value0 = "des"; | ||
43 | table0 = dictCode; | ||
44 | } else if ("evaluate_score_desc".equals(dictCode)) { | ||
45 | key0 = "id"; | ||
46 | value0 = "score_desc"; | ||
47 | table0 = dictCode; | ||
48 | } else if ("carbon_qualitative_desc".equals(dictCode)) { | ||
49 | key0 = "id"; | ||
50 | value0 = "qualitative_desc"; | ||
51 | table0 = dictCode; | ||
52 | } else if ("sys_depart".equals(dictCode)) { | ||
53 | key0 = "id"; | ||
54 | value0 = "depart_name"; | ||
55 | table0 = dictCode; | 46 | table0 = dictCode; |
56 | } else { | 47 | } else { |
57 | // 数据字典查询 | 48 | // 数据字典查询 |
... | @@ -72,5 +63,4 @@ public class BusinessServiceImpl implements IBusinessService { | ... | @@ -72,5 +63,4 @@ public class BusinessServiceImpl implements IBusinessService { |
72 | return dictMap; | 63 | return dictMap; |
73 | } | 64 | } |
74 | 65 | ||
75 | |||
76 | } | 66 | } | ... | ... |
... | @@ -159,10 +159,16 @@ public class EquipmentOutController { | ... | @@ -159,10 +159,16 @@ public class EquipmentOutController { |
159 | EquipmentOut equipmentOut = BeanExtUtils.bean2Bean(equipmentOutDTO, EquipmentOut.class); | 159 | EquipmentOut equipmentOut = BeanExtUtils.bean2Bean(equipmentOutDTO, EquipmentOut.class); |
160 | QueryWrapper<EquipmentOut> queryWrapper = QueryGenerator.initQueryWrapper(equipmentOut, req.getParameterMap()); | 160 | QueryWrapper<EquipmentOut> queryWrapper = QueryGenerator.initQueryWrapper(equipmentOut, req.getParameterMap()); |
161 | if (StringUtils.isNotEmpty(equipmentOutDTO.getStartTime())) { | 161 | if (StringUtils.isNotEmpty(equipmentOutDTO.getStartTime())) { |
162 | queryWrapper.ge("out_date", equipmentOutDTO.getStartTime() + " 00:00:00"); | 162 | if (equipmentOutDTO.getStartTime().length() == 10) { |
163 | equipmentOutDTO.setStartTime(equipmentOutDTO.getStartTime() + " 00:00:00"); | ||
164 | } | ||
165 | queryWrapper.ge("out_date", equipmentOutDTO.getStartTime()); | ||
163 | } | 166 | } |
164 | if (StringUtils.isNotEmpty(equipmentOutDTO.getEndTime())) { | 167 | if (StringUtils.isNotEmpty(equipmentOutDTO.getEndTime())) { |
165 | queryWrapper.le("out_date", equipmentOutDTO.getEndTime() + " 23:59:59"); | 168 | if (equipmentOutDTO.getEndTime().length() == 10) { |
169 | equipmentOutDTO.setEndTime(equipmentOutDTO.getEndTime() + " 23:59:59"); | ||
170 | } | ||
171 | queryWrapper.le("out_date", equipmentOutDTO.getEndTime()); | ||
166 | } | 172 | } |
167 | if (StringUtils.isNotEmpty(equipmentOutDTO.getSparepartId())) { | 173 | if (StringUtils.isNotEmpty(equipmentOutDTO.getSparepartId())) { |
168 | String sparepartId = equipmentOutDTO.getSparepartId(); | 174 | String sparepartId = equipmentOutDTO.getSparepartId(); | ... | ... |
-
请 注册 或 登录 后发表评论