Commit d1f20b77 sunke

流水线托盘卡顿报警

包装料仓任务取消时未清空料架问题修复
包装料仓多个指定料需求单导到AGV不拉料架问题修复
每个需求单占用一个包装料架
1 个父辈 d1ca244c
......@@ -53,23 +53,22 @@ public class InquiryShelfBean {
}
}
/**
* 清理需求单中的A料架(主要是分盘料和紧急料)
*/
public static void clearPackageShelf(String hSerial){
if(hSerial != null){
Map<String, ShelfInfo> shelfMap = hSerialShelfMap.get(hSerial);
if(shelfMap != null){
Collection<ShelfInfo> allShelf = shelfMap.values();
for (ShelfInfo shelfInfo : allShelf) {
if(shelfInfo.isAShelf()){
log.info("清理["+hSerial+"]使用过的包装A料架["+shelfInfo.tempRfid()+"="+shelfInfo.tempRfid()+"]");
shelfMap.remove(shelfInfo.tempRfid());
}
public static void clearCutUrgentPackageShelf(String cutOrUrgentAShelfKey){
Map<String, ShelfInfo> shelfMap = hSerialShelfMap.get(cutOrUrgentAShelfKey);
if(shelfMap != null){
Collection<ShelfInfo> allShelf = shelfMap.values();
for (ShelfInfo shelfInfo : allShelf) {
if(shelfInfo.isAShelf() && shelfInfo.isFull()){
log.info("清理已放满紧急料或分盘料的包装A料架["+shelfInfo.tempRfid()+"]");
shelfMap.remove(shelfInfo.tempRfid());
}
hSerialShelfMap.put(hSerial,shelfMap);
QisdaCache.saveShelfMap(hSerialShelfMap);
}
hSerialShelfMap.put(cutOrUrgentAShelfKey,shelfMap);
QisdaCache.saveShelfMap(hSerialShelfMap);
}
}
......@@ -109,7 +108,8 @@ public class InquiryShelfBean {
cAndDShelfList.sort(new Comparator<ShelfInfo>() {
public int compare(ShelfInfo shelf1, ShelfInfo shelf2) {
if(shelf1.getShelfType().equals(shelf2.getShelfType())){
return shelf1.getRfidIndex() - shelf2.getRfidIndex();
int diff = shelf1.getRfidIndex() - shelf2.getRfidIndex();
return diff;
}else{
return shelf2.getShelfType().compareTo(shelf1.getShelfType());
}
......@@ -217,7 +217,7 @@ public class InquiryShelfBean {
*/
public static void addEmptyLoc(OutItem outItem, String shelfType){
String hSerial = outItem.gethSerial();
ShelfInfo emptyShelfInfo = getOrAddShelfInfo(hSerial,shelfType);
ShelfInfo emptyShelfInfo = getOrAddShelfInfo(hSerial,shelfType, outItem.gethSerial());
if(emptyShelfInfo != null){
int loc = emptyShelfInfo.addEmptyLoc();
log.info("工单"+outItem.getSo()+"["+outItem.getSlotlocation()+"]"+outItem.getPn()+"预留架位"+emptyShelfInfo.tempRfid()+"["+ loc +"]");
......@@ -262,20 +262,27 @@ public class InquiryShelfBean {
return shelfType;
}
/**
* 获取未达最大数量的料架,或者添加一个新的料架
* @param shelfType
* @return
*/
private static ShelfInfo getOrAddShelfInfo(String hSerial, String shelfType){
private static ShelfInfo getOrAddShelfInfo(String hSerial, String shelfType, String sourceHSerial){
Map<String, ShelfInfo> shelfMap = hSerialShelfMap.get(hSerial);
int rfidIndex = 0;
if(shelfMap != null){
for (ShelfInfo shelfInfo : shelfMap.values()) {
if(StorageConstants.SHEFL_TYPE.judgeType(shelfInfo.getShelfType(), shelfType)){
if(shelfInfo != null && !shelfInfo.reachMaxLoc()){
return shelfInfo;
if(hSerial.equals(sourceHSerial)){
//工单料
return shelfInfo;
}else{
//不是包装仓的分盘料或紧急料,使用同一个料架;包装料架按需求单号进行区分
if(!shelfInfo.isAShelf()){
return shelfInfo;
}
}
}
}
}
......@@ -294,7 +301,7 @@ public class InquiryShelfBean {
}
if(newShelf != null){
newShelf.setRfidIndex(rfidIndex);
newShelf.sethSerial(hSerial);
newShelf.sethSerial(hSerial,sourceHSerial);
log.info("添加新料架["+newShelf.tempRfid() + "]");
updateShelfInfo(newShelf);
}
......@@ -321,12 +328,13 @@ public class InquiryShelfBean {
if(task.isUrgentReel()){
//紧急料放在同一个料串或包装料架上,需求单号使用1
hSerial = "1";
hSerial = URGENT_SHELF_MAP_KEY;
}else if(task.isCutReel()){
//分盘料放在同一个料串或包装料架上,需求单号使用2
hSerial = "2";
hSerial = CUT_SHELF_MAP_KEY;
}
ShelfInfo emptyShelfInfo = getOrAddShelfInfo(hSerial,shelfType);
ShelfInfo emptyShelfInfo = getOrAddShelfInfo(hSerial,shelfType,outItem.gethSerial());
if(emptyShelfInfo != null){
if(task != null){
int loc = -1;
......@@ -359,7 +367,7 @@ public class InquiryShelfBean {
//非分盘和非紧急料和非缺料补发的包装料需要在C型料架上预留位置
if(task.isPackageReel() && !task.isCutReel() && !task.isUrgentReel() && !task.isLessSendReel()){
String cShelf = StorageConstants.SHEFL_TYPE.C;
ShelfInfo packageCShelf = getOrAddShelfInfo(hSerial, cShelf);
ShelfInfo packageCShelf = getOrAddShelfInfo(hSerial, cShelf, outItem.gethSerial());
int packageCLoc = packageCShelf.addLimitLoc(barcode, StorageConstants.REEL_TYPE.PACKAGE);
log.info("包装料["+barcode+"]预留C型料架:工单"+outItem.getSo()+"["+outItem.getSlotlocation()+"]"+outItem.getPn()+"添加架位["+packageCShelf.tempRfid() + "]["+ packageCLoc +"]=["+emptyShelfInfo.tempRfid() + "]["+ loc +"]=" + barcode);
}
......@@ -741,7 +749,7 @@ public class InquiryShelfBean {
ShelfInfo newBShelf = ShelfInfo.newBShelf();
int rfidIndex = shelfMap.size();
newBShelf.setRfidIndex(rfidIndex);
newBShelf.sethSerial(shelfMapKey);
newBShelf.sethSerial(shelfMapKey,task.getAppendInfo().gethSerial());
log.info("添加新料架["+newBShelf.tempRfid() + "]");
loc = newBShelf.addLimitLoc(barcode, task.getReelType());
boolean putInResult = newBShelf.putInLimitLoc(rfid,loc,barcode);
......
......@@ -50,6 +50,11 @@ public class ShelfInfo {
private int rfidIndex;
/**
* 来源需求单号,用于分盘料,紧急料和工单的料区分
*/
private String sourceHSerail;
/**
* 实际编号
*/
private String realRfid;
......@@ -241,7 +246,7 @@ public class ShelfInfo {
if(isAShelf()){
//A料架,需要清空
shelfLoc.setEmpty(true);
locMap.put(shelfLoc.getLoc(), shelfLoc);
locMap.remove(shelfLoc.getLoc());
log.error("料盘["+barcode+"]解除绑定架位"+tempRfid()+"["+shelfLoc.getLoc()+"]成功");
return true;
}else{
......@@ -479,8 +484,9 @@ public class ShelfInfo {
return hSerial;
}
public void sethSerial(String hSerial) {
public void sethSerial(String hSerial, String sourceHSerail) {
this.hSerial = hSerial;
this.sourceHSerail = sourceHSerail;
}
public String getShelfType() {
......@@ -507,6 +513,14 @@ public class ShelfInfo {
return gethSerial() + "-" + rfidIndex + shelfType;
}
public String getSourceHSerail() {
return sourceHSerail;
}
public void setSourceHSerail(String sourceHSerail) {
this.sourceHSerail = sourceHSerail;
}
@Override
public String toString() {
return "ShelfInfo{" +
......
......@@ -12,6 +12,7 @@ import com.myproject.bean.update.qisda.DNItem;
import com.myproject.bean.update.qisda.OutItem;
import com.myproject.exception.ApiException;
import com.myproject.exception.ValidateException;
import com.myproject.webapp.controller.webService.DataCache;
import com.myproject.webapp.controller.webService.QisdaCache;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
......@@ -136,6 +137,10 @@ public class QisdaApi {
* @param lessBind 是否是绑定缺料反馈
*/
public static void VMILocationOutFeedback(List<OutItem> outItemList, boolean lessBind){
if(DataCache.isProductionFor(DataCache.CUSTOMER.DEBUG)){
log.info("程序调试阶段,暂不处理,调试完成后更改PRO");
return;
}
String url = "http://10.85.17.233/ESMTCommonInterface/CommonService.asmx/VMILocationOutFeedback";
List<Map<String,Object>> materialInfoList = new ArrayList<>();
for (OutItem outItem : outItemList) {
......@@ -181,7 +186,10 @@ public class QisdaApi {
* @throws ApiException
*/
public static List<DNItem> GetDNDetails(String dnNo, boolean isCheck) throws ApiException {
if(DataCache.isProductionFor(DataCache.CUSTOMER.DEBUG)){
log.info("程序调试阶段,暂不处理,调试完成后更改PRO");
return new ArrayList<>();
}
String url = "http://10.85.17.43:8080/WMSWeb.asmx/GetDNDetailsJson";
Map<String,Object> paramMap = new HashMap<String,Object>();
//paramMap.put("DHNO","DNMISW1911197845");
......@@ -254,7 +262,10 @@ public class QisdaApi {
* 6. CIS收料判定接口(绑过料串的条码扫码入库时判断)
*/
public static void VMIMateriaReceiveJudge(DNInfo dnInfo, Barcode barcode) throws ValidateException {
if(DataCache.isProductionFor(DataCache.CUSTOMER.DEBUG)){
log.info("程序调试阶段,暂不处理,调试完成后更改PRO");
return;
}
String url = "http://10.85.17.233/ESMTCommonInterface/CommonService.asmx/VMIMateriaReceiveJudge";
Map<String,Object> materialInfoMap = new HashMap<String,Object>();
......@@ -308,6 +319,10 @@ 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://10.85.17.233/ESMTCommonInterface/CommonService.asmx/VMILocationInCheck";
String reelid = barcode.getBarcode();
String partNum = barcode.getPartNumber();
......@@ -407,6 +422,10 @@ public class QisdaApi {
* 纯入库操作完成时通知Qisda
*/
public static void VMILocationInThread(String reelID, String location,String fullCodeStr){
if(DataCache.isProductionFor(DataCache.CUSTOMER.DEBUG)){
log.info("程序调试阶段,暂不处理,调试完成后更改PRO");
return;
}
String url = "http://10.85.17.233/ESMTCommonInterface/CommonService.asmx/VMILocationIn";
Map<String,Object> paramMap = new HashMap<String,Object>();
paramMap.put("reelID",reelID);
......@@ -437,6 +456,10 @@ public class QisdaApi {
* CIS收料入库接口
*/
public static void VMIMateriaReceiveThread(Barcode barcode, DataLog task){
if(DataCache.isProductionFor(DataCache.CUSTOMER.DEBUG)){
log.info("程序调试阶段,暂不处理,调试完成后更改PRO");
return;
}
String url = "http://10.85.17.233/ESMTCommonInterface/CommonService.asmx/VMIMateriaReceive";
Map<String,Object> materialInfoMap = new HashMap<String,Object>();
......@@ -486,6 +509,10 @@ public class QisdaApi {
* @param materialInfoMap
*/
private static void VMILocationOutThread(String reelId, Map<String, Object> materialInfoMap){
if(DataCache.isProductionFor(DataCache.CUSTOMER.DEBUG)){
log.info("程序调试阶段,暂不处理,调试完成后更改PRO");
return;
}
String url = "http://10.85.17.233/ESMTCommonInterface/CommonService.asmx/VMILocationOut";
String materialInfo = JsonUtil.toJsonStr(materialInfoMap);
......@@ -518,6 +545,10 @@ public class QisdaApi {
* @param latest 本次工单第几盘料(F 第一次,L 最后一次, M 中间)
*/
private static void VMIMateriaRecAssThread(DataLog task, Barcode barcode, String latest){
if(DataCache.isProductionFor(DataCache.CUSTOMER.DEBUG)){
log.info("程序调试阶段,暂不处理,调试完成后更改PRO");
return;
}
String url = "http://10.85.17.233/ESMTCommonInterface/CommonService.asmx/VMIMateriaRecAss";
Map<String,Object> materialInfoMap = new HashMap<String,Object>();
AppendInfo appendInfo = task.getAppendInfo();
......@@ -586,6 +617,10 @@ public class QisdaApi {
* 移远料号转换
*/
public static String PartNoMapping(String vdPartNum) throws ApiException{
if(DataCache.isProductionFor(DataCache.CUSTOMER.DEBUG)){
log.info("程序调试阶段,暂不处理,调试完成后更改PRO");
return vdPartNum;
}
String url = "http://10.85.17.233/ESMTCommonInterface/CommonService.asmx/PartNoMapping";
Map<String,Object> paramMap = new HashMap<String,Object>();
paramMap.put("vdPartNum",vdPartNum);
......@@ -610,6 +645,10 @@ 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);
......@@ -638,6 +677,10 @@ public class QisdaApi {
* 清理Qisda库存
*/
public static void ClearStockBy(String posName){
if(DataCache.isProductionFor(DataCache.CUSTOMER.DEBUG)){
log.info("程序调试阶段,暂不处理,调试完成后更改PRO");
return;
}
String url = "http://10.85.17.233/ESMTCommonInterface/CommonService.asmx/ClearStockBy";
Map<String,Object> paramMap = new HashMap<String,Object>();
paramMap.put("location",posName);
......@@ -656,6 +699,10 @@ public class QisdaApi {
* 检查工单料架是否解绑 [{"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){
if(DataCache.isProductionFor(DataCache.CUSTOMER.DEBUG)){
log.info("程序调试阶段,暂不处理,调试完成后更改PRO");
return "";
}
String url = "http://10.85.17.233/ESMTCommonInterface/CommonService.asmx/GetSerialData";
Map<String,Object> paramMap = new HashMap<String,Object>();
paramMap.put("line",line);
......@@ -683,6 +730,10 @@ public class QisdaApi {
* @return
*/
public static String UpdateBatchRefillMark(String soseq){
if(DataCache.isProductionFor(DataCache.CUSTOMER.DEBUG)){
log.info("程序调试阶段,暂不处理,调试完成后更改PRO");
return "";
}
String url = "http://10.85.17.233/ESMTCommonInterface/CommonService.asmx/UpdateBatchRefillMark";
Map<String,Object> paramMap = new HashMap<String,Object>();
paramMap.put("soseq",soseq);
......
......@@ -48,6 +48,11 @@ public class DataCache{
* 佳世达
*/
public static String QISDA = "QISDA";
/**
* 测试程序
*/
public static String DEBUG = "DEBUG";
}
/**
......
......@@ -904,15 +904,8 @@ public class QisdaDeviceController extends BaseController {
}
if(packageCutShelf == 0){
//log.info("已无分盘料任务,清空分盘料使用料架/料串");
InquiryShelfBean.clearPackageShelf(InquiryShelfBean.CUT_SHELF_MAP_KEY);
}
if(packageUrgentTask == 0){
//log.info("已无紧急料任务,清空紧急料使用料架/料串");
InquiryShelfBean.clearPackageShelf(InquiryShelfBean.URGENT_SHELF_MAP_KEY);
}
InquiryShelfBean.clearCutUrgentPackageShelf(InquiryShelfBean.CUT_SHELF_MAP_KEY);
InquiryShelfBean.clearCutUrgentPackageShelf(InquiryShelfBean.URGENT_SHELF_MAP_KEY);
Map<String,Object> resultMap = new HashMap<>();
resultMap.put("taskCount",taskCount+"");
......
......@@ -141,6 +141,12 @@
max-height: 100%;
overflow-y: auto;
}
@media only screen and (min-width:0px) and (max-width:800px){
.lobibox-notify{
display:none;
}
}
</style>
<link href="${ctx}/scripts/lobibox/css/lobibox.min.css?id=2" rel="stylesheet" type="text/css"/>
......
......@@ -12,6 +12,25 @@
<div class="row">
<div class="col-md-12">
<ul class="timeline">
<li class="timeline-yellow">
<div class="timeline-time">
<span class="date">2021 </span>
<span class="time">03-25 </span>
</div>
<div class="timeline-icon">
<i class="fa fa-clock-o"></i>
</div>
<div class="timeline-body">
<h2>版本: V2021032516</h2>
<div class="timeline-content">
<ul>
<li>流水线托盘卡顿报警</li>
<li>包装料仓任务取消时未清空料架问题修复</li>
<li>包装料仓多个指定料需求单导到AGV不拉料架问题修复</li>
</ul>
</div>
</div>
</li>
<li class="timeline-grey">
<div class="timeline-time">
<span class="date">2021</span>
......@@ -24,7 +43,9 @@
<h2>版本: V2021032417</h2>
<div class="timeline-content">
<ul>
<li>取消任务时同时取消同一条码未完成的其他任务</li>
<li>关闭手动解绑工单功能</li>
<li>条码无效时原因提醒</li>
<li>导出数据时限定最大数量,防止导出占用太大内存</li>
</ul>
</div>
</div>
......
......@@ -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: 2021.03.15</span>
<span class="right" style="color: #a3a3a3;">Version: 2021.03.25</span>
<div class="scroll-to-top">
<i class="icon-arrow-up"></i>
</div>
......
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!