New file |
| | |
| | | package com.panzhihua.applets.api; |
| | | |
| | | |
| | | import com.panzhihua.common.controller.BaseController; |
| | | import com.panzhihua.common.model.dtos.property.CommonPage; |
| | | import com.panzhihua.common.model.vos.R; |
| | | import com.panzhihua.common.model.vos.community.social.ComActSocialWorkerServiceVO; |
| | | import com.panzhihua.common.service.community.CommunityService; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import javax.annotation.Resource; |
| | | |
| | | /** |
| | | * 社工服务表(ComActSocialWorkerService)表控制层 |
| | | * projectName 成都呐喊信息技术有限公司-智慧社区项目 |
| | | * description: 社工服务表相关功能 |
| | | * |
| | | * @author zzj |
| | | * @since 2022-02-16 15:59:42 |
| | | */ |
| | | @RestController |
| | | @RequestMapping("comActSocialWorkerService") |
| | | @Api(tags = {"社工服务"}) |
| | | public class ComActSocialWorkerServiceApi extends BaseController { |
| | | /** |
| | | * 服务对象 |
| | | */ |
| | | @Resource |
| | | private CommunityService communityService; |
| | | |
| | | /** |
| | | * 分页查询所有数据 |
| | | * |
| | | * @param commonPage 查询实体 |
| | | * @return 所有数据 |
| | | */ |
| | | @ApiOperation(value = "分页查询",response = ComActSocialWorkerServiceVO.class) |
| | | @PostMapping("queryAll") |
| | | public R selectAll(@RequestBody CommonPage commonPage) { |
| | | commonPage.setUserId(this.getUserId()); |
| | | return this.communityService.selectAllComActSocialWorkerService(commonPage); |
| | | } |
| | | |
| | | /** |
| | | * 通过主键查询单条数据 |
| | | * |
| | | * @param id 主键 |
| | | * @return 单条数据 |
| | | */ |
| | | @ApiOperation(value = "分页查询",response = ComActSocialWorkerServiceVO.class) |
| | | @GetMapping("{id}") |
| | | public R selectOne(@PathVariable("id") Long id) { |
| | | return this.communityService.selectOneComActSocialWorkerService(id); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 修改数据 |
| | | * |
| | | * @param comActSocialWorkerServiceVO 实体对象 |
| | | * @return 修改结果 |
| | | */ |
| | | @ApiOperation("修改数据") |
| | | @PostMapping("/update") |
| | | public R update(@RequestBody ComActSocialWorkerServiceVO comActSocialWorkerServiceVO) { |
| | | return communityService.updateComActSocialWorkerService(comActSocialWorkerServiceVO); |
| | | } |
| | | } |
| | |
| | | @ApiModelProperty(value = "年龄结束") |
| | | private Integer ageEnd; |
| | | |
| | | @ApiModelProperty("活动id") |
| | | private Long activityId; |
| | | |
| | | } |
| | |
| | | @ApiModelProperty("街道id") |
| | | private Long streetId; |
| | | |
| | | @ApiModelProperty("账号类型 1街道 2社区 3社会组织") |
| | | private Integer userType; |
| | | } |
| | |
| | | */ |
| | | @ApiModelProperty(value = "是否证件 0否 1是") |
| | | private Integer credential; |
| | | |
| | | |
| | | /** |
| | | * 分类名称 |
| | | */ |
| | | @ApiModelProperty(value = "分类id") |
| | | private String skillTypeName; |
| | | } |
| | |
| | | |
| | | @ApiModelProperty("项目Id") |
| | | private Long projectId; |
| | | |
| | | @ApiModelProperty("项目名称") |
| | | private String projectName; |
| | | |
| | | @ApiModelProperty("社工数") |
| | | private Integer socialCount; |
| | | } |
| | |
| | | private Integer y; |
| | | @ApiModelProperty("累计数") |
| | | private Integer countY; |
| | | private String year; |
| | | } |
| | |
| | | private Integer userCount; |
| | | @ApiModelProperty("社会组织数") |
| | | private Integer socialOrgCount; |
| | | @ApiModelProperty("服务次数") |
| | | private Integer serviceCount; |
| | | @ApiModelProperty("社会组织管理") |
| | | private BigScreenHmkSocialOrgInfo bigScreenHmkSocialOrgInfo; |
| | | @ApiModelProperty("社工分析数据") |
New file |
| | |
| | | package com.panzhihua.common.model.vos.community.social; |
| | | |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.AllArgsConstructor; |
| | | import lombok.Builder; |
| | | import lombok.Data; |
| | | import lombok.NoArgsConstructor; |
| | | |
| | | import java.io.Serializable; |
| | | import java.util.Date; |
| | | |
| | | |
| | | /** |
| | | * 社工服务表(ComActSocialWorkerService)表实体类 |
| | | * projectName 成都呐喊信息技术有限公司-智慧社区项目 |
| | | * description: 社工服务表相关功能 |
| | | * |
| | | * @author zzj |
| | | * @since 2022-02-16 15:59:41 |
| | | */ |
| | | @Data |
| | | @ApiModel("社工服务表") |
| | | public class ComActSocialWorkerServiceVO implements Serializable { |
| | | |
| | | private Long id; |
| | | |
| | | /** |
| | | * 社工id |
| | | */ |
| | | @ApiModelProperty(value = "社工id") |
| | | private Long workerId; |
| | | |
| | | /** |
| | | * 发起人id |
| | | */ |
| | | @ApiModelProperty(value = "发起人id") |
| | | private Long senderId; |
| | | |
| | | /** |
| | | * 服务状态 0待执行 1已完成 |
| | | */ |
| | | @ApiModelProperty(value = "服务状态 0待执行 1已完成") |
| | | private Integer status; |
| | | |
| | | /** |
| | | * 内容id |
| | | */ |
| | | @ApiModelProperty(value = "内容id") |
| | | private Long serviceId; |
| | | |
| | | /** |
| | | * 服务类型 1微心愿 2随手拍 |
| | | */ |
| | | @ApiModelProperty(value = "服务类型 1微心愿 2随手拍") |
| | | private Integer serviceType; |
| | | |
| | | /** |
| | | * 创建时间 |
| | | */ |
| | | @ApiModelProperty(value = "创建时间") |
| | | private Date createTime; |
| | | |
| | | /** |
| | | * 汇报内容 |
| | | */ |
| | | @ApiModelProperty(value = "汇报内容") |
| | | private String resultContent; |
| | | |
| | | /** |
| | | * 汇报图片 |
| | | */ |
| | | @ApiModelProperty(value = "汇报图片") |
| | | private String resultUrl; |
| | | |
| | | /** |
| | | * 得分 |
| | | */ |
| | | @ApiModelProperty(value = "得分") |
| | | private Integer score; |
| | | |
| | | @ApiModelProperty("发起人姓名") |
| | | private String senderName; |
| | | } |
| | |
| | | */ |
| | | @ApiModelProperty(value = "分类名称") |
| | | private String secondColumnName; |
| | | |
| | | @ApiModelProperty(value = "责任方类型 1街道 2社区 3社会组织") |
| | | private Integer responsibilityType; |
| | | |
| | | @ApiModelProperty(value = "责任方id") |
| | | private Long responsibilityId; |
| | | } |
| | |
| | | |
| | | @ApiModelProperty("政策分类: 1-社工人才政策 2-社会组织培育政策 3-其他政策") |
| | | private Integer policyType; |
| | | |
| | | @ApiModelProperty("排序方式 正序 ASC") |
| | | private String sort; |
| | | } |
| | |
| | | import com.panzhihua.common.model.vos.civil.ComActSocialWorkerDetailsVO; |
| | | import com.panzhihua.common.model.vos.community.*; |
| | | import com.panzhihua.common.model.vos.community.cluster.admin.ComClusterMemberExcelVO; |
| | | import com.panzhihua.common.model.vos.community.social.ComActSocialProjectMemberVO; |
| | | import com.panzhihua.common.model.vos.community.social.ComActSocialProjectPublicityVO; |
| | | import com.panzhihua.common.model.vos.community.social.ComActSocialProjectScheduleVO; |
| | | import com.panzhihua.common.model.vos.community.social.SocialProjectVO; |
| | | import com.panzhihua.common.model.vos.community.social.*; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import com.panzhihua.common.model.vos.community.*; |
| | | import org.springframework.beans.BeanUtils; |
| | |
| | | R indexQuestionnaireList(@RequestBody PageBaseDTO pageBaseDTO); |
| | | |
| | | @PostMapping("/screen/hmk/baseInfo") |
| | | R hmkBaseInfo(); |
| | | R hmkBaseInfo(@RequestBody CommonPage commonPage); |
| | | |
| | | @GetMapping("/screen/hmk/partyProjectActivityLine") |
| | | R partyProjectActivityLine(); |
| | | |
| | | @PostMapping("/screen/hmk/projectActivityTop") |
| | | R projectActivityProject(@RequestBody CommonPage commonPage); |
| | | |
| | | /** |
| | | * 通过主键查询单条数据 |
| | |
| | | */ |
| | | @GetMapping("/comActSocialOrg/{id}") |
| | | R comActSocialOrgSelectOne(@PathVariable("id") Long id); |
| | | |
| | | |
| | | /** |
| | | * 通过userId查询 |
| | | * |
| | | * @param userId 主键 |
| | | * @return 单条数据 |
| | | */ |
| | | @GetMapping("/comActSocialOrg/selectByUserId") |
| | | R selectOneByUserId(@RequestParam("userId") Long userId); |
| | | |
| | | /** |
| | | * 分页查询所有数据 |
| | |
| | | */ |
| | | @PostMapping("/comActSocialWorker/input") |
| | | R listSaveSocialWorkerExcelVO(@RequestBody List<ComActSocialWorkerExcelVO> list, @RequestParam("communityId") Long communityId); |
| | | |
| | | /** |
| | | *活动查询社工列表 |
| | | * @param commonPage |
| | | * @return |
| | | */ |
| | | @PostMapping("/comActSocialWorker/activity") |
| | | R activity(@RequestBody CommonPage commonPage); |
| | | |
| | | /** |
| | | * 社工查询活动 |
| | | * @param commonPage |
| | | * @return |
| | | */ |
| | | @PostMapping("/comActSocialWorker/activityList") |
| | | R activityList(@RequestBody CommonPage commonPage); |
| | | |
| | | /** |
| | | * 分页查询所有数据 |
| | | * |
| | | * @param commonPage 查询实体 |
| | | * @return 所有数据 |
| | | */ |
| | | @PostMapping("/comActSocialWorkerService/queryAll") |
| | | R selectAllComActSocialWorkerService(@RequestBody CommonPage commonPage); |
| | | |
| | | /** |
| | | * 通过主键查询单条数据 |
| | | * |
| | | * @param id 主键 |
| | | * @return 单条数据 |
| | | */ |
| | | @GetMapping("/comActSocialWorkerService/{id}") |
| | | R selectOneComActSocialWorkerService(@PathVariable("id") Long id); |
| | | |
| | | /** |
| | | * 修改数据 |
| | | * |
| | | * @param comActSocialWorkerServiceVO 实体对象 |
| | | * @return 修改结果 |
| | | */ |
| | | @PostMapping("/comActSocialWorkerService/update") |
| | | R updateComActSocialWorkerService(@RequestBody ComActSocialWorkerServiceVO comActSocialWorkerServiceVO); |
| | | |
| | | /** |
| | | * 分页查询所有数据 |
| | | * |
| | |
| | | import com.panzhihua.common.model.dtos.PageBaseDTO; |
| | | import com.panzhihua.common.model.dtos.community.convenient.PagePopularMerchantDTO; |
| | | import com.panzhihua.common.model.dtos.property.CommonPage; |
| | | import com.panzhihua.common.model.vos.community.ComActDynVO; |
| | | import com.panzhihua.common.model.vos.community.*; |
| | | import com.panzhihua.common.model.vos.community.bigscreen.BigScreenStatisticPartyOrg; |
| | | import com.panzhihua.common.model.vos.community.bigscreen.WestScreenStatics; |
| | | import com.panzhihua.common.model.vos.partybuilding.PartyBuildingComPbDynVO; |
| | | import com.panzhihua.common.service.partybuilding.PartyBuildingService; |
| | | import com.panzhihua.common.model.vos.community.ComActDynVO; |
| | | import com.panzhihua.common.model.vos.community.ComActEasyPhotoVO; |
| | | import com.panzhihua.common.model.vos.community.ComActMicroWishVO; |
| | | import com.panzhihua.common.model.vos.community.ComActQuestnaireVO; |
| | | import com.panzhihua.common.model.vos.community.bigscreen.*; |
| | | import com.panzhihua.common.model.vos.community.convenient.ConvenientMerchantVO; |
| | | import com.panzhihua.common.model.vos.neighbor.ComActNeighborCircleAdminVO; |
| | |
| | | } |
| | | @ApiOperation(value = "河门口大屏首页", response = BigScreenHmkBaseInfo.class) |
| | | @PostMapping("/hmk/baseInfo") |
| | | public R getHmkBaseInfo(){ |
| | | return communityService.hmkBaseInfo(); |
| | | public R getHmkBaseInfo(@RequestBody CommonPage commonPage){ |
| | | return communityService.hmkBaseInfo(commonPage); |
| | | } |
| | | |
| | | @ApiOperation(value = "河门口大屏折线图", response = BigScreenActivityLine.class) |
| | | @GetMapping("/hmk/partyProjectActivityLine") |
| | | public R partyActivityLine(){ |
| | | return communityService.partyProjectActivityLine(); |
| | | } |
| | | @ApiOperation(value = "河门口活动积分排行", response = ComActActivityVO.class) |
| | | @PostMapping("/hmk/projectActivityTop") |
| | | public R projectActivityTop(@RequestBody CommonPage commonPage){ |
| | | return communityService.projectActivityProject(commonPage); |
| | | } |
| | | } |
| | |
| | | public R selectOne(@PathVariable("id") Long id){ |
| | | return this.communityService.comActSocialOrgSelectOne(id); |
| | | } |
| | | |
| | | /** |
| | | * 通过userId查询 |
| | | * @return 单条数据 |
| | | */ |
| | | @ApiOperation("通过userId查询单条数据") |
| | | @GetMapping("/selectByUserId") |
| | | public R selectOneByUserId() { |
| | | return communityService.selectOneByUserId(this.getUserId()); |
| | | } |
| | | |
| | | /** |
| | | * 新增数据 |
| | | * |
| | |
| | | import com.panzhihua.common.listen.ComCvtServeExcelListen; |
| | | import com.panzhihua.common.model.dtos.civil.*; |
| | | import com.panzhihua.common.model.dtos.community.ExportUserDTO; |
| | | import com.panzhihua.common.model.dtos.property.CommonPage; |
| | | import com.panzhihua.common.model.dtos.user.EexcelUserDTO; |
| | | import com.panzhihua.common.model.vos.R; |
| | | import com.panzhihua.common.model.vos.civil.ComActSocialWorkerDetailsVO; |
| | |
| | | return R.ok(comactsocialworkerUrl); |
| | | } |
| | | |
| | | @ApiOperation("获取活动社工") |
| | | @PostMapping("/activity") |
| | | public R activity(@RequestBody CommonPage commonPage){ |
| | | return communityService.activity(commonPage); |
| | | } |
| | | @ApiOperation("根据社工获取活动") |
| | | @PostMapping("/activityList") |
| | | R activityList(@RequestBody CommonPage commonPage){ |
| | | return communityService.activityList(commonPage); |
| | | } |
| | | } |
| | |
| | | |
| | | import javax.annotation.Resource; |
| | | |
| | | import com.panzhihua.common.model.dtos.property.CommonPage; |
| | | import com.panzhihua.service_community.service.ComActService; |
| | | import com.panzhihua.common.model.dtos.PageBaseDTO; |
| | | import com.panzhihua.common.model.dtos.community.convenient.PagePopularMerchantDTO; |
| | |
| | | } |
| | | |
| | | @PostMapping("/hmk/baseInfo") |
| | | public R getHmkBaseInfo(){ |
| | | return bigScreenStatisticsService.hmkBaseInfo(); |
| | | public R getHmkBaseInfo(@RequestBody CommonPage commonPage){ |
| | | return bigScreenStatisticsService.hmkBaseInfo(commonPage); |
| | | } |
| | | @GetMapping("/hmk/partyProjectActivityLine") |
| | | public R partyActivityLine(){ |
| | | return bigScreenStatisticsService.partyProjectActivityLine(); |
| | | } |
| | | @PostMapping("/hmk/projectActivityTop") |
| | | public R projectActivityTop(@RequestBody CommonPage commonPage){ |
| | | return bigScreenStatisticsService.projectActivityProject(commonPage); |
| | | } |
| | | @GetMapping("/hmk/projectType") |
| | | public R projectType(@RequestParam("name") String name){ |
| | | return bigScreenStatisticsService.projectType(name); |
| | | } |
| | | } |
| | |
| | | public R selectOne(@PathVariable("id") Long id) { |
| | | return this.comActSocialOrgService.selectById(id); |
| | | } |
| | | |
| | | /** |
| | | * 通过userId查询 |
| | | * |
| | | * @param userId 主键 |
| | | * @return 单条数据 |
| | | */ |
| | | @GetMapping("/selectByUserId") |
| | | public R selectOneByUserId(@RequestParam("userId") Long userId) { |
| | | return R.ok(this.comActSocialOrgService.getOne(new QueryWrapper<ComActSocialOrg>().lambda().eq(ComActSocialOrg::getUserId,userId))); |
| | | } |
| | | /** |
| | | * 新增数据 |
| | | * |
| | |
| | | @PostMapping("/input") |
| | | R export(@RequestBody List<ComActSocialWorkerExcelVO> list, @RequestParam("communityId") Long communityId){ |
| | | return comActSocialWorkerService.export(list,communityId); |
| | | }} |
| | | } |
| | | @PostMapping("/activity") |
| | | R activity(@RequestBody CommonPage commonPage){ |
| | | return comActSocialWorkerService.activity(commonPage); |
| | | } |
| | | @PostMapping("/activityList") |
| | | R activityList(@RequestBody CommonPage commonPage){ |
| | | return comActSocialWorkerService.activityList(commonPage); |
| | | } |
| | | } |
| | | |
| | | |
New file |
| | |
| | | package com.panzhihua.service_community.api; |
| | | |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.extension.api.ApiController; |
| | | import com.panzhihua.common.model.vos.R; |
| | | import com.panzhihua.common.model.dtos.property.CommonPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.panzhihua.common.model.vos.community.social.ComActSocialWorkerServiceVO; |
| | | import com.panzhihua.service_community.entity.ComActSocialWorkerService; |
| | | import com.panzhihua.service_community.service.ComActSocialWorkerServiceService; |
| | | import org.springframework.beans.BeanUtils; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.io.Serializable; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * 社工服务表(ComActSocialWorkerService)表控制层 |
| | | * projectName 成都呐喊信息技术有限公司-智慧社区项目 |
| | | * description: 社工服务表相关功能 |
| | | * |
| | | * @author zzj |
| | | * @since 2022-02-16 15:59:42 |
| | | */ |
| | | @RestController |
| | | @RequestMapping("comActSocialWorkerService") |
| | | public class ComActSocialWorkerServiceApi { |
| | | /** |
| | | * 服务对象 |
| | | */ |
| | | @Resource |
| | | private ComActSocialWorkerServiceService comActSocialWorkerServiceService; |
| | | |
| | | /** |
| | | * 分页查询所有数据 |
| | | * |
| | | * @param commonPage 查询实体 |
| | | * @return 所有数据 |
| | | */ |
| | | @PostMapping("queryAll") |
| | | public R selectAll(@RequestBody CommonPage commonPage) { |
| | | return this.comActSocialWorkerServiceService.pageList(commonPage); |
| | | } |
| | | |
| | | /** |
| | | * 通过主键查询单条数据 |
| | | * |
| | | * @param id 主键 |
| | | * @return 单条数据 |
| | | */ |
| | | @GetMapping("{id}") |
| | | public R selectOne(@PathVariable("id") Long id) { |
| | | return this.comActSocialWorkerServiceService.selectById(id); |
| | | } |
| | | |
| | | /** |
| | | * 新增数据 |
| | | * |
| | | * @param comActSocialWorkerService 实体对象 |
| | | * @return 新增结果 |
| | | */ |
| | | @PostMapping |
| | | public R insert(@RequestBody ComActSocialWorkerService comActSocialWorkerService) { |
| | | return R.ok(this.comActSocialWorkerServiceService.save(comActSocialWorkerService)); |
| | | } |
| | | |
| | | /** |
| | | * 修改数据 |
| | | * |
| | | * @param comActSocialWorkerServiceVO 实体对象 |
| | | * @return 修改结果 |
| | | */ |
| | | @PostMapping("/update") |
| | | public R update(@RequestBody ComActSocialWorkerServiceVO comActSocialWorkerServiceVO) { |
| | | ComActSocialWorkerService comActSocialWorkerService=new ComActSocialWorkerService(); |
| | | BeanUtils.copyProperties(comActSocialWorkerServiceVO,comActSocialWorkerService); |
| | | return R.ok(this.comActSocialWorkerServiceService.updateById(comActSocialWorkerService)); |
| | | } |
| | | |
| | | /** |
| | | * 删除数据 |
| | | * |
| | | * @param id 主键结合 |
| | | * @return 删除结果 |
| | | */ |
| | | @GetMapping("del") |
| | | public R delete(@RequestParam("id") Long id) { |
| | | return R.ok(this.comActSocialWorkerServiceService.removeById(id)); |
| | | } |
| | | } |
| | |
| | | * @return |
| | | */ |
| | | int addActivityType(@Param("comActActivityTypeVO") ComActActivityTypeVO comActActivityTypeVO); |
| | | |
| | | /** |
| | | * 查询项目活动列表 |
| | | * @param page |
| | | * @return |
| | | */ |
| | | IPage<ActActivityListVO> selectProjectActivity(Page page); |
| | | |
| | | /** |
| | | * 根据社工id查询活动列表 |
| | | * @param page |
| | | * @param id |
| | | * @return |
| | | */ |
| | | IPage<ActActivityListVO> selectActivityBySocialWorker(Page page,@Param("id")Long id); |
| | | } |
| | |
| | | * 查询社会组织数据 |
| | | * @return |
| | | */ |
| | | BigScreenHmkSocialOrgInfo selectInfo(); |
| | | BigScreenHmkSocialOrgInfo selectInfo(Long communityId); |
| | | |
| | | |
| | | /** |
| | | * 查询社会组织饼状图 |
| | | * @return |
| | | */ |
| | | List<BigScreenHmkProjectTypeInfo> selectType(); |
| | | List<BigScreenHmkProjectTypeInfo> selectType(Long communityId); |
| | | } |
| | |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.panzhihua.common.model.dtos.property.CommonPage; |
| | | import com.panzhihua.common.model.vos.community.bigscreen.BigScreenActivityLine; |
| | | import com.panzhihua.common.model.vos.community.bigscreen.BigScreenHmkBaseInfo; |
| | | import com.panzhihua.common.model.vos.community.bigscreen.BigScreenHmkProjectInfo; |
| | | import com.panzhihua.common.model.vos.community.bigscreen.BigScreenHmkProjectTypeInfo; |
| | |
| | | * 河门口大屏项目基础数据 |
| | | * @return |
| | | */ |
| | | BigScreenHmkProjectInfo selectBaseInfo(); |
| | | BigScreenHmkProjectInfo selectBaseInfo(Long communityId); |
| | | |
| | | /** |
| | | * 河门口大屏项目分类 |
| | | * @param orgName |
| | | * @param communityId |
| | | * @return |
| | | */ |
| | | List<BigScreenHmkProjectTypeInfo> selectType(); |
| | | List<BigScreenHmkProjectTypeInfo> selectType(@Param("orgName")String orgName,@Param("communityId")Long communityId); |
| | | |
| | | /** |
| | | * 根据活动类型查询数量 |
| | | * @param type |
| | | * @return |
| | | */ |
| | | Integer selectActivity(Integer type); |
| | | Integer selectActivity(@Param("type") Integer type,@Param("communityId")Long communityId); |
| | | |
| | | /** |
| | | * 首页基础数据 |
| | |
| | | */ |
| | | BigScreenHmkBaseInfo selectIndexBaseInfo(); |
| | | |
| | | /** |
| | | * 河门口大屏活动折线 |
| | | * @param date |
| | | * @param year |
| | | * @return |
| | | */ |
| | | BigScreenActivityLine selectActivityCountMonth(@Param("date") String date,@Param("year") String year); |
| | | |
| | | } |
| | |
| | | * @param type |
| | | * @return |
| | | */ |
| | | Integer selectType(@Param("type") Integer type); |
| | | Integer selectType(@Param("type") Integer type,@Param("communityId")Long communityId); |
| | | |
| | | /** |
| | | * 社工技能分布查询 |
| | | * @return |
| | | */ |
| | | List<BigScreenHmkProjectTypeInfo> selectSkillType(); |
| | | List<BigScreenHmkProjectTypeInfo> selectSkillType(Long communityId); |
| | | |
| | | /** |
| | | * 活动社工查询 |
| | | * @param page |
| | | * @param id |
| | | * @return |
| | | */ |
| | | IPage<ComActSocialWorkerVO> selectActivity(Page page,@Param("id") Long 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.property.CommonPage; |
| | | import com.panzhihua.common.model.vos.community.social.ComActSocialWorkerServiceVO; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | import com.panzhihua.service_community.entity.ComActSocialWorkerService; |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | | /** |
| | | * 社工服务表(ComActSocialWorkerService)表数据库访问层 |
| | | * projectName 成都呐喊信息技术有限公司-智慧社区项目 |
| | | * description: 社工服务表相关功能 |
| | | * |
| | | * @author zzj |
| | | * @since 2022-02-16 15:59:41 |
| | | */ |
| | | @Mapper |
| | | public interface ComActSocialWorkerServiceDao extends BaseMapper<ComActSocialWorkerService> { |
| | | /** |
| | | * 根据userId获取服务信息 |
| | | * @param page |
| | | * @param commonPage |
| | | * @return |
| | | */ |
| | | IPage<ComActSocialWorkerServiceVO> pageList(Page page, @Param("commonPage") CommonPage commonPage); |
| | | |
| | | /** |
| | | * 详情 |
| | | * @param id |
| | | * @return |
| | | */ |
| | | ComActSocialWorkerServiceVO getById(Long id); |
| | | } |
| | |
| | | @ApiModelProperty(value = "二级分类id") |
| | | private Long secondColumnId; |
| | | |
| | | @ApiModelProperty(value = "责任方类型 1街道 2社区 3社会组织") |
| | | private Integer responsibilityType; |
| | | |
| | | @ApiModelProperty(value = "责任方id") |
| | | private Long responsibilityId; |
| | | } |
New file |
| | |
| | | package com.panzhihua.service_community.entity; |
| | | |
| | | import java.util.Date; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.AllArgsConstructor; |
| | | import lombok.Builder; |
| | | import lombok.Data; |
| | | import lombok.NoArgsConstructor; |
| | | |
| | | import java.io.Serializable; |
| | | import java.util.Date; |
| | | |
| | | |
| | | /** |
| | | * 社工服务表(ComActSocialWorkerService)表实体类 |
| | | * projectName 成都呐喊信息技术有限公司-智慧社区项目 |
| | | * description: 社工服务表相关功能 |
| | | * |
| | | * @author zzj |
| | | * @since 2022-02-16 15:59:41 |
| | | */ |
| | | @Data |
| | | @Builder |
| | | @AllArgsConstructor |
| | | @NoArgsConstructor |
| | | @ApiModel("社工服务表") |
| | | public class ComActSocialWorkerService implements Serializable { |
| | | |
| | | private static final long serialVersionUID = 984587632214927218L; |
| | | |
| | | @TableId(type = IdType.AUTO) |
| | | private Long id; |
| | | |
| | | /** |
| | | * 社工id |
| | | */ |
| | | @ApiModelProperty(value = "社工id") |
| | | private Long workerId; |
| | | |
| | | /** |
| | | * 发起人id |
| | | */ |
| | | @ApiModelProperty(value = "发起人id") |
| | | private Long senderId; |
| | | |
| | | /** |
| | | * 服务状态 0待执行 1已完成 |
| | | */ |
| | | @ApiModelProperty(value = "服务状态 0待执行 1已完成") |
| | | private Integer status; |
| | | |
| | | /** |
| | | * 内容id |
| | | */ |
| | | @ApiModelProperty(value = "内容id") |
| | | private Long serviceId; |
| | | |
| | | /** |
| | | * 服务类型 1微心愿 2随手拍 |
| | | */ |
| | | @ApiModelProperty(value = "服务类型 1微心愿 2随手拍") |
| | | private Integer serviceType; |
| | | |
| | | /** |
| | | * 创建时间 |
| | | */ |
| | | @ApiModelProperty(value = "创建时间") |
| | | private Date createTime; |
| | | |
| | | /** |
| | | * 汇报内容 |
| | | */ |
| | | @ApiModelProperty(value = "汇报内容") |
| | | private String resultContent; |
| | | |
| | | /** |
| | | * 汇报图片 |
| | | */ |
| | | @ApiModelProperty(value = "汇报图片") |
| | | private String resultUrl; |
| | | |
| | | /** |
| | | * 得分 |
| | | */ |
| | | @ApiModelProperty(value = "得分") |
| | | private Integer score; |
| | | |
| | | } |
| | |
| | | |
| | | import com.panzhihua.common.model.dtos.PageBaseDTO; |
| | | import com.panzhihua.common.model.dtos.community.convenient.PagePopularMerchantDTO; |
| | | import com.panzhihua.common.model.dtos.property.CommonPage; |
| | | import com.panzhihua.common.model.vos.R; |
| | | |
| | | /** |
| | |
| | | * 河门口大屏首页 |
| | | * @return |
| | | */ |
| | | R hmkBaseInfo(); |
| | | R hmkBaseInfo(CommonPage commonPage); |
| | | |
| | | /** |
| | | * 河门口大屏折线图 |
| | | * @return |
| | | */ |
| | | R partyProjectActivityLine(); |
| | | |
| | | /** |
| | | * 活动评分排名 |
| | | * @param commonPage |
| | | * @return |
| | | */ |
| | | R projectActivityProject(CommonPage commonPage); |
| | | |
| | | /** |
| | | * 根据责任方名字查询项目类型饼状图 |
| | | * @param name |
| | | * @return |
| | | */ |
| | | R projectType(String name); |
| | | } |
| | |
| | | */ |
| | | R<ComActSocialWorkerDetailsVO> comActSocialWorkerDetails(Long id); |
| | | |
| | | /** |
| | | * 导出 |
| | | * @param lis |
| | | * @param communityId |
| | | * @return |
| | | */ |
| | | R export(List<ComActSocialWorkerExcelVO> lis, Long communityId); |
| | | |
| | | /** |
| | | * 查询活动社工 |
| | | * @param commonPage |
| | | * @return |
| | | */ |
| | | R activity(CommonPage commonPage); |
| | | |
| | | /** |
| | | * 根据社工查询活动 |
| | | * @param commonPage |
| | | * @return |
| | | */ |
| | | R activityList(CommonPage commonPage); |
| | | } |
New file |
| | |
| | | package com.panzhihua.service_community.service; |
| | | |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.panzhihua.common.model.vos.R; |
| | | import com.panzhihua.common.model.dtos.property.CommonPage; |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.panzhihua.service_community.entity.ComActSocialWorkerService; |
| | | |
| | | /** |
| | | * 社工服务表(ComActSocialWorkerService)表服务接口 |
| | | * projectName 成都呐喊信息技术有限公司-智慧社区项目 |
| | | * description: 社工服务表相关功能 |
| | | * |
| | | * @author zzj |
| | | * @since 2022-02-16 15:59:42 |
| | | */ |
| | | public interface ComActSocialWorkerServiceService extends IService<ComActSocialWorkerService> { |
| | | /** |
| | | * 分页查询 |
| | | * @param commonPage |
| | | * @return |
| | | */ |
| | | R pageList(CommonPage commonPage); |
| | | |
| | | /** |
| | | * 详情 |
| | | * @param id |
| | | * @return |
| | | */ |
| | | R selectById(Long id); |
| | | } |
| | |
| | | |
| | | import javax.annotation.Resource; |
| | | |
| | | import com.panzhihua.common.model.dtos.property.CommonPage; |
| | | import com.panzhihua.common.model.vos.community.bigscreen.*; |
| | | import com.panzhihua.common.utlis.DateUtils; |
| | | import com.panzhihua.service_community.dao.*; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | |
| | | |
| | | @Resource |
| | | private ComActSocialWorkerDao comActSocialWorkerDao; |
| | | |
| | | @Resource |
| | | private ComActActivityDAO comActActivityDAO; |
| | | |
| | | /** |
| | | * 大数据分析平台-居民自治 |
| | |
| | | } |
| | | |
| | | @Override |
| | | public R hmkBaseInfo() { |
| | | public R hmkBaseInfo(CommonPage commonPage) { |
| | | BigScreenHmkBaseInfo bigScreenHmkBaseInfo=comActSocialProjectDao.selectIndexBaseInfo(); |
| | | //项目数据 |
| | | BigScreenHmkProjectInfo bigScreenHmkProjectInfo=comActSocialProjectDao.selectBaseInfo(); |
| | | List<BigScreenHmkProjectTypeInfo> typeInfo=comActSocialProjectDao.selectType(); |
| | | BigScreenHmkProjectInfo bigScreenHmkProjectInfo=comActSocialProjectDao.selectBaseInfo(commonPage.getCommunityId()); |
| | | List<BigScreenHmkProjectTypeInfo> typeInfo=comActSocialProjectDao.selectType(null,commonPage.getCommunityId()); |
| | | if(bigScreenHmkProjectInfo.getCount()>0){ |
| | | typeInfo.forEach(bigScreenHmkProjectTypeInfo -> { |
| | | bigScreenHmkProjectTypeInfo.setPercent(bigScreenHmkProjectTypeInfo.getCount()/bigScreenHmkProjectInfo.getCount()); |
| | |
| | | } |
| | | bigScreenHmkProjectInfo.setTypeInfoList(typeInfo); |
| | | //活动数据 |
| | | Integer countAll=comActSocialProjectDao.selectActivity(0); |
| | | Integer countAll=comActSocialProjectDao.selectActivity(0,commonPage.getCommunityId()); |
| | | BigScreenHmkProjectTypeInfo jm=new BigScreenHmkProjectTypeInfo(); |
| | | jm.setName("居民活动"); |
| | | jm.setCount(comActSocialProjectDao.selectActivity(2)); |
| | | jm.setCount(comActSocialProjectDao.selectActivity(2,commonPage.getCommunityId())); |
| | | if(countAll>0){ |
| | | jm.setPercent(jm.getCount()/countAll); |
| | | } |
| | | BigScreenHmkProjectTypeInfo zyz=new BigScreenHmkProjectTypeInfo(); |
| | | zyz.setName("志愿者活动"); |
| | | zyz.setCount(comActSocialProjectDao.selectActivity(1)); |
| | | zyz.setCount(comActSocialProjectDao.selectActivity(1,commonPage.getCommunityId())); |
| | | if(countAll>0){ |
| | | zyz.setPercent(zyz.getCount()/countAll); |
| | | } |
| | |
| | | activityList.add(zyz); |
| | | bigScreenHmkProjectInfo.setActivityTypeInfoList(activityList); |
| | | //社会组织数据 |
| | | BigScreenHmkSocialOrgInfo bigScreenHmkSocialOrgInfo=comActSocialOrgDao.selectInfo(); |
| | | List<BigScreenHmkProjectTypeInfo> typeInfoList= comActSocialOrgDao.selectType(); |
| | | BigScreenHmkSocialOrgInfo bigScreenHmkSocialOrgInfo=comActSocialOrgDao.selectInfo(commonPage.getCommunityId()); |
| | | List<BigScreenHmkProjectTypeInfo> typeInfoList= comActSocialOrgDao.selectType(commonPage.getCommunityId()); |
| | | if(bigScreenHmkSocialOrgInfo.getCount()>0){ |
| | | typeInfoList.forEach(bigScreenHmkProjectTypeInfo -> { |
| | | bigScreenHmkProjectTypeInfo.setPercent(bigScreenHmkProjectTypeInfo.getCount()/bigScreenHmkSocialOrgInfo.getCount()); |
| | |
| | | //社工数据 |
| | | BigScreenHmkSocialWorkerInfo bigScreenHmkSocialWorkerInfo=new BigScreenHmkSocialWorkerInfo(); |
| | | List<BigScreenHmkProjectTypeInfo> socialWorkerList=new ArrayList<>(); |
| | | Integer socialAll=comActSocialWorkerDao.selectType(0); |
| | | Integer socialAll=comActSocialWorkerDao.selectType(0,commonPage.getCommunityId()); |
| | | BigScreenHmkProjectTypeInfo ss=new BigScreenHmkProjectTypeInfo(); |
| | | ss.setName("30岁以下"); |
| | | ss.setCount(comActSocialWorkerDao.selectType(1)); |
| | | ss.setCount(comActSocialWorkerDao.selectType(1,commonPage.getCommunityId())); |
| | | if(socialAll>0){ |
| | | ss.setPercent(ss.getCount()/socialAll); |
| | | } |
| | | BigScreenHmkProjectTypeInfo wj=new BigScreenHmkProjectTypeInfo(); |
| | | wj.setName("30-59岁"); |
| | | wj.setCount(comActSocialWorkerDao.selectType(2)); |
| | | wj.setCount(comActSocialWorkerDao.selectType(2,commonPage.getCommunityId())); |
| | | if(socialAll>0){ |
| | | wj.setPercent(wj.getCount()/socialAll); |
| | | } |
| | | BigScreenHmkProjectTypeInfo ls=new BigScreenHmkProjectTypeInfo(); |
| | | ls.setName("60岁以上"); |
| | | ls.setCount(comActSocialWorkerDao.selectType(2)); |
| | | ls.setCount(comActSocialWorkerDao.selectType(3,commonPage.getCommunityId())); |
| | | if(socialAll>0){ |
| | | ls.setPercent(ls.getCount()/socialAll); |
| | | } |
| | |
| | | socialWorkerList.add(wj); |
| | | socialWorkerList.add(ls); |
| | | bigScreenHmkSocialWorkerInfo.setSocialWorkerAge(socialWorkerList); |
| | | List<BigScreenHmkProjectTypeInfo> socialWorkerSkill=comActSocialWorkerDao.selectSkillType(); |
| | | List<BigScreenHmkProjectTypeInfo> socialWorkerSkill=comActSocialWorkerDao.selectSkillType(commonPage.getCommunityId()); |
| | | if(socialAll>0){ |
| | | socialWorkerSkill.forEach(bigScreenHmkProjectTypeInfo -> { |
| | | bigScreenHmkProjectTypeInfo.setPercent(bigScreenHmkProjectTypeInfo.getCount()/socialAll); |
| | |
| | | } |
| | | bigScreenHmkSocialWorkerInfo.setSocialWorkerSkill(socialWorkerSkill); |
| | | bigScreenHmkBaseInfo.setBigScreenHmkSocialWorkerInfo(bigScreenHmkSocialWorkerInfo); |
| | | |
| | | bigScreenHmkBaseInfo.setBigScreenHmkProjectInfo(bigScreenHmkProjectInfo); |
| | | return R.ok(bigScreenHmkBaseInfo); |
| | | } |
| | | |
| | | @Override |
| | | public R partyProjectActivityLine() { |
| | | List<BigScreenActivityLine> bigScreenActivityLines=this.getPastMonth(); |
| | | bigScreenActivityLines.forEach(bigScreenActivityLine -> { |
| | | BigScreenActivityLine bigScreenActivityLine1=comActSocialProjectDao.selectActivityCountMonth(bigScreenActivityLine.getX(),bigScreenActivityLine.getYear()); |
| | | bigScreenActivityLine.setY(bigScreenActivityLine1.getY()); |
| | | bigScreenActivityLine.setCountY(bigScreenActivityLine1.getCountY()); |
| | | bigScreenActivityLine.setX(bigScreenActivityLine.getYear().substring(2,4)+"-"+bigScreenActivityLine.getX()); |
| | | }); |
| | | |
| | | return R.ok(bigScreenActivityLines); |
| | | } |
| | | |
| | | @Override |
| | | public R projectActivityProject(CommonPage commonPage) { |
| | | return R.ok(comActActivityDAO.selectProjectActivity(new Page(commonPage.getPage(),commonPage.getSize()))); |
| | | } |
| | | |
| | | @Override |
| | | public R projectType(String name) { |
| | | return R.ok(comActSocialProjectDao.selectType(name,null)); |
| | | } |
| | | |
| | | private Page retrievePage(PageBaseDTO pageBaseDTO) { |
| | |
| | | } |
| | | return page; |
| | | } |
| | | public List<BigScreenActivityLine> getPastMonth(){ |
| | | List<BigScreenActivityLine> bigScreenActivityLines=new ArrayList<>(); |
| | | for(int i=11;i>=0;i--){ |
| | | BigScreenActivityLine bigScreenActivityLine=new BigScreenActivityLine(); |
| | | String date=DateUtils.getDateFormatString(DateUtils.addMonth(new Date(),-i),"MM"); |
| | | String year=DateUtils.getDateFormatString(DateUtils.addMonth(new Date(),-i),"yyyy"); |
| | | bigScreenActivityLine.setX(date); |
| | | bigScreenActivityLine.setYear(year); |
| | | bigScreenActivityLines.add(bigScreenActivityLine); |
| | | } |
| | | return bigScreenActivityLines; |
| | | } |
| | | } |
| | |
| | | import com.panzhihua.common.model.vos.civil.ComActSocialWorkerDetailsVO; |
| | | import com.panzhihua.common.model.vos.civil.ComActSocialWorkerVO; |
| | | import com.panzhihua.common.utlis.StringUtils; |
| | | import com.panzhihua.service_community.dao.ComActDAO; |
| | | import com.panzhihua.service_community.dao.ComActSocialOrgDao; |
| | | import com.panzhihua.service_community.dao.ComStreetDAO; |
| | | import com.panzhihua.service_community.dao.*; |
| | | import com.panzhihua.service_community.entity.ComActSocialOrg; |
| | | import com.panzhihua.service_community.entity.ComActSocialWorker; |
| | | import com.panzhihua.service_community.dao.ComActSocialWorkerDao; |
| | | import com.panzhihua.service_community.model.dos.ComActDO; |
| | | import com.panzhihua.service_community.model.dos.ComStreetDO; |
| | | import com.panzhihua.service_community.service.ComActSocialWorkerService; |
| | |
| | | private ComActSocialOrgDao comActSocialOrgMapper; |
| | | @Resource |
| | | private ComActDAO comActDAO; |
| | | @Resource |
| | | private ComActActivityDAO comActActivityDAO; |
| | | /** |
| | | * 新增社工 |
| | | * @param comActSocialWorkerAddDTO |
| | |
| | | |
| | | return R.ok(); |
| | | } |
| | | |
| | | @Override |
| | | public R activity(CommonPage commonPage) { |
| | | return R.ok(comActSocialWorkerMapper.selectActivity(new Page(commonPage.getPage(),commonPage.getSize()),commonPage.getParamId())); |
| | | } |
| | | |
| | | @Override |
| | | public R activityList(CommonPage commonPage) { |
| | | return R.ok(comActActivityDAO.selectActivityBySocialWorker(new Page(commonPage.getPage(),commonPage.getSize()),commonPage.getParamId())); |
| | | } |
| | | } |
New file |
| | |
| | | package com.panzhihua.service_community.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.panzhihua.common.model.dtos.property.CommonPage; |
| | | import com.panzhihua.common.model.vos.R; |
| | | import com.panzhihua.service_community.dao.ComActSocialWorkerDao; |
| | | import com.panzhihua.service_community.entity.ComActSocialWorkerService; |
| | | import com.panzhihua.service_community.dao.ComActSocialWorkerServiceDao; |
| | | import com.panzhihua.service_community.service.ComActSocialWorkerServiceService; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import javax.annotation.Resource; |
| | | |
| | | /** |
| | | * 社工服务表(ComActSocialWorkerService)表服务实现类 |
| | | * projectName 成都呐喊信息技术有限公司-智慧社区项目 |
| | | * description: 社工服务表相关功能 |
| | | * |
| | | * @author zzj |
| | | * @since 2022-02-16 15:59:42 |
| | | */ |
| | | @Slf4j |
| | | @Service |
| | | public class ComActSocialWorkerServiceServiceImpl extends ServiceImpl<ComActSocialWorkerServiceDao, ComActSocialWorkerService> implements ComActSocialWorkerServiceService { |
| | | |
| | | @Resource |
| | | private ComActSocialWorkerServiceDao comActSocialWorkerServiceDao; |
| | | @Override |
| | | public R pageList(CommonPage commonPage) { |
| | | return R.ok(comActSocialWorkerServiceDao.pageList(new Page<>(commonPage.getPage(),commonPage.getSize()),commonPage)); |
| | | } |
| | | |
| | | @Override |
| | | public R selectById(Long id) { |
| | | return R.ok(comActSocialWorkerServiceDao.getById(id)); |
| | | } |
| | | } |
| | |
| | | SELECT a.id, a.activity_name, u.`name` sponsorName, a.activity_addr, a.participant_max, a.contact_name, |
| | | COUNT(if(s.is_volunteer=1,NULL,s.id))participant_now, a.volunteer_max, |
| | | COUNT(if(s.is_volunteer=1,s.id,NULL))volunteer_now, a.`status`, a.publish_at, a.is_qr_code, |
| | | a.begin_at, a.end_at, a.sign_up_begin, a.sign_up_end, a.reward_way, a.activity_type, a.have_integral_reward |
| | | a.begin_at, a.end_at, a.sign_up_begin, a.sign_up_end, a.reward_way, a.activity_type, a.have_integral_reward , a.cover <if test='comActActivityVO.type != null and comActActivityVO.type == 4'>,so.socialCount</if> |
| | | FROM com_act_activity a |
| | | LEFT JOIN sys_user u ON a.sponsor_id=u.user_id |
| | | LEFT JOIN (SELECT * FROM com_act_act_sign WHERE `status` = 1) s ON a.id=s.activity_id |
| | | <if test='comActActivityVO.type != null and comActActivityVO.type == 4'> |
| | | left join (select count(t.id) as socialCount,activity_id from com_act_act_regist t LEFT JOIN sys_user t1 on t.user_id = t1.user_id LEFT JOIN com_act_social_worker t2 on t1.phone = t2.telephone where t2.id is not null GROUP BY t.activity_id) so on a.id = so.activity_id |
| | | </if> |
| | | WHERE a.`status` = 1 AND a.community_id=#{comActActivityVO.communityId} |
| | | <if test='comActActivityVO.type != null and comActActivityVO.type == 1'> |
| | | AND a.volunteer_max != 0 |
| | | </if> |
| | | <if test='comActActivityVO.type != null and comActActivityVO.type == 2'> |
| | | AND a.volunteer_max = 0 |
| | | </if> |
| | | <if test='comActActivityVO.type != null and comActActivityVO.type == 4'> |
| | | AND a.is_project = 1 |
| | | </if> |
| | | <if test='comActActivityVO.rewardWay != null and comActActivityVO.rewardWay != 0'> |
| | | AND a.reward_way = #{comActActivityVO.rewardWay} |
| | |
| | | SELECT a.id, a.activity_name, u.`name` sponsorName, a.activity_addr, a.participant_max, a.contact_name, |
| | | COUNT(if(s.is_volunteer=1,NULL,s.id))participant_now, a.volunteer_max, |
| | | COUNT(if(s.is_volunteer=1,s.id,NULL))volunteer_now, a.`status`, a.publish_at, |
| | | a.is_qr_code, a.begin_at, a.end_at, a.sign_up_begin, a.sign_up_end, a.reward_way, a.activity_type, a.have_integral_reward |
| | | a.is_qr_code, a.begin_at, a.end_at, a.sign_up_begin, a.sign_up_end, a.reward_way, a.activity_type, a.have_integral_reward ,a.cover<if test='comActActivityVO.type != null and comActActivityVO.type == 4'>,so.socialCount</if> |
| | | FROM com_act_activity a |
| | | LEFT JOIN sys_user u ON a.sponsor_id=u.user_id |
| | | LEFT JOIN (SELECT * FROM com_act_act_sign WHERE `status` = 1) s ON a.id=s.activity_id |
| | | <if test='comActActivityVO.type != null and comActActivityVO.type == 4'> |
| | | left join (select count(t.id) as socialCount,activity_id from com_act_act_regist t LEFT JOIN sys_user t1 on t.user_id = t1.user_id LEFT JOIN com_act_social_worker t2 on t1.phone = t2.telephone where t2.id is not null GROUP BY t.activity_id) so on a.id = so.activity_id |
| | | </if> |
| | | WHERE a.`status` != 1 AND a.community_id=#{comActActivityVO.communityId} |
| | | <if test='comActActivityVO.type != null and comActActivityVO.type == 1'> |
| | | AND a.volunteer_max != 0 |
| | | </if> |
| | | <if test='comActActivityVO.type != null and comActActivityVO.type == 2'> |
| | | AND a.volunteer_max = 0 |
| | | </if> |
| | | <if test='comActActivityVO.type != null and comActActivityVO.type == 4'> |
| | | AND a.is_project = 1 |
| | | </if> |
| | | <if test='comActActivityVO.rewardWay != null and comActActivityVO.rewardWay != 0'> |
| | | AND a.reward_way = #{comActActivityVO.rewardWay} |
| | |
| | | </select> |
| | | <select id="inforActivity" resultType="com.panzhihua.common.model.vos.community.ComActActivityVO"> |
| | | SELECT u.name sponsorName, ca.name communityName, |
| | | count(if(s.is_volunteer=1,s.id,null))volunteer_now, count(if(s.is_volunteer=0,s.id,null))participant_now, a.* |
| | | count(if(s.is_volunteer=1,s.id,null))volunteer_now, count(if(s.is_volunteer=0,s.id,null))participant_now, a.*,t1.name as projectName |
| | | FROM com_act_activity a |
| | | left join sys_user u on a.sponsor_id=u.user_id |
| | | left join (select * from com_act_act_sign where `status` = 1) s on a.id=s.activity_id |
| | | left join com_act ca on a.community_id=ca.community_id where a.id = #{id} group by a.id |
| | | left join com_act ca on a.community_id=ca.community_id left join com_act_social_project t1 on a.project_id = t1.id where a.id = #{id} group by a.id |
| | | |
| | | </select> |
| | | <select id="listActivityType" resultType="com.panzhihua.common.model.vos.community.ComActActivityTypeVO"> |
| | | SELECT * FROM com_act_activity_type WHERE `type` = #{type} AND community_id = #{communityId} ORDER BY id ASC |
| | | </select> |
| | | |
| | | <select id="selectProjectActivity" resultType="com.panzhihua.common.model.vos.community.ComActActivityVO"> |
| | | SELECT a.id, a.activity_name, u.`name` sponsorName, a.activity_addr, a.participant_max, a.contact_name, |
| | | COUNT(if(s.is_volunteer=1,NULL,s.id))participant_now, a.volunteer_max, |
| | | COUNT(if(s.is_volunteer=1,s.id,NULL))volunteer_now, a.`status`, a.publish_at, a.is_qr_code, |
| | | a.begin_at, a.end_at, a.sign_up_begin, a.sign_up_end, a.reward_way, a.activity_type, a.have_integral_reward , a.cover , t1.evaluateLevel |
| | | FROM com_act_activity a |
| | | LEFT JOIN sys_user u ON a.sponsor_id=u.user_id |
| | | LEFT JOIN (SELECT * FROM com_act_act_sign WHERE `status` = 1) s ON a.id=s.activity_id |
| | | LEFT JOIN (select AVG(star_level) as evaluateLevel,activity_id from com_act_act_evaluate GROUP BY activity_id) t1 on a.id = t1.activity_id |
| | | WHERE is_project=1 order by t1.evaluateLevel desc |
| | | </select> |
| | | |
| | | <select id="selectActivityBySocialWorker" resultType="com.panzhihua.common.model.vos.community.ComActActivityVO"> |
| | | select t.* from com_act_activity t left join com_act_act_regist t1 on t.id=t1.activity_id where t1.user_id = |
| | | (select t1.user_id from com_act_social_worker t LEFT JOIN sys_user t1 on t.telephone = t1.phone where t.id = #{id}) |
| | | </select> |
| | | </mapper> |
| | |
| | | <if test="commonPage.paramId!=null"> |
| | | and t.community_id =#{commonPage.paramId} |
| | | </if> |
| | | <if test="commonPage.communityId!=null"> |
| | | and t.community_id =#{commonPage.communityId} |
| | | </if> |
| | | <if test="commonPage.streetId!=null"> |
| | | and t.street_id =#{commonPage.streetId} |
| | | </if> |
| | |
| | | </select> |
| | | |
| | | <select id="selectInfo" resultType="com.panzhihua.common.model.vos.community.bigscreen.BigScreenHmkSocialOrgInfo"> |
| | | select (select count(*) from com_act_social_org where street_id = 15) count |
| | | select (select count(*) from com_act_social_org where street_id = 15 <if test="communityId!=null"> and community_id = #{communityId}</if>) count |
| | | </select> |
| | | <select id="selectType" resultType="com.panzhihua.common.model.vos.community.bigscreen.BigScreenHmkProjectTypeInfo"> |
| | | select count(*) count,t1.name from com_act_social_org t INNER JOIN com_act_column t1 on t.service_type = t1.id where t.street_id = 15 GROUP BY t1.id |
| | | select count(*) count,t1.name from com_act_social_org t INNER JOIN com_act_column t1 on t.service_type = t1.id where t.street_id = 15 <if test="communityId!=null"> and t.community_id = #{communityId}</if> GROUP BY t1.id |
| | | </select> |
| | | |
| | | </mapper> |
| | |
| | | </select> |
| | | |
| | | <select id="selectBaseInfo" resultType="com.panzhihua.common.model.vos.community.bigscreen.BigScreenHmkProjectInfo"> |
| | | select (select count(*) from com_act_social_project where street_id =15 ) count, |
| | | (select count(*) from com_act_social_project where street_id =15 and status >=2) assigned, |
| | | (select count(*) from com_act_social_project where street_id =15 and 1 >=status) assign |
| | | select (select count(*) from com_act_social_project where street_id =15 <if test="communityId!=null"> and community_id = #{communityId}</if>) count, |
| | | (select count(*) from com_act_social_project where street_id =15 and status >=2 <if test="communityId!=null"> and community_id = #{communityId}</if>) assigned, |
| | | (select count(*) from com_act_social_project where street_id =15 and 1 >=status <if test="communityId!=null"> and community_id = #{communityId}</if>) assign |
| | | </select> |
| | | |
| | | <select id="selectType" resultType="com.panzhihua.common.model.vos.community.bigscreen.BigScreenHmkProjectTypeInfo"> |
| | | select count(id) as count,type as name from com_act_social_project where street_id = 15 GROUP BY type |
| | | select count(id) as count,type as name from com_act_social_project where street_id = 15 |
| | | <if test="orgName !=null and orgName!=''"> |
| | | and responsibility=#{orgName} |
| | | </if> |
| | | <if test="communityId !=null"> |
| | | and community_id=#{communityId} |
| | | </if> |
| | | GROUP BY type |
| | | </select> |
| | | |
| | | <select id="selectActivity" resultType="integer"> |
| | |
| | | <if test="type =2"> |
| | | and volunteer_max = 0 |
| | | </if> |
| | | <if test="communityId !=null"> |
| | | and community_id = #{communityId} |
| | | </if> |
| | | </where> |
| | | </select> |
| | | |
| | |
| | | (select count(*) from com_act_activity where is_project = 1) activityCount, |
| | | (select count(*) from com_act_social_worker where street_id = 15) socialWorkerCount, |
| | | (select count(*) from com_mng_population where street_id = 15) userCount, |
| | | (select count(*) from com_act_social_org where street_id = 15) socialOrgCount |
| | | (select count(*) from com_act_social_org where street_id = 15) socialOrgCount, |
| | | (select count(*) from com_act_social_worker_service) serviceCount |
| | | </select> |
| | | |
| | | <select id="selectActivityCountMonth" resultType="com.panzhihua.common.model.vos.community.bigscreen.BigScreenActivityLine"> |
| | | select ( select count(id) from com_act_activity where status!=6 and is_project = 1 and publish_at >= DATE_FORMAT( CONCAT(#{year},'-',#{date},'-00'), '%Y-%m-00 00:00:00') and DATE_FORMAT( LAST_DAY(CONCAT(#{year},'-',#{date},'-00')), '%Y-%m-%d 23:59:59') >=publish_at) y, |
| | | (select count(id) from com_act_activity where status!=6 and is_project = 1 and DATE_FORMAT( LAST_DAY(CONCAT(#{year},'-',#{date},'-00')), '%Y-%m-%d 23:59:59') >=publish_at) countY |
| | | </select> |
| | | </mapper> |
| | |
| | | <if test="type ==3"> |
| | | and age >=60 |
| | | </if> |
| | | <if test="communityId !=null"> |
| | | and community_id=#{communityId} |
| | | </if> |
| | | </select> |
| | | |
| | | <select id="selectSkillType" resultType="com.panzhihua.common.model.vos.community.bigscreen.BigScreenHmkProjectTypeInfo"> |
| | | select count(*) count,t1.name from com_act_social_worker t INNER JOIN com_act_column t1 on t.skill_type = t1.id where t.street_id = 15 GROUP BY t1.id |
| | | select count(*) count,t1.name from com_act_social_worker t INNER JOIN com_act_column t1 on t.skill_type = t1.id where t.street_id = 15 <if test="communityId!=null"> and t.community_id = #{communityId}</if> GROUP BY t1.id |
| | | </select> |
| | | |
| | | <select id="selectActivity" resultType="com.panzhihua.common.model.vos.civil.ComActSocialWorkerVO"> |
| | | select t.* from com_act_social_worker t LEFT JOIN sys_user t1 on t.telephone = t1.phone where t1.user_id in (select distinct user_id from com_act_act_regist where activity_id =#{id} ) |
| | | </select> |
| | | </mapper> |
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.ComActSocialWorkerServiceDao"> |
| | | |
| | | <resultMap type="com.panzhihua.service_community.entity.ComActSocialWorkerService" |
| | | id="ComActSocialWorkerServiceBaseResultMap"> |
| | | <result property="id" column="id"/> |
| | | <result property="workerId" column="worker_id"/> |
| | | <result property="senderId" column="sender_id"/> |
| | | <result property="status" column="status"/> |
| | | <result property="serviceId" column="service_id"/> |
| | | <result property="serviceType" column="service_type"/> |
| | | <result property="createTime" column="create_time"/> |
| | | <result property="resultContent" column="result_content"/> |
| | | <result property="resultUrl" column="result_url"/> |
| | | <result property="score" column="score"/> |
| | | </resultMap> |
| | | |
| | | <select id="pageList" resultType="com.panzhihua.common.model.vos.community.social.ComActSocialWorkerServiceVO"> |
| | | select t.*,t1.name as senderName from com_act_social_worker_service t |
| | | left join sys_user t1 on t.sender_id = t1.user_id |
| | | left join com_act_social_worker t2 on t.worker_id = t2.id |
| | | LEFT JOIN sys_user t3 on t2.telephone = t3.phone |
| | | where 1=1 |
| | | <if test="commonPage.userId!=null"> |
| | | and t3.user_id = #{commonPage.userId} |
| | | </if> |
| | | <if test="commonPage.status!=null"> |
| | | and t.status = #{commonPage.status} |
| | | </if> |
| | | order by t.create_time desc |
| | | </select> |
| | | |
| | | <select id="getById" resultType="com.panzhihua.common.model.vos.community.social.ComActSocialWorkerServiceVO"> |
| | | select t.*,t1.name as senderName from com_act_social_worker_service t left join sys_user t1 on t.sender_id = t1.user_id where t.id = #{id} |
| | | </select> |
| | | |
| | | </mapper> |
| | |
| | | + "and d.dyn_type = #{partyBuildingComPbDynVO.dynType} \n" + " </if> " |
| | | + "<if test='partyBuildingComPbDynVO.policyType != null and partyBuildingComPbDynVO.policyType != 0'>" |
| | | + "and d.policy_type = #{partyBuildingComPbDynVO.policyType} \n" + " </if> " |
| | | + "<if test='partyBuildingComPbDynVO.policyType == 0'>" |
| | | + "and d.policy_type is not null \n" + " </if> " |
| | | + "<if test='partyBuildingComPbDynVO.title != null and partyBuildingComPbDynVO.title.trim() != ""'>" |
| | | + "and d.title like concat(#{partyBuildingComPbDynVO.title},'%') \n" + " </if> " |
| | | + "<if test='partyBuildingComPbDynVO.status != null and partyBuildingComPbDynVO.status != 0'>" |
| | |
| | | + "<if test='partyBuildingComPbDynVO.publishAtBegin != null '>" |
| | | + "AND d.publish_at BETWEEN #{partyBuildingComPbDynVO.publishAtBegin} \n" |
| | | + "AND #{partyBuildingComPbDynVO.publishAtEnd} \n" + " </if> " + "GROUP BY\n" + "d.id\n" |
| | | + "ORDER BY d.publish_at desc" + "</script>") |
| | | + "ORDER BY d.publish_at <if test='partyBuildingComPbDynVO.sort !=null and partyBuildingComPbDynVO.sort !=""'> asc </if> <if test='partyBuildingComPbDynVO.sort ==null'> desc</if>" + "</script>") |
| | | IPage<PartyBuildingComPbDynVO> pageYnamic(Page page, |
| | | @Param("partyBuildingComPbDynVO") PartyBuildingComPbDynVO partyBuildingComPbDynVO); |
| | | |
| | |
| | | * @return |
| | | */ |
| | | int countSocialWorker(@Param("phone") String phone, @Param("communityId") Long communityId); |
| | | |
| | | /** |
| | | * 查看是否社会组织 |
| | | * @param userId |
| | | * @return |
| | | */ |
| | | int countSocialOrg(Long userId); |
| | | |
| | | } |
| | |
| | | loginUserInfoVO.setIsPropertyWorker(countPropertyWorker > 0 ? 1 : 0); |
| | | loginUserInfoVO.setIdCard(SensitiveUtil.desensitizedIdNumber(loginUserInfoVO.getIdCard())); |
| | | loginUserInfoVO.setPhone(SensitiveUtil.desensitizedPhoneNumber(loginUserInfoVO.getPhone())); |
| | | //判断账号类型 |
| | | int countSocialOrg=userDao.countSocialOrg(userId); |
| | | if(countSocialOrg>0){ |
| | | loginUserInfoVO.setUserType(3); |
| | | } |
| | | else { |
| | | if(loginUserInfoVO.getStreetId()!=null){ |
| | | loginUserInfoVO.setUserType(1); |
| | | } |
| | | else { |
| | | loginUserInfoVO.setUserType(2); |
| | | } |
| | | } |
| | | return R.ok(loginUserInfoVO); |
| | | } |
| | | |
| | |
| | | select count(id) from com_act_social_worker where telephone = #{phone} and community_id = #{communityId} |
| | | </select> |
| | | |
| | | <select id="countSocialOrg" resultType="Integer"> |
| | | select count(id) from com_act_social_org where user_id = #{userId} |
| | | </select> |
| | | |
| | | </mapper> |