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
e20393d3
Commit
e20393d3
authored
Aug 01, 2022
by
chenzhao
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'develop_dl_plan6_temp' of…
Merge branch 'develop_dl_plan6_temp' of
http://39.98.45.134:8090/moa/amos-boot-biz
into develop_dl_plan6_temp
parents
4ecfe049
8ec125fe
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
23 additions
and
21 deletions
+23
-21
PlanTaskServiceImpl.java
...mos/patrol/business/service/impl/PlanTaskServiceImpl.java
+2
-0
JobService.java
.../main/java/com/yeejoin/amos/patrol/quartz/JobService.java
+19
-19
dbTemplate_plan_task.xml
...rol/src/main/resources/db/mapper/dbTemplate_plan_task.xml
+2
-2
No files found.
amos-boot-module/amos-boot-module-biz/amos-boot-module-patrol-biz/src/main/java/com/yeejoin/amos/patrol/business/service/impl/PlanTaskServiceImpl.java
View file @
e20393d3
...
...
@@ -850,6 +850,8 @@ public class PlanTaskServiceImpl implements IPlanTaskService {
}
catch
(
Exception
e
)
{
log
.
error
(
e
.
getMessage
(),
e
);
throw
new
RuntimeException
(
e
.
getMessage
());
}
// return deptMap;
}
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-patrol-biz/src/main/java/com/yeejoin/amos/patrol/quartz/JobService.java
View file @
e20393d3
...
...
@@ -210,7 +210,7 @@ public class JobService implements IJobService {
Map
<
Long
,
Check
>
checkMap
=
new
HashMap
<>();
Set
<
Long
>
checkIds
=
new
HashSet
<
Long
>();
Map
<
String
,
String
>
deptMap
=
new
HashMap
<>();
Toke
toke
=
remoteSecurityService
.
getServerToken
();
//
Toke toke= remoteSecurityService.getServerToken();
//查询用户名字
//修改巡检p_plan_task orgcode为执行人的org_coed -- add by wujunkai 20201216
...
...
@@ -358,28 +358,28 @@ public class JobService implements IJobService {
SimpleDateFormat
sdf
=
new
SimpleDateFormat
(
"yyyy-MM-dd"
);
String
[]
ids
=
usrIds
.
split
(
","
);
for
(
String
userId
:
usrIds
.
split
(
","
))
{
Map
<
String
,
AgencyUserModel
>
agencyUserModelMap
=
remoteSecurityService
.
getUsersMap
(
toke
.
getToke
(),
toke
.
getProduct
(),
toke
.
getAppKey
(),
Collections
.
singleton
(
userIds
));
List
<
Map
<
String
,
String
>>
idOrgCodeList
=
new
ArrayList
<>();
for
(
Map
.
Entry
<
String
,
AgencyUserModel
>
entry
:
agencyUserModelMap
.
entrySet
()){
String
id
=
entry
.
getKey
();
AgencyUserModel
agencyUserModel
=
entry
.
getValue
();
StringBuffer
agencyUserOrgcode
=
new
StringBuffer
();
agencyUserModel
.
getCompanys
().
forEach
(
companyModel
->
{
agencyUserOrgcode
.
append
(
companyModel
.
getOrgCode
()).
append
(
","
);
});
Map
<
String
,
String
>
map
=
new
HashMap
<>();
map
.
put
(
id
,
agencyUserOrgcode
.
toString
().
substring
(
0
,
agencyUserOrgcode
.
length
()-
1
));
}
Map
<
String
,
String
>
userIdOrgCodeMap
=
new
HashMap
<>(
ids
.
length
);
if
(!
CollectionUtils
.
isEmpty
(
idOrgCodeList
))
{
userIdOrgCodeMap
=
idOrgCodeList
.
stream
().
collect
(
Collectors
.
toMap
(
x
->
String
.
valueOf
(
x
.
get
(
"id"
)),
x
->
x
.
get
(
"org_code"
)));
}
//
Map<String,AgencyUserModel> agencyUserModelMap = remoteSecurityService.getUsersMap(toke.getToke(),toke.getProduct(),toke.getAppKey(), Collections.singleton(userIds));
//
List<Map<String, String>> idOrgCodeList = new ArrayList<>();
//
for(Map.Entry<String, AgencyUserModel> entry : agencyUserModelMap.entrySet()){
//
String id = entry.getKey();
//
AgencyUserModel agencyUserModel = entry.getValue();
//
StringBuffer agencyUserOrgcode = new StringBuffer();
//
agencyUserModel.getCompanys().forEach(companyModel -> {
//
agencyUserOrgcode.append(companyModel.getOrgCode()).append(",");
//
});
//
Map<String,String> map = new HashMap<>();
//
map.put(id,agencyUserOrgcode.toString().substring(0,agencyUserOrgcode.length()-1));
//
}
//
Map<String, String> userIdOrgCodeMap = new HashMap<>(ids.length);
//
if (!CollectionUtils.isEmpty(idOrgCodeList)) {
//
userIdOrgCodeMap = idOrgCodeList.stream().collect(Collectors.toMap(x-> String.valueOf(x.get(
//
"id")), x->x.get("org_code")));
//
}
if
(
ObjectUtils
.
isEmpty
(
userId
))
{
continue
;
}
// planTaskMapper.reformStatistics(userId, sdf.format(new Date()), planTask.getOrgCode());
planTaskMapper
.
reformStatistics
(
userId
,
sdf
.
format
(
new
Date
()),
userIdOrgCodeMap
.
get
(
userId
));
planTaskMapper
.
reformStatistics
(
userId
,
sdf
.
format
(
new
Date
()),
planTask
.
getOrgCode
(
));
}
}
...
...
amos-boot-system-patrol/src/main/resources/db/mapper/dbTemplate_plan_task.xml
View file @
e20393d3
...
...
@@ -41,7 +41,7 @@
<if
test=
"orgCode!=null"
>
and (a.org_Code like concat (#{orgCode},"-%")or a.org_Code= #{orgCode})
</if>
<if
test=
"bizOrgCode!=null"
>
and
d.biz_org_code = #{bizOrgCode}
</if>
<if
test=
"bizOrgCode!=null"
>
and
a.org_Code like concat (#{bizOrgCode},"%")
</if>
</where>
...
...
@@ -118,7 +118,7 @@
<if
test=
"status!=null"
>
and b.is_finish = #{status}
</if>
<if
test=
"routeId!=null"
>
and a.route_id = #{routeId}
</if>
<if
test=
"planId!=null"
>
and a.plan_id = #{planId}
</if>
<if
test=
"bizOrgCode!=null"
>
and
d.biz_org_code = #{bizOrgCode}
</if>
<if
test=
"bizOrgCode!=null"
>
and
a.org_Code like concat (#{bizOrgCode},"%")
</if>
<if
test=
"orgCode!=null"
>
and (a.org_Code like concat (#{orgCode},"-%")or a.org_Code= #{orgCode})
</if>
...
...
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