Commit a1ef3006 authored by 王晓倩's avatar 王晓倩

工单详情设备列表添加管道

parent f41b507e
...@@ -3,7 +3,6 @@ package com.zehong.web.controller.device; ...@@ -3,7 +3,6 @@ package com.zehong.web.controller.device;
import com.zehong.common.annotation.Log; import com.zehong.common.annotation.Log;
import com.zehong.common.core.controller.BaseController; import com.zehong.common.core.controller.BaseController;
import com.zehong.common.core.domain.AjaxResult; import com.zehong.common.core.domain.AjaxResult;
import com.zehong.common.core.domain.entity.SysDept;
import com.zehong.common.core.page.TableDataInfo; import com.zehong.common.core.page.TableDataInfo;
import com.zehong.common.enums.BusinessType; import com.zehong.common.enums.BusinessType;
import com.zehong.common.utils.poi.ExcelUtil; import com.zehong.common.utils.poi.ExcelUtil;
...@@ -55,9 +54,9 @@ public class TDeviceInfoController extends BaseController ...@@ -55,9 +54,9 @@ public class TDeviceInfoController extends BaseController
* 获取设备下拉树列表 * 获取设备下拉树列表
*/ */
@PutMapping("/deviceTree") @PutMapping("/deviceTree")
public AjaxResult deviceTree(@RequestBody List<TDeviceInfo> deviceInfoList) public AjaxResult deviceTree(@RequestBody Map<Object, List> param)
{ {
return AjaxResult.success(tDeviceInfoService.buildDeviceTreeSelect(deviceInfoList)); return AjaxResult.success(tDeviceInfoService.buildDeviceTreeSelect(param));
} }
/** /**
......
...@@ -3,7 +3,7 @@ package com.zehong.system.domain.vo; ...@@ -3,7 +3,7 @@ package com.zehong.system.domain.vo;
import com.fasterxml.jackson.annotation.JsonFormat; import com.fasterxml.jackson.annotation.JsonFormat;
import com.zehong.common.core.domain.BaseEntity; import com.zehong.common.core.domain.BaseEntity;
import com.zehong.system.domain.TDeviceInfo; import com.zehong.system.domain.TDeviceInfo;
import com.zehong.system.domain.TOrderFeedback; import com.zehong.system.domain.TPipe;
import org.apache.commons.lang3.builder.ToStringBuilder; import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle; import org.apache.commons.lang3.builder.ToStringStyle;
...@@ -42,6 +42,9 @@ public class WorkOrderVo extends BaseEntity ...@@ -42,6 +42,9 @@ public class WorkOrderVo extends BaseEntity
/** 设备列表 */ /** 设备列表 */
private List<TDeviceInfo> deviceInfoList; private List<TDeviceInfo> deviceInfoList;
/** 管道列表 */
private List<TPipe> pipeList;
/** 反馈信息列表 */ /** 反馈信息列表 */
private List<OrderFeedbackVo> feedbackList; private List<OrderFeedbackVo> feedbackList;
...@@ -156,6 +159,14 @@ public class WorkOrderVo extends BaseEntity ...@@ -156,6 +159,14 @@ public class WorkOrderVo extends BaseEntity
this.deviceInfoList = deviceInfoList; this.deviceInfoList = deviceInfoList;
} }
public List<TPipe> getPipeList() {
return pipeList;
}
public void setPipeList(List<TPipe> pipeList) {
this.pipeList = pipeList;
}
public List<OrderFeedbackVo> getFeedbackList() { public List<OrderFeedbackVo> getFeedbackList() {
return feedbackList; return feedbackList;
} }
......
...@@ -6,6 +6,7 @@ import java.util.Map; ...@@ -6,6 +6,7 @@ import java.util.Map;
import com.zehong.common.core.domain.TreeSelect; import com.zehong.common.core.domain.TreeSelect;
import com.zehong.common.core.domain.entity.SysDept; import com.zehong.common.core.domain.entity.SysDept;
import com.zehong.system.domain.TDeviceInfo; import com.zehong.system.domain.TDeviceInfo;
import com.zehong.system.domain.TPipe;
/** /**
* 设备信息Service接口 * 设备信息Service接口
...@@ -34,10 +35,10 @@ public interface ITDeviceInfoService ...@@ -34,10 +35,10 @@ public interface ITDeviceInfoService
/** /**
* 构建前端所需要下拉树结构 * 构建前端所需要下拉树结构
* *
* @param deviceInfoList 设备列表 * @param param 参数集合
* @return 下拉树结构列表 * @return 下拉树结构列表
*/ */
public List<Map<Object, Object>> buildDeviceTreeSelect(List<TDeviceInfo> deviceInfoList); public List<Map<Object, Object>> buildDeviceTreeSelect(Map<Object, List> param);
/** /**
* 统计各设备类型的设备总数 * 统计各设备类型的设备总数
......
...@@ -5,6 +5,7 @@ import java.util.stream.Collectors; ...@@ -5,6 +5,7 @@ import java.util.stream.Collectors;
import com.zehong.common.core.domain.TreeSelect; import com.zehong.common.core.domain.TreeSelect;
import com.zehong.common.core.domain.entity.SysDept; import com.zehong.common.core.domain.entity.SysDept;
import com.zehong.system.domain.TPipe;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import com.zehong.system.mapper.TDeviceInfoMapper; import com.zehong.system.mapper.TDeviceInfoMapper;
...@@ -51,20 +52,32 @@ public class TDeviceInfoServiceImpl implements ITDeviceInfoService ...@@ -51,20 +52,32 @@ public class TDeviceInfoServiceImpl implements ITDeviceInfoService
/** /**
* 构建前端所需要下拉树结构 * 构建前端所需要下拉树结构
* *
* @param deviceInfoList 部门列表 * @param param 参数集合
* @return 下拉树结构列表 * @return 下拉树结构列表
*/ */
@Override @Override
public List<Map<Object, Object>> buildDeviceTreeSelect(List<TDeviceInfo> deviceInfoList) public List<Map<Object, Object>> buildDeviceTreeSelect(Map<Object, List> param)
{ {
List<Map<Object, Object>> list = new ArrayList<>(); List<Map<Object, Object>> list = new ArrayList<>();
List<Map<Object, Object>> deviceList = param.get("key1");
List<Map<Object, Object>> pipeList = param.get("key2");
for (TDeviceInfo deviceInfo : deviceInfoList) { if(deviceList.size() != 0) {
Map<Object, Object> map = new HashMap<>(); for (Map<Object, Object> temp : deviceList) {
map.put("id", deviceInfo.getDeviceId()); Map<Object, Object> map = new HashMap<>();
map.put("label", deviceInfo.getDeviceName()); map.put("id", temp.get("deviceId"));
map.put("label", temp.get("deviceName"));
list.add(map);
}
}
list.add(map); if(pipeList.size() != 0){
for(Map<Object, Object> temp : pipeList){
Map<Object, Object> map = new HashMap<>();
map.put("id", temp.get("pipeId"));
map.put("label", temp.get("pipeName"));
list.add(map);
}
} }
return list; return list;
......
...@@ -73,6 +73,7 @@ public class TWorkOrderServiceImpl implements ITWorkOrderService ...@@ -73,6 +73,7 @@ public class TWorkOrderServiceImpl implements ITWorkOrderService
int resourceId = tWorkOrder.getResourceId(); int resourceId = tWorkOrder.getResourceId();
List<TDeviceInfo> deviceInfoList = new ArrayList<>(); List<TDeviceInfo> deviceInfoList = new ArrayList<>();
List<TPipe> pipeList = new ArrayList<>();
if("1".equals(orderType)){ if("1".equals(orderType)){
...@@ -82,11 +83,22 @@ public class TWorkOrderServiceImpl implements ITWorkOrderService ...@@ -82,11 +83,22 @@ public class TWorkOrderServiceImpl implements ITWorkOrderService
List<TInspectionData> totalList = tInspectionDataMapper.selectTInspectionDataList(data); List<TInspectionData> totalList = tInspectionDataMapper.selectTInspectionDataList(data);
workOrderVo.setDeviceNum(totalList.size()); workOrderVo.setDeviceNum(totalList.size());
TDeviceInfo deviceInfo = null; if(totalList.size() != 0) {
for(TInspectionData temp : totalList){ TDeviceInfo deviceInfo = null;
deviceInfo = tDeviceInfoMapper.selectTDeviceInfoById(temp.getDeviceId()); TPipe pipe = null;
if(deviceInfo != null){
deviceInfoList.add(deviceInfo); for (TInspectionData temp : totalList) {
if(!"0".equals(temp.getDeviceType())) {
deviceInfo = tDeviceInfoMapper.selectTDeviceInfoById(temp.getDeviceId());
if (deviceInfo != null) {
deviceInfoList.add(deviceInfo);
}
} else {
pipe = tPipeMapper.selectTPipeById(temp.getDeviceId());
if(pipe != null){
pipeList.add(pipe);
}
}
} }
} }
...@@ -136,6 +148,7 @@ public class TWorkOrderServiceImpl implements ITWorkOrderService ...@@ -136,6 +148,7 @@ public class TWorkOrderServiceImpl implements ITWorkOrderService
} }
} }
workOrderVo.setDeviceInfoList(deviceInfoList); workOrderVo.setDeviceInfoList(deviceInfoList);
workOrderVo.setPipeList(pipeList);
List<TOrderFeedback> feedbackList = tOrderFeedbackMapper.selectTOrderFeedbackByOrderId(tWorkOrder.getOrderId()); List<TOrderFeedback> feedbackList = tOrderFeedbackMapper.selectTOrderFeedbackByOrderId(tWorkOrder.getOrderId());
List<OrderFeedbackVo> feedbackVoList = new ArrayList<>(); List<OrderFeedbackVo> feedbackVoList = new ArrayList<>();
......
...@@ -104,7 +104,7 @@ ...@@ -104,7 +104,7 @@
<el-divider></el-divider> <el-divider></el-divider>
<!-- 反馈信息 --> <!-- 反馈信息 -->
<!-- <div style="width: 100%;font-weight: 600;" v-if="activity.deviceType != '' && activity.deviceType != null"> --> <!-- <div style="width: 100%;font-weight: 600;" v-if="activity.deviceType != '' && activity.deviceType != null"> -->
<div style="width: 100%;font-weight: 600;"> <div style="width: 100%;font-weight: 600;">
<div style="color: #31EAEA;width: 100%;height: 40px;"> <div style="color: #31EAEA;width: 100%;height: 40px;">
<ul><li>反馈信息</li></ul> <ul><li>反馈信息</li></ul>
</div> </div>
...@@ -122,7 +122,7 @@ ...@@ -122,7 +122,7 @@
<span v-if="activity.deviceType == 3">流量计</span> <span v-if="activity.deviceType == 3">流量计</span>
<span v-if="activity.deviceType == 4">压力表</span> <span v-if="activity.deviceType == 4">压力表</span>
</p> </p>
<p>是否有隐患: <p>是否有隐患:
<span v-if="activity.isHiddenDanger == 1"></span> <span v-if="activity.isHiddenDanger == 1"></span>
<span v-if="activity.isHiddenDanger == 2"></span> <span v-if="activity.isHiddenDanger == 2"></span>
...@@ -141,7 +141,7 @@ ...@@ -141,7 +141,7 @@
<div style="float: left;margin-left: 50px; width: 250px;"> <div style="float: left;margin-left: 50px; width: 250px;">
<p>设备名称:{{activity.deviceName}}</p> <p>设备名称:{{activity.deviceName}}</p>
<p>反馈时间:{{activity.feedbackTime}}</p> <p>反馈时间:{{activity.feedbackTime}}</p>
</div> </div>
</div> </div>
</div> </div>
...@@ -321,8 +321,8 @@ export default { ...@@ -321,8 +321,8 @@ export default {
} }
this.showAndHide = false; this.showAndHide = false;
} }
//$timeline.toggleRowExpansion(row,true) //$timeline.toggleRowExpansion(row,true)
}, },
...@@ -349,7 +349,6 @@ export default { ...@@ -349,7 +349,6 @@ export default {
getBasicsInfo (){ getBasicsInfo (){
getBasicsInfo(this.orderId).then(response =>{ getBasicsInfo(this.orderId).then(response =>{
this.form = response.data; this.form = response.data;
console.log(this.form.feedbackList,"00000000000")
this.active = parseInt(response.data.orderStatus) + 1; this.active = parseInt(response.data.orderStatus) + 1;
if(this.form.deviceInfoList.length>0){ if(this.form.deviceInfoList.length>0){
this.gaoMap.resetMapCenter([this.form.deviceInfoList[0].longitude,this.form.deviceInfoList[0].latitude]); this.gaoMap.resetMapCenter([this.form.deviceInfoList[0].longitude,this.form.deviceInfoList[0].latitude]);
...@@ -361,8 +360,10 @@ export default { ...@@ -361,8 +360,10 @@ export default {
if(this.form.orderType == '1') { if(this.form.orderType == '1') {
// 获取设备列表树 // 获取设备列表树
let data = this.form.deviceInfoList; let data = {
console.log(data, "===="); key1:this.form.deviceInfoList,
key2:this.form.pipeList
};
deviceTree(data).then(response => { deviceTree(data).then(response => {
this.deviceOptions[0].childList = response.data; this.deviceOptions[0].childList = response.data;
}); });
......
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