Browse Source

Merge remote-tracking branch 'origin/dev_2021_12_30_bug' into develop

dev
zxc 4 years ago
parent
commit
4fff16a6a8
  1. 4
      epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/govproject/impl/GovProjectServiceImpl.java
  2. 2
      epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/dto/result/ResiBuzzLeftPieChartResultDTO.java
  3. 17
      epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/dao/IssueDao.java
  4. 9
      epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/impl/IssueServiceImpl.java
  5. 30
      epmet-module/gov-issue/gov-issue-server/src/main/resources/mapper/IssueDao.xml
  6. 2
      epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/controller/ProjectTraceController.java
  7. 2
      epmet-user/epmet-user-client/src/main/java/com/epmet/feign/EpmetUserOpenFeignClient.java
  8. 8
      epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/VolunteerServiceImpl.java

4
epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/govproject/impl/GovProjectServiceImpl.java

@ -487,9 +487,9 @@ public class GovProjectServiceImpl implements GovProjectService {
if (!org.springframework.util.CollectionUtils.isEmpty(userList)) {
//2-1.根据身份证号查询负能平台用户信息
IcResiUserDTO icResiUserDTO = epmetUserService.getIcResiUser(userList.get(0).getIdNum(), formDTO.getCustomerId());
resultDTO.setIcUserId(icResiUserDTO.getId());
resultDTO.setIcUserName(icResiUserDTO.getName());
if (null != icResiUserDTO) {
resultDTO.setIcUserId(icResiUserDTO.getId());
resultDTO.setIcUserName(icResiUserDTO.getName());
//2-2.查询人员的家庭成员数据
List<ProjectAnalysisResultDTO.Home> homeList = epmetUserService.getHomeUserList(icResiUserDTO.getHomeId(), icResiUserDTO.getId());
resultDTO.setHomeUserList(homeList);

2
epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/dto/result/ResiBuzzLeftPieChartResultDTO.java

@ -41,6 +41,6 @@ public class ResiBuzzLeftPieChartResultDTO implements Serializable {
this.count = NumConstant.ZERO;
this.categoryCode = "";
this.categoryName = "";
this.color = "";
this.color = "#0091ed";
}
}

17
epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/dao/IssueDao.java

@ -254,6 +254,23 @@ public interface IssueDao extends BaseDao<IssueEntity> {
*/
List<ResiBuzzLeftPieChartResultDTO> resiBuzzLeftPieChart(@Param("orgId")String orgId,@Param("orgType")String orgType,@Param("length")Integer length,@Param("customerId")String customerId);
/**
* @Description
* @param length
* @author zxc
* @date 2021/12/30 9:18 上午
*/
List<ResiBuzzLeftPieChartResultDTO> resiBuzzLeftPieChartByIssueIds(@Param("length")Integer length,@Param("issueIds")List<String> issueIds);
/**
* @Description 查询前50名的议题ID
* @param orgId
* @param orgType
* @author zxc
* @date 2021/12/30 9:16 上午
*/
List<String> resiBuzzLeftPieChartIssueIds(@Param("orgId")String orgId,@Param("orgType")String orgType);
/**
* @Description 查询组织下每个网格的项目数
* @param orgId

9
epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/impl/IssueServiceImpl.java

@ -1662,8 +1662,13 @@ public class IssueServiceImpl extends BaseServiceImpl<IssueDao, IssueEntity> imp
}
// 分类编码长度
Integer length = baseDao.selectOneLevelCategoryLength(tokenDto.getCustomerId());
List<ResiBuzzLeftPieChartResultDTO> result = baseDao.resiBuzzLeftPieChart(formDTO.getOrgId(), formDTO.getOrgType(), length, tokenDto.getCustomerId());
if(CollectionUtils.isEmpty(result)){
// List<ResiBuzzLeftPieChartResultDTO> result = baseDao.resiBuzzLeftPieChart(formDTO.getOrgId(), formDTO.getOrgType(), length, tokenDto.getCustomerId());
List<String> issueIds = baseDao.resiBuzzLeftPieChartIssueIds(formDTO.getOrgId(), formDTO.getOrgType());
if(CollectionUtils.isEmpty(issueIds)){
return new ArrayList<>();
}
List<ResiBuzzLeftPieChartResultDTO> result = baseDao.resiBuzzLeftPieChartByIssueIds(length, issueIds);
if (CollectionUtils.isEmpty(result)){
return new ArrayList<>();
}
return result;

30
epmet-module/gov-issue/gov-issue-server/src/main/resources/mapper/IssueDao.xml

@ -672,4 +672,34 @@
</foreach>
)
</select>
<!-- 查询前50名的议题ID -->
<select id="resiBuzzLeftPieChartIssueIds" resultType="java.lang.String">
SELECT
i.ID AS issueId
FROM issue i
INNER JOIN issue_vote_statistical s ON (s.ISSUE_ID = i.ID AND s.DEL_FLAG = '0')
WHERE i.DEL_FLAG = '0'
<if test='orgType == "grid" '>
AND i.GRID_ID = #{orgId}
</if>
<if test='orgType == "agency" '>
AND i.ORG_ID_PATH LIKE CONCAT('%',#{orgId},'%')
</if>
ORDER BY (s.SUPPORT_COUNT + s.OPPOSITION_COUNT) DESC,i.created_time DESC LIMIT 50
</select>
<select id="resiBuzzLeftPieChartByIssueIds" resultType="com.epmet.dto.result.ResiBuzzLeftPieChartResultDTO">
SELECT
IFNULL(LEFT(ic.CATEGORY_CODE,#{length}),'') AS categoryCode,
IFNULL(cd.CATEGORY_NAME,'其他') AS categoryName,
IFNULL(cd.color,'#0091ed') AS color
FROM issue_category ic
INNER JOIN issue_project_category_dict cd ON (cd.CATEGORY_CODE = LEFT(ic.CATEGORY_CODE,#{length}) AND cd.DEL_FLAG = '0' AND cd.CUSTOMER_ID = ic.CUSTOMER_ID)
AND ic.ISSUE_ID IN (
<foreach collection="issueIds" item="issueId" separator=",">
#{issueId}
</foreach>
) GROUP BY categoryName
</select>
</mapper>

2
epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/controller/ProjectTraceController.java

@ -99,7 +99,7 @@ public class ProjectTraceController {
* @date 2020/5/11 16:25
*/
@PostMapping("projectdetail")
@RequirePermission(requirePermission = RequirePermissionEnum.WORK_PROJECT_TRACE_DETAIL)
//@RequirePermission(requirePermission = RequirePermissionEnum.WORK_PROJECT_TRACE_DETAIL)
public Result<ProjectDetailResultDTO> getProjectDetail(@LoginUser TokenDto tokenDto, @RequestBody ProjectDetailFromDTO fromDTO) {
ProjectDetailResultDTO result = projectTraceService.getProjectDetail(tokenDto, fromDTO);
return new Result<ProjectDetailResultDTO>().ok(result);

2
epmet-user/epmet-user-client/src/main/java/com/epmet/feign/EpmetUserOpenFeignClient.java

@ -688,7 +688,7 @@ public interface EpmetUserOpenFeignClient {
* @param patrolQueryFormDTO
* @return
*/
@PostMapping(value = "//epmetuser/patrolroutinework/selectList")
@PostMapping(value = "/epmetuser/patrolroutinework/selectList")
Result<List<PatrolRoutineWorkResult>> getPatrolRoutineWorkList(@RequestBody PatrolQueryFormDTO patrolQueryFormDTO);
/**

8
epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/VolunteerServiceImpl.java

@ -17,6 +17,8 @@ import com.epmet.feign.EpmetHeartOpenFeignClient;
import com.epmet.feign.GovOrgOpenFeignClient;
import com.epmet.feign.OperCustomizeOpenFeignClient;
import com.epmet.service.VolunteerService;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
@ -29,6 +31,7 @@ import java.util.stream.Collectors;
* @Date 2021/12/10 5:48 下午
* @Version 1.0
*/
@Slf4j
@Service
public class VolunteerServiceImpl implements VolunteerService, ResultDataResolver {
@ -135,7 +138,10 @@ public class VolunteerServiceImpl implements VolunteerService, ResultDataResolve
VolunteerDistributionResultDTO.Distribution distribution = new VolunteerDistributionResultDTO.Distribution();
ResiUserBaseInfoResultDTO userBaseInfo = userBaseInfoDao.selecUserBaseInfoByUserId(volunteerEpmetUserId);
if (userBaseInfo == null || StringUtils.isBlank(userBaseInfo.getIdNum())){
log.warn("getVolunteerDistribution selecUserBaseInfoByUserId return null or idCard is null,volunteerEpmetUserId:{}", volunteerEpmetUserId);
continue;
}
//使用身份证号查询ic resi信息
IcResiUserDTO icResiUserInfo = icResiUserDao.selectIdByIdCard(customerId, userBaseInfo.getIdNum(), null);
if (icResiUserInfo == null) {

Loading…
Cancel
Save