异常计划待办事项

master
赵嘉伟 3 years ago
parent e70993ac6e
commit 5548aa0243

@ -21,6 +21,8 @@ public class AbnormalPlanDto extends AbnormalPlan {
private String resrceDescription;
private String item;
public String getItemDescription() {
return itemDescription;
}
@ -63,5 +65,11 @@ public class AbnormalPlanDto extends AbnormalPlan {
this.resrceDescription = resrceDescription;
}
public String getItem() {
return item;
}
public void setItem(String item) {
this.item = item;
}
}

@ -408,6 +408,7 @@ public class AbnormalBillServiceImpl extends ServiceImpl<AbnormalBillMapper, Abn
String site = CommonMethods.getSite();
String user = CommonMethods.getUser();
LocalDateTime now = LocalDateTime.now();
String locale = LocaleContextHolder.getLocale().getLanguage();
abnormalBillDispose.setHandle(HandleEnum.ABNORMAL_BILL_DISPOSE.getHandle(site,abnormalBill.getAbnormalNo()));
AbnormalBill abnormalBill1 = abnormalBillMapper.selectById(HandleEnum.ABNORMAL_BILL.getHandle(site, abnormalBill.getAbnormalNo()));
@ -453,8 +454,13 @@ public class AbnormalBillServiceImpl extends ServiceImpl<AbnormalBillMapper, Abn
abnormalBillDisposeService.saveOrUpdate(abnormalBillDispose);
this.saveOrUpdate(abnormalBill);
this.anomalyCreatedAndSendMessage(abnormalBillMapper.selectById(abnormalBill.getHandle()),abnormalBillDispose);
//保存到异常计划表
AbnormalBill abnormalBill2 = abnormalBillMapper.selectById(abnormalBill.getHandle());
if(Constants.ABNORMAL_QUALITY.equals(abnormalBill2.getType())){
AbnormalBillDispose abnormalBillDispose1 = abnormalBillDisposeMapper.selectById(abnormalBillDispose.getHandle());
abnormalPlanService.saveAbnormalPlan(abnormalBill2,abnormalBillDispose1,now);
}
this.anomalyCreatedAndSendMessage(abnormalBill2,abnormalBillDispose);
}
@Override
@ -504,8 +510,8 @@ public class AbnormalBillServiceImpl extends ServiceImpl<AbnormalBillMapper, Abn
abnormalBillDispose.setClosedDateTime(now);
// this.anomalyCreatedAndSendMessage(abnormalBill,abnormalBillDispose);
//保存到异常计划表
AbnormalBillDisposeDto abnormalBillDisposeDto = abnormalBillDisposeMapper.findAllByAbnormalNo(abnormalBill, local);
if(Constants.ABNORMAL_QUALITY.equals(abnormalBill.getType())){
AbnormalBillDisposeDto abnormalBillDisposeDto = abnormalBillDisposeMapper.findAllByAbnormalNo(abnormalBill, local);
abnormalPlanService.saveAbnormalPlan(abnormalBillDisposeDto,now);
}
this.saveOrUpdate(abnormalBill);
@ -917,7 +923,6 @@ public class AbnormalBillServiceImpl extends ServiceImpl<AbnormalBillMapper, Abn
//异常类型
abnormalMessage.setType(abnormalBill.getType());
abnormalMessage.setMessageType(abnormalBill.getMessageType());
// //根据异常的类型找到消息的类型

@ -103,7 +103,8 @@ public class AbnormalPlanServiceImpl extends ServiceImpl<AbnormalPlanMapper, Abn
abnormalPlan.setHandle(HandleEnum.ABNORMAL_PLAN.getHandle(site,abnormalBillDisposeDto.getAbnormalNo()));
abnormalPlan.setSite(site);
abnormalPlan.setAbnormalNo(abnormalBillDisposeDto.getAbnormalNo());
abnormalPlan.setStatus(Constants.UNTREATED);//未处理
//未处理
abnormalPlan.setStatus(Constants.UNTREATED);
abnormalPlan.setWorkCenter(abnormalBillDisposeDto.getWorkCenter());
abnormalPlan.setAbnormalMethod(abnormalBillDisposeDto.getAbnormalMethod());
abnormalPlan.setShopOrder(abnormalBillDisposeDto.getShopOrder());
@ -113,7 +114,6 @@ public class AbnormalPlanServiceImpl extends ServiceImpl<AbnormalPlanMapper, Abn
abnormalPlan.setQty(Long.parseLong(abnormalBillDisposeDto.getNcQty()));
}
//没有处理人和处理时间
// abnormalPlan.setProcessor();
abnormalPlan.setClosedUser(user);
abnormalPlan.setClosedDateTime(now);
abnormalPlan.setCreatedUser(user);

@ -552,13 +552,14 @@
<select id="findAbnormalPlan" resultMap="abnormalPlanDto">
SELECT ZAP.ABNORMAL_NO ABNORMAL_NO ,ZAP.ABNORMAL_METHOD ABNORMAL_METHOD ,
ZAP.SHOP_ORDER SHOP_ORDER ,R.DESCRIPTION RESRCE_DESCRIPTION,ZAP.STATUS STATUS ,
ZAP.SHOP_ORDER SHOP_ORDER ,R.RESRCE RESRCE,R.DESCRIPTION RESRCE_DESCRIPTION,ZAP.STATUS STATUS ,I.ITEM ITEM,
IT.DESCRIPTION ITEM_DESCRIPTION,ZAP.QTY QTY ,ZNU.FULL_NAME FULL_NAME,
ZAP.SEND_USER_GROUP SEND_USER_GROUP
FROM Z_ABNORMAL_PLAN ZAP
INNER JOIN Z_ABNORMAL_BILL ZAB ON ZAB.ABNORMAL_NO = ZAP.ABNORMAL_NO AND ZAB.SITE = #{abnormalPlanDto.site}
AND ZAB.TYPE = 'Z'
LEFT JOIN RESRCE R ON R.RESRCE = ZAP.RESRCE AND R.SITE = ZAP.SITE
LEFT JOIN ITEM I ON I.HANDLE = ZAP.ITEM_BO
LEFT JOIN ITEM_T IT ON IT.ITEM_BO = ZAP.ITEM_BO AND IT.LOCALE = #{locale}
LEFT JOIN Z_NWA_USER ZNU ON ZNU.USER_NAME = ZAP.PROCESSOR AND ZNU.SITE = ZAP.SITE
<where>

@ -795,23 +795,14 @@
</update>
<select id="findResrceBySfc" resultType="com.foreverwin.mesnac.common.dto.SfcDispatchDto">
SELECT RESRCE
FROM Z_SFC_DISPATCH zsd
<where>
SITE = #{site}
AND RESRCE IS NOT NULL
AND SFC = #{sfcDispatch.sfc}
AND MODIFIED_DATE_TIME = (
SELECT MAX(zsd2.MODIFIED_DATE_TIME) FROM Z_SFC_DISPATCH zsd2
WHERE SFC=#{sfcDispatch.sfc} AND zsd2.RESRCE IS NOT NULL
)
<!-- <if test="array != null">
AND DISPATCH_STATUS IN
<foreach open="(" item="item" collection="array" separator="," close=")">
UPPER(#{item})
</foreach>
</if>-->
</where>
SELECT ZSD2.RESRCE 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}
</select>
<select id="findSfcDispatchBySfc" resultType="com.foreverwin.mesnac.common.dto.SfcDispatchDto">

Loading…
Cancel
Save