From 63b82d900a025d44bf424c28759a04b26484d3d4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=B5=B5=E5=98=89=E4=BC=9F?= <1724121454@qq.com> Date: Fri, 20 Aug 2021 13:37:53 +0800 Subject: [PATCH 1/6] =?UTF-8?q?=E5=BE=85=E5=8A=9E=E4=BA=8B=E9=A1=B9?= =?UTF-8?q?=E6=8F=90=E4=BA=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../service/impl/AbnormalBillServiceImpl.java | 57 ++++++++++++++++++- .../resources/mapper/AbnormalBillMapper.xml | 53 +++++++++++------ 2 files changed, 92 insertions(+), 18 deletions(-) diff --git a/anomaly/src/main/java/com/foreverwin/mesnac/anomaly/service/impl/AbnormalBillServiceImpl.java b/anomaly/src/main/java/com/foreverwin/mesnac/anomaly/service/impl/AbnormalBillServiceImpl.java index c95599b1..1a85fc9b 100644 --- a/anomaly/src/main/java/com/foreverwin/mesnac/anomaly/service/impl/AbnormalBillServiceImpl.java +++ b/anomaly/src/main/java/com/foreverwin/mesnac/anomaly/service/impl/AbnormalBillServiceImpl.java @@ -10,10 +10,10 @@ import com.foreverwin.mesnac.anomaly.mapper.AbnormalBillDisposeMapper; import com.foreverwin.mesnac.anomaly.mapper.AbnormalBillMapper; import com.foreverwin.mesnac.anomaly.model.*; import com.foreverwin.mesnac.anomaly.service.*; -import com.foreverwin.mesnac.common.enums.AnomalyConstant; import com.foreverwin.mesnac.common.constant.Constants; import com.foreverwin.mesnac.common.dto.ScrapDto; import com.foreverwin.mesnac.common.dto.UsrDto; +import com.foreverwin.mesnac.common.enums.AnomalyConstant; import com.foreverwin.mesnac.common.enums.HandleEnum; import com.foreverwin.mesnac.common.helper.NextNumberHelper; import com.foreverwin.mesnac.common.mapper.MessageMapper; @@ -132,6 +132,9 @@ public class AbnormalBillServiceImpl extends ServiceImpl backLog(AbnormalBillDto abnormalBillDto) { - String user = CommonMethods.getUser(); + String user = "CJN"; String site = CommonMethods.getSite(); List userGroupList = userGroupMapper.findUserGroupListByUser(site, user); //判断该用户组中有没有administrator,如果有的话就等于null @@ -1086,6 +1089,56 @@ public class AbnormalBillServiceImpl extends ServiceImpl dutyCauseTypeList = Arrays.asList(dutyCauseType.split(",")); + dataField.setDataField("REASON_CATEGORY"); + dataField.setDataValue(dutyCauseTypeList); + String dutyCauseTypeDescription = dataFieldListMapper.findDataFieldListByDataField(dataField, locale); + messageMap.put("dutyCauseType",dutyCauseTypeDescription); + }else{ + messageMap.put("dutyCauseType",""); + } + //责任部门 + String dutyDepart = messageContent.getDutyDepart(); + if(!StringUtil.isBlank(dutyDepart)){ + List dutyDepartList = Arrays.asList(dutyDepart.split(",")); + dataField.setDataField("RESPONSIBILITY_DEPARTMENT"); + dataField.setDataValue(dutyDepartList); + String dutyDepartDescription = dataFieldListMapper.findDataFieldListByDataField(dataField, locale); + messageMap.put("dutyDepart",dutyDepartDescription); + }else{ + messageMap.put("dutyDepart",""); + } + //责任分类 + String dutyType = messageContent.getDutyDepart(); + if(!StringUtil.isBlank(dutyType)){ + List dutyTypeList = Arrays.asList(dutyType.split(",")); + dataField.setDataField("RESPONSIBILITY_TYPE"); + dataField.setDataValue(dutyTypeList); + String dutyDepartDescription = dataFieldListMapper.findDataFieldListByDataField(dataField, locale); + messageMap.put("dutyType",dutyDepartDescription); + }else{ + messageMap.put("dutyType",""); + } + List list = userService.findList(messageContent.getPrincipalUser()); + if(list.size() > 0){ + messageMap.put("principalUser",list.get(0).getFullName()); + } + messageMap.put("dutyCauseDescription",messageContent.getDutyCauseDescription()); + } + + if(Constants.PROGRAM_CONFIRM.equals(messageContent.getStatus())){ + + } + //格式化之后的消息 return StringUtils.format(messageBody, messageMap); } diff --git a/anomaly/src/main/resources/mapper/AbnormalBillMapper.xml b/anomaly/src/main/resources/mapper/AbnormalBillMapper.xml index 189c2dfd..2ceb97ef 100644 --- a/anomaly/src/main/resources/mapper/AbnormalBillMapper.xml +++ b/anomaly/src/main/resources/mapper/AbnormalBillMapper.xml @@ -964,25 +964,46 @@ - AND (ZAB.REPORT_SEND_USER_GROUP IN + AND ZAB.REPORT_SEND_USER_GROUP IN UPPER(#{item.userGroup}) - OR - ZAB.CANCEL_SEND_USER_GROUP IN - - UPPER(#{item.userGroup}) - - OR - ZABD.DUTY_SEND_USER_GROUP IN - - UPPER(#{item.userGroup}) - - OR - ZABD.RESOLVE_SEND_USER_GROUP IN - - UPPER(#{item.userGroup}) - ) + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + From 376ca67464734c6cbbe1619d9ba65e7cdced3a09 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=B5=B5=E5=98=89=E4=BC=9F?= <1724121454@qq.com> Date: Fri, 20 Aug 2021 13:38:31 +0800 Subject: [PATCH 2/6] =?UTF-8?q?=E5=BE=85=E5=8A=9E=E4=BA=8B=E9=A1=B9?= =?UTF-8?q?=E6=8F=90=E4=BA=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../mesnac/anomaly/service/impl/AbnormalBillServiceImpl.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/anomaly/src/main/java/com/foreverwin/mesnac/anomaly/service/impl/AbnormalBillServiceImpl.java b/anomaly/src/main/java/com/foreverwin/mesnac/anomaly/service/impl/AbnormalBillServiceImpl.java index 1a85fc9b..821be30e 100644 --- a/anomaly/src/main/java/com/foreverwin/mesnac/anomaly/service/impl/AbnormalBillServiceImpl.java +++ b/anomaly/src/main/java/com/foreverwin/mesnac/anomaly/service/impl/AbnormalBillServiceImpl.java @@ -324,7 +324,7 @@ public class AbnormalBillServiceImpl extends ServiceImpl backLog(AbnormalBillDto abnormalBillDto) { - String user = "CJN"; + String user = CommonMethods.getUser(); String site = CommonMethods.getSite(); List userGroupList = userGroupMapper.findUserGroupListByUser(site, user); //判断该用户组中有没有administrator,如果有的话就等于null From 76bf6243c5957187e5a4b6c7f4e283683badaa2e Mon Sep 17 00:00:00 2001 From: Leon <3066758958@qq.com> Date: Fri, 20 Aug 2021 17:25:47 +0800 Subject: [PATCH 3/6] =?UTF-8?q?=E5=B7=A5=E5=8D=95=E6=95=B4=E7=90=86?= =?UTF-8?q?=E4=B8=8B=E8=BE=BE=E6=8A=A5=E9=94=99=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../service/impl/ShopOrderReleaseServiceImpl.java | 2 +- .../com/foreverwin/mesnac/meapi/mapper/RouterMapper.java | 2 ++ .../foreverwin/mesnac/meapi/service/RouterService.java | 2 ++ .../mesnac/meapi/service/impl/RouterServiceImpl.java | 5 +++++ meapi/src/main/resources/mapper/RouterMapper.xml | 8 +++++++- 5 files changed, 17 insertions(+), 2 deletions(-) diff --git a/dispatch/src/main/java/com/foreverwin/mesnac/dispatch/service/impl/ShopOrderReleaseServiceImpl.java b/dispatch/src/main/java/com/foreverwin/mesnac/dispatch/service/impl/ShopOrderReleaseServiceImpl.java index b51b33fd..f0829af6 100644 --- a/dispatch/src/main/java/com/foreverwin/mesnac/dispatch/service/impl/ShopOrderReleaseServiceImpl.java +++ b/dispatch/src/main/java/com/foreverwin/mesnac/dispatch/service/impl/ShopOrderReleaseServiceImpl.java @@ -115,7 +115,7 @@ public class ShopOrderReleaseServiceImpl implements ShopOrderReleaseService { BigDecimal qtyToRelease = qtyToBuild.subtract(qtyReleased); //查询工艺路线 - Router routerModel = routerService.getById(routerBo); + Router routerModel = routerService.getCurrentRouter(routerBo); if (routerModel == null) { throw new BaseException("工艺路线[" +StringUtils.trimHandle(routerBo)+ "]不存在"); } diff --git a/meapi/src/main/java/com/foreverwin/mesnac/meapi/mapper/RouterMapper.java b/meapi/src/main/java/com/foreverwin/mesnac/meapi/mapper/RouterMapper.java index ac430440..9c8a8ca1 100644 --- a/meapi/src/main/java/com/foreverwin/mesnac/meapi/mapper/RouterMapper.java +++ b/meapi/src/main/java/com/foreverwin/mesnac/meapi/mapper/RouterMapper.java @@ -20,5 +20,7 @@ public interface RouterMapper extends BaseMapper { Router selectRouterBySfcBo(@Param("sfcBo") String sfcBo); + Router selectCurrentRouter(@Param("routerBo") String routerBo); + List selectRouterList4RevisionDesc(@Param("site") String site, @Param("router") String router); } \ No newline at end of file diff --git a/meapi/src/main/java/com/foreverwin/mesnac/meapi/service/RouterService.java b/meapi/src/main/java/com/foreverwin/mesnac/meapi/service/RouterService.java index 23c5c39b..3cab1e65 100644 --- a/meapi/src/main/java/com/foreverwin/mesnac/meapi/service/RouterService.java +++ b/meapi/src/main/java/com/foreverwin/mesnac/meapi/service/RouterService.java @@ -28,6 +28,8 @@ public interface RouterService extends IService { Router getRouterBySfcBo(String sfcBo); + Router getCurrentRouter(String routerBo); + /** * 查询最大版本的工艺路线 * diff --git a/meapi/src/main/java/com/foreverwin/mesnac/meapi/service/impl/RouterServiceImpl.java b/meapi/src/main/java/com/foreverwin/mesnac/meapi/service/impl/RouterServiceImpl.java index b16d00d3..4137a554 100644 --- a/meapi/src/main/java/com/foreverwin/mesnac/meapi/service/impl/RouterServiceImpl.java +++ b/meapi/src/main/java/com/foreverwin/mesnac/meapi/service/impl/RouterServiceImpl.java @@ -47,6 +47,11 @@ public class RouterServiceImpl extends ServiceImpl impleme return routerMapper.selectRouterBySfcBo(sfcBo); } + @Override + public Router getCurrentRouter(String routerBo) { + return routerMapper.selectCurrentRouter(routerBo); + } + @Override public Router getMaxRevisionRouter(String site, String router) { List list = routerMapper.selectRouterList4RevisionDesc(site, router); diff --git a/meapi/src/main/resources/mapper/RouterMapper.xml b/meapi/src/main/resources/mapper/RouterMapper.xml index 52d4ecb2..d317c1e2 100644 --- a/meapi/src/main/resources/mapper/RouterMapper.xml +++ b/meapi/src/main/resources/mapper/RouterMapper.xml @@ -636,7 +636,6 @@ - + +