Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
amos-boot-biz
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
项目统一框架
amos-boot-biz
Commits
e96cb6f8
Commit
e96cb6f8
authored
Dec 14, 2022
by
DESKTOP-BQLVS7A\admin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
更新因没有区域代码显示,新增区域代码后更改task表unitId数据
parent
32c2cc96
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
25 additions
and
0 deletions
+25
-0
SuperviseRuleController.java
...ot/module/ugp/biz/controller/SuperviseRuleController.java
+25
-0
No files found.
amos-boot-system-ugp/amos-boot-module-ugp-biz/src/main/java/com/yeejoin/amos/boot/module/ugp/biz/controller/SuperviseRuleController.java
View file @
e96cb6f8
package
com
.
yeejoin
.
amos
.
boot
.
module
.
ugp
.
biz
.
controller
;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.yeejoin.amos.boot.module.common.api.entity.OrgUsr
;
import
com.yeejoin.amos.boot.module.common.biz.utils.CommonResponseUtil
;
import
com.yeejoin.amos.boot.module.ugp.api.entity.SuperviseRule
;
import
com.yeejoin.amos.boot.module.ugp.api.entity.Task
;
import
com.yeejoin.amos.boot.module.ugp.api.mapper.TaskMapper
;
import
com.yeejoin.amos.boot.module.ugp.biz.service.impl.OrgServiceImpl
;
import
com.yeejoin.amos.boot.module.ugp.biz.service.impl.TaskServiceImpl
;
import
com.yeejoin.amos.component.feign.model.FeignClientResult
;
import
com.yeejoin.amos.feign.systemctl.Systemctl
;
import
com.yeejoin.amos.feign.systemctl.model.RegionModel
;
...
...
@@ -51,6 +55,12 @@ public class SuperviseRuleController extends BaseController {
@Autowired
OrgServiceImpl
orgServiceImpl
;
@Autowired
TaskMapper
taskMapper
;
@Autowired
TaskServiceImpl
taskService
;
/**
* 新增监管区域规则表
*
...
...
@@ -72,6 +82,21 @@ public class SuperviseRuleController extends BaseController {
OrgUsr
orgUsr
=
orgServiceImpl
.
getOrgUsr
();
model
.
setCreateUnitId
(
orgUsr
.
getSequenceNbr
());
try
{
int
i
=
1
;
LambdaQueryWrapper
<
Task
>
wrapper
=
new
LambdaQueryWrapper
<>();
wrapper
.
eq
(
Task:
:
getUnitId
,
model
.
getAdminRegionCode
()).
orderByDesc
(
Task:
:
getSendTime
);
List
<
Task
>
taskLists
=
taskMapper
.
selectList
(
wrapper
);
for
(
Task
taskList
:
taskLists
){
if
(
i
%
2
==
0
){
taskList
.
setUnitId
(
model
.
getInspectionUnitId
());
}
else
{
taskList
.
setUnitId
(
model
.
getSuperviseDeptId
());
}
i
=++
i
;
taskService
.
saveOrUpdate
(
taskList
);
}
model
=
superviseRuleServiceImpl
.
createWithModel
(
model
);
}
catch
(
Exception
e
)
{
return
CommonResponseUtil
.
failure
(
"该区域已经有规则了,请勿重复添加"
);
...
...
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