Browse Source

Merge remote-tracking branch 'origin/dev_data_stats' into dev_data_stats

master
wxz 5 years ago
parent
commit
bf112a712f
  1. 19
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/controller/StatsProjectController.java
  2. 10
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/stats/DimAgencyDao.java
  3. 10
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/stats/DimDateDao.java
  4. 7
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/StatsProjectService.java
  5. 31
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/impl/StatsProjectServiceImpl.java
  6. 8
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/DimAgencyService.java
  7. 8
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/DimDateService.java
  8. 11
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/DimAgencyServiceImpl.java
  9. 11
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/DimDateServiceImpl.java
  10. 12
      epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/stats/DimAgencyDao.xml
  11. 13
      epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/stats/DimDateDao.xml

19
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/controller/StatsProjectController.java

@ -1,23 +1,32 @@
package com.epmet.controller;
import com.epmet.commons.tools.utils.Result;
import com.epmet.service.StatsDemoService;
import com.epmet.service.StatsProjectService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.bind.annotation.*;
/**
* 数据统计-项目
* @author sun
*/
@RequestMapping("statsProject")
@RequestMapping("statsproject")
@RestController
public class StatsProjectController {
@Autowired
private StatsProjectService statsProjectService;
/**
* @param customerId
* @return
* @Author sun
* @Description 数据-项目-机关日()统计
**/
@PostMapping("agencyproject/{customerId}")
public Result statsAgencyProject(@PathVariable("customerId") String customerId) {
statsProjectService.statsAgencyProject(customerId);
return new Result();
}
}

10
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/stats/DimAgencyDao.java

@ -19,9 +19,12 @@ package com.epmet.dao.stats;
import com.epmet.commons.mybatis.dao.BaseDao;
import com.epmet.dto.stats.DimAgencyDTO;
import com.epmet.entity.stats.DimAgencyEntity;
import org.apache.ibatis.annotations.Mapper;
import java.util.List;
/**
* 机关维度
*
@ -31,4 +34,11 @@ import org.apache.ibatis.annotations.Mapper;
@Mapper
public interface DimAgencyDao extends BaseDao<DimAgencyEntity> {
/**
* @param dto
* @return
* @Author sun
* @Description 根据客户Id查询机关维度列表数据
**/
List<DimAgencyDTO> selectDimAgencyList(DimAgencyDTO dto);
}

10
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/stats/DimDateDao.java

@ -18,9 +18,12 @@
package com.epmet.dao.stats;
import com.epmet.commons.mybatis.dao.BaseDao;
import com.epmet.dto.stats.DimDateDTO;
import com.epmet.entity.stats.DimDateEntity;
import org.apache.ibatis.annotations.Mapper;
import java.util.List;
/**
* 日期维度表
*
@ -30,4 +33,11 @@ import org.apache.ibatis.annotations.Mapper;
@Mapper
public interface DimDateDao extends BaseDao<DimDateEntity> {
/**
* @param dto
* @return
* @Author sun
* @Description 根据创建时间查询日维度信息
**/
List<DimDateDTO> selectDimDate(DimDateDTO dto);
}

7
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/StatsProjectService.java

@ -7,4 +7,11 @@ package com.epmet.service;
public interface StatsProjectService {
/**
* @param customerId
* @return
* @Author sun
* @Description 数据-项目-机关日()统计
**/
void statsAgencyProject(String customerId);
}

31
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/impl/StatsProjectServiceImpl.java

@ -2,6 +2,7 @@ package com.epmet.service.impl;
import com.epmet.service.StatsProjectService;
import com.epmet.service.project.ProjectService;
import com.epmet.service.stats.*;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
@ -12,7 +13,37 @@ import org.springframework.stereotype.Service;
@Service
public class StatsProjectServiceImpl implements StatsProjectService {
@Autowired
private DimAgencyService dimAgencyService;
@Autowired
private DimDateService dimDateService;
@Autowired
private DimWeekService dimWeekService;
@Autowired
private DimMonthService dimMonthService;
@Autowired
private DimQuarterService dimQuarterService;
@Autowired
private DimYearService dimYearService;
@Autowired
private ProjectService projectService;
@Autowired
private FactAgencyProjectDailyService factAgencyProjectDailyService;
@Autowired
private FactAgencyProjectMonthlyService factAgencyProjectMonthlyService;
@Autowired
private FactGridProjectDailyService factGridProjectDailyService;
@Autowired
private FactGridProjectMonthlyService factGridProjectMonthlyService;
/**
* @param customerId
* @return
* @Author sun
* @Description 数据-项目-机关日()统计
**/
@Override
public void statsAgencyProject(String customerId) {
}
}

8
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/DimAgencyService.java

@ -92,4 +92,12 @@ public interface DimAgencyService extends BaseService<DimAgencyEntity> {
* @date 2020-06-16
*/
void delete(String[] ids);
/**
* @param dto
* @return
* @Author sun
* @Description 根据客户Id查询机关维度列表数据
**/
List<DimAgencyDTO> getDimAgencyList(DimAgencyDTO dto);
}

8
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/DimDateService.java

@ -92,4 +92,12 @@ public interface DimDateService extends BaseService<DimDateEntity> {
* @date 2020-06-16
*/
void delete(String[] ids);
/**
* @param dto
* @return
* @Author sun
* @Description 根据创建时间查询日维度信息
**/
List<DimDateDTO> getDimDate(DimDateDTO dto);
}

11
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/DimAgencyServiceImpl.java

@ -97,4 +97,15 @@ public class DimAgencyServiceImpl extends BaseServiceImpl<DimAgencyDao, DimAgenc
baseDao.deleteBatchIds(Arrays.asList(ids));
}
/**
* @param dto
* @return
* @Author sun
* @Description 根据客户Id查询机关维度列表数据
**/
@Override
public List<DimAgencyDTO> getDimAgencyList(DimAgencyDTO dto) {
return baseDao.selectDimAgencyList(dto);
}
}

11
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/DimDateServiceImpl.java

@ -98,4 +98,15 @@ public class DimDateServiceImpl extends BaseServiceImpl<DimDateDao, DimDateEntit
baseDao.deleteBatchIds(Arrays.asList(ids));
}
/**
* @param dto
* @return
* @Author sun
* @Description 根据创建时间查询日维度信息
**/
@Override
public List<DimDateDTO> getDimDate(DimDateDTO dto) {
return baseDao.selectDimDate(dto);
}
}

12
epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/stats/DimAgencyDao.xml

@ -4,6 +4,16 @@
<mapper namespace="com.epmet.dao.stats.DimAgencyDao">
<select id="selectDimAgencyList" resultType="com.epmet.dto.stats.DimAgencyDTO">
SELECT
*
FROM
dim_agency
WHERE
del_flag = '0'
<if test="customerId != null and customerId.trim() != ''">
AND customerId = #{customerId}
</if>
</select>
</mapper>

13
epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/stats/DimDateDao.xml

@ -3,6 +3,17 @@
<mapper namespace="com.epmet.dao.stats.DimDateDao">
<select id="selectDimDate" resultType="com.epmet.dto.stats.DimDateDTO">
SELECT
*
FROM
`dim_date`
WHERE
del_flag = '0'
<if test="createdTime != null and createdTime.trim() != ''">
AND DATE_FORMAT(created_time, "%Y-%m-%d") = #{createdTime}
</if>
ORDER BY created_time DESC
</select>
</mapper>
Loading…
Cancel
Save