From 73f879551a64659963d2c7d122200e6680e2c3a1 Mon Sep 17 00:00:00 2001 From: linfso Date: Wed, 22 May 2024 05:47:01 +0800 Subject: [PATCH] md --- .../erp/emis/service/EmisBaseService.java | 32 +++++++++++++++++++ .../EmisWaybillProblemInfoServiceImpl.java | 8 +++-- 2 files changed, 38 insertions(+), 2 deletions(-) diff --git a/emis-biz/src/main/java/com/xdadan/erp/emis/service/EmisBaseService.java b/emis-biz/src/main/java/com/xdadan/erp/emis/service/EmisBaseService.java index e934a9fb7..8eb630ce7 100644 --- a/emis-biz/src/main/java/com/xdadan/erp/emis/service/EmisBaseService.java +++ b/emis-biz/src/main/java/com/xdadan/erp/emis/service/EmisBaseService.java @@ -85,6 +85,9 @@ public class EmisBaseService { @Autowired protected EmisTmsScanRecordMapper emisTmsScanRecordMapper; + @Autowired + private EmisProblemTypeMapper emisProblemTypeMapper; + @Autowired private EmisSiteMapper emisSiteMapper; @@ -365,7 +368,36 @@ public class EmisBaseService { return emisWaybillMapper.updateEmisWaybillByBillCode(emisWaybill); } + /** + * 获取问题件 + * @param problemType + * @return + */ + public EmisProblemType getEmisProblemTypeByType(String problemType){ + return emisProblemTypeMapper.selectEmisProblemTypeById(Long.valueOf(problemType)) + } + /** + * 问题件改变运单的状态 + * @param billCode + * @param problemType + * @param problemCause + * @return + */ + public int changeWaybillProblemInfo(String billCode,String problemType,String problemCause){ + EmisWaybill emisWaybill = new EmisWaybill(); + emisWaybill.setBlIsQuestion("1"); + emisWaybill.setProblemType(problemType); + emisWaybill.setProblemCause(problemCause); + emisWaybill.setBillCode(billCode); + + EmisProblemType emisProblemType = getEmisProblemTypeByType(problemType); + Integer problemDelayDays=emisProblemType.getDelayDay(); + + emisWaybill.setProblemDelayDays(problemDelayDays); + + return emisWaybillMapper.updateEmisWaybillByBillCode(emisWaybill); + } /** * 改变运单状态 diff --git a/emis-biz/src/main/java/com/xdadan/erp/emis/service/impl/EmisWaybillProblemInfoServiceImpl.java b/emis-biz/src/main/java/com/xdadan/erp/emis/service/impl/EmisWaybillProblemInfoServiceImpl.java index 91c6d15f0..583fc8719 100644 --- a/emis-biz/src/main/java/com/xdadan/erp/emis/service/impl/EmisWaybillProblemInfoServiceImpl.java +++ b/emis-biz/src/main/java/com/xdadan/erp/emis/service/impl/EmisWaybillProblemInfoServiceImpl.java @@ -11,6 +11,8 @@ package com.xdadan.erp.emis.service.impl; import java.util.List; + +import com.xdadan.erp.emis.service.EmisBaseService; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import com.xdadan.erp.emis.domain.EmisWaybillProblemInfo; @@ -24,7 +26,7 @@ import com.xdadan.erp.emis.service.IEmisWaybillProblemInfoService; * @date 2024-03-01 08:55:01 */ @Service -public class EmisWaybillProblemInfoServiceImpl implements IEmisWaybillProblemInfoService +public class EmisWaybillProblemInfoServiceImpl extends EmisBaseService implements IEmisWaybillProblemInfoService { @Autowired private EmisWaybillProblemInfoMapper emisWaybillProblemInfoMapper; @@ -62,7 +64,8 @@ public class EmisWaybillProblemInfoServiceImpl implements IEmisWaybillProblemInf @Override public int insertEmisWaybillProblemInfo(EmisWaybillProblemInfo emisWaybillProblemInfo) { - // + // 标记运单问题件 + this.changeWaybillProblemInfo(emisWaybillProblemInfo.getBillCode(),emisWaybillProblemInfo.getProblemType(),emisWaybillProblemInfo.getProblemCause()); return emisWaybillProblemInfoMapper.insertEmisWaybillProblemInfo(emisWaybillProblemInfo); } @@ -75,6 +78,7 @@ public class EmisWaybillProblemInfoServiceImpl implements IEmisWaybillProblemInf @Override public int updateEmisWaybillProblemInfo(EmisWaybillProblemInfo emisWaybillProblemInfo) { + this.changeWaybillProblemInfo(emisWaybillProblemInfo.getBillCode(),emisWaybillProblemInfo.getProblemType(),emisWaybillProblemInfo.getProblemCause()); return emisWaybillProblemInfoMapper.updateEmisWaybillProblemInfo(emisWaybillProblemInfo); }