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
98c212b6
Commit
98c212b6
authored
Mar 26, 2025
by
徐俊
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
xujun
parent
42ed1295
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
92 additions
and
0 deletions
+92
-0
ComFile.java
...min/src/main/java/com/yiboshi/science/entity/ComFile.java
+4
-0
ComFileDTO.java
...c/main/java/com/yiboshi/science/param/dto/ComFileDTO.java
+4
-0
ComTalentApplyServiceImpl.java
...boshi/science/service/impl/ComTalentApplyServiceImpl.java
+84
-0
No files found.
science-admin/src/main/java/com/yiboshi/science/entity/ComFile.java
View file @
98c212b6
...
@@ -39,5 +39,8 @@ public class ComFile extends BaseEntity {
...
@@ -39,5 +39,8 @@ public class ComFile extends BaseEntity {
/** 必须上传的附件 */
/** 必须上传的附件 */
@ApiModelProperty
(
value
=
"必须上传的附件"
,
position
=
8
)
@ApiModelProperty
(
value
=
"必须上传的附件"
,
position
=
8
)
private
Boolean
isRequired
;
private
Boolean
isRequired
;
/** 是否为标题 */
@ApiModelProperty
(
value
=
"是否为标题"
,
position
=
8
)
private
Boolean
isTitle
;
}
}
\ No newline at end of file
science-admin/src/main/java/com/yiboshi/science/param/dto/ComFileDTO.java
View file @
98c212b6
...
@@ -44,4 +44,7 @@ public class ComFileDTO extends BaseDTO {
...
@@ -44,4 +44,7 @@ public class ComFileDTO extends BaseDTO {
/** 必须上传的附件 */
/** 必须上传的附件 */
@ApiModelProperty
(
value
=
"必须上传的附件"
,
position
=
8
)
@ApiModelProperty
(
value
=
"必须上传的附件"
,
position
=
8
)
private
Boolean
isRequired
;
private
Boolean
isRequired
;
/** 是否为标题 */
@ApiModelProperty
(
value
=
"是否为标题"
,
position
=
8
)
private
Boolean
isTitle
;
}
}
\ No newline at end of file
science-admin/src/main/java/com/yiboshi/science/service/impl/ComTalentApplyServiceImpl.java
View file @
98c212b6
...
@@ -19,8 +19,11 @@ import org.springframework.stereotype.Service;
...
@@ -19,8 +19,11 @@ import org.springframework.stereotype.Service;
import
org.springframework.transaction.annotation.Transactional
;
import
org.springframework.transaction.annotation.Transactional
;
import
java.math.BigDecimal
;
import
java.math.BigDecimal
;
import
java.util.ArrayList
;
import
java.util.Comparator
;
import
java.util.List
;
import
java.util.List
;
import
java.util.Objects
;
import
java.util.Objects
;
import
java.util.concurrent.atomic.AtomicInteger
;
import
java.util.stream.Collectors
;
import
java.util.stream.Collectors
;
/**
/**
...
@@ -128,12 +131,83 @@ public class ComTalentApplyServiceImpl extends BaseServiceImpl<ComTalentApplyDAO
...
@@ -128,12 +131,83 @@ public class ComTalentApplyServiceImpl extends BaseServiceImpl<ComTalentApplyDAO
return
comTalentApplyDAO
.
getCount
(
criteria
);
return
comTalentApplyDAO
.
getCount
(
criteria
);
}
}
private
ComFileDTO
configureFile
(
String
FileExplain
,
int
showIndex
,
Boolean
isRequired
,
Boolean
isTitle
)
{
ComFileDTO
file
=
new
ComFileDTO
();
file
.
setFileType
(
CommonEnum
.
fileType
.
talentApply
.
getCode
());
file
.
setFileExplain
(
FileExplain
);
file
.
setShowIndex
(
showIndex
);
file
.
setRequired
(
true
);
file
.
setIsTitle
(
isTitle
);
if
(!
isRequired
.
equals
(
null
))
file
.
setIsRequired
(
isRequired
);
else
file
.
setIsRequired
(
false
);
return
file
;
}
private
List
<
ComFileDTO
>
configureFileList
()
{
List
<
SystemParameter
>
parameterList
=
systemParameterService
.
getListByType
(
22
);
List
<
ComFileDTO
>
fileList
=
new
ArrayList
<>();
parameterList
.
forEach
(
e
->
{
Boolean
isTitle
=
false
;
if
(
e
.
getCode
().
equals
(
"0"
))
isTitle
=
true
;
fileList
.
add
(
configureFile
(
e
.
getName
(),
e
.
getDisplayOrder
(),
e
.
getIsRequired
(),
isTitle
));
});
return
fileList
;
}
public
List
<
ComFileDTO
>
checkNecessaryAttachmentFile
(
List
<
ComFileDTO
>
fileList
)
{
List
<
SystemParameter
>
parameterList
=
systemParameterService
.
getListByType
(
22
);
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
(
p
.
getIsRequired
());
if
(
p
.
getCode
().
equals
(
"0"
))
e
.
setIsTitle
(
true
);
else
e
.
setIsTitle
(
false
);
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
)
{
Boolean
isTitle
=
false
;
if
(
p
.
getCode
().
equals
(
"0"
))
isTitle
=
true
;
ComFileDTO
fileDTO
=
configureFile
(
p
.
getName
(),
p
.
getDisplayOrder
(),
p
.
getIsRequired
(),
isTitle
);
fileList
.
add
(
fileDTO
);
}
});
fileList
.
sort
(
Comparator
.
comparingInt
(
ComFileDTO:
:
getShowIndex
));
return
fileList
;
}
public
ComTalentApplyDTO
getNewTalentApply
()
{
public
ComTalentApplyDTO
getNewTalentApply
()
{
ComTalentApplyDTO
dto
=
new
ComTalentApplyDTO
();
ComTalentApplyDTO
dto
=
new
ComTalentApplyDTO
();
List
<
ComTalentBudgetDTO
>
bugetList
=
comTalentBudgetService
.
getList
();
List
<
ComTalentBudgetDTO
>
bugetList
=
comTalentBudgetService
.
getList
();
dto
.
setBudgetList
(
bugetList
);
dto
.
setBudgetList
(
bugetList
);
// 附件
List
<
ComFileDTO
>
fileList
=
configureFileList
();
dto
.
setFileList
(
fileList
);
dto
.
setApplyFund
(
new
BigDecimal
(
0.00
));
dto
.
setApplyFund
(
new
BigDecimal
(
0.00
));
dto
.
setOtherFund
(
new
BigDecimal
(
0.00
));
dto
.
setOtherFund
(
new
BigDecimal
(
0.00
));
dto
.
setTotalFund
(
new
BigDecimal
(
0.00
));
dto
.
setTotalFund
(
new
BigDecimal
(
0.00
));
...
@@ -174,6 +248,14 @@ public class ComTalentApplyServiceImpl extends BaseServiceImpl<ComTalentApplyDAO
...
@@ -174,6 +248,14 @@ public class ComTalentApplyServiceImpl extends BaseServiceImpl<ComTalentApplyDAO
List
<
ComPersonScientificGainDTO
>
scientificList
=
comPersonScientificGainService
.
getListByTalentId
(
dto
.
getId
());
List
<
ComPersonScientificGainDTO
>
scientificList
=
comPersonScientificGainService
.
getListByTalentId
(
dto
.
getId
());
dto
.
setScientificList
(
scientificList
);
dto
.
setScientificList
(
scientificList
);
//附件列表
List
<
ComFileDTO
>
fileList
=
comFileService
.
getListByObjectId
(
dto
.
getId
(),
CommonEnum
.
fileType
.
talentApply
.
getCode
());
if
(
null
==
fileList
||
fileList
.
size
()
==
0
)
fileList
=
configureFileList
();
else
fileList
=
checkNecessaryAttachmentFile
(
fileList
);
dto
.
setFileList
(
fileList
);
if
(
Objects
.
isNull
(
dto
.
getApplyFund
()))
if
(
Objects
.
isNull
(
dto
.
getApplyFund
()))
dto
.
setApplyFund
(
new
BigDecimal
(
0.00
));
dto
.
setApplyFund
(
new
BigDecimal
(
0.00
));
if
(
Objects
.
isNull
(
dto
.
getOtherFund
()))
if
(
Objects
.
isNull
(
dto
.
getOtherFund
()))
...
@@ -284,6 +366,8 @@ public class ComTalentApplyServiceImpl extends BaseServiceImpl<ComTalentApplyDAO
...
@@ -284,6 +366,8 @@ public class ComTalentApplyServiceImpl extends BaseServiceImpl<ComTalentApplyDAO
@Transactional
@Transactional
public
String
talentSaveStep3
(
ComTalentApplyDTO
dto
)
{
public
String
talentSaveStep3
(
ComTalentApplyDTO
dto
)
{
ComTalentApply
comTalentApply
=
convert2Entity
(
dto
);
this
.
update
(
comTalentApply
);
List
<
ComTalentMembersDTO
>
MemberList
=
dto
.
getMembersList
();
List
<
ComTalentMembersDTO
>
MemberList
=
dto
.
getMembersList
();
...
...
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