md
This commit is contained in:
parent
f324d8e582
commit
b0920222d2
@ -149,6 +149,18 @@ public class EmisTmsCostFeeController extends BaseController
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Log(title = "重新计算运单费用ByBillCode", businessType = BusinessType.UPDATE)
|
||||||
|
@PostMapping("/reCalcSplitCostFeeByBillCode")
|
||||||
|
public AjaxResult reCalcSplitCostFeeByBillCode(String billCode)
|
||||||
|
{
|
||||||
|
try {
|
||||||
|
return toAjax(emisTmsCostFeeService.reCalcCostFeeByBillCode(billCode));
|
||||||
|
}catch(EmisBizError ex){
|
||||||
|
ex.printStackTrace();
|
||||||
|
return AjaxResult.error("("+ex.getErrorCode()+")"+ex.getMessage());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 修改TMS运输成本账单
|
* 修改TMS运输成本账单
|
||||||
*/
|
*/
|
||||||
|
|||||||
@ -92,6 +92,21 @@ public interface IEmisTmsCostFeeService
|
|||||||
public int reCalcSplitCostFee(String costNo) throws EmisBizError;
|
public int reCalcSplitCostFee(String costNo) throws EmisBizError;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 单个运单费用重算
|
||||||
|
* @param billCode
|
||||||
|
* @return
|
||||||
|
* @throws EmisBizError
|
||||||
|
*/
|
||||||
public int reCalcCostFeeByBillCode(String billCode) throws EmisBizError;
|
public int reCalcCostFeeByBillCode(String billCode) throws EmisBizError;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 合并成本费用
|
||||||
|
* @param billCode
|
||||||
|
* @return
|
||||||
|
* @throws EmisBizError
|
||||||
|
*/
|
||||||
|
public int mergeCostFeeByBillCode(String billCode) throws EmisBizError;
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -256,10 +256,10 @@ public class EmisTmsCostFeeServiceImpl implements IEmisTmsCostFeeService
|
|||||||
|
|
||||||
emisTmsCostFeeMapper.updateEmisTmsCostFee(emisTmsCostFee);
|
emisTmsCostFeeMapper.updateEmisTmsCostFee(emisTmsCostFee);
|
||||||
|
|
||||||
// 重算每一单成本分摊重算,利润
|
// 合并单个运单费用
|
||||||
for (EmisTmsCostFeeRel feeRel: listBillCodeRel) {
|
for (EmisTmsCostFeeRel feeRel: listBillCodeRel) {
|
||||||
try {
|
try {
|
||||||
reCalcCostFeeByBillCode(feeRel.getBillCode());
|
mergeCostFeeByBillCode(feeRel.getBillCode());
|
||||||
}catch (Exception ex){
|
}catch (Exception ex){
|
||||||
ex.printStackTrace();
|
ex.printStackTrace();
|
||||||
}
|
}
|
||||||
@ -267,8 +267,9 @@ public class EmisTmsCostFeeServiceImpl implements IEmisTmsCostFeeService
|
|||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 重算每一单成本分摊重算,利润
|
* 重算单个运单成本
|
||||||
* @param billCode
|
* @param billCode
|
||||||
* @return
|
* @return
|
||||||
* @throws EmisBizError
|
* @throws EmisBizError
|
||||||
@ -276,6 +277,30 @@ public class EmisTmsCostFeeServiceImpl implements IEmisTmsCostFeeService
|
|||||||
@Override
|
@Override
|
||||||
@Transactional
|
@Transactional
|
||||||
public int reCalcCostFeeByBillCode(String billCode) throws EmisBizError {
|
public int reCalcCostFeeByBillCode(String billCode) throws EmisBizError {
|
||||||
|
// 根据运单搜索成本费用
|
||||||
|
List<EmisTmsCostFeeRel> listBillCodeRel=emisTmsCostFeeRelMapper.selectEmisTmsCostFeeRelListByBillCode(billCode);
|
||||||
|
if(!CollectionUtil.isEmpty(listBillCodeRel)){
|
||||||
|
for(EmisTmsCostFeeRel item:listBillCodeRel){
|
||||||
|
try {
|
||||||
|
reCalcSplitCostFee(item.getCostNo());
|
||||||
|
}catch (Exception ex){
|
||||||
|
ex.printStackTrace();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 合并成本费用
|
||||||
|
* @param billCode
|
||||||
|
* @return
|
||||||
|
* @throws EmisBizError
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
@Transactional
|
||||||
|
public int mergeCostFeeByBillCode(String billCode) throws EmisBizError {
|
||||||
|
|
||||||
EmisTmsCostProfit emisTmsCostProfit=emisTmsCostProfitMapper.selectEmisTmsCostProfitByBillCode(billCode);
|
EmisTmsCostProfit emisTmsCostProfit=emisTmsCostProfitMapper.selectEmisTmsCostProfitByBillCode(billCode);
|
||||||
if(emisTmsCostProfit==null){
|
if(emisTmsCostProfit==null){
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user