Merge branch 'master' of http://120.76.84.145:10101/gitblit/r/java/mobile_community
| | |
| | | package com.ruoyi.web.controller.api; |
| | | |
| | | |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import com.ruoyi.common.annotation.Log; |
| | | import com.ruoyi.common.basic.PageInfo; |
| | | import com.ruoyi.common.core.domain.R; |
| | | import com.ruoyi.common.enums.BusinessType; |
| | | import com.ruoyi.system.model.TAppUser; |
| | | import com.ruoyi.system.query.AppUserListQuery; |
| | | import com.ruoyi.system.service.TAppUserService; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | import javax.annotation.Resource; |
| | | |
| | | /** |
| | | * <p> |
| | |
| | | */ |
| | | @RestController |
| | | @RequestMapping("/t-app-user") |
| | | @Api(tags = "用户管理") |
| | | public class TAppUserController { |
| | | @Resource |
| | | private TAppUserService appUserService; |
| | | |
| | | @ApiOperation(value = "用户管理分页列表") |
| | | @PostMapping(value = "/pageList") |
| | | public R<PageInfo<TAppUser>> pageList(@RequestBody AppUserListQuery query) { |
| | | return R.ok(appUserService.pageList(query)); |
| | | } |
| | | @ApiOperation(value = "修改状态") |
| | | @GetMapping(value = "/changeStatus") |
| | | @Log(title = "小程序用户-修改状态", businessType = BusinessType.UPDATE) |
| | | public R pageList(Integer id) { |
| | | TAppUser appUser = appUserService.getById(id); |
| | | appUser.setStatus(appUser.getStatus()==1?2:1); |
| | | appUserService.updateById(appUser); |
| | | return R.ok(); |
| | | } |
| | | @ApiOperation(value = "查看详情") |
| | | @GetMapping(value = "/detail") |
| | | public R<TAppUser> detail(Integer id) { |
| | | return R.ok(appUserService.getById( id)); |
| | | } |
| | | } |
| | | |
| | |
| | | package com.ruoyi.web.controller.api; |
| | | |
| | | |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import com.ruoyi.common.annotation.Log; |
| | | import com.ruoyi.common.basic.PageInfo; |
| | | import com.ruoyi.common.core.domain.R; |
| | | import com.ruoyi.common.enums.BusinessType; |
| | | import com.ruoyi.system.model.TAssistedDining; |
| | | import com.ruoyi.system.model.TAssistedDining; |
| | | import com.ruoyi.system.model.THelpNeeds; |
| | | import com.ruoyi.system.query.AssistedDiningListQuery; |
| | | import com.ruoyi.system.query.OldsterListQuery; |
| | | import com.ruoyi.system.service.TAssistedDiningService; |
| | | import com.ruoyi.system.service.TAssistedDiningService; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | import java.util.Arrays; |
| | | import java.util.List; |
| | | import java.util.stream.Collectors; |
| | | |
| | | /** |
| | | * <p> |
| | |
| | | */ |
| | | @RestController |
| | | @RequestMapping("/t-assisted-dining") |
| | | @Api(tags = "助餐管理") |
| | | public class TAssistedDiningController { |
| | | @Autowired |
| | | private TAssistedDiningService assistedDiningService; |
| | | @ApiOperation(value = "助餐信息分页列表") |
| | | @PostMapping(value = "/pageList") |
| | | public R<PageInfo<TAssistedDining>> pageList(@RequestBody AssistedDiningListQuery query) { |
| | | return R.ok(assistedDiningService.pageList(query)); |
| | | } |
| | | |
| | | @ApiOperation(value = "添加") |
| | | @Transactional |
| | | @Log(title = "助餐信息-添加", businessType = BusinessType.INSERT) |
| | | @PostMapping(value = "/add") |
| | | public R<Boolean> save(@RequestBody TAssistedDining dto) { |
| | | assistedDiningService.save(dto); |
| | | return R.ok(); |
| | | } |
| | | @ApiOperation(value = "修改") |
| | | @Log(title = "助餐信息-修改", businessType = BusinessType.UPDATE) |
| | | @PostMapping(value = "/edit") |
| | | public R<Boolean> edit(@RequestBody TAssistedDining dto) { |
| | | assistedDiningService.updateById(dto); |
| | | return R.ok(); |
| | | } |
| | | @Log(title = "助餐信息-删除", businessType = BusinessType.DELETE) |
| | | @ApiOperation(value = "助餐信息-删除") |
| | | @DeleteMapping(value = "/deleteById") |
| | | public R<Boolean> deleteById(@RequestParam String id) { |
| | | return R.ok(assistedDiningService.removeById(id)); |
| | | } |
| | | |
| | | /** |
| | | * 批量删除助餐信息 |
| | | */ |
| | | @Log(title = "助餐信息-批量删除", businessType = BusinessType.DELETE) |
| | | @ApiOperation(value = "助餐信息-批量删除") |
| | | @DeleteMapping(value = "/deleteByIds") |
| | | public R<Boolean> deleteByIds(@RequestBody List<String> ids) { |
| | | return R.ok(assistedDiningService.removeByIds(ids)); |
| | | } |
| | | @ApiOperation(value = "查看详情") |
| | | @GetMapping(value = "/detail") |
| | | public R<TAssistedDining> detail(Integer id) { |
| | | return R.ok(assistedDiningService.getById( id)); |
| | | } |
| | | } |
| | | |
| | |
| | | package com.ruoyi.web.controller.api; |
| | | |
| | | |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | import com.ruoyi.common.annotation.Log; |
| | | import com.ruoyi.common.basic.PageInfo; |
| | | import com.ruoyi.common.core.domain.R; |
| | | import com.ruoyi.common.core.domain.entity.SysUser; |
| | | import com.ruoyi.common.enums.BusinessType; |
| | | import com.ruoyi.system.model.TAppUser; |
| | | import com.ruoyi.system.model.TBanner; |
| | | import com.ruoyi.system.query.AppUserListQuery; |
| | | import com.ruoyi.system.query.BannerListQuery; |
| | | import com.ruoyi.system.service.TBannerService; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | import java.time.LocalDateTime; |
| | | import java.util.Arrays; |
| | | import java.util.List; |
| | | import java.util.stream.Collectors; |
| | | |
| | | /** |
| | | * <p> |
| | |
| | | */ |
| | | @RestController |
| | | @RequestMapping("/t-banner") |
| | | @Api(tags = "轮播图管理") |
| | | public class TBannerController { |
| | | @Autowired |
| | | private TBannerService bannerService; |
| | | @ApiOperation(value = "轮播图管理分页列表") |
| | | @PostMapping(value = "/pageList") |
| | | public R<PageInfo<TBanner>> pageList(@RequestBody BannerListQuery query) { |
| | | return R.ok(bannerService.pageList(query)); |
| | | } |
| | | |
| | | @ApiOperation(value = "添加") |
| | | @Transactional |
| | | @Log(title = "轮播图管理-添加", businessType = BusinessType.INSERT) |
| | | @PostMapping(value = "/add") |
| | | public R<Boolean> save(@RequestBody TBanner entity) { |
| | | bannerService.save(entity); |
| | | return R.ok(); |
| | | } |
| | | @ApiOperation(value = "修改") |
| | | @Log(title = "轮播图管理-修改", businessType = BusinessType.UPDATE) |
| | | @PostMapping(value = "/edit") |
| | | public R<Boolean> edit(@RequestBody TBanner entity) { |
| | | bannerService.updateById(entity); |
| | | return R.ok(); |
| | | } |
| | | @Log(title = "轮播图管理-删除", businessType = BusinessType.DELETE) |
| | | @ApiOperation(value = "轮播图管理-删除") |
| | | @DeleteMapping(value = "/delete") |
| | | public R delete(@RequestParam String ids) { |
| | | List<Integer> res = Arrays.stream(ids.split(",")).map(Integer::parseInt).collect(Collectors.toList()); |
| | | // 转换成Integer |
| | | bannerService.removeBatchByIds(res); |
| | | return R.ok(); |
| | | } |
| | | } |
| | | |
| | |
| | | package com.ruoyi.web.controller.api; |
| | | |
| | | |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import com.ruoyi.common.annotation.Log; |
| | | import com.ruoyi.common.basic.PageInfo; |
| | | import com.ruoyi.common.core.domain.R; |
| | | import com.ruoyi.common.enums.BusinessType; |
| | | import com.ruoyi.system.model.TAppUser; |
| | | import com.ruoyi.system.model.THelpNeeds; |
| | | import com.ruoyi.system.model.THelpNeeds; |
| | | import com.ruoyi.system.query.AssistedDiningListQuery; |
| | | import com.ruoyi.system.query.HelpNeedsListQuery; |
| | | import com.ruoyi.system.service.THelpNeedsService; |
| | | import com.ruoyi.system.service.THelpNeedsService; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | import java.util.Arrays; |
| | | import java.util.List; |
| | | import java.util.stream.Collectors; |
| | | |
| | | /** |
| | | * <p> |
| | |
| | | */ |
| | | @RestController |
| | | @RequestMapping("/t-help-needs") |
| | | @Api(tags = "助需管理") |
| | | public class THelpNeedsController { |
| | | @Autowired |
| | | private THelpNeedsService helpNeedsService; |
| | | @ApiOperation(value = "助需管理分页列表") |
| | | @PostMapping(value = "/pageList") |
| | | public R<PageInfo<THelpNeeds>> pageList(@RequestBody HelpNeedsListQuery query) { |
| | | return R.ok(helpNeedsService.pageList(query)); |
| | | } |
| | | |
| | | @ApiOperation(value = "添加") |
| | | @Transactional |
| | | @Log(title = "助需管理-添加", businessType = BusinessType.INSERT) |
| | | @PostMapping(value = "/add") |
| | | public R<Boolean> save(@RequestBody THelpNeeds dto) { |
| | | helpNeedsService.save(dto); |
| | | return R.ok(); |
| | | } |
| | | @ApiOperation(value = "修改") |
| | | @Log(title = "助需管理-修改", businessType = BusinessType.UPDATE) |
| | | @PostMapping(value = "/edit") |
| | | public R<Boolean> edit(@RequestBody THelpNeeds dto) { |
| | | helpNeedsService.updateById(dto); |
| | | return R.ok(); |
| | | } |
| | | @Log(title = "助需管理-删除", businessType = BusinessType.DELETE) |
| | | @ApiOperation(value = "助需管理-删除") |
| | | @DeleteMapping(value = "/deleteById") |
| | | public R<Boolean> deleteById(@RequestParam String id) { |
| | | return R.ok(helpNeedsService.removeById(id)); |
| | | } |
| | | |
| | | /** |
| | | * 批量删除助需管理 |
| | | */ |
| | | @Log(title = "助需管理-批量删除", businessType = BusinessType.DELETE) |
| | | @ApiOperation(value = "助需管理-批量删除") |
| | | @DeleteMapping(value = "/deleteByIds") |
| | | public R<Boolean> deleteByIds(@RequestBody List<String> ids) { |
| | | return R.ok(helpNeedsService.removeByIds(ids)); |
| | | } |
| | | @ApiOperation(value = "查看详情") |
| | | @GetMapping(value = "/detail") |
| | | public R<THelpNeeds> detail(Integer id) { |
| | | return R.ok(helpNeedsService.getById( id)); |
| | | } |
| | | } |
| | | |
| | |
| | | import com.ruoyi.common.enums.BusinessType; |
| | | import com.ruoyi.system.model.THtmlConfig; |
| | | import com.ruoyi.system.service.THtmlConfigService; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.validation.annotation.Validated; |
| | |
| | | */ |
| | | @RestController |
| | | @RequestMapping("/t-html-config") |
| | | @Api(tags = "基础信息管理-协议管理") |
| | | public class THtmlConfigController { |
| | | |
| | | private final THtmlConfigService htmlConfigService; |
| | |
| | | package com.ruoyi.web.controller.api; |
| | | |
| | | |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import cn.afterturn.easypoi.excel.ExcelExportUtil; |
| | | import cn.afterturn.easypoi.excel.ExcelImportUtil; |
| | | import cn.afterturn.easypoi.excel.entity.ExportParams; |
| | | import cn.afterturn.easypoi.excel.entity.ImportParams; |
| | | import cn.hutool.json.JSONObject; |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | import com.ruoyi.common.annotation.Log; |
| | | import com.ruoyi.common.basic.PageInfo; |
| | | import com.ruoyi.common.core.domain.R; |
| | | import com.ruoyi.common.core.domain.entity.SysUser; |
| | | import com.ruoyi.common.core.exception.ServiceException; |
| | | import com.ruoyi.common.enums.BusinessType; |
| | | import com.ruoyi.common.utils.WebUtils; |
| | | import com.ruoyi.system.export.OldsterImport; |
| | | import com.ruoyi.system.model.TOldster; |
| | | import com.ruoyi.system.query.BannerListQuery; |
| | | import com.ruoyi.system.query.OldsterListQuery; |
| | | import com.ruoyi.system.service.TOldsterService; |
| | | import com.ruoyi.system.service.TOldsterService; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.apache.poi.ss.usermodel.Workbook; |
| | | import org.springframework.beans.BeanUtils; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.transaction.annotation.Propagation; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | import org.springframework.util.CollectionUtils; |
| | | import org.springframework.util.StringUtils; |
| | | import org.springframework.web.bind.annotation.*; |
| | | import org.springframework.web.multipart.MultipartFile; |
| | | |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | import javax.servlet.ServletOutputStream; |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import java.io.IOException; |
| | | import java.io.InputStream; |
| | | import java.net.URLEncoder; |
| | | import java.time.LocalDate; |
| | | import java.time.format.DateTimeFormatter; |
| | | import java.util.ArrayList; |
| | | import java.util.Arrays; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | import java.util.stream.Collectors; |
| | | |
| | | /** |
| | | * <p> |
| | |
| | | * @since 2025-11-06 |
| | | */ |
| | | @RestController |
| | | @Slf4j |
| | | @RequestMapping("/t-oldster") |
| | | @Api(tags = "老人户籍信息") |
| | | public class TOldsterController { |
| | | @Autowired |
| | | private TOldsterService oldsterService; |
| | | @ApiOperation(value = "老人户籍信息分页列表") |
| | | @PostMapping(value = "/pageList") |
| | | public R<PageInfo<TOldster>> pageList(@RequestBody OldsterListQuery query) { |
| | | return R.ok(oldsterService.pageList(query)); |
| | | } |
| | | |
| | | @ApiOperation(value = "添加") |
| | | @Transactional |
| | | @Log(title = "老人户籍信息-添加", businessType = BusinessType.INSERT) |
| | | @PostMapping(value = "/add") |
| | | public R<Boolean> save(@RequestBody TOldster dto) { |
| | | oldsterService.save(dto); |
| | | return R.ok(); |
| | | } |
| | | @ApiOperation(value = "修改") |
| | | @Log(title = "老人户籍信息-修改", businessType = BusinessType.UPDATE) |
| | | @PostMapping(value = "/edit") |
| | | public R<Boolean> edit(@RequestBody TOldster dto) { |
| | | oldsterService.updateById(dto); |
| | | return R.ok(); |
| | | } |
| | | /** |
| | | * 删除老人户籍信息 |
| | | */ |
| | | @Log(title = "老人户籍信息-删除", businessType = BusinessType.DELETE) |
| | | @ApiOperation(value = "老人户籍信息-删除") |
| | | @DeleteMapping(value = "/deleteById") |
| | | public R<Boolean> deleteById(@RequestParam String id) { |
| | | return R.ok(oldsterService.removeById(id)); |
| | | } |
| | | |
| | | /** |
| | | * 批量删除老人户籍信息 |
| | | */ |
| | | @Log(title = "老人户籍信息-批量删除", businessType = BusinessType.DELETE) |
| | | @ApiOperation(value = "老人户籍信息-批量删除") |
| | | @DeleteMapping(value = "/deleteByIds") |
| | | public R<Boolean> deleteByIds(@RequestBody List<String> ids) { |
| | | return R.ok(oldsterService.removeByIds(ids)); |
| | | } |
| | | @ApiOperation(value = "导入模板下载") |
| | | @GetMapping("/import-template") |
| | | public void importTemplate() { |
| | | List<OldsterImport> assetHouseInspectionImports = new ArrayList<>(); |
| | | OldsterImport temp = new OldsterImport(); |
| | | assetHouseInspectionImports.add(temp); |
| | | Workbook workbook = ExcelExportUtil.exportExcel(new ExportParams(), OldsterImport.class, assetHouseInspectionImports); |
| | | HttpServletResponse response = WebUtils.response(); |
| | | ServletOutputStream outputStream = null; |
| | | try { |
| | | String fileName = URLEncoder.encode("老人户籍信息导入模板.xls", "utf-8"); |
| | | response.setHeader("Content-Disposition", "attachment;filename=" + fileName); |
| | | response.setHeader("content-Type", "application/vnd.ms-excel"); |
| | | response.setHeader("Pragma", "no-cache"); |
| | | response.setHeader("Cache-Control", "no-cache"); |
| | | outputStream = response.getOutputStream(); |
| | | workbook.write(outputStream); |
| | | } catch (IOException e) { |
| | | e.printStackTrace(); |
| | | System.out.println("老人户籍信息导入模板下载失败!"); |
| | | } finally { |
| | | try { |
| | | outputStream.close(); |
| | | } catch (IOException e) { |
| | | e.printStackTrace(); |
| | | } |
| | | } |
| | | } |
| | | @Log(title = "老人户籍信息导入", businessType = BusinessType.INSERT) |
| | | @ApiOperation(value = "老人户籍信息导入") |
| | | @Transactional(rollbackFor = Exception.class, propagation = Propagation.REQUIRES_NEW) |
| | | @PostMapping("/import") |
| | | public R<String> importLocation(@RequestPart("file") MultipartFile file) { |
| | | List<TOldster> oldsters = new ArrayList<>(); |
| | | ImportParams params = new ImportParams(); |
| | | params.setHeadRows(1); //表头行数 |
| | | InputStream inputStream = null; |
| | | List<OldsterImport> assetHouseInspectionImports; |
| | | try { |
| | | inputStream = file.getInputStream(); |
| | | assetHouseInspectionImports = ExcelImportUtil.importExcel(inputStream, |
| | | OldsterImport.class, params); |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | | log.error("老人户籍信息导入失败:{}", e.getMessage()); |
| | | throw new ServiceException("老人户籍信息导入失败!"); |
| | | } finally { |
| | | try { |
| | | inputStream.close(); |
| | | } catch (IOException e) { |
| | | throw new ServiceException(e.getMessage()); |
| | | } |
| | | } |
| | | if (CollectionUtils.isEmpty(assetHouseInspectionImports)) { |
| | | throw new ServiceException("老人户籍信息数据为空!"); |
| | | } |
| | | JSONObject result = new JSONObject(); |
| | | int i = 1; |
| | | for (OldsterImport oldsterImport : assetHouseInspectionImports) { |
| | | if (!StringUtils.hasLength(oldsterImport.getOldsterName())){ |
| | | result.append("第"+i+"行:[", "老人姓名"+"]不能为空"); |
| | | } |
| | | if (oldsterImport.getOldsterAge()!=null){ |
| | | result.append("第"+i+"行:[", "老人年龄"+"]不能为空"); |
| | | } |
| | | if (oldsterImport.getOldsterSex()!=null){ |
| | | result.append("第"+i+"行:[", "老人性别"+"]不能为空"); |
| | | } |
| | | if (!StringUtils.hasLength(oldsterImport.getContactPhone())){ |
| | | result.append("第"+i+"行:[", "联系方式"+"]不能为空"); |
| | | } |
| | | if (oldsterImport.getOldsterType()!=null){ |
| | | result.append("第"+i+"行:[", "人员类型"+"]不能为空"); |
| | | } |
| | | if (!StringUtils.hasLength(oldsterImport.getAddress())){ |
| | | result.append("第"+i+"行:[", "居住地址"+"]不能为空"); |
| | | } |
| | | TOldster tOldster = new TOldster(); |
| | | BeanUtils.copyProperties(oldsterImport, tOldster); |
| | | oldsters.add(tOldster); |
| | | i++; |
| | | } |
| | | oldsterService.saveBatch(oldsters); |
| | | if(!result.isEmpty()){ |
| | | return R.fail(result.toString()); |
| | | } |
| | | return R.ok(); |
| | | } |
| | | } |
| | | |
| New file |
| | |
| | | package com.ruoyi.web.controller.api; |
| | | |
| | | |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | |
| | | /** |
| | | * <p> |
| | | * 老人预警 前端控制器 |
| | | * </p> |
| | | * |
| | | * @author xiaochen |
| | | * @since 2025-11-06 |
| | | */ |
| | | @RestController |
| | | @RequestMapping("/t-oldster-warning") |
| | | public class TOldsterWarningController { |
| | | |
| | | } |
| | | |
| New file |
| | |
| | | package com.ruoyi.web.controller.api; |
| | | |
| | | |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | |
| | | /** |
| | | * <p> |
| | | * 系统其他设置 前端控制器 |
| | | * </p> |
| | | * |
| | | * @author xiaochen |
| | | * @since 2025-11-06 |
| | | */ |
| | | @RestController |
| | | @RequestMapping("/t-other-config") |
| | | public class TOtherConfigController { |
| | | |
| | | } |
| | | |
| New file |
| | |
| | | package com.ruoyi.web.controller.api; |
| | | |
| | | |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | |
| | | /** |
| | | * <p> |
| | | * 简答题答案 前端控制器 |
| | | * </p> |
| | | * |
| | | * @author xiaochen |
| | | * @since 2025-11-06 |
| | | */ |
| | | @RestController |
| | | @RequestMapping("/t-questionnaire-stem-brief-answer") |
| | | public class TQuestionnaireStemBriefAnswerController { |
| | | |
| | | } |
| | | |
| | |
| | | // @PreAuthorize("@ss.hasPermi('system:user:add')") |
| | | @ApiOperation(value = "新增用户管理",response = SysUser.class) |
| | | @Log(title = "用户信息-新增用户", businessType = BusinessType.INSERT) |
| | | @PostMapping("/api/system/user/add") |
| | | public R<String> add(@RequestBody String param) |
| | | @PostMapping("/system/user/add") |
| | | public R<String> add(@RequestBody SysUser user) |
| | | { |
| | | SysUser user = JSON.parseObject(param,SysUser.class); |
| | | user.setUserName(user.getUserName()); |
| | | if (!userService.checkUserNameUnique(user)) |
| | | { |
| | |
| | | } |
| | | user.setCreateBy(getUsername()); |
| | | user.setPassword(SecurityUtils.encryptPassword("123456")); |
| | | user.setRoleType(Integer.parseInt(user.getRoleId().toString())); |
| | | user.setUserIdentification(CodeGenerateUtils.generateVolumeSn()); |
| | | userService.insertUser(user); |
| | | return R.ok(); |
| | | } |
| | |
| | | // @PreAuthorize("@ss.hasPermi('system:user:edit')") |
| | | @ApiOperation(value = "修改用户管理") |
| | | @Log(title = "用户信息-修改用户", businessType = BusinessType.UPDATE) |
| | | @PostMapping("/api/system/user/edit") |
| | | public R edit(@RequestBody String param) |
| | | @PostMapping("/system/user/edit") |
| | | public R edit(@RequestBody SysUser user) |
| | | { |
| | | SysUser user = JSON.parseObject(param,SysUser.class); |
| | | user.setUserName(user.getPhonenumber()); |
| | | // userService.checkUserAllowed(user); |
| | | // userService.checkUserDataScope(user.getUserId()); |
| | |
| | | if(StringUtils.isNotEmpty(user.getPassword())){ |
| | | user.setPassword(SecurityUtils.encryptPassword(user.getPassword())); |
| | | } |
| | | user.setRoleType(Integer.parseInt(user.getRoleId().toString())); |
| | | return R.ok(userService.updateUser(user)); |
| | | } |
| | | |
| | |
| | | // @PreAuthorize("@ss.hasPermi('system:user:resetPwd')") |
| | | @ApiOperation(value = "重置密码") |
| | | @Log(title = "用户信息-重置密码", businessType = BusinessType.UPDATE) |
| | | @PostMapping("/api/system/user/resetPwd") |
| | | public AjaxResult resetPwd(@RequestBody String param) |
| | | @PostMapping("/system/user/resetPwd") |
| | | public AjaxResult resetPwd(@RequestBody SysUser user) |
| | | { |
| | | SysUser user = JSON.parseObject(param,SysUser.class); |
| | | userService.checkUserAllowed(user); |
| | | // userService.checkUserDataScope(user.getUserId()); |
| | | user.setPassword(SecurityUtils.encryptPassword(user.getPassword())); |
| | |
| | | /** |
| | | * 状态修改 |
| | | */ |
| | | // @ApiOperation(value = "状态修改") |
| | | // @Log(title = "用户信息-状态修改", businessType = BusinessType.UPDATE) |
| | | // @PutMapping("/system/user/changeStatus") |
| | | // public AjaxResult changeStatus(@RequestBody SysUserUpdateStatusDTO dto) |
| | | // { |
| | | // SysUser loginUser = tokenService.getLoginUser().getUser(); |
| | | // SysUser user = new SysUser(); |
| | | // user.setUserId(dto.getUserId()); |
| | | // user.setStatus(String.valueOf(dto.getStatus())); |
| | | //// user.setRemark(dto.getRemark()); |
| | | // user.setUpdateBy(getUsername()); |
| | | // user.setDisableRemark(dto.getRemark()); |
| | | // user.setOperatingTime(LocalDateTime.now()); |
| | | // user.setOperatingPerson(loginUser.getNickName()+"("+loginUser.getUserName()+")"); |
| | | // return AjaxResult.success(userService.updateUserStatus(user)); |
| | | // } |
| | | @ApiOperation(value = "禁用") |
| | | @Log(title = "用户信息-禁用", businessType = BusinessType.UPDATE) |
| | | @PutMapping("/system/user/off") |
| | | public AjaxResult off(Long userId,String disableRemark) |
| | | { |
| | | SysUser user = userService.selectUserById(userId); |
| | | user.setDisableRemark(disableRemark); |
| | | user.setStatus("1"); |
| | | return AjaxResult.success(userService.updateUser(user)); |
| | | } |
| | | @ApiOperation(value = "启用") |
| | | @Log(title = "用户信息-启用", businessType = BusinessType.UPDATE) |
| | | @PutMapping("/system/user/on") |
| | | public AjaxResult on(Long userId) |
| | | { |
| | | SysUser user = userService.selectUserById(userId); |
| | | user.setStatus("0"); |
| | | user.setDisableRemark(null); |
| | | return AjaxResult.success(userService.updateUser(user)); |
| | | } |
| | | |
| | | /** |
| | | * 根据用户编号获取授权角色 |
| | |
| | | //@Excel(name = "用户名称") |
| | | @ApiModelProperty(value = "用户名称") |
| | | private String nickName; |
| | | @ApiModelProperty(value = "禁用备注") |
| | | private String disableRemark; |
| | | |
| | | /** 用户邮箱 */ |
| | | //@Excel(name = "用户邮箱") |
| | |
| | | /** 角色ID */ |
| | | @ApiModelProperty(value = "角色ID") |
| | | private Long roleId; |
| | | /** |
| | | * 是否为黑名单 1是 0否 |
| | | */ |
| | | @ApiModelProperty(value = "是否为黑名单 1是 0否") |
| | | private Integer ifBlack; |
| | | |
| | | /** |
| | | * 区县id |
| | | */ |
| | | @ApiModelProperty(value = "区县id") |
| | | private Integer districtId; |
| | | /** 角色类型 1=超管 2=审批人 3=工艺工程师 4=化验师 5=实验员 */ |
| | | @ApiModelProperty(value = "角色类型 1=超管 2=审批人 3=工艺工程师 4=化验师 5=实验员") |
| | | private Integer roleType; |
| | | |
| | | |
| | | @TableField(exist = false) |
| | | private String roleName; |
| | | @TableField(exist = false) |
| | |
| | | @TableField(exist = false) |
| | | private List<String> deptIds; |
| | | |
| | | @ApiModelProperty(value = "营业部id") |
| | | @TableField("business_dept_id") |
| | | private String businessDeptId; |
| | | |
| | | @ApiModelProperty(value = "签名照") |
| | | @TableField("sign_picture") |
| | | private String signPicture; |
| | | |
| | | @ApiModelProperty(value = "用户唯一标识") |
| | | @TableField("userIdentification") |
| | | private String userIdentification; |
| | | @ApiModelProperty(value = "继承账号id") |
| | | @TableField("parentId") |
| | | private Long parentId; |
| | | @ApiModelProperty(value = "继承账号") |
| | | @TableField("parentAccount") |
| | | private String parentAccount; |
| | | @ApiModelProperty(value = "分配") |
| | | @TableField("allocateIp") |
| | | private String allocateIp; |
| | | |
| | | public Integer getRoleType() { |
| | | return roleType; |
| | | } |
| | | |
| | | public void setRoleType(Integer roleType) { |
| | | this.roleType = roleType; |
| | | } |
| | | |
| | | public String getRoleName() { |
| | | return roleName; |
| | |
| | | this.roleName = roleName; |
| | | } |
| | | |
| | | public Integer getDistrictId() { |
| | | return districtId; |
| | | } |
| | | |
| | | public void setDistrictId(Integer districtId) { |
| | | this.districtId = districtId; |
| | | } |
| | | |
| | | public SysUser() |
| | | { |
| | |
| | | this.roleId = roleId; |
| | | } |
| | | |
| | | public Integer getIfBlack() { |
| | | return ifBlack; |
| | | } |
| | | |
| | | public void setIfBlack(Integer ifBlack) { |
| | | this.ifBlack = ifBlack; |
| | | } |
| | | |
| | | @Override |
| | | public String toString() { |
| New file |
| | |
| | | package com.ruoyi.system.export; |
| | | |
| | | import cn.afterturn.easypoi.excel.annotation.Excel; |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | | import com.baomidou.mybatisplus.annotation.TableField; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | import java.io.Serializable; |
| | | import java.time.LocalDate; |
| | | |
| | | @Data |
| | | @ApiModel(value = "老人户籍信息导入excel") |
| | | public class OldsterImport implements Serializable { |
| | | |
| | | @Excel(name = "老人姓名",width = 20) |
| | | @ApiModelProperty(value = "老人姓名") |
| | | private String oldsterName; |
| | | |
| | | @ApiModelProperty(value = "老人年龄") |
| | | @Excel(name = "老人年龄",width = 20) |
| | | private Integer oldsterAge; |
| | | |
| | | @ApiModelProperty(value = "性别 1=男 2=女") |
| | | @Excel(name = "性别",width = 20) |
| | | private Integer oldsterSex; |
| | | |
| | | @ApiModelProperty(value = "联系方式") |
| | | @Excel(name = "联系方式",width = 20) |
| | | private String contactPhone; |
| | | |
| | | @ApiModelProperty(value = "监护人姓名") |
| | | @Excel(name = "监护人姓名",width = 20) |
| | | private String guardianName; |
| | | |
| | | @ApiModelProperty(value = "监护人电话") |
| | | @Excel(name = "监护人电话",width = 20) |
| | | private String guardianPhone; |
| | | |
| | | |
| | | @ApiModelProperty(value = "身份证") |
| | | @Excel(name = "身份证",width = 40) |
| | | private String idCard; |
| | | |
| | | @ApiModelProperty(value = "出生日期") |
| | | @Excel(name = "出生日期",width = 20) |
| | | private String birthDate; |
| | | |
| | | @ApiModelProperty(value = "人员类型 1=独居老人 2=高龄老人 3=散居特困供养老人 4=失能老人") |
| | | @Excel(name = "人员类型",width = 20) |
| | | private String oldsterType; |
| | | |
| | | @ApiModelProperty(value = "居住地址") |
| | | @Excel(name = "居住地址",width = 50) |
| | | private String address; |
| | | |
| | | } |
| | |
| | | package com.ruoyi.system.mapper; |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.ruoyi.common.basic.PageInfo; |
| | | import com.ruoyi.system.model.TAppUser; |
| | | import com.ruoyi.system.query.AppUserListQuery; |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * <p> |
| | |
| | | */ |
| | | public interface TAppUserMapper extends BaseMapper<TAppUser> { |
| | | |
| | | List<TAppUser> pageList(@Param("query")AppUserListQuery query,@Param("pageInfo") PageInfo<TAppUser> pageInfo); |
| | | } |
| | |
| | | package com.ruoyi.system.mapper; |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.ruoyi.common.basic.PageInfo; |
| | | import com.ruoyi.system.model.TAssistedDining; |
| | | import com.ruoyi.system.query.AssistedDiningListQuery; |
| | | import org.apache.ibatis.annotations.Param; |
| | | import org.springframework.security.core.parameters.P; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * <p> |
| | |
| | | */ |
| | | public interface TAssistedDiningMapper extends BaseMapper<TAssistedDining> { |
| | | |
| | | List<TAssistedDining> pageList(@Param("query") AssistedDiningListQuery query,@Param("pageInfo") PageInfo<TAssistedDining> pageInfo); |
| | | } |
| | |
| | | package com.ruoyi.system.mapper; |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.ruoyi.common.basic.PageInfo; |
| | | import com.ruoyi.system.model.TBanner; |
| | | import com.ruoyi.system.query.BannerListQuery; |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * <p> |
| | |
| | | */ |
| | | public interface TBannerMapper extends BaseMapper<TBanner> { |
| | | |
| | | List<TBanner> pageList(@Param("query")BannerListQuery query, @Param("pageInfo")PageInfo<TBanner> pageInfo); |
| | | |
| | | } |
| | |
| | | package com.ruoyi.system.mapper; |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.ruoyi.common.basic.PageInfo; |
| | | import com.ruoyi.system.model.THelpNeeds; |
| | | import com.ruoyi.system.query.HelpNeedsListQuery; |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * <p> |
| | |
| | | */ |
| | | public interface THelpNeedsMapper extends BaseMapper<THelpNeeds> { |
| | | |
| | | List<THelpNeeds> pageList(@Param("query") HelpNeedsListQuery query, @Param("pageInfo") PageInfo<THelpNeeds> pageInfo); |
| | | |
| | | } |
| | |
| | | package com.ruoyi.system.mapper; |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.ruoyi.common.basic.PageInfo; |
| | | import com.ruoyi.system.model.TOldster; |
| | | import com.ruoyi.system.query.OldsterListQuery; |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * <p> |
| | |
| | | */ |
| | | public interface TOldsterMapper extends BaseMapper<TOldster> { |
| | | |
| | | List<TOldster> pageList(@Param("query") OldsterListQuery query,@Param("pageInfo") PageInfo<TOldster> pageInfo); |
| | | |
| | | } |
| New file |
| | |
| | | package com.ruoyi.system.mapper; |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.ruoyi.system.model.TOldsterWarning; |
| | | |
| | | /** |
| | | * <p> |
| | | * 老人预警 Mapper 接口 |
| | | * </p> |
| | | * |
| | | * @author xiaochen |
| | | * @since 2025-11-06 |
| | | */ |
| | | public interface TOldsterWarningMapper extends BaseMapper<TOldsterWarning> { |
| | | |
| | | } |
| New file |
| | |
| | | package com.ruoyi.system.mapper; |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.ruoyi.system.model.TOtherConfig; |
| | | |
| | | /** |
| | | * <p> |
| | | * 系统其他设置 Mapper 接口 |
| | | * </p> |
| | | * |
| | | * @author xiaochen |
| | | * @since 2025-11-06 |
| | | */ |
| | | public interface TOtherConfigMapper extends BaseMapper<TOtherConfig> { |
| | | |
| | | } |
| New file |
| | |
| | | package com.ruoyi.system.mapper; |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.ruoyi.system.model.TQuestionnaireStemBriefAnswer; |
| | | |
| | | /** |
| | | * <p> |
| | | * 简答题答案 Mapper 接口 |
| | | * </p> |
| | | * |
| | | * @author xiaochen |
| | | * @since 2025-11-06 |
| | | */ |
| | | public interface TQuestionnaireStemBriefAnswerMapper extends BaseMapper<TQuestionnaireStemBriefAnswer> { |
| | | |
| | | } |
| | |
| | | @TableId(value = "id", type = IdType.ASSIGN_ID) |
| | | private String id; |
| | | |
| | | @ApiModelProperty(value = "类型 1=托育服务 2=阅芽计划 3=办事指南图文指引 4=暖心服务图片 5=注册协议 6=隐私政策 7=学习申请书 8=安全告知书 9=购买支付说明 10=微心愿风险提示 11=群众诉求服务说明 12=随手拍说明") |
| | | @ApiModelProperty(value = "类型 1=托育服务 2=阅芽计划 3=办事指南图文指引 4=暖心服务图片 5=注册协议 6=隐私政策 7=学习申请书 8=安全告知书 9=购买支付说明 10=微心愿风险提示 11=群众诉求服务说明 12=随手拍说明 13=康年年图文介绍") |
| | | @TableField("config_type") |
| | | private Integer configType; |
| | | |
| New file |
| | |
| | | package com.ruoyi.system.model; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.*; |
| | | import com.ruoyi.common.core.domain.BaseModel; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | import lombok.EqualsAndHashCode; |
| | | |
| | | import java.io.Serializable; |
| | | import java.time.LocalDateTime; |
| | | |
| | | /** |
| | | * <p> |
| | | * 老人预警 |
| | | * </p> |
| | | * |
| | | * @author xiaochen |
| | | * @since 2025-11-06 |
| | | */ |
| | | @Data |
| | | @EqualsAndHashCode(callSuper = false) |
| | | @TableName("t_oldster_warning") |
| | | @ApiModel(value="TOldsterWarning对象", description="老人预警") |
| | | public class TOldsterWarning extends BaseModel { |
| | | |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | @TableId(value = "id", type = IdType.ASSIGN_ID) |
| | | private String id; |
| | | |
| | | @ApiModelProperty(value = "老人户籍id") |
| | | @TableField("oldster_id") |
| | | private String oldsterId; |
| | | |
| | | @ApiModelProperty(value = "预警时间") |
| | | @TableField("warning_time") |
| | | private LocalDateTime warningTime; |
| | | |
| | | } |
| New file |
| | |
| | | package com.ruoyi.system.model; |
| | | |
| | | 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 io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | import lombok.EqualsAndHashCode; |
| | | |
| | | import java.io.Serializable; |
| | | |
| | | /** |
| | | * <p> |
| | | * 系统其他设置 |
| | | * </p> |
| | | * |
| | | * @author xiaochen |
| | | * @since 2025-11-06 |
| | | */ |
| | | @Data |
| | | @EqualsAndHashCode(callSuper = false) |
| | | @TableName("t_other_config") |
| | | @ApiModel(value="TOtherConfig对象", description="系统其他设置") |
| | | public class TOtherConfig implements Serializable { |
| | | |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | @TableId(value = "id", type = IdType.ASSIGN_ID) |
| | | private String id; |
| | | |
| | | @ApiModelProperty(value = "老人年龄") |
| | | @TableField("elderly_age") |
| | | private Integer elderlyAge; |
| | | |
| | | @ApiModelProperty(value = "天数") |
| | | @TableField("days") |
| | | private Integer days; |
| | | |
| | | |
| | | } |
| New file |
| | |
| | | package com.ruoyi.system.model; |
| | | |
| | | 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 io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | import lombok.EqualsAndHashCode; |
| | | |
| | | import java.io.Serializable; |
| | | |
| | | /** |
| | | * <p> |
| | | * 简答题答案 |
| | | * </p> |
| | | * |
| | | * @author xiaochen |
| | | * @since 2025-11-06 |
| | | */ |
| | | @Data |
| | | @EqualsAndHashCode(callSuper = false) |
| | | @TableName("t_questionnaire_stem_brief_answer") |
| | | @ApiModel(value="TQuestionnaireStemBriefAnswer对象", description="简答题答案") |
| | | public class TQuestionnaireStemBriefAnswer implements Serializable { |
| | | |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | @TableId(value = "id", type = IdType.ASSIGN_ID) |
| | | private String id; |
| | | |
| | | @ApiModelProperty(value = "题干id") |
| | | @TableField("stem_id") |
| | | private String stemId; |
| | | |
| | | @ApiModelProperty(value = "用户id") |
| | | @TableField("app_user_id") |
| | | private String appUserId; |
| | | |
| | | @ApiModelProperty(value = "回答内容") |
| | | @TableField("answer_content") |
| | | private String answerContent; |
| | | |
| | | |
| | | } |
| New file |
| | |
| | | package com.ruoyi.system.query; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.TableField; |
| | | import com.ruoyi.common.core.domain.BasePage; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | @Data |
| | | @ApiModel(value = "用户管理分页列表query") |
| | | public class AppUserListQuery extends BasePage { |
| | | @ApiModelProperty(value = "用户昵称") |
| | | private String nickName; |
| | | @ApiModelProperty(value = "手机号") |
| | | private String phoneNumber; |
| | | @ApiModelProperty(value = "状态 1=使用中 2=冻结") |
| | | private Integer status; |
| | | } |
| New file |
| | |
| | | package com.ruoyi.system.query; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.TableField; |
| | | import com.ruoyi.common.core.domain.BasePage; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | @Data |
| | | @ApiModel(value = "助餐管理分页列表query") |
| | | public class AssistedDiningListQuery extends BasePage { |
| | | @ApiModelProperty(value = "点位名称") |
| | | private String pointName; |
| | | |
| | | @ApiModelProperty(value = "联系电话") |
| | | private String pointPhone; |
| | | } |
| New file |
| | |
| | | package com.ruoyi.system.query; |
| | | |
| | | import com.ruoyi.common.core.domain.BasePage; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | @Data |
| | | @ApiModel(value = "Banner管理分页列表query") |
| | | public class BannerListQuery extends BasePage { |
| | | |
| | | } |
| New file |
| | |
| | | package com.ruoyi.system.query; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.TableField; |
| | | import com.ruoyi.common.core.domain.BasePage; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | @Data |
| | | @ApiModel(value = "助需管理分页列表query") |
| | | public class HelpNeedsListQuery extends BasePage { |
| | | @ApiModelProperty(value = "发布人姓名") |
| | | private String nickName; |
| | | |
| | | @ApiModelProperty(value = "联系电话") |
| | | private String contactNumber; |
| | | @ApiModelProperty(value = "发布时间开始 yyyy-MM-dd HH:mm:ss") |
| | | private String startTime; |
| | | @ApiModelProperty(value = "发布时间结束 yyyy-MM-dd HH:mm:ss") |
| | | private String endTime; |
| | | } |
| New file |
| | |
| | | package com.ruoyi.system.query; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.TableField; |
| | | import com.ruoyi.common.core.domain.BasePage; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | @Data |
| | | @ApiModel(value = "老人户籍信息分页列表query") |
| | | public class OldsterListQuery extends BasePage { |
| | | @ApiModelProperty(value = "老人姓名") |
| | | private String oldsterName; |
| | | @ApiModelProperty(value = "人员类型 1=独居老人 2=高龄老人 3=散居特困供养老人 4=失能老人") |
| | | private Integer oldsterType; |
| | | |
| | | @ApiModelProperty(value = "联系方式") |
| | | private String contactPhone; |
| | | } |
| | |
| | | @ApiModelProperty(value = "角色id") |
| | | private List<Integer> roleIds; |
| | | |
| | | @ApiModelProperty(value = "部门id集合") |
| | | private List<String> deptIds; |
| | | |
| | | @ApiModelProperty(value = "状态 0=正常 1=停用") |
| | | private String status; |
| | | |
| | | @ApiModelProperty(value = "营业部id",hidden = true) |
| | | private String businessDeptId; |
| | | |
| | | |
| | | } |
| | |
| | | package com.ruoyi.system.service; |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.ruoyi.common.basic.PageInfo; |
| | | import com.ruoyi.system.model.TAppUser; |
| | | import com.ruoyi.system.query.AppUserListQuery; |
| | | |
| | | /** |
| | | * <p> |
| | |
| | | */ |
| | | public interface TAppUserService extends IService<TAppUser> { |
| | | |
| | | PageInfo<TAppUser> pageList(AppUserListQuery query); |
| | | |
| | | } |
| | |
| | | package com.ruoyi.system.service; |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.ruoyi.common.basic.PageInfo; |
| | | import com.ruoyi.system.model.TAssistedDining; |
| | | import com.ruoyi.system.query.AssistedDiningListQuery; |
| | | |
| | | /** |
| | | * <p> |
| | |
| | | */ |
| | | public interface TAssistedDiningService extends IService<TAssistedDining> { |
| | | |
| | | PageInfo<TAssistedDining> pageList(AssistedDiningListQuery query); |
| | | |
| | | } |
| | |
| | | package com.ruoyi.system.service; |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.ruoyi.common.basic.PageInfo; |
| | | import com.ruoyi.system.model.TBanner; |
| | | import com.ruoyi.system.query.BannerListQuery; |
| | | |
| | | /** |
| | | * <p> |
| | |
| | | */ |
| | | public interface TBannerService extends IService<TBanner> { |
| | | |
| | | |
| | | PageInfo<TBanner> pageList(BannerListQuery query); |
| | | |
| | | } |
| | |
| | | package com.ruoyi.system.service; |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.ruoyi.common.basic.PageInfo; |
| | | import com.ruoyi.system.model.THelpNeeds; |
| | | import com.ruoyi.system.query.HelpNeedsListQuery; |
| | | |
| | | /** |
| | | * <p> |
| | |
| | | */ |
| | | public interface THelpNeedsService extends IService<THelpNeeds> { |
| | | |
| | | PageInfo<THelpNeeds> pageList(HelpNeedsListQuery query); |
| | | } |
| | |
| | | package com.ruoyi.system.service; |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.ruoyi.common.basic.PageInfo; |
| | | import com.ruoyi.system.model.TOldster; |
| | | import com.ruoyi.system.query.OldsterListQuery; |
| | | |
| | | /** |
| | | * <p> |
| | |
| | | */ |
| | | public interface TOldsterService extends IService<TOldster> { |
| | | |
| | | PageInfo<TOldster> pageList(OldsterListQuery query); |
| | | } |
| New file |
| | |
| | | package com.ruoyi.system.service; |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.ruoyi.system.model.TOldsterWarning; |
| | | |
| | | /** |
| | | * <p> |
| | | * 老人预警 服务类 |
| | | * </p> |
| | | * |
| | | * @author xiaochen |
| | | * @since 2025-11-06 |
| | | */ |
| | | public interface TOldsterWarningService extends IService<TOldsterWarning> { |
| | | |
| | | } |
| New file |
| | |
| | | package com.ruoyi.system.service; |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.ruoyi.system.model.TOtherConfig; |
| | | |
| | | /** |
| | | * <p> |
| | | * 系统其他设置 服务类 |
| | | * </p> |
| | | * |
| | | * @author xiaochen |
| | | * @since 2025-11-06 |
| | | */ |
| | | public interface TOtherConfigService extends IService<TOtherConfig> { |
| | | |
| | | } |
| New file |
| | |
| | | package com.ruoyi.system.service; |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.ruoyi.system.model.TQuestionnaireStemBriefAnswer; |
| | | |
| | | /** |
| | | * <p> |
| | | * 简答题答案 服务类 |
| | | * </p> |
| | | * |
| | | * @author xiaochen |
| | | * @since 2025-11-06 |
| | | */ |
| | | public interface TQuestionnaireStemBriefAnswerService extends IService<TQuestionnaireStemBriefAnswer> { |
| | | |
| | | } |
| | |
| | | @Override |
| | | public PageInfo<SysUserVO> pageList(SysUserQuery query) { |
| | | PageInfo<SysUserVO> pageInfo = new PageInfo<>(query.getPageNum(), query.getPageSize()); |
| | | String businessDeptId = SecurityUtils.getBusinessDeptId(); |
| | | query.setBusinessDeptId(businessDeptId); |
| | | List<SysUserVO> list = userMapper.pageList(query,pageInfo); |
| | | if(CollectionUtils.isEmpty(list)){ |
| | | return pageInfo; |
| | |
| | | package com.ruoyi.system.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.ruoyi.common.basic.PageInfo; |
| | | import com.ruoyi.system.mapper.TAppUserMapper; |
| | | import com.ruoyi.system.model.TAppUser; |
| | | import com.ruoyi.system.query.AppUserListQuery; |
| | | import com.ruoyi.system.service.TAppUserService; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * <p> |
| | |
| | | @Service |
| | | public class TAppUserServiceImpl extends ServiceImpl<TAppUserMapper, TAppUser> implements TAppUserService { |
| | | |
| | | @Override |
| | | public PageInfo<TAppUser> pageList(AppUserListQuery query) { |
| | | PageInfo<TAppUser> pageInfo = new PageInfo<>(query.getPageNum(), query.getPageSize()); |
| | | List<TAppUser> list = this.baseMapper.pageList(query,pageInfo); |
| | | pageInfo.setRecords( list); |
| | | return pageInfo; |
| | | } |
| | | } |
| | |
| | | package com.ruoyi.system.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.ruoyi.common.basic.PageInfo; |
| | | import com.ruoyi.system.mapper.TAssistedDiningMapper; |
| | | import com.ruoyi.system.model.TAppUser; |
| | | import com.ruoyi.system.model.TAssistedDining; |
| | | import com.ruoyi.system.query.AssistedDiningListQuery; |
| | | import com.ruoyi.system.service.TAssistedDiningService; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * <p> |
| | |
| | | @Service |
| | | public class TAssistedDiningServiceImpl extends ServiceImpl<TAssistedDiningMapper, TAssistedDining> implements TAssistedDiningService { |
| | | |
| | | @Override |
| | | public PageInfo<TAssistedDining> pageList(AssistedDiningListQuery query) { |
| | | PageInfo<TAssistedDining> pageInfo = new PageInfo<>(query.getPageNum(), query.getPageSize()); |
| | | List<TAssistedDining> list = this.baseMapper.pageList(query,pageInfo); |
| | | pageInfo.setRecords( list); |
| | | return pageInfo; |
| | | } |
| | | } |
| | |
| | | package com.ruoyi.system.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.ruoyi.common.basic.PageInfo; |
| | | import com.ruoyi.system.mapper.TBannerMapper; |
| | | import com.ruoyi.system.model.TBanner; |
| | | import com.ruoyi.system.query.BannerListQuery; |
| | | import com.ruoyi.system.service.TBannerService; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * <p> |
| | |
| | | @Service |
| | | public class TBannerServiceImpl extends ServiceImpl<TBannerMapper, TBanner> implements TBannerService { |
| | | |
| | | |
| | | @Override |
| | | public PageInfo<TBanner> pageList(BannerListQuery query) { |
| | | PageInfo<TBanner> pageInfo = new PageInfo<>(query.getPageNum(), query.getPageSize()); |
| | | List<TBanner> list = this.baseMapper.pageList(query,pageInfo); |
| | | pageInfo.setRecords( list); |
| | | return pageInfo; |
| | | } |
| | | } |
| | |
| | | package com.ruoyi.system.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.ruoyi.common.basic.PageInfo; |
| | | import com.ruoyi.system.mapper.THelpNeedsMapper; |
| | | import com.ruoyi.system.model.TAssistedDining; |
| | | import com.ruoyi.system.model.THelpNeeds; |
| | | import com.ruoyi.system.query.HelpNeedsListQuery; |
| | | import com.ruoyi.system.service.THelpNeedsService; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * <p> |
| | |
| | | @Service |
| | | public class THelpNeedsServiceImpl extends ServiceImpl<THelpNeedsMapper, THelpNeeds> implements THelpNeedsService { |
| | | |
| | | @Override |
| | | public PageInfo<THelpNeeds> pageList(HelpNeedsListQuery query) { |
| | | PageInfo<THelpNeeds> pageInfo = new PageInfo<>(query.getPageNum(), query.getPageSize()); |
| | | List<THelpNeeds> list = this.baseMapper.pageList(query,pageInfo); |
| | | pageInfo.setRecords( list); |
| | | return pageInfo; |
| | | } |
| | | } |
| | |
| | | package com.ruoyi.system.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.ruoyi.common.basic.PageInfo; |
| | | import com.ruoyi.system.mapper.TOldsterMapper; |
| | | import com.ruoyi.system.model.TBanner; |
| | | import com.ruoyi.system.model.TOldster; |
| | | import com.ruoyi.system.query.OldsterListQuery; |
| | | import com.ruoyi.system.service.TOldsterService; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * <p> |
| | |
| | | @Service |
| | | public class TOldsterServiceImpl extends ServiceImpl<TOldsterMapper, TOldster> implements TOldsterService { |
| | | |
| | | @Override |
| | | public PageInfo<TOldster> pageList(OldsterListQuery query) { |
| | | PageInfo<TOldster> pageInfo = new PageInfo<>(query.getPageNum(), query.getPageSize()); |
| | | List<TOldster> list = this.baseMapper.pageList(query,pageInfo); |
| | | pageInfo.setRecords( list); |
| | | return pageInfo; |
| | | } |
| | | } |
| New file |
| | |
| | | package com.ruoyi.system.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.ruoyi.system.mapper.TOldsterWarningMapper; |
| | | import com.ruoyi.system.model.TOldsterWarning; |
| | | import com.ruoyi.system.service.TOldsterWarningService; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | /** |
| | | * <p> |
| | | * 老人预警 服务实现类 |
| | | * </p> |
| | | * |
| | | * @author xiaochen |
| | | * @since 2025-11-06 |
| | | */ |
| | | @Service |
| | | public class TOldsterWarningServiceImpl extends ServiceImpl<TOldsterWarningMapper, TOldsterWarning> implements TOldsterWarningService { |
| | | |
| | | } |
| New file |
| | |
| | | package com.ruoyi.system.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.ruoyi.system.mapper.TOtherConfigMapper; |
| | | import com.ruoyi.system.model.TOtherConfig; |
| | | import com.ruoyi.system.service.TOtherConfigService; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | /** |
| | | * <p> |
| | | * 系统其他设置 服务实现类 |
| | | * </p> |
| | | * |
| | | * @author xiaochen |
| | | * @since 2025-11-06 |
| | | */ |
| | | @Service |
| | | public class TOtherConfigServiceImpl extends ServiceImpl<TOtherConfigMapper, TOtherConfig> implements TOtherConfigService { |
| | | |
| | | } |
| New file |
| | |
| | | package com.ruoyi.system.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.ruoyi.system.mapper.TQuestionnaireStemBriefAnswerMapper; |
| | | import com.ruoyi.system.model.TQuestionnaireStemBriefAnswer; |
| | | import com.ruoyi.system.service.TQuestionnaireStemBriefAnswerService; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | /** |
| | | * <p> |
| | | * 简答题答案 服务实现类 |
| | | * </p> |
| | | * |
| | | * @author xiaochen |
| | | * @since 2025-11-06 |
| | | */ |
| | | @Service |
| | | public class TQuestionnaireStemBriefAnswerServiceImpl extends ServiceImpl<TQuestionnaireStemBriefAnswerMapper, TQuestionnaireStemBriefAnswer> implements TQuestionnaireStemBriefAnswerService { |
| | | |
| | | } |
| | |
| | | @ApiModel(value = "账户列表VO") |
| | | public class SysUserVO extends SysUser { |
| | | |
| | | @ApiModelProperty(value = "身份") |
| | | private Integer companyType; |
| | | @ApiModelProperty(value = "单位名称") |
| | | private String companyName; |
| | | @ApiModelProperty(value = "部门") |
| | | private List<String> deptList; |
| | | |
| | | @ApiModelProperty(value = "角色") |
| | | private String roleName; |
| | | |
| | |
| | | <if test="query.status != null and query.status != ''"> |
| | | AND u.status = #{query.status} |
| | | </if> |
| | | <if test="query.deptIds != null and query.deptIds.size()>0"> |
| | | AND u.user_id IN (select DISTINCT user_id from t_dept_to_user where dept_id IN |
| | | <foreach collection="query.deptIds" close=")" open="(" item="deptId" separator=","> |
| | | #{deptId} |
| | | </foreach>) |
| | | </if> |
| | | |
| | | <if test="query.roleIds != null and query.roleIds.size()>0"> |
| | | AND r.role_id IN |
| | | <foreach collection="query.roleIds" close=")" open="(" item="roleId" separator=","> |
| | |
| | | <if test="status != null and status != ''">status,</if> |
| | | <if test="createBy != null and createBy != ''">create_by,</if> |
| | | <if test="remark != null and remark != ''">remark,</if> |
| | | <if test="userIdentification != null and userIdentification != ''">userIdentification,</if> |
| | | create_time |
| | | )values( |
| | | <if test="userId != null and userId != ''">#{userId},</if> |
| | |
| | | <if test="status != null and status != ''">#{status},</if> |
| | | <if test="createBy != null and createBy != ''">#{createBy},</if> |
| | | <if test="remark != null and remark != ''">#{remark},</if> |
| | | <if test="userIdentification != null and userIdentification != ''">#{userIdentification},</if> |
| | | sysdate() |
| | | ) |
| | | </insert> |
| | |
| | | <sql id="Base_Column_List"> |
| | | id, nick_name, avatar, phone_number, gender, birth_date, status, open_id, create_time, update_time, create_by, update_by, disabled |
| | | </sql> |
| | | <select id="pageList" resultType="com.ruoyi.system.model.TAppUser"> |
| | | select t1.* from t_app_user t1 |
| | | where 1=1 |
| | | <if test="query.nickName != null and query.nickName != ''"> |
| | | and t1.nick_name like concat('%',#{query.nickName},'%') |
| | | </if> |
| | | |
| | | <if test="query.phoneNumber != null and query.phoneNumber != ''"> |
| | | and t1.phone_number like concat('%',#{query.phoneNumber},'%') |
| | | </if> |
| | | <if test="query.status != null"> |
| | | and t1.status = #{query.status} |
| | | </if> |
| | | AND t1.disabled = ${@com.ruoyi.common.enums.DisabledEnum@NO.getCode()} |
| | | |
| | | order by t1.create_time desc |
| | | </select> |
| | | |
| | | </mapper> |
| | |
| | | <sql id="Base_Column_List"> |
| | | id, point_name, point_phone, point_cover, address, point_detail, create_time, update_time, create_by, update_by, disabled |
| | | </sql> |
| | | <select id="pageList" resultType="com.ruoyi.system.model.TAssistedDining"> |
| | | select t1.* from t_assisted_dining t1 |
| | | <if test="query.pointName != null and query.pointName != ''"> |
| | | and t1.point_name like concat('%',#{query.pointName},'%') |
| | | </if> |
| | | <if test="query.pointPhone != null and query.pointPhone != ''"> |
| | | and t1.point_phone like concat('%',#{query.pointPhone},'%') |
| | | </if> |
| | | AND t1.disabled = ${@com.ruoyi.common.enums.DisabledEnum@NO.getCode()} |
| | | order by t1.create_time desc |
| | | </select> |
| | | |
| | | </mapper> |
| | |
| | | <sql id="Base_Column_List"> |
| | | id, banner_name, pictures, banner_detail, create_time, update_time, create_by, update_by, disabled |
| | | </sql> |
| | | <select id="pageList" resultType="com.ruoyi.system.model.TBanner"> |
| | | select * from t_banner |
| | | where 1=1 |
| | | AND disabled = ${@com.ruoyi.common.enums.DisabledEnum@NO.getCode()} |
| | | |
| | | order by create_time desc |
| | | </select> |
| | | |
| | | </mapper> |
| | |
| | | <sql id="Base_Column_List"> |
| | | id, app_user_id, nick_name, contact_number, requirement_description, pictures, create_time, update_time, create_by, update_by, disabled |
| | | </sql> |
| | | <select id="pageList" resultType="com.ruoyi.system.model.THelpNeeds"> |
| | | select t1.* from t_help_needs |
| | | where 1=1 |
| | | <if test="query.nickName != null and query.nickName != ''"> |
| | | and t1.nick_name like concat('%',#{query.nickName},'%') |
| | | </if> |
| | | <if test="query.contactNumber != null and query.contactNumber != ''"> |
| | | and t1.contact_number like concat('%',#{query.contactNumber},'%') |
| | | </if> |
| | | <if test="query.startTime != null and query.startTime != '' and query.endTime != null and query.endTime != ''"> |
| | | and t1.create_time between #{query.startTime} and #{query.endTime} |
| | | </if> |
| | | </select> |
| | | |
| | | </mapper> |
| | |
| | | <sql id="Base_Column_List"> |
| | | id, oldster_name, oldster_age, oldster_sex, contact_phone, guardian_name, guardian_phone, passport_photo, id_card, birth_date, oldster_type, address, create_time, update_time, create_by, update_by, disabled |
| | | </sql> |
| | | <select id="pageList" resultType="com.ruoyi.system.model.TOldster"> |
| | | select t1.* from t_oldster t1 |
| | | where 1=1 |
| | | <if test="query.oldsterName != null and query.oldsterName != ''"> |
| | | and t1.oldster_name like concat('%',#{query.oldsterName},'%') |
| | | </if> |
| | | <if test="query.oldsterType != null and query.oldsterType != ''"> |
| | | and t1.oldster_type = #{query.oldsterType} |
| | | </if> |
| | | <if test="query.contactPhone != null and query.contactPhone != ''"> |
| | | and t1.contact_phone like concat('%',#{query.contactPhone},'%') |
| | | </if> |
| | | AND t1.disabled = ${@com.ruoyi.common.enums.DisabledEnum@NO.getCode()} |
| | | |
| | | order by t1.create_time desc |
| | | </select> |
| | | |
| | | </mapper> |
| New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="com.ruoyi.system.mapper.TOldsterWarningMapper"> |
| | | |
| | | <!-- 通用查询映射结果 --> |
| | | <resultMap id="BaseResultMap" type="com.ruoyi.system.model.TOldsterWarning"> |
| | | <id column="id" property="id" /> |
| | | <result column="oldster_id" property="oldsterId" /> |
| | | <result column="warning_time" property="warningTime" /> |
| | | <result column="create_time" property="createTime" /> |
| | | <result column="update_time" property="updateTime" /> |
| | | <result column="create_by" property="createBy" /> |
| | | <result column="update_by" property="updateBy" /> |
| | | <result column="disabled" property="disabled" /> |
| | | </resultMap> |
| | | |
| | | <!-- 通用查询结果列 --> |
| | | <sql id="Base_Column_List"> |
| | | id, oldster_id, warning_time, create_time, update_time, create_by, update_by, disabled |
| | | </sql> |
| | | |
| | | </mapper> |
| New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="com.ruoyi.system.mapper.TOtherConfigMapper"> |
| | | |
| | | <!-- 通用查询映射结果 --> |
| | | <resultMap id="BaseResultMap" type="com.ruoyi.system.model.TOtherConfig"> |
| | | <id column="id" property="id" /> |
| | | <result column="elderly_age" property="elderlyAge" /> |
| | | <result column="days" property="days" /> |
| | | </resultMap> |
| | | |
| | | <!-- 通用查询结果列 --> |
| | | <sql id="Base_Column_List"> |
| | | id, elderly_age, days |
| | | </sql> |
| | | |
| | | </mapper> |
| New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="com.ruoyi.system.mapper.TQuestionnaireStemBriefAnswerMapper"> |
| | | |
| | | <!-- 通用查询映射结果 --> |
| | | <resultMap id="BaseResultMap" type="com.ruoyi.system.model.TQuestionnaireStemBriefAnswer"> |
| | | <id column="id" property="id" /> |
| | | <result column="stem_id" property="stemId" /> |
| | | <result column="app_user_id" property="appUserId" /> |
| | | <result column="answer_content" property="answerContent" /> |
| | | </resultMap> |
| | | |
| | | <!-- 通用查询结果列 --> |
| | | <sql id="Base_Column_List"> |
| | | id, stem_id, app_user_id, answer_content |
| | | </sql> |
| | | |
| | | </mapper> |