Browse Source

议题附表

dev_shibei_match
zxc 5 years ago
parent
commit
42550f5ba1
  1. 25
      epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/extract/form/ExtractFormDTO.java
  2. 29
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/controller/FactOriginController.java
  3. 12
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/IssueExtractService.java
  4. 16
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/impl/IssueExtractServiceImpl.java

25
epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/extract/form/ExtractFormDTO.java

@ -0,0 +1,25 @@
package com.epmet.dto.extract.form;
import com.epmet.commons.tools.validator.group.CustomerClientShowGroup;
import lombok.Data;
import javax.validation.constraints.NotBlank;
import java.io.Serializable;
/**
* @Author zxc
* @DateTime 2020/9/16 6:01 下午
*/
@Data
public class ExtractFormDTO implements Serializable {
private static final long serialVersionUID = -6180252151765854242L;
public interface ExtractForm extends CustomerClientShowGroup{}
@NotBlank(message = "客户ID不能为空",groups = ExtractForm.class)
private String customerId;
@NotBlank(message = "dateId不能为空",groups = ExtractForm.class)
private String dateId;
}

29
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/controller/FactOriginController.java

@ -1,11 +1,14 @@
package com.epmet.controller;
import com.epmet.commons.tools.utils.Result;
import com.epmet.commons.tools.validator.ValidatorUtils;
import com.epmet.dto.extract.form.ExtractFormDTO;
import com.epmet.service.evaluationindex.extract.IssueExtractService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import com.epmet.service.evaluationindex.extract.FactOriginTopicMainDailyService;
import org.apache.commons.lang3.StringUtils;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
@ -26,19 +29,29 @@ public class FactOriginController {
@Autowired
private FactOriginTopicMainDailyService factOriginTopicMainDailyService;
/**
* @Description 议题抽取(main)
* @param extractFormDTO
* @author zxc
* @date 2020/9/15 2:02 下午
*/
@PostMapping("issueextractmain")
public Result issueExtractMain(){
String customerId = "3ef7e4bb195eb9e622d68b52509aa940";
String dateId = "20200811";
issueExtractService.issueExtractMain(customerId,dateId);
public Result issueExtractMain(@RequestBody ExtractFormDTO extractFormDTO){
ValidatorUtils.validateEntity(extractFormDTO, ExtractFormDTO.ExtractForm.class);
issueExtractService.issueExtractMain(extractFormDTO);
return new Result();
}
/**
* @Description 议题抽取(log)
* @param extractFormDTO
* @author zxc
* @date 2020/9/16 9:41 上午
*/
@PostMapping("issueextractlog")
public Result issueExtractLog(){
String customerId = "3ef7e4bb195eb9e622d68b52509aa940";
String dateId = "20200811";
issueExtractService.issueExtractLog(customerId,dateId);
public Result issueExtractLog(@RequestBody ExtractFormDTO extractFormDTO){
ValidatorUtils.validateEntity(extractFormDTO, ExtractFormDTO.ExtractForm.class);
issueExtractService.issueExtractLog(extractFormDTO);
return new Result();
}

12
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/IssueExtractService.java

@ -1,5 +1,7 @@
package com.epmet.service.evaluationindex.extract;
import com.epmet.dto.extract.form.ExtractFormDTO;
/**
* @Author zxc
* @DateTime 2020/9/14 5:07 下午
@ -8,19 +10,17 @@ public interface IssueExtractService {
/**
* @Description 议题抽取(main)
* @param customerId
* @param dateId
* @param extractFormDTO
* @author zxc
* @date 2020/9/15 2:02 下午
*/
Boolean issueExtractMain(String customerId, String dateId);
Boolean issueExtractMain(ExtractFormDTO extractFormDTO);
/**
* @Description 议题抽取(log)
* @param customerId
* @param dateId
* @param extractFormDTO
* @author zxc
* @date 2020/9/16 9:41 上午
*/
Boolean issueExtractLog(String customerId,String dateId);
Boolean issueExtractLog(ExtractFormDTO extractFormDTO);
}

16
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/impl/IssueExtractServiceImpl.java

@ -8,6 +8,7 @@ import com.epmet.constant.ExtractConstant;
import com.epmet.dao.evaluationindex.extract.FactOriginIssueLogDailyDao;
import com.epmet.dao.evaluationindex.extract.FactOriginIssueMainDailyDao;
import com.epmet.dao.stats.DimAgencyDao;
import com.epmet.dto.extract.form.ExtractFormDTO;
import com.epmet.dto.extract.form.IssueLogDailyFormDTO;
import com.epmet.dto.extract.form.IssueMainDailyFormDTO;
import com.epmet.dto.extract.result.SatisfactionInfoResultDTO;
@ -25,6 +26,7 @@ import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.util.CollectionUtils;
import javax.validation.constraints.NotBlank;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
@ -53,13 +55,14 @@ public class IssueExtractServiceImpl implements IssueExtractService {
/**
* @Description 议题抽取
* @param customerId
* @param dateId
* @param extractFormDTO
* @author zxc
* @date 2020/9/15 2:02 下午
*/
@Override
public Boolean issueExtractMain(String customerId, String dateId) {
public Boolean issueExtractMain(ExtractFormDTO extractFormDTO) {
String customerId = extractFormDTO.getCustomerId();
String dateId = extractFormDTO.getDateId();
// 1. 议题信息查询
List<IssueInfoResultDTO> listResult = issueService.selectIssueInfo(customerId, dateId);
List<IssueMainDailyFormDTO> result = new ArrayList<>();
@ -147,13 +150,14 @@ public class IssueExtractServiceImpl implements IssueExtractService {
/**
* @Description 议题抽取(log)
* @param customerId
* @param dateId
* @param extractFormDTO
* @author zxc
* @date 2020/9/16 9:41 上午
*/
@Override
public Boolean issueExtractLog(String customerId, String dateId) {
public Boolean issueExtractLog(ExtractFormDTO extractFormDTO) {
String customerId = extractFormDTO.getCustomerId();
String dateId = extractFormDTO.getDateId();
List<IssueLogDailyFormDTO> result = new ArrayList<>();
// 1. 查询议题process
List<IssueProcessInfoResultDTO> listResult = issueService.selectIssueProcessInfo(customerId, dateId);

Loading…
Cancel
Save