Browse Source

积分调整审核管理

master
wanggongfeng 3 years ago
parent
commit
d0355dd888
  1. 2
      epdc-cloud-client-yushan
  2. 2
      epdc-cloud-points/pom.xml
  3. 15
      epdc-cloud-points/src/main/java/com/elink/esua/epdc/controller/PointsIntegralAdjustmentCheckController.java
  4. 12
      epdc-cloud-points/src/main/java/com/elink/esua/epdc/dao/PointsIntegralAdjustmentCheckDao.java
  5. 27
      epdc-cloud-points/src/main/java/com/elink/esua/epdc/entity/PointsIntegralAdjustmentCheckEntity.java
  6. 29
      epdc-cloud-points/src/main/java/com/elink/esua/epdc/excel/PointsIntegralAdjustmentCheckExcel.java
  7. 18
      epdc-cloud-points/src/main/java/com/elink/esua/epdc/service/PointsIntegralAdjustmentCheckService.java
  8. 38
      epdc-cloud-points/src/main/java/com/elink/esua/epdc/service/impl/PointsIntegralAdjustmentCheckServiceImpl.java
  9. 42
      epdc-cloud-points/src/main/resources/mapper/PointsIntegralAdjustmentCheckDao.xml

2
epdc-cloud-client-yushan

@ -1 +1 @@
Subproject commit ba9218dd49c0443007e925385cec5660dae9d8a2
Subproject commit c09ef9872fe9c06389ddff0c5a90363f8fe8ae3e

2
epdc-cloud-points/pom.xml

@ -143,7 +143,7 @@
<server.port>9070</server.port>
<spring.redis.index>2</spring.redis.index>
<spring.redis.index>8</spring.redis.index>
<spring.redis.host>r-m5eh5czgb1nucti6azpd.redis.rds.aliyuncs.com</spring.redis.host>
<spring.redis.port>10001</spring.redis.port>
<spring.redis.password>elink!888</spring.redis.password>

15
epdc-cloud-points/src/main/java/com/elink/esua/epdc/controller/PointsIntegralAdjustmentCheckController.java

@ -19,6 +19,7 @@ package com.elink.esua.epdc.controller;
import com.elink.esua.epdc.commons.tools.page.PageData;
import com.elink.esua.epdc.commons.tools.security.user.SecurityUser;
import com.elink.esua.epdc.commons.tools.security.user.UserDetail;
import com.elink.esua.epdc.commons.tools.utils.ExcelUtils;
import com.elink.esua.epdc.commons.tools.utils.Result;
import com.elink.esua.epdc.commons.tools.validator.AssertUtils;
@ -52,7 +53,7 @@ public class PointsIntegralAdjustmentCheckController {
@GetMapping("page")
public Result<PageData<PointsIntegralAdjustmentCheckDTO>> page(@RequestParam Map<String, Object> params){
PageData<PointsIntegralAdjustmentCheckDTO> page = pointsIntegralAdjustmentCheckService.page(params);
PageData<PointsIntegralAdjustmentCheckDTO> page = pointsIntegralAdjustmentCheckService.getPhrasePage(params);
return new Result<PageData<PointsIntegralAdjustmentCheckDTO>>().ok(page);
}
@ -67,6 +68,9 @@ public class PointsIntegralAdjustmentCheckController {
//效验数据
ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class);
dto.setWorkUserId(SecurityUser.getUserId().toString());
dto.setWorkUserName(SecurityUser.getUser().getRealName());
dto.setWorkUserDeptId(SecurityUser.getUser().getDeptId().toString());
dto.setWorkUserDeptName(SecurityUser.getUser().getDeptName());
pointsIntegralAdjustmentCheckService.save(dto);
return new Result();
}
@ -75,11 +79,18 @@ public class PointsIntegralAdjustmentCheckController {
public Result update(@RequestBody PointsIntegralAdjustmentCheckDTO dto){
//效验数据
ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class);
dto.setWorkUserId(SecurityUser.getUserId().toString());
pointsIntegralAdjustmentCheckService.update(dto);
return new Result();
}
@PutMapping("updateCheck")
public Result updateCheck(@RequestBody PointsIntegralAdjustmentCheckDTO dto){
//效验数据
ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class);
pointsIntegralAdjustmentCheckService.updateCheck(dto);
return new Result();
}
@DeleteMapping
public Result delete(@RequestBody String[] ids){
//效验数据

12
epdc-cloud-points/src/main/java/com/elink/esua/epdc/dao/PointsIntegralAdjustmentCheckDao.java

@ -18,9 +18,14 @@
package com.elink.esua.epdc.dao;
import com.elink.esua.epdc.commons.mybatis.dao.BaseDao;
import com.elink.esua.epdc.dto.PointsIntegralAdjustmentCheckDTO;
import com.elink.esua.epdc.entity.PointsIntegralAdjustmentCheckEntity;
import com.elink.esua.epdc.phrases.ActPhraseDTO;
import org.apache.ibatis.annotations.Mapper;
import java.util.List;
import java.util.Map;
/**
* 积分调整审核表
*
@ -29,5 +34,10 @@ import org.apache.ibatis.annotations.Mapper;
*/
@Mapper
public interface PointsIntegralAdjustmentCheckDao extends BaseDao<PointsIntegralAdjustmentCheckEntity> {
/**
* 条件查询
* @param params
* @return
*/
List<PointsIntegralAdjustmentCheckDTO> getPhrasePage(Map<String, Object> params);
}

27
epdc-cloud-points/src/main/java/com/elink/esua/epdc/entity/PointsIntegralAdjustmentCheckEntity.java

@ -46,7 +46,7 @@ public class PointsIntegralAdjustmentCheckEntity extends BaseEpdcEntity {
/**
* 用户昵称
*/
private String nickName;
private String nickname;
/**
* 姓名
@ -108,4 +108,29 @@ public class PointsIntegralAdjustmentCheckEntity extends BaseEpdcEntity {
*/
private String workUserId;
/**
* 工作人员姓名
*/
private String workUserName;
/**
* 工作人员部门ID
*/
private String workUserDeptId;
/**
* 工作人员部门名称
*/
private String workUserDeptName;
/**
* 审核状态1未审核2通过3不通过
*/
private Integer state;
/**
* 审核意见
*/
private String checkOpinion;
}

29
epdc-cloud-points/src/main/java/com/elink/esua/epdc/excel/PointsIntegralAdjustmentCheckExcel.java

@ -75,6 +75,35 @@ public class PointsIntegralAdjustmentCheckExcel {
@Excel(name = "工作人员ID")
private String workUserId;
/**
* 工作人员姓名
*/
@Excel(name = "工作人员姓名")
private String workUserName;
/**
* 工作人员部门ID
*/
@Excel(name = "工作人员部门ID")
private String workUserDeptId;
/**
* 工作人员部门名称
*/
@Excel(name = "工作人员部门名称")
private String workUserDeptName;
/**
* 审核状态1未审核2通过3不通过
*/
@Excel(name = "审核状态")
private Integer state;
/**
* 审核意见
*/
@Excel(name = "审核意见")
private String checkOpinion;
@Excel(name = "乐观锁")
private Integer revision;

18
epdc-cloud-points/src/main/java/com/elink/esua/epdc/service/PointsIntegralAdjustmentCheckService.java

@ -21,6 +21,7 @@ import com.elink.esua.epdc.commons.mybatis.service.BaseService;
import com.elink.esua.epdc.commons.tools.page.PageData;
import com.elink.esua.epdc.dto.PointsIntegralAdjustmentCheckDTO;
import com.elink.esua.epdc.entity.PointsIntegralAdjustmentCheckEntity;
import com.elink.esua.epdc.phrases.ActPhraseDTO;
import java.util.List;
import java.util.Map;
@ -43,6 +44,13 @@ public interface PointsIntegralAdjustmentCheckService extends BaseService<Points
*/
PageData<PointsIntegralAdjustmentCheckDTO> page(Map<String, Object> params);
/**
* 分页条件查询
* @param params
* @return
*/
PageData<PointsIntegralAdjustmentCheckDTO> getPhrasePage(Map<String, Object> params);
/**
* 默认查询
*
@ -83,6 +91,16 @@ public interface PointsIntegralAdjustmentCheckService extends BaseService<Points
*/
void update(PointsIntegralAdjustmentCheckDTO dto);
/**
* 默认更新
*
* @param dto
* @return void
* @author generator
* @date 2022-03-31
*/
void updateCheck(PointsIntegralAdjustmentCheckDTO dto);
/**
* 批量删除
*

38
epdc-cloud-points/src/main/java/com/elink/esua/epdc/service/impl/PointsIntegralAdjustmentCheckServiceImpl.java

@ -24,10 +24,13 @@ import com.elink.esua.epdc.commons.tools.page.PageData;
import com.elink.esua.epdc.commons.tools.utils.ConvertUtils;
import com.elink.esua.epdc.commons.tools.constant.FieldConstant;
import com.elink.esua.epdc.dao.PointsIntegralAdjustmentCheckDao;
import com.elink.esua.epdc.dto.EpdcAdjustUserPointsDTO;
import com.elink.esua.epdc.dto.PointsIntegralAdjustmentCheckDTO;
import com.elink.esua.epdc.entity.PointsIntegralAdjustmentCheckEntity;
import com.elink.esua.epdc.phrases.ActPhraseDTO;
import com.elink.esua.epdc.redis.PointsIntegralAdjustmentCheckRedis;
import com.elink.esua.epdc.service.PointsIntegralAdjustmentCheckService;
import com.elink.esua.epdc.service.PointsLogsService;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
@ -48,6 +51,8 @@ public class PointsIntegralAdjustmentCheckServiceImpl extends BaseServiceImpl<Po
@Autowired
private PointsIntegralAdjustmentCheckRedis pointsIntegralAdjustmentCheckRedis;
@Autowired
private PointsLogsService pointsLogsService;
@Override
public PageData<PointsIntegralAdjustmentCheckDTO> page(Map<String, Object> params) {
@ -58,6 +63,18 @@ public class PointsIntegralAdjustmentCheckServiceImpl extends BaseServiceImpl<Po
return getPageData(page, PointsIntegralAdjustmentCheckDTO.class);
}
/**
* 条件查询
* @param params
* @return
*/
@Override
public PageData<PointsIntegralAdjustmentCheckDTO> getPhrasePage(Map<String, Object> params) {
IPage<PointsIntegralAdjustmentCheckDTO> page = getPage(params);
List<PointsIntegralAdjustmentCheckDTO> list = baseDao.getPhrasePage(params);
return new PageData<>(list, page.getTotal());
}
@Override
public List<PointsIntegralAdjustmentCheckDTO> list(Map<String, Object> params) {
List<PointsIntegralAdjustmentCheckEntity> entityList = baseDao.selectList(getWrapper(params));
@ -92,6 +109,27 @@ public class PointsIntegralAdjustmentCheckServiceImpl extends BaseServiceImpl<Po
public void update(PointsIntegralAdjustmentCheckDTO dto) {
PointsIntegralAdjustmentCheckEntity entity = ConvertUtils.sourceToTarget(dto, PointsIntegralAdjustmentCheckEntity.class);
updateById(entity);
}
@Override
@Transactional(rollbackFor = Exception.class)
public void updateCheck(PointsIntegralAdjustmentCheckDTO dto) {
PointsIntegralAdjustmentCheckEntity entity = ConvertUtils.sourceToTarget(dto, PointsIntegralAdjustmentCheckEntity.class);
updateById(entity);
// 2:通过
if(dto.getState() == 2){
// 进行积分更改操作
PointsIntegralAdjustmentCheckEntity checkEntity = baseDao.selectById(dto.getId());
EpdcAdjustUserPointsDTO pointsDTO = ConvertUtils.sourceToTarget(checkEntity, EpdcAdjustUserPointsDTO.class);
// 为配合所调用的接口,进行的特殊处理
pointsDTO.setId(checkEntity.getUserId());
pointsLogsService.confirmUserAdjustPoint(pointsDTO);
}
}
@Override

42
epdc-cloud-points/src/main/resources/mapper/PointsIntegralAdjustmentCheckDao.xml

@ -27,5 +27,47 @@
<result property="updatedTime" column="UPDATED_TIME"/>
</resultMap>
<select id="getPhrasePage" resultType="com.elink.esua.epdc.dto.PointsIntegralAdjustmentCheckDTO">
select
pc.ID,
pc.USER_ID,
pc.NICKNAME,
pc.REAL_NAME,
pc.FACE_IMG,
pc.SEX,
( case pc.SEX when '0' then '女' when '1' then '男' else '未知' end ) as sexName,
pc.BIRTHDAY,
pc.MOBILE,
pc.POINTS,
pc.ADJUST_REASON,
pc.OPERATION_TYPE,
( case pc.OPERATION_TYPE when '0' then '减' when '1' then '加' else '' end ) as operationTypeName,
pc.OPERATE_POINTS,
pc.POINT_OPERATE_TYPE_CODE,
pc.POINT_OPERATE_TYPE_NAME,
pc.WORK_USER_ID,
pc.WORK_USER_NAME,
pc.WORK_USER_DEPT_ID,
pc.WORK_USER_DEPT_NAME,
pc.STATE,
( case pc.STATE when 2 then '通过' when 3 then '未通过' else '待审核' end ) as stateName,
pc.CHECK_OPINION,
pc.REVISION,
pc.DEL_FLAG,
pc.CREATED_BY,
pc.CREATED_TIME,
pc.UPDATED_BY,
pc.UPDATED_TIME
from epdc_points_integral_adjustment_check pc
where pc.DEL_FLAG = '0'
<if test="realName != null and realName != ''">
and pc.REAL_NAME like '%' #{realName} '%'
</if>
<if test="mobile != null and mobile != ''">
and pc.MOBILE like '%' #{mobile} '%'
</if>
order by pc.CREATED_TIME desc
</select>
</mapper>
Loading…
Cancel
Save