Skip to content
切换导航条
切换导航条
当前项目
正在载入...
登录
孙克
/
smf-core
转到一个项目
切换导航栏
切换导航栏固定状态
项目
群组
代码片段
帮助
项目
活动
版本库
流水线
图表
问题
0
合并请求
0
维基
网络
创建新的问题
作业
提交
问题看板
文件
提交
网络
比较
分支
标签
Commit 2aa4b15c
由
LN
编写于
2023-05-05 09:41:21 +0800
浏览文件
选项
浏览文件
标签
下载
电子邮件补丁
差异文件
增加锁定物料功能
1 个父辈
b1ebd671
隐藏空白字符变更
内嵌
并排
正在显示
10 个修改的文件
包含
135 行增加
和
10 行删除
src/main/java/com/neotel/smfcore/common/init/MenuInit.java
src/main/java/com/neotel/smfcore/core/humiture/rest/bean/dto/HumitureDto.java
src/main/java/com/neotel/smfcore/core/storage/rest/LockMaterialController.java
src/main/java/com/neotel/smfcore/core/storage/rest/StoragePosController.java
src/main/java/com/neotel/smfcore/core/storage/rest/query/StoragePosFindCriteria.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/common/init/MenuInit.java
查看文件 @
2aa4b15
...
@@ -174,6 +174,7 @@ public class MenuInit {
...
@@ -174,6 +174,7 @@ public class MenuInit {
//报表:出入库、库存
//报表:出入库、库存
Menu
pMenuReport
=
Menu
.
CreatePMenu
(
"报表"
,
7
,
"report"
,
"inOutData"
,
null
);
Menu
pMenuReport
=
Menu
.
CreatePMenu
(
"报表"
,
7
,
"report"
,
"inOutData"
,
null
);
addDefaultFunctionMenu
(
70
,
pMenuReport
,
"锁定物料"
,
"lockMaterials"
,
"system/lockMaterials/index"
,
"lockMaterial"
);
addDefaultFunctionMenu
(
71
,
pMenuReport
,
"出入库"
,
"inOutData"
,
"neolight/inOutData/index"
,
"outPut"
);
addDefaultFunctionMenu
(
71
,
pMenuReport
,
"出入库"
,
"inOutData"
,
"neolight/inOutData/index"
,
"outPut"
);
addDefaultFunctionMenu
(
72
,
pMenuReport
,
"库存"
,
"inventory"
,
"neolight/inventory/index"
,
"inventory"
);
addDefaultFunctionMenu
(
72
,
pMenuReport
,
"库存"
,
"inventory"
,
"neolight/inventory/index"
,
"inventory"
);
addDefaultFunctionMenu
(
73
,
pMenuReport
,
"温湿度"
,
"humiture"
,
"humiture/humitureReport/index"
,
"humiture"
);
addDefaultFunctionMenu
(
73
,
pMenuReport
,
"温湿度"
,
"humiture"
,
"humiture/humitureReport/index"
,
"humiture"
);
...
...
src/main/java/com/neotel/smfcore/core/humiture/rest/bean/dto/HumitureDto.java
查看文件 @
2aa4b15
...
@@ -18,17 +18,12 @@ import java.util.List;
...
@@ -18,17 +18,12 @@ import java.util.List;
@Setter
@Setter
public
class
HumitureDto
{
public
class
HumitureDto
{
/**
* 最高温度
*/
@ApiModelProperty
(
"最高温度"
)
@ApiModelProperty
(
"最高温度"
)
private
float
maxTemperature
=
38.0
F
;
private
float
maxTemperature
=
38.0
F
;
@ApiModelProperty
(
"最低温度"
)
@ApiModelProperty
(
"最低温度"
)
private
float
minTemperature
=
0.0
F
;
private
float
minTemperature
=
0.0
F
;
/**
* 最大湿度值
*/
@ApiModelProperty
(
"最大湿度"
)
@ApiModelProperty
(
"最大湿度"
)
private
float
maxHumidity
=
100.0
F
;
private
float
maxHumidity
=
100.0
F
;
...
...
src/main/java/com/neotel/smfcore/core/storage/rest/LockMaterialController.java
0 → 100644
查看文件 @
2aa4b15
package
com
.
neotel
.
smfcore
.
core
.
storage
.
rest
;
import
com.neotel.smfcore.common.bean.ResultBean
;
import
com.neotel.smfcore.common.exception.ValidateException
;
import
com.neotel.smfcore.core.barcode.service.po.Barcode
;
import
com.neotel.smfcore.core.device.util.DataCache
;
import
com.neotel.smfcore.core.storage.rest.dto.CheckOutDto
;
import
com.neotel.smfcore.core.storage.service.manager.IStoragePosManager
;
import
com.neotel.smfcore.core.storage.service.po.Storage
;
import
com.neotel.smfcore.core.storage.service.po.StoragePos
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
lombok.RequiredArgsConstructor
;
import
lombok.extern.slf4j.Slf4j
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.PutMapping
;
import
org.springframework.web.bind.annotation.RequestBody
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RestController
;
@Slf4j
@RestController
@RequiredArgsConstructor
@Api
(
tags
=
"物料管理:锁定物料"
)
@RequestMapping
(
"api/lockMaterials"
)
public
class
LockMaterialController
{
private
static
String
lockId
=
"ml"
;
private
static
String
lockName
=
"ml"
;
@Autowired
private
DataCache
dataCache
;
@Autowired
private
final
IStoragePosManager
storagePosManager
;
@ApiOperation
(
value
=
"锁定物料:增加锁定"
)
@PutMapping
(
"/lock"
)
public
ResultBean
lock
(
@RequestBody
CheckOutDto
checkOutDto
)
{
if
(
checkOutDto
.
getPids
()
==
null
)
{
throw
new
ValidateException
(
"smfcore.valueCanotNull"
,
"{0}不能为空"
,
new
String
[]{
"ID"
});
}
for
(
String
pid
:
checkOutDto
.
getPids
())
{
StoragePos
pos
=
storagePosManager
.
get
(
pid
);
if
(
pos
==
null
||
pos
.
getBarcode
()==
null
)
{
continue
;
}
Storage
storage
=
dataCache
.
getStorageById
(
pos
.
getStorageId
());
if
(
storage
==
null
)
{
throw
new
ValidateException
(
"smfcore.valueNotExist"
,
"{0}[{1}]不存在"
,
new
String
[]{
"storageId"
,
pos
.
getStorageId
()});
}
Barcode
code
=
pos
.
getBarcode
();
//如果已经锁定,直接跳过
if
(
code
.
getLockId
()!=
null
){
log
.
info
(
"锁定物料:增加锁定时物料已被锁定: 位置【"
+
pos
.
getPosName
()
+
"】条码【"
+
code
.
getBarcode
()+
"】【"
+
code
.
getLockId
()+
"】"
);
continue
;
}
code
.
setLockId
(
lockId
);
code
.
setLockName
(
lockName
);
pos
.
setBarcode
(
code
);
storagePosManager
.
save
(
pos
);
dataCache
.
lockOneReel
(
storage
.
getCid
(),
code
.
getPartNumber
());
log
.
info
(
"锁定物料:增加锁定 "
+
lockId
+
" 位置【"
+
pos
.
getPosName
()
+
"】【"
+
code
.
getBarcode
()+
"】"
);
}
return
ResultBean
.
newOkResult
(
""
);
}
@ApiOperation
(
value
=
"锁定物料:解除锁定"
)
@PutMapping
(
"/unlock"
)
public
ResultBean
unlock
(
@RequestBody
CheckOutDto
checkOutDto
)
{
if
(
checkOutDto
.
getPids
()
==
null
)
{
throw
new
ValidateException
(
"smfcore.valueCanotNull"
,
"{0}不能为空"
,
new
String
[]{
"ID"
});
}
for
(
String
pid
:
checkOutDto
.
getPids
())
{
StoragePos
pos
=
storagePosManager
.
get
(
pid
);
if
(
pos
==
null
||
pos
.
getBarcode
()==
null
)
{
continue
;
}
Storage
storage
=
dataCache
.
getStorageById
(
pos
.
getStorageId
());
if
(
storage
==
null
)
{
throw
new
ValidateException
(
"smfcore.valueNotExist"
,
"{0}[{1}]不存在"
,
new
String
[]{
"storageId"
,
pos
.
getStorageId
()});
}
Barcode
code
=
pos
.
getBarcode
();
if
(
code
.
getLockId
()==
null
){
log
.
info
(
"锁定物料:解除锁定时物料未锁定: 位置【"
+
pos
.
getPosName
()
+
"】条码【"
+
code
.
getBarcode
()+
"】"
);
continue
;
}
if
(!
code
.
getLockId
().
equals
(
lockId
)){
log
.
info
(
"锁定物料:解除锁定时物料被其他工单锁定: 位置【"
+
pos
.
getPosName
()
+
"】条码【"
+
code
.
getBarcode
()+
"】lockId=【"
+
code
.
getLockId
()+
"】"
);
continue
;
}
code
.
setLockId
(
null
);
code
.
setLockName
(
null
);
pos
.
setBarcode
(
code
);
storagePosManager
.
save
(
pos
);
dataCache
.
lockOneReel
(
storage
.
getCid
(),
code
.
getPartNumber
());
log
.
info
(
"锁定物料:解除锁定【"
+
storage
.
getName
()
+
"_"
+
storage
.
getCid
()
+
"】位置【"
+
pos
.
getPosName
()
+
"】【"
+
code
.
getBarcode
()+
"】"
);
}
return
ResultBean
.
newOkResult
(
""
);
}
}
src/main/java/com/neotel/smfcore/core/storage/rest/StoragePosController.java
查看文件 @
2aa4b15
...
@@ -387,6 +387,14 @@ public class StoragePosController {
...
@@ -387,6 +387,14 @@ public class StoragePosController {
}
}
}
}
if
(
criteria
.
locked
==
null
){
}
else
if
(
criteria
.
locked
==
true
)
{
query
.
addCriteria
(
Criteria
.
where
(
"barcode.lockId"
).
ne
(
null
));
}
else
{
query
.
addCriteria
(
Criteria
.
where
(
"barcode.lockId"
).
is
(
null
));
}
query
.
addCriteria
(
baseCriteria
);
query
.
addCriteria
(
baseCriteria
);
return
query
;
return
query
;
}
}
...
...
src/main/java/com/neotel/smfcore/core/storage/rest/query/StoragePosFindCriteria.java
查看文件 @
2aa4b15
...
@@ -107,4 +107,8 @@ public class StoragePosFindCriteria {
...
@@ -107,4 +107,8 @@ public class StoragePosFindCriteria {
}
}
return
-
1
;
return
-
1
;
}
}
@ApiModelProperty
(
"是否锁定,true=锁定,false=未锁定"
)
public
Boolean
locked
;
}
}
src/main/resources/messages.properties
查看文件 @
2aa4b15
...
@@ -342,6 +342,7 @@ smfcore.updatePass.hasNoAccess=\u6CA1\u6709\u64CD\u4F5C\u6743\u9650
...
@@ -342,6 +342,7 @@ smfcore.updatePass.hasNoAccess=\u6CA1\u6709\u64CD\u4F5C\u6743\u9650
smfcore.selfAudit.noPos
=
\u
76D8
\u
70B9{0}
\u
672A
\u
627E
\u5230\u
5E93
\u
4F4D
\u
53F7
smfcore.selfAudit.noPos
=
\u
76D8
\u
70B9{0}
\u
672A
\u
627E
\u5230\u
5E93
\u
4F4D
\u
53F7
smfcore.task.updatePutInFail
=
\u5165\u
5E93
\u
4EFB
\u
52A1{0}[{1}]
\u
4E0D
\u
80FD
\u
66F4
\u
65B0
\u
72B6
\u6001\u
4E3A{2}
smfcore.task.updatePutInFail
=
\u5165\u
5E93
\u
4EFB
\u
52A1{0}[{1}]
\u
4E0D
\u
80FD
\u
66F4
\u
65B0
\u
72B6
\u6001\u
4E3A{2}
smfcore.saveOk
=
\u
4FDD
\u
5B58
\u6210\u
529F
smfcore.saveOk
=
\u
4FDD
\u
5B58
\u6210\u
529F
smfcore.lockMaterials
=
\u9501\u
5B9A
\u7269\u6599
#smfclient.nlp.onlyOneTray=\u4E0D\u53EF\u540C\u65F6\u653E\u5165\u591A\u76D8\u7269\u6599:{0}
#smfclient.nlp.onlyOneTray=\u4E0D\u53EF\u540C\u65F6\u653E\u5165\u591A\u76D8\u7269\u6599:{0}
#smfclient.nlp.cannotFindPos={0}\u672A\u627E\u5230\u5E93\u4F4D:{1}
#smfclient.nlp.cannotFindPos={0}\u672A\u627E\u5230\u5E93\u4F4D:{1}
#smfclient.nlp.inputOk={0}\u5165\u5E93\u5230{1}\u6210\u529F
#smfclient.nlp.inputOk={0}\u5165\u5E93\u5230{1}\u6210\u529F
...
...
src/main/resources/messages_en_US.properties
查看文件 @
2aa4b15
...
@@ -341,4 +341,5 @@ smfcore.selfAudit.pause=self audit {0} has Paused
...
@@ -341,4 +341,5 @@ smfcore.selfAudit.pause=self audit {0} has Paused
smfcore.updatePass.hasNoAccess
=
No operating rights
smfcore.updatePass.hasNoAccess
=
No operating rights
smfcore.selfAudit.noPos
=
Self Audit{0}No depot number found
smfcore.selfAudit.noPos
=
Self Audit{0}No depot number found
smfcore.task.updatePutInFail
=
Cannot update the status of the inbound task {0}[{1}] to {2}
smfcore.task.updatePutInFail
=
Cannot update the status of the inbound task {0}[{1}] to {2}
smfcore.saveOk
=
save successfully
\ No newline at end of file
\ No newline at end of file
smfcore.saveOk
=
save successfully
smfcore.lockMaterials
=
Locking Materials
\ No newline at end of file
\ No newline at end of file
src/main/resources/messages_ja_JP.properties
查看文件 @
2aa4b15
...
@@ -338,4 +338,5 @@ smfcore.selfAudit.pause=\u30BB\u30EB\u30D5\u30C6\u30B9\u30C8{0}\u304C\u4E2D\u65A
...
@@ -338,4 +338,5 @@ smfcore.selfAudit.pause=\u30BB\u30EB\u30D5\u30C6\u30B9\u30C8{0}\u304C\u4E2D\u65A
smfcore.updatePass.hasNoAccess
=
\u
64CD
\u
4F5C
\u
6A29
\u
306A
\u3057
smfcore.updatePass.hasNoAccess
=
\u
64CD
\u
4F5C
\u
6A29
\u
306A
\u3057
smfcore.selfAudit.noPos
=
\u
76D8
\u
70B9{0}
\u
672A
\u
627E
\u5230\u
5E93
\u
4F4D
\u
53F7
smfcore.selfAudit.noPos
=
\u
76D8
\u
70B9{0}
\u
672A
\u
627E
\u5230\u
5E93
\u
4F4D
\u
53F7
smfcore.task.updatePutInFail
=
\u5165\u
5E93
\u
4EFB
\u
52A1{0}[{1}]
\u
4E0D
\u
80FD
\u
66F4
\u
65B0
\u
72B6
\u6001\u
4E3A{2}
smfcore.task.updatePutInFail
=
\u5165\u
5E93
\u
4EFB
\u
52A1{0}[{1}]
\u
4E0D
\u
80FD
\u
66F4
\u
65B0
\u
72B6
\u6001\u
4E3A{2}
smfcore.saveOk
=
\u
4FDD
\u
5B58
\u6210\u
529F
\ No newline at end of file
\ No newline at end of file
smfcore.saveOk
=
\u
4FDD
\u
5B58
\u6210\u
529F
smfcore.lockMaterials
=
\u9501\u
5B9A
\u7269\u6599
\ No newline at end of file
\ No newline at end of file
src/main/resources/messages_zh_CN.properties
查看文件 @
2aa4b15
...
@@ -338,4 +338,5 @@ smfcore.selfAudit.pause=\u76D8\u70B9{0}\u5DF2\u6682\u505C
...
@@ -338,4 +338,5 @@ smfcore.selfAudit.pause=\u76D8\u70B9{0}\u5DF2\u6682\u505C
smfcore.updatePass.hasNoAccess
=
\u
6CA1
\u6709\u
64CD
\u
4F5C
\u6743\u9650
smfcore.updatePass.hasNoAccess
=
\u
6CA1
\u6709\u
64CD
\u
4F5C
\u6743\u9650
smfcore.selfAudit.noPos
=
\u
76D8
\u
70B9{0}
\u
672A
\u
627E
\u5230\u
5E93
\u
4F4D
\u
53F7
smfcore.selfAudit.noPos
=
\u
76D8
\u
70B9{0}
\u
672A
\u
627E
\u5230\u
5E93
\u
4F4D
\u
53F7
smfcore.task.updatePutInFail
=
\u5165\u
5E93
\u
4EFB
\u
52A1{0}[{1}]
\u
4E0D
\u
80FD
\u
66F4
\u
65B0
\u
72B6
\u6001\u
4E3A{2}
smfcore.task.updatePutInFail
=
\u5165\u
5E93
\u
4EFB
\u
52A1{0}[{1}]
\u
4E0D
\u
80FD
\u
66F4
\u
65B0
\u
72B6
\u6001\u
4E3A{2}
smfcore.saveOk
=
\u
4FDD
\u
5B58
\u6210\u
529F
\ No newline at end of file
\ No newline at end of file
smfcore.saveOk
=
\u
4FDD
\u
5B58
\u6210\u
529F
smfcore.lockMaterials
=
\u9501\u
5B9A
\u7269\u6599
\ No newline at end of file
\ No newline at end of file
src/main/resources/messages_zh_TW.properties
查看文件 @
2aa4b15
...
@@ -339,4 +339,5 @@ smfcore.selfAudit.pause=\u76E4\u9EDE{0}\u5DF2\u66AB\u505C
...
@@ -339,4 +339,5 @@ smfcore.selfAudit.pause=\u76E4\u9EDE{0}\u5DF2\u66AB\u505C
smfcore.updatePass.hasNoAccess
=
\u
6C92
\u6709\u
64CD
\u
4F5C
\u
6B0A
\u9650
smfcore.updatePass.hasNoAccess
=
\u
6C92
\u6709\u
64CD
\u
4F5C
\u
6B0A
\u9650
smfcore.selfAudit.noPos
=
\u
76E4
\u
9EDE{0}
\u
672A
\u
627E
\u5230\u
5EAB
\u
4F4D
\u
865F
smfcore.selfAudit.noPos
=
\u
76E4
\u
9EDE{0}
\u
672A
\u
627E
\u5230\u
5EAB
\u
4F4D
\u
865F
smfcore.task.updatePutInFail
=
\u5165\u
5EAB
\u
4EFB
\u
52D9{0}[{1}]
\u
4E0D
\u
80FD
\u
66F4
\u
65B0
\u
72C0
\u
614B
\u
70BA{2}
smfcore.task.updatePutInFail
=
\u5165\u
5EAB
\u
4EFB
\u
52D9{0}[{1}]
\u
4E0D
\u
80FD
\u
66F4
\u
65B0
\u
72C0
\u
614B
\u
70BA{2}
smfcore.saveOk
=
\u
4FDD
\u
5B58
\u6210\u
529F
\ No newline at end of file
\ No newline at end of file
smfcore.saveOk
=
\u
4FDD
\u
5B58
\u6210\u
529F
smfcore.lockMaterials
=
\u9396\u
5B9A
\u7269\u6599
\ No newline at end of file
\ No newline at end of file
编写
预览
支持
Markdown
格式
附加文件
你添加了
0
人
到此讨论。请谨慎行事。
Finish editing this message first!
Cancel
请
注册
或
登录
后发表评论