检查项-工具属性添加

highway
wws 1 year ago
parent dfe2805fd5
commit 988ee5d7f4

@ -95,6 +95,17 @@ public class EquCheckItem extends BaseEntity {
// 更新日期结束 // 更新日期结束
private String updateTimeEnd; private String updateTimeEnd;
// 检查项工具
private String itemTools;
public String getItemTools() {
return itemTools;
}
public void setItemTools(String itemTools) {
this.itemTools = itemTools;
}
private List<EquCheckItemDetail> equCheckItemDetailList; private List<EquCheckItemDetail> equCheckItemDetailList;
public List<EquCheckItemDetail> getEquCheckItemDetailList() { public List<EquCheckItemDetail> getEquCheckItemDetailList() {

@ -72,6 +72,16 @@ public class EquOrderDetail extends BaseEntity {
private List<EquOrderStandard> standardList; private List<EquOrderStandard> standardList;
private String itemTools;
public String getItemTools() {
return itemTools;
}
public void setItemTools(String itemTools) {
this.itemTools = itemTools;
}
public List<EquOrderStandard> getStandardList() { public List<EquOrderStandard> getStandardList() {
return standardList; return standardList;
} }

@ -80,6 +80,16 @@ public class EquPlanDetail extends BaseEntity {
// 主计划code // 主计划code
private String planCode; private String planCode;
private String itemTools;
public String getItemTools() {
return itemTools;
}
public void setItemTools(String itemTools) {
this.itemTools = itemTools;
}
public String getPlanCode() { public String getPlanCode() {
return planCode; return planCode;
} }

@ -62,6 +62,17 @@ public class EquCheckItemDTO {
// 设备编码list // 设备编码list
private List<String> equipmentCodeList; private List<String> equipmentCodeList;
// 检查工具
private String itemTools;
public String getItemTools() {
return itemTools;
}
public void setItemTools(String itemTools) {
this.itemTools = itemTools;
}
public List<String> getEquipmentCodeList() { public List<String> getEquipmentCodeList() {
return equipmentCodeList; return equipmentCodeList;
} }

@ -46,6 +46,17 @@ public class EquCheckItemVO {
// 设备编码 // 设备编码
private String equipmentCode; private String equipmentCode;
// 检查工具
private String itemTools;
public String getItemTools() {
return itemTools;
}
public void setItemTools(String itemTools) {
this.itemTools = itemTools;
}
public String getEquipmentName() { public String getEquipmentName() {
return equipmentName; return equipmentName;
} }

@ -87,11 +87,11 @@ public class DeviceInterfaceServiceImpl implements IDeviceInterfaceService {
long diffTime = operationRecord.getEndTime().getTime() - operationRecord.getStartTime().getTime(); long diffTime = operationRecord.getEndTime().getTime() - operationRecord.getStartTime().getTime();
// 开机运行时间运行总时间累加 // 开机运行时间运行总时间累加
if (operationRecord.getType().equals("on")) { if (operationRecord.getType().equals("on")) {
totalTime+=diffTime; totalTime += diffTime;
} }
// 维修停机时间累加(故障) // 维修停机时间累加(故障)
if (operationRecord.getMaintenanceType().equals("repair")) { if (operationRecord.getMaintenanceType().equals("repair")) {
downTime+=diffTime; downTime += diffTime;
} }
} }
@ -99,7 +99,7 @@ public class DeviceInterfaceServiceImpl implements IDeviceInterfaceService {
if (downTime == 0L) { if (downTime == 0L) {
// 如果未查到该设备停机故障时间 // 如果未查到该设备停机故障时间
equipmentVO.setFailureRate(0D); equipmentVO.setFailureRate(0D);
}else { } else {
// 计算故障停机率(设备停机时间总和/一定时间内运行总时间(年)) // 计算故障停机率(设备停机时间总和/一定时间内运行总时间(年))
double failureRate = downTime / totalTime; double failureRate = downTime / totalTime;
equipmentVO.setFailureRate(failureRate); equipmentVO.setFailureRate(failureRate);
@ -118,7 +118,7 @@ public class DeviceInterfaceServiceImpl implements IDeviceInterfaceService {
BigDecimal utilizationRatio = actualQuantity.divide(theoryQuantity, 2, BigDecimal.ROUND_HALF_UP); BigDecimal utilizationRatio = actualQuantity.divide(theoryQuantity, 2, BigDecimal.ROUND_HALF_UP);
equipmentVO.setUtilizationRatio(utilizationRatio.doubleValue()); equipmentVO.setUtilizationRatio(utilizationRatio.doubleValue());
}else { } else {
// 如果未查到该信息则默认设置为0 // 如果未查到该信息则默认设置为0
equipmentVO.setUtilizationRatio(0D); equipmentVO.setUtilizationRatio(0D);
} }
@ -130,6 +130,7 @@ public class DeviceInterfaceServiceImpl implements IDeviceInterfaceService {
/** /**
* TOP10 * TOP10
* / * /
*
* @return * @return
*/ */
@Override @Override
@ -153,7 +154,7 @@ public class DeviceInterfaceServiceImpl implements IDeviceInterfaceService {
// 计算维修质量(故障时间(小时)/故障次数) // 计算维修质量(故障时间(小时)/故障次数)
long rapairQuantity = runTime / 3600000 / workOrderList.size(); long rapairQuantity = runTime / 3600000 / workOrderList.size();
equipmentVO.setRapairQuantity(Double.valueOf(rapairQuantity)); equipmentVO.setRapairQuantity(Double.valueOf(rapairQuantity));
}else { } else {
// 没有该记录则默认为0 // 没有该记录则默认为0
equipmentVO.setRapairQuantity(0D); equipmentVO.setRapairQuantity(0D);
} }

@ -21,10 +21,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result property="createBy" column="create_by" /> <result property="createBy" column="create_by" />
<result property="updateTime" column="update_time" /> <result property="updateTime" column="update_time" />
<result property="updateBy" column="update_by" /> <result property="updateBy" column="update_by" />
<result property="itemTools" column="item_tools" />
</resultMap> </resultMap>
<sql id="selectEquCheckItemVo"> <sql id="selectEquCheckItemVo">
select item_id, item_code, item_name, item_method, item_type, item_type_name, item_remark, factory_code, attr1, attr2, attr3, del_flag, create_time, create_by, update_time, update_by from equ_check_item select item_id, item_code, item_name, item_method, item_type, item_type_name, item_remark, factory_code, attr1, attr2, attr3, del_flag, create_time, create_by, update_time, update_by ,item_tools from equ_check_item
</sql> </sql>
<select id="selectEquCheckItemList" parameterType="EquCheckItem" resultMap="EquCheckItemResult"> <select id="selectEquCheckItemList" parameterType="EquCheckItem" resultMap="EquCheckItemResult">
@ -41,6 +42,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="attr2 != null and attr2 != ''"> and attr2 = #{attr2}</if> <if test="attr2 != null and attr2 != ''"> and attr2 = #{attr2}</if>
<if test="attr3 != null and attr3 != ''"> and attr3 = #{attr3}</if> <if test="attr3 != null and attr3 != ''"> and attr3 = #{attr3}</if>
<if test="delFlag != null and delFlag != ''"> and del_flag = #{delFlag}</if> <if test="delFlag != null and delFlag != ''"> and del_flag = #{delFlag}</if>
<if test="itemTools != null and itemTools != ''"> and item_tools like concat('%', #{itemTools}, '%')</if>
<if test="createTimeStart != null "> and CONVERT(date,create_time) >= #{createTimeStart}</if> <if test="createTimeStart != null "> and CONVERT(date,create_time) >= #{createTimeStart}</if>
<if test="createTimeEnd != null "> and #{createTimeEnd} >= CONVERT(date,create_time)</if> <if test="createTimeEnd != null "> and #{createTimeEnd} >= CONVERT(date,create_time)</if>
<if test="createBy != null and createBy != ''"> and create_by like concat('%', #{createBy}, '%')</if> <if test="createBy != null and createBy != ''"> and create_by like concat('%', #{createBy}, '%')</if>
@ -100,6 +102,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="createBy != null and createBy != ''">create_by,</if> <if test="createBy != null and createBy != ''">create_by,</if>
<if test="updateTime != null">update_time,</if> <if test="updateTime != null">update_time,</if>
<if test="updateBy != null and updateBy != ''">update_by,</if> <if test="updateBy != null and updateBy != ''">update_by,</if>
<if test="itemTools != null and itemTools != ''">item_tools,</if>
</trim> </trim>
<trim prefix="values (" suffix=")" suffixOverrides=","> <trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="itemId != null">#{itemId},</if> <if test="itemId != null">#{itemId},</if>
@ -118,6 +121,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="createBy != null and createBy != ''">#{createBy},</if> <if test="createBy != null and createBy != ''">#{createBy},</if>
<if test="updateTime != null">#{updateTime},</if> <if test="updateTime != null">#{updateTime},</if>
<if test="updateBy != null and updateBy != ''">#{updateBy},</if> <if test="updateBy != null and updateBy != ''">#{updateBy},</if>
<if test="itemTools != null and itemTools != ''">#{itemTools},</if>
</trim> </trim>
</insert> </insert>
@ -139,6 +143,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="createBy != null and createBy != ''">create_by = #{createBy},</if> <if test="createBy != null and createBy != ''">create_by = #{createBy},</if>
<if test="updateTime != null">update_time = #{updateTime},</if> <if test="updateTime != null">update_time = #{updateTime},</if>
<if test="updateBy != null and updateBy != ''">update_by = #{updateBy},</if> <if test="updateBy != null and updateBy != ''">update_by = #{updateBy},</if>
<if test="itemTools != null and itemTools != ''">item_tools = #{itemTools},</if>
</trim> </trim>
where item_id = #{itemId} and del_flag = '0' where item_id = #{itemId} and del_flag = '0'
</update> </update>

@ -23,12 +23,13 @@
<result property="createTime" column="create_time" /> <result property="createTime" column="create_time" />
<result property="updateBy" column="update_by" /> <result property="updateBy" column="update_by" />
<result property="updateTime" column="update_time" /> <result property="updateTime" column="update_time" />
<result property="itemTools" column="item_tools" />
</resultMap> </resultMap>
<sql id="selectEquOrderDetailVo"> <sql id="selectEquOrderDetailVo">
select id, code, order_code, parent_code, item_code, item_name, item_method, select id, code, order_code, parent_code, item_code, item_name, item_method,
item_type, item_type_name, factory_code, attr1, attr2, attr3, del_flag, item_type, item_type_name, factory_code, attr1, attr2, attr3, del_flag,
create_by, create_time, update_by, update_time create_by, create_time, update_by, update_time,item_tools
from equ_order_detail from equ_order_detail
</sql> </sql>
@ -47,6 +48,7 @@
<if test="attr1 != null and attr1 != ''"> and attr1 = #{attr1}</if> <if test="attr1 != null and attr1 != ''"> and attr1 = #{attr1}</if>
<if test="attr2 != null and attr2 != ''"> and attr2 = #{attr2}</if> <if test="attr2 != null and attr2 != ''"> and attr2 = #{attr2}</if>
<if test="attr3 != null and attr3 != ''"> and attr3 = #{attr3}</if> <if test="attr3 != null and attr3 != ''"> and attr3 = #{attr3}</if>
<if test="itemTools != null and itemTools != ''"> and item_tools = #{itemTools}</if>
and del_flag = '0' and del_flag = '0'
</where> </where>
</select> </select>
@ -87,6 +89,7 @@
<if test="createTime != null">create_time,</if> <if test="createTime != null">create_time,</if>
<if test="updateBy != null and updateBy != ''">update_by,</if> <if test="updateBy != null and updateBy != ''">update_by,</if>
<if test="updateTime != null">update_time,</if> <if test="updateTime != null">update_time,</if>
<if test="itemTools != null">item_tools,</if>
</trim> </trim>
<trim prefix="values (" suffix=")" suffixOverrides=","> <trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="id != null">#{id},</if> <if test="id != null">#{id},</if>
@ -107,6 +110,7 @@
<if test="createTime != null">#{createTime},</if> <if test="createTime != null">#{createTime},</if>
<if test="updateBy != null and updateBy != ''">#{updateBy},</if> <if test="updateBy != null and updateBy != ''">#{updateBy},</if>
<if test="updateTime != null">#{updateTime},</if> <if test="updateTime != null">#{updateTime},</if>
<if test="itemTools != null">#{itemTools},</if>
</trim> </trim>
</insert> </insert>
<insert id="insertEquOrderDetails"> <insert id="insertEquOrderDetails">

@ -25,12 +25,13 @@
<result property="createTime" column="create_time" /> <result property="createTime" column="create_time" />
<result property="updateBy" column="update_by" /> <result property="updateBy" column="update_by" />
<result property="updateTime" column="update_time" /> <result property="updateTime" column="update_time" />
<result property="itemTools" column="item_tools" />
</resultMap> </resultMap>
<sql id="selectEquPlanDetailVo"> <sql id="selectEquPlanDetailVo">
select id, code, plan_id,plan_code, parent_code, item_code, item_name, item_method, item_type, select id, code, plan_id,plan_code, parent_code, item_code, item_name, item_method, item_type,
item_type_name, item_remark, factory_code, attr1, attr2, attr3, del_flag, item_type_name, item_remark, factory_code, attr1, attr2, attr3, del_flag,
create_by, create_time, update_by, update_time create_by, create_time, update_by, update_time,item_tools
from equ_plan_detail from equ_plan_detail
</sql> </sql>
@ -51,6 +52,7 @@
<if test="attr1 != null and attr1 != ''"> and attr1 = #{attr1}</if> <if test="attr1 != null and attr1 != ''"> and attr1 = #{attr1}</if>
<if test="attr2 != null and attr2 != ''"> and attr2 = #{attr2}</if> <if test="attr2 != null and attr2 != ''"> and attr2 = #{attr2}</if>
<if test="attr3 != null and attr3 != ''"> and attr3 = #{attr3}</if> <if test="attr3 != null and attr3 != ''"> and attr3 = #{attr3}</if>
<if test="itemTools != null and itemTools != ''"> and item_tools = #{itemTools}</if>
and del_flag = '0' and del_flag = '0'
</where> </where>
ORDER BY item_name ORDER BY item_name
@ -94,6 +96,7 @@
<if test="createTime != null">create_time,</if> <if test="createTime != null">create_time,</if>
<if test="updateBy != null">update_by,</if> <if test="updateBy != null">update_by,</if>
<if test="updateTime != null">update_time,</if> <if test="updateTime != null">update_time,</if>
<if test="itemTools != null">item_tools,</if>
</trim> </trim>
<trim prefix="values (" suffix=")" suffixOverrides=","> <trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="id != null">#{id},</if> <if test="id != null">#{id},</if>
@ -116,6 +119,7 @@
<if test="createTime != null">#{createTime},</if> <if test="createTime != null">#{createTime},</if>
<if test="updateBy != null">#{updateBy},</if> <if test="updateBy != null">#{updateBy},</if>
<if test="updateTime != null">#{updateTime},</if> <if test="updateTime != null">#{updateTime},</if>
<if test="itemTools != null">#{itemTools},</if>
</trim> </trim>
</insert> </insert>
@ -141,6 +145,7 @@
<if test="createTime != null">create_time = #{createTime},</if> <if test="createTime != null">create_time = #{createTime},</if>
<if test="updateBy != null">update_by = #{updateBy},</if> <if test="updateBy != null">update_by = #{updateBy},</if>
<if test="updateTime != null">update_time = #{updateTime},</if> <if test="updateTime != null">update_time = #{updateTime},</if>
<if test="itemTools != null">item_tools = #{itemTools},</if>
</trim> </trim>
where id = #{id} and del_flag = '0' where id = #{id} and del_flag = '0'
</update> </update>

Loading…
Cancel
Save