Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
yangxiujun
/
paidan_demo
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit 085f1aea
authored
Nov 14, 2023
by
刘鑫
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: 容量返回类型支持根据分部配置返回
1 parent
53cbc50b
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
22 additions
and
2 deletions
project-order/src/main/java/com/dituhui/pea/order/entity/OrgBranchEntity.java
project-order/src/main/java/com/dituhui/pea/order/service/impl/CapacityQueryServiceImpl.java
project-order/src/main/java/com/dituhui/pea/order/entity/OrgBranchEntity.java
View file @
085f1ae
...
@@ -44,6 +44,12 @@ public class OrgBranchEntity {
...
@@ -44,6 +44,12 @@ public class OrgBranchEntity {
private
String
memo
;
private
String
memo
;
/**
* 容量类型,0:返回所有类型 1:只返全天, 2:返全天/半天
*/
@Column
(
name
=
"capacity_type"
,
nullable
=
false
)
private
Integer
capacityType
=
0
;
private
LocalDateTime
createTime
=
LocalDateTime
.
now
();
private
LocalDateTime
createTime
=
LocalDateTime
.
now
();
...
...
project-order/src/main/java/com/dituhui/pea/order/service/impl/CapacityQueryServiceImpl.java
View file @
085f1ae
...
@@ -15,6 +15,7 @@ import com.dituhui.pea.order.dao.EngineerInfoDao;
...
@@ -15,6 +15,7 @@ import com.dituhui.pea.order.dao.EngineerInfoDao;
import
com.dituhui.pea.order.dao.EngineerSkillDao
;
import
com.dituhui.pea.order.dao.EngineerSkillDao
;
import
com.dituhui.pea.order.dao.EngineerSliceUsedCapacityDao
;
import
com.dituhui.pea.order.dao.EngineerSliceUsedCapacityDao
;
import
com.dituhui.pea.order.dao.MapBlockInfoDao
;
import
com.dituhui.pea.order.dao.MapBlockInfoDao
;
import
com.dituhui.pea.order.dao.OrgBranchDao
;
import
com.dituhui.pea.order.dao.OrgTeamDao
;
import
com.dituhui.pea.order.dao.OrgTeamDao
;
import
com.dituhui.pea.order.dao.SkillInfoDao
;
import
com.dituhui.pea.order.dao.SkillInfoDao
;
import
com.dituhui.pea.order.dao.TimeSliceDao
;
import
com.dituhui.pea.order.dao.TimeSliceDao
;
...
@@ -26,6 +27,7 @@ import com.dituhui.pea.order.entity.CapacityEngineerStatEntity;
...
@@ -26,6 +27,7 @@ import com.dituhui.pea.order.entity.CapacityEngineerStatEntity;
import
com.dituhui.pea.order.entity.EngineerInfoEntity
;
import
com.dituhui.pea.order.entity.EngineerInfoEntity
;
import
com.dituhui.pea.order.entity.EngineerSkillEntity
;
import
com.dituhui.pea.order.entity.EngineerSkillEntity
;
import
com.dituhui.pea.order.entity.MapBlockInfoEntity
;
import
com.dituhui.pea.order.entity.MapBlockInfoEntity
;
import
com.dituhui.pea.order.entity.OrgBranchEntity
;
import
com.dituhui.pea.order.entity.OrgTeamEntity
;
import
com.dituhui.pea.order.entity.OrgTeamEntity
;
import
com.dituhui.pea.order.entity.SkillInfoEntity
;
import
com.dituhui.pea.order.entity.SkillInfoEntity
;
import
com.dituhui.pea.order.entity.TimeSliceEntity
;
import
com.dituhui.pea.order.entity.TimeSliceEntity
;
...
@@ -83,6 +85,8 @@ public class CapacityQueryServiceImpl implements CapacityQueryService {
...
@@ -83,6 +85,8 @@ public class CapacityQueryServiceImpl implements CapacityQueryService {
@Autowired
@Autowired
private
OrgTeamDao
orgTeamDao
;
private
OrgTeamDao
orgTeamDao
;
@Autowired
@Autowired
private
OrgBranchDao
orgBranchDao
;
@Autowired
ISaaSRemoteService
saasRemoteService
;
ISaaSRemoteService
saasRemoteService
;
@Autowired
@Autowired
...
@@ -125,7 +129,10 @@ public class CapacityQueryServiceImpl implements CapacityQueryService {
...
@@ -125,7 +129,10 @@ public class CapacityQueryServiceImpl implements CapacityQueryService {
.
collect
(
Collectors
.
toList
());
.
collect
(
Collectors
.
toList
());
List
<
String
>
groupList
=
mapBlockInBlockIdsList
.
stream
().
map
(
MapBlockInfoEntity:
:
getGroupId
).
distinct
()
List
<
String
>
groupList
=
mapBlockInBlockIdsList
.
stream
().
map
(
MapBlockInfoEntity:
:
getGroupId
).
distinct
()
.
collect
(
Collectors
.
toList
());
.
collect
(
Collectors
.
toList
());
List
<
String
>
branchList
=
mapBlockInBlockIdsList
.
stream
().
map
(
MapBlockInfoEntity:
:
getBranchId
).
distinct
()
.
collect
(
Collectors
.
toList
());
final
String
teamId
=
teamIdList
.
get
(
0
);
final
String
teamId
=
teamIdList
.
get
(
0
);
final
String
branchId
=
branchList
.
get
(
0
);
//3. 查询分站下拥有对应技能的工程师(排重) 技能码转换为对应的技能汉字
//3. 查询分站下拥有对应技能的工程师(排重) 技能码转换为对应的技能汉字
List
<
SkillInfoEntity
>
querySkillGroup
=
new
ArrayList
<>();
List
<
SkillInfoEntity
>
querySkillGroup
=
new
ArrayList
<>();
...
@@ -153,10 +160,17 @@ public class CapacityQueryServiceImpl implements CapacityQueryService {
...
@@ -153,10 +160,17 @@ public class CapacityQueryServiceImpl implements CapacityQueryService {
.
mapToInt
(
SkillInfoEntity:
:
getTakeTime
)
.
mapToInt
(
SkillInfoEntity:
:
getTakeTime
)
.
sum
();
.
sum
();
//查询单个工程师日期范围内的技能容量信息 后加和汇总
//查询单个工程师日期范围内的技能容量信息 后加和汇总
OrgBranchEntity
branchInfo
=
orgBranchDao
.
getByBranchId
(
branchId
);
CopyOnWriteArrayList
<
TimeSliceEntity
>
halfDayTypeTimeSlice
=
new
CopyOnWriteArrayList
<>(
timeSliceDao
.
findByType
(
"HALF_DAY"
));
CopyOnWriteArrayList
<
TimeSliceEntity
>
halfDayTypeTimeSlice
=
new
CopyOnWriteArrayList
<>(
timeSliceDao
.
findByType
(
"HALF_DAY"
));
CopyOnWriteArrayList
<
TimeSliceEntity
>
allDayTypeTimeSlice
=
new
CopyOnWriteArrayList
<>(
timeSliceDao
.
findByType
(
"ALL_DAY"
));
CopyOnWriteArrayList
<
TimeSliceEntity
>
allDayTypeTimeSlice
=
new
CopyOnWriteArrayList
<>();
if
(
branchInfo
.
getCapacityType
()
==
0
||
branchInfo
.
getCapacityType
()
==
2
)
{
allDayTypeTimeSlice
.
addAll
(
timeSliceDao
.
findByType
(
"ALL_DAY"
));
}
CopyOnWriteArrayList
<
TimeSliceEntity
>
timeSliceEntities
=
new
CopyOnWriteArrayList
<>();
if
(
branchInfo
.
getCapacityType
()
==
0
)
{
timeSliceEntities
.
addAll
(
getTimeSliceEntities
(
teamId
));
}
CopyOnWriteArrayList
<
TimeSliceEntity
>
timeSliceEntities
=
getTimeSliceEntities
(
teamId
);
//定义返回值
//定义返回值
CapacityQueryDTO
.
Result
result
=
new
CapacityQueryDTO
.
Result
();
CapacityQueryDTO
.
Result
result
=
new
CapacityQueryDTO
.
Result
();
result
.
setGroupId
(
groupList
.
get
(
0
));
result
.
setGroupId
(
groupList
.
get
(
0
));
...
...
Write
Preview
Markdown
is supported
Attach a file
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 post a comment