From 01f39fcb06b8713901975153d0a893e86eca6a88 Mon Sep 17 00:00:00 2001 From: skyouc Date: 星期一, 07 七月 2025 19:42:26 +0800 Subject: [PATCH] 33.订单历史管理里面增加单据类型选项按钮、单据类型选项按钮 34.单据管理里面增加单据状态选项按钮 35.入库订单全部都入好了,单据状态还是作业中,现在作业中的单据是可以删除的,我不小心把这个单据删除了,怎么恢复? 36.每个界面点下一页都没反应,点第二页是有变化的,之后点任何页面都没反应 37.订单明细点开后的界面改大一点 38.新增出库订单的时候可以输入客户信息(客户名称、收件人、地址、电话等),现在拣货完成后连发给谁都不知道 39.大屏播种界面对应的数量和开单数量不一致 --- zy-asrs-wms/src/main/java/com/zy/asrs/wms/asrs/timer/TaskWaveTimer.java | 67 +++++++++++++++++++++++++++++++++ 1 files changed, 67 insertions(+), 0 deletions(-) diff --git a/zy-asrs-wms/src/main/java/com/zy/asrs/wms/asrs/timer/TaskWaveTimer.java b/zy-asrs-wms/src/main/java/com/zy/asrs/wms/asrs/timer/TaskWaveTimer.java index 704f4c3..c8d9468 100644 --- a/zy-asrs-wms/src/main/java/com/zy/asrs/wms/asrs/timer/TaskWaveTimer.java +++ b/zy-asrs-wms/src/main/java/com/zy/asrs/wms/asrs/timer/TaskWaveTimer.java @@ -10,6 +10,10 @@ import com.zy.asrs.wms.asrs.entity.enums.OrderSettleType; import com.zy.asrs.wms.asrs.entity.enums.TaskStsType; import com.zy.asrs.wms.asrs.service.*; +import com.zy.asrs.wms.asrs.service.impl.WaveDetlLogServiceImpl; +import com.zy.asrs.wms.asrs.service.impl.WaveDetlServiceImpl; +import com.zy.asrs.wms.asrs.service.impl.WaveLogServiceImpl; +import com.zy.asrs.wms.asrs.service.impl.WaveServiceImpl; import com.zy.asrs.wms.system.entity.Dict; import com.zy.asrs.wms.system.service.DictService; import com.zy.asrs.wms.utils.OrderUtils; @@ -42,6 +46,69 @@ private WaveSeedService waveSeedService; @Autowired private DictService dictService; + @Autowired + private WaveServiceImpl waveService; + @Autowired + private WaveLogServiceImpl waveLogService; + @Autowired + private WaveDetlServiceImpl waveDetlService; + @Autowired + private WaveDetlLogServiceImpl waveDetlLogService; + + + /** + * @author Ryan + * @date 2025/6/20 + * @description: 鏇存柊娉㈡鏄庣粏锛屽姞鍏ュ巻鍙叉。 + * @version 1.0 + */ + @Scheduled(cron = "0/30 * * * * ? ") + @Transactional(rollbackFor = Exception.class) + public void addWaveHistories() { + List<Task> tasks = taskService.list(new LambdaQueryWrapper<Task>().eq(Task::getTaskSts, TaskStsType.UPDATED_OUT.id)); + if (tasks.isEmpty()) { + return; + } + for (Task task : tasks) { + List<TaskDetl> detls = taskDetlService.list(new LambdaQueryWrapper<TaskDetl>().eq(TaskDetl::getTaskId, task.getId())); + if (detls.isEmpty()) { + continue; + } + Set<Long> waveIds = detls.stream().map(TaskDetl::getWaveId).collect(Collectors.toSet()); + + if (waveIds.isEmpty()) { + throw new CoolException("娉㈡淇℃伅涓虹┖锛侊紒"); + } + List<Wave> waves = waveService.list(new LambdaQueryWrapper<Wave>().in(Wave::getId, waveIds)); + for (Wave wave : waves) { + WaveLog waveLog = new WaveLog(); + waveLog.sync(wave); + waveLog.setId(null); + if (!waveLogService.save(waveLog)) { + throw new CoolException("娉㈡杞巻鍙插け璐�"); + } + + List<WaveDetl> waveDetls = waveDetlService.list(new LambdaQueryWrapper<WaveDetl>().eq(WaveDetl::getWaveId, wave.getId())); + for (WaveDetl waveDetl : waveDetls) { + WaveDetlLog waveDetlLog = new WaveDetlLog(); + waveDetlLog.sync(waveDetl); + waveDetlLog.setId(null); + waveDetlLog.setWaveId(waveLog.getId()); + if (!waveDetlLogService.save(waveDetlLog)) { + throw new CoolException("娉㈡鏄庣粏杞巻鍙插け璐�"); + } + if (!waveDetlService.removeById(waveDetl.getId())) { + throw new CoolException("娉㈡鏄庣粏鍒犻櫎澶辫触"); + } + } + if (!waveService.removeById(wave.getId())) { + throw new CoolException("娉㈡鍒犻櫎澶辫触"); + } + } + } + } + + /** * modifty锛� -- Gitblit v1.9.1