修改bug

This commit is contained in:
zds
2022-07-21 14:45:33 +08:00
parent d623d8246a
commit 61f6311a05
4 changed files with 26 additions and 21 deletions

View File

@@ -14,10 +14,13 @@ import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.nl.exception.BadRequestException;
import org.nl.modules.security.service.dto.JwtUserDto;
import org.nl.modules.system.service.DeptService;
import org.nl.modules.system.util.CodeUtil;
import org.nl.utils.SecurityUtils;
import org.nl.utils.SpringContextHolder;
import org.nl.wms.basedata.em.service.EquipmentfileService;
import org.nl.wms.basedata.master.constant.MaterOptTypeEnum;
import org.nl.wms.basedata.master.service.ClassstandardService;
import org.nl.wms.pdm.service.WorkOrdereService;
import org.nl.wql.WQL;
import org.nl.wql.core.bean.WQLObject;
@@ -32,11 +35,12 @@ import java.util.*;
@RequiredArgsConstructor
@Slf4j
public class EquipmentfileServiceImpl implements EquipmentfileService {
private final ClassstandardService classstandardService;
@Override
public Map<String, Object> queryAll(Map whereJson, Pageable page) {
HashMap<String, String> map = new HashMap<>(whereJson);
DeptService deptService = SpringContextHolder.getBean(DeptService.class);
map.put("flag", "1");
String device_code = map.get("device_code");
if (StrUtil.isNotEmpty(device_code)) {
@@ -46,6 +50,16 @@ public class EquipmentfileServiceImpl implements EquipmentfileService {
if (StrUtil.isNotEmpty(manufacturer)) {
map.put("manufacturer", "%" + manufacturer + "%");
}
String material_type_id = map.get("material_type_id");
if (!StrUtil.isEmpty(material_type_id)) {
String classIds = classstandardService.getChildIdStr(material_type_id);
map.put("classIds", classIds);
}
String use_deptid = map.get("use_deptid");
if (!StrUtil.isEmpty(use_deptid)) {
String deptIds = deptService.getChildIdStr(Long.parseLong(use_deptid));
map.put("deptIds", deptIds);
}
String begin_time = map.get("begin_time");
if (StrUtil.isNotEmpty(begin_time)) {
map.put("begin_time", begin_time.substring(0,10));

View File

@@ -25,7 +25,8 @@
输入.workprocedure_id TYPEAS s_string
输入.is_produceuse TYPEAS s_string
输入.devicerecord_id TYPEAS s_string
输入.classIds TYPEAS f_string
输入.deptIds TYPEAS f_string
[临时表]
--这边列出来的临时表就会在运行期动态创建
@@ -72,13 +73,16 @@
equipmentfile.status = 输入.status
ENDOPTION
OPTION 输入.use_deptid <> ""
equipmentfile.use_deptid = 输入.use_deptid
equipmentfile.use_deptid in 输入.deptIds
ENDOPTION
OPTION 输入.workprocedure_id <> ""
equipmentfile.workprocedure_id = 输入.workprocedure_id
ENDOPTION
OPTION 输入.device_type <> ""
equipmentfile.device_type = 输入.device_type
ENDOPTION
OPTION 输入.material_type_id <> ""
equipmentfile.material_type_id = 输入.material_type_id
equipmentfile.material_type_id in 输入.classIds
ENDOPTION
OPTION 输入.device_code <> ""
(equipmentfile.device_code like 输入.device_code or equipmentfile.device_name like 输入.device_code)