springcloud_k8s_panzhihuazhihuishequ/.idea/workspace.xml
@@ -23,7 +23,22 @@ </component> <component name="ChangeListManager"> <list default="true" id="8ba27629-3e5d-4f42-993e-d0c055bc9371" name="Default Changelist" comment=""> <change afterPath="$PROJECT_DIR$/common/src/main/java/com/panzhihua/common/model/vos/community/ComMngStructAreaCityVO.java" afterDir="false" /> <change afterPath="$PROJECT_DIR$/common/src/main/java/com/panzhihua/common/model/vos/community/ComMngStructAreaProvinceVO.java" afterDir="false" /> <change afterPath="$PROJECT_DIR$/common/src/main/java/com/panzhihua/common/model/vos/community/CommunityActivitiesVO.java" afterDir="false" /> <change afterPath="$PROJECT_DIR$/common/src/main/java/com/panzhihua/common/model/vos/community/CommunityGovernanceTrendsVO.java" afterDir="false" /> <change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" /> <change beforePath="$PROJECT_DIR$/common/src/main/java/com/panzhihua/common/model/vos/IndexDataVO.java" beforeDir="false" afterPath="$PROJECT_DIR$/common/src/main/java/com/panzhihua/common/model/vos/IndexDataVO.java" afterDir="false" /> <change beforePath="$PROJECT_DIR$/common/src/main/java/com/panzhihua/common/service/community/CommunityService.java" beforeDir="false" afterPath="$PROJECT_DIR$/common/src/main/java/com/panzhihua/common/service/community/CommunityService.java" afterDir="false" /> <change beforePath="$PROJECT_DIR$/common/target/classes/com/panzhihua/common/model/vos/IndexDataVO.class" beforeDir="false" afterPath="$PROJECT_DIR$/common/target/classes/com/panzhihua/common/model/vos/IndexDataVO.class" afterDir="false" /> <change beforePath="$PROJECT_DIR$/common/target/classes/com/panzhihua/common/service/community/CommunityService.class" beforeDir="false" afterPath="$PROJECT_DIR$/common/target/classes/com/panzhihua/common/service/community/CommunityService.class" afterDir="false" /> <change beforePath="$PROJECT_DIR$/community_backstage/src/main/java/com/panzhihua/community_backstage/api/IndexApi.java" beforeDir="false" afterPath="$PROJECT_DIR$/community_backstage/src/main/java/com/panzhihua/community_backstage/api/IndexApi.java" afterDir="false" /> <change beforePath="$PROJECT_DIR$/service_community/src/main/java/com/panzhihua/service_community/api/CommunityApi.java" beforeDir="false" afterPath="$PROJECT_DIR$/service_community/src/main/java/com/panzhihua/service_community/api/CommunityApi.java" afterDir="false" /> <change beforePath="$PROJECT_DIR$/service_community/src/main/java/com/panzhihua/service_community/dao/ComActActivityDAO.java" beforeDir="false" afterPath="$PROJECT_DIR$/service_community/src/main/java/com/panzhihua/service_community/dao/ComActActivityDAO.java" afterDir="false" /> <change beforePath="$PROJECT_DIR$/service_community/src/main/java/com/panzhihua/service_community/service/ComActActivityService.java" beforeDir="false" afterPath="$PROJECT_DIR$/service_community/src/main/java/com/panzhihua/service_community/service/ComActActivityService.java" afterDir="false" /> <change beforePath="$PROJECT_DIR$/service_community/src/main/java/com/panzhihua/service_community/service/ComMngStructAreaDistrictService.java" beforeDir="false" afterPath="$PROJECT_DIR$/service_community/src/main/java/com/panzhihua/service_community/service/ComMngStructAreaDistrictService.java" afterDir="false" /> <change beforePath="$PROJECT_DIR$/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComActActivityServiceImpl.java" beforeDir="false" afterPath="$PROJECT_DIR$/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComActActivityServiceImpl.java" afterDir="false" /> <change beforePath="$PROJECT_DIR$/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComMngStructAreaDistrictServiceImpl.java" beforeDir="false" afterPath="$PROJECT_DIR$/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComMngStructAreaDistrictServiceImpl.java" afterDir="false" /> </list> <option name="SHOW_DIALOG" value="false" /> <option name="HIGHLIGHT_CONFLICTS" value="true" /> @@ -110,7 +125,20 @@ </set> </option> </component> <component name="RunManager" selected="Application.PartyBuildingApi"> <component name="RunManager" selected="Application.ComActActivityServiceImpl"> <configuration name="ComActActivityServiceImpl" type="Application" factoryName="Application" temporary="true" nameIsGenerated="true"> <option name="MAIN_CLASS_NAME" value="com.panzhihua.service_community.service.impl.ComActActivityServiceImpl" /> <module name="service_community" /> <extension name="coverage"> <pattern> <option name="PATTERN" value="com.panzhihua.service_community.service.impl.*" /> <option name="ENABLED" value="true" /> </pattern> </extension> <method v="2"> <option name="Make" enabled="true" /> </method> </configuration> <configuration name="ComBpActivityServiceImpl" type="Application" factoryName="Application" temporary="true" nameIsGenerated="true"> <option name="MAIN_CLASS_NAME" value="com.panzhihua.service_dangjian.service.impl.ComBpActivityServiceImpl" /> <module name="service_partybuilding" /> @@ -130,19 +158,6 @@ <extension name="coverage"> <pattern> <option name="PATTERN" value="com.panzhihua.applets.api.*" /> <option name="ENABLED" value="true" /> </pattern> </extension> <method v="2"> <option name="Make" enabled="true" /> </method> </configuration> <configuration name="RealNameUtil" type="Application" factoryName="Application" temporary="true" nameIsGenerated="true"> <option name="MAIN_CLASS_NAME" value="com.panzhihua.common.utlis.RealNameUtil" /> <module name="common" /> <extension name="coverage"> <pattern> <option name="PATTERN" value="com.panzhihua.common.utlis.*" /> <option name="ENABLED" value="true" /> </pattern> </extension> @@ -268,7 +283,6 @@ </configuration> <list> <item itemvalue="Application.UserServiceImpl" /> <item itemvalue="Application.RealNameUtil" /> <item itemvalue="Application.ComBpActivityServiceImpl" /> <item itemvalue="Spring Boot.AppletsApplication" /> <item itemvalue="Spring Boot.CommunityBackstageApplication" /> @@ -283,14 +297,15 @@ <item itemvalue="Spring Boot.TimejobApplication" /> <item itemvalue="Application.RichTextUtil" /> <item itemvalue="Application.PartyBuildingApi" /> <item itemvalue="Application.ComActActivityServiceImpl" /> </list> <recent_temporary> <list> <item itemvalue="Application.ComActActivityServiceImpl" /> <item itemvalue="Application.PartyBuildingApi" /> <item itemvalue="Application.RichTextUtil" /> <item itemvalue="Application.UserServiceImpl" /> <item itemvalue="Application.ComBpActivityServiceImpl" /> <item itemvalue="Application.RealNameUtil" /> </list> </recent_temporary> </component> @@ -408,7 +423,7 @@ <workItem from="1611019208339" duration="94460000" /> <workItem from="1611365644515" duration="33195000" /> <workItem from="1611536010905" duration="21843000" /> <workItem from="1611622682269" duration="47126000" /> <workItem from="1611622682269" duration="54478000" /> </task> <servers /> </component> @@ -436,10 +451,10 @@ <screen x="0" y="0" width="1536" height="824" /> </state> <state x="464" y="213" key="#com.intellij.fileTypes.FileTypeChooser/0.0.1536.824@0.0.1536.824" timestamp="1611735657367" /> <state x="574" y="118" key="#com.intellij.ide.util.MemberChooser" timestamp="1611735096786"> <state x="574" y="118" key="#com.intellij.ide.util.MemberChooser" timestamp="1611818599365"> <screen x="0" y="0" width="1536" height="824" /> </state> <state x="574" y="118" key="#com.intellij.ide.util.MemberChooser/0.0.1536.824@0.0.1536.824" timestamp="1611735096786" /> <state x="574" y="118" key="#com.intellij.ide.util.MemberChooser/0.0.1536.824@0.0.1536.824" timestamp="1611818599365" /> <state x="405" y="335" key="#com.intellij.refactoring.move.MoveHandler.SelectRefactoringDialog" timestamp="1606099594079"> <screen x="0" y="0" width="1536" height="824" /> </state> @@ -468,54 +483,54 @@ <screen x="0" y="0" width="1536" height="824" /> </state> <state x="549" y="167" key="FileChooserDialogImpl/0.0.1536.824@0.0.1536.824" timestamp="1610606590056" /> <state width="1031" height="488" key="GridCell.Tab.0.bottom" timestamp="1611810996568"> <state width="1031" height="306" key="GridCell.Tab.0.bottom" timestamp="1611821842303"> <screen x="0" y="0" width="1536" height="824" /> </state> <state width="1031" height="488" key="GridCell.Tab.0.bottom/0.0.1536.824@0.0.1536.824" timestamp="1611810996568" /> <state width="1031" height="488" key="GridCell.Tab.0.center" timestamp="1611810996568"> <state width="1031" height="306" key="GridCell.Tab.0.bottom/0.0.1536.824@0.0.1536.824" timestamp="1611821842303" /> <state width="1031" height="306" key="GridCell.Tab.0.center" timestamp="1611821842303"> <screen x="0" y="0" width="1536" height="824" /> </state> <state width="1031" height="488" key="GridCell.Tab.0.center/0.0.1536.824@0.0.1536.824" timestamp="1611810996568" /> <state width="1031" height="488" key="GridCell.Tab.0.left" timestamp="1611810996568"> <state width="1031" height="306" key="GridCell.Tab.0.center/0.0.1536.824@0.0.1536.824" timestamp="1611821842303" /> <state width="1031" height="306" key="GridCell.Tab.0.left" timestamp="1611821842302"> <screen x="0" y="0" width="1536" height="824" /> </state> <state width="1031" height="488" key="GridCell.Tab.0.left/0.0.1536.824@0.0.1536.824" timestamp="1611810996568" /> <state width="1031" height="488" key="GridCell.Tab.0.right" timestamp="1611810996568"> <state width="1031" height="306" key="GridCell.Tab.0.left/0.0.1536.824@0.0.1536.824" timestamp="1611821842302" /> <state width="1031" height="306" key="GridCell.Tab.0.right" timestamp="1611821842303"> <screen x="0" y="0" width="1536" height="824" /> </state> <state width="1031" height="488" key="GridCell.Tab.0.right/0.0.1536.824@0.0.1536.824" timestamp="1611810996568" /> <state width="1031" height="488" key="GridCell.Tab.1.bottom" timestamp="1611810996568"> <state width="1031" height="306" key="GridCell.Tab.0.right/0.0.1536.824@0.0.1536.824" timestamp="1611821842303" /> <state width="1031" height="306" key="GridCell.Tab.1.bottom" timestamp="1611821842303"> <screen x="0" y="0" width="1536" height="824" /> </state> <state width="1031" height="488" key="GridCell.Tab.1.bottom/0.0.1536.824@0.0.1536.824" timestamp="1611810996568" /> <state width="1031" height="488" key="GridCell.Tab.1.center" timestamp="1611810996568"> <state width="1031" height="306" key="GridCell.Tab.1.bottom/0.0.1536.824@0.0.1536.824" timestamp="1611821842303" /> <state width="1031" height="306" key="GridCell.Tab.1.center" timestamp="1611821842303"> <screen x="0" y="0" width="1536" height="824" /> </state> <state width="1031" height="488" key="GridCell.Tab.1.center/0.0.1536.824@0.0.1536.824" timestamp="1611810996568" /> <state width="1031" height="488" key="GridCell.Tab.1.left" timestamp="1611810996568"> <state width="1031" height="306" key="GridCell.Tab.1.center/0.0.1536.824@0.0.1536.824" timestamp="1611821842303" /> <state width="1031" height="306" key="GridCell.Tab.1.left" timestamp="1611821842303"> <screen x="0" y="0" width="1536" height="824" /> </state> <state width="1031" height="488" key="GridCell.Tab.1.left/0.0.1536.824@0.0.1536.824" timestamp="1611810996568" /> <state width="1031" height="488" key="GridCell.Tab.1.right" timestamp="1611810996568"> <state width="1031" height="306" key="GridCell.Tab.1.left/0.0.1536.824@0.0.1536.824" timestamp="1611821842303" /> <state width="1031" height="306" key="GridCell.Tab.1.right" timestamp="1611821842303"> <screen x="0" y="0" width="1536" height="824" /> </state> <state width="1031" height="488" key="GridCell.Tab.1.right/0.0.1536.824@0.0.1536.824" timestamp="1611810996568" /> <state width="1031" height="488" key="GridCell.Tab.2.bottom" timestamp="1611810996568"> <state width="1031" height="306" key="GridCell.Tab.1.right/0.0.1536.824@0.0.1536.824" timestamp="1611821842303" /> <state width="1031" height="306" key="GridCell.Tab.2.bottom" timestamp="1611821842303"> <screen x="0" y="0" width="1536" height="824" /> </state> <state width="1031" height="488" key="GridCell.Tab.2.bottom/0.0.1536.824@0.0.1536.824" timestamp="1611810996568" /> <state width="1031" height="488" key="GridCell.Tab.2.center" timestamp="1611810996568"> <state width="1031" height="306" key="GridCell.Tab.2.bottom/0.0.1536.824@0.0.1536.824" timestamp="1611821842303" /> <state width="1031" height="306" key="GridCell.Tab.2.center" timestamp="1611821842303"> <screen x="0" y="0" width="1536" height="824" /> </state> <state width="1031" height="488" key="GridCell.Tab.2.center/0.0.1536.824@0.0.1536.824" timestamp="1611810996568" /> <state width="1031" height="488" key="GridCell.Tab.2.left" timestamp="1611810996568"> <state width="1031" height="306" key="GridCell.Tab.2.center/0.0.1536.824@0.0.1536.824" timestamp="1611821842303" /> <state width="1031" height="306" key="GridCell.Tab.2.left" timestamp="1611821842303"> <screen x="0" y="0" width="1536" height="824" /> </state> <state width="1031" height="488" key="GridCell.Tab.2.left/0.0.1536.824@0.0.1536.824" timestamp="1611810996568" /> <state width="1031" height="488" key="GridCell.Tab.2.right" timestamp="1611810996568"> <state width="1031" height="306" key="GridCell.Tab.2.left/0.0.1536.824@0.0.1536.824" timestamp="1611821842303" /> <state width="1031" height="306" key="GridCell.Tab.2.right" timestamp="1611821842303"> <screen x="0" y="0" width="1536" height="824" /> </state> <state width="1031" height="488" key="GridCell.Tab.2.right/0.0.1536.824@0.0.1536.824" timestamp="1611810996568" /> <state width="1031" height="306" key="GridCell.Tab.2.right/0.0.1536.824@0.0.1536.824" timestamp="1611821842303" /> <state x="299" y="67" key="Maven.ArtifactSearchDialog" timestamp="1610611848124"> <screen x="0" y="0" width="1536" height="824" /> </state> springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/IndexDataVO.java
@@ -1,5 +1,7 @@ package com.panzhihua.common.model.vos; import com.panzhihua.common.model.vos.community.CommunityActivitiesVO; import com.panzhihua.common.model.vos.community.CommunityGovernanceTrendsVO; import com.panzhihua.common.model.vos.community.TodoEventsVO; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; @@ -26,7 +28,11 @@ @ApiModelProperty("党员人数") private Integer partymemberUser; @ApiModelProperty("代办事件") List<TodoEventsVO> todoEventsVOList; private List<TodoEventsVO> todoEventsVOList; @ApiModelProperty("社区治理动态") private CommunityGovernanceTrendsVO communityGovernanceTrendsVO; @ApiModelProperty("社区活动情况") private List<CommunityActivitiesVO> communityActivitiesVOS; } springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/community/ComMngStructAreaCityVO.java
New file @@ -0,0 +1,36 @@ package com.panzhihua.common.model.vos.community; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import lombok.Data; import java.util.List; /** * @program: springcloud_k8s_panzhihuazhihuishequ * @description: 城市 * @author: huang.hongfa weixin hhf9596 qq 959656820 * @create: 2021-01-28 14:11 **/ @Data @ApiModel("城市表") public class ComMngStructAreaCityVO { @ApiModelProperty("自增 id") private Integer id; @ApiModelProperty("城市名称") private String cityName; @ApiModelProperty("城市行政区划代码") private Integer cityAdcode; @ApiModelProperty("省份行政区划代码") private Integer provinceAdcode; @ApiModelProperty("省份 id") private Integer provinceId; @ApiModelProperty("下属区县") private List<ComMngStructAreaDistrictVO> comMngStructAreaDistrictVOS; } springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/community/ComMngStructAreaProvinceVO.java
New file @@ -0,0 +1,32 @@ package com.panzhihua.common.model.vos.community; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import lombok.Data; import java.util.List; /** * @program: springcloud_k8s_panzhihuazhihuishequ * @description: 省份 * @author: huang.hongfa weixin hhf9596 qq 959656820 * @create: 2021-01-28 14:10 **/ @Data @ApiModel("省份表") public class ComMngStructAreaProvinceVO { @ApiModelProperty("自增 id") private Integer id; @ApiModelProperty("省份名称") private String provinceName; @ApiModelProperty("省份行政区划代码") private Integer provinceAdcode; @ApiModelProperty("下属城市") private List<ComMngStructAreaCityVO> comMngStructAreaCityVOS; } springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/community/CommunityActivitiesVO.java
New file @@ -0,0 +1,32 @@ package com.panzhihua.common.model.vos.community; import com.fasterxml.jackson.annotation.JsonFormat; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import lombok.Data; import java.util.Date; /** * @program: springcloud_k8s_panzhihuazhihuishequ * @description: 社区活动情况 * @author: huang.hongfa weixin hhf9596 qq 959656820 * @create: 2021-01-28 15:08 **/ @Data @ApiModel("社区活动情况") public class CommunityActivitiesVO { @ApiModelProperty("随手拍") private Integer eashPhoto; @ApiModelProperty("微心愿") private Integer microWish; @ApiModelProperty("社区活动") private Integer actActivity; @ApiModelProperty("党员活动") private Integer pbActivity; @ApiModelProperty("一起议") private Integer discuss; @ApiModelProperty("日期") @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8") private Date date; } springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/community/CommunityGovernanceTrendsVO.java
New file @@ -0,0 +1,22 @@ package com.panzhihua.common.model.vos.community; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import lombok.Data; import java.util.List; /** * @program: springcloud_k8s_panzhihuazhihuishequ * @description: 社区治理动态 * @author: huang.hongfa weixin hhf9596 qq 959656820 * @create: 2021-01-28 15:04 **/ @Data @ApiModel("社区治理动态") public class CommunityGovernanceTrendsVO { @ApiModelProperty("治理类型") private List<String> x; @ApiModelProperty("动态条数") private List<String> y; } springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/service/community/CommunityService.java
@@ -840,4 +840,12 @@ */ @PostMapping("listareadistrict") R listAreaDistrict(@RequestParam("cityAdcode") Long cityAdcode); /** * 首页图表数据汇总 * @param communityId 社区id * @return 图表数据 */ @PostMapping("indexdatacommunitybackstageechart") R indexDataCommunityBackstageEchart(@RequestParam("communityId")Long communityId); } springcloud_k8s_panzhihuazhihuishequ/common/target/classes/com/panzhihua/common/model/vos/IndexDataVO.classBinary files differ
springcloud_k8s_panzhihuazhihuishequ/common/target/classes/com/panzhihua/common/model/vos/community/ComMngStructAreaCityVO.classBinary files differ
springcloud_k8s_panzhihuazhihuishequ/common/target/classes/com/panzhihua/common/model/vos/community/ComMngStructAreaProvinceVO.classBinary files differ
springcloud_k8s_panzhihuazhihuishequ/common/target/classes/com/panzhihua/common/model/vos/community/CommunityActivitiesVO.classBinary files differ
springcloud_k8s_panzhihuazhihuishequ/common/target/classes/com/panzhihua/common/model/vos/community/CommunityGovernanceTrendsVO.classBinary files differ
springcloud_k8s_panzhihuazhihuishequ/common/target/classes/com/panzhihua/common/service/community/CommunityService.classBinary files differ
springcloud_k8s_panzhihuazhihuishequ/community_backstage/src/main/java/com/panzhihua/community_backstage/api/IndexApi.java
@@ -48,6 +48,7 @@ Object data = r.getData(); IndexDataVO indexDataVO= JSONObject.parseObject(JSONObject.toJSONString(data),IndexDataVO.class); R r1=communityService.indexDataCommunityBackstage(communityId,userId); R r2 = communityService.indexDataCommunityBackstageEchart(communityId); if (R.isOk(r1)) { Object data1 = r1.getData(); List<TodoEventsVO> todoEventsVOS= JSONArray.parseArray(JSONArray.toJSONString(data1),TodoEventsVO.class); @@ -68,6 +69,16 @@ indexDataVO.setTodoEventsVOList(todoEventsVOS); r.setData(indexDataVO); } if (R.isOk(r2)) { Object data1 = r2.getData(); IndexDataVO indexDataVO1 = JSONObject.parseObject(JSONObject.toJSONString(data1), IndexDataVO.class); if (!ObjectUtils.isEmpty(indexDataVO1)) { indexDataVO.setCommunityActivitiesVOS(indexDataVO1.getCommunityActivitiesVOS()); indexDataVO.setCommunityGovernanceTrendsVO(indexDataVO1.getCommunityGovernanceTrendsVO()); r.setData(indexDataVO); } } } return r; } springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/api/CommunityApi.java
@@ -1155,5 +1155,15 @@ return comMngStructAreaDistrictService.listAreaDistrict(cityAdcode); } /** * 首页图表数据汇总 * @param communityId 社区id * @return 图表数据 IndexDataVO */ @PostMapping("indexdatacommunitybackstageechart") public R indexDataCommunityBackstageEchart(@RequestParam("communityId")Long communityId){ return comActActivityService.indexDataCommunityBackstageEchart(communityId); } } springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/ComActActivityDAO.java
@@ -4,6 +4,8 @@ import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.panzhihua.common.model.vos.community.ComActActivityVO; import com.panzhihua.common.model.vos.community.CommunityActivitiesVO; import com.panzhihua.common.model.vos.community.CommunityGovernanceTrendsVO; import com.panzhihua.common.model.vos.partybuilding.PageActivityMembersVO; import com.panzhihua.service_community.model.dos.ComActActivityDO; import org.apache.ibatis.annotations.Mapper; @@ -11,6 +13,7 @@ import org.apache.ibatis.annotations.Select; import org.apache.ibatis.annotations.Update; import java.util.Date; import java.util.List; /** @@ -220,4 +223,28 @@ @Update("update com_act_activity set `status`=4 where `status`=3 and TIMESTAMPDIFF(MINUTE,SYSDATE(),sign_up_end)<=0") int updateStatusToBeginAfterSingEnd(); @Select("select GROUP_CONCAT(t.x1,',',t.x2,',',t.x3,',',t.x4) from (\n" + "SELECT\n" + "(select COUNT(d.id) from com_act_discuss d where d.community_id=#{communityId})x1,\n" + "(select COUNT(w.id) from com_act_micro_wish w where w.community_id=#{communityId})x2,\n" + "(select COUNT(p.id) from com_act_easy_photo p where p.community_id=#{communityId})x3,\n" + "\tCOUNT( a.id ) x4\n" + "FROM\n" + "\tcom_pb_activity a \n" + "WHERE\n" + "\t a.community_id =#{communityId})t") String selectCommunityGovernanceTrendsVO(Long communityId); @Select("\n" + "\tSELECT\n" + "\t(select COUNT(d.id) from com_act_discuss d where DATE_FORMAT(d.create_at,'%Y-%m-%d')=DATE_FORMAT(#{date},'%Y-%m-%d') and d.community_id=#{communityId})discuss,\n" + "\t(select COUNT(w.id) from com_act_micro_wish w where DATE_FORMAT(w.create_at,'%Y-%m-%d')=DATE_FORMAT(#{date},'%Y-%m-%d') and w.community_id=#{communityId})microWish,\n" + "\t(select COUNT(p.id) from com_act_easy_photo p where DATE_FORMAT(p.create_at,'%Y-%m-%d')=DATE_FORMAT(#{date},'%Y-%m-%d') and p.community_id=#{communityId})eashPhoto,\n" + "\t(select COUNT(pa.id) from com_pb_activity pa where DATE_FORMAT(pa.create_at,'%Y-%m-%d')=DATE_FORMAT(#{date},'%Y-%m-%d') and pa.community_id=#{communityId})pbActivity,\n" + "\t\tCOUNT( a.id ) actActivity\n" + "\tFROM\n" + "\t\tcom_pb_activity a \n" + "\tWHERE\n" + "\t\tDATE_FORMAT( a.create_at, '%Y-%m-%d' )=DATE_FORMAT(#{date},'%Y-%m-%d') \n" + "\t\tAND a.community_id =#{communityId}") CommunityActivitiesVO selectCommunityActivitiesVO(@Param("communityId") Long communityId, @Param("date")Date date); } springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/ComActActivityService.java
@@ -102,4 +102,10 @@ * @return 返回结果 */ R pageActivityCommunityBack(ComActActivityVO comActActivityVO); /** * 首页图表数据汇总 * @param communityId 社区id * @return 图表数据 IndexDataVO */ R indexDataCommunityBackstageEchart(Long communityId); } springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/ComMngStructAreaDistrictService.java
@@ -15,4 +15,5 @@ * @return 地区列表 */ R listAreaDistrict(Long cityAdcode); } springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComActActivityServiceImpl.java
@@ -4,11 +4,9 @@ import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import com.panzhihua.common.model.vos.IndexDataVO; import com.panzhihua.common.model.vos.R; import com.panzhihua.common.model.vos.community.ActivitySignVO; import com.panzhihua.common.model.vos.community.ComActActivityVO; import com.panzhihua.common.model.vos.community.ComActEasyPhotoVO; import com.panzhihua.common.model.vos.community.SignactivityVO; import com.panzhihua.common.model.vos.community.*; import com.panzhihua.service_community.dao.ComActActSignDAO; import com.panzhihua.service_community.dao.ComActActivityDAO; import com.panzhihua.service_community.dao.ComActDiscussOptionUserDAO; @@ -16,12 +14,14 @@ import com.panzhihua.service_community.model.dos.ComActActivityDO; import com.panzhihua.service_community.service.ComActActivityService; import lombok.extern.slf4j.Slf4j; import org.apache.commons.lang3.time.DateUtils; import org.springframework.beans.BeanUtils; import org.springframework.stereotype.Service; import org.springframework.util.ObjectUtils; import javax.annotation.Resource; import java.util.ArrayList; import java.util.Arrays; import java.util.Date; import java.util.List; import java.util.stream.Collectors; @@ -369,5 +369,55 @@ return R.ok(iPage); } /** * 首页图表数据汇总 * * @param communityId 社区id * @return 图表数据 IndexDataVO */ @Override public R indexDataCommunityBackstageEchart(Long communityId) { IndexDataVO indexDataVO=new IndexDataVO(); CommunityGovernanceTrendsVO communityGovernanceTrendsVO=new CommunityGovernanceTrendsVO(); List<CommunityActivitiesVO> communityActivitiesVOS=new ArrayList<>(); List<Date>dates=this.getServenDays(); String s=comActActivityDAO.selectCommunityGovernanceTrendsVO(communityId); List<String>y= Arrays.asList(s.split(",")); communityGovernanceTrendsVO.setY(y); communityGovernanceTrendsVO.setX(Arrays.asList(new String[]{"一起议","微心愿","随手拍","社区活动"})); dates.forEach(date -> { CommunityActivitiesVO communityActivitiesVO=comActActivityDAO.selectCommunityActivitiesVO(communityId,date); communityActivitiesVO.setDate(date); communityActivitiesVOS.add(communityActivitiesVO); }); indexDataVO.setCommunityGovernanceTrendsVO(communityGovernanceTrendsVO); indexDataVO.setCommunityActivitiesVOS(communityActivitiesVOS); return R.ok(indexDataVO); } /** * 获取最近七天的时间 * @return */ private List<Date> getServenDays() { List<Date> dates=new ArrayList<>(); Date date=new Date(); for(int i=6;i>=0;i--){ Date date1= DateUtils.addDays(date,-i); dates.add(date1); } return dates; } public static void main(String[] args) { List<Date> dates=new ArrayList<>(); Date date=new Date(); for(int i=6;i>=0;i--){ Date date1= DateUtils.addDays(date,-i); dates.add(date1); } System.out.println(dates); } } springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComMngStructAreaDistrictServiceImpl.java
@@ -2,7 +2,9 @@ import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.panzhihua.common.model.vos.R; import com.panzhihua.common.model.vos.community.ComMngStructAreaCityVO; import com.panzhihua.common.model.vos.community.ComMngStructAreaDistrictVO; import com.panzhihua.common.model.vos.community.ComMngStructAreaProvinceVO; import com.panzhihua.service_community.dao.ComMngStructAreaDistrictDAO; import com.panzhihua.service_community.model.dos.ComMngStructAreaDistrictDO; import com.panzhihua.service_community.service.ComMngStructAreaDistrictService; @@ -33,6 +35,18 @@ */ @Override public R listAreaDistrict(Long cityAdcode) { List<ComMngStructAreaProvinceVO> comMngStructAreaProvinceVOS=new ArrayList<>(); ComMngStructAreaProvinceVO comMngStructAreaProvinceVO=new ComMngStructAreaProvinceVO(); comMngStructAreaProvinceVO.setId(23); comMngStructAreaProvinceVO.setProvinceAdcode(510000); comMngStructAreaProvinceVO.setProvinceName("四川省"); List<ComMngStructAreaCityVO> comMngStructAreaCityVOS=new ArrayList<>(); ComMngStructAreaCityVO comMngStructAreaCityVO=new ComMngStructAreaCityVO(); comMngStructAreaCityVO.setCityAdcode(510400); comMngStructAreaCityVO.setCityName("攀枝花市"); comMngStructAreaCityVO.setId(256); comMngStructAreaCityVO.setProvinceAdcode(510000); comMngStructAreaCityVO.setProvinceId(23); List<ComMngStructAreaDistrictDO> comMngStructAreaDistrictDOS = comMngStructAreaDistrictDAO.selectList(new QueryWrapper<ComMngStructAreaDistrictDO>().lambda().eq(ComMngStructAreaDistrictDO::getCityAdcode, cityAdcode)); List<ComMngStructAreaDistrictVO>comMngStructAreaDistrictVOS=new ArrayList<>(); if (!ObjectUtils.isEmpty(comMngStructAreaDistrictDOS)) { @@ -42,6 +56,12 @@ comMngStructAreaDistrictVOS.add(comMngStructAreaDistrictVO); }); } comMngStructAreaCityVO.setComMngStructAreaDistrictVOS(comMngStructAreaDistrictVOS); comMngStructAreaCityVOS.add(comMngStructAreaCityVO); comMngStructAreaProvinceVO.setComMngStructAreaCityVOS(comMngStructAreaCityVOS); comMngStructAreaProvinceVOS.add(comMngStructAreaProvinceVO); return R.ok(comMngStructAreaDistrictVOS); } }