Browse Source

查询支部列表接口

master
sunyuchao 3 years ago
parent
commit
0b12c589ed
  1. 17
      epmet-module/resi-partymember/resi-partymember-client/src/main/java/com/epmet/resi/partymember/dto/partyOrg/form/PartyOrgListFormDTO.java
  2. 25
      epmet-module/resi-partymember/resi-partymember-client/src/main/java/com/epmet/resi/partymember/dto/partyOrg/result/PartyOrgListResultDTO.java
  3. 12
      epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partyOrg/controller/IcPartyOrgController.java
  4. 3
      epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partyOrg/dao/IcPartyOrgDao.java
  5. 7
      epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partyOrg/service/IcPartyOrgService.java
  6. 11
      epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partyOrg/service/impl/IcPartyOrgServiceImpl.java
  7. 14
      epmet-module/resi-partymember/resi-partymember-server/src/main/resources/mapper/partyOrg/IcPartyOrgDao.xml

17
epmet-module/resi-partymember/resi-partymember-client/src/main/java/com/epmet/resi/partymember/dto/partyOrg/form/PartyOrgListFormDTO.java

@ -0,0 +1,17 @@
package com.epmet.resi.partymember.dto.partyOrg.form;
import com.epmet.commons.tools.validator.group.AddGroup;
import lombok.Data;
import javax.validation.constraints.NotNull;
import java.io.Serializable;
@Data
public class PartyOrgListFormDTO implements Serializable {
/**
* 网格Id
*/
@NotNull(message = "网格Id不能为空", groups = AddGroup.class)
private String gridId;
}

25
epmet-module/resi-partymember/resi-partymember-client/src/main/java/com/epmet/resi/partymember/dto/partyOrg/result/PartyOrgListResultDTO.java

@ -0,0 +1,25 @@
package com.epmet.resi.partymember.dto.partyOrg.result;
import lombok.Data;
import lombok.NoArgsConstructor;
import java.io.Serializable;
@NoArgsConstructor
@Data
public class PartyOrgListResultDTO implements Serializable {
private static final long serialVersionUID = 1L;
/**
* 党组织Id
*/
private String partyOrgId = "";
/**
* 党支部IdPath
*/
private String partyOrgPath = "";
/**
* 党组织名称
*/
private Integer partyOrgName = 0;
}

12
epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partyOrg/controller/IcPartyOrgController.java

@ -15,10 +15,12 @@ import com.epmet.modules.partyOrg.excel.IcPartyOrgExcel;
import com.epmet.modules.partyOrg.service.IcPartyOrgService;
import com.epmet.resi.partymember.dto.partyOrg.IcPartyOrgDTO;
import com.epmet.resi.partymember.dto.partyOrg.form.GetParentOrgFormDTO;
import com.epmet.resi.partymember.dto.partyOrg.form.PartyOrgListFormDTO;
import com.epmet.resi.partymember.dto.partyOrg.form.PartyOrgTreeListDTO;
import com.epmet.resi.partymember.dto.partyOrg.result.BranchlistTreeDTO;
import com.epmet.resi.partymember.dto.partyOrg.result.DefaultPartyOrgResDTO;
import com.epmet.resi.partymember.dto.partyOrg.result.IcPartyOrgTreeDTO;
import com.epmet.resi.partymember.dto.partyOrg.result.PartyOrgListResultDTO;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
@ -177,4 +179,14 @@ public class IcPartyOrgController {
icPartyOrgService.adjustOrgPath(customerIds);
return new Result();
}
/**
* 查询当前组织及下级党支部列表供新增编辑党小组使用
*/
@PostMapping("partorglist")
public Result<List<PartyOrgListResultDTO>> partOrgList(@RequestBody PartyOrgListFormDTO formDTO){
ValidatorUtils.validateEntity(formDTO, AddGroup.class);
return new Result<List<PartyOrgListResultDTO>>().ok(icPartyOrgService.partOrgList(formDTO.getGridId()));
}
}

3
epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partyOrg/dao/IcPartyOrgDao.java

@ -7,6 +7,7 @@ import com.epmet.resi.partymember.dto.partyOrg.form.PartyOrgTreeListDTO;
import com.epmet.resi.partymember.dto.partyOrg.result.ActAndScheduleListResultDTO;
import com.epmet.resi.partymember.dto.partyOrg.result.BranchlistTreeSubDTO;
import com.epmet.resi.partymember.dto.partyOrg.result.IcPartyOrgTreeDTO;
import com.epmet.resi.partymember.dto.partyOrg.result.PartyOrgListResultDTO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
@ -114,4 +115,6 @@ public interface IcPartyOrgDao extends BaseDao<IcPartyOrgEntity> {
List<String> getUserIdByPartyOrgIds(@Param("partyOrgIdList") List<String> partyOrgIdList);
List<IcPartyOrgDTO> getSelfAndSub(@Param("joinOrgId") String joinOrgId);
List<PartyOrgListResultDTO> partOrgList(@Param("agencyId") String agencyId);
}

7
epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partyOrg/service/IcPartyOrgService.java

@ -8,10 +8,7 @@ import com.epmet.modules.partyOrg.entity.IcPartyOrgEntity;
import com.epmet.resi.partymember.dto.partyOrg.IcPartyOrgDTO;
import com.epmet.resi.partymember.dto.partyOrg.form.GetParentOrgFormDTO;
import com.epmet.resi.partymember.dto.partyOrg.form.PartyOrgTreeListDTO;
import com.epmet.resi.partymember.dto.partyOrg.result.BranchlistTreeDTO;
import com.epmet.resi.partymember.dto.partyOrg.result.DefaultPartyOrgResDTO;
import com.epmet.resi.partymember.dto.partyOrg.result.IcPartyOrgInfo;
import com.epmet.resi.partymember.dto.partyOrg.result.IcPartyOrgTreeDTO;
import com.epmet.resi.partymember.dto.partyOrg.result.*;
import java.util.List;
import java.util.Map;
@ -149,4 +146,6 @@ public interface IcPartyOrgService extends BaseService<IcPartyOrgEntity> {
* 调整历史数据 ORG_PIDS
*/
void adjustOrgPath(List<String> customerIds);
List<PartyOrgListResultDTO> partOrgList(String gridId);
}

11
epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partyOrg/service/impl/IcPartyOrgServiceImpl.java

@ -15,6 +15,7 @@ import com.epmet.commons.tools.page.PageData;
import com.epmet.commons.tools.redis.common.CustomerOrgRedis;
import com.epmet.commons.tools.redis.common.CustomerStaffRedis;
import com.epmet.commons.tools.redis.common.bean.AgencyInfoCache;
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;
@ -479,4 +480,14 @@ public class IcPartyOrgServiceImpl extends BaseServiceImpl<IcPartyOrgDao, IcPart
num++;
}
}
@Override
public List<PartyOrgListResultDTO> partOrgList(String gridId) {
GridInfoCache gridInfo = CustomerOrgRedis.getGridInfo(gridId);
if (null == gridInfo) {
throw new EpmetException(EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(), "获取网格缓存信息失败,网格Id->"+gridId, "获取网格缓存信息失败,网格Id->"+gridId);
}
return baseDao.partOrgList(gridInfo.getPid());
}
}

14
epmet-module/resi-partymember/resi-partymember-server/src/main/resources/mapper/partyOrg/IcPartyOrgDao.xml

@ -216,4 +216,18 @@
party_org_type ASC
</select>
<select id="partOrgList" resultType="com.epmet.resi.partymember.dto.partyOrg.result.PartyOrgListResultDTO">
SELECT
id partyOrgId,
org_pids partyOrgPath,
party_org_name partyOrgName
FROM
ic_party_org
WHERE
del_flag = '0'
AND party_org_type = '5'
AND agency_pids LIKE CONCAT('%', #{agencyId}, '%')
ORDER BY org_pids ASC
</select>
</mapper>

Loading…
Cancel
Save