安灯主界面开发

yun-zuoyi
crish 6 years ago
parent 9e64ee8258
commit 74224b20ac

@ -7,6 +7,7 @@ import io.swagger.annotations.Api;
import io.swagger.annotations.ApiParam;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.hibernate.Interceptor;
import org.hibernate.annotations.DynamicInsert;
import org.hibernate.annotations.DynamicUpdate;
@ -41,7 +42,6 @@ public class AndonCellGroupCfg extends BaseBean {
@ApiParam(value = "工作单元组")
private String cellGroup;
@Column(name = "GROUP_CODE")
@ApiParam(value = "分组代码")
private String groupCode;
@ -49,4 +49,20 @@ public class AndonCellGroupCfg extends BaseBean {
@Column(name = "GROUP_NAME")
@ApiParam(value = "分组名称")
private String groupName;
@Column(name = "HORIZONTAL_AXIS")
@ApiParam(value = "横坐标")
private Float horizontalAxis ;
@Column(name = "VERTICAL_AXIS")
@ApiParam(value = "纵坐标")
private Float verticalAxis;
@Column(name = "ABNORMAL_SRC")
@ApiParam(value = "异常图片")
private String abnormalSrc;
@Column(name = "NORMAL_SRC")
@ApiParam(value = "正常图片")
private String normalSrc;
}

@ -111,6 +111,10 @@ public class AndonManageQueue extends BaseManageQueue {
private Double avgSignTime;
@Transient
@ApiParam(value = "解决时长", example = "0")
private Long resolveTime;
@Transient
@ApiParam(value = "平均解决时长", example = "0")
private Double avgResolveTime;

@ -15,12 +15,30 @@ import java.io.Serializable;
@Data
public class AndonBoardModel {
@ApiParam("工作单元代码")
private String workCellCode;
@ApiParam("工作单元名称")
private String workCellName;
@ApiParam("安灯任务编号")
private String andonOrderNo;
@ApiParam("安灯类型")
private String alarmCode;
@ApiParam("安灯类型名称")
private String alarmName;
@ApiParam("故障时长 单位:分钟")
private Long exceptionTimeCount;
@ApiParam("响应时长 单位:分钟")
private Long responseTimeCount;
@ApiParam("解决时长 单位:分钟")
private Long resetTimeCount;
@ApiParam("安灯正常处理的次数")
private Integer inTime;
@ -30,6 +48,19 @@ public class AndonBoardModel {
@ApiParam("安灯总次数")
private Integer totalTime;
@ApiParam("安灯类型百分比")
private float propagation;
@ApiParam("事件描述代码")
private String acCode;
@ApiParam("事件描述详情")
private String acDesc;
@ApiParam("工位运行状态")
private String cellStatus;
public int getTotalTimeVal() {
return totalTime == null ? 0 : totalTime;
}
@ -42,5 +73,18 @@ public class AndonBoardModel {
return inTime == null ? 0 : inTime;
}
public double getExceptionCountVal() {
return exceptionTimeCount == null ? 0 : exceptionTimeCount;
}
public double getResponseTimeCountVal() {
return responseTimeCount == null ? 0 : responseTimeCount;
}
public double getResetTimeCountVal() {
return resetTimeCount == null ? 0 : resetTimeCount;
}
}

@ -0,0 +1,75 @@
package cn.estsh.i3plus.pojo.andon.model;
import cn.estsh.i3plus.pojo.andon.bean.AndonManageQueue;
import io.swagger.annotations.ApiParam;
import lombok.Data;
import java.util.List;
/**
* @Description: Model
* @Reference:
* @Author: Crish
* @CreateDate:2019-11-22-13:44
* @Modify:
**/
@Data
public class AndonMenuInterfaceModel{
@ApiParam("工作中心代码")
private String workCenterCode;
@ApiParam("工作中心名称")
private String workCenterName;
@ApiParam("产线运行状态")
private String workCenterStatus;
@ApiParam("安灯类型")
private String alarmCode;
@ApiParam("安灯类型名称")
private String alarmName;
@ApiParam("故障总时长 单位:分钟")
private Long exceptionTime;
@ApiParam("当前安灯类型故障时长 单位:分钟")
private Long currentExceptionTime;
@ApiParam("当前安灯类型故障比例")
private Double proportion;
@ApiParam("当前工厂的产线故障统计")
private List<AndonMenuInterfaceModel> andonWorkcenterList;
@ApiParam("当前产线的所有故障统计")
private List<AndonBoardModel> alarmBrokenInfoList;
@ApiParam("当前产线的未解决故障统计")
private List<AndonManageQueue> pendingSolveBrokenInfoList;
@ApiParam("当前产线的响应时长top10")
private List<AndonBoardModel> responseInfoList;
@ApiParam("当前产线的解决时长top10")
private List<AndonBoardModel> solveInfoList;
@ApiParam("当前产线的异常时长top10")
private List<AndonBoardModel> exceptionInfoList;
@ApiParam("当前产线的站点状态统计")
private List<CellGroupStatusModel> andonCellGroupStatusList;
public double getExceptionTimeVal() {
return exceptionTime == null ? 0 : exceptionTime;
}
public double getCurrentExceptionTimeVal() {
return currentExceptionTime == null ? 0 : currentExceptionTime;
}
public double getProportionVal() {
return proportion == null ? 0 : proportion;
}
}

@ -0,0 +1,55 @@
package cn.estsh.i3plus.pojo.andon.model;
/**
* @Description: model
* @Reference:
* @Author: Crish
* @CreateDate:2019-11-22-16:02
* @Modify:
**/
import io.swagger.annotations.ApiParam;
import lombok.Data;
import javax.persistence.Column;
import java.util.List;
/**
* model
*/
@Data
public class CellGroupStatusModel{
@ApiParam("工作中心代码")
private String workCenterCode;
@ApiParam("安灯类型")
private String groupCode;
@ApiParam("安灯类型名称")
private String groupName;
@ApiParam("安灯类型名称")
private String workCellCode;
@ApiParam("安灯类型名称")
private String workCellName;
@ApiParam("站点运行状态")
private String cellGroupStatus;
@ApiParam(value = "横坐标")
private Float horizontalAxis ;
@ApiParam(value = "纵坐标")
private Float verticalAxis;
@ApiParam(value = "异常图片")
private String abnormalSrc;
@ApiParam(value = "正常图片")
private String normalSrc;
@ApiParam("当前站点下的工位故障统计")
private List<AndonBoardModel> andonBoardModelList;
}

@ -13,6 +13,52 @@ import org.apache.commons.lang3.StringUtils;
public class AndonEnumUtil {
/**
* 线
* = 10 = 20
*/
@JsonFormat(shape = JsonFormat.Shape.OBJECT)
public enum RUNNING_STATUS{
RUNNING("10","正常"),
STOP("20","故障");
private String value;
private String description;
RUNNING_STATUS(String value, String description) {
this.value = value;
this.description = description;
}
public String getValue() {
return value;
}
public String getDescription() {
return description;
}
public static String valueOfDescription(String val) {
String tmp = null;
for (int i = 0; i < values().length; i++) {
if (StringUtils.equalsIgnoreCase(values()[i].value,val)) {
tmp = values()[i].description;
}
}
return tmp;
}
public static String descriptionOfValue(String val) {
String tmp = null;
for (int i = 0; i < values().length; i++) {
if (StringUtils.equalsIgnoreCase(values()[i].description, val)) {
tmp = values()[i].value;
}
}
return tmp;
}
}
/**
*
* 10-20-
*/

Loading…
Cancel
Save