Commit b1a8f668 LN

批量出库提示修改。

暂时去掉入库就近查找逻辑。
1 个父辈 467d776e
......@@ -700,6 +700,10 @@ public class BarcodeRule {
codeStr = "327203324369301963";
rule = "PN[-1_32:0:-1_3]RI[-1:0:-1]";
codeStr="TJM210215000771&10446507326&15000&2021-01-18&NAUK11263MAB&&10446&&R107920210124A13OG";
rule="RI&PN&QTY&PRODATEyyyy-MM-dd&5&6&7&8&9";
BarcodeRule br = BarcodeRule.newRule(rule);
Barcode b = br.toCodeBean(codeStr).getBarcode();
if(b != null){
......
......@@ -214,20 +214,21 @@ public class DeviceController {
resultMap.put("result","0");
resultMap.put("msg","");
okMsg = "["+rfid+"]["+barcode.getBarcode()+"]锁定库位["+pos.getPosName()+"]";
okMsg = "["+rfid+"]["+barcode.getBarcode()+"]锁定库位["+pos.getPosName()+"]优先级["+pos.getPriority()+"] 上个库位号["+lastPosId+"]";
ReelLockPosInfo oldLockInfo = ReelLockPosUtil.getLockPosInfoByCode(barcode.getBarcode());
if(oldLockInfo != null){
if(!oldLockInfo.getBarcode().equals(barcode.getBarcode())){
if(oldLockInfo != null) {
if (!oldLockInfo.getBarcode().equals(barcode.getBarcode())) {
String result = "-1";
okMsg = rfid+"["+ rfidLoc +"]["+barcode.getBarcode()+"]锁定库位["+pos.getPosName()+"],清理旧有锁定信息";
resultMap.put("result",result);
resultMap.put("msg",okMsg);
okMsg = rfid + "[" + rfidLoc + "][" + barcode.getBarcode() + "]锁定库位[" + pos.getPosName() + "],清理旧有锁定信息";
resultMap.put("result", result);
resultMap.put("msg", okMsg);
//已经锁定过库位,但不是同一个条码,需要把对应位置的锁定信息清理掉
ReelLockPosUtil.removeReelLockPosInfo(oldLockInfo.getBarcode());
log.info("清理锁定库位:库位号["+oldLockInfo.getLockPosName()+"]上物料["+oldLockInfo.getBarcode()+"]锁定的库位");
log.info("清理锁定库位:库位号[" + oldLockInfo.getLockPosName() + "]上物料[" + oldLockInfo.getBarcode() + "]锁定的库位");
}
}
......
package com.neotel.smfcore.core.storage.service.manager.impl;
import cn.hutool.core.util.ObjectUtil;
import com.google.common.base.Strings;
import com.google.common.collect.Maps;
import com.neotel.smfcore.common.bean.PageData;
......@@ -330,12 +331,12 @@ public class StoragePosManagerImpl implements IStoragePosManager {
COMPATIBLE_TYPE compatibleType = storage.getCompatibleType();
if(compatibleType == COMPATIBLE_TYPE.EXACT_MATCH){//完全匹配
if (compatibleType == COMPATIBLE_TYPE.EXACT_MATCH) {//完全匹配
c = c.and("w").is(barcode.getPlateSize()).and("h").is(barcode.getHeight());
}else if(compatibleType == COMPATIBLE_TYPE.FULLY_COMPATIBLE){//同厚度兼容
} else if (compatibleType == COMPATIBLE_TYPE.FULLY_COMPATIBLE) {//同厚度兼容
c = c.and("w").gte(barcode.getPlateSize()).and("h").gte(barcode.getHeight());//除7寸外,完全兼容
}else if(compatibleType == COMPATIBLE_TYPE.SIZE_COMPATIBLE){//同尺寸兼容
} else if (compatibleType == COMPATIBLE_TYPE.SIZE_COMPATIBLE) {//同尺寸兼容
c = c.and("w").is(barcode.getPlateSize()).and("h").gte(barcode.getHeight());//宽度等于料盘宽度,高度大于等于料盘高度
}
......@@ -343,18 +344,25 @@ public class StoragePosManagerImpl implements IStoragePosManager {
.and("used").is(false);//未使用
//去除的仓位
if(excludePosIds != null && !excludePosIds.isEmpty()){
if (excludePosIds != null && !excludePosIds.isEmpty()) {
c = c.and("id").nin(excludePosIds);
}
Query query = new Query(c);
if(lastPosId==null||lastPosId.equals("")){
String msg = "";
// if (lastPosId == null || lastPosId.equals("")) {
//优先放入最合适的位置(根据尺寸),相同尺寸按优先级排序
query.with(Sort.by(Sort.Direction.ASC, "w").and(Sort.by(Sort.Direction.ASC, "h")).and(Sort.by(Sort.Direction.DESC, "priority")));
}else{
Point point= PointUtil.getPosPoint(lastPosId,false);
query.addCriteria(Criteria.where("coordinate").nearSphere(point));
}
// } else {
// Point point = PointUtil.getPosPoint(lastPosId, false);
// query.addCriteria(Criteria.where("coordinate").nearSphere(point));
// msg += "getEmptyPosByStorage 根据就近坐标查询[" + lastPosId + "][" + point.getX() + "," + point.getY() + "]";
// }
StoragePos pos = storagePosDao.findOne(query);
if ((!ObjectUtil.isNotEmpty(msg) )&& (pos != null)) {
Point targetP = PointUtil.getPosPoint(lastPosId, false);
log.info(msg + "结果:[" + pos.getPosName() + "][" + targetP.getX() + "," + targetP.getY() + "]");
}
return pos;
}
@Override
......
......@@ -107,7 +107,7 @@ public class TaskService {
if (pos.getBarcode() == null) {
String msg = "库位[" + pos.getPosName() + "]中已无物料,忽略";
log.info(msg);
throw new ValidateException("smfcore.allBoxView.noReel", "库位中无物料");
throw new ValidateException("smfcore.allBoxView.noReel", "库位{0}中无物料",new String[]{pos.getPosName()});
}
DataLog task = new DataLog(storage, pos.getBarcode(), pos);
......
......@@ -29,7 +29,7 @@ smfcore.notFindPos=\u672A\u627E\u5230\u9501\u5B9A\u5E93\u4F4D
smfcore.error.barcode.empty=\u672A\u626B\u5230\u6761\u7801
smfcore.error.barcode.many=\u627E\u5230\u591A\u4E2A\u6709\u6548\u6761\u7801,\u65E0\u6CD5\u5165\u5E93
smfcore.error.barcode.expired=\u7269\u6599\u5DF2\u8FC7\u671F,\u65E0\u6CD5\u5165\u5E93.
smfcore.allBoxView.noReel=\u5E93\u4F4D\u4E2D\u65E0\u7269\u6599
smfcore.allBoxView.noReel=\u5E93\u4F4D{0}\u4E2D\u65E0\u7269\u6599
smfcode.error.barcode.many=\u627E\u5230\u591A\u4E2A\u6709\u6548\u7684\u6761\u7801
smfcode.error.barcode.noValidCode=\u65E0\u6548\u7684\u6761\u7801
smfcore.error.barcode.noValidCode={0}\u4E0D\u662F\u6709\u6548\u7684\u6761\u7801
......
......@@ -29,7 +29,7 @@ smfcore.notFindPos=Locked position not found
smfcore.error.barcode.empty=Barcode empty
smfcore.error.barcode.many=Found several barcodes, storage failed
smfcore.error.barcode.expired=Reel expired, storage failed
smfcore.allBoxView.noReel=No reel in position
smfcore.allBoxView.noReel=No reel in position {0}
smfcode.error.barcode.many=Found several barcodes
smfcode.error.barcode.noValidCode=Invalid barcode
smfcore.error.barcode.noValidCode=Invalid barcode {0}
......
......@@ -29,7 +29,7 @@ smfcore.notFindPos=\u30ED\u30C3\u30AF\u3055\u308C\u305F\u30B9\u30C8\u30EC\u30FC\
smfcore.error.barcode.empty=\u30D0\u30FC\u30B3\u30FC\u30C9\u304C\u30B9\u30AD\u30E3\u30F3\u3055\u308C\u306A\u3044
smfcore.error.barcode.many=\u8907\u6570\u306E\u6709\u52B9\u306A\u30D0\u30FC\u30B3\u30FC\u30C9\u304C\u898B\u3064\u304B\u308A\u307E\u3057\u305F\u304C\u3001\u5728\u5EAB\u306F\u3042\u308A\u307E\u305B\u3093
smfcore.error.barcode.expired=\u6750\u6599\u304C\u53E4\u304F\u3066\u5728\u5EAB\u304C\u306A\u3044
smfcore.allBoxView.noReel=\u4FDD\u7BA1\u4E2D\u306E\u7D20\u6750\u304C\u306A\u3044
smfcore.allBoxView.noReel=\u4FDD\u7BA1\u4E2D\u306E\u7D20\u6750\u304C\u306A\u3044{0}
smfcode.error.barcode.many=\u8907\u6570\u306E\u6709\u52B9\u306A\u30D0\u30FC\u30B3\u30FC\u30C9\u306E\u691C\u7D22
smfcode.error.barcode.noValidCode=\u7121\u52B9\u306A\u30D0\u30FC\u30B3\u30FC\u30C9
smfcore.error.barcode.noValidCode={0}\u306F\u6709\u52B9\u306A\u30D0\u30FC\u30B3\u30FC\u30C9\u3067\u306F\u3042\u308A\u307E\u305B\u3093
......
......@@ -29,7 +29,7 @@ smfcore.notFindPos=\u672A\u627E\u5230\u9501\u5B9A\u5E93\u4F4D
smfcore.error.barcode.empty=\u672A\u626B\u5230\u6761\u7801
smfcore.error.barcode.many=\u627E\u5230\u591A\u4E2A\u6709\u6548\u6761\u7801,\u65E0\u6CD5\u5165\u5E93
smfcore.error.barcode.expired=\u7269\u6599\u5DF2\u8FC7\u671F,\u65E0\u6CD5\u5165\u5E93.
smfcore.allBoxView.noReel=\u5E93\u4F4D\u4E2D\u65E0\u7269\u6599
smfcore.allBoxView.noReel=\u5E93\u4F4D{0}\u4E2D\u65E0\u7269\u6599
smfcode.error.barcode.many=\u627E\u5230\u591A\u4E2A\u6709\u6548\u7684\u6761\u7801
smfcode.error.barcode.noValidCode=\u65E0\u6548\u7684\u6761\u7801
smfcore.error.barcode.noValidCode={0}\u4E0D\u662F\u6709\u6548\u7684\u6761\u7801
......
......@@ -29,7 +29,7 @@ smfcore.notFindPos=\u672A\u627E\u5230\u9396\u5B9A\u5EAB\u4F4D
smfcore.error.barcode.empty=\u672A\u6383\u5230\u689D\u78BC
smfcore.error.barcode.many=\u627E\u5230\u591A\u500B\u6709\u6548\u689D\u78BC,\u7121\u6CD5\u5165\u5EAB
smfcore.error.barcode.expired=\u7269\u6599\u5DF2\u904E\u671F,\u7121\u6CD5\u5165\u5EAB.
smfcore.allBoxView.noReel=\u5EAB\u4F4D\u4E2D\u7121\u7269\u6599
smfcore.allBoxView.noReel=\u5EAB\u4F4D{0}\u4E2D\u7121\u7269\u6599
smfcode.error.barcode.many=\u627E\u5230\u591A\u500B\u6709\u6548\u7684\u689D\u78BC
smfcode.error.barcode.noValidCode=\u7121\u6548\u7684\u689D\u78BC
smfcore.error.barcode.noValidCode={0}\u4E0D\u662F\u6709\u6548\u7684\u689D\u78BC
......
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!