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..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 @@ -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 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}) - ) + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/console/src/main/resources/application-local.yml b/console/src/main/resources/application-local.yml index 8c046671..1908b688 100644 --- a/console/src/main/resources/application-local.yml +++ b/console/src/main/resources/application-local.yml @@ -39,13 +39,22 @@ spring: slow-sql-millis: 100 activemq: enabled: false - brokerUrl: tcp://121.36.58.109:61616?wireFormat.maxInactivityDuration=0 + brokerUrl: tcp://localhost:61616?wireFormat.maxInactivityDuration=0 password: admin user: admin pool: enabled: true max-connections: 10 +#发送消息 +activemq: + brokerUrl: tcp://localhost:61616?wireFormat.maxInactivityDuration=0 + password: admin + user: admin + pool: + enabled: true + max-connections: 10 + #WebService ws: erp: diff --git a/console/src/main/resources/application-prd.yml b/console/src/main/resources/application-prd.yml index 73c8dd67..caf9f021 100644 --- a/console/src/main/resources/application-prd.yml +++ b/console/src/main/resources/application-prd.yml @@ -16,6 +16,15 @@ spring: enabled: true max-connections: 10 +#发送消息 +activemq: + brokerUrl: tcp://172.16.251.164:61616?wireFormat.maxInactivityDuration=0 + password: admin + user: admin + pool: + enabled: true + max-connections: 10 + #WebService ws: erp: diff --git a/console/src/main/resources/application-qas.yml b/console/src/main/resources/application-qas.yml index 88e183c5..36883dd6 100644 --- a/console/src/main/resources/application-qas.yml +++ b/console/src/main/resources/application-qas.yml @@ -9,13 +9,22 @@ spring: jndi-name: jdbc/jts/wipPool activemq: enabled: false - brokerUrl: tcp://121.36.58.109:61616?wireFormat.maxInactivityDuration=0 + brokerUrl: tcp://172.16.251.133:61616?wireFormat.maxInactivityDuration=0 password: admin user: admin pool: enabled: true max-connections: 10 +#发送消息 +activemq: + brokerUrl: tcp://172.16.251.133:61616?wireFormat.maxInactivityDuration=0 + password: admin + user: admin + pool: + enabled: true + max-connections: 10 + #WebService ws: erp: 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..a56be644 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,10 +115,11 @@ 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)+ "]不存在"); } + routerBo = routerModel.getHandle(); //查询工艺路线详细 List routerList = shopOrderReleaseMapper.selectShopOrderRouter(routerBo); diff --git a/dispatch/src/main/resources/mapper/SfcDispatchMapper.xml b/dispatch/src/main/resources/mapper/SfcDispatchMapper.xml index 63613260..12009366 100644 --- a/dispatch/src/main/resources/mapper/SfcDispatchMapper.xml +++ b/dispatch/src/main/resources/mapper/SfcDispatchMapper.xml @@ -610,7 +610,7 @@ AND WORK_CENTER=#{ew.entity.workCenter} AND RESRCE=#{ew.entity.resrce} AND EMPLOYEE=#{ew.entity.employee} - EMPLOYEE_DESCRIPTION=#{et.entity.employeeDescription}, + EMPLOYEE_DESCRIPTION=#{et.entity.employeeDescription}, AND TURN_OPERATION=#{ew.entity.turnOperation} AND DISPATCH_QTY=#{ew.entity.dispatchQty} AND PROD_HOURS=#{ew.entity.prodHours} @@ -758,7 +758,7 @@ ) WIP LEFT JOIN Z_SFC_DISPATCH V1 ON V1.SITE = WIP.SITE AND V1.SFC = WIP.SFC AND V1.DISPATCH_SEQ = WIP.BEFORE_SEQ LEFT JOIN Z_SFC_DISPATCH V2 ON V2.SITE = WIP.SITE AND V2.SFC = WIP.SFC AND V2.DISPATCH_SEQ = WIP.AFTER_SEQ - ORDER BY WIP.SFC, TO_NUMBER(WIP.DISPATCH_SEQ) + ORDER BY WIP.SHOP_ORDER 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 @@ - + +