| | |
| | | task.setTaskStatus(TaskStsType.GENERATE_IN.id) |
| | | .setTaskCode(ruleCode) |
| | | .setTargLoc(task.getOrgLoc()) |
| | | .setOrgSite(task.getTargSite()) |
| | | .setTaskType(TaskType.TASK_TYPE_CHECK_IN.type) |
| | | .setUpdateTime(new Date()); |
| | | if (!taskService.updateById(task)) { |
| | | throw new CoolException("任务状态修改失败!!"); |
| | | } |
| | | |
| | | uploadCheckResult(task); |
| | | List<TaskItem> taskItems = taskItemService.list(new LambdaQueryWrapper<TaskItem>().eq(TaskItem::getTaskId, task.getId())); |
| | | if (Objects.isNull(taskItems) || taskItems.isEmpty()) { |
| | | throw new CoolException("数据错误,任务明细不存在!!"); |
| | | } |
| | | |
| | | List<TaskItem> items = JSONArray.parseArray(JSONArray.toJSONString(map.get("items")), TaskItem.class); |
| | | items.forEach(taskItem -> { |
| | | taskItems.forEach(item -> { |
| | | if (taskItem.getFieldsIndex().equals(item.getFieldsIndex())) { |
| | | item.setAnfme(taskItem.getCheckQty()); |
| | | if (!taskItemService.updateById(item)) { |
| | | throw new CoolException("盘点明细修改失败!!"); |
| | | } |
| | | } |
| | | }); |
| | | }); |
| | | |
| | | // uploadCheckResult(task); |
| | | |
| | | return R.ok("提交成功"); |
| | | } |
| | |
| | | List<ReportDataParam> reportDataParams = new ArrayList<>(); |
| | | taskItems.forEach(taskItem -> { |
| | | ReportDataParam dataParam = new ReportDataParam(); |
| | | |
| | | User user = userService.getById(taskItem.getUpdateBy()); |
| | | String nickName = null; |
| | | if (!Objects.isNull(user)) { |