Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
J
jyzb-platform
概览
Overview
Details
Activity
Cycle Analytics
版本库
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
问题
0
Issues
0
列表
Board
标记
里程碑
合并请求
0
Merge Requests
0
CI / CD
CI / CD
流水线
作业
日程表
图表
维基
Wiki
代码片段
Snippets
成员
Members
Collapse sidebar
Close sidebar
活动
图像
聊天
创建新问题
作业
提交
Issue Boards
Open sidebar
赵剑炜
jyzb-platform
Commits
3abf09a8
Commit
3abf09a8
authored
Nov 10, 2022
by
ning
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
贵金属防伪系统-新增广告语
parent
275738e5
显示空白字符变更
内嵌
并排
正在显示
2 个修改的文件
包含
14 行增加
和
5 行删除
+14
-5
ProductBatchDto.java
gold-api/src/main/java/com/junmp/gold/api/bean/dto/ProductBatchDto.java
+7
-2
ProductBatchController.java
gold-biz/src/main/java/com/junmp/gold/controller/ProductBatchController.java
+7
-3
没有找到文件。
gold-api/src/main/java/com/junmp/gold/api/bean/dto/ProductBatchDto.java
View file @
3abf09a8
...
...
@@ -42,7 +42,7 @@ public class ProductBatchDto implements Serializable {
/**
* 广告语
*/
private
String
adInfo
;
private
String
adInfo
;
/**
* 号型编号
...
...
@@ -77,11 +77,16 @@ public class ProductBatchDto implements Serializable {
/**
* 是否初始化完成
*/
private
Boolean
hasInit
;
private
Boolean
hasInit
;
/**
* 已生产数量
*/
private
Integer
doneNum
;
/**
* 初始化数量
*/
private
Integer
initNum
;
}
gold-biz/src/main/java/com/junmp/gold/controller/ProductBatchController.java
View file @
3abf09a8
...
...
@@ -36,7 +36,7 @@ import java.util.List;
* 作者:ningzp@junmp.com.cn
* <br>修改记录
* <br>修改日期 修改人 修改内容
*
*
20221109 ning 修改初始化重复成品码严重的BUG.
* </pre>
*/
@RestController
...
...
@@ -126,6 +126,8 @@ public class ProductBatchController implements ProductBatchDoc {
/**
* 批次信息
*
*
*/
private
List
<
ProductTag
>
batchTagInfo
(
ProductBatchDto
batch
)
{
if
(
batch
.
getHasInit
())
{
...
...
@@ -133,7 +135,8 @@ public class ProductBatchController implements ProductBatchDoc {
}
else
{
List
<
ProductTag
>
list
=
new
ArrayList
<>();
Integer
total
=
batch
.
getTotal
();
Integer
initVal
=
batch
.
getDoneNum
()
>
0
?
batch
.
getDoneNum
()
:
1
;
//修改已知的BUG 。重复成品码的根源
Integer
initVal
=
batch
.
getInitNum
()
>
0
?
batch
.
getInitNum
()
+
1
:
1
;
for
(;
initVal
<=
total
;
initVal
++)
{
ProductTag
tag
=
new
ProductTag
();
tag
.
setBatchId
(
batch
.
getBatchId
());
...
...
@@ -141,13 +144,14 @@ public class ProductBatchController implements ProductBatchDoc {
tag
.
setSpecId
(
batch
.
getSpecId
());
tag
.
setProduceTime
(
new
Date
());
tag
.
setSerialId
(
initVal
);
//成品码
StringBuilder
sb
=
new
StringBuilder
();
String
serialNo
=
GenCodeUtil
.
splicingZero
(
String
.
valueOf
(
initVal
),
4
);
sb
.
append
(
batch
.
getBatchNo
())
.
append
(
serialNo
);
tag
.
setProductCode
(
sb
.
toString
());
tag
.
setSerialId
(
initVal
);
tag
.
setHasInit
(
false
);
tag
.
setHasChecked
(
false
);
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论