自动化立体仓库 - WMS系统
#
zjj
2024-09-10 6ef5d115862da9aa5e8028315c8ee2ed9de087ac
src/main/resources/mapper/WrkDetlMapper.xml
@@ -95,6 +95,12 @@
        and matnr = #{matnr}
        <include refid="batchSeq"></include>
    </update>
    <update id="updateIoTimeWms">
        update asr_wrk_detl
        set io_time = #{ioTime}
        where 1=1
          and wrk_no = #{workNo}
    </update>
    <select id="selectPakoutQuery" resultMap="BaseResultMap">
        select
@@ -109,18 +115,19 @@
    </select>
    <select id="selectAndLogByOrderNoGroupByMatnrOfSum" resultMap="BaseResultMap">
        select awd.wrk_no, awd.io_time, awd.matnr, sum(awd.anfme) as anfme
        select awd.wrk_no, awd.io_time, awd.matnr,awd.zpallet,awd.specs,awd.maktx, sum(awd.anfme) as anfme
        from asr_wrk_detl awd
        left join asr_wrk_mast awm on awd.wrk_no = awm.wrk_no and awd.io_time = awm.io_time
        where order_no = #{orderNo}
        group by awd.wrk_no, awd.io_time, awd.matnr
        group by awd.wrk_no, awd.io_time, awd.matnr ,awd.zpallet,awd.specs,awd.maktx
        union
        select distinct awdl.wrk_no, awdl.io_time, awdl.matnr, sum(awdl.anfme) as anfme
        select distinct awdl.wrk_no, awdl.io_time, awdl.matnr,awdl.zpallet,awdl.specs,awdl.maktx, sum(awdl.anfme) as anfme
        from asr_wrk_detl_log awdl
        left join asr_wrk_mast_log awml on awdl.wrk_no = awml.wrk_no and awdl.io_time = awml.io_time
        where awdl.order_no = #{orderNo}
        and (awml.manu_type is null or awml.manu_type != '手动取消')
        group by awdl.wrk_no, awdl.io_time, awdl.matnr
        and awml.io_type != 103
        group by awdl.wrk_no, awdl.io_time, awdl.matnr ,awdl.zpallet,awdl.specs,awdl.maktx
    </select>
</mapper>