demand: TMS系统财务销账优化

committer: heyu
This commit is contained in:
aike 2025-09-18 11:20:54 +08:00
parent a90693f35b
commit 22b4aa7813
2 changed files with 18 additions and 14 deletions

View File

@ -244,12 +244,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
ssb.confirm_center_code as ssb_confirm_center_code, ssb.bl_confirm_site as ssb_bl_confirm_site, ssb.confirm_site_date as ssb_confirm_site_date,
ssb.confirm_site_man_code as ssb_confirm_site_man_code, ssb.confirm_site_note as ssb_confirm_site_note, ssb.confirm_site_code as ssb_confirm_site_code
from emis_writeoff_apply_detail wad
left join emis_waybill w on wad.bill_code = w.bill_code
left join emis_trans_product tp on w.product_type = tp.prod_code
left join emis_settle_bill sb on wad.settle_bill_no = sb.settle_bill_no
left join emis_settle_sub_bill ssb on wad.bill_code = ssb.bill_code
left join emis_site send_site on w.send_site_code = send_site.site_code
left join emis_site dest_site on w.dispatch_underling_site_code = dest_site.site_code
left join emis_waybill w on wad.bill_code = w.bill_code and w.del_flag = '0'
left join emis_trans_product tp on w.product_type = tp.prod_code and tp.del_flag = '0'
left join emis_settle_bill sb on wad.settle_bill_no = sb.settle_bill_no and sb.del_flag = '0'
left join emis_settle_sub_bill ssb on wad.bill_code = ssb.bill_code and ssb.del_flag = '0'
left join emis_site send_site on w.send_site_code = send_site.site_code and send_site.del_flag = '0'
left join emis_site dest_site on w.dispatch_underling_site_code = dest_site.site_code and dest_site.del_flag = '0'
</sql>
<select id="selectEmisWriteoffApplyDetailList" parameterType="EmisWriteoffApplyDetail" resultMap="EmisWriteoffApplyDetailResult">

View File

@ -62,10 +62,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
wa.create_by, wa.create_time, wa.update_by, wa.update_time, wa.remark
from emis_writeoff_apply wa
<if test="(params != null and params.queryParams != null and params.queryParams != '') or (settleBillName != null and settleBillName != '')">
left join emis_writeoff_apply_detail wad on wa.id = wad.apply_id
left join emis_writeoff_apply_detail wad on wa.id = wad.apply_id and wad.del_flag = '0'
</if>
<if test="settleBillName != null and settleBillName != ''">
left join emis_settle_bill sb on wad.settle_bill_no = sb.settle_bill_no
left join emis_settle_bill sb on wad.settle_bill_no = sb.settle_bill_no and sb.del_flag = '0'
</if>
<where>
<if test="applyNo != null and applyNo != ''"> and wa.apply_no = #{applyNo}</if>
@ -517,15 +517,19 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
ssb.deduction_reason as ssb_deduction_reason, ssb.other_reason as ssb_other_reason, ssb.create_by as ssb_create_by,
ssb.create_time as ssb_create_time, ssb.update_by as ssb_update_by, ssb.update_time as ssb_update_time
from emis_waybill w
left join emis_settle_sub_bill ssb on w.bill_code = ssb.bill_code
left join emis_settle_bill sb on ssb.settle_bill_no = sb.settle_bill_no
left join emis_site send_site on w.send_site_code = send_site.site_code
left join emis_site dest_site on w.dispatch_underling_site_code = dest_site.site_code
left join emis_trans_product tp on w.product_type = tp.prod_code
where w.bill_code in
left join emis_settle_sub_bill ssb on w.bill_code = ssb.bill_code and ssb.del_flag = '0'
left join emis_settle_bill sb on ssb.settle_bill_no = sb.settle_bill_no and sb.del_flag = '0'
left join emis_site send_site on w.send_site_code = send_site.site_code and send_site.del_flag = '0'
left join emis_site dest_site on w.dispatch_underling_site_code = dest_site.site_code and dest_site.del_flag = '0'
left join emis_trans_product tp on w.product_type = tp.prod_code and tp.del_flag = '0'
where
w.del_flag = '0'
and w.bill_code in
<foreach collection="list" item="billCode" open="(" separator="," close=")">
#{billCode}
</foreach>
and w.order_status != '0'
and w.order_status != '2'
order by w.create_time desc
</select>