Bladeren bron

Merge branch 'test'

hcst_sunzhen 5 jaren geleden
bovenliggende
commit
84b4789014

+ 19 - 0
jeecg-boot-module-system/src/main/java/org/jeecg/modules/system/controller/PerformanceController2.java

@@ -535,6 +535,25 @@ public class PerformanceController2 {
         return result;
     }
 
+    @AutoLog(value = "获取相关视频列表")
+    @ApiOperation(value = "获取相关视频列表", notes = "获取相关视频列表")
+    @PostMapping(value = "/getVideoList")
+    public Result<List<MaterialInfo>> getVideoList(@RequestBody PerformanceTimeDTO dto,
+                                                       HttpServletRequest req) {
+        Result<List<MaterialInfo>> result = new Result<>();
+        String userId = dto.getUserId();
+        String startDate = dto.getStartDate();
+        String endDate = dto.getEndDate();
+        if(userId==null || startDate == null || endDate == null){
+            result.setSuccess(false);
+            result.setMessage("userId和时间不能为空");
+        }
+        List<MaterialInfo> materialInfoList = performanceService.getVideoList(userId, startDate, endDate);
+        result.setSuccess(true);
+        result.setResult(materialInfoList);
+        return result;
+    }
+
     @AutoLog(value = "获取本周相关有效视频列表")
     @ApiOperation(value = "获取本周相关有效视频列表", notes = "获取本周相关有效视频列表")
     @PostMapping(value = "/getWeekEffiVideoList")

+ 3 - 0
jeecg-boot-module-system/src/main/java/org/jeecg/modules/system/service/IPerformanceService2.java

@@ -90,6 +90,9 @@ public interface IPerformanceService2 extends IService<Performance> {
     //获取有效视频列表
     List<MaterialInfo> effiVideoList(Integer appType, Integer year, Integer quarter, String userId);
 
+    //获取有效视频列表
+    List<MaterialInfo> getVideoList(String userId, String startDate, String endDate);
+
     List<MaterialInfo> getEffiWeekVideoList(Integer appType, String startDate, String endDate, String userId);
 
     //获取快手优化师绩效实时数据

+ 159 - 42
jeecg-boot-module-system/src/main/java/org/jeecg/modules/system/service/impl/PerformanceServiceImpl2.java

@@ -7,6 +7,8 @@ import cn.com.ctop.planeprojectcost.entity.PlaneProjectCost;
 import cn.com.ctop.planeprojectcost.mapper.PlaneProjectCostMapper;
 import cn.com.ctop.userefficientvideomap.entity.*;
 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 io.micrometer.core.instrument.util.StringUtils;
 import lombok.extern.slf4j.Slf4j;
@@ -43,6 +45,8 @@ public class PerformanceServiceImpl2 extends ServiceImpl<PerformanceMapper, Perf
     private SysRoleMapper sysRoleMapper;
     @Autowired
     private PlaneProjectCostMapper planeProjectCostMapper;
+    @Autowired
+    private UserVideoMapMapper userVideoMapMapper;
 
     ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
     //有效视频计算开始
@@ -94,9 +98,12 @@ public class PerformanceServiceImpl2 extends ServiceImpl<PerformanceMapper, Perf
         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));
+
+        //总视频
+        //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) {
         log.info("快手有效视频统计开始,统计时间为 " + calcDate);
@@ -293,9 +299,16 @@ public class PerformanceServiceImpl2 extends ServiceImpl<PerformanceMapper, Perf
 
             String companyId = null;
             //根据编导id获取视频所属分公司
-            if(StringUtils.isNotBlank(effiVideoDTO.getPlanId())) {
+            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() );
             }
+            //
 
             UserEfficientVideoMap shot = new UserEfficientVideoMap();
             UserEfficientVideoMap plane = new UserEfficientVideoMap();
@@ -310,7 +323,7 @@ public class PerformanceServiceImpl2 extends ServiceImpl<PerformanceMapper, Perf
             shot.setYear(thisYear);
             shot.setMonth(thisMonth);
             shot.setCalcDate(calcDate);
-            shot.setRoleId("7bff9afed625aeeabca6bffe3c189183");
+            shot.setRoleId("shot");
             shot.setWeekStart(friday);
             shot.setWeekEnd(thursday);
             shot.setCompanyId(companyId);
@@ -324,7 +337,7 @@ public class PerformanceServiceImpl2 extends ServiceImpl<PerformanceMapper, Perf
             plane.setYear(thisYear);
             plane.setMonth(thisMonth);
             plane.setCalcDate(calcDate);
-            plane.setRoleId("8dc30cb9810bde89bdc3fa8a85b830b0");
+            plane.setRoleId("plane");
             plane.setWeekStart(friday);
             plane.setWeekEnd(thursday);
             plane.setCompanyId(companyId);
@@ -338,7 +351,7 @@ public class PerformanceServiceImpl2 extends ServiceImpl<PerformanceMapper, Perf
             plan.setYear(thisYear);
             plan.setMonth(thisMonth);
             plan.setCalcDate(calcDate);
-            plan.setRoleId("0214283aa16f943efbb149ea4bb18f18");
+            plan.setRoleId("plan");
             plan.setWeekStart(friday);
             plan.setWeekEnd(thursday);
             plan.setCompanyId(companyId);
@@ -352,7 +365,7 @@ public class PerformanceServiceImpl2 extends ServiceImpl<PerformanceMapper, Perf
             clip.setYear(thisYear);
             clip.setMonth(thisMonth);
             clip.setCalcDate(calcDate);
-            clip.setRoleId("f38d8d70cf7ec50d5357a749e4dbf8ee");
+            clip.setRoleId("clip");
             clip.setWeekStart(friday);
             clip.setWeekEnd(thursday);
             clip.setCompanyId(companyId);
@@ -408,9 +421,16 @@ public class PerformanceServiceImpl2 extends ServiceImpl<PerformanceMapper, Perf
 
             String companyId = null;
             //根据编导id获取视频所属分公司
-            if(StringUtils.isNotBlank(effiVideoDTO.getPlanId())) {
+            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() );
             }
+            //
 
             UserEfficientVideoMap shot = new UserEfficientVideoMap();
             UserEfficientVideoMap plane = new UserEfficientVideoMap();
@@ -425,7 +445,7 @@ public class PerformanceServiceImpl2 extends ServiceImpl<PerformanceMapper, Perf
             shot.setYear(thisYear);
             shot.setMonth(thisMonth);
             shot.setCalcDate(calcDate);
-            shot.setRoleId("7bff9afed625aeeabca6bffe3c189183");
+            shot.setRoleId("shot");
             shot.setWeekStart(friday);
             shot.setWeekEnd(thursday);
             shot.setCompanyId(companyId);
@@ -439,7 +459,7 @@ public class PerformanceServiceImpl2 extends ServiceImpl<PerformanceMapper, Perf
             plane.setYear(thisYear);
             plane.setMonth(thisMonth);
             plane.setCalcDate(calcDate);
-            plane.setRoleId("8dc30cb9810bde89bdc3fa8a85b830b0");
+            plane.setRoleId("plane");
             plane.setWeekStart(friday);
             plane.setWeekEnd(thursday);
             plane.setCompanyId(companyId);
@@ -453,7 +473,7 @@ public class PerformanceServiceImpl2 extends ServiceImpl<PerformanceMapper, Perf
             plan.setYear(thisYear);
             plan.setMonth(thisMonth);
             plan.setCalcDate(calcDate);
-            plan.setRoleId("0214283aa16f943efbb149ea4bb18f18");
+            plan.setRoleId("plan");
             plan.setWeekStart(friday);
             plan.setWeekEnd(thursday);
             plan.setCompanyId(companyId);
@@ -467,7 +487,7 @@ public class PerformanceServiceImpl2 extends ServiceImpl<PerformanceMapper, Perf
             clip.setYear(thisYear);
             clip.setMonth(thisMonth);
             clip.setCalcDate(calcDate);
-            clip.setRoleId("f38d8d70cf7ec50d5357a749e4dbf8ee");
+            clip.setRoleId("clip");
             clip.setWeekStart(friday);
             clip.setWeekEnd(thursday);
             clip.setCompanyId(companyId);
@@ -483,6 +503,102 @@ public class PerformanceServiceImpl2 extends ServiceImpl<PerformanceMapper, Perf
     ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
 
     ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
+    //新总视频计算开始
+    ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
+    public void kuaishouNewVideo(Date calcDate, int thisYear, int thisQuarter, int thisMonth, String friday, String thursday){
+        log.info("设计师周总视频计算开始");
+        List<String> videoMd5s = userEfficientVideoMapMapper.getVideoByDates(friday,thursday);
+        for(String md5:videoMd5s){
+            //去重
+            Integer signatureCount = userEfficientVideoMapMapper.getVideoCountByCode(md5);
+            if(signatureCount > 0){
+                continue;
+            }
+            //
+
+            //获取该视频的编导、剪辑、拍摄、平面等信息
+            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);
+        }
+        log.info("设计师周总视频计算结束");
+     }
+    ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
+    //新总视频计算结束
+    ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
+
+    ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
     //绩效计算开始
     ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
     /**
@@ -2071,24 +2187,22 @@ public class PerformanceServiceImpl2 extends ServiceImpl<PerformanceMapper, Perf
         List<UserDto2> userDto2List = userEfficientVideoMapMapper.getKuaishouDepartUserInfo();
         //2 循环所有人,并查询出每个人的有效视频数、总视频数、总消耗
         for (UserDto2 userDto : userDto2List) {
-            String roleCode = userDto.getRoleCode();
             //2.1 获取有效视频数量
-            Integer effiVideoCount = userEfficientVideoMapMapper.getEffiVideoCountByCalcDate(startDate, endDate, userDto.getRoleId(), userDto.getUserId(), 2);
-            //2.2 获取有效视频总数
-            Integer videoCount = userEfficientVideoMapMapper.getQuarterMaterialCountByUserId(userDto.getRoleCode(), startDate, endDate, userDto.getUserId());
+            Integer effiVideoCount = userEfficientVideoMapMapper.getEffiVideoCountByCalcDate(startDate, endDate, userDto.getUserId(), 2);
+            //2.2 获取视频总数
+            Integer videoCount = userEfficientVideoMapMapper.getVideoCountByUserId(userDto.getUserId(), startDate, endDate);
             //2.3 总消耗
-            BigDecimal cost = null;
-            if ("clip".equals(roleCode)) {
-                cost = userEfficientVideoMapMapper.getTotalCostByClipId(userDto.getUserId(), startDate, endDate);
-            } else if ("plan".equals(roleCode)) {
-                cost = userEfficientVideoMapMapper.getTotalCostByPlanId(userDto.getUserId(), startDate, endDate);
-            } else if ("shot".equals(roleCode)) {
-                cost = userEfficientVideoMapMapper.getTotalCostByShotId(userDto.getUserId(), startDate, endDate);
-            }
-            if(cost == null){
-                cost = BigDecimal.ZERO;
+            BigDecimal totalCost = BigDecimal.ZERO;
+            List<String> md5s = userEfficientVideoMapMapper.getTotalSignatureByUserId(userDto.getUserId(), startDate, endDate);
+            for(String md5:md5s){
+                BigDecimal cost = userEfficientVideoMapMapper.getSumChargeBySignature(md5, startDate, endDate);
+                    if(cost== null){
+                        cost = BigDecimal.ZERO;
+                    }
+                totalCost = totalCost.add(cost);
             }
-            userDto.setCost(cost);
+
+            userDto.setCost(totalCost);
             userDto.setVideoCount(videoCount);
             userDto.setEffiVideoCount(effiVideoCount);
         }
@@ -2104,23 +2218,20 @@ public class PerformanceServiceImpl2 extends ServiceImpl<PerformanceMapper, Perf
         for (UserDto2 userDto : userDto2List) {
             String roleCode = userDto.getRoleCode();
             //2.1 获取有效视频数量
-            Integer effiVideoCount = userEfficientVideoMapMapper.getEffiVideoCountByCalcDate(startDate, endDate, userDto.getRoleId(), userDto.getUserId(), 1);
+            Integer effiVideoCount = userEfficientVideoMapMapper.getEffiVideoCountByCalcDate(startDate, endDate, userDto.getUserId(), 1);
             //2.2 获取视频总数
-            Integer videoCount = userEfficientVideoMapMapper.getQuarterMaterialCountByUserId(userDto.getRoleCode(), startDate, endDate, userDto.getUserId());
+            Integer videoCount = userEfficientVideoMapMapper.getVideoCountByUserId(userDto.getUserId(), startDate, endDate);
             //2.3 总消耗
-            BigDecimal cost = null;
-            if ("clip".equals(roleCode)) {
-                cost = userEfficientVideoMapMapper.toutiaoGetTotalCostByClipId(userDto.getUserId(), startDate, endDate);
-            } else if ("plan".equals(roleCode)) {
-                cost = userEfficientVideoMapMapper.toutiaoGetTotalCostByPlanId(userDto.getUserId(), startDate, endDate);
-            } else if ("shot".equals(roleCode)) {
-                cost = userEfficientVideoMapMapper.toutiaoGetTotalCostByShotId(userDto.getUserId(), startDate, endDate);
-            }
-
-            if(cost == null){
-                cost = BigDecimal.ZERO;
+            BigDecimal totalCost = BigDecimal.ZERO;
+            List<String> md5s = userEfficientVideoMapMapper.getTotalSignatureByUserId(userDto.getUserId(), startDate, endDate);
+            for(String md5:md5s){
+                BigDecimal cost = userEfficientVideoMapMapper.getToutiaoSumChargeBySignature(md5, startDate, endDate);
+                if(cost== null){
+                    cost = BigDecimal.ZERO;
+                }
+                totalCost = totalCost.add(cost);
             }
-            userDto.setCost(cost);
+            userDto.setCost(totalCost);
             userDto.setVideoCount(videoCount);
             userDto.setEffiVideoCount(effiVideoCount);
         }
@@ -2209,6 +2320,12 @@ public class PerformanceServiceImpl2 extends ServiceImpl<PerformanceMapper, Perf
     }
 
     //根据userid,appType,年度,季度查询有效视频列表
+    public List<MaterialInfo> getVideoList(String userId, String startDate, String endDate){
+        List<MaterialInfo> materialInfoList = userEfficientVideoMapMapper.getVideoList(userId, startDate, endDate);
+        return materialInfoList;
+    }
+
+    //根据userid,appType,年度,季度查询有效视频列表
     public List<MaterialInfo> getEffiWeekVideoList(Integer appType, String startDate, String endDate, String userId){
         List<MaterialInfo> materialInfoList = userEfficientVideoMapMapper.getEffiWeekVideoList(appType, startDate, endDate, userId);
         return materialInfoList;

+ 5 - 8
jeecg-boot-module-system/src/main/resources/application-test.yml

@@ -1,5 +1,6 @@
 server:
   port: 8080
+  ip: 39.106.184.70
   servlet:
     context-path: /jeecg-boot
     compression:
@@ -14,7 +15,7 @@ management:
 
 spring:
   rabbitmq:
-    host: 127.0.0.1
+    host: 39.106.184.70
     port: 5672
     username: guest
     password: guest
@@ -64,10 +65,6 @@ spring:
   autoconfigure:
     exclude: com.alibaba.druid.spring.boot.autoconfigure.DruidDataSourceAutoConfigure
   datasource:
-    url: jdbc:mysql://127.0.0.1:3306/jeecg-boot?characterEncoding=UTF-8&useUnicode=true&useSSL=false
-    username: hcst
-    password: test@20190531
-    driver-class-name: com.mysql.jdbc.Driver
     druid:
       stat-view-servlet:
         enabled: true
@@ -104,8 +101,8 @@ spring:
       datasource:
         master:
           url: jdbc:mysql://39.106.184.70:3306/jeecg-boot?characterEncoding=UTF-8&useUnicode=true&useSSL=false
-          username: root
-          password: hcst2019
+          username: hcst
+          password: test@20190531
           driver-class-name: com.mysql.jdbc.Driver
           # 多数据源配置
           #multi-datasource1:
@@ -171,4 +168,4 @@ oss:
   replace:
     replace-value: oss-cn-beijing-internal
     replace-old-value: oss-cn-beijing
-    download: /mnt/file/video/
+    download: /mnt/file/video/

+ 5 - 0
module-common/src/main/java/cn/com/ctop/common/module/entity/MaterialInfo.java

@@ -136,4 +136,9 @@ public class MaterialInfo {
     @TableField(exist = false)
     private JSONObject kuaiShou;
 
+    @TableField(exist = false)
+    private String videoRoleCode;  //拍摄时候担任的角色
+
+    @TableField(exist = false)
+    private String originRoleName;  //原本的角色
 }

+ 17 - 1
performance-appraisal/src/main/java/cn/com/ctop/userefficientvideomap/mapper/UserEfficientVideoMapMapper.java

@@ -26,6 +26,10 @@ public interface UserEfficientVideoMapMapper extends BaseMapper<UserEfficientVid
 
     int getQuarterMaterialCountByUserId(@Param("roleCode") String roleCode, @Param("startTime") String startTime, @Param("endTime") String endTime, @Param("userId") String userId);
 
+    int getVideoCountByUserId(@Param("userId") String userId, @Param("startDate") String startDate, @Param("endDate") String endDate);
+
+    BigDecimal getTotalCostByUserId(@Param("userId") String userId, @Param("startDate") String startDate, @Param("endDate") String endDate);
+
     BigDecimal getTotalCostByClipId(@Param("userId") String userId, @Param("startDate") String startDate, @Param("endDate") String endDate);
 
     BigDecimal getTotalCostByShotId(@Param("userId") String userId, @Param("startDate") String startDate, @Param("endDate") String endDate);
@@ -116,7 +120,7 @@ public interface UserEfficientVideoMapMapper extends BaseMapper<UserEfficientVid
     List<UserDto2> getToutiaoDepartAllUserInfo();
 
     //根据天数的区间获取userId获取有效视频数量
-    Integer getEffiVideoCountByCalcDate(@Param("startDate") String startDate, @Param("endDate") String endDate, @Param("roleId") String roleId, @Param("userId") String userId, @Param("appType") Integer appType);
+    Integer getEffiVideoCountByCalcDate(@Param("startDate") String startDate, @Param("endDate") String endDate,  @Param("userId") String userId, @Param("appType") Integer appType);
 
     List<MaterialInfo> getEffiVideoList(@Param("appType") Integer appType, @Param("year") Integer year, @Param("quarter") Integer quarter, @Param("userId") String userId);
 
@@ -158,4 +162,16 @@ public interface UserEfficientVideoMapMapper extends BaseMapper<UserEfficientVid
 
     String getCompanyInfoByUserId(@Param("userId")String userId);
 
+    List<String> getVideoByDates(@Param("startDate")String startDate, @Param("endDate")String endDate);
+
+    Integer getVideoCountByCode(@Param("signature")String signature);
+
+    List<String> getTotalSignatureByUserId(@Param("userId")String userId, @Param("startDate")String startDate, @Param("endDate")String endDate);
+
+    BigDecimal getSumChargeBySignature(@Param("signature")String signature, @Param("startDate")String startDate, @Param("endDate")String endDate);
+
+    BigDecimal getToutiaoSumChargeBySignature(@Param("signature")String signature, @Param("startDate")String startDate, @Param("endDate")String endDate);
+
+    List<MaterialInfo> getVideoList(@Param("userId")String userId, @Param("startDate")String startDate, @Param("endDate")String endDate);
 }
+

+ 139 - 12
performance-appraisal/src/main/java/cn/com/ctop/userefficientvideomap/mapper/xml/UserEfficientVideoMapMapper.xml

@@ -15,7 +15,7 @@
             d3.realname as plan_name,
             d4.id as plane_id,
             d4.realname as plane_name
-        from ctop_kuaishou_report_daily_creative_statistic a
+        from ctop_kuaishou_report_daily_creative a
         left join (select id, create_time ,code from ctop_material_info group by code) b on a.signature = b.code
         left join ctop_material_ascription c on b.id = c.material_id
         left join sys_user d1 on c.clip_id = d1.id
@@ -75,11 +75,21 @@
         </choose>
     </select>
 
+    <select id="getVideoCountByUserId" resultType="integer">
+            select
+            count(1)
+        from
+        ctop_user_video_map
+        where user_id = #{userId}
+            and DATE_FORMAT(calc_date,'%Y-%m-%d') &gt;= #{startDate}
+            and DATE_FORMAT(calc_date,'%Y-%m-%d') &lt;= #{endDate}
+    </select>
+
     <!-- 根据clip_id获取视频总消耗 -->
     <select id="getTotalCostByClipId" resultType="java.math.BigDecimal">
             select
             sum(a.charge) as charge
-        from ctop_kuaishou_report_daily_creative_statistic a
+        from ctop_kuaishou_report_daily_creative a
         left join ctop_material_info b on a.signature = b.code
         left join ctop_material_ascription c on b.id = c.material_id
         left join sys_user d1 on c.clip_id = d1.id
@@ -92,11 +102,68 @@
         and c.clip_id = #{userId}
     </select>
 
+    <select id="getTotalCostByUserId" resultType="java.math.BigDecimal">
+            select
+            sum(a.charge) as charge
+        from
+        ctop_kuaishou_report_daily_creative a
+        left join
+        (
+        select
+        video_signature as signature
+        from
+        ctop_user_video_map
+        where user_id = #{userId}
+        and DATE_FORMAT(calc_date,'%Y-%m-%d') &gt;= #{startDate}
+        and DATE_FORMAT(calc_date,'%Y-%m-%d') &lt;= #{endDate}
+        group by video_signature) b
+        on a.signature = b.signature
+        where
+        DATE_FORMAT(a.stat_date,'%Y-%m-%d') &gt;= #{startDate}
+        and DATE_FORMAT(a.stat_date,'%Y-%m-%d') &lt;= #{endDate}
+    </select>
+
+    <select id="getTotalSignatureByUserId" resultType="string">
+        select
+        video_signature as signature
+        from
+        ctop_user_video_map
+        where user_id = #{userId}
+        and DATE_FORMAT(calc_date,'%Y-%m-%d') &gt;= #{startDate}
+        and DATE_FORMAT(calc_date,'%Y-%m-%d') &lt;= #{endDate}
+        group by video_signature
+    </select>
+
+    <select id="getToutiaoSumChargeBySignature" resultType="java.math.BigDecimal">
+        select
+            sum(a.cost) as charge
+        from
+        ctop_bytedance_report_creative_daily a
+        where a.signature = #{signature}
+        and
+        DATE_FORMAT(a.stat_datetime,'%Y-%m-%d') &gt;= #{startDate}
+        and
+        DATE_FORMAT(a.stat_datetime,'%Y-%m-%d') &lt;= #{endDate}
+    </select>
+
+    <select id="getSumChargeBySignature" resultType="java.math.BigDecimal">
+        select
+            sum(a.charge) as charge
+        from
+        ctop_kuaishou_report_daily_creative a
+        where a.signature = #{signature}
+        and
+        DATE_FORMAT(a.stat_date,'%Y-%m-%d') &gt;= #{startDate}
+        and
+        DATE_FORMAT(a.stat_date,'%Y-%m-%d') &lt;= #{endDate}
+    </select>
+
+
     <!-- 根据shot_id获取视频总消耗 -->
     <select id="getTotalCostByShotId" resultType="java.math.BigDecimal">
             select
             sum(a.charge) as charge
-        from ctop_kuaishou_report_daily_creative_statistic a
+        from ctop_kuaishou_report_daily_creative a
         left join ctop_material_info b on a.signature = b.code
         left join ctop_material_ascription c on b.id = c.material_id
         left join sys_user d1 on c.clip_id = d1.id
@@ -113,7 +180,7 @@
     <select id="getTotalCostByPlanId" resultType="java.math.BigDecimal">
             select
             sum(a.charge) as charge
-        from ctop_kuaishou_report_daily_creative_statistic a
+        from ctop_kuaishou_report_daily_creative a
         left join ctop_material_info b on a.signature = b.code
         left join ctop_material_ascription c on b.id = c.material_id
         left join sys_user d1 on c.clip_id = d1.id
@@ -130,7 +197,7 @@
     <select id="getTotalCostByPlaneId" resultType="java.math.BigDecimal">
             select
             sum(a.charge) as charge
-        from ctop_kuaishou_report_daily_creative_statistic a
+        from ctop_kuaishou_report_daily_creative a
         left join ctop_material_info b on a.signature = b.code
         left join ctop_material_ascription c on b.id = c.material_id
         left join sys_user d1 on c.clip_id = d1.id
@@ -203,7 +270,7 @@
         from
         ctop_material_info b
         left join ctop_material_ascription c on b.id = c.material_id
-        left join ctop_kuaishou_report_daily_creative_statistic a on b.code = a.signature
+        left join ctop_kuaishou_report_daily_creative a on b.code = a.signature
         where
         <choose>
             <when test=" roleCode == 'plan' ">
@@ -231,7 +298,7 @@
         from
         ctop_material_info b
         left join ctop_material_ascription c on b.id = c.material_id
-        left join ctop_kuaishou_report_daily_creative_statistic a on b.code = a.signature
+        left join ctop_kuaishou_report_daily_creative a on b.code = a.signature
         where
         b.id = #{materialId}
         and DATE_FORMAT(b.create_time,'%Y-%m-%d') &gt;= #{startDate}
@@ -897,7 +964,7 @@
         from
         ctop_user_efficient_video_map
         where user_id = #{userId}
-        and role_id = #{roleId}
+       <!-- and role_id = #{roleId}  -->
         and app_type = #{appType}
         and calc_date &lt;= #{endDate}
         and calc_date &gt;= #{startDate}
@@ -910,10 +977,14 @@
             i.code as code,
             i.url as url,
             i.material_name as materialName,
-            i.watermark_material_name as watermarkMaterialName
+            i.watermark_material_name as watermarkMaterialName,
+            m.role_id as videoRoleCode,  <!-- 拍摄时候担任的角色 -->
+            r.role_name as originRoleName  <!-- 原本的角色 -->
         from
         ctop_user_efficient_video_map m
-        left join ctop_material_info i on m.efficient_video_signature = i.code
+        left join (select id,code,url,material_name,watermark_material_name from ctop_material_info group by code) i on m.efficient_video_signature = i.code
+        left join sys_user_role sr on m.user_id = sr.user_id
+        left join sys_role r on sr.role_id = r.id
         where
         m.user_id = #{userId} and
         m.app_type =#{appType} and
@@ -928,10 +999,14 @@
             i.code as code,
             i.url as url,
             i.material_name as materialName,
-            i.watermark_material_name as watermarkMaterialName
+            i.watermark_material_name as watermarkMaterialName,
+            m.role_id as videoRoleCode,  <!-- 拍摄时候担任的角色 -->
+            r.role_name as originRoleName  <!-- 原本的角色 -->
         from
         ctop_user_efficient_video_map m
-        left join ctop_material_info i on m.efficient_video_signature = i.code
+        left join (select id,code,url,material_name,watermark_material_name from ctop_material_info group by code) i on m.efficient_video_signature = i.code
+        left join sys_user_role sr on m.user_id = sr.user_id
+        left join sys_role r on sr.role_id = r.id
         where
         m.user_id = #{userId} and
         m.app_type =#{appType} and
@@ -1056,4 +1131,56 @@
         where user_id = #{userId}
     </select>
 
+    <!-- 按时间段获取视频总量 -->
+    <select id="getVideoByDates" resultType="string">
+        select
+        code
+        from (
+            select
+            code,
+            create_time
+            from
+            ctop_material_info
+            where
+            date_format(create_time, '%Y-%m-%d') &gt;= #{startDate} and
+            date_format(create_time, '%Y-%m-%d') &lt;= #{endDate}
+            order by create_time
+            ) a
+        group by code
+    </select>
+
+    <select id="getVideoCountByCode" resultType="integer">
+        select
+        count(1)
+        from
+        ctop_user_video_map
+        where video_signature = #{signature}
+    </select>
+
+    <!-- 视频素材 -->
+    <select id="getVideoList" resultType="cn.com.ctop.common.module.entity.MaterialInfo">
+            select
+            i.id as id,
+            i.code as code,
+            i.url as url,
+            i.material_name as materialName,
+            i.watermark_material_name as watermarkMaterialName,
+            m.role_id as videoRoleCode,  <!-- 拍摄时候担任的角色 -->
+            r.role_name as originRoleName  <!-- 原本的角色 -->
+        from
+        ctop_user_video_map m
+        left join (
+                    select
+                    id,code,url,material_name,watermark_material_name
+                    from
+                    ctop_material_info group by code
+                    ) i on m.video_signature = i.code
+        left join sys_user_role sr on m.user_id = sr.user_id
+        left join sys_role r on sr.role_id = r.id
+        where
+        m.user_id = #{userId} and
+        m.calc_date &gt;= #{startDate} and
+        m.calc_date &lt;= #{endDate}
+    </select>
+
 </mapper>

+ 243 - 0
performance-appraisal/src/main/java/cn/com/ctop/uservideomap/controller/UserVideoMapController.java

@@ -0,0 +1,243 @@
+package cn.com.ctop.uservideomap.controller;
+
+import java.util.Arrays;
+import java.util.List;
+import java.util.Map;
+import java.io.IOException;
+import java.io.UnsupportedEncodingException;
+import java.net.URLDecoder;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+import org.jeecg.common.api.vo.Result;
+import org.jeecg.common.system.query.QueryGenerator;
+import org.jeecg.common.aspect.annotation.AutoLog;
+import org.jeecg.common.util.oConvertUtils;
+import cn.com.ctop.uservideomap.entity.UserVideoMap;
+import cn.com.ctop.uservideomap.service.IUserVideoMapService;
+import java.util.Date;
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import lombok.extern.slf4j.Slf4j;
+
+import org.jeecgframework.poi.excel.ExcelImportUtil;
+import org.jeecgframework.poi.excel.def.NormalExcelConstants;
+import org.jeecgframework.poi.excel.entity.ExportParams;
+import org.jeecgframework.poi.excel.entity.ImportParams;
+import org.jeecgframework.poi.excel.view.JeecgEntityExcelView;
+
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.*;
+import org.springframework.web.multipart.MultipartFile;
+import org.springframework.web.multipart.MultipartHttpServletRequest;
+import org.springframework.web.servlet.ModelAndView;
+import com.alibaba.fastjson.JSON;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+
+ /**
+ * 视频和设计师对应关系表
+ * @author jeecg-boot
+ * @date   2020-03-17
+ * @version V1.0
+ */
+@Slf4j
+@Api(tags="视频和设计师对应关系表")
+@RestController
+@RequestMapping("/uservideomap/userVideoMap")
+public class UserVideoMapController {
+	@Autowired
+	private IUserVideoMapService userVideoMapService;
+	
+	/**
+	  * 分页列表查询
+	 * @param userVideoMap
+	 * @param pageNo
+	 * @param pageSize
+	 * @param req
+	 * @return
+	 */
+	@AutoLog(value = "视频和设计师对应关系表-分页列表查询")
+	@ApiOperation(value="视频和设计师对应关系表-分页列表查询", notes="视频和设计师对应关系表-分页列表查询")
+	@GetMapping(value = "/list")
+	public Result<IPage<UserVideoMap>> queryPageList(UserVideoMap userVideoMap,
+									  @RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
+									  @RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
+									  HttpServletRequest req) {
+		Result<IPage<UserVideoMap>> result = new Result<IPage<UserVideoMap>>();
+		QueryWrapper<UserVideoMap> queryWrapper = QueryGenerator.initQueryWrapper(userVideoMap, req.getParameterMap());
+		Page<UserVideoMap> page = new Page<UserVideoMap>(pageNo, pageSize);
+		IPage<UserVideoMap> pageList = userVideoMapService.page(page, queryWrapper);
+		result.setSuccess(true);
+		result.setResult(pageList);
+		return result;
+	}
+	
+	/**
+	  *   添加
+	 * @param userVideoMap
+	 * @return
+	 */
+	@AutoLog(value = "视频和设计师对应关系表-添加")
+	@ApiOperation(value="视频和设计师对应关系表-添加", notes="视频和设计师对应关系表-添加")
+	@PostMapping(value = "/add")
+	public Result<UserVideoMap> add(@RequestBody UserVideoMap userVideoMap) {
+		Result<UserVideoMap> result = new Result<UserVideoMap>();
+		try {
+			userVideoMapService.save(userVideoMap);
+			result.success("添加成功!");
+		} catch (Exception e) {
+			log.error(e.getMessage(),e);
+			result.error500("操作失败");
+		}
+		return result;
+	}
+	
+	/**
+	  *  编辑
+	 * @param userVideoMap
+	 * @return
+	 */
+	@AutoLog(value = "视频和设计师对应关系表-编辑")
+	@ApiOperation(value="视频和设计师对应关系表-编辑", notes="视频和设计师对应关系表-编辑")
+	@PutMapping(value = "/edit")
+	public Result<UserVideoMap> edit(@RequestBody UserVideoMap userVideoMap) {
+		Result<UserVideoMap> result = new Result<UserVideoMap>();
+		UserVideoMap userVideoMapEntity = userVideoMapService.getById(userVideoMap.getId());
+		if(userVideoMapEntity==null) {
+			result.error500("未找到对应实体");
+		}else {
+			boolean ok = userVideoMapService.updateById(userVideoMap);
+			if(ok) {
+				result.success("修改成功!");
+			}
+		}
+		
+		return result;
+	}
+	
+	/**
+	  *   通过id删除
+	 * @param id
+	 * @return
+	 */
+	@AutoLog(value = "视频和设计师对应关系表-通过id删除")
+	@ApiOperation(value="视频和设计师对应关系表-通过id删除", notes="视频和设计师对应关系表-通过id删除")
+	@DeleteMapping(value = "/delete")
+	public Result<?> delete(@RequestParam(name="id",required=true) String id) {
+		try {
+			userVideoMapService.removeById(id);
+		} catch (Exception e) {
+			log.error("删除失败",e.getMessage());
+			return Result.error("删除失败!");
+		}
+		return Result.ok("删除成功!");
+	}
+	
+	/**
+	  *  批量删除
+	 * @param ids
+	 * @return
+	 */
+	@AutoLog(value = "视频和设计师对应关系表-批量删除")
+	@ApiOperation(value="视频和设计师对应关系表-批量删除", notes="视频和设计师对应关系表-批量删除")
+	@DeleteMapping(value = "/deleteBatch")
+	public Result<UserVideoMap> deleteBatch(@RequestParam(name="ids",required=true) String ids) {
+		Result<UserVideoMap> result = new Result<UserVideoMap>();
+		if(ids==null || "".equals(ids.trim())) {
+			result.error500("参数不识别!");
+		}else {
+			this.userVideoMapService.removeByIds(Arrays.asList(ids.split(",")));
+			result.success("删除成功!");
+		}
+		return result;
+	}
+	
+	/**
+	  * 通过id查询
+	 * @param id
+	 * @return
+	 */
+	@AutoLog(value = "视频和设计师对应关系表-通过id查询")
+	@ApiOperation(value="视频和设计师对应关系表-通过id查询", notes="视频和设计师对应关系表-通过id查询")
+	@GetMapping(value = "/queryById")
+	public Result<UserVideoMap> queryById(@RequestParam(name="id",required=true) String id) {
+		Result<UserVideoMap> result = new Result<UserVideoMap>();
+		UserVideoMap userVideoMap = userVideoMapService.getById(id);
+		if(userVideoMap==null) {
+			result.error500("未找到对应实体");
+		}else {
+			result.setResult(userVideoMap);
+			result.setSuccess(true);
+		}
+		return result;
+	}
+
+  /**
+      * 导出excel
+   *
+   * @param request
+   * @param response
+   */
+  @RequestMapping(value = "/exportXls")
+  public ModelAndView exportXls(HttpServletRequest request, HttpServletResponse response) {
+      // Step.1 组装查询条件
+      QueryWrapper<UserVideoMap> queryWrapper = null;
+      try {
+          String paramsStr = request.getParameter("paramsStr");
+          if (oConvertUtils.isNotEmpty(paramsStr)) {
+              String deString = URLDecoder.decode(paramsStr, "UTF-8");
+              UserVideoMap userVideoMap = JSON.parseObject(deString, UserVideoMap.class);
+              queryWrapper = QueryGenerator.initQueryWrapper(userVideoMap, request.getParameterMap());
+          }
+      } catch (UnsupportedEncodingException e) {
+          e.printStackTrace();
+      }
+
+      //Step.2 AutoPoi 导出Excel
+      ModelAndView mv = new ModelAndView(new JeecgEntityExcelView());
+      List<UserVideoMap> pageList = userVideoMapService.list(queryWrapper);
+      //导出文件名称
+      mv.addObject(NormalExcelConstants.FILE_NAME, "视频和设计师对应关系表列表");
+      mv.addObject(NormalExcelConstants.CLASS, UserVideoMap.class);
+      mv.addObject(NormalExcelConstants.PARAMS, new ExportParams("视频和设计师对应关系表列表数据", "导出人:Jeecg", "导出信息"));
+      mv.addObject(NormalExcelConstants.DATA_LIST, pageList);
+      return mv;
+  }
+
+  /**
+      * 通过excel导入数据
+   *
+   * @param request
+   * @param response
+   * @return
+   */
+  @RequestMapping(value = "/importExcel", method = RequestMethod.POST)
+  public Result<?> importExcel(HttpServletRequest request, HttpServletResponse response) {
+      MultipartHttpServletRequest multipartRequest = (MultipartHttpServletRequest) request;
+      Map<String, MultipartFile> fileMap = multipartRequest.getFileMap();
+      for (Map.Entry<String, MultipartFile> entity : fileMap.entrySet()) {
+          MultipartFile file = entity.getValue();
+          ImportParams params = new ImportParams();
+          params.setTitleRows(2);
+          params.setHeadRows(1);
+          params.setNeedSave(true);
+          try {
+              List<UserVideoMap> listUserVideoMaps = ExcelImportUtil.importExcel(file.getInputStream(), UserVideoMap.class, params);
+              userVideoMapService.saveBatch(listUserVideoMaps);
+              return Result.ok("文件导入成功!数据行数:" + listUserVideoMaps.size());
+          } catch (Exception e) {
+              log.error(e.getMessage(),e);
+              return Result.error("文件导入失败:"+e.getMessage());
+          } finally {
+              try {
+                  file.getInputStream().close();
+              } catch (IOException e) {
+                  e.printStackTrace();
+              }
+          }
+      }
+      return Result.ok("文件导入失败!");
+  }
+
+}

+ 87 - 0
performance-appraisal/src/main/java/cn/com/ctop/uservideomap/entity/UserVideoMap.java

@@ -0,0 +1,87 @@
+package cn.com.ctop.uservideomap.entity;
+
+import java.io.Serializable;
+import java.util.Date;
+import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.baomidou.mybatisplus.annotation.TableName;
+import com.baomidou.mybatisplus.annotation.TableField;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import lombok.experimental.Accessors;
+import com.fasterxml.jackson.annotation.JsonFormat;
+import org.springframework.format.annotation.DateTimeFormat;
+import org.jeecgframework.poi.excel.annotation.Excel;
+
+/**
+ * 视频和设计师对应关系表
+ * @author jeecg-boot
+ * @date   2020-03-17
+ * @version V1.0
+ */
+@Data
+@TableName("ctop_user_video_map")
+@EqualsAndHashCode(callSuper = false)
+@Accessors(chain = true)
+@ApiModel(value="ctop_user_video_map对象", description="视频和设计师对应关系表")
+public class UserVideoMap {
+
+	/**id*/
+	@TableId(type = IdType.AUTO)
+    @ApiModelProperty(value = "id")
+	private Integer id;
+	/**有效视频md5*/
+	@Excel(name = "有效视频md5", width = 15)
+    @ApiModelProperty(value = "有效视频md5")
+	private String videoSignature;
+	/**视频制作中担任的角色-不一定是自己原本的角色*/
+	@Excel(name = "视频制作中担任的角色-不一定是自己原本的角色", width = 15)
+    @ApiModelProperty(value = "视频制作中担任的角色-不一定是自己原本的角色")
+	private String roleId;
+	/**用户id*/
+	@Excel(name = "用户id", width = 15)
+    @ApiModelProperty(value = "用户id")
+	private String userId;
+	/**季度*/
+	@Excel(name = "季度", width = 15)
+    @ApiModelProperty(value = "季度")
+	private Integer quarter;
+	/**年*/
+	@Excel(name = "年", width = 15)
+    @ApiModelProperty(value = "年")
+	private Integer year;
+	/**所属月*/
+	@Excel(name = "所属月", width = 15)
+    @ApiModelProperty(value = "所属月")
+	private Integer month;
+	/**有效视频所属周开始时间*/
+	@Excel(name = "有效视频所属周开始时间", width = 15, format = "yyyy-MM-dd")
+	@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd")
+    @DateTimeFormat(pattern="yyyy-MM-dd")
+    @ApiModelProperty(value = "有效视频所属周开始时间")
+	private String weekStart;
+	/**有效视频所属周结束时间*/
+	@Excel(name = "有效视频所属周结束时间", width = 15, format = "yyyy-MM-dd")
+	@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd")
+    @DateTimeFormat(pattern="yyyy-MM-dd")
+    @ApiModelProperty(value = "有效视频所属周结束时间")
+	private String weekEnd;
+	/**用于计算所属年月季的基础日期*/
+	@Excel(name = "用于计算所属年月季的基础日期", width = 15, format = "yyyy-MM-dd")
+	@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd")
+    @DateTimeFormat(pattern="yyyy-MM-dd")
+    @ApiModelProperty(value = "用于计算所属年月季的基础日期")
+	private Date calcDate;
+	/**视频所属分公司的id*/
+	@Excel(name = "视频所属分公司的id", width = 15)
+    @ApiModelProperty(value = "视频所属分公司的id")
+	private String companyId;
+	/**createTime*/
+    @ApiModelProperty(value = "createTime")
+	private Date createTime;
+	/**updateTime*/
+    @ApiModelProperty(value = "updateTime")
+	private Date updateTime;
+}

+ 17 - 0
performance-appraisal/src/main/java/cn/com/ctop/uservideomap/mapper/UserVideoMapMapper.java

@@ -0,0 +1,17 @@
+package cn.com.ctop.uservideomap.mapper;
+
+import java.util.List;
+
+import org.apache.ibatis.annotations.Param;
+import cn.com.ctop.uservideomap.entity.UserVideoMap;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+
+/**
+ * 视频和设计师对应关系表
+ * @author: jeecg-boot
+ * @date:   2020-03-17
+ * @cersion: V1.0
+ */
+public interface UserVideoMapMapper extends BaseMapper<UserVideoMap> {
+
+}

+ 5 - 0
performance-appraisal/src/main/java/cn/com/ctop/uservideomap/mapper/xml/UserVideoMapMapper.xml

@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="cn.com.ctop.uservideomap.mapper.UserVideoMapMapper">
+
+</mapper>

+ 14 - 0
performance-appraisal/src/main/java/cn/com/ctop/uservideomap/service/IUserVideoMapService.java

@@ -0,0 +1,14 @@
+package cn.com.ctop.uservideomap.service;
+
+import cn.com.ctop.uservideomap.entity.UserVideoMap;
+import com.baomidou.mybatisplus.extension.service.IService;
+
+/**
+ * 视频和设计师对应关系表
+ * @author jeecg-boot
+ * @date   2020-03-17
+ * @version V1.0
+ */
+public interface IUserVideoMapService extends IService<UserVideoMap> {
+
+}

+ 19 - 0
performance-appraisal/src/main/java/cn/com/ctop/uservideomap/service/impl/UserVideoMapServiceImpl.java

@@ -0,0 +1,19 @@
+package cn.com.ctop.uservideomap.service.impl;
+
+import cn.com.ctop.uservideomap.entity.UserVideoMap;
+import cn.com.ctop.uservideomap.mapper.UserVideoMapMapper;
+import cn.com.ctop.uservideomap.service.IUserVideoMapService;
+import org.springframework.stereotype.Service;
+
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+
+/**
+ * 视频和设计师对应关系表
+ * @author jeecg-boot
+ * @date   2020-03-17
+ * @version V1.0
+ */
+@Service
+public class UserVideoMapServiceImpl extends ServiceImpl<UserVideoMapMapper, UserVideoMap> implements IUserVideoMapService {
+
+}