## 拨比统计数据调整;去掉个人目标相关内容;
This commit is contained in:
parent
f083da7e95
commit
ed4bc6be19
|
@ -7,48 +7,29 @@ import java.util.Date;
|
|||
|
||||
/**
|
||||
* 会员模块定时任务
|
||||
*
|
||||
* @Description:
|
||||
* @Author: ljc
|
||||
* @Time: 2023/4/12 10:38
|
||||
* @Classname: IMemberJobServiceApi
|
||||
* @Package_name: com.hzs.member.account
|
||||
*/
|
||||
public interface IMemberJobServiceApi {
|
||||
|
||||
/**
|
||||
* 定时插入账户详情数据
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
R insertAccountDetail();
|
||||
|
||||
R<?> insertAccountDetail();
|
||||
|
||||
/**
|
||||
* 自动提现
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
R automaticWithdrawal();
|
||||
|
||||
R<?> automaticWithdrawal();
|
||||
|
||||
/**
|
||||
* 每月月初定时删除上上个月的数据
|
||||
*
|
||||
* @return Integer
|
||||
*/
|
||||
R deleteAccountDetailByMonth();
|
||||
|
||||
|
||||
/**
|
||||
* 插入个人目标周历史记录表
|
||||
*/
|
||||
R saveGoalsWeekRecord();
|
||||
|
||||
|
||||
/**
|
||||
* 插入个人目标月历史记录表(每月月初执行)
|
||||
*/
|
||||
R saveGoalsMonthRecord();
|
||||
R<?> deleteAccountDetailByMonth();
|
||||
|
||||
/**
|
||||
* 查询充值金额总和
|
||||
|
@ -58,4 +39,5 @@ public interface IMemberJobServiceApi {
|
|||
* @return R<CuMemberRecharge>
|
||||
*/
|
||||
R<CuMemberRecharge> selectRechargeTotalAmount(Date startDate, Date endDate);
|
||||
|
||||
}
|
||||
|
|
|
@ -1,29 +0,0 @@
|
|||
package com.hzs.system.config;
|
||||
|
||||
import com.hzs.common.core.domain.R;
|
||||
import com.hzs.common.domain.system.config.BdAwards;
|
||||
import com.hzs.common.domain.system.config.ext.BdAwardsExt;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* @description: 根据国家查询奖衔配置列表api
|
||||
* @author: zhang jing
|
||||
* @date: 2022/9/29 15:31
|
||||
* @param:
|
||||
* @return:
|
||||
**/
|
||||
public interface IBdBarCodeServiceApi {
|
||||
|
||||
/**
|
||||
* @description: 定时初始化条形码配置
|
||||
* @author: zhang jing
|
||||
* @date: 2024/5/8 11:19
|
||||
* @param: []
|
||||
* @return: com.hzs.common.core.domain.R<java.lang.Boolean>
|
||||
**/
|
||||
R<Boolean> updatWarehouseLog();
|
||||
|
||||
|
||||
}
|
|
@ -6,7 +6,6 @@ import com.hzs.member.account.IMemberJobServiceApi;
|
|||
import com.hzs.member.account.service.ICuMemberAccountDetailService;
|
||||
import com.hzs.member.account.service.ICuMemberRechargeService;
|
||||
import com.hzs.member.account.service.ICuMemberWithdrawService;
|
||||
import com.hzs.member.goals.service.ICuPersonalGoalsService;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.dubbo.config.annotation.DubboService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
|
@ -15,34 +14,22 @@ import java.util.Date;
|
|||
|
||||
/**
|
||||
* 会员模块定时任务服务提供
|
||||
*
|
||||
* @Description:
|
||||
* @Author: ljc
|
||||
* @Time: 2023/4/12 10:40
|
||||
* @Classname: IMemberJobServiceProvider
|
||||
* @Package_name: com.hzs.member.account.provider
|
||||
*/
|
||||
|
||||
@Slf4j
|
||||
@DubboService
|
||||
public class IMemberJobServiceProvider implements IMemberJobServiceApi {
|
||||
|
||||
@Autowired
|
||||
private ICuMemberAccountDetailService memberAccountDetailService;
|
||||
|
||||
private ICuMemberAccountDetailService iCuMemberAccountDetailService;
|
||||
@Autowired
|
||||
private ICuMemberWithdrawService memberWithdrawService;
|
||||
|
||||
private ICuMemberWithdrawService iCuMemberWithdrawService;
|
||||
@Autowired
|
||||
private ICuPersonalGoalsService cuPersonalGoalsService;
|
||||
|
||||
@Autowired
|
||||
private ICuMemberRechargeService memberRechargeService;
|
||||
private ICuMemberRechargeService iCuMemberRechargeService;
|
||||
|
||||
@Override
|
||||
public R insertAccountDetail() {
|
||||
public R<?> insertAccountDetail() {
|
||||
try {
|
||||
memberAccountDetailService.insertAccountDetail();
|
||||
iCuMemberAccountDetailService.insertAccountDetail();
|
||||
} catch (Exception e) {
|
||||
log.info("定时插入账户详情数据失败:", e);
|
||||
return R.fail(e.getMessage());
|
||||
|
@ -50,11 +37,10 @@ public class IMemberJobServiceProvider implements IMemberJobServiceApi {
|
|||
return R.ok();
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public R automaticWithdrawal() {
|
||||
public R<?> automaticWithdrawal() {
|
||||
try {
|
||||
memberWithdrawService.autoWithdraw();
|
||||
iCuMemberWithdrawService.autoWithdraw();
|
||||
} catch (Exception e) {
|
||||
log.info("自动提现报错:", e);
|
||||
return R.fail(e.getMessage());
|
||||
|
@ -63,9 +49,9 @@ public class IMemberJobServiceProvider implements IMemberJobServiceApi {
|
|||
}
|
||||
|
||||
@Override
|
||||
public R deleteAccountDetailByMonth() {
|
||||
public R<?> deleteAccountDetailByMonth() {
|
||||
try {
|
||||
memberAccountDetailService.deleteAccountDetailByMonth();
|
||||
iCuMemberAccountDetailService.deleteAccountDetailByMonth();
|
||||
} catch (Exception e) {
|
||||
log.info("定时删除账户详情数据失败:", e);
|
||||
return R.fail(e.getMessage());
|
||||
|
@ -73,35 +59,9 @@ public class IMemberJobServiceProvider implements IMemberJobServiceApi {
|
|||
return R.ok();
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public R saveGoalsWeekRecord() {
|
||||
try {
|
||||
cuPersonalGoalsService.saveGoalsWeekRecord();
|
||||
} catch (Exception e) {
|
||||
log.info("插入个人目标周历史记录表失败:", e);
|
||||
return R.fail(e.getMessage());
|
||||
}
|
||||
return R.ok();
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public R saveGoalsMonthRecord() {
|
||||
try {
|
||||
cuPersonalGoalsService.saveGoalsMonthRecord();
|
||||
} catch (Exception e) {
|
||||
log.info("插入个人目标月历史记录表失败:", e);
|
||||
return R.fail(e.getMessage());
|
||||
}
|
||||
return R.ok();
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public R<CuMemberRecharge> selectRechargeTotalAmount(Date startDate, Date endDate) {
|
||||
return R.ok(memberRechargeService.selectRechargeTotalAmount(startDate, endDate));
|
||||
return R.ok(iCuMemberRechargeService.selectRechargeTotalAmount(startDate, endDate));
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
|
|
@ -1,16 +1,10 @@
|
|||
package com.hzs.member.goals.mapper;
|
||||
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.hzs.common.domain.member.goals.CuPersonalGoalsClassify;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 个人目标分类 Mapper 接口
|
||||
* </p>
|
||||
*
|
||||
* @author hzs
|
||||
* @since 2023-05-17
|
||||
*/
|
||||
public interface CuPersonalGoalsClassifyMapper extends BaseMapper<CuPersonalGoalsClassify> {
|
||||
|
||||
|
|
|
@ -1,20 +1,12 @@
|
|||
package com.hzs.member.goals.mapper;
|
||||
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.hzs.common.domain.member.goals.CuPersonalGoalsDetail;
|
||||
import com.hzs.member.goals.vo.CuPersonalGoalsRowDetailVO;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 个人目标详情 Mapper 接口
|
||||
* </p>
|
||||
*
|
||||
* @author hzs
|
||||
* @since 2023-05-16
|
||||
*/
|
||||
public interface CuPersonalGoalsDetailMapper extends BaseMapper<CuPersonalGoalsDetail> {
|
||||
|
||||
|
|
|
@ -1,16 +1,10 @@
|
|||
package com.hzs.member.goals.mapper;
|
||||
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.hzs.common.domain.member.goals.CuPersonalGoalsMeeting;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 个人目标会议信息 Mapper 接口
|
||||
* </p>
|
||||
*
|
||||
* @author hzs
|
||||
* @since 2023-05-16
|
||||
*/
|
||||
public interface CuPersonalGoalsMeetingMapper extends BaseMapper<CuPersonalGoalsMeeting> {
|
||||
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
package com.hzs.member.goals.mapper;
|
||||
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.hzs.common.domain.member.goals.CuPersonalGoalsMonthRecord;
|
||||
import com.hzs.member.goals.param.CuPersonalGoalsParam;
|
||||
|
@ -11,14 +10,10 @@ import com.hzs.member.goals.vo.CuPersonalGoalsRowDetailVO;
|
|||
import java.util.List;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* Mapper 接口
|
||||
* </p>
|
||||
*
|
||||
* @author hzs
|
||||
* @since 2023-05-19
|
||||
*/
|
||||
public interface CuPersonalGoalsMonthRecordMapper extends BaseMapper<CuPersonalGoalsMonthRecord> {
|
||||
|
||||
/**
|
||||
* 查询季目标
|
||||
*
|
||||
|
@ -27,7 +22,6 @@ public interface CuPersonalGoalsMonthRecordMapper extends BaseMapper<CuPersonalG
|
|||
*/
|
||||
CuPersonalGoalsRowDetailVO selectGoalsSeason(CuPersonalGoalsParam cuPersonalGoalsVOParam);
|
||||
|
||||
|
||||
/**
|
||||
* 查询年目标
|
||||
*
|
||||
|
@ -36,7 +30,6 @@ public interface CuPersonalGoalsMonthRecordMapper extends BaseMapper<CuPersonalG
|
|||
*/
|
||||
List<CuPersonalGoalsMonthDetailVO> selectGoalsMonth(CuPersonalGoalsParam cuPersonalGoalsVOParam);
|
||||
|
||||
|
||||
/**
|
||||
* 查询季、年目标实际达成值
|
||||
*
|
||||
|
|
|
@ -1,20 +1,13 @@
|
|||
package com.hzs.member.goals.mapper;
|
||||
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.hzs.common.domain.member.goals.CuPersonalGoalsWeekRecord;
|
||||
import com.hzs.member.goals.param.CuPersonalGoalsParam;
|
||||
import com.hzs.member.goals.vo.CuPersonalGoalsClassifyVO;
|
||||
import com.hzs.member.goals.vo.CuPersonalGoalsRowDetailVO;
|
||||
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 个人目标历史记录表 Mapper 接口
|
||||
* </p>
|
||||
*
|
||||
* @author hzs
|
||||
* @since 2023-05-19
|
||||
*/
|
||||
public interface CuPersonalGoalsWeekRecordMapper extends BaseMapper<CuPersonalGoalsWeekRecord> {
|
||||
|
||||
|
|
|
@ -1,20 +1,15 @@
|
|||
package com.hzs.member.goals.service;
|
||||
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.hzs.common.domain.member.goals.CuPersonalGoalsClassify;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 个人目标分类 服务类
|
||||
* </p>
|
||||
*
|
||||
* @author hzs
|
||||
* @since 2023-05-17
|
||||
*/
|
||||
public interface ICuPersonalGoalsClassifyService extends IService<CuPersonalGoalsClassify> {
|
||||
|
||||
/**
|
||||
* 根据目标基础ID查询分类信息
|
||||
*
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
package com.hzs.member.goals.service;
|
||||
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.hzs.common.domain.member.goals.CuPersonalGoalsDetail;
|
||||
import com.hzs.member.goals.vo.CuPersonalGoalsRowDetailVO;
|
||||
|
@ -8,14 +7,10 @@ import com.hzs.member.goals.vo.CuPersonalGoalsRowDetailVO;
|
|||
import java.util.List;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 个人目标详情 服务类
|
||||
* </p>
|
||||
*
|
||||
* @author hzs
|
||||
* @since 2023-05-16
|
||||
*/
|
||||
public interface ICuPersonalGoalsDetailService extends IService<CuPersonalGoalsDetail> {
|
||||
|
||||
/**
|
||||
* 根据分类ID查询详情
|
||||
*
|
||||
|
@ -24,11 +19,10 @@ public interface ICuPersonalGoalsDetailService extends IService<CuPersonalGoalsD
|
|||
*/
|
||||
List<CuPersonalGoalsDetail> selectDetailByClassifyId(Long pkClassify);
|
||||
|
||||
|
||||
/**
|
||||
* 根据分类ID查询行显示详情
|
||||
*
|
||||
* @param pkClassify 分类ID
|
||||
* @param pkClassify 分类ID
|
||||
* @param classifyType 分类类型
|
||||
* @return List<CuPersonalGoalsDetail>
|
||||
*/
|
||||
|
|
|
@ -1,18 +1,12 @@
|
|||
package com.hzs.member.goals.service;
|
||||
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.hzs.common.domain.member.goals.CuPersonalGoalsMeeting;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 个人目标会议信息 服务类
|
||||
* </p>
|
||||
*
|
||||
* @author hzs
|
||||
* @since 2023-05-16
|
||||
*/
|
||||
public interface ICuPersonalGoalsMeetingService extends IService<CuPersonalGoalsMeeting> {
|
||||
|
||||
|
|
|
@ -1,23 +1,16 @@
|
|||
package com.hzs.member.goals.service;
|
||||
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.hzs.common.domain.member.goals.CuPersonalGoalsMonthRecord;
|
||||
import com.hzs.member.goals.param.CuPersonalGoalsParam;
|
||||
import com.hzs.member.goals.vo.CuPersonalGoalsClassifyVO;
|
||||
import com.hzs.member.goals.vo.CuPersonalGoalsDetailVO;
|
||||
import com.hzs.member.goals.vo.CuPersonalGoalsMonthDetailVO;
|
||||
import com.hzs.member.goals.vo.CuPersonalGoalsRowDetailVO;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 服务类
|
||||
* </p>
|
||||
*
|
||||
* @author hzs
|
||||
* @since 2023-05-19
|
||||
* 服务类
|
||||
*/
|
||||
public interface ICuPersonalGoalsMonthRecordService extends IService<CuPersonalGoalsMonthRecord> {
|
||||
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
package com.hzs.member.goals.service;
|
||||
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.hzs.common.domain.member.goals.CuPersonalGoals;
|
||||
import com.hzs.member.goals.param.CuPersonalGoalsParam;
|
||||
|
@ -10,12 +9,7 @@ import com.hzs.member.goals.vo.CuPersonalGoalsVO;
|
|||
import java.util.List;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 个人目标 服务类
|
||||
* </p>
|
||||
*
|
||||
* @author hzs
|
||||
* @since 2023-05-16
|
||||
*/
|
||||
public interface ICuPersonalGoalsService extends IService<CuPersonalGoals> {
|
||||
|
||||
|
@ -61,13 +55,4 @@ public interface ICuPersonalGoalsService extends IService<CuPersonalGoals> {
|
|||
*/
|
||||
CuPersonalGoalsVO showGoalsDetail(CuPersonalGoalsParam goalsParam);
|
||||
|
||||
/**
|
||||
* 插入个人目标周历史记录表
|
||||
*/
|
||||
void saveGoalsWeekRecord();
|
||||
|
||||
/**
|
||||
* 插入个人目标月历史记录表(每月月初执行)
|
||||
*/
|
||||
void saveGoalsMonthRecord();
|
||||
}
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
package com.hzs.member.goals.service;
|
||||
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.hzs.common.domain.member.goals.CuPersonalGoalsWeekRecord;
|
||||
import com.hzs.member.goals.param.CuPersonalGoalsParam;
|
||||
|
@ -8,12 +7,7 @@ import com.hzs.member.goals.vo.CuPersonalGoalsClassifyVO;
|
|||
import com.hzs.member.goals.vo.CuPersonalGoalsRowDetailVO;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 个人目标历史记录表 服务类
|
||||
* </p>
|
||||
*
|
||||
* @author hzs
|
||||
* @since 2023-05-19
|
||||
*/
|
||||
public interface ICuPersonalGoalsWeekRecordService extends IService<CuPersonalGoalsWeekRecord> {
|
||||
|
||||
|
@ -25,7 +19,6 @@ public interface ICuPersonalGoalsWeekRecordService extends IService<CuPersonalGo
|
|||
*/
|
||||
CuPersonalGoalsRowDetailVO selectWeekGoals(CuPersonalGoalsParam cuPersonalGoalsVOParam);
|
||||
|
||||
|
||||
/**
|
||||
* 查询周目标实际达成值
|
||||
*
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
package com.hzs.member.goals.service.impl;
|
||||
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.hzs.common.domain.member.goals.CuPersonalGoalsClassify;
|
||||
import com.hzs.member.goals.mapper.CuPersonalGoalsClassifyMapper;
|
||||
|
@ -10,26 +9,20 @@ import org.springframework.stereotype.Service;
|
|||
|
||||
import java.util.List;
|
||||
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 个人目标分类 服务实现类
|
||||
* </p>
|
||||
*
|
||||
* @author hzs
|
||||
* @since 2023-05-17
|
||||
*/
|
||||
@Service
|
||||
public class CuPersonalGoalsClassifyServiceImpl extends ServiceImpl<CuPersonalGoalsClassifyMapper, CuPersonalGoalsClassify> implements ICuPersonalGoalsClassifyService {
|
||||
|
||||
|
||||
@Override
|
||||
public List<CuPersonalGoalsClassify> selectGoalsClassify(Long pkGoals, Integer goalClassify) {
|
||||
QueryWrapper<CuPersonalGoalsClassify> queryWrapper = new QueryWrapper<>();
|
||||
queryWrapper.eq("PK_GOALS", pkGoals);
|
||||
LambdaQueryWrapper<CuPersonalGoalsClassify> queryWrapper = new LambdaQueryWrapper<>();
|
||||
queryWrapper.eq(CuPersonalGoalsClassify::getPkGoals, pkGoals);
|
||||
if (null != goalClassify) {
|
||||
queryWrapper.eq("goal_classify", goalClassify);
|
||||
queryWrapper.eq(CuPersonalGoalsClassify::getGoalClassify, goalClassify);
|
||||
}
|
||||
return baseMapper.selectList(queryWrapper);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
package com.hzs.member.goals.service.impl;
|
||||
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.hzs.common.domain.member.goals.CuPersonalGoalsDetail;
|
||||
import com.hzs.member.goals.mapper.CuPersonalGoalsDetailMapper;
|
||||
|
@ -12,24 +11,18 @@ import org.springframework.stereotype.Service;
|
|||
import java.util.List;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 个人目标详情 服务实现类
|
||||
* </p>
|
||||
*
|
||||
* @author hzs
|
||||
* @since 2023-05-16
|
||||
*/
|
||||
@Service
|
||||
public class CuPersonalGoalsDetailServiceImpl extends ServiceImpl<CuPersonalGoalsDetailMapper, CuPersonalGoalsDetail> implements ICuPersonalGoalsDetailService {
|
||||
|
||||
@Override
|
||||
public List<CuPersonalGoalsDetail> selectDetailByClassifyId(Long pkClassify) {
|
||||
QueryWrapper<CuPersonalGoalsDetail> queryWrapper = new QueryWrapper<>();
|
||||
queryWrapper.eq("PK_CLASSIFY", pkClassify);
|
||||
LambdaQueryWrapper<CuPersonalGoalsDetail> queryWrapper = new LambdaQueryWrapper<>();
|
||||
queryWrapper.eq(CuPersonalGoalsDetail::getPkClassify, pkClassify);
|
||||
return baseMapper.selectList(queryWrapper);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public CuPersonalGoalsRowDetailVO selectRowDetailByClassifyId(Long pkClassify, Integer classifyType) {
|
||||
return baseMapper.selectRowDetailByClassifyId(pkClassify, classifyType);
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
package com.hzs.member.goals.service.impl;
|
||||
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.hzs.common.domain.member.goals.CuPersonalGoalsMeeting;
|
||||
import com.hzs.member.goals.mapper.CuPersonalGoalsMeetingMapper;
|
||||
|
@ -11,21 +10,15 @@ import org.springframework.stereotype.Service;
|
|||
import java.util.List;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 个人目标会议信息 服务实现类
|
||||
* </p>
|
||||
*
|
||||
* @author hzs
|
||||
* @since 2023-05-16
|
||||
*/
|
||||
@Service
|
||||
public class CuPersonalGoalsMeetingServiceImpl extends ServiceImpl<CuPersonalGoalsMeetingMapper, CuPersonalGoalsMeeting> implements ICuPersonalGoalsMeetingService {
|
||||
|
||||
|
||||
@Override
|
||||
public List<CuPersonalGoalsMeeting> selectMeetingByClassifyId(Long pkClassify) {
|
||||
QueryWrapper<CuPersonalGoalsMeeting> queryWrapper = new QueryWrapper<>();
|
||||
queryWrapper.eq("PK_CLASSIFY", pkClassify);
|
||||
LambdaQueryWrapper<CuPersonalGoalsMeeting> queryWrapper = new LambdaQueryWrapper<>();
|
||||
queryWrapper.eq(CuPersonalGoalsMeeting::getPkClassify, pkClassify);
|
||||
return baseMapper.selectList(queryWrapper);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
package com.hzs.member.goals.service.impl;
|
||||
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.hzs.common.domain.member.goals.CuPersonalGoalsMonthRecord;
|
||||
import com.hzs.member.goals.mapper.CuPersonalGoalsMonthRecordMapper;
|
||||
|
@ -14,12 +13,7 @@ import org.springframework.stereotype.Service;
|
|||
import java.util.List;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 服务实现类
|
||||
* </p>
|
||||
*
|
||||
* @author hzs
|
||||
* @since 2023-05-19
|
||||
*/
|
||||
@Service
|
||||
public class CuPersonalGoalsMonthRecordServiceImpl extends ServiceImpl<CuPersonalGoalsMonthRecordMapper, CuPersonalGoalsMonthRecord> implements ICuPersonalGoalsMonthRecordService {
|
||||
|
@ -29,16 +23,14 @@ public class CuPersonalGoalsMonthRecordServiceImpl extends ServiceImpl<CuPersona
|
|||
return baseMapper.selectGoalsSeason(cuPersonalGoalsVOParam);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public List<CuPersonalGoalsMonthDetailVO> selectGoalsMonth(CuPersonalGoalsParam cuPersonalGoalsVOParam) {
|
||||
return baseMapper.selectGoalsMonth(cuPersonalGoalsVOParam);
|
||||
}
|
||||
|
||||
@Override
|
||||
public CuPersonalGoalsClassifyVO selectGoalsSeasonCount(CuPersonalGoalsParam cuPersonalGoalsVOParam){
|
||||
public CuPersonalGoalsClassifyVO selectGoalsSeasonCount(CuPersonalGoalsParam cuPersonalGoalsVOParam) {
|
||||
return baseMapper.selectGoalsSeasonCount(cuPersonalGoalsVOParam);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
|
|
@ -1,12 +1,10 @@
|
|||
package com.hzs.member.goals.service.impl;
|
||||
|
||||
|
||||
import cn.hutool.core.bean.BeanUtil;
|
||||
import cn.hutool.core.collection.CollUtil;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.hzs.common.core.constant.CountryConstants;
|
||||
import com.hzs.common.core.constant.MagicNumberConstants;
|
||||
import com.hzs.common.core.constant.MemberFieldConstants;
|
||||
import com.hzs.common.core.enums.EGoalClassify;
|
||||
import com.hzs.common.core.enums.EGoalType;
|
||||
|
@ -40,43 +38,28 @@ import java.util.Map;
|
|||
import java.util.stream.Collectors;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 个人目标 服务实现类
|
||||
* </p>
|
||||
*
|
||||
* @author hzs
|
||||
* @since 2023-05-16
|
||||
*/
|
||||
@Service
|
||||
public class CuPersonalGoalsServiceImpl extends ServiceImpl<CuPersonalGoalsMapper, CuPersonalGoals> implements ICuPersonalGoalsService {
|
||||
|
||||
|
||||
@Autowired
|
||||
private ICuPersonalGoalsClassifyService iCuPersonalGoalsClassifyService;
|
||||
|
||||
@Autowired
|
||||
private ICuPersonalGoalsDetailService iCuPersonalGoalsDetailService;
|
||||
|
||||
@Autowired
|
||||
private ICuPersonalGoalsMeetingService iCuPersonalGoalsMeetingService;
|
||||
|
||||
@Autowired
|
||||
private ICuPersonalGoalsWeekRecordService iCuPersonalGoalsRecordService;
|
||||
|
||||
@Autowired
|
||||
private ICuPersonalGoalsMonthRecordService iCuPersonalGoalsMonthRecordService;
|
||||
|
||||
@Autowired
|
||||
private ICuPersonalGoalsWeekRecordService iCuPersonalGoalsWeekRecordService;
|
||||
|
||||
@DubboReference
|
||||
private ISaOrderServiceApi iSaOrderServiceApi;
|
||||
|
||||
ISaOrderServiceApi iSaOrderServiceApi;
|
||||
@DubboReference
|
||||
private IAreaServiceApi iAreaServiceApi;
|
||||
|
||||
IAreaServiceApi iAreaServiceApi;
|
||||
@DubboReference
|
||||
private ICurrencyServiceApi iCurrencyServiceApi;
|
||||
ICurrencyServiceApi iCurrencyServiceApi;
|
||||
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
|
@ -163,7 +146,6 @@ public class CuPersonalGoalsServiceImpl extends ServiceImpl<CuPersonalGoalsMappe
|
|||
return result;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public List<CuPersonalGoalsListVO> showGoalsList(CuPersonalGoalsParam goalsParam) {
|
||||
List<CuPersonalGoalsListVO> cuPersonalGoalsListVOList = baseMapper.showGoalsList(goalsParam);
|
||||
|
@ -182,13 +164,11 @@ public class CuPersonalGoalsServiceImpl extends ServiceImpl<CuPersonalGoalsMappe
|
|||
return cuPersonalGoalsListVOList;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public List<CuPersonalGoalsListVO> showGoalsListByRatio(CuPersonalGoalsParam goalsParam) {
|
||||
return baseMapper.showGoalsListByRatio(goalsParam);
|
||||
}
|
||||
|
||||
|
||||
private void setRatio(CuPersonalGoalsListVO goalsListVO, CuPersonalGoalsClassifyVO goalsClassifyVO) {
|
||||
if (null != goalsClassifyVO) {
|
||||
BigDecimal totalAchieve = goalsListVO.getTotalAchieve();
|
||||
|
@ -241,7 +221,6 @@ public class CuPersonalGoalsServiceImpl extends ServiceImpl<CuPersonalGoalsMappe
|
|||
}
|
||||
classifyVO.setGoalsMeetingVOList(cuPersonalGoalsMeetingVOList);
|
||||
}
|
||||
|
||||
goalsClassifyVOList.add(classifyVO);
|
||||
}
|
||||
}
|
||||
|
@ -263,7 +242,7 @@ public class CuPersonalGoalsServiceImpl extends ServiceImpl<CuPersonalGoalsMappe
|
|||
if (CollUtil.isNotEmpty(cuPersonalGoalsClassifyList)) {
|
||||
//汇率
|
||||
BigDecimal exchange = new BigDecimal("1");
|
||||
if(pkCountry.equals(CountryConstants.CHINA_COUNTRY)){
|
||||
if (pkCountry.equals(CountryConstants.CHINA_COUNTRY)) {
|
||||
CurrencyDTO currencyDTO = iCurrencyServiceApi.getCurrency(pkCountry).getData();
|
||||
exchange = currencyDTO.getInExchangeRate();
|
||||
}
|
||||
|
@ -298,7 +277,6 @@ public class CuPersonalGoalsServiceImpl extends ServiceImpl<CuPersonalGoalsMappe
|
|||
return cuPersonalGoalsVO;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 处理地址(省、市、县)
|
||||
*
|
||||
|
@ -369,7 +347,6 @@ public class CuPersonalGoalsServiceImpl extends ServiceImpl<CuPersonalGoalsMappe
|
|||
goalsRowDetailVOList.add(quarterRation);
|
||||
}
|
||||
}
|
||||
|
||||
classifyVO.setGoalsRowDetailVOList(goalsRowDetailVOList);
|
||||
} else {
|
||||
//详情信息
|
||||
|
@ -381,7 +358,6 @@ public class CuPersonalGoalsServiceImpl extends ServiceImpl<CuPersonalGoalsMappe
|
|||
List<CuPersonalGoalsMonthDetailVO> yearRationRation = getYearRation(monthDetailVOList, realYearGoals, classifyVO);
|
||||
classifyVO.setMonthDetailVOList(yearRationRation);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -430,8 +406,6 @@ public class CuPersonalGoalsServiceImpl extends ServiceImpl<CuPersonalGoalsMappe
|
|||
break;
|
||||
}
|
||||
if (cycleKey.equals(MemberFieldConstants.RIGHT_PERIOD_VALUE + i)) {
|
||||
// String CycleKey = MemberFieldConstants.LEFT_PERIOD_VALUE + i;
|
||||
// monthDetailVO = monthDetailVOList.stream().filter(detail -> detail.getCycleKey().equals(CycleKey)).findFirst().get();
|
||||
monthDetailVO.setRightCycleKey(MemberFieldConstants.RIGHT_PERIOD_VALUE + i);
|
||||
BigDecimal rightAchieve = goalsDetail.getCycleValue();
|
||||
monthDetailVO.setRightAchieve(rightAchieve);
|
||||
|
@ -462,7 +436,6 @@ public class CuPersonalGoalsServiceImpl extends ServiceImpl<CuPersonalGoalsMappe
|
|||
return realGoalsRowDetailVO;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 获取季的真实目标业绩
|
||||
*
|
||||
|
@ -477,7 +450,6 @@ public class CuPersonalGoalsServiceImpl extends ServiceImpl<CuPersonalGoalsMappe
|
|||
return realGoalsRowDetailVOS;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 获取季的真实目标业绩
|
||||
*
|
||||
|
@ -566,13 +538,11 @@ public class CuPersonalGoalsServiceImpl extends ServiceImpl<CuPersonalGoalsMappe
|
|||
classifyVO.setTotalRatio(totalRation);
|
||||
}
|
||||
return rationGoalsDetail;
|
||||
|
||||
}
|
||||
|
||||
|
||||
private BigDecimal getBigDecimalValue(BigDecimal value) {
|
||||
return null == value ? BigDecimal.ZERO : value;
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -635,7 +605,6 @@ public class CuPersonalGoalsServiceImpl extends ServiceImpl<CuPersonalGoalsMappe
|
|||
return configYearGoalsList;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 根据当前时间 获取在第几周、开始时间、结束时间
|
||||
*
|
||||
|
@ -669,7 +638,6 @@ public class CuPersonalGoalsServiceImpl extends ServiceImpl<CuPersonalGoalsMappe
|
|||
return null;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 根据当前时间 获取第几季、开始时间、结束时间
|
||||
*
|
||||
|
@ -765,12 +733,10 @@ public class CuPersonalGoalsServiceImpl extends ServiceImpl<CuPersonalGoalsMappe
|
|||
BigDecimal superStudio = iSaOrderServiceApi.selectSuperStudio(orderGoals).getData();
|
||||
ReflectUtils.invokeSetter(goalsRowDetailVO, MemberFieldConstants.PERIOD_VALUE + weekNumb, superStudio);
|
||||
}
|
||||
|
||||
}
|
||||
return goalsRowDetailVO;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 数据库查询当前周的个人目标
|
||||
*
|
||||
|
@ -914,10 +880,8 @@ public class CuPersonalGoalsServiceImpl extends ServiceImpl<CuPersonalGoalsMappe
|
|||
BigDecimal superStudio = iSaOrderServiceApi.selectSuperStudio(orderGoals).getData();
|
||||
detailVO.setLeftAchieve(superStudio);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 根据会员ID和类型查询目标的基础信息
|
||||
*
|
||||
|
@ -945,274 +909,4 @@ public class CuPersonalGoalsServiceImpl extends ServiceImpl<CuPersonalGoalsMappe
|
|||
return baseMapper.selectOne(queryWrapper);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 插入个人目标月历史记录表(每月月初执行)
|
||||
*/
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
@Override
|
||||
public void saveGoalsMonthRecord() {
|
||||
OrderGoalsDTO orderGoalsDTO;
|
||||
LocalDate localDate = LocalDate.now();
|
||||
//当前月份第一天
|
||||
LocalDate firstMonthDay = localDate.with(TemporalAdjusters.firstDayOfMonth());
|
||||
// 获取下个月第一天
|
||||
LocalDate firstDayOfNextMonth = localDate.with(TemporalAdjusters.firstDayOfNextMonth());
|
||||
//月度个人目标基础信息
|
||||
List<CuPersonalGoals> cuPersonalGoalsList = baseMapper.selectGoals(EGoalType.SEASON.getValue());
|
||||
if (CollUtil.isNotEmpty(cuPersonalGoalsList)) {
|
||||
for (CuPersonalGoals cuPersonalGoals : cuPersonalGoalsList) {
|
||||
orderGoalsDTO = OrderGoalsDTO.builder().pkMember(cuPersonalGoals.getPkMember())
|
||||
.pkCountry(cuPersonalGoals.getPkCountry())
|
||||
.startDate(firstMonthDay.format(DateTimeFormatter.ofPattern("yyyy-MM-dd")))
|
||||
.endDate(firstDayOfNextMonth.format(DateTimeFormatter.ofPattern("yyyy-MM-dd")))
|
||||
.build();
|
||||
callMonthService(orderGoalsDTO);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 调用dubbo服务查询月数据
|
||||
*
|
||||
* @param orderGoals 订单目标参数
|
||||
* @return Boolean
|
||||
*/
|
||||
private Boolean callMonthService(OrderGoalsDTO orderGoals) {
|
||||
CuPersonalGoalsMonthRecord personalGoalsRecord;
|
||||
List<CuPersonalGoalsMonthRecord> personalGoalsRecordList = new ArrayList<>();
|
||||
Integer pkCountry = orderGoals.getPkCountry();
|
||||
Long pkMember = orderGoals.getPkMember();
|
||||
//查询团队业绩(伞下推荐)
|
||||
BigDecimal recommendAchieve = iSaOrderServiceApi.selectRecommendAchieve(orderGoals).getData();
|
||||
personalGoalsRecord = getCuPersonalGoalsMonthRecord(EGoalClassify.TEAM.getValue(), recommendAchieve, null, pkCountry, pkMember);
|
||||
personalGoalsRecord.setTotalAchieve(recommendAchieve);
|
||||
personalGoalsRecordList.add(personalGoalsRecord);
|
||||
//查询安置业绩
|
||||
orderGoals.setPlaceDept(1);
|
||||
BigDecimal leftPlaceAchieve = iSaOrderServiceApi.selectPlaceAchieve(orderGoals).getData();
|
||||
orderGoals.setPlaceDept(2);
|
||||
BigDecimal rightPlaceAchieve = iSaOrderServiceApi.selectPlaceAchieve(orderGoals).getData();
|
||||
personalGoalsRecord = getCuPersonalGoalsMonthRecord(EGoalClassify.PLACEMENT.getValue(), leftPlaceAchieve, rightPlaceAchieve, pkCountry, pkMember);
|
||||
personalGoalsRecordList.add(personalGoalsRecord);
|
||||
//查询团队业绩(个人直推)
|
||||
BigDecimal directPushAchieve = iSaOrderServiceApi.selectDirectPushAchieve(orderGoals).getData();
|
||||
personalGoalsRecord = getCuPersonalGoalsMonthRecord(EGoalClassify.RECOMMEND.getValue(), recommendAchieve, null, pkCountry, pkMember);
|
||||
personalGoalsRecord.setTotalAchieve(directPushAchieve);
|
||||
personalGoalsRecordList.add(personalGoalsRecord);
|
||||
//查询推荐人数
|
||||
Integer recommendNumber = iSaOrderServiceApi.selectRecommendNumber(orderGoals).getData();
|
||||
personalGoalsRecord = getCuPersonalGoalsMonthRecord(EGoalClassify.RECOMMEND_NUMBER.getValue(), new BigDecimal(recommendNumber.toString()), null, pkCountry, pkMember);
|
||||
personalGoalsRecordList.add(personalGoalsRecord);
|
||||
//创客空间
|
||||
Integer makerSpace = iSaOrderServiceApi.selectMakerSpace(orderGoals).getData();
|
||||
personalGoalsRecord = getCuPersonalGoalsMonthRecord(EGoalClassify.MAKER_SPACE.getValue(), new BigDecimal(makerSpace.toString()), null, pkCountry, pkMember);
|
||||
personalGoalsRecordList.add(personalGoalsRecord);
|
||||
//超级工作室
|
||||
BigDecimal superStudio = iSaOrderServiceApi.selectSuperStudio(orderGoals).getData();
|
||||
personalGoalsRecord = getCuPersonalGoalsMonthRecord(EGoalClassify.SUPER_TUDIO.getValue(), superStudio, null, pkCountry, pkMember);
|
||||
personalGoalsRecordList.add(personalGoalsRecord);
|
||||
return iCuPersonalGoalsMonthRecordService.saveBatch(personalGoalsRecordList);
|
||||
}
|
||||
|
||||
/**
|
||||
* 个人目标月历史记录表
|
||||
*
|
||||
* @param goalClassify 目标分类 2:安置 3:推荐 4:推荐人数 7:创客空间 8:超级工作室
|
||||
* @param totalAchieve 总业绩(左区总业绩) 单位万
|
||||
* @param rightAchieve 右区总业绩 单位万
|
||||
* @return CuPersonalGoalsRecord
|
||||
*/
|
||||
private CuPersonalGoalsMonthRecord getCuPersonalGoalsMonthRecord(Integer goalClassify, BigDecimal totalAchieve, BigDecimal rightAchieve, Integer pkCountry, Long pkMember) {
|
||||
//当月
|
||||
String month = LocalDate.now().format(DateTimeFormatter.ofPattern("yyyy-MM"));
|
||||
CuPersonalGoalsMonthRecord monthRecord = CuPersonalGoalsMonthRecord.builder().month(month).goalClassify(goalClassify).totalAchieve(totalAchieve).rightAchieve(rightAchieve).build();
|
||||
monthRecord.setPkCountry(pkCountry);
|
||||
monthRecord.setPkMember(pkMember);
|
||||
monthRecord.setPkCreator(MagicNumberConstants.PK_ADMIN);
|
||||
return monthRecord;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 插入个人目标周历史记录表
|
||||
*/
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
@Override
|
||||
public void saveGoalsWeekRecord() {
|
||||
OrderGoalsDTO orderGoalsDTO;
|
||||
LocalDate localDate = LocalDate.now();
|
||||
//当前月份第一天
|
||||
LocalDate firstMonthDay = localDate.with(TemporalAdjusters.firstDayOfMonth());
|
||||
// 获取下个月第一天
|
||||
LocalDate firstDayOfNextMonth = localDate.with(TemporalAdjusters.firstDayOfNextMonth());
|
||||
//第一周的周末
|
||||
LocalDate firstMonth = firstMonthDay.plusWeeks(1);
|
||||
//第二周的周末
|
||||
LocalDate secondMonth = firstMonthDay.plusWeeks(2);
|
||||
//第三周的周末
|
||||
LocalDate thirdMonth = firstMonthDay.plusWeeks(3);
|
||||
//月度个人目标基础信息
|
||||
List<CuPersonalGoals> cuPersonalGoalsList = baseMapper.selectGoals(EGoalType.MONTH.getValue());
|
||||
if (CollUtil.isNotEmpty(cuPersonalGoalsList)) {
|
||||
for (CuPersonalGoals cuPersonalGoals : cuPersonalGoalsList) {
|
||||
if (localDate.isEqual(firstMonthDay)) {
|
||||
orderGoalsDTO = OrderGoalsDTO.builder().pkMember(cuPersonalGoals.getPkMember())
|
||||
.pkCountry(cuPersonalGoals.getPkCountry())
|
||||
.startDate(firstMonthDay.format(DateTimeFormatter.ofPattern("yyyy-MM-dd")))
|
||||
.endDate(firstMonth.format(DateTimeFormatter.ofPattern("yyyy-MM-dd")))
|
||||
.build();
|
||||
callWeekService(orderGoalsDTO, 1);
|
||||
}
|
||||
if (localDate.isEqual(firstMonth)) {
|
||||
orderGoalsDTO = OrderGoalsDTO.builder().pkMember(cuPersonalGoals.getPkMember())
|
||||
.pkCountry(cuPersonalGoals.getPkCountry())
|
||||
.startDate(firstMonth.format(DateTimeFormatter.ofPattern("yyyy-MM-dd")))
|
||||
.endDate(secondMonth.format(DateTimeFormatter.ofPattern("yyyy-MM-dd")))
|
||||
.build();
|
||||
callWeekService(orderGoalsDTO, 2);
|
||||
}
|
||||
|
||||
if (localDate.isEqual(secondMonth)) {
|
||||
orderGoalsDTO = OrderGoalsDTO.builder().pkMember(cuPersonalGoals.getPkMember())
|
||||
.pkCountry(cuPersonalGoals.getPkCountry())
|
||||
.startDate(secondMonth.format(DateTimeFormatter.ofPattern("yyyy-MM-dd")))
|
||||
.endDate(thirdMonth.format(DateTimeFormatter.ofPattern("yyyy-MM-dd")))
|
||||
.build();
|
||||
callWeekService(orderGoalsDTO, 3);
|
||||
}
|
||||
if (localDate.isEqual(thirdMonth)) {
|
||||
orderGoalsDTO = OrderGoalsDTO.builder().pkMember(cuPersonalGoals.getPkMember())
|
||||
.pkCountry(cuPersonalGoals.getPkCountry())
|
||||
.startDate(thirdMonth.format(DateTimeFormatter.ofPattern("yyyy-MM-dd")))
|
||||
.endDate(firstDayOfNextMonth.format(DateTimeFormatter.ofPattern("yyyy-MM-dd")))
|
||||
.build();
|
||||
callWeekService(orderGoalsDTO, 4);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 调用dubbo服务查询周数据
|
||||
*
|
||||
* @param orderGoals 订单目标参数
|
||||
* @param weekNumber 周数
|
||||
* @return Boolean
|
||||
*/
|
||||
private Boolean callWeekService(OrderGoalsDTO orderGoals, Integer weekNumber) {
|
||||
String startDate = orderGoals.getStartDate();
|
||||
String endDate = orderGoals.getEndDate();
|
||||
|
||||
CuPersonalGoalsWeekRecord personalGoalsRecord;
|
||||
List<CuPersonalGoalsWeekRecord> personalGoalsRecordList = new ArrayList<>();
|
||||
Integer pkCountry = orderGoals.getPkCountry();
|
||||
Long pkMember = orderGoals.getPkMember();
|
||||
//当月
|
||||
String month = LocalDate.now().format(DateTimeFormatter.ofPattern("yyyy-MM"));
|
||||
//查询团队业绩(伞下)
|
||||
BigDecimal recommendAchieve = iSaOrderServiceApi.selectRecommendAchieve(orderGoals).getData();
|
||||
personalGoalsRecord = getCuPersonalGoalsRecord(weekNumber, startDate, endDate, month, pkMember);
|
||||
personalGoalsRecord.setGoalClassify(EGoalClassify.TEAM.getValue());
|
||||
personalGoalsRecord.setTotalAchieve(recommendAchieve);
|
||||
personalGoalsRecord.setPkCountry(pkCountry);
|
||||
personalGoalsRecord.setPkCreator(MagicNumberConstants.PK_ADMIN);
|
||||
personalGoalsRecordList.add(personalGoalsRecord);
|
||||
|
||||
//查询安置业绩
|
||||
orderGoals.setPlaceDept(1);
|
||||
BigDecimal leftPlaceAchieve = iSaOrderServiceApi.selectPlaceAchieve(orderGoals).getData();
|
||||
orderGoals.setPlaceDept(2);
|
||||
BigDecimal rightPlaceAchieve = iSaOrderServiceApi.selectPlaceAchieve(orderGoals).getData();
|
||||
personalGoalsRecord = getCuPersonalGoalsRecord(weekNumber, startDate, endDate, month, pkMember);
|
||||
personalGoalsRecord.setGoalClassify(EGoalClassify.PLACEMENT.getValue());
|
||||
personalGoalsRecord.setTotalAchieve(leftPlaceAchieve);
|
||||
personalGoalsRecord.setRightAchieve(rightPlaceAchieve);
|
||||
personalGoalsRecord.setPkCountry(pkCountry);
|
||||
personalGoalsRecord.setPkCreator(MagicNumberConstants.PK_ADMIN);
|
||||
personalGoalsRecordList.add(personalGoalsRecord);
|
||||
|
||||
//查询团队业绩(个人直推)
|
||||
BigDecimal directPushAchieve = iSaOrderServiceApi.selectDirectPushAchieve(orderGoals).getData();
|
||||
personalGoalsRecord = getCuPersonalGoalsRecord(weekNumber, startDate, endDate, month, pkMember);
|
||||
personalGoalsRecord.setGoalClassify(EGoalClassify.RECOMMEND.getValue());
|
||||
personalGoalsRecord.setTotalAchieve(directPushAchieve);
|
||||
personalGoalsRecord.setPkCountry(pkCountry);
|
||||
personalGoalsRecord.setPkCreator(MagicNumberConstants.PK_ADMIN);
|
||||
personalGoalsRecordList.add(personalGoalsRecord);
|
||||
//查询推荐人数
|
||||
Integer recommendNumber = iSaOrderServiceApi.selectRecommendNumber(orderGoals).getData();
|
||||
personalGoalsRecord = getCuPersonalGoalsRecord(weekNumber, startDate, endDate, month, pkMember);
|
||||
personalGoalsRecord.setGoalClassify(EGoalClassify.RECOMMEND_NUMBER.getValue());
|
||||
personalGoalsRecord.setTotalAchieve(new BigDecimal(recommendNumber.toString()));
|
||||
personalGoalsRecord.setPkCountry(pkCountry);
|
||||
personalGoalsRecord.setPkCreator(MagicNumberConstants.PK_ADMIN);
|
||||
personalGoalsRecordList.add(personalGoalsRecord);
|
||||
//创客空间
|
||||
Integer makerSpace = iSaOrderServiceApi.selectMakerSpace(orderGoals).getData();
|
||||
personalGoalsRecord = getCuPersonalGoalsRecord(weekNumber, startDate, endDate, month, pkMember);
|
||||
personalGoalsRecord.setGoalClassify(EGoalClassify.MAKER_SPACE.getValue());
|
||||
personalGoalsRecord.setTotalAchieve(new BigDecimal(makerSpace.toString()));
|
||||
personalGoalsRecord.setPkCountry(pkCountry);
|
||||
personalGoalsRecord.setPkCreator(MagicNumberConstants.PK_ADMIN);
|
||||
personalGoalsRecordList.add(personalGoalsRecord);
|
||||
//超级工作室
|
||||
BigDecimal superStudio = iSaOrderServiceApi.selectSuperStudio(orderGoals).getData();
|
||||
personalGoalsRecord = getCuPersonalGoalsRecord(weekNumber, startDate, endDate, month, pkMember);
|
||||
personalGoalsRecord.setGoalClassify(EGoalClassify.SUPER_TUDIO.getValue());
|
||||
personalGoalsRecord.setTotalAchieve(superStudio);
|
||||
personalGoalsRecord.setPkCountry(pkCountry);
|
||||
personalGoalsRecord.setPkCreator(MagicNumberConstants.PK_ADMIN);
|
||||
personalGoalsRecordList.add(personalGoalsRecord);
|
||||
return iCuPersonalGoalsRecordService.saveBatch(personalGoalsRecordList);
|
||||
}
|
||||
|
||||
/**
|
||||
* 个人目标历史周记录表
|
||||
*
|
||||
* @param weekNumber 周数
|
||||
* @param startDate 开始时间
|
||||
* @param endDat 结束时间
|
||||
* @param month 月份
|
||||
* @return CuPersonalGoalsRecord
|
||||
*/
|
||||
private CuPersonalGoalsWeekRecord getCuPersonalGoalsRecord(Integer weekNumber, String startDate, String endDat, String month, Long pkMember) {
|
||||
return CuPersonalGoalsWeekRecord.builder().month(month).startDate(startDate).endDate(endDat).weekNumber(weekNumber).pkMember(pkMember).build();
|
||||
}
|
||||
|
||||
public static void main(String[] args) {
|
||||
|
||||
LocalDate localDate = LocalDate.now();
|
||||
//当前月份第一天
|
||||
LocalDate firstMonthDay = localDate.with(TemporalAdjusters.firstDayOfMonth());
|
||||
// 获取下个月第一天
|
||||
LocalDate firstDayOfNextMonth = localDate.with(TemporalAdjusters.firstDayOfNextMonth());
|
||||
//第一周的周末
|
||||
LocalDate firstMonth = firstMonthDay.plusWeeks(1);
|
||||
//第二周的周末
|
||||
LocalDate secondMonth = firstMonthDay.plusWeeks(2);
|
||||
//第三周的周末
|
||||
LocalDate thirdMonth = firstMonthDay.plusWeeks(3);
|
||||
if (localDate.isEqual(secondMonth)) {
|
||||
System.out.println("---------------------");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* 递归调用当前时间所在周的时间
|
||||
*
|
||||
* @param firstMonthDay 月初第一天
|
||||
* @return LocalDate
|
||||
*/
|
||||
private LocalDate getWeekend(LocalDate firstMonthDay) {
|
||||
LocalDate localDate = LocalDate.now();
|
||||
LocalDate week = firstMonthDay.plusWeeks(1);
|
||||
if (localDate.isBefore(week)) {
|
||||
return week;
|
||||
}
|
||||
return getWeekend(week);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
package com.hzs.member.goals.service.impl;
|
||||
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.hzs.common.domain.member.goals.CuPersonalGoalsWeekRecord;
|
||||
import com.hzs.member.goals.mapper.CuPersonalGoalsWeekRecordMapper;
|
||||
|
@ -11,12 +10,7 @@ import com.hzs.member.goals.vo.CuPersonalGoalsRowDetailVO;
|
|||
import org.springframework.stereotype.Service;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 个人目标历史记录表 服务实现类
|
||||
* </p>
|
||||
*
|
||||
* @author hzs
|
||||
* @since 2023-05-19
|
||||
*/
|
||||
@Service
|
||||
public class CuPersonalGoalsWeekRecordServiceImpl extends ServiceImpl<CuPersonalGoalsWeekRecordMapper, CuPersonalGoalsWeekRecord> implements ICuPersonalGoalsWeekRecordService {
|
||||
|
|
|
@ -10,17 +10,13 @@ import java.math.BigDecimal;
|
|||
|
||||
/**
|
||||
* 个人目标详情VO
|
||||
* @Description:
|
||||
* @Author: ljc
|
||||
* @Time: 2023/5/16 19:17
|
||||
* @Classname: CuPersonalGoalsDetailVO
|
||||
* @Package_name: com.hzs.member.goals.vo
|
||||
*/
|
||||
@Data
|
||||
@Builder
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
public class CuPersonalGoalsDetailVO implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 2267647230813681922L;
|
||||
|
||||
/**
|
||||
|
|
|
@ -340,7 +340,6 @@ public class CuBonusStatisController extends BaseController {
|
|||
@Log(module = EOperationModule.BONUS_DIAL_RATIO, business = EOperationBusiness.BONUS_DIAL_RATIO_LIST, method = EOperationMethod.SELECT)
|
||||
public AjaxResult subtotal(CuBonusStatisVO cuBonusStatisVO) {
|
||||
int pkCountry = SecurityUtils.getPkCountry();
|
||||
|
||||
R<CurrencyDTO> currency = iCurrencyServiceApi.getCurrency(pkCountry);
|
||||
BigDecimal exchangeRate = currency.getData().getInExchangeRate() == null ? BigDecimal.ONE : currency.getData().getInExchangeRate();
|
||||
|
||||
|
@ -368,7 +367,8 @@ public class CuBonusStatisController extends BaseController {
|
|||
final List<Integer> pkTeamCodeList = pkTeamCodeStr.stream().map(Integer::valueOf).collect(Collectors.toList());
|
||||
cuBonusStatisVO.setPkTeamCodeList(pkTeamCodeList);
|
||||
}
|
||||
//查询奖金扣项配置参数 0.8
|
||||
|
||||
// 查询奖金扣项配置参数 0.8
|
||||
List<CuBonusStatisVO> bonus = iCuBonusStatisService.bonusDeductlist(cuBonusStatisVO);
|
||||
if (CollectionUtil.isNotEmpty(bonus)) {
|
||||
cuBonusStatisVO.setBackRatio(BigDecimal.ONE.subtract(bonus.get(0).getBackRatio()));
|
||||
|
@ -386,7 +386,7 @@ public class CuBonusStatisController extends BaseController {
|
|||
|
||||
startPage();
|
||||
CuBonusStatisVO subtotal = iCuBonusStatisService.queryCuBonusSumStatis(cuBonusStatisVO);
|
||||
if (subtotal != null && pkCountry == CountryConstants.CHINA_COUNTRY) {
|
||||
if (subtotal != null) {
|
||||
if (subtotal.getIntroduceBonusSum().compareTo(BigDecimal.ZERO) > 0) {
|
||||
subtotal.setIntroduceBonusSum(subtotal.getIntroduceBonusSum().multiply(currency.getData().getInExchangeRate()));
|
||||
}
|
||||
|
|
|
@ -8,7 +8,7 @@ import org.apache.dubbo.config.annotation.DubboService;
|
|||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
|
||||
/**
|
||||
* @description: 奖金拨比统计Dubbo 服务
|
||||
* 奖金拨比统计Dubbo 服务
|
||||
**/
|
||||
@Slf4j
|
||||
@DubboService
|
||||
|
@ -17,17 +17,11 @@ public class ICuBonusStatisServiceProvider implements ICuBonusStatisServiceApi {
|
|||
@Autowired
|
||||
private ICuBonusStatisService iCuBonusStatisService;
|
||||
|
||||
/**
|
||||
* @description: 统计历史奖金拨比
|
||||
**/
|
||||
@Override
|
||||
public R<Boolean> statsHistoryBonus(String startDate, String endDate) {
|
||||
return R.ok(iCuBonusStatisService.statisHistoryBonus(startDate, endDate));
|
||||
}
|
||||
|
||||
/**
|
||||
* @description: 删除奖金拨比统计数据
|
||||
**/
|
||||
@Override
|
||||
public R<Boolean> delStats(String startDate, String endDate) {
|
||||
return R.ok(iCuBonusStatisService.delStatis(startDate, endDate));
|
||||
|
|
|
@ -389,9 +389,6 @@ public class CuBonusStatisServiceImpl extends ServiceImpl<CuBonusStatisMapper, C
|
|||
return baseMapper.getCuBonusStatis(cuBonusStatis);
|
||||
}
|
||||
|
||||
/**
|
||||
* @description: 统计历史奖金拨比数据
|
||||
**/
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public Boolean statisHistoryBonus(String startDate, String endDate) {
|
||||
|
@ -410,9 +407,10 @@ public class CuBonusStatisServiceImpl extends ServiceImpl<CuBonusStatisMapper, C
|
|||
List<CuBonusStatisVO> soAll = new ArrayList<>();
|
||||
// 先查中国订单
|
||||
List<CuBonusStatisVO> orachList = baseMapper.querySaOrderByLessDay(cbs);
|
||||
// 按支付时间(年月日)把订单进行分组(key:支付时间(年月日),value:订单统计数据列表)
|
||||
Map<Date, List<CuBonusStatisVO>> orachListMap = orachList.stream().collect(Collectors.groupingBy(CuBonusStatisVO::getCreationTime));
|
||||
if (CollectionUtil.isNotEmpty(orachList)) {
|
||||
// 按支付时间(年月日)把订单进行分组(key:支付时间(年月日),value:订单统计数据列表)
|
||||
Map<Date, List<CuBonusStatisVO>> orachListMap = orachList.stream().collect(Collectors.groupingBy(CuBonusStatisVO::getCreationTime));
|
||||
|
||||
if (CollectionUtil.isNotEmpty(vertexlist)) {
|
||||
for (Map.Entry<Date, List<CuBonusStatisVO>> entry : orachListMap.entrySet()) {
|
||||
for (CuBonusStatisVO ve : entry.getValue()) {
|
||||
|
@ -430,10 +428,11 @@ public class CuBonusStatisServiceImpl extends ServiceImpl<CuBonusStatisMapper, C
|
|||
List<CuBonusStatisVO> acAll = new ArrayList<>();
|
||||
//查询中国统计奖金
|
||||
List<CuBonusStatisVO> listCn = baseMapper.queryChinaCountryBonus(cbs);
|
||||
// 按支付时间(年月日)把订单进行分组(key:支付时间(年月日),value:订单统计数据列表)
|
||||
Map<Date, List<CuBonusStatisVO>> listCnMap = listCn.stream()
|
||||
.collect(Collectors.groupingBy(CuBonusStatisVO::getCreationTime));
|
||||
if (CollectionUtil.isNotEmpty(listCn)) {
|
||||
// 按支付时间(年月日)把订单进行分组(key:支付时间(年月日),value:订单统计数据列表)
|
||||
Map<Date, List<CuBonusStatisVO>> listCnMap = listCn.stream()
|
||||
.collect(Collectors.groupingBy(CuBonusStatisVO::getCreationTime));
|
||||
|
||||
if (CollectionUtil.isNotEmpty(vertexlist)) {
|
||||
for (CuBonusStatisVO ve : vertexlist) {
|
||||
for (Map.Entry<Date, List<CuBonusStatisVO>> entry : listCnMap.entrySet()) {
|
||||
|
|
|
@ -34,7 +34,7 @@ import java.util.stream.Collectors;
|
|||
public class CuBonusVertexStatisServiceImpl extends ServiceImpl<CuBonusVertexStatisMapper, CuBonusVertexStatis> implements ICuBonusVertexStatisService {
|
||||
|
||||
@Autowired
|
||||
private ICuMemberSettlePeriodService cuMemberSettlePeriodService;
|
||||
private ICuMemberSettlePeriodService iCuMemberSettlePeriodService;
|
||||
|
||||
/**
|
||||
* @description: 通过日期范围,返回范围内每天的日期
|
||||
|
@ -67,7 +67,7 @@ public class CuBonusVertexStatisServiceImpl extends ServiceImpl<CuBonusVertexSta
|
|||
//日期集合
|
||||
List<String> dates = getDatesInRange(startDate, endDate);
|
||||
for (String date : dates) {
|
||||
int period = cuMemberSettlePeriodService.getCuMemberSettlePeriodByDate(date).getPkId();
|
||||
int period = iCuMemberSettlePeriodService.getCuMemberSettlePeriodByDate(date).getPkId();
|
||||
String settleTableName = TableNameConstants.CU_MEMBER_SETTLE + period;
|
||||
//累加好的数据存入soAll
|
||||
List<CuBonusVertexStatisVO> soAll = new ArrayList<>();
|
||||
|
@ -84,8 +84,7 @@ public class CuBonusVertexStatisServiceImpl extends ServiceImpl<CuBonusVertexSta
|
|||
orachListAll.addAll(orachList);
|
||||
}
|
||||
//先查中国订单
|
||||
Map<Date, List<CuBonusVertexStatisVO>> orachListMap = orachListAll.stream()
|
||||
.collect(Collectors.groupingBy(CuBonusVertexStatisVO::getCreationTime));
|
||||
Map<Date, List<CuBonusVertexStatisVO>> orachListMap = orachListAll.stream().collect(Collectors.groupingBy(CuBonusVertexStatisVO::getCreationTime));
|
||||
//查询所有体系
|
||||
if (CollectionUtil.isNotEmpty(orachListAll)) {
|
||||
if (CollectionUtil.isNotEmpty(vertexList)) {
|
||||
|
@ -107,8 +106,7 @@ public class CuBonusVertexStatisServiceImpl extends ServiceImpl<CuBonusVertexSta
|
|||
cbs.setPkVertex(ve.getPkVertex());
|
||||
//查询中国统计奖金
|
||||
List<CuBonusVertexStatisVO> listCn = baseMapper.queryVertexChinaCountryBonus(cbs);
|
||||
Map<Date, List<CuBonusVertexStatisVO>> listCnMap = listCn.stream()
|
||||
.collect(Collectors.groupingBy(CuBonusVertexStatisVO::getCreationTime));
|
||||
Map<Date, List<CuBonusVertexStatisVO>> listCnMap = listCn.stream().collect(Collectors.groupingBy(CuBonusVertexStatisVO::getCreationTime));
|
||||
if (CollectionUtil.isNotEmpty(listCn)) {
|
||||
for (Map.Entry<Date, List<CuBonusVertexStatisVO>> entry : listCnMap.entrySet()) {
|
||||
CuBonusVertexStatisVO oldSo = new CuBonusVertexStatisVO();
|
||||
|
@ -266,27 +264,6 @@ public class CuBonusVertexStatisServiceImpl extends ServiceImpl<CuBonusVertexSta
|
|||
// 复购直推收益
|
||||
oldBon.setRepurPushIncome(addOrInitializeAmount(oldBon.getRepurPushIncome(), newBon.getRealIncome(), 2));
|
||||
break;
|
||||
// //创客空间
|
||||
// case MAKER_DIRECT:
|
||||
// oldBon.setMakerDirect(addOrInitializeAmount(oldBon.getMakerDirect(), newBon.getRealIncome(), 2));
|
||||
// break;
|
||||
// case MAKER_SHARE:
|
||||
// oldBon.setMakerShare(addOrInitializeAmount(oldBon.getMakerShare(), newBon.getRealIncome(), 2));
|
||||
// break;
|
||||
// //云代
|
||||
// case CLOUD_AGENT_DIRECT_PUSH:
|
||||
// oldBon.setAgentIntroduceBonus(addOrInitializeAmount(oldBon.getAgentIntroduceBonus(), newBon.getRealIncome(), 2));
|
||||
// break;
|
||||
// case CLOUD_AGENT_FIRST_PURCHASE:
|
||||
// oldBon.setCloudAgentFirstPurchase(addOrInitializeAmount(oldBon.getCloudAgentFirstPurchase(), newBon.getRealIncome(), 2));
|
||||
// break;
|
||||
// case CLOUD_AGENT_REPURCHASE:
|
||||
// oldBon.setCloudAgentRepurchase(addOrInitializeAmount(oldBon.getCloudAgentRepurchase(), newBon.getRealIncome(), 2));
|
||||
// break;
|
||||
// //嗨粉直推收益
|
||||
// case HI_PINK:
|
||||
// oldBon.setHiFunIncome(addOrInitializeAmount(oldBon.getHiFunIncome(), newBon.getRealIncome(), 2));
|
||||
// break;
|
||||
}
|
||||
return oldBon;
|
||||
}
|
||||
|
|
|
@ -2,30 +2,5 @@
|
|||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.hzs.member.goals.mapper.CuPersonalGoalsClassifyMapper">
|
||||
|
||||
<!-- 通用查询映射结果 -->
|
||||
<resultMap id="BaseResultMap" type="com.hzs.common.domain.member.goals.CuPersonalGoalsClassify">
|
||||
<id column="PK_ID" property="pkId"/>
|
||||
<result column="DEL_FLAG" property="delFlag"/>
|
||||
<result column="CREATION_TIME" property="creationTime"/>
|
||||
<result column="MODIFIED_TIME" property="modifiedTime"/>
|
||||
<result column="PK_COUNTRY" property="pkCountry"/>
|
||||
<result column="PK_CREATOR" property="pkCreator"/>
|
||||
<result column="PK_MODIFIED" property="pkModified"/>
|
||||
<result column="PK_GOALS" property="pkGoals"/>
|
||||
<result column="GOAL_CLASSIFY" property="goalClassify"/>
|
||||
<result column="TOTAL_ACHIEVE" property="totalAchieve"/>
|
||||
<result column="RIGHT_ACHIEVE" property="rightAchieve"/>
|
||||
</resultMap>
|
||||
|
||||
<!-- 通用查询结果列 -->
|
||||
<sql id="Base_Column_List">
|
||||
DEL_FLAG,
|
||||
CREATION_TIME,
|
||||
MODIFIED_TIME,
|
||||
PK_COUNTRY,
|
||||
PK_CREATOR,
|
||||
PK_MODIFIED,
|
||||
PK_ID, PK_GOALS, GOAL_CLASSIFY, TOTAL_ACHIEVE, RIGHT_ACHIEVE
|
||||
</sql>
|
||||
|
||||
</mapper>
|
||||
|
|
|
@ -39,15 +39,4 @@
|
|||
where pk_classify = #{pkClassify}
|
||||
</select>
|
||||
|
||||
|
||||
<sql id="Base_Column_List">
|
||||
DEL_FLAG,
|
||||
CREATION_TIME,
|
||||
MODIFIED_TIME,
|
||||
PK_COUNTRY,
|
||||
PK_CREATOR,
|
||||
PK_MODIFIED,
|
||||
PK_ID, PK_MODIFIED, CYCLE_KEY, CYCLE_VALUE
|
||||
</sql>
|
||||
|
||||
</mapper>
|
||||
|
|
|
@ -2,36 +2,4 @@
|
|||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.hzs.member.goals.mapper.CuPersonalGoalsMeetingMapper">
|
||||
|
||||
<!-- 通用查询映射结果 -->
|
||||
<resultMap id="BaseResultMap" type="com.hzs.common.domain.member.goals.CuPersonalGoalsMeeting">
|
||||
<id column="PK_ID" property="pkId"/>
|
||||
<result column="DEL_FLAG" property="delFlag"/>
|
||||
<result column="CREATION_TIME" property="creationTime"/>
|
||||
<result column="MODIFIED_TIME" property="modifiedTime"/>
|
||||
<result column="PK_COUNTRY" property="pkCountry"/>
|
||||
<result column="PK_CREATOR" property="pkCreator"/>
|
||||
<result column="PK_MODIFIED" property="pkModified"/>
|
||||
<result column="PK_CLASSIFY" property="pkClassify" />
|
||||
<result column="MEETING_TYPE" property="meetingType"/>
|
||||
<result column="MEETING_NUMBER" property="meetingNumber"/>
|
||||
<result column="MEETING_THEME" property="meetingTheme"/>
|
||||
<result column="MEETING_DATE" property="meetingDate"/>
|
||||
<result column="PK_PROVINCE" property="pkProvince"/>
|
||||
<result column="PK_CITY" property="pkCity"/>
|
||||
<result column="PK_COUNTY" property="pkCounty"/>
|
||||
<result column="ADDRESS" property="address"/>
|
||||
<result column="REMARKS" property="remarks"/>
|
||||
</resultMap>
|
||||
|
||||
<!-- 通用查询结果列 -->
|
||||
<sql id="Base_Column_List">
|
||||
DEL_FLAG,
|
||||
CREATION_TIME,
|
||||
MODIFIED_TIME,
|
||||
PK_COUNTRY,
|
||||
PK_CREATOR,
|
||||
PK_MODIFIED,
|
||||
PK_ID, PK_CLASSIFY, MEETING_TYPE, MEETING_NUMBER, MEETING_THEME, MEETING_DATE, PK_PROVINCE, PK_CITY, PK_COUNTY, ADDRESS, REMARKS
|
||||
</sql>
|
||||
|
||||
</mapper>
|
||||
|
|
|
@ -17,16 +17,6 @@
|
|||
<result column="PK_MEMBER" property="pkMember"/>
|
||||
</resultMap>
|
||||
|
||||
<!-- 通用查询结果列 -->
|
||||
<sql id="Base_Column_List">
|
||||
DEL_FLAG,
|
||||
CREATION_TIME,
|
||||
MODIFIED_TIME,
|
||||
PK_COUNTRY,
|
||||
PK_CREATOR,
|
||||
PK_ID, GOAL_CLASSIFY, TOTAL_ACHIEVE, RIGHT_ACHIEVE, MONTH
|
||||
</sql>
|
||||
|
||||
|
||||
<select id="selectGoalsSeason" resultType="com.hzs.member.goals.vo.CuPersonalGoalsRowDetailVO">
|
||||
select
|
||||
|
@ -62,41 +52,41 @@
|
|||
|
||||
<select id="selectGoalsMonth" resultType="com.hzs.member.goals.vo.CuPersonalGoalsMonthDetailVO">
|
||||
select case r.month
|
||||
when '2023-01' then 'm1'
|
||||
when '2023-02' then 'm2'
|
||||
when '2023-03' then 'm3'
|
||||
when '2023-04' then 'm4'
|
||||
when '2023-05' then 'm5'
|
||||
when '2023-06' then 'm6'
|
||||
when '2023-07' then 'm7'
|
||||
when '2023-08' then 'm8'
|
||||
when '2023-09' then 'm9'
|
||||
when '2023-10' then 'm10'
|
||||
when '2023-11' then 'm11'
|
||||
when '2023-12' then 'm12'
|
||||
else ''
|
||||
end cycleKey,
|
||||
r.total_achieve leftAchieve,
|
||||
r.right_achieve rightAchieve
|
||||
when '2023-01' then 'm1'
|
||||
when '2023-02' then 'm2'
|
||||
when '2023-03' then 'm3'
|
||||
when '2023-04' then 'm4'
|
||||
when '2023-05' then 'm5'
|
||||
when '2023-06' then 'm6'
|
||||
when '2023-07' then 'm7'
|
||||
when '2023-08' then 'm8'
|
||||
when '2023-09' then 'm9'
|
||||
when '2023-10' then 'm10'
|
||||
when '2023-11' then 'm11'
|
||||
when '2023-12' then 'm12'
|
||||
else ''
|
||||
end cycleKey,
|
||||
r.total_achieve leftAchieve,
|
||||
r.right_achieve rightAchieve
|
||||
from cu_personal_goals_month_record r
|
||||
where r.del_flag = 0
|
||||
and r.pk_country = #{pkCountry}
|
||||
and r.goal_classify = #{goalClassify}
|
||||
and r.pk_member = #{pkMember}
|
||||
and r.month >= to_char(trunc(sysdate, 'year'), 'yyyy-mm')
|
||||
and r.month < to_char(sysdate, 'yyyy-mm')
|
||||
and r.pk_country = #{pkCountry}
|
||||
and r.goal_classify = #{goalClassify}
|
||||
and r.pk_member = #{pkMember}
|
||||
and r.month >= to_char(trunc(sysdate, 'year'), 'yyyy-mm')
|
||||
and r.month < to_char(sysdate, 'yyyy-mm')
|
||||
</select>
|
||||
|
||||
|
||||
<select id="selectGoalsSeasonCount" resultType="com.hzs.member.goals.vo.CuPersonalGoalsClassifyVO">
|
||||
select sum(r.total_achieve) total_achieve,
|
||||
sum(r.right_achieve) right_achieve
|
||||
from cu_personal_goals_month_record r
|
||||
where r.del_flag = 0
|
||||
and r.pk_country = #{pkCountry}
|
||||
and r.goal_classify = #{goalClassify}
|
||||
and r.pk_member = #{pkMember}
|
||||
and substr(r.month, 1, 4) = #{month}
|
||||
from cu_personal_goals_month_record r
|
||||
where r.del_flag = 0
|
||||
and r.pk_country = #{pkCountry}
|
||||
and r.goal_classify = #{goalClassify}
|
||||
and r.pk_member = #{pkMember}
|
||||
and substr(r.month, 1, 4) = #{month}
|
||||
</select>
|
||||
|
||||
|
||||
|
|
|
@ -21,52 +21,40 @@
|
|||
<result column="PK_MEMBER" property="pkMember"/>
|
||||
</resultMap>
|
||||
|
||||
<!-- 通用查询结果列 -->
|
||||
<sql id="Base_Column_List">
|
||||
DEL_FLAG,
|
||||
CREATION_TIME,
|
||||
MODIFIED_TIME,
|
||||
PK_COUNTRY,
|
||||
PK_CREATOR,
|
||||
PK_MODIFIED,
|
||||
PK_ID, GOAL_CLASSIFY, TOTAL_ACHIEVE, RIGHT_ACHIEVE, MONTH, START_DATE, END_DATE, WEEK_NUMBER
|
||||
</sql>
|
||||
|
||||
|
||||
<select id="selectWeekGoals" resultType="com.hzs.member.goals.vo.CuPersonalGoalsRowDetailVO">
|
||||
select
|
||||
<if test='goalClassify == "2"'>
|
||||
max(decode(w.week_number, '1', w.total_achieve, 0)) ml1,
|
||||
max(decode(w.week_number, '1', w.right_achieve, 0)) mr1,
|
||||
max(decode(w.week_number, '2', w.total_achieve, 0)) ml2,
|
||||
max(decode(w.week_number, '2', w.right_achieve, 0)) mr2,
|
||||
max(decode(w.week_number, '3', w.total_achieve, 0)) ml3,
|
||||
max(decode(w.week_number, '3', w.right_achieve, 0)) mr3,
|
||||
max(decode(w.week_number, '4', w.total_achieve, 0)) ml4,
|
||||
max(decode(w.week_number, '4', w.right_achieve, 0)) mr4
|
||||
max(decode(w.week_number, '1', w.total_achieve, 0)) ml1,
|
||||
max(decode(w.week_number, '1', w.right_achieve, 0)) mr1,
|
||||
max(decode(w.week_number, '2', w.total_achieve, 0)) ml2,
|
||||
max(decode(w.week_number, '2', w.right_achieve, 0)) mr2,
|
||||
max(decode(w.week_number, '3', w.total_achieve, 0)) ml3,
|
||||
max(decode(w.week_number, '3', w.right_achieve, 0)) mr3,
|
||||
max(decode(w.week_number, '4', w.total_achieve, 0)) ml4,
|
||||
max(decode(w.week_number, '4', w.right_achieve, 0)) mr4
|
||||
</if>
|
||||
<if test='goalClassify != "2"'>
|
||||
max(decode(w.week_number, '1', w.total_achieve, 0)) m1,
|
||||
max(decode(w.week_number, '2', w.total_achieve, 0)) m2,
|
||||
max(decode(w.week_number, '3', w.total_achieve, 0)) m3,
|
||||
max(decode(w.week_number, '4', w.total_achieve, 0)) m4
|
||||
max(decode(w.week_number, '1', w.total_achieve, 0)) m1,
|
||||
max(decode(w.week_number, '2', w.total_achieve, 0)) m2,
|
||||
max(decode(w.week_number, '3', w.total_achieve, 0)) m3,
|
||||
max(decode(w.week_number, '4', w.total_achieve, 0)) m4
|
||||
</if>
|
||||
from cu_personal_goals_week_record w
|
||||
where w.del_flag = 0
|
||||
and w.pk_country = #{pkCountry}
|
||||
and w.goal_classify = #{goalClassify}
|
||||
and w.pk_member = #{pkMember}
|
||||
and w.month = #{month}
|
||||
from cu_personal_goals_week_record w
|
||||
where w.del_flag = 0
|
||||
and w.pk_country = #{pkCountry}
|
||||
and w.goal_classify = #{goalClassify}
|
||||
and w.pk_member = #{pkMember}
|
||||
and w.month = #{month}
|
||||
</select>
|
||||
|
||||
<select id="selectWeekGoalsCount" resultType="com.hzs.member.goals.vo.CuPersonalGoalsClassifyVO">
|
||||
select sum(w.total_achieve),sum(w.right_achieve)
|
||||
from cu_personal_goals_week_record w
|
||||
where w.del_flag = 0
|
||||
and w.pk_country = #{pkCountry}
|
||||
and w.goal_classify = #{goalClassify}
|
||||
and w.pk_member = #{pkMember}
|
||||
and w.month = #{month}
|
||||
select sum(w.total_achieve), sum(w.right_achieve)
|
||||
from cu_personal_goals_week_record w
|
||||
where w.del_flag = 0
|
||||
and w.pk_country = #{pkCountry}
|
||||
and w.goal_classify = #{goalClassify}
|
||||
and w.pk_member = #{pkMember}
|
||||
and w.month = #{month}
|
||||
</select>
|
||||
|
||||
|
||||
|
|
|
@ -191,7 +191,7 @@
|
|||
ORDER BY cbs.CREATION_TIME asc
|
||||
</select>
|
||||
|
||||
<!-- 查询体系合计的订单业绩-->
|
||||
<!-- 查询体系合计的订单业绩-->
|
||||
<select id="queryOrderAchieveSum" parameterType="com.hzs.member.statis.vo.CuBonusStatisVO"
|
||||
resultType="com.hzs.member.statis.vo.CuBonusStatisVO">
|
||||
select
|
||||
|
@ -228,7 +228,7 @@
|
|||
</if>
|
||||
</select>
|
||||
|
||||
<!-- 奖金拨比列表统计小计(最后一行)-->
|
||||
<!-- 奖金拨比列表统计小计(最后一行)-->
|
||||
<select id="queryCuBonusSumStatis" parameterType="com.hzs.member.statis.vo.CuBonusStatisVO"
|
||||
resultType="com.hzs.member.statis.vo.CuBonusStatisVO">
|
||||
SELECT
|
||||
|
@ -375,7 +375,7 @@
|
|||
</if>
|
||||
</select>
|
||||
|
||||
<!-- 奖金拨比图表-->
|
||||
<!-- 奖金拨比图表-->
|
||||
<select id="queryCuBonusStatisChart" parameterType="com.hzs.member.statis.vo.CuBonusStatisChartVO"
|
||||
resultType="com.hzs.member.statis.vo.CuBonusStatisChartVO">
|
||||
SELECT
|
||||
|
@ -508,7 +508,7 @@
|
|||
ORDER BY cbs.CREATION_TIME DESC
|
||||
</select>
|
||||
|
||||
<!-- 奖金拨比图表统计合计 最后一行 -->
|
||||
<!-- 奖金拨比图表统计合计 最后一行 -->
|
||||
<select id="queryCuBonusSumStatisChart" parameterType="com.hzs.member.statis.vo.CuBonusStatisChartVO"
|
||||
resultType="com.hzs.member.statis.vo.CuBonusStatisChartVO">
|
||||
SELECT
|
||||
|
@ -584,7 +584,6 @@
|
|||
+cbs.EMPOWERMENT_GIFT_AMOUNT+cbs.COOPERATE_AMOUNT+cbs.SPECIAL_REPURCHASE_AMOUNT
|
||||
+cbs.MAKER_ORDER+cbs.MAKER_GIFT_AMOUNT+cbs.WELFARE_ORDER),4) end AS repurBonusRateSum,
|
||||
|
||||
|
||||
sum(cbs.INTRODUCE_BONUS+cbs.ORG_BONUS+cbs.LEADER_BONUS+cbs.SERVICE_BONUS+
|
||||
cbs.MAKER_DIRECT+cbs.MAKER_SHARE+
|
||||
cbs.REPUR_RANGE_BONUS+cbs.REPUR_ORG_BONUS+cbs.REPUR_PUSH_INCOME
|
||||
|
@ -634,7 +633,7 @@
|
|||
|
||||
</select>
|
||||
|
||||
<!-- 查询一年注册、升级、复购、嗨粉合计-->
|
||||
<!-- 查询一年注册、升级、复购、嗨粉合计 -->
|
||||
<select id="queryYearData" parameterType="com.hzs.member.statis.vo.CuBonusStatisColumnarVO"
|
||||
resultType="com.hzs.member.statis.vo.CuBonusStatisColumnarVO">
|
||||
select sum(MAIN_REG_AMOUNT) MAIN_REG_AMOUNT,
|
||||
|
@ -652,7 +651,7 @@
|
|||
</if>
|
||||
</select>
|
||||
|
||||
<!--查询奖金拨比 圆饼图-->
|
||||
<!-- 查询奖金拨比 圆饼图 -->
|
||||
<select id="queryDiallingRatio" parameterType="com.hzs.member.statis.vo.CuBonusStatisRoundVO"
|
||||
resultType="com.hzs.member.statis.vo.CuBonusStatisRoundVO">
|
||||
select
|
||||
|
@ -683,7 +682,7 @@
|
|||
|
||||
</select>
|
||||
|
||||
<!-- 查询小于当天全部已支付或撤单订单信息-->
|
||||
<!-- 查询小于当天全部已支付或撤单订单信息-->
|
||||
<select id="querySaOrderByLessDay" parameterType="com.hzs.member.statis.vo.CuBonusStatisVO"
|
||||
resultType="com.hzs.member.statis.vo.CuBonusStatisVO">
|
||||
select * from (
|
||||
|
@ -724,7 +723,7 @@
|
|||
)
|
||||
</select>
|
||||
|
||||
<!-- 删除奖金拨比统计表数据-->
|
||||
<!-- 删除奖金拨比统计表数据-->
|
||||
<delete id="delStatis">
|
||||
delete from CU_BONUS_STATIS
|
||||
where 1=1
|
||||
|
@ -736,7 +735,7 @@
|
|||
</if>
|
||||
</delete>
|
||||
|
||||
<!-- 查询奖金扣项配置参数-->
|
||||
<!-- 查询奖金扣项配置参数-->
|
||||
<select id="bonusDeductlist" parameterType="com.hzs.member.statis.vo.CuBonusStatisVO"
|
||||
resultType="com.hzs.member.statis.vo.CuBonusStatisVO">
|
||||
select a.PK_ID,
|
||||
|
@ -753,7 +752,7 @@
|
|||
ORDER BY a.BACK_RATIO, a.PLATFORM_RATIO DESC
|
||||
</select>
|
||||
|
||||
<!--查询个人奖金拨比-->
|
||||
<!-- 查询个人奖金拨比 -->
|
||||
<select id="bonusSingleSum" parameterType="com.hzs.member.statis.vo.CuBonusSinglePersonStatisVO"
|
||||
resultType="com.hzs.member.statis.vo.CuBonusSinglePersonStatisVO">
|
||||
select
|
||||
|
@ -1201,7 +1200,7 @@
|
|||
where cm.DEL_FLAG=0 and cm.PK_ID=#{pkMember}
|
||||
</select>
|
||||
|
||||
<!-- 查询分红比例-->
|
||||
<!-- 查询分红比例-->
|
||||
<select id="bonusDividendRatiolist" parameterType="com.hzs.member.statis.vo.CuBonusStatisVO"
|
||||
resultType="com.hzs.member.statis.vo.CuBonusStatisVO">
|
||||
select
|
||||
|
@ -1218,7 +1217,7 @@
|
|||
ORDER BY ba.ABONUS_RATIO DESC
|
||||
</select>
|
||||
|
||||
<!-- 查询有效体系-->
|
||||
<!-- 查询有效体系-->
|
||||
<select id="vertexList" parameterType="com.hzs.member.statis.vo.CuBonusStatisVO"
|
||||
resultType="com.hzs.member.statis.vo.CuBonusStatisVO">
|
||||
select pk_id as pkVertex
|
||||
|
@ -1240,7 +1239,8 @@
|
|||
inner join CU_MEMBER_BONUS cmb on mbp.PK_BONUS = cmb.pk_id
|
||||
inner join cu_member cm on cm.pk_id = cmb.pk_member
|
||||
inner join BD_BONUS_ITEMS bbi on bbi.pk_id = mbp.PK_BONUS_ITEMS
|
||||
inner join sa_order so on so.pk_id=mbp.pk_order and so.PK_COUNTRY = #{pkCountry} and so.del_flag = 0
|
||||
inner join sa_order so on so.pk_id = mbp.pk_order
|
||||
and so.PK_COUNTRY = #{pkCountry} and so.del_flag = 0
|
||||
where mbp.DEL_FLAG = 0
|
||||
and mbp.INCOME_STATUS = 0
|
||||
and bbi.BONUS_VALUE in (1, 3, 4, 5, 7, 8, 9, 12, 14, 15, 16, 20, 21, 24, 25)
|
||||
|
@ -1266,7 +1266,8 @@
|
|||
INNER JOIN CU_MEMBER_BONUS cmb on mbe.PK_BONUS = cmb.pk_id
|
||||
INNER join cu_member cm on cm.pk_id = cmb.pk_member
|
||||
inner join BD_BONUS_ITEMS bbi on bbi.pk_id = mbe.PK_BONUS_ITEMS
|
||||
INNER JOIN sa_order so on so.pk_id = mbe.pk_order and so.PK_COUNTRY = #{pkCountry} and so.del_flag = 0
|
||||
INNER JOIN sa_order so on so.pk_id = mbe.pk_order
|
||||
and so.PK_COUNTRY = #{pkCountry} and so.del_flag = 0
|
||||
where mbe.DEL_FLAG = 0
|
||||
and mbe.INCOME_STATUS in (0, 4)
|
||||
and mbe.pk_order != 0
|
||||
|
@ -1293,7 +1294,8 @@
|
|||
inner join CU_MEMBER_BONUS cmb on mbc.PK_BONUS = cmb.pk_id
|
||||
inner join cu_member cm on cm.pk_id = cmb.pk_member
|
||||
inner join BD_BONUS_ITEMS bbi on bbi.pk_id = mbc.PK_BONUS_ITEMS
|
||||
inner JOIN sa_order so on so.pk_id = mbc.pk_order and so.PK_COUNTRY = #{pkCountry} and so.del_flag = 0
|
||||
inner JOIN sa_order so on so.pk_id = mbc.pk_order
|
||||
and so.PK_COUNTRY = #{pkCountry} and so.del_flag = 0
|
||||
where mbc.DEL_FLAG = 0
|
||||
and mbc.INCOME_STATUS in (0, 4)
|
||||
and mbc.pk_order != 0
|
||||
|
@ -1320,9 +1322,10 @@
|
|||
INNER JOIN CU_MEMBER_BONUS cmb on mbr.PK_BONUS=cmb.pk_id
|
||||
INNER join cu_member cm on cm.pk_id = cmb.pk_member
|
||||
inner join BD_BONUS_ITEMS bbi on bbi.pk_id=mbr.PK_BONUS_ITEMS
|
||||
INNER JOIN sa_order so on so.pk_id = mbr.pk_order and so.PK_COUNTRY = #{pkCountry} and so.del_flag = 0
|
||||
where mbr.DEL_FLAG=0
|
||||
and mbr.INCOME_STATUS=0
|
||||
INNER JOIN sa_order so on so.pk_id = mbr.pk_order
|
||||
and so.PK_COUNTRY = #{pkCountry} and so.del_flag = 0
|
||||
where mbr.DEL_FLAG = 0
|
||||
and mbr.INCOME_STATUS = 0
|
||||
and bbi.BONUS_VALUE in (1, 3, 4, 5, 7, 8, 9, 12, 14, 15, 16, 20, 21, 24, 25)
|
||||
<if test="startDate!=null and startDate!='' ">
|
||||
and so.PAY_TIME >= to_date(#{startDate}, 'yyyy-mm-dd')
|
||||
|
@ -1346,7 +1349,8 @@
|
|||
INNER JOIN CU_MEMBER_BONUS cmb on mbd.PK_BONUS=cmb.pk_id
|
||||
INNER join cu_member cm on cm.pk_id = cmb.pk_member
|
||||
inner join BD_BONUS_ITEMS bbi on bbi.pk_id = mbd.PK_BONUS_ITEMS
|
||||
INNER JOIN sa_order so on so.pk_id = mbd.pk_order and so.PK_COUNTRY = #{pkCountry} and so.del_flag = 0
|
||||
INNER JOIN sa_order so on so.pk_id = mbd.pk_order
|
||||
and so.PK_COUNTRY = #{pkCountry} and so.del_flag = 0
|
||||
where mbd.DEL_FLAG = 0
|
||||
and mbd.INCOME_STATUS = 0
|
||||
and bbi.BONUS_VALUE in (1, 3, 4, 5, 7, 8, 9, 12, 14, 15, 16, 20, 21, 24, 25)
|
||||
|
|
|
@ -874,7 +874,7 @@
|
|||
)
|
||||
</select>
|
||||
|
||||
<!-- 7天重算查询订单-->
|
||||
<!-- 7天重算查询订单-->
|
||||
<select id="queryAnewSaOrderByLessDay" parameterType="com.hzs.member.statis.vo.CuBonusVertexStatisVO"
|
||||
resultType="com.hzs.member.statis.vo.CuBonusVertexStatisVO">
|
||||
select * from (
|
||||
|
@ -885,26 +885,24 @@
|
|||
so.ORDER_TYPE orderType,
|
||||
so.ORDER_AMOUNT orderAmount,
|
||||
so.ORDER_ACHIEVE orderAchieve,
|
||||
to_date(to_char(so.PAY_TIME, 'yyyy-mm-dd'),'yyyy-mm-dd') AS creationTime
|
||||
to_date(to_char(so.PAY_TIME, 'yyyy-mm-dd'), 'yyyy-mm-dd') AS creationTime
|
||||
from (
|
||||
SELECT
|
||||
pk_member
|
||||
FROM
|
||||
${settleTableName}
|
||||
SELECT pk_member
|
||||
FROM ${settleTableName}
|
||||
WHERE category = 0
|
||||
start with pk_place_parent = #{pkVertex}
|
||||
connect by pk_place_parent = prior pk_member
|
||||
) cm
|
||||
INNER JOIN SA_ORDER so on so.pk_member = cm.pk_member
|
||||
where so.ORDER_TYPE in (1, 3, 4, 5, 7, 8, 9, 12, 14, 15, 16, 20, 21, 24, 25)
|
||||
where so.ORDER_TYPE in (1, 2, 3, 13, 20, 24, 25, 26)
|
||||
<if test="pkCountry != null">
|
||||
and so.pk_country=#{pkCountry}
|
||||
and so.pk_country = #{pkCountry}
|
||||
</if>
|
||||
<if test="delFlag != null">
|
||||
AND so.DEL_FLAG=#{delFlag}
|
||||
AND so.DEL_FLAG = #{delFlag}
|
||||
</if>
|
||||
<if test="orderStatus != null">
|
||||
AND so.order_status=#{orderStatus}
|
||||
AND so.order_status = #{orderStatus}
|
||||
</if>
|
||||
<if test="startDate != null and startDate!='' ">
|
||||
and so.PAY_TIME >= to_date(#{startDate}, 'yyyy-mm-dd')
|
||||
|
@ -963,7 +961,7 @@
|
|||
|
||||
</select>
|
||||
|
||||
<!-- 查询有效顶点-->
|
||||
<!-- 查询有效顶点 -->
|
||||
<select id="vertexList" parameterType="com.hzs.member.statis.vo.CuBonusVertexStatisVO"
|
||||
resultType="com.hzs.member.statis.vo.CuBonusVertexStatisVO">
|
||||
SELECT
|
||||
|
@ -975,16 +973,14 @@
|
|||
WHERE
|
||||
m.pk_place_parent = 2
|
||||
AND m.del_flag = 0
|
||||
AND m.pk_country = 1
|
||||
AND m.category = 0
|
||||
AND m.pay_status =1
|
||||
AND m.SYSTEM_TYPE =0
|
||||
AND m.pk_country = 1
|
||||
AND m.pay_status = 1
|
||||
<if test="pkVertex!=null">
|
||||
AND pk_id=#{pkVertex}
|
||||
AND pk_id = #{pkVertex}
|
||||
</if>
|
||||
</select>
|
||||
|
||||
|
||||
<!-- 查询中国奖金-->
|
||||
<select id="queryChinaCountryBonus" parameterType="com.hzs.member.statis.vo.CuBonusVertexStatisVO"
|
||||
resultType="com.hzs.member.statis.vo.CuBonusVertexStatisVO">
|
||||
|
@ -1119,7 +1115,7 @@
|
|||
to_char(so.PAY_TIME, 'yyyy-mm-dd')
|
||||
</select>
|
||||
|
||||
<!-- 查询7天重算奖金查询-->
|
||||
<!-- 查询7天重算奖金查询-->
|
||||
<select id="queryVertexChinaCountryBonus" parameterType="com.hzs.member.statis.vo.CuBonusVertexStatisVO"
|
||||
resultType="com.hzs.member.statis.vo.CuBonusVertexStatisVO">
|
||||
<!-- 直推收益 -->
|
||||
|
@ -1128,7 +1124,7 @@
|
|||
sum(mbp.REAL_INCOME) realIncome,
|
||||
bbi.BONUS_VALUE bonusType,
|
||||
#{pkVertex} pkVertex,
|
||||
to_date(to_char(so.PAY_TIME, 'yyyy-mm-dd'),'yyyy-mm-dd') AS creationTime
|
||||
to_date(to_char(so.PAY_TIME, 'yyeyy-mm-dd'), 'yyyy-mm-dd') AS creationTime
|
||||
from cu_member_bonus_push mbp
|
||||
INNER JOIN CU_MEMBER_BONUS cmb on mbp.PK_BONUS = cmb.pk_id
|
||||
INNER join (
|
||||
|
@ -1136,11 +1132,12 @@
|
|||
FROM ${settleTableName}
|
||||
WHERE category = 0
|
||||
start with pk_member = #{pkVertex}
|
||||
connect by pk_place_parent = prior pk_member ) cm
|
||||
connect by pk_place_parent = prior pk_member) cm
|
||||
on cm.pk_member = cmb.pk_member
|
||||
inner join BD_BONUS_ITEMS bbi on bbi.pk_id = mbp.PK_BONUS_ITEMS
|
||||
INNER JOIN sa_order so on so.pk_id=mbp.pk_order and so.PK_COUNTRY = #{pkCountry} and so.del_flag = 0
|
||||
where mbp.DEL_FLAG= 0
|
||||
INNER JOIN sa_order so on so.pk_id = mbp.pk_order
|
||||
and so.PK_COUNTRY = #{pkCountry} and so.del_flag = 0
|
||||
where mbp.DEL_FLAG = 0
|
||||
and mbp.INCOME_STATUS = 0
|
||||
and bbi.BONUS_VALUE in (1, 3, 4, 5, 7, 8, 9, 12, 14, 15, 16, 20, 21, 24, 25)
|
||||
<if test="startDate!=null and startDate!='' ">
|
||||
|
@ -1169,7 +1166,8 @@
|
|||
connect by pk_place_parent = prior pk_member ) cm
|
||||
on cm.pk_member = cmb.pk_member
|
||||
inner join BD_BONUS_ITEMS bbi on bbi.pk_id = mbe.PK_BONUS_ITEMS
|
||||
INNER JOIN sa_order so on so.pk_id = mbe.pk_order and so.PK_COUNTRY = #{pkCountry} and so.del_flag = 0
|
||||
INNER JOIN sa_order so on so.pk_id = mbe.pk_order
|
||||
and so.PK_COUNTRY = #{pkCountry} and so.del_flag = 0
|
||||
where mbe.DEL_FLAG = 0
|
||||
and mbe.INCOME_STATUS in (0, 4)
|
||||
and mbe.pk_order != 0
|
||||
|
@ -1190,7 +1188,7 @@
|
|||
sum(mbc.REAL_INCOME) realIncome,
|
||||
bbi.BONUS_VALUE bonusType,
|
||||
#{pkVertex} pkVertex,
|
||||
to_date(to_char(so.PAY_TIME, 'yyyy-mm-dd'),'yyyy-mm-dd') AS creationTime
|
||||
to_date(to_char(so.PAY_TIME, 'yyyy-mm-dd'), 'yyyy-mm-dd') AS creationTime
|
||||
from CU_MEMBER_BONUS_COACH mbc
|
||||
INNER JOIN CU_MEMBER_BONUS cmb on mbc.PK_BONUS=cmb.pk_id
|
||||
INNER join ( SELECT pk_member
|
||||
|
@ -1200,7 +1198,8 @@
|
|||
connect by pk_place_parent = prior pk_member ) cm
|
||||
on cm.pk_member = cmb.pk_member
|
||||
inner join BD_BONUS_ITEMS bbi on bbi.pk_id = mbc.PK_BONUS_ITEMS
|
||||
INNER JOIN sa_order so on so.pk_id = mbc.pk_order and so.PK_COUNTRY = #{pkCountry} and so.del_flag = 0
|
||||
INNER JOIN sa_order so on so.pk_id = mbc.pk_order
|
||||
and so.PK_COUNTRY = #{pkCountry} and so.del_flag = 0
|
||||
where mbc.DEL_FLAG = 0
|
||||
and mbc.INCOME_STATUS in (0, 4)
|
||||
and mbc.pk_order != 0
|
||||
|
@ -1221,7 +1220,7 @@
|
|||
sum(mbr.REAL_INCOME) realIncome,
|
||||
bbi.BONUS_VALUE bonusType,
|
||||
#{pkVertex} pkVertex,
|
||||
to_date(to_char(so.PAY_TIME, 'yyyy-mm-dd'),'yyyy-mm-dd') AS creationTime
|
||||
to_date(to_char(so.PAY_TIME, 'yyyy-mm-dd'), 'yyyy-mm-dd') AS creationTime
|
||||
from cu_member_bonus_range mbr
|
||||
INNER JOIN CU_MEMBER_BONUS cmb on mbr.PK_BONUS=cmb.pk_id
|
||||
INNER join ( SELECT pk_member
|
||||
|
@ -1231,7 +1230,8 @@
|
|||
connect by pk_place_parent = prior pk_member ) cm
|
||||
on cm.pk_member = cmb.pk_member
|
||||
inner join BD_BONUS_ITEMS bbi on bbi.pk_id = mbr.PK_BONUS_ITEMS
|
||||
INNER JOIN sa_order so on so.pk_id = mbr.pk_order and so.PK_COUNTRY = #{pkCountry} and so.del_flag = 0
|
||||
INNER JOIN sa_order so on so.pk_id = mbr.pk_order
|
||||
and so.PK_COUNTRY = #{pkCountry} and so.del_flag = 0
|
||||
where mbr.DEL_FLAG = 0
|
||||
and mbr.INCOME_STATUS = 0
|
||||
and bbi.BONUS_VALUE in (1, 3, 4, 5, 7, 8, 9, 12, 14, 15, 16, 20, 21, 24, 25)
|
||||
|
@ -1251,7 +1251,7 @@
|
|||
sum(mbd.REAL_INCOME) realIncome,
|
||||
bbi.BONUS_VALUE bonusType,
|
||||
#{pkVertex} pkVertex,
|
||||
to_date(to_char(so.PAY_TIME, 'yyyy-mm-dd'),'yyyy-mm-dd') AS creationTime
|
||||
to_date(to_char(so.PAY_TIME, 'yyyy-mm-dd'), 'yyyy-mm-dd') AS creationTime
|
||||
from cu_member_bonus_detail mbd
|
||||
INNER JOIN CU_MEMBER_BONUS cmb on mbd.PK_BONUS=cmb.pk_id
|
||||
INNER join ( SELECT pk_member
|
||||
|
@ -1261,7 +1261,8 @@
|
|||
connect by pk_place_parent = prior pk_member ) cm
|
||||
on cm.pk_member = cmb.pk_member
|
||||
inner join BD_BONUS_ITEMS bbi on bbi.pk_id = mbd.PK_BONUS_ITEMS
|
||||
INNER JOIN sa_order so on so.pk_id = mbd.pk_order and so.PK_COUNTRY = #{pkCountry} and so.del_flag = 0
|
||||
INNER JOIN sa_order so on so.pk_id = mbd.pk_order
|
||||
and so.PK_COUNTRY = #{pkCountry} and so.del_flag = 0
|
||||
where mbd.DEL_FLAG = 0
|
||||
and mbd.INCOME_STATUS = 0
|
||||
and bbi.BONUS_VALUE in (1, 3, 4, 5, 7, 8, 9, 12, 14, 15, 16, 20, 21, 24, 25)
|
||||
|
|
|
@ -9,23 +9,11 @@ import java.util.List;
|
|||
|
||||
/**
|
||||
* 条码配置 Mapper 接口
|
||||
*
|
||||
* @author hzs
|
||||
* @since 2022-10-17
|
||||
*/
|
||||
public interface BdBarCodeMapper extends BaseMapper<BdBarCode> {
|
||||
|
||||
List<BdBarCodeExt> queryBarCodeList(BdBarCodeExt barCodeExt);
|
||||
|
||||
/**
|
||||
* @description: 追溯码查询特殊产品
|
||||
* @author: zhang jing
|
||||
* @date: 2023/8/14 9:45
|
||||
* @param: [barCodeExt]
|
||||
* @return: com.hzs.common.domain.system.config.ext.BdBarCodeExt
|
||||
**/
|
||||
BdBarCodeExt querySpecialProduct(BdBarCode barCode);
|
||||
|
||||
BdBarCode getOneBarCode(Long pkId);
|
||||
|
||||
/**
|
||||
|
|
|
@ -1,86 +0,0 @@
|
|||
package com.hzs.system.config.param;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 条形码配置参数类
|
||||
* </p>
|
||||
*
|
||||
* @author zhangjing
|
||||
* @since 2022-08-29
|
||||
*/
|
||||
@Data
|
||||
public class BdBarCodeParam {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
private Long pkId;
|
||||
|
||||
/**
|
||||
* 产品编号
|
||||
*/
|
||||
private Integer pkProduct;
|
||||
|
||||
/**
|
||||
* 前缀
|
||||
*/
|
||||
private String prefix;
|
||||
|
||||
/**
|
||||
* 是否年
|
||||
*/
|
||||
private Integer isYear;
|
||||
|
||||
/**
|
||||
* 是否月
|
||||
*/
|
||||
private Integer isMonth;
|
||||
|
||||
/**
|
||||
* 尾号位数
|
||||
*/
|
||||
private Integer tailNumber;
|
||||
|
||||
/**
|
||||
* 是否初始化 是则通过定时任务初始化当前尾号
|
||||
*/
|
||||
private Integer isInitialize;
|
||||
|
||||
/**
|
||||
* 初始化尾号 当前尾号为空时,当前尾号变为初始化尾号
|
||||
*/
|
||||
private Long endNumber;
|
||||
|
||||
/**
|
||||
* 当前尾号 已经生成的条形码最新的尾号
|
||||
*/
|
||||
private Long currentNumber;
|
||||
|
||||
/**
|
||||
* 条码总数
|
||||
*/
|
||||
private int totalBarCode;
|
||||
|
||||
/**
|
||||
* 已使用总数
|
||||
*/
|
||||
private int usedBarCode;
|
||||
|
||||
/**
|
||||
* 是否启用
|
||||
*/
|
||||
private Integer enableState;
|
||||
/**
|
||||
* 产品名称
|
||||
*/
|
||||
private String productName;
|
||||
/**
|
||||
* 产品名称
|
||||
*/
|
||||
private String productCode;
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
|
@ -1,39 +0,0 @@
|
|||
package com.hzs.system.config.provider;
|
||||
|
||||
import cn.hutool.core.bean.BeanUtil;
|
||||
import com.hzs.common.core.domain.R;
|
||||
import com.hzs.common.core.utils.ComputeUtil;
|
||||
import com.hzs.common.domain.system.config.BdAwards;
|
||||
import com.hzs.common.domain.system.config.ext.BdAwardsExt;
|
||||
import com.hzs.system.base.service.IBdCountryService;
|
||||
import com.hzs.system.config.IAwardsServiceApi;
|
||||
import com.hzs.system.config.IBdBarCodeServiceApi;
|
||||
import com.hzs.system.config.service.IBdAwardsService;
|
||||
import com.hzs.system.config.service.IBdBarCodeService;
|
||||
import org.apache.dubbo.config.annotation.DubboService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
@DubboService
|
||||
public class BdBarCodeServiceProvider implements IBdBarCodeServiceApi {
|
||||
|
||||
@Autowired
|
||||
private IBdBarCodeService iBdBarCodeService;
|
||||
|
||||
/**
|
||||
* @description: 定时初始化条形码配置
|
||||
* @author: zhang jing
|
||||
* @date: 2024/5/8 11:18
|
||||
* @param: []
|
||||
* @return: com.hzs.common.core.domain.R<java.lang.Boolean>
|
||||
**/
|
||||
@Override
|
||||
public R<Boolean> updatWarehouseLog() {
|
||||
return R.ok(iBdBarCodeService.updatWarehouseLog());
|
||||
}
|
||||
|
||||
|
||||
}
|
|
@ -3,45 +3,24 @@ package com.hzs.system.config.service;
|
|||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.hzs.common.domain.system.config.BdBarCode;
|
||||
import com.hzs.common.domain.system.config.ext.BdBarCodeExt;
|
||||
import com.hzs.system.config.param.BdBarCodeParam;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 条码配置 服务类
|
||||
*
|
||||
* @author hzs
|
||||
* @since 2022-10-17
|
||||
*/
|
||||
public interface IBdBarCodeService extends IService<BdBarCode> {
|
||||
|
||||
/**
|
||||
* @description: 查询条形码配置表
|
||||
* @author: zhang jing
|
||||
* @date: 2022/10/18 15:40
|
||||
* @param: [barCode]
|
||||
* @return: java.util.List<com.hzs.common.domain.system.config.BdBarCode>
|
||||
* 查询条形码配置表
|
||||
**/
|
||||
List<BdBarCodeExt> queryBarCodeList(BdBarCodeExt barCodeExt);
|
||||
|
||||
/**
|
||||
* @description: 查询单条条形码配置信息
|
||||
* @author: zhang jing
|
||||
* @date: 2022/10/18 17:37
|
||||
* @param: [barCode]
|
||||
* @return: com.hzs.common.domain.system.config.BdBarCode
|
||||
* 查询单条条形码配置信息
|
||||
**/
|
||||
BdBarCode getOneBarCode(Long pkId);
|
||||
|
||||
/**
|
||||
* @description: 定时初始化条形码配置
|
||||
* @author: zhang jing
|
||||
* @date: 2024/5/8 11:08
|
||||
* @param: []
|
||||
* @return: void
|
||||
**/
|
||||
Boolean updatWarehouseLog();
|
||||
|
||||
/**
|
||||
* 更新条码使用数量
|
||||
*
|
||||
|
@ -53,13 +32,4 @@ public interface IBdBarCodeService extends IService<BdBarCode> {
|
|||
*/
|
||||
int updateUsedBarCode(List<Integer> idList, Integer type, Long userId, Integer pkCountry);
|
||||
|
||||
/**
|
||||
* @description: 追溯码查询特殊产品
|
||||
* @author: zhang jing
|
||||
* @date: 2023/8/14 9:46
|
||||
* @param: [barCodeExt]
|
||||
* @return: com.hzs.common.domain.system.config.ext.BdBarCodeExt
|
||||
**/
|
||||
BdBarCodeExt querySpecialProduct(BdBarCode barCode);
|
||||
|
||||
}
|
||||
|
|
|
@ -1,88 +1,33 @@
|
|||
package com.hzs.system.config.service.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.hzs.common.core.enums.EYesNo;
|
||||
import com.hzs.common.domain.system.config.BdBarCode;
|
||||
import com.hzs.common.domain.system.config.ext.BdBarCodeExt;
|
||||
import com.hzs.system.config.mapper.BdBarCodeMapper;
|
||||
import com.hzs.system.config.service.IBdBarCodeService;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
import org.springframework.util.CollectionUtils;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 条码配置 服务实现类
|
||||
*
|
||||
* @author hzs
|
||||
* @since 2022-10-17
|
||||
*/
|
||||
@Service
|
||||
public class BdBarCodeServiceImpl extends ServiceImpl<BdBarCodeMapper, BdBarCode> implements IBdBarCodeService {
|
||||
|
||||
/**
|
||||
* @description: 查询条形码配置列表
|
||||
* @author: zhang jing
|
||||
* @date: 2022/10/18 17:37
|
||||
* @param: [barCode]
|
||||
* @return: java.util.List<com.hzs.common.domain.system.config.BdBarCode>
|
||||
**/
|
||||
@Override
|
||||
public List<BdBarCodeExt> queryBarCodeList(BdBarCodeExt barCodeExt) {
|
||||
return baseMapper.queryBarCodeList(barCodeExt);
|
||||
}
|
||||
|
||||
/**
|
||||
* @description: 查询单条条形码配置信息
|
||||
* @author: zhang jing
|
||||
* @date: 2022/10/18 17:37
|
||||
* @param: [barCode]
|
||||
* @return: com.hzs.common.domain.system.config.BdBarCode
|
||||
**/
|
||||
@Override
|
||||
public BdBarCode getOneBarCode(Long pkId) {
|
||||
return baseMapper.getOneBarCode(pkId);
|
||||
}
|
||||
|
||||
/**
|
||||
* 定时初始化条形码配置
|
||||
*/
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public Boolean updatWarehouseLog() {
|
||||
/**
|
||||
* 查询初始化条形码配置,将当前尾号初始化为初始尾号
|
||||
*/
|
||||
try {
|
||||
BdBarCodeExt barCode = new BdBarCodeExt();
|
||||
barCode.setIsInitialize(EYesNo.YES.getIntValue());
|
||||
List<BdBarCodeExt> list = baseMapper.queryBarCodeList(barCode);
|
||||
if (!CollectionUtils.isEmpty(list)) {
|
||||
for (BdBarCodeExt bbc : list) {
|
||||
bbc.setCurrentNumber(bbc.getEndNumber());
|
||||
}
|
||||
}
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int updateUsedBarCode(List<Integer> idList, Integer type, Long userId, Integer pkCountry) {
|
||||
return baseMapper.updateUsedBarCode(idList, type, userId, pkCountry);
|
||||
}
|
||||
|
||||
/**
|
||||
* @description: 追溯码查询特殊产品
|
||||
* @author: zhang jing
|
||||
* @date: 2023/8/14 9:46
|
||||
* @param: [barCodeExt]
|
||||
* @return: com.hzs.common.domain.system.config.ext.BdBarCodeExt
|
||||
**/
|
||||
@Override
|
||||
public BdBarCodeExt querySpecialProduct(BdBarCode barCode) {
|
||||
return baseMapper.querySpecialProduct(barCode);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -23,7 +23,6 @@
|
|||
<result column="USED_BAR_CODE" property="usedBarCode"/>
|
||||
<result column="ENABLE_STATE" property="enableState"/>
|
||||
<result column="BATCH" property="batch"/>
|
||||
|
||||
</resultMap>
|
||||
|
||||
<!-- 查询条形码列表-->
|
||||
|
@ -72,7 +71,6 @@
|
|||
<if test="isMonth != null ">
|
||||
AND a.IS_MONTH = #{isMonth}
|
||||
</if>
|
||||
|
||||
<if test="tailNumber != null ">
|
||||
AND a.TAIL_NUMBER = #{tailNumber}
|
||||
</if>
|
||||
|
@ -85,32 +83,15 @@
|
|||
<if test="usedBarCode != null ">
|
||||
AND a.USED_BAR_CODE = #{usedBarCode}
|
||||
</if>
|
||||
|
||||
<if test="startDate != null ">
|
||||
and a.EFFECTIVE_DATE >= #{startDate, jdbcType=DATE}
|
||||
</if>
|
||||
<if test="endDate != null ">
|
||||
and a.EFFECTIVE_DATE < #{endDate, jdbcType=DATE}
|
||||
</if>
|
||||
|
||||
|
||||
order by a.PK_ID desc
|
||||
</select>
|
||||
|
||||
<!-- 追溯码查询特殊产品-->
|
||||
<select id="querySpecialProduct" parameterType="com.hzs.common.domain.system.config.BdBarCode"
|
||||
resultType="com.hzs.common.domain.system.config.ext.BdBarCodeExt">
|
||||
select a.PK_ID,
|
||||
a.PRODUCT_CODE,
|
||||
a.PRODUCT_NAME
|
||||
from BD_PRODUCT a
|
||||
where a.DEL_FLAG=0 and a.PK_COUNTRY=#{pkCountry}
|
||||
<if test="pkProduct !=null ">
|
||||
AND a.PK_ID = #{pkProduct}
|
||||
</if>
|
||||
|
||||
</select>
|
||||
|
||||
<select id="getOneBarCode" parameterType="Long"
|
||||
resultType="com.hzs.common.domain.system.config.BdBarCode">
|
||||
select a.PK_ID,
|
||||
|
@ -162,5 +143,4 @@
|
|||
</update>
|
||||
|
||||
|
||||
|
||||
</mapper>
|
||||
|
|
|
@ -8,14 +8,8 @@ import com.hzs.common.core.web.domain.BaseEntity;
|
|||
import lombok.*;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 个人目标
|
||||
* </p>
|
||||
*
|
||||
* @author hzs
|
||||
* @since 2023-05-16
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
|
|
|
@ -11,12 +11,7 @@ import lombok.*;
|
|||
import lombok.experimental.Accessors;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 个人目标分类
|
||||
* </p>
|
||||
*
|
||||
* @author hzs
|
||||
* @since 2023-05-17
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
|
|
|
@ -12,12 +12,7 @@ import lombok.EqualsAndHashCode;
|
|||
import lombok.experimental.Accessors;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 个人目标详情
|
||||
* </p>
|
||||
*
|
||||
* @author hzs
|
||||
* @since 2023-05-16
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
|
@ -47,7 +42,7 @@ public class CuPersonalGoalsDetail extends BaseEntity {
|
|||
private String cycleKey;
|
||||
|
||||
/**
|
||||
* 周期Value
|
||||
* 周期Value
|
||||
*/
|
||||
@TableField("CYCLE_VALUE")
|
||||
private BigDecimal cycleValue;
|
||||
|
|
|
@ -2,7 +2,9 @@ package com.hzs.common.domain.member.goals;
|
|||
|
||||
import com.baomidou.mybatisplus.annotation.KeySequence;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.hzs.common.core.web.domain.BaseEntity;
|
||||
|
@ -11,12 +13,7 @@ import lombok.EqualsAndHashCode;
|
|||
import lombok.experimental.Accessors;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 个人目标会议信息
|
||||
* </p>
|
||||
*
|
||||
* @author hzs
|
||||
* @since 2023-05-16
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
|
|
|
@ -11,12 +11,7 @@ import lombok.*;
|
|||
import lombok.experimental.Accessors;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
*
|
||||
* </p>
|
||||
*
|
||||
* @author hzs
|
||||
* @since 2023-05-19
|
||||
*/
|
||||
@Data
|
||||
@Builder
|
||||
|
|
|
@ -11,12 +11,7 @@ import lombok.*;
|
|||
import lombok.experimental.Accessors;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 个人目标历史记录表
|
||||
* </p>
|
||||
*
|
||||
* @author hzs
|
||||
* @since 2023-05-19
|
||||
*/
|
||||
@Data
|
||||
@Builder
|
||||
|
@ -85,5 +80,4 @@ public class CuPersonalGoalsWeekRecord extends BaseEntity {
|
|||
private Long pkMember;
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
|
|
@ -13,12 +13,7 @@ import java.math.BigDecimal;
|
|||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 奖金拨比零线统计
|
||||
* </p>
|
||||
*
|
||||
* @author hzs
|
||||
* @since 2024-08-12
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
|
@ -381,6 +376,4 @@ public class CuBonusVertexStatis extends BaseEntity {
|
|||
private BigDecimal LenjoyPv;
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
|
|
@ -13,12 +13,7 @@ import lombok.experimental.Accessors;
|
|||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 条码配置
|
||||
* </p>
|
||||
*
|
||||
* @author hzs
|
||||
* @since 2022-10-17
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
|
@ -112,7 +107,4 @@ public class BdBarCode extends BaseEntity {
|
|||
private Date effectiveDate;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
|
|
@ -35,7 +35,6 @@ public class CuMemberJob {
|
|||
memberJobServiceApi.insertAccountDetail();
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 自动提现
|
||||
*/
|
||||
|
@ -44,7 +43,6 @@ public class CuMemberJob {
|
|||
memberJobServiceApi.automaticWithdrawal();
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 每月月初定时删除上上个月的数据
|
||||
*
|
||||
|
@ -55,24 +53,6 @@ public class CuMemberJob {
|
|||
memberJobServiceApi.deleteAccountDetailByMonth();
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 插入个人目标周历史记录表
|
||||
*/
|
||||
@XxlJob("saveGoalsWeekRecord")
|
||||
public void saveGoalsWeekRecord() {
|
||||
memberJobServiceApi.saveGoalsWeekRecord();
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 插入个人目标月历史记录表(每月月初执行)
|
||||
*/
|
||||
@XxlJob("saveGoalsMonthRecord")
|
||||
public void saveGoalsMonthRecord() {
|
||||
memberJobServiceApi.saveGoalsMonthRecord();
|
||||
}
|
||||
|
||||
@XxlJob("sendPlaceErrorMsg")
|
||||
public void sendPlaceErrorMsg() {
|
||||
List<CuMemberExt> cuMemberList = memberServiceApi.queryPlaceErrorCode().getData();
|
||||
|
@ -82,20 +62,17 @@ public class CuMemberJob {
|
|||
Long pkPlaceParent = cuMemberExt.getPkPlaceParent();
|
||||
Integer placeDept = cuMemberExt.getPlaceDept();
|
||||
sb.append("会员ID: ").append(pkPlaceParent).append(" ,部门: ").append(placeDept).append(" ,");
|
||||
|
||||
}
|
||||
sb.append("结算错误,安置有问题");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 提前四个月自动服务协议有效期续期一年
|
||||
*/
|
||||
// @Scheduled(cron = "00 50 16 * * ?")
|
||||
@XxlJob("updateMemberWhiteExpireDate")
|
||||
public void updateMemberExpireDate() {
|
||||
R result = memberServiceApi.updateMemberExpireDate();
|
||||
R<?> result = memberServiceApi.updateMemberExpireDate();
|
||||
if (!result.isSuccess()) {
|
||||
log.error("提前四个月自动服务协议有效期续期一年,{}", result.getMsg());
|
||||
}
|
||||
|
|
|
@ -7,7 +7,6 @@ import com.hzs.common.core.utils.DateUtils;
|
|||
import com.hzs.member.base.IMemberServiceApi;
|
||||
import com.hzs.member.statis.ICuBonusStatisServiceApi;
|
||||
import com.hzs.member.statis.ICuBonusVertexStatisServiceApi;
|
||||
import com.hzs.system.config.IBdBarCodeServiceApi;
|
||||
import com.xxl.job.core.handler.annotation.XxlJob;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.dubbo.config.annotation.DubboReference;
|
||||
|
@ -28,8 +27,6 @@ public class MemberJob {
|
|||
ICuBonusStatisServiceApi iCuBonusStatisServiceApi;
|
||||
@DubboReference
|
||||
ICuBonusVertexStatisServiceApi iCuBonusVertexStatisServiceApi;
|
||||
@DubboReference
|
||||
IBdBarCodeServiceApi iBdBarCodeServiceApi;
|
||||
|
||||
/**
|
||||
* 定时统计奖金拨比
|
||||
|
@ -126,13 +123,4 @@ public class MemberJob {
|
|||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 定时初始化条形码配置
|
||||
*/
|
||||
@XxlJob("updatWarehouseLogJob")
|
||||
public void updatWarehouseLogJob() {
|
||||
// 查询初始化条形码配置,将当前尾号初始化为初始尾号
|
||||
iBdBarCodeServiceApi.updatWarehouseLog();
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue