Commit 004afafe by wenyang

1.活动量分值详情显示错误

2.战队销售业绩预测(预计)显示错误
parent a789490a
...@@ -2604,9 +2604,13 @@ public class PractitionerServiceImpl implements com.yd.api.practitioner.service. ...@@ -2604,9 +2604,13 @@ public class PractitionerServiceImpl implements com.yd.api.practitioner.service.
} }
//总预测值 //总预测值
BigDecimal quarterGoal = BigDecimal.ZERO; BigDecimal quarterGoal = BigDecimal.ZERO;
BigDecimal defaultPremium = BigDecimal.ZERO;
Integer defaultPieces = 0;
for (MktLeadsGoals leadsGoals : mktLeadsGoalsList) { for (MktLeadsGoals leadsGoals : mktLeadsGoalsList) {
if (leadsGoals.getStatisticTimeUnit() == 1) { if (leadsGoals.getStatisticTimeUnit() == 1) {
quarterGoal = quarterGoal.add(BigDecimal.valueOf(leadsGoals.getCommission())); quarterGoal = quarterGoal.add(BigDecimal.valueOf(leadsGoals.getCommission()));
defaultPremium = defaultPremium.add(BigDecimal.valueOf(leadsGoals.getPremium()));
defaultPieces = defaultPieces + leadsGoals.getPieces();
} }
} }
...@@ -2615,8 +2619,7 @@ public class PractitionerServiceImpl implements com.yd.api.practitioner.service. ...@@ -2615,8 +2619,7 @@ public class PractitionerServiceImpl implements com.yd.api.practitioner.service.
List<MktLeadsAssigneds> mktLeadsAssignedsList = (List<MktLeadsAssigneds>) CollectionUtils.select(mktLeadsAssigneds, predicate); List<MktLeadsAssigneds> mktLeadsAssignedsList = (List<MktLeadsAssigneds>) CollectionUtils.select(mktLeadsAssigneds, predicate);
BigDecimal defaultCommission = BigDecimal.ZERO; BigDecimal defaultCommission = BigDecimal.ZERO;
BigDecimal defaultPremium = BigDecimal.ZERO; defaultCommission = quarterGoal;
Integer defaultPieces = 0;
for (MktLeadsAssigneds leadsAssigneds : mktLeadsAssignedsList) { for (MktLeadsAssigneds leadsAssigneds : mktLeadsAssignedsList) {
String timeToClose = CommonUtil.dateParseString(leadsAssigneds.getTimeToClose(), "yyyy-MM-dd"); String timeToClose = CommonUtil.dateParseString(leadsAssigneds.getTimeToClose(), "yyyy-MM-dd");
if (CommonUtil.isNullOrBlank(timeToClose)) { if (CommonUtil.isNullOrBlank(timeToClose)) {
...@@ -2665,6 +2668,9 @@ public class PractitionerServiceImpl implements com.yd.api.practitioner.service. ...@@ -2665,6 +2668,9 @@ public class PractitionerServiceImpl implements com.yd.api.practitioner.service.
} }
//总预测值 //总预测值
BigDecimal quarterGoal = BigDecimal.ZERO; BigDecimal quarterGoal = BigDecimal.ZERO;
BigDecimal defaultPremium = BigDecimal.ZERO;
Integer defaultPieces = 0;
for (MktLeadsGoals leadsGoals : mktLeadsGoalsList) { for (MktLeadsGoals leadsGoals : mktLeadsGoalsList) {
if (leadsGoals.getStatisticTimeUnit() == 3) { if (leadsGoals.getStatisticTimeUnit() == 3) {
//月目标 //月目标
...@@ -2672,6 +2678,8 @@ public class PractitionerServiceImpl implements com.yd.api.practitioner.service. ...@@ -2672,6 +2678,8 @@ public class PractitionerServiceImpl implements com.yd.api.practitioner.service.
Integer monthNum = leadsGoals.getSeqTime(); Integer monthNum = leadsGoals.getSeqTime();
if (Arrays.asList(quarter).contains(monthNum)) { if (Arrays.asList(quarter).contains(monthNum)) {
quarterGoal = quarterGoal.add(BigDecimal.valueOf(leadsGoals.getCommission())); quarterGoal = quarterGoal.add(BigDecimal.valueOf(leadsGoals.getCommission()));
defaultPremium = defaultPremium.add(BigDecimal.valueOf(leadsGoals.getPremium()));
defaultPieces = defaultPieces + leadsGoals.getPieces();
} }
} }
} }
...@@ -2681,8 +2689,7 @@ public class PractitionerServiceImpl implements com.yd.api.practitioner.service. ...@@ -2681,8 +2689,7 @@ public class PractitionerServiceImpl implements com.yd.api.practitioner.service.
List<MktLeadsAssigneds> mktLeadsAssignedsList = (List<MktLeadsAssigneds>) CollectionUtils.select(mktLeadsAssigneds, predicate); List<MktLeadsAssigneds> mktLeadsAssignedsList = (List<MktLeadsAssigneds>) CollectionUtils.select(mktLeadsAssigneds, predicate);
BigDecimal defaultCommission = BigDecimal.ZERO; BigDecimal defaultCommission = BigDecimal.ZERO;
BigDecimal defaultPremium = BigDecimal.ZERO; defaultCommission = quarterGoal;
Integer defaultPieces = 0;
for (MktLeadsAssigneds leadsAssigneds : mktLeadsAssignedsList) { for (MktLeadsAssigneds leadsAssigneds : mktLeadsAssignedsList) {
String timeToClose = CommonUtil.dateParseString(leadsAssigneds.getTimeToClose(), "yyyy-MM-dd"); String timeToClose = CommonUtil.dateParseString(leadsAssigneds.getTimeToClose(), "yyyy-MM-dd");
if (CommonUtil.isNullOrBlank(timeToClose)) { if (CommonUtil.isNullOrBlank(timeToClose)) {
......
...@@ -307,6 +307,6 @@ ...@@ -307,6 +307,6 @@
and not EXISTS (select t.leads_assigned_id and not EXISTS (select t.leads_assigned_id
from ag_mkt_leads_assigned_track t from ag_mkt_leads_assigned_track t
where t.md_drop_option_id = #{dropOptionsId,jdbcType=BIGINT} where t.md_drop_option_id = #{dropOptionsId,jdbcType=BIGINT}
and a.id = t.leads_assigned_id); and a.id = t.leads_assigned_id)
</select> </select>
</mapper> </mapper>
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment