diff --git a/mes/hd/nladmin-system/src/main/java/org/nl/wms/basedata/em/service/impl/EquipmentfileServiceImpl.java b/mes/hd/nladmin-system/src/main/java/org/nl/wms/basedata/em/service/impl/EquipmentfileServiceImpl.java index 011805dd..a6de8e70 100644 --- a/mes/hd/nladmin-system/src/main/java/org/nl/wms/basedata/em/service/impl/EquipmentfileServiceImpl.java +++ b/mes/hd/nladmin-system/src/main/java/org/nl/wms/basedata/em/service/impl/EquipmentfileServiceImpl.java @@ -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 queryAll(Map whereJson, Pageable page) { HashMap 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)); diff --git a/mes/hd/nladmin-system/src/main/java/org/nl/wms/basedata/em/wql/QEM_EQUIPMENTFILE01.wql b/mes/hd/nladmin-system/src/main/java/org/nl/wms/basedata/em/wql/QEM_EQUIPMENTFILE01.wql index 629957fb..69ddb74f 100644 --- a/mes/hd/nladmin-system/src/main/java/org/nl/wms/basedata/em/wql/QEM_EQUIPMENTFILE01.wql +++ b/mes/hd/nladmin-system/src/main/java/org/nl/wms/basedata/em/wql/QEM_EQUIPMENTFILE01.wql @@ -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) diff --git a/mes/qd/src/views/wms/basedata/em/equipmentfile/ChangeDialog.vue b/mes/qd/src/views/wms/basedata/em/equipmentfile/ChangeDialog.vue index 93b12cdc..ff8dce3d 100644 --- a/mes/qd/src/views/wms/basedata/em/equipmentfile/ChangeDialog.vue +++ b/mes/qd/src/views/wms/basedata/em/equipmentfile/ChangeDialog.vue @@ -19,21 +19,9 @@ - - - - + + + @@ -55,7 +43,6 @@ > - diff --git a/mes/qd/src/views/wms/basedata/em/equipmentfile/index.vue b/mes/qd/src/views/wms/basedata/em/equipmentfile/index.vue index 001f6715..d634931d 100644 --- a/mes/qd/src/views/wms/basedata/em/equipmentfile/index.vue +++ b/mes/qd/src/views/wms/basedata/em/equipmentfile/index.vue @@ -219,7 +219,7 @@ - +