Browse Source

canshujiaoyan

master
yinzuomei 5 years ago
parent
commit
7d59b04fbc
  1. 139
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/controller/ScreenProjectDataCollController.java
  2. 5
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcoll/impl/ScreenProjectCategoryGridDailyServiceImpl.java
  3. 5
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcoll/impl/ScreenProjectCategoryOrgDailyServiceImpl.java
  4. 5
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcoll/impl/ScreenProjectGridDailyServiceImpl.java
  5. 5
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcoll/impl/ScreenProjectOrgDailyServiceImpl.java
  6. 5
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcoll/impl/ScreenProjectQuantityGridMonthlyServiceImpl.java
  7. 5
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcoll/impl/ScreenProjectQuantityOrgMonthlyServiceImpl.java

139
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/controller/ScreenProjectDataCollController.java

@ -6,6 +6,7 @@ import com.epmet.dto.indexcollect.*;
import com.epmet.dto.screencoll.ScreenCollFormDTO;
import com.epmet.service.evaluationindex.indexcoll.*;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.util.CollectionUtils;
import org.springframework.web.bind.annotation.RequestBody;
@ -24,65 +25,95 @@ import org.springframework.web.bind.annotation.RestController;
@RequestMapping("project")
public class ScreenProjectDataCollController {
@Autowired
private ScreenProjectCategoryGridDailyService projectCategoryGridDailyService;
@Autowired
private ScreenProjectCategoryOrgDailyService projectCategoryOrgDailyService;
@Autowired
private ScreenProjectGridDailyService projectGridDailyService;
@Autowired
private ScreenProjectOrgDailyService projectOrgDailyService;
@Autowired
private ScreenProjectQuantityGridMonthlyService projectQuantityGridMonthlyService;
@Autowired
private ScreenProjectQuantityOrgMonthlyService projectQuantityOrgMonthlyService;
@Autowired
private ScreenProjectCategoryGridDailyService projectCategoryGridDailyService;
@Autowired
private ScreenProjectCategoryOrgDailyService projectCategoryOrgDailyService;
@Autowired
private ScreenProjectGridDailyService projectGridDailyService;
@Autowired
private ScreenProjectOrgDailyService projectOrgDailyService;
@Autowired
private ScreenProjectQuantityGridMonthlyService projectQuantityGridMonthlyService;
@Autowired
private ScreenProjectQuantityOrgMonthlyService projectQuantityOrgMonthlyService;
@RequestMapping("category-grid-daily")
public Result categoryGridDaily(@RequestHeader("CustomerId")String customerId, @RequestBody ScreenCollFormDTO<ScreenProjectCategoryGridDailyDTO> param){
if(null == param || CollectionUtils.isEmpty(param.getDataList()))
throw new ValidateException("传入数据不可为空");
projectCategoryGridDailyService.collect(customerId,param);
return new Result();
}
/**
* @author wangc
* @description 事件/项目分析按类别统计-网格
**/
@RequestMapping("category-grid-daily")
public Result categoryGridDaily(@RequestHeader("CustomerId") String customerId, @RequestBody ScreenCollFormDTO<ScreenProjectCategoryGridDailyDTO> param) {
if (null == param || CollectionUtils.isEmpty(param.getDataList()) || StringUtils.isBlank(param.getDateId())) {
throw new ValidateException("参数错误:dataList不能为空且dataId不能为空");
}
projectCategoryGridDailyService.collect(customerId, param);
return new Result();
}
@RequestMapping("category-org-daily")
public Result categoryOrgDaily(@RequestHeader("CustomerId")String customerId, @RequestBody ScreenCollFormDTO<ScreenProjectCategoryOrgDailyDTO> param){
if(null == param || CollectionUtils.isEmpty(param.getDataList()))
throw new ValidateException("传入数据不可为空");
projectCategoryOrgDailyService.collect(customerId,param);
return new Result();
}
/**
* @author wangc
* @description 事件/项目分析按类别统计-组织
**/
@RequestMapping("category-org-daily")
public Result categoryOrgDaily(@RequestHeader("CustomerId") String customerId, @RequestBody ScreenCollFormDTO<ScreenProjectCategoryOrgDailyDTO> param) {
if (null == param || CollectionUtils.isEmpty(param.getDataList()) || StringUtils.isBlank(param.getDateId())) {
throw new ValidateException("参数错误:dataList不能为空且dataId不能为空");
}
projectCategoryOrgDailyService.collect(customerId, param);
return new Result();
}
@RequestMapping("quantity-grid-monthly")
public Result quantityGridMonthly(@RequestHeader("CustomerId")String customerId, @RequestBody ScreenCollFormDTO<ScreenProjectQuantityGridMonthlyDTO> param){
if(null == param || CollectionUtils.isEmpty(param.getDataList()))
throw new ValidateException("传入数据不可为空");
projectQuantityGridMonthlyService.collect(customerId,param);
return new Result();
}
/**
* @author wangc
* @description 事件/项目分析网格内月度数量统计
**/
@RequestMapping("quantity-grid-monthly")
public Result quantityGridMonthly(@RequestHeader("CustomerId") String customerId, @RequestBody ScreenCollFormDTO<ScreenProjectQuantityGridMonthlyDTO> param) {
if (null == param || CollectionUtils.isEmpty(param.getDataList()) || StringUtils.isBlank(param.getMonthId())) {
throw new ValidateException("参数错误:dataList不能为空且monthId不能为空");
}
projectQuantityGridMonthlyService.collect(customerId, param);
return new Result();
}
@RequestMapping("quantity-org-monthly")
public Result quantityOrgMonthly(@RequestHeader("CustomerId")String customerId, @RequestBody ScreenCollFormDTO<ScreenProjectQuantityOrgMonthlyDTO> param){
if(null == param || CollectionUtils.isEmpty(param.getDataList()))
throw new ValidateException("传入数据不可为空");
projectQuantityOrgMonthlyService.collect(customerId,param);
return new Result();
}
/**
* @author wangc
* @description 事件/项目分析组织内月度数量统计
**/
@RequestMapping("quantity-org-monthly")
public Result quantityOrgMonthly(@RequestHeader("CustomerId") String customerId, @RequestBody ScreenCollFormDTO<ScreenProjectQuantityOrgMonthlyDTO> param) {
if (null == param || CollectionUtils.isEmpty(param.getDataList()) || StringUtils.isBlank(param.getMonthId())) {
throw new ValidateException("参数错误:dataList不能为空且monthId不能为空");
}
projectQuantityOrgMonthlyService.collect(customerId, param);
return new Result();
}
@RequestMapping("project-grid-daily")
public Result projectGridDaily(@RequestHeader("CustomerId")String customerId, @RequestBody ScreenCollFormDTO<ScreenProjectGridDailyDTO> param){
if(null == param || CollectionUtils.isEmpty(param.getDataList()))
throw new ValidateException("传入数据不可为空");
projectGridDailyService.collect(customerId,param);
return new Result();
}
/**
* @author wangc
* @description 事件/项目分析网格内事件
**/
@RequestMapping("project-grid-daily")
public Result projectGridDaily(@RequestHeader("CustomerId") String customerId, @RequestBody ScreenCollFormDTO<ScreenProjectGridDailyDTO> param) {
if (null == param || CollectionUtils.isEmpty(param.getDataList()) || StringUtils.isBlank(param.getDateId())) {
throw new ValidateException("参数错误:dataList不能为空且dataId不能为空");
}
projectGridDailyService.collect(customerId, param);
return new Result();
}
@RequestMapping("project-org-daily")
public Result projectOrgDaily(@RequestHeader("CustomerId")String customerId, @RequestBody ScreenCollFormDTO<ScreenProjectOrgDailyDTO> param){
if(null == param || CollectionUtils.isEmpty(param.getDataList()))
throw new ValidateException("传入数据不可为空");
projectOrgDailyService.collect(customerId,param);
return new Result();
}
/**
* @author wangc
* @description 事件/项目分析组织内事件
**/
@RequestMapping("project-org-daily")
public Result projectOrgDaily(@RequestHeader("CustomerId") String customerId, @RequestBody ScreenCollFormDTO<ScreenProjectOrgDailyDTO> param) {
if (null == param || CollectionUtils.isEmpty(param.getDataList()) || StringUtils.isBlank(param.getDateId())) {
throw new ValidateException("参数错误:dataList不能为空且dataId不能为空");
}
projectOrgDailyService.collect(customerId, param);
return new Result();
}
}

5
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcoll/impl/ScreenProjectCategoryGridDailyServiceImpl.java

@ -21,11 +21,9 @@ 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.NumConstant;
import com.epmet.commons.tools.constant.FieldConstant;
import com.epmet.commons.tools.page.PageData;
import com.epmet.commons.tools.utils.ConvertUtils;
import com.epmet.commons.tools.constant.FieldConstant;
import com.epmet.commons.tools.utils.DateUtils;
import com.epmet.constant.DataSourceConstant;
import com.epmet.dao.evaluationindex.indexcoll.ScreenProjectCategoryGridDailyDao;
import com.epmet.dto.indexcollect.ScreenProjectCategoryGridDailyDTO;
@ -113,7 +111,6 @@ public class ScreenProjectCategoryGridDailyServiceImpl extends BaseServiceImpl<S
@DataSource(value = DataSourceConstant.EVALUATION_INDEX,datasourceNameFromArg = true)
@Override
public void collect(String customerId, ScreenCollFormDTO<ScreenProjectCategoryGridDailyDTO> data) {
if(StringUtils.isBlank(data.getDateId())) data.setDateId(DateUtils.getBeforeNDay(NumConstant.ONE));
if(data.getIsFirst()){
baseDao.deleteByDateIdAndCustomerId(customerId,data.getDateId());
}

5
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcoll/impl/ScreenProjectCategoryOrgDailyServiceImpl.java

@ -21,11 +21,9 @@ 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.NumConstant;
import com.epmet.commons.tools.constant.FieldConstant;
import com.epmet.commons.tools.page.PageData;
import com.epmet.commons.tools.utils.ConvertUtils;
import com.epmet.commons.tools.constant.FieldConstant;
import com.epmet.commons.tools.utils.DateUtils;
import com.epmet.constant.DataSourceConstant;
import com.epmet.dao.evaluationindex.indexcoll.ScreenProjectCategoryOrgDailyDao;
import com.epmet.dto.indexcollect.ScreenProjectCategoryOrgDailyDTO;
@ -113,7 +111,6 @@ public class ScreenProjectCategoryOrgDailyServiceImpl extends BaseServiceImpl<Sc
@DataSource(value = DataSourceConstant.EVALUATION_INDEX,datasourceNameFromArg = true)
@Override
public void collect(String customerId, ScreenCollFormDTO<ScreenProjectCategoryOrgDailyDTO> data) {
if(StringUtils.isBlank(data.getDateId())) data.setDateId(DateUtils.getBeforeNDay(NumConstant.ONE));
if(data.getIsFirst()){
baseDao.deleteByDateIdAndCustomerId(customerId,data.getDateId());
}

5
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcoll/impl/ScreenProjectGridDailyServiceImpl.java

@ -21,11 +21,9 @@ 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.NumConstant;
import com.epmet.commons.tools.constant.FieldConstant;
import com.epmet.commons.tools.page.PageData;
import com.epmet.commons.tools.utils.ConvertUtils;
import com.epmet.commons.tools.constant.FieldConstant;
import com.epmet.commons.tools.utils.DateUtils;
import com.epmet.constant.DataSourceConstant;
import com.epmet.dao.evaluationindex.indexcoll.ScreenProjectGridDailyDao;
import com.epmet.dto.indexcollect.ScreenProjectGridDailyDTO;
@ -114,7 +112,6 @@ public class ScreenProjectGridDailyServiceImpl extends BaseServiceImpl<ScreenPro
@DataSource(value = DataSourceConstant.EVALUATION_INDEX,datasourceNameFromArg = true)
@Override
public void collect(String customerId, ScreenCollFormDTO<ScreenProjectGridDailyDTO> data) {
if(StringUtils.isBlank(data.getDateId())) data.setDateId(DateUtils.getBeforeNDay(NumConstant.ONE));
if(data.getIsFirst()){
baseDao.deleteByDateIdAndCustomerId(customerId,data.getDateId());
}

5
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcoll/impl/ScreenProjectOrgDailyServiceImpl.java

@ -21,11 +21,9 @@ 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.NumConstant;
import com.epmet.commons.tools.constant.FieldConstant;
import com.epmet.commons.tools.page.PageData;
import com.epmet.commons.tools.utils.ConvertUtils;
import com.epmet.commons.tools.constant.FieldConstant;
import com.epmet.commons.tools.utils.DateUtils;
import com.epmet.constant.DataSourceConstant;
import com.epmet.dao.evaluationindex.indexcoll.ScreenProjectOrgDailyDao;
import com.epmet.dto.indexcollect.ScreenProjectOrgDailyDTO;
@ -115,7 +113,6 @@ public class ScreenProjectOrgDailyServiceImpl extends BaseServiceImpl<ScreenProj
@DataSource(value = DataSourceConstant.EVALUATION_INDEX,datasourceNameFromArg = true)
@Override
public void collect(String customerId, ScreenCollFormDTO<ScreenProjectOrgDailyDTO> data) {
if(StringUtils.isBlank(data.getDateId())) data.setDateId(DateUtils.getBeforeNDay(NumConstant.ONE));
if(data.getIsFirst()){
baseDao.deleteByDateIdAndCustomerId(customerId,data.getDateId());
}

5
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcoll/impl/ScreenProjectQuantityGridMonthlyServiceImpl.java

@ -21,11 +21,9 @@ 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.NumConstant;
import com.epmet.commons.tools.constant.FieldConstant;
import com.epmet.commons.tools.page.PageData;
import com.epmet.commons.tools.utils.ConvertUtils;
import com.epmet.commons.tools.constant.FieldConstant;
import com.epmet.commons.tools.utils.DateUtils;
import com.epmet.constant.DataSourceConstant;
import com.epmet.dao.evaluationindex.indexcoll.ScreenProjectQuantityGridMonthlyDao;
import com.epmet.dto.indexcollect.ScreenProjectQuantityGridMonthlyDTO;
@ -114,7 +112,6 @@ public class ScreenProjectQuantityGridMonthlyServiceImpl extends BaseServiceImpl
@DataSource(value = DataSourceConstant.EVALUATION_INDEX,datasourceNameFromArg = true)
@Override
public void collect(String customerId, ScreenCollFormDTO<ScreenProjectQuantityGridMonthlyDTO> data) {
if(StringUtils.isBlank(data.getMonthId())) data.setMonthId(DateUtils.getBeforeNMonth(NumConstant.ONE));
if(data.getIsFirst()){
baseDao.deleteByDateIdAndCustomerId(customerId,data.getMonthId());
}

5
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcoll/impl/ScreenProjectQuantityOrgMonthlyServiceImpl.java

@ -21,11 +21,9 @@ 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.NumConstant;
import com.epmet.commons.tools.constant.FieldConstant;
import com.epmet.commons.tools.page.PageData;
import com.epmet.commons.tools.utils.ConvertUtils;
import com.epmet.commons.tools.constant.FieldConstant;
import com.epmet.commons.tools.utils.DateUtils;
import com.epmet.constant.DataSourceConstant;
import com.epmet.dao.evaluationindex.indexcoll.ScreenProjectQuantityOrgMonthlyDao;
import com.epmet.dto.indexcollect.ScreenProjectQuantityOrgMonthlyDTO;
@ -113,7 +111,6 @@ public class ScreenProjectQuantityOrgMonthlyServiceImpl extends BaseServiceImpl<
@DataSource(value = DataSourceConstant.EVALUATION_INDEX,datasourceNameFromArg = true)
@Override
public void collect(String customerId, ScreenCollFormDTO<ScreenProjectQuantityOrgMonthlyDTO> data) {
if(StringUtils.isBlank(data.getMonthId())) data.setMonthId(DateUtils.getBeforeNMonth(NumConstant.ONE));
if(data.getIsFirst()){
baseDao.deleteByDateIdAndCustomerId(customerId,data.getMonthId());
}

Loading…
Cancel
Save