Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
Z
zh-baseversion-project
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
王浩
zh-baseversion-project
Commits
15a4f614
Commit
15a4f614
authored
Jul 09, 2024
by
耿迪迪
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
检查记录隐患管理
parent
37def2d7
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
800 additions
and
11 deletions
+800
-11
TInsRecInfor.java
.../src/main/java/com/zehong/system/domain/TInsRecInfor.java
+15
-0
TInsHazRefMapper.java
.../main/java/com/zehong/system/mapper/TInsHazRefMapper.java
+2
-0
TInsRecInforServiceImpl.java
...m/zehong/system/service/impl/TInsRecInforServiceImpl.java
+47
-2
TInsHazRefMapper.xml
...tem/src/main/resources/mapper/system/TInsHazRefMapper.xml
+5
-0
info.js
zh-baseversion-web/src/api/regulation/info.js
+10
-1
DetailInfo.vue
...eb/src/views/supervision/record/components/DetailInfo.vue
+5
-0
InsRefDetailInfo.vue
.../views/supervision/record/components/InsRefDetailInfo.vue
+197
-0
Rectification.vue
...src/views/supervision/record/components/Rectification.vue
+506
-0
index.vue
zh-baseversion-web/src/views/supervision/record/index.vue
+13
-8
No files found.
zh-baseversion-system/src/main/java/com/zehong/system/domain/TInsRecInfor.java
View file @
15a4f614
...
...
@@ -5,6 +5,8 @@ import org.apache.commons.lang3.builder.ToStringStyle;
import
com.zehong.common.annotation.Excel
;
import
com.zehong.common.core.domain.BaseEntity
;
import
java.util.List
;
/**
* 监督检查-检查记录对象 t_ins_rec_infor
*
...
...
@@ -106,6 +108,11 @@ public class TInsRecInfor extends BaseEntity
private
String
taskName
;
/**
* 隐患集合
*/
private
List
<
TInsHazRef
>
rectificationList
;
public
void
setfInsRecInforId
(
Long
fInsRecInforId
)
{
...
...
@@ -260,6 +267,14 @@ public class TInsRecInfor extends BaseEntity
this
.
taskName
=
taskName
;
}
public
List
<
TInsHazRef
>
getRectificationList
()
{
return
rectificationList
;
}
public
void
setRectificationList
(
List
<
TInsHazRef
>
rectificationList
)
{
this
.
rectificationList
=
rectificationList
;
}
@Override
public
String
toString
()
{
return
new
ToStringBuilder
(
this
,
ToStringStyle
.
MULTI_LINE_STYLE
)
...
...
zh-baseversion-system/src/main/java/com/zehong/system/mapper/TInsHazRefMapper.java
View file @
15a4f614
...
...
@@ -58,4 +58,6 @@ public interface TInsHazRefMapper
* @return 结果
*/
public
int
deleteTInsHazRefByIds
(
Long
[]
fInsHazRefIds
);
int
deleteTInsHazRefByCheckCode
(
String
fCheckCode
);
}
zh-baseversion-system/src/main/java/com/zehong/system/service/impl/TInsRecInforServiceImpl.java
View file @
15a4f614
...
...
@@ -6,8 +6,10 @@ import com.zehong.common.utils.GovernmentDataCopyUtil;
import
com.zehong.common.utils.GovernmentDataUtil
;
import
com.zehong.common.utils.StringUtils
;
import
com.zehong.system.domain.SysSetting
;
import
com.zehong.system.domain.TInsHazRef
;
import
com.zehong.system.domain.TInsRecInfor
;
import
com.zehong.system.domain.vo.TInsRecInforVo
;
import
com.zehong.system.mapper.TInsHazRefMapper
;
import
com.zehong.system.mapper.TInsRecInforMapper
;
import
com.zehong.system.service.ISysSettingService
;
import
com.zehong.system.service.ITInsRecInforService
;
...
...
@@ -16,8 +18,11 @@ import org.slf4j.Logger;
import
org.slf4j.LoggerFactory
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
org.springframework.transaction.annotation.Transactional
;
import
org.springframework.util.CollectionUtils
;
import
javax.annotation.Resource
;
import
java.sql.SQLIntegrityConstraintViolationException
;
import
java.text.SimpleDateFormat
;
import
java.time.Year
;
import
java.util.ArrayList
;
...
...
@@ -48,6 +53,9 @@ public class TInsRecInforServiceImpl implements ITInsRecInforService
@Resource
private
ITSerialNumberInfoService
itSerialNumberInfoService
;
@Resource
private
TInsHazRefMapper
tInsHazRefMapper
;
/**
* 查询监督检查-检查记录
*
...
...
@@ -79,6 +87,7 @@ public class TInsRecInforServiceImpl implements ITInsRecInforService
* @return 结果
*/
@Override
@Transactional
(
rollbackFor
=
Exception
.
class
)
public
int
insertTInsRecInfor
(
TInsRecInfor
tInsRecInfor
)
{
tInsRecInfor
.
setfLastUpdateTime
(
new
SimpleDateFormat
(
"yyyy-MM-dd HH:mm:ss"
).
format
(
new
Date
()));
...
...
@@ -87,6 +96,12 @@ public class TInsRecInforServiceImpl implements ITInsRecInforService
Map
<
String
,
String
>
num
=
itSerialNumberInfoService
.
getSerialNumberByTableType
(
"t_ins_rec_infor"
);
if
(
null
==
num
||
StringUtils
.
isEmpty
(
num
.
get
(
"f_check_code"
)))
throw
new
CustomException
(
"检查记录编码未配置!"
);
tInsRecInfor
.
setfCheckCode
(
code
.
getSystemValue
()+
Year
.
now
().
getValue
()
+
num
.
get
(
"f_check_code"
));
if
(!
CollectionUtils
.
isEmpty
(
tInsRecInfor
.
getRectificationList
())){
for
(
TInsHazRef
ref
:
tInsRecInfor
.
getRectificationList
()){
ref
.
setfCheckCode
(
tInsRecInfor
.
getfCheckCode
());
addInsHazRef
(
ref
);
}
}
return
tInsRecInforMapper
.
insertTInsRecInfor
(
tInsRecInfor
);
}
...
...
@@ -97,12 +112,42 @@ public class TInsRecInforServiceImpl implements ITInsRecInforService
* @return 结果
*/
@Override
public
int
updateTInsRecInfor
(
TInsRecInfor
tInsRecInfor
)
{
@Transactional
(
rollbackFor
=
Exception
.
class
)
public
int
updateTInsRecInfor
(
TInsRecInfor
tInsRecInfor
)
{
tInsRecInfor
.
setfLastUpdateTime
(
new
SimpleDateFormat
(
"yyyy-MM-dd HH:mm:ss"
).
format
(
new
Date
()));
if
(!
CollectionUtils
.
isEmpty
(
tInsRecInfor
.
getRectificationList
())){
tInsHazRefMapper
.
deleteTInsHazRefByCheckCode
(
tInsRecInfor
.
getfCheckCode
());
for
(
TInsHazRef
ref
:
tInsRecInfor
.
getRectificationList
()){
ref
.
setfObjType
(
tInsRecInfor
.
getfObjectType
());
ref
.
setfObjCode
(
tInsRecInfor
.
getfObjectCode
());
ref
.
setfCheckCode
(
tInsRecInfor
.
getfCheckCode
());
addInsHazRef
(
ref
);
}
}
return
tInsRecInforMapper
.
updateTInsRecInfor
(
tInsRecInfor
);
}
/**
* 新增隐患
* @param ref
*/
private
void
addInsHazRef
(
TInsHazRef
ref
){
try
{
ref
.
setfLastTime
(
new
SimpleDateFormat
(
"yyyy-MM-dd HH:mm:ss"
).
format
(
new
Date
()));
tInsHazRefMapper
.
insertTInsHazRef
(
ref
);
}
catch
(
Exception
e
){
Throwable
cause
=
e
.
getCause
();
if
(
cause
instanceof
SQLIntegrityConstraintViolationException
){
String
errMsg
=
cause
.
getMessage
();
if
(
StringUtils
.
isNotEmpty
(
errMsg
)
&&
errMsg
.
contains
(
"index_hazard_unique_code"
)){
throw
new
CustomException
(
"隐患唯一编码不唯一"
);
}
}
throw
new
CustomException
(
"隐患新增失败"
);
}
}
/**
* 批量删除监督检查-检查记录
*
...
...
zh-baseversion-system/src/main/resources/mapper/system/TInsHazRefMapper.xml
View file @
15a4f614
...
...
@@ -44,6 +44,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if
test=
"fRectificationStatus != null and fRectificationStatus != ''"
>
and f_rectification_status = #{fRectificationStatus}
</if>
<if
test=
"fIsEnforcement != null and fIsEnforcement != ''"
>
and f_is_enforcement = #{fIsEnforcement}
</if>
<if
test=
"fEnforcementType != null and fEnforcementType != ''"
>
and f_enforcement_type = #{fEnforcementType}
</if>
<if
test=
"fCheckCode != null and fCheckCode != ''"
>
and f_check_code = #{fCheckCode}
</if>
</where>
ORDER BY f_last_time DESC
</select>
...
...
@@ -147,4 +148,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
#{fInsHazRefId}
</foreach>
</delete>
<delete
id=
"deleteTInsHazRefByCheckCode"
parameterType=
"String"
>
delete from t_ins_haz_ref where f_check_code = #{fCheckCode}
</delete>
</mapper>
\ No newline at end of file
zh-baseversion-web/src/api/regulation/info.js
View file @
15a4f614
...
...
@@ -70,4 +70,13 @@ export function importTemplate() {
url
:
'/regulation/info/importTemplate'
,
method
:
'get'
})
}
\ No newline at end of file
}
// 查询企业所有信息
export
function
enterpriseListInfo
(
query
)
{
return
request
({
url
:
'/regulation/info/enterpriseInfoList'
,
method
:
'get'
,
params
:
query
})
}
zh-baseversion-web/src/views/supervision/record/components/DetailInfo.vue
View file @
15a4f614
...
...
@@ -4,6 +4,9 @@
<!-- 检查记录详情 -->
<InspectInfo
v-if=
"detailOpen"
:detailInfo=
"detailInfo"
/>
<!-- 隐患管理 -->
<Rectification
:fCheckCode=
"detailInfo.fCheckCode"
:readOnly=
"true"
v-if=
"detailOpen"
/>
</el-dialog>
</
template
>
...
...
@@ -11,6 +14,7 @@
<
script
>
import
{
getInfor
}
from
"@/api/supervision/record"
;
import
InspectInfo
from
"./InspectInfo"
;
import
Rectification
from
"./Rectification"
;
export
default
{
name
:
"detail-info"
,
data
(){
...
...
@@ -23,6 +27,7 @@
},
components
:{
InspectInfo
,
Rectification
},
methods
:{
getDetailInfo
(
id
){
...
...
zh-baseversion-web/src/views/supervision/record/components/InsRefDetailInfo.vue
0 → 100644
View file @
15a4f614
<
template
>
<el-dialog
title=
"详情"
:visible
.
sync=
"detailOpen"
width=
"1000px"
append-to-body
destroy-on-close
:close-on-click-modal=
"false"
>
<el-form
label-width=
"150px"
>
<el-row
class=
"el-row-table"
>
<el-col
:span=
"12"
>
<el-form-item
label=
"隐患唯一编码"
>
<span
v-if=
"detailInfo.fHazardUniqueCode"
>
{{
detailInfo
.
fHazardUniqueCode
}}
</span>
<span
v-else
>
-
</span>
</el-form-item>
</el-col>
<el-col
:span=
"12"
>
<el-form-item
label=
"自有编号"
>
<span
v-if=
"detailInfo.fHazardOutUniqueCode"
>
{{
detailInfo
.
fHazardOutUniqueCode
}}
</span>
<span
v-else
>
-
</span>
</el-form-item>
</el-col>
<el-col
:span=
"12"
>
<el-form-item
label=
"检查记录编码"
>
<span
v-if=
"detailInfo.fCheckCode"
>
{{
detailInfo
.
fCheckCode
}}
</span>
<span
v-else
>
-
</span>
</el-form-item>
</el-col>
<el-col
:span=
"12"
>
<el-form-item
label=
"涉及供气企业编码"
>
<span
v-if=
"detailInfo.fInvolveEnterpriseCode"
>
{{
detailInfo
.
fInvolveEnterpriseCode
}}
</span>
<span
v-else
>
-
</span>
</el-form-item>
</el-col>
<el-col
:span=
"12"
>
<el-form-item
label=
"检查对象分类"
>
<span
v-if=
"detailInfo.fObjType"
>
{{
$parent
.
fObjTypeFormat
(
detailInfo
)
}}
</span>
<span
v-else
>
-
</span>
</el-form-item>
</el-col>
<el-col
:span=
"12"
>
<el-form-item
label=
"对象编码"
>
<span
v-if=
"detailInfo.fObjCode"
>
{{
detailInfo
.
fObjCode
}}
</span>
<span
v-else
>
-
</span>
</el-form-item>
</el-col>
<el-col
:span=
"12"
>
<el-form-item
label=
"行政区县级行政区"
>
<span
v-if=
"detailInfo.fObjBelongRegionId"
>
{{
$parent
.
countyInfo
.
find
(
item
=>
item
.
fId
=
detailInfo
.
fObjBelongRegionId
).
fName
}}
</span>
<span
v-else
>
-
</span>
</el-form-item>
</el-col>
<el-col
:span=
"12"
>
<el-form-item
label=
"监督检查时间"
>
<span
v-if=
"detailInfo.fCheckTime"
>
{{
detailInfo
.
fCheckTime
}}
</span>
<span
v-else
>
-
</span>
</el-form-item>
</el-col>
<el-col
:span=
"12"
>
<el-form-item
label=
"隐患分类分级编码"
>
<span
v-if=
"detailInfo.fHazardTypeLevelId"
>
{{
detailInfo
.
fHazardTypeLevelId
}}
</span>
<span
v-else
>
-
</span>
</el-form-item>
</el-col>
<el-col
:span=
"12"
>
<el-form-item
label=
"整改状态"
>
<span
v-if=
"detailInfo.fRectificationStatus"
>
{{
$parent
.
fRectificationStatusFormat
(
detailInfo
)
}}
</span>
<span
v-else
>
-
</span>
</el-form-item>
</el-col>
<el-col
:span=
"12"
>
<el-form-item
label=
"整改资金/万元"
>
<span
v-if=
"detailInfo.fRectificationFund"
>
{{
detailInfo
.
fRectificationFund
}}
</span>
<span
v-else
>
-
</span>
</el-form-item>
</el-col>
<el-col
:span=
"12"
>
<el-form-item
label=
"整改完成日期"
>
<span
v-if=
"detailInfo.fCompletionDate"
>
{{
detailInfo
.
fCompletionDate
}}
</span>
<span
v-else
>
-
</span>
</el-form-item>
</el-col>
<el-col
:span=
"12"
>
<el-form-item
label=
"整改或管控措施描述"
>
<span
v-if=
"detailInfo.fControlMeasure"
>
{{
detailInfo
.
fControlMeasure
}}
</span>
<span
v-else
>
-
</span>
</el-form-item>
</el-col>
<el-col
:span=
"12"
>
<el-form-item
label=
"隐患整改前照片"
>
<el-image
:src=
"detailInfo.fBeforePicture"
:preview-src-list=
"[detailInfo.fBeforePicture]"
v-if=
"detailInfo.fBeforePicture != '' && detailInfo.fBeforePicture != null"
:z-index=
5000
style=
"width: 200px;height: 200px;"
></el-image>
<span
v-else
>
-
</span>
</el-form-item>
</el-col>
<el-col
:span=
"12"
>
<el-form-item
label=
"隐患整改后照片"
>
<el-image
:src=
"detailInfo.fAfterPicture"
:preview-src-list=
"[detailInfo.fAfterPicture]"
v-if=
"detailInfo.fAfterPicture != '' && detailInfo.fAfterPicture != null"
:z-index=
5000
style=
"width: 200px;height: 200px;"
></el-image>
<span
v-else
>
-
</span>
</el-form-item>
</el-col>
<el-col
:span=
"12"
>
<el-form-item
label=
"是否执行"
>
<span
v-if=
"detailInfo.fIsEnforcement == '1'"
>
是
</span>
<span
v-else-if=
"detailInfo.fIsEnforcement == '0'"
>
否
</span>
<span
v-else
>
-
</span>
</el-form-item>
</el-col>
<el-col
:span=
"12"
>
<el-form-item
label=
"处罚措施"
>
<span
v-if=
"detailInfo.fEnforcementType"
>
{{
$parent
.
fEnforcementTypeFormat
(
detailInfo
)
}}
</span>
<span
v-else
>
-
</span>
</el-form-item>
</el-col>
<el-col
:span=
"12"
>
<el-form-item
label=
"处罚金额/万元"
>
<span
v-if=
"detailInfo.fPenaltyAmount"
>
{{
detailInfo
.
fPenaltyAmount
}}
</span>
<span
v-else
>
-
</span>
</el-form-item>
</el-col>
<el-col
:span=
"12"
>
<el-form-item
label=
"执法日期"
>
<span
v-if=
"detailInfo.fPenaltyDate"
>
{{
detailInfo
.
fPenaltyDate
}}
</span>
<span
v-else
>
-
</span>
</el-form-item>
</el-col>
<el-col
:span=
"12"
>
<el-form-item
label=
"其他执法情况说明"
>
<span
v-if=
"detailInfo.fPenaltyDesc"
>
{{
detailInfo
.
fPenaltyDesc
}}
</span>
<span
v-else
>
-
</span>
</el-form-item>
</el-col>
<el-col
:span=
"12"
>
<el-form-item
label=
"更新时间"
>
<span
v-if=
"detailInfo.fLastTime"
>
{{
detailInfo
.
fLastTime
}}
</span>
<span
v-else
>
-
</span>
</el-form-item>
</el-col>
<el-col
:span=
"12"
>
<el-form-item
label=
"备注"
>
<span
v-if=
"detailInfo.fRemark"
>
{{
detailInfo
.
fRemark
}}
</span>
<span
v-else
>
-
</span>
</el-form-item>
</el-col>
</el-row>
</el-form>
</el-dialog>
</
template
>
<
script
>
export
default
{
name
:
"ins-ref-detail-info"
,
data
(){
return
{
detailInfo
:
{
fDeleteFlag
:
0
},
detailOpen
:
false
}
}
}
</
script
>
<
style
scoped
>
</
style
>
zh-baseversion-web/src/views/supervision/record/components/Rectification.vue
0 → 100644
View file @
15a4f614
This diff is collapsed.
Click to expand it.
zh-baseversion-web/src/views/supervision/record/index.vue
View file @
15a4f614
...
...
@@ -89,7 +89,7 @@
<el-table
v-loading=
"loading"
:data=
"inforList"
@
selection-change=
"handleSelectionChange"
>
<el-table-column
type=
"selection"
width=
"55"
align=
"center"
/>
<el-table-column
label=
"检查记录编码"
align=
"center"
prop=
"fCheckCode"
/>
<el-table-column
label=
"检查记录编码"
align=
"center"
prop=
"fCheckCode"
width=
"150"
/>
<el-table-column
label=
"任务编码"
align=
"center"
prop=
"fCheckTaskCode"
/>
<el-table-column
label=
"任务名称"
align=
"center"
prop=
"taskName"
>
<template
slot-scope=
"scope"
>
...
...
@@ -107,7 +107,7 @@
<el-table-column
label=
"检查对象分类"
align=
"center"
prop=
"fObjectType"
/>
<el-table-column
label=
"对象编码"
align=
"center"
prop=
"fObjectCode"
/>
<el-table-column
label=
"检查人员姓名"
align=
"center"
prop=
"fCheckManName"
/>
<el-table-column
label=
"检查人员联系电话"
align=
"center"
prop=
"fCheckManPhone"
>
<el-table-column
label=
"检查人员联系电话"
align=
"center"
prop=
"fCheckManPhone"
width=
"150"
>
<
template
slot-scope=
"scope"
>
<span
v-if=
"scope.row.fCheckManPhone"
>
{{
scope
.
row
.
fCheckManPhone
}}
</span>
<span
v-else
>
-
</span>
...
...
@@ -165,7 +165,7 @@
/>
<!-- 添加或修改检查记录对话框 -->
<el-dialog
:title=
"title"
:visible
.
sync=
"open"
width=
"
9
00px"
append-to-body
destroy-on-close
:close-on-click-modal=
"false"
>
<el-dialog
:title=
"title"
:visible
.
sync=
"open"
width=
"
10
00px"
append-to-body
destroy-on-close
:close-on-click-modal=
"false"
>
<el-form
ref=
"form"
:model=
"form"
:rules=
"rules"
label-width=
"130px"
>
<el-row
class=
"el-row-table"
>
<el-col
:span=
"12"
>
...
...
@@ -179,7 +179,7 @@
<el-option
v-for=
"task in taskData"
:key=
"task.fInsTaskInforId"
:label=
"task.fName + ' ' +task.fUniqueCode"
:label=
"task.fName + '
+
' +task.fUniqueCode"
:value=
"task.fUniqueCode"
/>
</el-select>
...
...
@@ -275,7 +275,7 @@
<el-col
:span=
"12"
>
<el-form-item
label=
"隐患数量"
prop=
"fHazardsNum"
>
<el-input
v-model=
"form.fHazardsNum"
type=
"number"
placeholder=
"请输入隐患数量"
/>
<el-input
disabled
v-model=
"form.fHazardsNum"
type=
"number"
placeholder=
"请输入隐患数量"
/>
</el-form-item>
</el-col>
...
...
@@ -298,14 +298,17 @@
</el-form-item>
</el-col>
<el-col
:span=
"24"
>
<
!--<
el-col :span="24">
<el-form-item label="描述" prop="fRemark">
<el-input type="textarea" v-model="form.fRemark" placeholder="请输入描述" />
</el-form-item>
</el-col>
</el-col>
-->
</el-row>
<!-- 隐患管理 -->
<Rectification
:fCheckCode=
"form.fCheckCode"
v-if=
"open"
/>
</el-form>
<div
slot=
"footer"
class=
"dialog-footer"
>
<el-button
type=
"primary"
@
click=
"submitForm"
>
确 定
</el-button>
...
...
@@ -329,12 +332,14 @@ import DetailInfo from "./components/DetailInfo";
import
{
getDefaultCountyList
}
from
"@/api/area/county"
;
import
{
getInspectionUsers
}
from
"@/api/system/user"
;
import
TaskInfo
from
"./components/TaskInfo"
;
import
Rectification
from
"./components/Rectification"
;
export
default
{
name
:
"Infor"
,
components
:
{
ImageUpload
,
DetailInfo
,
TaskInfo
TaskInfo
,
Rectification
},
data
()
{
return
{
...
...
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