| | |
| | | import cn.hutool.core.collection.ListUtil; |
| | | import cn.iocoder.yudao.framework.apilog.core.annotation.ApiAccessLog; |
| | | import cn.iocoder.yudao.framework.common.pojo.CommonResult; |
| | | import cn.iocoder.yudao.framework.common.util.json.JsonUtils; |
| | | import cn.iocoder.yudao.module.mes.service.pro.feedback.dto.MesTaskParamSnapshot; |
| | | import cn.iocoder.yudao.module.mes.service.pro.feedback.dto.MesFeedbackParamSnapshot; |
| | | import cn.iocoder.yudao.framework.common.pojo.PageParam; |
| | | import cn.iocoder.yudao.framework.common.pojo.PageResult; |
| | | import cn.iocoder.yudao.framework.common.util.object.BeanUtils; |
| | |
| | | return success(new PageResult<>(buildFeedbackRespVOList(pageResult.getList()), pageResult.getTotal())); |
| | | } |
| | | |
| | | @GetMapping("/param-config") |
| | | @Operation(summary = "获得生产任务冻结的参数采集配置") |
| | | public CommonResult<Map<String, Object>> getParamConfig(@RequestParam("taskId") Long taskId) { |
| | | MesProTaskDO task = taskService.validateTaskExists(taskId); |
| | | Map<String, Object> result = new LinkedHashMap<>(); |
| | | result.put("mode", task.getParamCollectMode() == null ? 0 : task.getParamCollectMode()); |
| | | result.put("template", JsonUtils.parseObject(task.getParamTemplateSnapshot(), MesTaskParamSnapshot.class)); |
| | | result.put("shared", JsonUtils.parseObject(task.getParamSharedSnapshot(), MesFeedbackParamSnapshot.class)); |
| | | return success(result); |
| | | } |
| | | |
| | | @GetMapping("/list-by-task") |
| | | @Operation(summary = "按任务获得报工历史列表") |
| | | @Parameter(name = "taskId", description = "任务编号", required = true, example = "1024") |