看板接口:维修工单init、设备基本信息init、维修质量init

highway
wws 1 year ago
parent 71c9cb591d
commit a6070a5972

@ -30,4 +30,23 @@ public class DeviceInterfaceController {
return deviceInterfaceService.getRepairWorkOrder(); return deviceInterfaceService.getRepairWorkOrder();
} }
/**
*
* @return
*/
@GetMapping("/getEquipmentInfo")
public AjaxResult getEquipmentInfo() {
return deviceInterfaceService.getEquipmentInfo();
}
/**
* TOP10
* /
* @return
*/
@GetMapping("/getRepairQuantity")
public AjaxResult getRepairQuantity() {
return deviceInterfaceService.getRepairQuantity();
}
} }

@ -0,0 +1,75 @@
package com.op.device.domain.vo;
// 设备信息VO、设备维修质量VO
public class IEquipmentVO {
// 设备名称
private String equipmentName;
// 设备编码
private String equipmentCode;
// 所在部门
private String department;
// 状态
private String status;
// 设备故障率
private Double failureRate;
// 设备有效利用率
private Double utilizationRatio;
// 设备维修质量
private Double rapairQuantity;
public Double getRapairQuantity() {
return rapairQuantity;
}
public void setRapairQuantity(Double rapairQuantity) {
this.rapairQuantity = rapairQuantity;
}
public String getEquipmentName() {
return equipmentName;
}
public void setEquipmentName(String equipmentName) {
this.equipmentName = equipmentName;
}
public String getEquipmentCode() {
return equipmentCode;
}
public void setEquipmentCode(String equipmentCode) {
this.equipmentCode = equipmentCode;
}
public String getDepartment() {
return department;
}
public void setDepartment(String department) {
this.department = department;
}
public String getStatus() {
return status;
}
public void setStatus(String status) {
this.status = status;
}
public Double getFailureRate() {
return failureRate;
}
public void setFailureRate(Double failureRate) {
this.failureRate = failureRate;
}
public Double getUtilizationRatio() {
return utilizationRatio;
}
public void setUtilizationRatio(Double utilizationRatio) {
this.utilizationRatio = utilizationRatio;
}
}

@ -1,6 +1,77 @@
package com.op.device.domain.vo; package com.op.device.domain.vo;
import java.util.Date;
// 看板维修工单返回VO // 看板维修工单返回VO
public class IRepairWorkOrderVO { public class IRepairWorkOrderVO {
// 设备名称
private String equipmentName;
// 设备编码
private String equipmentCode;
// 故障描述
private String workFaultDesc;
// 维修班组
private String teamName;
// 是否立即维修
private String workHandle;
// 计划维修时间
private Date workPlanTime;
// 设备位置
private String equipmentLocation;
public String getEquipmentName() {
return equipmentName;
}
public void setEquipmentName(String equipmentName) {
this.equipmentName = equipmentName;
}
public String getEquipmentCode() {
return equipmentCode;
}
public void setEquipmentCode(String equipmentCode) {
this.equipmentCode = equipmentCode;
}
public String getWorkFaultDesc() {
return workFaultDesc;
}
public void setWorkFaultDesc(String workFaultDesc) {
this.workFaultDesc = workFaultDesc;
}
public String getTeamName() {
return teamName;
}
public void setTeamName(String teamName) {
this.teamName = teamName;
}
public String getWorkHandle() {
return workHandle;
}
public void setWorkHandle(String workHandle) {
this.workHandle = workHandle;
}
public Date getWorkPlanTime() {
return workPlanTime;
}
public void setWorkPlanTime(Date workPlanTime) {
this.workPlanTime = workPlanTime;
}
public String getEquipmentLocation() {
return equipmentLocation;
}
public void setEquipmentLocation(String equipmentLocation) {
this.equipmentLocation = equipmentLocation;
}
} }

@ -0,0 +1,28 @@
package com.op.device.mapper;
import com.op.device.domain.EquRepairWorkOrder;
import com.op.device.domain.vo.IEquipmentVO;
import com.op.device.domain.vo.IRepairWorkOrderVO;
import java.util.List;
public interface DeviceInterfaceMapper {
/**
* -
* @return
*/
List<IRepairWorkOrderVO> selectEquRepairWorkOrderList();
/**
*
* @return
*/
List<IEquipmentVO> selectEquipmentList();
/**
*
* @return
*/
List<IEquipmentVO> selectRepairEquipmentList();
}

@ -12,4 +12,16 @@ public interface IDeviceInterfaceService {
* @return * @return
*/ */
AjaxResult getRepairWorkOrder(); AjaxResult getRepairWorkOrder();
/**
*
* @return
*/
AjaxResult getEquipmentInfo();
/**
* TOP10
* @return
*/
AjaxResult getRepairQuantity();
} }

@ -3,6 +3,9 @@ package com.op.device.service.impl;
import com.baomidou.dynamic.datasource.annotation.DS; import com.baomidou.dynamic.datasource.annotation.DS;
import com.op.common.core.web.domain.AjaxResult; import com.op.common.core.web.domain.AjaxResult;
import com.op.device.domain.EquRepairWorkOrder; import com.op.device.domain.EquRepairWorkOrder;
import com.op.device.domain.vo.IEquipmentVO;
import com.op.device.domain.vo.IRepairWorkOrderVO;
import com.op.device.mapper.DeviceInterfaceMapper;
import com.op.device.mapper.EquRepairWorkOrderMapper; import com.op.device.mapper.EquRepairWorkOrderMapper;
import com.op.device.service.IDeviceInterfaceService; import com.op.device.service.IDeviceInterfaceService;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
@ -20,19 +23,69 @@ public class DeviceInterfaceServiceImpl implements IDeviceInterfaceService {
@Autowired @Autowired
private EquRepairWorkOrderMapper equRepairWorkOrderMapper; private EquRepairWorkOrderMapper equRepairWorkOrderMapper;
@Autowired
private DeviceInterfaceMapper deviceInterfaceMapper;
/** /**
* *
*
* @return * @return
*/ */
@Override @Override
@DS("#header.poolName") @DS("#header.poolName")
public AjaxResult getRepairWorkOrder() { public AjaxResult getRepairWorkOrder() {
// 获取待维修的工单 List<IRepairWorkOrderVO> workOrderVOList = deviceInterfaceMapper.selectEquRepairWorkOrderList();
EquRepairWorkOrder workTemp = new EquRepairWorkOrder(); for (IRepairWorkOrderVO orderVO : workOrderVOList) {
workTemp.setWorkStatus("0"); if (orderVO.getWorkHandle().equals("0")) {
List<EquRepairWorkOrder> workOrderList = equRepairWorkOrderMapper.selectEquRepairWorkOrderList(workTemp); orderVO.setWorkHandle("立即");
// EquRepairWorkOrder workOrder = equRepairWorkOrderMapper.selectWaitingWorkOrder(); } else {
return success(workOrderList); orderVO.setWorkHandle("计划");
}
}
return success(workOrderVOList);
}
/**
*
* :/
* /
*
* @return
*/
@Override
@DS("#header.poolName")
public AjaxResult getEquipmentInfo() {
// 获取所有设备信息
List<IEquipmentVO> equipmentVOList = deviceInterfaceMapper.selectEquipmentList();
for (IEquipmentVO equipmentVO : equipmentVOList) {
// TODO 设备状态待修改
if (equipmentVO.getStatus().equals("1")) {
equipmentVO.setStatus("正常");
} else {
equipmentVO.setStatus("停用");
}
// TODO 设备故障停机率
equipmentVO.setFailureRate(0.90);
// TODO 设备有效利用率
equipmentVO.setUtilizationRatio(0.80);
}
return success(equipmentVOList);
}
/**
* TOP10
* /
* @return
*/
@Override
@DS("#header.poolName")
public AjaxResult getRepairQuantity() {
List<IEquipmentVO> equipmentVOList = deviceInterfaceMapper.selectRepairEquipmentList();
for (IEquipmentVO equipmentVO : equipmentVOList) {
// TODO 设备维修质量
// TODO 排序TOP10
equipmentVO.setRapairQuantity(0.70);
}
return success(equipmentVOList);
} }
} }

@ -0,0 +1,43 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.op.device.mapper.DeviceInterfaceMapper">
<select id="selectEquRepairWorkOrderList" resultType="com.op.device.domain.vo.IRepairWorkOrderVO">
select be.equipment_name AS "equipmentName",
wo.equipment_code AS "equipmentCode",
wo.work_fault_desc AS "workFaultDesc",
et.team_name AS "teamName",
wo.work_handle AS "workHandle",
wo.work_plan_time AS "workPlanTime",
be.equipment_location AS "equipmentLocation"
from equ_repair_work_order wo
left join base_equipment be
on wo.equipment_code = be.equipment_code
left join equ_team et
on wo.work_team = et.team_code
where wo.work_status = '0'
</select>
<select id="selectEquipmentList" resultType="com.op.device.domain.vo.IEquipmentVO">
select be.equipment_code AS "equipmentCode",
be.equipment_name AS "equipmentName",
be.department AS "department",
be.status AS "status"
from base_equipment be
where del_flag = '0'
</select>
<select id="selectRepairEquipmentList" resultType="com.op.device.domain.vo.IEquipmentVO">
select be.equipment_code AS "equipmentCode",
be.equipment_name AS "equipmentName"
from base_equipment be
where be.del_flag = '0'
and be.equipment_code in (select wo.equipment_code
from equ_repair_work_order wo
where wo.del_flag = '0'
GROUP BY wo.equipment_code)
</select>
</mapper>
Loading…
Cancel
Save