Commit fefb6495 LN

duo界面调试修改

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