|
|
@ -1,5 +1,6 @@
|
|
|
|
package com.op.quality.service.impl;
|
|
|
|
package com.op.quality.service.impl;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
import java.math.BigDecimal;
|
|
|
|
import java.util.ArrayList;
|
|
|
|
import java.util.ArrayList;
|
|
|
|
import java.util.Date;
|
|
|
|
import java.util.Date;
|
|
|
|
import java.util.List;
|
|
|
|
import java.util.List;
|
|
|
@ -8,6 +9,7 @@ import com.alibaba.fastjson2.JSONArray;
|
|
|
|
import com.baomidou.dynamic.datasource.annotation.DS;
|
|
|
|
import com.baomidou.dynamic.datasource.annotation.DS;
|
|
|
|
import com.baomidou.dynamic.datasource.toolkit.DynamicDataSourceContextHolder;
|
|
|
|
import com.baomidou.dynamic.datasource.toolkit.DynamicDataSourceContextHolder;
|
|
|
|
import com.op.common.core.utils.DateUtils;
|
|
|
|
import com.op.common.core.utils.DateUtils;
|
|
|
|
|
|
|
|
import com.op.common.core.utils.StringUtils;
|
|
|
|
import com.op.common.core.utils.uuid.IdUtils;
|
|
|
|
import com.op.common.core.utils.uuid.IdUtils;
|
|
|
|
import com.op.common.security.utils.SecurityUtils;
|
|
|
|
import com.op.common.security.utils.SecurityUtils;
|
|
|
|
import com.op.quality.domain.*;
|
|
|
|
import com.op.quality.domain.*;
|
|
|
@ -240,6 +242,20 @@ public class QcCheckTaskIncomeServiceImpl implements IQcCheckTaskIncomeService {
|
|
|
|
String key = "#header.poolName";
|
|
|
|
String key = "#header.poolName";
|
|
|
|
String factoryCode = request.getHeader(key.substring(8)).replace("ds_","");
|
|
|
|
String factoryCode = request.getHeader(key.substring(8)).replace("ds_","");
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
BigDecimal noOkQquality = new BigDecimal("0");
|
|
|
|
|
|
|
|
if(qcCheckTaskIncome.getaNoOkquality()!=null){
|
|
|
|
|
|
|
|
noOkQquality.add(qcCheckTaskIncome.getaNoOkquality());
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
if(qcCheckTaskIncome.getbNoOkquality()!=null){
|
|
|
|
|
|
|
|
noOkQquality.add(qcCheckTaskIncome.getbNoOkquality());
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
if(qcCheckTaskIncome.getcNoOkquality()!=null){
|
|
|
|
|
|
|
|
noOkQquality.add(qcCheckTaskIncome.getcNoOkquality());
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
if(qcCheckTaskIncome.getNoOkQuality()==null){
|
|
|
|
|
|
|
|
qcCheckTaskIncome.setNoOkQuality(noOkQquality);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
//遍历检测项目
|
|
|
|
//遍历检测项目
|
|
|
|
List<String> projects= qcCheckTaskDetailMapper.getProjectStatus(qcCheckTaskIncome.getRecordId());
|
|
|
|
List<String> projects= qcCheckTaskDetailMapper.getProjectStatus(qcCheckTaskIncome.getRecordId());
|
|
|
|
String result = "N";
|
|
|
|
String result = "N";
|
|
|
@ -322,7 +338,8 @@ public class QcCheckTaskIncomeServiceImpl implements IQcCheckTaskIncomeService {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
@Override
|
|
|
|
public int commitCheckResults(List<QcCheckTaskDetail> details) {
|
|
|
|
public int commitCheckResults(QcCheckTaskIncome qcCheckTaskIncome) {
|
|
|
|
|
|
|
|
List<QcCheckTaskDetail> details = qcCheckTaskIncome.getQcCheckTaskDetails();
|
|
|
|
DynamicDataSourceContextHolder.push(details.get(0).getFactoryCode());
|
|
|
|
DynamicDataSourceContextHolder.push(details.get(0).getFactoryCode());
|
|
|
|
Date nowTime = DateUtils.getNowDate();
|
|
|
|
Date nowTime = DateUtils.getNowDate();
|
|
|
|
String factoryCode = details.get(0).getFactoryCode();
|
|
|
|
String factoryCode = details.get(0).getFactoryCode();
|
|
|
@ -347,6 +364,20 @@ public class QcCheckTaskIncomeServiceImpl implements IQcCheckTaskIncomeService {
|
|
|
|
qcCheckTask.setUpdateTime(nowTime);
|
|
|
|
qcCheckTask.setUpdateTime(nowTime);
|
|
|
|
qcCheckTask.setCheckTime(nowTime);
|
|
|
|
qcCheckTask.setCheckTime(nowTime);
|
|
|
|
qcCheckTask.setCheckResult(result);//检验结果Y合格 N不合格
|
|
|
|
qcCheckTask.setCheckResult(result);//检验结果Y合格 N不合格
|
|
|
|
|
|
|
|
BigDecimal noOkQquality = new BigDecimal("0");
|
|
|
|
|
|
|
|
if(qcCheckTaskIncome.getaNoOkquality()!=null){
|
|
|
|
|
|
|
|
noOkQquality.add(qcCheckTaskIncome.getaNoOkquality());
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
if(qcCheckTaskIncome.getbNoOkquality()!=null){
|
|
|
|
|
|
|
|
noOkQquality.add(qcCheckTaskIncome.getbNoOkquality());
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
if(qcCheckTaskIncome.getcNoOkquality()!=null){
|
|
|
|
|
|
|
|
noOkQquality.add(qcCheckTaskIncome.getcNoOkquality());
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
if(qcCheckTask.getNoOkQuality()==null){
|
|
|
|
|
|
|
|
qcCheckTask.setNoOkQuality(noOkQquality);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
qcCheckTask.setSampleQuality(qcCheckTaskIncome.getSampleQuality());
|
|
|
|
/**qc_check_task**/
|
|
|
|
/**qc_check_task**/
|
|
|
|
n = qcCheckTaskIncomeMapper.updateQcCheckTask(qcCheckTask);
|
|
|
|
n = qcCheckTaskIncomeMapper.updateQcCheckTask(qcCheckTask);
|
|
|
|
logger.info("qc_check_task:"+n);
|
|
|
|
logger.info("qc_check_task:"+n);
|
|
|
|