From 152c72a313ff9dc94e996744f9d09541ec81222f Mon Sep 17 00:00:00 2001 From: zds <2388969634@qq.com> Date: Sun, 27 Nov 2022 18:49:26 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../impl/DevicefaultclassServiceImpl.java | 2 +- .../impl/WorkProcedureServiceImpl.java | 19 ++++++------ .../service/impl/ReceivemstServiceImpl.java | 8 +++-- .../impl/FactoryCalendarServiceImpl.java | 11 ++++++- .../service/impl/CheckOutBillServiceImpl.java | 8 +++++ mes/qd/src/views/wms/pcs/receivemst/index.vue | 2 ++ .../wms/pdm/base/CapacityTemplate/index.vue | 4 +-- .../pdm/base/factoryCalendar/AddDialog.vue | 16 ---------- .../wms/pdm/base/factoryCalendar/index.vue | 24 +++++++-------- .../wms/st/core/inbill/recycled/AddDtl.vue | 30 ++++++++++++------- .../wms/st/core/inbill/recycled/index.vue | 11 ------- .../st/core/outbill/checkoutbill/AddDtl.vue | 13 ++++++-- 12 files changed, 80 insertions(+), 68 deletions(-) diff --git a/mes/hd/nladmin-system/src/main/java/org/nl/wms/basedata/em/service/impl/DevicefaultclassServiceImpl.java b/mes/hd/nladmin-system/src/main/java/org/nl/wms/basedata/em/service/impl/DevicefaultclassServiceImpl.java index a039cef4..e5f44741 100644 --- a/mes/hd/nladmin-system/src/main/java/org/nl/wms/basedata/em/service/impl/DevicefaultclassServiceImpl.java +++ b/mes/hd/nladmin-system/src/main/java/org/nl/wms/basedata/em/service/impl/DevicefaultclassServiceImpl.java @@ -61,7 +61,7 @@ public class DevicefaultclassServiceImpl implements DevicefaultclassService { String classIds = classstandardService.getAllChildIdStr(class_idStr); map.put("classIds", classIds); } - JSONObject json = WQL.getWO("QEM_BI_DEVICEFAULTCLASS001").addParamMap(map).pageQuery(WqlUtil.getHttpContext(page), "mst.create_time DESC"); + JSONObject json = WQL.getWO("QEM_BI_DEVICEFAULTCLASS001").addParamMap(map).pageQuery(WqlUtil.getHttpContext(page), "mst.device_faultclass_code DESC"); return json; } diff --git a/mes/hd/nladmin-system/src/main/java/org/nl/wms/basedata/pdm/service/impl/WorkProcedureServiceImpl.java b/mes/hd/nladmin-system/src/main/java/org/nl/wms/basedata/pdm/service/impl/WorkProcedureServiceImpl.java index 429c5a19..f4c73280 100644 --- a/mes/hd/nladmin-system/src/main/java/org/nl/wms/basedata/pdm/service/impl/WorkProcedureServiceImpl.java +++ b/mes/hd/nladmin-system/src/main/java/org/nl/wms/basedata/pdm/service/impl/WorkProcedureServiceImpl.java @@ -44,7 +44,7 @@ public class WorkProcedureServiceImpl implements WorkProcedureService { if (!StrUtil.isEmpty(search)) { where = " AND (workprocedure_code like '%" + search + "%' OR workprocedure_name like '%" + search + "%' ) "; } - ResultBean rb = wo.pagequery(WqlUtil.getHttpContext(page), "is_delete= '0' " + where, "update_time desc"); + ResultBean rb = wo.pagequery(WqlUtil.getHttpContext(page), "is_delete= '0' " + where, "workprocedure_code"); final JSONObject json = rb.pageResult(); return json; } @@ -108,13 +108,15 @@ public class WorkProcedureServiceImpl implements WorkProcedureService { @Transactional(rollbackFor = Exception.class) public void update(WorkProcedureDto dto) { WorkProcedureDto entity = this.findById(dto.getWorkprocedure_id()); - if (entity == null) throw new BadRequestException("被删除或无权限,操作失败!"); - - String workprocedure_code = entity.getWorkprocedure_code(); - WorkProcedureDto byCode = this.findByCode(workprocedure_code); - if (ObjectUtil.isNotEmpty(byCode) && !dto.getWorkprocedure_id().equals(byCode.getWorkprocedure_id())) - throw new BadRequestException("存在相同的编码!"); - + if (entity == null) { + throw new BadRequestException("被删除或无权限,操作失败!"); + } + WQLObject wo = WQLObject.getWQLObject("pdm_bi_workProcedure"); + String workprocedure_code = dto.getWorkprocedure_code(); + JSONObject old = wo.query("is_delete='0' and workprocedure_code='"+workprocedure_code+"' and workprocedure_id<>'"+dto.getWorkprocedure_id()+"'").uniqueResult(0); + if(old!=null){ + throw new BadRequestException("存在相同的编码!"); + } Long currentUserId = SecurityUtils.getCurrentUserId(); String nickName = SecurityUtils.getNickName(); @@ -123,7 +125,6 @@ public class WorkProcedureServiceImpl implements WorkProcedureService { dto.setUpdate_optid(currentUserId); dto.setUpdate_optname(nickName); - WQLObject wo = WQLObject.getWQLObject("pdm_bi_workProcedure"); JSONObject json = JSONObject.parseObject(JSON.toJSONString(dto)); wo.update(json); } diff --git a/mes/hd/nladmin-system/src/main/java/org/nl/wms/pcs/service/impl/ReceivemstServiceImpl.java b/mes/hd/nladmin-system/src/main/java/org/nl/wms/pcs/service/impl/ReceivemstServiceImpl.java index 27d5e991..ee04f14e 100644 --- a/mes/hd/nladmin-system/src/main/java/org/nl/wms/pcs/service/impl/ReceivemstServiceImpl.java +++ b/mes/hd/nladmin-system/src/main/java/org/nl/wms/pcs/service/impl/ReceivemstServiceImpl.java @@ -83,8 +83,12 @@ public class ReceivemstServiceImpl implements ReceivemstService { } HashMap map = new HashMap<>(); map.put("flag", "1"); - map.put("begin_time", begin_time); - map.put("end_time", end_time); + if (StrUtil.isNotEmpty(begin_time)) { + map.put("begin_time", begin_time.substring(0,10)); + } + if (StrUtil.isNotEmpty(end_time)) { + map.put("end_time", end_time.substring(0,10)); + } map.put("vbillcode", vbillcode); map.put("receive_code", receive_code); map.put("supp_code", supp_code); diff --git a/mes/hd/nladmin-system/src/main/java/org/nl/wms/pdm/service/impl/FactoryCalendarServiceImpl.java b/mes/hd/nladmin-system/src/main/java/org/nl/wms/pdm/service/impl/FactoryCalendarServiceImpl.java index bbae0d18..393f25c0 100644 --- a/mes/hd/nladmin-system/src/main/java/org/nl/wms/pdm/service/impl/FactoryCalendarServiceImpl.java +++ b/mes/hd/nladmin-system/src/main/java/org/nl/wms/pdm/service/impl/FactoryCalendarServiceImpl.java @@ -60,7 +60,11 @@ public class FactoryCalendarServiceImpl implements FactoryCalendarService { String now = DateUtil.now(); JwtUserDto currentUser = (JwtUserDto) SecurityUtils.getCurrentUser(); Long deptId = currentUser.getDeptId(); - + WQLObject mstTab = WQLObject.getWQLObject("pdm_bi_factorycalendar"); // 工艺路线主表 + JSONObject old = mstTab.query("is_delete='0' and factorycalendar_code='"+whereJson.getString("factorycalendar_code")+"'").uniqueResult(0); + if(old!=null){ + throw new BadRequestException("已存在相同编码的工厂日历!"); + } //插入主表 String factorycalendar_id = IdUtil.getSnowflake(1, 1).nextId() + ""; whereJson.put("factorycalendar_id", factorycalendar_id); @@ -81,6 +85,11 @@ public class FactoryCalendarServiceImpl implements FactoryCalendarService { @Transactional(rollbackFor = Exception.class) public void update(JSONObject whereJson) { String factorycalendar_id = whereJson.getString("factorycalendar_id"); + WQLObject mstTab = WQLObject.getWQLObject("pdm_bi_factorycalendar"); // 工艺路线主表 + JSONObject old = mstTab.query("is_delete='0' and factorycalendar_code='"+whereJson.getString("factorycalendar_code")+"' and factorycalendar_id<>'"+whereJson.getString("factorycalendar_id")+"'").uniqueResult(0); + if(old!=null){ + throw new BadRequestException("已存在相同编码的工厂日历!"); + } //查询旧的终止年份 JSONObject old_jo = WQLObject.getWQLObject("PDM_BI_FactoryCalendar").query("factorycalendar_id = '" + factorycalendar_id + "'").uniqueResult(0); diff --git a/mes/hd/nladmin-system/src/main/java/org/nl/wms/st/core/service/impl/CheckOutBillServiceImpl.java b/mes/hd/nladmin-system/src/main/java/org/nl/wms/st/core/service/impl/CheckOutBillServiceImpl.java index 7be45c56..46183199 100644 --- a/mes/hd/nladmin-system/src/main/java/org/nl/wms/st/core/service/impl/CheckOutBillServiceImpl.java +++ b/mes/hd/nladmin-system/src/main/java/org/nl/wms/st/core/service/impl/CheckOutBillServiceImpl.java @@ -117,6 +117,14 @@ public class CheckOutBillServiceImpl implements CheckOutBillService { if (StrUtil.isNotEmpty(map.get("remark"))) { map.put("remark", "%" + map.get("remark") + "%"); } + String begin_time = map.get("begin_time"); + String end_time = map.get("end_time"); + if (StrUtil.isNotEmpty(begin_time)) { + map.put("begin_time", begin_time.substring(0,10)); + } + if (StrUtil.isNotEmpty(end_time)) { + map.put("end_time", end_time.substring(0,10)); + } JSONObject jo = WQL.getWO("QST_IVT_CHECKOUTBILL").addParamMap(map).pageQuery(WqlUtil.getHttpContext(page), "mb.material_code"); return jo; } diff --git a/mes/qd/src/views/wms/pcs/receivemst/index.vue b/mes/qd/src/views/wms/pcs/receivemst/index.vue index fd7f7db9..90e9fe22 100644 --- a/mes/qd/src/views/wms/pcs/receivemst/index.vue +++ b/mes/qd/src/views/wms/pcs/receivemst/index.vue @@ -89,9 +89,11 @@ diff --git a/mes/qd/src/views/wms/pdm/base/CapacityTemplate/index.vue b/mes/qd/src/views/wms/pdm/base/CapacityTemplate/index.vue index 7be8bc15..3019a638 100644 --- a/mes/qd/src/views/wms/pdm/base/CapacityTemplate/index.vue +++ b/mes/qd/src/views/wms/pdm/base/CapacityTemplate/index.vue @@ -85,7 +85,7 @@ - +