Browse Source

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

dev
yinzuomei 4 years ago
parent
commit
a9aa2777dc
  1. 2
      epmet-module/data-aggregator/data-aggregator-client/src/main/java/com/epmet/dataaggre/dto/govissue/IssueProjectCategoryDictDTO.java
  2. 2
      epmet-module/data-aggregator/data-aggregator-client/src/main/java/com/epmet/dataaggre/dto/govproject/result/ProjectCategoryTotalResultDTO.java
  3. 4
      epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/govproject/impl/GovProjectServiceImpl.java
  4. 15
      epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/result/demand/FinishResultDTO.java
  5. 22
      epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/IcUserDemandRecController.java
  6. 3
      epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/IcUserDemandRecService.java
  7. 23
      epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcUserDemandRecServiceImpl.java
  8. 6
      epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/impl/IssueServiceImpl.java
  9. 12
      epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/AgencySubResultDTO.java
  10. 2
      epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/CustomerGridController.java
  11. 31
      epmet-module/gov-org/gov-org-server/src/main/resources/mapper/CustomerAgencyDao.xml
  12. 2
      epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/ProjectServiceImpl.java

2
epmet-module/data-aggregator/data-aggregator-client/src/main/java/com/epmet/dataaggre/dto/govissue/IssueProjectCategoryDictDTO.java

@ -87,7 +87,7 @@ public class IssueProjectCategoryDictDTO implements Serializable {
/**
* 颜色
*/
private String colour;
private String color;
}

2
epmet-module/data-aggregator/data-aggregator-client/src/main/java/com/epmet/dataaggre/dto/govproject/result/ProjectCategoryTotalResultDTO.java

@ -19,7 +19,7 @@ public class ProjectCategoryTotalResultDTO implements Serializable {
//一级分类名称
private String categoryName;
//一级分类颜色
private String colour = "";
private String color = "";
//分类下项目总数
private Integer total = 0;

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

@ -373,7 +373,7 @@ public class GovProjectServiceImpl implements GovProjectService {
if (ca.getCategoryCode().equals(l.getCategoryCode())) {
dto.setCategoryCode(ca.getCategoryCode());
dto.setCategoryName(ca.getCategoryName());
dto.setColour(ca.getColour());
dto.setColor(ca.getColor());
}
});
map.put(l.getCategoryCode(), l.getCategoryCode());
@ -385,7 +385,7 @@ public class GovProjectServiceImpl implements GovProjectService {
dto.setAgencyId(formDTO.getAgencyId());
dto.setCategoryCode(ca.getCategoryCode());
dto.setCategoryName(ca.getCategoryName());
dto.setColour(ca.getColour());
dto.setColor(ca.getColor());
resultList.add(dto);
map.put(ca.getCategoryCode(), ca.getCategoryCode());
}

15
epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/result/demand/FinishResultDTO.java

@ -0,0 +1,15 @@
package com.epmet.dto.result.demand;
import lombok.Data;
import java.io.Serializable;
/**
* 完成需求时是否需要计算 区域化党建单位的满意度
*
*/
@Data
public class FinishResultDTO implements Serializable {
private Boolean sendCalStatisfaction;
private String partyUnitId;
}

22
epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/IcUserDemandRecController.java

@ -17,15 +17,23 @@
package com.epmet.controller;
import com.epmet.commons.rocketmq.messages.CalPartyUnitSatisfactionFormDTO;
import com.epmet.commons.tools.annotation.LoginUser;
import com.epmet.commons.tools.page.PageData;
import com.epmet.commons.tools.security.dto.TokenDto;
import com.epmet.commons.tools.utils.ExcelUtils;
import com.epmet.commons.tools.utils.Result;
import com.epmet.commons.tools.validator.ValidatorUtils;
import com.epmet.constant.SystemMessageType;
import com.epmet.constant.UserDemandConstant;
import com.epmet.dto.form.SystemMsgFormDTO;
import com.epmet.dto.form.demand.*;
import com.epmet.dto.result.demand.*;
import com.epmet.dto.result.demand.DemandRecResultDTO;
import com.epmet.dto.result.demand.FinishResultDTO;
import com.epmet.dto.result.demand.IcResiUserReportDemandRes;
import com.epmet.dto.result.demand.OptionDTO;
import com.epmet.feign.EpmetMessageOpenFeignClient;
import com.epmet.service.*;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
@ -60,7 +68,8 @@ public class IcUserDemandRecController {
private IcCommunitySelfOrganizationService icCommunitySelfOrganizationService;
@Autowired
private IcPartyUnitService icPartyUnitService;
@Autowired
private EpmetMessageOpenFeignClient epmetMessageOpenFeignClient;
/**
* 根据服务方类型查询 下拉框
@ -179,7 +188,16 @@ public class IcUserDemandRecController {
formDTO.setCustomerId(tokenDto.getCustomerId());
formDTO.setUserId(tokenDto.getUserId());
ValidatorUtils.validateEntity(formDTO,FinishStaffFromDTO.AddUserShowGroup.class,FinishStaffFromDTO.AddUserInternalGroup.class);
icUserDemandRecService.finish(formDTO);
FinishResultDTO finishResultDTO=icUserDemandRecService.finish(formDTO);
if(finishResultDTO.getSendCalStatisfaction()){
CalPartyUnitSatisfactionFormDTO mqMsg = new CalPartyUnitSatisfactionFormDTO();
mqMsg.setCustomerId(formDTO.getCustomerId());
mqMsg.setPartyUnitId(finishResultDTO.getPartyUnitId());
SystemMsgFormDTO form = new SystemMsgFormDTO();
form.setMessageType(SystemMessageType.CAL_PARTY_UNIT_SATISFACTION);
form.setContent(mqMsg);
epmetMessageOpenFeignClient.sendSystemMsgByMQ(form);
}
return new Result();
}

3
epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/IcUserDemandRecService.java

@ -24,6 +24,7 @@ import com.epmet.dto.form.demand.*;
import com.epmet.dto.result.demand.CategoryAnalysisResDTO;
import com.epmet.dto.result.demand.DemandRecResultDTO;
import com.epmet.dto.result.demand.DemandResearchAnalysisResultDTO;
import com.epmet.dto.result.demand.FinishResultDTO;
import com.epmet.dto.result.demand.IcResiUserReportDemandRes;
import com.epmet.dto.result.demand.ServiceStatDTO;
import com.epmet.entity.IcUserDemandRecEntity;
@ -130,7 +131,7 @@ public interface IcUserDemandRecService extends BaseService<IcUserDemandRecEntit
* 完成并评价
* @param formDTO
*/
void finish(FinishStaffFromDTO formDTO);
FinishResultDTO finish(FinishStaffFromDTO formDTO);
/**
* 数据分析-个人档案居民需求列表table

23
epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcUserDemandRecServiceImpl.java

@ -21,7 +21,6 @@ import com.alibaba.fastjson.JSON;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.epmet.commons.mybatis.service.impl.BaseServiceImpl;
import com.epmet.commons.rocketmq.messages.CalPartyUnitSatisfactionFormDTO;
import com.epmet.commons.tools.constant.FieldConstant;
import com.epmet.commons.tools.constant.NumConstant;
import com.epmet.commons.tools.constant.StrConstant;
@ -34,7 +33,6 @@ import com.epmet.commons.tools.page.PageData;
import com.epmet.commons.tools.redis.common.CustomerStaffRedis;
import com.epmet.commons.tools.utils.ConvertUtils;
import com.epmet.commons.tools.utils.Result;
import com.epmet.constant.SystemMessageType;
import com.epmet.constant.UserDemandConstant;
import com.epmet.dao.IcUserDemandOperateLogDao;
import com.epmet.dao.IcUserDemandRecDao;
@ -44,19 +42,18 @@ import com.epmet.dto.CustomerAgencyDTO;
import com.epmet.dto.CustomerGridDTO;
import com.epmet.dto.IcUserDemandRecDTO;
import com.epmet.dto.form.CustomerGridFormDTO;
import com.epmet.dto.form.SystemMsgFormDTO;
import com.epmet.dto.form.demand.*;
import com.epmet.dto.result.AllGridsByUserIdResultDTO;
import com.epmet.dto.result.IcResiUserBriefDTO;
import com.epmet.dto.result.UserBaseInfoResultDTO;
import com.epmet.dto.result.demand.*;
import com.epmet.dto.result.demand.DemandRecResultDTO;
import com.epmet.dto.result.demand.FinishResultDTO;
import com.epmet.dto.result.demand.IcResiUserReportDemandRes;
import com.epmet.dto.result.demand.ServiceStatDTO;
import com.epmet.dto.result.demand.*;
import com.epmet.entity.*;
import com.epmet.feign.EpmetAdminOpenFeignClient;
import com.epmet.feign.EpmetMessageOpenFeignClient;
import com.epmet.feign.EpmetUserOpenFeignClient;
import com.epmet.feign.GovOrgOpenFeignClient;
import com.epmet.service.IcResiDemandDictService;
@ -98,8 +95,7 @@ public class IcUserDemandRecServiceImpl extends BaseServiceImpl<IcUserDemandRecD
private EpmetUserOpenFeignClient epmetUserOpenFeignClient;
@Autowired
private EpmetAdminOpenFeignClient adminOpenFeignClient;
@Autowired
private EpmetMessageOpenFeignClient epmetMessageOpenFeignClient;
@Override
public PageData<IcUserDemandRecDTO> page(Map<String, Object> params) {
@ -421,7 +417,7 @@ public class IcUserDemandRecServiceImpl extends BaseServiceImpl<IcUserDemandRecD
*/
@Transactional(rollbackFor = Exception.class)
@Override
public void finish(FinishStaffFromDTO formDTO) {
public FinishResultDTO finish(FinishStaffFromDTO formDTO) {
IcUserDemandRecEntity entity = baseDao.selectById(formDTO.getDemandRecId());
if (null == entity) {
throw new RenException(EpmetErrorCode.DEMAND_NOT_EXITS.getCode(), EpmetErrorCode.DEMAND_NOT_EXITS.getMsg());
@ -469,18 +465,15 @@ public class IcUserDemandRecServiceImpl extends BaseServiceImpl<IcUserDemandRecD
satisfactionEntity.setEvaluateTime(logEntity.getOperateTime());
satisfactionEntity.setScore(formDTO.getScore());
demandSatisfactionDao.insert(satisfactionEntity);
FinishResultDTO finishResultDTO=new FinishResultDTO();
finishResultDTO.setPartyUnitId(serviceEntity.getServerId());
finishResultDTO.setSendCalStatisfaction(false);
//5、如果服务方区域化党建单位,需求重新计算当前这个单位的满意度。
//如果服务方是区域化党建单位,需要实时去计算他的群众满意度=服务过的需求的评价分数相加➗ 需求的总个数。
if(UserDemandConstant.PARTY_UNIT.equals(serviceEntity.getServiceType())){
CalPartyUnitSatisfactionFormDTO mqMsg = new CalPartyUnitSatisfactionFormDTO();
mqMsg.setCustomerId(formDTO.getCustomerId());
mqMsg.setPartyUnitId(serviceEntity.getServerId());
SystemMsgFormDTO form = new SystemMsgFormDTO();
form.setMessageType(SystemMessageType.CAL_PARTY_UNIT_SATISFACTION);
form.setContent(mqMsg);
epmetMessageOpenFeignClient.sendSystemMsgByMQ(form);
finishResultDTO.setSendCalStatisfaction(true);
}
return finishResultDTO;
}
/**

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

@ -1586,6 +1586,7 @@ public class IssueServiceImpl extends BaseServiceImpl<IssueDao, IssueEntity> imp
formDTO.setOrgId(staffInfo.getAgencyId());
formDTO.setOrgType(IssueConstant.ISSUE_AGENCY);
}
// 分类编码长度
Integer length = baseDao.selectOneLevelCategoryLength(tokenDto.getCustomerId());
PageInfo<ResiBuzzDTO> pageInfo = PageHelper.startPage(formDTO.getPageNo(), formDTO.getPageSize()).doSelectPageInfo(() -> baseDao.selectIssueLimit50(formDTO.getOrgId(), formDTO.getOrgType(), formDTO.getStatus(),length));
List<ResiBuzzDTO> list = pageInfo.getList();
@ -1600,8 +1601,10 @@ public class IssueServiceImpl extends BaseServiceImpl<IssueDao, IssueEntity> imp
if (!usersResult.success()){
throw new EpmetException("查询人员姓名失败...");
}
// 默认最多50 产品要求
Integer total = Integer.valueOf(String.valueOf(pageInfo.getTotal()));
result.setTotal(total > NumConstant.FIFTY ? NumConstant.FIFTY : total);
// 赋值展示名字
list.forEach(l -> {
l.setSort(no.getAndSet(no.get() + NumConstant.ONE));
usersResult.getData().forEach(u -> {
@ -1631,6 +1634,7 @@ public class IssueServiceImpl extends BaseServiceImpl<IssueDao, IssueEntity> imp
formDTO.setOrgId(staffInfo.getAgencyId());
formDTO.setOrgType(IssueConstant.ISSUE_AGENCY);
}
// 分类编码长度
Integer length = baseDao.selectOneLevelCategoryLength(tokenDto.getCustomerId());
List<ResiBuzzLeftPieChartResultDTO> result = baseDao.resiBuzzLeftPieChart(formDTO.getOrgId(), formDTO.getOrgType(), length, tokenDto.getCustomerId());
if(CollectionUtils.isEmpty(result)){
@ -1647,7 +1651,7 @@ public class IssueServiceImpl extends BaseServiceImpl<IssueDao, IssueEntity> imp
*/
@Override
public List<ProjectDistributionAnalysisRightDTO> getProjectCountByGrid(ProjectDistributionAnalysisFormDTO formDTO) {
List<ProjectDistributionAnalysisRightDTO> result = baseDao.getProjectCountByGrid(formDTO.getOrgId(), formDTO.getStartDate(), formDTO.getEndDate());
List<ProjectDistributionAnalysisRightDTO> result = baseDao.getProjectCountByGrid(formDTO.getOrgId(), formDTO.getStartDate(), formDTO.getEndDate());
if (CollectionUtils.isEmpty(result)){
return new ArrayList<>();
}

12
epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/AgencySubResultDTO.java

@ -49,4 +49,16 @@ public class AgencySubResultDTO implements Serializable {
* 当前组织的所有上级组织Id
*/
private String pids = "";
/**
* 组织级别
*/
private String level = "";
/**
* 组织经度没值取根组织的值
*/
private String longitude = "";
/**
* 组织维度没值取根组织的值
*/
private String latitude = "";
}

2
epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/CustomerGridController.java

@ -314,7 +314,7 @@ public class CustomerGridController {
* @Author sun
* @Description 查询组织直属网格列表
**/
@PostMapping("getGridIListByAgency/{agencyId}")
@PostMapping("getgridilistbyagency/{agencyId}")
public Result<List<AgencyGridList>> gridListByAgencyId(@PathVariable("agencyId") String agencyId) {
return new Result<List<AgencyGridList>>().ok(customerGridService.gridListByAgencyId(agencyId));
}

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

@ -178,13 +178,30 @@
<select id="selectSubAgencyList" resultType="com.epmet.dto.result.AgencySubResultDTO">
SELECT
id AS "agencyId",
organization_name AS "agencyName",
pids AS "pids"
FROM customer_agency
WHERE del_flag = '0'
AND pids = #{subAgencyPids}
ORDER BY created_time DESC
ca.id AS "agencyId",
ca.organization_name AS "agencyName",
ca.pids AS "pids",
ca.level level,
( CASE WHEN ca.longitude is null THEN
( SELECT longitude FROM customer_agency
WHERE del_flag = '0' AND customer_id = (SELECT customer_id FROM customer_agency WHERE id = ca.id)
ORDER BY pid ASC LIMIT 1
)
ELSE ca.longitude
END
) longitude,
( CASE WHEN ca.latitude is null THEN
( SELECT latitude FROM customer_agency
WHERE del_flag = '0' AND customer_id = (SELECT customer_id FROM customer_agency WHERE id = ca.id)
ORDER BY pid ASC LIMIT 1
)
ELSE ca.latitude
END
) latitude
FROM customer_agency ca
WHERE ca.del_flag = '0'
AND ca.pids = #{subAgencyPids}
ORDER BY ca.created_time DESC
</select>
<select id="getCustomerRootAgency" resultType="com.epmet.dto.CustomerAgencyDTO">

2
epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/ProjectServiceImpl.java

@ -3037,6 +3037,7 @@ public class ProjectServiceImpl extends BaseServiceImpl<ProjectDao, ProjectEntit
/**
* @Description 区间项目分类数量处理
* 查询的是时间段内的分类项目数查询的时间 是传入一个日期拼上时间在进行比较大小
* @param categories
* @param date
* @param listResult
@ -3044,6 +3045,7 @@ public class ProjectServiceImpl extends BaseServiceImpl<ProjectDao, ProjectEntit
* @date 2021/12/8 9:45 上午
*/
public List<ProjectDistributionAnalysisLeftResultDTO> disposeTimeInterval(List<ProjectCategoryByDateDTO> categories, String date,List<CategoryListResultDTO> listResult){
// 把一天分成6段
List<String> intervalTimeList = getIntervalTimeList("00:00", "24:00", 240);
List<ProjectDistributionAnalysisLeftResultDTO> result = new ArrayList<>();
Map<String, List<ProjectCategoryByDateDTO>> groupByCode = categories.stream().collect(Collectors.groupingBy(ProjectCategoryByDateDTO::getCategoryCode));

Loading…
Cancel
Save