Merge branch 'huacheng' into huacheng_paicha
# Conflicts:
# springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/service/community/CommunityService.java
# springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComActAcidRecordServiceImpl.java
# springcloud_k8s_panzhihuazhihuishequ/zuul/src/main/java/com/panzhihua/zuul/config/SwaggerConfig.java
New file |
| | |
| | | package com.panzhihua.applets.api; |
| | | |
| | | |
| | | import com.panzhihua.common.controller.BaseController; |
| | | import com.panzhihua.common.model.vos.R; |
| | | import com.panzhihua.common.model.vos.community.acid.ComAreaCounty; |
| | | import com.panzhihua.common.service.community.CommunityService; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.springframework.web.bind.annotation.GetMapping; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | |
| | | import javax.annotation.Resource; |
| | | |
| | | /** |
| | | * (ComAreaTownCommunity)表控制层 |
| | | * projectName 成都呐喊信息技术有限公司-智慧社区项目 |
| | | * description: 相关功能 |
| | | * |
| | | * @author zzj |
| | | * @since 2022-04-10 17:37:33 |
| | | */ |
| | | @Api(tags = {"区县联动列表"}) |
| | | @RestController |
| | | @RequestMapping("comAreaTownCommunity") |
| | | public class ComAreaTownCommunityApi extends BaseController { |
| | | |
| | | @Resource |
| | | private CommunityService communityService; |
| | | @ApiOperation(value = "列表查询",response = ComAreaCounty.class) |
| | | @GetMapping("/areaTownCommunity") |
| | | public R test(){ |
| | | return communityService.areaTownCommunity("panzhihua"); |
| | | } |
| | | } |
New file |
| | |
| | | package com.panzhihua.applets.api; |
| | | |
| | | import javax.annotation.Resource; |
| | | |
| | | import io.swagger.annotations.ApiImplicitParam; |
| | | import org.springframework.web.bind.annotation.GetMapping; |
| | | import org.springframework.web.bind.annotation.PostMapping; |
| | | import org.springframework.web.bind.annotation.RequestBody; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RequestParam; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | |
| | | 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.ComPropertyVO; |
| | | import com.panzhihua.common.service.community.CommunityService; |
| | | |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | |
| | | /** |
| | | * @author zzj |
| | | */ |
| | | @Slf4j |
| | | @Api(tags = {"物业公司"}) |
| | | @RestController |
| | | @RequestMapping("/comProperty") |
| | | public class ComPropertyApi extends BaseController { |
| | | @Resource |
| | | private CommunityService communityService; |
| | | |
| | | /** |
| | | * 分页查询所有数据 |
| | | * |
| | | * @param commonPage 查询实体 |
| | | * @return 所有数据 |
| | | */ |
| | | @ApiOperation(value = "物业公司列表",response = ComPropertyVO.class) |
| | | @PostMapping("queryAll") |
| | | public R selectAll(@RequestBody CommonPage commonPage) { |
| | | commonPage.setParamId(this.getCommunityId()); |
| | | return this.communityService.comPropertySelectAll(commonPage); |
| | | } |
| | | |
| | | @ApiOperation(value = "物业公司详情", response = ComPropertyVO.class) |
| | | @ApiImplicitParam(name = "id", value = "物业公司id", required = true) |
| | | @GetMapping("detail") |
| | | public R detailProperty(@RequestParam("id") Long id) { |
| | | return this.communityService.detailProperty(id); |
| | | } |
| | | } |
New file |
| | |
| | | package com.panzhihua.applets.api; |
| | | |
| | | import javax.annotation.Resource; |
| | | import javax.validation.Valid; |
| | | |
| | | import org.springframework.web.bind.annotation.GetMapping; |
| | | import org.springframework.web.bind.annotation.PostMapping; |
| | | import org.springframework.web.bind.annotation.RequestBody; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RequestParam; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | |
| | | import com.panzhihua.common.controller.BaseController; |
| | | import com.panzhihua.common.model.dtos.property.PagePropertyWorkerDTO; |
| | | import com.panzhihua.common.model.vos.R; |
| | | import com.panzhihua.common.model.vos.property.ComPropertyWorkerVO; |
| | | import com.panzhihua.common.service.community.CommunityService; |
| | | |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiImplicitParam; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | |
| | | /** |
| | | * 物业公司工作人员(ComPropertyWorker)表控制层 |
| | | * |
| | | * @author makejava |
| | | * @since 2022-04-26 09:54:07 |
| | | */ |
| | | @Slf4j |
| | | @Api(tags = "物业工作人员") |
| | | @RestController |
| | | @RequestMapping("comPropertyWorker") |
| | | public class ComPropertyWorkerApi extends BaseController { |
| | | /** |
| | | * 服务对象 |
| | | */ |
| | | @Resource |
| | | private CommunityService communityService; |
| | | |
| | | @ApiOperation(value = "分页查询物业工作人员", response = ComPropertyWorkerVO.class) |
| | | @PostMapping("/page") |
| | | public R pagePropertyWorker(@RequestBody @Valid PagePropertyWorkerDTO pagePropertyWorkerDTO) { |
| | | return communityService.pagePropertyWorker(pagePropertyWorkerDTO); |
| | | } |
| | | |
| | | @ApiOperation(value = "物业工作人员详情", response = ComPropertyWorkerVO.class) |
| | | @ApiImplicitParam(name = "id", value = "物业工作人员id", required = true) |
| | | @GetMapping("/detail") |
| | | public R detailPropertyWorker(@RequestParam("id") Long id) { |
| | | return communityService.detailPropertyWorker(id); |
| | | } |
| | | } |
| | |
| | | public R pageNeighborByApp(@RequestBody ComActNeighborCircleAppDTO neighborCircleAppDTO) { |
| | | LoginUserInfoVO loginUserInfo = this.getLoginUserInfoSureNoLogin(); |
| | | if (loginUserInfo != null) { |
| | | neighborCircleAppDTO.setCommunityId(loginUserInfo.getCommunityId()); |
| | | if(loginUserInfo.getIsPartymember()==1){ |
| | | neighborCircleAppDTO.setCommunityId(0L); |
| | | } |
| | | else { |
| | | neighborCircleAppDTO.setCommunityId(loginUserInfo.getCommunityId()); |
| | | } |
| | | neighborCircleAppDTO.setUserId(loginUserInfo.getUserId()); |
| | | } |
| | | return communityService.pageNeighborByApp(neighborCircleAppDTO); |
| | |
| | | |
| | | @ApiOperation(value = "查询社区邻里圈话题列表", response = ComActNeighborCircleTopicAppVO.class) |
| | | @GetMapping("topic/list") |
| | | public R getNeighborTopicByApp(@RequestParam("communityId") Long communityId |
| | | ,@RequestParam(value = "isZero",defaultValue = "2",required = false) Integer isZero |
| | | ,@RequestParam(value = "belongType",defaultValue = "1",required = false) Integer belongType |
| | | ,@RequestParam(value = "name",defaultValue = "",required = false) String name) { |
| | | LoginUserInfoVO loginUserInfo = this.getLoginUserInfoSureNoLogin(); |
| | | if (loginUserInfo != null) { |
| | | communityId = loginUserInfo.getCommunityId(); |
| | | } |
| | | if(isZero == null){ |
| | | isZero = 2; |
| | | } |
| | | return communityService.getNeighborTopicByApp(communityId,isZero,name,belongType); |
| | | } |
| | | |
| | | @ApiOperation(value = "用户新增邻里圈话题") |
| | | @PostMapping("topic/add") |
| | | public R addNeighborTopicByApp(@RequestBody AddNeighborCircleTopicAppDTO circleTopicAppDTO) { |
| | | LoginUserInfoVO loginUserInfo = this.getLoginUserInfoSureNoLogin(); |
| | | if(loginUserInfo == null){ |
| | | return R.fail(401,"请先登录"); |
| | | } |
| | | circleTopicAppDTO.setUserId(loginUserInfo.getUserId()); |
| | | circleTopicAppDTO.setCommunityId(loginUserInfo.getCommunityId()); |
| | | return communityService.addNeighborTopicByApp(circleTopicAppDTO); |
| | | public R getNeighborTopicByApp( |
| | | @RequestParam(value = "name",defaultValue = "",required = false) String name) { |
| | | return communityService.getNeighborTopicByApp(name); |
| | | } |
| | | |
| | | @ApiOperation(value = "用户删除邻里圈") |
New file |
| | |
| | | package com.panzhihua.applets_backstage.api; |
| | | |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | |
| | | import javax.annotation.Resource; |
| | | |
| | | import com.panzhihua.common.model.vos.community.ComActDynVO; |
| | | import io.swagger.annotations.ApiImplicitParam; |
| | | import org.springframework.util.ObjectUtils; |
| | | import org.springframework.validation.annotation.Validated; |
| | | import org.springframework.web.bind.annotation.DeleteMapping; |
| | | import org.springframework.web.bind.annotation.GetMapping; |
| | | import org.springframework.web.bind.annotation.PostMapping; |
| | | import org.springframework.web.bind.annotation.PutMapping; |
| | | import org.springframework.web.bind.annotation.RequestBody; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RequestParam; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | |
| | | import com.panzhihua.common.controller.BaseController; |
| | | import com.panzhihua.common.model.dtos.community.AddComActDynTypeDTO; |
| | | import com.panzhihua.common.model.dtos.community.EditComActDynTypeDTO; |
| | | import com.panzhihua.common.model.dtos.community.PageComActDynTypeDTO; |
| | | import com.panzhihua.common.model.vos.LoginUserInfoVO; |
| | | import com.panzhihua.common.model.vos.R; |
| | | import com.panzhihua.common.model.vos.community.ComActDynTypeVO; |
| | | import com.panzhihua.common.service.community.CommunityService; |
| | | |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | |
| | | @Slf4j |
| | | @Api(tags = {"花城资讯模块"}) |
| | | @RestController |
| | | @RequestMapping("/dyn") |
| | | public class ActDynTypeApi extends BaseController { |
| | | |
| | | @Resource |
| | | private CommunityService communityService; |
| | | |
| | | @ApiOperation(value = "分页查询花城资讯分类列表", response = ComActDynTypeVO.class) |
| | | @PostMapping("/type/page") |
| | | public R page(@RequestBody PageComActDynTypeDTO comActDynTypeDTO) { |
| | | comActDynTypeDTO.setCommunityId(0L); |
| | | return communityService.pageDynTypeByAdmin(comActDynTypeDTO); |
| | | } |
| | | |
| | | @ApiOperation(value = "查询花城资讯分类列表", response = ComActDynTypeVO.class) |
| | | @PostMapping("/type/list") |
| | | public R list(@RequestBody PageComActDynTypeDTO comActDynTypeDTO) { |
| | | comActDynTypeDTO.setCommunityId(0L); |
| | | return communityService.getDynTypeListByAdmin(comActDynTypeDTO); |
| | | } |
| | | |
| | | @ApiOperation(value = "新增花城资讯分类") |
| | | @PostMapping("/type/add") |
| | | public R add(@Validated @RequestBody AddComActDynTypeDTO comActDynTypeDTO) { |
| | | LoginUserInfoVO loginUserInfo = this.getLoginUserInfo(); |
| | | comActDynTypeDTO.setCommunityId(0L); |
| | | comActDynTypeDTO.setUserId(loginUserInfo.getUserId()); |
| | | return communityService.addDynTypeByAdmin(comActDynTypeDTO); |
| | | } |
| | | |
| | | @ApiOperation(value = "编辑花城资讯分类") |
| | | @PostMapping("/type/edit") |
| | | public R add(@Validated @RequestBody EditComActDynTypeDTO comActDynTypeDTO) { |
| | | LoginUserInfoVO loginUserInfo = this.getLoginUserInfo(); |
| | | comActDynTypeDTO.setUserId(loginUserInfo.getUserId()); |
| | | return communityService.editDynTypeByAdmin(comActDynTypeDTO); |
| | | } |
| | | |
| | | @ApiOperation(value = "删除花城资讯分类") |
| | | @PostMapping("/type/delete") |
| | | public R delete(@RequestBody List<Long> ids) { |
| | | if (ids == null || ids.size() <= 0) { |
| | | return R.fail("参数错误"); |
| | | } |
| | | return communityService.deleteDynTypeByAdmin(ids); |
| | | } |
| | | |
| | | @ApiOperation(value = "分页查询花城资讯", response = ComActDynVO.class) |
| | | @PostMapping("/pagedynamic") |
| | | public R pageDynamic(@RequestBody ComActDynVO comActDynVO) { |
| | | comActDynVO.setCommunityId(0L); |
| | | return communityService.pageDynamicByAdmin(comActDynVO); |
| | | } |
| | | |
| | | @ApiOperation(value = "花城资讯详情", response = ComActDynVO.class) |
| | | @GetMapping("/detaildynamic") |
| | | @ApiImplicitParam(name = "id", value = "花城资讯主键", required = true) |
| | | public R detailDynamic(@RequestParam("id") Long id) { |
| | | return communityService.detailDynamic(id); |
| | | } |
| | | |
| | | @ApiOperation(value = "删除花城资讯") |
| | | @DeleteMapping("/dynamic") |
| | | public R deleteDynamic(@RequestBody ComActDynVO comActDynVO) { |
| | | Long id = comActDynVO.getId(); |
| | | if (ObjectUtils.isEmpty(id)) { |
| | | return R.fail("花城资讯主键不能为空"); |
| | | } |
| | | return communityService.deleteDynamic(comActDynVO); |
| | | } |
| | | |
| | | @ApiOperation(value = "编辑花城资讯、取消置顶、设置置顶") |
| | | @PutMapping("/dynamic") |
| | | public R putDynamic(@RequestBody ComActDynVO comActDynVO) { |
| | | Long id = comActDynVO.getId(); |
| | | if (ObjectUtils.isEmpty(id)) { |
| | | return R.fail("花城资讯主键不能为空"); |
| | | } |
| | | comActDynVO.setCommunityId(0L); |
| | | return communityService.putDynamic(comActDynVO); |
| | | } |
| | | |
| | | @ApiOperation(value = "新增花城资讯") |
| | | @PostMapping("/dynamic") |
| | | public R addDynamic(@RequestBody ComActDynVO comActDynVO) { |
| | | comActDynVO.setCommunityId(0L); |
| | | Date publishAt = comActDynVO.getPublishAt(); |
| | | if (null == publishAt) { |
| | | publishAt = new Date(); |
| | | comActDynVO.setPublishAt(publishAt); |
| | | } |
| | | long time = publishAt.getTime(); |
| | | long l = System.currentTimeMillis(); |
| | | if (l >= time) { |
| | | comActDynVO.setStatus(1); |
| | | } |
| | | return communityService.addDynamic(comActDynVO); |
| | | } |
| | | |
| | | } |
New file |
| | |
| | | package com.panzhihua.applets_backstage.api; |
| | | |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.panzhihua.common.constants.NeighborCircleConstants; |
| | | import com.panzhihua.common.controller.BaseController; |
| | | import com.panzhihua.common.model.dtos.neighbor.*; |
| | | import com.panzhihua.common.model.vos.LoginUserInfoVO; |
| | | import com.panzhihua.common.model.vos.R; |
| | | import com.panzhihua.common.model.vos.neighbor.*; |
| | | import com.panzhihua.common.model.vos.user.SysUserNoticeVO; |
| | | import com.panzhihua.common.service.community.CommunityService; |
| | | import com.panzhihua.common.service.user.UserService; |
| | | 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; |
| | | |
| | | import static java.util.Objects.isNull; |
| | | |
| | | /** |
| | | * @auther llming |
| | | * @describe |
| | | */ |
| | | @Slf4j |
| | | @RestController |
| | | @RequestMapping("/neighbor/") |
| | | @Api(tags = {"邻里圈服务"}) |
| | | public class NeighborApi extends BaseController { |
| | | @Resource |
| | | private CommunityService communityService; |
| | | @Resource |
| | | private UserService userService; |
| | | |
| | | @ApiOperation(value = "分页查询邻里圈话题列表", response = ComActNeighborCircleTopicAdminVO.class) |
| | | @PostMapping("pageNeighborTopicByAdmin") |
| | | public R pageNeighborTopicByAdmin(@RequestBody ComActNeighborCircleTopicAdminDTO circleTopicAdminDTO) { |
| | | return communityService.pageNeighborTopicByAdmin(circleTopicAdminDTO); |
| | | } |
| | | |
| | | @ApiOperation(value = "添加邻里圈话题") |
| | | @PostMapping("addNeighborTopicByAdmin") |
| | | public R addNeighborTopicByAdmin(@RequestBody AddNeighborCircleTopicAdminDTO addCircleTopicAdminDTO) { |
| | | addCircleTopicAdminDTO.setUserId(this.getUserId()); |
| | | return communityService.addNeighborTopicByAdmin(addCircleTopicAdminDTO); |
| | | } |
| | | |
| | | @ApiOperation(value = "编辑邻里圈话题") |
| | | @PostMapping("editNeighborTopicByAdmin") |
| | | public R editNeighborTopicByAdmin(@RequestBody AddNeighborCircleTopicAdminDTO addCircleTopicAdminDTO) { |
| | | if (addCircleTopicAdminDTO.getId() == null) { |
| | | return R.fail("参数错误"); |
| | | } |
| | | return communityService.editNeighborTopicByAdmin(addCircleTopicAdminDTO); |
| | | } |
| | | /** |
| | | * 删除话题 |
| | | * @param id |
| | | * @return |
| | | */ |
| | | @ApiOperation(value = "删除话题") |
| | | @GetMapping("deleteNeighborTopic") |
| | | public R deleteNeighborTopic(@RequestParam("id") Long id){ |
| | | return communityService.deleteNeighborTopic(id); |
| | | } |
| | | |
| | | } |
| | |
| | | } |
| | | } |
| | | vo.setIdCard(oneData.get(2).toUpperCase()); |
| | | if (StringUtils.isEmpty(oneData.get(3))) { |
| | | index++; |
| | | mistakes.add(setErrorObject(oneData,"志愿者组织不可为空,请填写志愿者组织")); |
| | | continue; |
| | | if (StringUtils.isNotEmpty(oneData.get(3))) { |
| | | vo.setOrgName(oneData.get(3)); |
| | | } |
| | | vo.setOrgName(oneData.get(3)); |
| | | |
| | | if (StringUtils.isEmpty(oneData.get(4))) { |
| | | index++; |
| | | mistakes.add(setErrorObject(oneData,"志愿者队伍不可为空,请填写志愿者队伍")); |
| | | continue; |
| | | if (StringUtils.isNotEmpty(oneData.get(4))) { |
| | | vo.setTeamName(oneData.get(4)); |
| | | } |
| | | vo.setTeamName(oneData.get(4)); |
| | | if (StringUtils.isEmpty(oneData.get(5))) { |
| | | index++; |
| | | mistakes.add(setErrorObject(oneData,"志愿者技能不可为空,请填写志愿者技能")); |
| | | continue; |
| | | if (StringUtils.isNotEmpty(oneData.get(5))) { |
| | | vo.setSkillName(oneData.get(5)); |
| | | } |
| | | vo.setSkillName(oneData.get(5)); |
| | | vo.setIsUniversity(2); |
| | | if (StringUtils.isNotEmpty(oneData.get(6))) { |
| | | vo.setIsUniversity(1); |
| | |
| | | } |
| | | vo.setPhone(oneData.get(3)); |
| | | } |
| | | if(StringUtils.isNotEmpty(oneData.get(4))){ |
| | | vo.setOrgName(oneData.get(4)); |
| | | } |
| | | voList.add(vo); |
| | | index++; |
| | | } |
| | |
| | | @ApiModelProperty(value = "操作人员id", hidden = true) |
| | | private Long userId; |
| | | |
| | | @ApiModelProperty("类型(1.社区动态 2.党务公开 3.花城资讯)") |
| | | private Integer category; |
| | | |
| | | } |
| | |
| | | @ApiModelProperty(value = "社区id") |
| | | private Long communityId; |
| | | |
| | | @ApiModelProperty("类型(1.社区动态 2.党务公开 3.花城资讯)") |
| | | private Integer category; |
| | | |
| | | } |
| | |
| | | @ApiModelProperty(value = "微信审核结果(1.通过 2.拒绝)",hidden = true) |
| | | private Integer wxExamineResult; |
| | | |
| | | @ApiModelProperty("用户新增邻里圈话题") |
| | | private String topicName; |
| | | |
| | | @ApiModelProperty("使用类型(1.邻里圈 2.问题清单 3.需求清单)") |
| | | private Integer belongType; |
| | | |
| | |
| | | package com.panzhihua.common.model.dtos.neighbor; |
| | | |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | |
| | | @ApiModelProperty("话题名称") |
| | | private String name; |
| | | |
| | | @ApiModelProperty(value = "社区id", hidden = true) |
| | | private Long communityId; |
| | | |
| | | @ApiModelProperty(value = "登录用户id", hidden = true) |
| | | private Long userId; |
| | | |
| | | @ApiModelProperty(value = "发布状态(1.启用 2.禁用)") |
| | | private Integer status; |
| | | |
| | | @ApiModelProperty("话题id") |
| | | private Long id; |
| | |
| | | @ApiModelProperty("话题logo") |
| | | private String logo; |
| | | |
| | | @ApiModelProperty("排序") |
| | | private Integer sort; |
| | | |
| | | /** |
| | | * 使用类型(1.邻里圈 2.问题清单 3.需求清单) |
| | | */ |
| | |
| | | @ApiModelProperty("话题名称") |
| | | private String name; |
| | | |
| | | @ApiModelProperty(value = "社区id", hidden = true) |
| | | private Long communityId; |
| | | |
| | | @ApiModelProperty(value = "发布状态(1.启用 2.禁用)") |
| | | private Integer status; |
| | | |
| | | @ApiModelProperty("使用类型(1.邻里圈 2.问题清单 3.需求清单)") |
| | | private Integer belongType; |
| | | |
New file |
| | |
| | | package com.panzhihua.common.model.dtos.property; |
| | | |
| | | import javax.validation.constraints.NotNull; |
| | | |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | /** |
| | | * @title: PagePropertyWorkerDTO |
| | | * @projectName: 成都呐喊信息技术有限公司-智慧社区项目 |
| | | * @description: 分页查询物业工作人员请求参数 |
| | | * @author: hans |
| | | * @date: 2022/04/26 10:21 |
| | | */ |
| | | @Data |
| | | @ApiModel("分页查询物业工作人员请求参数") |
| | | public class PagePropertyWorkerDTO { |
| | | |
| | | @ApiModelProperty(value = "关键字") |
| | | private String keyword; |
| | | |
| | | @ApiModelProperty(value = "物业公司关联id") |
| | | @NotNull |
| | | private Long refId; |
| | | |
| | | @ApiModelProperty(value = "分页-当前页数", example = "1") |
| | | @NotNull |
| | | private Long pageNum; |
| | | |
| | | @ApiModelProperty(value = "分页-每页记录数", example = "10") |
| | | @NotNull |
| | | private Long pageSize; |
| | | } |
New file |
| | |
| | | package com.panzhihua.common.model.dtos.property; |
| | | |
| | | import javax.validation.constraints.NotBlank; |
| | | import javax.validation.constraints.NotNull; |
| | | |
| | | import com.panzhihua.common.validated.AddGroup; |
| | | import com.panzhihua.common.validated.PutGroup; |
| | | |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | /** |
| | | * @title: PropertyWorkerDTO |
| | | * @projectName: 成都呐喊信息技术有限公司-智慧社区项目 |
| | | * @description: 新增/编辑物业工作人员请求参数类 |
| | | * @author: hans |
| | | * @date: 2022/04/26 10:06 |
| | | */ |
| | | @Data |
| | | @ApiModel("新增/编辑物业工作人员请求参数类") |
| | | public class PropertyWorkerDTO { |
| | | |
| | | @ApiModelProperty("物业工作人员id") |
| | | @NotNull(groups = {PutGroup.class}, message = "物业工作人员id不能为空") |
| | | private Long id; |
| | | |
| | | @ApiModelProperty("工作人员姓名") |
| | | @NotBlank(groups = {AddGroup.class}, message = "工作人员姓名不能为空") |
| | | private String name; |
| | | |
| | | @ApiModelProperty("手机号") |
| | | @NotBlank(groups = {AddGroup.class}, message = "手机号不能为空") |
| | | private String phone; |
| | | |
| | | @ApiModelProperty("职务") |
| | | @NotBlank(groups = {AddGroup.class}, message = "职务不能为空") |
| | | private String position; |
| | | |
| | | @ApiModelProperty("照片") |
| | | private String image; |
| | | |
| | | @ApiModelProperty("物业公司关联id") |
| | | @NotNull(groups = {AddGroup.class}, message = "物业公司关联id不能为空") |
| | | private Long refId; |
| | | } |
| | |
| | | private Integer partyTime; |
| | | @ExcelProperty(value = "参与活动获得积分",index = 7) |
| | | private Integer partyInterval; |
| | | |
| | | private String checkUnitName; |
| | | |
| | | private String specialtyName; |
| | | } |
| | |
| | | private Integer jumpType; |
| | | |
| | | private String areaCode; |
| | | |
| | | @ApiModelProperty("类型(1.社区动态 2.党务公开 3.花城资讯)") |
| | | private Integer category; |
| | | } |
| | |
| | | @ApiModelProperty("小区id") |
| | | @JsonSerialize(using = ToStringSerializer.class) |
| | | private Long areaId; |
| | | |
| | | @ApiModelProperty("评价星级(1~5)") |
| | | private Integer star; |
| | | |
| | | @ApiModelProperty("红色物业(1.是 2.否)") |
| | | private Integer isRed; |
| | | |
| | | @ApiModelProperty("logo") |
| | | private String logo; |
| | | } |
| | |
| | | |
| | | import com.alibaba.excel.annotation.ExcelProperty; |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | import java.net.URL; |
| | | import java.util.Date; |
| | | |
| | | /** |
| | |
| | | */ |
| | | @ExcelProperty(value = "48小时内核酸检测") |
| | | private String acidTest; |
| | | |
| | | @ExcelProperty("健康码截图") |
| | | private URL colorImage; |
| | | |
| | | @ExcelProperty("行程码截图") |
| | | private URL travelImage; |
| | | |
| | | @ExcelProperty("48小时核酸截图") |
| | | private URL acidImage; |
| | | |
| | | @ExcelProperty("疫苗接种截图") |
| | | private URL vaccinationImage; |
| | | } |
| | |
| | | @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8") |
| | | private Date createTime; |
| | | |
| | | @ApiModelProperty("健康码截图") |
| | | private String colorImage; |
| | | |
| | | @ApiModelProperty("行程码截图") |
| | | private String travelImage; |
| | | |
| | | @ApiModelProperty("48小时核酸截图") |
| | | private String acidImage; |
| | | |
| | | @ApiModelProperty("疫苗接种截图") |
| | | private String vaccinationImage; |
| | | |
| | | |
| | | public interface type{ |
| | | int zj=1; |
| | |
| | | @Data |
| | | public class ComAreaCounty { |
| | | private String value; |
| | | private Long communityId; |
| | | private List<ComAreaCounty> children; |
| | | } |
| | |
| | | @ApiModelProperty("id") |
| | | private Long id; |
| | | |
| | | @ApiModelProperty("社区id") |
| | | private Long communityId; |
| | | |
| | | @ApiModelProperty("话题名字") |
| | | private String name; |
| | | |
| | |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") |
| | | private Date createAt; |
| | | |
| | | @ApiModelProperty("随手拍条数") |
| | | private Integer count; |
| | | @ApiModelProperty("排序") |
| | | private Integer sort; |
| | | } |
| | |
| | | @Data |
| | | public class ComPbMemberExcelVO { |
| | | |
| | | @ExcelProperty(value = "账号", index = 0) |
| | | @ExcelProperty(value = "联系电话", index = 1) |
| | | private String phone; |
| | | |
| | | @ExcelProperty(value = "党员姓名", index = 1) |
| | | @ExcelProperty(value = "党员姓名", index = 0) |
| | | private String name; |
| | | |
| | | @ExcelProperty(value = "所属党组织", index = 2) |
| | | @ExcelProperty(value = "所属党组织", index = 4) |
| | | private String orgName; |
| | | |
| | | @ExcelProperty(value = "入党日期", index = 3) |
| | | @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8") |
| | | private Date joinTime; |
| | | @ExcelProperty(value = "技能特长", index = 2) |
| | | private String specialtyName; |
| | | |
| | | @ExcelProperty(value = "转正日期", index = 4) |
| | | @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8") |
| | | private Date employmentTime; |
| | | |
| | | @ExcelProperty(value = "报道单位", index = 5) |
| | | @ExcelProperty(value = "报道单位", index = 3) |
| | | private String checkUnitName; |
| | | |
| | | @ExcelProperty(value = "党龄", index = 6) |
| | | private Integer partyAge; |
| | | |
| | | @ExcelProperty(value = "状态",index = 7) |
| | | private String status; |
| | | } |
| | |
| | | @ApiModelProperty("党组织") |
| | | private String orgName; |
| | | |
| | | @ApiModelProperty("时长") |
| | | private Long duration; |
| | | |
| | | @ApiModelProperty("积分") |
| | | private Long partyInterval; |
| | | |
| | | } |
| | |
| | | |
| | | import java.io.Serializable; |
| | | |
| | | import com.alibaba.excel.annotation.ExcelIgnore; |
| | | import com.alibaba.excel.annotation.ExcelProperty; |
| | | |
| | | import lombok.Data; |
| | |
| | | @ExcelProperty(value = "党员姓名", index = 0) |
| | | private String name; |
| | | /** |
| | | * 身份证号 |
| | | */ |
| | | @ExcelProperty(value = "身份证号", index = 1) |
| | | private String idCard; |
| | | /** |
| | | * 所属党组织 |
| | | */ |
| | | @ExcelProperty(value = "所属党组织", index = 2) |
| | | private String orgName; |
| | | /** |
| | | * 入党日期 |
| | | */ |
| | | @ExcelProperty(value = "入党日期", index = 3) |
| | | private String joinTime; |
| | | /** |
| | | * 转正日期 |
| | | */ |
| | | @ExcelProperty(value = "转正日期", index = 4) |
| | | private String employmentTime; |
| | | /** |
| | | * 所属社区 |
| | | */ |
| | | @ExcelProperty(value = "所属社区", index = 5) |
| | | private String communityName; |
| | | |
| | | @ExcelProperty(value = "手机号",index = 6) |
| | | @ExcelProperty(value = "联系电话",index = 1) |
| | | private String phone; |
| | | |
| | | @ExcelIgnore |
| | | private Long communityId; |
| | | } |
| | |
| | | |
| | | @ExcelProperty(value = "负责人联系电话", index = 3) |
| | | private String phone; |
| | | |
| | | @ExcelProperty(value = "党组织名称",index = 4) |
| | | private String orgName; |
| | | } |
New file |
| | |
| | | package com.panzhihua.common.model.vos.property; |
| | | |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | /** |
| | | * @title: ComPropertyWorkerVO |
| | | * @projectName: 成都呐喊信息技术有限公司-智慧社区项目 |
| | | * @description: 物业工作人员信息 |
| | | * @author: hans |
| | | * @date: 2022/04/26 10:35 |
| | | */ |
| | | @Data |
| | | @ApiModel("物业工作人员信息") |
| | | public class ComPropertyWorkerVO { |
| | | |
| | | @ApiModelProperty(value = "物业工作人员id") |
| | | private Long id; |
| | | |
| | | @ApiModelProperty(value = "工作人员姓名") |
| | | private String name; |
| | | |
| | | @ApiModelProperty(value = "手机号") |
| | | private String phone; |
| | | |
| | | @ApiModelProperty(value = "职务") |
| | | private String position; |
| | | |
| | | @ApiModelProperty(value = "照片") |
| | | private String image; |
| | | |
| | | @ApiModelProperty(value = "物业公司关联id") |
| | | private Long refId; |
| | | } |
| | |
| | | import com.panzhihua.common.model.dtos.community.elder.PagePensionAuthStatisticDTO; |
| | | import com.panzhihua.common.model.dtos.community.elder.SignElderAuthStatisticDTO; |
| | | import com.panzhihua.common.model.dtos.neighbor.*; |
| | | import com.panzhihua.common.model.dtos.property.PagePropertyWorkerDTO; |
| | | import com.panzhihua.common.model.dtos.property.PropertyWorkerDTO; |
| | | import com.panzhihua.common.model.vos.*; |
| | | import com.panzhihua.common.model.vos.civil.ComActSocialWorkerDetailsVO; |
| | | import com.panzhihua.common.model.vos.civil.ComActSocialWorkerVO; |
| | |
| | | /** |
| | | * 小程序查询邻里圈话题列表 |
| | | * |
| | | * @param communityId |
| | | * 社区id |
| | | * @return 邻里圈话题列表 |
| | | */ |
| | | @GetMapping("/neighbor/getNeighborTopicByApp") |
| | | R getNeighborTopicByApp(@RequestParam("communityId") Long communityId,@RequestParam("isZero") Integer isZero,@RequestParam("name") String name,@RequestParam("belongType") Integer belongType); |
| | | R getNeighborTopicByApp(@RequestParam("name") String name); |
| | | |
| | | /** |
| | | * 删除话题 |
| | | * @param id |
| | | * @return |
| | | */ |
| | | @GetMapping("/neighbor/deleteNeighborTopic") |
| | | R deleteNeighborTopic(@RequestParam("id") Long id); |
| | | |
| | | /** |
| | | * 综治后台-查询社区列表 |
| | |
| | | @GetMapping("/comAreaTownCommunity/areaTownCommunity") |
| | | R areaTownCommunity(@RequestParam("name")String name); |
| | | |
| | | /** |
| | | * 物业公司详情 |
| | | * @param id |
| | | * @return |
| | | */ |
| | | @GetMapping("/comProperty/detail") |
| | | R detailProperty(@RequestParam("id") Long id); |
| | | |
| | | /** |
| | | * 添加物业工作人员 |
| | | * @param propertyWorkerDTO |
| | | * @return |
| | | */ |
| | | @PostMapping("/comPropertyWorker/add") |
| | | R addPropertyWorker(@RequestBody PropertyWorkerDTO propertyWorkerDTO); |
| | | |
| | | /** |
| | | * 编辑物业工作人员 |
| | | * @param propertyWorkerDTO |
| | | * @return |
| | | */ |
| | | @PutMapping("/comPropertyWorker/update") |
| | | R updatePropertyWorker(@RequestBody PropertyWorkerDTO propertyWorkerDTO); |
| | | |
| | | /** |
| | | * 删除物业工作人员 |
| | | * @param id |
| | | * @return |
| | | */ |
| | | @DeleteMapping("/comPropertyWorker/delete") |
| | | R deletePropertyWorker(@RequestParam("id") Long id); |
| | | |
| | | /** |
| | | * 分页查询物业工作人员 |
| | | * @param pagePropertyWorkerDTO |
| | | * @return |
| | | */ |
| | | @PostMapping("/comPropertyWorker/page") |
| | | R pagePropertyWorker(@RequestBody PagePropertyWorkerDTO pagePropertyWorkerDTO); |
| | | |
| | | /** |
| | | * 物业工作人员详情 |
| | | * @param id |
| | | * @return |
| | | */ |
| | | @GetMapping("/comPropertyWorker/detail") |
| | | R detailPropertyWorker(@RequestParam("id") Long id); |
| | | |
| | | |
| | | /** |
| | | * 分页查询所有数据 |
| | |
| | | R updateUserIsPartymember(@RequestParam("idCard") String idCard); |
| | | |
| | | /** |
| | | * 修改党员状态 |
| | | * @param phone |
| | | * @return |
| | | */ |
| | | @PostMapping("updateuserispartymemberByPhone") |
| | | R updateUserIsPartymemberByPhone(@RequestParam("phone") String phone); |
| | | /** |
| | | * 修改用户的为非党员状态 |
| | | * |
| | | * @param idCard |
| | |
| | | String name = "防疫登记信息导出.xlsx"; |
| | | String ftpUrl = "/mnt/data/web/excel/"; |
| | | // 用户搜索了就下载搜索的用户否则下载所有用户 |
| | | if(StringUtils.isEmpty(comActAcidRecordDTO.getLocalCity())){ |
| | | comActAcidRecordDTO.setLocalCity(this.getLoginUserInfo().getName()); |
| | | } |
| | | R r = communityService.exportComActAcidRecord(comActAcidRecordDTO); |
| | | if (R.isOk(r)) { |
| | | try { |
| | |
| | | @ApiOperation(value = "党员双报到单位-下载模板") |
| | | @GetMapping("/export/elder") |
| | | public R exportElder() { |
| | | return R.ok(sftpConfig.getExcelUrl() + "党员双报到单位导入模板.xlsx"); |
| | | return R.ok(sftpConfig.getExcelUrl() + "党组织导入模板.xlsx"); |
| | | } |
| | | } |
New file |
| | |
| | | package com.panzhihua.community_backstage.api; |
| | | |
| | | import javax.annotation.Resource; |
| | | import javax.validation.Valid; |
| | | |
| | | import com.panzhihua.common.model.vos.property.ComPropertyWorkerVO; |
| | | import io.swagger.annotations.Api; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.validation.annotation.Validated; |
| | | import org.springframework.web.bind.annotation.DeleteMapping; |
| | | import org.springframework.web.bind.annotation.GetMapping; |
| | | import org.springframework.web.bind.annotation.PostMapping; |
| | | import org.springframework.web.bind.annotation.PutMapping; |
| | | import org.springframework.web.bind.annotation.RequestBody; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RequestParam; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | |
| | | import com.panzhihua.common.controller.BaseController; |
| | | import com.panzhihua.common.model.dtos.property.PagePropertyWorkerDTO; |
| | | import com.panzhihua.common.model.dtos.property.PropertyWorkerDTO; |
| | | import com.panzhihua.common.model.vos.R; |
| | | import com.panzhihua.common.service.community.CommunityService; |
| | | import com.panzhihua.common.validated.AddGroup; |
| | | import com.panzhihua.common.validated.PutGroup; |
| | | |
| | | import io.swagger.annotations.ApiImplicitParam; |
| | | import io.swagger.annotations.ApiOperation; |
| | | |
| | | /** |
| | | * 物业公司工作人员(ComPropertyWorker)表控制层 |
| | | * |
| | | * @author makejava |
| | | * @since 2022-04-26 09:54:07 |
| | | */ |
| | | @Slf4j |
| | | @Api(tags = "物业工作人员") |
| | | @RestController |
| | | @RequestMapping("comPropertyWorker") |
| | | public class ComPropertyWorkerApi extends BaseController { |
| | | /** |
| | | * 服务对象 |
| | | */ |
| | | @Resource |
| | | private CommunityService communityService; |
| | | |
| | | |
| | | @ApiOperation(value = "添加物业工作人员") |
| | | @PostMapping("/add") |
| | | public R addPropertyWorker(@RequestBody @Validated(AddGroup.class) PropertyWorkerDTO propertyWorkerDTO) { |
| | | return communityService.addPropertyWorker(propertyWorkerDTO); |
| | | } |
| | | |
| | | @ApiOperation(value = "编辑物业工作人员") |
| | | @PutMapping("/update") |
| | | public R updatePropertyWorker(@RequestBody @Validated(PutGroup.class) PropertyWorkerDTO propertyWorkerDTO) { |
| | | return communityService.updatePropertyWorker(propertyWorkerDTO); |
| | | } |
| | | |
| | | @ApiOperation(value = "删除物业工作人员") |
| | | @ApiImplicitParam(name = "id", value = "物业工作人员id", required = true) |
| | | @DeleteMapping("/delete") |
| | | public R deletePropertyWorker(@RequestParam("id") Long id) { |
| | | return communityService.deletePropertyWorker(id); |
| | | } |
| | | |
| | | @ApiOperation(value = "分页查询物业工作人员", response = ComPropertyWorkerVO.class) |
| | | @PostMapping("/page") |
| | | public R pagePropertyWorker(@RequestBody @Valid PagePropertyWorkerDTO pagePropertyWorkerDTO) { |
| | | return communityService.pagePropertyWorker(pagePropertyWorkerDTO); |
| | | } |
| | | |
| | | @ApiOperation(value = "物业工作人员详情", response = ComPropertyWorkerVO.class) |
| | | @ApiImplicitParam(name = "id", value = "物业工作人员id", required = true) |
| | | @GetMapping("/detail") |
| | | public R detailPropertyWorker(@RequestParam("id") Long id) { |
| | | return communityService.detailPropertyWorker(id); |
| | | } |
| | | } |
| | |
| | | try { |
| | | inputStream = file.getInputStream(); |
| | | EasyExcel.read(inputStream, PartyBuildingMemberExcelVO.class, |
| | | new PartyBuildingMemberExcelListen(partyBuildingService)).sheet().doRead(); |
| | | new PartyBuildingMemberExcelListen(partyBuildingService,this.getCommunityId())).sheet().doRead(); |
| | | } catch (IOException e) { |
| | | e.printStackTrace(); |
| | | log.error("导入模板失败【{}】", e.getMessage()); |
| | |
| | | SysUserNoticeVO sysUserNoticeVO = new SysUserNoticeVO(); |
| | | sysUserNoticeVO.setUserId(Long.parseLong(r.getData().toString())); |
| | | sysUserNoticeVO.setType(3); |
| | | sysUserNoticeVO.setTitle("邻里圈审核通过"); |
| | | sysUserNoticeVO.setTitle("问题清单审核通过"); |
| | | sysUserNoticeVO.setBusinessType(12); |
| | | sysUserNoticeVO.setBusinessTitle(""); |
| | | sysUserNoticeVO.setBusinessContent("您发布的邻里圈已通过审核,可在邻里圈模块查看"); |
| | | sysUserNoticeVO.setBusinessContent("您发布的问题清单已通过审核,可在问题清单模块查看"); |
| | | sysUserNoticeVO.setBusinessId(editNeighborCircleAdminVO.getId()); |
| | | sysUserNoticeVO.setStatus(0); |
| | | sysUserNoticeVO.setBusinessStatus(2); |
| | | R r2 = userService.addNotice(sysUserNoticeVO); |
| | | if (R.isOk(r2)) { |
| | | log.info("邻里圈审核通知成功【{}】", JSONObject.toJSONString(sysUserNoticeVO)); |
| | | log.info("问题清单审核通知成功【{}】", JSONObject.toJSONString(sysUserNoticeVO)); |
| | | } |
| | | } else if (editNeighborCircleAdminVO.getStatus().equals(EditNeighborCircleAdminVO.status.bh)) { |
| | | // 审核驳回添加提示信息 |
| | | SysUserNoticeVO sysUserNoticeVO = new SysUserNoticeVO(); |
| | | sysUserNoticeVO.setUserId(Long.parseLong(r.getData().toString())); |
| | | sysUserNoticeVO.setType(3); |
| | | sysUserNoticeVO.setTitle("邻里圈审核未通过"); |
| | | sysUserNoticeVO.setTitle("问题清单审核未通过"); |
| | | sysUserNoticeVO.setBusinessType(12); |
| | | sysUserNoticeVO.setBusinessContent("驳回原因:" + editNeighborCircleAdminVO.getRefuseReason()); |
| | | sysUserNoticeVO.setBusinessTitle(""); |
| | |
| | | sysUserNoticeVO.setBusinessStatus(1); |
| | | R r2 = userService.addNotice(sysUserNoticeVO); |
| | | if (R.isOk(r2)) { |
| | | log.info("邻里圈审核通知成功【{}】", JSONObject.toJSONString(sysUserNoticeVO)); |
| | | log.info("问题清单审核通知成功【{}】", JSONObject.toJSONString(sysUserNoticeVO)); |
| | | } |
| | | } |
| | | } |
| | |
| | | return communityService.addNeighborByAdmin(addNeighborCircleAdminVO); |
| | | } |
| | | |
| | | @ApiOperation(value = "分页查询邻里圈话题列表", response = ComActNeighborCircleTopicAdminVO.class) |
| | | @PostMapping("pageNeighborTopicByAdmin") |
| | | public R pageNeighborTopicByAdmin(@RequestBody ComActNeighborCircleTopicAdminDTO circleTopicAdminDTO) { |
| | | if (isNull(circleTopicAdminDTO.getCommunityId())) { |
| | | circleTopicAdminDTO.setCommunityId(this.getCommunityId()); |
| | | } |
| | | return communityService.pageNeighborTopicByAdmin(circleTopicAdminDTO); |
| | | } |
| | | |
| | | @ApiOperation(value = "添加邻里圈话题") |
| | | @PostMapping("addNeighborTopicByAdmin") |
| | | public R addNeighborTopicByAdmin(@RequestBody AddNeighborCircleTopicAdminDTO addCircleTopicAdminDTO) { |
| | | addCircleTopicAdminDTO.setCommunityId(this.getCommunityId()); |
| | | addCircleTopicAdminDTO.setUserId(this.getUserId()); |
| | | return communityService.addNeighborTopicByAdmin(addCircleTopicAdminDTO); |
| | | } |
| | | |
| | | @ApiOperation(value = "编辑邻里圈话题") |
| | | @PostMapping("editNeighborTopicByAdmin") |
| | | public R editNeighborTopicByAdmin(@RequestBody AddNeighborCircleTopicAdminDTO addCircleTopicAdminDTO) { |
| | | if (addCircleTopicAdminDTO.getId() == null) { |
| | | return R.fail("参数错误"); |
| | | } |
| | | addCircleTopicAdminDTO.setCommunityId(this.getCommunityId()); |
| | | return communityService.editNeighborTopicByAdmin(addCircleTopicAdminDTO); |
| | | } |
| | | |
| | | @ApiOperation(value = "获取社区审核状态") |
| | | @GetMapping("getCircleExamineStatus") |
| | | public R getCircleExamineStatus(){ |
| | |
| | | Long communityId = loginUserInfo.getCommunityId(); |
| | | return communityService.editSysConfValue(communityId,status); |
| | | } |
| | | @ApiOperation(value = "分页查询邻里圈话题列表", response = ComActNeighborCircleTopicAdminVO.class) |
| | | @PostMapping("pageNeighborTopicByAdmin") |
| | | public R pageNeighborTopicByAdmin(@RequestBody ComActNeighborCircleTopicAdminDTO circleTopicAdminDTO) { |
| | | return communityService.pageNeighborTopicByAdmin(circleTopicAdminDTO); |
| | | } |
| | | |
| | | } |
| | |
| | | |
| | | private static final int BATCH_COUNT = 5000; |
| | | private PartyBuildingService partyBuildingService; |
| | | private Long communityId; |
| | | private List<PartyBuildingMemberExcelVO> list = new ArrayList<>(); |
| | | |
| | | public PartyBuildingMemberExcelListen(PartyBuildingService partyBuildingService) { |
| | | public PartyBuildingMemberExcelListen(PartyBuildingService partyBuildingService,Long communityId) { |
| | | this.partyBuildingService = partyBuildingService; |
| | | this.communityId=communityId; |
| | | } |
| | | |
| | | @Override |
| | | public void invoke(PartyBuildingMemberExcelVO partyBuildingMemberExcelVO, AnalysisContext analysisContext) { |
| | | Boolean isRepeat = list.stream().anyMatch(v -> v.getIdCard().equals(partyBuildingMemberExcelVO.getIdCard())); |
| | | if (isRepeat) { |
| | | throw new PartyBuildingMemberException("导入失败,存在多个相同身份证号:" + partyBuildingMemberExcelVO.getIdCard()); |
| | | } |
| | | partyBuildingMemberExcelVO.setCommunityId(communityId); |
| | | list.add(partyBuildingMemberExcelVO); |
| | | // 达到BATCH_COUNT了,需要去存储一次数据库,防止数据几万条数据在内存,容易OOM |
| | | if (list.size() >= BATCH_COUNT) { |
| | |
| | | public R delete(@RequestParam("id") Long id) { |
| | | return this.comPropertyService.delete(id); |
| | | } |
| | | |
| | | /** |
| | | * 物业公司详情 |
| | | * @param id |
| | | * @return |
| | | */ |
| | | @GetMapping("/detail") |
| | | public R detailProperty(@RequestParam("id") Long id) { |
| | | return comPropertyService.detailProperty(id); |
| | | } |
| | | } |
New file |
| | |
| | | package com.panzhihua.service_community.api; |
| | | |
| | | import javax.annotation.Resource; |
| | | |
| | | import org.springframework.web.bind.annotation.DeleteMapping; |
| | | import org.springframework.web.bind.annotation.GetMapping; |
| | | import org.springframework.web.bind.annotation.PostMapping; |
| | | import org.springframework.web.bind.annotation.PutMapping; |
| | | import org.springframework.web.bind.annotation.RequestBody; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RequestParam; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | |
| | | import com.panzhihua.common.model.dtos.property.PagePropertyWorkerDTO; |
| | | import com.panzhihua.common.model.dtos.property.PropertyWorkerDTO; |
| | | import com.panzhihua.common.model.vos.R; |
| | | import com.panzhihua.service_community.service.ComPropertyWorkerService; |
| | | |
| | | /** |
| | | * 物业公司工作人员(ComPropertyWorker)表控制层 |
| | | * |
| | | * @author makejava |
| | | * @since 2022-04-26 09:54:07 |
| | | */ |
| | | @RestController |
| | | @RequestMapping("comPropertyWorker") |
| | | public class ComPropertyWorkerApi { |
| | | /** |
| | | * 服务对象 |
| | | */ |
| | | @Resource |
| | | private ComPropertyWorkerService comPropertyWorkerService; |
| | | |
| | | /** |
| | | * 添加物业工作人员 |
| | | * @param propertyWorkerDTO |
| | | * @return |
| | | */ |
| | | @PostMapping("/add") |
| | | public R addPropertyWorker(@RequestBody PropertyWorkerDTO propertyWorkerDTO) { |
| | | return comPropertyWorkerService.addPropertyWorker(propertyWorkerDTO); |
| | | } |
| | | |
| | | /** |
| | | * 编辑物业工作人员 |
| | | * @param propertyWorkerDTO |
| | | * @return |
| | | */ |
| | | @PutMapping("/update") |
| | | public R updatePropertyWorker(@RequestBody PropertyWorkerDTO propertyWorkerDTO) { |
| | | return comPropertyWorkerService.updatePropertyWorker(propertyWorkerDTO); |
| | | } |
| | | |
| | | /** |
| | | * 删除物业工作人员 |
| | | * @param id |
| | | * @return |
| | | */ |
| | | @DeleteMapping("/delete") |
| | | public R deletePropertyWorker(@RequestParam("id") Long id) { |
| | | return comPropertyWorkerService.deletePropertyWorker(id); |
| | | } |
| | | |
| | | /** |
| | | * 分页查询物业工作人员 |
| | | * @param pagePropertyWorkerDTO |
| | | * @return |
| | | */ |
| | | @PostMapping("/page") |
| | | public R pagePropertyWorker(@RequestBody PagePropertyWorkerDTO pagePropertyWorkerDTO) { |
| | | return comPropertyWorkerService.pagePropertyWorker(pagePropertyWorkerDTO); |
| | | } |
| | | |
| | | /** |
| | | * 物业工作人员详情 |
| | | * @param id |
| | | * @return |
| | | */ |
| | | @GetMapping("/detail") |
| | | public R detailPropertyWorker(@RequestParam("id") Long id) { |
| | | return comPropertyWorkerService.detailPropertyWorker(id); |
| | | } |
| | | } |
| | |
| | | /** |
| | | * 小程序查询邻里圈话题列表 |
| | | * |
| | | * @param communityId |
| | | * 社区id |
| | | * @return 邻里圈话题列表 |
| | | */ |
| | | @GetMapping("getNeighborTopicByApp") |
| | | public R getNeighborTopicByApp(@RequestParam("communityId") Long communityId,@RequestParam("isZero") Integer isZero,@RequestParam("name") String name,@RequestParam("belongType") Integer belongType) { |
| | | return comActNeighborCircleTopicService.getNeighborTopicByApp(communityId,isZero,name,belongType); |
| | | public R getNeighborTopicByApp(@RequestParam("name") String name) { |
| | | return comActNeighborCircleTopicService.getNeighborTopicByApp(name); |
| | | } |
| | | |
| | | /** |
| | | * 小程序-用户新增话题 |
| | | * @param circleTopicAppDTO 请求参数 |
| | | * @return 新增结果 |
| | | * 删除话题 |
| | | * @param id |
| | | * @return |
| | | */ |
| | | @PostMapping("addNeighborTopicByApp") |
| | | public R addNeighborTopicByApp(@RequestBody AddNeighborCircleTopicAppDTO circleTopicAppDTO){ |
| | | return comActNeighborCircleTopicService.addNeighborTopicByApp(circleTopicAppDTO); |
| | | @GetMapping("deleteNeighborTopic") |
| | | public R deleteNeighborTopic(@RequestParam("id") Long id){ |
| | | return comActNeighborCircleTopicService.delete(id); |
| | | } |
| | | |
| | | /** |
| | |
| | | + "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 1=1 " + |
| | | |
| | | "<if test='comActActivityVO.choice == 0 '>" + "AND a.community_id = ${comActActivityVO.communityId} " + " </if> " |
| | | "<if test='comActActivityVO.communityId != null and comActActivityVO.communityId!=0'>" + "AND a.community_id = ${comActActivityVO.communityId} " + " </if> " |
| | | + |
| | | "<if test='comActActivityVO.areaCode !=null '>" + "AND ca.area_code = ${comActActivityVO.areaCode} " + " </if> " |
| | | + |
| | |
| | | **/ |
| | | @Mapper |
| | | public interface ComActDynDAO extends BaseMapper<ComActDynDO> { |
| | | @Select("<script> " + "SELECT " + "d.id, " + "d.title, " + "IFNULL(u.readNum,0) readNum, " + "d.`status`, " |
| | | + "d.`content`, " + "d.`cover`, " + "d.`type`, " + "d.`cover_mode`, d.jump_url,d.jump_type, " + "d.is_topping, " + "d.publish_at, " |
| | | + "d.create_at, " + "cadt.`name` as typeName, " + "cadt.color as typeColor, " + "ca.name as communityName " |
| | | + "FROM " + "com_act_dyn d " + "LEFT JOIN ( select dyn_id,count(id) as readNum from com_act_dyn_user GROUP BY dyn_id ) u ON d.id = u.dyn_id " |
| | | + "LEFT JOIN com_act_dyn_type as cadt ON cadt.id = d.type " |
| | | + "LEFT JOIN com_act ca ON d.community_id = ca.community_id " + "WHERE 1=1 " |
| | | + "<if test='comActDynVO.choice == 0 '>" + "and d.community_id = ${comActDynVO.communityId} " + " </if> " |
| | | + "<if test='comActDynVO.areaCode !=null '>" + "and ca.area_code = ${comActDynVO.areaCode} " + " </if> " |
| | | + "<if test='comActDynVO.title != null and comActDynVO.title.trim() != ""'>" |
| | | + "AND d.title like concat(#{comActDynVO.title},'%') " + " </if> " |
| | | + "<if test='comActDynVO.isTopping != null '>" + "AND d.is_topping = #{comActDynVO.isTopping} " + " </if> " |
| | | + "<if test='comActDynVO.status != null '>" + "AND d.`status` = #{comActDynVO.status} " + " </if> " |
| | | + "<if test='comActDynVO.publishAtBegin != null '>" + "AND d.publish_at BETWEEN #{comActDynVO.publishAtBegin} " |
| | | + "AND #{comActDynVO.publishAtEnd}" + " </if> " + " group by d.id " |
| | | + " order by d.is_topping desc, d.create_at desc " + "</script>") |
| | | // @Select("<script> " + "SELECT " + "d.id, " + "d.title, " + "IFNULL(u.readNum,0) readNum, " + "d.`status`, " |
| | | // + "d.`content`, " + "d.`cover`, " + "d.`type`, " + "d.`cover_mode`, d.jump_url,d.jump_type, " + "d.is_topping, " + "d.publish_at, " |
| | | // + "d.create_at, " + "cadt.`name` as typeName, " + "cadt.color as typeColor, " + "ca.name as communityName " |
| | | // + "FROM " + "com_act_dyn d " + "LEFT JOIN ( select dyn_id,count(id) as readNum from com_act_dyn_user GROUP BY dyn_id ) u ON d.id = u.dyn_id " |
| | | // + "LEFT JOIN com_act_dyn_type as cadt ON cadt.id = d.type " |
| | | // + "LEFT JOIN com_act ca ON d.community_id = ca.community_id " + "WHERE 1=1 " |
| | | // + "<if test='comActDynVO.category != null '>" + "and d.category = #{comActDynVO.category} " + " </if> " |
| | | // + "<if test='comActDynVO.choice == 0 '>" + "and d.community_id = ${comActDynVO.communityId} " + " </if> " |
| | | // + "<if test='comActDynVO.areaCode !=null '>" + "and ca.area_code = ${comActDynVO.areaCode} " + " </if> " |
| | | // + "<if test='comActDynVO.title != null and comActDynVO.title.trim() != ""'>" |
| | | // + "AND d.title like concat(#{comActDynVO.title},'%') " + " </if> " |
| | | // + "<if test='comActDynVO.isTopping != null '>" + "AND d.is_topping = #{comActDynVO.isTopping} " + " </if> " |
| | | // + "<if test='comActDynVO.status != null '>" + "AND d.`status` = #{comActDynVO.status} " + " </if> " |
| | | // + "<if test='comActDynVO.publishAtBegin != null '>" + "AND d.publish_at BETWEEN #{comActDynVO.publishAtBegin} " |
| | | // + "AND #{comActDynVO.publishAtEnd}" + " </if> " + " group by d.id " |
| | | // + " order by d.is_topping desc, d.create_at desc " + "</script>") |
| | | IPage<ComActDynVO> pageDynamic(Page page, @Param("comActDynVO") ComActDynVO comActDynVO); |
| | | |
| | | @Update("update com_act_dyn set `status`=1 WHERE `status`=0 and TIMESTAMPDIFF(MINUTE, SYSDATE(), publish_at)<=0 ") |
| | | int timedTaskDynStatus(); |
| | | |
| | | @Select("<script> " + "SELECT " + "d.id, " + "d.title, " + "COUNT(u.id)readNum, " + "d.`status`, " |
| | | + "d.`content`, " + "d.`cover`, " + "d.`type`, " + "d.`cover_mode`, " + "d.is_topping, " + "d.publish_at, " |
| | | + "d.create_at, " + "cadt.`name` as typeName, " + "ca.name as communityName " + "FROM " + "com_act_dyn d " |
| | | + "LEFT JOIN com_act_dyn_user u ON d.id = u.dyn_id " |
| | | + "LEFT JOIN com_act_dyn_type as cadt ON cadt.id = d.type " |
| | | + "LEFT JOIN com_act ca ON d.community_id = ca.community_id " + "WHERE " |
| | | + "d.community_id = ${comActDynVO.communityId} " |
| | | + "<if test='comActDynVO.title != null and comActDynVO.title.trim() != ""'>" |
| | | + "AND d.title like concat(#{comActDynVO.title},'%') " + " </if> " |
| | | + "<if test='comActDynVO.isTopping != null '>" + "AND d.is_topping = #{comActDynVO.isTopping} " + " </if> " |
| | | + "<if test='comActDynVO.status != null '>" + "AND d.`status` = #{comActDynVO.status} " + " </if> " |
| | | + "<if test='comActDynVO.type != null '>" + "AND d.type = #{comActDynVO.type} " + " </if> " |
| | | + "<if test='comActDynVO.publishAtBegin != null '>" + "AND d.publish_at BETWEEN #{comActDynVO.publishAtBegin} " |
| | | + "AND #{comActDynVO.publishAtEnd}" + " </if> " + " group by d.id " |
| | | + " order by d.is_topping desc, d.create_at desc " + "</script>") |
| | | // @Select("<script> " + "SELECT " + "d.id, " + "d.title, " + "COUNT(u.id)readNum, " + "d.`status`, " |
| | | // + "d.`content`, " + "d.`cover`, " + "d.`type`, " + "d.`cover_mode`, " + "d.is_topping, " + "d.publish_at, " |
| | | // + "d.create_at, " + "cadt.`name` as typeName, " + "ca.name as communityName " + "FROM " + "com_act_dyn d " |
| | | // + "LEFT JOIN com_act_dyn_user u ON d.id = u.dyn_id " |
| | | // + "LEFT JOIN com_act_dyn_type as cadt ON cadt.id = d.type " |
| | | // + "LEFT JOIN com_act ca ON d.community_id = ca.community_id " + "WHERE " |
| | | // + "d.community_id = ${comActDynVO.communityId} " |
| | | // + "<if test='comActDynVO.title != null and comActDynVO.title.trim() != ""'>" |
| | | // + "AND d.title like concat(#{comActDynVO.title},'%') " + " </if> " |
| | | // + "<if test='comActDynVO.isTopping != null '>" + "AND d.is_topping = #{comActDynVO.isTopping} " + " </if> " |
| | | // + "<if test='comActDynVO.status != null '>" + "AND d.`status` = #{comActDynVO.status} " + " </if> " |
| | | // + "<if test='comActDynVO.type != null '>" + "AND d.type = #{comActDynVO.type} " + " </if> " |
| | | // + "<if test='comActDynVO.publishAtBegin != null '>" + "AND d.publish_at BETWEEN #{comActDynVO.publishAtBegin} " |
| | | // + "AND #{comActDynVO.publishAtEnd}" + " </if> " + " group by d.id " |
| | | // + " order by d.is_topping desc, d.create_at desc " + "</script>") |
| | | IPage<ComActDynVO> pageDynamicByAdmin(Page page, @Param("comActDynVO") ComActDynVO comActDynVO); |
| | | |
| | | @Select("SELECT " + " count( cad.id ) AS dynTotal, " |
| | |
| | | |
| | | /** |
| | | * 小程序查询邻里圈话题列表 |
| | | * |
| | | * @param communityId |
| | | * 社区id |
| | | * @return 邻里圈话题列表 |
| | | */ |
| | | List<ComActNeighborCircleTopicAppVO> getNeighborTopicByApp(@Param("communityId") Long communityId,@Param("isZero") Integer isZero,@Param("name") String name,@Param("belongType") Integer belongType); |
| | | List<ComActNeighborCircleTopicAppVO> getNeighborTopicByApp(@Param("name") String name); |
| | | |
| | | /** |
| | | * 添加邻里圈话题热度 |
New file |
| | |
| | | package com.panzhihua.service_community.dao; |
| | | |
| | | import java.util.List; |
| | | |
| | | 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.PagePropertyWorkerDTO; |
| | | import com.panzhihua.common.model.vos.property.ComPropertyWorkerVO; |
| | | import org.apache.ibatis.annotations.Param; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | import com.panzhihua.service_community.entity.ComPropertyWorker; |
| | | |
| | | /** |
| | | * 物业公司工作人员(ComPropertyWorker)表数据库访问层 |
| | | * |
| | | * @author makejava |
| | | * @since 2022-04-26 09:39:59 |
| | | */ |
| | | @Mapper |
| | | public interface ComPropertyWorkerDAO extends BaseMapper<ComPropertyWorker> { |
| | | |
| | | /** |
| | | * 批量新增数据(MyBatis原生foreach方法) |
| | | * |
| | | * @param entities |
| | | * List<ComPropertyWorker> 实例对象列表 |
| | | * @return 影响行数 |
| | | */ |
| | | int insertBatch(@Param("entities") List<ComPropertyWorker> entities); |
| | | |
| | | /** |
| | | * 批量新增或按主键更新数据(MyBatis原生foreach方法) |
| | | * |
| | | * @param entities |
| | | * List<ComPropertyWorker> 实例对象列表 |
| | | * @return 影响行数 |
| | | * @throws org.springframework.jdbc.BadSqlGrammarException |
| | | * 入参是空List的时候会抛SQL语句错误的异常,请自行校验入参 |
| | | */ |
| | | int insertOrUpdateBatch(@Param("entities") List<ComPropertyWorker> entities); |
| | | |
| | | /** |
| | | * 分页查询物业工作人员 |
| | | * @param page |
| | | * @param pagePropertyWorkerDTO |
| | | * @return |
| | | */ |
| | | IPage<ComPropertyWorkerVO> pagePropertyWorker(@Param("page") Page page, @Param("pagePropertyWorkerDTO") PagePropertyWorkerDTO pagePropertyWorkerDTO); |
| | | } |
| | |
| | | |
| | | @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8") |
| | | private Date createTime; |
| | | |
| | | @ApiModelProperty("健康码截图") |
| | | private String colorImage; |
| | | |
| | | @ApiModelProperty("行程码截图") |
| | | private String travelImage; |
| | | |
| | | @ApiModelProperty("48小时核酸截图") |
| | | private String acidImage; |
| | | |
| | | @ApiModelProperty("疫苗接种截图") |
| | | private String vaccinationImage; |
| | | } |
| | |
| | | |
| | | private String password; |
| | | |
| | | /** |
| | | * 评价星级(1~5) |
| | | */ |
| | | private Integer star; |
| | | |
| | | /** |
| | | * 红色物业(1.是 2.否) |
| | | */ |
| | | private Integer isRed; |
| | | |
| | | /** |
| | | * logo |
| | | */ |
| | | private String logo; |
| | | |
| | | } |
New file |
| | |
| | | package com.panzhihua.service_community.entity; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import lombok.Data; |
| | | |
| | | import java.io.Serializable; |
| | | import java.util.Date; |
| | | |
| | | /** |
| | | * 物业公司工作人员(ComPropertyWorker)表实体类 |
| | | * |
| | | * @author makejava |
| | | * @since 2022-04-26 09:39:59 |
| | | */ |
| | | @Data |
| | | @TableName(value = "com_property_worker") |
| | | @SuppressWarnings("serial") |
| | | public class ComPropertyWorker implements Serializable { |
| | | private static final long serialVersionUID = -27758929486387787L; |
| | | /** |
| | | * 物业工作人员id |
| | | */ |
| | | private Long id; |
| | | /** |
| | | * 工作人员姓名 |
| | | */ |
| | | private String name; |
| | | /** |
| | | * 手机号 |
| | | */ |
| | | private String phone; |
| | | /** |
| | | * 职务 |
| | | */ |
| | | private String position; |
| | | /** |
| | | * 照片 |
| | | */ |
| | | private String image; |
| | | /** |
| | | * 物业公司关联id |
| | | */ |
| | | private Long refId; |
| | | /** |
| | | * 创建时间 |
| | | */ |
| | | private Date createdAt; |
| | | /** |
| | | * 更新时间 |
| | | */ |
| | | private Date updatedAt; |
| | | |
| | | } |
| | |
| | | |
| | | import com.baomidou.mybatisplus.annotation.*; |
| | | |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | /** |
| | |
| | | * 跳转状态 |
| | | */ |
| | | private Integer jumpType; |
| | | |
| | | /** |
| | | * 类型(1.社区动态 2.党务公开 3.花城资讯) |
| | | */ |
| | | private Integer category; |
| | | } |
| | |
| | | */ |
| | | private Long updateBy; |
| | | |
| | | /** |
| | | * 类型(1.社区动态 2.党务公开 3.花城资讯) |
| | | */ |
| | | private Integer category; |
| | | |
| | | @Override |
| | | public String toString() { |
| | | return "ComActDynTypeDO{" + "id=" + id + ", name=" + name + ", color=" + color + ", isDel=" + isDel |
| | |
| | | */ |
| | | private String logo; |
| | | |
| | | private Integer sort; |
| | | |
| | | /** |
| | | * 状态(1.启用 2.禁用) |
| | | */ |
| | |
| | | /** |
| | | * 小程序查询邻里圈话题列表 |
| | | * |
| | | * @param communityId |
| | | * 社区id |
| | | * @return 邻里圈话题列表 |
| | | */ |
| | | R getNeighborTopicByApp(Long communityId,Integer isZero,String name,Integer belongType); |
| | | R getNeighborTopicByApp(String name); |
| | | |
| | | /** |
| | | * 小程序-用户新增话题 |
| | |
| | | */ |
| | | R addNeighborTopicByApp(AddNeighborCircleTopicAppDTO circleTopicAppDTO); |
| | | |
| | | /** |
| | | * 删除话题 |
| | | * @param id |
| | | * @return |
| | | */ |
| | | R delete(Long id); |
| | | } |
| | |
| | | * @return |
| | | */ |
| | | R delete(Long id); |
| | | |
| | | /** |
| | | * 物业公司详情 |
| | | * @param id |
| | | * @return |
| | | */ |
| | | R detailProperty(Long id); |
| | | } |
New file |
| | |
| | | package com.panzhihua.service_community.service; |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.panzhihua.common.model.dtos.property.PagePropertyWorkerDTO; |
| | | import com.panzhihua.common.model.dtos.property.PropertyWorkerDTO; |
| | | import com.panzhihua.common.model.vos.R; |
| | | import com.panzhihua.service_community.entity.ComPropertyWorker; |
| | | |
| | | /** |
| | | * 物业公司工作人员(ComPropertyWorker)表服务接口 |
| | | * |
| | | * @author makejava |
| | | * @since 2022-04-26 09:40:00 |
| | | */ |
| | | public interface ComPropertyWorkerService extends IService<ComPropertyWorker> { |
| | | |
| | | /** |
| | | * 添加物业工作人员 |
| | | * @param propertyWorkerDTO |
| | | * @return |
| | | */ |
| | | R addPropertyWorker(PropertyWorkerDTO propertyWorkerDTO); |
| | | |
| | | /** |
| | | * 编辑物业工作人员 |
| | | * @param propertyWorkerDTO |
| | | * @return |
| | | */ |
| | | R updatePropertyWorker(PropertyWorkerDTO propertyWorkerDTO); |
| | | |
| | | /** |
| | | * 删除物业工作人员 |
| | | * @param id |
| | | * @return |
| | | */ |
| | | R deletePropertyWorker(Long id); |
| | | |
| | | /** |
| | | * 分页查询物业工作人员 |
| | | * @param pagePropertyWorkerDTO |
| | | * @return |
| | | */ |
| | | R pagePropertyWorker(PagePropertyWorkerDTO pagePropertyWorkerDTO); |
| | | |
| | | /** |
| | | * 物业工作人员详情 |
| | | * @param id |
| | | * @return |
| | | */ |
| | | R detailPropertyWorker(Long id); |
| | | } |
| | |
| | | package com.panzhihua.service_community.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | |
| | | import com.panzhihua.common.model.vos.community.acid.ComAcidStaticVO; |
| | | import com.panzhihua.common.model.vos.community.acid.ComActAcidDangerMemberVO; |
| | | import com.panzhihua.common.model.vos.community.acid.ComActAcidRecordVO; |
| | | import com.panzhihua.common.utlis.DateUtils; |
| | | import com.panzhihua.common.utlis.StringUtils; |
| | | import com.panzhihua.service_community.dao.ComActAcidDangerMemberDao; |
| | | import com.panzhihua.service_community.entity.ComActAcidDangerMember; |
| | |
| | | @Override |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public R insertRecord(ComActAcidRecordVO comActAcidRecordVO) { |
| | | Integer count= this.baseMapper.selectCount(new QueryWrapper<ComActAcidRecord>().lambda().eq(ComActAcidRecord::getIdCard,comActAcidRecordVO.getIdCard()).ge(ComActAcidRecord::getCreateTime, DateUtils.getCurrentDate(DateUtils.yyyyMMdd_format))); |
| | | if(count>0){ |
| | | return R.fail("请勿重复提交"); |
| | | } |
| | | if(StringUtils.isEmpty(comActAcidRecordVO.getLocalCity())){ |
| | | rabbitTemplate.convertAndSend("huacheng.acid.exchange", "huacheng.acid.key", comActAcidRecordVO, message -> { |
| | | message.getMessageProperties().setHeader("x-delay", 24*60*60*1000); |
| | |
| | | */ |
| | | @Override |
| | | public R pageDiscussAdmin(PageComActDiscussDTO pageComActDiscussDTO) { |
| | | return R.ok(comActDiscussDAO.pageDiscussAdmin(new Page<>(pageComActDiscussDTO.getPageNum(), pageComActDiscussDTO.getPageSize()), pageComActDiscussDTO)); |
| | | IPage<ComActDiscussVO> comActDiscussVOIPage=comActDiscussDAO.pageDiscussAdmin(new Page<>(pageComActDiscussDTO.getPageNum(), pageComActDiscussDTO.getPageSize()), pageComActDiscussDTO); |
| | | List<ComActDiscussVO> records = comActDiscussVOIPage.getRecords(); |
| | | if (!ObjectUtils.isEmpty(records)) { |
| | | records.forEach(comActDiscussVO -> { |
| | | Long id = comActDiscussVO.getId(); |
| | | String viewNumKey = String.join("_", DISCUSS_VIEW_NUM_PREFIX, id.toString()); |
| | | if (stringRedisTemplate.hasKey(viewNumKey)) { |
| | | ValueOperations<String, String> opsForValue = stringRedisTemplate.opsForValue(); |
| | | comActDiscussVO.setViewsNum(Integer.parseInt(opsForValue.get(viewNumKey))); |
| | | } |
| | | }); |
| | | } |
| | | return R.ok(comActDiscussVOIPage); |
| | | } |
| | | |
| | | /** |
| | |
| | | //组装viewNum key |
| | | List<String> viewNumKeys = new ArrayList<>(); |
| | | Iterator<String> iterator = needWriteDiscussIdSet.iterator(); |
| | | List<String> idList = new ArrayList<>(); |
| | | while (iterator.hasNext()) { |
| | | viewNumKeys.add(String.join("_", DISCUSS_VIEW_NUM_PREFIX, iterator.next())); |
| | | String next = iterator.next(); |
| | | String key = String.join("_", DISCUSS_VIEW_NUM_PREFIX, next); |
| | | if (stringRedisTemplate.hasKey(key)) { |
| | | idList.add(next); |
| | | viewNumKeys.add(key); |
| | | } |
| | | } |
| | | |
| | | ValueOperations opsForValue = stringRedisTemplate.opsForValue(); |
| | |
| | | |
| | | //待处理集合,以key-value/discussId-viewNum 存放 |
| | | HashMap<Long, Integer> needDealMap = new HashMap<>(); |
| | | for (String discussId : needWriteDiscussIdSet) { |
| | | try { |
| | | needDealMap.put(Long.parseLong(discussId), Integer.parseInt(viewNumList.get(0))); |
| | | viewNumList.remove(0); |
| | | } catch (IndexOutOfBoundsException e) { |
| | | //数据存在异常了,跳过,继续执行正确的 |
| | | continue; |
| | | if (nonNull(idList) && !idList.isEmpty()) { |
| | | log.error("一起议id列表:" + idList.toString()); |
| | | log.error("一起议浏览量:" + viewNumList.toString()); |
| | | for (String discussId : idList) { |
| | | try { |
| | | needDealMap.put(Long.parseLong(discussId), Integer.parseInt(viewNumList.get(0))); |
| | | viewNumList.remove(0); |
| | | } catch (IndexOutOfBoundsException e) { |
| | | log.error("数据异常:" + discussId, e.getMessage()); |
| | | //数据存在异常了,跳过,继续执行正确的 |
| | | continue; |
| | | } |
| | | } |
| | | } |
| | | int result = comActDiscussDAO.batchUpdateViewNum(needDealMap); |
| | |
| | | |
| | | import lombok.extern.slf4j.Slf4j; |
| | | |
| | | import static java.util.Objects.nonNull; |
| | | |
| | | /** |
| | | * @program: springcloud_k8s_panzhihuazhihuishequ |
| | | * @description: 社区动态 |
| | |
| | | if (ObjectUtils.isEmpty(comActDynDO)) { |
| | | return R.fail("社区动态不存在"); |
| | | } |
| | | ComActDO comActDO = comActDAO.selectById(comActDynDO.getCommunityId()); |
| | | Integer category = comActDynDO.getCategory(); |
| | | Integer count = comActDynUserDAO |
| | | .selectCount(new QueryWrapper<ComActDynUserDO>().lambda().eq(ComActDynUserDO::getDynId, id)); |
| | | ComActDynVO comActDynVO = new ComActDynVO(); |
| | | BeanUtils.copyProperties(comActDynDO, comActDynVO); |
| | | comActDynVO.setReadNum(count); |
| | | comActDynVO.setCommunityName(comActDO.getName()); |
| | | if (nonNull(category) && !category.equals(3)) { |
| | | ComActDO comActDO = comActDAO.selectById(comActDynDO.getCommunityId()); |
| | | comActDynVO.setCommunityName(comActDO.getName()); |
| | | } |
| | | return R.ok(comActDynVO); |
| | | } |
| | | |
| | |
| | | ComActDynTypeDO dynTypeDO = this.baseMapper.selectOne(new QueryWrapper<ComActDynTypeDO>().lambda() |
| | | .eq(ComActDynTypeDO::getCommunityId, comActDynTypeDTO.getCommunityId()) |
| | | .eq(ComActDynTypeDO::getName, comActDynTypeDTO.getName()) |
| | | .eq(ComActDynTypeDO::getCategory, comActDynTypeDTO.getCategory()) |
| | | .eq(ComActDynTypeDO::getIsDel, ComActDynTypeDO.isDel.no)); |
| | | if (dynTypeDO != null) { |
| | | return R.fail("该分类名称已存在!"); |
| | |
| | | Integer count = this.baseMapper.selectCount( |
| | | new QueryWrapper<ComActDynTypeDO>().lambda().eq(ComActDynTypeDO::getCommunityId, dynTypeDO.getCommunityId()) |
| | | .eq(ComActDynTypeDO::getName, comActDynTypeDTO.getName()) |
| | | .eq(ComActDynTypeDO::getCategory, dynTypeDO.getCategory()) |
| | | .eq(ComActDynTypeDO::getIsDel, ComActDynTypeDO.isDel.no) |
| | | .ne(ComActDynTypeDO::getId, comActDynTypeDTO.getId())); |
| | | |
| | |
| | | |
| | | import javax.annotation.Resource; |
| | | |
| | | import com.panzhihua.common.model.vos.LoginUserInfoVO; |
| | | import com.panzhihua.common.service.user.UserService; |
| | | import com.panzhihua.service_community.service.ComActNeighborCircleTopicService; |
| | | import org.springframework.beans.BeanUtils; |
| | | import org.springframework.stereotype.Service; |
| | |
| | | private ComActNeighborCircleTopicMapper comActNeighborCircleTopicMapper; |
| | | @Resource |
| | | private ComActNeighborCircleTopicService comActNeighborCircleTopicService; |
| | | |
| | | @Resource |
| | | private UserService userService; |
| | | @Resource |
| | | private ComPbMemberDAO comPbMemberDAO; |
| | | /** |
| | | * 分页查询邻里圈列表 |
| | | * |
| | |
| | | */ |
| | | @Override |
| | | public R pageNeighborByApp(ComActNeighborCircleAppDTO neighborCircleAppDTO) { |
| | | if(neighborCircleAppDTO.getCommunityId()==0L){ |
| | | R<LoginUserInfoVO> loginUserInfoVOR=userService.getUserInfoByUserId(neighborCircleAppDTO.getUserId().toString()); |
| | | if(R.isOk(loginUserInfoVOR)){ |
| | | LoginUserInfoVO loginUserInfoVO=loginUserInfoVOR.getData(); |
| | | if(loginUserInfoVO!=null){ |
| | | ComPbMemberDO comPbMemberDO=comPbMemberDAO.selectOne(new QueryWrapper<ComPbMemberDO>().lambda().eq(ComPbMemberDO::getIdCard,loginUserInfoVO.getIdCard())); |
| | | if(comPbMemberDO!=null){ |
| | | neighborCircleAppDTO.setCommunityId(comPbMemberDO.getCommunityId()); |
| | | } |
| | | } |
| | | } |
| | | } |
| | | Page userPage = new Page(neighborCircleAppDTO.getPageNum(), neighborCircleAppDTO.getPageSize()); |
| | | IPage<ComActNeighborCircleAppVO> doPager = this.baseMapper.pageNeighborByApp(userPage, neighborCircleAppDTO); |
| | | if (!doPager.getRecords().isEmpty()) { |
| | |
| | | } |
| | | if (StringUtils.isNotEmpty(addNeighborCircleAppDTO.getPhone())) { |
| | | neighborCircleDO.setReleasePhone(addNeighborCircleAppDTO.getPhone()); |
| | | } |
| | | //判断用户的话题是否是新增的 |
| | | if(StringUtils.isNotEmpty(addNeighborCircleAppDTO.getTopicName())){ |
| | | //新增邻里圈话题 |
| | | ComActNeighborCircleTopicDO circleTopicDO = comActNeighborCircleTopicMapper.selectOne(new QueryWrapper<ComActNeighborCircleTopicDO>() |
| | | .lambda().eq(ComActNeighborCircleTopicDO::getCommunityId,neighborCircleDO.getCommunityId()) |
| | | .eq(ComActNeighborCircleTopicDO::getName,addNeighborCircleAppDTO.getTopicName())); |
| | | if(circleTopicDO == null){ |
| | | circleTopicDO = new ComActNeighborCircleTopicDO(); |
| | | circleTopicDO.setCommunityId(neighborCircleDO.getCommunityId()); |
| | | circleTopicDO.setName(addNeighborCircleAppDTO.getTopicName()); |
| | | circleTopicDO.setCreateBy(neighborCircleDO.getReleaseId()); |
| | | circleTopicDO.setCreateAt(new Date()); |
| | | circleTopicDO.setCount(0); |
| | | circleTopicDO.setHotNum(0L); |
| | | circleTopicDO.setStatus(ComActNeighborCircleTopicDO.status.yes); |
| | | comActNeighborCircleTopicMapper.insert(circleTopicDO); |
| | | } |
| | | neighborCircleDO.setTopicId(circleTopicDO.getId()); |
| | | } |
| | | //判断当前邻里圈是否需要审核 |
| | | if(addNeighborCircleAppDTO.getIsExamine().equals(AddComActNeighborCircleAppDTO.isExamine.no)){ |
| | |
| | | |
| | | import java.util.Date; |
| | | |
| | | import com.panzhihua.service_community.dao.ComActNeighborCircleDAO; |
| | | import com.panzhihua.service_community.model.dos.ComActNeighborCircleDO; |
| | | import com.panzhihua.service_community.service.ComActNeighborCircleService; |
| | | import org.springframework.beans.BeanUtils; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | |
| | | |
| | | import lombok.extern.slf4j.Slf4j; |
| | | |
| | | import javax.annotation.Resource; |
| | | |
| | | /** |
| | | * @auther lyq |
| | | * @create 2021-07-06 15:04:37 |
| | |
| | | extends ServiceImpl<ComActNeighborCircleTopicMapper, ComActNeighborCircleTopicDO> |
| | | implements ComActNeighborCircleTopicService { |
| | | |
| | | @Resource |
| | | private ComActNeighborCircleDAO comActNeighborCircleDAO; |
| | | /** |
| | | * 分页查询邻里圈话题列表 |
| | | * |
| | |
| | | ComActNeighborCircleTopicDO circleTopicDO = |
| | | this.baseMapper.selectOne(new QueryWrapper<ComActNeighborCircleTopicDO>().lambda() |
| | | .eq(ComActNeighborCircleTopicDO::getName, addCircleTopicAdminDTO.getName()) |
| | | .eq(ComActNeighborCircleTopicDO::getCommunityId, addCircleTopicAdminDTO.getCommunityId())); |
| | | ); |
| | | if (circleTopicDO != null) { |
| | | return R.fail("该话题已存在"); |
| | | } |
| | |
| | | if (circleTopicDO == null) { |
| | | return R.fail("未找到邻里圈话题记录"); |
| | | } |
| | | |
| | | if (StringUtils.isNotEmpty(addCircleTopicAdminDTO.getName())) { |
| | | ComActNeighborCircleTopicDO oldCircleTopicDO = |
| | | this.baseMapper.selectOne(new QueryWrapper<ComActNeighborCircleTopicDO>().lambda() |
| | | .eq(ComActNeighborCircleTopicDO::getName, addCircleTopicAdminDTO.getName()) |
| | | .eq(ComActNeighborCircleTopicDO::getCommunityId, addCircleTopicAdminDTO.getCommunityId()) |
| | | .ne(ComActNeighborCircleTopicDO::getId, circleTopicDO.getId())); |
| | | if (oldCircleTopicDO != null && !oldCircleTopicDO.getId().equals(addCircleTopicAdminDTO.getId())) { |
| | | return R.fail("该话题已存在"); |
| | | } |
| | | } |
| | | |
| | | BeanUtils.copyProperties(addCircleTopicAdminDTO, circleTopicDO); |
| | | if (this.baseMapper.updateById(circleTopicDO) > 0) { |
| | | return R.ok(); |
| | |
| | | /** |
| | | * 小程序查询邻里圈话题列表 |
| | | * |
| | | * @param communityId |
| | | * 社区id |
| | | * @return 邻里圈话题列表 |
| | | */ |
| | | @Override |
| | | public R getNeighborTopicByApp(Long communityId,Integer isZero,String name,Integer belongType){ |
| | | return R.ok(this.baseMapper.getNeighborTopicByApp(communityId,isZero,name,belongType)); |
| | | public R getNeighborTopicByApp(String name){ |
| | | return R.ok(this.baseMapper.getNeighborTopicByApp(name)); |
| | | } |
| | | |
| | | /** |
| | |
| | | } |
| | | return R.ok(circleTopicDO); |
| | | } |
| | | |
| | | @Override |
| | | public R delete(Long id) { |
| | | ComActNeighborCircleTopicDO comActNeighborCircleTopicDO=this.baseMapper.selectById(id); |
| | | if(comActNeighborCircleTopicDO==null){ |
| | | return R.fail("参数错误"); |
| | | } |
| | | Integer count=this.comActNeighborCircleDAO.selectCount(new QueryWrapper<ComActNeighborCircleDO>().lambda().eq(ComActNeighborCircleDO::getTopicId,id)); |
| | | if(count>0){ |
| | | return R.fail("请删除相应问题"); |
| | | } |
| | | return R.ok(this.baseMapper.deleteById(id)); |
| | | } |
| | | } |
| | |
| | | import com.panzhihua.service_community.model.dos.ComMngVolunteerMngDO; |
| | | import com.panzhihua.service_community.service.ComMngVolunteerMngService; |
| | | |
| | | import static java.util.Objects.nonNull; |
| | | |
| | | /** |
| | | * @program: springcloud_k8s_panzhihuazhihuishequ |
| | | * @description: 志愿者 |
| | |
| | | ComMngVolunteerOrgTeam orgVo = comMngVolunteerOrgTeamMapper.selectOne(new QueryWrapper<ComMngVolunteerOrgTeam>().lambda() |
| | | .eq(ComMngVolunteerOrgTeam::getName,excel.getOrgName()).eq(ComMngVolunteerOrgTeam::getCommunityId,communityId) |
| | | .eq(ComMngVolunteerOrgTeam::getParentId,0)); |
| | | if(orgVo == null){ |
| | | ComMngVolunteerErrorExcelVO errorExcelVO = new ComMngVolunteerErrorExcelVO(); |
| | | BeanUtils.copyProperties(excel,errorExcelVO); |
| | | errorExcelVO.setError("该志愿者组织不存在,请先通过后台添加该志愿者组织"); |
| | | errorList.add(errorExcelVO); |
| | | continue; |
| | | } |
| | | // if(orgVo == null){ |
| | | // ComMngVolunteerErrorExcelVO errorExcelVO = new ComMngVolunteerErrorExcelVO(); |
| | | // BeanUtils.copyProperties(excel,errorExcelVO); |
| | | // errorExcelVO.setError("该志愿者组织不存在,请先通过后台添加该志愿者组织"); |
| | | // errorList.add(errorExcelVO); |
| | | // continue; |
| | | // } |
| | | //查询队伍 |
| | | ComMngVolunteerOrgTeam teamVo = comMngVolunteerOrgTeamMapper.selectOne(new QueryWrapper<ComMngVolunteerOrgTeam>().lambda() |
| | | .eq(ComMngVolunteerOrgTeam::getName,excel.getTeamName()).eq(ComMngVolunteerOrgTeam::getCommunityId,communityId) |
| | | .eq(ComMngVolunteerOrgTeam::getParentId,orgVo.getId())); |
| | | if(teamVo == null){ |
| | | ComMngVolunteerErrorExcelVO errorExcelVO = new ComMngVolunteerErrorExcelVO(); |
| | | BeanUtils.copyProperties(excel,errorExcelVO); |
| | | errorExcelVO.setError("该志愿者队伍不存在,请先通过后台添加该志愿者队伍"); |
| | | errorList.add(errorExcelVO); |
| | | continue; |
| | | } |
| | | .eq(ComMngVolunteerOrgTeam::getParentId, nonNull(orgVo) ? orgVo.getId() : null)); |
| | | // if(teamVo == null){ |
| | | // ComMngVolunteerErrorExcelVO errorExcelVO = new ComMngVolunteerErrorExcelVO(); |
| | | // BeanUtils.copyProperties(excel,errorExcelVO); |
| | | // errorExcelVO.setError("该志愿者队伍不存在,请先通过后台添加该志愿者队伍"); |
| | | // errorList.add(errorExcelVO); |
| | | // continue; |
| | | // } |
| | | //查询技能 |
| | | ComMngVolunteerSkill skillVo = comMngVolunteerSkillMapper.selectOne(new QueryWrapper<ComMngVolunteerSkill>().lambda() |
| | | .eq(ComMngVolunteerSkill::getName,excel.getSkillName()).eq(ComMngVolunteerSkill::getCommunityId,communityId)); |
| | | if(skillVo == null){ |
| | | ComMngVolunteerErrorExcelVO errorExcelVO = new ComMngVolunteerErrorExcelVO(); |
| | | BeanUtils.copyProperties(excel,errorExcelVO); |
| | | errorExcelVO.setError("该志愿者技能不存在,请先通过后台添加该志愿者技能"); |
| | | errorList.add(errorExcelVO); |
| | | continue; |
| | | } |
| | | // if(skillVo == null){ |
| | | // ComMngVolunteerErrorExcelVO errorExcelVO = new ComMngVolunteerErrorExcelVO(); |
| | | // BeanUtils.copyProperties(excel,errorExcelVO); |
| | | // errorExcelVO.setError("该志愿者技能不存在,请先通过后台添加该志愿者技能"); |
| | | // errorList.add(errorExcelVO); |
| | | // continue; |
| | | // } |
| | | Date nowDate = new Date(); |
| | | ComMngVolunteerMngDO comMngVolunteerMngDO = comMngVolunteerMngDAO.selectOne(new QueryWrapper<ComMngVolunteerMngDO>().lambda() |
| | | .eq(ComMngVolunteerMngDO::getIdCard,excel.getIdCard()).in(ComMngVolunteerMngDO::getState,1,2)); |
| | |
| | | if(comMngVolunteerMngDO.getState().equals(1)){ |
| | | BeanUtils.copyProperties(excel,comMngVolunteerMngDO); |
| | | comMngVolunteerMngDO.setState(2); |
| | | comMngVolunteerMngDO.setOrgId(orgVo.getId()); |
| | | comMngVolunteerMngDO.setTeamId(teamVo.getId()); |
| | | comMngVolunteerMngDO.setSkillId(skillVo.getId()); |
| | | comMngVolunteerMngDO.setOrgId(nonNull(orgVo) ? orgVo.getId() : null); |
| | | comMngVolunteerMngDO.setTeamId(nonNull(teamVo) ? teamVo.getId() : null); |
| | | comMngVolunteerMngDO.setSkillId(nonNull(skillVo) ? skillVo.getId() : null); |
| | | comMngVolunteerMngDAO.updateById(comMngVolunteerMngDO); |
| | | }else{ |
| | | ComMngVolunteerErrorExcelVO errorExcelVO = new ComMngVolunteerErrorExcelVO(); |
| | |
| | | BeanUtils.copyProperties(excel,comMngVolunteerMngDO); |
| | | comMngVolunteerMngDO.setCommunityId(communityId); |
| | | comMngVolunteerMngDO.setState(2); |
| | | comMngVolunteerMngDO.setOrgId(orgVo.getId()); |
| | | comMngVolunteerMngDO.setTeamId(teamVo.getId()); |
| | | comMngVolunteerMngDO.setSkillId(skillVo.getId()); |
| | | comMngVolunteerMngDO.setOrgId(nonNull(orgVo) ? orgVo.getId() : null); |
| | | comMngVolunteerMngDO.setTeamId(nonNull(teamVo) ? teamVo.getId() : null); |
| | | comMngVolunteerMngDO.setSkillId(nonNull(skillVo) ? skillVo.getId() : null); |
| | | comMngVolunteerMngDO.setCreateAt(nowDate); |
| | | //查询用户id,如果存在则需要绑定 |
| | | Long volunteerUserId = comMngVolunteerMngDAO.selectUserIdByIdCard(excel.getIdCard()); |
| | |
| | | |
| | | import javax.annotation.Resource; |
| | | |
| | | import static java.util.Objects.isNull; |
| | | import static java.util.Objects.nonNull; |
| | | import static org.apache.commons.lang3.StringUtils.isNotBlank; |
| | | |
| | | /** |
| | | * (ComProperty)表服务实现类 |
| | | * |
| | |
| | | if(comPropertyVO!=null){ |
| | | ComProperty comProperty=new ComProperty(); |
| | | BeanUtils.copyProperties(comPropertyVO,comProperty); |
| | | AdministratorsUserVO administratorsUserVO=new AdministratorsUserVO(); |
| | | administratorsUserVO.setType(3); |
| | | administratorsUserVO.setAccount(comPropertyVO.getAccount()); |
| | | administratorsUserVO.setPassword(comPropertyVO.getPassword()); |
| | | administratorsUserVO.setRoleId(comPropertyVO.getRoleId()); |
| | | administratorsUserVO.setCommunityId(comPropertyVO.getCommunityId()); |
| | | administratorsUserVO.setAreaId(comPropertyVO.getAreaId()); |
| | | administratorsUserVO.setName(comPropertyVO.getContactName()); |
| | | administratorsUserVO.setPhone(comPropertyVO.getPhone()); |
| | | R r=userService.addUserBackstageProperty(administratorsUserVO); |
| | | if(R.isOk(r)){ |
| | | comProperty.setUserId(Long.parseLong(r.getData().toString())); |
| | | if (isNotBlank(comPropertyVO.getAccount())) { |
| | | AdministratorsUserVO administratorsUserVO=new AdministratorsUserVO(); |
| | | administratorsUserVO.setType(3); |
| | | administratorsUserVO.setAccount(comPropertyVO.getAccount()); |
| | | administratorsUserVO.setPassword(comPropertyVO.getPassword()); |
| | | administratorsUserVO.setRoleId(comPropertyVO.getRoleId()); |
| | | administratorsUserVO.setCommunityId(comPropertyVO.getCommunityId()); |
| | | administratorsUserVO.setAreaId(comPropertyVO.getAreaId()); |
| | | administratorsUserVO.setName(comPropertyVO.getContactName()); |
| | | administratorsUserVO.setPhone(comPropertyVO.getPhone()); |
| | | R r=userService.addUserBackstageProperty(administratorsUserVO); |
| | | if(R.isOk(r)){ |
| | | comProperty.setUserId(Long.parseLong(r.getData().toString())); |
| | | comProperty.setCreateTime(DateUtil.date()); |
| | | this.comPropertyDao.insert(comProperty); |
| | | return R.ok(); |
| | | } |
| | | } else { |
| | | comProperty.setCreateTime(DateUtil.date()); |
| | | this.comPropertyDao.insert(comProperty); |
| | | return R.ok(); |
| | |
| | | administratorsUserVO.setUserId(comProperty.getUserId()); |
| | | administratorsUserVO.setCommunityId(comProperty.getCommunityId()); |
| | | userService.deleteUserBackstage(administratorsUserVO); |
| | | this.comPropertyDao.deleteById(id); |
| | | return R.ok(); |
| | | } |
| | | this.comPropertyDao.deleteById(id); |
| | | return R.ok(); |
| | | } |
| | | return R.fail("用户账号错误"); |
| | | } |
| | | |
| | | /** |
| | | * 物业公司详情 |
| | | * @param id |
| | | * @return |
| | | */ |
| | | @Override |
| | | public R detailProperty(Long id) { |
| | | ComProperty comProperty = comPropertyDao.selectById(id); |
| | | if (isNull(comProperty)) { |
| | | return R.fail("资源不存在"); |
| | | } |
| | | ComPropertyVO comPropertyVO = new ComPropertyVO(); |
| | | BeanUtils.copyProperties(comProperty, comPropertyVO); |
| | | comPropertyVO.setPassword(null); |
| | | return R.ok(comPropertyVO); |
| | | } |
| | | } |
New file |
| | |
| | | package com.panzhihua.service_community.service.impl; |
| | | |
| | | import static java.util.Objects.isNull; |
| | | |
| | | import org.springframework.beans.BeanUtils; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.panzhihua.common.model.dtos.property.PagePropertyWorkerDTO; |
| | | import com.panzhihua.common.model.dtos.property.PropertyWorkerDTO; |
| | | import com.panzhihua.common.model.vos.R; |
| | | import com.panzhihua.common.model.vos.property.ComPropertyWorkerVO; |
| | | import com.panzhihua.service_community.dao.ComPropertyWorkerDAO; |
| | | import com.panzhihua.service_community.entity.ComPropertyWorker; |
| | | import com.panzhihua.service_community.service.ComPropertyWorkerService; |
| | | |
| | | /** |
| | | * 物业公司工作人员(ComPropertyWorker)表服务实现类 |
| | | * |
| | | * @author makejava |
| | | * @since 2022-04-26 09:40:00 |
| | | */ |
| | | @Service("comPropertyWorkerService") |
| | | public class ComPropertyWorkerServiceImpl extends ServiceImpl<ComPropertyWorkerDAO, ComPropertyWorker> |
| | | implements ComPropertyWorkerService { |
| | | |
| | | /** |
| | | * 添加物业工作人员 |
| | | * @param propertyWorkerDTO |
| | | * @return |
| | | */ |
| | | @Override |
| | | public R addPropertyWorker(PropertyWorkerDTO propertyWorkerDTO) { |
| | | ComPropertyWorker propertyWorker = new ComPropertyWorker(); |
| | | BeanUtils.copyProperties(propertyWorkerDTO, propertyWorker); |
| | | int result = this.baseMapper.insert(propertyWorker); |
| | | return result > 0 ? R.ok() : R.fail("操作失败,请重试"); |
| | | } |
| | | |
| | | /** |
| | | * 编辑物业工作人员 |
| | | * @param propertyWorkerDTO |
| | | * @return |
| | | */ |
| | | @Override |
| | | public R updatePropertyWorker(PropertyWorkerDTO propertyWorkerDTO) { |
| | | ComPropertyWorker propertyWorker = this.baseMapper.selectById(propertyWorkerDTO.getId()); |
| | | if (isNull(propertyWorker)) { |
| | | return R.fail("资源不存在"); |
| | | } |
| | | BeanUtils.copyProperties(propertyWorkerDTO, propertyWorker); |
| | | int result = this.baseMapper.updateById(propertyWorker); |
| | | return result > 0 ? R.ok() : R.fail("操作失败,请重试"); |
| | | } |
| | | |
| | | /** |
| | | * 删除物业工作人员 |
| | | * @param id |
| | | * @return |
| | | */ |
| | | @Override |
| | | public R deletePropertyWorker(Long id) { |
| | | this.baseMapper.deleteById(id); |
| | | return R.ok(); |
| | | } |
| | | |
| | | /** |
| | | * 分页查询物业工作人员 |
| | | * @param pagePropertyWorkerDTO |
| | | * @return |
| | | */ |
| | | @Override |
| | | public R pagePropertyWorker(PagePropertyWorkerDTO pagePropertyWorkerDTO) { |
| | | Page page = new Page<>(); |
| | | page.setCurrent(pagePropertyWorkerDTO.getPageNum()); |
| | | page.setSize(pagePropertyWorkerDTO.getPageSize()); |
| | | return R.ok(this.baseMapper.pagePropertyWorker(page, pagePropertyWorkerDTO)); |
| | | } |
| | | |
| | | /** |
| | | * 物业工作人员详情 |
| | | * @param id |
| | | * @return |
| | | */ |
| | | @Override |
| | | public R detailPropertyWorker(Long id) { |
| | | ComPropertyWorker propertyWorker = this.baseMapper.selectById(id); |
| | | if (isNull(propertyWorker)) { |
| | | return R.fail("资源不存在"); |
| | | } |
| | | ComPropertyWorkerVO propertyWorkerVO = new ComPropertyWorkerVO(); |
| | | BeanUtils.copyProperties(propertyWorker, propertyWorkerVO); |
| | | return R.ok(propertyWorkerVO); |
| | | } |
| | | } |
| | |
| | | <if test="commonPage.departureCity !=null and commonPage.departureCity !=''"> |
| | | and departure_city like concat('%',#{commonPage.departureCity},'%') |
| | | </if> |
| | | <if test="commonPage.localCity !=null and commonPage.localCity !=''"> |
| | | <if test="commonPage.localCity !=null and commonPage.localCity !='' and commonPage.localCity !='panzhihua'"> |
| | | and local_city like concat('%',#{commonPage.localCity},'%') |
| | | </if> |
| | | <if test="commonPage.colorMark !=null and commonPage.colorMark !=''"> |
| | |
| | | <result column="cover_mode" property="coverMode" /> |
| | | <result column="jump_url" property="jumpUrl" /> |
| | | <result column="jump_type" property="jumpType" /> |
| | | <result column="category" property="category" /> |
| | | </resultMap> |
| | | |
| | | <!-- 通用查询结果列 --> |
| | |
| | | resultType="com.panzhihua.common.model.vos.community.ComSwPatrolRecordVO"> |
| | | SELECT id,person_name,patrol_type,patrol_time FROM com_sw_patrol_record WHERE community_id = #{communityId} LIMIT #{pageSize} |
| | | </select> |
| | | <select id="pageDynamic" resultType="com.panzhihua.common.model.vos.community.ComActDynVO"> |
| | | SELECT d.id, d.title, IFNULL(u.readNum,0) readNum, d.`status`, d.`content`, d.`cover`, d.`type`, d.`cover_mode`, |
| | | d.jump_url,d.jump_type, d.is_topping, d.publish_at, d.create_at, cadt.`name` as typeName, cadt.color as |
| | | typeColor, ca.name as communityName |
| | | FROM com_act_dyn d |
| | | LEFT JOIN ( select dyn_id,count(id) as readNum from |
| | | com_act_dyn_user GROUP BY dyn_id ) u ON d.id = u.dyn_id |
| | | LEFT JOIN com_act_dyn_type as cadt ON cadt.id = d.type |
| | | LEFT JOIN com_act ca ON d.community_id = ca.community_id |
| | | WHERE 1=1 |
| | | <if test='comActDynVO.category != null '> |
| | | <if test="comActDynVO.category != 3"> |
| | | and d.community_id = ${comActDynVO.communityId} |
| | | </if> |
| | | and d.category = #{comActDynVO.category} |
| | | </if> |
| | | <if test='comActDynVO.title != null and comActDynVO.title.trim() != ""'> |
| | | AND d.title like |
| | | concat(#{comActDynVO.title},'%') |
| | | </if> |
| | | <if test='comActDynVO.isTopping != null '> |
| | | AND d.is_topping = #{comActDynVO.isTopping} |
| | | </if> |
| | | <if test='comActDynVO.status != null '> |
| | | AND d.`status` = #{comActDynVO.status} |
| | | </if> |
| | | <if test='comActDynVO.publishAtBegin != null '> |
| | | AND d.publish_at BETWEEN #{comActDynVO.publishAtBegin} AND #{comActDynVO.publishAtEnd} |
| | | </if> |
| | | group by d.id order by d.is_topping desc, d.create_at desc |
| | | </select> |
| | | <select id="pageDynamicByAdmin" resultType="com.panzhihua.common.model.vos.community.ComActDynVO"> |
| | | SELECT d.id, d.title, COUNT(u.id)readNum, d.`status`, d.`content`, d.`cover`, d.`type`, d.`cover_mode`, |
| | | d.is_topping, d.publish_at, d.create_at, cadt.`name` as typeName, ca.name as communityName |
| | | FROM com_act_dyn d |
| | | LEFT JOIN com_act_dyn_user u ON d.id = u.dyn_id |
| | | LEFT JOIN com_act_dyn_type as cadt ON cadt.id = d.type |
| | | LEFT JOIN com_act ca ON d.community_id = ca.community_id |
| | | WHERE 1=1 |
| | | <if test='comActDynVO.category != null '> |
| | | <if test="comActDynVO.category != 3"> |
| | | AND d.community_id = ${comActDynVO.communityId} |
| | | </if> |
| | | and d.category = #{comActDynVO.category} |
| | | </if> |
| | | <if test='comActDynVO.title != null and comActDynVO.title.trim() != ""'> |
| | | AND d.title like concat(#{comActDynVO.title},'%') |
| | | </if> |
| | | <if test='comActDynVO.isTopping != null '> |
| | | AND d.is_topping = #{comActDynVO.isTopping} |
| | | </if> |
| | | <if test='comActDynVO.status != null '> |
| | | AND d.`status` = #{comActDynVO.status} |
| | | </if> |
| | | <if test='comActDynVO.type != null '> |
| | | AND d.type = #{comActDynVO.type} |
| | | </if> |
| | | <if test='comActDynVO.publishAtBegin != null '> |
| | | AND d.publish_at BETWEEN #{comActDynVO.publishAtBegin} AND #{comActDynVO.publishAtEnd} |
| | | </if> |
| | | group by d.id order by d.is_topping desc, d.create_at desc |
| | | </select> |
| | | </mapper> |
| | |
| | | <result column="create_by" property="createBy" /> |
| | | <result column="update_at" property="updateAt" /> |
| | | <result column="update_by" property="updateBy" /> |
| | | <result column="category" property="category" /> |
| | | </resultMap> |
| | | |
| | | <!-- 通用查询结果列 --> |
| | |
| | | LEFT JOIN sys_user AS su ON su.user_id = cadt.create_by |
| | | LEFT JOIN sys_user AS su1 ON su1.user_id = cadt.update_by |
| | | where cadt.community_id = 0 and cadt.is_del = 2 |
| | | <if test="comActDynTypeDTO.category != null"> |
| | | <if test="comActDynTypeDTO.category == 3"> |
| | | AND 1=2 |
| | | </if> |
| | | AND cadt.category = #{comActDynTypeDTO.category} |
| | | </if> |
| | | <if test="comActDynTypeDTO.keyWord != null and comActDynTypeDTO.keyWord != """> |
| | | and (cadt.id = #{comActDynTypeDTO.keyWord} or cadt.`name` like concat (#{comActDynTypeDTO.keyWord},'%')) |
| | | </if> |
| | |
| | | LEFT JOIN sys_user AS su ON su.user_id = cadt.create_by |
| | | LEFT JOIN sys_user AS su1 ON su1.user_id = cadt.update_by |
| | | where cadt.is_del = 2 |
| | | <if test="comActDynTypeDTO.communityId != null"> |
| | | and cadt.community_id = ${comActDynTypeDTO.communityId} |
| | | <if test='comActDynTypeDTO.category != null '> |
| | | <if test="comActDynTypeDTO.category != 3"> |
| | | <if test="comActDynTypeDTO.communityId != null"> |
| | | and cadt.community_id = ${comActDynTypeDTO.communityId} |
| | | </if> |
| | | </if> |
| | | AND cadt.category = #{comActDynTypeDTO.category} |
| | | </if> |
| | | <if test="comActDynTypeDTO.keyWord != null and comActDynTypeDTO.keyWord != """> |
| | | and (cadt.id = #{comActDynTypeDTO.keyWord} or cadt.`name` like concat (#{comActDynTypeDTO.keyWord},'%')) |
| | |
| | | LEFT JOIN sys_user AS su ON su.user_id = cadt.create_by |
| | | LEFT JOIN sys_user AS su1 ON su1.user_id = cadt.update_by |
| | | where cadt.community_id = 0 and cadt.is_del = 2 |
| | | <if test="comActDynTypeDTO.category != null"> |
| | | AND cadt.category = #{comActDynTypeDTO.category} |
| | | </if> |
| | | <if test="comActDynTypeDTO.keyWord != null and comActDynTypeDTO.keyWord != """> |
| | | and (cadt.id = #{comActDynTypeDTO.keyWord} or cadt.`name` like concat (#{comActDynTypeDTO.keyWord},'%')) |
| | | </if> |
| | |
| | | LEFT JOIN sys_user AS su ON su.user_id = cadt.create_by |
| | | LEFT JOIN sys_user AS su1 ON su1.user_id = cadt.update_by |
| | | where cadt.is_del = 2 |
| | | <if test="comActDynTypeDTO.communityId != null"> |
| | | and cadt.community_id = ${comActDynTypeDTO.communityId} |
| | | <if test='comActDynTypeDTO.category != null '> |
| | | <if test="comActDynTypeDTO.category != 3"> |
| | | <if test="comActDynTypeDTO.communityId != null"> |
| | | and cadt.community_id = ${comActDynTypeDTO.communityId} |
| | | </if> |
| | | </if> |
| | | AND cadt.category = #{comActDynTypeDTO.category} |
| | | </if> |
| | | <if test="comActDynTypeDTO.keyWord != null and comActDynTypeDTO.keyWord != """> |
| | | and (cadt.id = #{comActDynTypeDTO.keyWord} or cadt.`name` like concat (#{comActDynTypeDTO.keyWord},'%')) |
| | |
| | | canct.`status`, |
| | | canct.create_at, |
| | | canct.logo, |
| | | ( SELECT count( id ) FROM com_act_neighbor_circle WHERE is_del = 2 AND `status` = 2 and topic_id = canct.id) AS `count`, |
| | | su.`name` as createBy |
| | | su.`name` as createBy, |
| | | canct.sort |
| | | FROM |
| | | com_act_neighbor_circle_topic AS canct |
| | | LEFT JOIN sys_user AS su ON su.user_id = canct.create_by |
| | | <where> |
| | | <if test="circleTopicAdminDTO.communityId != null"> |
| | | and canct.community_id = ${circleTopicAdminDTO.communityId} |
| | | </if> |
| | | <if test="circleTopicAdminDTO.status != null"> |
| | | and canct.status = #{circleTopicAdminDTO.status} |
| | | </if> |
| | | <if test="circleTopicAdminDTO.name != null and circleTopicAdminDTO.name != """> |
| | | and canct.name like concat(#{circleTopicAdminDTO.name},'%') |
| | | </if> |
| | | </where> |
| | | order by canct.create_at desc |
| | | order by canct.sort asc |
| | | </select> |
| | | |
| | | <select id="getNeighborTopicByApp" resultType="com.panzhihua.common.model.vos.neighbor.ComActNeighborCircleTopicAppVO"> |
| | | SELECT canct.id, canct.`name`,`logo`, canct.hot_num,( SELECT count( id ) FROM com_act_neighbor_circle WHERE is_del = 2 AND `status` = 2 and topic_id = canct.id) AS `count` |
| | | from com_act_neighbor_circle_topic as canct where canct.`status` = 1 and canct.community_id = ${communityId} and canct.belong_type = #{belongType} |
| | | <if test="isZero != null and isZero == 1"> |
| | | and `count` > 0 |
| | | </if> |
| | | SELECT canct.id, canct.`name`,`logo`, canct.hot_num |
| | | from com_act_neighbor_circle_topic as canct where canct.`status` = 1 |
| | | <if test="name != null and name != """> |
| | | and canct.`name` like concat('%',#{name},'%') |
| | | </if> |
| | | order by `count` desc |
| | | order by canct.sort asc |
| | | </select> |
| | | |
| | | <update id="addHotNum"> |
| | |
| | | </select> |
| | | |
| | | <select id="selectCommunity" resultType="com.panzhihua.common.model.vos.community.acid.ComAreaCounty"> |
| | | select distinct community as value from com_area_town_community where town =#{town} |
| | | select distinct community as value,community_id from com_area_town_community where town =#{town} |
| | | </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.ComPropertyWorkerDAO"> |
| | | |
| | | <resultMap type="com.panzhihua.service_community.entity.ComPropertyWorker" id="ComPropertyWorkerMap"> |
| | | <result property="id" column="id" jdbcType="INTEGER"/> |
| | | <result property="name" column="name" jdbcType="VARCHAR"/> |
| | | <result property="phone" column="phone" jdbcType="VARCHAR"/> |
| | | <result property="position" column="position" jdbcType="VARCHAR"/> |
| | | <result property="image" column="image" jdbcType="VARCHAR"/> |
| | | <result property="refId" column="ref_id" jdbcType="INTEGER"/> |
| | | <result property="createdAt" column="created_at" jdbcType="TIMESTAMP"/> |
| | | <result property="updatedAt" column="updated_at" jdbcType="TIMESTAMP"/> |
| | | </resultMap> |
| | | |
| | | <!-- 批量插入 --> |
| | | <insert id="insertBatch" keyProperty="id" useGeneratedKeys="true"> |
| | | insert into huacheng_smart_life.com_property_worker(name, phone, position, image, ref_id, created_at, |
| | | updated_at) |
| | | values |
| | | <foreach collection="entities" item="entity" separator=","> |
| | | (#{entity.name}, #{entity.phone}, #{entity.position}, #{entity.image}, #{entity.refId}, #{entity.createdAt}, |
| | | #{entity.updatedAt}) |
| | | </foreach> |
| | | </insert> |
| | | <!-- 批量插入或按主键更新 --> |
| | | <insert id="insertOrUpdateBatch" keyProperty="id" useGeneratedKeys="true"> |
| | | insert into huacheng_smart_life.com_property_worker(name, phone, position, image, ref_id, created_at, |
| | | updated_at) |
| | | values |
| | | <foreach collection="entities" item="entity" separator=","> |
| | | (#{entity.name}, #{entity.phone}, #{entity.position}, #{entity.image}, #{entity.refId}, #{entity.createdAt}, |
| | | #{entity.updatedAt}) |
| | | </foreach> |
| | | on duplicate key update |
| | | name = values(name) , phone = values(phone) , position = values(position) , image = values(image) , ref_id = |
| | | values(ref_id) , created_at = values(created_at) , updated_at = values(updated_at) |
| | | </insert> |
| | | <select id="pagePropertyWorker" resultType="com.panzhihua.common.model.vos.property.ComPropertyWorkerVO"> |
| | | SELECT id, `name`, phone, `position`, image, ref_id |
| | | FROM com_property_worker |
| | | WHERE ref_id = #{pagePropertyWorkerDTO.refId} |
| | | <if test="pagePropertyWorkerDTO.keyword != null and pagePropertyWorkerDTO.keyword != """> |
| | | AND (`name` LIKE CONCAT('%', #{pagePropertyWorkerDTO.keyword}) |
| | | OR phone LIKE CONCAT('%', #{pagePropertyWorkerDTO.keyword})) |
| | | </if> |
| | | </select> |
| | | |
| | | </mapper> |
| | | |
| | |
| | | + "d.publish_at,\n" + "d.content,\n" + "d.cover,\n" + "d.cover_mode,\n" + "d.dyn_type,\n" + "d.create_at,t.name as communityName,d.policy_type \n" |
| | | + "FROM\n" + "com_pb_dyn d\n" + "LEFT JOIN com_pb_dyn_user u ON d.id = u.dyn_id left join com_act t on d.community_id = t.community_id\n" |
| | | + "where d.type=#{partyBuildingComPbDynVO.type} \n" |
| | | + "<if test='partyBuildingComPbDynVO.choice == 0 '>" |
| | | + "<if test='partyBuildingComPbDynVO.communityId != null and partyBuildingComPbDynVO.communityId != 0'>" |
| | | + "and d.community_id = ${partyBuildingComPbDynVO.communityId} \n" + " </if> "+" </if> " |
| | | + "and d.community_id = ${partyBuildingComPbDynVO.communityId} \n" + " </if> " |
| | | + "<if test='partyBuildingComPbDynVO.dynType != null and partyBuildingComPbDynVO.dynType != 0'>" |
| | | + "and d.dyn_type = #{partyBuildingComPbDynVO.dynType} \n" + " </if> " |
| | | + "<if test='partyBuildingComPbDynVO.policyType != null and partyBuildingComPbDynVO.policyType != 0'>" |
| | |
| | | @Select("select name from sys_user where user_id=#{createBy}") |
| | | String selectNameByUserId(Long createBy); |
| | | |
| | | @Update("update sys_user u set u.is_partymember=0 where u.id_card=#{idCard}") |
| | | void updateUserIsPartymember(String idCard); |
| | | @Update("update sys_user u set u.is_partymember=0 where u.phone=#{phone}") |
| | | void updateUserIsPartymember(String phone); |
| | | |
| | | @Select("<script> " + "SELECT\n" + "o.`name` orgName,\n" + "m.org_id,\n" + "m.id_card,\n" + "m.`id`,\n" |
| | | + "u.phone,\n" + "m.`name`,\n" + "m.photo_path,\n" + "TIMESTAMPDIFF(\n" + "YEAR,\n" + "m.employment_time,\n" |
| | |
| | | * @return 党员列表 |
| | | */ |
| | | IPage<PartyBuildingMemberVO> getPbMemberByApplets(Page page,@Param("dto") PartyBuildingMemberVO partyBuildingMemberVO); |
| | | |
| | | /** |
| | | * 小程序获取报道单位党员列表 |
| | | * @param id |
| | | * @return |
| | | */ |
| | | List<PartyBuildingMemberVO> getDetailByApp(Long id); |
| | | } |
| | |
| | | import com.google.common.collect.Lists; |
| | | import com.panzhihua.common.enums.ComPbCheckUnitTypeEnum; |
| | | import com.panzhihua.common.model.vos.common.ComPbCheckUnitVo; |
| | | import com.panzhihua.common.model.vos.partybuilding.PartyBuildingMemberVO; |
| | | import com.panzhihua.common.model.vos.partybuilding.excel.ComPbCheckUnitErrorExcelVO; |
| | | import com.panzhihua.common.model.vos.partybuilding.excel.ComPbCheckUnitExcelVO; |
| | | import com.panzhihua.common.utlis.StringUtils; |
| | |
| | | */ |
| | | @Override |
| | | public R queryByList(PageComPbCheckUnitDto comPbCheckUnit) { |
| | | List<ComPbCheckUnitVo> checkUnitList = this.baseMapper.queryAllByList(comPbCheckUnit); |
| | | checkUnitList.forEach(checkUnit -> { |
| | | IPage<ComPbCheckUnitVo> checkUnitList = this.baseMapper.queryAllByLimit(comPbCheckUnit,new Page(comPbCheckUnit.getPageNum(),comPbCheckUnit.getPageSize())); |
| | | checkUnitList.getRecords().forEach(checkUnit -> { |
| | | if(StringUtils.isEmpty(checkUnit.getOrgName())){ |
| | | checkUnit.setOrgName("待编辑党支部"); |
| | | } |
| | |
| | | List<ComPbMemberDO> comPbMemberDOs = comPbMemberDAO.selectList(new QueryWrapper<ComPbMemberDO>().lambda() |
| | | .eq(ComPbMemberDO::getIdCard, idCard).eq(ComPbMemberDO::getAuditResult, 1)); |
| | | if (!ObjectUtils.isEmpty(comPbMemberDOs) && comPbMemberDOs.size() > 0) { |
| | | return R.fail("身份证已经存在"); |
| | | comPbMemberDOs.forEach(comPbMemberDO -> { |
| | | comPbMemberDAO.deleteById(comPbMemberDO.getId()); |
| | | }); |
| | | } |
| | | ComPbMemberDO comPbMemberDO1 = new ComPbMemberDO(); |
| | | BeanUtils.copyProperties(partyBuildingMemberVO, comPbMemberDO1); |
| | |
| | | comPbMemberDO1.setUpdateAt(date); |
| | | int insert = comPbMemberDAO.insert(comPbMemberDO1); |
| | | if (insert > 0) { |
| | | //金沙特殊需求 |
| | | if(comPbMemberDO1.getCommunityId()==2L){ |
| | | ComMngVolunteerMngVO comMngVolunteerMngVO=new ComMngVolunteerMngVO(); |
| | | comMngVolunteerMngVO.setOrgId(53L); |
| | | comMngVolunteerMngVO.setName(comPbMemberDO1.getName()); |
| | | comMngVolunteerMngVO.setPhone(comPbMemberDO1.getPhone()); |
| | | comMngVolunteerMngVO.setIdCard(comPbMemberDO1.getIdCard()); |
| | | comMngVolunteerMngVO.setState(2); |
| | | comMngVolunteerMngVO.setCommunityId(2L); |
| | | R r = communityService.addVolunteer(comMngVolunteerMngVO); |
| | | // 支援者添加成功,修改小程序用户的志愿者状态 ,通过手机号 |
| | | if (R.isOk(r)) { |
| | | String phone = comMngVolunteerMngVO.getPhone(); |
| | | R r1 = userService.putUserIsVolunteer(phone, 1); |
| | | if (R.isOk(r1)) { |
| | | log.info("修改手机号【{}】的支援者状态为是", phone); |
| | | } else { |
| | | log.info("手机号【{}】没有小程序用户", phone); |
| | | } |
| | | } |
| | | } |
| | | |
| | | // 删除已驳回的记录 |
| | | int delete = comPbMemberDAO.delete(new QueryWrapper<ComPbMemberDO>().lambda() |
| | | .eq(ComPbMemberDO::getIdCard, partyBuildingMemberVO.getIdCard()) |
| | |
| | | public R listSavePartyBuildingMemberExcelVO(List<PartyBuildingMemberExcelVO> list) { |
| | | // Boolean aBoolean = stringRedisTemplate.hasKey(REDIS_ORG_ALL); |
| | | // ValueOperations<String, String> valueOperations = stringRedisTemplate.opsForValue(); |
| | | List<PartyOrganizationVO> partyOrganizationVOS = new ArrayList<>(); |
| | | //List<PartyOrganizationVO> partyOrganizationVOS = new ArrayList<>(); |
| | | // if (aBoolean) { |
| | | // String orgs = valueOperations.get(REDIS_ORG_ALL); |
| | | // if (!ObjectUtils.isEmpty(orgs)) { |
| | |
| | | // } |
| | | // valueOperations.set(REDIS_ORG_ALL,JSONArray.toJSONString(partyOrganizationVOS),24, TimeUnit.HOURS); |
| | | // } |
| | | List<ComPbOrgDO> comPbOrgDOS = comPbOrgDAO.selectList(new LambdaQueryWrapper<>()); |
| | | if (!ObjectUtils.isEmpty(comPbOrgDOS)) { |
| | | List<PartyOrganizationVO> partyOrganizationVOList = new ArrayList<>(); |
| | | comPbOrgDOS.forEach(comPbOrgDO -> { |
| | | PartyOrganizationVO partyOrganizationVO = new PartyOrganizationVO(); |
| | | partyOrganizationVO.setId(comPbOrgDO.getId()); |
| | | partyOrganizationVO.setName(comPbOrgDO.getName()); |
| | | partyOrganizationVO.setCommunityId(comPbOrgDO.getCommunityId()); |
| | | partyOrganizationVOList.add(partyOrganizationVO); |
| | | }); |
| | | partyOrganizationVOS = partyOrganizationVOList; |
| | | } |
| | | List<ComPbMemberDO> comPbMemberDOS = new ArrayList<>(); |
| | | if (!ObjectUtils.isEmpty(list)) { |
| | | List<PartyOrganizationVO> partyOrganizationVOArrayList = partyOrganizationVOS; |
| | | for (PartyBuildingMemberExcelVO partyBuildingMemberExcelVO : list) { |
| | | ComPbMemberDO comPbMemberDO = new ComPbMemberDO(); |
| | | Date date = new Date(); |
| | | comPbMemberDO.setUpdateAt(date); |
| | | comPbMemberDO.setCreateAt(date); |
| | | String orgName = partyBuildingMemberExcelVO.getOrgName(); |
| | | List<PartyOrganizationVO> collect = partyOrganizationVOArrayList.stream() |
| | | .filter(partyOrganizationVO -> orgName.equals(partyOrganizationVO.getName())) |
| | | .collect(Collectors.toList()); |
| | | if (ObjectUtils.isEmpty(collect)) { |
| | | throw new PartyBuildingMemberException( |
| | | "导入失败,组织不存在" + partyBuildingMemberExcelVO.getOrgName() + ",请先在“党支部管理”中添加该党支部"); |
| | | } else { |
| | | PartyOrganizationVO partyOrganizationVO = collect.get(0); |
| | | comPbMemberDO.setOrgId(partyOrganizationVO.getId()); |
| | | comPbMemberDO.setCommunityId(partyOrganizationVO.getCommunityId()); |
| | | |
| | | if(StringUtils.isNotEmpty(partyBuildingMemberExcelVO.getName())&&StringUtils.isNotEmpty(partyBuildingMemberExcelVO.getPhone())&&StringUtils.isNotEmpty(partyBuildingMemberExcelVO.getOrgName())){ |
| | | ComPbMemberDO comPbMemberDO = new ComPbMemberDO(); |
| | | Date date = new Date(); |
| | | comPbMemberDO.setUpdateAt(date); |
| | | comPbMemberDO.setCreateAt(date); |
| | | List<ComPbMemberDO> comPbMemberDOList = this.baseMapper.selectList(new QueryWrapper<ComPbMemberDO>() |
| | | .lambda().eq(ComPbMemberDO::getIdCard, partyBuildingMemberExcelVO.getIdCard()) |
| | | .eq(ComPbMemberDO::getCommunityId, partyOrganizationVO.getCommunityId()) |
| | | .in(ComPbMemberDO::getAuditResult, 0, 1)); |
| | | .lambda().eq(ComPbMemberDO::getPhone, partyBuildingMemberExcelVO.getPhone()) |
| | | .eq(ComPbMemberDO::getCommunityId, partyBuildingMemberExcelVO.getCommunityId())); |
| | | if (!comPbMemberDOList.isEmpty()) { |
| | | comPbMemberDOList.forEach(comPbMember -> { |
| | | BeanUtils.copyProperties(partyBuildingMemberExcelVO, comPbMember); |
| | |
| | | // partyBuildingMemberExcelVO.getEmploymentTime() + ",已存在的人名:" + |
| | | // partyBuildingMemberExcelVO.getName()); |
| | | } |
| | | BeanUtils.copyProperties(partyBuildingMemberExcelVO,comPbMemberDO); |
| | | comPbMemberDOS.add(comPbMemberDO); |
| | | } |
| | | |
| | | if (StringUtils.isNotEmpty(partyBuildingMemberExcelVO.getEmploymentTime()) |
| | | && !DateUtils.isValidDate(partyBuildingMemberExcelVO.getEmploymentTime())) { |
| | | throw new PartyBuildingMemberException( |
| | | "导入失败,您导入的数据中有转正日期格式错误,错误数据:" + partyBuildingMemberExcelVO.getEmploymentTime() + ",错误人名:" |
| | | + partyBuildingMemberExcelVO.getName()); |
| | | else { |
| | | throw new PartyBuildingMemberException("导入失败,你导入的内容有未填报项"); |
| | | } |
| | | |
| | | if (StringUtils.isNotEmpty(partyBuildingMemberExcelVO.getJoinTime()) |
| | | && !DateUtils.isValidDate(partyBuildingMemberExcelVO.getJoinTime())) { |
| | | throw new PartyBuildingMemberException("导入失败,您导入的数据中有入党日期格式错误,错误数据:" |
| | | + partyBuildingMemberExcelVO.getJoinTime() + ",错误人名:" + partyBuildingMemberExcelVO.getName()); |
| | | } |
| | | |
| | | if (StringUtils.isNotEmpty(partyBuildingMemberExcelVO.getEmploymentTime())) { |
| | | Date employmentTime = DateUtils.toValidDate(partyBuildingMemberExcelVO.getEmploymentTime()); |
| | | comPbMemberDO.setEmploymentTime(employmentTime); |
| | | } else { |
| | | comPbMemberDO.setEmploymentTime(null); |
| | | } |
| | | |
| | | if (StringUtils.isNotEmpty(partyBuildingMemberExcelVO.getJoinTime())) { |
| | | Date joinTime = DateUtils.toValidDate(partyBuildingMemberExcelVO.getJoinTime()); |
| | | comPbMemberDO.setJoinTime(joinTime); |
| | | } else { |
| | | comPbMemberDO.setJoinTime(null); |
| | | } |
| | | |
| | | comPbMemberDO.setName(partyBuildingMemberExcelVO.getName()); |
| | | comPbMemberDO.setIdCard(partyBuildingMemberExcelVO.getIdCard()); |
| | | comPbMemberDO.setPhone(partyBuildingMemberExcelVO.getPhone()); |
| | | comPbMemberDOS.add(comPbMemberDO); |
| | | } |
| | | this.saveBatch(comPbMemberDOS); |
| | | } |
| | | comPbMemberDOS.forEach(comPbMemberDO -> { |
| | | boolean flag=this.save(comPbMemberDO); |
| | | if(flag){ |
| | | //修改党员状态 |
| | | userService.updateUserIsPartymember(comPbMemberDO.getIdCard()); |
| | | //金沙社区特殊需求 添加党员默认添加志愿者 |
| | | if(comPbMemberDO.getCommunityId()==2L){ |
| | | ComMngVolunteerMngVO comMngVolunteerMngVO=new ComMngVolunteerMngVO(); |
| | | comMngVolunteerMngVO.setOrgId(53L); |
| | | comMngVolunteerMngVO.setName(comPbMemberDO.getName()); |
| | | comMngVolunteerMngVO.setPhone(comPbMemberDO.getPhone()); |
| | | comMngVolunteerMngVO.setIdCard(comPbMemberDO.getIdCard()); |
| | | comMngVolunteerMngVO.setState(2); |
| | | comMngVolunteerMngVO.setCommunityId(2L); |
| | | R r = communityService.addVolunteer(comMngVolunteerMngVO); |
| | | // 支援者添加成功,修改小程序用户的志愿者状态 ,通过手机号 |
| | | if (R.isOk(r)) { |
| | | String phone = comMngVolunteerMngVO.getPhone(); |
| | | R r1 = userService.putUserIsVolunteer(phone, 1); |
| | | if (R.isOk(r1)) { |
| | | log.info("修改手机号【{}】的支援者状态为是", phone); |
| | | } else { |
| | | log.info("手机号【{}】没有小程序用户", phone); |
| | | } |
| | | } |
| | | } |
| | | } |
| | | |
| | | }); |
| | | return R.ok(); |
| | | } |
| | | |
| | |
| | | int delete = comPbMemberDAO.deleteById(id); |
| | | if (delete > 0) { |
| | | // 维护用户表党员状态 |
| | | comPbMemberDAO.updateUserIsPartymember(comPbMemberDO.getIdCard()); |
| | | comPbMemberDAO.updateUserIsPartymember(comPbMemberDO.getPhone()); |
| | | // 删除缓存 |
| | | String userKey = UserConstants.LOGIN_USER_INFO + comPbMemberDO.getUserId(); |
| | | stringRedisTemplate.delete(userKey); |
| | |
| | | and cpcu.community_id = #{dto.communityId} |
| | | </if> |
| | | <if test="dto.keyWord != null and dto.keyWord != ''"> |
| | | and (cpcu.`name` like concat(#{dto.keyWord},'%') or |
| | | cpcu.`contacts` like concat(#{dto.keyWord},'%') or cpcu.phone like concat(#{dto.keyWord},'%')) |
| | | and cpcu.org_name like concat(#{dto.keyWord},'%') |
| | | </if> |
| | | <if test="dto.name != null and dto.name != ''"> |
| | | and cpcu.`name` like concat(#{dto.name},'%') |
| | | </if> |
| | | <if test="dto.contacts != null and dto.contacts != ''"> |
| | | and cpcu.`contacts` like concat(#{dto.contacts},'%') |
| | | </if> |
| | | </where> |
| | | order by cpcu.create_at desc |
| | |
| | | select |
| | | m.id, m.org_id, m.name, m.id_card, m.photo_path, m.join_time, m.employment_time, m.audit_result, m.create_at, m.update_at, |
| | | m.community_id, u.user_id, m.refuse_reason, m.phone, m.type, m.position, m.check_unit_id, m.function, m.specialty_category, |
| | | m.specialty_name, m.position_two, o.`name` orgName,cpcu.name as checkUnitName,t2.partyTime,t2.partyInterval, |
| | | canct.name as specialty_name, m.position_two, m.org_name,cpcu.name as checkUnitName,t2.partyTime,t2.partyInterval, |
| | | TIMESTAMPDIFF( |
| | | YEAR, |
| | | m.employment_time, |
| | |
| | | LEFT JOIN sys_user u ON m.id_card = u.id_card and u.type = 1 |
| | | LEFT JOIN com_pb_org o ON m.org_id = o.id |
| | | LEFT JOIN com_pb_check_unit as cpcu ON m.check_unit_id = cpcu.id |
| | | LEFT JOIN com_act_neighbor_circle_topic canct on m.specialty_category = canct.id |
| | | LEFT JOIN (select t1.user_id,sum(t.duration) as partyTime,sum(t.reward_integral) as partyInterval from com_act_activity t LEFT JOIN com_act_act_regist t1 on t.id = t1.activity_id where t.type = 3 |
| | | <if test="dto.startTime !=null"> |
| | | and t.begin_at between #{dto.startTime} and #{dto.endTime} |
| | |
| | | select |
| | | m.id, m.org_id, m.name, m.id_card, m.photo_path, m.join_time, m.employment_time, m.audit_result, m.create_at, m.update_at, |
| | | m.community_id, m.user_id, m.refuse_reason, m.phone, m.type, m.position, m.check_unit_id, m.function, m.specialty_category, |
| | | m.specialty_name, m.position_two, o.`name` orgName,cpcu.name as checkUnitName,t2.partyTime,t2.partyInterval, |
| | | canct.name as specialty_name, m.position_two, m.org_name,cpcu.name as checkUnitName,t2.partyTime,t2.partyInterval, |
| | | TIMESTAMPDIFF( |
| | | YEAR, |
| | | m.employment_time, |
| | |
| | | LEFT JOIN sys_user u ON m.id_card = u.id_card and u.type = 1 |
| | | LEFT JOIN com_pb_org o ON m.org_id = o.id |
| | | LEFT JOIN com_pb_check_unit as cpcu ON m.check_unit_id = cpcu.id |
| | | LEFT JOIN com_act_neighbor_circle_topic canct on m.specialty_category = canct.id |
| | | LEFT JOIN (select t1.user_id,sum(t.duration) as partyTime,sum(t.reward_integral) as partyInterval from com_act_activity t LEFT JOIN com_act_act_regist t1 on t.id = t1.activity_id where t.type = 3 |
| | | <if test="dto.startTime !=null"> |
| | | and t.begin_at between #{dto.startTime} and #{dto.endTime} |
| | |
| | | <if test="dto.name != null"> |
| | | and m.name like concat('%',#{dto.name},'%') |
| | | </if> |
| | | <if test="dto.communityId != null"> |
| | | and m.community_id =#{dto.communityId} |
| | | </if> |
| | | order by m.create_at desc |
| | | </select> |
| | | </mapper> |
| | |
| | | return userService.updateUserIsPartymember(idCard); |
| | | } |
| | | |
| | | @PostMapping("updateuserispartymemberByPhone") |
| | | public R updateUserIsPartymemberByPhone(@RequestParam("phone") String phone) { |
| | | return userService.updateUserIsPartymemberByPhone(phone); |
| | | } |
| | | |
| | | /** |
| | | * 修改用户为非党员状态 |
| | | * |
| | |
| | | R updateUserIsPartymember(String idCard); |
| | | |
| | | /** |
| | | * 修改用户的党员状态 |
| | | * |
| | | * @param phone |
| | | * 身份证号 |
| | | * @return 修改结果 |
| | | */ |
| | | R updateUserIsPartymemberByPhone(String phone); |
| | | |
| | | /** |
| | | * 修改用户为非党员状态 |
| | | * |
| | | * @param idCard |
| | |
| | | package com.panzhihua.service_user.service.impl; |
| | | |
| | | import java.util.ArrayList; |
| | | import java.util.Comparator; |
| | | import java.util.List; |
| | | import java.util.stream.Collectors; |
| | | |
| | |
| | | BeanUtils.copyProperties(sysMenuDO2,sysMenuVO2); |
| | | sysMenuVOList.add(sysMenuVO2); |
| | | }); |
| | | sysMenuVO1.setSysMenuVOList(sysMenuVOList); |
| | | sysMenuVO1.setSysMenuVOList(sysMenuVOList.stream().sorted(Comparator.comparing(SysMenuVO::getOrderNum)).collect(Collectors.toList())); |
| | | menuVOS.add(sysMenuVO1); |
| | | }); |
| | | sysMenuVO.setSysMenuVOList(menuVOS); |
| | | sysMenuVO.setSysMenuVOList(menuVOS.stream().sorted(Comparator.comparing(SysMenuVO::getOrderNum)).collect(Collectors.toList())); |
| | | sysMenuVOS.add(sysMenuVO); |
| | | }); |
| | | return R.ok(sysMenuVOS); |
| | | return R.ok(sysMenuVOS.stream().sorted(Comparator.comparing(SysMenuVO::getOrderNum)).collect(Collectors.toList())); |
| | | } |
| | | |
| | | /** |
| | |
| | | /** |
| | | * 修改用户的党员状态 |
| | | * |
| | | * @param phone |
| | | * 身份证号 |
| | | * @return 修改结果 |
| | | */ |
| | | @Override |
| | | public R updateUserIsPartymemberByPhone(String phone) { |
| | | SysUserDO sysUserDO = userDao.selectOne( |
| | | new QueryWrapper<SysUserDO>().lambda().eq(SysUserDO::getPhone, phone).eq(SysUserDO::getType, 1)); |
| | | if (sysUserDO != null) { |
| | | sysUserDO.setIsPartymember(1); |
| | | int updated = userDao.updateById(sysUserDO); |
| | | if (updated > 0) { |
| | | // 删除用户信息缓存 |
| | | String userKey = UserConstants.LOGIN_USER_INFO + sysUserDO.getUserId(); |
| | | stringRedisTemplate.delete(userKey); |
| | | } |
| | | log.info("新增党员修改用户党员状态成功 手机号【{}】", phone); |
| | | } |
| | | return R.ok(); |
| | | } |
| | | |
| | | /** |
| | | * 修改用户的党员状态 |
| | | * |
| | | * @param idCard |
| | | * 身份证号 |
| | | * @return 修改结果 |
| | |
| | | private final RouteLocator routeLocator; |
| | | |
| | | private String[] ids = |
| | | new String[] {"huacheng-appletsbackstage", "huacheng-applets", "huacheng-communitybackstage", "shopbackstage", "gridbackstage", "gridapp"}; |
| | | new String[] {"huacheng-appletsbackstage", "huacheng-applets", "huacheng-communitybackstage", "huacheng-shopbackstage", "huacheng-gridbackstage", "huacheng-gridapp"}; |
| | | |
| | | public SwaggerConfig(RouteLocator routeLocator) { |
| | | this.routeLocator = routeLocator; |