|
@@ -428,13 +428,13 @@ public class PerformanceServiceImpl2 extends ServiceImpl<PerformanceMapper, Perf
|
|
}
|
|
}
|
|
///////////////////////////////////////////////////////////////////平面end
|
|
///////////////////////////////////////////////////////////////////平面end
|
|
|
|
|
|
- //设计师leader start
|
|
|
|
|
|
+ //TODO 设计师leader start
|
|
//* 1.如果媒体总任务未达成,则没有绩效;如果已达成,则按照千分之5给予提点绩效
|
|
//* 1.如果媒体总任务未达成,则没有绩效;如果已达成,则按照千分之5给予提点绩效
|
|
//* 2.查询出所有设计部门的代码,并找出每部门的leader,和部门下所有人员
|
|
//* 2.查询出所有设计部门的代码,并找出每部门的leader,和部门下所有人员
|
|
//* 3.根据编导(或剪辑、拍摄)算出素材的总消耗
|
|
//* 3.根据编导(或剪辑、拍摄)算出素材的总消耗
|
|
//* 4.根据部门当中是否有平面设计师来判断提成绩效。有平面,按照15%计算;没有按照20%计算
|
|
//* 4.根据部门当中是否有平面设计师来判断提成绩效。有平面,按照15%计算;没有按照20%计算
|
|
|
|
|
|
- //TODO 判断媒体任务是否达成,如果未达成,则没有绩效
|
|
|
|
|
|
+ //判断媒体任务是否达成,如果未达成,则没有绩效
|
|
if(mediaMission()){
|
|
if(mediaMission()){
|
|
}else{
|
|
}else{
|
|
return;
|
|
return;
|
|
@@ -498,7 +498,6 @@ public class PerformanceServiceImpl2 extends ServiceImpl<PerformanceMapper, Perf
|
|
return performanceMapper.getOptimizerTotalCost(startDate, endNowDate, year, quarter);
|
|
return performanceMapper.getOptimizerTotalCost(startDate, endNowDate, year, quarter);
|
|
}
|
|
}
|
|
|
|
|
|
-
|
|
|
|
//1
|
|
//1
|
|
//季度到前一天为止个人的有效数量、素材总数、素材有效率、总跑量
|
|
//季度到前一天为止个人的有效数量、素材总数、素材有效率、总跑量
|
|
//{"effiVideoCount有效数":70,"videoCount素材总数":200,"effiRate":40,"cost":2019;performance绩效":20000}
|
|
//{"effiVideoCount有效数":70,"videoCount素材总数":200,"effiRate":40,"cost":2019;performance绩效":20000}
|
|
@@ -517,6 +516,8 @@ public class PerformanceServiceImpl2 extends ServiceImpl<PerformanceMapper, Perf
|
|
|
|
|
|
String roleCode = sysRoleMapper.getRoleCodeByUserId(sysUser.getId());
|
|
String roleCode = sysRoleMapper.getRoleCodeByUserId(sysUser.getId());
|
|
|
|
|
|
|
|
+ log.info(roleCode + ":" + sysUser.getRealname() + "getPerformanceInfo接口开始");
|
|
|
|
+
|
|
Map<String,String> lastDateMap = getLastDateInfo();
|
|
Map<String,String> lastDateMap = getLastDateInfo();
|
|
//获取本人的视频总有效数量
|
|
//获取本人的视频总有效数量
|
|
int effiVideoCount = userEfficientVideoMapMapper.getEffiVideoCountByUserId(Integer.parseInt(lastDateMap.get("year")), Integer.parseInt(lastDateMap.get("quarter")),sysUser.getId());
|
|
int effiVideoCount = userEfficientVideoMapMapper.getEffiVideoCountByUserId(Integer.parseInt(lastDateMap.get("year")), Integer.parseInt(lastDateMap.get("quarter")),sysUser.getId());
|
|
@@ -543,6 +544,7 @@ public class PerformanceServiceImpl2 extends ServiceImpl<PerformanceMapper, Perf
|
|
performanceInfoMap.put("effiRate",videoEffiRate);
|
|
performanceInfoMap.put("effiRate",videoEffiRate);
|
|
performanceInfoMap.put("cost",cost);
|
|
performanceInfoMap.put("cost",cost);
|
|
|
|
|
|
|
|
+ log.info(roleCode + ":" + sysUser.getRealname() + "getPerformanceInfo接口开始");
|
|
return performanceInfoMap;
|
|
return performanceInfoMap;
|
|
}
|
|
}
|
|
|
|
|
|
@@ -564,6 +566,8 @@ public class PerformanceServiceImpl2 extends ServiceImpl<PerformanceMapper, Perf
|
|
Map<String,String> lastDateMap = getLastDateInfo();
|
|
Map<String,String> lastDateMap = getLastDateInfo();
|
|
String roleCode = sysRoleMapper.getRoleCodeByUserId(sysUser.getId());
|
|
String roleCode = sysRoleMapper.getRoleCodeByUserId(sysUser.getId());
|
|
|
|
|
|
|
|
+ log.info(roleCode + ":" + sysUser.getRealname() + "有效率排行榜接口开始");
|
|
|
|
+
|
|
List<UserDto> userRoleList = new ArrayList<>();
|
|
List<UserDto> userRoleList = new ArrayList<>();
|
|
BigDecimal rate = BigDecimal.ZERO; //提成比例
|
|
BigDecimal rate = BigDecimal.ZERO; //提成比例
|
|
if(roleCode.equals("plan")){
|
|
if(roleCode.equals("plan")){
|
|
@@ -597,12 +601,13 @@ public class PerformanceServiceImpl2 extends ServiceImpl<PerformanceMapper, Perf
|
|
//获取前30%和中间50%的人数(视频有效率四舍五入)
|
|
//获取前30%和中间50%的人数(视频有效率四舍五入)
|
|
int userTopSize = new BigDecimal(String.valueOf(userRoleLength)).multiply(new BigDecimal("0.3")).setScale(0,BigDecimal.ROUND_HALF_UP).intValue();
|
|
int userTopSize = new BigDecimal(String.valueOf(userRoleLength)).multiply(new BigDecimal("0.3")).setScale(0,BigDecimal.ROUND_HALF_UP).intValue();
|
|
int userMiddleSize = new BigDecimal(String.valueOf(userRoleLength)).multiply(new BigDecimal("0.5")).setScale(0,BigDecimal.ROUND_HALF_UP).intValue();
|
|
int userMiddleSize = new BigDecimal(String.valueOf(userRoleLength)).multiply(new BigDecimal("0.5")).setScale(0,BigDecimal.ROUND_HALF_UP).intValue();
|
|
|
|
+ log.info(roleCode + "的总人数为:" + userRoleLength + ";前30%人数为:"+ userTopSize + ";中间50%的人数为:" + userMiddleSize);
|
|
|
|
|
|
int index = 0;
|
|
int index = 0;
|
|
for(int i=0; i<= userRoleLength; i++){
|
|
for(int i=0; i<= userRoleLength; i++){
|
|
index = index+1;
|
|
index = index+1;
|
|
if(userRoleList.get(i).getUserId() .equals( sysUser.getId() )){
|
|
if(userRoleList.get(i).getUserId() .equals( sysUser.getId() )){
|
|
- System.out.println("当前登陆人userId:" + sysUser.getId() + "排名:" + index);
|
|
|
|
|
|
+ log.info("当前登陆人userId:" + sysUser.getId() + ";姓名:" +sysUser.getRealname() + ";排名:" + index);
|
|
break;
|
|
break;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
@@ -611,7 +616,7 @@ public class PerformanceServiceImpl2 extends ServiceImpl<PerformanceMapper, Perf
|
|
//总绩效=总消耗*提点比例(5‰)*提成比例(剪辑30%)
|
|
//总绩效=总消耗*提点比例(5‰)*提成比例(剪辑30%)
|
|
BigDecimal performance = BigDecimal.ZERO; //绩效
|
|
BigDecimal performance = BigDecimal.ZERO; //绩效
|
|
BigDecimal totalCost = BigDecimal.ZERO; //总消耗
|
|
BigDecimal totalCost = BigDecimal.ZERO; //总消耗
|
|
- if(roleCode == "plan"){
|
|
|
|
|
|
+ if(roleCode.equals("plan")){
|
|
totalCost = userEfficientVideoMapMapper.getTotalCostByPlanId(sysUser.getId(), startDate, endNowDate);
|
|
totalCost = userEfficientVideoMapMapper.getTotalCostByPlanId(sysUser.getId(), startDate, endNowDate);
|
|
if(index <= userTopSize){
|
|
if(index <= userTopSize){
|
|
performance = totalCost.multiply(new BigDecimal("0.005")).multiply(new BigDecimal("0.4"));
|
|
performance = totalCost.multiply(new BigDecimal("0.005")).multiply(new BigDecimal("0.4"));
|
|
@@ -620,7 +625,7 @@ public class PerformanceServiceImpl2 extends ServiceImpl<PerformanceMapper, Perf
|
|
}else{
|
|
}else{
|
|
performance = BigDecimal.ZERO;
|
|
performance = BigDecimal.ZERO;
|
|
}
|
|
}
|
|
- }else if(roleCode == "shot"){
|
|
|
|
|
|
+ }else if(roleCode.equals("shot")){
|
|
totalCost = userEfficientVideoMapMapper.getTotalCostByShotId(sysUser.getId(), startDate, endNowDate);
|
|
totalCost = userEfficientVideoMapMapper.getTotalCostByShotId(sysUser.getId(), startDate, endNowDate);
|
|
if(index <= userTopSize){
|
|
if(index <= userTopSize){
|
|
performance = totalCost.multiply(new BigDecimal("0.005")).multiply(new BigDecimal("0.1"));
|
|
performance = totalCost.multiply(new BigDecimal("0.005")).multiply(new BigDecimal("0.1"));
|
|
@@ -652,6 +657,7 @@ public class PerformanceServiceImpl2 extends ServiceImpl<PerformanceMapper, Perf
|
|
resultMap.put("performance",0);
|
|
resultMap.put("performance",0);
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ log.info(roleCode + ":" + sysUser.getRealname() + "有效率排行榜接口结束");
|
|
return resultMap;
|
|
return resultMap;
|
|
}
|
|
}
|
|
|
|
|
|
@@ -664,6 +670,8 @@ public class PerformanceServiceImpl2 extends ServiceImpl<PerformanceMapper, Perf
|
|
//sysUser.setId("9712328fddd1443faf566ddb87693658");
|
|
//sysUser.setId("9712328fddd1443faf566ddb87693658");
|
|
String roleCode = sysRoleMapper.getRoleCodeByUserId(sysUser.getId());
|
|
String roleCode = sysRoleMapper.getRoleCodeByUserId(sysUser.getId());
|
|
|
|
|
|
|
|
+ log.info(roleCode + ":" + sysUser.getRealname() + "materialInfoList接口开始");
|
|
|
|
+
|
|
Date date = new Date();
|
|
Date date = new Date();
|
|
Date getDate = DateUtils.addDay(date, -1);
|
|
Date getDate = DateUtils.addDay(date, -1);
|
|
String startDate = DateUtils.getQuarterStartDate(getDate);
|
|
String startDate = DateUtils.getQuarterStartDate(getDate);
|
|
@@ -672,6 +680,7 @@ public class PerformanceServiceImpl2 extends ServiceImpl<PerformanceMapper, Perf
|
|
|
|
|
|
List<DesignMaterialInfo> materialInfoList = userEfficientVideoMapMapper.designMaterialInfoList(roleCode, sysUser.getId(), startDate, endNowDate);
|
|
List<DesignMaterialInfo> materialInfoList = userEfficientVideoMapMapper.designMaterialInfoList(roleCode, sysUser.getId(), startDate, endNowDate);
|
|
|
|
|
|
|
|
+ log.info(roleCode + ":" + sysUser.getRealname() + "materialInfoList接口结束");
|
|
return materialInfoList;
|
|
return materialInfoList;
|
|
}
|
|
}
|
|
|
|
|
|
@@ -679,6 +688,7 @@ public class PerformanceServiceImpl2 extends ServiceImpl<PerformanceMapper, Perf
|
|
//点击+符号 投放账户、投放账户、跑量
|
|
//点击+符号 投放账户、投放账户、跑量
|
|
//{"videoAccount":"aabbcc","servingAccount":"ttyyhh","cost":34234.43}
|
|
//{"videoAccount":"aabbcc","servingAccount":"ttyyhh","cost":34234.43}
|
|
public List<DesignMaterialInfo> materialAccountInfo(String materialInfoId){
|
|
public List<DesignMaterialInfo> materialAccountInfo(String materialInfoId){
|
|
|
|
+ log.info("materialAccountInfo接口开始");
|
|
Date date = new Date();
|
|
Date date = new Date();
|
|
Date getDate = DateUtils.addDay(date, -1);
|
|
Date getDate = DateUtils.addDay(date, -1);
|
|
String startDate = DateUtils.getQuarterStartDate(getDate);
|
|
String startDate = DateUtils.getQuarterStartDate(getDate);
|
|
@@ -686,6 +696,7 @@ public class PerformanceServiceImpl2 extends ServiceImpl<PerformanceMapper, Perf
|
|
String endNowDate = DateUtils.formatDate(getDate);
|
|
String endNowDate = DateUtils.formatDate(getDate);
|
|
|
|
|
|
List<DesignMaterialInfo> materialInfoList = userEfficientVideoMapMapper.getMaterialAccountInfoByMaterialId(materialInfoId, startDate, endNowDate);
|
|
List<DesignMaterialInfo> materialInfoList = userEfficientVideoMapMapper.getMaterialAccountInfoByMaterialId(materialInfoId, startDate, endNowDate);
|
|
|
|
+ log.info("materialAccountInfo接口结束");
|
|
return materialInfoList;
|
|
return materialInfoList;
|
|
}
|
|
}
|
|
|
|
|