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
888a648b
Commit
888a648b
authored
Dec 24, 2024
by
wangxl
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
77
parent
ca465a62
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
64 additions
and
33 deletions
+64
-33
ComProjectAuditDTO.java
...ava/com/yiboshi/science/param/dto/ComProjectAuditDTO.java
+3
-0
ComProjectController.java
...ava/com/yiboshi/science/rest/v1/ComProjectController.java
+13
-4
ComProjectService.java
...n/java/com/yiboshi/science/service/ComProjectService.java
+10
-1
ComProjectAuditServiceImpl.java
...oshi/science/service/impl/ComProjectAuditServiceImpl.java
+7
-20
ComProjectServiceImpl.java
...m/yiboshi/science/service/impl/ComProjectServiceImpl.java
+31
-8
No files found.
science-admin/src/main/java/com/yiboshi/science/param/dto/ComProjectAuditDTO.java
View file @
888a648b
...
@@ -184,4 +184,6 @@ public class ComProjectAuditDTO extends BaseDTO {
...
@@ -184,4 +184,6 @@ public class ComProjectAuditDTO extends BaseDTO {
private
String
auditResultName
;
private
String
auditResultName
;
/** 项目分配信息 */
/** 项目分配信息 */
List
<
ComProjectAssignDTO
>
assignList
;
List
<
ComProjectAssignDTO
>
assignList
;
/** 批量审核Id */
List
<
String
>
idList
;
}
}
\ No newline at end of file
science-admin/src/main/java/com/yiboshi/science/rest/v1/ComProjectController.java
View file @
888a648b
...
@@ -174,8 +174,6 @@ public class ComProjectController extends BaseController<ComProjectService, ComP
...
@@ -174,8 +174,6 @@ public class ComProjectController extends BaseController<ComProjectService, ComP
@RequestMapping
(
"/report"
)
@RequestMapping
(
"/report"
)
@Logs
(
value
=
CommonEnum
.
logType
.
projectReport
)
@Logs
(
value
=
CommonEnum
.
logType
.
projectReport
)
public
ResponseDataModel
<
String
>
report
(
@Validated
@RequestBody
ComProjectAudit
comProjectAudit
)
{
public
ResponseDataModel
<
String
>
report
(
@Validated
@RequestBody
ComProjectAudit
comProjectAudit
)
{
// if (!comProjectService.determineProjectReportCountLimit(comProjectAudit.getId()))
// return ResponseDataModel.ok("项目上报已经到达上限!");
comProjectService
.
report
(
comProjectAudit
,
SecurityUserHolder
.
getUnitId
(),
SecurityUserHolder
.
getUnitCode
());
comProjectService
.
report
(
comProjectAudit
,
SecurityUserHolder
.
getUnitId
(),
SecurityUserHolder
.
getUnitCode
());
return
ResponseDataModel
.
ok
(
"上报成功"
);
return
ResponseDataModel
.
ok
(
"上报成功"
);
}
}
...
@@ -187,12 +185,23 @@ public class ComProjectController extends BaseController<ComProjectService, ComP
...
@@ -187,12 +185,23 @@ public class ComProjectController extends BaseController<ComProjectService, ComP
@PostMapping
@PostMapping
@RequestMapping
(
"/audit"
)
@RequestMapping
(
"/audit"
)
@Logs
(
value
=
CommonEnum
.
logType
.
projectAudit
)
@Logs
(
value
=
CommonEnum
.
logType
.
projectAudit
)
public
ResponseDataModel
<
String
>
audit
(
@Validated
@RequestBody
ComProjectAudit
comProjectAudit
,
BindingResult
public
ResponseDataModel
<
String
>
audit
(
@Validated
@RequestBody
ComProjectAuditDTO
comProjectAudit
,
BindingResult
bindingResult
)
{
bindingResult
)
{
comProjectService
.
audit
(
comProjectAudit
,
SecurityUserHolder
.
getUnitId
(),
SecurityUserHolder
.
getUnitCode
());
comProjectService
.
audit
(
comProjectAudit
,
SecurityUserHolder
.
getUnitId
(),
SecurityUserHolder
.
getUnitCode
());
return
ResponseDataModel
.
ok
(
"审核成功"
);
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
)
{
comProjectService
.
batchAudit
(
comProjectAudit
,
SecurityUserHolder
.
getUnitId
(),
SecurityUserHolder
.
getUnitCode
());
return
ResponseDataModel
.
ok
(
"审核成功"
);
}
@ApiOperation
(
value
=
"获取项目状态"
,
httpMethod
=
"GET"
,
notes
=
"获取项目状态"
)
@ApiOperation
(
value
=
"获取项目状态"
,
httpMethod
=
"GET"
,
notes
=
"获取项目状态"
)
@GetMapping
@GetMapping
@RequestMapping
(
"/getProjStateList"
)
@RequestMapping
(
"/getProjStateList"
)
...
...
science-admin/src/main/java/com/yiboshi/science/service/ComProjectService.java
View file @
888a648b
...
@@ -4,6 +4,7 @@ package com.yiboshi.science.service;
...
@@ -4,6 +4,7 @@ package com.yiboshi.science.service;
import
com.yiboshi.science.base.BaseService
;
import
com.yiboshi.science.base.BaseService
;
import
com.yiboshi.science.entity.ComProject
;
import
com.yiboshi.science.entity.ComProject
;
import
com.yiboshi.science.entity.ComProjectAudit
;
import
com.yiboshi.science.entity.ComProjectAudit
;
import
com.yiboshi.science.param.dto.ComProjectAuditDTO
;
import
com.yiboshi.science.param.dto.ComProjectDTO
;
import
com.yiboshi.science.param.dto.ComProjectDTO
;
import
com.yiboshi.science.param.dto.DataStatisticsDTO
;
import
com.yiboshi.science.param.dto.DataStatisticsDTO
;
import
com.yiboshi.science.param.dto.ProjectImportDTO
;
import
com.yiboshi.science.param.dto.ProjectImportDTO
;
...
@@ -87,7 +88,15 @@ public interface ComProjectService extends BaseService<ComProjectQueryVO, ComPro
...
@@ -87,7 +88,15 @@ public interface ComProjectService extends BaseService<ComProjectQueryVO, ComPro
* @param e
* @param e
* @return
* @return
*/
*/
void
audit
(
ComProjectAudit
e
,
String
auditUnitId
,
String
auditTreeCode
);
void
audit
(
ComProjectAuditDTO
e
,
String
auditUnitId
,
String
auditTreeCode
);
/**
* 项目/任务书/中期考核审核
*
* @param e
* @return
*/
void
batchAudit
(
ComProjectAuditDTO
e
,
String
auditUnitId
,
String
auditTreeCode
);
/**
/**
* 获取统计数据
* 获取统计数据
...
...
science-admin/src/main/java/com/yiboshi/science/service/impl/ComProjectAuditServiceImpl.java
View file @
888a648b
...
@@ -225,15 +225,9 @@ public class ComProjectAuditServiceImpl extends BaseServiceImpl<ComProjectAuditD
...
@@ -225,15 +225,9 @@ public class ComProjectAuditServiceImpl extends BaseServiceImpl<ComProjectAuditD
comProjectAuditNoteService
.
insertAuditNote
(
reportYear
,
auditType
,
auditObjectId
,
CommonEnum
.
auditMethod
.
audit
.
getCode
(),
auditUnitId
,
null
,
CommonEnum
.
auditResult
.
waitAudit
.
getCode
(),
null
,
treeCode
.
length
()
/
properties
.
getDefaultCodeLength
(),
maxIndex
+
1
,
SecurityUserHolder
.
getPersonId
());
comProjectAuditNoteService
.
insertAuditNote
(
reportYear
,
auditType
,
auditObjectId
,
CommonEnum
.
auditMethod
.
audit
.
getCode
(),
auditUnitId
,
null
,
CommonEnum
.
auditResult
.
waitAudit
.
getCode
(),
null
,
treeCode
.
length
()
/
properties
.
getDefaultCodeLength
(),
maxIndex
+
1
,
SecurityUserHolder
.
getPersonId
());
}
}
public
String
audit
(
ComProjectAudit
comProjectAudit
,
String
reportTreeCode
,
String
auditUnitTreeCode
)
{
public
String
audit
(
ComProjectAudit
model
,
String
reportTreeCode
,
String
auditUnitTreeCode
)
{
ComProjectAudit
model
=
this
.
entityById
(
comProjectAudit
.
getId
());
if
(
null
==
model
)
throw
new
BusinessException
(
"审核记录不存在!"
);
if
(!
model
.
getAuditResult
().
equals
(
CommonEnum
.
auditResult
.
waitAudit
.
getCode
()))
throw
new
BusinessException
(
"项目已审核!"
);
//更新上报表
//更新上报表
this
.
updateAudit
(
model
.
getId
(),
comProjectAudit
.
getAuditResult
(),
comProjectAudit
.
getAuditContent
(),
null
,
SecurityUserHolder
.
getPersonId
(),
new
Date
(),
null
,
null
,
null
,
null
);
this
.
updateAudit
(
model
.
getId
(),
model
.
getAuditResult
(),
model
.
getAuditContent
(),
null
,
SecurityUserHolder
.
getPersonId
(),
new
Date
(),
null
,
null
,
null
,
null
);
// 定义常量
// 定义常量
Integer
reportYear
=
model
.
getReportYear
();
Integer
reportYear
=
model
.
getReportYear
();
Integer
auditType
=
model
.
getAuditType
();
Integer
auditType
=
model
.
getAuditType
();
...
@@ -247,13 +241,12 @@ public class ComProjectAuditServiceImpl extends BaseServiceImpl<ComProjectAuditD
...
@@ -247,13 +241,12 @@ public class ComProjectAuditServiceImpl extends BaseServiceImpl<ComProjectAuditD
if
(
null
==
comProjectAuditNote
)
if
(
null
==
comProjectAuditNote
)
throw
new
BusinessException
(
"审核记录不存在!"
);
throw
new
BusinessException
(
"审核记录不存在!"
);
//更新审核记录表
//更新审核记录表
comProjectAuditNoteService
.
updateAuditNote
(
comProjectAuditNote
.
getId
(),
comProjectAudit
.
getAuditResult
(),
comProjectAudit
.
getAuditContent
(),
null
,
SecurityUserHolder
.
getPersonId
(),
new
Date
(),
null
,
null
,
null
,
null
);
comProjectAuditNoteService
.
updateAuditNote
(
comProjectAuditNote
.
getId
(),
model
.
getAuditResult
(),
model
.
getAuditContent
(),
null
,
SecurityUserHolder
.
getPersonId
(),
new
Date
(),
null
,
null
,
null
,
null
);
// 返回上级或下级单位Id,最高级或个人返回 null
// 返回上级或下级单位Id,最高级或个人返回 null
String
unitId
=
null
;
String
unitId
=
null
;
String
upTreeCode
=
null
;
String
upTreeCode
=
null
;
// 审核通过
// 审核通过
if
(
comProjectAudit
.
getAuditResult
().
equals
(
CommonEnum
.
auditResult
.
pass
.
getCode
()))
{
if
(
model
.
getAuditResult
().
equals
(
CommonEnum
.
auditResult
.
pass
.
getCode
()))
{
if
(
unitLevel
.
equals
(
1
))
{
if
(
unitLevel
.
equals
(
1
))
{
if
(
auditMethod
.
equals
(
CommonEnum
.
auditMethod
.
audit
.
getCode
()))
{
if
(
auditMethod
.
equals
(
CommonEnum
.
auditMethod
.
audit
.
getCode
()))
{
// 查询上级单位上报记录
// 查询上级单位上报记录
...
@@ -280,15 +273,7 @@ public class ComProjectAuditServiceImpl extends BaseServiceImpl<ComProjectAuditD
...
@@ -280,15 +273,7 @@ public class ComProjectAuditServiceImpl extends BaseServiceImpl<ComProjectAuditD
ComUnitDTO
unit
=
comUnitService
.
getByTreeCode
(
upTreeCode
);
ComUnitDTO
unit
=
comUnitService
.
getByTreeCode
(
upTreeCode
);
if
(
null
==
unit
)
if
(
null
==
unit
)
throw
new
BusinessException
(
"未找到上级单位,请联系系统管理员处理!"
);
throw
new
BusinessException
(
"未找到上级单位,请联系系统管理员处理!"
);
int
method
=
CommonEnum
.
auditMethod
.
audit
.
getCode
();
int
method
=
CommonEnum
.
auditMethod
.
audit
.
getCode
();
// if (projType.equals(CommonEnum.projType.num.getCode()) && unit.getTreeCode().length() == properties.getDefaultCodeLength()) {
// method = CommonEnum.auditMethod.last.getCode();
// // 设置项目分组
// //comProjectGroupService.processProjectGroup(comProjectAudit.getAuditObjectId());
// }
// 查询上级单位上报记录
// 查询上级单位上报记录
ComProjectAudit
auditNote
=
this
.
getAudit
(
auditObjectId
,
unit
.
getId
(),
auditType
,
method
,
null
);
ComProjectAudit
auditNote
=
this
.
getAudit
(
auditObjectId
,
unit
.
getId
(),
auditType
,
method
,
null
);
if
(
null
!=
auditNote
)
{
if
(
null
!=
auditNote
)
{
...
@@ -304,14 +289,16 @@ public class ComProjectAuditServiceImpl extends BaseServiceImpl<ComProjectAuditD
...
@@ -304,14 +289,16 @@ public class ComProjectAuditServiceImpl extends BaseServiceImpl<ComProjectAuditD
}
}
}
}
//返回修改
//返回修改
else
if
(
comProjectAudit
.
getAuditResult
().
equals
(
CommonEnum
.
auditResult
.
returnModify
.
getCode
()))
{
else
if
(
model
.
getAuditResult
().
equals
(
CommonEnum
.
auditResult
.
returnModify
.
getCode
()))
{
if
(
auditMethod
.
equals
(
CommonEnum
.
auditMethod
.
last
.
getCode
()))
if
(
auditMethod
.
equals
(
CommonEnum
.
auditMethod
.
last
.
getCode
()))
throw
new
BusinessException
(
"终审项目不能返回修改!"
);
throw
new
BusinessException
(
"终审项目不能返回修改!"
);
unitLevel
=
unitLevel
+
1
;
unitLevel
=
unitLevel
+
1
;
// 跳过县级行政机构
// 跳过县级行政机构
if
(
reportTreeCode
.
length
()
/
properties
.
getDefaultCodeLength
()
>
3
&&
auditUnitTreeCode
.
length
()
/
properties
.
getDefaultCodeLength
()
==
2
)
{
if
(
reportTreeCode
.
length
()
/
properties
.
getDefaultCodeLength
()
>
3
&&
auditUnitTreeCode
.
length
()
/
properties
.
getDefaultCodeLength
()
==
2
)
{
unitLevel
=
comProjectAuditDAO
.
getMaxUnitLevelByObjectId
(
model
.
getAuditObjectId
());
unitLevel
=
comProjectAuditDAO
.
getMaxUnitLevelByObjectId
(
model
.
getAuditObjectId
());
}
}
//更新上报表
//更新上报表
ComProjectAudit
auditNote
=
this
.
getAudit
(
auditObjectId
,
null
,
auditType
,
CommonEnum
.
auditMethod
.
audit
.
getCode
(),
unitLevel
);
ComProjectAudit
auditNote
=
this
.
getAudit
(
auditObjectId
,
null
,
auditType
,
CommonEnum
.
auditMethod
.
audit
.
getCode
(),
unitLevel
);
if
(
null
!=
auditNote
)
{
if
(
null
!=
auditNote
)
{
...
...
science-admin/src/main/java/com/yiboshi/science/service/impl/ComProjectServiceImpl.java
View file @
888a648b
...
@@ -593,31 +593,54 @@ public class ComProjectServiceImpl extends BaseServiceImpl<ComProjectDAO, ComPro
...
@@ -593,31 +593,54 @@ public class ComProjectServiceImpl extends BaseServiceImpl<ComProjectDAO, ComPro
}
}
@Transactional
@Transactional
public
void
audit
(
ComProjectAudit
report
,
String
auditUnitId
,
String
auditTreeCode
)
{
public
void
audit
(
ComProjectAudit
DTO
dto
,
String
auditUnitId
,
String
auditTreeCode
)
{
if
(
Objects
.
isNull
(
report
.
getAuditObjectId
()))
if
(
Objects
.
isNull
(
dto
.
getAuditObjectId
()))
throw
new
BusinessException
(
"参数缺失!"
);
throw
new
BusinessException
(
"参数缺失!"
);
ComProject
model
=
this
.
getById
(
report
.
getAuditObjectId
());
this
.
projAudit
(
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
.
projAudit
(
dto
,
auditUnitId
,
auditTreeCode
);
});
}
else
{
throw
new
BusinessException
(
"未选择项目!"
);
}
}
@Transactional
public
void
projAudit
(
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
(
"所选项目已审核,请刷新列表后重新选择!"
);
ComProject
model
=
this
.
getById
(
audit
.
getAuditObjectId
());
if
(
null
==
model
)
if
(
null
==
model
)
throw
new
BusinessException
(
"审核对象不存在!"
);
throw
new
BusinessException
(
"审核对象不存在!"
);
ComUnit
appUnit
=
comUnitService
.
getById
(
model
.
getAppUnitId
());
ComUnit
appUnit
=
comUnitService
.
getById
(
model
.
getAppUnitId
());
if
(
null
==
appUnit
)
if
(
null
==
appUnit
)
throw
new
BusinessException
(
"申报单位不存在,或已删除!"
);
throw
new
BusinessException
(
"申报单位不存在,或已删除!"
);
audit
.
setAuditResult
(
dto
.
getAuditResult
());
audit
.
setAuditContent
(
dto
.
getAuditContent
());
// 返回上级或下级单位Id, 最高级或个人返回 null
// 返回上级或下级单位Id, 最高级或个人返回 null
String
unitId
=
comProjectAuditService
.
audit
(
report
,
appUnit
.
getTreeCode
(),
auditTreeCode
);
String
unitId
=
comProjectAuditService
.
audit
(
audit
,
appUnit
.
getTreeCode
(),
auditTreeCode
);
// 处理项目状态
// 处理项目状态
Integer
projState
=
null
;
Integer
projState
=
null
;
if
(
repor
t
.
getAuditResult
().
equals
(
CommonEnum
.
auditResult
.
pass
.
getCode
()))
{
if
(
audi
t
.
getAuditResult
().
equals
(
CommonEnum
.
auditResult
.
pass
.
getCode
()))
{
if
(
unitId
==
null
)
if
(
unitId
==
null
)
projState
=
CommonEnum
.
projState
.
pass
.
getCode
();
projState
=
CommonEnum
.
projState
.
pass
.
getCode
();
}
else
if
(
repor
t
.
getAuditResult
().
equals
(
CommonEnum
.
auditResult
.
returnModify
.
getCode
()))
{
}
else
if
(
audi
t
.
getAuditResult
().
equals
(
CommonEnum
.
auditResult
.
returnModify
.
getCode
()))
{
if
(
unitId
==
null
)
if
(
unitId
==
null
)
projState
=
CommonEnum
.
projState
.
returnModify
.
getCode
();
projState
=
CommonEnum
.
projState
.
returnModify
.
getCode
();
}
else
{
}
else
{
projState
=
CommonEnum
.
projState
.
failed
.
getCode
();
projState
=
CommonEnum
.
projState
.
failed
.
getCode
();
}
}
if
(
null
!=
projState
)
if
(
null
!=
projState
)
this
.
updateStateOrNo
(
repor
t
.
getAuditObjectId
(),
projState
,
null
);
this
.
updateStateOrNo
(
audi
t
.
getAuditObjectId
(),
projState
,
null
);
}
}
public
DataStatisticsDTO
getCount
(
ComProject
e
)
{
public
DataStatisticsDTO
getCount
(
ComProject
e
)
{
...
...
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