异常ncQty为null提交

master
赵嘉伟 3 years ago
parent fbeb29e3d2
commit 118130204f

@ -51,6 +51,7 @@ import com.foreverwin.modular.core.util.FrontPage;
import com.sap.me.nonconformance.*;
import com.sap.me.production.SplitSerializeServiceInterface;
import com.sap.me.production.SplitSfcRequest;
import org.apache.logging.log4j.util.Strings;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.i18n.LocaleContextHolder;
@ -619,7 +620,8 @@ public class AbnormalBillServiceImpl extends ServiceImpl<AbnormalBillMapper, Abn
//放置图片,新建状态
this.fileUpload(abnormalBill);
}else{
uploadPicturesMapper.deleteById("UploadPicturesBO:"+abnormalBill.getSite()+","+abnormalBill.getAbnormalNo()+","+"N");
String status = "N".equals(abnormalBill.getStatus()) ? "N" : "G";
uploadPicturesMapper.deleteById("UploadPicturesBO:"+abnormalBill.getSite()+","+abnormalBill.getAbnormalNo()+","+status);
//UploadPicturesBO:"+abnormalBill.getSite()+","+abnormalBill.getAbnormalNo()+","+status
}
// this.anomalyCreatedAndSendMessage(abnormalBill,abnormalBillDispose);
@ -808,7 +810,7 @@ public class AbnormalBillServiceImpl extends ServiceImpl<AbnormalBillMapper, Abn
}
//判断不良品数量是否大于SFC的数量
Sfc sfc = sfcMapper.selectById(HandleEnum.SFC.getHandle(site, abnormalBill.getSfc()));
if(Integer.parseInt(abnormalBill.getNcQty()) > sfc.getQty()){
if(Strings.isNotBlank(abnormalBill.getNcQty()) && Integer.parseInt(abnormalBill.getNcQty()) > sfc.getQty()){
throw BusinessException.build("质量异常提报的不良品数量不能大于SFC的数量SFC的数量为:"+sfc.getQty());
}

Loading…
Cancel
Save