| | |
| | | package org.springblade.modules.article.controller; |
| | | |
| | | import com.alibaba.fastjson.JSON; |
| | | import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport; |
| | |
| | | import io.swagger.annotations.ApiOperation; |
| | | import io.swagger.annotations.ApiParam; |
| | | import lombok.AllArgsConstructor; |
| | | import org.apache.commons.lang3.StringUtils; |
| | | import org.springblade.core.mp.support.Condition; |
| | | import org.springblade.core.mp.support.Query; |
| | | import org.springblade.core.tool.api.R; |
| | |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import javax.validation.Valid; |
| | | import java.util.ArrayList; |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * @author zhongrj |
| | |
| | | objectUpdateWrapper.setSql("view_number = view_number + 1"); |
| | | objectUpdateWrapper.eq("id", article.getId()); |
| | | articleService.update(null, objectUpdateWrapper); |
| | | List<List<String>> lists = new ArrayList<>(); |
| | | if (StringUtils.isNotBlank(detail.getArticleRange())) { |
| | | lists = (List<List<String>>) JSON.parse(detail.getArticleRange()); |
| | | } |
| | | detail.setArticleList(lists); |
| | | // List<List<String>> lists = new ArrayList<>(); |
| | | // if (StringUtils.isNotBlank(detail.getArticleRange())) { |
| | | // lists = (List<List<String>>) JSON.parse(detail.getArticleRange()); |
| | | // } |
| | | // detail.setArticleList(lists); |
| | | return R.data(detail); |
| | | } |
| | | |
| | |
| | | ja.update_user, |
| | | ja.create_user, |
| | | ja.is_deleted, |
| | | jpd.id pdId, |
| | | (select bdb.dict_value from blade_dict_biz bdb where bdb.parent_id='1722966265111248897' and ja.article_type = bdb.dict_key) dictValue, |
| | | jpd.event_type |
| | | jpd.id pdId |
| | | from jczz_article ja |
| | | LEFT JOIN jczz_public_discuss jpd on jpd.article_id=ja.id |
| | | where ja.is_deleted = 0 |
| | |
| | | |
| | | private Integer eventType; |
| | | |
| | | private List<List<String>> articleList; |
| | | private List<String> articleList; |
| | | |
| | | |
| | | private String houseCode; |
| | |
| | | import io.swagger.annotations.ApiOperation; |
| | | import io.swagger.annotations.ApiParam; |
| | | import lombok.AllArgsConstructor; |
| | | import org.springblade.common.constant.CommonConstant; |
| | | import org.springblade.core.boot.ctrl.BladeController; |
| | | import org.springblade.core.mp.support.Condition; |
| | | import org.springblade.core.mp.support.Query; |
| | | import org.springblade.core.secure.utils.AuthUtil; |
| | | import org.springblade.core.tool.api.R; |
| | | import org.springblade.core.tool.utils.Func; |
| | | import org.springblade.core.tool.utils.SpringUtil; |
| | | import org.springblade.modules.discuss.entity.PublicDiscussEntity; |
| | | import org.springblade.modules.discuss.entity.UserPublicEnrollEntity; |
| | | import org.springblade.modules.discuss.service.IPublicDiscussService; |
| | | import org.springblade.modules.discuss.service.IUserPublicEnrollService; |
| | | import org.springblade.modules.discuss.vo.UserPublicEnrollVO; |
| | | import org.springblade.modules.discuss.wrapper.UserPublicEnrollWrapper; |
| | |
| | | @ApiOperation(value = "新增", notes = "传入userPublicEnroll") |
| | | public R save(@Valid @RequestBody UserPublicEnrollEntity userPublicEnroll) { |
| | | userPublicEnroll.setUserId(AuthUtil.getUserId()); |
| | | long count = userPublicEnrollService.count(Wrappers.<UserPublicEnrollEntity>lambdaQuery() |
| | | .eq(UserPublicEnrollEntity::getPublicDiscussId, userPublicEnroll.getPublicDiscussId()) |
| | | .eq(UserPublicEnrollEntity::getUserId, userPublicEnroll.getUserId())); |
| | | if (count > 0) { |
| | | return R.fail("您已报名!"); |
| | | // 判断是否一户一票 还是一人一票 |
| | | IPublicDiscussService bean = SpringUtil.getBean(IPublicDiscussService.class); |
| | | PublicDiscussEntity one = bean.getOne(Wrappers.<PublicDiscussEntity>lambdaQuery().eq(PublicDiscussEntity::getId, userPublicEnroll.getPublicDiscussId())); |
| | | // 一户一票 |
| | | if (one.getVoteRestrictions().equals(CommonConstant.NUMBER_ONE)) { |
| | | long count = userPublicEnrollService.count(Wrappers.<UserPublicEnrollEntity>lambdaQuery() |
| | | .eq(UserPublicEnrollEntity::getPublicDiscussId, userPublicEnroll.getPublicDiscussId()) |
| | | .eq(UserPublicEnrollEntity::getUserId, userPublicEnroll.getUserId()) |
| | | .eq(UserPublicEnrollEntity::getHouseCode, userPublicEnroll.getHouseCode())); |
| | | if (count > 0) { |
| | | return R.fail("您房屋已经报名,不能重复报名!"); |
| | | } |
| | | // 一人一票 |
| | | } else { |
| | | long count = userPublicEnrollService.count(Wrappers.<UserPublicEnrollEntity>lambdaQuery() |
| | | .eq(UserPublicEnrollEntity::getPublicDiscussId, userPublicEnroll.getPublicDiscussId()) |
| | | .eq(UserPublicEnrollEntity::getUserId, userPublicEnroll.getUserId())); |
| | | if (count > 0) { |
| | | return R.fail("您已报名,不能重复报名!"); |
| | | } |
| | | } |
| | | return R.status(userPublicEnrollService.save(userPublicEnroll)); |
| | | } |
| | |
| | | package org.springblade.modules.discuss.controller; |
| | | |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
| | | import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import io.swagger.annotations.ApiParam; |
| | | import lombok.AllArgsConstructor; |
| | | import org.springblade.common.constant.CommonConstant; |
| | | import org.springblade.core.boot.ctrl.BladeController; |
| | | import org.springblade.core.mp.support.Condition; |
| | | import org.springblade.core.mp.support.Query; |
| | | import org.springblade.core.secure.utils.AuthUtil; |
| | | import org.springblade.core.tool.api.R; |
| | | import org.springblade.core.tool.utils.Func; |
| | | import org.springblade.core.tool.utils.SpringUtil; |
| | | import org.springblade.modules.discuss.entity.PublicDiscussEntity; |
| | | import org.springblade.modules.discuss.entity.TopicsEntity; |
| | | import org.springblade.modules.discuss.entity.UserTopicsEntity; |
| | | import org.springblade.modules.discuss.service.ITopicsService; |
| | | import org.springblade.modules.discuss.service.IPublicDiscussService; |
| | | import org.springblade.modules.discuss.service.IUserTopicsService; |
| | | import org.springblade.modules.discuss.vo.UserTopicsVO; |
| | | import org.springblade.modules.discuss.wrapper.UserTopicsWrapper; |
| | |
| | | @ApiOperationSupport(order = 6) |
| | | @ApiOperation(value = "新增或修改", notes = "传入userTopics") |
| | | public R submit(@Valid @RequestBody UserTopicsEntity userTopics) { |
| | | return R.status(userTopicsService.saveOrUpdate(userTopics)); |
| | | userTopics.setUserId(AuthUtil.getUserId()); |
| | | // 判断是否一户一票 还是一人一票 |
| | | IPublicDiscussService bean = SpringUtil.getBean(IPublicDiscussService.class); |
| | | PublicDiscussEntity one = bean.getOne(Wrappers.<PublicDiscussEntity>lambdaQuery().eq(PublicDiscussEntity::getId, userTopics.getPublicDiscussId())); |
| | | // 一户一票 |
| | | if (one.getVoteRestrictions().equals(CommonConstant.NUMBER_ONE)) { |
| | | long count = userTopicsService.count(Wrappers.<UserTopicsEntity>lambdaQuery() |
| | | .eq(UserTopicsEntity::getPublicDiscussId, userTopics.getPublicDiscussId()) |
| | | .eq(UserTopicsEntity::getUserId, userTopics.getUserId()) |
| | | .eq(UserTopicsEntity::getHouseCode, userTopics.getHouseCode())); |
| | | if (count > 0) { |
| | | return R.fail("您房屋已经投票,不能重复投票!"); |
| | | } |
| | | // 一人一票 |
| | | } else { |
| | | long count = userTopicsService.count(Wrappers.<UserTopicsEntity>lambdaQuery() |
| | | .eq(UserTopicsEntity::getPublicDiscussId, userTopics.getPublicDiscussId()) |
| | | .eq(UserTopicsEntity::getUserId, userTopics.getUserId())); |
| | | if (count > 0) { |
| | | return R.fail("您已投票,不能重复投票!"); |
| | | } |
| | | } |
| | | return R.status(userTopicsService.save(userTopics)); |
| | | } |
| | | |
| | | /** |
| | |
| | | LEFT JOIN jczz_grid jg ON jgm.grid_id = jg.id |
| | | LEFT JOIN jczz_grid_range jgr ON jgr.grid_id = jg.id |
| | | WHERE |
| | | jgr.house_code = #{houseCode} |
| | | jgr.house_code = #{houseCode} and bu.is_deleted = 0 |
| | | </select> |
| | | </mapper> |
| | |
| | | LEFT JOIN jczz_district jd ON jd.id = jpcd.district_id |
| | | LEFT JOIN jczz_doorplate_address jda ON jda.aoi_code = jd.aoi_code |
| | | WHERE |
| | | jda.address_code = #{houseCode} |
| | | jda.address_code = #{houseCode} and bu.is_deleted = 0 |
| | | </select> |
| | | |
| | | |
| | |
| | | * 修改 |
| | | */ |
| | | @GetMapping("/getUserInfoByCode") |
| | | @ApiOperation(value = "查询人员", notes = "houseCode") |
| | | public R getUserInfoByCode(@RequestParam("houseCode") String houseCode, @RequestParam(value = "type",defaultValue = "2") String type) { |
| | | return R.data(userService.getUserInfoByCode(houseCode,type)); |
| | | @ApiOperation(value = "查询物业人员/网格人员", notes = "houseCode") |
| | | public R getUserInfoByCode(@RequestParam("houseCode") String houseCode, @RequestParam(value = "type", defaultValue = "2") String type) { |
| | | return R.data(userService.getUserInfoByCode(houseCode, type)); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 修改 |
| | | */ |
| | | @GetMapping("/getUserInfoByDistrictId") |
| | | @ApiOperation(value = "查询物业人员/网格人员", notes = "houseCode") |
| | | public R getUserInfoByDistrictId(@RequestParam("districtId") String districtId, @RequestParam(value = "building", required = false) String building) { |
| | | return R.data(userService.getUserInfoByDistrictId(districtId, building)); |
| | | } |
| | | |
| | | } |
| | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import org.apache.ibatis.annotations.Param; |
| | | import org.springblade.modules.system.excel.UserExcel; |
| | | import org.flowable.idm.engine.impl.persistence.entity.UserEntity; |
| | | import org.springblade.modules.system.entity.User; |
| | | import org.springblade.modules.system.excel.UserExcel; |
| | | import org.springblade.modules.system.vo.UserDetailVO; |
| | | import org.springblade.modules.system.vo.UserVO; |
| | | |
| | |
| | | * @param user |
| | | * @return |
| | | */ |
| | | List<UserVO> getUserListByParam(@Param("user") UserVO user); |
| | | List<UserVO> getUserListByParam(@Param("user") UserVO user); |
| | | |
| | | /** |
| | | * 通过小区Id搜索用户 |
| | | * @param districtId |
| | | * @return |
| | | */ |
| | | List<User> searchUserByDistrictId(String districtId); |
| | | List<User> searchUserByDistrictId(String districtId); |
| | | |
| | | /** |
| | | * 根据手机号查询对应账号和手机号的用户信息 |
| | |
| | | * @param userId |
| | | * @return |
| | | */ |
| | | UserDetailVO getUserInfo(@Param("userId") Long userId); |
| | | UserDetailVO getUserInfo(@Param("userId") Long userId); |
| | | |
| | | /** |
| | | * |
| | | * @param id |
| | | * @return |
| | | */ |
| | | UserVO searchUserById(Long id); |
| | | |
| | | List<UserEntity> getUserInfoByDistrictId(String districtId, String building); |
| | | } |
| | |
| | | </if> |
| | | <if test="deptIdList!=null and deptIdList.size>0"> |
| | | and id in ( |
| | | SELECT |
| | | user_id |
| | | FROM |
| | | blade_user_dept |
| | | WHERE |
| | | dept_id IN |
| | | <foreach collection="deptIdList" index="index" item="item" open="(" separator="," close=")"> |
| | | #{item} |
| | | </foreach> |
| | | SELECT |
| | | user_id |
| | | FROM |
| | | blade_user_dept |
| | | WHERE |
| | | dept_id IN |
| | | <foreach collection="deptIdList" index="index" item="item" open="(" separator="," close=")"> |
| | | #{item} |
| | | </foreach> |
| | | ) |
| | | </if> |
| | | ORDER BY id |
| | |
| | | id = #{id} |
| | | </select> |
| | | |
| | | <select id="getUserInfoByDistrictId" |
| | | resultType="org.flowable.idm.engine.impl.persistence.entity.UserEntity"> |
| | | SELECT |
| | | bu.id, |
| | | bu.tenant_id, |
| | | bu.code, |
| | | bu.user_type, |
| | | bu.account, |
| | | bu.name, |
| | | bu.real_name, |
| | | bu.avatar, |
| | | bu.email, |
| | | bu.phone, |
| | | bu.birthday |
| | | FROM |
| | | blade_user bu |
| | | LEFT JOIN jczz_household jh ON bu.id = jh.associated_user_id |
| | | LEFT JOIN jczz_house jhe ON jhe.house_code = jh.house_code |
| | | LEFT JOIN jczz_district jd on jd.aoi_code=jhe.district_code |
| | | <where> |
| | | <if test="districtId != nuu and districtId != ''"> |
| | | and jd.id = #{districtId} |
| | | and bu.is_deleted = 0 |
| | | </if> |
| | | <if test="building != nuu and building != ''"> |
| | | and jhe.building=#{building} |
| | | </if> |
| | | |
| | | </where> |
| | | |
| | | </select> |
| | | |
| | | |
| | | </mapper> |
| | |
| | | |
| | | /** |
| | | * 获取用户信息ById |
| | | * |
| | | * @param id |
| | | * @return |
| | | */ |
| | | UserVO getuserById(Long id); |
| | | |
| | | List<UserEntity> getUserInfoByCode(String houseCode, String type); |
| | | |
| | | List<UserEntity> getUserInfoByDistrictId(String districtId, String building); |
| | | } |
| | |
| | | return bean1.getDistictUserByCode(houseCode); |
| | | } |
| | | } |
| | | |
| | | @Override |
| | | public List<UserEntity> getUserInfoByDistrictId(String districtId, String building) { |
| | | return baseMapper.getUserInfoByDistrictId(districtId, building); |
| | | } |
| | | } |
| | |
| | | <if test="task.startTime != null and task.startTime != '' and task.endTime != null and task.endTime != '' "> |
| | | AND jt.create_time BETWEEN #{task.startTime} and #{task.endTime} |
| | | </if> |
| | | <!-- 取保候审 --> |
| | | <if test="task.reportType != null and task.reportType == 1 "> |
| | | and jt.report_type = 1 |
| | | <!-- 取保候审 或 报事报修 --> |
| | | <if test="task.reportType != null and task.reportType != 2 "> |
| | | and jt.report_type = #{task.reportType} |
| | | </if> |
| | | <!-- 场所店铺 --> |
| | | <if test="task.reportType != null and task.reportType == 2 "> |
| | | and jt.report_type in (2,3,4,5,6) |
| | | </if> |
| | | |
| | | order by jt.create_time desc |
| | | |
| | | </select> |
| | | |
| | | |