|
@@ -7,6 +7,8 @@ import cn.com.ctop.planeprojectcost.entity.PlaneProjectCost;
|
|
import cn.com.ctop.planeprojectcost.mapper.PlaneProjectCostMapper;
|
|
import cn.com.ctop.planeprojectcost.mapper.PlaneProjectCostMapper;
|
|
import cn.com.ctop.userefficientvideomap.entity.*;
|
|
import cn.com.ctop.userefficientvideomap.entity.*;
|
|
import cn.com.ctop.userefficientvideomap.mapper.UserEfficientVideoMapMapper;
|
|
import cn.com.ctop.userefficientvideomap.mapper.UserEfficientVideoMapMapper;
|
|
|
|
+import cn.com.ctop.uservideomap.entity.UserVideoMap;
|
|
|
|
+import cn.com.ctop.uservideomap.mapper.UserVideoMapMapper;
|
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
|
import io.micrometer.core.instrument.util.StringUtils;
|
|
import io.micrometer.core.instrument.util.StringUtils;
|
|
import lombok.extern.slf4j.Slf4j;
|
|
import lombok.extern.slf4j.Slf4j;
|
|
@@ -43,6 +45,8 @@ public class PerformanceServiceImpl2 extends ServiceImpl<PerformanceMapper, Perf
|
|
private SysRoleMapper sysRoleMapper;
|
|
private SysRoleMapper sysRoleMapper;
|
|
@Autowired
|
|
@Autowired
|
|
private PlaneProjectCostMapper planeProjectCostMapper;
|
|
private PlaneProjectCostMapper planeProjectCostMapper;
|
|
|
|
+ @Autowired
|
|
|
|
+ private UserVideoMapMapper userVideoMapMapper;
|
|
|
|
|
|
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
|
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
|
//有效视频计算开始
|
|
//有效视频计算开始
|
|
@@ -96,7 +100,10 @@ public class PerformanceServiceImpl2 extends ServiceImpl<PerformanceMapper, Perf
|
|
//快手有效视频(新)
|
|
//快手有效视频(新)
|
|
//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));
|
|
|
|
+
|
|
|
|
+ //总视频
|
|
|
|
+ kuaishouNewVideo( calcDate, thisYear, thisQuarter, thisMonth, DateUtils.formatDate(friday), DateUtils.formatDate(thursday));
|
|
}
|
|
}
|
|
|
|
|
|
//快手有效视频统计
|
|
//快手有效视频统计
|
|
@@ -248,7 +255,6 @@ public class PerformanceServiceImpl2 extends ServiceImpl<PerformanceMapper, Perf
|
|
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
|
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
|
//新有效视频计算开始
|
|
//新有效视频计算开始
|
|
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
|
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
|
-
|
|
|
|
//快手有效视频统计
|
|
//快手有效视频统计
|
|
private void kuaishouNewEffiVideo(Date calcDate, String effiCalcStart, String effiFirstWeekCalcEnd, int thisYear, int thisMonth, int thisQuarter, String friday, String thursday) {
|
|
private void kuaishouNewEffiVideo(Date calcDate, String effiCalcStart, String effiFirstWeekCalcEnd, int thisYear, int thisMonth, int thisQuarter, String friday, String thursday) {
|
|
log.info("快手有效视频统计开始,统计时间为 " + calcDate);
|
|
log.info("快手有效视频统计开始,统计时间为 " + calcDate);
|
|
@@ -293,9 +299,16 @@ public class PerformanceServiceImpl2 extends ServiceImpl<PerformanceMapper, Perf
|
|
|
|
|
|
String companyId = null;
|
|
String companyId = null;
|
|
//根据编导id获取视频所属分公司
|
|
//根据编导id获取视频所属分公司
|
|
- if(StringUtils.isNotBlank(effiVideoDTO.getPlanId())) {
|
|
|
|
|
|
+ if( StringUtils.isNotBlank(effiVideoDTO.getPlanId()) ) {
|
|
companyId = userEfficientVideoMapMapper.getCompanyInfoByUserId(effiVideoDTO.getPlanId());
|
|
companyId = userEfficientVideoMapMapper.getCompanyInfoByUserId(effiVideoDTO.getPlanId());
|
|
|
|
+ }else if( StringUtils.isNotBlank(effiVideoDTO.getClipId()) ){
|
|
|
|
+ companyId = userEfficientVideoMapMapper.getCompanyInfoByUserId( effiVideoDTO.getClipId() );
|
|
|
|
+ }else if( StringUtils.isNotBlank(effiVideoDTO.getShotId()) ){
|
|
|
|
+ companyId = userEfficientVideoMapMapper.getCompanyInfoByUserId( effiVideoDTO.getShotId() );
|
|
|
|
+ }else if ( StringUtils.isNotBlank(effiVideoDTO.getPlaneId()) ){
|
|
|
|
+ companyId = userEfficientVideoMapMapper.getCompanyInfoByUserId( effiVideoDTO.getPlaneId() );
|
|
}
|
|
}
|
|
|
|
+ //
|
|
|
|
|
|
UserEfficientVideoMap shot = new UserEfficientVideoMap();
|
|
UserEfficientVideoMap shot = new UserEfficientVideoMap();
|
|
UserEfficientVideoMap plane = new UserEfficientVideoMap();
|
|
UserEfficientVideoMap plane = new UserEfficientVideoMap();
|
|
@@ -310,7 +323,7 @@ public class PerformanceServiceImpl2 extends ServiceImpl<PerformanceMapper, Perf
|
|
shot.setYear(thisYear);
|
|
shot.setYear(thisYear);
|
|
shot.setMonth(thisMonth);
|
|
shot.setMonth(thisMonth);
|
|
shot.setCalcDate(calcDate);
|
|
shot.setCalcDate(calcDate);
|
|
- shot.setRoleId("7bff9afed625aeeabca6bffe3c189183");
|
|
|
|
|
|
+ shot.setRoleId("shot");
|
|
shot.setWeekStart(friday);
|
|
shot.setWeekStart(friday);
|
|
shot.setWeekEnd(thursday);
|
|
shot.setWeekEnd(thursday);
|
|
shot.setCompanyId(companyId);
|
|
shot.setCompanyId(companyId);
|
|
@@ -324,7 +337,7 @@ public class PerformanceServiceImpl2 extends ServiceImpl<PerformanceMapper, Perf
|
|
plane.setYear(thisYear);
|
|
plane.setYear(thisYear);
|
|
plane.setMonth(thisMonth);
|
|
plane.setMonth(thisMonth);
|
|
plane.setCalcDate(calcDate);
|
|
plane.setCalcDate(calcDate);
|
|
- plane.setRoleId("8dc30cb9810bde89bdc3fa8a85b830b0");
|
|
|
|
|
|
+ plane.setRoleId("plane");
|
|
plane.setWeekStart(friday);
|
|
plane.setWeekStart(friday);
|
|
plane.setWeekEnd(thursday);
|
|
plane.setWeekEnd(thursday);
|
|
plane.setCompanyId(companyId);
|
|
plane.setCompanyId(companyId);
|
|
@@ -338,7 +351,7 @@ public class PerformanceServiceImpl2 extends ServiceImpl<PerformanceMapper, Perf
|
|
plan.setYear(thisYear);
|
|
plan.setYear(thisYear);
|
|
plan.setMonth(thisMonth);
|
|
plan.setMonth(thisMonth);
|
|
plan.setCalcDate(calcDate);
|
|
plan.setCalcDate(calcDate);
|
|
- plan.setRoleId("0214283aa16f943efbb149ea4bb18f18");
|
|
|
|
|
|
+ plan.setRoleId("plan");
|
|
plan.setWeekStart(friday);
|
|
plan.setWeekStart(friday);
|
|
plan.setWeekEnd(thursday);
|
|
plan.setWeekEnd(thursday);
|
|
plan.setCompanyId(companyId);
|
|
plan.setCompanyId(companyId);
|
|
@@ -352,7 +365,7 @@ public class PerformanceServiceImpl2 extends ServiceImpl<PerformanceMapper, Perf
|
|
clip.setYear(thisYear);
|
|
clip.setYear(thisYear);
|
|
clip.setMonth(thisMonth);
|
|
clip.setMonth(thisMonth);
|
|
clip.setCalcDate(calcDate);
|
|
clip.setCalcDate(calcDate);
|
|
- clip.setRoleId("f38d8d70cf7ec50d5357a749e4dbf8ee");
|
|
|
|
|
|
+ clip.setRoleId("clip");
|
|
clip.setWeekStart(friday);
|
|
clip.setWeekStart(friday);
|
|
clip.setWeekEnd(thursday);
|
|
clip.setWeekEnd(thursday);
|
|
clip.setCompanyId(companyId);
|
|
clip.setCompanyId(companyId);
|
|
@@ -408,9 +421,16 @@ public class PerformanceServiceImpl2 extends ServiceImpl<PerformanceMapper, Perf
|
|
|
|
|
|
String companyId = null;
|
|
String companyId = null;
|
|
//根据编导id获取视频所属分公司
|
|
//根据编导id获取视频所属分公司
|
|
- if(StringUtils.isNotBlank(effiVideoDTO.getPlanId())) {
|
|
|
|
|
|
+ if( StringUtils.isNotBlank(effiVideoDTO.getPlanId()) ) {
|
|
companyId = userEfficientVideoMapMapper.getCompanyInfoByUserId(effiVideoDTO.getPlanId());
|
|
companyId = userEfficientVideoMapMapper.getCompanyInfoByUserId(effiVideoDTO.getPlanId());
|
|
|
|
+ }else if( StringUtils.isNotBlank(effiVideoDTO.getClipId()) ){
|
|
|
|
+ companyId = userEfficientVideoMapMapper.getCompanyInfoByUserId( effiVideoDTO.getClipId() );
|
|
|
|
+ }else if( StringUtils.isNotBlank(effiVideoDTO.getShotId()) ){
|
|
|
|
+ companyId = userEfficientVideoMapMapper.getCompanyInfoByUserId( effiVideoDTO.getShotId() );
|
|
|
|
+ }else if ( StringUtils.isNotBlank(effiVideoDTO.getPlaneId()) ){
|
|
|
|
+ companyId = userEfficientVideoMapMapper.getCompanyInfoByUserId( effiVideoDTO.getPlaneId() );
|
|
}
|
|
}
|
|
|
|
+ //
|
|
|
|
|
|
UserEfficientVideoMap shot = new UserEfficientVideoMap();
|
|
UserEfficientVideoMap shot = new UserEfficientVideoMap();
|
|
UserEfficientVideoMap plane = new UserEfficientVideoMap();
|
|
UserEfficientVideoMap plane = new UserEfficientVideoMap();
|
|
@@ -425,7 +445,7 @@ public class PerformanceServiceImpl2 extends ServiceImpl<PerformanceMapper, Perf
|
|
shot.setYear(thisYear);
|
|
shot.setYear(thisYear);
|
|
shot.setMonth(thisMonth);
|
|
shot.setMonth(thisMonth);
|
|
shot.setCalcDate(calcDate);
|
|
shot.setCalcDate(calcDate);
|
|
- shot.setRoleId("7bff9afed625aeeabca6bffe3c189183");
|
|
|
|
|
|
+ shot.setRoleId("shot");
|
|
shot.setWeekStart(friday);
|
|
shot.setWeekStart(friday);
|
|
shot.setWeekEnd(thursday);
|
|
shot.setWeekEnd(thursday);
|
|
shot.setCompanyId(companyId);
|
|
shot.setCompanyId(companyId);
|
|
@@ -439,7 +459,7 @@ public class PerformanceServiceImpl2 extends ServiceImpl<PerformanceMapper, Perf
|
|
plane.setYear(thisYear);
|
|
plane.setYear(thisYear);
|
|
plane.setMonth(thisMonth);
|
|
plane.setMonth(thisMonth);
|
|
plane.setCalcDate(calcDate);
|
|
plane.setCalcDate(calcDate);
|
|
- plane.setRoleId("8dc30cb9810bde89bdc3fa8a85b830b0");
|
|
|
|
|
|
+ plane.setRoleId("plane");
|
|
plane.setWeekStart(friday);
|
|
plane.setWeekStart(friday);
|
|
plane.setWeekEnd(thursday);
|
|
plane.setWeekEnd(thursday);
|
|
plane.setCompanyId(companyId);
|
|
plane.setCompanyId(companyId);
|
|
@@ -453,7 +473,7 @@ public class PerformanceServiceImpl2 extends ServiceImpl<PerformanceMapper, Perf
|
|
plan.setYear(thisYear);
|
|
plan.setYear(thisYear);
|
|
plan.setMonth(thisMonth);
|
|
plan.setMonth(thisMonth);
|
|
plan.setCalcDate(calcDate);
|
|
plan.setCalcDate(calcDate);
|
|
- plan.setRoleId("0214283aa16f943efbb149ea4bb18f18");
|
|
|
|
|
|
+ plan.setRoleId("plan");
|
|
plan.setWeekStart(friday);
|
|
plan.setWeekStart(friday);
|
|
plan.setWeekEnd(thursday);
|
|
plan.setWeekEnd(thursday);
|
|
plan.setCompanyId(companyId);
|
|
plan.setCompanyId(companyId);
|
|
@@ -467,7 +487,7 @@ public class PerformanceServiceImpl2 extends ServiceImpl<PerformanceMapper, Perf
|
|
clip.setYear(thisYear);
|
|
clip.setYear(thisYear);
|
|
clip.setMonth(thisMonth);
|
|
clip.setMonth(thisMonth);
|
|
clip.setCalcDate(calcDate);
|
|
clip.setCalcDate(calcDate);
|
|
- clip.setRoleId("f38d8d70cf7ec50d5357a749e4dbf8ee");
|
|
|
|
|
|
+ clip.setRoleId("clip");
|
|
clip.setWeekStart(friday);
|
|
clip.setWeekStart(friday);
|
|
clip.setWeekEnd(thursday);
|
|
clip.setWeekEnd(thursday);
|
|
clip.setCompanyId(companyId);
|
|
clip.setCompanyId(companyId);
|
|
@@ -483,6 +503,93 @@ public class PerformanceServiceImpl2 extends ServiceImpl<PerformanceMapper, Perf
|
|
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
|
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
|
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
|
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
|
|
|
+ //新总视频计算开始
|
|
|
|
+ ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
|
|
|
+ public void kuaishouNewVideo(Date calcDate, int thisYear, int thisQuarter, int thisMonth,String friday, String thursday){
|
|
|
|
+ List<String> videoMd5s = userEfficientVideoMapMapper.getVideoByDates(friday,thursday);
|
|
|
|
+ for(String md5:videoMd5s){
|
|
|
|
+ //获取该视频的编导、剪辑、拍摄、平面等信息
|
|
|
|
+ EffiVideoDTO effiVideoDTO = userEfficientVideoMapMapper.getDesignerInfoByCode(md5);
|
|
|
|
+ if(effiVideoDTO == null){
|
|
|
|
+ effiVideoDTO = new EffiVideoDTO();
|
|
|
|
+ }
|
|
|
|
+ effiVideoDTO.setSignature(md5);
|
|
|
|
+
|
|
|
|
+ String companyId = null;
|
|
|
|
+ //根据编导id获取视频所属分公司
|
|
|
|
+ if( StringUtils.isNotBlank(effiVideoDTO.getPlanId()) ) {
|
|
|
|
+ companyId = userEfficientVideoMapMapper.getCompanyInfoByUserId(effiVideoDTO.getPlanId());
|
|
|
|
+ }else if( StringUtils.isNotBlank(effiVideoDTO.getClipId()) ){
|
|
|
|
+ companyId = userEfficientVideoMapMapper.getCompanyInfoByUserId( effiVideoDTO.getClipId() );
|
|
|
|
+ }else if( StringUtils.isNotBlank(effiVideoDTO.getShotId()) ){
|
|
|
|
+ companyId = userEfficientVideoMapMapper.getCompanyInfoByUserId( effiVideoDTO.getShotId() );
|
|
|
|
+ }else if ( StringUtils.isNotBlank(effiVideoDTO.getPlaneId()) ){
|
|
|
|
+ companyId = userEfficientVideoMapMapper.getCompanyInfoByUserId( effiVideoDTO.getPlaneId() );
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ UserVideoMap shot = new UserVideoMap();
|
|
|
|
+ UserVideoMap plane = new UserVideoMap();
|
|
|
|
+ UserVideoMap plan = new UserVideoMap();
|
|
|
|
+ UserVideoMap clip = new UserVideoMap();
|
|
|
|
+
|
|
|
|
+ //拍摄
|
|
|
|
+ shot.setUserId(effiVideoDTO.getShotId());
|
|
|
|
+ shot.setVideoSignature(effiVideoDTO.getSignature());
|
|
|
|
+ shot.setQuarter(thisQuarter);
|
|
|
|
+ shot.setYear(thisYear);
|
|
|
|
+ shot.setMonth(thisMonth);
|
|
|
|
+ shot.setCalcDate(calcDate);
|
|
|
|
+ shot.setRoleId("shot");
|
|
|
|
+ shot.setWeekStart(friday);
|
|
|
|
+ shot.setWeekEnd(thursday);
|
|
|
|
+ shot.setCompanyId(companyId);
|
|
|
|
+ userVideoMapMapper.insert(shot);
|
|
|
|
+
|
|
|
|
+ //平面
|
|
|
|
+ plane.setUserId(effiVideoDTO.getPlaneId());
|
|
|
|
+ plane.setVideoSignature(effiVideoDTO.getSignature());
|
|
|
|
+ plane.setQuarter(thisQuarter);
|
|
|
|
+ plane.setYear(thisYear);
|
|
|
|
+ plane.setMonth(thisMonth);
|
|
|
|
+ plane.setCalcDate(calcDate);
|
|
|
|
+ plane.setRoleId("plane");
|
|
|
|
+ plane.setWeekStart(friday);
|
|
|
|
+ plane.setWeekEnd(thursday);
|
|
|
|
+ plane.setCompanyId(companyId);
|
|
|
|
+ userVideoMapMapper.insert(plane);
|
|
|
|
+
|
|
|
|
+ //编导
|
|
|
|
+ plan.setUserId(effiVideoDTO.getPlanId());
|
|
|
|
+ plan.setVideoSignature(effiVideoDTO.getSignature());
|
|
|
|
+ plan.setQuarter(thisQuarter);
|
|
|
|
+ plan.setYear(thisYear);
|
|
|
|
+ plan.setMonth(thisMonth);
|
|
|
|
+ plan.setCalcDate(calcDate);
|
|
|
|
+ plan.setRoleId("plan");
|
|
|
|
+ plan.setWeekStart(friday);
|
|
|
|
+ plan.setWeekEnd(thursday);
|
|
|
|
+ plan.setCompanyId(companyId);
|
|
|
|
+ userVideoMapMapper.insert(plan);
|
|
|
|
+
|
|
|
|
+ //剪辑
|
|
|
|
+ clip.setUserId(effiVideoDTO.getClipId());
|
|
|
|
+ clip.setVideoSignature(effiVideoDTO.getSignature());
|
|
|
|
+ clip.setQuarter(thisQuarter);
|
|
|
|
+ clip.setYear(thisYear);
|
|
|
|
+ clip.setMonth(thisMonth);
|
|
|
|
+ clip.setCalcDate(calcDate);
|
|
|
|
+ clip.setRoleId("clip");
|
|
|
|
+ clip.setWeekStart(friday);
|
|
|
|
+ clip.setWeekEnd(thursday);
|
|
|
|
+ clip.setCompanyId(companyId);
|
|
|
|
+ userVideoMapMapper.insert(clip);
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
|
|
|
+ //新总视频计算结束
|
|
|
|
+ ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
|
|
|
+
|
|
|
|
+ ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
|
//绩效计算开始
|
|
//绩效计算开始
|
|
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
|
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
|
/**
|
|
/**
|