qc_check_task_defect数据添加逻辑修改

master
zhaoxiaolin 10 months ago
parent f28c8d5bb4
commit 3486c00461

@ -240,7 +240,7 @@ public class QcCheckTaskIncomeServiceImpl implements IQcCheckTaskIncomeService {
if (!CollectionUtils.isEmpty(defectList)) {
for (QcCheckTaskDefect defect : defectList) {
defect.setBelongTo(beLongId);
qcCheckTaskDefectService.insertQcCheckTaskDefect(defect);
//qcCheckTaskDefectService.insertQcCheckTaskDefect(defect);
noOkQuality = noOkQuality.add(defect.getNoOkQuality()==null?new BigDecimal("0"):defect.getNoOkQuality());
}
}

@ -183,7 +183,7 @@ public class QcCheckTaskInventoryServiceImpl implements IQcCheckTaskInventorySer
if (!CollectionUtils.isEmpty(defectList)) {
for (QcCheckTaskDefect defect : defectList) {
defect.setBelongTo(beLongId);
qcCheckTaskDefectService.insertQcCheckTaskDefect(defect);
//qcCheckTaskDefectService.insertQcCheckTaskDefect(defect);
noOkQuality = noOkQuality.add(defect.getNoOkQuality() == null ? new BigDecimal("0") : defect.getNoOkQuality());
}
}

@ -181,7 +181,7 @@ public class QcCheckTaskMarketServiceImpl implements IQcCheckTaskMarketService {
if (!CollectionUtils.isEmpty(defectList)) {
for (QcCheckTaskDefect defect : defectList) {
defect.setBelongTo(beLongId);
qcCheckTaskDefectService.insertQcCheckTaskDefect(defect);
//qcCheckTaskDefectService.insertQcCheckTaskDefect(defect);
noOkQuality = noOkQuality.add(defect.getNoOkQuality() == null ? new BigDecimal("0") : defect.getNoOkQuality());
}
}

@ -226,7 +226,7 @@ public class QcCheckTaskProduceServiceImpl implements IQcCheckTaskProduceService
if (!CollectionUtils.isEmpty(defectList)) {
for (QcCheckTaskDefect defect : defectList) {
defect.setBelongTo(beLongId);
qcCheckTaskDefectService.insertQcCheckTaskDefect(defect);
//qcCheckTaskDefectService.insertQcCheckTaskDefect(defect);
noOkQuality = noOkQuality.add(defect.getNoOkQuality()==null?new BigDecimal("0"):defect.getNoOkQuality());
}
}

@ -205,7 +205,7 @@ public class QcCheckTaskWarehousingServiceImpl implements IQcCheckTaskWarehousin
if (!CollectionUtils.isEmpty(defectList)) {
for (QcCheckTaskDefect defect : defectList) {
defect.setBelongTo(beLongId);
qcCheckTaskDefectService.insertQcCheckTaskDefect(defect);
//qcCheckTaskDefectService.insertQcCheckTaskDefect(defect);
noOkQuality = noOkQuality.add(defect.getNoOkQuality()==null?new BigDecimal("0"):defect.getNoOkQuality());
}
}

@ -132,7 +132,7 @@
</select>
<select id="getDefectMap" resultType="com.op.quality.domain.QcCheckTaskDefect">
SELECT
belong_to,
belong_to belongTo,
belong_to_detail belongToDetail,
STUFF(
(SELECT ',' + defect_code
@ -140,22 +140,23 @@
WHERE belong_to_detail = qctd.belong_to_detail and belong_to = qctd.belong_to
FOR xml path('')
),1,1,''
) defectCodes,
STUFF(
(SELECT ',' + defect_subclass+':' + CAST(noOk_quality AS VARCHAR(15))
FROM qc_check_task_defect
WHERE belong_to_detail = qctd.belong_to_detail and belong_to = qctd.belong_to
FOR xml path('')
),1,1,''
) defectNames,
STUFF(
(SELECT ',' + CAST(noOk_quality AS VARCHAR(15))
FROM qc_check_task_defect
WHERE belong_to_detail = qctd.belong_to_detail and belong_to = qctd.belong_to
FOR xml path('')
),1,1,''
) defectQualitys
) defectCodes,
STUFF(
(SELECT ',' + defect_subclass+':' + CAST(noOk_quality AS VARCHAR(15))
FROM qc_check_task_defect
WHERE belong_to_detail = qctd.belong_to_detail and belong_to = qctd.belong_to
FOR xml path('')
),1,1,''
) defectNames,
STUFF(
(SELECT ',' + CAST(noOk_quality AS VARCHAR(15))
FROM qc_check_task_defect
WHERE belong_to_detail = qctd.belong_to_detail and belong_to = qctd.belong_to
FOR xml path('')
),1,1,''
) defectQualitys
FROM qc_check_task_defect qctd where qctd.del_flag = '0' and belong_to= #{belongTo}
and belong_to_detail is not null
GROUP by qctd.belong_to,qctd.belong_to_detail
</select>

Loading…
Cancel
Save