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
a95a349f
Commit
a95a349f
authored
Apr 01, 2025
by
徐俊
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
xujun
parent
01ab93f3
Hide whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
241 additions
and
22 deletions
+241
-22
ComProjectAuditDAO.java
...main/java/com/yiboshi/science/dao/ComProjectAuditDAO.java
+2
-0
CommonEnum.java
...main/java/com/yiboshi/science/enumeration/CommonEnum.java
+5
-5
ComProjectAuditDTO.java
...ava/com/yiboshi/science/param/dto/ComProjectAuditDTO.java
+13
-0
ComTalentApplyDTO.java
...java/com/yiboshi/science/param/dto/ComTalentApplyDTO.java
+3
-0
ComProjectAuditController.java
...om/yiboshi/science/rest/v1/ComProjectAuditController.java
+20
-0
ComTalentApplyController.java
...com/yiboshi/science/rest/v1/ComTalentApplyController.java
+27
-3
ComProjectAuditService.java
...a/com/yiboshi/science/service/ComProjectAuditService.java
+6
-0
ComTalentApplyService.java
...va/com/yiboshi/science/service/ComTalentApplyService.java
+20
-0
ComBatchServiceImpl.java
...com/yiboshi/science/service/impl/ComBatchServiceImpl.java
+2
-2
ComProjectAuditServiceImpl.java
...oshi/science/service/impl/ComProjectAuditServiceImpl.java
+27
-3
ComTalentApplyServiceImpl.java
...boshi/science/service/impl/ComTalentApplyServiceImpl.java
+89
-9
ComProjectAuditDAO.xml
...ce-admin/src/main/resources/mapper/ComProjectAuditDAO.xml
+27
-0
No files found.
science-admin/src/main/java/com/yiboshi/science/dao/ComProjectAuditDAO.java
View file @
a95a349f
...
...
@@ -23,6 +23,7 @@ public interface ComProjectAuditDAO extends BaseMapper<ComProjectAudit>, BaseDAO
Page
<
ComProjectAuditDTO
>
getTaskAuditListByPage
(
Page
<
ComProjectAuditQueryVO
>
page
,
@Param
(
"ew"
)
Wrapper
<
ComProjectAuditQueryVO
>
queryWrapper
);
Page
<
ComProjectAuditDTO
>
getCheckAuditListByPage
(
Page
<
ComProjectAuditQueryVO
>
page
,
@Param
(
"ew"
)
Wrapper
<
ComProjectAuditQueryVO
>
queryWrapper
);
Page
<
ComProjectAuditDTO
>
getConclusionAuditListByPage
(
Page
<
ComProjectAuditQueryVO
>
page
,
@Param
(
"ew"
)
Wrapper
<
ComProjectAuditQueryVO
>
queryWrapper
);
Page
<
ComProjectAuditDTO
>
getTalentAuditListByPage
(
Page
<
ComProjectAuditQueryVO
>
page
,
@Param
(
"ew"
)
Wrapper
<
ComProjectAuditQueryVO
>
queryWrapper
);
Page
<
ComProjectAuditDTO
>
getListByPage
(
Page
<
ComProjectAuditQueryVO
>
page
,
@Param
(
"ew"
)
Wrapper
<
ComProjectAuditQueryVO
>
queryWrapper
);
Page
<
ComProjectAuditDTO
>
getProjectStatisticListByPage
(
Page
<
ComProjectAuditQueryVO
>
page
,
@Param
(
"ew"
)
Wrapper
<
ComProjectAuditQueryVO
>
queryWrapper
);
Page
<
ComProjectAuditDTO
>
getTaskStatisticListByPage
(
Page
<
ComProjectAuditQueryVO
>
page
,
@Param
(
"ew"
)
Wrapper
<
ComProjectAuditQueryVO
>
queryWrapper
);
...
...
@@ -31,6 +32,7 @@ public interface ComProjectAuditDAO extends BaseMapper<ComProjectAudit>, BaseDAO
int
getMaxAuditIndex
(
String
auditObjectId
);
DataStatisticsDTO
getCount
(
@Param
(
"ew"
)
Wrapper
<
ComProject
>
queryWrapper
);
DataStatisticsDTO
getConclusionAuditCount
(
@Param
(
"ew"
)
Wrapper
<
ComProject
>
queryWrapper
);
DataStatisticsDTO
getTalentAuditCount
(
@Param
(
"ew"
)
Wrapper
<
ComProject
>
queryWrapper
);
DataStatisticsDTO
getFirstAuditPassCount
(
@Param
(
"ew"
)
Wrapper
<
ComProject
>
queryWrapper
);
DataStatisticsDTO
getCountByDay
(
@Param
(
"ew"
)
Wrapper
<
ComProject
>
queryWrapper
);
DataStatisticsDTO
getAssignPersonCount
(
Integer
assignYear
,
Integer
projType
);
...
...
science-admin/src/main/java/com/yiboshi/science/enumeration/CommonEnum.java
View file @
a95a349f
...
...
@@ -376,12 +376,12 @@ public class CommonEnum {
public
enum
talentState
implements
INumberEnum
{
draft
(-
10
,
"起草"
),
waitSubmit
(
10
,
"待提交"
),
toAudit
(
20
,
"
评审
中"
),
toAudit
(
20
,
"
审核
中"
),
returnModify
(
30
,
"返回修改"
),
failed
(
40
,
"
未批准立项
"
),
pass
(
50
,
"
批准立项"
),
report
(
55
,
"结题上报"
),
conclusion
(
60
,
"已结题"
);
failed
(
40
,
"
审核不通过
"
),
pass
(
50
,
"
审核通过"
);
//
report(55, "结题上报"),
//
conclusion(60, "已结题");
talentState
(
int
number
,
String
description
)
{
this
.
code
=
number
;
this
.
description
=
description
;
...
...
science-admin/src/main/java/com/yiboshi/science/param/dto/ComProjectAuditDTO.java
View file @
a95a349f
...
...
@@ -73,6 +73,19 @@ public class ComProjectAuditDTO extends BaseDTO {
/** 审核人 */
@ApiModelProperty
(
value
=
"审核人"
,
position
=
10
)
private
String
personName
;
/** 性别 */
@ApiModelProperty
(
value
=
"性别"
,
position
=
10
)
private
String
sex
;
/** 职称名称 */
@ApiModelProperty
(
value
=
"职称名称"
,
position
=
13
)
private
String
titleName
;
/** 专业名称 */
@ApiModelProperty
(
value
=
"专业名称"
,
position
=
14
)
private
String
specName
;
/** 电话 */
@ApiModelProperty
(
value
=
"电话"
,
position
=
9
)
private
String
mobile
;
/** 项目Id */
@ApiModelProperty
(
value
=
"项目Id"
,
position
=
1
)
private
String
projId
;
...
...
science-admin/src/main/java/com/yiboshi/science/param/dto/ComTalentApplyDTO.java
View file @
a95a349f
...
...
@@ -209,4 +209,6 @@ public class ComTalentApplyDTO extends BaseDTO {
/** 附件列表 */
private
List
<
ComFileDTO
>
fileList
;
private
List
<
ComProjectAuditNoteDTO
>
auditList
;
}
\ No newline at end of file
science-admin/src/main/java/com/yiboshi/science/rest/v1/ComProjectAuditController.java
View file @
a95a349f
...
...
@@ -25,6 +25,9 @@ import org.springframework.web.bind.annotation.*;
import
java.util.Objects
;
import
static
com
.
yiboshi
.
science
.
utils
.
StringUtil
.
hideAllIdCardNum
;
import
static
com
.
yiboshi
.
science
.
utils
.
StringUtil
.
hideAllPhoneNum
;
/**
* 功能:审核表 接口
*
...
...
@@ -140,6 +143,10 @@ public class ComProjectAuditController extends BaseController<ComProjectAuditSer
Pagination
<
ComProjectAuditDTO
>
page
=
comProjectAuditService
.
getAuditListByPage
(
vo
);
if
(
null
!=
page
&&
null
!=
page
.
getDataList
()
&&
page
.
getDataList
().
size
()
!=
0
)
{
page
.
getDataList
().
forEach
((
e
)
->
{
if
(
null
!=
e
.
getCertId
())
e
.
setCertId
(
hideAllIdCardNum
(
e
.
getCertId
()));
if
(
null
!=
e
.
getMobile
())
e
.
setMobile
(
hideAllPhoneNum
(
e
.
getMobile
()));
if
(
null
!=
e
.
getAuditResult
())
e
.
setAuditResultName
(
CommonEnum
.
auditResult
.
getEnum
(
e
.
getAuditResult
()).
getDescription
());
if
(
vo
.
getAuditMethod
().
equals
(
CommonEnum
.
auditMethod
.
last
.
getCode
())){
...
...
@@ -176,6 +183,19 @@ public class ComProjectAuditController extends BaseController<ComProjectAuditSer
return
ResponseDataModel
.
ok
(
comProjectAuditService
.
getConclusionAuditCount
(
vo
));
}
/**
* 获取统计数据
*/
@ApiOperation
(
value
=
"获取统计数据"
,
httpMethod
=
"GET"
,
notes
=
"获取统计数据"
)
@GetMapping
@RequestMapping
(
"/getTalentAuditCount"
)
@PreAuthorize
(
"hasAnyRole('UNIT','GOV')"
)
public
ResponseDataModel
<
DataStatisticsDTO
>
getTalentAuditCount
(
ComProjectAuditQueryVO
vo
)
{
vo
.
setAuditUnitId
(
SecurityUserHolder
.
getUnitId
());
vo
.
setAuditMethod
(
CommonEnum
.
auditMethod
.
audit
.
getCode
());
return
ResponseDataModel
.
ok
(
comProjectAuditService
.
getTalentAuditCount
(
vo
));
}
/**
* 获取统计数据
*/
...
...
science-admin/src/main/java/com/yiboshi/science/rest/v1/ComTalentApplyController.java
View file @
a95a349f
...
...
@@ -7,7 +7,7 @@ import com.yiboshi.science.config.security.SecurityUserHolder;
import
com.yiboshi.science.entity.ComProjectAudit
;
import
com.yiboshi.science.entity.ComTalentApply
;
import
com.yiboshi.science.enumeration.CommonEnum
;
import
com.yiboshi.science.param.dto.ComProjectDTO
;
import
com.yiboshi.science.param.dto.ComProject
Audit
DTO
;
import
com.yiboshi.science.param.dto.ComTalentApplyDTO
;
import
com.yiboshi.science.param.dto.DataStatisticsDTO
;
import
com.yiboshi.science.param.query.ComTalentApplyQueryVO
;
...
...
@@ -114,12 +114,36 @@ public class ComTalentApplyController extends BaseController<ComTalentApplyServi
return
ResponseDataModel
.
ok
(
comTalentApplyService
.
delete
(
id
));
}
@ApiOperation
(
value
=
"
项目/任务书/中期考核表上报"
,
httpMethod
=
"POST"
,
notes
=
"项目/任务书/中期考核表
上报"
)
@ApiOperation
(
value
=
"
人才申报信息上报"
,
httpMethod
=
"POST"
,
notes
=
"人才申报信息
上报"
)
@PostMapping
@RequestMapping
(
"/report"
)
@Logs
(
value
=
CommonEnum
.
logType
.
talentApplyReport
)
public
ResponseDataModel
<
String
>
report
(
@Validated
@RequestBody
ComProjectAudit
comProjectAudit
)
{
com
Project
Service
.
report
(
comProjectAudit
,
SecurityUserHolder
.
getUnitId
(),
SecurityUserHolder
.
getUnitCode
());
com
TalentApply
Service
.
report
(
comProjectAudit
,
SecurityUserHolder
.
getUnitId
(),
SecurityUserHolder
.
getUnitCode
());
return
ResponseDataModel
.
ok
(
"上报成功"
);
}
/**
* 人才申报信息审核
*/
@ApiOperation
(
value
=
"人才申报信息审核"
,
httpMethod
=
"POST"
,
notes
=
"人才申报信息审核"
)
@PostMapping
@RequestMapping
(
"/audit"
)
@Logs
(
value
=
CommonEnum
.
logType
.
talentApplyAudit
)
public
ResponseDataModel
<
String
>
audit
(
@Validated
@RequestBody
ComProjectAuditDTO
comProjectAudit
,
BindingResult
bindingResult
)
{
comTalentApplyService
.
audit
(
comProjectAudit
,
SecurityUserHolder
.
getUnitId
(),
SecurityUserHolder
.
getUnitCode
());
return
ResponseDataModel
.
ok
(
"审核成功"
);
}
/**
* 人才申报信息审核
*/
@ApiOperation
(
value
=
"人才申报信息审核"
,
httpMethod
=
"POST"
,
notes
=
"人才申报信息审核"
)
@PostMapping
@RequestMapping
(
"/batchAudit"
)
@Logs
(
value
=
CommonEnum
.
logType
.
projectAudit
)
public
ResponseDataModel
<
String
>
batchAudit
(
@Validated
@RequestBody
ComProjectAuditDTO
comProjectAudit
,
BindingResult
bindingResult
)
{
comTalentApplyService
.
batchAudit
(
comProjectAudit
,
SecurityUserHolder
.
getUnitId
(),
SecurityUserHolder
.
getUnitCode
());
return
ResponseDataModel
.
ok
(
"审核成功"
);
}
}
science-admin/src/main/java/com/yiboshi/science/service/ComProjectAuditService.java
View file @
a95a349f
...
...
@@ -103,6 +103,12 @@ public interface ComProjectAuditService extends BaseService<ComProjectAuditQuery
* @return
*/
DataStatisticsDTO
getConclusionAuditCount
(
ComProjectAuditQueryVO
e
);
/**
* 获取统计数据
*
* @return
*/
DataStatisticsDTO
getTalentAuditCount
(
ComProjectAuditQueryVO
e
);
/**
* 根据审核对象获取对象实体
*
...
...
science-admin/src/main/java/com/yiboshi/science/service/ComTalentApplyService.java
View file @
a95a349f
package
com
.
yiboshi
.
science
.
service
;
import
com.yiboshi.science.base.BaseService
;
import
com.yiboshi.science.entity.ComProjectAudit
;
import
com.yiboshi.science.entity.ComTalentApply
;
import
com.yiboshi.science.param.dto.ComProjectAuditDTO
;
import
com.yiboshi.science.param.dto.ComTalentApplyDTO
;
import
com.yiboshi.science.param.dto.DataStatisticsDTO
;
import
com.yiboshi.science.param.query.ComTalentApplyQueryVO
;
...
...
@@ -29,4 +31,22 @@ public interface ComTalentApplyService extends BaseService<ComTalentApplyQueryVO
* @return
*/
String
delete
(
String
id
);
void
report
(
ComProjectAudit
model
,
String
unitId
,
String
treeCode
);
/**
* 人才申报信息审核
*
* @param e
* @return
*/
void
audit
(
ComProjectAuditDTO
e
,
String
auditUnitId
,
String
auditTreeCode
);
/**
* 人才申报信息审核(批量)
* @param dto
* @param auditUnitId
* @param auditTreeCode
*/
void
batchAudit
(
ComProjectAuditDTO
dto
,
String
auditUnitId
,
String
auditTreeCode
);
}
science-admin/src/main/java/com/yiboshi/science/service/impl/ComBatchServiceImpl.java
View file @
a95a349f
...
...
@@ -229,7 +229,7 @@ public class ComBatchServiceImpl extends BaseServiceImpl<ComBatchDAO, ComBatchQu
/**
* 获取当前申报或审核时间
* @param type 1:
项目申报时间 2:
审核时间
* @param type 1:
人才申报时间 2:人才申报
审核时间
* @return
*/
public
ComBatchDTO
getCurrentYearTalentBatch
(
int
type
)
{
...
...
@@ -241,7 +241,7 @@ public class ComBatchServiceImpl extends BaseServiceImpl<ComBatchDAO, ComBatchQu
comBatch
.
setDisabled
(
judgementDateTimeDisabled
(
date
,
comBatch
.
getReportStart
(),
comBatch
.
getReportEnd
()));
comBatch
.
setDescription
(
judgementDateTimeStr
(
date
,
comBatch
.
getReportStart
(),
comBatch
.
getReportEnd
(),
comBatch
.
getBatch
(),
comBatch
.
getYear
()));
break
;
case
2
:
// 审核时间
case
2
:
//
人才申报
审核时间
comBatch
.
setDisabled
(
judgementDateTimeDisabled
(
date
,
comBatch
.
getAuditStart
(),
comBatch
.
getAuditEnd
()));
comBatch
.
setDescription
(
judgementDateTimeStr
(
date
,
comBatch
.
getAuditStart
(),
comBatch
.
getAuditEnd
(),
comBatch
.
getBatch
(),
comBatch
.
getYear
()));
break
;
...
...
science-admin/src/main/java/com/yiboshi/science/service/impl/ComProjectAuditServiceImpl.java
View file @
a95a349f
...
...
@@ -90,6 +90,9 @@ public class ComProjectAuditServiceImpl extends BaseServiceImpl<ComProjectAuditD
if
(
Objects
.
nonNull
(
vo
.
getTreeCode
()))
{
criteria
.
and
(
qw
->
qw
.
eq
(
"d.tree_code"
,
vo
.
getTreeCode
()).
or
().
likeRight
(
"d.tree_code"
,
vo
.
getTreeCode
()));
}
if
(
Objects
.
nonNull
(
vo
.
getCertId
()))
{
criteria
.
like
(
"cert_id"
,
vo
.
getCertId
());
}
if
(
Objects
.
nonNull
(
vo
.
getAppPersonName
()))
{
criteria
.
like
(
"person_name"
,
vo
.
getAppPersonName
());
}
...
...
@@ -187,6 +190,9 @@ public class ComProjectAuditServiceImpl extends BaseServiceImpl<ComProjectAuditD
case
5
:
page
=
this
.
getConclusionAuditListByPage
(
vo
);
break
;
case
6
:
page
=
this
.
getTalentAuditListByPage
(
vo
);
break
;
default
:
break
;
}
...
...
@@ -267,10 +273,14 @@ public class ComProjectAuditServiceImpl extends BaseServiceImpl<ComProjectAuditD
}
}
else
{
// 获取上级单位
if
((
auditUnitTreeCode
.
length
()
/
properties
.
getDefaultCodeLength
())
>
3
)
{
upTreeCode
=
auditUnitTreeCode
.
substring
(
0
,
10
);
if
(
model
.
getAuditType
().
equals
(
CommonEnum
.
auditType
.
talent
.
getCode
()))
{
if
((
auditUnitTreeCode
.
length
()
/
properties
.
getDefaultCodeLength
())
>
3
)
{
upTreeCode
=
auditUnitTreeCode
.
substring
(
0
,
10
);
}
else
{
upTreeCode
=
auditUnitTreeCode
.
substring
(
0
,
auditUnitTreeCode
.
length
()
-
properties
.
getDefaultCodeLength
());
}
}
else
{
upTreeCode
=
auditUnitTreeCode
.
substring
(
0
,
auditUnitTreeCode
.
length
()
-
properties
.
getDefaultCodeLength
()
);
upTreeCode
=
auditUnitTreeCode
.
substring
(
0
,
5
);
}
unitLevel
=
upTreeCode
.
length
()
/
properties
.
getDefaultCodeLength
();
ComUnitDTO
unit
=
comUnitService
.
getByTreeCode
(
upTreeCode
);
...
...
@@ -372,6 +382,14 @@ public class ComProjectAuditServiceImpl extends BaseServiceImpl<ComProjectAuditD
return
new
Pagination
<>(
dtoList
,
page
.
getTotal
(),
vo
.
getPageSize
());
}
public
Pagination
<
ComProjectAuditDTO
>
getTalentAuditListByPage
(
ComProjectAuditQueryVO
vo
)
{
QueryWrapper
criteria
=
new
QueryWrapper
();
setCriteriaForQuery
(
vo
,
criteria
);
Page
<
ComProjectAuditQueryVO
>
page
=
new
Page
<>(
vo
.
getPageIndex
(),
vo
.
getPageSize
());
List
<
ComProjectAuditDTO
>
dtoList
=
comProjectAuditDAO
.
getTalentAuditListByPage
(
page
,
criteria
).
getRecords
();
return
new
Pagination
<>(
dtoList
,
page
.
getTotal
(),
vo
.
getPageSize
());
}
public
Pagination
<
ComProjectAuditDTO
>
getProjectStatisticListByPage
(
ComProjectAuditQueryVO
vo
)
{
QueryWrapper
criteria
=
new
QueryWrapper
();
vo
.
setAuditType
(
1
);
...
...
@@ -459,6 +477,12 @@ public class ComProjectAuditServiceImpl extends BaseServiceImpl<ComProjectAuditD
return
comProjectAuditDAO
.
getConclusionAuditCount
(
criteria
);
}
public
DataStatisticsDTO
getTalentAuditCount
(
ComProjectAuditQueryVO
e
)
{
QueryWrapper
criteria
=
new
QueryWrapper
();
this
.
setCriteriaForQuery
(
e
,
criteria
);
return
comProjectAuditDAO
.
getTalentAuditCount
(
criteria
);
}
public
DataStatisticsDTO
getCountByDay
(
ComProjectAuditQueryVO
e
)
{
QueryWrapper
criteria
=
new
QueryWrapper
();
this
.
setCriteriaForQuery
(
e
,
criteria
);
...
...
science-admin/src/main/java/com/yiboshi/science/service/impl/ComTalentApplyServiceImpl.java
View file @
a95a349f
...
...
@@ -7,9 +7,7 @@ import com.yiboshi.science.base.BaseServiceImpl;
import
com.yiboshi.science.base.Pagination
;
import
com.yiboshi.science.config.security.SecurityUserHolder
;
import
com.yiboshi.science.dao.ComTalentApplyDAO
;
import
com.yiboshi.science.entity.ComProject
;
import
com.yiboshi.science.entity.ComTalentApply
;
import
com.yiboshi.science.entity.SystemParameter
;
import
com.yiboshi.science.entity.*
;
import
com.yiboshi.science.enumeration.CommonEnum
;
import
com.yiboshi.science.param.dto.*
;
import
com.yiboshi.science.param.query.ComTalentApplyQueryVO
;
...
...
@@ -64,6 +62,15 @@ public class ComTalentApplyServiceImpl extends BaseServiceImpl<ComTalentApplyDAO
@Autowired
private
ComBatchService
comBatchService
;
@Autowired
private
ComProjectAuditService
comProjectAuditService
;
@Autowired
private
ComProjectAuditNoteService
comProjectAuditNoteService
;
@Autowired
private
ComUnitService
comUnitService
;
@Override
protected
void
setCriteriaForQuery
(
ComTalentApplyQueryVO
vo
,
QueryWrapper
<
ComTalentApplyQueryVO
>
criteria
)
{
if
(
Objects
.
nonNull
(
vo
.
getCertId
()))
{
...
...
@@ -92,18 +99,18 @@ public class ComTalentApplyServiceImpl extends BaseServiceImpl<ComTalentApplyDAO
criteria
.
in
(
"talent_state"
,
CommonEnum
.
talentState
.
toAudit
.
getCode
(),
CommonEnum
.
talentState
.
failed
.
getCode
(),
CommonEnum
.
talentState
.
pass
.
getCode
()
,
CommonEnum
.
talentState
.
report
.
getCode
(),
CommonEnum
.
talentState
.
conclusion
.
getCode
());
CommonEnum
.
talentState
.
pass
.
getCode
()
);
//
CommonEnum.talentState.report.getCode(),
//
CommonEnum.talentState.conclusion.getCode());
break
;
case
4
:
break
;
case
5
:
criteria
.
ge
(
"talent_state"
,
CommonEnum
.
talentState
.
pass
.
getCode
());
break
;
case
6
:
criteria
.
ge
(
"talent_state"
,
CommonEnum
.
talentState
.
report
.
getCode
());
break
;
//
case 6:
//
criteria.ge("talent_state", CommonEnum.talentState.report.getCode());
//
break;
default
:
criteria
.
eq
(
"talent_state"
,
vo
.
getTalentState
());
break
;
...
...
@@ -264,6 +271,10 @@ public class ComTalentApplyServiceImpl extends BaseServiceImpl<ComTalentApplyDAO
if
(
Objects
.
isNull
(
dto
.
getTotalFund
()))
dto
.
setTotalFund
(
new
BigDecimal
(
0.00
));
//审核记录列表
List
<
ComProjectAuditNoteDTO
>
auditList
=
comProjectAuditNoteService
.
getListByObjectId
(
dto
.
getId
());
dto
.
setAuditList
(
auditList
);
return
dto
;
}
...
...
@@ -439,4 +450,73 @@ public class ComTalentApplyServiceImpl extends BaseServiceImpl<ComTalentApplyDAO
this
.
deleteById
(
id
);
return
id
;
}
public
void
report
(
ComProjectAudit
model
,
String
unitId
,
String
treeCode
)
{
ComTalentApply
comTalentApply
=
this
.
entityById
(
model
.
getAuditObjectId
());
if
(
null
==
comTalentApply
)
throw
new
BusinessException
(
"人才申报记录不存在或已删除!"
);
if
(!
comTalentApply
.
getTalentState
().
equals
(
CommonEnum
.
talentState
.
waitSubmit
.
getCode
())
&&
!
comTalentApply
.
getTalentState
().
equals
(
CommonEnum
.
talentState
.
returnModify
.
getCode
()))
throw
new
BusinessException
(
"项目已上报!"
);
comProjectAuditService
.
report
(
comTalentApply
.
getReportYear
(),
model
.
getAuditObjectId
(),
model
.
getAuditType
(),
unitId
,
treeCode
);
// 更新人才申报记录状态
comTalentApply
.
setTalentState
(
CommonEnum
.
projState
.
toAudit
.
getCode
());
this
.
update
(
comTalentApply
);
}
@Transactional
public
void
audit
(
ComProjectAuditDTO
dto
,
String
auditUnitId
,
String
auditTreeCode
)
{
if
(
Objects
.
isNull
(
dto
.
getAuditObjectId
()))
throw
new
BusinessException
(
"参数缺失!"
);
this
.
talentAudit
(
dto
,
auditUnitId
,
auditTreeCode
);
}
@Transactional
public
void
batchAudit
(
ComProjectAuditDTO
dto
,
String
auditUnitId
,
String
auditTreeCode
)
{
if
(
null
!=
dto
.
getIdList
()
&&
dto
.
getIdList
().
size
()
>
0
)
{
dto
.
getIdList
().
forEach
((
f
)
->
{
dto
.
setId
(
f
);
this
.
talentAudit
(
dto
,
auditUnitId
,
auditTreeCode
);
});
}
else
{
throw
new
BusinessException
(
"未选择项目!"
);
}
}
@Transactional
public
void
talentAudit
(
ComProjectAuditDTO
dto
,
String
auditUnitId
,
String
auditTreeCode
)
{
ComProjectAudit
audit
=
comProjectAuditService
.
getById
(
dto
.
getId
());
if
(
null
==
audit
)
throw
new
BusinessException
(
"审核记录不存在!"
);
if
(!
audit
.
getAuditResult
().
equals
(
CommonEnum
.
auditResult
.
waitAudit
.
getCode
()))
throw
new
BusinessException
(
"所选人才申报记录已审核,请刷新列表后重新选择!"
);
ComTalentApply
model
=
this
.
getById
(
audit
.
getAuditObjectId
());
if
(
null
==
model
)
throw
new
BusinessException
(
"审核对象不存在!"
);
ComUnit
appUnit
=
comUnitService
.
getById
(
model
.
getAppUnitId
());
if
(
null
==
appUnit
)
throw
new
BusinessException
(
"申报单位不存在,或已删除!"
);
audit
.
setAuditResult
(
dto
.
getAuditResult
());
audit
.
setAuditContent
(
dto
.
getAuditContent
());
// 返回上级或下级单位Id, 最高级或个人返回 null
String
unitId
=
comProjectAuditService
.
audit
(
audit
,
appUnit
.
getTreeCode
(),
auditTreeCode
);
// 处理项目状态
Integer
talentState
=
null
;
String
projNo
=
null
;
if
(
audit
.
getAuditResult
().
equals
(
CommonEnum
.
auditResult
.
pass
.
getCode
()))
{
if
(
unitId
==
null
)
{
talentState
=
CommonEnum
.
talentState
.
pass
.
getCode
();
}
}
else
if
(
audit
.
getAuditResult
().
equals
(
CommonEnum
.
auditResult
.
returnModify
.
getCode
()))
{
if
(
unitId
==
null
)
talentState
=
CommonEnum
.
talentState
.
returnModify
.
getCode
();
}
else
{
talentState
=
CommonEnum
.
talentState
.
failed
.
getCode
();
}
// 更新人才申报记录状态
model
.
setTalentState
(
talentState
);
this
.
update
(
model
);
}
}
science-admin/src/main/resources/mapper/ComProjectAuditDAO.xml
View file @
a95a349f
...
...
@@ -90,6 +90,33 @@
${ew.sqlSegment}
</where>
</select>
<select
id=
"getTalentAuditListByPage"
resultType=
"com.yiboshi.science.param.dto.ComProjectAuditDTO"
>
SELECT
a.*,c.id talent_id,b.cert_id, b.person_name, b.sex, b.mobile, b.duty, b.title, b.spec, i.name as title_name, j.name as spec_name,
d.unit_name app_unit_name, (case when g.unit_name = d.unit_name then '直属' else REPLACE(g.unit_name,'卫生健康局','') end) as upUnitName
FROM com_project_audit a
left join com_talent_apply c on a.audit_object_id = c.id
left join com_person b on c.person_id = b.id
left join com_unit d on c.app_unit_id = d.id
left join com_unit g on substring(d.tree_code, 1, 10) = g.tree_code
left join system_parameter i on b.title = i.id and i.type_id = 7
left join system_parameter j on b.spec = j.id and j.type_id = 68
<where>
${ew.sqlSegment}
</where>
</select>
<select
id=
"getTalentAuditCount"
resultType=
"com.yiboshi.science.param.dto.DataStatisticsDTO"
>
SELECT ifnull(sum(case when a.audit_result=1 then 1 else 0 end),0) count1,
ifnull(sum(case when a.audit_result=10 then 1 else 0 end),0) count2,
ifnull(sum(case when a.audit_result =30 then 1 else 0 end),0) count3,
ifnull(sum(case when a.audit_result =20 then 1 else 0 end),0) count4,
ifnull(sum(case when a.id is not null then 1 else 0 end),0) count5
FROM com_project_audit a
left join com_talent_apply j on a.audit_object_id = j.id
<where>
${ew.sqlSegment}
</where>
</select>
<select
id=
"getMaxUnitLevelByObjectId"
parameterType=
"java.lang.String"
resultType=
"java.lang.Integer"
>
select max(unit_level) from com_project_audit where audit_object_id= #{objectId}
</select>
...
...
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