Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
C
cloud-platform
Project
Project
Details
Activity
Releases
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
youjj
cloud-platform
Commits
ac7366d5
Commit
ac7366d5
authored
Dec 02, 2019
by
libin
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'staff-statistics' into dev
parents
bea2486a
b773e1c1
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
28 additions
and
7 deletions
+28
-7
StaffStatisticsFindDTO.java
...ub/wxiaoqi/security/admin/dto/StaffStatisticsFindDTO.java
+10
-0
AppUserDetailMapper.xml
...e-admin/src/main/resources/mapper/AppUserDetailMapper.xml
+18
-7
No files found.
ace-modules/ace-admin-api/src/main/java/com/github/wxiaoqi/security/admin/dto/StaffStatisticsFindDTO.java
View file @
ac7366d5
...
...
@@ -19,10 +19,20 @@ import java.util.List;
@NoArgsConstructor
public
class
StaffStatisticsFindDTO
extends
PageParam
{
private
Date
startDate
;
private
Long
startTime
;
private
Long
endTime
;
private
Date
endDate
;
private
String
companyName
;
private
String
postionName
;
private
Integer
userPostionId
;
private
Integer
companyId
;
private
List
<
Integer
>
userIds
;
public
Long
getStartTime
()
{
return
startDate
==
null
?
0
:
startDate
.
getTime
();
}
public
Long
getEndTime
()
{
return
endDate
==
null
?
0
:
endDate
.
getTime
();
}
}
ace-modules/ace-admin/src/main/resources/mapper/AppUserDetailMapper.xml
View file @
ac7366d5
...
...
@@ -282,33 +282,44 @@ from `app_user_detail` as `aud` left join `app_user_login` as `aul` on aul.id=
</if>
) as `saff`
left join (
select auswp.user_id, IFNULL(auswp.upIncome, 0) - IFNULL(auswd.dowIncome, 0) as `sellAmount`
from (select `user_id`, sum(
price
) as `upIncome`
from (select `user_id`, sum(
commission / (extract/100.0)
) as `upIncome`
from `app_user_selling_water`
where
<![CDATA[position_id<>6]]>
and status = 0
<if
test=
"startDate!=null and endDate!=null"
>
and `crt_time` between #{start
Date} and #{endDat
e}
and `crt_time` between #{start
Time} and #{endTim
e}
</if>
<if
test=
"startDate!=null and endDate==null"
>
and
<![CDATA[
`crt_time` >
=#{start
Dat
e}
`crt_time` >
=#{start
Tim
e}
]]>
</if>
<if
test=
"startDate==null and endDate!=null"
>
and
<![CDATA[
`crt_time` <=#{end
Dat
e}
`crt_time` <=#{end
Tim
e}
]]>
</if>
group by user_id) as auswp
left join (select `user_id`, sum(
price
) as `dowIncome`
left join (select `user_id`, sum(
commission / (extract/100.0)
) as `dowIncome`
from `app_user_selling_water`
where
<![CDATA[position_id<>6]]>
and status = 1
<if
test=
"startDate!=null and endDate!=null"
>
and `crt_time` between #{startTime} and #{endTime}
</if>
<if
test=
"startDate!=null and endDate==null"
>
and
<![CDATA[
`crt_time` >
=#{startTime}
]]>
</if>
<if
test=
"startDate==null and endDate!=null"
>
and
<![CDATA[
`crt_time` <=#{endTime}
]]>
</if>
group by user_id) as auswd
on auswd.user_id = auswp.user_id
) as `sell` on sell.user_id=saff.userId
order by sell.sellAmount desc
</select>
</mapper>
\ No newline at end of file
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