Commit 24b5c403 authored by yaqizhang's avatar yaqizhang

Merge branch 'master' of http://111.61.77.35:9999/gengdidi/gassafety into master

parents d7c64f1e 637ec492
...@@ -28,6 +28,10 @@ public class TOrderFeedback extends BaseEntity ...@@ -28,6 +28,10 @@ public class TOrderFeedback extends BaseEntity
@Excel(name = "设备id") @Excel(name = "设备id")
private Integer deviceId; private Integer deviceId;
/** 设备类型 */
@Excel(name = "设备类型")
private String deviceType;
/** 反馈内容 */ /** 反馈内容 */
@Excel(name = "反馈内容") @Excel(name = "反馈内容")
private String contents; private String contents;
...@@ -84,6 +88,15 @@ public class TOrderFeedback extends BaseEntity ...@@ -84,6 +88,15 @@ public class TOrderFeedback extends BaseEntity
{ {
return deviceId; return deviceId;
} }
public String getDeviceType() {
return deviceType;
}
public void setDeviceType(String deviceType) {
this.deviceType = deviceType;
}
public void setContents(String contents) public void setContents(String contents)
{ {
this.contents = contents; this.contents = contents;
......
...@@ -33,12 +33,12 @@ public class WorkOrderVo extends BaseEntity ...@@ -33,12 +33,12 @@ public class WorkOrderVo extends BaseEntity
/** 工单名称 */ /** 工单名称 */
private String orderName; private String orderName;
/** 设备id */
private Integer deviceId;
/** 设备名称 */ /** 设备名称 */
private String deviceName; private String deviceName;
/** 设备类型 */
private String deviceType;
/** 设备列表 */ /** 设备列表 */
private List<TDeviceInfo> deviceInfoList; private List<TDeviceInfo> deviceInfoList;
...@@ -54,21 +54,6 @@ public class WorkOrderVo extends BaseEntity ...@@ -54,21 +54,6 @@ public class WorkOrderVo extends BaseEntity
/** 完成数量 */ /** 完成数量 */
private int finishNum; private int finishNum;
/** 设备类型 */
private String deviceType;
/** 经度 */
private BigDecimal longitude;
/** 纬度 */
private BigDecimal latitude;
/** 坐标 */
private String coordinates;
/** 地址 */
private String address;
/** 工单状态(0未接收,1已接收,2进行中,3已反馈,4已归档) */ /** 工单状态(0未接收,1已接收,2进行中,3已反馈,4已归档) */
private String orderStatus; private String orderStatus;
...@@ -135,14 +120,6 @@ public class WorkOrderVo extends BaseEntity ...@@ -135,14 +120,6 @@ public class WorkOrderVo extends BaseEntity
return orderName; return orderName;
} }
public Integer getDeviceId() {
return deviceId;
}
public void setDeviceId(Integer deviceId) {
this.deviceId = deviceId;
}
public String getDeviceName() { public String getDeviceName() {
return deviceName; return deviceName;
} }
...@@ -199,38 +176,6 @@ public class WorkOrderVo extends BaseEntity ...@@ -199,38 +176,6 @@ public class WorkOrderVo extends BaseEntity
this.deviceType = deviceType; this.deviceType = deviceType;
} }
public BigDecimal getLongitude() {
return longitude;
}
public void setLongitude(BigDecimal longitude) {
this.longitude = longitude;
}
public BigDecimal getLatitude() {
return latitude;
}
public void setLatitude(BigDecimal latitude) {
this.latitude = latitude;
}
public String getCoordinates() {
return coordinates;
}
public void setCoordinates(String coordinates) {
this.coordinates = coordinates;
}
public String getAddress() {
return address;
}
public void setAddress(String address) {
this.address = address;
}
public void setOrderStatus(String orderStatus) public void setOrderStatus(String orderStatus)
{ {
this.orderStatus = orderStatus; this.orderStatus = orderStatus;
...@@ -325,10 +270,6 @@ public class WorkOrderVo extends BaseEntity ...@@ -325,10 +270,6 @@ public class WorkOrderVo extends BaseEntity
.append("deviceNum", getDeviceNum()) .append("deviceNum", getDeviceNum())
.append("finishNum", getFinishNum()) .append("finishNum", getFinishNum())
.append("deviceType", getDeviceType()) .append("deviceType", getDeviceType())
.append("longitude", getLongitude())
.append("latitude", getLatitude())
.append("coordinates", getCoordinates())
.append("address", getAddress())
.append("orderStatus", getOrderStatus()) .append("orderStatus", getOrderStatus())
.append("createTime", getCreateTime()) .append("createTime", getCreateTime())
.append("appointInspector", getAppointInspector()) .append("appointInspector", getAppointInspector())
......
...@@ -25,8 +25,6 @@ public class TOrderFeedbackServiceImpl implements ITOrderFeedbackService ...@@ -25,8 +25,6 @@ public class TOrderFeedbackServiceImpl implements ITOrderFeedbackService
@Autowired @Autowired
private TInspectionDataMapper tInspectionDataMapper; private TInspectionDataMapper tInspectionDataMapper;
@Autowired @Autowired
private TInspectionPlanMapper tInspectionPlanMapper;
@Autowired
private THiddenTroubleMapper tHiddenTroubleMapper; private THiddenTroubleMapper tHiddenTroubleMapper;
@Autowired @Autowired
private TDeviceAlarmMapper tDeviceAlarmMapper; private TDeviceAlarmMapper tDeviceAlarmMapper;
...@@ -86,6 +84,9 @@ public class TOrderFeedbackServiceImpl implements ITOrderFeedbackService ...@@ -86,6 +84,9 @@ public class TOrderFeedbackServiceImpl implements ITOrderFeedbackService
data.setDealStatus(dealStatus); data.setDealStatus(dealStatus);
data.setIsHiddenDanger(isHiddenDanger); data.setIsHiddenDanger(isHiddenDanger);
data.setUpdateTime(DateUtils.getNowDate()); data.setUpdateTime(DateUtils.getNowDate());
tOrderFeedback.setDeviceType(data.getDeviceType());
tInspectionDataMapper.updateTInspectionData(data); tInspectionDataMapper.updateTInspectionData(data);
if("0".equals(data.getDeviceType())){ if("0".equals(data.getDeviceType())){
...@@ -101,12 +102,18 @@ public class TOrderFeedbackServiceImpl implements ITOrderFeedbackService ...@@ -101,12 +102,18 @@ public class TOrderFeedbackServiceImpl implements ITOrderFeedbackService
THiddenTrouble trouble = tHiddenTroubleMapper.selectTHiddenTroubleById(order.getResourceId()); THiddenTrouble trouble = tHiddenTroubleMapper.selectTHiddenTroubleById(order.getResourceId());
trouble.setDealStatus(dealStatus); trouble.setDealStatus(dealStatus);
trouble.setUpdateTime(DateUtils.getNowDate()); trouble.setUpdateTime(DateUtils.getNowDate());
tOrderFeedback.setDeviceType(trouble.getDeviceType());
tHiddenTroubleMapper.updateTHiddenTrouble(trouble); tHiddenTroubleMapper.updateTHiddenTrouble(trouble);
} else if("3".equals(orderType)) { } else if("3".equals(orderType)) {
TDeviceAlarm alarm = tDeviceAlarmMapper.selectTDeviceAlarmById(order.getResourceId()); TDeviceAlarm alarm = tDeviceAlarmMapper.selectTDeviceAlarmById(order.getResourceId());
alarm.setDealStatus(dealStatus); alarm.setDealStatus(dealStatus);
alarm.setUpdateTime(DateUtils.getNowDate()); alarm.setUpdateTime(DateUtils.getNowDate());
tOrderFeedback.setDeviceType(alarm.getDeviceType());
tDeviceAlarmMapper.updateTDeviceAlarm(alarm); tDeviceAlarmMapper.updateTDeviceAlarm(alarm);
} }
......
...@@ -110,43 +110,45 @@ public class TWorkOrderServiceImpl implements ITWorkOrderService ...@@ -110,43 +110,45 @@ public class TWorkOrderServiceImpl implements ITWorkOrderService
THiddenTrouble trouble = tHiddenTroubleMapper.selectTHiddenTroubleById(resourceId); THiddenTrouble trouble = tHiddenTroubleMapper.selectTHiddenTroubleById(resourceId);
Integer deviceId = trouble.getDeviceId(); Integer deviceId = trouble.getDeviceId();
String deviceType = trouble.getDeviceType();
workOrderVo.setDeviceId(deviceId); if("0".equals(deviceType)){
workOrderVo.setLongitude(trouble.getLongitude() != null ? trouble.getLongitude() : null); TPipe pipe = tPipeMapper.selectTPipeById(deviceId);
workOrderVo.setLatitude(trouble.getLatitude() != null ? trouble.getLatitude() : null); if(pipe != null){
workOrderVo.setDeviceType(trouble.getDeviceType()); workOrderVo.setDeviceName(pipe.getPipeName());
workOrderVo.setAddress(trouble.getAddress()); pipeList.add(pipe);
}
} else {
TDeviceInfo device = tDeviceInfoMapper.selectTDeviceInfoById(deviceId); TDeviceInfo device = tDeviceInfoMapper.selectTDeviceInfoById(deviceId);
if(device != null){ if(device != null){
workOrderVo.setDeviceName(device.getDeviceName()); workOrderVo.setDeviceName(device.getDeviceName());
deviceInfoList.add(device); deviceInfoList.add(device);
} }
}
workOrderVo.setDeviceType(deviceType);
} else if("3".equals(orderType)) { } else if("3".equals(orderType)) {
TDeviceAlarm alarm = tDeviceAlarmMapper.selectTDeviceAlarmById(resourceId); TDeviceAlarm alarm = tDeviceAlarmMapper.selectTDeviceAlarmById(resourceId);
Integer deviceId = alarm.getDeviceId(); Integer deviceId = alarm.getDeviceId();
workOrderVo.setDeviceId(deviceId);
String deviceType = alarm.getDeviceType(); String deviceType = alarm.getDeviceType();
if("0".equals(deviceType)){ if("0".equals(deviceType)){
TPipe pipe = tPipeMapper.selectTPipeById(deviceId); TPipe pipe = tPipeMapper.selectTPipeById(deviceId);
workOrderVo.setCoordinates(pipe.getCoordinates()); if(pipe != null) {
workOrderVo.setDeviceType("0"); workOrderVo.setDeviceName(pipe.getPipeName());
workOrderVo.setAddress(pipe.getPipeAddr()); pipeList.add(pipe);
}
} else { } else {
TDeviceInfo device = tDeviceInfoMapper.selectTDeviceInfoById(deviceId); TDeviceInfo device = tDeviceInfoMapper.selectTDeviceInfoById(deviceId);
if(device != null){ if(device != null){
workOrderVo.setLongitude(device.getLongitude());
workOrderVo.setLatitude(device.getLatitude());
workOrderVo.setDeviceType(device.getDeviceType());
workOrderVo.setDeviceName(device.getDeviceName()); workOrderVo.setDeviceName(device.getDeviceName());
workOrderVo.setAddress(device.getDeviceAddr());
deviceInfoList.add(device); deviceInfoList.add(device);
} }
} }
workOrderVo.setDeviceType(deviceType);
} }
workOrderVo.setDeviceInfoList(deviceInfoList); workOrderVo.setDeviceInfoList(deviceInfoList);
workOrderVo.setPipeList(pipeList); workOrderVo.setPipeList(pipeList);
...@@ -158,19 +160,20 @@ public class TWorkOrderServiceImpl implements ITWorkOrderService ...@@ -158,19 +160,20 @@ public class TWorkOrderServiceImpl implements ITWorkOrderService
for (TOrderFeedback feedback : feedbackList) { for (TOrderFeedback feedback : feedbackList) {
OrderFeedbackVo feedbackVo = new OrderFeedbackVo(); OrderFeedbackVo feedbackVo = new OrderFeedbackVo();
if (feedback != null) {
BeanUtils.copyProperties(feedback, feedbackVo); BeanUtils.copyProperties(feedback, feedbackVo);
}
if("0".equals(feedback.getDeviceType())) {
TPipe pipe = tPipeMapper.selectTPipeById(feedback.getDeviceId());
if(pipe != null){
feedbackVo.setDeviceName(pipe.getPipeName());
}
} else {
device = tDeviceInfoMapper.selectTDeviceInfoById(feedback.getDeviceId()); device = tDeviceInfoMapper.selectTDeviceInfoById(feedback.getDeviceId());
if (device != null) { if (device != null) {
feedbackVo.setDeviceName(device.getDeviceName()); feedbackVo.setDeviceName(device.getDeviceName());
feedbackVo.setDeviceType(device.getDeviceType());
} }
if (feedbackVo != null) {
feedbackVoList.add(feedbackVo);
} }
feedbackVoList.add(feedbackVo);
} }
if (feedbackVoList.size() != 0) { if (feedbackVoList.size() != 0) {
......
...@@ -8,6 +8,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" ...@@ -8,6 +8,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result property="feedbackId" column="feedback_id" /> <result property="feedbackId" column="feedback_id" />
<result property="orderId" column="order_id" /> <result property="orderId" column="order_id" />
<result property="deviceId" column="device_id" /> <result property="deviceId" column="device_id" />
<result property="deviceType" column="device_type" />
<result property="contents" column="contents" /> <result property="contents" column="contents" />
<result property="feedbackTime" column="feedback_time" /> <result property="feedbackTime" column="feedback_time" />
<result property="isHiddenDanger" column="is_hidden_danger" /> <result property="isHiddenDanger" column="is_hidden_danger" />
...@@ -18,7 +19,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" ...@@ -18,7 +19,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</resultMap> </resultMap>
<sql id="selectTOrderFeedbackVo"> <sql id="selectTOrderFeedbackVo">
select feedback_id, order_id, device_id, contents, feedback_time, is_hidden_danger, deal_status, picture_url_1, picture_url_2, picture_url_3 from t_order_feedback select feedback_id, order_id, device_id, device_type, contents, feedback_time, is_hidden_danger, deal_status, picture_url_1, picture_url_2, picture_url_3 from t_order_feedback
</sql> </sql>
<select id="selectTOrderFeedbackList" parameterType="TOrderFeedback" resultMap="TOrderFeedbackResult"> <select id="selectTOrderFeedbackList" parameterType="TOrderFeedback" resultMap="TOrderFeedbackResult">
...@@ -52,6 +53,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" ...@@ -52,6 +53,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<trim prefix="(" suffix=")" suffixOverrides=","> <trim prefix="(" suffix=")" suffixOverrides=",">
<if test="orderId != null">order_id,</if> <if test="orderId != null">order_id,</if>
<if test="deviceId != null">device_id,</if> <if test="deviceId != null">device_id,</if>
<if test="deviceType != null">device_type,</if>
<if test="contents != null">contents,</if> <if test="contents != null">contents,</if>
<if test="feedbackTime != null">feedback_time,</if> <if test="feedbackTime != null">feedback_time,</if>
<if test="isHiddenDanger != null">is_hidden_danger,</if> <if test="isHiddenDanger != null">is_hidden_danger,</if>
...@@ -63,6 +65,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" ...@@ -63,6 +65,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<trim prefix="values (" suffix=")" suffixOverrides=","> <trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="orderId != null">#{orderId},</if> <if test="orderId != null">#{orderId},</if>
<if test="deviceId != null">#{deviceId},</if> <if test="deviceId != null">#{deviceId},</if>
<if test="deviceType != null">#{deviceType},</if>
<if test="contents != null">#{contents},</if> <if test="contents != null">#{contents},</if>
<if test="feedbackTime != null">#{feedbackTime},</if> <if test="feedbackTime != null">#{feedbackTime},</if>
<if test="isHiddenDanger != null">#{isHiddenDanger},</if> <if test="isHiddenDanger != null">#{isHiddenDanger},</if>
...@@ -78,6 +81,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" ...@@ -78,6 +81,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<trim prefix="SET" suffixOverrides=","> <trim prefix="SET" suffixOverrides=",">
<if test="orderId != null">order_id = #{orderId},</if> <if test="orderId != null">order_id = #{orderId},</if>
<if test="deviceId != null">device_id = #{deviceId},</if> <if test="deviceId != null">device_id = #{deviceId},</if>
<if test="deviceType != null">device_type = #{deviceType},</if>
<if test="contents != null">contents = #{contents},</if> <if test="contents != null">contents = #{contents},</if>
<if test="feedbackTime != null">feedback_time = #{feedbackTime},</if> <if test="feedbackTime != null">feedback_time = #{feedbackTime},</if>
<if test="isHiddenDanger != null">is_hidden_danger = #{isHiddenDanger},</if> <if test="isHiddenDanger != null">is_hidden_danger = #{isHiddenDanger},</if>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment