Browse Source

红色党建

master
lichao 2 years ago
parent
commit
760b7a6517
  1. 10
      epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partyOrg/controller/IcPartyOrgController.java
  2. 33
      epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partymember/controller/YiFengScreenController.java
  3. 8
      epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partymember/service/YiFengScreenService.java
  4. 73
      epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partymember/service/impl/YiFengScreenServiceImpl.java

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

@ -22,6 +22,7 @@ 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 jodd.util.StringUtil;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
@ -114,6 +115,15 @@ public class IcPartyOrgController {
return icPartyOrgService.getSearchTreelist(formDTO);
}
@GetMapping("yifengScreen/getSearchTreelist")
public Result<List<IcPartyOrgTreeDTO>> getSearchTreelistForScreen(PartyOrgTreeListDTO formDTO){
formDTO.setCustomerId("1739891126105206785");
if (formDTO.getAgencyId() == null || StringUtil.isBlank(formDTO.getAgencyId())){
formDTO.setAgencyId("1739891126105206786");
}
return icPartyOrgService.getSearchTreelist(formDTO);
}
@PostMapping("getOrgTreeHaveGroup")
public Result<List<IcPartyOrgTreeDTO>> getOrgTreeHaveGroup(@LoginUser TokenDto tokenDto,PartyOrgTreeListDTO formDTO){
formDTO.setCustomerId(tokenDto.getCustomerId());

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

@ -1,21 +1,26 @@
package com.epmet.modules.partymember.controller;
import com.epmet.commons.tools.annotation.LoginUser;
import com.epmet.commons.tools.dto.form.PageFormDTO;
import com.epmet.commons.tools.exception.EpmetErrorCode;
import com.epmet.commons.tools.exception.EpmetException;
import com.epmet.commons.tools.page.PageData;
import com.epmet.commons.tools.security.dto.TokenDto;
import com.epmet.commons.tools.utils.DateUtils;
import com.epmet.commons.tools.utils.Result;
import com.epmet.commons.tools.validator.ValidatorUtils;
import com.epmet.modules.partyOrg.service.YiFengPartyOrgService;
import com.epmet.modules.partymember.service.YiFengScreenService;
import com.epmet.resi.partymember.dto.icpartyact.form.IcPartyActPageFormDTO;
import com.epmet.resi.partymember.dto.icpartyact.result.IcPartyActDetailResDTO;
import com.epmet.resi.partymember.dto.icpartyact.result.IcPartyActPageResultDTO;
import com.epmet.resi.partymember.dto.partyOrg.result.LingShanPartyOrgAndOtherObjQtyRstDTO;
import com.epmet.resi.partymember.dto.partyOrg.result.LingShanScreenPartyObjectByTypeRstDTO;
import com.epmet.resi.partymember.dto.partymember.result.*;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.bind.annotation.*;
import java.util.Date;
import java.util.List;
@ -33,9 +38,25 @@ public class YiFengScreenController {
@PostMapping("act-page-list")
public Result<PageData<IcPartyActPageResultDTO>> actPageList(@RequestBody IcPartyActPageFormDTO formDTO){
formDTO.setCustomerId("1739891126105206785");
// formDTO.setPublishStaffId(tokenDto.getUserId());
// ValidatorUtils.validateEntity(formDTO, PageFormDTO.AddUserInternalGroup.class);
return new Result<PageData<IcPartyActPageResultDTO>>().ok(yiFengScreenService.actPageList(formDTO));
}
@PostMapping("act-detail/{icPartyActId}")
public Result<IcPartyActDetailResDTO> actDetail(@PathVariable("icPartyActId")String icPartyActId){
if(StringUtils.isBlank(icPartyActId)){
return new Result<>();
}
return new Result<IcPartyActDetailResDTO>().ok(yiFengScreenService.queryActDetail("1739891126105206785",icPartyActId));
}
/**
* @description: 党组织数(只到党支部没有小组)
* @param agencyId:
* @param :
* @return
* @author: WangXianZhang
* @date: 2023/4/14 1:00 PM
@ -50,7 +71,7 @@ public class YiFengScreenController {
/**
* @description: 党建引领党组织和数量
* @param agencyId: 当前组织id
* @param : 当前组织id
* @return com.epmet.commons.tools.utils.Result
* @author: WangXianZhang
* @date: 2023/4/14 10:57 AM

8
epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partymember/service/YiFengScreenService.java

@ -1,5 +1,9 @@
package com.epmet.modules.partymember.service;
import com.epmet.commons.tools.page.PageData;
import com.epmet.resi.partymember.dto.icpartyact.form.IcPartyActPageFormDTO;
import com.epmet.resi.partymember.dto.icpartyact.result.IcPartyActDetailResDTO;
import com.epmet.resi.partymember.dto.icpartyact.result.IcPartyActPageResultDTO;
import com.epmet.resi.partymember.dto.partymember.result.*;
import java.util.Date;
@ -61,4 +65,8 @@ public interface YiFengScreenService {
* @date: 2023/4/17 1:55 PM
*/
Integer getPartymemberQtyOfOrg(String agencyId);
PageData<IcPartyActPageResultDTO> actPageList(IcPartyActPageFormDTO formDTO);
IcPartyActDetailResDTO queryActDetail(String customerId, String icPartyActId);
}

73
epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partymember/service/impl/YiFengScreenServiceImpl.java

@ -1,32 +1,40 @@
package com.epmet.modules.partymember.service.impl;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.epmet.commons.tools.constant.NumConstant;
import com.epmet.commons.tools.constant.ServiceConstant;
import com.epmet.commons.tools.dto.result.CustomerStaffInfoCacheResult;
import com.epmet.commons.tools.enums.GenderEnum;
import com.epmet.commons.tools.enums.PartyOrgTypeEnum;
import com.epmet.commons.tools.exception.EpmetErrorCode;
import com.epmet.commons.tools.exception.EpmetException;
import com.epmet.commons.tools.exception.ExceptionUtils;
import com.epmet.commons.tools.feign.ResultDataResolver;
import com.epmet.commons.tools.page.PageData;
import com.epmet.commons.tools.redis.common.CustomerOrgRedis;
import com.epmet.commons.tools.redis.common.CustomerResiUserRedis;
import com.epmet.commons.tools.redis.common.bean.AgencyInfoCache;
import com.epmet.commons.tools.redis.common.bean.IcResiUserInfoCache;
import com.epmet.commons.tools.utils.DateUtils;
import com.epmet.commons.tools.utils.EpmetRequestHolder;
import com.epmet.commons.tools.utils.PidUtils;
import com.epmet.commons.tools.utils.*;
import com.epmet.feign.EpmetUserOpenFeignClient;
import com.epmet.modules.partyOrg.dao.IcPartyActDao;
import com.epmet.modules.partyOrg.dao.IcPartyActTypeDictDao;
import com.epmet.modules.partyOrg.dao.IcPartyOrgDao;
import com.epmet.modules.partyOrg.entity.IcPartyActEntity;
import com.epmet.modules.partyOrg.entity.IcPartyActTypeDictEntity;
import com.epmet.modules.partyOrg.entity.IcPartyOrgEntity;
import com.epmet.modules.partyOrg.service.IcPartyActSignInRecordService;
import com.epmet.modules.partymember.dao.IcPartyMemberDao;
import com.epmet.modules.partymember.entity.IcPartyMemberEntity;
import com.epmet.modules.partymember.service.LingShanScreenService;
import com.epmet.modules.partymember.service.YiFengScreenService;
import com.epmet.resi.group.feign.ResiGroupOpenFeignClient;
import com.epmet.resi.partymember.dto.icpartyact.form.IcPartyActPageFormDTO;
import com.epmet.resi.partymember.dto.icpartyact.result.IcPartyActDetailResDTO;
import com.epmet.resi.partymember.dto.icpartyact.result.IcPartyActPageResultDTO;
import com.epmet.resi.partymember.dto.partymember.result.*;
import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
@ -83,18 +91,17 @@ public class YiFengScreenServiceImpl implements YiFengScreenService, ResultDataR
}
});
/* // 2.查询党小组
Integer groupQty = getResultDataOrReturnNull(groupOpenFeignClient.getPartyGroupQuantityByAgencyId(agencyId), ServiceConstant.RESI_GROUP_SERVER);
if (groupQty == null) {
logger.error("【移风大屏】党建引领-查询党小组信息失败,agencyId:" + agencyId);
groupQty = 0;
}
// 党员
LambdaQueryWrapper<IcPartyMemberEntity> query = new LambdaQueryWrapper<>();
query.likeRight(IcPartyMemberEntity::getAgencyPids, PidUtils.convertPid2OrgIdPath(agencyId, agencyInfo.getPids()))
.or()
.eq(IcPartyMemberEntity::getAgencyId, agencyId);
YiFengScreenPartyOrgCategoryResultDTO gq = new YiFengScreenPartyOrgCategoryResultDTO();
gq.setName("党小组");
gq.setPartyOrgType(null);
gq.setValue(groupQty);
l.add(gq);*/
YiFengScreenPartyOrgCategoryResultDTO dangyuan = new YiFengScreenPartyOrgCategoryResultDTO();
dangyuan.setName("党员");
dangyuan.setPartyOrgType("7");
dangyuan.setValue(icPartyMemberDao.selectCount(query));
return l;
}
@ -378,4 +385,42 @@ public class YiFengScreenServiceImpl implements YiFengScreenService, ResultDataR
.eq(IcPartyMemberEntity::getAgencyId, agencyId);
return icPartyMemberDao.selectCount(query);
}
@Override
public PageData<IcPartyActPageResultDTO> actPageList(IcPartyActPageFormDTO formDTO) {
PageInfo<IcPartyActPageResultDTO> pageInfo = PageHelper.startPage(formDTO.getPageNo(),
formDTO.getPageSize(), formDTO.getIsPage()).doSelectPageInfo(() -> partyActDao.selectPageList(formDTO));
/* if(!formDTO.getIsPage()){
// 不分页
pageInfo.getList().forEach(l->{
l.setJoinOrgList(icPartyActOrgDao.selectJoinOrgList(l.getIcPartyActId()));
});
}*/
/* pageInfo.getList().forEach(l->{
l.setAttachments(resiPartymemberAttachmentDao.selectListByBusinessId(l.getIcPartyActId()));
});*/
return new PageData<>(pageInfo.getList(), pageInfo.getTotal());
}
@Override
public IcPartyActDetailResDTO queryActDetail(String customerId, String icPartyActId) {
IcPartyActEntity icPartyActEntity = partyActDao.selectById(icPartyActId);
if (null == icPartyActEntity) {
String msg = "活动已删除";
throw new EpmetException(EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(), msg, msg);
}
IcPartyActDetailResDTO resDTO= ConvertUtils.sourceToTarget(icPartyActEntity,IcPartyActDetailResDTO.class);
resDTO.setAutoPublicTypeDesc(icPartyActEntity.getAutoPublicType().compareTo(NumConstant.ZERO) != NumConstant.ZERO ? "活动开始前"+icPartyActEntity.getAutoPublicType()+"天" : "立即发布");
resDTO.setIcPartyActId(icPartyActEntity.getId());
resDTO.setActTypeName(partyActDao.selectActTypeName(customerId,icPartyActEntity.getActType()));
//参加人员类型,0:全体党员;1:支部委员
resDTO.setJoinUserTypeName(NumConstant.ZERO_STR.equals(resDTO.getJoinUserType()) ? "全体党员" : "支部委员");
// resDTO.setAttachmentList(resiPartymemberAttachmentDao.selectListByBusinessId(icPartyActId));
// resDTO.setIsSignIn(SpringContextUtils.getBean(IcPartyActSignInRecordService.class).checkSignIn(icPartyActId,userId));
// resDTO.setJoinOrgList(icPartyActOrgDao.selectJoinOrgList(icPartyActId));
return resDTO;
}
}

Loading…
Cancel
Save