diff --git a/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/exception/EpmetErrorCode.java b/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/exception/EpmetErrorCode.java index c4262835b7..fe76e0f607 100644 --- a/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/exception/EpmetErrorCode.java +++ b/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/exception/EpmetErrorCode.java @@ -25,7 +25,8 @@ public enum EpmetErrorCode { */ MOBILE_EXIST(8201, "该手机号已注册居民,请使用其他手机号注册!"), PARAMETER_EXCEPTION(8202, "必要参数存在空值或手机号输入不合规,请检查参数赋值情况!!"), - UPDATE_EXCEPTION(8203, "用户居民注册访问记录表更新数据失败!"); + UPDATE_EXCEPTION(8203, "用户居民注册访问记录表更新数据失败!"), + PARTICIPATION_EXCEPTION(8204, "参数异常,请检查所传参数是否合规!"); private int value; diff --git a/epmet-module/resi-mine/resi-mine-server/src/main/java/com/epmet/modules/feign/ResiPartymemberFeignClient.java b/epmet-module/resi-mine/resi-mine-server/src/main/java/com/epmet/modules/feign/ResiPartymemberFeignClient.java index 51796840f4..541d86fb2b 100644 --- a/epmet-module/resi-mine/resi-mine-server/src/main/java/com/epmet/modules/feign/ResiPartymemberFeignClient.java +++ b/epmet-module/resi-mine/resi-mine-server/src/main/java/com/epmet/modules/feign/ResiPartymemberFeignClient.java @@ -7,6 +7,7 @@ import com.epmet.resi.mine.dto.from.PartyMemberInitFromDTO; import com.epmet.resi.mine.dto.from.VerificationCodeFromDTO; import com.epmet.resi.mine.dto.result.PartyMemberInitResultDTO; import com.epmet.resi.partymember.dto.partymember.PartymemberInfoDTO; +import com.epmet.resi.partymember.dto.warmhearted.form.ResiWarmheartedAuditFormDTO; import com.epmet.resi.partymember.dto.warmhearted.form.ResiWarmheartedFormDTO; import com.epmet.resi.partymember.dto.warmhearted.form.ResiWarmheartedSubmitFormDTO; import com.epmet.resi.partymember.dto.warmhearted.result.ResiWarmheartedResultDTO; @@ -76,4 +77,13 @@ public interface ResiPartymemberFeignClient { */ @PostMapping("/resi/partymember/confirm/extra") Result partyMemberInfoExtra(@RequestBody PartymemberInfoDTO partyMemberInfoDTO); + + /** + * @Author sun + * @Description 政府端-热心居民申请人工审核 + **/ + @PostMapping(value = "resi/partymember/resiwarmheartedapply/manageaudit") + Result manageAudit(ResiWarmheartedAuditFormDTO formDTO); + + } diff --git a/epmet-module/resi-mine/resi-mine-server/src/main/java/com/epmet/modules/feign/fallback/ResiPartymemberFeignClientFallBack.java b/epmet-module/resi-mine/resi-mine-server/src/main/java/com/epmet/modules/feign/fallback/ResiPartymemberFeignClientFallBack.java index 7559eb81fb..acff6efa3f 100644 --- a/epmet-module/resi-mine/resi-mine-server/src/main/java/com/epmet/modules/feign/fallback/ResiPartymemberFeignClientFallBack.java +++ b/epmet-module/resi-mine/resi-mine-server/src/main/java/com/epmet/modules/feign/fallback/ResiPartymemberFeignClientFallBack.java @@ -8,6 +8,7 @@ import com.epmet.resi.mine.dto.from.PartyMemberInitFromDTO; import com.epmet.resi.mine.dto.from.VerificationCodeFromDTO; import com.epmet.resi.mine.dto.result.PartyMemberInitResultDTO; import com.epmet.resi.partymember.dto.partymember.PartymemberInfoDTO; +import com.epmet.resi.partymember.dto.warmhearted.form.ResiWarmheartedAuditFormDTO; import com.epmet.resi.partymember.dto.warmhearted.form.ResiWarmheartedFormDTO; import com.epmet.resi.partymember.dto.warmhearted.form.ResiWarmheartedSubmitFormDTO; import com.epmet.resi.partymember.dto.warmhearted.result.ResiWarmheartedResultDTO; @@ -61,4 +62,9 @@ public class ResiPartymemberFeignClientFallBack implements ResiPartymemberFeignC public Result partyMemberInfoExtra(PartymemberInfoDTO partyMemberInfoDTO) { return ModuleUtils.feignConError(ServiceConstant.RESI_PARTYMEMBER_SERVER, "partyMemberInfoExtra", partyMemberInfoDTO); } + + @Override + public Result manageAudit(ResiWarmheartedAuditFormDTO formDTO) { + return ModuleUtils.feignConError(ServiceConstant.RESI_PARTYMEMBER_SERVER, "manageAudit", formDTO); + } } diff --git a/epmet-module/resi-mine/resi-mine-server/src/main/java/com/epmet/modules/warmhearted/controller/ResiWarmheartedController.java b/epmet-module/resi-mine/resi-mine-server/src/main/java/com/epmet/modules/warmhearted/controller/ResiWarmheartedController.java index 0f3d22fe2f..c5896ce965 100644 --- a/epmet-module/resi-mine/resi-mine-server/src/main/java/com/epmet/modules/warmhearted/controller/ResiWarmheartedController.java +++ b/epmet-module/resi-mine/resi-mine-server/src/main/java/com/epmet/modules/warmhearted/controller/ResiWarmheartedController.java @@ -4,6 +4,7 @@ import com.epmet.commons.tools.annotation.LoginUser; import com.epmet.commons.tools.security.dto.TokenDto; import com.epmet.commons.tools.utils.Result; import com.epmet.modules.warmhearted.service.ResiWarmheartedService; +import com.epmet.resi.partymember.dto.warmhearted.form.ResiWarmheartedAuditFormDTO; import com.epmet.resi.partymember.dto.warmhearted.form.ResiWarmheartedFormDTO; import com.epmet.resi.partymember.dto.warmhearted.form.ResiWarmheartedSubmitFormDTO; import com.epmet.resi.partymember.dto.warmhearted.result.ResiWarmheartedResultDTO; @@ -44,5 +45,15 @@ public class ResiWarmheartedController { return resiWarmheartedService.submit(tokenDTO, formDTO); } + /** + * @param + * @Author sun + * @Description 政府端-热心居民申请人工审核 + **/ + @PostMapping("manageaudit") + public Result manageAudit(@LoginUser TokenDto tokenDTO, @RequestBody ResiWarmheartedAuditFormDTO formDTO) { + return resiWarmheartedService.manageAudit(tokenDTO, formDTO); + } + } diff --git a/epmet-module/resi-mine/resi-mine-server/src/main/java/com/epmet/modules/warmhearted/service/ResiWarmheartedService.java b/epmet-module/resi-mine/resi-mine-server/src/main/java/com/epmet/modules/warmhearted/service/ResiWarmheartedService.java index 12924304d3..a222f93e65 100644 --- a/epmet-module/resi-mine/resi-mine-server/src/main/java/com/epmet/modules/warmhearted/service/ResiWarmheartedService.java +++ b/epmet-module/resi-mine/resi-mine-server/src/main/java/com/epmet/modules/warmhearted/service/ResiWarmheartedService.java @@ -2,6 +2,7 @@ package com.epmet.modules.warmhearted.service; import com.epmet.commons.tools.security.dto.TokenDto; import com.epmet.commons.tools.utils.Result; +import com.epmet.resi.partymember.dto.warmhearted.form.ResiWarmheartedAuditFormDTO; import com.epmet.resi.partymember.dto.warmhearted.form.ResiWarmheartedFormDTO; import com.epmet.resi.partymember.dto.warmhearted.form.ResiWarmheartedSubmitFormDTO; import com.epmet.resi.partymember.dto.warmhearted.result.ResiWarmheartedResultDTO; @@ -31,4 +32,13 @@ public interface ResiWarmheartedService { */ Result submit(TokenDto tokenDTO, ResiWarmheartedSubmitFormDTO formDTO); + /** + * 政府端-热心居民申请人工审核 + * + * @param + * @return void + * @author sun + */ + Result manageAudit(TokenDto tokenDTO, ResiWarmheartedAuditFormDTO formDTO); + } diff --git a/epmet-module/resi-mine/resi-mine-server/src/main/java/com/epmet/modules/warmhearted/service/impl/ResiWarmheartedServiceImpl.java b/epmet-module/resi-mine/resi-mine-server/src/main/java/com/epmet/modules/warmhearted/service/impl/ResiWarmheartedServiceImpl.java index 2d8fa6ad62..3d51c81005 100644 --- a/epmet-module/resi-mine/resi-mine-server/src/main/java/com/epmet/modules/warmhearted/service/impl/ResiWarmheartedServiceImpl.java +++ b/epmet-module/resi-mine/resi-mine-server/src/main/java/com/epmet/modules/warmhearted/service/impl/ResiWarmheartedServiceImpl.java @@ -1,11 +1,13 @@ package com.epmet.modules.warmhearted.service.impl; +import com.epmet.commons.tools.constant.NumConstant; import com.epmet.commons.tools.exception.EpmetErrorCode; import com.epmet.commons.tools.security.dto.TokenDto; import com.epmet.commons.tools.utils.Result; import com.epmet.modules.feign.ResiPartymemberFeignClient; import com.epmet.modules.utils.ModuleConstant; import com.epmet.modules.warmhearted.service.ResiWarmheartedService; +import com.epmet.resi.partymember.dto.warmhearted.form.ResiWarmheartedAuditFormDTO; import com.epmet.resi.partymember.dto.warmhearted.form.ResiWarmheartedFormDTO; import com.epmet.resi.partymember.dto.warmhearted.form.ResiWarmheartedSubmitFormDTO; import com.epmet.resi.partymember.dto.warmhearted.result.ResiWarmheartedResultDTO; @@ -51,15 +53,36 @@ public class ResiWarmheartedServiceImpl implements ResiWarmheartedService { @Override public Result submit(TokenDto tokenDTO, ResiWarmheartedSubmitFormDTO formDTO) { if (null == tokenDTO || StringUtils.isBlank(tokenDTO.getUserId())) { - return new Result().error(ModuleConstant.USER_NOT_NULL); + return new Result().error(ModuleConstant.USER_NOT_NULL); } if (null == formDTO || StringUtils.isBlank(formDTO.getCustomerId()) || StringUtils.isBlank(formDTO.getGridId()) || StringUtils.isBlank(formDTO.getResiWarmVisitId()) || StringUtils.isBlank(formDTO.getReason())) { - return new Result().error(EpmetErrorCode.PARAMETER_EXCEPTION.getName()); + return new Result().error(EpmetErrorCode.PARAMETER_EXCEPTION.getName()); } formDTO.setUserId(tokenDTO.getUserId()); return resiPartymemberFeignClient.submit(formDTO); } + + /** + * @param + * @Author sun + * @Description 政府端-热心居民申请人工审核 + **/ + @Override + public Result manageAudit(TokenDto tokenDTO, ResiWarmheartedAuditFormDTO formDTO) { + if (null == tokenDTO || StringUtils.isBlank(tokenDTO.getUserId())) { + return new Result().error(ModuleConstant.USER_NOT_NULL); + } + if (null == formDTO || StringUtils.isBlank(formDTO.getCustomerId()) + || StringUtils.isBlank(formDTO.getResiWarmApplyId()) + || StringUtils.isBlank(formDTO.getAuditStatus()) + || (!NumConstant.ZERO_STR.equals(formDTO.getAuditStatus())&&!NumConstant.ONE_STR.equals(formDTO.getAuditStatus()))) { + return new Result().error(EpmetErrorCode.PARTICIPATION_EXCEPTION.getName()); + } + formDTO.setUserId(tokenDTO.getUserId()); + return resiPartymemberFeignClient.manageAudit(formDTO); + } + } diff --git a/epmet-module/resi-partymember/resi-partymember-client/src/main/java/com/epmet/resi/partymember/dto/warmhearted/form/ResiWarmheartedAuditFormDTO.java b/epmet-module/resi-partymember/resi-partymember-client/src/main/java/com/epmet/resi/partymember/dto/warmhearted/form/ResiWarmheartedAuditFormDTO.java new file mode 100644 index 0000000000..6c35e40152 --- /dev/null +++ b/epmet-module/resi-partymember/resi-partymember-client/src/main/java/com/epmet/resi/partymember/dto/warmhearted/form/ResiWarmheartedAuditFormDTO.java @@ -0,0 +1,65 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

+ * 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. + *

+ * 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. + *

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +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; + + /** + * 驳回理由 + */ + @NotBlank(message = "驳回理由不能为空") + private String refuseReason; + + /** + * 客户Id CUSTOMER.id + */ + @NotBlank(message = "客户ID不能为空") + private String customerId; + + /** + * 用户Id + */ + @NotBlank(message = "用户ID不能为空") + private String userId; + +} \ No newline at end of file diff --git a/epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/warmhearted/controller/ResiWarmheartedApplyController.java b/epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/warmhearted/controller/ResiWarmheartedApplyController.java index 430be44a6c..ec08f6f466 100644 --- a/epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/warmhearted/controller/ResiWarmheartedApplyController.java +++ b/epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/warmhearted/controller/ResiWarmheartedApplyController.java @@ -28,6 +28,7 @@ import com.epmet.commons.tools.validator.group.UpdateGroup; import com.epmet.modules.warmhearted.excel.ResiWarmheartedApplyExcel; import com.epmet.modules.warmhearted.service.ResiWarmheartedApplyService; import com.epmet.resi.partymember.dto.warmhearted.ResiWarmheartedApplyDTO; +import com.epmet.resi.partymember.dto.warmhearted.form.ResiWarmheartedAuditFormDTO; import com.epmet.resi.partymember.dto.warmhearted.form.ResiWarmheartedFormDTO; import com.epmet.resi.partymember.dto.warmhearted.form.ResiWarmheartedSubmitFormDTO; import com.epmet.resi.partymember.dto.warmhearted.result.ResiWarmheartedResultDTO; @@ -40,7 +41,7 @@ import java.util.Map; /** - * 热心居民申请表 + * 热心居民申请表 * * @author generator generator@elink-cn.com * @since v1.0.0 2020-03-30 @@ -48,24 +49,24 @@ import java.util.Map; @RestController @RequestMapping("resiwarmheartedapply") public class ResiWarmheartedApplyController { - + @Autowired private ResiWarmheartedApplyService resiWarmheartedApplyService; @GetMapping("page") - public Result> page(@RequestParam Map params){ + public Result> page(@RequestParam Map params) { PageData page = resiWarmheartedApplyService.page(params); return new Result>().ok(page); } @GetMapping("{id}") - public Result get(@PathVariable("id") String id){ + public Result get(@PathVariable("id") String id) { ResiWarmheartedApplyDTO data = resiWarmheartedApplyService.get(id); return new Result().ok(data); } @PostMapping - public Result save(@RequestBody ResiWarmheartedApplyDTO dto){ + public Result save(@RequestBody ResiWarmheartedApplyDTO dto) { //效验数据 ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class); resiWarmheartedApplyService.save(dto); @@ -73,7 +74,7 @@ public class ResiWarmheartedApplyController { } @PutMapping - public Result update(@RequestBody ResiWarmheartedApplyDTO dto){ + public Result update(@RequestBody ResiWarmheartedApplyDTO dto) { //效验数据 ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class); resiWarmheartedApplyService.update(dto); @@ -81,7 +82,7 @@ public class ResiWarmheartedApplyController { } @DeleteMapping - public Result delete(@RequestBody String[] ids){ + public Result delete(@RequestBody String[] ids) { //效验数据 AssertUtils.isArrayEmpty(ids, "id"); resiWarmheartedApplyService.delete(ids); @@ -95,13 +96,18 @@ public class ResiWarmheartedApplyController { } @PostMapping("init") - public Result init(@RequestBody ResiWarmheartedFormDTO formDTO){ + public Result init(@RequestBody ResiWarmheartedFormDTO formDTO) { return resiWarmheartedApplyService.init(formDTO); } @PostMapping("submit") - public Result submit(@RequestBody ResiWarmheartedSubmitFormDTO formDTO){ + public Result submit(@RequestBody ResiWarmheartedSubmitFormDTO formDTO) { return resiWarmheartedApplyService.submit(formDTO); } + @PostMapping("manageaudit") + public Result manageAudit(@RequestBody ResiWarmheartedAuditFormDTO formDTO) { + return resiWarmheartedApplyService.manageAudit(formDTO); + } + } \ No newline at end of file diff --git a/epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/warmhearted/service/ResiWarmheartedApplyService.java b/epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/warmhearted/service/ResiWarmheartedApplyService.java index 385e1dd47f..87fb3ffd31 100644 --- a/epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/warmhearted/service/ResiWarmheartedApplyService.java +++ b/epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/warmhearted/service/ResiWarmheartedApplyService.java @@ -22,6 +22,7 @@ import com.epmet.commons.tools.page.PageData; import com.epmet.commons.tools.utils.Result; import com.epmet.modules.warmhearted.entity.ResiWarmheartedApplyEntity; import com.epmet.resi.partymember.dto.warmhearted.ResiWarmheartedApplyDTO; +import com.epmet.resi.partymember.dto.warmhearted.form.ResiWarmheartedAuditFormDTO; import com.epmet.resi.partymember.dto.warmhearted.form.ResiWarmheartedFormDTO; import com.epmet.resi.partymember.dto.warmhearted.form.ResiWarmheartedSubmitFormDTO; import com.epmet.resi.partymember.dto.warmhearted.result.ResiWarmheartedResultDTO; @@ -114,4 +115,13 @@ public interface ResiWarmheartedApplyService extends BaseService page(Map params) { @@ -123,7 +131,7 @@ public class ResiWarmheartedApplyServiceImpl extends BaseServiceImpl init(ResiWarmheartedFormDTO formDTO) { //1:热心居民申请行为记录表新增数据 Result result = resiWarmheartedVisitService.saveResiWarmheartedVisit(formDTO); - if(!result.success()){ + if (!result.success()) { log.warn(ResiWarmheartedVisitConstant.OPERATION_EXCEPTION); } ResiWarmheartedResultDTO resiWarmheartedResultDTO = result.getData(); @@ -150,6 +158,7 @@ public class ResiWarmheartedApplyServiceImpl extends BaseServiceImpl