From 52d0ba5ae5b6b1c3dfd544e81e7ed33a6e3b6003 Mon Sep 17 00:00:00 2001
From: DESKTOP-LMJ82IJ\Eno <creaycat@gmail.com>
Date: 星期四, 26 十二月 2024 22:23:48 +0800
Subject: [PATCH] #波次播种列表不显示问题修复
---
zy-asrs-wms/src/main/resources/application.yml | 2
zy-asrs-admin/src/components/order/order/orderIn.vue | 4
zy-asrs-admin/src/views/IndexView.vue | 4
zy-asrs-wms/src/main/java/com/zy/asrs/wms/asrs/manage/OutManage.java | 2
zy-asrs-wms/src/main/java/com/zy/asrs/wms/asrs/timer/TaskTimer.java | 3
zy-asrs-wms/src/main/java/com/zy/asrs/wms/asrs/timer/TaskWaveTimer.java | 147 +++++++++++++++++++++++++-----------------------
zy-asrs-wms/src/main/java/com/zy/asrs/wms/asrs/service/impl/LocDetlServiceImpl.java | 1
7 files changed, 83 insertions(+), 80 deletions(-)
diff --git a/zy-asrs-admin/src/components/order/order/orderIn.vue b/zy-asrs-admin/src/components/order/order/orderIn.vue
index b9213ec..7656045 100644
--- a/zy-asrs-admin/src/components/order/order/orderIn.vue
+++ b/zy-asrs-admin/src/components/order/order/orderIn.vue
@@ -50,14 +50,14 @@
{
title: formatMessage('db.man_order.order_no', '璁㈠崟缂栧彿'),
dataIndex: 'orderNo',
- width: 140,
+ width: 200,
ellipsis: true,
...getColumnSearchProps('orderNo'),
},
{
title: formatMessage('db.man_order.order_time', '鍗曟嵁鏃ユ湡'),
dataIndex: 'orderTime',
- width: 140,
+ width: 160,
ellipsis: true,
...getColumnSearchProps('orderTime'),
},
diff --git a/zy-asrs-admin/src/views/IndexView.vue b/zy-asrs-admin/src/views/IndexView.vue
index a455b88..e9b44a0 100644
--- a/zy-asrs-admin/src/views/IndexView.vue
+++ b/zy-asrs-admin/src/views/IndexView.vue
@@ -228,9 +228,9 @@
<template>
<a-flex gap="middle" horizontal>
<div class="sider-style">
- <a-layout-sider class="main-sider" v-model:collapsed="collapsed" :trigger="null" collapsible theme="dark">
+ <a-layout-sider class="main-sider" v-model:collapsed="collapsed" :trigger="null" theme="dark">
<div class="logo" />
- <a-menu v-model:openKeys="openKeys" v-model:selectedKeys="selectedKeys" @select="menuSelect" theme="dark"
+ <a-menu v-model:openKeys="openKeys" v-model:selectedKeys="selectedKeys" @select="menuSelect" theme="dark"
mode="inline" >
<div>
<a-menu-item key="/" name="涓婚〉">
diff --git a/zy-asrs-wms/src/main/java/com/zy/asrs/wms/asrs/manage/OutManage.java b/zy-asrs-wms/src/main/java/com/zy/asrs/wms/asrs/manage/OutManage.java
index 812eb3f..b5b2641 100644
--- a/zy-asrs-wms/src/main/java/com/zy/asrs/wms/asrs/manage/OutManage.java
+++ b/zy-asrs-wms/src/main/java/com/zy/asrs/wms/asrs/manage/OutManage.java
@@ -946,7 +946,7 @@
}
}
- //搴撳瓨鏇存柊閫昏緫
+// //搴撳瓨鏇存柊閫昏緫
List<Long> orderIds = dto.getList().stream().findFirst().get().getOrderIds();
List<OrderDetl> orderDetls = orderDetlService.list(new LambdaQueryWrapper<OrderDetl>().in(OrderDetl::getOrderId, orderIds));
orderDetls.forEach(orderDetl -> {
diff --git a/zy-asrs-wms/src/main/java/com/zy/asrs/wms/asrs/service/impl/LocDetlServiceImpl.java b/zy-asrs-wms/src/main/java/com/zy/asrs/wms/asrs/service/impl/LocDetlServiceImpl.java
index 7bd6947..afeaed7 100644
--- a/zy-asrs-wms/src/main/java/com/zy/asrs/wms/asrs/service/impl/LocDetlServiceImpl.java
+++ b/zy-asrs-wms/src/main/java/com/zy/asrs/wms/asrs/service/impl/LocDetlServiceImpl.java
@@ -113,7 +113,6 @@
LocDetl locDetl = JSON.parseObject(JSON.toJSONString(map), LocDetl.class);
locDetls.add(locDetl);
}
-
locDetls = parseLocDetl(locDetls);
List<Long> sortDirctLoc = new ArrayList<>();
diff --git a/zy-asrs-wms/src/main/java/com/zy/asrs/wms/asrs/timer/TaskTimer.java b/zy-asrs-wms/src/main/java/com/zy/asrs/wms/asrs/timer/TaskTimer.java
index 6de0270..57d59bb 100644
--- a/zy-asrs-wms/src/main/java/com/zy/asrs/wms/asrs/timer/TaskTimer.java
+++ b/zy-asrs-wms/src/main/java/com/zy/asrs/wms/asrs/timer/TaskTimer.java
@@ -134,7 +134,7 @@
if (!taskService.updateById(task)) {
throw new CoolException("搴撳瓨鏇存柊澶辫触");
} else {
- //CacheSite 閲婃斁宸茶鍗犵敤鐨勯�氶亾
+ //CacheSite 閲婃斁宸茶鍗犵敤鐨勯�氶亾 //fixme 鎾鍔熻兘瀹屾垚鍚庯紝闇�瑕佸皢杩欓噷娉ㄩ噴鎺�
List<TaskDetl> detls = taskDetlService.list(new LambdaQueryWrapper<TaskDetl>().eq(TaskDetl::getTaskId, task.getId()));
if (!Collections.isEmpty(detls)) {
List<Long> waveIds = detls.stream().map(TaskDetl::getWaveId).collect(Collectors.toList());
@@ -163,7 +163,6 @@
Loc loc = locService.getOne(new LambdaQueryWrapper<Loc>().eq(Loc::getLocNo, task.getTargetLoc()).eq(Loc::getHostId, hostId));
// Loc loc = locService.getOne(new LambdaQueryWrapper<Loc>().eq(Loc::getLocNo, task.getTargetLoc()));
if (loc == null) {
- log.info("搴撲綅涓嶅瓨鍦�" + "=======>" + task.getTargetLoc());
throw new CoolException("搴撲綅涓嶅瓨鍦�");
}
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 b5ff768..e619af4 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
@@ -45,7 +45,7 @@
@Autowired
private DictService dictService;
- @Scheduled(cron = "0/3 * * * * ? ")
+ @Scheduled(cron = "0/15 * * * * ? ")
@Transactional(rollbackFor = Exception.class)
public void taskWave() {
InterceptorIgnoreHelper.handle(IgnoreStrategy.builder().tenantLine(true).build());
@@ -60,88 +60,93 @@
}
List<Task> taskList = taskService.list(new LambdaQueryWrapper<Task>().eq(Task::getTaskSts, TaskStsType.WAVE_SEED.id));
- for (Task task : taskList) {
- Long hostId = task.getHostId();
+ if (taskList.isEmpty()) {
+// throw new CoolException("娌℃湁鍙挱绉嶄换鍔★紒锛�");
+ } else {
+ for (Task task : taskList) {
+ Long hostId = task.getHostId();
- List<TaskDetl> taskDetls = taskDetlService.list(new LambdaQueryWrapper<TaskDetl>().eq(TaskDetl::getTaskId, task.getId()).eq(TaskDetl::getHostId, hostId));
- if (taskDetls.isEmpty()) {
- continue;
- }
-
- for (TaskDetl taskDetl : taskDetls) {
- //鍒嗛厤璁㈠崟
- Long waveId = taskDetl.getWaveId();
- List<Order> list = orderService.list(new LambdaQueryWrapper<Order>().eq(Order::getWaveId, waveId));
- if (list.isEmpty()) {
+ List<TaskDetl> taskDetls = taskDetlService.list(new LambdaQueryWrapper<TaskDetl>().eq(TaskDetl::getTaskId, task.getId()).eq(TaskDetl::getHostId, hostId));
+ if (taskDetls.isEmpty()) {
continue;
}
- ArrayList<Long> orderIds = new ArrayList<>();
- for (Order order : list) {
- orderIds.add(order.getId());
- }
-
- String matUniqueKey = Utils.getMatUniqueKey(taskDetl.getMatnr(), taskDetl.getBatch(), taskDetl.getUniqueField());
- List<OrderDetl> orderDetls = orderDetlService.list(new LambdaQueryWrapper<OrderDetl>()
- .in(OrderDetl::getOrderId, orderIds)
- .eq(OrderDetl::getStockIndex, matUniqueKey)
- .eq(OrderDetl::getHostId, hostId));
- if(orderDetls.isEmpty()){
- throw new CoolException("璁㈠崟鏄庣粏涓嶅瓨鍦�");
- }
-
- Double anfme = taskDetl.getAnfme();
- for (OrderDetl orderDetl : orderDetls) {
- double issued = Optional.of(orderDetl.getAnfme() - orderDetl.getQty() - orderDetl.getWorkQty()).orElse(0.0D);
- if (issued <= 0.0D) { continue; }
- if (anfme <= 0.0D) { break; }
-
- double workQty = issued;
- if(anfme - issued < 0){
- workQty = anfme;
- }
- anfme -= workQty;
-
- orderUtils.updateWorkQty(orderDetl.getId(), workQty, true);
-
- CacheSite cacheSite = cacheSiteService.getOne(new LambdaQueryWrapper<CacheSite>().eq(CacheSite::getOrderId, orderDetl.getOrderId()).eq(CacheSite::getHostId, hostId));
- if (cacheSite == null) {
- throw new CoolException("缂撳瓨绔欑┖闂翠笉瀛樺湪");
+ for (TaskDetl taskDetl : taskDetls) {
+ //鍒嗛厤璁㈠崟
+ Long waveId = taskDetl.getWaveId();
+ List<Order> list = orderService.list(new LambdaQueryWrapper<Order>().eq(Order::getWaveId, waveId));
+ if (list.isEmpty()) {
+ continue;
}
- WaveSeed waveSeed = new WaveSeed();
- waveSeed.setSiteId(cacheSite.getId());
- waveSeed.setSiteNo(cacheSite.getSiteNo());
- waveSeed.setOrderNo(orderDetl.getOrderNo());
- waveSeed.setOrderId(orderDetl.getOrderId());
- waveSeed.setOrderDetlId(orderDetl.getId());
- waveSeed.setTaskDetlId(taskDetl.getId());
- waveSeed.setAnfme(taskDetl.getAnfme());
- waveSeed.setWorkQty(0D);
- waveSeed.setMatnr(taskDetl.getMatnr());
- waveSeed.setBatch(taskDetl.getBatch());
- waveSeed.setFieldParams(JSON.toJSONString(taskDetl.getUniqueField()));
- waveSeed.setHostId(hostId);
- if (!waveSeedService.save(waveSeed)) {
- throw new CoolException("娉㈡鎾鍒涘缓澶辫触");
+ ArrayList<Long> orderIds = new ArrayList<>();
+ for (Order order : list) {
+ orderIds.add(order.getId());
}
- cacheSite.setOrderId(orderDetl.getOrderId());
- cacheSite.setOrderNo(orderDetl.getOrderNo());
- cacheSite.setSiteStatus(CacheSiteStatusType.R.id);
- cacheSite.setUpdateTime(new Date());
- if (!cacheSiteService.updateById(cacheSite)) {
- throw new CoolException("缂撳瓨绔欐洿鏂板け璐�");
+ String matUniqueKey = Utils.getMatUniqueKey(taskDetl.getMatnr(), taskDetl.getBatch(), taskDetl.getUniqueField());
+ List<OrderDetl> orderDetls = orderDetlService.list(new LambdaQueryWrapper<OrderDetl>()
+ .in(OrderDetl::getOrderId, orderIds)
+ .eq(OrderDetl::getStockIndex, matUniqueKey)
+ .eq(OrderDetl::getHostId, hostId));
+ if(orderDetls.isEmpty()){
+ throw new CoolException("璁㈠崟鏄庣粏涓嶅瓨鍦�");
+ }
+
+ Double anfme = taskDetl.getAnfme();
+ for (OrderDetl orderDetl : orderDetls) {
+ //fixme 浣滀笟涓暟閲忚皟鏁存斁鑷筹紝鐢熸垚鍑哄簱浠诲姟鎴愬姛鍚�
+// double issued = Optional.of(orderDetl.getAnfme() - orderDetl.getQty() - orderDetl.getWorkQty()).orElse(0.0D);
+// if (issued <= 0.0D) { continue; }
+// if (anfme <= 0.0D) { break; }
+//
+// double workQty = issued;
+// if(anfme - issued < 0){
+// workQty = anfme;
+// }
+// anfme -= workQty;
+//
+// orderUtils.updateWorkQty(orderDetl.getId(), workQty, true);
+
+ CacheSite cacheSite = cacheSiteService.getOne(new LambdaQueryWrapper<CacheSite>().eq(CacheSite::getOrderId, orderDetl.getOrderId()).eq(CacheSite::getHostId, hostId));
+ if (cacheSite == null) {
+ throw new CoolException("缂撳瓨绔欑┖闂翠笉瀛樺湪");
+ }
+
+ WaveSeed waveSeed = new WaveSeed();
+ waveSeed.setSiteId(cacheSite.getId());
+ waveSeed.setSiteNo(cacheSite.getSiteNo());
+ waveSeed.setOrderNo(orderDetl.getOrderNo());
+ waveSeed.setOrderId(orderDetl.getOrderId());
+ waveSeed.setOrderDetlId(orderDetl.getId());
+ waveSeed.setTaskDetlId(taskDetl.getId());
+ waveSeed.setAnfme(taskDetl.getAnfme());
+ waveSeed.setWorkQty(0D);
+ waveSeed.setMatnr(taskDetl.getMatnr());
+ waveSeed.setBatch(taskDetl.getBatch());
+ waveSeed.setFieldParams(JSON.toJSONString(taskDetl.getUniqueField()));
+ waveSeed.setHostId(hostId);
+ if (!waveSeedService.save(waveSeed)) {
+ throw new CoolException("娉㈡鎾鍒涘缓澶辫触");
+ }
+
+ cacheSite.setOrderId(orderDetl.getOrderId());
+ cacheSite.setOrderNo(orderDetl.getOrderNo());
+ cacheSite.setSiteStatus(CacheSiteStatusType.R.id);
+ cacheSite.setUpdateTime(new Date());
+ if (!cacheSiteService.updateById(cacheSite)) {
+ throw new CoolException("缂撳瓨绔欐洿鏂板け璐�");
+ }
+
}
}
- }
-
- task.setTaskSts(TaskStsType.COMPLETE_OUT.id);
- task.setUpdateTime(new Date());
- if (!taskService.updateById(task)) {
- throw new CoolException("浠诲姟鏇存柊澶辫触");
+ task.setTaskSts(TaskStsType.COMPLETE_OUT.id);
+ task.setUpdateTime(new Date());
+ if (!taskService.updateById(task)) {
+ throw new CoolException("浠诲姟鏇存柊澶辫触");
+ }
}
}
} catch (Exception e) {
diff --git a/zy-asrs-wms/src/main/resources/application.yml b/zy-asrs-wms/src/main/resources/application.yml
index f9f08bf..08a4c6d 100644
--- a/zy-asrs-wms/src/main/resources/application.yml
+++ b/zy-asrs-wms/src/main/resources/application.yml
@@ -37,7 +37,7 @@
# global-config:
# field-strategy: 0
configuration:
- log-impl: org.apache.ibatis.logging.stdout.StdOutImpl
+# log-impl: org.apache.ibatis.logging.stdout.StdOutImpl
map-underscore-to-camel-case: true
cache-enabled: true
global-config:
--
Gitblit v1.9.1