Browse Source

群组数统计代码调整

master
sunyuchao 4 years ago
parent
commit
1d0f29b3fa
  1. 18
      epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/utils/DateUtils.java
  2. 4
      epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/group/form/GroupTotalFormDTO.java
  3. 6
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/extract/FactOriginGroupMainDailyDao.java
  4. 5
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/group/GroupDataDao.java
  5. 5
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/extract/FactOriginGroupMainDailyEntity.java
  6. 2
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/StatsGroupService.java
  7. 6
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/todata/FactOriginGroupMainDailyService.java
  8. 9
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/todata/impl/FactOriginGroupMainDailyServiceImpl.java
  9. 5
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/group/GroupDataService.java
  10. 11
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/group/impl/GroupDataServiceImpl.java
  11. 69
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/impl/StatsGroupServiceImpl.java
  12. 11
      epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/extract/FactOriginGroupMainDailyDao.xml
  13. 10
      epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/group/GroupDataDao.xml

18
epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/utils/DateUtils.java

@ -800,4 +800,22 @@ public class DateUtils {
} }
return date; return date;
} }
/**
* 格式化日期
* @param dateStr String 字符型日期
* @param format String 格式
* @return Date 日期
*/
public static Date parseDate(String dateStr, String format) {
Date date = null;
try {
DateFormat dateFormat = new SimpleDateFormat(format);
date = dateFormat.parse(dateStr);
} catch (Exception e) {
e.printStackTrace();
}
return date;
}
} }

4
epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/group/form/GroupTotalFormDTO.java

@ -18,7 +18,7 @@ public class GroupTotalFormDTO implements Serializable {
*/ */
private String customerId = ""; private String customerId = "";
/** /**
* 需要执行的日期格式yyyy-MM-dd2020-01-01 * 需要执行的日期格式yyyyMMdd
*/ */
private String date = ""; private String dateId = "";
} }

6
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/extract/FactOriginGroupMainDailyDao.java

@ -199,4 +199,10 @@ public interface FactOriginGroupMainDailyDao extends BaseDao<FactOriginGroupMain
*/ */
List<OrgStatisticsResultDTO> selectOrgGroupCount(@Param("customerId") String customerId, @Param("monthId") String monthId, List<OrgStatisticsResultDTO> selectOrgGroupCount(@Param("customerId") String customerId, @Param("monthId") String monthId,
@Param("level") String level); @Param("level") String level);
/**
* @Author sun
* @Description 查询客户小组维度下有效群组列表
**/
List<FactOriginGroupMainDailyEntity> selectCustomerGroupList(@Param("customerId") String customerId, @Param("dateId") String dateId);
} }

5
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/group/GroupDataDao.java

@ -92,9 +92,4 @@ public interface GroupDataDao {
**/ **/
List<FactOriginGroupMainDailyDTO> groupExtracting(@Param("customerId")String customerId,@Param("dateId") String dateId); List<FactOriginGroupMainDailyDTO> groupExtracting(@Param("customerId")String customerId,@Param("dateId") String dateId);
/**
* @Author sun
* @Description 查询客户下有效群组列表
**/
List<ResiGroupEntity> selectCustomerGroupList(@Param("customerId")String customerId);
} }

5
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/extract/FactOriginGroupMainDailyEntity.java

@ -116,4 +116,9 @@ Ps: 如果一个小组被拒绝,当前小组的状态将永久停留在“审
*/ */
private Integer isOwnerParty; private Integer isOwnerParty;
/**
* 小组类型(ordinary:楼院小组 branch:支部小组)
*/
private String groupType;
} }

2
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/StatsGroupService.java

@ -3,6 +3,8 @@ package com.epmet.service;
import com.epmet.dto.group.form.GroupStatsFormDTO; import com.epmet.dto.group.form.GroupStatsFormDTO;
import com.epmet.dto.group.form.GroupTotalFormDTO; import com.epmet.dto.group.form.GroupTotalFormDTO;
import java.text.ParseException;
/** /**
* @Author zxc * @Author zxc
* @CreateTime 2020/6/16 14:14 * @CreateTime 2020/6/16 14:14

6
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/todata/FactOriginGroupMainDailyService.java

@ -105,4 +105,10 @@ public interface FactOriginGroupMainDailyService extends BaseService<FactOriginG
* @return java.util.List<com.epmet.dto.extract.result.OrgStatisticsResultDTO> * @return java.util.List<com.epmet.dto.extract.result.OrgStatisticsResultDTO>
*/ */
List<OrgStatisticsResultDTO> getOrgGroupCount(String customerId, String monthId, String level); List<OrgStatisticsResultDTO> getOrgGroupCount(String customerId, String monthId, String level);
/**
* @Author sun
* @Description 查询客户小组维度下有效群组列表
**/
List<FactOriginGroupMainDailyEntity> getGroupListByCustomerId(String customerId, String dateId);
} }

9
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/todata/impl/FactOriginGroupMainDailyServiceImpl.java

@ -136,4 +136,13 @@ public class FactOriginGroupMainDailyServiceImpl extends BaseServiceImpl<FactOri
return baseDao.selectOrgGroupCount(customerId, monthId, level); return baseDao.selectOrgGroupCount(customerId, monthId, level);
} }
/**
* @Author sun
* @Description 查询客户小组维度下有效群组列表
**/
@Override
public List<FactOriginGroupMainDailyEntity> getGroupListByCustomerId(String customerId, String dateId) {
return baseDao.selectCustomerGroupList(customerId, dateId);
}
} }

5
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/group/GroupDataService.java

@ -67,9 +67,4 @@ public interface GroupDataService {
**/ **/
List<FactOriginGroupMainDailyDTO> extractGroupData(Boolean isFirst,String customerId,String dateId); List<FactOriginGroupMainDailyDTO> extractGroupData(Boolean isFirst,String customerId,String dateId);
/**
* @Author sun
* @Description 查询客户下有效群组列表
**/
List<ResiGroupEntity> getGroupListByCustomerId(String customerId);
} }

11
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/group/impl/GroupDataServiceImpl.java

@ -211,15 +211,4 @@ public class GroupDataServiceImpl implements GroupDataService {
return groupDataDao.groupExtracting(customerId,isFirst?null:dateId); return groupDataDao.groupExtracting(customerId,isFirst?null:dateId);
} }
/**
* @Author sun
* @Description 查询客户下有效群组列表
**/
@Override
public List<ResiGroupEntity> getGroupListByCustomerId(String customerId) {
return groupDataDao.selectCustomerGroupList(customerId);
}
} }

69
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/impl/StatsGroupServiceImpl.java

@ -1,6 +1,7 @@
package com.epmet.service.impl; package com.epmet.service.impl;
import com.epmet.commons.tools.constant.NumConstant; import com.epmet.commons.tools.constant.NumConstant;
import com.epmet.commons.tools.convert.DateConverter;
import com.epmet.commons.tools.utils.DateUtils; import com.epmet.commons.tools.utils.DateUtils;
import com.epmet.constant.GroupConstant; import com.epmet.constant.GroupConstant;
import com.epmet.dto.AgencySubTreeDto; import com.epmet.dto.AgencySubTreeDto;
@ -9,24 +10,29 @@ import com.epmet.dto.group.form.GroupStatsFormDTO;
import com.epmet.dto.group.form.GroupTotalFormDTO; import com.epmet.dto.group.form.GroupTotalFormDTO;
import com.epmet.dto.group.result.*; import com.epmet.dto.group.result.*;
import com.epmet.dto.stats.DimAgencyDTO; import com.epmet.dto.stats.DimAgencyDTO;
import com.epmet.entity.evaluationindex.extract.FactOriginGroupMainDailyEntity;
import com.epmet.entity.group.ResiGroupEntity; import com.epmet.entity.group.ResiGroupEntity;
import com.epmet.entity.stats.DimAgencyEntity; import com.epmet.entity.stats.DimAgencyEntity;
import com.epmet.entity.stats.DimGridEntity; import com.epmet.entity.stats.DimGridEntity;
import com.epmet.entity.stats.FactGroupTotalAgencyDailyEntity; import com.epmet.entity.stats.FactGroupTotalAgencyDailyEntity;
import com.epmet.entity.stats.FactGroupTotalGridDailyEntity; import com.epmet.entity.stats.FactGroupTotalGridDailyEntity;
import com.epmet.service.StatsGroupService; import com.epmet.service.StatsGroupService;
import com.epmet.service.evaluationindex.extract.todata.FactOriginGroupMainDailyService;
import com.epmet.service.group.GroupDataService; import com.epmet.service.group.GroupDataService;
import com.epmet.service.org.CustomerGridService; import com.epmet.service.org.CustomerGridService;
import com.epmet.service.stats.*; import com.epmet.service.stats.*;
import com.epmet.util.DimIdGenerator; import com.epmet.util.DimIdGenerator;
import com.epmet.util.ModuleConstant; import com.epmet.util.ModuleConstant;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.apache.commons.configuration.ConfigurationException;
import org.apache.commons.lang3.StringUtils; import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.BeanUtils; import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import org.springframework.util.CollectionUtils; import org.springframework.util.CollectionUtils;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.time.LocalDate; import java.time.LocalDate;
import java.time.ZoneId; import java.time.ZoneId;
import java.time.ZonedDateTime; import java.time.ZonedDateTime;
@ -63,6 +69,8 @@ public class StatsGroupServiceImpl implements StatsGroupService {
private FactGroupTotalGridDailyService factGroupTotalGridDailyService; private FactGroupTotalGridDailyService factGroupTotalGridDailyService;
@Autowired @Autowired
private FactGroupTotalAgencyDailyService factGroupTotalAgencyDailyService; private FactGroupTotalAgencyDailyService factGroupTotalAgencyDailyService;
@Autowired
private FactOriginGroupMainDailyService factOriginGroupMainDailyService;
/** /**
* @param * @param
@ -352,15 +360,16 @@ public class StatsGroupServiceImpl implements StatsGroupService {
**/ **/
@Override @Override
public void gridGroupTotal(GroupTotalFormDTO formDTO) { public void gridGroupTotal(GroupTotalFormDTO formDTO) {
Date date = DateUtils.yesterDay();
//入参有日期的则按具体时间执行,没有的则按当前时间前一天执行 //入参有日期的则按具体时间执行,没有的则按当前时间前一天执行
if (null != formDTO && StringUtils.isNotBlank(formDTO.getDate())) { if (StringUtils.isBlank(formDTO.getDateId())) {
date = DateUtils.parse(formDTO.getDate(), DateUtils.DATE_PATTERN); Date yesterday = DateUtils.addDateDays(new Date(), -1);
SimpleDateFormat format = new SimpleDateFormat(DateUtils.DATE_PATTERN_YYYYMMDD);
formDTO.setDateId(format.format(yesterday));
} }
//入参有客户Id的则按客户Id执行,没有的则全部客户都执行 //入参有客户Id的则按客户Id执行,没有的则全部客户都执行
if (null != formDTO && StringUtils.isNotBlank(formDTO.getCustomerId())) { if (null != formDTO && StringUtils.isNotBlank(formDTO.getCustomerId())) {
log.info("单独统计客户网格-小组总数日统计数据,当前统计的客户Id:" + formDTO.getCustomerId()); log.info("单独统计客户网格-小组总数日统计数据,当前统计的客户Id:" + formDTO.getCustomerId());
gridGroupStats(formDTO.getCustomerId(), date); gridGroupStats(formDTO.getCustomerId(), formDTO.getDateId());
} else { } else {
int pageNo = 1; int pageNo = 1;
int pageSize = 100; int pageSize = 100;
@ -373,7 +382,7 @@ public class StatsGroupServiceImpl implements StatsGroupService {
try { try {
log.info("for循环统计网格-小组总数日统计数据,当前统计的客户Id:" + customerId); log.info("for循环统计网格-小组总数日统计数据,当前统计的客户Id:" + customerId);
//遍历统计每一个客户数据 //遍历统计每一个客户数据
gridGroupStats(customerId, date); gridGroupStats(customerId, formDTO.getDateId());
} catch (Exception e) { } catch (Exception e) {
log.error("小组总数-网格日统计-程序错误,对应客户Id:" + customerId, e); log.error("小组总数-网格日统计-程序错误,对应客户Id:" + customerId, e);
log.error("Error creating model JSON", e); log.error("Error creating model JSON", e);
@ -389,8 +398,9 @@ public class StatsGroupServiceImpl implements StatsGroupService {
* @Author sun * @Author sun
* @Description 小组总数-网格日统计数据 * @Description 小组总数-网格日统计数据
**/ **/
private void gridGroupStats(String customerId, Date date) { private void gridGroupStats(String customerId, String dateId) {
//1:查询各维度表Id,方便使用 //1:查询各维度表Id,方便使用
Date date = DateUtils.parseDate(dateId,DateUtils.DATE_PATTERN_YYYYMMDD);
DimIdGenerator.DimIdBean dimId = DimIdGenerator.getDimIdBean(date); DimIdGenerator.DimIdBean dimId = DimIdGenerator.getDimIdBean(date);
//2:根据客户Id查询网格维度表数据 //2:根据客户Id查询网格维度表数据
@ -399,18 +409,18 @@ public class StatsGroupServiceImpl implements StatsGroupService {
//3.根据客户Id查询客户下有效的群组列表数据 //3.根据客户Id查询客户下有效的群组列表数据
log.info("StatsGroupServiceImpl.customerGridStats-根据客户Id查询客户下有效的群组列表数据,对应客户Id:" + customerId); log.info("StatsGroupServiceImpl.customerGridStats-根据客户Id查询客户下有效的群组列表数据,对应客户Id:" + customerId);
List<ResiGroupEntity> groupList = groupDataService.getGroupListByCustomerId(customerId); List<FactOriginGroupMainDailyEntity> groupList = factOriginGroupMainDailyService.getGroupListByCustomerId(customerId, dateId);
//4.分别计算每个网格下审核通过的小组数据 //4.分别计算每个网格下审核通过的小组数据
List<FactGroupTotalGridDailyEntity> list = new ArrayList<>(); List<FactGroupTotalGridDailyEntity> list = new ArrayList<>();
DimIdGenerator.DimIdBean finalDimId = dimId;
dimGridList.forEach(grid -> { dimGridList.forEach(grid -> {
FactGroupTotalGridDailyEntity entity = new FactGroupTotalGridDailyEntity(); FactGroupTotalGridDailyEntity entity = new FactGroupTotalGridDailyEntity();
AtomicInteger total = new AtomicInteger(0); AtomicInteger total = new AtomicInteger(0);
AtomicInteger ordinary = new AtomicInteger(0); AtomicInteger ordinary = new AtomicInteger(0);
AtomicInteger branch = new AtomicInteger(0); AtomicInteger branch = new AtomicInteger(0);
groupList.forEach(group -> { groupList.forEach(group -> {
if (grid.getId().equals(group.getGridId()) && "approved".equals(group.getState())) { if (grid.getId().equals(group.getGridId()) && "approved".equals(group.getGroupState())) {
total.addAndGet(1); total.addAndGet(1);
if ("ordinary".equals(group.getGroupType())) { if ("ordinary".equals(group.getGroupType())) {
ordinary.addAndGet(1); ordinary.addAndGet(1);
@ -424,11 +434,11 @@ public class StatsGroupServiceImpl implements StatsGroupService {
entity.setCustomerId(grid.getCustomerId()); entity.setCustomerId(grid.getCustomerId());
entity.setAgencyId(grid.getAgencyId()); entity.setAgencyId(grid.getAgencyId());
entity.setGridId(grid.getId()); entity.setGridId(grid.getId());
entity.setDateId(dimId.getDateId()); entity.setDateId(finalDimId.getDateId());
entity.setWeekId(dimId.getWeekId()); entity.setWeekId(finalDimId.getWeekId());
entity.setMonthId(dimId.getMonthId()); entity.setMonthId(finalDimId.getMonthId());
entity.setQuarterId(dimId.getQuarterId()); entity.setQuarterId(finalDimId.getQuarterId());
entity.setYearId(dimId.getYearId()); entity.setYearId(finalDimId.getYearId());
entity.setGroupTotal(total.get()); entity.setGroupTotal(total.get());
entity.setOrdinaryTotal(ordinary.get()); entity.setOrdinaryTotal(ordinary.get());
entity.setBranchTotal(branch.get()); entity.setBranchTotal(branch.get());
@ -457,15 +467,16 @@ public class StatsGroupServiceImpl implements StatsGroupService {
**/ **/
@Override @Override
public void agencyGroupTotal(GroupTotalFormDTO formDTO) { public void agencyGroupTotal(GroupTotalFormDTO formDTO) {
Date date = DateUtils.yesterDay(); //入参有日期的则按具体时间执行,没有的则按当前时间前一天执行
//入参有时间的则按具体时间执行,没有的则按当前时间前一天执行 if (StringUtils.isBlank(formDTO.getDateId())) {
if (null != formDTO && StringUtils.isNotBlank(formDTO.getDate())) { Date yesterday = DateUtils.addDateDays(new Date(), -1);
date = DateUtils.parse(formDTO.getDate(), DateUtils.DATE_PATTERN); SimpleDateFormat format = new SimpleDateFormat(DateUtils.DATE_PATTERN_YYYYMMDD);
formDTO.setDateId(format.format(yesterday));
} }
//入参有客户Id的则按客户Id执行,没有的则全部客户都执行 //入参有客户Id的则按客户Id执行,没有的则全部客户都执行
if (null != formDTO && StringUtils.isNotBlank(formDTO.getCustomerId())) { if (null != formDTO && StringUtils.isNotBlank(formDTO.getCustomerId())) {
log.info("单独统计客户组织下-小组总数日统计数据,当前统计的客户Id:" + formDTO.getCustomerId()); log.info("单独统计客户组织下-小组总数日统计数据,当前统计的客户Id:" + formDTO.getCustomerId());
agencyGroupStats(formDTO.getCustomerId(), date); agencyGroupStats(formDTO.getCustomerId(), formDTO.getDateId());
} else { } else {
int pageNo = 1; int pageNo = 1;
int pageSize = 100; int pageSize = 100;
@ -477,7 +488,7 @@ public class StatsGroupServiceImpl implements StatsGroupService {
try { try {
log.info("for循环统计机关-小组总数日统计数据,当前统计的客户Id:" + customerId); log.info("for循环统计机关-小组总数日统计数据,当前统计的客户Id:" + customerId);
//遍历统计每一个客户数据 //遍历统计每一个客户数据
agencyGroupStats(customerId, date); agencyGroupStats(customerId, formDTO.getDateId());
} catch (Exception e) { } catch (Exception e) {
log.error("小组总数-机关日统计程序错误,对应客户Id:" + customerId, e); log.error("小组总数-机关日统计程序错误,对应客户Id:" + customerId, e);
log.error("Error creating model JSON", e); log.error("Error creating model JSON", e);
@ -493,8 +504,9 @@ public class StatsGroupServiceImpl implements StatsGroupService {
* @Author sun * @Author sun
* @Description 小组总数-机关日统计数据 * @Description 小组总数-机关日统计数据
**/ **/
private void agencyGroupStats(String customerId, Date date) { private void agencyGroupStats(String customerId, String dateId) {
//1:查询各维度表Id,方便使用 //1:查询各维度表Id,方便使用
Date date = DateUtils.parseDate(dateId,DateUtils.DATE_PATTERN_YYYYMMDD);
DimIdGenerator.DimIdBean dimId = DimIdGenerator.getDimIdBean(date); DimIdGenerator.DimIdBean dimId = DimIdGenerator.getDimIdBean(date);
//2:根据客户Id查询机关维度表数据 //2:根据客户Id查询机关维度表数据
@ -508,10 +520,11 @@ public class StatsGroupServiceImpl implements StatsGroupService {
//4.根据客户Id查询客户下有效的群组列表数据 //4.根据客户Id查询客户下有效的群组列表数据
log.info("StatsGroupServiceImpl.agencyGroupStats-根据客户Id查询客户下有效的群组列表数据,对应客户Id:" + customerId); log.info("StatsGroupServiceImpl.agencyGroupStats-根据客户Id查询客户下有效的群组列表数据,对应客户Id:" + customerId);
List<ResiGroupEntity> groupList = groupDataService.getGroupListByCustomerId(customerId); List<FactOriginGroupMainDailyEntity> groupList = factOriginGroupMainDailyService.getGroupListByCustomerId(customerId, dateId);
List<FactGroupTotalAgencyDailyEntity> list = new ArrayList<>(); List<FactGroupTotalAgencyDailyEntity> list = new ArrayList<>();
//5.遍历组织维度数据分别计算每个组织下群组数据 //5.遍历组织维度数据分别计算每个组织下群组数据
DimIdGenerator.DimIdBean finalDimId = dimId;
agencyList.forEach(agency->{ agencyList.forEach(agency->{
FactGroupTotalAgencyDailyEntity entity = new FactGroupTotalAgencyDailyEntity(); FactGroupTotalAgencyDailyEntity entity = new FactGroupTotalAgencyDailyEntity();
//5-1.汇总组织及所有下级组织列表 //5-1.汇总组织及所有下级组织列表
@ -538,7 +551,7 @@ public class StatsGroupServiceImpl implements StatsGroupService {
//5-3.根据汇总的网格列表统计对应的群组数据 //5-3.根据汇总的网格列表统计对应的群组数据
agencyGridList.forEach(gridId -> { agencyGridList.forEach(gridId -> {
groupList.forEach(group -> { groupList.forEach(group -> {
if (gridId.equals(group.getGridId()) && "approved".equals(group.getState())) { if (gridId.equals(group.getGridId()) && "approved".equals(group.getGroupState())) {
total.addAndGet(1); total.addAndGet(1);
if ("ordinary".equals(group.getGroupType())) { if ("ordinary".equals(group.getGroupType())) {
ordinary.addAndGet(1); ordinary.addAndGet(1);
@ -553,11 +566,11 @@ public class StatsGroupServiceImpl implements StatsGroupService {
entity.setCustomerId(agency.getCustomerId()); entity.setCustomerId(agency.getCustomerId());
entity.setAgencyId(agency.getId()); entity.setAgencyId(agency.getId());
entity.setPid(agency.getPid()); entity.setPid(agency.getPid());
entity.setDateId(dimId.getDateId()); entity.setDateId(finalDimId.getDateId());
entity.setWeekId(dimId.getWeekId()); entity.setWeekId(finalDimId.getWeekId());
entity.setMonthId(dimId.getMonthId()); entity.setMonthId(finalDimId.getMonthId());
entity.setQuarterId(dimId.getQuarterId()); entity.setQuarterId(finalDimId.getQuarterId());
entity.setYearId(dimId.getYearId()); entity.setYearId(finalDimId.getYearId());
entity.setGroupTotal(total.get()); entity.setGroupTotal(total.get());
entity.setOrdinaryTotal(ordinary.get()); entity.setOrdinaryTotal(ordinary.get());
entity.setBranchTotal(branch.get()); entity.setBranchTotal(branch.get());

11
epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/extract/FactOriginGroupMainDailyDao.xml

@ -340,4 +340,15 @@
AND f.GROUP_STATE = 'approved' AND f.GROUP_STATE = 'approved'
GROUP BY f.AGENCY_ID GROUP BY f.AGENCY_ID
</select> </select>
<select id="selectCustomerGroupList" resultType="com.epmet.entity.evaluationindex.extract.FactOriginGroupMainDailyEntity">
SELECT
*
FROM fact_origin_group_main_daily
WHERE
del_flag = '0'
AND customer_id = #{customerId}
<![CDATA[AND DATE_ID <= #{dateId}]]>
</select>
</mapper> </mapper>

10
epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/group/GroupDataDao.xml

@ -228,14 +228,4 @@
</select> </select>
<select id="selectCustomerGroupList" resultType="com.epmet.entity.group.ResiGroupEntity">
SELECT
*
FROM
resi_group
WHERE
del_flag = '0'
AND customer_id = #{customerId}
</select>
</mapper> </mapper>
Loading…
Cancel
Save