|
|
|
|
@ -23,6 +23,7 @@ import org.springblade.modules.business.service.IMaintenancePlanService; |
|
|
|
|
import org.springblade.modules.business.service.IMaintenanceTaskDetailService; |
|
|
|
|
import org.springblade.modules.business.service.IMaintenanceTaskService; |
|
|
|
|
import org.springblade.modules.business.sms.SmsService; |
|
|
|
|
import org.springframework.transaction.annotation.Transactional; |
|
|
|
|
import org.springframework.web.bind.annotation.*; |
|
|
|
|
|
|
|
|
|
import java.time.LocalDate; |
|
|
|
|
@ -45,6 +46,8 @@ public class MaintenanceController extends BladeController { |
|
|
|
|
private final IMaintenanceTaskService taskService; |
|
|
|
|
private final IMaintenanceTaskDetailService taskDetailService; |
|
|
|
|
|
|
|
|
|
private final SmsService smsService; |
|
|
|
|
|
|
|
|
|
/*---------- 维修计划开始 ----------*/ |
|
|
|
|
|
|
|
|
|
@GetMapping("/plan-page") |
|
|
|
|
@ -123,13 +126,14 @@ public class MaintenanceController extends BladeController { |
|
|
|
|
|
|
|
|
|
@PostMapping("/task-supervisor-confirm") |
|
|
|
|
@Operation(summary = "主管审核并指定维修人员", description = "主管审核并指定维修人员") |
|
|
|
|
@Transactional(rollbackFor = Exception.class) |
|
|
|
|
public R taskSupervisorConfirm(@RequestBody MaintenanceTask task) throws ClientException { |
|
|
|
|
MaintenanceTask taskOld = taskService.getById(task.getId()); |
|
|
|
|
taskOld.setServicemanId(task.getServicemanId()); |
|
|
|
|
taskOld.setServicemanName(task.getServicemanName()); |
|
|
|
|
taskOld.setTaskStatus(MaintenanceStatusEnum.TASK_SUPERVISOR_CONFIRM.getValue()); |
|
|
|
|
taskService.updateById(taskOld); |
|
|
|
|
SmsService.sendSms("13553032083", "阿祥"); |
|
|
|
|
smsService.sendSms("17852327323", "靳娜"); |
|
|
|
|
return R.success(); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|