Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
A
attendance-performance-platform
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
赵啸非
attendance-performance-platform
Commits
09d52492
Commit
09d52492
authored
Jul 13, 2023
by
赵啸非
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
添加申诉统计业务
parent
d3f9ec47
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
51 additions
and
13 deletions
+51
-13
attendance-performance-manager/src/main/java/com/mortals/xhx/base/login/web/LoginController.java
.../java/com/mortals/xhx/base/login/web/LoginController.java
+24
-13
attendance-performance-manager/src/main/java/com/mortals/xhx/common/pdu/HomeStatInfo.java
...rc/main/java/com/mortals/xhx/common/pdu/HomeStatInfo.java
+27
-0
No files found.
attendance-performance-manager/src/main/java/com/mortals/xhx/base/login/web/LoginController.java
View file @
09d52492
...
...
@@ -21,6 +21,11 @@ import com.mortals.xhx.base.system.user.model.UserEntity;
import
com.mortals.xhx.base.system.user.service.UserService
;
import
com.mortals.xhx.base.system.valid.service.ValidCodeService
;
import
com.mortals.xhx.common.key.RedisKey
;
import
com.mortals.xhx.common.pdu.HomeStatInfo
;
import
com.mortals.xhx.module.dept.model.DeptQuery
;
import
com.mortals.xhx.module.dept.service.DeptService
;
import
com.mortals.xhx.module.staff.model.StaffQuery
;
import
com.mortals.xhx.module.staff.service.StaffService
;
import
lombok.extern.slf4j.Slf4j
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.util.ObjectUtils
;
...
...
@@ -30,6 +35,7 @@ import org.springframework.web.bind.annotation.RestController;
import
javax.servlet.http.HttpServletRequest
;
import
javax.servlet.http.HttpServletResponse
;
import
java.math.BigDecimal
;
import
java.util.List
;
import
java.util.Set
;
...
...
@@ -56,22 +62,15 @@ public class LoginController extends BaseCRUDJsonBodyMappingController<UserServi
@Autowired
private
IAuthTokenService
authTokenService
;
@Autowired
private
StaffService
staffService
;
@Autowired
private
DeptService
deptService
;
@RequestMapping
(
"login"
)
public
String
login
(
@RequestBody
LoginForm
loginForm
)
throws
Exception
{
/*
JSONObject ret = new JSONObject();
String loginName = loginForm.getLoginName();
String password = loginForm.getPassword();
UserPdu userPdu = new UserPdu();
userPdu.setLoginName(loginName);
userPdu.setPassword(password);
String resp = userFeign.portalLogin(userPdu);
return resp;
*/
JSONObject
ret
=
new
JSONObject
();
String
loginName
=
loginForm
.
getLoginName
();
String
password
=
loginForm
.
getPassword
();
...
...
@@ -149,8 +148,20 @@ public class LoginController extends BaseCRUDJsonBodyMappingController<UserServi
currUserName
=
"管理员"
;
}
JSONObject
data
=
new
JSONObject
();
String
token
=
authTokenService
.
getToken
(
request
);
HomeStatInfo
homeStatInfo
=
new
HomeStatInfo
();
int
totalPersonNum
=
staffService
.
count
(
new
StaffQuery
(),
this
.
getContext
());
homeStatInfo
.
setTotalPersonNum
(
totalPersonNum
);
int
totalDeptNum
=
deptService
.
count
(
new
DeptQuery
(),
getContext
());
homeStatInfo
.
setTotalDeptNum
(
totalDeptNum
);
//todo
homeStatInfo
.
setAttendRadio
(
new
BigDecimal
(
91.00
));
homeStatInfo
.
setLevealPersonNum
(
10
);
data
.
put
(
"homeStat"
,
homeStatInfo
);
data
.
put
(
"token"
,
token
);
data
.
put
(
"currUserName"
,
currUserName
);
data
.
put
(
"barList"
,
outlookBarList
);
...
...
attendance-performance-manager/src/main/java/com/mortals/xhx/common/pdu/HomeStatInfo.java
0 → 100644
View file @
09d52492
package
com.mortals.xhx.common.pdu
;
import
lombok.Data
;
import
java.math.BigDecimal
;
/**
* 首页统计
* @author:
* @date: 2023/7/13 15:09
*/
@Data
public
class
HomeStatInfo
{
private
Integer
totalPersonNum
;
private
Integer
totalDeptNum
;
private
Integer
attendPersonNum
;
private
BigDecimal
attendRadio
;
//请假人数
private
Integer
levealPersonNum
;
}
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