Skip to content
切换导航条
切换导航条
当前项目
正在载入...
登录
孙克
/
Gree
转到一个项目
切换导航栏
切换导航栏固定状态
项目
群组
代码片段
帮助
项目
活动
版本库
流水线
图表
问题
0
合并请求
0
维基
网络
创建新的问题
作业
提交
问题看板
文件
提交
网络
比较
分支
标签
Commit 9d6a689a
由
LN
编写于
2021-07-12 09:32:23 +0800
浏览文件
选项
浏览文件
标签
下载
电子邮件补丁
差异文件
增加过期物料提醒功能
1 个父辈
95065b61
显示空白字符变更
内嵌
并排
正在显示
6 个修改的文件
包含
83 行增加
和
17 行删除
myproject/src/main/java/com/myproject/manager/impl/StoragePosManagerImpl.java
myproject/src/main/java/com/myproject/webapp/controller/storage/StoragePosFindController.java
myproject/src/main/webapp/WEB-INF/pages/component/componentSearch.jsp
myproject/src/main/webapp/WEB-INF/pages/component/componentUpdate.jsp
myproject/src/main/webapp/WEB-INF/pages/component/storagePosFind.jsp
myproject/src/main/webapp/WEB-INF/pages/storage/allBoxView.jsp
myproject/src/main/java/com/myproject/manager/impl/StoragePosManagerImpl.java
查看文件 @
9d6a689
...
@@ -347,7 +347,9 @@ public class StoragePosManagerImpl implements IStoragePosManager {
...
@@ -347,7 +347,9 @@ public class StoragePosManagerImpl implements IStoragePosManager {
@Override
@Override
public
int
expireCount
(
String
storageId
,
int
type
){
public
int
expireCount
(
String
storageId
,
int
type
){
Criteria
c
=
Criteria
.
where
(
"barcode.expireDate"
).
lte
(
new
Date
());
//Criteria c = Criteria.where("barcode.expireDate").lte(new Date()).orOperator(Criteria.where("barcode.expTime").lte(new Date()));
Criteria
c
=
Criteria
.
where
(
"barcode.expTime"
).
lte
(
new
Date
());
if
(!
Strings
.
isNullOrEmpty
(
storageId
)){
if
(!
Strings
.
isNullOrEmpty
(
storageId
)){
c
=
c
.
and
(
"storageId"
).
is
(
storageId
);
c
=
c
.
and
(
"storageId"
).
is
(
storageId
);
}
}
...
...
myproject/src/main/java/com/myproject/webapp/controller/storage/StoragePosFindController.java
查看文件 @
9d6a689
...
@@ -104,11 +104,7 @@ public class StoragePosFindController extends BaseSearchController {
...
@@ -104,11 +104,7 @@ public class StoragePosFindController extends BaseSearchController {
String
expire
=
request
.
getParameter
(
"expire"
);
String
expire
=
request
.
getParameter
(
"expire"
);
if
(!
Strings
.
isNullOrEmpty
(
expire
)){
if
(!
Strings
.
isNullOrEmpty
(
expire
)){
if
(
"solder"
.
equalsIgnoreCase
(
expire
)){
baseCriteria
.
and
(
"barcode.expTime"
).
lte
(
new
Date
());
baseCriteria
.
and
(
"barcode.expTime"
).
lte
(
new
Date
());
}
else
if
(
"pcb"
.
equalsIgnoreCase
(
expire
)){
baseCriteria
.
and
(
"barcode.expireDate"
).
lte
(
new
Date
());
}
request
.
setAttribute
(
"expire"
,
expire
);
request
.
setAttribute
(
"expire"
,
expire
);
}
}
...
...
myproject/src/main/webapp/WEB-INF/pages/component/componentSearch.jsp
查看文件 @
9d6a689
...
@@ -104,6 +104,7 @@
...
@@ -104,6 +104,7 @@
<%--<display:column property="validDay" titleKey="component.validDay"/>--%>
<%--<display:column property="validDay" titleKey="component.validDay"/>--%>
<%--<display:column property="type" titleKey="类型"/>--%>
<%--<display:column property="type" titleKey="类型"/>--%>
<display:column property="amount" titleKey="component.amount"/>
<display:column property="amount" titleKey="component.amount"/>
<display:column property="maxStorageTime" titleKey="solder.maxStorageTime" sortable="true"/>
<display:column titleKey="" media="html">
<display:column titleKey="" media="html">
<button class="btn default" type="button"
<button class="btn default" type="button"
...
...
myproject/src/main/webapp/WEB-INF/pages/component/componentUpdate.jsp
查看文件 @
9d6a689
...
@@ -471,16 +471,25 @@
...
@@ -471,16 +471,25 @@
</div>
</div>
<div class="form-group extraInfo">
<%--单位--%>
<label class="control-label col-md-2"><fmt:message key="component.unit"/></label>
<div class="form-group">
<label class="control-label col-md-2"><fmt:message key="solder.maxStorageTime"/> </label>
<div class="col-md-3">
<div class="col-md-3">
<div style="text-align:left" class="input-group">
<div style="text-align:left" class="input-group">
<form:input type="text" id="unit" path="unit" class="form-control"/>
<form:input type="text" id="maxStorageTime" path="maxStorageTime" class="form-control"/>
<span class="input-group-addon"><fmt:message key="solder.hour"/></span>
</div>
</div>
</div>
</div>
<%-- <div class="form-group extraInfo">
<%–单位–%>
<label class="control-label col-md-2"><fmt:message key="component.unit"/></label>
<div class="col-md-3">
<div style="text-align:left" class="input-group">
<form:input type="text" id="unit" path="unit" class="form-control"/>
</div>
</div>--%>
<%--单耗--%>
<%--单耗--%>
<label class="control-label col-md-2"><fmt:message key="component.unitCost"/></label>
<label class="control-label col-md-2"><fmt:message key="component.unitCost"/></label>
...
@@ -492,7 +501,7 @@
...
@@ -492,7 +501,7 @@
</div>
</div>
</div>
</div>
</div>
</div>
<div class="form-group extraInfo">
<%--
<div class="form-group extraInfo">
<label class="control-label col-md-2"><fmt:message key="component.producer"/> </label>
<label class="control-label col-md-2"><fmt:message key="component.producer"/> </label>
<div class="col-md-3">
<div class="col-md-3">
...
@@ -522,7 +531,7 @@
...
@@ -522,7 +531,7 @@
</div>
</div>
</div>
</div>
<%--SMD 连接时的预警值--%>
<%–SMD 连接时的预警值–%>
<label class="control-label col-md-2"><fmt:message key="component.smdAlarmValue"/></label>
<label class="control-label col-md-2"><fmt:message key="component.smdAlarmValue"/></label>
<div class="col-md-3">
<div class="col-md-3">
...
@@ -532,7 +541,7 @@
...
@@ -532,7 +541,7 @@
</div>
</div>
</div>
</div>
</div>
</div>
--%>
<div class="form-group extraInfo">
<div class="form-group extraInfo">
...
...
myproject/src/main/webapp/WEB-INF/pages/component/storagePosFind.jsp
查看文件 @
9d6a689
...
@@ -67,8 +67,8 @@
...
@@ -67,8 +67,8 @@
<div class="form-group">
<div class="form-group">
<label class="control-label col-md-1"><fmt:message key="component.partNumber"/></label>
<label class="control-label col-md-1"><fmt:message key="component.partNumber"/></label>
<%--
<input type="hidden" name="expire" value="${expire}"/>
<input type="hidden" name="expire" value="${expire}"/>
--%>
<div class="col-md-2">
<div class="col-md-2">
<div style="text-align:left">
<div style="text-align:left">
<form:input id="name" path="name" class="form-control"/>
<form:input id="name" path="name" class="form-control"/>
...
@@ -117,6 +117,15 @@
...
@@ -117,6 +117,15 @@
<input type="text" name="facility" class="form-control" value="${facility}"/>
<input type="text" name="facility" class="form-control" value="${facility}"/>
</div>
</div>
</div>
</div>
<label class="control-label col-md-1 col-xs-2"><fmt:message key="类型"/></label>
<div class="col-md-2">
<select name="expire" class="form-control">
<option value=""><fmt:message key="select.all"/></option>
<option value="1" <c:if test="${expire==1}"> selected </c:if> > <fmt:message key="过期物料"/></option>
</select>
</div>
</div>
</div>
</form:form>
</form:form>
...
@@ -141,7 +150,10 @@
...
@@ -141,7 +150,10 @@
<c:if test="${pos.barcode.type == 1 && pos.barcode.maxStorageTime != 0 && pos.inStoreHour >= pos.barcode.maxStorageTime}">
<c:if test="${pos.barcode.type == 1 && pos.barcode.maxStorageTime != 0 && pos.inStoreHour >= pos.barcode.maxStorageTime}">
<c:set var="alarmClass" value="alarmItem"/>
<c:set var="alarmClass" value="alarmItem"/>
</c:if>
</c:if>
<c:if test="${today >= pos.barcode.expireDate}">
<%-- <c:if test="${today >= pos.barcode.expireDate}">
<c:set var="alarmClass" value="alarmItem"/>
</c:if>--%>
<c:if test="${today >= pos.barcode.expTime}">
<c:set var="alarmClass" value="alarmItem"/>
<c:set var="alarmClass" value="alarmItem"/>
</c:if>
</c:if>
<c:set var="limitCheckOut" value="${pos.locked || (pos.barcode.maxStorageTime != 0 && pos.inStoreHour * 60 + pos.inStoreMiniute <= pos.barcode.warmTime * 60)}"/>
<c:set var="limitCheckOut" value="${pos.locked || (pos.barcode.maxStorageTime != 0 && pos.inStoreHour * 60 + pos.inStoreMiniute <= pos.barcode.warmTime * 60)}"/>
...
@@ -155,7 +167,7 @@
...
@@ -155,7 +167,7 @@
<%--</security:authorize>--%>
<%--</security:authorize>--%>
<display:column titleKey="storagePosFind.index">${pos_rowNum}</display:column>
<display:column titleKey="storagePosFind.index">${pos_rowNum}</display:column>
<display:column titleKey="component.partNumber" style="width: 15%;" sortProperty="barcode.partNumber" sortable="true"
class="${alarmClass}"
>
<display:column titleKey="component.partNumber" style="width: 15%;" sortProperty="barcode.partNumber" sortable="true" >
${pos.barcode.partNumber}
${pos.barcode.partNumber}
</display:column>
</display:column>
...
@@ -180,7 +192,9 @@
...
@@ -180,7 +192,9 @@
<display:column titleKey="时间" sortProperty="barcode.putInDate" sortable="true">
<display:column titleKey="时间" sortProperty="barcode.putInDate" sortable="true">
<fmt:formatDate value="${pos.barcode.putInDate}" pattern="yyyy-MM-dd HH:mm"/>
<fmt:formatDate value="${pos.barcode.putInDate}" pattern="yyyy-MM-dd HH:mm"/>
</display:column>
</display:column>
<display:column titleKey="过期时间" sortProperty="barcode.expTime" sortable="true" class="${alarmClass}">
<fmt:formatDate value="${pos.barcode.expTime}" pattern="yyyy-MM-dd HH:mm"/>
</display:column>
<display:column titleKey="barcode.amount" sortProperty="barcode.amount" sortable="true">
<display:column titleKey="barcode.amount" sortProperty="barcode.amount" sortable="true">
<c:if test="${pos.barcode.type == 1 || pos.barcode.type == 4}">-</c:if>
<c:if test="${pos.barcode.type == 1 || pos.barcode.type == 4}">-</c:if>
<c:if test="${pos.barcode.type != 1 && pos.barcode.type != 4}">${pos.barcode.amount} ${pos.barcode.appendInfo.cutMap}</c:if>
<c:if test="${pos.barcode.type != 1 && pos.barcode.type != 4}">${pos.barcode.amount} ${pos.barcode.appendInfo.cutMap}</c:if>
...
...
myproject/src/main/webapp/WEB-INF/pages/storage/allBoxView.jsp
查看文件 @
9d6a689
...
@@ -770,6 +770,49 @@
...
@@ -770,6 +770,49 @@
$("#lineMsg").text(lineMsg);
$("#lineMsg").text(lineMsg);
});
});
}
}
//过期物料提醒
var expireWindow;
flushExpireAlarm = function(){
$.post("${ctx}/service/store/expireAlarmMsg", {cid: '${show}'}, function (data) {
expireWindow = showAlarmWindow(expireWindow,"${expireAlarmTitle}",data);
});
};
function alarmWindowClick() {
alert("aaa");
}
function showAlarmWindow(alarmWindow, title, msg){
var windowOptions = {
delay: false,
position: 'bottom left',
closeOnClick: false,
sound: false,
title: title,
closable: false,
messageHeight:null,
icon:false,
size: 'normal',
};
if(msg == ''){//无报警,清除报警框
if(alarmWindow){
alarmWindow.remove();
alarmWindow = null;
}
}else{
var titleStr = "<a href=\"${ctx}/component/storagePosFind.html?dir=asc&expire=1&sort=barcode.expTime\" style=\"color: white\">"+msg+"</a>";
msg=titleStr;
if(!alarmWindow){
/* windowOptions.title=titleStr;*/
windowOptions.msg = msg;
alarmWindow =Lobibox.notify('warning', windowOptions);
}else{
alarmWindow.$el.find(".lobibox-notify-msg").html(msg);
}
}
return alarmWindow;
}
setInterval(function(){
setInterval(function(){
flushLineMsg();
flushLineMsg();
...
@@ -781,6 +824,7 @@
...
@@ -781,6 +824,7 @@
//flushLineMsg();
//flushLineMsg();
flushUsageItem();
flushUsageItem();
//flushLiteOrders();
//flushLiteOrders();
flushExpireAlarm();
}, 2000);
}, 2000);
...
...
编写
预览
支持
Markdown
格式
附加文件
你添加了
0
人
到此讨论。请谨慎行事。
Finish editing this message first!
Cancel
请
注册
或
登录
后发表评论