Skip to content
切换导航条
切换导航条
当前项目
正在载入...
登录
孙克
/
SmdBox
转到一个项目
切换导航栏
切换导航栏固定状态
项目
群组
代码片段
帮助
项目
活动
版本库
流水线
图表
问题
0
合并请求
0
维基
网络
创建新的问题
作业
提交
问题看板
文件
提交
网络
比较
分支
标签
Commit 5dabe5bb
由
sunke
编写于
2020-06-11 11:28:52 +0800
浏览文件
选项
浏览文件
标签
下载
电子邮件补丁
差异文件
条码解析添加MSL解析
1 个父辈
788296b6
隐藏空白字符变更
内嵌
并排
正在显示
4 个修改的文件
包含
28 行增加
和
5 行删除
myproject/src/main/java/com/myproject/bean/update/Barcode.java
myproject/src/main/java/com/myproject/util/BarcodeRule.java
myproject/src/main/java/com/myproject/webapp/controller/webService/TaskService.java
myproject/src/main/webapp/WEB-INF/pages/component/storagePosFind.jsp
myproject/src/main/java/com/myproject/bean/update/Barcode.java
查看文件 @
5dabe5b
...
@@ -42,6 +42,8 @@ public class Barcode extends BaseMongoBean {
...
@@ -42,6 +42,8 @@ public class Barcode extends BaseMongoBean {
private
int
height
;
private
int
height
;
private
String
provider
;
private
String
provider
;
private
String
batch
;
private
String
batch
;
private
String
msl
;
//备用字段1(配套单号))或 family
//备用字段1(配套单号))或 family
private
String
otherField1
;
private
String
otherField1
;
//备用字段2 (产品型号)
//备用字段2 (产品型号)
...
@@ -540,6 +542,14 @@ public class Barcode extends BaseMongoBean {
...
@@ -540,6 +542,14 @@ public class Barcode extends BaseMongoBean {
this
.
onlySingleOut
=
onlySingleOut
;
this
.
onlySingleOut
=
onlySingleOut
;
}
}
public
String
getMsl
()
{
return
msl
;
}
public
void
setMsl
(
String
msl
)
{
this
.
msl
=
msl
;
}
// public void setNoChangeField(Barcode oldBarcode){
// public void setNoChangeField(Barcode oldBarcode){
// if(oldBarcode != null){
// if(oldBarcode != null){
// this.expireDate = oldBarcode.getExpireDate();
// this.expireDate = oldBarcode.getExpireDate();
...
...
myproject/src/main/java/com/myproject/util/BarcodeRule.java
查看文件 @
5dabe5b
...
@@ -21,7 +21,8 @@ import java.util.Date;
...
@@ -21,7 +21,8 @@ import java.util.Date;
* PRODATE为生产日期xxPRODATEyyyyMMdd
* PRODATE为生产日期xxPRODATEyyyyMMdd
* EXPDATE为过期日期xxxEXPDATEyyyyMMdd
* EXPDATE为过期日期xxxEXPDATEyyyyMMdd
* SP 为供应商,
* SP 为供应商,
* BATCH 为批次,
* BATCH 为批次
* MSL 为MSL等级
*
*
*
*
* 其中必须含有PN和 RI, QTY为空时使用产品档案的封装数量,如果字段前或者后有无用字符,可使用 x(一个字符) 替代
* 其中必须含有PN和 RI, QTY为空时使用产品档案的封装数量,如果字段前或者后有无用字符,可使用 x(一个字符) 替代
...
@@ -112,6 +113,12 @@ public class BarcodeRule {
...
@@ -112,6 +113,12 @@ public class BarcodeRule {
}
}
}
}
if
(!
newRule
.
msl_item
.
hasThisField
()){
if
(
newRule
.
msl_item
.
matchRule
(
fieldValue
,
i
)){
log
.
info
(
"MSL: 为"
+
newRule
.
msl_item
.
toString
());
}
}
if
(!
newRule
.
produceDate_item
.
hasThisField
()){
if
(!
newRule
.
produceDate_item
.
hasThisField
()){
if
(
newRule
.
produceDate_item
.
matchRule
(
fieldValue
,
i
)){
if
(
newRule
.
produceDate_item
.
matchRule
(
fieldValue
,
i
)){
...
@@ -176,6 +183,7 @@ public class BarcodeRule {
...
@@ -176,6 +183,7 @@ public class BarcodeRule {
private
RuleItem
expireDay_item
=
new
RuleItem
(
"EXPD"
);
private
RuleItem
expireDay_item
=
new
RuleItem
(
"EXPD"
);
private
RuleItem
supplier_item
=
new
RuleItem
(
"SP"
);
private
RuleItem
supplier_item
=
new
RuleItem
(
"SP"
);
private
RuleItem
batch_item
=
new
RuleItem
(
"BATCH"
);
private
RuleItem
batch_item
=
new
RuleItem
(
"BATCH"
);
private
RuleItem
msl_item
=
new
RuleItem
(
"MSL"
);
private
class
RuleItem
{
private
class
RuleItem
{
private
RuleItem
(
String
ruleName
)
{
private
RuleItem
(
String
ruleName
)
{
...
@@ -474,6 +482,7 @@ public class BarcodeRule {
...
@@ -474,6 +482,7 @@ public class BarcodeRule {
}
}
}
}
String
supplier
=
supplier_item
.
getStrValue
(
codeArr
);
String
supplier
=
supplier_item
.
getStrValue
(
codeArr
);
String
msl
=
msl_item
.
getStrValue
(
codeArr
);
//南瑞使用整个条码作为唯一码
//南瑞使用整个条码作为唯一码
if
(
DataCache
.
isProductionFor
(
DataCache
.
CUSTOMER
.
NANRUI
)){
if
(
DataCache
.
isProductionFor
(
DataCache
.
CUSTOMER
.
NANRUI
)){
...
@@ -490,6 +499,7 @@ public class BarcodeRule {
...
@@ -490,6 +499,7 @@ public class BarcodeRule {
b
.
setProvider
(
supplier
);
b
.
setProvider
(
supplier
);
b
.
setPlateSize
(
reelWidth
);
b
.
setPlateSize
(
reelWidth
);
b
.
setHeight
(
reelHeight
);
b
.
setHeight
(
reelHeight
);
b
.
setMsl
(
msl
);
codeBean
.
setBarcode
(
b
);
codeBean
.
setBarcode
(
b
);
return
codeBean
;
return
codeBean
;
...
@@ -544,7 +554,7 @@ public class BarcodeRule {
...
@@ -544,7 +554,7 @@ public class BarcodeRule {
codeStr
=
")》@06@120S002@P8908018028@1PBLM18PG121SH1D@31PBLM18PG121SH1D@12V690588124@10VJPN-AM@2P@20P@6D192400@14D210205@30PY@Z1@K0@16K0@V97294419@3SS191908055X1Z@Q4000NAR000@20T1@1TAM961458E@2T@1Z@@"
;
codeStr
=
")》@06@120S002@P8908018028@1PBLM18PG121SH1D@31PBLM18PG121SH1D@12V690588124@10VJPN-AM@2P@20P@6D192400@14D210205@30PY@Z1@K0@16K0@V97294419@3SS191908055X1Z@Q4000NAR000@20T1@1TAM961458E@2T@1Z@@"
;
// codeStr = "=1+0x0-0x0=A0002";
// codeStr = "=1+0x0-0x0=A0002";
//阳光电源
//阳光电源
rule
=
"[RI]_PN_
PRODATEyyMMdd
_QTYxxxx"
;
rule
=
"[RI]_PN_
3
_QTYxxxx"
;
//rule = "[RI]_PN_PRODATEyyMMdd_QTY[0:5:4]";
//rule = "[RI]_PN_PRODATEyyMMdd_QTY[0:5:4]";
codeStr
=
"4500065747_CS000069_180101_030000041"
;
codeStr
=
"4500065747_CS000069_180101_030000041"
;
codeStr
=
"4500089600_DC000045_190528_003000006"
;
codeStr
=
"4500089600_DC000045_190528_003000006"
;
...
@@ -558,7 +568,7 @@ public class BarcodeRule {
...
@@ -558,7 +568,7 @@ public class BarcodeRule {
System
.
out
.
println
(
"RI:"
+
b
.
getBarcode
());
System
.
out
.
println
(
"RI:"
+
b
.
getBarcode
());
System
.
out
.
println
(
"Amount:"
+
b
.
getAmount
());
System
.
out
.
println
(
"Amount:"
+
b
.
getAmount
());
System
.
out
.
println
(
"BATCH:"
+
b
.
getBatch
());
System
.
out
.
println
(
"BATCH:"
+
b
.
getBatch
());
System
.
out
.
println
(
"
PRODATE:"
+
b
.
getProduceDate
());
System
.
out
.
println
(
"
MSL:"
+
b
.
getMsl
());
System
.
out
.
println
(
"EXPDATE:"
+
b
.
getExpireDate
());
System
.
out
.
println
(
"EXPDATE:"
+
b
.
getExpireDate
());
}
else
{
}
else
{
log
.
info
(
"解析失败"
);
log
.
info
(
"解析失败"
);
...
...
myproject/src/main/java/com/myproject/webapp/controller/webService/TaskService.java
查看文件 @
5dabe5b
...
@@ -936,7 +936,7 @@ public class TaskService implements ITaskService {
...
@@ -936,7 +936,7 @@ public class TaskService implements ITaskService {
statusBean
.
setMsg
(
""
);
statusBean
.
setMsg
(
""
);
//料柜
//料柜
if
(
storage
.
isCabinet
()
||
storage
.
isShelf
()
||
storage
.
isAccShelf
()){
if
(
storage
.
isCabinet
()
||
storage
.
isShelf
()
||
storage
.
isAccShelf
()
||
storage
.
isCodeShelf
()
){
String
cardResult
=
statusBean
.
getFromData
(
"cardResult"
);
String
cardResult
=
statusBean
.
getFromData
(
"cardResult"
);
if
(!
Strings
.
isNullOrEmpty
(
cardResult
)){
if
(!
Strings
.
isNullOrEmpty
(
cardResult
)){
//写入卡片完成,后续再加密解密,暂就先使用用户名=授权码
//写入卡片完成,后续再加密解密,暂就先使用用户名=授权码
...
...
myproject/src/main/webapp/WEB-INF/pages/component/storagePosFind.jsp
查看文件 @
5dabe5b
...
@@ -176,6 +176,8 @@
...
@@ -176,6 +176,8 @@
${pos.barcode.partNumber}
${pos.barcode.partNumber}
</display:column>
</display:column>
<display:column property="barcode.provider" titleKey="barcode.provider"/>
<display:column titleKey="inOutList.type">
<display:column titleKey="inOutList.type">
<c:if test="${pos.barcode.type == 0 || empty pos.barcode.type}"><fmt:message key="inOutList.type.component"/></c:if>
<c:if test="${pos.barcode.type == 0 || empty pos.barcode.type}"><fmt:message key="inOutList.type.component"/></c:if>
<c:if test="${pos.barcode.type == 1}"><fmt:message key="inOutList.type.solder"/></c:if>
<c:if test="${pos.barcode.type == 1}"><fmt:message key="inOutList.type.solder"/></c:if>
...
@@ -183,7 +185,8 @@
...
@@ -183,7 +185,8 @@
<c:if test="${pos.barcode.type == 3}"><fmt:message key="inOutList.type.others"/></c:if>
<c:if test="${pos.barcode.type == 3}"><fmt:message key="inOutList.type.others"/></c:if>
<c:if test="${pos.barcode.type == 4}"><fmt:message key="inOutList.type.fixture"/></c:if>
<c:if test="${pos.barcode.type == 4}"><fmt:message key="inOutList.type.fixture"/></c:if>
</display:column>
</display:column>
<display:column property="barcode.barcode" titleKey="barcode.barcode"/>
<display:column property="barcode.barcode" titleKey="barcode.barcode" sortable="true" sortProperty="barcode.barcode"/>
<display:column property="barcode.msl" titleKey="component.msl" sortable="true" sortProperty="barcode.msl"/>
<%--<display:column property="barcode.inFixture" titleKey="storagePosFind.inFixture"/>--%>
<%--<display:column property="barcode.inFixture" titleKey="storagePosFind.inFixture"/>--%>
<display:column property="barcode.batch" titleKey="barcode.batch" sortable="true" sortProperty="barcode.batch"/>
<display:column property="barcode.batch" titleKey="barcode.batch" sortable="true" sortProperty="barcode.batch"/>
<%--<display:column property="barcode.providerNumber" titleKey="component.providerNumber"/>--%>
<%--<display:column property="barcode.providerNumber" titleKey="component.providerNumber"/>--%>
...
...
编写
预览
支持
Markdown
格式
附加文件
你添加了
0
人
到此讨论。请谨慎行事。
Finish editing this message first!
Cancel
请
注册
或
登录
后发表评论