Commit 5aa21a07 sunke

包装仓增加根据虚拟RFID获取真实RFID

替代料逻辑修改
替代料接口提供
3F到达接驳台接口提供
流水线入库时,如果已有出库任务,返回任务的相关信息
1 个父辈 c00de27b
...@@ -34,6 +34,7 @@ public class DeviceAlarmMsgBean { ...@@ -34,6 +34,7 @@ public class DeviceAlarmMsgBean {
public void updateMsg(DeviceAlarmMsgBean newBean){ public void updateMsg(DeviceAlarmMsgBean newBean){
this.msgValue = newBean.getMsgValue(); this.msgValue = newBean.getMsgValue();
this.name = newBean.getName(); this.name = newBean.getName();
this.type = newBean.getType();
this.updateTime = new Date(); this.updateTime = new Date();
} }
......
...@@ -815,5 +815,16 @@ public class InquiryShelfBean { ...@@ -815,5 +815,16 @@ public class InquiryShelfBean {
return false; return false;
} }
public static ShelfInfo findShelfByTempRfid(String tempRfid){
for (Map<String, ShelfInfo> shelfInfoMap : hSerialShelfMap.values()) {
for (ShelfInfo shelf : shelfInfoMap.values()) {
if(shelf.tempRfid().equals(tempRfid)){
return shelf;
}
}
}
return null;
}
} }
...@@ -28,7 +28,7 @@ public class ReelLockPosInfo { ...@@ -28,7 +28,7 @@ public class ReelLockPosInfo {
/** /**
* 锁定的库位 * 锁定的库位
*/ */
private String lockPos; private String lockPosName;
/** /**
* 锁定的库位Id * 锁定的库位Id
...@@ -51,12 +51,12 @@ public class ReelLockPosInfo { ...@@ -51,12 +51,12 @@ public class ReelLockPosInfo {
this.cid = cid; this.cid = cid;
} }
public String getLockPos() { public String getLockPosName() {
return lockPos; return lockPosName;
} }
public void setLockPos(String lockPos) { public void setLockPosName(String lockPosName) {
this.lockPos = lockPos; this.lockPosName = lockPosName;
} }
public String getLockPosId() { public String getLockPosId() {
...@@ -87,7 +87,7 @@ public class ReelLockPosInfo { ...@@ -87,7 +87,7 @@ public class ReelLockPosInfo {
public String toString() { public String toString() {
return "ReelLockPosInfo{" + return "ReelLockPosInfo{" +
"barcode='" + barcode + '\'' + "barcode='" + barcode + '\'' +
", lockPos='" + lockPos + '\'' + ", lockPosName='" + lockPosName + '\'' +
", rfid='" + rfid + '\'' + ", rfid='" + rfid + '\'' +
", rfidLoc='" + rfidLoc + '\'' + ", rfidLoc='" + rfidLoc + '\'' +
'}'; '}';
......
...@@ -267,6 +267,16 @@ public class RequestOutItemBean { ...@@ -267,6 +267,16 @@ public class RequestOutItemBean {
this.endOutInfo = endOutInfo; this.endOutInfo = endOutInfo;
} }
/**
* 是否是分盘料
*/
public boolean isCutMaterial(){
if(reelcut == null){
return false;
}
return "Y".equalsIgnoreCase(reelcut);
}
@Override @Override
public String toString() { public String toString() {
return "RequestOutItemBean{" + return "RequestOutItemBean{" +
......
...@@ -102,6 +102,9 @@ public class Settings extends BaseMongoBean { ...@@ -102,6 +102,9 @@ public class Settings extends BaseMongoBean {
private int inactionDay = 0; private int inactionDay = 0;
public String getProductCustom() { public String getProductCustom() {
if(productCustom == null){
return "4D";
}
return productCustom; return productCustom;
} }
......
...@@ -89,11 +89,11 @@ public class QisdaApi { ...@@ -89,11 +89,11 @@ public class QisdaApi {
/** /**
* 获取库存进行比对 * 获取库存进行比对
*/ */
public static Map<String,DiffInfo> getInventory() throws ApiException { public static Map<String,DiffInfo> getInventory(String area) throws ApiException {
String url = "http://10.85.17.233/ESMTCommonInterface/CommonService.asmx/VMIStcok"; String url = "http://10.85.17.233/ESMTCommonInterface/CommonService.asmx/VMIStcok";
Map<String,Object> paramMap = new HashMap<String,Object>(); Map<String,Object> paramMap = new HashMap<String,Object>();
paramMap.put("area","4D"); paramMap.put("area",area);
Map<String,DiffInfo> diffInfoMap = new HashMap<>(); Map<String,DiffInfo> diffInfoMap = new HashMap<>();
String result = HttpHelper.postParam(url,paramMap); String result = HttpHelper.postParam(url,paramMap);
...@@ -603,6 +603,12 @@ public class QisdaApi { ...@@ -603,6 +603,12 @@ public class QisdaApi {
return msg; return msg;
} }
/**
* 获取物料尺寸
* @param partNum
* @param vendorCode
* @return
*/
public static PLATE_SIZE PartNoRule(String partNum, String vendorCode){ public static PLATE_SIZE PartNoRule(String partNum, String vendorCode){
String url = "http://10.85.17.233/ESMTCommonInterface/CommonService.asmx/PartNoRule"; String url = "http://10.85.17.233/ESMTCommonInterface/CommonService.asmx/PartNoRule";
Map<String,Object> paramMap = new HashMap<String,Object>(); Map<String,Object> paramMap = new HashMap<String,Object>();
......
...@@ -55,6 +55,9 @@ public class DifferentInventoryController extends BaseController { ...@@ -55,6 +55,9 @@ public class DifferentInventoryController extends BaseController {
@Autowired @Autowired
private IStoragePosManager storagePosManager; private IStoragePosManager storagePosManager;
@Autowired
private DataCache dataCache;
protected final transient Logger log = LogManager.getLogger(getClass()); protected final transient Logger log = LogManager.getLogger(getClass());
/** /**
...@@ -72,8 +75,9 @@ public class DifferentInventoryController extends BaseController { ...@@ -72,8 +75,9 @@ public class DifferentInventoryController extends BaseController {
qisdaReelMap = readQisda(file); qisdaReelMap = readQisda(file);
}else{ }else{
try { try {
String area = dataCache.getSettings().getProductCustom();
log.info("开始与Qisda比对库存"); log.info("开始与Qisda比对库存");
qisdaReelMap = QisdaApi.getInventory(); qisdaReelMap = QisdaApi.getInventory(area);
}catch (Exception e){ }catch (Exception e){
log.info("获取Qisda库存出错:",e); log.info("获取Qisda库存出错:",e);
} }
......
...@@ -122,7 +122,6 @@ public class OutInfoCache { ...@@ -122,7 +122,6 @@ public class OutInfoCache {
} }
List<String> excludeSerialList = new ArrayList<>(); List<String> excludeSerialList = new ArrayList<>();
OutInfo outInfoToNotify = findExecuteOrderHSerial(cachedOutInfos, excludeSerialList); OutInfo outInfoToNotify = findExecuteOrderHSerial(cachedOutInfos, excludeSerialList);
if(outInfoToNotify != null){ if(outInfoToNotify != null){
...@@ -351,7 +350,7 @@ public class OutInfoCache { ...@@ -351,7 +350,7 @@ public class OutInfoCache {
/** /**
* 更新需求项 * 更新需求项
*/ */
public void updateOutItem(String outItemId){ public OutItem updateOutItem(String outItemId){
OutItem outItem = outItemDao.findOneById(outItemId); OutItem outItem = outItemDao.findOneById(outItemId);
if(outItem != null){ if(outItem != null){
String hSerial = outItem.gethSerial(); String hSerial = outItem.gethSerial();
...@@ -363,6 +362,7 @@ public class OutInfoCache { ...@@ -363,6 +362,7 @@ public class OutInfoCache {
updateSendStatus(outInfo.gethSerial()); updateSendStatus(outInfo.gethSerial());
} }
} }
return outItem;
} }
/** /**
...@@ -589,6 +589,10 @@ public class OutInfoCache { ...@@ -589,6 +589,10 @@ public class OutInfoCache {
outInfo.setOutReelNum(0); outInfo.setOutReelNum(0);
outInfo.setTaskFinishNum(0); outInfo.setTaskFinishNum(0);
outInfo.setTaskNum(outReelNum); outInfo.setTaskNum(outReelNum);
int bindNum = outInfo.getTotalBindNum();
if(bindNum < outReelNum){
outInfo.setTotalBindNum(outReelNum);
}
if(outReelNum != 0){ if(outReelNum != 0){
if(needAdd){ if(needAdd){
int totalTaskNum = outInfo.getTotalTaskNum() + outReelNum; int totalTaskNum = outInfo.getTotalTaskNum() + outReelNum;
...@@ -751,7 +755,7 @@ public class OutInfoCache { ...@@ -751,7 +755,7 @@ public class OutInfoCache {
} }
outInfoMap.put(outInfo.gethSerial(),outInfo); outInfoMap.put(outInfo.gethSerial(),outInfo);
if(outInfo.isSendEnd()){ if(outInfo.isSendEnd() && !outInfo.isTailAction()){
removeFromCache(outInfo.gethSerial()); removeFromCache(outInfo.gethSerial());
} }
} }
...@@ -843,7 +847,8 @@ public class OutInfoCache { ...@@ -843,7 +847,8 @@ public class OutInfoCache {
boolean hasUrgenReel = false; boolean hasUrgenReel = false;
for (DataLog dataLog : allTasks) { for (DataLog dataLog : allTasks) {
if(dataLog.isCheckOutTask()){ if(dataLog.isCheckOutTask()){
if(!dataLog.isUrgentReel() && !dataLog.isCutReel() && !dataLog.isLessSendReel()){ //if(!dataLog.isUrgentReel() && !dataLog.isCutReel() && !dataLog.isLessSendReel()){
if(dataLog.getAppendInfo().isTailAction() || dataLog.getAppendInfo().isFirstReelAction()){
//工单料(不是指定料也不是分盘料即首盘或补料) //工单料(不是指定料也不是分盘料即首盘或补料)
hasOrderTask = true; hasOrderTask = true;
}else{ }else{
...@@ -1078,7 +1083,8 @@ public class OutInfoCache { ...@@ -1078,7 +1083,8 @@ public class OutInfoCache {
log.info("产线可放料架数:"+shelfCountToLine+" 需求单["+outInfo.gethSerial()+"]分配小料架数:" + allDShelfs.size()); log.info("产线可放料架数:"+shelfCountToLine+" 需求单["+outInfo.gethSerial()+"]分配小料架数:" + allDShelfs.size());
if(shelfCountToLine > 0 && shelfCountToLine < allDShelfs.size()){ if(shelfCountToLine > 0 && shelfCountToLine < allDShelfs.size()){
//产线不可放下那么多料架,需要删减一车 //产线不可放下那么多料架,需要删减一车
tasks = removeTailDShelf(outInfo,allDShelfs,tasks); int dShelfToRemove = allDShelfs.size() - shelfCountToLine;
tasks = removeTailDShelf(outInfo,allDShelfs,tasks,dShelfToRemove);
}else{ }else{
tasks = fillTailDShelf(outInfo,allDShelfs, allreadyOutPosIdList,tasks); tasks = fillTailDShelf(outInfo,allDShelfs, allreadyOutPosIdList,tasks);
} }
...@@ -1092,17 +1098,30 @@ public class OutInfoCache { ...@@ -1092,17 +1098,30 @@ public class OutInfoCache {
/** /**
* 清除多出来的料架 * 清除多出来的料架
*/ */
private List<DataLog> removeTailDShelf(OutInfo outInfo, List<ShelfInfo> allDShelfs, List<DataLog> tasks){ private List<DataLog> removeTailDShelf(OutInfo outInfo, List<ShelfInfo> allDShelfs, List<DataLog> tasks, int removeDShelfCount){
ShelfInfo dShelfToRemove = null; List<ShelfInfo> dShelfToRemoveList = new ArrayList<>();
for (ShelfInfo dShelf : allDShelfs) { while(dShelfToRemoveList.size() < removeDShelfCount){
if(dShelfToRemove == null || dShelfToRemove.getRfidIndex()< dShelf.getRfidIndex()){ ShelfInfo dShelfToRemove = null;
dShelfToRemove = dShelf; for (ShelfInfo dShelf : allDShelfs) {
if(!dShelfToRemoveList.contains(dShelf)){
if(dShelfToRemove == null || dShelfToRemove.getRfidIndex()< dShelf.getRfidIndex()){
dShelfToRemove = dShelf;
}
}
}
if(dShelfToRemove != null){
dShelfToRemoveList.add(dShelfToRemove);
}else{
break;
} }
} }
if(dShelfToRemove != null){
boolean hasTaskCancel = false;
for(ShelfInfo dShelfToRemove : dShelfToRemoveList){
int needRemoveReelCount = dShelfToRemove.getUsedLocCount(); int needRemoveReelCount = dShelfToRemove.getUsedLocCount();
if(needRemoveReelCount > 0){ if(needRemoveReelCount > 0){
log.info("需求单["+outInfo.gethSerial()+"]的料架["+dShelfToRemove.tempRfid()+"]超出产线可容纳数量,开启删减最后一车逻辑,数量:" + needRemoveReelCount); log.info("需求单["+outInfo.gethSerial()+"]的料架["+dShelfToRemove.tempRfid()+"]超出产线可容纳数量,开启删减D料架逻辑,数量:" + needRemoveReelCount);
//站位料盘数统计 //站位料盘数统计
Map<Integer,Integer> slotReelCountMap = new HashMap<>(); Map<Integer,Integer> slotReelCountMap = new HashMap<>();
...@@ -1136,6 +1155,7 @@ public class OutInfoCache { ...@@ -1136,6 +1155,7 @@ public class OutInfoCache {
} }
} }
if(taskToRemove != null){ if(taskToRemove != null){
hasTaskCancel = true;
taskToRemove.setStatus(StorageConstants.OP_STATUS.CANCEL.name()); taskToRemove.setStatus(StorageConstants.OP_STATUS.CANCEL.name());
dataLogDao.save(taskToRemove); dataLogDao.save(taskToRemove);
tasks.remove(taskToRemove); tasks.remove(taskToRemove);
...@@ -1151,18 +1171,20 @@ public class OutInfoCache { ...@@ -1151,18 +1171,20 @@ public class OutInfoCache {
break; break;
} }
} }
if(outInfo.isEndOutInfo()){
String soseq = outInfo.getSoseq();
log.info("需求单["+outInfo.gethSerial()+"]是工单序号["+soseq+"]最后一个补料单,删减料架后更新补料单状态,同时更新Qisda补料单状态");
boolean endOutInfo = false;
outInfo.setEndOutInfo(endOutInfo);
outInfoDao.updateEndOutInfo(outInfo.gethSerial(),endOutInfo);
outInfoMap.put(outInfo.gethSerial(), outInfo);
QisdaApi.UpdateBatchRefillMark(soseq);
}
} }
} }
if(hasTaskCancel && outInfo.isEndOutInfo()){
String soseq = outInfo.getSoseq();
log.info("需求单["+outInfo.gethSerial()+"]是工单序号["+soseq+"]最后一个补料单,删减料架后更新补料单状态,同时更新Qisda补料单状态");
boolean endOutInfo = false;
outInfo.setEndOutInfo(endOutInfo);
outInfoDao.updateEndOutInfo(outInfo.gethSerial(),endOutInfo);
outInfoMap.put(outInfo.gethSerial(), outInfo);
QisdaApi.UpdateBatchRefillMark(soseq);
}
return tasks; return tasks;
} }
...@@ -1350,6 +1372,8 @@ public class OutInfoCache { ...@@ -1350,6 +1372,8 @@ public class OutInfoCache {
//出经发完料 //出经发完料
return tasks; return tasks;
} }
List<StoragePos> bindPosList = storagePosDao.findBindList(outItem.getSoseq(), outItem.getSlotlocation()); List<StoragePos> bindPosList = storagePosDao.findBindList(outItem.getSoseq(), outItem.getSlotlocation());
StoragePos maxQtyReelPos = null; StoragePos maxQtyReelPos = null;
OutItem totalOutInfo = soseqCache.getCutOutItem(outItem.getSoseq(), outItem.getSlotlocation()); OutItem totalOutInfo = soseqCache.getCutOutItem(outItem.getSoseq(), outItem.getSlotlocation());
......
...@@ -356,6 +356,75 @@ public class QisdaApiController extends BaseController { ...@@ -356,6 +356,75 @@ public class QisdaApiController extends BaseController {
} }
/** /**
* 替代料接口
*/
@RequestMapping(value = "/replaceSlot",method = RequestMethod.POST)
@ResponseBody
public Object replaceSlot(HttpServletRequest request) {
try {
String paramInfo = receiveParamInfo(request,"paramInfo");
log.info("收到替代料请求:"+paramInfo);
if(paramInfo == null){
return ResultBean.newErrorResult(-1,"参数为空");
}
List<RequestOutItemBean> items = JsonUtil.toList(paramInfo, RequestOutItemBean.class);
//key为需求单号
Map<String,OutInfo> cutOutInfoMap = new HashMap<>();
log.info("替代料解析成功,开始处理");
for (RequestOutItemBean itemBean : items) {
String soseq = itemBean.getSoseq();
int slotSeq = itemBean.getSlotlocation();
OutInfo cutOutInfo = soseqCache.getCutActionInfoFromCache(soseq);
if(cutOutInfo == null){
log.info("soseq="+soseq+"的分盘需求单不存在,不执行替代料逻辑");
}else{
OutItem outItem = cutOutInfo.findOutItem(slotSeq);
if(outItem != null){
List<StoragePos> bindPosList = storagePosDao.findBindList(outItem.getSoseq(), outItem.getSlotlocation());
for (StoragePos storagePos : bindPosList) {
Barcode barcode = storagePos.getBarcode();
log.info("解除["+barcode.getBarcode()+"]的工单so=["+barcode.getAppendInfo().getSo()+"]soseq=["+barcode.getAppendInfo().getSoseq()+"]绑定,累计解除");
storagePos = storagePosDao.unbindReel(storagePos);
// barcode = storagePos.getBarcode();
// barcode = qisdaBindService.bindPutInReel(barcode);
// String bindSoseq = barcode.getAppendInfo().getSoseq();
// if(!Strings.isNullOrEmpty(bindSoseq)){
// log.info("料盘["+barcode.getBarcode()+"]绑定到新工单soseq="+bindSoseq);
// storagePos.setBarcode(barcode);
// storagePosDao.save(storagePos);
// }
}
outItem.setPn(itemBean.getPartNum());
outItem.setFacility(itemBean.getFacility());
outItem.setQty(itemBean.getQty());
outItem.setReelcut(itemBean.getReelcut());
outItem.setLockQty(-1);
outItem.setRealLockQty(0);
outItem.setFixedQty(0);
outItem = outItemDao.save(outItem);
outItem = outInfoCache.updateOutItem(outItem.getId());
cutOutInfo.updateItem(outItem);
soseqCache.addTotalOutInfo(cutOutInfo);
cutOutInfoMap.put(cutOutInfo.gethSerial(), cutOutInfo);
}
}
}
for (OutInfo outInfo : cutOutInfoMap.values()) {
log.info("工单"+outInfo.getSo()+"["+outInfo.getSoseq()+"]替代料处理完成,进行真实绑定");
qisdaBindService.realBindOutInfo(outInfo);
}
return ResultBean.newOkResult("");
} catch (Exception e) {
log.error("替代料请求处理出错", e);
return ResultBean.newErrorResult(1001,"内部错误:" + e.getMessage());
}
}
/**
* 创建需求单 * 创建需求单
*/ */
@RequestMapping(value = "/out",method = RequestMethod.POST) @RequestMapping(value = "/out",method = RequestMethod.POST)
...@@ -534,17 +603,17 @@ public class QisdaApiController extends BaseController { ...@@ -534,17 +603,17 @@ public class QisdaApiController extends BaseController {
}else if(outInfo.isFirstReelAction()){ }else if(outInfo.isFirstReelAction()){
//首盘 //首盘
int bindNum = 0; int bindNum = 0;
OutInfo cutOutInfo = soseqCache.getCutActionInfoFromCache(outInfo.getSoseq()); // OutInfo cutOutInfo = soseqCache.getCutActionInfoFromCache(outInfo.getSoseq());
if(cutOutInfo != null){ // if(cutOutInfo != null){
for (OutItem outItem : cutOutInfo.getOutItems()) { // for (OutItem outItem : cutOutInfo.getOutItems()) {
if(outItem.getRealLockQty()>0){ // if(outItem.getRealLockQty()>0){
bindNum++; // bindNum++;
} // }
} // }
}else{ // }else{
//每一条有料的是一盘 //每一条有料的是一盘
bindNum = allItems.size(); bindNum = allItems.size();
} // }
return bindNum; return bindNum;
}else if(outInfo.isTailAction()){ }else if(outInfo.isTailAction()){
......
...@@ -110,16 +110,22 @@ public class QisdaCache { ...@@ -110,16 +110,22 @@ public class QisdaCache {
* 添加条码锁定库位信息 * 添加条码锁定库位信息
* @param reelLockPosInfo * @param reelLockPosInfo
*/ */
public static synchronized boolean addReelLockPosInfo(ReelLockPosInfo reelLockPosInfo){ public static synchronized ReelLockPosInfo addReelLockPosInfo(ReelLockPosInfo reelLockPosInfo){
log.info("为["+reelLockPosInfo.getBarcode()+"]锁定库位["+reelLockPosInfo.getLockPosName()+"]");
ReelLockPosInfo oldLocInfo = reelLocKPosMap.get(reelLockPosInfo.getBarcode());
if(oldLocInfo != null && oldLocInfo.getLockPosName() != null){
log.info("["+oldLocInfo.getBarcode()+"]已有锁定库位["+oldLocInfo.getLockPosName()+"],返回之前锁定的库位");
return oldLocInfo;
}
for (ReelLockPosInfo locInfo : reelLocKPosMap.values()) { for (ReelLockPosInfo locInfo : reelLocKPosMap.values()) {
if(locInfo.getLockPosId().equals(reelLockPosInfo.getLockPosId()) && !locInfo.getBarcode().equals(reelLockPosInfo.getBarcode())){ if(locInfo.getLockPosId().equals(reelLockPosInfo.getLockPosId()) && !locInfo.getBarcode().equals(reelLockPosInfo.getBarcode())){
log.info("为["+reelLockPosInfo.getBarcode()+"]锁定库位["+reelLockPosInfo.getLockPos()+"]时,库位已被["+locInfo.getBarcode()+"]锁定"); log.info("为["+reelLockPosInfo.getBarcode()+"]锁定库位["+reelLockPosInfo.getLockPosName()+"]时,库位已被["+locInfo.getBarcode()+"]锁定");
return false; return null;
} }
} }
reelLocKPosMap.put(reelLockPosInfo.getBarcode(), reelLockPosInfo); reelLocKPosMap.put(reelLockPosInfo.getBarcode(), reelLockPosInfo);
cacheInfoDao.updateCacheItem(REEL_LOCK_POS_MAP_KEY, reelLocKPosMap); cacheInfoDao.updateCacheItem(REEL_LOCK_POS_MAP_KEY, reelLocKPosMap);
return true; return reelLockPosInfo;
} }
/** /**
......
...@@ -185,6 +185,58 @@ public class QisdaDeviceController extends BaseController { ...@@ -185,6 +185,58 @@ public class QisdaDeviceController extends BaseController {
return false; return false;
} }
/**
* 3楼料盘到达机器人取料位置
*/
@RequestMapping(value = "/arrive3fRobotLocation")
@ResponseBody
public Object arrive3fRobotLocation(HttpServletRequest request){
String robotIndex = request.getParameter("robotIndex");
String codeStr = request.getParameter("barcode");
//更新位置任务,清空扫码任务
log.info("料盘["+codeStr+"]到达机器人["+robotIndex+"]取料位置,更新位置任务");
if(robotIndex != null){
try{
Barcode barcode = dataCache.resolveOneValideBarcode(codeStr);
DataLog task = taskService.getFinishedTask(barcode.getBarcode());
if(task == null){
String msg = "未找到待分配位置的条码["+barcode.getBarcode()+"]任务信息";
return ResultBean.newErrorResult(203, msg);
}else {
if (task.isFinished()) {
String msg = "条码[" + barcode.getBarcode() + "]的任务已完成";
return ResultBean.newErrorResult(204, msg);
} else if (task.isStopSendToQisda()) {
//被取消的出库任务,不可再放上料架
String msg = "条码[" + barcode.getBarcode() + "]的任务已被取消";
return ResultBean.newErrorResult(207, msg);
} else {
String hSerial = task.getAppendInfo().gethSerial();
String executingHSerial = QisdaCache.getCurrentOrderHSerial();
if (!executingHSerial.equals(hSerial)) {
String msg = "料盘[" + barcode.getBarcode() + "]任务的需求单号与当前正在执行的需求单号不一致";
return ResultBean.newErrorResult(206, msg);
}
}
}
if(robotIndex.equals("1")){
//1号位机器人
firstRobotTask = task;
log.info("将扫码任务["+firstRobotTask.getBarcode()+"]设置到机器人["+robotIndex+"]取料任务");
}else if(robotIndex.equals("2")){
secondRobotTask = task;
log.info("将扫码任务["+secondRobotTask.getBarcode()+"]设置到机器人["+robotIndex+"]取料任务");
}
}catch(Exception e){
log.error("料盘到达机器人出错:",e);
return ResultBean.newErrorResult(-1, "Error:" + e.getMessage());
}
}
return ResultBean.newOkResult("OK");
}
/** /**
* 相机扫码获取完尺寸后,料盘到达机器人取料位置 * 相机扫码获取完尺寸后,料盘到达机器人取料位置
*/ */
...@@ -552,6 +604,28 @@ public class QisdaDeviceController extends BaseController { ...@@ -552,6 +604,28 @@ public class QisdaDeviceController extends BaseController {
} }
/** /**
* 查找料架的TempRfid,用于流水线重启时决定当前料串是否可用
*/
@RequestMapping(value = "/findRealRfid")
@ResponseBody
public ResultBean findRealRfid(HttpServletRequest request) {
String tempRfid = request.getParameter("tempRfid");
if(tempRfid == null){
tempRfid = "";
}
String realRfid = "";
ShelfInfo shelfInfo = InquiryShelfBean.findShelfByTempRfid(tempRfid);
if(shelfInfo != null){
realRfid = shelfInfo.getRealRfid();
}
Map<String,Object> resultMap = new HashMap<>();
resultMap.put("tempRfid", tempRfid);
resultMap.put("realRfid", realRfid);
return ResultBean.newOkResult(resultMap);
}
/**
* 分盘料/紧急料放上料串或料架流出时调用 * 分盘料/紧急料放上料串或料架流出时调用
*/ */
@RequestMapping(value = "/clearRfid") @RequestMapping(value = "/clearRfid")
......
...@@ -597,6 +597,46 @@ public class StorageDataController extends BaseController { ...@@ -597,6 +597,46 @@ public class StorageDataController extends BaseController {
try { try {
Barcode barcode = dataCache.resolveOneValideBarcode(code); Barcode barcode = dataCache.resolveOneValideBarcode(code);
for (DataLog dataLog : taskService.getAllTasks()) {
if(!dataLog.isPackageReel()){
//已经在任务当中,返回对应的信息
if(dataLog.getBarcode().equals(barcode.getBarcode())){
if(dataLog.isPutInTask()){
//已有入库任务
errorMsg = "物料["+ dataLog.getBarcode() + "]已有入库任务,需继续执行入库动作";
resultMap.put("pos",dataLog.getPosName());
resultMap.put("barcode",barcode.getBarcode());
resultMap.put("cid",dataLog.getCid());
return resultMap;
}else{
//已有出库任务
errorMsg = "物料["+ dataLog.getBarcode() + "]已有出库任务,需继续执行出库动作";
resultMap.put("result","98");
resultMap.put("msg",errorMsg);
resultMap.put("posId",dataLog.getPosName());
resultMap.put("plateW",dataLog.getW());
resultMap.put("plateH",dataLog.getH());
resultMap.put("singleOut", dataLog.isSingleOut()+"");
//紧急料
resultMap.put("urgentReel",dataLog.isUrgentReel() + "");
//需要分盘,进入分盘料
resultMap.put("cutReel",dataLog.isCutReel() + "");
resultMap.put("rfid", dataLog.getTempRfid());
resultMap.put("realRfid",dataLog.getAppendInfo().getRfid());
resultMap.put("rfidLoc", dataLog.getAppendInfo().getRfidLoc() + "");
resultMap.put("barcode", dataLog.getBarcode());
boolean smallReel = dataLog.isSmallReel();
resultMap.put("smallReel", smallReel+"");
return resultMap;
}
}
}
}
StoragePos pos = taskService.findEmptyPosForPutIn(storageList,barcode, rfid); StoragePos pos = taskService.findEmptyPosForPutIn(storageList,barcode, rfid);
if(pos != null){ if(pos != null){
...@@ -641,26 +681,26 @@ public class StorageDataController extends BaseController { ...@@ -641,26 +681,26 @@ public class StorageDataController extends BaseController {
} }
} }
log.info(okMsg + oldLockInfo); //log.info(okMsg + oldLockInfo);
ReelLockPosInfo reelLocInfo = new ReelLockPosInfo(); ReelLockPosInfo reelLocInfo = new ReelLockPosInfo();
reelLocInfo.setBarcode(barcode.getBarcode()); reelLocInfo.setBarcode(barcode.getBarcode());
reelLocInfo.setCid(theStorage.getCid()); reelLocInfo.setCid(theStorage.getCid());
reelLocInfo.setLockPos(pos.getPosName()); reelLocInfo.setLockPosName(pos.getPosName());
reelLocInfo.setLockPosId(pos.getId()); reelLocInfo.setLockPosId(pos.getId());
reelLocInfo.setRfid(rfid); reelLocInfo.setRfid(rfid);
reelLocInfo.setRfidLoc(rfidLoc); reelLocInfo.setRfidLoc(rfidLoc);
boolean locResult = QisdaCache.addReelLockPosInfo(reelLocInfo); reelLocInfo = QisdaCache.addReelLockPosInfo(reelLocInfo);
if(!locResult){ if(reelLocInfo == null){
errorMsg = "库位已被锁定,暂停入库"; errorMsg = "库位已被锁定,暂停入库";
lineMsg = errorMsg; lineMsg = errorMsg;
resultMap.put("result","99"); resultMap.put("result","99");
resultMap.put("msg",errorMsg); resultMap.put("msg",errorMsg);
return resultMap; return resultMap;
}else{ }else{
resultMap.put("pos",pos.getPosName()); resultMap.put("pos",reelLocInfo.getLockPosName());
resultMap.put("barcode",barcode.getBarcode()); resultMap.put("barcode",reelLocInfo.getBarcode());
resultMap.put("cid",theStorage.getCid()); resultMap.put("cid",reelLocInfo.getCid());
} }
}else{ }else{
......
...@@ -449,6 +449,7 @@ public class TaskService implements ITaskService { ...@@ -449,6 +449,7 @@ public class TaskService implements ITaskService {
log.info("[" + inRFID + "]"+ barcodeSave.getBarcode() + " 上次入库DN单:" + oldDnNo + " 当前入库DN单:" + appendInfo.getDnNo()); log.info("[" + inRFID + "]"+ barcodeSave.getBarcode() + " 上次入库DN单:" + oldDnNo + " 当前入库DN单:" + appendInfo.getDnNo());
appendInfo.setRfid(inRFID);
barcodeSave.setAppendInfo(appendInfo); barcodeSave.setAppendInfo(appendInfo);
//3. CIS入库判定接口 (没绑过料串的条码调用此接口) //3. CIS入库判定接口 (没绑过料串的条码调用此接口)
...@@ -661,7 +662,7 @@ public class TaskService implements ITaskService { ...@@ -661,7 +662,7 @@ public class TaskService implements ITaskService {
AppendInfo appendInfo = task.getAppendInfo(); AppendInfo appendInfo = task.getAppendInfo();
boolean urgentReel = task.isUrgentReel(); boolean urgentReel = task.isUrgentReel();
if(task.isLessSendReel()){ if(task.isLessSendReel() || appendInfo.gethSerial().isEmpty()){
urgentReel = true; urgentReel = true;
} }
//紧急料 //紧急料
...@@ -761,6 +762,16 @@ public class TaskService implements ITaskService { ...@@ -761,6 +762,16 @@ public class TaskService implements ITaskService {
QisdaApi.VMIMateriaRecAss(task, barcodeObj, latest); QisdaApi.VMIMateriaRecAss(task, barcodeObj, latest);
} }
} }
}else{
//入库任务取消时,将库位置为不可用
log.info("库位["+task.getPosName()+"]料盘["+task.getBarcode()+"]入库任务取消,禁用库位");
try {
StoragePos pos = storagePosManager.get(task.getPosId());
pos.setEnabled(false);
storagePosManager.save(pos);
} catch (ValidateException e) {
log.error("入库任务取消时,禁用库位出错",e);
}
} }
return true; return true;
} }
......
...@@ -188,7 +188,7 @@ ...@@ -188,7 +188,7 @@
<%--<display:column titleKey="工单序号" sortProperty="barcode.appendInfo.soseq" sortable="true">--%> <%--<display:column titleKey="工单序号" sortProperty="barcode.appendInfo.soseq" sortable="true">--%>
<%--${pos.barcode.appendInfo.soseq}--%> <%--${pos.barcode.appendInfo.soseq}--%>
<%--</display:column>--%> <%--</display:column>--%>
<display:column titleKey="工单" sortProperty="barcode.appendInfo.so" sortable="true"> <display:column titleKey="工单" sortProperty="barcode.appendInfo.so" sortable="true" media="html">
<div id="bindInfo${pos.id}"> <div id="bindInfo${pos.id}">
<c:if test="${pos.barcode.appendInfo.bindToSo}"> <c:if test="${pos.barcode.appendInfo.bindToSo}">
${pos.barcode.appendInfo.so} ${pos.barcode.appendInfo.so}
...@@ -197,6 +197,11 @@ ...@@ -197,6 +197,11 @@
</c:if> </c:if>
</div> </div>
</display:column> </display:column>
<display:column titleKey="工单" sortProperty="barcode.appendInfo.so" sortable="true" media="csv">
<c:if test="${pos.barcode.appendInfo.bindToSo}">
${pos.barcode.appendInfo.so}
</c:if>
</display:column>
<display:column titleKey="Slot" sortProperty="barcode.appendInfo.slotIndex" sortable="true"> <display:column titleKey="Slot" sortProperty="barcode.appendInfo.slotIndex" sortable="true">
${pos.barcode.appendInfo.bindSlot} ${pos.barcode.appendInfo.bindSlot}
</display:column> </display:column>
......
...@@ -12,6 +12,147 @@ ...@@ -12,6 +12,147 @@
<div class="row"> <div class="row">
<div class="col-md-12"> <div class="col-md-12">
<ul class="timeline"> <ul class="timeline">
<li class="timeline-blue">
<div class="timeline-time">
<span class="date">2021 </span>
<span class="time">01-22 </span>
</div>
<div class="timeline-icon">
<i class="fa fa-clock-o"></i>
</div>
<div class="timeline-body">
<h2>版本: V2021012218</h2>
<div class="timeline-content">
<ul>
<li>包装仓AGV逻辑优化:入库后有出库任务,直接使用入库料架</li>
</ul>
</div>
</div>
</li>
<li class="timeline-yellow">
<div class="timeline-time">
<span class="date">2021 </span>
<span class="time">01-21 </span>
</div>
<div class="timeline-icon">
<i class="fa fa-clock-o"></i>
</div>
<div class="timeline-body">
<h2>版本: V2021012114</h2>
<div class="timeline-content">
<ul>
<li>优化任务取消逻辑</li>
</ul>
</div>
</div>
</li>
<li class="timeline-grey">
<div class="timeline-time">
<span class="date">2021</span>
<span class="time">01-15</span>
</div>
<div class="timeline-icon">
<i class="fa fa-clock-o"></i>
</div>
<div class="timeline-body">
<h2>版本: V2021011516</h2>
<div class="timeline-content">
<ul>
<li>修正在环形线两头入库等待时间过长的问题</li>
<li>DN单入库时,记录料串编号</li>
</ul>
</div>
</div>
</li>
<li class="timeline-purple">
<div class="timeline-time">
<span class="date">2021</span>
<span class="time">01-13</span>
</div>
<div class="timeline-icon">
<i class="fa fa-clock-o"></i>
</div>
<div class="timeline-body">
<h2>版本: V2021011310</h2>
<div class="timeline-content">
<ul>
<li>大工单删减料架从最后一个改为根据产线可放料架进行删减</li>
<li>3F库存比对功能修改</li>
</ul>
</div>
</div>
</li>
<li class="timeline-green">
<div class="timeline-time">
<span class="date">2021</span>
<span class="time">01-06</span>
</div>
<div class="timeline-icon">
<i class="fa fa-clock-o"></i>
</div>
<div class="timeline-body">
<h2>版本: V2021010618</h2>
<div class="timeline-content">
<ul>
<li>修正需求数量</li>
</ul>
</div>
</div>
</li>
<li class="timeline-blue">
<div class="timeline-time">
<span class="date">2021 </span>
<span class="time">01-5 </span>
</div>
<div class="timeline-icon">
<i class="fa fa-clock-o"></i>
</div>
<div class="timeline-body">
<h2>版本: V2021010511</h2>
<div class="timeline-content">
<ul>
<li>替代料逻辑修改</li>
<li>替代料接口提供</li>
<li>3F到达接驳台接口提供</li>
<li>流水线入库时,如果已有出库任务,返回任务的相关信息</li>
</ul>
</div>
</div>
</li>
<li class="timeline-yellow">
<div class="timeline-time">
<span class="date">2020 </span>
<span class="time">12-27 </span>
</div>
<div class="timeline-icon">
<i class="fa fa-clock-o"></i>
</div>
<div class="timeline-body">
<h2>版本: V2020122718</h2>
<div class="timeline-content">
<ul>
<li>Fixed: 最后一个补料单出完未解绑工单</li>
</ul>
</div>
</div>
</li>
<li class="timeline-grey">
<div class="timeline-time">
<span class="date">2020 </span>
<span class="time">12-25 </span>
</div>
<div class="timeline-icon">
<i class="fa fa-clock-o"></i>
</div>
<div class="timeline-body">
<h2>版本: V2020122518</h2>
<div class="timeline-content">
<ul>
<li>异常消息展示类型修改</li>
</ul>
</div>
</div>
</li>
<li class="timeline-purple"> <li class="timeline-purple">
<div class="timeline-time"> <div class="timeline-time">
<span class="date">2020 </span> <span class="date">2020 </span>
......
...@@ -239,7 +239,7 @@ ...@@ -239,7 +239,7 @@
<div class="page-footer-inner"> <div class="page-footer-inner">
2016&copy; <a href="${ctx}/updateHistory.html">SMD BOX</a> 2016&copy; <a href="${ctx}/updateHistory.html">SMD BOX</a>
</div> </div>
<span class="right" style="color: #a3a3a3;">Version: 2020.12.24</span> <span class="right" style="color: #a3a3a3;">Version: 2021.01.15</span>
<div class="scroll-to-top"> <div class="scroll-to-top">
<i class="icon-arrow-up"></i> <i class="icon-arrow-up"></i>
</div> </div>
......
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!