|
|
|
@ -320,6 +320,178 @@
|
|
|
|
|
update_time = #{updateTime}
|
|
|
|
|
where record_id = #{recordId}
|
|
|
|
|
</update>
|
|
|
|
|
|
|
|
|
|
<insert id="insertQcCheckTaskIncomeCg" parameterType="QcCheckTaskIncome">
|
|
|
|
|
insert into qc_check_task_cg
|
|
|
|
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
|
|
|
|
<if test="recordId != null">record_id,</if>
|
|
|
|
|
<if test="checkNo != null">check_no,</if>
|
|
|
|
|
<if test="incomeBatchNo != null">income_batch_no,</if>
|
|
|
|
|
<if test="orderNo != null">order_no,</if>
|
|
|
|
|
<if test="materialCode != null">material_code,</if>
|
|
|
|
|
<if test="materialName != null">material_name,</if>
|
|
|
|
|
<if test="quality != null">quality,</if>
|
|
|
|
|
<if test="noOkQuality != null">noOk_quality,</if>
|
|
|
|
|
<if test="unit != null">unit,</if>
|
|
|
|
|
<if test="supplierCode != null">supplier_code,</if>
|
|
|
|
|
<if test="supplierName != null">supplier_name,</if>
|
|
|
|
|
<if test="incomeTime != null">income_time,</if>
|
|
|
|
|
<if test="checkLoc != null">check_loc,</if>
|
|
|
|
|
<if test="checkStatus != null">check_status,</if>
|
|
|
|
|
<if test="checkManCode != null">check_man_code,</if>
|
|
|
|
|
<if test="checkManName != null">check_man_name,</if>
|
|
|
|
|
<if test="checkTime != null">check_time,</if>
|
|
|
|
|
<if test="checkResult != null">check_result,</if>
|
|
|
|
|
<if test="status != null">status,</if>
|
|
|
|
|
<if test="attr1 != null">attr1,</if>
|
|
|
|
|
<if test="attr2 != null">attr2,</if>
|
|
|
|
|
<if test="attr3 != null">attr3,</if>
|
|
|
|
|
<if test="attr4 != null">attr4,</if>
|
|
|
|
|
<if test="createBy != null">create_by,</if>
|
|
|
|
|
<if test="createTime != null">create_time,</if>
|
|
|
|
|
<if test="updateBy != null">update_by,</if>
|
|
|
|
|
<if test="updateTime != null">update_time,</if>
|
|
|
|
|
<if test="factoryCode != null and factoryCode != ''">factory_code,</if>
|
|
|
|
|
<if test="delFlag != null">del_flag,</if>
|
|
|
|
|
<if test="checkType != null">check_type,</if>
|
|
|
|
|
<if test="typeCode != null">type_code,</if>
|
|
|
|
|
<if test="sampleQuality != null">sample_quality,</if>
|
|
|
|
|
<if test="orderType != null">order_type,</if>
|
|
|
|
|
<if test="orderTypeDesc != null">order_type_desc,</if>
|
|
|
|
|
<if test="remark != null">remark,</if>
|
|
|
|
|
<if test="reason != null">reason,</if>
|
|
|
|
|
<if test="bz != null">bz,</if>
|
|
|
|
|
<if test="startOA != null">start_oA,</if>
|
|
|
|
|
<if test="oaFactory != null">oa_factory,</if>
|
|
|
|
|
<if test="materialType != null">material_type,</if>
|
|
|
|
|
<if test="materialFrom != null">material_from,</if>
|
|
|
|
|
<if test="czbjr != null">czbjr,</if>
|
|
|
|
|
<if test="zcf != null">zcf,</if>
|
|
|
|
|
<if test="zcoemcm != null">zcoemcm,</if>
|
|
|
|
|
<if test="qczg != null">qczg,</if>
|
|
|
|
|
<if test="sqr != null">sqr,</if>
|
|
|
|
|
<if test="sqbm != null">sqbm,</if>
|
|
|
|
|
<if test="oaFactoryF != null">oa_factory_f,</if>
|
|
|
|
|
<if test="sfxyzg != null">sfxyzg,</if>
|
|
|
|
|
<if test="pgzg != null">pgzg,</if>
|
|
|
|
|
<if test="pgzr != null">pgzr,</if>
|
|
|
|
|
<if test="sfgyswt != null">sfgyswt,</if>
|
|
|
|
|
<if test="sccj != null">sccj,</if>
|
|
|
|
|
<if test="aNoOkquality != null">aNoOkquality,</if>
|
|
|
|
|
<if test="bNoOkquality != null">bNoOkquality,</if>
|
|
|
|
|
<if test="cNoOkquality != null">cNoOkquality,</if>
|
|
|
|
|
</trim>
|
|
|
|
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
|
|
|
<if test="recordId != null">#{recordId},</if>
|
|
|
|
|
<if test="checkNo != null">#{checkNo},</if>
|
|
|
|
|
<if test="incomeBatchNo != null">#{incomeBatchNo},</if>
|
|
|
|
|
<if test="orderNo != null">#{orderNo},</if>
|
|
|
|
|
<if test="materialCode != null">#{materialCode},</if>
|
|
|
|
|
<if test="materialName != null">#{materialName},</if>
|
|
|
|
|
<if test="quality != null">#{quality},</if>
|
|
|
|
|
<if test="noOkQuality != null">#{noOkQuality},</if>
|
|
|
|
|
<if test="unit != null">#{unit},</if>
|
|
|
|
|
<if test="supplierCode != null">#{supplierCode},</if>
|
|
|
|
|
<if test="supplierName != null">#{supplierName},</if>
|
|
|
|
|
<if test="incomeTime != null">#{incomeTime},</if>
|
|
|
|
|
<if test="checkLoc != null">#{checkLoc},</if>
|
|
|
|
|
<if test="checkStatus != null">#{checkStatus},</if>
|
|
|
|
|
<if test="checkManCode != null">#{checkManCode},</if>
|
|
|
|
|
<if test="checkManName != null">#{checkManName},</if>
|
|
|
|
|
<if test="checkTime != null">#{checkTime},</if>
|
|
|
|
|
<if test="checkResult != null">#{checkResult},</if>
|
|
|
|
|
<if test="status != null">#{status},</if>
|
|
|
|
|
<if test="attr1 != null">#{attr1},</if>
|
|
|
|
|
<if test="attr2 != null">#{attr2},</if>
|
|
|
|
|
<if test="attr3 != null">#{attr3},</if>
|
|
|
|
|
<if test="attr4 != null">#{attr4},</if>
|
|
|
|
|
<if test="createBy != null">#{createBy},</if>
|
|
|
|
|
<if test="createTime != null">#{createTime},</if>
|
|
|
|
|
<if test="updateBy != null">#{updateBy},</if>
|
|
|
|
|
<if test="updateTime != null">#{updateTime},</if>
|
|
|
|
|
<if test="factoryCode != null and factoryCode != ''">#{factoryCode},</if>
|
|
|
|
|
<if test="delFlag != null">#{delFlag},</if>
|
|
|
|
|
<if test="checkType != null">#{checkType},</if>
|
|
|
|
|
<if test="typeCode != null">#{typeCode},</if>
|
|
|
|
|
<if test="sampleQuality != null">#{sampleQuality},</if>
|
|
|
|
|
<if test="orderType != null">#{orderType},</if>
|
|
|
|
|
<if test="orderTypeDesc != null">#{orderTypeDesc},</if>
|
|
|
|
|
<if test="remark != null">#{remark},</if>
|
|
|
|
|
<if test="reason != null">#{reason},</if>
|
|
|
|
|
<if test="bz != null">#{bz},</if>
|
|
|
|
|
<if test="startOA != null">#{startOA},</if>
|
|
|
|
|
<if test="oaFactory != null">#{oaFactory},</if>
|
|
|
|
|
<if test="materialType != null">#{materialType},</if>
|
|
|
|
|
<if test="materialFrom != null">#{materialFrom},</if>
|
|
|
|
|
<if test="czbjr != null">#{czbjr},</if>
|
|
|
|
|
<if test="zcf != null">#{zcf},</if>
|
|
|
|
|
<if test="zcoemcm != null">#{zcoemcm},</if>
|
|
|
|
|
<if test="qczg != null">#{qczg},</if>
|
|
|
|
|
<if test="sqr != null">#{sqr},</if>
|
|
|
|
|
<if test="sqbm != null">#{sqbm},</if>
|
|
|
|
|
<if test="oaFactoryF != null">#{oaFactoryF},</if>
|
|
|
|
|
<if test="sfxyzg != null">#{sfxyzg},</if>
|
|
|
|
|
<if test="pgzg != null">#{pgzg},</if>
|
|
|
|
|
<if test="pgzr != null">#{pgzr},</if>
|
|
|
|
|
<if test="sfgyswt != null">#{sfgyswt},</if>
|
|
|
|
|
<if test="sccj != null">#{sccj},</if>
|
|
|
|
|
<if test="aNoOkquality != null">#{aNoOkquality},</if>
|
|
|
|
|
<if test="bNoOkquality != null">#{bNoOkquality},</if>
|
|
|
|
|
<if test="cNoOkquality != null">#{cNoOkquality},</if>
|
|
|
|
|
</trim>
|
|
|
|
|
</insert>
|
|
|
|
|
|
|
|
|
|
<update id="updateQcCheckTaskCg">
|
|
|
|
|
update qc_check_task_cg
|
|
|
|
|
set
|
|
|
|
|
check_status = #{checkStatus},
|
|
|
|
|
check_man_code = #{checkManCode},
|
|
|
|
|
check_man_name =#{checkManName},
|
|
|
|
|
<if test="checkTime != null">check_time = #{checkTime},</if>
|
|
|
|
|
<if test="sampleQuality != null">sample_quality = #{sampleQuality},</if>
|
|
|
|
|
<if test="noOkQuality != null">noOk_quality = #{noOkQuality},</if>
|
|
|
|
|
<if test="aNoOkquality != null">aNoOkquality = #{aNoOkquality},</if>
|
|
|
|
|
<if test="bNoOkquality != null">bNoOkquality = #{bNoOkquality},</if>
|
|
|
|
|
<if test="cNoOkquality != null">cNoOkquality = #{cNoOkquality},</if>
|
|
|
|
|
<if test="incomeBatchNo != null">income_batch_no = #{incomeBatchNo},</if>
|
|
|
|
|
<if test="remark != null">remark = #{remark},</if>
|
|
|
|
|
<if test="reason != null">reason = #{reason},</if>
|
|
|
|
|
<if test="bz != null">bz = #{bz},</if>
|
|
|
|
|
<if test="startOA != null">start_oA = #{startOA},</if>
|
|
|
|
|
<if test="oaFactory != null">oa_factory = #{oaFactory},</if>
|
|
|
|
|
<if test="materialType != null">material_type = #{materialType},</if>
|
|
|
|
|
<if test="materialFrom != null">material_from = #{materialFrom},</if>
|
|
|
|
|
<if test="czbjr != null">czbjr = #{czbjr},</if>
|
|
|
|
|
<if test="zcf != null">zcf = #{zcf},</if>
|
|
|
|
|
<if test="zcoemcm != null">zcoemcm = #{zcoemcm},</if>
|
|
|
|
|
<if test="qczg != null">qczg = #{qczg},</if>
|
|
|
|
|
<if test="sqr != null">sqr = #{sqr},</if>
|
|
|
|
|
<if test="quality != null">quality = #{quality},</if>
|
|
|
|
|
<if test="unit != null">unit = #{unit},</if>
|
|
|
|
|
<if test="sqbm != null">sqbm = #{sqbm},</if>
|
|
|
|
|
<if test="checkLoc != null">check_loc = #{checkLoc},</if>
|
|
|
|
|
<if test="oaFactoryF != null">oa_factory_f = #{oaFactoryF},</if>
|
|
|
|
|
<if test="sfxyzg != null">sfxyzg = #{sfxyzg},</if>
|
|
|
|
|
<if test="pgzg != null">pgzg = #{pgzg},</if>
|
|
|
|
|
<if test="pgzr != null">pgzr = #{pgzr},</if>
|
|
|
|
|
<if test="sfgyswt != null">sfgyswt = #{sfgyswt},</if>
|
|
|
|
|
<if test="sccj != null">sccj = #{sccj},</if>
|
|
|
|
|
check_result = #{checkResult},
|
|
|
|
|
update_by = #{updateBy},
|
|
|
|
|
update_time = #{updateTime}
|
|
|
|
|
where record_id = #{recordId}
|
|
|
|
|
</update>
|
|
|
|
|
<select id="selectQcCheckTaskCgByRecordId" resultType="com.op.quality.domain.QcCheckTaskIncome">
|
|
|
|
|
select record_id, check_no, income_batch_no, order_no, material_code, material_name, quality, unit,
|
|
|
|
|
supplier_code, supplier_name, income_time, check_loc, check_status, check_man_code,
|
|
|
|
|
check_man_name, check_time, check_result, status, attr1, attr2, attr3, attr4, create_by,
|
|
|
|
|
create_time, update_by, update_time, factory_code, del_flag , check_type,sample_quality, noOk_quality,
|
|
|
|
|
order_type,order_type_desc
|
|
|
|
|
from qc_check_task_cg
|
|
|
|
|
where record_id = #{recordId}
|
|
|
|
|
</select>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<update id="updateQcCheckTaskDetails">
|
|
|
|
|
<foreach collection="list" item="item" separator=";">
|
|
|
|
|
update qc_check_task_detail
|
|
|
|
@ -421,6 +593,48 @@
|
|
|
|
|
left join pro_order_workorder pow on pow.workorder_code = qct.order_no and pow.del_flag = '0'
|
|
|
|
|
where qct.record_id = #{recordId}
|
|
|
|
|
</select>
|
|
|
|
|
<select id="getTaskInfoCg" resultType="com.op.quality.domain.QcCheckTaskIncome">
|
|
|
|
|
select
|
|
|
|
|
qct.material_code materialCode,
|
|
|
|
|
qct.material_name materialName,
|
|
|
|
|
qct.supplier_code supplierCode,
|
|
|
|
|
qct.supplier_name supplierName,
|
|
|
|
|
qct.income_batch_no incomeBatchNo,
|
|
|
|
|
qct.quality,
|
|
|
|
|
qct.material_type materialType,
|
|
|
|
|
qct.material_from materialFrom,
|
|
|
|
|
qct.factory_code factoryCode,
|
|
|
|
|
case when pow.workorder_code_sap is not null then pow.workorder_code_sap
|
|
|
|
|
else qct.order_no end orderNo,
|
|
|
|
|
qct.create_time createTime,
|
|
|
|
|
qct.check_no checkNo,
|
|
|
|
|
qct.type_code typeCode,
|
|
|
|
|
qct.unit,
|
|
|
|
|
qct.check_time checkTime,
|
|
|
|
|
qct.check_result checkResult,
|
|
|
|
|
qct.income_time incomeTime,
|
|
|
|
|
qct.check_loc checkLoc,
|
|
|
|
|
qct.remark,
|
|
|
|
|
qct.czbjr,
|
|
|
|
|
qct.zcf,
|
|
|
|
|
qct.zcoemcm,
|
|
|
|
|
qct.qczg,
|
|
|
|
|
qct.reason,
|
|
|
|
|
qct.bz attr3,
|
|
|
|
|
qct.check_type checkType,
|
|
|
|
|
qct.sample_quality sampleQuality,
|
|
|
|
|
qct.oa_factory_f oaFactoryF,
|
|
|
|
|
qct.start_oA startOA,
|
|
|
|
|
qct.sqbm,
|
|
|
|
|
qct.sqr,
|
|
|
|
|
qct.sfxyzg,
|
|
|
|
|
qct.sfgyswt,
|
|
|
|
|
qct.sccj
|
|
|
|
|
from qc_check_task_cg qct
|
|
|
|
|
left join pro_order_workorder pow on pow.workorder_code = qct.order_no and pow.del_flag = '0'
|
|
|
|
|
where qct.record_id = #{recordId}
|
|
|
|
|
</select>
|
|
|
|
|
|
|
|
|
|
<select id="getCkeckTaskXJList" resultType="com.op.quality.domain.QcCheckTaskIncome">
|
|
|
|
|
select
|
|
|
|
|
record_id recordId,
|
|
|
|
|