From 9103dfb8f667ec24e1ee8a2c81cc726fef20c3d4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=B5=B5=E5=98=89=E4=BC=9F?= <1724121454@qq.com> Date: Tue, 31 Aug 2021 10:02:20 +0800 Subject: [PATCH 1/9] =?UTF-8?q?=E5=BC=82=E5=B8=B8=E7=94=A8=E6=88=B7?= =?UTF-8?q?=E7=BB=84=E6=8F=90=E6=8A=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../mesnac/meapi/controller/UserGroupController.java | 4 ++-- .../foreverwin/mesnac/meapi/mapper/UserGroupMapper.java | 2 +- meapi/src/main/resources/mapper/UserGroupMapper.xml | 7 ++++--- 3 files changed, 7 insertions(+), 6 deletions(-) diff --git a/meapi/src/main/java/com/foreverwin/mesnac/meapi/controller/UserGroupController.java b/meapi/src/main/java/com/foreverwin/mesnac/meapi/controller/UserGroupController.java index 43921e13..e754ce38 100644 --- a/meapi/src/main/java/com/foreverwin/mesnac/meapi/controller/UserGroupController.java +++ b/meapi/src/main/java/com/foreverwin/mesnac/meapi/controller/UserGroupController.java @@ -124,8 +124,8 @@ public class UserGroupController { @ResponseBody - @PostMapping("/findAbnormalUserGroup") - public R findAbnormalUserGroup(@RequestBody Map param){ + @GetMapping("/findAbnormalUserGroup") + public R findAbnormalUserGroup(@RequestParam(required = false) Map param){ try{ return R.ok(userGroupService.findAbnormalUserGroup(param)); }catch (Exception e){ diff --git a/meapi/src/main/java/com/foreverwin/mesnac/meapi/mapper/UserGroupMapper.java b/meapi/src/main/java/com/foreverwin/mesnac/meapi/mapper/UserGroupMapper.java index 2003170d..e1fc320d 100644 --- a/meapi/src/main/java/com/foreverwin/mesnac/meapi/mapper/UserGroupMapper.java +++ b/meapi/src/main/java/com/foreverwin/mesnac/meapi/mapper/UserGroupMapper.java @@ -34,6 +34,6 @@ public interface UserGroupMapper extends BaseMapper { List findUserGroupListByUser(@Param("site")String site,@Param("user")String user); - List findAbnormalUserGroup(@Param("site")String site, @Param("param")Map map); + List findAbnormalUserGroup(@Param("site")String site, @Param("param")Map param); } \ No newline at end of file diff --git a/meapi/src/main/resources/mapper/UserGroupMapper.xml b/meapi/src/main/resources/mapper/UserGroupMapper.xml index 4bd1b9e0..ec64be23 100644 --- a/meapi/src/main/resources/mapper/UserGroupMapper.xml +++ b/meapi/src/main/resources/mapper/UserGroupMapper.xml @@ -391,12 +391,13 @@ From 606905210576b980f67e02232135f89778532e62 Mon Sep 17 00:00:00 2001 From: philip <244793088@qq.com> Date: Tue, 31 Aug 2021 11:07:47 +0800 Subject: [PATCH 2/9] =?UTF-8?q?=E4=BA=A7=E5=89=8D=E5=87=86=E5=A4=87?= =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E6=9D=A1=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../mesnac/common/model/ProdReadyTask.java | 24 ++++++++++++++++++- .../resources/mapper/ProdReadyTaskMapper.xml | 2 +- 2 files changed, 24 insertions(+), 2 deletions(-) diff --git a/common/src/main/java/com/foreverwin/mesnac/common/model/ProdReadyTask.java b/common/src/main/java/com/foreverwin/mesnac/common/model/ProdReadyTask.java index 35d33a22..f622a1e7 100644 --- a/common/src/main/java/com/foreverwin/mesnac/common/model/ProdReadyTask.java +++ b/common/src/main/java/com/foreverwin/mesnac/common/model/ProdReadyTask.java @@ -191,7 +191,29 @@ public class ProdReadyTask extends Model { @TableField(exist = false) private String texture; - public String getMatSpec() { + @TableField(exist = false) + private String prodHours; + + @TableField(exist = false) + private String qty; + + public String getQty() { + return qty; + } + + public void setQty(String qty) { + this.qty = qty; + } + + public String getProdHours() { + return prodHours; + } + + public void setProdHours(String prodHours) { + this.prodHours = prodHours; + } + + public String getMatSpec() { return matSpec; } diff --git a/common/src/main/resources/mapper/ProdReadyTaskMapper.xml b/common/src/main/resources/mapper/ProdReadyTaskMapper.xml index b2dea01b..0cd501cd 100644 --- a/common/src/main/resources/mapper/ProdReadyTaskMapper.xml +++ b/common/src/main/resources/mapper/ProdReadyTaskMapper.xml @@ -631,7 +631,7 @@ + SELECT WT.DESCRIPTION WORK_CENTER_DESCRIPTION, C2.VALUE ITEM_NUMBER, C3.VALUE PRODUCT_MODEL,IM.ITEM ITEM, IT.DESCRIPTION ITEM_DESCRIPTION, + ZT.SFC, ZT.OPERATION, OT.DESCRIPTION OPERATION_DESCRIPTION, ZT.RESRCE, RS.DESCRIPTION RESOURCE_DESCRIPTION, ZT.TASK_NO, ZT.CATEGORY, + ZT."RESULT", ZT.CREATE_USER, ZNU.FULL_NAME, ZT.MODIFIED_DATE_TIME + FROM Z_INSPECTION_TASK ZT + LEFT JOIN WORK_CENTER WC ON WC.SITE = ZT.SITE AND WC.WORK_CENTER = ZT.WORK_CENTER + LEFT JOIN WORK_CENTER_T WT ON WT.WORK_CENTER_BO = WC.HANDLE AND WT.LOCALE = 'zh' + INNER JOIN SHOP_ORDER SO ON ZT.SITE = SO.SITE AND ZT.SHOP_ORDER = SO.SHOP_ORDER + LEFT JOIN CUSTOM_FIELDS C1 ON C1.HANDLE = SO.HANDLE AND C1."ATTRIBUTE" = 'WORK_ORDER' + LEFT JOIN CUSTOM_FIELDS C2 ON C2.HANDLE = SO.HANDLE AND C2."ATTRIBUTE" = 'ITEM_NUMBER' + LEFT JOIN CUSTOM_FIELDS C3 ON C3.HANDLE = SO.HANDLE AND C3."ATTRIBUTE" = 'PRODUCT_MODEL' + INNER JOIN ITEM IM ON IM.HANDLE = SO.ITEM_BO + LEFT JOIN ITEM_T IT ON IT.ITEM_BO = IM.HANDLE AND IT.LOCALE = 'zh' + INNER JOIN OPERATION OP ON OP.SITE = ZT.SITE AND OP.OPERATION = ZT.OPERATION AND OP.CURRENT_REVISION = 'true' + LEFT JOIN OPERATION_T OT ON OT.OPERATION_BO = OP.HANDLE AND OT.LOCALE = 'zh' + INNER JOIN RESRCE RS ON RS.SITE = ZT.SITE AND RS.RESRCE = ZT.RESRCE + LEFT JOIN Z_NWA_USER ZNU ON ZNU.SITE = ZT.SITE AND ZNU.USER_NAME = ZT.CREATE_USER + WHERE ZT.SITE = #{site} + + AND WC.WORK_CENTER = #{workCenter} + + + AND ZT.CATEGORY = #{category} + + + AND C2.VALUE LIKE '%'||#{itemNumber}||'%' + + + AND C3.VALUE LIKE '%'||#{model}||'%' + + + AND ZT.OPERATION = #{operation} + + + AND ZT.RESRCE = #{resrce} + + + AND ZT.RESULT = #{result} + + + AND ZT.MODIFIED_DATE_TIME >= TO_DATE(#{startFromDate}, 'YYYY-MM-DD') + + + AND ZT.MODIFIED_DATE_TIME <= TO_DATE(#{startToDate}|| '23:59:59', 'YYYY-MM-DD HH24:MI:SS') + + + + \ No newline at end of file From 9d653a1a66cdd208a49f8ecb35c87510236ac593 Mon Sep 17 00:00:00 2001 From: zpl Date: Tue, 31 Aug 2021 13:19:41 +0800 Subject: [PATCH 4/9] =?UTF-8?q?=E5=88=A4=E6=96=AD=E8=AE=BE=E5=A4=87?= =?UTF-8?q?=E6=98=AF=E5=90=A6=E9=9C=80=E8=A6=81=E7=82=B9=E6=A3=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../impl/ResourceInspectPlanServiceImpl.java | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/equip/src/main/java/com/foreverwin/mesnac/equip/service/impl/ResourceInspectPlanServiceImpl.java b/equip/src/main/java/com/foreverwin/mesnac/equip/service/impl/ResourceInspectPlanServiceImpl.java index 69dd3142..6141912d 100644 --- a/equip/src/main/java/com/foreverwin/mesnac/equip/service/impl/ResourceInspectPlanServiceImpl.java +++ b/equip/src/main/java/com/foreverwin/mesnac/equip/service/impl/ResourceInspectPlanServiceImpl.java @@ -10,6 +10,7 @@ import com.foreverwin.mesnac.common.service.InspectionItemService; import com.foreverwin.mesnac.equip.mapper.ResourceInspectTaskMapper; import com.foreverwin.mesnac.equip.model.*; import com.foreverwin.mesnac.equip.service.*; +import com.foreverwin.mesnac.meapi.mapper.ResrceMapper; import com.foreverwin.mesnac.meapi.model.UserGroup; import com.foreverwin.mesnac.meapi.service.UserGroupService; import com.foreverwin.modular.core.exception.BusinessException; @@ -59,6 +60,8 @@ public class ResourceInspectPlanServiceImpl extends ServiceImpl selectPage(FrontPage frontPage, ResourceInspectPlan resourceInspectPlan) { @@ -274,6 +277,11 @@ public class ResourceInspectPlanServiceImpl extends ServiceImpl nextNumber = nextNumberHelper.getNextNumber(site, Constants.RESOURCE_INSPECT_TASK, 1); inspectTask.setTaskNo(nextNumber.get(0)); From 90d7b20d6114af5fb556a3a9eff1d9ef544bb304 Mon Sep 17 00:00:00 2001 From: zpl Date: Tue, 31 Aug 2021 13:21:04 +0800 Subject: [PATCH 5/9] =?UTF-8?q?=E8=AE=BE=E5=A4=87=E6=98=AF=E5=90=A6?= =?UTF-8?q?=E7=82=B9=E6=A3=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/foreverwin/mesnac/meapi/mapper/ResrceMapper.java | 3 +++ meapi/src/main/resources/mapper/ResrceMapper.xml | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/meapi/src/main/java/com/foreverwin/mesnac/meapi/mapper/ResrceMapper.java b/meapi/src/main/java/com/foreverwin/mesnac/meapi/mapper/ResrceMapper.java index 2f160c35..bd7cbf1f 100644 --- a/meapi/src/main/java/com/foreverwin/mesnac/meapi/mapper/ResrceMapper.java +++ b/meapi/src/main/java/com/foreverwin/mesnac/meapi/mapper/ResrceMapper.java @@ -41,4 +41,7 @@ public interface ResrceMapper extends BaseMapper { ResrceWorkCenter findResourceAndWorkCenterByResource(Resrce resrce); List selectResourceListByUT(@Param("site") String site, @Param("resourceType") String resourceType, @Param("userList") String[] userList); + + String isInspectByResrce(@Param("site") String site, @Param("resrce") String resrce); + } \ No newline at end of file diff --git a/meapi/src/main/resources/mapper/ResrceMapper.xml b/meapi/src/main/resources/mapper/ResrceMapper.xml index ccfef860..a95a614c 100644 --- a/meapi/src/main/resources/mapper/ResrceMapper.xml +++ b/meapi/src/main/resources/mapper/ResrceMapper.xml @@ -615,7 +615,7 @@ From 0a3bd1543a87c964977b5f5ef3921211331f1293 Mon Sep 17 00:00:00 2001 From: philip <244793088@qq.com> Date: Tue, 31 Aug 2021 13:21:52 +0800 Subject: [PATCH 6/9] =?UTF-8?q?=E6=A3=80=E9=AA=8C=E4=BB=BB=E5=8A=A1?= =?UTF-8?q?=E7=BC=96=E5=8F=B7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../mesnac/common/service/impl/InspectionTaskServiceImpl.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/common/src/main/java/com/foreverwin/mesnac/common/service/impl/InspectionTaskServiceImpl.java b/common/src/main/java/com/foreverwin/mesnac/common/service/impl/InspectionTaskServiceImpl.java index 9e041d9e..e933f1e5 100644 --- a/common/src/main/java/com/foreverwin/mesnac/common/service/impl/InspectionTaskServiceImpl.java +++ b/common/src/main/java/com/foreverwin/mesnac/common/service/impl/InspectionTaskServiceImpl.java @@ -180,7 +180,7 @@ public class InspectionTaskServiceImpl extends ServiceImpl Date: Tue, 31 Aug 2021 13:31:36 +0800 Subject: [PATCH 7/9] =?UTF-8?q?=E6=A0=B9=E6=8D=AEsfc=E6=9F=A5=E5=A4=84work?= =?UTF-8?q?Center?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../anomaly/controller/AbnormalBillController.java | 8 ++++---- .../common/service/SfcDispatchCommonService.java | 2 +- .../mesnac/dispatch/mapper/SfcDispatchMapper.java | 2 +- .../service/impl/SfcDispatchServiceImpl.java | 5 ++--- .../src/main/resources/mapper/SfcDispatchMapper.xml | 6 +++--- .../meapi/service/impl/ShopOrderServiceImpl.java | 12 ++++++------ 6 files changed, 17 insertions(+), 18 deletions(-) diff --git a/anomaly/src/main/java/com/foreverwin/mesnac/anomaly/controller/AbnormalBillController.java b/anomaly/src/main/java/com/foreverwin/mesnac/anomaly/controller/AbnormalBillController.java index 89162c43..b0ab6527 100644 --- a/anomaly/src/main/java/com/foreverwin/mesnac/anomaly/controller/AbnormalBillController.java +++ b/anomaly/src/main/java/com/foreverwin/mesnac/anomaly/controller/AbnormalBillController.java @@ -361,12 +361,12 @@ public class AbnormalBillController { } - @GetMapping("/findResrceBySfc") - public R findResrceBySfc(SfcDispatchDto sfcDispatch){ + @GetMapping("/findResrceAndWorkCenterBySfc") + public R findResrceAndWorkCenterBySfc(SfcDispatchDto sfcDispatch){ try{ - return R.ok(sfcDispatchCommonService.findResrceBySfc(sfcDispatch)); + return R.ok(sfcDispatchCommonService.findResrceAndWorkCenterBySfc(sfcDispatch)); }catch (Exception e){ - return R.failed("根据sfc查找设备失败:"+e.getMessage()); + return R.failed("根据sfc查找设备和工作中心失败:"+e.getMessage()); } } diff --git a/common/src/main/java/com/foreverwin/mesnac/common/service/SfcDispatchCommonService.java b/common/src/main/java/com/foreverwin/mesnac/common/service/SfcDispatchCommonService.java index 12d95b2c..9b85e83a 100644 --- a/common/src/main/java/com/foreverwin/mesnac/common/service/SfcDispatchCommonService.java +++ b/common/src/main/java/com/foreverwin/mesnac/common/service/SfcDispatchCommonService.java @@ -43,7 +43,7 @@ public interface SfcDispatchCommonService { * @param sfcDispatch * @return */ - SfcDispatchDto findResrceBySfc(SfcDispatchDto sfcDispatch); + SfcDispatchDto findResrceAndWorkCenterBySfc(SfcDispatchDto sfcDispatch); /** * 查询派工单 diff --git a/dispatch/src/main/java/com/foreverwin/mesnac/dispatch/mapper/SfcDispatchMapper.java b/dispatch/src/main/java/com/foreverwin/mesnac/dispatch/mapper/SfcDispatchMapper.java index fd7366f3..4ca9ed10 100644 --- a/dispatch/src/main/java/com/foreverwin/mesnac/dispatch/mapper/SfcDispatchMapper.java +++ b/dispatch/src/main/java/com/foreverwin/mesnac/dispatch/mapper/SfcDispatchMapper.java @@ -53,7 +53,7 @@ public interface SfcDispatchMapper extends BaseMapper { * @param site * @return */ - SfcDispatchDto findResrceBySfc(@Param("sfcDispatch")SfcDispatchDto sfcDispatch, @Param("site") String site); + SfcDispatchDto findResrceAndWorkCenterBySfc(@Param("sfcDispatch")SfcDispatchDto sfcDispatch, @Param("site") String site); SfcDispatchDto findSfcDispatchBySfc(@Param("site")String site, @Param("dto")SfcDispatchDto sfcDispatch); diff --git a/dispatch/src/main/java/com/foreverwin/mesnac/dispatch/service/impl/SfcDispatchServiceImpl.java b/dispatch/src/main/java/com/foreverwin/mesnac/dispatch/service/impl/SfcDispatchServiceImpl.java index 493b80f6..1192b2e5 100644 --- a/dispatch/src/main/java/com/foreverwin/mesnac/dispatch/service/impl/SfcDispatchServiceImpl.java +++ b/dispatch/src/main/java/com/foreverwin/mesnac/dispatch/service/impl/SfcDispatchServiceImpl.java @@ -691,10 +691,9 @@ public class SfcDispatchServiceImpl extends ServiceImpl - + SELECT ZSD2.RESRCE,ZSD2.WORK_CENTER WORK_CENTER FROM SFC S INNER JOIN SFC_ROUTING SR ON SR.SFC_BO = S.HANDLE INNER JOIN SFC_ROUTER ST ON ST.SFC_ROUTING_BO = SR.HANDLE INNER JOIN SFC_STEP SS ON SS.SFC_ROUTER_BO = ST.HANDLE AND (SS.QTY_IN_QUEUE > 0 OR SS.QTY_IN_WORK > 0) LEFT JOIN Z_SFC_DISPATCH ZSD2 ON ZSD2.DISPATCH_NO = S.SFC || '-' || SS.STEP_ID WHERE S.SITE = #{site} - AND ZSD2.RESRCE IS NOT NULL AND S.SFC = #{sfcDispatch.sfc} + AND S.SFC = #{sfcDispatch.sfc}