Compare commits
No commits in common. "8f8443a81a747d288151cc04226e4c53959b7465" and "ccd4831453208be3807662e24a8a3463dfc404e5" have entirely different histories.
8f8443a81a
...
ccd4831453
|
@ -1,5 +1,6 @@
|
|||
package com.sqx.modules.artificer.service.impl;
|
||||
|
||||
|
||||
import cn.hutool.core.date.DateUnit;
|
||||
import cn.hutool.core.date.DateUtil;
|
||||
import cn.hutool.core.util.NumberUtil;
|
||||
|
@ -19,15 +20,16 @@ import com.sqx.modules.artificer.entity.Period;
|
|||
import com.sqx.modules.artificer.service.AppArtificerIntegralService;
|
||||
import com.sqx.modules.artificer.vo.HomeVO;
|
||||
import com.sqx.modules.artificer.vo.UserArtificerVO;
|
||||
import com.sqx.modules.bl.artificer.dao.ArtificerPartitioningDetailsDao;
|
||||
import com.sqx.modules.bl.artificer.entity.ArtificerPartitioningDetails;
|
||||
import com.sqx.modules.common.dao.ArtificerPartitioningDetailsMapper;
|
||||
import com.sqx.modules.common.dao.CommonInfoDao;
|
||||
import com.sqx.modules.common.entity.ArtificerPartitioningDetails;
|
||||
import com.sqx.modules.common.entity.CommonInfo;
|
||||
import lombok.AllArgsConstructor;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.math.RoundingMode;
|
||||
import java.util.*;
|
||||
|
||||
|
||||
|
@ -36,12 +38,13 @@ import static com.sqx.modules.utils.PeriodUtil.obtainCycle;
|
|||
import static com.sqx.modules.utils.PeriodUtil.previousIssue;
|
||||
import static java.math.BigDecimal.ROUND_CEILING;
|
||||
|
||||
|
||||
@Service
|
||||
@AllArgsConstructor
|
||||
public class AppArtificerIntegralServiceImpl implements AppArtificerIntegralService {
|
||||
|
||||
private final OrdersDao ordersDao;
|
||||
private final ArtificerPartitioningDetailsDao artificerPartitioningDetailsDao;
|
||||
private final ArtificerPartitioningDetailsMapper artificerPartitioningDetailsMapper;
|
||||
private final CommonInfoDao commonInfoDao;
|
||||
private final ArtificerDao artificerDao;
|
||||
private final UserDao userDao;
|
||||
|
@ -145,7 +148,8 @@ public class AppArtificerIntegralServiceImpl implements AppArtificerIntegralServ
|
|||
}
|
||||
|
||||
//业绩后面的显示
|
||||
List<ArtificerPartitioningDetails> lists = artificerPartitioningDetailsDao.selectList(Wrappers.<ArtificerPartitioningDetails>lambdaQuery());
|
||||
List<ArtificerPartitioningDetails> lists = artificerPartitioningDetailsMapper.selectList(Wrappers.<ArtificerPartitioningDetails>lambdaQuery()
|
||||
.eq(ArtificerPartitioningDetails::getClassifyId, classifyId));
|
||||
for (int i = 0; i < lists.size(); i++) {
|
||||
if (currentPerformance >= lists.get(i).getOutstandingAchievement().intValue()) {
|
||||
if (i + 1 < lists.size()) {
|
||||
|
@ -155,14 +159,15 @@ public class AppArtificerIntegralServiceImpl implements AppArtificerIntegralServ
|
|||
}
|
||||
}
|
||||
} else if (currentPerformance <= lists.get(i).getOutstandingAchievement().intValue()) {
|
||||
orders.setSuffix(NumberUtil.toStr(artificerPartitioningDetailsDao.selectById(5).getOutstandingAchievement()));
|
||||
orders.setSuffix(NumberUtil.toStr(artificerPartitioningDetailsMapper.selectById(5).getOutstandingAchievement()));
|
||||
}
|
||||
}
|
||||
return getResult(currentPerformance, clockRate, divide1, b, add, orders, artificer, classifyId);
|
||||
}
|
||||
|
||||
private Result getResult(Integer currentPerformance, BigDecimal clockRate, BigDecimal divide1, BigDecimal b, BigDecimal add, HomeVO orders, Artificer artificer, String classifyId) {
|
||||
List<ArtificerPartitioningDetails> artificerPartitioningDetails = artificerPartitioningDetailsDao.selectList(Wrappers.<ArtificerPartitioningDetails>lambdaQuery()
|
||||
List<ArtificerPartitioningDetails> artificerPartitioningDetails = artificerPartitioningDetailsMapper.selectList(Wrappers.<ArtificerPartitioningDetails>lambdaQuery()
|
||||
.eq(ArtificerPartitioningDetails::getClassifyId, classifyId)
|
||||
.ne(ArtificerPartitioningDetails::getGrade, "A0"));
|
||||
|
||||
for (int i = 0; i < artificerPartitioningDetails.size(); i++) {
|
||||
|
@ -328,11 +333,12 @@ public class AppArtificerIntegralServiceImpl implements AppArtificerIntegralServ
|
|||
Date date1 = DateUtil.parse(createTime);
|
||||
long betweenDay = DateUtil.between(date1, new Date(), DateUnit.DAY);
|
||||
|
||||
List<ArtificerPartitioningDetails> artificerPartitioningDetails = artificerPartitioningDetailsDao.selectList(Wrappers.<ArtificerPartitioningDetails>lambdaQuery());
|
||||
List<ArtificerPartitioningDetails> artificerPartitioningDetails = artificerPartitioningDetailsMapper.selectList(Wrappers.<ArtificerPartitioningDetails>lambdaQuery()
|
||||
.eq(ArtificerPartitioningDetails::getClassifyId, 91));
|
||||
//判断betweenDay大于10天 说明过了 新人扶持阶段 设置等级为A0
|
||||
if (betweenDay > 10) {
|
||||
artificerPartitioningDetails.remove(0);
|
||||
extractedRate(artificerId, artificerPartitioningDetailsDao.selectById(3).getProportionalSharing(), artificerPartitioningDetailsDao.selectById(3).getGrade());
|
||||
extractedRate(artificerId, artificerPartitioningDetailsMapper.selectById(3).getProportionalSharing(), artificerPartitioningDetailsMapper.selectById(3).getGrade());
|
||||
}
|
||||
|
||||
for (ArtificerPartitioningDetails item : artificerPartitioningDetails) {
|
||||
|
@ -438,12 +444,13 @@ public class AppArtificerIntegralServiceImpl implements AppArtificerIntegralServ
|
|||
long betweenDay = DateUtil.between(date1, new Date(), DateUnit.DAY);
|
||||
|
||||
|
||||
List<ArtificerPartitioningDetails> artificerPartitioningDetails = artificerPartitioningDetailsDao.selectList(Wrappers.<ArtificerPartitioningDetails>lambdaQuery());
|
||||
List<ArtificerPartitioningDetails> artificerPartitioningDetails = artificerPartitioningDetailsMapper.selectList(Wrappers.<ArtificerPartitioningDetails>lambdaQuery()
|
||||
.eq(ArtificerPartitioningDetails::getClassifyId, 95));
|
||||
|
||||
//判断betweenDay大于10天 说明过了 新人扶持阶段 设置等级为A0
|
||||
if (betweenDay > 10) {
|
||||
artificerPartitioningDetails.remove(0);
|
||||
extractedRate(artificerId, artificerPartitioningDetailsDao.selectById(29).getProportionalSharing(), artificerPartitioningDetailsDao.selectById(29).getGrade());
|
||||
extractedRate(artificerId, artificerPartitioningDetailsMapper.selectById(29).getProportionalSharing(), artificerPartitioningDetailsMapper.selectById(29).getGrade());
|
||||
}
|
||||
|
||||
for (ArtificerPartitioningDetails item : artificerPartitioningDetails) {
|
||||
|
@ -565,7 +572,7 @@ public class AppArtificerIntegralServiceImpl implements AppArtificerIntegralServ
|
|||
QueryWrapper queryWrapper = new QueryWrapper();
|
||||
queryWrapper.eq("classify_id", classifyId);
|
||||
queryWrapper.orderByAsc("id");
|
||||
IPage<ArtificerPartitioningDetails> apdPage= artificerPartitioningDetailsDao.selectPage(page1,queryWrapper);
|
||||
IPage<ArtificerPartitioningDetails> apdPage= artificerPartitioningDetailsMapper.selectPage(page1,queryWrapper);
|
||||
map.put("levelData",apdPage);
|
||||
return Result.success(map);
|
||||
}
|
||||
|
|
|
@ -1,49 +0,0 @@
|
|||
package com.sqx.modules.bl.artificer.controller;
|
||||
|
||||
import com.sqx.common.utils.Result;
|
||||
import com.sqx.modules.bl.artificer.entity.AchievementIntegral;
|
||||
import com.sqx.modules.bl.artificer.service.AchievementIntegralService;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
@RestController
|
||||
@RequestMapping("/artificer/achievementIntegral")
|
||||
@Api(value = "技师业绩积分", tags = {"技师业绩积分"})
|
||||
public class AchievementIntegralController {
|
||||
|
||||
@Autowired
|
||||
private AchievementIntegralService service;
|
||||
|
||||
@GetMapping("/findList")
|
||||
@ApiOperation("查询列表")
|
||||
public Result findList(){
|
||||
return Result.success().put("data",service.list());
|
||||
}
|
||||
|
||||
@PostMapping("/add")
|
||||
@ApiOperation("添加")
|
||||
public Result add(AchievementIntegral achievementIntegral){
|
||||
service.save(achievementIntegral);
|
||||
return Result.success();
|
||||
}
|
||||
|
||||
@PostMapping("/update")
|
||||
@ApiOperation("修改")
|
||||
public Result update(AchievementIntegral achievementIntegral){
|
||||
service.updateById(achievementIntegral);
|
||||
return Result.success();
|
||||
}
|
||||
|
||||
@PostMapping("/delete")
|
||||
@ApiOperation("删除")
|
||||
public Result delete(AchievementIntegral achievementIntegral){
|
||||
service.removeById(achievementIntegral.getId());
|
||||
return Result.success();
|
||||
}
|
||||
|
||||
}
|
|
@ -1,49 +0,0 @@
|
|||
package com.sqx.modules.bl.artificer.controller;
|
||||
|
||||
import com.sqx.common.utils.Result;
|
||||
import com.sqx.modules.bl.artificer.entity.ArtificerPartitioningDetails;
|
||||
import com.sqx.modules.bl.artificer.service.ArtificerPartitioningDetailsService;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
@RestController
|
||||
@RequestMapping("/artificer/partitioningDetails")
|
||||
@Api(value = "技师业绩分成明细", tags = {"技师分成明细配置"})
|
||||
public class ArtificerPartitioningDetailsController {
|
||||
|
||||
@Autowired
|
||||
private ArtificerPartitioningDetailsService service;
|
||||
|
||||
@GetMapping("/findList")
|
||||
@ApiOperation("查询列表")
|
||||
public Result findList(){
|
||||
return Result.success().put("data",service.list());
|
||||
}
|
||||
|
||||
@PostMapping("/add")
|
||||
@ApiOperation("添加")
|
||||
public Result add(ArtificerPartitioningDetails artificerPartitioningDetails){
|
||||
service.save(artificerPartitioningDetails);
|
||||
return Result.success();
|
||||
}
|
||||
|
||||
@PostMapping("/update")
|
||||
@ApiOperation("修改")
|
||||
public Result update(ArtificerPartitioningDetails artificerPartitioningDetails){
|
||||
service.updateById(artificerPartitioningDetails);
|
||||
return Result.success();
|
||||
}
|
||||
|
||||
@PostMapping("/delete")
|
||||
@ApiOperation("删除")
|
||||
public Result delete(ArtificerPartitioningDetails artificerPartitioningDetails){
|
||||
service.removeById(artificerPartitioningDetails.getId());
|
||||
return Result.success();
|
||||
}
|
||||
|
||||
}
|
|
@ -1,10 +0,0 @@
|
|||
package com.sqx.modules.bl.artificer.dao;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.sqx.modules.bl.artificer.entity.AchievementIntegral;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
@Mapper
|
||||
public interface AchievementIntegralDao extends BaseMapper<AchievementIntegral> {
|
||||
|
||||
}
|
|
@ -1,43 +0,0 @@
|
|||
package com.sqx.modules.bl.artificer.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.math.BigDecimal;
|
||||
|
||||
/**
|
||||
* @description bl_artificer_achievement_integral
|
||||
* 技师业绩积分关系表
|
||||
* @author caolei
|
||||
* @date 2024-08-13
|
||||
*/
|
||||
@Data
|
||||
@TableName("bl_artificer_achievement_integral")
|
||||
public class AchievementIntegral implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@TableId(type = IdType.AUTO)
|
||||
/**
|
||||
* ID
|
||||
*/
|
||||
private Long id;
|
||||
/**
|
||||
*类型
|
||||
*/
|
||||
private Long classifyId;
|
||||
/**
|
||||
*业绩
|
||||
*/
|
||||
private BigDecimal achievement;
|
||||
/**
|
||||
*积分
|
||||
*/
|
||||
private BigDecimal integral;
|
||||
|
||||
public AchievementIntegral() {}
|
||||
}
|
|
@ -1,8 +0,0 @@
|
|||
package com.sqx.modules.bl.artificer.service;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.sqx.modules.bl.artificer.entity.AchievementIntegral;
|
||||
|
||||
public interface AchievementIntegralService extends IService<AchievementIntegral> {
|
||||
|
||||
}
|
|
@ -1,8 +0,0 @@
|
|||
package com.sqx.modules.bl.artificer.service;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.sqx.modules.bl.artificer.entity.ArtificerPartitioningDetails;
|
||||
|
||||
public interface ArtificerPartitioningDetailsService extends IService<ArtificerPartitioningDetails> {
|
||||
|
||||
}
|
|
@ -1,12 +0,0 @@
|
|||
package com.sqx.modules.bl.artificer.service.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.sqx.modules.bl.artificer.dao.AchievementIntegralDao;
|
||||
import com.sqx.modules.bl.artificer.entity.AchievementIntegral;
|
||||
import com.sqx.modules.bl.artificer.service.AchievementIntegralService;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
@Service
|
||||
public class AchievementIntegralServiceImpl extends ServiceImpl<AchievementIntegralDao, AchievementIntegral> implements AchievementIntegralService {
|
||||
|
||||
}
|
|
@ -1,15 +0,0 @@
|
|||
package com.sqx.modules.bl.artificer.service.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.sqx.modules.bl.artificer.dao.AchievementIntegralDao;
|
||||
import com.sqx.modules.bl.artificer.dao.ArtificerPartitioningDetailsDao;
|
||||
import com.sqx.modules.bl.artificer.entity.AchievementIntegral;
|
||||
import com.sqx.modules.bl.artificer.entity.ArtificerPartitioningDetails;
|
||||
import com.sqx.modules.bl.artificer.service.AchievementIntegralService;
|
||||
import com.sqx.modules.bl.artificer.service.ArtificerPartitioningDetailsService;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
@Service
|
||||
public class ArtificerPartitioningDetailsServiceImpl extends ServiceImpl<ArtificerPartitioningDetailsDao, ArtificerPartitioningDetails> implements ArtificerPartitioningDetailsService {
|
||||
|
||||
}
|
|
@ -1,7 +1,9 @@
|
|||
package com.sqx.modules.common.controller;
|
||||
|
||||
import com.sqx.common.utils.Result;
|
||||
import com.sqx.modules.common.entity.ArtificerPartitioningDetails;
|
||||
import com.sqx.modules.common.entity.CommonInfo;
|
||||
import com.sqx.modules.common.enums.CommonEnum;
|
||||
import com.sqx.modules.common.service.CommonInfoService;
|
||||
import com.sqx.modules.common.utils.CommonConfigUtil;
|
||||
import io.swagger.annotations.Api;
|
||||
|
@ -75,6 +77,18 @@ public class CommonController {
|
|||
return commonService.findByTypeAndCondition(condition);
|
||||
}
|
||||
|
||||
@GetMapping("/fcmx/{type}")
|
||||
@ApiOperation("技师分成规则查询")
|
||||
public Result rules(@PathVariable(value = "type") String type) {
|
||||
return commonService.rules(type);
|
||||
}
|
||||
|
||||
@PostMapping("/fcmx/upd")
|
||||
@ApiOperation("技师分成规则修改")
|
||||
public Result rulesUpd(@RequestBody ArtificerPartitioningDetails artificerPartitioningDetails) {
|
||||
return commonService.rulesUpd(artificerPartitioningDetails);
|
||||
}
|
||||
|
||||
//默认,空数据根据这个生成
|
||||
|
||||
@GetMapping("/getCommonEnum")
|
||||
|
|
|
@ -1,7 +1,8 @@
|
|||
package com.sqx.modules.bl.artificer.dao;
|
||||
package com.sqx.modules.common.dao;
|
||||
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.sqx.modules.bl.artificer.entity.ArtificerPartitioningDetails;
|
||||
import com.sqx.modules.common.entity.ArtificerPartitioningDetails;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
/**
|
||||
|
@ -14,7 +15,7 @@ import org.apache.ibatis.annotations.Mapper;
|
|||
*/
|
||||
|
||||
@Mapper
|
||||
public interface ArtificerPartitioningDetailsDao extends BaseMapper<ArtificerPartitioningDetails> {
|
||||
public interface ArtificerPartitioningDetailsMapper extends BaseMapper<ArtificerPartitioningDetails> {
|
||||
|
||||
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package com.sqx.modules.bl.artificer.entity;
|
||||
package com.sqx.modules.common.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
|
@ -46,4 +46,7 @@ public class ArtificerPartitioningDetails implements Serializable {
|
|||
@ApiModelProperty("充值率")
|
||||
private BigDecimal depositRate;
|
||||
|
||||
@ApiModelProperty("项目类型(91精油;95中医)")
|
||||
private String classifyId;
|
||||
|
||||
}
|
|
@ -1,6 +1,7 @@
|
|||
package com.sqx.modules.common.service;
|
||||
|
||||
import com.sqx.common.utils.Result;
|
||||
import com.sqx.modules.common.entity.ArtificerPartitioningDetails;
|
||||
import com.sqx.modules.common.entity.CommonInfo;
|
||||
import com.sqx.modules.common.enums.CommonEnum;
|
||||
|
||||
|
@ -45,6 +46,13 @@ public interface CommonInfoService {
|
|||
*/
|
||||
Result findByTypeAndCondition(String condition);
|
||||
|
||||
/**
|
||||
* 通过类型查询
|
||||
*/
|
||||
Result rules(String type);
|
||||
|
||||
Result rulesUpd(ArtificerPartitioningDetails artificerPartitioningDetails);
|
||||
|
||||
/**
|
||||
* 按枚举查询
|
||||
* @param commonEnum
|
||||
|
|
|
@ -3,11 +3,14 @@ package com.sqx.modules.common.service.impl;
|
|||
import cn.hutool.core.date.DateUnit;
|
||||
import cn.hutool.core.date.DateUtil;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.google.common.collect.Maps;
|
||||
import com.sqx.common.utils.Result;
|
||||
import com.sqx.modules.artificer.dao.UserRechargeDao;
|
||||
import com.sqx.modules.common.dao.ArtificerPartitioningDetailsMapper;
|
||||
import com.sqx.modules.common.dao.CommonInfoDao;
|
||||
import com.sqx.modules.common.entity.ArtificerPartitioningDetails;
|
||||
import com.sqx.modules.common.entity.CommonInfo;
|
||||
import com.sqx.modules.common.enums.CommonEnum;
|
||||
import com.sqx.modules.common.service.CommonInfoService;
|
||||
|
@ -15,6 +18,7 @@ import com.sqx.modules.common.utils.CommonConfigUtil;
|
|||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
@ -29,11 +33,13 @@ public class CommonInfoServiceImpl extends ServiceImpl<CommonInfoDao, CommonInfo
|
|||
|
||||
private final CommonInfoDao commonInfoDao;
|
||||
private final UserRechargeDao userRechargeDao;
|
||||
private final ArtificerPartitioningDetailsMapper artificerPartitioningDetailsMapper;
|
||||
|
||||
@Autowired
|
||||
public CommonInfoServiceImpl(CommonInfoDao commonInfoDao,UserRechargeDao userRechargeDao) {
|
||||
public CommonInfoServiceImpl(CommonInfoDao commonInfoDao,UserRechargeDao userRechargeDao,ArtificerPartitioningDetailsMapper artificerPartitioningDetailsMapper) {
|
||||
this.commonInfoDao = commonInfoDao;
|
||||
this.userRechargeDao = userRechargeDao;
|
||||
this.artificerPartitioningDetailsMapper = artificerPartitioningDetailsMapper;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -74,6 +80,18 @@ public class CommonInfoServiceImpl extends ServiceImpl<CommonInfoDao, CommonInfo
|
|||
return Result.success().put("data", getListByCondition(condition));
|
||||
}
|
||||
|
||||
@Override
|
||||
public Result rules(String type) {
|
||||
return Result.success().put("data", artificerPartitioningDetailsMapper.selectList(Wrappers.<ArtificerPartitioningDetails>lambdaQuery()
|
||||
.eq(ArtificerPartitioningDetails::getClassifyId, type)));
|
||||
}
|
||||
|
||||
@Override
|
||||
public Result rulesUpd(ArtificerPartitioningDetails artificerPartitioningDetails) {
|
||||
artificerPartitioningDetailsMapper.updateById(artificerPartitioningDetails);
|
||||
return Result.success();
|
||||
}
|
||||
|
||||
@Override
|
||||
public CommonInfo findOneByEnum(CommonEnum commonEnum) {
|
||||
return findOne(commonEnum.getKey());
|
||||
|
|
|
@ -11,15 +11,17 @@ import com.sqx.modules.artificer.dao.OrdersDao;
|
|||
import com.sqx.modules.artificer.dao.UserRechargeDao;
|
||||
import com.sqx.modules.artificer.entity.Artificer;
|
||||
import com.sqx.modules.artificer.entity.BlArtificerZqhz;
|
||||
import com.sqx.modules.artificer.entity.Orders;
|
||||
import com.sqx.modules.artificer.entity.UserRecharge;
|
||||
import com.sqx.modules.bl.artificer.dao.ArtificerPartitioningDetailsDao;
|
||||
import com.sqx.modules.bl.artificer.entity.ArtificerPartitioningDetails;
|
||||
import com.sqx.modules.bl.sadjob.entity.BlSadJob;
|
||||
import com.sqx.modules.bl.sadjob.service.BlSadJobService;
|
||||
import com.sqx.modules.bl.userZxsc.dao.BlUserZxscDao;
|
||||
import com.sqx.modules.bl.userZxsc.entity.BlUserZxsc;
|
||||
import com.sqx.modules.common.dao.ArtificerPartitioningDetailsMapper;
|
||||
import com.sqx.modules.common.dao.CommonInfoDao;
|
||||
import com.sqx.modules.common.entity.ArtificerPartitioningDetails;
|
||||
import com.sqx.modules.common.entity.CommonInfo;
|
||||
import com.sqx.modules.shopping.utils.DateUtil;
|
||||
import com.sqx.modules.task.service.AllTaskSercice;
|
||||
import org.apache.commons.lang.StringUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
|
@ -29,6 +31,8 @@ import org.springframework.stereotype.Service;
|
|||
import java.math.BigDecimal;
|
||||
import java.text.ParseException;
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Calendar;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
@ -41,7 +45,7 @@ public class AllTaskServiceImpl implements AllTaskSercice {
|
|||
private ArtificerDao artificerDao;
|
||||
|
||||
@Autowired
|
||||
private ArtificerPartitioningDetailsDao artificerPartitioningDetailsDao;
|
||||
private ArtificerPartitioningDetailsMapper artificerPartitioningDetailsMapper;
|
||||
|
||||
@Autowired
|
||||
private OrdersDao ordersDao;
|
||||
|
@ -111,7 +115,7 @@ public class AllTaskServiceImpl implements AllTaskSercice {
|
|||
QueryWrapper<ArtificerPartitioningDetails> sjgzQuery = new QueryWrapper<ArtificerPartitioningDetails>();
|
||||
sjgzQuery.ne("grade","新");
|
||||
sjgzQuery.orderByDesc("outstanding_achievement","duration_online");
|
||||
List<ArtificerPartitioningDetails> sjgzAllList = artificerPartitioningDetailsDao.selectList(sjgzQuery);
|
||||
List<ArtificerPartitioningDetails> sjgzAllList = artificerPartitioningDetailsMapper.selectList(sjgzQuery);
|
||||
//4.根据技师的服务类型查找对应的配置规则,
|
||||
for (Artificer jsPar : jslist) {
|
||||
//获取技师是否参与积分规则,如果参与积分规则则继续执行,否则不变分成比例
|
||||
|
@ -142,7 +146,7 @@ public class AllTaskServiceImpl implements AllTaskSercice {
|
|||
BigDecimal rate = BigDecimal.valueOf(0.6);
|
||||
for (ArtificerPartitioningDetails sjgzPar : sjgzAllList){
|
||||
//当技师的服务类型=升级规则的服务类型,才可以添加到升级规则里去
|
||||
// if(StringUtils.equals(sjgzPar.getClassifyId(),String.valueOf(classifyId))){
|
||||
if(StringUtils.equals(sjgzPar.getClassifyId(),String.valueOf(classifyId))){
|
||||
// sjgzList.add(sjgzPar);
|
||||
//最低业绩
|
||||
Double zddjPar = Double.parseDouble(sjgzPar.getOutstandingAchievement()+"");
|
||||
|
@ -163,7 +167,7 @@ public class AllTaskServiceImpl implements AllTaskSercice {
|
|||
rate = BigDecimal.valueOf(Double.parseDouble(sjgzPar.getProportionalSharing()));
|
||||
break;
|
||||
}
|
||||
// }
|
||||
}
|
||||
}
|
||||
//如果都不符合,则给最低等级(保底)
|
||||
if(StringUtils.isEmpty(jsdj)){
|
||||
|
@ -171,7 +175,7 @@ public class AllTaskServiceImpl implements AllTaskSercice {
|
|||
sjgzQuery1.eq("grade","A0");
|
||||
sjgzQuery1.eq("classify_id",classifyId);
|
||||
sjgzQuery1.last("limit 1");
|
||||
ArtificerPartitioningDetails zddjgz = artificerPartitioningDetailsDao.selectOne(sjgzQuery1);
|
||||
ArtificerPartitioningDetails zddjgz = artificerPartitioningDetailsMapper.selectOne(sjgzQuery1);
|
||||
jsdj = zddjgz.getGrade();
|
||||
rate = BigDecimal.valueOf(Double.parseDouble(zddjgz.getProportionalSharing()));
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue