|
@@ -90,24 +90,24 @@ public class DesignerServiceImpl implements IDesignerService {
|
|
roleName = "all";
|
|
roleName = "all";
|
|
}
|
|
}
|
|
|
|
|
|
- //获取季度的开始和截止时间
|
|
|
|
- Map<String,String> map = DateUtils.quarterStartEndDate(Integer.valueOf(yearTime),Integer.valueOf(monthTime));
|
|
|
|
- //取时间的季度的月份
|
|
|
|
- Map<String,Object> timeMap = DateUtils.getCurrentQuarterMonths(map.get("endDate"));
|
|
|
|
- String[] quarterStr = (String[])timeMap.get("quarter");
|
|
|
|
|
|
+
|
|
|
|
+ //取当前时间的季度的月份
|
|
|
|
+ List<Map<String,Integer>> timeMap = DateUtils.getQuarStartAndEndTime(Integer.valueOf(monthTime));
|
|
|
|
+
|
|
|
|
+
|
|
List<Map<String,Object>> resultList = new ArrayList<>();
|
|
List<Map<String,Object>> resultList = new ArrayList<>();
|
|
List<Map<String,Object>> byteDanceList = new ArrayList<>();
|
|
List<Map<String,Object>> byteDanceList = new ArrayList<>();
|
|
Map<String,Object> bytedanceMap = new HashMap<>();
|
|
Map<String,Object> bytedanceMap = new HashMap<>();
|
|
List<Map<String,Object>> kuaishouList = new ArrayList<>();
|
|
List<Map<String,Object>> kuaishouList = new ArrayList<>();
|
|
Map<String,Object> kuaishouMap = new HashMap<>();
|
|
Map<String,Object> kuaishouMap = new HashMap<>();
|
|
- for (String month : quarterStr ){
|
|
|
|
|
|
+ for (Map<String,Integer> month : timeMap ){
|
|
//头条
|
|
//头条
|
|
- JSONObject bytedanceJson = designerMapper.getHotVideoData(userId,roleName,1,Integer.valueOf(yearTime),Integer.valueOf(month));
|
|
|
|
|
|
+ JSONObject bytedanceJson = designerMapper.getHotVideoData(userId,roleName,1,month.get("startTime"),month.get("endTime"));
|
|
bytedanceJson.put("monthTime",month);
|
|
bytedanceJson.put("monthTime",month);
|
|
byteDanceList.add(bytedanceJson);
|
|
byteDanceList.add(bytedanceJson);
|
|
bytedanceMap.put("byteDance",byteDanceList);
|
|
bytedanceMap.put("byteDance",byteDanceList);
|
|
//快手
|
|
//快手
|
|
- JSONObject kuaishouJson = designerMapper.getHotVideoData(userId,roleName,2,Integer.valueOf(yearTime),Integer.valueOf(month));
|
|
|
|
|
|
+ JSONObject kuaishouJson = designerMapper.getHotVideoData(userId,roleName,2,month.get("startTime"),month.get("endTime"));
|
|
kuaishouJson.put("monthTime",month);
|
|
kuaishouJson.put("monthTime",month);
|
|
kuaishouList.add(kuaishouJson);
|
|
kuaishouList.add(kuaishouJson);
|
|
kuaishouMap.put("kuaishou",kuaishouList);
|
|
kuaishouMap.put("kuaishou",kuaishouList);
|
|
@@ -120,28 +120,27 @@ public class DesignerServiceImpl implements IDesignerService {
|
|
|
|
|
|
@Override
|
|
@Override
|
|
public Map<String,Object> getDesignerAchievements(String userId,String yearTime,String monthTime) {
|
|
public Map<String,Object> getDesignerAchievements(String userId,String yearTime,String monthTime) {
|
|
- //获取季度的开始和截止时间
|
|
|
|
- Map<String,String> map = DateUtils.quarterStartEndDate(Integer.valueOf(yearTime),Integer.valueOf(monthTime));
|
|
|
|
|
|
+
|
|
//取当前时间的季度的月份
|
|
//取当前时间的季度的月份
|
|
- Map<String,Object> timeMap = DateUtils.getCurrentQuarterMonths(map.get("endDate"));
|
|
|
|
- String[] quarterStr = (String[])timeMap.get("quarter");
|
|
|
|
|
|
+ List<Map<String,Integer>> timeMap = DateUtils.getQuarStartAndEndTime(Integer.valueOf(monthTime));
|
|
|
|
+
|
|
Map<String,Object> resultMap = new HashMap<>();
|
|
Map<String,Object> resultMap = new HashMap<>();
|
|
List<Map<String,Object>> byteDanceList = new ArrayList<>();
|
|
List<Map<String,Object>> byteDanceList = new ArrayList<>();
|
|
List<Map<String,Object>> kuaishouList = new ArrayList<>();
|
|
List<Map<String,Object>> kuaishouList = new ArrayList<>();
|
|
|
|
|
|
- for (String month : quarterStr ){
|
|
|
|
|
|
+ for (Map<String,Integer> month : timeMap ){
|
|
Map<String,Object> bytedanceMap = new HashMap<>();
|
|
Map<String,Object> bytedanceMap = new HashMap<>();
|
|
Map<String,Object> kuaishouMap = new HashMap<>();
|
|
Map<String,Object> kuaishouMap = new HashMap<>();
|
|
//头条
|
|
//头条
|
|
- List<JSONObject> bytedanceJson = designerMapper.getDesignerAchievementsBytedance(userId,Integer.valueOf(yearTime),Integer.valueOf(month));
|
|
|
|
|
|
+ List<JSONObject> bytedanceJson = designerMapper.getDesignerAchievementsBytedance(userId,month.get("startTime"),month.get("endTime"));
|
|
bytedanceMap.put("monthTime",month );
|
|
bytedanceMap.put("monthTime",month );
|
|
- bytedanceMap.put("yearTime",timeMap.get("yearTime")+"" );
|
|
|
|
|
|
+ bytedanceMap.put("yearTime",yearTime);
|
|
bytedanceMap.put("byteDance",bytedanceJson);
|
|
bytedanceMap.put("byteDance",bytedanceJson);
|
|
byteDanceList.add(bytedanceMap);
|
|
byteDanceList.add(bytedanceMap);
|
|
//快手
|
|
//快手
|
|
- List<JSONObject> kuaishouJson = designerMapper.getDesignerAchievementsKuaishou(userId,Integer.valueOf(yearTime),Integer.valueOf(month));
|
|
|
|
|
|
+ List<JSONObject> kuaishouJson = designerMapper.getDesignerAchievementsKuaishou(userId,month.get("startTime"),month.get("endTime"));
|
|
kuaishouMap.put("monthTime",month );
|
|
kuaishouMap.put("monthTime",month );
|
|
- bytedanceMap.put("yearTime",timeMap.get("yearTime")+"" );
|
|
|
|
|
|
+ bytedanceMap.put("yearTime",yearTime);
|
|
kuaishouMap.put("kuaiShou",kuaishouJson);
|
|
kuaishouMap.put("kuaiShou",kuaishouJson);
|
|
kuaishouList.add(kuaishouMap);
|
|
kuaishouList.add(kuaishouMap);
|
|
}
|
|
}
|
|
@@ -160,9 +159,9 @@ public class DesignerServiceImpl implements IDesignerService {
|
|
* createTime 员工入职时间
|
|
* createTime 员工入职时间
|
|
* @return
|
|
* @return
|
|
*/
|
|
*/
|
|
- public Double getMaterialCost(String frozenTime, String createTime){
|
|
|
|
|
|
+ public Double getMaterialCost(String frozenTime, String createTime,int monthTime){
|
|
|
|
|
|
- //String frozenTime = "";
|
|
|
|
|
|
+//String frozenTime = "";
|
|
//String createTime = "2022-11-02 12:23:23";
|
|
//String createTime = "2022-11-02 12:23:23";
|
|
|
|
|
|
//绩效 = 在职月份 * 80w 额度
|
|
//绩效 = 在职月份 * 80w 额度
|
|
@@ -172,36 +171,68 @@ public class DesignerServiceImpl implements IDesignerService {
|
|
/**
|
|
/**
|
|
* 人员离职
|
|
* 人员离职
|
|
*/
|
|
*/
|
|
- if (!Check.isNull(frozenTime)){
|
|
|
|
- //离职时间 是否在当前季度
|
|
|
|
- if (DateUtils.isThisQuarter(frozenTime)){
|
|
|
|
- Map<String,Object> map = DateUtils.getCurrentQuarterMonths(frozenTime);
|
|
|
|
- //月份
|
|
|
|
- String monthTime = map.get("monthTime")+"" ;
|
|
|
|
- //季度
|
|
|
|
|
|
+ if (frozenTime != null){
|
|
|
|
+
|
|
|
|
+ Date date = DateUtils.str2Date(frozenTime,new SimpleDateFormat("yyyy-MM-dd"));
|
|
|
|
+ // 判断时间所在的季度
|
|
|
|
+ int quarterTime = DateUtils.getQuarter(date);
|
|
|
|
+
|
|
|
|
+ //季度查询时间 超过 离职时间 则比例为0 绩效 无
|
|
|
|
+ if (quarterTime < monthTime){
|
|
|
|
+ i = 0;
|
|
|
|
+ log.info("离职-----离职时间是:{},查询季度{} 绩效按照0计算。当前时间是:{},",frozenTime,monthTime,new Date());
|
|
|
|
+
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ if (quarterTime > monthTime){
|
|
|
|
+ log.info("离职-----离职时间是:{},查询季度{},绩效按照240计算。当前时间是:{},",frozenTime,monthTime,new Date());
|
|
|
|
+
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ //离职时间 是否是当前季度
|
|
|
|
+ if (quarterTime == monthTime){
|
|
|
|
+ Map<String,Object> map = DateUtils.getCurrentQuarterMonths(monthTime);
|
|
|
|
+ //离职时间所在 月份
|
|
|
|
+ String month = DateUtils.getMonth("yyyy-MM-dd",frozenTime);
|
|
|
|
+ //离职时间所在的季度 的全部 月份
|
|
String[] quarter =(String[]) map.get("quarter");
|
|
String[] quarter =(String[]) map.get("quarter");
|
|
//判断当前离职所在的月份 与当前季度中的月份集合 并获取下标 下标+1 则是 在职月份i
|
|
//判断当前离职所在的月份 与当前季度中的月份集合 并获取下标 下标+1 则是 在职月份i
|
|
- int j = Collections.indexOfSubList(Arrays.asList(quarter),Arrays.asList(monthTime));
|
|
|
|
|
|
+ int j = Collections.indexOfSubList(Arrays.asList(quarter),Arrays.asList(month));
|
|
i = j + 1;
|
|
i = j + 1;
|
|
- log.info("离职-----离职时间是:{}在本季度范围内!系数为{}个月的绩效数据--->{}",frozenTime,i,i*cost);
|
|
|
|
- return i * cost;
|
|
|
|
- };
|
|
|
|
- log.info("离职-----离职时间是:{}不在本季度范围内!绩效按照240计算。当前时间是:{},",frozenTime,new Date());
|
|
|
|
|
|
+ log.info("离职-----离职时间是:{}在查询季度{}范围内!系数为{}个月的绩效数据--->{}",frozenTime,monthTime,i,i*cost);
|
|
|
|
+
|
|
|
|
+ }
|
|
|
|
+ //return i * cost;
|
|
|
|
+
|
|
}else {
|
|
}else {
|
|
- //入职时间 是否在当前季度
|
|
|
|
- if (DateUtils.isThisQuarter(createTime)){
|
|
|
|
- Map<String,Object> map = DateUtils.getCurrentQuarterMonths(createTime);
|
|
|
|
|
|
+ Date date = DateUtils.str2Date(createTime,new SimpleDateFormat("yyyy-MM-dd"));
|
|
|
|
+ // 判断时间所在的季度
|
|
|
|
+ int quarterTime = DateUtils.getQuarter(date);
|
|
|
|
+ //查询入职前的 比例
|
|
|
|
+ //季度查询时间 超过 入职时间 绩效0
|
|
|
|
+ if (quarterTime < monthTime){
|
|
|
|
+ log.info("在职-----入职时间是:{},查询季度{} 绩效按照240计算。当前时间是:{},",createTime,monthTime,new Date());
|
|
|
|
+ }
|
|
|
|
+ //查询入职后的 比例
|
|
|
|
+ if (quarterTime > monthTime){
|
|
|
|
+ i = 0;
|
|
|
|
+ log.info("在职-----入职时间是:{},查询季度{},绩效按照0计算。当前时间是:{},",createTime,monthTime,new Date());
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ //入职时间 在当前季度
|
|
|
|
+ if (quarterTime == monthTime){
|
|
|
|
+ Map<String,Object> map = DateUtils.getCurrentQuarterMonths(monthTime);
|
|
//月份
|
|
//月份
|
|
- String monthTime = map.get("monthTime")+"" ;
|
|
|
|
|
|
+ //入职时间所在 月份
|
|
|
|
+ String month = DateUtils.getMonth("yyyy-MM-dd",createTime);
|
|
//季度
|
|
//季度
|
|
String[] quarter =(String[]) map.get("quarter");
|
|
String[] quarter =(String[]) map.get("quarter");
|
|
//判断当前离职所在的月份 与当前季度中的月份集合 并获取下标 下标+1 则是 在职月份i
|
|
//判断当前离职所在的月份 与当前季度中的月份集合 并获取下标 下标+1 则是 在职月份i
|
|
- int j = Collections.indexOfSubList(Arrays.asList(quarter),Arrays.asList(monthTime));
|
|
|
|
- i = 3 - j;
|
|
|
|
- log.info("在职-----入职时间是:{}在本季度范围内!系数为{}个月的绩效数据--->{}",createTime,i,i*cost);
|
|
|
|
|
|
+ int j = Collections.indexOfSubList(Arrays.asList(quarter),Arrays.asList(month));
|
|
|
|
+ i = j + 1;
|
|
|
|
+ log.info("在职-----入职时间是:{}在查询季度{}内!系数为{}个月的绩效数据--->{}",createTime,monthTime,i,i*cost);
|
|
return i * cost;
|
|
return i * cost;
|
|
};
|
|
};
|
|
- log.info("在职-----入职时间是:{}不在本季度范围内!绩效按照240计算。当前时间是:{},",createTime,new Date());
|
|
|
|
}
|
|
}
|
|
return i * cost;
|
|
return i * cost;
|
|
}
|
|
}
|
|
@@ -212,26 +243,39 @@ public class DesignerServiceImpl implements IDesignerService {
|
|
* frozenTime 离职时间
|
|
* frozenTime 离职时间
|
|
* @return
|
|
* @return
|
|
*/
|
|
*/
|
|
- public Double userHappyProbability(String frozenTime){
|
|
|
|
|
|
+ public Double userHappyProbability(String frozenTime,int monthTime){
|
|
|
|
|
|
//离职发放比例
|
|
//离职发放比例
|
|
Double userHappyProbability = new Double("1");
|
|
Double userHappyProbability = new Double("1");
|
|
if (!Check.isNull(frozenTime)){
|
|
if (!Check.isNull(frozenTime)){
|
|
- //离职时间所在季度的最后一天
|
|
|
|
- String endDay = DateUtils.getQuarterEndDay(frozenTime);
|
|
|
|
- //离职月份
|
|
|
|
|
|
+ //根据时间获取季度
|
|
|
|
+ //离职时间所在的季度 是否和 查询季度相同 相同则判断 不同 则比例为1
|
|
|
|
+
|
|
|
|
+ //当前季度的 月份
|
|
|
|
+ Map<String,Object> map = DateUtils.getCurrentQuarterMonths(monthTime);
|
|
|
|
+ //季度
|
|
|
|
+ String[] quarter =(String[]) map.get("quarter");
|
|
String month = DateUtils.getMonth("yyyy-MM-dd",frozenTime);
|
|
String month = DateUtils.getMonth("yyyy-MM-dd",frozenTime);
|
|
|
|
+ if (Arrays.binarySearch(quarter,month) < 0){
|
|
|
|
+ return userHappyProbability;
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+ //离职 获取 天
|
|
|
|
+ String day = DateUtils.getDay("yyyy-MM-dd",frozenTime);
|
|
|
|
|
|
//15日之前离职 不发
|
|
//15日之前离职 不发
|
|
- if (Integer.valueOf(month) < 15){
|
|
|
|
|
|
+ if (Integer.valueOf(day) < 15){
|
|
userHappyProbability = new Double("0");
|
|
userHappyProbability = new Double("0");
|
|
}
|
|
}
|
|
|
|
|
|
// 15号之后离职,发50%
|
|
// 15号之后离职,发50%
|
|
- if (Integer.valueOf(month) >= 15){
|
|
|
|
|
|
+ if (Integer.valueOf(day) >= 15){
|
|
userHappyProbability = new Double("0.5");
|
|
userHappyProbability = new Double("0.5");
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ //离职时间所在季度的最后一天
|
|
|
|
+ String endDay = DateUtils.getQuarterEndDay(frozenTime);
|
|
//最后一天离职 发放比例为1
|
|
//最后一天离职 发放比例为1
|
|
// 离职时间 > = 最后一天
|
|
// 离职时间 > = 最后一天
|
|
if (DateUtils.str2Date(frozenTime,new SimpleDateFormat("yyyy-MM-dd")).getTime() >=
|
|
if (DateUtils.str2Date(frozenTime,new SimpleDateFormat("yyyy-MM-dd")).getTime() >=
|
|
@@ -253,16 +297,14 @@ public class DesignerServiceImpl implements IDesignerService {
|
|
|
|
|
|
@Override
|
|
@Override
|
|
public JSONObject getDesignerCommission(String userId,String yearTime,String monthTime) {
|
|
public JSONObject getDesignerCommission(String userId,String yearTime,String monthTime) {
|
|
- //获取季度的开始和截止时间
|
|
|
|
- Map<String,String> map = DateUtils.quarterStartEndDate(Integer.valueOf(yearTime),Integer.valueOf(monthTime));
|
|
|
|
|
|
+
|
|
//取当前时间的季度的月份
|
|
//取当前时间的季度的月份
|
|
- Map<String,Object> timeMap = DateUtils.getCurrentQuarterMonths(map.get("endDate"));
|
|
|
|
- String[] quarterStr = (String[])timeMap.get("quarter");
|
|
|
|
|
|
+ List<Map<String,Integer>> timeMap = DateUtils.getQuarStartAndEndTime(Integer.valueOf(monthTime));
|
|
//人员离职信息
|
|
//人员离职信息
|
|
JSONObject userFrozen = designerMapper.getUserFrozenInfo(userId);
|
|
JSONObject userFrozen = designerMapper.getUserFrozenInfo(userId);
|
|
|
|
|
|
//季度 分媒体 素材消耗
|
|
//季度 分媒体 素材消耗
|
|
- List<JSONObject> quarterCost = designerMapper.getDesignerBytedanceAndKuaishouQuaterCost(userId,Integer.valueOf(yearTime),Integer.valueOf(monthTime));
|
|
|
|
|
|
+ List<JSONObject> quarterCost = designerMapper.getDesignerBytedanceAndKuaishouQuaterCost(userId,timeMap.get(0).get("startTime"),timeMap.get(2).get("endTime"));
|
|
userFrozen.put("quarterCostList",quarterCost);
|
|
userFrozen.put("quarterCostList",quarterCost);
|
|
|
|
|
|
//季度素材 总消耗
|
|
//季度素材 总消耗
|
|
@@ -270,8 +312,8 @@ public class DesignerServiceImpl implements IDesignerService {
|
|
userFrozen.put("tatolQuarterCost",tatolCost);
|
|
userFrozen.put("tatolQuarterCost",tatolCost);
|
|
|
|
|
|
//管理消耗
|
|
//管理消耗
|
|
- JSONObject leaderCost = designerMapper.getDesignerManagerLeaderCost(userId,Integer.valueOf(yearTime),Integer.valueOf(monthTime));
|
|
|
|
- userFrozen.put("leaderCost",leaderCost.getString("cost"));
|
|
|
|
|
|
+ List<JSONObject> leaderCost = designerMapper.getDesignerManagerLeaderCost(userId,timeMap.get(0).get("startTime"),timeMap.get(2).get("endTime"));
|
|
|
|
+ userFrozen.put("leaderCost",leaderCost.get(0).getString("cost")+leaderCost.get(1).getString("cost"));
|
|
|
|
|
|
//离职时间
|
|
//离职时间
|
|
String frozenTime = userFrozen.getString("frozenTime");
|
|
String frozenTime = userFrozen.getString("frozenTime");
|
|
@@ -279,12 +321,12 @@ public class DesignerServiceImpl implements IDesignerService {
|
|
String createTime = userFrozen.getString("createTime");
|
|
String createTime = userFrozen.getString("createTime");
|
|
|
|
|
|
//判断素材消耗是否达标
|
|
//判断素材消耗是否达标
|
|
- Double i = getMaterialCost(frozenTime,createTime);
|
|
|
|
|
|
+ Double i = getMaterialCost(frozenTime,createTime,Integer.valueOf(monthTime));
|
|
String materialCostQualifiedFlag = tatolCost >= i ? "是" : "否";
|
|
String materialCostQualifiedFlag = tatolCost >= i ? "是" : "否";
|
|
userFrozen.put("materialCostQualifiedFlag",materialCostQualifiedFlag);
|
|
userFrozen.put("materialCostQualifiedFlag",materialCostQualifiedFlag);
|
|
|
|
|
|
//爆款素材数量
|
|
//爆款素材数量
|
|
- JSONObject hotVideoNum = designerMapper.getUserHotMaterialQuarter(userId,Integer.valueOf(yearTime),Integer.valueOf(monthTime));
|
|
|
|
|
|
+ JSONObject hotVideoNum = designerMapper.getUserHotMaterialQuarter(userId,timeMap.get(0).get("startTime"),timeMap.get(2).get("endTime"));
|
|
int hotVideoN = Check.isNull(hotVideoNum) ? 0 : hotVideoNum.getInteger("hotVideoNum");
|
|
int hotVideoN = Check.isNull(hotVideoNum) ? 0 : hotVideoNum.getInteger("hotVideoNum");
|
|
userFrozen.put("hotVideoNum",hotVideoN);
|
|
userFrozen.put("hotVideoNum",hotVideoN);
|
|
|
|
|
|
@@ -317,18 +359,18 @@ public class DesignerServiceImpl implements IDesignerService {
|
|
|
|
|
|
//提成 分月份
|
|
//提成 分月份
|
|
List<JSONObject> commissionList = new ArrayList<>();
|
|
List<JSONObject> commissionList = new ArrayList<>();
|
|
- for (String month : quarterStr ) {
|
|
|
|
|
|
+ for (Map<String,Integer> month : timeMap ) {
|
|
JSONObject commissionJson = new JSONObject();
|
|
JSONObject commissionJson = new JSONObject();
|
|
//头条提成
|
|
//头条提成
|
|
- List<JSONObject> bytedanceJson = designerMapper.getDesignerAchievementsBytedance(userId, Integer.valueOf(timeMap.get("yearTime") + ""), Integer.valueOf(month));
|
|
|
|
|
|
+ List<JSONObject> bytedanceJson = designerMapper.getDesignerAchievementsBytedance(userId, month.get("startTime"),month.get("endTime"));
|
|
Double bytedanceCommission = bytedanceJson.stream().mapToDouble(json -> json.getDouble("commission")).reduce(Double::sum).orElse(new Double("0"));
|
|
Double bytedanceCommission = bytedanceJson.stream().mapToDouble(json -> json.getDouble("commission")).reduce(Double::sum).orElse(new Double("0"));
|
|
|
|
|
|
//快手提成
|
|
//快手提成
|
|
- List<JSONObject> kuaishouJson = designerMapper.getDesignerAchievementsKuaishou(userId, Integer.valueOf(timeMap.get("yearTime") + ""), Integer.valueOf(month));
|
|
|
|
|
|
+ List<JSONObject> kuaishouJson = designerMapper.getDesignerAchievementsKuaishou(userId, month.get("startTime"),month.get("endTime"));
|
|
Double kuaishouCommission = kuaishouJson.stream().mapToDouble(json -> json.getDouble("commission")).reduce(Double::sum).orElse(new Double("0"));
|
|
Double kuaishouCommission = kuaishouJson.stream().mapToDouble(json -> json.getDouble("commission")).reduce(Double::sum).orElse(new Double("0"));
|
|
|
|
|
|
commissionJson.put("monthTime", month);
|
|
commissionJson.put("monthTime", month);
|
|
- commissionJson.put("yearTime", timeMap.get("yearTime") + "");
|
|
|
|
|
|
+ commissionJson.put("yearTime", yearTime);
|
|
commissionJson.put("commission", bytedanceCommission+kuaishouCommission);
|
|
commissionJson.put("commission", bytedanceCommission+kuaishouCommission);
|
|
commissionList.add(commissionJson);
|
|
commissionList.add(commissionJson);
|
|
}
|
|
}
|
|
@@ -343,12 +385,12 @@ public class DesignerServiceImpl implements IDesignerService {
|
|
Double designerLeaderCommission = new Double("0");
|
|
Double designerLeaderCommission = new Double("0");
|
|
String roleCode = roleService.getRoleCodeByUserId(userId);
|
|
String roleCode = roleService.getRoleCodeByUserId(userId);
|
|
if (roleCode.equalsIgnoreCase("designTeamLeader")){
|
|
if (roleCode.equalsIgnoreCase("designTeamLeader")){
|
|
-
|
|
|
|
- designerLeaderCommission = new Double(leaderCost.getString("cost")) * 0.003 * 0.2;
|
|
|
|
|
|
+ Double designerLeaderCommissionBytedance = new Double(leaderCost.get(0).getString("cost")) * 0.002 * 0.2;
|
|
|
|
+ Double designerLeaderCommissionKuaishou = new Double(leaderCost.get(1).getString("cost")) * 0.003 * 0.2;
|
|
|
|
+ designerLeaderCommission = designerLeaderCommissionBytedance + designerLeaderCommissionKuaishou;
|
|
}
|
|
}
|
|
userFrozen.put("designerLeaderCommission",designerLeaderCommission);
|
|
userFrozen.put("designerLeaderCommission",designerLeaderCommission);
|
|
|
|
|
|
-
|
|
|
|
//提成汇总 = 季度汇总 + 负责人提成
|
|
//提成汇总 = 季度汇总 + 负责人提成
|
|
totalCommission+=designerLeaderCommission;
|
|
totalCommission+=designerLeaderCommission;
|
|
userFrozen.put("totalCommission",totalCommission);
|
|
userFrozen.put("totalCommission",totalCommission);
|
|
@@ -356,7 +398,9 @@ public class DesignerServiceImpl implements IDesignerService {
|
|
|
|
|
|
|
|
|
|
//离职发放比例
|
|
//离职发放比例
|
|
- Double userHappyProbability = userHappyProbability(frozenTime);
|
|
|
|
|
|
+ Double userHappyProbability = userHappyProbability(frozenTime,Integer.valueOf(monthTime));
|
|
|
|
+ userFrozen.put("userHappyProbability",userHappyProbability);
|
|
|
|
+
|
|
|
|
|
|
//提成发放金额 = 总提成* 发放系数 * 离职发放比例
|
|
//提成发放金额 = 总提成* 发放系数 * 离职发放比例
|
|
Double userHappyGetMoney = totalCommission * coefficient * userHappyProbability;
|
|
Double userHappyGetMoney = totalCommission * coefficient * userHappyProbability;
|