highway
A0010407 1 year ago
parent 9c9da57bcf
commit 58bb60bb3e

@ -137,6 +137,12 @@ public class DevicePDAController {
return devicePDAService.updateMaintenanceRecords(equRepairWorkOrder);
}
//传故障类型
// @GetMapping(value = "/queryEquFaultTypeTree")
// public AjaxResult queryEquFaultTypeTree(EquRepairWorkOrder equRepairWorkOrder) {
// return devicePDAService.queryEquFaultTypeTree(equRepairWorkOrder);
// }
/**
*
* @param pdadto

@ -74,6 +74,14 @@ public class EquFaultType extends BaseEntity {
// 创建日期结束
private String createTimeEnd;
//故障大类
// 字典名
private String dictLabel;
// 字典值
private String dictValue;
public List<Date> getCreateTimeArray() {
return createTimeArray;
}
@ -193,6 +201,22 @@ public class EquFaultType extends BaseEntity {
return delFlag;
}
public void setDictValue(String dictValue) {
this.dictValue = dictValue;
}
public String getDictValue() {
return dictValue;
}
public void setDictLabel(String dictLabel) {
this.dictLabel = dictLabel;
}
public String getDictLabel() {
return dictLabel;
}
@Override
public String toString() {
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)

@ -165,6 +165,15 @@ public class EquOrder extends BaseEntity {
/** 维护类型名称 */
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;

@ -61,6 +61,10 @@ public class EquOutsourceWork extends BaseEntity {
@Excel(name = "委外用时")
private String workCostTime;
/** 委外状态 */
@Excel(name = "委外状态")
private String workStatus;
/** 备用字段1 */
@Excel(name = "备用字段1")
private String attr1;
@ -185,6 +189,13 @@ public class EquOutsourceWork extends BaseEntity {
return workCostTime;
}
public void setWorkStatus(String workStatus) {
this.workStatus = workStatus;
}
public String getWorkStatus() {
return workStatus;
}
public void setAttr1(String attr1) {
this.attr1 = attr1;
}

@ -122,18 +122,18 @@ public class EquRepairWorkOrder extends BaseEntity {
/** 维修开始时间 */
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@Excel(name = "维修开始时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
private String workStartTime;
private Date workStartTime;
/** 维修结束时间 */
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@Excel(name = "维修结束时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
private String workEndTime;
private Date workEndTime;
//维修停机真正开始时间
private String actualDownStartTime;
private Date actualDownStartTime;
//维修停机真正结束时间
private String actualDownEndTime;
private Date actualDownEndTime;
// 设备
/** 设备名称 */
@ -545,17 +545,17 @@ public class EquRepairWorkOrder extends BaseEntity {
}
//维修工单 新增字段 维修开始结束时间
public void setWorkStartTime(String workStartTime) {
public void setWorkStartTime(Date workStartTime) {
this.workStartTime = workStartTime;
}
public String getWorkStartTime() {
public Date getWorkStartTime() {
return workStartTime;
}
public void setWorkEndTime(String workEndTime) {
public void setWorkEndTime(Date workEndTime) {
this.workEndTime = workEndTime;
}
public String getWorkEndTime() {
public Date getWorkEndTime() {
return workEndTime;
}
@ -604,16 +604,16 @@ public class EquRepairWorkOrder extends BaseEntity {
}
//计划停机开始时间、结束时间
public String getActualDownStartTime() {
public Date getActualDownStartTime() {
return actualDownStartTime;
}
public void setActualDownStartTime(String actualDownStartTime) {
public void setActualDownStartTime(Date actualDownStartTime) {
this.actualDownStartTime = actualDownStartTime;
}
public String getActualDownEndTime() {
public Date getActualDownEndTime() {
return actualDownEndTime;
}
public void setActualDownEndTime(String actualDownEndTime) {
public void setActualDownEndTime(Date actualDownEndTime) {
this.actualDownEndTime = actualDownEndTime;
}

@ -3,6 +3,7 @@ package com.op.device.mapper;
import java.util.List;
import com.op.device.domain.EquFaultType;
import com.op.device.domain.EquRepairWorkOrder;
/**
* Mapper
@ -64,4 +65,7 @@ public interface EquFaultTypeMapper {
* @return
*/
int selectSerialNumber();
//故障报修第一级
List<EquFaultType> selectFirstLevelList(EquRepairWorkOrder equRepairWorkOrder);
}

@ -121,13 +121,6 @@ public interface EquOrderMapper {
*/
List<EquOrder> selectTodayTask(PDADTO pdadto);
/**
* PC
* @param
* @return
*/
List<EquOrder> selectEquOrderDetailsList(EquOrder equOrder);
/**
*
* @param equipmentCode
@ -148,4 +141,18 @@ public interface EquOrderMapper {
* @return
*/
void updateEquOrderRepairCode(EquOrder equOrder);
/**
* PC
* @param
* @return
*/
List<EquOrder> selectCheckListByWorkCode(EquOrder equOrder);
/**
* PC
* @param
* @return
*/
List<EquOrder> selectCheckListByRepairCode(EquOrder equOrder);
}

@ -91,6 +91,9 @@ public interface IDevicePDAService {
*/
public AjaxResult updateMaintenanceRecords(EquRepairWorkOrder equRepairWorkOrder);
//获取设备故障类型
// public AjaxResult queryEquFaultTypeTree(EquRepairWorkOrder equRepairWorkOrder);
//待处理
AjaxResult getMaintenancePendRecords(EquRepairWorkOrder equRepairWorkOrder);

@ -23,10 +23,7 @@ import javax.servlet.http.HttpServletRequest;
import java.math.BigDecimal;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Calendar;
import java.util.Date;
import java.util.List;
import java.util.*;
import static com.op.common.core.web.domain.AjaxResult.error;
import static com.op.common.core.web.domain.AjaxResult.success;
@ -63,6 +60,9 @@ public class DevicePDAServiceImpl implements IDevicePDAService {
@Autowired
private EquFileMapper equFileMapper;
@Autowired
private EquFaultTypeMapper equFaultTypeMapper;
/**
* list-
@ -266,7 +266,7 @@ public class DevicePDAServiceImpl implements IDevicePDAService {
equTeamUser.setUserName(SecurityUtils.getUsername());
EquTeamUser equTeamUserList = equRepairOrderMapper.getRepairPhoneNumber(equTeamUser);
equRepairOrder.setOrderConnection(equTeamUserList.getPhonenumber());
equRepairOrder.setOrderRepairmanName(equTeamUserList.getNickName());
// 报修来源
if (equOrder.getPlanType().equals("inspection")){
equRepairOrder.setOrderSource("巡检");
@ -414,7 +414,7 @@ public class DevicePDAServiceImpl implements IDevicePDAService {
}
/**
*
*
*
* @param equRepairWorkOrder
* @return
@ -474,7 +474,11 @@ public class DevicePDAServiceImpl implements IDevicePDAService {
public AjaxResult updateDowntime(EquRepairWorkOrder equRepairWorkOrder) {
try {
//不停机 那么实际停机开始时间和实际停机结束时间都没有
//如果停机 那么实际停机时间就是传入的时间 停机时间必须选择校验
//如果停机 那么实际停机时间就是传入的时间
equRepairWorkOrder.setWorkStartTime(DateUtils.getNowDate());
if(equRepairWorkOrder.getWorkDownMachine().equals("1")){
equRepairWorkOrder.setActualDownStartTime(DateUtils.getNowDate());
}
equRepairWorkOrder.setUpdateBy(SecurityUtils.getUsername());
equRepairWorkOrder.setUpdateTime(DateUtils.getNowDate());
//维修中
@ -518,11 +522,12 @@ public class DevicePDAServiceImpl implements IDevicePDAService {
EquOrder equOrder = new EquOrder();
equOrder.setWorkCode(list.getWorkCode());
//检查项
List<EquOrder> checkLists = equOrderMapper.selectEquOrderDetailsList(equOrder);
List<EquOrder> checkLists = equOrderMapper.selectCheckListByWorkCode(equOrder);
//每个检查项对应的检测标准
for(EquOrder equOrder1 :checkLists){
EquOrderStandard equOrderStandard = new EquOrderStandard();
equOrderStandard.setOrderCode(equOrder1.getOrderCode());
equOrderStandard.setParentCode(equOrder1.getId());
List<EquOrderStandard> standardLists = equOrderStandardMapper.selectPdaEquOrderList(equOrderStandard);
for(EquOrderStandard standardList :standardLists){
//每个检查标准里面的照片
@ -562,6 +567,16 @@ public class DevicePDAServiceImpl implements IDevicePDAService {
@DS("#header.poolName")
public AjaxResult updateMaintenanceRecords(EquRepairWorkOrder equRepairWorkOrder) {
try {
//判断是否停机
EquRepairWorkOrder list = equRepairWorkOrderMapper.selectEquRepairWorkOrderByWorkId(equRepairWorkOrder.getWorkId());
if(list.getWorkDownMachine().equals("1")){
//维修结束时间、维修真正停机时间
equRepairWorkOrder.setActualDownEndTime(DateUtils.getNowDate());
equRepairWorkOrder.setWorkEndTime(DateUtils.getNowDate());
//维修完成
equRepairWorkOrder.setWorkStatus("1");
}
//更新每一项点检/巡检检查项信息
List<EquOrder> checkLists = equRepairWorkOrder.getDetailList();
for(EquOrder checkList:checkLists){
@ -594,6 +609,7 @@ public class DevicePDAServiceImpl implements IDevicePDAService {
}
equOrderMapper.updateEquOrder(checkList);
}
//新建申领单 缺少code
List<EquSpareApply> equSpareApplies = equRepairWorkOrder.getApplyList();
for(EquSpareApply equSpareApply:equSpareApplies){
@ -603,7 +619,7 @@ public class DevicePDAServiceImpl implements IDevicePDAService {
equSpareApply.setApplyTime(DateUtils.getNowDate());
equSpareApplyMapper.insertEquSpareApply(equSpareApply);
}
//维修人员名字????前端能够提供吗???
//图片
//先删除每个维修工单对应图片
equRepairWorkOrderMapper.deleteBaseFileBySourceId(equRepairWorkOrder.getWorkId());
@ -628,10 +644,33 @@ public class DevicePDAServiceImpl implements IDevicePDAService {
equRepairWorkOrder.setUpdateBy(SecurityUtils.getUsername());
equRepairWorkOrder.setUpdateTime(DateUtils.getNowDate());
equRepairWorkOrderMapper.updateEquRepairWorkOrder(equRepairWorkOrder);
//需要更新设备状态
//需要更新设备状态????这里没做
return success("提交成功,维修完成!");
} catch (Exception e) {
return error();
}
}
/**
*
*
* @param equRepairWorkOrder
* @return
*/
// @Override
// @DS("#header.poolName")
// public AjaxResult queryEquFaultTypeTree(EquRepairWorkOrder equRepairWorkOrder) {
// // 查询一级数据
// List<EquFaultType> firstLevel = equFaultTypeMapper.selectFirstLevelList(equRepairWorkOrder);
// // 一级list
// List<EquFaultTypeTree> firstTree = new ArrayList<>();
// // 判空
// if (!CollectionUtils.isEmpty(firstLevel)) {
// for(EquFaultType equFaultType : firstLevel){
//
// }
// }
//
// return treeAll;
// }
}

@ -288,6 +288,7 @@ public class EquOrderServiceImpl implements IEquOrderService {
equTeamUser.setUserName(SecurityUtils.getUsername());
EquTeamUser equTeamUserList = equRepairOrderMapper.getRepairPhoneNumber(equTeamUser);
equRepairOrder.setOrderConnection(equTeamUserList.getPhonenumber());
equRepairOrder.setOrderRepairmanName(equTeamUserList.getNickName());
// 报修来源
if (equOrder.getPlanType().equals("inspection")) {

@ -72,11 +72,12 @@ public class EquRepairOrderServiceImpl implements IEquRepairOrderService {
//报修单号
equOrder.setRepairCode(list.getOrderCode());
//检查项
List<EquOrder> checkLists = equOrderMapper.selectEquOrderDetailsList(equOrder);
List<EquOrder> checkLists = equOrderMapper.selectCheckListByRepairCode(equOrder);
//每个检查项对应的检测标准
for(EquOrder equOrder1 :checkLists){
EquOrderStandard equOrderStandard = new EquOrderStandard();
equOrderStandard.setOrderCode(equOrder1.getOrderCode());
equOrderStandard.setParentCode(equOrder1.getId());
List<EquOrderStandard> standardLists = equOrderStandardMapper.selectPdaEquOrderList(equOrderStandard);
for(EquOrderStandard standardList :standardLists){
//每个检查标准里面的照片

@ -68,11 +68,12 @@ public class EquRepairWorkOrderServiceImpl implements IEquRepairWorkOrderService
EquOrder equOrder = new EquOrder();
equOrder.setWorkCode(list.getWorkCode());
//检查项
List<EquOrder> checkLists = equOrderMapper.selectEquOrderDetailsList(equOrder);
List<EquOrder> checkLists = equOrderMapper.selectCheckListByWorkCode(equOrder);
//每个检查项对应的检测标准
for(EquOrder equOrder1 :checkLists){
EquOrderStandard equOrderStandard = new EquOrderStandard();
equOrderStandard.setOrderCode(equOrder1.getOrderCode());
equOrderStandard.setParentCode(equOrder1.getId());
List<EquOrderStandard> standardLists = equOrderStandardMapper.selectPdaEquOrderList(equOrderStandard);
for(EquOrderStandard standardList :standardLists){
//每个检查标准里面的照片

@ -19,6 +19,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result property="createTime" column="create_time" />
<result property="updateBy" column="update_by" />
<result property="updateTime" column="update_time" />
<!--故障大类-->
<result property="dictLabel" column="dict_label"/>
<result property="dictValue" column="dict_value"/>
</resultMap>
<sql id="selectEquFaultTypeVo">
@ -125,4 +130,14 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
#{faultId}
</foreach>
</delete>
<select id="selectFirstLevelList" resultMap="EquFaultTypeResult">
SELECT
dict_label AS dictLabel
dict_value AS dictValue
FROM sys_dict_data
WHERE dict_type = 'device_fault_type'
</select>
</mapper>

@ -40,6 +40,7 @@
<result property="repairCode" column="repair_code" />
<result property="workCode" column="work_code" />
<result property="id" column="id" />
<result property="itemName" column="item_name" />
<result property="itemMethod" column="item_method" />
<result property="itemType" column="item_type" />
@ -286,23 +287,39 @@
</delete>
<!-- 手持维修查询检查项-->
<select id="selectEquOrderDetailsList" parameterType="EquOrder" resultMap="EquOrderResult">
<select id="selectCheckListByWorkCode" parameterType="EquOrder" resultMap="EquOrderResult">
select
eo.order_id,
eo.order_code,
eo.repair_code,
eo.work_code,
eod.id,
eod.item_name,
eod.item_method,
eod.item_type,
eod.item_type_name
from equ_order eo
left join equ_order_detail eod on eo.order_code = eod.order_code
<where>
<if test="workCode != null "> and eo.work_code = #{workCode}</if>
<if test="repairCode != null "> and eo.repair_code = #{repairCode}</if>
and eo.del_flag = '0'
</where>
where eo.work_code = #{workCode}
and eo.del_flag = '0'
</select>
<!-- 手持报修查询检查项-->
<select id="selectCheckListByRepairCode" parameterType="EquOrder" resultMap="EquOrderResult">
select
eo.order_id,
eo.order_code,
eo.repair_code,
eo.work_code,
eod.id,
eod.item_name,
eod.item_method,
eod.item_type,
eod.item_type_name
from equ_order eo
left join equ_order_detail eod on eo.order_code = eod.order_code
where eo.repair_code = #{repairCode}
and eo.del_flag = '0'
</select>

@ -223,23 +223,19 @@
<!--手持查询维修工单接口 /PC查询点检巡检信息接口-->
<select id="selectPdaEquOrderList" parameterType="EquOrderStandard" resultMap="EquOrderStandardResult">
select
eos.id,
eos.order_code,
eos.standard_name,
<!--eod.item_method,-->
eos.detail_up_limit,
eos.detail_down_limit,
eos.detail_unit,
eos.detail_reach,
eos.actual_value,
eos.standard_type
eos.id,
eos.order_code,
eos.standard_name,
eos.detail_up_limit,
eos.detail_down_limit,
eos.detail_unit,
eos.detail_reach,
eos.actual_value,
eos.standard_type
from equ_order_standard eos
left join equ_order eo on eos.order_code = eo.order_code
<where>
<if test="orderCode != null "> and eo.order_code = #{orderCode}</if>
and eo.del_flag = '0'
and eos.detail_reach = '0'
</where>
where parent_code = #{parentCode}
and order_code = #{orderCode}
and eos.detail_reach = '0'
</select>
<insert id="insertBaseFileBatch">

@ -17,6 +17,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result property="equipmentCode" column="equipment_code" />
<result property="workCost" column="work_cost" />
<result property="workCostTime" column="work_cost_time" />
<result property="workStatus" column="work_status" />
<result property="attr1" column="attr1" />
<result property="attr2" column="attr2" />
<result property="attr3" column="attr3" />
@ -35,7 +36,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</resultMap>
<sql id="selectEquOutsourceWorkVo">
select work_id, work_code,order_code, repair_code, work_person, work_outsourcing_unit, work_connection, work_reason, work_type, equipment_code, work_cost, work_cost_time, attr1, attr2, attr3, del_flag, create_by, create_time, update_by, update_time, factory_code from equ_outsource_work
select work_id, work_code,order_code, repair_code, work_person, work_outsourcing_unit, work_connection, work_reason, work_type, equipment_code, work_cost, work_cost_time,work_status, attr1, attr2, attr3, del_flag, create_by, create_time, update_by, update_time, factory_code from equ_outsource_work
</sql>
<select id="selectEquOutsourceWorkList" parameterType="EquOutsourceWork" resultMap="EquOutsourceWorkResult">
@ -52,6 +53,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
eow.equipment_code,
eow.work_cost,
eow.work_cost_time,
eow.work_status,
eow.attr1,
eow.attr2,
eow.attr3,
@ -111,6 +113,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="equipmentCode != null">equipment_code,</if>
<if test="workCost != null">work_cost,</if>
<if test="workCostTime != null">work_cost_time,</if>
<if test="workStatus != null">work_status,</if>
<if test="attr1 != null">attr1,</if>
<if test="attr2 != null">attr2,</if>
<if test="attr3 != null">attr3,</if>
@ -134,6 +137,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="equipmentCode != null">#{equipmentCode},</if>
<if test="workCost != null">#{workCost},</if>
<if test="workCostTime != null">#{workCostTime},</if>
<if test="workStatus != null">#{workStatus},</if>
<if test="attr1 != null">#{attr1},</if>
<if test="attr2 != null">#{attr2},</if>
<if test="attr3 != null">#{attr3},</if>
@ -160,6 +164,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="equipmentCode != null">equipment_code = #{equipmentCode},</if>
<if test="workCost != null">work_cost = #{workCost},</if>
<if test="workCostTime != null">work_cost_time = #{workCostTime},</if>
<if test="workStatus != null">work_status = #{workStatus},</if>
<if test="attr1 != null">attr1 = #{attr1},</if>
<if test="attr2 != null">attr2 = #{attr2},</if>
<if test="attr3 != null">attr3 = #{attr3},</if>

Loading…
Cancel
Save