添加日志;
This commit is contained in:
+1
@@ -73,6 +73,7 @@ public class ScheduledTaskServiceImpl extends ServiceImpl<ScheduledTaskMapper, S
|
||||
} else if ("散租".equals(leaseType)) {
|
||||
ScatteredRentalSynchronization(busId);
|
||||
}
|
||||
log.info("结束执行出账业务");
|
||||
} catch (Exception e) {
|
||||
log.error("出账业务异常", e);
|
||||
}
|
||||
|
||||
+15
-9
@@ -64,13 +64,18 @@ public class BillingScheduler {
|
||||
}
|
||||
|
||||
private void executeTask(ScheduledTask task) {
|
||||
String status = "";
|
||||
String status = "SUCCESS";
|
||||
try {
|
||||
// 执行具体的出账逻辑
|
||||
scheduledTaskService.executeBilling(task.getBusId());
|
||||
|
||||
ScheduledTaskLog log = new ScheduledTaskLog();
|
||||
log.setTaskId(task.getId());
|
||||
log.setBusId(task.getBusId());
|
||||
log.setTaskStatus(status);
|
||||
log.setExecuteTime(new Date());
|
||||
scheduledTaskLogMapper.insert(log);
|
||||
//scheduledTaskMapper.updateStatus(task.getId(), "SUCCESS");
|
||||
status = "SUCCESS";
|
||||
//status = "SUCCESS";
|
||||
} catch (Exception e) {
|
||||
// 重试机制
|
||||
scheduledTaskMapper.incrementRetryCount(task.getId());
|
||||
@@ -78,14 +83,15 @@ public class BillingScheduler {
|
||||
//scheduledTaskMapper.updateStatus(task.getId(), "PENDING");
|
||||
} else {
|
||||
status = "FAILED";
|
||||
ScheduledTaskLog log = new ScheduledTaskLog();
|
||||
log.setTaskId(task.getId());
|
||||
log.setBusId(task.getBusId());
|
||||
log.setTaskStatus(status);
|
||||
log.setExecuteTime(new Date());
|
||||
scheduledTaskLogMapper.insert(log);
|
||||
//scheduledTaskMapper.updateStatus(task.getId(), "FAILED");
|
||||
}
|
||||
}
|
||||
ScheduledTaskLog log = new ScheduledTaskLog();
|
||||
log.setTaskId(task.getId());
|
||||
log.setBusId(task.getBusId());
|
||||
log.setTaskStatus(status);
|
||||
log.setExecuteTime(new Date());
|
||||
scheduledTaskLogMapper.insert(log);
|
||||
|
||||
}
|
||||
}
|
||||
+1
@@ -953,6 +953,7 @@ public class BusinessDocumentApplicationService {
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public Boolean wholeRentSynchronization(BusinessDocumentDO businessDocumentDO) {
|
||||
log.info("定时任务进入BMS业务单据保存--开始");
|
||||
log.error("定时任务进入BMS业务单据保存--开始");
|
||||
//根据结算主题id查询 结算对象编码
|
||||
Long settlementEntityId = businessDocumentDO.getSettlementEntityId();
|
||||
List<SettlementCustomers> settlementCustomersList = settlementCustomersService.list(new LambdaQueryWrapper<SettlementCustomers>()
|
||||
|
||||
Reference in New Issue
Block a user