安灯图表

yun-zuoyi
王杰 6 years ago
parent b088b40fd1
commit 3ff9fbc140

@ -21,6 +21,12 @@ public class AndonBoardModel {
@ApiParam("工作单元名称") @ApiParam("工作单元名称")
private String workCellName; private String workCellName;
@ApiParam("生产线代码")
private String workCenterCode;
@ApiParam("生产线名称")
private String workCenterName;
@ApiParam("安灯任务编号") @ApiParam("安灯任务编号")
private String andonOrderNo; private String andonOrderNo;
@ -36,9 +42,12 @@ public class AndonBoardModel {
@ApiParam("响应时长 单位:分钟") @ApiParam("响应时长 单位:分钟")
private Long responseTimeCount = 0L; private Long responseTimeCount = 0L;
@ApiParam("解决时长 单位:分钟") @ApiParam("响应时长 单位:分钟")
private Long resetTimeCount = 0L; private Long resetTimeCount = 0L;
@ApiParam("响应时长/响应时长(通用) 单位:分钟")
private Long commonTimeCount = 0L;
@ApiParam("安灯正常处理的次数") @ApiParam("安灯正常处理的次数")
private Integer inTime = 0; private Integer inTime = 0;
@ -60,6 +69,8 @@ public class AndonBoardModel {
@ApiParam("工位运行状态") @ApiParam("工位运行状态")
private String cellStatus; private String cellStatus;
@ApiParam("图表类型颜色")
private String color;
public int getTotalTimeVal() { public int getTotalTimeVal() {
return totalTime == null ? 0 : totalTime; return totalTime == null ? 0 : totalTime;
@ -85,6 +96,8 @@ public class AndonBoardModel {
return resetTimeCount == null ? 0 : resetTimeCount; return resetTimeCount == null ? 0 : resetTimeCount;
} }
public double getCommonTimeCountVal() {
return commonTimeCount == null ? 0 : commonTimeCount;
}
} }

@ -1,6 +1,8 @@
package cn.estsh.i3plus.pojo.andon.model; package cn.estsh.i3plus.pojo.andon.model;
import cn.estsh.i3plus.pojo.andon.bean.AndonManageQueue; import cn.estsh.i3plus.pojo.andon.bean.AndonManageQueue;
import cn.estsh.i3plus.pojo.andon.bean.MesWorkCenter;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam; import io.swagger.annotations.ApiParam;
import lombok.Data; import lombok.Data;
@ -40,27 +42,54 @@ public class AndonMenuInterfaceModel{
@ApiParam("当前安灯类型故障比例") @ApiParam("当前安灯类型故障比例")
private Double proportion = 0D; private Double proportion = 0D;
@ApiParam("当前工厂的产线故障统计") @ApiParam("图表类型颜色")
private List<AndonMenuInterfaceModel> andonWorkcenterList; private String color;
@ApiParam("当前产线的所有故障统计") @ApiParam("安灯状态")
private List<AndonBoardModel> alarmBrokenInfoList; private Integer actionCode;
@ApiParam("当前产线的未解决故障统计") @ApiParam("安灯状态名称")
private List<AndonBoardModel> pendingSolveBrokenInfoList; private String actionName;
@ApiParam("mes微服调用-故障次数占比")
private List<AndonBoardModel> mesBrokenRatioList;
@ApiParam("当前产线的响应时长top10") @ApiParam("故障时长类型占比 / 故障次数占比 / 工厂故障信息-产线故障时长-产线时长集合")
private List<AndonBoardModel> responseInfoList; private List<AndonBoardModel> brokenRatioList;
@ApiParam("当前产线的解决时长top10") @ApiParam("工厂故障信息-产线故障时长-安灯类型集合")
private List<AndonBoardModel> solveInfoList; private List<AndonMenuInterfaceModel> workcenterBrokenTimeList;
@ApiParam("当前产线的异常时长top10") @ApiParam("工厂故障信息-产线故障时长-产线集合")
private List<AndonBoardModel> exceptionInfoList; private List<MesWorkCenter> workCenterList;
@ApiParam("当前产线的站点状态统计") @ApiParam("产线整体状态")
private List<AndonMenuInterfaceModel> andonWorkcenterList;
@ApiParam("产品运行状态示意图")
private List<CellGroupStatusModel> andonCellGroupStatusList; private List<CellGroupStatusModel> andonCellGroupStatusList;
@ApiParam("事件设备时长TOP10")
private List<AndonMenuInterfaceModel> equTimeList;
@ApiParam("事件设备时长TOP10-次数")
private List<String> equInTimeList;
@ApiParam("事件质量时长TOP10")
private List<AndonMenuInterfaceModel> qualityTimeList;
@ApiParam("事件质量时长TOP10-次数")
private List<String> qualityInTimeList;
@ApiParam("事件物料时长TOP10")
private List<AndonMenuInterfaceModel> partTimeList;
@ApiParam("事件物料时长TOP10-次数")
private List<String> partInTimeList;
@ApiParam("当前产线的未解决故障统计")
private List<AndonBoardModel> pendingSolveBrokenInfoList;
public double getExceptionTimeVal() { public double getExceptionTimeVal() {
return exceptionTime == null ? 0 : exceptionTime; return exceptionTime == null ? 0 : exceptionTime;
} }

@ -867,4 +867,13 @@ public class AndonHqlPack {
return result; return result;
} }
public static DdlPackBean packHqlAndonMenu(String organizeCode, String workCenterCode, String startDateTime, String endDateTime) {
DdlPackBean result = DdlPackBean.getDdlPackBean(organizeCode);
if (!StringUtils.isEmpty(workCenterCode)) {
DdlPreparedPack.getStringEqualPack(workCenterCode, "workCenterCode", result);
}
DdlPreparedPack.timeBuilder(startDateTime, endDateTime, "createDatetime", result, true);
return result;
}
} }

@ -947,24 +947,27 @@ public class AndonEnumUtil {
*/ */
@JsonFormat(shape = JsonFormat.Shape.OBJECT) @JsonFormat(shape = JsonFormat.Shape.OBJECT)
public enum ALARM_TYPE { public enum ALARM_TYPE {
PART("PART_ALARM", 110060104, "物料"), //下面的顺序不要更改packBrokenTimeTypeRatioList方法有用到此枚举的顺序
QUALITY("QUALITY_ALARM", 110060105, "质量"), EQUIP("EQUMENT_ALARM", 110060106, "设备", "#D06D6A"),
EQUIP("EQUMENT_ALARM", 110060106, "设备"), QUALITY("QUALITY_ALARM", 110060105, "质量", "#9084FF"),
PROCESS("ROUTING_ALARM", 110060107, "工艺"), PART("PART_ALARM", 110060104, "物料", "#24BDBA"),
CHECK("OTHER_ALARM", 110060108, "自处理"), PROCESS("ROUTING_ALARM", 110060107, "工艺", "#2B97F9"),
FIX_ERROR("FIX_ERROR", 110060109, "自动报警"); CHECK("OTHER_ALARM", 110060108, "自处理", "#EAA510"),
FIX_ERROR("FIX_ERROR", 110060109, "自动报警", "#797B7F");
private String value; private String value;
private Integer code; private Integer code;
private String description; private String description;
private String colour;
ALARM_TYPE(String value, Integer code, String description) { ALARM_TYPE(String value, Integer code, String description, String colour) {
this.value = value; this.value = value;
this.code = code; this.code = code;
this.description = description; this.description = description;
this.colour = colour;
} }
public String getValue() { public String getValue() {
return value; return value;
} }
@ -976,6 +979,10 @@ public class AndonEnumUtil {
return description; return description;
} }
public String getColour() {
return colour;
}
public static String valueOfDescription(String val) { public static String valueOfDescription(String val) {
String tmp = null; String tmp = null;
for (int i = 0; i < values().length; i++) { for (int i = 0; i < values().length; i++) {
@ -995,6 +1002,16 @@ public class AndonEnumUtil {
} }
return tmp; return tmp;
} }
public static String colourOfValue(String val) {
String tmp = null;
for (int i = 0; i < values().length; i++) {
if (StringUtils.equalsIgnoreCase(values()[i].value, val)) {
tmp = values()[i].colour;
}
}
return tmp;
}
} }
/** /**

Loading…
Cancel
Save