|
|
|
@ -372,24 +372,33 @@ public class OpenServiceImpl implements OpenService {
|
|
|
|
|
int m = openMapper.addCheckUsers(users);
|
|
|
|
|
logger.info(qcCheckTaskProduce.getOrderNo()+":检查人新增" + m + "成功");
|
|
|
|
|
|
|
|
|
|
/**qc_check_type_project**/
|
|
|
|
|
/**qc_check_type_project**///个性
|
|
|
|
|
List<QcCheckTaskDetailDTO> items = openMapper.getTPByTypeMaterial(qctp);
|
|
|
|
|
if (CollectionUtils.isEmpty(items)) {
|
|
|
|
|
|
|
|
|
|
/**qc_material_group_detail**/
|
|
|
|
|
QcMaterialGroupDetailDTO group = openMapper.getGroupByMaterial(qcCheckTaskProduce.getMaterialCode());
|
|
|
|
|
if (group == null) {
|
|
|
|
|
logger.info(qcCheckTaskProduce.getOrderNo()+":"+qcCheckTaskProduce.getMaterialCode()+"没有维护物料组检测项,检验任务生成失败");
|
|
|
|
|
return 0;//没有找到检测项目
|
|
|
|
|
group = new QcMaterialGroupDetailDTO();
|
|
|
|
|
group.setGroupId("3dc0655fea3449c59c76a01cc5b91565");
|
|
|
|
|
}
|
|
|
|
|
qctp.setGroupId(group.getGroupId());//共性
|
|
|
|
|
items = openMapper.getTPByTypeGroup(qctp);
|
|
|
|
|
}
|
|
|
|
|
List<QcCheckTaskDetailDTO> itemsGG = openMapper.getTPByTypeGroup(qctp);
|
|
|
|
|
items.addAll(itemsGG);
|
|
|
|
|
|
|
|
|
|
/**qc_check_task_detail**/
|
|
|
|
|
if (CollectionUtils.isEmpty(items)) {
|
|
|
|
|
return 0;//没有找到检测项目
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**qc_sample_rule**/
|
|
|
|
|
QcCheckTaskProduceDTO sampQua = new QcCheckTaskProduceDTO();
|
|
|
|
|
sampQua.setCheckType(qcCheckTaskProduce.getCheckType());
|
|
|
|
|
sampQua.setQuality(qcCheckTaskProduce.getQuality());
|
|
|
|
|
String sampNum = openMapper.getSampNum(sampQua);
|
|
|
|
|
if(StringUtils.isNotBlank(sampNum)){
|
|
|
|
|
qcCheckTaskProduce.setSampleQuality(new BigDecimal(sampNum));
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**qc_check_task**/
|
|
|
|
|
qcCheckTaskProduce.setRecordId(beLongId);
|
|
|
|
|
qcCheckTaskProduce.setFactoryCode(factoryCode);
|
|
|
|
|