diff --git a/emis-biz-web/src/main/java/com/xdadan/erp/web/emis/EmisSettleSubBillController.java b/emis-biz-web/src/main/java/com/xdadan/erp/web/emis/EmisSettleSubBillController.java index 304f1adde..329799e0f 100644 --- a/emis-biz-web/src/main/java/com/xdadan/erp/web/emis/EmisSettleSubBillController.java +++ b/emis-biz-web/src/main/java/com/xdadan/erp/web/emis/EmisSettleSubBillController.java @@ -1,11 +1,11 @@ -/** +/** * @Project: emis * @Title: EmisSettleSubBillController.java * @author linfso * @date 2024-07-03 18:54:52 * @Copyright: ShangHai Duta 2022 All rights reserved. - * @version v1.0 + * @version v1.0 * @Description:

结算子账单 控制器

*/ @@ -47,7 +47,7 @@ import com.xdadan.erp.emis.service.IEmisSettleSubBillService; /** * 结算子账单Controller - * + * * @author linfso * @date 2024-07-03 18:54:52 */ @@ -189,8 +189,8 @@ public class EmisSettleSubBillController extends EmisBaseController /** * 检查是否重复 - * - * @param emisSettleSubBill + * + * @param emisSettleSubBill * @return 数量 */ @PreAuthorize("@ss.hasPermi('emis:emisSettleSubBill:list')") @@ -469,9 +469,7 @@ public class EmisSettleSubBillController extends EmisBaseController */ EmisWaybill waybill=emisBaseService.getWaybillByBillCode(old.getBillNo()); if( - !"3".equals(waybill.getCalcFeeType()) - && !"1".equals(waybill.getBlSpecialQuote()) - && !"2".equals(waybill.getPaymentType()) + !"2".equals(waybill.getPaymentType()) && !"4".equals(waybill.getPaymentType()) && !"5".equals(waybill.getPaymentType()) ) { diff --git a/emis-biz/src/main/resources/mapper/EmisTmsSiteBatchMissMapper.xml b/emis-biz/src/main/resources/mapper/EmisTmsSiteBatchMissMapper.xml index f00bbef64..ab385207b 100644 --- a/emis-biz/src/main/resources/mapper/EmisTmsSiteBatchMissMapper.xml +++ b/emis-biz/src/main/resources/mapper/EmisTmsSiteBatchMissMapper.xml @@ -58,7 +58,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" select m.id, m.bill_code, m.miss_reason, m.create_time, m.update_time, m.remark, m.del_flag, - m.line_code, m.product_type, m.start_site_code, m.next_site_code, m.supplier_code, m.start_date, m.end_date,m.miss_type, + m.line_code, m.product_type, + COALESCE(m.start_site_code, w.start_site_code, w.send_site_code) as start_site_code, + COALESCE(m.next_site_code, w.destination_code) as next_site_code, + m.supplier_code, m.start_date, m.end_date,m.miss_type, w.send_site_code, s1.site_name as send_site_name,s2.site_name as start_site_name,s3.site_name as next_site_name, w.send_country, c1.name as send_country_name, w.destination_code, s4.site_name as dispatch_underling_site_name,w.bl_is_question, l.line_name as line_name, w.receive_country, c2.name as receive_country_name, w.send_date, w.bl_sign, w.sign_date, @@ -77,8 +80,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" from emis_tms_site_batch_miss m left join emis_waybill w on m.bill_code = w.bill_code and w.del_flag='0' left join emis_site s1 on w.send_site_code=s1.site_code and s1.del_flag=0 - left join emis_site s2 on m.start_site_code=s2.site_code and s2.del_flag=0 - left join emis_site s3 on m.next_site_code=s3.site_code and s3.del_flag=0 + left join emis_site s2 on COALESCE(m.start_site_code, w.start_site_code, w.send_site_code)=s2.site_code and s2.del_flag=0 + left join emis_site s3 on COALESCE(m.next_site_code, w.destination_code)=s3.site_code and s3.del_flag=0 left join emis_country c1 on w.send_country=c1.code and c1.del_flag='0' left join emis_country c2 on w.receive_country=c2.code and c2.del_flag='0' left join emis_site s4 on w.dispatch_underling_site_code=s4.site_code and s4.del_flag=0 @@ -145,7 +148,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" b.bill_code, null as id, '已组批次成功' as miss_reason, null as create_by, null as create_time, null as update_by, null as update_time, null as remark, '0' as del_flag, - w.trans_line_type as line_code, w.product_type, w.start_site_code, w.next_site_code, + w.trans_line_type as line_code, w.product_type, + COALESCE(null, w.start_site_code, w.send_site_code) as start_site_code, + COALESCE(null, w.destination_code) as next_site_code, null as supplier_code, null as start_date, null as end_date, '0' as miss_type, w.send_site_code, s1.site_name as send_site_name, w.send_country, c1.name as send_country_name, w.destination_code, s2.site_name as dispatch_underling_site_name, w.bl_is_question, diff --git a/emis-biz/src/main/resources/mapper/EmisTmsSiteBatchMissStatisticsMapper.xml b/emis-biz/src/main/resources/mapper/EmisTmsSiteBatchMissStatisticsMapper.xml index c6d537157..e48ceaedd 100644 --- a/emis-biz/src/main/resources/mapper/EmisTmsSiteBatchMissStatisticsMapper.xml +++ b/emis-biz/src/main/resources/mapper/EmisTmsSiteBatchMissStatisticsMapper.xml @@ -13,16 +13,16 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" select m.id, m.bill_code, m.miss_reason, m.create_time, m.update_time, m.remark, m.del_flag, - m.line_code, m.product_type, m.start_site_code, m.next_site_code, m.supplier_code, m.start_date, m.end_date,m.miss_type, + m.line_code, m.product_type, + COALESCE(m.start_site_code, w.start_site_code, w.send_site_code) as start_site_code, + COALESCE(m.next_site_code, w.destination_code) as next_site_code, + m.supplier_code, m.start_date, m.end_date,m.miss_type, w.send_site_code, s1.site_name as send_site_name,s2.site_name as start_site_name,s3.site_name as next_site_name, w.send_country, c1.name as send_country_name, w.destination_code, s4.site_name as dispatch_underling_site_name,w.bl_is_question, l.line_name as line_name, w.receive_country, c2.name as receive_country_name, w.send_date, w.bl_sign, w.sign_date, @@ -115,8 +121,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" from emis_tms_site_batch_miss m left join emis_waybill w on m.bill_code = w.bill_code and w.del_flag='0' left join emis_site s1 on w.send_site_code=s1.site_code and s1.del_flag='0' - left join emis_site s2 on m.start_site_code=s2.site_code and s2.del_flag='0' - left join emis_site s3 on m.next_site_code=s3.site_code and s3.del_flag='0' + left join emis_site s2 on COALESCE(m.start_site_code, w.start_site_code, w.send_site_code)=s2.site_code and s2.del_flag='0' + left join emis_site s3 on COALESCE(m.next_site_code, w.destination_code)=s3.site_code and s3.del_flag='0' left join emis_country c1 on w.send_country=c1.code and c1.del_flag='0' left join emis_country c2 on w.receive_country=c2.code and c2.del_flag='0' left join emis_site s4 on w.dispatch_underling_site_code=s4.site_code and s4.del_flag='0' @@ -126,7 +132,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" left join sys_user u on w.register_man_code=u.emp_code and u.del_flag='0' WHERE m.del_flag = '0' - AND m.start_site_code = #{query.startSiteCode} + AND COALESCE(m.start_site_code, w.start_site_code, w.send_site_code) = #{query.startSiteCode} AND DATE_FORMAT(w.send_date, '%Y-%m') = ]]> #{query.startTime} @@ -150,7 +156,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" LEFT JOIN emis_waybill w ON m.bill_code = w.bill_code AND w.del_flag='0' WHERE m.del_flag = '0' - AND m.start_site_code = #{startSiteCode} + AND COALESCE(m.start_site_code, w.start_site_code, w.send_site_code) = #{startSiteCode} AND DATE_FORMAT(w.send_date, '%Y-%m') = ]]> #{startTime}