Skip to content
切换导航条
切换导航条
当前项目
正在载入...
登录
孙克
/
smf-core
转到一个项目
切换导航栏
切换导航栏固定状态
项目
群组
代码片段
帮助
项目
活动
版本库
流水线
图表
问题
0
合并请求
0
维基
网络
创建新的问题
作业
提交
问题看板
文件
提交
网络
比较
分支
标签
Commit 102bc5b0
由
zshaohui
编写于
2025-07-23 09:38:47 +0800
浏览文件
选项
浏览文件
标签
下载
电子邮件补丁
差异文件
1.增加虚拟仓功能
2.nexim增加用户名和密码配置
1 个父辈
47f1f5dd
全部展开
隐藏空白字符变更
内嵌
并排
正在显示
32 个修改的文件
包含
261 行增加
和
45 行删除
src/main/java/com/neotel/smfcore/core/barcode/enums/BARCODE_SOURCE.java
src/main/java/com/neotel/smfcore/core/barcode/rest/bean/dto/BarcodeDto.java
src/main/java/com/neotel/smfcore/core/barcode/service/po/Barcode.java
src/main/java/com/neotel/smfcore/core/device/bean/MsgInfo.java
src/main/java/com/neotel/smfcore/core/device/bean/StatusBean.java
src/main/java/com/neotel/smfcore/core/device/handler/impl/XLCBoxHandler.java
src/main/java/com/neotel/smfcore/core/device/rest/dto/XLCPosBarcodeDto.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/order/rest/OrderController.java
src/main/java/com/neotel/smfcore/core/storage/rest/MaterialBoxController.java
src/main/java/com/neotel/smfcore/core/storage/rest/StorageController.java
src/main/java/com/neotel/smfcore/core/storage/rest/StoragePosController.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/util/DevicesStatusUtil.java
src/main/java/com/neotel/smfcore/core/system/util/TaskService.java
src/main/java/com/neotel/smfcore/core/virtual/controller/VirtualOperateController.java
src/main/java/com/neotel/smfcore/core/virtual/util/ShortUniqueCodeUtil.java
src/main/java/com/neotel/smfcore/custom/fuji/FujiApi.java
src/main/java/com/neotel/smfcore/custom/fuji/bean/FujiConfig.java
src/main/java/com/neotel/smfcore/custom/fuji/config/FujiUrlConfig.java
src/main/java/com/neotel/smfcore/custom/fuji/controller/FujiController.java
src/main/java/com/neotel/smfcore/security/rest/bean/dto/UserDto.java
src/main/java/com/neotel/smfcore/security/service/manager/impl/UserManagerImpl.java
src/main/resources/messages.properties
src/main/resources/messages_de_DE.properties
src/main/resources/messages_en_US.properties
src/main/resources/messages_fr_FR.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/core/barcode/enums/BARCODE_SOURCE.java
查看文件 @
102bc5b
...
...
@@ -6,4 +6,6 @@ public class BARCODE_SOURCE {
//虚拟仓
public
static
final
String
VIRTUAL
=
"virtual"
;
public
static
final
String
ALL
=
"ALL"
;
}
src/main/java/com/neotel/smfcore/core/barcode/rest/bean/dto/BarcodeDto.java
查看文件 @
102bc5b
...
...
@@ -208,8 +208,8 @@ public class BarcodeDto implements Serializable {
private
Date
openTime
;
@ApiModelProperty
(
"描述"
)
private
String
describe
;
//
@ApiModelProperty("描述")
//
private String describe;
@ApiModelProperty
(
"器件厚度"
)
private
String
thickness
=
""
;
...
...
src/main/java/com/neotel/smfcore/core/barcode/service/po/Barcode.java
查看文件 @
102bc5b
...
...
@@ -217,7 +217,7 @@ public class Barcode extends BasePo implements Serializable {
/**
* 描述
*/
private
String
describe
;
//
private String describe;
/**
* 厚度
* 请选择
...
...
@@ -237,6 +237,11 @@ public class Barcode extends BasePo implements Serializable {
private
Map
<
String
,
Object
>
appendData
=
new
HashMap
<>();
/**
* 是否自动创建
*/
private
boolean
autoCreate
=
false
;
/**
* 添加或更新自定义附加信息
* @param appendKey
* @param appendValue
...
...
@@ -493,6 +498,32 @@ public class Barcode extends BasePo implements Serializable {
return
null
;
}
public
Barcode
getSubCodeByMpn
(
String
mpn
)
{
if
(
subCodeList
==
null
)
{
return
null
;
}
for
(
Barcode
barcode
:
subCodeList
)
{
if
(
mpn
.
equals
(
barcode
.
getMpn
()))
{
return
barcode
;
}
}
return
null
;
}
public
Barcode
getSubCodeByBarcodeId
(
String
id
)
{
if
(
subCodeList
==
null
)
{
return
null
;
}
for
(
Barcode
barcode
:
subCodeList
)
{
if
(
barcode
.
getId
().
equals
(
id
))
{
return
barcode
;
}
}
return
null
;
}
public
void
UpdateSubCode
(
Barcode
barcode
)
{
if
(
subCodeList
==
null
)
{
...
...
src/main/java/com/neotel/smfcore/core/device/bean/MsgInfo.java
查看文件 @
102bc5b
...
...
@@ -5,6 +5,8 @@ import lombok.Data;
import
lombok.NoArgsConstructor
;
import
java.io.Serializable
;
import
java.util.Date
;
@Data
@AllArgsConstructor
@NoArgsConstructor
...
...
@@ -51,4 +53,9 @@ public class MsgInfo implements Serializable {
* 模块
*/
private
String
moudle
=
""
;
/**
* 当前收到时间
*/
private
long
lastReceiveTime
=
System
.
currentTimeMillis
();
}
src/main/java/com/neotel/smfcore/core/device/bean/StatusBean.java
查看文件 @
102bc5b
...
...
@@ -771,7 +771,7 @@ public class StatusBean {
}
if
(
msgArray
.
length
==
1
)
{
msgList
.
add
(
new
MsgInfo
(
msg
,
msgType
,
msgEn
,
msgJp
,
msgCode
,
msgParam
,
""
,
""
,
""
));
msgList
.
add
(
new
MsgInfo
(
msg
,
msgType
,
msgEn
,
msgJp
,
msgCode
,
msgParam
,
""
,
""
,
""
,
System
.
currentTimeMillis
()
));
}
else
{
msgList
.
add
(
new
MsgInfo
(
msg
,
msgType
));
}
...
...
src/main/java/com/neotel/smfcore/core/device/handler/impl/XLCBoxHandler.java
查看文件 @
102bc5b
...
...
@@ -123,7 +123,7 @@ public class XLCBoxHandler extends BaseDeviceHandler {
dto
.
setBarcode
(
barcode
.
getBarcode
());
dto
.
setPartNumber
(
barcode
.
getPartNumber
());
dto
.
setId
(
barcode
.
getId
());
dto
.
set
Describe
(
barcode
.
getDescribe
());
dto
.
set
Memo
(
barcode
.
getMemo
());
return
dto
;
}
...
...
src/main/java/com/neotel/smfcore/core/device/rest/dto/XLCPosBarcodeDto.java
查看文件 @
102bc5b
...
...
@@ -22,7 +22,7 @@ public class XLCPosBarcodeDto implements Serializable {
private
int
amount
;
@ApiModelProperty
(
"描述"
)
private
String
describe
;
private
String
memo
;
/**
* 料箱中的物料信息
*/
...
...
src/main/java/com/neotel/smfcore/core/device/util/DataCache.java
查看文件 @
102bc5b
...
...
@@ -476,7 +476,7 @@ public class DataCache {
/**
* 入库时增加使用库位列表
*/
p
rivate
void
addUsedPosList
(
String
cid
,
StoragePos
pos
)
{
p
ublic
void
addUsedPosList
(
String
cid
,
StoragePos
pos
)
{
Map
<
String
,
StoragePos
>
usedPosList
=
getUsedPosList
(
cid
);
usedPosList
.
put
(
pos
.
getPosName
(),
pos
);
usedPosMap
.
put
(
cid
,
usedPosList
);
...
...
src/main/java/com/neotel/smfcore/core/order/LiteOrderCache.java
查看文件 @
102bc5b
此文件的差异被折叠,
点击展开。
src/main/java/com/neotel/smfcore/core/order/rest/OrderController.java
查看文件 @
102bc5b
...
...
@@ -322,25 +322,24 @@ public class OrderController {
for
(
Map
<
String
,
StoragePos
>
list
:
allPosLists
)
{
for
(
StoragePos
pos
:
list
.
values
())
{
boolean
isItemPos
=
false
;
if
(
ObjectUtil
.
isNotEmpty
(
item
.
getRi
()))
{
if
(
pos
.
getBarcode
().
getBarcode
().
equals
(
item
.
getRi
()))
{
isItemPos
=
true
;
}
}
else
if
(
ObjectUtil
.
isNotEmpty
(
item
.
getPn
()))
{
if
(
ObjectUtil
.
isNotEmpty
(
pos
.
getBarcode
().
getPartNumber
())
&&
pos
.
getBarcode
().
getPartNumber
().
startsWith
(
item
.
getPn
()))
{
isItemPos
=
true
;
}
}
else
if
(
ObjectUtil
.
isNotEmpty
(
item
.
getMpn
()))
{
if
(
ObjectUtil
.
isNotEmpty
(
pos
.
getBarcode
().
getMpn
())
&&
pos
.
getBarcode
().
getMpn
().
equals
(
item
.
getMpn
()))
{
isItemPos
=
true
;
}
}
boolean
isItemPos
=
isItemPos
(
item
,
pos
.
getBarcode
());
if
(
isItemPos
)
{
inventoryReelCount
+=
1
;
inventoryQty
+=
pos
.
getBarcode
().
getAmount
();
}
else
{
Barcode
barcode
=
pos
.
getBarcode
();
if
(
barcode
!=
null
){
List
<
Barcode
>
subCodeList
=
barcode
.
getSubCodeList
();
if
(
subCodeList
!=
null
&&
!
subCodeList
.
isEmpty
()){
for
(
Barcode
subCode
:
subCodeList
)
{
boolean
isItemBox
=
isItemPos
(
item
,
subCode
);
if
(
isItemBox
){
inventoryReelCount
+=
1
;
inventoryQty
+=
subCode
.
getAmount
();
}
}
}
}
}
}
}
...
...
@@ -798,4 +797,22 @@ public class OrderController {
List
<
String
>
allLineList
=
liteOrderManager
.
findAllLines
();
return
allLineList
;
}
private
boolean
isItemPos
(
LiteOrderItem
item
,
Barcode
barcode
)
{
boolean
isItemPos
=
false
;
if
(
ObjectUtil
.
isNotEmpty
(
item
.
getRi
()))
{
if
(
barcode
.
getBarcode
().
equals
(
item
.
getRi
()))
{
isItemPos
=
true
;
}
}
else
if
(
ObjectUtil
.
isNotEmpty
(
item
.
getPn
()))
{
if
(
ObjectUtil
.
isNotEmpty
(
barcode
.
getPartNumber
())
&&
barcode
.
getPartNumber
().
startsWith
(
item
.
getPn
()))
{
isItemPos
=
true
;
}
}
else
if
(
ObjectUtil
.
isNotEmpty
(
item
.
getMpn
()))
{
if
(
ObjectUtil
.
isNotEmpty
(
barcode
.
getMpn
())
&&
barcode
.
getMpn
().
equals
(
item
.
getMpn
()))
{
isItemPos
=
true
;
}
}
return
isItemPos
;
}
}
src/main/java/com/neotel/smfcore/core/storage/rest/MaterialBoxController.java
查看文件 @
102bc5b
...
...
@@ -109,7 +109,7 @@ public class MaterialBoxController {
if
(
describe
==
null
){
throw
new
ValidateException
(
"smfcore.valueCanotNull"
,
"{0}不能为空"
,
new
String
[]{
"describe"
}
);
}
barcode
.
set
Describe
(
describe
);
barcode
.
set
Memo
(
describe
);
barcodeManager
.
saveBarcode
(
barcode
);
log
.
info
(
"更改料盒["
+
code
+
"]的描述信息为:"
+
describe
);
return
ResultBean
.
newOkResult
(
""
);
...
...
@@ -544,7 +544,7 @@ public class MaterialBoxController {
* @param opQty 数量
* @throws ValidateException
*/
private
void
finishTask
(
Barcode
pidBarcode
,
int
opType
,
DataLog
currentTask
,
Barcode
subBarcode
,
int
opQty
)
throws
ValidateException
{
private
synchronized
void
finishTask
(
Barcode
pidBarcode
,
int
opType
,
DataLog
currentTask
,
Barcode
subBarcode
,
int
opQty
)
throws
ValidateException
{
//更新barcode缓存
...
...
@@ -599,7 +599,7 @@ public class MaterialBoxController {
task
=
dataLogManager
.
save
(
task
);
taskService
.
moveTaskToFinished
(
task
);
//
dataCache.updateInventoryAmount(task.getCid(), subBarcode.getPartNumber(), opQty);
// dataCache.updateInventoryAmount(task.getCid(), subBarcode.getPartNumber(), opQty);
}
}
src/main/java/com/neotel/smfcore/core/storage/rest/StorageController.java
查看文件 @
102bc5b
...
...
@@ -198,7 +198,10 @@ public class StorageController {
List
<
Storage
>
allStorages
=
storageManager
.
findAll
();
List
<
Storage
>
myStorages
=
new
ArrayList
<>();
for
(
Storage
s
:
allStorages
)
{
if
(
BARCODE_SOURCE
.
VIRTUAL
.
equals
(
type
)){
if
(
BARCODE_SOURCE
.
ALL
.
equals
(
type
)){
}
else
if
(
BARCODE_SOURCE
.
VIRTUAL
.
equals
(
type
)){
if
(!
s
.
isVirtual
()){
continue
;
}
...
...
src/main/java/com/neotel/smfcore/core/storage/rest/StoragePosController.java
查看文件 @
102bc5b
...
...
@@ -15,6 +15,7 @@ import com.neotel.smfcore.core.barcode.enums.BARCODE_SOURCE;
import
com.neotel.smfcore.core.barcode.rest.bean.dto.BarcodeDto
;
import
com.neotel.smfcore.core.barcode.rest.bean.dto.CodeDto
;
import
com.neotel.smfcore.core.barcode.rest.bean.mapstruct.CodeMapper
;
import
com.neotel.smfcore.core.barcode.service.manager.IBarcodeManager
;
import
com.neotel.smfcore.core.barcode.service.po.Barcode
;
import
com.neotel.smfcore.core.barcode.utils.CodeResolve
;
import
com.neotel.smfcore.core.device.util.DataCache
;
...
...
@@ -54,6 +55,7 @@ import java.io.IOException;
import
java.text.DateFormat
;
import
java.text.SimpleDateFormat
;
import
java.util.*
;
import
java.util.stream.Collectors
;
@Slf4j
@RestController
...
...
@@ -79,6 +81,9 @@ public class StoragePosController {
@Autowired
private
CodeMapper
codeMapper
;
@Autowired
private
IBarcodeManager
barcodeManager
;
@ApiOperation
(
"查询库位"
)
@GetMapping
...
...
@@ -568,8 +573,10 @@ public class StoragePosController {
String
isSingleOutStr
=
checkOutDto
.
getSingleOut
();
boolean
isSingleOut
=
Boolean
.
valueOf
(
isSingleOutStr
);
List
<
String
>
needOutPosIdList
=
new
ArrayList
<>();
for
(
String
pid
:
checkOutDto
.
getPids
())
{
StoragePos
pos
=
storagePosManager
.
get
(
pid
);
StoragePos
pos
=
storagePosManager
.
get
ByBarcodeId
(
pid
);
if
(
pos
==
null
)
{
//throw new ValidateException("smfcore.valueNotExist", "{0}[{1}]不存在", new String[]{"pid", pid});
// throw new ValidateException("位置[" + pid + "]不存在");
...
...
@@ -591,7 +598,7 @@ public class StoragePosController {
//如果料仓不可用,不能出库
if
(!
storage
.
isVirtual
())
{
if
(!
dataCache
.
StorageIsAvailable
(
storage
))
{
throw
new
ValidateException
(
"smfcore.storage.notAvailable"
,
"料仓{0}离线或不可用,无法出库"
,
new
String
[]{
storage
.
getName
()});
//
throw new ValidateException("smfcore.storage.notAvailable", "料仓{0}离线或不可用,无法出库", new String[]{storage.getName()});
}
}
...
...
@@ -600,11 +607,29 @@ public class StoragePosController {
// if(!result) {
// throw new ValidateException("smfcore.error.getMaterialLot.out", "条码[{0}]验证失败,无法出库", new String[]{pos.getBarcode().getBarcode()});
// }
//判断是属于料箱还是物料
List
<
Barcode
>
subCodeList
=
posBarcode
.
getSubCodeList
();
if
(
subCodeList
!=
null
&&
!
subCodeList
.
isEmpty
()){
Barcode
subCode
=
posBarcode
.
getSubCodeByBarcodeId
(
pid
);
if
(
subCode
!=
null
){
subCode
.
updateAppendData
(
"awaiting"
,
subCode
.
getAmount
());
barcodeManager
.
save
(
subCode
);
posBarcode
.
UpdateSubCode
(
subCode
);
barcodeManager
.
save
(
posBarcode
);
pos
.
setBarcode
(
posBarcode
);
storagePosManager
.
save
(
pos
);
}
}
log
.
info
(
"手动出库:出库料仓【"
+
storage
.
getName
()
+
"_"
+
storage
.
getCid
()
+
"】位置仓位【"
+
pos
.
getPosName
()
+
"】"
);
String
outResult
=
taskService
.
checkout
(
storage
,
pos
,
isSingleOut
,
SecurityUtils
.
getCurrentUsername
());
if
(!
Strings
.
isNullOrEmpty
(
outResult
))
{
throw
new
ValidateException
(
"smfcore.error"
,
outResult
);
needOutPosIdList
.
add
(
pos
.
getId
());
}
if
(
needOutPosIdList
!=
null
&&
!
needOutPosIdList
.
isEmpty
()){
needOutPosIdList
=
needOutPosIdList
.
stream
().
distinct
().
collect
(
Collectors
.
toList
());
for
(
String
posId
:
needOutPosIdList
)
{
StoragePos
pos
=
storagePosManager
.
get
(
posId
);
Storage
storage
=
dataCache
.
getStorageById
(
pos
.
getStorageId
());
taskService
.
checkout
(
storage
,
pos
,
isSingleOut
,
SecurityUtils
.
getCurrentUsername
());
}
}
return
ResultBean
.
newOkResult
(
""
);
...
...
src/main/java/com/neotel/smfcore/core/storage/service/manager/IStoragePosManager.java
查看文件 @
102bc5b
...
...
@@ -95,5 +95,9 @@ public interface IStoragePosManager extends IBaseManager<StoragePos> {
StoragePos
findOne
(
Query
query
);
Sort
getSortByCheckOutType
(
CHECKOUT_TYPE
checkoutType
);
Sort
getSortByCheckOutType
(
CHECKOUT_TYPE
checkoutType
);
List
<
StoragePos
>
findPosListByPartNumber
(
List
<
String
>
storageIdList
,
String
pn
,
Collection
<
String
>
excludePosIds
,
CHECKOUT_TYPE
checkOutType
,
Map
<
String
,
String
>
appendData
);
List
<
StoragePos
>
findPosListByMpn
(
List
<
String
>
availableStorageIds
,
String
mpn
,
Collection
<
String
>
excludePosIds
,
CHECKOUT_TYPE
checkoutType
,
Map
<
String
,
String
>
appendDate
);
}
src/main/java/com/neotel/smfcore/core/storage/service/manager/impl/StoragePosManagerImpl.java
查看文件 @
102bc5b
此文件的差异被折叠,
点击展开。
src/main/java/com/neotel/smfcore/core/system/util/DevicesStatusUtil.java
查看文件 @
102bc5b
...
...
@@ -171,6 +171,9 @@ public class DevicesStatusUtil {
// return statusBean;
// }
//缓存信息
private
static
Map
<
String
,
List
<
MsgInfo
>>
cacheMsgMap
=
Maps
.
newConcurrentMap
();
/**
* 更新客户端发上来的消息(设备故障等消息)
*/
...
...
@@ -195,6 +198,38 @@ public class DevicesStatusUtil {
}
}
if
(
newMsg
)
{
List
<
MsgInfo
>
cacheMsgList
=
cacheMsgMap
.
get
(
cid
);
if
(
cacheMsgList
==
null
||
cacheMsgList
.
isEmpty
())
{
cacheMsgList
=
new
ArrayList
<>();
}
List
<
MsgInfo
>
newCacheList
=
new
ArrayList
<>();
for
(
MsgInfo
msgInfo
:
cacheMsgList
)
{
if
(
System
.
currentTimeMillis
()
-
msgInfo
.
getLastReceiveTime
()
>
1000
*
60
*
5
)
{
continue
;
}
String
msgKey
=
msg
.
getMsgKey
();
String
msgStr
=
msg
.
getMsg
();
if
(
StringUtils
.
isNotEmpty
(
msgKey
))
{
if
(
msgKey
.
equals
(
msgInfo
.
getMsgKey
()))
{
newMsg
=
false
;
msgInfo
.
setLastReceiveTime
(
System
.
currentTimeMillis
());
}
}
if
(
StringUtils
.
isNotEmpty
(
msgStr
))
{
if
(
msgStr
.
equals
(
msgInfo
.
getMsg
()))
{
newMsg
=
false
;
msgInfo
.
setLastReceiveTime
(
System
.
currentTimeMillis
());
}
}
newCacheList
.
add
(
msgInfo
);
}
if
(
newMsg
){
newCacheList
.
add
(
msg
);
}
cacheMsgMap
.
put
(
cid
,
newCacheList
);
}
if
(
newMsg
)
{
String
msgType
=
msg
.
getType
();
if
(
ObjectUtil
.
isEmpty
(
msgType
)){
msgType
=
MessageType
.
ERROR
.
name
();
...
...
src/main/java/com/neotel/smfcore/core/system/util/TaskService.java
查看文件 @
102bc5b
此文件的差异被折叠,
点击展开。
src/main/java/com/neotel/smfcore/core/virtual/controller/VirtualOperateController.java
查看文件 @
102bc5b
此文件的差异被折叠,
点击展开。
src/main/java/com/neotel/smfcore/core/virtual/util/ShortUniqueCodeUtil.java
0 → 100644
查看文件 @
102bc5b
package
com
.
neotel
.
smfcore
.
core
.
virtual
.
util
;
import
java.util.concurrent.atomic.AtomicInteger
;
public
class
ShortUniqueCodeUtil
{
// 使用36进制(0-9,a-z)可以表示更多组合
private
static
final
int
RADIX
=
36
;
// 最后时间戳和序列号
private
static
volatile
long
lastTimestamp
=
0L
;
private
static
final
AtomicInteger
sequence
=
new
AtomicInteger
(
0
);
// 序列号最大值(保留2位36进制数)
private
static
final
int
MAX_SEQUENCE
=
RADIX
*
RADIX
;
/**
* 生成6位不重复的唯一码
*
* @return 6位36进制的唯一码(包含数字和小写字母)
*/
public
static
synchronized
String
generate
()
{
long
currentTime
=
System
.
currentTimeMillis
();
// 如果同一毫秒内,增加序列号
if
(
currentTime
==
lastTimestamp
)
{
int
seq
=
sequence
.
incrementAndGet
();
if
(
seq
>=
MAX_SEQUENCE
)
{
// 序列号用尽,等待到下一毫秒
while
(
currentTime
<=
lastTimestamp
)
{
currentTime
=
System
.
currentTimeMillis
();
}
sequence
.
set
(
0
);
}
}
else
{
sequence
.
set
(
0
);
}
lastTimestamp
=
currentTime
;
// 将时间戳和序列号转换为36进制字符串
String
timePart
=
Long
.
toString
(
currentTime
,
RADIX
);
String
seqPart
=
String
.
format
(
"%02d"
,
sequence
.
get
());
// 组合并确保长度为6
String
fullCode
=
timePart
+
seqPart
;
if
(
fullCode
.
length
()
>
6
)
{
fullCode
=
fullCode
.
substring
(
fullCode
.
length
()
-
6
);
}
else
if
(
fullCode
.
length
()
<
6
)
{
fullCode
=
String
.
format
(
"%6s"
,
fullCode
).
replace
(
' '
,
'0'
);
}
return
fullCode
;
}
}
src/main/java/com/neotel/smfcore/custom/fuji/FujiApi.java
查看文件 @
102bc5b
...
...
@@ -182,8 +182,8 @@ public class FujiApi extends BaseSmfApiListener {
*/
public
String
getAccessToken
()
{
Map
<
String
,
Object
>
paramMap
=
new
HashMap
<>();
paramMap
.
put
(
"userName"
,
FujiUrlConfig
.
userName
);
paramMap
.
put
(
"password"
,
FujiUrlConfig
.
password
);
paramMap
.
put
(
"userName"
,
getAuthUserName
()
);
paramMap
.
put
(
"password"
,
getAuthPassword
()
);
String
paramStr
=
JSON
.
toJSONString
(
paramMap
);
log
.
info
(
"获取Fuji的token参数为:"
+
paramStr
);
String
accessToken
=
""
;
...
...
@@ -218,6 +218,22 @@ public class FujiApi extends BaseSmfApiListener {
return
config
.
getAuthUrl
();
}
private
String
getAuthUserName
(){
FujiConfig
config
=
dataCache
.
getCache
(
FujiCacheConfig
.
FujiConfig_Cache_Name
);
if
(
config
==
null
)
{
config
=
new
FujiConfig
();
}
return
config
.
getUserName
();
}
private
String
getAuthPassword
(){
FujiConfig
config
=
dataCache
.
getCache
(
FujiCacheConfig
.
FujiConfig_Cache_Name
);
if
(
config
==
null
)
{
config
=
new
FujiConfig
();
}
return
config
.
getPassword
();
}
private
String
getInventoryDids
(){
FujiConfig
config
=
dataCache
.
getCache
(
FujiCacheConfig
.
FujiConfig_Cache_Name
);
if
(
config
==
null
)
{
...
...
src/main/java/com/neotel/smfcore/custom/fuji/bean/FujiConfig.java
查看文件 @
102bc5b
...
...
@@ -7,6 +7,8 @@ import java.util.Date;
@Data
public
class
FujiConfig
{
private
String
authUrl
=
""
;
private
String
userName
=
""
;
private
String
password
=
""
;
private
String
getDidInfoUrl
=
""
;
private
String
registerDidInfoUrl
=
""
;
private
String
result
=
""
;
...
...
src/main/java/com/neotel/smfcore/custom/fuji/config/FujiUrlConfig.java
查看文件 @
102bc5b
...
...
@@ -7,9 +7,9 @@ public class FujiUrlConfig {
//private static final String baseUrl = "http://175.41.238.212/fujiopenwebapi/api/v1";
public
static
final
String
userName
=
"Neotel"
;
//
public static final String userName = "Neotel";
public
static
final
String
password
=
"Neotel"
;
//
public static final String password = "Neotel";
//private static final String authLogin = "/auth/login";
...
...
src/main/java/com/neotel/smfcore/custom/fuji/controller/FujiController.java
查看文件 @
102bc5b
...
...
@@ -62,6 +62,8 @@ public class FujiController {
config
.
setInputEto
(
newConfig
.
getInputEto
());
config
.
setOutputEtn
(
newConfig
.
getOutputEtn
());
config
.
setTime
(
newConfig
.
getTime
());
config
.
setUserName
(
newConfig
.
getUserName
());
config
.
setPassword
(
newConfig
.
getPassword
());
dataCache
.
updateCache
(
FujiCacheConfig
.
FujiConfig_Cache_Name
,
config
);
return
ResultBean
.
newOkResult
(
""
);
}
...
...
@@ -85,6 +87,8 @@ public class FujiController {
dto
.
setTime
(
config
.
getTime
());
dto
.
setEtnUpdateDateStr
(
getUpdateDate
(
config
.
getOutputEtn
()));
dto
.
setEtoUpdateDateStr
(
getUpdateDate
(
config
.
getInputEto
()));
dto
.
setUserName
(
config
.
getUserName
());
dto
.
setPassword
(
config
.
getPassword
());
return
ResultBean
.
newOkResult
(
dto
);
}
...
...
src/main/java/com/neotel/smfcore/security/rest/bean/dto/UserDto.java
查看文件 @
102bc5b
...
...
@@ -58,4 +58,9 @@ public class UserDto implements Serializable {
@ApiModelProperty
(
"语言名称:简体中文,繁体中文 等"
)
private
String
lanName
;
@ApiModelProperty
(
"激活码"
)
private
String
checkCode
;
@ApiModelProperty
(
"是否启用"
)
private
boolean
active
=
false
;
}
src/main/java/com/neotel/smfcore/security/service/manager/impl/UserManagerImpl.java
查看文件 @
102bc5b
...
...
@@ -238,6 +238,15 @@ public class UserManagerImpl implements IUserManager {
dtos
.
get
(
i
).
setRoleName
(
role
.
getName
());
}
}
String
username
=
dtos
.
get
(
i
).
getUsername
();
String
checkCode
=
dtos
.
get
(
i
).
getCheckCode
();
if
(
Constants
.
SUPER_USERNAME
.
equals
(
username
)){
dtos
.
get
(
i
).
setActive
(
true
);
}
else
{
if
(
StringUtils
.
isNotEmpty
(
checkCode
)){
dtos
.
get
(
i
).
setActive
(
true
);
}
}
}
return
dtos
;
}
...
...
src/main/resources/messages.properties
查看文件 @
102bc5b
...
...
@@ -433,4 +433,5 @@ smfcore.virtualLocationManager=\u865A\u62DF\u5E93\u4F4D\u7BA1\u7406
smfcore.virtualOperations
=
\u
865A
\u
62DF
\u
4ED3
\u
64CD
\u
4F5C
smfcore.equipment.view.ncgroup
=
Neo Counter
smfcore.virtual.boxInPos
=
[{0}]
\u
5DF2
\u5728\u
5E93
\u
4F4D[{1}]
\u
4E2D,
\u
8BF7
\u5148\u
53D6
\u
51FA
smfcore.virtual.quantityError
=
\u
53D6
\u
51FA
\u6570\u
91CF
\u
5E94
\u
4E3A[{0}]
\ No newline at end of file
smfcore.virtual.quantityError
=
\u
53D6
\u
51FA
\u6570\u
91CF
\u
5E94
\u
4E3A[{0}]
smfcode.virtual.enter
=
\u
8BF7
\u
626B
\u
63CF
\u6216\u
8F93
\u5165\u6761\u7801\u
540E
\u6309\u
56DE
\u
8F66
\u
786E
\u
8BA4
\ No newline at end of file
src/main/resources/messages_de_DE.properties
查看文件 @
102bc5b
...
...
@@ -423,4 +423,5 @@ smfcore.virtualLocationManager=Verwaltung virtueller Lagerpl\u00E4tze
smfcore.virtualOperations
=
Vorg
\u
00E4nge im virtuellen Lager
smfcore.equipment.view.ncgroup
=
Neo Counter
smfcore.virtual.boxInPos
=
[{0}] befindet sich bereits im Lagerplatz [{1}]. Bitte entnehmen Sie es zuerst
smfcore.virtual.quantityError
=
Die zu entnehmende Menge sollte [{0}] betragen
\ No newline at end of file
smfcore.virtual.quantityError
=
Die zu entnehmende Menge sollte [{0}] betragen
smfcode.virtual.enter
=
Bitte scannen Sie den Barcode oder geben Sie ihn ein und best
\u
00E4tigen Sie mit Enter
\ No newline at end of file
src/main/resources/messages_en_US.properties
查看文件 @
102bc5b
...
...
@@ -146,7 +146,7 @@ smfcore.translation=Resource Translation
smfcore.languageCanotNull
=
Language type cannot be empty
smfcore.noLanguageSetAccess
=
No permission to edit the language
smfcore.languageCanotRemoveAll
=
Cannot delete all languages
smfcore.solderPaste
=
Solder Paste
smfcore.solderPaste
=
Solder Paste
Management
smfcore.solderPasteKanban
=
Equipment Overview
smfcore.solderPasteManage
=
Inventory
smfcore.solderPasteData
=
Traceability
...
...
@@ -424,4 +424,5 @@ smfcore.virtualLocationManager=Virtual Location Mgmt
smfcore.virtualOperations
=
Virtual Storage Op
smfcore.equipment.view.ncgroup
=
Neo Counter
smfcore.virtual.boxInPos
=
[{0}] is already in location [{1}]. Please remove it first
smfcore.virtual.quantityError
=
The quantity to be removed should be [{0}]
\ No newline at end of file
smfcore.virtual.quantityError
=
The quantity to be removed should be [{0}]
smfcode.virtual.enter
=
Please scan or enter the barcode, then press Enter
\ No newline at end of file
src/main/resources/messages_fr_FR.properties
查看文件 @
102bc5b
...
...
@@ -423,4 +423,5 @@ smfcore.virtualLocationManager=Gestion des emplacements virtuels
smfcore.virtualOperations
=
Op
\u
00E9rations de l'entrep
\u
00F4t virtuel
smfcore.equipment.view.ncgroup
=
Neo Counter
smfcore.virtual.boxInPos
=
[{0}] est d
\u
00E9j
\u
00E0 dans l'emplacement [{1}]. Veuillez d'abord le retirer
smfcore.virtual.quantityError
=
La quantit
\u
00E9
\u
00E0 retirer doit
\u
00EAtre [{0}]
\ No newline at end of file
smfcore.virtual.quantityError
=
La quantit
\u
00E9
\u
00E0 retirer doit
\u
00EAtre [{0}]
smfcode.virtual.enter
=
Veuillez scanner ou saisir le code-barres, puis appuyer sur Entr
\u
00E9e
\ No newline at end of file
src/main/resources/messages_ja_JP.properties
查看文件 @
102bc5b
...
...
@@ -420,4 +420,5 @@ smfcore.virtualLocationManager=\u4EEE\u60F3\u30ED\u30B1\u30FC\u30B7\u30E7\u30F3\
smfcore.virtualOperations
=
\u
4EEE
\u
60F3
\u5009\u
5EAB
\u
64CD
\u
4F5C
smfcore.equipment.view.ncgroup
=
Neo Counter
smfcore.virtual.boxInPos
=
[{0}]
\u
306F
\u
65E2
\u
306B
\u
30ED
\u
30B1
\u
30FC
\u
30B7
\u
30E7
\u
30F3 [{1}]
\u
306B
\u3042\u
308A
\u
307E
\u3059\u3002\u5148\u
306B
\u
53D6
\u
308A
\u
51FA
\u3057\u3066\u
304F
\u3060\u3055\u3044
smfcore.virtual.quantityError
=
\u
53D6
\u
308A
\u
51FA
\u3057\u6570\u
91CF
\u
306F[{0}]
\u3067\u3042\u
308B
\u
5FC5
\u8981\u
304C
\u3042\u
308A
\u
307E
\u3059
\ No newline at end of file
smfcore.virtual.quantityError
=
\u
53D6
\u
308A
\u
51FA
\u3057\u6570\u
91CF
\u
306F[{0}]
\u3067\u3042\u
308B
\u
5FC5
\u8981\u
304C
\u3042\u
308A
\u
307E
\u3059
smfcode.virtual.enter
=
\u
30D0
\u
30FC
\u
30B3
\u
30FC
\u
30C9
\u3092\u
30B9
\u
30AD
\u
30E3
\u
30F3
\u3001\u
307E
\u
305F
\u
306F
\u5165\u
529B
\u
5F8C
\u3001
Enter
\u
30AD
\u
30FC
\u3092\u
62BC
\u3057\u3066\u
304F
\u3060\u3055\u3044
\ No newline at end of file
src/main/resources/messages_zh_CN.properties
查看文件 @
102bc5b
...
...
@@ -420,4 +420,5 @@ smfcore.virtualLocationManager=\u865A\u62DF\u5E93\u4F4D\u7BA1\u7406
smfcore.virtualOperations
=
\u
865A
\u
62DF
\u
4ED3
\u
64CD
\u
4F5C
smfcore.equipment.view.ncgroup
=
Neo Counter
smfcore.virtual.boxInPos
=
[{0}]
\u
5DF2
\u5728\u
5E93
\u
4F4D[{1}]
\u
4E2D,
\u
8BF7
\u5148\u
53D6
\u
51FA
smfcore.virtual.quantityError
=
\u
53D6
\u
51FA
\u6570\u
91CF
\u
5E94
\u
4E3A[{0}]
\ No newline at end of file
smfcore.virtual.quantityError
=
\u
53D6
\u
51FA
\u6570\u
91CF
\u
5E94
\u
4E3A[{0}]
smfcode.virtual.enter
=
\u
8BF7
\u
626B
\u
63CF
\u6216\u
8F93
\u5165\u6761\u7801\u
540E
\u6309\u
56DE
\u
8F66
\u
786E
\u
8BA4
\ No newline at end of file
src/main/resources/messages_zh_TW.properties
查看文件 @
102bc5b
...
...
@@ -420,4 +420,5 @@ smfcore.virtualLocationManager=\u865B\u64EC\u5EAB\u4F4D\u7BA1\u7406
smfcore.virtualOperations
=
\u
865B
\u
64EC
\u5009\u
64CD
\u
4F5C
smfcore.equipment.view.ncgroup
=
Neo Counter
smfcore.virtual.boxInPos
=
[{0}]
\u
5DF2
\u5728\u
5EAB
\u
4F4D[{1}]
\u
4E2D,
\u
8ACB
\u5148\u
53D6
\u
51FA
smfcore.virtual.quantityError
=
\u
53D6
\u
51FA
\u6578\u
91CF
\u
61C9
\u
70BA[{0}]
\ No newline at end of file
smfcore.virtual.quantityError
=
\u
53D6
\u
51FA
\u6578\u
91CF
\u
61C9
\u
70BA[{0}]
smfcode.virtual.enter
=
\u
8ACB
\u6383\u
63CF
\u6216\u
8F38
\u5165\u
689D
\u
78BC
\u
5F8C
\u6309\u
56DE
\u
8ECA
\u
78BA
\u
8A8D
\ No newline at end of file
编写
预览
支持
Markdown
格式
附加文件
你添加了
0
人
到此讨论。请谨慎行事。
Finish editing this message first!
Cancel
请
注册
或
登录
后发表评论