Commit 18f4ec8a LN

增加钢网料架NLS

1 个父辈 0698a9c8
package com.neotel.smfcore.core.device.handler.impl;
import com.neotel.smfcore.core.storage.enums.DeviceType;
import io.swagger.annotations.Api;
import lombok.extern.slf4j.Slf4j;
@Api(tags = "SHELF: NLS(钢网料架)")
@Slf4j
public class NLSShelfHandler extends NLShelfHandler{
@Override
public DeviceType getDeviceType() {
return DeviceType.NLS;
}
}
...@@ -206,7 +206,7 @@ public class InListController { ...@@ -206,7 +206,7 @@ public class InListController {
for (String cid : cidList) { for (String cid : cidList) {
Storage storage = dataCache.getStorage(cid); Storage storage = dataCache.getStorage(cid);
if (storage != null) { if (storage != null) {
if (storage.isType(new DeviceType[]{DeviceType.NLP,DeviceType.NL})) { if (storage.isType(new DeviceType[]{DeviceType.NLP,DeviceType.NL,DeviceType.NLS})) {
storage.setInListName(inListName); storage.setInListName(inListName);
log.info("设置组[" + groupId + "]料架[" + storage.getName() + "]的入库单为:[" + inListName + "]"); log.info("设置组[" + groupId + "]料架[" + storage.getName() + "]的入库单为:[" + inListName + "]");
storageManager.save(storage); storageManager.save(storage);
...@@ -218,7 +218,7 @@ public class InListController { ...@@ -218,7 +218,7 @@ public class InListController {
} else { } else {
Storage storage = dataCache.getStorageById(storageId); Storage storage = dataCache.getStorageById(storageId);
if (storage != null) { if (storage != null) {
if (storage.isType(new DeviceType[]{DeviceType.NLP,DeviceType.NL})) { if (storage.isType(new DeviceType[]{DeviceType.NLP,DeviceType.NL,DeviceType.NLS})) {
storage.setInListName(inListName); storage.setInListName(inListName);
log.info("设置料架[" + storage.getName() + "]的入库单为:[" + inListName + "]"); log.info("设置料架[" + storage.getName() + "]的入库单为:[" + inListName + "]");
storageManager.save(storage); storageManager.save(storage);
......
...@@ -132,7 +132,12 @@ public enum DeviceType { ...@@ -132,7 +132,12 @@ public enum DeviceType {
/** /**
* 21 标签料架 NLL * 21 标签料架 NLL
*/ */
NLL("storage.type.nll"); NLL("storage.type.nll"),
/**
* 22 钢网料架 NLS
*/
NLS("storage.type.nls");
private String key; private String key;
...@@ -153,6 +158,6 @@ public enum DeviceType { ...@@ -153,6 +158,6 @@ public enum DeviceType {
} }
public static List<DeviceType> availableTypeList(){ public static List<DeviceType> availableTypeList(){
return Lists.newArrayList(AUTO,LINE,BATCH,SOLDERPASTE,VERTICALBOX,SMD_XL,SMD_DUO,SMD_XLC,SMD_XLR,VIRTUAL,NL,NLP,NLM,NLL,SMDBOX_THIRD); return Lists.newArrayList(AUTO,LINE,BATCH,SOLDERPASTE,VERTICALBOX,SMD_XL,SMD_DUO,SMD_XLC,SMD_XLR,VIRTUAL,NL,NLP,NLM,NLL,NLS,SMDBOX_THIRD);
} }
} }
...@@ -187,7 +187,7 @@ public class StorageController { ...@@ -187,7 +187,7 @@ public class StorageController {
@ApiOperation("料架设置界面,返回所有的料架列表") @ApiOperation("料架设置界面,返回所有的料架列表")
@GetMapping(value = "/allShelf") @GetMapping(value = "/allShelf")
public List<StorageDto> allShelf() { public List<StorageDto> allShelf() {
Query query=new Query(Criteria.where("type").in(new String[]{DeviceType.NLP.name(),DeviceType.NL.name() })); Query query=new Query(Criteria.where("type").in(new String[]{DeviceType.NLP.name(),DeviceType.NL.name(),DeviceType.NLS.name() }));
List<Storage> storages=storageManager.findByQuery(query); List<Storage> storages=storageManager.findByQuery(query);
List<StorageDto> storageDtos= new ArrayList<>(); List<StorageDto> storageDtos= new ArrayList<>();
for (Storage storage : for (Storage storage :
...@@ -474,7 +474,7 @@ public class StorageController { ...@@ -474,7 +474,7 @@ public class StorageController {
int priIndex = csvRead.getCsvIndex("优先级","pri"); int priIndex = csvRead.getCsvIndex("优先级","pri");
int hIndex = csvRead.getCsvIndex("高度","h"); int hIndex = csvRead.getCsvIndex("高度","h");
int wIndex = csvRead.getCsvIndex("宽度","w"); int wIndex = csvRead.getCsvIndex("宽度","w");
int warmPosIndex = csvRead.getHasCsvIndex("回温库位","warmPos"); int warmPosIndex = csvRead.getHasCsvIndex("回温库位","warmPos");//true表示回温区库位,
int areaIndex = csvRead.getHasCsvIndex("区域","area"); int areaIndex = csvRead.getHasCsvIndex("区域","area");
......
...@@ -134,7 +134,7 @@ public class Storage extends BasePo implements Serializable { ...@@ -134,7 +134,7 @@ public class Storage extends BasePo implements Serializable {
* 是否是普通料架 * 是否是普通料架
*/ */
public boolean isNLShelf() { public boolean isNLShelf() {
return DeviceType.NL.name().equals(type); return DeviceType.NL.name().equals(type)||DeviceType.NLS.name().equals(type);
} }
/** /**
* 是否是感应料架 * 是否是感应料架
......
...@@ -140,7 +140,7 @@ public class SettingsController { ...@@ -140,7 +140,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.isType(new DeviceType[]{DeviceType.NLP,DeviceType.NL})) { if (storage.isType(new DeviceType[]{DeviceType.NLP,DeviceType.NL,DeviceType.NLS})) {
orderSetting.setShowLightType(true); orderSetting.setShowLightType(true);
break; break;
} }
......
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!