Skip to content
切换导航条
切换导航条
当前项目
正在载入...
登录
孙克
/
SmdBox
转到一个项目
切换导航栏
切换导航栏固定状态
项目
群组
代码片段
帮助
项目
活动
版本库
流水线
图表
问题
0
合并请求
0
维基
网络
创建新的问题
作业
提交
问题看板
文件
提交
网络
比较
分支
标签
Commit c35dbca2
由
sunke
编写于
2021-07-09 10:56:23 +0800
浏览文件
选项
浏览文件
标签
下载
电子邮件补丁
差异文件
Session超时时间改为30分钟,避免总是提示登陆
1 个父辈
350c94e6
隐藏空白字符变更
内嵌
并排
正在显示
15 个修改的文件
包含
63 行增加
和
34 行删除
myproject/src/main/java/com/myproject/bean/Sequence.java
myproject/src/main/java/com/myproject/manager/impl/StoragePosManagerImpl.java
myproject/src/main/java/com/myproject/util/BarcodeRule.java
myproject/src/main/java/com/myproject/util/StorageConstants.java
myproject/src/main/java/com/myproject/webapp/controller/barcode/BarcodeSettingsController.java
myproject/src/main/java/com/myproject/webapp/controller/storage/AccShelfController.java
myproject/src/main/java/com/myproject/webapp/controller/storage/StorageUpdateController.java
myproject/src/main/java/com/myproject/webapp/controller/webService/ITaskService.java
myproject/src/main/java/com/myproject/webapp/controller/webService/TaskService.java
myproject/src/main/resources/StorageResources.properties
myproject/src/main/resources/StorageResources_en.properties
myproject/src/main/webapp/WEB-INF/pages/component/storagePosFind.jsp
myproject/src/main/webapp/WEB-INF/pages/dataLog/dataLogSearch.jsp
myproject/src/main/webapp/WEB-INF/pages/storage/boxView.jsp
myproject/src/main/webapp/decorators/metro.jsp
myproject/src/main/java/com/myproject/bean/Sequence.java
查看文件 @
c35dbca
...
...
@@ -6,7 +6,6 @@ package com.myproject.bean;
public
class
Sequence
extends
BaseMongoBean
{
private
Long
seq
;
public
Long
getSeq
()
{
return
seq
;
}
...
...
myproject/src/main/java/com/myproject/manager/impl/StoragePosManagerImpl.java
查看文件 @
c35dbca
...
...
@@ -442,16 +442,16 @@ public class StoragePosManagerImpl implements IStoragePosManager {
private
Sort
getSortByCheckOutType
(
StorageConstants
.
CHECKOUT_TYPE
checkoutType
){
Sort
sort
=
null
;
if
(
StorageConstants
.
CHECKOUT_TYPE
.
EXPIRE_FIRST
.
equals
(
checkoutType
)){
//先过期先出
sort
=
new
Sort
(
Sort
.
Direction
.
ASC
,
"barcode.expTime"
).
and
(
new
Sort
(
Sort
.
Direction
.
ASC
,
"barcode.expireDate"
)).
and
(
new
Sort
(
Sort
.
Direction
.
ASC
,
"
canCheckOut
Time"
));
sort
=
new
Sort
(
Sort
.
Direction
.
ASC
,
"barcode.expTime"
).
and
(
new
Sort
(
Sort
.
Direction
.
ASC
,
"barcode.expireDate"
)).
and
(
new
Sort
(
Sort
.
Direction
.
ASC
,
"
barcode.putIn
Time"
));
}
else
if
(
StorageConstants
.
CHECKOUT_TYPE
.
FIFO
.
equals
(
checkoutType
)){
//严格的先进先出
sort
=
new
Sort
(
Sort
.
Direction
.
ASC
,
"
canCheckOut
Time"
).
and
(
new
Sort
(
Sort
.
Direction
.
DESC
,
"barcode.usedCount"
));
sort
=
new
Sort
(
Sort
.
Direction
.
ASC
,
"
barcode.putIn
Time"
).
and
(
new
Sort
(
Sort
.
Direction
.
DESC
,
"barcode.usedCount"
));
}
else
if
(
StorageConstants
.
CHECKOUT_TYPE
.
USED_FIRST
.
equals
(
checkoutType
)){
//尾料优先
sort
=
new
Sort
(
Sort
.
Direction
.
ASC
,
"barcode.amount"
).
and
(
new
Sort
(
Sort
.
Direction
.
ASC
,
"
canCheckOut
Time"
));
sort
=
new
Sort
(
Sort
.
Direction
.
ASC
,
"barcode.amount"
).
and
(
new
Sort
(
Sort
.
Direction
.
ASC
,
"
barcode.putIn
Time"
));
}
else
if
(
StorageConstants
.
CHECKOUT_TYPE
.
PRODUCE_DATE
.
equals
(
checkoutType
)){
//先生产先出
sort
=
new
Sort
(
Sort
.
Direction
.
ASC
,
"barcode.produceDate"
).
and
(
new
Sort
(
Sort
.
Direction
.
ASC
,
"
canCheckOut
Time"
));
sort
=
new
Sort
(
Sort
.
Direction
.
ASC
,
"barcode.produceDate"
).
and
(
new
Sort
(
Sort
.
Direction
.
ASC
,
"
barcode.putIn
Time"
));
}
else
{
//效率优先
sort
=
new
Sort
(
Sort
.
Direction
.
ASC
,
"
canCheckOutTime"
).
and
(
new
Sort
(
Sort
.
Direction
.
ASC
,
"createDate
"
));
sort
=
new
Sort
(
Sort
.
Direction
.
ASC
,
"
barcode.putInTime"
).
and
(
new
Sort
(
Sort
.
Direction
.
ASC
,
"barcode.amount
"
));
}
return
sort
;
}
...
...
myproject/src/main/java/com/myproject/util/BarcodeRule.java
查看文件 @
c35dbca
...
...
@@ -660,6 +660,8 @@ public class BarcodeRule {
codeStr
=
"IAC;6014A0489701;HI1206T161R-10;2047;AC20NKA0448KA;2000;VBG204768056"
;
rule
=
"SP;PN;3;PRODATEyyw;BATCH;QTY;RI"
;
codeStr
=
"=7x8=140032005 18B030918B 200.000 614A 0001045024 0001 20200414-141329"
;
rule
=
"PN BATCH QTY[-1:0:1] RI "
;
BarcodeRule
br
=
BarcodeRule
.
newRule
(
rule
);
Barcode
b
=
br
.
toCodeBean
(
codeStr
).
getBarcode
();
if
(
b
!=
null
){
...
...
myproject/src/main/java/com/myproject/util/StorageConstants.java
查看文件 @
c35dbca
...
...
@@ -326,7 +326,7 @@ public class StorageConstants {
}
public
static
List
<
TYPE
>
availableTypeList
(){
return
Lists
.
newArrayList
(
AUTO
,
LINE
,
BATCH
,
ACCSHELF
,
CODESHELF
,
SOLDERPASTE
,
VERTICALBOX
,
SMD_XL
);
return
Lists
.
newArrayList
(
AUTO
,
LINE
,
BATCH
,
ACCSHELF
,
CODESHELF
,
SOLDERPASTE
,
VERTICALBOX
,
SMD_XL
,
SMD_DUO
);
}
}
...
...
myproject/src/main/java/com/myproject/webapp/controller/barcode/BarcodeSettingsController.java
查看文件 @
c35dbca
...
...
@@ -40,8 +40,8 @@ public class BarcodeSettingsController extends SettingsController {
}
else
{
try
{
String
[]
codeRuleList
=
request
.
getParameterValues
(
"codeRuleList"
);
if
(
codeRuleList
.
length
>
1
0
){
throw
new
ValidateException
(
"barcode.error.maxRule"
,
"条码规则最多只允许有1
0
个"
);
if
(
codeRuleList
.
length
>
1
2
){
throw
new
ValidateException
(
"barcode.error.maxRule"
,
"条码规则最多只允许有1
2
个"
);
}
if
(
codeRuleList
!=
null
){
settings
.
setCodeRuleList
(
Lists
.
newArrayList
(
codeRuleList
));
...
...
myproject/src/main/java/com/myproject/webapp/controller/storage/AccShelfController.java
查看文件 @
c35dbca
...
...
@@ -9,6 +9,7 @@ import com.myproject.bean.update.Barcode;
import
com.myproject.bean.update.DataLog
;
import
com.myproject.bean.update.Storage
;
import
com.myproject.bean.update.StoragePos
;
import
com.myproject.bean.utils.StatusBean
;
import
com.myproject.dao.mongo.IDataLogDao
;
import
com.myproject.exception.ValidateException
;
import
com.myproject.manager.IBarcodeManager
;
...
...
@@ -204,6 +205,11 @@ public class AccShelfController extends BaseController {
return
getText
(
"shelf.msg.noTask"
,
new
String
[]{
inPos
.
getPosName
()},
request
.
getLocale
(),
"操作失败,已在库位["
+
inPos
.
getPosName
()+
"]中,未找到对应的出库任务"
);
}
StatusBean
status
=
taskService
.
getStatus
(
storage
.
getCid
());
if
(
status
.
getStatus
()
==
StorageConstants
.
STATUS
.
OFFLINE
){
taskService
.
saveStatus
(
status
);
}
List
<
Storage
>
storageList
=
Lists
.
newArrayList
(
storage
);
StoragePos
pos
=
taskService
.
findEmptyPosForPutIn
(
storageList
,
barcode
);
int
delayCloseTime
=
30000
;
...
...
myproject/src/main/java/com/myproject/webapp/controller/storage/StorageUpdateController.java
查看文件 @
c35dbca
...
...
@@ -5,6 +5,7 @@ import com.myproject.bean.update.StoragePos;
import
com.myproject.exception.ValidateException
;
import
com.myproject.manager.IStorageManager
;
import
com.myproject.manager.IStoragePosManager
;
import
com.myproject.util.StorageConstants
;
import
com.myproject.webapp.controller.webService.DataCache
;
import
org.apache.commons.lang.StringUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
...
...
@@ -46,6 +47,9 @@ public class StorageUpdateController extends BaseUpdateController {
Storage
storage
=
new
Storage
();
if
(!
isAdd
(
request
)
&&
StringUtils
.
isNotBlank
(
id
))
{
storage
=
storageManager
.
get
(
id
);
if
(
storage
.
isVirtual
()){
storage
.
setType
(
StorageConstants
.
TYPE
.
AUTO
.
name
());
}
}
model
.
addAttribute
(
"storage"
,
storage
);
...
...
@@ -66,6 +70,9 @@ public class StorageUpdateController extends BaseUpdateController {
return
getSuccessView
();
}
else
{
try
{
if
(
storage
.
isVirtual
()){
storage
.
setType
(
StorageConstants
.
TYPE
.
AUTO
.
name
());
}
dataCache
.
reloadStorage
(
storage
);
//fileUpload.setParam(storage.getId());
saveMessage
(
request
,
getText
(
"storage.saveSuccess"
,
request
.
getLocale
()));
...
...
myproject/src/main/java/com/myproject/webapp/controller/webService/ITaskService.java
查看文件 @
c35dbca
...
...
@@ -21,6 +21,8 @@ import java.util.Map;
public
interface
ITaskService
{
StatusBean
saveStatus
(
StatusBean
statusBeanToSave
);
/**
* 取消单个任务
*/
...
...
myproject/src/main/java/com/myproject/webapp/controller/webService/TaskService.java
查看文件 @
c35dbca
...
...
@@ -939,7 +939,8 @@ public class TaskService implements ITaskService {
liteOrderDao
.
save
(
cacheOrder
);
liteOrderMap
.
put
(
cacheOrder
.
getOrderNo
(),
cacheOrder
);
if
(
taskReelCount
<=
0
)
{
return
"工单无可执行的任务"
;
//return "工单无可执行的任务";
return
"order.out.noTask"
;
}
return
""
;
}
...
...
@@ -1966,21 +1967,21 @@ public class TaskService implements ITaskService {
liteOrderItem
.
setOutNum
(
liteOrderItem
.
getOutNum
()
+
task
.
getNum
());
liteOrderItem
.
setOutReelCount
(
liteOrderItem
.
getOutReelCount
()
+
1
);
liteOrderItem
=
liteOrderItemDao
.
save
(
liteOrderItem
);
Barcode
barcode
=
barcodeManager
.
findByBarcode
(
task
.
getBarcode
());
if
(
barcode
!=
null
)
{
Float
totalNeedNum
=
liteOrderItem
.
getNeedNum
()
*
order
.
getOrderTimes
();
int
barcodeRemainNum
=
liteOrderItem
.
getOutNum
()
-
totalNeedNum
.
intValue
();
if
(
barcodeRemainNum
<
0
)
{
barcodeRemainNum
=
0
;
}
barcode
.
setAmount
(
barcodeRemainNum
);
log
.
info
(
"条码["
+
task
.
getBarcode
()
+
"]从工单出库,更改数量为:"
+
barcodeRemainNum
);
try
{
barcodeManager
.
save
(
barcode
);
}
catch
(
ValidateException
e
)
{
e
.
printStackTrace
();
}
}
//
Barcode barcode = barcodeManager.findByBarcode(task.getBarcode());
//
if (barcode != null) {
//
Float totalNeedNum = liteOrderItem.getNeedNum() * order.getOrderTimes();
//
int barcodeRemainNum = liteOrderItem.getOutNum() - totalNeedNum.intValue();
//
if (barcodeRemainNum < 0) {
//
barcodeRemainNum = 0;
//
}
//
barcode.setAmount(barcodeRemainNum);
//
log.info("条码[" + task.getBarcode() + "]从工单出库,更改数量为:" + barcodeRemainNum);
//
try {
//
barcodeManager.save(barcode);
//
} catch (ValidateException e) {
//
e.printStackTrace();
//
}
//
}
}
items
.
add
(
liteOrderItem
);
}
...
...
myproject/src/main/resources/StorageResources.properties
查看文件 @
c35dbca
...
...
@@ -125,7 +125,7 @@ storage.status.6=Material Receiving In Process
storage.status.7
=
Material Receiving Completed
storage.status.8
=
Material Receiving Failed
storage.status.9
=
Material Retrieval in Porcess
storage.status.10
=
Mater
ai
l Retrieval Completed
storage.status.10
=
Mater
ia
l Retrieval Completed
storage.status.11
=
Material Retrieval End
storage.status.12
=
Material transfering
storage.status.13
=
System resetting
...
...
myproject/src/main/resources/StorageResources_en.properties
查看文件 @
c35dbca
...
...
@@ -306,7 +306,7 @@ storage.status.12=Material transfering
order.out.notFound
=
The order infomation was not found
storage.status.11
=
Material Retrieval End
workOrder.workOrder
=
Work Order
storage.status.10
=
Mater
ai
l Retrieval completed
storage.status.10
=
Mater
ia
l Retrieval completed
component.providerNumber
=
Supplier No.
storage.match.exactMatch
=
Exact Match
menu.workOrder
=
Lite Work Order
...
...
myproject/src/main/webapp/WEB-INF/pages/component/storagePosFind.jsp
查看文件 @
c35dbca
...
...
@@ -180,6 +180,7 @@
</display:column>
<display:column titleKey="storagePosFind.index">${pos_rowNum}</display:column>
<display:column property="barcode.barcode" titleKey="barcode.barcode" sortable="true" sortProperty="barcode.barcode"/>
<display:column titleKey="component.partNumber" style="width: 15%;" sortProperty="barcode.partNumber" sortable="true">
${pos.barcode.partNumber}
</display:column>
...
...
@@ -193,7 +194,6 @@
<%--<c:if test="${pos.barcode.type == 3}"><fmt:message key="inOutList.type.others"/></c:if>--%>
<%--<c:if test="${pos.barcode.type == 4}"><fmt:message key="inOutList.type.fixture"/></c:if>--%>
<%--</display:column>--%>
<display:column property="barcode.barcode" titleKey="barcode.barcode" sortable="true" sortProperty="barcode.barcode"/>
<display:column property="barcode.msl" titleKey="component.msl" sortable="true" sortProperty="barcode.msl"/>
<%--<display:column property="barcode.inFixture" titleKey="storagePosFind.inFixture"/>--%>
<display:column property="barcode.batch" titleKey="barcode.batch" sortable="true" sortProperty="barcode.batch"/>
...
...
myproject/src/main/webapp/WEB-INF/pages/dataLog/dataLogSearch.jsp
查看文件 @
c35dbca
...
...
@@ -99,6 +99,7 @@
<div class="col-md-2 col-xs-2">
<button class="btn purple" type="submit"><i class="fa fa-search"></i><fmt:message
key="button.search"/></button>
<button class="btn" id="exitSystem" onclick="CloseWebPage()">AAAA</button>
</div>
</div>
...
...
@@ -197,6 +198,12 @@
language:'zh-CN'
});
function CloseWebPage() {
window.open('', '_top'); window.top.close();
}
});
</script>
</c:set>
\ No newline at end of file
myproject/src/main/webapp/WEB-INF/pages/storage/boxView.jsp
查看文件 @
c35dbca
...
...
@@ -471,12 +471,17 @@
usedPercent =usedPercent * 100;
idlePercent = idlePercent * 100;
var html = "<div class='item-start barheight'>" +w +" x "+ h + " mm</div>" +
<%--var html = "<div class='item-start barheight'>" +w +" x "+ h + " mm</div>" +--%>
<%--"<div class='progress my-progress'>" +--%>
<%--"<div class='progress-bar progress-bar-idle barheight' style='width:"+usedPercent+"%' title='${used_label}:"+usedCount+"'>" +--%>
<%--"<span>"+usedCount+"</span>" +--%>
<%--"</div>"+--%>
<%--"</div>";--%>
var html = "<div class='item-start barheight'>" +w +" x "+ h + " mm</div>" +
"<div class='progress my-progress'>" +
"<div class='progress-bar progress-bar-idle barheight' style='width:"+usedPercent+"%' title='${used_label}:"+usedCount+"'>" +
"<span>"+usedCount+"</span>" +
"</div>"+
"</div>"
"<div class='progress-bar progress-bar-used barheight' style='width: "+usedPercent+"%'><span>"+usedCount+"</span></div> " +
"<div class='progress-bar progress-bar-idle barheight' style='width: "+idlePercent+"%'><span> "+idleCount+"</span></div>" +
"</div>";
return html;
}
...
...
myproject/src/main/webapp/decorators/metro.jsp
查看文件 @
c35dbca
...
...
@@ -241,7 +241,7 @@
<div
class=
"page-footer-inner"
>
2016
©
<a
href=
"${ctx}/updateHistory.html"
>
SMD BOX
</a>
</div>
<span
class=
"right"
style=
"color: #a3a3a3;"
>
Version: 1.
5.2010
</span>
<span
class=
"right"
style=
"color: #a3a3a3;"
>
Version: 1.
6.2117
</span>
<div
class=
"scroll-to-top"
>
<i
class=
"icon-arrow-up"
></i>
</div>
...
...
编写
预览
支持
Markdown
格式
附加文件
你添加了
0
人
到此讨论。请谨慎行事。
Finish editing this message first!
Cancel
请
注册
或
登录
后发表评论