diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/controller/plugins/WorkRecordController.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/controller/plugins/WorkRecordController.java index 592ea4ebc2..5229d84359 100644 --- a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/controller/plugins/WorkRecordController.java +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/controller/plugins/WorkRecordController.java @@ -21,12 +21,10 @@ import org.springframework.web.bind.annotation.*; public class WorkRecordController { @Autowired private ScreenWorkRecordOrgDailyService screenWorkRecordOrgDailyService; - //todo 工作日志是否要添加area_code、parent_area_code、orgType;插件是否可以提供;也可以采集的时候赋值 //5、【工作日志】本机及下级排名 //NEI接口地址:https://nei.netease.com/interface/detail/?pid=57068&id=348966 //返参中的当前组织的参与人数、组织次数 直接sum所有下级的值; //下级根据当前组织的areaCode查询下级列表,再去查询screen_work_record_org_daily - //legend来源于screen_customer_work_record_dict表 level=2,dataType=party @PostMapping("ranklist") public Result rankList(@RequestHeader("CustomerId")String customerId, @RequestBody WorkRecordRankFormDTO formDTO){ diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/plugins/ScreenWorkRecordOrgDailyDao.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/plugins/ScreenWorkRecordOrgDailyDao.java index d88c5627b2..372df80c38 100644 --- a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/plugins/ScreenWorkRecordOrgDailyDao.java +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/plugins/ScreenWorkRecordOrgDailyDao.java @@ -19,7 +19,6 @@ package com.epmet.datareport.dao.plugins; import com.epmet.commons.mybatis.dao.BaseDao; import com.epmet.datareport.entity.plugins.ScreenWorkRecordOrgDailyEntity; -import com.epmet.plugins.result.WorkRecordRankResultDTO; import com.epmet.plugins.result.WorkRecordSubRank; import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Param; @@ -37,24 +36,31 @@ public interface ScreenWorkRecordOrgDailyDao extends BaseDao selectSubList(@Param("subAgencyIds") List subAgencyIds, - // @Param("subGridIds")List subGridIds, @Param("dataType")String dataType, @Param("customerId")String customerId, @Param("dateId")String dateId); + /** + * @param subGridIds 当前组织的指数网格ids + * @author yinzuomei + * @description + * @Date 2021/2/27 19:31 + **/ List selectSubGridList(@Param("subGridIds")List subGridIds, @Param("dataType")String dataType, @Param("customerId")String customerId, @Param("dateId")String dateId); + /** + * @param customerIds 当前客户+所有子客户 列表 + * @author yinzuomei + * @description 查询最近一次上传的日期 + * @Date 2021/2/27 19:31 + **/ String selectLatestDateId(@Param("customerIds")List customerIds); - WorkRecordRankResultDTO selectCurrentAgency(@Param("areaCode") String areaCode, - @Param("dataType") String dataType, - @Param("dateId")String dateId); - } \ No newline at end of file diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/plugins/impl/ScreenWorkRecordOrgDailyServiceImpl.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/plugins/impl/ScreenWorkRecordOrgDailyServiceImpl.java index 6b8d0ca44f..92f7ab291a 100644 --- a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/plugins/impl/ScreenWorkRecordOrgDailyServiceImpl.java +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/plugins/impl/ScreenWorkRecordOrgDailyServiceImpl.java @@ -17,13 +17,13 @@ package com.epmet.datareport.service.plugins.impl; +import com.alibaba.fastjson.JSON; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.metadata.IPage; import com.epmet.commons.dynamic.datasource.annotation.DataSource; import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; import com.epmet.commons.tools.constant.FieldConstant; import com.epmet.commons.tools.constant.NumConstant; -import com.epmet.commons.tools.exception.RenException; import com.epmet.commons.tools.page.PageData; import com.epmet.commons.tools.utils.ConvertUtils; import com.epmet.commons.tools.utils.Result; @@ -134,13 +134,12 @@ public class ScreenWorkRecordOrgDailyServiceImpl extends BaseServiceImpl customerIds=new ArrayList<>(); Result> result=operCrmOpenFeignClient.getAllSubCustomerIds(formDTO.getCustomerId()); if (result.success() && CollectionUtils.isNotEmpty(result.getData())) { - log.info("包含子客户"); - customerIds.add(formDTO.getCustomerId()); customerIds.addAll(result.getData()); } + customerIds.add(formDTO.getCustomerId()); String dateId= baseDao.selectLatestDateId(customerIds); if(StringUtils.isBlank(dateId)){ - throw new RenException("dateId is null"); + log.warn("selectLatestDateId dateId is null customerIds" + JSON.toJSONString(customerIds)); } WorkRecordRankResultDTO returnDto = new WorkRecordRankResultDTO(); //当前组织的自身的数据 diff --git a/epmet-module/data-report/data-report-server/src/main/resources/mapper/plugins/ScreenCustomerWorkRecordDictDao.xml b/epmet-module/data-report/data-report-server/src/main/resources/mapper/plugins/ScreenCustomerWorkRecordDictDao.xml index d6379ed76d..4c68253adb 100644 --- a/epmet-module/data-report/data-report-server/src/main/resources/mapper/plugins/ScreenCustomerWorkRecordDictDao.xml +++ b/epmet-module/data-report/data-report-server/src/main/resources/mapper/plugins/ScreenCustomerWorkRecordDictDao.xml @@ -2,7 +2,6 @@ - diff --git a/epmet-module/data-report/data-report-server/src/main/resources/mapper/plugins/ScreenWorkRecordOrgDailyDao.xml b/epmet-module/data-report/data-report-server/src/main/resources/mapper/plugins/ScreenWorkRecordOrgDailyDao.xml index e3215147f0..a844e7c4ab 100644 --- a/epmet-module/data-report/data-report-server/src/main/resources/mapper/plugins/ScreenWorkRecordOrgDailyDao.xml +++ b/epmet-module/data-report/data-report-server/src/main/resources/mapper/plugins/ScreenWorkRecordOrgDailyDao.xml @@ -16,7 +16,6 @@ - - - \ No newline at end of file