退料申请表数据问题修改
This commit is contained in:
parent
e57c7938fe
commit
463d5bee5a
|
|
@ -448,35 +448,38 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
</select>
|
</select>
|
||||||
<select id="selectPutinDetailsAddTypeId" resultType="com.bonus.sgzb.material.domain.PurchaseMacodeInfo">
|
<select id="selectPutinDetailsAddTypeId" resultType="com.bonus.sgzb.material.domain.PurchaseMacodeInfo">
|
||||||
select pcd.production_time productionTime,
|
select pcd.production_time productionTime,
|
||||||
mt.type_name specificationType,
|
mt.type_name specificationType,
|
||||||
mt1.type_name typeName,
|
mt1.type_name typeName,
|
||||||
pmi.ma_code maCode,
|
pmi.ma_code maCode,
|
||||||
mm.assets_code assetsCode,
|
mm.assets_code assetsCode,
|
||||||
pmi.fix_code fixCode,
|
pmi.fix_code fixCode,
|
||||||
pcd.type_id typeId,
|
pcd.type_id typeId,
|
||||||
pcd.task_id taskId,
|
pcd.task_id taskId,
|
||||||
mt.code specsCode,
|
mt.code specsCode,
|
||||||
mt1.code typeCode,
|
mt1.code typeCode,
|
||||||
CASE
|
CASE
|
||||||
WHEN pmi.ma_code is null THEN
|
WHEN pmi.ma_code is null THEN
|
||||||
CASE
|
CASE
|
||||||
WHEN pcd.status = 4 THEN 1
|
WHEN pcd.status = 4 THEN 1
|
||||||
WHEN pcd.status = 5 THEN 2
|
WHEN pcd.status = 5 THEN 2
|
||||||
ELSE 0
|
ELSE 0
|
||||||
END
|
END
|
||||||
ELSE pmi.status
|
ELSE pmi.status
|
||||||
END AS status,
|
END AS status,
|
||||||
mm.qr_code qrCode,
|
mm.qr_code qrCode,
|
||||||
mm.ma_id maId,
|
mm.ma_id maId,
|
||||||
if(pmi.ma_code is not null, 1, pcd.check_num) checkNum
|
if(pmi.ma_code is not null, 1, pcd.check_num) checkNum
|
||||||
from purchase_check_details pcd
|
from purchase_check_details pcd
|
||||||
left join purchase_macode_info pmi on pmi.task_id = pcd.task_id and pmi.type_id = pcd.type_id
|
left join purchase_macode_info pmi on pmi.task_id = pcd.task_id and pmi.type_id = pcd.type_id
|
||||||
left join ma_machine mm on pmi.ma_code = mm.ma_code
|
left join ma_machine mm on pmi.ma_code = mm.ma_code
|
||||||
left join ma_type mt on pcd.type_id = mt.type_id
|
left join ma_type mt on pcd.type_id = mt.type_id
|
||||||
left join ma_type mt1 on mt.parent_id = mt1.type_id
|
left join ma_type mt1 on mt.parent_id = mt1.type_id
|
||||||
where pcd.task_id = #{taskId} and mt.type_id #{typeId}
|
where pcd.task_id = #{taskId} and mt.type_id = #{typeId}
|
||||||
and pcd.`status`!=3 and pcd.`status`!=7
|
and pcd.`status`!=3 and pcd.`status`!=7
|
||||||
|
<if test="dictName != null and dictName != ''">
|
||||||
|
and (mt.type_name like concat('%',#{dictName},'%') or
|
||||||
|
mt1.type_name like concat('%',#{dictName},'%'))
|
||||||
|
</if>
|
||||||
order by status
|
order by status
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue