Skip to content
切换导航条
切换导航条
当前项目
正在载入...
登录
孙克
/
smf-core
转到一个项目
切换导航栏
切换导航栏固定状态
项目
群组
代码片段
帮助
项目
活动
版本库
流水线
图表
问题
0
合并请求
0
维基
网络
创建新的问题
作业
提交
问题看板
文件
提交
网络
比较
分支
标签
Commit 60554cd0
由
LN
编写于
2023-05-24 14:33:17 +0800
浏览文件
选项
浏览文件
标签
下载
电子邮件补丁
差异文件
去掉barcode的expTime ,过期时间使用 expireDate
1 个父辈
e29e155f
显示空白字符变更
内嵌
并排
正在显示
4 个修改的文件
包含
29 行增加
和
26 行删除
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/custom/micron20031/MicronSpController.java
src/main/java/com/neotel/smfcore/custom/micron20031/bean/dto/PosInfoDto.java
src/main/java/com/neotel/smfcore/core/barcode/rest/bean/dto/BarcodeDto.java
查看文件 @
60554cd
...
...
@@ -36,8 +36,8 @@ public class BarcodeDto implements Serializable {
private
float
maxStorageTime
=
0
;
@ApiModelProperty
(
"过期时间(入库时间+最大存储时间)"
)
private
Date
expTime
;
//
@ApiModelProperty("过期时间(入库时间+最大存储时间)")
//
private Date expTime;
@ApiModelProperty
(
"过期状态,-1未入库0在库,1已出库正常,2已出库且已过期"
)
private
int
status
=
BARCODE_STATUS
.
NEW
;
...
...
src/main/java/com/neotel/smfcore/core/barcode/service/po/Barcode.java
查看文件 @
60554cd
...
...
@@ -42,10 +42,10 @@ public class Barcode extends BasePo implements Serializable {
private
int
mixTime
=
0
;
private
float
maxStorageTime
=
0
;
/**
* 过期时间(入库时间+最大存储时间)
*/
private
Date
expTime
;
//
/**
//
* 过期时间(入库时间+最大存储时间)
//
*/
//
private Date expTime;
/**
* 过期状态,-1未入库0在库,1已出库正常,2已出库且已过期
...
...
@@ -287,7 +287,7 @@ public class Barcode extends BasePo implements Serializable {
this
.
putInDate
=
new
Date
();
status
=
BARCODE_STATUS
.
IN_STORE
;
updateExpTime
();
//
updateExpTime();
}
...
...
@@ -307,18 +307,18 @@ public class Barcode extends BasePo implements Serializable {
this
.
putInDate
=
putInDate
;
}
private
void
updateExpTime
()
{
if
(
expTime
==
null
&&
maxStorageTime
!=
0
F
&&
putInTime
!=
-
1
)
{
Float
maxStorageTimeMill
=
maxStorageTime
*
60
*
60
*
1000
;
expTime
=
new
Date
(
putInTime
+
maxStorageTimeMill
.
longValue
());
if
(
expireDate
!=
null
)
{
//如果是在包装上的过期时间之前,使用包装上的过期时间
if
(
expireDate
.
getTime
()
<
expTime
.
getTime
())
{
expTime
=
expireDate
;
}
}
}
}
//
private void updateExpTime() {
//
if (expTime == null && maxStorageTime != 0F && putInTime != -1) {
//
Float maxStorageTimeMill = maxStorageTime * 60 * 60 * 1000;
//
expTime = new Date(putInTime + maxStorageTimeMill.longValue());
//
if (expireDate != null) {
//
//如果是在包装上的过期时间之前,使用包装上的过期时间
//
if (expireDate.getTime() < expTime.getTime()) {
//
expTime = expireDate;
//
}
//
}
//
}
//
}
public
void
updateSluggishTime
(
int
sluggishDay
){
if
(
sluggishDay
>
0
){
...
...
@@ -372,13 +372,13 @@ public class Barcode extends BasePo implements Serializable {
this
.
checkOutDate
=
checkOutDate
;
this
.
outOpor
=
opor
;
if
(
checkOutDate
!=
null
)
{
//出库时判断是否过期
updateExpTime
();
if
(
expTime
!=
null
&&
checkOutDate
.
after
(
expTime
))
{
//过期时间小于出库时间,说明出库的时候已经过期了
status
=
BARCODE_STATUS
.
OUT_EXPIRED
;
}
else
{
//
updateExpTime();
//
if (expTime != null && checkOutDate.after(expTime)) {
//
//过期时间小于出库时间,说明出库的时候已经过期了
//
status = BARCODE_STATUS.OUT_EXPIRED;
//
} else {
status
=
BARCODE_STATUS
.
OUT_NORMAL
;
}
//
}
}
}
...
...
src/main/java/com/neotel/smfcore/custom/micron20031/MicronSpController.java
查看文件 @
60554cd
...
...
@@ -120,7 +120,8 @@ public class MicronSpController {
dto
.
setBarcode
(
pos
.
getBarcode
().
getBarcode
());
dto
.
setPartNumber
(
pos
.
getBarcode
().
getPartNumber
());
dto
.
setAmount
(
pos
.
getBarcode
().
getAmount
());
dto
.
setExpTime
(
pos
.
getBarcode
().
getExpTime
());
dto
.
setExpTime
(
pos
.
getBarcode
().
getExpireDate
());
dto
.
setExpireDate
(
pos
.
getBarcode
().
getExpireDate
());
}
return
dto
;
...
...
src/main/java/com/neotel/smfcore/custom/micron20031/bean/dto/PosInfoDto.java
查看文件 @
60554cd
...
...
@@ -22,4 +22,6 @@ public class PosInfoDto implements Serializable {
private
int
amount
;
@ApiModelProperty
(
"过期时间(入库时间+最大存储时间)"
)
private
Date
expTime
;
@ApiModelProperty
(
"包装上带的过期时间"
)
private
Date
expireDate
;
}
编写
预览
支持
Markdown
格式
附加文件
你添加了
0
人
到此讨论。请谨慎行事。
Finish editing this message first!
Cancel
请
注册
或
登录
后发表评论