md
This commit is contained in:
parent
276f04e9f0
commit
cf86312fb5
@ -1115,4 +1115,27 @@ public class EmisCommonController extends EmisBaseController
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* 触发生成用户必要通知
|
||||
* @return
|
||||
*/
|
||||
@GetMapping("/autoDoReCalcCostFeeTrigger")
|
||||
public AjaxResult autoDoReCalcCostFeeTrigger() {
|
||||
// EmisSettleBill emisSettleBill=new EmisSettleBill();
|
||||
// emisSettleBill.getParams().put("isNeedRecdPay",1);
|
||||
// List<BillPayStatInfo> listExpireNoPayStatInfo = emisSettleBillService.selectBillPayStatInfoList(emisSettleBill);
|
||||
// if(!CollectionUtils.isEmpty(listExpireNoPayStatInfo)){
|
||||
// for (BillPayStatInfo item:listExpireNoPayStatInfo) {
|
||||
// String salesmen=item.getSalesmen();
|
||||
// String billMonth=item.getBillMonth();
|
||||
// String msg="截止"+DateUtils.parseDateToStr("yyyy-MM-dd HH点",new Date())+"有未回款,尽快联系客户收款,账期:"+billMonth+",待收:"+item.getNoRecdPayMoney()+"元,超期:"+item.getExpiredNoRecdPayMoney()+"元!";
|
||||
// AjaxResult rst=NoticeUtils.outSendNoticeToInner(msg,msg,"/ruyERj/BillPaybackSumList",salesmen,3);
|
||||
// log.info(msg);
|
||||
// }
|
||||
// }
|
||||
|
||||
return AjaxResult.success("发送成功");
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ -14,14 +14,17 @@ package com.xdadan.erp.web.emis;
|
||||
import java.util.List;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
import cn.hutool.core.collection.CollectionUtil;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.xdadan.erp.emis.domain.EmisWaybill;
|
||||
import com.xdadan.erp.emis.domain.exception.EmisBizError;
|
||||
import com.xdadan.erp.emis.utils.WaybillHelper;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.dao.DuplicateKeyException;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.PutMapping;
|
||||
@ -47,6 +50,7 @@ import com.xdadan.erp.emis.service.IEmisTmsCostFeeService;
|
||||
* @author linfso
|
||||
* @date 2024-10-10 01:53:20
|
||||
*/
|
||||
@Slf4j
|
||||
@RestController
|
||||
@RequestMapping("/emis/emisTmsCostFee")
|
||||
public class EmisTmsCostFeeController extends BaseController
|
||||
@ -131,6 +135,8 @@ public class EmisTmsCostFeeController extends BaseController
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
@Log(title = "重新计算运单费用", businessType = BusinessType.UPDATE)
|
||||
@PostMapping("/reCalcSplitCostFee")
|
||||
public AjaxResult reCalcSplitCostFee(@RequestBody EmisTmsCostFee emisTmsCostFee)
|
||||
@ -141,7 +147,6 @@ public class EmisTmsCostFeeController extends BaseController
|
||||
ex.printStackTrace();
|
||||
return AjaxResult.error("("+ex.getErrorCode()+")"+ex.getMessage());
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@ -140,6 +140,9 @@ public class EmisBaseService {
|
||||
@Autowired
|
||||
private Sms253Service sms253Service;
|
||||
|
||||
@Autowired
|
||||
private EmisTmsCostFeeMapper emisTmsCostFeeMapper;
|
||||
|
||||
|
||||
|
||||
private static SysUser emptySysUser = new SysUser();
|
||||
@ -1213,6 +1216,8 @@ public class EmisBaseService {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
@Transactional
|
||||
public void redoGenerateBill(String billCode) throws EmisBizError{
|
||||
log.info("===>Start 运单出账:"+billCode);
|
||||
|
||||
@ -77,7 +77,18 @@ public interface IEmisTmsCostFeeService
|
||||
*/
|
||||
public int deleteEmisTmsCostFeeById(Long id);
|
||||
|
||||
/**
|
||||
* 批量计算
|
||||
* @throws EmisBizError
|
||||
*/
|
||||
public void redoCalcCostFeeProfit() throws EmisBizError;
|
||||
|
||||
/**
|
||||
* 单个计算
|
||||
* @param costNo
|
||||
* @return
|
||||
* @throws EmisBizError
|
||||
*/
|
||||
public int reCalcSplitCostFee(String costNo) throws EmisBizError;
|
||||
|
||||
public int reCalcCostFeeByBillCode(String billCode) throws EmisBizError;
|
||||
|
||||
@ -139,6 +139,26 @@ public class EmisTmsCostFeeServiceImpl implements IEmisTmsCostFeeService
|
||||
return 1;
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量计算运单收益
|
||||
* @throws EmisBizError
|
||||
*/
|
||||
@Transactional
|
||||
@Override
|
||||
public void redoCalcCostFeeProfit() throws EmisBizError {
|
||||
List<EmisTmsCostFee> listCostFee=emisTmsCostFeeMapper.selectWaitDoCalcCostFeeList();
|
||||
if(!CollectionUtil.isEmpty(listCostFee)){
|
||||
for(EmisTmsCostFee item:listCostFee){
|
||||
try {
|
||||
reCalcSplitCostFee(item.getCostNo());
|
||||
}catch (Exception ex){
|
||||
ex.printStackTrace();
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 成本分摊重算
|
||||
* @param costNo
|
||||
|
||||
Loading…
Reference in New Issue
Block a user