Commit 6f3812f7 孙克
2 个父辈 4051b347 ebdea481
......@@ -351,7 +351,7 @@ public class SmdBoxMimoController {
int allCount = inTask + outTask;
BoxStatusDto boxDto = new BoxStatusDto(storage.getId(), storage.getName(), storage.getCid(), false, 0,
"0", "0","0","", "", allCount, inTask, outTask,
0, "", "", "", "", "",storage.getType(),storage.getUsageMap(),new HashMap<>(),storage.getInListName(),"","","","");
0, "", "", "", "", "",storage.getType(),storage.getUsageMap(),new HashMap<>(),storage.getInListName(),"","","","","","");
//获取设备状态,设置状态和当前任务信息
StatusBean bean = DevicesStatusUtil.getStatusBean(storage.getCid());
......
......@@ -73,6 +73,14 @@ public class BoxStatusBean {
* 冷藏区湿度
*/
public String humidity2 ;
/**
* 冷藏区温度3
*/
public String temperature3 ;
/**
* 冷藏区湿度3
*/
public String humidity3 ;
/**
* 回温区温度
......
......@@ -973,6 +973,13 @@ public class BaseDeviceHandler implements IDeviceHandler {
if(ObjectUtil.isNotEmpty(boxStatus.getHumidity2())){
humiture.setHumidity2(boxStatus.getHumidity2());
}
if(ObjectUtil.isNotEmpty(boxStatus.getTemperature3())){
humiture.setTemperature3(boxStatus.getTemperature3());
}
if(ObjectUtil.isNotEmpty(boxStatus.getHumidity3())){
humiture.setHumidity3(boxStatus.getHumidity3());
}
try {
humitureManager.save(humiture);
statusBean.setLastSaveTime(System.currentTimeMillis());
......
......@@ -424,7 +424,7 @@ public class BoxKanbanController {
int allCount = inTask + outTask;
BoxStatusDto boxDto = new BoxStatusDto(storage.getId(), storage.getName(), storage.getCid(), false, 0,
"0", "0", "0","", "", allCount, inTask, outTask,
0, "", "", "", "", "", storage.getType(), storage.getUsageMap(), new HashMap<>(), storage.getInListName(),"","","","");
0, "", "", "", "", "", storage.getType(), storage.getUsageMap(), new HashMap<>(), storage.getInListName(),"","","","","","");
//获取设备状态,设置状态和当前任务信息
StatusBean bean = DevicesStatusUtil.getStatusBean(storage.getCid());
......
......@@ -89,8 +89,12 @@ public class BoxStatusDto {
@ApiModelProperty("冷藏区温度2")
public String temperature2 ;
@ApiModelProperty("冷藏区湿度")
@ApiModelProperty("冷藏区湿度2")
public String humidity2 ;
@ApiModelProperty("冷藏区温度3")
public String temperature3 ;
@ApiModelProperty("冷藏区湿度3")
public String humidity3 ;
@ApiModelProperty("回温区温度")
public String wTemp ;
@ApiModelProperty("回温区湿度")
......@@ -108,5 +112,8 @@ public class BoxStatusDto {
setTemperature2(boxStatus.getTemperature2());
setHumidity2(boxStatus.getHumidity2());
setTemperature3(boxStatus.getTemperature3());
setHumidity3(boxStatus.getHumidity3());
}
}
......@@ -16,7 +16,11 @@ public enum COMPATIBLE_TYPE {
/**
* 同尺寸兼容
*/
SIZE_COMPATIBLE("storage.match.sizeCompatible");
SIZE_COMPATIBLE("storage.match.sizeCompatible"),
/**
* 13/15寸兼容
*/
W13_15_COMPATIBLE("storage.match.w13_15Compatible");
COMPATIBLE_TYPE(String key) {
......
......@@ -75,9 +75,14 @@ public class StoragePosManagerImpl implements IStoragePosManager {
private List<InventoryItem> lockInventory(int type,String... storageIds){
//被锁定的仓位
//TODO:这里还需要去掉被指定批次锁定的,因为出错,暂时不加了..
Criteria c = Criteria.where("barcode").exists(true).and("storageId").in(storageIds)
.andOperator(Criteria.where("canCheckOutTime").gt(System.currentTimeMillis()));
// //TODO:这里还需要去掉被指定批次锁定的,因为出错,暂时不加了..
// Criteria c = Criteria.where("barcode").exists(true).and("storageId").in(storageIds)
// .andOperator(Criteria.where("canCheckOutTime").gt(System.currentTimeMillis()));
Criteria newC = Criteria.where("barcode.lockId").exists(true).ne("");
Criteria c = Criteria.where("barcode").exists(true)
.and("storageId").in(storageIds)
// .andOperator(Criteria.where("canCheckOutTime").gt(System.currentTimeMillis()))
.andOperator(newC);
if(type != -1){
c = c.and("barcode.type").is(type);
}
......@@ -412,6 +417,13 @@ public class StoragePosManagerImpl implements IStoragePosManager {
c = c.and("w").gte(barcode.getPlateSize()).and("h").gte(barcode.getHeight());//宽度大于等于料盘宽度,高度大于等于料盘高度
}else if(compatibleType == COMPATIBLE_TYPE.SIZE_COMPATIBLE){//同尺寸兼容
c = c.and("w").is(barcode.getPlateSize()).and("h").gte(barcode.getHeight());//宽度等于料盘宽度,高度大于等于料盘高度
}else if(compatibleType==COMPATIBLE_TYPE.W13_15_COMPATIBLE){
//13/15寸兼容,如果是13寸盘,可以放15寸,其他按照同尺寸兼容
if(barcode.getPlateSize()==13){
c = c.and("w").in(barcode.getPlateSize(),15).and("h").gte(barcode.getHeight());
}else{
c = c.and("w").is(barcode.getPlateSize()).and("h").gte(barcode.getHeight());//宽度等于料盘宽度,高度大于等于料盘高度
}
}
c = c.and("enabled").is(true)//可用
......@@ -449,6 +461,13 @@ public class StoragePosManagerImpl implements IStoragePosManager {
} else if (compatibleType == COMPATIBLE_TYPE.SIZE_COMPATIBLE) {//同尺寸兼容
c = c.and("w").is(barcode.getPlateSize()).and("h").gte(barcode.getHeight());//宽度等于料盘宽度,高度大于等于料盘高度
}else if(compatibleType==COMPATIBLE_TYPE.W13_15_COMPATIBLE){
//13/15寸兼容,如果是13寸盘,可以放15寸,其他按照同尺寸兼容
if(barcode.getPlateSize()==13){
c = c.and("w").in(barcode.getPlateSize(),15).and("h").gte(barcode.getHeight());
}else{
c = c.and("w").is(barcode.getPlateSize()).and("h").gte(barcode.getHeight());//宽度等于料盘宽度,高度大于等于料盘高度
}
}
c = c.and("enabled").is(true)//可用
......@@ -492,6 +511,13 @@ public class StoragePosManagerImpl implements IStoragePosManager {
} else if (compatibleType == COMPATIBLE_TYPE.SIZE_COMPATIBLE) {//同尺寸兼容
c = c.and("w").is(size).and("h").gte(height);//宽度等于料盘宽度,高度大于等于料盘高度
}else if(compatibleType==COMPATIBLE_TYPE.W13_15_COMPATIBLE) {
//13/15寸兼容,如果是13寸盘,可以放15寸,其他同尺寸兼容
if (size == 13) {
c = c.and("w").in(size, 15).and("h").gte(height);
} else {
c = c.and("w").is(size).and("h").gte(height);//宽度等于料盘宽度,高度大于等于料盘高度
}
}
c = c.and("enabled").is(true)//可用
......@@ -557,7 +583,7 @@ public class StoragePosManagerImpl implements IStoragePosManager {
@Override
public void clearLockPos(String lockId) {
Query query = new Query( Criteria.where("barcode.lockId").is(lockId));
storagePosDao.updateMulti(query, Update.update("barcode.lockId",""));
storagePosDao.updateMulti(query, Update.update("barcode.lockId",null));
}
......@@ -576,6 +602,13 @@ public class StoragePosManagerImpl implements IStoragePosManager {
} else if (compatibleType == COMPATIBLE_TYPE.SIZE_COMPATIBLE) {//同尺寸兼容
c = c.and("w").is(currentPos.getW()).and("h").gte(currentPos.getH());//宽度等于料盘宽度,高度大于等于料盘高度
}else if(compatibleType==COMPATIBLE_TYPE.W13_15_COMPATIBLE) {
//13/15寸兼容,如果是13寸盘,可以放15寸,其他同尺寸兼容
if (currentPos.getW() == 13) {
c = c.and("w").in(currentPos.getW(), 15).and("h").gte(currentPos.getH());
} else {
c = c.and("w").is(currentPos.getW()).and("h").gte(currentPos.getH());//宽度等于料盘宽度,高度大于等于料盘高度
}
}
c = c.and("enabled").is(true)//可用
......
......@@ -231,6 +231,15 @@ public class Storage extends BasePo implements Serializable {
if(w == PosW && h <= posH){
return true;
}
}else if(compatibleType==COMPATIBLE_TYPE.W13_15_COMPATIBLE) {
//13,15寸兼容
if (w == 13) {
if ((w == PosW || 15 == PosW) && h <= posH) {
return true;
}
} else if(w == PosW && h <= posH){//默认同尺寸兼容
return true;
}
}
return false;
}
......
......@@ -45,6 +45,14 @@ public class Humiture extends BasePo implements Serializable {
public String humidity2="" ;
/**
* 冷藏区温度3
*/
public String temperature3="" ;
/**
* 冷藏区湿度3
*/
public String humidity3="" ;
/**
* 回温区温度
*/
public String wTemp="";
......
......@@ -117,12 +117,12 @@ public class EquipStatusUtil {
if (data == null || data.size() <= 0) {
//默认查找cid_1的视频
String nCid = cid + "_2";
data = dataMap.getOrDefault(cid, new HashMap<>());
data = dataMap.getOrDefault(nCid, new HashMap<>());
}
if (data == null || data.size() <= 0) {
//默认查找cid_1的视频
String nCid = cid + "_1";
data = dataMap.getOrDefault(cid, new HashMap<>());
data = dataMap.getOrDefault(nCid, new HashMap<>());
}
return data;
}
......
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!