Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
L
lingxi-lxy-yanshou
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
后端-黄柯铭
lingxi-lxy-yanshou
Commits
6d1e7585
Commit
6d1e7585
authored
Aug 06, 2021
by
yzc
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: 会员考评首页统计修改
parent
40d0d787
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
38 additions
and
5 deletions
+38
-5
MemberAppraisalItemStatusEnum.java
...erchant/model/constant/MemberAppraisalItemStatusEnum.java
+1
-1
IReportFeignService.java
...xi/member/merchant/service/feign/IReportFeignService.java
+10
-0
ReportFeignServiceImpl.java
...er/merchant/serviceimpl/feign/ReportFeignServiceImpl.java
+17
-4
MemberAppraisalServiceImpl.java
.../merchant/serviceimpl/web/MemberAppraisalServiceImpl.java
+10
-0
No files found.
merchant-member-service/src/main/java/com/ssy/lingxi/member/merchant/model/constant/MemberAppraisalItemStatusEnum.java
View file @
6d1e7585
...
@@ -11,7 +11,7 @@ import java.util.Arrays;
...
@@ -11,7 +11,7 @@ import java.util.Arrays;
public
enum
MemberAppraisalItemStatusEnum
{
public
enum
MemberAppraisalItemStatusEnum
{
/**
/**
* 待
发布考评表
- 0
* 待
考评打分
- 0
*/
*/
WAIT_GRADE
(
0
,
"待考评打分"
),
WAIT_GRADE
(
0
,
"待考评打分"
),
...
...
merchant-member-service/src/main/java/com/ssy/lingxi/member/merchant/service/feign/IReportFeignService.java
View file @
6d1e7585
...
@@ -24,11 +24,21 @@ public interface IReportFeignService {
...
@@ -24,11 +24,21 @@ public interface IReportFeignService {
void
increaseReport
(
Integer
dataSource
,
Integer
operateType
,
Long
memberId
,
Long
roleId
);
void
increaseReport
(
Integer
dataSource
,
Integer
operateType
,
Long
memberId
,
Long
roleId
);
/**
/**
* 首页统计增加(数量)
*/
void
increaseReport
(
Integer
dataSource
,
Integer
operateType
,
Long
memberId
,
Long
roleId
,
Integer
count
);
/**
* 首页统计减少
* 首页统计减少
*/
*/
void
reduceReport
(
Integer
dataSource
,
Integer
operateType
,
Long
memberId
,
Long
roleId
);
void
reduceReport
(
Integer
dataSource
,
Integer
operateType
,
Long
memberId
,
Long
roleId
);
/**
/**
* 首页统计减少(数量)
*/
void
reduceReport
(
Integer
dataSource
,
Integer
operateType
,
Long
memberId
,
Long
roleId
,
Integer
count
);
/**
* 首页统计一方减少一方增加
* 首页统计一方减少一方增加
*/
*/
void
reduceAndIncreaseReport
(
Integer
dataSource
,
Integer
operateType
,
Long
memberId
,
Long
roleId
,
void
reduceAndIncreaseReport
(
Integer
dataSource
,
Integer
operateType
,
Long
memberId
,
Long
roleId
,
...
...
merchant-member-service/src/main/java/com/ssy/lingxi/member/merchant/serviceimpl/feign/ReportFeignServiceImpl.java
View file @
6d1e7585
...
@@ -94,9 +94,15 @@ public class ReportFeignServiceImpl implements IReportFeignService {
...
@@ -94,9 +94,15 @@ public class ReportFeignServiceImpl implements IReportFeignService {
}
}
}
}
@Async
@Override
@Override
public
void
increaseReport
(
Integer
dataSource
,
Integer
operateType
,
Long
memberId
,
Long
roleId
)
{
public
void
increaseReport
(
Integer
dataSource
,
Integer
operateType
,
Long
memberId
,
Long
roleId
)
{
this
.
increaseReport
(
dataSource
,
operateType
,
memberId
,
roleId
,
1
);
}
@Async
@Override
public
void
increaseReport
(
Integer
dataSource
,
Integer
operateType
,
Long
memberId
,
Long
roleId
,
Integer
count
)
{
List
<
OperateNoticeVO
>
operateNoticeVOList
=
new
ArrayList
<>();
List
<
OperateNoticeVO
>
operateNoticeVOList
=
new
ArrayList
<>();
// 待发送 - 增加
// 待发送 - 增加
OperateNoticeVO
increaseOperateNotice
=
new
OperateNoticeVO
();
OperateNoticeVO
increaseOperateNotice
=
new
OperateNoticeVO
();
...
@@ -104,7 +110,7 @@ public class ReportFeignServiceImpl implements IReportFeignService {
...
@@ -104,7 +110,7 @@ public class ReportFeignServiceImpl implements IReportFeignService {
increaseOperateNotice
.
setRoleId
(
roleId
);
increaseOperateNotice
.
setRoleId
(
roleId
);
increaseOperateNotice
.
setDataSource
(
dataSource
);
increaseOperateNotice
.
setDataSource
(
dataSource
);
increaseOperateNotice
.
setIncreaseOperateType
(
operateType
);
increaseOperateNotice
.
setIncreaseOperateType
(
operateType
);
increaseOperateNotice
.
setIncreaseCount
(
1L
);
increaseOperateNotice
.
setIncreaseCount
(
Long
.
valueOf
(
count
)
);
operateNoticeVOList
.
add
(
increaseOperateNotice
);
operateNoticeVOList
.
add
(
increaseOperateNotice
);
try
{
try
{
...
@@ -114,9 +120,15 @@ public class ReportFeignServiceImpl implements IReportFeignService {
...
@@ -114,9 +120,15 @@ public class ReportFeignServiceImpl implements IReportFeignService {
}
}
}
}
@Async
@Override
@Override
public
void
reduceReport
(
Integer
dataSource
,
Integer
operateType
,
Long
memberId
,
Long
roleId
)
{
public
void
reduceReport
(
Integer
dataSource
,
Integer
operateType
,
Long
memberId
,
Long
roleId
)
{
this
.
reduceReport
(
dataSource
,
operateType
,
memberId
,
roleId
,
1
);
}
@Async
@Override
public
void
reduceReport
(
Integer
dataSource
,
Integer
operateType
,
Long
memberId
,
Long
roleId
,
Integer
count
)
{
List
<
OperateNoticeVO
>
operateNoticeVOList
=
new
ArrayList
<>();
List
<
OperateNoticeVO
>
operateNoticeVOList
=
new
ArrayList
<>();
// 待整改 - 减少
// 待整改 - 减少
OperateNoticeVO
reduceOperateNotice
=
new
OperateNoticeVO
();
OperateNoticeVO
reduceOperateNotice
=
new
OperateNoticeVO
();
...
@@ -124,7 +136,7 @@ public class ReportFeignServiceImpl implements IReportFeignService {
...
@@ -124,7 +136,7 @@ public class ReportFeignServiceImpl implements IReportFeignService {
reduceOperateNotice
.
setRoleId
(
roleId
);
reduceOperateNotice
.
setRoleId
(
roleId
);
reduceOperateNotice
.
setDataSource
(
dataSource
);
reduceOperateNotice
.
setDataSource
(
dataSource
);
reduceOperateNotice
.
setReduceOperateType
(
operateType
);
reduceOperateNotice
.
setReduceOperateType
(
operateType
);
reduceOperateNotice
.
setReduceCount
(
1L
);
reduceOperateNotice
.
setReduceCount
(
Long
.
valueOf
(
count
)
);
operateNoticeVOList
.
add
(
reduceOperateNotice
);
operateNoticeVOList
.
add
(
reduceOperateNotice
);
try
{
try
{
...
@@ -134,6 +146,7 @@ public class ReportFeignServiceImpl implements IReportFeignService {
...
@@ -134,6 +146,7 @@ public class ReportFeignServiceImpl implements IReportFeignService {
}
}
}
}
@Async
@Async
@Override
@Override
public
void
reduceAndIncreaseReport
(
Integer
dataSource
,
Integer
operateType
,
Long
memberId
,
Long
roleId
,
Integer
subDataSource
,
Integer
subOperateType
,
Long
subMemberId
,
Long
subRoleId
)
{
public
void
reduceAndIncreaseReport
(
Integer
dataSource
,
Integer
operateType
,
Long
memberId
,
Long
roleId
,
Integer
subDataSource
,
Integer
subOperateType
,
Long
subMemberId
,
Long
subRoleId
)
{
...
...
merchant-member-service/src/main/java/com/ssy/lingxi/member/merchant/serviceimpl/web/MemberAppraisalServiceImpl.java
View file @
6d1e7585
...
@@ -1032,6 +1032,8 @@ public class MemberAppraisalServiceImpl implements IMemberAppraisalService {
...
@@ -1032,6 +1032,8 @@ public class MemberAppraisalServiceImpl implements IMemberAppraisalService {
// 根据itemIds查询考评项目
// 根据itemIds查询考评项目
List
<
Long
>
itemIdList
=
submitVO
.
getItems
().
stream
().
map
(
MemberAppraisalItemSubmitVO:
:
getId
).
collect
(
Collectors
.
toList
());
List
<
Long
>
itemIdList
=
submitVO
.
getItems
().
stream
().
map
(
MemberAppraisalItemSubmitVO:
:
getId
).
collect
(
Collectors
.
toList
());
List
<
MemberAppraisalItemDO
>
items
=
memberAppraisalItemRepository
.
findAllById
(
itemIdList
);
List
<
MemberAppraisalItemDO
>
items
=
memberAppraisalItemRepository
.
findAllById
(
itemIdList
);
// 未打分的考评打分数量
int
notGradeCount
=
0
;
for
(
MemberAppraisalItemDO
item
:
items
)
{
for
(
MemberAppraisalItemDO
item
:
items
)
{
// 判断是否属于同一考评
// 判断是否属于同一考评
if
(!
item
.
getAppraisal
().
getId
().
equals
(
memberAppraisalDO
.
getId
()))
{
if
(!
item
.
getAppraisal
().
getId
().
equals
(
memberAppraisalDO
.
getId
()))
{
...
@@ -1044,6 +1046,11 @@ public class MemberAppraisalServiceImpl implements IMemberAppraisalService {
...
@@ -1044,6 +1046,11 @@ public class MemberAppraisalServiceImpl implements IMemberAppraisalService {
return
Wrapper
.
fail
(
ResponseCode
.
MC_MS_APPRAISAL_ITEM_NO_RELATION
);
return
Wrapper
.
fail
(
ResponseCode
.
MC_MS_APPRAISAL_ITEM_NO_RELATION
);
}
}
// 统计未打分数量
if
(
MemberAppraisalItemStatusEnum
.
WAIT_GRADE
.
getCode
().
equals
(
item
.
getStatus
()))
{
notGradeCount
++;
}
item
.
setScoreWeight
(
itemSubmitVO
.
getScoreWeight
());
item
.
setScoreWeight
(
itemSubmitVO
.
getScoreWeight
());
BigDecimal
grade
=
Objects
.
isNull
(
itemSubmitVO
.
getGrade
())
?
BigDecimal
.
ZERO
:
itemSubmitVO
.
getGrade
();
BigDecimal
grade
=
Objects
.
isNull
(
itemSubmitVO
.
getGrade
())
?
BigDecimal
.
ZERO
:
itemSubmitVO
.
getGrade
();
item
.
setGrade
(
grade
);
item
.
setGrade
(
grade
);
...
@@ -1075,6 +1082,9 @@ public class MemberAppraisalServiceImpl implements IMemberAppraisalService {
...
@@ -1075,6 +1082,9 @@ public class MemberAppraisalServiceImpl implements IMemberAppraisalService {
// 首页统计
// 首页统计
reportFeignService
.
reduceAndIncreaseReport
(
OperateDataSourceEnum
.
MEMBER_KPI
.
getCode
(),
MemberKpiOperateTypeEnum
.
TO_BE_COMMIT_COUNT
.
getCode
(),
memberAppraisalDO
.
getMember
().
getId
(),
memberAppraisalDO
.
getRole
().
getId
(),
reportFeignService
.
reduceAndIncreaseReport
(
OperateDataSourceEnum
.
MEMBER_KPI
.
getCode
(),
MemberKpiOperateTypeEnum
.
TO_BE_COMMIT_COUNT
.
getCode
(),
memberAppraisalDO
.
getMember
().
getId
(),
memberAppraisalDO
.
getRole
().
getId
(),
OperateDataSourceEnum
.
MEMBER_KPI
.
getCode
(),
MemberKpiOperateTypeEnum
.
TO_BE_VALIFY_STEP1_COUNT
.
getCode
(),
memberAppraisalDO
.
getMember
().
getId
(),
memberAppraisalDO
.
getRole
().
getId
());
OperateDataSourceEnum
.
MEMBER_KPI
.
getCode
(),
MemberKpiOperateTypeEnum
.
TO_BE_VALIFY_STEP1_COUNT
.
getCode
(),
memberAppraisalDO
.
getMember
().
getId
(),
memberAppraisalDO
.
getRole
().
getId
());
// 减少剩余打分的数量
reportFeignService
.
reduceReport
(
OperateDataSourceEnum
.
MEMBER_KPI
.
getCode
(),
MemberKpiOperateTypeEnum
.
TO_BE_SCORING_COUNT
.
getCode
(),
memberAppraisalDO
.
getMember
().
getId
(),
memberAppraisalDO
.
getRole
().
getId
(),
notGradeCount
);
// 发送消息
// 发送消息
messageFeignService
.
sendSystemMessage
(
memberAppraisalDO
.
getMember
().
getId
(),
memberAppraisalDO
.
getRole
().
getId
(),
messageFeignService
.
sendSystemMessage
(
memberAppraisalDO
.
getMember
().
getId
(),
memberAppraisalDO
.
getRole
().
getId
(),
...
...
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