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
7f2a9415
Commit
7f2a9415
authored
Jan 14, 2025
by
wangxl
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1
parent
032e0e18
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
380 additions
and
51 deletions
+380
-51
ComProjectTaskDTO.java
...java/com/yiboshi/science/param/dto/ComProjectTaskDTO.java
+94
-0
ComProjectAuditServiceImpl.java
...oshi/science/service/impl/ComProjectAuditServiceImpl.java
+3
-6
ComProjectServiceImpl.java
...m/yiboshi/science/service/impl/ComProjectServiceImpl.java
+2
-3
ComProjectTaskServiceImpl.java
...boshi/science/service/impl/ComProjectTaskServiceImpl.java
+280
-41
ComProjectTaskDAO.xml
...nce-admin/src/main/resources/mapper/ComProjectTaskDAO.xml
+1
-1
No files found.
science-admin/src/main/java/com/yiboshi/science/param/dto/ComProjectTaskDTO.java
View file @
7f2a9415
...
...
@@ -158,6 +158,25 @@ public class ComProjectTaskDTO extends BaseDTO {
@ApiModelProperty
(
value
=
"项目结束时间"
,
position
=
11
)
@JsonFormat
(
timezone
=
"GMT+8"
,
pattern
=
"yyyy-MM-dd HH:mm:ss"
)
private
Date
projEnd
;
/** 项目实施目标 */
@ApiModelProperty
(
value
=
"项目实施目标"
,
position
=
28
)
private
String
researchContent
;
/** 主要技术指标 */
@ApiModelProperty
(
value
=
"主要技术指标"
,
position
=
35
)
private
String
technologyTarget
;
/** 主要经济指标 */
@ApiModelProperty
(
value
=
"主要经济指标"
,
position
=
35
)
private
String
economyTarget
;
/** 项目实施中形成的示范基地、中试线、生产线及其规模等 */
@ApiModelProperty
(
value
=
"项目实施中形成的示范基地、中试线、生产线及其规模等"
,
position
=
35
)
private
String
achievementTarget
;
/** 科技报告考核指标 */
@ApiModelProperty
(
value
=
"科技报告考核指标"
,
position
=
35
)
private
String
technologyReportsTarget
;
/** 其他应考核的指标 */
@ApiModelProperty
(
value
=
"其他应考核的指标"
,
position
=
35
)
private
String
otherTarget
;
/** 项目总经费(万元) */
@ApiModelProperty
(
value
=
"项目总经费(万元)"
,
position
=
39
)
...
...
@@ -233,4 +252,78 @@ public class ComProjectTaskDTO extends BaseDTO {
/** 联系电话 */
@ApiModelProperty
(
value
=
"联系电话"
,
position
=
8
)
private
String
phone
;
private
String
managerDept
;
@ApiModelProperty
(
value
=
"项目属性Id"
,
position
=
36
)
private
String
projAttribute
;
/** 年度总目标 */
@ApiModelProperty
(
value
=
"年度总目标"
,
position
=
14
)
private
String
yearTarget
;
/** 第一年目标 */
@ApiModelProperty
(
value
=
"第一年目标"
,
position
=
14
)
private
String
year1Goal
;
/** 第二年目标 */
@ApiModelProperty
(
value
=
"第二年目标"
,
position
=
14
)
private
String
year2Goal
;
/** 第三年目标 */
@ApiModelProperty
(
value
=
"第三年目标"
,
position
=
14
)
private
String
year3Goal
;
/** 项目组成员_总人数 */
@ApiModelProperty
(
value
=
"项目组成员_总人数"
,
position
=
17
)
private
Integer
memCount
;
/** 项目组成员_高职 */
@ApiModelProperty
(
value
=
"项目组成员_高职"
,
position
=
18
)
private
Integer
memHighCount
;
/** 项目组成员_中职 */
@ApiModelProperty
(
value
=
"项目组成员_中职"
,
position
=
19
)
private
Integer
memMiddleCount
;
/** 项目组成员_初职 */
@ApiModelProperty
(
value
=
"项目组成员_初职"
,
position
=
20
)
private
Integer
memLowCount
;
/** 项目组成员_其他 */
@ApiModelProperty
(
value
=
"项目组成员_其他"
,
position
=
21
)
private
Integer
memOtherCount
;
/** 项目组成员_博士后 */
@ApiModelProperty
(
value
=
"项目组成员_博士研究生"
,
position
=
22
)
private
Integer
memBshCount
;
/** 项目组成员_博士生 */
@ApiModelProperty
(
value
=
"项目组成员_博士研究生"
,
position
=
22
)
private
Integer
memBsCount
;
/** 项目组成员_硕士生 */
@ApiModelProperty
(
value
=
"项目组成员_硕士研究生"
,
position
=
23
)
private
Integer
memSsCount
;
/** 项目组成员_硕士生 */
@ApiModelProperty
(
value
=
"项目组成员_学士"
,
position
=
24
)
private
Integer
memXsCount
;
/** 项目组成员_参加单位数 */
@ApiModelProperty
(
value
=
"项目组成员_参加单位数"
,
position
=
25
)
private
Integer
workCount
;
/** 合作单位 */
private
List
<
ComProjectCooperativeUnitsDTO
>
cooperativeUnits
;
/** 项目主要参与单位 */
private
List
<
ComProjectCooperativeUnitsDTO
>
participateUnits
;
/** 项目组成员 */
private
List
<
ComProjectMembersDTO
>
members
;
/** 经费表 */
private
List
<
ComProjectBudgetDTO
>
budget
;
/** 年度用款计划 */
private
List
<
ComProjectFundPlanDTO
>
fundPlan
;
/** 购置设备预算明细表 */
private
List
<
ComProjectEquipmentDTO
>
deviceList
;
/** 单位支出明细预算 */
private
List
<
ComProjectUnitPaymentDTO
>
unitPayment
;
/** 项目绩效目标表 */
private
ProjectKPIStatisticDTO
projectKPI
;
/** 项目安排及阶段目标 */
private
List
<
ComProjectStageGoalDTO
>
stageGoals
;
/** 项目课颖设置表 */
private
List
<
ComProjectSubDTO
>
projectSubList
;
/** 试制设备预算明细表 */
private
List
<
ComProjectManufactureDTO
>
manufactureList
;
/** 附件列表 */
private
List
<
ComFileDTO
>
fileList
;
/** 审核列表 */
private
List
<
ComProjectAuditNoteDTO
>
auditList
;
}
\ No newline at end of file
science-admin/src/main/java/com/yiboshi/science/service/impl/ComProjectAuditServiceImpl.java
View file @
7f2a9415
...
...
@@ -214,8 +214,7 @@ public class ComProjectAuditServiceImpl extends BaseServiceImpl<ComProjectAuditD
return
page
;
}
public
void
report
(
Integer
reportYear
,
String
auditObjectId
,
Integer
auditType
,
String
auditUnitId
,
String
treeCode
)
{
public
void
report
(
Integer
reportYear
,
String
auditObjectId
,
Integer
auditType
,
String
auditUnitId
,
String
treeCode
)
{
int
maxIndex
=
this
.
getMaxAuditIndex
(
auditObjectId
);
ComProjectAudit
comProjectAudit
=
this
.
getAudit
(
auditObjectId
,
auditUnitId
,
auditType
,
CommonEnum
.
auditMethod
.
audit
.
getCode
(),
null
);
if
(
null
!=
comProjectAudit
)
{
...
...
@@ -252,7 +251,7 @@ public class ComProjectAuditServiceImpl extends BaseServiceImpl<ComProjectAuditD
// 审核通过
if
(
model
.
getAuditResult
().
equals
(
CommonEnum
.
auditResult
.
pass
.
getCode
()))
{
if
(
unitLevel
.
equals
(
1
))
{
if
(
auditMethod
.
equals
(
CommonEnum
.
auditMethod
.
audit
.
getCode
()))
{
if
(
auditMethod
.
equals
(
CommonEnum
.
auditMethod
.
audit
.
getCode
())
&&
auditType
.
equals
(
1
)
)
{
// 查询上级单位上报记录
ComProjectAudit
auditNote
=
this
.
getAudit
(
auditObjectId
,
auditUnitId
,
auditType
,
CommonEnum
.
auditMethod
.
last
.
getCode
(),
null
);
if
(
null
!=
auditNote
)
{
...
...
@@ -297,12 +296,10 @@ public class ComProjectAuditServiceImpl extends BaseServiceImpl<ComProjectAuditD
if
(
auditMethod
.
equals
(
CommonEnum
.
auditMethod
.
last
.
getCode
()))
throw
new
BusinessException
(
"终审项目不能返回修改!"
);
unitLevel
=
unitLevel
+
1
;
// 跳过县级行政机构
if
(
reportTreeCode
.
length
()
/
properties
.
getDefaultCodeLength
()
>
3
&&
auditUnitTreeCode
.
length
()
/
properties
.
getDefaultCodeLength
()
==
2
)
{
unitLevel
=
comProjectAuditDAO
.
getMaxUnitLevelByObjectId
(
model
.
getAuditObjectId
());
}
//更新上报表
ComProjectAudit
auditNote
=
this
.
getAudit
(
auditObjectId
,
null
,
auditType
,
CommonEnum
.
auditMethod
.
audit
.
getCode
(),
unitLevel
);
if
(
null
!=
auditNote
)
{
...
...
@@ -417,7 +414,7 @@ public class ComProjectAuditServiceImpl extends BaseServiceImpl<ComProjectAuditD
return
this
.
getEntity
(
comProjectAudit
);
}
public
void
insertAudit
(
Integer
reportYear
,
Integer
auditType
,
String
auditObjectId
,
Integer
auditMethod
,
String
auditUnitId
,
String
auditContent
,
Integer
auditResult
,
Date
auditDate
,
Integer
unitLevel
,
Integer
showIndex
,
String
comPerson
)
{
public
void
insertAudit
(
Integer
reportYear
,
Integer
auditType
,
String
auditObjectId
,
Integer
auditMethod
,
String
auditUnitId
,
String
auditContent
,
Integer
auditResult
,
Date
auditDate
,
Integer
unitLevel
,
Integer
showIndex
,
String
comPerson
)
{
ComProjectAudit
comProjectAudit
=
new
ComProjectAudit
();
comProjectAudit
.
setReportYear
(
reportYear
);
comProjectAudit
.
setAuditType
(
auditType
);
...
...
science-admin/src/main/java/com/yiboshi/science/service/impl/ComProjectServiceImpl.java
View file @
7f2a9415
...
...
@@ -88,9 +88,9 @@ public class ComProjectServiceImpl extends BaseServiceImpl<ComProjectDAO, ComPro
@Autowired
private
final
HtmlBuilder
htmlBuilder
;
@Autowired
private
final
ComProjectFundPlanService
comProjectFundPlanService
;
private
ComProjectFundPlanService
comProjectFundPlanService
;
@Autowired
private
final
ComProjectUnitPaymentService
comProjectUnitPaymentService
;
private
ComProjectUnitPaymentService
comProjectUnitPaymentService
;
@Autowired
private
ComProjectKpitService
comProjectKpitService
;
@Autowired
...
...
@@ -630,7 +630,6 @@ public class ComProjectServiceImpl extends BaseServiceImpl<ComProjectDAO, ComPro
return
state
;
}
public
void
report
(
ComProjectAudit
model
,
String
unitId
,
String
treeCode
)
{
ComProject
comProject
=
this
.
entityById
(
model
.
getAuditObjectId
());
if
(
null
==
comProject
)
...
...
science-admin/src/main/java/com/yiboshi/science/service/impl/ComProjectTaskServiceImpl.java
View file @
7f2a9415
package
com
.
yiboshi
.
science
.
service
.
impl
;
import
com.alibaba.excel.util.StringUtils
;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.yiboshi.arch.exception.BusinessException
;
import
com.yiboshi.science.base.BaseServiceImpl
;
import
com.yiboshi.science.base.Pagination
;
import
com.yiboshi.science.config.bean.SystemProperties
;
import
com.yiboshi.science.dao.ComProjectDAO
;
import
com.yiboshi.science.dao.ComProjectTaskDAO
;
import
com.yiboshi.science.entity.*
;
import
com.yiboshi.science.enumeration.CommonEnum
;
import
com.yiboshi.science.param.dto.*
;
import
com.yiboshi.science.param.query.ComProjectTaskQueryVO
;
import
com.yiboshi.science.service.*
;
import
com.yiboshi.science.utils.DateUtils
;
import
com.yiboshi.science.utils.ExcelUtils
;
import
com.yiboshi.science.utils.HtmlBuilder
;
import
com.yiboshi.science.utils.SystemSetKey
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
org.springframework.transaction.annotation.Transactional
;
import
org.springframework.web.multipart.MultipartFile
;
import
java.math.BigDecimal
;
import
java.util.ArrayList
;
import
java.util.Comparator
;
import
java.util.List
;
import
java.util.Objects
;
import
java.util.concurrent.atomic.AtomicInteger
;
import
java.util.stream.Collectors
;
/**
...
...
@@ -37,27 +46,33 @@ public class ComProjectTaskServiceImpl extends BaseServiceImpl<ComProjectTaskDAO
@Autowired
private
ComProjectBudgetService
comProjectBudgetService
;
@Autowired
private
ComTaskTargetService
ComTaskTargetService
;
@Autowired
private
ComProjectStageGoalService
ComProjectStageGoalService
;
@Autowired
private
ComProjectService
ComProjectService
;
@Autowired
private
ComPersonService
comPersonService
;
@Autowired
private
ComUnitService
comUnitService
;
@Autowired
private
ComProjectCooperativeUnitsService
C
omProjectCooperativeUnitsService
;
private
ComProjectCooperativeUnitsService
c
omProjectCooperativeUnitsService
;
@Autowired
private
ComProjectAuditService
comProjectAuditService
;
@Autowired
private
ComProjectAuditNoteService
comProjectAuditNoteService
;
private
ComProjectStageGoalService
comProjectStageGoalService
;
@Autowired
private
ComProjectEquipmentService
comProjectEquipmentService
;
@Autowired
private
ComProjectManufactureService
comProjectManufactureService
;
@Autowired
private
ComProjectSubService
comProjectSubService
;
@Autowired
private
ComProject
CheckService
comProjectCheck
Service
;
private
ComProject
FundPlanService
comProjectFundPlan
Service
;
@Autowired
private
Com
DownloadService
comDownload
Service
;
private
Com
ProjectKpitDetailService
comProjectKpitDetail
Service
;
@Autowired
private
ComFileService
comFileService
;
private
ComProjectUnitPaymentService
comProjectUnitPaymentService
;
@Autowired
private
ComFileService
ComFileService
;
@Autowired
private
ComProjectKpitService
comProjectKpitService
;
@Autowired
private
SystemParameterService
systemParameterService
;
@Override
protected
void
setCriteriaForQuery
(
ComProjectTaskQueryVO
vo
,
QueryWrapper
<
ComProjectTaskQueryVO
>
criteria
)
{
...
...
@@ -179,23 +194,238 @@ public class ComProjectTaskServiceImpl extends BaseServiceImpl<ComProjectTaskDAO
// 申报人
ComPersonDTO
comPersonDTO
=
comPersonService
.
getPersonById
(
dto
.
getAppPersonId
());
if
(
null
!=
comPersonDTO
)
{
loadPersonInfo
(
dto
,
comPersonDTO
);
dto
.
setAppPersonName
(
comPersonDTO
.
getPersonName
());
dto
.
setCertId
(
comPersonDTO
.
getCertId
());
dto
.
setSex
(
comPersonDTO
.
getSex
());
dto
.
setBirthday
(
comPersonDTO
.
getBirthday
());
dto
.
setNationName
(
comPersonDTO
.
getNationName
());
dto
.
setDegreeName
(
comPersonDTO
.
getDegreeName
());
dto
.
setTitleName
(
comPersonDTO
.
getTitleName
());
dto
.
setDutyName
(
comPersonDTO
.
getDuty
());
dto
.
setSpecName
(
comPersonDTO
.
getSpecName
());
dto
.
setMobile
(
comPersonDTO
.
getMobile
());
dto
.
setEmail
(
comPersonDTO
.
getEmail
());
}
//获取项目组成员
List
<
ComProjectMembersDTO
>
memList
=
comProjectMembersService
.
getListByObjectId
(
dto
.
getProjId
());
dto
.
setMembers
(
memList
);
ComProjectMembersDTO
comProjectMembersDTO
=
comProjectMembersService
.
getMemCountById
(
dto
.
getProjId
());
dto
.
setMemCount
(
comProjectMembersDTO
.
getMemCount
()
+
1
);
dto
.
setMemHighCount
(
comProjectMembersDTO
.
getMemHighCount
());
dto
.
setMemMiddleCount
(
comProjectMembersDTO
.
getMemMiddleCount
());
dto
.
setMemLowCount
(
comProjectMembersDTO
.
getMemLowCount
());
dto
.
setMemBshCount
(
comProjectMembersDTO
.
getMemBshCount
());
dto
.
setMemBsCount
(
comProjectMembersDTO
.
getMemBsCount
());
dto
.
setMemSsCount
(
comProjectMembersDTO
.
getMemSsCount
());
dto
.
setMemXsCount
(
comProjectMembersDTO
.
getMemXsCount
());
dto
.
setWorkCount
(
comProjectMembersDTO
.
getWorkCount
());
//申报人职称统计
if
(!
StringUtils
.
isEmpty
(
comPersonDTO
.
getTitle
()))
{
String
titleName
=
systemParameterService
.
judgmentTitleLevel
(
comPersonDTO
.
getTitle
());
if
(!
StringUtils
.
isEmpty
(
titleName
))
{
switch
(
titleName
)
{
case
"无职称"
:
case
"初级职称"
:
dto
.
setMemLowCount
(
dto
.
getMemLowCount
()
+
1
);
break
;
case
"中级职称"
:
dto
.
setMemMiddleCount
(
dto
.
getMemMiddleCount
()
+
1
);
break
;
case
"副高级职称"
:
case
"高级职称"
:
dto
.
setMemHighCount
(
dto
.
getMemHighCount
()
+
1
);
break
;
}
}
}
// // 项目合作单位
// List<ComProjectCooperativeUnitsDTO> cooperativeUnits = comProjectCooperativeUnitsService.getListByObjectId(dto.getProjId(), 1);
// dto.setCooperativeUnits(cooperativeUnits);
// 项目参与单位
List
<
ComProjectCooperativeUnitsDTO
>
participateUnits
=
comProjectCooperativeUnitsService
.
getListByObjectId
(
dto
.
getProjId
(),
2
);
dto
.
setParticipateUnits
(
participateUnits
);
//经费表
List
<
ComProjectBudgetDTO
>
budgetList
=
comProjectBudgetService
.
getListByObjectId
(
dto
.
getProjId
());
dto
.
setBudget
(
budgetList
);
// 年度用款计划
List
<
ComProjectFundPlanDTO
>
fundPlanList
=
comProjectFundPlanService
.
getListByObjectId
(
dto
.
getProjId
());
if
(
null
==
fundPlanList
||
fundPlanList
.
size
()
==
0
)
fundPlanList
=
comProjectFundPlanService
.
getList
();
dto
.
setFundPlan
(
fundPlanList
);
// 购置设备预算明细表
List
<
ComProjectEquipmentDTO
>
equipmentList
=
comProjectEquipmentService
.
getListByObjectId
(
dto
.
getProjId
());
dto
.
setDeviceList
(
equipmentList
);
// 试制设备预算明细表
List
<
ComProjectManufactureDTO
>
manufactureList
=
comProjectManufactureService
.
getListByObjectId
(
dto
.
getProjId
());
dto
.
setManufactureList
(
manufactureList
);
// 单位支出明细预算
List
<
ComProjectUnitPaymentDTO
>
unitPaymentList
=
comProjectUnitPaymentService
.
getListByObjectId
(
dto
.
getProjId
());
dto
.
setUnitPayment
(
unitPaymentList
);
// 项目绩效目标表
LoadProjectKPIInfo
(
dto
);
// 项目安排及阶段目标
List
<
ComProjectStageGoalDTO
>
stageGoals
=
comProjectStageGoalService
.
getListByObjectId
(
dto
.
getProjId
());
dto
.
setStageGoals
(
stageGoals
);
// 项目课颖设置表
List
<
ComProjectSubDTO
>
projectSubList
=
comProjectSubService
.
getListByObjectId
(
dto
.
getProjId
());
dto
.
setProjectSubList
(
projectSubList
);
// // 在研或完成基础研究项目情况
// List<ComProjectResearchDTO> projectResearchList = comProjectResearchService.getListByObjectId(dto.getProjId());
// dto.setProjectResearchList(projectResearchList);
// // 单位科研项目及资金管理制度表
// List<ComProjectManagementRuleDTO> managementRuleList = comProjectManagementRuleService.getListByObjectId(dto.getProjId());
// dto.setManagementRuleList(managementRuleList);
//附件列表
List
<
ComFileDTO
>
fileList
=
ComFileService
.
getListByObjectId
(
dto
.
getProjId
(),
CommonEnum
.
fileType
.
project
.
getCode
());
if
(
null
==
fileList
||
fileList
.
size
()
==
0
)
fileList
=
configureFileList
(
dto
.
getProjType
());
else
fileList
=
checkNecessaryAttachmentFile
(
dto
.
getProjType
(),
fileList
);
dto
.
setFileList
(
fileList
);
return
dto
;
}
private
void
LoadProjectKPIInfo
(
ComProjectTaskDTO
dto
)
{
List
<
ComProjectKpitDTO
>
ProjectKPIList
=
comProjectKpitDetailService
.
getProjectKpitDetailStatistic
(
dto
.
getId
());
if
(
null
==
ProjectKPIList
||
ProjectKPIList
.
size
()
==
0
)
ProjectKPIList
=
comProjectKpitService
.
getProjectKpitStatistic
();
ProjectKPIStatisticDTO
kpiDTO
=
new
ProjectKPIStatisticDTO
();
kpiDTO
.
setTotalRowSpan
(
ProjectKPIList
.
size
()
+
2
);
kpiDTO
.
setThreeLevel
(
ProjectKPIList
);
kpiDTO
.
setReportYear
(
dto
.
getReportYear
());
kpiDTO
.
setProjName
(
dto
.
getProjName
());
kpiDTO
.
setAppUnitName
(
dto
.
getAppUnitName
());
kpiDTO
.
setManagerDept
(
dto
.
getManagerDept
());
kpiDTO
.
setProjAttribute
(
dto
.
getProjAttribute
());
kpiDTO
.
setYearTarget
(
dto
.
getYearTarget
());
kpiDTO
.
setYear1Goal
(
dto
.
getYear1Goal
());
kpiDTO
.
setYear2Goal
(
dto
.
getYear2Goal
());
kpiDTO
.
setYear3Goal
(
dto
.
getYear3Goal
());
if
(
Objects
.
nonNull
(
dto
.
getStartDate
())
&&
Objects
.
nonNull
(
dto
.
getEndDate
()))
{
kpiDTO
.
setStartDate
(
dto
.
getStartDate
());
kpiDTO
.
setEndDate
(
dto
.
getEndDate
());
kpiDTO
.
setProjDeadline
(
DateUtils
.
FormatDate
(
dto
.
getStartDate
())
+
"至"
+
DateUtils
.
FormatDate
(
dto
.
getEndDate
()));
}
List
<
ComProjectBudgetDTO
>
budgetDTO
=
dto
.
getBudget
();
if
(
null
!=
budgetDTO
)
{
// 资金总额
List
<
ComProjectBudgetDTO
>
FindList
=
budgetDTO
.
stream
().
filter
(
e
->
e
.
getBudgetId
().
equals
(
"3b1f57d3-6aec-4129-aef5-702a1accfe01"
)).
collect
(
Collectors
.
toList
());
if
(
null
!=
FindList
)
kpiDTO
.
setTotalBudget
(
FindList
.
get
(
0
).
getTotalBudget
());
// 省级财政资金
FindList
=
budgetDTO
.
stream
().
filter
(
e
->
e
.
getBudgetId
().
equals
(
"3b1f57d3-6aec-4129-aef5-702a1accfe02"
)).
collect
(
Collectors
.
toList
());
if
(
null
!=
FindList
)
kpiDTO
.
setApplyFunds
(
FindList
.
get
(
0
).
getTotalBudget
());
// 自筹资金
FindList
=
budgetDTO
.
stream
().
filter
(
e
->
e
.
getBudgetId
().
equals
(
"3b1f57d3-6aec-4129-aef5-702a1accfe03"
)).
collect
(
Collectors
.
toList
());
if
(
null
!=
FindList
)
kpiDTO
.
setSelfFunds
(
FindList
.
get
(
0
).
getTotalBudget
());
}
else
{
kpiDTO
.
setTotalBudget
(
new
BigDecimal
(
0.00
));
kpiDTO
.
setApplyFunds
(
new
BigDecimal
(
0.00
));
kpiDTO
.
setSelfFunds
(
new
BigDecimal
(
0.00
));
}
List
<
ComProjectFundPlanDTO
>
fundPlanDTO
=
dto
.
getFundPlan
();
if
(
null
!=
fundPlanDTO
)
{
List
<
ComProjectFundPlanDTO
>
FindList
=
fundPlanDTO
.
stream
().
filter
(
e
->
e
.
getFundId
().
equals
(
"6a18820d-ad2b-11ef-b6cb-0c42a1380f01"
)).
collect
(
Collectors
.
toList
());
if
(
null
!=
FindList
)
kpiDTO
.
setYearTotal
(
FindList
.
get
(
0
).
getYearValue1
());
FindList
=
fundPlanDTO
.
stream
().
filter
(
e
->
e
.
getFundId
().
equals
(
"6a18820d-ad2b-11ef-b6cb-0c42a1380f02"
)).
collect
(
Collectors
.
toList
());
if
(
null
!=
FindList
)
kpiDTO
.
setYearApply
(
FindList
.
get
(
0
).
getYearValue1
());
FindList
=
fundPlanDTO
.
stream
().
filter
(
e
->
e
.
getFundId
().
equals
(
"6a18820d-ad2b-11ef-b6cb-0c42a1380f03"
)).
collect
(
Collectors
.
toList
());
if
(
null
!=
FindList
)
kpiDTO
.
setYearSelf
(
FindList
.
get
(
0
).
getYearValue1
());
}
else
{
kpiDTO
.
setYearTotal
(
new
BigDecimal
(
0.00
));
kpiDTO
.
setYearApply
(
new
BigDecimal
(
0.00
));
kpiDTO
.
setYearSelf
(
new
BigDecimal
(
0.00
));
}
dto
.
setProjectKPI
(
kpiDTO
);
}
private
void
loadPersonInfo
(
ComProjectTaskDTO
dto
,
ComPersonDTO
comPersonDTO
)
{
dto
.
setAppPersonName
(
comPersonDTO
.
getPersonName
());
dto
.
setCertId
(
comPersonDTO
.
getCertId
());
dto
.
setSex
(
comPersonDTO
.
getSex
());
dto
.
setBirthday
(
comPersonDTO
.
getBirthday
());
dto
.
setNationName
(
comPersonDTO
.
getNationName
());
dto
.
setDegreeName
(
comPersonDTO
.
getDegreeName
());
dto
.
setTitleName
(
comPersonDTO
.
getTitleName
());
dto
.
setDutyName
(
comPersonDTO
.
getDuty
());
dto
.
setSpecName
(
comPersonDTO
.
getSpecName
());
dto
.
setMobile
(
comPersonDTO
.
getMobile
());
dto
.
setEmail
(
comPersonDTO
.
getEmail
());
private
List
<
ComFileDTO
>
configureFileList
(
Integer
projType
)
{
List
<
ComFileDTO
>
fileList
=
new
ArrayList
<>();
List
<
SystemParameter
>
parameterList
;
//健康领域科技项目
if
(
projType
==
CommonEnum
.
projType
.
num
.
getCode
())
parameterList
=
systemParameterService
.
getListByType
(
61
);
else
//临床科技项目
parameterList
=
systemParameterService
.
getListByType
(
13
);
parameterList
.
forEach
(
e
->
{
fileList
.
add
(
configureFile
(
e
.
getName
(),
e
.
getDisplayOrder
(),
e
.
getIsRequired
()));
});
return
fileList
;
}
private
ComFileDTO
configureFile
(
String
FileExplain
,
int
showIndex
,
Boolean
isRequired
)
{
ComFileDTO
file
=
new
ComFileDTO
();
file
.
setFileType
(
CommonEnum
.
fileType
.
project
.
getCode
());
file
.
setFileExplain
(
FileExplain
);
file
.
setShowIndex
(
showIndex
);
file
.
setRequired
(
true
);
if
(!
isRequired
.
equals
(
null
))
file
.
setIsRequired
(
isRequired
);
else
file
.
setIsRequired
(
false
);
return
file
;
}
public
List
<
ComFileDTO
>
checkNecessaryAttachmentFile
(
Integer
projType
,
List
<
ComFileDTO
>
fileList
)
{
List
<
SystemParameter
>
parameterList
;
//健康领域科技项目
if
(
projType
==
CommonEnum
.
projType
.
num
.
getCode
())
parameterList
=
systemParameterService
.
getListByType
(
61
);
else
//临床科技项目
parameterList
=
systemParameterService
.
getListByType
(
13
);
AtomicInteger
allCount
=
new
AtomicInteger
(
parameterList
.
size
()
+
1
);
fileList
.
forEach
(
e
->
{
AtomicInteger
num
=
new
AtomicInteger
(
1
);
int
i
=
num
.
get
();
parameterList
.
forEach
(
p
->
{
if
(
null
!=
e
.
getFileExplain
()
&&
e
.
getFileExplain
().
equals
(
p
.
getName
()))
{
e
.
setShowIndex
(
p
.
getDisplayOrder
());
e
.
setRequired
(
true
);
num
.
incrementAndGet
();
}
});
if
(
i
==
num
.
get
())
{
e
.
setShowIndex
(
allCount
.
get
());
e
.
setRequired
(
false
);
allCount
.
incrementAndGet
();
}
});
parameterList
.
forEach
(
p
->
{
List
<
ComFileDTO
>
findList
=
fileList
.
stream
().
filter
(
e
->
null
!=
e
.
getFileExplain
()
&&
e
.
getFileExplain
().
equals
(
p
.
getName
())).
collect
(
Collectors
.
toList
());
if
(
findList
.
size
()
==
0
)
{
ComFileDTO
fileDTO
=
configureFile
(
p
.
getName
(),
p
.
getDisplayOrder
(),
p
.
getIsRequired
());
fileList
.
add
(
fileDTO
);
}
});
fileList
.
sort
(
Comparator
.
comparingInt
(
ComFileDTO:
:
getShowIndex
));
return
fileList
;
}
@Transactional
...
...
@@ -220,33 +450,43 @@ public class ComProjectTaskServiceImpl extends BaseServiceImpl<ComProjectTaskDAO
public
void
report
(
ComProjectAudit
model
,
String
unitId
,
String
treeCode
)
{
ComProjectTask
ComProjectTask
=
this
.
entityById
(
model
.
getAuditObjectId
());
if
(
null
==
ComProjectTask
)
throw
new
BusinessException
(
"
任务书不存在或已上报
"
);
throw
new
BusinessException
(
"
合同书不存在!
"
);
if
(!
ComProjectTask
.
getTaskState
().
equals
(
CommonEnum
.
taskState
.
waitSubmit
.
getCode
())
&&
!
ComProjectTask
.
getTaskState
().
equals
(
CommonEnum
.
taskState
.
returnModify
.
getCode
()))
throw
new
BusinessException
(
"
任务书不存在或
已上报"
);
throw
new
BusinessException
(
"
合同书
已上报"
);
comProjectAuditService
.
report
(
ComProjectTask
.
getReportYear
(),
model
.
getAuditObjectId
(),
model
.
getAuditType
(),
unitId
,
treeCode
);
// 更新任务书状态
this
.
updateState
(
model
.
getAuditObjectId
(),
CommonEnum
.
taskState
.
review
.
getCode
());
}
@Transactional
public
void
audit
(
ComProjectAudit
comProjectAudit
,
String
u
nitId
,
String
treeCode
)
{
public
void
audit
(
ComProjectAudit
dto
,
String
auditU
nitId
,
String
treeCode
)
{
// false 报上级或返回下一级 true报到最高级或返回个人
int
state
=
0
;
ComProjectTask
test
=
new
ComProjectTask
();
test
.
setId
(
comProjectAudit
.
getAuditObjectId
());
if
(
comProjectAudit
.
getAuditResult
().
equals
(
CommonEnum
.
auditResult
.
pass
.
getCode
()))
{
if
(
state
==
0
)
{
test
.
setTaskState
(
CommonEnum
.
taskState
.
pass
.
getCode
());
comProjectCheckService
.
insertCheckListByTestId
(
test
.
getId
());
ComProjectTask
task
=
this
.
getById
(
dto
.
getAuditObjectId
());
if
(
null
==
task
)
throw
new
BusinessException
(
"审核对象不存在!"
);
ComProjectTaskDTO
dt
=
this
.
getTaskByProjId
(
task
.
getProjId
());
ComUnit
appUnit
=
comUnitService
.
getById
(
dt
.
getAppUnitId
());
if
(
null
==
appUnit
)
throw
new
BusinessException
(
"申报单位不存在,或已删除!"
);
ComProjectAudit
audit
=
comProjectAuditService
.
getById
(
dto
.
getId
());
audit
.
setAuditResult
(
dto
.
getAuditResult
());
audit
.
setAuditContent
(
dto
.
getAuditContent
());
// 返回上级或下级单位Id, 最高级或个人返回 null
String
unitId
=
comProjectAuditService
.
audit
(
audit
,
appUnit
.
getTreeCode
(),
treeCode
);
// 处理项目状态
Integer
taskState
=
null
;
if
(
audit
.
getAuditResult
().
equals
(
CommonEnum
.
auditResult
.
pass
.
getCode
()))
{
if
(
unitId
==
null
)
{
taskState
=
CommonEnum
.
taskState
.
pass
.
getCode
();
}
}
else
if
(
comProjectA
udit
.
getAuditResult
().
equals
(
CommonEnum
.
auditResult
.
returnModify
.
getCode
()))
{
if
(
state
==
0
)
t
est
.
setTaskState
(
CommonEnum
.
taskState
.
returnModify
.
getCode
()
);
}
else
if
(
a
udit
.
getAuditResult
().
equals
(
CommonEnum
.
auditResult
.
returnModify
.
getCode
()))
{
if
(
unitId
==
null
)
t
askState
=
CommonEnum
.
taskState
.
returnModify
.
getCode
(
);
}
else
{
t
est
.
setTaskState
(
CommonEnum
.
taskState
.
failed
.
getCode
()
);
t
askState
=
CommonEnum
.
taskState
.
failed
.
getCode
(
);
}
if
(
null
!=
t
est
.
getTaskState
()
)
this
.
update
(
test
);
if
(
null
!=
t
askState
)
this
.
update
State
(
dto
.
getAuditObjectId
(),
taskState
);
}
}
\ No newline at end of file
science-admin/src/main/resources/mapper/ComProjectTaskDAO.xml
View file @
7f2a9415
...
...
@@ -37,7 +37,7 @@
pt.key_areas,pt.proj_work,pt.telephone,pt.fax,
pt.link_name,pt.link_mobile,pt.link_fax,pt.link_email,
pt.is_technology_report,pt.project_report,pt.progress_report,pt.special_report,pt.final_report,
a.proj_name,a.proj_no,a.start_date projStart,a.end_date projEnd,a.app_person_id,a.app_unit_id,
a.proj_name,a.proj_no,a.start_date projStart,a.end_date projEnd,a.app_person_id,a.app_unit_id,
a.proj_type,
b.name knowledge_name,
ic.proj_id,ic.job_time,ic.main_research_areas,ic.address,
ic.unit_link_name,ic.unit_link_mobile,ic.unit_link_email,ic.unit_link_fax,ic.subject_scope,ic.proj_abstract,ic.proj_keywords,
...
...
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