抽样数量汇总逻辑

master
zhaoxiaolin 5 months ago
parent 226c4ca215
commit 297e733e41

@ -850,15 +850,13 @@ public class QcCheckTaskIncomeServiceImpl<QcCheckUnqualifiedService> implements
qcCheckTask.setNoOkQuality(noOkQquality);//累计不合格数 qcCheckTask.setNoOkQuality(noOkQquality);//累计不合格数
qcCheckTask.setCheckManCode(qcCheckTaskIncome.getUpdateBy()); qcCheckTask.setCheckManCode(qcCheckTaskIncome.getUpdateBy());
qcCheckTask.setCheckManName(qcCheckTaskIncome.getUpdateByName()); qcCheckTask.setCheckManName(qcCheckTaskIncome.getUpdateByName());
qcCheckTask.setSampleQuality(qcCheckTaskIncome.getSampleQuality());
qcCheckTask.setReason(qcCheckTaskIncome.getReason()); qcCheckTask.setReason(qcCheckTaskIncome.getReason());
qcCheckTask.setBz(qcCheckTaskIncome.getAttr3());//备注 qcCheckTask.setBz(qcCheckTaskIncome.getAttr3());//备注
/**qc_check_task**/
n = qcCheckTaskIncomeMapper.updateQcCheckTask(qcCheckTask); BigDecimal sampleQuality = new BigDecimal("0");
logger.info("qc_check_task:"+n);
/**更新qc_check_task_detail**/
for(QcCheckTaskDetail detail:details){ for(QcCheckTaskDetail detail:details){
detail.setUpdateTime(nowTime); detail.setUpdateTime(nowTime);
sampleQuality = noOkQquality.add(new BigDecimal(detail.getSampleQuality()));
//上传附件 //上传附件
if (StringUtils.isNotEmpty(detail.getFileListStr())) { if (StringUtils.isNotEmpty(detail.getFileListStr())) {
String[] ids = detail.getFileListStr().split(","); String[] ids = detail.getFileListStr().split(",");
@ -880,6 +878,12 @@ public class QcCheckTaskIncomeServiceImpl<QcCheckUnqualifiedService> implements
} }
} }
qcCheckTask.setSampleQuality(sampleQuality);
/**qc_check_task**/
n = qcCheckTaskIncomeMapper.updateQcCheckTask(qcCheckTask);
logger.info("qc_check_task:"+n);
/**更新qc_check_task_detail**/
n= qcCheckTaskIncomeMapper.updateQcCheckTaskDetails(details); n= qcCheckTaskIncomeMapper.updateQcCheckTaskDetails(details);
logger.info("更新qc_check_task_detail:"+n); logger.info("更新qc_check_task_detail:"+n);

Loading…
Cancel
Save