From d6d6d33110308373619bbd37d39d8d96e8eb7f02 Mon Sep 17 00:00:00 2001 From: zhaoxiaolin Date: Thu, 28 Dec 2023 10:32:40 +0800 Subject: [PATCH] =?UTF-8?q?=E6=A3=80=E9=AA=8C=E6=89=8B=E6=8C=81=E6=8E=A5?= =?UTF-8?q?=E5=8F=A3=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../mapper/QcCheckTaskIncomeMapper.java | 2 ++ .../impl/QcCheckTaskIncomeServiceImpl.java | 1 + .../service/impl/QcProCheckServiceImpl.java | 4 ++++ .../quality/QcCheckTaskIncomeMapper.xml | 19 +++++++++++++------ 4 files changed, 20 insertions(+), 6 deletions(-) diff --git a/op-modules/op-quality/src/main/java/com/op/quality/mapper/QcCheckTaskIncomeMapper.java b/op-modules/op-quality/src/main/java/com/op/quality/mapper/QcCheckTaskIncomeMapper.java index aadd15b1..85071716 100644 --- a/op-modules/op-quality/src/main/java/com/op/quality/mapper/QcCheckTaskIncomeMapper.java +++ b/op-modules/op-quality/src/main/java/com/op/quality/mapper/QcCheckTaskIncomeMapper.java @@ -94,4 +94,6 @@ public interface QcCheckTaskIncomeMapper { int addQcCheckTaskDefects(@Param("list") List defects); List getCkeckDefectList(QcCheckTaskDetail qcCheckTaskDetail); + + List getDefectType(QcCheckTaskDetail qcCheckTaskDetail); } diff --git a/op-modules/op-quality/src/main/java/com/op/quality/service/impl/QcCheckTaskIncomeServiceImpl.java b/op-modules/op-quality/src/main/java/com/op/quality/service/impl/QcCheckTaskIncomeServiceImpl.java index 10f2870c..248906d9 100644 --- a/op-modules/op-quality/src/main/java/com/op/quality/service/impl/QcCheckTaskIncomeServiceImpl.java +++ b/op-modules/op-quality/src/main/java/com/op/quality/service/impl/QcCheckTaskIncomeServiceImpl.java @@ -484,6 +484,7 @@ public class QcCheckTaskIncomeServiceImpl implements IQcCheckTaskIncomeService { defect.setCreateTime(nowTime); defect.setCreateBy(updateBy); defect.setFactoryCode(factoryCode); + defect.setBelongTo(belongId); noOkQquality = noOkQquality.add(defect.getNoOkQuality()); } qcCheckTask.setNoOkQuality(noOkQquality);//累计不合格数 diff --git a/op-modules/op-quality/src/main/java/com/op/quality/service/impl/QcProCheckServiceImpl.java b/op-modules/op-quality/src/main/java/com/op/quality/service/impl/QcProCheckServiceImpl.java index b9a2a1c6..daee7bf0 100644 --- a/op-modules/op-quality/src/main/java/com/op/quality/service/impl/QcProCheckServiceImpl.java +++ b/op-modules/op-quality/src/main/java/com/op/quality/service/impl/QcProCheckServiceImpl.java @@ -1,5 +1,6 @@ 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.toolkit.DynamicDataSourceContextHolder; import com.op.common.core.domain.BaseFileData; @@ -126,6 +127,9 @@ public class QcProCheckServiceImpl implements QcProCheckService { List qcCheckTaskDetails =qcCheckTaskIncomeMapper.getCkeckProjectList(qcCheckTaskDetail); dto.setQcCheckTaskDetails(qcCheckTaskDetails); List defects =qcCheckTaskIncomeMapper.getCkeckDefectList(qcCheckTaskDetail); + if(CollectionUtils.isEmpty(defects)){ + defects =qcCheckTaskIncomeMapper.getDefectType(qcCheckTaskDetail); + } dto.setDefects(defects); return dto; } diff --git a/op-modules/op-quality/src/main/resources/mapper/quality/QcCheckTaskIncomeMapper.xml b/op-modules/op-quality/src/main/resources/mapper/quality/QcCheckTaskIncomeMapper.xml index 4548caef..8cb572ac 100644 --- a/op-modules/op-quality/src/main/resources/mapper/quality/QcCheckTaskIncomeMapper.xml +++ b/op-modules/op-quality/src/main/resources/mapper/quality/QcCheckTaskIncomeMapper.xml @@ -323,14 +323,21 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" + insert into qc_check_task_user(