Merge branch 'zigonggao_dev' of http://gitlab.nhys.cdnhxx.com/root/zhihuishequ into zigonggao_dev
| | |
| | | |
| | | config.setUserType("2"); |
| | | |
| | | SysUser user=IUserService.selectData(null,config.getPhonenumber()); |
| | | SysUser user=IUserService.selectData(null,config.getPhonenumber(),null); |
| | | if (user != null) |
| | | { |
| | | user.setPassword(config.getPassword()); |
| | |
| | | config.setRoleIds(2+""); |
| | | config.setCreateTime(LocalDateTime.now()); |
| | | config.setUpdateTime(LocalDateTime.now()); |
| | | config.setUserId(Snowflake.getId()); |
| | | config.setUserId(Snowflake.getId()+""); |
| | | return toAjax(IUserService.insertConfig(config)); |
| | | } |
| | | |
| | |
| | | entity.setFromUserId(sysUser.getUserId()+""); |
| | | entity.setFromDepartmentalId(sysUser.getDepartmentId()); |
| | | entity.setGuideId(order.getId().toString()); |
| | | order=iGuideRepairOrderService.setTimeoutTim(order); |
| | | |
| | | iGuideEvolveService.insertConfig(entity); |
| | | iGuideRepairOrderService.updateSysUserOrderNum(entity); |
| | |
| | | @PostMapping("/update") |
| | | @Authorization |
| | | ResultData update(@RequestBody AutomessageSysSettings automessageSysSettings,@CurrentUser SysUser sysUser){ |
| | | automessageSysSettings.setUpdateUserId(sysUser.getUserId().intValue()); |
| | | automessageSysSettings.setUpdateUserId(sysUser.getUserId()); |
| | | automessageSysSettings.setUpdateTime(LocalDateTime.now()); |
| | | return sysSettingsService.update(automessageSysSettings); |
| | | } |
| | |
| | | } |
| | | |
| | | //本地表查询用户 |
| | | user = IUserService.selectData(huaChengSysUser.getUserId()+"",null); |
| | | user = IUserService.selectData(huaChengSysUser.getUserId()+"",null,null); |
| | | if (user == null) { |
| | | //本地没有此用户 新用户 |
| | | SysUser newSysUser=new SysUser(); |
| | |
| | | IUserService.insertConfig(newSysUser); |
| | | } |
| | | |
| | | user = IUserService.selectData(huaChengSysUser.getUserId()+"",null); |
| | | user = IUserService.selectData(huaChengSysUser.getUserId()+"",null,null); |
| | | |
| | | if (user == null) { |
| | | return ResultData.error("用户不存在!请联系管理员"); |
| | |
| | | map.put("userId", user.getUserId()); |
| | | map.put("userName", user.getUserName()); |
| | | map.put("permission", user.getPermission()); |
| | | map.put("userType", user.getUserType()); |
| | | map.put("departmentId", user.getDepartmentId()); |
| | | map.put("departmentName", user.getDepartmentName()); |
| | | |
| | | return ResultData.success(map); |
| | | } |
| | |
| | | map.put("userId", user.getUserId()); |
| | | map.put("userName", user.getUserName()); |
| | | map.put("permission", user.getPermission()); |
| | | map.put("userType", user.getUserType()); |
| | | map.put("departmentId", user.getDepartmentId()); |
| | | map.put("departmentName", user.getDepartmentName()); |
| | | |
| | | return ResultData.success(map); |
| | | } |
| | |
| | | return error("手机号不能为空"); |
| | | } |
| | | |
| | | SysUser user = IUserService.selectData("",config.getPhonenumber()); |
| | | SysUser user = IUserService.selectData("",config.getPhonenumber(),""); |
| | | SysUser user2 = IUserService.selectData("","",config.getLoginName()); |
| | | if (user != null) { |
| | | //提示用户名或密码错误 |
| | | return error("该账户已存在!"); |
| | | return error("该用户已存在!"); |
| | | } |
| | | |
| | | if(user2 != null) |
| | | { |
| | | //提示用户名或密码错误 |
| | | return error("该登录账户已存在!请修改登录账户"); |
| | | } |
| | | |
| | | config.setCreateBy(sysUser.getUserId()+""); |
| | | config.setUserId(Snowflake.getId()); |
| | | config.setUserId(Snowflake.getId()+""); |
| | | config.setUserType("3"); |
| | | |
| | | config.setCreateTime(LocalDateTime.now()); |
| | |
| | | return error("userId不能为空"); |
| | | } |
| | | |
| | | SysUser sysUser=IUserService.selectData(userId,null); |
| | | SysUser sysUser=IUserService.selectData(userId,null,null); |
| | | //删除标志(0代表存在 2代表删除) |
| | | sysUser.setDelFlag("2"); |
| | | return toAjax(IUserService.updateConfig(sysUser)); |
| | |
| | | return error("密码不能为空"); |
| | | } |
| | | |
| | | SysUser sysUser=IUserService.selectData(config.getUserId()+"",null); |
| | | SysUser sysUser=IUserService.selectData(config.getUserId()+"",null,null); |
| | | if(sysUser==null) |
| | | { |
| | | return error("用户不存在"); |
| | |
| | | * 修改人id |
| | | */ |
| | | @ApiModelProperty("修改人id") |
| | | private Integer updateUserId; |
| | | private String updateUserId; |
| | | |
| | | /** |
| | | * 小程序二维码 |
| | |
| | | /** |
| | | * 创建人id(及修改设置的人员) |
| | | */ |
| | | private Integer createUserId; |
| | | private String createUserId; |
| | | |
| | | |
| | | |
| | |
| | | * 用户id |
| | | */ |
| | | @ApiModelProperty("用户id") |
| | | private Long userId; |
| | | private String userId; |
| | | |
| | | /** |
| | | * 访问时间 |
| | |
| | | @ApiModelProperty(name = "userId", value = "主键用户id") |
| | | @JsonSerialize(using = ToStringSerializer.class) |
| | | @TableId(value = "user_id", type = IdType.AUTO) |
| | | private Long userId; |
| | | private String userId; |
| | | |
| | | /** |
| | | * 登录账户 |
| | |
| | | * 修改人 |
| | | */ |
| | | @ApiModelProperty("修改人") |
| | | private Long updateUserId; |
| | | private String updateUserId; |
| | | |
| | | /** |
| | | * 修改人 |
| | |
| | | */ |
| | | @ApiModelProperty("用户id") |
| | | @JsonSerialize(using = ToStringSerializer.class) |
| | | @JsonFormat(shape =JsonFormat.Shape.STRING ) |
| | | private Long userId; |
| | | private String userId; |
| | | |
| | | |
| | | /** |
| | |
| | | |
| | | |
| | | |
| | | SysUser selectData(@Param("userId") String userId,@Param("phonenumber") String phonenumber); |
| | | SysUser selectData(@Param("userId") String userId, |
| | | @Param("phonenumber") String phonenumber, |
| | | @Param("loginName") String loginName); |
| | | |
| | | |
| | | /** |
| | |
| | | request.setAttribute(Constant.CURRENT_USER_ID, manager.getHCUserId(HCtoken)); |
| | | System.out.println("花城用户id:"+manager.getHCUserId(HCtoken)); |
| | | HuaChengSysUser huaChengSysUser=iHuaChengSysUserService.selectData(manager.getHCUserId(HCtoken)+"","",""); |
| | | if(huaChengSysUser!=null && huaChengSysUser.getUserId()!=0 ) |
| | | if(huaChengSysUser!=null && !StringUtils.isEmpty(huaChengSysUser.getUserId()) ) |
| | | { |
| | | SysUser sysUser = IUserService.selectData(null,huaChengSysUser.getPhone()); |
| | | SysUser sysUser = IUserService.selectData(null,huaChengSysUser.getPhone(),null); |
| | | if(sysUser==null) |
| | | { |
| | | //本地没有此用户 新用户 |
| | |
| | | } |
| | | |
| | | @Override |
| | | public String createToken(long userId, long userRole) { |
| | | public String createToken(String userId, String userRole) { |
| | | //使用uuid作为源token |
| | | String uuid = UUID.randomUUID().toString().replace("-", ""); |
| | | String token = DigestUtils.sha1DigestAsHex(uuid + userId + "e23ktjsdf") + "-" + userRole; |
| | |
| | | } |
| | | |
| | | @Override |
| | | public String getTokenByUserId(long userId) { |
| | | return redis.boundValueOps(String.valueOf(userId)).get(); |
| | | public String getTokenByUserId(String userId) { |
| | | return redis.boundValueOps(userId).get(); |
| | | } |
| | | |
| | | } |
| | |
| | | * @param userId 指定用户的id |
| | | * @return 生成的token |
| | | */ |
| | | public String createToken(long userId, long role); |
| | | public String createToken(String userId, String role); |
| | | |
| | | /** |
| | | * 检查token是否有效 |
| | |
| | | |
| | | public void deleteToken(String token); |
| | | |
| | | public String getTokenByUserId(long userId); |
| | | public String getTokenByUserId(String userId); |
| | | } |
| | |
| | | Long currentUserId = (Long) webRequest.getAttribute(Constant.CURRENT_USER_ID, RequestAttributes.SCOPE_REQUEST); |
| | | if (currentUserId != null) { |
| | | //从数据库中查询并返回 |
| | | SysUser sysUser=userService.selectData(currentUserId+"",null); |
| | | SysUser sysUser=userService.selectData(currentUserId+"",null,null); |
| | | if(sysUser!=null) |
| | | { |
| | | return sysUser; |
| | |
| | | HuaChengSysUser huaChengSysUser=iHuaChengSysUserService.selectData(currentUserId+"","",""); |
| | | if(huaChengSysUser!=null) |
| | | { |
| | | sysUser=userService.selectData(null,huaChengSysUser.getPhone()); |
| | | sysUser=userService.selectData(null,huaChengSysUser.getPhone(),null); |
| | | if(sysUser!=null) |
| | | { |
| | | return sysUser; |
| | |
| | | public List<SysUser> selectConfigList(IPage<SysUser> page, Integer state,String userType,String userName); |
| | | |
| | | |
| | | SysUser selectData(String userId,String phonenumber); |
| | | SysUser selectData(String userId,String phonenumber,String loginName); |
| | | |
| | | /** |
| | | * 新增聊天记录 |
| | |
| | | if(huaChengSysUser==null) |
| | | { |
| | | SysUser newUser = new SysUser(); |
| | | newUser.setUserId(Snowflake.getId()); |
| | | newUser.setUserId(Snowflake.getId()+""); |
| | | newUser.setLoginName(phonenumber); |
| | | newUser.setUserName(phonenumber.substring(0,3)+"xxxx"+phonenumber.substring(7,11)+"用户"); |
| | | newUser.setUserType("3"); |
| | |
| | | else |
| | | { |
| | | SysUser newUser = new SysUser(); |
| | | newUser.setUserId(huaChengSysUser.getUserId()); |
| | | newUser.setUserId(huaChengSysUser.getUserId()+""); |
| | | newUser.setLoginName(huaChengSysUser.getPhone()); |
| | | newUser.setUserName(huaChengSysUser.getNickName()); |
| | | newUser.setUserType("3"); |
| | |
| | | SysUser newUser = new SysUser(); |
| | | if(huaChengSysUser==null) |
| | | { |
| | | newUser.setUserId(Snowflake.getId()); |
| | | newUser.setUserId(Snowflake.getId()+""); |
| | | newUser.setLoginName(phonenumber); |
| | | newUser.setUserName(phonenumber.substring(0,3)+"xxxx"+phonenumber.substring(7,11)+"用户"); |
| | | newUser.setUserType("3"); |
| | |
| | | } |
| | | |
| | | @Override |
| | | public SysUser selectData(String userId,String phonenumber) { |
| | | return baseMapper.selectData(userId,phonenumber); |
| | | public SysUser selectData(String userId,String phonenumber,String loginName) { |
| | | return baseMapper.selectData(userId,phonenumber,loginName); |
| | | } |
| | | |
| | | |
| | |
| | | <include refid="selectSysUserVo"/> |
| | | <where> |
| | | <if test="userId!=null and userId!='' "> |
| | | user_id= #{userId} |
| | | AND user_id= #{userId} |
| | | </if> |
| | | |
| | | <if test="phonenumber!=null and phonenumber!='' "> |
| | | phonenumber= #{phonenumber} |
| | | AND phonenumber= #{phonenumber} |
| | | </if> |
| | | |
| | | <if test="loginName!=null and loginName!='' "> |
| | | AND login_name= #{loginName} |
| | | </if> |
| | | |
| | | </where> |
| | |
| | | pageProjectDTO.setUserId(this.getUserId()); |
| | | return communityService.pageProjectWhichIsSignedByUser(pageProjectDTO); |
| | | } |
| | | |
| | | @ApiOperation("获取用户") |
| | | @GetMapping("selectAutomessageSysUserById") |
| | | public R selectAutomessageSysUserById(@RequestParam("id")Long id){ |
| | | return communityService.selectAutomessageSysUserById(id); |
| | | } |
| | | } |
| | |
| | | package com.panzhihua.applets_backstage.api; |
| | | |
| | | import javax.annotation.Resource; |
| | | |
| | | import com.panzhihua.common.utlis.StringUtils; |
| | | import org.springframework.data.redis.core.StringRedisTemplate; |
| | | import org.springframework.validation.annotation.Validated; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import com.panzhihua.common.controller.BaseController; |
| | | import com.panzhihua.common.interfaces.OperLog; |
| | | import com.panzhihua.common.model.vos.LoginUserInfoVO; |
| | |
| | | import com.panzhihua.common.model.vos.user.ChangePasswordVO; |
| | | import com.panzhihua.common.model.vos.user.SysMenuVO; |
| | | import com.panzhihua.common.service.user.UserService; |
| | | |
| | | import com.panzhihua.common.utlis.StringUtils; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.springframework.data.redis.core.StringRedisTemplate; |
| | | import org.springframework.validation.annotation.Validated; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import javax.annotation.Resource; |
| | | |
| | | /** |
| | | * @program: springcloud_k8s_panzhihuazhihuishequ |
| | |
| | | } |
| | | return R.ok(); |
| | | } |
| | | |
| | | |
| | | } |
| | |
| | | package com.panzhihua.common.model.dtos.common; |
| | | |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import org.springframework.format.annotation.DateTimeFormat; |
| | |
| | | @ApiModelProperty("单位性质") |
| | | private String natureName; |
| | | |
| | | @ApiModelProperty(value = "社区id集合") |
| | | private List<Long> communityIds; |
| | | |
| | | |
| | | } |
| | | |
| | |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * @title: PagePbCheckUnitCommonDto |
| | | * @projectName: 成都呐喊信息技术有限公司-智慧社区项目 |
| | |
| | | |
| | | @ApiModelProperty("单位性质") |
| | | private String natureName; |
| | | |
| | | |
| | | @ApiModelProperty(value = "社区id集合") |
| | | private List<Long> communityIds; |
| | | } |
| | | |
| | |
| | | package com.panzhihua.common.model.dtos.neighbor; |
| | | |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | |
| | |
| | | private Long topicId; |
| | | |
| | | private Integer solveStatus; |
| | | |
| | | @ApiModelProperty(value = "社区id集合", hidden = true) |
| | | private List<Long> communityIds; |
| | | } |
| | |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * @auther lyq |
| | | * @create 2021-04-14 15:02:14 |
| | |
| | | |
| | | @ApiModelProperty(value = "单位id", hidden = true) |
| | | private Long checkUnitId; |
| | | |
| | | @ApiModelProperty(value = "社区id集合", hidden = true) |
| | | private List<Long> communityIds; |
| | | /** |
| | | * 使用类型(1.邻里圈 2.问题清单 3.需求清单) |
| | | */ |
New file |
| | |
| | | package com.panzhihua.common.model.vos; |
| | | |
| | | import lombok.Data; |
| | | |
| | | import java.util.Date; |
| | | |
| | | @Data |
| | | public class SanShuoMessageVO { |
| | | private String touser; |
| | | private String thing5; |
| | | private String thing1; |
| | | private String thing2; |
| | | private String time3; |
| | | |
| | | |
| | | |
| | | } |
| | |
| | | import lombok.Data; |
| | | |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * @program: springcloud_k8s_panzhihuazhihuishequ |
| | |
| | | @ApiModelProperty(value = "社区id", hidden = true) |
| | | private Long communityId; |
| | | |
| | | @ApiModelProperty(value = "社区id", hidden = true) |
| | | private List<Long> communityIds; |
| | | |
| | | @ApiModelProperty(value = "关键词") |
| | | private String keyWord; |
| | | |
| | |
| | | R westList(); |
| | | |
| | | @GetMapping("/sanshuo/expert/backstageList2") |
| | | R expertBackStageList(@RequestParam(value = "level",required = false)Integer level); |
| | | R expertBackStageList(@RequestParam(value = "level",required = false)Integer level,@RequestParam(value = "page",required = false)Integer page, |
| | | @RequestParam(value = "size",required = false)Integer size); |
| | | |
| | | /** |
| | | * 查询社区id集合 |
| | | * @param id |
| | | * @return |
| | | */ |
| | | @GetMapping("selectCommunityIds") |
| | | R selectCommunityIds(@RequestParam("id") Long id); |
| | | |
| | | /** |
| | | * 查询社区id集合 |
| | | * @param id |
| | | * @return |
| | | */ |
| | | @GetMapping("selectAutomessageSysUserById") |
| | | R selectAutomessageSysUserById(@RequestParam("id") Long id); |
| | | } |
| | |
| | | return communityService.westList(); |
| | | } |
| | | @GetMapping("/expert/backstageList") |
| | | public R expertBackStageList(@RequestParam(value = "level",required = false)Integer level){ |
| | | return communityService.expertBackStageList(level); |
| | | public R expertBackStageList(@RequestParam(value = "level",required = false)Integer level, |
| | | @RequestParam(value = "page",required = false)Integer page, |
| | | @RequestParam(value = "size",required = false)Integer size){ |
| | | return communityService.expertBackStageList(level,page,size); |
| | | } |
| | | } |
| | |
| | | } |
| | | |
| | | @GetMapping("/expert/backstageList") |
| | | public R expertBackStageList(@RequestParam(value = "level",required = false)Integer level){ |
| | | return communityService.expertBackStageList(level); |
| | | public R expertBackStageList(@RequestParam(value = "level",required = false)Integer level, |
| | | @RequestParam(value = "page",required = false)Integer page, |
| | | @RequestParam(value = "size",required = false)Integer size){ |
| | | return communityService.expertBackStageList(level,page,size); |
| | | } |
| | | |
| | | |
| | |
| | | * 后台获取专家列表 |
| | | * */ |
| | | @GetMapping("/backstageList2") |
| | | public R backstageList(@RequestParam(value = "level",required = false)Integer level){ |
| | | return comSanShuoExpertService.backstageList(level,getLoginUserInfo()); |
| | | public R backstageList(@RequestParam(value = "level",required = false)Integer level, |
| | | @RequestParam(value = "page",required = false)Integer page, |
| | | @RequestParam(value = "size",required = false)Integer size){ |
| | | return comSanShuoExpertService.backstageList(level,getLoginUserInfo(),page,size); |
| | | } |
| | | |
| | | |
| | |
| | | private ComActActivityInviteService comActActivityInviteService; |
| | | @Resource |
| | | private RabbitTemplate rabbitTemplate; |
| | | @Resource |
| | | private AutomessageSysUserService automessageSysUserService; |
| | | |
| | | /** |
| | | * 新增社区活动 |
| | |
| | | public R activityInviteDelete(@RequestParam("id") Long id) { |
| | | return comActActivityInviteService.activityInviteDelete(id); |
| | | } |
| | | |
| | | /** |
| | | * 根据id查询重复的社区id集合 |
| | | * @param id |
| | | * @return |
| | | */ |
| | | @GetMapping("selectCommunityIds") |
| | | public R selectCommunityIds(@RequestParam("id") Long id){ |
| | | return comActService.selectIds(id); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 通过id查询用户 |
| | | * @param id |
| | | * @return |
| | | */ |
| | | @GetMapping("selectAutomessageSysUserById") |
| | | public R selectAutomessageSysUserById(@RequestParam("id") Long id){ |
| | | return automessageSysUserService.selectAutomessageSysUserById(id); |
| | | } |
| | | } |
New file |
| | |
| | | package com.panzhihua.service_community.dao; |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.panzhihua.service_community.entity.AutomessageSysUser; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | import org.apache.ibatis.annotations.Param; |
| | | import org.apache.ibatis.annotations.Select; |
| | | |
| | | /** |
| | | * 用户表 后台用户+小程序用户(SysUser)表数据库访问层 |
| | | * projectName 成都呐喊信息技术有限公司-智慧社区项目 |
| | | * description: 用户表 后台用户+小程序用户相关功能 |
| | | * |
| | | * @author yh |
| | | * @since 2022-10-21 09:36:09 |
| | | */ |
| | | @Mapper |
| | | public interface AutomessageSysUserDao extends BaseMapper<AutomessageSysUser> { |
| | | |
| | | |
| | | /** |
| | | * 通过id查询 |
| | | * @param id |
| | | * @return |
| | | */ |
| | | @Select("select * from automessage_sys_user where user_id = #{id}") |
| | | AutomessageSysUser selectAutomessageSysUserById(@Param("id") Long id); |
| | | |
| | | } |
| | |
| | | |
| | | @Select("select community_id from com_act where street_id=#{id}") |
| | | List<Long> selectCommunityByStreetId(Long id); |
| | | @Select("SELECT caa.community_id FROM com_act caa WHERE caa.`name` = ( select ca.`name` FROM com_act ca WHERE ca.community_id =#{id})") |
| | | List<Long> selectIds(@Param("id") Long id); |
| | | |
| | | } |
| | |
| | | * */ |
| | | Integer selectExpertCount(@Param("dto") IndexDateDTO indexDataDTO); |
| | | |
| | | List<ExpertShowVO> selectExpertVoList(Integer level); |
| | | Integer selectExpertVoList(); |
| | | |
| | | IPage<ComSanshuoExpertVO> expertList(Page page, @Param("level") Integer level, @Param("id") Long id); |
| | | } |
| | | |
| | | |
New file |
| | |
| | | package com.panzhihua.service_community.entity; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | | import com.baomidou.mybatisplus.annotation.TableField; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import com.fasterxml.jackson.databind.annotation.JsonSerialize; |
| | | import com.fasterxml.jackson.databind.ser.std.ToStringSerializer; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | import java.io.Serializable; |
| | | import java.time.LocalDateTime; |
| | | |
| | | /** |
| | | * <p> |
| | | * 用户信息表 |
| | | * </p> |
| | | * |
| | | * @author xiang |
| | | * @since 2022-07-05 |
| | | */ |
| | | @ApiModel("用户信息实体类") |
| | | @Data |
| | | @TableName("automessage_sys_user") |
| | | public class AutomessageSysUser implements Serializable { |
| | | |
| | | private static final long serialVersionUID = 1L; |
| | | /** |
| | | * 主键id |
| | | */ |
| | | @ApiModelProperty("主键id") |
| | | @JsonSerialize(using = ToStringSerializer.class) |
| | | @TableId(value = "id", type = IdType.AUTO) |
| | | private Long id; |
| | | |
| | | |
| | | /** |
| | | * 用户id |
| | | */ |
| | | @ApiModelProperty("用户id") |
| | | @JsonSerialize(using = ToStringSerializer.class) |
| | | private Long userId; |
| | | |
| | | |
| | | /** |
| | | * 登录账号 |
| | | */ |
| | | @ApiModelProperty("登录账号") |
| | | private String loginName; |
| | | |
| | | /** |
| | | * 用户昵称 |
| | | */ |
| | | @ApiModelProperty("用户昵称") |
| | | private String userName; |
| | | |
| | | /** |
| | | * 用户类型(1系统后台用户 2导办人员用户) |
| | | */ |
| | | @ApiModelProperty("用户类型(1系统后台用户 2导办人员用户)") |
| | | private String userType; |
| | | |
| | | |
| | | /** |
| | | * 手机号码 |
| | | */ |
| | | @ApiModelProperty("手机号码") |
| | | private String phonenumber; |
| | | |
| | | /** |
| | | * 性别 1 男 2 女 |
| | | */ |
| | | @ApiModelProperty("性别 1 男 2 女") |
| | | private String sex; |
| | | |
| | | /** |
| | | * 头像路径 |
| | | */ |
| | | @ApiModelProperty("头像路径") |
| | | private String avatar; |
| | | |
| | | /** |
| | | * 密码 |
| | | */ |
| | | @ApiModelProperty("密码") |
| | | private String password; |
| | | |
| | | /** |
| | | * 盐加密 |
| | | */ |
| | | @ApiModelProperty("加密") |
| | | private String salt; |
| | | |
| | | /** |
| | | * 帐号状态(0正常 1停用) |
| | | */ |
| | | @ApiModelProperty("帐号状态(0正常 1停用)") |
| | | private String status; |
| | | |
| | | /** |
| | | * 删除标志(0代表存在 2代表删除) |
| | | */ |
| | | @ApiModelProperty("删除标志(0代表存在 2代表删除)") |
| | | private String delFlag; |
| | | |
| | | /** |
| | | * 最后登录IP |
| | | */ |
| | | @ApiModelProperty("最后登录IP") |
| | | private String loginIp; |
| | | |
| | | /** |
| | | * 最后登录时间 |
| | | */ |
| | | @ApiModelProperty("最后登录时间") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | private LocalDateTime loginDate; |
| | | |
| | | /** |
| | | * 密码最后更新时间 |
| | | */ |
| | | @ApiModelProperty("密码最后更新时间") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | private LocalDateTime pwdUpdateDate; |
| | | |
| | | /** |
| | | * 创建者 |
| | | */ |
| | | @ApiModelProperty("创建者") |
| | | private String createBy; |
| | | |
| | | /** |
| | | * 创建时间 |
| | | */ |
| | | @ApiModelProperty("创建时间") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | private LocalDateTime createTime; |
| | | |
| | | /** |
| | | * 更新者 |
| | | */ |
| | | @ApiModelProperty("更新者") |
| | | private String updateBy; |
| | | |
| | | /** |
| | | * 更新时间 |
| | | */ |
| | | @ApiModelProperty("更新时间") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | private LocalDateTime updateTime; |
| | | |
| | | /** |
| | | * 备注 |
| | | */ |
| | | @ApiModelProperty("备注") |
| | | private String remark; |
| | | |
| | | /** |
| | | * 角色ids |
| | | */ |
| | | @ApiModelProperty("角色id") |
| | | private String roleIds; |
| | | |
| | | /** |
| | | * 数据权限 |
| | | */ |
| | | @ApiModelProperty("数据权限") |
| | | private String dataPermission; |
| | | |
| | | /** |
| | | * 部门id |
| | | */ |
| | | @ApiModelProperty("部门id") |
| | | private String departmentId; |
| | | |
| | | |
| | | /** |
| | | * 一级id |
| | | */ |
| | | @ApiModelProperty("一级id") |
| | | private String stairId; |
| | | |
| | | /** |
| | | * 二级id |
| | | */ |
| | | @ApiModelProperty("二级id") |
| | | private String secondLevelId; |
| | | |
| | | /** |
| | | * 所属部门名称 |
| | | */ |
| | | @ApiModelProperty("所属部门名称") |
| | | private String departmentName; |
| | | |
| | | /** |
| | | * 部门所属区域 |
| | | */ |
| | | @ApiModelProperty("部门所属区域") |
| | | private String departmentArea; |
| | | |
| | | /** |
| | | * 空闲状态(0 空闲 1 忙碌) |
| | | */ |
| | | @ApiModelProperty("空闲状态(0 空闲 1 忙碌)") |
| | | private String leisureState; |
| | | |
| | | /** |
| | | * 擅长办理事务ids |
| | | */ |
| | | @ApiModelProperty("擅长办理事务ids") |
| | | private String masterIds; |
| | | |
| | | /** |
| | | * 擅长事务名称 |
| | | */ |
| | | @ApiModelProperty("擅长事务名称") |
| | | private String masterNames; |
| | | |
| | | /** |
| | | * 办结事项ids |
| | | */ |
| | | @ApiModelProperty("办结事项ids") |
| | | private String transactionIds; |
| | | |
| | | /** |
| | | * 办结事项名称 |
| | | */ |
| | | @ApiModelProperty("办结事项名称") |
| | | private String transactionNames; |
| | | |
| | | /** |
| | | * 微信小程序id |
| | | */ |
| | | @ApiModelProperty("微信小程序id") |
| | | private String openid; |
| | | |
| | | /** |
| | | * 待处理办事指南数量 |
| | | */ |
| | | @ApiModelProperty("待处理办事指南数量") |
| | | private Integer transactionNum; |
| | | |
| | | |
| | | @TableField(exist = false) |
| | | @ApiModelProperty("权限资格") |
| | | private String permission; |
| | | |
| | | @TableField(exist = false) |
| | | @ApiModelProperty("角色名称") |
| | | private String roleName; |
| | | |
| | | |
| | | @TableField(exist = false) |
| | | @ApiModelProperty("创建人名称") |
| | | private String createName; |
| | | |
| | | @ApiModelProperty("是否是部门领导(1是 2不是)") |
| | | private String isDivisionHead; |
| | | |
| | | } |
| | |
| | | private List<ComEventRequestImageVO> images; |
| | | @ApiModelProperty("上报等级,4专家上报到社区,3专家到行业分中心2社区上报到街道,1街道上报到三说会堂,5行业分中心上报到区三说会堂") |
| | | private Integer reportLevel; |
| | | private String content; |
| | | } |
| | |
| | | WxXCXTempSend wxXCXTempSend=new WxXCXTempSend(); |
| | | for(String openId:openIds){ |
| | | try { |
| | | WxUtil.sendLongTimeTemplate(openId,wxXCXTempSend.getAccessToken("wx118de8a734d269f0"),"疫情快讯",comActDynVO.getTitle().length()>10?comActDynVO.getTitle().substring(0,10)+"..":comActDynVO.getTitle(),"/pages/community_child/community/detail?id="+comActDynVO.getId()+"&title=疫情快讯详情"); |
| | | WxUtil.sendLongTimeTemplate(openId,wxXCXTempSend.getXQAppAccessToken(),"疫情快讯",comActDynVO.getTitle().length()>10?comActDynVO.getTitle().substring(0,10)+"..":comActDynVO.getTitle(),"/pages/community_child/community/detail?id="+comActDynVO.getId()+"&title=疫情快讯详情"); |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | | } |
New file |
| | |
| | | package com.panzhihua.service_community.service; |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.panzhihua.common.model.vos.R; |
| | | import com.panzhihua.service_community.entity.AutomessageSysUser; |
| | | |
| | | /** |
| | | * @ClassName: AutomessageSysUserService |
| | | * @Author: yh |
| | | * @Date: 2022/10/21 9:38 |
| | | * @Description: TODO |
| | | */ |
| | | public interface AutomessageSysUserService extends IService<AutomessageSysUser> { |
| | | |
| | | /** |
| | | * 通过id查询 |
| | | * @param id |
| | | * @return |
| | | */ |
| | | R selectAutomessageSysUserById(Long id); |
| | | } |
| | |
| | | R communitySwitchSearchDistanceList(SearchCommunityDTO communityDTO); |
| | | |
| | | R getCommunityPassword(Long communityId); |
| | | |
| | | R selectIds(Long id); |
| | | } |
| | |
| | | /** |
| | | * 新增专家后台列表 |
| | | * */ |
| | | R backstageList(Integer level,LoginUserInfoVO loginUserInfoVO); |
| | | R backstageList(Integer level,LoginUserInfoVO loginUserInfoVO,Integer page,Integer size); |
| | | } |
New file |
| | |
| | | package com.panzhihua.service_community.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.panzhihua.common.model.vos.R; |
| | | import com.panzhihua.service_community.dao.AutomessageSysUserDao; |
| | | import com.panzhihua.service_community.entity.AutomessageSysUser; |
| | | import com.panzhihua.service_community.service.AutomessageSysUserService; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import javax.annotation.Resource; |
| | | |
| | | /** |
| | | * @ClassName: AutomessageSysUserServiceImpl |
| | | * @Author: yh |
| | | * @Date: 2022/10/21 9:39 |
| | | * @Description: |
| | | */ |
| | | @Service |
| | | public class AutomessageSysUserServiceImpl extends ServiceImpl<AutomessageSysUserDao, AutomessageSysUser> |
| | | implements AutomessageSysUserService { |
| | | @Resource |
| | | private AutomessageSysUserDao automessageSysUserDao; |
| | | @Override |
| | | public R selectAutomessageSysUserById(Long id) { |
| | | return R.ok(automessageSysUserDao.selectAutomessageSysUserById(id)); |
| | | } |
| | | } |
| | |
| | | |
| | | import cn.hutool.core.collection.ListUtil; |
| | | import cn.hutool.core.util.PageUtil; |
| | | import cn.hutool.core.collection.CollUtil; |
| | | import cn.hutool.core.collection.ListUtil; |
| | | import cn.hutool.core.util.PageUtil; |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | |
| | | // } |
| | | // } |
| | | // } |
| | | Long communityId = neighborCircleAppDTO.getCommunityId(); |
| | | List<Long> communityIds = comActDAO.selectIds(communityId); |
| | | if (CollUtil.isEmpty(communityIds)) { |
| | | communityIds = new ArrayList<>(); |
| | | communityIds.add(communityId); |
| | | } |
| | | neighborCircleAppDTO.setCommunityIds(communityIds); |
| | | Page userPage = new Page(neighborCircleAppDTO.getPageNum(), neighborCircleAppDTO.getPageSize()); |
| | | IPage<ComActNeighborCircleAppVO> doPager = this.baseMapper.pageNeighborByApp(userPage, neighborCircleAppDTO); |
| | | if (!doPager.getRecords().isEmpty()) { |
| | |
| | | |
| | | @Override |
| | | public R pageNeighborByAdmin(ComActNeighborCircleAdminDTO neighborCircleAdminDTO) { |
| | | Long communityId = neighborCircleAdminDTO.getCommunityId(); |
| | | List<Long> communityIds = comActDAO.selectIds(communityId); |
| | | if (CollUtil.isEmpty(communityIds)) { |
| | | communityIds = new ArrayList<>(); |
| | | communityIds.add(communityId); |
| | | } |
| | | neighborCircleAdminDTO.setCommunityIds(communityIds); |
| | | |
| | | Page page = new Page(neighborCircleAdminDTO.getPageNum(), neighborCircleAdminDTO.getPageSize()); |
| | | IPage<ComActNeighborCircleAdminVO> doPager = this.baseMapper.pageNeighborByAdmin(page, neighborCircleAdminDTO); |
| | | doPager.getRecords().forEach(data -> { |
| | |
| | | return R.ok(comActPasswordVo); |
| | | } |
| | | |
| | | public R selectIds(Long id){ |
| | | return R.ok(this.comActDAO.selectIds(id)); |
| | | } |
| | | } |
| | |
| | | import com.panzhihua.common.model.dtos.community.sanshuo.IndexDateDTO; |
| | | import com.panzhihua.common.model.vos.LoginUserInfoVO; |
| | | import com.panzhihua.common.model.vos.R; |
| | | import com.panzhihua.common.model.vos.SanShuoMessageVO; |
| | | import com.panzhihua.common.model.vos.community.switchs.CommunitySwitchAllAppletsVO; |
| | | import com.panzhihua.common.model.vos.sanshuo.*; |
| | | import com.panzhihua.common.service.user.UserService; |
| | |
| | | import com.panzhihua.common.utlis.Snowflake; |
| | | import com.panzhihua.common.utlis.StringUtils; |
| | | import com.panzhihua.service_community.api.ComSanShuoEventTransferRecordController; |
| | | import com.panzhihua.service_community.dao.ComActDAO; |
| | | import com.panzhihua.service_community.dao.ComEventMapper; |
| | | import com.panzhihua.service_community.dao.ComSanshuoExpertDao; |
| | | import com.panzhihua.service_community.dao.ComStreetDAO; |
| | | import com.panzhihua.service_community.dao.*; |
| | | import com.panzhihua.service_community.entity.*; |
| | | import com.panzhihua.service_community.model.dos.ComActDO; |
| | | import com.panzhihua.service_community.model.dos.ComStreetDO; |
| | | import com.panzhihua.service_community.service.*; |
| | | import com.panzhihua.service_community.util.WXMessageUtil; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.apache.commons.lang3.RandomUtils; |
| | | import org.checkerframework.checker.units.qual.A; |
| | |
| | | |
| | | @Resource |
| | | private ComSanshuoExpertDao comSanshuoExpertDao; |
| | | |
| | | @Resource |
| | | private SysUserDao sysUserDao; |
| | | |
| | | |
| | | @Override |
| | |
| | | comEvent.setEventProcessStatus(2); |
| | | comEvent.setSolve(0); |
| | | comEvent.setDistribution(0); |
| | | comEvent.setChangeExpert(0); |
| | | //comEvent.setChangeExpert(0); |
| | | comEvent.setArchive(0); |
| | | } |
| | | else if (comEvent.getEventProcessStatus().equals(6) && comEvent.getEventSucceed().equals(2)){ |
| | | //调解完成,可以归档,查看 |
| | |
| | | comEvent.setDistribution(0); |
| | | comEvent.setChangeExpert(0); |
| | | } |
| | | }else{ |
| | | }else if (comEvent.getCurrentProcessType().equals(5)){ |
| | | //根据事件状态决定权限 |
| | | if (comEvent.getEventProcessStatus().equals(1) ){ |
| | | //待受理和待验证状态,可以受理,分配专家 |
| | | //关闭调解和归档 |
| | | comEvent.setArchive(0); |
| | | comEvent.setConciliation(0); |
| | | comEvent.setChangeExpert(0); |
| | | } else if(comEvent.getEventProcessStatus().equals(2)){ |
| | | //待分配和待验证状态,可以受理,分配专家 |
| | | //关闭调解和归档 |
| | | comEvent.setArchive(0); |
| | | //comEvent.setConciliation(0); |
| | | comEvent.setChangeExpert(0); |
| | | if (comEvent.getSpecialistName().equals("待分配")){ |
| | | comEvent.setSolve(0); |
| | | } |
| | | } |
| | | else if (comEvent.getEventProcessStatus().equals(5)){ |
| | | //调解中,可以查看,调解,更换专家,删除 |
| | | comEvent.setDistribution(0); |
| | | comEvent.setSolve(0); |
| | | comEvent.setArchive(0); |
| | | }else if (comEvent.getEventProcessStatus().equals(6) && comEvent.getEventResult().equals(2) && comEvent.getEventSucceed().equals(2)){ |
| | | //调解完成并且成功,可以归档,查看 |
| | | comEvent.setSolve(0); |
| | | comEvent.setDistribution(0); |
| | | comEvent.setChangeExpert(0); |
| | | comEvent.setConciliation(0); |
| | | } |
| | | else if (comEvent.getEventProcessStatus().equals(6) && comEvent.getEventSucceed().equals(2)){ |
| | | //调解完成,可以归档,查看 |
| | | comEvent.setSolve(0); |
| | | comEvent.setDistribution(0); |
| | | comEvent.setChangeExpert(0); |
| | | comEvent.setConciliation(0); |
| | | } |
| | | } |
| | | else{ |
| | | //未上上报到行业分中心,或者已上报到区三说会堂,仅查看 |
| | | comEvent.setArchive(0); |
| | | comEvent.setSolve(0); |
| | | comEvent.setDistribution(0); |
| | | comEvent.setChangeExpert(0); |
| | | //comEvent.setConciliation(0); |
| | | } |
| | | }else if (userType.equals(5) || isStreet){ |
| | | //街道权限,操作街道下属社区的所有事件 |
| | |
| | | comEvent.setCurrentOrgId(center.getId().toString()); |
| | | comEvent.setCurrentProcessType(5); |
| | | } |
| | | if (nonNull(comEvent.getCenterId())){ |
| | | comEvent.setRequestUserCommunity(null); |
| | | } |
| | | comEvent.setUserEventStatus(2); |
| | | //设置为未上报 |
| | | comEvent.setReportLevel(0); |
| | |
| | | comEvent.setUpdateBy(comEvent.getRequestUserId()); |
| | | comEvent.setUpdateAt(new Date()); |
| | | boolean flag = save(comEvent); |
| | | //推送消息到专家微信 |
| | | sendMessage(comEvent.getSpecialistId(),comEvent); |
| | | //添加一条对应记录 |
| | | comEventMapper.insertEventAndExpertRecord(comEvent.getId(),expert.getId(),0); |
| | | if (!flag) { |
| | |
| | | //提交不视为一次流转记录,不保存图片 |
| | | saveEventImageList(comEvent.getImages(), comEvent.getId(),null,1); |
| | | return R.ok(ReturnMsgConstants.SAVE_SUCCESS); |
| | | } |
| | | |
| | | |
| | | public void sendMessage(Long expertId,ComEvent comEvent){ |
| | | //获取专家的openId |
| | | ComSanshuoExpert expert = comSanShuoExpertService.getById(expertId); |
| | | SysUser sysUser = sysUserDao.selectOne(new QueryWrapper<SysUser>().lambda().eq(SysUser::getPhone, expert.getPhone()).eq(SysUser::getType, 1)); |
| | | SanShuoMessageVO vo=new SanShuoMessageVO(); |
| | | if (nonNull(sysUser)){ |
| | | if (isNull(sysUser.getOpenid())){ |
| | | log.info("专家未登陆APP,无法推送"); |
| | | return; |
| | | } |
| | | } |
| | | vo.setTouser(sysUser.getOpenid()); |
| | | vo.setThing1(commediateTypeService.getById(comEvent.getEventCategory()).getName()); |
| | | vo.setThing5("您有一个新的调解事件需处理"); |
| | | vo.setThing2(comEvent.getRequestUserName()); |
| | | vo.setTime3(DateUtil.now()); |
| | | WXMessageUtil.sendStatusMessage(vo); |
| | | } |
| | | |
| | | @Transactional(rollbackFor = Exception.class) |
| | |
| | | ComActDO comActDO = comActDAO.selectById(expert.getCommunityId()); |
| | | comEvent.setCurrentOrgId(comActDO.getStreetId().toString()); |
| | | //生成一次流转记录 |
| | | comEvent.setCurrentEventProcessResult("专家上报到社区"); |
| | | comEvent.setCurrentEventProcessResult("(专家上报到"+comActDO.getName()+")"+comEventConciliationVO.getCurrentEventProcessResult()); |
| | | //更改当前处理部门 |
| | | comEvent.setCurrentOrgName(comActDO.getName()+"调解站"); |
| | | comEventTransferRecord.setFromId(comEvent.getSpecialistId()); |
| | |
| | | comEvent.setSpecialistName("待分配"); |
| | | comEvent.setSpecialistId(99999L); |
| | | //生成一次流转记录 |
| | | comEvent.setCurrentEventProcessResult("专家上报到行业分中心"); |
| | | ComSanshuoIndustryCenter center = comSanShuoIndustryCenterService.getById(comEvent.getCurrentOrgId()); |
| | | comEvent.setCurrentEventProcessResult("(专家上报到"+center.getName()+")"+comEventConciliationVO.getCurrentEventProcessResult()); |
| | | comEvent.setCurrentOrgName(expert.getUnit()); |
| | | comEventTransferRecord.setFromId(comEvent.getSpecialistId()); |
| | | comEventTransferRecord.setToId(expert.getIndustryCenterId()); |
| | |
| | | comEvent.setCurrentOrgId("99999"); |
| | | //生成一次流转记录 |
| | | comEvent.setReportHall(1); |
| | | comEvent.setCurrentEventProcessResult("行业分中心上报到区三说会堂"); |
| | | comEvent.setCurrentEventProcessResult("(行业分中心上报到区三说会堂中心)"+comEventConciliationVO.getCurrentEventProcessResult()); |
| | | comEvent.setCurrentOrgName("区三说会堂"); |
| | | comEventTransferRecord.setFromId(comEvent.getSpecialistId()); |
| | | comEventTransferRecord.setToId(99999L); |
| | |
| | | ComActDO comActDO = comActDAO.selectOne(new QueryWrapper<ComActDO>().lambda().eq(ComActDO::getCommunityId, comEvent.getRequestUserCommunity()).eq(ComActDO::getAppId, "wx0cef797390444b75")); |
| | | comEvent.setCurrentOrgId(comActDO.getStreetId().toString()); |
| | | //生成一次流转记录 |
| | | comEvent.setCurrentEventProcessResult("社区报到街道"); |
| | | comEvent.setCurrentEventProcessResult("(社区上报到"+comStreetDAO.selectById(comActDO.getStreetId()).getName()+")"+comEventConciliationVO.getCurrentEventProcessResult()); |
| | | comEvent.setCurrentOrgName(comStreetDAO.selectById(comActDO.getStreetId()).getName()+"调解站"); |
| | | comEventTransferRecord.setFromId(comEvent.getRequestUserCommunity()); |
| | | comEventTransferRecord.setToId(comActDO.getStreetId()); |
| | |
| | | comEvent.setCurrentOrgId("99999"); |
| | | comEvent.setCurrentOrgName("区三说会堂"); |
| | | //生成一次流转记录 |
| | | comEvent.setCurrentEventProcessResult("街道上报到区三说会堂"); |
| | | comEvent.setCurrentEventProcessResult("(街道上报到区三说会堂中心)"+comEventConciliationVO.getCurrentEventProcessResult()); |
| | | comEventTransferRecord.setFromId(Long.parseLong(comEvent.getCurrentOrgId())); |
| | | comEventTransferRecord.setReportLevel(1); |
| | | comEvent.setReportLevel(1); |
| | |
| | | List<ComEventResource> resource = comEventResourceService.list(new QueryWrapper<ComEventResource>().lambda().eq(ComEventResource::getRefId, id) |
| | | .eq(ComEventResource::getStatus, 5)); |
| | | map.put("archiveImage", resource); |
| | | map.put("contact", getPhone(comEvent)); |
| | | return map; |
| | | } |
| | | |
| | | public String getPhone(ComEvent comEvent){ |
| | | if (isNull(comEvent.getRequestUserCommunity())){ |
| | | return comSanShuoIndustryCenterService.getById(comEvent.getCenterId()).getPhone(); |
| | | }else { |
| | | return comActDAO.selectById(comEvent.getRequestUserCommunity()).getContactsPhone(); |
| | | } |
| | | } |
| | | |
| | | @Override |
| | |
| | | comEvent.setSpecialistName(specter.getName()); |
| | | comEvent.setEventProcessStatus(SanShuoEventStatusEnum.VALID.getCode()); |
| | | int flag = baseMapper.updateById(comEvent); |
| | | ComEvent comEvent1 = comEventMapper.selectById(id); |
| | | sendMessage(specialistId,comEvent1 ); |
| | | //添加一条对应记录 |
| | | comEventMapper.insertEventAndExpertRecord(id, specialistId,1); |
| | | return flag > 0 ? R.ok() : R.fail(ReturnMsgConstants.UPDATE_FALSE); |
| | |
| | | expert.setCreateTime(new Date()); |
| | | if (expert.getLevel()==2){ |
| | | expert.setIndustryCenterId(Long.parseLong(expert.getUnitId())); |
| | | expert.setUnit(comSanshuoIndustryCenterDao.selectById(expert.getUnitId()).getName()+"调解站"); |
| | | expert.setUnit(comSanshuoIndustryCenterDao.selectById(expert.getUnitId()).getName()); |
| | | }else if(expert.getLevel()==3){ |
| | | expert.setStreetId(Long.parseLong(expert.getUnitId())); |
| | | expert.setUnit(comStreetDAO.selectById(expert.getUnitId()).getName()+"调解站"); |
| | | }else if(expert.getLevel()==4){ |
| | | expert.setCommunityId(Long.parseLong(expert.getUnitId())); |
| | | expert.setUnit(comActDAO.selectById(expert.getUnitId()).getName()+"调解站"); |
| | | expert.setUnit(comActDAO.selectById(expert.getUnitId()).getName()+"调解室"); |
| | | }else{ |
| | | expert.setUnit("区三说会堂"); |
| | | } |
| | | expert.setStatus(1); |
| | | expert.setDelFlag(1); |
| | |
| | | //街道后台 |
| | | range=3; |
| | | id=loginUserInfo.getStreetId(); |
| | | }else if (loginUserInfo.getType().equals(12)){ |
| | | range=2; |
| | | id=comSanshuoIndustryCenterDao.selectOne(new QueryWrapper<ComSanshuoIndustryCenter>().lambda().eq(ComSanshuoIndustryCenter::getAccount,loginUserInfo.getAccount() )).getId(); |
| | | }else if (loginUserInfo.getType().equals(3)){ |
| | | //社区后台账号 |
| | | range=4; |
| | | id=loginUserInfo.getCommunityId(); |
| | | } |
| | | } |
| | | } |
| | |
| | | id=null; |
| | | range=1; |
| | | } |
| | | log.info(""); |
| | | IPage<ComSanshuoExpertVO> comSanshuoExpertVOIPage = comSanshuoExpertDao.expertPage(new Page(page, size), keyWord, range, id, level); |
| | | for (ComSanshuoExpertVO record : comSanshuoExpertVOIPage.getRecords()) { |
| | | //获取调解次数和成功率 |
| | |
| | | if (nonNull(expertShowVO.getLevel())){ |
| | | if (1==expertShowVO.getLevel()) { |
| | | expertShowVO.setName("区三说会堂调解专家"); |
| | | // expertShowVO.setChildList(comSanshuoExpertDao.selectExpertVoList(expertShowVO.getLevel())); |
| | | expertShowVO.setCount(comSanshuoExpertDao.selectExpertVoList()); |
| | | }else if (2==expertShowVO.getLevel()){ |
| | | expertShowVO.setName("行业分中心调解专家"); |
| | | List<ExpertShowVO> expertShowVOS1 = comSanshuoExpertDao.selectExpertIndustry(); |
| | |
| | | Integer count = comEventMapper.selectCount(new QueryWrapper<ComEvent>().lambda().eq(ComEvent::getSpecialistId, comSanshuoExpert.getId()).eq(ComEvent::getEventProcessStatus, 6)); |
| | | Integer successCount = comEventMapper.selectCount(new QueryWrapper<ComEvent>().lambda().eq(ComEvent::getSpecialistId, comSanshuoExpert.getId()).eq(ComEvent::getEventProcessStatus, 6).eq(ComEvent::getEventResult, 2)); |
| | | comSanshuoExpert.setCount(count); |
| | | if (nonNull(count) && !count.equals(0)){ |
| | | comSanshuoExpert.setCount(count); |
| | | if (nonNull(successCount) && !count.equals(successCount)){ |
| | | //计算成功率 |
| | | comSanshuoExpert.setRate(NumberUtil.div(successCount, count,2)); |
| | | }else { |
| | | comSanshuoExpert.setRate(new BigDecimal(0)); |
| | | if (nonNull(successCount) && nonNull(count)){ |
| | | if (!successCount.equals(0) && !count.equals(0)){ |
| | | //计算成功率 |
| | | comSanshuoExpert.setRate(NumberUtil.div(successCount, count,2)); |
| | | } |
| | | }else { |
| | | comSanshuoExpert.setCount(0); |
| | | comSanshuoExpert.setRate(new BigDecimal(0)); |
| | | } |
| | | |
| | | } |
| | | return R.ok(comSanshuoExperts); |
| | | } |
| | |
| | | } |
| | | |
| | | @Override |
| | | public R backstageList(Integer level,LoginUserInfoVO loginUserInfoVO) { |
| | | public R backstageList(Integer level,LoginUserInfoVO loginUserInfoVO,Integer page,Integer size) { |
| | | if (nonNull(level)){ |
| | | if (level.equals(1)){ |
| | | //三说会堂权限,查看所有 |
| | | return R.ok(comSanshuoExpertDao.selectList(null)); |
| | | return R.ok(comSanshuoExpertDao.expertList(new Page(page,size),level,null)); |
| | | }else if (level.equals(2)){ |
| | | //行业分中心 |
| | | ComSanshuoIndustryCenter center = comSanshuoIndustryCenterDao.selectOne(new QueryWrapper<ComSanshuoIndustryCenter>().lambda().eq(ComSanshuoIndustryCenter::getAccount, loginUserInfoVO.getAccount())); |
| | | return R.ok(comSanshuoExpertDao.selectList(new QueryWrapper<ComSanshuoExpert>().lambda().eq(ComSanshuoExpert::getIndustryCenterId,center.getId()))); |
| | | return R.ok(comSanshuoExpertDao.expertList(new Page(page,size),level,center.getId())); |
| | | }else if (level.equals(3)){ |
| | | //街道 |
| | | return R.ok(comSanshuoExpertDao.selectList(new QueryWrapper<ComSanshuoExpert>().lambda().eq(ComSanshuoExpert::getStreetId,loginUserInfoVO.getStreetId()))); |
| | | return R.ok(comSanshuoExpertDao.expertList(new Page(page,size),level,loginUserInfoVO.getStreetId())); |
| | | }else if(level.equals(4)){ |
| | | return R.ok(comSanshuoExpertDao.selectList(new QueryWrapper<ComSanshuoExpert>().lambda().eq(ComSanshuoExpert::getCommunityId,loginUserInfoVO.getCommunityId()))); |
| | | return R.ok(comSanshuoExpertDao.expertList(new Page(page,size),level,loginUserInfoVO.getCommunityId())); |
| | | } |
| | | } |
| | | return null; |
New file |
| | |
| | | package com.panzhihua.service_community.util; |
| | | |
| | | import cn.hutool.http.HttpUtil; |
| | | import cn.hutool.json.JSONUtil; |
| | | import com.panzhihua.common.model.vos.SanShuoMessageVO; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.apache.commons.lang.StringUtils; |
| | | |
| | | import java.util.HashMap; |
| | | import java.util.Map; |
| | | |
| | | @Slf4j |
| | | public class WXMessageUtil { |
| | | private static final String APP_ID="wx0cef797390444b75"; |
| | | private static final String SEND_MESSAGE_URL="https://api.weixin.qq.com/cgi-bin/message/subscribe/send?access_token="; |
| | | private static final String TOKEN_URL="https://api.weixin.qq.com/cgi-bin/token?grant_type=client_credential"; |
| | | private static final String SECRET="c7ea9aaa7e391a487e8a5b9ba61045d1"; |
| | | private static final String TEMPLATE_ID="iy8r0YbGlvmysbjGcbEj0yx-kftKBjC-HrXlSeNBrE0"; |
| | | public static String queryToken(){ |
| | | String tokenUrl=TOKEN_URL+"&appid="+APP_ID+"&secret="+SECRET; |
| | | String result= HttpUtil.get(tokenUrl); |
| | | cn.hutool.json.JSONObject obj = JSONUtil.parseObj(result); |
| | | String token = obj.get("access_token").toString(); |
| | | return token; |
| | | } |
| | | |
| | | public static String sendStatusMessage(SanShuoMessageVO vo){ |
| | | String token = queryToken(); |
| | | if (StringUtils.isNotEmpty(token)){ |
| | | //发送消息 |
| | | String url=SEND_MESSAGE_URL+token; |
| | | Map<String,Object> param=new HashMap<>(); |
| | | param.put("touser", vo.getTouser()); |
| | | param.put("template_id", TEMPLATE_ID); |
| | | Map<String,Object> data=new HashMap<>(); |
| | | data.put("thing1", formData(vo.getThing1())); |
| | | data.put("thing5", formData(vo.getThing5())); |
| | | data.put("thing2", formData(vo.getThing2())); |
| | | data.put("time3", formData(vo.getTime3())); |
| | | param.put("data", data); |
| | | String paramMap = JSONUtil.toJsonStr(param); |
| | | log.info("===============推送参数:"+paramMap); |
| | | String result = HttpUtil.post(url, paramMap); |
| | | log.info("状态推送结果"+result); |
| | | return result; |
| | | } |
| | | return null; |
| | | } |
| | | |
| | | public static Map<String,Object> formData(String param){ |
| | | Map<String,Object> data=new HashMap<>(); |
| | | data.put("value",param ); |
| | | return data; |
| | | } |
| | | |
| | | } |
| | |
| | | left join sys_user as su on su.user_id = canc.release_id |
| | | left join com_act_neighbor_circle_topic as canct on canct.id = canc.topic_id |
| | | left join com_act as ca on ca.community_id = canc.community_id |
| | | where is_del = 2 and canc.status = 2 and canc.community_id = ${neighborCircleAppDTO.communityId} |
| | | where is_del = 2 and canc.status = 2 |
| | | and canc.community_id in |
| | | <foreach collection="neighborCircleAppDTO.communityIds" item="item" index="index" open="(" separator="," close=")"> |
| | | ${item} |
| | | </foreach> |
| | | <if test='neighborCircleAppDTO.topicId != null '> |
| | | and canc.topic_id = #{neighborCircleAppDTO.topicId} |
| | | </if> |
| | |
| | | LEFT JOIN sys_user u ON nc.release_id = u.user_id |
| | | LEFT JOIN com_act_neighbor_circle_topic as canct ON canct.id = nc.topic_id |
| | | <where> |
| | | nc.community_id = ${neighborCircleAdminDTO.communityId} and is_del = 2 |
| | | nc.community_id in |
| | | <foreach collection="neighborCircleAdminDTO.communityIds" item="item" index="index" open="(" separator="," close=")"> |
| | | ${item} |
| | | </foreach> |
| | | and is_del = 2 |
| | | <if test='neighborCircleAdminDTO.releaseContent != null and neighborCircleAdminDTO.releaseContent != ""'> |
| | | and nc.release_content like concat('%',#{neighborCircleAdminDTO.releaseContent},'%') |
| | | </if> |
| | |
| | | </if> |
| | | </select> |
| | | <select id="selectExpertIndustry" resultType="com.panzhihua.common.model.vos.sanshuo.ExpertShowVO"> |
| | | select count(t.id) as 'count',t1.name,t1.id from com_sanshuo_expert t |
| | | select count(t.id) as 'count',t1.name,t1.id,t.level from com_sanshuo_expert t |
| | | left join com_sanshuo_industry_center t1 on t.industry_center_id=t1.id |
| | | where t.level=2 and t.status=1 and t.del_flag=1 |
| | | group by t1.name |
| | |
| | | |
| | | |
| | | <select id="selectExpertStreet" resultType="com.panzhihua.common.model.vos.sanshuo.ExpertShowVO"> |
| | | select count(t.id) as 'count',t1.name,t1.street_id as id from com_sanshuo_expert t |
| | | select count(t.id) as 'count',t1.name,t1.street_id as id,t.level from com_sanshuo_expert t |
| | | left join com_street t1 on t.street_id=t1.street_id |
| | | where t.level=3 and t.status=1 and t.del_flag=1 |
| | | group by t1.name |
| | | </select> |
| | | <select id="selectExpertCommunity" resultType="com.panzhihua.common.model.vos.sanshuo.ExpertShowVO"> |
| | | select count(t.id) as 'count',t1.name,t1.community_id as id from com_sanshuo_expert t |
| | | select count(t.id) as 'count',t1.name,t1.community_id as id,t.level from com_sanshuo_expert t |
| | | left join com_act t1 on t.community_id=t1.community_id |
| | | where t.level=4 and t.status=1 and t.del_flag=1 |
| | | group by t1.name |
| | |
| | | </if> |
| | | </if> |
| | | </select> |
| | | <select id="selectExpertVoList" resultType="Integer"> |
| | | select count(id) from com_sanshuo_expert where level=1 |
| | | </select> |
| | | <select id="expertList" resultType="com.panzhihua.common.model.vos.sanshuo.ComSanshuoExpertVO"> |
| | | select id,level,community_id, |
| | | work_time,good_at,name, |
| | | avatar,phone,account, |
| | | password,status,del_flag, |
| | | create_time,create_by,update_time, |
| | | introduction,street_id,industry_center_id, |
| | | unit_id,unit from com_sanshuo_expert |
| | | where del_flag=1 |
| | | <if test="level != null"> |
| | | <if test="level == 2"> |
| | | AND level = 2 |
| | | <if test="id != null"> |
| | | AND industry_center_id=#{id} |
| | | </if> |
| | | </if> |
| | | <if test="level == 3"> |
| | | AND level = 3 |
| | | <if test="id != null"> |
| | | AND street_id=#{id} |
| | | </if> |
| | | </if> |
| | | <if test="level == 4"> |
| | | AND level = 4 |
| | | <if test="id != null"> |
| | | AND community_id=#{id} |
| | | </if> |
| | | </if> |
| | | </if> |
| | | </select> |
| | | </mapper> |
| | |
| | | |
| | | /** |
| | | * 报到单位统计-顶部数据 |
| | | * @param communityId |
| | | * @param communityIds |
| | | * @param belongTo |
| | | * @param choice |
| | | * @return |
| | | */ |
| | | PbCheckUnitStatisticsVo unitStatisticsTop(@Param("communityId") Long communityId, @Param("belongTo") String belongTo, @Param("choice") String choice); |
| | | PbCheckUnitStatisticsVo unitStatisticsTop(@Param("communityIds") List<Long> communityIds, @Param("belongTo") String belongTo, @Param("choice") String choice); |
| | | |
| | | /** |
| | | * 报到单位统计 |
| | |
| | | |
| | | /** |
| | | * 报到党员统计-顶部数据 |
| | | * @param communityId |
| | | * @param communityIds |
| | | * @param belongTo |
| | | * @param choice |
| | | * @param checkUnitId |
| | | * @return |
| | | */ |
| | | PbCheckUnitStatisticsVo pbStatisticsTop(@Param("communityId") Long communityId, @Param("belongTo") String belongTo, @Param("choice") String choice, @Param("checkUnitId") Long checkUnitId); |
| | | PbCheckUnitStatisticsVo pbStatisticsTop(@Param("communityIds") List<Long> communityIds, @Param("belongTo") String belongTo, @Param("choice") String choice, @Param("checkUnitId") Long checkUnitId); |
| | | |
| | | /** |
| | | * 报到党员统计-按单位归属统计 |
| | |
| | | * @return |
| | | */ |
| | | IPage<PartyBuildingMemberVO> pageRegisterMember(@Param("page") Page page, @Param("dto") PageMemberForInviteDTO dto); |
| | | |
| | | @Select("SELECT caa.community_id FROM com_act caa WHERE caa.`name` = ( select ca.`name` FROM com_act ca WHERE ca.community_id =#{id})") |
| | | List<Long> selectIds(@Param("id") Long id); |
| | | } |
| | |
| | | package com.panzhihua.service_dangjian.service.impl; |
| | | |
| | | import cn.hutool.core.collection.CollUtil; |
| | | import com.alibaba.fastjson.JSONArray; |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.google.common.collect.Lists; |
| | |
| | | import com.panzhihua.common.model.vos.common.ComPbCheckUnitVo; |
| | | import com.panzhihua.common.model.vos.partybuilding.excel.ComPbCheckUnitErrorExcelVO; |
| | | import com.panzhihua.common.model.vos.partybuilding.excel.ComPbCheckUnitExcelVO; |
| | | import com.panzhihua.common.service.community.CommunityService; |
| | | import com.panzhihua.common.utlis.StringUtils; |
| | | import com.panzhihua.service_dangjian.dao.ComPbMemberDAO; |
| | | import com.panzhihua.service_dangjian.dao.ComPbMemberRoleDAO; |
| | |
| | | private ComPbMemberRoleDAO comPbMemberRoleDAO; |
| | | @Resource |
| | | private ComPbMemberService comPbMemberService; |
| | | @Resource |
| | | private CommunityService communityService; |
| | | |
| | | /** |
| | | * description queryByPage 分页查询 |
| | |
| | | */ |
| | | @Override |
| | | public R queryByPage(PageComPbCheckUnitDto comPbCheckUnit) { |
| | | |
| | | Long communityId = comPbCheckUnit.getCommunityId(); |
| | | R r = communityService.selectCommunityIds(communityId); |
| | | List<Long> communityIds = null; |
| | | if(R.isOk(r)){ |
| | | communityIds = JSONArray.parseArray(JSONArray.toJSONString(r.getData()), Long.class); |
| | | if (CollUtil.isEmpty(communityIds)) { |
| | | communityIds = new ArrayList<>(); |
| | | communityIds.add(communityId); |
| | | } |
| | | }else { |
| | | communityIds = new ArrayList<>(); |
| | | communityIds.add(communityId); |
| | | } |
| | | comPbCheckUnit.setCommunityIds(communityIds); |
| | | IPage<ComPbCheckUnitVo> checkUnitVoPage= this.baseMapper.queryAllByLimit(comPbCheckUnit, new Page(comPbCheckUnit.getPageNum(), comPbCheckUnit.getPageSize())); |
| | | checkUnitVoPage.getRecords().forEach(checkUnit -> { |
| | | if(StringUtils.isEmpty(checkUnit.getOrgName())){ |
| | |
| | | */ |
| | | @Override |
| | | public R queryByList(PageComPbCheckUnitDto comPbCheckUnit) { |
| | | Long communityId = comPbCheckUnit.getCommunityId(); |
| | | R r = communityService.selectCommunityIds(communityId); |
| | | List<Long> communityIds = null; |
| | | if(R.isOk(r)){ |
| | | communityIds = JSONArray.parseArray(JSONArray.toJSONString(r.getData()), Long.class); |
| | | if (CollUtil.isEmpty(communityIds)) { |
| | | communityIds = new ArrayList<>(); |
| | | communityIds.add(communityId); |
| | | } |
| | | }else { |
| | | communityIds = new ArrayList<>(); |
| | | communityIds.add(communityId); |
| | | } |
| | | comPbCheckUnit.setCommunityIds(communityIds); |
| | | IPage<ComPbCheckUnitVo> checkUnitList = this.baseMapper.queryAllByLimit(comPbCheckUnit,new Page(comPbCheckUnit.getPageNum(),comPbCheckUnit.getPageSize())); |
| | | checkUnitList.getRecords().forEach(checkUnit -> { |
| | | if(StringUtils.isEmpty(checkUnit.getOrgName())){ |
| | |
| | | */ |
| | | @Override |
| | | public R unitStatisticsTop(Long communityId, String belongTo, String choice) { |
| | | return R.ok(this.baseMapper.unitStatisticsTop(communityId, belongTo, choice)); |
| | | R r = communityService.selectCommunityIds(communityId); |
| | | List<Long> communityIds = null; |
| | | if(R.isOk(r)){ |
| | | communityIds = JSONArray.parseArray(JSONArray.toJSONString(r.getData()), Long.class); |
| | | if (CollUtil.isEmpty(communityIds)) { |
| | | communityIds = new ArrayList<>(); |
| | | communityIds.add(communityId); |
| | | } |
| | | }else { |
| | | communityIds = new ArrayList<>(); |
| | | communityIds.add(communityId); |
| | | } |
| | | return R.ok(this.baseMapper.unitStatisticsTop(communityIds, belongTo, choice)); |
| | | } |
| | | |
| | | /** |
| | |
| | | */ |
| | | @Override |
| | | public R unitStatistics(PagePbCheckUnitCommonDto commonDto) { |
| | | Long communityId = commonDto.getCommunityId(); |
| | | R r = communityService.selectCommunityIds(communityId); |
| | | List<Long> communityIds = null; |
| | | if(R.isOk(r)){ |
| | | communityIds = JSONArray.parseArray(JSONArray.toJSONString(r.getData()), Long.class); |
| | | if (CollUtil.isEmpty(communityIds)) { |
| | | communityIds = new ArrayList<>(); |
| | | communityIds.add(communityId); |
| | | } |
| | | }else { |
| | | communityIds = new ArrayList<>(); |
| | | communityIds.add(communityId); |
| | | } |
| | | commonDto.setCommunityIds(communityIds); |
| | | return R.ok(this.baseMapper.unitStatistics(commonDto, new Page(commonDto.getPageNum(), commonDto.getPageSize()))); |
| | | } |
| | | |
| | |
| | | */ |
| | | @Override |
| | | public R pbStatisticsTop(Long communityId, String belongTo, String choice, Long checkUnitId) { |
| | | return R.ok(this.baseMapper.pbStatisticsTop(communityId, belongTo, choice, checkUnitId)); |
| | | |
| | | R r = communityService.selectCommunityIds(communityId); |
| | | List<Long> communityIds = null; |
| | | if(R.isOk(r)){ |
| | | communityIds = JSONArray.parseArray(JSONArray.toJSONString(r.getData()), Long.class); |
| | | if (CollUtil.isEmpty(communityIds)) { |
| | | communityIds = new ArrayList<>(); |
| | | communityIds.add(communityId); |
| | | } |
| | | }else { |
| | | communityIds = new ArrayList<>(); |
| | | communityIds.add(communityId); |
| | | } |
| | | return R.ok(this.baseMapper.pbStatisticsTop(communityIds, belongTo, choice, checkUnitId)); |
| | | } |
| | | |
| | | /** |
| | |
| | | */ |
| | | @Override |
| | | public R pbStatisticsBelong(PagePbCheckUnitCommonDto commonDto) { |
| | | Long communityId = commonDto.getCommunityId(); |
| | | R r = communityService.selectCommunityIds(communityId); |
| | | List<Long> communityIds = null; |
| | | if(R.isOk(r)){ |
| | | communityIds = JSONArray.parseArray(JSONArray.toJSONString(r.getData()), Long.class); |
| | | if (CollUtil.isEmpty(communityIds)) { |
| | | communityIds = new ArrayList<>(); |
| | | communityIds.add(communityId); |
| | | } |
| | | }else { |
| | | communityIds = new ArrayList<>(); |
| | | communityIds.add(communityId); |
| | | } |
| | | commonDto.setCommunityIds(communityIds); |
| | | return R.ok(this.baseMapper.pbStatisticsBelong(commonDto, new Page(commonDto.getPageNum(), commonDto.getPageSize()))); |
| | | } |
| | | |
| | |
| | | */ |
| | | @Override |
| | | public R pbStatisticsUnit(PagePbCheckUnitCommonDto commonDto) { |
| | | Long communityId = commonDto.getCommunityId(); |
| | | R r = communityService.selectCommunityIds(communityId); |
| | | List<Long> communityIds = null; |
| | | if(R.isOk(r)){ |
| | | communityIds = JSONArray.parseArray(JSONArray.toJSONString(r.getData()), Long.class); |
| | | if (CollUtil.isEmpty(communityIds)) { |
| | | communityIds = new ArrayList<>(); |
| | | communityIds.add(communityId); |
| | | } |
| | | }else { |
| | | communityIds = new ArrayList<>(); |
| | | communityIds.add(communityId); |
| | | } |
| | | commonDto.setCommunityIds(communityIds); |
| | | return R.ok(this.baseMapper.pbStatisticsUnit(commonDto, new Page(commonDto.getPageNum(), commonDto.getPageSize()))); |
| | | } |
| | | } |
| | |
| | | |
| | | import javax.annotation.Resource; |
| | | |
| | | import cn.hutool.core.collection.CollUtil; |
| | | import cn.hutool.core.util.IdcardUtil; |
| | | import com.alibaba.fastjson.JSONArray; |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.panzhihua.common.model.dtos.community.PageMemberForInviteDTO; |
| | | import com.panzhihua.common.model.dtos.partybuilding.ComDataStatisticsOrgDto; |
| | |
| | | */ |
| | | @Override |
| | | public R pagePartyOrganization(PagePartyOrganizationVO pagePartyOrganizationVO) { |
| | | |
| | | Long communityId = pagePartyOrganizationVO.getCommunityId(); |
| | | R r = communityService.selectCommunityIds(communityId); |
| | | List<Long> communityIds = null; |
| | | if(R.isOk(r)){ |
| | | communityIds = JSONArray.parseArray(JSONArray.toJSONString(r.getData()), Long.class); |
| | | if (CollUtil.isEmpty(communityIds)) { |
| | | communityIds = new ArrayList<>(); |
| | | communityIds.add(communityId); |
| | | } |
| | | }else { |
| | | communityIds = new ArrayList<>(); |
| | | communityIds.add(communityId); |
| | | } |
| | | pagePartyOrganizationVO.setCommunityIds(communityIds); |
| | | |
| | | Page page = new Page<>(); |
| | | Long pageNum = pagePartyOrganizationVO.getPageNum(); |
| | | Long pageSize = pagePartyOrganizationVO.getPageSize(); |
| | |
| | | <if test="dto.type != null"> |
| | | and cpcu.`type` = #{dto.type} |
| | | </if> |
| | | <if test="dto.communityId != null and dto.communityId!=0"> |
| | | and cpcu.community_id = #{dto.communityId} |
| | | <if test="dto.communityIds != null and dto.communityIds.size()>0"> |
| | | AND cpcu.community_id IN |
| | | <foreach collection="dto.communityIds" item="item" open="(" separator="," close=")"> |
| | | #{item} |
| | | </foreach> |
| | | </if> |
| | | <if test="dto.keyWord != null and dto.keyWord != ''"> |
| | | and (cpcu.contacts like concat(#{dto.keyWord},'%') or cpcu.`name` like concat('%',#{dto.keyWord},'%') or cpcu.phone like concat(#{dto.keyWord},'%')) |
| | |
| | | resultType="com.panzhihua.common.model.vos.common.PbCheckUnitStatisticsVo"> |
| | | SELECT |
| | | (SELECT COUNT( id ) FROM com_pb_check_unit WHERE 1=1 |
| | | <if test="communityId != null"> |
| | | AND community_id = #{communityId} |
| | | <if test="communityIds != null and communityIds.size() >0"> |
| | | AND community_id IN |
| | | <foreach collection="communityIds" item="item" open="(" separator="," close=")"> |
| | | #{item} |
| | | </foreach> |
| | | </if> |
| | | |
| | | <if test="belongTo != null and belongTo != ''"> |
| | | AND belong_to = #{belongTo} |
| | | </if> |
| | |
| | | </if> |
| | | ) AS unitTotal, |
| | | (SELECT COUNT( id ) FROM com_pb_check_unit WHERE nature_name = '机关单位' |
| | | <if test="communityId != null"> |
| | | AND community_id = #{communityId} |
| | | <if test="communityIds != null and communityIds.size() >0"> |
| | | AND community_id IN |
| | | <foreach collection="communityIds" item="item" open="(" separator="," close=")"> |
| | | #{item} |
| | | </foreach> |
| | | </if> |
| | | <if test="belongTo != null and belongTo != ''"> |
| | | AND belong_to = #{belongTo} |
| | |
| | | </if> |
| | | ) AS organTotal, |
| | | (SELECT COUNT( id ) FROM com_pb_check_unit WHERE nature_name = '企事业单位' |
| | | <if test="communityId != null"> |
| | | AND community_id = #{communityId} |
| | | <if test="communityIds != null and communityIds.size() >0"> |
| | | AND community_id IN |
| | | <foreach collection="communityIds" item="item" open="(" separator="," close=")"> |
| | | #{item} |
| | | </foreach> |
| | | </if> |
| | | <if test="belongTo != null and belongTo != ''"> |
| | | AND belong_to = #{belongTo} |
| | |
| | | </if> |
| | | ) AS businessTotal, |
| | | (SELECT COUNT( m.id ) FROM com_pb_member m LEFT JOIN com_pb_check_unit as cpcu ON m.check_unit_id = cpcu.id WHERE m.audit_result = 1 |
| | | <if test="communityId != null"> |
| | | AND m.community_id = #{communityId} |
| | | <if test="communityIds != null and communityIds.size() >0"> |
| | | AND m.community_id IN |
| | | <foreach collection="communityIds" item="item" open="(" separator="," close=")"> |
| | | #{item} |
| | | </foreach> |
| | | </if> |
| | | <if test="belongTo != null and belongTo != ''"> |
| | | AND cpcu.belong_to = #{belongTo} |
| | |
| | | <select id="unitStatistics" resultType="com.panzhihua.common.model.vos.common.PbCheckUnitStatisticsVo"> |
| | | SELECT temp.*, |
| | | (SELECT COUNT( id ) FROM com_pb_check_unit WHERE nature_name = '机关单位' |
| | | <if test="commonDto.communityId != null"> |
| | | AND community_id = #{commonDto.communityId} |
| | | |
| | | <if test="commonDto.communityIds != null and commonDto.communityIds.size() >0"> |
| | | AND community_id IN |
| | | <foreach collection="commonDto.communityIds" item="item" open="(" separator="," close=")"> |
| | | #{item} |
| | | </foreach> |
| | | </if> |
| | | AND belong_to = temp.belong_to) AS organTotal, |
| | | (SELECT COUNT( id ) FROM com_pb_check_unit WHERE nature_name = '企事业单位' |
| | | <if test="commonDto.communityId != null"> |
| | | AND community_id = #{commonDto.communityId} |
| | | <if test="commonDto.communityIds != null and commonDto.communityIds.size() >0"> |
| | | AND community_id IN |
| | | <foreach collection="commonDto.communityIds" item="item" open="(" separator="," close=")"> |
| | | #{item} |
| | | </foreach> |
| | | </if> |
| | | AND belong_to = temp.belong_to) AS businessTotal, |
| | | (SELECT COUNT( m.id ) FROM com_pb_member m LEFT JOIN com_pb_check_unit as cpcu ON m.check_unit_id = cpcu.id WHERE m.audit_result = 1 |
| | | <if test="commonDto.communityId != null"> |
| | | AND m.community_id = #{commonDto.communityId} |
| | | <if test="commonDto.communityIds != null and commonDto.communityIds.size() >0"> |
| | | AND m.community_id IN |
| | | <foreach collection="commonDto.communityIds" item="item" open="(" separator="," close=")"> |
| | | #{item} |
| | | </foreach> |
| | | </if> |
| | | AND cpcu.belong_to = temp.belong_to) AS partyMemberTotal |
| | | FROM (SELECT belong_to,COUNT( id ) AS unitTotal FROM com_pb_check_unit WHERE 1=1 |
| | | <if test="commonDto.communityId != null"> |
| | | AND community_id = #{commonDto.communityId} |
| | | </if> |
| | | <if test="commonDto.communityIds != null and commonDto.communityIds.size() >0"> |
| | | AND community_id IN |
| | | <foreach collection="commonDto.communityIds" item="item" open="(" separator="," close=")"> |
| | | #{item} |
| | | </foreach> |
| | | </if> |
| | | <if test="commonDto.belongTo != null and commonDto.belongTo != ''"> |
| | | AND belong_to = #{commonDto.belongTo} |
| | | </if> |
| | |
| | | SELECT |
| | | (SELECT COUNT( m.id ) FROM com_pb_member m LEFT JOIN com_pb_check_unit as cpcu ON m.check_unit_id = cpcu.id WHERE m.audit_result = 1 |
| | | AND cpcu.nature_name = '机关单位' |
| | | <if test="communityId != null"> |
| | | AND m.community_id = #{communityId} |
| | | <if test="communityIds != null and communityIds.size() >0"> |
| | | AND m.community_id IN |
| | | <foreach collection="communityIds" item="item" open="(" separator="," close=")"> |
| | | #{item} |
| | | </foreach> |
| | | </if> |
| | | |
| | | <if test="belongTo != null and belongTo != ''"> |
| | | AND cpcu.belong_to = #{belongTo} |
| | | </if> |
| | |
| | | ) AS organTotal, |
| | | (SELECT COUNT( m.id ) FROM com_pb_member m LEFT JOIN com_pb_check_unit as cpcu ON m.check_unit_id = cpcu.id WHERE m.audit_result = 1 |
| | | AND cpcu.nature_name = '企事业单位' |
| | | <if test="communityId != null"> |
| | | AND m.community_id = #{communityId} |
| | | <if test="communityIds != null and communityIds.size() >0"> |
| | | AND m.community_id IN |
| | | <foreach collection="communityIds" item="item" open="(" separator="," close=")"> |
| | | #{item} |
| | | </foreach> |
| | | </if> |
| | | <if test="belongTo != null and belongTo != ''"> |
| | | AND cpcu.belong_to = #{belongTo} |
| | |
| | | </if> |
| | | ) AS businessTotal, |
| | | (SELECT COUNT( m.id ) FROM com_pb_member m LEFT JOIN com_pb_check_unit as cpcu ON m.check_unit_id = cpcu.id WHERE m.audit_result = 1 |
| | | <if test="communityId != null"> |
| | | AND m.community_id = #{communityId} |
| | | <if test="communityIds != null and communityIds.size() >0"> |
| | | AND m.community_id IN |
| | | <foreach collection="communityIds" item="item" open="(" separator="," close=")"> |
| | | #{item} |
| | | </foreach> |
| | | </if> |
| | | <if test="belongTo != null and belongTo != ''"> |
| | | AND cpcu.belong_to = #{belongTo} |
| | |
| | | <select id="pbStatisticsBelong" resultType="com.panzhihua.common.model.vos.common.PbCheckUnitStatisticsVo"> |
| | | SELECT temp.*, |
| | | (SELECT COUNT( m.id ) FROM com_pb_member m LEFT JOIN com_pb_check_unit as cpcu ON m.check_unit_id = cpcu.id WHERE m.audit_result = 1 |
| | | <if test="commonDto.communityId != null"> |
| | | AND m.community_id = #{commonDto.communityId} |
| | | <if test="commonDto.communityIds != null and commonDto.communityIds.size() >0"> |
| | | AND m.community_id IN |
| | | <foreach collection="commonDto.communityIds" item="item" open="(" separator="," close=")"> |
| | | #{item} |
| | | </foreach> |
| | | </if> |
| | | AND AND m.check_unit_id is not null AND cpcu.nature_name = '机关单位' AND cpcu.belong_to = temp.belong_to) AS organTotal, |
| | | AND m.check_unit_id is not null AND cpcu.nature_name = '机关单位' AND cpcu.belong_to = temp.belong_to) AS organTotal, |
| | | (SELECT COUNT( m.id ) FROM com_pb_member m LEFT JOIN com_pb_check_unit as cpcu ON m.check_unit_id = cpcu.id WHERE m.audit_result = 1 |
| | | <if test="commonDto.communityId != null"> |
| | | AND m.community_id = #{commonDto.communityId} |
| | | </if> |
| | | <if test="commonDto.communityIds != null and commonDto.communityIds.size() >0"> |
| | | AND m.community_id IN |
| | | <foreach collection="commonDto.communityIds" item="item" open="(" separator="," close=")"> |
| | | #{item} |
| | | </foreach> |
| | | </if> |
| | | AND cpcu.nature_name = '企事业单位' AND cpcu.belong_to = temp.belong_to) AS businessTotal |
| | | FROM (SELECT cpcu.belong_to,COUNT( m.id ) AS partyMemberTotal FROM com_pb_member m LEFT JOIN com_pb_check_unit as cpcu ON m.check_unit_id = cpcu.id WHERE m.audit_result = 1 |
| | | <if test="commonDto.communityId != null"> |
| | | AND m.community_id = #{commonDto.communityId} |
| | | </if> |
| | | <if test="commonDto.communityIds != null and commonDto.communityIds.size() >0"> |
| | | AND m.community_id IN |
| | | <foreach collection="commonDto.communityIds" item="item" open="(" separator="," close=")"> |
| | | #{item} |
| | | </foreach> |
| | | </if> |
| | | <if test="commonDto.belongTo != null and commonDto.belongTo != ''"> |
| | | AND cpcu.belong_to = #{commonDto.belongTo} |
| | | </if> |
| | |
| | | LEFT JOIN com_pb_check_unit AS cpcu ON m.check_unit_id = cpcu.id |
| | | WHERE |
| | | m.audit_result = 1 |
| | | <if test="commonDto.communityId != null"> |
| | | AND m.community_id = #{commonDto.communityId} |
| | | <if test="commonDto.communityIds != null and commonDto.communityIds.size() >0"> |
| | | AND m.community_id IN |
| | | <foreach collection="commonDto.communityIds" item="item" open="(" separator="," close=")"> |
| | | #{item} |
| | | </foreach> |
| | | </if> |
| | | <if test="commonDto.belongTo != null and commonDto.belongTo != ''"> |
| | | AND cpcu.belong_to = #{commonDto.belongTo} |
| | |
| | | <if test="dto.orgId != null"> |
| | | and m.org_id = #{dto.orgId} |
| | | </if> |
| | | <if test="dto.communityId != null and dto.communityId !=0"> |
| | | and m.community_id = ${dto.communityId} |
| | | <if test="dto.communityIds != null and dto.communityIds.size() >0"> |
| | | and m.community_id IN |
| | | <foreach collection="dto.communityIds" item="item" open="(" separator="," close=")"> |
| | | #{item} |
| | | </foreach> |
| | | </if> |
| | | |
| | | <if test="dto.keyWord != null and dto.keyWord != ''"> |
| | | and (m.name like concat ('%',#{dto.keyWord},'%') or |
| | | m.phone like concat ('%',#{dto.keyWord},'%') or |