Commit 43764ab6 sunke

呆滞料提示

库存接口返回LOC为线别信息
1 个父辈 64f6829b
...@@ -26,7 +26,7 @@ public enum Authority implements GrantedAuthority { ...@@ -26,7 +26,7 @@ public enum Authority implements GrantedAuthority {
//用户管理 //用户管理
ROLE_MANAGE_USER("authority.user.manage", 6), ROLE_MANAGE_USER("authority.user.manage", 6),
//角色管理 //角色管理
ROLE_MANAGE_ROLE("authority.role.manage", 7), // ROLE_MANAGE_ROLE("authority.role.manage", 7),
//出库 //出库
ROLE_MANAGE_STACK_OUT("authority.stockOut",8), ROLE_MANAGE_STACK_OUT("authority.stockOut",8),
//入库 //入库
......
...@@ -11,6 +11,16 @@ import java.util.Date; ...@@ -11,6 +11,16 @@ import java.util.Date;
public class RemainingTime { public class RemainingTime {
/** /**
* GUID
*/
private String guid;
/**
* 是否忽略报警
*/
private boolean ignoreAlarm = false;
/**
* 产线编号 * 产线编号
*/ */
private int lineNo; private int lineNo;
...@@ -261,4 +271,20 @@ public class RemainingTime { ...@@ -261,4 +271,20 @@ public class RemainingTime {
public void setLockPos(StoragePos lockPos) { public void setLockPos(StoragePos lockPos) {
this.lockPos = lockPos; this.lockPos = lockPos;
} }
public String getGuid() {
return guid;
}
public void setGuid(String guid) {
this.guid = guid;
}
public boolean isIgnoreAlarm() {
return ignoreAlarm;
}
public void setIgnoreAlarm(boolean ignoreAlarm) {
this.ignoreAlarm = ignoreAlarm;
}
} }
\ No newline at end of file \ No newline at end of file
...@@ -22,6 +22,16 @@ public class StoragePosFindCriteria extends BaseSearchCriteria { ...@@ -22,6 +22,16 @@ public class StoragePosFindCriteria extends BaseSearchCriteria {
*/ */
private String barcode; private String barcode;
private String storageId;
public String getStorageId() {
return storageId;
}
public void setStorageId(String storageId) {
this.storageId = storageId;
}
public String getBarcode() { public String getBarcode() {
return barcode; return barcode;
} }
......
...@@ -298,7 +298,7 @@ public class Storage extends BaseMongoBean { ...@@ -298,7 +298,7 @@ public class Storage extends BaseMongoBean {
} }
} }
}else{ }else{
return true; return false;
} }
return false; return false;
} }
......
...@@ -324,9 +324,9 @@ public class StoragePosManagerImpl implements IStoragePosManager { ...@@ -324,9 +324,9 @@ public class StoragePosManagerImpl implements IStoragePosManager {
@Override @Override
public List<StoragePos> findInaction(List<String> storageIds, int day, Collection<String> excludePosIds, int count){ public List<StoragePos> findInaction(List<String> storageIds, int day, Collection<String> excludePosIds, int count){
Date date = DateUtils.addDays(new Date(), -day);//几天前 Date date = DateUtils.addDays(new Date(), -day);//几天前
Criteria c = Criteria.where("updateDate").lte(date) Criteria c = Criteria.where("barcode.putInTime").lte(date)
.and("barcode").exists(true) .and("barcode").exists(true)
.and("barcode.lockId").is(null)//没有被锁定的仓位 //.and("barcode.lockId").is(null)//没有被锁定的仓位
.and("id").nin(excludePosIds); .and("id").nin(excludePosIds);
if(storageIds != null && !storageIds.isEmpty()){ if(storageIds != null && !storageIds.isEmpty()){
......
...@@ -385,7 +385,18 @@ public class BarcodeRule { ...@@ -385,7 +385,18 @@ public class BarcodeRule {
// String str = "3SS191908055X1Z"; // String str = "3SS191908055X1Z";
// System.out.println(str.substring(str.length() - 13)); // System.out.println(str.substring(str.length() - 13));
String memo = "2=2=yellow;1=1=green;statusLight=10=30"; String memo = "1=1=yellow;2=2=green;statusLight=10=30";
if(!Strings.isNullOrEmpty(memo)){
String[] lineInfos = memo.split(";");
for(String lineInfo : lineInfos){
if(!Strings.isNullOrEmpty(lineInfo)){
String[] lightInfos = lineInfo.split("=");
if("statusLight".equalsIgnoreCase(lightInfos[0])){
System.out.println(Integer.valueOf(lightInfos[2]));
}
}
}
}
} }
} }
...@@ -4,6 +4,7 @@ import com.google.common.base.Strings; ...@@ -4,6 +4,7 @@ import com.google.common.base.Strings;
import com.myproject.bean.search.BaseSearchCriteria; import com.myproject.bean.search.BaseSearchCriteria;
import com.myproject.bean.search.PageList; import com.myproject.bean.search.PageList;
import com.myproject.bean.search.StoragePosFindCriteria; import com.myproject.bean.search.StoragePosFindCriteria;
import com.myproject.bean.update.Storage;
import com.myproject.exception.ValidateException; import com.myproject.exception.ValidateException;
import com.myproject.manager.IStoragePosManager; import com.myproject.manager.IStoragePosManager;
import com.myproject.util.DateUtil; import com.myproject.util.DateUtil;
...@@ -22,7 +23,10 @@ import org.springframework.web.bind.annotation.RequestMethod; ...@@ -22,7 +23,10 @@ import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody; import org.springframework.web.bind.annotation.ResponseBody;
import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletRequest;
import java.util.ArrayList;
import java.util.Comparator;
import java.util.Date; import java.util.Date;
import java.util.List;
import java.util.regex.Pattern; import java.util.regex.Pattern;
/** /**
...@@ -50,6 +54,16 @@ public class StoragePosFindController extends BaseSearchController { ...@@ -50,6 +54,16 @@ public class StoragePosFindController extends BaseSearchController {
baseCriteria.and("used").is(true); baseCriteria.and("used").is(true);
baseCriteria.and("barcode.barcode").exists(true); baseCriteria.and("barcode.barcode").exists(true);
List<Storage> storages = new ArrayList<>(dataCache.getAllStorage().values());
storages.sort(new Comparator<Storage>() {
@Override
public int compare(Storage o1, Storage o2) {
return o1.getCid().compareTo(o2.getCid());
}
});
request.setAttribute("allStorage",storages);
String providerNumber = searchCriteria.getProviderNumber(); String providerNumber = searchCriteria.getProviderNumber();
if(!Strings.isNullOrEmpty(providerNumber)){ if(!Strings.isNullOrEmpty(providerNumber)){
Pattern pattern = Pattern.compile(providerNumber, Pattern.CASE_INSENSITIVE); Pattern pattern = Pattern.compile(providerNumber, Pattern.CASE_INSENSITIVE);
...@@ -75,6 +89,11 @@ public class StoragePosFindController extends BaseSearchController { ...@@ -75,6 +89,11 @@ public class StoragePosFindController extends BaseSearchController {
baseCriteria.and("barcode.partNumber").regex(pattern); baseCriteria.and("barcode.partNumber").regex(pattern);
} }
String storageId = searchCriteria.getStorageId();
if(!Strings.isNullOrEmpty(storageId)){
baseCriteria.and("storageId").is(storageId);
}
String memo = request.getParameter("memo"); String memo = request.getParameter("memo");
...@@ -98,7 +117,7 @@ public class StoragePosFindController extends BaseSearchController { ...@@ -98,7 +117,7 @@ public class StoragePosFindController extends BaseSearchController {
if(inactionDay > 0){ if(inactionDay > 0){
Date inactionDate = DateUtil.addDays(new Date(), -inactionDay); Date inactionDate = DateUtil.addDays(new Date(), -inactionDay);
request.setAttribute("inactionDate",inactionDate); request.setAttribute("inactionTime",inactionDate.getTime());
} }
......
...@@ -185,7 +185,7 @@ public class SzShelfController extends BaseController { ...@@ -185,7 +185,7 @@ public class SzShelfController extends BaseController {
log.info("物料[ "+reelId+" ]有接料信息"+splice.getKey()+",但还在库存中,直接从["+pos.getPosName()+"]出库"); log.info("物料[ "+reelId+" ]有接料信息"+splice.getKey()+",但还在库存中,直接从["+pos.getPosName()+"]出库");
taskService.addTaskToFinished(pos,null,splice.getLineNo()+"-Splice"); taskService.addTaskToFinished(pos,null,splice.getLineNo()+"-Splice");
}else{ }else{
//log.info("未找到接料信息息"+splice.getKey()+"对应的料物:" + splice.getReelbar()); log.info("未找到接料信息息"+splice.getKey()+"对应的料物:" + splice.getReelbar());
} }
} }
...@@ -198,9 +198,12 @@ public class SzShelfController extends BaseController { ...@@ -198,9 +198,12 @@ public class SzShelfController extends BaseController {
for (RemainingTime newRemainingTime : remainingTimeList) { for (RemainingTime newRemainingTime : remainingTimeList) {
int remainMinute = newRemainingTime.getRemainingTime(); int remainMinute = newRemainingTime.getRemainingTime();
if(remainMinute > 0 ){ if(remainMinute > 0 ){
RemainingTime existRemainingTime = showMap.get(newRemainingTime.getKey()); RemainingTime existRemainingTime = showMap.get(newRemainingTime.getGuid());
if (existRemainingTime == null) { if (existRemainingTime == null) {
log.info("加载到新的发料数据[" + newRemainingTime.getKey() + "] tableNo="+newRemainingTime.getTableNo()+" 剩余时间" + newRemainingTime.getRemainingTime()); log.info("加载到新的发料数据[" + newRemainingTime.getKey() + "] tableNo="+newRemainingTime.getTableNo()+" 剩余时间" + newRemainingTime.getRemainingTime());
}else{
boolean ignoreAlam = existRemainingTime.isIgnoreAlarm();
newRemainingTime.setIgnoreAlarm(ignoreAlam);
} }
//只要查询到的且在30 分钟以内,进行亮灯 //只要查询到的且在30 分钟以内,进行亮灯
...@@ -214,8 +217,12 @@ public class SzShelfController extends BaseController { ...@@ -214,8 +217,12 @@ public class SzShelfController extends BaseController {
// continue; // continue;
// } // }
// } // }
//判断是否已经接料,如果 //判断是否已经接料,如果
int yellowLightMinute = storage.getYellowLightMinute(); int yellowLightMinute = storage.getYellowLightMinute();
if(storage.getCid().equals("1")){
log.debug("SMS Line 01 & 02 yellowMinute:"+ yellowLightMinute + " remainMinute:"+ remainMinute + " Red:" + storage.getRedLightMiniute());
}
if (remainMinute <= yellowLightMinute) { if (remainMinute <= yellowLightMinute) {
//小于30 分钟,需要亮黄灯 //小于30 分钟,需要亮黄灯
statusLightColor = "yellow"; statusLightColor = "yellow";
...@@ -248,14 +255,14 @@ public class SzShelfController extends BaseController { ...@@ -248,14 +255,14 @@ public class SzShelfController extends BaseController {
barcode.setLockName(newRemainingTime.getKey()); barcode.setLockName(newRemainingTime.getKey());
lockPos.setBarcode(barcode); lockPos.setBarcode(barcode);
log.info("锁定库位"+lockPos.getPosName()+"["+ barcode.getBarcode()+ "] " + barcode.getPartNumber() + " LineInfo:"+lineInfoStr); log.info("锁定库位"+lockPos.getPosName()+"["+ barcode.getBarcode()+ "] " + barcode.getPartNumber() + " LineInfo:"+lineInfoStr);
storagePosManager.save(lockPos); lockPos = storagePosManager.save(lockPos);
//锁定成功,亮灯 //锁定成功,亮灯
} catch (Exception e) { } catch (Exception e) {
} }
} else { } else {
//料架上无料,无法锁定 //料架上无料,无法锁定
log.debug("料架["+storage.getName()+"]未查找到 " + newRemainingTime.getKey() +"的物料");
} }
} else { } else {
//已经锁定,亮灯 //已经锁定,亮灯
...@@ -298,8 +305,8 @@ public class SzShelfController extends BaseController { ...@@ -298,8 +305,8 @@ public class SzShelfController extends BaseController {
} }
String key = newRemainingTime.getKey(); String guid = newRemainingTime.getGuid();
newMap.put(key, newRemainingTime); newMap.put(guid, newRemainingTime);
} }
return newMap; return newMap;
} }
...@@ -444,8 +451,10 @@ public class SzShelfController extends BaseController { ...@@ -444,8 +451,10 @@ public class SzShelfController extends BaseController {
list.add(remainingTime); list.add(remainingTime);
//} //}
//没有需要物料时,灯塔要红色闪烁 //没有需要物料时,灯塔要红色闪烁
if(remainingTime.getColorClass().equalsIgnoreCase("red") && remainingTime.getLockPos() == null){ if(!remainingTime.isIgnoreAlarm()){
statusLightTwinkle = true; if(remainingTime.getColorClass().equalsIgnoreCase("red")){
statusLightTwinkle = true;
}
} }
} }
...@@ -465,6 +474,18 @@ public class SzShelfController extends BaseController { ...@@ -465,6 +474,18 @@ public class SzShelfController extends BaseController {
return list; return list;
} }
@RequestMapping("/service/store/accshelf/checkAuthCode")
@ResponseBody
public String checkAuthCode(HttpServletRequest request){
String opUser = request.getParameter("opUser");
User user = userManager.findByAuthCode(opUser);
if(user == null){
return getText("shelf.msg.noPermission",request.getLocale(),"无权执行此操作");
}
return "";
}
/** /**
* 查找下一个空位,并且点亮灯 * 查找下一个空位,并且点亮灯
*/ */
...@@ -648,7 +669,7 @@ public class SzShelfController extends BaseController { ...@@ -648,7 +669,7 @@ public class SzShelfController extends BaseController {
Map<String,String> allLines = storage.getShowLines(); Map<String,String> allLines = storage.getShowLines();
for (String lineInfo : allLines.keySet()) { for (String lineInfo : allLines.keySet()) {
//未包含 //未包含
if(lineInfo.startsWith(ecall.getSmtLineNo())){ if(lineInfo.startsWith(ecall.getSmtLineNo()+"-")){
lineInfoStr = lineInfo; lineInfoStr = lineInfo;
break; break;
} }
...@@ -656,7 +677,7 @@ public class SzShelfController extends BaseController { ...@@ -656,7 +677,7 @@ public class SzShelfController extends BaseController {
//线别信息不一致 //线别信息不一致
if(Strings.isNullOrEmpty(lineInfoStr)){ if(Strings.isNullOrEmpty(lineInfoStr)){
log.error("["+packageId+"]线别信息与配置不一致"); log.error("["+packageId+"]线别信息与配置不一致");
return "n"+getText("shelf.msg.errorLine",new String[]{ecall.getSmtLineNo()}, request.getLocale(),"该物料是"+ecall.getSmtLineNo()+"物料,如确认入库请选择对应线别"); return "n"+getText("shelf.msg.erroLine",new String[]{ecall.getSmtLineNo()}, request.getLocale(),"该物料是"+ecall.getSmtLineNo()+"物料,如确认入库请选择对应线别");
} }
} }
}else{ }else{
...@@ -731,4 +752,46 @@ public class SzShelfController extends BaseController { ...@@ -731,4 +752,46 @@ public class SzShelfController extends BaseController {
return ""; return "";
} }
@RequestMapping("/service/store/clearInactionPos")
@ResponseBody
public String clearInactionPos(HttpServletRequest request) {
String pids = request.getParameter("pids");
for(String pid : pids.split(";")){
StoragePos pos = storagePosManager.get(pid);
if(pos != null && pos.getBarcode() != null){
try {
String opUser = StorageDataController.getLoginUsername();
log.info(opUser + "清理库位["+pos.getPosName()+"]");
taskService.addTaskToFinished(pos,null,opUser+"-clear");
} catch (Exception e) {
return e.getMessage();
}
}
}
return "";
}
@RequestMapping("/service/store/ignoreAlarm")
@ResponseBody
public String ignoreAlarm(HttpServletRequest request) {
String guid = request.getParameter("guid");
RemainingTime remainingTime = showMap.get(guid);
if(remainingTime != null){
remainingTime.setIgnoreAlarm(true);
showMap.put(guid,remainingTime);
log.info("忽略发料数据["+remainingTime.getKey()+"]的报警");
return "";
}else{
log.warn("忽略发料数据["+guid+"]的报警时,未找到对应的发料数据");
return "未找到["+guid+"]对应的发料数据";
}
}
@RequestMapping("/service/store/testNet")
@ResponseBody
public String testNet(HttpServletRequest request) {
return "OK";
}
} }
...@@ -164,7 +164,8 @@ public class MesApiController extends BaseController { ...@@ -164,7 +164,8 @@ public class MesApiController extends BaseController {
item.put("RI",barcode.getBarcode()); item.put("RI",barcode.getBarcode());
item.put("PN",barcode.getPartNumber()); item.put("PN",barcode.getPartNumber());
item.put("QTY",barcode.getAmount()); item.put("QTY",barcode.getAmount());
item.put("LOC", pos.getStorageId()); String location = "line"+barcode.getLineInfoStr() + "-" + pos.getPosName();
item.put("LOC", location);
Date inDate = barcode.getPutInDate(); Date inDate = barcode.getPutInDate();
String inDateStr = DateUtil.toDateString(inDate, "yyyy-MM-dd HH:mm:ss"); String inDateStr = DateUtil.toDateString(inDate, "yyyy-MM-dd HH:mm:ss");
item.put("INTIME",inDateStr); item.put("INTIME",inDateStr);
......
...@@ -628,7 +628,7 @@ ...@@ -628,7 +628,7 @@
$("#partNumber").val(data.barcode.partNumber); $("#partNumber").val(data.barcode.partNumber);
$("#batch").val(data.barcode.batch); $("#batch").val(data.barcode.batch);
$("#amount").val(data.barcode.amount); $("#amount").val(data.barcode.amount);
$("#provider").val(data.barcode.providerNumber); $("#provider").val(data.barcode.provider);
} }
}); });
}) })
......
...@@ -63,14 +63,14 @@ ...@@ -63,14 +63,14 @@
</div> </div>
</security:authorize> </security:authorize>
<%--<security:authorize ifAnyGranted="ROLE_MANAGE_DATALOG">--%> <security:authorize ifAnyGranted="ROLE_MANAGE_STACK_OUT">
<div class="col-md-2 col-xs-2 menuItem"> <div class="col-md-2 col-xs-2 menuItem">
<a href="${ctx}/dataLog/search.html"> <a href="${ctx}/dataLog/search.html">
<img src="${ctx}/images/menu/1.png" class="menuImg"/> <img src="${ctx}/images/menu/1.png" class="menuImg"/>
<div><fmt:message key="menu.bigdata"/></div> <div><fmt:message key="menu.bigdata"/></div>
</a> </a>
</div> </div>
<%--</security:authorize>--%> </security:authorize>
<security:authorize ifAnyGranted="ROLE_MANAGE_USER,ROLE_MANAGE_ROLE"> <security:authorize ifAnyGranted="ROLE_MANAGE_USER,ROLE_MANAGE_ROLE">
<div class="col-md-2 col-xs-2 menuItem"> <div class="col-md-2 col-xs-2 menuItem">
......
...@@ -107,6 +107,7 @@ ...@@ -107,6 +107,7 @@
</tr> </tr>
</thead> </thead>
<tbody class="dataTable"> <tbody class="dataTable">
</tbody> </tbody>
</table> </table>
</div> </div>
...@@ -206,21 +207,20 @@ ...@@ -206,21 +207,20 @@
<div class="modal-content"> <div class="modal-content">
<div class="modal-header"> <div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button> <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
<h4 class="modal-title" style="font-weight: 500;"><fmt:message key="shelf.employeeNo"/></h4> <h4 class="modal-title" style="font-weight: 500;"><fmt:message key="shelf.employeeNo"/><span id="authErrorMsg" style="font-weight: 500;color:red;"></span></h4>
</div> </div>
<div class="modal-body"> <div class="modal-body">
<div class="row"> <div class="row">
<div class="input-group"> <div class="input-group">
<input type="text" class="form-control" id="opUser" /> <input type="text" class="form-control" id="opUser" />
</div> </div>
</div> </div>
</div> </div>
<div class="modal-footer"> <div class="modal-footer">
<div> <div>
<%--<a href="" class="btn yellow left" id="findAndOut"><i class="fa fa-sign-out"></i><fmt:message key="allBoxView.findAndOut"/></a>--%> <%--<a href="" class="btn yellow left" id="findAndOut"><i class="fa fa-sign-out"></i><fmt:message key="allBoxView.findAndOut"/></a>--%>
<button type="button" class="btn green" onclick="opUserOk();"> <button type="button" class="btn green" onclick="opUserOk();" >
<fmt:message key="button.ok"/></button> <fmt:message key="button.ok"/></button>
<button type="button" data-dismiss="modal" class="btn default" id="cancelAuthBtn"><fmt:message key="button.cancel"/></button> <button type="button" data-dismiss="modal" class="btn default" id="cancelAuthBtn"><fmt:message key="button.cancel"/></button>
</div> </div>
...@@ -299,10 +299,12 @@ ...@@ -299,10 +299,12 @@
setInterval(function(){ setInterval(function(){
if($('#allPartNumbers').is(':visible')) { if($('#allPartNumbers').is(':visible')) {
$("#opUserConfirm").modal("hide");
if($("#searchPn_keyboard").is(':visible')){ if($("#searchPn_keyboard").is(':visible')){
$("#searchPn_keyboard input").focus(); $("#searchPn_keyboard input").focus();
}else{ }else{
$("#searchPn").focus(); $("#searchPn").focus();
FilterPnItems();
} }
}else if($("#opUserConfirm").is(':visible')){ }else if($("#opUserConfirm").is(':visible')){
if($("#opUser_keyboard").is(':visible')){ if($("#opUser_keyboard").is(':visible')){
...@@ -331,6 +333,7 @@ ...@@ -331,6 +333,7 @@
showPartNumbers = function(){ showPartNumbers = function(){
$("#opUser").val(""); $("#opUser").val("");
$("#authErrorMsg").text("");
$("#opUserConfirm").modal("show"); $("#opUserConfirm").modal("show");
<%--var findAndOutHref = '${ctx}/component/storagePosFind.html';--%> <%--var findAndOutHref = '${ctx}/component/storagePosFind.html';--%>
...@@ -340,14 +343,23 @@ ...@@ -340,14 +343,23 @@
opUserOk = function(type){ opUserOk = function(type){
var opUser = $("#opUser").val(); var opUser = $("#opUser").val();
$("#opUserConfirm").modal("hide");
if(opUser != ""){ if(opUser != ""){
$("#searchPn").val(""); $.post("${ctx}/service/store/accshelf/checkAuthCode", {opUser: opUser}, function (data) {
$.post("${ctx}/service/store/storageTypeInventory", {type: type, cid: '${show}'}, function (data) { if(data == ""){
pageIndex = -1; $("#opUserConfirm").attr("style","z-index:100000");
partNumberItems = data; $("#opUserConfirm").modal("hide");
nextPage(); $("#opUserConfirm").attr("style","");
}).error(function(){showMsg("request inventory error");}); $("#searchPn").val("");
$.post("${ctx}/service/store/storageTypeInventory", {type: type, cid: '${show}'}, function (data) {
pageIndex = -1;
partNumberItems = data;
nextPage();
}).error(function(){showMsg("request inventory error");});
}else{
$("#authErrorMsg").text(data);
}
}).error(function(){showMsg("request check user error");});
} }
} }
...@@ -461,12 +473,18 @@ ...@@ -461,12 +473,18 @@
$.post("${ctx}/service/store/accshelf/checkOut", {pn: partnumber, cid: '${show}',opUser:opUser}, function (data) { $.post("${ctx}/service/store/accshelf/checkOut", {pn: partnumber, cid: '${show}',opUser:opUser}, function (data) {
$("#allPartNumbers").modal("hide"); $("#allPartNumbers").modal("hide");
showMsg(data); showMsg(data);
waitting();
}).error(function(){showMsg("check out request error");}); }).error(function(){showMsg("check out request error");});
} }
$(".dataTable").html(""); $(".dataTable").html("");
closeVolume = function(guid){
$.post("${ctx}/service/store/ignoreAlarm", {guid: guid}, function (data) {
$("#allPartNumbers").modal("hide");
showMsg(data);
}).error(function(){showMsg("ignore alarm request error");});
}
var rows = {}; var rows = {};
flushTable = function(){ flushTable = function(){
...@@ -478,6 +496,7 @@ ...@@ -478,6 +496,7 @@
$(".dataTable").html(""); $(".dataTable").html("");
var newRows = []; var newRows = [];
//data = [{"key":"12-160023-0-8909000864","tableNo":2,"lineNo":12,"colorClass":"red","shelfLoc":"1-1-2","status":1,"guid":"ABCDEF"}];
for(var item in data) { for(var item in data) {
var remainingTime = data[item]; var remainingTime = data[item];
var key = remainingTime.key; var key = remainingTime.key;
...@@ -542,6 +561,12 @@ ...@@ -542,6 +561,12 @@
subSlotLabel = "${subslot_1}"; subSlotLabel = "${subslot_1}";
} }
if(trColor == 'red' || tdColor == 'red'){
if(!remainingTime.ignoreAlarm){
var guid = remainingTime.guid;
shelfLoc = shelfLoc + "<span class='icon-volume-off right' onclick='closeVolume(\""+guid+"\");'></span>";
}
}
var trLine = $("#"+key); var trLine = $("#"+key);
var tdStr = var tdStr =
...@@ -581,14 +606,17 @@ ...@@ -581,14 +606,17 @@
var inactionAlarmWindow; var inactionAlarmWindow;
flushInactionAlarm = function(){ flushInactionAlarm = function(){
$.post("${ctx}/service/store/inactionAlarmMsg", {cid: '${show}'}, function (data) { $.post("${ctx}/service/store/inactionAlarmMsg", {cid: '${show}'}, function (data) {
inactionAlarmWindow = showAlarmWindow(inactionAlarmWindow,"${inactionAlarmTitle}",data); var position = "bottom left";
inactionAlarmWindow = showAlarmWindow(position, inactionAlarmWindow,"${inactionAlarmTitle}",data);
}); });
}; };
function showAlarmWindow(alarmWindow, title, msg){
function showAlarmWindow(position, alarmWindow, title, msg){
var windowOptions = { var windowOptions = {
delay: false, delay: false,
position: 'bottom left', position: position,
closeOnClick: false, closeOnClick: false,
sound: false, sound: false,
title: title, title: title,
...@@ -608,13 +636,60 @@ ...@@ -608,13 +636,60 @@
windowOptions.msg = msg; windowOptions.msg = msg;
alarmWindow =Lobibox.notify('warning', windowOptions); alarmWindow =Lobibox.notify('warning', windowOptions);
}else{ }else{
alarmWindow.$el.find(".lobibox-notify-msg").html(msg);
//if(alarmWindow.$el){
alarmWindow.$el.find(".lobibox-notify-msg").html(msg);
//}
} }
} }
return alarmWindow; return alarmWindow;
} }
setInterval(function(){ setInterval(function(){
testNet();
flushTable();
flushInactionAlarm();
}, 1000);
var netErrorWindow;
testNet = function(){
var ajaxTimeoutTest = $.ajax({
url:'${ctx}/service/store/testNet', //请求的URL
timeout : 200, //超时时间设置,单位毫秒
type : 'get', //请求方式,get或post
data :{}, //请求所传参数,json格式
dataType:'json',//返回的数据格式
success:function(data){ //请求成功的回调函数
var position = "top left";
netErrorWindow = showAlarmWindow(position, netErrorWindow,"","");
},
error: function(XMLHttpRequest, textStatus, errorThrown) {
var position = "top left";
netErrorWindow = showAlarmWindow(position, netErrorWindow,"Network Error","Request error");
},
complete : function(XMLHttpRequest,status){ //请求完成后最终执行参数
if(status=='timeout'){//超时,status还有success,error等值的情况
ajaxTimeoutTest.abort();
var position = "top left";
netErrorWindow = showAlarmWindow(position, netErrorWindow,"Network Error","Request time out");
}
}
});
}
setInterval(function(){
flushTable(); flushTable();
flushInactionAlarm(); flushInactionAlarm();
}, 1000); }, 1000);
......
...@@ -147,7 +147,7 @@ ...@@ -147,7 +147,7 @@
<c:when test="${storage.shelf || storage.cabinet || storage.accShelf}"> <c:when test="${storage.shelf || storage.cabinet || storage.accShelf}">
<%--智能料架--%> <%--智能料架--%>
<div class="portlet-title"> <div class="portlet-title">
<div style="text-align:center;font-size: 28px;"><a style="color:#FFFFFF;" href="${detailUrl}" target="_blank">${storage.name}</a></div> <div style="text-align:center;font-size: 28px;"><a style="color:#FFFFFF;" href="${detailUrl}">${storage.name}</a></div>
</div> </div>
<div class="portlet-body"> <div class="portlet-body">
<div class="task-content"> <div class="task-content">
......
...@@ -50,9 +50,7 @@ ...@@ -50,9 +50,7 @@
<display:column property="name" escapeXml="true" titleKey="storage.name"/> <display:column property="name" escapeXml="true" titleKey="storage.name"/>
<%--<display:column titleKey="storage.boxCount" property="boxCount"/>--%> <%--<display:column titleKey="storage.boxCount" property="boxCount"/>--%>
<display:column titleKey="storage.slotAmount"> <display:column property="lightMemo" escapeXml="true" titleKey="Line"/>
${storage.totalSlots}
</display:column>
<display:setProperty name="paging.banner.items_name"><fmt:message <display:setProperty name="paging.banner.items_name"><fmt:message
key="storage.item.name"/></display:setProperty> key="storage.item.name"/></display:setProperty>
<display:column titleKey=""> <display:column titleKey="">
......
...@@ -353,7 +353,7 @@ ...@@ -353,7 +353,7 @@
<th style="width:15%;"><fmt:message key="barcode.barcode"/></th> <th style="width:15%;"><fmt:message key="barcode.barcode"/></th>
<th><fmt:message key="Line"/></th> <th><fmt:message key="Line"/></th>
<th><fmt:message key="barcode.amount"/></th> <th><fmt:message key="barcode.amount"/></th>
<th></th> <%--<th></th>--%>
</tr> </tr>
</thead> </thead>
<tbody> <tbody>
...@@ -410,11 +410,11 @@ ...@@ -410,11 +410,11 @@
<td class="posInfo${slot.id}"> <td class="posInfo${slot.id}">
<c:out value="${slot.barcode.amount}"/> <c:out value="${slot.barcode.amount}"/>
</td> </td>
<td> <%--<td>--%>
<button class="btn yellow" id="btn${slot.id}" <%--<button class="btn yellow" id="btn${slot.id}"--%>
onclick="checkoutStorage('${slot.id}')"> <%--onclick="checkoutStorage('${slot.id}')">--%>
<i class="fa fa-sign-out"></i><fmt:message key="button.checkout"/></button> <%--<i class="fa fa-sign-out"></i><fmt:message key="button.checkout"/></button>--%>
</td> <%--</td>--%>
</tr> </tr>
</c:forEach> </c:forEach>
...@@ -468,7 +468,7 @@ ...@@ -468,7 +468,7 @@
if(window.confirm('${clearMsg}')){ if(window.confirm('${clearMsg}')){
$("tr[id]").each(function(){ $("tr[id]").each(function(){
var posId = $(this).attr("id"); var posId = $(this).attr("id");
$.post("${ctx}/service/store/clearPos", {pid: posId}, function (data) { $.post("${ctx}/service/store/clearInactionPos", {pids: posId}, function (data) {
if(data == ''){ if(data == ''){
$(".posInfo"+posId).html(""); $(".posInfo"+posId).html("");
} }
...@@ -486,7 +486,7 @@ ...@@ -486,7 +486,7 @@
} }
function clearPos(posId){ function clearPos(posId){
$.post("${ctx}/service/store/clearPos", {pid: posId}, function (data) { $.post("${ctx}/service/store/clearInactionPos", {pids: posId}, function (data) {
if(data != ''){ if(data != ''){
alert(data); alert(data);
}else{ }else{
......
...@@ -24,11 +24,11 @@ ...@@ -24,11 +24,11 @@
<intercept-url pattern="/app/userform**" access="ROLE_DEFAULT"/> <intercept-url pattern="/app/userform**" access="ROLE_DEFAULT"/>
<intercept-url pattern="/app/updatePassword**" access="ROLE_DEFAULT"/> <intercept-url pattern="/app/updatePassword**" access="ROLE_DEFAULT"/>
<intercept-url pattern="/app/storage/**" access="ROLE_DEFAULT"/> <intercept-url pattern="/app/storage/**" access="ROLE_DEFAULT"/>
<intercept-url pattern="/app/user/role*" access="ROLE_MANAGE_ROLE"/> <intercept-url pattern="/app/user/role*" access="ROLE_MANAGE_ROLE,ROLE_MANAGE_USER"/>
<intercept-url pattern="/app/user/user*" access="ROLE_MANAGE_USER"/> <intercept-url pattern="/app/user/user*" access="ROLE_MANAGE_USER,ROLE_MANAGE_USER"/>
<intercept-url pattern="/app/dataLog/*" access="ROLE_MANAGE_COMPONENT"/> <intercept-url pattern="/app/dataLog/*" access="ROLE_MANAGE_STACK_OUT"/>
<intercept-url pattern="/app/barcode/*" access="ROLE_MANAGE_BARCODE"/> <intercept-url pattern="/app/barcode/*" access="ROLE_MANAGE_BARCODE"/>
<intercept-url pattern="/app/system/*" access="ROLE_MANAGE_ROLE"/> <intercept-url pattern="/app/system/*" access="ROLE_MANAGE_ROLE,ROLE_MANAGE_USER"/>
<intercept-url pattern="/app/component/component*" access="ROLE_MANAGE_COMPONENT"/> <intercept-url pattern="/app/component/component*" access="ROLE_MANAGE_COMPONENT"/>
<intercept-url pattern="/app/component/bom*" access="ROLE_MANAGE_BOM"/> <intercept-url pattern="/app/component/bom*" access="ROLE_MANAGE_BOM"/>
<intercept-url pattern="/app/component/storagePosFind*" access="ROLE_MANAGE_STACK_OUT"/> <intercept-url pattern="/app/component/storagePosFind*" access="ROLE_MANAGE_STACK_OUT"/>
......
...@@ -100,13 +100,13 @@ ...@@ -100,13 +100,13 @@
<%--Data--%> <%--Data--%>
<security:authorize ifAnyGranted="ROLE_MANAGE_DATALOG"> <security:authorize ifAnyGranted="ROLE_MANAGE_DATALOG,ROLE_MANAGE_STACK_OUT">
<ul class="hor-menu-data nav navbar-nav hide"> <ul class="hor-menu-data nav navbar-nav hide">
<%--<li class="classic-menu-dropdown">--%> <li class="classic-menu-dropdown">
<%--<a href="${ctx}/system/runStatus.html" name="data">--%> <a href="${ctx}/system/runStatus.html" name="data">
<%--<fmt:message key="menu.bigdata.runStatus" /><span class="selected"></span>--%> <fmt:message key="menu.bigdata.runStatus" /><span class="selected"></span>
<%--</a>--%> </a>
<%--</li>--%> </li>
<%--<li class="classic-menu-dropdown">--%> <%--<li class="classic-menu-dropdown">--%>
<%--<a href="${ctx}/system/dataReport.html" name="data">--%> <%--<a href="${ctx}/system/dataReport.html" name="data">--%>
...@@ -134,7 +134,7 @@ ...@@ -134,7 +134,7 @@
</a> </a>
</li> </li>
<security:authorize ifAnyGranted="ROLE_MANAGE_USER"> <security:authorize ifAnyGranted="ROLE_MANAGE_USER,ROLE_MANAGE_ROLE">
<li class="classic-menu-dropdown"> <li class="classic-menu-dropdown">
<a href="${ctx}/user/roleSearch.html" name="system"> <a href="${ctx}/user/roleSearch.html" name="system">
<fmt:message key="menu.user.role"/><span class="selected"></span> <fmt:message key="menu.user.role"/><span class="selected"></span>
...@@ -142,7 +142,7 @@ ...@@ -142,7 +142,7 @@
</li> </li>
</security:authorize> </security:authorize>
<security:authorize ifAnyGranted="ROLE_MANAGE_ROLE"> <security:authorize ifAnyGranted="ROLE_MANAGE_ROLE,ROLE_MANAGE_USER">
<li class="classic-menu-dropdown"> <li class="classic-menu-dropdown">
<a href="${ctx}/system/settings.html" name="system"> <a href="${ctx}/system/settings.html" name="system">
<fmt:message key="menu.system.settings"/><span class="selected"></span> <fmt:message key="menu.system.settings"/><span class="selected"></span>
...@@ -151,7 +151,7 @@ ...@@ -151,7 +151,7 @@
</security:authorize> </security:authorize>
<security:authorize ifAnyGranted="ROLE_MANAGE_ROLE"> <security:authorize ifAnyGranted="ROLE_MANAGE_ROLE,ROLE_MANAGE_USER">
<li class="classic-menu-dropdown"> <li class="classic-menu-dropdown">
<a href="${ctx}/system/storageSearch.html" name="system"> <a href="${ctx}/system/storageSearch.html" name="system">
<fmt:message key="menu.cloud.storage"/><span class="selected"></span> <fmt:message key="menu.cloud.storage"/><span class="selected"></span>
......
...@@ -96,8 +96,8 @@ ...@@ -96,8 +96,8 @@
<div class="page-header-inner"> <div class="page-header-inner">
<!-- BEGIN LOGO --> <!-- BEGIN LOGO -->
<div class="page-logo"> <div class="page-logo">
<div style="color:white;font-size:35px;"> <div style="color:white;font-size:35px;width:300px;">
${storage.name} <a href="${ctx}/homeMenu.html">${storage.name}</a>
</div> </div>
</div> </div>
</div> </div>
......
...@@ -101,7 +101,7 @@ ...@@ -101,7 +101,7 @@
<script src="${ctx}/assets/jqkeyboard/jquery-ui-custom.min.js" type="text/javascript"></script> <script src="${ctx}/assets/jqkeyboard/jquery-ui-custom.min.js" type="text/javascript"></script>
<script src="${ctx}/assets/jqkeyboard/jquery.keyboard.js?id=1" type="text/javascript"></script> <script src="${ctx}/assets/jqkeyboard/jquery.keyboard.js?id=10" type="text/javascript"></script>
<!-- END PAGE LEVEL SCRIPTS --> <!-- END PAGE LEVEL SCRIPTS -->
<script> <script>
......
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!