Compare commits
10 Commits
100d7f013c
...
d38c1bddd9
| Author | SHA1 | Date | |
|---|---|---|---|
| d38c1bddd9 | |||
| 35a202a92f | |||
| 029e97d5f3 | |||
| b9f8fe83f3 | |||
| f3e4607c68 | |||
| 8adc4319af | |||
| aba1030de3 | |||
| 37a7bceb03 | |||
| 623e36e0da | |||
| c5ade5154e |
@ -1,11 +1,11 @@
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @Project: emis
|
* @Project: emis
|
||||||
* @Title: EmisWaybillAttachmentController.java
|
* @Title: EmisWaybillAttachmentController.java
|
||||||
* @author linfso
|
* @author linfso
|
||||||
* @date 2024-03-01 03:51:55
|
* @date 2024-03-01 03:51:55
|
||||||
* @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>
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@ -15,15 +15,18 @@ import java.util.*;
|
|||||||
import javax.servlet.http.HttpServletResponse;
|
import javax.servlet.http.HttpServletResponse;
|
||||||
|
|
||||||
import com.xdadan.erp.common.utils.DateUtils;
|
import com.xdadan.erp.common.utils.DateUtils;
|
||||||
|
import com.xdadan.erp.emis.domain.EmisTmsScanRecord;
|
||||||
import com.xdadan.erp.emis.domain.EmisWaybill;
|
import com.xdadan.erp.emis.domain.EmisWaybill;
|
||||||
import com.xdadan.erp.emis.domain.EmisWaybillProblemInfo;
|
import com.xdadan.erp.emis.domain.EmisWaybillProblemInfo;
|
||||||
import com.xdadan.erp.emis.domain.enumtype.ScanType;
|
import com.xdadan.erp.emis.domain.enumtype.ScanType;
|
||||||
import com.xdadan.erp.emis.domain.enumtype.WaybillAttachType;
|
import com.xdadan.erp.emis.domain.enumtype.WaybillAttachType;
|
||||||
import com.xdadan.erp.emis.domain.enumtype.WaybillStatus;
|
import com.xdadan.erp.emis.domain.enumtype.WaybillStatus;
|
||||||
import com.xdadan.erp.emis.domain.exception.EmisBizError;
|
import com.xdadan.erp.emis.domain.exception.EmisBizError;
|
||||||
|
import com.xdadan.erp.emis.domain.vo.WaybillOrder;
|
||||||
import com.xdadan.erp.emis.domain.vo.scan.ScanInfo;
|
import com.xdadan.erp.emis.domain.vo.scan.ScanInfo;
|
||||||
import com.xdadan.erp.emis.service.EmisBaseService;
|
import com.xdadan.erp.emis.service.EmisBaseService;
|
||||||
import com.xdadan.erp.emis.service.IEmisTmsScanRecordService;
|
import com.xdadan.erp.emis.service.IEmisTmsScanRecordService;
|
||||||
|
import com.xdadan.erp.emis.service.IEmisWaybillService;
|
||||||
import com.xdadan.erp.emis.utils.WaybillHelper;
|
import com.xdadan.erp.emis.utils.WaybillHelper;
|
||||||
import org.apache.commons.lang3.StringUtils;
|
import org.apache.commons.lang3.StringUtils;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
@ -49,7 +52,7 @@ import com.xdadan.erp.emis.service.IEmisWaybillAttachmentService;
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* 运单附件Controller
|
* 运单附件Controller
|
||||||
*
|
*
|
||||||
* @author linfso
|
* @author linfso
|
||||||
* @date 2024-03-01 03:51:55
|
* @date 2024-03-01 03:51:55
|
||||||
*/
|
*/
|
||||||
@ -66,6 +69,9 @@ public class EmisWaybillAttachmentController extends EmisBaseController
|
|||||||
@Autowired
|
@Autowired
|
||||||
private IEmisTmsScanRecordService emisTmsScanRecordService;
|
private IEmisTmsScanRecordService emisTmsScanRecordService;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private IEmisWaybillService emisWaybillService;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 查询运单附件列表
|
* 查询运单附件列表
|
||||||
*/
|
*/
|
||||||
@ -226,7 +232,26 @@ public class EmisWaybillAttachmentController extends EmisBaseController
|
|||||||
return AjaxResult.success("上传成功");
|
return AjaxResult.success("上传成功");
|
||||||
}else{
|
}else{
|
||||||
// 上传签收图片
|
// 上传签收图片
|
||||||
return toAjax(emisWaybillAttachmentService.insertEmisWaybillAttachment(emisWaybillAttachment));
|
emisWaybillAttachmentService.insertEmisWaybillAttachment(emisWaybillAttachment);
|
||||||
|
try {
|
||||||
|
WaybillOrder waybillOrder = emisWaybillService.getWaybillOrderByBillCode(emisWaybillAttachment.getBillCode());
|
||||||
|
if (waybillOrder != null && StringUtils.isNotBlank(waybillOrder.getBillPicDispatchRmk())) {
|
||||||
|
EmisTmsScanRecord scanQuery = new EmisTmsScanRecord();
|
||||||
|
scanQuery.setBillCode(waybill.getBillCode());
|
||||||
|
scanQuery.setScanType(ScanType.SIGNED.opCode);
|
||||||
|
List<EmisTmsScanRecord> signedScanList = emisTmsScanRecordService.selectEmisTmsScanRecordList(scanQuery);
|
||||||
|
if (signedScanList != null && !signedScanList.isEmpty()) {
|
||||||
|
EmisTmsScanRecord updateScanRecord = new EmisTmsScanRecord();
|
||||||
|
updateScanRecord.setId(signedScanList.get(0).getId());
|
||||||
|
updateScanRecord.setPicUrl(waybillOrder.getBillPicDispatchRmk());
|
||||||
|
emisTmsScanRecordService.updateEmisTmsScanRecord(updateScanRecord);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} catch (Exception e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
return AjaxResult.error("上传异常!");
|
||||||
|
}
|
||||||
|
return AjaxResult.success("上传成功");
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -55,6 +55,10 @@ public class EmisWaybillOther extends BaseEntity {
|
|||||||
/* 现金客户公司名称 */
|
/* 现金客户公司名称 */
|
||||||
private String moneyCompany;
|
private String moneyCompany;
|
||||||
|
|
||||||
|
/* 柜数 */
|
||||||
|
@DataAuditField(fieldComment = "柜数")
|
||||||
|
private Long cabinetNumber;
|
||||||
|
|
||||||
// /* 回款回款人 */
|
// /* 回款回款人 */
|
||||||
// private String payee;
|
// private String payee;
|
||||||
// /* 销售联系人 */
|
// /* 销售联系人 */
|
||||||
|
|||||||
@ -1,10 +1,10 @@
|
|||||||
/**
|
/**
|
||||||
* @Project: emis
|
* @Project: emis
|
||||||
* @Title: EmisWaybillTransfer.java
|
* @Title: EmisWaybillTransfer.java
|
||||||
* @author linfso
|
* @author linfso
|
||||||
* @date 2024-05-22 01:07:48
|
* @date 2024-05-22 01:07:48
|
||||||
* @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>
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@ -66,5 +66,7 @@ public class EmisWaybillTransfer extends BaseEntity
|
|||||||
|
|
||||||
// 扩展参数
|
// 扩展参数
|
||||||
private EmisWaybill waybillDetail;
|
private EmisWaybill waybillDetail;
|
||||||
|
/* 转件平台 1:17TRACK,2:快递100 */
|
||||||
|
private String transferPlatform;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -966,6 +966,7 @@ public class WaybillOrder implements Serializable {
|
|||||||
EmisWaybillOther waybillOther = new EmisWaybillOther();
|
EmisWaybillOther waybillOther = new EmisWaybillOther();
|
||||||
waybillOther.setMoneyUserId(this.getWaybillOther().getMoneyUserId());
|
waybillOther.setMoneyUserId(this.getWaybillOther().getMoneyUserId());
|
||||||
waybillOther.setSalesSupport(this.getWaybillOther().getSalesSupport());
|
waybillOther.setSalesSupport(this.getWaybillOther().getSalesSupport());
|
||||||
|
waybillOther.setCabinetNumber(this.getWaybillOther().getCabinetNumber());
|
||||||
dbWaybill.setWaybillOther(waybillOther);
|
dbWaybill.setWaybillOther(waybillOther);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -598,6 +598,22 @@ public class EmisCommissionProfitServiceImpl extends EmisBaseService implements
|
|||||||
env.put("d", exprItem.getAdditionalWeight());
|
env.put("d", exprItem.getAdditionalWeight());
|
||||||
profitMoney = Double.valueOf(AviatorEvaluator.execute(calcExp,env).toString());
|
profitMoney = Double.valueOf(AviatorEvaluator.execute(calcExp,env).toString());
|
||||||
}
|
}
|
||||||
|
// 柜数
|
||||||
|
else if ("5".equals(quoteItem.getCalcType())) {
|
||||||
|
BigDecimal cabinetNumber = BigDecimal.ZERO;
|
||||||
|
if (waybill.getWaybillOther() != null && waybill.getWaybillOther().getCabinetNumber() != null) {
|
||||||
|
cabinetNumber = new BigDecimal(waybill.getWaybillOther().getCabinetNumber().toString());
|
||||||
|
}
|
||||||
|
calcExprStr = calcExp.replaceAll("w", cabinetNumber.stripTrailingZeros().toPlainString())
|
||||||
|
.replaceAll("s", exprItem.getInitialWeight().toString())
|
||||||
|
.replaceAll("d", exprItem.getAdditionalWeight().toString());
|
||||||
|
log.info("按柜数:计算公式:" + calcExprStr + ",柜数:" + cabinetNumber.stripTrailingZeros().toPlainString());
|
||||||
|
Map<String, Object> env = new HashMap<>();
|
||||||
|
env.put("w", cabinetNumber);
|
||||||
|
env.put("s", exprItem.getInitialWeight());
|
||||||
|
env.put("d", exprItem.getAdditionalWeight());
|
||||||
|
profitMoney = Double.valueOf(AviatorEvaluator.execute(calcExp, env).toString());
|
||||||
|
}
|
||||||
|
|
||||||
// 参与分成人员计算
|
// 参与分成人员计算
|
||||||
if(BigDecimal.valueOf(profitMoney).compareTo(BigDecimal.ZERO)>0) {
|
if(BigDecimal.valueOf(profitMoney).compareTo(BigDecimal.ZERO)>0) {
|
||||||
@ -738,6 +754,22 @@ public class EmisCommissionProfitServiceImpl extends EmisBaseService implements
|
|||||||
profitMoney = Double.valueOf(AviatorEvaluator.execute(calcExp,env).toString());
|
profitMoney = Double.valueOf(AviatorEvaluator.execute(calcExp,env).toString());
|
||||||
|
|
||||||
}
|
}
|
||||||
|
// 柜数
|
||||||
|
else if ("5".equals(quoteItem.getCalcType())) {
|
||||||
|
BigDecimal cabinetNumber = BigDecimal.ZERO;
|
||||||
|
if (waybill.getWaybillOther() != null && waybill.getWaybillOther().getCabinetNumber() != null) {
|
||||||
|
cabinetNumber = new BigDecimal(waybill.getWaybillOther().getCabinetNumber().toString());
|
||||||
|
}
|
||||||
|
calcExprStr = calcExp.replaceAll("w", cabinetNumber.stripTrailingZeros().toPlainString())
|
||||||
|
.replaceAll("s", exprItem.getInitialWeight().toString())
|
||||||
|
.replaceAll("d", exprItem.getAdditionalWeight().toString());
|
||||||
|
log.info("按柜数:计算公式:" + calcExprStr + ",柜数:" + cabinetNumber.stripTrailingZeros().toPlainString());
|
||||||
|
Map<String, Object> env = new HashMap<>();
|
||||||
|
env.put("w", cabinetNumber);
|
||||||
|
env.put("s", exprItem.getInitialWeight());
|
||||||
|
env.put("d", exprItem.getAdditionalWeight());
|
||||||
|
profitMoney = Double.valueOf(AviatorEvaluator.execute(calcExp, env).toString());
|
||||||
|
}
|
||||||
|
|
||||||
// 插入参与分成人员
|
// 插入参与分成人员
|
||||||
// 插入提成
|
// 插入提成
|
||||||
@ -888,6 +920,22 @@ public class EmisCommissionProfitServiceImpl extends EmisBaseService implements
|
|||||||
env.put("d", exprItem.getAdditionalWeight());
|
env.put("d", exprItem.getAdditionalWeight());
|
||||||
profitMoney = Double.valueOf(AviatorEvaluator.execute(calcExp,env).toString());
|
profitMoney = Double.valueOf(AviatorEvaluator.execute(calcExp,env).toString());
|
||||||
}
|
}
|
||||||
|
// 柜数
|
||||||
|
else if ("5".equals(quoteItem.getCalcType())) {
|
||||||
|
BigDecimal cabinetNumber = BigDecimal.ZERO;
|
||||||
|
if (waybill.getWaybillOther() != null && waybill.getWaybillOther().getCabinetNumber() != null) {
|
||||||
|
cabinetNumber = new BigDecimal(waybill.getWaybillOther().getCabinetNumber().toString());
|
||||||
|
}
|
||||||
|
calcExprStr = calcExp.replaceAll("w", cabinetNumber.stripTrailingZeros().toPlainString())
|
||||||
|
.replaceAll("s", exprItem.getInitialWeight().toString())
|
||||||
|
.replaceAll("d", exprItem.getAdditionalWeight().toString());
|
||||||
|
log.info("按柜数:计算公式:" + calcExprStr + ",柜数:" + cabinetNumber.stripTrailingZeros().toPlainString());
|
||||||
|
Map<String, Object> env = new HashMap<>();
|
||||||
|
env.put("w", cabinetNumber);
|
||||||
|
env.put("s", exprItem.getInitialWeight());
|
||||||
|
env.put("d", exprItem.getAdditionalWeight());
|
||||||
|
profitMoney = Double.valueOf(AviatorEvaluator.execute(calcExp, env).toString());
|
||||||
|
}
|
||||||
|
|
||||||
// 插入提成
|
// 插入提成
|
||||||
if(BigDecimal.valueOf(profitMoney).compareTo(BigDecimal.ZERO)>0) {
|
if(BigDecimal.valueOf(profitMoney).compareTo(BigDecimal.ZERO)>0) {
|
||||||
@ -1044,6 +1092,22 @@ public class EmisCommissionProfitServiceImpl extends EmisBaseService implements
|
|||||||
env.put("d", exprItem.getAdditionalWeight());
|
env.put("d", exprItem.getAdditionalWeight());
|
||||||
profitMoney = Double.valueOf(AviatorEvaluator.execute(calcExp,env).toString());
|
profitMoney = Double.valueOf(AviatorEvaluator.execute(calcExp,env).toString());
|
||||||
}
|
}
|
||||||
|
// 柜数
|
||||||
|
else if ("5".equals(quoteItem.getCalcType())) {
|
||||||
|
BigDecimal cabinetNumber = BigDecimal.ZERO;
|
||||||
|
if (waybill.getWaybillOther() != null && waybill.getWaybillOther().getCabinetNumber() != null) {
|
||||||
|
cabinetNumber = new BigDecimal(waybill.getWaybillOther().getCabinetNumber().toString());
|
||||||
|
}
|
||||||
|
calcExprStr = calcExp.replaceAll("w", cabinetNumber.stripTrailingZeros().toPlainString())
|
||||||
|
.replaceAll("s", exprItem.getInitialWeight().toString())
|
||||||
|
.replaceAll("d", exprItem.getAdditionalWeight().toString());
|
||||||
|
log.info("按柜数:计算公式:" + calcExprStr + ",柜数:" + cabinetNumber.stripTrailingZeros().toPlainString());
|
||||||
|
Map<String, Object> env = new HashMap<>();
|
||||||
|
env.put("w", cabinetNumber);
|
||||||
|
env.put("s", exprItem.getInitialWeight());
|
||||||
|
env.put("d", exprItem.getAdditionalWeight());
|
||||||
|
profitMoney = Double.valueOf(AviatorEvaluator.execute(calcExp, env).toString());
|
||||||
|
}
|
||||||
|
|
||||||
// 插入提成
|
// 插入提成
|
||||||
if(BigDecimal.valueOf(profitMoney).compareTo(BigDecimal.ZERO)>0) {
|
if(BigDecimal.valueOf(profitMoney).compareTo(BigDecimal.ZERO)>0) {
|
||||||
@ -1202,6 +1266,22 @@ public class EmisCommissionProfitServiceImpl extends EmisBaseService implements
|
|||||||
profitMoney = Double.valueOf(AviatorEvaluator.execute(calcExp,env).toString());
|
profitMoney = Double.valueOf(AviatorEvaluator.execute(calcExp,env).toString());
|
||||||
|
|
||||||
}
|
}
|
||||||
|
// 柜数
|
||||||
|
else if ("5".equals(quoteItem.getCalcType())) {
|
||||||
|
BigDecimal cabinetNumber = BigDecimal.ZERO;
|
||||||
|
if (waybill.getWaybillOther() != null && waybill.getWaybillOther().getCabinetNumber() != null) {
|
||||||
|
cabinetNumber = new BigDecimal(waybill.getWaybillOther().getCabinetNumber().toString());
|
||||||
|
}
|
||||||
|
calcExprStr = calcExp.replaceAll("w", cabinetNumber.stripTrailingZeros().toPlainString())
|
||||||
|
.replaceAll("s", exprItem.getInitialWeight().toString())
|
||||||
|
.replaceAll("d", exprItem.getAdditionalWeight().toString());
|
||||||
|
log.info("按柜数:计算公式:" + calcExprStr + ",柜数:" + cabinetNumber.stripTrailingZeros().toPlainString());
|
||||||
|
Map<String, Object> env = new HashMap<>();
|
||||||
|
env.put("w", cabinetNumber);
|
||||||
|
env.put("s", exprItem.getInitialWeight());
|
||||||
|
env.put("d", exprItem.getAdditionalWeight());
|
||||||
|
profitMoney = Double.valueOf(AviatorEvaluator.execute(calcExp, env).toString());
|
||||||
|
}
|
||||||
|
|
||||||
// 插入提成
|
// 插入提成
|
||||||
if(BigDecimal.valueOf(profitMoney).compareTo(BigDecimal.ZERO)>0) {
|
if(BigDecimal.valueOf(profitMoney).compareTo(BigDecimal.ZERO)>0) {
|
||||||
@ -1352,6 +1432,22 @@ public class EmisCommissionProfitServiceImpl extends EmisBaseService implements
|
|||||||
profitMoney = Double.valueOf(AviatorEvaluator.execute(calcExp,env).toString());
|
profitMoney = Double.valueOf(AviatorEvaluator.execute(calcExp,env).toString());
|
||||||
|
|
||||||
}
|
}
|
||||||
|
// 柜数
|
||||||
|
else if ("5".equals(quoteItem.getCalcType())) {
|
||||||
|
BigDecimal cabinetNumber = BigDecimal.ZERO;
|
||||||
|
if (waybill.getWaybillOther() != null && waybill.getWaybillOther().getCabinetNumber() != null) {
|
||||||
|
cabinetNumber = new BigDecimal(waybill.getWaybillOther().getCabinetNumber().toString());
|
||||||
|
}
|
||||||
|
calcExprStr = calcExp.replaceAll("w", cabinetNumber.stripTrailingZeros().toPlainString())
|
||||||
|
.replaceAll("s", exprItem.getInitialWeight().toString())
|
||||||
|
.replaceAll("d", exprItem.getAdditionalWeight().toString());
|
||||||
|
log.info("按柜数:计算公式:" + calcExprStr + ",柜数:" + cabinetNumber.stripTrailingZeros().toPlainString());
|
||||||
|
Map<String, Object> env = new HashMap<>();
|
||||||
|
env.put("w", cabinetNumber);
|
||||||
|
env.put("s", exprItem.getInitialWeight());
|
||||||
|
env.put("d", exprItem.getAdditionalWeight());
|
||||||
|
profitMoney = Double.valueOf(AviatorEvaluator.execute(calcExp, env).toString());
|
||||||
|
}
|
||||||
|
|
||||||
// 插入提成
|
// 插入提成
|
||||||
if (BigDecimal.valueOf(profitMoney).compareTo(BigDecimal.ZERO) > 0) {
|
if (BigDecimal.valueOf(profitMoney).compareTo(BigDecimal.ZERO) > 0) {
|
||||||
@ -1575,6 +1671,22 @@ public class EmisCommissionProfitServiceImpl extends EmisBaseService implements
|
|||||||
|
|
||||||
profitMoney = Double.valueOf(AviatorEvaluator.execute(calcExp,env).toString());
|
profitMoney = Double.valueOf(AviatorEvaluator.execute(calcExp,env).toString());
|
||||||
}
|
}
|
||||||
|
// 柜数
|
||||||
|
else if ("5".equals(quoteItem.getCalcType())) {
|
||||||
|
BigDecimal cabinetNumber = BigDecimal.ZERO;
|
||||||
|
if (waybill.getWaybillOther() != null && waybill.getWaybillOther().getCabinetNumber() != null) {
|
||||||
|
cabinetNumber = new BigDecimal(waybill.getWaybillOther().getCabinetNumber().toString());
|
||||||
|
}
|
||||||
|
calcExprStr = calcExp.replaceAll("w", cabinetNumber.stripTrailingZeros().toPlainString())
|
||||||
|
.replaceAll("s", exprItem.getInitialWeight().toString())
|
||||||
|
.replaceAll("d", exprItem.getAdditionalWeight().toString());
|
||||||
|
log.info("按柜数:计算公式:" + calcExprStr + ",柜数:" + cabinetNumber.stripTrailingZeros().toPlainString());
|
||||||
|
Map<String, Object> env = new HashMap<>();
|
||||||
|
env.put("w", cabinetNumber);
|
||||||
|
env.put("s", exprItem.getInitialWeight());
|
||||||
|
env.put("d", exprItem.getAdditionalWeight());
|
||||||
|
profitMoney = Double.valueOf(AviatorEvaluator.execute(calcExp, env).toString());
|
||||||
|
}
|
||||||
|
|
||||||
// 插入提成
|
// 插入提成
|
||||||
if(BigDecimal.valueOf(profitMoney).compareTo(BigDecimal.ZERO)>0) {
|
if(BigDecimal.valueOf(profitMoney).compareTo(BigDecimal.ZERO)>0) {
|
||||||
|
|||||||
@ -124,6 +124,7 @@ public class EmisQuoteDispAreaServiceImpl extends EmisBaseService implements IEm
|
|||||||
// 1. 校验区域名称和删除标志的唯一性
|
// 1. 校验区域名称和删除标志的唯一性
|
||||||
EmisQuoteDispArea queryParam = new EmisQuoteDispArea();
|
EmisQuoteDispArea queryParam = new EmisQuoteDispArea();
|
||||||
queryParam.getParams().put("areaName",emisQuoteDispArea.getAreaName());
|
queryParam.getParams().put("areaName",emisQuoteDispArea.getAreaName());
|
||||||
|
queryParam.setUseSiteCode(emisQuoteDispArea.getUseSiteCode());
|
||||||
queryParam.setDelFlag("0"); // 只查询未删除的记录
|
queryParam.setDelFlag("0"); // 只查询未删除的记录
|
||||||
|
|
||||||
List<EmisQuoteDispArea> existingList = emisQuoteDispAreaMapper.selectEmisQuoteDispAreaList(queryParam);
|
List<EmisQuoteDispArea> existingList = emisQuoteDispAreaMapper.selectEmisQuoteDispAreaList(queryParam);
|
||||||
|
|||||||
@ -123,6 +123,7 @@ public class EmisQuoteSendAreaServiceImpl extends EmisBaseService implements IEm
|
|||||||
// 1. 校验区域名称和删除标志的唯一性
|
// 1. 校验区域名称和删除标志的唯一性
|
||||||
EmisQuoteSendArea queryParam = new EmisQuoteSendArea();
|
EmisQuoteSendArea queryParam = new EmisQuoteSendArea();
|
||||||
queryParam.getParams().put("areaName",emisQuoteSendArea.getAreaName());
|
queryParam.getParams().put("areaName",emisQuoteSendArea.getAreaName());
|
||||||
|
queryParam.setUseSiteCode(emisQuoteSendArea.getUseSiteCode());
|
||||||
queryParam.setDelFlag("0"); // 只查询未删除的记录
|
queryParam.setDelFlag("0"); // 只查询未删除的记录
|
||||||
|
|
||||||
List<EmisQuoteSendArea> existingList = emisQuoteSendAreaMapper.selectEmisQuoteSendAreaList(queryParam);
|
List<EmisQuoteSendArea> existingList = emisQuoteSendAreaMapper.selectEmisQuoteSendAreaList(queryParam);
|
||||||
|
|||||||
@ -164,10 +164,11 @@ public class EmisWaybillServiceImpl extends EmisBaseService implements IEmisWayb
|
|||||||
* 保存或更新运单其他信息副表
|
* 保存或更新运单其他信息副表
|
||||||
* @param emisWaybillSave
|
* @param emisWaybillSave
|
||||||
*/
|
*/
|
||||||
private void saveOrUpdateWaybillOther(EmisWaybill emisWaybillSave) {
|
private void saveOrUpdateWaybillOther(EmisWaybill emisWaybillSave) throws EmisBizError {
|
||||||
if (emisWaybillSave == null || emisWaybillSave.getId() == null) {
|
if (emisWaybillSave == null || emisWaybillSave.getId() == null) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
validateCabinetNumberRule(emisWaybillSave, null);
|
||||||
|
|
||||||
String billCode = emisWaybillSave.getBillCode();
|
String billCode = emisWaybillSave.getBillCode();
|
||||||
Long waybillId = emisWaybillSave.getId();
|
Long waybillId = emisWaybillSave.getId();
|
||||||
@ -175,15 +176,20 @@ public class EmisWaybillServiceImpl extends EmisBaseService implements IEmisWayb
|
|||||||
// 从waybillOther中获取moneyUserId
|
// 从waybillOther中获取moneyUserId
|
||||||
Long moneyUserId = null;
|
Long moneyUserId = null;
|
||||||
String salesSupport = null;
|
String salesSupport = null;
|
||||||
|
Long cabinetNumber = 0L;
|
||||||
if (emisWaybillSave.getWaybillOther() != null) {
|
if (emisWaybillSave.getWaybillOther() != null) {
|
||||||
moneyUserId = emisWaybillSave.getWaybillOther().getMoneyUserId();
|
moneyUserId = emisWaybillSave.getWaybillOther().getMoneyUserId();
|
||||||
salesSupport = emisWaybillSave.getWaybillOther().getSalesSupport();
|
salesSupport = emisWaybillSave.getWaybillOther().getSalesSupport();
|
||||||
|
cabinetNumber = emisWaybillSave.getWaybillOther().getCabinetNumber();
|
||||||
if (moneyUserId == null) {
|
if (moneyUserId == null) {
|
||||||
moneyUserId = 0L;
|
moneyUserId = 0L;
|
||||||
}
|
}
|
||||||
if (salesSupport == null) {
|
if (salesSupport == null) {
|
||||||
salesSupport ="";
|
salesSupport ="";
|
||||||
}
|
}
|
||||||
|
if (cabinetNumber == null) {
|
||||||
|
cabinetNumber = 0L;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// 查询是否已存在
|
// 查询是否已存在
|
||||||
@ -194,6 +200,7 @@ public class EmisWaybillServiceImpl extends EmisBaseService implements IEmisWayb
|
|||||||
existing.setSalesSupport(salesSupport);
|
existing.setSalesSupport(salesSupport);
|
||||||
existing.setBillCode(billCode);
|
existing.setBillCode(billCode);
|
||||||
existing.setMoneyUserId(moneyUserId);
|
existing.setMoneyUserId(moneyUserId);
|
||||||
|
existing.setCabinetNumber(cabinetNumber);
|
||||||
existing.preUpdate();
|
existing.preUpdate();
|
||||||
emisWaybillOtherMapper.updateEmisWaybillOther(existing);
|
emisWaybillOtherMapper.updateEmisWaybillOther(existing);
|
||||||
} else {
|
} else {
|
||||||
@ -203,11 +210,44 @@ public class EmisWaybillServiceImpl extends EmisBaseService implements IEmisWayb
|
|||||||
waybillOtherEntity.setBillCode(billCode);
|
waybillOtherEntity.setBillCode(billCode);
|
||||||
waybillOtherEntity.setSalesSupport(salesSupport);
|
waybillOtherEntity.setSalesSupport(salesSupport);
|
||||||
waybillOtherEntity.setMoneyUserId(moneyUserId);
|
waybillOtherEntity.setMoneyUserId(moneyUserId);
|
||||||
|
waybillOtherEntity.setCabinetNumber(cabinetNumber);
|
||||||
waybillOtherEntity.preInsert();
|
waybillOtherEntity.preInsert();
|
||||||
emisWaybillOtherMapper.insertEmisWaybillOther(waybillOtherEntity);
|
emisWaybillOtherMapper.insertEmisWaybillOther(waybillOtherEntity);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void validateCabinetNumberRule(EmisWaybill emisWaybillSave, String productName) throws EmisBizError {
|
||||||
|
if (emisWaybillSave == null) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if (emisWaybillSave.getWaybillOther() == null) {
|
||||||
|
emisWaybillSave.setWaybillOther(new EmisWaybillOther());
|
||||||
|
}
|
||||||
|
Long cabinetNumber = emisWaybillSave.getWaybillOther().getCabinetNumber();
|
||||||
|
if (cabinetNumber == null) {
|
||||||
|
cabinetNumber = 0L;
|
||||||
|
emisWaybillSave.getWaybillOther().setCabinetNumber(0L);
|
||||||
|
}
|
||||||
|
|
||||||
|
String currentProductName = productName;
|
||||||
|
if (StringUtils.isBlank(currentProductName) && StringUtils.isNotBlank(emisWaybillSave.getProductType())) {
|
||||||
|
EmisTransProduct transProduct = getTransProductByCode(emisWaybillSave.getProductType());
|
||||||
|
if (transProduct != null) {
|
||||||
|
currentProductName = transProduct.getProdName();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (StringUtils.isBlank(currentProductName)) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if (currentProductName.contains("拼箱") && cabinetNumber.longValue() != 0L) {
|
||||||
|
throw new EmisBizError(EmisBizErrorType.PARAM_ERROR1, "海运拼箱,柜数必须为0");
|
||||||
|
}
|
||||||
|
if (currentProductName.contains("整柜") && cabinetNumber.longValue() < 1L) {
|
||||||
|
throw new EmisBizError(EmisBizErrorType.PARAM_ERROR1, "海运整柜,柜数必须为大于等于1的整数");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 获取稽核数据
|
* 获取稽核数据
|
||||||
* @param id
|
* @param id
|
||||||
@ -974,6 +1014,7 @@ public class EmisWaybillServiceImpl extends EmisBaseService implements IEmisWayb
|
|||||||
if(transProduct==null){
|
if(transProduct==null){
|
||||||
throw new EmisBizError(EmisBizErrorType.NOT_EXISTS, "产品不正确");
|
throw new EmisBizError(EmisBizErrorType.NOT_EXISTS, "产品不正确");
|
||||||
}
|
}
|
||||||
|
// validateCabinetNumberRule(emisWaybillSave, transProduct.getProdName());
|
||||||
emisWaybillSave.setProductType(transProduct.getProdCode());
|
emisWaybillSave.setProductType(transProduct.getProdCode());
|
||||||
|
|
||||||
// 收件国家省市区转换
|
// 收件国家省市区转换
|
||||||
@ -6302,7 +6343,7 @@ public class EmisWaybillServiceImpl extends EmisBaseService implements IEmisWayb
|
|||||||
// 当前批次所有销售联系人,批量查询分享关系
|
// 当前批次所有销售联系人,批量查询分享关系
|
||||||
Set<String> batchSalesmenSet = new LinkedHashSet<>();
|
Set<String> batchSalesmenSet = new LinkedHashSet<>();
|
||||||
for (EmisWaybill waybill : waybillList) {
|
for (EmisWaybill waybill : waybillList) {
|
||||||
if (waybill != null && !StringUtils.isEmpty(waybill.getSalesmen())) {
|
if (waybill != null && !StringUtils.isBlank(waybill.getSalesmen())) {
|
||||||
batchSalesmenSet.add(waybill.getSalesmen());
|
batchSalesmenSet.add(waybill.getSalesmen());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -6313,7 +6354,7 @@ public class EmisWaybillServiceImpl extends EmisBaseService implements IEmisWayb
|
|||||||
.selectValidRelBySalesmenList(new ArrayList<>(batchSalesmenSet));
|
.selectValidRelBySalesmenList(new ArrayList<>(batchSalesmenSet));
|
||||||
if (!CollectionUtils.isEmpty(relAllList)) {
|
if (!CollectionUtils.isEmpty(relAllList)) {
|
||||||
for (EmisSalesmenRel rel : relAllList) {
|
for (EmisSalesmenRel rel : relAllList) {
|
||||||
if (rel == null || StringUtils.isEmpty(rel.getSalesmen())) {
|
if (rel == null || StringUtils.isBlank(rel.getSalesmen())) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
salesRelMap.computeIfAbsent(rel.getSalesmen(), k -> new ArrayList<>()).add(rel);
|
salesRelMap.computeIfAbsent(rel.getSalesmen(), k -> new ArrayList<>()).add(rel);
|
||||||
@ -6322,84 +6363,84 @@ public class EmisWaybillServiceImpl extends EmisBaseService implements IEmisWayb
|
|||||||
}
|
}
|
||||||
|
|
||||||
for (EmisWaybill waybill : waybillList) {
|
for (EmisWaybill waybill : waybillList) {
|
||||||
if (waybill == null || StringUtils.isEmpty(waybill.getBillCode())) {
|
if (waybill == null || StringUtils.isBlank(waybill.getBillCode())) {
|
||||||
continue;
|
|
||||||
}
|
|
||||||
|
|
||||||
try {
|
|
||||||
// 收集需要通知的员工姓名:销售联系人、销售支持、销售分享人
|
|
||||||
Set<String> notifyEmpNames = new LinkedHashSet<>();
|
|
||||||
|
|
||||||
// 销售联系人
|
|
||||||
if (!StringUtils.isEmpty(waybill.getSalesmen())) {
|
|
||||||
String salesmen = waybill.getSalesmen();
|
|
||||||
notifyEmpNames.add(salesmen);
|
|
||||||
|
|
||||||
// 销售分享关系:salesmen -> salesAss(使用当前批次预加载的关系)
|
|
||||||
List<EmisSalesmenRel> relList = salesRelMap.get(salesmen);
|
|
||||||
if (!CollectionUtils.isEmpty(relList)) {
|
|
||||||
for (EmisSalesmenRel rel : relList) {
|
|
||||||
if (rel == null || StringUtils.isEmpty(rel.getSalesAss())) {
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
notifyEmpNames.add(rel.getSalesAss());
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// 销售支持
|
|
||||||
EmisWaybillOther waybillOther = waybill.getWaybillOther();
|
|
||||||
if (waybillOther != null && !StringUtils.isEmpty(waybillOther.getSalesSupport())) {
|
|
||||||
String[] supports = waybillOther.getSalesSupport().split("[,,]");
|
|
||||||
for (String support : supports) {
|
|
||||||
if (!StringUtils.isEmpty(support)) {
|
|
||||||
notifyEmpNames.add(support.trim());
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (notifyEmpNames.isEmpty()) {
|
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
// 根据notifyEmpNames查询sys_user获取所有的notifyEmpCodes
|
try {
|
||||||
Set<String> notifyEmpCodes = new LinkedHashSet<>();
|
// 收集需要通知的员工姓名:销售联系人、销售支持、销售分享人
|
||||||
for (String empName : notifyEmpNames) {
|
Set<String> notifyEmpNames = new LinkedHashSet<>();
|
||||||
try {
|
|
||||||
SysUser cond = new SysUser();
|
// 销售联系人
|
||||||
cond.setEmpName(empName);
|
if (!StringUtils.isBlank(waybill.getSalesmen())) {
|
||||||
List<SysUser> users = sysUserMapper.selectUserList(cond);
|
String salesmen = waybill.getSalesmen();
|
||||||
if (!CollectionUtils.isEmpty(users)) {
|
notifyEmpNames.add(salesmen);
|
||||||
for (SysUser u : users) {
|
|
||||||
if (u != null && !StringUtils.isEmpty(u.getEmpCode())) {
|
// 销售分享关系:salesmen -> salesAss(使用当前批次预加载的关系)
|
||||||
notifyEmpCodes.add(u.getEmpCode());
|
List<EmisSalesmenRel> relList = salesRelMap.get(salesmen);
|
||||||
|
if (!CollectionUtils.isEmpty(relList)) {
|
||||||
|
for (EmisSalesmenRel rel : relList) {
|
||||||
|
if (rel == null || StringUtils.isBlank(rel.getSalesAss())) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
notifyEmpNames.add(rel.getSalesAss());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// 销售支持
|
||||||
|
EmisWaybillOther waybillOther = waybill.getWaybillOther();
|
||||||
|
if (waybillOther != null && !StringUtils.isBlank(waybillOther.getSalesSupport())) {
|
||||||
|
String[] supports = waybillOther.getSalesSupport().split("[,,]");
|
||||||
|
for (String support : supports) {
|
||||||
|
if (!StringUtils.isBlank(support)) {
|
||||||
|
notifyEmpNames.add(support.trim());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (notifyEmpNames.isEmpty()) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
// 根据notifyEmpNames查询sys_user获取所有的notifyEmpCodes
|
||||||
|
Set<String> notifyEmpCodes = new LinkedHashSet<>();
|
||||||
|
for (String empName : notifyEmpNames) {
|
||||||
|
try {
|
||||||
|
SysUser cond = new SysUser();
|
||||||
|
cond.setEmpName(empName);
|
||||||
|
List<SysUser> users = sysUserMapper.selectUserList(cond);
|
||||||
|
if (!CollectionUtils.isEmpty(users)) {
|
||||||
|
for (SysUser u : users) {
|
||||||
|
if (u != null && !StringUtils.isBlank(u.getEmpCode())) {
|
||||||
|
notifyEmpCodes.add(u.getEmpCode());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
} catch (Exception ex) {
|
||||||
|
log.error("autoTraceWarning: query sys_user error, billCode={}, empName={}", waybill.getBillCode(), empName, ex);
|
||||||
}
|
}
|
||||||
} catch (Exception ex) {
|
|
||||||
log.error("autoTraceWarning: query sys_user error, billCode={}, empName={}", waybill.getBillCode(), empName, ex);
|
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
if (notifyEmpCodes.isEmpty()) {
|
if (notifyEmpCodes.isEmpty()) {
|
||||||
continue;
|
continue;
|
||||||
}
|
|
||||||
|
|
||||||
String billCode = waybill.getBillCode();
|
|
||||||
String url = "/d24/waybillManagement/SendWaybillList?billCode=" + billCode;
|
|
||||||
notifyEmpCodes.forEach(empCode -> {
|
|
||||||
try {
|
|
||||||
String timeStr = DateUtils.parseDateToStr(DateUtils.YYYY_MM_DD_HH_MM_SS, now);
|
|
||||||
String title = "轨迹异常:运单【" + billCode + "】停留超过3天_" + empCode + "_" + timeStr;
|
|
||||||
String content = title;
|
|
||||||
NoticeUtils.outSendNoticeToInner(title, content, url, empCode, 2);
|
|
||||||
} catch (Exception ex) {
|
|
||||||
log.error("autoTraceWarning: send notice error, billCode={}, empCode={}", billCode, empCode, ex);
|
|
||||||
}
|
}
|
||||||
});
|
|
||||||
} catch (Exception ex) {
|
String billCode = waybill.getBillCode();
|
||||||
log.error("autoTraceWarning: handle waybill error, billCode={}", waybill.getBillCode(), ex);
|
String url = "/d24/waybillManagement/SendWaybillList?billCode=" + billCode;
|
||||||
}
|
notifyEmpCodes.forEach(empCode -> {
|
||||||
|
try {
|
||||||
|
String timeStr = DateUtils.parseDateToStr(DateUtils.YYYY_MM_DD_HH_MM_SS, now);
|
||||||
|
String title = "轨迹异常:运单【" + billCode + "】停留超过3天_" + empCode + "_" + timeStr;
|
||||||
|
String content = title;
|
||||||
|
NoticeUtils.outSendNoticeToInner(title, content, url, empCode, 2);
|
||||||
|
} catch (Exception ex) {
|
||||||
|
log.error("autoTraceWarning: send notice error, billCode={}, empCode={}", billCode, empCode, ex);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
} catch (Exception ex) {
|
||||||
|
log.error("autoTraceWarning: handle waybill error, billCode={}", waybill.getBillCode(), ex);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (waybillList.size() < pageSize) {
|
if (waybillList.size() < pageSize) {
|
||||||
|
|||||||
@ -1445,8 +1445,24 @@
|
|||||||
|
|
||||||
<if test="params.blOverdueUnpaid != null and params.blOverdueUnpaid == 1">
|
<if test="params.blOverdueUnpaid != null and params.blOverdueUnpaid == 1">
|
||||||
and a.payment_status in ('0','2')
|
and a.payment_status in ('0','2')
|
||||||
and a.payment_70_due_date is not null
|
and (
|
||||||
and DATE(a.payment_70_due_date) <![CDATA[ < ]]> CURDATE()
|
case
|
||||||
|
when a.settle_type = '2' and a.credit_period = 7 then DATE(DATE_ADD(a.payment_due_date, INTERVAL 7 DAY))
|
||||||
|
when a.settle_type = '2' and a.credit_period = 15 then DATE(DATE_ADD(a.payment_due_date, INTERVAL 15 DAY))
|
||||||
|
when a.settle_type = '2' and a.credit_period = 30 then LAST_DAY(DATE_ADD(a.payment_due_date, INTERVAL 1 MONTH))
|
||||||
|
when a.settle_type = '2' and a.credit_period in (35,45) then LAST_DAY(a.payment_due_date)
|
||||||
|
else DATE(a.payment_due_date)
|
||||||
|
end
|
||||||
|
) is not null
|
||||||
|
and DATE(
|
||||||
|
case
|
||||||
|
when a.settle_type = '2' and a.credit_period = 7 then DATE(DATE_ADD(a.payment_due_date, INTERVAL 7 DAY))
|
||||||
|
when a.settle_type = '2' and a.credit_period = 15 then DATE(DATE_ADD(a.payment_due_date, INTERVAL 15 DAY))
|
||||||
|
when a.settle_type = '2' and a.credit_period = 30 then LAST_DAY(DATE_ADD(a.payment_due_date, INTERVAL 1 MONTH))
|
||||||
|
when a.settle_type = '2' and a.credit_period in (35,45) then LAST_DAY(a.payment_due_date)
|
||||||
|
else DATE(a.payment_due_date)
|
||||||
|
end
|
||||||
|
) <![CDATA[ < ]]> CURDATE()
|
||||||
</if>
|
</if>
|
||||||
<!-- <if test="params.blOverdueUnpaid != null and params.blOverdueUnpaid == 0">-->
|
<!-- <if test="params.blOverdueUnpaid != null and params.blOverdueUnpaid == 0">-->
|
||||||
<!-- and a.payment_status = '1'-->
|
<!-- and a.payment_status = '1'-->
|
||||||
|
|||||||
@ -278,7 +278,9 @@
|
|||||||
|
|
||||||
|
|
||||||
<select id="selectEmisTmsScanRecordList" parameterType="EmisTmsScanRecord" resultMap="EmisTmsScanRecordResult">
|
<select id="selectEmisTmsScanRecordList" parameterType="EmisTmsScanRecord" resultMap="EmisTmsScanRecordResult">
|
||||||
select id, bill_code, main_bill_code, bl_sub_bill, order_sn, scan_type, bl_last_track, pre_or_next_station, pre_or_next_station_code, pre_or_next_station_phone, pre_or_next_man_code, pre_or_next_man_phone, scan_date, scan_man_code, scan_man_phone, scan_man, pre_or_next_man, scan_site, scan_site_code, scan_site_phone, scan_weight, weight, dest_site_code, dest_code, dispatch_or_send_man, dispatch_or_send_man_code, dispatch_or_send_man_phone, sign_date, sign_man, sign_site, sign_site_code, record_man, record_man_code, record_man_phone, record_site_code, car_no, bag_no, truck_man, truck_code, data_from, pic_url, public_trace_info, inner_trace_info, rel_id, status, del_flag, create_by, create_time, update_by, update_time, remark, update_site, create_site
|
select id, bill_code, main_bill_code, bl_sub_bill, order_sn, scan_type, bl_last_track, pre_or_next_station, pre_or_next_station_code, pre_or_next_station_phone, pre_or_next_man_code, pre_or_next_man_phone, scan_date, scan_man_code, scan_man_phone, scan_man, pre_or_next_man, scan_site, scan_site_code, scan_site_phone, scan_weight, weight, dest_site_code, dest_code,
|
||||||
|
IFNULL((select su.emp_name from sys_user su where su.emp_code = a.dispatch_or_send_man_code and su.del_flag='0' limit 1), a.dispatch_or_send_man) as dispatch_or_send_man,
|
||||||
|
dispatch_or_send_man_code, dispatch_or_send_man_phone, sign_date, sign_man, sign_site, sign_site_code, record_man, record_man_code, record_man_phone, record_site_code, car_no, bag_no, truck_man, truck_code, data_from, pic_url, public_trace_info, inner_trace_info, rel_id, status, del_flag, create_by, create_time, update_by, update_time, remark, update_site, create_site
|
||||||
from emis_tms_scan_record a
|
from emis_tms_scan_record a
|
||||||
<where>
|
<where>
|
||||||
|
|
||||||
@ -364,7 +366,7 @@
|
|||||||
and pic_url is not null
|
and pic_url is not null
|
||||||
</if>
|
</if>
|
||||||
|
|
||||||
<if test="params.isUploadPic != null and params.isUploadPic == 0 ">
|
<if test="params.isUploadPic != null and params.isUploadPic != '' and params.isUploadPic == 0 ">
|
||||||
and pic_url is null
|
and pic_url is null
|
||||||
</if>
|
</if>
|
||||||
|
|
||||||
|
|||||||
@ -265,6 +265,7 @@
|
|||||||
<result property="salesSupport" column="waybill_other_sales_support"/>
|
<result property="salesSupport" column="waybill_other_sales_support"/>
|
||||||
<result property="moneyUserId" column="waybill_other_money_user_id"/>
|
<result property="moneyUserId" column="waybill_other_money_user_id"/>
|
||||||
<result property="moneyCompany" column="waybill_other_money_company"/>
|
<result property="moneyCompany" column="waybill_other_money_company"/>
|
||||||
|
<result property="cabinetNumber" column="waybill_other_cabinet_number"/>
|
||||||
<!-- <result property="payee" column="waybill_other_payee"/>-->
|
<!-- <result property="payee" column="waybill_other_payee"/>-->
|
||||||
<!-- <result property="salesmen" column="waybill_other_salesmen"/>-->
|
<!-- <result property="salesmen" column="waybill_other_salesmen"/>-->
|
||||||
</association>
|
</association>
|
||||||
@ -370,6 +371,7 @@
|
|||||||
wss.sales_support as waybill_other_sales_support,
|
wss.sales_support as waybill_other_sales_support,
|
||||||
COALESCE(wss.money_user_id, a3.money_user_id) as waybill_other_money_user_id,
|
COALESCE(wss.money_user_id, a3.money_user_id) as waybill_other_money_user_id,
|
||||||
COALESCE(mu.company, mu2.company) as waybill_other_money_company,
|
COALESCE(mu.company, mu2.company) as waybill_other_money_company,
|
||||||
|
IFNULL(wss.cabinet_number, 0) as waybill_other_cabinet_number,
|
||||||
|
|
||||||
p.emp_name as dispatch_man_name,q.site_name as print_site_name,
|
p.emp_name as dispatch_man_name,q.site_name as print_site_name,
|
||||||
r.emp_name as print_man_name,
|
r.emp_name as print_man_name,
|
||||||
@ -484,6 +486,7 @@
|
|||||||
wss.sales_support as waybill_other_sales_support,
|
wss.sales_support as waybill_other_sales_support,
|
||||||
COALESCE(wss.money_user_id, a3.money_user_id) as waybill_other_money_user_id,
|
COALESCE(wss.money_user_id, a3.money_user_id) as waybill_other_money_user_id,
|
||||||
COALESCE(mu.company, mu2.company) as waybill_other_money_company,
|
COALESCE(mu.company, mu2.company) as waybill_other_money_company,
|
||||||
|
IFNULL(wss.cabinet_number, 0) as waybill_other_cabinet_number,
|
||||||
a3.sales_executive ,
|
a3.sales_executive ,
|
||||||
a3.customer_type as customer_type,
|
a3.customer_type as customer_type,
|
||||||
a3.main_user_id ,
|
a3.main_user_id ,
|
||||||
|
|||||||
@ -11,6 +11,7 @@
|
|||||||
<result property="salesSupport" column="sales_support" />
|
<result property="salesSupport" column="sales_support" />
|
||||||
<result property="moneyUserId" column="money_user_id" />
|
<result property="moneyUserId" column="money_user_id" />
|
||||||
<result property="moneyCompany" column="money_company" />
|
<result property="moneyCompany" column="money_company" />
|
||||||
|
<result property="cabinetNumber" column="cabinet_number" />
|
||||||
</resultMap>
|
</resultMap>
|
||||||
|
|
||||||
<sql id="selectEmisWaybillOtherVo">
|
<sql id="selectEmisWaybillOtherVo">
|
||||||
@ -21,6 +22,7 @@
|
|||||||
a.sales_support,
|
a.sales_support,
|
||||||
a.money_user_id,
|
a.money_user_id,
|
||||||
mu.company as money_company,
|
mu.company as money_company,
|
||||||
|
a.cabinet_number,
|
||||||
a.del_flag,
|
a.del_flag,
|
||||||
a.create_by,
|
a.create_by,
|
||||||
a.create_time,
|
a.create_time,
|
||||||
@ -57,6 +59,7 @@
|
|||||||
<if test="billCode != null and billCode != ''">bill_code,</if>
|
<if test="billCode != null and billCode != ''">bill_code,</if>
|
||||||
<if test="salesSupport != null and salesSupport != ''">sales_support,</if>
|
<if test="salesSupport != null and salesSupport != ''">sales_support,</if>
|
||||||
<if test="moneyUserId != null">money_user_id,</if>
|
<if test="moneyUserId != null">money_user_id,</if>
|
||||||
|
<if test="cabinetNumber != null">cabinet_number,</if>
|
||||||
<if test="delFlag != null and delFlag != ''">del_flag,</if>
|
<if test="delFlag != null and delFlag != ''">del_flag,</if>
|
||||||
<if test="createBy != null and createBy != ''">create_by,</if>
|
<if test="createBy != null and createBy != ''">create_by,</if>
|
||||||
<if test="createTime != null">create_time,</if>
|
<if test="createTime != null">create_time,</if>
|
||||||
@ -71,6 +74,7 @@
|
|||||||
<if test="billCode != null and billCode != ''">#{billCode},</if>
|
<if test="billCode != null and billCode != ''">#{billCode},</if>
|
||||||
<if test="salesSupport != null and salesSupport != ''">#{salesSupport},</if>
|
<if test="salesSupport != null and salesSupport != ''">#{salesSupport},</if>
|
||||||
<if test="moneyUserId != null">#{moneyUserId},</if>
|
<if test="moneyUserId != null">#{moneyUserId},</if>
|
||||||
|
<if test="cabinetNumber != null">#{cabinetNumber},</if>
|
||||||
<if test="delFlag != null and delFlag != ''">#{delFlag},</if>
|
<if test="delFlag != null and delFlag != ''">#{delFlag},</if>
|
||||||
<if test="createBy != null and createBy != ''">#{createBy},</if>
|
<if test="createBy != null and createBy != ''">#{createBy},</if>
|
||||||
<if test="createTime != null">#{createTime},</if>
|
<if test="createTime != null">#{createTime},</if>
|
||||||
@ -89,6 +93,7 @@
|
|||||||
<if test="billCode != null and billCode != ''">bill_code = #{billCode},</if>
|
<if test="billCode != null and billCode != ''">bill_code = #{billCode},</if>
|
||||||
<if test="salesSupport != null">sales_support = #{salesSupport},</if>
|
<if test="salesSupport != null">sales_support = #{salesSupport},</if>
|
||||||
<if test="moneyUserId != null">money_user_id = #{moneyUserId},</if>
|
<if test="moneyUserId != null">money_user_id = #{moneyUserId},</if>
|
||||||
|
<if test="cabinetNumber != null">cabinet_number = #{cabinetNumber},</if>
|
||||||
<if test="delFlag != null and delFlag != ''">del_flag = #{delFlag},</if>
|
<if test="delFlag != null and delFlag != ''">del_flag = #{delFlag},</if>
|
||||||
<if test="updateBy != null and updateBy != ''">update_by = #{updateBy},</if>
|
<if test="updateBy != null and updateBy != ''">update_by = #{updateBy},</if>
|
||||||
<if test="updateTime != null">update_time = #{updateTime},</if>
|
<if test="updateTime != null">update_time = #{updateTime},</if>
|
||||||
|
|||||||
@ -36,11 +36,11 @@
|
|||||||
<result property="salesmen" column="salesmen" />
|
<result property="salesmen" column="salesmen" />
|
||||||
<result property="payee" column="payee" />
|
<result property="payee" column="payee" />
|
||||||
<result property="salesSupport" column="sales_support" />
|
<result property="salesSupport" column="sales_support" />
|
||||||
|
<result property="problemTypeName" column="problemTypeName" />
|
||||||
|
<result property="registerSiteName" column="registerSiteName" />
|
||||||
|
<result property="registerManName" column="registerManName" />
|
||||||
|
|
||||||
<association property="problemTypeName" column="problem_type" select="com.xdadan.erp.emis.mapper.EmisBaseMapper.selectProblemTypeNameById"/>
|
|
||||||
<association property="sendSiteName" column="send_site_code" select="com.xdadan.erp.emis.mapper.EmisBaseMapper.selectSiteNameByCode"/>
|
<association property="sendSiteName" column="send_site_code" select="com.xdadan.erp.emis.mapper.EmisBaseMapper.selectSiteNameByCode"/>
|
||||||
<association property="registerSiteName" column="register_site_code" select="com.xdadan.erp.emis.mapper.EmisBaseMapper.selectSiteNameByCode"/>
|
|
||||||
<association property="registerManName" column="register_man_code" select="com.xdadan.erp.emis.mapper.EmisBaseMapper.selectEmpNameByCode"/>
|
|
||||||
<association property="reversionSiteName" column="reversion_site_code" select="com.xdadan.erp.emis.mapper.EmisBaseMapper.selectSiteNameByCode"/>
|
<association property="reversionSiteName" column="reversion_site_code" select="com.xdadan.erp.emis.mapper.EmisBaseMapper.selectSiteNameByCode"/>
|
||||||
<association property="reversionManName" column="reversion_man_code" select="com.xdadan.erp.emis.mapper.EmisBaseMapper.selectEmpNameByCode"/>
|
<association property="reversionManName" column="reversion_man_code" select="com.xdadan.erp.emis.mapper.EmisBaseMapper.selectEmpNameByCode"/>
|
||||||
|
|
||||||
@ -54,10 +54,19 @@
|
|||||||
a.reversion_str, a.reversion_man, a.reversion_man_code, a.reversion_site_code, a.reversion_date,
|
a.reversion_str, a.reversion_man, a.reversion_man_code, a.reversion_site_code, a.reversion_date,
|
||||||
a.bl_checkok, a.deal_result, a.bl_see, a.file_path, a.del_flag, a.create_by, a.create_time,
|
a.bl_checkok, a.deal_result, a.bl_see, a.file_path, a.del_flag, a.create_by, a.create_time,
|
||||||
a.update_by, a.update_time, a.remark, a.create_site, a.update_site,
|
a.update_by, a.update_time, a.remark, a.create_site, a.update_site,
|
||||||
b.send_date, b.salesmen, b.payee, c.sales_support
|
b.send_date, b.salesmen, b.payee, c.sales_support,
|
||||||
|
pt.type_name as problemTypeName,
|
||||||
|
pt.type_name as problem_type_name,
|
||||||
|
u.emp_name as registerManName,
|
||||||
|
u.emp_name as register_man_name,
|
||||||
|
rs.site_name as register_site_name,
|
||||||
|
rs.site_name as registerSiteName
|
||||||
from emis_waybill_problem_info a
|
from emis_waybill_problem_info a
|
||||||
left join emis_waybill b on a.bill_code = b.bill_code and b.del_flag = '0'
|
left join emis_waybill b on a.bill_code = b.bill_code and b.del_flag = '0'
|
||||||
left join emis_waybill_other c on b.bill_code = c.bill_code and c.del_flag = '0'
|
left join emis_waybill_other c on b.bill_code = c.bill_code and c.del_flag = '0'
|
||||||
|
left join emis_problem_type pt on a.problem_type = pt.id and pt.del_flag = '0'
|
||||||
|
left join sys_user u on a.register_man_code = u.emp_code
|
||||||
|
left join emis_site rs on a.register_site_code = rs.site_code and rs.del_flag = '0'
|
||||||
</sql>
|
</sql>
|
||||||
|
|
||||||
<select id="selectEmisWaybillProblemInfoList" parameterType="EmisWaybillProblemInfo" resultMap="EmisWaybillProblemInfoResult">
|
<select id="selectEmisWaybillProblemInfoList" parameterType="EmisWaybillProblemInfo" resultMap="EmisWaybillProblemInfoResult">
|
||||||
|
|||||||
@ -18,6 +18,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
<result property="transferResean" column="transfer_resean" />
|
<result property="transferResean" column="transfer_resean" />
|
||||||
<result property="transferCity" column="transfer_city" />
|
<result property="transferCity" column="transfer_city" />
|
||||||
<result property="dataFrom" column="data_from" />
|
<result property="dataFrom" column="data_from" />
|
||||||
|
<result property="transferPlatform" column="transfer_platform" />
|
||||||
|
|
||||||
</resultMap>
|
</resultMap>
|
||||||
|
|
||||||
@ -31,7 +32,22 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
</resultMap>
|
</resultMap>
|
||||||
|
|
||||||
<sql id="selectEmisWaybillTransferVo">
|
<sql id="selectEmisWaybillTransferVo">
|
||||||
select id, bill_code, transfer_bill_code, transfer_date, transfer_express, link_man, link_phone, transfer_fee, transfer_weight, transfer_volume, transfer_resean, transfer_city, data_from, del_flag, create_by, create_time, update_by, update_time, remark, create_site, update_site from emis_waybill_transfer a
|
select
|
||||||
|
id, bill_code, transfer_bill_code, transfer_date, transfer_express, link_man, link_phone, transfer_fee,
|
||||||
|
transfer_weight, transfer_volume, transfer_resean, transfer_city, data_from, del_flag, create_by,
|
||||||
|
create_time, update_by, update_time, remark, create_site, update_site,
|
||||||
|
(select su.emp_name from sys_user su where su.user_id = a.create_by limit 1) as create_by_name,
|
||||||
|
(select es.site_name from emis_site es where es.site_code = a.create_site limit 1) as create_site_name,
|
||||||
|
case
|
||||||
|
when json_unquote(
|
||||||
|
json_extract(
|
||||||
|
(select sc.config_value from sys_config sc where sc.config_key = 'sys.express.query.channel' limit 1),
|
||||||
|
concat('$."', lower(a.transfer_express), '".chId')
|
||||||
|
)
|
||||||
|
) = '17track' then '1'
|
||||||
|
else '2'
|
||||||
|
end as transfer_platform
|
||||||
|
from emis_waybill_transfer a
|
||||||
</sql>
|
</sql>
|
||||||
|
|
||||||
<select id="selectEmisWaybillTransferList" parameterType="EmisWaybillTransfer" resultMap="EmisWaybillTransferResult">
|
<select id="selectEmisWaybillTransferList" parameterType="EmisWaybillTransfer" resultMap="EmisWaybillTransferResult">
|
||||||
@ -58,6 +74,19 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
<if test="updateBy != null and updateBy != ''"> and update_by like concat('%', #{updateBy}, '%')</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="updateTime != null "> and update_time = #{updateTime}</if>
|
||||||
<if test="remark != null and remark != ''"> and remark like concat('%', #{remark}, '%')</if>
|
<if test="remark != null and remark != ''"> and remark like concat('%', #{remark}, '%')</if>
|
||||||
|
<if test="transferPlatform != null and transferPlatform != ''">
|
||||||
|
and (
|
||||||
|
case
|
||||||
|
when json_unquote(
|
||||||
|
json_extract(
|
||||||
|
(select sc.config_value from sys_config sc where sc.config_key = 'sys.express.query.channel' limit 1),
|
||||||
|
concat('$."', lower(a.transfer_express), '".chId')
|
||||||
|
)
|
||||||
|
) = '17track' then '1'
|
||||||
|
else '2'
|
||||||
|
end
|
||||||
|
) = #{transferPlatform}
|
||||||
|
</if>
|
||||||
<if test="createSite != null and createSite != ''"> and create_site=#{createSite}</if>
|
<if test="createSite != null and createSite != ''"> and create_site=#{createSite}</if>
|
||||||
<if test="updateSite != null and updateSite != ''"> and update_site=#{updateSite}</if>
|
<if test="updateSite != null and updateSite != ''"> and update_site=#{updateSite}</if>
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user