Browse Source

Merge branch 'develop' into release_temp

master
sunyuchao 4 years ago
parent
commit
6273242512
  1. 6
      epmet-module/data-aggregator/data-aggregator-client/pom.xml
  2. 4
      epmet-module/data-aggregator/data-aggregator-client/src/main/java/com/epmet/dataaggre/constant/DataSourceConstant.java
  3. 29
      epmet-module/data-aggregator/data-aggregator-client/src/main/java/com/epmet/dataaggre/dto/epmettduck/AcUserAuthorizeDTO.java
  4. 27
      epmet-module/data-aggregator/data-aggregator-client/src/main/java/com/epmet/dataaggre/dto/epmettduck/AcUserDTO.java
  5. 19
      epmet-module/data-aggregator/data-aggregator-client/src/main/java/com/epmet/dataaggre/dto/epmettduck/InputMapDTO.java
  6. 27
      epmet-module/data-aggregator/data-aggregator-client/src/main/java/com/epmet/dataaggre/dto/epmettduck/PrProjectTemplateCategoryDTO.java
  7. 26
      epmet-module/data-aggregator/data-aggregator-client/src/main/java/com/epmet/dataaggre/dto/epmettduck/PrProjectTemplateDTO.java
  8. 26
      epmet-module/data-aggregator/data-aggregator-client/src/main/java/com/epmet/dataaggre/dto/epmettduck/PrProjectTemplateItemDTO.java
  9. 25
      epmet-module/data-aggregator/data-aggregator-client/src/main/java/com/epmet/dataaggre/dto/epmettduck/PrProjectThemeDTO.java
  10. 27
      epmet-module/data-aggregator/data-aggregator-client/src/main/java/com/epmet/dataaggre/dto/epmettduck/PrPublishRangeDTO.java
  11. 27
      epmet-module/data-aggregator/data-aggregator-client/src/main/java/com/epmet/dataaggre/dto/epmettduck/PrResultExtDTO.java
  12. 25
      epmet-module/data-aggregator/data-aggregator-client/src/main/java/com/epmet/dataaggre/dto/epmettduck/PrUserProjectDTO.java
  13. 26
      epmet-module/data-aggregator/data-aggregator-client/src/main/java/com/epmet/dataaggre/dto/epmettduck/PrUserProjectItemDTO.java
  14. 24
      epmet-module/data-aggregator/data-aggregator-client/src/main/java/com/epmet/dataaggre/dto/epmettduck/PrUserProjectLogicDTO.java
  15. 24
      epmet-module/data-aggregator/data-aggregator-client/src/main/java/com/epmet/dataaggre/dto/epmettduck/PrUserProjectResultDTO.java
  16. 26
      epmet-module/data-aggregator/data-aggregator-client/src/main/java/com/epmet/dataaggre/dto/epmettduck/PrUserProjectSettingDTO.java
  17. 26
      epmet-module/data-aggregator/data-aggregator-client/src/main/java/com/epmet/dataaggre/dto/epmettduck/PrUserProjectThemeDTO.java
  18. 27
      epmet-module/data-aggregator/data-aggregator-client/src/main/java/com/epmet/dataaggre/dto/epmettduck/PrVistRecordDTO.java
  19. 75
      epmet-module/data-aggregator/data-aggregator-client/src/main/java/com/epmet/dataaggre/dto/epmettduck/ProjectItemTypeEnum.java
  20. 26
      epmet-module/data-aggregator/data-aggregator-client/src/main/java/com/epmet/dataaggre/dto/epmettduck/WxMpUserDTO.java
  21. 32
      epmet-module/data-aggregator/data-aggregator-client/src/main/java/com/epmet/dataaggre/dto/epmettduck/form/ItemResDetailFormDTO.java
  22. 5
      epmet-module/data-aggregator/data-aggregator-client/src/main/java/com/epmet/dataaggre/dto/epmettduck/form/ProjectKeyCommonDTO.java
  23. 31
      epmet-module/data-aggregator/data-aggregator-client/src/main/java/com/epmet/dataaggre/dto/epmettduck/form/TDuckDetailFormDTO.java
  24. 23
      epmet-module/data-aggregator/data-aggregator-client/src/main/java/com/epmet/dataaggre/dto/epmettduck/form/TDuckHeaderInfoFormDTO.java
  25. 40
      epmet-module/data-aggregator/data-aggregator-client/src/main/java/com/epmet/dataaggre/dto/epmettduck/form/TDuckListFormDTO.java
  26. 68
      epmet-module/data-aggregator/data-aggregator-client/src/main/java/com/epmet/dataaggre/dto/epmettduck/result/AnalysisReportResDTO.java
  27. 39
      epmet-module/data-aggregator/data-aggregator-client/src/main/java/com/epmet/dataaggre/dto/epmettduck/result/CascaderDTO.java
  28. 27
      epmet-module/data-aggregator/data-aggregator-client/src/main/java/com/epmet/dataaggre/dto/epmettduck/result/ConcatTableHeaderDTO.java
  29. 24
      epmet-module/data-aggregator/data-aggregator-client/src/main/java/com/epmet/dataaggre/dto/epmettduck/result/GetRangeResultDTO.java
  30. 25
      epmet-module/data-aggregator/data-aggregator-client/src/main/java/com/epmet/dataaggre/dto/epmettduck/result/ItemResDetailConcatResultDTO.java
  31. 29
      epmet-module/data-aggregator/data-aggregator-client/src/main/java/com/epmet/dataaggre/dto/epmettduck/result/OptionDTO.java
  32. 96
      epmet-module/data-aggregator/data-aggregator-client/src/main/java/com/epmet/dataaggre/dto/epmettduck/result/TDuckListResultDTO.java
  33. 50
      epmet-module/data-aggregator/data-aggregator-client/src/main/java/com/epmet/dataaggre/dto/epmettduck/struct/CascaderExpandStruct.java
  34. 45
      epmet-module/data-aggregator/data-aggregator-client/src/main/java/com/epmet/dataaggre/dto/epmettduck/struct/CheckboxExpandStruct.java
  35. 14
      epmet-module/data-aggregator/data-aggregator-client/src/main/java/com/epmet/dataaggre/dto/epmettduck/struct/ColorExpandStruct.java
  36. 20
      epmet-module/data-aggregator/data-aggregator-client/src/main/java/com/epmet/dataaggre/dto/epmettduck/struct/DateExpandStruct.java
  37. 14
      epmet-module/data-aggregator/data-aggregator-client/src/main/java/com/epmet/dataaggre/dto/epmettduck/struct/DateRangeExpandStruct.java
  38. 24
      epmet-module/data-aggregator/data-aggregator-client/src/main/java/com/epmet/dataaggre/dto/epmettduck/struct/DescTextExpandStruct.java
  39. 15
      epmet-module/data-aggregator/data-aggregator-client/src/main/java/com/epmet/dataaggre/dto/epmettduck/struct/DividerExpandStruct.java
  40. 10
      epmet-module/data-aggregator/data-aggregator-client/src/main/java/com/epmet/dataaggre/dto/epmettduck/struct/EmptyExpandStruct.java
  41. 25
      epmet-module/data-aggregator/data-aggregator-client/src/main/java/com/epmet/dataaggre/dto/epmettduck/struct/ImageCarouselExpandStruct.java
  42. 12
      epmet-module/data-aggregator/data-aggregator-client/src/main/java/com/epmet/dataaggre/dto/epmettduck/struct/ImageExpandStruct.java
  43. 31
      epmet-module/data-aggregator/data-aggregator-client/src/main/java/com/epmet/dataaggre/dto/epmettduck/struct/ImageSelectExpandStruct.java
  44. 36
      epmet-module/data-aggregator/data-aggregator-client/src/main/java/com/epmet/dataaggre/dto/epmettduck/struct/InputExpandStruct.java
  45. 21
      epmet-module/data-aggregator/data-aggregator-client/src/main/java/com/epmet/dataaggre/dto/epmettduck/struct/ItemDefaultValueStruct.java
  46. 38
      epmet-module/data-aggregator/data-aggregator-client/src/main/java/com/epmet/dataaggre/dto/epmettduck/struct/NumberExpandStruct.java
  47. 13
      epmet-module/data-aggregator/data-aggregator-client/src/main/java/com/epmet/dataaggre/dto/epmettduck/struct/PaginationExpandStruct.java
  48. 31
      epmet-module/data-aggregator/data-aggregator-client/src/main/java/com/epmet/dataaggre/dto/epmettduck/struct/RadioExpandStruct.java
  49. 35
      epmet-module/data-aggregator/data-aggregator-client/src/main/java/com/epmet/dataaggre/dto/epmettduck/struct/RateExpandStruct.java
  50. 48
      epmet-module/data-aggregator/data-aggregator-client/src/main/java/com/epmet/dataaggre/dto/epmettduck/struct/SelectExpandStruct.java
  51. 19
      epmet-module/data-aggregator/data-aggregator-client/src/main/java/com/epmet/dataaggre/dto/epmettduck/struct/SignPadExpandStruct.java
  52. 35
      epmet-module/data-aggregator/data-aggregator-client/src/main/java/com/epmet/dataaggre/dto/epmettduck/struct/SliderExpandStruct.java
  53. 14
      epmet-module/data-aggregator/data-aggregator-client/src/main/java/com/epmet/dataaggre/dto/epmettduck/struct/SwitchExpandStruct.java
  54. 27
      epmet-module/data-aggregator/data-aggregator-client/src/main/java/com/epmet/dataaggre/dto/epmettduck/struct/TextareaExpandStruct.java
  55. 14
      epmet-module/data-aggregator/data-aggregator-client/src/main/java/com/epmet/dataaggre/dto/epmettduck/struct/TimeExpandStruct.java
  56. 14
      epmet-module/data-aggregator/data-aggregator-client/src/main/java/com/epmet/dataaggre/dto/epmettduck/struct/TimeRangeExpandStruct.java
  57. 53
      epmet-module/data-aggregator/data-aggregator-client/src/main/java/com/epmet/dataaggre/dto/epmettduck/struct/UploadExpandStruct.java
  58. 22
      epmet-module/data-aggregator/data-aggregator-client/src/main/java/com/epmet/dataaggre/dto/epmettduck/struct/UploadResultStruct.java
  59. 4
      epmet-module/data-aggregator/data-aggregator-client/src/main/java/com/epmet/dataaggre/dto/govorg/form/SubOrgFormDTO.java
  60. 21
      epmet-module/data-aggregator/data-aggregator-client/src/main/java/com/epmet/dataaggre/dto/govorg/result/OrgTreeResultDTO.java
  61. 103
      epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/controller/EpmetTDuckController.java
  62. 14
      epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/controller/GovOrgController.java
  63. 60
      epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/dao/epmettduck/PrUserProjectDao.java
  64. 7
      epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/dao/epmettduck/PrVistRecordDao.java
  65. 11
      epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/dao/govorg/CustomerAgencyDao.java
  66. 10
      epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/entity/epmettduck/AcUserAuthorizeEntity.java
  67. 14
      epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/entity/epmettduck/AcUserEntity.java
  68. 13
      epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/entity/epmettduck/PrProjectTemplateCategoryEntity.java
  69. 9
      epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/entity/epmettduck/PrProjectTemplateEntity.java
  70. 10
      epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/entity/epmettduck/PrProjectTemplateItemEntity.java
  71. 10
      epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/entity/epmettduck/PrProjectThemeEntity.java
  72. 15
      epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/entity/epmettduck/PrPublishRangeEntity.java
  73. 15
      epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/entity/epmettduck/PrResultExtEntity.java
  74. 18
      epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/entity/epmettduck/PrUserProjectEntity.java
  75. 61
      epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/entity/epmettduck/PrUserProjectItemEntity.java
  76. 10
      epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/entity/epmettduck/PrUserProjectLogicEntity.java
  77. 10
      epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/entity/epmettduck/PrUserProjectResultEntity.java
  78. 10
      epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/entity/epmettduck/PrUserProjectSettingEntity.java
  79. 10
      epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/entity/epmettduck/PrUserProjectThemeEntity.java
  80. 15
      epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/entity/epmettduck/PrVistRecordEntity.java
  81. 10
      epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/entity/epmettduck/WxMpUserEntity.java
  82. 9
      epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/epmettduck/PrPublishRangeService.java
  83. 83
      epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/epmettduck/PrUserProjectItemService.java
  84. 63
      epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/epmettduck/PrUserProjectService.java
  85. 8
      epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/epmettduck/impl/AcUserAuthorizeServiceImpl.java
  86. 8
      epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/epmettduck/impl/AcUserServiceImpl.java
  87. 5
      epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/epmettduck/impl/PrProjectTemplateCategoryServiceImpl.java
  88. 8
      epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/epmettduck/impl/PrProjectTemplateItemServiceImpl.java
  89. 8
      epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/epmettduck/impl/PrProjectTemplateServiceImpl.java
  90. 8
      epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/epmettduck/impl/PrProjectThemeServiceImpl.java
  91. 31
      epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/epmettduck/impl/PrPublishRangeServiceImpl.java
  92. 8
      epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/epmettduck/impl/PrResultExtServiceImpl.java
  93. 88
      epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/epmettduck/impl/PrUserProjectItemServiceImpl.java
  94. 8
      epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/epmettduck/impl/PrUserProjectLogicServiceImpl.java
  95. 8
      epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/epmettduck/impl/PrUserProjectResultServiceImpl.java
  96. 565
      epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/epmettduck/impl/PrUserProjectServiceImpl.java
  97. 8
      epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/epmettduck/impl/PrUserProjectSettingServiceImpl.java
  98. 8
      epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/epmettduck/impl/PrUserProjectThemeServiceImpl.java
  99. 8
      epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/epmettduck/impl/PrVistRecordServiceImpl.java
  100. 8
      epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/epmettduck/impl/WxMpUserServiceImpl.java

6
epmet-module/data-aggregator/data-aggregator-client/pom.xml

@ -17,6 +17,12 @@
<artifactId>epmet-commons-tools</artifactId>
<version>2.0.0</version>
</dependency>
<dependency>
<groupId>com.baomidou</groupId>
<artifactId>mybatis-plus-annotation</artifactId>
<version>3.2.0</version>
<scope>compile</scope>
</dependency>
</dependencies>
</project>

4
epmet-module/data-aggregator/data-aggregator-client/src/main/java/com/epmet/dataaggre/constant/DataSourceConstant.java

@ -32,5 +32,9 @@ public interface DataSourceConstant {
String EVALUATION_INDEX = "evaluationIndex";
String OPERCUSTOMIZE="opercustomize";
String EPMET_MESSAGE="epmetmessage";
String EPMET_T_DUCK = "epmettduck";
String EPMETTDUCK="epmettduck";
}

29
epmet-module/data-aggregator/data-aggregator-client/src/main/java/com/epmet/dataaggre/dto/epmettduck/AcUserAuthorizeDTO.java

@ -51,14 +51,35 @@ public class AcUserAuthorizeDTO implements Serializable {
*/
private String userInfo;
/**
*
* 删除标识 1删除0未删除
*/
private Date createTime;
private String delFlag;
/**
*
* 乐观锁
*/
private Integer revision;
/**
* 创建人
*/
private String createdBy;
/**
* 创建时间
*/
private Date createdTime;
/**
* 更新人
*/
private String updatedBy;
/**
* 更新时间
*/
private Date updateTime;
private Date updatedTime;
}

27
epmet-module/data-aggregator/data-aggregator-client/src/main/java/com/epmet/dataaggre/dto/epmettduck/AcUserDTO.java

@ -89,18 +89,33 @@ public class AcUserDTO implements Serializable {
private String lastLoginIp;
/**
* 状态
* 删除标识 1删除0未删除
*/
private Integer deleted;
private String delFlag;
/**
*
* 乐观锁
*/
private Date createTime;
private Integer revision;
/**
*
* 创建人
*/
private String createdBy;
/**
* 创建时间
*/
private Date createdTime;
/**
* 更新人
*/
private String updatedBy;
/**
* 更新时间
*/
private Date updateTime;
private Date updatedTime;
}

19
epmet-module/data-aggregator/data-aggregator-client/src/main/java/com/epmet/dataaggre/dto/epmettduck/InputMapDTO.java

@ -0,0 +1,19 @@
package com.epmet.dataaggre.dto.epmettduck;
import lombok.Data;
import java.io.Serializable;
import java.math.BigDecimal;
/**
* @Description TODO
* @Author yinzuomei
* @Date 2021/9/16 11:34 下午
*/
@Data
public class InputMapDTO implements Serializable {
private BigDecimal longitude;
private BigDecimal latitude;
private String address;
}

27
epmet-module/data-aggregator/data-aggregator-client/src/main/java/com/epmet/dataaggre/dto/epmettduck/PrProjectTemplateCategoryDTO.java

@ -36,7 +36,7 @@ public class PrProjectTemplateCategoryDTO implements Serializable {
/**
*
*/
private Long id;
private String id;
/**
* 客户Id
@ -54,13 +54,32 @@ public class PrProjectTemplateCategoryDTO implements Serializable {
private Integer sort;
/**
* 更新时间
* 删除标识 1删除0未删除
*/
private String delFlag;
/**
* 乐观锁
*/
private Integer revision;
/**
* 创建人
*/
private Date updateTime;
private String createdBy;
/**
* 创建时间
*/
private Date createTime;
private Date createdTime;
/**
* 更新人
*/
private String updatedBy;
/**
* 更新时间
*/
private Date updatedTime;
}

26
epmet-module/data-aggregator/data-aggregator-client/src/main/java/com/epmet/dataaggre/dto/epmettduck/PrProjectTemplateDTO.java

@ -79,13 +79,33 @@ public class PrProjectTemplateDTO implements Serializable {
private Integer status;
/**
* 更新时间
* 删除标识 1删除0未删除
*/
private String delFlag;
/**
* 乐观锁
*/
private Integer revision;
/**
* 创建人
*/
private Date updateTime;
private String createdBy;
/**
* 创建时间
*/
private Date createTime;
private Date createdTime;
/**
* 更新人
*/
private String updatedBy;
/**
* 更新时间
*/
private Date updatedTime;
}

26
epmet-module/data-aggregator/data-aggregator-client/src/main/java/com/epmet/dataaggre/dto/epmettduck/PrProjectTemplateItemDTO.java

@ -104,14 +104,34 @@ public class PrProjectTemplateItemDTO implements Serializable {
private String regList;
/**
* 更新时间
* 删除标识 1删除0未删除
*/
private String delFlag;
/**
* 乐观锁
*/
private Integer revision;
/**
* 创建人
*/
private Date updateTime;
private String createdBy;
/**
* 创建时间
*/
private Date createTime;
private Date createdTime;
/**
* 更新人
*/
private String updatedBy;
/**
* 更新时间
*/
private Date updatedTime;
/**
* 展示类型组件

25
epmet-module/data-aggregator/data-aggregator-client/src/main/java/com/epmet/dataaggre/dto/epmettduck/PrProjectThemeDTO.java

@ -70,13 +70,32 @@ public class PrProjectThemeDTO implements Serializable {
private String btnsColor;
/**
* 更新时间
* 删除标识 1删除0未删除
*/
private String delFlag;
/**
* 乐观锁
*/
private Integer revision;
/**
* 创建人
*/
private Date updateTime;
private String createdBy;
/**
* 创建时间
*/
private Date createTime;
private Date createdTime;
/**
* 更新人
*/
private String updatedBy;
/**
* 更新时间
*/
private Date updatedTime;
}

27
epmet-module/data-aggregator/data-aggregator-client/src/main/java/com/epmet/dataaggre/dto/epmettduck/PrPublishRangeDTO.java

@ -64,18 +64,33 @@ public class PrPublishRangeDTO implements Serializable {
private String orgType;
/**
* 状态
* 删除标识 1删除0未删除
*/
private Integer deleted;
private String delFlag;
/**
*
* 乐观锁
*/
private Date createTime;
private Integer revision;
/**
*
* 创建人
*/
private String createdBy;
/**
* 创建时间
*/
private Date createdTime;
/**
* 更新人
*/
private String updatedBy;
/**
* 更新时间
*/
private Date updateTime;
private Date updatedTime;
}

27
epmet-module/data-aggregator/data-aggregator-client/src/main/java/com/epmet/dataaggre/dto/epmettduck/PrResultExtDTO.java

@ -69,18 +69,33 @@ public class PrResultExtDTO implements Serializable {
private String fromOrgType;
/**
* 状态
* 删除标识 1删除0未删除
*/
private Integer deleted;
private String delFlag;
/**
*
* 乐观锁
*/
private Date createTime;
private Integer revision;
/**
*
* 创建人
*/
private String createdBy;
/**
* 创建时间
*/
private Date createdTime;
/**
* 更新人
*/
private String updatedBy;
/**
* 更新时间
*/
private Date updateTime;
private Date updatedTime;
}

25
epmet-module/data-aggregator/data-aggregator-client/src/main/java/com/epmet/dataaggre/dto/epmettduck/PrUserProjectDTO.java

@ -89,18 +89,33 @@ public class PrUserProjectDTO implements Serializable {
private String client;
/**
* 是否删除
* 删除标识 1删除0未删除
*/
private Integer isDeleted;
private String delFlag;
/**
* 更新时间
* 乐观锁
*/
private Integer revision;
/**
* 创建人
*/
private Date updateTime;
private String createdBy;
/**
* 创建时间
*/
private Date createTime;
private Date createdTime;
/**
* 更新人
*/
private String updatedBy;
/**
* 更新时间
*/
private Date updatedTime;
}

26
epmet-module/data-aggregator/data-aggregator-client/src/main/java/com/epmet/dataaggre/dto/epmettduck/PrUserProjectItemDTO.java

@ -109,13 +109,33 @@ public class PrUserProjectItemDTO implements Serializable {
private String regList;
/**
* 更新时间
* 删除标识 1删除0未删除
*/
private String delFlag;
/**
* 乐观锁
*/
private Integer revision;
/**
* 创建人
*/
private Date updateTime;
private String createdBy;
/**
* 创建时间
*/
private Date createTime;
private Date createdTime;
/**
* 更新人
*/
private String updatedBy;
/**
* 更新时间
*/
private Date updatedTime;
}

24
epmet-module/data-aggregator/data-aggregator-client/src/main/java/com/epmet/dataaggre/dto/epmettduck/PrUserProjectLogicDTO.java

@ -63,14 +63,34 @@ public class PrUserProjectLogicDTO implements Serializable {
*/
private String conditionList;
/**
* 删除标识 1删除0未删除
*/
private String delFlag;
/**
* 乐观锁
*/
private Integer revision;
/**
* 创建人
*/
private String createdBy;
/**
* 创建时间
*/
private Date createTime;
private Date createdTime;
/**
* 更新人
*/
private String updatedBy;
/**
* 更新时间
*/
private Date updateTime;
private Date updatedTime;
}

24
epmet-module/data-aggregator/data-aggregator-client/src/main/java/com/epmet/dataaggre/dto/epmettduck/PrUserProjectResultDTO.java

@ -108,14 +108,34 @@ public class PrUserProjectResultDTO implements Serializable {
*/
private String wxUserInfo;
/**
* 删除标识 1删除0未删除
*/
private String delFlag;
/**
* 乐观锁
*/
private Integer revision;
/**
* 创建人
*/
private String createdBy;
/**
* 创建时间
*/
private Date createTime;
private Date createdTime;
/**
* 更新人
*/
private String updatedBy;
/**
* 更新时间
*/
private Date updateTime;
private Date updatedTime;
}

26
epmet-module/data-aggregator/data-aggregator-client/src/main/java/com/epmet/dataaggre/dto/epmettduck/PrUserProjectSettingDTO.java

@ -154,13 +154,33 @@ public class PrUserProjectSettingDTO implements Serializable {
private String shareDesc;
/**
* 更新时间
* 删除标识 1删除0未删除
*/
private String delFlag;
/**
* 乐观锁
*/
private Integer revision;
/**
* 创建人
*/
private Date updateTime;
private String createdBy;
/**
* 创建时间
*/
private Date createTime;
private Date createdTime;
/**
* 更新人
*/
private String updatedBy;
/**
* 更新时间
*/
private Date updatedTime;
}

26
epmet-module/data-aggregator/data-aggregator-client/src/main/java/com/epmet/dataaggre/dto/epmettduck/PrUserProjectThemeDTO.java

@ -94,13 +94,33 @@ public class PrUserProjectThemeDTO implements Serializable {
private Integer showNumber;
/**
* 更新时间
* 删除标识 1删除0未删除
*/
private String delFlag;
/**
* 乐观锁
*/
private Integer revision;
/**
* 创建人
*/
private Date updateTime;
private String createdBy;
/**
* 创建时间
*/
private Date createTime;
private Date createdTime;
/**
* 更新人
*/
private String updatedBy;
/**
* 更新时间
*/
private Date updatedTime;
}

27
epmet-module/data-aggregator/data-aggregator-client/src/main/java/com/epmet/dataaggre/dto/epmettduck/PrVistRecordDTO.java

@ -59,18 +59,33 @@ public class PrVistRecordDTO implements Serializable {
private String projectKey;
/**
* 状态
* 删除标识 1删除0未删除
*/
private Integer deleted;
private String delFlag;
/**
*
* 乐观锁
*/
private Date createTime;
private Integer revision;
/**
*
* 创建人
*/
private String createdBy;
/**
* 创建时间
*/
private Date createdTime;
/**
* 更新人
*/
private String updatedBy;
/**
* 更新时间
*/
private Date updateTime;
private Date updatedTime;
}

75
epmet-module/data-aggregator/data-aggregator-client/src/main/java/com/epmet/dataaggre/dto/epmettduck/ProjectItemTypeEnum.java

@ -0,0 +1,75 @@
package com.epmet.dataaggre.dto.epmettduck;
import com.baomidou.mybatisplus.annotation.EnumValue;
import com.epmet.dataaggre.dto.epmettduck.struct.*;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonValue;
import lombok.AllArgsConstructor;
import lombok.Getter;
/**
* @Author zxc
* @DateTime 2021/9/16 2:28 下午
* @DESC
*/
@AllArgsConstructor
@Getter
public enum ProjectItemTypeEnum {
//联系人组件:
INPUT("INPUT", "单行文本", InputExpandStruct.class),
TEXTAREA("TEXTAREA", "多行文本", TextareaExpandStruct.class),
PASSWORD_INPUT("PASSWORD_INPUT", "密码输入", null),
NUMBER_INPUT("NUMBER_INPUT", "数字输入", NumberExpandStruct.class),
SELECT("SELECT", "下拉框", SelectExpandStruct.class),
CASCADER("CASCADER", "级联选择", CascaderExpandStruct.class),
RADIO("RADIO", "单选框", RadioExpandStruct.class),
CHECKBOX("CHECKBOX", "多选框", CheckboxExpandStruct.class),
SWITCH("SWITCH", "开关", SwitchExpandStruct.class),
TIME("TIME", "时间选择", TimeExpandStruct.class),
TIME_RANGE("TIME_RANGE", "时间范围", TimeRangeExpandStruct.class),
DATE("DATE", "日期选择", DateExpandStruct.class),
DATE_RANGE("DATE_RANGE", "日期范围", DateRangeExpandStruct.class),
RATE("RATE", "评分", RateExpandStruct.class),
PROVINCE_CITY("PROVINCE_CITY", "省市联动", EmptyExpandStruct.class),
INPUT_MAP("INPUT_MAP", "地理位置", EmptyExpandStruct.class),
// 以下不分析
PHONE_VERIFICATION("PHONE_VERIFICATION", "手机号验证", EmptyExpandStruct.class),
SLIDER("SLIDER", "滑块", SliderExpandStruct.class),
COLOR("COLOR", "颜色", ColorExpandStruct.class),
UPLOAD("UPLOAD", "文件上传组件", UploadExpandStruct.class),
IMAGE("IMAGE", "图片展示", ImageExpandStruct.class),
IMAGE_SELECT("IMAGE_SELECT", "图片选择", ImageSelectExpandStruct.class),
IMAGE_CAROUSEL("IMAGE_CAROUSEL", "图片轮播", ImageCarouselExpandStruct.class),
DESC_TEXT("DESC_TEXT", "文字描述", DescTextExpandStruct.class),
SIGN_PAD("SIGN_PAD", "手写签名", SignPadExpandStruct.class),
PAGINATION("PAGINATION", "分页", PaginationExpandStruct.class),
DIVIDER("DIVIDER", "分割线", DividerExpandStruct.class);
@EnumValue
@JsonValue
private String value;
private String desc;
/**
* 扩展属性类
*/
private Class expandClass;
/**
* 枚举入参注解
*
* @param value
* @return
*/
@JsonCreator
public static ProjectItemTypeEnum getByValue(String value) {
for (ProjectItemTypeEnum typeEnum : values()) {
if (typeEnum.getValue().equals(value)) {
return typeEnum;
}
}
return null;
}
}

26
epmet-module/data-aggregator/data-aggregator-client/src/main/java/com/epmet/dataaggre/dto/epmettduck/WxMpUserDTO.java

@ -94,13 +94,33 @@ public class WxMpUserDTO implements Serializable {
private String userId;
/**
* 更新时间
* 删除标识 1删除0未删除
*/
private String delFlag;
/**
* 乐观锁
*/
private Integer revision;
/**
* 创建人
*/
private Date updateTime;
private String createdBy;
/**
* 创建时间
*/
private Date createTime;
private Date createdTime;
/**
* 更新人
*/
private String updatedBy;
/**
* 更新时间
*/
private Date updatedTime;
}

32
epmet-module/data-aggregator/data-aggregator-client/src/main/java/com/epmet/dataaggre/dto/epmettduck/form/ItemResDetailFormDTO.java

@ -0,0 +1,32 @@
package com.epmet.dataaggre.dto.epmettduck.form;
import lombok.Data;
import javax.validation.constraints.NotBlank;
/**
* @Description 问卷-数据分析-查看详情
* @Author yinzuomei
* @Date 2021/9/22 1:29 下午
*/
@Data
public class ItemResDetailFormDTO extends ProjectKeyCommonDTO{
@NotBlank(message = "formItemId不能为空",groups = AddUserInternalGroup.class)
private String formItemId;
/**
* 表单项类型
*/
@NotBlank(message = "type不能为空",groups = AddUserInternalGroup.class)
private String type;
/**
* 09.22目前产品没要求分页
*/
//@NotNull(message = "pageNo不能为空",groups = AddUserInternalGroup.class)
//private Integer pageNo;
//@NotNull(message = "pageSize不能为空",groups = AddUserInternalGroup.class)
//private Integer pageSize;
}

5
epmet-module/data-aggregator/data-aggregator-client/src/main/java/com/epmet/dataaggre/dto/epmettduck/form/ProjectKeyCommonDTO.java

@ -2,6 +2,7 @@ package com.epmet.dataaggre.dto.epmettduck.form;
import lombok.Data;
import javax.validation.constraints.NotBlank;
import java.io.Serializable;
/**
@ -11,10 +12,12 @@ import java.io.Serializable;
*/
@Data
public class ProjectKeyCommonDTO implements Serializable {
public interface AddUserInternalGroup {
}
/**
* 问卷id, 对应pr_user_project.key
*/
@NotBlank(message = "projectKey不能为空",groups = AddUserInternalGroup.class)
private String projectKey;
}

31
epmet-module/data-aggregator/data-aggregator-client/src/main/java/com/epmet/dataaggre/dto/epmettduck/form/TDuckDetailFormDTO.java

@ -0,0 +1,31 @@
package com.epmet.dataaggre.dto.epmettduck.form;
import lombok.Data;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.io.Serializable;
/**
* @Author zxc
* @DateTime 2021/9/16 2:00 下午
* @DESC
*/
@Data
public class TDuckDetailFormDTO implements Serializable {
private static final long serialVersionUID = 3793280475377993346L;
public interface TDuckDetailForm{}
/**
* 项目key
*/
@NotBlank(message = "项目key不能为空",groups = TDuckDetailForm.class)
private String key;
/**
* 是否显示类型
*/
@NotNull(message = "是否显示类型不能为空",groups = TDuckDetailForm.class)
private Boolean displayType;
}

23
epmet-module/data-aggregator/data-aggregator-client/src/main/java/com/epmet/dataaggre/dto/epmettduck/form/TDuckHeaderInfoFormDTO.java

@ -0,0 +1,23 @@
package com.epmet.dataaggre.dto.epmettduck.form;
import lombok.Data;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.io.Serializable;
/**
* @Author zxc
* @DateTime 2021/9/17 10:47 上午
* @DESC
*/
@Data
public class TDuckHeaderInfoFormDTO implements Serializable {
private static final long serialVersionUID = 3624352114576287768L;
public interface TDuckHeaderInfoForm{}
@NotBlank(message = "projectKey不能为空",groups = TDuckHeaderInfoForm.class)
private String projectKey;
}

40
epmet-module/data-aggregator/data-aggregator-client/src/main/java/com/epmet/dataaggre/dto/epmettduck/form/TDuckListFormDTO.java

@ -0,0 +1,40 @@
package com.epmet.dataaggre.dto.epmettduck.form;
import lombok.Data;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.io.Serializable;
/**
* @Author zxc
* @DateTime 2021/9/17 10:47 上午
* @DESC
*/
@Data
public class TDuckListFormDTO implements Serializable {
private static final long serialVersionUID = 3624352114576287768L;
public interface TDuckListForm{}
/**
* 1未发布2收集中3已结束
*/
@NotNull(message = "问卷调查状态不能为空",groups = TDuckListForm.class)
private Integer status;
@NotNull(message = "pageNo不能为空",groups = TDuckListForm.class)
private Integer pageNo;
@NotNull(message = "pageSize不能为空",groups = TDuckListForm.class)
private Integer pageSize;
@NotBlank(message = "orgIds不能为空",groups = TDuckListForm.class)
private String orgIds;
@NotBlank(message = "client不能为空",groups = TDuckListForm.class)
private String client;
private String userId;
}

68
epmet-module/data-aggregator/data-aggregator-client/src/main/java/com/epmet/dataaggre/dto/epmettduck/result/AnalysisReportResDTO.java

@ -0,0 +1,68 @@
package com.epmet.dataaggre.dto.epmettduck.result;
import com.fasterxml.jackson.annotation.JsonIgnore;
import lombok.Data;
import java.io.Serializable;
import java.util.Map;
/**
* @Description TODO
* @Author yinzuomei
* @Date 2021/9/16 5:30 下午
*/
@Data
public class AnalysisReportResDTO implements Serializable {
private static final long serialVersionUID = -1637286883477938648L;
/**
* 项目key
*/
private String projectKey;
/**
* 表单项类型
*/
private String type;
/**
* 表单项标题
*/
private String label;
/**
* 表单项Id
*/
private String formItemId;
/**
* 展示类型组件
*/
private Integer isDisplayType;
/**
* 是否显示标签
*/
private Integer showLabel;
/**
* 是否必填
*/
private Integer required;
/**
* 排序
*/
private Long sort;
private Map<String, Object> detail;
/**
* 扩展字段 表单项独有字段
*/
@JsonIgnore
private String expand;
private String moduleType;
}

39
epmet-module/data-aggregator/data-aggregator-client/src/main/java/com/epmet/dataaggre/dto/epmettduck/result/CascaderDTO.java

@ -0,0 +1,39 @@
package com.epmet.dataaggre.dto.epmettduck.result;
import lombok.Data;
import java.io.Serializable;
import java.util.List;
/**
* @Description 级联选择组件答案参数格式
* @Author yinzuomei
* @Date 2021/9/18 3:40 下午
*/
@Data
public class CascaderDTO implements Serializable {
/**
* 当前选择的选项id
*/
private Integer id;
/**
* 选项名
*/
private String label;
/**
* 选项名
*/
private String value;
/**
* pid
*/
private String pid;
/**
* 全路径名字
*/
private List<String> labels;
}

27
epmet-module/data-aggregator/data-aggregator-client/src/main/java/com/epmet/dataaggre/dto/epmettduck/result/ConcatTableHeaderDTO.java

@ -0,0 +1,27 @@
package com.epmet.dataaggre.dto.epmettduck.result;
import lombok.Data;
import java.io.Serializable;
/**
* @Description 表头
* @Author yinzuomei
* @Date 2021/9/22 3:41 下午
*/
@Data
public class ConcatTableHeaderDTO implements Serializable {
private static final long serialVersionUID = -1133629000511948034L;
/**
* 显示名称
*/
private String label;
/**
* 表单项Id
*/
private String formItemId;
private String type;
}

24
epmet-module/data-aggregator/data-aggregator-client/src/main/java/com/epmet/dataaggre/dto/epmettduck/result/GetRangeResultDTO.java

@ -0,0 +1,24 @@
package com.epmet.dataaggre.dto.epmettduck.result;
import lombok.Data;
import java.io.Serializable;
import java.util.List;
/**
* @Description
* @Author zhaoqifeng
* @Date 2021/9/18 14:41
*/
@Data
public class GetRangeResultDTO implements Serializable {
private static final long serialVersionUID = 3208245365454855156L;
/**
* 适用于哪个端 resi居民端用户gov工作端用户
*/
private String client;
/**
* 发布范围组织列表
*/
private List<String> orgList;
}

25
epmet-module/data-aggregator/data-aggregator-client/src/main/java/com/epmet/dataaggre/dto/epmettduck/result/ItemResDetailConcatResultDTO.java

@ -0,0 +1,25 @@
package com.epmet.dataaggre.dto.epmettduck.result;
import lombok.Data;
import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;
/**
* @Description TODO
* @Author yinzuomei
* @Date 2021/9/22 2:54 下午
*/
@Data
public class ItemResDetailConcatResultDTO implements Serializable {
private static final long serialVersionUID = -3695200094740706700L;
private List<ConcatTableHeaderDTO> tableHeaderList;
private List<List<String>> dataList;
public ItemResDetailConcatResultDTO(){
this.tableHeaderList=new ArrayList<>();
this.dataList=new ArrayList<>();
}
}

29
epmet-module/data-aggregator/data-aggregator-client/src/main/java/com/epmet/dataaggre/dto/epmettduck/result/OptionDTO.java

@ -0,0 +1,29 @@
package com.epmet.dataaggre.dto.epmettduck.result;
import lombok.Data;
import java.io.Serializable;
/**
* @Description
* @Author yinzuomei
* @Date 2021/9/17 3:25 下午
*/
@Data
public class OptionDTO implements Serializable {
/**
* 选项题目
*/
private String label;
/**
* 答案值
*/
private Integer value;
/**
* 多少个人选择此答案
*/
private Integer currentCount=0;
}

96
epmet-module/data-aggregator/data-aggregator-client/src/main/java/com/epmet/dataaggre/dto/epmettduck/result/TDuckListResultDTO.java

@ -0,0 +1,96 @@
package com.epmet.dataaggre.dto.epmettduck.result;
import com.epmet.commons.tools.constant.NumConstant;
import lombok.Data;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.io.Serializable;
/**
* @Author zxc
* @DateTime 2021/9/17 10:47 上午
* @DESC
*/
@Data
public class TDuckListResultDTO implements Serializable {
private static final long serialVersionUID = 3624352114576287768L;
/**
* 客户id
*/
private String customerId;
/**
* 项目code
*/
private String key;
/**
* 来源Id
*/
private String sourceId;
/**
* 来源类型
*/
private Integer sourceType;
/**
* 项目名称
*/
private String name;
/**
* 项目描述
*/
private String describe;
/**
* 用户ID
*/
private String userId;
/**
* 项目类型
*/
private Integer type;
/**
* 状态
*/
private Integer status;
/**
* 适用于哪个端 resi居民端用户gov工作端用户运营端用户oper
*/
private String client;
private String createdTime;
/**
* 是否填写问卷truefalse
*/
private Boolean fillStatus;
/**
* 回收状态 0:未回收1已回收
*/
private Integer recycled;
public TDuckListResultDTO() {
this.customerId = "";
this.key = "";
this.sourceId = "";
this.sourceType = NumConstant.ONE;
this.name = "";
this.describe = "";
this.userId = "";
this.type = NumConstant.ONE;
this.status = NumConstant.ONE;
this.client = "";
this.createdTime = "";
this.fillStatus = false;
}
}

50
epmet-module/data-aggregator/data-aggregator-client/src/main/java/com/epmet/dataaggre/dto/epmettduck/struct/CascaderExpandStruct.java

@ -0,0 +1,50 @@
package com.epmet.dataaggre.dto.epmettduck.struct;
import lombok.Data;
import java.util.List;
/**
* @author : smalljop
* @description : 级联选择
* @create : 2020-11-19 15:13
**/
@Data
public class CascaderExpandStruct {
/**
* 选项
*/
private List<Option> options;
/**
* 塞选
*/
private Boolean filterable;
/**
* 多选
*/
private Boolean multiple;
/**
* 分割符
*/
private String separator;
/**
* 显示全路径
*/
private Boolean showAllLevels;
@Data
public static class Option {
public Integer id;
public String label;
public String value;
/**
* 莹姐加了这个参数
*/
public String pid;
public List<Option> children;
}
}

45
epmet-module/data-aggregator/data-aggregator-client/src/main/java/com/epmet/dataaggre/dto/epmettduck/struct/CheckboxExpandStruct.java

@ -0,0 +1,45 @@
package com.epmet.dataaggre.dto.epmettduck.struct;
import lombok.Data;
import java.util.List;
/**
* @author : smalljop
* @description : 颜色选择
* @create : 2020-11-19 11:42
**/
@Data
public class CheckboxExpandStruct {
/**
* 最小
*/
private Integer min;
/**
* 最大
*/
private Integer max;
/**
* 选项类型
*/
private String optionType;
/**
* 选项是按钮时大小
*/
private String size;
/**
* 选项
*/
private List<Option> options;
@Data
public static class Option {
public String label;
public Integer value;
}
}

14
epmet-module/data-aggregator/data-aggregator-client/src/main/java/com/epmet/dataaggre/dto/epmettduck/struct/ColorExpandStruct.java

@ -0,0 +1,14 @@
package com.epmet.dataaggre.dto.epmettduck.struct;
import lombok.Data;
/**
* @author : smalljop
* @description : 颜色选择
* @create : 2020-11-19 11:42
**/
@Data
public class ColorExpandStruct {
}

20
epmet-module/data-aggregator/data-aggregator-client/src/main/java/com/epmet/dataaggre/dto/epmettduck/struct/DateExpandStruct.java

@ -0,0 +1,20 @@
package com.epmet.dataaggre.dto.epmettduck.struct;
import lombok.Data;
/**
* @author : smalljop
* @description : 日期选择
* @create : 2020-11-19 11:42
**/
@Data
public class DateExpandStruct {
// 日期类型
private String type;
// 日期格式
private String format;
// 日期格式
private String valueFormat;
}

14
epmet-module/data-aggregator/data-aggregator-client/src/main/java/com/epmet/dataaggre/dto/epmettduck/struct/DateRangeExpandStruct.java

@ -0,0 +1,14 @@
package com.epmet.dataaggre.dto.epmettduck.struct;
import lombok.Data;
/**
* @author : smalljop
* @description : 日期范围
* @create : 2020-11-19 11:42
**/
@Data
public class DateRangeExpandStruct {
}

24
epmet-module/data-aggregator/data-aggregator-client/src/main/java/com/epmet/dataaggre/dto/epmettduck/struct/DescTextExpandStruct.java

@ -0,0 +1,24 @@
package com.epmet.dataaggre.dto.epmettduck.struct;
import lombok.Data;
/**
* 文字描述组件属性
*
* @author smalljop
*/
@Data
public class DescTextExpandStruct {
/**
* 颜色
*/
private String color;
/**
* 文字位置
*/
private String textAlign;
}

15
epmet-module/data-aggregator/data-aggregator-client/src/main/java/com/epmet/dataaggre/dto/epmettduck/struct/DividerExpandStruct.java

@ -0,0 +1,15 @@
package com.epmet.dataaggre.dto.epmettduck.struct;
import lombok.Data;
/**
* 分割线组件属性
*
* @author smalljop
*/
@Data
public class DividerExpandStruct {
}

10
epmet-module/data-aggregator/data-aggregator-client/src/main/java/com/epmet/dataaggre/dto/epmettduck/struct/EmptyExpandStruct.java

@ -0,0 +1,10 @@
package com.epmet.dataaggre.dto.epmettduck.struct;
import lombok.Data;
/**
* 无扩展属性
*/
@Data
public class EmptyExpandStruct {
}

25
epmet-module/data-aggregator/data-aggregator-client/src/main/java/com/epmet/dataaggre/dto/epmettduck/struct/ImageCarouselExpandStruct.java

@ -0,0 +1,25 @@
package com.epmet.dataaggre.dto.epmettduck.struct;
import lombok.Data;
import java.util.List;
/**
* @author : smalljop
* @description : 颜色选择
* @create : 2020-11-19 11:42
**/
@Data
public class ImageCarouselExpandStruct {
/**
* 选项
*/
private List<Option> options;
public static class Option {
public String image;
public String label;
}
}

12
epmet-module/data-aggregator/data-aggregator-client/src/main/java/com/epmet/dataaggre/dto/epmettduck/struct/ImageExpandStruct.java

@ -0,0 +1,12 @@
package com.epmet.dataaggre.dto.epmettduck.struct;
import lombok.Data;
@Data
public class ImageExpandStruct {
private String src;
private String alt;
}

31
epmet-module/data-aggregator/data-aggregator-client/src/main/java/com/epmet/dataaggre/dto/epmettduck/struct/ImageSelectExpandStruct.java

@ -0,0 +1,31 @@
package com.epmet.dataaggre.dto.epmettduck.struct;
import lombok.Data;
import java.util.List;
/**
* @author : smalljop
* @description : 颜色选择
* @create : 2020-11-19 11:42
**/
@Data
public class ImageSelectExpandStruct {
/**
* 选项
*/
private List<Option> options;
/**
* 是否多选
*/
private Boolean multiple;
public static class Option {
public String image;
public String label;
public Integer value;
}
}

36
epmet-module/data-aggregator/data-aggregator-client/src/main/java/com/epmet/dataaggre/dto/epmettduck/struct/InputExpandStruct.java

@ -0,0 +1,36 @@
package com.epmet.dataaggre.dto.epmettduck.struct;
import lombok.Data;
/**
* @author : smalljop
* @description : 输入框配置
* @create : 2020-11-19 11:42
**/
@Data
public class InputExpandStruct {
/**
* 前缀
*/
public String prepend;
/**
* 后缀
*/
public String append;
/**
* 最大长度
*/
private Long maxlength;
/**
* 前置图标
*/
private String prefixIcon;
/**
* 显示可输入字数
*/
private Boolean showWordLimit;
}

21
epmet-module/data-aggregator/data-aggregator-client/src/main/java/com/epmet/dataaggre/dto/epmettduck/struct/ItemDefaultValueStruct.java

@ -0,0 +1,21 @@
package com.epmet.dataaggre.dto.epmettduck.struct;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
@Data
@AllArgsConstructor
@NoArgsConstructor
public class ItemDefaultValueStruct {
/**
* 值是否是Json
*/
private boolean json;
/**
* 默认值具体值
*/
private Object value;
}

38
epmet-module/data-aggregator/data-aggregator-client/src/main/java/com/epmet/dataaggre/dto/epmettduck/struct/NumberExpandStruct.java

@ -0,0 +1,38 @@
package com.epmet.dataaggre.dto.epmettduck.struct;
import lombok.Data;
/**
* @author : smalljop
* @description : 数字型输入
* @create : 2020-11-19 15:13
**/
@Data
public class NumberExpandStruct {
/**
* 最小
*/
private Integer min;
/**
* 最大
*/
private Integer max;
/**
* 计数器步长 每次+
*/
private Integer step;
/**
* 是否只能输入 step 的倍数
*/
private Boolean stepStrictly;
/**
* 经度
*/
private Integer precision;
/**
* 按钮控制位置
*/
private String controlsPosition;
}

13
epmet-module/data-aggregator/data-aggregator-client/src/main/java/com/epmet/dataaggre/dto/epmettduck/struct/PaginationExpandStruct.java

@ -0,0 +1,13 @@
package com.epmet.dataaggre.dto.epmettduck.struct;
import lombok.Data;
/**
* @author : smalljop
* @description : 分页组件属性
* @create : 2021/05/19 10:29
**/
@Data
public class PaginationExpandStruct {
}

31
epmet-module/data-aggregator/data-aggregator-client/src/main/java/com/epmet/dataaggre/dto/epmettduck/struct/RadioExpandStruct.java

@ -0,0 +1,31 @@
package com.epmet.dataaggre.dto.epmettduck.struct;
import lombok.Data;
import java.util.List;
/**
* @author : smalljop
* @description : d
* @create : 2020-11-19 11:42
**/
@Data
public class RadioExpandStruct {
/**
* 选项样式
*/
private String optionType;
/**
* 选项
*/
private List<Option> options;
@Data
public static class Option {
public String label;
public Integer value;
}
}

35
epmet-module/data-aggregator/data-aggregator-client/src/main/java/com/epmet/dataaggre/dto/epmettduck/struct/RateExpandStruct.java

@ -0,0 +1,35 @@
package com.epmet.dataaggre.dto.epmettduck.struct;
import lombok.Data;
/**
* @author : smalljop
* @description : 评分
* @create : 2020-11-19 11:42
**/
@Data
public class RateExpandStruct {
/**
* 最大分数
*/
private Integer max;
/**
* 允许半选
*/
private Boolean allowHalf;
/**
* 辅助文字
*/
private Boolean showText;
/**
* 显示分数
*/
private Boolean showScore;
/**
* 禁用
*/
private Boolean disabled;
}

48
epmet-module/data-aggregator/data-aggregator-client/src/main/java/com/epmet/dataaggre/dto/epmettduck/struct/SelectExpandStruct.java

@ -0,0 +1,48 @@
package com.epmet.dataaggre.dto.epmettduck.struct;
import lombok.Data;
import java.util.List;
/**
* @author : smalljop
* @description : 下拉框
* @create : 2020-11-19 15:13
**/
@Data
public class SelectExpandStruct {
/**
* 选项
*/
private List<Option> options;
/**
* 最大
*/
private Boolean multiple;
/**
* 塞选
*/
private Boolean filterable;
/**
* 是否只能输入 step 的倍数
*/
private Boolean stepStrictly;
/**
* 经度
*/
private Integer precision;
/**
* 按钮控制位置
*/
private String controlsPosition;
@Data
public static class Option {
public String label;
public Integer value;
}
}

19
epmet-module/data-aggregator/data-aggregator-client/src/main/java/com/epmet/dataaggre/dto/epmettduck/struct/SignPadExpandStruct.java

@ -0,0 +1,19 @@
package com.epmet.dataaggre.dto.epmettduck.struct;
import lombok.Data;
/**
* 手写签名组件属性
*
* @author smalljop
*/
@Data
public class SignPadExpandStruct {
/**
* 颜色
*/
private String color;
}

35
epmet-module/data-aggregator/data-aggregator-client/src/main/java/com/epmet/dataaggre/dto/epmettduck/struct/SliderExpandStruct.java

@ -0,0 +1,35 @@
package com.epmet.dataaggre.dto.epmettduck.struct;
import lombok.Data;
/**
* @author : smalljop
* @description : 滑块
* @create : 2020-11-19 15:13
**/
@Data
public class SliderExpandStruct {
/**
* 最小
*/
private Integer min;
/**
* 最大
*/
private Integer max;
/**
* 计数器步长 每次+
*/
private Integer step;
/**
* 是否是范围选择
*/
private Boolean range;
/**
* 按钮控制位置
*/
private String controlsPosition;
}

14
epmet-module/data-aggregator/data-aggregator-client/src/main/java/com/epmet/dataaggre/dto/epmettduck/struct/SwitchExpandStruct.java

@ -0,0 +1,14 @@
package com.epmet.dataaggre.dto.epmettduck.struct;
import lombok.Data;
/**
* @author : smalljop
* @description : 输入框配置
* @create : 2020-11-19 11:42
**/
@Data
public class SwitchExpandStruct {
}

27
epmet-module/data-aggregator/data-aggregator-client/src/main/java/com/epmet/dataaggre/dto/epmettduck/struct/TextareaExpandStruct.java

@ -0,0 +1,27 @@
package com.epmet.dataaggre.dto.epmettduck.struct;
import lombok.Data;
/**
* @author : smalljop
* @description : 多行文本
* @create : 2020-11-19 11:42
**/
@Data
public class TextareaExpandStruct {
/**
* 最大行数
*/
public Integer maxRows;
/**
* 最小行数
*/
public Integer minRows;
/**
* 最大长度
*/
private Long maxlength;
}

14
epmet-module/data-aggregator/data-aggregator-client/src/main/java/com/epmet/dataaggre/dto/epmettduck/struct/TimeExpandStruct.java

@ -0,0 +1,14 @@
package com.epmet.dataaggre.dto.epmettduck.struct;
import lombok.Data;
/**
* @author : smalljop
* @description : 时间选择
* @create : 2020-11-19 11:42
**/
@Data
public class TimeExpandStruct {
}

14
epmet-module/data-aggregator/data-aggregator-client/src/main/java/com/epmet/dataaggre/dto/epmettduck/struct/TimeRangeExpandStruct.java

@ -0,0 +1,14 @@
package com.epmet.dataaggre.dto.epmettduck.struct;
import lombok.Data;
/**
* @author : smalljop
* @description : 时间区间选择
* @create : 2020-11-19 11:42
**/
@Data
public class TimeRangeExpandStruct {
}

53
epmet-module/data-aggregator/data-aggregator-client/src/main/java/com/epmet/dataaggre/dto/epmettduck/struct/UploadExpandStruct.java

@ -0,0 +1,53 @@
package com.epmet.dataaggre.dto.epmettduck.struct;
import lombok.Data;
/**
* @author : smalljop
* @description : 上传文件
* @create : 2020-11-19 11:42
**/
@Data
public class UploadExpandStruct {
/**
* 按钮文字
*/
private String buttonText;
/**
* 显示提示
*/
private Boolean showTip;
/**
* 文件大小
*/
private Long fileSize;
/**
* 大小单位
*/
private String sizeUnit;
/**
* 显示列表类型
*/
private String listType;
/**
* 文件数字
*/
private Integer limit;
/**
* 是否可以多选
*/
private boolean multiple;
/**
* 允许上传的文件类型
*/
private String accept;
}

22
epmet-module/data-aggregator/data-aggregator-client/src/main/java/com/epmet/dataaggre/dto/epmettduck/struct/UploadResultStruct.java

@ -0,0 +1,22 @@
package com.epmet.dataaggre.dto.epmettduck.struct;
import lombok.Data;
import java.util.List;
/**
* @author : smalljop
* @description : 上传收集结果
* @create : 2021/06/07 16:37
**/
@Data
public class UploadResultStruct {
private List<UploadFile> files;
@Data
public static class UploadFile {
private String fileName;
private String url;
}
}

4
epmet-module/data-aggregator/data-aggregator-client/src/main/java/com/epmet/dataaggre/dto/govorg/form/SubOrgFormDTO.java

@ -15,6 +15,10 @@ public class SubOrgFormDTO implements Serializable {
private static final long serialVersionUID = -3651225675593357002L;
@NotBlank(message = "组织ID不能为空")
private String agencyId;
/**
* 所属端 居民端resi工作端gov
*/
private String client;
/**
* 是否包括我1 0
*/

21
epmet-module/data-aggregator/data-aggregator-client/src/main/java/com/epmet/dataaggre/dto/govorg/result/OrgTreeResultDTO.java

@ -0,0 +1,21 @@
package com.epmet.dataaggre.dto.govorg.result;
import lombok.Data;
import java.io.Serializable;
import java.util.List;
/**
* @Description
* @Author zhaoqifeng
* @Date 2021/9/16 16:50
*/
@Data
public class OrgTreeResultDTO implements Serializable {
private static final long serialVersionUID = -4304356050545598564L;
private String orgId;
private String orgName;
private String orgType;
private String orgPids;
private List<OrgTreeResultDTO> subOrgList;
}

103
epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/controller/EpmetTDuckController.java

@ -1,8 +1,15 @@
package com.epmet.dataaggre.controller;
import com.epmet.commons.tools.annotation.LoginUser;
import com.epmet.commons.tools.security.dto.TokenDto;
import com.epmet.commons.tools.utils.Result;
import com.epmet.dataaggre.dto.epmettduck.form.ProjectKeyCommonDTO;
import com.epmet.dataaggre.dto.epmettduck.result.ProjectProfileResultDTO;
import com.epmet.commons.tools.validator.ValidatorUtils;
import com.epmet.dataaggre.dto.epmettduck.PrPublishRangeDTO;
import com.epmet.dataaggre.dto.epmettduck.form.*;
import com.epmet.dataaggre.dto.epmettduck.result.*;
import com.epmet.dataaggre.entity.epmettduck.PrUserProjectEntity;
import com.epmet.dataaggre.entity.epmettduck.PrUserProjectItemEntity;
import com.epmet.dataaggre.service.epmettduck.PrUserProjectItemService;
import com.epmet.dataaggre.service.epmettduck.PrUserProjectService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
@ -10,6 +17,8 @@ import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import java.util.List;
/**
* @Author zxc
* @DateTime 2021/9/15 2:43 下午
@ -20,6 +29,8 @@ import org.springframework.web.bind.annotation.RestController;
public class EpmetTDuckController {
@Autowired
private PrUserProjectService prUserProjectService;
@Autowired
private PrUserProjectItemService projectItemService;
/**
@ -35,7 +46,95 @@ public class EpmetTDuckController {
return new Result<ProjectProfileResultDTO>().ok(prUserProjectService.queryProjectProfile(formDTO.getProjectKey()));
}
/**
* @Description 问卷调查详情
* @Param formDTO
* @author zxc
* @date 2021/9/16 2:51 下午
*/
@PostMapping("detail")
public Result<List<PrUserProjectItemEntity>> queryProjectItem(@RequestBody TDuckDetailFormDTO formDTO) {
ValidatorUtils.validateEntity(formDTO, TDuckDetailFormDTO.TDuckDetailForm.class);
return new Result<List<PrUserProjectItemEntity>>().ok(projectItemService.queryProjectItem(formDTO));
}
/**
* 分析报告
*
* @param formDTO
* @return com.epmet.commons.tools.utils.Result<com.epmet.dataaggre.dto.epmettduck.result.AnalysisReportResDTO>
* @author yinzuomei
* @date 2021/9/16 5:56 下午
*/
@PostMapping("analysisreport")
public Result<List<AnalysisReportResDTO>> queryAnalysisReport(@RequestBody ProjectKeyCommonDTO formDTO){
ValidatorUtils.validateEntity(formDTO,ProjectKeyCommonDTO.AddUserInternalGroup.class);
return new Result<List<AnalysisReportResDTO>>().ok(prUserProjectService.queryAnalysisReport(formDTO.getProjectKey()));
}
/**
* @Description 问卷调查列表
* @Param formDTO
* @author zxc
* @date 2021/9/18 10:29 上午
*/
@PostMapping("list")
public Result<List<TDuckListResultDTO>> queryProjectList(@RequestBody TDuckListFormDTO formDTO,@LoginUser TokenDto tokenDto){
ValidatorUtils.validateEntity(formDTO,TDuckListFormDTO.TDuckListForm.class);
formDTO.setUserId(tokenDto.getUserId());
return new Result<List<TDuckListResultDTO>>().ok(prUserProjectService.queryProjectList(formDTO));
}
/**
* @Description 查询问卷调查的头部信息
* @Param formDTO
* @author zxc
* @date 2021/9/18 10:35 上午
*/
@PostMapping("headerinfo")
public Result<PrUserProjectEntity> headerInfo(@RequestBody TDuckHeaderInfoFormDTO formDTO){
ValidatorUtils.validateEntity(formDTO, TDuckHeaderInfoFormDTO.TDuckHeaderInfoForm.class);
return new Result<PrUserProjectEntity>().ok(prUserProjectService.headerInfo(formDTO));
}
/**
* @Description 获取发布范围
* @Param formDTO
* @Return {@link Result< GetRangeResultDTO>}
* @Author zhaoqifeng
* @Date 2021/9/18 15:18
*/
@PostMapping("getrange")
public Result<GetRangeResultDTO> getRange(@RequestBody PrPublishRangeDTO formDTO) {
return new Result<GetRangeResultDTO>().ok(prUserProjectService.getRange(formDTO.getProjectKey()));
}
/**
* 查看详情
* 1联系人组件统一用一个统计显示多少条点击查看更多显示汇总列表如有非必填项没有填写显示空手机号验证不需要统计
* 2单行文本多行文本时间选择时间范围日期选择日期范围统计填写人数点击查看列表
*
* @param formDTO
* @return com.epmet.commons.tools.utils.Result
* @author yinzuomei
* @date 2021/9/22 1:37 下午
*/
@PostMapping("itemresdetail-list")
public Result<List<String>> queryItemResDetail(@RequestBody ItemResDetailFormDTO formDTO){
ValidatorUtils.validateEntity(formDTO,ProjectKeyCommonDTO.AddUserInternalGroup.class);
return new Result<List<String>>().ok(prUserProjectService.queryItemResDetail(formDTO));
}
/**
* 联系人组件-查看详情
*
* @param formDTO
* @return com.epmet.commons.tools.utils.Result<com.epmet.dataaggre.dto.epmettduck.result.ItemResDetailConcatResultDTO>
* @author yinzuomei
* @date 2021/9/22 2:57 下午
*/
@PostMapping("itemresdetail-concat")
public Result<ItemResDetailConcatResultDTO> queryItemResDetailConcat(@RequestBody ProjectKeyCommonDTO formDTO){
ValidatorUtils.validateEntity(formDTO,ProjectKeyCommonDTO.AddUserInternalGroup.class);
return new Result<ItemResDetailConcatResultDTO>().ok(prUserProjectService.queryItemResDetailConcat(formDTO));
}
}

14
epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/controller/GovOrgController.java

@ -165,4 +165,18 @@ public class GovOrgController {
return new Result<SubOrgResultDTO>().ok(govOrgService.getSubOrg(formDTO));
}
/**
* @Description 当前组织级下级组织树
* @Param tokenDto
* @Param formDTO
* @Return {@link Result< OrgTreeResultDTO>}
* @Author zhaoqifeng
* @Date 2021/9/17 14:02
*/
@PostMapping("agencytree")
public Result<List<OrgTreeResultDTO>> getAgencyTree(@LoginUser TokenDto tokenDto, @RequestBody SubOrgFormDTO formDTO) {
ValidatorUtils.validateEntity(formDTO);
return new Result<List<OrgTreeResultDTO>>().ok(govOrgService.getAgencyTree(tokenDto, formDTO));
}
}

60
epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/dao/epmettduck/PrUserProjectDao.java

@ -1,9 +1,15 @@
package com.epmet.dataaggre.dao.epmettduck;
import com.epmet.commons.mybatis.dao.BaseDao;
import com.epmet.dataaggre.dto.epmettduck.result.AnalysisReportResDTO;
import com.epmet.dataaggre.dto.epmettduck.result.ProjectProfileResultDTO;
import com.epmet.dataaggre.dto.epmettduck.result.TDuckListResultDTO;
import com.epmet.dataaggre.entity.epmettduck.PrUserProjectEntity;
import com.epmet.dataaggre.entity.epmettduck.PrUserProjectResultEntity;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import java.util.List;
/**
* 项目表
@ -22,4 +28,58 @@ public interface PrUserProjectDao extends BaseDao<PrUserProjectEntity> {
* @date 2021/9/16 2:58 下午
*/
ProjectProfileResultDTO queryProjectProfile(String projectKey);
/**
* 分析报告展示的题目列表
*
* @param projectKey
* @return java.util.List<com.epmet.dataaggre.dto.epmettduck.result.AnalysisReportResDTO>
* @author yinzuomei
* @date 2021/9/16 5:59 下午
*/
List<AnalysisReportResDTO> selectItems(String projectKey);
/**
* 查询结果项
*
* @param projectKey
* @return java.util.List<com.epmet.dataaggre.entity.epmettduck.PrUserProjectResultEntity>
* @author yinzuomei
* @date 2021/9/16 6:18 下午
*/
List<PrUserProjectResultEntity> selectResults(String projectKey);
/**
* @Description 查询范围内的问卷调查
* @Param orgId
* @author zxc
* @date 2021/9/17 2:16 下午
*/
List<String> selectProjectKey(@Param("orgIds")String orgIds);
/**
* @Description 根据keys查询project
* @Param keys
* @author zxc
* @date 2021/9/17 3:41 下午
*/
List<TDuckListResultDTO> queryProjectList(@Param("keys")List<String> keys, @Param("status")Integer status,@Param("client")String client);
/**
* @Description 查询头部信息问卷调查的名字和描述
* @Param key
* @author zxc
* @date 2021/9/22 9:42 上午
*/
PrUserProjectEntity selectHeaderInfoByKey(@Param("key")String key);
/**
* 当前问卷中所有的联系人组件
*
* @param projectKey
* @return java.util.List<com.epmet.dataaggre.dto.epmettduck.result.AnalysisReportResDTO>
* @author yinzuomei
* @date 2021/9/22 3:04 下午
*/
List<AnalysisReportResDTO> selectCocatItems(String projectKey);
}

7
epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/dao/epmettduck/PrVistRecordDao.java

@ -3,6 +3,9 @@ package com.epmet.dataaggre.dao.epmettduck;
import com.epmet.commons.mybatis.dao.BaseDao;
import com.epmet.dataaggre.entity.epmettduck.PrVistRecordEntity;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import java.util.List;
/**
* 用户访问问卷记录表
@ -12,5 +15,7 @@ import org.apache.ibatis.annotations.Mapper;
*/
@Mapper
public interface PrVistRecordDao extends BaseDao<PrVistRecordEntity> {
List<String> selectVisitRecordByUserId(@Param("userId")String userId);
}

11
epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/dao/govorg/CustomerAgencyDao.java

@ -18,10 +18,7 @@
package com.epmet.dataaggre.dao.govorg;
import com.epmet.commons.mybatis.dao.BaseDao;
import com.epmet.dataaggre.dto.govorg.result.AgencyGridResultDTO;
import com.epmet.dataaggre.dto.govorg.result.StaffAgencyGridListResultDTO;
import com.epmet.dataaggre.dto.govorg.result.StaffOrgNameResultDTO;
import com.epmet.dataaggre.dto.govorg.result.StaffOrgRelationResultDTO;
import com.epmet.dataaggre.dto.govorg.result.*;
import com.epmet.dataaggre.entity.govorg.CustomerAgencyEntity;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
@ -74,4 +71,10 @@ public interface CustomerAgencyDao extends BaseDao<CustomerAgencyEntity> {
* @return
*/
StaffOrgRelationResultDTO getStaffFromOrgType(@Param("staffId") String staffId);
OrgTreeResultDTO getOrgTree(@Param("agencyId") String agencyId);
List<OrgTreeResultDTO> getSubOrgList(@Param("pid") String pid);
OrgTreeResultDTO getResiOrgTree(@Param("agencyId") String agencyId);
List<OrgTreeResultDTO> getResiSubOrgList(@Param("pid") String pid);
}

10
epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/entity/epmettduck/AcUserAuthorizeEntity.java

@ -73,14 +73,4 @@ public class AcUserAuthorizeEntity extends BaseEpmetEntity {
*/
private String userInfo;
/**
*
*/
private Date createTime;
/**
*
*/
private Date updateTime;
}

14
epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/entity/epmettduck/AcUserEntity.java

@ -93,19 +93,5 @@ public class AcUserEntity extends BaseEpmetEntity {
*/
private String lastLoginIp;
/**
* 状态
*/
private Integer deleted;
/**
*
*/
private Date createTime;
/**
*
*/
private Date updateTime;
}

13
epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/entity/epmettduck/PrProjectTemplateCategoryEntity.java

@ -34,14 +34,14 @@ import java.util.Date;
@Data
@EqualsAndHashCode(callSuper=false)
@TableName("pr_project_template_category")
public class PrProjectTemplateCategoryEntity{
public class PrProjectTemplateCategoryEntity extends BaseEpmetEntity{
private static final long serialVersionUID = 1L;
/**
*
*/
private Long id;
private String id;
/**
* 客户Id
@ -58,14 +58,5 @@ public class PrProjectTemplateCategoryEntity{
*/
private Integer sort;
/**
* 更新时间
*/
private Date updateTime;
/**
* 创建时间
*/
private Date createTime;
}

9
epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/entity/epmettduck/PrProjectTemplateEntity.java

@ -83,14 +83,5 @@ public class PrProjectTemplateEntity extends BaseEpmetEntity {
*/
private Integer status;
/**
* 更新时间
*/
private Date updateTime;
/**
* 创建时间
*/
private Date createTime;
}

10
epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/entity/epmettduck/PrProjectTemplateItemEntity.java

@ -108,16 +108,6 @@ public class PrProjectTemplateItemEntity extends BaseEpmetEntity {
*/
private String regList;
/**
* 更新时间
*/
private Date updateTime;
/**
* 创建时间
*/
private Date createTime;
/**
* 展示类型组件
*/

10
epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/entity/epmettduck/PrProjectThemeEntity.java

@ -74,14 +74,4 @@ public class PrProjectThemeEntity extends BaseEpmetEntity {
*/
private String btnsColor;
/**
* 更新时间
*/
private Date updateTime;
/**
* 创建时间
*/
private Date createTime;
}

15
epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/entity/epmettduck/PrPublishRangeEntity.java

@ -68,19 +68,4 @@ public class PrPublishRangeEntity extends BaseEpmetEntity {
*/
private String orgType;
/**
* 状态
*/
private Integer deleted;
/**
*
*/
private Date createTime;
/**
*
*/
private Date updateTime;
}

15
epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/entity/epmettduck/PrResultExtEntity.java

@ -73,19 +73,4 @@ public class PrResultExtEntity extends BaseEpmetEntity {
*/
private String fromOrgType;
/**
* 状态
*/
private Integer deleted;
/**
*
*/
private Date createTime;
/**
*
*/
private Date updateTime;
}

18
epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/entity/epmettduck/PrUserProjectEntity.java

@ -17,6 +17,7 @@
package com.epmet.dataaggre.entity.epmettduck;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.epmet.commons.mybatis.entity.BaseEpmetEntity;
@ -51,6 +52,7 @@ public class PrUserProjectEntity extends BaseEpmetEntity {
/**
* 项目code
*/
@TableField("`key`")
private String key;
/**
@ -71,6 +73,7 @@ public class PrUserProjectEntity extends BaseEpmetEntity {
/**
* 项目描述
*/
@TableField("`describe`")
private String describe;
/**
@ -93,19 +96,4 @@ public class PrUserProjectEntity extends BaseEpmetEntity {
*/
private String client;
/**
* 是否删除
*/
private Integer isDeleted;
/**
* 更新时间
*/
private Date updateTime;
/**
* 创建时间
*/
private Date createTime;
}

61
epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/entity/epmettduck/PrUserProjectItemEntity.java

@ -17,13 +17,20 @@
package com.epmet.dataaggre.entity.epmettduck;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.handlers.JacksonTypeHandler;
import com.epmet.commons.mybatis.entity.BaseEpmetEntity;
import com.epmet.dataaggre.dto.epmettduck.ProjectItemTypeEnum;
import com.epmet.dataaggre.dto.epmettduck.struct.ItemDefaultValueStruct;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import lombok.experimental.FieldNameConstants;
import org.apache.ibatis.type.EnumTypeHandler;
import java.util.Date;
import java.util.List;
import java.util.Map;
/**
* 项目表单项
@ -33,16 +40,13 @@ import java.util.Date;
*/
@Data
@EqualsAndHashCode(callSuper=false)
@TableName("pr_user_project_item")
public class PrUserProjectItemEntity extends BaseEpmetEntity {
@Accessors(chain = true)
@TableName(value = "pr_user_project_item", autoResultMap = true)
@FieldNameConstants
public class PrUserProjectItemEntity extends BaseEpmetEntity{
private static final long serialVersionUID = 1L;
/**
*
*/
private String id;
/**
* 客户Id
*/
@ -61,7 +65,8 @@ public class PrUserProjectItemEntity extends BaseEpmetEntity {
/**
* 表单项类型
*/
private String type;
@TableField(typeHandler = EnumTypeHandler.class)
private ProjectItemTypeEnum type;
/**
* 表单项标题
@ -71,22 +76,24 @@ public class PrUserProjectItemEntity extends BaseEpmetEntity {
/**
* 展示类型组件
*/
private Integer isDisplayType;
@TableField("is_display_type")
private Integer displayType;
/**
* 是否显示标签
*/
private Integer showLabel;
private Boolean showLabel;
/**
* 表单项默认值
*/
private String defaultValue;
@TableField(value = "default_value",typeHandler = JacksonTypeHandler.class)
private ItemDefaultValueStruct defaultValue;
/**
* 是否必填
*/
private Integer required;
private Boolean required;
/**
* 输入型提示文字
@ -106,21 +113,21 @@ public class PrUserProjectItemEntity extends BaseEpmetEntity {
/**
* 扩展字段 表单项独有字段
*/
private String expand;
@TableField(typeHandler = JacksonTypeHandler.class)
private Map<String, Object> expand;
/**
* 正则表达式
*/
private String regList;
/**
* 更新时间
*/
private Date updateTime;
/**
* 创建时间
*/
private Date createTime;
@TableField(typeHandler = JacksonTypeHandler.class)
private List<Map<String, Object>> regList;
/**
* 组件类型联系人组件concat输入型组件input;图片型组件image;辅助型组件assist选择性组件choose
*/
private String moduleType;
/**
* 与type一致手机号phone邮箱email身份证号idCard详见数据库
*/
private String itemKey;
}

10
epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/entity/epmettduck/PrUserProjectLogicEntity.java

@ -68,14 +68,4 @@ public class PrUserProjectLogicEntity extends BaseEpmetEntity {
*/
private String conditionList;
/**
* 创建时间
*/
private Date createTime;
/**
* 更新时间
*/
private Date updateTime;
}

10
epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/entity/epmettduck/PrUserProjectResultEntity.java

@ -113,14 +113,4 @@ public class PrUserProjectResultEntity extends BaseEpmetEntity {
*/
private String wxUserInfo;
/**
* 创建时间
*/
private Date createTime;
/**
* 更新时间
*/
private Date updateTime;
}

10
epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/entity/epmettduck/PrUserProjectSettingEntity.java

@ -158,14 +158,4 @@ public class PrUserProjectSettingEntity extends BaseEpmetEntity {
*/
private String shareDesc;
/**
* 更新时间
*/
private Date updateTime;
/**
* 创建时间
*/
private Date createTime;
}

10
epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/entity/epmettduck/PrUserProjectThemeEntity.java

@ -98,14 +98,4 @@ public class PrUserProjectThemeEntity extends BaseEpmetEntity {
*/
private Integer showNumber;
/**
* 更新时间
*/
private Date updateTime;
/**
* 创建时间
*/
private Date createTime;
}

15
epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/entity/epmettduck/PrVistRecordEntity.java

@ -63,19 +63,4 @@ public class PrVistRecordEntity extends BaseEpmetEntity {
*/
private String projectKey;
/**
* 状态
*/
private Integer deleted;
/**
*
*/
private Date createTime;
/**
*
*/
private Date updateTime;
}

10
epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/entity/epmettduck/WxMpUserEntity.java

@ -98,14 +98,4 @@ public class WxMpUserEntity extends BaseEpmetEntity {
*/
private String userId;
/**
* 更新时间
*/
private Date updateTime;
/**
* 创建时间
*/
private Date createTime;
}

9
epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/epmettduck/PrPublishRangeService.java

@ -92,4 +92,13 @@ public interface PrPublishRangeService extends BaseService<PrPublishRangeEntity>
* @date 2021-09-15
*/
void delete(String[] ids);
/**
* @Description 发布范围组织列表
* @Param projectKey
* @Return {@link List< String>}
* @Author zhaoqifeng
* @Date 2021/9/18 15:28
*/
List<String> getRangeOrgList(String projectKey);
}

83
epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/epmettduck/PrUserProjectItemService.java

@ -1,25 +1,10 @@
/**
* Copyright 2018 人人开源 https://www.renren.io
* <p>
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
* <p>
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* <p>
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package com.epmet.dataaggre.service.epmettduck;
import com.baomidou.mybatisplus.extension.service.IService;
import com.epmet.commons.mybatis.service.BaseService;
import com.epmet.commons.tools.page.PageData;
import com.epmet.dataaggre.dto.epmettduck.PrUserProjectItemDTO;
import com.epmet.dataaggre.dto.epmettduck.form.TDuckDetailFormDTO;
import com.epmet.dataaggre.entity.epmettduck.PrUserProjectItemEntity;
import java.util.List;
@ -31,65 +16,13 @@ import java.util.Map;
* @author generator generator@elink-cn.com
* @since v1.0.0 2021-09-15
*/
public interface PrUserProjectItemService extends BaseService<PrUserProjectItemEntity> {
/**
* 默认分页
*
* @param params
* @return PageData<PrUserProjectItemDTO>
* @author generator
* @date 2021-09-15
*/
PageData<PrUserProjectItemDTO> page(Map<String, Object> params);
/**
* 默认查询
*
* @param params
* @return java.util.List<PrUserProjectItemDTO>
* @author generator
* @date 2021-09-15
*/
List<PrUserProjectItemDTO> list(Map<String, Object> params);
/**
* 单条查询
*
* @param id
* @return PrUserProjectItemDTO
* @author generator
* @date 2021-09-15
*/
PrUserProjectItemDTO get(String id);
/**
* 默认保存
*
* @param dto
* @return void
* @author generator
* @date 2021-09-15
*/
void save(PrUserProjectItemDTO dto);
/**
* 默认更新
*
* @param dto
* @return void
* @author generator
* @date 2021-09-15
*/
void update(PrUserProjectItemDTO dto);
public interface PrUserProjectItemService extends IService<PrUserProjectItemEntity> {
/**
* 批量删除
*
* @param ids
* @return void
* @author generator
* @date 2021-09-15
* @Description 问卷调查详情
* @Param formDTO
* @author zxc
* @date 2021/9/16 2:51 下午
*/
void delete(String[] ids);
List<PrUserProjectItemEntity> queryProjectItem(TDuckDetailFormDTO formDTO);
}

63
epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/epmettduck/PrUserProjectService.java

@ -20,7 +20,11 @@ package com.epmet.dataaggre.service.epmettduck;
import com.epmet.commons.mybatis.service.BaseService;
import com.epmet.commons.tools.page.PageData;
import com.epmet.dataaggre.dto.epmettduck.PrUserProjectDTO;
import com.epmet.dataaggre.dto.epmettduck.result.ProjectProfileResultDTO;
import com.epmet.dataaggre.dto.epmettduck.form.ItemResDetailFormDTO;
import com.epmet.dataaggre.dto.epmettduck.form.ProjectKeyCommonDTO;
import com.epmet.dataaggre.dto.epmettduck.form.TDuckHeaderInfoFormDTO;
import com.epmet.dataaggre.dto.epmettduck.form.TDuckListFormDTO;
import com.epmet.dataaggre.dto.epmettduck.result.*;
import com.epmet.dataaggre.entity.epmettduck.PrUserProjectEntity;
import java.util.List;
@ -103,4 +107,61 @@ public interface PrUserProjectService extends BaseService<PrUserProjectEntity> {
* @date 2021/9/16 2:54 下午
*/
ProjectProfileResultDTO queryProjectProfile(String projectKey);
/**
* @Description 问卷调查列表
* @Param formDTO
* @author zxc
* @date 2021/9/18 10:29 上午
*/
List<TDuckListResultDTO> queryProjectList(TDuckListFormDTO formDTO);
/**
* 分析报告
*
* @param projectKey
* @return com.epmet.dataaggre.dto.epmettduck.result.AnalysisReportResDTO
* @author yinzuomei
* @date 2021/9/16 5:57 下午
*/
List<AnalysisReportResDTO> queryAnalysisReport(String projectKey);
/**
* @Description 查询问卷调查的头部信息
* @Param formDTO
* @author zxc
* @date 2021/9/18 10:35 上午
*/
PrUserProjectEntity headerInfo(TDuckHeaderInfoFormDTO formDTO);
/**
* @Description 获取发布范围
* @Param projectKey
* @Return {@link GetRangeResultDTO}
* @Author zhaoqifeng
* @Date 2021/9/18 15:18
*/
GetRangeResultDTO getRange(String projectKey);
/**
* 查看详情
* 1联系人组件统一用一个统计显示多少条点击查看更多显示汇总列表如有非必填项没有填写显示空手机号验证不需要统计
* 2单行文本多行文本时间选择时间范围日期选择日期范围统计填写人数点击查看列表
*
* @param formDTO
* @return com.epmet.commons.tools.utils.Result
* @author yinzuomei
* @date 2021/9/22 1:37 下午
*/
List<String> queryItemResDetail(ItemResDetailFormDTO formDTO);
/**
* 联系人组件
*
* @param formDTO
* @return com.epmet.dataaggre.dto.epmettduck.result.ItemResDetailConcatResultDTO
* @author yinzuomei
* @date 2021/9/22 2:57 下午
*/
ItemResDetailConcatResultDTO queryItemResDetailConcat(ProjectKeyCommonDTO formDTO);
}

8
epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/epmettduck/impl/AcUserAuthorizeServiceImpl.java

@ -19,16 +19,18 @@ package com.epmet.dataaggre.service.epmettduck.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.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.dataaggre.constant.DataSourceConstant;
import com.epmet.dataaggre.dao.epmettduck.AcUserAuthorizeDao;
import com.epmet.dataaggre.dto.epmettduck.AcUserAuthorizeDTO;
import com.epmet.dataaggre.entity.epmettduck.AcUserAuthorizeEntity;
import com.epmet.dataaggre.service.epmettduck.AcUserAuthorizeService;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
@ -42,6 +44,8 @@ import java.util.Map;
* @author generator generator@elink-cn.com
* @since v1.0.0 2021-09-15
*/
@Slf4j
@DataSource(DataSourceConstant.EPMETTDUCK)
@Service
public class AcUserAuthorizeServiceImpl extends BaseServiceImpl<AcUserAuthorizeDao, AcUserAuthorizeEntity> implements AcUserAuthorizeService {

8
epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/epmettduck/impl/AcUserServiceImpl.java

@ -19,16 +19,18 @@ package com.epmet.dataaggre.service.epmettduck.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.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.dataaggre.constant.DataSourceConstant;
import com.epmet.dataaggre.dao.epmettduck.AcUserDao;
import com.epmet.dataaggre.dto.epmettduck.AcUserDTO;
import com.epmet.dataaggre.entity.epmettduck.AcUserEntity;
import com.epmet.dataaggre.service.epmettduck.AcUserService;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
@ -42,6 +44,8 @@ import java.util.Map;
* @author generator generator@elink-cn.com
* @since v1.0.0 2021-09-15
*/
@Slf4j
@DataSource(DataSourceConstant.EPMETTDUCK)
@Service
public class AcUserServiceImpl extends BaseServiceImpl<AcUserDao, AcUserEntity> implements AcUserService {

5
epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/epmettduck/impl/PrProjectTemplateCategoryServiceImpl.java

@ -17,7 +17,10 @@
package com.epmet.dataaggre.service.epmettduck.impl;
import com.epmet.commons.dynamic.datasource.annotation.DataSource;
import com.epmet.dataaggre.constant.DataSourceConstant;
import com.epmet.dataaggre.service.epmettduck.PrProjectTemplateCategoryService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;
/**
@ -26,6 +29,8 @@ import org.springframework.stereotype.Service;
* @author generator generator@elink-cn.com
* @since v1.0.0 2021-09-15
*/
@Slf4j
@DataSource(DataSourceConstant.EPMETTDUCK)
@Service
public class PrProjectTemplateCategoryServiceImpl implements PrProjectTemplateCategoryService {

8
epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/epmettduck/impl/PrProjectTemplateItemServiceImpl.java

@ -19,16 +19,18 @@ package com.epmet.dataaggre.service.epmettduck.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.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.dataaggre.constant.DataSourceConstant;
import com.epmet.dataaggre.dao.epmettduck.PrProjectTemplateItemDao;
import com.epmet.dataaggre.dto.epmettduck.PrProjectTemplateItemDTO;
import com.epmet.dataaggre.entity.epmettduck.PrProjectTemplateItemEntity;
import com.epmet.dataaggre.service.epmettduck.PrProjectTemplateItemService;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
@ -42,6 +44,8 @@ import java.util.Map;
* @author generator generator@elink-cn.com
* @since v1.0.0 2021-09-15
*/
@Slf4j
@DataSource(DataSourceConstant.EPMETTDUCK)
@Service
public class PrProjectTemplateItemServiceImpl extends BaseServiceImpl<PrProjectTemplateItemDao, PrProjectTemplateItemEntity> implements PrProjectTemplateItemService {

8
epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/epmettduck/impl/PrProjectTemplateServiceImpl.java

@ -19,16 +19,18 @@ package com.epmet.dataaggre.service.epmettduck.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.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.dataaggre.constant.DataSourceConstant;
import com.epmet.dataaggre.dao.epmettduck.PrProjectTemplateDao;
import com.epmet.dataaggre.dto.epmettduck.PrProjectTemplateDTO;
import com.epmet.dataaggre.entity.epmettduck.PrProjectTemplateEntity;
import com.epmet.dataaggre.service.epmettduck.PrProjectTemplateService;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
@ -42,6 +44,8 @@ import java.util.Map;
* @author generator generator@elink-cn.com
* @since v1.0.0 2021-09-15
*/
@Slf4j
@DataSource(DataSourceConstant.EPMETTDUCK)
@Service
public class PrProjectTemplateServiceImpl extends BaseServiceImpl<PrProjectTemplateDao, PrProjectTemplateEntity> implements PrProjectTemplateService {

8
epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/epmettduck/impl/PrProjectThemeServiceImpl.java

@ -19,16 +19,18 @@ package com.epmet.dataaggre.service.epmettduck.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.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.dataaggre.constant.DataSourceConstant;
import com.epmet.dataaggre.dao.epmettduck.PrProjectThemeDao;
import com.epmet.dataaggre.dto.epmettduck.PrProjectThemeDTO;
import com.epmet.dataaggre.entity.epmettduck.PrProjectThemeEntity;
import com.epmet.dataaggre.service.epmettduck.PrProjectThemeService;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
@ -42,6 +44,8 @@ import java.util.Map;
* @author generator generator@elink-cn.com
* @since v1.0.0 2021-09-15
*/
@Slf4j
@DataSource(DataSourceConstant.EPMETTDUCK)
@Service
public class PrProjectThemeServiceImpl extends BaseServiceImpl<PrProjectThemeDao, PrProjectThemeEntity> implements PrProjectThemeService {

31
epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/epmettduck/impl/PrPublishRangeServiceImpl.java

@ -17,24 +17,30 @@
package com.epmet.dataaggre.service.epmettduck.impl;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
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.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.dataaggre.constant.DataSourceConstant;
import com.epmet.dataaggre.dao.epmettduck.PrPublishRangeDao;
import com.epmet.dataaggre.dto.epmettduck.PrPublishRangeDTO;
import com.epmet.dataaggre.entity.epmettduck.PrPublishRangeEntity;
import com.epmet.dataaggre.service.epmettduck.PrPublishRangeService;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.collections4.CollectionUtils;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import java.util.Arrays;
import java.util.Collections;
import java.util.List;
import java.util.Map;
import java.util.stream.Collectors;
/**
* 项目发布范围表
@ -42,6 +48,8 @@ import java.util.Map;
* @author generator generator@elink-cn.com
* @since v1.0.0 2021-09-15
*/
@Slf4j
@DataSource(DataSourceConstant.EPMETTDUCK)
@Service
public class PrPublishRangeServiceImpl extends BaseServiceImpl<PrPublishRangeDao, PrPublishRangeEntity> implements PrPublishRangeService {
@ -97,4 +105,23 @@ public class PrPublishRangeServiceImpl extends BaseServiceImpl<PrPublishRangeDao
baseDao.deleteBatchIds(Arrays.asList(ids));
}
/**
* @param projectKey
* @Description 发布范围组织列表
* @Param projectKey
* @Return {@link List< String>}
* @Author zhaoqifeng
* @Date 2021/9/18 15:28
*/
@Override
public List<String> getRangeOrgList(String projectKey) {
LambdaQueryWrapper<PrPublishRangeEntity> wrapper = new LambdaQueryWrapper<>();
wrapper.eq(PrPublishRangeEntity::getProjectKey, projectKey);
List<PrPublishRangeEntity> list = baseDao.selectList(wrapper);
if (CollectionUtils.isEmpty(list)) {
return Collections.emptyList();
}
return list.stream().map(PrPublishRangeEntity::getOrgId).collect(Collectors.toList());
}
}

8
epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/epmettduck/impl/PrResultExtServiceImpl.java

@ -19,16 +19,18 @@ package com.epmet.dataaggre.service.epmettduck.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.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.dataaggre.constant.DataSourceConstant;
import com.epmet.dataaggre.dao.epmettduck.PrResultExtDao;
import com.epmet.dataaggre.dto.epmettduck.PrResultExtDTO;
import com.epmet.dataaggre.entity.epmettduck.PrResultExtEntity;
import com.epmet.dataaggre.service.epmettduck.PrResultExtService;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
@ -42,6 +44,8 @@ import java.util.Map;
* @author generator generator@elink-cn.com
* @since v1.0.0 2021-09-15
*/
@Slf4j
@DataSource(DataSourceConstant.EPMETTDUCK)
@Service
public class PrResultExtServiceImpl extends BaseServiceImpl<PrResultExtDao, PrResultExtEntity> implements PrResultExtService {

88
epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/epmettduck/impl/PrUserProjectItemServiceImpl.java

@ -17,24 +17,20 @@
package com.epmet.dataaggre.service.epmettduck.impl;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.epmet.commons.mybatis.service.impl.BaseServiceImpl;
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.dynamic.datasource.annotation.DataSource;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.epmet.dataaggre.constant.DataSourceConstant;
import com.epmet.dataaggre.dao.epmettduck.PrUserProjectItemDao;
import com.epmet.dataaggre.dto.epmettduck.PrUserProjectItemDTO;
import com.epmet.dataaggre.dto.epmettduck.form.TDuckDetailFormDTO;
import com.epmet.dataaggre.entity.epmettduck.PrUserProjectItemEntity;
import com.epmet.dataaggre.service.epmettduck.PrUserProjectItemService;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.util.CollectionUtils;
import java.util.Arrays;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
/**
* 项目表单项
@ -43,58 +39,26 @@ import java.util.Map;
* @since v1.0.0 2021-09-15
*/
@Service
public class PrUserProjectItemServiceImpl extends BaseServiceImpl<PrUserProjectItemDao, PrUserProjectItemEntity> implements PrUserProjectItemService {
@Slf4j
@DataSource(DataSourceConstant.EPMET_T_DUCK)
public class PrUserProjectItemServiceImpl extends ServiceImpl<PrUserProjectItemDao, PrUserProjectItemEntity> implements PrUserProjectItemService {
/**
* @Description 问卷调查详情
* @Param formDTO
* @author zxc
* @date 2021/9/16 2:51 下午
*/
@Override
public PageData<PrUserProjectItemDTO> page(Map<String, Object> params) {
IPage<PrUserProjectItemEntity> page = baseDao.selectPage(
getPage(params, FieldConstant.CREATED_TIME, false),
getWrapper(params)
public List<PrUserProjectItemEntity> queryProjectItem(TDuckDetailFormDTO formDTO) {
List<PrUserProjectItemEntity> itemEntityList = list(Wrappers.<PrUserProjectItemEntity>lambdaQuery()
.eq(PrUserProjectItemEntity::getProjectKey, formDTO.getKey())
.eq(PrUserProjectItemEntity::getDisplayType,formDTO.getDisplayType())
.orderByAsc(PrUserProjectItemEntity::getSort)
);
return getPageData(page, PrUserProjectItemDTO.class);
if (CollectionUtils.isEmpty(itemEntityList)){
return new ArrayList<>();
}
return itemEntityList;
}
@Override
public List<PrUserProjectItemDTO> list(Map<String, Object> params) {
List<PrUserProjectItemEntity> entityList = baseDao.selectList(getWrapper(params));
return ConvertUtils.sourceToTarget(entityList, PrUserProjectItemDTO.class);
}
private QueryWrapper<PrUserProjectItemEntity> getWrapper(Map<String, Object> params){
String id = (String)params.get(FieldConstant.ID_HUMP);
QueryWrapper<PrUserProjectItemEntity> wrapper = new QueryWrapper<>();
wrapper.eq(StringUtils.isNotBlank(id), FieldConstant.ID, id);
return wrapper;
}
@Override
public PrUserProjectItemDTO get(String id) {
PrUserProjectItemEntity entity = baseDao.selectById(id);
return ConvertUtils.sourceToTarget(entity, PrUserProjectItemDTO.class);
}
@Override
@Transactional(rollbackFor = Exception.class)
public void save(PrUserProjectItemDTO dto) {
PrUserProjectItemEntity entity = ConvertUtils.sourceToTarget(dto, PrUserProjectItemEntity.class);
insert(entity);
}
@Override
@Transactional(rollbackFor = Exception.class)
public void update(PrUserProjectItemDTO dto) {
PrUserProjectItemEntity entity = ConvertUtils.sourceToTarget(dto, PrUserProjectItemEntity.class);
updateById(entity);
}
@Override
@Transactional(rollbackFor = Exception.class)
public void delete(String[] ids) {
// 逻辑删除(@TableLogic 注解)
baseDao.deleteBatchIds(Arrays.asList(ids));
}
}

8
epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/epmettduck/impl/PrUserProjectLogicServiceImpl.java

@ -19,16 +19,18 @@ package com.epmet.dataaggre.service.epmettduck.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.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.dataaggre.constant.DataSourceConstant;
import com.epmet.dataaggre.dao.epmettduck.PrUserProjectLogicDao;
import com.epmet.dataaggre.dto.epmettduck.PrUserProjectLogicDTO;
import com.epmet.dataaggre.entity.epmettduck.PrUserProjectLogicEntity;
import com.epmet.dataaggre.service.epmettduck.PrUserProjectLogicService;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
@ -42,6 +44,8 @@ import java.util.Map;
* @author generator generator@elink-cn.com
* @since v1.0.0 2021-09-15
*/
@Slf4j
@DataSource(DataSourceConstant.EPMETTDUCK)
@Service
public class PrUserProjectLogicServiceImpl extends BaseServiceImpl<PrUserProjectLogicDao, PrUserProjectLogicEntity> implements PrUserProjectLogicService {

8
epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/epmettduck/impl/PrUserProjectResultServiceImpl.java

@ -19,16 +19,18 @@ package com.epmet.dataaggre.service.epmettduck.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.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.dataaggre.constant.DataSourceConstant;
import com.epmet.dataaggre.dao.epmettduck.PrUserProjectResultDao;
import com.epmet.dataaggre.dto.epmettduck.PrUserProjectResultDTO;
import com.epmet.dataaggre.entity.epmettduck.PrUserProjectResultEntity;
import com.epmet.dataaggre.service.epmettduck.PrUserProjectResultService;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
@ -42,6 +44,8 @@ import java.util.Map;
* @author generator generator@elink-cn.com
* @since v1.0.0 2021-09-15
*/
@Slf4j
@DataSource(DataSourceConstant.EPMETTDUCK)
@Service
public class PrUserProjectResultServiceImpl extends BaseServiceImpl<PrUserProjectResultDao, PrUserProjectResultEntity> implements PrUserProjectResultService {

565
epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/epmettduck/impl/PrUserProjectServiceImpl.java

@ -17,24 +17,47 @@
package com.epmet.dataaggre.service.epmettduck.impl;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
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.FieldConstant;
import com.epmet.commons.tools.constant.NumConstant;
import com.epmet.commons.tools.constant.StrConstant;
import com.epmet.commons.tools.page.PageData;
import com.epmet.commons.tools.utils.ConvertUtils;
import com.epmet.dataaggre.constant.DataSourceConstant;
import com.epmet.dataaggre.dao.epmettduck.PrUserProjectDao;
import com.epmet.dataaggre.dao.epmettduck.PrVistRecordDao;
import com.epmet.dataaggre.dto.epmettduck.PrUserProjectDTO;
import com.epmet.dataaggre.dto.epmettduck.result.ProjectProfileResultDTO;
import com.epmet.dataaggre.dto.epmettduck.ProjectItemTypeEnum;
import com.epmet.dataaggre.dto.epmettduck.form.ItemResDetailFormDTO;
import com.epmet.dataaggre.dto.epmettduck.form.ProjectKeyCommonDTO;
import com.epmet.dataaggre.dto.epmettduck.form.TDuckHeaderInfoFormDTO;
import com.epmet.dataaggre.dto.epmettduck.form.TDuckListFormDTO;
import com.epmet.dataaggre.dto.epmettduck.result.*;
import com.epmet.dataaggre.dto.epmettduck.struct.*;
import com.epmet.dataaggre.entity.epmettduck.PrUserProjectEntity;
import com.epmet.dataaggre.entity.epmettduck.PrUserProjectResultEntity;
import com.epmet.dataaggre.service.epmettduck.PrPublishRangeService;
import com.epmet.dataaggre.service.epmettduck.PrUserProjectService;
import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.util.CollectionUtils;
import java.util.Arrays;
import java.util.List;
import java.util.Map;
import javax.annotation.Resource;
import java.math.BigDecimal;
import java.util.*;
import java.util.stream.Collectors;
import java.util.stream.Stream;
/**
* 项目表
@ -42,9 +65,16 @@ import java.util.Map;
* @author generator generator@elink-cn.com
* @since v1.0.0 2021-09-15
*/
@Slf4j
@DataSource(DataSourceConstant.EPMETTDUCK)
@Service
public class PrUserProjectServiceImpl extends BaseServiceImpl<PrUserProjectDao, PrUserProjectEntity> implements PrUserProjectService {
@Autowired
private PrVistRecordDao visitRecordDao;
@Resource
private PrPublishRangeService prPublishRangeService;
@Override
public PageData<PrUserProjectDTO> page(Map<String, Object> params) {
IPage<PrUserProjectEntity> page = baseDao.selectPage(
@ -110,4 +140,531 @@ public class PrUserProjectServiceImpl extends BaseServiceImpl<PrUserProjectDao,
return baseDao.queryProjectProfile(projectKey);
}
/**
* @Description 问卷调查列表
* @Param formDTO
* @author zxc
* @date 2021/9/18 10:29 上午
*/
@Override
public List<TDuckListResultDTO> queryProjectList(TDuckListFormDTO formDTO) {
List<String> projectKeys = baseDao.selectProjectKey(formDTO.getOrgIds());
if (CollectionUtils.isEmpty(projectKeys)){
return new ArrayList<>();
}
PageInfo<TDuckListResultDTO> projectPageInfo = PageHelper.startPage(formDTO.getPageNo(), formDTO.getPageSize()).doSelectPageInfo(() -> baseDao.queryProjectList(projectKeys, formDTO.getStatus(), formDTO.getClient()));
List<TDuckListResultDTO> result = projectPageInfo.getList();
List<String> records = visitRecordDao.selectVisitRecordByUserId(formDTO.getUserId());
if (!CollectionUtils.isEmpty(records)){
for (String r : records) {
for (TDuckListResultDTO t : result) {
if (r.equals(t.getKey())){
t.setFillStatus(true);
continue;
}
}
}
}
return result;
}
/**
* 分析报告
*
* @param projectKey
* @return com.epmet.dataaggre.dto.epmettduck.result.AnalysisReportResDTO
* @author yinzuomei
* @date 2021/9/16 5:57 下午
*/
@Override
public List<AnalysisReportResDTO> queryAnalysisReport(String projectKey) {
List<AnalysisReportResDTO> itemList=baseDao.selectItems(projectKey);
if(CollectionUtils.isEmpty(itemList)){
return new ArrayList<>();
}
List<PrUserProjectResultEntity> resultList=baseDao.selectResults(projectKey);
if(CollectionUtils.isEmpty(resultList)){
return new ArrayList<>();
}
for(AnalysisReportResDTO item:itemList){
String currentType=item.getType();
String key="field".concat(item.getFormItemId());
log.info("key="+key);
Map<String, Object> detail=new HashMap<>();
//总采集数
detail.put("collectionTotal",resultList.size());
//有效记录
int validTotal=0;
//1、联系人组件统一用一个统计显示多少条,点击查看更多显示汇总列表,如有非必填项没有填写显示空(手机号验证不需要统计)
//2、单行文本、多行文本、时间选择、时间范围、日期选择、日期范围,统计填写人数,点击查看列表
if(ProjectItemTypeEnum.INPUT.getValue().equals(currentType)
||ProjectItemTypeEnum.PROVINCE_CITY.getValue().equals(currentType)
||ProjectItemTypeEnum.INPUT_MAP.getValue().equals(currentType)
||ProjectItemTypeEnum.TEXTAREA.getValue().equals(currentType)
||ProjectItemTypeEnum.TIME.getValue().equals(currentType)
||ProjectItemTypeEnum.TIME_RANGE.getValue().equals(currentType)
||ProjectItemTypeEnum.DATE.getValue().equals(currentType)
||ProjectItemTypeEnum.DATE_RANGE.getValue().equals(currentType)){
for(PrUserProjectResultEntity res:resultList){
JSONObject originalData = JSON.parseObject(res.getOriginalData());
//手机号、邮箱、身份证、单行文本: INPUT
//多行文本
//时间选择
//日期选择
if(ProjectItemTypeEnum.INPUT.getValue().equals(currentType)
||ProjectItemTypeEnum.TEXTAREA.getValue().equals(currentType)
||ProjectItemTypeEnum.TIME.getValue().equals(currentType)
||ProjectItemTypeEnum.DATE.getValue().equals(currentType)){
if(originalData.containsKey(key)){
if(StringUtils.isNotBlank(originalData.get(key).toString())){
validTotal+=1;
}
}else{
log.warn("没有当前的key:,可能用户没填写吧"+key);
}
continue;
}
//省市联动: PROVINCE_CITY
//时间范围选择
//日期范围选择
if(ProjectItemTypeEnum.PROVINCE_CITY.getValue().equals(currentType)
||ProjectItemTypeEnum.TIME_RANGE.getValue().equals(currentType)
||ProjectItemTypeEnum.DATE_RANGE.getValue().equals(currentType)){
if(originalData.containsKey(key)){
List<String> provinceCityList= (List<String>) originalData.get(key);
if(!CollectionUtils.isEmpty(provinceCityList)){
validTotal+=1;
}
}
continue;
}
//地理位置:INPUT_MAP
if(ProjectItemTypeEnum.INPUT_MAP.getValue().equals(currentType)){
if(originalData.containsKey(key)){
List<String> provinceCityList= (List<String>) originalData.get(key);
log.info("地理位置:"+JSON.toJSONString(provinceCityList,true));
if (!CollectionUtils.isEmpty(provinceCityList) && provinceCityList.size() == 3) {
validTotal += 1;
}
}
//不加也行,后面也没有代码块了
continue;
}
}
detail.put("validTotal",validTotal);
item.setDetail(detail);
continue;
}
// 3、下拉选择、级联选择、单选框组、多选框组显示不同选项选择次数、所占比例
//3.1、下拉选择
if (ProjectItemTypeEnum.SELECT.getValue().equals(currentType)) {
SelectExpandStruct selectExpandStruct = JSON.parseObject(item.getExpand(), SelectExpandStruct.class);
List<OptionDTO> options = new ArrayList<>();
if (null != selectExpandStruct) {
options = ConvertUtils.sourceToTarget(selectExpandStruct.getOptions(), OptionDTO.class);
}
//共选择了多少次,每道题相加
int totalCount = 0;
for (OptionDTO optionDTO : options) {
//currentCount:每道题,被选了多少次?
int currentCount = 0;
for (PrUserProjectResultEntity res : resultList) {
JSONObject originalData = JSON.parseObject(res.getOriginalData());
if (selectExpandStruct.getMultiple()) {
//多选
if(originalData.containsKey(key)){
List<Integer> answers = (List<Integer>) originalData.get(key);
if (!CollectionUtils.isEmpty(answers) && answers.contains(optionDTO.getValue())) {
currentCount += 1;
}
}
} else {
//单选
if(originalData.containsKey(key)){
Integer answer = (Integer) originalData.get(key);
if (null != answer && optionDTO.getValue() == answer) {
currentCount += 1;
}
}
}
}
optionDTO.setCurrentCount(currentCount);
totalCount += currentCount;
}
detail.put("totalCount", totalCount);
detail.put("options", options);
item.setDetail(detail);
continue;
}
// 3.2 单选
if (ProjectItemTypeEnum.RADIO.getValue().equals(currentType)) {
RadioExpandStruct radioExpandStruct = JSON.parseObject(item.getExpand(), RadioExpandStruct.class);
List<OptionDTO> options = new ArrayList<>();
if (null != radioExpandStruct) {
options = ConvertUtils.sourceToTarget(radioExpandStruct.getOptions(), OptionDTO.class);
}
//共选择了多少次,每道题相加
int totalCount = 0;
for (OptionDTO optionDTO : options) {
//currentCount:每道题,被选了多少次?
int currentCount = 0;
for (PrUserProjectResultEntity res : resultList) {
JSONObject originalData = JSON.parseObject(res.getOriginalData());
//单选
if(originalData.containsKey(key)){
Integer answer = (Integer) originalData.get(key);
if (null != answer && optionDTO.getValue() == answer) {
currentCount += 1;
}
}
}
optionDTO.setCurrentCount(currentCount);
totalCount += currentCount;
}
detail.put("totalCount", totalCount);
detail.put("options", options);
item.setDetail(detail);
continue;
}
// 3.3多选
if (ProjectItemTypeEnum.CHECKBOX.getValue().equals(currentType)) {
CheckboxExpandStruct checkboxExpandStruct = JSON.parseObject(item.getExpand(), CheckboxExpandStruct.class);
List<OptionDTO> options = new ArrayList<>();
if (null != checkboxExpandStruct) {
options = ConvertUtils.sourceToTarget(checkboxExpandStruct.getOptions(), OptionDTO.class);
}
//共选择了多少次,每道题相加
int totalCount = 0;
for (OptionDTO optionDTO : options) {
//currentCount:每道题,被选了多少次?
int currentCount = 0;
for (PrUserProjectResultEntity res : resultList) {
JSONObject originalData = JSON.parseObject(res.getOriginalData());
//多选
if(originalData.containsKey(key)){
List<Integer> answers = (List<Integer>) originalData.get(key);
if (!CollectionUtils.isEmpty(answers) && answers.contains(optionDTO.getValue())) {
currentCount += 1;
}
}
}
optionDTO.setCurrentCount(currentCount);
totalCount += currentCount;
}
detail.put("totalCount", totalCount);
detail.put("options", options);
item.setDetail(detail);
continue;
}
//3.4级联 todo
if(ProjectItemTypeEnum.CASCADER.getValue().equals(currentType)){
//目前cascaderExpandStruct 没啥用
CascaderExpandStruct cascaderExpandStruct = JSON.parseObject(item.getExpand(), CascaderExpandStruct.class);
//共选择了多少次,每道题相加
int totalCount = 0;
Map<String, Integer> resMap = new HashMap<>();
for (PrUserProjectResultEntity res : resultList) {
JSONObject originalData = JSON.parseObject(res.getOriginalData());
if(originalData.containsKey(key)){
List<CascaderDTO> dtoList = JSON.parseArray(originalData.get(key).toString(), CascaderDTO.class);
if(CollectionUtils.isEmpty(dtoList)){
log.info(String.format("当前userId:%s,没有填写本题itemId:%s",res.getUserId(),key));
continue;
}
for (CascaderDTO cascaderDTO : dtoList) {
if (null != cascaderDTO && !CollectionUtils.isEmpty(cascaderDTO.getLabels())) {
totalCount += 1;
String pathName = StringUtils.join(cascaderDTO.getLabels(), StringUtils.isNotBlank(cascaderExpandStruct.getSeparator()) ? cascaderExpandStruct.getSeparator() : StrConstant.HYPHEN);
Integer count = resMap.get(pathName);
resMap.put(pathName, count == null ? 1 : count + 1);
}
}
}
}
detail.put("totalCount", totalCount);
detail.put("profile", resMap);
item.setDetail(detail);
continue;
}
//4、计数器显示所有填写者选择的数字总和
if(ProjectItemTypeEnum.NUMBER_INPUT.getValue().equals(currentType)){
int sumTotal=0;
for(PrUserProjectResultEntity res:resultList){
JSONObject originalData = JSON.parseObject(res.getOriginalData());
if(originalData.containsKey(key)){
Integer score= (Integer) originalData.get(key);
if(null!=score){
sumTotal+=score;
validTotal+=1;
}
}
}
detail.put("validTotal",validTotal);
detail.put("sumTotal",sumTotal);
item.setDetail(detail);
continue;
}
//5、开关统计开有多少、关有多少
if(ProjectItemTypeEnum.SWITCH.getValue().equals(currentType)){
int openTotal=0;
int closedTotal=0;
for(PrUserProjectResultEntity res:resultList){
JSONObject originalData = JSON.parseObject(res.getOriginalData());
if(originalData.containsKey(key)){
Boolean result= (Boolean) originalData.get(key);
if(null!=result){
validTotal+=1;
if(result){
openTotal+=1;
}else{
closedTotal+=1;
}
}
}
}
detail.put("validTotal",validTotal);
detail.put("openTotal",openTotal);
detail.put("closedTotal",closedTotal);
item.setDetail(detail);
continue;
}
//6、滑块、颜色选择、上传不统计
//7、评分统计1星几人,2星几人,3星几人......,显示平均分
if (ProjectItemTypeEnum.RATE.getValue().equals(currentType)) {
// 1、标签设置的满星是几个星星?
RateExpandStruct rateExpandStruct = JSON.parseObject(item.getExpand(), RateExpandStruct.class);
if (null != rateExpandStruct && null != rateExpandStruct.getMax()) {
detail.put("maxStarNum", rateExpandStruct.getMax());
} else {
log.warn(String.format("当前评分组件未设置最大值,默认赋值5,projectKey:%s,itemId:%s",projectKey,item.getFormItemId()));
detail.put("maxStarNum", NumConstant.FIVE);
}
//总分
int totalStarNum = 0;
Map<Integer, Integer> starMap = new HashMap<>();
for (PrUserProjectResultEntity res : resultList) {
JSONObject originalData = JSON.parseObject(res.getOriginalData());
if(originalData.containsKey(key)){
Integer starNum = (Integer) originalData.get(key);
if (null != starNum) {
validTotal += 1;
totalStarNum += starNum;
Integer count = starMap.get(starNum);
starMap.put(starNum, count == null ? 1 : count + 1);
}
}
}
//按照星星大小升序排列
this.sortMap(starMap, true);
//2、平均分
detail.put("avgStarNum", new BigDecimal((float)totalStarNum / validTotal).setScale(0, BigDecimal.ROUND_HALF_UP));
//3、几条有效记录
detail.put("validTotal", validTotal);
//4、得分列表
detail.put("starProfile", starMap);
item.setDetail(detail);
continue;
}
}
return itemList;
}
/**
* @Description 查询问卷调查的头部信息
* @Param formDTO
* @author zxc
* @date 2021/9/18 10:35 上午
*/
@Override
public PrUserProjectEntity headerInfo(TDuckHeaderInfoFormDTO formDTO) {
PrUserProjectEntity prUserProjectEntity = baseDao.selectOne(new QueryWrapper<PrUserProjectEntity>().lambda().eq(PrUserProjectEntity::getKey, formDTO.getProjectKey()));
return prUserProjectEntity;
}
/**
* @param projectKey
* @Description 获取发布范围
* @Param projectKey
* @Return {@link GetRangeResultDTO}
* @Author zhaoqifeng
* @Date 2021/9/18 15:18
*/
@Override
public GetRangeResultDTO getRange(String projectKey) {
GetRangeResultDTO result = new GetRangeResultDTO();
LambdaQueryWrapper<PrUserProjectEntity> wrapper = new LambdaQueryWrapper<>();
wrapper.eq(PrUserProjectEntity :: getKey, projectKey);
PrUserProjectEntity entity = baseDao.selectOne(wrapper);
result.setClient(entity.getClient());
result.setOrgList(prPublishRangeService.getRangeOrgList(projectKey));
return result;
}
private List<Map.Entry<Integer, Integer>> sortMap(Map<Integer, Integer> map, boolean asc) {
Stream<Map.Entry<Integer, Integer>> stream = null;
if (asc) {
stream = map.entrySet().stream().sorted(Map.Entry.comparingByValue());
} else {
stream = map.entrySet().stream().sorted(Collections.reverseOrder(Map.Entry.comparingByValue()));
}
return stream.collect(Collectors.toList());
}
/**
* 查看详情
* 1联系人组件统一用一个统计显示多少条点击查看更多显示汇总列表如有非必填项没有填写显示空手机号验证不需要统计
* 2单行文本多行文本时间选择时间范围日期选择日期范围统计填写人数点击查看列表
*
* @param formDTO
* @return com.epmet.commons.tools.utils.Result
* @author yinzuomei
* @date 2021/9/22 1:37 下午
*/
@Override
public List<String> queryItemResDetail(ItemResDetailFormDTO formDTO) {
List<PrUserProjectResultEntity> resultList=baseDao.selectResults(formDTO.getProjectKey());
if(CollectionUtils.isEmpty(resultList)){
return new ArrayList<>();
}
List<String> stringList=new ArrayList<>();
String key="field".concat(formDTO.getFormItemId());
for(PrUserProjectResultEntity res:resultList){
JSONObject originalData = JSON.parseObject(res.getOriginalData());
if(ProjectItemTypeEnum.INPUT.getValue().equals(formDTO.getType())
||ProjectItemTypeEnum.TEXTAREA.getValue().equals(formDTO.getType())
||ProjectItemTypeEnum.TIME.getValue().equals(formDTO.getType())
||ProjectItemTypeEnum.DATE.getValue().equals(formDTO.getType())){
if(originalData.containsKey(key)){
stringList.add((String) originalData.get(key));
continue;
}
}else if(ProjectItemTypeEnum.TIME_RANGE.getValue().equals(formDTO.getType())
||ProjectItemTypeEnum.DATE_RANGE.getValue().equals(formDTO.getType())){
if(originalData.containsKey(key)){
List<String> originalList= (List<String>) originalData.get(key);
if(!CollectionUtils.isEmpty(originalList)){
String rangeStr=StringUtils.join(originalList,StrConstant.COMMA);
stringList.add(rangeStr);
}
}
}
}
return stringList;
}
/**
* 联系人组件
*
* @param formDTO
* @return com.epmet.dataaggre.dto.epmettduck.result.ItemResDetailConcatResultDTO
* @author yinzuomei
* @date 2021/9/22 2:57 下午
*/
@Override
public ItemResDetailConcatResultDTO queryItemResDetailConcat(ProjectKeyCommonDTO formDTO) {
// 联系人题目
List<AnalysisReportResDTO> itemList=baseDao.selectCocatItems(formDTO.getProjectKey());
if(CollectionUtils.isEmpty(itemList)){
return new ItemResDetailConcatResultDTO();
}
//答案
List<PrUserProjectResultEntity> resultList=baseDao.selectResults(formDTO.getProjectKey());
if(CollectionUtils.isEmpty(resultList)){
return new ItemResDetailConcatResultDTO();
}
ItemResDetailConcatResultDTO resultDTO=new ItemResDetailConcatResultDTO();
List<ConcatTableHeaderDTO> tableHeaderList=new ArrayList<>();
for(AnalysisReportResDTO item:itemList){
ConcatTableHeaderDTO headerDTO=new ConcatTableHeaderDTO();
headerDTO.setFormItemId(item.getFormItemId());
headerDTO.setLabel(item.getLabel());
headerDTO.setType(item.getType());
tableHeaderList.add(headerDTO);
}
List<List<String>> dataList=new ArrayList<>();
for(PrUserProjectResultEntity res:resultList){
List<String> userAnswer=new ArrayList<>();
JSONObject originalData = JSON.parseObject(res.getOriginalData());
for(ConcatTableHeaderDTO header:tableHeaderList){
String key="field".concat(header.getFormItemId());
//手机号、邮箱、身份证、单行文本: INPUT
if(ProjectItemTypeEnum.INPUT.getValue().equals(header.getType())){
if(originalData.containsKey(key)){
if(StringUtils.isNotBlank(originalData.get(key).toString())){
userAnswer.add((String) originalData.get(key));
}else{
userAnswer.add(StrConstant.EPMETY_STR);
}
}else{
log.warn("没有当前的key:,可能用户没填写吧"+key);
userAnswer.add(StrConstant.HYPHEN);
}
}
//省市联动: PROVINCE_CITY
if(ProjectItemTypeEnum.PROVINCE_CITY.getValue().equals(header.getType())){
if(originalData.containsKey(key)){
List<String> provinceCityList= (List<String>) originalData.get(key);
if(!CollectionUtils.isEmpty(provinceCityList)){
userAnswer.add(StringUtils.join(provinceCityList,StrConstant.HYPHEN));
}else{
userAnswer.add(StrConstant.EPMETY_STR);
}
}else{
log.warn("没有当前的key:,可能用户没填写吧"+key);
userAnswer.add(StrConstant.HYPHEN);
}
}
//地理位置:INPUT_MAP
if(ProjectItemTypeEnum.INPUT_MAP.getValue().equals(header.getType())){
if(originalData.containsKey(key)){
List<String> inputMap= (List<String>) originalData.get(key);
log.info("地理位置:"+JSON.toJSONString(inputMap,true));
if (!CollectionUtils.isEmpty(inputMap) && inputMap.size() == 3) {
userAnswer.add(inputMap.get(2));
}else{
userAnswer.add(StrConstant.EPMETY_STR);
}
}else{
log.warn("没有当前的key:,可能用户没填写吧"+key);
userAnswer.add(StrConstant.HYPHEN);
}
}
}
dataList.add(userAnswer);
}
resultDTO.setTableHeaderList(tableHeaderList);
resultDTO.setDataList(dataList);
return resultDTO;
}
}

8
epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/epmettduck/impl/PrUserProjectSettingServiceImpl.java

@ -19,16 +19,18 @@ package com.epmet.dataaggre.service.epmettduck.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.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.dataaggre.constant.DataSourceConstant;
import com.epmet.dataaggre.dao.epmettduck.PrUserProjectSettingDao;
import com.epmet.dataaggre.dto.epmettduck.PrUserProjectSettingDTO;
import com.epmet.dataaggre.entity.epmettduck.PrUserProjectSettingEntity;
import com.epmet.dataaggre.service.epmettduck.PrUserProjectSettingService;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
@ -42,6 +44,8 @@ import java.util.Map;
* @author generator generator@elink-cn.com
* @since v1.0.0 2021-09-15
*/
@Slf4j
@DataSource(DataSourceConstant.EPMETTDUCK)
@Service
public class PrUserProjectSettingServiceImpl extends BaseServiceImpl<PrUserProjectSettingDao, PrUserProjectSettingEntity> implements PrUserProjectSettingService {

8
epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/epmettduck/impl/PrUserProjectThemeServiceImpl.java

@ -19,16 +19,18 @@ package com.epmet.dataaggre.service.epmettduck.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.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.dataaggre.constant.DataSourceConstant;
import com.epmet.dataaggre.dao.epmettduck.PrUserProjectThemeDao;
import com.epmet.dataaggre.dto.epmettduck.PrUserProjectThemeDTO;
import com.epmet.dataaggre.entity.epmettduck.PrUserProjectThemeEntity;
import com.epmet.dataaggre.service.epmettduck.PrUserProjectThemeService;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
@ -42,6 +44,8 @@ import java.util.Map;
* @author generator generator@elink-cn.com
* @since v1.0.0 2021-09-15
*/
@Slf4j
@DataSource(DataSourceConstant.EPMETTDUCK)
@Service
public class PrUserProjectThemeServiceImpl extends BaseServiceImpl<PrUserProjectThemeDao, PrUserProjectThemeEntity> implements PrUserProjectThemeService {

8
epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/epmettduck/impl/PrVistRecordServiceImpl.java

@ -19,16 +19,18 @@ package com.epmet.dataaggre.service.epmettduck.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.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.dataaggre.constant.DataSourceConstant;
import com.epmet.dataaggre.dao.epmettduck.PrVistRecordDao;
import com.epmet.dataaggre.dto.epmettduck.PrVistRecordDTO;
import com.epmet.dataaggre.entity.epmettduck.PrVistRecordEntity;
import com.epmet.dataaggre.service.epmettduck.PrVistRecordService;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
@ -42,6 +44,8 @@ import java.util.Map;
* @author generator generator@elink-cn.com
* @since v1.0.0 2021-09-15
*/
@Slf4j
@DataSource(DataSourceConstant.EPMETTDUCK)
@Service
public class PrVistRecordServiceImpl extends BaseServiceImpl<PrVistRecordDao, PrVistRecordEntity> implements PrVistRecordService {

8
epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/epmettduck/impl/WxMpUserServiceImpl.java

@ -19,16 +19,18 @@ package com.epmet.dataaggre.service.epmettduck.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.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.dataaggre.constant.DataSourceConstant;
import com.epmet.dataaggre.dao.epmettduck.WxMpUserDao;
import com.epmet.dataaggre.dto.epmettduck.WxMpUserDTO;
import com.epmet.dataaggre.entity.epmettduck.WxMpUserEntity;
import com.epmet.dataaggre.service.epmettduck.WxMpUserService;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
@ -42,6 +44,8 @@ import java.util.Map;
* @author generator generator@elink-cn.com
* @since v1.0.0 2021-09-15
*/
@Slf4j
@DataSource(DataSourceConstant.EPMETTDUCK)
@Service
public class WxMpUserServiceImpl extends BaseServiceImpl<WxMpUserDao, WxMpUserEntity> implements WxMpUserService {

Some files were not shown because too many files changed in this diff

Loading…
Cancel
Save