Skip to content
切换导航条
切换导航条
当前项目
正在载入...
登录
孙克
/
smf-core
转到一个项目
切换导航栏
切换导航栏固定状态
项目
群组
代码片段
帮助
项目
活动
版本库
流水线
图表
问题
0
合并请求
0
维基
网络
创建新的问题
作业
提交
问题看板
文件
提交
网络
比较
分支
标签
Commit d89842e4
由
zshaohui
编写于
2023-08-11 12:00:11 +0800
浏览文件
选项
浏览文件
标签
下载
电子邮件补丁
差异文件
增加报表和虚拟仓增加库别
1 个父辈
4311ee91
全部展开
隐藏空白字符变更
内嵌
并排
正在显示
28 个修改的文件
包含
684 行增加
和
62 行删除
src/main/java/com/neotel/smfcore/common/init/DataInitManager.java
src/main/java/com/neotel/smfcore/core/barcode/service/po/Barcode.java
src/main/java/com/neotel/smfcore/core/device/enums/OP_STATUS.java
src/main/java/com/neotel/smfcore/core/device/handler/impl/NLShelfHandler.java
src/main/java/com/neotel/smfcore/core/device/rest/DeviceController.java
src/main/java/com/neotel/smfcore/core/device/util/DataCache.java
src/main/java/com/neotel/smfcore/core/order/LiteOrderCache.java
src/main/java/com/neotel/smfcore/core/storage/rest/StoragePosController.java
src/main/java/com/neotel/smfcore/core/storage/rest/dto/StoragePosEnabledDto.java
src/main/java/com/neotel/smfcore/core/storage/service/manager/IStoragePosManager.java
src/main/java/com/neotel/smfcore/core/storage/service/manager/impl/StoragePosManagerImpl.java
src/main/java/com/neotel/smfcore/core/system/service/po/DataLog.java
src/main/java/com/neotel/smfcore/core/system/util/TaskService.java
src/main/java/com/neotel/smfcore/custom/lizhen/LizhenApi.java
src/main/java/com/neotel/smfcore/custom/lizhen/LizhenController.java
src/main/java/com/neotel/smfcore/custom/lizhen/innerBox/bean/StorageExport.java
src/main/java/com/neotel/smfcore/custom/lizhen/innerBox/enums/ExtendType.java
src/main/java/com/neotel/smfcore/custom/lizhen/innerBox/rest/InnerBoxRestController.java
src/main/java/com/neotel/smfcore/custom/lizhen/innerBox/rest/VirtualRestController.java
src/main/java/com/neotel/smfcore/custom/lizhen/innerBox/util/OutLotInfoCache.java
src/main/java/com/neotel/smfcore/custom/lizhen/innerBox/util/StorageExportUtil.java
src/main/java/com/neotel/smfcore/custom/lizhen/report/bacheng/BCReportController.java
src/main/java/com/neotel/smfcore/custom/lizhen/report/bacheng/bean/dto/BCChange.java
src/main/java/com/neotel/smfcore/custom/lizhen/report/bacheng/bean/dto/BCExpire.java
src/main/java/com/neotel/smfcore/custom/lizhen/report/bacheng/bean/dto/BCInventory.java
src/main/java/com/neotel/smfcore/custom/lizhen/report/bacheng/bean/query/BcQuery.java
src/main/java/com/neotel/smfcore/custom/lizhen/report/inner/InnerReportController.java
src/main/resources/config/application.yml
src/main/java/com/neotel/smfcore/common/init/DataInitManager.java
查看文件 @
d89842e
...
@@ -234,14 +234,14 @@ public class DataInitManager {
...
@@ -234,14 +234,14 @@ public class DataInitManager {
addNewFunctionMenu
(
84
,
pMenuReport
,
"feeding"
,
"喂料"
,
"feeding"
,
"neolight/feeding/index"
,
"feeding"
,
functionMenuMap
);
addNewFunctionMenu
(
84
,
pMenuReport
,
"feeding"
,
"喂料"
,
"feeding"
,
"neolight/feeding/index"
,
"feeding"
,
functionMenuMap
);
addNewFunctionMenu
(
85
,
pMenuReport
,
"innerInventory"
,
"库存"
,
"innerInventory"
,
"innerWarehouse/inventory/index"
,
"inventory"
,
functionMenuMap
);
addNewFunctionMenu
(
85
,
pMenuReport
,
"innerInventory"
,
"库存"
,
"innerInventory"
,
"innerWarehouse/inventory/index"
,
"inventory"
,
functionMenuMap
);
addNewFunctionMenu
(
86
,
pMenuReport
,
"innerMaterial"
,
"备料清单"
,
"innerMaterial"
,
"innerWarehouse/materialPreList/index"
,
"mPreListReport"
,
functionMenuMap
);
addNewFunctionMenu
(
86
,
pMenuReport
,
"innerMaterial"
,
"备料清单"
,
"innerMaterial"
,
"innerWarehouse/materialPreList/index"
,
"mPreListReport"
,
functionMenuMap
);
addNewFunctionMenu
(
87
,
pMenuReport
,
"innerChangeReport"
,
"
异动
"
,
"innerChangeReport"
,
"innerWarehouse/changeReport/index"
,
"chageReport"
,
functionMenuMap
);
addNewFunctionMenu
(
87
,
pMenuReport
,
"innerChangeReport"
,
"
事务报表
"
,
"innerChangeReport"
,
"innerWarehouse/changeReport/index"
,
"chageReport"
,
functionMenuMap
);
addNewFunctionMenu
(
88
,
pMenuReport
,
"innerIssueReport"
,
"发料"
,
"innerIssueReport"
,
"innerWarehouse/issueReport/index"
,
"IssueRe"
,
functionMenuMap
);
addNewFunctionMenu
(
88
,
pMenuReport
,
"innerIssueReport"
,
"发料"
,
"innerIssueReport"
,
"innerWarehouse/issueReport/index"
,
"IssueRe"
,
functionMenuMap
);
addNewFunctionMenu
(
89
,
pMenuReport
,
"innerMaShortReport"
,
"缺料"
,
"innerMaShortReport"
,
"innerWarehouse/maShortReport/index"
,
"maShort"
,
functionMenuMap
);
addNewFunctionMenu
(
89
,
pMenuReport
,
"innerMaShortReport"
,
"缺料"
,
"innerMaShortReport"
,
"innerWarehouse/maShortReport/index"
,
"maShort"
,
functionMenuMap
);
addNewFunctionMenu
(
90
,
pMenuReport
,
"innerProLimitReport"
,
"禁限用"
,
"innerProLimitReport"
,
"innerWarehouse/proLimitReport/index"
,
"proLimit"
,
functionMenuMap
);
addNewFunctionMenu
(
90
,
pMenuReport
,
"innerProLimitReport"
,
"禁限用"
,
"innerProLimitReport"
,
"innerWarehouse/proLimitReport/index"
,
"proLimit"
,
functionMenuMap
);
addNewFunctionMenu
(
91
,
pMenuReport
,
"imDetailsReport"
,
"导入明细"
,
"imDetailsReport"
,
"innerWarehouse/imDetailsReport/index"
,
"feeding"
,
functionMenuMap
);
addNewFunctionMenu
(
91
,
pMenuReport
,
"imDetailsReport"
,
"导入明细"
,
"imDetailsReport"
,
"innerWarehouse/imDetailsReport/index"
,
"feeding"
,
functionMenuMap
);
//内外仓都有
//内外仓都有
addNewFunctionMenu
(
92
,
pMenuReport
,
"expiredReport"
,
"
库存物料状态
表"
,
"expiredReport"
,
"report/expiredReport/index"
,
"inventory"
,
functionMenuMap
);
addNewFunctionMenu
(
92
,
pMenuReport
,
"expiredReport"
,
"
过期报
表"
,
"expiredReport"
,
"report/expiredReport/index"
,
"inventory"
,
functionMenuMap
);
//可观测性:物料追踪
//可观测性:物料追踪
Menu
guanceMenu
=
Menu
.
CreatePMenu
(
"可观测性"
,
8
,
"observability"
,
2
,
"scanKey"
,
null
);
Menu
guanceMenu
=
Menu
.
CreatePMenu
(
"可观测性"
,
8
,
"observability"
,
2
,
"scanKey"
,
null
);
...
...
src/main/java/com/neotel/smfcore/core/barcode/service/po/Barcode.java
查看文件 @
d89842e
...
@@ -160,7 +160,7 @@ public class Barcode extends BasePo implements Serializable {
...
@@ -160,7 +160,7 @@ public class Barcode extends BasePo implements Serializable {
/**
/**
* 卷数
* 卷数
*/
*/
private
int
reelAmount
=
0
;
private
int
reelAmount
=
1
;
/**
/**
* 关联条码,夹具时关联相关的物料,用于入库完成时插入相关物料
* 关联条码,夹具时关联相关的物料,用于入库完成时插入相关物料
*/
*/
...
@@ -269,7 +269,7 @@ public class Barcode extends BasePo implements Serializable {
...
@@ -269,7 +269,7 @@ public class Barcode extends BasePo implements Serializable {
/**
/**
* 库别
* 库别
*/
*/
private
String
warehouseCode
;
private
String
warehouseCode
=
"W10B"
;
/**
/**
...
...
src/main/java/com/neotel/smfcore/core/device/enums/OP_STATUS.java
查看文件 @
d89842e
...
@@ -66,5 +66,6 @@ public enum OP_STATUS {
...
@@ -66,5 +66,6 @@ public enum OP_STATUS {
/**
/**
* 需要从流水线上拿走
* 需要从流水线上拿走
*/
*/
NEED_AWAY
NEED_AWAY
,
OUT_POS
}
}
src/main/java/com/neotel/smfcore/core/device/handler/impl/NLShelfHandler.java
查看文件 @
d89842e
...
@@ -356,10 +356,10 @@ public class NLShelfHandler extends BaseDeviceHandler {
...
@@ -356,10 +356,10 @@ public class NLShelfHandler extends BaseDeviceHandler {
private
ResultBean
outProcess
(
String
code
,
String
sourceId
,
String
loginUser
){
private
ResultBean
outProcess
(
String
code
,
String
sourceId
,
String
loginUser
){
//判断是否有打印标签的需求,如果有,则返回错误
//判断是否有打印标签的需求,如果有,则返回错误
String
nlLabelOrderItemId
=
innerBoxRestController
.
getLabelOrderItemId
();
/*
String nlLabelOrderItemId = innerBoxRestController.getLabelOrderItemId();
if (StringUtils.isNotBlank(nlLabelOrderItemId)){
if (StringUtils.isNotBlank(nlLabelOrderItemId)){
return ResultBean.newErrorResult(1,"","上一个物料标签请打印完成后再进行出库操作");
return ResultBean.newErrorResult(1,"","上一个物料标签请打印完成后再进行出库操作");
}
}
*/
String
barcodeStr
=
"=1x1="
+
code
;
String
barcodeStr
=
"=1x1="
+
code
;
Barcode
barcode
=
codeResolve
.
resolveOneValideBarcode
(
barcodeStr
);
Barcode
barcode
=
codeResolve
.
resolveOneValideBarcode
(
barcodeStr
);
StoragePos
inPos
=
storagePosManager
.
getByBarcode
(
barcode
.
getBarcode
());
StoragePos
inPos
=
storagePosManager
.
getByBarcode
(
barcode
.
getBarcode
());
...
@@ -377,10 +377,10 @@ public class NLShelfHandler extends BaseDeviceHandler {
...
@@ -377,10 +377,10 @@ public class NLShelfHandler extends BaseDeviceHandler {
}
}
}
}
//设置nlLable
//设置nlLable
if
(
StringUtils
.
isNotBlank
(
task
.
getSubSourceId
()))
{
/*
if (StringUtils.isNotBlank(task.getSubSourceId())) {
log.info(task.getBarcode() + "设置的标签orderItemId:" + task.getSubSourceId());
log.info(task.getBarcode() + "设置的标签orderItemId:" + task.getSubSourceId());
innerBoxRestController.setLabelOrderItemId(task.getCid(),task.getSubSourceId());
innerBoxRestController.setLabelOrderItemId(task.getCid(),task.getSubSourceId());
}
}
*/
taskService
.
addTaskToFinished
(
inPos
,
null
,
loginUser
);
taskService
.
addTaskToFinished
(
inPos
,
null
,
loginUser
);
opPosLight
(
"close"
,
inPos
,
""
);
opPosLight
(
"close"
,
inPos
,
""
);
log
.
info
(
code
+
" 出库完成, 库位["
+
inPos
.
getPosName
()
+
"]灭灯"
);
log
.
info
(
code
+
" 出库完成, 库位["
+
inPos
.
getPosName
()
+
"]灭灯"
);
...
...
src/main/java/com/neotel/smfcore/core/device/rest/DeviceController.java
查看文件 @
d89842e
...
@@ -237,12 +237,14 @@ public class DeviceController {
...
@@ -237,12 +237,14 @@ public class DeviceController {
barcode
=
barcodeApi
;
barcode
=
barcodeApi
;
}
}
for
(
DataLog
dataLog
:
taskService
.
get
Queue
Tasks
())
{
for
(
DataLog
dataLog
:
taskService
.
get
All
Tasks
())
{
// if(!dataLog.isPackageReel()){
// if(!dataLog.isPackageReel()){
//已经在任务当中,返回对应的信息
//已经在任务当中,返回对应的信息
if
(
dataLog
.
getBarcode
().
equals
(
barcode
.
getBarcode
()))
{
if
(
dataLog
.
getBarcode
().
equals
(
barcode
.
getBarcode
()))
{
//如果有任务,直接ng
//如果有任务,直接ng
throw
new
ValidateException
(
"smfcore.error.barcode.executing"
,
"条码[{0}}]任务正在执行"
,
new
String
[]{
barcode
.
getBarcode
()});
if
(!
dataLog
.
isFinished
())
{
throw
new
ValidateException
(
"smfcore.error.barcode.executing"
,
"条码[{0}}]任务正在执行"
,
new
String
[]{
barcode
.
getBarcode
()});
}
/* if (dataLog.isPutInTask()) {
/* if (dataLog.isPutInTask()) {
//已有入库任务
//已有入库任务
errorMsg = "物料[" + dataLog.getBarcode() + "]已有入库任务,需继续执行入库动作";
errorMsg = "物料[" + dataLog.getBarcode() + "]已有入库任务,需继续执行入库动作";
...
...
src/main/java/com/neotel/smfcore/core/device/util/DataCache.java
查看文件 @
d89842e
...
@@ -11,6 +11,7 @@ import com.neotel.smfcore.core.barcode.service.manager.IComponentManager;
...
@@ -11,6 +11,7 @@ import com.neotel.smfcore.core.barcode.service.manager.IComponentManager;
import
com.neotel.smfcore.core.barcode.service.po.Barcode
;
import
com.neotel.smfcore.core.barcode.service.po.Barcode
;
import
com.neotel.smfcore.core.barcode.service.po.Component
;
import
com.neotel.smfcore.core.barcode.service.po.Component
;
import
com.neotel.smfcore.core.barcode.utils.CodeResolve
;
import
com.neotel.smfcore.core.barcode.utils.CodeResolve
;
import
com.neotel.smfcore.core.device.bean.StatusBean
;
import
com.neotel.smfcore.core.inList.util.InListCache
;
import
com.neotel.smfcore.core.inList.util.InListCache
;
import
com.neotel.smfcore.core.language.service.bean.LanguageInfo
;
import
com.neotel.smfcore.core.language.service.bean.LanguageInfo
;
import
com.neotel.smfcore.core.language.util.MessageUtils
;
import
com.neotel.smfcore.core.language.util.MessageUtils
;
...
@@ -26,6 +27,7 @@ import com.neotel.smfcore.core.system.service.dao.ICacheItemDao;
...
@@ -26,6 +27,7 @@ import com.neotel.smfcore.core.system.service.dao.ICacheItemDao;
import
com.neotel.smfcore.core.system.service.dao.ISettingsDao
;
import
com.neotel.smfcore.core.system.service.dao.ISettingsDao
;
import
com.neotel.smfcore.core.system.service.po.CacheItem
;
import
com.neotel.smfcore.core.system.service.po.CacheItem
;
import
com.neotel.smfcore.core.system.service.po.Settings
;
import
com.neotel.smfcore.core.system.service.po.Settings
;
import
com.neotel.smfcore.core.system.util.DevicesStatusUtil
;
import
org.apache.logging.log4j.LogManager
;
import
org.apache.logging.log4j.LogManager
;
import
org.apache.logging.log4j.Logger
;
import
org.apache.logging.log4j.Logger
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
...
@@ -95,6 +97,10 @@ public class DataCache {
...
@@ -95,6 +97,10 @@ public class DataCache {
cacheMap
=
Maps
.
newConcurrentMap
();
cacheMap
=
Maps
.
newConcurrentMap
();
List
<
CacheItem
>
all
=
cacheItemDao
.
findAll
();
List
<
CacheItem
>
all
=
cacheItemDao
.
findAll
();
for
(
CacheItem
cacheItem
:
all
)
{
for
(
CacheItem
cacheItem
:
all
)
{
if
(
cacheItem
.
getCacheKey
()
==
null
||
cacheItem
.
getCacheValue
()
==
null
){
log
.
info
(
cacheItem
.
getCacheKey
()+
"---"
+
cacheItem
.
getCacheValue
());
continue
;
}
cacheMap
.
put
(
cacheItem
.
getCacheKey
(),
cacheItem
.
getCacheValue
());
cacheMap
.
put
(
cacheItem
.
getCacheKey
(),
cacheItem
.
getCacheValue
());
}
}
if
(
cacheMap
.
get
(
Constants
.
CACHE_StopOut
)
==
null
)
{
if
(
cacheMap
.
get
(
Constants
.
CACHE_StopOut
)
==
null
)
{
...
@@ -662,10 +668,10 @@ public class DataCache {
...
@@ -662,10 +668,10 @@ public class DataCache {
public
List
<
String
>
getAvailableStorageIds
(){
public
List
<
String
>
getAvailableStorageIds
(){
List
<
String
>
availableStorageIds
=
new
ArrayList
<>();
List
<
String
>
availableStorageIds
=
new
ArrayList
<>();
for
(
Storage
storage
:
getAllStorage
().
values
())
{
for
(
Storage
storage
:
getAllStorage
().
values
())
{
/*
StatusBean bean = DevicesStatusUtil.getStatusBean(storage.getCid());
StatusBean
bean
=
DevicesStatusUtil
.
getStatusBean
(
storage
.
getCid
());
if
(
bean
==
null
||
bean
.
timeOut
()
||
!
bean
.
isAvailable
())
{
if
(
bean
==
null
||
bean
.
timeOut
()
||
!
bean
.
isAvailable
())
{
continue
;
continue
;
}
*/
}
availableStorageIds
.
add
(
storage
.
getId
());
availableStorageIds
.
add
(
storage
.
getId
());
}
}
return
availableStorageIds
;
return
availableStorageIds
;
...
...
src/main/java/com/neotel/smfcore/core/order/LiteOrderCache.java
查看文件 @
d89842e
...
@@ -35,6 +35,7 @@ import com.neotel.smfcore.core.system.util.DevicesStatusUtil;
...
@@ -35,6 +35,7 @@ import com.neotel.smfcore.core.system.util.DevicesStatusUtil;
import
com.neotel.smfcore.core.system.util.TaskService
;
import
com.neotel.smfcore.core.system.util.TaskService
;
import
com.neotel.smfcore.custom.lizhen.LizhenApi
;
import
com.neotel.smfcore.custom.lizhen.LizhenApi
;
import
com.neotel.smfcore.custom.lizhen.innerBox.enums.ExtendType
;
import
com.neotel.smfcore.custom.lizhen.innerBox.enums.ExtendType
;
import
com.neotel.smfcore.custom.lizhen.innerBox.util.StorageExportUtil
;
import
com.sun.org.apache.regexp.internal.RE
;
import
com.sun.org.apache.regexp.internal.RE
;
import
lombok.extern.slf4j.Slf4j
;
import
lombok.extern.slf4j.Slf4j
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
...
@@ -492,6 +493,13 @@ public class LiteOrderCache {
...
@@ -492,6 +493,13 @@ public class LiteOrderCache {
return
checkOutOrder
(
cacheOrder
).
getMsgKey
();
return
checkOutOrder
(
cacheOrder
).
getMsgKey
();
}
}
//获取是否有出料口
String
exportStr
=
StorageExportUtil
.
getExportByOrderNo
(
cacheOrder
.
getOrderNo
());
if
(
StringUtils
.
isBlank
(
exportStr
))
{
log
.
info
(
cacheOrder
.
getOrderNo
()
+
"没有空闲的出料口"
);
return
"没有空闲的出料口"
;
}
log
.
info
(
"开始执行工单["
+
orderNo
+
"] outBom="
+
outBom
);
log
.
info
(
"开始执行工单["
+
orderNo
+
"] outBom="
+
outBom
);
cacheOrder
.
setTaskReelCount
(
0
);
cacheOrder
.
setTaskReelCount
(
0
);
cacheOrder
.
setTaskFinishedTime
(-
1
);
cacheOrder
.
setTaskFinishedTime
(-
1
);
...
@@ -606,9 +614,7 @@ public class LiteOrderCache {
...
@@ -606,9 +614,7 @@ public class LiteOrderCache {
task
.
setSubSourceInfo
(
orderItem
.
getFeederInfo
());
task
.
setSubSourceInfo
(
orderItem
.
getFeederInfo
());
task
.
setType
(
OP
.
CHECKOUT
);
task
.
setType
(
OP
.
CHECKOUT
);
Storage
storage
=
dataCache
.
getStorageById
(
pos
.
getStorageId
());
Storage
storage
=
dataCache
.
getStorageById
(
pos
.
getStorageId
());
if
(
storage
.
isType
(
new
DeviceType
[]{
DeviceType
.
SMD_XLR
}))
{
task
.
setExtendType
(
ExtendType
.
ORDER_CHECKOUT
);
//工单出库
task
.
setExtendType
(
ExtendType
.
STORAGE_CHECKOUT
);
//智能仓储出库
}
task
.
setLightColor
(
nextColor
.
getRgb
());
task
.
setLightColor
(
nextColor
.
getRgb
());
task
.
setStatus
(
OP_STATUS
.
WAIT
.
name
());
task
.
setStatus
(
OP_STATUS
.
WAIT
.
name
());
task
.
setPartNumber
(
pos
.
getBarcode
().
getPartNumber
());
//料号
task
.
setPartNumber
(
pos
.
getBarcode
().
getPartNumber
());
//料号
...
@@ -623,6 +629,11 @@ public class LiteOrderCache {
...
@@ -623,6 +629,11 @@ public class LiteOrderCache {
task
.
setProviderNumber
(
pos
.
getBarcode
().
getProviderNumber
());
//厂商代码
task
.
setProviderNumber
(
pos
.
getBarcode
().
getProviderNumber
());
//厂商代码
task
.
setProvider
(
pos
.
getBarcode
().
getProvider
());
//厂商
task
.
setProvider
(
pos
.
getBarcode
().
getProvider
());
//厂商
task
.
setTableNo
(
orderItem
.
getTableNo
());
task
.
setTableNo
(
orderItem
.
getTableNo
());
task
.
setW
(
pos
.
getBarcode
().
getPlateSize
());
task
.
setWarehouseCode
(
pos
.
getBarcode
().
getWarehouseCode
());
task
.
setH
(
pos
.
getBarcode
().
getHeight
());
task
.
setDescribe
(
pos
.
getBarcode
().
getDescribe
());
task
.
setKeeperCode
(
pos
.
getBarcode
().
getKeeperCode
());
// task = dataLogDao.save(task);
// task = dataLogDao.save(task);
taskService
.
addTaskToExecute
(
task
);
taskService
.
addTaskToExecute
(
task
);
}
}
...
@@ -649,6 +660,9 @@ public class LiteOrderCache {
...
@@ -649,6 +660,9 @@ public class LiteOrderCache {
//return "工单无可执行的任务";
//return "工单无可执行的任务";
return
"smfcore.order.out.noTask"
;
return
"smfcore.order.out.noTask"
;
}
}
StorageExportUtil
.
updateExport
(
exportStr
,
cacheOrder
.
getOrderNo
(),
cacheOrder
.
getLine
(),
taskReelCount
);
return
""
;
return
""
;
}
}
/**
/**
...
...
src/main/java/com/neotel/smfcore/core/storage/rest/StoragePosController.java
查看文件 @
d89842e
...
@@ -671,7 +671,7 @@ public class StoragePosController {
...
@@ -671,7 +671,7 @@ public class StoragePosController {
// }
// }
log
.
info
(
"出库料仓【"
+
storage
.
getName
()
+
"_"
+
storage
.
getCid
()
+
"】位置仓位【"
+
pos
.
getPosName
()
+
"】"
);
log
.
info
(
"出库料仓【"
+
storage
.
getName
()
+
"_"
+
storage
.
getCid
()
+
"】位置仓位【"
+
pos
.
getPosName
()
+
"】"
);
String
outResult
=
taskService
.
checkout
(
storage
,
pos
,
isSingleOut
,
SecurityUtils
.
getCurrentUsername
(),
null
);
String
outResult
=
taskService
.
checkout
(
storage
,
pos
,
isSingleOut
,
SecurityUtils
.
getCurrentUsername
(),
null
,
ExtendType
.
MANUAL_CHECKOUT
);
if
(!
Strings
.
isNullOrEmpty
(
outResult
))
{
if
(!
Strings
.
isNullOrEmpty
(
outResult
))
{
throw
new
ValidateException
(
"smfcore.error"
,
outResult
);
throw
new
ValidateException
(
"smfcore.error"
,
outResult
);
}
}
...
@@ -739,4 +739,28 @@ public class StoragePosController {
...
@@ -739,4 +739,28 @@ public class StoragePosController {
return
dto
;
return
dto
;
}
}
@ApiOperation
(
"批量启用或禁用库位"
)
@PutMapping
(
"/batchEnabledOrDisabledPos"
)
@PreAuthorize
(
"@el.check('storagePos:edit')"
)
public
ResultBean
batchEnabledOrDisabledPos
(
@RequestBody
StoragePosEnabledDto
enabledDto
)
{
List
<
String
>
idList
=
enabledDto
.
getIdList
();
if
(
idList
==
null
||
idList
.
isEmpty
())
{
return
ResultBean
.
newErrorResult
(
1
,
"smfcore.valueCanotNull"
,
"{0}不能为空"
,
new
String
[]{
"ID"
});
}
storagePosManager
.
batchUpdatePosEnabled
(
idList
,
enabledDto
.
isEnabled
());
//查询库位具体信息,更新缓存
List
<
StoragePos
>
posList
=
storagePosManager
.
findPosByIdList
(
idList
);
for
(
StoragePos
pos
:
posList
)
{
//dataCache.updateDisablePos(pos);
log
.
info
(
"启用或禁用库位:库位号["
+
pos
.
getId
()
+
"]["
+
pos
.
getPosName
()
+
"]="
+
enabledDto
.
isEnabled
());
DeviceMessageUtil
.
addEnabledPosMessage
(
pos
,
SecurityUtils
.
getCurrentUsername
());
}
for
(
Storage
storage
:
dataCache
.
getAllStorage
().
values
())
{
dataCache
.
reloadStorage
(
storage
,
""
);
}
return
ResultBean
.
newOkResult
(
""
);
}
}
}
src/main/java/com/neotel/smfcore/core/storage/rest/dto/StoragePosEnabledDto.java
查看文件 @
d89842e
...
@@ -5,6 +5,7 @@ import lombok.Getter;
...
@@ -5,6 +5,7 @@ import lombok.Getter;
import
lombok.Setter
;
import
lombok.Setter
;
import
java.io.Serializable
;
import
java.io.Serializable
;
import
java.util.List
;
@Getter
@Getter
@Setter
@Setter
...
@@ -14,4 +15,7 @@ public class StoragePosEnabledDto implements Serializable {
...
@@ -14,4 +15,7 @@ public class StoragePosEnabledDto implements Serializable {
@ApiModelProperty
(
"启用/禁用"
)
@ApiModelProperty
(
"启用/禁用"
)
private
boolean
enabled
=
true
;
private
boolean
enabled
=
true
;
@ApiModelProperty
(
"库位ID列表"
)
private
List
<
String
>
idList
;
}
}
src/main/java/com/neotel/smfcore/core/storage/service/manager/IStoragePosManager.java
查看文件 @
d89842e
...
@@ -90,4 +90,8 @@ public interface IStoragePosManager extends IBaseManager<StoragePos> {
...
@@ -90,4 +90,8 @@ public interface IStoragePosManager extends IBaseManager<StoragePos> {
List
<
StoragePos
>
findStoragePosByPartNumber
(
List
<
String
>
partNumberList
);
List
<
StoragePos
>
findStoragePosByPartNumber
(
List
<
String
>
partNumberList
);
List
<
StoragePos
>
findPartNumberListInStorages
(
List
<
String
>
storageIdList
,
String
pn
,
Collection
<
String
>
excludePosIds
,
CHECKOUT_TYPE
checkOutType
,
String
brand
);
List
<
StoragePos
>
findPartNumberListInStorages
(
List
<
String
>
storageIdList
,
String
pn
,
Collection
<
String
>
excludePosIds
,
CHECKOUT_TYPE
checkOutType
,
String
brand
);
void
batchUpdatePosEnabled
(
List
<
String
>
idList
,
boolean
enabled
);
List
<
StoragePos
>
findPosByIdList
(
List
<
String
>
idList
);
}
}
src/main/java/com/neotel/smfcore/core/storage/service/manager/impl/StoragePosManagerImpl.java
查看文件 @
d89842e
...
@@ -837,4 +837,18 @@ public class StoragePosManagerImpl implements IStoragePosManager {
...
@@ -837,4 +837,18 @@ public class StoragePosManagerImpl implements IStoragePosManager {
Query
q
=
new
Query
(
c
);
Query
q
=
new
Query
(
c
);
return
storagePosDao
.
findByQuery
(
q
);
return
storagePosDao
.
findByQuery
(
q
);
}
}
@Override
public
void
batchUpdatePosEnabled
(
List
<
String
>
idList
,
boolean
enabled
)
{
Query
query
=
new
Query
(
Criteria
.
where
(
"id"
).
in
(
idList
));
Update
update
=
new
Update
();
update
.
set
(
"enabled"
,
enabled
);
storagePosDao
.
updateMulti
(
query
,
update
);
}
@Override
public
List
<
StoragePos
>
findPosByIdList
(
List
<
String
>
idList
)
{
Query
query
=
new
Query
(
Criteria
.
where
(
"id"
).
in
(
idList
));
return
storagePosDao
.
findByQuery
(
query
);
}
}
}
src/main/java/com/neotel/smfcore/core/system/service/po/DataLog.java
查看文件 @
d89842e
...
@@ -353,6 +353,15 @@ public class DataLog extends BasePo implements Serializable {
...
@@ -353,6 +353,15 @@ public class DataLog extends BasePo implements Serializable {
*/
*/
private
Date
fristPutInDate
;
private
Date
fristPutInDate
;
/**
* 盘宽
*/
private
int
plateSize
=
0
;
/**
* 盘高
*/
private
int
height
=
0
;
public
String
getBarcode
()
{
public
String
getBarcode
()
{
if
(
barcode
==
null
){
if
(
barcode
==
null
){
return
""
;
return
""
;
...
...
src/main/java/com/neotel/smfcore/core/system/util/TaskService.java
查看文件 @
d89842e
...
@@ -39,6 +39,7 @@ import org.springframework.beans.factory.annotation.Autowired;
...
@@ -39,6 +39,7 @@ import org.springframework.beans.factory.annotation.Autowired;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
import
java.util.*
;
import
java.util.*
;
import
java.util.stream.Collectors
;
/**
/**
* Created by sunke on 2021/7/13.
* Created by sunke on 2021/7/13.
...
@@ -103,8 +104,15 @@ public class TaskService {
...
@@ -103,8 +104,15 @@ public class TaskService {
DataLog
task
=
new
DataLog
(
storage
,
barcode
,
storagePos
);
DataLog
task
=
new
DataLog
(
storage
,
barcode
,
storagePos
);
task
.
setType
(
OP
.
PUT_IN
);
task
.
setType
(
OP
.
PUT_IN
);
task
.
setStatus
(
OP_STATUS
.
EXECUTING
.
name
());
task
.
setStatus
(
OP_STATUS
.
EXECUTING
.
name
());
task
.
setExtendType
(
ExtendType
.
STORAGE_PUTIN
);
//智能仓储
入库
task
.
setExtendType
(
ExtendType
.
AUTO_PUTIN
);
//自动
入库
if
(
barcode
!=
null
){
if
(
barcode
!=
null
){
task
.
setWarehouseCode
(
barcode
.
getWarehouseCode
());
task
.
setDescribe
(
barcode
.
getDescribe
());
task
.
setBatchInfo
(
barcode
.
getBatch
());
task
.
setDateCode
(
barcode
.
getDateCode
());
task
.
setProvider
(
barcode
.
getProvider
());
task
.
setProviderNumber
(
barcode
.
getProviderNumber
());
task
.
setKeeperCode
(
barcode
.
getKeeperCode
());
barcode
.
setPutInTime
(
System
.
currentTimeMillis
());
barcode
.
setPutInTime
(
System
.
currentTimeMillis
());
barcode
.
updateSluggishTime
(
dataCache
.
getPNsluggishDay
(
barcode
.
getPartNumber
()));
barcode
.
updateSluggishTime
(
dataCache
.
getPNsluggishDay
(
barcode
.
getPartNumber
()));
barcodeManager
.
saveBarcode
(
barcode
);
barcodeManager
.
saveBarcode
(
barcode
);
...
@@ -119,6 +127,11 @@ public class TaskService {
...
@@ -119,6 +127,11 @@ public class TaskService {
return
task
;
return
task
;
}
}
public
synchronized
String
checkout
(
Storage
storage
,
StoragePos
pos
,
boolean
isSingleOut
,
String
opUserName
,
String
stationName
)
throws
ValidateException
{
return
checkout
(
storage
,
pos
,
isSingleOut
,
opUserName
,
stationName
,-
1
);
}
/**
/**
* 库位出库
* 库位出库
*
*
...
@@ -128,11 +141,11 @@ public class TaskService {
...
@@ -128,11 +141,11 @@ public class TaskService {
* @return
* @return
* @throws ValidateException
* @throws ValidateException
*/
*/
public
synchronized
String
checkout
(
Storage
storage
,
StoragePos
pos
,
boolean
isSingleOut
,
String
opUserName
,
String
stationName
)
throws
ValidateException
{
public
synchronized
String
checkout
(
Storage
storage
,
StoragePos
pos
,
boolean
isSingleOut
,
String
opUserName
,
String
stationName
,
int
extendType
)
throws
ValidateException
{
if
(
pos
.
getBarcode
()
==
null
)
{
if
(
pos
.
getBarcode
()
==
null
)
{
String
msg
=
"库位["
+
pos
.
getPosName
()
+
"]中已无物料,忽略"
;
String
msg
=
"库位["
+
pos
.
getPosName
()
+
"]中已无物料,忽略"
;
log
.
info
(
msg
);
log
.
info
(
msg
);
throw
new
ValidateException
(
"smfcore.allBoxView.noReel"
,
"库位{0}中无物料"
,
new
String
[]{
pos
.
getPosName
()});
throw
new
ValidateException
(
"smfcore.allBoxView.noReel"
,
"库位{0}中无物料"
,
new
String
[]{
pos
.
getPosName
()});
// Barcode barcode=new Barcode();
// Barcode barcode=new Barcode();
...
@@ -160,7 +173,7 @@ public class TaskService {
...
@@ -160,7 +173,7 @@ public class TaskService {
task
.
setSingleOut
(
isSingleOut
);
task
.
setSingleOut
(
isSingleOut
);
task
.
setOperator
(
opUserName
);
task
.
setOperator
(
opUserName
);
task
.
setStorageId
(
storage
.
getId
());
task
.
setStorageId
(
storage
.
getId
());
if
(
StringUtils
.
isNotBlank
(
stationName
)){
if
(
StringUtils
.
isNotBlank
(
stationName
))
{
task
.
setLoc
(
stationName
);
task
.
setLoc
(
stationName
);
}
}
task
.
setBoxPosName
(
pos
.
getPosName
());
task
.
setBoxPosName
(
pos
.
getPosName
());
...
@@ -168,8 +181,21 @@ public class TaskService {
...
@@ -168,8 +181,21 @@ public class TaskService {
task.setStatus(OP_STATUS.FINISHED.name());
task.setStatus(OP_STATUS.FINISHED.name());
addTaskToFinished(pos,barcode,SecurityUtils.getCurrentUsername());
addTaskToFinished(pos,barcode,SecurityUtils.getCurrentUsername());
} else {*/
} else {*/
task
.
setStatus
(
OP_STATUS
.
WAIT
.
name
());
task
.
setStatus
(
OP_STATUS
.
WAIT
.
name
());
addTaskToExecute
(
task
);
task
.
setWarehouseCode
(
barcode
.
getWarehouseCode
());
task
.
setDescribe
(
barcode
.
getDescribe
());
task
.
setBatchInfo
(
barcode
.
getBatch
());
task
.
setDateCode
(
barcode
.
getDateCode
());
task
.
setProvider
(
barcode
.
getProvider
());
task
.
setProviderNumber
(
barcode
.
getProviderNumber
());
task
.
setKeeperCode
(
barcode
.
getKeeperCode
());
if
(
StringUtils
.
isNotBlank
(
SecurityUtils
.
getLoginUsername
())){
task
.
setCreator
(
SecurityUtils
.
getLoginUsername
());
}
if
(
extendType
!=
-
1
)
{
task
.
setExtendType
(
extendType
);
}
addTaskToExecute
(
task
);
//}
//}
return
""
;
return
""
;
}
}
...
@@ -412,20 +438,20 @@ public class TaskService {
...
@@ -412,20 +438,20 @@ public class TaskService {
if
(
task
.
isPutInTask
())
{
if
(
task
.
isPutInTask
())
{
log
.
error
(
"cid["
+
cid
+
"]已有入库任务,不可再分配出库任务"
);
log
.
error
(
"cid["
+
cid
+
"]已有入库任务,不可再分配出库任务"
);
return
null
;
return
null
;
}
else
if
(
task
.
needReSendToClient
()
&&
task
.
isCheckOutTask
())
{
//超过30秒仍未完成的出库再次发送到客户端
}
else
if
(
task
.
needReSendToClient
()
&&
task
.
isCheckOutTask
()
&&
task
.
isExecuting
()
)
{
//超过30秒仍未完成的出库再次发送到客户端
log
.
error
(
"cid["
+
cid
+
"]的出库任务["
+
task
.
getPosName
()
+
"]超过60秒仍未完成,重新发送到客户端!"
);
log
.
error
(
"cid["
+
cid
+
"]的出库任务["
+
task
.
getPosName
()
+
"]超过60秒仍未完成,重新发送到客户端!"
);
task
.
setUpdateDate
(
new
Date
());
task
.
setUpdateDate
(
new
Date
());
return
task
;
return
task
;
}
}
//只能同时有两个正在执行的出库任务,如果超过两个不再分配了
//只能同时有两个正在执行的出库任务,如果超过两个不再分配了
if
(
task
.
isCheckOutTask
())
{
/*
if (task.isCheckOutTask()) {
checkoutSize++;
checkoutSize++;
if (checkoutSize >= 2) {
if (checkoutSize >= 2) {
//log.error("cid["+cid + "]的BOX["+ boxId+"]的出库任务已经超过2个,不再分配!");
//log.error("cid["+cid + "]的BOX["+ boxId+"]的出库任务已经超过2个,不再分配!");
return null;
return null;
}
}
}
}
*/
}
}
}
}
...
@@ -457,17 +483,22 @@ public class TaskService {
...
@@ -457,17 +483,22 @@ public class TaskService {
}
}
//判断发送的任务与当前执行的工单是否一致
//判断发送的任务与当前执行的工单是否一致
if
(
outTask
!=
null
)
{
if
(
outTask
!=
null
)
{
List
<
DataLog
>
dataLogList
=
new
ArrayList
<>();
for
(
DataLog
task
:
allTasks
)
{
for
(
DataLog
task
:
allTasks
)
{
if
(
outTask
.
getCid
().
equals
(
task
.
getCid
()))
{
if
(
outTask
.
getCid
().
equals
(
task
.
getCid
()))
{
if
(
StringUtils
.
isNotBlank
(
outTask
.
getSourceName
()))
{
if
(
StringUtils
.
isNotBlank
(
outTask
.
getSourceName
()))
{
if
(
!
outTask
.
getSourceName
().
equals
(
task
.
getSourceName
()))
{
if
(
outTask
.
getSourceName
().
equals
(
task
.
getSourceName
()))
{
if
(
task
.
is
Executing
()
||
task
.
isOnInnerLine
())
{
if
(
task
.
is
Wait
())
{
return
null
;
dataLogList
.
add
(
task
)
;
}
}
}
}
}
}
}
}
}
}
if
(
dataLogList
!=
null
&&
!
dataLogList
.
isEmpty
()){
dataLogList
=
dataLogList
.
stream
().
sorted
(
Comparator
.
comparing
(
DataLog:
:
getW
).
reversed
()).
collect
(
Collectors
.
toList
());
outTask
=
dataLogList
.
get
(
0
);
}
}
}
return
outTask
;
return
outTask
;
}
}
...
@@ -745,7 +776,7 @@ public class TaskService {
...
@@ -745,7 +776,7 @@ public class TaskService {
Collection
<
String
>
operatingPosIds
=
excludePosIds
();
Collection
<
String
>
operatingPosIds
=
excludePosIds
();
log
.
debug
(
"尝试从["
+
storage
.
getCid
()
+
"]中为["
+
barcode
.
getBarcode
()
+
"]查找空位"
);
log
.
debug
(
"尝试从["
+
storage
.
getCid
()
+
"]中为["
+
barcode
.
getBarcode
()
+
"]查找空位"
);
StoragePos
pos
=
null
;
StoragePos
pos
=
null
;
if
(
storage
.
isType
(
new
DeviceType
[]{
DeviceType
.
SMD_XLR
}))
{
/*
if (storage.isType(new DeviceType[]{DeviceType.SMD_XLR})) {
//根据cid获取下一个放入的面别
//根据cid获取下一个放入的面别
String side = posSideMap.get(storage.getCid());
String side = posSideMap.get(storage.getCid());
if (side != null) {
if (side != null) {
...
@@ -769,9 +800,9 @@ public class TaskService {
...
@@ -769,9 +800,9 @@ public class TaskService {
posSideMap.put(storage.getCid(),posSide);
posSideMap.put(storage.getCid(),posSide);
pos = storagePosManager.getEmptyPosByStorage(storage, barcode, operatingPosIds, lastPosId, posSide);
pos = storagePosManager.getEmptyPosByStorage(storage, barcode, operatingPosIds, lastPosId, posSide);
}
}
}
else
{
} else {
*/
pos
=
storagePosManager
.
getEmptyPosByStorage
(
storage
,
barcode
,
operatingPosIds
,
lastPosId
);
pos
=
storagePosManager
.
getEmptyPosByStorage
(
storage
,
barcode
,
operatingPosIds
,
lastPosId
);
}
//
}
if
(
pos
!=
null
)
{
if
(
pos
!=
null
)
{
return
pos
;
return
pos
;
}
}
...
@@ -942,7 +973,7 @@ public class TaskService {
...
@@ -942,7 +973,7 @@ public class TaskService {
task
.
setOperator
(
opUser
);
task
.
setOperator
(
opUser
);
task
.
setStatus
(
OP_STATUS
.
FINISHED
.
name
());
task
.
setStatus
(
OP_STATUS
.
FINISHED
.
name
());
task
.
setExtendType
(
ExtendType
.
CLEAR_POS
);
//手动清空库位
//
task.setExtendType(ExtendType.CLEAR_POS); //手动清空库位
updateFinishedTask
(
task
);
updateFinishedTask
(
task
);
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
...
@@ -1066,9 +1097,17 @@ public class TaskService {
...
@@ -1066,9 +1097,17 @@ public class TaskService {
task
.
setType
(
OP
.
CHECKOUT
);
task
.
setType
(
OP
.
CHECKOUT
);
task
.
setExtendType
(
ExtendType
.
MANUAL_CHECKOUT
);
//手动出库
task
.
setExtendType
(
ExtendType
.
MANUAL_CHECKOUT
);
//手动出库
task
.
setOperator
(
SecurityUtils
.
getCurrentUsername
());
task
.
setOperator
(
SecurityUtils
.
getCurrentUsername
());
task
.
setCreator
(
SecurityUtils
.
getCurrentUsername
());
task
.
setSingleOut
(
true
);
task
.
setSingleOut
(
true
);
task
.
setSourceId
(
null
);
task
.
setSourceId
(
null
);
task
.
setSourceName
(
"PN"
);
task
.
setSourceName
(
"PN"
);
task
.
setWarehouseCode
(
pos
.
getBarcode
().
getWarehouseCode
());
task
.
setDescribe
(
pos
.
getBarcode
().
getDescribe
());
task
.
setBatchInfo
(
pos
.
getBarcode
().
getBatch
());
task
.
setDateCode
(
pos
.
getBarcode
().
getDateCode
());
task
.
setProvider
(
pos
.
getBarcode
().
getProvider
());
task
.
setProviderNumber
(
pos
.
getBarcode
().
getProviderNumber
());
task
.
setKeeperCode
(
pos
.
getBarcode
().
getKeeperCode
());
addTaskToExecute
(
task
);
addTaskToExecute
(
task
);
}
}
}
}
...
...
src/main/java/com/neotel/smfcore/custom/lizhen/LizhenApi.java
查看文件 @
d89842e
...
@@ -17,7 +17,9 @@ import com.neotel.smfcore.core.device.util.DataCache;
...
@@ -17,7 +17,9 @@ import com.neotel.smfcore.core.device.util.DataCache;
import
com.neotel.smfcore.core.order.LiteOrderCache
;
import
com.neotel.smfcore.core.order.LiteOrderCache
;
import
com.neotel.smfcore.core.order.service.po.LiteOrder
;
import
com.neotel.smfcore.core.order.service.po.LiteOrder
;
import
com.neotel.smfcore.core.storage.enums.DeviceType
;
import
com.neotel.smfcore.core.storage.enums.DeviceType
;
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.Storage
;
import
com.neotel.smfcore.core.storage.service.po.StoragePos
;
import
com.neotel.smfcore.core.system.service.po.DataLog
;
import
com.neotel.smfcore.core.system.service.po.DataLog
;
import
com.neotel.smfcore.custom.lizhen.agvBox.bean.GrLabel
;
import
com.neotel.smfcore.custom.lizhen.agvBox.bean.GrLabel
;
import
com.neotel.smfcore.custom.lizhen.innerBox.bean.PreWarningItem
;
import
com.neotel.smfcore.custom.lizhen.innerBox.bean.PreWarningItem
;
...
@@ -41,6 +43,9 @@ public class LizhenApi extends DefaultSmfApiListener {
...
@@ -41,6 +43,9 @@ public class LizhenApi extends DefaultSmfApiListener {
private
IBarcodeManager
barcodeManager
;
private
IBarcodeManager
barcodeManager
;
@Autowired
@Autowired
private
IStoragePosManager
storagePosManager
;
@Autowired
private
DataCache
dataCache
;
private
DataCache
dataCache
;
@Value
(
"${api.fetchGRUrl}"
)
@Value
(
"${api.fetchGRUrl}"
)
...
@@ -274,7 +279,12 @@ public class LizhenApi extends DefaultSmfApiListener {
...
@@ -274,7 +279,12 @@ public class LizhenApi extends DefaultSmfApiListener {
Barcode
barcodeOri
=
barcodeManager
.
findByBarcode
(
barcode
.
getBarcode
());
Barcode
barcodeOri
=
barcodeManager
.
findByBarcode
(
barcode
.
getBarcode
());
if
(
barcodeOri
!=
null
){
if
(
barcodeOri
!=
null
){
barcodeOri
.
setDisableMsg
(
resultStr
);
barcodeOri
.
setDisableMsg
(
resultStr
);
barcodeManager
.
save
(
barcodeOri
);
barcode
=
barcodeManager
.
save
(
barcodeOri
);
StoragePos
storagePos
=
storagePosManager
.
getByBarcode
(
barcode
.
getBarcode
());
if
(
storagePos
!=
null
){
storagePos
.
setBarcode
(
barcode
);
storagePosManager
.
save
(
storagePos
);
}
}
}
if
(
StringUtils
.
isNotBlank
(
resultStr
))
{
if
(
StringUtils
.
isNotBlank
(
resultStr
))
{
...
@@ -562,16 +572,16 @@ public class LizhenApi extends DefaultSmfApiListener {
...
@@ -562,16 +572,16 @@ public class LizhenApi extends DefaultSmfApiListener {
* @return
* @return
*/
*/
public
boolean
checkReelMeasure
(
Barcode
barcode
)
{
public
boolean
checkReelMeasure
(
Barcode
barcode
)
{
if
(
StringUtils
.
isBlank
(
checkReelMeasureUrl
)){
if
(
StringUtils
.
isBlank
(
checkReelMeasureUrl
))
{
return
true
;
return
true
;
}
}
Map
<
String
,
Object
>
paramMap
=
new
HashMap
<>();
Map
<
String
,
Object
>
paramMap
=
new
HashMap
<>();
paramMap
.
put
(
"reelID"
,
barcode
.
getBarcode
());
paramMap
.
put
(
"reelID"
,
barcode
.
getBarcode
());
paramMap
.
put
(
"ipn"
,
barcode
.
getPartNumber
());
paramMap
.
put
(
"ipn"
,
barcode
.
getPartNumber
());
try
{
try
{
log
.
info
(
"散料量测接口入参为-----"
+
JSON
.
toJSONString
(
paramMap
)
);
log
.
info
(
barcode
.
getBarcode
()
+
"散料量测接口入参为-----"
+
JSON
.
toJSONString
(
paramMap
)+
",接口地址为:"
+
checkReelMeasureUrl
);
String
result
=
HttpHelper
.
postJson
(
checkReelMeasureUrl
,
paramMap
);
String
result
=
HttpHelper
.
postJson
(
checkReelMeasureUrl
,
paramMap
);
log
.
info
(
"散料量测接口出参为-----"
+
result
);
log
.
info
(
barcode
.
getBarcode
()
+
"散料量测接口出参为-----"
+
result
);
JSONObject
jsonObject
=
JSON
.
parseObject
(
result
);
JSONObject
jsonObject
=
JSON
.
parseObject
(
result
);
if
(
jsonObject
.
getInteger
(
"status"
)
==
200
)
{
if
(
jsonObject
.
getInteger
(
"status"
)
==
200
)
{
JSONObject
data
=
jsonObject
.
getJSONObject
(
"data"
);
JSONObject
data
=
jsonObject
.
getJSONObject
(
"data"
);
...
...
src/main/java/com/neotel/smfcore/custom/lizhen/LizhenController.java
查看文件 @
d89842e
...
@@ -61,6 +61,12 @@ public class LizhenController {
...
@@ -61,6 +61,12 @@ public class LizhenController {
@Value
(
"${lizhen.F5.url}"
)
@Value
(
"${lizhen.F5.url}"
)
private
String
F5Url
;
private
String
F5Url
;
@Value
(
"${lizhen.F4.line}"
)
private
String
F4Line
;
@Value
(
"${lizhen.F4.url}"
)
private
String
F4Url
;
private
static
Map
<
String
,
String
>
lineUrlMap
=
new
HashMap
<>();
private
static
Map
<
String
,
String
>
lineUrlMap
=
new
HashMap
<>();
//初始化加载需要配送的地址
//初始化加载需要配送的地址
...
@@ -72,9 +78,12 @@ public class LizhenController {
...
@@ -72,9 +78,12 @@ public class LizhenController {
F3Url
=
dataCache
.
getConfigCache
(
"F3Url"
,
F3Url
);
F3Url
=
dataCache
.
getConfigCache
(
"F3Url"
,
F3Url
);
F5Line
=
dataCache
.
getConfigCache
(
"F5Line"
,
F5Line
);
F5Line
=
dataCache
.
getConfigCache
(
"F5Line"
,
F5Line
);
F5Url
=
dataCache
.
getConfigCache
(
"F5Url"
,
F5Url
);
F5Url
=
dataCache
.
getConfigCache
(
"F5Url"
,
F5Url
);
F4Line
=
dataCache
.
getConfigCache
(
"F4Line"
,
F4Line
);
F4Url
=
dataCache
.
getConfigCache
(
"F4Url"
,
F4Url
);
lineUrlMap
.
put
(
F2Line
,
F2Url
);
lineUrlMap
.
put
(
F2Line
,
F2Url
);
lineUrlMap
.
put
(
F3Line
,
F3Url
);
lineUrlMap
.
put
(
F3Line
,
F3Url
);
lineUrlMap
.
put
(
F5Line
,
F5Url
);
lineUrlMap
.
put
(
F5Line
,
F5Url
);
lineUrlMap
.
put
(
F4Line
,
F4Url
);
}
}
...
@@ -171,11 +180,11 @@ public class LizhenController {
...
@@ -171,11 +180,11 @@ public class LizhenController {
for
(
Map
<
String
,
String
>
param
:
params
)
{
for
(
Map
<
String
,
String
>
param
:
params
)
{
String
line
=
param
.
get
(
"LINE"
);
String
line
=
param
.
get
(
"LINE"
);
String
forwardUrl
=
getForwardUrl
(
line
);
String
forwardUrl
=
getForwardUrl
(
line
);
log
.
info
(
"Mes缺料预警---"
+
JSONObject
.
toJSONString
(
param
)
+
",地址为:"
+
forwardUrl
);
if
(
StringUtils
.
isBlank
(
forwardUrl
)){
if
(
StringUtils
.
isBlank
(
forwardUrl
)){
log
.
info
(
line
+
"没有对应的地址,跳过"
);
log
.
info
(
line
+
"没有对应的地址,跳过"
);
continue
;
continue
;
}
}
log
.
info
(
"Mes缺料预警---"
+
JSONObject
.
toJSONString
(
param
)
+
",地址为:"
+
forwardUrl
);
String
id
=
param
.
get
(
"ID"
);
String
id
=
param
.
get
(
"ID"
);
try
{
try
{
String
result
=
HttpHelper
.
postJson
(
forwardUrl
,
param
);
String
result
=
HttpHelper
.
postJson
(
forwardUrl
,
param
);
...
...
src/main/java/com/neotel/smfcore/custom/lizhen/innerBox/bean/StorageExport.java
0 → 100644
查看文件 @
d89842e
package
com
.
neotel
.
smfcore
.
custom
.
lizhen
.
innerBox
.
bean
;
import
lombok.Getter
;
import
lombok.NoArgsConstructor
;
import
lombok.Setter
;
@Getter
@Setter
@NoArgsConstructor
public
class
StorageExport
{
/**
* 工单序号
*/
private
String
hSerial
=
""
;
/**
* 目的地(线体)
*/
private
String
line
=
""
;
/**
* 当前料仓剩余未出的需求单数量
*/
private
int
remainTaskCount
=
0
;
}
src/main/java/com/neotel/smfcore/custom/lizhen/innerBox/enums/ExtendType.java
查看文件 @
d89842e
...
@@ -88,11 +88,22 @@ public class ExtendType {
...
@@ -88,11 +88,22 @@ public class ExtendType {
public
final
static
int
VIRTUAL_PICKING_DETAIL
=
15
;
public
final
static
int
VIRTUAL_PICKING_DETAIL
=
15
;
/**
* 工单出库
*/
public
final
static
int
ORDER_CHECKOUT
=
16
;
/**
* 自动入库
*/
public
final
static
int
AUTO_PUTIN
=
17
;
public
static
String
getName
(
int
type
)
{
public
static
String
getName
(
int
type
)
{
String
name
=
""
;
String
name
=
""
;
switch
(
type
)
{
switch
(
type
)
{
case
0
:
case
0
:
name
=
"
智能仓储
入库"
;
name
=
"
自动
入库"
;
break
;
break
;
case
1
:
case
1
:
name
=
"智能仓储出库"
;
name
=
"智能仓储出库"
;
...
@@ -139,6 +150,12 @@ public class ExtendType {
...
@@ -139,6 +150,12 @@ public class ExtendType {
case
15
:
case
15
:
name
=
"虚拟仓pk发料"
;
name
=
"虚拟仓pk发料"
;
break
;
break
;
case
16
:
name
=
"工单出库"
;
break
;
case
17
:
name
=
"自动入库"
;
break
;
}
}
return
name
;
return
name
;
}
}
...
...
src/main/java/com/neotel/smfcore/custom/lizhen/innerBox/rest/InnerBoxRestController.java
查看文件 @
d89842e
此文件的差异被折叠,
点击展开。
src/main/java/com/neotel/smfcore/custom/lizhen/innerBox/rest/VirtualRestController.java
查看文件 @
d89842e
...
@@ -92,6 +92,7 @@ public class VirtualRestController {
...
@@ -92,6 +92,7 @@ public class VirtualRestController {
public
synchronized
ResultBean
putIn
(
@RequestBody
Map
<
String
,
String
>
paramMap
)
{
public
synchronized
ResultBean
putIn
(
@RequestBody
Map
<
String
,
String
>
paramMap
)
{
String
posName
=
paramMap
.
get
(
"posName"
);
String
posName
=
paramMap
.
get
(
"posName"
);
String
code
=
paramMap
.
get
(
"code"
);
String
code
=
paramMap
.
get
(
"code"
);
String
warehouseCode
=
paramMap
.
get
(
"warehouseCode"
);
String
newCode
=
code
.
toUpperCase
();
String
newCode
=
code
.
toUpperCase
();
//开始解析code
//开始解析code
CodeBean
codeBean
=
codeResolve
.
resolveSingleCode
(
"=7x8="
+
newCode
);
CodeBean
codeBean
=
codeResolve
.
resolveSingleCode
(
"=7x8="
+
newCode
);
...
@@ -157,7 +158,7 @@ public class VirtualRestController {
...
@@ -157,7 +158,7 @@ public class VirtualRestController {
//判断是否为禁用料
//判断是否为禁用料
try
{
try
{
smfApi
.
canPutInAfterResolve
(
barcode
);
barcode
=
smfApi
.
canPutInAfterResolve
(
barcode
);
}
catch
(
Exception
e
){
}
catch
(
Exception
e
){
return
ResultBean
.
newErrorResult
(-
1
,
""
,
e
.
getMessage
());
return
ResultBean
.
newErrorResult
(-
1
,
""
,
e
.
getMessage
());
}
}
...
@@ -168,6 +169,9 @@ public class VirtualRestController {
...
@@ -168,6 +169,9 @@ public class VirtualRestController {
return
ResultBean
.
newErrorResult
(-
1
,
"smfcore.storagePos.existBarcode"
,
"{}已存在库位{}中"
,
new
String
[]{
barcode
.
getBarcode
(),
pos
.
getPosName
()});
return
ResultBean
.
newErrorResult
(-
1
,
"smfcore.storagePos.existBarcode"
,
"{}已存在库位{}中"
,
new
String
[]{
barcode
.
getBarcode
(),
pos
.
getPosName
()});
}
}
//放入虚拟仓
//放入虚拟仓
if
(
StringUtils
.
isNotBlank
(
warehouseCode
)){
barcode
.
setWarehouseCode
(
warehouseCode
);
}
intoVirtualPos
(
posName
,
barcode
,
""
);
intoVirtualPos
(
posName
,
barcode
,
""
);
return
ResultBean
.
newOkResult
(
barcode
.
getBarcode
()+
"已经放入库位中:"
+
posName
);
return
ResultBean
.
newOkResult
(
barcode
.
getBarcode
()+
"已经放入库位中:"
+
posName
);
}
}
...
@@ -204,6 +208,14 @@ public class VirtualRestController {
...
@@ -204,6 +208,14 @@ public class VirtualRestController {
return
ResultBean
.
newErrorResult
(-
1
,
"smfcore.error.barcode.noValidCode"
,
"无效的条码"
);
return
ResultBean
.
newErrorResult
(-
1
,
"smfcore.error.barcode.noValidCode"
,
"无效的条码"
);
}
}
Barcode
barcode
=
codeBean
.
getBarcode
();
Barcode
barcode
=
codeBean
.
getBarcode
();
//判断是否为禁用料
try
{
barcode
=
smfApi
.
canPutInAfterResolve
(
barcode
);
}
catch
(
Exception
e
){
return
ResultBean
.
newErrorResult
(-
1
,
""
,
e
.
getMessage
());
}
//判断是否为虚拟仓
//判断是否为虚拟仓
String
barcodeStr
=
barcode
.
getBarcode
();
String
barcodeStr
=
barcode
.
getBarcode
();
StoragePos
pos
=
storagePosManager
.
getByBarcode
(
barcodeStr
);
StoragePos
pos
=
storagePosManager
.
getByBarcode
(
barcodeStr
);
...
@@ -215,11 +227,16 @@ public class VirtualRestController {
...
@@ -215,11 +227,16 @@ public class VirtualRestController {
DataLog
dataLog
=
new
DataLog
(
storage
,
barcode
,
pos
);
DataLog
dataLog
=
new
DataLog
(
storage
,
barcode
,
pos
);
dataLog
.
setStatus
(
OP_STATUS
.
FINISHED
.
name
());
dataLog
.
setStatus
(
OP_STATUS
.
FINISHED
.
name
());
dataLog
.
setType
(
OP
.
CHECKOUT
);
dataLog
.
setType
(
OP
.
CHECKOUT
);
if
(
storage
.
isVirtual
())
{
dataLog
.
setExtendType
(
ExtendType
.
MANUAL_CHECKOUT
);
//手动出库
dataLog
.
setExtendType
(
ExtendType
.
VIRTUAL_CHECKOUT
);
//虚拟出库
dataLog
.
setWarehouseCode
(
barcode
.
getWarehouseCode
());
}
else
{
dataLog
.
setDescribe
(
barcode
.
getDescribe
());
dataLog
.
setExtendType
(
ExtendType
.
STORAGE_CHECKOUT
);
//手动出库
dataLog
.
setBatchInfo
(
barcode
.
getBatch
());
}
dataLog
.
setDateCode
(
barcode
.
getDateCode
());
dataLog
.
setProvider
(
barcode
.
getProvider
());
dataLog
.
setProviderNumber
(
barcode
.
getProviderNumber
());
dataLog
.
setKeeperCode
(
barcode
.
getKeeperCode
());
dataLog
.
setCreator
(
SecurityUtils
.
getCurrentUsername
());
barcodeManager
.
delete
(
barcode
);
barcodeManager
.
delete
(
barcode
);
taskService
.
updateFinishedTask
(
dataLog
);
taskService
.
updateFinishedTask
(
dataLog
);
taskService
.
removeFinishedTask
(
dataLog
);
taskService
.
removeFinishedTask
(
dataLog
);
...
@@ -237,6 +254,13 @@ public class VirtualRestController {
...
@@ -237,6 +254,13 @@ public class VirtualRestController {
dataLog
.
setType
(
OP
.
CHECKOUT
);
dataLog
.
setType
(
OP
.
CHECKOUT
);
//dataLog.setPosName("人工");
//dataLog.setPosName("人工");
dataLog
.
setExtendType
(
ExtendType
.
MANUAL_CHECKOUT
);
//手动出库
dataLog
.
setExtendType
(
ExtendType
.
MANUAL_CHECKOUT
);
//手动出库
dataLog
.
setWarehouseCode
(
barcode
.
getWarehouseCode
());
dataLog
.
setDescribe
(
barcode
.
getDescribe
());
dataLog
.
setBatchInfo
(
barcode
.
getBatch
());
dataLog
.
setDateCode
(
barcode
.
getDateCode
());
dataLog
.
setProvider
(
barcode
.
getProvider
());
dataLog
.
setKeeperCode
(
barcode
.
getKeeperCode
());
dataLog
.
setCreator
(
SecurityUtils
.
getCurrentUsername
());
taskService
.
updateFinishedTask
(
dataLog
);
taskService
.
updateFinishedTask
(
dataLog
);
taskService
.
removeFinishedTask
(
dataLog
);
taskService
.
removeFinishedTask
(
dataLog
);
}
}
...
@@ -401,7 +425,16 @@ public class VirtualRestController {
...
@@ -401,7 +425,16 @@ public class VirtualRestController {
pos
.
setStorageId
(
storage
.
getId
());
pos
.
setStorageId
(
storage
.
getId
());
pos
=
storagePosManager
.
save
(
pos
);
pos
=
storagePosManager
.
save
(
pos
);
DataLog
dataLog
=
generateTask
(
storage
,
barcode
,
pos
,
OP
.
PUT_IN
,
OP_STATUS
.
FINISHED
.
name
(),
null
);
DataLog
dataLog
=
generateTask
(
storage
,
barcode
,
pos
,
OP
.
PUT_IN
,
OP_STATUS
.
FINISHED
.
name
(),
null
);
dataLog
.
setExtendType
(
ExtendType
.
VIRTUAL_PUTIN
);
//虚拟入库
dataLog
.
setExtendType
(
ExtendType
.
MANUAL_PUTIN
);
//手动入库
dataLog
.
setWarehouseCode
(
barcode
.
getWarehouseCode
());
dataLog
.
setDescribe
(
barcode
.
getDescribe
());
dataLog
.
setBatchInfo
(
barcode
.
getBatch
());
dataLog
.
setDateCode
(
barcode
.
getDateCode
());
dataLog
.
setProvider
(
barcode
.
getProvider
());
dataLog
.
setProviderNumber
(
barcode
.
getProviderNumber
());
dataLog
.
setKeeperCode
(
barcode
.
getKeeperCode
());
dataLog
.
setCreator
(
SecurityUtils
.
getCurrentUsername
());
if
(
StringUtils
.
isNotBlank
(
orderNo
)){
if
(
StringUtils
.
isNotBlank
(
orderNo
)){
dataLog
.
setSourceName
(
orderNo
);
dataLog
.
setSourceName
(
orderNo
);
}
}
...
...
src/main/java/com/neotel/smfcore/custom/lizhen/innerBox/util/OutLotInfoCache.java
查看文件 @
d89842e
/*
package com.neotel.smfcore.custom.lizhen.innerBox.util;
package com.neotel.smfcore.custom.lizhen.innerBox.util;
import com.neotel.smfcore.common.utils.Constants;
import com.neotel.smfcore.common.utils.Constants;
...
@@ -50,12 +51,14 @@ public class OutLotInfoCache {
...
@@ -50,12 +51,14 @@ public class OutLotInfoCache {
}
}
}
}
/**
*/
/**
* 根据cid获取料口状态信息
* 根据cid获取料口状态信息
*
*
* @param cid
* @param cid
* @return
* @return
*/
*//*
public static List<OutLotInfo> getOutLotInfoByCid(String cid) {
public static List<OutLotInfo> getOutLotInfoByCid(String cid) {
List<OutLotInfo> outLotInfos = outLotInfoMap.get(cid);
List<OutLotInfo> outLotInfos = outLotInfoMap.get(cid);
if (outLotInfos == null) {
if (outLotInfos == null) {
...
@@ -64,13 +67,16 @@ public class OutLotInfoCache {
...
@@ -64,13 +67,16 @@ public class OutLotInfoCache {
return outLotInfos;
return outLotInfos;
}
}
/**
*/
/**
* 修改缓存信息
* 修改缓存信息
* @param cid
* @param cid
* @param outLotInfos
* @param outLotInfos
*/
*//*
public static synchronized void updateOutLotInfo(String cid, List<OutLotInfo> outLotInfos) {
public static synchronized void updateOutLotInfo(String cid, List<OutLotInfo> outLotInfos) {
/* List<OutLotInfo> outLotInfos = outLotInfoMap.get(cid);
*/
/* List<OutLotInfo> outLotInfos = outLotInfoMap.get(cid);
List<OutLotInfo> newOutLotInfos = new ArrayList<>();
List<OutLotInfo> newOutLotInfos = new ArrayList<>();
boolean hasOutLot = false;
boolean hasOutLot = false;
if (outLotInfos != null && !outLotInfos.isEmpty()) {
if (outLotInfos != null && !outLotInfos.isEmpty()) {
...
@@ -85,7 +91,8 @@ public class OutLotInfoCache {
...
@@ -85,7 +91,8 @@ public class OutLotInfoCache {
if (!hasOutLot) {
if (!hasOutLot) {
newOutLotInfos.add(outLotInfo);
newOutLotInfos.add(outLotInfo);
}*/
}*//*
outLotInfoMap.put(cid, outLotInfos);
outLotInfoMap.put(cid, outLotInfos);
dataCache.updateCache(Constants.CACHE_outLotInfoMap, outLotInfoMap);
dataCache.updateCache(Constants.CACHE_outLotInfoMap, outLotInfoMap);
}
}
...
@@ -146,7 +153,9 @@ public class OutLotInfoCache {
...
@@ -146,7 +153,9 @@ public class OutLotInfoCache {
List<OutLotInfo> newOutLotInfos = new ArrayList<>();
List<OutLotInfo> newOutLotInfos = new ArrayList<>();
List<OutLotInfo> outLotInfoValues = outLotInfoEntry.getValue();
List<OutLotInfo> outLotInfoValues = outLotInfoEntry.getValue();
for (OutLotInfo outLotInfoValue : outLotInfoValues) {
for (OutLotInfo outLotInfoValue : outLotInfoValues) {
if
(
outLotInfoValue
.
getRfid
().
startsWith
(
rfid
)
/*&& outLotInfoValue.getOutlet().equals(outlet)*/
)
{
if (outLotInfoValue.getRfid().startsWith(rfid) */
/*&& outLotInfoValue.getOutlet().equals(outlet)*//*
) {
outLotInfo = outLotInfoValue;
outLotInfo = outLotInfoValue;
} else {
} else {
newOutLotInfos.add(outLotInfoValue);
newOutLotInfos.add(outLotInfoValue);
...
@@ -173,3 +182,4 @@ public class OutLotInfoCache {
...
@@ -173,3 +182,4 @@ public class OutLotInfoCache {
OutLotInfoCache.dataCache = dataCache;
OutLotInfoCache.dataCache = dataCache;
}
}
}
}
*/
src/main/java/com/neotel/smfcore/custom/lizhen/innerBox/util/StorageExportUtil.java
0 → 100644
查看文件 @
d89842e
package
com
.
neotel
.
smfcore
.
custom
.
lizhen
.
innerBox
.
util
;
import
com.neotel.smfcore.common.utils.StringUtils
;
import
com.neotel.smfcore.core.device.util.DataCache
;
import
com.neotel.smfcore.custom.lizhen.innerBox.bean.StorageExport
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Component
;
import
javax.annotation.PostConstruct
;
import
java.util.Map
;
import
java.util.concurrent.ConcurrentHashMap
;
@Component
public
class
StorageExportUtil
{
private
static
DataCache
dataCache
;
@Autowired
void
setDataCache
(
DataCache
cache
)
{
dataCache
=
cache
;
}
//出料口名称
private
final
String
[]
exportStr
=
new
String
[]{
"MU1_1"
,
"MU1_2"
,
"MU2_1"
,
"MU4_1"
,
"MU4_2"
,
"MU5_1"
,
"MU5_2"
};
//料仓前缀
private
static
final
String
EXPORT_PREFIX
=
"Storage_Export"
;
//出口信息缓存
private
static
Map
<
String
,
StorageExport
>
exportMap
=
new
ConcurrentHashMap
<>();
//初始化出料口信息
@PostConstruct
void
initExport
()
{
for
(
String
export
:
exportStr
)
{
StorageExport
storageExport
=
dataCache
.
getCache
(
EXPORT_PREFIX
+
"_"
+
export
);
if
(
storageExport
==
null
)
{
storageExport
=
new
StorageExport
();
}
exportMap
.
put
(
export
,
storageExport
);
}
}
//根据工单号,获取目的地信息
public
static
synchronized
String
getExportByOrderNo
(
String
orderNo
)
{
if
(
StringUtils
.
isBlank
(
orderNo
))
{
return
""
;
}
String
exportStr
=
""
;
//判断是否有相同工单
for
(
Map
.
Entry
<
String
,
StorageExport
>
entry
:
exportMap
.
entrySet
())
{
StorageExport
export
=
entry
.
getValue
();
if
(
orderNo
.
equals
(
export
.
getHSerial
()))
{
exportStr
=
entry
.
getKey
();
break
;
}
}
//判断是否为新工单
if
(
StringUtils
.
isBlank
(
exportStr
))
{
for
(
Map
.
Entry
<
String
,
StorageExport
>
entry
:
exportMap
.
entrySet
())
{
StorageExport
export
=
entry
.
getValue
();
if
(
StringUtils
.
isBlank
(
export
.
getHSerial
())){
exportStr
=
entry
.
getKey
();
break
;
}
}
}
return
exportStr
;
}
//清空出料口信息
public
static
void
clearExport
(
String
key
)
{
if
(
exportMap
.
get
(
key
)
!=
null
)
{
StorageExport
storageExport
=
new
StorageExport
();
exportMap
.
put
(
key
,
storageExport
);
dataCache
.
updateCache
(
EXPORT_PREFIX
+
"_"
+
key
,
storageExport
);
}
}
//更新出料口信息
public
static
void
updateExport
(
String
key
,
String
hSerial
,
String
line
,
int
remainTaskCount
)
{
StorageExport
storageExport
=
exportMap
.
get
(
key
);
if
(
storageExport
!=
null
)
{
if
(
StringUtils
.
isNotBlank
(
hSerial
))
{
storageExport
.
setHSerial
(
hSerial
);
}
if
(
StringUtils
.
isNotBlank
(
line
))
{
storageExport
.
setLine
(
line
);
}
storageExport
.
setRemainTaskCount
(
remainTaskCount
);
exportMap
.
put
(
key
,
storageExport
);
dataCache
.
updateCache
(
EXPORT_PREFIX
+
"_"
+
key
,
storageExport
);
}
}
//获取出料口信息
public
static
StorageExport
getExport
(
String
key
)
{
StorageExport
storageExport
=
exportMap
.
get
(
key
);
if
(
storageExport
==
null
)
{
storageExport
=
new
StorageExport
();
}
return
storageExport
;
}
}
src/main/java/com/neotel/smfcore/custom/lizhen/report/bacheng/BCReportController.java
0 → 100644
查看文件 @
d89842e
此文件的差异被折叠,
点击展开。
src/main/java/com/neotel/smfcore/custom/lizhen/report/bacheng/bean/dto/BCChange.java
0 → 100644
查看文件 @
d89842e
package
com
.
neotel
.
smfcore
.
custom
.
lizhen
.
report
.
bacheng
.
bean
.
dto
;
import
lombok.Data
;
import
java.util.Date
;
/**
* 异动报表
*/
@Data
public
class
BCChange
{
//厂别
private
String
plant
;
//厂区
private
String
factory
;
//库别
private
String
warehouseCode
;
//料号
private
String
partNumber
;
//物料描述
private
String
describe
;
//异动数量
private
int
num
;
//卷数
private
int
reelAmount
;
//储位
private
String
posName
;
//异动类型
private
String
type
;
//ID NO
private
String
barcode
;
//LOT
private
String
batch
;
//D/C
private
String
dateCode
;
//厂商
private
String
provider
;
//厂商代码
private
String
providerNumber
;
//Keeper
private
String
keeperCode
;
//事务日期
private
Date
createDate
;
//工号
private
String
creator
;
}
src/main/java/com/neotel/smfcore/custom/lizhen/report/bacheng/bean/dto/BCExpire.java
0 → 100644
查看文件 @
d89842e
package
com
.
neotel
.
smfcore
.
custom
.
lizhen
.
report
.
bacheng
.
bean
.
dto
;
import
lombok.Data
;
import
java.util.Date
;
@Data
public
class
BCExpire
{
/**
* 厂别
*/
private
String
plant
;
/**
* 厂区
*/
private
String
factory
;
/**
* 料号
*/
private
String
partNumber
;
/**
* 描述
*/
private
String
describe
;
/**
* ID NO
*/
private
String
barcode
;
/**
* 储位
*/
private
String
posName
;
/**
* 数量
*/
private
int
amount
;
/**
* 卷数
*/
private
int
reelAmount
=
1
;
/**
* 厂商
*/
private
String
provider
;
/**
* lot
*/
private
String
batch
=
""
;
/**
* d/c
*/
private
String
dateCode
;
/**
* keeper
*/
private
String
keeperCode
;
/**
* 物料保质期(年)
*/
private
int
expireYear
=
1
;
/**
* 过期天数
*/
private
long
expireDays
;
/**
* 过期时间
*/
private
Date
expireDate
;
/**
* 备注
*/
private
String
remark
;
/**
* 库别
*/
private
String
warehouseCode
;
}
src/main/java/com/neotel/smfcore/custom/lizhen/report/bacheng/bean/dto/BCInventory.java
0 → 100644
查看文件 @
d89842e
package
com
.
neotel
.
smfcore
.
custom
.
lizhen
.
report
.
bacheng
.
bean
.
dto
;
import
lombok.Data
;
import
java.util.Date
;
@Data
public
class
BCInventory
{
/**
* 厂别
*/
private
String
plant
;
/**
* 厂区
*/
private
String
factory
;
/**
* 库别
*/
private
String
warehouseCode
;
/**
* 料号
*/
private
String
partNumber
;
/**
* 描述
*/
private
String
describe
;
/**
* ID NO
*/
private
String
barcode
;
/**
* 储位
*/
private
String
posName
;
/**
* 数量
*/
private
int
amount
;
/**
* 卷数
*/
private
int
reelAmount
=
1
;
/**
* 厂商
*/
private
String
provider
;
/**
* lot
*/
private
String
batch
=
""
;
/**
* d/c
*/
private
String
dateCode
;
/**
* keeper
*/
private
String
keeperCode
;
/**
* 禁用信息
*/
private
String
disableMsg
;
/**
* 入库时间
*/
private
Date
putInDate
;
/**
* 工号
*/
private
String
creator
;
}
src/main/java/com/neotel/smfcore/custom/lizhen/report/bacheng/bean/query/BcQuery.java
0 → 100644
查看文件 @
d89842e
package
com
.
neotel
.
smfcore
.
custom
.
lizhen
.
report
.
bacheng
.
bean
.
query
;
import
com.neotel.smfcore.common.annotation.QueryCondition
;
import
com.neotel.smfcore.common.bean.BetweenData
;
import
lombok.Data
;
import
org.springframework.format.annotation.DateTimeFormat
;
import
java.util.Date
;
@Data
public
class
BcQuery
{
@QueryCondition
(
blurry
=
"barcode.partNumber,partNumber"
)
private
String
pn
;
@QueryCondition
(
blurry
=
"barcode.partNumber"
)
private
String
partNumber
;
@QueryCondition
(
blurry
=
"barcode.provider"
)
private
String
provider
;
@QueryCondition
(
blurry
=
"barcode.warehouseCode,warehouseCode"
)
private
String
warehouseCode
;
@QueryCondition
(
blurry
=
"posName"
)
private
String
posName
;
@QueryCondition
(
blurry
=
"barcode.barcode,barcode"
)
private
String
barcode
;
@QueryCondition
(
blurry
=
"barcode.dateCode"
)
private
String
dateCode
;
@QueryCondition
(
blurry
=
"barcode.batch"
)
private
String
batch
;
@QueryCondition
(
blurry
=
"barcode.keeperCode"
)
private
String
keeperCode
;
@QueryCondition
(
propName
=
"extendType"
,
type
=
QueryCondition
.
Type
.
EQ
)
private
Integer
extendType
;
@QueryCondition
(
type
=
QueryCondition
.
Type
.
BETWEEN
,
propName
=
"updateDate"
)
@DateTimeFormat
(
pattern
=
"yyyy-MM-dd"
)
private
BetweenData
<
Date
>
updateDate
;
}
src/main/java/com/neotel/smfcore/custom/lizhen/report/inner/InnerReportController.java
查看文件 @
d89842e
...
@@ -537,7 +537,7 @@ public class InnerReportController {
...
@@ -537,7 +537,7 @@ public class InnerReportController {
@AnonymousAccess
@AnonymousAccess
public
PageData
disable
(
ReportQueryCondition
queryCondition
,
Pageable
pageable
)
{
public
PageData
disable
(
ReportQueryCondition
queryCondition
,
Pageable
pageable
)
{
Query
query
=
QueryHelp
.
getQuery
(
queryCondition
);
Query
query
=
QueryHelp
.
getQuery
(
queryCondition
);
query
.
addCriteria
(
Criteria
.
where
(
"disableMsg"
).
nin
(
""
).
exists
(
true
));
query
.
addCriteria
(
Criteria
.
where
(
"disableMsg"
).
nin
(
""
).
exists
(
true
)
.
and
(
"posName"
).
ne
(
""
).
exists
(
true
)
);
PageData
<
BarcodeDto
>
resultData
=
new
PageData
<>();
PageData
<
BarcodeDto
>
resultData
=
new
PageData
<>();
if
(
pageable
!=
null
)
{
if
(
pageable
!=
null
)
{
PageData
<
Barcode
>
data
=
barcodeManager
.
findByPage
(
query
,
pageable
);
PageData
<
Barcode
>
data
=
barcodeManager
.
findByPage
(
query
,
pageable
);
...
...
src/main/resources/config/application.yml
查看文件 @
d89842e
...
@@ -3,20 +3,26 @@ server:
...
@@ -3,20 +3,26 @@ server:
api
:
api
:
name
:
Lizhen
name
:
Lizhen
inCheckUrl
:
#http://1
72.30.170.148
:8001/Npm/WmsCheckReelfob #禁用料
inCheckUrl
:
#http://1
0.190.25.124
:8001/Npm/WmsCheckReelfob #禁用料
batchCheckUrl
:
#http://172.30.60.117:8001/Npm/WmsCheckReelfob_Batch #批量禁用料
batchCheckUrl
:
#http://172.30.60.117:8001/Npm/WmsCheckReelfob_Batch #批量禁用料
outNotifyUrl
:
#http://172.30.170.148:8082/SmtAutoWH/Save2DReelInfo #保存物料(外仓配置)
outNotifyUrl
:
#http://172.30.170.148:8082/SmtAutoWH/Save2DReelInfo #保存物料(外仓配置)
outNotifyUrlPK
:
#http://172.30.170.148:8001/Sct/SaveReelInfo #PK发料保存(外仓配置)
outNotifyUrlPK
:
#http://172.30.170.148:8001/Sct/SaveReelInfo #PK发料保存(外仓配置)
inNotifyUrl
:
#http://1
72.30.170.148
:8082/SmtAutoWH/Save2DReelInfo #保存物料(内仓配置)
inNotifyUrl
:
#http://1
0.190.25.124
:8082/SmtAutoWH/Save2DReelInfo #保存物料(内仓配置)
fetchOrderUrl
:
#http://172.30.170.148:8082/SmtAutoWH/GetWoPickingList #获取工单
fetchOrderUrl
:
#http://172.30.170.148:8082/SmtAutoWH/GetWoPickingList #获取工单
barcodeInfoUrl
:
#http://1
72.30.170.148
:8001/Sct/GetReelInfo #mes数量
barcodeInfoUrl
:
#http://1
0.190.25.124
:8001/Sct/GetReelInfo #mes数量
fetchGRUrl
:
#http://10.42.25.199:8082/api/wcs/fetchGR #gr标签
fetchGRUrl
:
#http://10.42.25.199:8082/api/wcs/fetchGR #gr标签
brandQtyUrl
:
#http://172.30.170.199:8082/api/wcs/brandQty #gr标签满卷数
brandQtyUrl
:
#http://172.30.170.199:8082/api/wcs/brandQty #gr标签满卷数
importUrl
:
#http://10.42.222.52:8001/smf-core/ext/forward/getDataLogs #内仓导入外仓picking虚拟仓数据
importUrl
:
#http://10.42.222.52:8001/smf-core/ext/forward/getDataLogs #内仓导入外仓picking虚拟仓数据
checkReelMeasure
:
#http://172.30.60.117:8001/Sct/CheckReelMeasure #外仓散料仓量测接口
checkReelMeasure
:
#http://10.190.25.149:8001/Sct/CheckReelMeasure #散料量测接口
plant
:
W337
plant
:
werks
:
W337
werks
:
outerFactory
:
B15
outerFactory
:
bc
:
plant
:
2810
factory
:
B3
#缺料预警对应的地址
#缺料预警对应的地址
lizhen
:
lizhen
:
...
@@ -32,6 +38,11 @@ lizhen:
...
@@ -32,6 +38,11 @@ lizhen:
name
:
5F
name
:
5F
line
:
A05-5FSMT-13S,A05-5FSMT-03S,A05-5FSMT-02S,A05-5FSMT-12S
#,A05-5FARF-06,A05-5FSMT-01S,A05-5FSMT-11S
line
:
A05-5FSMT-13S,A05-5FSMT-03S,A05-5FSMT-02S,A05-5FSMT-12S
#,A05-5FARF-06,A05-5FSMT-01S,A05-5FSMT-11S
url
:
http://172.30.97.63:8001/smf-core/api/Mes/machineCallMaterial
url
:
http://172.30.97.63:8001/smf-core/api/Mes/machineCallMaterial
F4
:
name
:
4F
line
:
B03-4FSMT-11,B03-4FSMT-01,B03-4FSMT-13,B03-4FSMT-14,B03-4FSMT-03,B03-4FSMT-04,B03-4FSMT-12,B03-4FSMT-02
url
:
http://172.25.252.12:8001/smf-core/api/Mes/machineCallMaterial
#转发地址
#转发地址
forward
:
forward
:
...
@@ -87,5 +98,5 @@ app:
...
@@ -87,5 +98,5 @@ app:
type
:
"
"
type
:
"
"
menu
:
menu
:
show
:
show
:
menu,workOrder,virWarehous,warehouseMaintenance,innerInventory,expiredReport,menu,innerChangeReport,innerProLimitReport
hide
:
hide
:
\ No newline at end of file
\ No newline at end of file
编写
预览
支持
Markdown
格式
附加文件
你添加了
0
人
到此讨论。请谨慎行事。
Finish editing this message first!
Cancel
请
注册
或
登录
后发表评论