Skip to content
切换导航条
切换导航条
当前项目
正在载入...
登录
孙克
/
QisdaNew
转到一个项目
切换导航栏
切换导航栏固定状态
项目
群组
代码片段
帮助
项目
活动
版本库
流水线
图表
问题
0
合并请求
0
维基
网络
创建新的问题
作业
提交
问题看板
文件
提交
网络
比较
分支
标签
Commit 992fe842
由
sunke
编写于
2020-03-24 15:19:38 +0800
浏览文件
选项
浏览文件
标签
下载
电子邮件补丁
差异文件
移远料号转换
1 个父辈
da060140
显示空白字符变更
内嵌
并排
正在显示
6 个修改的文件
包含
95 行增加
和
8 行删除
myproject/src/main/java/com/myproject/util/BarcodeRule.java
myproject/src/main/java/com/myproject/webapp/controller/qisda/DifferentInventoryController.java
myproject/src/main/java/com/myproject/webapp/controller/webService/DataCache.java
myproject/src/main/java/com/myproject/webapp/controller/webService/QisdaApiController.java
myproject/src/main/webapp/WEB-INF/pages/dataLog/dataLogSearch.jsp
myproject/src/main/webapp/WEB-INF/pages/storage/allBoxView.jsp
myproject/src/main/java/com/myproject/util/BarcodeRule.java
查看文件 @
992fe84
...
@@ -4,7 +4,9 @@ import com.google.common.base.Strings;
...
@@ -4,7 +4,9 @@ import com.google.common.base.Strings;
import
com.myproject.api.SmbUtil
;
import
com.myproject.api.SmbUtil
;
import
com.myproject.bean.CodeBean
;
import
com.myproject.bean.CodeBean
;
import
com.myproject.bean.update.Barcode
;
import
com.myproject.bean.update.Barcode
;
import
com.myproject.exception.ApiException
;
import
com.myproject.webapp.controller.webService.DataCache
;
import
com.myproject.webapp.controller.webService.DataCache
;
import
com.myproject.webapp.controller.webService.QisdaApiController
;
import
org.apache.logging.log4j.LogManager
;
import
org.apache.logging.log4j.LogManager
;
import
org.apache.logging.log4j.Logger
;
import
org.apache.logging.log4j.Logger
;
...
@@ -438,6 +440,18 @@ public class BarcodeRule {
...
@@ -438,6 +440,18 @@ public class BarcodeRule {
codeBean
.
setError
(
"条码解析失败,未找到PN字段"
);
codeBean
.
setError
(
"条码解析失败,未找到PN字段"
);
return
codeBean
;
return
codeBean
;
}
}
//移远物料,需要进行料号转换
if
(
partNumber
.
startsWith
(
"QT"
)){
log
.
info
(
"料号["
+
partNumber
+
"]为移远料号,进行料号转换"
);
try
{
partNumber
=
QisdaApiController
.
PartNoMapping
(
partNumber
);
}
catch
(
ApiException
e
)
{
codeBean
.
setError
(
e
.
getMessage
());
return
codeBean
;
}
}
if
(
batch_item
.
hasThisField
()){
if
(
batch_item
.
hasThisField
()){
String
batch
=
batch_item
.
getStrValue
(
codeArr
);
String
batch
=
batch_item
.
getStrValue
(
codeArr
);
b
.
setBatch
(
batch
);
b
.
setBatch
(
batch
);
...
@@ -555,12 +569,14 @@ public class BarcodeRule {
...
@@ -555,12 +569,14 @@ public class BarcodeRule {
// codeStr = "=1+0x0-0x0=A0002";
// codeStr = "=1+0x0-0x0=A0002";
//阳光电源
//阳光电源
//[RI]_PN_PRODATEyyMMdd_QTYxxxx
//[RI]_PN_PRODATEyyMMdd_QTYxxxx
rule
=
"[RI]_PN_PRODATEyyMMdd_QTY[0:5:4]"
;
//
rule = "[RI]_PN_PRODATEyyMMdd_QTY[0:5:4]";
codeStr
=
"4500065747_CS000069_180101_0300000041
"
;
//codeStr = "4500089600_DC000045_190528_003000006
";
//佳世达
//佳世达
rule
=
"BATCH;PRODATEyyyyMMdd[1:8:-1]EXPD[-1:-4:-1];PN[1:12:-1]SP[13:5:-1]QTY[-1:-5:-1];RI"
;
rule
=
"BATCH;PRODATEyyyyMMdd[1:8:-1]EXPD[-1:-4:-1];PN[1:12:-1]SP[13:5:-1]QTY[-1:-5:-1];RI"
;
rule
=
"BATCH;PRODATEyyyyMMdd[1:8:-1]EXPD[-1:-4:-1];PN[1:12:-1]SP[13:5:-1]QTY[-1:-5:-1];RI"
;
codeStr
=
"=7x8=L00002019090199951797;E20190901 0365;B8C.R2003.V81506072019090103000;R506072019102200356"
;
codeStr
=
"=7x8=L00002019090199951797;E20190901 0365;B8C.R2003.V81506072019090103000;R506072019102200356"
;
codeStr
=
"=7x8=L0000000000000BF5NT8R;E20190605 0730 ;B7H.10524.5B1035042019060504000 ;R035042019060510182##"
;
codeStr
=
"=7x8=L0000000000000BF5NT8R;E20190605 0730 ;B7H.10524.5B1035042019060504000 ;R035042019060510182##"
;
codeStr
=
"=7x8=LRC11912020N1OR;E201912030365;BQT001100327706292019121915000;R06292019121900026"
;
BarcodeRule
br
=
BarcodeRule
.
newRule
(
rule
);
BarcodeRule
br
=
BarcodeRule
.
newRule
(
rule
);
Barcode
barcode
=
br
.
toCodeBean
(
codeStr
).
getBarcode
();
Barcode
barcode
=
br
.
toCodeBean
(
codeStr
).
getBarcode
();
if
(
barcode
!=
null
){
if
(
barcode
!=
null
){
...
...
myproject/src/main/java/com/myproject/webapp/controller/qisda/DifferentInventoryController.java
查看文件 @
992fe84
...
@@ -74,7 +74,7 @@ public class DifferentInventoryController extends BaseController {
...
@@ -74,7 +74,7 @@ public class DifferentInventoryController extends BaseController {
DiffInfo
diffInfo
=
new
DiffInfo
();
DiffInfo
diffInfo
=
new
DiffInfo
();
diffInfo
.
setReelId
(
barcode
.
getBarcode
());
diffInfo
.
setReelId
(
barcode
.
getBarcode
());
diffInfo
.
setPn
(
barcode
.
getPartNumber
());
diffInfo
.
setPn
(
barcode
.
getPartNumber
());
diffInfo
.
setQty
(
barcode
.
getAmount
()
+
""
);
diffInfo
.
setQty
(
barcode
.
get
Initial
Amount
()
+
""
);
diffInfo
.
setFacility
(
barcode
.
getAppendInfo
().
getFacility
());
diffInfo
.
setFacility
(
barcode
.
getAppendInfo
().
getFacility
());
diffInfo
.
setLocation
(
storagePos
.
getPosName
());
diffInfo
.
setLocation
(
storagePos
.
getPosName
());
neotelReelMap
.
put
(
barcode
.
getBarcode
(),
diffInfo
);
neotelReelMap
.
put
(
barcode
.
getBarcode
(),
diffInfo
);
...
...
myproject/src/main/java/com/myproject/webapp/controller/webService/DataCache.java
查看文件 @
992fe84
...
@@ -293,6 +293,8 @@ public class DataCache{
...
@@ -293,6 +293,8 @@ public class DataCache{
try
{
try
{
//如果有料盘尺寸,重新设置料盘尺寸信息,没有档案时自动添加档案
//如果有料盘尺寸,重新设置料盘尺寸信息,没有档案时自动添加档案
if
(
codeBeanFromRule
.
hasReelSizeInfo
()){
if
(
codeBeanFromRule
.
hasReelSizeInfo
()){
//log.info("料盘["+barcode.getBarcode()+"]的尺寸信息从["+barcode.getPlateSize()+"x"+barcode.getHeight()+"]设置为["+codeBeanFromRule.getReelWidth()+"x"+codeBeanFromRule.getReelHeight()+"]");
//log.info("料盘["+barcode.getBarcode()+"]的尺寸信息从["+barcode.getPlateSize()+"x"+barcode.getHeight()+"]设置为["+codeBeanFromRule.getReelWidth()+"x"+codeBeanFromRule.getReelHeight()+"]");
Component
component
=
componentManager
.
findByPartNumber
(
barcodeFromRule
.
getPartNumber
());
Component
component
=
componentManager
.
findByPartNumber
(
barcodeFromRule
.
getPartNumber
());
...
...
myproject/src/main/java/com/myproject/webapp/controller/webService/QisdaApiController.java
查看文件 @
992fe84
...
@@ -165,6 +165,7 @@ public class QisdaApiController extends BaseController {
...
@@ -165,6 +165,7 @@ public class QisdaApiController extends BaseController {
@RequestMapping
(
value
=
"/out"
,
method
=
RequestMethod
.
POST
)
@RequestMapping
(
value
=
"/out"
,
method
=
RequestMethod
.
POST
)
@ResponseBody
@ResponseBody
public
Object
out
(
HttpServletRequest
request
)
{
public
Object
out
(
HttpServletRequest
request
)
{
List
<
String
>
failedReelIdList
=
new
ArrayList
<>();
try
{
try
{
String
paramInfo
=
request
.
getParameter
(
"paramInfo"
);
String
paramInfo
=
request
.
getParameter
(
"paramInfo"
);
if
(
Strings
.
isNullOrEmpty
(
paramInfo
)){
if
(
Strings
.
isNullOrEmpty
(
paramInfo
)){
...
@@ -194,10 +195,52 @@ public class QisdaApiController extends BaseController {
...
@@ -194,10 +195,52 @@ public class QisdaApiController extends BaseController {
outInfo
=
outInfoDao
.
save
(
outInfo
);
outInfo
=
outInfoDao
.
save
(
outInfo
);
}
}
}
}
String
reelID
=
outItem
.
getReelID
();
if
(
reelID
!=
null
&&
!
reelID
.
isEmpty
()){
//指定出某盘料或单独出库,如果已经绑定,不允许出,如果未绑定直接进行绑定
StoragePos
pos
=
storagePosDao
.
findByBarcode
(
reelID
);
if
(
pos
!=
null
){
Barcode
barcode
=
pos
.
getBarcode
();
AppendInfo
appendInfo
=
barcode
.
getAppendInfo
();
int
bindSlot
=
Integer
.
valueOf
(
appendInfo
.
getBindSlot
());
if
(
bindSlot
>
0
||
barcode
.
hasCutInfo
()){
//已经真实绑定过
log
.
error
(
"料盘["
+
reelID
+
"]已经真实绑定过,不允许出库"
);
failedReelIdList
.
add
(
reelID
);
}
else
{
//未真实绑定过,可以出库,绑定
appendInfo
.
sethSerial
(
outItem
.
gethSerial
());
appendInfo
.
setRefno
(
outItem
.
getRefno
());
appendInfo
.
setSo
(
"HSerial:"
+
outItem
.
gethSerial
());
appendInfo
.
setSoseq
(
"HSerial:"
+
outItem
.
getSoseq
());
appendInfo
.
setSlotStr
(
outItem
.
getSlotStr
());
appendInfo
.
setBindSlot
(
"1"
);
appendInfo
.
setSlotIndex
(
1
);
barcode
.
setAppendInfo
(
appendInfo
);
pos
.
setBarcode
(
barcode
);
storagePosDao
.
save
(
pos
);
outItem
.
setRealLockQty
(
barcode
.
getAmount
());
outItem
=
outItemDao
.
save
(
outItem
);
outInfo
.
updateItem
(
outItem
);
outInfoMap
.
put
(
hSerial
,
outInfo
);
}
}
else
{
//未找到指定料盘
log
.
error
(
"料盘["
+
reelID
+
"]未找到,可能已经出库,不允许出库"
);
failedReelIdList
.
add
(
reelID
);
}
}
else
{
//不是指定料
outItem
=
outItemDao
.
save
(
outItem
);
outItem
=
outItemDao
.
save
(
outItem
);
outInfo
.
updateItem
(
outItem
);
outInfo
.
updateItem
(
outItem
);
outInfoMap
.
put
(
hSerial
,
outInfo
);
outInfoMap
.
put
(
hSerial
,
outInfo
);
}
}
}
bindOutInfoList
(
outInfoMap
.
values
());
bindOutInfoList
(
outInfoMap
.
values
());
...
@@ -206,6 +249,10 @@ public class QisdaApiController extends BaseController {
...
@@ -206,6 +249,10 @@ public class QisdaApiController extends BaseController {
log
.
error
(
"需求单请求处理出错"
,
e
);
log
.
error
(
"需求单请求处理出错"
,
e
);
return
ResultBean
.
newErrorResult
(
1001
,
"内部错误:"
+
e
.
getMessage
());
return
ResultBean
.
newErrorResult
(
1001
,
"内部错误:"
+
e
.
getMessage
());
}
}
if
(!
failedReelIdList
.
isEmpty
()){
String
data
=
String
.
join
(
";"
,
failedReelIdList
);
return
ResultBean
.
newOkResult
(
data
);
}
return
ResultBean
.
newOkResult
(
""
);
return
ResultBean
.
newOkResult
(
""
);
}
}
...
@@ -342,6 +389,27 @@ public class QisdaApiController extends BaseController {
...
@@ -342,6 +389,27 @@ public class QisdaApiController extends BaseController {
}
}
}
}
/**
* 移远料号转换
*/
public
static
String
PartNoMapping
(
String
vdPartNum
)
throws
ApiException
{
String
url
=
"http://10.85.17.233/ESMTCommonInterface/CommonService.asmx/PartNoMapping"
;
Map
<
String
,
Object
>
paramMap
=
new
HashMap
<
String
,
Object
>();
paramMap
.
put
(
"vdPartNum"
,
vdPartNum
);
log
.
info
(
"从Qisda获取料号转换:vdPartNum="
+
vdPartNum
);
String
result
=
HttpHelper
.
postParam
(
url
,
paramMap
);
log
.
info
(
"从Qisda获取料号转换:(PartNoMapping)返回:"
+
result
);
Map
<
String
,
Object
>
resultMap
=
JsonUtil
.
toMap
(
result
);
String
msg
=
resultMap
.
get
(
"msg"
).
toString
();
if
(
msg
.
startsWith
(
"0"
)){
String
errorMsg
=
"从Qisda获取料号["
+
vdPartNum
+
"]转换出错:"
+
msg
;
log
.
info
(
errorMsg
);
throw
new
ApiException
(
errorMsg
);
}
return
msg
;
}
/**
/**
*
*
...
@@ -633,6 +701,7 @@ public class QisdaApiController extends BaseController {
...
@@ -633,6 +701,7 @@ public class QisdaApiController extends BaseController {
Barcode
barcode
=
pos
.
getBarcode
();
Barcode
barcode
=
pos
.
getBarcode
();
int
totalLockQty
=
outItem
.
getLockQty
()
+
barcode
.
getAmount
();
int
totalLockQty
=
outItem
.
getLockQty
()
+
barcode
.
getAmount
();
if
(
totalLockQty
>
outItem
.
getQty
()){
if
(
totalLockQty
>
outItem
.
getQty
()){
log
.
info
(
"加总数量["
+
totalLockQty
+
"]大于需求数量["
+
outItem
.
getQty
()+
"]跳出第一轮绑定"
);
log
.
info
(
"加总数量["
+
totalLockQty
+
"]大于需求数量["
+
outItem
.
getQty
()+
"]跳出第一轮绑定"
);
break
;
break
;
}
}
...
...
myproject/src/main/webapp/WEB-INF/pages/dataLog/dataLogSearch.jsp
查看文件 @
992fe84
...
@@ -201,7 +201,7 @@
...
@@ -201,7 +201,7 @@
rtl: Metronic.isRTL(),
rtl: Metronic.isRTL(),
orientation: "left",
orientation: "left",
autoclose: true,
autoclose: true,
//
language:'zh-CN'
language:'zh-CN'
});
});
});
});
...
...
myproject/src/main/webapp/WEB-INF/pages/storage/allBoxView.jsp
查看文件 @
992fe84
...
@@ -144,10 +144,10 @@
...
@@ -144,10 +144,10 @@
<div class="bg-primary kabanTitle col-md-12">
<div class="bg-primary kabanTitle col-md-12">
<%--<span><fmt:message key="allBoxView.kanban"/></span>--%>
<%--<span><fmt:message key="allBoxView.kanban"/></span>--%>
<%--<span style="margin-left: 40px;" id="storageTotalPos">总容量:1000</span>--%>
<%--<span style="margin-left: 40px;" id="storageTotalPos">总容量:1000</span>--%>
<
div class="col-md-3"
>
<
%--<div class="col-md-3">--%
>
<
button class="btn yellow outBtn" id="outPn"><i class="fa fa-sign-out"></i><fmt:message key="button.checkout"/></button
>
<
%--<button class="btn yellow outBtn" id="outPn"><i class="fa fa-sign-out"></i><fmt:message key="button.checkout"/></button>--%
>
<
button class="btn yellow outBtn" id="outOrder"><i class="fa fa-sign-out"></i><fmt:message key="工单出库"/></button
>
<
%--<button class="btn yellow outBtn" id="outOrder"><i class="fa fa-sign-out"></i><fmt:message key="工单出库"/></button>--%
>
<
/div
>
<
%--</div>--%
>
<div class="col-md-">
<div class="col-md-">
<div id="lineMsg"></div>
<div id="lineMsg"></div>
</div>
</div>
...
...
编写
预览
支持
Markdown
格式
附加文件
你添加了
0
人
到此讨论。请谨慎行事。
Finish editing this message first!
Cancel
请
注册
或
登录
后发表评论