This commit is contained in:
linfso 2025-07-01 00:38:20 +08:00
parent 15afb07131
commit c04feab249
2 changed files with 90 additions and 42 deletions

View File

@ -13,6 +13,8 @@ package com.xdadan.erp.web.emis;
import java.util.List;
import javax.servlet.http.HttpServletResponse;
import com.xdadan.erp.emis.utils.WaybillHelper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.GetMapping;
@ -56,6 +58,8 @@ public class EmisTmsCostFeeSplitController extends BaseController
public TableDataInfo list(EmisTmsCostFeeSplit emisTmsCostFeeSplit)
{
startPage();
emisTmsCostFeeSplit.setBillCode(WaybillHelper.formatQueryValue(emisTmsCostFeeSplit.getBillCode()));
List<EmisTmsCostFeeSplit> list = emisTmsCostFeeSplitService.selectEmisTmsCostFeeSplitList(emisTmsCostFeeSplit);
return getDataTable(list);
}
@ -65,6 +69,7 @@ public class EmisTmsCostFeeSplitController extends BaseController
public TableDataInfo listSimple(EmisTmsCostFeeSplit emisTmsCostFeeSplit)
{
startPage();
emisTmsCostFeeSplit.setBillCode(WaybillHelper.formatQueryValue(emisTmsCostFeeSplit.getBillCode()));
List<EmisTmsCostFeeSplit> list = emisTmsCostFeeSplitService.selectEmisTmsCostFeeSplitList(emisTmsCostFeeSplit);
return getDataTable(list);
}

View File

@ -65,49 +65,92 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<select id="selectEmisTmsCostFeeSplitList" parameterType="EmisTmsCostFeeSplit" resultMap="EmisTmsCostFeeSplitResult">
<include refid="selectEmisTmsCostFeeSplitVo"/>
<where>
del_flag='0'
<if test="id != null "> and id = #{id}</if>
<if test="costNo != null and costNo != ''"> and cost_no=#{costNo}</if>
<if test="batchNo != null and batchNo != ''"> and batch_no=#{batchNo}</if>
<if test="feeItemId != null "> and fee_item_id = #{feeItemId}</if>
<if test="billCode != null and billCode != ''"> and bill_code=#{billCode}</if>
<if test="mainBillCode != null and mainBillCode != ''"> and main_bill_code=#{mainBillCode}</if>
<if test="sendPlace != null and sendPlace != ''"> and send_place=#{sendPlace}</if>
<if test="destPlace != null and destPlace != ''"> and dest_place=#{destPlace}</if>
<if test="billMonth != null and billMonth != ''"> and bill_month=#{billMonth}</if>
<if test="tradeDate != null "> and trade_date = #{tradeDate}</if>
<if test="transSignNo != null and transSignNo != ''"> and trans_sign_no=#{transSignNo}</if>
<if test="supplierCode != null and supplierCode != ''"> and supplier_code=#{supplierCode}</if>
<if test="feeType != null and feeType != ''"> and fee_type=#{feeType}</if>
<if test="splitType != null and splitType != ''"> and split_type=#{splitType}</if>
<if test="splitValue != null "> and split_value = #{splitValue}</if>
<if test="costFee != null "> and cost_fee = #{costFee}</if>
<if test="totalVolume != null "> and total_volume = #{totalVolume}</if>
<if test="billWeight != null "> and bill_weight = #{billWeight}</if>
<if test="transWeight != null "> and trans_weight = #{transWeight}</if>
<if test="transVolume != null "> and trans_volume = #{transVolume}</if>
<if test="transCostFee != null "> and trans_cost_fee = #{transCostFee}</if>
<if test="currency != null and currency != ''"> and currency=#{currency}</if>
<if test="currecyToCnyRate != null "> and currecy_to_cny_rate = #{currecyToCnyRate}</if>
<if test="cnyFee != null "> and cny_fee = #{cnyFee}</if>
<if test="feeItemId != null "> and fee_item_id = #{feeItemId}</if>
<if test="price != null "> and price = #{price}</if>
<if test="calcExpr != null and calcExpr != ''"> and calc_expr like concat('%', #{calcExpr}, '%')</if>
<if test="calcRemark != null and calcRemark != ''"> and calc_remark like concat('%', #{calcRemark}, '%')</if>
<if test="blManual != null and blManual != ''"> and bl_manual=#{blManual}</if>
<if test="blVirtual != null and blVirtual != ''"> and bl_virtual=#{blVirtual}</if>
<if test="blSub != null and blSub != ''"> and bl_sub=#{blSub}</if>
<if test="remark != null and remark != ''"> and remark like concat('%', #{remark}, '%')</if>
<if test="delFlag != null and delFlag != ''"> and del_flag like concat('%', #{delFlag}, '%')</if>
<if test="createBy != null and createBy != ''"> and create_by like concat('%', #{createBy}, '%')</if>
<if test="createTime != null "> and create_time = #{createTime}</if>
<if test="updateBy != null and updateBy != ''"> and update_by like concat('%', #{updateBy}, '%')</if>
<if test="updateTime != null "> and update_time = #{updateTime}</if>
<if test="createSite != null and createSite != ''"> and create_site like concat('%', #{createSite}, '%')</if>
<if test="updateSite != null and updateSite != ''"> and update_site like concat('%', #{updateSite}, '%')</if>
SELECT
a.id,
a.cost_no,
a.batch_no,
a.bill_code,
a.main_bill_code,
a.send_place,
a.dest_place,
a.bill_month,
a.trade_date,
a.trans_sign_no,
a.supplier_code,
a.fee_type,
a.split_type,
a.split_value,
a.cost_fee,
a.total_volume,
a.bill_weight,
a.trans_weight,
a.trans_volume,
a.trans_cost_fee,
a.currency,
a.currecy_to_cny_rate,
a.cny_fee,
a.fee_item_id,
a.price,
a.calc_expr,
a.calc_remark,
a.bl_manual,
a.bl_virtual,
a.bl_sub,
a.remark,
a.del_flag,
a.create_by,
a.create_time,
a.update_by,
a.update_time,
a.create_site,
a.update_site
FROM
emis_tms_cost_fee_split a,
emis_waybill b
<where>
a.del_flag='0' and b.del_flag='0' and a.bill_code=b.bill_code
<if test="id != null "> and a.id = #{id}</if>
<if test="costNo != null and costNo != ''"> and a.cost_no=#{costNo}</if>
<if test="batchNo != null and batchNo != ''"> and a.batch_no=#{batchNo}</if>
<if test="feeItemId != null "> and a.fee_item_id = #{feeItemId}</if>
<if test="billCode != null and billCode != ''">
and ( FIND_IN_SET(a.main_bill_code,#{billCode}) or a.main_bill_code like concat('%', #{billCode}, '%') )
</if>
<if test="sendPlace != null and sendPlace != ''"> and a.send_place=#{sendPlace}</if>
<if test="destPlace != null and destPlace != ''"> and a.dest_place=#{destPlace}</if>
<if test="billMonth != null and billMonth != ''"> and a.bill_month=#{billMonth}</if>
<if test="tradeDate != null "> and a.trade_date = #{tradeDate}</if>
<if test="transSignNo != null and transSignNo != ''"> and a.trans_sign_no=#{transSignNo}</if>
<if test="supplierCode != null and supplierCode != ''"> and a.supplier_code=#{supplierCode}</if>
<if test="feeType != null and feeType != ''"> and a.fee_type=#{feeType}</if>
<if test="splitType != null and splitType != ''"> and a.split_type=#{splitType}</if>
<if test="splitValue != null "> and a.split_value = #{splitValue}</if>
<if test="costFee != null "> and a.cost_fee = #{costFee}</if>
<if test="totalVolume != null "> and a.total_volume = #{totalVolume}</if>
<if test="billWeight != null "> and a.bill_weight = #{billWeight}</if>
<if test="transWeight != null "> and a.trans_weight = #{transWeight}</if>
<if test="transVolume != null "> and a.trans_volume = #{transVolume}</if>
<if test="transCostFee != null "> and a.trans_cost_fee = #{transCostFee}</if>
<if test="currency != null and currency != ''"> and a.currency=#{currency}</if>
<if test="currecyToCnyRate != null "> and a.currecy_to_cny_rate = #{currecyToCnyRate}</if>
<if test="cnyFee != null "> and a.cny_fee = #{cnyFee}</if>
<if test="feeItemId != null "> and a.fee_item_id = #{feeItemId}</if>
<if test="price != null "> and a.price = #{price}</if>
<if test="calcExpr != null and calcExpr != ''"> and a.calc_expr like concat('%', #{calcExpr}, '%')</if>
<if test="calcRemark != null and calcRemark != ''"> and a.calc_remark like concat('%', #{calcRemark}, '%')</if>
<if test="blManual != null and blManual != ''"> and a.bl_manual=#{blManual}</if>
<if test="blVirtual != null and blVirtual != ''"> and a.bl_virtual=#{blVirtual}</if>
<if test="blSub != null and blSub != ''"> and a.bl_sub=#{blSub}</if>
<if test="remark != null and remark != ''"> and a.remark like concat('%', #{remark}, '%')</if>
<if test="params.beginSendDate != null and params.beginSendDate != ''">
and b.send_date <![CDATA[ >= ]]> #{params.beginSendDate}
</if>
<if test="params.endSendDate != null and params.endSendDate != ''">
and b.send_date <![CDATA[ <= ]]> #{params.endSendDate}
</if>
</where>
<if test="params.blTradeTimeAsc != null and params.blTradeTimeAsc==1 ">
order by bill_code asc,trade_date asc