This commit is contained in:
linfso 2025-07-14 19:24:27 +08:00
parent f1b77c5f4d
commit ae738bf4cc
8 changed files with 19 additions and 14 deletions

View File

@ -88,7 +88,7 @@ public class EmisCommissionProfitController extends BaseController
for (int i = 0; i < billCodeSortList.length; i++) { for (int i = 0; i < billCodeSortList.length; i++) {
String subBillCode = billCodeSortList[i]; String subBillCode = billCodeSortList[i];
try { try {
emisCommissionProfitService.reCalcProfitByBillCode(subBillCode); emisCommissionProfitService.reCalcProfitByBillCode(subBillCode,null);
} catch (Exception ex) { } catch (Exception ex) {
return AjaxResult.error("计算失败-单号:[" + subBillCode + "]"); return AjaxResult.error("计算失败-单号:[" + subBillCode + "]");
} }

View File

@ -804,9 +804,9 @@ public class EmisCommonController extends EmisBaseController
* @return * @return
*/ */
@GetMapping("/reCalcEmpProfitByBillCode") @GetMapping("/reCalcEmpProfitByBillCode")
public AjaxResult reCalcEmpProfitByBillCode(String billCode){ public AjaxResult reCalcEmpProfitByBillCode(String billCode,Integer postType){
try{ try{
emisCommissionProfitService.reCalcProfitByBillCode(billCode); emisCommissionProfitService.reCalcProfitByBillCode(billCode,postType);
} }
catch (Exception ex){ catch (Exception ex){
ex.printStackTrace(); ex.printStackTrace();

View File

@ -5234,7 +5234,7 @@ public class EmisBaseService {
emisWaybillProblemInfoService.deleteEmisWaybillProblemInfoByBillCode(emisWaybillSave.getBillCode()); emisWaybillProblemInfoService.deleteEmisWaybillProblemInfoByBillCode(emisWaybillSave.getBillCode());
} }
// 重新计算提成 // 重新计算提成
emisCommissionProfitService.reCalcProfitByBillCode(emisWaybillSave.getBillCode()); emisCommissionProfitService.reCalcProfitByBillCode(emisWaybillSave.getBillCode(),null);
} }
} }
} }

View File

@ -47,7 +47,7 @@ public interface IEmisCommissionProfitService
* @param billCode * @param billCode
* @return * @return
*/ */
public void reCalcProfitByBillCode(String billCode); public void reCalcProfitByBillCode(String billCode,Integer postType);
/** /**

View File

@ -180,7 +180,7 @@ public class EmisCommissionProfitServiceImpl extends EmisBaseService implements
// 计算运单提成 // 计算运单提成
for (EmisWaybill waybill : dataList) { for (EmisWaybill waybill : dataList) {
try { try {
reCalcProfitByBillCode(waybill.getBillCode()); reCalcProfitByBillCode(waybill.getBillCode(),null);
}catch (Exception ex){ }catch (Exception ex){
ex.printStackTrace(); ex.printStackTrace();
} }
@ -310,7 +310,7 @@ public class EmisCommissionProfitServiceImpl extends EmisBaseService implements
*/ */
@Override @Override
@Transactional @Transactional
public void reCalcProfitByBillCode(String billCode) public void reCalcProfitByBillCode(String billCode,Integer postType)
{ {
String lockKey="reCalcProfitByBillCode"+billCode; String lockKey="reCalcProfitByBillCode"+billCode;
// 加锁查询 // 加锁查询
@ -889,7 +889,12 @@ public class EmisCommissionProfitServiceImpl extends EmisBaseService implements
String billMonth= DateUtils.parseDateToStr(DateUtils.YYYY_MM,waybill.getSendDate()); String billMonth= DateUtils.parseDateToStr(DateUtils.YYYY_MM,waybill.getSendDate());
SysUser empUser = getEmisStaffByCode(waybill.getOperateEmployeeCode()); SysUser empUser = getEmisStaffByCode(waybill.getOperateEmployeeCode().trim());
if(empUser==null){
return;
}
EmisTransLine transLine=getTransLineByCode(waybill.getTransLineType()); EmisTransLine transLine=getTransLineByCode(waybill.getTransLineType());
EmisCommissionQuote emisCommissionQuote = new EmisCommissionQuote(); EmisCommissionQuote emisCommissionQuote = new EmisCommissionQuote();

View File

@ -387,7 +387,7 @@ public class EmisWaybillAjustApplyServiceImpl extends EmisBaseService implements
if ("6".equals(emisWaybillOld.getPaymentType()) && !"6".equals(emisWaybillSave.getPaymentType())) { if ("6".equals(emisWaybillOld.getPaymentType()) && !"6".equals(emisWaybillSave.getPaymentType())) {
// 重新计算提成 // 重新计算提成
emisCommissionProfitService.reCalcProfitByBillCode(emisWaybillSave.getBillCode()); emisCommissionProfitService.reCalcProfitByBillCode(emisWaybillSave.getBillCode(),null);
} }
if (!"6".equals(emisWaybillOld.getPaymentType()) && "6".equals(emisWaybillSave.getPaymentType())) { if (!"6".equals(emisWaybillOld.getPaymentType()) && "6".equals(emisWaybillSave.getPaymentType())) {
// 删除提成 // 删除提成

View File

@ -127,7 +127,7 @@ public class EmisWaybillProblemInfoServiceImpl extends EmisBaseService implement
EmisWaybill waybill = getWaybillByBillCode(emisWaybillProblemInfo.getBillCode()); EmisWaybill waybill = getWaybillByBillCode(emisWaybillProblemInfo.getBillCode());
if (!"6".equals(waybill.getPaymentType())) { if (!"6".equals(waybill.getPaymentType())) {
// 重新计算提成 // 重新计算提成
emisCommissionProfitService.reCalcProfitByBillCode(emisWaybillProblemInfo.getBillCode()); emisCommissionProfitService.reCalcProfitByBillCode(emisWaybillProblemInfo.getBillCode(),null);
} }
// 删除运单的问题件记录 // 删除运单的问题件记录
@ -175,7 +175,7 @@ public class EmisWaybillProblemInfoServiceImpl extends EmisBaseService implement
EmisWaybill waybill = getWaybillByBillCode(emisWaybillProblemInfo.getBillCode()); EmisWaybill waybill = getWaybillByBillCode(emisWaybillProblemInfo.getBillCode());
if (!"6".equals(waybill.getPaymentType())) { if (!"6".equals(waybill.getPaymentType())) {
// 重新计算提成 // 重新计算提成
emisCommissionProfitService.reCalcProfitByBillCode(emisWaybillProblemInfo.getBillCode()); emisCommissionProfitService.reCalcProfitByBillCode(emisWaybillProblemInfo.getBillCode(),null);
} }
// 删除运单的问题件记录 // 删除运单的问题件记录

View File

@ -1518,7 +1518,7 @@ public class EmisWaybillServiceImpl extends EmisBaseService implements IEmisWayb
if ("6".equals(emisWaybillOld.getPaymentType()) && !"6".equals(emisWaybillSave.getPaymentType())) { if ("6".equals(emisWaybillOld.getPaymentType()) && !"6".equals(emisWaybillSave.getPaymentType())) {
// 重新计算提成 // 重新计算提成
emisCommissionProfitService.reCalcProfitByBillCode(emisWaybillSave.getBillCode()); emisCommissionProfitService.reCalcProfitByBillCode(emisWaybillSave.getBillCode(),null);
} }
if (!"6".equals(emisWaybillOld.getPaymentType()) && "6".equals(emisWaybillSave.getPaymentType())) { if (!"6".equals(emisWaybillOld.getPaymentType()) && "6".equals(emisWaybillSave.getPaymentType())) {
// 删除提成 // 删除提成
@ -3279,7 +3279,7 @@ public class EmisWaybillServiceImpl extends EmisBaseService implements IEmisWayb
// 重新计算提成 // 重新计算提成
if (!"6".equals(emisWaybillSave.getPaymentType()) && !"1".equals(emisWaybillSave.getBlVirtual())) { if (!"6".equals(emisWaybillSave.getPaymentType()) && !"1".equals(emisWaybillSave.getBlVirtual())) {
emisCommissionProfitService.reCalcProfitByBillCode(emisWaybillSave.getBillCode()); emisCommissionProfitService.reCalcProfitByBillCode(emisWaybillSave.getBillCode(),null);
} }
}catch (Exception ex){ }catch (Exception ex){
@ -3714,7 +3714,7 @@ public class EmisWaybillServiceImpl extends EmisBaseService implements IEmisWayb
redoGenerateBill(emisWaybillSave.getBillCode(),isForce); redoGenerateBill(emisWaybillSave.getBillCode(),isForce);
// 重新计算提成 // 重新计算提成
emisCommissionProfitService.reCalcProfitByBillCode(emisWaybillSave.getBillCode()); emisCommissionProfitService.reCalcProfitByBillCode(emisWaybillSave.getBillCode(),null);
// 设置需要重新计算成本 // 设置需要重新计算成本
emisWaybillMapper.cancelHasDoCostFee(emisWaybillSave.getBillCode()); emisWaybillMapper.cancelHasDoCostFee(emisWaybillSave.getBillCode());