Browse Source

Merge branch 'yantai_zhengwu_master' into dev

master
曲树通 2 years ago
parent
commit
095631aa9a
  1. 17
      epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/AgencyCountCensusResultDTO.java
  2. 7
      epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/CustomerAgencyController.java
  3. 2
      epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/CustomerAgencyDao.java
  4. 1
      epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/CustomerAgencyService.java
  5. 27
      epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/CustomerAgencyServiceImpl.java
  6. 6
      epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/StaffLoginLogServiceImpl.java
  7. 9
      epmet-module/gov-org/gov-org-server/src/main/resources/mapper/CustomerAgencyDao.xml
  8. 10
      epmet-module/gov-org/gov-org-server/src/main/resources/mapper/StaffLoginLogDao.xml

17
epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/AgencyCountCensusResultDTO.java

@ -0,0 +1,17 @@
package com.epmet.dto.result;
import java.io.Serializable;
/**
* @ClassName AgencyCountCensus$
* @Description
* @Date 2023/4/6 16:46
* @Author lichao
**/
public class AgencyCountCensusResultDTO implements Serializable {
private static final long serialVersionUID = 4360690752084258055L;
private String level;
private Integer count;
}

7
epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/CustomerAgencyController.java

@ -518,4 +518,11 @@ public class CustomerAgencyController {
}
@GetMapping("getAgencyCountList")
public Result<List<AgencyCountCensusResultDTO>> getAgencyCountList(@RequestParam String agencyId){
return new Result<List<AgencyCountCensusResultDTO>>().ok(customerAgencyService.getAgencyCountList(agencyId));
}
}

2
epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/CustomerAgencyDao.java

@ -429,5 +429,7 @@ public interface CustomerAgencyDao extends BaseDao<CustomerAgencyEntity> {
* @return
*/
List<AgencyResultDTO> getAllCommunity(String customerId);
Integer agencyCount(@Param("pids") String pids,@Param("level") String level);
}

1
epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/CustomerAgencyService.java

@ -362,4 +362,5 @@ public interface CustomerAgencyService extends BaseService<CustomerAgencyEntity>
* @return
*/
String getOrgIdPath(String orgId);
List<AgencyCountCensusResultDTO> getAgencyCountList(String agencyId);
}

27
epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/CustomerAgencyServiceImpl.java

@ -1624,4 +1624,31 @@ public class CustomerAgencyServiceImpl extends BaseServiceImpl<CustomerAgencyDao
}
return customerAgencyEntity.getPids().concat(StrConstant.COLON).concat(orgId);
}
@Override
public List<AgencyCountCensusResultDTO> getAgencyCountList(String agencyId) {
List<AgencyCountCensusResultDTO> agencyCountCensusResultDTOS = new ArrayList<>();
CustomerAgencyEntity customerAgency = baseDao.selectById(agencyId);
if (customerAgency != null){
// pidu
// 区县级
if (customerAgency.getLevel().equals("district")){
// Integer count = baseDao.agencyCount()
// 镇街级
}else if (customerAgency.getLevel().equals("street")){
}else{
}
}else{
throw new EpmetException(EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(),"获取用户组织信息异常","获取用户组织信息异常");
}
return agencyCountCensusResultDTOS;
}
}

6
epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/StaffLoginLogServiceImpl.java

@ -186,6 +186,12 @@ public class StaffLoginLogServiceImpl extends BaseServiceImpl<StaffLoginLogDao,
@Override
public PageData<AccountActivityInfo> getAccountActivityInfo(CountActivityFormDTO formDTO) {
if (formDTO.getIsPage()) {
List<AccountActivityInfo> accountActivityInfos = baseDao.selectListActivityInfo(formDTO);
int total = CollectionUtils.isEmpty(accountActivityInfos) ? NumConstant.ZERO : accountActivityInfos.size();
return new PageData<>(accountActivityInfos, total);
}
List<AccountActivityInfo> accountActivityInfos = baseDao.selectListActivityInfo(formDTO);
int total = CollectionUtils.isEmpty(accountActivityInfos) ? NumConstant.ZERO : accountActivityInfos.size();
return new PageData<>(accountActivityInfos, total);

9
epmet-module/gov-org/gov-org-server/src/main/resources/mapper/CustomerAgencyDao.xml

@ -863,6 +863,15 @@
AND CUSTOMER_ID = #{customerId}
AND pids LIKE concat('%',#{agencyId}, '%' )
</update>
<select id="agencyCount" resultType="java.lang.Integer">
select count(*)
from customer_agency
where DEL_FLAG = 0
and LEVEL = #{level}
and PIDS like concat(#{pids},'%')
</select>
<select id="selectSubOrg" resultType="com.epmet.dto.result.SubOrgResDTO">
SELECT

10
epmet-module/gov-org/gov-org-server/src/main/resources/mapper/StaffLoginLogDao.xml

@ -176,13 +176,11 @@
customer_agency a
LEFT JOIN staff_login_log l ON a.ID = l.AGENCY_ID
WHERE
a.PIDS LIKE CONCAT(
'%',
#{orgId},
'%'
)
AND a.`LEVEL` = 'community'
a.`LEVEL` = 'community'
AND a.DEL_FLAG = '0'
<if test="orgId!= null and orgId.trim() != ''">
AND a.PIDS LIKE CONCAT('%',#{orgId},'%')
</if>
GROUP BY
a.ID
) t;

Loading…
Cancel
Save