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
6e30fbdd
Commit
6e30fbdd
authored
Dec 27, 2024
by
wangxl
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1
parent
1a323c36
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
22 additions
and
39 deletions
+22
-39
ComExpertController.java
...java/com/yiboshi/science/rest/v1/ComExpertController.java
+0
-4
SystemUserController.java
...ava/com/yiboshi/science/rest/v1/SystemUserController.java
+0
-17
ComExpertServiceImpl.java
...om/yiboshi/science/service/impl/ComExpertServiceImpl.java
+22
-18
No files found.
science-admin/src/main/java/com/yiboshi/science/rest/v1/ComExpertController.java
View file @
6e30fbdd
...
...
@@ -58,8 +58,6 @@ public class ComExpertController extends BaseController<ComExpertService, ComExp
Pagination
<
ComExpertDTO
>
page
=
comExpertService
.
getListByPage
(
vo
);
if
(
null
!=
page
&&
null
!=
page
.
getDataList
()
&&
page
.
getDataList
().
size
()
!=
0
)
{
page
.
getDataList
().
forEach
((
e
)
->
{
// e.setCertId(hideAllIdCardNum(e.getCertId()));
// e.setMobile(hideAllPhoneNum(e.getMobile()));
e
.
setExpertStateName
(
CommonEnum
.
loginState
.
getEnum
(
e
.
getExpertState
()).
getDescription
());
List
<
ComExpertSpecDTO
>
ExpertSpecList
=
comExpertSpecService
.
getListByExpertId
(
e
.
getId
());
e
.
setSpecList
(
ExpertSpecList
);
...
...
@@ -96,7 +94,6 @@ public class ComExpertController extends BaseController<ComExpertService, ComExp
e
.
setSpecName
(
e
.
getSpecName
().
substring
(
0
,
e
.
getSpecName
().
length
()
-
1
));
});
}
return
ResponseDataModel
.
ok
(
page
);
}
...
...
@@ -109,7 +106,6 @@ public class ComExpertController extends BaseController<ComExpertService, ComExp
page
.
getDataList
().
forEach
((
e
)
->
{
// e.setCertId(hideAllIdCardNum(e.getCertId()));
// e.setMobile(concealAllPhoneNum(e.getMobile()));
// e.setExpertStateName(CommonEnum.ExpertState.getEnum(e.getExpertState()).getDescription());
e
.
setAssignInfo
(
ComProjectAssignService
.
getAssignCount
(
e
.
getId
()));
});
}
...
...
science-admin/src/main/java/com/yiboshi/science/rest/v1/SystemUserController.java
View file @
6e30fbdd
...
...
@@ -42,15 +42,9 @@ public class SystemUserController extends BaseController<SystemUserService, Syst
@Autowired
private
SystemUserRoleService
systemUserRoleService
;
@Autowired
private
ComProjectAssignService
comProjectAssignService
;
@Autowired
private
ComExpertService
comExpertService
;
@Autowired
private
ComExpertSpecService
comExpertSpecService
;
/**
* 功能:分页查询
*
...
...
@@ -112,17 +106,6 @@ public class SystemUserController extends BaseController<SystemUserService, Syst
for
(
String
e
:
roles
)
{
if
(!
r
.
contains
(
e
))
{
systemUserRoleService
.
deleteRoleByUserId
(
dto
.
getId
(),
e
);
// if (e.equals(CommonEnum.systemRole.expert.getCode().toString())) {
// ComExpert comExpert = new ComExpert();
// comExpert.setPersonId(user.getPersonId());
// comExpert = comExpertService.getEntity(comExpert);
// if (null != comExpert && !comProjectAssignService.isAssignByExpertId(comExpert.getId())) {
// comExpertService.deleteById(comExpert.getId());
// ComExpertSpec spec=new ComExpertSpec();
// spec.setExpertId(comExpert.getId());
// comExpertSpecService.delete(spec);
// }
// }
}
}
String
s
=
StringUtils
.
join
(
roles
.
toArray
(),
","
);
...
...
science-admin/src/main/java/com/yiboshi/science/service/impl/ComExpertServiceImpl.java
View file @
6e30fbdd
...
...
@@ -120,35 +120,32 @@ public class ComExpertServiceImpl extends BaseServiceImpl<ComExpertDAO, ComExper
public
String
insert
(
ComExpertDTO
dto
)
{
dto
.
setCertId
(
dto
.
getCertId
().
toLowerCase
());
ComPerson
comPerson
=
comPersonService
.
getPersonByCertId
(
dto
.
getCertId
());
ComExpert
comExpert
=
new
ComExpert
();
String
personId
=
""
;
if
(
comPerson
!=
null
)
{
personId
=
comPerson
.
getId
();
ComExpert
comExpert
=
new
ComExpert
();
comExpert
.
setPersonId
(
personId
);
comExpert
=
this
.
getEntity
(
comExpert
);
if
(
null
!=
comExpert
)
throw
new
BusinessException
(
"专家已存在!"
);
if
(!
dto
.
getPersonName
().
equals
(
comPerson
.
getPersonName
()))
throw
new
BusinessException
(
"该证件号已存在系统中,但姓名不一致,请检查!"
);
if
(!
dto
.
getMobile
().
equals
(
comPerson
.
getMobile
()))
throw
new
BusinessException
(
"该手机号已注册,请检查后再试!"
);
throw
new
BusinessException
(
"该证件号已存在系统中,但姓名不一致,请检查或联系管理员!"
);
StringUtil
.
copyObj2Obj
(
dto
,
comPerson
);
comPerson
.
setId
(
personId
);
comPersonService
.
update
ById
(
comPerson
);
comPersonService
.
update
(
comPerson
);
systemUserRoleService
.
addRoleByPersonId
(
personId
,
CommonEnum
.
systemRole
.
expert
.
getCode
().
toString
());
}
else
{
if
(
comPersonService
.
isMobileExist
(
dto
.
getMobile
()))
throw
new
BusinessException
(
"
该
手机号已注册,请检查后再试!"
);
throw
new
BusinessException
(
"手机号已注册,请检查后再试!"
);
comPerson
=
new
ComPerson
();
StringUtil
.
copyObj2Obj
(
dto
,
comPerson
);
comPerson
.
setPersonState
(
CommonEnum
.
personState
.
normal
.
getCode
());
personId
=
comPersonService
.
insert
(
comPerson
);
String
pwd
=
dto
.
getCertId
().
substring
(
dto
.
getCertId
().
length
()
-
6
).
toLowerCase
();
String
UserName
=
ChineseToPinyin
.
toPinyin
(
comPerson
.
getPersonName
());
String
pwd
=
dto
.
getCertId
().
substring
(
dto
.
getCertId
().
length
()
-
6
).
toLowerCase
();
systemUserService
.
CreateUser
(
UserName
,
pwd
,
personId
,
CommonEnum
.
systemRole
.
expert
.
getCode
().
toString
(),
CommonEnum
.
userState
.
normal
.
getCode
());
}
comExpert
=
new
ComExpert
();
ComExpert
comExpert
=
new
ComExpert
();
comExpert
.
setPersonId
(
personId
);
comExpert
.
setRemark
(
dto
.
getRemark
());
comExpert
.
setExpertState
(
CommonEnum
.
loginState
.
start
.
getCode
());
...
...
@@ -164,12 +161,6 @@ public class ComExpertServiceImpl extends BaseServiceImpl<ComExpertDAO, ComExper
ComExpert
comExpert
=
this
.
entityById
(
dto
.
getId
());
if
(
null
==
comExpert
)
throw
new
BusinessException
(
"专家不存在或已删除!"
);
ComPerson
comPerson
=
new
ComPerson
();
StringUtil
.
copyObj2Obj
(
dto
,
comPerson
);
comPerson
.
setId
(
comExpert
.
getPersonId
());
comPerson
.
setCertId
(
null
);
comPerson
.
setMobile
(
null
);
comExpert
=
new
ComExpert
();
comExpert
.
setId
(
dto
.
getId
());
comExpert
.
setRemark
(
dto
.
getRemark
());
...
...
@@ -177,7 +168,11 @@ public class ComExpertServiceImpl extends BaseServiceImpl<ComExpertDAO, ComExper
comExpert
.
setReportState
(
dto
.
getReportState
());
}
this
.
update
(
comExpert
);
ComPerson
comPerson
=
new
ComPerson
();
StringUtil
.
copyObj2Obj
(
dto
,
comPerson
);
comPerson
.
setId
(
comExpert
.
getPersonId
());
comPerson
.
setCertId
(
null
);
comPerson
.
setMobile
(
null
);
comPersonService
.
updateById
(
comPerson
);
comExpertSpecService
.
insertSpecList
(
dto
.
getSpecList
(),
dto
.
getId
());
return
dto
.
getId
();
...
...
@@ -190,8 +185,17 @@ public class ComExpertServiceImpl extends BaseServiceImpl<ComExpertDAO, ComExper
// comPersonService.deleteById(d.getId());
// systemUserService.deleteById(d.getId());
// if (e.equals(CommonEnum.systemRole.expert.getCode().toString())) {
// ComExpert comExpert = new ComExpert();
// comExpert.setPersonId(user.getPersonId());
// comExpert = comExpertService.getEntity(comExpert);
// if (null != comExpert && !comProjectAssignService.isAssignByExpertId(comExpert.getId())) {
// comExpertService.deleteById(comExpert.getId());
// ComExpertSpec spec=new ComExpertSpec();
// spec.setExpertId(comExpert.getId());
// comExpertSpecService.delete(spec);
// }
// }
if
(
null
==
d
.
getUserRoleId
())
throw
new
BusinessException
(
"系统限制,专家暂时不能删除!"
);
...
...
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