Commit 613d64a2 sunke

报警看板增加消息类型

柱状图上添加数量展示
需求单添加产线
提供当前正在出库工单的产线信息
绑定信息接口修改为可接收多个soseq和多个so
1 个父辈 e4bcab5d
...@@ -16,6 +16,11 @@ public class DeviceAlarmMsgBean { ...@@ -16,6 +16,11 @@ public class DeviceAlarmMsgBean {
this.name = name; this.name = name;
} }
/**
* 类型:0为错误, 1为正常消息
*/
private int type = 0;
private String name; private String name;
private String msgKey; private String msgKey;
...@@ -75,4 +80,16 @@ public class DeviceAlarmMsgBean { ...@@ -75,4 +80,16 @@ public class DeviceAlarmMsgBean {
public boolean isTimeout(){ public boolean isTimeout(){
return System.currentTimeMillis() - updateTime.getTime() > 10 * 1000; return System.currentTimeMillis() - updateTime.getTime() > 10 * 1000;
} }
public int getType() {
return type;
}
public void setType(int type) {
this.type = type;
}
public boolean isInfoMsg(){
return type == 1;
}
} }
...@@ -3,7 +3,7 @@ package com.myproject.bean.qisda; ...@@ -3,7 +3,7 @@ package com.myproject.bean.qisda;
/** /**
* Created by sunke on 2020/6/12. * Created by sunke on 2020/6/12.
*/ */
public class ItemLockInfo { public class LockItemInfo {
/** /**
* 工单序号 * 工单序号
*/ */
......
...@@ -90,6 +90,11 @@ public class RequestOutItemBean { ...@@ -90,6 +90,11 @@ public class RequestOutItemBean {
*/ */
private int qty; private int qty;
/**
* 产线
*/
private String line;
public String getAction() { public String getAction() {
return action; return action;
} }
...@@ -239,6 +244,14 @@ public class RequestOutItemBean { ...@@ -239,6 +244,14 @@ public class RequestOutItemBean {
this.slotlocation = slotlocation; this.slotlocation = slotlocation;
} }
public String getLine() {
return line;
}
public void setLine(String line) {
this.line = line;
}
@Override @Override
public String toString() { public String toString() {
return "RequestOutItemBean{" + return "RequestOutItemBean{" +
......
...@@ -21,6 +21,7 @@ public class OutInfo extends BaseMongoBean { ...@@ -21,6 +21,7 @@ public class OutInfo extends BaseMongoBean {
this.hSerial = outItem.gethSerial(); this.hSerial = outItem.gethSerial();
this.so = outItem.getSo(); this.so = outItem.getSo();
this.soseq = outItem.getSoseq(); this.soseq = outItem.getSoseq();
this.line = outItem.getLine();
this.refno = outItem.getRefno(); this.refno = outItem.getRefno();
this.sdate = outItem.getSdate(); this.sdate = outItem.getSdate();
this.mdate = outItem.getMdate(); this.mdate = outItem.getMdate();
...@@ -66,6 +67,11 @@ public class OutInfo extends BaseMongoBean { ...@@ -66,6 +67,11 @@ public class OutInfo extends BaseMongoBean {
private int taskNum; private int taskNum;
/** /**
* 产线位置
*/
private String line;
/**
* 绑定状态:0=未绑定 1=绑定缺料 2=绑定OK * 绑定状态:0=未绑定 1=绑定缺料 2=绑定OK
*/ */
private int bindStatus = StorageConstants.BIND_STATUS.NO_BIND; private int bindStatus = StorageConstants.BIND_STATUS.NO_BIND;
...@@ -398,6 +404,14 @@ public class OutInfo extends BaseMongoBean { ...@@ -398,6 +404,14 @@ public class OutInfo extends BaseMongoBean {
return null; return null;
} }
public String getLine() {
return line;
}
public void setLine(String line) {
this.line = line;
}
@Override @Override
public String toString() { public String toString() {
return "OutInfo{" + return "OutInfo{" +
......
...@@ -25,6 +25,7 @@ public class OutItem extends BaseMongoBean { ...@@ -25,6 +25,7 @@ public class OutItem extends BaseMongoBean {
this.soseq = itemBean.getSoseq(); this.soseq = itemBean.getSoseq();
this.refno = itemBean.getRefno(); this.refno = itemBean.getRefno();
this.reelID = itemBean.getReelID(); this.reelID = itemBean.getReelID();
this.line = itemBean.getLine();
this.location = itemBean.getLocation(); this.location = itemBean.getLocation();
String sdateStr = itemBean.getSdte() + itemBean.getStme(); String sdateStr = itemBean.getSdte() + itemBean.getStme();
String mdateStr = itemBean.getMdte() + itemBean.getMtme(); String mdateStr = itemBean.getMdte() + itemBean.getMtme();
...@@ -128,6 +129,11 @@ public class OutItem extends BaseMongoBean { ...@@ -128,6 +129,11 @@ public class OutItem extends BaseMongoBean {
private int sendQty; private int sendQty;
/** /**
* 线别
*/
private String line;
/**
* 出库缺料情况 * 出库缺料情况
*/ */
public int outLessQty(){ public int outLessQty(){
...@@ -152,7 +158,7 @@ public class OutItem extends BaseMongoBean { ...@@ -152,7 +158,7 @@ public class OutItem extends BaseMongoBean {
* 真实绑定缺料 * 真实绑定缺料
*/ */
public int realBindLessQty(){ public int realBindLessQty(){
return qty - realLockQty; return qty - getRealLockQty();
} }
public String getFacility() { public String getFacility() {
...@@ -463,4 +469,12 @@ public class OutItem extends BaseMongoBean { ...@@ -463,4 +469,12 @@ public class OutItem extends BaseMongoBean {
public void setFixedQty(int fixedQty) { public void setFixedQty(int fixedQty) {
this.fixedQty = fixedQty; this.fixedQty = fixedQty;
} }
public String getLine() {
return line;
}
public void setLine(String line) {
this.line = line;
}
} }
...@@ -32,7 +32,7 @@ public class OutInfoDaoImpl extends AbstractMongoDao implements IOutInfoDao { ...@@ -32,7 +32,7 @@ public class OutInfoDaoImpl extends AbstractMongoDao implements IOutInfoDao {
} }
/** /**
* 查找所有发料状态不为2(未发料完成)的工单需求单 * 查找所有的工单需求单
*/ */
@Override @Override
public List<OutInfo> listBySo(String so){ public List<OutInfo> listBySo(String so){
......
...@@ -137,6 +137,7 @@ public class QisdaController extends BaseController { ...@@ -137,6 +137,7 @@ public class QisdaController extends BaseController {
@ResponseBody @ResponseBody
public String unBindAllReel(HttpServletRequest request){ public String unBindAllReel(HttpServletRequest request){
String soseq = request.getParameter("soseq"); String soseq = request.getParameter("soseq");
log.info("手动解绑工单序号["+soseq+"]");
if(Strings.isNullOrEmpty(soseq)){ if(Strings.isNullOrEmpty(soseq)){
return "无工单序号参数soseq,无法解绑"; return "无工单序号参数soseq,无法解绑";
} }
......
...@@ -148,6 +148,14 @@ public class OutInfoCache { ...@@ -148,6 +148,14 @@ public class OutInfoCache {
} }
/** /**
* 获取当前正在执行的需求单
*/
public OutInfo getCurrentExeOutInfo(){
String hSerial = QisdaCache.getCurrentOrderHSerial();
return outInfoMap.get(hSerial);
}
/**
* 更新需求项 * 更新需求项
*/ */
public void updateOutItem(String outItemId){ public void updateOutItem(String outItemId){
...@@ -873,6 +881,13 @@ public class OutInfoCache { ...@@ -873,6 +881,13 @@ public class OutInfoCache {
StoragePos maxQtyReelPos = null; StoragePos maxQtyReelPos = null;
OutItem totalOutInfo = soseqCache.getCutOutItem(outItem.getSoseq(), outItem.getSlotlocation()); OutItem totalOutInfo = soseqCache.getCutOutItem(outItem.getSoseq(), outItem.getSlotlocation());
if(totalOutInfo != null){ if(totalOutInfo != null){
if(totalOutInfo.getSendQty() >= totalOutInfo.getQty()){
log.info("工单序号"+outItem.getSoseq()+"["+outItem.getSlotlocation()+"]发料总数量已达到需求单数量,不再发料");
outItem.setFixedQty(-1);
outItemDao.save(outItem);
updateOutItem(outItem.getId());
return tasks;
}
if(totalOutInfo.getOutQty() == 0){ if(totalOutInfo.getOutQty() == 0){
//首盘未出,需要预留一盘最大的给首盘 //首盘未出,需要预留一盘最大的给首盘
maxQtyReelPos = storagePosDao.findMaxQtyBindReel(outItem.getSoseq(), outItem.getSlotlocation()); maxQtyReelPos = storagePosDao.findMaxQtyBindReel(outItem.getSoseq(), outItem.getSlotlocation());
......
package com.myproject.webapp.controller.webService; package com.myproject.webapp.controller.webService;
import com.google.common.base.Strings; import com.google.common.base.Strings;
import com.google.common.collect.Lists;
import com.google.common.collect.Sets;
import com.myproject.bean.qisda.*; import com.myproject.bean.qisda.*;
import com.myproject.bean.update.*; import com.myproject.bean.update.*;
import com.myproject.bean.update.qisda.DNInfo; import com.myproject.bean.update.qisda.DNInfo;
import com.myproject.bean.update.qisda.DNItem;
import com.myproject.bean.update.qisda.OutInfo; import com.myproject.bean.update.qisda.OutInfo;
import com.myproject.bean.update.qisda.OutItem; import com.myproject.bean.update.qisda.OutItem;
import com.myproject.dao.mongo.IBarcodeDao;
import com.myproject.dao.mongo.IDataLogDao;
import com.myproject.dao.mongo.IStoragePosDao; import com.myproject.dao.mongo.IStoragePosDao;
import com.myproject.dao.mongo.qisda.IOutInfoDao; import com.myproject.dao.mongo.qisda.IOutInfoDao;
import com.myproject.dao.mongo.qisda.IOutItemDao; import com.myproject.dao.mongo.qisda.IOutItemDao;
import com.myproject.exception.ApiException;
import com.myproject.exception.ValidateException; import com.myproject.exception.ValidateException;
import com.myproject.manager.IComponentManager;
import com.myproject.util.*; import com.myproject.util.*;
import com.myproject.webapp.controller.qisda.util.OutInfoCache; import com.myproject.webapp.controller.qisda.util.OutInfoCache;
import com.myproject.webapp.controller.qisda.util.SoseqCache; import com.myproject.webapp.controller.qisda.util.SoseqCache;
...@@ -156,25 +153,55 @@ public class QisdaApiController extends BaseController { ...@@ -156,25 +153,55 @@ public class QisdaApiController extends BaseController {
@RequestMapping(value = "/soSeqLockInfo") @RequestMapping(value = "/soSeqLockInfo")
@ResponseBody @ResponseBody
public ResultBean getSoSeqLockInfo(HttpServletRequest request){ public ResultBean getSoSeqLockInfo(HttpServletRequest request){
String soseq = receiveParamInfo(request,"soseq"); String soseqStr = receiveParamInfo(request,"soseq");
log.info("收到工单绑定查询请求soseq="+soseq); String soStr = receiveParamInfo(request,"so");
log.info("收到工单绑定查询请求so="+ soStr + " soseq="+soseqStr);
Set<String> soseqSet = Sets.newHashSet();
if(!Strings.isNullOrEmpty(soseqStr)){
String[] soseqArr = soseqStr.split(",");
for (String soseq : soseqArr) {
soseqSet.add(soseq);
}
}
if(!Strings.isNullOrEmpty(soStr)){
String[] soArr = soStr.split(",");
for (String so : soArr) {
List<OutInfo> outInfos = outInfoDao.listBySo(so);
for (OutInfo outInfo : outInfos) {
soseqSet.add(outInfo.getSoseq());
}
}
}
List<SoseqLockInfo> lockInfos = new ArrayList<>();
for (String soseq : soseqSet) {
SoseqLockInfo lockInfo = getLockInfo(soseq);
lockInfos.add(lockInfo);
}
return ResultBean.newOkResult(lockInfos);
}
private SoseqLockInfo getLockInfo(String soseq){
SoseqLockInfo soseqLockInfo = new SoseqLockInfo();
soseqLockInfo.setSoseq(soseq);
OutInfo cutOutInfo = soseqCache.getCutActionInfoFromCache(soseq); OutInfo cutOutInfo = soseqCache.getCutActionInfoFromCache(soseq);
List<ItemLockInfo> itemLockInfoList = new ArrayList<>();
if(cutOutInfo != null){ if(cutOutInfo != null){
soseqLockInfo.setSo(cutOutInfo.getSo());
for (OutItem outItem : cutOutInfo.getOutItems()) { for (OutItem outItem : cutOutInfo.getOutItems()) {
ItemLockInfo itemLockInfo = new ItemLockInfo(); LockItemInfo lockItemInfo = new LockItemInfo();
itemLockInfo.setSoseq(outItem.getSoseq()); lockItemInfo.setSoseq(outItem.getSoseq());
itemLockInfo.setSlotlocation(outItem.getSlotlocation()); lockItemInfo.setSlotlocation(outItem.getSlotlocation());
itemLockInfo.setPartNum(outItem.getPn()); lockItemInfo.setPartNum(outItem.getPn());
itemLockInfo.setQty(outItem.getQty()); lockItemInfo.setQty(outItem.getQty());
itemLockInfo.setPreLockQty(outItem.getLockQty()); lockItemInfo.setPreLockQty(outItem.getLockQty());
itemLockInfo.setRealLockQty(outItem.getRealLockQty()); lockItemInfo.setRealLockQty(outItem.getRealLockQty());
itemLockInfo.setTotalSendQty(outItem.getSendQty()); lockItemInfo.setTotalSendQty(outItem.getSendQty());
itemLockInfo.setFirstSendQty(outItem.getOutQty()); lockItemInfo.setFirstSendQty(outItem.getOutQty());
itemLockInfoList.add(itemLockInfo); soseqLockInfo.addLockItem(lockItemInfo);
} }
} }
return ResultBean.newOkResult(itemLockInfoList); return soseqLockInfo;
} }
/** /**
...@@ -444,13 +471,15 @@ public class QisdaApiController extends BaseController { ...@@ -444,13 +471,15 @@ public class QisdaApiController extends BaseController {
Map<String,String> paramMap = new HashMap<>(); Map<String,String> paramMap = new HashMap<>();
try { try {
String params = request.getReader().lines().collect(Collectors.joining(System.lineSeparator())); String params = request.getReader().lines().collect(Collectors.joining(System.lineSeparator()));
String[] paramArr = params.split("&"); if(!Strings.isNullOrEmpty(params)){
for (String paramInfo : paramArr) { String[] paramArr = params.split("&");
String[] arr = paramInfo.split("="); for (String paramInfo : paramArr) {
if(arr.length == 2){ String[] arr = paramInfo.split("=");
paramMap.put(arr[0],arr[1]); if(arr.length == 2){
}else{ paramMap.put(arr[0],arr[1]);
log.error("参数错误:" + paramInfo); }else{
log.error("参数错误:" + paramInfo);
}
} }
} }
} catch (IOException e) { } catch (IOException e) {
......
...@@ -433,10 +433,12 @@ public class QisdaBindService { ...@@ -433,10 +433,12 @@ public class QisdaBindService {
List<String> lessSoseqList = new ArrayList<>(); List<String> lessSoseqList = new ArrayList<>();
List<OutInfo> cacheOutInfoList = outInfoCache.getCachedOutInfos(); List<OutInfo> cacheOutInfoList = outInfoCache.getCachedOutInfos();
for (OutInfo unEndOutInfo : cacheOutInfoList) { for (OutInfo unEndOutInfo : cacheOutInfoList) {
if(!unEndOutInfo.isClosed() && unEndOutInfo.isRealBindLess()){ if(unEndOutInfo.isReelCutAction()){
String soseq = unEndOutInfo.getSoseq(); if(!unEndOutInfo.isClosed() && unEndOutInfo.isRealBindLess()){
if(!lessSoseqList.contains(soseq)){ String soseq = unEndOutInfo.getSoseq();
lessSoseqList.add(soseq); if(!lessSoseqList.contains(soseq)){
lessSoseqList.add(soseq);
}
} }
} }
} }
......
...@@ -1259,4 +1259,23 @@ public class QisdaDeviceController extends BaseController { ...@@ -1259,4 +1259,23 @@ public class QisdaDeviceController extends BaseController {
return alarmList; return alarmList;
} }
/**
* 查询当前正在出的工单的线别信息
*/
@RequestMapping(value = "/currentOutLine")
@ResponseBody
public ResultBean currentOutLine(HttpServletRequest request){
OutInfo currentOutInfo = outInfoCache.getCurrentExeOutInfo();
if(currentOutInfo != null){
Map<String,Object> resultMap = new HashMap<>();
resultMap.put("hSerial", currentOutInfo.gethSerial());
resultMap.put("so", currentOutInfo.getSo());
resultMap.put("line", currentOutInfo.getLine());
return ResultBean.newOkResult(resultMap);
}
return ResultBean.newOkResult("");
}
} }
...@@ -270,7 +270,7 @@ ...@@ -270,7 +270,7 @@
}, 1000); }, 1000);
flushInOutChart = function (){ flushInOutChart = function (){
$.post("${ctx}/service/store/inOutChartData", {days: 30}, function (data) { $.post("${ctx}/service/store/inOutChartData", {days: 14}, function (data) {
var days = new Array(); var days = new Array();
var putIns = new Array(); var putIns = new Array();
var checkOuts = new Array(); var checkOuts = new Array();
...@@ -332,7 +332,13 @@ ...@@ -332,7 +332,13 @@
{ {
name:'${label_stockIn}', name:'${label_stockIn}',
type:'bar', type:'bar',
stack: '总量', stack: '吞吐量',
label: {
normal: {
show: true,//设置柱体数值是否显示
color: "#fff"
}
},
itemStyle:{ itemStyle:{
normal: { normal: {
color: '#9b59b6' color: '#9b59b6'
...@@ -343,7 +349,13 @@ ...@@ -343,7 +349,13 @@
{ {
name:'${label_stockOut}', name:'${label_stockOut}',
type:'bar', type:'bar',
stack: '总量', stack: '吞吐量',
label: {
normal: {
show: true,//设置柱体数值是否显示
color: "#fff"
}
},
itemStyle:{ itemStyle:{
normal: { normal: {
color: '#dfba49' color: '#dfba49'
...@@ -362,7 +374,7 @@ ...@@ -362,7 +374,7 @@
flushInOutChart(); flushInOutChart();
setInterval(function(){ setInterval(function(){
flushInOutChart(); flushInOutChart();
}, 5 * 60000); }, 60 * 60000);
}); });
</script> </script>
</c:set> </c:set>
\ No newline at end of file \ No newline at end of file
...@@ -85,6 +85,7 @@ ...@@ -85,6 +85,7 @@
<display:column titleKey="工单" sortable="true" sortProperty="so"> <display:column titleKey="工单" sortable="true" sortProperty="so">
${outInfo.so}<c:if test="${outInfo.soseq != null}">(${outInfo.soseq})</c:if> ${outInfo.so}<c:if test="${outInfo.soseq != null}">(${outInfo.soseq})</c:if>
</display:column> </display:column>
<display:column titleKey="线别" property="line" sortable="true" sortProperty="line"/>
<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"> <display:column titleKey="建议出仓时间" sortable="true" sortProperty="sdate">
<fmt:formatDate value="${outInfo.sdate}" pattern="yyyy-MM-dd HH:mm"/> <fmt:formatDate value="${outInfo.sdate}" pattern="yyyy-MM-dd HH:mm"/>
......
...@@ -262,6 +262,13 @@ ...@@ -262,6 +262,13 @@
{ {
name:'${label_stockIn}', name:'${label_stockIn}',
type:'bar', type:'bar',
stack: '吞吐量',
label: {
normal: {
show: true,//设置柱体数值是否显示
color: "#fff"
}
},
itemStyle:{ itemStyle:{
normal: { normal: {
color: '#9b59b6' color: '#9b59b6'
...@@ -272,6 +279,13 @@ ...@@ -272,6 +279,13 @@
{ {
name:'${label_stockOut}', name:'${label_stockOut}',
type:'bar', type:'bar',
stack: '吞吐量',
label: {
normal: {
show: true,//设置柱体数值是否显示
color: "#fff"
}
},
itemStyle:{ itemStyle:{
normal: { normal: {
color: '#dfba49' color: '#dfba49'
......
...@@ -12,6 +12,26 @@ ...@@ -12,6 +12,26 @@
<div class="row"> <div class="row">
<div class="col-md-12"> <div class="col-md-12">
<ul class="timeline"> <ul class="timeline">
<li class="timeline-blue">
<div class="timeline-time">
<span class="date">2020 </span>
<span class="time">08-28 </span>
</div>
<div class="timeline-icon">
<i class="fa fa-clock-o"></i>
</div>
<div class="timeline-body">
<h2>版本: V2020082809</h2>
<div class="timeline-content">
<ul>
<li>报警看板增加消息类型</li>
<li>需求单添加产线</li>
<li>提供当前正在出库工单的产线信息</li>
<li>绑定信息接口修改为可接收多个soseq和多个so</li>
</ul>
</div>
</div>
</li>
<li class="timeline-yellow"> <li class="timeline-yellow">
<div class="timeline-time"> <div class="timeline-time">
<span class="date">2020 </span> <span class="date">2020 </span>
......
...@@ -239,7 +239,7 @@ ...@@ -239,7 +239,7 @@
<div class="page-footer-inner"> <div class="page-footer-inner">
2016&copy; <a href="${ctx}/updateHistory.html">SMD BOX</a> 2016&copy; <a href="${ctx}/updateHistory.html">SMD BOX</a>
</div> </div>
<span class="right" style="color: #a3a3a3;">Version: 2020.08.26</span> <span class="right" style="color: #a3a3a3;">Version: 2020.08.28</span>
<div class="scroll-to-top"> <div class="scroll-to-top">
<i class="icon-arrow-up"></i> <i class="icon-arrow-up"></i>
</div> </div>
......
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!