|
@@ -630,14 +630,14 @@ public class PerformanceServiceImpl2 extends ServiceImpl<PerformanceMapper, Perf
|
|
|
String endTime = quarterStartEndDateMap.get("endDate");
|
|
|
|
|
|
//编导
|
|
|
- //kuaishouPlanPerformance(thisYear, thisQuarter, startTime, endTime);
|
|
|
+ kuaishouPlanPerformance(thisYear, thisQuarter, startTime, endTime);
|
|
|
//拍摄
|
|
|
- //kuaishouShotPerformance(thisYear, thisQuarter, startTime, endTime);
|
|
|
+ kuaishouShotPerformance(thisYear, thisQuarter, startTime, endTime);
|
|
|
//剪辑
|
|
|
- //kuaishouClipPerformance(thisYear, thisQuarter, startTime, endTime);
|
|
|
- //平面设计
|
|
|
+ kuaishouClipPerformance(thisYear, thisQuarter, startTime, endTime);
|
|
|
+ //平面设计、设计师leader写在一起
|
|
|
kuaishouPlanePerformance(thisYear, thisQuarter, startTime, endTime);
|
|
|
- //设计师leader
|
|
|
+ //设计师leader 废弃
|
|
|
//kuaishouDesignLeaderPerformance(thisYear, thisQuarter, startTime, endTime);
|
|
|
|
|
|
log.info(thisYear + "年第" + thisQuarter + "季度快手设计师季度绩效计算开始");
|
|
@@ -659,7 +659,7 @@ public class PerformanceServiceImpl2 extends ServiceImpl<PerformanceMapper, Perf
|
|
|
toutiaoClipPerformance(thisYear, thisQuarter, startTime, endTime);
|
|
|
//平面设计、设计师leader写在一起
|
|
|
toutiaoPlanePerformance(thisYear, thisQuarter, startTime, endTime);
|
|
|
- //设计师leader
|
|
|
+ //设计师leader 废弃
|
|
|
//toutiaoDesignLeaderPerformance(thisYear, thisQuarter, startTime, endTime);
|
|
|
|
|
|
log.info(thisYear + "年第" + thisQuarter + "头条设计师季度绩效计算开始");
|
|
@@ -704,7 +704,7 @@ public class PerformanceServiceImpl2 extends ServiceImpl<PerformanceMapper, Perf
|
|
|
//循环前30%有绩效的人数并计算其绩效,并入库
|
|
|
for (int i = 0; i <= top30 - 1; i++) {
|
|
|
//总消耗--获取这个人的总消耗
|
|
|
- BigDecimal totalCost = userEfficientVideoMapMapper.getTotalCostByPlanId(planList.get(i).getUserId(), startTime, endTime);
|
|
|
+ BigDecimal totalCost = userEfficientVideoMapMapper.getQuarterTotalCostByRoleCode(thisYear, thisQuarter,startTime, endTime,"plan",planList.get(i).getUserId());
|
|
|
//总绩效=总消耗*提点比例(5‰)*提成比例(编导40%)
|
|
|
BigDecimal totalPerformance = BigDecimal.ZERO;
|
|
|
if(totalCost != null) {
|
|
@@ -732,7 +732,7 @@ public class PerformanceServiceImpl2 extends ServiceImpl<PerformanceMapper, Perf
|
|
|
//循环中间50%有绩效的人,计算绩效并入库
|
|
|
for (int i = 0; i <= middle50 - 1; i++) {
|
|
|
//总消耗--获取这个人所在项目的总消耗
|
|
|
- BigDecimal totalCost = userEfficientVideoMapMapper.getTotalCostByPlanId(planList.get(i).getUserId(), startTime, endTime);
|
|
|
+ BigDecimal totalCost = userEfficientVideoMapMapper.getQuarterTotalCostByRoleCode(thisYear, thisQuarter,startTime, endTime,"plan",planList.get(i).getUserId());
|
|
|
//总绩效=总消耗*提点比例(3‰)*提成比例(编导40%)
|
|
|
BigDecimal totalPerformance = BigDecimal.ZERO;
|
|
|
if(totalCost != null){
|
|
@@ -793,7 +793,7 @@ public class PerformanceServiceImpl2 extends ServiceImpl<PerformanceMapper, Perf
|
|
|
//循环前30%有绩效的人数并计算其绩效,并入库
|
|
|
for (int i = 0; i <= shotTop30 - 1; i++) {
|
|
|
//总消耗--获取这个人所在项目的总消耗
|
|
|
- BigDecimal totalCost = userEfficientVideoMapMapper.getTotalCostByShotId(shotList.get(i).getUserId(), startTime, endTime);
|
|
|
+ BigDecimal totalCost = userEfficientVideoMapMapper.getQuarterTotalCostByRoleCode(thisYear, thisQuarter,startTime, endTime,"shot",shotList.get(i).getUserId());
|
|
|
//总绩效=总消耗*提点比例(5‰)*提成比例(拍摄10%)
|
|
|
BigDecimal totalPerformance = BigDecimal.ZERO;
|
|
|
if(totalCost != null) {
|
|
@@ -821,7 +821,7 @@ public class PerformanceServiceImpl2 extends ServiceImpl<PerformanceMapper, Perf
|
|
|
//循环中间50%有绩效的人,计算绩效并入库
|
|
|
for (int i = 0; i <= shotMiddle50 - 1; i++) {
|
|
|
//总消耗--获取这个人所在项目的总消耗
|
|
|
- BigDecimal totalCost = userEfficientVideoMapMapper.getTotalCostByShotId(shotList.get(i).getUserId(), startTime, endTime);
|
|
|
+ BigDecimal totalCost = userEfficientVideoMapMapper.getQuarterTotalCostByRoleCode(thisYear, thisQuarter,startTime, endTime,"shot",shotList.get(i).getUserId());
|
|
|
//总绩效=总消耗*提点比例(3‰)*提成比例(拍摄10%)
|
|
|
BigDecimal totalPerformance = BigDecimal.ZERO;
|
|
|
if(totalCost != null) {
|
|
@@ -881,7 +881,7 @@ public class PerformanceServiceImpl2 extends ServiceImpl<PerformanceMapper, Perf
|
|
|
//循环前30%有绩效的人数并计算其绩效,并入库
|
|
|
for (int i = 0; i <= clipTop30 - 1; i++) {
|
|
|
//总消耗--获取这个人所在项目的总消耗
|
|
|
- BigDecimal totalCost = userEfficientVideoMapMapper.getTotalCostByClipId(clipList.get(i).getUserId(), startTime, endTime);
|
|
|
+ BigDecimal totalCost = userEfficientVideoMapMapper.getQuarterTotalCostByRoleCode(thisYear, thisQuarter,startTime, endTime,"clip",clipList.get(i).getUserId());
|
|
|
//总绩效=总消耗*提点比例(5‰)*提成比例(剪辑30%)
|
|
|
BigDecimal totalPerformance = BigDecimal.ZERO;
|
|
|
if(totalCost != null) {
|
|
@@ -909,7 +909,7 @@ public class PerformanceServiceImpl2 extends ServiceImpl<PerformanceMapper, Perf
|
|
|
//循环中间50%有绩效的人,计算绩效并入库
|
|
|
for (int i = 0; i <= clipMiddle50 - 1; i++) {
|
|
|
//总消耗--获取这个人所在项目的总消耗
|
|
|
- BigDecimal totalCost = userEfficientVideoMapMapper.getTotalCostByClipId(clipList.get(i).getUserId(), startTime, endTime);
|
|
|
+ BigDecimal totalCost = userEfficientVideoMapMapper.getQuarterTotalCostByRoleCode(thisYear, thisQuarter,startTime, endTime,"clip",clipList.get(i).getUserId());
|
|
|
//总绩效=总消耗*提点比例(3‰)*提成比例(剪辑30%)
|
|
|
BigDecimal totalPerformance = BigDecimal.ZERO;
|
|
|
if(totalCost != null) {
|
|
@@ -1064,11 +1064,11 @@ public class PerformanceServiceImpl2 extends ServiceImpl<PerformanceMapper, Perf
|
|
|
|
|
|
for (String key : designLeaderMap.keySet()) {
|
|
|
Performance performance = new Performance();
|
|
|
- performance.setAppType(1); //1头条 2快手
|
|
|
+ performance.setAppType(2); //1头条 2快手
|
|
|
performance.setRoleId(designLeaderMap.get(key).getRoleId());
|
|
|
performance.setQuarter(thisQuarter);
|
|
|
performance.setYear(thisYear);
|
|
|
- performance.setCommissionRate(new BigDecimal("0.002")); //头条平台比例2‰
|
|
|
+ performance.setCommissionRate(new BigDecimal("0.003")); //快手平台比例3‰
|
|
|
performance.setTotalCost(designLeaderMap.get(key).getCost());
|
|
|
performance.setTotalPerformance(designLeaderMap.get(key).getEffiRate()); //头条
|
|
|
//performance.setRoleCommissionRate(new BigDecimal("0.05"));
|
|
@@ -1117,7 +1117,7 @@ public class PerformanceServiceImpl2 extends ServiceImpl<PerformanceMapper, Perf
|
|
|
//循环前30%有绩效的人数并计算其绩效,并入库
|
|
|
for (int i = 0; i <= top30 - 1; i++) {
|
|
|
//头条编导总消耗
|
|
|
- BigDecimal totalCost = userEfficientVideoMapMapper.toutiaoGetTotalCostByPlanId(planList.get(i).getUserId(), startTime, endTime);
|
|
|
+ BigDecimal totalCost = userEfficientVideoMapMapper.getToutiaoQuarterTotalCostByRoleCode(thisYear, thisQuarter, startTime, endTime, "plan", planList.get(i).getUserId());
|
|
|
//总绩效=总消耗*提点比例(5‰)*提成比例(编导40%)
|
|
|
BigDecimal totalPerformance = BigDecimal.ZERO;
|
|
|
if(totalCost != null) {
|
|
@@ -1145,7 +1145,7 @@ public class PerformanceServiceImpl2 extends ServiceImpl<PerformanceMapper, Perf
|
|
|
//循环中间50%有绩效的人,计算绩效并入库
|
|
|
for (int i = 0; i <= middle50 - 1; i++) {
|
|
|
//这个编导的总消耗
|
|
|
- BigDecimal totalCost = userEfficientVideoMapMapper.toutiaoGetTotalCostByPlanId(planList.get(i).getUserId(), startTime, endTime);
|
|
|
+ BigDecimal totalCost = userEfficientVideoMapMapper.getToutiaoQuarterTotalCostByRoleCode(thisYear, thisQuarter, startTime, endTime, "plan", planList.get(i).getUserId());
|
|
|
//总绩效=总消耗*提点比例(2‰)*提成比例(编导40%)
|
|
|
BigDecimal totalPerformance = BigDecimal.ZERO;
|
|
|
if(totalCost != null) {
|
|
@@ -1202,7 +1202,7 @@ public class PerformanceServiceImpl2 extends ServiceImpl<PerformanceMapper, Perf
|
|
|
//循环前30%有绩效的人数并计算其绩效,并入库
|
|
|
for (int i = 0; i <= shotTop30 - 1; i++) {
|
|
|
//总消耗--获取这个人所在项目的总消耗
|
|
|
- BigDecimal totalCost = userEfficientVideoMapMapper.toutiaoGetTotalCostByShotId(shotList.get(i).getUserId(), startTime, endTime);
|
|
|
+ BigDecimal totalCost = userEfficientVideoMapMapper.getToutiaoQuarterTotalCostByRoleCode(thisYear, thisQuarter, startTime, endTime, "shot", shotList.get(i).getUserId());
|
|
|
//总绩效=总消耗*提点比例(5‰)*提成比例(拍摄10%)
|
|
|
BigDecimal totalPerformance = BigDecimal.ZERO;
|
|
|
if(totalCost != null) {
|
|
@@ -1230,7 +1230,7 @@ public class PerformanceServiceImpl2 extends ServiceImpl<PerformanceMapper, Perf
|
|
|
//循环中间50%有绩效的人,计算绩效并入库
|
|
|
for (int i = 0; i <= shotMiddle50 - 1; i++) {
|
|
|
//总消耗--获取这个人所在项目的总消耗
|
|
|
- BigDecimal totalCost = userEfficientVideoMapMapper.toutiaoGetTotalCostByShotId(shotList.get(i).getUserId(), startTime, endTime);
|
|
|
+ BigDecimal totalCost = userEfficientVideoMapMapper.getToutiaoQuarterTotalCostByRoleCode(thisYear, thisQuarter, startTime, endTime, "shot", shotList.get(i).getUserId());
|
|
|
//总绩效=总消耗*提点比例(3‰)*提成比例(拍摄10%)
|
|
|
BigDecimal totalPerformance = BigDecimal.ZERO;
|
|
|
if(totalCost != null) {
|
|
@@ -1287,7 +1287,7 @@ public class PerformanceServiceImpl2 extends ServiceImpl<PerformanceMapper, Perf
|
|
|
//循环前30%有绩效的人数并计算其绩效,并入库
|
|
|
for (int i = 0; i <= clipTop30 - 1; i++) {
|
|
|
//总消耗--获取这个人所在项目的总消耗
|
|
|
- BigDecimal totalCost = userEfficientVideoMapMapper.toutiaoGetTotalCostByClipId(clipList.get(i).getUserId(), startTime, endTime);
|
|
|
+ BigDecimal totalCost = userEfficientVideoMapMapper.getToutiaoQuarterTotalCostByRoleCode(thisYear, thisQuarter, startTime, endTime, "clip", clipList.get(i).getUserId());
|
|
|
//总绩效=总消耗*提点比例(5‰)*提成比例(剪辑30%)
|
|
|
BigDecimal totalPerformance = BigDecimal.ZERO;
|
|
|
if(totalCost != null) {
|
|
@@ -1315,7 +1315,7 @@ public class PerformanceServiceImpl2 extends ServiceImpl<PerformanceMapper, Perf
|
|
|
//循环中间50%有绩效的人,计算绩效并入库
|
|
|
for (int i = 0; i <= clipMiddle50 - 1; i++) {
|
|
|
//总消耗--获取这个人所在项目的总消耗
|
|
|
- BigDecimal totalCost = userEfficientVideoMapMapper.toutiaoGetTotalCostByClipId(clipList.get(i).getUserId(), startTime, endTime);
|
|
|
+ BigDecimal totalCost = userEfficientVideoMapMapper.getToutiaoQuarterTotalCostByRoleCode(thisYear, thisQuarter, startTime, endTime, "clip", clipList.get(i).getUserId());
|
|
|
//总绩效=总消耗*提点比例(3‰)*提成比例(剪辑30%)
|
|
|
BigDecimal totalPerformance = BigDecimal.ZERO;
|
|
|
if(totalCost != null) {
|