Browse Source

删除之前的热心居民申请审核接口

master
sunyuchao 5 years ago
parent
commit
24743f40ef
  1. 16
      epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/CustomerStaffGridController.java
  2. 12
      epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/feign/ResiPartymemberFeignClient.java
  3. 9
      epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/feign/fallback/ResiPartymemberFeignClientFallBack.java
  4. 12
      epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/CustomerStaffGridService.java
  5. 23
      epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/CustomerStaffGridServiceImpl.java
  6. 63
      epmet-module/resi-partymember/resi-partymember-client/src/main/java/com/epmet/resi/partymember/dto/warmhearted/form/ResiWarmheartedAuditFormDTO.java
  7. 5
      epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/warmhearted/controller/ResiWarmheartedApplyController.java
  8. 9
      epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/warmhearted/service/ResiWarmheartedApplyService.java
  9. 36
      epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/warmhearted/service/impl/ResiWarmheartedApplyServiceImpl.java

16
epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/CustomerStaffGridController.java

@ -17,19 +17,16 @@
package com.epmet.controller;
import com.epmet.commons.tools.annotation.LoginUser;
import com.epmet.commons.tools.page.PageData;
import com.epmet.commons.tools.security.dto.TokenDto;
import com.epmet.commons.tools.utils.ExcelUtils;
import com.epmet.commons.tools.utils.Result;
import com.epmet.commons.tools.validator.AssertUtils;
import com.epmet.commons.tools.validator.ValidatorUtils;
import com.epmet.commons.tools.validator.group.AddGroup;
import com.epmet.commons.tools.validator.group.UpdateGroup;
import com.epmet.commons.tools.validator.group.DefaultGroup;
import com.epmet.commons.tools.validator.group.UpdateGroup;
import com.epmet.dto.CustomerStaffGridDTO;
import com.epmet.excel.CustomerStaffGridExcel;
import com.epmet.resi.partymember.dto.warmhearted.form.ResiWarmheartedAuditFormDTO;
import com.epmet.service.CustomerStaffGridService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
@ -94,15 +91,4 @@ public class CustomerStaffGridController {
ExcelUtils.exportExcelToTarget(response, null, list, CustomerStaffGridExcel.class);
}
/**
* @param
* @Author sun
* @Description 政府端-热心居民申请人工审核
**/
@PostMapping("manageaudit")
public Result manageAudit(@LoginUser TokenDto tokenDTO, @RequestBody ResiWarmheartedAuditFormDTO formDTO) {
ValidatorUtils.validateEntity(formDTO);
return customerStaffGridService.manageAudit(tokenDTO, formDTO);
}
}

12
epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/feign/ResiPartymemberFeignClient.java

@ -1,11 +1,8 @@
package com.epmet.feign;
import com.epmet.commons.tools.constant.ServiceConstant;
import com.epmet.commons.tools.utils.Result;
import com.epmet.feign.fallback.ResiPartymemberFeignClientFallBack;
import com.epmet.resi.partymember.dto.warmhearted.form.ResiWarmheartedAuditFormDTO;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
/**
* @Description 政府端工作人员审核
@ -13,13 +10,4 @@ import org.springframework.web.bind.annotation.PostMapping;
*/
@FeignClient(name = ServiceConstant.RESI_PARTYMEMBER_SERVER, fallback = ResiPartymemberFeignClientFallBack.class)
public interface ResiPartymemberFeignClient {
/**
* @Author sun
* @Description 政府端-热心居民申请人工审核
**/
@PostMapping(value = "resi/partymember/resiwarmheartedapply/manageaudit")
Result manageAudit(ResiWarmheartedAuditFormDTO formDTO);
}

9
epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/feign/fallback/ResiPartymemberFeignClientFallBack.java

@ -1,10 +1,6 @@
package com.epmet.feign.fallback;
import com.epmet.commons.tools.constant.ServiceConstant;
import com.epmet.commons.tools.utils.ModuleUtils;
import com.epmet.commons.tools.utils.Result;
import com.epmet.feign.ResiPartymemberFeignClient;
import com.epmet.resi.partymember.dto.warmhearted.form.ResiWarmheartedAuditFormDTO;
import org.springframework.stereotype.Component;
/**
@ -13,9 +9,4 @@ import org.springframework.stereotype.Component;
*/
@Component
public class ResiPartymemberFeignClientFallBack implements ResiPartymemberFeignClient {
@Override
public Result manageAudit(ResiWarmheartedAuditFormDTO formDTO) {
return ModuleUtils.feignConError(ServiceConstant.RESI_PARTYMEMBER_SERVER, "manageAudit", formDTO);
}
}

12
epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/CustomerStaffGridService.java

@ -19,11 +19,8 @@ package com.epmet.service;
import com.epmet.commons.mybatis.service.BaseService;
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.dto.CustomerStaffGridDTO;
import com.epmet.entity.CustomerStaffGridEntity;
import com.epmet.resi.partymember.dto.warmhearted.form.ResiWarmheartedAuditFormDTO;
import java.util.List;
import java.util.Map;
@ -96,13 +93,4 @@ public interface CustomerStaffGridService extends BaseService<CustomerStaffGridE
*/
void delete(String[] ids);
/**
* 政府端-热心居民申请人工审核
*
* @param
* @return void
* @author sun
*/
Result manageAudit(TokenDto tokenDTO, ResiWarmheartedAuditFormDTO formDTO);
}

23
epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/CustomerStaffGridServiceImpl.java

@ -21,21 +21,14 @@ import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.epmet.commons.mybatis.service.impl.BaseServiceImpl;
import com.epmet.commons.tools.constant.FieldConstant;
import com.epmet.commons.tools.constant.NumConstant;
import com.epmet.commons.tools.exception.EpmetErrorCode;
import com.epmet.commons.tools.exception.RenException;
import com.epmet.commons.tools.page.PageData;
import com.epmet.commons.tools.security.dto.TokenDto;
import com.epmet.commons.tools.utils.ConvertUtils;
import com.epmet.commons.tools.utils.Result;
import com.epmet.dao.CustomerStaffGridDao;
import com.epmet.dto.CustomerStaffGridDTO;
import com.epmet.entity.CustomerStaffGridEntity;
import com.epmet.feign.ResiPartymemberFeignClient;
import com.epmet.redis.CustomerStaffGridRedis;
import com.epmet.resi.partymember.dto.warmhearted.form.ResiWarmheartedAuditFormDTO;
import com.epmet.service.CustomerStaffGridService;
import com.epmet.util.ModuleConstant;
import org.apache.commons.lang3.StringUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@ -113,20 +106,4 @@ public class CustomerStaffGridServiceImpl extends BaseServiceImpl<CustomerStaffG
baseDao.deleteBatchIds(Arrays.asList(ids));
}
/**
* @param
* @Author sun
* @Description 政府端-热心居民申请人工审核
**/
@Override
public Result manageAudit(TokenDto tokenDTO, ResiWarmheartedAuditFormDTO formDTO) {
if (null == tokenDTO || StringUtils.isBlank(tokenDTO.getUserId())) {
logger.error(ModuleConstant.USER_NOT_NULL);
throw new RenException(ModuleConstant.USER_NOT_NULL);
}
formDTO.setUserId(tokenDTO.getUserId());
return resiPartymemberFeignClient.manageAudit(formDTO);
}
}

63
epmet-module/resi-partymember/resi-partymember-client/src/main/java/com/epmet/resi/partymember/dto/warmhearted/form/ResiWarmheartedAuditFormDTO.java

@ -1,63 +0,0 @@
/**
* Copyright 2018 人人开源 https://www.renren.io
* <p>
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
* <p>
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* <p>
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package com.epmet.resi.partymember.dto.warmhearted.form;
import lombok.Data;
import javax.validation.constraints.NotBlank;
import java.io.Serializable;
/**
* 政府端-人工审核热心居民申请-配置入参
* @author sun
*/
@Data
public class ResiWarmheartedAuditFormDTO implements Serializable {
private static final long serialVersionUID = 1L;
/**
* 热心居民申请id
*/
@NotBlank(message = "申请ID不能为空")
private String resiWarmApplyId;
/**
* 审核状态(0:取消驳回 1:审核通过)
*/
@NotBlank(message = "审核状态不能为空")
private String auditStatus;
/**
* 驳回理由
*/
private String refuseReason;
/**
* 客户Id CUSTOMER.id
*/
@NotBlank(message = "客户ID不能为空")
private String customerId;
/**
* 用户Id
*/
private String userId;
}

5
epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/warmhearted/controller/ResiWarmheartedApplyController.java

@ -107,11 +107,6 @@ public class ResiWarmheartedApplyController {
return resiWarmheartedApplyService.submit(formDTO);
}
@PostMapping("manageaudit")
public Result manageAudit(@RequestBody ResiWarmheartedAuditFormDTO formDTO) {
return resiWarmheartedApplyService.manageAudit(formDTO);
}
/**
* 热心居民审核历史列表
*

9
epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/warmhearted/service/ResiWarmheartedApplyService.java

@ -116,15 +116,6 @@ public interface ResiWarmheartedApplyService extends BaseService<ResiWarmhearted
*/
Result submit(ResiWarmheartedSubmitFormDTO formDTO);
/**
* 政府端-热心居民申请人工审核
*
* @param
* @return void
* @author sun
*/
Result manageAudit(ResiWarmheartedAuditFormDTO formDTO);
/**
* 热心居民审核历史列表
* @param formDTO 参数

36
epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/warmhearted/service/impl/ResiWarmheartedApplyServiceImpl.java

@ -249,42 +249,6 @@ public class ResiWarmheartedApplyServiceImpl extends BaseServiceImpl<ResiWarmhea
epmetMessageFeignClient.saveUserMessage(userMessageFormDTO);
}
@Override
@Transactional(rollbackFor = Exception.class)
public Result manageAudit(ResiWarmheartedAuditFormDTO formDTO) {
Result result = new Result();
//1:更新热心居民申请表数据
ResiWarmheartedApplyEntity entity = new ResiWarmheartedApplyEntity();
entity.setId(formDTO.getResiWarmApplyId());
if (NumConstant.ZERO_STR.equals(formDTO.getAuditStatus())) {
//审核状态-未通过
entity.setAuditStatus(PartyMemberConstant.REJECTED);
} else {
//审核状态-通过
entity.setAuditStatus(PartyMemberConstant.APPROVED);
}
if (!StringUtils.isBlank(formDTO.getRefuseReason())) {
entity.setRefuseReason(formDTO.getRefuseReason());
}
int num = baseDao.updateById(entity);
//2:审核通过的添加热心居民的角色
if (num > NumConstant.ZERO && NumConstant.ONE_STR.equals(formDTO.getAuditStatus())) {
//查询需要添加热心居民角色的userId
ResiWarmheartedApplyEntity resiWarmheartedApplyEntity = baseDao.selectById(formDTO.getResiWarmApplyId());
UserRoleDTO dto = new UserRoleDTO();
dto.setCustomerId(formDTO.getCustomerId());
dto.setUserId(resiWarmheartedApplyEntity.getUserId());
//所属端-居民端
dto.setApp(AppClientConstant.APP_RESI);
//角色-热心居民
dto.setRoleKey(EpmetRoleKeyConstant.WARMHEARTED);
//角色表新增网格Id
dto.setGridId(resiWarmheartedApplyEntity.getGridId());
result = epmetUserFeignClient.saveUserRole(dto);
}
return result;
}
@Override
public Result<List<ResiWarmheartedAuditedResultDTO>> audited(ResiWarmheartedAuditedFromDTO formDTO) {
Result<List<ResiWarmheartedAuditedResultDTO>> result = new Result<>();

Loading…
Cancel
Save