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
378719b8
Commit
378719b8
authored
Jul 09, 2024
by
耿迪迪
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
上传检查记录及上传隐患
parent
c5976ac2
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
81 additions
and
2 deletions
+81
-2
TInsHazRefController.java
...hong/web/controller/supervision/TInsHazRefController.java
+20
-0
ITInsHazRefService.java
...in/java/com/zehong/system/service/ITInsHazRefService.java
+7
-0
TInsHazRefServiceImpl.java
...com/zehong/system/service/impl/TInsHazRefServiceImpl.java
+25
-0
rectification.js
zh-baseversion-web/src/api/supervision/rectification.js
+9
-0
index.vue
zh-baseversion-web/src/views/supervision/record/index.vue
+20
-2
No files found.
zh-baseversion-admin/src/main/java/com/zehong/web/controller/supervision/TInsHazRefController.java
View file @
378719b8
package
com
.
zehong
.
web
.
controller
.
supervision
;
import
java.util.List
;
import
com.zehong.common.exception.CustomException
;
import
org.springframework.security.access.prepost.PreAuthorize
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.GetMapping
;
...
...
@@ -110,4 +112,22 @@ public class TInsHazRefController extends BaseController
return
AjaxResult
.
error
(
"上传监督检查发现隐患及整改、执法结果接口异常"
);
}
}
/**
* 根据检查记录上传隐患
* @param checkCode
* @return
*/
@GetMapping
(
"/reportHazRefInfoByCheckCode"
)
public
AjaxResult
reportHazRefInfoByCheckCode
(
String
checkCode
){
try
{
return
toAjax
(
tInsHazRefService
.
reportHazRefInfoByCheckCode
(
checkCode
));
}
catch
(
CustomException
e
){
logger
.
error
(
"根据检查编码上传隐患业务异常====="
,
e
);
return
AjaxResult
.
error
(
e
.
getMessage
());
}
catch
(
Exception
e
){
logger
.
error
(
"根据检查编码上传隐患接口异常====="
,
e
);
return
AjaxResult
.
error
(
"上传隐患接口异常"
);
}
}
}
zh-baseversion-system/src/main/java/com/zehong/system/service/ITInsHazRefService.java
View file @
378719b8
...
...
@@ -65,4 +65,11 @@ public interface ITInsHazRefService
* @return
*/
int
reportHazRefInfo
(
Long
fInsHazRefId
)
throws
Exception
;
/**
* 根据检查记录上传隐患
* @param checkCode
* @return
*/
int
reportHazRefInfoByCheckCode
(
String
checkCode
)
throws
Exception
;
}
zh-baseversion-system/src/main/java/com/zehong/system/service/impl/TInsHazRefServiceImpl.java
View file @
378719b8
...
...
@@ -13,6 +13,7 @@ import org.slf4j.Logger;
import
org.slf4j.LoggerFactory
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
org.springframework.util.CollectionUtils
;
import
javax.annotation.Resource
;
import
java.sql.SQLIntegrityConstraintViolationException
;
...
...
@@ -148,4 +149,28 @@ public class TInsHazRefServiceImpl implements ITInsHazRefService
return
1
;
}
/**
* 根据检查记录上传隐患
* @param checkCode
* @return
*/
@Override
public
int
reportHazRefInfoByCheckCode
(
String
checkCode
)
throws
Exception
{
TInsHazRef
tInsHazRef
=
new
TInsHazRef
();
tInsHazRef
.
setfCheckCode
(
checkCode
);
List
<
TInsHazRef
>
refList
=
tInsHazRefMapper
.
selectTInsHazRefList
(
tInsHazRef
);
if
(
CollectionUtils
.
isEmpty
(
refList
))
throw
new
CustomException
(
"该检查记录下未查到关联隐患"
);
List
<
TInsHazRefVo
>
data
=
new
ArrayList
<>();
for
(
TInsHazRef
insHazRef
:
refList
){
TInsHazRefVo
insHazRefVo
=
new
TInsHazRefVo
();
GovernmentDataCopyUtil
.
copyToGovernData
(
insHazRef
,
insHazRefVo
);
data
.
add
(
insHazRefVo
);
}
JSONObject
reportResult
=
governmentDataUtil
.
setInfo
(
"inspection/record/information"
,
"WRITE"
,
data
);
log
.
info
(
"上传监督检查发现隐患及整改、执法结果==================="
+
reportResult
.
toJSONString
());
if
(!
"0"
.
equals
(
reportResult
.
getString
(
"resultCode"
)))
throw
new
CustomException
(
"上传隐患市局接口失败"
);
return
1
;
}
}
zh-baseversion-web/src/api/supervision/rectification.js
View file @
378719b8
...
...
@@ -60,3 +60,12 @@ export function reportHazRefInfo(query) {
params
:
query
})
}
//上传隐患
export
function
reportHazRefInfoByCheckCode
(
query
)
{
return
request
({
url
:
'/supervision/rectification/reportHazRefInfoByCheckCode'
,
method
:
'get'
,
params
:
query
})
}
zh-baseversion-web/src/views/supervision/record/index.vue
View file @
378719b8
...
...
@@ -151,7 +151,12 @@
size=
"mini"
type=
"text"
@
click=
"handleReport(scope.row)"
>
上传
</el-button>
>
上传记录
</el-button>
<el-button
size=
"mini"
type=
"text"
@
click=
"handleReportHidden(scope.row)"
>
上传隐患
</el-button>
</
template
>
</el-table-column>
</el-table>
...
...
@@ -333,6 +338,7 @@ import { getDefaultCountyList } from "@/api/area/county";
import
{
getInspectionUsers
}
from
"@/api/system/user"
;
import
TaskInfo
from
"./components/TaskInfo"
;
import
Rectification
from
"./components/Rectification"
;
import
{
reportHazRefInfoByCheckCode
}
from
"@/api/supervision/rectification"
;
export
default
{
name
:
"Infor"
,
components
:
{
...
...
@@ -556,7 +562,6 @@ export default {
this
.
$refs
.
detail
.
getDetailInfo
(
row
.
fInsRecInforId
);
},
//上传
/** 删除按钮操作 */
handleReport
(
row
)
{
this
.
$confirm
(
'是否确认上传检查记录编码为"'
+
row
.
fCheckCode
+
'"的数据项?'
,
"警告"
,
{
confirmButtonText
:
"确定"
,
...
...
@@ -569,6 +574,19 @@ export default {
this
.
msgSuccess
(
"上传成功"
);
}).
catch
(()
=>
{});
},
//上传隐患
handleReportHidden
(
row
){
this
.
$confirm
(
'是否确认上传检查记录编码为"'
+
row
.
fCheckCode
+
'"的数据项?'
,
"警告"
,
{
confirmButtonText
:
"确定"
,
cancelButtonText
:
"取消"
,
type
:
"warning"
}).
then
(
function
()
{
return
reportHazRefInfoByCheckCode
({
checkCode
:
row
.
fCheckCode
});
}).
then
(()
=>
{
this
.
getList
();
this
.
msgSuccess
(
"上传隐患成功"
);
}).
catch
(()
=>
{});
},
taskChange
(
val
){
const
selectTask
=
this
.
taskData
.
find
(
item
=>
item
.
fUniqueCode
==
val
);
this
.
taskName
=
selectTask
.
fName
;
...
...
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