Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
H
Hgs
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
徐州
Hgs
Commits
99baf506
Commit
99baf506
authored
Jul 04, 2022
by
徐州
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改多城市排班问题
parent
f0dd2be8
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
83 additions
and
36 deletions
+83
-36
UserMapper.java
.../src/main/java/com/house365/ws/dao/mapper/UserMapper.java
+2
-0
StaffDuty.java
...src/main/java/com/house365/ws/service/impl/StaffDuty.java
+49
-36
UserMapper.xml
...-ws/src/main/resources/development/mybatis/UserMapper.xml
+8
-0
Customer.xml
...-hgs-ws/src/main/resources/production/ibatis/Customer.xml
+8
-0
UserMapper.xml
...s-ws/src/main/resources/production/mybatis/UserMapper.xml
+8
-0
UserMapper.xml
...365-hgs-ws/src/main/resources/test/mybatis/UserMapper.xml
+8
-0
No files found.
house365-hgs-ws/src/main/java/com/house365/ws/dao/mapper/UserMapper.java
View file @
99baf506
...
...
@@ -55,6 +55,8 @@ public interface UserMapper {
List
<
UserEntity
>
getDutyUserByCity
(
Map
<
String
,
Object
>
map
);
List
<
UserEntity
>
getDutyUserByCityAndOnDuty
(
String
cityCode
);
List
<
UserEntity
>
getUserByCity
(
Map
<
String
,
Object
>
map
);
void
deleteDutyById
(
Integer
userId
);
...
...
house365-hgs-ws/src/main/java/com/house365/ws/service/impl/StaffDuty.java
View file @
99baf506
...
...
@@ -107,7 +107,7 @@ public class StaffDuty implements IStaffDuty {
@Override
public
void
updateDutyStaff
()
{
System
.
out
.
println
(
"1122334411223344
"
);
// List<UserEntity> entities = usermapper.getDutyUserByCityAndOnDuty("nj
");
Map
<
String
,
Object
>
searchParams
=
new
HashMap
<>();
Page
page
=
new
Page
(
1000
);
DepartmentListRequest
listRequest
=
new
DepartmentListRequest
();
...
...
@@ -179,41 +179,54 @@ public class StaffDuty implements IStaffDuty {
Date
now
=
new
Date
();
for
(
String
city
:
cityList
)
{
//南京和其他城市区分
Map
<
String
,
Object
>
map
=
new
HashMap
<>(
5
);
if
(
"nj"
.
equals
(
city
))
{
map
.
put
(
"onduty"
,
1
);
List
<
DutyStaffEntity
>
list
=
usermapper
.
getDutyByCondition
(
map
);
if
(
CollectionUtils
.
isNotEmpty
(
list
))
{
DutyStaffEntity
staffEntity
=
list
.
get
(
0
);
//每天新增一个云迹活动
CloudActivityEntity
entity
=
new
CloudActivityEntity
();
String
name
=
"云迹数据"
+
date
;
entity
.
setName
(
name
);
entity
.
setCity
(
city
);
entity
.
setCreateId
(
Integer
.
valueOf
(
staffEntity
.
getUserId
()));
entity
.
setCreateName
(
staffEntity
.
getName
());
entity
.
setCreateTime
(
now
);
setData
(
entity
);
activityMapper
.
save
(
entity
);
}
}
else
{
map
.
put
(
"isDuty"
,
1
);
map
.
put
(
"city"
,
city
);
List
<
DutyStaffOtherEntity
>
dutyList
=
staffOtherMapper
.
queryByConditions
(
map
);
if
(
CollectionUtils
.
isNotEmpty
(
dutyList
))
{
DutyStaffOtherEntity
staffEntity
=
dutyList
.
get
(
0
);
//每天新增一个云迹活动
CloudActivityEntity
entity
=
new
CloudActivityEntity
();
String
name
=
"云迹数据"
+
date
;
entity
.
setName
(
name
);
entity
.
setCity
(
city
);
entity
.
setCreateId
(
staffEntity
.
getUserId
());
entity
.
setCreateName
(
staffEntity
.
getName
());
entity
.
setCreateTime
(
now
);
setData
(
entity
);
activityMapper
.
save
(
entity
);
}
}
List
<
UserEntity
>
entities
=
usermapper
.
getDutyUserByCityAndOnDuty
(
city
);
UserEntity
user
=
entities
.
get
(
0
);
//每天新增一个云迹活动
CloudActivityEntity
entity
=
new
CloudActivityEntity
();
String
name
=
"云迹数据"
+
date
;
entity
.
setName
(
name
);
entity
.
setCity
(
city
);
entity
.
setCreateId
(
entity
.
getId
());
entity
.
setCreateName
(
entity
.
getName
());
entity
.
setCreateTime
(
now
);
setData
(
entity
);
activityMapper
.
save
(
entity
);
// if ("nj".equals(city)) {
// map.put("onduty", 1);
// List<DutyStaffEntity> list = usermapper.getDutyByCondition(map);
// if (CollectionUtils.isNotEmpty(list)) {
// DutyStaffEntity staffEntity = list.get(0);
// //每天新增一个云迹活动
// CloudActivityEntity entity = new CloudActivityEntity();
// String name = "云迹数据" + date;
// entity.setName(name);
// entity.setCity(city);
// entity.setCreateId(Integer.valueOf(staffEntity.getUserId()));
// entity.setCreateName(staffEntity.getName());
// entity.setCreateTime(now);
// setData(entity);
// activityMapper.save(entity);
// }
// } else {
// map.put("isDuty", 1);
// map.put("city", city);
// List<DutyStaffOtherEntity> dutyList = staffOtherMapper.queryByConditions(map);
// if (CollectionUtils.isNotEmpty(dutyList)) {
// DutyStaffOtherEntity staffEntity = dutyList.get(0);
// //每天新增一个云迹活动
// CloudActivityEntity entity = new CloudActivityEntity();
// String name = "云迹数据" + date;
// entity.setName(name);
// entity.setCity(city);
// entity.setCreateId(staffEntity.getUserId());
// entity.setCreateName(staffEntity.getName());
// entity.setCreateTime(now);
// setData(entity);
// activityMapper.save(entity);
// }
// }
}
}
}
...
...
house365-hgs-ws/src/main/resources/development/mybatis/UserMapper.xml
View file @
99baf506
...
...
@@ -262,6 +262,14 @@
order by b.`order`
</select>
<select
id=
"getDutyUserByCityAndOnDuty"
resultMap=
"infoMap"
>
select a.id, a.realName
from user a
join `duty_staff` b on a.id = b.userId
where a.`deptUrlPath` REGEXP CONCAT('^', (select urlPath from `department` where `descripition` = #{cityCode}))
and b.onduty = 1
</select>
<select
id=
"getUserByCity"
resultMap=
"infoMap"
>
select a.id, a.realName,a.position
from user a
...
...
house365-hgs-ws/src/main/resources/production/ibatis/Customer.xml
View file @
99baf506
...
...
@@ -1547,6 +1547,14 @@
c.is_show_in_plat $searchFilters.isShowInPlat.operation$ #searchFilters.isShowInPlat.value#
]]>
</isNotEmpty>
<isNotEmpty
prepend=
"AND"
property=
"searchFilters.actSources"
>
<![CDATA[ c.act_source in ]]>
<iterate
prepend=
""
property=
"searchFilters.actSources.value"
close=
")"
open=
"("
conjunction=
","
>
<![CDATA[ #searchFilters.actSources.value[]# ]]>
</iterate>
</isNotEmpty>
<isNotEmpty
prepend=
"AND"
property=
"searchFilters.starCustomer"
>
<![CDATA[
starCustomer $searchFilters.starCustomer.operation$ #searchFilters.starCustomer.value#
...
...
house365-hgs-ws/src/main/resources/production/mybatis/UserMapper.xml
View file @
99baf506
...
...
@@ -262,6 +262,14 @@
order by b.`order`
</select>
<select
id=
"getDutyUserByCityAndOnDuty"
resultMap=
"infoMap"
>
select a.id, a.realName
from user a
join `duty_staff` b on a.id = b.userId
where a.`deptUrlPath` REGEXP CONCAT('^', (select urlPath from `department` where `descripition` = #{cityCode}))
and b.onduty = 1
</select>
<select
id=
"getUserByCity"
resultMap=
"infoMap"
>
select a.id, a.realName,a.position
from user a
...
...
house365-hgs-ws/src/main/resources/test/mybatis/UserMapper.xml
View file @
99baf506
...
...
@@ -262,6 +262,14 @@
order by b.`order`
</select>
<select
id=
"getDutyUserByCityAndOnDuty"
resultMap=
"infoMap"
>
select a.id, a.realName
from user a
join `duty_staff` b on a.id = b.userId
where a.`deptUrlPath` REGEXP CONCAT('^', (select urlPath from `department` where `descripition` = #{cityCode}))
and b.onduty = 1
</select>
<select
id=
"getUserByCity"
resultMap=
"infoMap"
>
select a.id, a.realName,a.position
from user a
...
...
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