|
|
|
@ -16,9 +16,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
|
|
<result property="orderCode" column="order_code" />
|
|
|
|
|
<result property="machineId" column="machine_id" />
|
|
|
|
|
<result property="machineCode" column="machine_code" />
|
|
|
|
|
<result property="machineName" column="machine_name" />
|
|
|
|
|
<result property="badMeg" column="bad_meg" />
|
|
|
|
|
<result property="productId" column="product_id" />
|
|
|
|
|
<result property="productCode" column="product_code" />
|
|
|
|
|
<result property="productName" column="product_name" />
|
|
|
|
|
<result property="productSpc" column="product_spc" />
|
|
|
|
|
<result property="isqua" column="isqua" />
|
|
|
|
|
<result property="fileId" column="file_id" />
|
|
|
|
|
<result property="attr1" column="attr1" />
|
|
|
|
@ -29,7 +32,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
|
|
<result property="updateBy" column="update_by" />
|
|
|
|
|
<result property="createTime" column="create_time" />
|
|
|
|
|
<result property="updateTime" column="update_time" />
|
|
|
|
|
|
|
|
|
|
<collection property="fileList" column="id" select="queryImg"></collection>
|
|
|
|
|
|
|
|
|
|
</resultMap>
|
|
|
|
|
|
|
|
|
@ -41,11 +44,19 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
|
|
</sql>
|
|
|
|
|
|
|
|
|
|
<select id="selectQcProCheckList" parameterType="QcProCheck" resultMap="QcProCheckResult">
|
|
|
|
|
<include refid="selectQuaVo"/>
|
|
|
|
|
select qpc.id,qpc.rfid,qpc.factory_code,qpc.machine_id,qpc.bad_meg,
|
|
|
|
|
qpc.product_id,qpc.isqua,qpc.isqua,qpc.file_id,qpc.attr1,qpc.attr2,
|
|
|
|
|
qpc.attr3,qpc.attr4,qpc.create_by,qpc.create_time,qpc.update_by,
|
|
|
|
|
qpc.update_time,qpc.order_code,qpc.machine_code,qpc.machine_name,
|
|
|
|
|
qpc.workorder_id,qpc.workorder_code,qpc.workorder_name,qpc.product_code,
|
|
|
|
|
qpc.product_name,qpc.product_spc
|
|
|
|
|
from qc_pro_check qpc
|
|
|
|
|
left join
|
|
|
|
|
<where>
|
|
|
|
|
<if test="rfid != null and rfid != ''"> and id = #{id}</if>
|
|
|
|
|
<if test="rfid != null and rfid != ''"> and qpc.id = #{id}</if>
|
|
|
|
|
<if test="createBy != null and createBy != ''"> and qpc.create_by = #{createBy}</if>
|
|
|
|
|
</where>
|
|
|
|
|
order by create_time desc
|
|
|
|
|
order by qpc.create_time desc
|
|
|
|
|
</select>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -64,9 +75,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
|
|
<if test="orderCode != null and orderCode != ''">order_code,</if>
|
|
|
|
|
<if test="machineId != null">machine_id,</if>
|
|
|
|
|
<if test="machineCode != null">machine_code,</if>
|
|
|
|
|
<if test="machineName != null">machine_name,</if>
|
|
|
|
|
<if test="badMeg != null and badMeg != ''">bad_meg,</if>
|
|
|
|
|
<if test="productId != null">product_id,</if>
|
|
|
|
|
<if test="productCode != null">product_code,</if>
|
|
|
|
|
<if test="productName != null">product_name,</if>
|
|
|
|
|
<if test="productSpc != null">product_spc,</if>
|
|
|
|
|
<if test="attr1 != null">attr1,</if>
|
|
|
|
|
<if test="attr2 != null">attr2,</if>
|
|
|
|
|
<if test="attr3 != null">attr3,</if>
|
|
|
|
@ -91,9 +105,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
|
|
<if test="orderCode != null and orderCode != ''">#{orderCode},</if>
|
|
|
|
|
<if test="machineId != null">#{machineId},</if>
|
|
|
|
|
<if test="machineCode != null">#{machineCode},</if>
|
|
|
|
|
<if test="machineName != null">#{machineName},</if>
|
|
|
|
|
<if test="badMeg != null and badMeg != ''">#{badMeg},</if>
|
|
|
|
|
<if test="productId != null">#{productId},</if>
|
|
|
|
|
<if test="productCode != null">#{productCode},</if>
|
|
|
|
|
<if test="productName != null">#{productName},</if>
|
|
|
|
|
<if test="productSpc != null">#{productSpc},</if>
|
|
|
|
|
<if test="attr1 != null">#{attr1},</if>
|
|
|
|
|
<if test="attr2 != null">#{attr2},</if>
|
|
|
|
|
<if test="attr3 != null">#{attr3},</if>
|
|
|
|
@ -144,5 +161,27 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
|
|
delete from qc_pro_check where id = #{id}
|
|
|
|
|
</delete>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<select id="queryImg" resultType="String">
|
|
|
|
|
SELECT
|
|
|
|
|
file_address fileAddress
|
|
|
|
|
FROM
|
|
|
|
|
base_file
|
|
|
|
|
WHERE
|
|
|
|
|
source_id=#{id}
|
|
|
|
|
</select>
|
|
|
|
|
<select id="getInfoByRfid" resultType="com.op.quality.domain.QcProCheck">
|
|
|
|
|
select
|
|
|
|
|
rfid.workorder_code workorderCode,
|
|
|
|
|
rfid.work_batch_code workBatchCode,
|
|
|
|
|
rfid.machine_code machineCode,
|
|
|
|
|
be.equipment_name machineName,
|
|
|
|
|
ow.product_code productCode,
|
|
|
|
|
ow.product_name productName,
|
|
|
|
|
ow.product_spc productSpc
|
|
|
|
|
from pro_rfid_process_detail rfid
|
|
|
|
|
left join base_equipment be on rfid.machine_code = be.equipment_code
|
|
|
|
|
left join pro_order_workorder ow on ow.workorder_code = rfid.workorder_code
|
|
|
|
|
where rfid.bind_status = '1'
|
|
|
|
|
and rfid.rfid = #{rfid}
|
|
|
|
|
</select>
|
|
|
|
|
</mapper>
|
|
|
|
|