Skip to content
切换导航条
切换导航条
当前项目
正在载入...
登录
孙克
/
smf-core
转到一个项目
切换导航栏
切换导航栏固定状态
项目
群组
代码片段
帮助
项目
活动
版本库
流水线
图表
问题
0
合并请求
0
维基
网络
创建新的问题
作业
提交
问题看板
文件
提交
网络
比较
分支
标签
Commit 6fc6972f
由
zshaohui
编写于
2024-07-17 13:25:43 +0800
浏览文件
选项
浏览文件
标签
下载
电子邮件补丁
差异文件
功能优化
1 个父辈
b025b6a3
显示空白字符变更
内嵌
并排
正在显示
7 个修改的文件
包含
39 行增加
和
12 行删除
src/main/java/com/neotel/smfcore/core/order/LiteOrderCache.java
src/main/java/com/neotel/smfcore/core/system/service/po/DataLog.java
src/main/java/com/neotel/smfcore/custom/luxsan/api/LuxsanApi.java
src/main/java/com/neotel/smfcore/custom/luxsan/factory_c/rawstor/bean/dto/CtuTask.java
src/main/java/com/neotel/smfcore/custom/luxsan/factory_c/rawstor/controller/CtuDeviceController.java
src/main/java/com/neotel/smfcore/custom/luxsan/factory_c/rawstor/controller/PkCheckOutController.java
src/main/java/com/neotel/smfcore/custom/luxsan/factory_c/wipstor/controller/RestoreReplaceController.java
src/main/java/com/neotel/smfcore/core/order/LiteOrderCache.java
查看文件 @
6fc6972
...
@@ -1090,6 +1090,13 @@ public class LiteOrderCache {
...
@@ -1090,6 +1090,13 @@ public class LiteOrderCache {
task
.
setLoc
(
TaskCurrentLoc
.
Manual_FeedingInlet
);
task
.
setLoc
(
TaskCurrentLoc
.
Manual_FeedingInlet
);
}
}
Map
<
String
,
Long
>
outMap
=
new
HashMap
<>();
List
<
Barcode
>
subCodeList
=
barcode
.
getSubCodeList
();
if
(
subCodeList
!=
null
&&
!
subCodeList
.
isEmpty
())
{
outMap
=
subCodeList
.
stream
().
filter
(
Barcode:
:
isOut
).
collect
(
Collectors
.
groupingBy
(
Barcode:
:
getPosName
,
Collectors
.
counting
()));
}
task
.
updateExtraDataMap
(
"outCount"
,
outMap
);
try
{
try
{
taskService
.
addTaskToExecute
(
task
);
taskService
.
addTaskToExecute
(
task
);
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
...
...
src/main/java/com/neotel/smfcore/core/system/service/po/DataLog.java
查看文件 @
6fc6972
...
@@ -11,11 +11,13 @@ import com.neotel.smfcore.core.storage.service.po.Storage;
...
@@ -11,11 +11,13 @@ import com.neotel.smfcore.core.storage.service.po.Storage;
import
com.neotel.smfcore.core.storage.service.po.StoragePos
;
import
com.neotel.smfcore.core.storage.service.po.StoragePos
;
import
com.neotel.smfcore.core.system.bean.MSDAppendInfo
;
import
com.neotel.smfcore.core.system.bean.MSDAppendInfo
;
import
lombok.Data
;
import
lombok.Data
;
import
org.ehcache.impl.internal.concurrent.ConcurrentHashMap
;
import
org.springframework.data.mongodb.core.mapping.Document
;
import
org.springframework.data.mongodb.core.mapping.Document
;
import
java.io.Serializable
;
import
java.io.Serializable
;
import
java.util.Date
;
import
java.util.Date
;
import
java.util.List
;
import
java.util.List
;
import
java.util.Map
;
@Data
@Data
@Document
@Document
...
@@ -396,6 +398,9 @@ public class DataLog extends BasePo implements Serializable {
...
@@ -396,6 +398,9 @@ public class DataLog extends BasePo implements Serializable {
*/
*/
private
String
ticketItem
;
private
String
ticketItem
;
public
Map
<
String
,
Object
>
extraDataMap
;
public
String
getBarcode
()
{
public
String
getBarcode
()
{
if
(
barcode
==
null
){
if
(
barcode
==
null
){
return
""
;
return
""
;
...
@@ -604,4 +609,18 @@ public class DataLog extends BasePo implements Serializable {
...
@@ -604,4 +609,18 @@ public class DataLog extends BasePo implements Serializable {
}
}
return
false
;
return
false
;
}
}
public
void
updateExtraDataMap
(
String
key
,
Object
value
){
if
(
extraDataMap
==
null
){
extraDataMap
=
new
ConcurrentHashMap
<>();
}
extraDataMap
.
put
(
key
,
value
);
}
public
Object
getExtraDataMap
(
String
key
){
if
(
extraDataMap
==
null
){
extraDataMap
=
new
ConcurrentHashMap
<>();
}
return
extraDataMap
.
get
(
key
);
}
}
}
src/main/java/com/neotel/smfcore/custom/luxsan/api/LuxsanApi.java
查看文件 @
6fc6972
...
@@ -206,7 +206,7 @@ public class LuxsanApi extends DefaultSmfApiListener {
...
@@ -206,7 +206,7 @@ public class LuxsanApi extends DefaultSmfApiListener {
* @param request
* @param request
* @return
* @return
*/
*/
public
static
List
<
BackToWarehouseResult
>
backToWarehouse
(
BackToWarehouseRequest
request
)
{
public
static
BackToWarehouseResult
backToWarehouse
(
BackToWarehouseRequest
request
)
{
try
{
try
{
log
.
info
(
"backToWarehouse接口请求参数为:"
+
JSONObject
.
toJSONString
(
request
));
log
.
info
(
"backToWarehouse接口请求参数为:"
+
JSONObject
.
toJSONString
(
request
));
String
resultStr
=
HttpHelper
.
postJson
(
backToWarehouseUrl
,
request
);
String
resultStr
=
HttpHelper
.
postJson
(
backToWarehouseUrl
,
request
);
...
@@ -217,16 +217,13 @@ public class LuxsanApi extends DefaultSmfApiListener {
...
@@ -217,16 +217,13 @@ public class LuxsanApi extends DefaultSmfApiListener {
throw
new
ValidateException
(
"smfcore.api.error"
,
"接口请求失败[{0}]"
,
new
String
[]{
apiResult
.
getMSGTX
()});
throw
new
ValidateException
(
"smfcore.api.error"
,
"接口请求失败[{0}]"
,
new
String
[]{
apiResult
.
getMSGTX
()});
}
}
List
<
BackToWarehouseResult
>
resultList
=
JSONObject
.
parseArray
(
apiResult
.
getDATA
(),
BackToWarehouseResult
.
class
);
BackToWarehouseResult
result
=
JSONObject
.
parseObject
(
apiResult
.
getDATA
(),
BackToWarehouseResult
.
class
);
if
(
resultList
!=
null
&&
!
resultList
.
isEmpty
())
{
return
result
;
return
resultList
;
}
}
catch
(
ApiException
e
)
{
}
catch
(
ApiException
e
)
{
log
.
error
(
"backToWarehouse请求失败:"
+
e
.
getMessage
());
log
.
error
(
"backToWarehouse请求失败:"
+
e
.
getMessage
());
throw
new
ValidateException
(
"smfcore.api.error"
,
"接口请求失败[{0}]"
,
new
String
[]{
e
.
getMessage
()});
throw
new
ValidateException
(
"smfcore.api.error"
,
"接口请求失败[{0}]"
,
new
String
[]{
e
.
getMessage
()});
}
}
throw
new
ValidateException
(
"smfcore.api.error"
,
"接口请求失败[{0}]"
,
new
String
[]{
"未找到对应的电子料入退库信息"
});
}
}
...
...
src/main/java/com/neotel/smfcore/custom/luxsan/factory_c/rawstor/bean/dto/CtuTask.java
查看文件 @
6fc6972
...
@@ -3,6 +3,7 @@ package com.neotel.smfcore.custom.luxsan.factory_c.rawstor.bean.dto;
...
@@ -3,6 +3,7 @@ package com.neotel.smfcore.custom.luxsan.factory_c.rawstor.bean.dto;
import
lombok.Data
;
import
lombok.Data
;
import
java.util.Date
;
import
java.util.Date
;
import
java.util.Map
;
/**
/**
* @author sunke
* @author sunke
...
@@ -40,4 +41,6 @@ public class CtuTask {
...
@@ -40,4 +41,6 @@ public class CtuTask {
//任务优先级
//任务优先级
private
int
priority
=
0
;
private
int
priority
=
0
;
private
Object
outCount
;
}
}
src/main/java/com/neotel/smfcore/custom/luxsan/factory_c/rawstor/controller/CtuDeviceController.java
查看文件 @
6fc6972
...
@@ -26,10 +26,7 @@ import org.springframework.web.bind.annotation.RequestMapping;
...
@@ -26,10 +26,7 @@ import org.springframework.web.bind.annotation.RequestMapping;
import
org.springframework.web.bind.annotation.RequestParam
;
import
org.springframework.web.bind.annotation.RequestParam
;
import
org.springframework.web.bind.annotation.RestController
;
import
org.springframework.web.bind.annotation.RestController
;
import
java.util.ArrayList
;
import
java.util.*
;
import
java.util.Comparator
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.stream.Collectors
;
import
java.util.stream.Collectors
;
@Api
(
tags
=
"Ctu对接接口"
)
@Api
(
tags
=
"Ctu对接接口"
)
...
@@ -117,6 +114,7 @@ public class CtuDeviceController {
...
@@ -117,6 +114,7 @@ public class CtuDeviceController {
ctuTask
.
setToLoc
(
toLoc
);
ctuTask
.
setToLoc
(
toLoc
);
ctuTask
.
setCreateDate
(
dataLog
.
getCreateDate
());
ctuTask
.
setCreateDate
(
dataLog
.
getCreateDate
());
ctuTask
.
setPriority
(
dataLog
.
getPriority
());
ctuTask
.
setPriority
(
dataLog
.
getPriority
());
ctuTask
.
setOutCount
(
dataLog
.
getExtraDataMap
(
"outCount"
));
shelfToLineTaskList
.
add
(
ctuTask
);
shelfToLineTaskList
.
add
(
ctuTask
);
}
}
}
}
...
@@ -153,6 +151,7 @@ public class CtuDeviceController {
...
@@ -153,6 +151,7 @@ public class CtuDeviceController {
ctuTask
.
setToLoc
(
toLoc
);
ctuTask
.
setToLoc
(
toLoc
);
ctuTask
.
setCreateDate
(
dataLog
.
getCreateDate
());
ctuTask
.
setCreateDate
(
dataLog
.
getCreateDate
());
ctuTask
.
setPriority
(
dataLog
.
getPriority
());
ctuTask
.
setPriority
(
dataLog
.
getPriority
());
ctuTask
.
setOutCount
(
dataLog
.
getExtraDataMap
(
"outCount"
));
shelfToLineTaskList
.
add
(
ctuTask
);
shelfToLineTaskList
.
add
(
ctuTask
);
}
}
}
}
...
...
src/main/java/com/neotel/smfcore/custom/luxsan/factory_c/rawstor/controller/PkCheckOutController.java
查看文件 @
6fc6972
...
@@ -28,6 +28,7 @@ import org.springframework.web.bind.annotation.RequestParam;
...
@@ -28,6 +28,7 @@ import org.springframework.web.bind.annotation.RequestParam;
import
org.springframework.web.bind.annotation.RestController
;
import
org.springframework.web.bind.annotation.RestController
;
import
java.util.*
;
import
java.util.*
;
import
java.util.stream.Collectors
;
@RestController
@RestController
@RequestMapping
(
"/pkCheckOut"
)
@RequestMapping
(
"/pkCheckOut"
)
...
@@ -93,6 +94,7 @@ public class PkCheckOutController {
...
@@ -93,6 +94,7 @@ public class PkCheckOutController {
return
ResultBean
.
newErrorResult
(-
1
,
"smfcore.valueCanotNull"
,
"{0}不能为空"
,
new
String
[]{
"pickingId"
});
return
ResultBean
.
newErrorResult
(-
1
,
"smfcore.valueCanotNull"
,
"{0}不能为空"
,
new
String
[]{
"pickingId"
});
}
}
List
<
GetPickingItemsResult
>
pickingItems
=
LuxsanApi
.
getPickingItems
(
new
GetPickingItemsRequest
(
CommonUtil
.
plantCode
,
pickingId
));
List
<
GetPickingItemsResult
>
pickingItems
=
LuxsanApi
.
getPickingItems
(
new
GetPickingItemsRequest
(
CommonUtil
.
plantCode
,
pickingId
));
pickingItems
=
pickingItems
.
stream
().
sorted
(
Comparator
.
comparing
(
GetPickingItemsResult
::
getISSUED_QTY
)).
collect
(
Collectors
.
toList
());
return
ResultBean
.
newOkResult
(
GetPickingItemsDto
.
convertGetPickingItemsResultDto
(
pickingItems
));
return
ResultBean
.
newOkResult
(
GetPickingItemsDto
.
convertGetPickingItemsResultDto
(
pickingItems
));
}
}
...
...
src/main/java/com/neotel/smfcore/custom/luxsan/factory_c/wipstor/controller/RestoreReplaceController.java
查看文件 @
6fc6972
...
@@ -152,12 +152,12 @@ public class RestoreReplaceController {
...
@@ -152,12 +152,12 @@ public class RestoreReplaceController {
//3.先调用解绑信息
//3.先调用解绑信息
if
(
replaceBox
)
{
//
if (replaceBox) {
String
unBindPalletResult
=
LuxsanApi
.
unBindPallet
(
new
UnBindPalletRequest
(
CommonUtil
.
plantCode
,
ticketCode
,
""
,
palletId
));
String
unBindPalletResult
=
LuxsanApi
.
unBindPallet
(
new
UnBindPalletRequest
(
CommonUtil
.
plantCode
,
ticketCode
,
""
,
palletId
));
if
(
StringUtils
.
isNotEmpty
(
unBindPalletResult
))
{
if
(
StringUtils
.
isNotEmpty
(
unBindPalletResult
))
{
return
ResultBean
.
newErrorResult
(-
1
,
""
,
boxStr
+
"解绑失败,原因为:"
+
unBindPalletResult
);
return
ResultBean
.
newErrorResult
(-
1
,
""
,
boxStr
+
"解绑失败,原因为:"
+
unBindPalletResult
);
}
}
}
//
}
if
(
pos
!=
null
){
if
(
pos
!=
null
){
Storage
storage
=
dataCache
.
getStorageById
(
pos
.
getStorageId
());
Storage
storage
=
dataCache
.
getStorageById
(
pos
.
getStorageId
());
...
...
编写
预览
支持
Markdown
格式
附加文件
你添加了
0
人
到此讨论。请谨慎行事。
Finish editing this message first!
Cancel
请
注册
或
登录
后发表评论