Browse Source

[feat]

品质管理 制程检验
修改制程检验不合格分类实体类,添加料号字段;
修改制程检验不合格分类mapper,添加料号字段,新增按检验单号、料号、工序编号查找不合格分类列表方法;
dev
王晓迪 3 months ago
parent
commit
383ac46e52
  1. 11
      ruoyi-admin/src/main/java/com/ruoyi/quality/domain/QualityManufacturingUnqualifiedClass.java
  2. 6
      ruoyi-admin/src/main/java/com/ruoyi/quality/mapper/QualityManufacturingUnqualifiedClassMapper.java
  3. 21
      ruoyi-admin/src/main/resources/mapper/quality/QualityManufacturingUnqualifiedClassMapper.xml

11
ruoyi-admin/src/main/java/com/ruoyi/quality/domain/QualityManufacturingUnqualifiedClass.java

@ -22,6 +22,9 @@ public class QualityManufacturingUnqualifiedClass extends BaseEntity
@Excel(name = "制程检验单号")
private String manufacturingCheckoutCode;
// 料号
private String materialNo;
/** 制程工序编号 */
@Excel(name = "制程工序编号")
private String manufacturingProcessCode;
@ -105,6 +108,14 @@ public class QualityManufacturingUnqualifiedClass extends BaseEntity
this.manufacturingCheckoutCode = manufacturingCheckoutCode;
}
public String getMaterialNo() {
return materialNo;
}
public void setMaterialNo(String materialNo) {
this.materialNo = materialNo;
}
@Override
public String toString() {
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)

6
ruoyi-admin/src/main/java/com/ruoyi/quality/mapper/QualityManufacturingUnqualifiedClassMapper.java

@ -1,6 +1,8 @@
package com.ruoyi.quality.mapper;
import java.util.List;
import java.util.Map;
import com.ruoyi.quality.domain.QualityManufacturingUnqualifiedClass;
/**
@ -74,4 +76,8 @@ public interface QualityManufacturingUnqualifiedClassMapper
* @return 结果
*/
public int restoreQualityManufacturingUnqualifiedClassById(Long manufacturingUnqualifiedClassId);
// 根据制程检验单号、料号、检验工序号查询不合格分类列表
List<QualityManufacturingUnqualifiedClass> selectCheckoutUnqualifiedClassByCodes(Map codes);
}

21
ruoyi-admin/src/main/resources/mapper/quality/QualityManufacturingUnqualifiedClassMapper.xml

@ -7,6 +7,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<resultMap type="QualityManufacturingUnqualifiedClass" id="QualityManufacturingUnqualifiedClassResult">
<result property="manufacturingUnqualifiedClassId" column="manufacturing_unqualified_class_id" />
<result property="manufacturingCheckoutCode" column="manufacturing_checkout_code" />
<result property="materialNo" column="material_no" />
<result property="manufacturingProcessCode" column="manufacturing_process_code" />
<result property="manufacturingProcessName" column="manufacturing_process_name" />
<result property="processBadClassification" column="process_bad_classification" />
@ -20,7 +21,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</resultMap>
<sql id="selectQualityManufacturingUnqualifiedClassVo">
select manufacturing_unqualified_class_id, manufacturing_checkout_code, manufacturing_process_code, manufacturing_process_name, process_bad_classification, process_bad_grade, process_bad_num, remark, create_by, create_time, update_by, update_time from quality_manufacturing_unqualified_class
select manufacturing_unqualified_class_id, manufacturing_checkout_code, manufacturing_process_code, manufacturing_process_name, process_bad_classification, process_bad_grade, process_bad_num, remark, create_by, create_time, update_by, update_time, material_no from quality_manufacturing_unqualified_class
</sql>
<select id="selectQualityManufacturingUnqualifiedClassList" parameterType="QualityManufacturingUnqualifiedClass" resultMap="QualityManufacturingUnqualifiedClassResult">
@ -38,6 +39,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
insert into quality_manufacturing_unqualified_class
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="manufacturingCheckoutCode != null">manufacturing_checkout_code,</if>
<if test="materialNo != null">material_no,</if>
<if test="manufacturingProcessCode != null">manufacturing_process_code,</if>
<if test="manufacturingProcessName != null">manufacturing_process_name,</if>
<if test="processBadClassification != null">process_bad_classification,</if>
@ -51,6 +53,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="manufacturingCheckoutCode != null">#{manufacturingCheckoutCode},</if>
<if test="materialNo != null">#{materialNo},</if>
<if test="manufacturingProcessCode != null">#{manufacturingProcessCode},</if>
<if test="manufacturingProcessName != null">#{manufacturingProcessName},</if>
<if test="processBadClassification != null">#{processBadClassification},</if>
@ -68,6 +71,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
update quality_manufacturing_unqualified_class
<trim prefix="SET" suffixOverrides=",">
<if test="manufacturingCheckoutCode != null">manufacturing_checkout_code = #{manufacturingCheckoutCode},</if>
<if test="materialNo != null">material_no = #{materialNo},</if>
<if test="manufacturingProcessCode != null">manufacturing_process_code = #{manufacturingProcessCode},</if>
<if test="manufacturingProcessName != null">manufacturing_process_name = #{manufacturingProcessName},</if>
<if test="processBadClassification != null">process_bad_classification = #{processBadClassification},</if>
@ -101,4 +105,19 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
update quality_manufacturing_unqualified_class set del_flag = '0' where manufacturing_unqualified_class_id = #{manufacturingUnqualifiedClassId}
</update>
<select id="selectCheckoutUnqualifiedClassByCodes" parameterType="map" resultMap="QualityManufacturingUnqualifiedClassResult">
<include refid="selectQualityManufacturingUnqualifiedClassVo"/>
<where>
<if test="manufacturingCheckoutCode != null">
manufacturing_checkout_code = #{manufacturingCheckoutCode}
</if>
<if test="materialNo != null">
and material_no = #{materialNo}
</if>
<if test="manufacturingProcessCode != null">
and manufacturing_process_code = #{manufacturingProcessCode}
</if>
</where>
</select>
</mapper>
Loading…
Cancel
Save