Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
Y
yn-health-science
Project
Project
Details
Activity
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
徐俊
yn-health-science
Commits
8bbf0eb2
Commit
8bbf0eb2
authored
Dec 05, 2024
by
wangxl
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
77
parent
60026cb7
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
33 additions
and
16 deletions
+33
-16
loginUser.java
...n/java/com/yiboshi/science/config/security/loginUser.java
+2
-0
AuthorizationController.java
.../com/yiboshi/science/rest/v1/AuthorizationController.java
+1
-10
ComPersonController.java
...java/com/yiboshi/science/rest/v1/ComPersonController.java
+10
-4
ComPersonService.java
...in/java/com/yiboshi/science/service/ComPersonService.java
+3
-0
ComPersonServiceImpl.java
...om/yiboshi/science/service/impl/ComPersonServiceImpl.java
+17
-2
No files found.
science-admin/src/main/java/com/yiboshi/science/config/security/loginUser.java
View file @
8bbf0eb2
...
@@ -18,4 +18,6 @@ public class loginUser implements Serializable {
...
@@ -18,4 +18,6 @@ public class loginUser implements Serializable {
private
String
type
;
private
String
type
;
/** 项目类型 1 申报科研项目 2申报重点学科项目 */
/** 项目类型 1 申报科研项目 2申报重点学科项目 */
private
String
projType
;
private
String
projType
;
/** 信息是否完整 */
private
boolean
complete
;
}
}
science-admin/src/main/java/com/yiboshi/science/rest/v1/AuthorizationController.java
View file @
8bbf0eb2
...
@@ -178,27 +178,18 @@ public class AuthorizationController {
...
@@ -178,27 +178,18 @@ public class AuthorizationController {
@RequestMapping
(
value
=
"/getUser"
)
@RequestMapping
(
value
=
"/getUser"
)
@GetMapping
@GetMapping
public
ResponseDataModel
<
Map
<
String
,
Object
>>
getUser
()
{
public
ResponseDataModel
<
Map
<
String
,
Object
>>
getUser
()
{
ComPerson
person
=
comPersonService
.
entityById
(
SecurityUserHolder
.
getPersonId
());
boolean
isComplete
=
true
;
if
(
null
!=
person
)
{
if
(
Objects
.
isNull
(
person
.
getNation
())
||
Objects
.
isNull
(
person
.
getTitle
())
||
Objects
.
isNull
(
person
.
getEducation
())
||
Objects
.
isNull
(
person
.
getSpec
())
||
Objects
.
isNull
(
person
.
getEmail
()))
{
isComplete
=
false
;
}
}
loginUser
user
=
new
loginUser
();
loginUser
user
=
new
loginUser
();
StringUtil
.
copyObj2Obj
(
SecurityUserHolder
.
getCurrentUser
(),
user
);
StringUtil
.
copyObj2Obj
(
SecurityUserHolder
.
getCurrentUser
(),
user
);
user
.
setType
(
systemSetService
.
getByKey
(
SystemSetKey
.
SysProjectType
));
user
.
setType
(
systemSetService
.
getByKey
(
SystemSetKey
.
SysProjectType
));
if
(!
user
.
getType
().
equals
(
"3"
)){
if
(!
user
.
getType
().
equals
(
"3"
)){
user
.
setProjType
(
systemSetService
.
getByKey
(
SystemSetKey
.
SysProjectType
));
user
.
setProjType
(
systemSetService
.
getByKey
(
SystemSetKey
.
SysProjectType
));
}
}
boolean
finalIsComplete
=
isComplete
;
user
.
setComplete
(
comPersonService
.
isComplete
(
SecurityUserHolder
.
getPersonId
()));
List
<
UserMenuDTO
>
menuList
=
systemMenuService
.
findByRoleId
(
SecurityUserHolder
.
getRoles
());
List
<
UserMenuDTO
>
menuList
=
systemMenuService
.
findByRoleId
(
SecurityUserHolder
.
getRoles
());
Map
<
String
,
Object
>
userInfo
=
new
HashMap
<
String
,
Object
>(
3
)
{
Map
<
String
,
Object
>
userInfo
=
new
HashMap
<
String
,
Object
>(
3
)
{
{
{
put
(
"userInfo"
,
user
);
put
(
"userInfo"
,
user
);
put
(
"menuList"
,
menuList
);
put
(
"menuList"
,
menuList
);
put
(
"isComplete"
,
finalIsComplete
);
}
}
};
};
return
ResponseDataModel
.
ok
(
userInfo
);
return
ResponseDataModel
.
ok
(
userInfo
);
...
...
science-admin/src/main/java/com/yiboshi/science/rest/v1/ComPersonController.java
View file @
8bbf0eb2
...
@@ -15,6 +15,7 @@ import com.yiboshi.science.service.ComPersonService;
...
@@ -15,6 +15,7 @@ import com.yiboshi.science.service.ComPersonService;
import
com.yiboshi.science.service.ComUnitService
;
import
com.yiboshi.science.service.ComUnitService
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
io.swagger.annotations.ApiOperation
;
import
org.apache.commons.lang.StringUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.security.access.prepost.PreAuthorize
;
import
org.springframework.security.access.prepost.PreAuthorize
;
import
org.springframework.validation.BindingResult
;
import
org.springframework.validation.BindingResult
;
...
@@ -176,10 +177,15 @@ public class ComPersonController extends BaseController<ComPersonService, ComPer
...
@@ -176,10 +177,15 @@ public class ComPersonController extends BaseController<ComPersonService, ComPer
public
ResponseDataModel
<
Map
<
String
,
Object
>>
getAppPersonInfo
()
{
public
ResponseDataModel
<
Map
<
String
,
Object
>>
getAppPersonInfo
()
{
boolean
isComplete
=
true
;
boolean
isComplete
=
true
;
ComPerson
comPerson
=
comPersonService
.
entityById
(
SecurityUserHolder
.
getPersonId
());
ComPerson
comPerson
=
comPersonService
.
entityById
(
SecurityUserHolder
.
getPersonId
());
if
(
null
!=
comPerson
)
{
if
(
null
==
comPerson
)
if
(
Objects
.
isNull
(
comPerson
.
getNation
())
||
Objects
.
isNull
(
comPerson
.
getTitle
())
||
Objects
.
isNull
(
comPerson
.
getEducation
())
||
Objects
.
isNull
(
comPerson
.
getSpec
())
||
Objects
.
isNull
(
comPerson
.
getEmail
()))
{
isComplete
=
false
;
isComplete
=
false
;
if
(
StringUtils
.
isEmpty
(
comPerson
.
getNation
())
||
}
StringUtils
.
isEmpty
(
comPerson
.
getTitle
())
||
StringUtils
.
isEmpty
(
comPerson
.
getDegree
())
||
StringUtils
.
isEmpty
(
comPerson
.
getEducation
())
||
StringUtils
.
isEmpty
(
comPerson
.
getSpec
())
||
StringUtils
.
isEmpty
(
comPerson
.
getEmail
()))
{
isComplete
=
false
;
}
}
boolean
finalComplete
=
isComplete
;
boolean
finalComplete
=
isComplete
;
Map
<
String
,
Object
>
data
=
new
HashMap
<
String
,
Object
>(
3
)
{
Map
<
String
,
Object
>
data
=
new
HashMap
<
String
,
Object
>(
3
)
{
...
...
science-admin/src/main/java/com/yiboshi/science/service/ComPersonService.java
View file @
8bbf0eb2
...
@@ -8,6 +8,7 @@ import com.yiboshi.science.param.dto.DataStatisticsDTO;
...
@@ -8,6 +8,7 @@ import com.yiboshi.science.param.dto.DataStatisticsDTO;
import
com.yiboshi.science.param.dto.UserImportDTO
;
import
com.yiboshi.science.param.dto.UserImportDTO
;
import
com.yiboshi.science.param.query.ComPersonQueryVO
;
import
com.yiboshi.science.param.query.ComPersonQueryVO
;
import
com.yiboshi.science.param.query.ComUnitQueryVO
;
import
com.yiboshi.science.param.query.ComUnitQueryVO
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
java.io.IOException
;
import
java.io.IOException
;
import
java.util.List
;
import
java.util.List
;
...
@@ -107,4 +108,6 @@ public interface ComPersonService extends BaseService<ComPersonQueryVO, ComPerso
...
@@ -107,4 +108,6 @@ public interface ComPersonService extends BaseService<ComPersonQueryVO, ComPerso
List
<
UserImportDTO
>
userImport
(
List
<
UserImportDTO
>
list
)
throws
IOException
;
List
<
UserImportDTO
>
userImport
(
List
<
UserImportDTO
>
list
)
throws
IOException
;
DataStatisticsDTO
getRegisterPersonCount
(
ComPersonQueryVO
v
);
DataStatisticsDTO
getRegisterPersonCount
(
ComPersonQueryVO
v
);
DataStatisticsDTO
getRegisterPersonCountByDay
(
ComPersonQueryVO
v
);
DataStatisticsDTO
getRegisterPersonCountByDay
(
ComPersonQueryVO
v
);
boolean
isComplete
(
String
id
);
}
}
science-admin/src/main/java/com/yiboshi/science/service/impl/ComPersonServiceImpl.java
View file @
8bbf0eb2
...
@@ -205,13 +205,13 @@ public class ComPersonServiceImpl extends BaseServiceImpl<ComPersonDAO, ComPerso
...
@@ -205,13 +205,13 @@ public class ComPersonServiceImpl extends BaseServiceImpl<ComPersonDAO, ComPerso
comPerson
.
setAuditResult
(
10
);
comPerson
.
setAuditResult
(
10
);
comPerson
.
setPersonState
(
1
);
comPerson
.
setPersonState
(
1
);
if
(
person
.
getAuditResult
().
equals
(
1
))
{
if
(
person
.
getAuditResult
().
equals
(
1
))
{
this
.
SMSSending
(
person
.
getMobile
(),
person
.
getPersonName
(),
properties
.
getSystemName
(),
"用户"
,
"已审核通过"
,
"请使用注册账户登录系统"
);
this
.
SMSSending
(
person
.
getMobile
(),
person
.
getPersonName
(),
properties
.
getSystemName
(),
"用户"
,
"已审核通过"
,
"请使用注册账户登录系统"
);
}
}
}
else
{
}
else
{
comPerson
.
setAuditResult
(
20
);
comPerson
.
setAuditResult
(
20
);
comPerson
.
setPersonState
(
2
);
comPerson
.
setPersonState
(
2
);
if
(
person
.
getAuditResult
().
equals
(
1
))
{
if
(
person
.
getAuditResult
().
equals
(
1
))
{
this
.
SMSSending
(
person
.
getMobile
(),
person
.
getPersonName
(),
properties
.
getSystemName
(),
"用户"
,
"审核不通过"
+
"("
+
dto
.
getAuditContent
()
+
")"
,
"请联系单位处理"
);
this
.
SMSSending
(
person
.
getMobile
(),
person
.
getPersonName
(),
properties
.
getSystemName
(),
"用户"
,
"审核不通过"
+
"("
+
dto
.
getAuditContent
()
+
")"
,
"请联系单位处理"
);
}
}
}
}
ComPersonDTO
d
=
this
.
getPersonById
(
dto
.
getId
());
ComPersonDTO
d
=
this
.
getPersonById
(
dto
.
getId
());
...
@@ -327,6 +327,21 @@ public class ComPersonServiceImpl extends BaseServiceImpl<ComPersonDAO, ComPerso
...
@@ -327,6 +327,21 @@ public class ComPersonServiceImpl extends BaseServiceImpl<ComPersonDAO, ComPerso
return
state
;
return
state
;
}
}
public
boolean
isComplete
(
String
id
)
{
ComPerson
person
=
this
.
getById
(
id
);
if
(
null
==
person
)
return
false
;
if
(
StringUtils
.
isEmpty
(
person
.
getNation
())
||
StringUtils
.
isEmpty
(
person
.
getTitle
())
||
StringUtils
.
isEmpty
(
person
.
getDegree
())
||
StringUtils
.
isEmpty
(
person
.
getEducation
())
||
StringUtils
.
isEmpty
(
person
.
getSpec
())
||
StringUtils
.
isEmpty
(
person
.
getEmail
()))
{
return
false
;
}
return
true
;
}
public
List
<
ComPersonDTO
>
getManagerListByUnitId
(
String
unitId
)
{
public
List
<
ComPersonDTO
>
getManagerListByUnitId
(
String
unitId
)
{
List
<
ComPersonDTO
>
list
=
comPersonDAO
.
getManagerListByUnitId
(
unitId
);
List
<
ComPersonDTO
>
list
=
comPersonDAO
.
getManagerListByUnitId
(
unitId
);
if
(
null
!=
list
&&
!
SecurityUserHolder
.
getRoles
().
contains
(
CommonEnum
.
systemRole
.
sys
.
getCode
().
toString
()))
{
if
(
null
!=
list
&&
!
SecurityUserHolder
.
getRoles
().
contains
(
CommonEnum
.
systemRole
.
sys
.
getCode
().
toString
()))
{
...
...
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