| | |
| | | <select id="selectAndLogByOrderNoGroupByMatnrOfSum" resultType="com.zy.asrs.common.wms.entity.WrkDetl"> |
| | | select awd.wrk_no, awd.io_time, awd.matnr, sum(awd.anfme) as anfme |
| | | from wms_wrk_detl awd |
| | | left join wms_wrk_mast awm on awd.wrk_no = awm.wrk_no and awd.io_time = awm.io_time |
| | | left join wms_wrk_mast awm on awd.wrk_mast_id = awm.id and awd.host_id = awm.host_id |
| | | where order_no = #{orderNo} |
| | | group by awd.wrk_no, awd.io_time, awd.matnr |
| | | union |
| | | select distinct awdl.wrk_no, awdl.io_time, awdl.matnr, sum(awdl.anfme) as anfme |
| | | from wms_wrk_detl_log awdl |
| | | left join wms_wrk_mast_log awml on awdl.wrk_no = awml.wrk_no and awdl.io_time = awml.io_time |
| | | left join wms_wrk_mast_log awml on awdl.wrk_mast_id = awml.id and awdl.host_id = awml.host_id |
| | | where awdl.order_no = #{orderNo} |
| | | and (awml.manu_type is null or awml.manu_type != '手动取消') |
| | | and (awml.manu_type is null or awml.manu_type != '手动取消') |
| | | group by awdl.wrk_no, awdl.io_time, awdl.matnr |
| | | </select> |
| | | |
| | |
| | | |
| | | <select id="selectPakoutQuery" resultType="com.zy.asrs.common.wms.entity.WrkDetl"> |
| | | select |
| | | awd.* |
| | | awd.* |
| | | from wms_wrk_detl awd |
| | | left join asr_wrk_mast awm on awd.wrk_no = awm.wrk_no |
| | | left join asr_wrk_mast awm on awd.wrk_mast_id = awm.id and awd.host_id = awm.host_id |
| | | where 1=1 |
| | | and awm.wrk_sts = 199 |
| | | and (awd.inspect is null or awd.inspect = 0) |
| | | and awm.sta_no = #{staNo} |
| | | and awd.matnr + '-' + awd.batch = #{matnr} |
| | | and awm.wrk_sts = 199 |
| | | and (awd.inspect is null or awd.inspect = 0) |
| | | and awm.sta_no = #{staNo} |
| | | and awd.matnr + '-' + awd.batch = #{matnr} |
| | | </select> |
| | | |
| | | <update id="updateInspect"> |