Commit 269a0b0d sunke

出库到料架逻辑优化

1 个父辈 1a7cd308
...@@ -210,26 +210,26 @@ public class AppendInfo { ...@@ -210,26 +210,26 @@ public class AppendInfo {
/** /**
* 是否可放入A料架 A 带包装料料架 可放9个包装料 * 是否可放入A料架 A 带包装料料架 可放9个包装料
*/ */
public boolean putAShelf(){ public boolean isAShelfTask(){
return StorageConstants.SHEFL_TYPE.A.equals(shelfType); return StorageConstants.SHEFL_TYPE.A.equals(shelfType);
} }
/** /**
* 是否可放入B 料串 分盘料,紧急料,指定料,单独出库, 可放20-30个大小料,由客户端决定是否放满 * 是否可放入B 料串 分盘料,紧急料,指定料,单独出库, 可放20-30个大小料,由客户端决定是否放满
*/ */
public boolean putBShelf(){ public boolean isBShelfTask(){
return StorageConstants.SHEFL_TYPE.B.equals(shelfType); return StorageConstants.SHEFL_TYPE.B.equals(shelfType);
} }
/** /**
* 是否可放入C 大(11,13,15寸)料盘料架, 可放12个大料,共2列,每列6个 * 是否可放入C 大(11,13,15寸)料盘料架, 可放12个大料,共2列,每列6个
*/ */
public boolean putCShelf(){ public boolean isCShelfTask(){
return StorageConstants.SHEFL_TYPE.C.equals(shelfType); return StorageConstants.SHEFL_TYPE.C.equals(shelfType);
} }
/** /**
* 是否可放入D 小(7寸)料盘料架,可放92个小料,共4列,每列23个 * 是否可放入D 小(7寸)料盘料架,可放92个小料,共4列,每列23个
*/ */
public boolean putDShelf(){ public boolean isDShelfTask(){
return StorageConstants.SHEFL_TYPE.D.equals(shelfType); return StorageConstants.SHEFL_TYPE.D.equals(shelfType);
} }
...@@ -337,14 +337,6 @@ public class AppendInfo { ...@@ -337,14 +337,6 @@ public class AppendInfo {
this.cisIn = cisIn; this.cisIn = cisIn;
} }
public boolean isCShelfTask(){
return StorageConstants.SHEFL_TYPE.isCShelf(getShelfType());
}
public boolean isDShelfTask(){
return StorageConstants.SHEFL_TYPE.isDShelf(getShelfType());
}
@Override @Override
public String toString() { public String toString() {
return "AppendInfo{" + return "AppendInfo{" +
......
...@@ -6,9 +6,7 @@ import com.myproject.util.StorageConstants; ...@@ -6,9 +6,7 @@ import com.myproject.util.StorageConstants;
import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger; import org.apache.logging.log4j.Logger;
import java.util.ArrayList; import java.util.*;
import java.util.List;
import java.util.Map;
import java.util.concurrent.ConcurrentHashMap; import java.util.concurrent.ConcurrentHashMap;
/** /**
...@@ -35,6 +33,115 @@ public class InquiryShelfBean { ...@@ -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 * @param task
...@@ -350,7 +457,7 @@ public class InquiryShelfBean { ...@@ -350,7 +457,7 @@ public class InquiryShelfBean {
//未找到已经有实际RFID的料架,查找库位最多的料架 //未找到已经有实际RFID的料架,查找库位最多的料架
if(shelfInfo == null){ if(shelfInfo == null){
log.info(task.getBarcode() + "未找到实际绑定的["+rfid+"]料架,开始查找序号最小且未绑定过的同种料架["+task.getAppendInfo().getShelfType()+"]"); log.info(task.getBarcode() + "未找到实际绑定的["+rfid+"]料架,开始查找序号最小的同种料架["+task.getAppendInfo().getShelfType()+"]");
ShelfInfo minIndexShelf = null; ShelfInfo minIndexShelf = null;
for (ShelfInfo shelf : shelfMap.values()) { for (ShelfInfo shelf : shelfMap.values()) {
if(StorageConstants.SHEFL_TYPE.judgeType(task.getAppendInfo().getShelfType(), shelf.getShelfType())){ if(StorageConstants.SHEFL_TYPE.judgeType(task.getAppendInfo().getShelfType(), shelf.getShelfType())){
...@@ -441,4 +548,5 @@ public class InquiryShelfBean { ...@@ -441,4 +548,5 @@ public class InquiryShelfBean {
return false; return false;
} }
} }
...@@ -75,6 +75,16 @@ public class ShelfInfo { ...@@ -75,6 +75,16 @@ public class ShelfInfo {
return locMap; 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 { ...@@ -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 loc
* @param barcode * @param barcode
...@@ -152,7 +186,7 @@ public class ShelfInfo { ...@@ -152,7 +186,7 @@ public class ShelfInfo {
} }
if(lockLocation == -1){ if(lockLocation == -1){
log.error("未找到["+barcode+"]锁定的位置信息"); log.error("["+tempRfid()+"]未找到["+barcode+"]锁定的位置信息");
return false; return false;
} }
...@@ -166,20 +200,29 @@ public class ShelfInfo { ...@@ -166,20 +200,29 @@ public class ShelfInfo {
log.error("未找到["+loc+"]的位置信息,当前料架位置信息:"+ locMap); log.error("未找到["+loc+"]的位置信息,当前料架位置信息:"+ locMap);
return false; return false;
} }
if(shelfLoc.isEmpty()){
boolean putInResult = shelfLoc.putIn(barcode); boolean putInResult = shelfLoc.putIn(barcode);
locMap.put(loc, shelfLoc); 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){ public boolean putInLimitLoc(String rfid, int rfidLoc, String barcode){
if(rfid.contains(shelfType)){//不是同一种料架的忽略 if(rfid.contains(shelfType)){//不是同一种料架的忽略
ShelfLoc shelfLoc = locMap.get(rfidLoc); ShelfLoc shelfLoc = locMap.get(rfidLoc);
if(shelfLoc.isInThisLoc(barcode)){ if(shelfLoc.isInThisLoc(barcode)){
if(shelfLoc.isEmpty()){
shelfLoc.putIn(barcode); shelfLoc.putIn(barcode);
locMap.put(rfidLoc, shelfLoc); locMap.put(rfidLoc, shelfLoc);
this.setRealRfid(rfid); this.setRealRfid(rfid);
return true; return true;
}else {
log.error("料盘["+barcode+"]放入"+rfid+"["+rfidLoc+"]失败,此位置料盘已放入");
}
} }
} }
...@@ -234,6 +277,15 @@ public class ShelfInfo { ...@@ -234,6 +277,15 @@ public class ShelfInfo {
int usedCount = getUsedLocCount(); int usedCount = getUsedLocCount();
//1号机器人从大到小, 2号机器人从小到大,且71,72,73位不分配给2号机器人 //1号机器人从大到小, 2号机器人从小到大,且71,72,73位不分配给2号机器人
if(robotIndex.equals("1")){ if(robotIndex.equals("1")){
//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);
}
}
if(shelfLoc == null){
for(int i=usedCount; i> 0; i--){ for(int i=usedCount; i> 0; i--){
//大料12号位不分配给1号机器人 //大料12号位不分配给1号机器人
if(StorageConstants.SHEFL_TYPE.isCShelf(shelfType)){ if(StorageConstants.SHEFL_TYPE.isCShelf(shelfType)){
...@@ -241,21 +293,23 @@ public class ShelfInfo { ...@@ -241,21 +293,23 @@ public class ShelfInfo {
continue; continue;
} }
} }
ShelfLoc shelfLoc = locMap.get(i); shelfLoc = lockLocation(i,barcode,reelType);
// if(shelfLoc == null){ 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;
} }
} }
}
return shelfLoc;
}else if(robotIndex.equals("2")){ }else if(robotIndex.equals("2")){
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++){ for(int i=1; i<= usedCount; i++){
//小料70,71,72位不分配给2号机器人 //小料70,71,72位不分配给2号机器人
if(StorageConstants.SHEFL_TYPE.isDShelf(shelfType)){ if(StorageConstants.SHEFL_TYPE.isDShelf(shelfType)){
...@@ -263,30 +317,19 @@ public class ShelfInfo { ...@@ -263,30 +317,19 @@ public class ShelfInfo {
continue; continue;
} }
} }
ShelfLoc shelfLoc = locMap.get(i); shelfLoc = lockLocation(i,barcode,reelType);
// if(shelfLoc == null){ 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;
} }
} }
}
return shelfLoc;
}else { }else {
//包装料 //包装料
for(int i=1; i<= usedCount; i++){ for(int i=1; i<= usedCount; i++){
ShelfLoc shelfLoc = locMap.get(i); ShelfLoc shelfLoc = lockLocation(i,barcode,reelType);
if(shelfLoc != null && shelfLoc.isEmpty() && !shelfLoc.isLock()){ if(shelfLoc != null){
log.info("为[" + barcode + "]锁定架位"+tempRfid() + "["+i+"]");
//未放过料,且未锁定
shelfLoc.setBarcode(barcode);
shelfLoc.setReelType(reelType);
locMap.put(i, shelfLoc);
return shelfLoc; return shelfLoc;
} }
} }
...@@ -297,6 +340,22 @@ public class ShelfInfo { ...@@ -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(){ public int addEmptyLoc(){
...@@ -359,18 +418,18 @@ public class ShelfInfo { ...@@ -359,18 +418,18 @@ public class ShelfInfo {
return shelfType; 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) { public void setShelfType(String shelfType) {
this.shelfType = shelfType; this.shelfType = shelfType;
} }
// public String getTargetPoint() {
// return targetPoint;
// }
//
// public void setTargetPoint(String targetPoint) {
// this.targetPoint = targetPoint;
// }
public String tempRfid(){ public String tempRfid(){
return gethSerial() + "-" + rfidIndex + shelfType; return gethSerial() + "-" + rfidIndex + shelfType;
} }
......
...@@ -49,12 +49,7 @@ public class ComponentManagerImpl implements IComponentManager { ...@@ -49,12 +49,7 @@ public class ComponentManagerImpl implements IComponentManager {
@Override @Override
public PageList findByQuery(Query query, PageList pageList) public PageList findByQuery(Query query, PageList pageList)
{ {
return componentDao.findByQuery(query, 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;
} }
@Override @Override
......
...@@ -103,8 +103,15 @@ public class StoragePosManagerImpl implements IStoragePosManager { ...@@ -103,8 +103,15 @@ public class StoragePosManagerImpl implements IStoragePosManager {
if(compatibleType == StorageConstants.COMPATIBLE_TYPE.EXACT_MATCH){//完全匹配 if(compatibleType == StorageConstants.COMPATIBLE_TYPE.EXACT_MATCH){//完全匹配
c = c.and("w").is(barcode.getPlateSize()).and("h").is(barcode.getHeight()); c = c.and("w").is(barcode.getPlateSize()).and("h").is(barcode.getHeight());
}else if(compatibleType == StorageConstants.COMPATIBLE_TYPE.FULLY_COMPATIBLE){//完全兼容 }else if(compatibleType == StorageConstants.COMPATIBLE_TYPE.FULLY_COMPATIBLE){//同厚度兼容
c = c.and("w").gte(barcode.getPlateSize()).and("h").gte(barcode.getHeight());//宽度大于等于料盘宽度,高度大于等于料盘高度 //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){//同尺寸兼容 }else if(compatibleType == StorageConstants.COMPATIBLE_TYPE.SIZE_COMPATIBLE){//同尺寸兼容
c = c.and("w").is(barcode.getPlateSize()).and("h").gte(barcode.getHeight());//宽度等于料盘宽度,高度大于等于料盘高度 c = c.and("w").is(barcode.getPlateSize()).and("h").gte(barcode.getHeight());//宽度等于料盘宽度,高度大于等于料盘高度
} }
......
...@@ -526,7 +526,7 @@ public class StorageConstants { ...@@ -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; ...@@ -8,6 +8,7 @@ import com.myproject.util.StorageConstants;
import com.myproject.webapp.controller.FileUpload; import com.myproject.webapp.controller.FileUpload;
import com.myproject.webapp.controller.storage.BaseSearchController; import com.myproject.webapp.controller.storage.BaseSearchController;
import org.displaytag.properties.SortOrderEnum; import org.displaytag.properties.SortOrderEnum;
import org.displaytag.tags.TableTagParameters;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.mongodb.core.query.Criteria; import org.springframework.data.mongodb.core.query.Criteria;
import org.springframework.data.mongodb.core.query.Query; import org.springframework.data.mongodb.core.query.Query;
...@@ -16,6 +17,7 @@ import org.springframework.util.StringUtils; ...@@ -16,6 +17,7 @@ import org.springframework.util.StringUtils;
import org.springframework.web.bind.annotation.ModelAttribute; import org.springframework.web.bind.annotation.ModelAttribute;
import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMapping;
import javax.servlet.http.HttpServletRequest;
import java.util.regex.Pattern; import java.util.regex.Pattern;
/** /**
...@@ -30,7 +32,7 @@ public class BarcodeSearchController extends BaseSearchController { ...@@ -30,7 +32,7 @@ public class BarcodeSearchController extends BaseSearchController {
protected IBarcodeManager barcodeManager; protected IBarcodeManager barcodeManager;
@RequestMapping("/barcodeSearch*") @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); fileUpload.setType(StorageConstants.BARCODE_TYPE);
Query query = new Query(); Query query = new Query();
//List searchResult //List searchResult
...@@ -42,6 +44,13 @@ public class BarcodeSearchController extends BaseSearchController { ...@@ -42,6 +44,13 @@ public class BarcodeSearchController extends BaseSearchController {
pageList.setSortCriterion("updateDate"); pageList.setSortCriterion("updateDate");
pageList.setSortDirection(SortOrderEnum.DESCENDING); pageList.setSortDirection(SortOrderEnum.DESCENDING);
} }
//导出
if (request.getParameter(TableTagParameters.PARAMETER_EXPORTING) != null){
pageList.setPageNumber(-1);
}
searchCriteria.setPageList(barcodeManager.findByQuery(query, pageList)); searchCriteria.setPageList(barcodeManager.findByQuery(query, pageList));
return SUCCESS_VIEW; return SUCCESS_VIEW;
......
...@@ -7,6 +7,8 @@ import com.myproject.bean.search.PageList; ...@@ -7,6 +7,8 @@ import com.myproject.bean.search.PageList;
import com.myproject.manager.IComponentManager; import com.myproject.manager.IComponentManager;
import com.myproject.util.StorageConstants; import com.myproject.util.StorageConstants;
import com.myproject.webapp.controller.FileUpload; 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.beans.factory.annotation.Autowired;
import org.springframework.data.domain.Sort; import org.springframework.data.domain.Sort;
import org.springframework.data.mongodb.core.query.Criteria; import org.springframework.data.mongodb.core.query.Criteria;
...@@ -89,8 +91,21 @@ public class ComponentSearchController extends BaseSearchController { ...@@ -89,8 +91,21 @@ public class ComponentSearchController extends BaseSearchController {
request.setAttribute("type", componentType); request.setAttribute("type", componentType);
} }
query.with(new Sort(Sort.Direction.DESC, "updateDate")); PageList pageList = searchCriteria.getPageList();
searchCriteria.setPageList(componentmanager.findByQuery(query, 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()); //model.addAttribute("searchResult", searchCriteria.getPageList());
// return new ModelAndView(getSuccessView(), model.asMap()); // return new ModelAndView(getSuccessView(), model.asMap());
......
...@@ -550,25 +550,6 @@ public class DataCache{ ...@@ -550,25 +550,6 @@ public class DataCache{
return null; 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){ public Storage reloadStorage(Storage storage){
List<PlateSizeBean> plateSizeBeanList = storagePosManager.getStoragePosUsage(storage.getId()); List<PlateSizeBean> plateSizeBeanList = storagePosManager.getStoragePosUsage(storage.getId());
storage.initUsage(plateSizeBeanList); storage.initUsage(plateSizeBeanList);
......
...@@ -123,7 +123,12 @@ public class QisdaApiController extends BaseController { ...@@ -123,7 +123,12 @@ public class QisdaApiController extends BaseController {
@ResponseBody @ResponseBody
public String executeOut(HttpServletRequest request){ public String executeOut(HttpServletRequest request){
String hSerial = request.getParameter("hSerial"); 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 { ...@@ -1102,7 +1107,7 @@ public class QisdaApiController extends BaseController {
Component c = componentManager.findByPartNumber(outItem.getPn()); Component c = componentManager.findByPartNumber(outItem.getPn());
if(c != null){ if(c != null){
String shelfType = StorageConstants.SHEFL_TYPE.D; 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; shelfType = StorageConstants.SHEFL_TYPE.C;
} }
log.info(outItem.getSlotlocation() + "["+outItem.getPn()+"]缺料,保留"+shelfType+"类型架位"); log.info(outItem.getSlotlocation() + "["+outItem.getPn()+"]缺料,保留"+shelfType+"类型架位");
...@@ -1115,7 +1120,7 @@ public class QisdaApiController extends BaseController { ...@@ -1115,7 +1120,7 @@ public class QisdaApiController extends BaseController {
return tasks; return tasks;
} }
private String checkOutOutItems(String hSerial){ private String checkOutOutItems(String hSerial, int maxReelNum){
log.info("执行需求单["+hSerial+"]出库"); log.info("执行需求单["+hSerial+"]出库");
OutInfo outInfo = outInfoDao.findByHSerial(hSerial); OutInfo outInfo = outInfoDao.findByHSerial(hSerial);
if(outInfo == null){ if(outInfo == null){
...@@ -1157,6 +1162,7 @@ public class QisdaApiController extends BaseController { ...@@ -1157,6 +1162,7 @@ public class QisdaApiController extends BaseController {
List<DataLog> tasks = new ArrayList<>(); List<DataLog> tasks = new ArrayList<>();
List<OutItem> itemList = outItemDao.findByHSerial(hSerial); List<OutItem> itemList = outItemDao.findByHSerial(hSerial);
int taskCount = 0;
for (OutItem outItem : itemList) { for (OutItem outItem : itemList) {
outItem = updateRealLockQty(outItem); outItem = updateRealLockQty(outItem);
List<DataLog> itemTasks = null; List<DataLog> itemTasks = null;
...@@ -1176,6 +1182,12 @@ public class QisdaApiController extends BaseController { ...@@ -1176,6 +1182,12 @@ public class QisdaApiController extends BaseController {
tasks.addAll(itemTasks); tasks.addAll(itemTasks);
} }
outInfoCache.updateOutItem(outItem.getId()); outInfoCache.updateOutItem(outItem.getId());
if(maxReelNum != -1){
if(tasks.size() >= maxReelNum){
log.info("限制料盘数为:"+maxReelNum);
break;
}
}
} }
......
...@@ -136,6 +136,10 @@ public class QisdaDeviceController extends BaseController { ...@@ -136,6 +136,10 @@ public class QisdaDeviceController extends BaseController {
log.error(msg); log.error(msg);
return ResultBean.newErrorResult(103, 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); updateScanTask(robotIndex, task);
...@@ -172,9 +176,11 @@ public class QisdaDeviceController extends BaseController { ...@@ -172,9 +176,11 @@ public class QisdaDeviceController extends BaseController {
@ResponseBody @ResponseBody
public Object arriveRobot(HttpServletRequest request){ public Object arriveRobot(HttpServletRequest request){
String robotIndex = request.getParameter("robotIndex"); String robotIndex = request.getParameter("robotIndex");
String barcode = request.getParameter("barcode");
//更新位置任务,清空扫码任务 //更新位置任务,清空扫码任务
log.info("料盘到达机器人["+robotIndex+"]取料位置,更新位置任务,清空扫码任务"); log.info("料盘["+barcode+"]到达机器人["+robotIndex+"]取料位置,更新位置任务,清空扫码任务");
if(robotIndex != null){ if(robotIndex != null){
try{
if(robotIndex.equals("1")){ if(robotIndex.equals("1")){
//1号位机器人 //1号位机器人
firstRobotTask = firstScanTask; firstRobotTask = firstScanTask;
...@@ -184,9 +190,14 @@ public class QisdaDeviceController extends BaseController { ...@@ -184,9 +190,14 @@ public class QisdaDeviceController extends BaseController {
log.info("将扫码任务["+secondRobotTask.getBarcode()+"]设置到机器人["+robotIndex+"]取料任务"); log.info("将扫码任务["+secondRobotTask.getBarcode()+"]设置到机器人["+robotIndex+"]取料任务");
} }
updateScanTask(robotIndex, null); updateScanTask(robotIndex, null);
}catch(Exception e){
log.error("料盘到达机器人出错:",e);
return "Error:" + e.getMessage();
} }
return ""; }
return "OK";
} }
/** /**
...@@ -401,7 +412,7 @@ public class QisdaDeviceController extends BaseController { ...@@ -401,7 +412,7 @@ public class QisdaDeviceController extends BaseController {
resultMap.put("rfid", shelfLoc.getTempRfid()); resultMap.put("rfid", shelfLoc.getTempRfid());
resultMap.put("rfidLoc", shelfLoc.getLoc() + ""); 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); return ResultBean.newOkResult(resultMap);
}catch(Exception e){ }catch(Exception e){
...@@ -479,7 +490,7 @@ public class QisdaDeviceController extends BaseController { ...@@ -479,7 +490,7 @@ public class QisdaDeviceController extends BaseController {
boolean isCutTask = cacheTask.isUrgentReel() || cacheTask.isCutReel(); boolean isCutTask = cacheTask.isUrgentReel() || cacheTask.isCutReel();
if(!isCutTask && !putResult){ 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); log.error(errorMsg);
AlarmInfo alarmInfo = new AlarmInfo(); AlarmInfo alarmInfo = new AlarmInfo();
alarmInfo.setBoxId("0"); alarmInfo.setBoxId("0");
......
...@@ -667,29 +667,6 @@ public class StorageDataController extends BaseController { ...@@ -667,29 +667,6 @@ public class StorageDataController extends BaseController {
String cid = request.getParameter("cid"); String cid = request.getParameter("cid");
return dataCache.getStorage(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") @RequestMapping("/storageList")
@ResponseBody @ResponseBody
......
...@@ -210,9 +210,14 @@ public class TaskService implements ITaskService { ...@@ -210,9 +210,14 @@ public class TaskService implements ITaskService {
if(task == null){ if(task == null){
log.error("更新["+task.getBarcode()+"]任务时,任务不存在"); log.error("更新["+task.getBarcode()+"]任务时,任务不存在");
}else{ }else{
if(task.isFinished()){
finishedTaskMap.remove(task.getBarcode());
log.info("任务["+task.getBarcode()+"]完成,更改状态,清理缓存");
}else{
finishedTaskMap.put(task.getBarcode(), task); finishedTaskMap.put(task.getBarcode(), task);
} }
} }
}
/** /**
...@@ -808,6 +813,8 @@ public class TaskService implements ITaskService { ...@@ -808,6 +813,8 @@ public class TaskService implements ITaskService {
} }
} }
//TODO:如果是首盘料的料架任务,需要填充料架相应的架位,否则料架会卡在那里
finishedTaskMap.remove(task.getBarcode()); finishedTaskMap.remove(task.getBarcode());
} }
...@@ -937,12 +944,25 @@ public class TaskService implements ITaskService { ...@@ -937,12 +944,25 @@ public class TaskService implements ITaskService {
} }
if(hasFirstReelAction){ if(hasFirstReelAction){
return findFirstActionask(storage, minARfidIndex,minDRfidIndex, minCRfidIndex);
}else{
//补料
return findTailActionTask(storage, minARfidIndex,minDRfidIndex, minCRfidIndex);
}
//}
}
/**
* 查找包装料最小料架的任务
*/
private DataLog findPackageMinTask(Storage storage, int minARfidIndex){
DataLog storageTask = null; DataLog storageTask = null;
//包装料仓
if(storage.isPackage()){ if(storage.isPackage()){
//找当前料仓最小料架,最小架位的 //找当前料仓最小料架,最小架位的
for (DataLog task : waitTasks) { for (DataLog task : taskMap.values()) {
if (cid.equals(task.getCid()) && task.isCheckOutTask() && task.isWait()) { if (storage.getCid().equals(task.getCid()) && task.isCheckOutTask() && task.isWait()) {
//按料架顺序 //按料架顺序
if(minARfidIndex != -1){ if(minARfidIndex != -1){
AppendInfo appendInfo = task.getAppendInfo(); AppendInfo appendInfo = task.getAppendInfo();
...@@ -959,13 +979,26 @@ public class TaskService implements ITaskService { ...@@ -959,13 +979,26 @@ public class TaskService implements ITaskService {
if(storageTask != null){ if(storageTask != null){
log.info("出库首盘料任务[包装料]"+storageTask.getBarcode()+"["+storageTask.getPosName()+"]" + storageTask.getAppendInfo()); log.info("出库首盘料任务[包装料]"+storageTask.getBarcode()+"["+storageTask.getPosName()+"]" + storageTask.getAppendInfo());
} }
}
return storageTask; return storageTask;
}
/**
* 查找首盘料出库任务
*/
private DataLog findFirstActionask(Storage storage, int minARfidIndex, int minDRfidIndex, int minCRfidIndex){
DataLog storageTask = null;
//包装料仓
if(storage.isPackage()){
//包装料仓的最小料架的任务
return findPackageMinTask(storage, minARfidIndex);
}else{ }else{
//首套料需要先出D料架,再出C料架,并且要按料架顺序 //首套料需要先出D料架,再出C料架,并且要按料架顺序
//架位顺序随机,保证左右机器人均衡 //架位顺序随机,保证左右机器人均衡
boolean locAsc = RandomUtils.nextBoolean(); boolean locAsc = RandomUtils.nextBoolean();
for (DataLog task : waitTasks) { for (DataLog task : taskMap.values()) {
if(cid.equals(task.getCid()) && task.isCheckOutTask() && task.isWait()){ if(storage.getCid().equals(task.getCid()) && task.isCheckOutTask() && task.isWait()){
AppendInfo appendInfo = task.getAppendInfo(); AppendInfo appendInfo = task.getAppendInfo();
int rfidIndex = appendInfo.getRfidIndex(); int rfidIndex = appendInfo.getRfidIndex();
if(minDRfidIndex != -1){ if(minDRfidIndex != -1){
...@@ -989,7 +1022,6 @@ public class TaskService implements ITaskService { ...@@ -989,7 +1022,6 @@ public class TaskService implements ITaskService {
} }
} }
}else{ }else{
//没有小料架(D),那么可以出C料架了 //没有小料架(D),那么可以出C料架了
boolean isCShelf = StorageConstants.SHEFL_TYPE.isCShelf(appendInfo.getShelfType()); boolean isCShelf = StorageConstants.SHEFL_TYPE.isCShelf(appendInfo.getShelfType());
if(isCShelf && rfidIndex <= minCRfidIndex){ if(isCShelf && rfidIndex <= minCRfidIndex){
...@@ -1015,72 +1047,28 @@ public class TaskService implements ITaskService { ...@@ -1015,72 +1047,28 @@ public class TaskService implements ITaskService {
} }
} }
if(storageTask != null){ if(storageTask != null){
//如果双层线上有两个料架,但任务不属于这两个料架,不允许出库
if(InquiryShelfBean.canCheckOutFistActionTask(storageTask)){
log.info("出库首盘料任务"+storageTask.getBarcode()+"["+storageTask.getPosName()+"]" + storageTask.getAppendInfo()); log.info("出库首盘料任务"+storageTask.getBarcode()+"["+storageTask.getPosName()+"]" + storageTask.getAppendInfo());
}else{ return storageTask;
return null;
}
//如果当前任务(执行中或已完成出库但未放到料架上的任务)的C或D料架数量大于2个,不允许出库
List<String> shelfNameList = new ArrayList<>();
for (DataLog waitTask : waitTasks) {
AppendInfo appendInfo = waitTask.getAppendInfo();
if(waitTask.isExecuting() && waitTask.isCheckOutTask()){
//待执行队列中正在执行的出库任务
if(appendInfo.isDShelfTask() || appendInfo.isCShelfTask()){
String shelName = appendInfo.getTempRfid();
if(!shelfNameList.contains(shelName)){
shelfNameList.add(shelName);
}
}
}
}
for (DataLog finishedTask : finishedTaskMap.values()) {
AppendInfo appendInfo = finishedTask.getAppendInfo();
if(!finishedTask.isCancel() && !finishedTask.isFinished() && finishedTask.isCheckOutTask()){
//未完成的出库工单任务
if(appendInfo.isDShelfTask() || appendInfo.isCShelfTask()){
String shelName = appendInfo.getTempRfid();
if(!shelfNameList.contains(shelName)){
shelfNameList.add(shelName);
}
}
}
}
if(!shelfNameList.contains(storageTask.getAppendInfo().getTempRfid())){
for (String shelfName : shelfNameList) {
//判断未完成的工单料架中是否有大料架
if(StorageConstants.SHEFL_TYPE.isCShelf(shelfName)){
//大料(C料架)只能同时出一个架子,不然到包装料工位时无法切换
log.info("未完成的工单料架为:["+String.join(",",shelfNameList)+ "]大料架任务["+storageTask.getBarcode()+"]["+shelfName+"]暂停出库,以免包装工位无法切换");
return null;
} }
} }
//未完成的工单任务料架数量>2,且未包含此任务,任务先不出,等到只有一个料架时再说
if(shelfNameList.size() >= 2){
log.info("未完成的工单任务料架为:["+String.join(",",shelfNameList)+ "]任务"+storageTask.getBarcode()+"暂停出库");
return null; return null;
} }
}
return storageTask; /**
* 查找补料任务
}else{ * @return
*/
private DataLog findTailActionTask(Storage storage, int minARfidIndex, int minDRfidIndex, int minCRfidIndex){
//包装料仓,不按顺序,可以同时出 //包装料仓,不按顺序,可以同时出
if(storage.isPackage()){ if(storage.isPackage()){
for (DataLog task : waitTasks) { return findPackageMinTask(storage, minARfidIndex);
if (cid.equals(task.getCid()) && task.isCheckOutTask() && task.isWait()) {
log.info("出库包装料任务"+task.getBarcode()+"["+task.getPosName()+"]" + task.getAppendInfo());
return task;
}
}
}else{ }else{
//一次性把D料架出完,再出C料架,包装料可以同时出 //一次性把D料架出完,再出C料架,包装料可以同时出
for (DataLog task : waitTasks) { for (DataLog task : taskMap.values()) {
if(cid.equals(task.getCid()) && task.isCheckOutTask() && task.isWait()){ if(storage.getCid().equals(task.getCid()) && task.isCheckOutTask() && task.isWait()){
//还有小料架出库任务,出小料架 //还有小料架出库任务,出小料架
if(minDRfidIndex != -1){ if(minDRfidIndex != -1){
if(task.isSmallReel()){ if(task.isSmallReel()){
...@@ -1090,6 +1078,22 @@ public class TaskService implements ITaskService { ...@@ -1090,6 +1078,22 @@ public class TaskService implements ITaskService {
}else{ }else{
//开始出大料架,不需要按顺序 //开始出大料架,不需要按顺序
if(!task.isSmallReel()){ if(!task.isSmallReel()){
//未完成的大料数量(正在执行和未放上料架的)
int unFinishedBigTaskCount = 0;
for (DataLog dataLog : taskMap.values()) {
if(!dataLog.isPackageReel() && !dataLog.isSmallReel() && dataLog.isExecuting()){
unFinishedBigTaskCount = unFinishedBigTaskCount + 1;
}
}
for (DataLog dataLog : finishedTaskMap.values()) {
if(!dataLog.isPackageReel()){
if(dataLog.isSmallReel() && !dataLog.isFinished()){
//非包装料小料任务还未完成(未放入料架),暂时不出大料
unFinishedBigTaskCount = unFinishedBigTaskCount + 1;
}
}
}
if(InquiryShelfBean.canCheckOutTailActionTask(task, unFinishedBigTaskCount)){
log.info("出库大料任务"+task.getBarcode()+"["+task.getPosName()+"]"); log.info("出库大料任务"+task.getBarcode()+"["+task.getPosName()+"]");
return task; return task;
} }
...@@ -1098,8 +1102,6 @@ public class TaskService implements ITaskService { ...@@ -1098,8 +1102,6 @@ public class TaskService implements ITaskService {
} }
} }
} }
//}
return null; return null;
} }
......
...@@ -62,11 +62,13 @@ ...@@ -62,11 +62,13 @@
<div class="table-scrollable"> <div class="table-scrollable">
<display:table name="searchCriteria.pageList" cellspacing="0" cellpadding="0" requestURI="" <display:table name="searchCriteria.pageList" cellspacing="0" cellpadding="0" requestURI=""
sort="external" 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"> 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> <a href="${ctx}/barcode/barcodeUpdate.html?id=${barcode.id}">${barcode.barcode}</a>
</display:column> </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"/> <display:column property="partNumber" sortProperty="partNumber" sortable="true" titleKey="barcode.partNumber"/>
<!-- 成都凯天--> <!-- 成都凯天-->
<c:if test='<%=DataCache.isProductionFor("ChengDuKaiTian") %>'> <c:if test='<%=DataCache.isProductionFor("ChengDuKaiTian") %>'>
...@@ -81,7 +83,7 @@ ...@@ -81,7 +83,7 @@
${barcode.plateSize} x ${barcode.height} ${barcode.plateSize} x ${barcode.height}
</display:column> </display:column>
<display:column property="memo" escapeXml="true" titleKey="barcode.memo"/> <display:column property="memo" escapeXml="true" titleKey="barcode.memo"/>
<display:column escapeXml="false" titleKey=" "> <display:column escapeXml="false" titleKey=" " media="html">
<a <a
onclick="window.open('${ctx}/qrcode.html?barcode=${barcode.barcode}')"><fmt:message key="barcode.print"/> </a></display:column> onclick="window.open('${ctx}/qrcode.html?barcode=${barcode.barcode}')"><fmt:message key="barcode.print"/> </a></display:column>
......
...@@ -86,9 +86,11 @@ ...@@ -86,9 +86,11 @@
sort="external" sort="external"
defaultsort="1" class="table table-striped table-bordered table-hover" export="true" id="component"> defaultsort="1" class="table table-striped table-bordered table-hover" export="true" id="component">
<%--<display:column property="name" titleKey="component.name"/>--%> <%--<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> <a href="${ctx}/component/componentUpdate.html?type=${component.type}&id=${component.id}">${component.partNumber}</a>
</display:column> </display:column>
<display:column titleKey="component.partNumber" media="csv" property="partNumber"/>
<display:column property="providerNumber" titleKey="component.providerNumber"/> <display:column property="providerNumber" titleKey="component.providerNumber"/>
<display:column titleKey="component.plate.size"> <display:column titleKey="component.plate.size">
${component.plateSize} x ${component.height} ${component.plateSize} x ${component.height}
......
...@@ -144,11 +144,11 @@ ...@@ -144,11 +144,11 @@
<div class="bg-primary kabanTitle col-md-12"> <div class="bg-primary kabanTitle col-md-12">
<%--<span><fmt:message key="allBoxView.kanban"/></span>--%> <%--<span><fmt:message key="allBoxView.kanban"/></span>--%>
<%--<span style="margin-left: 40px;" id="storageTotalPos">总容量:1000</span>--%> <%--<span style="margin-left: 40px;" id="storageTotalPos">总容量:1000</span>--%>
<div class="col-md-3"> <%--<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="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> <%--<button class="btn yellow outBtn" id="outOrder"><i class="fa fa-sign-out"></i><fmt:message key="工单出库"/></button>--%>
</div> <%--</div>--%>
<div class="col-md-9"> <div class="col-md-12">
<div id="lineMsg"></div> <div id="lineMsg"></div>
</div> </div>
</div> </div>
......
...@@ -475,7 +475,7 @@ ...@@ -475,7 +475,7 @@
var sizeData = storage.usageMap; var sizeData = storage.usageMap;
var cid = storage.cid; var cid = storage.cid;
var totalCount = 0; var totalCount = storage.totalSlots;
for(var sizeStr in sizeData){ for(var sizeStr in sizeData){
var sizeItem = sizeData[sizeStr]; var sizeItem = sizeData[sizeStr];
var idleCount = sizeItem.totalCount - sizeItem.usedCount; var idleCount = sizeItem.totalCount - sizeItem.usedCount;
......
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!