| | |
| | | */ |
| | | Integer API_SCOPE_CATEGORY = 2; |
| | | |
| | | Integer NUMBER_ZERO = 0; |
| | | |
| | | Integer NUMBER_ONE = 1; |
| | | |
| | | Integer NUMBER_TWO = 2; |
| | |
| | | import com.fasterxml.jackson.databind.annotation.JsonSerialize; |
| | | import com.fasterxml.jackson.databind.ser.std.ToStringSerializer; |
| | | import lombok.Data; |
| | | import sun.rmi.runtime.Log; |
| | | |
| | | import java.io.Serializable; |
| | | import java.util.ArrayList; |
| | |
| | | jpd.appoint_user, |
| | | jpd.user_ids, |
| | | jpd.event_type, |
| | | jpd.signature_flag, |
| | | (SELECT user_id from jczz_user_public_enroll where user_id = #{userId} and public_discuss_id = jpd.id)userId |
| | | from |
| | | jczz_public_discuss jpd |
| | |
| | | placeEntity.setPlaceName(addressEntity.getPoi()); |
| | | placeEntity.setLng(addressEntity.getX()); |
| | | placeEntity.setLat(addressEntity.getY()); |
| | | placeEntity.setLocaltion(addressEntity.getAddressName()); |
| | | placeEntity.setLocation(addressEntity.getAddressName()); |
| | | // 设置来源( 1:地址总表 2:国控采集) |
| | | placeEntity.setSource(1); |
| | | // 加入集合 |
| | |
| | | return R.data(gridmanService.getGridStatistics(code,roleType)); |
| | | } |
| | | |
| | | /** |
| | | *通过houseCode获取网格员 |
| | | * @param houseCode |
| | | * @return |
| | | */ |
| | | @ApiOperation(value = "通过houseCode获取网格员", notes = "") |
| | | @GetMapping("/getGridManByCode") |
| | | public R getGridManByCode(@RequestParam("houseCode") String houseCode ) { |
| | | return R.data(gridmanService.getGridManByCode(houseCode)); |
| | | } |
| | | |
| | | |
| | | } |
| | |
| | | import lombok.EqualsAndHashCode; |
| | | import org.springblade.core.tenant.mp.TenantEntity; |
| | | import org.springframework.format.annotation.DateTimeFormat; |
| | | import sun.rmi.runtime.Log; |
| | | |
| | | /** |
| | | * 网格工作日志表 实体类 |
| | |
| | | limit 1 |
| | | </select> |
| | | |
| | | <select id="getGridManByCode" resultType="org.flowable.idm.engine.impl.persistence.entity.UserEntity"> |
| | | <select id="getGridManByCode" resultType="org.springblade.modules.system.entity.User"> |
| | | |
| | | SELECT |
| | | * |
| | |
| | | import java.io.Serializable; |
| | | import java.util.Date; |
| | | import org.springframework.format.annotation.DateTimeFormat; |
| | | import sun.rmi.runtime.Log; |
| | | |
| | | /** |
| | | * 住户 实体类 |
| | |
| | | * 位置 |
| | | */ |
| | | @ApiModelProperty(value = "位置") |
| | | private String localtion; |
| | | private String location; |
| | | /** |
| | | * 场所照片 |
| | | */ |
| | |
| | | PlaceExtEntity one = placeExtService.getOne(wrapper); |
| | | if (null == one) { |
| | | placeExtEntity.setPlaceId(placeVO.getId()); |
| | | placeExtEntity.setLocaltion(placeVO.getLocaltion()); |
| | | placeExtEntity.setLocaltion(placeVO.getLocation()); |
| | | //新增 |
| | | placeExtService.savePlaceExt(placeExtEntity); |
| | | } |
| | |
| | | // 插入场所 |
| | | PlaceEntity placeEntity = new PlaceEntity(); |
| | | placeEntity.setPlaceName(placeExcel.getPlaceName()); |
| | | placeEntity.setLocaltion(placeExcel.getAddress()); |
| | | placeEntity.setLocation(placeExcel.getAddress()); |
| | | placeEntity.setPrincipalUserId(userId); |
| | | placeEntity.setPrincipal(placeExcel.getName()); |
| | | placeEntity.setPrincipalPhone(placeExcel.getPhoneNumber()); |
| | |
| | | PlaceEntity placeEntity = new PlaceEntity(); |
| | | placeEntity.setId(one.getId()); |
| | | placeEntity.setPlaceName(placeExcel.getPlaceName()); |
| | | placeEntity.setLocaltion(placeExcel.getAddress()); |
| | | placeEntity.setLocation(placeExcel.getAddress()); |
| | | placeEntity.setPrincipalUserId(userId); |
| | | placeEntity.setCreateTime(new Date()); |
| | | placeEntity.setCreateUser(AuthUtil.getUserId()); |
| | |
| | | return R.status(propertyCompanyDistrictService.removeByIds(Func.toIntList(ids))); |
| | | } |
| | | |
| | | /** |
| | | * 通过houseCod获取物业人员 |
| | | */ |
| | | @GetMapping("/getDistictUserByCode") |
| | | @ApiOperationSupport(order = 7) |
| | | @ApiOperation(value = "通过houseCod获取物业人员", notes = "houseCode") |
| | | public R getDistictUserByCode(@RequestParam("houseCode") String houseCode) { |
| | | return R.data(propertyCompanyDistrictService.getDistictUserByCode(houseCode)); |
| | | } |
| | | |
| | | |
| | | } |
| | |
| | | <mapper namespace="org.springblade.modules.property.mapper.PropertyCompanyDistrictMapper"> |
| | | |
| | | <!-- 通用查询映射结果 --> |
| | | <resultMap id="propertyCompanyDistrictResultMap" type="org.springblade.modules.property.entity.PropertyCompanyDistrictEntity"> |
| | | <resultMap id="propertyCompanyDistrictResultMap" |
| | | type="org.springblade.modules.property.entity.PropertyCompanyDistrictEntity"> |
| | | <result column="id" property="id"/> |
| | | <result column="property_company_id" property="propertyCompanyId"/> |
| | | <result column="district_id" property="districtId"/> |
| | |
| | | </resultMap> |
| | | |
| | | <!--自定义分页查询--> |
| | | <select id="selectPropertyCompanyDistrictPage" resultType="org.springblade.modules.property.vo.PropertyCompanyDistrictVO"> |
| | | <select id="selectPropertyCompanyDistrictPage" |
| | | resultType="org.springblade.modules.property.vo.PropertyCompanyDistrictVO"> |
| | | select |
| | | jpcd.*, |
| | | jd.name as districtName, |
| | |
| | | </if> |
| | | </select> |
| | | |
| | | <select id="getDistictUserByCode" resultType="org.flowable.idm.engine.impl.persistence.entity.UserEntity"> |
| | | SELECT |
| | | bu.* |
| | | <select id="getDistictUserByCode" resultType="org.springblade.modules.system.vo.UserVO"> |
| | | SELECT |
| | | bu.*, |
| | | jpc.name distictName |
| | | FROM |
| | | blade_user bu |
| | | LEFT JOIN jczz_property_district_user jpdu ON bu.id = jpdu.user_id |
| | | LEFT JOIN jczz_property_company_district jpcd ON jpdu.property_company_district_id = jpcd.id |
| | | LEFT JOIN jczz_property_company jpc on jpc.id = jpcd.property_company_id |
| | | 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 |
| | |
| | | package org.springblade.modules.system.controller; |
| | | |
| | | |
| | | import com.alibaba.fastjson.JSON; |
| | | import com.alibaba.fastjson.PropertyNamingStrategy; |
| | | import com.alibaba.fastjson.serializer.SerializeConfig; |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
| | |
| | | @NonDS |
| | | //@ApiIgnore |
| | | @RestController |
| | | @RequestMapping(AppConstant.APPLICATION_SYSTEM_NAME+"/user") |
| | | @RequestMapping(AppConstant.APPLICATION_SYSTEM_NAME + "/user") |
| | | @AllArgsConstructor |
| | | @Api(value = "用户管理", tags = "用户管理") |
| | | public class UserController { |
| | |
| | | public R<UserVO> detail(User user) { |
| | | User detail = userService.getOne(Condition.getQueryWrapper(user)); |
| | | return R.data(UserWrapper.build().entityVO(detail)); |
| | | } |
| | | |
| | | @ApiOperationSupport(order = 1) |
| | | @ApiOperation(value = "查看详情返回String", notes = "传入id") |
| | | @GetMapping("/details") |
| | | // @PreAuth(RoleConstant.HAS_ROLE_ADMIN) |
| | | public R<String> details(User user) { |
| | | UserVO detail = userService.getuserById(user.getId()); |
| | | SerializeConfig config = new SerializeConfig(); |
| | | config.propertyNamingStrategy = PropertyNamingStrategy.SnakeCase; |
| | | String json1 = JSON.toJSONString(detail, config); |
| | | return R.data(json1); |
| | | } |
| | | |
| | | /** |
| | |
| | | |
| | | /** |
| | | * 按条件查询用户信息 |
| | | * |
| | | * @param user |
| | | * @return |
| | | */ |
| | |
| | | return R.data(userService.getUserInfo(AuthUtil.getUserId())); |
| | | } |
| | | |
| | | /** |
| | | * 修改 |
| | | */ |
| | | @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)); |
| | | } |
| | | |
| | | } |
| | |
| | | * @return |
| | | */ |
| | | UserDetailVO getUserInfo(@Param("userId") Long userId); |
| | | |
| | | /** |
| | | * |
| | | * @param id |
| | | * @return |
| | | */ |
| | | UserVO searchUserById(Long id); |
| | | } |
| | |
| | | and id = #{userId} |
| | | </select> |
| | | |
| | | |
| | | <select id="searchUserById" resultType="org.springblade.modules.system.vo.UserVO"> |
| | | select |
| | | id userId, |
| | | tenant_id, |
| | | code, |
| | | user_type, |
| | | account, |
| | | name, |
| | | real_name, |
| | | avatar, |
| | | email, |
| | | phone, |
| | | birthday, |
| | | sex, |
| | | role_id, |
| | | dept_id, |
| | | post_id, |
| | | create_user, |
| | | create_dept, |
| | | create_time, |
| | | update_user, |
| | | update_time, |
| | | status, |
| | | is_deleted |
| | | from |
| | | blade_user |
| | | where |
| | | id = #{id} |
| | | </select> |
| | | |
| | | |
| | | |
| | | </mapper> |
| | |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.Wrapper; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import org.flowable.idm.engine.impl.persistence.entity.UserEntity; |
| | | import org.springblade.core.mp.base.BaseService; |
| | | import org.springblade.core.mp.support.Query; |
| | | import org.springblade.modules.auth.enums.UserEnum; |
| | |
| | | * @return |
| | | */ |
| | | UserDetailVO getUserInfo(Long userId); |
| | | |
| | | /** |
| | | * 获取用户信息ById |
| | | * @param id |
| | | * @return |
| | | */ |
| | | UserVO getuserById(Long id); |
| | | |
| | | List<UserEntity> getUserInfoByCode(String houseCode, String type); |
| | | } |
| | |
| | | import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
| | | import lombok.AllArgsConstructor; |
| | | import org.apache.logging.log4j.util.Strings; |
| | | import org.flowable.idm.engine.impl.persistence.entity.UserEntity; |
| | | import org.springblade.common.cache.DictCache; |
| | | import org.springblade.common.cache.ParamCache; |
| | | import org.springblade.common.cache.SysCache; |
| | |
| | | import org.springblade.core.tool.support.Kv; |
| | | import org.springblade.core.tool.utils.*; |
| | | import org.springblade.modules.auth.enums.UserEnum; |
| | | import org.springblade.modules.grid.service.IGridmanService; |
| | | import org.springblade.modules.property.service.IPropertyCompanyDistrictService; |
| | | import org.springblade.modules.system.entity.*; |
| | | import org.springblade.modules.system.excel.UserExcel; |
| | | import org.springblade.modules.system.mapper.UserMapper; |
| | |
| | | |
| | | @Override |
| | | public IPage<User> selectUserPage(IPage<User> page, User user, Long deptId, String tenantId) { |
| | | if (null == deptId && !AuthUtil.isAdministrator()){ |
| | | if (null == deptId && !AuthUtil.isAdministrator()) { |
| | | deptId = Long.parseLong(AuthUtil.getDeptId()); |
| | | } |
| | | List<Long> deptIdList = SysCache.getDeptChildIds(deptId); |
| | |
| | | |
| | | /** |
| | | * 按条件查询用户信息 |
| | | * |
| | | * @param user |
| | | * @return |
| | | */ |
| | | @Override |
| | | public List<UserVO> getUserListByParam(UserVO user) { |
| | | if (!Strings.isBlank(user.getRoleName())){ |
| | | if (!Strings.isBlank(user.getRoleName())) { |
| | | // 查询对应的角色id |
| | | String roleIds = roleService.getRoleIds("000000", user.getRoleName()); |
| | | user.setRoleId(roleIds); |
| | |
| | | |
| | | /** |
| | | * 通过小区Id搜索用户 |
| | | * |
| | | * @param districtId |
| | | * @return |
| | | */ |
| | | @Override |
| | | public List<User> searchUserByDistrictId(String districtId) { |
| | | return baseMapper.searchUserByDistrictId( districtId); |
| | | return baseMapper.searchUserByDistrictId(districtId); |
| | | } |
| | | |
| | | /** |
| | |
| | | // 返回 |
| | | return userVO; |
| | | } |
| | | |
| | | @Override |
| | | public UserVO getuserById(Long id) { |
| | | return baseMapper.searchUserById(id); |
| | | } |
| | | |
| | | @Override |
| | | public List<UserEntity> getUserInfoByCode(String houseCode, String type) { |
| | | if (type.equals("1")) { |
| | | IGridmanService bean = SpringUtil.getBean(IGridmanService.class); |
| | | return bean.getGridManByCode(houseCode); |
| | | } else { |
| | | IPropertyCompanyDistrictService bean1 = SpringUtil.getBean(IPropertyCompanyDistrictService.class); |
| | | return bean1.getDistictUserByCode(houseCode); |
| | | } |
| | | } |
| | | } |
| | |
| | | * 拓展信息 |
| | | */ |
| | | private String userExt; |
| | | |
| | | private String userId; |
| | | |
| | | private String distictName; |
| | | } |
| | |
| | | /** 更新时间 */ |
| | | @ApiModelProperty(value = "更新时间", example = "") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") |
| | | @TableField("update_time") |
| | | @TableField(value = "update_time",fill = FieldFill.UPDATE) |
| | | private Date updateTime; |
| | | |
| | | /** 图片 */ |
| | |
| | | import org.springblade.core.mp.base.BaseEntity; |
| | | import org.springblade.core.tenant.mp.TenantEntity; |
| | | import org.springframework.format.annotation.DateTimeFormat; |
| | | import sun.rmi.runtime.Log; |
| | | |
| | | /** |
| | | * 报事报修任务表 实体类 |
| | |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import org.springblade.common.constant.CommonConstant; |
| | | import org.springblade.common.utils.SpringUtils; |
| | | import org.springblade.core.secure.BladeUser; |
| | | import org.springblade.core.secure.utils.AuthUtil; |
| | | import org.springblade.modules.task.dto.TaskRepairStepDTO; |
| | | import org.springblade.modules.task.entity.TaskRepairStepEntity; |
| | |
| | | taskReportForRepairsEntity.setId(task.getRepairId()); |
| | | taskReportForRepairsEntity.setConfirmFlag(task.getConfirmFlag()); |
| | | taskReportForRepairsEntity.setConfirmUserId(task.getTransferUserId()); |
| | | if (CommonConstant.NUMBER_THREE.equals(task.getConfirmFlag())) { |
| | | taskReportForRepairsEntity.setConfirmUserId(AuthUtil.getUserId()); |
| | | if (CommonConstant.NUMBER_ZERO.equals(task.getConfirmFlag())|| CommonConstant.NUMBER_THREE.equals(task.getConfirmFlag())) { |
| | | task.setName(AuthUtil.getNickName()); |
| | | } |
| | | boolean update = SpringUtils.getBean(ITaskReportForRepairsService.class).updateById(taskReportForRepairsEntity); |
| | | return update ? save(task) : false; |
| | | SpringUtils.getBean(ITaskReportForRepairsService.class).updateById(taskReportForRepairsEntity); |
| | | return save(task); |
| | | } |
| | | } |