|
@@ -99,162 +99,16 @@ public class PerformanceServiceImpl2 extends ServiceImpl<PerformanceMapper, Perf
|
|
log.info("统计时间所在年" + thisYear + "月" + thisMonth + "季" + thisQuarter);
|
|
log.info("统计时间所在年" + thisYear + "月" + thisMonth + "季" + thisQuarter);
|
|
|
|
|
|
//快手有效视频(新)
|
|
//快手有效视频(新)
|
|
- //kuaishouNewEffiVideo(calcDate, effiCalcStart, effiFirstWeekCalcEnd, thisYear, thisMonth, thisQuarter, DateUtils.formatDate(friday), DateUtils.formatDate(thursday));
|
|
|
|
|
|
+ kuaishouNewEffiVideo(calcDate, effiCalcStart, effiFirstWeekCalcEnd, thisYear, thisMonth, thisQuarter, DateUtils.formatDate(friday), DateUtils.formatDate(thursday));
|
|
//头条有效视频(新)
|
|
//头条有效视频(新)
|
|
- //toutiaoNewEffiVideo(calcDate, effiCalcStart, effiFirstWeekCalcEnd, thisYear, thisMonth, thisQuarter, DateUtils.formatDate(friday), DateUtils.formatDate(thursday));
|
|
|
|
|
|
+ toutiaoNewEffiVideo(calcDate, effiCalcStart, effiFirstWeekCalcEnd, thisYear, thisMonth, thisQuarter, DateUtils.formatDate(friday), DateUtils.formatDate(thursday));
|
|
|
|
|
|
//快手总视频
|
|
//快手总视频
|
|
- //newKuaishouVideo( calcDate, thisYear, thisQuarter, thisMonth, DateUtils.formatDate(friday), DateUtils.formatDate(thursday));
|
|
|
|
|
|
+ newKuaishouVideo( calcDate, thisYear, thisQuarter, thisMonth, DateUtils.formatDate(friday), DateUtils.formatDate(thursday));
|
|
//头条总视频
|
|
//头条总视频
|
|
newToutiaoVideo( calcDate, thisYear, thisQuarter, thisMonth, DateUtils.formatDate(friday), DateUtils.formatDate(thursday));
|
|
newToutiaoVideo( calcDate, thisYear, thisQuarter, thisMonth, DateUtils.formatDate(friday), DateUtils.formatDate(thursday));
|
|
}
|
|
}
|
|
|
|
|
|
- //快手有效视频统计--旧版已废弃
|
|
|
|
- //private void kuaishouEffiVideo(Date calcDate, String effiCalcStart, String effiCalcEnd, String effiStart, String effiEnd, int thisYear, int thisMonth, int thisQuarter) {
|
|
|
|
- // log.info("快手有效视频统计开始,统计时间为 " + calcDate);
|
|
|
|
- // //获取时间段内所有<快手>的有效视频
|
|
|
|
- // List<EffiVideoDTO> EffiVideoDTOList = userEfficientVideoMapMapper.getUserVideoMap(effiStart, effiEnd, effiCalcStart, effiCalcEnd);
|
|
|
|
- //
|
|
|
|
- // for (EffiVideoDTO effiVideoDTO : EffiVideoDTOList) {
|
|
|
|
- // //判断此视频是否已经在关系表中存在,如果已经存在则说明此视频已经存在,跳过即可
|
|
|
|
- // //有效视频的逻辑是无论是快手还是头条
|
|
|
|
- // int signatureCount = userEfficientVideoMapMapper.getEffiVideoCountBySignature(effiVideoDTO.getSignature(), new Integer(2));//1快手 2头条
|
|
|
|
- // if (signatureCount != 0) {
|
|
|
|
- // continue;
|
|
|
|
- // }
|
|
|
|
- //
|
|
|
|
- // UserEfficientVideoMap shot = new UserEfficientVideoMap();
|
|
|
|
- // UserEfficientVideoMap plane = new UserEfficientVideoMap();
|
|
|
|
- // UserEfficientVideoMap plan = new UserEfficientVideoMap();
|
|
|
|
- // UserEfficientVideoMap clip = new UserEfficientVideoMap();
|
|
|
|
- //
|
|
|
|
- // //拍摄
|
|
|
|
- // shot.setUserId(effiVideoDTO.getShotId());
|
|
|
|
- // shot.setEfficientVideoSignature(effiVideoDTO.getSignature());
|
|
|
|
- // shot.setQuarter(thisQuarter);
|
|
|
|
- // shot.setAppType(2); //1头条 2快手
|
|
|
|
- // shot.setYear(thisYear);
|
|
|
|
- // shot.setMonth(thisMonth);
|
|
|
|
- // shot.setCalcDate(calcDate);
|
|
|
|
- // shot.setRoleId("7bff9afed625aeeabca6bffe3c189183");
|
|
|
|
- // userEfficientVideoMapMapper.insert(shot);
|
|
|
|
- //
|
|
|
|
- // //平面
|
|
|
|
- // plane.setUserId(effiVideoDTO.getPlaneId());
|
|
|
|
- // plane.setEfficientVideoSignature(effiVideoDTO.getSignature());
|
|
|
|
- // plane.setQuarter(thisQuarter);
|
|
|
|
- // plane.setAppType(2); //1头条 2快手
|
|
|
|
- // plane.setYear(thisYear);
|
|
|
|
- // plane.setMonth(thisMonth);
|
|
|
|
- // plane.setCalcDate(calcDate);
|
|
|
|
- // plane.setRoleId("8dc30cb9810bde89bdc3fa8a85b830b0");
|
|
|
|
- // userEfficientVideoMapMapper.insert(plane);
|
|
|
|
- //
|
|
|
|
- // //策划
|
|
|
|
- // plan.setUserId(effiVideoDTO.getPlanId());
|
|
|
|
- // plan.setEfficientVideoSignature(effiVideoDTO.getSignature());
|
|
|
|
- // plan.setQuarter(thisQuarter);
|
|
|
|
- // plan.setAppType(2); //1头条 2快手
|
|
|
|
- // plan.setYear(thisYear);
|
|
|
|
- // plan.setMonth(thisMonth);
|
|
|
|
- // plan.setCalcDate(calcDate);
|
|
|
|
- // plan.setRoleId("0214283aa16f943efbb149ea4bb18f18");
|
|
|
|
- // userEfficientVideoMapMapper.insert(plan);
|
|
|
|
- //
|
|
|
|
- // //剪辑
|
|
|
|
- // clip.setUserId(effiVideoDTO.getClipId());
|
|
|
|
- // clip.setEfficientVideoSignature(effiVideoDTO.getSignature());
|
|
|
|
- // clip.setQuarter(thisQuarter);
|
|
|
|
- // clip.setAppType(2); //1头条 2快手
|
|
|
|
- // clip.setYear(thisYear);
|
|
|
|
- // clip.setMonth(thisMonth);
|
|
|
|
- // clip.setCalcDate(calcDate);
|
|
|
|
- // clip.setRoleId("f38d8d70cf7ec50d5357a749e4dbf8ee");
|
|
|
|
- // userEfficientVideoMapMapper.insert(clip);
|
|
|
|
- //
|
|
|
|
- // //快手有效视频同步到有效视频素材库
|
|
|
|
- // userEfficientVideoMapMapper.updateKuaishouEffiType(1, effiVideoDTO.getSignature());
|
|
|
|
- //
|
|
|
|
- // }
|
|
|
|
- // log.info("快手有效视频统计结束,统计时间为 " + calcDate);
|
|
|
|
- //}
|
|
|
|
-
|
|
|
|
- //头条有效视频计算--旧版 已废弃
|
|
|
|
- //private void toutiaoEffiVideo(Date calcDate, String effiCalcStart, String effiCalcEnd, String effiStart, String effiEnd, int thisYear, int thisMonth, int thisQuarter) {
|
|
|
|
- // log.info("头条手有效视频统计开始,统计时间为 " + calcDate);
|
|
|
|
- // //获取时间段内所有头条的有效视频
|
|
|
|
- // List<EffiVideoDTO> EffiVideoDTOList = userEfficientVideoMapMapper.getToutiaoUserVideoMap(effiStart, effiEnd, effiCalcStart, effiCalcEnd);
|
|
|
|
- //
|
|
|
|
- // for (EffiVideoDTO effiVideoDTO : EffiVideoDTOList) {
|
|
|
|
- // //判断此视频是否已经在关系表中存在,如果已经存在则说明此视频已经存在,跳过即可
|
|
|
|
- // //有效视频的逻辑是无论是快手还是头条
|
|
|
|
- // int signatureCount = userEfficientVideoMapMapper.getEffiVideoCountBySignature(effiVideoDTO.getSignature(), new Integer(1));//1头条 2快手
|
|
|
|
- // if (signatureCount != 0) {
|
|
|
|
- // continue;
|
|
|
|
- // }
|
|
|
|
- //
|
|
|
|
- // UserEfficientVideoMap shot = new UserEfficientVideoMap();
|
|
|
|
- // UserEfficientVideoMap plane = new UserEfficientVideoMap();
|
|
|
|
- // UserEfficientVideoMap plan = new UserEfficientVideoMap();
|
|
|
|
- // UserEfficientVideoMap clip = new UserEfficientVideoMap();
|
|
|
|
- //
|
|
|
|
- // //拍摄
|
|
|
|
- // shot.setUserId(effiVideoDTO.getShotId());
|
|
|
|
- // shot.setEfficientVideoSignature(effiVideoDTO.getSignature());
|
|
|
|
- // shot.setQuarter(thisQuarter);
|
|
|
|
- // shot.setAppType(1); //1头条 2快手
|
|
|
|
- // shot.setYear(thisYear);
|
|
|
|
- // shot.setMonth(thisMonth);
|
|
|
|
- // shot.setCalcDate(calcDate);
|
|
|
|
- // shot.setRoleId("7bff9afed625aeeabca6bffe3c189183");
|
|
|
|
- // //role_code shot
|
|
|
|
- // userEfficientVideoMapMapper.insert(shot);
|
|
|
|
- //
|
|
|
|
- // //平面
|
|
|
|
- // plane.setUserId(effiVideoDTO.getPlaneId());
|
|
|
|
- // plane.setEfficientVideoSignature(effiVideoDTO.getSignature());
|
|
|
|
- // plane.setQuarter(thisQuarter);
|
|
|
|
- // plane.setAppType(1); //1头条 2快手
|
|
|
|
- // plane.setYear(thisYear);
|
|
|
|
- // plane.setMonth(thisMonth);
|
|
|
|
- // plane.setCalcDate(calcDate);
|
|
|
|
- // plane.setRoleId("8dc30cb9810bde89bdc3fa8a85b830b0");
|
|
|
|
- // //role_code shot
|
|
|
|
- // userEfficientVideoMapMapper.insert(plane);
|
|
|
|
- //
|
|
|
|
- // //策划
|
|
|
|
- // plan.setUserId(effiVideoDTO.getPlanId());
|
|
|
|
- // plan.setEfficientVideoSignature(effiVideoDTO.getSignature());
|
|
|
|
- // plan.setQuarter(thisQuarter);
|
|
|
|
- // plan.setAppType(1); //1头条 2快手
|
|
|
|
- // plan.setYear(thisYear);
|
|
|
|
- // plan.setMonth(thisMonth);
|
|
|
|
- // plan.setCalcDate(calcDate);
|
|
|
|
- // plan.setRoleId("0214283aa16f943efbb149ea4bb18f18");
|
|
|
|
- // //role_code plan
|
|
|
|
- // userEfficientVideoMapMapper.insert(plan);
|
|
|
|
- //
|
|
|
|
- // //剪辑
|
|
|
|
- // clip.setUserId(effiVideoDTO.getClipId());
|
|
|
|
- // clip.setEfficientVideoSignature(effiVideoDTO.getSignature());
|
|
|
|
- // clip.setQuarter(thisQuarter);
|
|
|
|
- // clip.setAppType(1); //1头条 2快手
|
|
|
|
- // clip.setYear(thisYear);
|
|
|
|
- // clip.setMonth(thisMonth);
|
|
|
|
- // clip.setCalcDate(calcDate);
|
|
|
|
- // clip.setRoleId("f38d8d70cf7ec50d5357a749e4dbf8ee");
|
|
|
|
- // //role_code clip
|
|
|
|
- // userEfficientVideoMapMapper.insert(clip);
|
|
|
|
- //
|
|
|
|
- // //头条有效视频同步到有效视频素材库
|
|
|
|
- // userEfficientVideoMapMapper.updateToutiaoEffiType(1, effiVideoDTO.getSignature());
|
|
|
|
- // }
|
|
|
|
- // log.info("头条有效视频统计结束,统计时间为 " + calcDate);
|
|
|
|
- //}
|
|
|
|
- ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
|
|
|
- //有效视频计算结束
|
|
|
|
- ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
|
|
|
-
|
|
|
|
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
|
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
|
//新有效视频计算开始
|
|
//新有效视频计算开始
|
|
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
|
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
|
@@ -1190,7 +1044,7 @@ public class PerformanceServiceImpl2 extends ServiceImpl<PerformanceMapper, Perf
|
|
performance.setRoleId(designLeaderMap.get(key).getRoleId());
|
|
performance.setRoleId(designLeaderMap.get(key).getRoleId());
|
|
performance.setQuarter(thisQuarter);
|
|
performance.setQuarter(thisQuarter);
|
|
performance.setYear(thisYear);
|
|
performance.setYear(thisYear);
|
|
- //performance.setCommissionRate(new BigDecimal("0.002")); //头条平台比例2‰
|
|
|
|
|
|
+ performance.setCommissionRate(new BigDecimal("0.002")); //头条平台比例2‰
|
|
performance.setTotalCost(designLeaderMap.get(key).getCost());
|
|
performance.setTotalCost(designLeaderMap.get(key).getCost());
|
|
performance.setTotalPerformance(designLeaderMap.get(key).getEffiRate()); //头条
|
|
performance.setTotalPerformance(designLeaderMap.get(key).getEffiRate()); //头条
|
|
//performance.setRoleCommissionRate(new BigDecimal("0.05"));
|
|
//performance.setRoleCommissionRate(new BigDecimal("0.05"));
|
|
@@ -1204,43 +1058,6 @@ public class PerformanceServiceImpl2 extends ServiceImpl<PerformanceMapper, Perf
|
|
}
|
|
}
|
|
///////////////////////////////////////////////////////////////////////////////////////////////////////快手平面end
|
|
///////////////////////////////////////////////////////////////////////////////////////////////////////快手平面end
|
|
|
|
|
|
- //////////////////////////////////////////////////////////////////////////////////////////////////快手设计师leader绩效计算start
|
|
|
|
- //private void kuaishouDesignLeaderPerformance(int thisYear, int thisQuarter, String startTime, String endTime) {
|
|
|
|
- // log.info(thisYear + "年第" + thisQuarter + "季度快手设计师leader季度绩效计算开始");
|
|
|
|
- // //直接查询出来各种媒体类型的设计组长
|
|
|
|
- // List<UserDto2> designLeaderList = userEfficientVideoMapMapper.getKuaishouDesignLeaderList();
|
|
|
|
- //
|
|
|
|
- // //循环list然后根据查出leader组下的剪辑userId
|
|
|
|
- // for (UserDto2 userDto : designLeaderList) {
|
|
|
|
- // List<String> clipList = userEfficientVideoMapMapper.getClip(userDto.getDepId());
|
|
|
|
- // BigDecimal totalCost = BigDecimal.ZERO; //剪辑总消耗
|
|
|
|
- //
|
|
|
|
- // for (String clipUserId : clipList) {
|
|
|
|
- // BigDecimal clipCost = userEfficientVideoMapMapper.getClipQuarterCost(2, thisQuarter, thisYear, clipUserId); //媒体类型 //1头条 2快手
|
|
|
|
- // totalCost = totalCost.add(clipCost);
|
|
|
|
- // }
|
|
|
|
- //
|
|
|
|
- // //总绩效=剪辑消耗总合 * 平台比例 * 20%
|
|
|
|
- // BigDecimal totalPerformance = totalCost.multiply(new BigDecimal("0.003")).multiply(new BigDecimal("0.2"));
|
|
|
|
- //
|
|
|
|
- // Performance performance = new Performance();
|
|
|
|
- // performance.setAppType(2); //1头条 2快手
|
|
|
|
- // performance.setRoleId(userDto.getRoleId());
|
|
|
|
- // performance.setQuarter(thisQuarter);
|
|
|
|
- // performance.setYear(thisYear);
|
|
|
|
- // performance.setCommissionRate(new BigDecimal("0.003"));
|
|
|
|
- // performance.setTotalCost(totalCost);
|
|
|
|
- // performance.setTotalPerformance(totalPerformance);
|
|
|
|
- // performance.setStartTime(startTime);
|
|
|
|
- // performance.setEndTime(endTime);
|
|
|
|
- // performance.setRoleCommissionRate(new BigDecimal("0.2"));
|
|
|
|
- // performance.setUserId(userDto.getUserId());
|
|
|
|
- // performanceMapper.insert(performance);
|
|
|
|
- // }
|
|
|
|
- // log.info(thisYear + "年第" + thisQuarter + "季度快手设计师leader季度绩效计算结束");
|
|
|
|
- //}
|
|
|
|
- //////////////////////////////////////////////////////////////////////////////////////////////////快手设计师leader绩效计算end
|
|
|
|
-
|
|
|
|
////////////////////////////////////////////////////////////////////////////////////////////
|
|
////////////////////////////////////////////////////////////////////////////////////////////
|
|
//头条
|
|
//头条
|
|
////////////////////////////////////////////////////////////////////////////////////////////
|
|
////////////////////////////////////////////////////////////////////////////////////////////
|
|
@@ -1490,6 +1307,7 @@ public class PerformanceServiceImpl2 extends ServiceImpl<PerformanceMapper, Perf
|
|
//获取所有project根据媒体类型获取快手下的项目类型 1-头条 2-快手
|
|
//获取所有project根据媒体类型获取快手下的项目类型 1-头条 2-快手
|
|
List<ProjectDTO> projectDTOS = userEfficientVideoMapMapper.getProjects("1");
|
|
List<ProjectDTO> projectDTOS = userEfficientVideoMapMapper.getProjects("1");
|
|
|
|
|
|
|
|
+
|
|
//循环project
|
|
//循环project
|
|
for (ProjectDTO projectDTO : projectDTOS) {
|
|
for (ProjectDTO projectDTO : projectDTOS) {
|
|
//判断是否是北京的部门负责的项目,如果不是的话跳出
|
|
//判断是否是北京的部门负责的项目,如果不是的话跳出
|
|
@@ -1626,43 +1444,7 @@ public class PerformanceServiceImpl2 extends ServiceImpl<PerformanceMapper, Perf
|
|
}
|
|
}
|
|
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////头条平面设计师绩效end
|
|
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////头条平面设计师绩效end
|
|
|
|
|
|
- /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////头条设计师leader绩效 start
|
|
|
|
- //private void toutiaoDesignLeaderPerformance(int thisYear, int thisQuarter, String startTime, String endTime) {
|
|
|
|
- // log.info(thisYear + "年第" + thisQuarter + "季度头条设计师leader季度绩效计算开始");
|
|
|
|
- // //直接查询出来各种媒体类型的设计组长
|
|
|
|
- // List<UserDto2> designLeaderList = userEfficientVideoMapMapper.getKuaishouDesignLeaderList();
|
|
|
|
- //
|
|
|
|
- // //循环list然后根据查出leader组下的剪辑userId
|
|
|
|
- // for (UserDto2 userDto : designLeaderList) {
|
|
|
|
- // List<String> clipList = userEfficientVideoMapMapper.getClip(userDto.getDepId());
|
|
|
|
- // BigDecimal totalCost = BigDecimal.ZERO; //剪辑总消耗
|
|
|
|
- //
|
|
|
|
- // for (String clipUserId : clipList) {
|
|
|
|
- // BigDecimal clipCost = userEfficientVideoMapMapper.getClipQuarterCost(1, thisQuarter, thisYear, clipUserId); //媒体类型 //1头条 2快手
|
|
|
|
- // totalCost = totalCost.add(clipCost);
|
|
|
|
- // }
|
|
|
|
- //
|
|
|
|
- // //总绩效=小组下所有剪辑消耗总合 * 平台比例 * 20%
|
|
|
|
- // BigDecimal totalPerformance = totalCost.multiply(new BigDecimal("0.002")).multiply(new BigDecimal("0.2"));
|
|
|
|
- //
|
|
|
|
- // Performance performance = new Performance();
|
|
|
|
- // performance.setAppType(1); //1头条 2快手
|
|
|
|
- // performance.setRoleId(userDto.getRoleId());
|
|
|
|
- // performance.setQuarter(thisQuarter);
|
|
|
|
- // performance.setYear(thisYear);
|
|
|
|
- // performance.setCommissionRate(new BigDecimal("0.002")); //千分之
|
|
|
|
- // performance.setRoleCommissionRate(new BigDecimal("0.2"));
|
|
|
|
- // performance.setTotalCost(totalCost);
|
|
|
|
- // performance.setTotalPerformance(totalPerformance);
|
|
|
|
- // performance.setStartTime(startTime);
|
|
|
|
- // performance.setEndTime(endTime);
|
|
|
|
- // performance.setUserId(userDto.getUserId());
|
|
|
|
- // performanceMapper.insert(performance);
|
|
|
|
- // }
|
|
|
|
- // log.info(thisYear + "年第" + thisQuarter + "季度头条设计师leader季度绩效计算开始");
|
|
|
|
- //}
|
|
|
|
-
|
|
|
|
- /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////头条设计师leader绩效 end
|
|
|
|
|
|
+
|
|
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
|
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
|
//绩效计算结束
|
|
//绩效计算结束
|
|
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
|
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
|
@@ -2725,5 +2507,13 @@ public class PerformanceServiceImpl2 extends ServiceImpl<PerformanceMapper, Perf
|
|
return userEfficientVideoMapMapper.getToutiaoQuarterVideoInfoByAccountId(startDate, endDate, accountId);
|
|
return userEfficientVideoMapMapper.getToutiaoQuarterVideoInfoByAccountId(startDate, endDate, accountId);
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ public List<VideoDTO> getUserQuarterVideo(Integer year, Integer quarter, String userId){
|
|
|
|
+ return userEfficientVideoMapMapper.getUserQuarterVideo(userId, year, quarter);
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ public List<VideoDTO> getUserQuarterEffiVideo(Integer year, Integer quarter, String userId){
|
|
|
|
+ return userEfficientVideoMapMapper.getUserQuarterEffiVideo(userId, year, quarter);
|
|
|
|
+ }
|
|
|
|
+
|
|
}
|
|
}
|
|
|
|
|