Merge remote-tracking branch 'origin/bd_dev' into bd_dev

This commit is contained in:
sangelxiu1 2025-08-01 15:43:25 +08:00
commit 80a5eadb9a
2 changed files with 13 additions and 4 deletions

View File

@ -436,8 +436,8 @@ public class CuMemberAssessServiceImpl extends ServiceImpl<CuMemberAssessMapper,
// 查询区域省区配置
Map<Integer, BdAwardsRegionConfigExt> regionConfigMap = iBdAwardsRegionConfigServiceApi.getAwardsRegionConfig().getData();
// 考核时间当月最后一天2025-07-25 23:59:59往前推2个月 -- 这2个月新选的不需要处理
Date assessDate = DateUtils.getEndTime(DateUtils.addMonths(currentSettleDate, -2));
// 考核时间当月最后一天2025-07-31 23:59:59往前推1个月 -- 这1个月新选的不需要处理
Date assessDate = DateUtils.getEndTime(DateUtils.addMonths(currentSettleDate, -1));
// 本月考核本月最后一天
String assessTableName = TableNameConstants.CU_MEMBER_ASSESS + DateUtils.getMonth(settleDate);
// 初始化本次考核会员数据

View File

@ -567,6 +567,10 @@
when cmrr.city != 0 and cmrr.county != 0 then #{county.smallAssess}
end assess_target,
case
when #{assessDate} >= cmrr.creation_time then 1
else 0
end is_examine,
case
when #{assessDate} >= cmrr.creation_time then 2
else 1
end assess_status,
@ -581,6 +585,7 @@
pk_member,
assess_type,
assess_pk_awards,
is_examine,
assess_target,
assess_status,
pk_creator,
@ -589,6 +594,7 @@
tmp.pk_member,
tmp.assess_type,
tmp.assess_pk_awards,
tmp.is_examine,
tmp.assess_target,
tmp.assess_status,
tmp.pk_creator,
@ -623,6 +629,7 @@
(select distinct cma.pk_member
from ${accessTableName} cma
where cma.del_flag = 0
and cma.is_examine = 1
and cma.assess_type in (6, 7, 8))) a
left join (select cms.pk_member,
cms.a_sum_pv,
@ -634,10 +641,11 @@
(select distinct cma.pk_member
from ${accessTableName} cma
where cma.del_flag = 0
and cma.is_examine = 1
and cma.assess_type in (6, 7, 8))) b
on a.pk_member = b.pk_member) t
) tmp
on (cma.pk_member = tmp.pk_member and cma.assess_type in (6, 7, 8) and cma.del_flag = 0)
on (cma.pk_member = tmp.pk_member and cma.is_examine = 1 and cma.assess_type in (6, 7, 8) and cma.del_flag = 0)
when matched then
update set cma.pk_awards = tmp.pk_awards,
cma.month_add = tmp.small_pv,
@ -658,6 +666,7 @@
on ba.pk_id = cma.pk_awards
where cma.del_flag = 0
and cma.assess_type in (6, 7, 8)
and cma.is_examine = 1
and cma.assess_status != 1
and ba.awards_value >= baa.awards_value
and cma.month_add >= cma.assess_target
@ -679,7 +688,7 @@
when t.city != 0 and t.county = 0 then 7
when t.city != 0 and t.county != 0 then 8
end assess_type
from CU_MEMBER_RETAIL_REGION t
from cu_member_retail_region t
where t.del_flag = 0
and t.effective = 0) cmrr
on cmrr.pk_member = cma.pk_member and cmrr.assess_type = cma.assess_type