Browse Source

绩效周报接口调整

hcst_sunzhen 5 years ago
parent
commit
b4faffaccb

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

@@ -2328,6 +2328,24 @@ public class PerformanceServiceImpl2 extends ServiceImpl<PerformanceMapper, Perf
     //根据userid,appType,年度,季度查询有效视频列表
     public List<MaterialInfo> getEffiWeekVideoList(Integer appType, String startDate, String endDate, String userId){
         List<MaterialInfo> materialInfoList = userEfficientVideoMapMapper.getEffiWeekVideoList(appType, startDate, endDate, userId);
+        BigDecimal cost = null;
+        if(appType == 2){
+            for(MaterialInfo materialInfo:materialInfoList){
+                cost = userEfficientVideoMapMapper.videoTotalCostInDates(materialInfo.getCode(),startDate, endDate);
+                if(cost == null){
+                    cost = BigDecimal.ZERO;
+                }
+                materialInfo.setCost(cost);
+            }
+        }else if(appType == 1){
+            for(MaterialInfo materialInfo:materialInfoList){
+                cost = userEfficientVideoMapMapper.toutiaoVideoTotalCostInDates(materialInfo.getCode(),startDate, endDate);
+                if(cost == null){
+                    cost = BigDecimal.ZERO;
+                }
+                materialInfo.setCost(cost);
+            }
+        }
         return materialInfoList;
     }
 

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

@@ -12,6 +12,7 @@ import lombok.EqualsAndHashCode;
 import lombok.experimental.Accessors;
 import org.jeecgframework.poi.excel.annotation.Excel;
 
+import java.math.BigDecimal;
 import java.util.Date;
 
 /**
@@ -141,4 +142,10 @@ public class MaterialInfo {
 
     @TableField(exist = false)
     private String originRoleName;  //原本的角色
+
+    @TableField(exist = false)
+    private BigDecimal cost;
+
+    @TableField(exist = false)
+    private String realname;
 }

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

@@ -1001,12 +1001,14 @@
             i.material_name as materialName,
             i.watermark_material_name as watermarkMaterialName,
             m.role_id as videoRoleCode,  <!-- 拍摄时候担任的角色 -->
-            r.role_name as originRoleName  <!-- 原本的角色 -->
+            r.role_name as originRoleName,  <!-- 原本的角色 -->
+            su.realname as realname
         from
         ctop_user_efficient_video_map m
         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
+        left join sys_user su on m.user_id = su.id
         where
         m.user_id = #{userId} and
         m.app_type =#{appType} and