|
|
|
|
@ -11,9 +11,7 @@ import org.springblade.lims.entry.MaintainTask; |
|
|
|
|
import org.springblade.lims.entry.MaintainTaskProject; |
|
|
|
|
import org.springblade.lims.service.IMaintainTaskProjectService; |
|
|
|
|
import org.springblade.lims.service.IMaintainTaskService; |
|
|
|
|
import org.springframework.web.bind.annotation.GetMapping; |
|
|
|
|
import org.springframework.web.bind.annotation.RequestMapping; |
|
|
|
|
import org.springframework.web.bind.annotation.RestController; |
|
|
|
|
import org.springframework.web.bind.annotation.*; |
|
|
|
|
|
|
|
|
|
import java.util.Date; |
|
|
|
|
|
|
|
|
|
@ -31,14 +29,22 @@ public class MaintainTaskProjectController extends BladeController { |
|
|
|
|
private final IMaintainTaskProjectService service; |
|
|
|
|
private final IMaintainTaskService maintainTaskService; |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* 根据id查询信息 |
|
|
|
|
*/ |
|
|
|
|
@GetMapping("/getById") |
|
|
|
|
@ApiOperation(value = "根据id查询信息", notes = "根据id查询信息") |
|
|
|
|
public R getById(String id) { |
|
|
|
|
return R.data(service.findById(id)); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* 更新 |
|
|
|
|
*/ |
|
|
|
|
@GetMapping("/updateStatus") |
|
|
|
|
@PostMapping("/updateStatus") |
|
|
|
|
@ApiOperation(value = "更新", notes = "更新") |
|
|
|
|
public R updateStatus(String id) { |
|
|
|
|
MaintainTaskProject entry = service.getById(id); |
|
|
|
|
public R updateStatus(@RequestBody MaintainTaskProject entry) { |
|
|
|
|
//更新保养任务为保养中
|
|
|
|
|
MaintainTask task = maintainTaskService.getById(entry.getTaskId()); |
|
|
|
|
task.setStatus(1); |
|
|
|
|
@ -46,7 +52,6 @@ public class MaintainTaskProjectController extends BladeController { |
|
|
|
|
task.setUpdateUser(AuthUtil.getUserId()); |
|
|
|
|
maintainTaskService.updateById(task); |
|
|
|
|
//更新保养项目状态
|
|
|
|
|
entry.setStatus(1); |
|
|
|
|
entry.setUpdateTime(new Date()); |
|
|
|
|
entry.setUpdateUser(AuthUtil.getUserId()); |
|
|
|
|
service.updateById(entry); |
|
|
|
|
|