From 5ed4c86f13606a64e32757b0e17bb0721f75f299 Mon Sep 17 00:00:00 2001
From: zhou zhou <3272660260@qq.com>
Date: 星期四, 11 十二月 2025 18:36:13 +0800
Subject: [PATCH] #
---
src/main/java/com/zy/asrs/service/impl/MobileServiceImpl.java | 37 ++++++++++++++++++++++---------------
src/main/webapp/views/taskLog/taskLog.html | 2 +-
src/main/webapp/static/js/common.js | 2 +-
3 files changed, 24 insertions(+), 17 deletions(-)
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 d72316d..a4b34d6 100644
--- a/src/main/java/com/zy/asrs/service/impl/MobileServiceImpl.java
+++ b/src/main/java/com/zy/asrs/service/impl/MobileServiceImpl.java
@@ -1228,11 +1228,14 @@
* @version 1.0
*/
@Override
+ @Transactional
public synchronized R callAgvMove(AgvCallParams params, Long userId) {
if (Objects.isNull(params.getOrgSite())) {
throw new CoolException("婧愮珯鐐逛笉鑳戒负绌猴紒锛�");
}
+ BasAreas basAreas = basAreasService.selectOne(new EntityWrapper<BasAreas>().eq("whs_type_id", LocAreaType.LOC_AREA_TYPE_IN_CACHE.type));
LocCache locCache = locCacheService.selectOne(new EntityWrapper<LocCache>()
+ .eq("area_id",basAreas.getId())
.eq("frozen", 0)
.eq("loc_sts", LocStsType.LOC_STS_TYPE_O.type)
// .eq("loc_no", params.getTarSite())
@@ -1242,7 +1245,12 @@
throw new CoolException("璇锋鏌ョ洰鏍囧簱浣嶆槸鍚﹂棽缃腑锛侊紒");
}
- generateAgvTask("agv", locCache, params.getOrgSite(), params.getBarcode(), userId);
+ try {
+ generateAgvTask("agv", locCache, params.getOrgSite(), params.getBarcode(), userId);
+ }catch (Exception e) {
+ throw new CoolException(e.getMessage());
+ }
+
return R.ok();
}
@@ -2209,7 +2217,7 @@
* @version 1.0
*/
@Transactional(rollbackFor = Exception.class)
- public synchronized void generateAgvTask(String type, LocCache loc, String orgSite, String barcode, Long userId) {
+ public void generateAgvTask(String type, LocCache loc, String orgSite, String barcode, Long userId) {
List<WaitPakin> pakins = waitPakinService.selectList(new EntityWrapper<WaitPakin>().eq("zpallet", barcode));
if (Objects.isNull(pakins) || pakins.isEmpty()) {
throw new CoolException("缁勬墭淇℃伅涓嶅瓨鍦紒锛�");
@@ -2245,11 +2253,10 @@
throw new CoolException("淇濆瓨宸ヤ綔妗eけ璐�");
}
- List<TaskDetl> taskDetls = new ArrayList<>();
- pakins.forEach(pakin -> {
+ for (WaitPakin pakin :pakins){
TaskDetl wrkDetl = new TaskDetl();
BeanUtils.copyProperties(pakin, wrkDetl);
- wrkDetl.setWrkNo(workNo)
+ wrkDetl.setId(null).setWrkNo(workNo)
.setIoTime(new Date())
.setOrderNo(pakin.getOrderNo())
.setAnfme(pakin.getAnfme())
@@ -2262,22 +2269,22 @@
.setModel(pakin.getModel())
.setAppeTime(new Date())
.setModiUser(userId);
- taskDetls.add(wrkDetl);
- });
+ if (!taskDetlService.insert(wrkDetl)){
+ throw new CoolException("淇濆瓨宸ヤ綔妗f槑缁嗗け璐�");
+ }
- //淇濆瓨宸ヤ綔妗f槑缁�
- if (!taskDetlService.insertBatch(taskDetls)) {
- throw new CoolException("淇濆瓨宸ヤ綔妗f槑缁嗗け璐�");
}
- pakins.forEach(pakin -> {
+
+ for (WaitPakin pakin : pakins){
pakin.setIoStatus("Y");
- });
-
- if (!waitPakinService.updateBatchById(pakins)) {
- throw new CoolException("鏇存柊缁勬墭淇℃伅澶辫触");
+ if (!waitPakinService.updateById(pakin)) {
+ throw new CoolException("鏇存柊缁勬墭淇℃伅澶辫触");
+ }
}
+
+
// 淇敼鐩爣搴撲綅鐘舵��
if (loc.getLocSts().equals(LocStsType.LOC_STS_TYPE_O.type)) {
loc.setLocSts(LocStsType.LOC_STS_TYPE_S.type); // S.鍏ュ簱棰勭害
diff --git a/src/main/webapp/static/js/common.js b/src/main/webapp/static/js/common.js
index 1b39761..69a4c4b 100644
--- a/src/main/webapp/static/js/common.js
+++ b/src/main/webapp/static/js/common.js
@@ -252,7 +252,7 @@
,{field: 'zpallet', align: 'center',title: '鎵樼洏鏉$爜', hide: false}
,{field: 'length', align: 'center',title: '閲嶉噺', hide: false}
,{field: 'volume', align: 'center',title: '灏哄', hide: false}
- ,{field: 'modiTime', align: 'center',title: '鏇存柊鏃堕棿', hide: false}
+ ,{field: 'modiTime$', align: 'center',title: '鏇存柊鏃堕棿', hide: false}
,{field: 'supp', align: 'center',title: '渚涘簲鍟�', hide: true}
,{field: 'specs', align: 'center',title: '瑙勬牸', hide: true}
,{field: 'model', align: 'center',title: '浠g爜', hide: true}
diff --git a/src/main/webapp/views/taskLog/taskLog.html b/src/main/webapp/views/taskLog/taskLog.html
index ccd0810..932f5fd 100644
--- a/src/main/webapp/views/taskLog/taskLog.html
+++ b/src/main/webapp/views/taskLog/taskLog.html
@@ -89,7 +89,7 @@
<script type="text/javascript" src="../../static/layui/layui.js" charset="utf-8"></script>
<script type="text/javascript" src="../../static/js/common.js" charset="utf-8"></script>
<script type="text/javascript" src="../../static/js/cool.js" charset="utf-8"></script>
-<script type="text/javascript" src="../../static/js/wrkMastLog/wrkMastLog.js" charset="utf-8"></script>
+<script type="text/javascript" src="../../static/js/taskLog/taskLog.js" charset="utf-8"></script>
<iframe id="detail-iframe" scrolling="auto" style="display:none;"></iframe>
--
Gitblit v1.9.1