Commit fefb6495 LN

duo界面调试修改

1 个父辈 c37f59d3
...@@ -88,7 +88,7 @@ public class SmdBoxController { ...@@ -88,7 +88,7 @@ public class SmdBoxController {
else if(storage.isSmdDuo()){ else if(storage.isSmdDuo()){
if(cid.equals("line-ac-05")) { if(cid.equals("line-ac-05")) {
cids.add("line-ac-04"); cids.add("line-ac-04");
}else{ }else if(cid.equals("line-ac-04")){
cids.add("line-ac-05"); cids.add("line-ac-05");
} }
} }
...@@ -100,7 +100,7 @@ public class SmdBoxController { ...@@ -100,7 +100,7 @@ public class SmdBoxController {
Date currentDate = com.neotel.smfcore.common.utils.DateUtil.getCurrentDate("yyyy-MM-dd"); Date currentDate = com.neotel.smfcore.common.utils.DateUtil.getCurrentDate("yyyy-MM-dd");
List<InOutData> inOutDataList = inOutDataManager.findByDate(currentDate, com.neotel.smfcore.common.utils.DateUtil.addDays(currentDate, 1), null); List<InOutData> inOutDataList = inOutDataManager.findByDate(currentDate, com.neotel.smfcore.common.utils.DateUtil.addDays(currentDate, 1), null);
ElecKanbanBoxStatusDto dto = new ElecKanbanBoxStatusDto(); ElecKanbanBoxStatusDto dto = new ElecKanbanBoxStatusDto();
StatusBean statusBean = DevicesStatusUtil.getStatusBean(cid); StatusBean statusBean = DevicesStatusUtil.getStatusBean(theCid);
if (statusBean != null) { if (statusBean != null) {
//dto.setStatus(statusBean.getStatus()); //dto.setStatus(statusBean.getStatus());
Collection<BoxStatusBean> boxStatusBeans = statusBean.getBoxStatus().values(); Collection<BoxStatusBean> boxStatusBeans = statusBean.getBoxStatus().values();
...@@ -114,7 +114,7 @@ public class SmdBoxController { ...@@ -114,7 +114,7 @@ public class SmdBoxController {
} }
} }
} }
Storage storage = dataCache.getStorage(cid); Storage storage = dataCache.getStorage(theCid);
if (storage.isNLShelf() || storage.isNLPShelf() || storage.isNLMShelf() || storage.isShelf()) { if (storage.isNLShelf() || storage.isNLPShelf() || storage.isNLMShelf() || storage.isShelf()) {
dto.setType(0); dto.setType(0);
} else { } else {
...@@ -130,7 +130,7 @@ public class SmdBoxController { ...@@ -130,7 +130,7 @@ public class SmdBoxController {
dto.setName(storage.getName()); dto.setName(storage.getName());
dto.setId(storage.getId()); dto.setId(storage.getId());
dto.setCid(storage.getCid()); dto.setCid(storage.getCid());
Collection<DataLog> queueTasks = taskService.getQueueTasks(cid); Collection<DataLog> queueTasks = taskService.getQueueTasks(theCid);
if (queueTasks != null){ if (queueTasks != null){
dto.setTaskList((List<DataLog>) queueTasks); dto.setTaskList((List<DataLog>) queueTasks);
} else { } else {
......
...@@ -60,8 +60,9 @@ public class StatusBean { ...@@ -60,8 +60,9 @@ public class StatusBean {
// UNLOADING=出库中; // UNLOADING=出库中;
// NEED_EMPTY=需要空料串出库; // NEED_EMPTY=需要空料串出库;
// EMPTY_OUT=空料串需要取走 // EMPTY_OUT=空料串需要取走
// FULL_OUT=满料串需要取走 // FULL_OUT=满料串需要取走
//料串类型 shelfType smallReel, bigReel, tray //料串类型 shelfType smallReel, bigReel, tray
//需求单号:hSerial 出库中需要上传工单号
private Map<String, String> data = new HashMap<>(); private Map<String, String> data = new HashMap<>();
/** /**
......
...@@ -10,6 +10,7 @@ import com.neotel.smfcore.core.device.enums.OP_STATUS; ...@@ -10,6 +10,7 @@ import com.neotel.smfcore.core.device.enums.OP_STATUS;
import com.neotel.smfcore.core.storage.enums.DeviceType; 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.service.po.DataLog; import com.neotel.smfcore.core.system.service.po.DataLog;
import com.neotel.smfcore.core.system.util.DevicesStatusUtil;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
...@@ -49,7 +50,9 @@ public class XLRBoxHandler extends BaseDeviceHandler { ...@@ -49,7 +50,9 @@ public class XLRBoxHandler extends BaseDeviceHandler {
//查看是否有要出库的操作 //查看是否有要出库的操作
statusBean =taskService.checkOut(storage, statusBean); statusBean =taskService.checkOut(storage, statusBean);
} }
//获取操作
Map<String, String> opMap = DevicesStatusUtil.getAndRemoveOp(cid);
statusBean.putOp(opMap);
return statusBean; return statusBean;
} }
......
...@@ -107,6 +107,10 @@ public class DeviceController { ...@@ -107,6 +107,10 @@ public class DeviceController {
return null; return null;
} }
try { try {
String appendCid=statusBean.getFromData("appendCid");
if(ObjectUtil.isNotEmpty(appendCid)){
statusBean.setAppendCid(appendCid);
}
//判断是否需要更改附属CID //判断是否需要更改附属CID
if(ObjectUtil.isNotEmpty(statusBean.getAppendCid())){ if(ObjectUtil.isNotEmpty(statusBean.getAppendCid())){
boolean needsave=false; boolean needsave=false;
......
...@@ -87,24 +87,6 @@ public class MSDController { ...@@ -87,24 +87,6 @@ public class MSDController {
@GetMapping("/settings") @GetMapping("/settings")
@PreAuthorize("@el.check('msd')") @PreAuthorize("@el.check('msd')")
public MSDSettiingsDto getSysSettings() { public MSDSettiingsDto getSysSettings() {
// MSDSettiings msdSettiings = dataCache.getCache(Constants.CACHE_msdSetting);
// if(msdSettiings==null){
// msdSettiings=new MSDSettiings() ;
// String[] levels=new String[]{"1","2","2a","3","4","5","5a","6"};
// List<MSLSetInfo> list=new ArrayList<>();
// for (String level :
// levels) {
// MSLSetInfo setInfo=new MSLSetInfo() ;
// setInfo.setMsl(level);
// setInfo.setThickness("1");
// setInfo.setTimeHour(48);
// list.add(setInfo);
//
// }
// msdSettiings.setMslSetList(list);
// dataCache.updateCache(Constants.CACHE_msdSetting, msdSettiings);
// log.info("默认MSD:CACHE_msdSetting=" + msdSettiings.toString());
// }
MSDSettiings msdSettiings=getSetting(); MSDSettiings msdSettiings=getSetting();
MSDSettiingsDto dto = msdSettingsMapper.toDto(msdSettiings); MSDSettiingsDto dto = msdSettingsMapper.toDto(msdSettiings);
return dto; return dto;
......
...@@ -268,6 +268,9 @@ public class Storage extends BasePo implements Serializable { ...@@ -268,6 +268,9 @@ public class Storage extends BasePo implements Serializable {
this.emptySlots = this.emptySlots + 1; this.emptySlots = this.emptySlots + 1;
int usedCount = usageItem.getUsedCount(); int usedCount = usageItem.getUsedCount();
usageItem.setUsedCount(usedCount - 1); usageItem.setUsedCount(usedCount - 1);
if(usageItem.getUsedCount()<0){
usageItem.setUsedCount(0);
}
usageMap.put(sizeStr, usageItem); usageMap.put(sizeStr, usageItem);
} }
} }
......
...@@ -46,6 +46,8 @@ public class DuoController { ...@@ -46,6 +46,8 @@ public class DuoController {
Map<String, BoxStatusBean> boxStatusMap = statusBean.getBoxStatus(); Map<String, BoxStatusBean> boxStatusMap = statusBean.getBoxStatus();
int status = -1; int status = -1;
String shelfS = statusBean.getData().getOrDefault("shelfState", "OFFLINE"); String shelfS = statusBean.getData().getOrDefault("shelfState", "OFFLINE");
String hserial = statusBean.getData().getOrDefault("hSerial", "");
String shelfType = statusBean.getData().getOrDefault("shelfType", "");
if (boxStatusMap != null) { if (boxStatusMap != null) {
BoxStatusBean boxStatusBean = boxStatusMap.get("1"); BoxStatusBean boxStatusBean = boxStatusMap.get("1");
if (boxStatusBean != null) { if (boxStatusBean != null) {
...@@ -53,10 +55,8 @@ public class DuoController { ...@@ -53,10 +55,8 @@ public class DuoController {
} }
} }
int storageStatus = status;
if (status == StorageConstants.STATUS.OFFLINE || statusBean.timeOut()) { if (status == StorageConstants.STATUS.OFFLINE || statusBean.timeOut()) {
//离线 //离线
storageStatus = -1;
shelfS = "OFFLINE"; shelfS = "OFFLINE";
} }
String msg = statusBean.getMsg(); String msg = statusBean.getMsg();
...@@ -64,18 +64,17 @@ public class DuoController { ...@@ -64,18 +64,17 @@ public class DuoController {
Map<String, Object> itemMap = new HashMap<>(); Map<String, Object> itemMap = new HashMap<>();
itemMap.put("cid", storage.getCid()); itemMap.put("cid", storage.getCid());
Map<String, UsageItem> usageMap = storage.getUsageMap(); // Map<String, UsageItem> usageMap = storage.getUsageMap();
List<String> reelSize = new ArrayList<>(); // List<String> reelSize = new ArrayList<>();
for (UsageItem usageItem : usageMap.values()) { // for (UsageItem usageItem : usageMap.values()) {
String sizeStr = usageItem.getSizeStr(); // String sizeStr = usageItem.getSizeStr();
reelSize.add(sizeStr); // reelSize.add(sizeStr);
} // }
String s = StringUtil.join(reelSize.toArray(), ","); String reelSize = shelfType.replace("smallReel", "7").replace("bigReel", "15");
String s = StringUtil.join(reelSize);
itemMap.put("reelSize", s); itemMap.put("reelSize", s);
itemMap.put("status", shelfS); itemMap.put("status", shelfS);
itemMap.put("hSerial", hserial);
//查找料仓正在出库中的任务
itemMap.put("hSerial", "");
results.add(itemMap); results.add(itemMap);
} }
return ResultBean.newOkResult(results); return ResultBean.newOkResult(results);
......
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!