Commit de730ae0 LN

库位增加设备名称

1 个父辈 15cd16b5
......@@ -12,6 +12,7 @@ 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.StoragePos;
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;
......@@ -56,6 +57,10 @@ public class MimoBoxHandler extends BaseDeviceHandler {
statusBean =taskService.checkOut(storage, statusBean);
}
//获取操作
Map<String, String> opMap = DevicesStatusUtil.getAndRemoveOp(cid);
statusBean.addOp(opMap);
return statusBean;
}
@Override
......
......@@ -102,8 +102,8 @@ public class XLCBoxHandler extends BaseDeviceHandler {
}
// if(list.size()<=0) {
// Random r = new Random();
// int num = r.nextInt(10) ;
// if(num>=3){
// int num = Integer.parseInt( pos.getId())%5+1;
//// if(num>=3){
// for (int i = 1; i <= num; i++) {
// XLCPosBarcodeDto dto1 = toPosBarcodeDto(pos.getBarcode());
// dto1.setBarcode(i * 1111 + "-" + dto1.getBarcode());
......@@ -111,7 +111,7 @@ public class XLCBoxHandler extends BaseDeviceHandler {
// dto1.setAmount(i * 1111);
// list.add(dto1);
// }
// }
//// }
// }
XLCPosBarcodeDto barcodeDto = toPosBarcodeDto(pos.getBarcode());
......
......@@ -46,6 +46,7 @@ import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.util.ObjectUtils;
import org.springframework.web.bind.annotation.*;
import javax.servlet.http.HttpServletRequest;
import java.util.*;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
......@@ -254,6 +255,21 @@ public class BoxKanbanController {
return dto;
}
@ApiOperation("保存界面的一些操作")
@PutMapping("/saveOp")
@PreAuthorize("@el.check('storagePos:edit')")
public ResultBean saveOp(@RequestBody Map<String,String> params) {
String cid = params.get("cid");
if(!Strings.isNullOrEmpty(cid)){
String opKey = params.get("opKey");
String opValue = params.get("opValue");
log.info("界面执行操作:" + opKey +"=" + opValue);
DevicesStatusUtil.addOp(cid,opKey,opValue);
return ResultBean.newOkResult("smfcore.msg.ok","操作成功","");
}
return ResultBean.newOkResult("smfcore.msg.noCid","操作失败,未找到cid","");
}
@ApiOperation("获取料架库位报警列表")
@GetMapping("/shelfPosErrors")
@PreAuthorize("@el.check('boxkanban:list')")
......
......@@ -92,6 +92,12 @@ public class StoragePosController {
PageData<StoragePos> pages = storagePosManager.findByPage(query, pageable);
List<StoragePosDto> StoragePosDtos = storagePosMapper.toDto(pages.getContent());
for (int i=0;i<StoragePosDtos.size();i++){
Storage storage=dataCache.getStorageById(StoragePosDtos.get(i).getStorageId());
if(storage!=null){
StoragePosDtos.get(i).setStorageName(storage.getName());
}
}
return new PageData(StoragePosDtos, pages.getTotalElements());
}
......
......@@ -69,5 +69,7 @@ public class StoragePosDto implements Serializable {
private String temperature="";
@ApiModelProperty("设备名称")
private String storageName;
}
......@@ -168,3 +168,5 @@ smfcore.internet=\u7269\u8054\u7F51
smfcore.materialBox.qtyError=\u8BF7\u8F93\u5165\u6B63\u786E\u7684\u6570\u91CF
smfcore.posOutput=\u5E93\u4F4D\u51FA\u5E93
smfcore.posOutput.noFile=\u8BF7\u5148\u4E0A\u4F20\u51FA\u5E93\u6587\u4EF6
smfcore.msg.ok=\u64CD\u4F5C\u6210\u529F
smfcore.msg.noCid=\u64CD\u4F5C\u5931\u8D25\uFF0C\u672A\u627E\u5230cid
......@@ -166,4 +166,6 @@ smfcore.inventory=Inventory
smfcore.barcodes=MA.ID
smfcore.internet=Connectivity
smfcore.posOutput=Position Checkout
smfcore.posOutput.noFile=Please upload the file first
\ No newline at end of file
smfcore.posOutput.noFile=Please upload the file first
smfcore.msg.ok=Operation successful
smfcore.msg.noCid=Operation failed, cid not found
\ No newline at end of file
......@@ -166,4 +166,6 @@ smfcore.inventory=\u30A4\u30F3\u30D9\u30F3\u30C8\u30EA\u30FC
smfcore.barcodes=\u30D0\u30FC\u30B3\u30FC\u30C9
smfcore.internet=\u9023\u7D50\u6027
smfcore.posOutput=\u30B9\u30C8\u30EC\u30FC\u30B8\u306E\u53D6\u308A\u51FA\u3057
smfcore.posOutput.noFile=\u307E\u305A\u306F\u30D5\u30A1\u30A4\u30EB\u3092\u30A2\u30C3\u30D7\u30ED\u30FC\u30C9\u3057\u3066\u304F\u3060\u3055\u3044
\ No newline at end of file
smfcore.posOutput.noFile=\u307E\u305A\u306F\u30D5\u30A1\u30A4\u30EB\u3092\u30A2\u30C3\u30D7\u30ED\u30FC\u30C9\u3057\u3066\u304F\u3060\u3055\u3044
smfcore.msg.ok=\u52D5\u4F5C\u78BA\u8A8D\u6E08\u307F
smfcore.msg.noCid=\u64CD\u4F5C\u306B\u5931\u6557\u3057\u307E\u3057\u305F\u3001cid\u304C\u898B\u3064\u304B\u308A\u307E\u305B\u3093
\ No newline at end of file
......@@ -166,4 +166,6 @@ smfcore.inventory=\u5E93\u5B58
smfcore.barcodes=\u6761\u5F62\u7801
smfcore.internet=\u7269\u8054\u7F51
smfcore.posOutput=\u5E93\u4F4D\u51FA\u5E93
smfcore.posOutput.noFile=\u8BF7\u5148\u4E0A\u4F20\u51FA\u5E93\u6587\u4EF6
\ No newline at end of file
smfcore.posOutput.noFile=\u8BF7\u5148\u4E0A\u4F20\u51FA\u5E93\u6587\u4EF6
smfcore.msg.ok=\u64CD\u4F5C\u6210\u529F
smfcore.msg.noCid=\u64CD\u4F5C\u5931\u8D25\uFF0C\u672A\u627E\u5230cid
\ No newline at end of file
......@@ -166,4 +166,6 @@ smfcore.inventory=\u5EAB\u5B58
smfcore.barcodes=\u689D\u5F62\u78BC
smfcore.internet=\u7269\u806F\u7DB2
smfcore.posOutput=\u5EAB\u4F4D\u51FA\u5EAB
smfcore.posOutput.noFile=\u8ACB\u5148\u4E0A\u50B3\u51FA\u5EAB\u6587\u4EF6
\ No newline at end of file
smfcore.posOutput.noFile=\u8ACB\u5148\u4E0A\u50B3\u51FA\u5EAB\u6587\u4EF6
smfcore.msg.ok=\u64CD\u4F5C\u6210\u529F
smfcore.msg.noCid=\u64CD\u4F5C\u5931\u6557\uFF0C\u672A\u627E\u5230cid
\ No newline at end of file
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!