2025-2-24 设备新看板

master
元气满满 1 month ago
parent 1d22190911
commit 94f03c3d39

@ -3,7 +3,10 @@ package com.op.device.controller;
import com.baomidou.dynamic.datasource.toolkit.DynamicDataSourceContextHolder;
import com.op.common.core.web.domain.AjaxResult;
import com.op.device.domain.*;
import com.op.device.domain.vo.EquOrderVO;
import com.op.device.domain.vo.EquRepairWorkOrderDetailVO;
import com.op.device.service.IDeviceInterfaceService;
import com.op.device.service.IEquOrderService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
@ -22,6 +25,9 @@ public class DeviceInterfaceController {
@Autowired
private IDeviceInterfaceService deviceInterfaceService;
@Autowired
private IEquOrderService equOrderService;
/**
*
*
@ -99,4 +105,50 @@ public class DeviceInterfaceController {
return deviceInterfaceService.getGroupLineEquInfo();
}
///////////////////////////////////设备新看板
/**
*
*
*
*
*
*
*
*
*/
@GetMapping("/getCompletedRate")
public AjaxResult getCompletedRate(EquOperation equOperation) {
DynamicDataSourceContextHolder.push(equOperation.getPoolName());
return deviceInterfaceService.getCompletedRate();
}
/**
*
*
*/
@GetMapping("/selectEquRepairWorkOrderDetail")
public AjaxResult selectEquRepairWorkOrderDetail(EquRepairWorkOrderDetailVO equRepairWorkOrderDetailVO) {
DynamicDataSourceContextHolder.push(equRepairWorkOrderDetailVO.getPoolName());
return deviceInterfaceService.selectEquRepairWorkOrderDetail(equRepairWorkOrderDetailVO);
}
/**
*
*
*/
@GetMapping("/selectSpotInspectionList")
public AjaxResult selectSpotInspectionList(EquOrderVO equOrderVO) {
DynamicDataSourceContextHolder.push(equOrderVO.getPoolName());
return deviceInterfaceService.selectSpotInspectionList(equOrderVO);
}
/**
*
*
*/
@GetMapping("/selectInspectionList")
public AjaxResult selectInspectionList(EquOrderVO equOrderVO) {
DynamicDataSourceContextHolder.push(equOrderVO.getPoolName());
return deviceInterfaceService.selectInspectionList(equOrderVO);
}
}

@ -296,6 +296,9 @@ public class EquOrder extends BaseEntity {
//设备类型编码 安环三个报表要用
private String equipmentTypeCode;
//时间维度 年月日
private String timeDimension;
public String getPicturePath() {
return picturePath;
}
@ -842,6 +845,9 @@ public class EquOrder extends BaseEntity {
this.equipmentTypeCode = equipmentTypeCode;
}
public String getTimeDimension() { return timeDimension; }
public void setTimeDimension(String timeDimension) { this.timeDimension = timeDimension; }
@Override
public String toString() {
return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)

@ -1,5 +0,0 @@
package com.op.device.domain.dto;
// 看板传参实体
public class InterfaceDTO {
}

@ -0,0 +1,884 @@
package com.op.device.domain.vo;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.op.common.core.annotation.Excel;
import com.op.common.core.domain.BaseFileData;
import com.op.common.core.web.domain.BaseEntity;
import com.op.device.domain.EquOrderDetail;
import com.op.device.domain.EquOrderEqu;
import com.op.device.domain.EquOrderStandard;
import com.op.device.domain.EquSpareApply;
import com.op.system.api.domain.SysUser;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import java.math.BigDecimal;
import java.util.Date;
import java.util.List;
public class EquOrderVO extends BaseEntity {
private static final long serialVersionUID = 1L;
/**
*
*/
private String orderId;
/**
* id
*/
// @Excel(name = "计划id")
private String planId;
/**
*
*/
@Excel(name = "计划编码")
private String planCode;
/**
*
*/
@Excel(name = "计划类型")
private String planType;
/**
*
*/
@Excel(name = "单号")
private String orderCode;
/**
*
*/
@Excel(name = "车间")
private String planWorkshop;
/**
* 线
*/
@Excel(name = "产线")
private String planProdLine;
/**
*
*/
@Excel(name = "循环周期")
private String planLoop;
/**
*
*/
@Excel(name = "循环周期类型")
private String planLoopType;
/**
*
*/
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@Excel(name = "循环执行时间开始", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
private Date planLoopStart;
/**
*
*/
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@Excel(name = "循环执行时间结束", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
private Date planLoopEnd;
/**
*
*/
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@Excel(name = "实际开始时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
private Date orderStart;
/**
*
*/
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@Excel(name = "实际结束时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
private Date orderEnd;
/**
*
*/
@Excel(name = "设备编码")
private String equipmentCode;
/**
*
*/
@Excel(name = "工单状态")
private String orderStatus;
/**
*
*/
@Excel(name = "工单费用")
private BigDecimal orderCost;
/**
*
*/
@Excel(name = "责任人")
private String planPerson;
/**
*
*/
@Excel(name = "责任人姓名")
private String planPersonName;
/**
*
*/
@Excel(name = "工单用时")
private String orderCostTime;
/**
*
*/
@Excel(name = "签字")
private String orderSignPerson;
/**
*
*/
@Excel(name = "工厂")
private String factoryCode;
/**
* 1
*/
@Excel(name = "备用字段1")
private String attr1;
/**
* 2
*/
@Excel(name = "备用字段2")
private String attr2;
/**
* 3
*/
@Excel(name = "备用字段3")
private String attr3;
/**
*
*/
@Excel(name = "删除标志")
private String delFlag;
private String planName;
private String workCenterName;
private List<Date> timeArray;
private List<SysUser> personList;
private boolean overdue;
private EquOrderEqu equ;
// 保养类型
private String upkeep;
// 计划保养时间计算规则
private String calculationRule;
// 是否停机保养
private String shutDown;
private String orderInspect;
//报修单号
private String repairCode;
//维修单号
private String workCode;
private int days;
private String equipmentName;
//检查项列表
private List<EquOrderStandard> standardList;
/**
*
*/
private String itemName;
/**
* /
*/
private String itemMethod;
/**
*
*/
private String itemType;
/**
*
*/
private String itemTypeName;
/**
*
*/
private String id;
public void setId(String id) {
this.id = id;
}
public String getId() {
return id;
}
//标准列表
public List<EquOrderStandard> getStandardList() {
return standardList;
}
public void setStandardList(List<EquOrderStandard> standardList) {
this.standardList = standardList;
}
private String planRestrict;
private String outsourceCode;
private List<Date> loopStartArray;
private Date loopStart;
private Date loopEnd;
private List<Date> loopEndArray;
private Date loopEndArrayStart;
private Date getLoopEndArrayEnd;
private List<Date> orderStartArray;
private Date orderStartArrayStart;
private Date orderStartArrayEnd;
private List<Date> orderEndArray;
private Date orderEndArrayStart;
private Date orderEndArrayEnd;
private List<String> upkeepPictures;
private String picturePath;
private List<BaseFileData> picturePaths;
//工具
private String itemTools;
// 创建日期范围list
private List<Date> createTimeArray;
// 创建日期开始
private String createTimeStart;
// 创建日期结束
private String createTimeEnd;
//合格率
@Excel(name = "合格率")
private String complianceRate;
//设备类型编码 安环三个报表要用
private String equipmentTypeCode;
//时间维度 年月日
private String timeDimension;
public String getPicturePath() {
return picturePath;
}
public void setPicturePath(String picturePath) {
this.picturePath = picturePath;
}
public List<String> getUpkeepPictures() {
return upkeepPictures;
}
public void setUpkeepPictures(List<String> upkeepPictures) {
this.upkeepPictures = upkeepPictures;
}
public List<BaseFileData> getPicturePaths() {
return picturePaths;
}
public void setPicturePaths(List<BaseFileData> picturePaths) {
this.picturePaths = picturePaths;
}
public List<Date> getOrderStartArray() {
return orderStartArray;
}
public void setOrderStartArray(List<Date> orderStartArray) {
this.orderStartArray = orderStartArray;
}
public Date getOrderStartArrayStart() {
return orderStartArrayStart;
}
public void setOrderStartArrayStart(Date orderStartArrayStart) {
this.orderStartArrayStart = orderStartArrayStart;
}
public Date getOrderStartArrayEnd() {
return orderStartArrayEnd;
}
public void setOrderStartArrayEnd(Date orderStartArrayEnd) {
this.orderStartArrayEnd = orderStartArrayEnd;
}
public List<Date> getOrderEndArray() {
return orderEndArray;
}
public void setOrderEndArray(List<Date> orderEndArray) {
this.orderEndArray = orderEndArray;
}
public Date getOrderEndArrayStart() {
return orderEndArrayStart;
}
public void setOrderEndArrayStart(Date orderEndArrayStart) {
this.orderEndArrayStart = orderEndArrayStart;
}
public Date getOrderEndArrayEnd() {
return orderEndArrayEnd;
}
public void setOrderEndArrayEnd(Date orderEndArrayEnd) {
this.orderEndArrayEnd = orderEndArrayEnd;
}
public List<Date> getLoopEndArray() {
return loopEndArray;
}
public void setLoopEndArray(List<Date> loopEndArray) {
this.loopEndArray = loopEndArray;
}
public Date getLoopEndArrayStart() {
return loopEndArrayStart;
}
public void setLoopEndArrayStart(Date loopEndArrayStart) {
this.loopEndArrayStart = loopEndArrayStart;
}
public Date getGetLoopEndArrayEnd() {
return getLoopEndArrayEnd;
}
public void setGetLoopEndArrayEnd(Date getLoopEndArrayEnd) {
this.getLoopEndArrayEnd = getLoopEndArrayEnd;
}
public List<Date> getLoopStartArray() {
return loopStartArray;
}
public void setLoopStartArray(List<Date> loopStartArray) {
this.loopStartArray = loopStartArray;
}
public Date getLoopStart() {
return loopStart;
}
public void setLoopStart(Date loopStart) {
this.loopStart = loopStart;
}
public Date getLoopEnd() {
return loopEnd;
}
public void setLoopEnd(Date loopEnd) {
this.loopEnd = loopEnd;
}
public String getOutsourceCode() {
return outsourceCode;
}
public void setOutsourceCode(String outsourceCode) {
this.outsourceCode = outsourceCode;
}
private List<EquOrderDetail> detailList;
private List<EquSpareApply> spareList;
public List<EquSpareApply> getSpareList() {
return spareList;
}
public void setSpareList(List<EquSpareApply> spareList) {
this.spareList = spareList;
}
public List<EquOrderDetail> getDetailList() {
return detailList;
}
public void setDetailList(List<EquOrderDetail> detailList) {
this.detailList = detailList;
}
public String getPlanRestrict() {
return planRestrict;
}
public void setPlanRestrict(String planRestrict) {
this.planRestrict = planRestrict;
}
public String getEquipmentName() {
return equipmentName;
}
public void setEquipmentName(String equipmentName) {
this.equipmentName = equipmentName;
}
public int getDays() {
return days;
}
public void setDays(int days) {
this.days = days;
}
public String getRepairCode() {
return repairCode;
}
public void setRepairCode(String repairCode) {
this.repairCode = repairCode;
}
public String getWorkCode() {
return workCode;
}
public void setWorkCode(String workCode) {
this.workCode = workCode;
}
public String getOrderInspect() {
return orderInspect;
}
public void setOrderInspect(String orderInspect) {
this.orderInspect = orderInspect;
}
public String getShutDown() {
return shutDown;
}
public void setShutDown(String shutDown) {
this.shutDown = shutDown;
}
public String getCalculationRule() {
return calculationRule;
}
public void setCalculationRule(String calculationRule) {
this.calculationRule = calculationRule;
}
public String getUpkeep() {
return upkeep;
}
public void setUpkeep(String upkeep) {
this.upkeep = upkeep;
}
public EquOrderEqu getEqu() {
return equ;
}
public void setEqu(EquOrderEqu equ) {
this.equ = equ;
}
public boolean isOverdue() {
return overdue;
}
public void setOverdue(boolean overdue) {
this.overdue = overdue;
}
public List<SysUser> getPersonList() {
return personList;
}
public void setPersonList(List<SysUser> personList) {
this.personList = personList;
}
public List<Date> getTimeArray() {
return timeArray;
}
public void setTimeArray(List<Date> timeArray) {
this.timeArray = timeArray;
}
public String getWorkCenterName() {
return workCenterName;
}
public void setWorkCenterName(String workCenterName) {
this.workCenterName = workCenterName;
}
public String getPlanName() {
return planName;
}
public void setPlanName(String planName) {
this.planName = planName;
}
public void setOrderId(String orderId) {
this.orderId = orderId;
}
public String getOrderId() {
return orderId;
}
public void setPlanId(String planId) {
this.planId = planId;
}
public String getPlanId() {
return planId;
}
public void setPlanCode(String planCode) {
this.planCode = planCode;
}
public String getPlanCode() {
return planCode;
}
public void setPlanType(String planType) {
this.planType = planType;
}
public String getPlanType() {
return planType;
}
public void setOrderCode(String orderCode) {
this.orderCode = orderCode;
}
public String getOrderCode() {
return orderCode;
}
public void setPlanWorkshop(String planWorkshop) {
this.planWorkshop = planWorkshop;
}
public String getPlanWorkshop() {
return planWorkshop;
}
public void setPlanProdLine(String planProdLine) {
this.planProdLine = planProdLine;
}
public String getPlanProdLine() {
return planProdLine;
}
public void setPlanLoop(String planLoop) {
this.planLoop = planLoop;
}
public String getPlanLoop() {
return planLoop;
}
public void setPlanLoopType(String planLoopType) {
this.planLoopType = planLoopType;
}
public String getPlanLoopType() {
return planLoopType;
}
public void setPlanLoopStart(Date planLoopStart) {
this.planLoopStart = planLoopStart;
}
public Date getPlanLoopStart() {
return planLoopStart;
}
public void setPlanLoopEnd(Date planLoopEnd) {
this.planLoopEnd = planLoopEnd;
}
public Date getPlanLoopEnd() {
return planLoopEnd;
}
public void setOrderStart(Date orderStart) {
this.orderStart = orderStart;
}
public Date getOrderStart() {
return orderStart;
}
public void setOrderEnd(Date orderEnd) {
this.orderEnd = orderEnd;
}
public Date getOrderEnd() {
return orderEnd;
}
public void setEquipmentCode(String equipmentCode) {
this.equipmentCode = equipmentCode;
}
public String getEquipmentCode() {
return equipmentCode;
}
public void setOrderStatus(String orderStatus) {
this.orderStatus = orderStatus;
}
public String getOrderStatus() {
return orderStatus;
}
public void setOrderCost(BigDecimal orderCost) {
this.orderCost = orderCost;
}
public BigDecimal getOrderCost() {
return orderCost;
}
public void setPlanPerson(String planPerson) {
this.planPerson = planPerson;
}
public String getPlanPerson() {
return planPerson;
}
public void setPlanPersonName(String planPersonName) {
this.planPersonName = planPersonName;
}
public String getPlanPersonName() {
return planPersonName;
}
public void setOrderCostTime(String orderCostTime) {
this.orderCostTime = orderCostTime;
}
public String getOrderCostTime() {
return orderCostTime;
}
public void setOrderSignPerson(String orderSignPerson) {
this.orderSignPerson = orderSignPerson;
}
public String getOrderSignPerson() {
return orderSignPerson;
}
public void setFactoryCode(String factoryCode) {
this.factoryCode = factoryCode;
}
public String getFactoryCode() {
return factoryCode;
}
public void setAttr1(String attr1) {
this.attr1 = attr1;
}
public String getAttr1() {
return attr1;
}
public void setAttr2(String attr2) {
this.attr2 = attr2;
}
public String getAttr2() {
return attr2;
}
public void setAttr3(String attr3) {
this.attr3 = attr3;
}
public String getAttr3() {
return attr3;
}
public void setDelFlag(String delFlag) {
this.delFlag = delFlag;
}
public String getDelFlag() {
return delFlag;
}
//检查项详情
public void setItemName(String itemName) {
this.itemName = itemName;
}
public String getItemName() {
return itemName;
}
public void setItemMethod(String itemMethod) {
this.itemMethod = itemMethod;
}
public String getItemMethod() {
return itemMethod;
}
public void setItemType(String itemType) {
this.itemType = itemType;
}
public String getItemType() {
return itemType;
}
public void setItemTypeName(String itemTypeName) {
this.itemTypeName = itemTypeName;
}
public String getItemTypeName() {
return itemTypeName;
}
//工具
public String getItemTools() {
return itemTools;
}
public void setItemTools(String itemTools) {
this.itemTools = itemTools;
}
public List<Date> getCreateTimeArray() {
return createTimeArray;
}
public void setCreateTimeArray(List<Date> createTimeArray) {
this.createTimeArray = createTimeArray;
}
//创建时间
public String getCreateTimeStart() {
return createTimeStart;
}
public void setCreateTimeStart(String createTimeStart) {
this.createTimeStart = createTimeStart;
}
public String getCreateTimeEnd() {
return createTimeEnd;
}
public void setCreateTimeEnd(String createTimeEnd) {
this.createTimeEnd = createTimeEnd;
}
public String getComplianceRate() { return complianceRate; }
public void setComplianceRate(String complianceRate) {
this.complianceRate = complianceRate;
}
public String getEquipmentTypeCode() { return equipmentTypeCode; }
public void setEquipmentTypeCode(String equipmentTypeCode) {
this.equipmentTypeCode = equipmentTypeCode;
}
public String getTimeDimension() { return timeDimension; }
public void setTimeDimension(String timeDimension) { this.timeDimension = timeDimension; }
@Override
public String toString() {
return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
.append("orderId", getOrderId())
.append("planId", getPlanId())
.append("planCode", getPlanCode())
.append("planType", getPlanType())
.append("orderCode", getOrderCode())
.append("planWorkshop", getPlanWorkshop())
.append("planProdLine", getPlanProdLine())
.append("planLoop", getPlanLoop())
.append("planLoopType", getPlanLoopType())
.append("planLoopStart", getPlanLoopStart())
.append("planLoopEnd", getPlanLoopEnd())
.append("orderStart", getOrderStart())
.append("orderEnd", getOrderEnd())
.append("equipmentCode", getEquipmentCode())
.append("orderStatus", getOrderStatus())
.append("orderCost", getOrderCost())
.append("planPerson", getPlanPerson())
.append("planPersonName", getPlanPersonName())
.append("orderCostTime", getOrderCostTime())
.append("orderSignPerson", getOrderSignPerson())
.append("factoryCode", getFactoryCode())
.append("attr1", getAttr1())
.append("attr2", getAttr2())
.append("attr3", getAttr3())
.append("delFlag", getDelFlag())
.append("createBy", getCreateBy())
.append("createTime", getCreateTime())
.append("updateBy", getUpdateBy())
.append("updateTime", getUpdateTime())
.append("complianceRate", getComplianceRate())
.toString();
}
}

@ -0,0 +1,739 @@
package com.op.device.domain.vo;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.op.common.core.annotation.Excel;
import com.op.common.core.domain.BaseFileData;
import com.op.common.core.web.domain.BaseEntity;
import com.op.device.domain.EquOrder;
import com.op.device.domain.EquOrderStandard;
import com.op.device.domain.EquSpareApply;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import java.math.BigDecimal;
import java.util.Date;
import java.util.List;
/**
* equ_repair_work_order
*
* @author
* @date 2023-10-19
*/
public class EquRepairWorkOrderDetailVO extends BaseEntity {
private static final long serialVersionUID = 1L;
@Excel(name = "维修主键")
private String workId;
@Excel(name = "报修主键")
private String orderId;
@Excel(name = "维修单号")
private String workCode;
@Excel(name = "报修单号")
private String orderCode;
@Excel(name = "是否立即处理")
private String workHandle;
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@Excel(name = "计划维修时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
private Date workPlanTime;
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@Excel(name = "计划停机时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
private Date workPlanDownTime;
@Excel(name = "关联计划")
private String orderRelevance;
@Excel(name = "维修人员工号")
private String workPerson;
@Excel(name = "维修人员姓名")
private String workPersonName;
@Excel(name = "维修组")
private String workTeam;
@Excel(name = "是否委外")
private String workOutsource;
@Excel(name = "是否停机维修")
private String workDownMachine;
@Excel(name = "设备编码")
private String equipmentCode;
@Excel(name = "原因分析")
private String workReason;
@Excel(name = "故障描述")
private String workFaultDesc;
@Excel(name = "维修用时")
private String workCostTime;
@Excel(name = "维修费用")
private String workCost;
@Excel(name = "委外工单id")
private String outWorkId;
@Excel(name = "委外工单编码")
private String outWorkCode;
@Excel(name = "备用字段1")
private String attr1;
@Excel(name = "备用字段2")
private String attr2;
@Excel(name = "备用字段3")
private String attr3;
@Excel(name = "删除标志")
private String delFlag;
@Excel(name = "工厂编码")
private String factoryCode;
@Excel(name = "维修状态")
private String workStatus;
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@Excel(name = "维修开始时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
private Date workStartTime;
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@Excel(name = "维修结束时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
private Date workEndTime;
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@Excel(name = "维修实际开始时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
private Date actualDownStartTime;
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@Excel(name = "维修实际结束时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
private Date actualDownEndTime;
@Excel(name = "联系方式")
private String workConnection;
@Excel(name = "故障类型")
private String faultType;
@Excel(name = "设备状态描述")
private String equipmentStatusDescription;
@Excel(name = "维修措施")
private String repairMeasures;
@Excel(name = "故障停机时间")
private String faultDownTime;
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@Excel(name = "故障开始时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
private Date faultStartTime;
@Excel(name = "结果检验")//也就是审核
private String resultInspect;
@Excel(name = "备注")
private String remark;
@Excel(name = "审核意见")
private String auditOpinion;
/////////////////////////////////////////////////////////设备表字段
@Excel(name = "设备名称")
private String equipmentName;//设备名称
private String equipmentSpec;//规格型号
private String equipmentTypeName;//设备类型名称
private String equipmentLocation;//设备位置
private String department;//部门
private String workshopCode;//所属工作中心编码
private String workshopName;//所属工作中心名称
/////////////////////////////////////////////////////////////报修表
private String orderDesc;//故障描述
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private Date orderBreakdownTime;//故障时间
private String orderSource;//报修来源
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private Date orderTime;//报修时间
private String orderRepairmanCode;//报修人
private String orderConnection;//报修人联系方式
//////////////////////////////////////////////////////////////班组表
@Excel(name = "班组名称")
private String teamName;//班组名称
@Excel(name = "班组人员")
private String teamPerson;//班组人员
/////////////////////////////////////////////////////////////时间列表 虚拟字段
private List<Date> workPlanTimeArray;
private List<Date> workPlanDownTimeArray;
private String workPlanTimeStart;//计划开始时间、结束时间
private String workPlanTimeEnd;
private String workPlanDownTimeStart; //计划停机开始时间、结束时间
private String workPlanDownTimeEnd;
///////////////////////////////////////////////////////////委外
private String outSourcePerson;//委外人员
private String outSourceReason;//委外维修原因
private String workOutsourcingUnit;//委外单位
private String outSourceConnection;//联系方式
//手持
private String userId;//用户id
//检查项列表
private List<EquOrder> detailList;
//维修前照片
private String beforeRepairFile;
private List<BaseFileData> beforeRepairFiles;
//维修后照片
private String afterRepairFile;
private List<BaseFileData> afterRepairFiles;
//申领单列表
private List<EquSpareApply> applyList;
//检查项列表
private List<EquOrderStandard> standardList;
//图片文件
private String fileList;
private List<BaseFileData> files;
//时间维度 年月日
private BigDecimal timeDimension;
//维修前 维修后
public String getAfterRepairFile() {
return afterRepairFile;
}
public void setAfterRepairFile(String afterRepairFile) {
this.afterRepairFile = afterRepairFile;
}
public List<BaseFileData> getAfterRepairFiles() {
return afterRepairFiles;
}
public void setAfterRepairFiles(List<BaseFileData> afterRepairFiles) {
this.afterRepairFiles = afterRepairFiles;
}
public String getBeforeRepairFile() {
return beforeRepairFile;
}
public void setBeforeRepairFile(String beforeRepairFile) {
this.beforeRepairFile = beforeRepairFile;
}
public List<BaseFileData> getBeforeRepairFiles() {
return beforeRepairFiles;
}
public void setBeforeRepairFiles(List<BaseFileData> beforeRepairFiles) { this.beforeRepairFiles = beforeRepairFiles; }
//detailList 检查项详情
public List<EquOrder> getDetailList() {
return detailList;
}
public void setDetailList(List<EquOrder> detailList) {
this.detailList = detailList;
}
//报修
public void setOrderDesc(String orderDesc) {
this.orderDesc = orderDesc;
}
public String getOrderDesc() {
return orderDesc;
}
public void setOrderBreakdownTime(Date orderBreakdownTime) {
this.orderBreakdownTime = orderBreakdownTime;
}
public Date getOrderBreakdownTime() {
return orderBreakdownTime;
}
public void setOrderSource(String orderSource) {
this.orderSource = orderSource;
}
public String getOrderSource() {
return orderSource;
}
public void setOrderTime(Date orderTime) {
this.orderTime = orderTime;
}
public Date getOrderTime() {
return orderTime;
}
public void setOrderRepairmanCode(String orderRepairmanCode) {
this.orderRepairmanCode = orderRepairmanCode;
}
public String getOrderRepairmanCode() {
return orderRepairmanCode;
}
public void setOrderConnection(String orderConnection) {
this.orderConnection = orderConnection;
}
public String getOrderConnection() {
return orderConnection;
}
//设备
public void setEquipmentName(String equipmentName) {
this.equipmentName = equipmentName;
}
public String getEquipmentName() {
return equipmentName;
}
public void setEquipmentSpec(String equipmentSpec) {
this.equipmentSpec = equipmentSpec;
}
public String getEquipmentSpec() {
return equipmentSpec;
}
public void setEquipmentTypeName(String equipmentTypeName) {
this.equipmentTypeName = equipmentTypeName;
}
public String getEquipmentTypeName() {
return equipmentTypeName;
}
public void setEquipmentLocation(String equipmentLocation) {
this.equipmentLocation = equipmentLocation;
}
public String getEquipmentLocation() {
return equipmentLocation;
}
public void setDepartment(String department) {
this.department = department;
}
public String getDepartment() {
return department;
}
public void setWorkshopCode(String workshopCode) {
this.workshopCode = workshopCode;
}
public String getWorkshopCode() {
return workshopCode;
}
public void setWorkshopName(String workshopName) {
this.workshopName = workshopName;
}
public String getWorkshopName() {
return workshopName;
}
//维修工单
public void setWorkId(String workId) {
this.workId = workId;
}
public String getWorkId() {
return workId;
}
public void setOrderId(String orderId) {
this.orderId = orderId;
}
public String getOrderId() {
return orderId;
}
public void setWorkCode(String workCode) {
this.workCode = workCode;
}
public String getWorkCode() {
return workCode;
}
public void setOrderCode(String orderCode) {
this.orderCode = orderCode;
}
public String getOrderCode() {
return orderCode;
}
public void setWorkHandle(String workHandle) {
this.workHandle = workHandle;
}
public String getWorkHandle() {
return workHandle;
}
public void setWorkPlanTime(Date workPlanTime) {
this.workPlanTime = workPlanTime;
}
public Date getWorkPlanTime() {
return workPlanTime;
}
public void setWorkPlanDownTime(Date workPlanDownTime) {
this.workPlanDownTime = workPlanDownTime;
}
public Date getWorkPlanDownTime() {
return workPlanDownTime;
}
public void setOrderRelevance(String orderRelevance) {
this.orderRelevance = orderRelevance;
}
public String getOrderRelevance() {
return orderRelevance;
}
public void setWorkPerson(String workPerson) {
this.workPerson = workPerson;
}
public String getWorkPerson() {
return workPerson;
}
public void setWorkPersonName(String workPersonName) {
this.workPersonName = workPersonName;
}
public String getWorkPersonName() {
return workPersonName;
}
public void setWorkTeam(String workTeam) {
this.workTeam = workTeam;
}
public String getWorkTeam() {
return workTeam;
}
public void setWorkOutsource(String workOutsource) {
this.workOutsource = workOutsource;
}
public String getWorkOutsource() {
return workOutsource;
}
public void setWorkDownMachine(String workDownMachine) {
this.workDownMachine = workDownMachine;
}
public String getWorkDownMachine() {
return workDownMachine;
}
public void setEquipmentCode(String equipmentCode) {
this.equipmentCode = equipmentCode;
}
public String getEquipmentCode() {
return equipmentCode;
}
public void setWorkReason(String workReason) {
this.workReason = workReason;
}
public String getWorkReason() {
return workReason;
}
public void setWorkFaultDesc(String workFaultDesc) {
this.workFaultDesc = workFaultDesc;
}
public String getWorkFaultDesc() {
return workFaultDesc;
}
public void setWorkCostTime(String workCostTime) {
this.workCostTime = workCostTime;
}
public String getWorkCostTime() {
return workCostTime;
}
public void setWorkCost(String workCost) {
this.workCost = workCost;
}
public String getWorkCost() {
return workCost;
}
public void setOutWorkId(String outWorkId) {
this.outWorkId = outWorkId;
}
public String getOutWorkId() {
return outWorkId;
}
public void setOutWorkCode(String outWorkCode) {
this.outWorkCode = outWorkCode;
}
public String getOutWorkCode() {
return outWorkCode;
}
public void setAttr1(String attr1) {
this.attr1 = attr1;
}
public String getAttr1() {
return attr1;
}
public void setAttr2(String attr2) {
this.attr2 = attr2;
}
public String getAttr2() {
return attr2;
}
public void setAttr3(String attr3) {
this.attr3 = attr3;
}
public String getAttr3() {
return attr3;
}
public void setDelFlag(String delFlag) {
this.delFlag = delFlag;
}
public String getDelFlag() {
return delFlag;
}
public void setFactoryCode(String factoryCode) {
this.factoryCode = factoryCode;
}
public String getFactoryCode() {
return factoryCode;
}
public void setWorkStatus(String workStatus) {
this.workStatus = workStatus;
}
public String getWorkStatus() {
return workStatus;
}
public void setWorkStartTime(Date workStartTime) {
this.workStartTime = workStartTime;
}
public Date getWorkStartTime() {
return workStartTime;
}
public void setWorkEndTime(Date workEndTime) {
this.workEndTime = workEndTime;
}
public Date getWorkEndTime() {
return workEndTime;
}
public void setWorkConnection(String workConnection) {
this.workConnection = workConnection;
}
public String getWorkConnection() {
return workConnection;
}
//班组
public void setTeamName(String teamName) {
this.teamName = teamName;
}
public String getTeamName() {
return teamName;
}
public void setTeamPerson(String teamPerson) {
this.teamPerson = teamPerson;
}
public String getTeamPerson() {
return teamPerson;
}
//时间列表
public List<Date> getWorkPlanTimeArray() {
return workPlanTimeArray;
}
public void setWorkPlanTimeArray(List<Date> workPlanTimeArray) {
this.workPlanTimeArray = workPlanTimeArray;
}
public List<Date> getWorkPlanDownTimeArray() {
return workPlanDownTimeArray;
}
public void setWorkPlanDownTimeArray(List<Date> workPlanDownTimeArray) { this.workPlanDownTimeArray = workPlanDownTimeArray; }
//计划开始时间、结束时间
public String getWorkPlanDownTimeStart() {
return workPlanDownTimeStart;
}
public void setWorkPlanDownTimeStart(String workPlanDownTimeStart) { this.workPlanDownTimeStart = workPlanDownTimeStart; }
public String getWorkPlanDownTimeEnd() {
return workPlanDownTimeEnd;
}
public void setWorkPlanDownTimeEnd(String workPlanDownTimeEnd) {
this.workPlanDownTimeEnd = workPlanDownTimeEnd;
}
//实际停机开始时间、结束时间
public Date getActualDownStartTime() {
return actualDownStartTime;
}
public void setActualDownStartTime(Date actualDownStartTime) {
this.actualDownStartTime = actualDownStartTime;
}
public Date getActualDownEndTime() {
return actualDownEndTime;
}
public void setActualDownEndTime(Date actualDownEndTime) {
this.actualDownEndTime = actualDownEndTime;
}
//停机开始时间、结束时间
public String getWorkPlanTimeStart() { return workPlanTimeStart; }
public void setWorkPlanTimeStart(String workPlanTimeStart) { this.workPlanTimeStart = workPlanTimeStart; }
public String getWorkPlanTimeEnd() { return workPlanTimeEnd; }
public void setWorkPlanTimeEnd(String workPlanTimeEnd) { this.workPlanTimeEnd = workPlanTimeEnd; }
public String getFaultType() { return faultType; }
public void setFaultType(String faultType) { this.faultType = faultType; }
public String getEquipmentStatusDescription() { return equipmentStatusDescription; }
public void setEquipmentStatusDescription(String equipmentStatusDescription) { this.equipmentStatusDescription = equipmentStatusDescription; }
public String getRepairMeasures() { return repairMeasures; }
public void setRepairMeasures(String repairMeasures) { this.repairMeasures = repairMeasures; }
public String getFaultDownTime() { return faultDownTime; }
public void setFaultDownTime(String faultDownTime) { this.faultDownTime = faultDownTime; }
public Date getFaultStartTime() { return faultStartTime; }
public void setFaultStartTime(Date faultStartTime) { this.faultStartTime = faultStartTime; }
public String getResultInspect() { return resultInspect; }
public void setResultInspect(String resultInspect) { this.resultInspect = resultInspect; }
//备注
public String getRemark() { return remark; }
public void setRemark(String remark) { this.remark = remark; }
//新增 审核意见
public String getAuditOpinion() {
return auditOpinion;
}
public void setAuditOpinion(String auditOpinion) {
this.auditOpinion = auditOpinion;
}
//委外
public void setOutSourceReason(String outSourceReason) {
this.outSourceReason = outSourceReason;
}
public String getOutSourceReason() {
return outSourceReason;
}
public void setOutSourcePerson(String outSourcePerson) {
this.outSourcePerson = outSourcePerson;
}
public String getOutSourcePerson() {
return outSourcePerson;
}
public void setWorkOutsourcingUnit(String workOutsourcingUnit) {
this.workOutsourcingUnit = workOutsourcingUnit;
}
public String getWorkOutsourcingUnit() {
return workOutsourcingUnit;
}
public void setOutSourceConnection(String outSourceConnection) {
this.outSourceConnection = outSourceConnection;
}
public String getOutSourceConnection() {
return outSourceConnection;
}
//手持 用户userId
public void setUserId(String userId) {
this.userId = userId;
}
public String getUserId() {
return userId;
}
//申领单
public List<EquSpareApply> getApplyList() {
return applyList;
}
public void setApplyList(List<EquSpareApply> applyList) { this.applyList = applyList; }
//图片文件
public String getFileList() { return fileList; }
public void setFileList(String fileList) { this.fileList = fileList; }
public List<BaseFileData> getFiles() { return files; }
public void setFiles(List<BaseFileData> files) { this.files = files; }
//标准列表
public List<EquOrderStandard> getStandardList() { return standardList; }
public void setStandardList(List<EquOrderStandard> standardList) { this.standardList = standardList; }
// 获取时间维度的值
public BigDecimal getTimeDimension() {
return timeDimension;
}
// 设置时间维度的值
public void setTimeDimension(BigDecimal timeDimension) {
this.timeDimension = timeDimension;
}
@Override
public String toString() {
return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
.append("workId", getWorkId())
.append("orderId", getOrderId())
.append("workCode", getWorkCode())
.append("orderCode", getOrderCode())
.append("workHandle", getWorkHandle())
.append("workPlanTime", getWorkPlanTime())
.append("workPlanDownTime", getWorkPlanDownTime())
.append("orderRelevance", getOrderRelevance())
.append("workPerson", getWorkPerson())
.append("workTeam", getWorkTeam())
.append("workOutsource", getWorkOutsource())
.append("workDownMachine", getWorkDownMachine())
.append("equipmentCode", getEquipmentCode())
.append("workReason", getWorkReason())
.append("workFaultDesc", getWorkFaultDesc())
.append("workCostTime", getWorkCostTime())
.append("workCost", getWorkCost())
.append("outWorkId", getOutWorkId())
.append("outWorkCode", getOutWorkCode())
.append("attr1", getAttr1())
.append("attr2", getAttr2())
.append("attr3", getAttr3())
.append("createBy", getCreateBy())
.append("createTime", getCreateTime())
.append("updateTime", getUpdateTime())
.append("updateBy", getUpdateBy())
.append("delFlag", getDelFlag())
.append("factoryCode", getFactoryCode())
.toString();
}
}

@ -0,0 +1,120 @@
package com.op.device.domain.vo;
import java.math.BigDecimal;
//设备新看板
public class EquipmentBoardVO {
//时间维度 年月日
private BigDecimal timeDimension;
//点检待检
private BigDecimal spotInspectionPendCheck;
//点检完成
private BigDecimal spotInspectionFinish;
//点检完成率
private BigDecimal spotInspectionFinishRate;
//巡检待检
private BigDecimal inspectionPendCheck;
//巡检完成
private BigDecimal inspectionFinish;
//巡检完成率
private BigDecimal inspectionFinishRate;
//巡检总数
private BigDecimal inspectionTotal;
//点检总数
private BigDecimal spotInspectionTotal;
// 获取时间维度的值
public BigDecimal getTimeDimension() {
return timeDimension;
}
// 设置时间维度的值
public void setTimeDimension(BigDecimal timeDimension) {
this.timeDimension = timeDimension;
}
// 获取点检待检的值
public BigDecimal getSpotInspectionPendCheck() {
return spotInspectionPendCheck;
}
// 设置点检待检的值
public void setSpotInspectionPendCheck(BigDecimal spotInspectionPendCheck) {
this.spotInspectionPendCheck = spotInspectionPendCheck;
}
// 获取点检完成的值
public BigDecimal getSpotInspectionFinish() {
return spotInspectionFinish;
}
// 设置点检完成的值
public void setSpotInspectionFinish(BigDecimal spotInspectionFinish) {
this.spotInspectionFinish = spotInspectionFinish;
}
// 获取点检完成率的值
public BigDecimal getSpotInspectionFinishRate() {
return spotInspectionFinishRate;
}
// 设置点检完成率的值
public void setSpotInspectionFinishRate(BigDecimal spotInspectionFinishRate) {
this.spotInspectionFinishRate = spotInspectionFinishRate;
}
// 获取巡检待检的值
public BigDecimal getInspectionPendCheck() {
return inspectionPendCheck;
}
// 设置巡检待检的值
public void setInspectionPendCheck(BigDecimal inspectionPendCheck) {
this.inspectionPendCheck = inspectionPendCheck;
}
// 获取巡检完成的值
public BigDecimal getInspectionFinish() {
return inspectionFinish;
}
// 设置巡检完成的值
public void setInspectionFinish(BigDecimal inspectionFinish) {
this.inspectionFinish = inspectionFinish;
}
// 获取巡检完成率的值
public BigDecimal getInspectionFinishRate() {
return inspectionFinishRate;
}
// 设置巡检完成率的值
public void setInspectionFinishRate(BigDecimal inspectionFinishRate) {
this.inspectionFinishRate = inspectionFinishRate;
}
// inspectionTotal的getter方法
public BigDecimal getInspectionTotal() {
return inspectionTotal;
}
// inspectionTotal的setter方法
public void setInspectionTotal(BigDecimal inspectionTotal) {
this.inspectionTotal = inspectionTotal;
}
// spotInspectionTotal的getter方法
public BigDecimal getSpotInspectionTotal() {
return spotInspectionTotal;
}
// spotInspectionTotal的setter方法
public void setSpotInspectionTotal(BigDecimal spotInspectionTotal) {
this.spotInspectionTotal = spotInspectionTotal;
}
}

@ -1,12 +1,7 @@
package com.op.device.mapper;
import com.op.device.domain.EquOperation;
import com.op.device.domain.EquOperationRecord;
import com.op.device.domain.EquRepairWorkOrder;
import com.op.device.domain.MesReportWork;
import com.op.device.domain.vo.IEquFaultVO;
import com.op.device.domain.vo.IEquipmentVO;
import com.op.device.domain.vo.IRepairWorkOrderVO;
import com.op.device.domain.*;
import com.op.device.domain.vo.*;
import java.util.List;
import java.util.Map;
@ -82,4 +77,11 @@ public interface DeviceInterfaceMapper {
//设备总数
String getTotalEquipment();
//查询设备点检巡检工单
List<EquOrderVO> selectEquOrderList(EquOrderVO equOrderVO);
EquipmentBoardVO getCompletionRate();
List<EquRepairWorkOrderDetailVO> selectEquRepairWorkOrderDetail(EquRepairWorkOrderDetailVO equRepairWorkOrderDetailVO);
}

@ -2,6 +2,8 @@ package com.op.device.service;
import com.op.common.core.web.domain.AjaxResult;
import com.op.device.domain.*;
import com.op.device.domain.vo.EquOrderVO;
import com.op.device.domain.vo.EquRepairWorkOrderDetailVO;
/**
*
@ -57,4 +59,16 @@ public interface IDeviceInterfaceService {
* @return
*/
AjaxResult getGroupLineEquInfo();
AjaxResult getCompletedRate();
AjaxResult selectEquRepairWorkOrderDetail(EquRepairWorkOrderDetailVO equRepairWorkOrderDetailVO);
AjaxResult selectSpotInspectionList(EquOrderVO equOrderVO);
AjaxResult selectInspectionList(EquOrderVO equOrderVO);
//
// AjaxResult getInspectionWorkOrder(EquOrder equOrder);
//
// AjaxResult getInspectionNumber(InterfaceDTO interfaceDTO);//获取值
}

@ -2,19 +2,17 @@ package com.op.device.service.impl;
import com.baomidou.dynamic.datasource.annotation.DS;
import com.op.common.core.utils.DateUtils;
import com.op.common.core.utils.StringUtils;
import com.op.common.core.web.domain.AjaxResult;
import com.op.device.domain.*;
import com.op.device.domain.vo.*;
import com.op.device.mapper.*;
import com.op.device.domain.EquRepairWorkOrder;
import com.op.device.domain.vo.IEquFaultVO;
import com.op.device.domain.vo.IEquipmentVO;
import com.op.device.domain.vo.IRepairWorkOrderVO;
import com.op.device.service.IDeviceInterfaceService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.math.BigDecimal;
import java.util.*;
import java.util.stream.Collectors;
import static com.op.common.core.web.domain.AjaxResult.success;
@ -27,6 +25,9 @@ public class DeviceInterfaceServiceImpl implements IDeviceInterfaceService {
@Autowired
private DeviceInterfaceMapper deviceInterfaceMapper;
@Autowired
private EquOrderServiceImpl equOrderServiceImpl;
/**
*
*
@ -53,6 +54,47 @@ public class DeviceInterfaceServiceImpl implements IDeviceInterfaceService {
return success(workOrderVOList);
}
// /**
// * 设备新看板左下、右下
// * 获取点检巡检工单
// *
// * @return
// */
// @Override
// @DS("#header.poolName")
// public AjaxResult getInspectionWorkOrder(EquOrder equOrder) {
// List<EquOrder> equOrderList = deviceInterfaceMapper.selectEquOrderList(equOrder);
// return success(equOrderList);
// }
//
// /**
// * 设备新看板左上
// * 获取六个数值 另外还有关于年月日的查询
// */
// @Override
// @DS("#header.poolName")
// public AjaxResult getInspectionNumber(InterfaceDTO interfaceDTO) {
// InterfaceDTO returnDto = deviceInterfaceMapper.getInspectionNumber(interfaceDTO);
//
// if(returnDto.getSpotInspectionFinish() == 0){
// returnDto.setSpotInspectionCompletionRate("0.00%");
// }else{
// double result = (double) (returnDto.getSpotInspectionPendCheck() * 100) / returnDto.getSpotInspectionFinish();
// DecimalFormat df = new DecimalFormat("#.##");
// returnDto.setSpotInspectionCompletionRate(df.format(result) + "%");
// }
//
// if(returnDto.getInspectionFinish() == 0){
// returnDto.setInspectionCompletionRate("0.00%");
// }else{
// double result = (double) (returnDto.getInspectionPendCheck() * 100) / returnDto.getInspectionFinish();
// DecimalFormat df = new DecimalFormat("#.##");
// returnDto.setInspectionCompletionRate(df.format(result) + "%");
// }
//
// return success(returnDto);
// }
/**
*
* :/
@ -187,4 +229,66 @@ public class DeviceInterfaceServiceImpl implements IDeviceInterfaceService {
return success(faultVOList);
}
///////////////////////////////////设备新看板
/**
*
*
*
*
*
*
*
*
*/
public AjaxResult getCompletedRate() {
EquipmentBoardVO equipmentBoardVO = deviceInterfaceMapper.getCompletionRate();
if (equipmentBoardVO != null) {
if (equipmentBoardVO.getInspectionFinish().compareTo(BigDecimal.ZERO) == 0 ||
equipmentBoardVO.getInspectionTotal().compareTo(BigDecimal.ZERO) == 0) {
equipmentBoardVO.setInspectionFinishRate(BigDecimal.ZERO);
} else {
BigDecimal rate = equipmentBoardVO.getInspectionFinish()
.divide(equipmentBoardVO.getInspectionTotal(), 2, BigDecimal.ROUND_HALF_UP)
.multiply(new BigDecimal("100"));
equipmentBoardVO.setInspectionFinishRate(rate);
}
if (equipmentBoardVO.getSpotInspectionFinish().compareTo(BigDecimal.ZERO) == 0 ||
equipmentBoardVO.getSpotInspectionTotal().compareTo(BigDecimal.ZERO) == 0) {
equipmentBoardVO.setSpotInspectionFinishRate(BigDecimal.ZERO);
} else {
BigDecimal rate = equipmentBoardVO.getSpotInspectionFinish()
.divide(equipmentBoardVO.getSpotInspectionTotal(), 2, BigDecimal.ROUND_HALF_UP)
.multiply(new BigDecimal("100"));
equipmentBoardVO.setSpotInspectionFinishRate(rate);
}
}
return success(equipmentBoardVO);
}
/**
*
*/
public AjaxResult selectEquRepairWorkOrderDetail(EquRepairWorkOrderDetailVO equRepairWorkOrderDetailVO) {
List<EquRepairWorkOrderDetailVO> EquRepairWorkOrderDetailList = deviceInterfaceMapper.selectEquRepairWorkOrderDetail(equRepairWorkOrderDetailVO);
return success(EquRepairWorkOrderDetailList);
}
/**
*
*/
public AjaxResult selectSpotInspectionList(EquOrderVO equOrderVO) {
equOrderVO.setPlanType("spotInspection");
List<EquOrderVO> spotInspectionList = deviceInterfaceMapper.selectEquOrderList(equOrderVO);
return success(spotInspectionList);
}
/**
*
*/
public AjaxResult selectInspectionList(EquOrderVO equOrderVO) {
equOrderVO.setPlanType("inspection");
List<EquOrderVO> spotInspectionList = deviceInterfaceMapper.selectEquOrderList(equOrderVO);
return success(spotInspectionList);
}
}

@ -202,4 +202,240 @@
WHERE equipment_code = #{equipmentCode};
</select>
<select id="getCompletionRate" resultType="com.op.device.domain.vo.EquipmentBoardVO">
SELECT
(SELECT COUNT(order_id)
FROM equ_order
WHERE plan_type = 'inspection'
AND del_flag = '0'
AND YEAR(create_time) = YEAR(GETDATE())
AND MONTH(create_time) = MONTH(GETDATE())) as inspectionTotal,
(SELECT COUNT(order_id)
FROM equ_order
WHERE plan_type = 'inspection'
AND del_flag = '0'
AND order_status = '0'
AND YEAR(create_time) = YEAR(GETDATE())
AND MONTH(create_time) = MONTH(GETDATE())) as inspectionPendCheck,
(SELECT COUNT(order_id)
FROM equ_order
WHERE plan_type = 'inspection'
AND del_flag = '0'
AND order_status = '1'
AND YEAR(create_time) = YEAR(GETDATE())
AND MONTH(create_time) = MONTH(GETDATE())) as inspectionFinish,
(SELECT COUNT(order_id)
FROM equ_order
WHERE plan_type ='spotInspection'
AND del_flag = '0'
AND CAST(create_time AS DATE) = CAST(GETDATE() AS DATE)) as spotInspectionTotal,
(SELECT COUNT(order_id)
FROM equ_order
WHERE plan_type ='spotInspection'
AND del_flag = '0'
AND order_status = '0'
AND CAST(create_time AS DATE) = CAST(GETDATE() AS DATE)) as spotInspectionPendCheck,
(SELECT COUNT(order_id)
FROM equ_order
WHERE plan_type ='spotInspection'
AND del_flag = '0'
AND order_status = '1'
AND CAST(create_time AS DATE) = CAST(GETDATE() AS DATE)) as spotInspectionFinish
FROM (SELECT 1 AS DUMMY) AS T;
</select>
<select id="selectEquRepairWorkOrderDetail" resultType="com.op.device.domain.vo.EquRepairWorkOrderDetailVO">
select
erwo.work_id as workId,
erwo.order_id as orderId,
erwo.order_code as orderCode,
erwo.work_code as workCode,
erwo.work_handle as workHandle,
erwo.work_plan_time as workPlanTime,
erwo.work_plan_down_time as workPlanDownTime,
erwo.order_relevance as orderRelevance,
erwo.work_person as workPerson,
erwo.work_person_name as workPersonName,
erwo.work_team as workTeam,
erwo.work_outsource as workOutsource,
erwo.work_down_machine as workDownMachine,
erwo.equipment_code as equipmentCode,
erwo.work_reason as workReason,
erwo.work_fault_desc as workFaultDesc,
erwo.work_start_time as workStartTime,
erwo.work_end_time as workEndTime,
erwo.actual_down_start_time as actualDownStartTime,
erwo.actual_down_end_time as actualDownEndTime,
erwo.work_connection as workConnection,
erwo.work_cost_time as workCostTime,
erwo.work_cost as workCost,
erwo.work_status as workStatus,
erwo.out_work_id as outWorkId,
erwo.out_work_code as outWorkCode,
erwo.attr1 as attr1,
erwo.attr2 as attr2,
erwo.attr3 as attr3,
erwo.create_by as createBy,
erwo.create_time as createTime,
erwo.update_time as updateTime,
erwo.update_by as updateBy,
erwo.del_flag as delFlag,
erwo.factory_code as factoryCode,
erwo.fault_type as faultType,
erwo.equipment_status_description as equipmentStatusDescription,
erwo.repair_measures as repairMeasures,
erwo.fault_down_time as faultDownTime,
erwo.fault_start_time as faultStartTime,
erwo.result_inspect as resultInspect,
erwo.remark as remark,
erwo.audit_opinion as auditOpinion,
be.equipment_name as equipmentName,
et.team_name as teamName,
et.team_person as teamPerson
from equ_repair_work_order erwo
left join base_equipment be on erwo.equipment_code = be.equipment_code
left join equ_team et on erwo.work_team = et.team_code
<where>
<if test="timeDimension == 'dd' ">and convert(char(10),eo.create_time,120) = convert(char(10),getdate(),120)</if>
<if test="timeDimension == 'mm' ">and month(eo.create_time) = month(getdate())</if>
<if test="timeDimension == 'yyyy' ">and year(eo.create_time) = year(getdate())</if>
<if test="createTime != null and createTime != null ">and convert(char(10),eo.create_time,120) = convert(char(10),#{createTime},120)</if>
<if test="resultInspect != null and resultInspect != '' ">and erwo.result_inspect = #{resultInspect} </if>
<if test="orderId != null and orderId != ''">and erwo.order_id = #{orderId}</if>
<if test="workCode != null and workCode != ''">and erwo.work_code like concat('%', #{workCode}, '%')</if>
<if test="orderCode != null and orderCode != ''">and erwo.order_code like concat('%', #{orderCode}, '%')</if>
<if test="equipmentCode != null and equipmentCode != ''">and erwo.equipment_code like concat('%',#{equipmentCode}, '%')</if>
<if test="workFaultDesc != null and workFaultDesc != ''">and erwo.work_fault_desc = #{workFaultDesc}</if>
<if test="workPlanTimeStart != null ">and CONVERT(date,work_plan_time) >= #{workPlanTimeStart}</if>
<if test="workPlanTimeEnd != null ">and #{workPlanTimeEnd} >= CONVERT(date,erwo.work_plan_time)</if>
<if test="workDownMachine != null and workDownMachine != ''">and erwo.work_down_machine =#{workDownMachine}</if>
<if test="workPlanDownTimeStart != null ">and CONVERT(date,work_plan_down_time) >=#{workPlanDownTimeStart}</if>
<if test="workPlanDownTimeEnd != null ">and #{workPlanDownTimeEnd} >=CONVERT(date,erwo.work_plan_down_time)</if>
<if test="workPerson != null and workPerson != ''">and erwo.work_person like concat('%', #{workPerson},'%')</if>
<if test="workPersonName != null and workPersonName != ''">and erwo.work_person_name like concat('%', #{workPersonName},'%')</if>
<if test="workTeam != null and workTeam != ''">and erwo.work_team like concat('%', #{workTeam}, '%')</if>
<if test="workOutsource != null and workOutsource != ''">and erwo.work_outsource = #{workOutsource}</if>
<if test="outWorkCode != null and outWorkCode != ''">and erwo.out_work_code like concat('%',#{outWorkCode}, '%')</if>
<if test="workReason != null and workReason != ''">and erwo.work_reason = #{workReason}</if>
<if test="workStartTime != null ">and erwo.work_start_time = #{workStartTime}</if>
<if test="workEndTime != null ">and erwo.work_end_time = #{workEndTime}</if>
<if test="workCostTime != null ">and erwo.work_cost_time = #{workCostTime}</if>
<if test="workCost != null and workCost != ''">and erwo.work_cost = #{workCost}</if>
<if test="workStatus != null and workStatus != ''">and erwo.work_status = #{workStatus}</if>
<if test="factoryCode != null and factoryCode != ''">and erwo.factory_code = #{factoryCode}</if>
<if test="workHandle != null and workHandle != ''">and erwo.work_handle = #{workHandle}</if>
<if test="orderRelevance != null and orderRelevance != ''">and erwo.order_relevance = #{orderRelevance}
</if>
and erwo.del_flag = '0'
</where>
ORDER BY erwo.create_time DESC
</select>
<select id="selectEquOrderList" resultType="com.op.device.domain.vo.EquOrderVO">
select
eo.order_id as orderId,
eo.plan_id as planId,
eo.plan_code as planCode,
eo.plan_type as planType,
eo.order_code as orderCode,
eo.plan_workshop as planWorkshop,
eo.plan_prod_line as planProdLine,
eo.plan_loop as planLoop,
eo.plan_loop_type as planLoopType,
eo.plan_loop_start as planLoopStart,
eo.plan_loop_end as planLoopEnd,
eo.order_start as orderStart,
eo.order_end as orderEnd,
eo.equipment_code as equipmentCode,
eo.order_status as orderStatus,
eo.order_cost as orderCost,
eo.plan_person as planPerson,
eo.plan_person_name as planPersonName,
eo.order_cost_time as orderCostTime,
eo.order_sign_person as orderSignPerson,
eo.factory_code as factoryCode,
eo.attr1 as attr1,
eo.attr2 as attr2,
eo.attr3 as attr3,
eo.del_flag as delFlag,
eo.create_by as createBy,
eo.create_time as createTime,
eo.update_by as updateBy,
eo.update_time as updateTime,
eo.upkeep as upkeep,
eo.calculation_rule as calculationRule,
eo.shut_down,
eo.order_inspect as orderInspect,
eo.repair_code as repairCode,
eo.work_code as workCode,
eo.outsource_code as outsourceCode,
eo.compliance_rate as complianceRate,
be.equipment_name as equipmentName,
ep.plan_name as planName
from equ_order eo
left join base_equipment be on be.equipment_code = eo.equipment_code
left join equ_plan ep on ep.plan_code = eo.plan_code
<where>
and eo.del_flag = '0' and be.del_flag = '0' and ep.del_flag = '0'
<if test="timeDimension == 'dd' ">and convert(char(10),eo.create_time,120) = convert(char(10),getdate(),120)</if>
<if test="timeDimension == 'mm' ">and month(eo.create_time) = month(getdate())</if>
<if test="timeDimension == 'yyyy' ">and year(eo.create_time) = year(getdate())</if>
<if test="createTime != null and createTime != null ">and convert(char(10),eo.create_time,120) = convert(char(10),#{createTime},120)</if>
<if test="planId != null and planId != ''">and eo.plan_id = #{planId}</if>
<if test="planCode != null and planCode != ''">and eo.plan_code like concat('%', #{planCode}, '%')</if>
<if test="planType != null and planType != ''">and eo.plan_type = #{planType}</if>
<if test="orderCode != null and orderCode != ''">and eo.order_code like concat('%', #{orderCode}, '%')</if>
<if test="planWorkshop != null and planWorkshop != ''">and eo.plan_workshop = #{planWorkshop}</if>
<if test="planProdLine != null and planProdLine != ''">and eo.plan_prod_line like concat('%', #{planProdLine}, '%')</if>
<if test="planLoop != null and planLoop != ''">and eo.plan_loop = #{planLoop}</if>
<if test="planLoopType != null and planLoopType != ''">and eo.plan_loop_type = #{planLoopType}</if>
<if test="equipmentCode != null and equipmentCode != ''">and eo.equipment_code like concat('%',#{equipmentCode}, '%')</if>
<if test="equipmentName != null and equipmentName != ''">and be.equipment_name like concat('%',#{equipmentName}, '%')</if>
<if test="planLoopStart != null ">and eo.plan_loop_start = #{planLoopStart}</if>
<if test="planLoopEnd != null ">and eo.plan_loop_end = #{planLoopEnd}</if>
<if test="orderStart != null ">and CONVERT(date,eo.order_start) = #{orderStart}</if>
<if test="orderEnd != null ">and eo.order_end = #{ord5erEnd}</if>
<if test="orderStatus != null and orderStatus != ''">and eo.order_status = #{orderStatus}</if>
<if test="orderCost != null ">and eo.order_cost = #{orderCost}</if>
<if test="planPerson != null and planPerson != ''">and eo.plan_person like concat('%', #{planPerson}, '%')</if>
<if test="planPersonName != null and planPersonName != ''">and eo.plan_person_name like concat('%', #{planPersonName}, '%')</if>
<if test="orderCostTime != null and orderCostTime != ''">and eo.order_cost_time = #{orderCostTime}</if>
<if test="orderSignPerson != null and orderSignPerson != ''">and eo.order_sign_person = #{orderSignPerson}</if>
<if test="factoryCode != null and factoryCode != ''">and eo.factory_code = #{factoryCode}</if>
<if test="attr1 != null and attr1 != ''">and eo.attr1 = #{attr1}</if>
<if test="attr2 != null and attr2 != ''">and eo.attr2 = #{attr2}</if>
<if test="attr3 != null and attr3 != ''">and eo.attr3 = #{attr3}</if>
<if test="delFlag != null and delFlag != ''">and eo.del_flag = #{delFlag}</if>
<if test="createBy != null and createBy != ''">and eo.create_by like concat('%', #{createBy}, '%')</if>
<if test="createTimeStart != null ">and CONVERT(date,eo.create_time) >= #{createTimeStart}</if>
<if test="createTimeEnd != null ">and #{createTimeEnd} >= CONVERT(date,eo.create_time)</if>
<if test="updateBy != null and updateBy != ''">and eo.update_by like concat('%', #{updateBy}, '%')</if>
<if test="updateTime != null ">and CONVERT(date,eo.update_time) = #{updateTime}</if>
<if test="upkeep != null ">and eo.upkeep = #{upkeep}</if>
<if test="calculationRule != null ">and eo.calculation_rule = #{calculationRule}</if>
<if test="shutDown != null ">and eo.shut_down = #{shutDown}</if>
<if test="orderInspect != null ">and eo.order_inspect = #{orderInspect}</if>
<if test="repairCode != null ">and eo.repair_code = #{repairCode}</if>
<if test="outsourceCode != null ">and eo.outsource_code = #{outsourceCode}</if>
<if test="workCode != null ">and eo.work_code = #{workCode}</if>
<if test="loopStart != null ">and CONVERT(date,eo.plan_loop_start) >= #{loopStart}</if>
<if test="loopEnd != null ">and #{loopEnd} >= CONVERT(date,eo.plan_loop_start)</if>
<if test="loopEndArrayStart != null ">and CONVERT(date,eo.plan_loop_end) >= #{loopEndArrayStart}</if>
<if test="getLoopEndArrayEnd != null ">and #{getLoopEndArrayEnd} >= CONVERT(date,eo.plan_loop_end)</if>
<if test="orderStartArrayStart != null ">and CONVERT(date,eo.order_start) >= #{orderStartArrayStart}</if>
<if test="orderStartArrayEnd != null ">and #{orderStartArrayEnd} >= CONVERT(date,eo.order_start)</if>
<if test="orderEndArrayStart != null ">and CONVERT(date,eo.order_end) >= #{orderEndArrayStart}</if>
<if test="orderEndArrayEnd != null ">and #{orderEndArrayEnd} >= CONVERT(date,eo.order_end)</if>
<if test="planName != null and planName != ''">and ep.plan_name like concat('%', #{planName}, '%')</if>
<if test="equipmentTypeCode != null and equipmentTypeCode != ''">and be.equipment_type_code like concat('%',#{equipmentTypeCode}, '%')</if>
</where>
order by eo.create_time desc
</select>
</mapper>

Loading…
Cancel
Save