Browse Source

2026-03-27

IQC检验增加缺陷跟踪标识
物料档案管理-》缺陷跟踪增加两个字段
master
fengyuan_yang 3 months ago
parent
commit
bb240e641b
  1. 2
      src/main/java/com/gaotao/modules/pms/data/QcFAIRecordData.java
  2. 5
      src/main/java/com/gaotao/modules/pms/entity/PartDefectTrackingEntity.java
  3. 2
      src/main/java/com/gaotao/modules/propertyChange/service/impl/PropertyChangeServiceImpl.java
  4. 12
      src/main/resources/mapper/pms/QcBaseInfoMapper.xml
  5. 2
      src/main/resources/mapper/pms/QcMapper.xml

2
src/main/java/com/gaotao/modules/pms/data/QcFAIRecordData.java

@ -21,6 +21,8 @@ public class QcFAIRecordData extends QueryPage {
private String ssrId;
// 状态
private String state;
// 异常追踪标识
private String defectTrackingFlag;
// 状态
private List<String> states;
// 供应商编码

5
src/main/java/com/gaotao/modules/pms/entity/PartDefectTrackingEntity.java

@ -2,7 +2,9 @@ package com.gaotao.modules.pms.entity;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import java.util.Date;
@TableName("part_defect_tracking")
@Data
@ -15,4 +17,7 @@ public class PartDefectTrackingEntity {
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;
}

2
src/main/java/com/gaotao/modules/propertyChange/service/impl/PropertyChangeServiceImpl.java

@ -122,7 +122,7 @@ public class PropertyChangeServiceImpl extends ServiceImpl<PropertyChangeMapper,
}
// 3. 生成标签变动事务记录
generatePropertyChangeTransaction(site, buNo, warehouseId, labelCode, partNo, batchNo, quantity, oldLocationId, newLocationId, oldStatus, newStatus, oldProductionDateStr, newProductionDateStr, oldExpiryDateStr, newExpiryDateStr);
//generatePropertyChangeTransaction(site, buNo, warehouseId, labelCode, partNo, batchNo, quantity, oldLocationId, newLocationId, oldStatus, newStatus, oldProductionDateStr, newProductionDateStr, oldExpiryDateStr, newExpiryDateStr);
logger.info("属性变动保存成功,标签条码: {}", labelCode);
return true;

12
src/main/resources/mapper/pms/QcBaseInfoMapper.xml

@ -1575,7 +1575,9 @@
a.defect_threshold,
a.recovery_batch_count,
a.current_defect_count,
a.last_defect_count
a.last_defect_count,
a.remaining_tracking_batches as remainingTrackingBatches,
a.last_trigger_time as lastTriggerTime
FROM part_defect_tracking as a
left join Supplier as b on a.site = b.site and a.supplier_id = b.SupplierID
<where>
@ -1588,8 +1590,8 @@
<!-- 新增跟踪缺陷 -->
<insert id="saveDefectTracking" parameterType="com.gaotao.modules.pms.entity.vo.PartDefectTrackingVo">
INSERT INTO part_defect_tracking (site, bu_no, part_no, supplier_id, defect_threshold, recovery_batch_count, current_defect_count, last_defect_count)
VALUES (#{site}, #{buNo}, #{partNo}, #{supplierId}, #{defectThreshold,jdbcType=INTEGER}, #{recoveryBatchCount,jdbcType=INTEGER}, #{currentDefectCount,jdbcType=INTEGER}, #{lastDefectCount,jdbcType=INTEGER})
INSERT INTO part_defect_tracking (site, bu_no, part_no, supplier_id, defect_threshold, recovery_batch_count)
VALUES (#{site}, #{buNo}, #{partNo}, #{supplierId}, #{defectThreshold,jdbcType=INTEGER}, #{recoveryBatchCount,jdbcType=INTEGER})
</insert>
<!-- 删除跟踪缺陷 -->
@ -1602,9 +1604,7 @@
<update id="updateDefectTracking" parameterType="com.gaotao.modules.pms.entity.vo.PartDefectTrackingVo">
UPDATE part_defect_tracking
SET defect_threshold = #{defectThreshold,jdbcType=INTEGER},
recovery_batch_count = #{recoveryBatchCount,jdbcType=INTEGER},
current_defect_count = #{currentDefectCount,jdbcType=INTEGER},
last_defect_count = #{lastDefectCount,jdbcType=INTEGER}
recovery_batch_count = #{recoveryBatchCount,jdbcType=INTEGER}
where site = #{site} and bu_no = #{buNo} and part_no = #{partNo} AND supplier_id = #{supplierId}
</update>

2
src/main/resources/mapper/pms/QcMapper.xml

@ -891,6 +891,7 @@
SELECT
qir.inspection_no,
qir.state,
qir.defect_tracking_flag as defectTrackingFlag,
qir.create_date as taskDate,
qir.roll_no,
qir.part_no,
@ -942,6 +943,7 @@
a.bu_no,
dbo.get_bu_desc(a.site, a.bu_no) as buDesc,
a.state,
a.defect_tracking_flag as defectTrackingFlag,
a.inspection_result,
a.create_date as taskDate,
a.inspection_type_no,

Loading…
Cancel
Save