检验手持接口修改

master
zhaoxiaolin 1 year ago
parent 9971a509bc
commit d6d6d33110

@ -94,4 +94,6 @@ public interface QcCheckTaskIncomeMapper {
int addQcCheckTaskDefects(@Param("list") List<QcCheckTaskDefect> defects); int addQcCheckTaskDefects(@Param("list") List<QcCheckTaskDefect> defects);
List<QcCheckTaskDefect> getCkeckDefectList(QcCheckTaskDetail qcCheckTaskDetail); List<QcCheckTaskDefect> getCkeckDefectList(QcCheckTaskDetail qcCheckTaskDetail);
List<QcCheckTaskDefect> getDefectType(QcCheckTaskDetail qcCheckTaskDetail);
} }

@ -484,6 +484,7 @@ public class QcCheckTaskIncomeServiceImpl implements IQcCheckTaskIncomeService {
defect.setCreateTime(nowTime); defect.setCreateTime(nowTime);
defect.setCreateBy(updateBy); defect.setCreateBy(updateBy);
defect.setFactoryCode(factoryCode); defect.setFactoryCode(factoryCode);
defect.setBelongTo(belongId);
noOkQquality = noOkQquality.add(defect.getNoOkQuality()); noOkQquality = noOkQquality.add(defect.getNoOkQuality());
} }
qcCheckTask.setNoOkQuality(noOkQquality);//累计不合格数 qcCheckTask.setNoOkQuality(noOkQquality);//累计不合格数

@ -1,5 +1,6 @@
package com.op.quality.service.impl; package com.op.quality.service.impl;
import com.alibaba.nacos.common.utils.CollectionUtils;
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.domain.BaseFileData; import com.op.common.core.domain.BaseFileData;
@ -126,6 +127,9 @@ public class QcProCheckServiceImpl implements QcProCheckService {
List<QcCheckTaskDetail> qcCheckTaskDetails =qcCheckTaskIncomeMapper.getCkeckProjectList(qcCheckTaskDetail); List<QcCheckTaskDetail> qcCheckTaskDetails =qcCheckTaskIncomeMapper.getCkeckProjectList(qcCheckTaskDetail);
dto.setQcCheckTaskDetails(qcCheckTaskDetails); dto.setQcCheckTaskDetails(qcCheckTaskDetails);
List<QcCheckTaskDefect> defects =qcCheckTaskIncomeMapper.getCkeckDefectList(qcCheckTaskDetail); List<QcCheckTaskDefect> defects =qcCheckTaskIncomeMapper.getCkeckDefectList(qcCheckTaskDetail);
if(CollectionUtils.isEmpty(defects)){
defects =qcCheckTaskIncomeMapper.getDefectType(qcCheckTaskDetail);
}
dto.setDefects(defects); dto.setDefects(defects);
return dto; return dto;
} }

@ -323,14 +323,21 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<select id="getCkeckDefectList" resultType="com.op.quality.domain.QcCheckTaskDefect"> <select id="getCkeckDefectList" resultType="com.op.quality.domain.QcCheckTaskDefect">
select select
qctd.record_id recordId, qctd.record_id recordId,
qdt.defect_code defectCode, qctd.defect_code defectCode,
qdt.defect_subclass defectSubclass, qctd.defect_subclass defectSubclass,
qctd.noOk_quality noOkQuality qctd.noOk_quality noOkQuality
from qc_check_task_defect qctd
where qctd.del_flag = '0' and qctd.belong_to = #{belongTo}
order by qctd.defect_code
</select>
<select id="getDefectType" resultType="com.op.quality.domain.QcCheckTaskDefect">
select
defect_code defectCode,
defect_subclass defectSubclass
from qc_defect_type qdt from qc_defect_type qdt
left join qc_check_task_defect qctd on qdt.defect_code = qctd.defect_code left join qc_check_type qct on qdt.defect_type = qct.type_code
and qctd.del_flag = '0' where qct.order_code = #{checkType} and qdt.del_flag = '0'
and qctd.belong_to = #{belongTo} order by qdt.defect_code
where qdt.defect_type = #{checkType}
</select> </select>
<insert id="addCheckUsers"> <insert id="addCheckUsers">
insert into qc_check_task_user( insert into qc_check_task_user(

Loading…
Cancel
Save