Skip to content
切换导航条
切换导航条
当前项目
正在载入...
登录
孙克
/
SmdBox
转到一个项目
切换导航栏
切换导航栏固定状态
项目
群组
代码片段
帮助
项目
活动
版本库
流水线
图表
问题
0
合并请求
0
维基
网络
创建新的问题
作业
提交
问题看板
文件
提交
网络
比较
分支
标签
Commit 6cad4e79
由
sunke
编写于
2020-07-21 08:55:24 +0800
浏览文件
选项
浏览文件
标签
下载
电子邮件补丁
差异文件
锡膏料仓
工单修改数量
1 个父辈
b838457c
全部展开
隐藏空白字符变更
内嵌
并排
正在显示
42 个修改的文件
包含
1242 行增加
和
124 行删除
README.md
excel/solderlinePositions.csv
myproject/src/main/java/com/myproject/bean/excel/StoragePosExcel.java
myproject/src/main/java/com/myproject/bean/json/ResultBean.java
myproject/src/main/java/com/myproject/bean/update/Barcode.java
myproject/src/main/java/com/myproject/bean/update/Component.java
myproject/src/main/java/com/myproject/bean/update/DataLog.java
myproject/src/main/java/com/myproject/bean/update/Storage.java
myproject/src/main/java/com/myproject/bean/update/StoragePos.java
myproject/src/main/java/com/myproject/bean/utils/StatusBean.java
myproject/src/main/java/com/myproject/dao/mongo/IDataLogDao.java
myproject/src/main/java/com/myproject/dao/mongo/impl/DataLogDaoImpl.java
myproject/src/main/java/com/myproject/manager/IStoragePosManager.java
myproject/src/main/java/com/myproject/manager/impl/BarcodeManagerImpl.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/FileUploadController.java
myproject/src/main/java/com/myproject/webapp/controller/barcode/BarcodeGenerateController.java
myproject/src/main/java/com/myproject/webapp/controller/barcode/BarcodeUpdateController.java
myproject/src/main/java/com/myproject/webapp/controller/component/ReelNumModifyController.java
myproject/src/main/java/com/myproject/webapp/controller/storage/ComponentUpdateController.java
myproject/src/main/java/com/myproject/webapp/controller/storage/ShelfController.java
myproject/src/main/java/com/myproject/webapp/controller/storage/SolderBoxController.java
myproject/src/main/java/com/myproject/webapp/controller/webService/ITaskService.java
myproject/src/main/java/com/myproject/webapp/controller/webService/MainTimer.java
myproject/src/main/java/com/myproject/webapp/controller/webService/QisdaApiController.java
myproject/src/main/java/com/myproject/webapp/controller/webService/SolderBoxCache.java
myproject/src/main/java/com/myproject/webapp/controller/webService/StorageDataController.java
myproject/src/main/java/com/myproject/webapp/controller/webService/TaskService.java
myproject/src/main/java/com/myproject/webapp/listener/StartupListener.java
myproject/src/main/resources/StorageResources.properties
myproject/src/main/resources/StorageResources_en.properties
myproject/src/main/resources/StorageResources_jp.properties
myproject/src/main/resources/StorageResources_zh_CN.properties
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/webapp/WEB-INF/pages/storage/solderBox.jsp
myproject/src/main/webapp/WEB-INF/pages/storage/storageUpdate.jsp
myproject/src/main/webapp/WEB-INF/pages/workOrder/checkOutSettings.jsp
myproject/storageManager.iml
README.md
查看文件 @
6cad4e7
...
@@ -50,3 +50,21 @@ mongorestore -h <hostname><:port> -d dbname <path>
...
@@ -50,3 +50,21 @@ mongorestore -h <hostname><:port> -d dbname <path>
C:
\P
rogram Files
\A
pache Software Foundation
\T
omcat 9.0
\w
ebapps
\m
yproject
\W
EB-INF
\c
lasses
\c
om
\m
yproject
\w
ebapp
\c
ontroller
\s
torage
C:
\P
rogram Files
\A
pache Software Foundation
\T
omcat 9.0
\w
ebapps
\m
yproject
\W
EB-INF
\c
lasses
\c
om
\m
yproject
\w
ebapp
\c
ontroller
\s
torage
搅拌时获取与第一罐重量匹配的锡膏
>地址:
>>/service/store/solder/matchMixSolder
>
>参数:
>>barcode: 第一罐的条码
>
> 返回:
>>` {"code":0,"msg":"ok","data":{"posId":"3D03B02","barcode":"xxxx","weight":"100","mixTime":"300"}}`
>>
>> - code: 0为正常,其他为异常,
>> - msg:消息,
>> - data:
>> - posId: 匹配的锡膏所在库位
>> - barcode: 匹配的锡膏条码
>> - weight: 匹配的锡膏的重量
>> - mixTime: 匹配的锡膏的搅拌时间(单位:秒)
excel/solderlinePositions.csv
0 → 100755
查看文件 @
6cad4e7
位置,库位类型,优先级,高度,宽度,料仓ID,旋转轴位置P2,升降轴库位出料前点P5,升降轴库位出料缓冲点P6,升降轴库位入料前点P3,升降轴库位入料缓冲点P4,进出轴库位点取料点P3,回温区旋转轴库位点P2,冷藏区旋转轴库位点P2,,
1#AC1_0_1_1,1,115,50,140,1,617571,25453,13538,13538,25453,61597,20000,578355,,
1#AC1_0_1_2,1,114,60,230,1,617571,104372,111780,111780,104372,61597,20000,578355,,
1#AC1_0_1_3,1,113,60,230,1,617571,198951,206359,206359,198951,61597,20000,578355,,
1#AC1_0_1_4,1,112,60,230,1,617571,291933,299341,299341,291933,61597,20000,578355,,
1#AC1_0_1_5,1,111,60,230,1,617571,384118,391526,391526,384118,61597,20000,578355,,
1#AC1_0_1_6,1,110,60,230,1,617571,476584,484561,484561,476584,61597,20000,578355,,
1#AC1_1_1_1,1,109,75,60,1,617071,25441,38741,38741,25441,56791,20000,726998,,
1#AC1_1_1_2,1,108,75,60,1,617071,95218,108920,108920,95218,56791,20000,726998,,
1#AC1_1_1_3,1,107,75,60,1,617071,166195,179897,179897,166195,56791,20000,726998,,
1#AC1_1_1_4,1,106,75,60,1,617071,235576,249278,249278,235576,56791,20000,726998,,
1#AC1_1_1_5,1,105,75,60,1,617071,305755,319457,319457,305755,56791,20000,726998,,
1#AC1_1_1_6,1,104,75,60,1,617071,375934,389636,389636,375934,56791,20000,726998,,
1#AC1_1_1_7,1,103,75,60,1,617071,446366,460068,460068,446366,56791,20000,726998,,
1#AC1_1_1_8,1,102,75,60,1,617071,516292,529994,529994,516292,56791,20000,726998,,
1#AC1_2_1_1,1,101,75,60,1,617071,25441,38741,38741,25441,56791,20000,827023,,
1#AC1_2_1_2,1,100,75,60,1,617071,95218,108920,108920,95218,56791,20000,827023,,
1#AC1_2_1_3,1,99,75,60,1,617071,166195,179897,179897,166195,56791,20000,827023,,
1#AC1_2_1_4,1,98,75,60,1,617071,235576,249278,249278,235576,56791,20000,827023,,
1#AC1_2_1_5,1,97,75,60,1,617071,305755,319457,319457,305755,56791,20000,827023,,
1#AC1_2_1_6,1,96,75,60,1,617071,375934,389636,389636,375934,56791,20000,827023,,
1#AC1_2_1_7,1,95,75,60,1,617071,446366,460068,460068,446366,56791,20000,827023,,
1#AC1_2_1_8,1,94,75,60,1,617071,516292,529994,529994,516292,56791,20000,827023,,
1#AC1_3_1_1,1,93,75,60,1,617071,25441,38741,38741,25441,56791,20000,927215,,
1#AC1_3_1_2,1,92,75,60,1,617071,95218,108920,108920,95218,56791,20000,927215,,
1#AC1_3_1_3,1,91,75,60,1,617071,166195,179897,179897,166195,56791,20000,927215,,
1#AC1_3_1_4,1,90,75,60,1,617071,235576,249278,249278,235576,56791,20000,927215,,
1#AC1_3_1_5,1,89,75,60,1,617071,305755,319457,319457,305755,56791,20000,927215,,
1#AC1_3_1_6,1,88,75,60,1,617071,375934,389636,389636,375934,56791,20000,927215,,
1#AC1_3_1_7,1,87,75,60,1,617071,446366,460068,460068,446366,56791,20000,927215,,
1#AC1_3_1_8,1,86,75,60,1,617071,516292,529994,529994,516292,56791,20000,927215,,
1#AC1_4_1_1,1,85,50,140,1,617571,11350,20513,20513,11350,61597,20000,1079690,,
1#AC1_4_1_2,1,84,50,140,1,617571,72523,81686,81686,72523,61597,20000,1079690,,
1#AC1_4_1_3,1,83,50,140,1,617571,135759,144922,144922,135759,61597,20000,1079690,,
1#AC1_4_1_4,1,82,50,140,1,617571,198278,207441,207441,198278,61597,20000,1079690,,
1#AC1_4_1_5,1,81,50,140,1,617571,260828,269991,269991,260828,61597,20000,1079690,,
1#AC1_4_1_6,1,80,50,140,1,617571,323084,332247,332247,323084,61597,20000,1079690,,
1#AC1_4_1_7,1,79,50,140,1,617571,384378,393541,393541,384378,61597,20000,1079690,,
1#AC1_4_1_8,1,78,50,140,1,617571,447978,454799,454799,447978,61597,20000,1079690,,
1#AC1_4_1_9,1,77,50,140,1,617571,509434,517650,517650,509434,61597,20000,1079690,,
1#AC1_5_1_1,1,76,75,60,1,617071,25441,38741,38741,25441,56791,20000,1227197,,
1#AC1_5_1_2,1,75,75,60,1,617071,95218,108920,108920,95218,56791,20000,1227197,,
1#AC1_5_1_3,1,74,75,60,1,617071,166195,179897,179897,166195,56791,20000,1227197,,
1#AC1_5_1_4,1,73,75,60,1,617071,235576,249278,249278,235576,56791,20000,1227197,,
1#AC1_5_1_5,1,72,75,60,1,617071,305755,319457,319457,305755,56791,20000,1227197,,
1#AC1_5_1_6,1,71,75,60,1,617071,375934,389636,389636,375934,56791,20000,1227197,,
1#AC1_5_1_7,1,70,75,60,1,617071,446366,460068,460068,446366,56791,20000,1227197,,
1#AC1_5_1_8,1,69,75,60,1,617071,516292,529994,529994,516292,56791,20000,1227197,,
1#AC1_6_1_1,1,68,75,60,1,617071,25441,38741,38741,25441,56791,20000,1326577,,
1#AC1_6_1_2,1,67,75,60,1,617071,95218,108920,108920,95218,56791,20000,1326577,,
1#AC1_6_1_3,1,66,75,60,1,617071,166195,179897,179897,166195,56791,20000,1326577,,
1#AC1_6_1_4,1,65,75,60,1,617071,235576,249278,249278,235576,56791,20000,1326577,,
1#AC1_6_1_5,1,64,75,60,1,617071,305755,319457,319457,305755,56791,20000,1326577,,
1#AC1_6_1_6,1,63,75,60,1,617071,375934,389636,389636,375934,56791,20000,1326577,,
1#AC1_6_1_7,1,62,75,60,1,617071,446366,460068,460068,446366,56791,20000,1326577,,
1#AC1_6_1_8,1,61,75,60,1,617071,516292,529994,529994,516292,56791,20000,1326577,,
1#AC1_7_1_1,1,60,75,60,1,617071,25441,38741,38741,25441,56791,20000,1426581,,
1#AC1_7_1_2,1,59,75,60,1,617071,95218,108920,108920,95218,56791,20000,1426581,,
1#AC1_7_1_3,1,58,75,60,1,617071,166195,179897,179897,166195,56791,20000,1426581,,
1#AC1_7_1_4,1,57,75,60,1,617071,235576,249278,249278,235576,56791,20000,1426581,,
1#AC1_7_1_5,1,56,75,60,1,617071,305755,319457,319457,305755,56791,20000,1426581,,
1#AC1_7_1_6,1,55,75,60,1,617071,375934,389636,389636,375934,56791,20000,1426581,,
1#AC1_7_1_7,1,54,75,60,1,617071,446366,460068,460068,446366,56791,20000,1426581,,
1#AC1_7_1_8,1,53,75,60,1,617071,516292,529994,529994,516292,56791,20000,1426581,,
1#AC2_0_1_2,2,51,50,140,1,617571,800922,807327,807327,800922,61597,243886,10000,,
1#AC2_0_1_3,2,50,50,140,1,617571,895963,901768,901768,895963,61597,245492,10000,,
1#AC2_0_1_4,2,49,60,230,1,617571,988401,994906,994906,988401,61597,245492,10000,,6705
1#AC2_1_1_1,2,48,75,60,1,619071,723205,736203,736203,723205,55996,394244,10000,,
1#AC2_1_1_2,2,47,75,60,1,619071,793676,806781,806781,793676,55996,394244,10000,,
1#AC2_1_1_3,2,46,75,60,1,619071,863486,875259,875259,863486,55996,394244,10000,,
1#AC2_1_1_4,2,45,75,60,1,619071,933543,945185,945185,933543,55996,394244,10000,,
1#AC2_1_1_5,2,44,75,60,1,619071,1003262,1015111,1015111,1003262,55996,394244,10000,,
1#AC2_1_1_6,2,43,75,60,1,619071,1072723,1085037,1085037,1072723,55996,394244,10000,,
1#AC2_2_1_1,2,42,75,60,1,619071,723205,736203,736203,723205,55996,493536,10000,,
1#AC2_2_1_2,2,41,75,60,1,619071,793676,806781,806781,793676,55996,493536,10000,,
1#AC2_2_1_3,2,40,75,60,1,619071,863486,875259,875259,863486,55996,493536,10000,,
1#AC2_2_1_4,2,39,75,60,1,619071,933543,945185,945185,933543,55996,493536,10000,,
1#AC2_2_1_5,2,38,75,60,1,619071,1003262,1015111,1015111,1003262,55996,493536,10000,,
1#AC2_2_1_6,2,37,75,60,1,619071,1072723,1085037,1085037,1072723,55996,493536,10000,,
1#AC2_3_1_1,2,36,75,60,1,619071,723205,736203,736203,723205,55996,589109,10000,,
1#AC2_3_1_2,2,35,75,60,1,619071,793676,806781,806781,793676,55996,589109,10000,,
1#AC2_3_1_3,2,34,75,60,1,619071,863486,875259,875259,863486,55996,589109,10000,,
1#AC2_3_1_4,2,33,75,60,1,619071,933543,945185,945185,933543,55996,589109,10000,,
1#AC2_3_1_5,2,32,75,60,1,619071,1003262,1015111,1015111,1003262,55996,589109,10000,,
1#AC2_3_1_6,2,31,75,60,1,619071,1072723,1085037,1085037,1072723,55996,589109,10000,,
1#AC2_4_1_1,2,30,75,60,1,619071,723205,736203,736203,723205,56393,688666,10000,,
1#AC2_4_1_2,2,29,75,60,1,619071,793676,806781,806781,793676,56393,688666,10000,,
1#AC2_4_1_3,2,28,75,60,1,619071,863486,875259,875259,863486,56393,688666,10000,,
1#AC2_4_1_4,2,27,75,60,1,619071,933543,945185,945185,933543,56393,688666,10000,,
1#AC2_4_1_5,2,26,75,60,1,619071,1003262,1015111,1015111,1003262,56393,688666,10000,,
1#AC2_4_1_6,2,25,75,60,1,619071,1072723,1085037,1085037,1072723,56393,688666,10000,,
1#AC2_5_1_1,2,24,75,60,1,619071,723205,736203,736203,723205,56393,789294,10000,,
1#AC2_5_1_2,2,23,75,60,1,619071,793676,806781,806781,793676,56393,789294,10000,,
1#AC2_5_1_3,2,22,75,60,1,619071,863486,875259,875259,863486,56393,789294,10000,,
1#AC2_5_1_4,2,21,75,60,1,619071,933543,945185,945185,933543,56393,789294,10000,,
1#AC2_5_1_5,2,20,75,60,1,619071,1003262,1015111,1015111,1003262,56393,789294,10000,,
1#AC2_5_1_6,2,19,75,60,1,619071,1072723,1085037,1085037,1072723,56393,789294,10000,,
1#AC2_6_1_1,2,18,75,60,1,619071,723205,736203,736203,723205,56393,889634,10000,,
1#AC2_6_1_2,2,17,75,60,1,619071,793676,806781,806781,793676,56393,889634,10000,,
1#AC2_6_1_3,2,16,75,60,1,619071,863486,875259,875259,863486,56393,889634,10000,,
1#AC2_6_1_4,2,15,75,60,1,619071,933543,945185,945185,933543,56393,889634,10000,,
1#AC2_6_1_5,2,14,75,60,1,619071,1003262,1015111,1015111,1003262,56393,889634,10000,,
1#AC2_6_1_6,2,13,75,60,1,619071,1072723,1085037,1085037,1072723,56393,889634,10000,,
1#AC2_7_1_1,2,12,75,60,1,619071,723205,736203,736203,723205,56393,989366,10000,,
1#AC2_7_1_2,2,11,75,60,1,619071,793676,806781,806781,793676,56393,989366,10000,,
1#AC2_7_1_3,2,10,75,60,1,619071,863486,875259,875259,863486,56393,989366,10000,,
1#AC2_7_1_4,2,9,75,60,1,619071,933543,945185,945185,933543,56393,989366,10000,,
1#AC2_7_1_5,2,8,75,60,1,619071,1003262,1015111,1015111,1003262,56393,989366,10000,,
1#AC2_7_1_6,2,7,75,60,1,619071,1072723,1085037,1085037,1072723,56393,989366,10000,,
1#AC2_8_1_1,2,6,75,60,1,619071,723205,736203,736203,723205,56797,1091170,10000,,
1#AC2_8_1_2,2,5,75,60,1,619071,793676,806781,806781,793676,56797,1091170,10000,,
1#AC2_8_1_3,500,4,75,60,1,619071,863486,875259,875259,863486,56797,1091170,10000,,
1#AC2_8_1_4,300,3,75,60,1,619071,933543,945185,945185,933543,56797,1091170,10000,,
1#AC2_8_1_5,200,2,75,60,1,619071,1003262,1015111,1015111,1003262,56797,1091170,10000,,
1#AC2_8_1_6,100,1,75,60,1,619071,1072723,1085037,1085037,1072723,56797,1091170,10000,,
myproject/src/main/java/com/myproject/bean/excel/StoragePosExcel.java
查看文件 @
6cad4e7
...
@@ -13,6 +13,11 @@ public class StoragePosExcel {
...
@@ -13,6 +13,11 @@ public class StoragePosExcel {
//宽度(料盘尺寸)
//宽度(料盘尺寸)
private
int
w
;
private
int
w
;
/**
* 是否是回温库位
*/
private
boolean
isWarmPos
=
false
;
public
String
getPosName
()
{
public
String
getPosName
()
{
return
posName
;
return
posName
;
}
}
...
@@ -44,4 +49,12 @@ public class StoragePosExcel {
...
@@ -44,4 +49,12 @@ public class StoragePosExcel {
public
void
setPriority
(
double
priority
)
{
public
void
setPriority
(
double
priority
)
{
this
.
priority
=
priority
;
this
.
priority
=
priority
;
}
}
public
boolean
isWarmPos
()
{
return
isWarmPos
;
}
public
void
setWarmPos
(
boolean
warmPos
)
{
isWarmPos
=
warmPos
;
}
}
}
myproject/src/main/java/com/myproject/bean/json/ResultBean.java
0 → 100644
查看文件 @
6cad4e7
package
com
.
myproject
.
bean
.
json
;
import
org.apache.logging.log4j.LogManager
;
import
org.apache.logging.log4j.Logger
;
/**
* Created by sunke on 2019/12/12.
*/
public
class
ResultBean
{
protected
final
static
Logger
log
=
LogManager
.
getLogger
(
ResultBean
.
class
);
public
static
ResultBean
newErrorResult
(
int
code
,
String
msg
){
return
newErrorResult
(
code
,
msg
,
true
);
}
public
static
ResultBean
newErrorResult
(
int
code
,
String
msg
,
boolean
writeLog
){
ResultBean
result
=
new
ResultBean
();
result
.
setCode
(
code
);
result
.
setMsg
(
msg
);
if
(
writeLog
){
log
.
info
(
msg
);
}
return
result
;
}
public
static
ResultBean
newOkResult
(
String
msg
,
Object
data
){
ResultBean
result
=
new
ResultBean
();
result
.
setCode
(
0
);
result
.
setMsg
(
msg
);
result
.
setData
(
data
);
return
result
;
}
public
static
ResultBean
newOkResult
(
Object
data
){
return
newOkResult
(
"ok"
,
data
);
}
/**
* 结果码,0为正常,其他值表示异常
*/
private
int
code
;
/**
* 提示信息
*/
private
String
msg
;
/**
* 数据结果
*/
private
Object
data
;
public
int
getCode
()
{
return
code
;
}
public
void
setCode
(
int
code
)
{
this
.
code
=
code
;
}
public
Object
getData
()
{
return
data
;
}
public
void
setData
(
Object
data
)
{
this
.
data
=
data
;
}
public
String
getMsg
()
{
return
msg
;
}
public
void
setMsg
(
String
msg
)
{
this
.
msg
=
msg
;
}
}
myproject/src/main/java/com/myproject/bean/update/Barcode.java
查看文件 @
6cad4e7
...
@@ -25,13 +25,30 @@ public class Barcode extends BaseMongoBean {
...
@@ -25,13 +25,30 @@ public class Barcode extends BaseMongoBean {
private
int
type
=
StorageConstants
.
COMPONENT_TYPE
.
COMPONENT
;
private
int
type
=
StorageConstants
.
COMPONENT_TYPE
.
COMPONENT
;
//锡膏回温时间,小于回温时间不可出库
//锡膏回温时间,小于回温时间不可出库
private
int
warmTime
=
0
;
private
int
warmTime
=
0
;
/**
* 搅拌时间(分钟)
*/
private
int
mixTime
=
0
;
private
float
maxStorageTime
=
0
;
private
float
maxStorageTime
=
0
;
/**
/**
* 过期时间(入库时间+最大存储时间)
* 过期时间(入库时间+最大存储时间)
*/
*/
private
Date
expTime
;
private
Date
expTime
;
//过期状态,-1未入库0在库,1已出库正常,2已出库且已过期
//过期状态,-1未入库0在库,1已出库正常,2已出库且已过期
private
int
status
=
StorageConstants
.
BARCODE_STATUS
.
NEW
;
private
int
status
=
StorageConstants
.
BARCODE_STATUS
.
NEW
;
/**
* 锡膏状态
*/
private
int
solderStatus
=
StorageConstants
.
SOLDER_STATUS
.
NONE
;
/**
* 锡膏指定时间出库
*/
private
Date
needOutDate
;
//private int componentType = 0;
//private int componentType = 0;
private
String
partNumber
;
private
String
partNumber
;
//"供应商编号"
//"供应商编号"
...
@@ -90,6 +107,11 @@ public class Barcode extends BaseMongoBean {
...
@@ -90,6 +107,11 @@ public class Barcode extends BaseMongoBean {
private
long
putInTime
=
-
1
;
private
long
putInTime
=
-
1
;
/**
/**
* 开始回温时间
*/
private
long
startWarmTime
=
-
1
;
/**
* 入库时间
* 入库时间
*/
*/
private
Date
putInDate
;
private
Date
putInDate
;
...
@@ -278,6 +300,13 @@ public class Barcode extends BaseMongoBean {
...
@@ -278,6 +300,13 @@ public class Barcode extends BaseMongoBean {
this
.
type
=
type
;
this
.
type
=
type
;
}
}
/**
* 是否是锡膏
*/
public
boolean
isSolder
(){
return
type
==
StorageConstants
.
COMPONENT_TYPE
.
SOLDERPASTE
;
}
public
int
getWarmTime
()
{
public
int
getWarmTime
()
{
return
warmTime
;
return
warmTime
;
}
}
...
@@ -336,6 +365,9 @@ public class Barcode extends BaseMongoBean {
...
@@ -336,6 +365,9 @@ public class Barcode extends BaseMongoBean {
}
}
public
String
getPutInDateStr
(){
public
String
getPutInDateStr
(){
if
(
putInDate
==
null
){
return
""
;
}
return
DateUtil
.
toDateTimeString
(
putInDate
);
return
DateUtil
.
toDateTimeString
(
putInDate
);
}
}
...
@@ -550,6 +582,52 @@ public class Barcode extends BaseMongoBean {
...
@@ -550,6 +582,52 @@ public class Barcode extends BaseMongoBean {
this
.
msl
=
msl
;
this
.
msl
=
msl
;
}
}
public
int
getMixTime
()
{
return
mixTime
;
}
public
void
setMixTime
(
int
mixTime
)
{
this
.
mixTime
=
mixTime
;
}
public
long
getStartWarmTime
()
{
return
startWarmTime
;
}
public
void
setStartWarmTime
(
long
startWarmTime
)
{
this
.
startWarmTime
=
startWarmTime
;
}
public
int
getSolderStatus
()
{
if
(
solderStatus
==
StorageConstants
.
SOLDER_STATUS
.
REWARMING
){
//如果状态是回温中,且回温时间已经大于warmTime,修改状态为待搅拌
long
now
=
System
.
currentTimeMillis
();
if
(
startWarmTime
-
now
>
warmTime
*
60
*
60
*
1000
){
solderStatus
=
StorageConstants
.
SOLDER_STATUS
.
TO_BE_MIXED
;
}
}
return
solderStatus
;
}
public
void
setSolderStatus
(
int
solderStatus
)
{
this
.
solderStatus
=
solderStatus
;
}
public
Date
getNeedOutDate
()
{
return
needOutDate
;
}
public
void
setNeedOutDate
(
Date
needOutDate
)
{
this
.
needOutDate
=
needOutDate
;
}
public
String
getNeedOutDateStr
(){
if
(
needOutDate
==
null
){
return
""
;
}
return
DateUtil
.
toDateTimeString
(
needOutDate
);
}
// public void setNoChangeField(Barcode oldBarcode){
// public void setNoChangeField(Barcode oldBarcode){
// if(oldBarcode != null){
// if(oldBarcode != null){
// this.expireDate = oldBarcode.getExpireDate();
// this.expireDate = oldBarcode.getExpireDate();
...
...
myproject/src/main/java/com/myproject/bean/update/Component.java
查看文件 @
6cad4e7
...
@@ -41,6 +41,11 @@ public class Component extends BaseMongoBean {
...
@@ -41,6 +41,11 @@ public class Component extends BaseMongoBean {
private
int
warmTime
;
private
int
warmTime
;
/**
/**
* 搅拌时间(分钟)
*/
private
int
mixTime
;
/**
* 夹具编号
* 夹具编号
*/
*/
private
String
fixtureNumber
;
private
String
fixtureNumber
;
...
@@ -373,4 +378,19 @@ public class Component extends BaseMongoBean {
...
@@ -373,4 +378,19 @@ public class Component extends BaseMongoBean {
public
void
setValidDay
(
int
validDay
)
{
public
void
setValidDay
(
int
validDay
)
{
this
.
validDay
=
validDay
;
this
.
validDay
=
validDay
;
}
}
public
int
getMixTime
()
{
return
mixTime
;
}
public
void
setMixTime
(
int
mixTime
)
{
this
.
mixTime
=
mixTime
;
}
/**
* 是否是锡膏
*/
public
boolean
isSolder
(){
return
type
==
StorageConstants
.
COMPONENT_TYPE
.
SOLDERPASTE
;
}
}
}
myproject/src/main/java/com/myproject/bean/update/DataLog.java
查看文件 @
6cad4e7
...
@@ -113,6 +113,11 @@ public class DataLog extends BaseMongoBean /*implements Comparable<DataLog>*/ {
...
@@ -113,6 +113,11 @@ public class DataLog extends BaseMongoBean /*implements Comparable<DataLog>*/ {
private
String
memo
;
private
String
memo
;
/**
* 搅拌时间(锡膏搅拌任务使用)
*/
private
int
mixTime
;
public
String
getStorageName
()
{
public
String
getStorageName
()
{
return
storageName
;
return
storageName
;
}
}
...
@@ -295,6 +300,26 @@ public class DataLog extends BaseMongoBean /*implements Comparable<DataLog>*/ {
...
@@ -295,6 +300,26 @@ public class DataLog extends BaseMongoBean /*implements Comparable<DataLog>*/ {
}
}
/**
/**
* 是否是回温取料任务
*/
public
boolean
isRewarmTakingTask
(){
return
StorageConstants
.
OP
.
REWARM_TAKING
==
type
;
}
/**
* 是否是搅拌任务
*/
public
boolean
isMixTask
(){
return
StorageConstants
.
OP
.
MIX
==
type
;
}
/**
* 是否是回温放料任务
*/
public
boolean
isRewarmPuttingTask
(){
return
StorageConstants
.
OP
.
REWARM_PUTTING
==
type
;
}
/**
* 是否是出库任务
* 是否是出库任务
*/
*/
public
boolean
isCheckOutTask
(){
public
boolean
isCheckOutTask
(){
...
@@ -331,7 +356,7 @@ public class DataLog extends BaseMongoBean /*implements Comparable<DataLog>*/ {
...
@@ -331,7 +356,7 @@ public class DataLog extends BaseMongoBean /*implements Comparable<DataLog>*/ {
*/
*/
public
boolean
needReSendToClient
(){
public
boolean
needReSendToClient
(){
if
(
isCheckOutTask
()
&&
isExecuting
()){
if
(
isCheckOutTask
()
&&
isExecuting
()){
return
System
.
currentTimeMillis
()
-
super
.
getUpdateDate
().
getTime
()
>=
3
0
*
1000
;
return
System
.
currentTimeMillis
()
-
super
.
getUpdateDate
().
getTime
()
>=
6
0
*
1000
;
}
}
return
false
;
return
false
;
}
}
...
@@ -452,4 +477,12 @@ public class DataLog extends BaseMongoBean /*implements Comparable<DataLog>*/ {
...
@@ -452,4 +477,12 @@ public class DataLog extends BaseMongoBean /*implements Comparable<DataLog>*/ {
public
void
setMemo
(
String
memo
)
{
public
void
setMemo
(
String
memo
)
{
this
.
memo
=
memo
;
this
.
memo
=
memo
;
}
}
public
int
getMixTime
()
{
return
mixTime
;
}
public
void
setMixTime
(
int
mixTime
)
{
this
.
mixTime
=
mixTime
;
}
}
}
myproject/src/main/java/com/myproject/bean/update/Storage.java
查看文件 @
6cad4e7
...
@@ -186,6 +186,13 @@ public class Storage extends BaseMongoBean {
...
@@ -186,6 +186,13 @@ public class Storage extends BaseMongoBean {
return
StorageConstants
.
TYPE
.
CODESHELF
.
name
().
equals
(
type
);
return
StorageConstants
.
TYPE
.
CODESHELF
.
name
().
equals
(
type
);
}
}
/**
* 是否是锡膏料仓
*/
public
boolean
isSolderPaste
(){
return
StorageConstants
.
TYPE
.
SOLDERPASTE
.
name
().
equals
(
type
);
}
/**
/**
* 是否是料柜
* 是否是料柜
...
...
myproject/src/main/java/com/myproject/bean/update/StoragePos.java
查看文件 @
6cad4e7
...
@@ -29,6 +29,11 @@ public class StoragePos extends BaseMongoBean {
...
@@ -29,6 +29,11 @@ public class StoragePos extends BaseMongoBean {
private
boolean
enabled
=
true
;
private
boolean
enabled
=
true
;
//是否使用了
//是否使用了
private
boolean
used
=
false
;
private
boolean
used
=
false
;
/**
* 是否是回温库位,条码第一次入库是入库到冷藏库位,回温或二次入库时才入到回温库位
*/
private
boolean
warmPos
=
false
;
//Width
//Width
private
int
w
;
private
int
w
;
...
@@ -204,4 +209,12 @@ public class StoragePos extends BaseMongoBean {
...
@@ -204,4 +209,12 @@ public class StoragePos extends BaseMongoBean {
public
String
getSizeStr
(){
public
String
getSizeStr
(){
return
w
+
"x"
+
h
;
return
w
+
"x"
+
h
;
}
}
public
boolean
isWarmPos
()
{
return
warmPos
;
}
public
void
setWarmPos
(
boolean
warmPos
)
{
this
.
warmPos
=
warmPos
;
}
}
}
myproject/src/main/java/com/myproject/bean/utils/StatusBean.java
查看文件 @
6cad4e7
...
@@ -148,6 +148,16 @@ public class StatusBean {
...
@@ -148,6 +148,16 @@ public class StatusBean {
return
data
.
get
(
"code"
);
return
data
.
get
(
"code"
);
}
}
public
int
getWeight
(){
String
weightStr
=
data
.
get
(
"weight"
);
try
{
return
Integer
.
valueOf
(
weightStr
);
}
catch
(
Exception
e
){
}
return
0
;
}
/**
/**
* 获取库位信息
* 获取库位信息
*/
*/
...
@@ -221,14 +231,16 @@ public class StatusBean {
...
@@ -221,14 +231,16 @@ public class StatusBean {
/**
/**
* 入库时添加仓位及料盘大小信息(posId库位编号,plateW:料盘宽度,plateH:料盘高度,singleOut:是否出库到料仓门口)
* 入库时添加仓位及料盘大小信息(posId库位编号,plateW:料盘宽度,plateH:料盘高度,singleOut:是否出库到料仓门口)
*/
*/
public
void
addPosInfo
(
String
posId
,
int
plateW
,
int
plateH
,
boolean
isSingleOut
){
public
void
addPosInfo
(
String
barcode
,
String
posId
,
int
plateW
,
int
plateH
,
boolean
isSingleOut
){
String
originalPosId
=
data
.
get
(
"posId"
);
String
originalPosId
=
data
.
get
(
"posId"
);
String
originalPlateW
=
data
.
get
(
"plateW"
);
String
originalPlateW
=
data
.
get
(
"plateW"
);
String
originalPlateH
=
data
.
get
(
"plateH"
);
String
originalPlateH
=
data
.
get
(
"plateH"
);
String
originalBarcode
=
data
.
get
(
"barcode"
);
String
posIdStr
=
posId
;
String
posIdStr
=
posId
;
String
plateWStr
=
plateW
+
""
;
String
plateWStr
=
plateW
+
""
;
String
plateHStr
=
plateH
+
""
;
String
plateHStr
=
plateH
+
""
;
String
barcodeStr
=
barcode
+
""
;
if
(!
Strings
.
isNullOrEmpty
(
originalPosId
)){
if
(!
Strings
.
isNullOrEmpty
(
originalPosId
)){
posIdStr
=
originalPosId
+
"|"
+
posId
;
posIdStr
=
originalPosId
+
"|"
+
posId
;
}
}
...
@@ -240,9 +252,14 @@ public class StatusBean {
...
@@ -240,9 +252,14 @@ public class StatusBean {
if
(!
Strings
.
isNullOrEmpty
(
originalPlateH
)){
if
(!
Strings
.
isNullOrEmpty
(
originalPlateH
)){
plateHStr
=
originalPlateH
+
"|"
+
plateH
;
plateHStr
=
originalPlateH
+
"|"
+
plateH
;
}
}
if
(!
Strings
.
isNullOrEmpty
(
originalBarcode
)){
barcodeStr
=
originalBarcode
+
"|"
+
barcodeStr
;
}
data
.
put
(
"posId"
,
posIdStr
);
data
.
put
(
"posId"
,
posIdStr
);
data
.
put
(
"plateW"
,
plateWStr
);
data
.
put
(
"plateW"
,
plateWStr
);
data
.
put
(
"plateH"
,
plateHStr
);
data
.
put
(
"plateH"
,
plateHStr
);
data
.
put
(
"barcode"
,
barcodeStr
);
data
.
put
(
"singleOut"
,
isSingleOut
+
""
);
data
.
put
(
"singleOut"
,
isSingleOut
+
""
);
}
}
...
...
myproject/src/main/java/com/myproject/dao/mongo/IDataLogDao.java
查看文件 @
6cad4e7
...
@@ -50,5 +50,7 @@ public interface IDataLogDao extends IMongoDao {
...
@@ -50,5 +50,7 @@ public interface IDataLogDao extends IMongoDao {
*/
*/
List
<
DataLog
>
findByFeedPosId
(
String
feederPosId
);
List
<
DataLog
>
findByFeedPosId
(
String
feederPosId
);
List
<
DataLog
>
findUnFinishedTasks
();
List
<
DataLog
>
findHistory
(
String
barcode
,
int
num
);
List
<
DataLog
>
findHistory
(
String
barcode
,
int
num
);
}
}
myproject/src/main/java/com/myproject/dao/mongo/impl/DataLogDaoImpl.java
查看文件 @
6cad4e7
...
@@ -17,6 +17,7 @@ import org.springframework.data.mongodb.core.query.Update;
...
@@ -17,6 +17,7 @@ import org.springframework.data.mongodb.core.query.Update;
import
org.springframework.stereotype.Repository
;
import
org.springframework.stereotype.Repository
;
import
java.util.ArrayList
;
import
java.util.ArrayList
;
import
java.util.Calendar
;
import
java.util.Date
;
import
java.util.Date
;
import
java.util.List
;
import
java.util.List
;
...
@@ -169,6 +170,21 @@ public class DataLogDaoImpl extends AbstractMongoDao implements IDataLogDao {
...
@@ -169,6 +170,21 @@ public class DataLogDaoImpl extends AbstractMongoDao implements IDataLogDao {
}
}
@Override
@Override
public
List
<
DataLog
>
findUnFinishedTasks
(){
Criteria
c
=
Criteria
.
where
(
"status"
).
nin
(
StorageConstants
.
OP_STATUS
.
FINISHED
.
name
(),
StorageConstants
.
OP_STATUS
.
CANCEL
.
name
());
//只查找近12个小时未完成的任务
Calendar
calendar
=
Calendar
.
getInstance
();
calendar
.
add
(
Calendar
.
HOUR_OF_DAY
,-
12
);
c
.
and
(
"createDate"
).
gte
(
calendar
.
getTime
());
Query
query
=
Query
.
query
(
c
);
List
<
DataLog
>
unFinishedTasks
=
findByQuery
(
query
);
if
(
unFinishedTasks
==
null
){
unFinishedTasks
=
new
ArrayList
<>();
}
return
unFinishedTasks
;
}
@Override
public
List
<
DataLog
>
findHistory
(
String
barcode
,
int
num
)
{
public
List
<
DataLog
>
findHistory
(
String
barcode
,
int
num
)
{
Criteria
c
=
new
Criteria
();
Criteria
c
=
new
Criteria
();
if
(
barcode
!=
null
&&
!
barcode
.
isEmpty
()){
if
(
barcode
!=
null
&&
!
barcode
.
isEmpty
()){
...
...
myproject/src/main/java/com/myproject/manager/IStoragePosManager.java
查看文件 @
6cad4e7
...
@@ -44,7 +44,9 @@ public interface IStoragePosManager extends IManager<StoragePos> {
...
@@ -44,7 +44,9 @@ public interface IStoragePosManager extends IManager<StoragePos> {
List
<
StoragePos
>
getEmptyPosByLimitPn
(
String
storageId
,
String
limitPn
);
List
<
StoragePos
>
getEmptyPosByLimitPn
(
String
storageId
,
String
limitPn
);
StoragePos
getEmptyPosByStorage
(
Storage
storage
,
Barcode
barcode
,
List
<
Integer
>
inBoxIds
,
Collection
<
String
>
excludePosIds
)
throws
ValidateException
;
StoragePos
getEmptyPosByStorage
(
Storage
storage
,
Barcode
barcode
,
Collection
<
String
>
excludePosIds
)
throws
ValidateException
;
StoragePos
getEmptyWarmPos
(
Storage
storage
,
Barcode
barcode
,
Collection
<
String
>
excludePosIds
)
throws
ValidateException
;
int
countTotalStorageSize
(
String
storageId
);
int
countTotalStorageSize
(
String
storageId
);
...
...
myproject/src/main/java/com/myproject/manager/impl/BarcodeManagerImpl.java
查看文件 @
6cad4e7
...
@@ -67,6 +67,7 @@ public class BarcodeManagerImpl implements IBarcodeManager {
...
@@ -67,6 +67,7 @@ public class BarcodeManagerImpl implements IBarcodeManager {
}
}
barcode
.
setType
(
component
.
getType
());
barcode
.
setType
(
component
.
getType
());
barcode
.
setWarmTime
(
component
.
getWarmTime
());
barcode
.
setWarmTime
(
component
.
getWarmTime
());
barcode
.
setMixTime
(
component
.
getMixTime
());
barcode
.
setOtherField1
(
component
.
getProductionType
());
barcode
.
setOtherField1
(
component
.
getProductionType
());
barcode
.
setFixtureNumber
(
component
.
getFixtureNumber
());
barcode
.
setFixtureNumber
(
component
.
getFixtureNumber
());
if
(
barcode
.
getPlateSize
()
<=
0
){
if
(
barcode
.
getPlateSize
()
<=
0
){
...
...
myproject/src/main/java/com/myproject/manager/impl/StoragePosManagerImpl.java
查看文件 @
6cad4e7
...
@@ -92,8 +92,23 @@ public class StoragePosManagerImpl implements IStoragePosManager {
...
@@ -92,8 +92,23 @@ public class StoragePosManagerImpl implements IStoragePosManager {
return
storagePosList
;
return
storagePosList
;
}
}
@Override
@Override
public
StoragePos
getEmptyPosByStorage
(
Storage
storage
,
Barcode
barcode
,
List
<
Integer
>
inBoxIds
,
Collection
<
String
>
excludePosIds
)
throws
ValidateException
{
public
StoragePos
getEmptyPosByStorage
(
Storage
storage
,
Barcode
barcode
,
Collection
<
String
>
excludePosIds
)
throws
ValidateException
{
if
(
barcode
.
getUsedCount
()
>
0
){
//二次入库获取可用的回温库位
return
getEmptyPos
(
storage
,
barcode
,
excludePosIds
,
true
);
}
else
{
return
getEmptyPos
(
storage
,
barcode
,
excludePosIds
,
false
);
}
}
@Override
public
StoragePos
getEmptyWarmPos
(
Storage
storage
,
Barcode
barcode
,
Collection
<
String
>
excludePosIds
)
throws
ValidateException
{
return
getEmptyPos
(
storage
,
barcode
,
excludePosIds
,
true
);
}
private
StoragePos
getEmptyPos
(
Storage
storage
,
Barcode
barcode
,
Collection
<
String
>
excludePosIds
,
boolean
warmPos
)
throws
ValidateException
{
if
(
storage
==
null
){
if
(
storage
==
null
){
throw
new
ValidateException
(
"storage.error.notExist"
);
throw
new
ValidateException
(
"storage.error.notExist"
);
...
@@ -113,11 +128,19 @@ public class StoragePosManagerImpl implements IStoragePosManager {
...
@@ -113,11 +128,19 @@ public class StoragePosManagerImpl implements IStoragePosManager {
c
=
c
.
and
(
"enabled"
).
is
(
true
)
//可用
c
=
c
.
and
(
"enabled"
).
is
(
true
)
//可用
.
and
(
"used"
).
is
(
false
);
//未使用
.
and
(
"used"
).
is
(
false
);
//未使用
if
(
inBoxIds
!=
null
&&
!
inBoxIds
.
isEmpty
()){
if
(
storage
.
isSolderPaste
()){
String
inBoxIdStr
=
StringUtils
.
join
(
inBoxIds
,
"|"
);
if
(
warmPos
){
//匹配仓位名称以数字#开头的(inBoxIds 要用正则的|线隔开)
c
=
c
.
and
(
"warmPos"
).
is
(
true
);
//回温库位
//c = c.and("posName").regex("^("+inBoxIdStr+")#.*");
}
else
{
c
=
c
.
and
(
"warmPos"
).
ne
(
true
);
//不是回温库位
}
}
}
// if(inBoxIds != null && !inBoxIds.isEmpty()){
// String inBoxIdStr = StringUtils.join(inBoxIds,"|");
// //匹配仓位名称以数字#开头的(inBoxIds 要用正则的|线隔开)
// //c = c.and("posName").regex("^("+inBoxIdStr+")#.*");
// }
//去除的仓位
//去除的仓位
if
(
excludePosIds
!=
null
&&
!
excludePosIds
.
isEmpty
()){
if
(
excludePosIds
!=
null
&&
!
excludePosIds
.
isEmpty
()){
c
=
c
.
and
(
"id"
).
nin
(
excludePosIds
);
c
=
c
.
and
(
"id"
).
nin
(
excludePosIds
);
...
...
myproject/src/main/java/com/myproject/util/BarcodeRule.java
查看文件 @
6cad4e7
...
@@ -579,6 +579,12 @@ public class BarcodeRule {
...
@@ -579,6 +579,12 @@ public class BarcodeRule {
// //佳世达
// //佳世达
// rule ="BATCH;PRODATEyyyyMMdd[1:8:-1]EXPD[-1:-4:-1];PN[1:12:-1]SP[13:5:-1]QTY[-1:-5:-1];RI";
// rule ="BATCH;PRODATEyyyyMMdd[1:8:-1]EXPD[-1:-4:-1];PN[1:12:-1]SP[13:5:-1]QTY[-1:-5:-1];RI";
// codeStr = "L00002019090199951797;E20190901 0365;B8C.R2003.V81506072019090103000;R506072019102200356";
// codeStr = "L00002019090199951797;E20190901 0365;B8C.R2003.V81506072019090103000;R506072019102200356";
rule
=
"1;PN;BATCH;PRODATEyyyyMMdd;EXPDATEyyyyMMdd;QTY;RI"
;
codeStr
=
";RMK1608-K-B-10300;7B16081217B0;20200506;20250203;5000;000"
;
rule
=
"1;2;PN;BATCH[2:0:-1];5;6;EXPDATEyyyy/MM/dd[2:0:8];QTY[2:0:-1];8;9;10;RI[2:0:-1]"
;
codeStr
=
"锘緿M;IN13浠跺\uE69C缁勮灪涓濇壒09913涓栬揪;BM;PH11A-ZZG02;DDDDMO180525;GG624-71;SX2019/8/25 0:00:00;SL2;HG;DL;ZP;QT90CECB112D1448DA91F485D0AA984B08"
;
BarcodeRule
br
=
BarcodeRule
.
newRule
(
rule
);
BarcodeRule
br
=
BarcodeRule
.
newRule
(
rule
);
Barcode
b
=
br
.
toCodeBean
(
codeStr
).
getBarcode
();
Barcode
b
=
br
.
toCodeBean
(
codeStr
).
getBarcode
();
if
(
b
!=
null
){
if
(
b
!=
null
){
...
@@ -587,6 +593,7 @@ public class BarcodeRule {
...
@@ -587,6 +593,7 @@ public class BarcodeRule {
System
.
out
.
println
(
"Amount:"
+
b
.
getAmount
());
System
.
out
.
println
(
"Amount:"
+
b
.
getAmount
());
System
.
out
.
println
(
"BATCH:"
+
b
.
getBatch
());
System
.
out
.
println
(
"BATCH:"
+
b
.
getBatch
());
System
.
out
.
println
(
"MSL:"
+
b
.
getMsl
());
System
.
out
.
println
(
"MSL:"
+
b
.
getMsl
());
System
.
out
.
println
(
"PRODATE:"
+
b
.
getProduceDate
());
System
.
out
.
println
(
"EXPDATE:"
+
b
.
getExpireDate
());
System
.
out
.
println
(
"EXPDATE:"
+
b
.
getExpireDate
());
System
.
out
.
println
(
"Supllier:"
+
b
.
getProvider
());
System
.
out
.
println
(
"Supllier:"
+
b
.
getProvider
());
}
else
{
}
else
{
...
...
myproject/src/main/java/com/myproject/util/StorageConstants.java
查看文件 @
6cad4e7
...
@@ -66,6 +66,21 @@ public class StorageConstants {
...
@@ -66,6 +66,21 @@ public class StorageConstants {
*/
*/
public
final
static
int
ALARM_DATA
=
5
;
public
final
static
int
ALARM_DATA
=
5
;
/**
* 6 锡膏回温取料
*/
public
final
static
int
REWARM_TAKING
=
6
;
/**
* 7 锡膏回温放料
*/
public
final
static
int
REWARM_PUTTING
=
7
;
/**
* 8 锡膏搅拌
*/
public
final
static
int
MIX
=
8
;
}
}
...
@@ -161,6 +176,51 @@ public class StorageConstants {
...
@@ -161,6 +176,51 @@ public class StorageConstants {
* 13原点返回中
* 13原点返回中
*/
*/
public
final
static
int
RESET
=
13
;
public
final
static
int
RESET
=
13
;
/**
* 14 回温取料中
*/
public
final
static
int
REWARM_TAKING
=
14
;
/**
* 15 回温取料完成
*/
public
final
static
int
REWARM_TAKING_END
=
15
;
/**
* 16 回温放料中
*/
public
final
static
int
REWARM_PUTTING
=
16
;
/**
* 17 回温放料完成
*/
public
final
static
int
REWARM_PUTTING_END
=
17
;
/**
* 18 搅拌取料中
*/
public
final
static
int
MIX_TAKING
=
18
;
/**
* 19 等待搅拌
*/
public
final
static
int
WAIT_MIX
=
19
;
/**
* 20 搅拌执行中
*/
public
final
static
int
MIXING
=
20
;
/**
* 21 搅拌完成回仓
*/
public
final
static
int
MIX_PUTTING
=
21
;
/**
* 22 搅拌完成放回原来的仓中
*/
public
final
static
int
MIX_END
=
22
;
}
}
...
@@ -223,6 +283,11 @@ public class StorageConstants {
...
@@ -223,6 +283,11 @@ public class StorageConstants {
*/
*/
CODESHELF
(
"storage.type.codeShelf"
),
CODESHELF
(
"storage.type.codeShelf"
),
/**
* 10 锡膏料仓
*/
SOLDERPASTE
(
"storage.type.solderPaste"
),
;
;
private
String
key
;
private
String
key
;
...
@@ -495,6 +560,7 @@ public class StorageConstants {
...
@@ -495,6 +560,7 @@ public class StorageConstants {
* 2已出库且已过期
* 2已出库且已过期
*/
*/
public
static
int
OUT_EXPIRED
=
2
;
public
static
int
OUT_EXPIRED
=
2
;
}
}
/**
/**
...
@@ -572,4 +638,51 @@ public class StorageConstants {
...
@@ -572,4 +638,51 @@ public class StorageConstants {
/**补料已完成*/
/**补料已完成*/
public
static
int
ONE_FINISHED
=
6
;
public
static
int
ONE_FINISHED
=
6
;
}
}
/**
*
锡膏状态:
冷藏中
回温中 (从冷藏中取出,未达到回温时间)
待搅拌 (回温完成或二次入库重新搅拌,等待搅拌)
搅拌中 (搅拌动作执行中)
待出库 (已回温完成,搅拌完成或不需要搅拌,等待出库)
出库中 (出库动作执行中)
退库存储 (二次入库存储在暂存区,使用时可直接出库,与待出库状态一样)
*/
public
static
class
SOLDER_STATUS
{
public
static
int
NONE
=
0
;
/**
* 冷藏中
*/
public
static
int
UNDER_REFRIGERATION
=
1
;
/**
* 回温中 (从冷藏中取出,未达到回温时间)
*/
public
static
int
REWARMING
=
2
;
/**
* 待搅拌 (回温完成或二次入库重新搅拌,等待搅拌)
*/
public
static
int
TO_BE_MIXED
=
3
;
/**
* 搅拌中 (搅拌动作执行中)
*/
public
static
int
MIXING
=
4
;
/**
* 待出库 (已回温完成,搅拌完成或不需要搅拌,等待出库)
*/
public
static
int
TO_BE_OUT
=
5
;
/**
* 出库中 (出库动作执行中)
*/
public
static
int
OUTING
=
6
;
/**
* 退库存储 (二次入库存储在暂存区,使用时可直接出库,与待出库状态一样)
*/
public
static
int
RETREAT_STORAGE
=
7
;
}
}
}
myproject/src/main/java/com/myproject/webapp/controller/FileUploadController.java
查看文件 @
6cad4e7
...
@@ -17,6 +17,7 @@ import com.myproject.util.StorageConstants;
...
@@ -17,6 +17,7 @@ import com.myproject.util.StorageConstants;
import
com.myproject.webapp.controller.webService.DataCache
;
import
com.myproject.webapp.controller.webService.DataCache
;
import
org.apache.commons.beanutils.BeanUtils
;
import
org.apache.commons.beanutils.BeanUtils
;
import
org.apache.commons.lang3.StringUtils
;
import
org.apache.commons.lang3.StringUtils
;
import
org.apache.logging.log4j.util.Strings
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Controller
;
import
org.springframework.stereotype.Controller
;
import
org.springframework.web.bind.annotation.ModelAttribute
;
import
org.springframework.web.bind.annotation.ModelAttribute
;
...
@@ -301,6 +302,19 @@ public class FileUploadController extends BaseFormController {
...
@@ -301,6 +302,19 @@ public class FileUploadController extends BaseFormController {
return
msg
;
return
msg
;
}
}
private
int
getIndex
(
CsvReader
csvRead
,
String
headerStr
,
String
headerAlias
)
throws
ValidateException
,
IOException
{
int
index
=
csvRead
.
getIndex
(
headerStr
);
if
(
index
==
-
1
){
index
=
csvRead
.
getIndex
(
headerAlias
);
if
(
index
==
-
1
){
log
.
info
(
"未包含["
+
headerStr
+
"]或 ["
+
headerAlias
+
"]列"
);
throw
new
ValidateException
(
"未包含["
+
headerStr
+
"]或 ["
+
headerAlias
+
"]列"
);
}
}
return
index
;
}
/**
/**
*
*
* @param fileURL
* @param fileURL
...
@@ -323,38 +337,19 @@ public class FileUploadController extends BaseFormController {
...
@@ -323,38 +337,19 @@ public class FileUploadController extends BaseFormController {
csvRead
.
setSkipEmptyRecords
(
true
);
//忽略空行
csvRead
.
setSkipEmptyRecords
(
true
);
//忽略空行
csvRead
.
setTrimWhitespace
(
true
);
//去除空格
csvRead
.
setTrimWhitespace
(
true
);
//去除空格
csvRead
.
readHeaders
();
csvRead
.
readHeaders
();
int
posIndex
=
csvRead
.
getIndex
(
"位置"
);
int
posIndex
=
getIndex
(
csvRead
,
"位置"
,
"pos"
);
if
(
posIndex
==
-
1
){
int
priIndex
=
getIndex
(
csvRead
,
"优先级"
,
"pri"
);
posIndex
=
csvRead
.
getIndex
(
"pos"
);
int
hIndex
=
getIndex
(
csvRead
,
"高度"
,
"h"
);
if
(
posIndex
==
-
1
){
int
wIndex
=
getIndex
(
csvRead
,
"宽度"
,
"w"
);
log
.
info
(
"未包含【位置】或【pos】列"
);
return
"必须包含[位置]列"
;
int
typeIndex
=
-
1
;
}
try
{
}
typeIndex
=
getIndex
(
csvRead
,
"库位类型"
,
"posType"
);
int
priIndex
=
csvRead
.
getIndex
(
"优先级"
);
}
catch
(
Exception
e
){
if
(
priIndex
==
-
1
){
//库位类型这一列,没有也可以正常导入
priIndex
=
csvRead
.
getIndex
(
"pri"
);
if
(
priIndex
==
-
1
){
log
.
info
(
"未包含【优先级】或【pri】列"
);
return
"必须包含[优先级]列"
;
}
}
int
hIndex
=
csvRead
.
getIndex
(
"高度"
);
if
(
hIndex
==
-
1
){
hIndex
=
csvRead
.
getIndex
(
"h"
);
if
(
hIndex
==
-
1
){
log
.
info
(
"未包含【高度】或【h】列"
);
return
"必须包含【高度】列"
;
}
}
int
wIndex
=
csvRead
.
getIndex
(
"宽度"
);
if
(
wIndex
==
-
1
){
wIndex
=
csvRead
.
getIndex
(
"w"
);
if
(
wIndex
==
-
1
){
log
.
info
(
"未包含【宽度】或【w】列"
);
return
"必须包含【宽度】列"
;
}
}
}
List
<
StoragePosExcel
>
list
=
new
ArrayList
<
StoragePosExcel
>();
List
<
StoragePosExcel
>
list
=
new
ArrayList
<
StoragePosExcel
>();
while
(
csvRead
.
readRecord
()){
while
(
csvRead
.
readRecord
()){
String
[]
lineValues
=
csvRead
.
getValues
();
String
[]
lineValues
=
csvRead
.
getValues
();
...
@@ -362,6 +357,21 @@ public class FileUploadController extends BaseFormController {
...
@@ -362,6 +357,21 @@ public class FileUploadController extends BaseFormController {
String
priorityStr
=
lineValues
[
priIndex
];
String
priorityStr
=
lineValues
[
priIndex
];
String
hStr
=
lineValues
[
hIndex
];
String
hStr
=
lineValues
[
hIndex
];
String
wStr
=
lineValues
[
wIndex
];
String
wStr
=
lineValues
[
wIndex
];
String
typeStr
=
""
;
boolean
isWarmPos
=
false
;
if
(
typeIndex
!=
-
1
){
typeStr
=
lineValues
[
typeIndex
];
if
(
Strings
.
isNotBlank
(
typeStr
)){
//只导入库为类型为1或2的
if
(
typeStr
.
equals
(
"1"
)){
//1=冷藏
isWarmPos
=
false
;
}
else
if
(
typeStr
.
equals
(
"2"
)){
//2=回温
isWarmPos
=
true
;
}
else
{
continue
;
}
}
}
if
(
posName
.
isEmpty
()
||
priorityStr
.
isEmpty
()
||
hStr
.
isEmpty
()
||
wStr
.
isEmpty
()){
if
(
posName
.
isEmpty
()
||
priorityStr
.
isEmpty
()
||
hStr
.
isEmpty
()
||
wStr
.
isEmpty
()){
log
.
warn
(
"行[posName="
+
posName
+
","
+
"priority="
+
priorityStr
+
",h="
+
hStr
+
",w="
+
wStr
+
"]中有空白内容,此行忽略"
);
log
.
warn
(
"行[posName="
+
posName
+
","
+
"priority="
+
priorityStr
+
",h="
+
hStr
+
",w="
+
wStr
+
"]中有空白内容,此行忽略"
);
}
else
{
}
else
{
...
@@ -370,6 +380,7 @@ public class FileUploadController extends BaseFormController {
...
@@ -370,6 +380,7 @@ public class FileUploadController extends BaseFormController {
posInfo
.
setPriority
(
Double
.
valueOf
(
priorityStr
));
posInfo
.
setPriority
(
Double
.
valueOf
(
priorityStr
));
posInfo
.
setH
(
Integer
.
valueOf
(
hStr
));
posInfo
.
setH
(
Integer
.
valueOf
(
hStr
));
posInfo
.
setW
(
Integer
.
valueOf
(
wStr
));
posInfo
.
setW
(
Integer
.
valueOf
(
wStr
));
posInfo
.
setWarmPos
(
isWarmPos
);
list
.
add
(
posInfo
);
list
.
add
(
posInfo
);
}
}
}
}
...
@@ -389,6 +400,7 @@ public class FileUploadController extends BaseFormController {
...
@@ -389,6 +400,7 @@ public class FileUploadController extends BaseFormController {
storagePos
.
setW
(
storagePosExcel
.
getW
());
storagePos
.
setW
(
storagePosExcel
.
getW
());
storagePos
.
setH
(
storagePosExcel
.
getH
());
storagePos
.
setH
(
storagePosExcel
.
getH
());
storagePos
.
setStorageId
(
storage
.
getId
());
storagePos
.
setStorageId
(
storage
.
getId
());
storagePos
.
setWarmPos
(
storagePosExcel
.
isWarmPos
());
storagePosManager
.
save
(
storagePos
);
storagePosManager
.
save
(
storagePos
);
}
}
}
}
...
...
myproject/src/main/java/com/myproject/webapp/controller/barcode/BarcodeGenerateController.java
查看文件 @
6cad4e7
...
@@ -82,6 +82,7 @@ public class BarcodeGenerateController extends BaseUpdateController {
...
@@ -82,6 +82,7 @@ public class BarcodeGenerateController extends BaseUpdateController {
barcode
.
setPlateSize
(
component
.
getPlateSize
());
barcode
.
setPlateSize
(
component
.
getPlateSize
());
barcode
.
setType
(
component
.
getType
());
barcode
.
setType
(
component
.
getType
());
barcode
.
setWarmTime
(
component
.
getWarmTime
());
barcode
.
setWarmTime
(
component
.
getWarmTime
());
barcode
.
setMixTime
(
component
.
getMixTime
());
barcode
.
setMaxStorageTime
(
component
.
getMaxStorageTime
());
barcode
.
setMaxStorageTime
(
component
.
getMaxStorageTime
());
if
(
barcode
.
getAmount
()
==
0
)
{
if
(
barcode
.
getAmount
()
==
0
)
{
barcode
.
setAmount
(
component
.
getAmount
());
barcode
.
setAmount
(
component
.
getAmount
());
...
...
myproject/src/main/java/com/myproject/webapp/controller/barcode/BarcodeUpdateController.java
查看文件 @
6cad4e7
...
@@ -116,8 +116,9 @@ public class BarcodeUpdateController extends BaseUpdateController {
...
@@ -116,8 +116,9 @@ public class BarcodeUpdateController extends BaseUpdateController {
if
(
barcode
==
null
){
if
(
barcode
==
null
){
throw
new
ValidateException
(
"barcode.error.notFound"
,
"未找到相关条码"
);
throw
new
ValidateException
(
"barcode.error.notFound"
,
"未找到相关条码"
);
}
}
if
(
barcode
.
getUsedCount
()>
0
){
StoragePos
pos
=
storagePosManager
.
getByBarcode
(
barcode
.
getBarcode
());
//throw new ValidateException("已被使用的条码无法删除");
if
(
pos
!=
null
)
{
//已经在库中,更新数量备注等相关信息
throw
new
ValidateException
(
"barcode.error.used"
,
"已被使用的条码无法删除"
);
}
}
barcodeManager
.
delete
(
barcode
);
barcodeManager
.
delete
(
barcode
);
saveMessage
(
request
,
getText
(
"barcode.deleteSuccess"
,
request
.
getLocale
()));
saveMessage
(
request
,
getText
(
"barcode.deleteSuccess"
,
request
.
getLocale
()));
...
...
myproject/src/main/java/com/myproject/webapp/controller/component/ReelNumModifyController.java
查看文件 @
6cad4e7
...
@@ -3,6 +3,7 @@ package com.myproject.webapp.controller.component;
...
@@ -3,6 +3,7 @@ package com.myproject.webapp.controller.component;
import
com.google.common.base.Strings
;
import
com.google.common.base.Strings
;
import
com.myproject.bean.CodeBean
;
import
com.myproject.bean.CodeBean
;
import
com.myproject.bean.update.Barcode
;
import
com.myproject.bean.update.Barcode
;
import
com.myproject.bean.update.Storage
;
import
com.myproject.bean.update.StoragePos
;
import
com.myproject.bean.update.StoragePos
;
import
com.myproject.exception.ValidateException
;
import
com.myproject.exception.ValidateException
;
import
com.myproject.manager.IBarcodeManager
;
import
com.myproject.manager.IBarcodeManager
;
...
@@ -48,19 +49,28 @@ public class ReelNumModifyController extends BaseController {
...
@@ -48,19 +49,28 @@ public class ReelNumModifyController extends BaseController {
return
"数量不能为空"
;
return
"数量不能为空"
;
}
}
try
{
try
{
int
a
mount
=
Integer
.
valueOf
(
num
);
int
newA
mount
=
Integer
.
valueOf
(
num
);
CodeBean
codeBean
=
dataCache
.
resolveSingleCode
(
barcode
);
CodeBean
codeBean
=
dataCache
.
resolveSingleCode
(
barcode
);
Barcode
br
=
codeBean
.
getBarcode
();
Barcode
br
=
codeBean
.
getBarcode
();
if
(
br
!=
null
){
if
(
br
!=
null
){
log
.
info
(
"更新条码["
+
br
.
getBarcode
()+
"]的数量["
+
br
.
getAmount
()+
"]为:"
+
a
mount
);
log
.
info
(
"更新条码["
+
br
.
getBarcode
()+
"]的数量["
+
br
.
getAmount
()+
"]为:"
+
newA
mount
);
br
.
setAmount
(
a
mount
);
br
.
setAmount
(
newA
mount
);
barcodeManager
.
save
(
br
);
barcodeManager
.
save
(
br
);
StoragePos
pos
=
storagePosManager
.
getByBarcode
(
br
.
getBarcode
());
StoragePos
pos
=
storagePosManager
.
getByBarcode
(
br
.
getBarcode
());
if
(
pos
!=
null
){
if
(
pos
!=
null
){
Barcode
barcodeInPos
=
pos
.
getBarcode
();
Barcode
barcodeInPos
=
pos
.
getBarcode
();
barcodeInPos
.
setAmount
(
a
mount
);
barcodeInPos
.
setAmount
(
newA
mount
);
storagePosManager
.
save
(
pos
);
storagePosManager
.
save
(
pos
);
log
.
info
(
"更新库位["
+
pos
.
getPosName
()+
"]中条码数量为:"
+
amount
);
log
.
info
(
"更新库位["
+
pos
.
getPosName
()+
"]中条码数量为:"
+
newAmount
);
int
oldAmount
=
barcodeInPos
.
getAmount
();
int
diffAount
=
newAmount
-
oldAmount
;
if
(
diffAount
!=
0
){
//更新库存
Storage
storage
=
dataCache
.
getStorageById
(
pos
.
getStorageId
());
dataCache
.
updateInventoryAmount
(
storage
.
getCid
(),
barcodeInPos
.
getPartNumber
(),
diffAount
);
}
}
}
}
else
{
}
else
{
throw
new
ValidateException
(
codeBean
.
getErrorCode
(),
codeBean
.
getParams
(),
codeBean
.
getError
());
throw
new
ValidateException
(
codeBean
.
getErrorCode
(),
codeBean
.
getParams
(),
codeBean
.
getError
());
...
...
myproject/src/main/java/com/myproject/webapp/controller/storage/ComponentUpdateController.java
查看文件 @
6cad4e7
...
@@ -80,7 +80,7 @@ public class ComponentUpdateController extends BaseUpdateController{
...
@@ -80,7 +80,7 @@ public class ComponentUpdateController extends BaseUpdateController{
}
else
{
}
else
{
component
=
new
Component
();
component
=
new
Component
();
if
(
componentType
==
StorageConstants
.
COMPONENT_TYPE
.
SOLDERPASTE
){
if
(
componentType
==
StorageConstants
.
COMPONENT_TYPE
.
SOLDERPASTE
){
component
.
setFixtureNumber
(
StorageConstants
.
PACKAGE_TYPE
.
SOLDER_FIXTURE
.
getCode
());
//
component.setFixtureNumber(StorageConstants.PACKAGE_TYPE.SOLDER_FIXTURE.getCode());
}
else
if
(
componentType
==
StorageConstants
.
COMPONENT_TYPE
.
PCB
){
}
else
if
(
componentType
==
StorageConstants
.
COMPONENT_TYPE
.
PCB
){
component
.
setFixtureNumber
(
StorageConstants
.
PACKAGE_TYPE
.
PCB_FIXTURE
.
getCode
());
component
.
setFixtureNumber
(
StorageConstants
.
PACKAGE_TYPE
.
PCB_FIXTURE
.
getCode
());
}
}
...
@@ -102,21 +102,21 @@ public class ComponentUpdateController extends BaseUpdateController{
...
@@ -102,21 +102,21 @@ public class ComponentUpdateController extends BaseUpdateController{
case
StorageConstants
.
SAVE
:
case
StorageConstants
.
SAVE
:
//锡膏和 PCB必须要有夹具
//锡膏和 PCB必须要有夹具
if
(
component
.
getType
()
==
StorageConstants
.
COMPONENT_TYPE
.
SOLDERPASTE
){
//
if(component.getType() == StorageConstants.COMPONENT_TYPE.SOLDERPASTE){
if
(
Strings
.
isNullOrEmpty
(
component
.
getFixtureNumber
())){
//
if(Strings.isNullOrEmpty(component.getFixtureNumber())){
log
.
info
(
"夹具编号不能为空"
);
//
log.info("夹具编号不能为空");
throw
new
ValidateException
(
"component.error.notFound"
,
"夹具编号不能为空"
);
//
throw new ValidateException("component.error.notFound","夹具编号不能为空");
}
else
{
//
}else {
Component
fixture
=
componentmanager
.
findByPartNumber
(
component
.
getFixtureNumber
());
//
Component fixture = componentmanager.findByPartNumber(component.getFixtureNumber());
if
(
fixture
==
null
){
//
if(fixture == null){
log
.
info
(
"不存在编号为【"
+
component
.
getFixtureNumber
()+
"】的夹具"
);
//
log.info("不存在编号为【"+component.getFixtureNumber()+"】的夹具");
throw
new
ValidateException
(
"component.error.notExist"
,
new
String
[]{
component
.
getFixtureNumber
()},
"不存在编号为【"
+
component
.
getFixtureNumber
()+
"】的夹具"
);
//
throw new ValidateException("component.error.notExist",new String[]{component.getFixtureNumber()},"不存在编号为【"+component.getFixtureNumber()+"】的夹具");
}
else
{
//
}else{
component
.
setPlateSize
(
fixture
.
getPlateSize
());
//
component.setPlateSize(fixture.getPlateSize());
component
.
setHeight
(
fixture
.
getHeight
());
//
component.setHeight(fixture.getHeight());
}
//
}
}
//
}
}
//
}
//PCB由于夹具和 PCB码不能同时扫到,这里去掉夹具绑定,
//PCB由于夹具和 PCB码不能同时扫到,这里去掉夹具绑定,
if
(
component
.
getType
()
==
StorageConstants
.
COMPONENT_TYPE
.
PCB
){
if
(
component
.
getType
()
==
StorageConstants
.
COMPONENT_TYPE
.
PCB
){
component
.
setFixtureNumber
(
""
);
component
.
setFixtureNumber
(
""
);
...
@@ -134,6 +134,7 @@ public class ComponentUpdateController extends BaseUpdateController{
...
@@ -134,6 +134,7 @@ public class ComponentUpdateController extends BaseUpdateController{
List
<
Barcode
>
barcodes
=
barcodeDao
.
findByQuery
(
barcodeQuery
);
List
<
Barcode
>
barcodes
=
barcodeDao
.
findByQuery
(
barcodeQuery
);
for
(
Barcode
barcode
:
barcodes
)
{
for
(
Barcode
barcode
:
barcodes
)
{
barcode
.
setWarmTime
(
component
.
getWarmTime
());
barcode
.
setWarmTime
(
component
.
getWarmTime
());
barcode
.
setMixTime
(
component
.
getMixTime
());
barcode
.
setMaxStorageTime
(
component
.
getMaxStorageTime
());
barcode
.
setMaxStorageTime
(
component
.
getMaxStorageTime
());
barcodeDao
.
save
(
barcode
);
barcodeDao
.
save
(
barcode
);
}
}
...
@@ -144,6 +145,7 @@ public class ComponentUpdateController extends BaseUpdateController{
...
@@ -144,6 +145,7 @@ public class ComponentUpdateController extends BaseUpdateController{
for
(
StoragePos
pos
:
poses
){
for
(
StoragePos
pos
:
poses
){
pos
.
getBarcode
().
setType
(
component
.
getType
());
pos
.
getBarcode
().
setType
(
component
.
getType
());
pos
.
getBarcode
().
setWarmTime
(
component
.
getWarmTime
());
pos
.
getBarcode
().
setWarmTime
(
component
.
getWarmTime
());
pos
.
getBarcode
().
setMixTime
(
component
.
getMixTime
());
pos
.
getBarcode
().
setMaxStorageTime
(
component
.
getMaxStorageTime
());
pos
.
getBarcode
().
setMaxStorageTime
(
component
.
getMaxStorageTime
());
//pos.setCreateDate(new Date(System.currentTimeMillis() - 24 * 60 * 60 * 1000));
//pos.setCreateDate(new Date(System.currentTimeMillis() - 24 * 60 * 60 * 1000));
pos
.
setCanCheckOutTime
(
pos
.
getBarcode
().
getReachWarmTime
());
pos
.
setCanCheckOutTime
(
pos
.
getBarcode
().
getReachWarmTime
());
...
...
myproject/src/main/java/com/myproject/webapp/controller/storage/ShelfController.java
查看文件 @
6cad4e7
...
@@ -70,7 +70,7 @@ public class ShelfController extends BaseController {
...
@@ -70,7 +70,7 @@ public class ShelfController extends BaseController {
Barcode
barcode
=
barcodeManager
.
findByBarcode
(
code
);
Barcode
barcode
=
barcodeManager
.
findByBarcode
(
code
);
if
(
barcode
!=
null
){
if
(
barcode
!=
null
){
try
{
try
{
StoragePos
pos
=
storagePosManager
.
getEmptyPosByStorage
(
storage
,
barcode
,
new
ArrayList
<
Integer
>(),
new
ArrayList
<
String
>());
StoragePos
pos
=
storagePosManager
.
getEmptyPosByStorage
(
storage
,
barcode
,
new
ArrayList
<
String
>());
if
(
pos
!=
null
){
if
(
pos
!=
null
){
log
.
info
(
"查找到空位"
+
pos
.
getPosName
()+
",点亮对应的库位"
);
log
.
info
(
"查找到空位"
+
pos
.
getPosName
()+
",点亮对应的库位"
);
StorageDataController
.
addOp
(
cid
,
"open"
,
pos
.
getPosName
());
StorageDataController
.
addOp
(
cid
,
"open"
,
pos
.
getPosName
());
...
...
myproject/src/main/java/com/myproject/webapp/controller/storage/SolderBoxController.java
0 → 100644
查看文件 @
6cad4e7
package
com
.
myproject
.
webapp
.
controller
.
storage
;
import
com.google.common.base.Strings
;
import
com.google.common.collect.Lists
;
import
com.myproject.bean.CodeBean
;
import
com.myproject.bean.json.ResultBean
;
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.dao.mongo.IDataLogDao
;
import
com.myproject.exception.ValidateException
;
import
com.myproject.manager.IBarcodeManager
;
import
com.myproject.manager.IStoragePosManager
;
import
com.myproject.util.DateUtil
;
import
com.myproject.util.StorageConstants
;
import
com.myproject.webapp.controller.webService.DataCache
;
import
com.myproject.webapp.controller.webService.ITaskService
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Controller
;
import
org.springframework.web.bind.annotation.PathVariable
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RequestMethod
;
import
org.springframework.web.bind.annotation.ResponseBody
;
import
javax.servlet.http.HttpServletRequest
;
import
java.text.ParseException
;
import
java.util.*
;
import
java.util.concurrent.ConcurrentHashMap
;
/**
* 锡膏料仓
*/
@Controller
public
class
SolderBoxController
extends
BaseController
{
@Autowired
private
DataCache
dataCache
;
@Autowired
private
ITaskService
taskService
;
@Autowired
private
IStoragePosManager
storagePosManager
;
@Autowired
private
IBarcodeManager
barcodeManager
;
@RequestMapping
(
"/storage/solder/{cid}"
)
public
String
solderView
(
@PathVariable
String
cid
,
HttpServletRequest
request
){
request
.
getSession
().
setAttribute
(
"show"
,
cid
);
Storage
storage
=
dataCache
.
getStorage
(
cid
);
request
.
setAttribute
(
"storage"
,
storage
);
return
"storage/solderBox"
;
}
/**
* 查找下一个空位,并且点亮灯
*/
@RequestMapping
(
"/service/store/solder/listNotEmpty"
)
@ResponseBody
public
List
<
StoragePos
>
checkAll
(
HttpServletRequest
request
){
String
cid
=
request
.
getParameter
(
"cid"
);
Storage
storage
=
dataCache
.
getStorage
(
cid
);
List
<
StoragePos
>
notEmptyPosList
=
storagePosManager
.
findNotEmptyByStorageId
(
storage
.
getId
());
return
notEmptyPosList
;
}
@RequestMapping
(
"/service/store/solder/outSolder"
)
@ResponseBody
public
String
outSolder
(
HttpServletRequest
request
){
String
pids
=
request
.
getParameter
(
"pids"
);
String
dateStr
=
request
.
getParameter
(
"outDate"
);
Date
outDate
=
null
;
if
(!
Strings
.
isNullOrEmpty
(
dateStr
)){
try
{
outDate
=
DateUtil
.
toDate
(
dateStr
,
"yyyy-MM-dd HH:mm"
);
}
catch
(
ParseException
e
)
{
}
}
if
(
outDate
==
null
){
outDate
=
new
Date
();
}
for
(
String
pid
:
pids
.
split
(
";"
)){
StoragePos
pos
=
storagePosManager
.
get
(
pid
);
if
(
pos
==
null
){
return
"位置["
+
pid
+
"]不存在"
;
}
log
.
info
(
"出库位置仓位【"
+
pos
.
getPosName
()+
"】"
+
dateStr
);
try
{
Barcode
barcode
=
pos
.
getBarcode
();
barcode
.
setNeedOutDate
(
outDate
);
barcodeManager
.
save
(
barcode
);
pos
.
setBarcode
(
barcode
);
storagePosManager
.
save
(
pos
);
}
catch
(
ValidateException
e
)
{
}
}
return
"1操作成功"
;
}
@RequestMapping
(
value
=
"/service/store/solder/matchMixSolder"
)
@ResponseBody
public
ResultBean
matchMixSolder
(
HttpServletRequest
request
)
{
String
barcode
=
request
.
getParameter
(
"barcode"
);
if
(
Strings
.
isNullOrEmpty
(
barcode
)){
return
ResultBean
.
newErrorResult
(
2001
,
"参数[barcode]不能为空"
);
}
DataLog
firstMixTask
=
null
;
Collection
<
DataLog
>
queueTasks
=
taskService
.
getQueueTasks
();
for
(
DataLog
queueTask
:
queueTasks
)
{
if
(
queueTask
.
isMixTask
()
&&
queueTask
.
isExecuting
()
&&
queueTask
.
getBarcode
().
equals
(
barcode
)){
firstMixTask
=
queueTask
;
break
;
}
}
if
(
firstMixTask
!=
null
){
String
cid
=
firstMixTask
.
getCid
();
int
weight
=
firstMixTask
.
getNum
();
int
mixTime
=
firstMixTask
.
getMixTime
();
for
(
DataLog
queueTask
:
queueTasks
)
{
if
(
queueTask
.
getBarcode
().
equals
(
barcode
)){
continue
;
}
if
(
queueTask
.
getCid
().
equals
(
cid
)
&&
queueTask
.
isMixTask
()
&&
mixTime
==
queueTask
.
getMixTime
()){
//搅拌时间相同, 重量相差在10%以内
float
diffWeight
=
Math
.
abs
(
queueTask
.
getNum
()
-
weight
);
float
diffRate
=
diffWeight
/
weight
;
if
(
diffRate
<=
0.1
){
Map
<
String
,
Object
>
resultMap
=
new
HashMap
<>();
resultMap
.
put
(
"posId"
,
queueTask
.
getPosName
());
resultMap
.
put
(
"barcode"
,
queueTask
.
getBarcode
());
resultMap
.
put
(
"weight"
,
queueTask
.
getNum
()+
""
);
resultMap
.
put
(
"mixTime"
,
queueTask
.
getMixTime
());
return
ResultBean
.
newOkResult
(
resultMap
);
}
}
}
return
ResultBean
.
newErrorResult
(
2002
,
"未找到与["
+
barcode
+
"]重量匹配的搅拌任务"
);
}
return
ResultBean
.
newErrorResult
(
2003
,
"未找到条码["
+
barcode
+
"]正在执行的搅拌任务"
);
}
}
myproject/src/main/java/com/myproject/webapp/controller/webService/ITaskService.java
查看文件 @
6cad4e7
...
@@ -67,4 +67,6 @@ public interface ITaskService {
...
@@ -67,4 +67,6 @@ public interface ITaskService {
Collection
<
String
>
excludePosIds
();
Collection
<
String
>
excludePosIds
();
void
addTaskToFinished
(
StoragePos
pos
,
Barcode
barcode
,
String
opUser
);
void
addTaskToFinished
(
StoragePos
pos
,
Barcode
barcode
,
String
opUser
);
void
addTaskToExecute
(
DataLog
task
);
}
}
myproject/src/main/java/com/myproject/webapp/controller/webService/MainTimer.java
0 → 100644
查看文件 @
6cad4e7
package
com
.
myproject
.
webapp
.
controller
.
webService
;
import
com.myproject.bean.update.DataLog
;
import
com.myproject.dao.mongo.IDataLogDao
;
import
org.apache.logging.log4j.LogManager
;
import
org.apache.logging.log4j.Logger
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
java.util.List
;
import
java.util.concurrent.Executors
;
import
java.util.concurrent.ScheduledExecutorService
;
import
java.util.concurrent.TimeUnit
;
/**
* Created by sunke on 2020/3/5.
* 主定时器
*/
@Service
public
class
MainTimer
{
protected
final
transient
Logger
log
=
LogManager
.
getLogger
(
getClass
());
ScheduledExecutorService
scheduledThreadPool
=
Executors
.
newScheduledThreadPool
(
1
);
@Autowired
private
IDataLogDao
dataLogDao
;
@Autowired
private
ITaskService
taskService
;
@Autowired
private
SolderBoxCache
solderBoxCache
;
public
void
init
(){
log
.
info
(
"加载未完成的任务"
);
List
<
DataLog
>
unExecuteTasks
=
dataLogDao
.
findUnFinishedTasks
();
for
(
DataLog
unExecuteTask
:
unExecuteTasks
)
{
if
(
unExecuteTask
.
isExecuting
()
||
unExecuteTask
.
isWait
()){
taskService
.
addTaskToExecute
(
unExecuteTask
);
}
}
log
.
info
(
"主定时器开启,60秒后开始执行, 每5s执行一次"
);
//1 分钟之后执行,每秒钟执行一次
scheduledThreadPool
.
scheduleAtFixedRate
(
new
Runnable
()
{
@Override
public
void
run
()
{
timerTask
();
}
},
60
,
5
,
TimeUnit
.
SECONDS
);
}
private
void
timerTask
(){
try
{
solderBoxCache
.
runTimer
();
}
catch
(
Exception
e
){
log
.
error
(
"定时器执行出错"
,
e
);
}
finally
{
}
}
}
myproject/src/main/java/com/myproject/webapp/controller/webService/QisdaApiController.java
查看文件 @
6cad4e7
此文件的差异被折叠,
点击展开。
myproject/src/main/java/com/myproject/webapp/controller/webService/SolderBoxCache.java
0 → 100644
查看文件 @
6cad4e7
package
com
.
myproject
.
webapp
.
controller
.
webService
;
import
com.google.common.base.Strings
;
import
com.myproject.bean.json.ResultBean
;
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.dao.mongo.IDataLogDao
;
import
com.myproject.exception.ValidateException
;
import
com.myproject.manager.IBarcodeManager
;
import
com.myproject.manager.IStoragePosManager
;
import
com.myproject.util.StorageConstants
;
import
org.apache.logging.log4j.LogManager
;
import
org.apache.logging.log4j.Logger
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Repository
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.ResponseBody
;
import
javax.servlet.http.HttpServletRequest
;
import
java.util.*
;
import
java.util.concurrent.ConcurrentHashMap
;
/**
* Created by sunke on 2020/7/17.
*/
@Repository
public
class
SolderBoxCache
{
protected
static
final
transient
Logger
log
=
LogManager
.
getLogger
(
SolderBoxCache
.
class
);
@Autowired
private
DataCache
dataCache
;
@Autowired
private
ITaskService
taskService
;
@Autowired
private
IDataLogDao
dataLogDao
;
@Autowired
private
IBarcodeManager
barcodeManager
;
@Autowired
private
IStoragePosManager
storagePosManager
;
/**
* 库位信息缓存
*/
// private static Map<String, StoragePos> posCacheMap = new ConcurrentHashMap<>();
public
void
runTimer
(){
Collection
<
Storage
>
allStorage
=
dataCache
.
getAllStorage
().
values
();
for
(
Storage
storage
:
allStorage
)
{
if
(!
storage
.
isSolderPaste
()){
continue
;
}
List
<
StoragePos
>
allPos
=
storagePosManager
.
findNotEmptyByStorageId
(
storage
.
getId
());
for
(
StoragePos
storagePos
:
allPos
)
{
try
{
Barcode
barcode
=
storagePos
.
getBarcode
();
if
(
barcode
!=
null
){
Date
needOutDate
=
barcode
.
getNeedOutDate
();
if
(
needOutDate
!=
null
){
long
now
=
System
.
currentTimeMillis
();
int
status
=
barcode
.
getSolderStatus
();
//冷藏中,看是否需要进行回温
if
(
StorageConstants
.
SOLDER_STATUS
.
UNDER_REFRIGERATION
==
status
){
long
needWarmStartTime
=
needOutDate
.
getTime
()
-
barcode
.
getWarmTime
()
*
60
*
60
*
1000
-
barcode
.
getMixTime
()
*
1000
-
10
*
60
*
1000
;
if
(
now
>
needWarmStartTime
){
//需要进行回温
createRewarmTask
(
storagePos
);
}
}
else
if
(
StorageConstants
.
SOLDER_STATUS
.
REWARMING
==
status
){
//回温中,看回温是否完成
if
(
now
-
barcode
.
getStartWarmTime
()
>=
barcode
.
getWarmTime
()
*
60
*
60
*
1000
){
//回温完成,更改状态为待搅拌
if
(
barcode
.
getMixTime
()
<=
0
){
log
.
info
(
barcode
.
getBarcode
()
+
"到达回温时间,搅拌时间为0,修改状态为待出库"
);
barcode
.
setSolderStatus
(
StorageConstants
.
SOLDER_STATUS
.
TO_BE_OUT
);
}
else
{
log
.
info
(
barcode
.
getBarcode
()
+
"到达回温时间,修改状态为待搅拌"
);
barcode
.
setSolderStatus
(
StorageConstants
.
SOLDER_STATUS
.
TO_BE_MIXED
);
}
barcode
=
barcodeManager
.
save
(
barcode
);
storagePos
.
setBarcode
(
barcode
);
storagePosManager
.
save
(
storagePos
);
}
}
else
if
(
StorageConstants
.
SOLDER_STATUS
.
TO_BE_MIXED
==
status
){
//待搅拌,生成搅拌任务
long
needMixStartTime
=
needOutDate
.
getTime
()
-
barcode
.
getMixTime
()
*
1000
-
5
*
60
*
1000
;
if
(
now
>=
needMixStartTime
){
createMixTask
(
storagePos
);
}
}
else
if
(
StorageConstants
.
SOLDER_STATUS
.
TO_BE_OUT
==
status
||
StorageConstants
.
SOLDER_STATUS
.
RETREAT_STORAGE
==
status
){
//待出库,生成出库任务
long
needOutStartTime
=
needOutDate
.
getTime
();
if
(
now
>=
needOutStartTime
){
createOutTask
(
storagePos
);
}
}
}
}
}
catch
(
Exception
e
){
log
.
info
(
storagePos
.
getBarcode
().
getBarcode
()
+
"["
+
storagePos
.
getPosName
()+
"]"
+
"定时任务出错:"
+
e
.
getMessage
());
}
}
}
}
/**
* 创建出库任务
* @param storagePos
*/
private
void
createOutTask
(
StoragePos
storagePos
)
throws
ValidateException
{
Barcode
barcode
=
storagePos
.
getBarcode
();
Collection
<
DataLog
>
queueTasks
=
taskService
.
getQueueTasks
();
for
(
DataLog
queueTask
:
queueTasks
)
{
if
(
queueTask
.
getBarcode
().
equals
(
barcode
.
getBarcode
())){
//已经有任务,返回
return
;
}
}
log
.
info
(
barcode
.
getBarcode
()
+
"创建出库任务"
);
Storage
storage
=
dataCache
.
getStorageById
(
storagePos
.
getStorageId
());
DataLog
outTask
=
newTask
(
storage
,
storagePos
,
barcode
);
outTask
.
setType
(
StorageConstants
.
OP
.
CHECKOUT
);
outTask
.
setMixTime
(
barcode
.
getMixTime
());
outTask
=
dataLogDao
.
save
(
outTask
);
taskService
.
addTaskToExecute
(
outTask
);
//更改状态
// barcode.setSolderStatus(StorageConstants.SOLDER_STATUS.OUTING);
// barcode = barcodeManager.save(barcode);
// storagePos.setBarcode(barcode);
// storagePosManager.save(storagePos);
}
/**
* 创建搅拌任务
*/
private
void
createMixTask
(
StoragePos
storagePos
)
throws
ValidateException
{
Barcode
barcode
=
storagePos
.
getBarcode
();
Collection
<
DataLog
>
queueTasks
=
taskService
.
getQueueTasks
();
for
(
DataLog
queueTask
:
queueTasks
)
{
if
(
queueTask
.
getBarcode
().
equals
(
barcode
.
getBarcode
())){
//已经有任务,返回
return
;
}
}
log
.
info
(
barcode
.
getBarcode
()
+
"创建搅拌任务"
);
Storage
storage
=
dataCache
.
getStorageById
(
storagePos
.
getStorageId
());
DataLog
mixTask
=
newTask
(
storage
,
storagePos
,
barcode
);
mixTask
.
setType
(
StorageConstants
.
OP
.
MIX
);
mixTask
.
setMixTime
(
barcode
.
getMixTime
());
mixTask
=
dataLogDao
.
save
(
mixTask
);
taskService
.
addTaskToExecute
(
mixTask
);
//更改状态
// barcode.setSolderStatus(StorageConstants.SOLDER_STATUS.MIXING);
// barcode = barcodeManager.save(barcode);
// storagePos.setBarcode(barcode);
// storagePosManager.save(storagePos);
}
/**
* 创建回温任务
*/
private
void
createRewarmTask
(
StoragePos
storagePos
){
Barcode
barcode
=
storagePos
.
getBarcode
();
Collection
<
DataLog
>
queueTasks
=
taskService
.
getQueueTasks
();
for
(
DataLog
queueTask
:
queueTasks
)
{
if
(
queueTask
.
getBarcode
().
equals
(
barcode
.
getBarcode
())){
//已经有任务,返回
return
;
}
}
Storage
storage
=
dataCache
.
getStorageById
(
storagePos
.
getStorageId
());
try
{
Collection
<
String
>
excludePosIds
=
taskService
.
excludePosIds
();
StoragePos
warmPos
=
storagePosManager
.
getEmptyWarmPos
(
storage
,
barcode
,
excludePosIds
);
if
(
warmPos
!=
null
){
log
.
info
(
barcode
.
getBarcode
()
+
"创建回温移库任务["
+
storagePos
.
getPosName
()+
"]=>"
+
warmPos
.
getPosName
());
DataLog
puttingTask
=
newTask
(
storage
,
warmPos
,
barcode
);
puttingTask
.
setType
(
StorageConstants
.
OP
.
REWARM_PUTTING
);
puttingTask
=
dataLogDao
.
save
(
puttingTask
);
taskService
.
addTaskToExecute
(
puttingTask
);
DataLog
takingTask
=
newTask
(
storage
,
storagePos
,
barcode
);
takingTask
.
setType
(
StorageConstants
.
OP
.
REWARM_TAKING
);
takingTask
=
dataLogDao
.
save
(
takingTask
);
taskService
.
addTaskToExecute
(
takingTask
);
}
}
catch
(
ValidateException
e
)
{
log
.
info
(
barcode
.
getBarcode
()
+
"查找回温库位失败"
);
}
}
public
DataLog
newTask
(
Storage
storage
,
StoragePos
pos
,
Barcode
barcode
){
DataLog
task
=
new
DataLog
();
task
.
setPartNumber
(
barcode
.
getPartNumber
());
task
.
setBarcode
(
barcode
.
getBarcode
());
task
.
setNum
(
barcode
.
getAmount
());
task
.
setMemo
(
barcode
.
getMemo
());
task
.
setStatus
(
StorageConstants
.
OP_STATUS
.
WAIT
.
name
());
task
.
setCid
(
storage
.
getCid
());
task
.
setStorageId
(
storage
.
getId
());
task
.
setStorageName
(
storage
.
getName
());
task
.
setPosId
(
pos
.
getId
());
task
.
setPosName
(
pos
.
getPosName
());
return
task
;
}
}
myproject/src/main/java/com/myproject/webapp/controller/webService/StorageDataController.java
查看文件 @
6cad4e7
...
@@ -310,6 +310,7 @@ public class StorageDataController extends BaseController {
...
@@ -310,6 +310,7 @@ public class StorageDataController extends BaseController {
return
"位置["
+
pid
+
"]不存在"
;
return
"位置["
+
pid
+
"]不存在"
;
}
}
log
.
info
(
"出库位置仓位【"
+
pos
.
getPosName
()+
"】"
);
log
.
info
(
"出库位置仓位【"
+
pos
.
getPosName
()+
"】"
);
String
outResult
=
taskService
.
checkout
(
pos
,
subSourceId
,
isSingleOut
);
String
outResult
=
taskService
.
checkout
(
pos
,
subSourceId
,
isSingleOut
);
if
(!
Strings
.
isNullOrEmpty
(
outResult
)){
if
(!
Strings
.
isNullOrEmpty
(
outResult
)){
return
"1"
+
outResult
;
return
"1"
+
outResult
;
...
@@ -468,14 +469,43 @@ public class StorageDataController extends BaseController {
...
@@ -468,14 +469,43 @@ public class StorageDataController extends BaseController {
*/
*/
@RequestMapping
(
value
=
"/saveOp"
,
method
=
RequestMethod
.
POST
)
@RequestMapping
(
value
=
"/saveOp"
,
method
=
RequestMethod
.
POST
)
@ResponseBody
@ResponseBody
public
void
saveOp
(
HttpServletRequest
request
)
{
public
String
saveOp
(
HttpServletRequest
request
)
{
String
cid
=
request
.
getParameter
(
"cid"
);
String
cid
=
request
.
getParameter
(
"cid"
);
if
(!
Strings
.
isNullOrEmpty
(
cid
)){
if
(!
Strings
.
isNullOrEmpty
(
cid
)){
String
opKey
=
request
.
getParameter
(
"opKey"
);
String
opKey
=
request
.
getParameter
(
"opKey"
);
String
opValue
=
request
.
getParameter
(
"opValue"
);
String
opValue
=
request
.
getParameter
(
"opValue"
);
log
.
info
(
"界面执行操作:"
+
opKey
+
"="
+
opValue
);
log
.
info
(
"界面执行操作:"
+
opKey
+
"="
+
opValue
);
addOp
(
cid
,
opKey
,
opValue
);
addOp
(
cid
,
opKey
,
opValue
);
return
"OK"
+
getText
(
"shelf.msg.opSucess"
,
request
.
getLocale
(),
"操作成功"
);
}
return
""
;
}
/**
* 保存界面的一些操作
*/
@RequestMapping
(
value
=
"/modifyOrderNum"
,
method
=
RequestMethod
.
POST
)
@ResponseBody
public
String
modifyOrderNum
(
HttpServletRequest
request
)
{
String
orderNo
=
request
.
getParameter
(
"orderNo"
);
String
numStr
=
request
.
getParameter
(
"num"
);
log
.
info
(
"客户端执行修改工单["
+
orderNo
+
"]的数量:"
+
numStr
);
try
{
if
(!
Strings
.
isNullOrEmpty
(
orderNo
)
&&
!
Strings
.
isNullOrEmpty
(
numStr
)){
float
numRate
=
Float
.
valueOf
(
numStr
);
List
<
LiteOrderItem
>
items
=
liteOrderItemDao
.
findOrderItems
(
orderNo
);
for
(
LiteOrderItem
item
:
items
)
{
int
needNum
=
item
.
getNeedNum
();
Float
newNeedNum
=
needNum
*
numRate
;
item
.
setNeedNum
(
newNeedNum
.
intValue
());
liteOrderItemDao
.
save
(
item
);
}
return
"0"
+
getText
(
"shelf.msg.opSucess"
,
request
.
getLocale
(),
"操作成功"
);
}
}
catch
(
Exception
e
){
log
.
error
(
"修改工单数量出错"
,
e
);
}
}
return
"1"
+
getText
(
"errors.float"
,
new
String
[]{
""
},
request
.
getLocale
(),
"必须为float类型"
);
}
}
/**
/**
...
...
myproject/src/main/java/com/myproject/webapp/controller/webService/TaskService.java
查看文件 @
6cad4e7
此文件的差异被折叠,
点击展开。
myproject/src/main/java/com/myproject/webapp/listener/StartupListener.java
查看文件 @
6cad4e7
...
@@ -3,6 +3,7 @@ package com.myproject.webapp.listener;
...
@@ -3,6 +3,7 @@ package com.myproject.webapp.listener;
import
com.myproject.api.OrderFileWatch
;
import
com.myproject.api.OrderFileWatch
;
import
com.myproject.mina.TcpServer
;
import
com.myproject.mina.TcpServer
;
import
com.myproject.webapp.controller.webService.ExpireMailUtil
;
import
com.myproject.webapp.controller.webService.ExpireMailUtil
;
import
com.myproject.webapp.controller.webService.MainTimer
;
import
org.apache.commons.logging.Log
;
import
org.apache.commons.logging.Log
;
import
org.apache.commons.logging.LogFactory
;
import
org.apache.commons.logging.LogFactory
;
import
com.myproject.Constants
;
import
com.myproject.Constants
;
...
@@ -144,6 +145,9 @@ public class StartupListener implements ServletContextListener {
...
@@ -144,6 +145,9 @@ public class StartupListener implements ServletContextListener {
ExpireMailUtil
mailUtil
=
(
ExpireMailUtil
)
ctx
.
getBean
(
"expireMailUtil"
);
ExpireMailUtil
mailUtil
=
(
ExpireMailUtil
)
ctx
.
getBean
(
"expireMailUtil"
);
mailUtil
.
init
();
mailUtil
.
init
();
MainTimer
mainTimer
=
(
MainTimer
)
ctx
.
getBean
(
"mainTimer"
);
mainTimer
.
init
();
TcpServer
tcpServer
=
(
TcpServer
)
ctx
.
getBean
(
"tcpServer"
);
TcpServer
tcpServer
=
(
TcpServer
)
ctx
.
getBean
(
"tcpServer"
);
tcpServer
.
init
();
tcpServer
.
init
();
...
...
myproject/src/main/resources/StorageResources.properties
查看文件 @
6cad4e7
...
@@ -359,6 +359,8 @@ shelf.nextPos.wrongSize=Next Position [{0}] size [{1}] is different from materia
...
@@ -359,6 +359,8 @@ shelf.nextPos.wrongSize=Next Position [{0}] size [{1}] is different from materia
order.out.set
=
set of materials
order.out.set
=
set of materials
order.out.surplus
=
surplus material
order.out.surplus
=
surplus material
order.inventory
=
inventory
order.inventory
=
inventory
order.num.modify
=
Order Qty Modify
order.modify.tip
=
Modify Qty to
\:
current quantity times
export.csv
=
Export to CSV
export.csv
=
Export to CSV
...
@@ -405,4 +407,5 @@ error.barcode.pnNotExist=x Component {0} does not exist
...
@@ -405,4 +407,5 @@ error.barcode.pnNotExist=x Component {0} does not exist
error.barcode.errorSize
=
x The reel has no size.
error.barcode.errorSize
=
x The reel has no size.
error.storage.noPosFind
=
No availble position is found.
error.storage.noPosFind
=
No availble position is found.
msg.line.putIn
=
Put [{0}] into [{1}]
msg.line.putIn
=
Put [{0}] into [{1}]
delete.confirm
=
Are you sure to delete?
\ No newline at end of file
\ No newline at end of file
delete.confirm
=
Are you sure to delete?
barcode.error.used
=
Barcode is used.
\ No newline at end of file
\ No newline at end of file
myproject/src/main/resources/StorageResources_en.properties
查看文件 @
6cad4e7
...
@@ -367,6 +367,7 @@ delete.confirm=Are you sure to delete?
...
@@ -367,6 +367,7 @@ delete.confirm=Are you sure to delete?
stroage.error.merge
=
Shelf location can not merge.
stroage.error.merge
=
Shelf location can not merge.
barcode.error.noRi
=
Barcode rule must has RI and PN fields.
barcode.error.noRi
=
Barcode rule must has RI and PN fields.
barcode.error.notFound
=
Barcode is not found.
barcode.error.notFound
=
Barcode is not found.
barcode.error.used
=
Barcode is used.
error.pos.inQueue
=
Failed
\:
The location [{0}] is in queue.
error.pos.inQueue
=
Failed
\:
The location [{0}] is in queue.
error.barcode.inQueue
=
Failed
\:
The barcode [{0}] is in queue.
error.barcode.inQueue
=
Failed
\:
The barcode [{0}] is in queue.
error.barcode.empty
=
No barcode is scanned.
error.barcode.empty
=
No barcode is scanned.
...
@@ -401,3 +402,5 @@ shelf.nextPos.wrongSize=Next Position [{0}] size [{1}] is different from materia
...
@@ -401,3 +402,5 @@ shelf.nextPos.wrongSize=Next Position [{0}] size [{1}] is different from materia
shelf.nextPos.hasReel
=
Next Position [{0}] already has material, please scan a new position code.
shelf.nextPos.hasReel
=
Next Position [{0}] already has material, please scan a new position code.
settings.remind.title
=
Remind Setting
settings.remind.title
=
Remind Setting
settings.remind.deadday
=
days dead metiral remind
settings.remind.deadday
=
days dead metiral remind
order.num.modify
=
Order Qty Modify
order.modify.tip
=
Modify Qty to
\:
current quantity times
myproject/src/main/resources/StorageResources_jp.properties
查看文件 @
6cad4e7
...
@@ -396,4 +396,7 @@ shelf.nextPos.hasTask=\u4E0B\u4E00\u5E93\u4F4D[{0}]\u5DF2\u6709\u4EFB\u52A1,\u8B
...
@@ -396,4 +396,7 @@ shelf.nextPos.hasTask=\u4E0B\u4E00\u5E93\u4F4D[{0}]\u5DF2\u6709\u4EFB\u52A1,\u8B
shelf.nextPos.wrongSize
=
\u
4E0B
\u
4E00
\u
5E93
\u
4F4D[{0}]
\u
5C3A
\u
5BF8[{1}]
\u
4E0E
\u6599\u
76D8
\u
5C3A
\u
5BF8[{2}]
\u
4E0D
\u
7B26,
\u
8BF7
\u
91CD
\u
65B0
\u
626B
\u
63CF
\u
5E93
\u
4F4D
\u7801
shelf.nextPos.wrongSize
=
\u
4E0B
\u
4E00
\u
5E93
\u
4F4D[{0}]
\u
5C3A
\u
5BF8[{1}]
\u
4E0E
\u6599\u
76D8
\u
5C3A
\u
5BF8[{2}]
\u
4E0D
\u
7B26,
\u
8BF7
\u
91CD
\u
65B0
\u
626B
\u
63CF
\u
5E93
\u
4F4D
\u7801
shelf.nextPos.hasReel
=
\u
4E0B
\u
4E00
\u
5E93
\u
4F4D[{0}]
\u
5DF2
\u6709\u7269\u6599
,
\u
8BF7
\u
91CD
\u
65B0
\u
626B
\u
63CF
\u
5E93
\u
4F4D
\u7801
shelf.nextPos.hasReel
=
\u
4E0B
\u
4E00
\u
5E93
\u
4F4D[{0}]
\u
5DF2
\u6709\u7269\u6599
,
\u
8BF7
\u
91CD
\u
65B0
\u
626B
\u
63CF
\u
5E93
\u
4F4D
\u7801
settings.remind.title
=
\u
63D0
\u9192\u
8BBE
\u
7F6E
settings.remind.title
=
\u
63D0
\u9192\u
8BBE
\u
7F6E
settings.remind.deadday
=
\u5929\u
524D
\u5446\u
6EDE
\u7269\u6599\u
63D0
\u9192
\ No newline at end of file
\ No newline at end of file
settings.remind.deadday
=
\u5929\u
524D
\u5446\u
6EDE
\u7269\u6599\u
63D0
\u9192
barcode.error.used
=
\u
5DF2
\u
88AB
\u
4F7F
\u7528\u7684\u6761\u7801\u
65E0
\u
6CD5
\u5220\u9664
order.num.modify
=
\u
5DE5
\u5355\u6570\u
91CF
\u
4FEE
\u6539
order.modify.tip
=
\u
4FEE
\u6539\u
5DE5
\u5355\u6570\u
91CF
\u
4E3A
\:
\u
5F53
\u
524D
\u6570\u
91CF x
\ No newline at end of file
\ No newline at end of file
myproject/src/main/resources/StorageResources_zh_CN.properties
查看文件 @
6cad4e7
...
@@ -396,4 +396,7 @@ shelf.nextPos.hasTask=\u4E0B\u4E00\u5E93\u4F4D[{0}]\u5DF2\u6709\u4EFB\u52A1,\u8B
...
@@ -396,4 +396,7 @@ shelf.nextPos.hasTask=\u4E0B\u4E00\u5E93\u4F4D[{0}]\u5DF2\u6709\u4EFB\u52A1,\u8B
shelf.nextPos.wrongSize
=
\u
4E0B
\u
4E00
\u
5E93
\u
4F4D[{0}]
\u
5C3A
\u
5BF8[{1}]
\u
4E0E
\u6599\u
76D8
\u
5C3A
\u
5BF8[{2}]
\u
4E0D
\u
7B26,
\u
8BF7
\u
91CD
\u
65B0
\u
626B
\u
63CF
\u
5E93
\u
4F4D
\u7801
shelf.nextPos.wrongSize
=
\u
4E0B
\u
4E00
\u
5E93
\u
4F4D[{0}]
\u
5C3A
\u
5BF8[{1}]
\u
4E0E
\u6599\u
76D8
\u
5C3A
\u
5BF8[{2}]
\u
4E0D
\u
7B26,
\u
8BF7
\u
91CD
\u
65B0
\u
626B
\u
63CF
\u
5E93
\u
4F4D
\u7801
shelf.nextPos.hasReel
=
\u
4E0B
\u
4E00
\u
5E93
\u
4F4D[{0}]
\u
5DF2
\u6709\u7269\u6599
,
\u
8BF7
\u
91CD
\u
65B0
\u
626B
\u
63CF
\u
5E93
\u
4F4D
\u7801
shelf.nextPos.hasReel
=
\u
4E0B
\u
4E00
\u
5E93
\u
4F4D[{0}]
\u
5DF2
\u6709\u7269\u6599
,
\u
8BF7
\u
91CD
\u
65B0
\u
626B
\u
63CF
\u
5E93
\u
4F4D
\u7801
settings.remind.title
=
\u
63D0
\u9192\u
8BBE
\u
7F6E
settings.remind.title
=
\u
63D0
\u9192\u
8BBE
\u
7F6E
settings.remind.deadday
=
\u5929\u
524D
\u5446\u
6EDE
\u7269\u6599\u
63D0
\u9192
\ No newline at end of file
\ No newline at end of file
settings.remind.deadday
=
\u5929\u
524D
\u5446\u
6EDE
\u7269\u6599\u
63D0
\u9192
barcode.error.used
=
\u
5DF2
\u
88AB
\u
4F7F
\u7528\u7684\u6761\u7801\u
65E0
\u
6CD5
\u5220\u9664
order.num.modify
=
\u
5DE5
\u5355\u6570\u
91CF
\u
4FEE
\u6539
order.modify.tip
=
\u
4FEE
\u6539\u
5DE5
\u5355\u6570\u
91CF
\u
4E3A
\:
\u
5F53
\u
524D
\u6570\u
91CF x
\ No newline at end of file
\ No newline at end of file
myproject/src/main/webapp/WEB-INF/pages/component/componentUpdate.jsp
查看文件 @
6cad4e7
...
@@ -156,13 +156,20 @@
...
@@ -156,13 +156,20 @@
<div class="form-group">
<div class="form-group">
<
label class="control-label col-md-2"><fmt:message key="solder.maxStorageTime"/> </label
>
<
%--<label class="control-label col-md-2"><fmt:message key="solder.maxStorageTime"/> </label>--%
>
<%--<div class="col-md-3">--%>
<%--<div style="text-align:left" class="input-group">--%>
<%--<form:input type="text" id="maxStorageTime" path="maxStorageTime" class="form-control"/>--%>
<%--<span class="input-group-addon"><fmt:message key="solder.hour"/></span>--%>
<%--</div>--%>
<%--</div>--%>
<label class="control-label col-md-2"><fmt:message key="搅拌时间"/> </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="m
axStorageTime" path="maxStorage
Time" class="form-control"/>
<form:input type="text" id="m
ixTime" path="mix
Time" class="form-control"/>
<span class="input-group-addon"><fmt:message key="
solder.hour
"/></span>
<span class="input-group-addon"><fmt:message key="
秒
"/></span>
</div>
</div>
</div>
</div>
<label class="control-label col-md-2"><fmt:message key="solder.warmTime"/></label>
<label class="control-label col-md-2"><fmt:message key="solder.warmTime"/></label>
...
...
myproject/src/main/webapp/WEB-INF/pages/component/storagePosFind.jsp
查看文件 @
6cad4e7
...
@@ -178,13 +178,13 @@
...
@@ -178,13 +178,13 @@
<display:column property="barcode.provider" titleKey="barcode.provider"/>
<display:column property="barcode.provider" titleKey="barcode.provider"/>
<
display:column titleKey="inOutList.type"
>
<
%--<display:column titleKey="inOutList.type">--%
>
<
c:if test="${pos.barcode.type == 0 || empty pos.barcode.type}"><fmt:message key="inOutList.type.component"/></c:if
>
<
%--<c:if test="${pos.barcode.type == 0 || empty pos.barcode.type}"><fmt:message key="inOutList.type.component"/></c:if>--%
>
<
c:if test="${pos.barcode.type == 1}"><fmt:message key="inOutList.type.solder"/></c:if
>
<
%--<c:if test="${pos.barcode.type == 1}"><fmt:message key="inOutList.type.solder"/></c:if>--%
>
<
c:if test="${pos.barcode.type == 2}"><fmt:message key="inOutList.type.pcb"/></c:if
>
<
%--<c:if test="${pos.barcode.type == 2}"><fmt:message key="inOutList.type.pcb"/></c:if>--%
>
<
c:if test="${pos.barcode.type == 3}"><fmt:message key="inOutList.type.others"/></c:if
>
<
%--<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
>
<
%--<c:if test="${pos.barcode.type == 4}"><fmt:message key="inOutList.type.fixture"/></c:if>--%
>
<
/display:column
>
<
%--</display:column>--%
>
<display:column property="barcode.barcode" titleKey="barcode.barcode" sortable="true" sortProperty="barcode.barcode"/>
<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.msl" titleKey="component.msl" sortable="true" sortProperty="barcode.msl"/>
<%--<display:column property="barcode.inFixture" titleKey="storagePosFind.inFixture"/>--%>
<%--<display:column property="barcode.inFixture" titleKey="storagePosFind.inFixture"/>--%>
...
@@ -295,7 +295,7 @@
...
@@ -295,7 +295,7 @@
<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: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.
solder && pos.barcode.solderStatus >= 5
)}"/>
<display:column title="<input type='checkbox' id='allCheck'/>">
<display:column title="<input type='checkbox' id='allCheck'/>">
<c:if test="${!limitCheckOut}">
<c:if test="${!limitCheckOut}">
<input type="checkbox" name="posIds" value="${pos.id}" id="check${pos.id}" class="limit${pos.barcode.inFixture}"/>
<input type="checkbox" name="posIds" value="${pos.id}" id="check${pos.id}" class="limit${pos.barcode.inFixture}"/>
...
...
myproject/src/main/webapp/WEB-INF/pages/storage/allBoxView.jsp
查看文件 @
6cad4e7
...
@@ -151,8 +151,8 @@
...
@@ -151,8 +151,8 @@
<%--<span><fmt:message key="allBoxView.kanban"/></span>--%>
<%--<span><fmt:message key="allBoxView.kanban"/></span>--%>
<%--<span style="margin-left: 40px;" id="storageTotalPos">总容量:1000</span>--%>
<%--<span style="margin-left: 40px;" id="storageTotalPos">总容量:1000</span>--%>
<div class="col-md-6">
<div class="col-md-6">
<button class="btn yellow outBtn" id="outPn"><i class="fa fa-
sign-out
"></i><fmt:message key="button.checkout"/></button>
<button class="btn yellow outBtn" id="outPn"><i class="fa fa-
upload
"></i><fmt:message key="button.checkout"/></button>
<button class="btn yellow outBtn" id="outOrder"><i class="fa fa-
sign-out
"></i><fmt:message key="menu.order"/></button>
<button class="btn yellow outBtn" id="outOrder"><i class="fa fa-
folder
"></i><fmt:message key="menu.order"/></button>
</div>
</div>
<div class="col-md-6">
<div class="col-md-6">
<div id="lineMsg"></div>
<div id="lineMsg"></div>
...
@@ -181,6 +181,10 @@
...
@@ -181,6 +181,10 @@
<c:if test="${storage.virtual}">
<c:if test="${storage.virtual}">
<c:set var="detailUrl" value="${ctx}/storage/virtual/${storage.cid}"/>
<c:set var="detailUrl" value="${ctx}/storage/virtual/${storage.cid}"/>
</c:if>
</c:if>
<c:if test="${storage.solderPaste}">
<c:set var="detailUrl" value="${ctx}/storage/solder/${storage.cid}"/>
</c:if>
<div class="portlet box green-haze tasks-widget">
<div class="portlet box green-haze tasks-widget">
<c:choose>
<c:choose>
<c:when test="${storage.shelf || storage.cabinet || storage.accShelf || storage.virtual || storage.codeShelf}">
<c:when test="${storage.shelf || storage.cabinet || storage.accShelf || storage.virtual || storage.codeShelf}">
...
@@ -257,7 +261,7 @@
...
@@ -257,7 +261,7 @@
</div>
</div>
<div class="modal-footer">
<div class="modal-footer">
<div id="footerBtn">
<div id="footerBtn">
<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-
upload
"></i><fmt:message key="allBoxView.findAndOut"/></a>
</div>
</div>
<%--<button type="button" data-dismiss="modal" class="btn default" id="cancelAuthBtn">取消</button>--%>
<%--<button type="button" data-dismiss="modal" class="btn default" id="cancelAuthBtn">取消</button>--%>
</div>
</div>
...
@@ -296,8 +300,9 @@
...
@@ -296,8 +300,9 @@
<h4 class="modal-title" style="margin:10px;">
<h4 class="modal-title" style="margin:10px;">
<span id="orderDetailTitle"> </span>
<span id="orderDetailTitle"> </span>
<span class="right" style="margin-right: 40px;">
<span class="right" style="margin-right: 40px;">
<button class="btn yellow" onclick="outLiteOrder(true)"><i class="fa fa-sign-out"></i><fmt:message key="order.out.set"/></button>
<button class="btn yellow" id="showModifyOrder"><i class="fa fa-pencil"></i><fmt:message key="order.num.modify"/></button>
<button class="btn yellow" onclick="outLiteOrder(false)"><i class="fa fa-sign-out"></i><fmt:message key="order.out.surplus"/></button>
<button class="btn yellow" onclick="outLiteOrder(true)"><i class="fa fa-suitcase"></i><fmt:message key="order.out.set"/></button>
<button class="btn yellow" onclick="outLiteOrder(false)"><i class="fa fa-folder-open"></i><fmt:message key="order.out.surplus"/></button>
</span>
</span>
</h4>
</h4>
<input type="text" class="form-control filterInput" id="searchOrderItemPn"/>
<input type="text" class="form-control filterInput" id="searchOrderItemPn"/>
...
@@ -337,6 +342,31 @@
...
@@ -337,6 +342,31 @@
</div>
</div>
</div>
</div>
<div id="modifyOrderNum" class="modal fade" tabindex="-1" data-backdrop="static" data-keyboard="false">
<div class="modal-dialog" style="width: 800px; margin-top: 10%;">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
<h4 class="modal-title" style="font-weight: 500;"><span id="reelCode"></span><fmt:message key="order.num.modify"/></h4>
</div>
<div class="modal-body" style="height: 90px;">
<div class="row">
<div class="form-group form-inline">
<div class="input-group margin-top-10">
<span class="input-group-addon"><fmt:message key="order.modify.tip"/></span>
<input class="input-small form-control" autocomplete="off" type="text" id="orderNumRate">
</div>
</div>
</div>
</div>
<div class="modal-footer">
<button type="button" data-dismiss="modal" class="btn default"><fmt:message key="button.cancel"/></button>
<button type="button" class="btn green" id="confirmOrderNumBtn"><fmt:message key="button.save"/></button>
</div>
</div>
</div>
</div>
<div id="modifyNum" class="modal fade" tabindex="-1" data-backdrop="static" data-keyboard="false">
<div id="modifyNum" class="modal fade" tabindex="-1" data-backdrop="static" data-keyboard="false">
<div class="modal-dialog" style="width: 800px; margin-top: 10%;">
<div class="modal-dialog" style="width: 800px; margin-top: 10%;">
<div class="modal-content">
<div class="modal-content">
...
@@ -459,12 +489,19 @@
...
@@ -459,12 +489,19 @@
$.post("${ctx}/service/store/orderDetail", {orderNo: orderNo}, function (order) {
$.post("${ctx}/service/store/orderDetail", {orderNo: orderNo}, function (order) {
var itemHtml = "";
var itemHtml = "";
var data = order.orderItems;
var data = order.orderItems;
if(order.new){
//可以修改数量
$("#showModifyOrder").show();
}else{
$("#showModifyOrder").hide();
}
var table = $('#orderItemsTable').DataTable();
var table = $('#orderItemsTable').DataTable();
table.clear();
table.clear();
for(var i in data){
for(var i in data){
var opStr = '<button class="btn yellow" onclick="checkoutByPartNumber(\''+data[i].pn+'\',\''+data[i].id+'\');"><i class="fa fa-
sign-out
"></i>补料</button>';
var opStr = '<button class="btn yellow" onclick="checkoutByPartNumber(\''+data[i].pn+'\',\''+data[i].id+'\');"><i class="fa fa-
upload
"></i>补料</button>';
if(data[i].inventoryNum <= 0 || data[i].outFinished ){
if(data[i].inventoryNum <= 0 || data[i].outFinished ){
//已出完或库存不足
//已出完或库存不足
opStr = "";
opStr = "";
...
@@ -543,16 +580,6 @@
...
@@ -543,16 +580,6 @@
});
});
}
}
outLiteOrder = function(outBom){
var orderNo = $("#orderDetailTitle").text();
$.post("${ctx}/service/store/outLiteOrder.html", {orderNo: orderNo, outBom: outBom}, function (data) {
showMsg(data);
waitting();
});
}
waitting = function(){
waitting = function(){
Metronic.blockUI({
Metronic.blockUI({
iconOnly: true,
iconOnly: true,
...
@@ -664,9 +691,9 @@
...
@@ -664,9 +691,9 @@
options['barcode'] = barcode;
options['barcode'] = barcode;
options['num'] = data[item].num;
options['num'] = data[item].num;
options['icon']='fa fa-d
atabase
';
options['icon']='fa fa-d
ownload
';
if(data[item].type == 2){//出库
if(data[item].type == 2){//出库
options['icon']='fa fa-
sign-out
';
options['icon']='fa fa-
upload
';
showStr = partNumber + "["+barcode+"]${out_label}" + posStr;
showStr = partNumber + "["+barcode+"]${out_label}" + posStr;
}else{
}else{
options['onClick']= modifyClick;
options['onClick']= modifyClick;
...
@@ -745,7 +772,6 @@
...
@@ -745,7 +772,6 @@
}
}
function getItemBar(w,h,usedCount,idleCount){
function getItemBar(w,h,usedCount,idleCount){
var totalCount = usedCount + idleCount;
var totalCount = usedCount + idleCount;
var usedPercent = 0;
var usedPercent = 0;
...
@@ -992,6 +1018,36 @@
...
@@ -992,6 +1018,36 @@
}
}
//工单信息
//工单信息
$("#showModifyOrder").click(function(){
window.setTimeout(function() {
$("#orderNumRate")[0].focus();
$("#orderNumRate").select();
}, 500);
$("#modifyOrderNum").modal("show");
});
$("#confirmOrderNumBtn").click(function(){
var orderNo = $("#orderDetailTitle").text();
var num = $("#orderNumRate").val();
$.post("${ctx}/service/store/modifyOrderNum", {orderNo: orderNo, num: num}, function (data) {
showMsg(data);
if (data.indexOf("OK") == 0) {
$("#orderNumRate").val("");
$("#modifyOrderNum").modal("hide");
showOrderDetail(orderNo);
}
});
});
outLiteOrder = function(outBom){
var orderNo = $("#orderDetailTitle").text();
$.post("${ctx}/service/store/outLiteOrder.html", {orderNo: orderNo, outBom: outBom}, function (data) {
showMsg(data);
waitting();
});
}
var orderWindows = {};
var orderWindows = {};
flushLiteOrders = function(){
flushLiteOrders = function(){
$.post("${ctx}/service/store/liteOrderTask", {}, function (data) {
$.post("${ctx}/service/store/liteOrderTask", {}, function (data) {
...
...
myproject/src/main/webapp/WEB-INF/pages/storage/solderBox.jsp
0 → 100644
查看文件 @
6cad4e7
此文件的差异被折叠,
点击展开。
myproject/src/main/webapp/WEB-INF/pages/storage/storageUpdate.jsp
查看文件 @
6cad4e7
...
@@ -278,6 +278,7 @@
...
@@ -278,6 +278,7 @@
<thead>
<thead>
<tr role="row">
<tr role="row">
<th><fmt:message key="storagePos.name"/></th>
<th><fmt:message key="storagePos.name"/></th>
<th><fmt:message key="是否是回温库位"/></th>
<th><fmt:message key="storage.enable"/></th>
<th><fmt:message key="storage.enable"/></th>
<th><fmt:message key="storagePos.priority"/></th>
<th><fmt:message key="storagePos.priority"/></th>
<th><fmt:message key="storage.posSize"/></th>
<th><fmt:message key="storage.posSize"/></th>
...
@@ -301,6 +302,11 @@
...
@@ -301,6 +302,11 @@
<c:out value="${slot.posName}"/>
<c:out value="${slot.posName}"/>
</a>
</a>
</td>
</td>
<td>
<c:out value="${slot.warmPos}"/>
</td>
<td id="td${slot.id}">
<td id="td${slot.id}">
<c:if test="${!slot.enabled}">
<c:if test="${!slot.enabled}">
<fmt:message key="storage.enable.yes"/>[
<fmt:message key="storage.enable.yes"/>[
...
...
myproject/src/main/webapp/WEB-INF/pages/workOrder/checkOutSettings.jsp
查看文件 @
6cad4e7
...
@@ -9,7 +9,13 @@
...
@@ -9,7 +9,13 @@
<fmt:message key="checkoutSettings.title"/>
<fmt:message key="checkoutSettings.title"/>
</h3>
</h3>
<style type="text/css">
.radioLabel{
margin-bottom: 12px !important;
font-size: 20px;
}
</style>
<div class="row">
<div class="row">
<div class="col-md-12">
<div class="col-md-12">
...
@@ -30,11 +36,11 @@
...
@@ -30,11 +36,11 @@
<div class="form-group">
<div class="form-group">
<div class="input-group">
<div class="input-group">
<div class="icheck-list">
<div class="icheck-list">
<label><form:radiobutton path="outType" class="icheck" value="EXPIRE_FIRST"/> <fmt:message key="checkoutSettings.mode.expireFirst"/></label>
<label
class="radioLabel"
><form:radiobutton path="outType" class="icheck" value="EXPIRE_FIRST"/> <fmt:message key="checkoutSettings.mode.expireFirst"/></label>
<label><form:radiobutton path="outType" class="icheck" value="EFFICIENCY"/> <fmt:message key="checkoutSettings.mode.efficiency"/></label>
<label
class="radioLabel"
><form:radiobutton path="outType" class="icheck" value="EFFICIENCY"/> <fmt:message key="checkoutSettings.mode.efficiency"/></label>
<label><form:radiobutton path="outType" class="icheck" value="FIFO"/> <fmt:message key="checkoutSettings.mode.fifo"/></label>
<label
class="radioLabel"
><form:radiobutton path="outType" class="icheck" value="FIFO"/> <fmt:message key="checkoutSettings.mode.fifo"/></label>
<label><form:radiobutton path="outType" class="icheck" value="USED_FIRST"/> <fmt:message key="checkoutSettings.mode.usedFirst"/></label>
<label
class="radioLabel"
><form:radiobutton path="outType" class="icheck" value="USED_FIRST"/> <fmt:message key="checkoutSettings.mode.usedFirst"/></label>
<label><form:radiobutton path="outType" class="icheck" value="PRODUCE_DATE"/> <fmt:message key="checkoutSettings.mode.produceDate"/></label>
<label
class="radioLabel"
><form:radiobutton path="outType" class="icheck" value="PRODUCE_DATE"/> <fmt:message key="checkoutSettings.mode.produceDate"/></label>
</div>
</div>
</div>
</div>
</div>
</div>
...
...
myproject/storageManager.iml
查看文件 @
6cad4e7
...
@@ -29,28 +29,6 @@
...
@@ -29,28 +29,6 @@
</content>
</content>
<orderEntry
type=
"inheritedJdk"
/>
<orderEntry
type=
"inheritedJdk"
/>
<orderEntry
type=
"sourceFolder"
forTests=
"false"
/>
<orderEntry
type=
"sourceFolder"
forTests=
"false"
/>
<orderEntry
type=
"library"
name=
"Maven: org.apache.cxf:cxf-rt-frontend-jaxrs:3.0.1"
level=
"project"
/>
<orderEntry
type=
"library"
name=
"Maven: org.apache.cxf:cxf-core:3.0.1"
level=
"project"
/>
<orderEntry
type=
"library"
name=
"Maven: org.codehaus.woodstox:woodstox-core-asl:4.2.1"
level=
"project"
/>
<orderEntry
type=
"library"
name=
"Maven: org.codehaus.woodstox:stax2-api:3.1.4"
level=
"project"
/>
<orderEntry
type=
"library"
name=
"Maven: org.apache.ws.xmlschema:xmlschema-core:2.1.0"
level=
"project"
/>
<orderEntry
type=
"library"
name=
"Maven: javax.ws.rs:javax.ws.rs-api:2.0"
level=
"project"
/>
<orderEntry
type=
"library"
name=
"Maven: javax.annotation:javax.annotation-api:1.2"
level=
"project"
/>
<orderEntry
type=
"library"
name=
"Maven: org.apache.cxf:cxf-rt-transports-http:3.0.1"
level=
"project"
/>
<orderEntry
type=
"library"
name=
"Maven: org.apache.cxf:cxf-rt-frontend-jaxws:3.0.1"
level=
"project"
/>
<orderEntry
type=
"library"
name=
"Maven: xml-resolver:xml-resolver:1.2"
level=
"project"
/>
<orderEntry
type=
"library"
name=
"Maven: asm:asm:3.3.1"
level=
"project"
/>
<orderEntry
type=
"library"
name=
"Maven: org.apache.cxf:cxf-rt-bindings-soap:3.0.1"
level=
"project"
/>
<orderEntry
type=
"library"
name=
"Maven: org.apache.cxf:cxf-rt-wsdl:3.0.1"
level=
"project"
/>
<orderEntry
type=
"library"
name=
"Maven: wsdl4j:wsdl4j:1.6.3"
level=
"project"
/>
<orderEntry
type=
"library"
name=
"Maven: org.apache.cxf:cxf-rt-databinding-jaxb:3.0.1"
level=
"project"
/>
<orderEntry
type=
"library"
name=
"Maven: com.sun.xml.bind:jaxb-impl:2.2.10-b140310.1920"
level=
"project"
/>
<orderEntry
type=
"library"
name=
"Maven: com.sun.xml.bind:jaxb-core:2.2.10-b140310.1920"
level=
"project"
/>
<orderEntry
type=
"library"
name=
"Maven: org.apache.cxf:cxf-rt-bindings-xml:3.0.1"
level=
"project"
/>
<orderEntry
type=
"library"
name=
"Maven: org.apache.cxf:cxf-rt-frontend-simple:3.0.1"
level=
"project"
/>
<orderEntry
type=
"library"
name=
"Maven: org.apache.cxf:cxf-rt-ws-addr:3.0.1"
level=
"project"
/>
<orderEntry
type=
"library"
name=
"Maven: org.apache.cxf:cxf-rt-ws-policy:3.0.1"
level=
"project"
/>
<orderEntry
type=
"library"
name=
"Maven: org.apache.neethi:neethi:3.0.3"
level=
"project"
/>
<orderEntry
type=
"library"
name=
"Maven: commons-lang:commons-lang:2.6"
level=
"project"
/>
<orderEntry
type=
"library"
name=
"Maven: commons-lang:commons-lang:2.6"
level=
"project"
/>
<orderEntry
type=
"library"
name=
"Maven: org.springframework:spring-orm:4.1.6.RELEASE"
level=
"project"
/>
<orderEntry
type=
"library"
name=
"Maven: org.springframework:spring-orm:4.1.6.RELEASE"
level=
"project"
/>
<orderEntry
type=
"library"
name=
"Maven: org.springframework:spring-beans:4.1.6.RELEASE"
level=
"project"
/>
<orderEntry
type=
"library"
name=
"Maven: org.springframework:spring-beans:4.1.6.RELEASE"
level=
"project"
/>
...
...
编写
预览
支持
Markdown
格式
附加文件
你添加了
0
人
到此讨论。请谨慎行事。
Finish editing this message first!
Cancel
请
注册
或
登录
后发表评论