From c73f3dd7d3ce960406c705d27ce7d6e0130fc9e5 Mon Sep 17 00:00:00 2001
From: 18516761980 <4761516tqsxp>
Date: 星期五, 20 八月 2021 16:31:34 +0800
Subject: [PATCH] #
---
src/main/java/com/zy/asrs/entity/param/FullStoreParam.java | 14 +++++++
src/main/webapp/views/wrkMast/wrkDetl.html | 2 +
src/main/java/com/zy/asrs/task/handler/WorkMastHandler.java | 2 -
src/main/java/com/zy/asrs/entity/MatCodeCountDto.java | 19 +++++++++
src/main/webapp/static/js/matStore/matStore.js | 22 ++++++++---
src/main/webapp/views/matStore/matStore.html | 4 +-
src/main/webapp/static/js/common.js | 4 +-
src/main/java/com/zy/asrs/controller/MatStoreController.java | 6 ++
src/main/java/com/zy/common/service/CommonService.java | 18 ++++----
src/main/webapp/static/js/wrkDetl/wrkDetl.js | 5 ++
src/main/webapp/views/matStore/waitMatinQuery.html | 12 +++---
11 files changed, 79 insertions(+), 29 deletions(-)
diff --git a/src/main/java/com/zy/asrs/controller/MatStoreController.java b/src/main/java/com/zy/asrs/controller/MatStoreController.java
index a20063c..621c937 100644
--- a/src/main/java/com/zy/asrs/controller/MatStoreController.java
+++ b/src/main/java/com/zy/asrs/controller/MatStoreController.java
@@ -3,6 +3,7 @@
import com.core.annotations.ManagerAuth;
import com.core.common.R;
import com.zy.asrs.entity.param.FullStoreParam;
+import com.zy.asrs.service.MatStoreService;
import com.zy.asrs.service.WorkService;
import com.zy.common.web.BaseController;
import com.zy.ints.service.WaitMatinService;
@@ -21,10 +22,13 @@
private WaitMatinService waitMatinService;
@Autowired
private WorkService workService;
+ @Autowired
+ private MatStoreService matStoreService;
@RequestMapping("/mat/store/start")
@ManagerAuth(memo = "鍏ㄦ澘鍏ュ簱(閫氱煡妗�)")
public R matStoreStart(@RequestBody FullStoreParam fullStoreParam) {
- return R.ok("鍏ュ簱鍚姩鎴愬姛").add(workService.startupFullPutStore(fullStoreParam,getUserId()));
+// return R.ok("鍏ュ簱鍚姩鎴愬姛").add(workService.startupFullPutStore(fullStoreParam,getUserId()));
+ return R.ok("鍏ュ簱鍚姩鎴愬姛").add(matStoreService.startupFullStore(fullStoreParam,getUserId()));
}
}
diff --git a/src/main/java/com/zy/asrs/entity/MatCodeCountDto.java b/src/main/java/com/zy/asrs/entity/MatCodeCountDto.java
index cf738da..2c54a19 100644
--- a/src/main/java/com/zy/asrs/entity/MatCodeCountDto.java
+++ b/src/main/java/com/zy/asrs/entity/MatCodeCountDto.java
@@ -5,6 +5,10 @@
*/
public class MatCodeCountDto {
+ private String billNo;
+
+ private String seqNo;
+
private String matNo;
private Double count;
@@ -17,6 +21,21 @@
this.count = count;
}
+ public MatCodeCountDto(String billNo, String seqNo, String matNo, Double count) {
+ this.matNo = matNo;
+ this.count = count;
+ this.billNo = billNo;
+ this.seqNo = seqNo;
+ }
+
+ public String getBillNo() { return billNo; }
+
+ public void setBillNo(String billNo) { this.billNo = billNo; }
+
+ public String getSeqNo() { return seqNo; }
+
+ public void setSeqNo(String seqNo) { this.seqNo = seqNo; }
+
public String getMatNo() {
return matNo;
}
diff --git a/src/main/java/com/zy/asrs/entity/param/FullStoreParam.java b/src/main/java/com/zy/asrs/entity/param/FullStoreParam.java
index 560c73f..1007745 100644
--- a/src/main/java/com/zy/asrs/entity/param/FullStoreParam.java
+++ b/src/main/java/com/zy/asrs/entity/param/FullStoreParam.java
@@ -18,12 +18,26 @@
public static class MatCodeStore {
+ //鍗曟嵁缂栧彿
+ private String billNo;
+
+ //搴忓彿
+ private String seqNo;
+
// 浜у搧缂栧彿
private String matNo;
// 浜у搧鏁伴噺
private Double count;
+ public String getBillNo() { return billNo; }
+
+ public void setBillNo(String billNo) { this.billNo = billNo; }
+
+ public String getSeqNo() { return seqNo; }
+
+ public void setSeqNo(String seqNo) { this.seqNo = seqNo; }
+
public String getMatNo() {
return matNo;
}
diff --git a/src/main/java/com/zy/asrs/task/handler/WorkMastHandler.java b/src/main/java/com/zy/asrs/task/handler/WorkMastHandler.java
index 96f4855..409dba3 100644
--- a/src/main/java/com/zy/asrs/task/handler/WorkMastHandler.java
+++ b/src/main/java/com/zy/asrs/task/handler/WorkMastHandler.java
@@ -8,7 +8,6 @@
import com.zy.asrs.utils.VersionUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
-import org.springframework.transaction.annotation.Transactional;
import org.springframework.transaction.interceptor.TransactionAspectSupport;
import java.util.Date;
@@ -18,7 +17,6 @@
* Created by vincent on 2020/7/4
*/
@Service
-@Transactional
public class WorkMastHandler extends AbstractHandler<String> {
@Autowired
diff --git a/src/main/java/com/zy/common/service/CommonService.java b/src/main/java/com/zy/common/service/CommonService.java
index fffd861..b647bae 100644
--- a/src/main/java/com/zy/common/service/CommonService.java
+++ b/src/main/java/com/zy/common/service/CommonService.java
@@ -91,15 +91,15 @@
* @return locNo 妫�绱㈠埌鐨勫簱浣嶅彿
*/
public StartupDto getLocNo(Integer whsType, Integer staDescId, Integer sourceStaNo, List<String> matNos, int times) {
- if (sourceStaNo == 3) {
- whsType = 1;
- } else if (sourceStaNo == 7) {
- whsType = 2;
- } else if (sourceStaNo == 19) {
- whsType = 3;
- } else {
- throw new CoolException("鏃犳晥鍏ュ簱绔�");
- }
+// if (sourceStaNo == 3) {
+// whsType = 1;
+// } else if (sourceStaNo == 7) {
+// whsType = 2;
+// } else if (sourceStaNo == 19) {
+// whsType = 3;
+// } else {
+// throw new CoolException("鏃犳晥鍏ュ簱绔�");
+// }
StartupDto startupDto = new StartupDto();
RowLastno rowLastno = rowLastnoService.selectById(whsType);
if (Cools.isEmpty(rowLastno)) {
diff --git a/src/main/webapp/static/js/common.js b/src/main/webapp/static/js/common.js
index 987bb1c..b51fb07 100644
--- a/src/main/webapp/static/js/common.js
+++ b/src/main/webapp/static/js/common.js
@@ -181,11 +181,11 @@
,{field: 'matName', align: 'center',title: '浜у搧鍚嶇О'}
,{field: 'specs', align: 'center',title: '瑙勬牸'}
,{field: 'qty', align: 'center',title: '鏁伴噺'}
- ,{field: 'unit', align: 'center',title: '鍗曚綅'}
+ ,{field: 'unit', align: 'center',title: '鍗曚綅', width:80}
,{field: 'size', align: 'center',title: '灏哄'}
,{field: 'color', align: 'center',title: '棰滆壊'}
,{field: 'zpallet', align: 'center',title: '鎵樼洏鏉$爜'}
// ,{field: 'bname', align: 'center',title: '搴撲綅鍚嶇О'}
- ,{field: 'memo', align: 'center',title: '澶囨敞'}
+ ,{field: 'memo', align: 'center',title: '澶囨敞', hide: true}
]
diff --git a/src/main/webapp/static/js/matStore/matStore.js b/src/main/webapp/static/js/matStore/matStore.js
index 7f83832..127eab5 100644
--- a/src/main/webapp/static/js/matStore/matStore.js
+++ b/src/main/webapp/static/js/matStore/matStore.js
@@ -5,7 +5,7 @@
var cols = [
{fixed: 'left', field: 'count', title: '鏁伴噺(蹇呭~)', align: 'center', edit:'text', width: 120, style:'color: blue;font-weight: bold'}
,{field: 'billNo', title:'鍗曟嵁缂栧彿', align: 'center'}
- ,{field: 'seqNo', title:'搴忓彿', align: 'center'}
+ ,{field: 'seqNo', title:'搴忓彿', align: 'center', width:80}
,{field: 'qty', title:'閫氱煡鍏ュ簱閲�', align: 'center'}
,{field: 'inQty', title:'宸插叆搴撻噺', align: 'center'}
];
@@ -42,7 +42,7 @@
// 椤甸潰淇敼
table.on('edit(chooseData)', function (obj) {
- updateMatCodeData(obj.data.matNo, Number(obj.value));
+ updateMatCodeData(obj.data.billNo,obj.data.seqNo,obj.data.matNo, Number(obj.value),Number(obj.data.qty),Number(obj.data.inQty));
});
// 鐩戝惉澶村伐鍏锋爮浜嬩欢
@@ -66,9 +66,14 @@
layer.msg("鏁伴噺涓嶈兘涓洪浂");
return;
}
+ if (matCodeData[i].count > (matCodeData[i].qty - matCodeData[i].inQty)){
+ layer.msg("鍏ュ簱鏁伴噺涓嶈兘瓒呰繃鍙叆搴撻噺");
+ return;
+ }
}
+ console.log(matCodeData)
$.ajax({
- url: baseUrl+"/full/store/put/start",
+ url: baseUrl+"/mat/store/start",
headers: {'token': localStorage.getItem('token')},
data: JSON.stringify({
devpNo: Number($('#putSiteSelect').val()),
@@ -150,13 +155,17 @@
}
}
- function updateMatCodeData(matNo, count) {
+ function updateMatCodeData(billNo, seqNo, matNo, count, qty, inQty) {
if (isNaN(count)) {
layer.msg("璇疯緭鍏ユ暟瀛�");
} else {
+ if(count > (qty-inQty) ){
+ layer.msg("鍏ュ簱鏁伴噺涓嶈兘瓒呰繃鍙叆搴撻噺");
+ }
if (count > 0) {
for (var i=0;i<matCodeData.length;i++){
- if (matCodeData[i]["matNo"] === matNo){
+ // if (matCodeData[i]["matNo"] === matNo){
+ if (matCodeData[i]["billNo"] === billNo && matCodeData[i]["seqNo"] === seqNo){
matCodeData[i]["count"] = count;
}
}
@@ -217,7 +226,8 @@
for (var i=0;i<data.length;i++){
let pass = false;
for (var j=0;j<matCodeData.length;j++){
- if (data[i].matNo === matCodeData[j].matNo) {
+ // if (data[i].matNo === matCodeData[j].matNo) {
+ if (data[i].billNo === matCodeData[j].billNo && data[i].seqNo === matCodeData[j].seqNo) {
pass = true;
break;
}
diff --git a/src/main/webapp/static/js/wrkDetl/wrkDetl.js b/src/main/webapp/static/js/wrkDetl/wrkDetl.js
index cf5dd90..9aad5bf 100644
--- a/src/main/webapp/static/js/wrkDetl/wrkDetl.js
+++ b/src/main/webapp/static/js/wrkDetl/wrkDetl.js
@@ -5,7 +5,10 @@
,{field: 'ioTime$', align: 'center',title: '宸ヤ綔鏃堕棿', width: 160}
];
cols.push.apply(cols, detlCols);
- cols.push({field: 'modiUser$', align: 'center',title: '淇敼浜哄憳', hide:true}
+ cols.push(
+ {field: 'billNo', align: 'center',title: '鍗曟嵁缂栧彿'}
+ ,{field: 'seqNo', align: 'center',title: '搴忓彿', width:80}
+ ,{field: 'modiUser$', align: 'center',title: '淇敼浜哄憳', hide:true}
,{field: 'modiTime$', align: 'center',title: '淇敼鏃堕棿', hide:true})
return cols;
}
diff --git a/src/main/webapp/views/matStore/matStore.html b/src/main/webapp/views/matStore/matStore.html
index 57124d3..b7d9da0 100644
--- a/src/main/webapp/views/matStore/matStore.html
+++ b/src/main/webapp/views/matStore/matStore.html
@@ -76,7 +76,7 @@
#btn-comb {
margin-left: 60px;
- display: none;
+ /*display: none;*/
}
</style>
</head>
@@ -108,7 +108,7 @@
<!-- 琛� -->
<script type="text/html" id="operate">
- <a class="layui-btn layui-btn-normal layui-btn-xs" lay-event="memo">澶囨敞</a>
+<!-- <a class="layui-btn layui-btn-normal layui-btn-xs" lay-event="memo">澶囨敞</a>-->
<a class="layui-btn layui-btn-danger layui-btn-xs" lay-event="remove">绉婚櫎</a>
</script>
diff --git a/src/main/webapp/views/matStore/waitMatinQuery.html b/src/main/webapp/views/matStore/waitMatinQuery.html
index 769681d..47a9e2a 100644
--- a/src/main/webapp/views/matStore/waitMatinQuery.html
+++ b/src/main/webapp/views/matStore/waitMatinQuery.html
@@ -75,13 +75,14 @@
function getCol() {
var cols = [
{type: 'checkbox', fixed: 'left'}
- ,{type: 'qty', title: '閫氱煡鍏ュ簱閲�', fixed: 'left'}
- ,{type: 'inQty', title: '宸插叆搴撻噺', fixed: 'left'}
+ ,{field: 'qty', title: '閫氱煡鍏ュ簱閲�', fixed: 'left', width:100}
+ ,{field: 'inQty', title: '宸插叆搴撻噺', fixed: 'left', width:90}
];
cols.push.apply(cols, matCols);
- cols.push(
- {field: 'modiUser$', align: 'center',title: '淇敼浜哄憳', hide: true},
- {field: 'modiTime$', align: 'center',title: '淇敼鏃堕棿'}
+ cols.push({field: 'billNo', title:'鍗曟嵁缂栧彿', align: 'center'}
+ ,{field: 'seqNo', title:'搴忓彿', align: 'center', width:80}
+ ,{field: 'modiUser$', align: 'center',title: '淇敼浜哄憳', hide: true}
+ ,{field: 'modiTime$', align: 'center',title: '淇敼鏃堕棿'}
)
return cols;
}
@@ -120,7 +121,6 @@
statusCode: 200
},
done: function (res, curr, count) {
- console.log(res);
if (res.code === 403) {
top.location.href = baseUrl + "/";
}
diff --git a/src/main/webapp/views/wrkMast/wrkDetl.html b/src/main/webapp/views/wrkMast/wrkDetl.html
index af87049..e5567b9 100644
--- a/src/main/webapp/views/wrkMast/wrkDetl.html
+++ b/src/main/webapp/views/wrkMast/wrkDetl.html
@@ -34,6 +34,8 @@
,{field: 'ioTime$', align: 'center',title: '宸ヤ綔鏃堕棿'}
];
cols.push.apply(cols, detlCols);
+ cols.push({field: 'billNo', title:'鍗曟嵁缂栧彿', align: 'center'}
+ ,{field: 'seqNo', title:'搴忓彿', align: 'center', width:80});
return cols;
}
layui.use(['table','laydate', 'form'], function() {
--
Gitblit v1.9.1