Skip to content
切换导航条
切换导航条
当前项目
正在载入...
登录
孙克
/
smf-core
转到一个项目
切换导航栏
切换导航栏固定状态
项目
群组
代码片段
帮助
项目
活动
版本库
流水线
图表
问题
0
合并请求
0
维基
网络
创建新的问题
作业
提交
问题看板
文件
提交
网络
比较
分支
标签
Commit fec8eb4f
由
zshaohui
编写于
2024-01-03 13:43:14 +0800
浏览文件
选项
浏览文件
标签
下载
电子邮件补丁
差异文件
1.盘点功能优化
2.迈征根据站位匹配出库,去掉 3.料串离开的时候 增加料串信息,通知给迈征
1 个父辈
5c2bc610
隐藏空白字符变更
内嵌
并排
正在显示
8 个修改的文件
包含
56 行增加
和
19 行删除
src/main/java/com/neotel/smfcore/custom/lizhen/innerBox/bean/StorageExport.java
src/main/java/com/neotel/smfcore/custom/lizhen/innerBox/rest/InnerBoxRestController.java
src/main/java/com/neotel/smfcore/custom/lizhen/innerBox/util/PreWarningItemCache.java
src/main/java/com/neotel/smfcore/custom/lizhen/third/maicheng/api/MaiZhengApi.java
src/main/java/com/neotel/smfcore/custom/lizhen/third/maicheng/controller/MaiZhengController.java
src/main/java/com/neotel/smfcore/custom/lizhen/third/maicheng/controller/MaiZhengDeviceController.java
src/main/java/com/neotel/smfcore/custom/lizhen/virtual/controller/VirInventoryController.java
src/main/resources/config/application-prod.yml
src/main/java/com/neotel/smfcore/custom/lizhen/innerBox/bean/StorageExport.java
查看文件 @
fec8eb4
...
@@ -27,4 +27,10 @@ public class StorageExport {
...
@@ -27,4 +27,10 @@ public class StorageExport {
* 是否禁用
* 是否禁用
*/
*/
private
boolean
disable
=
false
;
private
boolean
disable
=
false
;
/**
* 料串信息
*/
private
String
material
=
""
;
}
}
src/main/java/com/neotel/smfcore/custom/lizhen/innerBox/rest/InnerBoxRestController.java
查看文件 @
fec8eb4
...
@@ -524,7 +524,7 @@ public class InnerBoxRestController {
...
@@ -524,7 +524,7 @@ public class InnerBoxRestController {
@ApiOperation
(
"料箱离开工位"
)
@ApiOperation
(
"料箱离开工位"
)
@RequestMapping
(
"/boxOutStation"
)
@RequestMapping
(
"/boxOutStation"
)
@AnonymousAccess
@AnonymousAccess
public
ResultBean
boxOutStation
(
String
export
)
{
public
ResultBean
boxOutStation
(
String
export
,
String
material
)
{
StorageExport
storageExport
=
StorageExportUtil
.
getExport
(
export
);
StorageExport
storageExport
=
StorageExportUtil
.
getExport
(
export
);
String
hSerial
=
storageExport
.
getHSerial
();
String
hSerial
=
storageExport
.
getHSerial
();
...
@@ -533,6 +533,7 @@ public class InnerBoxRestController {
...
@@ -533,6 +533,7 @@ public class InnerBoxRestController {
outStationExport
.
setLine
(
storageExport
.
getLine
());
outStationExport
.
setLine
(
storageExport
.
getLine
());
outStationExport
.
setHSerial
(
hSerial
);
outStationExport
.
setHSerial
(
hSerial
);
outStationExport
.
setRemainTaskCount
(
storageExport
.
getRemainTaskCount
());
outStationExport
.
setRemainTaskCount
(
storageExport
.
getRemainTaskCount
());
outStationExport
.
setMaterial
(
material
);
if
(
StringUtils
.
isNotBlank
(
hSerial
))
{
if
(
StringUtils
.
isNotBlank
(
hSerial
))
{
LiteOrder
order
=
liteOrderCache
.
getOrderSortItems
(
hSerial
);
LiteOrder
order
=
liteOrderCache
.
getOrderSortItems
(
hSerial
);
...
...
src/main/java/com/neotel/smfcore/custom/lizhen/innerBox/util/PreWarningItemCache.java
查看文件 @
fec8eb4
...
@@ -84,7 +84,7 @@ public class PreWarningItemCache {
...
@@ -84,7 +84,7 @@ public class PreWarningItemCache {
//挑出迈征和其他工单
//挑出迈征和其他工单
Map
<
String
,
String
>
stationStatusMap
=
StationStatusCache
.
getStationStatusMap
();
Map
<
String
,
String
>
stationStatusMap
=
StationStatusCache
.
getStationStatusMap
();
for
(
PreWarningItem
item
:
queueItemList
)
{
for
(
PreWarningItem
item
:
queueItemList
)
{
String
station
=
item
.
getStation
();
/*
String station = item.getStation();
String partnumber = item.getPartnumber();
String partnumber = item.getPartnumber();
String slot = item.getSlot();
String slot = item.getSlot();
String line = item.getLine();
String line = item.getLine();
...
@@ -95,11 +95,12 @@ public class PreWarningItemCache {
...
@@ -95,11 +95,12 @@ public class PreWarningItemCache {
maiZhengItemList.add(item);
maiZhengItemList.add(item);
} else {
} else {
otherItemList.add(item);
otherItemList.add(item);
}
}*/
otherItemList
.
add
(
item
);
}
}
//处理迈征工单信息
//处理迈征工单信息
if
(
maiZhengItemList
!=
null
&&
!
maiZhengItemList
.
isEmpty
())
{
/*
if (maiZhengItemList != null && !maiZhengItemList.isEmpty()) {
maiZhengItemList = maiZhengItemList.stream().sorted(Comparator.comparing(PreWarningItem::getReceiveDate)).collect(Collectors.toList());
maiZhengItemList = maiZhengItemList.stream().sorted(Comparator.comparing(PreWarningItem::getReceiveDate)).collect(Collectors.toList());
int minute = dataCache.getCache(Constants.CACHE_maiZhengMinute);
int minute = dataCache.getCache(Constants.CACHE_maiZhengMinute);
...
@@ -136,7 +137,7 @@ public class PreWarningItemCache {
...
@@ -136,7 +137,7 @@ public class PreWarningItemCache {
}
}
}
}
}
}
}
}
*/
//处理其他工单信息
//处理其他工单信息
if
(
otherItemList
!=
null
&&
!
otherItemList
.
isEmpty
())
{
if
(
otherItemList
!=
null
&&
!
otherItemList
.
isEmpty
())
{
...
...
src/main/java/com/neotel/smfcore/custom/lizhen/third/maicheng/api/MaiZhengApi.java
查看文件 @
fec8eb4
...
@@ -68,14 +68,20 @@ public class MaiZhengApi {
...
@@ -68,14 +68,20 @@ public class MaiZhengApi {
List
<
Map
<
String
,
Object
>>
list
=
new
ArrayList
<>();
List
<
Map
<
String
,
Object
>>
list
=
new
ArrayList
<>();
List
<
LiteOrderItem
>
orderItemList
=
liteOrder
.
getOrderItems
();
List
<
LiteOrderItem
>
orderItemList
=
liteOrder
.
getOrderItems
();
for
(
LiteOrderItem
orderItem
:
orderItemList
)
{
for
(
LiteOrderItem
orderItem
:
orderItemList
)
{
Map
<
String
,
Object
>
itemMap
=
new
HashMap
<>();
itemMap
.
put
(
"Position"
,
orderItem
.
getPosition
());
List
<
String
>
outReelList
=
orderItem
.
getOutReelList
();
itemMap
.
put
(
"PARTNUMBER"
,
orderItem
.
getPn
());
if
(
outReelList
!=
null
&&
!
outReelList
.
isEmpty
()){
itemMap
.
put
(
"REEL"
,
orderItem
.
getReel
());
for
(
int
i
=
0
;
i
<
outReelList
.
size
();
i
++)
{
itemMap
.
put
(
"REELNew"
,
orderItem
.
getOutReel
());
Map
<
String
,
Object
>
itemMap
=
new
HashMap
<>();
itemMap
.
put
(
"Width"
,
orderItem
.
getWidth
());
itemMap
.
put
(
"Position"
,
orderItem
.
getPositionList
().
get
(
i
));
itemMap
.
put
(
"Dia"
,
orderItem
.
getDia
());
itemMap
.
put
(
"PARTNUMBER"
,
orderItem
.
getPn
());
list
.
add
(
itemMap
);
itemMap
.
put
(
"REEL"
,
orderItem
.
getReel
());
itemMap
.
put
(
"REELNew"
,
outReelList
.
get
(
i
));
itemMap
.
put
(
"Width"
,
orderItem
.
getWidth
());
itemMap
.
put
(
"Dia"
,
orderItem
.
getDia
());
list
.
add
(
itemMap
);
}
}
}
}
paramMap
.
put
(
"List"
,
list
);
paramMap
.
put
(
"List"
,
list
);
...
...
src/main/java/com/neotel/smfcore/custom/lizhen/third/maicheng/controller/MaiZhengController.java
查看文件 @
fec8eb4
package
com
.
neotel
.
smfcore
.
custom
.
lizhen
.
third
.
maicheng
.
controller
;
package
com
.
neotel
.
smfcore
.
custom
.
lizhen
.
third
.
maicheng
.
controller
;
import
cn.hutool.core.util.NumberUtil
;
import
com.alibaba.fastjson.JSON
;
import
com.alibaba.fastjson.JSON
;
import
com.alibaba.fastjson.JSONObject
;
import
com.alibaba.fastjson.JSONObject
;
import
com.google.common.collect.Maps
;
import
com.google.common.collect.Maps
;
...
@@ -161,6 +162,8 @@ public class MaiZhengController {
...
@@ -161,6 +162,8 @@ public class MaiZhengController {
liteOrder
.
setMaiZheng
(
true
);
liteOrder
.
setMaiZheng
(
true
);
liteOrder
=
liteOrderManager
.
save
(
liteOrder
);
liteOrder
=
liteOrderManager
.
save
(
liteOrder
);
int
totalReelCount
=
0
;
//开始设置工单数据
//开始设置工单数据
List
<
LiteOrderItem
>
orderItemList
=
new
ArrayList
<>();
List
<
LiteOrderItem
>
orderItemList
=
new
ArrayList
<>();
for
(
AskReelBoxList
box
:
askReelBox
.
getList
())
{
for
(
AskReelBoxList
box
:
askReelBox
.
getList
())
{
...
@@ -182,13 +185,16 @@ public class MaiZhengController {
...
@@ -182,13 +185,16 @@ public class MaiZhengController {
item
.
setDia
(
box
.
getDia
());
item
.
setDia
(
box
.
getDia
());
item
.
setOrderId
(
liteOrder
.
getId
());
item
.
setOrderId
(
liteOrder
.
getId
());
item
.
setOrderNo
(
liteOrder
.
getOrderNo
());
item
.
setOrderNo
(
liteOrder
.
getOrderNo
());
item
.
setNeedReelCount
(
1
);
item
.
setNeedNum
(
1
);
int
num
=
NumberUtil
.
parseInt
(
box
.
getNum
());
item
.
setNeedReelCount
(
num
);
totalReelCount
=
totalReelCount
+
num
;
orderItemList
.
add
(
item
);
orderItemList
.
add
(
item
);
}
}
orderItemList
=
(
List
<
LiteOrderItem
>)
liteOrderItemManager
.
batchSave
(
orderItemList
);
orderItemList
=
(
List
<
LiteOrderItem
>)
liteOrderItemManager
.
batchSave
(
orderItemList
);
liteOrder
.
setOrderItems
(
orderItemList
);
liteOrder
.
setOrderItems
(
orderItemList
);
liteOrder
.
setTotalTaskReelCount
(
orderItemList
.
size
()
);
liteOrder
.
setTotalTaskReelCount
(
totalReelCount
);
liteOrder
=
liteOrderManager
.
save
(
liteOrder
);
liteOrder
=
liteOrderManager
.
save
(
liteOrder
);
liteOrderCache
.
addOrderToMap
(
liteOrder
);
liteOrderCache
.
addOrderToMap
(
liteOrder
);
log
.
info
(
guid
+
"工单任务已经生成,任务数量为:"
+
orderItemList
.
size
());
log
.
info
(
guid
+
"工单任务已经生成,任务数量为:"
+
orderItemList
.
size
());
...
...
src/main/java/com/neotel/smfcore/custom/lizhen/third/maicheng/controller/MaiZhengDeviceController.java
查看文件 @
fec8eb4
package
com
.
neotel
.
smfcore
.
custom
.
lizhen
.
third
.
maicheng
.
controller
;
package
com
.
neotel
.
smfcore
.
custom
.
lizhen
.
third
.
maicheng
.
controller
;
import
com.alibaba.fastjson.JSON
;
import
com.neotel.smfcore.common.bean.ResultBean
;
import
com.neotel.smfcore.common.bean.ResultBean
;
import
com.neotel.smfcore.common.utils.StringUtils
;
import
com.neotel.smfcore.common.utils.StringUtils
;
import
com.neotel.smfcore.core.order.service.manager.ILiteOrderManager
;
import
com.neotel.smfcore.core.order.service.manager.ILiteOrderManager
;
...
@@ -11,10 +12,12 @@ import com.neotel.smfcore.custom.lizhen.third.maicheng.api.MaiZhengApi;
...
@@ -11,10 +12,12 @@ import com.neotel.smfcore.custom.lizhen.third.maicheng.api.MaiZhengApi;
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
lombok.extern.slf4j.Slf4j
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RestController
;
import
org.springframework.web.bind.annotation.RestController
;
@Slf4j
@RestController
@RestController
@RequestMapping
(
"/maizhengDevice"
)
@RequestMapping
(
"/maizhengDevice"
)
@Api
(
tags
=
"设备端(迈征)"
)
@Api
(
tags
=
"设备端(迈征)"
)
...
@@ -33,7 +36,8 @@ public class MaiZhengDeviceController {
...
@@ -33,7 +36,8 @@ public class MaiZhengDeviceController {
@RequestMapping
(
"/transReelBox"
)
@RequestMapping
(
"/transReelBox"
)
@AnonymousAccess
@AnonymousAccess
public
ResultBean
transReelBox
(
String
exportStr
)
{
public
ResultBean
transReelBox
(
String
exportStr
)
{
StorageExport
export
=
StorageExportUtil
.
getExport
(
exportStr
+
StorageExportUtil
.
OUT_STATION
);
StorageExport
export
=
StorageExportUtil
.
getExport
(
exportStr
+
StorageExportUtil
.
OUT_STATION
);
log
.
info
(
exportStr
+
"获取到出料口信息为:"
+
JSON
.
toJSONString
(
export
));
String
hSerial
=
export
.
getHSerial
();
String
hSerial
=
export
.
getHSerial
();
if
(
StringUtils
.
isBlank
(
hSerial
))
{
if
(
StringUtils
.
isBlank
(
hSerial
))
{
return
ResultBean
.
newErrorResult
(-
1
,
"smfcore.valueNotExist"
,
"{0}[{1}]不存在"
,
new
String
[]{
exportStr
,
"hSerial"
});
return
ResultBean
.
newErrorResult
(-
1
,
"smfcore.valueNotExist"
,
"{0}[{1}]不存在"
,
new
String
[]{
exportStr
,
"hSerial"
});
...
@@ -61,12 +65,17 @@ public class MaiZhengDeviceController {
...
@@ -61,12 +65,17 @@ public class MaiZhengDeviceController {
return
ResultBean
.
newErrorResult
(-
1
,
"smfcore.valueNotExist"
,
"{0}[{1}]不存在"
,
new
String
[]{
"orderNo"
,
hSerial
});
return
ResultBean
.
newErrorResult
(-
1
,
"smfcore.valueNotExist"
,
"{0}[{1}]不存在"
,
new
String
[]{
"orderNo"
,
hSerial
});
}
}
String
material
=
export
.
getMaterial
();
if
(
StringUtils
.
isNotBlank
(
material
)){
liteOrder
.
setReelBoxId
(
material
);
}
//请求迈征的接口,是否可以放入
//请求迈征的接口,是否可以放入
String
resultStr
=
maiZhengApi
.
transReelBox
(
liteOrder
);
String
resultStr
=
maiZhengApi
.
transReelBox
(
liteOrder
);
if
(
"OK"
.
equalsIgnoreCase
(
resultStr
)){
if
(
"OK"
.
equalsIgnoreCase
(
resultStr
))
{
return
ResultBean
.
newOkResult
(
""
);
return
ResultBean
.
newOkResult
(
""
);
}
else
{
}
else
{
return
ResultBean
.
newErrorResult
(-
1
,
"smf.maizheng.error"
,
"transReelBox返回异常:"
+
resultStr
);
return
ResultBean
.
newErrorResult
(-
1
,
"smf.maizheng.error"
,
"transReelBox返回异常:"
+
resultStr
);
}
}
}
}
...
...
src/main/java/com/neotel/smfcore/custom/lizhen/virtual/controller/VirInventoryController.java
查看文件 @
fec8eb4
...
@@ -5,6 +5,7 @@ import com.neotel.smfcore.common.bean.PageData;
...
@@ -5,6 +5,7 @@ import com.neotel.smfcore.common.bean.PageData;
import
com.neotel.smfcore.common.bean.ResultBean
;
import
com.neotel.smfcore.common.bean.ResultBean
;
import
com.neotel.smfcore.common.utils.DateUtil
;
import
com.neotel.smfcore.common.utils.DateUtil
;
import
com.neotel.smfcore.common.utils.QueryHelp
;
import
com.neotel.smfcore.common.utils.QueryHelp
;
import
com.neotel.smfcore.common.utils.SecurityUtils
;
import
com.neotel.smfcore.common.utils.StringUtils
;
import
com.neotel.smfcore.common.utils.StringUtils
;
import
com.neotel.smfcore.core.barcode.service.po.Barcode
;
import
com.neotel.smfcore.core.barcode.service.po.Barcode
;
import
com.neotel.smfcore.core.barcode.utils.CodeResolve
;
import
com.neotel.smfcore.core.barcode.utils.CodeResolve
;
...
@@ -20,6 +21,7 @@ import com.neotel.smfcore.custom.lizhen.virtual.util.VirInventoryUtil;
...
@@ -20,6 +21,7 @@ import com.neotel.smfcore.custom.lizhen.virtual.util.VirInventoryUtil;
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
lombok.extern.slf4j.Slf4j
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.data.domain.Pageable
;
import
org.springframework.data.domain.Pageable
;
...
@@ -36,6 +38,7 @@ import java.util.Map;
...
@@ -36,6 +38,7 @@ import java.util.Map;
@Api
(
tags
=
"虚拟仓盘点"
)
@Api
(
tags
=
"虚拟仓盘点"
)
@RequestMapping
(
"/virInventory"
)
@RequestMapping
(
"/virInventory"
)
@RestController
@RestController
@Slf4j
public
class
VirInventoryController
{
public
class
VirInventoryController
{
//厂别
//厂别
...
@@ -65,6 +68,7 @@ public class VirInventoryController {
...
@@ -65,6 +68,7 @@ public class VirInventoryController {
@RequestMapping
(
"/startInventory"
)
@RequestMapping
(
"/startInventory"
)
@AnonymousAccess
@AnonymousAccess
public
ResultBean
startInventory
()
{
public
ResultBean
startInventory
()
{
log
.
info
(
SecurityUtils
.
getLoginUsername
()+
"点击开始盘点"
);
//1.首先判断上一次盘点是否结束
//1.首先判断上一次盘点是否结束
String
batch
=
dataCache
.
getCache
(
VirInventoryUtil
.
VIRINVENTORY_CACHE_BATCH
);
String
batch
=
dataCache
.
getCache
(
VirInventoryUtil
.
VIRINVENTORY_CACHE_BATCH
);
if
(
StringUtils
.
isNotBlank
(
batch
))
{
if
(
StringUtils
.
isNotBlank
(
batch
))
{
...
@@ -121,6 +125,7 @@ public class VirInventoryController {
...
@@ -121,6 +125,7 @@ public class VirInventoryController {
@RequestMapping
(
"/endInventory"
)
@RequestMapping
(
"/endInventory"
)
@AnonymousAccess
@AnonymousAccess
public
ResultBean
endInventory
()
{
public
ResultBean
endInventory
()
{
log
.
info
(
SecurityUtils
.
getLoginUsername
()+
"点击结束盘点"
);
dataCache
.
updateCache
(
VirInventoryUtil
.
VIRINVENTORY_CACHE_BATCH
,
""
);
dataCache
.
updateCache
(
VirInventoryUtil
.
VIRINVENTORY_CACHE_BATCH
,
""
);
return
ResultBean
.
newOkResult
(
""
);
return
ResultBean
.
newOkResult
(
""
);
}
}
...
@@ -132,6 +137,7 @@ public class VirInventoryController {
...
@@ -132,6 +137,7 @@ public class VirInventoryController {
public
ResultBean
reelInventory
(
@RequestBody
Map
<
String
,
String
>
paramMap
)
{
public
ResultBean
reelInventory
(
@RequestBody
Map
<
String
,
String
>
paramMap
)
{
String
code
=
paramMap
.
get
(
"code"
);
String
code
=
paramMap
.
get
(
"code"
);
String
workerNo
=
paramMap
.
get
(
"workerNo"
);
String
workerNo
=
paramMap
.
get
(
"workerNo"
);
log
.
info
(
workerNo
+
"盘点物料:"
+
code
);
//1.判断工号是否存在
//1.判断工号是否存在
if
(
StringUtils
.
isBlank
(
workerNo
))
{
if
(
StringUtils
.
isBlank
(
workerNo
))
{
return
ResultBean
.
newErrorResult
(-
1
,
"smfcore.valueCanotNull"
,
"{0}不能为空"
,
new
String
[]{
"工号"
});
return
ResultBean
.
newErrorResult
(-
1
,
"smfcore.valueCanotNull"
,
"{0}不能为空"
,
new
String
[]{
"工号"
});
...
...
src/main/resources/config/application-prod.yml
查看文件 @
fec8eb4
...
@@ -77,4 +77,6 @@ file:
...
@@ -77,4 +77,6 @@ file:
maizheng
:
maizheng
:
stationStatusApi
:
http://10.190.196.124:8300/API/MZSM
stationStatusApi
:
http://10.190.196.124:8300/API/MZSM
export
:
MU3_1
export
:
MU3_1
transReelBoxApi
:
http://10.190.196.124:52232/API/TransReelBoxAuto
prepareReelBoxApi
:
http://10.190.196.124:52232/API/PrepareReelBoxAuto
编写
预览
支持
Markdown
格式
附加文件
你添加了
0
人
到此讨论。请谨慎行事。
Finish editing this message first!
Cancel
请
注册
或
登录
后发表评论