Commit 92ee3ce0 sunke

呆滞料提示

库存接口返回LOC为线别信息
提示库位时,只显示后面两部分
1 个父辈 43764ab6
......@@ -56,6 +56,18 @@ public class StoragePos extends BaseMongoBean {
}
/**
* 去除第一位,只显示库位的后面两部分
*/
public String getShortPosName(){
String shortPosName = posName;
int index = shortPosName.indexOf("_");
if(index > 0){
shortPosName = posName.substring(index+1);
}
return shortPosName;
}
/**
* 并联的其他库位,合并入主库位的库位
*/
private List<String> mergePosList;
......
......@@ -344,8 +344,8 @@ public class StoragePosManagerImpl implements IStoragePosManager {
@Override
public int countInaction(List<String> storageIds, int day, Collection<String> excludePosIds){
Date date = DateUtils.addDays(new Date(), -day);//几天前
Criteria c = Criteria.where("updateDate").lte(date)
.and("barcode").exists(true)
Criteria c = Criteria.where("barcode.putInTime").lte(date.getTime())
//.and("barcode").exists(true)
.and("barcode.lockId").is(null)//没有被锁定的仓位
.and("id").nin(excludePosIds);
......
......@@ -52,7 +52,7 @@ public class StoragePosFindController extends BaseSearchController {
String name = searchCriteria.getName();
Criteria baseCriteria = new Criteria();
baseCriteria.and("used").is(true);
baseCriteria.and("barcode.barcode").exists(true);
baseCriteria.and("barcode.posName").exists(true);
List<Storage> storages = new ArrayList<>(dataCache.getAllStorage().values());
storages.sort(new Comparator<Storage>() {
......
......@@ -220,9 +220,6 @@ public class SzShelfController extends BaseController {
//判断是否已经接料,如果
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) {
//小于30 分钟,需要亮黄灯
statusLightColor = "yellow";
......@@ -530,7 +527,7 @@ public class SzShelfController extends BaseController {
taskService.addTaskToFinished(pos,null,opUser);
return "OK"+getText("shelf.msg.outOk",new String[]{pos.getPosName()},request.getLocale(),"操作成功,请从库位["+pos.getPosName()+"]中取出物料");
return "OK"+getText("shelf.msg.outOk",new String[]{pos.getShortPosName()},request.getLocale(),"操作成功,请从库位["+pos.getPosName()+"]中取出物料");
}else{
return getText("shelf.msg.outError",request.getLocale(),"操作失败,未找到可以出库的物料");
}
......@@ -650,7 +647,7 @@ public class SzShelfController extends BaseController {
}
posName = posName.substring(1);
}
return getText("shelf.msg.alreadyInPos",new String[]{posName},request.getLocale(),"该物料已在库位["+posName+"]中");
return getText("shelf.msg.alreadyInPos",new String[]{inPos.getShortPosName()},request.getLocale(),"该物料已在库位["+posName+"]中");
}
String putInColor = "red";
......@@ -705,7 +702,7 @@ public class SzShelfController extends BaseController {
openAndCloseLights(storage,Lists.<String>newArrayList(pos.getPosName()),delayCloseTime,putInColor);
lastPutinPosMap.put(cid,pos);
pos.setCanCheckOutTime(System.currentTimeMillis() + delayCloseTime);
return "OK"+getText("shelf.msg.inOk",new String[]{pos.getPosName()},request.getLocale(),"操作成功,请放入库位["+pos.getPosName()+"]");
return "OK"+getText("shelf.msg.inOk",new String[]{pos.getShortPosName()},request.getLocale(),"操作成功,请放入库位["+pos.getPosName()+"]");
}else{
//库位没找到,查找同尺寸空的库位进行合并
......@@ -733,7 +730,7 @@ public class SzShelfController extends BaseController {
log.info(barcode.getPartNumber()+" [ "+barcode.getBarcode()+" ] " + "入库到:" + storage.getName()+"["+cid+"] " + pos.getPosName());
taskService.addTaskToFinished(pos,barcode,storage.getName()+"-op");
openAndCloseLights(storage,mergePosNameList,delayCloseTime, putInColor);
return "OK"+getText("shelf.msg.inMergeOk",new String[]{pos.getPosName()},request.getLocale(),"操作成功,请合并库位["+ mergePosStr.substring(1) + "]并放入料盘");
return "OK"+getText("shelf.msg.inMergeOk",new String[]{pos.getShortPosName()},request.getLocale(),"操作成功,请合并库位["+ mergePosStr.substring(1) + "]并放入料盘");
}else{
String sizeInfo = barcode.getPlateSize()+" x "+ barcode.getHeight();
String msg = "未找到适合["+sizeInfo +"]的库位";
......
......@@ -2163,7 +2163,11 @@ public class TaskService implements ITaskService {
//仓位状态
barcode.setCheckOutDate(new Date(),task.getOperator());
barcode.setPosName("");
barcodeManager.save(barcode);
try{
barcodeManager.save(barcode);
}catch(Exception e){
log.error("保存条码["+barcode.getBarcode()+"]出错:",e);
}
pos.setBarcode(null);
pos.setUsed(false);
......@@ -2174,6 +2178,7 @@ public class TaskService implements ITaskService {
//更新缓存中的库存信息
dataCache.updateInventory(task.getCid(), task.getPartNumber(),0-task.getNum());
}
task.setOperator(opUser);
......@@ -2183,7 +2188,7 @@ public class TaskService implements ITaskService {
finishedTasks.put(storage.getAreaId(),task.getBarcode(),task);
}catch (Exception e){
log.info("["+ pos.getPosName() + "]addTaskToFinished出错",e);
}
}
......
......@@ -377,4 +377,6 @@ shelf.ecall.status.5=SMED
shelf.ecall.status.6=MiniStock
shelf.ecall.status.7=Not Enough
shelf.ecall.status.8=Cancel
shelf.ecall.status.9=Spliced
\ No newline at end of file
shelf.ecall.status.9=Spliced
network.error.failed=The network request failed and is being automatically retried
\ No newline at end of file
......@@ -376,4 +376,5 @@ shelf.ecall.status.5=SMED
shelf.ecall.status.6=MiniStock
shelf.ecall.status.7=Not Enough
shelf.ecall.status.8=Cancel
shelf.ecall.status.9=Spliced
\ No newline at end of file
shelf.ecall.status.9=Spliced
network.error.failed=The network request failed and is being automatically retried
\ No newline at end of file
......@@ -376,4 +376,5 @@ shelf.ecall.status.5=\u8FD0\u9001
shelf.ecall.status.6=MiniStock
shelf.ecall.status.7=\u4E0D\u8DB3
shelf.ecall.status.8=\u53D6\u6D88
shelf.ecall.status.9=\u5DF2\u63A5\u6599
\ No newline at end of file
shelf.ecall.status.9=\u5DF2\u63A5\u6599
network.error.failed=\u7F51\u7EDC\u8BF7\u6C42\u5931\u8D25,\u6B63\u5728\u81EA\u52A8\u91CD\u8BD5
\ No newline at end of file
......@@ -244,6 +244,8 @@
<fmt:message key="shelf.subslot.1" var="subslot_1"/>
<fmt:message key="alarm.inaction.title" var="inactionAlarmTitle"/>
<fmt:message key="network.error.failed" var="networkFailed"/>
<c:set var="scripts" scope="request">
<script type="text/javascript">
......@@ -681,7 +683,7 @@
if(status=='timeout'){//超时,status还有success,error等值的情况
ajaxTimeoutTest.abort();
var position = "top left";
netErrorWindow = showAlarmWindow(position, netErrorWindow,"Network Error","Request time out");
netErrorWindow = showAlarmWindow(position, netErrorWindow,"Network Error","${networkFailed}");
}
}
......
......@@ -13,7 +13,7 @@
<!--[if IE 8]> <html lang="en" class="ie8 no-js"> <![endif]-->
<!--[if IE 9]> <html lang="en" class="ie9 no-js"> <![endif]-->
<!--[if !IE]><!-->
<html lang="en">
<%--<html lang="en">--%>
<head>
<title>SMD-BOX</title>
<meta http-equiv="X-UA-Compatible" content="IE=edge">
......@@ -356,13 +356,13 @@
jQuery(document).ready(function() {
$(':text').keyboard({
$(':text,:password').keyboard({
openOn : null,
stayOpen : true,
layout : 'qwerty'
});
$(':text').each(function(){
$(':text,:password').each(function(){
var textDom = $(this);
var kbicon=$('<span class="input-group-addon"><i class="fa fa-keyboard-o" name="amount"></i></span>');
kbicon.click(function(){
......
......@@ -12,7 +12,7 @@
<!DOCTYPE html>
<%@ include file="/common/taglibs.jsp"%>
<%@ page language="java" pageEncoding="UTF-8"%>
<html lang="en">
<%--<html lang="en">--%>
<!--<![endif]-->
<!-- BEGIN HEAD -->
<head>
......
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!