Browse Source

Merge remote-tracking branch 'origin/yantai_zhengwu_master' into dev

master
yinzuomei 3 years ago
parent
commit
872ed1f71c
  1. 7
      epmet-admin/epmet-admin-client/src/main/java/com/epmet/dto/form/LogOperationListFormDTO.java
  2. 18
      epmet-module/gov-voice/gov-voice-server/src/main/resources/db/migration/V0.0.13__tag_scope.sql
  3. 58
      epmet-user/epmet-user-client/src/main/java/com/epmet/dto/form/BadgeAuditPageFormDTO.java
  4. 14
      epmet-user/epmet-user-client/src/main/java/com/epmet/dto/result/BadgeAuditRecordResultDTO.java
  5. 1
      epmet-user/epmet-user-client/src/main/java/com/epmet/dto/result/BadgeListResultDTO.java
  6. 4
      epmet-user/epmet-user-client/src/main/java/com/epmet/dto/result/CertificationDetailResultDTO.java
  7. 23
      epmet-user/epmet-user-server/src/main/java/com/epmet/controller/BadgeController.java
  8. 15
      epmet-user/epmet-user-server/src/main/java/com/epmet/dao/BadgeDao.java
  9. 1
      epmet-user/epmet-user-server/src/main/java/com/epmet/entity/UserBadgeCertificateRecordEntity.java
  10. 14
      epmet-user/epmet-user-server/src/main/java/com/epmet/service/BadgeService.java
  11. 40
      epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/BadgeServiceImpl.java
  12. 6
      epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/UserBadgeServiceImpl.java
  13. 58
      epmet-user/epmet-user-server/src/main/resources/mapper/BadgeDao.xml
  14. 3
      epmet-user/epmet-user-server/src/main/resources/mapper/UserBadgeDao.xml

7
epmet-admin/epmet-admin-client/src/main/java/com/epmet/dto/form/LogOperationListFormDTO.java

@ -27,7 +27,12 @@ public class LogOperationListFormDTO {
*/
private String endTime;
/**
* 默认传data_tm
* 产品原本前端默认传data_tm
* 03.01烟台需求列表展示全部
* 项目流转project_changed
* 登录auth
* 积分point
* 查看脱敏信息data_tm
*/
private String category;
}

18
epmet-module/gov-voice/gov-voice-server/src/main/resources/db/migration/V0.0.13__tag_scope.sql

@ -1,18 +0,0 @@
alter table tag_customer add COLUMN SHOW_FLAG TINYINT(1) DEFAULT 1 comment '1:展示;0:隐藏;0302因烟台需求增加此列默认1' after USE_COUNT;
CREATE TABLE `tag_scope` (
`ID` varchar(64) NOT NULL COMMENT '主键(0302因烟台需求增加此表)',
`CUSTOMER_ID` varchar(64) NOT NULL COMMENT '客户ID(0302因烟台需求增加此表)',
`TAG_ID` varchar(64) NOT NULL COMMENT '标签ID',
`AGENCY_ID` varchar(64) NOT NULL COMMENT '应用范围,这里只能是社区id',
`ORG_ID_PATH` varchar(255) NOT NULL COMMENT 'agency_id全路径,包含自身',
`DEL_FLAG` int(11) NOT NULL DEFAULT '0' COMMENT '删除标识 0.未删除 1.已删除',
`REVISION` int(11) NOT NULL COMMENT '乐观锁',
`CREATED_BY` varchar(32) NOT NULL COMMENT '创建人',
`CREATED_TIME` datetime NOT NULL COMMENT '创建时间',
`UPDATED_BY` varchar(32) NOT NULL COMMENT '更新人',
`UPDATED_TIME` datetime NOT NULL COMMENT '更新时间',
PRIMARY KEY (`ID`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='标签应用范围表';

58
epmet-user/epmet-user-client/src/main/java/com/epmet/dto/form/BadgeAuditPageFormDTO.java

@ -0,0 +1,58 @@
package com.epmet.dto.form;
import com.epmet.commons.tools.validator.group.CustomerClientShowGroup;
import lombok.Data;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.io.Serializable;
/**
* @Description
* @Author yzm
* @Date 2023/3/6 9:58
*/
@Data
public class BadgeAuditPageFormDTO implements Serializable {
private static final long serialVersionUID = -6908967598027076330L;
public interface AddUserInternalGroup {
}
public interface AddUserShowGroup extends CustomerClientShowGroup {
}
@NotBlank(message = "customerId不能为空", groups = AddUserInternalGroup.class)
private String customerId;
/**
* 页码
*/
@NotNull(message = "pageNo不能为空", groups = AddUserInternalGroup.class)
private Integer pageNo;
/**
* 每页显示数量
*/
@NotNull(message = "pageSize不能为空", groups = AddUserInternalGroup.class)
private Integer pageSize;
/**
* 当前用户所属的组织id
*/
@NotBlank(message = "agencyId不能为空", groups = AddUserInternalGroup.class)
private String agencyId;
/**
* 网格Id
*/
private String gridId;
/**
* 徽章id
*/
private String badgeId;
/**
* 审核状态 approved:审核通过rejected:审核驳回;auditing:审核中
*/
private String auditStatus;
}

14
epmet-user/epmet-user-client/src/main/java/com/epmet/dto/result/BadgeAuditRecordResultDTO.java

@ -37,7 +37,7 @@ public class BadgeAuditRecordResultDTO implements Serializable {
*/
private Long createTime;
/**
* 用户名
* 审核状态 approved:审核通过rejected:审核驳回;auditing:审核中
*/
private String auditStatus;
@ -50,4 +50,16 @@ public class BadgeAuditRecordResultDTO implements Serializable {
* 审核记录ID
*/
private String recordId;
/**
* pc端徽章审核-分页列表赋值
* 03.07:烟台需求pc端增加徽章审核
*/
private String gridId;
/**
* pc端徽章审核-分页列表赋值
* 03.07:烟台需求pc端增加徽章审核
* 网格名称社区-网格
*/
private String gridName;
}

1
epmet-user/epmet-user-client/src/main/java/com/epmet/dto/result/BadgeListResultDTO.java

@ -32,4 +32,5 @@ public class BadgeListResultDTO {
* 固有徽章类型 党员徽章party;none
*/
private String type;
private String customerId;
}

4
epmet-user/epmet-user-client/src/main/java/com/epmet/dto/result/CertificationDetailResultDTO.java

@ -63,6 +63,8 @@ public class CertificationDetailResultDTO implements Serializable {
*/
private String recordId;
private String gridId;
private String gridName;
public CertificationDetailResultDTO() {
this.surname = "";
this.name = "";
@ -74,5 +76,7 @@ public class CertificationDetailResultDTO implements Serializable {
this.authResult = "";
this.authReason = "";
this.recordId = "";
this.gridId="";
this.gridName="";
}
}

23
epmet-user/epmet-user-server/src/main/java/com/epmet/controller/BadgeController.java

@ -4,6 +4,7 @@ import com.epmet.commons.tools.annotation.LoginUser;
import com.epmet.commons.tools.annotation.RequirePermission;
import com.epmet.commons.tools.aop.NoRepeatSubmit;
import com.epmet.commons.tools.enums.RequirePermissionEnum;
import com.epmet.commons.tools.page.PageData;
import com.epmet.commons.tools.security.dto.TokenDto;
import com.epmet.commons.tools.utils.Result;
import com.epmet.commons.tools.validator.ValidatorUtils;
@ -140,6 +141,20 @@ public class BadgeController {
return new Result<List<BadgeAuditRecordResultDTO>>().ok(result);
}
/**
* pc端徽章审核-分页列表
*
* @param formDTO
* @return
*/
@PostMapping("audit-page-list")
public Result<PageData<BadgeAuditRecordResultDTO>> auditPageList(@LoginUser TokenDto tokenDto,@RequestBody BadgeAuditPageFormDTO formDTO) {
formDTO.setCustomerId(tokenDto.getCustomerId());
ValidatorUtils.validateEntity(formDTO, BadgeAuditPageFormDTO.AddUserInternalGroup.class, BadgeAuditPageFormDTO.AddUserShowGroup.class);
return new Result<PageData<BadgeAuditRecordResultDTO>>().ok(badgeService.auditPageList(formDTO));
}
/**
* 审核
* @author zhaoqifeng
@ -232,4 +247,12 @@ public class BadgeController {
return new Result<Integer>().ok(badgeService.deleteBadgeCertificateAuditing(customerId,gridId));
}
/**
* 查询当前客户下所有的徽章用于pc徽章审核查询条件
* @return
*/
@PostMapping("badge-options")
public Result<List<BadgeListResultDTO>> queryBadgeOptions(@LoginUser TokenDto tokenDto){
return new Result<List<BadgeListResultDTO>>().ok(badgeService.queryBadgeOptions(tokenDto.getCustomerId()));
}
}

15
epmet-user/epmet-user-server/src/main/java/com/epmet/dao/BadgeDao.java

@ -213,4 +213,19 @@ public interface BadgeDao extends BaseDao<BadgeEntity> {
*/
Integer badgeAuditReset(@Param("gridId") String gridId);
/**
* pc端徽章审核-分页列表
*
* @param customerId
* @param agencyId
* @param gridId
* @param badgeId
* @param auditStatus
* @return
*/
List<BadgeAuditRecordResultDTO> auditPageList(@Param("customerId") String customerId,
@Param("agencyId") String agencyId,
@Param("gridId") String gridId,
@Param("badgeId") String badgeId,
@Param("auditStatus") String auditStatus);
}

1
epmet-user/epmet-user-server/src/main/java/com/epmet/entity/UserBadgeCertificateRecordEntity.java

@ -47,6 +47,7 @@ public class UserBadgeCertificateRecordEntity extends BaseEpmetEntity {
*/
private String gridId;
/**
* 用户ID
*/

14
epmet-user/epmet-user-server/src/main/java/com/epmet/service/BadgeService.java

@ -215,4 +215,18 @@ public interface BadgeService extends BaseService<BadgeEntity> {
* @return
*/
Integer deleteBadgeCertificateAuditing(String customerId, String gridId);
/**
* pc端徽章审核-分页列表
* @param formDTO
* @return
*/
PageData<BadgeAuditRecordResultDTO> auditPageList(BadgeAuditPageFormDTO formDTO);
/**
* 查询当前客户下所有的徽章用于pc徽章审核查询条件
* @param customerId
* @return
*/
List<BadgeListResultDTO> queryBadgeOptions(String customerId);
}

40
epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/BadgeServiceImpl.java

@ -30,6 +30,8 @@ import com.epmet.commons.tools.exception.ValidateException;
import com.epmet.commons.tools.page.PageData;
import com.epmet.commons.tools.redis.RedisKeys;
import com.epmet.commons.tools.redis.RedisUtils;
import com.epmet.commons.tools.redis.common.CustomerOrgRedis;
import com.epmet.commons.tools.redis.common.bean.GridInfoCache;
import com.epmet.commons.tools.security.dto.TokenDto;
import com.epmet.commons.tools.utils.ConvertUtils;
import com.epmet.commons.tools.utils.Result;
@ -49,6 +51,8 @@ import com.epmet.feign.EpmetMessageOpenFeignClient;
import com.epmet.feign.MessageFeignClient;
import com.epmet.redis.UserBadgeRedis;
import com.epmet.service.*;
import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.collections4.CollectionUtils;
import org.apache.commons.lang3.StringUtils;
@ -516,4 +520,40 @@ public class BadgeServiceImpl extends BaseServiceImpl<BadgeDao, BadgeEntity> imp
public Integer deleteBadgeCertificateAuditing(String customerId, String gridId) {
return userBadgeCertificateRecordService.deleteBadgeCertificateAuditing(customerId,gridId);
}
/**
* pc端徽章审核-分页列表
*
* @param formDTO
* @return
*/
@Override
public PageData<BadgeAuditRecordResultDTO> auditPageList(BadgeAuditPageFormDTO formDTO) {
PageHelper.startPage(formDTO.getPageNo(), formDTO.getPageSize());
List<BadgeAuditRecordResultDTO> list = baseDao.auditPageList(formDTO.getCustomerId(),
formDTO.getAgencyId(),
formDTO.getGridId(),
formDTO.getBadgeId(),
formDTO.getAuditStatus());
list.forEach(dto -> {
GridInfoCache gridInfoCache = CustomerOrgRedis.getGridInfo(dto.getGridId());
if (null != gridInfoCache) {
dto.setGridName(gridInfoCache.getGridNamePath());
}
});
PageInfo<BadgeAuditRecordResultDTO> pageInfo = new PageInfo<>(list);
return new PageData<>(list, pageInfo.getTotal());
}
/**
* 查询当前客户下所有的徽章用于pc徽章审核查询条件
*
* @param customerId
* @return
*/
@Override
public List<BadgeListResultDTO> queryBadgeOptions(String customerId) {
List<BadgeListResultDTO> list=baseDao.selectList(customerId);
return list;
}
}

6
epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/UserBadgeServiceImpl.java

@ -6,6 +6,8 @@ import com.epmet.commons.tools.constant.NumConstant;
import com.epmet.commons.tools.exception.EpmetErrorCode;
import com.epmet.commons.tools.exception.EpmetException;
import com.epmet.commons.tools.exception.RenException;
import com.epmet.commons.tools.redis.common.CustomerOrgRedis;
import com.epmet.commons.tools.redis.common.bean.GridInfoCache;
import com.epmet.commons.tools.security.dto.TokenDto;
import com.epmet.commons.tools.utils.ConvertUtils;
import com.epmet.commons.tools.utils.Result;
@ -413,6 +415,10 @@ public class UserBadgeServiceImpl implements UserBadgeService {
resiResult.setIdcard(userInfo.getIdNum());
}
}
GridInfoCache gridInfoCache= CustomerOrgRedis.getGridInfo(resiResult.getGridId());
if(null!=gridInfoCache){
resiResult.setGridName(gridInfoCache.getGridNamePath());
}
return resiResult;
}

58
epmet-user/epmet-user-server/src/main/resources/mapper/BadgeDao.xml

@ -67,7 +67,8 @@
BADGE_NAME,
BADGE_ICON,
BADGE_STATUS,
FIXATION_BADGE_TYPE AS "type"
FIXATION_BADGE_TYPE AS "type",
CUSTOMER_ID as customerId
FROM
(
SELECT * FROM badge
@ -340,4 +341,59 @@
AND AUDIT_STATUS = 'auditing'
AND GRID_ID = #{gridId}
</select>
<!-- pc端徽章审核-分页列表 -->
<select id="auditPageList" parameterType="map" resultType="com.epmet.dto.result.BadgeAuditRecordResultDTO">
SELECT
ubcr.ID AS recordId,
ubcr.badge_id AS "badgeId",
badge.BADGE_NAME,
badge.BADGE_ICON,
ubcr.USER_ID,
ubcr.AUDIT_STATUS,
ubi.REAL_NAME AS "userName",
ubi.HEAD_IMG_URL AS userAvatar,
unix_timestamp(ubcr.CREATED_TIME) AS "createTime",
ubcr.GRID_ID as gridId,
'' as gridName,
ubcr.AUDIT_STATUS as auditStatus
FROM
user_badge_certificate_record ubcr
LEFT JOIN user_base_info ubi ON ubcr.USER_ID = ubi.USER_ID AND ubi.DEL_FLAG = '0'
LEFT JOIN (SELECT
ID,
BADGE_NAME,
BADGE_ICON,
BADGE_STATUS
FROM
(
SELECT * FROM badge
WHERE CUSTOMER_ID = #{customerId} AND DEL_FLAG = '0'
<if test='null != badgeId and "" != badgeId'>
and id = #{badgeId}
</if>
UNION ALL
SELECT * FROM badge a
WHERE CUSTOMER_ID = 'default' AND a.DEL_FLAG = '0'
<if test='null != badgeId and "" != badgeId'>
and a.id = #{badgeId}
</if>
AND NOT EXISTS
( SELECT ID FROM badge b WHERE CUSTOMER_ID = #{customerId} AND a.ID = b.ID AND b.DEL_FLAG = '0')) t) badge ON ubcr.BADGE_ID = badge.ID
WHERE ubcr.DEL_FLAG = '0'
AND ubcr.CUSTOMER_ID = #{customerId}
<if test='null != agencyId and "" != agencyId'>
and ubcr.AGENCY_ID= #{agencyId}
</if>
<if test='null != gridId and "" != gridId'>
AND ubcr.GRID_ID = #{gridId}
</if>
<if test='null != badgeId and "" != badgeId'>
and ubcr.badge_id =#{badgeId}
</if>
<if test='null != auditStatus and "" != auditStatus'>
and ubcr.AUDIT_STATUS = #{auditStatus}
</if>
ORDER BY ubcr.CREATED_TIME DESC
</select>
</mapper>

3
epmet-user/epmet-user-server/src/main/resources/mapper/UserBadgeDao.xml

@ -115,7 +115,8 @@
AUDIT_STATUS,
AUDIT_STATUS AS authResult,
AUDIT_REMARK AS authReason,
ID AS recordId
ID AS recordId,
GRID_ID as gridId
FROM
user_badge_certificate_record
WHERE

Loading…
Cancel
Save