Skip to content
切换导航条
切换导航条
当前项目
正在载入...
登录
孙克
/
smf-core
转到一个项目
切换导航栏
切换导航栏固定状态
项目
群组
代码片段
帮助
项目
活动
版本库
流水线
图表
问题
0
合并请求
0
维基
网络
创建新的问题
作业
提交
问题看板
文件
提交
网络
比较
分支
标签
Commit 0bda093e
由
zshaohui
编写于
2023-12-06 11:28:45 +0800
浏览文件
选项
浏览文件
标签
下载
电子邮件补丁
差异文件
根据条码信息获取条码规则
1 个父辈
380b6519
显示空白字符变更
内嵌
并排
正在显示
2 个修改的文件
包含
6 行增加
和
3 行删除
src/main/java/com/neotel/smfcore/core/barcode/bean/BarcodeRule.java
src/main/java/com/neotel/smfcore/core/barcode/rest/BarcodeController.java
src/main/java/com/neotel/smfcore/core/barcode/bean/BarcodeRule.java
查看文件 @
0bda093
...
@@ -841,6 +841,8 @@ public class BarcodeRule {
...
@@ -841,6 +841,8 @@ public class BarcodeRule {
rule
=
"EXPDATEyyMMdd[12:0:-1]|BATCH[2:0:-1]|QTY[2:0:-1]|RI[2:0:-1]|PN[1:0:-1]|MPN[-1:0:2]"
;
rule
=
"EXPDATEyyMMdd[12:0:-1]|BATCH[2:0:-1]|QTY[2:0:-1]|RI[2:0:-1]|PN[1:0:-1]|MPN[-1:0:2]"
;
// rule="PN[1:0:-1]|BATCH[2:0:-1]|LOT[2:0:-1]|QTY[2_7Q:0:-1]|RI[1:0:-1]|SP[3:0:-1]|PRODATEyyyyMMdd[2:0:-1]|xxx";
// rule="PN[1:0:-1]|BATCH[2:0:-1]|LOT[2:0:-1]|QTY[2_7Q:0:-1]|RI[1:0:-1]|SP[3:0:-1]|PRODATEyyyyMMdd[2:0:-1]|xxx";
codeStr
=
"L00002019090199951797;E2019-09-01 0365;B8C.R2003.V81506072019090103000;R506072019102200356"
;
rule
=
"BATCH;PRODATEyyyy-MM-dd[1:10:-1];QTY[27:4:-1]SP[13:5:-1]PN[1:12:-1];RI"
;
BarcodeRule
br
=
BarcodeRule
.
newRule
(
rule
);
BarcodeRule
br
=
BarcodeRule
.
newRule
(
rule
);
Barcode
b
=
br
.
toCodeBean
(
codeStr
).
getBarcode
();
Barcode
b
=
br
.
toCodeBean
(
codeStr
).
getBarcode
();
if
(
b
!=
null
){
if
(
b
!=
null
){
...
@@ -881,7 +883,7 @@ public class BarcodeRule {
...
@@ -881,7 +883,7 @@ public class BarcodeRule {
}
}
p
rivate
static
String
toCodeRule
(
String
codeStr
,
Map
<
String
,
String
>
fieldValueMap
){
p
ublic
static
String
toCodeRule
(
String
codeStr
,
Map
<
String
,
String
>
fieldValueMap
){
String
separator
=
findSeparator
(
codeStr
);
String
separator
=
findSeparator
(
codeStr
);
String
[]
codeArr
=
new
String
[]{
codeStr
};
String
[]
codeArr
=
new
String
[]{
codeStr
};
if
(!
Strings
.
isNullOrEmpty
(
separator
)){
if
(!
Strings
.
isNullOrEmpty
(
separator
)){
...
...
src/main/java/com/neotel/smfcore/core/barcode/rest/BarcodeController.java
查看文件 @
0bda093
...
@@ -17,6 +17,7 @@ import com.neotel.smfcore.core.barcode.service.po.Barcode;
...
@@ -17,6 +17,7 @@ import com.neotel.smfcore.core.barcode.service.po.Barcode;
import
com.neotel.smfcore.core.barcode.utils.QrcodeUtils
;
import
com.neotel.smfcore.core.barcode.utils.QrcodeUtils
;
import
com.neotel.smfcore.core.device.util.DataCache
;
import
com.neotel.smfcore.core.device.util.DataCache
;
import
com.neotel.smfcore.core.system.service.po.Settings
;
import
com.neotel.smfcore.core.system.service.po.Settings
;
import
com.neotel.smfcore.security.annotation.AnonymousAccess
;
import
com.neotel.smfcore.security.bean.FileProperties
;
import
com.neotel.smfcore.security.bean.FileProperties
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
io.swagger.annotations.ApiOperation
;
...
@@ -181,12 +182,12 @@ public class BarcodeController {
...
@@ -181,12 +182,12 @@ public class BarcodeController {
}
}
/*
@ApiOperation("根据条码信息获取条码规则")
@ApiOperation
(
"根据条码信息获取条码规则"
)
@PostMapping
(
value
=
"getBarcodeRule"
)
@PostMapping
(
value
=
"getBarcodeRule"
)
public
ResultBean
getBarcodeRule
(
@RequestBody
Map
<
String
,
String
>
paramMap
)
{
public
ResultBean
getBarcodeRule
(
@RequestBody
Map
<
String
,
String
>
paramMap
)
{
String
ruleStr
=
BarcodeRule
.
toCodeRule
(
paramMap
.
get
(
"codeStr"
),
paramMap
);
String
ruleStr
=
BarcodeRule
.
toCodeRule
(
paramMap
.
get
(
"codeStr"
),
paramMap
);
return
ResultBean
.
newOkResult
(
ruleStr
);
return
ResultBean
.
newOkResult
(
ruleStr
);
}
*/
}
protected
String
handleBarcode
(
String
fileURL
)
throws
Exception
{
protected
String
handleBarcode
(
String
fileURL
)
throws
Exception
{
...
...
编写
预览
支持
Markdown
格式
附加文件
你添加了
0
人
到此讨论。请谨慎行事。
Finish editing this message first!
Cancel
请
注册
或
登录
后发表评论