|
@ -5,6 +5,8 @@ import com.baomidou.mybatisplus.core.metadata.IPage; |
|
|
import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; |
|
|
import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; |
|
|
import com.epmet.commons.tools.constant.FieldConstant; |
|
|
import com.epmet.commons.tools.constant.FieldConstant; |
|
|
import com.epmet.commons.tools.dto.result.CustomerStaffInfoCacheResult; |
|
|
import com.epmet.commons.tools.dto.result.CustomerStaffInfoCacheResult; |
|
|
|
|
|
import com.epmet.commons.tools.exception.EpmetErrorCode; |
|
|
|
|
|
import com.epmet.commons.tools.exception.EpmetException; |
|
|
import com.epmet.commons.tools.page.PageData; |
|
|
import com.epmet.commons.tools.page.PageData; |
|
|
import com.epmet.commons.tools.redis.common.CustomerIcHouseRedis; |
|
|
import com.epmet.commons.tools.redis.common.CustomerIcHouseRedis; |
|
|
import com.epmet.commons.tools.redis.common.CustomerStaffRedis; |
|
|
import com.epmet.commons.tools.redis.common.CustomerStaffRedis; |
|
@ -18,9 +20,7 @@ import com.epmet.dto.form.RecordRewardFormDTO; |
|
|
import com.epmet.dto.form.SubmitRewardFormDTO; |
|
|
import com.epmet.dto.form.SubmitRewardFormDTO; |
|
|
import com.epmet.entity.PointRewardEntity; |
|
|
import com.epmet.entity.PointRewardEntity; |
|
|
import com.epmet.redis.PointRewardRedis; |
|
|
import com.epmet.redis.PointRewardRedis; |
|
|
import com.epmet.service.PointAnnexService; |
|
|
import com.epmet.service.*; |
|
|
import com.epmet.service.PointRewardRuleService; |
|
|
|
|
|
import com.epmet.service.PointRewardService; |
|
|
|
|
|
import com.github.pagehelper.PageHelper; |
|
|
import com.github.pagehelper.PageHelper; |
|
|
import com.github.pagehelper.PageInfo; |
|
|
import com.github.pagehelper.PageInfo; |
|
|
import org.apache.commons.lang3.StringUtils; |
|
|
import org.apache.commons.lang3.StringUtils; |
|
@ -53,6 +53,12 @@ public class PointRewardServiceImpl extends BaseServiceImpl<PointRewardDao, Poin |
|
|
@Autowired |
|
|
@Autowired |
|
|
private PointAdditiveRuleDao pointAdditiveRuleDao; |
|
|
private PointAdditiveRuleDao pointAdditiveRuleDao; |
|
|
|
|
|
|
|
|
|
|
|
@Autowired |
|
|
|
|
|
private PointAdditiveRecordService pointAdditiveRecordService; |
|
|
|
|
|
|
|
|
|
|
|
@Autowired |
|
|
|
|
|
private PointAdditiveCalcService pointAdditiveCalcService; |
|
|
|
|
|
|
|
|
@Override |
|
|
@Override |
|
|
public PageData<PointRewardDTO> page(Map<String, Object> params) { |
|
|
public PageData<PointRewardDTO> page(Map<String, Object> params) { |
|
|
IPage<PointRewardEntity> page = baseDao.selectPage( |
|
|
IPage<PointRewardEntity> page = baseDao.selectPage( |
|
@ -122,12 +128,19 @@ public class PointRewardServiceImpl extends BaseServiceImpl<PointRewardDao, Poin |
|
|
insertEntity.setStatement(dto.getStatement()); |
|
|
insertEntity.setStatement(dto.getStatement()); |
|
|
//根据积分规则去获取分值
|
|
|
//根据积分规则去获取分值
|
|
|
Integer pointSum = pointAdditiveRuleDao.selectPointTotalByIds(dto); |
|
|
Integer pointSum = pointAdditiveRuleDao.selectPointTotalByIds(dto); |
|
|
|
|
|
if(null == pointSum){ |
|
|
|
|
|
throw new EpmetException(EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(), "积分不可为空","积分不可为空"); |
|
|
|
|
|
} |
|
|
insertEntity.setPointValue(pointSum); |
|
|
insertEntity.setPointValue(pointSum); |
|
|
insert(insertEntity); |
|
|
insert(insertEntity); |
|
|
//插入积分奖扣明细
|
|
|
//插入积分奖扣明细
|
|
|
pointRewardRuleService.insertBatchPointRule(insertEntity.getId(),dto); |
|
|
pointRewardRuleService.insertBatchPointRule(insertEntity.getId(),dto); |
|
|
//插入积分附件
|
|
|
//插入积分附件
|
|
|
pointAnnexService.insertBatchPoint(insertEntity.getId(),dto); |
|
|
pointAnnexService.insertBatchPoint(insertEntity.getId(),dto); |
|
|
|
|
|
//插入附加积分记录
|
|
|
|
|
|
pointAdditiveRecordService.insertMoralEducation(insertEntity); |
|
|
|
|
|
//插入附加积分计算
|
|
|
|
|
|
pointAdditiveCalcService.insertMoralEducation(insertEntity); |
|
|
return new Result().ok("提交成功!"); |
|
|
return new Result().ok("提交成功!"); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|