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 c3ec69f7
authored
Nov 24, 2023
by
刘鑫
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: 替换左联查 避免出现无用数据
1 parent
60b0fe7f
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
10 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 @
c3ec69f
...
...
@@ -28,11 +28,11 @@ public interface CapacityStatisticDao extends JpaRepository<CapacityTeamStatEnti
" ifnull(sum(cap_used),0)+ifnull(sum(cap_used_travel),0) as cap_used, "
+
" sum(a.cap_left) cap_left "
+
" FROM org_team ot "
+
"
LEFT
JOIN org_group og ON og.group_id = ot.group_id AND og.status = 1 "
+
"
LEFT
JOIN org_team_engineer ote ON ote.team_id = ot.team_id AND ot.status =1 AND ote.status =1 "
+
"
LEFT
JOIN capacity_engineer_stat a ON a.engineer_code = ote.engineer_code "
+
"
LEFT
JOIN v_engineer_skill v ON a.engineer_code = v.engineer_code "
+
"
LEFT
JOIN engineer_info z ON a.engineer_code = z.engineer_code AND z.bean_status = 1 "
+
"
INNER
JOIN org_group og ON og.group_id = ot.group_id AND og.status = 1 "
+
"
INNER
JOIN org_team_engineer ote ON ote.team_id = ot.team_id AND ot.status =1 AND ote.status =1 "
+
"
INNER
JOIN capacity_engineer_stat a ON a.engineer_code = ote.engineer_code "
+
"
INNER
JOIN v_engineer_skill v ON a.engineer_code = v.engineer_code "
+
"
INNER
JOIN engineer_info z ON a.engineer_code = z.engineer_code AND z.bean_status = 1 "
+
" WHERE ot.group_id= :groupId AND a.workday= :date "
+
" GROUP BY a.workday, v.layer_id, v.layer"
,
nativeQuery
=
true
)
List
<
Object
[]>
sumGroupCapacity
(
String
date
,
String
groupId
);
...
...
@@ -42,11 +42,11 @@ public interface CapacityStatisticDao extends JpaRepository<CapacityTeamStatEnti
" ifnull(sum(cap_used),0)+ifnull(sum(cap_used_travel),0) as cap_used, \n"
+
" sum(a.cap_left) cap_left \n"
+
" FROM org_team ot \n"
+
"
LEFT
JOIN org_group og ON og.group_id = ot.group_id AND og.status = 1\n"
+
"
LEFT
JOIN org_branch ob ON ob.branch_id = og.branch_id AND ob.status = 1\n"
+
"
LEFT
JOIN org_team_engineer ote ON ote.team_id = ot.team_id AND ot.status = 1 AND ote.status =1\n"
+
"
LEFT
JOIN capacity_engineer_stat a ON a.engineer_code = ote.engineer_code \n"
+
"
LEFT
JOIN v_engineer_skill v ON a.engineer_code = v.engineer_code\n"
+
"
INNER
JOIN org_group og ON og.group_id = ot.group_id AND og.status = 1\n"
+
"
INNER
JOIN org_branch ob ON ob.branch_id = og.branch_id AND ob.status = 1\n"
+
"
INNER
JOIN org_team_engineer ote ON ote.team_id = ot.team_id AND ot.status = 1 AND ote.status =1\n"
+
"
INNER
JOIN capacity_engineer_stat a ON a.engineer_code = ote.engineer_code \n"
+
"
INNER
JOIN v_engineer_skill v ON a.engineer_code = v.engineer_code\n"
+
" LEFT JOIN engineer_info z ON a.engineer_code = z.engineer_code AND z.bean_status = 1 \n"
+
" WHERE ot.branch_id = :branchId AND a.workday= :date \n"
+
" GROUP BY a.workday, v.layer_id, v.layer "
,
nativeQuery
=
true
)
...
...
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