|
|
|
@ -14,9 +14,9 @@ import com.logpm.basicdata.feign.IWarehouseLeasingClient;
|
|
|
|
|
import com.logpm.distribution.entity.QualityDeliverEntity; |
|
|
|
|
import com.logpm.distribution.feign.IQualityDeliverClient; |
|
|
|
|
import com.logpm.statistics.entity.ExpenseWarehouseDayEntity; |
|
|
|
|
import com.logpm.statistics.service.IExpenseDispatchFinancialReviewService; |
|
|
|
|
import com.logpm.statistics.service.IExpenseDispatchTrainDetailService; |
|
|
|
|
import com.logpm.statistics.entity.ExpenseWarehouseMonthEntity; |
|
|
|
|
import com.logpm.statistics.service.IExpenseWarehouseDayService; |
|
|
|
|
import com.logpm.statistics.service.IExpenseWarehouseMonthService; |
|
|
|
|
import com.xxl.job.core.biz.model.ReturnT; |
|
|
|
|
import com.xxl.job.core.handler.annotation.XxlJob; |
|
|
|
|
import lombok.AllArgsConstructor; |
|
|
|
@ -43,10 +43,6 @@ import java.util.stream.Collectors;
|
|
|
|
|
@Slf4j |
|
|
|
|
public class ExpenseJob { |
|
|
|
|
|
|
|
|
|
@Resource |
|
|
|
|
private IExpenseDispatchFinancialReviewService financialReviewService; |
|
|
|
|
@Resource |
|
|
|
|
private IExpenseDispatchTrainDetailService trainDetailService; |
|
|
|
|
@Resource |
|
|
|
|
private IBasicdataWarehouseClient warehouseClient; |
|
|
|
|
@Resource |
|
|
|
@ -55,6 +51,8 @@ public class ExpenseJob {
|
|
|
|
|
private IQualityDeliverClient qualityDeliverClient; |
|
|
|
|
@Resource |
|
|
|
|
private IExpenseWarehouseDayService warehouseDayService; |
|
|
|
|
@Resource |
|
|
|
|
private IExpenseWarehouseMonthService warehouseMonthService; |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* 仓库月度仓储成本统计表 |
|
|
|
@ -66,7 +64,15 @@ public class ExpenseJob {
|
|
|
|
|
*/ |
|
|
|
|
@XxlJob("monthWarehouseExpenseJob") |
|
|
|
|
public ReturnT<String> monthWarehouseExpenseJob(String param) throws Exception { |
|
|
|
|
|
|
|
|
|
log.info("monthWarehouseExpenseJob 参数:{}", param); |
|
|
|
|
DateTime statisticsTime = DateUtil.lastMonth(); |
|
|
|
|
if (StrUtil.isNotEmpty(param)) { |
|
|
|
|
statisticsTime = DateUtil.parseDate(param); |
|
|
|
|
} |
|
|
|
|
List<ExpenseWarehouseMonthEntity> monthEntityList = warehouseDayService.statisticsMonthWarehouseExpense(DateUtil.year(statisticsTime), DateUtil.month(statisticsTime)); |
|
|
|
|
if (CollUtil.isNotEmpty(monthEntityList)) { |
|
|
|
|
warehouseMonthService.saveBatch(monthEntityList); |
|
|
|
|
} |
|
|
|
|
return ReturnT.SUCCESS; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
@ -275,34 +281,4 @@ public class ExpenseJob {
|
|
|
|
|
entity.setTemporaryTurnoverArea(Convert.toStr(warehouse.getTemporaryTurnoverArea())); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* 配送财务审单 |
|
|
|
|
* 每个月1号早上4点执行 |
|
|
|
|
* |
|
|
|
|
* @param param |
|
|
|
|
* @return |
|
|
|
|
* @throws Exception |
|
|
|
|
*/ |
|
|
|
|
@XxlJob("expenseDispatchFinancialReviewJob") |
|
|
|
|
public ReturnT<String> expenseDispatchFinancialReviewJob(String param) throws Exception { |
|
|
|
|
|
|
|
|
|
financialReviewService.expenseDispatchFinancialReviewJob(); |
|
|
|
|
return ReturnT.SUCCESS; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* 车辆成本明细表 job |
|
|
|
|
* 每天晚上凌晨0点执行 |
|
|
|
|
* |
|
|
|
|
* @param param |
|
|
|
|
* @return |
|
|
|
|
* @throws Exception |
|
|
|
|
*/ |
|
|
|
|
@XxlJob("carExpenseDispatchDetailJob") |
|
|
|
|
public ReturnT<String> carExpenseDispatchDetailJob(String param) throws Exception { |
|
|
|
|
trainDetailService.carExpenseDispatchDetailJob(param); |
|
|
|
|
return ReturnT.SUCCESS; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
|