|
@@ -704,7 +704,16 @@ public class PerformanceServiceImpl2 extends ServiceImpl<PerformanceMapper, Perf
|
|
//循环前30%有绩效的人数并计算其绩效,并入库
|
|
//循环前30%有绩效的人数并计算其绩效,并入库
|
|
for (int i = 0; i <= top30 - 1; i++) {
|
|
for (int i = 0; i <= top30 - 1; i++) {
|
|
//总消耗--获取这个人的总消耗
|
|
//总消耗--获取这个人的总消耗
|
|
- BigDecimal totalCost = userEfficientVideoMapMapper.getQuarterTotalCostByRoleCode(thisYear, thisQuarter,startTime, endTime,"plan",planList.get(i).getUserId());
|
|
|
|
|
|
+ //BigDecimal totalCost = userEfficientVideoMapMapper.getQuarterTotalCostByRoleCode(thisYear, thisQuarter,startTime, endTime,"plan",planList.get(i).getUserId());
|
|
|
|
+ BigDecimal totalCost = BigDecimal.ZERO;
|
|
|
|
+
|
|
|
|
+ List<String> codeList = userEfficientVideoMapMapper.getQuarterSignature(thisYear, thisQuarter, "plan",planList.get(i).getUserId());
|
|
|
|
+ for(String code : codeList){
|
|
|
|
+ BigDecimal cost = userEfficientVideoMapMapper.getQuarterTotalCostByCode(startTime, endTime,code);
|
|
|
|
+ totalCost = totalCost.add(cost==null?BigDecimal.ZERO:cost);
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+
|
|
//总绩效=总消耗*提点比例(5‰)*提成比例(编导40%)
|
|
//总绩效=总消耗*提点比例(5‰)*提成比例(编导40%)
|
|
BigDecimal totalPerformance = BigDecimal.ZERO;
|
|
BigDecimal totalPerformance = BigDecimal.ZERO;
|
|
if(totalCost != null) {
|
|
if(totalCost != null) {
|
|
@@ -727,12 +736,20 @@ public class PerformanceServiceImpl2 extends ServiceImpl<PerformanceMapper, Perf
|
|
}
|
|
}
|
|
|
|
|
|
//去掉list中前30的数据
|
|
//去掉list中前30的数据
|
|
- planList.subList(0, top30 - 1).clear();
|
|
|
|
|
|
+ planList.subList(0, top30).clear();
|
|
|
|
|
|
//循环中间50%有绩效的人,计算绩效并入库
|
|
//循环中间50%有绩效的人,计算绩效并入库
|
|
for (int i = 0; i <= middle50 - 1; i++) {
|
|
for (int i = 0; i <= middle50 - 1; i++) {
|
|
//总消耗--获取这个人所在项目的总消耗
|
|
//总消耗--获取这个人所在项目的总消耗
|
|
- BigDecimal totalCost = userEfficientVideoMapMapper.getQuarterTotalCostByRoleCode(thisYear, thisQuarter,startTime, endTime,"plan",planList.get(i).getUserId());
|
|
|
|
|
|
+ //BigDecimal totalCost = userEfficientVideoMapMapper.getQuarterTotalCostByRoleCode(thisYear, thisQuarter,startTime, endTime,"plan",planList.get(i).getUserId());
|
|
|
|
+ BigDecimal totalCost = BigDecimal.ZERO;
|
|
|
|
+
|
|
|
|
+ List<String> codeList = userEfficientVideoMapMapper.getQuarterSignature(thisYear, thisQuarter, "plan",planList.get(i).getUserId());
|
|
|
|
+ for(String code : codeList){
|
|
|
|
+ BigDecimal cost = userEfficientVideoMapMapper.getQuarterTotalCostByCode(startTime, endTime,code);
|
|
|
|
+ totalCost = totalCost.add(cost==null?BigDecimal.ZERO:cost);
|
|
|
|
+ }
|
|
|
|
+
|
|
//总绩效=总消耗*提点比例(3‰)*提成比例(编导40%)
|
|
//总绩效=总消耗*提点比例(3‰)*提成比例(编导40%)
|
|
BigDecimal totalPerformance = BigDecimal.ZERO;
|
|
BigDecimal totalPerformance = BigDecimal.ZERO;
|
|
if(totalCost != null){
|
|
if(totalCost != null){
|
|
@@ -793,7 +810,15 @@ public class PerformanceServiceImpl2 extends ServiceImpl<PerformanceMapper, Perf
|
|
//循环前30%有绩效的人数并计算其绩效,并入库
|
|
//循环前30%有绩效的人数并计算其绩效,并入库
|
|
for (int i = 0; i <= shotTop30 - 1; i++) {
|
|
for (int i = 0; i <= shotTop30 - 1; i++) {
|
|
//总消耗--获取这个人所在项目的总消耗
|
|
//总消耗--获取这个人所在项目的总消耗
|
|
- BigDecimal totalCost = userEfficientVideoMapMapper.getQuarterTotalCostByRoleCode(thisYear, thisQuarter,startTime, endTime,"shot",shotList.get(i).getUserId());
|
|
|
|
|
|
+ //BigDecimal totalCost = userEfficientVideoMapMapper.getQuarterTotalCostByRoleCode(thisYear, thisQuarter,startTime, endTime,"shot",shotList.get(i).getUserId());
|
|
|
|
+ BigDecimal totalCost = BigDecimal.ZERO;
|
|
|
|
+
|
|
|
|
+ List<String> codeList = userEfficientVideoMapMapper.getQuarterSignature(thisYear, thisQuarter, "shot",shotList.get(i).getUserId());
|
|
|
|
+ for(String code : codeList){
|
|
|
|
+ BigDecimal cost = userEfficientVideoMapMapper.getQuarterTotalCostByCode(startTime, endTime,code);
|
|
|
|
+ totalCost = totalCost.add(cost==null?BigDecimal.ZERO:cost);
|
|
|
|
+ }
|
|
|
|
+
|
|
//总绩效=总消耗*提点比例(5‰)*提成比例(拍摄10%)
|
|
//总绩效=总消耗*提点比例(5‰)*提成比例(拍摄10%)
|
|
BigDecimal totalPerformance = BigDecimal.ZERO;
|
|
BigDecimal totalPerformance = BigDecimal.ZERO;
|
|
if(totalCost != null) {
|
|
if(totalCost != null) {
|
|
@@ -816,12 +841,20 @@ public class PerformanceServiceImpl2 extends ServiceImpl<PerformanceMapper, Perf
|
|
}
|
|
}
|
|
|
|
|
|
//去掉list中前30的数据
|
|
//去掉list中前30的数据
|
|
- shotList.subList(0, shotTop30 - 1).clear();
|
|
|
|
|
|
+ shotList.subList(0, shotTop30).clear();
|
|
|
|
|
|
//循环中间50%有绩效的人,计算绩效并入库
|
|
//循环中间50%有绩效的人,计算绩效并入库
|
|
for (int i = 0; i <= shotMiddle50 - 1; i++) {
|
|
for (int i = 0; i <= shotMiddle50 - 1; i++) {
|
|
//总消耗--获取这个人所在项目的总消耗
|
|
//总消耗--获取这个人所在项目的总消耗
|
|
- BigDecimal totalCost = userEfficientVideoMapMapper.getQuarterTotalCostByRoleCode(thisYear, thisQuarter,startTime, endTime,"shot",shotList.get(i).getUserId());
|
|
|
|
|
|
+ //BigDecimal totalCost = userEfficientVideoMapMapper.getQuarterTotalCostByRoleCode(thisYear, thisQuarter,startTime, endTime,"shot",shotList.get(i).getUserId());
|
|
|
|
+ BigDecimal totalCost = BigDecimal.ZERO;
|
|
|
|
+
|
|
|
|
+ List<String> codeList = userEfficientVideoMapMapper.getQuarterSignature(thisYear, thisQuarter, "shot",shotList.get(i).getUserId());
|
|
|
|
+ for(String code : codeList){
|
|
|
|
+ BigDecimal cost = userEfficientVideoMapMapper.getQuarterTotalCostByCode(startTime, endTime,code);
|
|
|
|
+ totalCost = totalCost.add(cost==null?BigDecimal.ZERO:cost);
|
|
|
|
+ }
|
|
|
|
+
|
|
//总绩效=总消耗*提点比例(3‰)*提成比例(拍摄10%)
|
|
//总绩效=总消耗*提点比例(3‰)*提成比例(拍摄10%)
|
|
BigDecimal totalPerformance = BigDecimal.ZERO;
|
|
BigDecimal totalPerformance = BigDecimal.ZERO;
|
|
if(totalCost != null) {
|
|
if(totalCost != null) {
|
|
@@ -881,7 +914,15 @@ public class PerformanceServiceImpl2 extends ServiceImpl<PerformanceMapper, Perf
|
|
//循环前30%有绩效的人数并计算其绩效,并入库
|
|
//循环前30%有绩效的人数并计算其绩效,并入库
|
|
for (int i = 0; i <= clipTop30 - 1; i++) {
|
|
for (int i = 0; i <= clipTop30 - 1; i++) {
|
|
//总消耗--获取这个人所在项目的总消耗
|
|
//总消耗--获取这个人所在项目的总消耗
|
|
- BigDecimal totalCost = userEfficientVideoMapMapper.getQuarterTotalCostByRoleCode(thisYear, thisQuarter,startTime, endTime,"clip",clipList.get(i).getUserId());
|
|
|
|
|
|
+ //BigDecimal totalCost = userEfficientVideoMapMapper.getQuarterTotalCostByRoleCode(thisYear, thisQuarter,startTime, endTime,"clip",clipList.get(i).getUserId());
|
|
|
|
+ BigDecimal totalCost = BigDecimal.ZERO;
|
|
|
|
+
|
|
|
|
+ List<String> codeList = userEfficientVideoMapMapper.getQuarterSignature(thisYear, thisQuarter, "clip",clipList.get(i).getUserId());
|
|
|
|
+ for(String code : codeList){
|
|
|
|
+ BigDecimal cost = userEfficientVideoMapMapper.getQuarterTotalCostByCode(startTime, endTime,code);
|
|
|
|
+ totalCost = totalCost.add(cost==null?BigDecimal.ZERO:cost);
|
|
|
|
+ }
|
|
|
|
+
|
|
//总绩效=总消耗*提点比例(5‰)*提成比例(剪辑30%)
|
|
//总绩效=总消耗*提点比例(5‰)*提成比例(剪辑30%)
|
|
BigDecimal totalPerformance = BigDecimal.ZERO;
|
|
BigDecimal totalPerformance = BigDecimal.ZERO;
|
|
if(totalCost != null) {
|
|
if(totalCost != null) {
|
|
@@ -904,12 +945,19 @@ public class PerformanceServiceImpl2 extends ServiceImpl<PerformanceMapper, Perf
|
|
}
|
|
}
|
|
|
|
|
|
//去掉list中前30的数据
|
|
//去掉list中前30的数据
|
|
- clipList.subList(0, clipTop30 - 1).clear();
|
|
|
|
|
|
+ clipList.subList(0, clipTop30).clear();
|
|
|
|
|
|
//循环中间50%有绩效的人,计算绩效并入库
|
|
//循环中间50%有绩效的人,计算绩效并入库
|
|
for (int i = 0; i <= clipMiddle50 - 1; i++) {
|
|
for (int i = 0; i <= clipMiddle50 - 1; i++) {
|
|
//总消耗--获取这个人所在项目的总消耗
|
|
//总消耗--获取这个人所在项目的总消耗
|
|
- BigDecimal totalCost = userEfficientVideoMapMapper.getQuarterTotalCostByRoleCode(thisYear, thisQuarter,startTime, endTime,"clip",clipList.get(i).getUserId());
|
|
|
|
|
|
+ //BigDecimal totalCost = userEfficientVideoMapMapper.getQuarterTotalCostByRoleCode(thisYear, thisQuarter,startTime, endTime,"clip",clipList.get(i).getUserId());
|
|
|
|
+ BigDecimal totalCost = BigDecimal.ZERO;
|
|
|
|
+ List<String> codeList = userEfficientVideoMapMapper.getQuarterSignature(thisYear, thisQuarter, "clip",clipList.get(i).getUserId());
|
|
|
|
+ for(String code : codeList){
|
|
|
|
+ BigDecimal cost = userEfficientVideoMapMapper.getQuarterTotalCostByCode(startTime, endTime,code);
|
|
|
|
+ totalCost = totalCost.add(cost==null?BigDecimal.ZERO:cost);
|
|
|
|
+ }
|
|
|
|
+
|
|
//总绩效=总消耗*提点比例(3‰)*提成比例(剪辑30%)
|
|
//总绩效=总消耗*提点比例(3‰)*提成比例(剪辑30%)
|
|
BigDecimal totalPerformance = BigDecimal.ZERO;
|
|
BigDecimal totalPerformance = BigDecimal.ZERO;
|
|
if(totalCost != null) {
|
|
if(totalCost != null) {
|
|
@@ -1009,6 +1057,7 @@ public class PerformanceServiceImpl2 extends ServiceImpl<PerformanceMapper, Perf
|
|
//增加平面人数、和项目单独的绩效
|
|
//增加平面人数、和项目单独的绩效
|
|
planeProjectCost.setProjectPlaneCount(planeList.size());
|
|
planeProjectCost.setProjectPlaneCount(planeList.size());
|
|
planeProjectCost.setProjectPerformance(averageQuarterCost.multiply(new BigDecimal("0.05")).multiply(new BigDecimal("0.003")).setScale(4,BigDecimal.ROUND_HALF_UP));
|
|
planeProjectCost.setProjectPerformance(averageQuarterCost.multiply(new BigDecimal("0.05")).multiply(new BigDecimal("0.003")).setScale(4,BigDecimal.ROUND_HALF_UP));
|
|
|
|
+ planeProjectCost.setType(1);
|
|
if (null == planeMap.get(plane.getUserId())) {
|
|
if (null == planeMap.get(plane.getUserId())) {
|
|
plane.setEffiRate(averageQuarterCost);
|
|
plane.setEffiRate(averageQuarterCost);
|
|
planeMap.put(plane.getUserId(), plane);
|
|
planeMap.put(plane.getUserId(), plane);
|
|
@@ -1029,7 +1078,7 @@ public class PerformanceServiceImpl2 extends ServiceImpl<PerformanceMapper, Perf
|
|
planeProjectCost.setUserId(designLeader.getUserId());
|
|
planeProjectCost.setUserId(designLeader.getUserId());
|
|
//增加平面人数、和项目单独的绩效
|
|
//增加平面人数、和项目单独的绩效
|
|
planeProjectCost.setProjectPlaneCount(1);
|
|
planeProjectCost.setProjectPlaneCount(1);
|
|
- planeProjectCost.setProjectPerformance(quarterCost.multiply(new BigDecimal("0.2")).multiply(new BigDecimal("0.003")));
|
|
|
|
|
|
+ planeProjectCost.setProjectPerformance(quarterCost.multiply(new BigDecimal("0.15")).multiply(new BigDecimal("0.003")).setScale(4,BigDecimal.ROUND_HALF_UP));
|
|
planeProjectCost.setType(2);
|
|
planeProjectCost.setType(2);
|
|
|
|
|
|
if (null == designLeaderMap.get(designLeader.getUserId())) {
|
|
if (null == designLeaderMap.get(designLeader.getUserId())) {
|
|
@@ -1117,7 +1166,16 @@ public class PerformanceServiceImpl2 extends ServiceImpl<PerformanceMapper, Perf
|
|
//循环前30%有绩效的人数并计算其绩效,并入库
|
|
//循环前30%有绩效的人数并计算其绩效,并入库
|
|
for (int i = 0; i <= top30 - 1; i++) {
|
|
for (int i = 0; i <= top30 - 1; i++) {
|
|
//头条编导总消耗
|
|
//头条编导总消耗
|
|
- BigDecimal totalCost = userEfficientVideoMapMapper.getToutiaoQuarterTotalCostByRoleCode(thisYear, thisQuarter, startTime, endTime, "plan", planList.get(i).getUserId());
|
|
|
|
|
|
+ //BigDecimal totalCost = userEfficientVideoMapMapper.getToutiaoQuarterTotalCostByRoleCode(thisYear, thisQuarter, startTime, endTime, "plan", planList.get(i).getUserId());
|
|
|
|
+ BigDecimal totalCost = BigDecimal.ZERO;
|
|
|
|
+
|
|
|
|
+ List<String> codeList = userEfficientVideoMapMapper.getQuarterSignature(thisYear, thisQuarter, "plan",planList.get(i).getUserId());
|
|
|
|
+ for(String code : codeList){
|
|
|
|
+ BigDecimal cost = userEfficientVideoMapMapper.getToutiaoQuarterTotalCostByCode(startTime, endTime,code);
|
|
|
|
+ totalCost = totalCost.add(cost==null?BigDecimal.ZERO:cost);
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+
|
|
//总绩效=总消耗*提点比例(5‰)*提成比例(编导40%)
|
|
//总绩效=总消耗*提点比例(5‰)*提成比例(编导40%)
|
|
BigDecimal totalPerformance = BigDecimal.ZERO;
|
|
BigDecimal totalPerformance = BigDecimal.ZERO;
|
|
if(totalCost != null) {
|
|
if(totalCost != null) {
|
|
@@ -1140,12 +1198,21 @@ public class PerformanceServiceImpl2 extends ServiceImpl<PerformanceMapper, Perf
|
|
}
|
|
}
|
|
|
|
|
|
//去掉list中前30的数据
|
|
//去掉list中前30的数据
|
|
- planList.subList(0, top30 - 1).clear();
|
|
|
|
|
|
+ planList.subList(0, top30).clear();
|
|
|
|
|
|
//循环中间50%有绩效的人,计算绩效并入库
|
|
//循环中间50%有绩效的人,计算绩效并入库
|
|
for (int i = 0; i <= middle50 - 1; i++) {
|
|
for (int i = 0; i <= middle50 - 1; i++) {
|
|
//这个编导的总消耗
|
|
//这个编导的总消耗
|
|
- BigDecimal totalCost = userEfficientVideoMapMapper.getToutiaoQuarterTotalCostByRoleCode(thisYear, thisQuarter, startTime, endTime, "plan", planList.get(i).getUserId());
|
|
|
|
|
|
+ //BigDecimal totalCost = userEfficientVideoMapMapper.getToutiaoQuarterTotalCostByRoleCode(thisYear, thisQuarter, startTime, endTime, "plan", planList.get(i).getUserId());
|
|
|
|
+ BigDecimal totalCost = BigDecimal.ZERO;
|
|
|
|
+
|
|
|
|
+ List<String> codeList = userEfficientVideoMapMapper.getQuarterSignature(thisYear, thisQuarter, "plan",planList.get(i).getUserId());
|
|
|
|
+ for(String code : codeList){
|
|
|
|
+ BigDecimal cost = userEfficientVideoMapMapper.getToutiaoQuarterTotalCostByCode(startTime, endTime,code);
|
|
|
|
+ totalCost = totalCost.add(cost==null?BigDecimal.ZERO:cost);
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+
|
|
//总绩效=总消耗*提点比例(2‰)*提成比例(编导40%)
|
|
//总绩效=总消耗*提点比例(2‰)*提成比例(编导40%)
|
|
BigDecimal totalPerformance = BigDecimal.ZERO;
|
|
BigDecimal totalPerformance = BigDecimal.ZERO;
|
|
if(totalCost != null) {
|
|
if(totalCost != null) {
|
|
@@ -1202,7 +1269,15 @@ public class PerformanceServiceImpl2 extends ServiceImpl<PerformanceMapper, Perf
|
|
//循环前30%有绩效的人数并计算其绩效,并入库
|
|
//循环前30%有绩效的人数并计算其绩效,并入库
|
|
for (int i = 0; i <= shotTop30 - 1; i++) {
|
|
for (int i = 0; i <= shotTop30 - 1; i++) {
|
|
//总消耗--获取这个人所在项目的总消耗
|
|
//总消耗--获取这个人所在项目的总消耗
|
|
- BigDecimal totalCost = userEfficientVideoMapMapper.getToutiaoQuarterTotalCostByRoleCode(thisYear, thisQuarter, startTime, endTime, "shot", shotList.get(i).getUserId());
|
|
|
|
|
|
+ //BigDecimal totalCost = userEfficientVideoMapMapper.getToutiaoQuarterTotalCostByRoleCode(thisYear, thisQuarter, startTime, endTime, "shot", shotList.get(i).getUserId());
|
|
|
|
+ BigDecimal totalCost = BigDecimal.ZERO;
|
|
|
|
+
|
|
|
|
+ List<String> codeList = userEfficientVideoMapMapper.getQuarterSignature(thisYear, thisQuarter, "shot",shotList.get(i).getUserId());
|
|
|
|
+ for(String code : codeList){
|
|
|
|
+ BigDecimal cost = userEfficientVideoMapMapper.getToutiaoQuarterTotalCostByCode(startTime, endTime,code);
|
|
|
|
+ totalCost = totalCost.add(cost==null?BigDecimal.ZERO:cost);
|
|
|
|
+ }
|
|
|
|
+
|
|
//总绩效=总消耗*提点比例(5‰)*提成比例(拍摄10%)
|
|
//总绩效=总消耗*提点比例(5‰)*提成比例(拍摄10%)
|
|
BigDecimal totalPerformance = BigDecimal.ZERO;
|
|
BigDecimal totalPerformance = BigDecimal.ZERO;
|
|
if(totalCost != null) {
|
|
if(totalCost != null) {
|
|
@@ -1225,12 +1300,20 @@ public class PerformanceServiceImpl2 extends ServiceImpl<PerformanceMapper, Perf
|
|
}
|
|
}
|
|
|
|
|
|
//去掉list中前30的数据
|
|
//去掉list中前30的数据
|
|
- shotList.subList(0, shotTop30 - 1).clear();
|
|
|
|
|
|
+ shotList.subList(0, shotTop30).clear();
|
|
|
|
|
|
//循环中间50%有绩效的人,计算绩效并入库
|
|
//循环中间50%有绩效的人,计算绩效并入库
|
|
for (int i = 0; i <= shotMiddle50 - 1; i++) {
|
|
for (int i = 0; i <= shotMiddle50 - 1; i++) {
|
|
//总消耗--获取这个人所在项目的总消耗
|
|
//总消耗--获取这个人所在项目的总消耗
|
|
- BigDecimal totalCost = userEfficientVideoMapMapper.getToutiaoQuarterTotalCostByRoleCode(thisYear, thisQuarter, startTime, endTime, "shot", shotList.get(i).getUserId());
|
|
|
|
|
|
+ //BigDecimal totalCost = userEfficientVideoMapMapper.getToutiaoQuarterTotalCostByRoleCode(thisYear, thisQuarter, startTime, endTime, "shot", shotList.get(i).getUserId());
|
|
|
|
+ BigDecimal totalCost = BigDecimal.ZERO;
|
|
|
|
+
|
|
|
|
+ List<String> codeList = userEfficientVideoMapMapper.getQuarterSignature(thisYear, thisQuarter, "shot",shotList.get(i).getUserId());
|
|
|
|
+ for(String code : codeList){
|
|
|
|
+ BigDecimal cost = userEfficientVideoMapMapper.getToutiaoQuarterTotalCostByCode(startTime, endTime,code);
|
|
|
|
+ totalCost = totalCost.add(cost==null?BigDecimal.ZERO:cost);
|
|
|
|
+ }
|
|
|
|
+
|
|
//总绩效=总消耗*提点比例(3‰)*提成比例(拍摄10%)
|
|
//总绩效=总消耗*提点比例(3‰)*提成比例(拍摄10%)
|
|
BigDecimal totalPerformance = BigDecimal.ZERO;
|
|
BigDecimal totalPerformance = BigDecimal.ZERO;
|
|
if(totalCost != null) {
|
|
if(totalCost != null) {
|
|
@@ -1265,7 +1348,7 @@ public class PerformanceServiceImpl2 extends ServiceImpl<PerformanceMapper, Perf
|
|
//有效视频数量 //1头条 2快手
|
|
//有效视频数量 //1头条 2快手
|
|
int effiVideoCount = userEfficientVideoMapMapper.getEffiVideoCountByUserId(1, thisYear, thisQuarter, userDto.getUserId(), "clip");
|
|
int effiVideoCount = userEfficientVideoMapMapper.getEffiVideoCountByUserId(1, thisYear, thisQuarter, userDto.getUserId(), "clip");
|
|
//总视频数量
|
|
//总视频数量
|
|
- int videoCount = userEfficientVideoMapMapper.getQuarterVideoCountByRoleCodeAndUserId(thisYear, thisQuarter, 2, userDto.getUserId(), "clip");
|
|
|
|
|
|
+ int videoCount = userEfficientVideoMapMapper.getQuarterVideoCountByRoleCodeAndUserId(thisYear, thisQuarter, 1, userDto.getUserId(), "clip");
|
|
//视频有效率
|
|
//视频有效率
|
|
BigDecimal effiRate=BigDecimal.ZERO;
|
|
BigDecimal effiRate=BigDecimal.ZERO;
|
|
if (videoCount != 0){
|
|
if (videoCount != 0){
|
|
@@ -1287,7 +1370,15 @@ public class PerformanceServiceImpl2 extends ServiceImpl<PerformanceMapper, Perf
|
|
//循环前30%有绩效的人数并计算其绩效,并入库
|
|
//循环前30%有绩效的人数并计算其绩效,并入库
|
|
for (int i = 0; i <= clipTop30 - 1; i++) {
|
|
for (int i = 0; i <= clipTop30 - 1; i++) {
|
|
//总消耗--获取这个人所在项目的总消耗
|
|
//总消耗--获取这个人所在项目的总消耗
|
|
- BigDecimal totalCost = userEfficientVideoMapMapper.getToutiaoQuarterTotalCostByRoleCode(thisYear, thisQuarter, startTime, endTime, "clip", clipList.get(i).getUserId());
|
|
|
|
|
|
+ //BigDecimal totalCost = userEfficientVideoMapMapper.getToutiaoQuarterTotalCostByRoleCode(thisYear, thisQuarter, startTime, endTime, "clip", clipList.get(i).getUserId());
|
|
|
|
+ BigDecimal totalCost = BigDecimal.ZERO;
|
|
|
|
+
|
|
|
|
+ List<String> codeList = userEfficientVideoMapMapper.getQuarterSignature(thisYear, thisQuarter, "clip",clipList.get(i).getUserId());
|
|
|
|
+ for(String code : codeList){
|
|
|
|
+ BigDecimal cost = userEfficientVideoMapMapper.getToutiaoQuarterTotalCostByCode(startTime, endTime,code);
|
|
|
|
+ totalCost = totalCost.add(cost==null?BigDecimal.ZERO:cost);
|
|
|
|
+ }
|
|
|
|
+
|
|
//总绩效=总消耗*提点比例(5‰)*提成比例(剪辑30%)
|
|
//总绩效=总消耗*提点比例(5‰)*提成比例(剪辑30%)
|
|
BigDecimal totalPerformance = BigDecimal.ZERO;
|
|
BigDecimal totalPerformance = BigDecimal.ZERO;
|
|
if(totalCost != null) {
|
|
if(totalCost != null) {
|
|
@@ -1310,12 +1401,20 @@ public class PerformanceServiceImpl2 extends ServiceImpl<PerformanceMapper, Perf
|
|
}
|
|
}
|
|
|
|
|
|
//去掉list中前30的数据
|
|
//去掉list中前30的数据
|
|
- clipList.subList(0, clipTop30 - 1).clear();
|
|
|
|
|
|
+ clipList.subList(0, clipTop30).clear();
|
|
|
|
|
|
//循环中间50%有绩效的人,计算绩效并入库
|
|
//循环中间50%有绩效的人,计算绩效并入库
|
|
for (int i = 0; i <= clipMiddle50 - 1; i++) {
|
|
for (int i = 0; i <= clipMiddle50 - 1; i++) {
|
|
//总消耗--获取这个人所在项目的总消耗
|
|
//总消耗--获取这个人所在项目的总消耗
|
|
- BigDecimal totalCost = userEfficientVideoMapMapper.getToutiaoQuarterTotalCostByRoleCode(thisYear, thisQuarter, startTime, endTime, "clip", clipList.get(i).getUserId());
|
|
|
|
|
|
+ //BigDecimal totalCost = userEfficientVideoMapMapper.getToutiaoQuarterTotalCostByRoleCode(thisYear, thisQuarter, startTime, endTime, "clip", clipList.get(i).getUserId());
|
|
|
|
+ BigDecimal totalCost = BigDecimal.ZERO;
|
|
|
|
+
|
|
|
|
+ List<String> codeList = userEfficientVideoMapMapper.getQuarterSignature(thisYear, thisQuarter, "clip",clipList.get(i).getUserId());
|
|
|
|
+ for(String code : codeList){
|
|
|
|
+ BigDecimal cost = userEfficientVideoMapMapper.getToutiaoQuarterTotalCostByCode(startTime, endTime,code);
|
|
|
|
+ totalCost = totalCost.add(cost==null?BigDecimal.ZERO:cost);
|
|
|
|
+ }
|
|
|
|
+
|
|
//总绩效=总消耗*提点比例(3‰)*提成比例(剪辑30%)
|
|
//总绩效=总消耗*提点比例(3‰)*提成比例(剪辑30%)
|
|
BigDecimal totalPerformance = BigDecimal.ZERO;
|
|
BigDecimal totalPerformance = BigDecimal.ZERO;
|
|
if(totalCost != null) {
|
|
if(totalCost != null) {
|
|
@@ -1364,7 +1463,7 @@ public class PerformanceServiceImpl2 extends ServiceImpl<PerformanceMapper, Perf
|
|
|
|
|
|
UserDto2 designLeader = userEfficientVideoMapMapper.getProjectDesignResponsibleInfo(projectDTO.getProjectId());
|
|
UserDto2 designLeader = userEfficientVideoMapMapper.getProjectDesignResponsibleInfo(projectDTO.getProjectId());
|
|
List<UserDto2> planeList = userEfficientVideoMapMapper.getPlaneByProjectId(projectDTO.getProjectId());
|
|
List<UserDto2> planeList = userEfficientVideoMapMapper.getPlaneByProjectId(projectDTO.getProjectId());
|
|
- BigDecimal quarterCost = userEfficientVideoMapMapper.getProjectQuarterCostById(startTime, endTime, projectDTO.getProjectId());
|
|
|
|
|
|
+ BigDecimal quarterCost = userEfficientVideoMapMapper.getToutiaoProjectQuarterCostById(startTime, endTime, projectDTO.getProjectId());
|
|
quarterCost = quarterCost==null?BigDecimal.ZERO:quarterCost;
|
|
quarterCost = quarterCost==null?BigDecimal.ZERO:quarterCost;
|
|
//此项目当中平面数量,平面数量为0的时候说明此project当中没有平面设计师;项目没有平面的情况下,项目leader绩效提成为20%
|
|
//此项目当中平面数量,平面数量为0的时候说明此project当中没有平面设计师;项目没有平面的情况下,项目leader绩效提成为20%
|
|
int size = planeList.size();
|
|
int size = planeList.size();
|
|
@@ -1415,7 +1514,7 @@ public class PerformanceServiceImpl2 extends ServiceImpl<PerformanceMapper, Perf
|
|
planeProjectCost.setUserId(plane.getUserId());
|
|
planeProjectCost.setUserId(plane.getUserId());
|
|
//增加平面人数、和项目单独的绩效
|
|
//增加平面人数、和项目单独的绩效
|
|
planeProjectCost.setProjectPlaneCount(planeList.size());
|
|
planeProjectCost.setProjectPlaneCount(planeList.size());
|
|
- planeProjectCost.setProjectPerformance(averageQuarterCost.multiply(new BigDecimal("0.05")));
|
|
|
|
|
|
+ planeProjectCost.setProjectPerformance(averageQuarterCost.multiply(new BigDecimal("0.05")).multiply(new BigDecimal("0.002")).setScale(4,BigDecimal.ROUND_HALF_UP));
|
|
planeProjectCost.setType(1);
|
|
planeProjectCost.setType(1);
|
|
|
|
|
|
if (null == planeMap.get(plane.getUserId())) {
|
|
if (null == planeMap.get(plane.getUserId())) {
|