diff --git a/op-modules/op-quality/src/main/java/com/op/quality/mapper/QcSampleRuleMapper.java b/op-modules/op-quality/src/main/java/com/op/quality/mapper/QcSampleRuleMapper.java index 02a8e062..8a94ee8f 100644 --- a/op-modules/op-quality/src/main/java/com/op/quality/mapper/QcSampleRuleMapper.java +++ b/op-modules/op-quality/src/main/java/com/op/quality/mapper/QcSampleRuleMapper.java @@ -2,12 +2,13 @@ package com.op.quality.mapper; import java.util.List; +import com.op.quality.domain.QcCheckTaskIncome; import com.op.quality.domain.QcSampleRule; import org.apache.ibatis.annotations.Mapper; /** * 来料抽样规则Mapper接口 - * + * * @author Open Platform * @date 2023-12-28 */ @@ -15,7 +16,7 @@ import org.apache.ibatis.annotations.Mapper; public interface QcSampleRuleMapper { /** * 查询来料抽样规则 - * + * * @param id 来料抽样规则主键 * @return 来料抽样规则 */ @@ -23,7 +24,7 @@ public interface QcSampleRuleMapper { /** * 查询来料抽样规则列表 - * + * * @param qcSampleRule 来料抽样规则 * @return 来料抽样规则集合 */ @@ -31,7 +32,7 @@ public interface QcSampleRuleMapper { /** * 新增来料抽样规则 - * + * * @param qcSampleRule 来料抽样规则 * @return 结果 */ @@ -39,7 +40,7 @@ public interface QcSampleRuleMapper { /** * 修改来料抽样规则 - * + * * @param qcSampleRule 来料抽样规则 * @return 结果 */ @@ -47,7 +48,7 @@ public interface QcSampleRuleMapper { /** * 删除来料抽样规则 - * + * * @param id 来料抽样规则主键 * @return 结果 */ @@ -55,9 +56,11 @@ public interface QcSampleRuleMapper { /** * 批量删除来料抽样规则 - * + * * @param ids 需要删除的数据主键集合 * @return 结果 */ public int deleteQcSampleRuleByIds(String[] ids); + + String getSampNum(QcCheckTaskIncome qcCheckTaskIncome); } 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 e25fb733..2ece4308 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 @@ -77,6 +77,9 @@ public class QcCheckTaskIncomeServiceImpl implements IQcCheckTaskIncomeService { @Autowired private IQcCheckTaskDefectService qcCheckTaskDefectService; + @Autowired + private QcSampleRuleMapper qcSampleRuleMapper; + /** * 查询来料检验 * @@ -230,7 +233,12 @@ public class QcCheckTaskIncomeServiceImpl implements IQcCheckTaskIncomeService { } } qcCheckTaskIncome.setNoOkQuality(noOkQuality); - + /**qc_sample_rule**/ + String sampNum = qcSampleRuleMapper.getSampNum(qcCheckTaskIncome); + if(StringUtils.isNotBlank(sampNum)){ + qcCheckTaskIncome.setSampleQuality(new BigDecimal(sampNum)); + } + /**qc_check_task**/ qcCheckTaskIncomeMapper.insertQcCheckTaskIncome(qcCheckTaskIncome); /**qc_check_task_detail**/ diff --git a/op-modules/op-quality/src/main/resources/mapper/quality/QcSampleRuleMapper.xml b/op-modules/op-quality/src/main/resources/mapper/quality/QcSampleRuleMapper.xml index ee006ebb..ad1b6b45 100644 --- a/op-modules/op-quality/src/main/resources/mapper/quality/QcSampleRuleMapper.xml +++ b/op-modules/op-quality/src/main/resources/mapper/quality/QcSampleRuleMapper.xml @@ -3,7 +3,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> - + @@ -26,7 +26,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" - + - - + + + insert into qc_sample_rule id, @@ -100,9 +106,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" - delete from qc_sample_rule where id in + delete from qc_sample_rule where id in #{id} - \ No newline at end of file +