From d7355ce983c2bddcc5b95e4d84283f6631fb176a Mon Sep 17 00:00:00 2001
From: skyouc <creaycat@gmail.com>
Date: 星期四, 27 十一月 2025 13:38:46 +0800
Subject: [PATCH] 修改入出库历史的拣料类型,不上传ERP
---
rsf-server/src/main/java/com/vincent/rsf/server/manager/controller/TaskController.java | 50 +++++++++++++++-----------------------------------
1 files changed, 15 insertions(+), 35 deletions(-)
diff --git a/rsf-server/src/main/java/com/vincent/rsf/server/manager/controller/TaskController.java b/rsf-server/src/main/java/com/vincent/rsf/server/manager/controller/TaskController.java
index 3ac0737..cac4b90 100644
--- a/rsf-server/src/main/java/com/vincent/rsf/server/manager/controller/TaskController.java
+++ b/rsf-server/src/main/java/com/vincent/rsf/server/manager/controller/TaskController.java
@@ -37,15 +37,6 @@
@Autowired
private TaskService taskService;
- @Autowired
- private TaskItemService taskItemService;
- @Autowired
- private WaitPakinService waitPakinService;
- @Autowired
- private LocService locService;
- @Autowired
- private ConfigServiceImpl configService;
-
@PreAuthorize("hasAuthority('manager:task:list')")
@PostMapping("/task/page")
@@ -53,7 +44,6 @@
BaseParam baseParam = buildParam(map, BaseParam.class);
PageParam<Task, BaseParam> pageParam = new PageParam<>(baseParam, Task.class);
QueryWrapper<Task> queryWrapper = pageParam.buildWrapper(true);
- queryWrapper.orderByDesc("sort");
return R.ok().add(taskService.page(pageParam, queryWrapper));
}
@@ -102,15 +92,13 @@
}
@PreAuthorize("hasAuthority('manager:task:remove')")
- @OperationLog("Delete 浠诲姟宸ヤ綔妗�")
+ @ApiOperation("鍙栨秷/鍒犻櫎宸ヤ綔鏋佹。")
@PostMapping("/task/remove/{ids}")
- @Transactional(rollbackFor = Exception.class)
public R remove(@PathVariable Long[] ids) {
if (Objects.isNull(ids) || ids.length < 1) {
return R.error("鍙傛暟涓嶈兘涓虹┖锛侊紒");
}
return taskService.removeTask(ids, getLoginUserId());
-// return R.ok("Delete Success").add(ids);
}
@PreAuthorize("hasAuthority('manager:task:list')")
@@ -136,29 +124,11 @@
@PreAuthorize("hasAuthority('manager:task:update')")
@ApiOperation("瀹屾垚浠诲姟")
@PostMapping("/task/complete/{id}")
- public R completeTask(@PathVariable String id) throws Exception {
- if (Objects.isNull(id)) {
+ public R completeTask(@PathVariable Long id) throws Exception {
+ if (Cools.isEmpty(id)) {
throw new CoolException("鍙傛暟涓嶈兘涓虹┖锛侊紒");
}
- List<Integer> longs = Arrays.asList(TaskStsType.GENERATE_IN.id, TaskStsType.GENERATE_OUT.id);
- List<Task> tasks = taskService.list(new LambdaQueryWrapper<Task>()
- .eq(Task::getId, id)
- .in(Task::getTaskStatus, longs));
- for (Task task : tasks) {
-// if (StringUtils.isNotBlank(task.getParentId() + "")) {
-// Task task1 = taskService.getById(task.getParentId());
-// if (!Objects.isNull(task1) && task1.getTaskType().equals(TaskStsType.UPDATED_IN.id)) {
-// throw new CoolException("鐖朵换鍔★細" + task1.getTaskCode() + "鏈墽琛屽畬鎴愶紒");
-// }
-// }
- task.setTaskStatus(task.getTaskType() < 100 ? TaskStsType.COMPLETE_IN.id : TaskStsType.COMPLETE_OUT.id);
- }
-
- if (!taskService.updateBatchById(tasks)) {
- return R.error("瀹屾垚浠诲姟澶辫触");
- }
-
- return R.ok("瀹屾垚浠诲姟鎴愬姛");
+ return R.ok("瀹屾垚浠诲姟鎴愬姛").add(taskService.operateComplete(id, getLoginUserId()));
}
/**
@@ -177,6 +147,16 @@
} catch (Exception e) {
throw new CoolException(e.getMessage());
}
+ }
+
+ @PreAuthorize("hasAuthority('manager:task:update')")
+ @ApiOperation("鎵嬪姩涓嬪彂鎵ц")
+ @PostMapping("/task/menual/exce/{ids}")
+ public R pubExce(@PathVariable Long[] ids) {
+ if (Objects.isNull(ids)) {
+ return R.error("鎵嬪姩涓嬪彂鎵ц锛�");
+ }
+ return taskService.menualExceTask(Arrays.asList(ids));
}
/**
@@ -216,7 +196,7 @@
throw new CoolException("鍙傛暟涓嶈兘涓虹┖锛侊紒");
}
try {
- taskService.taskToTop(id);
+ taskService.taskToTop(id, getLoginUserId());
} catch (Exception e) {
logger.error("UNK", e);
throw new CoolException(e.getMessage());
--
Gitblit v1.9.1