|
|
|
@ -630,7 +630,7 @@ public class MesWorkOrderService extends BaseMesService<MesWorkOrder> implements
|
|
|
|
|
}
|
|
|
|
|
//成品移库
|
|
|
|
|
if(isMove){
|
|
|
|
|
MesMove move = createMove(mesPartSap, mesProdRuleSortCfg.getSrcErpLocation(), mesProdRuleSortCfg.getDestErpLocation(), mesWorkOrder.getOrganizeCode(), 1d,sn);
|
|
|
|
|
MesMove move = createMove(mesPartSap, mesProdRuleSortCfg.getSrcErpLocation(), mesProdRuleSortCfg.getDestErpLocation(), mesWorkOrder.getOrganizeCode(), 1d,sn,MesExtEnumUtil.MOVE_TYPE.FINISH_PRODUCTS_MOVE.getValue());
|
|
|
|
|
move.setMatnr(mesWorkOrder.getPartNo());
|
|
|
|
|
mesMoveList.add(move);
|
|
|
|
|
}
|
|
|
|
@ -691,8 +691,8 @@ public class MesWorkOrderService extends BaseMesService<MesWorkOrder> implements
|
|
|
|
|
moveRule = null;
|
|
|
|
|
if(itemPartMap.containsKey(mesBom.getItemPartNo())){
|
|
|
|
|
MesPart itemPart = itemPartMap.get(mesBom.getItemPartNo()).iterator().next();
|
|
|
|
|
if(!StringUtil.isEmpty(itemPart.getPartEds()) && mesMoveRuleMap.containsKey(itemPart.getPartEds())){
|
|
|
|
|
moveRule = mesMoveRuleMap.get(itemPart.getPartEds()).iterator().next();
|
|
|
|
|
if(!StringUtil.isEmpty(itemPart.getEsd()) && mesMoveRuleMap.containsKey(itemPart.getEsd())){
|
|
|
|
|
moveRule = mesMoveRuleMap.get(itemPart.getEsd()).iterator().next();
|
|
|
|
|
if (MesExtEnumUtil.MOVE_TYPE_REPORT_TYPE.REPORT_MOVE.getValue() == moveRule.getReportType()) {
|
|
|
|
|
isItemMove = true;
|
|
|
|
|
isItemReport = true;
|
|
|
|
@ -713,7 +713,7 @@ public class MesWorkOrderService extends BaseMesService<MesWorkOrder> implements
|
|
|
|
|
if(mesPartSapMap.containsKey(mesBom.getItemPartNo())){
|
|
|
|
|
mesPartSap = mesPartSapMap.get(mesBom.getItemPartNo()).iterator().next();
|
|
|
|
|
}
|
|
|
|
|
MesMove move = createMove(mesPartSap, moveRule.getErpSrcLocateNo(), moveRule.getErpDestLocateNo(), mesBom.getOrganizeCode(), mesBom.getItemQty(),sn);
|
|
|
|
|
MesMove move = createMove(mesPartSap, moveRule.getErpSrcLocateNo(), moveRule.getErpDestLocateNo(), mesBom.getOrganizeCode(), mesBom.getItemQty(),"",MesExtEnumUtil.MOVE_TYPE.RAW_MATERIAL_MOVE.getValue());
|
|
|
|
|
move.setMatnr(mesBom.getItemPartNo());
|
|
|
|
|
mesMoveList.add(move);
|
|
|
|
|
}
|
|
|
|
@ -826,7 +826,7 @@ public class MesWorkOrderService extends BaseMesService<MesWorkOrder> implements
|
|
|
|
|
return mesWorkOrderRDao.findByHqlWhere(packBean);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private MesMove createMove(MesPartSap mesPart , String source, String target, String org,double qty,String sn) {
|
|
|
|
|
private MesMove createMove(MesPartSap mesPart , String source, String target, String org,double qty,String sn,Integer moveType) {
|
|
|
|
|
MesMove move = new MesMove();
|
|
|
|
|
if(!Objects.isNull(mesPart)){
|
|
|
|
|
move.setMeins(mesPart.getUnit());
|
|
|
|
@ -838,6 +838,7 @@ public class MesWorkOrderService extends BaseMesService<MesWorkOrder> implements
|
|
|
|
|
move.setMenge(qty);
|
|
|
|
|
move.setPostDate(TimeTool.getToday());
|
|
|
|
|
move.setProductSn(sn);
|
|
|
|
|
move.setMoveType(moveType);
|
|
|
|
|
move.setPostTime(TimeTool.getTimeShortWithColon());
|
|
|
|
|
ConvertBean.serviceModelInitialize(move, AuthUtil.getSessionUser().getUserName());
|
|
|
|
|
return move;
|
|
|
|
|