md
This commit is contained in:
parent
979d35073f
commit
ae783ac894
@ -11,13 +11,17 @@
|
||||
|
||||
package com.xdadan.erp.web.emis;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
import cn.hutool.json.JSONObject;
|
||||
import com.xdadan.erp.common.annotation.filter.jackson.JacksonFilter;
|
||||
import com.xdadan.erp.emis.domain.EmisWaybill;
|
||||
import com.xdadan.erp.emis.utils.WaybillHelper;
|
||||
import org.apache.commons.collections.CollectionUtils;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
@ -63,20 +67,20 @@ public class EmisCommissionDtlController extends BaseController
|
||||
// "id","feeType","money","billMonth", "billType","billCode","quoteId","quoteName"
|
||||
// ,"exprId","calcExpr","feeRemark","empCode","empName","createTime"
|
||||
// },value= EmisCommissionDtl.class,type= JacksonFilter.JscksonFilterType.RESPONSE)
|
||||
@JacksonFilter(include= {
|
||||
"waybillDetail.sendSiteName","waybillDetail.dispatchUnderlingSiteName"
|
||||
,"waybillDetail.sendCountryName","waybillDetail.receiveCountryName"
|
||||
,"waybillDetail.paymentType","waybillDetail.sendDate"
|
||||
,"waybillDetail.sendCompany","waybillDetail.transLineTypeName"
|
||||
,"waybillDetail.productTypeName","waybillDetail.timeType"
|
||||
,"waybillDetail.sendName","waybillDetail.parcelQty"
|
||||
,"waybillDetail.billWeight","waybillDetail.totalVolume"
|
||||
,"waybillDetail.volumeWeight","waybillDetail.settlementWeight"
|
||||
,"waybillDetail.billFee","waybillDetail.realFee"
|
||||
,"waybillDetail.freight","waybillDetail.paymentStatus"
|
||||
,"waybillDetail.feeRemark","waybillDetail.remark"
|
||||
,"waybillDetail.payee","waybillDetail.salesmen"
|
||||
},value= EmisCommissionDtl.class,type= JacksonFilter.JscksonFilterType.RESPONSE)
|
||||
// @JacksonFilter(include= {
|
||||
// "waybillDetail.sendSiteName","waybillDetail.dispatchUnderlingSiteName"
|
||||
// ,"waybillDetail.sendCountryName","waybillDetail.receiveCountryName"
|
||||
// ,"waybillDetail.paymentType","waybillDetail.sendDate"
|
||||
// ,"waybillDetail.sendCompany","waybillDetail.transLineTypeName"
|
||||
// ,"waybillDetail.productTypeName","waybillDetail.timeType"
|
||||
// ,"waybillDetail.sendName","waybillDetail.parcelQty"
|
||||
// ,"waybillDetail.billWeight","waybillDetail.totalVolume"
|
||||
// ,"waybillDetail.volumeWeight","waybillDetail.settlementWeight"
|
||||
// ,"waybillDetail.billFee","waybillDetail.realFee"
|
||||
// ,"waybillDetail.freight","waybillDetail.paymentStatus"
|
||||
// ,"waybillDetail.feeRemark","waybillDetail.remark"
|
||||
// ,"waybillDetail.payee","waybillDetail.salesmen"
|
||||
// },value= EmisCommissionDtl.class,type= JacksonFilter.JscksonFilterType.RESPONSE)
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(EmisCommissionDtl emisCommissionDtl)
|
||||
{
|
||||
@ -93,6 +97,77 @@ public class EmisCommissionDtlController extends BaseController
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出JSON数据
|
||||
* @param emisCommissionDtl
|
||||
* @return
|
||||
*/
|
||||
@GetMapping("/mapDtlList")
|
||||
public TableDataInfo mapDtlList(EmisCommissionDtl emisCommissionDtl)
|
||||
{
|
||||
startPage();
|
||||
if(!StringUtils.isEmpty(emisCommissionDtl.getBillCode())){
|
||||
emisCommissionDtl.setBillCode(WaybillHelper.formatQueryValue(emisCommissionDtl.getBillCode()));
|
||||
String[] billCodeSortList = emisCommissionDtl.getBillCode().split(",");
|
||||
if(billCodeSortList.length>1){
|
||||
emisCommissionDtl.getParams().put("billCodeSortList", Arrays.asList(billCodeSortList));
|
||||
}
|
||||
}
|
||||
|
||||
List<Map> list = emisCommissionDtlService.selectCommissionDtlMapList(emisCommissionDtl);
|
||||
|
||||
// if(!CollectionUtils.isEmpty(list)) {
|
||||
// // 数据压缩过滤
|
||||
// List<JSONObject> expList = new ArrayList<>();
|
||||
// for (EmisCommissionDtl item:list) {
|
||||
// JSONObject objItem = new JSONObject();
|
||||
//
|
||||
// objItem.putOpt("id",item.getId());
|
||||
// objItem.putOpt("feeType",item.getFeeType());
|
||||
// objItem.putOpt("money",item.getMoney());
|
||||
// objItem.putOpt("billMonth",item.getBillMonth());
|
||||
// objItem.putOpt("billType",item.getBillType());
|
||||
// objItem.putOpt("billCode",item.getBillCode());
|
||||
// objItem.putOpt("quoteId",item.getQuoteId());
|
||||
// objItem.putOpt("quoteName",item.getQuoteName());
|
||||
// objItem.putOpt("exprId",item.getExprId());
|
||||
// objItem.putOpt("calcExpr",item.getCalcExpr());
|
||||
// objItem.putOpt("feeRemark",item.getFeeRemark());
|
||||
// objItem.putOpt("empCode",item.getEmpCode());
|
||||
// objItem.putOpt("empName",item.getEmpName());
|
||||
// objItem.putOpt("createTime",item.getCreateTime());
|
||||
//
|
||||
// EmisWaybill emisItem=item.getWaybillDetail();
|
||||
// JSONObject objWaybillItem= new JSONObject();
|
||||
// objWaybillItem.putOpt("sendSiteName",emisItem.getSendSiteName());
|
||||
// objWaybillItem.putOpt("dispatchUnderlingSiteName",emisItem.getSendSiteName());
|
||||
// objWaybillItem.putOpt("sendSiteName",emisItem.getSendSiteName());
|
||||
// objWaybillItem.putOpt("sendSiteName",emisItem.getSendSiteName());
|
||||
// objWaybillItem.putOpt("sendSiteName",emisItem.getSendSiteName());
|
||||
//
|
||||
// // "waybillDetail.sendSiteName","waybillDetail.dispatchUnderlingSiteName"
|
||||
//// ,"waybillDetail.sendCountryName","waybillDetail.receiveCountryName"
|
||||
//// ,"waybillDetail.paymentType","waybillDetail.sendDate"
|
||||
//// ,"waybillDetail.sendCompany","waybillDetail.transLineTypeName"
|
||||
//// ,"waybillDetail.productTypeName","waybillDetail.timeType"
|
||||
//// ,"waybillDetail.sendName","waybillDetail.parcelQty"
|
||||
//// ,"waybillDetail.billWeight","waybillDetail.totalVolume"
|
||||
//// ,"waybillDetail.volumeWeight","waybillDetail.settlementWeight"
|
||||
//// ,"waybillDetail.billFee","waybillDetail.realFee"
|
||||
//// ,"waybillDetail.freight","waybillDetail.paymentStatus"
|
||||
//// ,"waybillDetail.feeRemark","waybillDetail.remark"
|
||||
//// ,"waybillDetail.payee","waybillDetail.salesmen"
|
||||
//
|
||||
//
|
||||
//
|
||||
// }
|
||||
// }
|
||||
|
||||
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 按批次查询明细
|
||||
* @param emisCommissionDtl
|
||||
|
||||
@ -11,6 +11,8 @@
|
||||
package com.xdadan.erp.emis.mapper;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.xdadan.erp.emis.domain.EmisCommissionDtl;
|
||||
/**
|
||||
@ -36,6 +38,7 @@ public interface EmisCommissionDtlMapper extends BaseMapper<EmisCommissionDtl>
|
||||
*/
|
||||
public List<EmisCommissionDtl> selectEmisCommissionDtlList(EmisCommissionDtl emisCommissionDtl);
|
||||
|
||||
public List<Map> selectCommissionDtlMapList(EmisCommissionDtl emisCommissionDtl);
|
||||
|
||||
/**
|
||||
* 批次提成明细
|
||||
|
||||
@ -10,6 +10,8 @@
|
||||
package com.xdadan.erp.emis.service;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import com.xdadan.erp.emis.domain.EmisCommissionDtl;
|
||||
|
||||
/**
|
||||
@ -35,6 +37,8 @@ public interface IEmisCommissionDtlService
|
||||
*/
|
||||
public List<EmisCommissionDtl> selectEmisCommissionDtlList(EmisCommissionDtl emisCommissionDtl);
|
||||
|
||||
public List<Map> selectCommissionDtlMapList(EmisCommissionDtl emisCommissionDtl);
|
||||
|
||||
/**
|
||||
* 批次提成明细
|
||||
* @param emisCommissionDtl
|
||||
|
||||
@ -11,6 +11,8 @@
|
||||
package com.xdadan.erp.emis.service.impl;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import com.xdadan.erp.emis.domain.EmisCommissionDtl;
|
||||
@ -54,6 +56,13 @@ public class EmisCommissionDtlServiceImpl implements IEmisCommissionDtlService
|
||||
return emisCommissionDtlMapper.selectEmisCommissionDtlList(emisCommissionDtl);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<Map> selectCommissionDtlMapList(EmisCommissionDtl emisCommissionDtl)
|
||||
{
|
||||
return emisCommissionDtlMapper.selectCommissionDtlMapList(emisCommissionDtl);
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 查询批次提成明细表列表
|
||||
|
||||
@ -86,6 +86,88 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
order by create_time desc
|
||||
</select>
|
||||
|
||||
<select id="selectCommissionDtlMapList" parameterType="EmisCommissionDtl" resultType="map">
|
||||
SELECT
|
||||
a.id,
|
||||
a.fee_type AS feeType,
|
||||
a.money,
|
||||
a.bill_month AS billMonth,
|
||||
a.bill_type AS billType,
|
||||
a.bill_code AS billCode,
|
||||
a.quote_id AS quoteId,
|
||||
a.quote_name AS quoteName,
|
||||
a.expr_id AS exprId,
|
||||
a.calc_expr AS calcExpr,
|
||||
a.fee_remark AS feeRemark,
|
||||
a.emp_code AS empCode,
|
||||
a.emp_name AS empName,
|
||||
a.remark,
|
||||
a.del_flag AS delFlag,
|
||||
a.create_time AS createTime,
|
||||
b.payment_type AS paymentType,
|
||||
b.send_date AS sendDate,
|
||||
b.send_company AS sendCompany,
|
||||
b.time_type AS timeType,
|
||||
b.send_name AS sendName,
|
||||
b.parcel_qty AS parcelQty,
|
||||
b.bill_weight AS billWeight,
|
||||
b.total_volume AS totalVolume,
|
||||
b.volume_weight AS volumeWeight,
|
||||
b.settlement_weight AS settlementWeight,
|
||||
b.real_fee AS realFee,
|
||||
b.freight,
|
||||
b.payment_status AS paymentStatus,
|
||||
b.fee_remark AS waybillFeeRemark,
|
||||
b.remark as waybillRemark,
|
||||
b.payee,
|
||||
b.salesmen,
|
||||
c.site_name AS sendSiteName,
|
||||
d.site_name AS dispatchUnderlingSiteName,
|
||||
e.NAME AS sendCountryName,
|
||||
f.NAME AS receiveCountryName,
|
||||
g.line_name AS transLineTypeName,
|
||||
h.prod_name AS productTypeName
|
||||
FROM
|
||||
emis_commission_dtl a,
|
||||
emis_waybill b
|
||||
LEFT JOIN emis_site c ON b.send_site_code = c.site_code AND c.del_flag = '0'
|
||||
LEFT JOIN emis_site d ON b.destination_center_code = d.site_code AND d.del_flag = '0'
|
||||
LEFT JOIN emis_country e ON b.send_country = e.CODE AND e.del_flag = '0'
|
||||
LEFT JOIN emis_country f ON b.receive_country = f.CODE AND f.del_flag = '0'
|
||||
LEFT JOIN emis_trans_line g ON b.trans_line_type = g.line_code AND g.del_flag = '0'
|
||||
LEFT JOIN emis_trans_product h ON b.product_type = h.prod_code AND h.del_flag = '0'
|
||||
<where>
|
||||
a.del_flag='0' and a.bill_code=b.bill_code and bill_type='1'
|
||||
<if test="id != null "> and a.id = #{id}</if>
|
||||
<if test="feeType != null and feeType != ''"> and a.fee_type=#{feeType}</if>
|
||||
<if test="money != null "> and a.money = #{money}</if>
|
||||
<if test="billMonth != null and billMonth != ''"> and a.bill_month=#{billMonth} </if>
|
||||
<if test="billCode != null and billCode != ''"> and ( FIND_IN_SET(a.bill_code,#{billCode}) or a.bill_code like concat('%', #{billCode}, '%') )</if>
|
||||
<if test="feeRemark != null and feeRemark != ''"> and a.fee_remark like concat('%', #{feeRemark}, '%')</if>
|
||||
<if test="empCode != null and empCode != ''"> and a.emp_code=#{empCode}</if>
|
||||
<if test="empName != null and empName != ''"> and a.emp_name=#{empName}</if>
|
||||
<if test="blConfirmCenter != null and blConfirmCenter != ''"> and a.bl_confirm_center=#{blConfirmCenter}</if>
|
||||
<if test="confirmCenterDate != null "> and a.confirm_center_date = #{confirmCenterDate}</if>
|
||||
<if test="confirmCenterNote != null and confirmCenterNote != ''"> and a.confirm_center_note like concat('%', #{confirmCenterNote}, '%')</if>
|
||||
<if test="confirmCenterManCode != null and confirmCenterManCode != ''"> and a.confirm_center_man_code= #{confirmCenterManCode}</if>
|
||||
<if test="confirmCenterCode != null and confirmCenterCode != ''"> and a.confirm_center_code=#{confirmCenterCode}</if>
|
||||
<if test="blConfirmSite != null and blConfirmSite != ''"> and a.bl_confirm_site=#{blConfirmSite}</if>
|
||||
<if test="confirmSiteDate != null "> and a.confirm_site_date = #{confirmSiteDate}</if>
|
||||
<if test="confirmSiteManCode != null and confirmSiteManCode != ''"> and a.confirm_site_man_code=#{confirmSiteManCode}</if>
|
||||
<if test="confirmSiteNote != null and confirmSiteNote != ''"> and a.confirm_site_note like concat('%', #{confirmSiteNote}, '%')</if>
|
||||
<if test="confirmSiteCode != null and confirmSiteCode != ''"> and a.confirm_site_code=#{confirmSiteCode}</if>
|
||||
<if test="remark != null and remark != ''"> and a.remark like concat('%', #{remark}, '%')</if>
|
||||
<if test="delFlag != null and delFlag != ''"> and a.del_flag like concat('%', #{delFlag}, '%')</if>
|
||||
<if test="createBy != null and createBy != ''"> and a.create_by like concat('%', #{createBy}, '%')</if>
|
||||
<if test="createTime != null "> and a.create_time = #{createTime}</if>
|
||||
<if test="updateBy != null and updateBy != ''"> and a.update_by like concat('%', #{updateBy}, '%')</if>
|
||||
<if test="updateTime != null "> and a.update_time = #{updateTime}</if>
|
||||
<if test="createSite != null and createSite != ''"> and a.create_site like concat('%', #{createSite}, '%')</if>
|
||||
<if test="updateSite != null and updateSite != ''"> and a.update_site like concat('%', #{updateSite}, '%')</if>
|
||||
</where>
|
||||
order by a.create_time desc
|
||||
</select>
|
||||
|
||||
|
||||
<select id="selectBatchCommissionDtlList" parameterType="EmisCommissionDtl" resultMap="EmisBatchCommissionDtlResult">
|
||||
<include refid="selectEmisCommissionDtlVo"/>
|
||||
|
||||
Loading…
Reference in New Issue
Block a user