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