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
88200f8e
Commit
88200f8e
authored
Dec 18, 2024
by
wangxl
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
77
parent
25c789e0
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
42 additions
and
18 deletions
+42
-18
ComExpertDTO.java
...main/java/com/yiboshi/science/param/dto/ComExpertDTO.java
+6
-0
ComExpertController.java
...java/com/yiboshi/science/rest/v1/ComExpertController.java
+6
-1
ComExpertService.java
...in/java/com/yiboshi/science/service/ComExpertService.java
+1
-1
ComExpertServiceImpl.java
...om/yiboshi/science/service/impl/ComExpertServiceImpl.java
+17
-2
ComUnitServiceImpl.java
.../com/yiboshi/science/service/impl/ComUnitServiceImpl.java
+9
-12
ComExpertDAO.xml
science-admin/src/main/resources/mapper/ComExpertDAO.xml
+3
-2
No files found.
science-admin/src/main/java/com/yiboshi/science/param/dto/ComExpertDTO.java
View file @
88200f8e
...
@@ -75,6 +75,12 @@ public class ComExpertDTO extends BaseDTO {
...
@@ -75,6 +75,12 @@ public class ComExpertDTO extends BaseDTO {
/** 学位 */
/** 学位 */
@ApiModelProperty
(
value
=
"学位"
,
position
=
14
)
@ApiModelProperty
(
value
=
"学位"
,
position
=
14
)
private
String
degreeName
;
private
String
degreeName
;
/** 学历 */
@ApiModelProperty
(
value
=
"学历"
,
position
=
10
)
private
String
education
;
/** 学历 */
@ApiModelProperty
(
value
=
"学历"
,
position
=
35
)
private
String
educationName
;
/** 邮箱 */
/** 邮箱 */
@ApiModelProperty
(
value
=
"邮箱"
,
position
=
15
)
@ApiModelProperty
(
value
=
"邮箱"
,
position
=
15
)
private
String
email
;
private
String
email
;
...
...
science-admin/src/main/java/com/yiboshi/science/rest/v1/ComExpertController.java
View file @
88200f8e
...
@@ -167,7 +167,12 @@ public class ComExpertController extends BaseController<ComExpertService, ComExp
...
@@ -167,7 +167,12 @@ public class ComExpertController extends BaseController<ComExpertService, ComExp
@RequestMapping
(
"/expertImport"
)
@RequestMapping
(
"/expertImport"
)
@PostMapping
@PostMapping
public
ResponseDataModel
<
String
>
expertImport
(
@Validated
@RequestBody
List
<
ComExpertDTO
>
list
)
{
public
ResponseDataModel
<
String
>
expertImport
(
@Validated
@RequestBody
List
<
ComExpertDTO
>
list
)
{
return
ResponseDataModel
.
ok
(
comExpertService
.
expertImport
(
list
));
String
unitName
=
""
;
ComUnit
unit
=
comUnitService
.
getById
(
SecurityUserHolder
.
getUnitId
());
if
(
null
!=
unit
)
{
unitName
=
unit
.
getUnitName
();
}
return
ResponseDataModel
.
ok
(
comExpertService
.
expertImport
(
list
,
unitName
));
}
}
@ApiOperation
(
value
=
"验证证件号是否存在"
,
httpMethod
=
"GET"
,
notes
=
"验证证件号是否存在"
)
@ApiOperation
(
value
=
"验证证件号是否存在"
,
httpMethod
=
"GET"
,
notes
=
"验证证件号是否存在"
)
...
...
science-admin/src/main/java/com/yiboshi/science/service/ComExpertService.java
View file @
88200f8e
...
@@ -54,7 +54,7 @@ public interface ComExpertService extends BaseService<ComExpertQueryVO, ComExper
...
@@ -54,7 +54,7 @@ public interface ComExpertService extends BaseService<ComExpertQueryVO, ComExper
* @param list
* @param list
* @return
* @return
*/
*/
String
expertImport
(
List
<
ComExpertDTO
>
list
);
String
expertImport
(
List
<
ComExpertDTO
>
list
,
String
unitName
);
/**
/**
* 验证专家是否存在
* 验证专家是否存在
...
...
science-admin/src/main/java/com/yiboshi/science/service/impl/ComExpertServiceImpl.java
View file @
88200f8e
...
@@ -5,6 +5,7 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
...
@@ -5,6 +5,7 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import
com.yiboshi.arch.exception.BusinessException
;
import
com.yiboshi.arch.exception.BusinessException
;
import
com.yiboshi.science.base.BaseServiceImpl
;
import
com.yiboshi.science.base.BaseServiceImpl
;
import
com.yiboshi.science.base.Pagination
;
import
com.yiboshi.science.base.Pagination
;
import
com.yiboshi.science.config.security.SecurityUserHolder
;
import
com.yiboshi.science.dao.ComExpertDAO
;
import
com.yiboshi.science.dao.ComExpertDAO
;
import
com.yiboshi.science.entity.*
;
import
com.yiboshi.science.entity.*
;
import
com.yiboshi.science.enumeration.CommonEnum
;
import
com.yiboshi.science.enumeration.CommonEnum
;
...
@@ -191,12 +192,14 @@ public class ComExpertServiceImpl extends BaseServiceImpl<ComExpertDAO, ComExper
...
@@ -191,12 +192,14 @@ public class ComExpertServiceImpl extends BaseServiceImpl<ComExpertDAO, ComExper
return
id
;
return
id
;
}
}
public
String
expertImport
(
List
<
ComExpertDTO
>
list
)
{
public
String
expertImport
(
List
<
ComExpertDTO
>
list
,
String
unitName
)
{
try
{
try
{
//职称
//职称
List
<
SystemParameter
>
titleList
=
systemParameterService
.
getListByType
(
7
);
List
<
SystemParameter
>
titleList
=
systemParameterService
.
getListByType
(
7
);
//专业学科
//专业学科
List
<
SystemParameter
>
specList
=
systemParameterService
.
getListByType
(
68
);
List
<
SystemParameter
>
specList
=
systemParameterService
.
getListByType
(
68
);
//专业学科
List
<
SystemParameter
>
educationList
=
systemParameterService
.
getListByType
(
8
);
list
.
forEach
(
e
->
{
list
.
forEach
(
e
->
{
if
(
null
!=
comPersonService
.
getPersonByCertId
(
e
.
getCertId
()))
if
(
null
!=
comPersonService
.
getPersonByCertId
(
e
.
getCertId
()))
return
;
return
;
...
@@ -205,6 +208,11 @@ public class ComExpertServiceImpl extends BaseServiceImpl<ComExpertDAO, ComExper
...
@@ -205,6 +208,11 @@ public class ComExpertServiceImpl extends BaseServiceImpl<ComExpertDAO, ComExper
if
(
findList1
.
size
()
>
0
)
if
(
findList1
.
size
()
>
0
)
e
.
setTitle
(
findList1
.
stream
().
findFirst
().
get
().
getId
());
e
.
setTitle
(
findList1
.
stream
().
findFirst
().
get
().
getId
());
}
}
if
(
null
!=
e
.
getEducationName
())
{
List
<
SystemParameter
>
findList1
=
educationList
.
stream
().
filter
(
p
->
e
.
getEducationName
().
equals
(
p
.
getName
())).
collect
(
Collectors
.
toList
());
if
(
findList1
.
size
()
>
0
)
e
.
setEducation
(
findList1
.
stream
().
findFirst
().
get
().
getId
());
}
if
(
null
!=
e
.
getSpecName
())
{
if
(
null
!=
e
.
getSpecName
())
{
List
<
SystemParameter
>
findList2
=
specList
.
stream
().
filter
(
p
->
e
.
getSpecName
().
equals
(
p
.
getName
())).
collect
(
Collectors
.
toList
());
List
<
SystemParameter
>
findList2
=
specList
.
stream
().
filter
(
p
->
e
.
getSpecName
().
equals
(
p
.
getName
())).
collect
(
Collectors
.
toList
());
if
(
findList2
.
size
()
>
0
)
{
if
(
findList2
.
size
()
>
0
)
{
...
@@ -215,7 +223,14 @@ public class ComExpertServiceImpl extends BaseServiceImpl<ComExpertDAO, ComExper
...
@@ -215,7 +223,14 @@ public class ComExpertServiceImpl extends BaseServiceImpl<ComExpertDAO, ComExper
e
.
setSpecList
(
audtiSpecList
);
e
.
setSpecList
(
audtiSpecList
);
}
}
}
}
e
.
setWorkUnit
(
e
.
getUnitName
());
if
(
SecurityUserHolder
.
getRoles
().
contains
(
CommonEnum
.
systemRole
.
unit
.
getCode
().
toString
()))
{
e
.
setUnitId
(
SecurityUserHolder
.
getUnitId
());
e
.
setWorkUnit
(
unitName
);
e
.
setReportState
(
1
);
}
else
{
e
.
setWorkUnit
(
e
.
getUnitName
());
e
.
setReportState
(
2
);
}
insert
(
e
);
insert
(
e
);
});
});
return
"专家导入成功!"
;
return
"专家导入成功!"
;
...
...
science-admin/src/main/java/com/yiboshi/science/service/impl/ComUnitServiceImpl.java
View file @
88200f8e
...
@@ -197,18 +197,13 @@ public class ComUnitServiceImpl extends BaseServiceImpl<ComUnitDAO, ComUnitQuery
...
@@ -197,18 +197,13 @@ public class ComUnitServiceImpl extends BaseServiceImpl<ComUnitDAO, ComUnitQuery
}
}
@Transactional
@Transactional
public
String
audit
(
ComUnitDTO
unit
)
{
public
String
audit
(
ComUnitDTO
dto
)
{
ComUnit
comUnit
=
this
.
entityById
(
unit
.
getId
());
ComUnit
comUnit
=
this
.
entityById
(
dto
.
getId
());
if
(
comUnit
==
null
)
{
if
(
comUnit
==
null
||
Objects
.
isNull
(
comUnit
.
getAuditResult
()))
{
throw
new
BusinessException
(
"单位不存在或已删除"
);
throw
new
BusinessException
(
"单位不存在或当前状态不允许审核!"
);
}
if
(
null
==
comUnit
.
getAuditResult
())
{
throw
new
BusinessException
(
"单位状态不允许审核"
);
}
}
comUnit
=
this
.
convert2Entity
(
unit
);
comUnit
.
setUnitState
(
unit
.
getAuditResult
().
equals
(
10
)
?
CommonEnum
.
unitState
.
normal
.
getCode
()
:
CommonEnum
.
unitState
.
cancel
.
getCode
());
List
<
ComPersonDTO
>
list
=
comManagerService
.
getManagerListByUnitId
(
comUnit
.
getId
());
List
<
ComPersonDTO
>
list
=
comManagerService
.
getManagerListByUnitId
(
comUnit
.
getId
());
if
(
unit
.
getAuditResult
().
equals
(
10
))
{
if
(
dto
.
getAuditResult
().
equals
(
10
))
{
if
(
comUnit
.
getAuditResult
().
equals
(
1
))
{
if
(
comUnit
.
getAuditResult
().
equals
(
1
))
{
for
(
ComPersonDTO
e
:
list
)
{
for
(
ComPersonDTO
e
:
list
)
{
if
(
Objects
.
nonNull
(
e
.
getMobile
()))
{
if
(
Objects
.
nonNull
(
e
.
getMobile
()))
{
...
@@ -221,18 +216,20 @@ public class ComUnitServiceImpl extends BaseServiceImpl<ComUnitDAO, ComUnitQuery
...
@@ -221,18 +216,20 @@ public class ComUnitServiceImpl extends BaseServiceImpl<ComUnitDAO, ComUnitQuery
if
(
comUnit
.
getAuditResult
().
equals
(
1
))
{
if
(
comUnit
.
getAuditResult
().
equals
(
1
))
{
for
(
ComPersonDTO
e
:
list
)
{
for
(
ComPersonDTO
e
:
list
)
{
if
(
Objects
.
nonNull
(
e
.
getMobile
()))
{
if
(
Objects
.
nonNull
(
e
.
getMobile
()))
{
this
.
SMSSending
(
e
.
getMobile
(),
e
.
getPersonName
(),
properties
.
getSystemName
(),
"单位"
,
"审核不通过"
+
"("
+
unit
.
getAuditContent
()
+
")"
,
"请联系上级主管部门处理"
);
this
.
SMSSending
(
e
.
getMobile
(),
e
.
getPersonName
(),
properties
.
getSystemName
(),
"单位"
,
"审核不通过"
+
"("
+
dto
.
getAuditContent
()
+
")"
,
"请联系上级主管部门处理"
);
break
;
break
;
}
}
}
}
}
}
}
}
comUnit
=
this
.
convert2Entity
(
dto
);
comUnit
.
setUnitState
(
dto
.
getAuditResult
().
equals
(
10
)
?
CommonEnum
.
unitState
.
normal
.
getCode
()
:
CommonEnum
.
unitState
.
cancel
.
getCode
());
comUnit
.
setAuditDate
(
new
Date
());
comUnit
.
setAuditDate
(
new
Date
());
comUnit
.
setAuditPerson
(
SecurityUserHolder
.
getPersonId
());
comUnit
.
setAuditPerson
(
SecurityUserHolder
.
getPersonId
());
comUnit
.
setAuditUnit
(
SecurityUserHolder
.
getUnitId
());
comUnit
.
setAuditUnit
(
SecurityUserHolder
.
getUnitId
());
this
.
update
(
comUnit
);
this
.
update
(
comUnit
);
refreshRedis
();
refreshRedis
();
return
unit
.
getId
();
return
dto
.
getId
();
}
}
private
void
SMSSending
(
String
mobile
,
String
name
,
String
systemName
,
String
userType
,
String
result
,
String
message
)
{
private
void
SMSSending
(
String
mobile
,
String
name
,
String
systemName
,
String
userType
,
String
result
,
String
message
)
{
...
...
science-admin/src/main/resources/mapper/ComExpertDAO.xml
View file @
88200f8e
...
@@ -29,13 +29,14 @@
...
@@ -29,13 +29,14 @@
ORDER BY d.tree_code ASC
ORDER BY d.tree_code ASC
</select>
</select>
<select
id=
"getExpertById"
parameterType=
"java.lang.String"
resultType=
"com.yiboshi.science.param.dto.ComExpertDTO"
>
<select
id=
"getExpertById"
parameterType=
"java.lang.String"
resultType=
"com.yiboshi.science.param.dto.ComExpertDTO"
>
SELECT x.*,a.person_name,a.cert_id,a.sex,a.birthday,a.mobile,a.email,a.education,a.title,a.unit_id,a.work_unit
SELECT x.*,a.person_name,a.cert_id,a.sex,a.birthday,a.mobile,a.email,a.education,a.title,a.unit_id,a.work_unit
,a.degree
,b.tree_code,b.unit_name,d.name education_name,e.name title_name
,b.tree_code,b.unit_name,d.name education_name,e.name title_name
,f.name degree_name
FROM com_expert x
FROM com_expert x
LEFT JOIN com_person a ON x.person_id = a.id
LEFT JOIN com_person a ON x.person_id = a.id
LEFT JOIN com_unit b ON a.unit_id = b.id
LEFT JOIN com_unit b ON a.unit_id = b.id
left join system_parameter d on a.education=d.id and d.type_id=8
left join system_parameter d on a.education=d.id and d.type_id=8
left join system_parameter e on a.title=e.id and e.type_id=7
left join system_parameter e on a.title=e.id and e.type_id=7
left join system_parameter f on a.degree=f.id and f.type_id=9
where x.id = #{id}
where x.id = #{id}
</select>
</select>
<select
id=
"getExpertByCertId"
parameterType=
"java.lang.String"
resultType=
"com.yiboshi.science.param.dto.ComExpertDTO"
>
<select
id=
"getExpertByCertId"
parameterType=
"java.lang.String"
resultType=
"com.yiboshi.science.param.dto.ComExpertDTO"
>
...
...
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