Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gassafety
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
耿迪迪
gassafety
Commits
0b91e536
Commit
0b91e536
authored
Jul 26, 2021
by
耿迪迪
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of
ssh://111.61.77.35:15/gengdidi/gassafety
parents
d4754930
99a1f061
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
70 additions
and
30 deletions
+70
-30
TInspectionData.java
...c/main/java/com/zehong/system/domain/TInspectionData.java
+15
-1
TWorkOrderServiceImpl.java
...com/zehong/system/service/impl/TWorkOrderServiceImpl.java
+47
-21
TInspectionDataMapper.xml
...rc/main/resources/mapper/system/TInspectionDataMapper.xml
+6
-1
detail.vue
gassafety-web/src/views/workOrder/basicsInfo/detail.vue
+2
-7
No files found.
gassafety-system/src/main/java/com/zehong/system/domain/TInspectionData.java
View file @
0b91e536
...
...
@@ -26,6 +26,10 @@ public class TInspectionData extends BaseEntity
@Excel
(
name
=
"设备编号"
)
private
String
deviceCode
;
/** 设备类型 */
@Excel
(
name
=
"设备类型"
)
private
String
deviceType
;
/** 处理状态(1不需处理,2已处理完成,3未处理完成) */
@Excel
(
name
=
"处理状态"
,
readConverterExp
=
"1=不需处理,2已处理完成,3未处理完成"
)
private
String
dealStatus
;
...
...
@@ -61,6 +65,15 @@ public class TInspectionData extends BaseEntity
{
return
deviceCode
;
}
public
String
getDeviceType
()
{
return
deviceType
;
}
public
void
setDeviceType
(
String
deviceType
)
{
this
.
deviceType
=
deviceType
;
}
public
void
setDealStatus
(
String
dealStatus
)
{
this
.
dealStatus
=
dealStatus
;
...
...
@@ -86,6 +99,7 @@ public class TInspectionData extends BaseEntity
.
append
(
"dataId"
,
getDataId
())
.
append
(
"planId"
,
getPlanId
())
.
append
(
"deviceCode"
,
getDeviceCode
())
.
append
(
"deviceType"
,
getDeviceType
())
.
append
(
"dealStatus"
,
getDealStatus
())
.
append
(
"updateTime"
,
getUpdateTime
())
.
append
(
"createTime"
,
getCreateTime
())
...
...
gassafety-system/src/main/java/com/zehong/system/service/impl/TWorkOrderServiceImpl.java
View file @
0b91e536
...
...
@@ -8,7 +8,6 @@ import com.zehong.common.utils.DateUtils;
import
com.zehong.system.domain.*
;
import
com.zehong.system.domain.vo.WorkOrderVo
;
import
com.zehong.system.mapper.*
;
import
com.zehong.system.service.ITInspectionPlanService
;
import
org.springframework.beans.BeanUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
...
...
@@ -42,9 +41,6 @@ public class TWorkOrderServiceImpl implements ITWorkOrderService
@Autowired
private
TDeviceInfoMapper
tDeviceInfoMapper
;
@Autowired
private
ITInspectionPlanService
tInspectionPlanService
;
/**
* 查询工单基础信息
*
...
...
@@ -73,6 +69,9 @@ public class TWorkOrderServiceImpl implements ITWorkOrderService
// 获取源数据(1巡检信息,2隐患信息,3报警信息)
String
orderType
=
tWorkOrder
.
getOrderType
();
int
resourceId
=
tWorkOrder
.
getResourceId
();
List
<
TDeviceInfo
>
deviceInfoList
=
new
ArrayList
<>();
if
(
"1"
.
equals
(
orderType
)){
TInspectionPlan
plan
=
tInspectionPlanMapper
.
selectTInspectionPlanById
(
resourceId
);
...
...
@@ -84,21 +83,18 @@ public class TWorkOrderServiceImpl implements ITWorkOrderService
List
<
TInspectionData
>
totalList
=
tInspectionDataMapper
.
selectTInspectionDataList
(
data
);
workOrderVo
.
setDeviceNum
(
totalList
.
size
());
List
<
TDeviceInfo
>
deviceInfoList
=
new
ArrayList
<>();
TDeviceInfo
deviceInfo
=
null
;
for
(
TInspectionData
temp
:
totalList
){
deviceInfo
=
tDeviceInfoMapper
.
selectTDeviceInfoByCode
(
temp
.
getDeviceCode
());
if
(
deviceInfo
!=
null
){
deviceInfoList
.
add
(
deviceInfo
);
}
}
workOrderVo
.
setDeviceInfoList
(
deviceInfoList
);
int
finish
=
tInspectionDataMapper
.
selectFinishTInspectionData
(
resourceId
);
workOrderVo
.
setFinishNum
(
finish
);
}
else
if
(
"2"
.
equals
(
orderType
)){
}
else
if
(
"2"
.
equals
(
orderType
))
{
THiddenTrouble
trouble
=
tHiddenTroubleMapper
.
selectTHiddenTroubleById
(
resourceId
);
workOrderVo
.
setDeviceCodes
((
trouble
.
getDeviceCode
()
!=
null
?
trouble
.
getDeviceCode
()
:
null
).
toString
());
...
...
@@ -108,7 +104,13 @@ public class TWorkOrderServiceImpl implements ITWorkOrderService
workOrderVo
.
setDeviceType
(
trouble
.
getDeviceType
());
workOrderVo
.
setAddress
(
trouble
.
getAddress
());
}
else
{
String
deviceCode
=
trouble
.
getDeviceCode
();
TDeviceInfo
device
=
tDeviceInfoMapper
.
selectTDeviceInfoByCode
(
deviceCode
);
if
(
device
!=
null
){
deviceInfoList
.
add
(
device
);
}
}
else
if
(
"3"
.
equals
(
orderType
))
{
TDeviceAlarm
alarm
=
tDeviceAlarmMapper
.
selectTDeviceAlarmById
(
resourceId
);
String
deviceCode
=
alarm
.
getDeviceCode
();
...
...
@@ -122,12 +124,16 @@ public class TWorkOrderServiceImpl implements ITWorkOrderService
workOrderVo
.
setAddress
(
pipe
.
getPipeAddr
());
}
else
{
TDeviceInfo
device
=
tDeviceInfoMapper
.
selectTDeviceInfoByCode
(
deviceCode
);
if
(
device
!=
null
){
workOrderVo
.
setLongitude
(
device
.
getLongitude
());
workOrderVo
.
setLatitude
(
device
.
getLatitude
());
workOrderVo
.
setDeviceType
(
device
.
getDeviceType
());
workOrderVo
.
setAddress
(
device
.
getDeviceAddr
());
deviceInfoList
.
add
(
device
);
}
}
}
workOrderVo
.
setDeviceInfoList
(
deviceInfoList
);
List
<
TOrderFeedback
>
feedbackList
=
tOrderFeedbackMapper
.
selectTOrderFeedbackByOrderId
(
tWorkOrder
.
getOrderId
());
if
(
feedbackList
.
size
()
!=
0
){
...
...
@@ -185,16 +191,34 @@ public class TWorkOrderServiceImpl implements ITWorkOrderService
public
int
insertTWorkOrder
(
TWorkOrder
tWorkOrder
)
throws
Exception
{
String
orderId
=
tWorkOrderMapper
.
getWorkOrderId
();
int
resourceId
=
tWorkOrder
.
getResourceId
();
tWorkOrder
.
setOrderId
(
orderId
);
tWorkOrder
.
setOrderStatus
(
"0"
);
tWorkOrder
.
setAllotTime
(
DateUtils
.
getNowDate
());
i
nt
planId
=
tWorkOrder
.
getResourceId
();
i
f
(
"1"
.
equals
(
tWorkOrder
.
getOrderType
())){
// 修改巡检计划状态为已下发
TInspectionPlan
plan
=
new
TInspectionPlan
();
plan
.
setPlanId
(
planId
);
plan
.
setPlanId
(
resourceId
);
plan
.
setOrderId
(
orderId
);
plan
.
setPlanStatus
(
"1"
);
tInspectionPlanService
.
updateTInspectionPlan
(
plan
);
plan
.
setUpdateTime
(
DateUtils
.
getNowDate
());
tInspectionPlanMapper
.
updateTInspectionPlan
(
plan
);
}
else
if
(
"2"
.
equals
(
tWorkOrder
.
getOrderType
()))
{
THiddenTrouble
trouble
=
new
THiddenTrouble
();
trouble
.
setTroubleId
(
resourceId
);
trouble
.
setOrderId
(
orderId
);
trouble
.
setUpdateTime
(
DateUtils
.
getNowDate
());
tHiddenTroubleMapper
.
updateTHiddenTrouble
(
trouble
);
}
else
if
(
"3"
.
equals
(
tWorkOrder
.
getOrderType
()))
{
TDeviceAlarm
alarm
=
new
TDeviceAlarm
();
alarm
.
setAlarmId
(
resourceId
);
alarm
.
setOrderId
(
orderId
);
alarm
.
setUpdateTime
(
DateUtils
.
getNowDate
());
tDeviceAlarmMapper
.
updateTDeviceAlarm
(
alarm
);
}
return
tWorkOrderMapper
.
insertTWorkOrder
(
tWorkOrder
);
}
...
...
@@ -216,7 +240,8 @@ public class TWorkOrderServiceImpl implements ITWorkOrderService
TInspectionPlan
plan
=
new
TInspectionPlan
();
plan
.
setPlanId
(
planId
);
plan
.
setPlanStatus
(
"2"
);
tInspectionPlanService
.
updateTInspectionPlan
(
plan
);
plan
.
setUpdateTime
(
DateUtils
.
getNowDate
());
tInspectionPlanMapper
.
updateTInspectionPlan
(
plan
);
}
else
if
(
"4"
.
equals
(
tWorkOrder
.
getOrderStatus
())){
...
...
@@ -226,7 +251,8 @@ public class TWorkOrderServiceImpl implements ITWorkOrderService
TInspectionPlan
plan
=
new
TInspectionPlan
();
plan
.
setPlanId
(
planId
);
plan
.
setPlanStatus
(
"3"
);
tInspectionPlanService
.
updateTInspectionPlan
(
plan
);
plan
.
setUpdateTime
(
DateUtils
.
getNowDate
());
tInspectionPlanMapper
.
updateTInspectionPlan
(
plan
);
}
tWorkOrder
.
setUpdateTime
(
DateUtils
.
getNowDate
());
...
...
gassafety-system/src/main/resources/mapper/system/TInspectionDataMapper.xml
View file @
0b91e536
...
...
@@ -8,6 +8,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result
property=
"dataId"
column=
"data_id"
/>
<result
property=
"planId"
column=
"plan_id"
/>
<result
property=
"deviceCode"
column=
"device_code"
/>
<result
property=
"deviceType"
column=
"device_type"
/>
<result
property=
"dealStatus"
column=
"deal_status"
/>
<result
property=
"updateTime"
column=
"update_time"
/>
<result
property=
"createTime"
column=
"create_time"
/>
...
...
@@ -15,7 +16,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</resultMap>
<sql
id=
"selectTInspectionDataVo"
>
select data_id, plan_id, device_code, deal_status, update_time, create_time, remarks from t_inspection_data
select data_id, plan_id, device_code, de
vice_type, de
al_status, update_time, create_time, remarks from t_inspection_data
</sql>
<select
id=
"selectTInspectionDataList"
parameterType=
"TInspectionData"
resultMap=
"TInspectionDataResult"
>
...
...
@@ -23,6 +24,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<where>
<if
test=
"planId != null "
>
and plan_id = #{planId}
</if>
<if
test=
"deviceCode != null "
>
and device_code = #{deviceCode}
</if>
<if
test=
"deviceType != null "
>
and device_type = #{deviceType}
</if>
<if
test=
"dealStatus != null and dealStatus != ''"
>
and deal_status = #{dealStatus}
</if>
<if
test=
"remarks != null and remarks != ''"
>
and remarks = #{remarks}
</if>
</where>
...
...
@@ -50,6 +52,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if
test=
"dataId != null"
>
data_id,
</if>
<if
test=
"planId != null"
>
plan_id,
</if>
<if
test=
"deviceCode != null"
>
device_code,
</if>
<if
test=
"deviceType != null"
>
device_type,
</if>
<if
test=
"dealStatus != null"
>
deal_status,
</if>
<if
test=
"updateTime != null"
>
update_time,
</if>
<if
test=
"createTime != null"
>
create_time,
</if>
...
...
@@ -59,6 +62,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if
test=
"dataId != null"
>
#{dataId},
</if>
<if
test=
"planId != null"
>
#{planId},
</if>
<if
test=
"deviceCode != null"
>
#{deviceCode},
</if>
<if
test=
"deviceType != null"
>
#{deviceType},
</if>
<if
test=
"dealStatus != null"
>
#{dealStatus},
</if>
<if
test=
"updateTime != null"
>
#{updateTime},
</if>
<if
test=
"createTime != null"
>
#{createTime},
</if>
...
...
@@ -71,6 +75,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<trim
prefix=
"SET"
suffixOverrides=
","
>
<if
test=
"planId != null"
>
plan_id = #{planId},
</if>
<if
test=
"deviceCode != null"
>
device_code = #{deviceCode},
</if>
<if
test=
"deviceType != null"
>
device_type = #{deviceType},
</if>
<if
test=
"dealStatus != null"
>
deal_status = #{dealStatus},
</if>
<if
test=
"updateTime != null"
>
update_time = #{updateTime},
</if>
<if
test=
"createTime != null"
>
create_time = #{createTime},
</if>
...
...
gassafety-web/src/views/workOrder/basicsInfo/detail.vue
View file @
0b91e536
<
template
>
<div
class=
"app-container detail"
style=
"background-color: rgb(238, 241, 245);"
>
<!-- 工单信息 -->
<div
style=
"padding-top: 10px;background: #fff;"
>
<div
style=
"padding-top: 10px;background: #fff;
height: 100%;
"
>
<div>
<span
style=
"color: #31EAEA;font-weight: 900;margin-left: 15px;"
>
工单信息
</span>
<el-steps
:active=
"active"
finish-status=
"success"
simple
prop=
"orderStatus"
style=
"margin-top: 20px"
>
...
...
@@ -21,9 +21,6 @@
</div>
<el-form
ref=
"form"
v-model=
"form"
:rules=
"rules"
label-width=
"100px"
style=
"float: left;margin-left: 50px;"
>
<el-form-item
label=
"工单类型:"
prop=
"orderType"
>
<!--
<template
slot-scope=
"scope"
>
<span>
{{
scope
.
row
.
orderType
}}
</span>
</
template
>
-->
<font
v-if=
"form.orderType == 1"
>
巡检信息
</font>
<font
v-if=
"form.orderType == 2"
>
隐患信息
</font>
<font
v-if=
"form.orderType == 3"
>
报警信息
</font>
...
...
@@ -240,9 +237,6 @@ export default {
},
mounted
(){
let
gaoMap
=
new
gaodeMap
(
"石家庄"
);
// let data = {longitude:"114.208371",latitude:"38.267036"}
// map.addMarker(DEVICE_TYPE,data)
// map.addMarker(DEVICE_TYPE.WORKORDER,data)
this
.
gaoMap
=
gaoMap
;
this
.
getBasicsInfo
();
},
...
...
@@ -272,6 +266,7 @@ export default {
this
.
active
=
parseInt
(
response
.
data
.
orderStatus
)
+
1
;
for
(
var
i
=
0
;
i
<
this
.
form
.
deviceInfoList
.
length
;
i
++
){
let
obj
=
this
.
form
.
deviceInfoList
[
i
];
console
.
log
(
obj
,
"94444444444444-=----"
)
this
.
gaoMap
.
addMarker
(
DEVICE_TYPE
.
WORKORDER
,
obj
)
}
});
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment