Browse Source

提交

master
lichao 1 year ago
parent
commit
06c5aeca2a
  1. 6
      epmet-module/resi-partymember/resi-partymember-client/src/main/java/com/epmet/resi/partymember/dto/IcPartyPlaceDTO.java
  2. 94
      epmet-module/resi-partymember/resi-partymember-client/src/main/java/com/epmet/resi/partymember/dto/IcPartyPlaceTreeResultDTO.java
  3. 2
      epmet-module/resi-partymember/resi-partymember-client/src/main/java/com/epmet/resi/partymember/dto/partyOrg/IcPartyOrgDTO.java
  4. 2
      epmet-module/resi-partymember/resi-partymember-client/src/main/java/com/epmet/resi/partymember/dto/partyOrg/result/IcPartyOrgTreeDTO.java
  5. 1
      epmet-module/resi-partymember/resi-partymember-client/src/main/java/com/epmet/resi/partymember/dto/partymember/result/YiFengScreenPartyOrgTreeResultDTO.java
  6. 2
      epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partyOrg/entity/IcPartyOrgEntity.java
  7. 8
      epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partymember/controller/IcPartyPlaceController.java
  8. 6
      epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partymember/controller/YiFengScreenController.java
  9. 6
      epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partymember/entity/IcPartyPlaceEntity.java
  10. 6
      epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partymember/service/IcPartyPlaceService.java
  11. 52
      epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partymember/service/impl/IcPartyPlaceServiceImpl.java
  12. 2
      epmet-module/resi-partymember/resi-partymember-server/src/main/resources/mapper/partyOrg/IcPartyOrgDao.xml

6
epmet-module/resi-partymember/resi-partymember-client/src/main/java/com/epmet/resi/partymember/dto/IcPartyPlaceDTO.java

@ -81,4 +81,10 @@ public class IcPartyPlaceDTO implements Serializable {
*/ */
private Integer type; private Integer type;
private Integer menuType;
private String parentId;
private Integer sort;
} }

94
epmet-module/resi-partymember/resi-partymember-client/src/main/java/com/epmet/resi/partymember/dto/IcPartyPlaceTreeResultDTO.java

@ -0,0 +1,94 @@
package com.epmet.resi.partymember.dto;
import lombok.Data;
import java.io.Serializable;
import java.util.Date;
import java.util.List;
/**
* 移风党建
*
* @author qu qu@elink-cn.com
* @since v1.0.0 2024-03-05
*/
@Data
public class IcPartyPlaceTreeResultDTO implements Serializable {
private static final long serialVersionUID = 1L;
/**
* ID
*/
private String id;
/**
* 客户ID
*/
private String customerId;
/**
* 封面
*/
private String cover;
/**
* 名称
*/
private String name;
/**
* 描述
*/
private String description;
/**
* 地址
*/
private String address;
/**
* 0未删除1已删除
*/
private Integer delFlag;
/**
* 乐观锁
*/
private Integer revision;
/**
* 创建人
*/
private String createdBy;
/**
* 创建时间
*/
private Date createdTime;
/**
* 更新人
*/
private String updatedBy;
/**
* 更新时间
*/
private Date updatedTime;
/**
* 类型 1公司 2阵地
*/
private Integer type;
private Integer menuType;
private String parentId;
private Integer sort;
private List<IcPartyPlaceDTO> children;
}

2
epmet-module/resi-partymember/resi-partymember-client/src/main/java/com/epmet/resi/partymember/dto/partyOrg/IcPartyOrgDTO.java

@ -139,4 +139,6 @@ public class IcPartyOrgDTO implements Serializable {
*/ */
private String staffId; private String staffId;
private Integer sort;
} }

2
epmet-module/resi-partymember/resi-partymember-client/src/main/java/com/epmet/resi/partymember/dto/partyOrg/result/IcPartyOrgTreeDTO.java

@ -65,5 +65,7 @@ public class IcPartyOrgTreeDTO implements Serializable {
private List<IcPartyOrgTreeDTO> children = new ArrayList<>(); private List<IcPartyOrgTreeDTO> children = new ArrayList<>();
private Integer sort;
} }

1
epmet-module/resi-partymember/resi-partymember-client/src/main/java/com/epmet/resi/partymember/dto/partymember/result/YiFengScreenPartyOrgTreeResultDTO.java

@ -26,6 +26,7 @@ public class YiFengScreenPartyOrgTreeResultDTO {
private String name; private String name;
private Integer num; private Integer num;
private Integer orgType; private Integer orgType;
private Integer sort;
/** /**
* 子级组织列表 * 子级组织列表

2
epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partyOrg/entity/IcPartyOrgEntity.java

@ -98,4 +98,6 @@ public class IcPartyOrgEntity extends BaseEpmetEntity {
*/ */
private transient Integer childrenQty; private transient Integer childrenQty;
private Integer sort;
} }

8
epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partymember/controller/IcPartyPlaceController.java

@ -12,6 +12,8 @@ import com.epmet.commons.tools.validator.group.DefaultGroup;
import com.epmet.commons.tools.validator.group.UpdateGroup; import com.epmet.commons.tools.validator.group.UpdateGroup;
import com.epmet.modules.partymember.service.IcPartyPlaceService; import com.epmet.modules.partymember.service.IcPartyPlaceService;
import com.epmet.resi.partymember.dto.IcPartyPlaceDTO; import com.epmet.resi.partymember.dto.IcPartyPlaceDTO;
import com.epmet.resi.partymember.dto.IcPartyPlaceTreeResultDTO;
import com.epmet.resi.partymember.dto.partymember.result.IcPartyInventoryListResultDTO;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*; import org.springframework.web.bind.annotation.*;
@ -39,6 +41,12 @@ public class IcPartyPlaceController {
return new Result<PageData<IcPartyPlaceDTO>>().ok(page); return new Result<PageData<IcPartyPlaceDTO>>().ok(page);
} }
@GetMapping("getPageList")
public Result<List<IcPartyPlaceTreeResultDTO>> getPageList(Map<String, Object> params){
List<IcPartyPlaceTreeResultDTO> page = icPartyPlaceService.getPageList(params);
return new Result<List<IcPartyPlaceTreeResultDTO>>().ok(page);
}
@GetMapping("{id}") @GetMapping("{id}")
public Result<IcPartyPlaceDTO> get(@PathVariable("id") String id){ public Result<IcPartyPlaceDTO> get(@PathVariable("id") String id){
IcPartyPlaceDTO data = icPartyPlaceService.get(id); IcPartyPlaceDTO data = icPartyPlaceService.get(id);

6
epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partymember/controller/YiFengScreenController.java

@ -227,6 +227,12 @@ public class YiFengScreenController {
return new Result<PageData<IcCultureLegacyDTO>>().ok(page); return new Result<PageData<IcCultureLegacyDTO>>().ok(page);
} }
@GetMapping("selectPartyPlaceList")
public Result<List<IcPartyPlaceTreeResultDTO>> getPageList(){
List<IcPartyPlaceTreeResultDTO> page = icPartyPlaceService.selectPartyPlaceList();
return new Result<List<IcPartyPlaceTreeResultDTO>>().ok(page);
}
/** /**
* @Description: 移列清单 * @Description: 移列清单
* @param : * @param :

6
epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partymember/entity/IcPartyPlaceEntity.java

@ -51,4 +51,10 @@ public class IcPartyPlaceEntity extends BaseEpmetEntity {
*/ */
private Integer type; private Integer type;
private Integer menuType;
private String parentId;
private Integer sort;
} }

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

@ -4,6 +4,7 @@ import com.epmet.commons.mybatis.service.BaseService;
import com.epmet.commons.tools.page.PageData; import com.epmet.commons.tools.page.PageData;
import com.epmet.modules.partymember.entity.IcPartyPlaceEntity; import com.epmet.modules.partymember.entity.IcPartyPlaceEntity;
import com.epmet.resi.partymember.dto.IcPartyPlaceDTO; import com.epmet.resi.partymember.dto.IcPartyPlaceDTO;
import com.epmet.resi.partymember.dto.IcPartyPlaceTreeResultDTO;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
@ -75,4 +76,9 @@ public interface IcPartyPlaceService extends BaseService<IcPartyPlaceEntity> {
* @date 2024-03-05 * @date 2024-03-05
*/ */
void delete(String[] ids); void delete(String[] ids);
List<IcPartyPlaceTreeResultDTO> getPageList(Map<String, Object> params);
List<IcPartyPlaceTreeResultDTO> selectPartyPlaceList();
} }

52
epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partymember/service/impl/IcPartyPlaceServiceImpl.java

@ -1,5 +1,6 @@
package com.epmet.modules.partymember.service.impl; package com.epmet.modules.partymember.service.impl;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.core.metadata.IPage;
import com.elink.esua.epdc.redis.IcPartyPlaceRedis; import com.elink.esua.epdc.redis.IcPartyPlaceRedis;
@ -8,14 +9,19 @@ import com.epmet.commons.tools.constant.FieldConstant;
import com.epmet.commons.tools.page.PageData; import com.epmet.commons.tools.page.PageData;
import com.epmet.commons.tools.utils.ConvertUtils; import com.epmet.commons.tools.utils.ConvertUtils;
import com.epmet.modules.partymember.dao.IcPartyPlaceDao; import com.epmet.modules.partymember.dao.IcPartyPlaceDao;
import com.epmet.modules.partymember.entity.IcPartyInventoryEntity;
import com.epmet.modules.partymember.entity.IcPartyPlaceEntity; import com.epmet.modules.partymember.entity.IcPartyPlaceEntity;
import com.epmet.modules.partymember.service.IcPartyPlaceService; import com.epmet.modules.partymember.service.IcPartyPlaceService;
import com.epmet.resi.partymember.dto.IcPartyPlaceDTO; import com.epmet.resi.partymember.dto.IcPartyPlaceDTO;
import com.epmet.resi.partymember.dto.IcPartyPlaceTreeResultDTO;
import com.epmet.resi.partymember.dto.partymember.IcPartyInventoryDTO;
import com.epmet.resi.partymember.dto.partymember.result.IcPartyInventoryListResultDTO;
import org.apache.commons.lang3.StringUtils; import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional; import org.springframework.transaction.annotation.Transactional;
import java.util.ArrayList;
import java.util.Arrays; import java.util.Arrays;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
@ -88,4 +94,50 @@ public class IcPartyPlaceServiceImpl extends BaseServiceImpl<IcPartyPlaceDao, Ic
baseDao.deleteBatchIds(Arrays.asList(ids)); baseDao.deleteBatchIds(Arrays.asList(ids));
} }
@Override
public List<IcPartyPlaceTreeResultDTO> getPageList(Map<String, Object> params) {
List<IcPartyPlaceTreeResultDTO> resultDTOS = new ArrayList<>();
LambdaQueryWrapper<IcPartyPlaceEntity> queryWrapperP = new LambdaQueryWrapper<>();
queryWrapperP.eq(IcPartyPlaceEntity::getParentId,0).orderByAsc(IcPartyPlaceEntity::getSort);
List<IcPartyPlaceEntity> entityPList = baseDao.selectList(queryWrapperP);
if (entityPList.size() > 0){
resultDTOS = ConvertUtils.sourceToTarget(entityPList,IcPartyPlaceTreeResultDTO.class);
resultDTOS.forEach(result->{
LambdaQueryWrapper<IcPartyPlaceEntity> queryWrapper = new LambdaQueryWrapper<>();
queryWrapper.eq(IcPartyPlaceEntity::getParentId,result.getId()).orderByAsc(IcPartyPlaceEntity::getSort);;
List<IcPartyPlaceEntity> entityList = baseDao.selectList(queryWrapper);
if (entityList.size() > 0){
result.setChildren(ConvertUtils.sourceToTarget(entityList, IcPartyPlaceDTO.class));
}
});
}
return resultDTOS;
}
@Override
public List<IcPartyPlaceTreeResultDTO> selectPartyPlaceList() {
List<IcPartyPlaceTreeResultDTO> resultDTOS = new ArrayList<>();
LambdaQueryWrapper<IcPartyPlaceEntity> queryWrapperP = new LambdaQueryWrapper<>();
queryWrapperP.eq(IcPartyPlaceEntity::getParentId,0).orderByAsc(IcPartyPlaceEntity::getSort);
List<IcPartyPlaceEntity> entityPList = baseDao.selectList(queryWrapperP);
if (entityPList.size() > 0){
resultDTOS = ConvertUtils.sourceToTarget(entityPList,IcPartyPlaceTreeResultDTO.class);
resultDTOS.forEach(result->{
LambdaQueryWrapper<IcPartyPlaceEntity> queryWrapper = new LambdaQueryWrapper<>();
queryWrapper.eq(IcPartyPlaceEntity::getParentId,result.getId()).orderByAsc(IcPartyPlaceEntity::getSort);;
List<IcPartyPlaceEntity> entityList = baseDao.selectList(queryWrapper);
if (entityList.size() > 0){
result.setChildren(ConvertUtils.sourceToTarget(entityList, IcPartyPlaceDTO.class));
}
});
}
return resultDTOS;
}
} }

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

@ -319,6 +319,7 @@
and org.PARTY_ORG_TYPE &lt;= '4' and org.PARTY_ORG_TYPE &lt;= '4'
and (org.AGENCY_ID = #{agencyId} or org.AGENCY_PIDS like CONCAT(#{orgIdpath}, '%')) and (org.AGENCY_ID = #{agencyId} or org.AGENCY_PIDS like CONCAT(#{orgIdpath}, '%'))
group by org.ID, org.PARTY_ORG_NAME group by org.ID, org.PARTY_ORG_NAME
order by org.SORT
</select> </select>
<!--获取支部列表--> <!--获取支部列表-->
@ -335,6 +336,7 @@
and org.PARTY_ORG_TYPE >= '5' and org.PARTY_ORG_TYPE >= '5'
and (org.AGENCY_ID = #{agencyId} or org.AGENCY_PIDS like CONCAT(#{orgIdpath}, '%')) and (org.AGENCY_ID = #{agencyId} or org.AGENCY_PIDS like CONCAT(#{orgIdpath}, '%'))
group by org.ID, org.PARTY_ORG_NAME group by org.ID, org.PARTY_ORG_NAME
order by org.SORT
</select> </select>
<!-- 灵山:省委~党委党组织+党员数量列表 --> <!-- 灵山:省委~党委党组织+党员数量列表 -->

Loading…
Cancel
Save