From 3d7a3f51d1f01c62a03ddbe5cab6e395e30e607b Mon Sep 17 00:00:00 2001
From: dubin <bindu_bean@163.com>
Date: 星期二, 25 十一月 2025 16:46:55 +0800
Subject: [PATCH] #1
---
src/main/webapp/views/locMast/locMast.html | 4 +
src/main/java/com/zy/asrs/utils/MatExcelListener.java | 5 +-
src/main/java/com/zy/asrs/controller/BarcodeMatnrController.java | 90 +++++++++++++++++++++++----------------------
src/main/webapp/views/stoMan/stoQue.html | 6 ++-
src/main/webapp/views/report/viewWorkIn.html | 2
src/main/webapp/static/js/common.js | 10 ++--
6 files changed, 62 insertions(+), 55 deletions(-)
diff --git a/src/main/java/com/zy/asrs/controller/BarcodeMatnrController.java b/src/main/java/com/zy/asrs/controller/BarcodeMatnrController.java
index 97217ac..6998cf0 100644
--- a/src/main/java/com/zy/asrs/controller/BarcodeMatnrController.java
+++ b/src/main/java/com/zy/asrs/controller/BarcodeMatnrController.java
@@ -41,30 +41,32 @@
private MatService matService;
@Autowired
private WaitPakinService waitPakinService;
+
/*
- * 鐗╂枡鎵樼洏缁戝畾鍒嗛〉鏌ヨ
- * */
+ * 鐗╂枡鎵樼洏缁戝畾鍒嗛〉鏌ヨ
+ * */
@RequestMapping(value = "/barcodeMatnr/list/auth")
@ManagerAuth
- public R list(@RequestParam(defaultValue = "1")Integer curr,
- @RequestParam(defaultValue = "10")Integer limit,
- @RequestParam(required = false)String orderByField,
- @RequestParam(required = false)String orderByType,
- @RequestParam Map<String, Object> param){
+ public R list(@RequestParam(defaultValue = "1") Integer curr,
+ @RequestParam(defaultValue = "10") Integer limit,
+ @RequestParam(required = false) String orderByField,
+ @RequestParam(required = false) String orderByType,
+ @RequestParam Map<String, Object> param) {
excludeTrash(param);
EntityWrapper<MatBarcode> wrapper = new EntityWrapper<>();
convert(param, wrapper);
- if (!Cools.isEmpty(orderByField)){wrapper.orderBy(humpToLine(orderByField), "asc".equals(orderByType));}
- else {
+ if (!Cools.isEmpty(orderByField)) {
+ wrapper.orderBy(humpToLine(orderByField), "asc".equals(orderByType));
+ } else {
wrapper.orderBy("modi_time", false);
}
return R.ok(matBarcodeService.selectPage(new Page<>(curr, limit), wrapper));
}
- private void convert(Map<String, Object> map, EntityWrapper wrapper){
- for (Map.Entry<String, Object> entry : map.entrySet()){
+ private void convert(Map<String, Object> map, EntityWrapper wrapper) {
+ for (Map.Entry<String, Object> entry : map.entrySet()) {
String val = String.valueOf(entry.getValue());
- if (val.contains(RANGE_TIME_LINK)){
+ if (val.contains(RANGE_TIME_LINK)) {
String[] dates = val.split(RANGE_TIME_LINK);
wrapper.ge(entry.getKey(), DateUtils.convert(dates[0]));
wrapper.le(entry.getKey(), DateUtils.convert(dates[1]));
@@ -75,8 +77,8 @@
}
/*
- * 鐗╂枡鎵樼洏瑙g粦
- * */
+ * 鐗╂枡鎵樼洏瑙g粦
+ * */
@RequestMapping("/barcodeMatnr/matnrLostBarcode")
@ManagerAuth(memo = "鐗╂枡鎵樼洏瑙g粦")
public R matnrLostBarcode(@RequestBody List<MatBarcode> list) {
@@ -85,16 +87,16 @@
}
/*
- * 鎵归噺缁勬墭
- * */
+ * 鎵归噺缁勬墭
+ * */
@RequestMapping("/barcodeMatnr/matnrAndBarcode")
@ManagerAuth(memo = "鐗╂枡鎵樼洏鎵归噺缁勬墭")
public R matnrAndBarcode(@RequestBody List<MatBarcode> list) {
- if (Cools.isEmpty(list)){
+ if (Cools.isEmpty(list)) {
return R.error(BaseRes.PARAM);
}
for (MatBarcode matBarcode : list) {
- if (!matBarcode.getZpallet().equals(list.get(0).getZpallet())){
+ if (!matBarcode.getZpallet().equals(list.get(0).getZpallet())) {
log.info(matBarcode.getZpallet());
log.info(list.get(0).getZpallet());
throw new CoolException("璇烽�夋嫨鐩稿悓鎵樼洏鐮佺殑鏁版嵁");
@@ -106,12 +108,12 @@
}
/*鐗╂枡鎵樼洏缁戝畾
- *
- * */
+ *
+ * */
@RequestMapping(value = "/barcodeMatnr/add/auth")
@ManagerAuth
public R add(WaitPakin waitPakin) {
- if (Cools.isEmpty(waitPakin.getBarcode())||Cools.isEmpty(waitPakin.getModiUser())){
+ if (Cools.isEmpty(waitPakin.getBarcode()) || Cools.isEmpty(waitPakin.getModiUser())) {
return R.error(BaseRes.PARAM);
}
matBarcodeService.addBarcodeMatnr(waitPakin);
@@ -119,24 +121,24 @@
}
/*缁勬墭
- *
- * */
+ *
+ * */
@RequestMapping(value = "/barcodeMatnr/comb/auth")
@ManagerAuth
public R comb(WaitPakin waitPakin) {
Mat mat = matService.selectById(waitPakin.getModiUser());
MatBarcode matBarcode = matBarcodeService.selectbyMatnr(mat.getMatnr());
- if (matBarcode == null){
+ if (matBarcode == null) {
throw new CoolException("璇ョ墿鏂欐湭涓庢墭鐩樼粦瀹�");
- }else {
- if (!matBarcode.getZpallet().equals(waitPakin.getBarcode())){
- throw new CoolException("璇ョ墿鏂欎笌鍏朵粬鎵樼洏缁戝畾锛屼笉鑳戒笌褰撳墠鎵樼洏"+waitPakin.getBarcode()+"缁戝畾锛屼笌璇ョ墿鏂欑粦瀹氱殑鎵樼洏鏄�"+matBarcode.getZpallet());
+ } else {
+ if (!matBarcode.getZpallet().equals(waitPakin.getBarcode())) {
+ throw new CoolException("璇ョ墿鏂欎笌鍏朵粬鎵樼洏缁戝畾锛屼笉鑳戒笌褰撳墠鎵樼洏" + waitPakin.getBarcode() + "缁戝畾锛屼笌璇ョ墿鏂欑粦瀹氱殑鎵樼洏鏄�" + matBarcode.getZpallet());
}
}
- if (mat.getColor().equals("鎶ュ簾")){
+ if (mat.getColor().equals("鎶ュ簾")) {
throw new CoolException("璇ョ墿鏂欏凡鎶ュ簾锛岃鍕跨粦瀹�");
}
- if (Cools.isEmpty(waitPakin.getBarcode())||Cools.isEmpty(waitPakin.getModiUser())||Cools.isEmpty(waitPakin.getAnfme())){
+ if (Cools.isEmpty(waitPakin.getBarcode()) || Cools.isEmpty(waitPakin.getModiUser()) || Cools.isEmpty(waitPakin.getAnfme())) {
return R.error(BaseRes.PARAM);
}
mobileService.combToWms(waitPakin);
@@ -144,26 +146,26 @@
}
/*骞舵澘
- *
- * */
+ *
+ * */
// @RequestMapping(value = "/barcodeMatnr/clamp/auth")
@ManagerAuth
public R clamp(WaitPakin waitPakin) {
- if (Cools.isEmpty(waitPakin.getBarcode())||Cools.isEmpty(waitPakin.getModiUser())){
+ if (Cools.isEmpty(waitPakin.getBarcode()) || Cools.isEmpty(waitPakin.getModiUser())) {
return R.error(BaseRes.PARAM);
}
Mat mat = matService.selectById(waitPakin.getModiUser());
MatBarcode matBarcode = matBarcodeService.selectbyMatnr(mat.getMatnr());
- if (matBarcode == null){
+ if (matBarcode == null) {
throw new CoolException("璇ョ墿鏂欐湭涓庢墭鐩樼粦瀹�");
- }else {
- if (!matBarcode.getZpallet().equals(waitPakin.getBarcode())){
- throw new CoolException("璇ョ墿鏂欎笌鍏朵粬鎵樼洏缁戝畾锛屼笉鑳戒笌褰撳墠鎵樼洏"+waitPakin.getBarcode()+"缁戝畾锛屼笌璇ョ墿鏂欑粦瀹氱殑鎵樼洏鏄�"+matBarcode.getZpallet());
+ } else {
+ if (!matBarcode.getZpallet().equals(waitPakin.getBarcode())) {
+ throw new CoolException("璇ョ墿鏂欎笌鍏朵粬鎵樼洏缁戝畾锛屼笉鑳戒笌褰撳墠鎵樼洏" + waitPakin.getBarcode() + "缁戝畾锛屼笌璇ョ墿鏂欑粦瀹氱殑鎵樼洏鏄�" + matBarcode.getZpallet());
}
}
- MobileAdjustParam combParam=new MobileAdjustParam();
- ArrayList<CombParam.CombMat> combMats=new ArrayList<>();
- CombParam.CombMat combMat=new CombParam.CombMat();
+ MobileAdjustParam combParam = new MobileAdjustParam();
+ ArrayList<CombParam.CombMat> combMats = new ArrayList<>();
+ CombParam.CombMat combMat = new CombParam.CombMat();
combMat.setMatnr(mat.getMatnr());
combMat.setMaktx(mat.getMaktx());
// combMat.setAnfme(waitPakin.getAnfme());
@@ -178,14 +180,14 @@
/*鎵归噺骞舵澘*/
@RequestMapping(value = "/barcodeMatnr/clamp/auth")
@ManagerAuth
- public R clamp2(@RequestBody List<MatBarcode> list){
- if (Cools.isEmpty(list)){
+ public R clamp2(@RequestBody List<MatBarcode> list) {
+ if (Cools.isEmpty(list)) {
return R.error(BaseRes.PARAM);
}
for (MatBarcode matBarcode : list) {
- MobileAdjustParam combParam=new MobileAdjustParam();
- ArrayList<CombParam.CombMat> combMats=new ArrayList<>();
- CombParam.CombMat combMat=new CombParam.CombMat();
+ MobileAdjustParam combParam = new MobileAdjustParam();
+ ArrayList<CombParam.CombMat> combMats = new ArrayList<>();
+ CombParam.CombMat combMat = new CombParam.CombMat();
combMat.setMatnr(matBarcode.getMatnr());
combMat.setMaktx(matBarcode.getMaktx());
combMat.setAnfme(1.0);
diff --git a/src/main/java/com/zy/asrs/utils/MatExcelListener.java b/src/main/java/com/zy/asrs/utils/MatExcelListener.java
index 081e136..07113a6 100644
--- a/src/main/java/com/zy/asrs/utils/MatExcelListener.java
+++ b/src/main/java/com/zy/asrs/utils/MatExcelListener.java
@@ -2,6 +2,7 @@
import com.alibaba.excel.context.AnalysisContext;
import com.alibaba.excel.event.AnalysisEventListener;
+import com.baomidou.mybatisplus.mapper.EntityWrapper;
import com.core.common.Cools;
import com.core.common.SpringUtils;
import com.core.exception.CoolException;
@@ -163,10 +164,10 @@
}
//妯″叿淇℃伅鏇存柊
- matService.deleteById(mat.getId());
+ matService.delete(new EntityWrapper<Mat>().eq("matnr",mat.getMatnr()));
mat = excel;
mat.setTagId(tagId);
- mat.setMatnr(excel.getMatnr()+"__"+excel.getName());
+ mat.setMatnr(excel.getMatnr() + "__" + excel.getName());
if (!matService.insert(mat)) {
throw new CoolException("淇濆瓨鍟嗗搧妗f澶辫触锛屽晢鍝佺紪鐮侊細" + excel.getMatnr());
}
diff --git a/src/main/webapp/static/js/common.js b/src/main/webapp/static/js/common.js
index 17cd5a5..18bc5d2 100644
--- a/src/main/webapp/static/js/common.js
+++ b/src/main/webapp/static/js/common.js
@@ -236,7 +236,7 @@
,{field: 'batch', align: 'center',title: '鎵规', hide:true,sort:true}
,{field: 'outOrderNo', align: 'center',title: '鍚堝悓鍙�', sort:true, hide: true}
,{field: 'unit', align: 'center',title: '鍗曚綅', hide: true}
- ,{field: 'anfme', align: 'center',title: '鏁伴噺', hide: false}
+ ,{field: 'anfme', align: 'center',title: '鏁伴噺', hide: true}
,{field: 'zpallet', align: 'center',title: '鎵樼洏鏉$爜', hide: false}
,{field: 'specs', align: 'center',title: '瑙勬牸', hide: false}
,{field: 'color', align: 'center',title: '棰滆壊', hide: true}
@@ -250,11 +250,11 @@
,{field: 'manuDate', align: 'center',title: '鐢熶骇鏃ユ湡', hide: true}
,{field: 'itemNum', align: 'center',title: '鍝侀」鏁�', hide: true}
,{field: 'safeQty', align: 'center',title: '瀹夊叏搴撳瓨閲�', hide: true}
- ,{field: 'weight', align: 'center',title: '鎬婚噸閲�', hide: true}
- ,{field: 'length', align: 'center',title: '鍗曠姣涢噸', hide: true}
+ ,{field: 'weight', align: 'center',title: '鐞嗚鍏嬮噸', hide: true, edit:'text', width: 130, style:'color: blue;font-weight: bold'}
+ ,{field: 'length', align: 'center',title: '瀹為檯鍏嬮噸', hide: true, edit:'text', width: 130, style:'color: blue;font-weight: bold'}
,{field: 'volume', align: 'center',title: '鍗曠浣撶Н', hide: true}
,{field: 'threeCode', align: 'center',title: '绠卞瓙灏哄', hide: true}
- ,{field: 'supp', align: 'center',title: '瀹㈡埛鍚嶇О', hide:false }
+ ,{field: 'supp', align: 'center',title: '瀹㈡埛鍚嶇О', hide:true }
,{field: 'suppCode', align: 'center',title: '渚涘簲鍟嗙紪鐮�', hide: true}
,{field: 'beBatch$', align: 'center',title: '鏄惁鎵规', hide: true}
,{field: 'deadTime', align: 'center',title: '淇濊川鏈�', hide: true}
@@ -262,7 +262,7 @@
,{field: 'source$', align: 'center',title: '鍒惰喘', hide: true}
,{field: 'check$', align: 'center',title: '瑕佹眰妫�楠�', hide: true}
,{field: 'danger$', align: 'center',title: '鍗遍櫓鍝�', hide: true}
- ,{field: 'proType', align: 'center',title: '灞炴��', hide: false}
+ ,{field: 'proType', align: 'center',title: '灞炴��', hide: true}
,{field: 'temp1', align: 'center',title: '鍚嶇О鎬荤О', hide: true}
,{field: 'temp2', align: 'center',title: '瀹㈡埛鍥惧彿', hide: true}
diff --git a/src/main/webapp/views/locMast/locMast.html b/src/main/webapp/views/locMast/locMast.html
index 78c5440..969fb8e 100644
--- a/src/main/webapp/views/locMast/locMast.html
+++ b/src/main/webapp/views/locMast/locMast.html
@@ -46,7 +46,9 @@
<!-- <option style="display: none"></option>-->
<option value=""></option>
<option value="1">浣庡簱浣�</option>
- <option value="2">楂樺簱浣�</option>
+ <option value="2">涓簱浣�</option>
+ <option value="5">楂樺簱浣�</option>
+ <option value="6">瓒呴珮搴撲綅</option>
</select>
</div>
</div>
diff --git a/src/main/webapp/views/report/viewWorkIn.html b/src/main/webapp/views/report/viewWorkIn.html
index b3036eb..4a6af8d 100644
--- a/src/main/webapp/views/report/viewWorkIn.html
+++ b/src/main/webapp/views/report/viewWorkIn.html
@@ -26,7 +26,7 @@
</div>
<div class="layui-inline">
<div class="layui-input-inline">
- <input class="layui-input" type="text" name="matnr" placeholder="鍝佸彿" autocomplete="off">
+ <input class="layui-input" type="text" name="matnr" placeholder="鍟嗗搧妯″叿鍚嶇О" autocomplete="off">
</div>
</div>
<div class="layui-inline">
diff --git a/src/main/webapp/views/stoMan/stoQue.html b/src/main/webapp/views/stoMan/stoQue.html
index ffc3e82..7393ca9 100644
--- a/src/main/webapp/views/stoMan/stoQue.html
+++ b/src/main/webapp/views/stoMan/stoQue.html
@@ -48,8 +48,10 @@
<select name="loc_type1" id="loc_type1" class="layui-input" type="text" placeholder="搴撲綅绫诲瀷" autocomplete="off">
<!-- <option style="display: none"></option>-->
<option value=""></option>
- <option value="1">灏忓簱浣�</option>
- <option value="2">澶у簱浣�</option>
+ <option value="1">浣庡簱浣�</option>
+ <option value="2">涓簱浣�</option>
+ <option value="5">楂樺簱浣�</option>
+ <option value="6">瓒呴珮搴撲綅</option>
</select>
</div>
</div>
--
Gitblit v1.9.1