master
philip 3 years ago
parent 9c458ac9e9
commit 11ff341677

@ -7,6 +7,15 @@ public class SplitSfcDto extends SplitSfc {
private String routerBo;
private String ncQty;
private String abnormalNo;
private String abnormalMethod;
public String getAbnormalMethod() {
return abnormalMethod;
}
public void setAbnormalMethod(String abnormalMethod) {
this.abnormalMethod = abnormalMethod;
}
public String getAbnormalNo() {
return abnormalNo;

@ -159,7 +159,7 @@ public class SplitSfcServiceImpl extends ServiceImpl<SplitSfcMapper, SplitSfc> i
splitSfc.setCreatedDateTime(LocalDateTime.now());
save(splitSfc);
Router routerBySfcBo = routerService.getRouterBySfcBo(HandleEnum.SFC.getHandle(site, sfc));
sfcDispatchCommonService.saveSplitSfcDispatch(site, CommonMethods.getUser(), "N", sfcData.getShopOrder(), sfc, operation, sfcDto.getStepId(),newSfc, routerBySfcBo.getHandle());
sfcDispatchCommonService.saveSplitSfcDispatch(site, CommonMethods.getUser(), "N", sfcData.getShopOrder(), sfc, operation, sfcData.getStepId(),newSfc, routerBySfcBo.getHandle());
return splitSfc;
} catch (Exception e) {
ExceptionUtil.throwException(e);
@ -195,6 +195,7 @@ public class SplitSfcServiceImpl extends ServiceImpl<SplitSfcMapper, SplitSfc> i
SplitSfcDto splitSfcDto=splitSfcMapper.getAbnormalQty(site,sfc,operation, abnormalNo);
String routerBo = splitSfcDto.getRouterBo();
String ncCode = splitSfcDto.getNcCode();
String abnormalMethod = splitSfcDto.getAbnormalMethod();
if (StringUtil.isBlank(ncCode)){
throw new BaseException("异常处置未选择不良代码");
}
@ -222,8 +223,7 @@ public class SplitSfcServiceImpl extends ServiceImpl<SplitSfcMapper, SplitSfc> i
SplitSfcResponse splitSfcResponse = splitSfcResponses.iterator().next();
String newSfcRef = splitSfcResponse.getNewSfcRef();
String newSfc = StringUtil.trimHandle(newSfcRef);
if(StringUtil.notBlank(routerBo)){
if(abnormalMethod.equals("F")&&StringUtil.notBlank(routerBo)){
//记录不合格
CreateNCRequest createNCRequest=new CreateNCRequest();
createNCRequest.setQty(splitQty);

@ -378,7 +378,7 @@
WHERE S.HANDLE=#{handle}
</select>
<select id="getAbnormalQty" resultType="com.foreverwin.mesnac.production.dto.SplitSfcDto">
SELECT zab.NC_QTY,zsbd.ROUTER_BO,zab.NC_CODE,zab.ABNORMAL_NO FROM Z_ABNORMAL_BILL zab
SELECT zab.NC_QTY,zsbd.ROUTER_BO,zab.NC_CODE,zab.ABNORMAL_NO,zsbd.ABNORMAL_METHOD FROM Z_ABNORMAL_BILL zab
JOIN Z_ABNORMAL_BILL_DISPOSE zsbd ON zab.HANDLE=ZSBD.ABNORMAL_BILL_BO
WHERE ZAB.SFC=#{sfc} AND zab.ABNORMAL_NO=#{abnormalNo} AND zab.SITE=#{site} AND ZAB.OPERATION=#{operation} AND zab.STATUS='G' AND zab."TYPE"='Z' AND (zsbd.ABNORMAL_METHOD='F' OR zsbd.ABNORMAL_METHOD='C')
</select>

Loading…
Cancel
Save