Skip to content
切换导航条
切换导航条
当前项目
正在载入...
登录
孙克
/
smf-core
转到一个项目
切换导航栏
切换导航栏固定状态
项目
群组
代码片段
帮助
项目
活动
版本库
流水线
图表
问题
0
合并请求
0
维基
网络
创建新的问题
作业
提交
问题看板
文件
提交
网络
比较
分支
标签
Commit ad6cd77e
由
sunke
编写于
2022-07-15 15:04:49 +0800
浏览文件
选项
浏览文件
标签
下载
电子邮件补丁
差异文件
产线补料和补料料盘出库功能
1 个父辈
dd9699b8
全部展开
显示空白字符变更
内嵌
并排
正在显示
14 个修改的文件
包含
77 行增加
和
75 行删除
pom.xml
src/main/java/com/neotel/smfcore/common/init/DataInitManager.java
src/main/java/com/neotel/smfcore/common/utils/QueryHelp.java
src/main/java/com/neotel/smfcore/core/device/handler/impl/NLPShelfHandler.java
src/main/java/com/neotel/smfcore/core/order/LiteOrderCache.java
src/main/java/com/neotel/smfcore/core/order/rest/OrderController.java
src/main/java/com/neotel/smfcore/core/order/rest/RepleOrderController.java
src/main/java/com/neotel/smfcore/core/order/rest/bean/query/OrderQueryCondition.java
src/main/java/com/neotel/smfcore/core/order/service/po/LiteOrder.java
src/main/java/com/neotel/smfcore/core/outList/util/OutListCache.java
src/main/java/com/neotel/smfcore/core/system/rest/TaskController.java
src/main/java/com/neotel/smfcore/security/service/manager/IMenuManager.java
src/main/java/com/neotel/smfcore/security/service/manager/impl/MenuManagerImpl.java
src/main/java/com/neotel/smfcore/security/service/po/Menu.java
pom.xml
查看文件 @
ad6cd77
...
@@ -230,6 +230,11 @@
...
@@ -230,6 +230,11 @@
<artifactId>
commons-httpclient
</artifactId>
<artifactId>
commons-httpclient
</artifactId>
<version>
3.1
</version>
<version>
3.1
</version>
</dependency>
</dependency>
<dependency>
<groupId>
com.alibaba
</groupId>
<artifactId>
easyexcel
</artifactId>
<version>
3.1.1
</version>
</dependency>
</dependencies>
</dependencies>
...
...
src/main/java/com/neotel/smfcore/common/init/DataInitManager.java
查看文件 @
ad6cd77
此文件的差异被折叠,
点击展开。
src/main/java/com/neotel/smfcore/common/utils/QueryHelp.java
查看文件 @
ad6cd77
...
@@ -18,7 +18,8 @@ import java.util.regex.Pattern;
...
@@ -18,7 +18,8 @@ import java.util.regex.Pattern;
@Slf4j
@Slf4j
public
class
QueryHelp
{
public
class
QueryHelp
{
public
static
<
C
>
Query
getQuery
(
C
c
){
public
static
<
C
>
List
<
Criteria
>
toCriteria
(
C
c
){
//Criteria criteria = new Criteria();
//Criteria criteria = new Criteria();
List
<
Criteria
>
allCriteria
=
Lists
.
newArrayList
();
List
<
Criteria
>
allCriteria
=
Lists
.
newArrayList
();
if
(
c
!=
null
){
if
(
c
!=
null
){
...
@@ -135,6 +136,10 @@ public class QueryHelp {
...
@@ -135,6 +136,10 @@ public class QueryHelp {
log
.
error
(
e
.
getMessage
(),
e
);
log
.
error
(
e
.
getMessage
(),
e
);
}
}
}
}
return
allCriteria
;
}
public
static
<
C
>
Query
getQuery
(
C
c
){
List
<
Criteria
>
allCriteria
=
toCriteria
(
c
);
if
(
allCriteria
.
isEmpty
()){
if
(
allCriteria
.
isEmpty
()){
return
new
Query
();
return
new
Query
();
}
}
...
...
src/main/java/com/neotel/smfcore/core/device/handler/impl/NLPShelfHandler.java
查看文件 @
ad6cd77
...
@@ -261,11 +261,6 @@ public class NLPShelfHandler extends BaseDeviceHandler{
...
@@ -261,11 +261,6 @@ public class NLPShelfHandler extends BaseDeviceHandler{
return
ResultBean
.
newErrorResult
(-
1
,
"smfcore.shelfNotExist"
,
"{0}对应的料架不存在"
,
new
String
[]{
cid
}
);
return
ResultBean
.
newErrorResult
(-
1
,
"smfcore.shelfNotExist"
,
"{0}对应的料架不存在"
,
new
String
[]{
cid
}
);
}
}
String
groupId
=
storage
.
getGroupId
();
String
groupId
=
storage
.
getGroupId
();
// String groupName = "";
// Group group = groupManager.get(groupId);
// if(group != null){
// groupName = group.getGroupName();
// }
if
(
groupId
.
equals
(
""
)){
if
(
groupId
.
equals
(
""
)){
groupId
=
"-1"
;
groupId
=
"-1"
;
}
}
...
@@ -297,10 +292,9 @@ public class NLPShelfHandler extends BaseDeviceHandler{
...
@@ -297,10 +292,9 @@ public class NLPShelfHandler extends BaseDeviceHandler{
// }
// }
//数据库有信息,实际无料
//数据库有信息,实际无料
if
(
noReelPosErrorList
.
length
>
0
){
if
(
noReelPosErrorList
.
length
>
0
){
Query
query
=
new
Query
(
Criteria
.
where
(
"posName"
).
in
(
noReelPosErrorList
));
Query
query
=
new
Query
(
Criteria
.
where
(
"posName"
).
in
(
noReelPosErrorList
));
List
<
StoragePos
>
posList
=
storagePosManager
.
findByQuery
(
query
);
List
<
StoragePos
>
posList
=
storagePosManager
.
findByQuery
(
query
);
for
(
StoragePos
pos:
posList
for
(
StoragePos
pos:
posList
)
{
)
{
if
(!
pos
.
isUsed
()){
if
(!
pos
.
isUsed
()){
ngToOk
.
add
(
pos
.
getPosName
());
ngToOk
.
add
(
pos
.
getPosName
());
log
.
info
(
"sensorChange 客户端上传 noReelPosErrorList 库位["
+
pos
.
getPosName
()+
"]数据库无信息,放入ngToOk"
);
log
.
info
(
"sensorChange 客户端上传 noReelPosErrorList 库位["
+
pos
.
getPosName
()+
"]数据库无信息,放入ngToOk"
);
...
@@ -319,12 +313,9 @@ public class NLPShelfHandler extends BaseDeviceHandler{
...
@@ -319,12 +313,9 @@ public class NLPShelfHandler extends BaseDeviceHandler{
List
<
String
>
outNgList
=
new
ArrayList
<>();
List
<
String
>
outNgList
=
new
ArrayList
<>();
if
(
hasReelPosList
!=
null
){
if
(
hasReelPosList
!=
null
){
List
<
String
>
newList
=
new
ArrayList
<>();
List
<
String
>
newList
=
new
ArrayList
<>();
for
(
String
posName
:
for
(
String
posName
:
hasReelPosList
)
{
hasReelPosList
)
{
StoragePos
pos
=
storagePosManager
.
getByPosName
(
posName
);
StoragePos
pos
=
storagePosManager
.
getByPosName
(
posName
);
if
(
pos
==
null
)
{
if
(
pos
==
null
)
{
log
.
info
(
"sensorChange 未找到库位 hasReelPosList ["
+
posName
+
"]"
);
log
.
info
(
"sensorChange 未找到库位 hasReelPosList ["
+
posName
+
"]"
);
continue
;
continue
;
...
@@ -390,11 +381,11 @@ public class NLPShelfHandler extends BaseDeviceHandler{
...
@@ -390,11 +381,11 @@ public class NLPShelfHandler extends BaseDeviceHandler{
try
{
try
{
//判断是否是入库单入库
//判断是否是入库单入库
if
(
queueTask
.
getInType
()
==
5
)
{
if
(
queueTask
.
getInType
()
==
5
)
{
InList
inList
=
inListCache
.
getInList
(
queueTask
.
getSourceName
());
Barcode
barcode
=
barcodeManager
.
findByBarcode
(
queueTask
.
getBarcode
());
Barcode
barcode
=
barcodeManager
.
findByBarcode
(
queueTask
.
getBarcode
());
InListItem
item
=
inListCache
.
UpdateInList
(
queueTask
.
getSourceName
(),
pos
,
barcode
);
InListItem
item
=
inListCache
.
UpdateInList
(
queueTask
.
getSourceName
(),
pos
,
barcode
);
if
(
item
!=
null
)
{
if
(
item
!=
null
)
{
InList
inList
=
inListCache
.
getInList
(
queueTask
.
getSourceName
());
//入库完成,调用 7.2转储单入库过账接口
//入库完成,调用 7.2转储单入库过账接口
TransferOrderInInfo
inInfo
=
new
TransferOrderInInfo
(
inList
.
getName
(),
inList
.
getDocType
(),
queueTask
.
getBarcode
(),
item
.
getBaseCode
(),
item
.
getInLgort
(),
queueTask
.
getNum
());
TransferOrderInInfo
inInfo
=
new
TransferOrderInInfo
(
inList
.
getName
(),
inList
.
getDocType
(),
queueTask
.
getBarcode
(),
item
.
getBaseCode
(),
item
.
getInLgort
(),
queueTask
.
getNum
());
boolean
result
=
HikApi
.
transferOrderInApi
(
queueTask
.
getOperator
(),
inInfo
);
boolean
result
=
HikApi
.
transferOrderInApi
(
queueTask
.
getOperator
(),
inInfo
);
...
...
src/main/java/com/neotel/smfcore/core/order/LiteOrderCache.java
查看文件 @
ad6cd77
...
@@ -454,15 +454,15 @@ public class LiteOrderCache implements ITaskListener {
...
@@ -454,15 +454,15 @@ public class LiteOrderCache implements ITaskListener {
if
(
isShortageOut
)
{
if
(
isShortageOut
)
{
log
.
info
(
"工单["
+
cacheOrder
.
getOrderNo
()
+
"]缺料出库: 物料号["
+
pn
+
"] ,需求数量["
+
orderItem
.
getWemng
()
+
"], 未找到元器件信息 "
);
log
.
info
(
"工单["
+
cacheOrder
.
getOrderNo
()
+
"]缺料出库: 物料号["
+
pn
+
"] ,需求数量["
+
orderItem
.
getWemng
()
+
"], 未找到元器件信息 "
);
shortage
=
true
;
shortage
=
true
;
//判断库存 使用最小库存盘数:当前盘数<=最小库存盘数时,需要截料
if
(
component
.
getMinStoreNum
()>
0
&&
reelNum
<=
component
.
getMinStoreNum
()){
needJieliao
=
true
;
}
}
else
{
}
else
{
log
.
info
(
"工单["
+
cacheOrder
.
getOrderNo
()
+
"] 物料号["
+
pn
+
"] ,需求数量["
+
orderItem
.
getWemng
()
+
"], 未找到元器件信息, 缺料 "
);
log
.
info
(
"工单["
+
cacheOrder
.
getOrderNo
()
+
"] 物料号["
+
pn
+
"] ,需求数量["
+
orderItem
.
getWemng
()
+
"], 未找到元器件信息, 缺料 "
);
return
materialShortPro
(
userName
,
cacheOrder
);
return
materialShortPro
(
userName
,
cacheOrder
);
}
}
}
}
//判断库存 使用最小库存盘数:当前盘数<=最小库存盘数时,需要截料
if
(
component
.
getMinStoreNum
()>
0
&&
reelNum
<=
component
.
getMinStoreNum
()){
needJieliao
=
true
;
}
//判断库存数量是否小于需求数量,小于直接返回缺料
//判断库存数量是否小于需求数量,小于直接返回缺料
if
(
storageNum
<
orderItem
.
getQty
()){
if
(
storageNum
<
orderItem
.
getQty
()){
if
(
isShortageOut
){
if
(
isShortageOut
){
...
...
src/main/java/com/neotel/smfcore/core/order/rest/OrderController.java
查看文件 @
ad6cd77
...
@@ -145,6 +145,7 @@ public class OrderController {
...
@@ -145,6 +145,7 @@ public class OrderController {
query
.
addCriteria
(
Criteria
.
where
(
"status"
).
is
(
LITEORDER_STATUS
.
EXECUTING
));
query
.
addCriteria
(
Criteria
.
where
(
"status"
).
is
(
LITEORDER_STATUS
.
EXECUTING
));
}
}
}
}
query
.
addCriteria
(
Criteria
.
where
(
"replenishmentNo"
).
isNull
());
PageData
<
LiteOrder
>
orderList
=
liteOrderManager
.
findByPage
(
query
,
pageable
);
PageData
<
LiteOrder
>
orderList
=
liteOrderManager
.
findByPage
(
query
,
pageable
);
PageData
<
OrderDto
>
resultList
=
orderMapper
.
toDto
(
orderList
);
PageData
<
OrderDto
>
resultList
=
orderMapper
.
toDto
(
orderList
);
return
resultList
;
return
resultList
;
...
@@ -320,7 +321,7 @@ public class OrderController {
...
@@ -320,7 +321,7 @@ public class OrderController {
User
user
=
userManager
.
findByUserName
(
SecurityUtils
.
getCurrentUsername
());
User
user
=
userManager
.
findByUserName
(
SecurityUtils
.
getCurrentUsername
());
//查询正在执行的工单列表
//查询正在执行的工单列表
Query
query
=
new
Query
(
Criteria
.
where
(
"status"
).
is
(
LITEORDER_STATUS
.
EXECUTING
));
Query
query
=
new
Query
(
Criteria
.
where
(
"status"
).
is
(
LITEORDER_STATUS
.
EXECUTING
)
.
and
(
"replenishmentNo"
).
isNull
()
);
//根据开始出库时间排序
//根据开始出库时间排序
Sort
sort
=
Sort
.
by
(
Sort
.
Direction
.
ASC
,
"startOutTime"
);
Sort
sort
=
Sort
.
by
(
Sort
.
Direction
.
ASC
,
"startOutTime"
);
query
.
with
(
sort
);
query
.
with
(
sort
);
...
@@ -480,7 +481,7 @@ public class OrderController {
...
@@ -480,7 +481,7 @@ public class OrderController {
private
List
<
LiteOrder
>
getExecuteOrders
(
User
user
)
{
private
List
<
LiteOrder
>
getExecuteOrders
(
User
user
)
{
//查询正在执行的工单列表
//查询正在执行的工单列表
Query
query
=
new
Query
(
Criteria
.
where
(
"status"
).
is
(
LITEORDER_STATUS
.
EXECUTING
));
Query
query
=
new
Query
(
Criteria
.
where
(
"status"
).
is
(
LITEORDER_STATUS
.
EXECUTING
)
.
and
(
"replenishmentNo"
).
isNull
()
);
//根据开始出库时间排序
//根据开始出库时间排序
Sort
sort
=
Sort
.
by
(
Sort
.
Direction
.
ASC
,
"startOutTime"
);
Sort
sort
=
Sort
.
by
(
Sort
.
Direction
.
ASC
,
"startOutTime"
);
query
.
with
(
sort
);
query
.
with
(
sort
);
...
...
src/main/java/com/neotel/smfcore/core/order/rest/RepleOrderController.java
0 → 100644
查看文件 @
ad6cd77
此文件的差异被折叠,
点击展开。
src/main/java/com/neotel/smfcore/core/order/rest/bean/query/OrderQueryCondition.java
查看文件 @
ad6cd77
...
@@ -12,7 +12,7 @@ import java.util.List;
...
@@ -12,7 +12,7 @@ import java.util.List;
@Data
@Data
public
class
OrderQueryCondition
{
public
class
OrderQueryCondition
{
@QueryCondition
(
blurry
=
"orderNo,jobNo
,replenishmentNo
"
)
@QueryCondition
(
blurry
=
"orderNo,jobNo"
)
private
String
blurry
;
private
String
blurry
;
@QueryCondition
(
type
=
QueryCondition
.
Type
.
BETWEEN
)
@QueryCondition
(
type
=
QueryCondition
.
Type
.
BETWEEN
)
...
...
src/main/java/com/neotel/smfcore/core/order/service/po/LiteOrder.java
查看文件 @
ad6cd77
...
@@ -175,6 +175,16 @@ public class LiteOrder extends BasePo implements Serializable {
...
@@ -175,6 +175,16 @@ public class LiteOrder extends BasePo implements Serializable {
*/
*/
private
Boolean
complete
=
false
;
private
Boolean
complete
=
false
;
/**
* 包含的工单信息,存数据库
*/
private
List
<
String
>
subWknumList
;
/**
* 面别
*/
private
String
wktype
;
public
Integer
getBoxNum
(){
public
Integer
getBoxNum
(){
if
(
boxInfos
!=
null
){
if
(
boxInfos
!=
null
){
return
boxInfos
.
size
();
return
boxInfos
.
size
();
...
@@ -298,6 +308,8 @@ public class LiteOrder extends BasePo implements Serializable {
...
@@ -298,6 +308,8 @@ public class LiteOrder extends BasePo implements Serializable {
this
.
setUpdateDate
(
new
Date
());
this
.
setUpdateDate
(
new
Date
());
this
.
setEndDate
(
outInfo
.
getEndD
());
this
.
setEndDate
(
outInfo
.
getEndD
());
this
.
setWemng
(
outInfo
.
getWemng
());
this
.
setWemng
(
outInfo
.
getWemng
());
this
.
setWktype
(
outInfo
.
getWktype
());
this
.
setSubWknumList
(
outInfo
.
getSubWknumList
());
if
(
orderItems
==
null
){
if
(
orderItems
==
null
){
orderItems
=
new
ArrayList
<>();
orderItems
=
new
ArrayList
<>();
}
}
...
...
src/main/java/com/neotel/smfcore/core/outList/util/OutListCache.java
查看文件 @
ad6cd77
...
@@ -227,8 +227,8 @@ public class OutListCache implements ITaskListener {
...
@@ -227,8 +227,8 @@ public class OutListCache implements ITaskListener {
boolean
shortage
=
false
;
boolean
shortage
=
false
;
List
<
String
>
availableStorageIds
=
dataCache
.
getAvailableStorageIds
();
List
<
String
>
availableStorageIds
=
dataCache
.
getAvailableStorageIds
();
Map
<
String
,
List
<
StoragePos
>>
needOutPosMap
=
new
HashMap
<>();
//挑出的需要出库的料列表,key=
pn
,value=库位
Map
<
String
,
List
<
StoragePos
>>
needOutPosMap
=
new
HashMap
<>();
//挑出的需要出库的料列表,key=
itemId
,value=库位
Map
<
String
,
Integer
>
jieliaoPosMap
=
new
HashMap
<>();
//需要截料的物料列表,key=PosName,value=此转储出库单使用数量
List
<
String
>
itemPosNameList
=
new
ArrayList
<>();
//获取此转储出库单出库的所有物料
//获取此转储出库单出库的所有物料
for
(
OutListItem
outListItem
:
outList
.
getOutListItems
())
{
for
(
OutListItem
outListItem
:
outList
.
getOutListItems
())
{
String
pn
=
outListItem
.
getMaterialNo
();
String
pn
=
outListItem
.
getMaterialNo
();
...
@@ -241,9 +241,9 @@ public class OutListCache implements ITaskListener {
...
@@ -241,9 +241,9 @@ public class OutListCache implements ITaskListener {
//查找PN的所有库存,PN=pn,未锁定,qty 从大到小,入库时间正序
//查找PN的所有库存,PN=pn,未锁定,qty 从大到小,入库时间正序
List
<
StoragePos
>
posList
=
storagePosManager
.
findOrderItemInStorage
(
availableStorageIds
,
pn
,
taskService
.
excludePosIds
());
List
<
StoragePos
>
posList
=
storagePosManager
.
findOrderItemInStorage
(
availableStorageIds
,
pn
,
taskService
.
excludePosIds
());
log
.
info
(
"共找到"
+
posList
.
size
()+
"盘"
+
pn
+
"的物料"
);
int
storageNum
=
0
;
int
storageNum
=
0
;
for
(
StoragePos
pos
:
posList
for
(
StoragePos
pos
:
posList
)
{
)
{
storageNum
+=
pos
.
getBarcode
().
getAmount
();
storageNum
+=
pos
.
getBarcode
().
getAmount
();
}
}
...
@@ -271,59 +271,22 @@ public class OutListCache implements ITaskListener {
...
@@ -271,59 +271,22 @@ public class OutListCache implements ITaskListener {
}
}
List
<
StoragePos
>
itemPosList
=
new
ArrayList
<>();
List
<
StoragePos
>
itemPosList
=
new
ArrayList
<>();
List
<
String
>
itemPosNameList
=
new
ArrayList
<>();
//此PN未完成
//此PN未完成
int
targetNum
=
needNum
;
int
targetNum
=
needNum
;
for
(
int
i
=
0
;
i
<
posList
.
size
();
i
++
)
{
List
<
StoragePos
>
forPosList
=
new
ArrayList
<>();
for
(
StoragePos
pos
:
posList
)
{
if
(!
needOutPosMap
.
containsKey
(
pos
.
getPosName
()))
{
forPosList
.
add
(
pos
);
}
}
//循环剩余的库位,查找
//循环剩余的库位,查找
int
forIndex
=
-
1
;
//int forIndex = -1;
for
(
StoragePos
pos
:
for
(
StoragePos
pos
:
posList
)
{
forPosList
)
{
if
(!
itemPosNameList
.
contains
(
pos
.
getPosName
())){
forIndex
++;
boolean
isLast
=
(
forIndex
==
(
forPosList
.
size
()
-
1
));
//不需要截料,也不按照整盘比,按照数量满足或最后一盘来出
if
(
pos
.
getBarcode
().
getAmount
()
>=
targetNum
||
isLast
)
{
itemPosList
.
add
(
pos
);
itemPosList
.
add
(
pos
);
itemPosNameList
.
add
(
pos
.
getPosName
());
itemPosNameList
.
add
(
pos
.
getPosName
());
targetNum
-=
pos
.
getBarcode
().
getAmount
();
targetNum
-=
pos
.
getBarcode
().
getAmount
();
break
;
}
if
(
targetNum
<=
0
)
{
if
(
targetNum
<=
0
)
{
break
;
break
;
}
}
}
}
if
(
targetNum
<=
0
)
{
break
;
}
}
}
// StoragePos tempPos = null;
// for (StoragePos pos :
// posList) {
// //已经在出库列表
// if (itemPosNameList.contains(pos.getPosName())) {
// continue;
// }
// //不需要截料,也不按照整盘比,直接数量最大的发料
// itemPosList.add(pos);
// itemPosNameList.add(pos.getPosName());
// targetNum -= pos.getBarcode().getAmount();
//
// if (targetNum <= 0) {
// break;
// }
// }
//判断数量是否满足
//判断数量是否满足
if
(
targetNum
>
0
)
{
if
(
targetNum
>
0
)
{
int
outNum
=
needNum
-
targetNum
;
int
outNum
=
needNum
-
targetNum
;
...
@@ -337,7 +300,7 @@ public class OutListCache implements ITaskListener {
...
@@ -337,7 +300,7 @@ public class OutListCache implements ITaskListener {
}
}
}
}
//可以出库
//可以出库
needOutPosMap
.
put
(
pn
,
itemPosList
);
needOutPosMap
.
put
(
outListItem
.
getId
()
,
itemPosList
);
}
}
log
.
info
(
"开始执行转储出库单["
+
name
+
"] "
);
log
.
info
(
"开始执行转储出库单["
+
name
+
"] "
);
...
@@ -353,9 +316,8 @@ public class OutListCache implements ITaskListener {
...
@@ -353,9 +316,8 @@ public class OutListCache implements ITaskListener {
for
(
OutListItem
outListItem
:
outList
.
getOutListItems
())
{
for
(
OutListItem
outListItem
:
outList
.
getOutListItems
())
{
int
itemReelCount
=
0
;
int
itemReelCount
=
0
;
int
itemOutCount
=
0
;
int
itemOutCount
=
0
;
List
<
StoragePos
>
posList
=
needOutPosMap
.
get
(
outListItem
.
getMaterialNo
());
List
<
StoragePos
>
posList
=
needOutPosMap
.
get
(
outListItem
.
getId
());
for
(
StoragePos
pos
:
for
(
StoragePos
pos
:
posList
)
{
posList
)
{
DataLog
task
=
taskService
.
newTask
(
pos
);
DataLog
task
=
taskService
.
newTask
(
pos
);
task
.
setSourceId
(
outList
.
getId
());
task
.
setSourceId
(
outList
.
getId
());
...
...
src/main/java/com/neotel/smfcore/core/system/rest/TaskController.java
查看文件 @
ad6cd77
...
@@ -7,6 +7,8 @@ import com.neotel.smfcore.common.bean.PageData;
...
@@ -7,6 +7,8 @@ import com.neotel.smfcore.common.bean.PageData;
import
com.neotel.smfcore.common.exception.ValidateException
;
import
com.neotel.smfcore.common.exception.ValidateException
;
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.SecurityUtils
;
import
com.neotel.smfcore.core.barcode.bean.CodeBean
;
import
com.neotel.smfcore.core.barcode.utils.CodeResolve
;
import
com.neotel.smfcore.core.device.enums.OP_STATUS
;
import
com.neotel.smfcore.core.device.enums.OP_STATUS
;
import
com.neotel.smfcore.core.device.util.DataCache
;
import
com.neotel.smfcore.core.device.util.DataCache
;
import
com.neotel.smfcore.core.storage.service.po.Storage
;
import
com.neotel.smfcore.core.storage.service.po.Storage
;
...
@@ -22,6 +24,7 @@ import io.swagger.annotations.Api;
...
@@ -22,6 +24,7 @@ import io.swagger.annotations.Api;
import
io.swagger.annotations.ApiOperation
;
import
io.swagger.annotations.ApiOperation
;
import
lombok.RequiredArgsConstructor
;
import
lombok.RequiredArgsConstructor
;
import
lombok.extern.slf4j.Slf4j
;
import
lombok.extern.slf4j.Slf4j
;
import
org.apache.logging.log4j.util.Strings
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.data.domain.Pageable
;
import
org.springframework.data.domain.Pageable
;
import
org.springframework.data.mongodb.core.query.Criteria
;
import
org.springframework.data.mongodb.core.query.Criteria
;
...
@@ -58,6 +61,9 @@ public class TaskController {
...
@@ -58,6 +61,9 @@ public class TaskController {
@Autowired
@Autowired
private
IUserManager
userManager
;
private
IUserManager
userManager
;
@Autowired
protected
CodeResolve
codeResolve
;
// @ApiOperation("导出用户数据")
// @ApiOperation("导出用户数据")
// @GetMapping(value = "/download")
// @GetMapping(value = "/download")
// @PreAuthorize("@el.check('user:list')")
// @PreAuthorize("@el.check('user:list')")
...
@@ -69,6 +75,12 @@ public class TaskController {
...
@@ -69,6 +75,12 @@ public class TaskController {
@GetMapping
(
"/history"
)
@GetMapping
(
"/history"
)
@PreAuthorize
(
"@el.check('taskLog')"
)
@PreAuthorize
(
"@el.check('taskLog')"
)
public
PageData
<
TaskDto
>
query
(
TaskQueryCondition
criteria
,
Pageable
pageable
)
{
public
PageData
<
TaskDto
>
query
(
TaskQueryCondition
criteria
,
Pageable
pageable
)
{
String
barcode
=
criteria
.
getBarcode
();
if
(
Strings
.
isNotBlank
(
barcode
)){
CodeBean
codebean
=
codeResolve
.
resolveSingleCode
(
criteria
.
getBarcode
());
String
reelId
=
codebean
.
getCodeStr
();
criteria
.
setBarcode
(
reelId
);
}
String
un_End
=
"UN_END"
;
String
un_End
=
"UN_END"
;
boolean
unEnd
=
false
;
boolean
unEnd
=
false
;
boolean
finished
=
false
;
boolean
finished
=
false
;
...
...
src/main/java/com/neotel/smfcore/security/service/manager/IMenuManager.java
查看文件 @
ad6cd77
...
@@ -84,4 +84,6 @@ public interface IMenuManager extends IBaseManager<Menu> {
...
@@ -84,4 +84,6 @@ public interface IMenuManager extends IBaseManager<Menu> {
void
delete
(
Set
<
Menu
>
menuSet
)
throws
ValidateException
;
void
delete
(
Set
<
Menu
>
menuSet
)
throws
ValidateException
;
Menu
saveMenu
(
Menu
menu
)
throws
ValidateException
;
Menu
saveMenu
(
Menu
menu
)
throws
ValidateException
;
Menu
findByPath
(
String
path
);
}
}
src/main/java/com/neotel/smfcore/security/service/manager/impl/MenuManagerImpl.java
查看文件 @
ad6cd77
...
@@ -341,4 +341,9 @@ public class MenuManagerImpl implements IMenuManager {
...
@@ -341,4 +341,9 @@ public class MenuManagerImpl implements IMenuManager {
// redisUtils.delByKeys(CacheKey.ROLE_ID, roles.stream().map(Role::getId).collect(Collectors.toSet()));
// redisUtils.delByKeys(CacheKey.ROLE_ID, roles.stream().map(Role::getId).collect(Collectors.toSet()));
// }
// }
@Override
public
Menu
findByPath
(
String
path
){
return
menuDao
.
findOneByCondition
(
new
String
[]{
"path"
},
new
String
[]{
path
});
}
}
}
src/main/java/com/neotel/smfcore/security/service/po/Menu.java
查看文件 @
ad6cd77
...
@@ -19,6 +19,7 @@ import cn.hutool.core.util.ObjectUtil;
...
@@ -19,6 +19,7 @@ import cn.hutool.core.util.ObjectUtil;
import
com.neotel.smfcore.common.base.BasePo
;
import
com.neotel.smfcore.common.base.BasePo
;
import
com.neotel.smfcore.core.language.util.MessageUtils
;
import
com.neotel.smfcore.core.language.util.MessageUtils
;
import
lombok.*
;
import
lombok.*
;
import
org.springframework.data.annotation.Transient
;
import
org.springframework.data.mongodb.core.mapping.Document
;
import
org.springframework.data.mongodb.core.mapping.Document
;
import
java.io.Serializable
;
import
java.io.Serializable
;
...
@@ -98,6 +99,12 @@ public class Menu extends BasePo implements Serializable {
...
@@ -98,6 +99,12 @@ public class Menu extends BasePo implements Serializable {
*/
*/
private
String
titleKey
;
private
String
titleKey
;
/**
* 父级菜单,主要用于初始化菜单,不存数据库
*/
@Transient
private
Menu
parentMenu
;
public
Boolean
getHasChildren
()
{
public
Boolean
getHasChildren
()
{
if
(
subCount
==
0
){
if
(
subCount
==
0
){
return
false
;
return
false
;
...
@@ -158,17 +165,17 @@ public class Menu extends BasePo implements Serializable {
...
@@ -158,17 +165,17 @@ public class Menu extends BasePo implements Serializable {
/**
/**
* 此方法用于构建权限菜单,type=2
* 此方法用于构建权限菜单,type=2
*/
*/
public
static
Menu
CreatePerMenu
(
final
String
permission
,
final
String
title
,
final
String
pid
)
{
//
public static Menu CreatePerMenu( final String permission, final String title, final String pid ) {
Menu
menu
=
new
Menu
(
new
ArrayList
<
Menu
>(),
2
,
permission
,
title
,
999
,
""
,
""
,
pid
,
0
,
false
,
false
,
false
,
""
,
""
,
""
);
//
Menu menu=new Menu(new ArrayList<Menu>(),2,permission,title,999,"","",pid,0,false,false,false,"","","");
return
menu
;
//
return menu;
}
//
}
/**
/**
* 此方法用户创建只用于显示的一级菜单,type=0
* 此方法用户创建只用于显示的一级菜单,type=0
*/
*/
public
static
Menu
CreatePMenu
(
final
String
title
,
final
Integer
menuSort
,
final
String
path
,
final
Integer
subCount
,
final
String
icon
)
{
public
static
Menu
CreatePMenu
(
final
String
title
,
final
Integer
menuSort
,
final
String
path
,
final
Integer
subCount
,
final
String
icon
,
Menu
parentMenu
)
{
String
titleKey
=
path
;
String
titleKey
=
path
;
Menu
menu
=
new
Menu
(
new
ArrayList
<
Menu
>(),
0
,
""
,
title
,
menuSort
,
path
,
""
,
""
,
subCount
,
false
,
false
,
false
,
title
,
icon
,
titleKey
);
Menu
menu
=
new
Menu
(
new
ArrayList
<
Menu
>(),
0
,
""
,
title
,
menuSort
,
path
,
""
,
""
,
subCount
,
false
,
false
,
false
,
title
,
icon
,
titleKey
,
parentMenu
);
return
menu
;
return
menu
;
}
}
...
...
编写
预览
支持
Markdown
格式
附加文件
你添加了
0
人
到此讨论。请谨慎行事。
Finish editing this message first!
Cancel
请
注册
或
登录
后发表评论