Commit 269a0b0d sunke

出库到料架逻辑优化

1 个父辈 1a7cd308
......@@ -210,26 +210,26 @@ public class AppendInfo {
/**
* 是否可放入A料架 A 带包装料料架 可放9个包装料
*/
public boolean putAShelf(){
public boolean isAShelfTask(){
return StorageConstants.SHEFL_TYPE.A.equals(shelfType);
}
/**
* 是否可放入B 料串 分盘料,紧急料,指定料,单独出库, 可放20-30个大小料,由客户端决定是否放满
*/
public boolean putBShelf(){
public boolean isBShelfTask(){
return StorageConstants.SHEFL_TYPE.B.equals(shelfType);
}
/**
* 是否可放入C 大(11,13,15寸)料盘料架, 可放12个大料,共2列,每列6个
*/
public boolean putCShelf(){
public boolean isCShelfTask(){
return StorageConstants.SHEFL_TYPE.C.equals(shelfType);
}
/**
* 是否可放入D 小(7寸)料盘料架,可放92个小料,共4列,每列23个
*/
public boolean putDShelf(){
public boolean isDShelfTask(){
return StorageConstants.SHEFL_TYPE.D.equals(shelfType);
}
......@@ -337,14 +337,6 @@ public class AppendInfo {
this.cisIn = cisIn;
}
public boolean isCShelfTask(){
return StorageConstants.SHEFL_TYPE.isCShelf(getShelfType());
}
public boolean isDShelfTask(){
return StorageConstants.SHEFL_TYPE.isDShelf(getShelfType());
}
@Override
public String toString() {
return "AppendInfo{" +
......
......@@ -6,9 +6,7 @@ import com.myproject.util.StorageConstants;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import java.util.*;
import java.util.concurrent.ConcurrentHashMap;
/**
......@@ -35,6 +33,115 @@ public class InquiryShelfBean {
}
}
private static List<ShelfInfo> getSortedCAndDShelfList(DataLog task){
AppendInfo taskAppendInfo = task.getAppendInfo();
String hSerial = taskAppendInfo.gethSerial();
Map<String, ShelfInfo> shelfMap = hSerialShelfMap.get(hSerial);
//C和D料架列表
List<ShelfInfo> cAndDShelfList = new ArrayList<>();
for (ShelfInfo shelfInfo : shelfMap.values()) {
if(shelfInfo.isDShelf() || shelfInfo.isCShelf()) {
cAndDShelfList.add(shelfInfo);
}
}
//排序1D=>3D=>6D=>2C=>4C=5C
cAndDShelfList.sort(new Comparator<ShelfInfo>() {
public int compare(ShelfInfo shelf1, ShelfInfo shelf2) {
if(shelf1.getShelfType().equals(shelf2.getShelfType())){
return shelf1.getRfidIndex() - shelf2.getRfidIndex();
}else{
return shelf2.getShelfType().compareTo(shelf1.getShelfType());
}
}
});
return cAndDShelfList;
}
public static boolean canCheckOutTailActionTask(DataLog task, int unFinishedBigTaskCount){
AppendInfo taskAppendInfo = task.getAppendInfo();
if(taskAppendInfo.isTailAction()){
if(task.isSmallReel()){
return true;
}else{
//大料任务,只有当小料架只剩下一个未满时才可以出
List<ShelfInfo> cAndDShelfList = getSortedCAndDShelfList(task);
for (int i = 0; i < cAndDShelfList.size(); i++) {
ShelfInfo shelfInfo = cAndDShelfList.get(i);
if(!shelfInfo.isFull()){
if(shelfInfo.isCShelf()){
//小料架已经放满,大料可以随便出
return true;
}else if(shelfInfo.isDShelf()){
//小料架还未放满
if(i+1<cAndDShelfList.size()){
ShelfInfo nextShelf = cAndDShelfList.get(i + 1);
if(nextShelf.isDShelf()){
//下一个料架如果是小料架,不允许出
log.info("还有两个小料架["+shelfInfo.tempRfid()+"," + nextShelf.tempRfid()+"]未放满,大料任务["+task.getBarcode()+"]暂停出库");
return false;
}else{
//下一个料架是大料架,最多只能出一个料架的大料
int emptyLocCount = nextShelf.getEmptyLocCount();
boolean canOut = unFinishedBigTaskCount + 1 <= emptyLocCount;
if(!canOut){
log.info("未完成的大料数量["+unFinishedBigTaskCount+"]已可放满下一料架"+nextShelf.tempRfid()+"["+emptyLocCount+"],大料任务["+task.getBarcode()+"]暂停出库");
}
}
}
}
break;
}
}
}
}
return false;
}
/**
* 判断首盘任务是否可以出库
*/
public static boolean canCheckOutFistActionTask(DataLog task){
//保证双层线上最多只能有两个料架
List<ShelfInfo> cAndDShelfList = getSortedCAndDShelfList(task);
AppendInfo taskAppendInfo = task.getAppendInfo();
if(taskAppendInfo.isFirstReelAction()){
//如果任务是在最小(有空位)和次小的料架当中,可以出库
ShelfInfo firstEmptyShelf = null;
ShelfInfo secondEmptyShelf = null;
for (int i = 0; i < cAndDShelfList.size(); i++) {
ShelfInfo shelfInfo = cAndDShelfList.get(i);
if(!shelfInfo.isFull()){
firstEmptyShelf = shelfInfo;
if(i+1<cAndDShelfList.size()){
secondEmptyShelf = cAndDShelfList.get(i + 1);
}
break;
}
}
String shelfNameStr = "";
if(firstEmptyShelf != null){
if(firstEmptyShelf.tempRfid().equals(taskAppendInfo.getTempRfid())){
//与最小的料架号相同,可以出库
return true;
};
shelfNameStr = firstEmptyShelf.tempRfid();
}
if(secondEmptyShelf != null){
if(secondEmptyShelf.tempRfid().equals(taskAppendInfo.getTempRfid())){
//与最次小的料架号相同,可以出库
return true;
};
shelfNameStr = shelfNameStr + "," + secondEmptyShelf.tempRfid();
}
log.info("任务"+task.getBarcode()+"["+taskAppendInfo.getTempRfid()+"]不在两个料架当中,暂不出库");
}
return false;
}
/**
* 添加限制库位(即库位中只能放入某个条码)
* @param task
......@@ -350,7 +457,7 @@ public class InquiryShelfBean {
//未找到已经有实际RFID的料架,查找库位最多的料架
if(shelfInfo == null){
log.info(task.getBarcode() + "未找到实际绑定的["+rfid+"]料架,开始查找序号最小且未绑定过的同种料架["+task.getAppendInfo().getShelfType()+"]");
log.info(task.getBarcode() + "未找到实际绑定的["+rfid+"]料架,开始查找序号最小的同种料架["+task.getAppendInfo().getShelfType()+"]");
ShelfInfo minIndexShelf = null;
for (ShelfInfo shelf : shelfMap.values()) {
if(StorageConstants.SHEFL_TYPE.judgeType(task.getAppendInfo().getShelfType(), shelf.getShelfType())){
......@@ -441,4 +548,5 @@ public class InquiryShelfBean {
return false;
}
}
......@@ -75,6 +75,16 @@ public class ShelfInfo {
return locMap;
}
public int getEmptyLocCount(){
int emptyLocCount = 0;
for (ShelfLoc loc : locMap.values()) {
if(loc.isEmpty()){
emptyLocCount = emptyLocCount + 1;
}
}
return emptyLocCount;
}
/**
* 库位数
*/
......@@ -125,6 +135,30 @@ public class ShelfInfo {
}
/**
* 不为空,且也未满,即放过料,但未满
*/
public boolean isNotEmptyNotFull(){
boolean hasReel = false;
boolean hasEmpty = false;
for (ShelfLoc loc : locMap.values()) {
if(loc.isEmpty()){
//有空位
hasEmpty = true;
}else{
//有料
hasReel = true;
}
}
if(hasEmpty && hasReel){
//有空位也有料
return true;
}
return false;
}
/**
* 将料盘放入库位
* @param loc
* @param barcode
......@@ -152,7 +186,7 @@ public class ShelfInfo {
}
if(lockLocation == -1){
log.error("未找到["+barcode+"]锁定的位置信息");
log.error("["+tempRfid()+"]未找到["+barcode+"]锁定的位置信息");
return false;
}
......@@ -166,20 +200,29 @@ public class ShelfInfo {
log.error("未找到["+loc+"]的位置信息,当前料架位置信息:"+ locMap);
return false;
}
boolean putInResult = shelfLoc.putIn(barcode);
locMap.put(loc, shelfLoc);
if(shelfLoc.isEmpty()){
boolean putInResult = shelfLoc.putIn(barcode);
locMap.put(loc, shelfLoc);
return putInResult;
return putInResult;
}else{
log.error("料盘["+barcode+"]放入位置"+rfid+"["+loc+"]失败,此位置料盘已放入");
return false;
}
}
public boolean putInLimitLoc(String rfid, int rfidLoc, String barcode){
if(rfid.contains(shelfType)){//不是同一种料架的忽略
ShelfLoc shelfLoc = locMap.get(rfidLoc);
if(shelfLoc.isInThisLoc(barcode)){
shelfLoc.putIn(barcode);
locMap.put(rfidLoc, shelfLoc);
this.setRealRfid(rfid);
return true;
if(shelfLoc.isEmpty()){
shelfLoc.putIn(barcode);
locMap.put(rfidLoc, shelfLoc);
this.setRealRfid(rfid);
return true;
}else {
log.error("料盘["+barcode+"]放入"+rfid+"["+rfidLoc+"]失败,此位置料盘已放入");
}
}
}
......@@ -234,59 +277,59 @@ public class ShelfInfo {
int usedCount = getUsedLocCount();
//1号机器人从大到小, 2号机器人从小到大,且71,72,73位不分配给2号机器人
if(robotIndex.equals("1")){
for(int i=usedCount; i> 0; i--){
//大料12号位不分配给1号机器人
if(StorageConstants.SHEFL_TYPE.isCShelf(shelfType)){
if(i == 12){
continue;
}
//1号机器人优先放70,71,72三个位置
ShelfLoc shelfLoc = lockLocation(72,barcode,reelType);
if(shelfLoc == null){
shelfLoc = lockLocation(71,barcode,reelType);
if(shelfLoc == null){
shelfLoc = lockLocation(70,barcode,reelType);
}
ShelfLoc shelfLoc = locMap.get(i);
// if(shelfLoc == null){
// shelfLoc = new ShelfLoc();
// shelfLoc.setLoc(i);
// }
if(shelfLoc != null && shelfLoc.isEmpty() && !shelfLoc.isLock()){
log.info(robotIndex+"号机器人为[" + barcode + "]锁定架位"+tempRfid() + "["+i+"]");
//未放过料,且未锁定
shelfLoc.setBarcode(barcode);
shelfLoc.setReelType(reelType);
locMap.put(i, shelfLoc);
return shelfLoc;
}
if(shelfLoc == null){
for(int i=usedCount; i> 0; i--){
//大料12号位不分配给1号机器人
if(StorageConstants.SHEFL_TYPE.isCShelf(shelfType)){
if(i == 12){
continue;
}
}
shelfLoc = lockLocation(i,barcode,reelType);
if(shelfLoc != null){
return shelfLoc;
}
}
}
return shelfLoc;
}else if(robotIndex.equals("2")){
for(int i=1; i<= usedCount; i++){
//小料70,71,72位不分配给2号机器人
if(StorageConstants.SHEFL_TYPE.isDShelf(shelfType)){
if(i==70 || i == 71 || i==72){
continue;
ShelfLoc shelfLoc = null;
if(StorageConstants.SHEFL_TYPE.isCShelf(shelfType)){
//大料12号位分给2号机器人
shelfLoc = lockLocation(12,barcode,reelType);
}
if(shelfLoc == null){
for(int i=1; i<= usedCount; i++){
//小料70,71,72位不分配给2号机器人
if(StorageConstants.SHEFL_TYPE.isDShelf(shelfType)){
if(i==70 || i == 71 || i==72){
continue;
}
}
shelfLoc = lockLocation(i,barcode,reelType);
if(shelfLoc != null){
return shelfLoc;
}
}
ShelfLoc shelfLoc = locMap.get(i);
// if(shelfLoc == null){
// shelfLoc = new ShelfLoc();
// shelfLoc.setLoc(i);
// }
if(shelfLoc != null && shelfLoc.isEmpty() && !shelfLoc.isLock()){
log.info(robotIndex+ "号机器人为[" + barcode + "]锁定架位"+tempRfid() + "["+i+"]");
//未放过料,且未锁定
shelfLoc.setBarcode(barcode);
shelfLoc.setReelType(reelType);
locMap.put(i, shelfLoc);
return shelfLoc;
}
}
return shelfLoc;
}else {
//包装料
for(int i=1; i<= usedCount; i++){
ShelfLoc shelfLoc = locMap.get(i);
if(shelfLoc != null && shelfLoc.isEmpty() && !shelfLoc.isLock()){
log.info("为[" + barcode + "]锁定架位"+tempRfid() + "["+i+"]");
//未放过料,且未锁定
shelfLoc.setBarcode(barcode);
shelfLoc.setReelType(reelType);
locMap.put(i, shelfLoc);
ShelfLoc shelfLoc = lockLocation(i,barcode,reelType);
if(shelfLoc != null){
return shelfLoc;
}
}
......@@ -297,6 +340,22 @@ public class ShelfInfo {
}
/**
* 锁定库位,如果成功返回库位,如果失败返回null
*/
private ShelfLoc lockLocation(int loc,String barcode, int reelType){
ShelfLoc shelfLoc = locMap.get(loc);
if(shelfLoc != null && shelfLoc.isEmpty() && !shelfLoc.isLock()){
log.info("为[" + barcode + "]锁定架位"+tempRfid() + "["+loc+"]");
//未放过料,且未锁定
shelfLoc.setBarcode(barcode);
shelfLoc.setReelType(reelType);
locMap.put(loc, shelfLoc);
return shelfLoc;
}
return null;
}
/**
* 添加缺料空位
*/
public int addEmptyLoc(){
......@@ -359,18 +418,18 @@ public class ShelfInfo {
return shelfType;
}
public boolean isCShelf(){
return StorageConstants.SHEFL_TYPE.isCShelf(getShelfType());
}
public boolean isDShelf(){
return StorageConstants.SHEFL_TYPE.isDShelf(getShelfType());
}
public void setShelfType(String shelfType) {
this.shelfType = shelfType;
}
// public String getTargetPoint() {
// return targetPoint;
// }
//
// public void setTargetPoint(String targetPoint) {
// this.targetPoint = targetPoint;
// }
public String tempRfid(){
return gethSerial() + "-" + rfidIndex + shelfType;
}
......
......@@ -49,12 +49,7 @@ public class ComponentManagerImpl implements IComponentManager {
@Override
public PageList findByQuery(Query query, PageList pageList)
{
log.debug("Search components with Query " + query.toString());
pageList.setList(componentDao.findByQuery(query, pageList.getPageNumber(), pageList.getObjectsPerPage()));
pageList.setFullListSize(componentDao.countByQuery(query));
log.debug("Search returns " + pageList.getFullListSize() + " components");
return pageList;
return componentDao.findByQuery(query, pageList);
}
@Override
......
......@@ -103,8 +103,15 @@ public class StoragePosManagerImpl implements IStoragePosManager {
if(compatibleType == StorageConstants.COMPATIBLE_TYPE.EXACT_MATCH){//完全匹配
c = c.and("w").is(barcode.getPlateSize()).and("h").is(barcode.getHeight());
}else if(compatibleType == StorageConstants.COMPATIBLE_TYPE.FULLY_COMPATIBLE){//完全兼容
c = c.and("w").gte(barcode.getPlateSize()).and("h").gte(barcode.getHeight());//宽度大于等于料盘宽度,高度大于等于料盘高度
}else if(compatibleType == StorageConstants.COMPATIBLE_TYPE.FULLY_COMPATIBLE){//同厚度兼容
//c = c.and("w").gte(barcode.getPlateSize()).and("h").gte(barcode.getHeight());//宽度大于等于料盘宽度,高度大于等于料盘高度
if(barcode.getPlateSize() != 7){
c = c.and("w").gte(barcode.getPlateSize()).and("h").is(barcode.getHeight());//宽度不同(除7寸),高度相同,向上兼容
}else{
//=7寸使用完全匹配
c = c.and("w").is(barcode.getPlateSize()).and("h").is(barcode.getHeight());
}
}else if(compatibleType == StorageConstants.COMPATIBLE_TYPE.SIZE_COMPATIBLE){//同尺寸兼容
c = c.and("w").is(barcode.getPlateSize()).and("h").gte(barcode.getHeight());//宽度等于料盘宽度,高度大于等于料盘高度
}
......
......@@ -526,7 +526,7 @@ public class StorageConstants {
/**
* 完全兼容
*/
FULLY_COMPATIBLE("storage.match.fullyCompatible"),
FULLY_COMPATIBLE("11,13,15同厚度兼容"),
/**
* 同尺寸兼容
*/
......
......@@ -8,6 +8,7 @@ import com.myproject.util.StorageConstants;
import com.myproject.webapp.controller.FileUpload;
import com.myproject.webapp.controller.storage.BaseSearchController;
import org.displaytag.properties.SortOrderEnum;
import org.displaytag.tags.TableTagParameters;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.mongodb.core.query.Criteria;
import org.springframework.data.mongodb.core.query.Query;
......@@ -16,6 +17,7 @@ import org.springframework.util.StringUtils;
import org.springframework.web.bind.annotation.ModelAttribute;
import org.springframework.web.bind.annotation.RequestMapping;
import javax.servlet.http.HttpServletRequest;
import java.util.regex.Pattern;
/**
......@@ -30,7 +32,7 @@ public class BarcodeSearchController extends BaseSearchController {
protected IBarcodeManager barcodeManager;
@RequestMapping("/barcodeSearch*")
public String onSubmit(@ModelAttribute("searchCriteria") BarcodeSearchCriteria searchCriteria, @ModelAttribute("fileUpload")FileUpload fileUpload) {
public String onSubmit(@ModelAttribute("searchCriteria") BarcodeSearchCriteria searchCriteria, @ModelAttribute("fileUpload")FileUpload fileUpload, HttpServletRequest request) {
fileUpload.setType(StorageConstants.BARCODE_TYPE);
Query query = new Query();
//List searchResult
......@@ -42,6 +44,13 @@ public class BarcodeSearchController extends BaseSearchController {
pageList.setSortCriterion("updateDate");
pageList.setSortDirection(SortOrderEnum.DESCENDING);
}
//导出
if (request.getParameter(TableTagParameters.PARAMETER_EXPORTING) != null){
pageList.setPageNumber(-1);
}
searchCriteria.setPageList(barcodeManager.findByQuery(query, pageList));
return SUCCESS_VIEW;
......
......@@ -7,6 +7,8 @@ import com.myproject.bean.search.PageList;
import com.myproject.manager.IComponentManager;
import com.myproject.util.StorageConstants;
import com.myproject.webapp.controller.FileUpload;
import org.displaytag.properties.SortOrderEnum;
import org.displaytag.tags.TableTagParameters;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.domain.Sort;
import org.springframework.data.mongodb.core.query.Criteria;
......@@ -89,8 +91,21 @@ public class ComponentSearchController extends BaseSearchController {
request.setAttribute("type", componentType);
}
query.with(new Sort(Sort.Direction.DESC, "updateDate"));
searchCriteria.setPageList(componentmanager.findByQuery(query, searchCriteria.getPageList()));
PageList pageList = searchCriteria.getPageList();
if("id".equals(pageList.getSortCriterion())){
pageList.setSortCriterion("updateDate");
pageList.setSortDirection(SortOrderEnum.DESCENDING);
}
//导出
if (request.getParameter(TableTagParameters.PARAMETER_EXPORTING) != null){
pageList.setPageNumber(-1);
}
pageList = componentmanager.findByQuery(query, pageList);
searchCriteria.setPageList(pageList);
//model.addAttribute("searchResult", searchCriteria.getPageList());
// return new ModelAndView(getSuccessView(), model.asMap());
......
......@@ -550,25 +550,6 @@ public class DataCache{
return null;
}
/**
* 更新料仓信息
*/
// public Storage updateStorage(String cid) throws ValidateException {
// Storage storage = getStorage(cid);
// return updateStorage(storage);
// }
//
// /**
// * 更新料仓信息
// */
// public Storage updateStorage(Storage storage) throws ValidateException {
// storage.setTotalSlots(storagePosManager.countTotalStorageSize(storage.getId()));
// storage.setEmptySlots(storagePosManager.countEmptyStorageSize(storage.getId()));
// storageManager.save(storage);
// getAllStorage().put(storage.getCid(), storage);
// return storage;
// }
public Storage reloadStorage(Storage storage){
List<PlateSizeBean> plateSizeBeanList = storagePosManager.getStoragePosUsage(storage.getId());
storage.initUsage(plateSizeBeanList);
......
......@@ -123,7 +123,12 @@ public class QisdaApiController extends BaseController {
@ResponseBody
public String executeOut(HttpServletRequest request){
String hSerial = request.getParameter("hSerial");
return checkOutOutItems(hSerial);
String maxReelStr = request.getParameter("max");
int maxReelNum = -1;
if(maxReelStr != null){
maxReelNum = Integer.valueOf(maxReelStr);
}
return checkOutOutItems(hSerial,maxReelNum);
}
/**
......@@ -1102,7 +1107,7 @@ public class QisdaApiController extends BaseController {
Component c = componentManager.findByPartNumber(outItem.getPn());
if(c != null){
String shelfType = StorageConstants.SHEFL_TYPE.D;
if(c.getPlateSize() > 7 || c.getHeight() > 8){
if(c.getPlateSize() > 7 || c.getHeight() > 12){
shelfType = StorageConstants.SHEFL_TYPE.C;
}
log.info(outItem.getSlotlocation() + "["+outItem.getPn()+"]缺料,保留"+shelfType+"类型架位");
......@@ -1115,7 +1120,7 @@ public class QisdaApiController extends BaseController {
return tasks;
}
private String checkOutOutItems(String hSerial){
private String checkOutOutItems(String hSerial, int maxReelNum){
log.info("执行需求单["+hSerial+"]出库");
OutInfo outInfo = outInfoDao.findByHSerial(hSerial);
if(outInfo == null){
......@@ -1157,6 +1162,7 @@ public class QisdaApiController extends BaseController {
List<DataLog> tasks = new ArrayList<>();
List<OutItem> itemList = outItemDao.findByHSerial(hSerial);
int taskCount = 0;
for (OutItem outItem : itemList) {
outItem = updateRealLockQty(outItem);
List<DataLog> itemTasks = null;
......@@ -1176,6 +1182,12 @@ public class QisdaApiController extends BaseController {
tasks.addAll(itemTasks);
}
outInfoCache.updateOutItem(outItem.getId());
if(maxReelNum != -1){
if(tasks.size() >= maxReelNum){
log.info("限制料盘数为:"+maxReelNum);
break;
}
}
}
......
......@@ -136,6 +136,10 @@ public class QisdaDeviceController extends BaseController {
log.error(msg);
return ResultBean.newErrorResult(103, msg);
}else if(task.isFinished()){
String msg = "条码["+barcode.getBarcode()+"]的任务已完成,不返回尺寸信息";
log.error(msg);
return ResultBean.newErrorResult(104, msg);
}
updateScanTask(robotIndex, task);
......@@ -172,21 +176,28 @@ public class QisdaDeviceController extends BaseController {
@ResponseBody
public Object arriveRobot(HttpServletRequest request){
String robotIndex = request.getParameter("robotIndex");
String barcode = request.getParameter("barcode");
//更新位置任务,清空扫码任务
log.info("料盘到达机器人["+robotIndex+"]取料位置,更新位置任务,清空扫码任务");
log.info("料盘["+barcode+"]到达机器人["+robotIndex+"]取料位置,更新位置任务,清空扫码任务");
if(robotIndex != null){
if(robotIndex.equals("1")){
//1号位机器人
firstRobotTask = firstScanTask;
log.info("将扫码任务["+firstRobotTask.getBarcode()+"]设置到机器人["+robotIndex+"]取料任务");
}else if(robotIndex.equals("2")){
secondRobotTask = secondScanTask;
log.info("将扫码任务["+secondRobotTask.getBarcode()+"]设置到机器人["+robotIndex+"]取料任务");
try{
if(robotIndex.equals("1")){
//1号位机器人
firstRobotTask = firstScanTask;
log.info("将扫码任务["+firstRobotTask.getBarcode()+"]设置到机器人["+robotIndex+"]取料任务");
}else if(robotIndex.equals("2")){
secondRobotTask = secondScanTask;
log.info("将扫码任务["+secondRobotTask.getBarcode()+"]设置到机器人["+robotIndex+"]取料任务");
}
updateScanTask(robotIndex, null);
}catch(Exception e){
log.error("料盘到达机器人出错:",e);
return "Error:" + e.getMessage();
}
updateScanTask(robotIndex, null);
}
return "";
return "OK";
}
/**
......@@ -401,7 +412,7 @@ public class QisdaDeviceController extends BaseController {
resultMap.put("rfid", shelfLoc.getTempRfid());
resultMap.put("rfidLoc", shelfLoc.getLoc() + "");
log.info("机器人["+robotIndex+"]位置信息返回:[realRfid="+shelfLoc.getRealRfid()+",rfid=" + shelfLoc.getTempRfid() + "["+shelfLoc.getLoc()+"] barcode=["+task.getBarcode()+"]尺寸"+task.getW()+"x"+task.getH());
log.info("机器人["+robotIndex+"]位置信息返回:[realRfid="+shelfLoc.getRealRfid()+",rfid=[" + shelfLoc.getTempRfid() + "]["+shelfLoc.getLoc()+"] barcode=["+task.getBarcode()+"]尺寸"+task.getW()+"x"+task.getH());
return ResultBean.newOkResult(resultMap);
}catch(Exception e){
......@@ -479,7 +490,7 @@ public class QisdaDeviceController extends BaseController {
boolean isCutTask = cacheTask.isUrgentReel() || cacheTask.isCutReel();
if(!isCutTask && !putResult){
//记录日志
String errorMsg = "料盘["+cacheTask.getBarcode()+"]放入位置"+rfid+"["+rfidLoc+"],原分配位置"+appendInfo.getTempRfid()+"["+appendInfo.getRfidLoc()+"],不更改状态,不进行发料";
String errorMsg = "料盘["+cacheTask.getBarcode()+"]放入位置"+rfid+"["+rfidLoc+"]失败,原分配位置"+appendInfo.getTempRfid()+"["+appendInfo.getRfidLoc()+"],不更改状态,不进行发料";
log.error(errorMsg);
AlarmInfo alarmInfo = new AlarmInfo();
alarmInfo.setBoxId("0");
......
......@@ -667,29 +667,6 @@ public class StorageDataController extends BaseController {
String cid = request.getParameter("cid");
return dataCache.getStorage(cid);
}
//
// @RequestMapping("/listStorageUseage")
// @ResponseBody
// public Map<String,List<PlateSizeBean>> listStorageUseage(HttpServletRequest request, HttpServletResponse response){
// String cids = request.getParameter("cids");
// Collection<String> cidList;
// if(Strings.isNullOrEmpty(cids)){
// cidList = dataCache.getAllStorage().keySet();
// }else{
// cidList = Lists.newArrayList(cids.split(","));
// }
// Map<String, List<PlateSizeBean>> map= Maps.newHashMap();
// for (String cid : cidList) {
// Storage storage = dataCache.getStorage(cid);
// if(storage == null){
// continue;
// }
// String storageId = storage.getId();
// List<PlateSizeBean> usage = storagePosManager.getStoragePosUsage(storageId);
// map.put(cid, usage);
// }
// return map;
// }
@RequestMapping("/storageList")
@ResponseBody
......
......@@ -62,11 +62,13 @@
<div class="table-scrollable">
<display:table name="searchCriteria.pageList" cellspacing="0" cellpadding="0" requestURI=""
sort="external"
defaultsort="1" class="table table-striped table-bordered table-hover" export="false"
defaultsort="1" class="table table-striped table-bordered table-hover" export="true"
id="barcode">
<display:column sortProperty="barcode" sortable="true" titleKey="barcode.barcode">
<display:setProperty name="export.csv.filename" value="barcodeList.csv" />
<display:column sortProperty="barcode" sortable="true" titleKey="barcode.barcode" media="html">
<a href="${ctx}/barcode/barcodeUpdate.html?id=${barcode.id}">${barcode.barcode}</a>
</display:column>
<display:column sortProperty="barcode" sortable="true" titleKey="barcode.barcode" media="csv" property="barcode"/>
<display:column property="partNumber" sortProperty="partNumber" sortable="true" titleKey="barcode.partNumber"/>
<!-- 成都凯天-->
<c:if test='<%=DataCache.isProductionFor("ChengDuKaiTian") %>'>
......@@ -81,7 +83,7 @@
${barcode.plateSize} x ${barcode.height}
</display:column>
<display:column property="memo" escapeXml="true" titleKey="barcode.memo"/>
<display:column escapeXml="false" titleKey=" ">
<display:column escapeXml="false" titleKey=" " media="html">
<a
onclick="window.open('${ctx}/qrcode.html?barcode=${barcode.barcode}')"><fmt:message key="barcode.print"/> </a></display:column>
......
......@@ -86,9 +86,11 @@
sort="external"
defaultsort="1" class="table table-striped table-bordered table-hover" export="true" id="component">
<%--<display:column property="name" titleKey="component.name"/>--%>
<display:column titleKey="component.partNumber">
<display:setProperty name="export.csv.filename" value="componentList.csv" />
<display:column titleKey="component.partNumber" media="html">
<a href="${ctx}/component/componentUpdate.html?type=${component.type}&id=${component.id}">${component.partNumber}</a>
</display:column>
<display:column titleKey="component.partNumber" media="csv" property="partNumber"/>
<display:column property="providerNumber" titleKey="component.providerNumber"/>
<display:column titleKey="component.plate.size">
${component.plateSize} x ${component.height}
......
......@@ -144,11 +144,11 @@
<div class="bg-primary kabanTitle col-md-12">
<%--<span><fmt:message key="allBoxView.kanban"/></span>--%>
<%--<span style="margin-left: 40px;" id="storageTotalPos">总容量:1000</span>--%>
<div class="col-md-3">
<button class="btn yellow outBtn" id="outPn"><i class="fa fa-sign-out"></i><fmt:message key="button.checkout"/></button>
<button class="btn yellow outBtn" id="outOrder"><i class="fa fa-sign-out"></i><fmt:message key="工单出库"/></button>
</div>
<div class="col-md-9">
<%--<div class="col-md-3">--%>
<%--<button class="btn yellow outBtn" id="outPn"><i class="fa fa-sign-out"></i><fmt:message key="button.checkout"/></button>--%>
<%--<button class="btn yellow outBtn" id="outOrder"><i class="fa fa-sign-out"></i><fmt:message key="工单出库"/></button>--%>
<%--</div>--%>
<div class="col-md-12">
<div id="lineMsg"></div>
</div>
</div>
......
......@@ -475,7 +475,7 @@
var sizeData = storage.usageMap;
var cid = storage.cid;
var totalCount = 0;
var totalCount = storage.totalSlots;
for(var sizeStr in sizeData){
var sizeItem = sizeData[sizeStr];
var idleCount = sizeItem.totalCount - sizeItem.usedCount;
......
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!