From 06bdab927490573e9e8b21d485dff52de0605a24 Mon Sep 17 00:00:00 2001
From: zhou zhou <3272660260@qq.com>
Date: 星期五, 12 十二月 2025 08:23:20 +0800
Subject: [PATCH] #
---
src/main/webapp/static/js/taskLog/taskLog.js | 29 +++++----
src/main/java/com/zy/asrs/service/impl/MobileServiceImpl.java | 89 +++++++++++++++--------------
src/main/webapp/views/taskLog/taskLog.html | 2
src/main/java/com/zy/asrs/controller/TaskLogController.java | 1
4 files changed, 64 insertions(+), 57 deletions(-)
diff --git a/src/main/java/com/zy/asrs/controller/TaskLogController.java b/src/main/java/com/zy/asrs/controller/TaskLogController.java
index 1c642ba..15efd95 100644
--- a/src/main/java/com/zy/asrs/controller/TaskLogController.java
+++ b/src/main/java/com/zy/asrs/controller/TaskLogController.java
@@ -43,6 +43,7 @@
convert(param, wrapper);
allLike(TaskLog.class, param.keySet(), wrapper, condition);
if (!Cools.isEmpty(orderByField)){wrapper.orderBy(humpToLine(orderByField), "asc".equals(orderByType));}
+ wrapper.orderBy("appe_time desc");
return R.ok(taskLogService.selectPage(new Page<>(curr, limit), wrapper));
}
diff --git a/src/main/java/com/zy/asrs/service/impl/MobileServiceImpl.java b/src/main/java/com/zy/asrs/service/impl/MobileServiceImpl.java
index f29ac66..111a2e3 100644
--- a/src/main/java/com/zy/asrs/service/impl/MobileServiceImpl.java
+++ b/src/main/java/com/zy/asrs/service/impl/MobileServiceImpl.java
@@ -1293,55 +1293,58 @@
@Transactional(rollbackFor = Exception.class)
public R OutCallAgv(AgvCallParams params, Long userId) {
/**鑾峰彇鍏ュ簱鏈�鏃╃殑涓�鏉℃暟鎹�**/
- LocCache locCaches = locCacheService.selectOne(new EntityWrapper<LocCache>()
+ List<LocCache> locCaches = locCacheService.selectList(new EntityWrapper<LocCache>()
.eq("loc_sts", LocStsType.LOC_STS_TYPE_F.type)
.eq("frozen", 0)
- .orderDesc(Arrays.asList("sort", "first_time"))
- .last("OFFSET 0 ROWS FETCH NEXT 1 ROWS ONLY"));
- if (Objects.isNull(locCaches)) {
+ .orderDesc(Arrays.asList("sort", "first_time")));
+
+ if (locCaches.isEmpty()) {
throw new CoolException("鏆傛棤婊¤冻闇�姹傚簱浣嶏紒");
}
- //鑾峰彇缂撳瓨鍖轰俊鎭�
- BasAreas basAreas = basAreasService.selectOne(new EntityWrapper<BasAreas>().eq("whs_type_id", LocAreaType.LOC_AREA_TYPE_IN_CACHE.type));
- if (Objects.isNull(basAreas)) {
- throw new CoolException("搴撳尯涓嶅瓨鍦紒锛�");
+ for (LocCache locCache : locCaches) {
+ //鑾峰彇缂撳瓨鍖轰俊鎭�
+ BasAreas basAreas = basAreasService.selectOne(new EntityWrapper<BasAreas>().eq("whs_type_id", LocAreaType.LOC_AREA_TYPE_IN_CACHE.type));
+ if (Objects.isNull(basAreas)) {
+ throw new CoolException("搴撳尯涓嶅瓨鍦紒锛�");
+ }
+
+ List<LocDetl> locDetls = locDetlService.selectList(new EntityWrapper<LocDetl>()
+ .eq("area_id", basAreas.getId())
+ .eq("loc_no", locCache.getLocNo()));
+ if (Objects.isNull(locDetls) || locDetls.isEmpty()) {
+ throw new CoolException("搴撳瓨鏄庣粏涓嶅瓨鍦紒锛�");
+ }
+
+ Set<String> set = locDetls.stream().map(LocDetl::getMatnr).collect(Collectors.toSet());
+ List<Mat> matList = matService.selectList(new EntityWrapper<Mat>().in("matnr", set));
+ if (Objects.isNull(matList) || matList.isEmpty()) {
+ throw new CoolException("鐗╂枡搴撲笉瀛樺湪璇ョ墿鏂�!!");
+ }
+ Set<Long> longs = matList.stream().map(Mat::getTagId).collect(Collectors.toSet());
+ if (!longs.isEmpty() && longs.size() > 1) {
+ throw new CoolException("鐗╂枡绫诲瀷涓嶄竴鑷�,璇锋鏌ユ暟鎹槸鍚︽纭�!!");
+ }
+
+ Mat mat = matList.stream().findFirst().get();
+
+ BasStation station = basStationService.selectOne(new EntityWrapper<BasStation>()
+ .eq("loc_sts", LocStsType.LOC_STS_TYPE_O.type)
+ .eq("ctn_type", mat.getTagId())
+ .eq("dev_no", params.getTarSite()));
+ if (Objects.isNull(station)) {
+ continue;
+ }
+
+ /**鐢熸垚缂撳瓨鍖哄嚭搴撲换鍔�*/
+ generateCacheOutTask(station, locCache, userId);
+
+ /**鐢熸垚绔嬪簱鍑哄簱浠诲姟*/
+ generateCRNOutTask(station, locCache, userId);
+
+ return R.ok();
}
-
- List<LocDetl> locDetls = locDetlService.selectList(new EntityWrapper<LocDetl>()
- .eq("area_id", basAreas.getId())
- .eq("loc_no", locCaches.getLocNo()));
- if (Objects.isNull(locDetls) || locDetls.isEmpty()) {
- throw new CoolException("搴撳瓨鏄庣粏涓嶅瓨鍦紒锛�");
- }
-
- Set<String> set = locDetls.stream().map(LocDetl::getMatnr).collect(Collectors.toSet());
- List<Mat> matList = matService.selectList(new EntityWrapper<Mat>().in("matnr", set));
- if (Objects.isNull(matList) || matList.isEmpty()) {
- throw new CoolException("鐗╂枡搴撲笉瀛樺湪璇ョ墿鏂�!!");
- }
- Set<Long> longs = matList.stream().map(Mat::getTagId).collect(Collectors.toSet());
- if (!longs.isEmpty() && longs.size() > 1) {
- throw new CoolException("鐗╂枡绫诲瀷涓嶄竴鑷�,璇锋鏌ユ暟鎹槸鍚︽纭�!!");
- }
-
- Mat mat = matList.stream().findFirst().get();
-
- BasStation station = basStationService.selectOne(new EntityWrapper<BasStation>()
- .eq("loc_sts", LocStsType.LOC_STS_TYPE_O.type)
- .eq("ctn_type", mat.getTagId())
- .eq("dev_no", params.getTarSite()));
- if (Objects.isNull(station)) {
- throw new CoolException("绔欑偣姝e湪鎵ц浠诲姟锛侊紒");
- }
-
- /**鐢熸垚缂撳瓨鍖哄嚭搴撲换鍔�*/
- generateCacheOutTask(station, locCaches, userId);
-
- /**鐢熸垚绔嬪簱鍑哄簱浠诲姟*/
- generateCRNOutTask(station, locCaches, userId);
-
- return R.ok();
+ return R.error("鏈壘鍒颁笌绔欑偣绫诲瀷鍖归厤鐨勫簱瀛�");
}
@Override
diff --git a/src/main/webapp/static/js/taskLog/taskLog.js b/src/main/webapp/static/js/taskLog/taskLog.js
index 762510f..049f72c 100644
--- a/src/main/webapp/static/js/taskLog/taskLog.js
+++ b/src/main/webapp/static/js/taskLog/taskLog.js
@@ -20,20 +20,23 @@
toolbar: '#toolbar',
cellMinWidth: 50,
cols: [[
- {field: 'wrkNo', align: 'center', title: '宸ヤ綔鍙�', event: 'wrkNo', sort: true}
- , {field: 'ioTime$', align: 'center', title: '宸ヤ綔鏃堕棿', width: 160, sort: true}
- , {field: 'wrkSts$', align: 'center', title: '宸ヤ綔鐘舵��', width: 160}
- , {field: 'ioType$', align: 'center', title: '鍏ュ嚭搴撶被鍨�', width: 160}
- , {field: 'ioPri', align: 'center', title: '浼樺厛绾�'}
- , {field: 'crnNo$', align: 'center', title: '鍫嗗灈鏈哄彿'}
- , {field: 'sourceStaNo$', align: 'center', title: '婧愮珯'}
- , {field: 'staNo$', align: 'center', title: '鐩爣绔�'}
- , {field: 'sourceLocNo$', align: 'center', title: '婧愬簱浣�'}
- , {field: 'locNo$', align: 'center', title: '鐩爣搴撲綅'}
+ {field: 'wrkNo', align: 'center', title: '宸ヤ綔鍙�', sort: true, width: 105}
+ , {field: 'ioTime$', align: 'center', title: '宸ヤ綔鏃堕棿', width: 160}
+ , {field: 'wrkSts$', align: 'center', title: '宸ヤ綔鐘舵��', width: 150}
+ , {field: 'ioType$', align: 'center', title: '鍏ュ嚭搴撶被鍨�', width: 150}
+ , {field: 'ioPri', align: 'center', title: '浼樺厛绾�', width: 80}
+ , {field: 'taskType$', align: 'center', title: '浠诲姟绫诲瀷', width: 120}
+ , {field: 'crnNo$', align: 'center', title: '鍫嗗灈鏈�', hide: true}
+ , {field: 'sourceStaNo$', align: 'center', title: '婧愮珯', }
+ , {field: 'sourceLocNo', align: 'center', title: '婧愬簱浣�', }
+ , {field: 'staNo$', align: 'center', title: '鐩爣绔�', }
+ , {field: 'locNo', align: 'center', title: '鐩爣搴撲綅', }
+ , {field: 'barcode', align: 'center', title: '鏉$爜', width: 110}
+ , {field: 'preHave', align: 'center', title: '鍏堝叆鍝�', hide: true}
+ , {field: 'takeNone', align: 'center', title: '绌烘搷浣�', hide: true}
, {field: 'modiUser$', align: 'center', title: '淇敼浜哄憳', hide: true}
- , {field: 'modiTime$', align: 'center', title: '淇敼鏃堕棿', hide: true}
- , {field: 'barcode', align: 'center', title: '鏉$爜'}
- , {fixed: 'right', title: '鎿嶄綔', align: 'center', toolbar: '#operate', width: 80}
+ , {field: 'modiTime$', align: 'center', title: '淇敼鏃堕棿', hide: true, width: 160}
+ , {fixed: 'right', title: '鎿嶄綔', align: 'center', toolbar: '#operate'}
]],
request: {
pageName: 'curr',
diff --git a/src/main/webapp/views/taskLog/taskLog.html b/src/main/webapp/views/taskLog/taskLog.html
index 932f5fd..8be1e84 100644
--- a/src/main/webapp/views/taskLog/taskLog.html
+++ b/src/main/webapp/views/taskLog/taskLog.html
@@ -72,7 +72,7 @@
<!-- 琛ㄦ牸 -->
<div class="layui-form">
- <table class="layui-hide" id="wrkMastLog" lay-filter="wrkMastLog"></table>
+ <table class="layui-hide" id="taskLog" lay-filter="taskLog"></table>
</div>
<script type="text/html" id="toolbar">
<div class="layui-btn-container">
--
Gitblit v1.9.1