Commit bc28cc51 sunke

查找出库页面增加权限

不按库位顺序入库问题修正
增加删除料架所有库位链接
换型时不关闭库位问题修正
1 个父辈 e4b1e93e
此文件类型无法预览
...@@ -50,6 +50,9 @@ public enum Authority implements GrantedAuthority { ...@@ -50,6 +50,9 @@ public enum Authority implements GrantedAuthority {
//超额入库 //超额入库
// ROLE_MORE_STACK_IN("authority.stockIn.more",16), // ROLE_MORE_STACK_IN("authority.stockIn.more",16),
//出库
ROLE_FIND_OUT("authority.findOUt",17),
; ;
private String key; private String key;
private int index; private int index;
......
...@@ -113,7 +113,23 @@ public class StoragePosManagerImpl implements IStoragePosManager { ...@@ -113,7 +113,23 @@ public class StoragePosManagerImpl implements IStoragePosManager {
for(StoragePos pos : posList){ for(StoragePos pos : posList){
posMap.put(pos.getPosName(),pos); posMap.put(pos.getPosName(),pos);
} }
Set<String> posNames = posMap.keySet(); List<String> posNames = new ArrayList<>(posMap.keySet());
posNames.sort(new Comparator<String>() {
@Override
public int compare(String o1, String o2) {
String[] locInfo1 = o1.split("_");
String[] locInfo2 = o2.split("_");
String row1 = locInfo1[1];
String row2 = locInfo2[1];
if(row1.equals(row2)){
Integer col1 = Integer.valueOf(locInfo1[2]);
Integer col2 = Integer.valueOf(locInfo2[2]);
return col1.compareTo(col2);
}else{
return row1.compareTo(row2);
}
}
});
for (String posName : posNames) { for (String posName : posNames) {
StoragePos currentPos = posMap.get(posName); StoragePos currentPos = posMap.get(posName);
int totalHeight = currentPos.getH(); int totalHeight = currentPos.getH();
......
...@@ -48,6 +48,15 @@ public class StoragePosUpdateController extends BaseUpdateController { ...@@ -48,6 +48,15 @@ public class StoragePosUpdateController extends BaseUpdateController {
return storagePos; return storagePos;
} }
@RequestMapping("/storage/removeAllPos")
@ResponseBody
public String resolveBarcodeData(HttpServletRequest request) {
String cid = request.getParameter("cid");
log.info("开始删除["+cid+"] 所有位置");
storagePosManager.clearPos(dataCache.getStorage(cid).getId());
return "["+cid+"] 的库位删除完成";
}
// //
// @RequestMapping("/storage/resolveBarcodeData") // @RequestMapping("/storage/resolveBarcodeData")
// @ResponseBody // @ResponseBody
......
...@@ -169,7 +169,8 @@ public class SzShelfController extends BaseController { ...@@ -169,7 +169,8 @@ public class SzShelfController extends BaseController {
log.info("查找到接料信息:"+ splice.getKey() + " ,灭灯["+lockPos.getPosName()+"], 接料 Reelbar:" + splice.getReelbar()+ " 出库条码:"+ lockBarcode); log.info("查找到接料信息:"+ splice.getKey() + " ,灭灯["+lockPos.getPosName()+"], 接料 Reelbar:" + splice.getReelbar()+ " 出库条码:"+ lockBarcode);
//灭灯 //灭灯
Storage storage = dataCache.getStorageById(lockPos.getStorageId()); Storage storage = dataCache.getStorageById(lockPos.getStorageId());
closeLight(storage, lockPos.getPosName()); //closeLight(storage, lockPos.getPosName());
opPosLight("close",storage,lockPos,"");
taskService.addTaskToFinished(lockPos,null,splice.getLineNo()+"-op"); taskService.addTaskToFinished(lockPos,null,splice.getLineNo()+"-op");
return; return;
...@@ -317,8 +318,8 @@ public class SzShelfController extends BaseController { ...@@ -317,8 +318,8 @@ public class SzShelfController extends BaseController {
for(String key : keys){ for(String key : keys){
if(newMap.get(key) == null){ if(newMap.get(key) == null){
//换型或者已经接过料 //换型或者已经接过料
//RemainingTime r = showMap.get(key); RemainingTime oldRemainingTime = showMap.get(key);
List<StoragePos> lockPoses = storagePosManager.findLockPos(key); List<StoragePos> lockPoses = storagePosManager.findLockPos(oldRemainingTime.getKey());
if (lockPoses.isEmpty()) { if (lockPoses.isEmpty()) {
//未锁定是已经接过料了的 //未锁定是已经接过料了的
}else{ }else{
...@@ -332,10 +333,11 @@ public class SzShelfController extends BaseController { ...@@ -332,10 +333,11 @@ public class SzShelfController extends BaseController {
pos.setBarcode(barcode); pos.setBarcode(barcode);
storagePosManager.save(pos); storagePosManager.save(pos);
}catch (Exception e){ }catch (Exception e){
log.error("换型解除绑定时出错",e);
} }
log.info("发料信息:"+ key + " 已不存在,灭灯["+pos.getPosName()+"]"); log.info("发料信息:"+ key + " 已不存在,灭灯["+pos.getPosName()+"]");
closeLight(storage,pos.getPosName()); //closeLight(storage,pos.getPosName());
opPosLight("close",storage,pos,"");
} }
} }
} }
...@@ -628,7 +630,8 @@ public class SzShelfController extends BaseController { ...@@ -628,7 +630,8 @@ public class SzShelfController extends BaseController {
Storage storage = dataCache.getStorage(cid); Storage storage = dataCache.getStorage(cid);
if(lastPutinPos != null){ if(lastPutinPos != null){
log.info("["+cid+"]扫码时关闭上一个库位:"+ lastPutinPos.getPosName()); log.info("["+cid+"]扫码时关闭上一个库位:"+ lastPutinPos.getPosName());
closeLight(storage,lastPutinPos.getPosName()); //closeLight(storage,lastPutinPos.getPosName());
opPosLight("close",storage,lastPutinPos,"");
} }
if(!Strings.isNullOrEmpty(code)){ if(!Strings.isNullOrEmpty(code)){
code = code.replace("。","."); code = code.replace("。",".");
......
...@@ -214,6 +214,7 @@ authority.virtual=Virtual Materail Management ...@@ -214,6 +214,7 @@ authority.virtual=Virtual Materail Management
authority.feeder.view=Work Order View authority.feeder.view=Work Order View
authority.valuable.out=Precious Material Retrieval authority.valuable.out=Precious Material Retrieval
authority.dataLog=Running Info. authority.dataLog=Running Info.
authority.findOUt=Find & Out
error.save=Error occurred,please try again. error.save=Error occurred,please try again.
......
...@@ -215,6 +215,7 @@ authority.feeder.view=Work Order View ...@@ -215,6 +215,7 @@ authority.feeder.view=Work Order View
authority.valuable.out=Precious Material Retrieval authority.valuable.out=Precious Material Retrieval
authority.dataLog=Running Info. authority.dataLog=Running Info.
authority.findOUt=Find & Out
error.save=Error occurred,please try again. error.save=Error occurred,please try again.
role.search.subtitle=Role List role.search.subtitle=Role List
......
...@@ -215,6 +215,7 @@ authority.feeder.view=\u5DE5\u5355\u67E5\u770B ...@@ -215,6 +215,7 @@ authority.feeder.view=\u5DE5\u5355\u67E5\u770B
authority.valuable.out=\u8D35\u91CD\u7269\u6599\u51FA\u5E93 authority.valuable.out=\u8D35\u91CD\u7269\u6599\u51FA\u5E93
authority.dataLog=\u8FD0\u884C\u6570\u636E authority.dataLog=\u8FD0\u884C\u6570\u636E
authority.findOUt=\u67E5\u627E\u51FA\u5E93
error.save=\u4FDD\u5B58\u51FA\u9519,\u8BF7\u68C0\u67E5 error.save=\u4FDD\u5B58\u51FA\u9519,\u8BF7\u68C0\u67E5
role.search.subtitle=\u89D2\u8272\u5217\u8868 role.search.subtitle=\u89D2\u8272\u5217\u8868
......
...@@ -14,7 +14,7 @@ ...@@ -14,7 +14,7 @@
<!-- BEGIN EXAMPLE TABLE PORTLET--> <!-- BEGIN EXAMPLE TABLE PORTLET-->
<div class="portlet box blue"> <div class="portlet box blue">
<div class="portlet-title"> <div class="portlet-title">
<div class="caption">s <div class="caption">
<i class="fa fa-list-alt"></i><fmt:message key="dataLog.search.subtitle"/> <i class="fa fa-list-alt"></i><fmt:message key="dataLog.search.subtitle"/>
</div> </div>
</div> </div>
......
...@@ -37,7 +37,7 @@ ...@@ -37,7 +37,7 @@
</a> </a>
</div> </div>
</security:authorize> </security:authorize>
<security:authorize ifAnyGranted="ROLE_MANAGE_STACK_OUT, ROLE_MANAGE_FEEDER"> <security:authorize ifAnyGranted="ROLE_FIND_OUT">
<div class="col-md-2 col-xs-2 menuItem"> <div class="col-md-2 col-xs-2 menuItem">
<a href="${ctx}/component/storagePosFind.html"> <a href="${ctx}/component/storagePosFind.html">
<img src="${ctx}/images/menu/5.png" class="menuImg"/> <img src="${ctx}/images/menu/5.png" class="menuImg"/>
......
...@@ -103,7 +103,7 @@ ...@@ -103,7 +103,7 @@
</div> </div>
</div> </div>
<div class="portlet-body"> <div class="portlet-body">
<div class="table-scrollable" style="height:440px;"> <div class="table-scrollable" style="height:430px;">
<table class="table table-striped table-hover table-bordered no-footer" role="grid" aria-describedby="sample_editable_1_info"> <table class="table table-striped table-hover table-bordered no-footer" role="grid" aria-describedby="sample_editable_1_info">
<thead> <thead>
<tr role="row"> <tr role="row">
......
...@@ -332,7 +332,7 @@ ...@@ -332,7 +332,7 @@
</div> </div>
<div class="actions"> <div class="actions">
<a href="#" class="btn btn-default btn-sm" onclick="clearAllPos();"><fmt:message key="storage.clearAllPos"/></a> <a href="#" class="btn btn-default btn-sm" onclick="clearAllPos();"><fmt:message key="storage.clearAllPos"/></a>
<a href="#" class="btn btn-default btn-sm" onclick="sendToMiniStock();"><fmt:message key="一键Ministock"/></a> <a href="#" class="btn btn-default btn-sm" onclick="sendToMiniStock();" id="miniStockBtn"><fmt:message key="一键Ministock"/></a>
</div> </div>
</div> </div>
<div class="portlet-body"> <div class="portlet-body">
...@@ -478,9 +478,12 @@ ...@@ -478,9 +478,12 @@
} }
function sendToMiniStock(){ function sendToMiniStock(){
if(window.confirm('确定要一键发送到MiniStock 吗?')){ if(window.confirm('确定要一键发送到MiniStock 吗?')){
$("#miniStockBtn").attr("disabled",true);
$.post("${ctx}/service/store/accshelf/toMinistock", {cid: '${storage.cid}'}, function (data) { $.post("${ctx}/service/store/accshelf/toMinistock", {cid: '${storage.cid}'}, function (data) {
alert(data); alert(data);
$("#miniStockBtn").attr("disabled",false);
}); });
} }
} }
......
...@@ -259,6 +259,7 @@ ...@@ -259,6 +259,7 @@
<div class="page-footer-inner"> <div class="page-footer-inner">
2016&copy; SMD BOX 2016&copy; SMD BOX
</div> </div>
<span class="right" style="color: #a3a3a3;">Version: 1.6.1009</span>
<div class="scroll-to-top"> <div class="scroll-to-top">
<i class="icon-arrow-up"></i> <i class="icon-arrow-up"></i>
</div> </div>
......
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!