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
7f864777
Commit
7f864777
authored
Dec 25, 2024
by
wangxl
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
77
parent
bb328421
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
95 additions
and
29 deletions
+95
-29
ComProjectAssignDAO.java
...ain/java/com/yiboshi/science/dao/ComProjectAssignDAO.java
+0
-2
ComProject.java
.../src/main/java/com/yiboshi/science/entity/ComProject.java
+15
-0
ComProjectDTO.java
...ain/java/com/yiboshi/science/param/dto/ComProjectDTO.java
+15
-0
ComProjectQueryVO.java
...va/com/yiboshi/science/param/query/ComProjectQueryVO.java
+15
-0
ComPersonServiceImpl.java
...om/yiboshi/science/service/impl/ComPersonServiceImpl.java
+2
-2
ComProjectAssignServiceImpl.java
...shi/science/service/impl/ComProjectAssignServiceImpl.java
+47
-14
ComProjectServiceImpl.java
...m/yiboshi/science/service/impl/ComProjectServiceImpl.java
+1
-0
ComProjectAssignDAO.xml
...e-admin/src/main/resources/mapper/ComProjectAssignDAO.xml
+0
-11
No files found.
science-admin/src/main/java/com/yiboshi/science/dao/ComProjectAssignDAO.java
View file @
7f864777
...
@@ -21,6 +21,4 @@ public interface ComProjectAssignDAO extends BaseMapper<ComProjectAssign>, BaseD
...
@@ -21,6 +21,4 @@ public interface ComProjectAssignDAO extends BaseMapper<ComProjectAssign>, BaseD
List
<
AssignCount
>
getAssignCount
(
String
expertId
);
List
<
AssignCount
>
getAssignCount
(
String
expertId
);
List
<
ComProjectGroupDTO
>
getProjectGroupAssignById
(
String
id
,
String
expertId
);
List
<
ComProjectGroupDTO
>
getProjectGroupAssignById
(
String
id
,
String
expertId
);
void
updateAssignState
(
ComProject
comProject
);
}
}
science-admin/src/main/java/com/yiboshi/science/entity/ComProject.java
View file @
7f864777
...
@@ -91,6 +91,21 @@ public class ComProject extends BaseEntity {
...
@@ -91,6 +91,21 @@ public class ComProject extends BaseEntity {
/** 平均分 */
/** 平均分 */
@ApiModelProperty
(
value
=
"平均分"
,
position
=
4
)
@ApiModelProperty
(
value
=
"平均分"
,
position
=
4
)
private
BigDecimal
averageScore
;
private
BigDecimal
averageScore
;
/** 技术专家总分 */
@ApiModelProperty
(
value
=
"技术专家总分"
,
position
=
4
)
private
BigDecimal
technologyScore
;
/** 技术专家平均分 */
@ApiModelProperty
(
value
=
"技术专家平均分"
,
position
=
4
)
private
BigDecimal
technologyAverageScore
;
/** 财务专家总分 */
@ApiModelProperty
(
value
=
"财务专家总分"
,
position
=
4
)
private
BigDecimal
economyScore
;
/** 财务专家平均分 */
@ApiModelProperty
(
value
=
"财务专家平均分"
,
position
=
4
)
private
BigDecimal
economyAverageScore
;
/** 计算得分 */
@ApiModelProperty
(
value
=
"计算得分"
,
position
=
4
)
private
BigDecimal
calculateScore
;
/** 项目完成状态 */
/** 项目完成状态 */
@ApiModelProperty
(
value
=
"项目完成状态"
,
position
=
38
)
@ApiModelProperty
(
value
=
"项目完成状态"
,
position
=
38
)
private
String
completeStatus
;
private
String
completeStatus
;
...
...
science-admin/src/main/java/com/yiboshi/science/param/dto/ComProjectDTO.java
View file @
7f864777
...
@@ -92,6 +92,21 @@ public class ComProjectDTO extends BaseDTO {
...
@@ -92,6 +92,21 @@ public class ComProjectDTO extends BaseDTO {
/** 平均分 */
/** 平均分 */
@ApiModelProperty
(
value
=
"平均分"
,
position
=
4
)
@ApiModelProperty
(
value
=
"平均分"
,
position
=
4
)
private
BigDecimal
averageScore
;
private
BigDecimal
averageScore
;
/** 技术专家总分 */
@ApiModelProperty
(
value
=
"技术专家总分"
,
position
=
4
)
private
BigDecimal
technologyScore
;
/** 技术专家平均分 */
@ApiModelProperty
(
value
=
"技术专家平均分"
,
position
=
4
)
private
BigDecimal
technologyAverageScore
;
/** 财务专家总分 */
@ApiModelProperty
(
value
=
"财务专家总分"
,
position
=
4
)
private
BigDecimal
economyScore
;
/** 财务专家平均分 */
@ApiModelProperty
(
value
=
"财务专家平均分"
,
position
=
4
)
private
BigDecimal
economyAverageScore
;
/** 计算得分 */
@ApiModelProperty
(
value
=
"计算得分"
,
position
=
4
)
private
BigDecimal
calculateScore
;
/** 项目Id */
/** 项目Id */
...
...
science-admin/src/main/java/com/yiboshi/science/param/query/ComProjectQueryVO.java
View file @
7f864777
...
@@ -91,6 +91,21 @@ public class ComProjectQueryVO extends PaginationVO{
...
@@ -91,6 +91,21 @@ public class ComProjectQueryVO extends PaginationVO{
/** 平均分 */
/** 平均分 */
@ApiModelProperty
(
value
=
"平均分"
,
position
=
4
)
@ApiModelProperty
(
value
=
"平均分"
,
position
=
4
)
private
BigDecimal
averageScore
;
private
BigDecimal
averageScore
;
/** 技术专家总分 */
@ApiModelProperty
(
value
=
"技术专家总分"
,
position
=
4
)
private
BigDecimal
technologyScore
;
/** 技术专家平均分 */
@ApiModelProperty
(
value
=
"技术专家平均分"
,
position
=
4
)
private
BigDecimal
technologyAverageScore
;
/** 财务专家总分 */
@ApiModelProperty
(
value
=
"财务专家总分"
,
position
=
4
)
private
BigDecimal
economyScore
;
/** 财务专家平均分 */
@ApiModelProperty
(
value
=
"财务专家平均分"
,
position
=
4
)
private
BigDecimal
economyAverageScore
;
/** 计算得分 */
@ApiModelProperty
(
value
=
"计算得分"
,
position
=
4
)
private
BigDecimal
calculateScore
;
/** 项目完成状态 */
/** 项目完成状态 */
@ApiModelProperty
(
value
=
"项目完成状态"
,
position
=
38
)
@ApiModelProperty
(
value
=
"项目完成状态"
,
position
=
38
)
...
...
science-admin/src/main/java/com/yiboshi/science/service/impl/ComPersonServiceImpl.java
View file @
7f864777
...
@@ -239,10 +239,10 @@ public class ComPersonServiceImpl extends BaseServiceImpl<ComPersonDAO, ComPerso
...
@@ -239,10 +239,10 @@ public class ComPersonServiceImpl extends BaseServiceImpl<ComPersonDAO, ComPerso
ComPersonDTO
dto
=
comPersonDAO
.
getPersonById
(
id
);
ComPersonDTO
dto
=
comPersonDAO
.
getPersonById
(
id
);
if
(
dto
!=
null
&&
!
SecurityUserHolder
.
getRoles
().
contains
(
CommonEnum
.
systemRole
.
sys
.
getCode
().
toString
())
&&
!
SecurityUserHolder
.
getRoles
().
contains
(
CommonEnum
.
systemRole
.
personal
.
getCode
().
toString
()))
{
if
(
dto
!=
null
&&
!
SecurityUserHolder
.
getRoles
().
contains
(
CommonEnum
.
systemRole
.
sys
.
getCode
().
toString
())
&&
!
SecurityUserHolder
.
getRoles
().
contains
(
CommonEnum
.
systemRole
.
personal
.
getCode
().
toString
()))
{
if
(
Objects
.
nonNull
(
dto
.
getCertId
()))
{
if
(
Objects
.
nonNull
(
dto
.
getCertId
()))
{
dto
.
setCertId
(
hideAllIdCardNum
(
dto
.
getCertId
()));
//
dto.setCertId(hideAllIdCardNum(dto.getCertId()));
}
}
if
(
Objects
.
nonNull
(
dto
.
getMobile
()))
{
if
(
Objects
.
nonNull
(
dto
.
getMobile
()))
{
dto
.
setMobile
(
hideAllPhoneNum
(
dto
.
getMobile
()));
//
dto.setMobile(hideAllPhoneNum(dto.getMobile()));
}
}
}
}
return
dto
;
return
dto
;
...
...
science-admin/src/main/java/com/yiboshi/science/service/impl/ComProjectAssignServiceImpl.java
View file @
7f864777
...
@@ -37,6 +37,10 @@ public class ComProjectAssignServiceImpl extends BaseServiceImpl<ComProjectAssig
...
@@ -37,6 +37,10 @@ public class ComProjectAssignServiceImpl extends BaseServiceImpl<ComProjectAssig
private
ComBatchService
comBatchService
;
private
ComBatchService
comBatchService
;
@Autowired
@Autowired
private
ComExpertSpecService
comExpertSpecService
;
private
ComExpertSpecService
comExpertSpecService
;
@Autowired
private
ComProjectService
comProjectService
;
@Autowired
@Autowired
private
SystemParameterService
systemParameterService
;
private
SystemParameterService
systemParameterService
;
...
@@ -193,43 +197,72 @@ public class ComProjectAssignServiceImpl extends BaseServiceImpl<ComProjectAssig
...
@@ -193,43 +197,72 @@ public class ComProjectAssignServiceImpl extends BaseServiceImpl<ComProjectAssig
public
void
updateAssignState
(
String
projectId
)
{
public
void
updateAssignState
(
String
projectId
)
{
Integer
assignState
;
Integer
assignState
;
Integer
completed
;
Integer
completed
;
BigDecimal
totalScore
=
new
BigDecimal
(
0
);
BigDecimal
totalScore
=
new
BigDecimal
(
0
);
BigDecimal
averageScore
=
new
BigDecimal
(
0
);
BigDecimal
calculateScore
=
new
BigDecimal
(
0
);
BigDecimal
technologyScore
=
new
BigDecimal
(
0
);
BigDecimal
technologyAverageScore
=
new
BigDecimal
(
0
);
BigDecimal
economyScore
=
new
BigDecimal
(
0
);
BigDecimal
economyAverageScore
=
new
BigDecimal
(
0
);
List
<
ComProjectAssignDTO
>
list
=
this
.
getAssignExpertList
(
projectId
);
List
<
ComProjectAssignDTO
>
list
=
this
.
getAssignExpertList
(
projectId
);
if
(
null
==
list
||
list
.
size
()
==
0
)
{
if
(
null
==
list
||
list
.
size
()
==
0
)
{
completed
=
0
;
completed
=
0
;
assignState
=
0
;
assignState
=
0
;
}
else
{
}
else
{
int
scoreCount
=
0
;
int
technologyCount
=
0
;
int
economyCount
=
0
;
int
personCount
=
0
;
for
(
ComProjectAssignDTO
obj
:
list
)
{
for
(
ComProjectAssignDTO
obj
:
list
)
{
if
(
Objects
.
nonNull
(
obj
.
getTotalScore
())
&&
Objects
.
nonNull
(
obj
.
getAuditState
())
&&
obj
.
getAuditState
().
equals
(
2
))
{
if
(
Objects
.
nonNull
(
obj
.
getAuditState
())
&&
obj
.
getAuditState
().
equals
(
2
))
{
scoreCount
++;
personCount
++;
totalScore
=
totalScore
.
add
(
obj
.
getTotalScore
());
if
(
Objects
.
nonNull
(
obj
.
getTotalScore
()))
{
if
(
obj
.
getExpertType
().
equals
(
1
))
{
technologyCount
++;
technologyScore
=
technologyScore
.
add
(
obj
.
getTotalScore
());
}
else
{
economyCount
++;
economyScore
=
economyScore
.
add
(
obj
.
getTotalScore
());
}
}
}
}
}
}
if
(
scoreCount
>
0
)
{
DecimalFormat
df1
=
new
DecimalFormat
(
"0.00"
);
DecimalFormat
df1
=
new
DecimalFormat
(
"0.00"
);
if
(
technologyCount
>
0
)
{
averageScore
=
totalScore
.
divide
(
new
BigDecimal
(
scoreCount
),
2
,
BigDecimal
.
ROUND_HALF_UP
);
technologyAverageScore
=
technologyScore
.
divide
(
new
BigDecimal
(
technologyCount
),
2
,
BigDecimal
.
ROUND_HALF_UP
);
totalScore
=
new
BigDecimal
(
df1
.
format
(
totalScore
));
technologyScore
=
new
BigDecimal
(
df1
.
format
(
technologyScore
));
}
if
(
economyCount
>
0
)
{
economyAverageScore
=
economyScore
.
divide
(
new
BigDecimal
(
economyCount
),
2
,
BigDecimal
.
ROUND_HALF_UP
);
economyScore
=
new
BigDecimal
(
df1
.
format
(
economyScore
));
}
}
if
(
list
.
size
()
>
scoreCount
)
totalScore
=
technologyScore
.
add
(
economyScore
);
calculateScore
=
technologyAverageScore
.
multiply
(
new
BigDecimal
(
0.8
)).
add
(
economyAverageScore
.
multiply
(
new
BigDecimal
(
0.2
)));
if
(
list
.
size
()
>
personCount
)
completed
=
0
;
completed
=
0
;
else
else
completed
=
1
;
completed
=
1
;
assignState
=
1
;
assignState
=
1
;
}
}
this
.
updateAssignState
(
projectId
,
assignState
,
completed
,
totalScore
,
averag
eScore
);
this
.
updateAssignState
(
projectId
,
assignState
,
completed
,
totalScore
,
technologyScore
,
technologyAverageScore
,
economyScore
,
economyAverageScore
,
calculat
eScore
);
}
}
public
void
updateAssignState
(
String
projectId
,
Integer
assignState
,
Integer
completed
,
BigDecimal
totalScore
,
BigDecimal
averag
eScore
)
{
public
void
updateAssignState
(
String
projectId
,
Integer
assignState
,
Integer
completed
,
BigDecimal
totalScore
,
BigDecimal
technologyScore
,
BigDecimal
technologyAverageScore
,
BigDecimal
economyScore
,
BigDecimal
economyAverageScore
,
BigDecimal
calculat
eScore
)
{
ComProject
comProject
=
new
ComProject
();
ComProject
comProject
=
new
ComProject
();
comProject
.
setId
(
projectId
);
comProject
.
setId
(
projectId
);
comProject
.
setAssignState
(
assignState
);
comProject
.
setAssignState
(
assignState
);
comProject
.
setCompleted
(
completed
);
comProject
.
setCompleted
(
completed
);
comProject
.
setTotalScore
(
totalScore
);
comProject
.
setTotalScore
(
totalScore
);
comProject
.
setAverageScore
(
averageScore
);
comProject
.
setTechnologyScore
(
technologyScore
);
comProject
.
setTechnologyAverageScore
(
technologyAverageScore
);
comProject
.
setEconomyScore
(
economyScore
);
comProject
.
setEconomyAverageScore
(
economyAverageScore
);
comProject
.
setCalculateScore
(
calculateScore
);
comProject
.
setUpdated
(
new
Date
());
comProject
.
setUpdated
(
new
Date
());
comProject
AssignDAO
.
updateAssignSt
ate
(
comProject
);
comProject
Service
.
upd
ate
(
comProject
);
}
}
public
List
<
ComProjectGroupDTO
>
getProjectGroupAssignById
(
String
id
,
String
expertId
)
{
public
List
<
ComProjectGroupDTO
>
getProjectGroupAssignById
(
String
id
,
String
expertId
)
{
...
...
science-admin/src/main/java/com/yiboshi/science/service/impl/ComProjectServiceImpl.java
View file @
7f864777
...
@@ -585,6 +585,7 @@ public class ComProjectServiceImpl extends BaseServiceImpl<ComProjectDAO, ComPro
...
@@ -585,6 +585,7 @@ public class ComProjectServiceImpl extends BaseServiceImpl<ComProjectDAO, ComPro
private
void
loadPersonInfo
(
ComProjectDTO
dto
,
ComPersonDTO
comPersonDTO
)
{
private
void
loadPersonInfo
(
ComProjectDTO
dto
,
ComPersonDTO
comPersonDTO
)
{
dto
.
setAppPersonName
(
comPersonDTO
.
getPersonName
());
dto
.
setAppPersonName
(
comPersonDTO
.
getPersonName
());
dto
.
setCertId
(
comPersonDTO
.
getCertId
());
dto
.
setSex
(
comPersonDTO
.
getSex
());
dto
.
setSex
(
comPersonDTO
.
getSex
());
dto
.
setBirthday
(
comPersonDTO
.
getBirthday
());
dto
.
setBirthday
(
comPersonDTO
.
getBirthday
());
dto
.
setNationName
(
comPersonDTO
.
getNationName
());
dto
.
setNationName
(
comPersonDTO
.
getNationName
());
...
...
science-admin/src/main/resources/mapper/ComProjectAssignDAO.xml
View file @
7f864777
...
@@ -67,16 +67,5 @@
...
@@ -67,16 +67,5 @@
where a.id = #{id} and c.expert_id = #{expertId} and d.id is not null
where a.id = #{id} and c.expert_id = #{expertId} and d.id is not null
</select>
</select>
<update
id=
"updateAssignState"
>
update com_project
<set>
assign_state = #{assignState},
completed = #{completed},
total_score = #{totalScore},
average_score = #{averageScore},
updated = #{updated,jdbcType=TIMESTAMP},
</set>
where id = #{id}
</update>
</mapper>
</mapper>
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