|
@@ -1,15 +1,18 @@
|
|
|
package cn.com.ctop.performanceappraisal.service.impl;
|
|
|
|
|
|
+import cn.com.ctop.common.module.utils.CtopAdConstant;
|
|
|
import cn.com.ctop.common.module.utils.ResultMapUtils;
|
|
|
import cn.com.ctop.common.module.utils.StatusCode;
|
|
|
import cn.com.ctop.performanceappraisal.entity.OptimizerConfig;
|
|
|
+import cn.com.ctop.performanceappraisal.entity.PerformanceConfig;
|
|
|
import cn.com.ctop.performanceappraisal.entity.PerformanceOptimizer;
|
|
|
import cn.com.ctop.performanceappraisal.mapper.PerformanceOptimizerMapper;
|
|
|
import cn.com.ctop.performanceappraisal.service.IOptimizerConfigService;
|
|
|
+import cn.com.ctop.performanceappraisal.service.IPerformanceConfigService;
|
|
|
import cn.com.ctop.performanceappraisal.service.IPerformanceOptimizerService;
|
|
|
import cn.com.ctop.performanceappraisal.service.IPerformanceService;
|
|
|
import cn.com.ctop.performanceappraisal.vo.OptimizerCostDetailVO;
|
|
|
-import com.alibaba.fastjson.JSONObject;
|
|
|
+import cn.com.ctop.performanceappraisal.vo.UserPerformanceDetailVO;
|
|
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
|
|
import org.apache.shiro.SecurityUtils;
|
|
|
import org.jeecg.common.system.vo.LoginUser;
|
|
@@ -44,42 +47,180 @@ public class PerformanceOptimizerServiceImpl extends ServiceImpl<PerformanceOpti
|
|
|
//查询当前登录人信息
|
|
|
LoginUser sysUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
|
|
|
String orgCode = sysUser.getOrgCode();
|
|
|
- if () {
|
|
|
+ if (orgCode.startsWith(CtopAdConstant.CTOP_ORGCODE_NORTH_CHINA_PREFIX)) {
|
|
|
+ //华北
|
|
|
+ //查询当前媒体配置信息
|
|
|
+ OptimizerConfig config = optimizerConfigService.getEnabledConfigByMediaType(mediaType, CtopAdConstant.CTOP_ORGCODE_NORTH_CHINA_PREFIX);
|
|
|
+ if (null == config) {
|
|
|
+ ResultMapUtils.setResultMap(result, StatusCode.KUAISHOU_OPTINIZER_CONFIG_IS_NULL.getCode());
|
|
|
+ return result;
|
|
|
+ }
|
|
|
+ //:查询当前用户截止到目前当前季度的消耗统计数据
|
|
|
+ List<OptimizerCostDetailVO> vos = performanceService.getOptimizerTotalCostDetailGroupByUserId(mediaType, sysUser.getId(), startIndex, pageSize);
|
|
|
+ if (null == vos || vos.size() <= 0) {
|
|
|
+ ResultMapUtils.setResultMap(result, StatusCode.KUAISHOU_OPTINIZER_PERSONNAL_DATA_IS_NULL.getCode());
|
|
|
+ return result;
|
|
|
+ }
|
|
|
+ //2: 查询媒体季度任务完成情况
|
|
|
+ UserPerformanceDetailVO performanceDetailVO = getPerformanceDetailVO(mediaType, vos.get(0), config);
|
|
|
+ result.put("userDetail", performanceDetailVO);
|
|
|
+ ResultMapUtils.setResultMap(result, StatusCode.COMMON_SUCCESS.getCode());
|
|
|
+ return result;
|
|
|
+ } else if (orgCode.startsWith(CtopAdConstant.CTOP_ORGCODE_EAST_CHINA_PREFIX)) {
|
|
|
+ //华东
|
|
|
+ //查询当前媒体配置信息
|
|
|
+ OptimizerConfig kuaishouConfig = optimizerConfigService.getEnabledConfigByMediaType(CtopAdConstant.PLATFORM_TYPE_KUAISHOU, CtopAdConstant.CTOP_ORGCODE_EAST_CHINA_PREFIX);
|
|
|
+ OptimizerConfig bytedanceConfig = optimizerConfigService.getEnabledConfigByMediaType(CtopAdConstant.PLATFORM_TYPE_BYTEDANCE, CtopAdConstant.CTOP_ORGCODE_EAST_CHINA_PREFIX);
|
|
|
+ if (null == kuaishouConfig || null == bytedanceConfig) {
|
|
|
+ ResultMapUtils.setResultMap(result, StatusCode.KUAISHOU_OPTINIZER_CONFIG_IS_NULL.getCode());
|
|
|
+ return result;
|
|
|
+ }
|
|
|
+ //:查询当前用户截止到目前当前季度的消耗统计数据
|
|
|
+ List<OptimizerCostDetailVO> kuaishouVos = performanceService.getOptimizerTotalCostDetailGroupByUserId(CtopAdConstant.PLATFORM_TYPE_KUAISHOU, sysUser.getId(), startIndex, pageSize);
|
|
|
+ List<OptimizerCostDetailVO> bytedanceVos = performanceService.getOptimizerTotalCostDetailGroupByUserId(CtopAdConstant.PLATFORM_TYPE_BYTEDANCE, sysUser.getId(), startIndex, pageSize);
|
|
|
+ boolean hasNoCost = (null == kuaishouVos || kuaishouVos.size() <= 0) && (null == bytedanceVos || bytedanceVos.size() <= 0);
|
|
|
+ if (hasNoCost) {
|
|
|
+ ResultMapUtils.setResultMap(result, StatusCode.OPTINIZER_PERSONNAL_DATA_IS_NULL.getCode());
|
|
|
+ return result;
|
|
|
+ }
|
|
|
+ if (null == kuaishouVos || kuaishouVos.size() <= 0) {
|
|
|
+ //快手消耗为0
|
|
|
+ //2: 查询头条媒体季度任务完成情况
|
|
|
+ UserPerformanceDetailVO performanceDetailVO = getPerformanceDetailVO(CtopAdConstant.PLATFORM_TYPE_BYTEDANCE, bytedanceVos.get(0), bytedanceConfig);
|
|
|
+ result.put("userDetail", performanceDetailVO);
|
|
|
+ ResultMapUtils.setResultMap(result, StatusCode.COMMON_SUCCESS.getCode());
|
|
|
+ return result;
|
|
|
+ }
|
|
|
+ if (null == bytedanceVos || bytedanceVos.size() <= 0) {
|
|
|
+ //头条消耗为0
|
|
|
+ //2: 查询快手媒体季度任务完成情况
|
|
|
+ UserPerformanceDetailVO performanceDetailVO = getPerformanceDetailVO(CtopAdConstant.PLATFORM_TYPE_KUAISHOU, kuaishouVos.get(0), kuaishouConfig);
|
|
|
+ result.put("userDetail", performanceDetailVO);
|
|
|
+ ResultMapUtils.setResultMap(result, StatusCode.COMMON_SUCCESS.getCode());
|
|
|
+ return result;
|
|
|
+ }
|
|
|
+ //快手+头条
|
|
|
+ UserPerformanceDetailVO performanceDetailVO = getMultiPerformanceDetailVO(kuaishouVos.get(0), kuaishouConfig, bytedanceVos.get(0), bytedanceConfig);
|
|
|
+ result.put("userDetail", performanceDetailVO);
|
|
|
+ ResultMapUtils.setResultMap(result, StatusCode.COMMON_SUCCESS.getCode());
|
|
|
+ return result;
|
|
|
+ } else {
|
|
|
+ ResultMapUtils.setResultMap(result, StatusCode.CTOP_HAS_NO_PERFORMANCE_STATISTIC_LOGIC);
|
|
|
+ return result;
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ private UserPerformanceDetailVO getMultiPerformanceDetailVO(OptimizerCostDetailVO kuaishouQuarterCostVO, OptimizerConfig kuaishouConfig, OptimizerCostDetailVO bytedanceQuarterCostVO, OptimizerConfig bytedanceConfig) {
|
|
|
+ //1:获取个人各渠道消耗
|
|
|
+ OptimizerCostDetailVO kuaishouTotalCostVo = performanceService.getOptimizerTotalCost(CtopAdConstant.PLATFORM_TYPE_KUAISHOU);
|
|
|
+ OptimizerCostDetailVO bytedanceTotalCostVo = performanceService.getOptimizerTotalCost(CtopAdConstant.PLATFORM_TYPE_BYTEDANCE);
|
|
|
|
|
|
+ UserPerformanceDetailVO performanceDetailVO = new UserPerformanceDetailVO();
|
|
|
+ performanceDetailVO.setRealName(kuaishouTotalCostVo.getRealName());
|
|
|
+ //个人消耗
|
|
|
+ performanceDetailVO.setKuaishouPersonalCost(kuaishouTotalCostVo.getTotalCost());
|
|
|
+ performanceDetailVO.setBytedancePersonalCost(bytedanceTotalCostVo.getTotalCost());
|
|
|
+ performanceDetailVO.setTotalPersonalCost(kuaishouTotalCostVo.getTotalCost().add(bytedanceTotalCostVo.getTotalCost()).setScale(2, RoundingMode.HALF_UP));
|
|
|
+ //媒体消耗
|
|
|
+ performanceDetailVO.setKuaishouMediaCost(kuaishouQuarterCostVO.getTotalCost());
|
|
|
+ performanceDetailVO.setBytedanceMediaCost(bytedanceQuarterCostVO.getTotalCost());
|
|
|
+ performanceDetailVO.setTotalMediaCost(bytedanceQuarterCostVO.getTotalCost().add(kuaishouQuarterCostVO.getTotalCost()).setScale(2, RoundingMode.HALF_UP));
|
|
|
+
|
|
|
+ //媒体任务
|
|
|
+ performanceDetailVO.setKuaishouMediaTask(kuaishouConfig.getMediaTask());
|
|
|
+ performanceDetailVO.setBytedanceMediaTask(bytedanceConfig.getMediaTask());
|
|
|
+ performanceDetailVO.setTotalMediaCost(kuaishouConfig.getMediaTask().add(bytedanceConfig.getMediaTask()).setScale(2, RoundingMode.HALF_UP));
|
|
|
+
|
|
|
+ //个人任务
|
|
|
+ performanceDetailVO.setTotalPersonalTask(kuaishouConfig.getTotalPersonalTask());
|
|
|
+ performanceDetailVO.setKuaishouPersonalTask(kuaishouConfig.getPersonalTask());
|
|
|
+ performanceDetailVO.setBytedancePersonalTask(bytedanceConfig.getPersonalTask());
|
|
|
+
|
|
|
+ performanceDetailVO.setYear(kuaishouQuarterCostVO.getYear());
|
|
|
+ performanceDetailVO.setQuarter(kuaishouQuarterCostVO.getQuarter());
|
|
|
+
|
|
|
+ //快手提成
|
|
|
+ performanceDetailVO.setKuaishouRoyalty(getRoyalty(kuaishouConfig,
|
|
|
+ performanceDetailVO.getTotalPersonalCost(), performanceDetailVO.getTotalPersonalTask(),
|
|
|
+ performanceDetailVO.getKuaishouMediaCost(), performanceDetailVO.getKuaishouMediaTask(),
|
|
|
+ performanceDetailVO.getKuaishouPersonalCost()));
|
|
|
+ //头条提成
|
|
|
+ performanceDetailVO.setBytedanceRoyalty(getRoyalty(bytedanceConfig,
|
|
|
+ performanceDetailVO.getTotalPersonalCost(), performanceDetailVO.getTotalPersonalTask(),
|
|
|
+ performanceDetailVO.getBytedanceMediaCost(), performanceDetailVO.getBytedanceMediaTask(),
|
|
|
+ performanceDetailVO.getBytedancePersonalCost()));
|
|
|
+
|
|
|
+ //快手提成点
|
|
|
+ performanceDetailVO.setKuaishouRoyaltyRatio(getRoyaltyRatio(kuaishouConfig, performanceDetailVO.getTotalPersonalCost(), performanceDetailVO.getTotalPersonalTask(), performanceDetailVO.getKuaishouMediaCost(), performanceDetailVO.getKuaishouMediaTask()));
|
|
|
+ //头条提成点
|
|
|
+ performanceDetailVO.setBytedanceRoyaltyRatio(getRoyaltyRatio(bytedanceConfig, performanceDetailVO.getTotalPersonalCost(), performanceDetailVO.getTotalPersonalTask(), performanceDetailVO.getBytedanceMediaCost(), performanceDetailVO.getBytedanceMediaTask()));
|
|
|
+ //总提成
|
|
|
+ performanceDetailVO.setTotalRoyalty(performanceDetailVO.getBytedanceRoyalty().add(performanceDetailVO.getKuaishouRoyalty()).setScale(2, RoundingMode.HALF_UP));
|
|
|
+
|
|
|
+ return performanceDetailVO;
|
|
|
+ }
|
|
|
+
|
|
|
+ private BigDecimal getRoyalty(OptimizerConfig bytedanceConfig, BigDecimal totalPersonalCost, BigDecimal totalPersonalTask, BigDecimal bytedanceMediaCost, BigDecimal bytedanceMediaTask, BigDecimal bytedancePersonalCost) {
|
|
|
+ BigDecimal royalty = BigDecimal.ZERO;
|
|
|
+
|
|
|
+ //个人任务未完成
|
|
|
+ if (totalPersonalCost.compareTo(totalPersonalTask) < 0) {
|
|
|
+ return royalty;
|
|
|
}
|
|
|
- //查询当前媒体配置信息
|
|
|
- OptimizerConfig config = optimizerConfigService.getEnabledConfigByMediaType(mediaType);
|
|
|
- if (null == config) {
|
|
|
- ResultMapUtils.setResultMap(result, StatusCode.KUAISHOU_OPTINIZER_CONFIG_IS_NULL);
|
|
|
- return result;
|
|
|
+ //快手媒体任务未完成
|
|
|
+ if (bytedanceMediaCost.compareTo(bytedanceMediaTask) < 0) {
|
|
|
+ return bytedancePersonalCost.multiply(bytedanceConfig.getMediaTaskNoFinishRate()).divide(new BigDecimal("1000")).setScale(2, RoundingMode.HALF_UP);
|
|
|
}
|
|
|
- //:查询当前用户截止到目前当前季度的消耗统计数据
|
|
|
- List<OptimizerCostDetailVO> vos = performanceService.getOptimizerTotalCostDetailGroupByUserId(mediaType, sysUser.getId(), startIndex, pageSize);
|
|
|
- if (null == vos || vos.size() <= 0) {
|
|
|
- ResultMapUtils.setResultMap(result, StatusCode.KUAISHOU_OPTINIZER_PERSONNAL_DATA_IS_NULL.getCode());
|
|
|
- return result;
|
|
|
+
|
|
|
+ PerformanceConfig performanceConfig = performanceConfigService.getNowConfig();
|
|
|
+ if (null != performanceConfig && performanceConfig.getMediaTaskRaise() == 1) {
|
|
|
+ //同意提高提成点
|
|
|
+ return bytedancePersonalCost.multiply(bytedanceConfig.getMediaTaskFinishRate()).divide(new BigDecimal("1000")).setScale(2, RoundingMode.HALF_UP);
|
|
|
+ } else {
|
|
|
+ return bytedancePersonalCost.multiply(bytedanceConfig.getMediaTaskFinishRate()).divide(new BigDecimal("1000")).setScale(2, RoundingMode.HALF_UP);
|
|
|
}
|
|
|
- //2: 查询媒体季度任务完成情况
|
|
|
- OptimizerCostDetailVO totalCostVo = performanceService.getOptimizerTotalCost(mediaType);
|
|
|
- OptimizerCostDetailVO detailVO = vos.get(0);
|
|
|
- detailVO.setTotalRoyalty(getTotalRoyalty(config, detailVO, totalCostVo));
|
|
|
- JSONObject detail = new JSONObject();
|
|
|
- detail.put("realName", detailVO.getRealName());
|
|
|
- detail.put("totalCost", detailVO.getTotalCost());
|
|
|
- detail.put("totalRoyalty", detailVO.getTotalRoyalty());
|
|
|
- detail.put("mediaTask", config.getMediaTask());
|
|
|
- detail.put("personalTask", config.getPersonalTask());
|
|
|
-
|
|
|
- detail.put("year", detailVO.getYear());
|
|
|
- detail.put("quarter", detailVO.getQuarter());
|
|
|
- detail.put("royaltyRatio", getRate(config, detailVO, totalCostVo).toString() + "‰");
|
|
|
- result.put("userDetail", detail);
|
|
|
- ResultMapUtils.setResultMap(result, StatusCode.COMMON_SUCCESS.getCode());
|
|
|
- return result;
|
|
|
+ }
|
|
|
+
|
|
|
+ private BigDecimal getRoyaltyRatio(OptimizerConfig bytedanceConfig, BigDecimal totalPersonalCost, BigDecimal totalPersonalTask, BigDecimal mediaCost, BigDecimal mediaTask) {
|
|
|
+ BigDecimal royalty = BigDecimal.ZERO;
|
|
|
+
|
|
|
+ //个人任务未完成
|
|
|
+ if (totalPersonalCost.compareTo(totalPersonalTask) < 0) {
|
|
|
+ return royalty;
|
|
|
+ }
|
|
|
+ //快手媒体任务未完成
|
|
|
+ if (mediaCost.compareTo(mediaTask) < 0) {
|
|
|
+ return bytedanceConfig.getMediaTaskNoFinishRate().setScale(2, RoundingMode.HALF_UP);
|
|
|
+ }
|
|
|
+
|
|
|
+ PerformanceConfig performanceConfig = performanceConfigService.getNowConfig();
|
|
|
+ if (null != performanceConfig && performanceConfig.getMediaTaskRaise() == 1) {
|
|
|
+ //同意提高提成点
|
|
|
+ return bytedanceConfig.getMediaTaskFinishRate().setScale(2, RoundingMode.HALF_UP);
|
|
|
+ } else {
|
|
|
+ return bytedanceConfig.getMediaTaskNoFinishRate().setScale(2, RoundingMode.HALF_UP);
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ private UserPerformanceDetailVO getPerformanceDetailVO(String appType, OptimizerCostDetailVO kuaishouCostVo, OptimizerConfig kuaishouConfig) {
|
|
|
+ OptimizerCostDetailVO totalCostVo = performanceService.getOptimizerTotalCost(appType);
|
|
|
+ UserPerformanceDetailVO performanceDetailVO = new UserPerformanceDetailVO();
|
|
|
+ kuaishouCostVo.setTotalRoyalty(getTotalRoyalty(kuaishouConfig, kuaishouCostVo, totalCostVo));
|
|
|
+ performanceDetailVO.setRealName(kuaishouCostVo.getRealName());
|
|
|
+ performanceDetailVO.setTotalPersonalCost(kuaishouCostVo.getTotalCost());
|
|
|
+ performanceDetailVO.setTotalRoyalty(kuaishouCostVo.getTotalRoyalty());
|
|
|
+ performanceDetailVO.setTotalMediaTask(kuaishouConfig.getMediaTask());
|
|
|
+ performanceDetailVO.setTotalPersonalTask(kuaishouConfig.getPersonalTask());
|
|
|
+
|
|
|
+ performanceDetailVO.setYear(kuaishouCostVo.getYear());
|
|
|
+ performanceDetailVO.setQuarter(kuaishouCostVo.getQuarter());
|
|
|
+ performanceDetailVO.setRoyaltyRatio(getRate(kuaishouConfig, kuaishouCostVo, totalCostVo).toString() + "‰");
|
|
|
+ return performanceDetailVO;
|
|
|
}
|
|
|
|
|
|
@Override
|
|
|
- public Map<String, Object> getRankingList(String mediaType, Integer pageNo, Integer pageSize) {
|
|
|
+ //TODO --先优先华北的逻辑
|
|
|
+ public Map<String, Object> getRankingList(String mediaType, Integer pageNo, Integer pageSize, String orgCode) {
|
|
|
Map<String, Object> result = new HashMap<>();
|
|
|
Integer startIndex = (pageNo - 1) * pageSize;
|
|
|
List<OptimizerCostDetailVO> vos = performanceService.getOptimizerTotalCostDetailGroupByUserId(mediaType, null, startIndex, pageSize);
|
|
@@ -88,7 +229,7 @@ public class PerformanceOptimizerServiceImpl extends ServiceImpl<PerformanceOpti
|
|
|
return result;
|
|
|
}
|
|
|
//查询优化师系统设置数据
|
|
|
- OptimizerConfig config = optimizerConfigService.getEnabledConfigByMediaType(mediaType);
|
|
|
+ OptimizerConfig config = optimizerConfigService.getEnabledConfigByMediaType(mediaType, orgCode);
|
|
|
//2: 查询媒体季度任务完成情况
|
|
|
OptimizerCostDetailVO totalCostVo = performanceService.getOptimizerTotalCost(mediaType);
|
|
|
//3:计算单个优化师提成总额
|
|
@@ -105,11 +246,12 @@ public class PerformanceOptimizerServiceImpl extends ServiceImpl<PerformanceOpti
|
|
|
}
|
|
|
|
|
|
@Override
|
|
|
- public Map<String, Object> getManagerPerformanceDetail(String mediaType) {
|
|
|
+ //TODO --优先华北
|
|
|
+ public Map<String, Object> getManagerPerformanceDetail(String mediaType, String orgCode) {
|
|
|
Map<String, Object> result = new HashMap<>();
|
|
|
//获取经理相关信息
|
|
|
//查询优化师系统设置数据
|
|
|
- OptimizerConfig config = optimizerConfigService.getEnabledConfigByMediaType(mediaType);
|
|
|
+ OptimizerConfig config = optimizerConfigService.getEnabledConfigByMediaType(mediaType, orgCode);
|
|
|
//2: 查询媒体季度任务完成情况
|
|
|
OptimizerCostDetailVO totalCostVo = performanceService.getOptimizerTotalCost(mediaType);
|
|
|
result.put("totalCost", totalCostVo.getTotalCost().toString());
|
|
@@ -124,6 +266,8 @@ public class PerformanceOptimizerServiceImpl extends ServiceImpl<PerformanceOpti
|
|
|
return result;
|
|
|
}
|
|
|
|
|
|
+ @Autowired
|
|
|
+ private IPerformanceConfigService performanceConfigService;
|
|
|
private BigDecimal getTotalRoyalty(OptimizerConfig config, OptimizerCostDetailVO vo, OptimizerCostDetailVO quarterCost) {
|
|
|
BigDecimal royalty = BigDecimal.ZERO;
|
|
|
//个人总消耗
|
|
@@ -137,11 +281,15 @@ public class PerformanceOptimizerServiceImpl extends ServiceImpl<PerformanceOpti
|
|
|
return royalty;
|
|
|
}
|
|
|
//季度任务未完成
|
|
|
- if (totalCost.compareTo(mediaTask) < 0) {
|
|
|
+ if (quarterCost.getTotalCost().compareTo(mediaTask) < 0) {
|
|
|
+ return totalCost.multiply(config.getMediaTaskNoFinishRate()).divide(new BigDecimal("1000")).setScale(2, RoundingMode.HALF_UP);
|
|
|
+ }
|
|
|
+ PerformanceConfig performanceConfig = performanceConfigService.getNowConfig();
|
|
|
+ if (null != performanceConfig && performanceConfig.getMediaTaskRaise() == 1) {
|
|
|
+ return totalCost.multiply(config.getMediaTaskFinishRate()).divide(new BigDecimal("1000")).setScale(2, RoundingMode.HALF_UP);
|
|
|
+ } else {
|
|
|
return totalCost.multiply(config.getMediaTaskNoFinishRate()).divide(new BigDecimal("1000")).setScale(2, RoundingMode.HALF_UP);
|
|
|
}
|
|
|
-
|
|
|
- return totalCost.multiply(config.getMediaTaskFinishRate()).divide(new BigDecimal("1000")).setScale(2, RoundingMode.HALF_UP);
|
|
|
}
|
|
|
|
|
|
private BigDecimal getRate(OptimizerConfig config, OptimizerCostDetailVO vo, OptimizerCostDetailVO quarterCost) {
|
|
@@ -154,13 +302,19 @@ public class PerformanceOptimizerServiceImpl extends ServiceImpl<PerformanceOpti
|
|
|
BigDecimal mediaTask = config.getMediaTask();
|
|
|
//个人任务未完成
|
|
|
if (totalCost.compareTo(personalTask) < 0) {
|
|
|
- return BigDecimal.ZERO;
|
|
|
+ return royalty;
|
|
|
}
|
|
|
//季度任务未完成
|
|
|
- if (totalCost.compareTo(mediaTask) < 0) {
|
|
|
+ if (quarterCost.getTotalCost().compareTo(mediaTask) < 0) {
|
|
|
+ return config.getMediaTaskNoFinishRate().setScale(2, RoundingMode.HALF_UP);
|
|
|
+ }
|
|
|
+
|
|
|
+ PerformanceConfig performanceConfig = performanceConfigService.getNowConfig();
|
|
|
+ if (null != performanceConfig && performanceConfig.getMediaTaskRaise() == 1) {
|
|
|
+ return config.getMediaTaskFinishRate().setScale(2, RoundingMode.HALF_UP);
|
|
|
+ } else {
|
|
|
return config.getMediaTaskNoFinishRate().setScale(2, RoundingMode.HALF_UP);
|
|
|
}
|
|
|
|
|
|
- return config.getMediaTaskFinishRate().setScale(2, RoundingMode.HALF_UP);
|
|
|
}
|
|
|
}
|