Commit 09ab4378 孙克

首盘料增加是否有未解绑料架判断逻辑

1 个父辈 ad61c551
......@@ -695,10 +695,49 @@ public class QisdaApi {
}
}
/**
* 检查补料是是否有未解绑料架
*/
public static String GetSerialData(String line, String hserial){
return GetSerialData(line,hserial,false);
}
/**
* 检查首盘是是否有未解绑料架
*/
public static String ChecklfContinuousSo(String line, String hserial){
return ChecklfContinuousSo(line,hserial,false);
}
/**
* 检查首盘料架是否解绑 [{"data":[{"Serial":"58890","VehicleID":"D15","Status":""},{"Serial":"58890","VehicleID":"D44","Status":""},{"Serial":"58890","VehicleID":"D83","Status":""},{"Serial":"58890","VehicleID":"D90","Status":""},{"Serial":"58890","VehicleID":"D98","Status":""}]}]
*/
public static String ChecklfContinuousSo(String line, String hserial, boolean showLog){
if(DataCache.isProductionFor(DataCache.CUSTOMER.DEBUG)){
log.info("程序调试阶段,暂不处理,调试完成后更改PRO");
return "";
}
String url = "http://10.85.71.25:8080/ESMTCommonInterface/CommonService.asmx/CheckIfContinuousSo";
Map<String,Object> paramMap = new HashMap<String,Object>();
paramMap.put("line",line);
paramMap.put("hserial",hserial);
try {
String result = HttpHelper.postParam(url,paramMap);
if(showLog){
log.info("从Qisda检查工单["+hserial+"]料架是否解绑["+line+"](GetSerialData)返回:" + result);
}
if(result.contains("VehicleID")){
return result;
}
if(result.toLowerCase().contains("wait")){
return result;
}
return "";
} catch (Exception e) {
log.error("从Qisda检查工单料架是否解绑"+hserial+"["+line+"])接口(GetSerialData)出错",e);
return "检查出错:" + e.getMessage();
}
}
/**
* 检查工单料架是否解绑 [{"data":[{"Serial":"58890","VehicleID":"D15","Status":""},{"Serial":"58890","VehicleID":"D44","Status":""},{"Serial":"58890","VehicleID":"D83","Status":""},{"Serial":"58890","VehicleID":"D90","Status":""},{"Serial":"58890","VehicleID":"D98","Status":""}]}]
*/
public static String GetSerialData(String line, String hserial, boolean showLog){
......
......@@ -107,30 +107,38 @@ public class OutInfoCache {
//寻找未执行过的到达建议时间和必须出库时间的工单料(首盘或补料)
if(unEndOutInfo.isNew()){
String oldBindShelfInfo = unEndOutInfo.getLineBindShelfInfo();
//只检查有未解绑料架的补料需求单
if(Strings.isNotBlank(oldBindShelfInfo) && unEndOutInfo.isTailAction()){
long firstExecuteTime = unEndOutInfo.getFirstExecuteTime();
if(firstExecuteTime <= 0){
//未执行出库的
String newBindShelfInfo = QisdaApi.GetSerialData(unEndOutInfo.getLine(),unEndOutInfo.gethSerial());
if(!newBindShelfInfo.toLowerCase().contains("wait")){
//需要进行等待,直接返回
int shelfCountToLine = shelfCountToLine(unEndOutInfo.getSoseq(),newBindShelfInfo);
if(unEndOutInfo.isPreTailAction() || unEndOutInfo.isTailAction()){
//补料,检查是否是同一个工单未解绑的料架
if(shelfCountToLine > 0){
//对应产线可放料架大于0,可以进行出库"
newBindShelfInfo = "";
//只检查有未解绑料架的需求单
if(Strings.isNotBlank(oldBindShelfInfo)){
if(unEndOutInfo.isTailAction() || unEndOutInfo.isFirstReelAction()){
long firstExecuteTime = unEndOutInfo.getFirstExecuteTime();
if(firstExecuteTime <= 0){
//未执行出库的
String newBindShelfInfo = "";
if(unEndOutInfo.isTailAction()){
newBindShelfInfo = QisdaApi.GetSerialData(unEndOutInfo.getLine(),unEndOutInfo.gethSerial());
}else if(unEndOutInfo.isFirstReelAction()){
newBindShelfInfo = QisdaApi.ChecklfContinuousSo(unEndOutInfo.getLine(),unEndOutInfo.gethSerial());
}
if(!newBindShelfInfo.toLowerCase().contains("wait")){
//需要进行等待,直接返回
int shelfCountToLine = shelfCountToLine(unEndOutInfo.getSoseq(),newBindShelfInfo);
if(unEndOutInfo.isPreTailAction() || unEndOutInfo.isTailAction()){
//补料,检查是否是同一个工单未解绑的料架
if(shelfCountToLine > 0){
//对应产线可放料架大于0,可以进行出库"
newBindShelfInfo = "";
}
}
}
}
unEndOutInfo.setLineBindShelfInfo(newBindShelfInfo);
outInfoMap.put(unEndOutInfo.gethSerial(), unEndOutInfo);
if(!newBindShelfInfo.equals(oldBindShelfInfo)){
log.info("需求单["+unEndOutInfo.gethSerial()+"]产线有未解绑料架["+newBindShelfInfo+"]需要进行等待");
unEndOutInfo.setLineBindShelfInfo(newBindShelfInfo);
outInfoMap.put(unEndOutInfo.gethSerial(), unEndOutInfo);
if(!newBindShelfInfo.equals(oldBindShelfInfo)){
log.info("需求单["+unEndOutInfo.gethSerial()+"]产线有未解绑料架["+newBindShelfInfo+"]需要进行等待");
}
}
}
}
}
}
}catch (Exception e){
......@@ -205,7 +213,11 @@ public class OutInfoCache {
OutInfo outInfoToNotify = findExecuteOrderHSerial(cachedOutInfos, excludeSerialList);
if(outInfoToNotify != null){
//通知Qisda进行提醒产线人员解绑
QisdaApi.GetSerialData(outInfoToNotify.getLine(),outInfoToNotify.gethSerial());
if(outInfoToNotify.isFirstReelAction()){
QisdaApi.ChecklfContinuousSo(outInfoToNotify.getLine(),outInfoToNotify.gethSerial());
}else{
QisdaApi.GetSerialData(outInfoToNotify.getLine(),outInfoToNotify.gethSerial());
}
}
OutInfo outInfoToExecute = null;
......@@ -217,6 +229,8 @@ public class OutInfoCache {
String lineHasBindShelf = "";
if(firstOutInfoToExecute.isTailAction()){
lineHasBindShelf = QisdaApi.GetSerialData(firstOutInfoToExecute.getLine(),firstOutInfoToExecute.gethSerial(),true);
}else if(firstOutInfoToExecute.isFirstReelAction()){
lineHasBindShelf = QisdaApi.ChecklfContinuousSo(firstOutInfoToExecute.getLine(),firstOutInfoToExecute.gethSerial(),true);
}
firstOutInfoToExecute.setLineBindShelfInfo(lineHasBindShelf);
......@@ -241,17 +255,17 @@ public class OutInfoCache {
return;
}else{
int shelfCountToLine = shelfCountToLine(firstOutInfoToExecute.getSoseq(),lineHasBindShelf);
if(firstOutInfoToExecute.isPreTailAction() || firstOutInfoToExecute.isTailAction()){
if(firstOutInfoToExecute.isPreTailAction() || firstOutInfoToExecute.isTailAction() || firstOutInfoToExecute.isFirstReelAction()){
//补料,检查是否是同一个工单未解绑的料架
//boolean preTailCanOut = isPreTailCanOut(firstOutInfoToExecute.getSoseq(),lineHasBindShelf);
if(shelfCountToLine > 0){
log.info("补料需求单["+firstOutInfoToExecute.gethSerial()+"]对应产线可放料架["+shelfCountToLine+"],可以进行出库:"+lineHasBindShelf);
log.info("需求单["+firstOutInfoToExecute.gethSerial()+"]对应产线可放料架["+shelfCountToLine+"],可以进行出库:"+lineHasBindShelf);
outInfoToExecute = firstOutInfoToExecute;
firstOutInfoToExecute.setLineBindShelfInfo("");
outInfoMap.put(firstOutInfoToExecute.gethSerial(), firstOutInfoToExecute);
break;
}else{
log.info("补料需求单["+firstOutInfoToExecute.gethSerial()+"]对应产线可放料架["+shelfCountToLine+"],暂不进行出库");
log.info("需求单["+firstOutInfoToExecute.gethSerial()+"]对应产线可放料架["+shelfCountToLine+"],暂不进行出库");
}
}
if(!oldBindShelf.equals(lineHasBindShelf)){
......
......@@ -597,10 +597,11 @@ public class QisdaDeviceController extends BaseController {
if(rfid == null){
rfid = "";
}
ShelfInfo shelfInfo = InquiryShelfBean.findSameShelf(InquiryShelfBean.URGENT_SHELF_MAP_KEY,rfid);
if(shelfInfo == null){
shelfInfo = InquiryShelfBean.findSameShelf(InquiryShelfBean.CUT_SHELF_MAP_KEY,rfid);
}
ShelfInfo shelfInfo = InquiryShelfBean.findShelf(rfid);
// ShelfInfo shelfInfo = InquiryShelfBean.findSameShelf(InquiryShelfBean.URGENT_SHELF_MAP_KEY,rfid);
// if(shelfInfo == null){
// shelfInfo = InquiryShelfBean.findSameShelf(InquiryShelfBean.CUT_SHELF_MAP_KEY,rfid);
// }
String tempRfid = "";
if(shelfInfo != null){
tempRfid = shelfInfo.tempRfid();
......
......@@ -12,6 +12,41 @@
<div class="row">
<div class="col-md-12">
<ul class="timeline">
<li class="timeline-yellow">
<div class="timeline-time">
<span class="date">2023</span>
<span class="time">04-14</span>
</div>
<div class="timeline-icon">
<i class="fa fa-clock-o"></i>
</div>
<div class="timeline-body">
<h2>版本: V2023041415</h2>
<div class="timeline-content">
<ul>
<li>首盘料增加是否有未解绑料架判断逻辑,接口地址为http://10.85.71.25:8080/ESMTCommonlnterface/CommonService.asmx?op=ChecklfContinuousSo</li>
</ul>
</div>
</div>
</li>
<li class="timeline-grey">
<div class="timeline-time">
<span class="date">2023</span>
<span class="time">04-06</span>
</div>
<div class="timeline-icon">
<i class="fa fa-clock-o"></i>
</div>
<div class="timeline-body">
<h2>版本: V2023040613</h2>
<div class="timeline-content">
<ul>
修改findTempRfid接口逻辑
</ul>
</div>
</div>
</li>
<li class="timeline-purple">
<div class="timeline-time">
<span class="date">2023</span>
......
......@@ -239,7 +239,7 @@
<div class="page-footer-inner">
2016&copy; <a href="${ctx}/updateHistory.html">SMD BOX</a>
</div>
<span class="right" style="color: #a3a3a3;">Version: V2023040310</span>
<span class="right" style="color: #a3a3a3;">Version: V2023041415</span>
<div class="scroll-to-top">
<i class="icon-arrow-up"></i>
</div>
......
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!