|
|
|
@ -7,6 +7,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
|
|
<resultMap type="QmsCheckResult" id="QmsCheckResultResult">
|
|
|
|
|
<result property="checkResultId" column="check_result_id" />
|
|
|
|
|
<result property="checkRuleId" column="check_rule_id" />
|
|
|
|
|
<result property="checkRuleName" column="check_rule_name" />
|
|
|
|
|
<result property="checkRuleType" column="check_rule_type" />
|
|
|
|
|
<result property="materialType" column="material_type" />
|
|
|
|
|
<result property="materialId" column="material_id" />
|
|
|
|
|
<result property="materialBatch" column="material_batch" />
|
|
|
|
@ -25,7 +27,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
|
|
<result property="createTime" column="create_time" />
|
|
|
|
|
<result property="updateBy" column="update_by" />
|
|
|
|
|
<result property="updateTime" column="update_time" />
|
|
|
|
|
<result property="checkRuleName" column="check_rule_name" />
|
|
|
|
|
<result property="materialCode" column="material_code" />
|
|
|
|
|
<result property="materialName" column="material_name" />
|
|
|
|
|
</resultMap>
|
|
|
|
@ -99,6 +100,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
|
|
<if test="updateBy != null">update_by,</if>
|
|
|
|
|
<if test="updateTime != null">update_time,</if>
|
|
|
|
|
<if test="checkRuleName != null">check_rule_name,</if>
|
|
|
|
|
<if test="checkRuleType != null">check_rule_type,</if>
|
|
|
|
|
</trim>
|
|
|
|
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
|
|
|
<if test="checkRuleId != null">#{checkRuleId},</if>
|
|
|
|
@ -121,6 +123,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
|
|
<if test="updateBy != null">#{updateBy},</if>
|
|
|
|
|
<if test="updateTime != null">#{updateTime},</if>
|
|
|
|
|
<if test="checkRuleName != null">#{checkRuleName},</if>
|
|
|
|
|
<if test="checkRuleType != null">#{checkRuleType},</if>
|
|
|
|
|
</trim>
|
|
|
|
|
</insert>
|
|
|
|
|
|
|
|
|
@ -145,6 +148,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
|
|
<if test="updateBy != null">update_by = #{updateBy},</if>
|
|
|
|
|
<if test="updateTime != null">update_time = #{updateTime},</if>
|
|
|
|
|
<if test="checkRuleName != null">check_rule_name = #{checkRuleName},</if>
|
|
|
|
|
<if test="checkRuleType != null">check_rule_type = #{checkRuleType},</if>
|
|
|
|
|
</trim>
|
|
|
|
|
where check_result_id = #{checkResultId}
|
|
|
|
|
</update>
|
|
|
|
@ -193,9 +197,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
|
|
|
|
|
|
|
<select id="selectQmsCheckResultJoinList" parameterType="QmsCheckResult" resultMap="QmsCheckResultResult">
|
|
|
|
|
select qcr.check_result_id, qcr.material_type, qcr.material_id, qcr.material_batch, qcr.check_mode, qcr.check_sample, qcr.plan_code, qcr.plan_detail_code, qcr.saleorder_code,
|
|
|
|
|
qcr.po_no, qcr.check_status, qcr.check_rule_name,mbmi.material_code,mbmi.material_name
|
|
|
|
|
qcr.po_no, qcr.check_status, qcr.check_rule_name,qcr.check_rule_type,mbmi.material_code,mbmi.material_name
|
|
|
|
|
from qms_check_result qcr left join mes_base_material_info mbmi on qcr.material_id=mbmi.material_id
|
|
|
|
|
<where>
|
|
|
|
|
<if test="checkRuleType != null and checkRuleType != ''"> and check_rule_type = #{checkRuleType}</if>
|
|
|
|
|
<if test="materialType != null and materialType != ''"> and material_type = #{materialType}</if>
|
|
|
|
|
<if test="materialId != null "> and material_id = #{materialId}</if>
|
|
|
|
|
<if test="materialBatch != null and materialBatch != ''"> and material_batch = #{materialBatch}</if>
|
|
|
|
|