Browse Source

Merge branch 'lingshan_master' of http://git.elinkit.com.cn:7070/r/epmet-cloud

master
wxz 2 years ago
parent
commit
86ab8775b5
  1. 2
      epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partyOrg/dao/IcPartyActDao.java
  2. 13
      epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partymember/service/impl/LingShanScreenServiceImpl.java
  3. 2
      epmet-module/resi-partymember/resi-partymember-server/src/main/resources/mapper/partyOrg/IcPartyActDao.xml
  4. 8
      epmet-user/epmet-user-server/src/main/java/com/epmet/controller/CustomerStaffController.java
  5. 3
      epmet-user/epmet-user-server/src/main/java/com/epmet/dao/IcResiUserDao.java
  6. 5
      epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/LingShanScreenServiceImpl.java
  7. 21
      epmet-user/epmet-user-server/src/main/resources/mapper/IcResiUserDao.xml

2
epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partyOrg/dao/IcPartyActDao.java

@ -64,7 +64,7 @@ public interface IcPartyActDao extends BaseDao<IcPartyActEntity> {
* @date: 2023/4/14 12:12 PM * @date: 2023/4/14 12:12 PM
*/ */
List<LingShanScreenPartyActTypeAndQtyResultDTO> getPartyActTypeAndQuantity(@Param("customerId") String customerId, List<LingShanScreenPartyActTypeAndQtyResultDTO> getPartyActTypeAndQuantity(@Param("customerId") String customerId,
@Param("orgIdPath") String orgIdPath); @Param("partyOrgIdPath") String partyOrgIdPath);
/** /**

13
epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partymember/service/impl/LingShanScreenServiceImpl.java

@ -115,7 +115,18 @@ public class LingShanScreenServiceImpl implements LingShanScreenService, ResultD
if (agencyInfo == null) { if (agencyInfo == null) {
throw new EpmetException(EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(), "查询当前组织信息失败,agencyId:" + agencyId, "查询当前组织信息失败"); throw new EpmetException(EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(), "查询当前组织信息失败,agencyId:" + agencyId, "查询当前组织信息失败");
} }
List<LingShanScreenPartyActTypeAndQtyResultDTO> l = partyActDao.getPartyActTypeAndQuantity(EpmetRequestHolder.getLoginUserCustomerId(), PidUtils.convertPid2OrgIdPath(agencyId, agencyInfo.getPids()));
// 这里要查询的是,发布到我当前这个组织的活动,而不是我这个组织发布的,所以。。。
// 先根据行政组织查询到党组织的信息
// LambdaQueryWrapper<IcPartyOrgEntity> q = new LambdaQueryWrapper<>();
// q.eq(IcPartyOrgEntity::getAgencyId, agencyId);
// IcPartyOrgEntity partyOrg = icPartyOrgDao.selectOne(q);
IcPartyOrgEntity partyOrg = icPartyOrgDao.selectDefaultPartyOrg(agencyId, agencyInfo.getLevel());
if (partyOrg == null) {
throw new EpmetException(EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(), "查询当前党组织信息为空,agencyId:" + agencyId, "查询当前党组织信息为空");
}
List<LingShanScreenPartyActTypeAndQtyResultDTO> l = partyActDao.getPartyActTypeAndQuantity(EpmetRequestHolder.getLoginUserCustomerId(), PidUtils.convertPid2OrgIdPath(partyOrg.getId(), partyOrg.getOrgPids()));
List<String> type2beReturn = Arrays.asList("wmfwhd", "ljgj", "ztdr"); List<String> type2beReturn = Arrays.asList("wmfwhd", "ljgj", "ztdr");

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

@ -279,7 +279,7 @@
inner join ic_party_act_type_dict t on (a.ACT_TYPE = t.TYPE_KEY and t.DEL_FLAG = 0 and a.CUSTOMER_ID=t.CUSTOMER_ID) inner join ic_party_act_type_dict t on (a.ACT_TYPE = t.TYPE_KEY and t.DEL_FLAG = 0 and a.CUSTOMER_ID=t.CUSTOMER_ID)
where a.DEL_FLAG = 0 where a.DEL_FLAG = 0
and a.CUSTOMER_ID = #{customerId} and a.CUSTOMER_ID = #{customerId}
and a.ORG_ID_PATH like CONCAT(#{orgIdPath}, '%') and a.PUBLISH_ORG_PATH like CONCAT(#{partyOrgIdPath}, '%')
group by t.TYPE_KEY group by t.TYPE_KEY
</select> </select>

8
epmet-user/epmet-user-server/src/main/java/com/epmet/controller/CustomerStaffController.java

@ -95,6 +95,14 @@ public class CustomerStaffController {
return new Result(); return new Result();
} }
@PostMapping("update")
public Result updateById(@RequestBody CustomerStaffDTO dto) {
//效验数据
ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class);
customerStaffService.update(dto);
return new Result();
}
@DeleteMapping @DeleteMapping
public Result delete(@RequestBody String[] ids) { public Result delete(@RequestBody String[] ids) {
//效验数据 //效验数据

3
epmet-user/epmet-user-server/src/main/java/com/epmet/dao/IcResiUserDao.java

@ -513,7 +513,8 @@ public interface IcResiUserDao extends BaseDao<IcResiUserEntity> {
* @Date: 2023/5/24 9:27 AM * @Date: 2023/5/24 9:27 AM
*/ */
List<LingShanSpecialCrowdStatsByOrgResultDTO> countSpecialQtyOfAllSubOrg(@Param("orgIdPath") String orgIdPath, List<LingShanSpecialCrowdStatsByOrgResultDTO> countSpecialQtyOfAllSubOrg(@Param("orgIdPath") String orgIdPath,
@Param("specialType") String specialType); @Param("specialType") String specialType,
@Param("orgLevel") String orgLevel);
int countSpecialQtyOfOrg(@Param("orgIdPath") String orgIdPath, @Param("specialType") String specialType); int countSpecialQtyOfOrg(@Param("orgIdPath") String orgIdPath, @Param("specialType") String specialType);

5
epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/LingShanScreenServiceImpl.java

@ -62,7 +62,7 @@ public class LingShanScreenServiceImpl implements LingShanScreenService, ResultD
} }
List<SubOrgResDTO> subOrgs = getResultDataOrThrowsException(govOrgOpenFeignClient.subOrgList(parentAgencyId), ServiceConstant.GOV_ORG_SERVER, EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(), null, null); List<SubOrgResDTO> subOrgs = getResultDataOrThrowsException(govOrgOpenFeignClient.subOrgList(parentAgencyId), ServiceConstant.GOV_ORG_SERVER, EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(), null, null);
List<String> orgIdPaths = subOrgs.stream().map(sub -> PidUtils.convertPid2OrgIdPath(sub.getOrgId(), sub.getPids())).collect(Collectors.toList()); // List<String> orgIdPaths = subOrgs.stream().map(sub -> PidUtils.convertPid2OrgIdPath(sub.getOrgId(), sub.getPids())).collect(Collectors.toList());
List<LingShanSpecialCrowdStatsByOrgResultDTO> rl = subOrgs.stream().map(sub -> { List<LingShanSpecialCrowdStatsByOrgResultDTO> rl = subOrgs.stream().map(sub -> {
LingShanSpecialCrowdStatsByOrgResultDTO t = new LingShanSpecialCrowdStatsByOrgResultDTO(); LingShanSpecialCrowdStatsByOrgResultDTO t = new LingShanSpecialCrowdStatsByOrgResultDTO();
@ -105,7 +105,8 @@ public class LingShanScreenServiceImpl implements LingShanScreenService, ResultD
// if (LingShanSpecialCrowdTypeEnums.JZHZ.getType().equals(specialType) || StringUtils.isBlank(specialType)) { // if (LingShanSpecialCrowdTypeEnums.JZHZ.getType().equals(specialType) || StringUtils.isBlank(specialType)) {
// ol.addAll(jzhzDao.statsCountsByOrgIds(orgIdPaths)); // ol.addAll(jzhzDao.statsCountsByOrgIds(orgIdPaths));
// } // }
List<LingShanSpecialCrowdStatsByOrgResultDTO> ol = icResiUserDao.countSpecialQtyOfAllSubOrg(PidUtils.convertPid2OrgIdPath(parentAgencyInfo.getId(), parentAgencyInfo.getPids()), specialType); List<LingShanSpecialCrowdStatsByOrgResultDTO> ol =
icResiUserDao.countSpecialQtyOfAllSubOrg(PidUtils.convertPid2OrgIdPath(parentAgencyInfo.getId(), parentAgencyInfo.getPids()), specialType, parentAgencyInfo.getLevel());
// 开始给rl++ // 开始给rl++
for (LingShanSpecialCrowdStatsByOrgResultDTO qtyData : ol) { for (LingShanSpecialCrowdStatsByOrgResultDTO qtyData : ol) {

21
epmet-user/epmet-user-server/src/main/resources/mapper/IcResiUserDao.xml

@ -1742,11 +1742,19 @@
select r.* from ic_resi_user r where r.id = #{icResiUserId} select r.* from ic_resi_user r where r.id = #{icResiUserId}
</select> </select>
<!--根据orgIdPath计算各个组织下的特殊人群数量--> <!--根据orgIdPath计算各个组织下的特殊人群数量。
如果是社区,那么就要查询网格,并且按照网格分组,如果是街道及以上,就直接用组织分组就可以了-->
<select id="countSpecialQtyOfAllSubOrg" <select id="countSpecialQtyOfAllSubOrg"
resultType="com.epmet.dto.result.lingshan.LingShanSpecialCrowdStatsByOrgResultDTO"> resultType="com.epmet.dto.result.lingshan.LingShanSpecialCrowdStatsByOrgResultDTO">
select count(*) quantity select count(*) quantity
, r.PIDS orgIdPath <choose>
<when test="orgLevel = 'community'">
, CONCAT(r.PIDS,':',r.GRID_ID) orgIdPath
</when>
<otherwise>
, r.PIDS orgIdPath
</otherwise>
</choose>
from ic_resi_user r from ic_resi_user r
inner join ic_special s on (s.DEL_FLAG = 0 and r.ID = s.IC_RESI_USER) inner join ic_special s on (s.DEL_FLAG = 0 and r.ID = s.IC_RESI_USER)
where r.DEL_FLAG = 0 where r.DEL_FLAG = 0
@ -1756,7 +1764,14 @@
<if test="specialType != null and specialType != ''"> <if test="specialType != null and specialType != ''">
and s.SPECIAL_RQLB like CONCAT('%',#{specialType},'%') and s.SPECIAL_RQLB like CONCAT('%',#{specialType},'%')
</if> </if>
group by r.PIDS <choose>
<when test="orgLevel = 'community'">
group by r.GRID_ID
</when>
<otherwise>
group by r.PIDS
</otherwise>
</choose>
</select> </select>
<!--指定组织下,指定人群类别,的数量--> <!--指定组织下,指定人群类别,的数量-->

Loading…
Cancel
Save