Skip to content
切换导航条
切换导航条
当前项目
正在载入...
登录
孙克
/
smf-core
转到一个项目
切换导航栏
切换导航栏固定状态
项目
群组
代码片段
帮助
项目
活动
版本库
流水线
图表
问题
0
合并请求
0
维基
网络
创建新的问题
作业
提交
问题看板
文件
提交
网络
比较
分支
标签
Commit ab35d3a4
由
张少辉
编写于
2026-03-13 10:40:47 +0800
浏览文件
选项
浏览文件
标签
下载
电子邮件补丁
差异文件
1.增加电子仓货架料箱手动出入库
1 个父辈
73a53585
隐藏空白字符变更
内嵌
并排
正在显示
8 个修改的文件
包含
408 行增加
和
3 行删除
src/main/java/com/neotel/smfcore/core/storage/enums/CORRESPONDING_WAREHOUSE.java
src/main/java/com/neotel/smfcore/core/system/util/TaskService.java
src/main/java/com/neotel/smfcore/custom/aiqingzhiyin1643/Aiqingzhiyin1643Menu.java
src/main/java/com/neotel/smfcore/custom/aiqingzhiyin1643/electronicWarehouse/rest/ScanInBoxController.java
src/main/java/com/neotel/smfcore/custom/aiqingzhiyin1643/electronicWarehouse/rest/ScanOutBoxController.java
src/main/java/com/neotel/smfcore/custom/aiqingzhiyin1643/electronicWarehouse/service/manager/impl/MaterialLossManagerImpl.java
src/main/resources/config/application.yml
src/test/java/com/neotel/smfcore/ApplicationTests.java
src/main/java/com/neotel/smfcore/core/storage/enums/CORRESPONDING_WAREHOUSE.java
查看文件 @
ab35d3a
...
...
@@ -11,4 +11,6 @@ public class CORRESPONDING_WAREHOUSE {
//成品仓
public
static
final
int
FINISHED_GOODS_WAREHOUSE
=
2
;
//电子仓货架
public
static
final
int
ELECTRONIC_WAREHOUSE_BOX
=
3
;
}
src/main/java/com/neotel/smfcore/core/system/util/TaskService.java
查看文件 @
ab35d3a
...
...
@@ -196,7 +196,7 @@ public class TaskService {
* @param task
*/
public
void
updateFinishedTask
(
DataLog
task
)
{
dataLogDao
.
save
(
task
);
task
=
dataLogDao
.
save
(
task
);
theFinishedTaskMap
.
put
(
task
.
getId
(),
task
);
tiggerTaskChangeListener
(
task
);
}
...
...
src/main/java/com/neotel/smfcore/custom/aiqingzhiyin1643/Aiqingzhiyin1643Menu.java
查看文件 @
ab35d3a
...
...
@@ -26,6 +26,10 @@ public class Aiqingzhiyin1643Menu {
public
void
init
(){
String
menuLabel
=
"1643"
;
Menu
elecWarehouse
=
Menu
.
CreatePMenu
(
"电子仓管理"
,
3
,
"elecWarehouse"
,
"elecWarehouse"
,
null
);
MenuInit
.
addMenu
(
menuLabel
,
elecWarehouse
,
1
,
"扫码入箱"
,
"scanInBox"
,
"neolight/scanInBox/index"
,
"scanInBox"
);
MenuInit
.
addMenu
(
menuLabel
,
elecWarehouse
,
2
,
"扫码出箱"
,
"scanOutBox"
,
"neolight/scanOutBox/index"
,
"scanOutBox"
);
Menu
finishedGoodsWarehouse
=
Menu
.
CreatePMenu
(
"成品仓管理"
,
4
,
"finishedGoodsWarehouse"
,
"FGStorage"
,
null
);
MenuInit
.
addMenu
(
menuLabel
,
finishedGoodsWarehouse
,
1
,
"上架"
,
"putAway"
,
"neolight/putAway/index"
,
"putAway"
);
MenuInit
.
addMenu
(
menuLabel
,
finishedGoodsWarehouse
,
2
,
"下架"
,
"putOut"
,
"neolight/putOut/index"
,
"putOut"
);
...
...
src/main/java/com/neotel/smfcore/custom/aiqingzhiyin1643/electronicWarehouse/rest/ScanInBoxController.java
0 → 100644
查看文件 @
ab35d3a
package
com
.
neotel
.
smfcore
.
custom
.
aiqingzhiyin1643
.
electronicWarehouse
.
rest
;
import
com.neotel.smfcore.common.bean.ResultBean
;
import
com.neotel.smfcore.common.exception.ValidateException
;
import
com.neotel.smfcore.common.utils.SecurityUtils
;
import
com.neotel.smfcore.common.utils.StringUtils
;
import
com.neotel.smfcore.core.barcode.bean.CodeBean
;
import
com.neotel.smfcore.core.barcode.enums.COMPONENT_TYPE
;
import
com.neotel.smfcore.core.barcode.rest.bean.dto.BarcodeDto
;
import
com.neotel.smfcore.core.barcode.rest.bean.mapstruct.BarcodeMapper
;
import
com.neotel.smfcore.core.barcode.service.manager.IBarcodeManager
;
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.Component
;
import
com.neotel.smfcore.core.barcode.utils.CodeResolve
;
import
com.neotel.smfcore.core.device.enums.OP
;
import
com.neotel.smfcore.core.device.enums.OP_STATUS
;
import
com.neotel.smfcore.core.device.util.DataCache
;
import
com.neotel.smfcore.core.storage.service.manager.IStoragePosManager
;
import
com.neotel.smfcore.core.storage.service.po.Storage
;
import
com.neotel.smfcore.core.storage.service.po.StoragePos
;
import
com.neotel.smfcore.core.system.service.po.DataLog
;
import
com.neotel.smfcore.core.system.util.TaskService
;
import
com.neotel.smfcore.security.annotation.AnonymousAccess
;
import
io.swagger.annotations.ApiOperation
;
import
lombok.extern.slf4j.Slf4j
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.PostMapping
;
import
org.springframework.web.bind.annotation.RequestBody
;
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
;
@Slf4j
@RequestMapping
(
"/scanInBox"
)
@RestController
public
class
ScanInBoxController
{
@Autowired
private
IBarcodeManager
barcodeManager
;
@Autowired
private
CodeResolve
codeResolve
;
@Autowired
private
IComponentManager
componentManager
;
@Autowired
private
TaskService
taskService
;
@Autowired
private
BarcodeMapper
barcodeMapper
;
@Autowired
private
IStoragePosManager
storagePosManager
;
@Autowired
private
DataCache
dataCache
;
@ApiOperation
(
"查询料箱信息"
)
@RequestMapping
(
"/boxInfo"
)
@AnonymousAccess
public
BarcodeDto
boxInfo
(
@RequestBody
String
code
){
CodeBean
codeBean
=
new
CodeBean
();
try
{
codeBean
=
codeResolve
.
resolveSingleCode
(
code
.
trim
(),
COMPONENT_TYPE
.
FIXTURE
);
}
catch
(
ValidateException
e
)
{
codeBean
.
setError
(
e
.
getMessage
());
}
if
(
codeBean
==
null
||
codeBean
.
getBarcode
()
==
null
)
{
throw
new
ValidateException
(
"smfcore.error.barcode.invalid"
,
"未找到有效的条码"
);
}
if
(
codeBean
.
getErrorCode
()
!=
null
)
{
throw
new
ValidateException
(
codeBean
.
getErrorCode
(),
codeBean
.
getError
(),
codeBean
.
getParams
());
}
List
<
BarcodeDto
>
codeDtos
=
new
ArrayList
<
BarcodeDto
>();
Barcode
barcode
=
codeBean
.
getBarcode
();
//此处需要判断是否是料盒
Component
component
=
componentManager
.
findOneByPN
(
barcode
.
getPartNumber
()
);
if
(
component
==
null
||(
component
.
getType
()!=
COMPONENT_TYPE
.
FIXTURE
)){
throw
new
ValidateException
(
"smfcore.materialBox.invalid"
,
"未找到料盒信息{0}"
,
new
String
[]{
code
});
}
//判断是否有任务,有任务直接完成,不清空库存信息
DataLog
dataLog
=
null
;
List
<
DataLog
>
allTasks
=
taskService
.
getAllTasks
();
for
(
DataLog
task
:
allTasks
)
{
if
(
task
.
isCheckOutTask
()
&&
!
task
.
isFinished
()
&&
!
task
.
isCancel
())
{
if
(
barcode
.
getBarcode
().
equals
(
task
.
getBarcode
())){
dataLog
=
task
;
break
;
}
}
}
if
(
dataLog
!=
null
){
throw
new
ValidateException
(
"smfcore.error.task.notFinished"
,
"料箱[{0}]还有未完成的任务"
,
new
String
[]{
barcode
.
getBarcode
()});
}
BarcodeDto
barcodeDto
=
barcodeMapper
.
toDto
(
barcode
);
if
(
barcodeDto
.
getSubCodeList
()==
null
){
barcodeDto
.
setSubCodeList
(
new
ArrayList
<>());
}
return
barcodeDto
;
}
@ApiOperation
(
"(唯一码)物料放入料盒中"
)
@PostMapping
(
value
=
"/reelToBox"
)
@AnonymousAccess
public
ResultBean
reelToBox
(
@RequestBody
Map
<
String
,
String
>
paramMap
)
{
String
code
=
paramMap
.
get
(
"barcode"
);
//料盒条码
String
operageStr
=
paramMap
.
get
(
"operatePN"
);
//操作信息
log
.
info
(
"收到物料放入料箱,boxStr:"
+
code
+
",operageStr:"
+
operageStr
);
//判断料箱是否存在
Barcode
barcode
=
barcodeManager
.
findByBarcode
(
code
);
if
(
barcode
==
null
)
{
throw
new
ValidateException
(
"smfcore.error.barcode.invalid"
,
"{0}不是有效的条码"
,
new
String
[]{
code
});
}
//判断是否在库位中
StoragePos
pos
=
storagePosManager
.
getByBarcode
(
barcode
.
getBarcode
());
if
(
pos
!=
null
)
{
throw
new
ValidateException
(
"smfcore.materialBox.inPos"
,
"料箱[{0}]已在库位[{1}]中"
,
new
String
[]{
barcode
.
getBarcode
(),
pos
.
getPosName
()});
}
//解析失败,直接报错
String
newCodeStr
=
"=1x1="
+
operageStr
;
CodeBean
codeBean
=
codeResolve
.
resolveSingleCode
(
newCodeStr
);
if
(!
codeBean
.
isValid
())
{
return
ResultBean
.
newErrorResult
(-
1
,
"smfcore.error.barcode.invalid"
,
"未找到有效的条码"
);
}
Barcode
subCode
=
codeBean
.
getBarcode
();
//判断是否存在其他料盒中
String
hostBarcodeId
=
subCode
.
getHostBarcodeId
();
if
(
StringUtils
.
isNotEmpty
(
hostBarcodeId
))
{
if
(!
hostBarcodeId
.
equals
(
barcode
.
getId
()))
{
Barcode
hostBarcode
=
barcodeManager
.
get
(
hostBarcodeId
);
if
(
hostBarcode
!=
null
)
{
throw
new
ValidateException
(
"smfcore.materialBox.inOtherBox"
,
"物料已在料盒{0}中"
,
new
String
[]{
hostBarcode
.
getBarcode
()});
}
}
}
//判断库位是否为空
String
posName
=
subCode
.
getPosName
();
if
(
StringUtils
.
isNotEmpty
(
posName
))
{
throw
new
ValidateException
(
"smfcore.materialBox.inPos"
,
"物料已在库位{0}中"
,
new
String
[]{
posName
});
}
subCode
.
setHostBarcodeId
(
barcode
.
getId
());
subCode
.
setPosName
(
barcode
.
getBarcode
());
subCode
.
setPutInTime
(
System
.
currentTimeMillis
());
barcodeManager
.
saveBarcode
(
subCode
);
barcode
=
finishTask
(
barcode
,
OP
.
PUT_IN
,
subCode
,
subCode
.
getAmount
(),
OP_STATUS
.
FINISHED
.
name
(),
subCode
.
getAmount
());
log
.
info
(
"条码"
+
subCode
.
getBarcode
()
+
"["
+
subCode
.
getPartNumber
()
+
"]入库到料盒["
+
barcode
.
getBarcode
()
+
"]数量:"
+
barcode
.
getAmount
());
return
ResultBean
.
newOkResult
(
barcodeMapper
.
toDto
(
barcode
));
}
private
Barcode
finishTask
(
Barcode
pidBarcode
,
int
opType
,
Barcode
subBarcode
,
int
opQty
,
String
status
,
int
amount
)
throws
ValidateException
{
String
orderItemId
=
subBarcode
.
getAppendData
(
"orderItemId"
);
String
orderNo
=
subBarcode
.
getAppendData
(
"orderNo"
);
String
orderId
=
subBarcode
.
getAppendData
(
"orderId"
);
subBarcode
.
updateAppendData
(
"orderItemId"
,
null
);
subBarcode
.
updateAppendData
(
"orderNo"
,
null
);
subBarcode
.
updateAppendData
(
"orderId"
,
null
);
subBarcode
.
updateAppendData
(
"awaiting"
,
null
);
barcodeManager
.
save
(
subBarcode
);
//更新barcode缓存
pidBarcode
.
UpdateSubCode
(
subBarcode
);
barcodeManager
.
save
(
subBarcode
);
barcodeManager
.
saveBarcode
(
pidBarcode
);
DataLog
task
=
new
DataLog
();
task
.
setStatus
(
status
);
task
.
setPartNumber
(
subBarcode
.
getPartNumber
());
task
.
setBarcode
(
subBarcode
.
getBarcode
());
task
.
setNum
(
opQty
);
task
.
setType
(
opType
);
task
.
setCid
(
pidBarcode
.
getPartNumber
());
task
.
setStorageName
(
pidBarcode
.
getBarcode
());
task
.
setPosName
(
pidBarcode
.
getBarcode
());
task
.
setOperator
(
SecurityUtils
.
getLoginUsername
());
if
(
StringUtils
.
isNotEmpty
(
orderItemId
))
{
task
.
setSubSourceId
(
orderItemId
);
}
if
(
StringUtils
.
isNotEmpty
(
orderNo
))
{
task
.
setSourceName
(
orderNo
);
}
if
(
StringUtils
.
isNotEmpty
(
orderId
))
{
task
.
setSourceId
(
orderId
);
}
taskService
.
updateFinishedTask
(
task
);
return
pidBarcode
;
}
}
src/main/java/com/neotel/smfcore/custom/aiqingzhiyin1643/electronicWarehouse/rest/ScanOutBoxController.java
0 → 100644
查看文件 @
ab35d3a
package
com
.
neotel
.
smfcore
.
custom
.
aiqingzhiyin1643
.
electronicWarehouse
.
rest
;
import
com.neotel.smfcore.common.bean.ResultBean
;
import
com.neotel.smfcore.common.exception.ValidateException
;
import
com.neotel.smfcore.common.utils.SecurityUtils
;
import
com.neotel.smfcore.common.utils.StringUtils
;
import
com.neotel.smfcore.core.barcode.bean.CodeBean
;
import
com.neotel.smfcore.core.barcode.enums.COMPONENT_TYPE
;
import
com.neotel.smfcore.core.barcode.rest.bean.dto.BarcodeDto
;
import
com.neotel.smfcore.core.barcode.rest.bean.mapstruct.BarcodeMapper
;
import
com.neotel.smfcore.core.barcode.service.manager.IBarcodeManager
;
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.Component
;
import
com.neotel.smfcore.core.barcode.utils.CodeResolve
;
import
com.neotel.smfcore.core.device.enums.OP
;
import
com.neotel.smfcore.core.device.enums.OP_STATUS
;
import
com.neotel.smfcore.core.device.util.DataCache
;
import
com.neotel.smfcore.core.storage.service.manager.IStoragePosManager
;
import
com.neotel.smfcore.core.storage.service.po.Storage
;
import
com.neotel.smfcore.core.storage.service.po.StoragePos
;
import
com.neotel.smfcore.core.system.service.po.DataLog
;
import
com.neotel.smfcore.core.system.util.TaskService
;
import
com.neotel.smfcore.security.annotation.AnonymousAccess
;
import
io.swagger.annotations.ApiOperation
;
import
lombok.extern.slf4j.Slf4j
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.PostMapping
;
import
org.springframework.web.bind.annotation.RequestBody
;
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
;
@Slf4j
@RequestMapping
(
"/scanOutBox"
)
@RestController
public
class
ScanOutBoxController
{
@Autowired
private
IBarcodeManager
barcodeManager
;
@Autowired
private
CodeResolve
codeResolve
;
@Autowired
private
IComponentManager
componentManager
;
@Autowired
private
TaskService
taskService
;
@Autowired
private
BarcodeMapper
barcodeMapper
;
@Autowired
private
IStoragePosManager
storagePosManager
;
@Autowired
private
DataCache
dataCache
;
@ApiOperation
(
"查询料箱信息"
)
@RequestMapping
(
"/boxInfo"
)
@AnonymousAccess
public
BarcodeDto
boxInfo
(
@RequestBody
String
code
)
{
CodeBean
codeBean
=
new
CodeBean
();
try
{
codeBean
=
codeResolve
.
resolveSingleCode
(
code
.
trim
(),
COMPONENT_TYPE
.
FIXTURE
);
}
catch
(
ValidateException
e
)
{
codeBean
.
setError
(
e
.
getMessage
());
}
if
(
codeBean
==
null
||
codeBean
.
getBarcode
()
==
null
)
{
throw
new
ValidateException
(
"smfcore.error.barcode.invalid"
,
"未找到有效的条码"
);
}
if
(
codeBean
.
getErrorCode
()
!=
null
)
{
throw
new
ValidateException
(
codeBean
.
getErrorCode
(),
codeBean
.
getError
(),
codeBean
.
getParams
());
}
List
<
BarcodeDto
>
codeDtos
=
new
ArrayList
<
BarcodeDto
>();
Barcode
barcode
=
codeBean
.
getBarcode
();
//此处需要判断是否是料盒
Component
component
=
componentManager
.
findOneByPN
(
barcode
.
getPartNumber
());
if
(
component
==
null
||
(
component
.
getType
()
!=
COMPONENT_TYPE
.
FIXTURE
))
{
throw
new
ValidateException
(
"smfcore.materialBox.invalid"
,
"未找到料盒信息{0}"
,
new
String
[]{
code
});
}
//判断是否有任务,有任务直接完成,不清空库存信息
DataLog
dataLog
=
null
;
List
<
DataLog
>
allTasks
=
taskService
.
getAllTasks
();
for
(
DataLog
task
:
allTasks
)
{
if
(
task
.
isCheckOutTask
()
&&
!
task
.
isFinished
()
&&
!
task
.
isCancel
())
{
if
(
barcode
.
getBarcode
().
equals
(
task
.
getBarcode
()))
{
dataLog
=
task
;
break
;
}
}
}
if
(
dataLog
!=
null
)
{
throw
new
ValidateException
(
"smfcore.error.task.notFinished"
,
"料箱[{0}]还有未完成的任务"
,
new
String
[]{
barcode
.
getBarcode
()});
}
BarcodeDto
barcodeDto
=
barcodeMapper
.
toDto
(
barcode
);
if
(
barcodeDto
.
getSubCodeList
()
==
null
)
{
barcodeDto
.
setSubCodeList
(
new
ArrayList
<>());
}
return
barcodeDto
;
}
@ApiOperation
(
"物料从料盒中取出(唯一码出库)"
)
@PostMapping
(
value
=
"/reelFromBox"
)
//@AnonymousAccess
public
ResultBean
reelFromBox
(
@RequestBody
Map
<
String
,
String
>
paramMap
)
{
String
code
=
paramMap
.
get
(
"barcode"
);
//料盒条码
String
operageStr
=
paramMap
.
get
(
"operatePN"
);
//操作信息
//判断料箱是不是有效的参数
Barcode
barcode
=
barcodeManager
.
findByBarcode
(
code
);
if
(
barcode
==
null
)
{
throw
new
ValidateException
(
"smfcore.error.barcode.invalid"
,
"{0}不是有效的条码"
,
new
String
[]{
code
});
}
//判断是否在库位中
StoragePos
pos
=
storagePosManager
.
getByBarcode
(
barcode
.
getBarcode
());
if
(
pos
!=
null
)
{
throw
new
ValidateException
(
"smfcore.materialBox.inPos"
,
"料箱[{0}]已在库位[{1}]中"
,
new
String
[]{
barcode
.
getBarcode
(),
pos
.
getPosName
()});
}
//判断输入的条码是否正确
CodeBean
codeBean
=
codeResolve
.
resolveSingleCode
(
"=1x1="
+
operageStr
);
if
(!
codeBean
.
isValid
())
{
throw
new
ValidateException
(
"smfcore.error.barcode.invalid"
,
"{0}不是有效的条码"
,
new
String
[]{
operageStr
});
}
Barcode
subBarcode
=
codeBean
.
getBarcode
();
int
opQty
=
subBarcode
.
getAmount
();
//判断是否在此料箱中
String
hostBarcodeId
=
subBarcode
.
getHostBarcodeId
();
if
(
StringUtils
.
isEmpty
(
hostBarcodeId
))
{
throw
new
ValidateException
(
"smfcore.materialBox.noReel"
,
"料盒中未找到对应物料"
);
}
if
(!
hostBarcodeId
.
equals
(
barcode
.
getId
()))
{
Barcode
hostBarcode
=
barcodeManager
.
get
(
hostBarcodeId
);
if
(
hostBarcode
!=
null
)
{
throw
new
ValidateException
(
"smfcore.materialBox.inOtherBox"
,
"物料已在料盒{0}中"
,
new
String
[]{
hostBarcode
.
getBarcode
()});
}
}
int
amount
=
subBarcode
.
getAmount
();
int
qty
=
amount
-
opQty
;
if
(
qty
<
0
)
{
qty
=
0
;
}
Integer
awaitingNum
=
subBarcode
.
getAppendData
(
"awaiting"
);
if
(
awaitingNum
!=
null
)
{
if
(
opQty
<
awaitingNum
)
{
throw
new
ValidateException
(
"smfcore.virtual.quantityError"
,
"取出数量应为[{0}]"
,
new
String
[]{
awaitingNum
+
""
});
}
}
//出库
subBarcode
.
setAmount
(
qty
);
subBarcode
=
barcodeManager
.
save
(
subBarcode
);
barcode
=
finishTask
(
barcode
,
OP
.
CHECKOUT
,
subBarcode
,
opQty
,
OP_STATUS
.
FINISHED
.
name
(),
amount
);
log
.
info
(
"条码"
+
subBarcode
.
getBarcode
()
+
"["
+
subBarcode
.
getPartNumber
()
+
"]从料盒["
+
barcode
.
getBarcode
()
+
"]出库,数量:"
+
qty
);
return
ResultBean
.
newOkResult
(
""
);
}
private
Barcode
finishTask
(
Barcode
pidBarcode
,
int
opType
,
Barcode
subBarcode
,
int
opQty
,
String
status
,
int
amount
)
throws
ValidateException
{
String
orderItemId
=
subBarcode
.
getAppendData
(
"orderItemId"
);
String
orderNo
=
subBarcode
.
getAppendData
(
"orderNo"
);
String
orderId
=
subBarcode
.
getAppendData
(
"orderId"
);
subBarcode
.
updateAppendData
(
"orderItemId"
,
null
);
subBarcode
.
updateAppendData
(
"orderNo"
,
null
);
subBarcode
.
updateAppendData
(
"orderId"
,
null
);
subBarcode
.
updateAppendData
(
"awaiting"
,
null
);
barcodeManager
.
save
(
subBarcode
);
//更新barcode缓存
pidBarcode
.
UpdateSubCode
(
subBarcode
);
subBarcode
.
setHostBarcodeId
(
""
);
subBarcode
.
setPosName
(
""
);
subBarcode
.
setAmount
(
amount
);
barcodeManager
.
save
(
subBarcode
);
barcodeManager
.
saveBarcode
(
pidBarcode
);
DataLog
task
=
new
DataLog
();
task
.
setStatus
(
status
);
task
.
setPartNumber
(
subBarcode
.
getPartNumber
());
task
.
setBarcode
(
subBarcode
.
getBarcode
());
task
.
setNum
(
opQty
);
task
.
setType
(
opType
);
task
.
setCid
(
pidBarcode
.
getPartNumber
());
task
.
setStorageName
(
pidBarcode
.
getBarcode
());
task
.
setPosName
(
pidBarcode
.
getBarcode
());
task
.
setOperator
(
SecurityUtils
.
getLoginUsername
());
if
(
StringUtils
.
isNotEmpty
(
orderItemId
))
{
task
.
setSubSourceId
(
orderItemId
);
}
if
(
StringUtils
.
isNotEmpty
(
orderNo
))
{
task
.
setSourceName
(
orderNo
);
}
if
(
StringUtils
.
isNotEmpty
(
orderId
))
{
task
.
setSourceId
(
orderId
);
}
taskService
.
updateFinishedTask
(
task
);
return
pidBarcode
;
}
}
src/main/java/com/neotel/smfcore/custom/aiqingzhiyin1643/electronicWarehouse/service/manager/impl/MaterialLossManagerImpl.java
查看文件 @
ab35d3a
...
...
@@ -81,6 +81,9 @@ public class MaterialLossManagerImpl implements IMaterialLossManager {
public
void
savaOrUpdate
(
DataLog
task
)
{
String
cid
=
task
.
getCid
();
Storage
storage
=
dataCache
.
getStorage
(
cid
);
if
(
storage
==
null
){
return
;
}
if
(
storage
.
getCorrespondingWarehouse
()
!=
CORRESPONDING_WAREHOUSE
.
ELECTRONIC_WAREHOUSE
){
return
;
}
...
...
src/main/resources/config/application.yml
查看文件 @
ab35d3a
...
...
@@ -66,7 +66,7 @@ app:
type
:
"
"
menu
:
show
:
lossReport
show
:
lossReport
,scanInBox,scanOutBox
hide
:
smd
:
...
...
src/test/java/com/neotel/smfcore/ApplicationTests.java
查看文件 @
ab35d3a
...
...
@@ -28,7 +28,7 @@ public class ApplicationTests {
private
void
saveLanguageFile
(
String
type
){
try
{
String
url
=
"http://192.168.1.2
42
/smf-core/api/translation/getLanguageMsgList"
;
String
url
=
"http://192.168.1.2
37
/smf-core/api/translation/getLanguageMsgList"
;
Map
<
String
,
Object
>
params
=
new
HashMap
<>();
params
.
put
(
"type"
,
type
);
System
.
out
.
println
(
"开始获取最新["
+
type
+
"]翻译资源..."
);
...
...
编写
预览
支持
Markdown
格式
附加文件
你添加了
0
人
到此讨论。请谨慎行事。
Finish editing this message first!
Cancel
请
注册
或
登录
后发表评论