Skip to content
切换导航条
切换导航条
当前项目
正在载入...
登录
孙克
/
smf-core
转到一个项目
切换导航栏
切换导航栏固定状态
项目
群组
代码片段
帮助
项目
活动
版本库
流水线
图表
问题
0
合并请求
0
维基
网络
创建新的问题
作业
提交
问题看板
文件
提交
网络
比较
分支
标签
Commit 3023e267
由
zshaohui
编写于
2024-06-28 14:00:36 +0800
浏览文件
选项
浏览文件
标签
下载
电子邮件补丁
差异文件
人工入库页面 增加缓存信息和列表
1 个父辈
65c2c187
隐藏空白字符变更
内嵌
并排
正在显示
5 个修改的文件
包含
105 行增加
和
11 行删除
src/main/java/com/neotel/smfcore/custom/luxsan/factory_c/common/util/CacheNameUtil.java
src/main/java/com/neotel/smfcore/custom/luxsan/factory_c/wipstor/bean/ManualPutIn.java
src/main/java/com/neotel/smfcore/custom/luxsan/factory_c/wipstor/controller/BoxNgSnController.java
src/main/java/com/neotel/smfcore/custom/luxsan/factory_c/wipstor/controller/LineController.java
src/main/java/com/neotel/smfcore/custom/luxsan/factory_c/wipstor/controller/ManualWorkController.java
src/main/java/com/neotel/smfcore/custom/luxsan/factory_c/common/util/CacheNameUtil.java
查看文件 @
3023e26
...
...
@@ -21,4 +21,6 @@ public class CacheNameUtil {
public
static
final
String
CHCHE_SHIPCANCELUPSHELF
=
"CHCHE_SHIPCANCELUPSHELF"
;
public
static
final
String
CHCHE_RESTOREREPLACE
=
"CHCHE_RESTOREREPLACE"
;
public
static
final
String
CHCHE_WIP_MANUAL_INPUT
=
"CHCHE_WIP_MANUAL_INPUT"
;
}
src/main/java/com/neotel/smfcore/custom/luxsan/factory_c/wipstor/bean/ManualPutIn.java
0 → 100644
查看文件 @
3023e26
package
com
.
neotel
.
smfcore
.
custom
.
luxsan
.
factory_c
.
wipstor
.
bean
;
import
lombok.AllArgsConstructor
;
import
lombok.Data
;
@Data
@AllArgsConstructor
public
class
ManualPutIn
{
private
String
boxId
;
private
String
cartonId
;
//0的时候是手动绑定 1的是待过账
private
int
status
=
0
;
}
src/main/java/com/neotel/smfcore/custom/luxsan/factory_c/wipstor/controller/BoxNgSnController.java
0 → 100644
查看文件 @
3023e26
package
com
.
neotel
.
smfcore
.
custom
.
luxsan
.
factory_c
.
wipstor
.
controller
;
import
com.neotel.smfcore.common.bean.ResultBean
;
import
com.neotel.smfcore.common.exception.ApiException
;
import
com.neotel.smfcore.custom.luxsan.api.LuxsanApi
;
import
com.neotel.smfcore.custom.luxsan.api.bean.request.GetBoxNGsnListRequest
;
import
com.neotel.smfcore.security.annotation.AnonymousAccess
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
lombok.extern.slf4j.Slf4j
;
import
org.springframework.validation.annotation.Validated
;
import
org.springframework.web.bind.annotation.RequestBody
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RestController
;
import
java.util.HashMap
;
import
java.util.Map
;
@Api
(
tags
=
"ng料接口"
)
@Slf4j
@RestController
@RequestMapping
(
"/line"
)
public
class
BoxNgSnController
{
@ApiOperation
(
"ng料出库"
)
@RequestMapping
(
"/getBoxNGsnList"
)
@AnonymousAccess
public
ResultBean
getBoxNGsnList
(
@Validated
@RequestBody
GetBoxNGsnListRequest
result
)
throws
ApiException
{
log
.
info
(
"机种["
+
result
.
getModel
()+
"]和CartonId:"
+
result
.
getCarton_id
());
// List<GetBoxNGResult> boxNGsnList = LuxsanApi.getBoxNGsnList(result);
Map
<
String
,
String
>
map
=
new
HashMap
<>();
map
.
put
(
"model"
,
result
.
getModel
());
map
.
put
(
"carton_id"
,
result
.
getCarton_id
());
return
ResultBean
.
newOkResult
(
LuxsanApi
.
getBoxNGsnListWithStrategyPattern
(
result
));
}
}
src/main/java/com/neotel/smfcore/custom/luxsan/factory_c/wipstor/controller/LineController.java
查看文件 @
3023e26
...
...
@@ -32,7 +32,9 @@ import com.neotel.smfcore.custom.luxsan.api.bean.result.FetchPalletInfoResult;
import
com.neotel.smfcore.custom.luxsan.api.bean.result.GetBoxNGResult
;
import
com.neotel.smfcore.custom.luxsan.api.bean.result.ValidCartonResult
;
import
com.neotel.smfcore.custom.luxsan.api.enums.PalletEnum
;
import
com.neotel.smfcore.custom.luxsan.factory_c.common.util.CacheNameUtil
;
import
com.neotel.smfcore.custom.luxsan.factory_c.common.util.CommonUtil
;
import
com.neotel.smfcore.custom.luxsan.factory_c.wipstor.bean.ManualPutIn
;
import
com.neotel.smfcore.custom.luxsan.factory_c.wipstor.util.ManualWorkUtil
;
import
com.neotel.smfcore.custom.luxsan.factory_c.wipstor.util.TaskLocUtil
;
import
com.neotel.smfcore.security.annotation.AnonymousAccess
;
...
...
@@ -40,6 +42,7 @@ import io.swagger.annotations.Api;
import
io.swagger.annotations.ApiOperation
;
import
lombok.extern.slf4j.Slf4j
;
import
org.apache.logging.log4j.util.Strings
;
import
org.ehcache.impl.internal.concurrent.ConcurrentHashMap
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.data.domain.Sort
;
import
org.springframework.data.mongodb.core.query.Criteria
;
...
...
@@ -110,6 +113,13 @@ public class LineController {
try
{
ValidCartonResult
result
=
LuxsanApi
.
validCarton
(
new
ValidCartonRequest
(
""
,
scanCartonId
,
CommonUtil
.
plantCode
));
Map
<
String
,
ManualPutIn
>
cacheMap
=
dataCache
.
getCache
(
CacheNameUtil
.
CHCHE_WIP_MANUAL_INPUT
);
if
(
cacheMap
==
null
){
cacheMap
=
new
ConcurrentHashMap
<>();
}
cacheMap
.
put
(
barcode
.
getBarcode
(),
new
ManualPutIn
(
barcode
.
getBarcode
(),
scanCartonId
,
1
));
dataCache
.
updateCache
(
CacheNameUtil
.
CHCHE_WIP_MANUAL_INPUT
,
cacheMap
);
}
catch
(
Exception
e
)
{
return
ResultBean
.
newErrorResult
(-
1
,
""
,
e
.
getMessage
());
}
...
...
@@ -220,6 +230,15 @@ public class LineController {
String
boxLoc
=
TaskLocUtil
.
IN
;
taskService
.
addPutInTaskToExecute
(
storage
,
barcode
,
pos
,
boxLoc
);
Map
<
String
,
ManualPutIn
>
cacheMap
=
dataCache
.
getCache
(
CacheNameUtil
.
CHCHE_WIP_MANUAL_INPUT
);
if
(
cacheMap
==
null
){
cacheMap
=
new
ConcurrentHashMap
<>();
}
cacheMap
.
remove
(
barcode
.
getBarcode
());
dataCache
.
updateCache
(
CacheNameUtil
.
CHCHE_WIP_MANUAL_INPUT
,
cacheMap
);
return
ResultBean
.
newOkResult
(
""
);
}
...
...
@@ -331,6 +350,8 @@ public class LineController {
barcodeManager
.
saveBarcode
(
barcode
);
return
ResultBean
.
newOkResult
(
""
);
}
@ApiOperation
(
"手动绑定料箱和cartonId"
)
@RequestMapping
(
"/bindCartonId"
)
@AnonymousAccess
...
...
@@ -343,20 +364,17 @@ public class LineController {
}
barcode
.
setScanCartonId
(
cartonId
);
barcodeManager
.
saveBarcode
(
barcode
);
Map
<
String
,
ManualPutIn
>
cacheMap
=
dataCache
.
getCache
(
CacheNameUtil
.
CHCHE_WIP_MANUAL_INPUT
);
if
(
cacheMap
==
null
){
cacheMap
=
new
ConcurrentHashMap
<>();
}
cacheMap
.
put
(
barcode
.
getBarcode
(),
new
ManualPutIn
(
barcode
.
getBarcode
(),
cartonId
,
0
));
dataCache
.
updateCache
(
CacheNameUtil
.
CHCHE_WIP_MANUAL_INPUT
,
cacheMap
);
return
ResultBean
.
newOkResult
(
""
);
}
@ApiOperation
(
"ng料出库"
)
@RequestMapping
(
"/getBoxNGsnList"
)
@AnonymousAccess
public
ResultBean
getBoxNGsnList
(
@Validated
@RequestBody
GetBoxNGsnListRequest
result
)
throws
ApiException
{
log
.
info
(
"机种["
+
result
.
getModel
()+
"]和CartonId:"
+
result
.
getCarton_id
());
// List<GetBoxNGResult> boxNGsnList = LuxsanApi.getBoxNGsnList(result);
Map
<
String
,
String
>
map
=
new
HashMap
<>();
map
.
put
(
"model"
,
result
.
getModel
());
map
.
put
(
"carton_id"
,
result
.
getCarton_id
());
return
ResultBean
.
newOkResult
(
LuxsanApi
.
getBoxNGsnListWithStrategyPattern
(
result
));
}
@ApiOperation
(
"手动完成入库任务"
)
@RequestMapping
(
"/finishedInTask"
)
...
...
src/main/java/com/neotel/smfcore/custom/luxsan/factory_c/wipstor/controller/ManualWorkController.java
查看文件 @
3023e26
...
...
@@ -8,15 +8,18 @@ import com.neotel.smfcore.core.device.util.DataCache;
import
com.neotel.smfcore.core.system.service.po.DataLog
;
import
com.neotel.smfcore.core.system.util.TaskService
;
import
com.neotel.smfcore.custom.luxsan.factory_c.common.util.CacheNameUtil
;
import
com.neotel.smfcore.custom.luxsan.factory_c.wipstor.bean.ManualPutIn
;
import
com.neotel.smfcore.security.annotation.AnonymousAccess
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
org.ehcache.impl.internal.concurrent.ConcurrentHashMap
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RestController
;
import
java.util.ArrayList
;
import
java.util.List
;
import
java.util.Map
;
@Api
(
tags
=
"人工作业"
)
...
...
@@ -92,4 +95,22 @@ public class ManualWorkController {
return
ResultBean
.
newOkResult
(
""
);
}
@ApiOperation
(
"人工入库页面,获取具体的操作列表"
)
@RequestMapping
(
"/manualWorkList"
)
@AnonymousAccess
public
ResultBean
manualWorkList
(
int
status
)
{
Map
<
String
,
ManualPutIn
>
cacheMap
=
dataCache
.
getCache
(
CacheNameUtil
.
CHCHE_WIP_MANUAL_INPUT
);
if
(
cacheMap
==
null
){
cacheMap
=
new
ConcurrentHashMap
<>();
}
List
<
ManualPutIn
>
putInList
=
new
ArrayList
<>();
for
(
ManualPutIn
putIn
:
cacheMap
.
values
())
{
if
(
putIn
.
getStatus
()
==
status
){
putInList
.
add
(
putIn
);
}
}
return
ResultBean
.
newOkResult
(
putInList
);
}
}
编写
预览
支持
Markdown
格式
附加文件
你添加了
0
人
到此讨论。请谨慎行事。
Finish editing this message first!
Cancel
请
注册
或
登录
后发表评论