Merge pull request 'develop' (#203) from develop into master
Reviewed-on: http://git.xdadan.loc/tanex/emis-service/pulls/203
This commit is contained in:
commit
f6aa44e03f
@ -1,11 +1,11 @@
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @Project: emis
|
* @Project: emis
|
||||||
* @Title: EmisSettleSubBillController.java
|
* @Title: EmisSettleSubBillController.java
|
||||||
* @author linfso
|
* @author linfso
|
||||||
* @date 2024-07-03 18:54:52
|
* @date 2024-07-03 18:54:52
|
||||||
* @Copyright: ShangHai Duta 2022 All rights reserved.
|
* @Copyright: ShangHai Duta 2022 All rights reserved.
|
||||||
* @version v1.0
|
* @version v1.0
|
||||||
* @Description: <p> 结算子账单 控制器 </p>
|
* @Description: <p> 结算子账单 控制器 </p>
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@ -47,7 +47,7 @@ import com.xdadan.erp.emis.service.IEmisSettleSubBillService;
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* 结算子账单Controller
|
* 结算子账单Controller
|
||||||
*
|
*
|
||||||
* @author linfso
|
* @author linfso
|
||||||
* @date 2024-07-03 18:54:52
|
* @date 2024-07-03 18:54:52
|
||||||
*/
|
*/
|
||||||
@ -189,8 +189,8 @@ public class EmisSettleSubBillController extends EmisBaseController
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* 检查是否重复
|
* 检查是否重复
|
||||||
*
|
*
|
||||||
* @param emisSettleSubBill
|
* @param emisSettleSubBill
|
||||||
* @return 数量
|
* @return 数量
|
||||||
*/
|
*/
|
||||||
@PreAuthorize("@ss.hasPermi('emis:emisSettleSubBill:list')")
|
@PreAuthorize("@ss.hasPermi('emis:emisSettleSubBill:list')")
|
||||||
@ -469,9 +469,7 @@ public class EmisSettleSubBillController extends EmisBaseController
|
|||||||
*/
|
*/
|
||||||
EmisWaybill waybill=emisBaseService.getWaybillByBillCode(old.getBillNo());
|
EmisWaybill waybill=emisBaseService.getWaybillByBillCode(old.getBillNo());
|
||||||
if(
|
if(
|
||||||
!"3".equals(waybill.getCalcFeeType())
|
!"2".equals(waybill.getPaymentType())
|
||||||
&& !"1".equals(waybill.getBlSpecialQuote())
|
|
||||||
&& !"2".equals(waybill.getPaymentType())
|
|
||||||
&& !"4".equals(waybill.getPaymentType())
|
&& !"4".equals(waybill.getPaymentType())
|
||||||
&& !"5".equals(waybill.getPaymentType())
|
&& !"5".equals(waybill.getPaymentType())
|
||||||
) {
|
) {
|
||||||
|
|||||||
@ -58,7 +58,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
<sql id="selectEmisTmsSiteBatchMissVo">
|
<sql id="selectEmisTmsSiteBatchMissVo">
|
||||||
select
|
select
|
||||||
m.id, m.bill_code, m.miss_reason, m.create_time, m.update_time, m.remark, m.del_flag,
|
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,
|
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,
|
l.line_name as line_name,
|
||||||
w.receive_country, c2.name as receive_country_name, w.send_date, w.bl_sign, w.sign_date,
|
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
|
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_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 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 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 m.next_site_code=s3.site_code and s3.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 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_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
|
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,
|
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 create_by, null as create_time, null as update_by, null as update_time,
|
||||||
null as remark, '0' as del_flag,
|
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,
|
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_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,
|
w.send_country, c1.name as send_country_name, w.destination_code, s2.site_name as dispatch_underling_site_name, w.bl_is_question,
|
||||||
|
|||||||
@ -13,16 +13,16 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
|
|
||||||
<select id="selectStatisticsList" parameterType="EmisTmsSiteBatchMissStatistics" resultMap="EmisTmsSiteBatchMissStatisticsResult">
|
<select id="selectStatisticsList" parameterType="EmisTmsSiteBatchMissStatistics" resultMap="EmisTmsSiteBatchMissStatisticsResult">
|
||||||
SELECT
|
SELECT
|
||||||
bm.start_site_code,
|
COALESCE(bm.start_site_code, w.start_site_code, w.send_site_code) as start_site_code,
|
||||||
s.site_name as start_site_name,
|
s.site_name as start_site_name,
|
||||||
STR_TO_DATE(CONCAT(DATE_FORMAT(w.send_date, '%Y-%m'), '-01'), '%Y-%m-%d') as bill_month,
|
STR_TO_DATE(CONCAT(DATE_FORMAT(w.send_date, '%Y-%m'), '-01'), '%Y-%m-%d') as bill_month,
|
||||||
COUNT(*) as ticket_count
|
COUNT(*) as ticket_count
|
||||||
FROM emis_tms_site_batch_miss bm
|
FROM emis_tms_site_batch_miss bm
|
||||||
LEFT JOIN emis_waybill w ON bm.bill_code = w.bill_code AND w.del_flag = '0'
|
LEFT JOIN emis_waybill w ON bm.bill_code = w.bill_code AND w.del_flag = '0'
|
||||||
LEFT JOIN emis_site s ON bm.start_site_code = s.site_code AND s.del_flag = '0'
|
LEFT JOIN emis_site s ON COALESCE(bm.start_site_code, w.start_site_code, w.send_site_code) = s.site_code AND s.del_flag = '0'
|
||||||
WHERE bm.del_flag = '0'
|
WHERE bm.del_flag = '0'
|
||||||
<if test="startSiteCode != null and startSiteCode != ''">
|
<if test="startSiteCode != null and startSiteCode != ''">
|
||||||
AND bm.start_site_code = #{startSiteCode}
|
AND COALESCE(bm.start_site_code, w.start_site_code, w.send_site_code) = #{startSiteCode}
|
||||||
</if>
|
</if>
|
||||||
<if test="startTime != null and startTime != ''">
|
<if test="startTime != null and startTime != ''">
|
||||||
AND DATE_FORMAT(w.send_date, '%Y-%m') <![CDATA[ >= ]]> #{startTime}
|
AND DATE_FORMAT(w.send_date, '%Y-%m') <![CDATA[ >= ]]> #{startTime}
|
||||||
@ -35,14 +35,17 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
AND DATE_FORMAT(w.send_date, '%Y-%m') = DATE_FORMAT(#{billMonth}, '%Y-%m')
|
AND DATE_FORMAT(w.send_date, '%Y-%m') = DATE_FORMAT(#{billMonth}, '%Y-%m')
|
||||||
</if>
|
</if>
|
||||||
</if>
|
</if>
|
||||||
GROUP BY bm.start_site_code, s.site_name, DATE_FORMAT(w.send_date, '%Y-%m')
|
GROUP BY COALESCE(bm.start_site_code, w.start_site_code, w.send_site_code), s.site_name, DATE_FORMAT(w.send_date, '%Y-%m')
|
||||||
ORDER BY w.send_date,bm.start_site_code
|
ORDER BY w.send_date, COALESCE(bm.start_site_code, w.start_site_code, w.send_site_code)
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select id="selectDetailDataByMonth" parameterType="EmisTmsSiteBatchMiss" resultMap="com.xdadan.erp.emis.mapper.EmisTmsSiteBatchMissMapper.EmisTmsSiteBatchMissResult">
|
<select id="selectDetailDataByMonth" parameterType="EmisTmsSiteBatchMiss" resultMap="com.xdadan.erp.emis.mapper.EmisTmsSiteBatchMissMapper.EmisTmsSiteBatchMissResult">
|
||||||
select
|
select
|
||||||
m.id, m.bill_code, m.miss_reason, m.create_time, m.update_time, m.remark, m.del_flag,
|
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,
|
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,
|
l.line_name as line_name,
|
||||||
w.receive_country, c2.name as receive_country_name, w.send_date, w.bl_sign, w.sign_date,
|
w.receive_country, c2.name as receive_country_name, w.send_date, w.bl_sign, w.sign_date,
|
||||||
@ -63,8 +66,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
from emis_tms_site_batch_miss m
|
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_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 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 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 m.next_site_code=s3.site_code and s3.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 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_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'
|
left join emis_site s4 on w.dispatch_underling_site_code=s4.site_code and s4.del_flag='0'
|
||||||
@ -74,7 +77,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'
|
left join sys_user u on w.register_man_code=u.emp_code and u.del_flag='0'
|
||||||
WHERE m.del_flag = '0'
|
WHERE m.del_flag = '0'
|
||||||
<if test="startSiteCode != null and startSiteCode != ''">
|
<if test="startSiteCode != null and startSiteCode != ''">
|
||||||
AND m.start_site_code = #{startSiteCode}
|
AND COALESCE(m.start_site_code, w.start_site_code, w.send_site_code) = #{startSiteCode}
|
||||||
</if>
|
</if>
|
||||||
<if test="startTime != null and startTime != ''">
|
<if test="startTime != null and startTime != ''">
|
||||||
AND DATE_FORMAT(w.send_date, '%Y-%m') <![CDATA[ >= ]]> #{startTime}
|
AND DATE_FORMAT(w.send_date, '%Y-%m') <![CDATA[ >= ]]> #{startTime}
|
||||||
@ -94,7 +97,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
<select id="selectDetailDataByMonthWithPaging" resultMap="com.xdadan.erp.emis.mapper.EmisTmsSiteBatchMissMapper.EmisTmsSiteBatchMissResult">
|
<select id="selectDetailDataByMonthWithPaging" resultMap="com.xdadan.erp.emis.mapper.EmisTmsSiteBatchMissMapper.EmisTmsSiteBatchMissResult">
|
||||||
select
|
select
|
||||||
m.id, m.bill_code, m.miss_reason, m.create_time, m.update_time, m.remark, m.del_flag,
|
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,
|
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,
|
l.line_name as line_name,
|
||||||
w.receive_country, c2.name as receive_country_name, w.send_date, w.bl_sign, w.sign_date,
|
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
|
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_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 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 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 m.next_site_code=s3.site_code and s3.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 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_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'
|
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'
|
left join sys_user u on w.register_man_code=u.emp_code and u.del_flag='0'
|
||||||
WHERE m.del_flag = '0'
|
WHERE m.del_flag = '0'
|
||||||
<if test="query.startSiteCode != null and query.startSiteCode != ''">
|
<if test="query.startSiteCode != null and query.startSiteCode != ''">
|
||||||
AND m.start_site_code = #{query.startSiteCode}
|
AND COALESCE(m.start_site_code, w.start_site_code, w.send_site_code) = #{query.startSiteCode}
|
||||||
</if>
|
</if>
|
||||||
<if test="query.startTime != null and query.startTime != ''">
|
<if test="query.startTime != null and query.startTime != ''">
|
||||||
AND DATE_FORMAT(w.send_date, '%Y-%m') <![CDATA[ >= ]]> #{query.startTime}
|
AND DATE_FORMAT(w.send_date, '%Y-%m') <![CDATA[ >= ]]> #{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'
|
LEFT JOIN emis_waybill w ON m.bill_code = w.bill_code AND w.del_flag='0'
|
||||||
WHERE m.del_flag = '0'
|
WHERE m.del_flag = '0'
|
||||||
<if test="startSiteCode != null and startSiteCode != ''">
|
<if test="startSiteCode != null and startSiteCode != ''">
|
||||||
AND m.start_site_code = #{startSiteCode}
|
AND COALESCE(m.start_site_code, w.start_site_code, w.send_site_code) = #{startSiteCode}
|
||||||
</if>
|
</if>
|
||||||
<if test="startTime != null and startTime != ''">
|
<if test="startTime != null and startTime != ''">
|
||||||
AND DATE_FORMAT(w.send_date, '%Y-%m') <![CDATA[ >= ]]> #{startTime}
|
AND DATE_FORMAT(w.send_date, '%Y-%m') <![CDATA[ >= ]]> #{startTime}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user