add:1.增加操作到达站点操作后刷新倒计时。
This commit is contained in:
@@ -25,7 +25,7 @@ public interface TaskAPI {
|
||||
* @param newReportStatus
|
||||
* @return
|
||||
*/
|
||||
boolean updateTaskReportStatusByCode(String taskCode,String newReportStatus,String waiting_time);
|
||||
boolean updateTaskReportStatusByCode(String taskCode,String newReportStatus,String waiting_time,String wait_time_after_operation);
|
||||
|
||||
/**
|
||||
* 查询当前任务上报状态阶段
|
||||
|
||||
@@ -57,12 +57,15 @@ public class ScheduleTaskServiceImpl implements ScheduleTaskService {
|
||||
boolean flag = false;
|
||||
// 到达时等待设置参数
|
||||
JSONObject jsonObject = settingAPI.querySettingParamByCode("call_arrival_waiting_time").getJSONObject("data");
|
||||
JSONObject jsonObjectOperation = settingAPI.querySettingParamByCode("wait_time_after_operation").getJSONObject("data");
|
||||
String is_active = jsonObject.getString("is_active");
|
||||
String arrive_waiting_time = jsonObject.getString("value");
|
||||
String wait_time_after_operation = jsonObjectOperation.getString("value");
|
||||
|
||||
if (StrUtil.isNotBlank(is_active) && YesOrNoEnum.YES.getCode().equals(is_active)){
|
||||
switch (scheduleTaskReportStatusEnum){
|
||||
case NOT_REPORTED:
|
||||
boolean result = taskAPI.updateTaskReportStatusByCode(task_code, ScheduleTaskReportStatusEnum.REPORTED.getCode(),arrive_waiting_time);
|
||||
boolean result = taskAPI.updateTaskReportStatusByCode(task_code, ScheduleTaskReportStatusEnum.REPORTED.getCode(),arrive_waiting_time,wait_time_after_operation);
|
||||
if (!result) {
|
||||
log.info("更新调度上报状态失败");
|
||||
}
|
||||
|
||||
@@ -30,6 +30,10 @@ public enum SettingCodeEnum {
|
||||
* 呼叫时等待时间
|
||||
*/
|
||||
WAITING_TIME_WHEN_MAKING_A_CALL("4", "waiting_time_when_making_a_call", "呼叫时等待时间"),
|
||||
/**
|
||||
* 操作后等待时间
|
||||
*/
|
||||
WAITING_TIME_AFTER_OPERATION("4", "wait_time_after_operation", "操作后等待时间"),
|
||||
/**
|
||||
* 自动回充
|
||||
*/
|
||||
|
||||
@@ -94,6 +94,9 @@ public class SettingServiceImpl extends ServiceImpl<SettingMapper, Setting> impl
|
||||
case WAITING_TIME_WHEN_MAKING_A_CALL:
|
||||
log.info("修改呼叫时等待时间");
|
||||
break;
|
||||
case WAITING_TIME_AFTER_OPERATION:
|
||||
log.info("操作后等待时间");
|
||||
break;
|
||||
case AUTOMATIC_RECHARGE:
|
||||
log.info("修改自动回充");
|
||||
if (StrUtil.isBlank(setting_value) || StrUtil.isBlank(is_active) ){
|
||||
|
||||
@@ -47,6 +47,12 @@ public class Task {
|
||||
* 到达等待时间
|
||||
*/
|
||||
private Integer arrive_waiting_time;
|
||||
|
||||
/**
|
||||
* 操作后等待时间
|
||||
*/
|
||||
private Integer wait_time_after_operation;
|
||||
|
||||
/**
|
||||
* 任务优先级
|
||||
*/
|
||||
|
||||
@@ -56,10 +56,11 @@ public class TaskAPIProvider implements TaskAPI {
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean updateTaskReportStatusByCode(String taskCode, String newReportStatus,String waiting_time) {
|
||||
public boolean updateTaskReportStatusByCode(String taskCode, String newReportStatus,String waiting_time,String wait_time_after_operation) {
|
||||
return taskService.update(new LambdaUpdateWrapper<>(Task.class)
|
||||
.set(Task::getVehicleReportStatus, newReportStatus)
|
||||
.set(StrUtil.isNotBlank(waiting_time),Task::getArrive_waiting_time,Integer.parseInt(waiting_time))
|
||||
.set(StrUtil.isNotBlank(wait_time_after_operation),Task::getWait_time_after_operation,Integer.parseInt(wait_time_after_operation))
|
||||
.set(Task::getUpdate_time, DateUtil.now())
|
||||
.eq(Task::getTask_code,taskCode)
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user