|
|
@ -192,6 +192,14 @@ public class QualityOrderReportServiceImpl implements IQualityOrderReportService |
|
|
|
return returnList; |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/* |
|
|
|
* 查询品质报告单列表*/ |
|
|
|
@Override |
|
|
|
public List<QualityOrderReportVO> selectQualityOrderReportListByQualityCOde(QualityOrderReportVO qualityReportVO){ |
|
|
|
return qualityOrderReportMapper.selectQualityOrderReportList(qualityReportVO); |
|
|
|
} |
|
|
|
|
|
|
|
/** |
|
|
|
* 新增生产成品品质单报告 |
|
|
|
* |
|
|
@ -404,11 +412,8 @@ public class QualityOrderReportServiceImpl implements IQualityOrderReportService |
|
|
|
if (processIsFinish) { |
|
|
|
// 审核状态-审核通过
|
|
|
|
qualityOrderReportVO.setAuditStatus("1"); |
|
|
|
String materialNo = qualityOrderReportVO.getMaterialNo(); |
|
|
|
//成品品质
|
|
|
|
if(materialNo.startsWith("8")){ |
|
|
|
updateApprovedInfo(qualityOrderReportVO); |
|
|
|
} |
|
|
|
//更新审核通过数据
|
|
|
|
updateApprovedInfo(qualityOrderReportVO); |
|
|
|
} |
|
|
|
qualityOrderReportMapper.updateQualityOrderReportById(qualityOrderReportVO); |
|
|
|
return processInstance; |
|
|
@ -488,11 +493,11 @@ public class QualityOrderReportServiceImpl implements IQualityOrderReportService |
|
|
|
qualityOrder.setUpdateTime(DateUtils.getNowDate()); |
|
|
|
int orderQualifiedNum = qualityOrder.getQualityQualifiedNum(); |
|
|
|
int orderUnqualifiedNum = qualityOrder.getQualityUnqualifiedNum(); |
|
|
|
int orderCheckNum = qualityOrder.getThisArrivedNum(); |
|
|
|
if(orderQualifiedNum + orderUnqualifiedNum + orderPendingReviewNum < orderCheckNum){ |
|
|
|
int qualityNum = orderQualifiedNum + orderUnqualifiedNum + orderPendingReviewNum; |
|
|
|
if(qualityNum < qualityOrder.getThisArrivedNum()){ |
|
|
|
qualityOrder.setQualityStatus("1");//部分品质
|
|
|
|
} |
|
|
|
if(orderQualifiedNum + orderUnqualifiedNum + orderPendingReviewNum == orderCheckNum){ |
|
|
|
if(qualityNum == qualityOrder.getThisArrivedNum()){ |
|
|
|
qualityOrder.setQualityStatus("2");//全部品质
|
|
|
|
} |
|
|
|
qualityOrderMapper.updateQualityOrder(qualityOrder); |
|
|
@ -571,9 +576,6 @@ public class QualityOrderReportServiceImpl implements IQualityOrderReportService |
|
|
|
storageOrder.setWarehouseStorageType("5");//生产入库
|
|
|
|
storageOrder.setWarehouseOrderType("1");//生产订单
|
|
|
|
storageOrder.setWarehouseDeptType("0");//入库部门:仓库
|
|
|
|
if(qualityOrderReportVO.getQualityOrderReportType().equals("0")){ |
|
|
|
storageOrder.setQualityUnqualifiedNum(0); |
|
|
|
} |
|
|
|
int storageResult = storageOrderMapper.insertWarehouseStorageOrder(storageOrder); |
|
|
|
if(storageResult<=0){ |
|
|
|
throw new BusinessException("新增入库单失败"); |
|
|
@ -611,11 +613,22 @@ public class QualityOrderReportServiceImpl implements IQualityOrderReportService |
|
|
|
int orderPendingReviewNum = qualityOrder.getPendingReviewNum(); |
|
|
|
orderPendingReviewNum = orderPendingReviewNum - checkNum; |
|
|
|
qualityOrder.setPendingReviewNum(orderPendingReviewNum); |
|
|
|
int orderQualifiedNum = qualityOrder.getQualityQualifiedNum(); |
|
|
|
int orderUnqualifiedNum = qualityOrder.getQualityUnqualifiedNum(); |
|
|
|
int qualityNum = orderQualifiedNum + orderUnqualifiedNum + orderPendingReviewNum; |
|
|
|
if(qualityNum == 0){ |
|
|
|
qualityOrder.setQualityStatus("0");//待品质
|
|
|
|
} |
|
|
|
if(qualityNum < qualityOrder.getThisArrivedNum()){ |
|
|
|
qualityOrder.setQualityStatus("1");//部分品质
|
|
|
|
} |
|
|
|
if(qualityNum == qualityOrder.getThisArrivedNum()){ |
|
|
|
qualityOrder.setQualityStatus("2");//全部品质
|
|
|
|
} |
|
|
|
qualityOrder.setUpdateBy(loginName); |
|
|
|
qualityOrder.setUpdateTime(DateUtils.getNowDate()); |
|
|
|
qualityOrderMapper.updateQualityOrder(qualityOrder); |
|
|
|
|
|
|
|
|
|
|
|
/* |
|
|
|
* 更新设备状态(成品品质时才存在)*/ |
|
|
|
List<String> deviceIds = qualityOrderReportVO.getQualityReportDeviceIds(); |
|
|
@ -643,6 +656,7 @@ public class QualityOrderReportServiceImpl implements IQualityOrderReportService |
|
|
|
WarehouseStorageOrder storageOrder = new WarehouseStorageOrder(); |
|
|
|
storageOrder.setWarehouseStorageCode(storageOrderCode); |
|
|
|
storageOrder.setRelatedOrderCode(qualityReportVO.getRelatedOrderCode()); |
|
|
|
storageOrder.setQualityOrderCode(qualityReportVO.getQualityOrderCode()); |
|
|
|
storageOrder.setNotifyArrivedNum(qualityReportVO.getQualityHasqualifiedNum()); |
|
|
|
storageOrder.setQualityQualifiedNum(qualityReportVO.getQualityHasqualifiedNum()); |
|
|
|
storageOrder.setQualityUnqualifiedNum(qualityReportVO.getProcessBadNum()); |
|
|
|