Browse Source

Merge remote-tracking branch 'origin/dev_bugfix' into dev_bugfix

dev_shibei_match
wangchao 5 years ago
parent
commit
f977009783
  1. 42
      epmet-module/gov-grid/gov-grid-server/src/main/java/com/epmet/controller/ResiTopicCommentController.java
  2. 13
      epmet-module/gov-grid/gov-grid-server/src/main/java/com/epmet/controller/ResiTopicController.java
  3. 10
      epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/form/AddAgencyFormDTO.java
  4. 16
      epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/constant/CustomerAgencyConstant.java
  5. 16
      epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/AgencyController.java
  6. 6
      epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partymember/service/impl/PartyMemberConfirmServiceImpl.java
  7. 6
      epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partymember/service/impl/PartymemberBaseInfoServiceImpl.java

42
epmet-module/gov-grid/gov-grid-server/src/main/java/com/epmet/controller/ResiTopicCommentController.java

@ -0,0 +1,42 @@
package com.epmet.controller;
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.commons.tools.validator.ValidatorUtils;
import com.epmet.resi.group.dto.comment.form.ResiQueryCommentFormDTO;
import com.epmet.resi.group.dto.comment.result.GovCommentResultDTO;
import com.epmet.service.ResiTopicService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import java.util.List;
/**
* @Description 话题评论相关接口
* @Author yinzuomei
* @Date 2020/4/30 16:42
*/
@RestController
@RequestMapping("topic")
public class ResiTopicCommentController {
@Autowired
private ResiTopicService resiTopicService;
/**
* @Description 政府端群组管理-获取某个话题的评论列表
* @Param tokenDto
* @Param ResiQueryCommentFormDTO
* @return Result<List<ResiCommentResultDTO>>
* @Author wangc
* @Date 2020.04.01 23:49
**/
@PostMapping("topiccomments")
Result<List<GovCommentResultDTO>> topicComments(@LoginUser TokenDto tokenDto, @RequestBody ResiQueryCommentFormDTO queryCommentFormDTO){
ValidatorUtils.validateEntity(queryCommentFormDTO);
return resiTopicService.topicComments(queryCommentFormDTO);
}
}

13
epmet-module/gov-grid/gov-grid-server/src/main/java/com/epmet/controller/ResiTopicController.java

@ -70,19 +70,6 @@ public class ResiTopicController {
return resiTopicService.topicDetail(topicDetailFormDTO);
}
/**
* @Description 政府端群组管理-获取某个话题的评论列表
* @Param tokenDto
* @Param ResiQueryCommentFormDTO
* @return Result<List<ResiCommentResultDTO>>
* @Author wangc
* @Date 2020.04.01 23:49
**/
@PostMapping("topiccomments")
Result<List<GovCommentResultDTO>> topicComments(@LoginUser TokenDto tokenDto, @RequestBody ResiQueryCommentFormDTO queryCommentFormDTO){
ValidatorUtils.validateEntity(queryCommentFormDTO);
return resiTopicService.topicComments(queryCommentFormDTO);
}
}

10
epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/form/AddAgencyFormDTO.java

@ -69,22 +69,20 @@ public class AddAgencyFormDTO implements Serializable {
/**
* 省份
*/
@NotBlank(message = "省级名称不能为空")
@Length(max=30,message = "省名称不能超过30个字")
@NotBlank(message = "省级机关名称不能为空")
@Length(max=30,message = "省级机关名称不能超过30个字")
private String province;
/**
* 城市
*/
@NotBlank(message = "市级名称不能为空")
@Length(max=30,message = "市级名称不能超过30个字")
@Length(max=30,message = "市级机关名称不能超过30个字")
private String city;
/**
* 区县
*/
@NotBlank(message = "区县名称不能为空")
@Length(max=30,message = "区县名称不能超过30个字")
@Length(max=30,message = "区县级机关名称不能超过30个字")
private String district;
}

16
epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/constant/CustomerAgencyConstant.java

@ -18,4 +18,20 @@ public interface CustomerAgencyConstant {
* 组织删除失败
*/
String DEL_EXCEPTION = "组织删除失败";
/**
* 机关级别-省级
*/
String PROVINCE_LEVEL = "province";
/**
* 机关级别-市级
*/
String CITY_LEVEL = "city";
/**
* 市级名称不能为空
*/
String CITY_EXCEPTION = "市级机关名称不能为空";
/**
* 区县名称不能为空
*/
String DISTRICT_EXCEPTION = "区县级机关名称不能为空";
}

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

@ -18,9 +18,11 @@
package com.epmet.controller;
import com.epmet.commons.tools.annotation.LoginUser;
import com.epmet.commons.tools.exception.RenException;
import com.epmet.commons.tools.security.dto.TokenDto;
import com.epmet.commons.tools.utils.Result;
import com.epmet.commons.tools.validator.ValidatorUtils;
import com.epmet.constant.CustomerAgencyConstant;
import com.epmet.dto.CustomerAgencyDTO;
import com.epmet.dto.form.*;
import com.epmet.dto.result.AddAgencyResultDTO;
@ -29,6 +31,7 @@ import com.epmet.dto.result.AgencysResultDTO;
import com.epmet.dto.result.SubAgencyResultDTO;
import com.epmet.entity.CustomerAgencyEntity;
import com.epmet.service.AgencyService;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
@ -57,6 +60,19 @@ public class AgencyController {
@PostMapping("addagency")
public Result<AddAgencyResultDTO> addAgency(@LoginUser TokenDto tokenDTO, @RequestBody AddAgencyFormDTO formDTO) {
ValidatorUtils.validateEntity(formDTO);
//机构级别是市级以上则市、区县名称可不传值,是区县级以上则区县名称可不传值
if(!CustomerAgencyConstant.PROVINCE_LEVEL.equals(formDTO.getLevel())&&!CustomerAgencyConstant.CITY_LEVEL.equals(formDTO.getLevel())){
if(StringUtils.isBlank(formDTO.getCity())){
throw new RenException(CustomerAgencyConstant.CITY_EXCEPTION);
}
if(StringUtils.isBlank(formDTO.getDistrict())){
throw new RenException(CustomerAgencyConstant.DISTRICT_EXCEPTION);
}
}else if(!CustomerAgencyConstant.PROVINCE_LEVEL.equals(formDTO.getLevel())){
if(StringUtils.isBlank(formDTO.getCity())){
throw new RenException(CustomerAgencyConstant.CITY_EXCEPTION);
}
}
return agencyService.addAgency(formDTO);
}

6
epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partymember/service/impl/PartyMemberConfirmServiceImpl.java

@ -469,9 +469,9 @@ public class PartyMemberConfirmServiceImpl implements PartyMemberConfirmService
Result<GridInfoResultDTO> gridInfoResult = govOrgFeignClient.queryGridInfo(partyMemberInfo.getGridId());
String gridFullPath = "";
if (gridInfoResult.success() && null != gridInfoResult.getData()) {
gridFullPath = String.format("%s-%s-%s", gridInfoResult.getData().getStreetName(),
gridInfoResult.getData().getCommnuityName(),
gridInfoResult.getData().getGridName());
gridFullPath = String.format("%s-%s-%s", gridInfoResult.getData().getStreetName() == null?"":gridInfoResult.getData().getStreetName(),
gridInfoResult.getData().getCommnuityName() == null?"":gridInfoResult.getData().getCommnuityName(),
gridInfoResult.getData().getGridName() == null?"":gridInfoResult.getData().getGridName());
gridFullPath = gridFullPath.replaceAll("--", "").trim();
}
resultDTO.setGridFullPath(gridFullPath);

6
epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partymember/service/impl/PartymemberBaseInfoServiceImpl.java

@ -325,9 +325,9 @@ public class PartymemberBaseInfoServiceImpl extends BaseServiceImpl<PartymemberB
Result<GridInfoResultDTO> gridInfoResult = govOrgFeignClient.queryGridInfo(formDTO.getGridId());
String gridFullPath = "";
if (gridInfoResult.success() && null != gridInfoResult.getData()) {
gridFullPath = String.format("%s-%s-%s", gridInfoResult.getData().getStreetName(),
gridInfoResult.getData().getCommnuityName(),
gridInfoResult.getData().getGridName());
gridFullPath = String.format("%s-%s-%s", gridInfoResult.getData().getStreetName() == null?"":gridInfoResult.getData().getStreetName(),
gridInfoResult.getData().getCommnuityName() == null?"":gridInfoResult.getData().getCommnuityName(),
gridInfoResult.getData().getGridName() == null?"":gridInfoResult.getData().getGridName());
gridFullPath = gridFullPath.replaceAll("--", "").trim();
}
//查询居民认证信息,获取居民头像

Loading…
Cancel
Save