diff --git a/src/main/java/com/gaotao/modules/pms/entity/PartInformationEntity.java b/src/main/java/com/gaotao/modules/pms/entity/PartInformationEntity.java index 736c88b..4d7f4f8 100644 --- a/src/main/java/com/gaotao/modules/pms/entity/PartInformationEntity.java +++ b/src/main/java/com/gaotao/modules/pms/entity/PartInformationEntity.java @@ -1,6 +1,7 @@ package com.gaotao.modules.pms.entity; import com.baomidou.mybatisplus.annotation.TableName; +import com.fasterxml.jackson.annotation.JsonFormat; import lombok.Data; import java.math.BigDecimal; @@ -97,4 +98,12 @@ public class PartInformationEntity { private String adhesiveActivePeriodFlag; private Integer thawingDuration; private Integer accumulatedExposureDuration; + private String trackingFlag; + private Integer defectThreshold; + private Integer recoveryBatchCount; + private Integer currentDefectCount; + private Integer lastDefectCount; + private Integer remainingTrackingBatches; + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") + private Date lastTriggerTime; } \ No newline at end of file diff --git a/src/main/java/com/gaotao/modules/pms/mapper/QcMapper.java b/src/main/java/com/gaotao/modules/pms/mapper/QcMapper.java index 5616eaf..ddee601 100644 --- a/src/main/java/com/gaotao/modules/pms/mapper/QcMapper.java +++ b/src/main/java/com/gaotao/modules/pms/mapper/QcMapper.java @@ -429,6 +429,9 @@ public interface QcMapper { void updateIQCSubDetailSubmitFlag2(QcFAIRecordData qcData); + void updatePartDefectTracking(@Param("site") String site, @Param("buNo") String buNo, @Param("partNo") String partNo, @Param("supplierId") String supplierId, @Param("passFlag") Integer passFlag); + + void deleteReceivingTaskByInspectionNo(QcFAIRecordData qcData); void updateIPQCMasterSubmitFlag2(QcFAIRecordData qcData); diff --git a/src/main/java/com/gaotao/modules/pms/service/Impl/QcServiceImpl.java b/src/main/java/com/gaotao/modules/pms/service/Impl/QcServiceImpl.java index 34eb792..53c7c48 100644 --- a/src/main/java/com/gaotao/modules/pms/service/Impl/QcServiceImpl.java +++ b/src/main/java/com/gaotao/modules/pms/service/Impl/QcServiceImpl.java @@ -1637,6 +1637,9 @@ public class QcServiceImpl implements QcService { // 修改子明细记录标识为已提交 qcMapper.updateIQCSubDetailSubmitFlag(recordData); + // 更新物料缺陷跟踪批次 + Integer passFlag = "合格".equals(recordData.getInspectionResult()) ? 1 : 0; + qcMapper.updatePartDefectTracking(recordData.getSite(), recordData.getBuNo(), recordData.getPartNo(), recordData.getSupplierNo(), passFlag); // 判断检验结论是否合格 if ("合格".equals(recordData.getInspectionResult()) || "让步接收".equals(recordData.getDisposalMeasures()) || "挑选使用".equals(recordData.getDisposalMeasures())) { // List partInformationList = qcMapper.getPartInformation(recordData); diff --git a/src/main/resources/mapper/pms/QcBaseInfoMapper.xml b/src/main/resources/mapper/pms/QcBaseInfoMapper.xml index da77a1c..e08b2eb 100644 --- a/src/main/resources/mapper/pms/QcBaseInfoMapper.xml +++ b/src/main/resources/mapper/pms/QcBaseInfoMapper.xml @@ -1193,7 +1193,14 @@ adhesive_active_period_flag, thawing_duration, accumulated_exposure_duration, - issue_method + issue_method, + tracking_flag, + defect_threshold, + recovery_batch_count, + current_defect_count, + last_defect_count, + remaining_tracking_batches, + last_trigger_time from part as a left join wareHouse as b on a.site = b.site and a.bu_no = b.bu_no and a.inbound_warehouse_id = b.WarehouseID left join wareHouse as c on a.site = c.site and a.bu_no = c.bu_no and a.outbound_warehouse_id = c.WarehouseID @@ -1264,7 +1271,9 @@ adhesive_active_period_flag = #{adhesiveActivePeriodFlag}, thawing_duration = #{thawingDuration}, accumulated_exposure_duration = #{accumulatedExposureDuration}, - issue_method = #{issueMethod} + issue_method = #{issueMethod}, + defect_threshold = #{defectThreshold, jdbcType=INTEGER}, + recovery_batch_count = #{recoveryBatchCount, jdbcType=INTEGER} WHERE site = #{site} and partNo = #{partNo} and bu_no = #{buNo} diff --git a/src/main/resources/mapper/pms/QcMapper.xml b/src/main/resources/mapper/pms/QcMapper.xml index 634321c..3312a48 100644 --- a/src/main/resources/mapper/pms/QcMapper.xml +++ b/src/main/resources/mapper/pms/QcMapper.xml @@ -3239,6 +3239,16 @@ WHERE inspection_no = #{inspectionNo} and site = #{site} and bu_no = #{buNo} + + {CALL UspUpdatePartDefectTracking( + #{site,mode=IN,jdbcType=VARCHAR}, + #{buNo,mode=IN,jdbcType=VARCHAR}, + #{partNo,mode=IN,jdbcType=VARCHAR}, + #{supplierId,mode=IN,jdbcType=VARCHAR}, + #{passFlag,mode=IN,jdbcType=BIT} + )} + + UPDATE qc_fai_record SET submit_flag = 'N',