springcloud_k8s_panzhihuazhihuishequ/service_sangeshenbian/src/main/java/com/panzhihua/sangeshenbian/api/MgtPartyMemberController.java
@@ -107,7 +107,7 @@ } } @ApiOperation("审核") @GetMapping("/audit/{id}") @PostMapping("/audit") public R<?> audit(@RequestBody PartyMemberDTO dto) { SystemUserVo loginUserInfo = getLoginUserInfoSanGeShenBian(); partyMemberService.audit(dto,loginUserInfo); springcloud_k8s_panzhihuazhihuishequ/service_sangeshenbian/src/main/java/com/panzhihua/sangeshenbian/api/ProblemTypeController.java
@@ -18,6 +18,7 @@ import javax.annotation.Resource; import java.time.LocalDateTime; import java.util.List; /** * @author zhibing.pu @@ -112,4 +113,10 @@ ProblemType problemType = problemTypeService.getById(id); return R.ok(problemType); } @ApiOperation(value = "获取问题类型列表(不分页)") @GetMapping("/list-no-page") public R<List<ProblemType>> listNoPage(){ List<ProblemType> list = problemTypeService.list(new LambdaQueryWrapper<ProblemType>().eq(ProblemType::getDel, 0)); return R.ok(list); } } springcloud_k8s_panzhihuazhihuishequ/service_sangeshenbian/src/main/java/com/panzhihua/sangeshenbian/api/SystemUserController.java
@@ -383,4 +383,5 @@ // } // return accessToken; // } } springcloud_k8s_panzhihuazhihuishequ/service_sangeshenbian/src/main/java/com/panzhihua/sangeshenbian/controller/BcRegionController.java
@@ -1,9 +1,19 @@ package com.panzhihua.sangeshenbian.controller; import com.panzhihua.common.model.vos.R; import com.panzhihua.sangeshenbian.model.vo.RegionVO; import com.panzhihua.sangeshenbian.service.IBcRegionService; import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; import lombok.RequiredArgsConstructor; import me.chanjar.weixin.common.annotation.Required; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RestController; import java.util.List; /** * <p> @@ -13,8 +23,15 @@ * @author * @since 2025-02-23 */ @Api(tags = {"行政区划管理相关接口"}) @RestController @RequestMapping("/bc-region") @RequiredArgsConstructor public class BcRegionController { private final IBcRegionService bcRegionService; @GetMapping("/regionTree-applet") @ApiOperation(value = "获取区县-街道-社区树") public R<List<RegionVO>> regionTree() { return R.ok(bcRegionService.regionTree()); } } springcloud_k8s_panzhihuazhihuishequ/service_sangeshenbian/src/main/java/com/panzhihua/sangeshenbian/controller/PartyMemberController.java
@@ -20,6 +20,7 @@ import lombok.RequiredArgsConstructor; import org.springframework.context.annotation.Lazy; import org.springframework.validation.annotation.Validated; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.RequestBody; import org.springframework.web.bind.annotation.RequestParam; springcloud_k8s_panzhihuazhihuishequ/service_sangeshenbian/src/main/java/com/panzhihua/sangeshenbian/service/IBcRegionService.java
@@ -2,6 +2,9 @@ import com.panzhihua.sangeshenbian.model.entity.BcRegion; import com.baomidou.mybatisplus.extension.service.IService; import com.panzhihua.sangeshenbian.model.vo.RegionVO; import java.util.List; /** * <p> @@ -18,4 +21,12 @@ * @return */ BcRegion getDistrictByName(String districtName); BcRegion getDistrictByCode(String districtCode); /** * 获取区县-街道-社区树 * @return */ List<RegionVO> regionTree(); } springcloud_k8s_panzhihuazhihuishequ/service_sangeshenbian/src/main/java/com/panzhihua/sangeshenbian/service/impl/BcRegionServiceImpl.java
@@ -1,10 +1,16 @@ package com.panzhihua.sangeshenbian.service.impl; import com.panzhihua.sangeshenbian.dao.SystemUserMapper; import com.panzhihua.sangeshenbian.model.entity.BcRegion; import com.panzhihua.sangeshenbian.dao.BcRegionMapper; import com.panzhihua.sangeshenbian.model.vo.RegionVO; import com.panzhihua.sangeshenbian.service.IBcRegionService; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import lombok.RequiredArgsConstructor; import org.springframework.context.annotation.Lazy; import org.springframework.stereotype.Service; import java.util.List; /** * <p> @@ -15,7 +21,9 @@ * @since 2025-02-23 */ @Service @RequiredArgsConstructor(onConstructor_ = {@Lazy}) public class BcRegionServiceImpl extends ServiceImpl<BcRegionMapper, BcRegion> implements IBcRegionService { private final SystemUserMapper systemUserMapper; /** * 判断区县是否存在 * @param districtName @@ -28,4 +36,27 @@ .eq(BcRegion::getDeleteFlag, 0) .eq(BcRegion::getHierarchyOrder, 2).last("LIMIT 1").one(); } @Override public BcRegion getDistrictByCode(String districtCode) { return this.lambdaQuery().eq(BcRegion::getRegionCode, districtCode).last("LIMIT 1").one(); } /** * 获取区县-街道-社区树 * @return */ @Override public List<RegionVO> regionTree() { List<RegionVO> regionTree = systemUserMapper.getRegion("510400"); systemUserMapper.getStreet("510400"); regionTree.forEach(district -> { List<RegionVO> streets = systemUserMapper.getStreet(district.getId()); district.setChildren(streets); streets.forEach(street -> { List<RegionVO> communities = systemUserMapper.getCommunity(street.getId()); street.setChildren(communities); }); }); return regionTree; } } springcloud_k8s_panzhihuazhihuishequ/service_sangeshenbian/src/main/java/com/panzhihua/sangeshenbian/service/impl/ComplaintServiceImpl.java
@@ -966,9 +966,9 @@ throw new ServiceException("该诉求不存在"); } //查询社区信息 BcRegion region = bcRegionService.lambdaQuery().eq(BcRegion::getRegionCode, complaint.getDistrictsCode()).last("LIMIT 1").one(); ComStreet street = comStreetService.lambdaQuery().eq(ComStreet::getStreetId, complaint.getStreetId()).one(); ComAct act = comActService.lambdaQuery().eq(ComAct::getCommunityId, complaint.getCommunityId()).one(); BcRegion region = bcRegionService.getDistrictByCode(complaint.getDistrictsCode().toString()); ComStreet street = comStreetService.getById(complaint.getStreetId().toString()); ComAct act = comActService.getById(complaint.getCommunityId()); String community = region.getRegionName() +"-"+ street.getName() + act.getName(); PartyMember partyMember = null; if (Objects.nonNull(complaint.getPartyMemberId())){ @@ -993,12 +993,12 @@ map.put("community", community); map.put("problemType", complaint.getProblemType()); map.put("descriptionContent", complaint.getDescriptionContent()); map.put("reportType", Objects.nonNull(complaint.getPartyMemberId())?"党员": "上级"); //TODO待修改 map.put("reportType", ReportTypeEnum.fromCode(complaint.getReportType())); //TODO待修改 map.put("partyOrganization",Objects.nonNull(partyMember)? partyMember.getPartyOrganization() : ""); map.put("name", complaint.getName()); map.put("contactNumber", complaint.getContactNumber()); map.put("nickname", Objects.nonNull(partyMember)? partyMember.getName() : ""); map.put("phone", Objects.nonNull(partyMember)? partyMember.getPhone() : ""); map.put("nickname", complaint.getReportUserName()); map.put("phone", complaint.getReportUserPhone()); List<ComplaintProgress> list = complaintProgressService.lambdaQuery().eq(ComplaintProgress::getComplaintId, id).orderByAsc(ComplaintProgress::getCreateTime).list(); StringBuilder sb = new StringBuilder(); if (CollUtil.isNotEmpty(list)) { springcloud_k8s_panzhihuazhihuishequ/service_sangeshenbian/src/main/java/com/panzhihua/sangeshenbian/service/impl/PartyMemberServiceImpl.java
@@ -14,6 +14,7 @@ import com.panzhihua.common.redis.RedisUtils; import com.panzhihua.sangeshenbian.dao.PartyMemberMapper; import com.panzhihua.sangeshenbian.enums.AuditStatusEnum; import com.panzhihua.sangeshenbian.enums.FreezeStatusEnum; import com.panzhihua.sangeshenbian.enums.ReportTypeEnum; import com.panzhihua.sangeshenbian.model.entity.*; import com.panzhihua.sangeshenbian.model.excel.PartyMemberExcel; @@ -69,10 +70,23 @@ PartyMember partyMember = BeanUtil.copyProperties(dto, PartyMember.class); String idNumber = dto.getIdNumber(); partyMember.setGender(getGender(idNumber)); BcRegion districtByCode = bcRegionService.getDistrictByCode(dto.getDistrictsCode()); if (Objects.nonNull(districtByCode)){ partyMember.setDistricts(districtByCode.getRegionName()); } ComStreet street = comStreetService.getById(dto.getStreetId()); if (Objects.nonNull(street)){ partyMember.setStreet(street.getName()); } ComAct act = comActService.getById(dto.getCommunityId()); if (Objects.nonNull(act)){ partyMember.setCommunity(act.getName()); } if (Objects.isNull(dto.getId())) { //添加 partyMember.setCreateBy(Long.parseLong(loginUserInfo.getId().toString())); partyMember.setAuditStatus(AuditStatusEnum.APPROVED.getCode()); partyMember.setFreezeStatus(FreezeStatusEnum.NORMAL.getCode()); partyMember.setSource(1); save(partyMember); } else { springcloud_k8s_panzhihuazhihuishequ/service_sangeshenbian/src/main/java/com/panzhihua/sangeshenbian/warpper/MgtComplaintQuery.java
@@ -38,6 +38,6 @@ @ApiModelProperty(value = "问题类型") private String problemType; @ApiModelProperty(value = "流转状态:0-正在办理 1-延期办理 2-超时办理 3-已办结 4-群众撤销 5-上报待审核 6-上级驳回 7-延期待审核") @ApiModelProperty(value = "流转状态:0-正在办理 1-延期办理 2-超时办理 3-已办结 4-上报待审核") private Integer status; } springcloud_k8s_panzhihuazhihuishequ/service_sangeshenbian/src/main/java/com/panzhihua/sangeshenbian/warpper/PartyMemberDTO.java
@@ -9,6 +9,7 @@ import lombok.Data; import javax.validation.constraints.NotBlank; import javax.validation.constraints.NotNull; /** * @author mitao @@ -34,7 +35,6 @@ private String phone; @ApiModelProperty(value = "所属区县") @NotBlank(message = "区县不能空") private String districts; @ApiModelProperty(value = "区县编号") @@ -42,7 +42,6 @@ private String districtsCode; @ApiModelProperty(value = "街道") @NotBlank(message = "街道不能空") private String street; @ApiModelProperty(value = "街道ID") @@ -50,11 +49,10 @@ private String streetId; @ApiModelProperty(value = "社区") @NotBlank(message = "社区不能空") private String community; @ApiModelProperty(value = "社区ID") @NotBlank(message = "社区ID不能空") @NotNull(message = "社区ID不能空") private Long communityId; @ApiModelProperty(value = "服务对象") @@ -66,4 +64,10 @@ @ApiModelProperty(value = "头像") @NotBlank(message = "头像不能空") private String avatar; @ApiModelProperty(value = "审核状态 0:待审核 1:审核通过 2:审核不通过") private Integer auditStatus; @ApiModelProperty(value = "拒绝理由") private String refuseReason; } springcloud_k8s_panzhihuazhihuishequ/service_sangeshenbian/src/main/java/com/panzhihua/sangeshenbian/warpper/PartyMemberQuery.java
@@ -21,7 +21,7 @@ private Long communityId; @ApiModelProperty(value = "服务对象") private String serviceObject; private String serviceTarget; @ApiModelProperty(value = "所在党组织") private String partyOrganization; springcloud_k8s_panzhihuazhihuishequ/service_sangeshenbian/src/main/resources/mapper/ComplaintMapper.xml
@@ -248,9 +248,8 @@ sc.images, sc.videos, CASE WHEN sc.status = 0 and scar.audit_type = 1 AND scar.audit_status = 0 THEN 7 WHEN sc.status = 0 and scar.audit_type = 2 AND scar.audit_status = 0 THEN 5 WHEN sc.status = 0 and scar.audit_status = 2 THEN 6 WHEN sc.status = 0 and scar.audit_type = 1 AND scar.audit_status = 0 THEN 4 WHEN sc.status = 0 and scar.audit_type = 2 AND scar.audit_status = 0 THEN 4 ELSE sc.status END AS status, sc.report_type, springcloud_k8s_panzhihuazhihuishequ/service_sangeshenbian/src/main/resources/mapper/PartyMemberMapper.xml
@@ -45,7 +45,7 @@ <if test="query.communityId != null and query.communityId != ''"> and community_id = #{query.communityId} </if> <if test="query.serviceObject != null and query.serviceObject != ''"> <if test="query.serviceTarget != null and query.serviceTarget != ''"> and service_target like concat('%',#{query.serviceTarget},'%') </if> <if test="query.partyOrganization != null and query.partyOrganization != ''"> @@ -97,7 +97,7 @@ <if test="query.communityId != null and query.communityId != ''"> and community_id = #{query.communityId} </if> <if test="query.serviceObject != null and query.serviceObject != ''"> <if test="query.serviceTarget != null and query.serviceTarget != ''"> and service_target like concat('%',#{query.serviceTarget},'%') </if> <if test="query.partyOrganization != null and query.partyOrganization != ''">