Browse Source

事件、项目数据采集controller

dev_shibei_match
wangchao 5 years ago
parent
commit
07b1ec7027
  1. 71
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/controller/ScreenProjectDataCollController.java
  2. 9
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/indexcoll/ScreenProjectCategoryGridDailyDao.java
  3. 10
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/indexcoll/ScreenProjectCategoryOrgDailyDao.java
  4. 12
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/indexcoll/ScreenProjectGridDailyDao.java
  5. 12
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/indexcoll/ScreenProjectOrgDailyDao.java
  6. 10
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/indexcoll/ScreenProjectQuantityGridMonthlyDao.java
  7. 12
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/indexcoll/ScreenProjectQuantityOrgMonthlyDao.java
  8. 10
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcoll/ScreenProjectCategoryGridDailyService.java
  9. 11
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcoll/ScreenProjectCategoryOrgDailyService.java
  10. 9
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcoll/ScreenProjectDataCollService.java
  11. 12
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcoll/ScreenProjectGridDailyService.java
  12. 11
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcoll/ScreenProjectOrgDailyService.java
  13. 10
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcoll/ScreenProjectQuantityGridMonthlyService.java
  14. 11
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcoll/ScreenProjectQuantityOrgMonthlyService.java
  15. 23
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcoll/impl/ScreenProjectCategoryGridDailyServiceImpl.java
  16. 24
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcoll/impl/ScreenProjectCategoryOrgDailyServiceImpl.java
  17. 41
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcoll/impl/ScreenProjectDataCollServiceImpl.java
  18. 24
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcoll/impl/ScreenProjectGridDailyServiceImpl.java
  19. 25
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcoll/impl/ScreenProjectOrgDailyServiceImpl.java
  20. 24
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcoll/impl/ScreenProjectQuantityGridMonthlyServiceImpl.java
  21. 24
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcoll/impl/ScreenProjectQuantityOrgMonthlyServiceImpl.java
  22. 71
      epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/indexcoll/ScreenProjectCategoryGridDailyDao.xml
  23. 76
      epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/indexcoll/ScreenProjectCategoryOrgDailyDao.xml
  24. 77
      epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/indexcoll/ScreenProjectGridDailyDao.xml
  25. 79
      epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/indexcoll/ScreenProjectOrgDailyDao.xml
  26. 68
      epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/indexcoll/ScreenProjectQuantityGridMonthlyDao.xml
  27. 71
      epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/indexcoll/ScreenProjectQuantityOrgMonthlyDao.xml

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

@ -1,6 +1,15 @@
package com.epmet.controller;
import com.epmet.commons.tools.exception.ValidateException;
import com.epmet.commons.tools.utils.Result;
import com.epmet.dto.indexcollect.*;
import com.epmet.dto.screencoll.ScreenCollFormDTO;
import com.epmet.service.evaluationindex.indexcoll.*;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.util.CollectionUtils;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestHeader;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
@ -14,4 +23,66 @@ import org.springframework.web.bind.annotation.RestController;
@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;
@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();
}
@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();
}
@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();
}
@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();
}
@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();
}
@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();
}
}

9
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/indexcoll/ScreenProjectCategoryGridDailyDao.java

@ -18,8 +18,12 @@
package com.epmet.dao.evaluationindex.indexcoll;
import com.epmet.commons.mybatis.dao.BaseDao;
import com.epmet.dto.indexcollect.ScreenProjectCategoryGridDailyDTO;
import com.epmet.entity.evaluationindex.indexcoll.ScreenProjectCategoryGridDailyEntity;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import java.util.List;
/**
* 项目(事件)分类按网格_按天统计
@ -29,5 +33,8 @@ import org.apache.ibatis.annotations.Mapper;
*/
@Mapper
public interface ScreenProjectCategoryGridDailyDao extends BaseDao<ScreenProjectCategoryGridDailyEntity> {
void insertBatch(@Param("list") List<ScreenProjectCategoryGridDailyDTO> list,@Param("customerId") String customerId,@Param("createdBy")String createdBy);
void deleteByDateIdAndCustomerId(@Param("customerId") String customerId, @Param("dateId") String dateId);
}

10
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/indexcoll/ScreenProjectCategoryOrgDailyDao.java

@ -18,8 +18,12 @@
package com.epmet.dao.evaluationindex.indexcoll;
import com.epmet.commons.mybatis.dao.BaseDao;
import com.epmet.dto.indexcollect.ScreenProjectCategoryOrgDailyDTO;
import com.epmet.entity.evaluationindex.indexcoll.ScreenProjectCategoryOrgDailyEntity;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import java.util.List;
/**
* 项目(事件)分类按组织_按天统计
@ -29,5 +33,9 @@ import org.apache.ibatis.annotations.Mapper;
*/
@Mapper
public interface ScreenProjectCategoryOrgDailyDao extends BaseDao<ScreenProjectCategoryOrgDailyEntity> {
void insertBatch(@Param("list") List<ScreenProjectCategoryOrgDailyDTO> list,@Param("customerId") String customerId,@Param("createdBy")String createdBy);
void deleteByDateIdAndCustomerId(@Param("customerId") String customerId, @Param("dateId") String dateId);
}

12
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/indexcoll/ScreenProjectGridDailyDao.java

@ -18,8 +18,12 @@
package com.epmet.dao.evaluationindex.indexcoll;
import com.epmet.commons.mybatis.dao.BaseDao;
import com.epmet.dto.indexcollect.ScreenProjectGridDailyDTO;
import com.epmet.entity.evaluationindex.indexcoll.ScreenProjectGridDailyEntity;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import java.util.List;
/**
* 项目(事件)分析按网格_按天统计
@ -29,5 +33,11 @@ import org.apache.ibatis.annotations.Mapper;
*/
@Mapper
public interface ScreenProjectGridDailyDao extends BaseDao<ScreenProjectGridDailyEntity> {
void insertBatch(@Param("list") List<ScreenProjectGridDailyDTO> list,@Param("customerId") String customerId,@Param("createdBy")String createdBy);
void deleteByDateIdAndCustomerId(@Param("customerId") String customerId, @Param("dateId") String dateId);
}

12
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/indexcoll/ScreenProjectOrgDailyDao.java

@ -18,8 +18,12 @@
package com.epmet.dao.evaluationindex.indexcoll;
import com.epmet.commons.mybatis.dao.BaseDao;
import com.epmet.dto.indexcollect.ScreenProjectOrgDailyDTO;
import com.epmet.entity.evaluationindex.indexcoll.ScreenProjectOrgDailyEntity;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import java.util.List;
/**
* 项目(事件)分析按组织_按天统计
@ -29,5 +33,11 @@ import org.apache.ibatis.annotations.Mapper;
*/
@Mapper
public interface ScreenProjectOrgDailyDao extends BaseDao<ScreenProjectOrgDailyEntity> {
void insertBatch(@Param("list") List<ScreenProjectOrgDailyDTO> list,@Param("customerId") String customerId,@Param("createdBy")String createdBy);
void deleteByDateIdAndCustomerId(@Param("customerId") String customerId, @Param("dateId") String dateId);
}

10
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/indexcoll/ScreenProjectQuantityGridMonthlyDao.java

@ -18,8 +18,12 @@
package com.epmet.dao.evaluationindex.indexcoll;
import com.epmet.commons.mybatis.dao.BaseDao;
import com.epmet.dto.indexcollect.ScreenProjectQuantityGridMonthlyDTO;
import com.epmet.entity.evaluationindex.indexcoll.ScreenProjectQuantityGridMonthlyEntity;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import java.util.List;
/**
* 项目(事件)数量分析按网格_按月统计
@ -29,5 +33,9 @@ import org.apache.ibatis.annotations.Mapper;
*/
@Mapper
public interface ScreenProjectQuantityGridMonthlyDao extends BaseDao<ScreenProjectQuantityGridMonthlyEntity> {
void insertBatch(@Param("list") List<ScreenProjectQuantityGridMonthlyDTO> list,@Param("customerId") String customerId,@Param("createdBy")String createdBy);
void deleteByDateIdAndCustomerId(@Param("customerId") String customerId, @Param("monthId") String monthId);
}

12
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/indexcoll/ScreenProjectQuantityOrgMonthlyDao.java

@ -18,8 +18,12 @@
package com.epmet.dao.evaluationindex.indexcoll;
import com.epmet.commons.mybatis.dao.BaseDao;
import com.epmet.dto.indexcollect.ScreenProjectQuantityOrgMonthlyDTO;
import com.epmet.entity.evaluationindex.indexcoll.ScreenProjectQuantityOrgMonthlyEntity;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import java.util.List;
/**
* 项目(事件)数量分析按组织_按月统计
@ -29,5 +33,11 @@ import org.apache.ibatis.annotations.Mapper;
*/
@Mapper
public interface ScreenProjectQuantityOrgMonthlyDao extends BaseDao<ScreenProjectQuantityOrgMonthlyEntity> {
void insertBatch(@Param("list") List<ScreenProjectQuantityOrgMonthlyDTO> list,@Param("customerId") String customerId,@Param("createdBy")String createdBy);
void deleteByDateIdAndCustomerId(@Param("customerId") String customerId, @Param("monthId") String monthId);
}

10
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcoll/ScreenProjectCategoryGridDailyService.java

@ -20,6 +20,7 @@ package com.epmet.service.evaluationindex.indexcoll;
import com.epmet.commons.mybatis.service.BaseService;
import com.epmet.commons.tools.page.PageData;
import com.epmet.dto.indexcollect.ScreenProjectCategoryGridDailyDTO;
import com.epmet.dto.screencoll.ScreenCollFormDTO;
import com.epmet.entity.evaluationindex.indexcoll.ScreenProjectCategoryGridDailyEntity;
import java.util.List;
@ -92,4 +93,13 @@ public interface ScreenProjectCategoryGridDailyService extends BaseService<Scree
* @date 2021-01-27
*/
void delete(String[] ids);
/**
* @Description 数据录入
* @param
* @return void
* @author wangc
* @date 2021.01.28 09:09
*/
void collect(String customerId, ScreenCollFormDTO<ScreenProjectCategoryGridDailyDTO> data);
}

11
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcoll/ScreenProjectCategoryOrgDailyService.java

@ -20,6 +20,7 @@ package com.epmet.service.evaluationindex.indexcoll;
import com.epmet.commons.mybatis.service.BaseService;
import com.epmet.commons.tools.page.PageData;
import com.epmet.dto.indexcollect.ScreenProjectCategoryOrgDailyDTO;
import com.epmet.dto.screencoll.ScreenCollFormDTO;
import com.epmet.entity.evaluationindex.indexcoll.ScreenProjectCategoryOrgDailyEntity;
import java.util.List;
@ -92,4 +93,14 @@ public interface ScreenProjectCategoryOrgDailyService extends BaseService<Screen
* @date 2021-01-27
*/
void delete(String[] ids);
/**
* @Description 数据采集
* @param customerId
* @param data
* @return void
* @author wangc
* @date 2021.01.28 09:33
*/
void collect(String customerId, ScreenCollFormDTO<ScreenProjectCategoryOrgDailyDTO> data);
}

9
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcoll/ScreenProjectDataCollService.java

@ -1,9 +0,0 @@
package com.epmet.service.evaluationindex.indexcoll;
/**
* @Description 事件/项目大屏数据采集service
* @author wangc
* @date 2021.01.27 17:19
*/
public interface ScreenProjectDataCollService {
}

12
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcoll/ScreenProjectGridDailyService.java

@ -20,7 +20,9 @@ package com.epmet.service.evaluationindex.indexcoll;
import com.epmet.commons.mybatis.service.BaseService;
import com.epmet.commons.tools.page.PageData;
import com.epmet.dto.indexcollect.ScreenProjectGridDailyDTO;
import com.epmet.dto.screencoll.ScreenCollFormDTO;
import com.epmet.entity.evaluationindex.indexcoll.ScreenProjectGridDailyEntity;
import javafx.stage.Screen;
import java.util.List;
import java.util.Map;
@ -92,4 +94,14 @@ public interface ScreenProjectGridDailyService extends BaseService<ScreenProject
* @date 2021-01-27
*/
void delete(String[] ids);
/**
* @Description 数据采集
* @param customerId
* @param data
* @return void
* @author wangc
* @date 2021.01.28 09:33
*/
void collect(String customerId, ScreenCollFormDTO<ScreenProjectGridDailyDTO> data);
}

11
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcoll/ScreenProjectOrgDailyService.java

@ -20,6 +20,7 @@ package com.epmet.service.evaluationindex.indexcoll;
import com.epmet.commons.mybatis.service.BaseService;
import com.epmet.commons.tools.page.PageData;
import com.epmet.dto.indexcollect.ScreenProjectOrgDailyDTO;
import com.epmet.dto.screencoll.ScreenCollFormDTO;
import com.epmet.entity.evaluationindex.indexcoll.ScreenProjectOrgDailyEntity;
import java.util.List;
@ -92,4 +93,14 @@ public interface ScreenProjectOrgDailyService extends BaseService<ScreenProjectO
* @date 2021-01-27
*/
void delete(String[] ids);
/**
* @Description 数据采集
* @param customerId
* @param data
* @return void
* @author wangc
* @date 2021.01.28 09:33
*/
void collect(String customerId, ScreenCollFormDTO<ScreenProjectOrgDailyDTO> data);
}

10
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcoll/ScreenProjectQuantityGridMonthlyService.java

@ -20,6 +20,7 @@ package com.epmet.service.evaluationindex.indexcoll;
import com.epmet.commons.mybatis.service.BaseService;
import com.epmet.commons.tools.page.PageData;
import com.epmet.dto.indexcollect.ScreenProjectQuantityGridMonthlyDTO;
import com.epmet.dto.screencoll.ScreenCollFormDTO;
import com.epmet.entity.evaluationindex.indexcoll.ScreenProjectQuantityGridMonthlyEntity;
import java.util.List;
@ -92,4 +93,13 @@ public interface ScreenProjectQuantityGridMonthlyService extends BaseService<Scr
* @date 2021-01-27
*/
void delete(String[] ids);
/**
* @Description 数据采集
* @param customerId
* @param data
* @return void
* @author wangc
* @date 2021.01.28 09:33
*/
void collect(String customerId, ScreenCollFormDTO<ScreenProjectQuantityGridMonthlyDTO> data);
}

11
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcoll/ScreenProjectQuantityOrgMonthlyService.java

@ -20,6 +20,7 @@ package com.epmet.service.evaluationindex.indexcoll;
import com.epmet.commons.mybatis.service.BaseService;
import com.epmet.commons.tools.page.PageData;
import com.epmet.dto.indexcollect.ScreenProjectQuantityOrgMonthlyDTO;
import com.epmet.dto.screencoll.ScreenCollFormDTO;
import com.epmet.entity.evaluationindex.indexcoll.ScreenProjectQuantityOrgMonthlyEntity;
import java.util.List;
@ -92,4 +93,14 @@ public interface ScreenProjectQuantityOrgMonthlyService extends BaseService<Scre
* @date 2021-01-27
*/
void delete(String[] ids);
/**
* @Description 数据采集
* @param customerId
* @param data
* @return void
* @author wangc
* @date 2021.01.28 09:33
*/
void collect(String customerId, ScreenCollFormDTO<ScreenProjectQuantityOrgMonthlyDTO> data);
}

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

@ -19,12 +19,17 @@ package com.epmet.service.evaluationindex.indexcoll.impl;
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.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;
import com.epmet.dto.screencoll.ScreenCollFormDTO;
import com.epmet.entity.evaluationindex.indexcoll.ScreenProjectCategoryGridDailyEntity;
import com.epmet.service.evaluationindex.indexcoll.ScreenProjectCategoryGridDailyService;
import org.apache.commons.lang3.StringUtils;
@ -97,4 +102,22 @@ public class ScreenProjectCategoryGridDailyServiceImpl extends BaseServiceImpl<S
baseDao.deleteBatchIds(Arrays.asList(ids));
}
/**
* @Description 数据录入
* @param
* @return void
* @author wangc
* @date 2021.01.28 09:09
*/
@Transactional(rollbackFor = Exception.class)
@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());
}
baseDao.insertBatch(data.getDataList(),customerId,"APP_USER");
}
}

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

@ -19,12 +19,17 @@ package com.epmet.service.evaluationindex.indexcoll.impl;
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.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;
import com.epmet.dto.screencoll.ScreenCollFormDTO;
import com.epmet.entity.evaluationindex.indexcoll.ScreenProjectCategoryOrgDailyEntity;
import com.epmet.service.evaluationindex.indexcoll.ScreenProjectCategoryOrgDailyService;
import org.apache.commons.lang3.StringUtils;
@ -96,4 +101,23 @@ public class ScreenProjectCategoryOrgDailyServiceImpl extends BaseServiceImpl<Sc
baseDao.deleteBatchIds(Arrays.asList(ids));
}
/**
* @Description 数据采集
* @param customerId
* @param data
* @return void
* @author wangc
* @date 2021.01.28 09:33
*/
@Transactional(rollbackFor = Exception.class)
@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());
}
baseDao.insertBatch(data.getDataList(),customerId,"APP_USER");
}
}

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

@ -1,41 +0,0 @@
package com.epmet.service.evaluationindex.indexcoll.impl;
import com.epmet.commons.dynamic.datasource.annotation.DataSource;
import com.epmet.constant.DataSourceConstant;
import com.epmet.dao.evaluationindex.indexcoll.*;
import com.epmet.service.evaluationindex.indexcoll.ScreenProjectDataCollService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
/**
* @Description
* @ClassName ScreenProjectDataCollServiceImpl
* @Auth wangc
* @Date 2021-01-27 17:20
*/
@Slf4j
@Service
@DataSource(DataSourceConstant.EVALUATION_INDEX)
public class ScreenProjectDataCollServiceImpl implements ScreenProjectDataCollService {
@Autowired
private ScreenProjectCategoryGridDailyDao categoryGridDailyDao;
@Autowired
private ScreenProjectCategoryOrgDailyDao categoryOrgDailyDao;
@Autowired
private ScreenProjectGridDailyDao gridDailyDao;
@Autowired
private ScreenProjectOrgDailyDao orgDailyDao;
@Autowired
private ScreenProjectQuantityGridMonthlyDao quantityGridMonthlyDao;
@Autowired
private ScreenProjectQuantityOrgMonthlyDao quantityOrgMonthlyDao;
}

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

@ -19,12 +19,17 @@ package com.epmet.service.evaluationindex.indexcoll.impl;
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.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;
import com.epmet.dto.screencoll.ScreenCollFormDTO;
import com.epmet.entity.evaluationindex.indexcoll.ScreenProjectGridDailyEntity;
import com.epmet.service.evaluationindex.indexcoll.ScreenProjectGridDailyService;
import org.apache.commons.lang3.StringUtils;
@ -97,4 +102,23 @@ public class ScreenProjectGridDailyServiceImpl extends BaseServiceImpl<ScreenPro
baseDao.deleteBatchIds(Arrays.asList(ids));
}
/**
* @Description 数据采集
* @param customerId
* @param data
* @return void
* @author wangc
* @date 2021.01.28 09:33
*/
@Transactional(rollbackFor = Exception.class)
@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());
}
baseDao.insertBatch(data.getDataList(),customerId,"APP_USER");
}
}

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

@ -19,12 +19,17 @@ package com.epmet.service.evaluationindex.indexcoll.impl;
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.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;
import com.epmet.dto.screencoll.ScreenCollFormDTO;
import com.epmet.entity.evaluationindex.indexcoll.ScreenProjectOrgDailyEntity;
import com.epmet.service.evaluationindex.indexcoll.ScreenProjectOrgDailyService;
import org.apache.commons.lang3.StringUtils;
@ -97,4 +102,24 @@ public class ScreenProjectOrgDailyServiceImpl extends BaseServiceImpl<ScreenProj
baseDao.deleteBatchIds(Arrays.asList(ids));
}
/**
* @Description 数据采集
* @param customerId
* @param data
* @return void
* @author wangc
* @date 2021.01.28 09:33
*/
@Transactional(rollbackFor = Exception.class)
@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());
}
baseDao.insertBatch(data.getDataList(),customerId,"APP_USER");
}
}

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

@ -19,12 +19,17 @@ package com.epmet.service.evaluationindex.indexcoll.impl;
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.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;
import com.epmet.dto.screencoll.ScreenCollFormDTO;
import com.epmet.entity.evaluationindex.indexcoll.ScreenProjectQuantityGridMonthlyEntity;
import com.epmet.service.evaluationindex.indexcoll.ScreenProjectQuantityGridMonthlyService;
import org.apache.commons.lang3.StringUtils;
@ -97,4 +102,23 @@ public class ScreenProjectQuantityGridMonthlyServiceImpl extends BaseServiceImpl
baseDao.deleteBatchIds(Arrays.asList(ids));
}
/**
* @Description 数据采集
* @param customerId
* @param data
* @return void
* @author wangc
* @date 2021.01.28 09:33
*/
@Transactional(rollbackFor = Exception.class)
@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());
}
baseDao.insertBatch(data.getDataList(),customerId,"APP_USER");
}
}

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

@ -19,12 +19,17 @@ package com.epmet.service.evaluationindex.indexcoll.impl;
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.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;
import com.epmet.dto.screencoll.ScreenCollFormDTO;
import com.epmet.entity.evaluationindex.indexcoll.ScreenProjectQuantityOrgMonthlyEntity;
import com.epmet.service.evaluationindex.indexcoll.ScreenProjectQuantityOrgMonthlyService;
import org.apache.commons.lang3.StringUtils;
@ -96,4 +101,23 @@ public class ScreenProjectQuantityOrgMonthlyServiceImpl extends BaseServiceImpl<
baseDao.deleteBatchIds(Arrays.asList(ids));
}
/**
* @Description 数据采集
* @param customerId
* @param data
* @return void
* @author wangc
* @date 2021.01.28 09:33
*/
@Transactional(rollbackFor = Exception.class)
@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());
}
baseDao.insertBatch(data.getDataList(),customerId,"APP_USER");
}
}

71
epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/indexcoll/ScreenProjectCategoryGridDailyDao.xml

@ -24,5 +24,76 @@
<result property="updatedTime" column="UPDATED_TIME"/>
</resultMap>
<insert id="insertBatch" parameterType="java.util.List">
INSERT INTO screen_project_category_grid_daily
(
id,
customer_id,
date_id,
grid_id,
pid,
pids,
epmet_category_code,
project_total,
pending_total,
closed_total,
un_resolved_total,
resolved_total,
del_flag,
revision,
created_by,
created_time,
updated_by,
updated_time
) values
<foreach collection="list" item="item" index="index" separator=",">
(
(SELECT REPLACE(UUID(), '-', '') AS id),
#{customerId},
#{item.dateId},
#{item.gridId},
#{item.pid},
#{item.pids},
#{item.epmetCategoryCode},
#{item.projectTotal},
#{item.pendingTotal},
#{item.closedTotal},
#{item.unResolvedTotal},
#{item.regIncr},
#{item.resolvedTotal},
'0',
0,
#{createdBy},
now(),
#{createdBy},
now()
)
</foreach>
</insert>
<delete id="deleteByDateIdAndCustomerId">
delete from screen_project_category_grid_daily
where customer_id = #{customerId}
and date_id = #{dateId}
</delete>
</mapper>

76
epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/indexcoll/ScreenProjectCategoryOrgDailyDao.xml

@ -25,5 +25,81 @@
<result property="updatedTime" column="UPDATED_TIME"/>
</resultMap>
<insert id="insertBatch" parameterType="java.util.List">
INSERT INTO screen_project_category_org_daily
(
id,
customer_id,
date_id,
org_id,
org_type,
pid,
pids,
epmet_category_code,
project_total,
pending_total,
closed_total,
un_resolved_total,
resolved_total,
del_flag,
revision,
created_by,
created_time,
updated_by,
updated_time
) values
<foreach collection="list" item="item" index="index" separator=",">
(
(SELECT REPLACE(UUID(), '-', '') AS id),
#{customerId},
#{item.dateId},
#{item.orgId},
#{item.orgType},
#{item.pid},
#{item.pids},
#{item.epmetCategoryCode},
#{item.projectTotal},
#{item.pendingTotal},
#{item.closedTotal},
#{item.unResolvedTotal},
#{item.regIncr},
#{item.resolvedTotal},
'0',
0,
#{createdBy},
now(),
#{createdBy},
now()
)
</foreach>
</insert>
<delete id="deleteByDateIdAndCustomerId">
delete from screen_project_category_org_daily
where customer_id = #{customerId}
and date_id = #{dateId}
</delete>
</mapper>

77
epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/indexcoll/ScreenProjectGridDailyDao.xml

@ -26,5 +26,82 @@
<result property="updatedTime" column="UPDATED_TIME"/>
</resultMap>
<insert id="insertBatch" parameterType="java.util.List">
INSERT INTO screen_project_grid_daily
(
id,
customer_id,
date_id,
grid_id,
pid,
pids,
project_total,
resolved_num,
resolved_ratio,
evaluate_total,
good_total,
bad_total,
good_ratio,
bad_ratio,
del_flag,
revision,
created_by,
created_time,
updated_by,
updated_time
) values
<foreach collection="list" item="item" index="index" separator=",">
(
(SELECT REPLACE(UUID(), '-', '') AS id),
#{customerId},
#{item.dateId},
#{item.gridId},
#{item.pid},
#{item.pids},
#{item.projectTotal},
#{item.resolvedNum},
#{item.resolvedRatio},
#{item.evaluateTotal},
#{item.goodTotal},
#{item.badTotal},
#{item.goodRatio},
#{item.badRatio},
'0',
0,
#{createdBy},
now(),
#{createdBy},
now()
)
</foreach>
</insert>
<delete id="deleteByDateIdAndCustomerId">
delete from screen_project_grid_daily
where customer_id = #{customerId}
and date_id = #{dateId}
</delete>
</mapper>

79
epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/indexcoll/ScreenProjectOrgDailyDao.xml

@ -27,5 +27,84 @@
<result property="updatedTime" column="UPDATED_TIME"/>
</resultMap>
<insert id="insertBatch" parameterType="java.util.List">
INSERT INTO screen_project_org_daily
(
id,
customer_id,
date_id,
org_id,
org_type,
pid,
pids,
project_total,
resolved_num,
resolved_ratio,
evaluate_total,
good_total,
bad_total,
good_ratio,
bad_ratio,
del_flag,
revision,
created_by,
created_time,
updated_by,
updated_time
) values
<foreach collection="list" item="item" index="index" separator=",">
(
(SELECT REPLACE(UUID(), '-', '') AS id),
#{customerId},
#{item.dateId},
#{item.orgId},
#{item.orgType},
#{item.pid},
#{item.pids},
#{item.projectTotal},
#{item.resolvedNum},
#{item.resolvedRatio},
#{item.evaluateTotal},
#{item.goodTotal},
#{item.badTotal},
#{item.goodRatio},
#{item.badRatio},
'0',
0,
#{createdBy},
now(),
#{createdBy},
now()
)
</foreach>
</insert>
<delete id="deleteByDateIdAndCustomerId">
delete from screen_project_org_daily
where customer_id = #{customerId}
and date_id = #{dateId}
</delete>
</mapper>

68
epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/indexcoll/ScreenProjectQuantityGridMonthlyDao.xml

@ -23,5 +23,73 @@
<result property="updatedTime" column="UPDATED_TIME"/>
</resultMap>
<insert id="insertBatch" parameterType="java.util.List">
INSERT INTO screen_project_quantity_grid_monthly
(
id,
customer_id,
month_id,
grid_id,
pid,
pids,
project_incr,
project_total,
un_closed_total,
closed_total,
closed_incr,
del_flag,
revision,
created_by,
created_time,
updated_by,
updated_time
) values
<foreach collection="list" item="item" index="index" separator=",">
(
(SELECT REPLACE(UUID(), '-', '') AS id),
#{customerId},
#{item.monthId},
#{item.gridId},
#{item.pid},
#{item.pids},
#{item.projectIncr},
#{item.projectTotal},
#{item.unClosedTotal},
#{item.closedTotal},
#{item.closedIncr},
'0',
0,
#{createdBy},
now(),
#{createdBy},
now()
)
</foreach>
</insert>
<delete id="deleteByDateIdAndCustomerId">
delete from screen_project_quantity_grid_monthly
where customer_id = #{customerId}
and date_id = #{monthId}
</delete>
</mapper>

71
epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/indexcoll/ScreenProjectQuantityOrgMonthlyDao.xml

@ -25,4 +25,75 @@
</resultMap>
<insert id="insertBatch" parameterType="java.util.List">
INSERT INTO screen_project_quantity_org_monthly
(
id,
customer_id,
month_id,
org_id,
org_type,
pid,
pids,
project_incr,
project_total,
un_closed_total,
closed_total,
closed_incr,
del_flag,
revision,
created_by,
created_time,
updated_by,
updated_time
) values
<foreach collection="list" item="item" index="index" separator=",">
(
(SELECT REPLACE(UUID(), '-', '') AS id),
#{customerId},
#{item.monthId},
#{item.orgId},
#{item.orgType},
#{item.pid},
#{item.pids},
#{item.projectIncr},
#{item.projectTotal},
#{item.unClosedTotal},
#{item.closedTotal},
#{item.closedIncr},
'0',
0,
#{createdBy},
now(),
#{createdBy},
now()
)
</foreach>
</insert>
<delete id="deleteByDateIdAndCustomerId">
delete from screen_project_quantity_org_monthly
where customer_id = #{customerId}
and date_id = #{monthId}
</delete>
</mapper>
Loading…
Cancel
Save