Commit 613d64a2 sunke

报警看板增加消息类型

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