Skip to content
切换导航条
切换导航条
当前项目
正在载入...
登录
孙克
/
Gree
转到一个项目
切换导航栏
切换导航栏固定状态
项目
群组
代码片段
帮助
项目
活动
版本库
流水线
图表
问题
0
合并请求
0
维基
网络
创建新的问题
作业
提交
问题看板
文件
提交
网络
比较
分支
标签
Commit 60d34fd3
由
sunke
编写于
2021-06-29 10:27:14 +0800
浏览文件
选项
浏览文件
标签
下载
电子邮件补丁
差异文件
流水线在横移上锁定非紧急料架位,当返回码为99时,不放上托盘
需求单出库为0时关闭 执行队列页面显示绑定数量 取消任务时增加PN需求单判断 Http请求增加URLEncode
1 个父辈
dc411eff
隐藏空白字符变更
内嵌
并排
正在显示
12 个修改的文件
包含
284 行增加
和
225 行删除
myproject/src/main/java/com/myproject/util/HttpHelper.java
myproject/src/main/java/com/myproject/util/QisdaApi.java
myproject/src/main/java/com/myproject/webapp/controller/qisda/util/OutInfoCache.java
myproject/src/main/java/com/myproject/webapp/controller/webService/GreeDeviceController.java
myproject/src/main/java/com/myproject/webapp/controller/webService/QisdaApiController.java
myproject/src/main/java/com/myproject/webapp/controller/webService/QisdaBindService.java
myproject/src/main/java/com/myproject/webapp/controller/webService/QisdaDeviceController.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/webapp/WEB-INF/pages/qisda/orderOut.jsp
myproject/src/main/webapp/WEB-INF/pages/qisda/outInfoSearch.jsp
myproject/src/main/webapp/decorators/metro.jsp
myproject/src/main/java/com/myproject/util/HttpHelper.java
查看文件 @
60d34fd
...
...
@@ -18,6 +18,7 @@ import org.apache.logging.log4j.util.Strings;
import
java.io.*
;
import
java.net.URL
;
import
java.net.URLConnection
;
import
java.net.URLEncoder
;
import
java.util.*
;
import
java.util.Map.Entry
;
...
...
@@ -41,7 +42,7 @@ public class HttpHelper {
// return postJson(url,params,null, "http");
// }
public
static
String
get
(
String
url
,
Hash
Map
<
String
,
String
>
params
)
throws
ApiException
{
public
static
String
get
(
String
url
,
Map
<
String
,
String
>
params
)
throws
ApiException
{
return
get
(
url
,
params
,
null
,
"http"
);
}
...
...
@@ -233,7 +234,7 @@ public class HttpHelper {
* 请求协议 "http" / "https"
* @return 服务器响应的请求结果
*/
public
static
String
get
(
String
url
,
Hash
Map
<
String
,
String
>
params
,
public
static
String
get
(
String
url
,
Map
<
String
,
String
>
params
,
HashMap
<
String
,
String
>
cookies
,
String
protocol
)
throws
ApiException
{
// if (protocol.equalsIgnoreCase("https")) {
// Protocol httpsProtocol = new Protocol("https", new SecureProtocolSocketFactoryImpl(), 443);
...
...
@@ -251,7 +252,9 @@ public class HttpHelper {
int
i
=
0
;
while
(
iterator
.
hasNext
())
{
Entry
<
String
,
String
>
entry
=
iterator
.
next
();
data
[
i
]
=
new
NameValuePair
(
entry
.
getKey
(),
entry
.
getValue
());
String
paramValue
=
entry
.
getValue
();
paramValue
=
URLEncoder
.
encode
(
paramValue
);
data
[
i
]
=
new
NameValuePair
(
entry
.
getKey
(),
paramValue
);
++
i
;
}
getMethod
.
setQueryString
(
data
);
...
...
myproject/src/main/java/com/myproject/util/QisdaApi.java
查看文件 @
60d34fd
...
...
@@ -319,93 +319,103 @@ public class QisdaApi {
* 3. CIS入库判定接口 (没绑过料串的条码调用此接口)
*/
public
static
Barcode
VMILocationInCheck
(
Barcode
barcode
)
throws
ValidateException
{
if
(
DataCache
.
isProductionFor
(
DataCache
.
CUSTOMER
.
DEBUG
)){
log
.
info
(
"程序调试阶段,暂不处理,调试完成后更改PRO"
);
return
barcode
;
}
String
url
=
"http://1
0.85.17.233/ESMTCommonInterface/CommonService.asmx/VMILocationInCheck
"
;
//
if(DataCache.isProductionFor(DataCache.CUSTOMER.DEBUG)){
//
log.info("程序调试阶段,暂不处理,调试完成后更改PRO");
//
return barcode;
//
}
String
url
=
"http://1
72.74.1.175:1235/api/SMDBOXAPI
"
;
String
reelid
=
barcode
.
getBarcode
();
String
partNum
=
barcode
.
getPartNumber
();
Map
<
String
,
Object
>
paramMap
=
new
HashMap
<
String
,
Object
>();
Map
<
String
,
String
>
paramMap
=
new
HashMap
<
String
,
String
>();
paramMap
.
put
(
"reelid"
,
reelid
);
paramMap
.
put
(
"partNum"
,
partNum
);
log
.
info
(
"纯入库判断参数:reelid="
+
reelid
+
" partNum="
+
partNum
);
try
{
//0+提示信息/1+工单 0:为NG ;1:为OK 工单号码则表示该料卷被绑定在此工单上;-1为内部异常
String
result
=
HttpHelper
.
postParam
(
url
,
paramMap
);
String
result
=
HttpHelper
.
get
(
url
,
paramMap
);
//String result = "<?xml version=\"1.0\" encoding=\"utf-8\"?><string xmlns=\"http://tempuri.org/\">{\"state\":\"1\",\"msg\":\"入库判定OK\",\"info\":{\"so\":\"2388518\",\"facility\":\"ST\",\"company\":\"BACHS\",\"qty\":\"1\",\"soseq\":\"2092475\",\"slot\":\"5-4\"}}</string>";
log
.
info
(
"收到("
+
reelid
+
")纯入库判定接口返回:"
+
result
);
String
resultStr
=
XmlUtil
.
getNodeBody
(
"string"
,
result
);
//
String resultStr = XmlUtil.getNodeBody("string", result);
//0+提示信息/1/-1 0为NG,1为OK,-1为系统内部异常
Map
<
String
,
Object
>
resultMap
=
JsonUtil
.
toMap
(
result
Str
);
Map
<
String
,
Object
>
resultMap
=
JsonUtil
.
toMap
(
result
);
String
state
=
resultMap
.
get
(
"state"
).
toString
();
if
(
state
.
equals
(
"1"
)){
log
.
info
(
reelid
+
" CIS入库判定: OK"
);
AppendInfo
appendInfo
=
barcode
.
getAppendInfo
();
Object
infoObj
=
resultMap
.
get
(
"info"
);
if
(
infoObj
!=
null
){
log
.
info
(
"写入条码["
+
reelid
+
"]工单数量信息,并清空分盘数据"
);
Map
infoMap
=
(
Map
)
infoObj
;
String
so
=
infoMap
.
get
(
"so"
).
toString
();
//有工单信息,需要绑定工单
String
soseq
=
infoMap
.
get
(
"soseq"
).
toString
();
String
facility
=
infoMap
.
get
(
"facility"
).
toString
();
String
company
=
infoMap
.
get
(
"company"
).
toString
();
String
qty
=
infoMap
.
get
(
"qty"
).
toString
();
String
slot
=
infoMap
.
get
(
"slot"
).
toString
();
Object
slotlocation
=
infoMap
.
get
(
"slotserial"
);
if
(
so
.
equals
(
"0"
)){
so
=
null
;
soseq
=
null
;
slot
=
null
;
Object
qty
=
resultMap
.
get
(
"qty"
);
if
(
qty
!=
null
){
int
amount
=
Integer
.
valueOf
(
qty
.
toString
());
if
(
amount
>
0
){
barcode
.
setAmount
(
amount
);
barcode
.
setInitialAmount
(
amount
);
log
.
info
(
"更新条码["
+
reelid
+
"]数量为:"
+
amount
);
}
appendInfo
.
setCutMap
(
null
);
appendInfo
.
setSo
(
so
);
appendInfo
.
setSoseq
(
soseq
);
appendInfo
.
setSlotStr
(
slot
);
if
(
slotlocation
==
null
||
slotlocation
.
equals
(
"0"
)){
appendInfo
.
setBindSlot
(
null
);
appendInfo
.
setPreBindSlot
(
null
);
appendInfo
.
setSlotIndex
(-
1
);
}
else
{
String
location
=
slotlocation
.
toString
();
log
.
info
(
reelid
+
"数量:"
+
qty
+
"绑定工单"
+
so
+
"["
+
location
+
"]"
);
appendInfo
.
setBindSlot
(
location
);
appendInfo
.
setPreBindSlot
(
location
);
try
{
int
slotIndex
=
Integer
.
valueOf
(
location
);
appendInfo
.
setSlotIndex
(
slotIndex
);
//TODO:需要重新绑定
}
catch
(
Exception
e
){
log
.
error
(
"纯入库判定出错"
,
e
);
}
}
appendInfo
.
setFacility
(
facility
);
appendInfo
.
setCompany
(
company
);
int
amount
=
Integer
.
valueOf
(
qty
);
barcode
.
setAmount
(
amount
);
barcode
.
setInitialAmount
(
amount
);
//绑定工单
// appendInfo.sethSerial(outItem.gethSerial());
// appendInfo.setRefno(outItem.getRefno());
// appendInfo.setSlotIndex(outItem.getSlotlocation());
// barcode.setAppendInfo(appendInfo);
// int realLockQty = outItem.getRealLockQty() + barcode.getAmount();
// outItem.setRealLockQty(realLockQty);
barcode
.
setAppendInfo
(
appendInfo
);
}
// Object infoObj = resultMap.get("info");
// if(infoObj != null){
// log.info("写入条码["+reelid+"]工单数量信息,并清空分盘数据");
// Map infoMap = (Map)infoObj;
// String so = infoMap.get("so").toString();
// //有工单信息,需要绑定工单
// String soseq = infoMap.get("soseq").toString();
// String facility = infoMap.get("facility").toString();
// String company = infoMap.get("company").toString();
// String qty = infoMap.get("qty").toString();
// String slot = infoMap.get("slot").toString();
// Object slotlocation = infoMap.get("slotserial");
//
// if(so.equals("0")){
// so = null;
// soseq = null;
// slot = null;
// }
//
// appendInfo.setCutMap(null);
// appendInfo.setSo(so);
// appendInfo.setSoseq(soseq);
// appendInfo.setSlotStr(slot);
// if(slotlocation == null || slotlocation.equals("0")){
// appendInfo.setBindSlot(null);
// appendInfo.setPreBindSlot(null);
// appendInfo.setSlotIndex(-1);
// }else{
// String location = slotlocation.toString();
// log.info(reelid + "数量:"+ qty + "绑定工单"+ so + "["+location+"]");
// appendInfo.setBindSlot(location);
// appendInfo.setPreBindSlot(location);
// try{
// int slotIndex = Integer.valueOf(location);
// appendInfo.setSlotIndex(slotIndex);
// //TODO:需要重新绑定
//
// }catch (Exception e){
// log.error("纯入库判定出错",e);
// }
// }
//
//
// appendInfo.setFacility(facility);
// appendInfo.setCompany(company);
// int amount = Integer.valueOf(qty);
// barcode.setAmount(amount);
// barcode.setInitialAmount(amount);
//
// //绑定工单
//// appendInfo.sethSerial(outItem.gethSerial());
//// appendInfo.setRefno(outItem.getRefno());
//// appendInfo.setSlotIndex(outItem.getSlotlocation());
//// barcode.setAppendInfo(appendInfo);
//// int realLockQty = outItem.getRealLockQty() + barcode.getAmount();
//// outItem.setRealLockQty(realLockQty);
//
// barcode.setAppendInfo(appendInfo);
// }
}
else
{
log
.
info
(
reelid
+
" 纯入库判定: NG"
+
result
Str
);
log
.
info
(
reelid
+
" 纯入库判定: NG"
+
result
);
String
ngMsg
=
resultMap
.
get
(
"msg"
).
toString
();
throw
new
ValidateException
(
"纯入库判定NG:["
+
state
+
"]"
+
ngMsg
);
}
...
...
@@ -645,31 +655,31 @@ public class QisdaApi {
* @return
*/
public
static
PLATE_SIZE
PartNoRule
(
String
partNum
,
String
vendorCode
){
if
(
DataCache
.
isProductionFor
(
DataCache
.
CUSTOMER
.
DEBUG
)){
log
.
info
(
"程序调试阶段,暂不处理,调试完成后更改PRO"
);
return
null
;
}
String
url
=
"http://10.85.17.233/ESMTCommonInterface/CommonService.asmx/PartNoRule"
;
Map
<
String
,
Object
>
paramMap
=
new
HashMap
<
String
,
Object
>();
paramMap
.
put
(
"partNum"
,
partNum
);
paramMap
.
put
(
"vendorCode"
,
vendorCode
);
try
{
String
result
=
HttpHelper
.
postParam
(
url
,
paramMap
);
log
.
info
(
"从Qisda获取料号"
+
partNum
+
"["
+
vendorCode
+
"]尺寸(PartNoRule)返回:"
+
result
);
Map
<
String
,
Object
>
resultMap
=
JsonUtil
.
toMap
(
result
);
String
code
=
resultMap
.
get
(
"code"
).
toString
();
if
(
code
.
equals
(
"200"
)){
List
<
Map
<
String
,
Object
>>
data
=
(
List
<
Map
<
String
,
Object
>>)
resultMap
.
get
(
"data"
);
for
(
Map
<
String
,
Object
>
itemMap
:
data
)
{
String
w
=
itemMap
.
get
(
"specifications"
).
toString
();
String
h
=
itemMap
.
get
(
"widthSize"
).
toString
();
return
new
PLATE_SIZE
(
Integer
.
valueOf
(
w
),
Integer
.
valueOf
(
h
));
}
}
}
catch
(
ApiException
e
)
{
log
.
error
(
"从Qisda获取料号["
+
partNum
+
"["
+
vendorCode
+
"]尺寸(PartNoRule)接口出错"
,
e
);
}
//
if(DataCache.isProductionFor(DataCache.CUSTOMER.DEBUG)){
//
log.info("程序调试阶段,暂不处理,调试完成后更改PRO");
//
return null;
//
}
//
String url = "http://10.85.17.233/ESMTCommonInterface/CommonService.asmx/PartNoRule";
//
Map<String,Object> paramMap = new HashMap<String,Object>();
//
paramMap.put("partNum",partNum);
//
paramMap.put("vendorCode",vendorCode);
//
//
try {
//
String result = HttpHelper.postParam(url,paramMap);
//
log.info("从Qisda获取料号"+partNum+"["+vendorCode+"]尺寸(PartNoRule)返回:" + result);
//
Map<String, Object> resultMap = JsonUtil.toMap(result);
//
String code = resultMap.get("code").toString();
//
if(code.equals("200")){
//
List<Map<String,Object>> data = (List<Map<String, Object>>) resultMap.get("data");
//
for (Map<String, Object> itemMap : data) {
//
String w = itemMap.get("specifications").toString();
//
String h = itemMap.get("widthSize").toString();
//
return new PLATE_SIZE(Integer.valueOf(w),Integer.valueOf(h));
//
}
//
}
//
} catch (ApiException e) {
//
log.error("从Qisda获取料号["+partNum+"["+vendorCode+"]尺寸(PartNoRule)接口出错",e);
//
}
return
null
;
}
...
...
myproject/src/main/java/com/myproject/webapp/controller/qisda/util/OutInfoCache.java
查看文件 @
60d34fd
...
...
@@ -1159,12 +1159,6 @@ public class OutInfoCache {
msg
=
"需求单"
+
hSerial
+
"任务分配完成,共["
+
outReelNum
+
"]盘任务"
;
log
.
info
(
msg
);
}
else
{
msg
=
"需求单"
+
outInfo
.
gethSerial
()+
"本次出库料盘数量为0"
;
if
(
outInfo
.
isEndOutInfo
()){
log
.
info
(
"需求单["
+
outInfo
.
gethSerial
()+
"]是工单的最后一个需求单,关闭工单"
+
outInfo
.
getSo
()+
"["
+
outInfo
.
getSoseq
()+
"]"
);
closeSoSeq
(
outInfo
.
getSoseq
());
}
}
if
(
outInfo
.
isReelCutAction
()
||
outInfo
.
isFirstReelAction
()){
...
...
@@ -1174,6 +1168,15 @@ public class OutInfoCache {
QisdaApi
.
VMILocationOutFeedback
(
outItemList
,
lessBind
);
}
}
if
(
outReelNum
==
0
){
msg
=
"需求单"
+
outInfo
.
gethSerial
()+
"本次出库料盘数量为0"
;
if
(
outInfo
.
isEndOutInfo
()){
log
.
info
(
"需求单["
+
outInfo
.
gethSerial
()+
"]是工单的最后一个需求单,关闭工单"
+
outInfo
.
getSo
()+
"["
+
outInfo
.
getSoseq
()+
"]"
);
closeSoSeq
(
outInfo
.
getSoseq
());
}
else
{
closeHSerial
(
outInfo
.
gethSerial
());
}
}
return
ResultBean
.
newOkResult
(
msg
,
"ok"
);
}
...
...
myproject/src/main/java/com/myproject/webapp/controller/webService/GreeDeviceController.java
查看文件 @
60d34fd
...
...
@@ -65,7 +65,6 @@ public class GreeDeviceController {
}
}
String
hSerial
=
QisdaCache
.
getCurrentOrderHSerial
();
List
<
String
>
usedRfidList
=
InquiryShelfBean
.
getUsedRfidList
(
hSerial
);
Map
<
String
,
Integer
>
rfidMap
=
new
HashMap
<>();
if
(!
Strings
.
isBlank
(
rfids
))
{
...
...
myproject/src/main/java/com/myproject/webapp/controller/webService/QisdaApiController.java
查看文件 @
60d34fd
...
...
@@ -130,6 +130,8 @@ public class QisdaApiController extends BaseController {
OutInfo
outInfo
=
outInfoCache
.
getOutInfoFromCache
(
hSerial
);
if
(!
Strings
.
isNullOrEmpty
(
line
)
&&
outInfo
!=
null
){
outInfo
.
setLine
(
line
);
outInfo
.
setSdate
(
new
Date
());
outInfo
.
setMdate
(
new
Date
());
outInfoCache
.
updateOutInfo
(
outInfo
);
return
ResultBean
.
newOkResult
(
outInfo
);
}
else
{
...
...
myproject/src/main/java/com/myproject/webapp/controller/webService/QisdaBindService.java
查看文件 @
60d34fd
...
...
@@ -372,106 +372,106 @@ public class QisdaBindService {
* 绑定入库料盘
*/
public
Barcode
bindPutInReel
(
Barcode
barcode
){
boolean
isCutReelIn
=
false
;
String
bindSoseq
=
barcode
.
getAppendInfo
().
getSoseq
();
String
bindSlot
=
barcode
.
getAppendInfo
().
getBindSlot
();
OutItem
bindItem
=
null
;
if
(
Strings
.
isBlank
(
bindSoseq
)){
//未绑定
bindItem
=
findNeedBindItem
(
barcode
);
barcode
=
barcode
.
removeBindInfo
();
}
else
{
//料盘分盘过后入库(已经预绑定过)
isCutReelIn
=
true
;
bindItem
=
soseqCache
.
getCutOutItem
(
bindSoseq
,
Integer
.
valueOf
(
bindSlot
));
}
if
(
bindItem
!=
null
){
log
.
info
(
"找到未绑定需求单["
+
bindItem
.
gethSerial
()+
"],准备进行绑定"
);
if
(
bindItem
.
isPnAction
()){
OutInfo
outInfo
=
outInfoCache
.
getOutInfoFromCache
(
bindItem
.
gethSerial
());
if
(
outInfo
!=
null
&&
outInfo
.
isClosed
()){
log
.
info
(
"需求单["
+
outInfo
.
gethSerial
()+
"]已关闭,不再绑定料盘["
+
barcode
.
getBarcode
()+
"]"
);
barcode
=
barcode
.
removeBindInfo
();
}
else
{
AppendInfo
appendInfo
=
barcode
.
getAppendInfo
();
//未真实绑定过,可以出库,绑定
appendInfo
.
sethSerial
(
bindItem
.
gethSerial
());
appendInfo
.
setRefno
(
bindItem
.
getRefno
());
appendInfo
.
setSo
(
"HSerial-"
+
bindItem
.
gethSerial
());
appendInfo
.
setSoseq
(
"HSerial-"
+
bindItem
.
gethSerial
());
appendInfo
.
setSlotStr
(
bindItem
.
getSlotStr
());
appendInfo
.
setOutItemId
(
bindItem
.
getId
());
appendInfo
.
setBindSlot
(
"1"
);
appendInfo
.
setSlotIndex
(
1
);
barcode
.
setAppendInfo
(
appendInfo
);
int
totalLockQty
=
bindItem
.
getLockQty
()
+
barcode
.
getAmount
();
bindItem
.
setLockQty
(
totalLockQty
);
bindItem
.
setRealLockQty
(
totalLockQty
);
outItemDao
.
updateLockQty
(
bindItem
.
getId
(),
totalLockQty
,
totalLockQty
);
int
bindCount
=
storagePosDao
.
countBind
(
bindItem
.
gethSerial
());
outInfoCache
.
updateBindNum
(
bindItem
.
gethSerial
(),
bindCount
);
outInfoCache
.
updateOutItem
(
bindItem
.
getId
());
log
.
info
(
"绑定料盘["
+
barcode
.
getBarcode
()+
"]到需求单["
+
bindItem
.
gethSerial
()+
"]完成"
);
}
}
else
if
(
bindItem
.
isReelCutAction
()){
OutInfo
cutOutInfo
=
soseqCache
.
getCutActionInfoFromCache
(
bindItem
.
getSoseq
());
if
(
cutOutInfo
!=
null
&&
cutOutInfo
.
isClosed
()){
log
.
info
(
"工单["
+
cutOutInfo
.
getSo
()+
"]已关闭,不再绑定料盘["
+
barcode
.
getBarcode
()+
"]"
);
barcode
=
barcode
.
removeBindInfo
();
}
else
{
//分盘料
if
(
bindItem
.
isCutMaterial
()){
if
(!
isCutReelIn
){
//不是分完盘入库的,需要先进行预绑定
int
preBindQty
=
bindItem
.
getLockQty
()
+
barcode
.
getAmount
();
if
(
preBindQty
>
bindItem
.
getQty
()){
int
reelRemainNum
=
barcode
.
cutCount
(
bindItem
);
if
(
reelRemainNum
>
0
){
//母盘还有剩余,说明该需求slot已经满足
preBindQty
=
bindItem
.
getQty
();
}
else
{
//母盘正好用完或全部用完也达不到需求量,此母盘绑定slot后,需要继续寻找其他盘进行绑定
preBindQty
=
preBindQty
+
barcode
.
getAmount
();
}
}
bindItem
.
setLockQty
(
preBindQty
);
soseqCache
.
udpateTotalPreLockQty
(
bindItem
,
preBindQty
);
log
.
info
(
"\t分盘料"
+
barcode
.
getBarcode
()+
"["
+
barcode
.
getPartNumber
()+
"]绑定到soseq=["
+
bindItem
.
getSoseq
()+
"]so=["
+
bindItem
.
getSo
()+
"]的["
+
bindItem
.
getSlotlocation
()+
"] 数量:"
+
preBindQty
+
"/"
+
bindItem
.
getQty
());
}
if
(!
barcode
.
hasCutInfo
()){
//没有分盘信息,可以直接绑定
barcode
.
realBindItem
(
bindItem
);
int
realBindQty
=
bindItem
.
getRealLockQty
()
+
barcode
.
getAmount
();
bindItem
.
setRealLockQty
(
realBindQty
);
soseqCache
.
updateTotalRealLockQty
(
bindItem
,
realBindQty
);
}
else
{
AppendInfo
appendInfo
=
barcode
.
getAppendInfo
();
appendInfo
.
setSlotIndex
(
bindItem
.
getSlotlocation
());
appendInfo
.
setSo
(
bindItem
.
getSo
());
appendInfo
.
setSoseq
(
bindItem
.
getSoseq
());
barcode
.
setAppendInfo
(
appendInfo
);
log
.
info
(
"分盘料["
+
barcode
.
getBarcode
()+
"]分盘信息:"
+
barcode
.
getAppendInfo
().
getCutMap
());
}
}
else
{
//绑定
barcode
.
realBindItem
(
bindItem
);
int
realBindQty
=
bindItem
.
getRealLockQty
()
+
barcode
.
getAmount
();
bindItem
.
setRealLockQty
(
realBindQty
);
soseqCache
.
updateTotalRealLockQty
(
bindItem
,
realBindQty
);
log
.
info
(
barcode
.
getBarcode
()
+
"["
+
barcode
.
getPartNumber
()+
"]入库完成,工单so=["
+
bindItem
.
getSo
()+
"] soseq=["
+
bindItem
.
getSoseq
()+
"]slotSeq=["
+
bindItem
.
getSlotlocation
()+
"]绑定数量增加"
+
barcode
.
getAmount
()+
"="
+
realBindQty
);
}
unbindSurplusReel
(
bindItem
);
}
}
}
barcode
=
barcodeDao
.
save
(
barcode
);
//
boolean isCutReelIn = false;
//
String bindSoseq = barcode.getAppendInfo().getSoseq();
//
String bindSlot = barcode.getAppendInfo().getBindSlot();
//
OutItem bindItem = null;
//
if(Strings.isBlank(bindSoseq)){
//
//未绑定
//
bindItem = findNeedBindItem(barcode);
//
barcode = barcode.removeBindInfo();
//
}else{
//
//料盘分盘过后入库(已经预绑定过)
//
isCutReelIn = true;
//
bindItem = soseqCache.getCutOutItem(bindSoseq, Integer.valueOf(bindSlot));
//
}
//
if(bindItem != null){
//
log.info("找到未绑定需求单["+bindItem.gethSerial()+"],准备进行绑定");
//
if(bindItem.isPnAction()){
//
OutInfo outInfo = outInfoCache.getOutInfoFromCache(bindItem.gethSerial());
//
if(outInfo != null && outInfo.isClosed()){
//
log.info("需求单["+outInfo.gethSerial()+"]已关闭,不再绑定料盘["+barcode.getBarcode()+"]");
//
barcode = barcode.removeBindInfo();
//
}else{
//
AppendInfo appendInfo = barcode.getAppendInfo();
//
//未真实绑定过,可以出库,绑定
//
appendInfo.sethSerial(bindItem.gethSerial());
//
appendInfo.setRefno(bindItem.getRefno());
//
appendInfo.setSo("HSerial-" + bindItem.gethSerial());
//
appendInfo.setSoseq("HSerial-" + bindItem.gethSerial());
//
appendInfo.setSlotStr(bindItem.getSlotStr());
//
appendInfo.setOutItemId(bindItem.getId());
//
//
appendInfo.setBindSlot("1");
//
appendInfo.setSlotIndex(1);
//
barcode.setAppendInfo(appendInfo);
//
int totalLockQty = bindItem.getLockQty() + barcode.getAmount();
//
bindItem.setLockQty(totalLockQty);
//
bindItem.setRealLockQty(totalLockQty);
//
outItemDao.updateLockQty(bindItem.getId(), totalLockQty, totalLockQty);
//
//
int bindCount = storagePosDao.countBind(bindItem.gethSerial());
//
outInfoCache.updateBindNum(bindItem.gethSerial(),bindCount);
//
outInfoCache.updateOutItem(bindItem.getId());
//
log.info("绑定料盘["+barcode.getBarcode()+"]到需求单["+bindItem.gethSerial()+"]完成");
//
}
//
}else if(bindItem.isReelCutAction()){
//
OutInfo cutOutInfo = soseqCache.getCutActionInfoFromCache(bindItem.getSoseq());
//
if(cutOutInfo != null && cutOutInfo.isClosed()){
//
log.info("工单["+cutOutInfo.getSo()+"]已关闭,不再绑定料盘["+barcode.getBarcode()+"]");
//
barcode = barcode.removeBindInfo();
//
}else{
//
//分盘料
//
if(bindItem.isCutMaterial()){
//
if(!isCutReelIn){
//
//不是分完盘入库的,需要先进行预绑定
//
int preBindQty = bindItem.getLockQty() + barcode.getAmount();
//
if(preBindQty > bindItem.getQty()){
//
int reelRemainNum = barcode.cutCount(bindItem);
//
if(reelRemainNum > 0){
//
//母盘还有剩余,说明该需求slot已经满足
//
preBindQty = bindItem.getQty();
//
}else {
//
//母盘正好用完或全部用完也达不到需求量,此母盘绑定slot后,需要继续寻找其他盘进行绑定
//
preBindQty = preBindQty + barcode.getAmount();
//
}
//
}
//
bindItem.setLockQty(preBindQty);
//
soseqCache.udpateTotalPreLockQty(bindItem,preBindQty);
//
//
//
log.info("\t分盘料"+barcode.getBarcode()+"["+barcode.getPartNumber()+"]绑定到soseq=["+bindItem.getSoseq()+"]so=["+bindItem.getSo()+"]的["+bindItem.getSlotlocation()+"] 数量:" + preBindQty +"/" + bindItem.getQty());
//
}
//
//
if(!barcode.hasCutInfo()){
//
//没有分盘信息,可以直接绑定
//
barcode.realBindItem(bindItem);
//
int realBindQty = bindItem.getRealLockQty() + barcode.getAmount();
//
bindItem.setRealLockQty(realBindQty);
//
soseqCache.updateTotalRealLockQty(bindItem,realBindQty);
//
}else{
//
AppendInfo appendInfo = barcode.getAppendInfo();
//
appendInfo.setSlotIndex(bindItem.getSlotlocation());
//
appendInfo.setSo(bindItem.getSo());
//
appendInfo.setSoseq(bindItem.getSoseq());
//
barcode.setAppendInfo(appendInfo);
//
log.info("分盘料["+barcode.getBarcode()+"]分盘信息:" + barcode.getAppendInfo().getCutMap());
//
}
//
}else{
//
//绑定
//
barcode.realBindItem(bindItem);
//
int realBindQty = bindItem.getRealLockQty() + barcode.getAmount();
//
bindItem.setRealLockQty(realBindQty);
//
soseqCache.updateTotalRealLockQty(bindItem,realBindQty);
//
log.info(barcode.getBarcode() + "["+barcode.getPartNumber()+"]入库完成,工单so=["+bindItem.getSo()+"] soseq=["+bindItem.getSoseq()+"]slotSeq=["+bindItem.getSlotlocation()+"]绑定数量增加"+barcode.getAmount()+"="+ realBindQty);
//
}
//
//
unbindSurplusReel(bindItem);
//
}
//
}
//
}
//
//
barcode = barcodeDao.save(barcode);
return
barcode
;
}
...
...
myproject/src/main/java/com/myproject/webapp/controller/webService/QisdaDeviceController.java
查看文件 @
60d34fd
...
...
@@ -171,6 +171,8 @@ public class QisdaDeviceController extends BaseController {
try
{
String
rfid
=
request
.
getParameter
(
"rfid"
);
//是否是在横移上判断
String
onMoving
=
request
.
getParameter
(
"onMoving"
);
String
codeStr
=
request
.
getParameter
(
"barcode"
);
Barcode
barcode
=
dataCache
.
resolveOneValideBarcode
(
codeStr
);
DataLog
task
=
taskService
.
getFinishedTask
(
barcode
.
getBarcode
());
...
...
@@ -199,9 +201,9 @@ public class QisdaDeviceController extends BaseController {
AppendInfo
appendInfo
=
task
.
getAppendInfo
();
ShelfLoc
shelfLoc
=
InquiryShelfBean
.
lockShelfLoc
(
task
,
rfid
);
if
(
shelfLoc
==
null
){
String
msg
=
"获取料架["
+
rfid
+
"]位置信息失败"
;
log
.
info
(
msg
);
return
ResultBean
.
newErrorResult
(
202
,
msg
);
String
msg
=
task
.
getBarcode
()
+
"获取料架["
+
rfid
+
"]位置信息失败"
;
//
log.info(msg);
return
ResultBean
.
newErrorResult
(
99
,
msg
);
}
String
rfidToSave
=
shelfLoc
.
getRealRfid
();
...
...
@@ -214,8 +216,10 @@ public class QisdaDeviceController extends BaseController {
appendInfo
.
setRfidLoc
(
shelfLoc
.
getLoc
());
task
.
setAppendInfo
(
appendInfo
);
task
.
setStatus
(
StorageConstants
.
OP_STATUS
.
INROBOT
.
name
());
task
.
setLocInfo
(
""
);
if
(!
Boolean
.
valueOf
(
onMoving
)){
task
.
setStatus
(
StorageConstants
.
OP_STATUS
.
INROBOT
.
name
());
task
.
setLocInfo
(
""
);
}
task
=
dataLogDao
.
save
(
task
);
taskService
.
updateFinishedTask
(
task
);
...
...
myproject/src/main/java/com/myproject/webapp/controller/webService/TaskService.java
查看文件 @
60d34fd
...
...
@@ -843,7 +843,7 @@ public class TaskService implements ITaskService {
QisdaApi
.
VMIMateriaRecAss
(
task
,
barcode
,
latest
);
}
}
}
else
if
(
taskAppendInfo
.
isUrgentAction
()
||
taskAppendInfo
.
isReelCutAction
()){
}
else
if
(
taskAppendInfo
.
isUrgentAction
()
||
taskAppendInfo
.
isReelCutAction
()
||
taskAppendInfo
.
isPnAction
()
){
//紧急料或分盘料,增加任务完成数量
log
.
info
(
"紧急料或分盘料["
+
task
.
getBarcode
()+
"]任务已出库完成,发料任务完成数量+1"
);
outInfoCache
.
incTaskFinishNum
(
taskAppendInfo
.
gethSerial
(),
0
,
0
);
...
...
myproject/src/main/webapp/WEB-INF/pages/component/storagePosFind.jsp
查看文件 @
60d34fd
...
...
@@ -211,11 +211,11 @@
<%--</display:column>--%>
<security:authorize ifAnyGranted="ROLE_MANAGE_STACK_OUT, ROLE_MANAGE_FEEDER">
<display:column titleKey="checkOut.operate" media="html">
<
%--<c:if test="${!limitCheckOut}">--%
>
<
c:if test="${!limitCheckOut}"
>
<button class="btn yellow limit${pos.barcode.inFixture}" id="btn${pos.id}"
onclick="checkoutStorage('${pos.id}')">
<i class="fa fa-sign-out"></i><fmt:message key="button.checkout"/></button>
<
%--</c:if>--%
>
<
/c:if
>
</display:column>
</security:authorize>
<c:if test="${limitCheckOut}">
...
...
myproject/src/main/webapp/WEB-INF/pages/qisda/orderOut.jsp
查看文件 @
60d34fd
...
...
@@ -75,7 +75,7 @@
<h4 class="panel-title">
<a class="accordion-toggle" data-toggle="collapse" data-parent="#executing" href="#priorityOrder">
<i class="icon-cursor-move"></i>
[首盘] 需求单: 808 工单: 879235
备料单: F001_879235N_1
<span class="right">建议时间: 2019-11-18 08:59</span>
[首盘] 需求单: 808 工单: 879235 <span class="right">建议时间: 2019-11-18 08:59</span>
</a>
</h4>
</div>
...
...
@@ -101,7 +101,7 @@
<h4 class="panel-title">
<a class="accordion-toggle" data-toggle="collapse" data-parent="#executing" href="#priorityOrder">
<i class="icon-cursor-move"></i>
[首盘] 需求单: 808 工单: 879235
备料单: F001_879235N_1
<span class="right">建议时间: 2019-11-18 08:59</span>
[首盘] 需求单: 808 工单: 879235 <span class="right">建议时间: 2019-11-18 08:59</span>
</a>
</h4>
</div>
...
...
@@ -144,10 +144,10 @@
'<h4 class="panel-title">' +
'<a class="accordion-toggle" data-toggle="collapse" href="#'+outInfo.hSerial+'">' +
moveHandle + //outInfo.firstExecuteTime +
'需求单:'+ outInfo.hSerial+' ['+outInfo.action+'] 工单: ' + outInfo.so +' 线别: ' + outInfo.line + '
工单序号:' + outInfo.soseq
+
'需求单:'+ outInfo.hSerial+' ['+outInfo.action+'] 工单: ' + outInfo.so +' 线别: ' + outInfo.line + '
绑定:' + outInfo.totalBindNum
+
'<span class="right">创建时间: '+createDate+'</span>' +
'<span class="right">建议时间: '+sdate+'</span>' +
'<span class="right">必须时间: '+mdate+'</span>' +
//
'<span class="right">必须时间: '+mdate+'</span>' +
//'<span class="right">['+outInfo.firstExecuteTime+']</span>' +
'</a></h4></div>' +
'<div id="'+outInfo.hSerial+'" class="panel-collapse collapse">' +
...
...
@@ -159,9 +159,9 @@
'<li><i class="fa fa-star"></i>必须出仓日期:'+mdate+'</li>' +
'<li><i class="fa fa-star"></i>创建时间:'+createDate+'</li>' +
'</ul>' +
'<h4 class="list-inline '+bgClass+'">' +
'线体['+outInfo.line+']未解绑料架信息: '+outInfo.lineBindShelfInfo+'' +
'</h4>' +
//
'<h4 class="list-inline '+bgClass+'">' +
//
'线体['+outInfo.line+']未解绑料架信息: '+outInfo.lineBindShelfInfo+'' +
//
'</h4>' +
'</div></div></div></div>';
return infoHtml;
}
...
...
@@ -174,6 +174,9 @@
for(var i in data){
var outInfo = data[i];
if(outInfo.line == '' || outInfo.line == null){
continue;
}
var infoHtml = getOutInfoHtml(outInfo);
if(outInfo.executing || outInfo.sendLess || outInfo.firstExecuteTime > 0){
executingHtml = executingHtml + infoHtml;
...
...
myproject/src/main/webapp/WEB-INF/pages/qisda/outInfoSearch.jsp
查看文件 @
60d34fd
...
...
@@ -89,6 +89,10 @@
<c:if test="${outInfo.endOutInfo}">
<c:set var="endOutInfoClass" value="bg-yellow"/>
</c:if>
<c:set var="closedClass" value=""/>
<c:if test="${outInfo.closed}">
<c:set var="closedClass" value="closed"/>
</c:if>
<display:column titleKey="需求单号" sortable="true" sortProperty="hSerial" media="html">
<a href="#" onclick="showDetail('${outInfo.hSerial}')">${outInfo.hSerial}</a>
</display:column>
...
...
@@ -100,11 +104,11 @@
<display:column titleKey="线别" sortable="true" sortProperty="line" media="html">
<span id="${outInfo.hSerial}Line">${outInfo.line}</span>
<c:if test="${outInfo.firstExecuteTime <=0}">
[<a href="#" onclick="changeLine('${outInfo.hSerial}')">编辑</a>]
<a href="#" onclick="changeLine('${outInfo.hSerial}')">[编辑]</a>
</c:if>
</display:column>
<
display:column titleKey="备料单号" property="refno" sortable="true" sortProperty="refno"/
>
<
%--<display:column titleKey="备料单号" property="refno" sortable="true" sortProperty="refno"/>--%
>
<display:column titleKey="建议出仓时间" sortable="true" sortProperty="sdate">
<fmt:formatDate value="${outInfo.sdate}" pattern="yyyy-MM-dd HH:mm"/>
</display:column>
...
...
@@ -116,16 +120,21 @@
${outInfo.taskFinishNum}/${outInfo.taskNum}
</display:column>
<display:column titleKey="绑定数量" sortable="true" sortProperty="totalBindNum">
<display:column titleKey="绑定数量" sortable="true" sortProperty="totalBindNum"
class="${closedClass}"
>
${outInfo.totalBindNum}
<%--<c:if test="${!outInfo.closed}">--%>
<%--<a href="#" class="right" onclick="closeOut('${outInfo.hSerial}')" id="${outInfo.hSerial}Btn">--%>
<%--[<fmt:message key="关闭"/>]--%>
<%--</a>--%>
<%--</c:if>--%>
</display:column>
<display:column titleKey="创建时间" sortable="true" sortProperty="createDate">
<display:column titleKey="创建时间" sortable="true" sortProperty="createDate"
>
<fmt:formatDate value="${outInfo.createDate}" pattern="yyyy-MM-dd HH:mm"/>
</display:column>
<
display:column titleKey="更新时间" sortable="true" sortProperty="updateDate"
>
<
fmt:formatDate value="${outInfo.updateDate}" pattern="yyyy-MM-dd HH:mm"/
>
<
/display:column
>
<
%--<display:column titleKey="更新时间" sortable="true" sortProperty="updateDate">--%
>
<
%--<fmt:formatDate value="${outInfo.updateDate}" pattern="yyyy-MM-dd HH:mm"/>--%
>
<
%--</display:column>--%
>
<display:column titleKey="需求时间" sortable="true" sortProperty="taskNeedOutDate">
<fmt:formatDate value="${outInfo.taskNeedOutDate}" pattern="yyyy-MM-dd HH:mm"/>
...
...
@@ -315,6 +324,27 @@
});
}
closeOut = function(hSerial){
Lobibox.confirm({
title: "确认",
msg: "确定要关闭并解绑需求单["+hSerial+"]吗?",
callback: function ($this, type, ev) {
if(type == 'yes'){
$.post("${ctx}/service/store/qisda/closeHSerial", {hSerial: hSerial}, function (data) {
if(data){
Lobibox.alert("success",
{
msg: data
});
var btnId = "#" +hSerial + "Btn";
$(btnId).hide();
}
});
}
}
});
}
changeLine = function (hSerial){
$("#hSerialToModify").val(hSerial);
var oldLine = $("#lineToModify").text();
...
...
@@ -343,6 +373,11 @@
});
});
$(".closed").each(function(){
var oldClass = $(this).parent().attr("class");
$(this).parents("tr").attr("class",oldClass + " font-grey");
});
});
</script>
</c:set>
\ No newline at end of file
myproject/src/main/webapp/decorators/metro.jsp
查看文件 @
60d34fd
...
...
@@ -237,9 +237,9 @@
<!-- BEGIN FOOTER -->
<div
class=
"page-footer"
>
<div
class=
"page-footer-inner"
>
2016
©
<a
href=
"
${ctx}/updateHistory.html
"
>
SMD BOX
</a>
2016
©
<a
href=
""
>
SMD BOX
</a>
</div>
<span
class=
"right"
style=
"color: #a3a3a3;"
>
Version: 1.
5.2118
</span>
<span
class=
"right"
style=
"color: #a3a3a3;"
>
Version: 1.
6.2910
</span>
<div
class=
"scroll-to-top"
>
<i
class=
"icon-arrow-up"
></i>
</div>
...
...
编写
预览
支持
Markdown
格式
附加文件
你添加了
0
人
到此讨论。请谨慎行事。
Finish editing this message first!
Cancel
请
注册
或
登录
后发表评论