Browse Source

工作日志查询接口测试

dev_shibei_match
yinzuomei 5 years ago
parent
commit
1b8869550f
  1. 3
      epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/controller/screen/GrassrootsPartyDevController.java
  2. 8
      epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/controller/screen/ScreenProjectController.java
  3. 3
      epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/plugins/impl/ScreenCustomerWorkRecordDictServiceImpl.java
  4. 4
      epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/plugins/impl/ScreenWorkRecordOrgDailyServiceImpl.java
  5. 3
      epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/plugins/impl/ScreenWorkRecordOrgMonthlyServiceImpl.java

3
epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/controller/screen/GrassrootsPartyDevController.java

@ -10,6 +10,7 @@ import com.epmet.evaluationindex.screen.dto.result.BranchBuildRankResultDTO;
import com.epmet.evaluationindex.screen.dto.result.BranchBuildTrendResultDTO; import com.epmet.evaluationindex.screen.dto.result.BranchBuildTrendResultDTO;
import com.epmet.evaluationindex.screen.dto.result.PartymemberAgeDistributionResultDTO; import com.epmet.evaluationindex.screen.dto.result.PartymemberAgeDistributionResultDTO;
import com.epmet.evaluationindex.screen.dto.result.PartymemberPercentResultDTO; import com.epmet.evaluationindex.screen.dto.result.PartymemberPercentResultDTO;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*; import org.springframework.web.bind.annotation.*;
@ -19,6 +20,7 @@ import org.springframework.web.bind.annotation.*;
* @author yinzuomei@elink-cn.com * @author yinzuomei@elink-cn.com
* @date 2020/8/18 10:11 * @date 2020/8/18 10:11
*/ */
@Slf4j
@RestController @RestController
@RequestMapping("/screen/grassrootspartydev") @RequestMapping("/screen/grassrootspartydev")
public class GrassrootsPartyDevController { public class GrassrootsPartyDevController {
@ -50,6 +52,7 @@ public class GrassrootsPartyDevController {
**/ **/
@PostMapping("ageinfo") @PostMapping("ageinfo")
public Result<PartymemberAgeDistributionResultDTO> ageInfo(@RequestBody ParymemberFormDTO param,@RequestHeader("CustomerId") String customerId){ public Result<PartymemberAgeDistributionResultDTO> ageInfo(@RequestBody ParymemberFormDTO param,@RequestHeader("CustomerId") String customerId){
log.info("CustomerId"+customerId);
ValidatorUtils.validateEntity(param, ParymemberFormDTO.Parymember.class); ValidatorUtils.validateEntity(param, ParymemberFormDTO.Parymember.class);
return new Result<PartymemberAgeDistributionResultDTO>().ok(grassrootsPartyDevService.partymemberAgeDistribution(param,customerId)); return new Result<PartymemberAgeDistributionResultDTO>().ok(grassrootsPartyDevService.partymemberAgeDistribution(param,customerId));
} }

8
epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/controller/screen/ScreenProjectController.java

@ -3,13 +3,13 @@ package com.epmet.datareport.controller.screen;
import com.epmet.commons.tools.utils.Result; import com.epmet.commons.tools.utils.Result;
import com.epmet.commons.tools.validator.ValidatorUtils; import com.epmet.commons.tools.validator.ValidatorUtils;
import com.epmet.datareport.service.evaluationindex.screen.ScreenProjectService; import com.epmet.datareport.service.evaluationindex.screen.ScreenProjectService;
import com.epmet.evaluationindex.screen.dto.form.ScreenProjectDetailFormDTO;
import com.epmet.evaluationindex.screen.dto.form.ScreenProjectDistributionFormDTO;
import com.epmet.dto.form.screen.CategoryAnalysisFormDTO; import com.epmet.dto.form.screen.CategoryAnalysisFormDTO;
import com.epmet.dto.result.screen.CategoryAnalysisResultDTO; import com.epmet.dto.result.screen.CategoryAnalysisResultDTO;
import com.epmet.evaluationindex.screen.dto.form.ProjectDetailFormDTO; import com.epmet.evaluationindex.screen.dto.form.ProjectDetailFormDTO;
import com.epmet.evaluationindex.screen.dto.form.ScreenProjectDetailFormDTO;
import com.epmet.evaluationindex.screen.dto.form.ScreenProjectDistributionFormDTO;
import com.epmet.evaluationindex.screen.dto.result.ProjectDetailResultDTO; import com.epmet.evaluationindex.screen.dto.result.ProjectDetailResultDTO;
import oracle.jdbc.proxy.annotation.Post; import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang3.StringUtils; import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*; import org.springframework.web.bind.annotation.*;
@ -22,6 +22,7 @@ import java.util.List;
* @author yinzuomei@elink-cn.com * @author yinzuomei@elink-cn.com
* @date 2020/8/18 10:16 * @date 2020/8/18 10:16
*/ */
@Slf4j
@RestController @RestController
@RequestMapping("/screen/project") @RequestMapping("/screen/project")
public class ScreenProjectController { public class ScreenProjectController {
@ -71,6 +72,7 @@ public class ScreenProjectController {
@PostMapping("category-analysis") @PostMapping("category-analysis")
public Result<List<CategoryAnalysisResultDTO>> categoryAnalysis(@RequestHeader("CustomerId") String customerId, public Result<List<CategoryAnalysisResultDTO>> categoryAnalysis(@RequestHeader("CustomerId") String customerId,
@RequestBody CategoryAnalysisFormDTO formDTO) { @RequestBody CategoryAnalysisFormDTO formDTO) {
log.info("===================customerId"+customerId);
ValidatorUtils.validateEntity(formDTO, CategoryAnalysisFormDTO.CategoryAnalysis.class); ValidatorUtils.validateEntity(formDTO, CategoryAnalysisFormDTO.CategoryAnalysis.class);
return new Result<List<CategoryAnalysisResultDTO>>().ok(screenProjectService.categoryAnalysis(customerId, formDTO)); return new Result<List<CategoryAnalysisResultDTO>>().ok(screenProjectService.categoryAnalysis(customerId, formDTO));
} }

3
epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/plugins/impl/ScreenCustomerWorkRecordDictServiceImpl.java

@ -19,10 +19,12 @@ package com.epmet.datareport.service.plugins.impl;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage; 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.mybatis.service.impl.BaseServiceImpl;
import com.epmet.commons.tools.constant.FieldConstant; import com.epmet.commons.tools.constant.FieldConstant;
import com.epmet.commons.tools.page.PageData; import com.epmet.commons.tools.page.PageData;
import com.epmet.commons.tools.utils.ConvertUtils; import com.epmet.commons.tools.utils.ConvertUtils;
import com.epmet.constant.DataSourceConstant;
import com.epmet.datareport.dao.plugins.ScreenCustomerWorkRecordDictDao; import com.epmet.datareport.dao.plugins.ScreenCustomerWorkRecordDictDao;
import com.epmet.datareport.entity.plugins.ScreenCustomerWorkRecordDictEntity; import com.epmet.datareport.entity.plugins.ScreenCustomerWorkRecordDictEntity;
import com.epmet.datareport.service.plugins.ScreenCustomerWorkRecordDictService; import com.epmet.datareport.service.plugins.ScreenCustomerWorkRecordDictService;
@ -44,6 +46,7 @@ import java.util.Map;
*/ */
@Slf4j @Slf4j
@Service @Service
@DataSource(DataSourceConstant.EVALUATION_INDEX)
public class ScreenCustomerWorkRecordDictServiceImpl extends BaseServiceImpl<ScreenCustomerWorkRecordDictDao, ScreenCustomerWorkRecordDictEntity> implements ScreenCustomerWorkRecordDictService { public class ScreenCustomerWorkRecordDictServiceImpl extends BaseServiceImpl<ScreenCustomerWorkRecordDictDao, ScreenCustomerWorkRecordDictEntity> implements ScreenCustomerWorkRecordDictService {
@Override @Override

4
epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/plugins/impl/ScreenWorkRecordOrgDailyServiceImpl.java

@ -60,6 +60,7 @@ import java.util.stream.Collectors;
*/ */
@Slf4j @Slf4j
@Service @Service
@DataSource(DataSourceConstant.EVALUATION_INDEX)
public class ScreenWorkRecordOrgDailyServiceImpl extends BaseServiceImpl<ScreenWorkRecordOrgDailyDao, ScreenWorkRecordOrgDailyEntity> implements ScreenWorkRecordOrgDailyService { public class ScreenWorkRecordOrgDailyServiceImpl extends BaseServiceImpl<ScreenWorkRecordOrgDailyDao, ScreenWorkRecordOrgDailyEntity> implements ScreenWorkRecordOrgDailyService {
@Autowired @Autowired
private AgencyService agencyService; private AgencyService agencyService;
@ -122,6 +123,7 @@ public class ScreenWorkRecordOrgDailyServiceImpl extends BaseServiceImpl<ScreenW
baseDao.deleteBatchIds(Arrays.asList(ids)); baseDao.deleteBatchIds(Arrays.asList(ids));
} }
@DataSource(value = DataSourceConstant.EVALUATION_INDEX,datasourceNameFromArg = true)
@Override @Override
public WorkRecordRankResultDTO rankList(WorkRecordRankFormDTO formDTO) { public WorkRecordRankResultDTO rankList(WorkRecordRankFormDTO formDTO) {
////todo 待完善 直属网格是否显示? ////todo 待完善 直属网格是否显示?
@ -149,7 +151,7 @@ public class ScreenWorkRecordOrgDailyServiceImpl extends BaseServiceImpl<ScreenW
* @author sun * @author sun
*/ */
@Override @Override
@DataSource(DataSourceConstant.STATS_DISPLAY) @DataSource(value = DataSourceConstant.EVALUATION_INDEX,datasourceNameFromArg = true)
public WorkRecordTrendResultDTO trend(WorkRecordTrendFormDTO formDTO) { public WorkRecordTrendResultDTO trend(WorkRecordTrendFormDTO formDTO) {
WorkRecordTrendResultDTO resultDTO = new WorkRecordTrendResultDTO(); WorkRecordTrendResultDTO resultDTO = new WorkRecordTrendResultDTO();

3
epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/plugins/impl/ScreenWorkRecordOrgMonthlyServiceImpl.java

@ -19,10 +19,12 @@ package com.epmet.datareport.service.plugins.impl;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage; 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.mybatis.service.impl.BaseServiceImpl;
import com.epmet.commons.tools.constant.FieldConstant; import com.epmet.commons.tools.constant.FieldConstant;
import com.epmet.commons.tools.page.PageData; import com.epmet.commons.tools.page.PageData;
import com.epmet.commons.tools.utils.ConvertUtils; import com.epmet.commons.tools.utils.ConvertUtils;
import com.epmet.constant.DataSourceConstant;
import com.epmet.datareport.dao.plugins.ScreenWorkRecordOrgMonthlyDao; import com.epmet.datareport.dao.plugins.ScreenWorkRecordOrgMonthlyDao;
import com.epmet.datareport.entity.plugins.ScreenWorkRecordOrgMonthlyEntity; import com.epmet.datareport.entity.plugins.ScreenWorkRecordOrgMonthlyEntity;
import com.epmet.datareport.service.plugins.ScreenWorkRecordOrgMonthlyService; import com.epmet.datareport.service.plugins.ScreenWorkRecordOrgMonthlyService;
@ -44,6 +46,7 @@ import java.util.Map;
*/ */
@Slf4j @Slf4j
@Service @Service
@DataSource(DataSourceConstant.EVALUATION_INDEX)
public class ScreenWorkRecordOrgMonthlyServiceImpl extends BaseServiceImpl<ScreenWorkRecordOrgMonthlyDao, ScreenWorkRecordOrgMonthlyEntity> implements ScreenWorkRecordOrgMonthlyService { public class ScreenWorkRecordOrgMonthlyServiceImpl extends BaseServiceImpl<ScreenWorkRecordOrgMonthlyDao, ScreenWorkRecordOrgMonthlyEntity> implements ScreenWorkRecordOrgMonthlyService {
@Override @Override

Loading…
Cancel
Save