Skip to content
切换导航条
切换导航条
当前项目
正在载入...
登录
孙克
/
smf-core
转到一个项目
切换导航栏
切换导航栏固定状态
项目
群组
代码片段
帮助
项目
活动
版本库
流水线
图表
问题
0
合并请求
0
维基
网络
创建新的问题
作业
提交
问题看板
文件
提交
网络
比较
分支
标签
Commit a5db80b8
由
LN
编写于
2021-11-09 19:44:46 +0800
浏览文件
选项
浏览文件
标签
下载
电子邮件补丁
差异文件
料盒操作功能
1 个父辈
1f8f5679
全部展开
隐藏空白字符变更
内嵌
并排
正在显示
13 个修改的文件
包含
163 行增加
和
68 行删除
src/main/java/com/neotel/smfcore/core/barcode/bean/BarcodeRule.java
src/main/java/com/neotel/smfcore/core/barcode/rest/bean/dto/BarcodeDto.java
src/main/java/com/neotel/smfcore/core/barcode/service/po/Barcode.java
src/main/java/com/neotel/smfcore/core/barcode/utils/CodeResolve.java
src/main/java/com/neotel/smfcore/core/kanban/rest/BoxKanbanController.java
src/main/java/com/neotel/smfcore/core/storage/rest/MaterialBoxController.java
src/main/java/com/neotel/smfcore/core/system/util/TaskService.java
src/main/java/com/neotel/smfcore/hella/handler/HellaServiceHandler.java
src/main/resources/messages.properties
src/main/resources/messages_en_US.properties
src/main/resources/messages_ja_JP.properties
src/main/resources/messages_zh_CN.properties
src/main/resources/messages_zh_TW.properties
src/main/java/com/neotel/smfcore/core/barcode/bean/BarcodeRule.java
查看文件 @
a5db80b
...
@@ -515,7 +515,7 @@ public class BarcodeRule {
...
@@ -515,7 +515,7 @@ public class BarcodeRule {
Barcode
b
=
new
Barcode
();
Barcode
b
=
new
Barcode
();
b
.
setFullCode
(
codeStr
);
String
reelId
=
""
;
String
reelId
=
""
;
if
(
whole_reelId_item
.
hasThisField
()){
if
(
whole_reelId_item
.
hasThisField
()){
reelId
=
codeStr
;
reelId
=
codeStr
;
...
...
src/main/java/com/neotel/smfcore/core/barcode/rest/bean/dto/BarcodeDto.java
查看文件 @
a5db80b
package
com
.
neotel
.
smfcore
.
core
.
barcode
.
rest
.
bean
.
dto
;
package
com
.
neotel
.
smfcore
.
core
.
barcode
.
rest
.
bean
.
dto
;
import
com.google.common.collect.Lists
;
import
com.google.common.collect.Lists
;
import
com.neotel.smfcore.common.utils.DateUtil
;
import
com.neotel.smfcore.core.barcode.enums.BARCODE_STATUS
;
import
com.neotel.smfcore.core.barcode.enums.BARCODE_STATUS
;
import
com.neotel.smfcore.core.barcode.enums.COMPONENT_TYPE
;
import
com.neotel.smfcore.core.barcode.enums.COMPONENT_TYPE
;
import
com.neotel.smfcore.core.barcode.enums.SOLDER_STATUS
;
import
com.neotel.smfcore.core.barcode.enums.SOLDER_STATUS
;
...
@@ -13,6 +12,9 @@ import org.springframework.data.annotation.Transient;
...
@@ -13,6 +12,9 @@ import org.springframework.data.annotation.Transient;
import
java.io.Serializable
;
import
java.io.Serializable
;
import
java.util.Date
;
import
java.util.Date
;
import
java.util.List
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.Set
;
@Getter
@Getter
@Setter
@Setter
public
class
BarcodeDto
implements
Serializable
{
public
class
BarcodeDto
implements
Serializable
{
...
@@ -205,5 +207,8 @@ public class BarcodeDto implements Serializable {
...
@@ -205,5 +207,8 @@ public class BarcodeDto implements Serializable {
return
(
""
+
plateSize
+
"X"
+
height
);
return
(
""
+
plateSize
+
"X"
+
height
);
}
}
/**
* 料箱中的物料信息
*/
private
Map
<
String
,
BarcodeDto
>
subCodeMap
;
}
}
src/main/java/com/neotel/smfcore/core/barcode/service/po/Barcode.java
查看文件 @
a5db80b
...
@@ -3,7 +3,6 @@ package com.neotel.smfcore.core.barcode.service.po;
...
@@ -3,7 +3,6 @@ package com.neotel.smfcore.core.barcode.service.po;
import
com.google.common.collect.Lists
;
import
com.google.common.collect.Lists
;
import
com.neotel.smfcore.common.base.BasePo
;
import
com.neotel.smfcore.common.base.BasePo
;
import
com.neotel.smfcore.common.utils.DateUtil
;
import
com.neotel.smfcore.common.utils.DateUtil
;
import
com.neotel.smfcore.common.utils.StorageConstants
;
import
com.neotel.smfcore.core.barcode.enums.BARCODE_STATUS
;
import
com.neotel.smfcore.core.barcode.enums.BARCODE_STATUS
;
import
com.neotel.smfcore.core.barcode.enums.COMPONENT_TYPE
;
import
com.neotel.smfcore.core.barcode.enums.COMPONENT_TYPE
;
import
com.neotel.smfcore.core.barcode.enums.SOLDER_STATUS
;
import
com.neotel.smfcore.core.barcode.enums.SOLDER_STATUS
;
...
@@ -13,8 +12,7 @@ import org.springframework.data.annotation.Transient;
...
@@ -13,8 +12,7 @@ import org.springframework.data.annotation.Transient;
import
org.springframework.data.mongodb.core.mapping.Document
;
import
org.springframework.data.mongodb.core.mapping.Document
;
import
java.io.Serializable
;
import
java.io.Serializable
;
import
java.util.Date
;
import
java.util.*
;
import
java.util.List
;
@Data
@Data
@Document
@Document
...
@@ -23,6 +21,11 @@ public class Barcode extends BasePo implements Serializable {
...
@@ -23,6 +21,11 @@ public class Barcode extends BasePo implements Serializable {
* 条码编号
* 条码编号
*/
*/
private
String
barcode
;
private
String
barcode
;
/**
* 扩展料盒的条码ID
*/
private
String
hostBarcodeId
;
/**
/**
* 物料类型:PCB,锡膏,或其他
* 物料类型:PCB,锡膏,或其他
*/
*/
...
@@ -42,9 +45,9 @@ public class Barcode extends BasePo implements Serializable {
...
@@ -42,9 +45,9 @@ public class Barcode extends BasePo implements Serializable {
private
Date
expTime
;
private
Date
expTime
;
/**
/**
*
过期状态,-1未入库0在库,1已出库正常,2已出库且已过期
* 过期状态,-1未入库0在库,1已出库正常,2已出库且已过期
*/
*/
private
int
status
=
BARCODE_STATUS
.
NEW
;
private
int
status
=
BARCODE_STATUS
.
NEW
;
/**
/**
* 锡膏状态
* 锡膏状态
...
@@ -73,16 +76,16 @@ public class Barcode extends BasePo implements Serializable {
...
@@ -73,16 +76,16 @@ public class Barcode extends BasePo implements Serializable {
/**
/**
* 盘宽
* 盘宽
*/
*/
private
int
plateSize
=
0
;
private
int
plateSize
=
0
;
/**
/**
* 盘高
* 盘高
*/
*/
private
int
height
=
0
;
private
int
height
=
0
;
private
String
provider
;
private
String
provider
;
/**
/**
* 批次
* 批次
*/
*/
private
String
batch
;
private
String
batch
=
""
;
private
String
msl
;
private
String
msl
;
//备用字段1(配套单号))或 family
//备用字段1(配套单号))或 family
...
@@ -156,19 +159,25 @@ public class Barcode extends BasePo implements Serializable {
...
@@ -156,19 +159,25 @@ public class Barcode extends BasePo implements Serializable {
*/
*/
@Transient
@Transient
private
List
<
String
>
relationCodes
;
private
List
<
String
>
relationCodes
;
/**
* 料盒条码:料盒内所有物料条码
*/
private
Map
<
String
,
Barcode
>
subCodeMap
;
/**
/**
* 是否是锡膏
* 是否是锡膏
*/
*/
public
boolean
isSolder
(){
public
boolean
isSolder
()
{
return
type
==
COMPONENT_TYPE
.
SOLDERPASTE
;
return
type
==
COMPONENT_TYPE
.
SOLDERPASTE
;
}
}
public
List
<
String
>
getRelationCodes
()
{
public
List
<
String
>
getRelationCodes
()
{
if
(
relationCodes
==
null
)
{
if
(
relationCodes
==
null
)
{
return
Lists
.
newArrayList
();
return
Lists
.
newArrayList
();
}
}
return
relationCodes
;
return
relationCodes
;
}
}
/**
/**
* 上次使用时间(出入库时更改)
* 上次使用时间(出入库时更改)
*/
*/
...
@@ -197,6 +206,7 @@ public class Barcode extends BasePo implements Serializable {
...
@@ -197,6 +206,7 @@ public class Barcode extends BasePo implements Serializable {
* 原始条码
* 原始条码
*/
*/
private
String
fullCode
;
private
String
fullCode
;
/**
/**
* 添加相关联条码
* 添加相关联条码
*
*
...
@@ -208,12 +218,13 @@ public class Barcode extends BasePo implements Serializable {
...
@@ -208,12 +218,13 @@ public class Barcode extends BasePo implements Serializable {
}
}
relationCodes
.
add
(
relationCode
);
relationCodes
.
add
(
relationCode
);
}
}
public
long
getPutInTime
()
{
public
long
getPutInTime
()
{
return
putInTime
;
return
putInTime
;
}
}
public
void
setPutInTime
(
long
putInTime
)
{
public
void
setPutInTime
(
long
putInTime
)
{
if
(
this
.
putInTime
==
-
1
)
{
if
(
this
.
putInTime
==
-
1
)
{
this
.
putInTime
=
putInTime
;
this
.
putInTime
=
putInTime
;
this
.
putInDate
=
new
Date
(
putInTime
);
this
.
putInDate
=
new
Date
(
putInTime
);
}
}
...
@@ -229,8 +240,8 @@ public class Barcode extends BasePo implements Serializable {
...
@@ -229,8 +240,8 @@ public class Barcode extends BasePo implements Serializable {
return
putInDate
;
return
putInDate
;
}
}
public
String
getPutInDateStr
(){
public
String
getPutInDateStr
()
{
if
(
putInDate
==
null
)
{
if
(
putInDate
==
null
)
{
return
""
;
return
""
;
}
}
return
DateUtil
.
toDateTimeString
(
putInDate
);
return
DateUtil
.
toDateTimeString
(
putInDate
);
...
@@ -240,13 +251,13 @@ public class Barcode extends BasePo implements Serializable {
...
@@ -240,13 +251,13 @@ public class Barcode extends BasePo implements Serializable {
this
.
putInDate
=
putInDate
;
this
.
putInDate
=
putInDate
;
}
}
private
void
updateExpTime
(){
private
void
updateExpTime
()
{
if
(
expTime
==
null
&&
maxStorageTime
!=
0
F
&&
putInTime
!=
-
1
)
{
if
(
expTime
==
null
&&
maxStorageTime
!=
0
F
&&
putInTime
!=
-
1
)
{
Float
maxStorageTimeMill
=
maxStorageTime
*
60
*
60
*
1000
;
Float
maxStorageTimeMill
=
maxStorageTime
*
60
*
60
*
1000
;
expTime
=
new
Date
(
putInTime
+
maxStorageTimeMill
.
longValue
());
expTime
=
new
Date
(
putInTime
+
maxStorageTimeMill
.
longValue
());
if
(
expireDate
!=
null
)
{
if
(
expireDate
!=
null
)
{
//如果是在包装上的过期时间之前,使用包装上的过期时间
//如果是在包装上的过期时间之前,使用包装上的过期时间
if
(
expireDate
.
getTime
()<
expTime
.
getTime
())
{
if
(
expireDate
.
getTime
()
<
expTime
.
getTime
())
{
expTime
=
expireDate
;
expTime
=
expireDate
;
}
}
}
}
...
@@ -256,9 +267,9 @@ public class Barcode extends BasePo implements Serializable {
...
@@ -256,9 +267,9 @@ public class Barcode extends BasePo implements Serializable {
/**
/**
* 到达回温的时间
* 到达回温的时间
*/
*/
public
long
getReachWarmTime
(){
public
long
getReachWarmTime
()
{
long
reachWarmTime
=
System
.
currentTimeMillis
();
long
reachWarmTime
=
System
.
currentTimeMillis
();
if
(
COMPONENT_TYPE
.
SOLDERPASTE
==
type
&&
putInTime
!=
-
1
)
{
if
(
COMPONENT_TYPE
.
SOLDERPASTE
==
type
&&
putInTime
!=
-
1
)
{
reachWarmTime
=
putInTime
+
warmTime
*
60
*
60
*
1000
;
reachWarmTime
=
putInTime
+
warmTime
*
60
*
60
*
1000
;
}
}
return
reachWarmTime
;
return
reachWarmTime
;
...
@@ -267,22 +278,22 @@ public class Barcode extends BasePo implements Serializable {
...
@@ -267,22 +278,22 @@ public class Barcode extends BasePo implements Serializable {
/**
/**
* 是否达到回温时间,只有锡膏才需要判定
* 是否达到回温时间,只有锡膏才需要判定
*/
*/
public
boolean
isReachedWarmTime
(){
public
boolean
isReachedWarmTime
()
{
return
getReachWarmTime
()
<=
System
.
currentTimeMillis
();
return
getReachWarmTime
()
<=
System
.
currentTimeMillis
();
}
}
public
long
getInStoreHour
(){
public
long
getInStoreHour
()
{
if
(
putInTime
!=
-
1
)
{
if
(
putInTime
!=
-
1
)
{
return
(
System
.
currentTimeMillis
()
-
putInTime
)
/
60
/
60
/
1000
;
return
(
System
.
currentTimeMillis
()
-
putInTime
)
/
60
/
60
/
1000
;
}
}
return
0
;
return
0
;
}
}
public
long
getInStoreMiniute
(){
public
long
getInStoreMiniute
()
{
if
(
putInTime
!=
-
1
)
{
if
(
putInTime
!=
-
1
)
{
long
minutes
=
(
System
.
currentTimeMillis
()
-
getPutInTime
())
/
60000
%
60
;
long
minutes
=
(
System
.
currentTimeMillis
()
-
getPutInTime
())
/
60000
%
60
;
if
(
minutes
==
0
)
{
if
(
minutes
==
0
)
{
if
(
getInStoreHour
()
==
0
)
{
if
(
getInStoreHour
()
==
0
)
{
minutes
=
1
;
minutes
=
1
;
}
}
}
}
...
@@ -290,44 +301,47 @@ public class Barcode extends BasePo implements Serializable {
...
@@ -290,44 +301,47 @@ public class Barcode extends BasePo implements Serializable {
}
}
return
0
;
return
0
;
}
}
public
void
setCheckOutDate
(
Date
checkOutDate
,
String
opor
)
{
public
void
setCheckOutDate
(
Date
checkOutDate
,
String
opor
)
{
this
.
checkOutDate
=
checkOutDate
;
this
.
checkOutDate
=
checkOutDate
;
this
.
outOpor
=
opor
;
this
.
outOpor
=
opor
;
if
(
checkOutDate
!=
null
)
{
//出库时判断是否过期
if
(
checkOutDate
!=
null
)
{
//出库时判断是否过期
updateExpTime
();
updateExpTime
();
if
(
expTime
!=
null
&&
checkOutDate
.
after
(
expTime
))
{
if
(
expTime
!=
null
&&
checkOutDate
.
after
(
expTime
))
{
//过期时间小于出库时间,说明出库的时候已经过期了
//过期时间小于出库时间,说明出库的时候已经过期了
status
=
BARCODE_STATUS
.
OUT_EXPIRED
;
status
=
BARCODE_STATUS
.
OUT_EXPIRED
;
}
else
{
}
else
{
status
=
BARCODE_STATUS
.
OUT_NORMAL
;
status
=
BARCODE_STATUS
.
OUT_NORMAL
;
}
}
}
}
}
}
public
void
setInOpor
(
String
inOpor
)
{
public
void
setInOpor
(
String
inOpor
)
{
if
(
putInTime
==
-
1
)
{
if
(
putInTime
==
-
1
)
{
this
.
inOpor
=
inOpor
;
this
.
inOpor
=
inOpor
;
}
}
}
}
public
int
getSolderStatus
()
{
public
int
getSolderStatus
()
{
if
(
solderStatus
==
SOLDER_STATUS
.
REWARMING
)
{
if
(
solderStatus
==
SOLDER_STATUS
.
REWARMING
)
{
//如果状态是回温中,且回温时间已经大于warmTime,修改状态为待搅拌
//如果状态是回温中,且回温时间已经大于warmTime,修改状态为待搅拌
long
now
=
System
.
currentTimeMillis
();
long
now
=
System
.
currentTimeMillis
();
if
(
startWarmTime
-
now
>
warmTime
*
60
*
60
*
1000
)
{
if
(
startWarmTime
-
now
>
warmTime
*
60
*
60
*
1000
)
{
solderStatus
=
SOLDER_STATUS
.
TO_BE_MIXED
;
solderStatus
=
SOLDER_STATUS
.
TO_BE_MIXED
;
}
}
}
}
return
solderStatus
;
return
solderStatus
;
}
}
public
String
getNeedOutDateStr
(){
if
(
needOutDate
==
null
){
public
String
getNeedOutDateStr
()
{
if
(
needOutDate
==
null
)
{
return
""
;
return
""
;
}
}
return
DateUtil
.
toDateTimeString
(
needOutDate
);
return
DateUtil
.
toDateTimeString
(
needOutDate
);
}
}
public
String
getExpireDateStr
(){
public
String
getExpireDateStr
()
{
if
(
expireDate
!=
null
)
{
if
(
expireDate
!=
null
)
{
return
DateUtil
.
toDateString
(
expireDate
);
return
DateUtil
.
toDateString
(
expireDate
);
}
}
return
""
;
return
""
;
...
@@ -336,8 +350,8 @@ public class Barcode extends BasePo implements Serializable {
...
@@ -336,8 +350,8 @@ public class Barcode extends BasePo implements Serializable {
/**
/**
* 是否已过期
* 是否已过期
*/
*/
public
boolean
isExpired
(){
public
boolean
isExpired
()
{
if
(
expireDate
!=
null
)
{
if
(
expireDate
!=
null
)
{
return
expireDate
.
before
(
new
Date
());
return
expireDate
.
before
(
new
Date
());
}
}
return
false
;
return
false
;
...
@@ -346,12 +360,12 @@ public class Barcode extends BasePo implements Serializable {
...
@@ -346,12 +360,12 @@ public class Barcode extends BasePo implements Serializable {
/**
/**
* 是否即将(3天内)过期,已过期后,此字段变为false
* 是否即将(3天内)过期,已过期后,此字段变为false
*/
*/
public
boolean
isWillExpired
(){
public
boolean
isWillExpired
()
{
if
(
isExpired
())
{
if
(
isExpired
())
{
return
false
;
return
false
;
}
}
if
(
expireDate
!=
null
)
{
if
(
expireDate
!=
null
)
{
return
expireDate
.
before
(
DateUtil
.
addDays
(
new
Date
(),
3
));
return
expireDate
.
before
(
DateUtil
.
addDays
(
new
Date
(),
3
));
}
}
return
false
;
return
false
;
}
}
...
@@ -359,10 +373,33 @@ public class Barcode extends BasePo implements Serializable {
...
@@ -359,10 +373,33 @@ public class Barcode extends BasePo implements Serializable {
/**
/**
* 是否是小料(7x8)的料
* 是否是小料(7x8)的料
*/
*/
public
boolean
isSmallReel
(){
public
boolean
isSmallReel
()
{
if
(
getPlateSize
()
==
7
)
{
if
(
getPlateSize
()
==
7
)
{
return
getHeight
()
==
8
||
getHeight
()
==
12
;
return
getHeight
()
==
8
||
getHeight
()
==
12
;
}
}
return
false
;
return
false
;
}
}
public
Barcode
getSubCode
(
String
pnStr
)
{
if
(
subCodeMap
==
null
)
{
return
null
;
}
return
subCodeMap
.
get
(
pnStr
);
}
public
void
UpdateSubCode
(
Barcode
barcode
)
{
if
(
subCodeMap
==
null
)
{
subCodeMap
=
new
HashMap
<>();
}
if
(
barcode
.
getAmount
()
<=
0
)
{
if
(
subCodeMap
.
containsKey
(
barcode
.
getPartNumber
()))
{
subCodeMap
.
remove
(
barcode
.
getPartNumber
());
}
}
else
{
subCodeMap
.
put
(
barcode
.
getPartNumber
(),
barcode
);
}
}
}
}
src/main/java/com/neotel/smfcore/core/barcode/utils/CodeResolve.java
查看文件 @
a5db80b
...
@@ -6,6 +6,7 @@ import com.neotel.smfcore.common.exception.ValidateException;
...
@@ -6,6 +6,7 @@ import com.neotel.smfcore.common.exception.ValidateException;
import
com.neotel.smfcore.common.utils.DateUtil
;
import
com.neotel.smfcore.common.utils.DateUtil
;
import
com.neotel.smfcore.core.barcode.bean.BarcodeRule
;
import
com.neotel.smfcore.core.barcode.bean.BarcodeRule
;
import
com.neotel.smfcore.core.barcode.bean.CodeBean
;
import
com.neotel.smfcore.core.barcode.bean.CodeBean
;
import
com.neotel.smfcore.core.barcode.enums.COMPONENT_TYPE
;
import
com.neotel.smfcore.core.barcode.service.manager.IBarcodeManager
;
import
com.neotel.smfcore.core.barcode.service.manager.IBarcodeManager
;
import
com.neotel.smfcore.core.barcode.service.manager.IComponentManager
;
import
com.neotel.smfcore.core.barcode.service.manager.IComponentManager
;
import
com.neotel.smfcore.core.barcode.service.po.Barcode
;
import
com.neotel.smfcore.core.barcode.service.po.Barcode
;
...
@@ -13,6 +14,7 @@ import com.neotel.smfcore.core.barcode.service.po.Component;
...
@@ -13,6 +14,7 @@ import com.neotel.smfcore.core.barcode.service.po.Component;
import
lombok.extern.slf4j.Slf4j
;
import
lombok.extern.slf4j.Slf4j
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
import
org.yaml.snakeyaml.comments.CommentType
;
import
java.util.Collection
;
import
java.util.Collection
;
import
java.util.Date
;
import
java.util.Date
;
...
@@ -42,10 +44,13 @@ public class CodeResolve {
...
@@ -42,10 +44,13 @@ public class CodeResolve {
}
}
}
}
public
CodeBean
resolveSingleCode
(
String
barcodeItemStr
){
return
resolveSingleCode
(
barcodeItemStr
,
COMPONENT_TYPE
.
COMPONENT
);
}
/**
/**
* 解析条码为单个 Barcode,自动保存到数据库
* 解析条码为单个 Barcode,自动保存到数据库
*/
*/
public
CodeBean
resolveSingleCode
(
String
barcodeItemStr
){
public
CodeBean
resolveSingleCode
(
String
barcodeItemStr
,
int
type
){
if
(
barcodeRuleList
==
null
||
barcodeRuleList
.
isEmpty
()){
if
(
barcodeRuleList
==
null
||
barcodeRuleList
.
isEmpty
()){
CodeBean
codeBean
=
new
CodeBean
();
CodeBean
codeBean
=
new
CodeBean
();
...
@@ -112,19 +117,19 @@ public class CodeResolve {
...
@@ -112,19 +117,19 @@ public class CodeResolve {
barcode
.
setLabelAmount
(
currentLabelAmount
);
barcode
.
setLabelAmount
(
currentLabelAmount
);
needUpdate
=
true
;
needUpdate
=
true
;
}
}
//
Date produceDate = barcodeFromRule.getProduceDate();
Date
produceDate
=
barcodeFromRule
.
getProduceDate
();
//
if(produceDate != null){
if
(
produceDate
!=
null
){
//
//抓取到了生产日期,未抓取到过期日期,重新设置过期日期
//抓取到了生产日期,未抓取到过期日期,重新设置过期日期
//
if(barcode.getExpireDate() == null){
if
(
barcode
.
getExpireDate
()
==
null
){
//
if(validDay > 0){
if
(
validDay
>
0
){
//
log.info("重新设置"+codeBeanFromRule.getCodeStr()+"生产日期和过期日期");
log
.
info
(
"重新设置"
+
codeBeanFromRule
.
getCodeStr
()+
"生产日期和过期日期"
);
//
Date expireDate = DateUtil.addDays(produceDate, validDay);
Date
expireDate
=
DateUtil
.
addDays
(
produceDate
,
validDay
);
//
barcode.setExpireDate(expireDate);
barcode
.
setExpireDate
(
expireDate
);
//
barcode.setProduceDate(produceDate);
barcode
.
setProduceDate
(
produceDate
);
//
needUpdate = true;
needUpdate
=
true
;
//
}
}
//
}
}
//
}
}
if
(
needUpdate
){
if
(
needUpdate
){
try
{
try
{
...
@@ -141,7 +146,20 @@ public class CodeResolve {
...
@@ -141,7 +146,20 @@ public class CodeResolve {
return
codeBeanFromRule
;
return
codeBeanFromRule
;
}
else
if
(
codeBeanFromRule
.
isValid
()){
//数据库中不存在,但解析成功
}
else
if
(
codeBeanFromRule
.
isValid
()){
//数据库中不存在,但解析成功
Barcode
barcodeFromRule
=
codeBeanFromRule
.
getBarcode
();
Barcode
barcodeFromRule
=
codeBeanFromRule
.
getBarcode
();
try
{
try
{
if
(
type
==
COMPONENT_TYPE
.
FIXTURE
||
type
==
COMPONENT_TYPE
.
OTHERS
){
//夹具类型,默认设置尺寸,数量
if
(!
codeBeanFromRule
.
hasReelSizeInfo
()){
codeBeanFromRule
.
setReelHeight
(
1
);
codeBeanFromRule
.
setReelWidth
(
1
);
barcodeFromRule
.
setAmount
(
1
);
barcodeFromRule
.
setHeight
(
1
);
barcodeFromRule
.
setPlateSize
(
1
);
}
}
//如果有料盘尺寸,重新设置料盘尺寸信息,没有档案时自动添加档案
//如果有料盘尺寸,重新设置料盘尺寸信息,没有档案时自动添加档案
if
(
codeBeanFromRule
.
hasReelSizeInfo
()){
if
(
codeBeanFromRule
.
hasReelSizeInfo
()){
//log.info("料盘["+barcode.getBarcode()+"]的尺寸信息从["+barcode.getPlateSize()+"x"+barcode.getHeight()+"]设置为["+codeBeanFromRule.getReelWidth()+"x"+codeBeanFromRule.getReelHeight()+"]");
//log.info("料盘["+barcode.getBarcode()+"]的尺寸信息从["+barcode.getPlateSize()+"x"+barcode.getHeight()+"]设置为["+codeBeanFromRule.getReelWidth()+"x"+codeBeanFromRule.getReelHeight()+"]");
...
@@ -192,7 +210,9 @@ public class CodeResolve {
...
@@ -192,7 +210,9 @@ public class CodeResolve {
}
}
}
}
barcode
=
barcodeManager
.
save
(
barcodeFromRule
);
barcode
=
barcodeManager
.
save
(
barcodeFromRule
);
codeBeanFromRule
.
setCodeStr
(
barcode
.
getBarcode
());
codeBeanFromRule
.
setCodeStr
(
barcode
.
getBarcode
());
codeBeanFromRule
.
setBarcode
(
barcode
);
codeBeanFromRule
.
setBarcode
(
barcode
);
codeBeanFromRule
.
setError
(
null
,
null
);
codeBeanFromRule
.
setError
(
null
,
null
);
...
@@ -221,7 +241,6 @@ public class CodeResolve {
...
@@ -221,7 +241,6 @@ public class CodeResolve {
}
}
/**
/**
* 解析条码为单个 Barcode
* 解析条码为单个 Barcode
*/
*/
...
...
src/main/java/com/neotel/smfcore/core/kanban/rest/BoxKanbanController.java
查看文件 @
a5db80b
...
@@ -293,7 +293,7 @@ public class BoxKanbanController {
...
@@ -293,7 +293,7 @@ public class BoxKanbanController {
}
}
}
}
int
allCount
=
inTask
+
outTask
;
int
allCount
=
inTask
+
outTask
;
BoxStatusDto
boxDto
=
new
BoxStatusDto
(
storage
.
getId
(),
storage
.
get
Cid
(),
storage
.
getName
(),
false
,
0
,
BoxStatusDto
boxDto
=
new
BoxStatusDto
(
storage
.
getId
(),
storage
.
get
Name
(),
storage
.
getCid
(),
false
,
0
,
"0"
,
"0"
,
""
,
allCount
,
inTask
,
outTask
,
"0"
,
"0"
,
""
,
allCount
,
inTask
,
outTask
,
0
,
""
,
""
,
""
,
""
,
""
,
storage
.
getType
(),
storage
.
getUsageMap
(),
new
HashMap
<>());
0
,
""
,
""
,
""
,
""
,
""
,
storage
.
getType
(),
storage
.
getUsageMap
(),
new
HashMap
<>());
...
...
src/main/java/com/neotel/smfcore/core/storage/rest/MaterialBoxController.java
0 → 100644
查看文件 @
a5db80b
此文件的差异被折叠,
点击展开。
src/main/java/com/neotel/smfcore/core/system/util/TaskService.java
查看文件 @
a5db80b
...
@@ -920,4 +920,8 @@ public class TaskService {
...
@@ -920,4 +920,8 @@ public class TaskService {
}
}
}
}
public
void
moveTaskToFinished
(
DataLog
task
)
{
taskMap
.
remove
(
task
.
getId
());
theFinishedTaskMap
.
put
(
task
.
getId
(),
task
);
}
}
}
src/main/java/com/neotel/smfcore/hella/handler/HellaServiceHandler.java
查看文件 @
a5db80b
...
@@ -127,8 +127,8 @@ public class HellaServiceHandler extends IoHandlerAdapter implements ITaskListen
...
@@ -127,8 +127,8 @@ public class HellaServiceHandler extends IoHandlerAdapter implements ITaskListen
commandMap
.
put
(
command
.
getEventId
(),
command
);
commandMap
.
put
(
command
.
getEventId
(),
command
);
log
.
info
(
"发送检查物料条码请求:"
+
command
.
toReqMsg
());
log
.
info
(
"发送检查物料条码请求:"
+
command
.
toReqMsg
());
ResultBean
resultBean
=
HellaTcpClient
.
sendMsg
(
command
.
toReqMsg
());
//
ResultBean resultBean = HellaTcpClient.sendMsg(command.toReqMsg());
//
ResultBean resultBean = testCheckOK(command);
ResultBean
resultBean
=
testCheckOK
(
command
);
resultBean
.
setMsg
(
"Check Material result:"
+
resultBean
.
getMsg
());
resultBean
.
setMsg
(
"Check Material result:"
+
resultBean
.
getMsg
());
return
resultBean
;
return
resultBean
;
}
}
...
...
src/main/resources/messages.properties
查看文件 @
a5db80b
...
@@ -115,6 +115,12 @@ smfcode.order.uploadOK=\u5DE5\u5355\u4E0A\u4F20\u6210\u529F
...
@@ -115,6 +115,12 @@ smfcode.order.uploadOK=\u5DE5\u5355\u4E0A\u4F20\u6210\u529F
smfcode.order.ameExists
=
\u
5DE5
\u5355\u
540D
\u
79F0[{0}]
\u
5DF2
\u
5B58
\u5728
smfcode.order.ameExists
=
\u
5DE5
\u5355\u
540D
\u
79F0[{0}]
\u
5DF2
\u
5B58
\u5728
smfcode.order.hasClose
=
\u
5DE5
\u5355\u
5DF2
\u5173\u
95ED
smfcode.order.hasClose
=
\u
5DE5
\u5355\u
5DF2
\u5173\u
95ED
smfcode.order.supplementOutFail
=
\u
672A
\u
627E
\u5230\u
53EF
\u
4EE5
\u
51FA
\u
5E93
\u7684\u8865\u6599
smfcode.order.supplementOutFail
=
\u
672A
\u
627E
\u5230\u
53EF
\u
4EE5
\u
51FA
\u
5E93
\u7684\u8865\u6599
smfcode.materialBox.quantityshort=
\u7269\u6599\u6570\u
91CF
\u
4E0D
\u
8DB3
smfcode.materialBox.invalid
=
\u
672A
\u
627E
\u5230\u6599\u
76D2
\u
4FE1
\u
606F{0}
smfcode.materialBox.noReel
=
\u6599\u
76D2
\u
4E2D
\u
672A
\u
627E
\u5230\u
5BF9
\u
5E94
\u7269\u6599
smfcode.materialBox.boxNoReel
=
\u6599\u
76D2
\u
4E2D
\u
65E0
\u7269\u6599
smfcode.materialBox.inPos
=
\u7269\u6599\u
5DF2
\u5728\u
5E93
\u
4F4D{0}
\u
4E2D
smfcode.materialBox.inOtherBox
=
\u7269\u6599\u
5DF2
\u5728\u6599\u
76D2{0}
\u
4E2D
...
...
src/main/resources/messages_en_US.properties
查看文件 @
a5db80b
...
@@ -114,4 +114,10 @@ smfcode.order.cannotUpdateLine=Work order has been issued, can not modify the li
...
@@ -114,4 +114,10 @@ smfcode.order.cannotUpdateLine=Work order has been issued, can not modify the li
smfcode.order.uploadOK
=
Work order uploaded successfully
smfcode.order.uploadOK
=
Work order uploaded successfully
smfcode.order.ameExists
=
Work order name [{0}] already exists
smfcode.order.ameExists
=
Work order name [{0}] already exists
smfcode.order.hasClose
=
The work order is closed
smfcode.order.hasClose
=
The work order is closed
smfcode.order.supplementOutFail
=
No replenishment material found that can be discharged
\ No newline at end of file
\ No newline at end of file
smfcode.order.supplementOutFail
=
No replenishment material found that can be discharged
smfcode.materialBox.quantityshort
=
Insufficient quantity of materials
smfcode.materialBox.invalid
=
No information found for cartridge {0}
smfcode.materialBox.noReel
=
The corresponding material is not found in the material box
smfcode.materialBox.boxNoReel
=
No material in the cassette
smfcode.materialBox.inPos
=
The material is already in the storage space {0}
smfcode.materialBox.inOtherBox
=
The material is already in the cassette {0}
src/main/resources/messages_ja_JP.properties
查看文件 @
a5db80b
...
@@ -114,4 +114,10 @@ smfcode.order.cannotUpdateLine=\u4F5C\u696D\u6307\u793A\u66F8\u304C\u767A\u884C\
...
@@ -114,4 +114,10 @@ smfcode.order.cannotUpdateLine=\u4F5C\u696D\u6307\u793A\u66F8\u304C\u767A\u884C\
smfcode.order.uploadOK
=
\u
4F5C
\u
696D
\u6307\u
793A
\u
66F8
\u
306E
\u
30A2
\u
30C3
\u
30D7
\u
30ED
\u
30FC
\u
30C9
\u6210\u
529F
smfcode.order.uploadOK
=
\u
4F5C
\u
696D
\u6307\u
793A
\u
66F8
\u
306E
\u
30A2
\u
30C3
\u
30D7
\u
30ED
\u
30FC
\u
30C9
\u6210\u
529F
smfcode.order.ameExists
=
\u
4F5C
\u
696D
\u
30AA
\u
30FC
\u
30C0
\u
30FC
\u
540D
\u
300C{0}
\u
300D
\u
306F
\u
65E2
\u
306B
\u
5B58
\u5728\u3057\u3066\u3044\u
307E
\u3059
smfcode.order.ameExists
=
\u
4F5C
\u
696D
\u
30AA
\u
30FC
\u
30C0
\u
30FC
\u
540D
\u
300C{0}
\u
300D
\u
306F
\u
65E2
\u
306B
\u
5B58
\u5728\u3057\u3066\u3044\u
307E
\u3059
smfcode.order.hasClose
=
\u
30EF
\u
30FC
\u
30AF
\u
30AA
\u
30FC
\u
30C0
\u
30FC
\u
306E
\u
7D42
\u
4E86
smfcode.order.hasClose
=
\u
30EF
\u
30FC
\u
30AF
\u
30AA
\u
30FC
\u
30C0
\u
30FC
\u
306E
\u
7D42
\u
4E86
smfcode.order.supplementOutFail
=
\u6392\u
51FA
\u
53EF
\u
80FD
\u
306A
\u
88DC
\u5145\u
54C1
\u
304C
\u
898B
\u3064\u
304B
\u3089\u
306A
\u3044
\ No newline at end of file
\ No newline at end of file
smfcode.order.supplementOutFail
=
\u6392\u
51FA
\u
53EF
\u
80FD
\u
306A
\u
88DC
\u5145\u
54C1
\u
304C
\u
898B
\u3064\u
304B
\u3089\u
306A
\u3044
smfcode.materialBox.quantityshort
=
\u7269\u6599\u6570\u
91CF
\u
4E0D
\u
8DB3
smfcode.materialBox.invalid
=
\u
96D1
\u
8A8C
\u
306E
\u
60C5
\u5831\u
306F
\u
898B
\u3064\u
304B
\u
308A
\u
307E
\u
305B
\u3093\u3067\u3057\u
305F{0}
smfcode.materialBox.noReel
=
\u
30AB
\u
30BB
\u
30C3
\u
30C8
\u5185\u
306B
\u
8A72
\u
5F53
\u3059\u
308B
\u
7D20
\u6750\u
304C
\u
898B
\u3064\u
304B
\u3089\u
306A
\u3044
smfcode.materialBox.boxNoReel
=
\u
30AB
\u
30BB
\u
30C3
\u
30C8
\u
306B
\u
7D20
\u6750\u
304C
\u
306A
\u3044
smfcode.materialBox.inPos
=
\u3059\u3067\u
306B
\u5728\u
5EAB
\u
306E
\u3042\u
308B
\u
7D20
\u6750
{0}
smfcode.materialBox.inOtherBox
=
\u
30AB
\u
30BB
\u
30C3
\u
30C8
\u
306B
\u
65E2
\u
306B
\u5165\u3063\u3066\u3044\u
308B
\u
7D20
\u6750
{0}
\ No newline at end of file
\ No newline at end of file
src/main/resources/messages_zh_CN.properties
查看文件 @
a5db80b
...
@@ -114,4 +114,10 @@ smfcode.order.cannotUpdateLine=\u5DE5\u5355\u5DF2\u51FA\u5E93\uFF0C\u4E0D\u80FD\
...
@@ -114,4 +114,10 @@ smfcode.order.cannotUpdateLine=\u5DE5\u5355\u5DF2\u51FA\u5E93\uFF0C\u4E0D\u80FD\
smfcode.order.uploadOK
=
\u
5DE5
\u5355\u
4E0A
\u
4F20
\u6210\u
529F
smfcode.order.uploadOK
=
\u
5DE5
\u5355\u
4E0A
\u
4F20
\u6210\u
529F
smfcode.order.ameExists
=
\u
5DE5
\u5355\u
540D
\u
79F0[{0}]
\u
5DF2
\u
5B58
\u5728
smfcode.order.ameExists
=
\u
5DE5
\u5355\u
540D
\u
79F0[{0}]
\u
5DF2
\u
5B58
\u5728
smfcode.order.hasClose
=
\u
5DE5
\u5355\u
5DF2
\u5173\u
95ED
smfcode.order.hasClose
=
\u
5DE5
\u5355\u
5DF2
\u5173\u
95ED
smfcode.order.supplementOutFail
=
\u
672A
\u
627E
\u5230\u
53EF
\u
4EE5
\u
51FA
\u
5E93
\u7684\u8865\u6599
\ No newline at end of file
\ No newline at end of file
smfcode.order.supplementOutFail
=
\u
672A
\u
627E
\u5230\u
53EF
\u
4EE5
\u
51FA
\u
5E93
\u7684\u8865\u6599
smfcode.materialBox.quantityshort
=
\u7269\u6599\u6570\u
91CF
\u
4E0D
\u
8DB3
smfcode.materialBox.invalid
=
\u
672A
\u
627E
\u5230\u6599\u
76D2
\u
4FE1
\u
606F{0}
smfcode.materialBox.noReel
=
\u6599\u
76D2
\u
4E2D
\u
672A
\u
627E
\u5230\u
5BF9
\u
5E94
\u7269\u6599
smfcode.materialBox.boxNoReel
=
\u6599\u
76D2
\u
4E2D
\u
65E0
\u7269\u6599
smfcode.materialBox.inPos
=
\u7269\u6599\u
5DF2
\u5728\u
5E93
\u
4F4D{0}
\u
4E2D
smfcode.materialBox.inOtherBox
=
\u7269\u6599\u
5DF2
\u5728\u6599\u
76D2{0}
\u
4E2D
\ No newline at end of file
\ No newline at end of file
src/main/resources/messages_zh_TW.properties
查看文件 @
a5db80b
...
@@ -114,4 +114,10 @@ smfcode.order.cannotUpdateLine=\u5DE5\u55AE\u5DF2\u51FA\u5EAB\uFF0C\u4E0D\u80FD\
...
@@ -114,4 +114,10 @@ smfcode.order.cannotUpdateLine=\u5DE5\u55AE\u5DF2\u51FA\u5EAB\uFF0C\u4E0D\u80FD\
smfcode.order.uploadOK
=
\u
5DE5
\u
55AE
\u
4E0A
\u
50B3
\u6210\u
529F
smfcode.order.uploadOK
=
\u
5DE5
\u
55AE
\u
4E0A
\u
50B3
\u6210\u
529F
smfcode.order.ameExists
=
\u
5DE5
\u
55AE
\u
540D
\u
7A31[{0}]
\u
5DF2
\u
5B58
\u5728
smfcode.order.ameExists
=
\u
5DE5
\u
55AE
\u
540D
\u
7A31[{0}]
\u
5DF2
\u
5B58
\u5728
smfcode.order.hasClose
=
\u
5DE5
\u
55AE
\u
5DF2
\u
95DC
\u9589
smfcode.order.hasClose
=
\u
5DE5
\u
55AE
\u
5DF2
\u
95DC
\u9589
smfcode.order.supplementOutFail
=
\u
672A
\u
627E
\u5230\u
53EF
\u
4EE5
\u
51FA
\u
5EAB
\u7684\u
88DC
\u6599
\ No newline at end of file
\ No newline at end of file
smfcode.order.supplementOutFail
=
\u
672A
\u
627E
\u5230\u
53EF
\u
4EE5
\u
51FA
\u
5EAB
\u7684\u
88DC
\u6599
smfcode.materialBox.quantityshort
=
\u7269\u6599\u6570\u
91CF
\u
4E0D
\u
8DB3
smfcode.materialBox.invalid
=
\u
672A
\u
627E
\u5230\u6599\u
76D2
\u
4FE1
\u
606F{0}
smfcode.materialBox.noReel
=
\u6599\u
76D2
\u
4E2D
\u
672A
\u
627E
\u5230\u
5C0D
\u
61C9
\u7269\u6599
smfcode.materialBox.boxNoReel
=
\u6599\u
76D2
\u
4E2D
\u7121\u7269\u6599
smfcode.materialBox.inPos
=
\u7269\u6599\u
5DF2
\u5728\u
5EAB
\u
4F4D{0}
\u
4E2D
smfcode.materialBox.inOtherBox
=
\u7269\u6599\u
5DF2
\u5728\u6599\u
76D2{0}
\u
4E2D
\ No newline at end of file
\ No newline at end of file
编写
预览
支持
Markdown
格式
附加文件
你添加了
0
人
到此讨论。请谨慎行事。
Finish editing this message first!
Cancel
请
注册
或
登录
后发表评论