Commit 69e9cec4 sunke

AGV BOX

1 个父辈 1e7479c5
......@@ -725,6 +725,8 @@ public class BarcodeRule {
codeStr = "[)>@06@12S0002@PA2C4000670322@1P700042761@31PCGA4F2X7R2A103KT5Y2A@12V700042761@10VJPN-AKITA@2P1@20P25gsm@6D20210826@14D20220314@30PN@ZN@K0@16K0@V000000000@3SS100000000068@Q1KGM000@20T1@1T1@2T@1Z1@@";
rule = "1@2@3@PPN@5@6@7@8@9@10@6DPRODATEyyyyMMdd@14DEXPDATEyyyyMMdd@13@14@15@16@VSP@3SRI@QQTYKGM000@20@1TBATCH@22@23@24@25";
codeStr = "CS0001-1";
rule = "RI[-1:6:-1]PN[-1:2:-1]";
BarcodeRule br = BarcodeRule.newRule(rule);
Barcode b = br.toCodeBean(codeStr).getBarcode();
if(b != null){
......
......@@ -199,13 +199,18 @@ public class DataLog extends BasePo implements Serializable {
/**
* 出库时记录此料在库时长 ,分钟
*/
private long inStoreTime=0l;
private long inStoreTime=0L;
/**
* 如果是出库任务,需要记录入库时间
*/
private Date putInDate;
/**
* 目的地位置信息
*/
private String loc = "";
/**
* MSD附加信息
*/
private MSDAppendInfo msdAppendInfo;
......
package com.neotel.smfcore.custom.lizhen.rest;
import com.neotel.smfcore.common.bean.ResultBean;
import com.neotel.smfcore.core.barcode.enums.COMPONENT_TYPE;
import com.neotel.smfcore.core.barcode.service.manager.IBarcodeManager;
import com.neotel.smfcore.core.barcode.service.po.Barcode;
import com.neotel.smfcore.core.device.enums.OP_STATUS;
......@@ -16,6 +17,7 @@ import com.neotel.smfcore.custom.lizhen.util.StationCacheUtil;
import com.neotel.smfcore.security.annotation.AnonymousAccess;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.apache.logging.log4j.util.Strings;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
......@@ -152,6 +154,7 @@ public class AgvBoxDeviceClientController {
if (storage.isStorage(DeviceType.AGV_BOX)) {
if (isSameBarcodeTask(rfid, task)) {
opTask = task;
break;
}
}
}
......@@ -168,13 +171,33 @@ public class AgvBoxDeviceClientController {
if (loc != null) {
target = loc;
} else {
for (Station station : StationCacheUtil.getAllStations()) {
if (lockRfidTarget.get(station.getName()) == null) {
//工位未分配过库位
log.info("分配料箱[" + opTask.getBarcode() + "]到" + station.getName());
lockRfidTarget.put(opTask.getBarcode(), station.getName());
target = station.getName();
break;
loc = opTask.getLoc();
if(Strings.isNotBlank(loc)){
//出空箱子时已经指定了工位,先判断该工位是否有料箱
Station station = StationCacheUtil.getStation(loc);
if(station != null){
String stationRfid = station.getCurrentRfid();
if(Strings.isBlank(stationRfid)){
//该工位无料箱, 把空箱子分配到该工位
lockRfidTarget.put(opTask.getBarcode(),station.getName());
log.info("分配用于入库物料的料箱[" + opTask.getBarcode() + "]到" + station.getName());
target = station.getName();
}
}
}else{
for (Station station : StationCacheUtil.getAllStations()) {
String stationRfid = station.getCurrentRfid();
if(Strings.isBlank(stationRfid)){
//该工位目前无料箱
if (lockRfidTarget.get(station.getName()) == null) {
//工位未分配过库位
log.info("分配料箱[" + opTask.getBarcode() + "]到" + station.getName());
lockRfidTarget.put(opTask.getBarcode(), station.getName());
target = station.getName();
break;
}
}
}
}
}
......
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!