Skip to content
切换导航条
切换导航条
当前项目
正在载入...
登录
孙克
/
smf-core
转到一个项目
切换导航栏
切换导航栏固定状态
项目
群组
代码片段
帮助
项目
活动
版本库
流水线
图表
问题
0
合并请求
0
维基
网络
创建新的问题
作业
提交
问题看板
文件
提交
网络
比较
分支
标签
Commit 87984628
由
张少辉
编写于
2026-01-07 15:55:58 +0800
浏览文件
选项
浏览文件
标签
下载
电子邮件补丁
差异文件
1.开线数量维护优化
2.物料日志按小时查询修改
1 个父辈
961b3603
隐藏空白字符变更
内嵌
并排
正在显示
2 个修改的文件
包含
41 行增加
和
19 行删除
src/main/java/com/neotel/smfcore/core/system/rest/bean/query/TaskQueryCondition.java
src/main/java/com/neotel/smfcore/custom/lizhen/innerBox/rest/WireQtyMaintController.java
src/main/java/com/neotel/smfcore/core/system/rest/bean/query/TaskQueryCondition.java
查看文件 @
8798462
...
@@ -23,7 +23,7 @@ public class TaskQueryCondition {
...
@@ -23,7 +23,7 @@ public class TaskQueryCondition {
private
String
barcode
;
private
String
barcode
;
@QueryCondition
(
type
=
QueryCondition
.
Type
.
BETWEEN
,
propName
=
"updateDate"
)
@QueryCondition
(
type
=
QueryCondition
.
Type
.
BETWEEN
,
propName
=
"updateDate"
)
@DateTimeFormat
(
pattern
=
"yyyy-MM-dd"
)
@DateTimeFormat
(
pattern
=
"yyyy-MM-dd
HH:mm:ss
"
)
private
BetweenData
<
Date
>
updateDate
;
private
BetweenData
<
Date
>
updateDate
;
@QueryCondition
@QueryCondition
...
...
src/main/java/com/neotel/smfcore/custom/lizhen/innerBox/rest/WireQtyMaintController.java
查看文件 @
8798462
package
com
.
neotel
.
smfcore
.
custom
.
lizhen
.
innerBox
.
rest
;
package
com
.
neotel
.
smfcore
.
custom
.
lizhen
.
innerBox
.
rest
;
import
com.neotel.smfcore.common.bean.ResultBean
;
import
com.neotel.smfcore.common.bean.ResultBean
;
import
com.neotel.smfcore.common.exception.ValidateException
;
import
com.neotel.smfcore.common.utils.Constants
;
import
com.neotel.smfcore.common.utils.Constants
;
import
com.neotel.smfcore.common.utils.StringUtils
;
import
com.neotel.smfcore.core.device.util.DataCache
;
import
com.neotel.smfcore.core.device.util.DataCache
;
import
com.neotel.smfcore.custom.lizhen.innerBox.bean.ReelConsumption
;
import
com.neotel.smfcore.custom.lizhen.innerBox.bean.ReelConsumption
;
import
com.neotel.smfcore.security.annotation.AnonymousAccess
;
import
com.neotel.smfcore.security.annotation.AnonymousAccess
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
io.swagger.annotations.ApiOperation
;
import
io.swagger.models.auth.In
;
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.web.bind.annotation.RequestBody
;
import
org.springframework.web.bind.annotation.RequestBody
;
...
@@ -28,41 +29,62 @@ public class WireQtyMaintController {
...
@@ -28,41 +29,62 @@ public class WireQtyMaintController {
@ApiOperation
(
"获取线体信息"
)
@ApiOperation
(
"获取线体信息"
)
@RequestMapping
(
value
=
"/detail"
)
@RequestMapping
(
value
=
"/detail"
)
//@AnonymousAccess
public
ResultBean
detail
()
{
public
ResultBean
detail
()
{
Map
<
String
,
Integer
>
cacheMap
=
dataCache
.
getCache
(
Constants
.
CACHE_wireQtyMaint
);
Map
<
String
,
Integer
>
cacheMap
=
dataCache
.
getCache
(
Constants
.
CACHE_wireQtyMaint
);
if
(
cacheMap
==
null
)
{
if
(
cacheMap
==
null
)
{
cacheMap
=
new
HashMap
<>();
cacheMap
=
new
HashMap
<>();
}
}
Map
<
String
,
ReelConsumption
>
reelConsumptionMap
=
dataCache
.
getCache
(
Constants
.
Cache_reelConsumption
);
return
ResultBean
.
newOkResult
(
cacheMap
);
if
(
reelConsumptionMap
==
null
)
{
}
reelConsumptionMap
=
new
HashMap
<>();
@ApiOperation
(
"新增线体信息"
)
@RequestMapping
(
"/save"
)
public
ResultBean
save
(
@RequestBody
Map
<
String
,
String
>
paramMap
)
{
String
line
=
paramMap
.
get
(
"line"
);
String
amountStr
=
paramMap
.
get
(
"amount"
);
if
(
StringUtils
.
isEmpty
(
line
)
||
StringUtils
.
isEmpty
(
amountStr
))
{
return
ResultBean
.
newErrorResult
(-
1
,
"smfcore.valueCanotNull"
,
"{0}不能为空"
,
new
String
[]{
"线体或者开线数量"
});
}
}
if
(
reelConsumptionMap
.
size
()
>
0
)
{
int
amount
=
0
;
for
(
ReelConsumption
reelConsumption
:
reelConsumptionMap
.
values
())
{
try
{
for
(
String
key
:
reelConsumption
.
getInventoryMap
().
keySet
())
{
amount
=
Integer
.
parseInt
(
amountStr
);
Integer
integer
=
cacheMap
.
get
(
key
);
}
catch
(
NumberFormatException
e
)
{
if
(
integer
==
null
)
{
return
ResultBean
.
newErrorResult
(-
1
,
""
,
"开线数量填写错误"
);
integer
=
0
;
}
cacheMap
.
put
(
key
,
integer
);
Map
<
String
,
Integer
>
cacheMap
=
dataCache
.
getCache
(
Constants
.
CACHE_wireQtyMaint
);
}
if
(
cacheMap
==
null
)
{
}
cacheMap
=
new
HashMap
<>();
}
}
}
cacheMap
.
put
(
line
,
amount
);
dataCache
.
updateCache
(
Constants
.
CACHE_wireQtyMaint
,
cacheMap
);
dataCache
.
updateCache
(
Constants
.
CACHE_wireQtyMaint
,
cacheMap
);
return
ResultBean
.
newOkResult
(
cacheMap
);
return
ResultBean
.
newOkResult
(
""
);
}
@ApiOperation
(
"删除线体信息"
)
@RequestMapping
(
value
=
"/delete"
)
public
ResultBean
delete
(
String
line
)
{
if
(
StringUtils
.
isEmpty
(
line
))
{
return
ResultBean
.
newErrorResult
(-
1
,
"smfcore.valueCanotNull"
,
"{0}不能为空"
,
new
String
[]{
"线体"
});
}
Map
<
String
,
Integer
>
cacheMap
=
dataCache
.
getCache
(
Constants
.
CACHE_wireQtyMaint
);
if
(
cacheMap
==
null
)
{
cacheMap
=
new
HashMap
<>();
}
cacheMap
.
remove
(
line
);
dataCache
.
updateCache
(
Constants
.
CACHE_wireQtyMaint
,
cacheMap
);
return
ResultBean
.
newOkResult
(
""
);
}
}
@ApiOperation
(
"修改线体信息"
)
@ApiOperation
(
"修改线体信息"
)
@RequestMapping
(
value
=
"/update"
)
@RequestMapping
(
value
=
"/update"
)
//@AnonymousAccess
public
ResultBean
update
(
@RequestBody
Map
<
String
,
Integer
>
paramMap
)
{
public
ResultBean
update
(
@RequestBody
Map
<
String
,
Integer
>
paramMap
)
{
Map
<
String
,
Integer
>
cacheMap
=
dataCache
.
getCache
(
Constants
.
CACHE_wireQtyMaint
);
Map
<
String
,
Integer
>
cacheMap
=
dataCache
.
getCache
(
Constants
.
CACHE_wireQtyMaint
);
if
(
cacheMap
==
null
)
{
if
(
cacheMap
==
null
)
{
cacheMap
=
new
HashMap
<>();
cacheMap
=
new
HashMap
<>();
}
}
for
(
String
key
:
paramMap
.
keySet
())
{
for
(
String
key
:
paramMap
.
keySet
())
{
cacheMap
.
put
(
key
,
paramMap
.
get
(
key
));
cacheMap
.
put
(
key
,
paramMap
.
get
(
key
));
}
}
dataCache
.
updateCache
(
Constants
.
CACHE_wireQtyMaint
,
cacheMap
);
dataCache
.
updateCache
(
Constants
.
CACHE_wireQtyMaint
,
cacheMap
);
return
ResultBean
.
newOkResult
(
""
);
return
ResultBean
.
newOkResult
(
""
);
...
...
编写
预览
支持
Markdown
格式
附加文件
你添加了
0
人
到此讨论。请谨慎行事。
Finish editing this message first!
Cancel
请
注册
或
登录
后发表评论