Merge remote-tracking branch 'origin/master'

master
zpl 3 years ago
commit b0f9b43c87

@ -10,10 +10,10 @@ import com.foreverwin.mesnac.anomaly.mapper.AbnormalBillDisposeMapper;
import com.foreverwin.mesnac.anomaly.mapper.AbnormalBillMapper; import com.foreverwin.mesnac.anomaly.mapper.AbnormalBillMapper;
import com.foreverwin.mesnac.anomaly.model.*; import com.foreverwin.mesnac.anomaly.model.*;
import com.foreverwin.mesnac.anomaly.service.*; 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.constant.Constants;
import com.foreverwin.mesnac.common.dto.ScrapDto; import com.foreverwin.mesnac.common.dto.ScrapDto;
import com.foreverwin.mesnac.common.dto.UsrDto; 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.enums.HandleEnum;
import com.foreverwin.mesnac.common.helper.NextNumberHelper; import com.foreverwin.mesnac.common.helper.NextNumberHelper;
import com.foreverwin.mesnac.common.mapper.MessageMapper; import com.foreverwin.mesnac.common.mapper.MessageMapper;
@ -132,6 +132,9 @@ public class AbnormalBillServiceImpl extends ServiceImpl<AbnormalBillMapper, Abn
@Autowired @Autowired
private NcCodeService ncCodeService; private NcCodeService ncCodeService;
@Autowired
private DataFieldListMapper dataFieldListMapper;
@Override @Override
@ -1086,6 +1089,56 @@ public class AbnormalBillServiceImpl extends ServiceImpl<AbnormalBillMapper, Abn
messageMap.put("ncCodeDescription",ncCodeDescription); messageMap.put("ncCodeDescription",ncCodeDescription);
} }
messageMap.put("shutDown",AnomalyConstant.ShutDown.msg(messageContent.getShutDown())); messageMap.put("shutDown",AnomalyConstant.ShutDown.msg(messageContent.getShutDown()));
//判断该异常单的状态是否是纠防确认
if(Constants.CORRECTION_CONFIRM.equals(messageContent.getStatus())){
DataField dataField = new DataField();
dataField.setSite(site);
//原因分类
String dutyCauseType = messageContent.getDutyType();
if(!StringUtil.isBlank(dutyCauseType)){
List<String> 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<String> 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<String> 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<UsrDto> 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); return StringUtils.format(messageBody, messageMap);
} }

@ -964,25 +964,46 @@
</if> </if>
<choose> <choose>
<when test="userGroupList != null and userGroupList.size != 0"> <when test="userGroupList != null and userGroupList.size != 0">
AND (ZAB.REPORT_SEND_USER_GROUP IN AND ZAB.REPORT_SEND_USER_GROUP IN
<foreach item="item" index="index" collection="userGroupList" separator="," open="(" close=")"> <foreach item="item" index="index" collection="userGroupList" separator="," open="(" close=")">
UPPER(#{item.userGroup}) UPPER(#{item.userGroup})
</foreach> </foreach>
OR
ZAB.CANCEL_SEND_USER_GROUP IN <!-- OR ZAB.STATUS =-->
<foreach item="item" index="index" collection="userGroupList" separator="," open="(" close=")"> <!-- CASE WHEN ZAB.STATUS = 'X' AND ZAB.REPORT_SEND_USER_GROUP IN-->
UPPER(#{item.userGroup}) <!-- <foreach item="item" index="index" collection="userGroupList" separator="," open="(" close=")">-->
</foreach> <!-- UPPER(#{item.userGroup})-->
OR <!-- </foreach>-->
ZABD.DUTY_SEND_USER_GROUP IN <!-- THEN-->
<foreach item="item" index="index" collection="userGroupList" separator="," open="(" close=")"> <!-- 'X'-->
UPPER(#{item.userGroup}) <!-- END-->
</foreach>
OR <!-- OR ZAB.STATUS =-->
ZABD.RESOLVE_SEND_USER_GROUP IN <!-- CASE WHEN ZAB.STATUS = 'Q' AND ZAB.CANCEL_SEND_USER_GROUP IN-->
<foreach item="item" index="index" collection="userGroupList" separator="," open="(" close=")"> <!-- <foreach item="item" index="index" collection="userGroupList" separator="," open="(" close=")">-->
UPPER(#{item.userGroup}) <!-- UPPER(#{item.userGroup})-->
</foreach>) <!-- </foreach>-->
<!-- THEN-->
<!-- 'Q'-->
<!-- END-->
<!-- OR ZAB.STATUS =-->
<!-- CASE WHEN ZAB.STATUS = 'J' AND ZABD.DUTY_SEND_USER_GROUP IN-->
<!-- <foreach item="item" index="index" collection="userGroupList" separator="," open="(" close=")">-->
<!-- UPPER(#{item.userGroup})-->
<!-- </foreach>-->
<!-- THEN-->
<!-- 'J'-->
<!-- END-->
<!-- OR ZAB.STATUS =-->
<!-- CASE WHEN ZAB.STATUS = 'F' AND ZABD.RESOLVE_SEND_USER_GROUP IN-->
<!-- <foreach item="item" index="index" collection="userGroupList" separator="," open="(" close=")">-->
<!-- UPPER(#{item.userGroup})-->
<!-- </foreach>-->
<!-- THEN-->
<!-- 'F'-->
<!-- END)-->
</when> </when>
<otherwise> <otherwise>
<if test="userGroupList == null"> <if test="userGroupList == null">

@ -39,13 +39,22 @@ spring:
slow-sql-millis: 100 slow-sql-millis: 100
activemq: activemq:
enabled: false enabled: false
brokerUrl: tcp://121.36.58.109:61616?wireFormat.maxInactivityDuration=0 brokerUrl: tcp://localhost:61616?wireFormat.maxInactivityDuration=0
password: admin password: admin
user: admin user: admin
pool: pool:
enabled: true enabled: true
max-connections: 10 max-connections: 10
#发送消息
activemq:
brokerUrl: tcp://localhost:61616?wireFormat.maxInactivityDuration=0
password: admin
user: admin
pool:
enabled: true
max-connections: 10
#WebService #WebService
ws: ws:
erp: erp:

@ -16,6 +16,15 @@ spring:
enabled: true enabled: true
max-connections: 10 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 #WebService
ws: ws:
erp: erp:

@ -9,13 +9,22 @@ spring:
jndi-name: jdbc/jts/wipPool jndi-name: jdbc/jts/wipPool
activemq: activemq:
enabled: false enabled: false
brokerUrl: tcp://121.36.58.109:61616?wireFormat.maxInactivityDuration=0 brokerUrl: tcp://172.16.251.133:61616?wireFormat.maxInactivityDuration=0
password: admin password: admin
user: admin user: admin
pool: pool:
enabled: true enabled: true
max-connections: 10 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 #WebService
ws: ws:
erp: erp:

@ -115,10 +115,11 @@ public class ShopOrderReleaseServiceImpl implements ShopOrderReleaseService {
BigDecimal qtyToRelease = qtyToBuild.subtract(qtyReleased); BigDecimal qtyToRelease = qtyToBuild.subtract(qtyReleased);
//查询工艺路线 //查询工艺路线
Router routerModel = routerService.getById(routerBo); Router routerModel = routerService.getCurrentRouter(routerBo);
if (routerModel == null) { if (routerModel == null) {
throw new BaseException("工艺路线[" +StringUtils.trimHandle(routerBo)+ "]不存在"); throw new BaseException("工艺路线[" +StringUtils.trimHandle(routerBo)+ "]不存在");
} }
routerBo = routerModel.getHandle();
//查询工艺路线详细 //查询工艺路线详细
List<RouterDTO> routerList = shopOrderReleaseMapper.selectShopOrderRouter(routerBo); List<RouterDTO> routerList = shopOrderReleaseMapper.selectShopOrderRouter(routerBo);

@ -610,7 +610,7 @@
<if test="ew.entity.workCenter!=null"> AND WORK_CENTER=#{ew.entity.workCenter}</if> <if test="ew.entity.workCenter!=null"> AND WORK_CENTER=#{ew.entity.workCenter}</if>
<if test="ew.entity.resrce!=null"> AND RESRCE=#{ew.entity.resrce}</if> <if test="ew.entity.resrce!=null"> AND RESRCE=#{ew.entity.resrce}</if>
<if test="ew.entity.employee!=null"> AND EMPLOYEE=#{ew.entity.employee}</if> <if test="ew.entity.employee!=null"> AND EMPLOYEE=#{ew.entity.employee}</if>
<if test="et.entity.employeeDescription!=null">EMPLOYEE_DESCRIPTION=#{et.entity.employeeDescription},</if> <if test="ew.entity.employeeDescription!=null">EMPLOYEE_DESCRIPTION=#{et.entity.employeeDescription},</if>
<if test="ew.entity.turnOperation!=null"> AND TURN_OPERATION=#{ew.entity.turnOperation}</if> <if test="ew.entity.turnOperation!=null"> AND TURN_OPERATION=#{ew.entity.turnOperation}</if>
<if test="ew.entity.dispatchQty!=null"> AND DISPATCH_QTY=#{ew.entity.dispatchQty}</if> <if test="ew.entity.dispatchQty!=null"> AND DISPATCH_QTY=#{ew.entity.dispatchQty}</if>
<if test="ew.entity.prodHours!=null"> AND PROD_HOURS=#{ew.entity.prodHours}</if> <if test="ew.entity.prodHours!=null"> AND PROD_HOURS=#{ew.entity.prodHours}</if>
@ -758,7 +758,7 @@
) WIP ) 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 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 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
</select> </select>
<update id="updateSfcDispatchStatus" > <update id="updateSfcDispatchStatus" >

@ -20,5 +20,7 @@ public interface RouterMapper extends BaseMapper<Router> {
Router selectRouterBySfcBo(@Param("sfcBo") String sfcBo); Router selectRouterBySfcBo(@Param("sfcBo") String sfcBo);
Router selectCurrentRouter(@Param("routerBo") String routerBo);
List<Router> selectRouterList4RevisionDesc(@Param("site") String site, @Param("router") String router); List<Router> selectRouterList4RevisionDesc(@Param("site") String site, @Param("router") String router);
} }

@ -28,6 +28,8 @@ public interface RouterService extends IService<Router> {
Router getRouterBySfcBo(String sfcBo); Router getRouterBySfcBo(String sfcBo);
Router getCurrentRouter(String routerBo);
/** /**
* 线 * 线
* *

@ -47,6 +47,11 @@ public class RouterServiceImpl extends ServiceImpl<RouterMapper, Router> impleme
return routerMapper.selectRouterBySfcBo(sfcBo); return routerMapper.selectRouterBySfcBo(sfcBo);
} }
@Override
public Router getCurrentRouter(String routerBo) {
return routerMapper.selectCurrentRouter(routerBo);
}
@Override @Override
public Router getMaxRevisionRouter(String site, String router) { public Router getMaxRevisionRouter(String site, String router) {
List<Router> list = routerMapper.selectRouterList4RevisionDesc(site, router); List<Router> list = routerMapper.selectRouterList4RevisionDesc(site, router);

@ -636,7 +636,6 @@
</delete> </delete>
<!-- BaseMapper标准查询/修改/删除 --> <!-- BaseMapper标准查询/修改/删除 -->
<select id="selectRouterBySfcBo" resultType="com.foreverwin.mesnac.meapi.model.Router"> <select id="selectRouterBySfcBo" resultType="com.foreverwin.mesnac.meapi.model.Router">
SELECT R.HANDLE, R.SITE, R.ROUTER, R.ROUTER_TYPE, R.DESCRIPTION, R.TEMPORARY_ROUTER, R.STATUS_BO, R.ENTRY_ROUTER_STEP_BO, R.COPIED_FROM_ROUTER_BO, R.REVISION, R.CURRENT_REVISION, R.HAS_BEEN_RELEASED SELECT R.HANDLE, R.SITE, R.ROUTER, R.ROUTER_TYPE, R.DESCRIPTION, R.TEMPORARY_ROUTER, R.STATUS_BO, R.ENTRY_ROUTER_STEP_BO, R.COPIED_FROM_ROUTER_BO, R.REVISION, R.CURRENT_REVISION, R.HAS_BEEN_RELEASED
FROM SFC SC FROM SFC SC
@ -646,6 +645,13 @@
WHERE SFC_BO = #{sfcBo} WHERE SFC_BO = #{sfcBo}
</select> </select>
<select id="selectCurrentRouter" resultMap="BaseResultMap">
SELECT <include refid="Base_Column_List"></include>
FROM ROUTER
WHERE (HANDLE = #{routerBo} OR #{routerBo} = 'RouterBO:'||SITE||','||ROUTER||',H,#')
AND CURRENT_REVISION = 'true'
</select>
<select id="selectRouterList4RevisionDesc" resultMap="BaseResultMap"> <select id="selectRouterList4RevisionDesc" resultMap="BaseResultMap">
SELECT <include refid="Base_Column_List"></include> SELECT <include refid="Base_Column_List"></include>
FROM ROUTER FROM ROUTER

Loading…
Cancel
Save