| | |
| | | package com.mes.work_assignment.controller; |
| | | |
| | | |
| | | import cn.hutool.core.date.DateTime; |
| | | import com.mes.damage.service.DamageService; |
| | | import com.mes.utils.Result; |
| | | import com.mes.work_assignment.entity.WorkAssignment; |
| | | import com.mes.work_assignment.service.WorkAssignmentService; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.GetMapping; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * <p> |
| | |
| | | * @author wu |
| | | * @since 2024-07-01 |
| | | */ |
| | | @Api(description = "值班信息") |
| | | @RestController |
| | | @RequestMapping("/work_assignment/work-assignment") |
| | | @RequestMapping("/work_assignment") |
| | | public class WorkAssignmentController { |
| | | |
| | | @Autowired |
| | | private WorkAssignmentService workAssignmentService; |
| | | @ApiOperation("报工数据查询") |
| | | @GetMapping("/selectWorkAssignment") |
| | | public Result selectDamage(int line,String workingProcedure) { |
| | | @ApiOperation("值班数据查询") |
| | | @PostMapping("/selectWorkAssignment") |
| | | public Result selectWorkAssignment(@RequestBody Map map) { |
| | | String line=map.get("line").toString(); |
| | | String workingProcedure=map.get("workingProcedure").toString(); |
| | | return Result.build(200,"查询成功",workAssignmentService.selectWorkAssignment(line,workingProcedure)); |
| | | } |
| | | |
| | | @ApiOperation("值班数据修改") |
| | | @PostMapping("/updateWorkAssignment") |
| | | public Result updateWorkAssignment(@RequestBody List<WorkAssignment> workAssignmentList) { |
| | | workAssignmentService.saveOrUpdateBatch(workAssignmentList); |
| | | return Result.build(200,"修改成功",1); |
| | | } |
| | | } |
| | | |