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 3ebb2dca
authored
Nov 23, 2023
by
刘鑫
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix(ID1004138):博西PEA_V1.0-容量:工程师列只需要回显已加入工作队的数量
1 parent
9b60af50
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
27 additions
and
27 deletions
project-order/src/main/java/com/dituhui/pea/order/dao/CapacityStatisticDao.java
project-order/src/main/java/com/dituhui/pea/order/dao/CapacityStatisticDao.java
View file @
3ebb2dc
...
@@ -15,41 +15,41 @@ public interface CapacityStatisticDao extends JpaRepository<CapacityTeamStatEnti
...
@@ -15,41 +15,41 @@ public interface CapacityStatisticDao extends JpaRepository<CapacityTeamStatEnti
" ifnull(sum(a.cap_total),0) cap_total, "
+
" ifnull(sum(a.cap_total),0) cap_total, "
+
" ifnull(sum(cap_used),0)+ifnull(sum(cap_used_travel),0) as cap_used, "
+
" ifnull(sum(cap_used),0)+ifnull(sum(cap_used_travel),0) as cap_used, "
+
" ifnull(sum(a.cap_left),0) cap_left"
+
" ifnull(sum(a.cap_left),0) cap_left"
+
" FROM capacity_engineer_stat a
\n
"
+
" FROM capacity_engineer_stat a
"
+
" INNER JOIN org_team_engineer b ON a.engineer_code=b.engineer_code AND b.status=1"
+
" INNER JOIN org_team_engineer b ON a.engineer_code=b.engineer_code AND b.status=1
"
+
" INNER JOIN v_engineer_skill v ON a.engineer_code = v.engineer_code"
+
" INNER JOIN v_engineer_skill v ON a.engineer_code = v.engineer_code"
+
" WHERE b.team_id= :teamId "
+
" WHERE b.team_id= :teamId "
+
" AND a.workday= :date"
+
" AND a.workday= :date"
+
" GROUP BY a.workday, v.layer_id, v.layer"
,
nativeQuery
=
true
)
" GROUP BY a.workday, v.layer_id, v.layer"
,
nativeQuery
=
true
)
List
<
Object
[]>
sumTeamCapacity
(
String
date
,
String
teamId
);
List
<
Object
[]>
sumTeamCapacity
(
String
date
,
String
teamId
);
@Query
(
value
=
"SELECT a.workday, "
+
@Query
(
value
=
"SELECT a.workday,
v.layer_id, v.layer, count(distinct a.engineer_code) engineer_count,
"
+
"
v.layer_id,
"
+
"
sum(a.cap_total) cap_total,
"
+
"
v.layer,
"
+
"
ifnull(sum(cap_used),0)+ifnull(sum(cap_used_travel),0) as cap_used,
"
+
"
count(distinct a.engineer_code) engineer_count,
"
+
"
sum(a.cap_left) cap_left
"
+
"
sum(a.cap_total) cap_total,
"
+
"
FROM org_team ot
"
+
"
ifnull(sum(cap_used),0)+ifnull(sum(cap_used_travel),0) as cap_used,
"
+
"
LEFT JOIN org_group og ON og.group_id = ot.group_id AND og.status = 1
"
+
"
sum(a.cap_left) cap_left\n
"
+
"
LEFT JOIN org_team_engineer ote ON ote.team_id = ot.team_id AND ot.status =1 AND ote.status =1
"
+
"
FROM capacity_engineer_stat a\n
"
+
"
LEFT JOIN capacity_engineer_stat a ON a.engineer_code = ote.engineer_code
"
+
"
JOIN v_engineer_skill v ON a.engineer_code = v.engineer_code\n
"
+
"
LEFT JOIN v_engineer_skill v ON a.engineer_code = v.engineer_code
"
+
"
JOIN engineer_info z ON a.engineer_code = z.engineer_code\n
"
+
"
LEFT JOIN engineer_info z ON a.engineer_code = z.engineer_code AND z.bean_status = 1
"
+
"
WHERE z.group_id= :groupId AND a.workday= :date \n
"
+
"
WHERE ot.group_id= :groupId AND a.workday= :date
"
+
"
GROUP BY a.workday, v.layer_id, v.layer;
"
,
nativeQuery
=
true
)
"
GROUP BY a.workday, v.layer_id, v.layer
"
,
nativeQuery
=
true
)
List
<
Object
[]>
sumGroupCapacity
(
String
date
,
String
groupId
);
List
<
Object
[]>
sumGroupCapacity
(
String
date
,
String
groupId
);
@Query
(
value
=
"
SELECT a.workday,
"
+
@Query
(
value
=
"
SELECT a.workday, v.layer_id, v.layer,count(distinct a.engineer_code) engineer_count, \n
"
+
"
v.layer_id,
"
+
"
sum(a.cap_total) cap_total, \n
"
+
"
v.layer,
"
+
"
ifnull(sum(cap_used),0)+ifnull(sum(cap_used_travel),0) as cap_used, \n
"
+
"
count(distinct a.engineer_code) engineer_count,
"
+
"
sum(a.cap_left) cap_left \n
"
+
"
sum(a.cap_total) cap_total,
"
+
"
FROM org_team ot \n
"
+
"
ifnull(sum(cap_used),0)+ifnull(sum(cap_used_travel),0) as cap_used,
"
+
"
LEFT JOIN org_group og ON og.group_id = ot.group_id AND og.status = 1\n
"
+
"
sum(a.cap_left) cap_left
\n"
+
"
LEFT JOIN org_branch ob ON ob.branch_id = og.branch_id AND ob.status = 1
\n"
+
"
FROM capacity_engineer_stat a
\n"
+
"
LEFT JOIN org_team_engineer ote ON ote.team_id = ot.team_id AND ot.status = 1 AND ote.status =1
\n"
+
"
JOIN v_engineer_skill v ON a.engineer_code = v.engineer_code
\n"
+
"
LEFT JOIN capacity_engineer_stat a ON a.engineer_code = ote.engineer_code
\n"
+
"
JOIN engineer_info z ON a.engineer_code = z
.engineer_code\n"
+
"
LEFT JOIN v_engineer_skill v ON a.engineer_code = v
.engineer_code\n"
+
"
JOIN org_group g ON z.group_id = g.group_id
\n"
+
"
LEFT JOIN engineer_info z ON a.engineer_code = z.engineer_code AND z.bean_status = 1
\n"
+
"
WHERE g.branch_id= :branchId AND a.workday= :date
\n"
+
"
WHERE ot.branch_id = :branchId AND a.workday= :date
\n"
+
"
GROUP BY a.workday, v.layer_id, v.layer;
"
,
nativeQuery
=
true
)
"
GROUP BY a.workday, v.layer_id, v.layer
"
,
nativeQuery
=
true
)
List
<
Object
[]>
sumBranchCapacity
(
String
date
,
String
branchId
);
List
<
Object
[]>
sumBranchCapacity
(
String
date
,
String
branchId
);
}
}
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