md
This commit is contained in:
parent
ffb5607a2d
commit
05bb3819c2
@ -645,14 +645,14 @@ public class EmisCommonController extends EmisBaseController
|
|||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@GetMapping("/autoDoProfitTrigger")
|
@GetMapping("/autoDoProfitTrigger")
|
||||||
public AjaxResult autoDoProfitTrigger(){
|
public AjaxResult autoDoProfitTrigger(EmisWaybill emisWaybill){
|
||||||
String lockKey="autoDoProfitTrigger";
|
String lockKey="autoDoProfitTrigger";
|
||||||
log.info("autoDoProfitTrigger start");
|
log.info("autoDoProfitTrigger start");
|
||||||
|
|
||||||
// 加锁查询
|
// 加锁查询
|
||||||
redissonService.lock(lockKey,300);
|
redissonService.lock(lockKey,300);
|
||||||
try{
|
try{
|
||||||
emisCommissionProfitService.autoDoProfit();
|
emisCommissionProfitService.autoDoProfit(emisWaybill);
|
||||||
}catch(Exception ex){
|
}catch(Exception ex){
|
||||||
ex.printStackTrace();
|
ex.printStackTrace();
|
||||||
log.error("autoDoProfitTrigger exception:"+ex.getMessage());
|
log.error("autoDoProfitTrigger exception:"+ex.getMessage());
|
||||||
|
|||||||
@ -11,8 +11,9 @@ package com.xdadan.erp.emis.service;
|
|||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import com.xdadan.erp.emis.domain.EmisCommissionProfit;
|
import com.xdadan.erp.emis.domain.EmisCommissionProfit;
|
||||||
|
import com.xdadan.erp.emis.domain.EmisWaybill;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @ClassName EmisCommissionProfitService
|
* @ClassName EmisCommissionProfitService
|
||||||
* @Description 员工提成表
|
* @Description 员工提成表
|
||||||
* @author linfso
|
* @author linfso
|
||||||
@ -31,7 +32,7 @@ public interface IEmisCommissionProfitService
|
|||||||
/**
|
/**
|
||||||
* 自动计算提成
|
* 自动计算提成
|
||||||
*/
|
*/
|
||||||
public void autoDoProfit();
|
public void autoDoProfit(EmisWaybill emisWaybill);
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@ -74,12 +74,11 @@ public class EmisCommissionProfitServiceImpl extends EmisBaseService implements
|
|||||||
*/
|
*/
|
||||||
@Async
|
@Async
|
||||||
@Override
|
@Override
|
||||||
public void autoDoProfit() {
|
public void autoDoProfit(EmisWaybill emisWaybill) {
|
||||||
|
|
||||||
Map<String,Map<String,String> > profitMap = new HashMap<>();
|
Map<String,Map<String,String> > profitMap = new HashMap<>();
|
||||||
// 获取需要出账的运单列表
|
// 获取需要出账的运单列表
|
||||||
EmisWaybill qEmisWaybill = new EmisWaybill();
|
List<EmisWaybill> list = emisWaybillMapper.selectWaitDoProfitList(emisWaybill);
|
||||||
List<EmisWaybill> list = emisWaybillMapper.selectWaitDoProfitList(qEmisWaybill);
|
|
||||||
|
|
||||||
// 多线程并发处理
|
// 多线程并发处理
|
||||||
if(!CollectionUtil.isEmpty(list)){
|
if(!CollectionUtil.isEmpty(list)){
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user