Merge branch 'test' into 'master'
Test
See merge request root/zhihuishequ!141
| | |
| | | import com.panzhihua.common.model.vos.R; |
| | | import com.panzhihua.common.model.vos.advertisement.ComOpsAdvVO; |
| | | import com.panzhihua.common.model.vos.community.*; |
| | | import com.panzhihua.common.model.vos.community.easyPhoto.ComActEasyPhotoClassifyVO; |
| | | import com.panzhihua.common.model.vos.user.NoticeUnReadVO; |
| | | import com.panzhihua.common.model.vos.user.SysUserAgreementVO; |
| | | import com.panzhihua.common.model.vos.user.SysUserNoticeVO; |
| | |
| | | public R readUserReward(){ |
| | | return communityService.readUserReward(this.getUserId(),this.getCommunityId()); |
| | | } |
| | | |
| | | @ApiOperation(value = "随手拍分类列表", response = ComActEasyPhotoClassifyVO.class) |
| | | @GetMapping("easyphoto/classify/list") |
| | | public R easyPhotoClassifyList() { |
| | | return communityService.listPhotoClassify(); |
| | | } |
| | | } |
New file |
| | |
| | | package com.panzhihua.applets_backstage.api; |
| | | |
| | | import com.panzhihua.common.model.dtos.community.easyPhoto.AddEasyPhotoClassifyDTO; |
| | | import com.panzhihua.common.model.vos.R; |
| | | import com.panzhihua.common.service.community.CommunityService; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import javax.annotation.Resource; |
| | | |
| | | @Slf4j |
| | | @Api(tags = {"随手拍分类"}) |
| | | @RestController |
| | | @RequestMapping("/classify") |
| | | public class EasyPhotoClassifyApi { |
| | | |
| | | @Resource |
| | | private CommunityService communityService; |
| | | |
| | | @ApiOperation(value = "随手拍分类-新增") |
| | | @PostMapping("/add") |
| | | public R addPhotoClassify(@RequestBody AddEasyPhotoClassifyDTO addPhotoClassify) { |
| | | return communityService.addPhotoClassify(addPhotoClassify); |
| | | } |
| | | |
| | | @ApiOperation(value = "随手拍分类-编辑") |
| | | @PostMapping("/edit") |
| | | public R editPhotoClassify(@RequestBody AddEasyPhotoClassifyDTO addPhotoClassify) { |
| | | return communityService.editPhotoClassify(addPhotoClassify); |
| | | } |
| | | |
| | | @ApiOperation(value = "随手拍分类-分页") |
| | | @PostMapping("/page") |
| | | public R pagePhotoClassify(@RequestBody AddEasyPhotoClassifyDTO addPhotoClassify) { |
| | | return communityService.pagePhotoClassify(addPhotoClassify); |
| | | } |
| | | |
| | | @ApiOperation(value = "随手拍分类-详情") |
| | | @GetMapping("/detail") |
| | | public R detailPhotoClassify(@RequestParam("id") Long id) { |
| | | return communityService.detailPhotoClassify(id); |
| | | } |
| | | |
| | | @ApiOperation(value = "随手拍分类-删除") |
| | | @GetMapping("/delete") |
| | | public R deletePhotoClassify(@RequestParam("id") Long id) { |
| | | return communityService.deletePhotoClassify(id); |
| | | } |
| | | } |
New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <module org.jetbrains.idea.maven.project.MavenProjectsManager.isMavenModule="true" type="JAVA_MODULE" version="4"> |
| | | <component name="FacetManager"> |
| | | <facet type="Spring" name="Spring"> |
| | | <configuration /> |
| | | </facet> |
| | | </component> |
| | | <component name="NewModuleRootManager" LANGUAGE_LEVEL="JDK_1_8"> |
| | | <output url="file://$MODULE_DIR$/target/classes" /> |
| | | <output-test url="file://$MODULE_DIR$/target/test-classes" /> |
| | | <content url="file://$MODULE_DIR$"> |
| | | <sourceFolder url="file://$MODULE_DIR$/src/main/java" isTestSource="false" /> |
| | | <excludeFolder url="file://$MODULE_DIR$/target" /> |
| | | </content> |
| | | <orderEntry type="inheritedJdk" /> |
| | | <orderEntry type="sourceFolder" forTests="false" /> |
| | | <orderEntry type="library" name="Maven: cn.hutool:hutool-core:5.6.7" level="project" /> |
| | | <orderEntry type="library" name="Maven: org.springframework:spring-context:5.2.9.RELEASE" level="project" /> |
| | | <orderEntry type="library" name="Maven: org.springframework:spring-aop:5.2.9.RELEASE" level="project" /> |
| | | <orderEntry type="library" name="Maven: org.springframework:spring-beans:5.2.9.RELEASE" level="project" /> |
| | | <orderEntry type="library" name="Maven: org.springframework:spring-core:5.2.9.RELEASE" level="project" /> |
| | | <orderEntry type="library" name="Maven: org.springframework:spring-jcl:5.2.9.RELEASE" level="project" /> |
| | | <orderEntry type="library" name="Maven: org.springframework:spring-expression:5.2.9.RELEASE" level="project" /> |
| | | <orderEntry type="library" name="Maven: org.projectlombok:lombok:1.18.12" level="project" /> |
| | | <orderEntry type="library" name="Maven: ch.qos.logback:logback-classic:1.1.11" level="project" /> |
| | | <orderEntry type="library" name="Maven: ch.qos.logback:logback-core:1.1.11" level="project" /> |
| | | <orderEntry type="library" name="Maven: org.slf4j:slf4j-api:1.7.25" level="project" /> |
| | | <orderEntry type="library" name="Maven: org.apache.tomcat.embed:tomcat-embed-core:9.0.38" level="project" /> |
| | | <orderEntry type="library" name="Maven: org.apache.tomcat:tomcat-annotations-api:9.0.38" level="project" /> |
| | | <orderEntry type="library" name="Maven: org.apache.commons:commons-lang3:3.10" level="project" /> |
| | | <orderEntry type="library" name="Maven: com.alibaba:fastjson:1.2.74" level="project" /> |
| | | <orderEntry type="library" name="Maven: org.springframework:spring-web:5.2.9.RELEASE" level="project" /> |
| | | <orderEntry type="library" name="Maven: com.fasterxml.jackson.core:jackson-annotations:2.11.2" level="project" /> |
| | | <orderEntry type="library" name="Maven: eu.bitwalker:UserAgentUtils:1.21" level="project" /> |
| | | <orderEntry type="library" name="Maven: org.springframework:spring-webmvc:5.2.9.RELEASE" level="project" /> |
| | | <orderEntry type="library" name="Maven: io.springfox:springfox-swagger2:2.9.2" level="project" /> |
| | | <orderEntry type="library" name="Maven: io.swagger:swagger-annotations:1.5.20" level="project" /> |
| | | <orderEntry type="library" name="Maven: io.swagger:swagger-models:1.5.20" level="project" /> |
| | | <orderEntry type="library" name="Maven: io.springfox:springfox-spi:2.9.2" level="project" /> |
| | | <orderEntry type="library" name="Maven: io.springfox:springfox-core:2.9.2" level="project" /> |
| | | <orderEntry type="library" name="Maven: net.bytebuddy:byte-buddy:1.10.14" level="project" /> |
| | | <orderEntry type="library" name="Maven: io.springfox:springfox-schema:2.9.2" level="project" /> |
| | | <orderEntry type="library" name="Maven: io.springfox:springfox-swagger-common:2.9.2" level="project" /> |
| | | <orderEntry type="library" name="Maven: io.springfox:springfox-spring-web:2.9.2" level="project" /> |
| | | <orderEntry type="library" name="Maven: com.google.guava:guava:29.0-jre" level="project" /> |
| | | <orderEntry type="library" name="Maven: com.google.guava:failureaccess:1.0.1" level="project" /> |
| | | <orderEntry type="library" name="Maven: com.google.guava:listenablefuture:9999.0-empty-to-avoid-conflict-with-guava" level="project" /> |
| | | <orderEntry type="library" name="Maven: com.google.code.findbugs:jsr305:3.0.2" level="project" /> |
| | | <orderEntry type="library" name="Maven: org.checkerframework:checker-qual:2.11.1" level="project" /> |
| | | <orderEntry type="library" name="Maven: com.google.errorprone:error_prone_annotations:2.3.4" level="project" /> |
| | | <orderEntry type="library" name="Maven: com.google.j2objc:j2objc-annotations:1.3" level="project" /> |
| | | <orderEntry type="library" name="Maven: com.fasterxml:classmate:1.5.1" level="project" /> |
| | | <orderEntry type="library" name="Maven: org.springframework.plugin:spring-plugin-core:1.2.0.RELEASE" level="project" /> |
| | | <orderEntry type="library" name="Maven: org.springframework.plugin:spring-plugin-metadata:1.2.0.RELEASE" level="project" /> |
| | | <orderEntry type="library" name="Maven: org.mapstruct:mapstruct:1.2.0.Final" level="project" /> |
| | | <orderEntry type="library" name="Maven: io.jsonwebtoken:jjwt:0.9.1" level="project" /> |
| | | <orderEntry type="library" name="Maven: com.fasterxml.jackson.core:jackson-databind:2.11.2" level="project" /> |
| | | <orderEntry type="library" name="Maven: com.fasterxml.jackson.core:jackson-core:2.11.2" level="project" /> |
| | | <orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-data-redis:2.4.0" level="project" /> |
| | | <orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter:2.3.4.RELEASE" level="project" /> |
| | | <orderEntry type="library" name="Maven: org.springframework.boot:spring-boot:2.3.4.RELEASE" level="project" /> |
| | | <orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-autoconfigure:2.3.4.RELEASE" level="project" /> |
| | | <orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-logging:2.3.4.RELEASE" level="project" /> |
| | | <orderEntry type="library" name="Maven: org.apache.logging.log4j:log4j-to-slf4j:2.13.3" level="project" /> |
| | | <orderEntry type="library" name="Maven: org.apache.logging.log4j:log4j-api:2.13.3" level="project" /> |
| | | <orderEntry type="library" name="Maven: org.slf4j:jul-to-slf4j:1.7.30" level="project" /> |
| | | <orderEntry type="library" name="Maven: jakarta.annotation:jakarta.annotation-api:1.3.5" level="project" /> |
| | | <orderEntry type="library" name="Maven: org.yaml:snakeyaml:1.26" level="project" /> |
| | | <orderEntry type="library" name="Maven: org.springframework.data:spring-data-redis:2.3.4.RELEASE" level="project" /> |
| | | <orderEntry type="library" name="Maven: org.springframework.data:spring-data-keyvalue:2.3.4.RELEASE" level="project" /> |
| | | <orderEntry type="library" name="Maven: org.springframework.data:spring-data-commons:2.3.4.RELEASE" level="project" /> |
| | | <orderEntry type="library" name="Maven: org.springframework:spring-tx:5.2.9.RELEASE" level="project" /> |
| | | <orderEntry type="library" name="Maven: org.springframework:spring-oxm:5.2.9.RELEASE" level="project" /> |
| | | <orderEntry type="library" name="Maven: org.springframework:spring-context-support:5.2.9.RELEASE" level="project" /> |
| | | <orderEntry type="library" name="Maven: io.lettuce:lettuce-core:5.3.4.RELEASE" level="project" /> |
| | | <orderEntry type="library" name="Maven: io.netty:netty-common:4.1.52.Final" level="project" /> |
| | | <orderEntry type="library" name="Maven: io.netty:netty-handler:4.1.52.Final" level="project" /> |
| | | <orderEntry type="library" name="Maven: io.netty:netty-resolver:4.1.52.Final" level="project" /> |
| | | <orderEntry type="library" name="Maven: io.netty:netty-buffer:4.1.52.Final" level="project" /> |
| | | <orderEntry type="library" name="Maven: io.netty:netty-codec:4.1.52.Final" level="project" /> |
| | | <orderEntry type="library" name="Maven: io.netty:netty-transport:4.1.52.Final" level="project" /> |
| | | <orderEntry type="library" name="Maven: io.projectreactor:reactor-core:3.3.10.RELEASE" level="project" /> |
| | | <orderEntry type="library" name="Maven: org.reactivestreams:reactive-streams:1.0.3" level="project" /> |
| | | <orderEntry type="library" name="Maven: org.springframework.cloud:spring-cloud-starter-openfeign:2.2.6.RELEASE" level="project" /> |
| | | <orderEntry type="library" name="Maven: org.springframework.cloud:spring-cloud-starter:2.2.6.RELEASE" level="project" /> |
| | | <orderEntry type="library" name="Maven: org.springframework.cloud:spring-cloud-context:2.2.6.RELEASE" level="project" /> |
| | | <orderEntry type="library" name="Maven: org.springframework.security:spring-security-rsa:1.0.9.RELEASE" level="project" /> |
| | | <orderEntry type="library" name="Maven: org.bouncycastle:bcpkix-jdk15on:1.64" level="project" /> |
| | | <orderEntry type="library" name="Maven: org.bouncycastle:bcprov-jdk15on:1.64" level="project" /> |
| | | <orderEntry type="library" name="Maven: org.springframework.cloud:spring-cloud-openfeign-core:2.2.6.RELEASE" level="project" /> |
| | | <orderEntry type="library" name="Maven: org.springframework.cloud:spring-cloud-netflix-ribbon:2.2.6.RELEASE" level="project" /> |
| | | <orderEntry type="library" name="Maven: org.springframework.cloud:spring-cloud-netflix-archaius:2.2.6.RELEASE" level="project" /> |
| | | <orderEntry type="library" name="Maven: io.github.openfeign.form:feign-form-spring:3.8.0" level="project" /> |
| | | <orderEntry type="library" name="Maven: io.github.openfeign.form:feign-form:3.8.0" level="project" /> |
| | | <orderEntry type="library" name="Maven: commons-fileupload:commons-fileupload:1.3.3" level="project" /> |
| | | <orderEntry type="library" name="Maven: commons-io:commons-io:2.5" level="project" /> |
| | | <orderEntry type="library" name="Maven: org.springframework.cloud:spring-cloud-commons:2.2.6.RELEASE" level="project" /> |
| | | <orderEntry type="library" name="Maven: org.springframework.security:spring-security-crypto:5.3.4.RELEASE" level="project" /> |
| | | <orderEntry type="library" name="Maven: io.github.openfeign:feign-core:10.10.1" level="project" /> |
| | | <orderEntry type="library" name="Maven: io.github.openfeign:feign-slf4j:10.10.1" level="project" /> |
| | | <orderEntry type="library" name="Maven: io.github.openfeign:feign-hystrix:10.10.1" level="project" /> |
| | | <orderEntry type="library" name="Maven: com.netflix.archaius:archaius-core:0.7.6" level="project" /> |
| | | <orderEntry type="library" scope="RUNTIME" name="Maven: commons-configuration:commons-configuration:1.8" level="project" /> |
| | | <orderEntry type="library" scope="RUNTIME" name="Maven: commons-lang:commons-lang:2.6" level="project" /> |
| | | <orderEntry type="library" name="Maven: com.netflix.hystrix:hystrix-core:1.5.18" level="project" /> |
| | | <orderEntry type="library" name="Maven: io.reactivex:rxjava:1.3.8" level="project" /> |
| | | <orderEntry type="library" name="Maven: org.hdrhistogram:HdrHistogram:2.1.9" level="project" /> |
| | | <orderEntry type="library" name="Maven: org.apache.commons:commons-pool2:2.6.2" level="project" /> |
| | | <orderEntry type="library" name="Maven: commons-net:commons-net:3.6" level="project" /> |
| | | <orderEntry type="library" name="Maven: com.alibaba:easyexcel:2.2.6" level="project" /> |
| | | <orderEntry type="library" name="Maven: org.apache.poi:poi:3.17" level="project" /> |
| | | <orderEntry type="library" name="Maven: org.apache.commons:commons-collections4:4.1" level="project" /> |
| | | <orderEntry type="library" name="Maven: org.apache.poi:poi-ooxml:3.17" level="project" /> |
| | | <orderEntry type="library" name="Maven: com.github.virtuald:curvesapi:1.04" level="project" /> |
| | | <orderEntry type="library" name="Maven: org.apache.poi:poi-ooxml-schemas:3.17" level="project" /> |
| | | <orderEntry type="library" name="Maven: org.apache.xmlbeans:xmlbeans:2.6.0" level="project" /> |
| | | <orderEntry type="library" name="Maven: stax:stax-api:1.0.1" level="project" /> |
| | | <orderEntry type="library" name="Maven: cglib:cglib:3.1" level="project" /> |
| | | <orderEntry type="library" name="Maven: org.ow2.asm:asm:4.2" level="project" /> |
| | | <orderEntry type="library" name="Maven: org.ehcache:ehcache:3.8.1" level="project" /> |
| | | <orderEntry type="library" name="Maven: org.glassfish.jaxb:jaxb-runtime:2.3.3" level="project" /> |
| | | <orderEntry type="library" name="Maven: jakarta.xml.bind:jakarta.xml.bind-api:2.3.3" level="project" /> |
| | | <orderEntry type="library" name="Maven: org.glassfish.jaxb:txw2:2.3.3" level="project" /> |
| | | <orderEntry type="library" name="Maven: com.sun.istack:istack-commons-runtime:3.0.11" level="project" /> |
| | | <orderEntry type="library" scope="RUNTIME" name="Maven: com.sun.activation:jakarta.activation:1.2.2" level="project" /> |
| | | <orderEntry type="library" name="Maven: com.jcraft:jsch:0.1.53" level="project" /> |
| | | <orderEntry type="library" name="Maven: jakarta.validation:jakarta.validation-api:2.0.2" level="project" /> |
| | | <orderEntry type="library" name="Maven: org.hibernate.validator:hibernate-validator:6.1.5.Final" level="project" /> |
| | | <orderEntry type="library" name="Maven: org.jboss.logging:jboss-logging:3.4.1.Final" level="project" /> |
| | | <orderEntry type="library" name="Maven: com.belerweb:pinyin4j:2.5.1" level="project" /> |
| | | <orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-aop:2.3.4.RELEASE" level="project" /> |
| | | <orderEntry type="library" name="Maven: org.aspectj:aspectjweaver:1.9.6" level="project" /> |
| | | <orderEntry type="library" name="Maven: org.apache.httpcomponents:httpclient:4.5.12" level="project" /> |
| | | <orderEntry type="library" name="Maven: org.apache.httpcomponents:httpcore:4.4.13" level="project" /> |
| | | <orderEntry type="library" name="Maven: org.jdom:jdom2:2.0.5" level="project" /> |
| | | <orderEntry type="library" name="Maven: org.json:json:20160810" level="project" /> |
| | | <orderEntry type="library" name="Maven: commons-codec:commons-codec:1.9" level="project" /> |
| | | <orderEntry type="library" name="Maven: com.tencentcloudapi:tencentcloud-sdk-java:3.1.286" level="project" /> |
| | | <orderEntry type="library" name="Maven: commons-logging:commons-logging:1.2" level="project" /> |
| | | <orderEntry type="library" name="Maven: com.squareup.okio:okio:1.12.0" level="project" /> |
| | | <orderEntry type="library" name="Maven: com.squareup.okhttp:okhttp:2.7.5" level="project" /> |
| | | <orderEntry type="library" name="Maven: com.google.code.gson:gson:2.8.6" level="project" /> |
| | | <orderEntry type="library" name="Maven: javax.xml.bind:jaxb-api:2.3.1" level="project" /> |
| | | <orderEntry type="library" name="Maven: javax.activation:javax.activation-api:1.2.0" level="project" /> |
| | | <orderEntry type="library" name="Maven: com.squareup.okhttp:logging-interceptor:2.7.5" level="project" /> |
| | | <orderEntry type="library" name="Maven: cn.hutool:hutool-all:5.6.7" level="project" /> |
| | | <orderEntry type="library" name="Maven: com.esotericsoftware:reflectasm:1.11.9" level="project" /> |
| | | <orderEntry type="library" name="Maven: cn.afterturn:easypoi-base:4.1.0" level="project" /> |
| | | <orderEntry type="library" name="Maven: ognl:ognl:3.2.6" level="project" /> |
| | | <orderEntry type="library" name="Maven: org.javassist:javassist:3.20.0-GA" level="project" /> |
| | | <orderEntry type="library" name="Maven: javax.validation:validation-api:2.0.1.Final" level="project" /> |
| | | <orderEntry type="library" name="Maven: cn.afterturn:easypoi-annotation:4.1.0" level="project" /> |
| | | </component> |
| | | </module> |
New file |
| | |
| | | package com.panzhihua.common.model.dtos.community.easyPhoto; |
| | | |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | @Data |
| | | @ApiModel("添加随手拍活动请求参数") |
| | | public class AddEasyPhotoClassifyDTO { |
| | | |
| | | @ApiModelProperty("随手拍分类id") |
| | | private Long id; |
| | | |
| | | @ApiModelProperty("随手拍分类名称") |
| | | private String name; |
| | | |
| | | @ApiModelProperty("权重") |
| | | private Integer weight; |
| | | |
| | | @ApiModelProperty("备注") |
| | | private String remark; |
| | | |
| | | @ApiModelProperty(value = "分页每页数量",example = "10") |
| | | private Long pageSize = 10L; |
| | | |
| | | @ApiModelProperty(value = "分页当前记录数",example = "1") |
| | | private Long pageNum = 1L; |
| | | |
| | | } |
New file |
| | |
| | | package com.panzhihua.common.model.dtos.community.easyPhoto; |
| | | |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | import java.io.Serializable; |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | |
| | | @Data |
| | | public class ExportEasyPhotoDTO { |
| | | @ApiModelProperty(value = "批量勾选时传参数组") |
| | | private List<Integer> ids; |
| | | @ApiModelProperty(value = "关键词") |
| | | private String keyWord; |
| | | @ApiModelProperty("社区id") |
| | | private Long communityId; |
| | | private Integer type; |
| | | @ApiModelProperty("处理人名字") |
| | | private String handlerName; |
| | | @ApiModelProperty("查询-创建开始时间") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") |
| | | private Date createBegin; |
| | | |
| | | @ApiModelProperty("查询-创建结束时间") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") |
| | | private Date createEnd; |
| | | @ApiModelProperty("城管安排状态") |
| | | private Integer urbanStatus; |
| | | } |
| | |
| | | @ApiModelProperty(value = "是否需要反馈 1 是 0 不是",example = "0") |
| | | private Integer isNeedFeedBack; |
| | | |
| | | @ApiModelProperty("操作类型 1审核通过 2驳回 3反馈 4.完成随手拍") |
| | | @ApiModelProperty("操作类型 1处理随手拍 2驳回 3反馈 4.完成随手拍") |
| | | private Integer type; |
| | | |
| | | @ApiModelProperty(value = "登录用户id",hidden = true) |
| | |
| | | @ApiModelProperty(value = "发生地址经纬度信息,逗号分割(长的在前面,短的在后面)") |
| | | private String lngLat; |
| | | |
| | | @ApiModelProperty(value = "随手拍标签(1.优质 2.精良 3.普通 4.一般)") |
| | | @ApiModelProperty(value = "随手拍标签(1.优质 2.精良 3.普通 4.一般 5.无)") |
| | | private Integer activityType; |
| | | |
| | | @ApiModelProperty(value = "参加活动奖励金额") |
| | |
| | | @ApiModelProperty(value = "完成人名称") |
| | | private String completeName; |
| | | |
| | | @ApiModelProperty(value = "是否上报城管 0未上报 1已上报 2已退回") |
| | | private Integer isReportUrban; |
| | | |
| | | @ApiModelProperty(value = "城管移交说明(备注)") |
| | | private String transferReason; |
| | | |
| | | @ApiModelProperty("移交时间") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") |
| | | private Date transferTime; |
| | | |
| | | @ApiModelProperty(value = "城管安排状态 0未安排 1已安排 2已处理") |
| | | private Integer urbanStatus; |
| | | |
| | | @ApiModelProperty(value = "社区名字") |
| | | private String communityName; |
| | | |
| | | @ApiModelProperty(value = "随手拍分类id") |
| | | private Long classifyId; |
| | | |
| | | @ApiModelProperty(value = "随手拍分类名称") |
| | | private String classifyName; |
| | | |
| | | /** |
| | | * 是否上报城管 0未上报 1已上报 2已退回 |
| | | */ |
| | | public interface isReportUrban{ |
| | | int no = 0; |
| | | int yes = 1; |
| | | int ret = 2; |
| | | } |
| | | } |
New file |
| | |
| | | package com.panzhihua.common.model.vos.community.easyPhoto; |
| | | |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | @Data |
| | | @ApiModel("随手拍分类返回参数") |
| | | public class ComActEasyPhotoClassifyVO { |
| | | |
| | | @ApiModelProperty("随手拍分类id") |
| | | private Long id; |
| | | |
| | | @ApiModelProperty("随手拍分类名称") |
| | | private String name; |
| | | |
| | | @ApiModelProperty("权重") |
| | | private Integer weight; |
| | | |
| | | @ApiModelProperty("备注") |
| | | private String remark; |
| | | |
| | | } |
New file |
| | |
| | | package com.panzhihua.common.model.vos.community.easyPhoto; |
| | | |
| | | import lombok.Data; |
| | | |
| | | @Data |
| | | public class ComActEasyPhotoCountVO { |
| | | private Integer total; |
| | | private Integer today; |
| | | } |
New file |
| | |
| | | package com.panzhihua.common.model.vos.community.easyPhoto; |
| | | |
| | | import com.alibaba.excel.annotation.ExcelProperty; |
| | | import lombok.Data; |
| | | |
| | | import java.util.Date; |
| | | |
| | | @Data |
| | | public class ExportEasyPhotoVO { |
| | | @ExcelProperty("所属社区") |
| | | private String communityName; |
| | | @ExcelProperty("发起人") |
| | | private String sponsorName; |
| | | @ExcelProperty("事件详情") |
| | | private String detail; |
| | | @ExcelProperty("发生地点") |
| | | private String happenAddr; |
| | | @ExcelProperty("事件类型") |
| | | private String photoType="其他"; |
| | | @ExcelProperty("联系电话") |
| | | private String phone; |
| | | @ExcelProperty("处理人名字") |
| | | private String handlerName; |
| | | @ExcelProperty("创建时间") |
| | | private Date createAt; |
| | | } |
| | |
| | | @ApiModelProperty("未填报党员") |
| | | private Integer noPartymemberCount = 0; |
| | | @ApiModelProperty("填报率") |
| | | private Integer tag = 0; |
| | | private BigDecimal tag = BigDecimal.ZERO; |
| | | @ApiModelProperty("社区小程序用户总人数") |
| | | private Integer userCount = 0; |
| | | |
| | | |
| | | } |
| | |
| | | import com.panzhihua.common.model.dtos.community.bigscreen.work.ScreenActActivityPeopleListDTO; |
| | | import com.panzhihua.common.model.dtos.community.bigscreen.work.ScreenDiscussListDTO; |
| | | import com.panzhihua.common.model.dtos.community.bigscreen.work.ScreenMicroListDTO; |
| | | import com.panzhihua.common.model.dtos.community.easyPhoto.AddEasyPhotoActivityDTO; |
| | | import com.panzhihua.common.model.dtos.community.easyPhoto.EditEasyPhotoActivityDTO; |
| | | import com.panzhihua.common.model.dtos.community.easyPhoto.PageEasyPhotoActivityDTO; |
| | | import com.panzhihua.common.model.dtos.community.easyPhoto.PageEasyPhotoActivityUserDTO; |
| | | import com.panzhihua.common.model.dtos.community.easyPhoto.*; |
| | | import com.panzhihua.common.model.dtos.community.integral.ComActIntegralCommunityRankDTO; |
| | | import com.panzhihua.common.model.dtos.community.integral.admin.AddComActIntegralUserDTO; |
| | | import com.panzhihua.common.model.dtos.community.integral.admin.EditComActIntegralRuleDTO; |
| | |
| | | @PostMapping("puteasyphotostatus") |
| | | R putEasypHotoStatus(@RequestBody ComActEasyPhotoVO comActEasyPhotoVO); |
| | | |
| | | /** |
| | | * 城管随手拍统计 |
| | | */ |
| | | @PostMapping("/esayPhotoCount") |
| | | R esayphotoCount(@RequestBody ComActEasyPhotoVO comActEasyPhotoVO); |
| | | |
| | | /** |
| | | * |
| | | * 城管安排 |
| | | */ |
| | | @PostMapping("updatePageeasyphoto") |
| | | R updatePageeasyphoto(@RequestBody ComActEasyPhotoVO comActEasyPhotoVO); |
| | | /** |
| | | * |
| | | * 随手拍城管导出 |
| | | */ |
| | | @PostMapping("exportEasyPhoto") |
| | | R exportEasyPhoto(@RequestBody ExportEasyPhotoDTO exportEasyPhotoDTO); |
| | | /** |
| | | * 新增社区 |
| | | * |
| | |
| | | @PostMapping("timedTaskActivityNotice") |
| | | R timedTaskActivityNotice(); |
| | | |
| | | /** |
| | | * 定时任务检测待发布,调研中的问卷调查状态 |
| | | */ |
| | | @PostMapping("timedTaskQuestionnaire") |
| | | R timedTaskQuestionnaire(); |
| | | |
| | |
| | | * @return 问卷调查统计汇总表头统计数据 |
| | | */ |
| | | @GetMapping("/questnaire/statisticsSummary/header") |
| | | R statisticsSummaryHeader(@RequestParam("questId") Long questId); |
| | | R statisticsSummaryHeader(@RequestParam("questId") Long questId,@RequestParam("communityId") Long communityId); |
| | | |
| | | |
| | | /** |
| | | * 运营后台-新增随手拍分类 |
| | | * @param addPhotoClassify 请求参数 |
| | | * @return 新增结果 |
| | | */ |
| | | @PostMapping("/classify/admin/add") |
| | | R addPhotoClassify(@RequestBody AddEasyPhotoClassifyDTO addPhotoClassify); |
| | | |
| | | /** |
| | | * 运营后台-编辑随手拍分类 |
| | | * @param addPhotoClassify 请求参数 |
| | | * @return 编辑结果 |
| | | */ |
| | | @PostMapping("/classify/admin/edit") |
| | | R editPhotoClassify(@RequestBody AddEasyPhotoClassifyDTO addPhotoClassify); |
| | | |
| | | /** |
| | | * 运营后台-分页查询随手拍分类 |
| | | * @param addPhotoClassify 请求参数 |
| | | * @return 随手拍分类列表 |
| | | */ |
| | | @PostMapping("/classify/admin/page") |
| | | R pagePhotoClassify(@RequestBody AddEasyPhotoClassifyDTO addPhotoClassify); |
| | | |
| | | /** |
| | | * 运营后台-随手拍分类详情 |
| | | * @param id 随手拍分类id |
| | | * @return 随手拍分类 |
| | | */ |
| | | @GetMapping("/classify/admin/detail") |
| | | R detailPhotoClassify(@RequestParam("id") Long id); |
| | | |
| | | /** |
| | | * 运营后台-随手拍分类删除 |
| | | * @param id 随手拍分类id |
| | | * @return 删除结果 |
| | | */ |
| | | @GetMapping("/classify/admin/delete") |
| | | R deletePhotoClassify(@RequestParam("id") Long id); |
| | | |
| | | /** |
| | | * 运营后台-查询随手拍分类列表 |
| | | * @return 随手拍分类列表 |
| | | */ |
| | | @GetMapping("/classify/admin/list") |
| | | R listPhotoClassify(); |
| | | |
| | | /** |
| | | * 社区后台-切换随手拍公示状态 |
| | | * @param comActEasyPhotoVO 请求参数 |
| | | * @return 切换结果 |
| | | */ |
| | | @PostMapping("/easyphoto/switch/publicity") |
| | | R easyPhotoSwitchPublicity(@RequestBody ComActEasyPhotoVO comActEasyPhotoVO); |
| | | |
| | | /** |
| | | * 查询社区待处理随手拍id集合 |
| | | * @param communityId 社区id |
| | | * @return 社区待处理随手拍id集合 |
| | | */ |
| | | @GetMapping("/easyphoto/noHandle/list") |
| | | R easyPhotoNoHandleList(@RequestParam("communityId") Long communityId); |
| | | } |
| | |
| | | */ |
| | | @GetMapping("getUserOpenId") |
| | | R getUserOpenId(@RequestParam("userId")Long userId); |
| | | |
| | | /** |
| | | * 查询社区后台工作人员列表 |
| | | * @param communityId 社区id |
| | | * @return 社区后台工作人员列表 |
| | | */ |
| | | @GetMapping("getUserListByCommunityId") |
| | | R getUserListByCommunityId(@RequestParam("communityId")Long communityId); |
| | | } |
| | |
| | | package com.panzhihua.community_backstage.api; |
| | | |
| | | import com.alibaba.excel.EasyExcel; |
| | | import com.alibaba.excel.ExcelWriter; |
| | | import com.alibaba.excel.write.metadata.WriteSheet; |
| | | import com.alibaba.fastjson.JSONArray; |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.panzhihua.common.controller.BaseController; |
| | | import com.panzhihua.common.model.dtos.community.GrantRewardDTO; |
| | | import com.panzhihua.common.model.dtos.community.easyPhoto.ExportEasyPhotoDTO; |
| | | import com.panzhihua.common.model.dtos.community.integral.admin.AddComActIntegralUserDTO; |
| | | import com.panzhihua.common.model.vos.LoginUserInfoVO; |
| | | import com.panzhihua.common.model.vos.R; |
| | | import com.panzhihua.common.model.vos.community.*; |
| | | import com.panzhihua.common.model.vos.community.easyPhoto.ComActEasyPhotoClassifyVO; |
| | | import com.panzhihua.common.model.vos.community.easyPhoto.ComActEasyPhotoStatisticsVO; |
| | | import com.panzhihua.common.model.vos.partybuilding.ActivityManagerVO; |
| | | import com.panzhihua.common.model.vos.user.SysUserNoticeVO; |
| | | import com.panzhihua.common.service.community.CommunityService; |
| | | import com.panzhihua.common.service.user.UserService; |
| | | import com.panzhihua.common.utlis.DateUtils; |
| | | import com.panzhihua.common.utlis.StringUtils; |
| | | import com.panzhihua.common.utlis.WxUtil; |
| | | import com.panzhihua.common.utlis.WxXCXTempSend; |
| | | import com.panzhihua.common.utlis.*; |
| | | import com.panzhihua.common.model.vos.community.easyPhoto.ExportEasyPhotoVO; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiImplicitParam; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.beans.factory.annotation.Value; |
| | | import org.springframework.util.ObjectUtils; |
| | | import org.springframework.validation.annotation.Validated; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import javax.annotation.Resource; |
| | | import javax.validation.Valid; |
| | | import java.io.File; |
| | | import java.io.FileInputStream; |
| | | import java.io.InputStream; |
| | | import java.math.BigDecimal; |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | import java.util.stream.Collectors; |
| | | |
| | | /** |
| | | * @program: springcloud_k8s_panzhihuazhihuishequ |
| | |
| | | private UserService userService; |
| | | @Resource |
| | | private CommunityService communityService; |
| | | @Value("${excel.userurl}") |
| | | private String excelUrl; |
| | | |
| | | // FTP 登录用户名 |
| | | @Value("${ftp.username}") |
| | | private String userName; |
| | | // FTP 登录密码 |
| | | @Value("${ftp.password}") |
| | | private String password; |
| | | // FTP 服务器地址IP地址 |
| | | @Value("${ftp.host}") |
| | | private String host; |
| | | // FTP 端口 |
| | | @Value("${ftp.port}") |
| | | private int port; |
| | | |
| | | @ApiOperation(value = "活动负责人下拉选择", response = ActivityManagerVO.class) |
| | | @GetMapping("listactivitymanager") |
| | |
| | | comActEasyPhotoVO.setCommunityId(communityId); |
| | | // comActEasyPhotoVO.setBackUserId(userId); |
| | | return communityService.pageEasyPhoto(comActEasyPhotoVO); |
| | | } |
| | | |
| | | @ApiOperation(value = "城管分页查询随手拍") |
| | | @PostMapping("pageeasyphoto/urban") |
| | | public R pageEasyPhotoUrban(@RequestBody ComActEasyPhotoVO comActEasyPhotoVO) { |
| | | comActEasyPhotoVO.setIsReportUrban(1); |
| | | return communityService.pageEasyPhoto(comActEasyPhotoVO); |
| | | } |
| | | |
| | | @ApiOperation(value = "城管随手拍统计") |
| | | @PostMapping("pageeasyphoto/urbanCount") |
| | | public R pageEasyPhotoUrbanCount(@RequestBody ComActEasyPhotoVO comActEasyPhotoVO) { |
| | | return communityService.esayphotoCount(comActEasyPhotoVO); |
| | | } |
| | | |
| | | /** |
| | | * 城管安排 |
| | | * |
| | | * @param comActEasyPhotoVO 查询参数 |
| | | * @return 心愿列表 |
| | | */ |
| | | @ApiOperation(value = "城管安排") |
| | | @PostMapping("updatePageeasyphoto") |
| | | public R updatePageeasyphoto(@RequestBody ComActEasyPhotoVO comActEasyPhotoVO) { |
| | | return communityService.updatePageeasyphoto(comActEasyPhotoVO); |
| | | } |
| | | @ApiOperation(value = "城管随手拍导出") |
| | | @PostMapping("exportEasyPhoto") |
| | | public R exportEasyPhoto(@RequestBody ExportEasyPhotoDTO exportEasyPhotoDTO){ |
| | | String url = excelUrl; |
| | | String name = "随手拍.xlsx"; |
| | | String ftpUrl = "/mnt/data/web/excel/"; |
| | | R r=communityService.exportEasyPhoto(exportEasyPhotoDTO); |
| | | if(R.isOk(r)){ |
| | | List<ExportEasyPhotoVO> comActEasyPhotoVOS = JSONArray.parseArray(JSONArray.toJSONString(r.getData()), ExportEasyPhotoVO.class); |
| | | try { |
| | | SFTPUtil sftp = new SFTPUtil(userName, password, host, port); |
| | | sftp.login(); |
| | | boolean existDir = sftp.isExistDir(ftpUrl + name); |
| | | if (!existDir) { |
| | | String property = System.getProperty("user.dir"); |
| | | String fileName = property + File.separator + name; |
| | | // 这里 需要指定写用哪个class去写 |
| | | ExcelWriter excelWriter = null; |
| | | InputStream inputStream = null; |
| | | try { |
| | | excelWriter = EasyExcel.write(fileName, ExportEasyPhotoVO.class).build(); |
| | | WriteSheet writeSheet = EasyExcel.writerSheet("随手拍导出").build(); |
| | | excelWriter.write(comActEasyPhotoVOS, writeSheet); |
| | | excelWriter.finish(); |
| | | File file = new File(fileName); |
| | | inputStream = new FileInputStream(file); |
| | | sftp.uploadMore(ftpUrl, name, inputStream); |
| | | sftp.logout(); |
| | | inputStream.close(); |
| | | String absolutePath = file.getAbsolutePath(); |
| | | boolean delete = file.delete(); |
| | | log.info("删除excel【{}】结果【{}】", absolutePath, delete); |
| | | } finally { |
| | | // 千万别忘记finish 会帮忙关闭流 |
| | | if (inputStream != null) { |
| | | inputStream.close(); |
| | | } |
| | | if (excelWriter != null) { |
| | | excelWriter.finish(); |
| | | } |
| | | } |
| | | } |
| | | return R.ok(url + name); |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | | log.error("文件传输失败【{}】", e.getMessage()); |
| | | return R.fail(); |
| | | } |
| | | } |
| | | return R.fail("未查询到数据"); |
| | | } |
| | | @ApiOperation(value = "查询所有社区列表") |
| | | @GetMapping("community/list") |
| | | public R getCommunityLists(){ |
| | | return communityService.getCommunityLists(); |
| | | } |
| | | |
| | | @ApiOperation(value = "随手拍详情", response = ComActEasyPhotoVO.class) |
| | |
| | | return communityService.grantReward(grantRewardDTO); |
| | | } |
| | | |
| | | @ApiOperation(value = "随手拍分类列表", response = ComActEasyPhotoClassifyVO.class) |
| | | @GetMapping("easyphoto/classify/list") |
| | | public R easyPhotoClassifyList() { |
| | | return communityService.listPhotoClassify(); |
| | | } |
| | | |
| | | @ApiOperation(value = "随手拍切换公示状态", response = ComActEasyPhotoClassifyVO.class) |
| | | @PostMapping("easyphoto/switch/publicity") |
| | | public R easyPhotoSwitchPublicity(@RequestBody ComActEasyPhotoVO comActEasyPhotoVO) { |
| | | return communityService.easyPhotoSwitchPublicity(comActEasyPhotoVO); |
| | | } |
| | | |
| | | @ApiOperation(value = "查询社区后台工作人员列表", response = ComActEasyPhotoClassifyVO.class) |
| | | @GetMapping("easyphoto/user/list") |
| | | public R easyPhotoUserList() { |
| | | LoginUserInfoVO loginUserInfo = this.getLoginUserInfo(); |
| | | if(loginUserInfo == null){ |
| | | return R.fail("请先登录"); |
| | | } |
| | | return userService.getUserListByCommunityId(loginUserInfo.getCommunityId()); |
| | | } |
| | | |
| | | @ApiOperation(value = "查询社区后台待处理随手拍id") |
| | | @GetMapping("easyphoto/noHandle/list") |
| | | public R easyPhotoNoHandleList() { |
| | | LoginUserInfoVO loginUserInfo = this.getLoginUserInfo(); |
| | | if(loginUserInfo == null){ |
| | | return R.fail("请先登录"); |
| | | } |
| | | return communityService.easyPhotoNoHandleList(loginUserInfo.getCommunityId()); |
| | | } |
| | | } |
| | |
| | | if (firstvo != null) { |
| | | Date time = firstvo.getCreateAt(); |
| | | if(time!=null) { |
| | | String sd = new SimpleDateFormat("yyyy-MM-dd hh:mm:ss").format(time); |
| | | String sd = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(time); |
| | | dateStr = sd; |
| | | } |
| | | } |
| | |
| | | @ApiOperation(value = "问卷调查统计汇总表头统计-lyq", response = QuestnaireStatisticsSummaryHeaderAdminVO.class) |
| | | @GetMapping("/statistics/summary/header") |
| | | public R statisticsSummaryHeader(@RequestParam("questId") Long questId) { |
| | | return communityService.statisticsSummaryHeader(questId); |
| | | LoginUserInfoVO loginUserInfo = this.getLoginUserInfo(); |
| | | if(loginUserInfo == null){ |
| | | return R.fail("请先登录"); |
| | | } |
| | | return communityService.statisticsSummaryHeader(questId,loginUserInfo.getCommunityId()); |
| | | } |
| | | |
| | | } |
| | |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.panzhihua.common.exceptions.ServiceException; |
| | | import com.panzhihua.common.model.dtos.community.*; |
| | | import com.panzhihua.common.model.dtos.community.easyPhoto.ExportEasyPhotoDTO; |
| | | import com.panzhihua.common.model.dtos.community.questnaire.StatisticsSummaryDTO; |
| | | import com.panzhihua.common.model.vos.R; |
| | | import com.panzhihua.common.model.vos.SystemmanagementConfigVO; |
| | |
| | | } |
| | | |
| | | /** |
| | | * 城管安排 |
| | | * |
| | | * @param comActEasyPhotoVO 查询参数 |
| | | * @return 心愿列表 |
| | | */ |
| | | @PostMapping("updatePageeasyphoto") |
| | | public R updatePageeasyphoto(@RequestBody ComActEasyPhotoVO comActEasyPhotoVO) { |
| | | return comActEasyPhotoService.updatePageeasyphoto(comActEasyPhotoVO); |
| | | } |
| | | /** |
| | | * 城管导出 |
| | | */ |
| | | @PostMapping("exportEasyPhoto") |
| | | public R exportEasyPhoto(@RequestBody ExportEasyPhotoDTO exportEasyPhotoDTO){ |
| | | return comActEasyPhotoService.export(exportEasyPhotoDTO); |
| | | } |
| | | |
| | | /** |
| | | * 随手拍详情 |
| | | * |
| | | * @param id 随手拍主键 |
| | |
| | | @PostMapping("puteasyphotostatus") |
| | | public R putEasypHotoStatus(@RequestBody ComActEasyPhotoVO comActEasyPhotoVO) { |
| | | return comActEasyPhotoService.putEasypHotoStatus(comActEasyPhotoVO); |
| | | } |
| | | |
| | | /** |
| | | * 城管随手拍统计 |
| | | */ |
| | | @PostMapping("/esayPhotoCount") |
| | | public R esayphotoCount(@RequestBody ComActEasyPhotoVO comActEasyPhotoVO) { |
| | | return comActEasyPhotoService.easyPhotoCount(comActEasyPhotoVO); |
| | | } |
| | | |
| | | /** |
| | |
| | | return comActQuestnaireService.usersAnsweQuestnaire(usersAnswerQuestnaireVO); |
| | | } |
| | | |
| | | /** |
| | | * 小程序-用户弹窗添加不在提醒接口 |
| | | * @param questId 问卷id |
| | | * @param userId 用户id |
| | | * @return 添加结果 |
| | | */ |
| | | @GetMapping("questnaire/add/noNotice") |
| | | public R addNoNotice(@RequestParam("questId") Long questId,@RequestParam("userId") Long userId){ |
| | | return comActQuestnaireService.addNoNotice(questId,userId); |
| | |
| | | return comActActivityService.timedTaskActivityNotice(); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 问卷调查统计汇总 |
| | | * @param summaryDTO 请求参数 |
| | | * @return 统计汇总 |
| | | */ |
| | | @PostMapping("questnaire/statisticsSummary") |
| | | public R statisticsSummary(@RequestBody StatisticsSummaryDTO summaryDTO) { |
| | | return comActQuestnaireService.statisticsSummary(summaryDTO); |
| | | } |
| | | |
| | | /** |
| | | * 问卷调查统计汇总导出数据查询 |
| | | * @param questId 调查问卷id |
| | | * @return 调查统计汇总导出数据 |
| | | */ |
| | | @GetMapping("questnaire/statisticsSummary/export") |
| | | public R statisticsSummaryExport(@RequestParam("questId") Long questId) { |
| | | return comActQuestnaireService.statisticsSummaryExport(questId); |
| | | } |
| | | |
| | | /** |
| | | * 问卷调查统计汇总表头统计 |
| | | * @param questId 调查问卷id |
| | | * @return 问卷调查统计汇总表头统计数据 |
| | | */ |
| | | @GetMapping("questnaire/statisticsSummary/header") |
| | | public R statisticsSummaryHeader(@RequestParam("questId") Long questId) { |
| | | return comActQuestnaireService.statisticsSummaryHeader(questId); |
| | | public R statisticsSummaryHeader(@RequestParam("questId") Long questId,@RequestParam("communityId") Long communityId) { |
| | | return comActQuestnaireService.statisticsSummaryHeader(questId,communityId); |
| | | } |
| | | |
| | | /** |
| | | * 定时任务检测待发布,调研中的问卷调查状态 |
| | | */ |
| | | @PostMapping("timedTaskQuestionnaire") |
| | | public R timedTaskQuestionnaire(){ |
| | | return comActQuestnaireService.timedTaskQuestionnaire(); |
| | | } |
| | | |
| | | /** |
| | | * 小程序-新增问卷调查浏览数量 |
| | | * @param questId 问卷调查id |
| | | * @return 增加结果 |
| | | */ |
| | | @GetMapping("questnaire/add/view") |
| | | public R addQuestnaireView(@RequestParam("questId") Long questId) { |
| | | return comActQuestnaireService.addQuestnaireView(questId); |
| | | } |
| | | |
| | | /** |
| | | * 社区后台-切换随手拍公示状态 |
| | | * @param comActEasyPhotoVO 请求参数 |
| | | * @return 切换结果 |
| | | */ |
| | | @PostMapping("easyphoto/switch/publicity") |
| | | public R easyPhotoSwitchPublicity(@RequestBody ComActEasyPhotoVO comActEasyPhotoVO) { |
| | | return comActEasyPhotoService.easyPhotoSwitchPublicity(comActEasyPhotoVO); |
| | | } |
| | | |
| | | /** |
| | | * 查询社区待处理随手拍id集合 |
| | | * @param communityId 社区id |
| | | * @return 社区待处理随手拍id集合 |
| | | */ |
| | | @GetMapping("easyphoto/noHandle/list") |
| | | public R easyPhotoNoHandleList(@RequestParam("communityId") Long communityId) { |
| | | return comActEasyPhotoService.easyPhotoNoHandleList(communityId); |
| | | } |
| | | } |
New file |
| | |
| | | package com.panzhihua.service_community.api; |
| | | |
| | | import com.panzhihua.common.model.dtos.community.easyPhoto.AddEasyPhotoClassifyDTO; |
| | | import com.panzhihua.common.model.vos.R; |
| | | import com.panzhihua.service_community.service.ComActEasyPhotoClassifyService; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import javax.annotation.Resource; |
| | | |
| | | @Slf4j |
| | | @RestController |
| | | @RequestMapping("/classify") |
| | | public class EasyPhotoClassifyApi { |
| | | |
| | | @Resource |
| | | private ComActEasyPhotoClassifyService comActEasyPhotoClassifyService; |
| | | |
| | | /** |
| | | * 运营后台-新增随手拍分类 |
| | | * @param addPhotoClassify 请求参数 |
| | | * @return 新增结果 |
| | | */ |
| | | @PostMapping("/admin/add") |
| | | public R addPhotoClassify(@RequestBody AddEasyPhotoClassifyDTO addPhotoClassify) { |
| | | return comActEasyPhotoClassifyService.addPhotoClassify(addPhotoClassify); |
| | | } |
| | | |
| | | /** |
| | | * 运营后台-编辑随手拍分类 |
| | | * @param addPhotoClassify 请求参数 |
| | | * @return 编辑结果 |
| | | */ |
| | | @PostMapping("/admin/edit") |
| | | public R editPhotoClassify(@RequestBody AddEasyPhotoClassifyDTO addPhotoClassify) { |
| | | return comActEasyPhotoClassifyService.editPhotoClassify(addPhotoClassify); |
| | | } |
| | | |
| | | /** |
| | | * 运营后台-随手拍分类详情 |
| | | * @param id 随手拍分类id |
| | | * @return 随手拍分类 |
| | | */ |
| | | @GetMapping("/admin/detail") |
| | | public R detailPhotoClassify(@RequestParam("id") Long id) { |
| | | return comActEasyPhotoClassifyService.detailPhotoClassify(id); |
| | | } |
| | | |
| | | /** |
| | | * 运营后台-分页查询随手拍分类 |
| | | * @param addPhotoClassify 请求参数 |
| | | * @return 随手拍分类列表 |
| | | */ |
| | | @PostMapping("/admin/page") |
| | | public R pagePhotoClassify(@RequestBody AddEasyPhotoClassifyDTO addPhotoClassify) { |
| | | return comActEasyPhotoClassifyService.pagePhotoClassify(addPhotoClassify); |
| | | } |
| | | |
| | | /** |
| | | * 运营后台-查询随手拍分类列表 |
| | | * @return 随手拍分类列表 |
| | | */ |
| | | @GetMapping("/admin/list") |
| | | public R listPhotoClassify() { |
| | | return comActEasyPhotoClassifyService.listPhotoClassify(); |
| | | } |
| | | |
| | | /** |
| | | * 运营后台-随手拍分类删除 |
| | | * @param id 随手拍分类id |
| | | * @return 删除结果 |
| | | */ |
| | | @GetMapping("/admin/delete") |
| | | public R deletePhotoClassify(@RequestParam("id") Long id) { |
| | | return comActEasyPhotoClassifyService.deletePhotoClassify(id); |
| | | } |
| | | } |
New file |
| | |
| | | package com.panzhihua.service_community.dao; |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.panzhihua.common.model.dtos.community.easyPhoto.AddEasyPhotoClassifyDTO; |
| | | import com.panzhihua.common.model.vos.community.easyPhoto.ComActEasyPhotoClassifyVO; |
| | | import com.panzhihua.service_community.model.dos.ComActEasyPhotoClassifyDO; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * @auther lyq |
| | | * @create 2021-08-19 15:50:58 |
| | | * @describe 随手拍分类表mapper类 |
| | | */ |
| | | @Mapper |
| | | public interface ComActEasyPhotoClassifyMapper extends BaseMapper<ComActEasyPhotoClassifyDO> { |
| | | |
| | | /** |
| | | * 运营后台-分页查询随手拍分类 |
| | | * @param photoClassifyDTO 请求参数 |
| | | * @return 随手拍分类列表 |
| | | */ |
| | | IPage<ComActEasyPhotoClassifyVO> getPhotoClassifyPage(Page page, @Param("photoClassifyDTO") AddEasyPhotoClassifyDTO photoClassifyDTO); |
| | | |
| | | /** |
| | | * 运营后台-查询随手拍分类列表 |
| | | * @return 随手拍分类列表 |
| | | */ |
| | | List<ComActEasyPhotoClassifyVO> getPhotoClassifyList(); |
| | | |
| | | } |
| | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.panzhihua.common.model.dtos.community.easyPhoto.ExportEasyPhotoDTO; |
| | | import com.panzhihua.common.model.vos.community.ComActEasyPhotoVO; |
| | | import com.panzhihua.common.model.vos.community.TodoEventsVO; |
| | | import com.panzhihua.common.model.vos.community.easyPhoto.ComActEasyPhotoCountVO; |
| | | import com.panzhihua.common.model.vos.community.easyPhoto.ComActEasyPhotoStatisticsVO; |
| | | import com.panzhihua.common.model.vos.community.easyPhoto.ExportEasyPhotoVO; |
| | | import com.panzhihua.common.model.vos.screen.EastPhotoTypeVO; |
| | | import com.panzhihua.common.model.vos.screen.EastPhotoVO; |
| | | import com.panzhihua.common.model.vos.screen.EasyPhotoDataVO; |
| | | import com.panzhihua.common.model.vos.screen.PbWorkVO; |
| | | import com.panzhihua.service_community.model.dos.ComActEasyPhotoDO; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | import org.apache.ibatis.annotations.Param; |
| | |
| | | "p.activity_id, " + |
| | | "p.activity_amount, " + |
| | | "count(pu.id)giveThumbsUpNum, " + |
| | | "p.handle_photo_list " + |
| | | "p.handle_photo_list," + |
| | | "c.name communityName," + |
| | | "p.transfer_time," + |
| | | "p.is_report_urban," + |
| | | "p.transfer_reason," + |
| | | "p.urban_status " + |
| | | "FROM " + |
| | | "com_act_easy_photo p " + |
| | | "JOIN sys_user u on p.sponsor_id=u.user_id " + |
| | | "LEFT JOIN sys_user su on p.handler_id=su.user_id " + |
| | | "LEFT JOIN sys_user su1 on p.complete_id=su1.user_id " + |
| | | "LEFT JOIN com_act_easy_photo_user pu on p.id=pu.easy_photo_id " + |
| | | "LEFT JOIN com_act c on p.community_id=c.community_id " + |
| | | "WHERE p.del_tag = 0 and p.id=#{id}") |
| | | ComActEasyPhotoVO detailEasyPhoto(Long id); |
| | | @Select("SELECT " + |
| | |
| | | "p.feedback_at, " + |
| | | "p.activity_type, " + |
| | | "p.activity_amount, " + |
| | | "p.classify_id, " + |
| | | "class.`name` as classifyName, " + |
| | | "p.examine_at " + |
| | | "FROM " + |
| | | "com_act_easy_photo p " + |
| | |
| | | "left join com_act_easy_photo_user pu ON p.id = pu.easy_photo_id " + |
| | | "left JOIN sys_user su ON p.handler_id = su.user_id " + |
| | | "left JOIN com_act_easy_photo_comment c ON p.id = c.easy_photo_id " + |
| | | "left JOIN com_act_easy_photo_classify class ON p.classify_id = class.id " + |
| | | " <where>" + |
| | | " p.del_tag = 0 " + |
| | | " p.del_tag = 0 and p.is_publicity = 1 " + |
| | | "<if test='comActEasyPhotoVO.communityId != null and comActEasyPhotoVO.communityId != 0'>" + |
| | | " and p.community_id=#{comActEasyPhotoVO.communityId} " + |
| | | " </if> " + |
| | |
| | | " </if> " + |
| | | "<if test='comActEasyPhotoVO.sponsorId == null or comActEasyPhotoVO.sponsorId==0'>" + |
| | | "AND p.`status` in (2,4) " + |
| | | " </if> " + |
| | | "<if test='comActEasyPhotoVO.keyWord != null and comActEasyPhotoVO.keyWord != ""'>" + |
| | | "AND (class.`name` like concat(#{comActEasyPhotoVO.keyWord},'%') or p.detail like concat(#{comActEasyPhotoVO.keyWord},'%')) " + |
| | | " </if> " + |
| | | "group by p.id "+ |
| | | "order by p.create_at desc "+ |
| | |
| | | // " `status` = 1 " + |
| | | // " AND community_id = #{communityId} and del_tag = 0") |
| | | ComActEasyPhotoStatisticsVO getEasyPhotoStatistics(@Param("communityId")Long communityId); |
| | | ComActEasyPhotoCountVO easyPhotoCount(ComActEasyPhotoVO comActEasyPhotoVO); |
| | | List<ExportEasyPhotoVO> export(ExportEasyPhotoDTO exportEasyPhotoDTO); |
| | | List<ExportEasyPhotoVO> exportByIds(List<Integer> ids); |
| | | |
| | | /** |
| | | * 查询社区待处理随手拍id集合 |
| | | * @param communityId 社区id |
| | | * @return 社区待处理随手拍id集合 |
| | | */ |
| | | List<Long> easyPhotoNoHandleIds(@Param("communityId")Long communityId); |
| | | } |
| | |
| | | */ |
| | | QuestnaireDetailAdminVO getQuesDetail(@Param("questId") Long questId,@Param("userId") Long userId); |
| | | |
| | | /** |
| | | * 问卷调查统计汇总 |
| | | * @param summaryDTO 请求参数 |
| | | * @return 统计汇总 |
| | | */ |
| | | IPage<QuestnaireStatisticsSummaryAdminVO> getStatisticsSummaryAdmin(Page page, @Param("summaryDTO") StatisticsSummaryDTO summaryDTO); |
| | | |
| | | /** |
| | | * 问卷调查统计汇总导出数据查询 |
| | | * @param questId 调查问卷id |
| | | * @return 调查统计汇总导出数据 |
| | | */ |
| | | List<QuestnaireStatisticsSummaryExcelAdminVO> getStatisticsSummaryExcelAdmin(@Param("questId") Long questId); |
| | | |
| | | QuestnaireStatisticsSummaryHeaderAdminVO statisticsSummaryHeader(@Param("questId") Long questId); |
| | | /** |
| | | * 问卷调查统计汇总表头统计 |
| | | * @param questId 调查问卷id |
| | | * @return 问卷调查统计汇总表头统计数据 |
| | | */ |
| | | QuestnaireStatisticsSummaryHeaderAdminVO statisticsSummaryHeader(@Param("questId") Long questId,@Param("communityId") Long communityId); |
| | | |
| | | void addNoNotice(@Param("questId") Long questId,@Param("userId") Long userId); |
| | | } |
| | |
| | | "AND cmpct.label LIKE concat('%',#{comMngPopulationVO.label},'%') " + |
| | | " </if> " + |
| | | "<if test='comMngPopulationVO.actId != null'>" + |
| | | " and cmp.act_id = #{comMngPopulationVO.actId} " + |
| | | " and cmpct.community_id = #{comMngPopulationVO.actId} " + |
| | | " </if> " + |
| | | "<if test='comMngPopulationVO.outOrLocal != null'>" + |
| | | " and cmp.out_or_local = #{comMngPopulationVO.outOrLocal} " + |
| | |
| | | |
| | | @Select("<script> " + |
| | | "select cmp.id,cmv.`alley` as areaName,cmp.`name`,cmp.phone,cmp.label as tags,cmp.create_at from com_mng_population as cmp " + |
| | | "left join com_mng_village as cmv on cmv.village_id = cmp.village_id where cmp.act_id = #{pageInputUserDTO.communityId} and cmp.label is not null " + |
| | | "left join com_mng_village as cmv on cmv.village_id = cmp.village_id " + |
| | | "left join com_mng_population_community_tags as cmpct on cmp.id = cmpct.population_id " + |
| | | "where cmpct.community_id = #{pageInputUserDTO.communityId} and cmpct.label is not null " + |
| | | "<if test='pageInputUserDTO.name != null and pageInputUserDTO.name != ""'>" + |
| | | " AND cmp.`name` LIKE concat(#{pageInputUserDTO.name},'%') " + |
| | | " </if> " + |
| | |
| | | " AND cmv.`alley` LIKE concat(#{pageInputUserDTO.areaName},'%') " + |
| | | " </if> " + |
| | | "<if test='pageInputUserDTO.tags != null and pageInputUserDTO.tags != ""'>" + |
| | | " AND cmp.label like concat('%',#{pageInputUserDTO.tags},'%') " + |
| | | " AND cmpct.label like concat('%',#{pageInputUserDTO.tags},'%') " + |
| | | " </if> " + |
| | | " order by cmp.create_at desc " + |
| | | "</script>") |
| | |
| | | AreaAddressVO getAreaAddress(@Param("provinceCode") String provinceCode, @Param("cityCode") String cityCode, @Param("districtCode") String districtCode); |
| | | |
| | | @Select("select count(id) as populationTotal " + |
| | | ",(select count(id) from com_mng_population where act_id = #{communityId} and out_or_local = 1) as localTotal " + |
| | | ",(select count(id) from com_mng_population where act_id = #{communityId} and out_or_local = 2) as outTotal " + |
| | | ",(select count(id) from com_mng_population where act_id = #{communityId} and label is not null) as specialTotal " + |
| | | ",(select count(cmpct.id) from com_mng_population_community_tags cmpct left join com_mng_population cmp on cmpct.population_id = cmp.id where cmpct.community_id = #{communityId} and cmp.out_or_local = 1) as localTotal " + |
| | | ",(select count(cmpct.id) from com_mng_population_community_tags cmpct left join com_mng_population cmp on cmpct.population_id = cmp.id where cmpct.community_id = #{communityId} and cmp.out_or_local = 2) as outTotal " + |
| | | ",(select count(cmpct.id) from com_mng_population_community_tags cmpct left join com_mng_population cmp on cmpct.population_id = cmp.id where cmpct.community_id = #{communityId} and cmpct.label is not null) as specialTotal " + |
| | | ",(select count(village_id) from com_mng_village where community_id = #{communityId}) as villageTotal " + |
| | | ",(select count(cmp.id) from com_mng_population cmp left join com_mng_population_community_tags cmpct on cmp.id = cmpct.population_id where cmp.act_id = #{communityId} and cmpct.label LIKE CONCAT('%','吸毒人员','%')) as drugTotal " + |
| | | ",(select count(cmp.id) from com_mng_population cmp left join com_mng_population_community_tags cmpct on cmp.id = cmpct.population_id where cmp.act_id = #{communityId} and cmpct.label LIKE CONCAT('%','社区矫正','%')) as correctTotal " + |
| | | ",(select count(cmp.id) from com_mng_population cmp left join com_mng_population_community_tags cmpct on cmp.id = cmpct.population_id where cmp.act_id = #{communityId} and cmpct.label LIKE CONCAT('%','精神障碍患者','%')) as majorTotal " + |
| | | ",(select count(cmp.id) from com_mng_population cmp left join com_mng_population_community_tags cmpct on cmp.id = cmpct.population_id where cmp.act_id = #{communityId} and cmpct.label LIKE CONCAT('%','邪教人员','%')) as cultTotal " + |
| | | ",(select count(cmp.id) from com_mng_population cmp left join com_mng_population_community_tags cmpct on cmp.id = cmpct.population_id where cmp.act_id = #{communityId} and cmpct.label LIKE CONCAT('%','刑满释放','%')) as rehabilitationTotal " + |
| | | ",(select count(cmp.id) from com_mng_population cmp left join com_mng_population_community_tags cmpct on cmp.id = cmpct.population_id where cmp.act_id = #{communityId} and cmpct.label LIKE CONCAT('%','重点人员','%')) as keyTotal " + |
| | | ",(select count(cmp.id) from com_mng_population cmp left join com_mng_population_community_tags cmpct on cmp.id = cmpct.population_id where cmp.act_id = #{communityId} and cmpct.label LIKE CONCAT('%','退役军人','%')) as veteransTotal " + |
| | | ",(select count(cmp.id) from com_mng_population cmp left join com_mng_population_community_tags cmpct on cmp.id = cmpct.population_id where cmp.act_id = #{communityId} and cmpct.label LIKE CONCAT('%','残疾人','%')) as disabilityTotal " + |
| | | ",(select count(cmp.id) from com_mng_population cmp left join com_mng_population_community_tags cmpct on cmp.id = cmpct.population_id where cmp.act_id = #{communityId} and cmpct.label LIKE CONCAT('%','低保户','%')) as lowSecurityTotal " + |
| | | " from com_mng_population as cmp where act_id = #{communityId}") |
| | | ",(select count(id) from com_mng_population_community_tags where community_id = #{communityId} and label LIKE CONCAT('%','吸毒人员','%')) as drugTotal " + |
| | | ",(select count(id) from com_mng_population_community_tags where community_id = #{communityId} and label LIKE CONCAT('%','社区矫正','%')) as correctTotal " + |
| | | ",(select count(id) from com_mng_population_community_tags where community_id = #{communityId} and label LIKE CONCAT('%','精神障碍患者','%')) as majorTotal " + |
| | | ",(select count(id) from com_mng_population_community_tags where community_id = #{communityId} and label LIKE CONCAT('%','邪教人员','%')) as cultTotal " + |
| | | ",(select count(id) from com_mng_population_community_tags where community_id = #{communityId} and label LIKE CONCAT('%','刑满释放','%')) as rehabilitationTotal " + |
| | | ",(select count(id) from com_mng_population_community_tags where community_id = #{communityId} and label LIKE CONCAT('%','重点人员','%')) as keyTotal " + |
| | | ",(select count(id) from com_mng_population_community_tags where community_id = #{communityId} and label LIKE CONCAT('%','退役军人','%')) as veteransTotal " + |
| | | ",(select count(id) from com_mng_population_community_tags where community_id = #{communityId} and label LIKE CONCAT('%','残疾人','%')) as disabilityTotal " + |
| | | ",(select count(id) from com_mng_population_community_tags where community_id = #{communityId} and label LIKE CONCAT('%','低保户','%')) as lowSecurityTotal " + |
| | | " from com_mng_population_community_tags as cmpct where community_id = #{communityId}") |
| | | ComMngPopulationTotalVO getPopulationTotalByAdmin(@Param("communityId") Long communityId); |
| | | |
| | | @Select("select count(id) as populationTotal," + |
| | | "IFNULL((select count(id) from com_mng_population_house where community_id = cmp.act_id),0) as houseTotal, " + |
| | | "IFNULL((select count(id) from com_mng_real_company where community_id = cmp.act_id),0) as companyTotal, " + |
| | | "IFNULL((select count(village_id) from com_mng_village where community_id = cmp.act_id),0) as villageTotal " + |
| | | " from com_mng_population as cmp " + |
| | | " where act_id = #{communityId}") |
| | | " com_mng_population_community_tags as cmpct " + |
| | | " where community_id = = #{communityId}") |
| | | IndexBasicsStatisticsVO getScreenIndexByBasics(@Param("communityId") Long communityId); |
| | | |
| | | @Select("SELECT " + |
| | | " IFNULL( NULL, 1 ) AS type, " + |
| | | " count( id ) AS sum " + |
| | | " count( cmpct.id ) AS sum " + |
| | | "FROM " + |
| | | " com_mng_population " + |
| | | " com_mng_population_community_tags as cmpct " + |
| | | " left join com_mng_population as cmp on cmpct.population_id = cmp.id " + |
| | | "WHERE " + |
| | | " sex = 1 " + |
| | | " AND act_id = #{communityId} UNION ALL " + |
| | | " cmp.sex = 1 " + |
| | | " AND cmpct.community_id = #{communityId} UNION ALL " + |
| | | "SELECT " + |
| | | " IFNULL( NULL, 2 ) AS type, " + |
| | | " count( id ) AS sum " + |
| | | "FROM " + |
| | | " com_mng_population " + |
| | | " com_mng_population_community_tags as cmpct " + |
| | | " left join com_mng_population as cmp on cmpct.population_id = cmp.id " + |
| | | "WHERE " + |
| | | " sex = 2 " + |
| | | " AND act_id = #{communityId}") |
| | | " cmp.sex = 2 " + |
| | | " AND cmpct.community_id = #{communityId}") |
| | | List<IndexPopulationSexStatisticsVO> getScreenIndexByPopulationSex(@Param("communityId") Long communityId); |
| | | |
| | | @Select("SELECT " + |
| | |
| | | @Select("SELECT " + |
| | | " count( id ) " + |
| | | "FROM " + |
| | | " com_mng_population " + |
| | | " com_mng_population_community_tags " + |
| | | "WHERE " + |
| | | " label like concat('%',#{label},'%')") |
| | | Integer getSpecialStatisticsByLabel(@Param("label") String label); |
| | |
| | | |
| | | @Select("SELECT " + |
| | | " count( id ) AS specialTotal, " + |
| | | " ( SELECT count( id ) FROM com_mng_population WHERE label IS NOT NULL AND act_id = #{communityId} AND create_at < #{lastMonth} ) AS toMonthSpecialTotal " + |
| | | " ( SELECT count( id ) FROM com_mng_population_community_tags WHERE label IS NOT NULL AND community_id = #{communityId} AND create_at < #{lastMonth} ) AS toMonthSpecialTotal " + |
| | | "FROM " + |
| | | " com_mng_population AS cmp " + |
| | | " com_mng_population_community_tags AS cmpct " + |
| | | "WHERE " + |
| | | " label IS NOT NULL " + |
| | | " AND act_id = #{communityId}") |
| | | " AND community_id = #{communityId}") |
| | | CivilPopulationStatisticsVO getCivilScreenPopulation(@Param("communityId") Long communityId, @Param("lastMonth") Date lastMonth); |
| | | |
| | | @Select("SELECT `NAME`, " + |
| | |
| | | CivilVillageStatisticsVO getCivilScreenVillageStatistics(@Param("villageId") Long villageId); |
| | | |
| | | |
| | | @Select("SELECT COUNT(id) AS man,(SELECT COUNT(id) FROM com_mng_population WHERE sex = 2 AND act_id = #{communityId}) AS woman FROM com_mng_population WHERE sex = 1 AND act_id = #{communityId}") |
| | | @Select("SELECT COUNT(cmpct.id) AS man,(SELECT COUNT(cmpct.id) FROM com_mng_population_community_tags as cmpct left join com_mng_population as cmp on cmpct.population_id = cmp.id WHERE cmp.sex = 2 AND cmpct.community_id = #{communityId}) AS woman " + |
| | | "FROM com_mng_population_community_tags as cmpct left join com_mng_population as cmp on cmpct.population_id = cmp.id WHERE cmp.sex = 1 AND cmpct.community_id = #{communityId}") |
| | | Map<String, Long> countBySex(@Param("communityId") Long communityId); |
| | | |
| | | @Select( |
| | | "SELECT " + |
| | | "(SELECT COUNT(aa.age) FROM " + |
| | | "(SELECT (SELECT TIMESTAMPDIFF(YEAR, birthday, CURDATE()) ) AS age FROM com_mng_population WHERE act_id = #{communityId}) as aa where aa.age<= 16) as age16," + |
| | | "(SELECT (SELECT TIMESTAMPDIFF(YEAR, cmp.birthday, CURDATE()) ) AS age FROM com_mng_population as cmp left join com_mng_population_community_tags as cmpct on cmp.id = cmpct.population_id WHERE cmpct.community_id = #{communityId}) as aa where aa.age<= 16) as age16," + |
| | | "(SELECT COUNT(aa.age) FROM " + |
| | | "(SELECT (SELECT TIMESTAMPDIFF(YEAR, birthday, CURDATE()) ) AS age FROM com_mng_population WHERE act_id = #{communityId}) AS aa WHERE aa.age > 16 and aa.age<= 25) AS age25," + |
| | | "(SELECT (SELECT TIMESTAMPDIFF(YEAR, cmp.birthday, CURDATE()) ) AS age FROM com_mng_population as cmp left join com_mng_population_community_tags as cmpct on cmp.id = cmpct.population_id WHERE cmpct.community_id = #{communityId}) AS aa WHERE aa.age > 16 and aa.age<= 25) AS age25," + |
| | | "(SELECT COUNT(aa.age) FROM " + |
| | | "(SELECT (SELECT TIMESTAMPDIFF(YEAR, birthday, CURDATE()) ) AS age FROM com_mng_population WHERE act_id = #{communityId}) AS aa WHERE aa.age > 25 and aa.age<= 35) AS age35," + |
| | | "(SELECT (SELECT TIMESTAMPDIFF(YEAR, cmp.birthday, CURDATE()) ) AS age FROM com_mng_population as cmp left join com_mng_population_community_tags as cmpct on cmp.id = cmpct.population_id WHERE cmpct.community_id = #{communityId}) AS aa WHERE aa.age > 25 and aa.age<= 35) AS age35," + |
| | | "(SELECT COUNT(aa.age) FROM " + |
| | | "(SELECT (SELECT TIMESTAMPDIFF(YEAR, birthday, CURDATE()) ) AS age FROM com_mng_population WHERE act_id = #{communityId}) AS aa WHERE aa.age > 35 and aa.age<= 45) AS age45," + |
| | | "(SELECT (SELECT TIMESTAMPDIFF(YEAR, cmp.birthday, CURDATE()) ) AS age FROM com_mng_population as cmp left join com_mng_population_community_tags as cmpct on cmp.id = cmpct.population_id WHERE cmpct.community_id = #{communityId}) AS aa WHERE aa.age > 35 and aa.age<= 45) AS age45," + |
| | | "(SELECT COUNT(aa.age) FROM " + |
| | | "(SELECT (SELECT TIMESTAMPDIFF(YEAR, birthday, CURDATE()) ) AS age FROM com_mng_population WHERE act_id = #{communityId}) AS aa WHERE aa.age > 45 and aa.age<= 55) AS age55," + |
| | | "(SELECT (SELECT TIMESTAMPDIFF(YEAR, cmp.birthday, CURDATE()) ) AS age FROM com_mng_population as cmp left join com_mng_population_community_tags as cmpct on cmp.id = cmpct.population_id WHERE cmpct.community_id = #{communityId}) AS aa WHERE aa.age > 45 and aa.age<= 55) AS age55," + |
| | | "(SELECT COUNT(aa.age) FROM " + |
| | | "(SELECT (SELECT TIMESTAMPDIFF(YEAR, birthday, CURDATE()) ) AS age FROM com_mng_population WHERE act_id = #{communityId}) AS aa WHERE aa.age > 55) AS age55over") |
| | | "(SELECT (SELECT TIMESTAMPDIFF(YEAR, cmp.birthday, CURDATE()) ) AS age FROM com_mng_population as cmp left join com_mng_population_community_tags as cmpct on cmp.id = cmpct.population_id WHERE cmpct.community_id = #{communityId}) AS aa WHERE aa.age > 55) AS age55over") |
| | | Map<String, Long> countByAge(@Param("communityId") Long communityId); |
| | | |
| | | @Select("SELECT COUNT(id)AS xx," + |
| | | "(SELECT COUNT(id) FROM com_mng_population WHERE culture_level = 2 AND act_id = #{communityId}) as cz," + |
| | | "(SELECT COUNT(id) FROM com_mng_population WHERE culture_level = 3 AND act_id = #{communityId}) as gz," + |
| | | "(SELECT COUNT(id) FROM com_mng_population WHERE culture_level = 4 AND act_id = #{communityId}) as zz," + |
| | | "(SELECT COUNT(id) FROM com_mng_population WHERE culture_level = 5 AND act_id = #{communityId}) as dz," + |
| | | "(SELECT COUNT(id) FROM com_mng_population WHERE culture_level = 6 AND act_id = #{communityId}) as bk," + |
| | | "(SELECT COUNT(id) FROM com_mng_population WHERE culture_level = 7 AND act_id = #{communityId}) as ss," + |
| | | "(SELECT COUNT(id) FROM com_mng_population WHERE culture_level = 8 AND act_id = #{communityId}) as bs," + |
| | | "(SELECT COUNT(id) FROM com_mng_population WHERE culture_level = 9 AND act_id = #{communityId}) as qt" + |
| | | " FROM com_mng_population WHERE culture_level = 1 AND act_id = #{communityId}") |
| | | @Select("SELECT COUNT(cmp.id)AS xx," + |
| | | "(SELECT COUNT(cmp.id) FROM com_mng_population as cmp left join com_mng_population_community_tags as cmpct on cmp.id = cmpct.population_id WHERE culture_level = 2 AND cmpct.community_id = #{communityId}) as cz," + |
| | | "(SELECT COUNT(cmp.id) FROM com_mng_population as cmp left join com_mng_population_community_tags as cmpct on cmp.id = cmpct.population_id WHERE culture_level = 3 AND cmpct.community_id = #{communityId}) as gz," + |
| | | "(SELECT COUNT(cmp.id) FROM com_mng_population as cmp left join com_mng_population_community_tags as cmpct on cmp.id = cmpct.population_id WHERE culture_level = 4 AND cmpct.community_id = #{communityId}) as zz," + |
| | | "(SELECT COUNT(cmp.id) FROM com_mng_population as cmp left join com_mng_population_community_tags as cmpct on cmp.id = cmpct.population_id WHERE culture_level = 5 AND cmpct.community_id = #{communityId}) as dz," + |
| | | "(SELECT COUNT(cmp.id) FROM com_mng_population as cmp left join com_mng_population_community_tags as cmpct on cmp.id = cmpct.population_id WHERE culture_level = 6 AND cmpct.community_id = #{communityId}) as bk," + |
| | | "(SELECT COUNT(cmp.id) FROM com_mng_population as cmp left join com_mng_population_community_tags as cmpct on cmp.id = cmpct.population_id WHERE culture_level = 7 AND cmpct.community_id = #{communityId}) as ss," + |
| | | "(SELECT COUNT(cmp.id) FROM com_mng_population as cmp left join com_mng_population_community_tags as cmpct on cmp.id = cmpct.population_id WHERE culture_level = 8 AND cmpct.community_id = #{communityId}) as bs," + |
| | | "(SELECT COUNT(cmp.id) FROM com_mng_population as cmp left join com_mng_population_community_tags as cmpct on cmp.id = cmpct.population_id WHERE culture_level = 9 AND cmpct.community_id = #{communityId}) as qt" + |
| | | " FROM com_mng_population as cmp left join com_mng_population_community_tags as cmpct on cmp.id = cmpct.population_id WHERE culture_level = 1 AND cmpct.community_id = #{communityId}") |
| | | Map<String, Long> countByCulture(@Param("communityId") Long communityId); |
| | | |
| | | @Select("select count(user_id) from sys_user where community_id = #{communityId} and type = 1") |
| | |
| | | @Select( |
| | | "SELECT " + |
| | | "(SELECT COUNT(aa.age) FROM " + |
| | | "(SELECT (SELECT TIMESTAMPDIFF(YEAR, birthday, CURDATE()) ) AS age FROM com_mng_population WHERE act_id = #{communityId}) as aa where aa.age<= 16) as age16," + |
| | | "(SELECT (SELECT TIMESTAMPDIFF(YEAR, cmp.birthday, CURDATE()) ) AS age FROM com_mng_population as cmp left join com_mng_population_community_tags as cmpct on cmp.id = cmpct.population_id WHERE cmpct.community_id = #{communityId}) as aa where aa.age<= 16) as age16," + |
| | | "(SELECT COUNT(aa.age) FROM " + |
| | | "(SELECT (SELECT TIMESTAMPDIFF(YEAR, birthday, CURDATE()) ) AS age FROM com_mng_population WHERE act_id = #{communityId}) AS aa WHERE aa.age > 16 and aa.age<= 27) AS age27," + |
| | | "(SELECT (SELECT TIMESTAMPDIFF(YEAR, cmp.birthday, CURDATE()) ) AS age FROM com_mng_population as cmp left join com_mng_population_community_tags as cmpct on cmp.id = cmpct.population_id WHERE cmpct.community_id = #{communityId}) AS aa WHERE aa.age > 16 and aa.age<= 27) AS age27," + |
| | | "(SELECT COUNT(aa.age) FROM " + |
| | | "(SELECT (SELECT TIMESTAMPDIFF(YEAR, birthday, CURDATE()) ) AS age FROM com_mng_population WHERE act_id = #{communityId}) AS aa WHERE aa.age > 27 and aa.age<= 35) AS age35," + |
| | | "(SELECT (SELECT TIMESTAMPDIFF(YEAR, cmp.birthday, CURDATE()) ) AS age FROM com_mng_population as cmp left join com_mng_population_community_tags as cmpct on cmp.id = cmpct.population_id WHERE cmpct.community_id = #{communityId}) AS aa WHERE aa.age > 27 and aa.age<= 35) AS age35," + |
| | | "(SELECT COUNT(aa.age) FROM " + |
| | | "(SELECT (SELECT TIMESTAMPDIFF(YEAR, birthday, CURDATE()) ) AS age FROM com_mng_population WHERE act_id = #{communityId}) AS aa WHERE aa.age > 35 and aa.age<= 45) AS age45," + |
| | | "(SELECT (SELECT TIMESTAMPDIFF(YEAR, cmp.birthday, CURDATE()) ) AS age FROM com_mng_population as cmp left join com_mng_population_community_tags as cmpct on cmp.id = cmpct.population_id WHERE cmpct.community_id = #{communityId}) AS aa WHERE aa.age > 35 and aa.age<= 45) AS age45," + |
| | | "(SELECT COUNT(aa.age) FROM " + |
| | | "(SELECT (SELECT TIMESTAMPDIFF(YEAR, birthday, CURDATE()) ) AS age FROM com_mng_population WHERE act_id = #{communityId}) AS aa WHERE aa.age > 45 and aa.age<= 55) AS age55," + |
| | | "(SELECT (SELECT TIMESTAMPDIFF(YEAR, cmp.birthday, CURDATE()) ) AS age FROM com_mng_population as cmp left join com_mng_population_community_tags as cmpct on cmp.id = cmpct.population_id WHERE cmpct.community_id = #{communityId}) AS aa WHERE aa.age > 45 and aa.age<= 55) AS age55," + |
| | | "(SELECT COUNT(aa.age) FROM " + |
| | | "(SELECT (SELECT TIMESTAMPDIFF(YEAR, birthday, CURDATE()) ) AS age FROM com_mng_population WHERE act_id = #{communityId}) AS aa WHERE aa.age > 55) AS age55over") |
| | | "(SELECT (SELECT TIMESTAMPDIFF(YEAR, cmp.birthday, CURDATE()) ) AS age FROM com_mng_population as cmp left join com_mng_population_community_tags as cmpct on cmp.id = cmpct.population_id WHERE cmpct.community_id = #{communityId}) AS aa WHERE aa.age > 55) AS age55over") |
| | | Map<String, Long> indexCountByAge(@Param("communityId") Long communityId); |
| | | |
| | | |
| | |
| | | Integer getStatisticsCount(@Param("communityId") Long communityId); |
| | | |
| | | @Select("<script> " + |
| | | "select cmp.id,cmp.`name`,cmp.phone,cmp.card_no,cmp.label,cmp.address,cmp.nation,cmp.political_outlook,cmv.lng,cmv.lat" + |
| | | "select cmp.id,cmp.`name`,cmp.phone,cmp.card_no,cmpct.label,cmp.address,cmp.nation,cmp.political_outlook,cmv.lng,cmv.lat" + |
| | | ",cmp.sex from com_mng_population as cmp left join com_mng_village as cmv on cmv.village_id = cmp.village_id " + |
| | | " where cmp.act_id = #{populationListDTO.communityId}" + |
| | | " left join com_mng_population_community_tags as cmpct on cmp.id = cmpct.population_id " + |
| | | " where cmpct.community_id = #{populationListDTO.communityId}" + |
| | | "<if test='populationListDTO.keyWord != null and populationListDTO.keyWord != ""'>" + |
| | | "AND (cmp.`name` like concat (#{populationListDTO.keyWord},'%') or cmp.card_no_str like concat (#{populationListDTO.keyWord},'%')) " + |
| | | " </if> " + |
| | | "<if test='populationListDTO.label != null and populationListDTO.label != ""'>" + |
| | | "AND cmp.label like concat ('%',#{populationListDTO.label},'%') " + |
| | | "AND cmpct.label like concat ('%',#{populationListDTO.label},'%') " + |
| | | " </if> " + |
| | | " </script>") |
| | | IPage<PopulationListVO> pagePopulationListApp(Page page, @Param("populationListDTO") PagePopulationListDTO populationListDTO); |
| | |
| | | " cmp.`name`, " + |
| | | " cmp.phone, " + |
| | | " cmp.card_no, " + |
| | | " cmp.label, " + |
| | | " cmpct.label, " + |
| | | " cmp.address, " + |
| | | " cmp.culture_level, " + |
| | | " cmp.nation, " + |
| | |
| | | "FROM " + |
| | | " com_mng_population AS cmp " + |
| | | " LEFT JOIN com_mng_village AS cmv ON cmv.village_id = cmp.village_id " + |
| | | " left join com_mng_population_community_tags as cmpct on cmp.id = cmpct.population_id " + |
| | | "WHERE " + |
| | | " id = #{populationId}") |
| | | PopulationDetailVO getPopulationDetailApp(@Param("populationId") Long populationId); |
| | |
| | | " SELECT " + |
| | | " cmp.id, " + |
| | | " cmp.`name` AS userName, " + |
| | | " cmp.label, " + |
| | | " cmpct.label, " + |
| | | " cmp.card_no, " + |
| | | " cmp.card_no_str, " + |
| | | " cmp.sex, " + |
| | |
| | | " ( SELECT event_status FROM event_visiting_tasks WHERE event_status in (1,2,3,5) AND visiter_id = cmp.id ORDER BY create_at DESC LIMIT 1 ) AS eventStatus, " + |
| | | " ( SELECT create_at FROM event_visiting_tasks WHERE event_status in (1,2,3,5) AND visiter_id = cmp.id ORDER BY create_at DESC LIMIT 1 ) AS createAt " + |
| | | " FROM " + |
| | | " com_mng_population AS cmp where 1=1 " + |
| | | " com_mng_population AS cmp left join com_mng_population_community_tags as cmpct on cmp.id = cmpct.population_id where 1=1 " + |
| | | "<if test='populationListDTO.keyWord != null and populationListDTO.keyWord != ""'>" + |
| | | "AND (cmp.name like concat (#{populationListDTO.keyWord},'%') or cmp.card_no = #{populationListDTO.cardNo} or cmp.address like concat (#{populationListDTO.keyWord},'%')) " + |
| | | " </if> " + |
| | | "<if test='populationListDTO.label != null and populationListDTO.label != ""'>" + |
| | | "AND cmp.label like concat ('%',#{populationListDTO.label},'%') " + |
| | | "AND cmpct.label like concat ('%',#{populationListDTO.label},'%') " + |
| | | " </if> " + |
| | | "<if test='populationListDTO.sex != null'>" + |
| | | "AND cmp.sex = #{populationListDTO.sex} " + |
| | |
| | | "AND cmp.house_id is null " + |
| | | " </if> " + |
| | | "<if test='populationListDTO.communityId != null'>" + |
| | | "AND cmp.act_id = #{populationListDTO.communityId} " + |
| | | "AND cmpct.community_id = #{populationListDTO.communityId} " + |
| | | " </if> " + |
| | | "<if test='populationListDTO.politicalOutlook != null'>" + |
| | | "AND cmp.political_outlook = #{populationListDTO.politicalOutlook} " + |
| | |
| | | " cmp.id, " + |
| | | " cmp.`name`, " + |
| | | " cmp.card_no as idCard, " + |
| | | " cmp.label, " + |
| | | " cmpct.label, " + |
| | | " cmp.sex, " + |
| | | " IFNULL( cmp.phone, '暂无' ) as phone, " + |
| | | " cmp.address, " + |
| | | " cmp.political_outlook " + |
| | | " FROM " + |
| | | " com_mng_population AS cmp where 1=1 " + |
| | | " com_mng_population AS cmp left join com_mng_population_community_tags as cmpct on cmp.id = cmpct.population_id where 1=1 " + |
| | | "<if test='populationDTO.keyWord != null'>" + |
| | | " AND (cmp.name like concat(#{populationDTO.keyWord},'%') or cmp.card_no_str like concat(#{populationDTO.keyWord},'%')) " + |
| | | " </if> " + |
| | |
| | | @Select("<script> " + |
| | | "SELECT " + |
| | | " count( id ) AS localNum, " + |
| | | " ( SELECT count( id ) FROM com_mng_population WHERE out_or_local = 2 " + |
| | | " ( SELECT count( cmpct.id ) FROM com_mng_population_community_tags as cmpct left join com_mng_population as cmp on cmp.id = cmpct.population_id WHERE cmp.out_or_local = 2 " + |
| | | "<if test='communityId != null and communityId != 0'>" + |
| | | " AND act_id = #{communityId} " + |
| | | " AND cmpct.community_id = #{communityId} " + |
| | | " </if> " + |
| | | " ) AS flowNum, " + |
| | | " ( SELECT count( id ) FROM com_mng_population WHERE label IS NOT NULL " + |
| | | " ( SELECT count( cmpct.id ) FROM com_mng_population_community_tags as cmpct left join com_mng_population as cmp on cmp.id = cmpct.population_id WHERE cmpct.label IS NOT NULL " + |
| | | "<if test='communityId != null and communityId != 0'>" + |
| | | " AND act_id = #{communityId} " + |
| | | " AND cmpct.community_id = #{communityId} " + |
| | | " </if> " + |
| | | " ) AS specialNum " + |
| | | "FROM " + |
| | | " com_mng_population " + |
| | | " com_mng_population_community_tags as cmpct left join com_mng_population as cmp on cmp.id = cmpct.population_id " + |
| | | "WHERE " + |
| | | " out_or_local = 1 " + |
| | | " cmp.out_or_local = 1 " + |
| | | "<if test='communityId != null and communityId != 0'>" + |
| | | " AND act_id = #{communityId} " + |
| | | " AND cmpct.community_id = #{communityId} " + |
| | | " </if> " + |
| | | " </script>") |
| | | PopulationStatisticsVO getGridPopulationStatistics(@Param("communityId") Long communityId); |
| | |
| | | " SELECT " + |
| | | " cmp.id, " + |
| | | " cmp.`name` AS userName, " + |
| | | " cmp.label, " + |
| | | " cmpct.label, " + |
| | | " cmp.card_no, " + |
| | | " cmp.card_no_str, " + |
| | | " cmp.sex, " + |
| | |
| | | " ( SELECT event_status FROM event_visiting_tasks WHERE event_status in (1,2,3,5) AND visiter_id = cmp.id ORDER BY create_at DESC LIMIT 1 ) AS eventStatus, " + |
| | | " ( SELECT create_at FROM event_visiting_tasks WHERE event_status in (1,2,3,5) AND visiter_id = cmp.id ORDER BY create_at DESC LIMIT 1 ) AS createAt " + |
| | | " FROM " + |
| | | " com_mng_population AS cmp where 1=1 " + |
| | | " com_mng_population AS cmp left join com_mng_population_community_tags AS cmpct on cmp.id = cmpct.population_id where 1=1 " + |
| | | "<if test='populationExportDTO.keyWord != null and populationExportDTO.keyWord != ""'>" + |
| | | "AND (cmp.name like concat (#{populationExportDTO.keyWord},'%') or cmp.card_no_str like concat (#{populationExportDTO.keyWord},'%') or cmp.address like concat (#{populationExportDTO.keyWord},'%')) " + |
| | | " </if> " + |
| | | "<if test='populationExportDTO.label != null and populationExportDTO.label != ""'>" + |
| | | "AND cmp.label like concat ('%',#{populationExportDTO.label},'%') " + |
| | | "AND cmpct.label like concat ('%',#{populationExportDTO.label},'%') " + |
| | | " </if> " + |
| | | "<if test='populationExportDTO.sex != null'>" + |
| | | "AND cmp.sex = #{populationExportDTO.sex} " + |
| | |
| | | "AND cmp.house_id is null " + |
| | | " </if> " + |
| | | "<if test='populationExportDTO.communityId != null'>" + |
| | | "AND cmp.act_id = #{populationExportDTO.communityId} " + |
| | | "AND cmpct.community_id = #{populationExportDTO.communityId} " + |
| | | " </if> " + |
| | | "<if test='populationExportDTO.politicalOutlook != null'>" + |
| | | "AND cmp.political_outlook = #{populationExportDTO.politicalOutlook} " + |
| | |
| | | List<ComMngPopulationListVO> getGridPopulationAdminLists(@Param("populationExportDTO") ComMngPopulationExportDTO populationExportDTO); |
| | | |
| | | @Select("<script> " + |
| | | " select id,`name`,card_no,label from com_mng_population where 1=1 " + |
| | | " select cmp.id,cmp.`name`,cmp.card_no,cmtct.label from com_mng_population as cmp left join com_mng_population_community_tags AS cmpct on cmp.id = cmpct.population_id where 1=1 " + |
| | | "<if test='villagePopulationDTO.villageId != null'>" + |
| | | " and village_id = #{villagePopulationDTO.villageId} " + |
| | | " and cmp.village_id = #{villagePopulationDTO.villageId} " + |
| | | " </if> " + |
| | | "<if test='villagePopulationDTO.keyWord != null'>" + |
| | | " AND (name like concat (#{villagePopulationDTO.keyWord},'%') or card_no_str like concat (#{villagePopulationDTO.keyWord},'%')) " + |
| | | " AND (cmp.name like concat (#{villagePopulationDTO.keyWord},'%') or cmp.card_no_str like concat (#{villagePopulationDTO.keyWord},'%')) " + |
| | | " </if> " + |
| | | "<if test='villagePopulationDTO.label != null and villagePopulationDTO.label != ""'>" + |
| | | " AND label like concat ('%',#{villagePopulationDTO.label},'%') " + |
| | | " AND cmpct.label like concat ('%',#{villagePopulationDTO.label},'%') " + |
| | | " </if> " + |
| | | " </script>") |
| | | IPage<ComMngVillagePopulationListVO> getVillagePopulationAdmin(Page page, @Param("villagePopulationDTO") PageComMngVillagePopulationDTO villagePopulationDTO); |
| | |
| | | " cmp.`name`, " + |
| | | " IFNULL( cmp.phone, '暂无' ) as phone, " + |
| | | " cmp.card_no, " + |
| | | " cmp.label, " + |
| | | " cmpct.label, " + |
| | | " cmp.address, " + |
| | | " cmp.nation, " + |
| | | " cmphu.create_at, " + |
| | |
| | | "FROM " + |
| | | " com_mng_population_house_user AS cmphu " + |
| | | " LEFT JOIN com_mng_population AS cmp ON cmp.id = cmphu.popul_id " + |
| | | " left join com_mng_population_community_tags AS cmpct on cmp.id = cmpct.population_id " + |
| | | "WHERE " + |
| | | " cmphu.house_id = #{houseId} " + |
| | | "<if test='relation != null '>" + |
New file |
| | |
| | | package com.panzhihua.service_community.model.dos; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import lombok.Data; |
| | | |
| | | import java.io.Serializable; |
| | | import java.util.Date; |
| | | |
| | | |
| | | /** |
| | | * @auther lyq |
| | | * @create 2021-08-19 15:50:58 |
| | | * @describe 随手拍分类表实体类 |
| | | */ |
| | | |
| | | @Data |
| | | @TableName("com_act_easy_photo_classify") |
| | | public class ComActEasyPhotoClassifyDO implements Serializable { |
| | | |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | /** |
| | | * 主键id |
| | | */ |
| | | @TableId(type = IdType.AUTO) |
| | | private Long id; |
| | | |
| | | /** |
| | | * 随手拍分类名称 |
| | | */ |
| | | private String name; |
| | | |
| | | /** |
| | | * 状态(1.启用 2.禁用) |
| | | */ |
| | | private Integer status; |
| | | |
| | | /** |
| | | * 权重 |
| | | */ |
| | | private Integer weight; |
| | | |
| | | /** |
| | | * 备注 |
| | | */ |
| | | private String remark; |
| | | |
| | | /** |
| | | * 创建时间 |
| | | */ |
| | | private Date createAt; |
| | | |
| | | /** |
| | | * 修改时间 |
| | | */ |
| | | private Date updateAt; |
| | | |
| | | /** |
| | | * 状态(1.启用 2.禁用) |
| | | */ |
| | | public interface status{ |
| | | int yes = 1; |
| | | int no = 2; |
| | | } |
| | | |
| | | @Override |
| | | public String toString() { |
| | | return "ComActEasyPhotoClassifyDO{" + |
| | | "id=" + id + |
| | | ", name=" + name + |
| | | ", status=" + status + |
| | | ", weight=" + weight + |
| | | ", remark=" + remark + |
| | | ", createAt=" + createAt + |
| | | ", updateAt=" + updateAt + |
| | | "}"; |
| | | } |
| | | } |
| | |
| | | * 完成人id |
| | | */ |
| | | private Long completeId; |
| | | /** |
| | | * 是否上报到城管( 0未上报 1已上报 2已退回) |
| | | */ |
| | | private Integer isReportUrban; |
| | | /** |
| | | * 城管安排状态 (0未安排 1已安排 2已处理) |
| | | */ |
| | | private Integer urbanStatus; |
| | | /** |
| | | * 城管退回原因 |
| | | */ |
| | | private String backResult; |
| | | /** |
| | | * 移交时间 |
| | | */ |
| | | private Date transferTime; |
| | | /** |
| | | * 移交说明 |
| | | */ |
| | | private String transferReason; |
| | | /** |
| | | * 退回时间 |
| | | */ |
| | | private Date backTime; |
| | | /** |
| | | * 随手拍分类id |
| | | */ |
| | | private Long classifyId; |
| | | |
| | | /** |
| | | * 参加活动标签(1.优质 2.精良 3.普通 4.一般) |
| | |
| | | int jl = 2; |
| | | int pt = 3; |
| | | int yb = 4; |
| | | int wu = 5; |
| | | } |
| | | |
| | | /** |
New file |
| | |
| | | package com.panzhihua.service_community.service; |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.panzhihua.common.model.dtos.community.easyPhoto.AddEasyPhotoClassifyDTO; |
| | | import com.panzhihua.common.model.vos.R; |
| | | import com.panzhihua.service_community.model.dos.ComActEasyPhotoClassifyDO; |
| | | |
| | | /** |
| | | * @auther lyq |
| | | * @create 2021-08-19 15:50:58 |
| | | * @describe 随手拍分类表服务类 |
| | | */ |
| | | public interface ComActEasyPhotoClassifyService extends IService<ComActEasyPhotoClassifyDO> { |
| | | |
| | | /** |
| | | * 运营后台-新增随手拍分类 |
| | | * @param addPhotoClassify 请求参数 |
| | | * @return 新增结果 |
| | | */ |
| | | R addPhotoClassify(AddEasyPhotoClassifyDTO addPhotoClassify); |
| | | |
| | | /** |
| | | * 运营后台-编辑随手拍分类 |
| | | * @param addPhotoClassify 请求参数 |
| | | * @return 编辑结果 |
| | | */ |
| | | R editPhotoClassify(AddEasyPhotoClassifyDTO addPhotoClassify); |
| | | |
| | | /** |
| | | * 运营后台-随手拍分类详情 |
| | | * @param id 随手拍分类id |
| | | * @return 随手拍分类 |
| | | */ |
| | | R detailPhotoClassify(Long id); |
| | | |
| | | /** |
| | | * 运营后台-分页查询随手拍分类 |
| | | * @param addPhotoClassify 请求参数 |
| | | * @return 随手拍分类列表 |
| | | */ |
| | | R pagePhotoClassify(AddEasyPhotoClassifyDTO addPhotoClassify); |
| | | |
| | | /** |
| | | * 运营后台-查询随手拍分类列表 |
| | | * @return 随手拍分类列表 |
| | | */ |
| | | R listPhotoClassify(); |
| | | |
| | | /** |
| | | * 运营后台-随手拍分类删除 |
| | | * @param id 随手拍分类id |
| | | * @return 删除结果 |
| | | */ |
| | | R deletePhotoClassify(Long id); |
| | | |
| | | |
| | | } |
| | |
| | | import com.panzhihua.common.model.dtos.community.GrantRewardDTO; |
| | | import com.panzhihua.common.model.dtos.community.PageComActEasyPhotoCommentDTO; |
| | | import com.panzhihua.common.model.dtos.community.ComActEasyPhotoCommentUserDTO; |
| | | import com.panzhihua.common.model.dtos.community.easyPhoto.ExportEasyPhotoDTO; |
| | | import com.panzhihua.common.model.dtos.partybuilding.ComPbServiceTeamDTO; |
| | | import com.panzhihua.common.model.dtos.partybuilding.PageComPbServiceTeamDTO; |
| | | import com.panzhihua.common.model.vos.R; |
| | |
| | | */ |
| | | R readUserReward(Long userId,Long communityId); |
| | | |
| | | R easyPhotoCount(ComActEasyPhotoVO comActEasyPhotoVO); |
| | | /** |
| | | * 社区后台-切换随手拍公示状态 |
| | | * @param comActEasyPhotoVO 请求参数 |
| | | * @return 切换结果 |
| | | */ |
| | | R easyPhotoSwitchPublicity(ComActEasyPhotoVO comActEasyPhotoVO); |
| | | |
| | | R updatePageeasyphoto(ComActEasyPhotoVO comActEasyPhotoVO); |
| | | |
| | | R export(ExportEasyPhotoDTO exportEasyPhotoDTO); |
| | | |
| | | /** |
| | | * 查询社区待处理随手拍id集合 |
| | | * @param communityId 社区id |
| | | * @return 社区待处理随手拍id集合 |
| | | */ |
| | | R easyPhotoNoHandleList(Long communityId); |
| | | } |
| | |
| | | */ |
| | | R getQuesDetail(Long questId,Long userId); |
| | | |
| | | /** |
| | | * 问卷调查统计汇总 |
| | | * @param summaryDTO 请求参数 |
| | | * @return 统计汇总 |
| | | */ |
| | | R statisticsSummary(StatisticsSummaryDTO summaryDTO); |
| | | |
| | | /** |
| | | * 问卷调查统计汇总导出数据查询 |
| | | * @param questId 调查问卷id |
| | | * @return 调查统计汇总导出数据 |
| | | */ |
| | | R statisticsSummaryExport(Long questId); |
| | | |
| | | R statisticsSummaryHeader(Long questId); |
| | | /** |
| | | * 问卷调查统计汇总表头统计 |
| | | * @param questId 调查问卷id |
| | | * @return 问卷调查统计汇总表头统计数据 |
| | | */ |
| | | R statisticsSummaryHeader(Long questId,Long communityId); |
| | | |
| | | /** |
| | | * 定时任务检测待发布,调研中的问卷调查状态 |
| | | */ |
| | | R timedTaskQuestionnaire(); |
| | | |
| | | /** |
| | | * 小程序-新增问卷调查浏览数量 |
| | | * @param questId 问卷调查id |
| | | * @return 增加结果 |
| | | */ |
| | | R addQuestnaireView(Long questId); |
| | | |
| | | /** |
| | | * 小程序-用户弹窗添加不在提醒接口 |
| | | * @param questId 问卷id |
| | | * @param userId 用户id |
| | | * @return 添加结果 |
| | | */ |
| | | R addNoNotice(Long questId,Long userId); |
| | | } |
New file |
| | |
| | | package com.panzhihua.service_community.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.panzhihua.common.model.dtos.community.easyPhoto.AddEasyPhotoClassifyDTO; |
| | | import com.panzhihua.common.model.vos.R; |
| | | import com.panzhihua.common.model.vos.community.easyPhoto.ComActEasyPhotoClassifyVO; |
| | | import com.panzhihua.service_community.dao.ComActEasyPhotoClassifyMapper; |
| | | import com.panzhihua.service_community.model.dos.ComActEasyPhotoClassifyDO; |
| | | import com.panzhihua.service_community.service.ComActEasyPhotoClassifyService; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.beans.BeanUtils; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import java.util.Date; |
| | | |
| | | /** |
| | | * @auther lyq |
| | | * @create 2021-08-19 15:50:58 |
| | | * @describe 随手拍分类表服务实现类 |
| | | */ |
| | | @Slf4j |
| | | @Service |
| | | public class ComActEasyPhotoClassifyServiceImpl extends ServiceImpl<ComActEasyPhotoClassifyMapper, ComActEasyPhotoClassifyDO> implements ComActEasyPhotoClassifyService { |
| | | |
| | | /** |
| | | * 运营后台-新增随手拍分类 |
| | | * @param addPhotoClassify 请求参数 |
| | | * @return 新增结果 |
| | | */ |
| | | @Override |
| | | public R addPhotoClassify(AddEasyPhotoClassifyDTO addPhotoClassify){ |
| | | ComActEasyPhotoClassifyDO photoClassifyDO = this.baseMapper.selectOne(new QueryWrapper<ComActEasyPhotoClassifyDO>().lambda() |
| | | .eq(ComActEasyPhotoClassifyDO::getName,addPhotoClassify.getName())); |
| | | if(photoClassifyDO != null){ |
| | | return R.fail("该随手拍分类已存在,请勿重复添加"); |
| | | } |
| | | photoClassifyDO = new ComActEasyPhotoClassifyDO(); |
| | | BeanUtils.copyProperties(addPhotoClassify,photoClassifyDO); |
| | | photoClassifyDO.setCreateAt(new Date()); |
| | | photoClassifyDO.setStatus(ComActEasyPhotoClassifyDO.status.yes); |
| | | if(this.baseMapper.insert(photoClassifyDO) > 0){ |
| | | return R.ok(); |
| | | }else{ |
| | | return R.fail(); |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * 运营后台-编辑随手拍分类 |
| | | * @param addPhotoClassify 请求参数 |
| | | * @return 编辑结果 |
| | | */ |
| | | @Override |
| | | public R editPhotoClassify(AddEasyPhotoClassifyDTO addPhotoClassify){ |
| | | ComActEasyPhotoClassifyDO photoClassifyDO = this.baseMapper.selectById(addPhotoClassify.getId()); |
| | | if(photoClassifyDO == null){ |
| | | return R.fail("该随手拍分类不存在"); |
| | | } |
| | | BeanUtils.copyProperties(addPhotoClassify,photoClassifyDO); |
| | | photoClassifyDO.setUpdateAt(new Date()); |
| | | if(this.baseMapper.updateById(photoClassifyDO) > 0){ |
| | | return R.ok(); |
| | | }else{ |
| | | return R.fail(); |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * 运营后台-随手拍分类详情 |
| | | * @param id 随手拍分类id |
| | | * @return 随手拍分类 |
| | | */ |
| | | @Override |
| | | public R detailPhotoClassify(Long id){ |
| | | ComActEasyPhotoClassifyVO photoClassifyVO = new ComActEasyPhotoClassifyVO(); |
| | | ComActEasyPhotoClassifyDO photoClassifyDO = this.baseMapper.selectById(id); |
| | | if(photoClassifyDO == null){ |
| | | return R.fail("该随手拍分类不存在"); |
| | | } |
| | | BeanUtils.copyProperties(photoClassifyDO,photoClassifyVO); |
| | | return R.ok(photoClassifyVO); |
| | | } |
| | | |
| | | /** |
| | | * 运营后台-分页查询随手拍分类 |
| | | * @param addPhotoClassify 请求参数 |
| | | * @return 随手拍分类列表 |
| | | */ |
| | | @Override |
| | | public R pagePhotoClassify(AddEasyPhotoClassifyDTO addPhotoClassify){ |
| | | return R.ok(this.baseMapper.getPhotoClassifyPage(new Page(addPhotoClassify.getPageNum(),addPhotoClassify.getPageSize()),addPhotoClassify)); |
| | | } |
| | | |
| | | /** |
| | | * 运营后台-查询随手拍分类列表 |
| | | * @return 随手拍分类列表 |
| | | */ |
| | | @Override |
| | | public R listPhotoClassify(){ |
| | | return R.ok(this.baseMapper.getPhotoClassifyList()); |
| | | } |
| | | |
| | | /** |
| | | * 运营后台-随手拍分类删除 |
| | | * @param id 随手拍分类id |
| | | * @return 删除结果 |
| | | */ |
| | | @Override |
| | | public R deletePhotoClassify(Long id){ |
| | | if(this.baseMapper.deleteById(id) > 0){ |
| | | return R.ok(); |
| | | }else{ |
| | | return R.fail(); |
| | | } |
| | | } |
| | | |
| | | } |
| | |
| | | import com.panzhihua.common.model.dtos.community.GrantRewardDTO; |
| | | import com.panzhihua.common.model.dtos.community.PageComActEasyPhotoCommentDTO; |
| | | import com.panzhihua.common.model.dtos.community.ComActEasyPhotoCommentUserDTO; |
| | | import com.panzhihua.common.model.dtos.community.easyPhoto.ExportEasyPhotoDTO; |
| | | import com.panzhihua.common.model.vos.R; |
| | | import com.panzhihua.common.model.vos.community.*; |
| | | import com.panzhihua.common.model.vos.community.easyPhoto.ExportEasyPhotoVO; |
| | | import com.panzhihua.common.utlis.*; |
| | | import com.panzhihua.service_community.dao.*; |
| | | import com.panzhihua.service_community.model.dos.*; |
| | |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.beans.BeanUtils; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.util.CollectionUtils; |
| | | import org.springframework.util.ObjectUtils; |
| | | |
| | | import javax.annotation.Resource; |
| | |
| | | }else { |
| | | comActEasyPhotoVO1.setHaveGiveThumbsUp(1); |
| | | } |
| | | comActEasyPhotoVO1.setPhone(SensitiveUtil.desensitizedPhoneNumber(comActEasyPhotoVO1.getPhone())); |
| | | |
| | | if(comActEasyPhotoVO1.getActivityId() != null && comActEasyPhotoVO1.getStatus().equals(ComActEasyPhotoDO.status.ywc)){ |
| | | //查询随手拍活动 |
| | |
| | | comActEasyPhotoVO1.setActivityMoney(photoActivityDO.getOrdinaryReward()); |
| | | }else if(comActEasyPhotoVO1.getActivityType().equals(ComActEasyPhotoDO.activityType.yb)){ |
| | | comActEasyPhotoVO1.setActivityMoney(photoActivityDO.getCommonlyReward()); |
| | | }else if(comActEasyPhotoVO1.getActivityType().equals(ComActEasyPhotoDO.activityType.wu)){ |
| | | comActEasyPhotoVO1.setActivityMoney(BigDecimal.ZERO); |
| | | } |
| | | } |
| | | } |
| | |
| | | comActEasyPhotoVO.setPhotoFeedbackList(photoFeedbackList); |
| | | } |
| | | |
| | | comActEasyPhotoVO.setPhone(SensitiveUtil.desensitizedPhoneNumber(comActEasyPhotoVO.getPhone())); |
| | | // comActEasyPhotoVO.setPhone(SensitiveUtil.desensitizedPhoneNumber(comActEasyPhotoVO.getPhone())); |
| | | if(comActEasyPhotoVO.getAddrRemark()==null){ |
| | | comActEasyPhotoVO.setAddrRemark(""); |
| | | } |
| | |
| | | switch (type){ |
| | | case 1: |
| | | if(!cmActEasyPhotoDO.getStatus().equals(ComActEasyPhotoDO.status.dsh)){ |
| | | return R.fail("该随手拍已审核,不可重复操作"); |
| | | return R.fail("该随手拍已处理,不可重复操作"); |
| | | } |
| | | cmActEasyPhotoDO.setStatus(2);//进行中 |
| | | cmActEasyPhotoDO.setIsNeedFeedBack(1); |
| | | cmActEasyPhotoDO.setHandlerId(comActEasyPhotoVO.getUserId()); |
| | | cmActEasyPhotoDO.setIsPublicity(comActEasyPhotoVO.getIsPublicity()); |
| | | if(comActEasyPhotoVO.getIsReportUrban().equals(ComActEasyPhotoVO.isReportUrban.yes)){ |
| | | cmActEasyPhotoDO.setIsReportUrban(ComActEasyPhotoVO.isReportUrban.yes); |
| | | cmActEasyPhotoDO.setTransferReason(comActEasyPhotoVO.getTransferReason()); |
| | | cmActEasyPhotoDO.setTransferTime(nowDate); |
| | | }else{ |
| | | cmActEasyPhotoDO.setIsReportUrban(ComActEasyPhotoVO.isReportUrban.no); |
| | | cmActEasyPhotoDO.setHandlerId(comActEasyPhotoVO.getHandlerId()); |
| | | } |
| | | cmActEasyPhotoDO.setExamineAt(nowDate); |
| | | cmActEasyPhotoDO.setActivityType(comActEasyPhotoVO.getActivityType()); |
| | | if(StringUtils.isNotEmpty(comActEasyPhotoVO.getHandleResult()) || StringUtils.isNotEmpty(comActEasyPhotoVO.getHandlePhotoList())){ |
| | |
| | | comActUserWalletService.examineAddMoney(comActEasyPhotoVO.getActivityType(),comActEasyPhotoVO.getId(),comActEasyPhotoVO.getUserId(),BigDecimal.ZERO); |
| | | break; |
| | | case 2: |
| | | if(!cmActEasyPhotoDO.getStatus().equals(ComActEasyPhotoDO.status.dsh)){ |
| | | return R.fail("该随手拍已审核,不可重复操作"); |
| | | } |
| | | cmActEasyPhotoDO.setHandlerId(comActEasyPhotoVO.getUserId()); |
| | | cmActEasyPhotoDO.setStatus(3);//已驳回 |
| | | cmActEasyPhotoDO.setExamineAt(nowDate); |
| | | cmActEasyPhotoDO.setRejectReason(comActEasyPhotoVO.getRejectReason()); |
| | | // if(!cmActEasyPhotoDO.getStatus().equals(ComActEasyPhotoDO.status.dsh)){ |
| | | // return R.fail("该随手拍已处理,不可重复操作"); |
| | | // } |
| | | // cmActEasyPhotoDO.setHandlerId(comActEasyPhotoVO.getUserId()); |
| | | // cmActEasyPhotoDO.setStatus(3);//已驳回 |
| | | // cmActEasyPhotoDO.setExamineAt(nowDate); |
| | | // cmActEasyPhotoDO.setRejectReason(comActEasyPhotoVO.getRejectReason()); |
| | | break; |
| | | case 3: |
| | | if(!cmActEasyPhotoDO.getStatus().equals(ComActEasyPhotoDO.status.dfk)){ |
| | | return R.fail("该随手拍不是待反馈状态,不可进行反馈"); |
| | | return R.fail("该随手拍不是进行中状态,不可进行反馈"); |
| | | } |
| | | //给随手拍新增反馈信息 |
| | | ComActEasyPhotoFeedbackDO photoFeedbackDO = new ComActEasyPhotoFeedbackDO(); |
| | |
| | | photoFeedback.setCreateBy(comActEasyPhotoVO.getUserId()); |
| | | comActEasyPhotoFeedbackMapper.insert(photoFeedback); |
| | | } |
| | | if(cmActEasyPhotoDO.getStatus().equals(ComActEasyPhotoDO.status.dsh)){ |
| | | cmActEasyPhotoDO.setExamineAt(nowDate); |
| | | cmActEasyPhotoDO.setHandlerId(comActEasyPhotoVO.getUserId()); |
| | | cmActEasyPhotoDO.setActivityType(comActEasyPhotoVO.getActivityType()); |
| | | //审核通过判断随手拍是否有活动并计算用户收益 |
| | | comActUserWalletService.examineAddMoney(comActEasyPhotoVO.getActivityType(),comActEasyPhotoVO.getId(),comActEasyPhotoVO.getUserId(),BigDecimal.ZERO); |
| | | } |
| | | // if(cmActEasyPhotoDO.getStatus().equals(ComActEasyPhotoDO.status.dsh)){ |
| | | // cmActEasyPhotoDO.setExamineAt(nowDate); |
| | | // cmActEasyPhotoDO.setHandlerId(comActEasyPhotoVO.getUserId()); |
| | | // cmActEasyPhotoDO.setActivityType(comActEasyPhotoVO.getActivityType()); |
| | | // //审核通过判断随手拍是否有活动并计算用户收益 |
| | | // comActUserWalletService.examineAddMoney(comActEasyPhotoVO.getActivityType(),comActEasyPhotoVO.getId(),comActEasyPhotoVO.getUserId(),BigDecimal.ZERO); |
| | | // } |
| | | cmActEasyPhotoDO.setFeedbackAt(nowDate); |
| | | cmActEasyPhotoDO.setStatus(ComActEasyPhotoDO.status.ywc); |
| | | cmActEasyPhotoDO.setCompleteId(comActEasyPhotoVO.getUserId()); |
| | |
| | | return R.ok(); |
| | | } |
| | | |
| | | @Override |
| | | public R easyPhotoCount(ComActEasyPhotoVO comActEasyPhotoVO) { |
| | | return R.ok(this.comActEasyPhotoDAO.easyPhotoCount(comActEasyPhotoVO)); |
| | | } |
| | | |
| | | @Override |
| | | public R updatePageeasyphoto(ComActEasyPhotoVO comActEasyPhotoVO) { |
| | | ComActEasyPhotoDO comActEasyPhotoDO=new ComActEasyPhotoDO(); |
| | | BeanUtils.copyProperties(comActEasyPhotoVO,comActEasyPhotoDO); |
| | | int result=this.comActEasyPhotoDAO.updateById(comActEasyPhotoDO); |
| | | if(result>0){ |
| | | return R.ok(); |
| | | } |
| | | return R.fail(); |
| | | } |
| | | |
| | | @Override |
| | | public R export(ExportEasyPhotoDTO exportEasyPhotoDTO) { |
| | | if(exportEasyPhotoDTO!=null){ |
| | | List<ExportEasyPhotoVO> list; |
| | | if(!CollectionUtils.isEmpty(exportEasyPhotoDTO.getIds())){ |
| | | list=this.comActEasyPhotoDAO.exportByIds(exportEasyPhotoDTO.getIds()); |
| | | } |
| | | else { |
| | | list=this.comActEasyPhotoDAO.export(exportEasyPhotoDTO); |
| | | } |
| | | return R.ok(list); |
| | | } |
| | | return R.fail("参数错误"); |
| | | } |
| | | |
| | | /** |
| | | * 社区后台-切换随手拍公示状态 |
| | | * @param comActEasyPhotoVO 请求参数 |
| | | * @return 切换结果 |
| | | */ |
| | | @Override |
| | | public R easyPhotoSwitchPublicity(ComActEasyPhotoVO comActEasyPhotoVO){ |
| | | //查询随手拍 |
| | | ComActEasyPhotoDO easyPhotoDO = this.baseMapper.selectById(comActEasyPhotoVO.getId()); |
| | | if(easyPhotoDO == null){ |
| | | return R.fail("未查询到随手拍记录"); |
| | | } |
| | | easyPhotoDO.setIsPublicity(comActEasyPhotoVO.getIsPublicity()); |
| | | if(this.baseMapper.updateById(easyPhotoDO) > 0){ |
| | | return R.ok(); |
| | | }else{ |
| | | return R.fail(); |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * 查询社区待处理随手拍id集合 |
| | | * @param communityId 社区id |
| | | * @return 社区待处理随手拍id集合 |
| | | */ |
| | | @Override |
| | | public R easyPhotoNoHandleList(Long communityId){ |
| | | return R.ok(this.baseMapper.easyPhotoNoHandleIds(communityId)); |
| | | } |
| | | |
| | | |
| | | } |
| | |
| | | Long userId = answerQuestnaireVO.getUserId(); |
| | | Long questId = answerQuestnaireVO.getQuestId(); |
| | | Date nowDate = new Date(); |
| | | |
| | | ComActQuestnaireDO questnaireDO = questnaireDAO.selectById(questId); |
| | | if (questnaireDO == null) { |
| | | return R.fail("调查问卷不存在!"); |
| | |
| | | return R.ok(result); |
| | | } |
| | | |
| | | /** |
| | | * 问卷调查统计汇总 |
| | | * @param summaryDTO 请求参数 |
| | | * @return 统计汇总 |
| | | */ |
| | | @Override |
| | | public R statisticsSummary(StatisticsSummaryDTO summaryDTO){ |
| | | IPage<QuestnaireStatisticsSummaryAdminVO> summaryAdminList = questnaireDAO.getStatisticsSummaryAdmin(new Page(summaryDTO.getPageNum(),summaryDTO.getPageSize()),summaryDTO); |
| | |
| | | summary.setTag(BigDecimal.valueOf(summary.getCount()).divide(BigDecimal.valueOf(summary.getAllCount()),2, RoundingMode.HALF_UP).multiply(BigDecimal.valueOf(100))); |
| | | } |
| | | }); |
| | | return R.ok(questnaireDAO.getStatisticsSummaryAdmin(new Page(summaryDTO.getPageNum(),summaryDTO.getPageSize()),summaryDTO)); |
| | | return R.ok(summaryAdminList); |
| | | } |
| | | |
| | | /** |
| | | * 问卷调查统计汇总导出数据查询 |
| | | * @param questId 调查问卷id |
| | | * @return 调查统计汇总导出数据 |
| | | */ |
| | | @Override |
| | | public R statisticsSummaryExport(Long questId){ |
| | | List<QuestnaireStatisticsSummaryExcelAdminVO> summaryExcelList = questnaireDAO.getStatisticsSummaryExcelAdmin(questId); |
| | |
| | | return R.ok(summaryExcelList); |
| | | } |
| | | |
| | | /** |
| | | * 问卷调查统计汇总表头统计 |
| | | * @param questId 调查问卷id |
| | | * @return 问卷调查统计汇总表头统计数据 |
| | | */ |
| | | @Override |
| | | public R statisticsSummaryHeader(Long questId){ |
| | | QuestnaireStatisticsSummaryHeaderAdminVO summaryHeaderAdminVO = this.questnaireDAO.statisticsSummaryHeader(questId); |
| | | public R statisticsSummaryHeader(Long questId,Long communityId){ |
| | | QuestnaireStatisticsSummaryHeaderAdminVO summaryHeaderAdminVO = this.questnaireDAO.statisticsSummaryHeader(questId,communityId); |
| | | if(summaryHeaderAdminVO != null){ |
| | | if(!summaryHeaderAdminVO.getUserCount().equals(0)){ |
| | | BigDecimal nub1 = BigDecimal.valueOf(summaryHeaderAdminVO.getAllCount()); |
| | | BigDecimal nub2 = BigDecimal.valueOf(summaryHeaderAdminVO.getUserCount()); |
| | | BigDecimal result = nub1.divide(nub2,2,RoundingMode.HALF_UP).multiply(BigDecimal.valueOf(100)); |
| | | summaryHeaderAdminVO.setTag(result); |
| | | } |
| | | } |
| | | return R.ok(summaryHeaderAdminVO); |
| | | } |
| | | |
| | | /** |
| | | * 定时任务检测待发布,调研中的问卷调查状态 |
| | | */ |
| | | @Override |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public R timedTaskQuestionnaire(){ |
| | |
| | | //查询所有开始时间已经超过当前时间的待发布状态调查问卷 |
| | | List<ComActQuestnaireDO> questnaireDOList = questnaireDAO.selectList(new QueryWrapper<ComActQuestnaireDO>().lambda() |
| | | .eq(ComActQuestnaireDO::getState,ComActQuestnaireDO.state.dfb).eq(ComActQuestnaireDO::getIsHide,0) |
| | | .ge(ComActQuestnaireDO::getStartTime,nowDate)); |
| | | .le(ComActQuestnaireDO::getStartTime,nowDate)); |
| | | questnaireDOList.forEach(questnaire -> { |
| | | questnaire.setState(ComActQuestnaireDO.state.dyz); |
| | | questnaire.setPublishTime(nowDate); |
| | |
| | | //查询所有结束时间已经超过当前时间的调研中状态调查问卷 |
| | | List<ComActQuestnaireDO> questnaireList = questnaireDAO.selectList(new QueryWrapper<ComActQuestnaireDO>().lambda() |
| | | .eq(ComActQuestnaireDO::getState,ComActQuestnaireDO.state.dyz).eq(ComActQuestnaireDO::getIsHide,0) |
| | | .ge(ComActQuestnaireDO::getEndTime,nowDate)); |
| | | .le(ComActQuestnaireDO::getEndTime,nowDate)); |
| | | questnaireList.forEach(questnaire -> { |
| | | questnaire.setState(ComActQuestnaireDO.state.yjs); |
| | | questnaireDAO.updateById(questnaire); |
| | |
| | | return R.ok(); |
| | | } |
| | | |
| | | /** |
| | | * 小程序-新增问卷调查浏览数量 |
| | | * @param questId 问卷调查id |
| | | * @return 增加结果 |
| | | */ |
| | | @Override |
| | | public R addQuestnaireView(Long questId){ |
| | | ComActQuestnaireDO questnaireDO = questnaireDAO.selectById(questId); |
| | |
| | | return R.ok(); |
| | | } |
| | | |
| | | /** |
| | | * 小程序-用户弹窗添加不在提醒接口 |
| | | * @param questId 问卷id |
| | | * @param userId 用户id |
| | | * @return 添加结果 |
| | | */ |
| | | @Override |
| | | public R addNoNotice(Long questId,Long userId){ |
| | | questnaireDAO.addNoNotice(questId,userId); |
| | |
| | | if(!isOnly(populationKey,populationMap)){ |
| | | //存在实有人口信息,则更新 |
| | | populationDO = (ComMngPopulationDO)populationMap.get(populationKey); |
| | | ComMngPopulationDO updatePopulationDO = updatePopulationDO(vo,populationDO,userId); |
| | | ComMngPopulationDO updatePopulationDO = updatePopulationDO(vo,populationDO,communityId,userId); |
| | | updateList.add(updatePopulationDO); |
| | | }else{ |
| | | //不存在实有人口,则新增 |
| | |
| | | if(!isOnly(populationKey,populationMap)){ |
| | | //存在实有人口信息,则更新 |
| | | populationDO = (ComMngPopulationDO)populationMap.get(populationKey); |
| | | ComMngPopulationDO updatePopulationDO = updateDrugPopulationDO(vo,populationDO,userId); |
| | | ComMngPopulationDO updatePopulationDO = updateDrugPopulationDO(vo,populationDO,communityId,userId); |
| | | updateList.add(updatePopulationDO); |
| | | }else{ |
| | | //不存在实有人口,则新增 |
| | |
| | | if(!isOnly(populationKey,populationMap)){ |
| | | //存在实有人口信息,则更新 |
| | | populationDO = (ComMngPopulationDO)populationMap.get(populationKey); |
| | | ComMngPopulationDO updatePopulationDO = updateCorrectPopulationDO(vo,populationDO,userId); |
| | | ComMngPopulationDO updatePopulationDO = updateCorrectPopulationDO(vo,populationDO,communityId,userId); |
| | | updateList.add(updatePopulationDO); |
| | | }else{ |
| | | //不存在实有人口,则新增 |
| | |
| | | if(!isOnly(populationKey,populationMap)){ |
| | | //存在实有人口信息,则更新 |
| | | populationDO = (ComMngPopulationDO)populationMap.get(populationKey); |
| | | ComMngPopulationDO updatePopulationDO = updateMajorPopulationDO(vo,populationDO,userId); |
| | | ComMngPopulationDO updatePopulationDO = updateMajorPopulationDO(vo,populationDO,communityId,userId); |
| | | updateList.add(updatePopulationDO); |
| | | }else{ |
| | | //不存在实有人口,则新增 |
| | |
| | | if(!isOnly(populationKey,populationMap)){ |
| | | //存在实有人口信息,则更新 |
| | | populationDO = (ComMngPopulationDO)populationMap.get(populationKey); |
| | | ComMngPopulationDO updatePopulationDO = updateCultPopulationDO(vo,populationDO,userId); |
| | | ComMngPopulationDO updatePopulationDO = updateCultPopulationDO(vo,populationDO,communityId,userId); |
| | | updateList.add(updatePopulationDO); |
| | | }else{ |
| | | //不存在实有人口,则新增 |
| | |
| | | if(!isOnly(populationKey,populationMap)){ |
| | | //存在实有人口信息,则更新 |
| | | populationDO = (ComMngPopulationDO)populationMap.get(populationKey); |
| | | ComMngPopulationDO updatePopulationDO = updateRehabilitationPopulationDO(vo,populationDO,userId); |
| | | ComMngPopulationDO updatePopulationDO = updateRehabilitationPopulationDO(vo,populationDO,communityId,userId); |
| | | updateList.add(updatePopulationDO); |
| | | }else{ |
| | | //不存在实有人口,则新增 |
| | |
| | | if(!isOnly(populationKey,populationMap)){ |
| | | //存在实有人口信息,则更新 |
| | | populationDO = (ComMngPopulationDO)populationMap.get(populationKey); |
| | | ComMngPopulationDO updatePopulationDO = updateKeyPopulationDO(vo,populationDO,userId); |
| | | ComMngPopulationDO updatePopulationDO = updateKeyPopulationDO(vo,populationDO,communityId,userId); |
| | | updateList.add(updatePopulationDO); |
| | | }else{ |
| | | //不存在实有人口,则新增 |
| | |
| | | if(!isOnly(populationKey,populationMap)){ |
| | | //存在实有人口信息,则更新 |
| | | populationDO = (ComMngPopulationDO)populationMap.get(populationKey); |
| | | ComMngPopulationDO updatePopulationDO = updateSentencePopulationDO(vo,populationDO,userId); |
| | | ComMngPopulationDO updatePopulationDO = updateSentencePopulationDO(vo,populationDO,communityId,userId); |
| | | updateList.add(updatePopulationDO); |
| | | }else{ |
| | | //不存在实有人口,则新增 |
| | |
| | | if(!isOnly(populationKey,populationMap)){ |
| | | //存在实有人口信息,则更新 |
| | | populationDO = (ComMngPopulationDO)populationMap.get(populationKey); |
| | | ComMngPopulationDO updatePopulationDO = updateVeteransPopulationDO(vo,populationDO,userId); |
| | | ComMngPopulationDO updatePopulationDO = updateVeteransPopulationDO(vo,populationDO,communityId,userId); |
| | | updateList.add(updatePopulationDO); |
| | | }else{ |
| | | //不存在实有人口,则新增 |
| | |
| | | if(!isOnly(populationKey,populationMap)){ |
| | | //存在实有人口信息,则更新 |
| | | populationDO = (ComMngPopulationDO)populationMap.get(populationKey); |
| | | ComMngPopulationDO updatePopulationDO = updateDisabilityPopulationDO(vo,populationDO,userId); |
| | | ComMngPopulationDO updatePopulationDO = updateDisabilityPopulationDO(vo,populationDO,communityId,userId); |
| | | updateList.add(updatePopulationDO); |
| | | }else{ |
| | | //不存在实有人口,则新增 |
| | |
| | | if(!isOnly(populationKey,populationMap)){ |
| | | //存在实有人口信息,则更新 |
| | | populationDO = (ComMngPopulationDO)populationMap.get(populationKey); |
| | | ComMngPopulationDO updatePopulationDO = updateLowSecurityPopulationDO(vo,populationDO,userId); |
| | | ComMngPopulationDO updatePopulationDO = updateLowSecurityPopulationDO(vo,populationDO,communityId,userId); |
| | | updateList.add(updatePopulationDO); |
| | | }else{ |
| | | //不存在实有人口,则新增 |
| | |
| | | } |
| | | |
| | | |
| | | private ComMngPopulationDO updatePopulationDO(ComMngPopulationServeExcelVO vo, ComMngPopulationDO populationDO, Long userId){ |
| | | private ComMngPopulationDO updatePopulationDO(ComMngPopulationServeExcelVO vo, ComMngPopulationDO populationDO, Long communityId, Long userId){ |
| | | BeanUtils.copyProperties(vo, populationDO); |
| | | // List<String> userTag = vo.getUserTagStr().stream().map(userTagStr -> userTagStr.split("\\(")[0]).collect(Collectors.toList()); |
| | | // //如果导入数据标签中有当前社区标签列表中不包含的标签,则删除 |
| | |
| | | log.error("身份证加密失败"); |
| | | } |
| | | // populationDO.setLabel(Joiner.on(",").join(userTag)); |
| | | populationDO.setActId(communityId); |
| | | populationDO.setCardNo(cardNoAES); |
| | | populationDO.setUpdateBy(userId); |
| | | return populationDO; |
| | | } |
| | | |
| | | private ComMngPopulationDO updateDrugPopulationDO(ComMngPopulationDrugExcelVO vo, ComMngPopulationDO populationDO, Long userId){ |
| | | private ComMngPopulationDO updateDrugPopulationDO(ComMngPopulationDrugExcelVO vo, ComMngPopulationDO populationDO, Long communityId, Long userId){ |
| | | BeanUtils.copyProperties(vo, populationDO); |
| | | ComDrugPopulationDO comDrugPopulationDO = comDrugPopulationDAO.selectOne(new QueryWrapper<ComDrugPopulationDO>().lambda() |
| | | .eq(ComDrugPopulationDO::getPopulationId, populationDO.getId())); |
| | |
| | | log.error("身份证加密失败"); |
| | | } |
| | | // populationDO.setLabel(Joiner.on(",").join(userTag)); |
| | | populationDO.setActId(communityId); |
| | | populationDO.setCardNo(cardNoAES); |
| | | populationDO.setUpdateBy(userId); |
| | | |
| | |
| | | return populationDO; |
| | | } |
| | | |
| | | private ComMngPopulationDO updateCorrectPopulationDO(ComMngPopulationCorrectExcelVO vo, ComMngPopulationDO populationDO,Long userId){ |
| | | private ComMngPopulationDO updateCorrectPopulationDO(ComMngPopulationCorrectExcelVO vo, ComMngPopulationDO populationDO,Long communityId, Long userId){ |
| | | BeanUtils.copyProperties(vo, populationDO); |
| | | ComCorrectPopulationDO comCorrectPopulationDO = comCorrectPopulationDAO.selectOne(new QueryWrapper<ComCorrectPopulationDO>().lambda() |
| | | .eq(ComCorrectPopulationDO::getPopulationId, populationDO.getId())); |
| | |
| | | log.error("身份证加密失败"); |
| | | } |
| | | // populationDO.setLabel(Joiner.on(",").join(userTag)); |
| | | populationDO.setActId(communityId); |
| | | populationDO.setCardNo(cardNoAES); |
| | | populationDO.setUpdateBy(userId); |
| | | if (comCorrectPopulationDO != null) { |
| | |
| | | return populationDO; |
| | | } |
| | | |
| | | private ComMngPopulationDO updateMajorPopulationDO(ComMngPopulationMajorExcelVO vo, ComMngPopulationDO populationDO,Long userId){ |
| | | private ComMngPopulationDO updateMajorPopulationDO(ComMngPopulationMajorExcelVO vo, ComMngPopulationDO populationDO,Long communityId, Long userId){ |
| | | BeanUtils.copyProperties(vo, populationDO); |
| | | ComMajorPopulationDO comMajorPopulationDO = comMajorPopulationDAO.selectOne(new QueryWrapper<ComMajorPopulationDO>().lambda() |
| | | .eq(ComMajorPopulationDO::getPopulationId, populationDO.getId())); |
| | |
| | | log.error("身份证加密失败"); |
| | | } |
| | | // populationDO.setLabel(Joiner.on(",").join(userTag)); |
| | | populationDO.setActId(communityId); |
| | | populationDO.setCardNo(cardNoAES); |
| | | populationDO.setUpdateBy(userId); |
| | | if (comMajorPopulationDO != null) { |
| | |
| | | return populationDO; |
| | | } |
| | | |
| | | private ComMngPopulationDO updateCultPopulationDO(ComMngPopulationCultExcelVO vo, ComMngPopulationDO populationDO,Long userId){ |
| | | private ComMngPopulationDO updateCultPopulationDO(ComMngPopulationCultExcelVO vo, ComMngPopulationDO populationDO,Long communityId, Long userId){ |
| | | BeanUtils.copyProperties(vo, populationDO); |
| | | ComCultPopulationDO comCultPopulationDO = comCultPopulationDAO.selectOne(new QueryWrapper<ComCultPopulationDO>().lambda(). |
| | | eq(ComCultPopulationDO::getPopulationId, populationDO.getId())); |
| | |
| | | log.error("身份证加密失败"); |
| | | } |
| | | // populationDO.setLabel(Joiner.on(",").join(userTag)); |
| | | populationDO.setActId(communityId); |
| | | populationDO.setCardNo(cardNoAES); |
| | | populationDO.setUpdateBy(userId); |
| | | if (comCultPopulationDO != null) { |
| | |
| | | return populationDO; |
| | | } |
| | | |
| | | private ComMngPopulationDO updateRehabilitationPopulationDO(ComMngPopulationRehabilitationExcelVO vo, ComMngPopulationDO populationDO,Long userId){ |
| | | private ComMngPopulationDO updateRehabilitationPopulationDO(ComMngPopulationRehabilitationExcelVO vo, ComMngPopulationDO populationDO,Long communityId, Long userId){ |
| | | BeanUtils.copyProperties(vo, populationDO); |
| | | ComRehabilitationPopulationDO comRehabilitationPopulationDO = comRehabilitationPopulationDAO.selectOne(new QueryWrapper<ComRehabilitationPopulationDO>().lambda(). |
| | | eq(ComRehabilitationPopulationDO::getPopulationId, populationDO.getId())); |
| | |
| | | log.error("身份证加密失败"); |
| | | } |
| | | // populationDO.setLabel(Joiner.on(",").join(userTag)); |
| | | populationDO.setActId(communityId); |
| | | populationDO.setCardNo(cardNoAES); |
| | | populationDO.setUpdateBy(userId); |
| | | if (comRehabilitationPopulationDO != null) { |
| | |
| | | return populationDO; |
| | | } |
| | | |
| | | private ComMngPopulationDO updateKeyPopulationDO(ComMngPopulationKeyExcelVO vo, ComMngPopulationDO populationDO,Long userId){ |
| | | private ComMngPopulationDO updateKeyPopulationDO(ComMngPopulationKeyExcelVO vo, ComMngPopulationDO populationDO,Long communityId, Long userId){ |
| | | BeanUtils.copyProperties(vo, populationDO); |
| | | ComKeyPopulationDO comKeyPopulationDO = comKeyPopulationDAO.selectOne(new QueryWrapper<ComKeyPopulationDO>().lambda(). |
| | | eq(ComKeyPopulationDO::getPopulationId, populationDO.getId())); |
| | |
| | | log.error("身份证加密失败"); |
| | | } |
| | | // populationDO.setLabel(Joiner.on(",").join(userTag)); |
| | | populationDO.setActId(communityId); |
| | | populationDO.setCardNo(cardNoAES); |
| | | populationDO.setUpdateBy(userId); |
| | | if (comKeyPopulationDO != null) { |
| | |
| | | return populationDO; |
| | | } |
| | | |
| | | private ComMngPopulationDO updateSentencePopulationDO(ComMngPopulationSentenceExcelVO vo, ComMngPopulationDO populationDO,Long userId){ |
| | | private ComMngPopulationDO updateSentencePopulationDO(ComMngPopulationSentenceExcelVO vo, ComMngPopulationDO populationDO,Long communityId, Long userId){ |
| | | BeanUtils.copyProperties(vo, populationDO); |
| | | ComSentencePopulationDO comSentencePopulationDO = comSentencePopulationDAO.selectOne(new QueryWrapper<ComSentencePopulationDO>().lambda(). |
| | | eq(ComSentencePopulationDO::getPopulationId, populationDO.getId())); |
| | |
| | | log.error("身份证加密失败"); |
| | | } |
| | | // populationDO.setLabel(Joiner.on(",").join(userTag)); |
| | | populationDO.setActId(communityId); |
| | | populationDO.setCardNo(cardNoAES); |
| | | populationDO.setUpdateBy(userId); |
| | | if (comSentencePopulationDO != null) { |
| | |
| | | return populationDO; |
| | | } |
| | | |
| | | private ComMngPopulationDO updateVeteransPopulationDO(ComMngPopulationVeteransExcelVO vo, ComMngPopulationDO populationDO,Long userId){ |
| | | private ComMngPopulationDO updateVeteransPopulationDO(ComMngPopulationVeteransExcelVO vo, ComMngPopulationDO populationDO,Long communityId, Long userId){ |
| | | BeanUtils.copyProperties(vo, populationDO); |
| | | ComVeteransPopulationDO comVeteransPopulationDO = comVeteransPopulationDAO.selectOne(new QueryWrapper<ComVeteransPopulationDO>().lambda(). |
| | | eq(ComVeteransPopulationDO::getPopulationId, populationDO.getId())); |
| | |
| | | log.error("身份证加密失败"); |
| | | } |
| | | // populationDO.setLabel(Joiner.on(",").join(userTag)); |
| | | populationDO.setActId(communityId); |
| | | populationDO.setCardNo(cardNoAES); |
| | | populationDO.setUpdateBy(userId); |
| | | if (comVeteransPopulationDO != null) { |
| | |
| | | } |
| | | return populationDO; |
| | | } |
| | | private ComMngPopulationDO updateDisabilityPopulationDO(ComMngPopulationDisabilityExcelVO vo, ComMngPopulationDO populationDO,Long userId){ |
| | | private ComMngPopulationDO updateDisabilityPopulationDO(ComMngPopulationDisabilityExcelVO vo, ComMngPopulationDO populationDO,Long communityId, Long userId){ |
| | | BeanUtils.copyProperties(vo, populationDO); |
| | | ComDisabilityPopulationDO comDisabilityPopulationDO = comDisabilityPopulationDAO.selectOne(new QueryWrapper<ComDisabilityPopulationDO>().lambda(). |
| | | eq(ComDisabilityPopulationDO::getPopulationId, populationDO.getId())); |
| | |
| | | log.error("身份证加密失败"); |
| | | } |
| | | // populationDO.setLabel(Joiner.on(",").join(userTag)); |
| | | populationDO.setActId(communityId); |
| | | populationDO.setCardNo(cardNoAES); |
| | | populationDO.setUpdateBy(userId); |
| | | if (comDisabilityPopulationDO != null) { |
| | |
| | | return populationDO; |
| | | } |
| | | |
| | | private ComMngPopulationDO updateLowSecurityPopulationDO(ComMngPopulationLowSecurityExcelVO vo, ComMngPopulationDO populationDO,Long userId){ |
| | | private ComMngPopulationDO updateLowSecurityPopulationDO(ComMngPopulationLowSecurityExcelVO vo, ComMngPopulationDO populationDO,Long communityId, Long userId){ |
| | | BeanUtils.copyProperties(vo, populationDO); |
| | | ComLowSecurityPopulationDO comLowSecurityPopulationDO = comLowSecurityPopulationDAO.selectOne(new QueryWrapper<ComLowSecurityPopulationDO>().lambda(). |
| | | eq(ComLowSecurityPopulationDO::getPopulationId, populationDO.getId())); |
| | |
| | | log.error("身份证加密失败"); |
| | | } |
| | | // populationDO.setLabel(Joiner.on(",").join(userTag)); |
| | | populationDO.setActId(communityId); |
| | | populationDO.setCardNo(cardNoAES); |
| | | populationDO.setUpdateBy(userId); |
| | | if (comLowSecurityPopulationDO != null) { |
New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="com.panzhihua.service_community.dao.ComActEasyPhotoClassifyMapper"> |
| | | |
| | | <!-- 通用查询映射结果 --> |
| | | <resultMap id="BaseResultMap" type="com.panzhihua.service_community.model.dos.ComActEasyPhotoClassifyDO"> |
| | | <id column="id" property="id" /> |
| | | <result column="name" property="name" /> |
| | | <result column="status" property="status" /> |
| | | <result column="weight" property="weight" /> |
| | | <result column="remark" property="remark" /> |
| | | <result column="create_at" property="createAt" /> |
| | | <result column="update_at" property="updateAt" /> |
| | | </resultMap> |
| | | |
| | | <!-- 通用查询结果列 --> |
| | | <sql id="Base_Column_List"> |
| | | id, name, status, weight, remark, create_at, update_at |
| | | </sql> |
| | | |
| | | <select id="getPhotoClassifyPage" resultType="com.panzhihua.common.model.vos.community.easyPhoto.ComActEasyPhotoClassifyVO"> |
| | | select id,`name`,`status`,weight,remark,create_at,update_at from com_act_easy_photo_classify |
| | | <where> |
| | | <if test="photoClassifyDTO.name != null and photoClassifyDTO.name != """> |
| | | and `name` like concat (#{photoClassifyDTO.name},'%') |
| | | </if> |
| | | </where> |
| | | order by create_at desc |
| | | </select> |
| | | |
| | | <select id="getPhotoClassifyList" resultType="com.panzhihua.common.model.vos.community.easyPhoto.ComActEasyPhotoClassifyVO"> |
| | | select id,`name`,`status`,weight,remark,create_at,update_at from com_act_easy_photo_classify |
| | | order by create_at desc |
| | | </select> |
| | | |
| | | </mapper> |
| | |
| | | p.activity_type, |
| | | p.activity_amount, |
| | | p.activity_id, |
| | | p.examine_at |
| | | p.is_report_urban, |
| | | p.classify_id, |
| | | ca.`name` as classifyName, |
| | | p.examine_at, |
| | | c.name communityName, |
| | | p.urban_status |
| | | FROM |
| | | com_act_easy_photo p |
| | | LEFT JOIN sys_user u ON p.sponsor_id = u.user_id |
| | | LEFT JOIN com_act_easy_photo_user pu ON p.id = pu.easy_photo_id |
| | | LEFT JOIN sys_user su ON p.handler_id = su.user_id |
| | | left join com_act c on p.community_id =c.community_id |
| | | left join com_act_easy_photo_classify ca on ca.id = p.classify_id |
| | | WHERE |
| | | p.del_tag = 0 |
| | | p.del_tag = 0 and p.`status` != 3 |
| | | <if test='comActEasyPhotoVO.communityId != null and comActEasyPhotoVO.communityId != 0'> |
| | | and p.community_id=#{comActEasyPhotoVO.communityId} |
| | | </if> |
| | | <if test='comActEasyPhotoVO.status != null and comActEasyPhotoVO.status!=0' > |
| | | AND p.`status` = #{comActEasyPhotoVO.status} |
| | | </if> |
| | | <if test='comActEasyPhotoVO.isPublicity != null' > |
| | | AND p.`is_publicity` = #{comActEasyPhotoVO.isPublicity} |
| | | </if> |
| | | <if test='comActEasyPhotoVO.isReportUrban != null' > |
| | | AND p.`is_report_urban` = #{comActEasyPhotoVO.isReportUrban} |
| | | </if> |
| | | <if test='comActEasyPhotoVO.urbanStatus != null' > |
| | | AND p.`urban_status` = #{comActEasyPhotoVO.urbanStatus} |
| | | </if> |
| | | <if test='comActEasyPhotoVO.createBegin != null '> |
| | | AND p.create_at BETWEEN #{comActEasyPhotoVO.createBegin} |
| | |
| | | <if test='comActEasyPhotoVO.keyWord != null and comActEasyPhotoVO.keyWord != ""'> |
| | | AND (u.`name` like concat(#{comActEasyPhotoVO.keyWord},'%') or |
| | | p.happen_addr like concat(#{comActEasyPhotoVO.keyWord},'%') or |
| | | su.`name` like concat(#{comActEasyPhotoVO.keyWord},'%') |
| | | su.`name` like concat(#{comActEasyPhotoVO.keyWord},'%') or |
| | | p.detail like concat(#{comActEasyPhotoVO.keyWord},'%') |
| | | ) |
| | | </if> |
| | | GROUP BY |
| | |
| | | AND del_tag = 0 |
| | | </select> |
| | | |
| | | <select id="easyPhotoCount" resultType="com.panzhihua.common.model.vos.community.easyPhoto.ComActEasyPhotoCountVO"> |
| | | select count(*) total,(select count(*) today from com_act_easy_photo where transfer_time BETWEEN DATE_FORMAT(CURDATE(),'%Y-%m-%d %H:%i:%s') and DATE_ADD(CURRENT_DATE, INTERVAL 1 DAY) |
| | | <if test="urbanStatus !=null"> |
| | | and urban_status=#{urbanStatus} |
| | | </if>) |
| | | today from com_act_easy_photo |
| | | <where> |
| | | 1=1 |
| | | <if test="urbanStatus !=null"> |
| | | and urban_status=#{urbanStatus} |
| | | </if> |
| | | </where> |
| | | </select> |
| | | |
| | | <select id="export" resultType="com.panzhihua.common.model.vos.community.ComActEasyPhotoVO"> |
| | | SELECT |
| | | p.id, |
| | | u.`name` sponsor_name, |
| | | u.phone phone, |
| | | count( pu.id ) giveThumbsUpNum, |
| | | u.image_url, |
| | | p.happen_addr, |
| | | su.`name` handler_name, |
| | | p.`status`, |
| | | p.`detail`, |
| | | p.`is_need_feed_back`, |
| | | p.`photo_path_list`, |
| | | p.create_at, |
| | | p.feedback_at, |
| | | p.is_report, |
| | | p.is_publicity, |
| | | p.activity_type, |
| | | p.activity_amount, |
| | | p.activity_id, |
| | | p.examine_at, |
| | | c.name communityName, |
| | | p.is_report_urban, |
| | | p.urban_status |
| | | FROM |
| | | com_act_easy_photo p |
| | | LEFT JOIN sys_user u ON p.sponsor_id = u.user_id |
| | | LEFT JOIN com_act_easy_photo_user pu ON p.id = pu.easy_photo_id |
| | | LEFT JOIN sys_user su ON p.handler_id = su.user_id |
| | | left join com_act c on p.community_id =c.community_id |
| | | WHERE |
| | | p.del_tag = 0 and p.`is_report_urban` =1 |
| | | <if test='communityId != null and communityId != 0'> |
| | | and p.community_id=#{communityId} |
| | | </if> |
| | | <if test='urbanStatus != null ' > |
| | | AND p.`urban_status` = #{urbanStatus} |
| | | </if> |
| | | <if test='createBegin != null '> |
| | | AND p.create_at BETWEEN #{createBegin} |
| | | AND #{createEnd} |
| | | </if> |
| | | |
| | | <if test='keyWord != null and keyWord != ""'> |
| | | AND (u.`name` like concat(#{keyWord},'%') or |
| | | p.happen_addr like concat(#{keyWord},'%') or |
| | | su.`name` like concat(#{keyWord},'%') or |
| | | p.detail like concat(#{keyWord},'%') |
| | | ) |
| | | </if> |
| | | GROUP BY |
| | | p.id |
| | | ORDER BY |
| | | p.create_at DESC |
| | | </select> |
| | | |
| | | <select id="exportByIds" resultType="com.panzhihua.common.model.vos.community.easyPhoto.ExportEasyPhotoVO"> |
| | | SELECT |
| | | p.id, |
| | | u.`name` sponsor_name, |
| | | u.phone phone, |
| | | count( pu.id ) giveThumbsUpNum, |
| | | u.image_url, |
| | | p.happen_addr, |
| | | su.`name` handler_name, |
| | | p.`status`, |
| | | p.`detail`, |
| | | p.`is_need_feed_back`, |
| | | p.`photo_path_list`, |
| | | p.create_at, |
| | | p.feedback_at, |
| | | p.is_report, |
| | | p.is_publicity, |
| | | p.activity_type, |
| | | p.activity_amount, |
| | | p.activity_id, |
| | | p.examine_at, |
| | | c.name communityName, |
| | | p.is_report_urban, |
| | | p.urban_status |
| | | FROM |
| | | com_act_easy_photo p |
| | | LEFT JOIN sys_user u ON p.sponsor_id = u.user_id |
| | | LEFT JOIN com_act_easy_photo_user pu ON p.id = pu.easy_photo_id |
| | | LEFT JOIN sys_user su ON p.handler_id = su.user_id |
| | | left join com_act c on p.community_id =c.community_id |
| | | WHERE |
| | | p.id in |
| | | <foreach collection="list" item="ids" index="index" |
| | | open="(" close=")" separator=","> |
| | | #{ids} |
| | | </foreach> |
| | | GROUP BY |
| | | p.id |
| | | ORDER BY |
| | | p.create_at DESC |
| | | </select> |
| | | |
| | | <select id="easyPhotoNoHandleIds" resultType="Long"> |
| | | select id from com_act_easy_photo where `status` = 1 and community_id = #{communityId} and del_tag = 0 |
| | | </select> |
| | | |
| | | </mapper> |
| | |
| | | AND user_id NOT IN ( SELECT user_id FROM com_act_questnaire_user_answer WHERE questnaire_id = #{questId} )) AS noVolunteerCount, |
| | | ( |
| | | SELECT |
| | | count( user_id ) |
| | | count( id ) |
| | | FROM |
| | | sys_user AS su |
| | | com_pb_member AS su |
| | | WHERE |
| | | is_partymember = 1 |
| | | AND user_id NOT IN ( SELECT user_id FROM com_act_questnaire_user_answer WHERE questnaire_id = #{questId} )) AS noPartymemberCount |
| | | community_id = #{communityId} |
| | | AND user_id NOT IN ( SELECT user_id FROM com_act_questnaire_user_answer WHERE questnaire_id = #{questId} )) AS noPartymemberCount, |
| | | (select count(user_id) from sys_user where community_id = 2 and type = 1) as userCount |
| | | FROM |
| | | com_act_questnaire_user_answer AS caqua |
| | | LEFT JOIN com_act_questnaire AS caq ON caq.id = caqua.questnaire_id |
| | |
| | | cmp.id, |
| | | cmp.`name`, |
| | | cmp.card_no as idCard, |
| | | cmp.label, |
| | | cmpct.label, |
| | | cmp.sex, |
| | | cmp.phone, |
| | | cmp.address, |
| | | cmp.political_outlook |
| | | FROM |
| | | com_mng_population AS cmp |
| | | left join com_mng_population_community_tags AS cmpct on cmp.id = cmpct.population_id |
| | | <where> |
| | | and cmp.label IS NOT NULL |
| | | and cmpct.label IS NOT NULL |
| | | <if test='specialPopulationDTO.communityId != null'> |
| | | and cmp.act_id = #{specialPopulationDTO.communityId} |
| | | and cmpct.community_id = #{specialPopulationDTO.communityId} |
| | | </if> |
| | | <if test="specialPopulationDTO.keyWord!=null and specialPopulationDTO.keyWord!= """> |
| | | AND (cmp.name like concat(#{specialPopulationDTO.keyWord},'%') or cmp.card_no_str like concat(#{specialPopulationDTO.keyWord},'%')) |
| | |
| | | count( id ) as populationTotal, |
| | | (select count(id) from com_mng_population where village_id = #{villageId} and out_or_local = 1) as localTotal, |
| | | (select count(id) from com_mng_population where village_id = #{villageId} and out_or_local = 2) as localTotal, |
| | | (select count(id) from com_mng_population where village_id = #{villageId} and label is not null) as specialTotal, |
| | | (select count(id) from com_mng_population_community_tags as cmpct left join com_mng_population as cmp on cmpct.population_id = cmp.id where cmp.village_id = #{villageId} and cmpct.label is not null) as specialTotal, |
| | | (select count(id) from com_mng_building where village_id = #{villageId}) as buildTotal |
| | | FROM |
| | | com_mng_population AS cmp |
| | |
| | | </select> |
| | | |
| | | <select id="getPopulationByLabelCount" resultType="Integer"> |
| | | select count(id) from com_mng_population where label is not null and village_id = #{villageId} and floor = #{floor} |
| | | select count(cmpct.id) from com_mng_population_community_tags AS cmpct |
| | | left join com_mng_population AS cmp on cmp.id = cmpct.population_id |
| | | where cmtct.label is not null and cmp.village_id = #{villageId} and floor = #{floor} |
| | | </select> |
| | | |
| | | </mapper> |
| | |
| | | cmp.`name`, |
| | | cmp.phone, |
| | | cmp.card_no AS idCard, |
| | | cmp.label, |
| | | cmpct.label, |
| | | cmp.address, |
| | | cmp.nation, |
| | | cmp.political_outlook |
| | | FROM |
| | | event_special_crowd_record AS escr |
| | | LEFT JOIN com_mng_population AS cmp ON cmp.id = escr.population_id |
| | | left join com_mng_population_community_tags as cmpct on cmpct.population_id = cmp.id |
| | | WHERE |
| | | escr.event_id = #{eventId} |
| | | </select> |
| | |
| | | |
| | | <select id="findListByPage" parameterType="com.panzhihua.common.model.query.visit.EventTasksQuery" resultType="com.panzhihua.common.model.vos.visit.EventVisitingTasksVO"> |
| | | select vt.id,vt.create_at,vt.create_by,vt.visiter_id,vt.visiter_name,vt.visiter_tele,vt.visiter_sex,vt.visiter_address,vt.dell_user_id,vt.dell_user_name,vt.submit_date,vt.cancel_time,vt.event_status, |
| | | TIMESTAMPDIFF(YEAR, p.birthday, CURDATE()) AS age,p.card_no_str,p.label,u.name as creator,p.nation_code,vt.exception,vt.grid_member_name,vt.grid_menber_tele,egd.grid_name AS gridName |
| | | TIMESTAMPDIFF(YEAR, p.birthday, CURDATE()) AS age,p.card_no_str,cmpct.label,u.name as creator,p.nation_code,vt.exception,vt.grid_member_name,vt.grid_menber_tele,egd.grid_name AS gridName |
| | | from event_visiting_tasks vt left join com_mng_population p on vt.visiter_id = p.id |
| | | left join com_mng_population_community_tags AS cmpct on p.id = cmpct.population_id |
| | | left join sys_user u on vt.create_by = u.user_id |
| | | left join event_grid_data egd on egd.id = vt.grid_id |
| | | where 1=1 |
| | | <if test = "query.communityId != null"> |
| | | and p.act_id = #{query.communityId} |
| | | and cmpct.community_id = #{query.communityId} |
| | | </if> |
| | | <if test = "query.status != null and query.status != 0"> |
| | | and vt.event_status = #{query.status} |
| | | </if> |
| | | <if test="query.tag != null and query.tag != ''"> |
| | | and p.label like concat(#{query.tag},'%') |
| | | and cmpct.label like concat(#{query.tag},'%') |
| | | </if> |
| | | <if test="query.isExp != null and query.isExp != ''"> |
| | | and vt.event_status = 7 |
| | |
| | | resultType="com.panzhihua.common.model.vos.visit.EventVisitingTasksVO"> |
| | | select vt.id,vt.create_at,vt.create_by,vt.visiter_id,vt.visiter_name,vt.visiter_tele,vt.visiter_sex |
| | | ,vt.visiter_address,vt.dell_user_id,vt.dell_user_name,vt.submit_date,vt.cancel_time,vt.event_status,p.nation,p.political_outlook, |
| | | TIMESTAMPDIFF(YEAR, p.birthday, CURDATE()) AS age,p.label,u.name as creator,p.nation_code,p.card_no as cardNoStr |
| | | TIMESTAMPDIFF(YEAR, p.birthday, CURDATE()) AS age,cmpct.label,u.name as creator,p.nation_code,p.card_no as cardNoStr |
| | | FROM event_visiting_tasks vt |
| | | LEFT JOIN com_mng_population p ON p.id = vt.visiter_id |
| | | left join com_mng_population_community_tags AS cmpct on p.id = cmpct.population_id |
| | | LEFT JOIN sys_user u ON u.user_id = vt.create_by |
| | | where 1=1 |
| | | <if test = "query.gridId != null"> |
| | |
| | | |
| | | <select id="list" parameterType="com.panzhihua.common.model.query.visit.EventTasksQuery" resultType="com.panzhihua.common.model.vos.visit.AppVisitTasksVO"> |
| | | SELECT vt.id,vt.visiter_name,vt.grid_member,vt.grid_member_name,vt.grid_menber_tele,vt.visiter_id,vt.visiter_name,vt.visiter_tele,vt.dell_user_id,vt.dell_user_name,vt.submit_date,vt.cancel_time,vt.create_at,u.name as creator,vt.event_status,vt.visiter_address,vt.happent_lat_lng, |
| | | p.card_no_str,vt.exception,p.name,REPLACE(p.label,',','#') |
| | | p.card_no_str,vt.exception,p.name,REPLACE(cmpct.label,',','#') |
| | | FROM event_visiting_tasks vt LEFT JOIN com_mng_population p ON vt.visiter_id = p.id |
| | | left join com_mng_population_community_tags AS cmpct on p.id = cmpct.population_id |
| | | left join sys_user u on vt.create_by = u.user_id |
| | | WHERE 1=1 |
| | | <if test = "query.visiterId !=null"> |
| | |
| | | </select> |
| | | |
| | | <select id="visitorList" parameterType="com.panzhihua.common.model.query.visit.EventVisitListQuery" resultType="com.panzhihua.common.model.vos.visit.EventVisitListVO"> |
| | | SELECT p.id,p.name,p.card_no_str,p.label, TIMESTAMPDIFF(YEAR, p.birthday, CURDATE()) AS age,p.sex,p.political_outlook,p.phone,p.census_register,phu.relation |
| | | SELECT p.id,p.name,p.card_no_str,cmpct.label, TIMESTAMPDIFF(YEAR, p.birthday, CURDATE()) AS age,p.sex,p.political_outlook,p.phone,p.census_register,phu.relation |
| | | FROM com_mng_population p LEFT JOIN com_mng_population_house_user phu ON p.id = phu.popul_id |
| | | left join com_mng_population_community_tags AS cmpct on p.id = cmpct.population_id |
| | | where 1=1 |
| | | <if test="query.sex != null"> |
| | | and p.sex = #{query.sex} |
| | |
| | | and phu.relation = #{query.houseHolder} |
| | | </if> |
| | | <if test="query.tag != null"> |
| | | and p.label like concat('%',#{query.tag},'%') |
| | | and cmpct.label like concat('%',#{query.tag},'%') |
| | | </if> |
| | | <if test="query.keyWord != null"> |
| | | and (p.card_no_str like concat(#{query.keyWord},'%') or |
| | |
| | | </select> |
| | | |
| | | <select id="findPopulationById" resultType="java.util.Map"> |
| | | SELECT p.id,p.name,p.sex,p.phone,p.road,p.door_no,p.floor,p.unit_no,p.house_no,v.address,v.lng,v.lat,p.label,p.out_or_local FROM com_mng_population p |
| | | SELECT p.id,p.name,p.sex,p.phone,p.road,p.door_no,p.floor,p.unit_no,p.house_no,v.address,v.lng,v.lat,cmpct.label,p.out_or_local FROM com_mng_population p |
| | | left join com_mng_population_community_tags AS cmpct on p.id = cmpct.population_id |
| | | LEFT JOIN com_mng_village v ON p.village_id = v.village_id WHERE p.id = #{id} |
| | | </select> |
| | | |
| | |
| | | return userService.getUserOpenId(userId); |
| | | } |
| | | |
| | | /** |
| | | * 查询社区后台工作人员列表 |
| | | * @param communityId 社区id |
| | | * @return 社区后台工作人员列表 |
| | | */ |
| | | @GetMapping("getUserListByCommunityId") |
| | | public R getUserListByCommunityId(@RequestParam("communityId")Long communityId) { |
| | | return userService.getUserListByCommunityId(communityId); |
| | | } |
| | | |
| | | } |
| | |
| | | "</script>") |
| | | List<ComPbServiceTeamWishVO> getServiceTeamList(@Param("param") String param, @Param("communityId") Long communityId); |
| | | |
| | | @Select("select user_id,`name` from sys_user as su where type = 3 and community_id = #{communityId}") |
| | | List<SysUserVO> getUserListByCommunityId(@Param("communityId") Long communityId); |
| | | |
| | | } |
| | |
| | | */ |
| | | R getUserOpenId(Long userId); |
| | | |
| | | /** |
| | | * 查询社区后台工作人员列表 |
| | | * @param communityId 社区id |
| | | * @return 社区后台工作人员列表 |
| | | */ |
| | | R getUserListByCommunityId(Long communityId); |
| | | |
| | | } |
| | |
| | | } |
| | | return R.fail(); |
| | | } |
| | | |
| | | /** |
| | | * 查询社区后台工作人员列表 |
| | | * @param communityId 社区id |
| | | * @return 社区后台工作人员列表 |
| | | */ |
| | | @Override |
| | | public R getUserListByCommunityId(Long communityId){ |
| | | return R.ok(this.userDao.getUserListByCommunityId(communityId)); |
| | | } |
| | | } |
| | |
| | | noLoginUrl.add("/api/applets/index/pagecomacteasyphotocomment"); |
| | | noLoginUrl.add("/api/applets/index/pagemicrowish"); |
| | | noLoginUrl.add("/api/applets/index/microwish"); |
| | | noLoginUrl.add("/api/applets/index/easyphoto/classify/list"); |
| | | noLoginUrl.add("/api/applets/index/getUserReward"); |
| | | noLoginUrl.add("/api/applets/pagediscuss"); |
| | | noLoginUrl.add("/api/applets/discuss"); |