|
|
|
@ -7,7 +7,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
|
|
<resultMap type="QcCheckTaskProduce" id="QcCheckTaskProduceResult">
|
|
|
|
|
<result property="recordId" column="record_id" />
|
|
|
|
|
<result property="checkNo" column="check_no" />
|
|
|
|
|
<result property="batchNo" column="batch_no" />
|
|
|
|
|
<result property="incomeBatchNo" column="income_batch_no" />
|
|
|
|
|
<result property="orderNo" column="order_no" />
|
|
|
|
|
<result property="materialCode" column="material_code" />
|
|
|
|
|
<result property="materialName" column="material_name" />
|
|
|
|
@ -37,7 +37,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
|
|
</resultMap>
|
|
|
|
|
|
|
|
|
|
<sql id="selectQcCheckTaskProduceVo">
|
|
|
|
|
select record_id, check_no, batch_no, order_no, material_code, material_name,
|
|
|
|
|
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,
|
|
|
|
@ -46,36 +46,37 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
|
|
</sql>
|
|
|
|
|
|
|
|
|
|
<select id="selectQcCheckTaskProduceList" parameterType="QcCheckTaskProduce" resultMap="QcCheckTaskProduceResult">
|
|
|
|
|
<include refid="selectQcCheckTaskProduceVo"/>
|
|
|
|
|
select qct.record_id, qct.check_no, qct.income_batch_no,
|
|
|
|
|
qct.order_no, qct.material_code, qct.material_name, qct.quality, qct.unit,
|
|
|
|
|
qct.supplier_code, qct.supplier_name, qct.income_time, qct.check_loc, qct.check_status,
|
|
|
|
|
qct.check_man_code, qct.check_man_name,qct.check_time, qct.check_result, qct.status,
|
|
|
|
|
qct.create_by,qct.create_time, qct.update_by, qct.update_time,qct.check_type,
|
|
|
|
|
q.type_code
|
|
|
|
|
from qc_check_task qct
|
|
|
|
|
left join qc_check_type q on q.id = qct.check_type
|
|
|
|
|
<where>
|
|
|
|
|
<if test="checkNo != null and checkNo != ''"> and check_no like concat('%', #{checkNo}, '%')</if>
|
|
|
|
|
<if test="batchNo != null and batchNo != ''"> and batch_no like concat('%', #{batchNo}, '%')</if>
|
|
|
|
|
<if test="orderNo != null and orderNo != ''"> and order_no like concat('%', #{orderNo}, '%')</if>
|
|
|
|
|
<if test="materialCode != null and materialCode != ''"> and material_code = #{materialCode}</if>
|
|
|
|
|
<if test="materialName != null and materialName != ''"> and material_name like concat('%', #{materialName}, '%')</if>
|
|
|
|
|
<if test="quality != null "> and quality = #{quality}</if>
|
|
|
|
|
<if test="unit != null and unit != ''"> and unit = #{unit}</if>
|
|
|
|
|
<if test="supplierCode != null and supplierCode != ''"> and supplier_code = #{supplierCode}</if>
|
|
|
|
|
<if test="supplierName != null and supplierName != ''"> and supplier_name like concat('%', #{supplierName}, '%')</if>
|
|
|
|
|
<if test="produceDate != null "> and income_time = #{produceDate}</if>
|
|
|
|
|
<if test="checkLoc != null and checkLoc != ''"> and check_loc = #{checkLoc}</if>
|
|
|
|
|
<if test="checkStatus != null and checkStatus != ''"> and check_status = #{checkStatus}</if>
|
|
|
|
|
<if test="checkManCode != null and checkManCode != ''"> and check_man_code = #{checkManCode}</if>
|
|
|
|
|
<if test="checkManName != null and checkManName != ''"> and check_man_name like concat('%', #{checkManName}, '%')</if>
|
|
|
|
|
<if test="checkTime != null "> and check_time = #{checkTime}</if>
|
|
|
|
|
<if test="checkResult != null and checkResult != ''"> and check_result = #{checkResult}</if>
|
|
|
|
|
<if test="delFlag != null and delFlag != ''"> and del_flag = #{delFlag}</if>
|
|
|
|
|
<if test="status != null and status != ''"> and status = #{status}</if>
|
|
|
|
|
<if test="attr1 != null and attr1 != ''"> and attr1 = #{attr1}</if>
|
|
|
|
|
<if test="attr2 != null and attr2 != ''"> and attr2 = #{attr2}</if>
|
|
|
|
|
<if test="attr3 != null and attr3 != ''"> and attr3 = #{attr3}</if>
|
|
|
|
|
<if test="attr4 != null and attr4 != ''"> and attr4 = #{attr4}</if>
|
|
|
|
|
<if test="factoryCode != null and factoryCode != ''"> and factory_code = #{factoryCode}</if>
|
|
|
|
|
<if test="incomeTimeStart != null "> and CONVERT(varchar(30),income_time, 120) >= #{incomeTimeStart}</if>
|
|
|
|
|
<if test="incomeTimeEnd != null "> and #{incomeTimeEnd} > CONVERT(varchar(30),income_time, 120)</if>
|
|
|
|
|
<if test="checkTimeStart != null "> and CONVERT(varchar(30),check_time, 120) >= #{checkTimeStart}</if>
|
|
|
|
|
<if test="checkTimeEnd != null "> and #{checkTimeEnd} > CONVERT(varchar(30),check_time, 120)</if>
|
|
|
|
|
<if test="checkType != null "> and check_type = #{checkType} </if>
|
|
|
|
|
<if test="checkNo != null and checkNo != ''"> and qct.check_no = #{checkNo}</if>
|
|
|
|
|
<if test="incomeBatchNo != null and incomeBatchNo != ''"> and qct.income_batch_no = #{incomeBatchNo}</if>
|
|
|
|
|
<if test="orderNo != null and orderNo != ''"> and qct.order_no = #{orderNo}</if>
|
|
|
|
|
<if test="materialCode != null and materialCode != ''"> and qct.material_code = #{materialCode}</if>
|
|
|
|
|
<if test="materialName != null and materialName != ''"> and qct.material_name like concat('%', #{materialName}, '%')</if>
|
|
|
|
|
<if test="supplierCode != null and supplierCode != ''"> and qct.supplier_code = #{supplierCode}</if>
|
|
|
|
|
<if test="supplierName != null and supplierName != ''"> and qct.supplier_name like concat('%', #{supplierName}, '%')</if>
|
|
|
|
|
<if test="incomeTime != null "> and qct.income_time = #{incomeTime}</if>
|
|
|
|
|
<if test="checkLoc != null and checkLoc != ''"> and qct.check_loc = #{checkLoc}</if>
|
|
|
|
|
<if test="checkStatus != null and checkStatus != ''"> and qct.check_status = #{checkStatus}</if>
|
|
|
|
|
<if test="checkManCode != null and checkManCode != ''"> and qct.check_man_code = #{checkManCode}</if>
|
|
|
|
|
<if test="checkManName != null and checkManName != ''"> and qct.check_man_name like concat('%', #{checkManName}, '%')</if>
|
|
|
|
|
<if test="checkResult != null and checkResult != ''"> and qct.check_result = #{checkResult}</if>
|
|
|
|
|
<if test="status != null and status != ''"> and qct.status = #{status}</if>
|
|
|
|
|
<if test="delFlag != null and delFlag != ''"> and qct.del_flag = #{delFlag}</if>
|
|
|
|
|
<if test="factoryCode != null and factoryCode != ''"> and qct.factory_code = #{factoryCode}</if>
|
|
|
|
|
<if test="incomeTimeStart != null "> and CONVERT(varchar(30),qct.income_time, 120) >= #{incomeTimeStart}</if>
|
|
|
|
|
<if test="incomeTimeEnd != null "> and #{incomeTimeEnd} > CONVERT(varchar(30),qct.income_time, 120)</if>
|
|
|
|
|
<if test="checkTimeStart != null "> and CONVERT(varchar(30),qct.check_time, 120) >= #{checkTimeStart}</if>
|
|
|
|
|
<if test="checkTimeEnd != null "> and #{checkTimeEnd} > CONVERT(varchar(30),qct.check_time, 120)</if>
|
|
|
|
|
<if test="checkType != null "> and qct.check_type = #{checkType} </if>
|
|
|
|
|
<if test="typeCode != null "> and q.type_code = #{typeCode} </if>
|
|
|
|
|
</where>
|
|
|
|
|
</select>
|
|
|
|
|
|
|
|
|
@ -107,7 +108,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
|
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
|
|
|
|
<if test="recordId != null">record_id,</if>
|
|
|
|
|
<if test="checkNo != null">check_no,</if>
|
|
|
|
|
<if test="batchNo != null">batch_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>
|
|
|
|
@ -115,7 +116,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
|
|
<if test="unit != null">unit,</if>
|
|
|
|
|
<if test="supplierCode != null">supplier_code,</if>
|
|
|
|
|
<if test="supplierName != null">supplier_name,</if>
|
|
|
|
|
<if test="produceDate != null">income_time,</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>
|
|
|
|
@ -138,7 +139,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
|
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
|
|
|
<if test="recordId != null">#{recordId},</if>
|
|
|
|
|
<if test="checkNo != null">#{checkNo},</if>
|
|
|
|
|
<if test="batchNo != null">#{batchNo},</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>
|
|
|
|
@ -146,7 +147,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
|
|
<if test="unit != null">#{unit},</if>
|
|
|
|
|
<if test="supplierCode != null">#{supplierCode},</if>
|
|
|
|
|
<if test="supplierName != null">#{supplierName},</if>
|
|
|
|
|
<if test="produceDate != null">#{produceDate},</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>
|
|
|
|
@ -172,7 +173,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
|
|
update qc_check_task
|
|
|
|
|
<trim prefix="SET" suffixOverrides=",">
|
|
|
|
|
<if test="checkNo != null">check_no = #{checkNo},</if>
|
|
|
|
|
<if test="batchNo != null">batch_no = #{batchNo},</if>
|
|
|
|
|
<if test="incomeBatchNo != null">income_batch_no = #{incomeBatchNo},</if>
|
|
|
|
|
<if test="orderNo != null">order_no = #{orderNo},</if>
|
|
|
|
|
<if test="materialCode != null">material_code = #{materialCode},</if>
|
|
|
|
|
<if test="materialName != null">material_name = #{materialName},</if>
|
|
|
|
@ -180,7 +181,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
|
|
<if test="unit != null">unit = #{unit},</if>
|
|
|
|
|
<if test="supplierCode != null">supplier_code = #{supplierCode},</if>
|
|
|
|
|
<if test="supplierName != null">supplier_name = #{supplierName},</if>
|
|
|
|
|
<if test="produceDate != null">income_time = #{produceDate},</if>
|
|
|
|
|
<if test="incomeTime != null">income_time = #{incomeTime},</if>
|
|
|
|
|
<if test="checkLoc != null">check_loc = #{checkLoc},</if>
|
|
|
|
|
<if test="checkStatus != null">check_status = #{checkStatus},</if>
|
|
|
|
|
<if test="checkManCode != null">check_man_code = #{checkManCode},</if>
|
|
|
|
|