Browse Source

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

feature/teamB_zz_wgh
wangxianzhang 3 years ago
parent
commit
87f5dfeba8
  1. 3
      epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/dao/IcServiceRecordDao.java
  2. 21
      epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcServiceRecordServiceImpl.java
  3. 4
      epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/IcServiceRecordDao.xml

3
epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/dao/IcServiceRecordDao.java

@ -25,5 +25,6 @@ public interface IcServiceRecordDao extends BaseDao<IcServiceRecordEntity> {
@Param("serviceTimeStart") Date serviceTimeStart, @Param("serviceTimeStart") Date serviceTimeStart,
@Param("serviceTimeEnd") Date serviceTimeEnd, @Param("serviceTimeEnd") Date serviceTimeEnd,
@Param("serviceStatus") String serviceStatus, @Param("serviceStatus") String serviceStatus,
@Param("satisfaction") String satisfaction); @Param("satisfaction") String satisfaction,
@Param("searchOrgIdPath") String searchOrgIdPath);
} }

21
epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcServiceRecordServiceImpl.java

@ -2,15 +2,18 @@ package com.epmet.service.impl;
import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; import com.epmet.commons.mybatis.service.impl.BaseServiceImpl;
import com.epmet.commons.tools.constant.ServiceConstant; import com.epmet.commons.tools.constant.ServiceConstant;
import com.epmet.commons.tools.dto.result.CustomerStaffInfoCacheResult;
import com.epmet.commons.tools.enums.DictTypeEnum; import com.epmet.commons.tools.enums.DictTypeEnum;
import com.epmet.commons.tools.exception.EpmetErrorCode; import com.epmet.commons.tools.exception.EpmetErrorCode;
import com.epmet.commons.tools.exception.EpmetException; import com.epmet.commons.tools.exception.EpmetException;
import com.epmet.commons.tools.feign.ResultDataResolver; import com.epmet.commons.tools.feign.ResultDataResolver;
import com.epmet.commons.tools.page.PageData; import com.epmet.commons.tools.page.PageData;
import com.epmet.commons.tools.redis.common.CustomerOrgRedis; import com.epmet.commons.tools.redis.common.CustomerOrgRedis;
import com.epmet.commons.tools.redis.common.CustomerStaffRedis;
import com.epmet.commons.tools.redis.common.bean.AgencyInfoCache; import com.epmet.commons.tools.redis.common.bean.AgencyInfoCache;
import com.epmet.commons.tools.redis.common.bean.GridInfoCache; import com.epmet.commons.tools.redis.common.bean.GridInfoCache;
import com.epmet.commons.tools.utils.ConvertUtils; import com.epmet.commons.tools.utils.ConvertUtils;
import com.epmet.commons.tools.utils.EpmetRequestHolder;
import com.epmet.commons.tools.utils.Result; import com.epmet.commons.tools.utils.Result;
import com.epmet.dao.*; import com.epmet.dao.*;
import com.epmet.dto.IcNeighborHoodDTO; import com.epmet.dto.IcNeighborHoodDTO;
@ -147,8 +150,22 @@ public class IcServiceRecordServiceImpl extends BaseServiceImpl<IcServiceRecordD
throw new EpmetException(EpmetErrorCode.SERVER_ERROR.getCode(), msg, msg); throw new EpmetException(EpmetErrorCode.SERVER_ERROR.getCode(), msg, msg);
} }
CustomerStaffInfoCacheResult staffInfo = CustomerStaffRedis.getStaffInfo(EpmetRequestHolder.getLoginUserCustomerId(),
EpmetRequestHolder.getLoginUserId());
// 当前组织的PIDS。只查询当前组织及下级的服务记录
String searchOrgIdPath = "";
if (StringUtils.isBlank(staffInfo.getAgencyPIds()) || "0".equals(staffInfo.getAgencyPIds())) {
searchOrgIdPath = staffInfo.getAgencyId();
} else {
searchOrgIdPath = staffInfo.getAgencyPIds().concat(":").concat(staffInfo.getAgencyId());
}
PageHelper.startPage(pageNo, pageSize); PageHelper.startPage(pageNo, pageSize);
List<ServiceProjectRecordResultDTO> records = baseDao.listServiceRecords(serviceCategoryKey, serviceProjectName, serviceOrgName, serviceTimeStart, serviceTimeEnd, serviceStatus, satisfaction); List<ServiceProjectRecordResultDTO> records = baseDao.listServiceRecords(
serviceCategoryKey, serviceProjectName, serviceOrgName, serviceTimeStart, serviceTimeEnd, serviceStatus, satisfaction, searchOrgIdPath);
PageInfo<ServiceProjectRecordResultDTO> pi = new PageInfo<>(records); PageInfo<ServiceProjectRecordResultDTO> pi = new PageInfo<>(records);
// 补充信息 // 补充信息
@ -260,7 +277,7 @@ public class IcServiceRecordServiceImpl extends BaseServiceImpl<IcServiceRecordD
if ("0".equals(agencyInfo.getPid())) { if ("0".equals(agencyInfo.getPid())) {
return new String[]{ agencyInfo.getId(), agencyInfo.getOrganizationName() }; return new String[]{ agencyInfo.getId(), agencyInfo.getOrganizationName() };
} }
return new String[]{ agencyInfo.getPids().concat(":").concat(agencyInfo.getPid()), agencyInfo.getOrganizationName() }; return new String[]{ agencyInfo.getPids().concat(":").concat(agencyInfo.getId()), agencyInfo.getOrganizationName() };
} else if ("grid".equals(scopeObjectType)) { } else if ("grid".equals(scopeObjectType)) {
GridInfoCache gridInfo = CustomerOrgRedis.getGridInfo(scopeObjectId); GridInfoCache gridInfo = CustomerOrgRedis.getGridInfo(scopeObjectId);
// 网格的pids是到社区的 // 网格的pids是到社区的

4
epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/IcServiceRecordDao.xml

@ -36,6 +36,7 @@
record.SERVICE_STATUS, record.SERVICE_STATUS,
record.SERVICE_PEOPLE_NUMBER record.SERVICE_PEOPLE_NUMBER
from ic_service_record record from ic_service_record record
inner join ic_service_scope scope on (scope.DEL_FLAG = '0' and record.ID = scope.SERVICE_RECORD_ID)
left join ic_service_feedback feedback on (record.ID = feedback.SERVICE_RECORD_ID) left join ic_service_feedback feedback on (record.ID = feedback.SERVICE_RECORD_ID)
<where> <where>
record.DEL_FLAG = '0' record.DEL_FLAG = '0'
@ -61,6 +62,9 @@
<if test="satisfaction != null and satisfaction != ''"> <if test="satisfaction != null and satisfaction != ''">
and feedback.SATISFACTION = #{satisfaction} and feedback.SATISFACTION = #{satisfaction}
</if> </if>
<if test="searchOrgIdPath != null and searchOrgIdPath != ''">
and scope.OBJECT_ID_PATH like CONCAT(#{searchOrgIdPath}, '%')
</if>
</where> </where>
order by record.CREATED_TIME desc order by record.CREATED_TIME desc
</select> </select>

Loading…
Cancel
Save