Commit a824869c LN

料架类型CODESHELF改为NLP

1 个父辈 b3407e28
...@@ -107,7 +107,7 @@ public class BoxKanbanController { ...@@ -107,7 +107,7 @@ public class BoxKanbanController {
continue; continue;
} }
boxStatusDtos.add(getBoxDto(storage,allTasks)); boxStatusDtos.add(getBoxDto(storage,allTasks));
if(storage.getType().equals(DeviceType.ACCSHELF.name())||storage.getType().equals(DeviceType.CODESHELF.name())){ if(storage.isNLPShelf()){
groupType=1; groupType=1;
} }
} }
......
...@@ -10,6 +10,7 @@ import com.neotel.smfcore.common.utils.PointUtil; ...@@ -10,6 +10,7 @@ import com.neotel.smfcore.common.utils.PointUtil;
import com.neotel.smfcore.common.utils.QueryHelp; import com.neotel.smfcore.common.utils.QueryHelp;
import com.neotel.smfcore.common.utils.SecurityUtils; import com.neotel.smfcore.common.utils.SecurityUtils;
import com.neotel.smfcore.core.device.util.DataCache; import com.neotel.smfcore.core.device.util.DataCache;
import com.neotel.smfcore.core.storage.enums.DeviceType;
import com.neotel.smfcore.core.storage.rest.dto.StorageDto; import com.neotel.smfcore.core.storage.rest.dto.StorageDto;
import com.neotel.smfcore.core.storage.rest.dto.StorageSearchDto; import com.neotel.smfcore.core.storage.rest.dto.StorageSearchDto;
import com.neotel.smfcore.core.storage.rest.mapstruct.StorageMapper; import com.neotel.smfcore.core.storage.rest.mapstruct.StorageMapper;
...@@ -128,6 +129,18 @@ public class StorageController { ...@@ -128,6 +129,18 @@ public class StorageController {
return storageSearchDtos; return storageSearchDtos;
} }
@ApiOperation("返回所有料仓类型")
@GetMapping(value = "/typeList")
public List<String> typeList() {
List<DeviceType> availableTypeList= DeviceType.availableTypeList();
List<String> allList=new ArrayList<>();
for (DeviceType type :
availableTypeList) {
allList.add(type.getName());
}
return allList;
}
@ApiOperation("新增料仓") @ApiOperation("新增料仓")
@PostMapping @PostMapping
@PreAuthorize("@el.check('storage:add')") @PreAuthorize("@el.check('storage:add')")
......
...@@ -67,13 +67,13 @@ public class Storage extends BasePo implements Serializable { ...@@ -67,13 +67,13 @@ public class Storage extends BasePo implements Serializable {
private String inListName=""; private String inListName="";
/** // /**
* 是否是上下层的在线料仓 // * 是否是上下层的在线料仓
* @return // * @return
*/ // */
public boolean isOnlineStorage(){ // public boolean isOnlineStorage(){
return DeviceType.ONLINE.name().equals(type); // return DeviceType.ONLINE.name().equals(type);
} // }
/** /**
* 是否是指上下料的料仓 * 是否是指上下料的料仓
...@@ -107,24 +107,24 @@ public class Storage extends BasePo implements Serializable { ...@@ -107,24 +107,24 @@ public class Storage extends BasePo implements Serializable {
} }
/** /**
* 是否是智能料架 * 是否是料架
*/ */
public boolean isShelf() { public boolean isShelf() {
return DeviceType.SHELF.name().equals(type); return DeviceType.SHELF.name().equals(type);
} }
/** // /**
* 是否是ACC智能料架 // * 是否是ACC智能料架
*/ // */
public boolean isAccShelf() { // public boolean isAccShelf() {
return DeviceType.ACCSHELF.name().equals(type); // return DeviceType.ACCSHELF.name().equals(type);
} // }
//
/** // /**
* 是否是扫码料架 // * 是否是扫码料架
*/ // */
public boolean isCodeShelf() { // public boolean isCodeShelf() {
return DeviceType.CODESHELF.name().equals(type); // return DeviceType.CODESHELF.name().equals(type);
} // }
/** /**
* 是否是普通料架 * 是否是普通料架
*/ */
...@@ -132,6 +132,12 @@ public class Storage extends BasePo implements Serializable { ...@@ -132,6 +132,12 @@ public class Storage extends BasePo implements Serializable {
return DeviceType.NL.name().equals(type); return DeviceType.NL.name().equals(type);
} }
/** /**
* 是否是感应料架
*/
public boolean isNLPShelf() {
return DeviceType.NLP.name().equals(type);
}
/**
* 是否是垂直货柜 * 是否是垂直货柜
*/ */
public boolean isVerticalBox(){ public boolean isVerticalBox(){
...@@ -173,6 +179,16 @@ public class Storage extends BasePo implements Serializable { ...@@ -173,6 +179,16 @@ public class Storage extends BasePo implements Serializable {
return DeviceType.SMD_XLC.name().equals(type); return DeviceType.SMD_XLC.name().equals(type);
} }
public boolean isType(DeviceType[] types){
for (DeviceType str :
types) {
if(str.name().equals(type)){
return true;
}
}
return false;
}
public boolean canPutInPos(int w, int h, int PosW, int posH){ public boolean canPutInPos(int w, int h, int PosW, int posH){
if(compatibleType == COMPATIBLE_TYPE.EXACT_MATCH){//完全匹配 if(compatibleType == COMPATIBLE_TYPE.EXACT_MATCH){//完全匹配
......
...@@ -10,6 +10,7 @@ import com.neotel.smfcore.common.utils.QueryHelp; ...@@ -10,6 +10,7 @@ import com.neotel.smfcore.common.utils.QueryHelp;
import com.neotel.smfcore.core.device.util.DataCache; import com.neotel.smfcore.core.device.util.DataCache;
import com.neotel.smfcore.core.language.service.bean.LanguageInfo; import com.neotel.smfcore.core.language.service.bean.LanguageInfo;
import com.neotel.smfcore.core.language.service.po.LanguageMsg; import com.neotel.smfcore.core.language.service.po.LanguageMsg;
import com.neotel.smfcore.core.storage.enums.DeviceType;
import com.neotel.smfcore.core.storage.service.po.Storage; import com.neotel.smfcore.core.storage.service.po.Storage;
import com.neotel.smfcore.core.system.bean.OrderSetting; import com.neotel.smfcore.core.system.bean.OrderSetting;
import com.neotel.smfcore.core.system.rest.bean.dto.SettingsDto; import com.neotel.smfcore.core.system.rest.bean.dto.SettingsDto;
...@@ -113,7 +114,7 @@ public class SettingsController { ...@@ -113,7 +114,7 @@ public class SettingsController {
List<Storage> storages = new ArrayList<>(dataCache.getAllStorage().values()); List<Storage> storages = new ArrayList<>(dataCache.getAllStorage().values());
for (Storage storage : storages for (Storage storage : storages
) { ) {
if (storage.isShelf() || storage.isNLShelf() || storage.isAccShelf() || storage.isCodeShelf()) { if (storage.isType(new DeviceType[]{DeviceType.NLP,DeviceType.NL})) {
orderSetting.setShowLightType(true); orderSetting.setShowLightType(true);
break; break;
} }
......
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!