Merge branch 'master' of http://git.xdadan.loc/tanex/emis-service
This commit is contained in:
commit
f386e6bdf0
@ -74,7 +74,7 @@ public class EmisMonthpayAccountController extends EmisBaseController
|
||||
* @param emisCustomerUser
|
||||
* @return
|
||||
*/
|
||||
@JacksonFilter(include= {"customerCode","custNo","custName","payee","salesmen","payeeName","salesmenName"},value= EmisCustomerUser.class,type= JacksonFilter.JscksonFilterType.RESPONSE)
|
||||
@JacksonFilter(include= {"customerCode","custNo","custName","payee","salesmen","payeeName","salesmenName","status"},value= EmisCustomerUser.class,type= JacksonFilter.JscksonFilterType.RESPONSE)
|
||||
@GetMapping("/listAllSimple")
|
||||
public TableDataInfo listAllSimple(EmisCustomerUser emisCustomerUser)
|
||||
{
|
||||
|
||||
@ -64,7 +64,7 @@ public class EmisRegionController extends EmisBaseController
|
||||
}
|
||||
|
||||
// @PreAuthorize("@ss.hasPermi('emis:emisRegion:list')")
|
||||
@JacksonFilter(include= {"id","regionCode","regionName","regionNameEn","parentCode"},value= EmisRegion.class,type= JacksonFilter.JscksonFilterType.RESPONSE)
|
||||
@JacksonFilter(include= {"id","regionCode","regionName","regionNameEn","parentCode","countryCode"},value= EmisRegion.class,type= JacksonFilter.JscksonFilterType.RESPONSE)
|
||||
@GetMapping("/listSimple")
|
||||
public TableDataInfo listSimple(EmisRegion emisRegion)
|
||||
{
|
||||
|
||||
@ -54,7 +54,7 @@ public class EmisTransProductController extends EmisBaseController
|
||||
/**
|
||||
* 查询运输产品类型列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('emis:emisTransProduct:list')")
|
||||
// @PreAuthorize("@ss.hasPermi('emis:emisTransProduct:list')")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(EmisTransProduct emisTransProduct)
|
||||
{
|
||||
|
||||
@ -306,6 +306,7 @@ public class EmisWaybillAjustApplyController extends EmisBaseController
|
||||
EmisWaybillAjustApply emisWaybillAjustApply = new EmisWaybillAjustApply();
|
||||
emisWaybillAjustApply.setId(id);
|
||||
emisWaybillAjustApply.setDestConfirmNote(spr.getDestConfirmNote());
|
||||
emisWaybillAjustApply.setCenterConfirmNote(spr.getCenterConfirmNote());
|
||||
emisWaybillAjustApplyService.auditCenterNoPass(emisWaybillAjustApply);
|
||||
|
||||
}catch (Exception ex){
|
||||
|
||||
@ -59,6 +59,8 @@ public class EmisCommissionQuote extends BaseEntity
|
||||
private String feeType;
|
||||
/* 计算类型 票,重量 emis_commission_type */
|
||||
private String calcType;
|
||||
/* 重量计算方式,1:按照结算重量计算计提,2:按照实际重量计算计提 */
|
||||
private String calcWeightType;
|
||||
/* 岗位类型:emis_commission_post */
|
||||
private String postType;
|
||||
/* 快递类型:emis_biz_shipping_method */
|
||||
|
||||
@ -2619,8 +2619,14 @@ public class EmisBaseService {
|
||||
|
||||
order.put("kdgs", "TANEX");
|
||||
|
||||
// 获取起始网点
|
||||
EmisSite sendSite = getSiteByCode(waybill.getSendSiteCode());
|
||||
// 获取始发网点
|
||||
if (StringUtils.isBlank(waybill.getStartSiteCode())) {
|
||||
waybill.setStartSiteCode(waybill.getSendSiteCode());
|
||||
}
|
||||
if(StringUtils.isBlank(waybill.getStartSiteName())){
|
||||
waybill.setStartSiteName(waybill.getSendSiteName());
|
||||
}
|
||||
EmisSite startSite = getSiteByCode(waybill.getStartSiteCode());
|
||||
|
||||
// 计算三段码 目的网点2字码+目的地名称
|
||||
String destSite2Code = "";
|
||||
@ -2636,7 +2642,7 @@ public class EmisBaseService {
|
||||
destName=destination.getDestName();
|
||||
}
|
||||
|
||||
String package3dm=sendSite.getSiteName()+'-'+destName;
|
||||
String package3dm=startSite.getSiteName()+'-'+destName;
|
||||
String packageWJC=destSite2Code;
|
||||
String pdfInfo="["+package3dm+"]["+packageWJC+"]";
|
||||
order.put("pdfInfo", pdfInfo);
|
||||
@ -2756,8 +2762,8 @@ public class EmisBaseService {
|
||||
|
||||
extData.put("k7",WaybillHelper.removeUnSeeChar(k7));
|
||||
|
||||
extData.put("k8",WaybillHelper.removeUnSeeChar(sendSite.getSiteNameEn()));
|
||||
extData.put("k10",WaybillHelper.removeUnSeeChar(waybill.getSendSiteName()));
|
||||
extData.put("k8",WaybillHelper.removeUnSeeChar(startSite.getSiteNameEn()));
|
||||
extData.put("k10",WaybillHelper.removeUnSeeChar(waybill.getStartSiteName()));
|
||||
|
||||
extData.put("k9",WaybillHelper.removeUnSeeChar(destSite.getSiteNameEn()));
|
||||
extData.put("k11",WaybillHelper.removeUnSeeChar(destSite.getSiteName()));
|
||||
|
||||
@ -146,6 +146,10 @@ public interface IEmisWaybillService extends IDataAuditService
|
||||
public int realSubmitOrder(EmisWaybill emisWaybill) throws EmisBizError;
|
||||
|
||||
|
||||
|
||||
public void checkCountry(EmisWaybill emisWaybill) throws EmisBizError;
|
||||
|
||||
|
||||
/**
|
||||
* OMS下单
|
||||
* @param emisWaybill
|
||||
|
||||
@ -11,10 +11,7 @@
|
||||
package com.xdadan.erp.emis.service.impl;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.*;
|
||||
import java.util.concurrent.CountDownLatch;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
|
||||
@ -546,14 +543,19 @@ public class EmisCommissionProfitServiceImpl extends EmisBaseService implements
|
||||
}
|
||||
// 重量计算
|
||||
else if ("2".equals(quoteItem.getCalcType())) {
|
||||
if( isValueInExprScope(waybill.getBillWeight().doubleValue(),exprItem) ){
|
||||
calcExprStr = getCalcFeeExpStr(waybill.getBillWeight(),exprItem);
|
||||
log.info("按重量计算:计算公式:" + calcExprStr + ",重量:" + waybill.getBillWeight().stripTrailingZeros().toPlainString());
|
||||
String calcWeightType = quoteItem.getCalcWeightType();
|
||||
BigDecimal usedWeight = ("1".equals(calcWeightType))
|
||||
? waybill.getSettlementWeight()
|
||||
: waybill.getBillWeight();
|
||||
if (isValueInExprScope(usedWeight != null ? usedWeight.doubleValue() : 0.0, exprItem)) {
|
||||
calcExprStr = getCalcFeeExpStr(usedWeight, exprItem);
|
||||
log.info("按重量计算:计算公式:" + calcExprStr + ",重量:"
|
||||
+ (usedWeight != null ? usedWeight.stripTrailingZeros().toPlainString() : "0"));
|
||||
Map<String, Object> env = new HashMap<>();
|
||||
env.put("w", waybill.getBillWeight());
|
||||
env.put("w", usedWeight);
|
||||
env.put("s", exprItem.getInitialWeight());
|
||||
env.put("d", exprItem.getAdditionalWeight());
|
||||
profitMoney = Double.valueOf(AviatorEvaluator.execute(calcExp,env).toString());
|
||||
profitMoney = Double.valueOf(AviatorEvaluator.execute(calcExp, env).toString());
|
||||
}
|
||||
|
||||
}
|
||||
@ -680,14 +682,19 @@ public class EmisCommissionProfitServiceImpl extends EmisBaseService implements
|
||||
}
|
||||
// 重量计算
|
||||
else if ("2".equals(quoteItem.getCalcType())) {
|
||||
if( isValueInExprScope(waybill.getBillWeight().doubleValue(),exprItem) ) {
|
||||
calcExprStr = getCalcFeeExpStr(waybill.getBillWeight(),exprItem);
|
||||
log.info("按重量计算:计算公式:" + calcExprStr + ",重量:" + waybill.getBillWeight().stripTrailingZeros().toPlainString());
|
||||
String calcWeightType = quoteItem.getCalcWeightType();
|
||||
BigDecimal usedWeight = ("1".equals(calcWeightType))
|
||||
? waybill.getSettlementWeight()
|
||||
: waybill.getBillWeight();
|
||||
if (isValueInExprScope(usedWeight != null ? usedWeight.doubleValue() : 0.0, exprItem)) {
|
||||
calcExprStr = getCalcFeeExpStr(usedWeight, exprItem);
|
||||
log.info("按重量计算:计算公式:" + calcExprStr + ",重量:"
|
||||
+ (usedWeight != null ? usedWeight.stripTrailingZeros().toPlainString() : "0"));
|
||||
Map<String, Object> env = new HashMap<>();
|
||||
env.put("w", waybill.getBillWeight());
|
||||
env.put("w", usedWeight);
|
||||
env.put("s", exprItem.getInitialWeight());
|
||||
env.put("d", exprItem.getAdditionalWeight());
|
||||
profitMoney = Double.valueOf(AviatorEvaluator.execute(calcExp,env).toString());
|
||||
profitMoney = Double.valueOf(AviatorEvaluator.execute(calcExp, env).toString());
|
||||
}
|
||||
|
||||
}
|
||||
@ -823,15 +830,19 @@ public class EmisCommissionProfitServiceImpl extends EmisBaseService implements
|
||||
}
|
||||
// 重量计算-结算重量
|
||||
else if ("2".equals(quoteItem.getCalcType())) {
|
||||
|
||||
if( isValueInExprScope(waybill.getBillWeight().doubleValue(),exprItem) ) {
|
||||
calcExprStr = getCalcFeeExpStr(waybill.getBillWeight(),exprItem);
|
||||
log.info("按重量计算:计算公式:" + calcExprStr + ",重量:" + waybill.getBillWeight().stripTrailingZeros().toPlainString());
|
||||
String calcWeightType = quoteItem.getCalcWeightType();
|
||||
BigDecimal usedWeight = ("1".equals(calcWeightType))
|
||||
? waybill.getSettlementWeight()
|
||||
: waybill.getBillWeight();
|
||||
if (isValueInExprScope(usedWeight != null ? usedWeight.doubleValue() : 0.0, exprItem)) {
|
||||
calcExprStr = getCalcFeeExpStr(usedWeight, exprItem);
|
||||
log.info("按重量计算:计算公式:" + calcExprStr + ",重量:"
|
||||
+ (usedWeight != null ? usedWeight.stripTrailingZeros().toPlainString() : "0"));
|
||||
Map<String, Object> env = new HashMap<>();
|
||||
env.put("w", waybill.getBillWeight());
|
||||
env.put("w", usedWeight);
|
||||
env.put("s", exprItem.getInitialWeight());
|
||||
env.put("d", exprItem.getAdditionalWeight());
|
||||
profitMoney = Double.valueOf(AviatorEvaluator.execute(calcExp,env).toString());
|
||||
profitMoney = Double.valueOf(AviatorEvaluator.execute(calcExp, env).toString());
|
||||
}
|
||||
|
||||
}
|
||||
@ -975,16 +986,20 @@ public class EmisCommissionProfitServiceImpl extends EmisBaseService implements
|
||||
}
|
||||
// 重量计算
|
||||
else if ("2".equals(quoteItem.getCalcType())) {
|
||||
|
||||
if( isValueInExprScope(waybill.getBillWeight().doubleValue(),exprItem) ) {
|
||||
calcExprStr = getCalcFeeExpStr(waybill.getBillWeight(), exprItem);
|
||||
log.info("按重量计算:计算公式:" + calcExprStr + ",重量:"+waybill.getBillWeight().stripTrailingZeros().toPlainString());
|
||||
String calcWeightType = quoteItem.getCalcWeightType();
|
||||
BigDecimal usedWeight = ("1".equals(calcWeightType))
|
||||
? waybill.getSettlementWeight()
|
||||
: waybill.getBillWeight();
|
||||
if (isValueInExprScope(usedWeight != null ? usedWeight.doubleValue() : 0.0, exprItem)) {
|
||||
calcExprStr = getCalcFeeExpStr(usedWeight, exprItem);
|
||||
log.info("按重量计算:计算公式:" + calcExprStr + ",重量:"
|
||||
+ waybill.getBillWeight().stripTrailingZeros().toPlainString());
|
||||
|
||||
Map<String, Object> env = new HashMap<>();
|
||||
env.put("w", waybill.getBillWeight());
|
||||
env.put("w", usedWeight);
|
||||
env.put("s", exprItem.getInitialWeight());
|
||||
env.put("d", exprItem.getAdditionalWeight());
|
||||
profitMoney = Double.valueOf(AviatorEvaluator.execute(calcExp,env).toString());
|
||||
profitMoney = Double.valueOf(AviatorEvaluator.execute(calcExp, env).toString());
|
||||
}
|
||||
|
||||
}
|
||||
@ -1121,16 +1136,21 @@ public class EmisCommissionProfitServiceImpl extends EmisBaseService implements
|
||||
}
|
||||
// 重量计算
|
||||
else if ("2".equals(quoteItem.getCalcType())) {
|
||||
if( isValueInExprScope(waybill.getBillWeight().doubleValue(),exprItem) ) {
|
||||
calcExprStr = getCalcFeeExpStr(waybill.getBillWeight(), exprItem);
|
||||
log.info("按重量计算:计算公式:" + calcExprStr + ",重量:"+waybill.getBillWeight().stripTrailingZeros().toPlainString());
|
||||
String calcWeightType = quoteItem.getCalcWeightType();
|
||||
BigDecimal usedWeight = ("1".equals(calcWeightType))
|
||||
? waybill.getSettlementWeight()
|
||||
: waybill.getBillWeight();
|
||||
if (isValueInExprScope(usedWeight != null ? usedWeight.doubleValue() : 0.0, exprItem)) {
|
||||
calcExprStr = getCalcFeeExpStr(usedWeight, exprItem);
|
||||
log.info("按重量计算:计算公式:" + calcExprStr + ",重量:"
|
||||
+ waybill.getBillWeight().stripTrailingZeros().toPlainString());
|
||||
|
||||
Map<String, Object> env = new HashMap<>();
|
||||
env.put("w", waybill.getBillWeight());
|
||||
env.put("w", usedWeight);
|
||||
env.put("s", exprItem.getInitialWeight());
|
||||
env.put("d", exprItem.getAdditionalWeight());
|
||||
|
||||
profitMoney = Double.valueOf(AviatorEvaluator.execute(calcExp,env).toString());
|
||||
profitMoney = Double.valueOf(AviatorEvaluator.execute(calcExp, env).toString());
|
||||
}
|
||||
|
||||
|
||||
@ -1263,18 +1283,22 @@ public class EmisCommissionProfitServiceImpl extends EmisBaseService implements
|
||||
}
|
||||
// 重量计算
|
||||
else if ("2".equals(quoteItem.getCalcType())) {
|
||||
String calcWeightType = quoteItem.getCalcWeightType();
|
||||
BigDecimal usedWeight = ("1".equals(calcWeightType))
|
||||
? waybill.getSettlementWeight()
|
||||
: waybill.getBillWeight();
|
||||
if (isValueInExprScope(usedWeight != null ? usedWeight.doubleValue() : 0.0, exprItem)) {
|
||||
calcExprStr = getCalcFeeExpStr(usedWeight, exprItem);
|
||||
|
||||
if( isValueInExprScope(waybill.getBillWeight().doubleValue(),exprItem) ) {
|
||||
calcExprStr = getCalcFeeExpStr(waybill.getBillWeight(), exprItem);
|
||||
|
||||
log.info("按重量计算:计算公式:" + calcExprStr + ",重量:"+waybill.getBillWeight().stripTrailingZeros().toPlainString());
|
||||
log.info("按重量计算:计算公式:" + calcExprStr + ",重量:"
|
||||
+ waybill.getBillWeight().stripTrailingZeros().toPlainString());
|
||||
|
||||
Map<String, Object> env = new HashMap<>();
|
||||
env.put("w", waybill.getBillWeight());
|
||||
env.put("w", usedWeight);
|
||||
env.put("s", exprItem.getInitialWeight());
|
||||
env.put("d", exprItem.getAdditionalWeight());
|
||||
|
||||
profitMoney = Double.valueOf(AviatorEvaluator.execute(calcExp,env).toString());
|
||||
profitMoney = Double.valueOf(AviatorEvaluator.execute(calcExp, env).toString());
|
||||
|
||||
}
|
||||
|
||||
@ -1424,18 +1448,25 @@ public class EmisCommissionProfitServiceImpl extends EmisBaseService implements
|
||||
}
|
||||
// 重量计算
|
||||
else if ("2".equals(quoteItem.getCalcType())) {
|
||||
calcExprStr = calcExp.replaceAll("w", waybill.getBillWeight().stripTrailingZeros().toPlainString())
|
||||
String calcWeightType = quoteItem.getCalcWeightType();
|
||||
BigDecimal usedWeight = ("1".equals(calcWeightType))
|
||||
? waybill.getSettlementWeight()
|
||||
: waybill.getBillWeight();
|
||||
calcExprStr = calcExp
|
||||
.replaceAll("w",
|
||||
usedWeight != null ? usedWeight.stripTrailingZeros().toPlainString() : "0")
|
||||
.replaceAll("s", exprItem.getInitialWeight().toString())
|
||||
.replaceAll("d", exprItem.getAdditionalWeight().toString());
|
||||
|
||||
log.info("按重量计算:计算公式:" + calcExprStr + ",重量:"+waybill.getBillWeight().stripTrailingZeros().toPlainString());
|
||||
log.info("按重量计算:计算公式:" + calcExprStr + ",重量:"
|
||||
+ waybill.getBillWeight().stripTrailingZeros().toPlainString());
|
||||
|
||||
Map<String, Object> env = new HashMap<>();
|
||||
env.put("w", waybill.getBillWeight());
|
||||
env.put("w", usedWeight);
|
||||
env.put("s", exprItem.getInitialWeight());
|
||||
env.put("d", exprItem.getAdditionalWeight());
|
||||
|
||||
profitMoney = Double.valueOf(AviatorEvaluator.execute(calcExp,env).toString());
|
||||
profitMoney = Double.valueOf(AviatorEvaluator.execute(calcExp, env).toString());
|
||||
|
||||
}
|
||||
// 体积计算
|
||||
|
||||
@ -2095,8 +2095,8 @@ public class EmisTmsScanRecordServiceImpl extends EmisBaseService implements IEm
|
||||
// }
|
||||
// }
|
||||
|
||||
emisTmsScanRecord.setScanSite(emisWaybill.getSendSiteName());
|
||||
emisTmsScanRecord.setScanSiteCode(emisWaybill.getSendSiteCode());
|
||||
emisTmsScanRecord.setScanSite(emisWaybill.getStartSiteName());
|
||||
emisTmsScanRecord.setScanSiteCode(emisWaybill.getStartSiteCode());
|
||||
|
||||
String dispatchOrSendManCode = MapUtils.getString(scanDataItem,"dispatchOrSendManCode",null);
|
||||
|
||||
|
||||
@ -148,13 +148,25 @@ public class EmisTmsSiteBatchServiceImpl extends EmisBaseService implements IEmi
|
||||
|
||||
public void checkSiteBatch(EmisTmsSiteBatch oldSiteBatch, String billCode) throws EmisBizError {
|
||||
EmisWaybill emisWaybill = emisWaybillMapper.selectEmisWaybillByBillCode(billCode);
|
||||
if (Objects.nonNull(emisWaybill) && StringUtil.isNotBlank(emisWaybill.getVirtualRemark())) {
|
||||
throw new EmisBizError(EmisBizErrorType.FAIL, billCode + "已绑定虚拟单,无法录入批次");
|
||||
}
|
||||
checkVirtual(billCode, emisWaybill);
|
||||
checkTransPlanRule(oldSiteBatch, emisWaybill);
|
||||
checkUnique(oldSiteBatch, billCode);
|
||||
}
|
||||
|
||||
private static void checkVirtual(String billCode, EmisWaybill emisWaybill) throws EmisBizError {
|
||||
if (Objects.isNull(emisWaybill)) {
|
||||
return;
|
||||
}
|
||||
if ("0086".equals(emisWaybill.getSendCountry())) {
|
||||
if (StringUtil.isNotBlank(emisWaybill.getVirtualRemark())) {
|
||||
throw new EmisBizError(EmisBizErrorType.FAIL, billCode + "已绑定虚拟单,无法录入批次");
|
||||
}
|
||||
}
|
||||
if ("0086".equals(emisWaybill.getReceiveCountry()) && "1".equals(emisWaybill.getBlVirtual())) {
|
||||
throw new EmisBizError(EmisBizErrorType.FAIL, billCode + "返货虚拟单,无法录入批次");
|
||||
}
|
||||
}
|
||||
|
||||
private void checkTransPlanRule(EmisTmsSiteBatch oldSiteBatch, EmisWaybill emisWaybill) throws EmisBizError {
|
||||
EmisTransPlanRule emisTransPlanRule = new EmisTransPlanRule();
|
||||
emisTransPlanRule.setStartSiteCode(oldSiteBatch.getStartSiteCode());
|
||||
|
||||
@ -134,6 +134,8 @@ public class EmisWaybillAjustApplyServiceImpl extends EmisBaseService implements
|
||||
// 检查月结客户首次签约日期,首次签约之前开的不允许修改
|
||||
checkFirstSigningDay(emisWaybillOld, getEmisWaybillNewFromJson(emisWaybillAjustApply));
|
||||
|
||||
emisWaybillService.checkCountry(getEmisWaybillNewFromJson(emisWaybillAjustApply));
|
||||
|
||||
// 检查月结/现金客户额度
|
||||
// bug:1657 调整后逻辑:单证部同事 员工表标识“单证专属”岗位登记的网点费用申请,不用判断 现金额度和月结客户额度
|
||||
boolean isDZZS=checkIsDZZS(emisWaybillAjustApply.getApplyManCode());
|
||||
|
||||
@ -3287,13 +3287,17 @@ public class EmisWaybillServiceImpl extends EmisBaseService implements IEmisWayb
|
||||
}
|
||||
}
|
||||
|
||||
private void checkCountry(EmisWaybill emisWaybillSave) throws EmisBizError {
|
||||
public void checkCountry(EmisWaybill emisWaybillSave) throws EmisBizError {
|
||||
EmisTransLine emisTransLine = new EmisTransLine();
|
||||
emisTransLine.setLineCode(emisWaybillSave.getTransLineType());
|
||||
List<EmisTransLine> emisTransLines = emisTransLineMapper.selectEmisTransLineList(emisTransLine);
|
||||
if(CollectionUtil.isEmpty(emisTransLines)){
|
||||
EmisSite siteByCode = getSiteByCode(emisWaybillSave.getStartSiteCode());
|
||||
if(CollectionUtil.isEmpty(emisTransLines)||Objects.isNull(siteByCode)){
|
||||
return;
|
||||
}
|
||||
if(!siteByCode.getCountryCode().equals(emisTransLines.get(0).getFromCountry())){
|
||||
throw new EmisBizError(EmisBizErrorType.PARAM_ERROR, "始发网点与所选线路不匹配" );
|
||||
}
|
||||
if(emisWaybillSave.getSendCountry().equals(emisTransLines.get(0).getFromCountry())){
|
||||
return;
|
||||
}
|
||||
@ -3511,6 +3515,7 @@ public class EmisWaybillServiceImpl extends EmisBaseService implements IEmisWayb
|
||||
checkFeeWaybill.setTotalVolume(emisWaybillSave.getTotalVolume());
|
||||
|
||||
checkFeeWaybill.setSendSiteCode(emisWaybillSave.getSendSiteCode());
|
||||
checkFeeWaybill.setStartSiteCode(emisWaybillSave.getStartSiteCode());
|
||||
checkFeeWaybill.setDispatchUnderlingSiteCode(emisWaybillSave.getDispatchUnderlingSiteCode());
|
||||
checkFeeWaybill.setCustomsClear(emisWaybillSave.getCustomsClear());
|
||||
checkFeeWaybill.setCustomsEclaration(emisWaybillSave.getCustomsEclaration());
|
||||
@ -3899,9 +3904,13 @@ public class EmisWaybillServiceImpl extends EmisBaseService implements IEmisWayb
|
||||
emisWaybill.setSendDate(new Date());
|
||||
}
|
||||
|
||||
if (StringUtils.isBlank(emisWaybill.getStartSiteCode())) {
|
||||
emisWaybill.setStartSiteCode(emisWaybill.getSendSiteCode());
|
||||
}
|
||||
|
||||
// bug: 1704 按照运单号开单日期去报价表抓取对应的报价进行计算
|
||||
List<EmisQuotePrice> emisQuotePriceList=getValidQuotePriceList(emisWaybill.getTransLineType(),emisWaybill.getProductType(),
|
||||
emisWaybill.getSendSiteCode(),emisWaybill.getDispatchUnderlingSiteCode(),
|
||||
emisWaybill.getStartSiteCode(),emisWaybill.getDispatchUnderlingSiteCode(),
|
||||
emisWaybill.getCalcFeeType(),emisWaybill.getCustomerCode(),emisWaybill.getCustNo(),emisWaybill.getSendDate()
|
||||
);
|
||||
|
||||
|
||||
@ -16,6 +16,7 @@
|
||||
<result property="country" column="country" />
|
||||
<result property="feeType" column="fee_type" />
|
||||
<result property="calcType" column="calc_type" />
|
||||
<result property="calcWeightType" column="calc_weight_type" />
|
||||
<result property="postType" column="post_type" />
|
||||
<result property="transType" column="trans_type" />
|
||||
<result property="blOpen" column="bl_open" />
|
||||
@ -37,7 +38,7 @@
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectEmisCommissionQuoteVo">
|
||||
select quote_id, quote_code, quote_name, trans_line_code, send_site_code, next_site_code, prod_code, from_country, country, fee_type, calc_type, post_type, trans_type, bl_open, emp_code, emp_name, start_date, end_date, priority_level, remark, tenant_id, del_flag, create_by, create_time, update_by, update_time, create_site, update_site from emis_commission_quote
|
||||
select quote_id, quote_code, quote_name, trans_line_code, send_site_code, next_site_code, prod_code, from_country, country, fee_type, calc_type, calc_weight_type, post_type, trans_type, bl_open, emp_code, emp_name, start_date, end_date, priority_level, remark, tenant_id, del_flag, create_by, create_time, update_by, update_time, create_site, update_site from emis_commission_quote
|
||||
</sql>
|
||||
|
||||
<select id="selectEmisCommissionQuoteList" parameterType="EmisCommissionQuote" resultMap="EmisCommissionQuoteResult">
|
||||
@ -56,6 +57,7 @@
|
||||
|
||||
<if test="feeType != null and feeType != ''"> and fee_type=#{feeType}</if>
|
||||
<if test="calcType != null and calcType != ''"> and calc_type=#{calcType}</if>
|
||||
<if test="calcWeightType != null and calcWeightType != ''"> and calc_weight_type=#{calcWeightType}</if>
|
||||
<if test="postType != null and postType != ''"> and post_type=#{postType}</if>
|
||||
<if test="transType != null and transType != ''"> and ( FIND_IN_SET(#{transType},trans_type) )</if>
|
||||
<if test="blOpen != null and blOpen != ''"> and bl_open=#{blOpen}</if>
|
||||
@ -94,6 +96,7 @@
|
||||
|
||||
<if test="feeType != null and feeType != ''"> and fee_type=#{feeType}</if>
|
||||
<if test="calcType != null and calcType != ''"> and calc_type=#{calcType}</if>
|
||||
<if test="calcWeightType != null and calcWeightType != ''"> and calc_weight_type=#{calcWeightType}</if>
|
||||
<if test="postType != null and postType != ''"> and post_type=#{postType}</if>
|
||||
<if test="transType != null and transType != ''"> and ( FIND_IN_SET(#{transType},trans_type) or trans_type='-1') </if>
|
||||
<if test="blOpen != null and blOpen != ''"> and bl_open=#{blOpen}</if>
|
||||
@ -119,6 +122,7 @@
|
||||
and country = #{country}
|
||||
and fee_type = #{feeType}
|
||||
and calc_type = #{calcType}
|
||||
and calc_weight_type = #{calcWeightType}
|
||||
and post_type = #{postType}
|
||||
and trans_type = #{transType}
|
||||
and bl_open = #{blOpen}
|
||||
@ -140,7 +144,7 @@
|
||||
</select>
|
||||
|
||||
<select id="selectEmisCommissionQuoteByQuoteId" parameterType="Long" resultMap="EmisCommissionQuoteResult">
|
||||
select quote_id, quote_code, quote_name, trans_line_code, send_site_code, next_site_code, prod_code, from_country, country, fee_type, calc_type, post_type, trans_type, bl_open, emp_code, emp_name, start_date, end_date, priority_level, remark, tenant_id, del_flag, create_by, create_time, update_by, update_time, create_site, update_site
|
||||
select quote_id, quote_code, quote_name, trans_line_code, send_site_code, next_site_code, prod_code, from_country, country, fee_type, calc_type, calc_weight_type, post_type, trans_type, bl_open, emp_code, emp_name, start_date, end_date, priority_level, remark, tenant_id, del_flag, create_by, create_time, update_by, update_time, create_site, update_site
|
||||
from emis_commission_quote a
|
||||
where a.quote_id = #{quoteId}
|
||||
</select>
|
||||
@ -159,6 +163,7 @@
|
||||
<if test="country != null and country != ''">country,</if>
|
||||
<if test="feeType != null and feeType != ''">fee_type,</if>
|
||||
<if test="calcType != null and calcType != ''">calc_type,</if>
|
||||
<if test="calcWeightType != null and calcWeightType != ''">calc_weight_type,</if>
|
||||
<if test="postType != null and postType != ''">post_type,</if>
|
||||
<if test="transType != null and transType != ''">trans_type,</if>
|
||||
<if test="blOpen != null and blOpen != ''">bl_open,</if>
|
||||
@ -189,6 +194,7 @@
|
||||
<if test="country != null and country != ''">#{country},</if>
|
||||
<if test="feeType != null and feeType != ''">#{feeType},</if>
|
||||
<if test="calcType != null and calcType != ''">#{calcType},</if>
|
||||
<if test="calcWeightType != null and calcWeightType != ''">#{calcWeightType},</if>
|
||||
<if test="postType != null and postType != ''">#{postType},</if>
|
||||
<if test="transType != null and transType != ''">#{transType},</if>
|
||||
<if test="blOpen != null and blOpen != ''">#{blOpen},</if>
|
||||
@ -224,6 +230,7 @@
|
||||
|
||||
<if test="feeType != null and feeType != ''">fee_type = #{feeType},</if>
|
||||
<if test="calcType != null and calcType != ''">calc_type = #{calcType},</if>
|
||||
<if test="calcWeightType != null and calcWeightType != ''">calc_weight_type = #{calcWeightType},</if>
|
||||
<if test="postType != null and postType != ''">post_type = #{postType},</if>
|
||||
<if test="transType != null and transType != ''">trans_type = #{transType},</if>
|
||||
<if test="blOpen != null and blOpen != ''">bl_open = #{blOpen},</if>
|
||||
@ -281,6 +288,7 @@
|
||||
and fee_type=#{feeType}
|
||||
and bl_open=#{blOpen}
|
||||
and calc_type=#{calcType}
|
||||
and calc_weight_type=#{calcWeightType}
|
||||
and post_type=#{postType}
|
||||
and (
|
||||
trans_type = #{transType}
|
||||
|
||||
@ -814,6 +814,7 @@
|
||||
<if test="params.privSiteCode != null and params.privSiteCode != '88888'">
|
||||
and (
|
||||
a.send_site_code=#{params.privSiteCode}
|
||||
or a.start_site_code=#{params.privSiteCode}
|
||||
and (
|
||||
a.take_piece_employee_code=#{params.privEmpCode}
|
||||
or (a.pickup_method in('1','3') and a.operate_employee_code is null )
|
||||
@ -1110,7 +1111,7 @@
|
||||
|
||||
<if test="salesmen == null and params.privSiteCode != null and params.privSiteCode != '88888'">
|
||||
and (
|
||||
a.send_site_code=#{params.privSiteCode}
|
||||
a.send_site_code=#{params.privSiteCode} or a.start_site_code=#{params.privSiteCode}
|
||||
)
|
||||
</if>
|
||||
|
||||
@ -1299,7 +1300,8 @@
|
||||
<if test="paymentRemark != null and paymentRemark != ''"> and payment_remark like concat('%', #{paymentRemark}, '%')</if>
|
||||
<if test="orderRemark != null and orderRemark != ''"> and order_remark like concat('%', #{orderRemark}, '%')</if>
|
||||
|
||||
<if test="sendSiteCode != null and sendSiteCode != ''"> and FIND_IN_SET(`send_site_code`,#{sendSiteCode})</if>
|
||||
<if test="sendSiteCode != null and sendSiteCode != ''">and (FIND_IN_SET(`send_site_code`,#{sendSiteCode}) or FIND_IN_SET(`start_site_code`,#{sendSiteCode}))
|
||||
</if>
|
||||
|
||||
<if test="remark != null and remark != ''"> and a.remark like concat('%', #{remark}, '%')</if>
|
||||
<if test="createBy != null and createBy != ''"> and a.create_by= #{createBy}</if>
|
||||
@ -1420,7 +1422,8 @@
|
||||
select line_code from emis_trans_line etl where etl.trans_type=1
|
||||
)
|
||||
and bl_sign!='1' and waybill_status!='40'
|
||||
and a.send_site_code=#{params.privSiteCode} and a.current_site_code=#{params.privSiteCode}
|
||||
and (a.send_site_code=#{params.privSiteCode} or a.start_site_code=#{params.privSiteCode})
|
||||
and a.current_site_code=#{params.privSiteCode}
|
||||
</if>
|
||||
|
||||
|
||||
@ -1450,6 +1453,7 @@
|
||||
|
||||
a.send_site_code=#{params.privSiteCode}
|
||||
or a.dispatch_site_code=#{params.privSiteCode}
|
||||
or a.start_site_code=#{params.privSiteCode}
|
||||
<if test="params.isQueryPrintOrder != null and params.isQueryPrintOrder == 1">
|
||||
or EXISTS (select 1 from emis_tms_scan_record etsr where a.bill_code=etsr.main_bill_code and etsr.scan_site_code=#{params.privSiteCode})
|
||||
</if>
|
||||
@ -1512,6 +1516,7 @@
|
||||
a.send_site_code=#{params.privSiteCode}
|
||||
or
|
||||
a.dispatch_site_code=#{params.privSiteCode}
|
||||
or a.start_site_code=#{params.privSiteCode}
|
||||
<if test="params.isQueryPrintOrder != null and params.isQueryPrintOrder == 1">
|
||||
or EXISTS (select 1 from emis_tms_scan_record etsr where a.bill_code=etsr.main_bill_code and etsr.scan_site_code=#{params.privSiteCode})
|
||||
</if>
|
||||
@ -1844,6 +1849,7 @@
|
||||
and (
|
||||
|
||||
a.send_site_code=#{params.privSiteCode}
|
||||
or a.start_site_code=#{params.privSiteCode}
|
||||
or a.dispatch_site_code=#{params.privSiteCode}
|
||||
<if test="params.isQueryPrintOrder != null and params.isQueryPrintOrder == 1">
|
||||
or EXISTS (select 1 from emis_tms_scan_record etsr where a.bill_code=etsr.main_bill_code and etsr.scan_site_code=#{params.privSiteCode})
|
||||
@ -1929,6 +1935,7 @@
|
||||
<if test="params.privSiteCode != null and params.privSiteCode != '88888'">
|
||||
and (
|
||||
a.send_site_code=#{params.privSiteCode}
|
||||
or a.start_site_code=#{params.privSiteCode}
|
||||
or
|
||||
a.dispatch_underling_site_code=#{params.privSiteCode}
|
||||
)
|
||||
@ -1979,6 +1986,7 @@
|
||||
<if test="params.privSiteCode != null and params.privSiteCode != '88888'">
|
||||
and (
|
||||
a.send_site_code=#{params.privSiteCode}
|
||||
or a.start_site_code=#{params.privSiteCode}
|
||||
or a.dispatch_underling_site_code=#{params.privSiteCode}
|
||||
)
|
||||
</if>
|
||||
@ -2293,7 +2301,8 @@
|
||||
select line_code from emis_trans_line etl where etl.trans_type=1
|
||||
)
|
||||
and bl_sign!='1' and waybill_status!='40'
|
||||
and a.send_site_code=#{params.privSiteCode} and a.current_site_code=#{params.privSiteCode}
|
||||
and (a.send_site_code=#{params.privSiteCode} or a.start_site_code=#{params.privSiteCode})
|
||||
and a.current_site_code=#{params.privSiteCode}
|
||||
</if>
|
||||
|
||||
<if test="params.isNeedBatch != null and params.isNeedBatch == 1">
|
||||
@ -2309,6 +2318,7 @@
|
||||
and (
|
||||
|
||||
a.send_site_code=#{params.privSiteCode}
|
||||
or a.start_site_code=#{params.privSiteCode}
|
||||
or
|
||||
a.dispatch_site_code=#{params.privSiteCode}
|
||||
<if test="params.isQueryPrintOrder != null and params.isQueryPrintOrder == 1">
|
||||
@ -2500,6 +2510,7 @@
|
||||
<if test="params.privSiteCode != null and params.privSiteCode != '88888'">
|
||||
and (
|
||||
a.send_site_code=#{params.privSiteCode}
|
||||
or a.start_site_code=#{params.privSiteCode}
|
||||
or
|
||||
a.dispatch_site_code=#{params.privSiteCode}
|
||||
or
|
||||
@ -2557,7 +2568,8 @@
|
||||
and a.order_status in('0','3')
|
||||
<if test="params.privSiteCode != null and params.privSiteCode != '88888'">
|
||||
and (
|
||||
a.send_site_code=#{params.privSiteCode}
|
||||
(a.send_site_code=#{params.privSiteCode}
|
||||
or a.start_site_code=#{params.privSiteCode})
|
||||
and (
|
||||
a.take_piece_employee_code=#{params.privEmpCode}
|
||||
or (a.pickup_method in('1','3') and a.operate_employee_code is null )
|
||||
@ -2579,7 +2591,8 @@
|
||||
and a.waybill_status!='0'
|
||||
and a.order_status!='2'
|
||||
<if test="params.privSiteCode != null and params.privSiteCode != '88888'">
|
||||
and a.send_site_code=#{params.privSiteCode}
|
||||
and (a.send_site_code=#{params.privSiteCode}
|
||||
or a.start_site_code=#{params.privSiteCode})
|
||||
and (
|
||||
a.operate_employee_code=#{params.privEmpCode}
|
||||
or a.take_piece_employee_code=#{params.privEmpCode}
|
||||
@ -2599,7 +2612,8 @@
|
||||
where a.del_flag='0'
|
||||
and a.order_status='2'
|
||||
<if test="params.privSiteCode != null and params.privSiteCode != '88888'">
|
||||
and a.send_site_code=#{params.privSiteCode}
|
||||
and (a.send_site_code=#{params.privSiteCode}
|
||||
or a.start_site_code=#{params.privSiteCode})
|
||||
and (
|
||||
a.operate_employee_code=#{params.privEmpCode}
|
||||
or a.take_piece_employee_code=#{params.privEmpCode}
|
||||
@ -2619,7 +2633,7 @@
|
||||
where a.del_flag='0'
|
||||
and a.order_status in('0','3')
|
||||
<if test="params.privSiteCode != null and params.privSiteCode != '88888'">
|
||||
and a.send_site_code=#{params.privSiteCode}
|
||||
and (a.send_site_code=#{params.privSiteCode} or a.start_site_code=#{params.privSiteCode})
|
||||
and exists (
|
||||
select 1 from emis_waybill_change_to ewcto where a.bill_code=ewcto.bill_code and ewcto.change_from=#{params.privEmpCode}
|
||||
)
|
||||
@ -2637,7 +2651,7 @@
|
||||
where a.del_flag='0'
|
||||
and a.waybill_status='40'
|
||||
<if test="params.privSiteCode != null and params.privSiteCode != '88888'">
|
||||
and a.send_site_code=#{params.privSiteCode}
|
||||
and (a.send_site_code=#{params.privSiteCode} or a.start_site_code=#{params.privSiteCode})
|
||||
and (
|
||||
a.operate_employee_code=#{params.privEmpCode}
|
||||
or a.take_piece_employee_code=#{params.privEmpCode}
|
||||
@ -2657,7 +2671,7 @@
|
||||
where a.del_flag='0'
|
||||
and a.bl_sign='1'
|
||||
<if test="params.privSiteCode != null and params.privSiteCode != '88888'">
|
||||
and a.send_site_code=#{params.privSiteCode}
|
||||
and (a.send_site_code=#{params.privSiteCode} or a.start_site_code=#{params.privSiteCode})
|
||||
and (
|
||||
a.operate_employee_code=#{params.privEmpCode}
|
||||
or a.take_piece_employee_code=#{params.privEmpCode}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user