Skip to content
切换导航条
切换导航条
当前项目
正在载入...
登录
孙克
/
smf-core
转到一个项目
切换导航栏
切换导航栏固定状态
项目
群组
代码片段
帮助
项目
活动
版本库
流水线
图表
问题
0
合并请求
0
维基
网络
创建新的问题
作业
提交
问题看板
文件
提交
网络
比较
分支
标签
Commit 57c9cb3b
由
LN
编写于
2021-10-11 17:23:22 +0800
浏览文件
选项
浏览文件
标签
下载
电子邮件补丁
差异文件
1.菜单调整,增加策略出库和物料分组。
2.查找出库加设备搜索功能 3.库位管理设备可多选 4.下拉框的设备增加权限过滤 5.增加出库策略配置和系统设置 6.工单增加建议出仓时间,默认倒叙
1 个父辈
9fe2875c
隐藏空白字符变更
内嵌
并排
正在显示
24 个修改的文件
包含
315 行增加
和
122 行删除
src/main/java/com/neotel/smfcore/common/init/DataInitManager.java
src/main/java/com/neotel/smfcore/common/utils/Constants.java
src/main/java/com/neotel/smfcore/common/utils/QueryHelp.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/kanban/rest/BoxKanbanController.java
src/main/java/com/neotel/smfcore/core/order/enums/LITEORDER_STATUS.java
src/main/java/com/neotel/smfcore/core/order/rest/OrderController.java
src/main/java/com/neotel/smfcore/core/order/rest/bean/dto/OrderDto.java
src/main/java/com/neotel/smfcore/core/order/rest/bean/query/OrderQueryCondition.java
src/main/java/com/neotel/smfcore/core/order/service/manager/impl/LiteOrderManagerImpl.java
src/main/java/com/neotel/smfcore/core/order/service/po/LiteOrder.java
src/main/java/com/neotel/smfcore/core/storage/enums/CHECKOUT_TYPE.java
src/main/java/com/neotel/smfcore/core/storage/rest/StorageController.java
src/main/java/com/neotel/smfcore/core/storage/rest/query/StoragePosFindCriteria.java
src/main/java/com/neotel/smfcore/core/storage/rest/query/StoragePosQueryCriteria.java
src/main/java/com/neotel/smfcore/core/system/rest/SettingsController.java
src/main/java/com/neotel/smfcore/core/system/rest/bean/dto/SysSettingsDto.java
src/main/java/com/neotel/smfcore/core/system/service/po/Settings.java
src/main/resources/messages.properties
src/main/resources/messages_en_US.properties
src/main/resources/messages_ja_JP.properties
src/main/resources/messages_zh_CN.properties
src/main/resources/messages_zh_TW.properties
src/main/java/com/neotel/smfcore/common/init/DataInitManager.java
查看文件 @
57c9cb3
...
...
@@ -195,24 +195,33 @@ public class DataInitManager {
menus
.
addAll
(
createMenus
(
menuShelf
));
//出库:工单,查找出库
Menu
poutOut
=
Menu
.
CreatePMenu
(
"
工单
管理"
,
20
,
"order"
,
2
,
"workOrder"
);
Menu
menuOrder
=
new
Menu
(
new
ArrayList
<
Menu
>(),
1
,
"
menu:list"
,
"工单
"
,
1
,
"workOrder"
,
"neolight/workOrder/index"
,
""
,
0
,
"workOrder"
);
Menu
poutOut
=
Menu
.
CreatePMenu
(
"
物料
管理"
,
20
,
"order"
,
2
,
"workOrder"
);
Menu
menuOrder
=
new
Menu
(
new
ArrayList
<
Menu
>(),
1
,
"
workOrder"
,
"工单出库
"
,
1
,
"workOrder"
,
"neolight/workOrder/index"
,
""
,
0
,
"workOrder"
);
Menu
menuOut
=
new
Menu
(
new
ArrayList
<
Menu
>(),
1
,
"menu:list"
,
"查找出库"
,
1
,
"singleOuput"
,
"neolight/singleOuput/index"
,
""
,
0
,
"export1"
);
menus
.
addAll
(
createMenus
(
poutOut
,
menuOrder
,
menuOut
));
Menu
celueOut
=
new
Menu
(
new
ArrayList
<
Menu
>(),
1
,
"menu:list"
,
"策略出库"
,
1
,
"tacticsOuput"
,
"neolight/tacticsOuput/index"
,
""
,
0
,
"workOrder"
);
Menu
groupOut
=
new
Menu
(
new
ArrayList
<
Menu
>(),
1
,
"menu:list"
,
"物料分组"
,
1
,
"labelOuput"
,
"neolight/labelOuput/index"
,
""
,
0
,
"export1"
);
celueOut
.
setHidden
(
true
);
groupOut
.
setHidden
(
true
);
menus
.
addAll
(
createMenus
(
poutOut
,
menuOrder
,
menuOut
,
celueOut
,
groupOut
));
//设置:料仓管理,菜单管理
Menu
poutSet
=
Menu
.
CreatePMenu
(
"设置"
,
30
,
"system"
,
2
,
"system"
);
Menu
menuStorage
=
new
Menu
(
new
ArrayList
<
Menu
>(),
1
,
"storage:list"
,
"料仓管理"
,
1
,
"bunker"
,
"storage/storage/index"
,
""
,
0
,
"database"
);
Menu
menuStoragePos
=
new
Menu
(
new
ArrayList
<
Menu
>(),
1
,
"storagePos:list"
,
"库位管理"
,
1
,
"storagePos"
,
"storagePos/storagePos/index"
,
""
,
0
,
"tree-table"
);
Menu
menuMenu
=
new
Menu
(
new
ArrayList
<
Menu
>(),
1
,
"menu:list"
,
"菜单管理"
,
1
,
"menu"
,
"system/menu/index"
,
""
,
0
,
"menu"
);
Menu
sysSetting
=
new
Menu
(
new
ArrayList
<
Menu
>(),
1
,
"setting"
,
"条码设置"
,
1
,
"barcodeSetting"
,
"system/barcodeSetting/index"
,
""
,
0
,
"database"
);
// menuMenu.setHidden(true);
Menu
sysSetting
=
new
Menu
(
new
ArrayList
<
Menu
>(),
1
,
"barcode"
,
"条码设置"
,
1
,
"barcodeSetting"
,
"system/barcodeSetting/index"
,
""
,
0
,
"database"
);
Menu
outSet
=
new
Menu
(
new
ArrayList
<
Menu
>(),
1
,
"outSetting"
,
"出库策略"
,
1
,
"outSetting"
,
"system/outSetting/index"
,
""
,
0
,
"system"
);
Menu
sysSet
=
new
Menu
(
new
ArrayList
<
Menu
>(),
1
,
"sysSetting"
,
"系统设置"
,
1
,
"sysSetting"
,
"system/sysSetting/index"
,
""
,
0
,
"system"
);
outSet
.
setHidden
(
true
);
sysSet
.
setHidden
(
true
);
// menuMenu.setHidden(true);
// sysSetting.setHidden(true);
menus
.
addAll
(
createMenus
(
poutSet
,
menuStorage
,
menuStoragePos
,
menuMenu
,
sysSetting
));
menus
.
addAll
(
createMenus
(
poutSet
,
menuStorage
,
menuStoragePos
,
menuMenu
,
sysSetting
,
outSet
,
sysSet
));
//物料管理:元器件管理,条形码管理
Menu
pMenuWl
=
Menu
.
CreatePMenu
(
"
物料
管理"
,
30
,
"materiel "
,
2
,
"BOM"
);
Menu
pMenuWl
=
Menu
.
CreatePMenu
(
"
档案
管理"
,
30
,
"materiel "
,
2
,
"BOM"
);
Menu
menucom
=
new
Menu
(
new
ArrayList
<
Menu
>(),
1
,
"component:list"
,
"元器件"
,
1
,
"componentParts"
,
"parts/component/index"
,
""
,
0
,
"server"
);
Menu
menubarcode
=
new
Menu
(
new
ArrayList
<
Menu
>(),
1
,
"barcode:list"
,
"条形码"
,
1
,
"barcode"
,
"barcode/barcode/index"
,
""
,
0
,
"chart"
);
menus
.
addAll
(
createMenus
(
pMenuWl
,
menucom
,
menubarcode
));
...
...
src/main/java/com/neotel/smfcore/common/utils/Constants.java
查看文件 @
57c9cb3
...
...
@@ -83,6 +83,19 @@ public class Constants {
* @deprecated No longer used to set themes.
*/
public
static
final
String
CSS_THEME
=
"csstheme"
;
/**
* 条码规则
*/
public
static
final
String
CACHE_CodeRule
=
"codeRule"
;
/**
* 准备进行更新,不允许需求单出库
*/
public
static
final
String
CACHE_StopOut
=
"stopOut"
;
/**
* 停止定时器任务
*/
public
static
final
String
CACHE_StopJob
=
"stopJob"
;
public
static
final
String
CACHE_CheckOutType
=
"checkoutType"
;
}
src/main/java/com/neotel/smfcore/common/utils/QueryHelp.java
查看文件 @
57c9cb3
...
...
@@ -161,7 +161,7 @@ public class QueryHelp {
return
fields
;
}
p
rivate
static
String
escapeExprSpecialWord
(
String
keyword
)
{
p
ublic
static
String
escapeExprSpecialWord
(
String
keyword
)
{
if
(
ObjectUtil
.
isNotEmpty
(
keyword
))
{
String
[]
fbsArr
=
{
"\\"
,
"$"
,
"("
,
")"
,
"*"
,
"+"
,
"."
,
"["
,
"]"
,
"?"
,
"^"
,
"{"
,
"}"
,
"|"
};
for
(
String
key
:
fbsArr
)
{
...
...
src/main/java/com/neotel/smfcore/core/device/rest/DeviceController.java
查看文件 @
57c9cb3
...
...
@@ -6,6 +6,7 @@ import com.google.common.collect.Lists;
import
com.google.common.collect.Maps
;
import
com.neotel.smfcore.common.bean.ReelLockPosInfo
;
import
com.neotel.smfcore.common.exception.ValidateException
;
import
com.neotel.smfcore.common.utils.Constants
;
import
com.neotel.smfcore.common.utils.ReelLockPosUtil
;
import
com.neotel.smfcore.core.barcode.service.po.Barcode
;
import
com.neotel.smfcore.core.barcode.utils.CodeResolve
;
...
...
@@ -112,7 +113,7 @@ public class DeviceController {
log
.
info
(
"流水线["
+
cids
+
"]获取["
+
rfid
+
"]["
+
code
+
"]的入库库位"
);
Map
<
String
,
Object
>
resultMap
=
Maps
.
newHashMap
();
if
(
dataCahche
.
get
Settings
().
isStopOut
(
)){
if
(
dataCahche
.
get
Cache
(
Constants
.
CACHE_StopOut
)){
lineMsg
=
"系统更新中,暂停出入库"
;
resultMap
.
put
(
"result"
,
"100"
);
resultMap
.
put
(
"msg"
,
lineMsg
);
...
...
src/main/java/com/neotel/smfcore/core/device/util/DataCache.java
查看文件 @
57c9cb3
...
...
@@ -73,12 +73,18 @@ public class DataCache {
initCacheItem
();
}
private
void
initCacheItem
(){
private
void
initCacheItem
()
{
cacheMap
=
Maps
.
newConcurrentMap
();
List
<
CacheItem
>
all
=
cacheItemDao
.
findAll
();
for
(
CacheItem
cacheItem
:
all
)
{
cacheMap
.
put
(
cacheItem
.
getCacheKey
(),
cacheItem
.
getCacheValue
());
}
if
(
cacheMap
.
get
(
Constants
.
CACHE_StopOut
)
==
null
)
{
updateCache
(
Constants
.
CACHE_StopOut
,
false
);
}
if
(
cacheMap
.
get
(
Constants
.
CACHE_StopJob
)
==
null
)
{
updateCache
(
Constants
.
CACHE_StopJob
,
false
);
}
}
/**
...
...
src/main/java/com/neotel/smfcore/core/kanban/rest/BoxKanbanController.java
查看文件 @
57c9cb3
...
...
@@ -171,33 +171,33 @@ public class BoxKanbanController {
}
dtos
.
add
(
boxTaskMapper
.
toDto
(
datalog
));
//
boolean blurryOk = false;
//
// 如果是多字段
//
String blurry = criteria.getBlurry();
//
if (ObjectUtil.isNotEmpty(blurry)) {
//
String[] blurrys = blurry.split(",");
//
String[] valueArray = new String[]{datalog.getPosName(), datalog.getStorageName(), datalog.getCid(), datalog.getPartNumber(), datalog.getBarcode(), datalog.getSourceName()};
//
for (String s : blurrys) {
//
for (String v :
//
valueArray) {
//
Pattern pattern = Pattern.compile(QueryHelp.escapeExprSpecialWord(s), Pattern.CASE_INSENSITIVE);
//
Matcher m = pattern.matcher(v);
//
while (m.find()) {
//
blurryOk = true;
//
break;
//
}
//
if (blurryOk) break;
//
}
//
if (blurryOk) break;
//
//
}
//
//
} else {
//
blurryOk = true;
//
}
//
if (blurryOk) {
//
dtos.add(boxTaskMapper.toDto(datalog));
//
}
boolean
blurryOk
=
false
;
// 如果是多字段
String
blurry
=
criteria
.
getBlurry
();
if
(
ObjectUtil
.
isNotEmpty
(
blurry
))
{
String
[]
blurrys
=
blurry
.
split
(
","
);
String
[]
valueArray
=
new
String
[]{
datalog
.
getPosName
(),
datalog
.
getStorageName
(),
datalog
.
getCid
(),
datalog
.
getPartNumber
(),
datalog
.
getBarcode
(),
datalog
.
getSourceName
()};
for
(
String
s
:
blurrys
)
{
for
(
String
v
:
valueArray
)
{
Pattern
pattern
=
Pattern
.
compile
(
QueryHelp
.
escapeExprSpecialWord
(
s
),
Pattern
.
CASE_INSENSITIVE
);
Matcher
m
=
pattern
.
matcher
(
v
);
while
(
m
.
find
())
{
blurryOk
=
true
;
break
;
}
if
(
blurryOk
)
break
;
}
if
(
blurryOk
)
break
;
}
}
else
{
blurryOk
=
true
;
}
if
(
blurryOk
)
{
dtos
.
add
(
boxTaskMapper
.
toDto
(
datalog
));
}
}
return
new
PageData
<>(
dtos
,
dtos
.
size
());
// Query query = QueryHelp.getQuery(criteria);
...
...
src/main/java/com/neotel/smfcore/core/order/enums/LITEORDER_STATUS.java
查看文件 @
57c9cb3
...
...
@@ -20,4 +20,7 @@ public class LITEORDER_STATUS {
public
static
int
ONE
=
5
;
/**补料已完成*/
public
static
int
ONE_FINISHED
=
6
;
/**工单已关闭*/
public
static
int
CLOSED
=
7
;
}
src/main/java/com/neotel/smfcore/core/order/rest/OrderController.java
查看文件 @
57c9cb3
...
...
@@ -38,6 +38,8 @@ import lombok.extern.slf4j.Slf4j;
import
org.apache.logging.log4j.util.Strings
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.data.domain.Pageable
;
import
org.springframework.data.mongodb.core.query.Criteria
;
import
org.springframework.data.mongodb.core.query.Query
;
import
org.springframework.http.HttpStatus
;
import
org.springframework.http.ResponseEntity
;
import
org.springframework.security.access.prepost.PreAuthorize
;
...
...
@@ -149,7 +151,7 @@ public class OrderController {
@ApiOperation
(
"工单出库"
)
@PostMapping
(
value
=
"/out"
)
@PreAuthorize
(
"@el.check('
order:out
')"
)
@PreAuthorize
(
"@el.check('
workOrder
')"
)
public
ResultBean
delete
(
@RequestBody
Map
<
String
,
String
>
mapValues
)
{
String
orderNo
=
mapValues
.
get
(
"orderNo"
);
if
(
orderNo
==
null
)
{
...
...
@@ -166,7 +168,7 @@ public class OrderController {
@ApiOperation
(
"查询工单"
)
@GetMapping
@PreAuthorize
(
"@el.check('
order:list
')"
)
@PreAuthorize
(
"@el.check('
workOrder
')"
)
public
PageData
<
OrderDto
>
query
(
OrderQueryCondition
criteria
,
Pageable
pageable
)
{
User
user
=
userManager
.
findByUserName
(
SecurityUtils
.
getCurrentUsername
());
if
(
user
!=
null
)
{
...
...
@@ -187,7 +189,15 @@ public class OrderController {
criteria
.
setSourceList
(
groupNames
);
}
}
PageData
<
LiteOrder
>
orderList
=
liteOrderManager
.
findByPage
(
QueryHelp
.
getQuery
(
criteria
),
pageable
);
Query
query
=
QueryHelp
.
getQuery
(
criteria
);
if
(
criteria
.
getStatus
()
!=
null
)
{
if
(
criteria
.
getStatus
()
==
1
)
{
query
.
addCriteria
(
Criteria
.
where
(
"status"
).
is
(
LITEORDER_STATUS
.
CLOSED
));
}
else
if
(
criteria
.
getStatus
()
==
2
)
{
query
.
addCriteria
(
Criteria
.
where
(
"status"
).
ne
(
LITEORDER_STATUS
.
CLOSED
));
}
}
PageData
<
LiteOrder
>
orderList
=
liteOrderManager
.
findByPage
(
query
,
pageable
);
return
orderMapper
.
toDto
(
orderList
);
}
...
...
src/main/java/com/neotel/smfcore/core/order/rest/bean/dto/OrderDto.java
查看文件 @
57c9cb3
...
...
@@ -8,6 +8,7 @@ import lombok.Setter;
import
org.springframework.data.annotation.Transient
;
import
java.io.Serializable
;
import
java.util.Date
;
import
java.util.List
;
@Getter
...
...
@@ -77,4 +78,10 @@ public class OrderDto implements Serializable {
@ApiModelProperty
(
"订单的详细信息"
)
private
List
<
OrderItemDto
>
orderItems
;
@ApiModelProperty
(
"建议出仓时间"
)
private
Date
sdate
;
@ApiModelProperty
(
"创建时间"
)
private
Date
createDate
=
new
Date
();
}
src/main/java/com/neotel/smfcore/core/order/rest/bean/query/OrderQueryCondition.java
查看文件 @
57c9cb3
...
...
@@ -19,4 +19,10 @@ public class OrderQueryCondition {
@QueryCondition
(
type
=
QueryCondition
.
Type
.
IN
,
propName
=
"source"
)
private
List
<
String
>
sourceList
;
//状态,0=所有,1=已关闭,2=未关闭
private
Integer
status
;
//
// @QueryCondition(type=QueryCondition.Type.IN,propName = "status")
// private List<Integer> statusList ;
}
src/main/java/com/neotel/smfcore/core/order/service/manager/impl/LiteOrderManagerImpl.java
查看文件 @
57c9cb3
...
...
@@ -18,6 +18,7 @@ import org.springframework.data.domain.Pageable;
import
org.springframework.data.mongodb.core.query.Query
;
import
org.springframework.stereotype.Service
;
import
java.util.Date
;
import
java.util.List
;
@Service
...
...
@@ -66,6 +67,9 @@ public class LiteOrderManagerImpl implements ILiteOrderManager {
liteOrderItem
=
liteOrderItemManager
.
save
(
liteOrderItem
);
items
.
add
(
liteOrderItem
);
}
if
(
liteOrder
.
getSDate
()==
null
){
liteOrder
.
setSdate
(
new
Date
(
System
.
currentTimeMillis
()));
}
liteOrder
=
save
(
liteOrder
);
liteOrder
.
setOrderItems
(
items
);
return
liteOrder
;
...
...
src/main/java/com/neotel/smfcore/core/order/service/po/LiteOrder.java
查看文件 @
57c9cb3
...
...
@@ -8,6 +8,7 @@ import org.springframework.data.annotation.Transient;
import
org.springframework.data.mongodb.core.mapping.Document
;
import
java.io.Serializable
;
import
java.util.Date
;
import
java.util.List
;
@Data
...
...
@@ -74,7 +75,10 @@ public class LiteOrder extends BasePo implements Serializable {
@Transient
private
List
<
LiteOrderItem
>
orderItems
;
/**
* 建议出仓时间
*/
private
Date
sdate
;
/**
* 结束当前的任务
...
...
@@ -160,4 +164,12 @@ public class LiteOrder extends BasePo implements Serializable {
return
orderTimes
;
}
public
Date
getSDate
(){
if
(
sdate
==
null
){
return
getCreateDate
();
}
return
sdate
;
}
}
src/main/java/com/neotel/smfcore/core/storage/enums/CHECKOUT_TYPE.java
查看文件 @
57c9cb3
...
...
@@ -5,9 +5,24 @@ package com.neotel.smfcore.core.storage.enums;
* Created by sunke on 2021/7/14.
*/
public
enum
CHECKOUT_TYPE
{
/**
* 效率优先
*/
EFFICIENCY
,
/**
* 严格先进先出
*/
FIFO
,
/**
* 尾料优先
*/
USED_FIRST
,
/**
* 先过期先出
*/
EXPIRE_FIRST
,
/**
* 生产日期优先
*/
PRODUCE_DATE
;
}
src/main/java/com/neotel/smfcore/core/storage/rest/StorageController.java
查看文件 @
57c9cb3
...
...
@@ -8,6 +8,7 @@ import com.neotel.smfcore.common.exception.ValidateException;
import
com.neotel.smfcore.common.utils.FileUtil
;
import
com.neotel.smfcore.common.utils.PointUtil
;
import
com.neotel.smfcore.common.utils.QueryHelp
;
import
com.neotel.smfcore.common.utils.SecurityUtils
;
import
com.neotel.smfcore.core.device.util.DataCache
;
import
com.neotel.smfcore.core.storage.rest.dto.StorageDto
;
import
com.neotel.smfcore.core.storage.rest.dto.StorageSearchDto
;
...
...
@@ -23,7 +24,9 @@ import com.neotel.smfcore.security.annotation.AnonymousAccess;
import
com.neotel.smfcore.security.bean.FileProperties
;
import
com.neotel.smfcore.security.rest.bean.dto.RoleDto
;
import
com.neotel.smfcore.security.service.manager.IGroupManager
;
import
com.neotel.smfcore.security.service.manager.IUserManager
;
import
com.neotel.smfcore.security.service.po.Group
;
import
com.neotel.smfcore.security.service.po.User
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
lombok.RequiredArgsConstructor
;
...
...
@@ -73,6 +76,8 @@ public class StorageController {
@Autowired
private
final
StorageSearchMapper
storageSearchMapper
;
@Autowired
private
final
IUserManager
userManager
;
@ApiOperation
(
"查询料仓"
)
...
...
@@ -102,12 +107,24 @@ public class StorageController {
}
return
new
PageData
(
StorageDtos
,
pages
.
getTotalElements
());
}
@ApiOperation
(
"返回所有料仓"
)
@ApiOperation
(
"
根据组权限
返回所有料仓"
)
@GetMapping
(
value
=
"/all"
)
@PreAuthorize
(
"@el.check('storage:list')"
)
public
List
<
StorageSearchDto
>
query
()
{
String
userId
=
SecurityUtils
.
getCurrentUserId
();
User
user
=
userManager
.
get
(
userId
);
Set
<
String
>
mygroups
=
user
.
getGroups
();
mygroups
.
add
(
""
);
List
<
Storage
>
allStorages
=
storageManager
.
findAll
();
List
<
StorageSearchDto
>
storageSearchDtos
=
storageSearchMapper
.
toDto
(
allStorages
);
List
<
Storage
>
myStorages
=
new
ArrayList
<>();
for
(
Storage
s:
allStorages
)
{
if
(
mygroups
.
contains
(
s
.
getGroupId
())){
myStorages
.
add
(
s
);
}
}
List
<
StorageSearchDto
>
storageSearchDtos
=
storageSearchMapper
.
toDto
(
myStorages
);
return
storageSearchDtos
;
}
...
...
src/main/java/com/neotel/smfcore/core/storage/rest/query/StoragePosFindCriteria.java
查看文件 @
57c9cb3
...
...
@@ -8,6 +8,7 @@ import lombok.Data;
import
org.springframework.format.annotation.DateTimeFormat
;
import
java.util.Date
;
import
java.util.List
;
@Data
public
class
StoragePosFindCriteria
{
...
...
@@ -21,6 +22,10 @@ public class StoragePosFindCriteria {
@QueryCondition
@ApiModelProperty
(
"料仓ID"
)
private
String
storageId
;
@QueryCondition
(
type
=
QueryCondition
.
Type
.
IN
,
propName
=
"storageId"
)
private
List
<
String
>
storageIdList
;
@QueryCondition
(
propName
=
"barcode.barcode"
)
@ApiModelProperty
(
"条码"
)
private
String
barcode
;
...
...
src/main/java/com/neotel/smfcore/core/storage/rest/query/StoragePosQueryCriteria.java
查看文件 @
57c9cb3
...
...
@@ -6,6 +6,8 @@ import lombok.Data;
import
org.springframework.format.annotation.DateTimeFormat
;
import
java.util.Date
;
import
java.util.List
;
@Data
public
class
StoragePosQueryCriteria
{
@QueryCondition
(
blurry
=
"barcode.partNumber,barcode.barcode,posName"
)
...
...
@@ -22,4 +24,7 @@ public class StoragePosQueryCriteria {
private
String
barcode
;
@QueryCondition
private
String
posName
;
@QueryCondition
(
type
=
QueryCondition
.
Type
.
IN
,
propName
=
"storageId"
)
private
List
<
String
>
storageIdList
;
}
src/main/java/com/neotel/smfcore/core/system/rest/SettingsController.java
查看文件 @
57c9cb3
package
com
.
neotel
.
smfcore
.
core
.
system
.
rest
;
import
com.neotel.smfcore.common.bean.ResultBean
;
import
com.neotel.smfcore.common.exception.ValidateException
;
import
com.neotel.smfcore.common.utils.Constants
;
import
com.neotel.smfcore.core.device.util.DataCache
;
import
com.neotel.smfcore.core.system.rest.bean.dto.SettingsDto
;
import
com.neotel.smfcore.core.system.rest.bean.dto.SysSettingsDto
;
import
com.neotel.smfcore.core.system.rest.bean.mapstruct.SettingsMapper
;
import
com.neotel.smfcore.core.system.service.po.Settings
;
import
com.neotel.smfcore.security.rest.bean.dto.MenuDto
;
...
...
@@ -18,7 +21,9 @@ import org.springframework.security.access.prepost.PreAuthorize;
import
org.springframework.validation.annotation.Validated
;
import
org.springframework.web.bind.annotation.*
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.Map
;
@Slf4j
@Api
(
tags
=
"系统:设置"
)
...
...
@@ -29,65 +34,112 @@ public class SettingsController {
@Autowired
private
DataCache
dataCache
;
@Autowired
private
SettingsMapper
settingsMapper
;
// @Autowired
// private SettingsMapper settingsMapper;
//
// @ApiOperation("获取设置信息")
// @GetMapping()
// @PreAuthorize("@el.check('settings:list')")
// public SettingsDto getSettings() {
//
// Settings settings= dataCache.getSettings();
// SettingsDto dto=settingsMapper.toDto(settings);
// return dto;
// }
//
// @ApiOperation("修改设置信息")
// @PutMapping
// @PreAuthorize("@el.check('settings')")
// public ResponseEntity<Object> update(@Validated @RequestBody SettingsDto settingsDto) {
//
// if(settingsDto.getMaxHumidity()<=settingsDto.getMinHumidity()){
//
// throw new ValidateException("smfcode.humidityValueError","温度范围数据错误" );
//// throw new BadRequestException("温度范围数据错误");
// }
// if(settingsDto.getMaxHumidityShow()<=settingsDto.getMinHumidityShow()){
// throw new ValidateException("smfcode.humidityShowValueError","温度显示范围数据错误" );
//// throw new BadRequestException("温度显示范围数据错误");
// }
// if(settingsDto.getMaxTemperature()<=settingsDto.getMinTemperature()){
// throw new ValidateException("smfcode.temperatureValueError","湿度范围数据错误" );
//// throw new BadRequestException("湿度范围数据错误");
// }
// if(settingsDto.getMaxTemperatureShow()<=settingsDto.getMinTemperatureShow()){
// throw new ValidateException("smfcode.temperatureShowValueError","湿度显示范围数据错误" );
//// throw new BadRequestException("湿度显示范围数据错误");
// }
//
// if(settingsDto.getInNotifyApi()==null){
// settingsDto.setInNotifyApi("");
// }
// if(settingsDto.getOutNotifyApi()==null){
// settingsDto.setOutNotifyApi("");
// }
// if(settingsDto.getOrderFileDir()==null){
// settingsDto.setOrderFileDir("");
// }
// Settings settings=dataCache.getSettings();
// settings.setInNotifyApi(settingsDto.getInNotifyApi());
// settings.setOutNotifyApi(settingsDto.getOutNotifyApi());
// settings.setOrderFileDir(settingsDto.getOrderFileDir());
// settings.setMinHumidity(settingsDto.getMinHumidity());
// settings.setMaxHumidity(settingsDto.getMaxHumidity());
// settings.setMinTemperature(settingsDto.getMinTemperature());
// settings.setMaxTemperature(settingsDto.getMaxTemperature());
// settings.setMaxHumidityShow(settingsDto.getMaxHumidityShow());
// settings.setMinHumidityShow(settingsDto.getMinHumidityShow());
// settings.setMaxTemperatureShow(settingsDto.getMaxTemperatureShow());
// settings.setMinTemperatureShow(settingsDto.getMinTemperatureShow());
// dataCache.updateSettings(settings);
// return new ResponseEntity<>(HttpStatus.OK);
//
// }
@ApiOperation
(
"获取设置信息"
)
@GetMapping
()
@PreAuthorize
(
"@el.check('s
ettings:list
')"
)
public
S
ettingsDto
get
Settings
()
{
@ApiOperation
(
"获取
系统
设置信息"
)
@GetMapping
(
"sysSettings"
)
@PreAuthorize
(
"@el.check('s
ysSettings
')"
)
public
S
ysSettingsDto
getSys
Settings
()
{
Settings
settings
=
dataCache
.
getSettings
();
SettingsDto
dto
=
settingsMapper
.
toDto
(
settings
);
return
dto
;
Settings
settings
=
dataCache
.
getSettings
();
boolean
stopOut
=
dataCache
.
getCache
(
Constants
.
CACHE_StopOut
);
boolean
stopJob
=
dataCache
.
getCache
(
Constants
.
CACHE_StopJob
);
SysSettingsDto
dto
=
new
SysSettingsDto
();
dto
.
setStopJob
(
stopJob
);
dto
.
setStopOut
(
stopOut
);
return
dto
;
}
@ApiOperation
(
"修改设置信息"
)
@PutMapping
@PreAuthorize
(
"@el.check('settings')"
)
public
ResponseEntity
<
Object
>
update
(
@Validated
@RequestBody
SettingsDto
settingsDto
)
{
@ApiOperation
(
"修改系统设置信息"
)
@PutMapping
(
"sysSettings"
)
@PreAuthorize
(
"@el.check('sysSettings')"
)
public
ResultBean
updateSysSettings
(
@Validated
@RequestBody
SysSettingsDto
sysSettingsDto
)
{
dataCache
.
updateCache
(
Constants
.
CACHE_StopOut
,
sysSettingsDto
.
isStopOut
());
dataCache
.
updateCache
(
Constants
.
CACHE_StopJob
,
sysSettingsDto
.
isStopJob
());
log
.
info
(
"更改系统设置:stopout="
+
sysSettingsDto
.
isStopOut
()
+
",stopjob="
+
sysSettingsDto
.
isStopJob
());
return
ResultBean
.
newOkResult
(
"保存成功"
);
if
(
settingsDto
.
getMaxHumidity
()<=
settingsDto
.
getMinHumidity
()){
}
throw
new
ValidateException
(
"smfcode.humidityValueError"
,
"温度范围数据错误"
);
// throw new BadRequestException("温度范围数据错误");
}
if
(
settingsDto
.
getMaxHumidityShow
()<=
settingsDto
.
getMinHumidityShow
()){
throw
new
ValidateException
(
"smfcode.humidityShowValueError"
,
"温度显示范围数据错误"
);
// throw new BadRequestException("温度显示范围数据错误");
}
if
(
settingsDto
.
getMaxTemperature
()<=
settingsDto
.
getMinTemperature
()){
throw
new
ValidateException
(
"smfcode.temperatureValueError"
,
"湿度范围数据错误"
);
// throw new BadRequestException("湿度范围数据错误");
}
if
(
settingsDto
.
getMaxTemperatureShow
()<=
settingsDto
.
getMinTemperatureShow
()){
throw
new
ValidateException
(
"smfcode.temperatureShowValueError"
,
"湿度显示范围数据错误"
);
// throw new BadRequestException("湿度显示范围数据错误");
}
@ApiOperation
(
"获取出库策略信息"
)
@GetMapping
(
"checkoutSettings"
)
@PreAuthorize
(
"@el.check('outSettings')"
)
public
Map
<
String
,
String
>
getCheckOutSettings
()
{
String
outSet
=
dataCache
.
getCache
(
Constants
.
CACHE_CheckOutType
);
Map
<
String
,
String
>
map
=
new
HashMap
<>();
map
.
put
(
"checkOutType"
,
outSet
);
return
map
;
}
if
(
settingsDto
.
getInNotifyApi
()==
null
){
settingsDto
.
setInNotifyApi
(
""
);
}
if
(
settingsDto
.
getOutNotifyApi
()==
null
){
settingsDto
.
setOutNotifyApi
(
""
);
}
if
(
settingsDto
.
getOrderFileDir
()==
null
){
settingsDto
.
setOrderFileDir
(
""
);
}
Settings
settings
=
dataCache
.
getSettings
();
settings
.
setInNotifyApi
(
settingsDto
.
getInNotifyApi
());
settings
.
setOutNotifyApi
(
settingsDto
.
getOutNotifyApi
());
settings
.
setOrderFileDir
(
settingsDto
.
getOrderFileDir
());
settings
.
setMinHumidity
(
settingsDto
.
getMinHumidity
());
settings
.
setMaxHumidity
(
settingsDto
.
getMaxHumidity
());
settings
.
setMinTemperature
(
settingsDto
.
getMinTemperature
());
settings
.
setMaxTemperature
(
settingsDto
.
getMaxTemperature
());
settings
.
setMaxHumidityShow
(
settingsDto
.
getMaxHumidityShow
());
settings
.
setMinHumidityShow
(
settingsDto
.
getMinHumidityShow
());
settings
.
setMaxTemperatureShow
(
settingsDto
.
getMaxTemperatureShow
());
settings
.
setMinTemperatureShow
(
settingsDto
.
getMinTemperatureShow
());
dataCache
.
updateSettings
(
settings
);
return
new
ResponseEntity
<>(
HttpStatus
.
OK
);
@ApiOperation
(
"修改出库策略"
)
@PutMapping
(
"checkoutSettings"
)
@PreAuthorize
(
"@el.check('outSettings')"
)
public
ResultBean
update
(
@Validated
@RequestBody
String
type
)
{
// String type=map.get("checkOutType");
dataCache
.
updateCache
(
Constants
.
CACHE_CheckOutType
,
type
);
log
.
info
(
"更改出库策略:checkOutType="
+
type
);
return
ResultBean
.
newOkResult
(
"保存成功"
);
}
}
src/main/java/com/neotel/smfcore/core/system/rest/bean/dto/SysSettingsDto.java
0 → 100644
查看文件 @
57c9cb3
package
com
.
neotel
.
smfcore
.
core
.
system
.
rest
.
bean
.
dto
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Getter
;
import
lombok.Setter
;
import
java.io.Serializable
;
@Getter
@Setter
public
class
SysSettingsDto
implements
Serializable
{
@ApiModelProperty
(
"准备进行更新,不允许需求单出库"
)
private
boolean
stopOut
=
false
;
@ApiModelProperty
(
"停止定时器任务"
)
private
boolean
stopJob
=
false
;
}
src/main/java/com/neotel/smfcore/core/system/service/po/Settings.java
查看文件 @
57c9cb3
...
...
@@ -165,15 +165,15 @@ public class Settings extends BasePo implements Serializable {
private
String
orderFileDir
;
/**
* 准备进行更新,不允许需求单出库
*/
private
boolean
stopOut
=
false
;
/**
* 停止定时器任务
*/
private
boolean
stopJob
=
false
;
//
/**
//
* 准备进行更新,不允许需求单出库
//
*/
//
private boolean stopOut = false;
//
//
/**
//
* 停止定时器任务
//
*/
//
private boolean stopJob = false;
/**
* 不入库的料仓列表
...
...
src/main/resources/messages.properties
查看文件 @
57c9cb3
...
...
@@ -62,14 +62,14 @@ smfcore.checkNg=\u8BBE\u5907\u9A8C\u8BC1\u5931\u8D25:{0}
smfcore.loadMaterialFinished
=
\u
8BBE
\u5907\u
52A0
\u
8F7D
\u
5B8C
\u6210
: {0}
smfcore.lockMaterial
=
\u
8BBE
\u5907\u
770B
\u
677F
smfcore.lightGroup
=
\u6599\u
67B6
\u5206\u
7EC4
smfcore.order
=
\u
5DE5
\u5355
\u
7BA1
\u7406
smfcore.workOrder
=
\u
5DE5
\u5355
smfcore.order
=
\u
7269\u6599
\u
7BA1
\u7406
smfcore.workOrder
=
\u
5DE5
\u5355
\u
51FA
\u
5E93
smfcore.singleOuput
=
\u
67E5
\u
627E
\u
51FA
\u
5E93
smfcore.system
=
\u
8BBE
\u
7F6E
smfcore.bunker
=
\u6599\u
4ED3
\u
7BA1
\u7406
smfcore.storagePos
=
\u
5E93
\u
4F4D
\u
7BA1
\u7406
smfcore.menu
=
\u
83DC
\u5355\u
7BA1
\u7406
smfcore.materiel
=
\u
7269\u6599
\u
7BA1
\u7406
smfcore.materiel
=
\u
6863\u6848
\u
7BA1
\u7406
smfcore.componentParts
=
\u5143\u5668\u
4EF6
smfcore.barcode
=
\u6761\u
5F62
\u7801
smfcore.log
=
\u
65E5
\u
5FD7
\u
7BA1
\u7406
...
...
@@ -91,6 +91,8 @@ smfcore.sysSetting=\u7CFB\u7EDF\u8BBE\u7F6E
smfcore.help
=
\u
5E2E
\u
52A9
smfcore.instruction
=
\u
8BF4
\u
660E
\u
4E66
smfcore.about
=
\u5173\u
4E8E
smfcore.tacticsOuput
=
\u
7B56
\u7565\u
51FA
\u
5E93
smfcore.labelOuput
=
\u7269\u6599\u5206\u
7EC4
...
...
src/main/resources/messages_en_US.properties
查看文件 @
57c9cb3
...
...
@@ -62,14 +62,14 @@ smfcore.checkNg=checking material is ng:{0}
smfcore.loadMaterialFinished
=
Loading material finished: {0}
smfcore.lockMaterial
=
Equipment kanban
smfcore.lightGroup
=
Neo Light Grouping
smfcore.order
=
Work Order
Management
smfcore.order
=
Material
Management
smfcore.workOrder
=
Work Order
smfcore.singleOuput
=
Check to Retrieve
smfcore.system
=
Set
smfcore.bunker
=
SMD BOX Management
smfcore.storagePos
=
Position Management
smfcore.menu
=
Menu Management
smfcore.materiel
=
Material
Management
smfcore.materiel
=
Archives
Management
smfcore.componentParts
=
Component
smfcore.barcode
=
Barcode
smfcore.log
=
Log Management
...
...
@@ -90,4 +90,6 @@ smfcore.outSetting=Material Retrieval Tatic
smfcore.sysSetting
=
System Settings
smfcore.help
=
Help
smfcore.instruction
=
Instruction manual
smfcore.about
=
About
\ No newline at end of file
smfcore.about
=
About
smfcore.tacticsOuput
=
Strategies Retrival
smfcore.labelOuput
=
Material grouping
\ No newline at end of file
src/main/resources/messages_ja_JP.properties
查看文件 @
57c9cb3
...
...
@@ -62,14 +62,14 @@ smfcore.checkNg=\u30C7\u30D0\u30A4\u30B9\u306E\u8A8D\u8A3C\u306B\u5931\u6557\u30
smfcore.loadMaterialFinished
=
\u
30C7
\u
30D0
\u
30A4
\u
30B9
\u
306E
\u
8AAD
\u
307F
\u
8FBC
\u
307F
\u
5B8C
\u
4E86
\u
FF1A{0}
smfcore.lockMaterial
=
\u
8A2D
\u5099\u
304B
\u3093\u3070\u3093
smfcore.lightGroup
=
\u
30E9
\u
30C3
\u
30AF
\u
306E
\u
30B0
\u
30EB
\u
30FC
\u
30D4
\u
30F3
\u
30B0
smfcore.order
=
\u
4F5C
\u
696D
\u6307\u
793A
\u
7BA1
\u7406
smfcore.workOrder
=
\u
4F5C
\u
696D
\u6307\u
793A
smfcore.order
=
\u
30DE
\u
30C6
\u
30EA
\u
30A2
\u
30EB
\u
30DE
\u
30CD
\u
30B8
\u
30E1
\u
30F3
\u
30C8
smfcore.workOrder
=
\u
30EF
\u
30FC
\u
30AF
\u
30AA
\u
30FC
\u
30C0
\u
30FC
\u
30A2
\u
30A6
\u
30C8
smfcore.singleOuput
=
\u
8ABF
\u3079\u
308B
smfcore.system
=
\u
8A2D
\u
5B9A
smfcore.bunker
=
\u
30B5
\u
30A4
\u
30ED
\u
7BA1
\u7406
smfcore.storagePos
=
\u
30B9
\u
30C8
\u
30EC
\u
30FC
\u
30B8
\u
7BA1
\u7406
smfcore.menu
=
\u
30E1
\u
30CB
\u
30E5
\u
30FC
\u
7BA1
\u7406
smfcore.materiel
=
\u
30
DE
\u
30C6
\u
30EA
\u
30A2
\u
30EB
\u
30DE
\u
30CD
\u
30B8
\u
30E1
\u
30F3
\u
30C8
smfcore.materiel
=
\u
30
A2
\u
30FC
\u
30AB
\u
30A4
\u
30D6
\u
7BA1
\u7406
smfcore.componentParts
=
\u
30B3
\u
30F3
\u
30DD
\u
30FC
\u
30CD
\u
30F3
\u
30C8
smfcore.barcode
=
\u
30D0
\u
30FC
\u
30B3
\u
30FC
\u
30C9
smfcore.log
=
\u
30ED
\u
30B0
\u
7BA1
\u7406
...
...
@@ -90,4 +90,6 @@ smfcore.outSetting=\u30A2\u30A6\u30C8\u30D0\u30A6\u30F3\u30C9\u6226\u7565
smfcore.sysSetting
=
\u
30B7
\u
30B9
\u
30C6
\u
30E0
\u
8A2D
\u
5B9A
smfcore.help
=
\u
30D8
\u
30EB
\u
30D7
smfcore.instruction
=
\u
53D6
\u6271\u
8AAC
\u
660E
\u
66F8
smfcore.about
=
\u
306B
\u3064\u3044\u3066
\ No newline at end of file
smfcore.about
=
\u
306B
\u3064\u3044\u3066
smfcore.tacticsOuput
=
\u
30B9
\u
30C8
\u
30E9
\u
30C6
\u
30B8
\u
30FC
\u
306F
\u5728\u
5EAB
\u5207\u
308C
\u3067\u3059
smfcore.labelOuput
=
\u6750\u6599\u
306E
\u
30B0
\u
30EB
\u
30FC
\u
30D7
\u5316
\ No newline at end of file
src/main/resources/messages_zh_CN.properties
查看文件 @
57c9cb3
...
...
@@ -62,14 +62,14 @@ smfcore.checkNg=\u8BBE\u5907\u9A8C\u8BC1\u5931\u8D25:{0}
smfcore.loadMaterialFinished
=
\u
8BBE
\u5907\u
52A0
\u
8F7D
\u
5B8C
\u6210
: {0}
smfcore.lockMaterial
=
\u
8BBE
\u5907\u
770B
\u
677F
smfcore.lightGroup
=
\u6599\u
67B6
\u5206\u
7EC4
smfcore.order
=
\u
5DE5
\u5355
\u
7BA1
\u7406
smfcore.workOrder
=
\u
5DE5
\u5355
smfcore.order
=
\u
7269\u6599
\u
7BA1
\u7406
smfcore.workOrder
=
\u
5DE5
\u5355
\u
51FA
\u
5E93
smfcore.singleOuput
=
\u
67E5
\u
627E
\u
51FA
\u
5E93
smfcore.system
=
\u
8BBE
\u
7F6E
smfcore.bunker
=
\u6599\u
4ED3
\u
7BA1
\u7406
smfcore.storagePos
=
\u
5E93
\u
4F4D
\u
7BA1
\u7406
smfcore.menu
=
\u
83DC
\u5355\u
7BA1
\u7406
smfcore.materiel
=
\u
7269\u6599
\u
7BA1
\u7406
smfcore.materiel
=
\u
6863\u6848
\u
7BA1
\u7406
smfcore.componentParts
=
\u5143\u5668\u
4EF6
smfcore.barcode
=
\u6761\u
5F62
\u7801
smfcore.log
=
\u
65E5
\u
5FD7
\u
7BA1
\u7406
...
...
@@ -91,3 +91,5 @@ smfcore.sysSetting=\u7CFB\u7EDF\u8BBE\u7F6E
smfcore.help
=
\u
5E2E
\u
52A9
smfcore.instruction
=
\u
8BF4
\u
660E
\u
4E66
smfcore.about
=
\u5173\u
4E8E
smfcore.tacticsOuput
=
\u
7B56
\u7565\u
51FA
\u
5E93
smfcore.labelOuput
=
\u7269\u6599\u5206\u
7EC4
\ No newline at end of file
src/main/resources/messages_zh_TW.properties
查看文件 @
57c9cb3
...
...
@@ -62,14 +62,14 @@ smfcore.checkNg=\u8A2D\u5099\u9A57\u8B49\u5931\u6557:{0}
smfcore.loadMaterialFinished
=
\u
8A2D
\u5099\u
52A0
\u
8F09
\u
5B8C
\u6210
: {0}
smfcore.lockMaterial
=
\u
8A2D
\u5099\u
770B
\u
677F
smfcore.lightGroup
=
\u6599\u
67B6
\u5206\u
7D44
smfcore.order
=
\u
5DE5
\u
55AE
\u
7BA1
\u7406
smfcore.workOrder
=
\u
5DE5
\u
55AE
smfcore.order
=
\u
7269\u6599
\u
7BA1
\u7406
smfcore.workOrder
=
\u
5DE5
\u
55AE
\u
51FA
\u
5EAB
smfcore.singleOuput
=
\u
67E5
\u
627E
\u
51FA
\u
5EAB
smfcore.system
=
\u
8A2D
\u
7F6E
smfcore.bunker
=
\u6599\u5009\u
7BA1
\u7406
smfcore.storagePos
=
\u
5EAB
\u
4F4D
\u
7BA1
\u7406
smfcore.menu
=
\u
83DC
\u
55AE
\u
7BA1
\u7406
smfcore.materiel
=
\u
7269\u6599
\u
7BA1
\u7406
smfcore.materiel
=
\u
6A94
\u6848
\u
7BA1
\u7406
smfcore.componentParts
=
\u5143\u5668\u
4EF6
smfcore.barcode
=
\u
689D
\u
5F62
\u
78BC
smfcore.log
=
\u
65E5
\u
5FD7
\u
7BA1
\u7406
...
...
@@ -90,4 +90,6 @@ smfcore.outSetting=\u51FA\u5EAB\u7B56\u7565
smfcore.sysSetting
=
\u
7CFB
\u
7D71
\u
8A2D
\u
7F6E
smfcore.help
=
\u
5E6B
\u
52A9
smfcore.instruction
=
\u
8AAA
\u
660E
\u
66F8
smfcore.about
=
\u
95DC
\u
65BC
\ No newline at end of file
smfcore.about
=
\u
95DC
\u
65BC
smfcore.tacticsOuput
=
\u
7B56
\u7565\u
51FA
\u
5EAB
smfcore.labelOuput
=
\u7269\u6599\u5206\u
7D44
\ No newline at end of file
编写
预览
支持
Markdown
格式
附加文件
你添加了
0
人
到此讨论。请谨慎行事。
Finish editing this message first!
Cancel
请
注册
或
登录
后发表评论