|
@@ -1,6 +1,7 @@
|
|
package org.jeecg.modules.system.service.impl;
|
|
package org.jeecg.modules.system.service.impl;
|
|
|
|
|
|
import cn.com.ctop.common.module.entity.MaterialInfo;
|
|
import cn.com.ctop.common.module.entity.MaterialInfo;
|
|
|
|
+import cn.com.ctop.performanceaccount.entity.PerformanceAccount;
|
|
import cn.com.ctop.performanceappraisal.entity.Performance;
|
|
import cn.com.ctop.performanceappraisal.entity.Performance;
|
|
import cn.com.ctop.performanceappraisal.mapper.PerformanceMapper;
|
|
import cn.com.ctop.performanceappraisal.mapper.PerformanceMapper;
|
|
import cn.com.ctop.planeprojectcost.entity.PlaneProjectCost;
|
|
import cn.com.ctop.planeprojectcost.entity.PlaneProjectCost;
|
|
@@ -2382,6 +2383,7 @@ public class PerformanceServiceImpl2 extends ServiceImpl<PerformanceMapper, Perf
|
|
Map<String, String> timeMap = DateUtils.quarterStartEndDate(year, quarter);
|
|
Map<String, String> timeMap = DateUtils.quarterStartEndDate(year, quarter);
|
|
String startTime = timeMap.get("startDate");
|
|
String startTime = timeMap.get("startDate");
|
|
String endTime = timeMap.get("endDate");
|
|
String endTime = timeMap.get("endDate");
|
|
|
|
+ Integer appType = 2;
|
|
|
|
|
|
//1 获取快手下所有人
|
|
//1 获取快手下所有人
|
|
List<UserDto2> userDto2List = userEfficientVideoMapMapper.getKuaishouDepartAllUserInfo();
|
|
List<UserDto2> userDto2List = userEfficientVideoMapMapper.getKuaishouDepartAllUserInfo();
|
|
@@ -2389,11 +2391,11 @@ public class PerformanceServiceImpl2 extends ServiceImpl<PerformanceMapper, Perf
|
|
for (UserDto2 userDto : userDto2List) {
|
|
for (UserDto2 userDto : userDto2List) {
|
|
//String roleCode = userDto.getRoleCode();
|
|
//String roleCode = userDto.getRoleCode();
|
|
//2.1 获取有效视频数量
|
|
//2.1 获取有效视频数量
|
|
- Integer effiVideoCount = userEfficientVideoMapMapper.getEffiVideoCountByUserId(2, year, quarter, userDto.getUserId(), userDto.getRoleId());
|
|
|
|
- //2.2 获取有效视频总数
|
|
|
|
- Integer videoCount = userEfficientVideoMapMapper.getQuarterMaterialCountByUserId(userDto.getRoleCode(), startTime, endTime, userDto.getUserId());
|
|
|
|
|
|
+ Integer effiVideoCount = userEfficientVideoMapMapper.getQuarterEffiVideoCount(year, quarter, userDto.getUserId(), appType);
|
|
|
|
+ //2.2 获取视频总数
|
|
|
|
+ Integer videoCount = userEfficientVideoMapMapper.getQuarterVideoCount(year, quarter, userDto.getUserId(), appType);
|
|
//2.3 总消耗
|
|
//2.3 总消耗
|
|
- BigDecimal cost = userEfficientVideoMapMapper.getQuarterCost(userDto.getUserId(), year, quarter, 2);
|
|
|
|
|
|
+ BigDecimal cost = userEfficientVideoMapMapper.getQuarterCost(userDto.getUserId(), year, quarter, appType);
|
|
if (cost == null) {
|
|
if (cost == null) {
|
|
cost = BigDecimal.ZERO;
|
|
cost = BigDecimal.ZERO;
|
|
}
|
|
}
|
|
@@ -2417,6 +2419,7 @@ public class PerformanceServiceImpl2 extends ServiceImpl<PerformanceMapper, Perf
|
|
Map<String, String> timeMap = DateUtils.quarterStartEndDate(year, quarter);
|
|
Map<String, String> timeMap = DateUtils.quarterStartEndDate(year, quarter);
|
|
String startTime = timeMap.get("startDate");
|
|
String startTime = timeMap.get("startDate");
|
|
String endTime = timeMap.get("endDate");
|
|
String endTime = timeMap.get("endDate");
|
|
|
|
+ Integer appType = 1;
|
|
|
|
|
|
//1 获取头条下所有人
|
|
//1 获取头条下所有人
|
|
List<UserDto2> userDto2List = userEfficientVideoMapMapper.getToutiaoDepartAllUserInfo();
|
|
List<UserDto2> userDto2List = userEfficientVideoMapMapper.getToutiaoDepartAllUserInfo();
|
|
@@ -2424,16 +2427,16 @@ public class PerformanceServiceImpl2 extends ServiceImpl<PerformanceMapper, Perf
|
|
for (UserDto2 userDto : userDto2List) {
|
|
for (UserDto2 userDto : userDto2List) {
|
|
//String roleCode = userDto.getRoleCode();
|
|
//String roleCode = userDto.getRoleCode();
|
|
//2.1 获取有效视频数量
|
|
//2.1 获取有效视频数量
|
|
- Integer effiVideoCount = userEfficientVideoMapMapper.getEffiVideoCountByUserId(1, year, quarter, userDto.getUserId(), userDto.getRoleId());
|
|
|
|
|
|
+ Integer effiVideoCount = userEfficientVideoMapMapper.getQuarterEffiVideoCount(year, quarter, userDto.getUserId(), appType);
|
|
//2.2 获取有效视频总数
|
|
//2.2 获取有效视频总数
|
|
- Integer videoCount = userEfficientVideoMapMapper.getQuarterMaterialCountByUserId(userDto.getRoleCode(), startTime, endTime, userDto.getUserId());
|
|
|
|
|
|
+ Integer videoCount = userEfficientVideoMapMapper.getQuarterVideoCount(year, quarter, userDto.getUserId(), appType);
|
|
//2.3 总消耗
|
|
//2.3 总消耗
|
|
- BigDecimal cost = userEfficientVideoMapMapper.getQuarterCost(userDto.getUserId(), year, quarter, 1);
|
|
|
|
|
|
+ BigDecimal cost = userEfficientVideoMapMapper.getQuarterCost(userDto.getUserId(), year, quarter, appType);
|
|
if (cost == null) {
|
|
if (cost == null) {
|
|
cost = BigDecimal.ZERO;
|
|
cost = BigDecimal.ZERO;
|
|
}
|
|
}
|
|
//2.4 当季度绩效
|
|
//2.4 当季度绩效
|
|
- BigDecimal performance = userEfficientVideoMapMapper.getQuarterPerformance(userDto.getUserId(), year, quarter, 1);
|
|
|
|
|
|
+ BigDecimal performance = userEfficientVideoMapMapper.getQuarterPerformance(userDto.getUserId(), year, quarter, appType);
|
|
if(performance==null){
|
|
if(performance==null){
|
|
performance=BigDecimal.ZERO;
|
|
performance=BigDecimal.ZERO;
|
|
}
|
|
}
|
|
@@ -2501,17 +2504,18 @@ public class PerformanceServiceImpl2 extends ServiceImpl<PerformanceMapper, Perf
|
|
//快手优化季度绩效报表
|
|
//快手优化季度绩效报表
|
|
@Override
|
|
@Override
|
|
public List<UserDto2> kuaishouYouhuaQuarterReport(Integer year, Integer quarter) {
|
|
public List<UserDto2> kuaishouYouhuaQuarterReport(Integer year, Integer quarter) {
|
|
|
|
+ Integer appType = 2;
|
|
//1 获取快手下所有人
|
|
//1 获取快手下所有人
|
|
List<UserDto2> userDto2List = userEfficientVideoMapMapper.getKuaishouYunyingDepartUserInfo();
|
|
List<UserDto2> userDto2List = userEfficientVideoMapMapper.getKuaishouYunyingDepartUserInfo();
|
|
//2 循环所有人,并查询出每个人的有效视频数、总视频数、总消耗
|
|
//2 循环所有人,并查询出每个人的有效视频数、总视频数、总消耗
|
|
for (UserDto2 userDto : userDto2List) {
|
|
for (UserDto2 userDto : userDto2List) {
|
|
//总消耗
|
|
//总消耗
|
|
- BigDecimal cost = userEfficientVideoMapMapper.getQuarterCost(userDto.getUserId(), year, quarter, 2);
|
|
|
|
|
|
+ BigDecimal cost = userEfficientVideoMapMapper.getYunyingQuarterCost(year, quarter, userDto.getUserId(), appType);
|
|
if (cost == null) {
|
|
if (cost == null) {
|
|
cost = BigDecimal.ZERO;
|
|
cost = BigDecimal.ZERO;
|
|
}
|
|
}
|
|
//当季度绩效
|
|
//当季度绩效
|
|
- BigDecimal performance = userEfficientVideoMapMapper.getQuarterPerformance(userDto.getUserId(), year, quarter, 2);
|
|
|
|
|
|
+ BigDecimal performance = userEfficientVideoMapMapper.getYunyingQuarterPerformance(year, quarter, userDto.getUserId(), appType);
|
|
if(performance==null){
|
|
if(performance==null){
|
|
performance=BigDecimal.ZERO;
|
|
performance=BigDecimal.ZERO;
|
|
}
|
|
}
|
|
@@ -2519,7 +2523,7 @@ public class PerformanceServiceImpl2 extends ServiceImpl<PerformanceMapper, Perf
|
|
userDto.setCost(cost);
|
|
userDto.setCost(cost);
|
|
userDto.setYear(year);
|
|
userDto.setYear(year);
|
|
userDto.setQuarter(quarter);
|
|
userDto.setQuarter(quarter);
|
|
- userDto.setAppType(2);
|
|
|
|
|
|
+ userDto.setAppType(appType);
|
|
}
|
|
}
|
|
return userDto2List;
|
|
return userDto2List;
|
|
}
|
|
}
|
|
@@ -2527,17 +2531,18 @@ public class PerformanceServiceImpl2 extends ServiceImpl<PerformanceMapper, Perf
|
|
//头条优化季度绩效报表
|
|
//头条优化季度绩效报表
|
|
//@Override
|
|
//@Override
|
|
public List<UserDto2> toutiaoYouhuaQuarterReport(Integer year, Integer quarter) {
|
|
public List<UserDto2> toutiaoYouhuaQuarterReport(Integer year, Integer quarter) {
|
|
|
|
+ Integer appType = 1;
|
|
//1 获取快手下所有人
|
|
//1 获取快手下所有人
|
|
List<UserDto2> userDto2List = userEfficientVideoMapMapper.getToutiaoYunyingDepartUserInfo();
|
|
List<UserDto2> userDto2List = userEfficientVideoMapMapper.getToutiaoYunyingDepartUserInfo();
|
|
//2 循环所有人,并查询出每个人的有效视频数、总视频数、总消耗
|
|
//2 循环所有人,并查询出每个人的有效视频数、总视频数、总消耗
|
|
for (UserDto2 userDto : userDto2List) {
|
|
for (UserDto2 userDto : userDto2List) {
|
|
//总消耗
|
|
//总消耗
|
|
- BigDecimal cost = userEfficientVideoMapMapper.getQuarterCost(userDto.getUserId(), year, quarter, 1);
|
|
|
|
|
|
+ BigDecimal cost = userEfficientVideoMapMapper.getYunyingQuarterCost(year, quarter, userDto.getUserId(), appType);
|
|
if (cost == null) {
|
|
if (cost == null) {
|
|
cost = BigDecimal.ZERO;
|
|
cost = BigDecimal.ZERO;
|
|
}
|
|
}
|
|
//当季度绩效
|
|
//当季度绩效
|
|
- BigDecimal performance = userEfficientVideoMapMapper.getQuarterPerformance(userDto.getUserId(), year, quarter, 1);
|
|
|
|
|
|
+ BigDecimal performance = userEfficientVideoMapMapper.getYunyingQuarterPerformance(year, quarter, userDto.getUserId(), appType);
|
|
if(performance==null){
|
|
if(performance==null){
|
|
performance=BigDecimal.ZERO;
|
|
performance=BigDecimal.ZERO;
|
|
}
|
|
}
|
|
@@ -2550,5 +2555,9 @@ public class PerformanceServiceImpl2 extends ServiceImpl<PerformanceMapper, Perf
|
|
return userDto2List;
|
|
return userDto2List;
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ public List<PerformanceAccount> getYunyingQuarterDetailByUserId(Integer year, Integer quarter, String userId, Integer appType){
|
|
|
|
+ return userEfficientVideoMapMapper.getYunyingQuarterDetailByUserId(year, quarter, userId, appType);
|
|
|
|
+ }
|
|
|
|
+
|
|
}
|
|
}
|
|
|
|
|