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
5ce8f322
Commit
5ce8f322
authored
Aug 26, 2021
by
王晓倩
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
解决新增巡检计划同时生成的巡检记录planId是null的问题
parent
9748d2c7
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
30 additions
and
14 deletions
+30
-14
TInspectionDataMapper.java
.../java/com/zehong/system/mapper/TInspectionDataMapper.java
+5
-2
TInspectionPlanServiceImpl.java
...ehong/system/service/impl/TInspectionPlanServiceImpl.java
+7
-4
TOrderFeedbackServiceImpl.java
...zehong/system/service/impl/TOrderFeedbackServiceImpl.java
+8
-1
TInspectionDataMapper.xml
...rc/main/resources/mapper/system/TInspectionDataMapper.xml
+2
-2
index.vue
gassafety-web/src/views/workOrder/feedback/index.vue
+8
-5
No files found.
gassafety-system/src/main/java/com/zehong/system/mapper/TInspectionDataMapper.java
View file @
5ce8f322
package
com
.
zehong
.
system
.
mapper
;
import
java.util.List
;
import
com.zehong.system.domain.TInspectionData
;
import
org.apache.ibatis.annotations.Param
;
/**
* 巡检记录Mapper接口
...
...
@@ -22,10 +24,11 @@ public interface TInspectionDataMapper
/**
* 查询巡检记录
*
* @param deviceId 设备id
* @param planId
* @param deviceId
* @return 巡检记录
*/
public
TInspectionData
selectTInspectionDataByDeviceId
(
int
deviceId
);
public
TInspectionData
selectTInspectionDataByDeviceId
(
@Param
(
"planId"
)
int
planId
,
@Param
(
"deviceId"
)
int
deviceId
);
/**
* 查询巡检记录
...
...
gassafety-system/src/main/java/com/zehong/system/service/impl/TInspectionPlanServiceImpl.java
View file @
5ce8f322
...
...
@@ -140,6 +140,11 @@ public class TInspectionPlanServiceImpl implements ITInspectionPlanService
@Override
public
int
insertTInspectionPlan
(
TInspectionPlan
tInspectionPlan
)
throws
Exception
{
tInspectionPlan
.
setPlanStatus
(
"0"
);
tInspectionPlan
.
setCreateTime
(
DateUtils
.
getNowDate
());
tInspectionPlanMapper
.
insertTInspectionPlan
(
tInspectionPlan
);
int
planId
=
tInspectionPlan
.
getPlanId
();
String
deviceIds
=
tInspectionPlan
.
getDeviceIds
();
String
[]
stringArr
=
deviceIds
.
split
(
"],"
);
String
deviceType
=
null
;
...
...
@@ -158,7 +163,7 @@ public class TInspectionPlanServiceImpl implements ITInspectionPlanService
}
else
{
Integer
deviceId
=
Integer
.
valueOf
(
m
.
replaceAll
(
""
).
trim
());
TInspectionData
data
=
new
TInspectionData
();
data
.
setPlanId
(
tInspectionPlan
.
getPlanId
()
);
data
.
setPlanId
(
planId
);
data
.
setDeviceId
(
deviceId
);
data
.
setDeviceType
(
deviceType
);
data
.
setCreateTime
(
DateUtils
.
getNowDate
());
...
...
@@ -167,9 +172,7 @@ public class TInspectionPlanServiceImpl implements ITInspectionPlanService
}
}
}
tInspectionPlan
.
setPlanStatus
(
"0"
);
tInspectionPlan
.
setCreateTime
(
DateUtils
.
getNowDate
());
return
tInspectionPlanMapper
.
insertTInspectionPlan
(
tInspectionPlan
);
return
1
;
}
/**
...
...
gassafety-system/src/main/java/com/zehong/system/service/impl/TOrderFeedbackServiceImpl.java
View file @
5ce8f322
package
com
.
zehong
.
system
.
service
.
impl
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.Map
;
import
com.zehong.common.utils.DateUtils
;
import
com.zehong.system.domain.*
;
...
...
@@ -25,6 +27,8 @@ public class TOrderFeedbackServiceImpl implements ITOrderFeedbackService
@Autowired
private
TInspectionDataMapper
tInspectionDataMapper
;
@Autowired
private
TInspectionPlanMapper
tInspectionPlanMapper
;
@Autowired
private
THiddenTroubleMapper
tHiddenTroubleMapper
;
@Autowired
private
TDeviceAlarmMapper
tDeviceAlarmMapper
;
...
...
@@ -79,8 +83,11 @@ public class TOrderFeedbackServiceImpl implements ITOrderFeedbackService
String
orderType
=
order
.
getOrderType
();
if
(
"1"
.
equals
(
orderType
)){
TInspectionPlan
tInspectionPlan
=
tInspectionPlanMapper
.
selectTInspectionPlanById
(
order
.
getResourceId
());
Integer
planId
=
tInspectionPlan
.
getPlanId
();
Integer
deviceId
=
tOrderFeedback
.
getDeviceId
();
TInspectionData
data
=
tInspectionDataMapper
.
selectTInspectionDataByDeviceId
(
deviceId
);
TInspectionData
data
=
tInspectionDataMapper
.
selectTInspectionDataByDeviceId
(
planId
,
deviceId
);
data
.
setDealStatus
(
dealStatus
);
data
.
setIsHiddenDanger
(
isHiddenDanger
);
data
.
setUpdateTime
(
DateUtils
.
getNowDate
());
...
...
gassafety-system/src/main/resources/mapper/system/TInspectionDataMapper.xml
View file @
5ce8f322
...
...
@@ -43,9 +43,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
where data_id = #{dataId}
</select>
<select
id=
"selectTInspectionDataByDeviceId"
parameterType=
"
int
"
resultMap=
"TInspectionDataResult"
>
<select
id=
"selectTInspectionDataByDeviceId"
parameterType=
"
map
"
resultMap=
"TInspectionDataResult"
>
<include
refid=
"selectTInspectionDataVo"
/>
where device_id = #{deviceId}
where device_id = #{deviceId}
and plan_id = #{planId}
</select>
<insert
id=
"insertTInspectionData"
parameterType=
"TInspectionData"
>
...
...
gassafety-web/src/views/workOrder/feedback/index.vue
View file @
5ce8f322
...
...
@@ -168,10 +168,10 @@
</el-switch>
</el-form-item>
<el-form-item
label=
"处理结果"
prop=
"dealStatus"
v-if=
"isHiddenDanger == true"
>
<el-radio-group
v-model=
"
form.
dealStatus"
>
<el-radio
:
label=
"2"
>
已处理完成
</el-radio>
<el-radio
:
label=
"3"
>
未处理完成
</el-radio>
<el-radio
:
label=
"1"
>
不需处理
</el-radio>
<el-radio-group
v-model=
"dealStatus"
>
<el-radio
label=
"2"
>
已处理完成
</el-radio>
<el-radio
label=
"3"
>
未处理完成
</el-radio>
<el-radio
label=
"1"
>
不需处理
</el-radio>
</el-radio-group>
</el-form-item>
<el-form-item
label=
"反馈信息"
prop=
"contents"
>
...
...
@@ -200,6 +200,7 @@
data
()
{
return
{
isHiddenDanger
:
false
,
dealStatus
:
'2'
,
// 遮罩层
loading
:
true
,
// 导出遮罩层
...
...
@@ -311,6 +312,8 @@
dealStatus
:
null
,
contents
:
null
};
this
.
isHiddenDanger
=
false
;
this
.
dealStatus
=
'2'
;
this
.
resetForm
(
"form"
);
},
/** 搜索按钮操作 */
...
...
@@ -348,7 +351,6 @@
},
/** 反馈按钮操作 */
handleFeedback
(
row
)
{
this
.
open
=
true
;
const
orderId
=
row
.
orderId
||
this
.
ids
getBasicsInfo
(
orderId
).
then
(
response
=>
{
this
.
form
=
response
.
data
;
...
...
@@ -372,6 +374,7 @@
}
else
{
this
.
form
.
isHiddenDanger
=
"1"
;
}
this
.
form
.
dealStatus
=
this
.
dealStatus
;
this
.
$refs
[
"form"
].
validate
(
valid
=>
{
if
(
valid
)
{
if
(
this
.
form
.
orderStatus
==
'1'
||
this
.
form
.
orderStatus
==
'2'
){
...
...
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