Compare commits

...

6 Commits

  1. 17
      acupuncture-admin/src/main/java/com/acupuncture/web/controller/monitor/CacheController.java
  2. 43
      acupuncture-admin/src/main/java/com/acupuncture/web/controller/web/AdminPmsTreatmentController.java
  3. 36
      acupuncture-admin/src/main/java/com/acupuncture/web/controller/web/AdminReportController.java
  4. 1
      acupuncture-admin/src/main/java/com/acupuncture/web/controller/web/DmsLoginController.java
  5. 49
      acupuncture-admin/src/main/java/com/acupuncture/web/controller/web/PmsTreatmentController.java
  6. 46
      acupuncture-common/src/main/java/com/acupuncture/common/core/domain/entity/SysDictData.java
  7. 10
      acupuncture-common/src/main/java/com/acupuncture/common/core/domain/entity/SysMenu.java
  8. 11
      acupuncture-common/src/main/java/com/acupuncture/common/core/domain/entity/SysRole.java
  9. 147
      acupuncture-common/src/main/java/com/acupuncture/common/utils/ZipUtils.java
  10. 8
      acupuncture-generator/src/main/resources/mbg.xml
  11. 37
      acupuncture-system/src/main/java/com/acupuncture/system/domain/SysNotice.java
  12. 15
      acupuncture-system/src/main/java/com/acupuncture/system/domain/SysUserOnline.java
  13. 12
      acupuncture-system/src/main/java/com/acupuncture/system/domain/dto/AdminReportDto.java
  14. 33
      acupuncture-system/src/main/java/com/acupuncture/system/domain/dto/PmsTreatmentDto.java
  15. 11
      acupuncture-system/src/main/java/com/acupuncture/system/domain/po/DmsUser.java
  16. 60
      acupuncture-system/src/main/java/com/acupuncture/system/domain/po/DmsUserExample.java
  17. 11
      acupuncture-system/src/main/java/com/acupuncture/system/domain/po/PmsTreatment.java
  18. 60
      acupuncture-system/src/main/java/com/acupuncture/system/domain/po/PmsTreatmentExample.java
  19. 106
      acupuncture-system/src/main/java/com/acupuncture/system/domain/po/RmsReportManagementTenant.java
  20. 711
      acupuncture-system/src/main/java/com/acupuncture/system/domain/po/RmsReportManagementTenantExample.java
  21. 11
      acupuncture-system/src/main/java/com/acupuncture/system/domain/po/RmsReportType.java
  22. 70
      acupuncture-system/src/main/java/com/acupuncture/system/domain/po/RmsReportTypeExample.java
  23. 106
      acupuncture-system/src/main/java/com/acupuncture/system/domain/po/RmsReportTypeTenant.java
  24. 711
      acupuncture-system/src/main/java/com/acupuncture/system/domain/po/RmsReportTypeTenantExample.java
  25. 106
      acupuncture-system/src/main/java/com/acupuncture/system/domain/po/SysNoticeUser.java
  26. 711
      acupuncture-system/src/main/java/com/acupuncture/system/domain/po/SysNoticeUserExample.java
  27. 9
      acupuncture-system/src/main/java/com/acupuncture/system/domain/vo/AdminReportVo.java
  28. 3
      acupuncture-system/src/main/java/com/acupuncture/system/domain/vo/DmsLoginUserVo.java
  29. 2
      acupuncture-system/src/main/java/com/acupuncture/system/domain/vo/PmsTreatmentVo.java
  30. 4
      acupuncture-system/src/main/java/com/acupuncture/system/mapper/SysNoticeMapper.java
  31. 2
      acupuncture-system/src/main/java/com/acupuncture/system/persist/dao/PmsTreatmentDao.java
  32. 3
      acupuncture-system/src/main/java/com/acupuncture/system/persist/dao/RmsReportDao.java
  33. 28
      acupuncture-system/src/main/java/com/acupuncture/system/persist/mapper/RmsReportManagementTenantMapper.java
  34. 28
      acupuncture-system/src/main/java/com/acupuncture/system/persist/mapper/RmsReportTypeTenantMapper.java
  35. 28
      acupuncture-system/src/main/java/com/acupuncture/system/persist/mapper/SysNoticeUserMapper.java
  36. 17
      acupuncture-system/src/main/java/com/acupuncture/system/service/AdminReportService.java
  37. 12
      acupuncture-system/src/main/java/com/acupuncture/system/service/PmsTreatmentService.java
  38. 151
      acupuncture-system/src/main/java/com/acupuncture/system/service/impl/AdminReportServiceImpl.java
  39. 1
      acupuncture-system/src/main/java/com/acupuncture/system/service/impl/AdminTenantUserServiceImpl.java
  40. 1
      acupuncture-system/src/main/java/com/acupuncture/system/service/impl/DmsLoginServiceImpl.java
  41. 372
      acupuncture-system/src/main/java/com/acupuncture/system/service/impl/PmsTreatmentServiceImpl.java
  42. 151
      acupuncture-system/src/main/java/com/acupuncture/system/service/impl/SysNoticeServiceImpl.java
  43. 1
      acupuncture-system/src/main/java/com/acupuncture/system/service/impl/SysUserOnlineServiceImpl.java
  44. 31
      acupuncture-system/src/main/resources/mapper/dao/AdminRmsReportDao.xml
  45. 4
      acupuncture-system/src/main/resources/mapper/dao/DmsUserDao.xml
  46. 128
      acupuncture-system/src/main/resources/mapper/dao/PmsTreatmentDao.xml
  47. 25
      acupuncture-system/src/main/resources/mapper/system/DmsUserMapper.xml
  48. 29
      acupuncture-system/src/main/resources/mapper/system/PmsTreatmentMapper.xml
  49. 252
      acupuncture-system/src/main/resources/mapper/system/RmsReportManagementTenantMapper.xml
  50. 28
      acupuncture-system/src/main/resources/mapper/system/RmsReportTypeMapper.xml
  51. 252
      acupuncture-system/src/main/resources/mapper/system/RmsReportTypeTenantMapper.xml
  52. 22
      acupuncture-system/src/main/resources/mapper/system/SysDictDataMapper.xml
  53. 9
      acupuncture-system/src/main/resources/mapper/system/SysMenuMapper.xml
  54. 41
      acupuncture-system/src/main/resources/mapper/system/SysNoticeMapper.xml
  55. 252
      acupuncture-system/src/main/resources/mapper/system/SysNoticeUserMapper.xml
  56. 9
      acupuncture-system/src/main/resources/mapper/system/SysRoleMapper.xml

17
acupuncture-admin/src/main/java/com/acupuncture/web/controller/monitor/CacheController.java

@ -8,15 +8,13 @@ import java.util.Map;
import java.util.Properties; import java.util.Properties;
import java.util.Set; import java.util.Set;
import java.util.TreeSet; import java.util.TreeSet;
import io.swagger.v3.oas.annotations.parameters.RequestBody;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.redis.core.RedisCallback; import org.springframework.data.redis.core.RedisCallback;
import org.springframework.data.redis.core.RedisTemplate; import org.springframework.data.redis.core.RedisTemplate;
import org.springframework.security.access.prepost.PreAuthorize; import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.DeleteMapping; import org.springframework.web.bind.annotation.*;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import com.acupuncture.common.constant.CacheConstants; import com.acupuncture.common.constant.CacheConstants;
import com.acupuncture.common.core.domain.AjaxResult; import com.acupuncture.common.core.domain.AjaxResult;
import com.acupuncture.common.utils.StringUtils; import com.acupuncture.common.utils.StringUtils;
@ -97,6 +95,7 @@ public class CacheController
@DeleteMapping("/clearCacheName/{cacheName}") @DeleteMapping("/clearCacheName/{cacheName}")
public AjaxResult clearCacheName(@PathVariable String cacheName) public AjaxResult clearCacheName(@PathVariable String cacheName)
{ {
caches.remove(cacheName);
Collection<String> cacheKeys = redisTemplate.keys(cacheName + "*"); Collection<String> cacheKeys = redisTemplate.keys(cacheName + "*");
redisTemplate.delete(cacheKeys); redisTemplate.delete(cacheKeys);
return AjaxResult.success(); return AjaxResult.success();
@ -118,4 +117,12 @@ public class CacheController
redisTemplate.delete(cacheKeys); redisTemplate.delete(cacheKeys);
return AjaxResult.success(); return AjaxResult.success();
} }
@PreAuthorize("@ss.hasPermi('monitor:cache:list')")
@GetMapping("/add")
public AjaxResult add(@RequestParam("cacheName") String cacheName, @RequestParam("remark") String remark)
{
caches.add(new SysCache(cacheName, remark));
return AjaxResult.success(caches);
}
} }

43
acupuncture-admin/src/main/java/com/acupuncture/web/controller/web/AdminPmsTreatmentController.java

@ -4,6 +4,7 @@ import com.acupuncture.common.annotation.DataSource;
import com.acupuncture.common.core.domain.BaseDto; import com.acupuncture.common.core.domain.BaseDto;
import com.acupuncture.common.core.domain.JsonResponse; import com.acupuncture.common.core.domain.JsonResponse;
import com.acupuncture.common.enums.DataSourceType; import com.acupuncture.common.enums.DataSourceType;
import com.acupuncture.common.utils.SecurityUtils;
import com.acupuncture.framework.datasource.DynamicDataSourceContextHolder; import com.acupuncture.framework.datasource.DynamicDataSourceContextHolder;
import com.acupuncture.system.domain.dto.PmsTreatmentDto; import com.acupuncture.system.domain.dto.PmsTreatmentDto;
import com.acupuncture.system.domain.po.DmsTenant; import com.acupuncture.system.domain.po.DmsTenant;
@ -12,6 +13,7 @@ import com.acupuncture.system.domain.vo.PmsTreatmentVo;
import com.acupuncture.system.domain.vo.UmsDataSourceVo; import com.acupuncture.system.domain.vo.UmsDataSourceVo;
import com.acupuncture.system.persist.mapper.DmsTenantMapper; import com.acupuncture.system.persist.mapper.DmsTenantMapper;
import com.acupuncture.system.persist.mapper.UmsDataSourceMapper; import com.acupuncture.system.persist.mapper.UmsDataSourceMapper;
import com.acupuncture.system.service.DmsLoginService;
import com.acupuncture.system.service.PmsTreatmentService; import com.acupuncture.system.service.PmsTreatmentService;
import com.github.pagehelper.PageHelper; import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo; import com.github.pagehelper.PageInfo;
@ -43,6 +45,8 @@ public class AdminPmsTreatmentController {
@Resource @Resource
private PmsTreatmentService treatmentService; private PmsTreatmentService treatmentService;
@Resource
private DmsLoginService dmsLoginService;
@ApiOperation("查询诊疗档案") @ApiOperation("查询诊疗档案")
@PostMapping("/list") @PostMapping("/list")
@ -68,6 +72,21 @@ public class AdminPmsTreatmentController {
treatmentService.adminExportTreatment(response, dto); treatmentService.adminExportTreatment(response, dto);
} }
@DataSource(DataSourceType.MASTER)
@ApiOperation("导入诊疗档案数据")
@PostMapping("/importTreatment")
public JsonResponse<Integer> importTreatment(MultipartFile file) throws IOException {
//切换数据源
String[] strs = treatmentService.getTenantId(file);
DynamicDataSourceContextHolder.setDataSourceType(strs[0]);
treatmentService.importTreatmentAdmin(file, Long.parseLong(strs[1]));
//销毁数据源
DynamicDataSourceContextHolder.clearDataSourceType();
return JsonResponse.ok();
}
// @ApiOperation("修改诊疗档案") // @ApiOperation("修改诊疗档案")
// @PostMapping("/upd") // @PostMapping("/upd")
// public JsonResponse<Integer> updateTreatment(@RequestBody @Validated PmsTreatmentDto.TreatmentUpdateDTO dto) { // public JsonResponse<Integer> updateTreatment(@RequestBody @Validated PmsTreatmentDto.TreatmentUpdateDTO dto) {
@ -82,9 +101,33 @@ public class AdminPmsTreatmentController {
// return JsonResponse.ok(treatmentService.exportTreatmentPg(response, dto)); // return JsonResponse.ok(treatmentService.exportTreatmentPg(response, dto));
// } // }
@DataSource(DataSourceType.MASTER)
@ApiOperation("后台导出诊疗档案评估报告") @ApiOperation("后台导出诊疗档案评估报告")
@PostMapping("/exportTreatmentPg") @PostMapping("/exportTreatmentPg")
public JsonResponse<String> adminExportTreatmentPg(HttpServletResponse response, @RequestBody @Validated PmsTreatmentDto.ExportVO dto){ public JsonResponse<String> adminExportTreatmentPg(HttpServletResponse response, @RequestBody @Validated PmsTreatmentDto.ExportVO dto){
return JsonResponse.ok(treatmentService.adminExportTreatmentPg(response, dto)); return JsonResponse.ok(treatmentService.adminExportTreatmentPg(response, dto));
} }
@DataSource(DataSourceType.MASTER)
@ApiOperation("后台导出诊疗档案评估报告zip")
@PostMapping("/adminExportTreatmentPgZip")
public JsonResponse<String> adminExportTreatmentPgZip(HttpServletResponse response, @RequestBody @Validated PmsTreatmentDto.ExportZipVO dto) throws IOException{
return JsonResponse.ok(treatmentService.adminExportTreatmentPgZip(response, dto));
}
@ApiOperation("审核")
@PostMapping("/aduit")
public JsonResponse<Integer> aduit( @RequestBody @Validated PmsTreatmentDto.Aduit dto){
try {
UmsDataSource dataSourceByTenantId = dmsLoginService.getDataSourceByTenantId(dto.getTenantId());
if (dataSourceByTenantId != null) {
DynamicDataSourceContextHolder.setDataSourceType(dataSourceByTenantId.getDataSourceKey());
}
treatmentService.aduit(dto.getTreatmentId(), dto.getStatus());
return JsonResponse.ok();
}finally {
DynamicDataSourceContextHolder.clearDataSourceType();
}
}
} }

36
acupuncture-admin/src/main/java/com/acupuncture/web/controller/web/AdminReportController.java

@ -1,10 +1,15 @@
package com.acupuncture.web.controller.web; package com.acupuncture.web.controller.web;
import com.acupuncture.common.annotation.DataScope;
import com.acupuncture.common.annotation.DataSource;
import com.acupuncture.common.core.domain.BaseDto; import com.acupuncture.common.core.domain.BaseDto;
import com.acupuncture.common.core.domain.JsonResponse; import com.acupuncture.common.core.domain.JsonResponse;
import com.acupuncture.common.enums.DataSourceType;
import com.acupuncture.system.domain.dto.AdminReportDto; import com.acupuncture.system.domain.dto.AdminReportDto;
import com.acupuncture.system.domain.vo.AdminReportVo; import com.acupuncture.system.domain.vo.AdminReportVo;
import com.acupuncture.system.service.AdminReportService; import com.acupuncture.system.service.AdminReportService;
import com.acupuncture.system.service.RmsReportService;
import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo; import com.github.pagehelper.PageInfo;
import io.swagger.annotations.Api; import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation; import io.swagger.annotations.ApiOperation;
@ -32,51 +37,66 @@ public class AdminReportController {
@Resource @Resource
private AdminReportService reportService; private AdminReportService reportService;
@DataSource(DataSourceType.MASTER)
@ApiOperation("查询上报类型") @ApiOperation("查询上报类型")
@PostMapping("/list") @PostMapping("/list")
public JsonResponse<PageInfo<AdminReportVo.TypeResult>> queryTypeList(@RequestBody @Validated BaseDto<AdminReportDto.Query> dto){ public JsonResponse<PageInfo<AdminReportVo.TypeResult>> queryTypeList(@RequestBody @Validated BaseDto<AdminReportDto.Query> dto) {
if (dto.getPageNum() > 0) {
PageHelper.startPage(dto.getPageNum(), dto.getPageSize());
}
return JsonResponse.ok(new PageInfo<>(reportService.queryTypeList(dto.getParam().getName()))); return JsonResponse.ok(new PageInfo<>(reportService.queryTypeList(dto.getParam().getName())));
} }
@ApiOperation("新增上报类型") @ApiOperation("新增上报类型")
@PostMapping("/add") @PostMapping("/add")
public JsonResponse<Integer> insert(@RequestBody @Validated AdminReportDto.AddDto dto){ public JsonResponse<Integer> insert(@RequestBody @Validated AdminReportDto.AddDto dto) {
return JsonResponse.ok(reportService.insert(dto)); return JsonResponse.ok(reportService.insert(dto));
} }
@ApiOperation("修改上报类型") @ApiOperation("修改上报类型")
@PostMapping("/upd") @PostMapping("/upd")
public JsonResponse<Integer> update(@RequestBody @Validated AdminReportDto.UpdDto dto){ public JsonResponse<Integer> update(@RequestBody @Validated AdminReportDto.UpdDto dto) {
return JsonResponse.ok(reportService.update(dto)); return JsonResponse.ok(reportService.update(dto));
} }
@ApiOperation("删除上报类型") @ApiOperation("删除上报类型")
@PostMapping("/del") @PostMapping("/del")
public JsonResponse<Integer> delete(@RequestBody @Validated AdminReportDto.DeleteDto dto){ public JsonResponse<Integer> delete(@RequestBody @Validated AdminReportDto.DeleteDto dto) {
return JsonResponse.ok(reportService.delete(dto)); return JsonResponse.ok(reportService.delete(dto));
} }
@DataSource(DataSourceType.MASTER)
@ApiOperation("查询我的上报管理")
@PostMapping("/queryManagerMy")
public JsonResponse<PageInfo<AdminReportVo.Result>> queryManagerMy(@RequestBody @Validated BaseDto<AdminReportDto.QueryManagerDto> dto) {
return JsonResponse.ok(new PageInfo<>(reportService.queryManagerListMy(dto.getParam())));
}
@ApiOperation("查询上报管理") @ApiOperation("查询上报管理")
@PostMapping("/queryManager") @PostMapping("/queryManager")
public JsonResponse<PageInfo<AdminReportVo.Result>> queryManagerList(@RequestBody @Validated BaseDto<AdminReportDto.QueryManagerDto> dto){ public JsonResponse<PageInfo<AdminReportVo.Result>> queryManagerList(@RequestBody @Validated BaseDto<AdminReportDto.QueryManagerDto> dto) {
if (dto.getPageNum() > 0) {
PageHelper.startPage(dto.getPageNum(), dto.getPageSize());
}
return JsonResponse.ok(new PageInfo<>(reportService.queryManagerList(dto.getParam()))); return JsonResponse.ok(new PageInfo<>(reportService.queryManagerList(dto.getParam())));
} }
@ApiOperation("新增上报管理") @ApiOperation("新增上报管理")
@PostMapping("/addManager") @PostMapping("/addManager")
public JsonResponse<Integer> insertManager(@RequestBody @Validated AdminReportDto.AddManagerDto dto){ public JsonResponse<Integer> insertManager(@RequestBody @Validated AdminReportDto.AddManagerDto dto) {
return JsonResponse.ok(reportService.insertManager(dto)); return JsonResponse.ok(reportService.insertManager(dto));
} }
@ApiOperation("修改上报管理") @ApiOperation("修改上报管理")
@PostMapping("/updManager") @PostMapping("/updManager")
public JsonResponse<Integer> updateManager(@RequestBody @Validated AdminReportDto.UpdManagerDto dto){ public JsonResponse<Integer> updateManager(@RequestBody @Validated AdminReportDto.UpdManagerDto dto) {
return JsonResponse.ok(reportService.updateManager(dto)); return JsonResponse.ok(reportService.updateManager(dto));
} }
@ApiOperation("删除上报管理") @ApiOperation("删除上报管理")
@PostMapping("/delManager") @PostMapping("/delManager")
public JsonResponse<Integer> deleteManager(@RequestBody @Validated AdminReportDto.DeleteManagerDto dto){ public JsonResponse<Integer> deleteManager(@RequestBody @Validated AdminReportDto.DeleteManagerDto dto) {
return JsonResponse.ok(reportService.deleteManager(dto)); return JsonResponse.ok(reportService.deleteManager(dto));
} }

1
acupuncture-admin/src/main/java/com/acupuncture/web/controller/web/DmsLoginController.java

@ -143,6 +143,7 @@ public class DmsLoginController {
tokenService.refreshToken(loginUser); tokenService.refreshToken(loginUser);
AjaxResult ajax = AjaxResult.success(); AjaxResult ajax = AjaxResult.success();
ajax.put("user", user); ajax.put("user", user);
ajax.put("forceUpdPwdFlag" , tenantUser.getForceUpdPwdFlag());
return ajax; return ajax;
} }

49
acupuncture-admin/src/main/java/com/acupuncture/web/controller/web/PmsTreatmentController.java

@ -1,10 +1,22 @@
package com.acupuncture.web.controller.web; package com.acupuncture.web.controller.web;
import cn.hutool.core.collection.CollectionUtil;
import com.acupuncture.common.annotation.DataSource;
import com.acupuncture.common.core.domain.BaseDto; import com.acupuncture.common.core.domain.BaseDto;
import com.acupuncture.common.core.domain.JsonResponse; import com.acupuncture.common.core.domain.JsonResponse;
import com.acupuncture.common.enums.DataSourceType;
import com.acupuncture.common.utils.SecurityUtils;
import com.acupuncture.framework.datasource.DynamicDataSourceContextHolder;
import com.acupuncture.system.domain.dto.PmsTreatmentDto; import com.acupuncture.system.domain.dto.PmsTreatmentDto;
import com.acupuncture.system.domain.po.RmsReportManagement;
import com.acupuncture.system.domain.po.RmsReportManagementExample;
import com.acupuncture.system.domain.po.UmsDataSource;
import com.acupuncture.system.domain.vo.PmsTreatmentVo; import com.acupuncture.system.domain.vo.PmsTreatmentVo;
import com.acupuncture.system.persist.mapper.RmsReportManagementMapper;
import com.acupuncture.system.service.AdminReportService;
import com.acupuncture.system.service.DmsLoginService;
import com.acupuncture.system.service.PmsTreatmentService; import com.acupuncture.system.service.PmsTreatmentService;
import com.acupuncture.system.service.RmsReportService;
import com.github.pagehelper.PageHelper; import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo; import com.github.pagehelper.PageInfo;
import io.swagger.annotations.Api; import io.swagger.annotations.Api;
@ -22,6 +34,7 @@ import javax.annotation.Resource;
import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpServletResponse;
import java.io.IOException; import java.io.IOException;
import java.util.List; import java.util.List;
import java.util.stream.Collectors;
/** /**
* @Author zzc * @Author zzc
@ -37,6 +50,12 @@ public class PmsTreatmentController {
@Resource @Resource
private PmsTreatmentService treatmentService; private PmsTreatmentService treatmentService;
@Resource
private AdminReportService adminReportService;
@Resource
private DmsLoginService dmsLoginService;
@Resource
private RmsReportManagementMapper rmsReportManagementMapper;
@ApiOperation("添加诊疗档案") @ApiOperation("添加诊疗档案")
@PostMapping("/add") @PostMapping("/add")
@ -59,13 +78,35 @@ public class PmsTreatmentController {
return JsonResponse.ok(); return JsonResponse.ok();
} }
@DataSource(DataSourceType.MASTER)
@ApiOperation("查询诊疗档案") @ApiOperation("查询诊疗档案")
@PostMapping("/list") @PostMapping("/list")
public JsonResponse<PageInfo<PmsTreatmentVo.TreatmentVO>> listTreatment(@RequestBody @Validated BaseDto<PmsTreatmentDto.TreatmentQueryDTO> queryDTO) { public JsonResponse<PageInfo<PmsTreatmentVo.TreatmentVO>> listTreatment(@RequestBody @Validated BaseDto<PmsTreatmentDto.TreatmentQueryDTO> queryDTO) {
if (queryDTO.getPageNum() > 0) {
PageHelper.startPage(queryDTO.getPageNum(), queryDTO.getPageSize()); try {
List<RmsReportManagement> rmsReportManagements1 = rmsReportManagementMapper.selectByExample(new RmsReportManagementExample());
PmsTreatmentDto.TreatmentQueryDTO param = queryDTO.getParam();
if (queryDTO.getParam().getReportTypeId() != null) {
List<RmsReportManagement> rmsReportManagements = adminReportService.queryManagerListByType(queryDTO.getParam().getReportTypeId());
if (CollectionUtil.isNotEmpty(rmsReportManagements)) {
param.setManagementIdList(rmsReportManagements.stream().map(RmsReportManagement::getId).collect(Collectors.toList()));
} else {
return JsonResponse.ok(new PageInfo<>());
}
}
UmsDataSource dataSourceByTenantId = dmsLoginService.getDataSourceByTenantId(SecurityUtils.getTenantId());
if (dataSourceByTenantId != null) {
DynamicDataSourceContextHolder.setDataSourceType(dataSourceByTenantId.getDataSourceKey());
}
if (queryDTO.getPageNum() > 0) {
PageHelper.startPage(queryDTO.getPageNum(), queryDTO.getPageSize());
}
return JsonResponse.ok(new PageInfo<>(treatmentService.listTreatment(param, rmsReportManagements1)));
} finally {
DynamicDataSourceContextHolder.clearDataSourceType();
} }
return JsonResponse.ok(new PageInfo<>(treatmentService.listTreatment(queryDTO.getParam())));
} }
@ApiOperation("新增诊疗档案数据") @ApiOperation("新增诊疗档案数据")
@ -96,7 +137,7 @@ public class PmsTreatmentController {
@ApiOperation("导出诊疗档案评估报告") @ApiOperation("导出诊疗档案评估报告")
@PostMapping("/exportTreatmentPg") @PostMapping("/exportTreatmentPg")
public JsonResponse<String> exportTreatmentPg(HttpServletResponse response, @RequestBody @Validated PmsTreatmentDto.ExportVO dto){ public JsonResponse<String> exportTreatmentPg(HttpServletResponse response, @RequestBody @Validated PmsTreatmentDto.ExportVO dto) {
return JsonResponse.ok(treatmentService.exportTreatmentPg(response, dto)); return JsonResponse.ok(treatmentService.exportTreatmentPg(response, dto));
} }
} }

46
acupuncture-common/src/main/java/com/acupuncture/common/core/domain/entity/SysDictData.java

@ -52,11 +52,53 @@ public class SysDictData extends BaseEntity
@Excel(name = "状态", readConverterExp = "0=正常,1=停用") @Excel(name = "状态", readConverterExp = "0=正常,1=停用")
private String status; private String status;
/** 数据类型 */
private String dataType;
/** 长度 */
private String dataLength;
/** 是否必填 */
private String isRequired;
/** 是否唯一 */
private String isSole;
public Long getDictCode() public Long getDictCode()
{ {
return dictCode; return dictCode;
} }
public String getDataType() {
return dataType;
}
public void setDataType(String dataType) {
this.dataType = dataType;
}
public String getDataLength() {
return dataLength;
}
public void setDataLength(String dataLength) {
this.dataLength = dataLength;
}
public String getIsRequired() {
return isRequired;
}
public void setIsRequired(String isRequired) {
this.isRequired = isRequired;
}
public String getIsSole() {
return isSole;
}
public void setIsSole(String isSole) {
this.isSole = isSole;
}
public void setDictCode(Long dictCode) public void setDictCode(Long dictCode)
{ {
this.dictCode = dictCode; this.dictCode = dictCode;
@ -166,6 +208,10 @@ public class SysDictData extends BaseEntity
.append("listClass", getListClass()) .append("listClass", getListClass())
.append("isDefault", getIsDefault()) .append("isDefault", getIsDefault())
.append("status", getStatus()) .append("status", getStatus())
.append("dataType", getDataType())
.append("dataLength", getDataLength())
.append("isRequired", getIsRequired())
.append("isSole", getIsSole())
.append("createBy", getCreateBy()) .append("createBy", getCreateBy())
.append("createTime", getCreateTime()) .append("createTime", getCreateTime())
.append("updateBy", getUpdateBy()) .append("updateBy", getUpdateBy())

10
acupuncture-common/src/main/java/com/acupuncture/common/core/domain/entity/SysMenu.java

@ -68,6 +68,16 @@ public class SysMenu extends BaseEntity
/** 子菜单 */ /** 子菜单 */
private List<SysMenu> children = new ArrayList<SysMenu>(); private List<SysMenu> children = new ArrayList<SysMenu>();
/** 客户端类型 */
private Integer clientType;
public Integer getClientType() {
return clientType;
}
public void setClientType(Integer clientType) {
this.clientType = clientType;
}
public Long getMenuId() public Long getMenuId()
{ {

11
acupuncture-common/src/main/java/com/acupuncture/common/core/domain/entity/SysRole.java

@ -64,6 +64,17 @@ public class SysRole extends BaseEntity
/** 角色菜单权限 */ /** 角色菜单权限 */
private Set<String> permissions; private Set<String> permissions;
/** 客户端类型 */
private Integer clientType;
public Integer getClientType() {
return clientType;
}
public void setClientType(Integer clientType) {
this.clientType = clientType;
}
public SysRole() public SysRole()
{ {

147
acupuncture-common/src/main/java/com/acupuncture/common/utils/ZipUtils.java

@ -0,0 +1,147 @@
package com.acupuncture.common.utils;
import java.io.*;
import java.util.ArrayList;
import java.util.List;
import java.util.zip.ZipEntry;
import java.util.zip.ZipOutputStream;
public class ZipUtils {
private static final int BUFFER_SIZE = 2 * 1024;
/**
* 压缩成ZIP 方法1
* @param srcDir 压缩文件夹路径
* @param out 压缩文件输出流
* @param KeepDirStructure 是否保留原来的目录结构,true:保留目录结构;
* false:所有文件跑到压缩包根目录下(注意不保留目录结构可能会出现同名文件,会压缩失败)
* @throws RuntimeException 压缩失败会抛出运行时异常
*/
public static void toZip(String srcDir, OutputStream out, boolean KeepDirStructure)
throws RuntimeException{
long start = System.currentTimeMillis();
ZipOutputStream zos = null ;
try {
zos = new ZipOutputStream(out);
File sourceFile = new File(srcDir);
compress(sourceFile,zos,sourceFile.getName(),KeepDirStructure);
long end = System.currentTimeMillis();
System.out.println("压缩完成,耗时:" + (end - start) +" ms");
} catch (Exception e) {
throw new RuntimeException("zip error from ZipUtils",e);
}finally{
if(zos != null){
try {
zos.close();
} catch (IOException e) {
e.printStackTrace();
}
}
}
}
/**
* 压缩成ZIP 方法2
* @param srcFiles 需要压缩的文件列表
* @param out 压缩文件输出流
* @throws RuntimeException 压缩失败会抛出运行时异常
*/
public static void toZip(List<File> srcFiles , OutputStream out)throws RuntimeException {
long start = System.currentTimeMillis();
ZipOutputStream zos = null ;
try {
zos = new ZipOutputStream(out);
for (File srcFile : srcFiles) {
byte[] buf = new byte[BUFFER_SIZE];
zos.putNextEntry(new ZipEntry(srcFile.getName()));
int len;
FileInputStream in = new FileInputStream(srcFile);
while ((len = in.read(buf)) != -1){
zos.write(buf, 0, len);
}
zos.closeEntry();
in.close();
}
long end = System.currentTimeMillis();
System.out.println("压缩完成,耗时:" + (end - start) +" ms");
} catch (Exception e) {
// throw new RuntimeException("zip error from ZipUtils",e);
}finally{
if(zos != null){
try {
zos.close();
} catch (IOException e) {
e.printStackTrace();
}
}
}
}
/**
* 递归压缩方法
* @param sourceFile 源文件
* @param zos zip输出流
* @param name 压缩后的名称
* @param KeepDirStructure 是否保留原来的目录结构,true:保留目录结构;
* false:所有文件跑到压缩包根目录下(注意不保留目录结构可能会出现同名文件,会压缩失败)
* @throws Exception
*/
private static void compress(File sourceFile, ZipOutputStream zos, String name,
boolean KeepDirStructure) throws Exception{
byte[] buf = new byte[BUFFER_SIZE];
if(sourceFile.isFile()){
// 向zip输出流中添加一个zip实体,构造器中name为zip实体的文件的名字
zos.putNextEntry(new ZipEntry(name));
// copy文件到zip输出流中
int len;
FileInputStream in = new FileInputStream(sourceFile);
while ((len = in.read(buf)) != -1){
zos.write(buf, 0, len);
}
// Complete the entry
zos.closeEntry();
in.close();
} else {
File[] listFiles = sourceFile.listFiles();
if(listFiles == null || listFiles.length == 0){
// 需要保留原来的文件结构时,需要对空文件夹进行处理
if(KeepDirStructure){
// 空文件夹的处理
zos.putNextEntry(new ZipEntry(name + "/"));
// 没有文件,不需要文件的copy
zos.closeEntry();
}
}else {
for (File file : listFiles) {
// 判断是否需要保留原来的文件结构
if (KeepDirStructure) {
// 注意:file.getName()前面需要带上父文件夹的名字加一斜杠,
// 不然最后压缩包中就不能保留原来的文件结构,即:所有文件都跑到压缩包根目录下了
compress(file, zos, name + "/" + file.getName(),KeepDirStructure);
} else {
compress(file, zos, file.getName(),KeepDirStructure);
}
}
}
}
}
public static void main(String[] args) throws Exception {
/** 测试压缩方法1 */
// FileOutputStream fos1 = new FileOutputStream(new File("c:/mytest01.zip"));
// ZipUtils.toZip("D:/log", fos1,true);
/** 测试压缩方法2 */
List<File> fileList = new ArrayList<>();
fileList.add(new File("C:/Users/zzc16/Desktop/admin.sh"));
FileOutputStream fos2 = new FileOutputStream(new File("C:/Users/zzc16/Desktop/admin.zip"));
ZipUtils.toZip(fileList, fos2);
}
}

8
acupuncture-generator/src/main/resources/mbg.xml

@ -80,13 +80,17 @@
<!-- <table tableName="fms_followup_queue" domainObjectName="FmsFollowupQueue" enableDeleteByExample="false"/>--> <!-- <table tableName="fms_followup_queue" domainObjectName="FmsFollowupQueue" enableDeleteByExample="false"/>-->
<!-- <table tableName="fms_followup_task" domainObjectName="FmsFollowupTask" enableDeleteByExample="false"/>--> <!-- <table tableName="fms_followup_task" domainObjectName="FmsFollowupTask" enableDeleteByExample="false"/>-->
<!-- <table tableName="fms_patient_queue_relation" domainObjectName="FmsPatientQueueRelation" enableDeleteByExample="false"/>--> <!-- <table tableName="fms_patient_queue_relation" domainObjectName="FmsPatientQueueRelation" enableDeleteByExample="false"/>-->
<table tableName="pms_patient" domainObjectName="PmsPatient" enableDeleteByExample="false"/> <!-- <table tableName="pms_patient" domainObjectName="PmsPatient" enableDeleteByExample="false"/>-->
<!-- <table tableName="hms_weight_height" domainObjectName="HmsWeightHeight" enableDeleteByExample="false"/>--> <!-- <table tableName="hms_weight_height" domainObjectName="HmsWeightHeight" enableDeleteByExample="false"/>-->
<!-- <table tableName="pms_treatment" domainObjectName="PmsTreatment" enableDeleteByExample="false"/>--> <table tableName="pms_treatment" domainObjectName="PmsTreatment" enableDeleteByExample="false"/>
<!-- <table tableName="pms_treatment_record" domainObjectName="PmsTreatmentRecord" enableDeleteByExample="false"/>--> <!-- <table tableName="pms_treatment_record" domainObjectName="PmsTreatmentRecord" enableDeleteByExample="false"/>-->
<!-- <table tableName="rms_report_type" domainObjectName="RmsReportType" enableDeleteByExample="false"/>--> <!-- <table tableName="rms_report_type" domainObjectName="RmsReportType" enableDeleteByExample="false"/>-->
<!-- <table tableName="rms_report_management" domainObjectName="RmsReportManagement" enableDeleteByExample="false"/>--> <!-- <table tableName="rms_report_management" domainObjectName="RmsReportManagement" enableDeleteByExample="false"/>-->
<!-- <table tableName="ums_data_source" domainObjectName="UmsDataSource" enableDeleteByExample="false"/>--> <!-- <table tableName="ums_data_source" domainObjectName="UmsDataSource" enableDeleteByExample="false"/>-->
<!-- <table tableName="sys_notice_user" domainObjectName="SysNoticeUser" enableDeleteByExample="false"/>-->
<!-- <table tableName="dms_user" domainObjectName="DmsUser" enableDeleteByExample="false"/>-->
<!-- <table tableName="rms_report_type_tenant" domainObjectName="RmsReportTypeTenant" enableDeleteByExample="false"/>-->
<!-- <table tableName="rms_report_management_tenant" domainObjectName="RmsReportManagementTenant" enableDeleteByExample="false"/>-->
<!-- 有些表的字段需要指定java类型 <!-- 有些表的字段需要指定java类型
<table schema="" tableName=""> <table schema="" tableName="">

37
acupuncture-system/src/main/java/com/acupuncture/system/domain/SysNotice.java

@ -2,11 +2,15 @@ package com.acupuncture.system.domain;
import javax.validation.constraints.NotBlank; import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Size; import javax.validation.constraints.Size;
import com.fasterxml.jackson.annotation.JsonIgnore;
import org.apache.commons.lang3.builder.ToStringBuilder; import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle; import org.apache.commons.lang3.builder.ToStringStyle;
import com.acupuncture.common.core.domain.BaseEntity; import com.acupuncture.common.core.domain.BaseEntity;
import com.acupuncture.common.xss.Xss; import com.acupuncture.common.xss.Xss;
import java.util.List;
/** /**
* 通知公告表 sys_notice * 通知公告表 sys_notice
* *
@ -31,6 +35,39 @@ public class SysNotice extends BaseEntity
/** 公告状态(0正常 1关闭) */ /** 公告状态(0正常 1关闭) */
private String status; private String status;
/** 发送用户ID列表 不填则发送给所有 */
private List<Long> userIdList;
/** 是否公共的(0否 1是) */
private Byte isAll;
@JsonIgnore
private List<Long> noticeIdList;
public List<Long> getNoticeIdList() {
return noticeIdList;
}
public void setNoticeIdList(List<Long> noticeIdList) {
this.noticeIdList = noticeIdList;
}
public Byte getIsAll() {
return isAll;
}
public void setIsAll(Byte isAll) {
this.isAll = isAll;
}
public List<Long> getUserIdList() {
return userIdList;
}
public void setUserIdList(List<Long> userIdList) {
this.userIdList = userIdList;
}
public Long getNoticeId() public Long getNoticeId()
{ {
return noticeId; return noticeId;

15
acupuncture-system/src/main/java/com/acupuncture/system/domain/SysUserOnline.java

@ -1,5 +1,9 @@
package com.acupuncture.system.domain; package com.acupuncture.system.domain;
import com.fasterxml.jackson.annotation.JsonFormat;
import java.util.Date;
/** /**
* 当前在线会话 * 当前在线会话
* *
@ -31,6 +35,17 @@ public class SysUserOnline
/** 登录时间 */ /** 登录时间 */
private Long loginTime; private Long loginTime;
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private Date lastVisitTime;
public Date getLastVisitTime() {
return lastVisitTime;
}
public void setLastVisitTime(Date lastVisitTime) {
this.lastVisitTime = lastVisitTime;
}
public String getTokenId() public String getTokenId()
{ {
return tokenId; return tokenId;

12
acupuncture-system/src/main/java/com/acupuncture/system/domain/dto/AdminReportDto.java

@ -18,11 +18,19 @@ public class AdminReportDto {
@Data @Data
public static class AddDto { public static class AddDto {
private String typeName; private String typeName;
private String remark;
private String file;
private List<Long> tenantIdList;
} }
@Data @Data
public static class UpdDto { public static class UpdDto {
private Long id; private Long id;
private String name; private String typeName;
private String remark;
private String file;
private List<Long> tenantIdList;
} }
@Data @Data
public static class DeleteDto { public static class DeleteDto {
@ -47,6 +55,7 @@ public class AdminReportDto {
private Date timeRangeEnd; private Date timeRangeEnd;
private Byte status; private Byte status;
private List<Long> tenantIdList;
} }
@Data @Data
@ -62,6 +71,7 @@ public class AdminReportDto {
private Date timeRangeEnd; private Date timeRangeEnd;
private Byte status; private Byte status;
private List<Long> tenantIdList;
} }

33
acupuncture-system/src/main/java/com/acupuncture/system/domain/dto/PmsTreatmentDto.java

@ -52,6 +52,8 @@ public class PmsTreatmentDto {
private String createBy; private String createBy;
private String remark; private String remark;
private Byte source = 1; private Byte source = 1;
@ApiModelProperty("上报ID")
private Long managementId;
@ApiModelProperty("随访队列ID集合") @ApiModelProperty("随访队列ID集合")
private List<Long> queueIdList; private List<Long> queueIdList;
@ -84,10 +86,11 @@ public class PmsTreatmentDto {
private String ethnicity; private String ethnicity;
private Integer educationYears; private Integer educationYears;
private String phone; private String phone;
// private Integer idCardType; // private Integer idCardType;
// private String idCard; // private String idCard;
private Integer visitType; private Integer visitType;
private String visitNumber; private String visitNumber;
@JsonFormat(pattern = "yyyy-MM-dd")
private Date visitTime; private Date visitTime;
@JsonFormat(pattern = "yyyy-MM-dd") @JsonFormat(pattern = "yyyy-MM-dd")
private Date dischargeTime; private Date dischargeTime;
@ -101,6 +104,7 @@ public class PmsTreatmentDto {
private String remark; private String remark;
private String updateBy; private String updateBy;
private Long tenantId; private Long tenantId;
private Long managementId;
@ApiModelProperty("随访队列ID集合") @ApiModelProperty("随访队列ID集合")
private List<Long> queueIdList; private List<Long> queueIdList;
@ -137,6 +141,14 @@ public class PmsTreatmentDto {
private String name; private String name;
private Long tenantId; private Long tenantId;
@ApiModelProperty("门诊/住院时间")
private String startTime;
private String endTime;
@ApiModelProperty("上报管理ID")
private Long managementId;
private Long reportTypeId;
private List<Long> managementIdList;
} }
@Data @Data
@ -152,7 +164,7 @@ public class PmsTreatmentDto {
} }
@Data @Data
public static class DeleteDto{ public static class DeleteDto {
@NotNull(message = "id不能为空") @NotNull(message = "id不能为空")
private List<Long> idList; private List<Long> idList;
} }
@ -208,7 +220,7 @@ public class PmsTreatmentDto {
} }
@Data @Data
public static class QueryRecord{ public static class QueryRecord {
@NotNull(message = "诊疗Id不能为空") @NotNull(message = "诊疗Id不能为空")
@ApiModelProperty("诊疗Id") @ApiModelProperty("诊疗Id")
private Long treatmentId; private Long treatmentId;
@ -222,4 +234,19 @@ public class PmsTreatmentDto {
private Long treatmentId; private Long treatmentId;
} }
@Data
public static class ExportZipVO {
@NotNull
private Long managementId;
}
@Data
public static class Aduit {
@NotNull
private Long treatmentId;
private Byte status;
private Long tenantId;
}
} }

11
acupuncture-system/src/main/java/com/acupuncture/system/domain/po/DmsUser.java

@ -36,6 +36,8 @@ public class DmsUser implements Serializable {
private String remark; private String remark;
private Byte forceUpdPwdFlag;
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
public Long getId() { public Long getId() {
@ -166,6 +168,14 @@ public class DmsUser implements Serializable {
this.remark = remark == null ? null : remark.trim(); this.remark = remark == null ? null : remark.trim();
} }
public Byte getForceUpdPwdFlag() {
return forceUpdPwdFlag;
}
public void setForceUpdPwdFlag(Byte forceUpdPwdFlag) {
this.forceUpdPwdFlag = forceUpdPwdFlag;
}
@Override @Override
public String toString() { public String toString() {
StringBuilder sb = new StringBuilder(); StringBuilder sb = new StringBuilder();
@ -188,6 +198,7 @@ public class DmsUser implements Serializable {
sb.append(", updateBy=").append(updateBy); sb.append(", updateBy=").append(updateBy);
sb.append(", updateTime=").append(updateTime); sb.append(", updateTime=").append(updateTime);
sb.append(", remark=").append(remark); sb.append(", remark=").append(remark);
sb.append(", forceUpdPwdFlag=").append(forceUpdPwdFlag);
sb.append("]"); sb.append("]");
return sb.toString(); return sb.toString();
} }

60
acupuncture-system/src/main/java/com/acupuncture/system/domain/po/DmsUserExample.java

@ -1164,6 +1164,66 @@ public class DmsUserExample {
addCriterion("remark not between", value1, value2, "remark"); addCriterion("remark not between", value1, value2, "remark");
return (Criteria) this; return (Criteria) this;
} }
public Criteria andForceUpdPwdFlagIsNull() {
addCriterion("force_upd_pwd_flag is null");
return (Criteria) this;
}
public Criteria andForceUpdPwdFlagIsNotNull() {
addCriterion("force_upd_pwd_flag is not null");
return (Criteria) this;
}
public Criteria andForceUpdPwdFlagEqualTo(Byte value) {
addCriterion("force_upd_pwd_flag =", value, "forceUpdPwdFlag");
return (Criteria) this;
}
public Criteria andForceUpdPwdFlagNotEqualTo(Byte value) {
addCriterion("force_upd_pwd_flag <>", value, "forceUpdPwdFlag");
return (Criteria) this;
}
public Criteria andForceUpdPwdFlagGreaterThan(Byte value) {
addCriterion("force_upd_pwd_flag >", value, "forceUpdPwdFlag");
return (Criteria) this;
}
public Criteria andForceUpdPwdFlagGreaterThanOrEqualTo(Byte value) {
addCriterion("force_upd_pwd_flag >=", value, "forceUpdPwdFlag");
return (Criteria) this;
}
public Criteria andForceUpdPwdFlagLessThan(Byte value) {
addCriterion("force_upd_pwd_flag <", value, "forceUpdPwdFlag");
return (Criteria) this;
}
public Criteria andForceUpdPwdFlagLessThanOrEqualTo(Byte value) {
addCriterion("force_upd_pwd_flag <=", value, "forceUpdPwdFlag");
return (Criteria) this;
}
public Criteria andForceUpdPwdFlagIn(List<Byte> values) {
addCriterion("force_upd_pwd_flag in", values, "forceUpdPwdFlag");
return (Criteria) this;
}
public Criteria andForceUpdPwdFlagNotIn(List<Byte> values) {
addCriterion("force_upd_pwd_flag not in", values, "forceUpdPwdFlag");
return (Criteria) this;
}
public Criteria andForceUpdPwdFlagBetween(Byte value1, Byte value2) {
addCriterion("force_upd_pwd_flag between", value1, value2, "forceUpdPwdFlag");
return (Criteria) this;
}
public Criteria andForceUpdPwdFlagNotBetween(Byte value1, Byte value2) {
addCriterion("force_upd_pwd_flag not between", value1, value2, "forceUpdPwdFlag");
return (Criteria) this;
}
} }
public static class Criteria extends GeneratedCriteria { public static class Criteria extends GeneratedCriteria {

11
acupuncture-system/src/main/java/com/acupuncture/system/domain/po/PmsTreatment.java

@ -64,6 +64,8 @@ public class PmsTreatment implements Serializable {
private String remark; private String remark;
private Long managementId;
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
public Long getId() { public Long getId() {
@ -306,6 +308,14 @@ public class PmsTreatment implements Serializable {
this.remark = remark == null ? null : remark.trim(); this.remark = remark == null ? null : remark.trim();
} }
public Long getManagementId() {
return managementId;
}
public void setManagementId(Long managementId) {
this.managementId = managementId;
}
@Override @Override
public String toString() { public String toString() {
StringBuilder sb = new StringBuilder(); StringBuilder sb = new StringBuilder();
@ -342,6 +352,7 @@ public class PmsTreatment implements Serializable {
sb.append(", updateBy=").append(updateBy); sb.append(", updateBy=").append(updateBy);
sb.append(", updateTime=").append(updateTime); sb.append(", updateTime=").append(updateTime);
sb.append(", remark=").append(remark); sb.append(", remark=").append(remark);
sb.append(", managementId=").append(managementId);
sb.append("]"); sb.append("]");
return sb.toString(); return sb.toString();
} }

60
acupuncture-system/src/main/java/com/acupuncture/system/domain/po/PmsTreatmentExample.java

@ -2071,6 +2071,66 @@ public class PmsTreatmentExample {
addCriterion("remark not between", value1, value2, "remark"); addCriterion("remark not between", value1, value2, "remark");
return (Criteria) this; return (Criteria) this;
} }
public Criteria andManagementIdIsNull() {
addCriterion("management_id is null");
return (Criteria) this;
}
public Criteria andManagementIdIsNotNull() {
addCriterion("management_id is not null");
return (Criteria) this;
}
public Criteria andManagementIdEqualTo(Long value) {
addCriterion("management_id =", value, "managementId");
return (Criteria) this;
}
public Criteria andManagementIdNotEqualTo(Long value) {
addCriterion("management_id <>", value, "managementId");
return (Criteria) this;
}
public Criteria andManagementIdGreaterThan(Long value) {
addCriterion("management_id >", value, "managementId");
return (Criteria) this;
}
public Criteria andManagementIdGreaterThanOrEqualTo(Long value) {
addCriterion("management_id >=", value, "managementId");
return (Criteria) this;
}
public Criteria andManagementIdLessThan(Long value) {
addCriterion("management_id <", value, "managementId");
return (Criteria) this;
}
public Criteria andManagementIdLessThanOrEqualTo(Long value) {
addCriterion("management_id <=", value, "managementId");
return (Criteria) this;
}
public Criteria andManagementIdIn(List<Long> values) {
addCriterion("management_id in", values, "managementId");
return (Criteria) this;
}
public Criteria andManagementIdNotIn(List<Long> values) {
addCriterion("management_id not in", values, "managementId");
return (Criteria) this;
}
public Criteria andManagementIdBetween(Long value1, Long value2) {
addCriterion("management_id between", value1, value2, "managementId");
return (Criteria) this;
}
public Criteria andManagementIdNotBetween(Long value1, Long value2) {
addCriterion("management_id not between", value1, value2, "managementId");
return (Criteria) this;
}
} }
public static class Criteria extends GeneratedCriteria { public static class Criteria extends GeneratedCriteria {

106
acupuncture-system/src/main/java/com/acupuncture/system/domain/po/RmsReportManagementTenant.java

@ -0,0 +1,106 @@
package com.acupuncture.system.domain.po;
import java.io.Serializable;
import java.util.Date;
public class RmsReportManagementTenant implements Serializable {
private Long id;
private Long reportId;
private Long tenantId;
private String createBy;
private Date createTime;
private String updateBy;
private Date updateTime;
private String remark;
private static final long serialVersionUID = 1L;
public Long getId() {
return id;
}
public void setId(Long id) {
this.id = id;
}
public Long getReportId() {
return reportId;
}
public void setReportId(Long reportId) {
this.reportId = reportId;
}
public Long getTenantId() {
return tenantId;
}
public void setTenantId(Long tenantId) {
this.tenantId = tenantId;
}
public String getCreateBy() {
return createBy;
}
public void setCreateBy(String createBy) {
this.createBy = createBy == null ? null : createBy.trim();
}
public Date getCreateTime() {
return createTime;
}
public void setCreateTime(Date createTime) {
this.createTime = createTime;
}
public String getUpdateBy() {
return updateBy;
}
public void setUpdateBy(String updateBy) {
this.updateBy = updateBy == null ? null : updateBy.trim();
}
public Date getUpdateTime() {
return updateTime;
}
public void setUpdateTime(Date updateTime) {
this.updateTime = updateTime;
}
public String getRemark() {
return remark;
}
public void setRemark(String remark) {
this.remark = remark == null ? null : remark.trim();
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append(getClass().getSimpleName());
sb.append(" [");
sb.append("Hash = ").append(hashCode());
sb.append(", id=").append(id);
sb.append(", reportId=").append(reportId);
sb.append(", tenantId=").append(tenantId);
sb.append(", createBy=").append(createBy);
sb.append(", createTime=").append(createTime);
sb.append(", updateBy=").append(updateBy);
sb.append(", updateTime=").append(updateTime);
sb.append(", remark=").append(remark);
sb.append("]");
return sb.toString();
}
}

711
acupuncture-system/src/main/java/com/acupuncture/system/domain/po/RmsReportManagementTenantExample.java

@ -0,0 +1,711 @@
package com.acupuncture.system.domain.po;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
public class RmsReportManagementTenantExample {
protected String orderByClause;
protected boolean distinct;
protected List<Criteria> oredCriteria;
public RmsReportManagementTenantExample() {
oredCriteria = new ArrayList<Criteria>();
}
public void setOrderByClause(String orderByClause) {
this.orderByClause = orderByClause;
}
public String getOrderByClause() {
return orderByClause;
}
public void setDistinct(boolean distinct) {
this.distinct = distinct;
}
public boolean isDistinct() {
return distinct;
}
public List<Criteria> getOredCriteria() {
return oredCriteria;
}
public void or(Criteria criteria) {
oredCriteria.add(criteria);
}
public Criteria or() {
Criteria criteria = createCriteriaInternal();
oredCriteria.add(criteria);
return criteria;
}
public Criteria createCriteria() {
Criteria criteria = createCriteriaInternal();
if (oredCriteria.size() == 0) {
oredCriteria.add(criteria);
}
return criteria;
}
protected Criteria createCriteriaInternal() {
Criteria criteria = new Criteria();
return criteria;
}
public void clear() {
oredCriteria.clear();
orderByClause = null;
distinct = false;
}
protected abstract static class GeneratedCriteria {
protected List<Criterion> criteria;
protected GeneratedCriteria() {
super();
criteria = new ArrayList<Criterion>();
}
public boolean isValid() {
return criteria.size() > 0;
}
public List<Criterion> getAllCriteria() {
return criteria;
}
public List<Criterion> getCriteria() {
return criteria;
}
protected void addCriterion(String condition) {
if (condition == null) {
throw new RuntimeException("Value for condition cannot be null");
}
criteria.add(new Criterion(condition));
}
protected void addCriterion(String condition, Object value, String property) {
if (value == null) {
throw new RuntimeException("Value for " + property + " cannot be null");
}
criteria.add(new Criterion(condition, value));
}
protected void addCriterion(String condition, Object value1, Object value2, String property) {
if (value1 == null || value2 == null) {
throw new RuntimeException("Between values for " + property + " cannot be null");
}
criteria.add(new Criterion(condition, value1, value2));
}
public Criteria andIdIsNull() {
addCriterion("id is null");
return (Criteria) this;
}
public Criteria andIdIsNotNull() {
addCriterion("id is not null");
return (Criteria) this;
}
public Criteria andIdEqualTo(Long value) {
addCriterion("id =", value, "id");
return (Criteria) this;
}
public Criteria andIdNotEqualTo(Long value) {
addCriterion("id <>", value, "id");
return (Criteria) this;
}
public Criteria andIdGreaterThan(Long value) {
addCriterion("id >", value, "id");
return (Criteria) this;
}
public Criteria andIdGreaterThanOrEqualTo(Long value) {
addCriterion("id >=", value, "id");
return (Criteria) this;
}
public Criteria andIdLessThan(Long value) {
addCriterion("id <", value, "id");
return (Criteria) this;
}
public Criteria andIdLessThanOrEqualTo(Long value) {
addCriterion("id <=", value, "id");
return (Criteria) this;
}
public Criteria andIdIn(List<Long> values) {
addCriterion("id in", values, "id");
return (Criteria) this;
}
public Criteria andIdNotIn(List<Long> values) {
addCriterion("id not in", values, "id");
return (Criteria) this;
}
public Criteria andIdBetween(Long value1, Long value2) {
addCriterion("id between", value1, value2, "id");
return (Criteria) this;
}
public Criteria andIdNotBetween(Long value1, Long value2) {
addCriterion("id not between", value1, value2, "id");
return (Criteria) this;
}
public Criteria andReportIdIsNull() {
addCriterion("report_id is null");
return (Criteria) this;
}
public Criteria andReportIdIsNotNull() {
addCriterion("report_id is not null");
return (Criteria) this;
}
public Criteria andReportIdEqualTo(Long value) {
addCriterion("report_id =", value, "reportId");
return (Criteria) this;
}
public Criteria andReportIdNotEqualTo(Long value) {
addCriterion("report_id <>", value, "reportId");
return (Criteria) this;
}
public Criteria andReportIdGreaterThan(Long value) {
addCriterion("report_id >", value, "reportId");
return (Criteria) this;
}
public Criteria andReportIdGreaterThanOrEqualTo(Long value) {
addCriterion("report_id >=", value, "reportId");
return (Criteria) this;
}
public Criteria andReportIdLessThan(Long value) {
addCriterion("report_id <", value, "reportId");
return (Criteria) this;
}
public Criteria andReportIdLessThanOrEqualTo(Long value) {
addCriterion("report_id <=", value, "reportId");
return (Criteria) this;
}
public Criteria andReportIdIn(List<Long> values) {
addCriterion("report_id in", values, "reportId");
return (Criteria) this;
}
public Criteria andReportIdNotIn(List<Long> values) {
addCriterion("report_id not in", values, "reportId");
return (Criteria) this;
}
public Criteria andReportIdBetween(Long value1, Long value2) {
addCriterion("report_id between", value1, value2, "reportId");
return (Criteria) this;
}
public Criteria andReportIdNotBetween(Long value1, Long value2) {
addCriterion("report_id not between", value1, value2, "reportId");
return (Criteria) this;
}
public Criteria andTenantIdIsNull() {
addCriterion("tenant_id is null");
return (Criteria) this;
}
public Criteria andTenantIdIsNotNull() {
addCriterion("tenant_id is not null");
return (Criteria) this;
}
public Criteria andTenantIdEqualTo(Long value) {
addCriterion("tenant_id =", value, "tenantId");
return (Criteria) this;
}
public Criteria andTenantIdNotEqualTo(Long value) {
addCriterion("tenant_id <>", value, "tenantId");
return (Criteria) this;
}
public Criteria andTenantIdGreaterThan(Long value) {
addCriterion("tenant_id >", value, "tenantId");
return (Criteria) this;
}
public Criteria andTenantIdGreaterThanOrEqualTo(Long value) {
addCriterion("tenant_id >=", value, "tenantId");
return (Criteria) this;
}
public Criteria andTenantIdLessThan(Long value) {
addCriterion("tenant_id <", value, "tenantId");
return (Criteria) this;
}
public Criteria andTenantIdLessThanOrEqualTo(Long value) {
addCriterion("tenant_id <=", value, "tenantId");
return (Criteria) this;
}
public Criteria andTenantIdIn(List<Long> values) {
addCriterion("tenant_id in", values, "tenantId");
return (Criteria) this;
}
public Criteria andTenantIdNotIn(List<Long> values) {
addCriterion("tenant_id not in", values, "tenantId");
return (Criteria) this;
}
public Criteria andTenantIdBetween(Long value1, Long value2) {
addCriterion("tenant_id between", value1, value2, "tenantId");
return (Criteria) this;
}
public Criteria andTenantIdNotBetween(Long value1, Long value2) {
addCriterion("tenant_id not between", value1, value2, "tenantId");
return (Criteria) this;
}
public Criteria andCreateByIsNull() {
addCriterion("create_by is null");
return (Criteria) this;
}
public Criteria andCreateByIsNotNull() {
addCriterion("create_by is not null");
return (Criteria) this;
}
public Criteria andCreateByEqualTo(String value) {
addCriterion("create_by =", value, "createBy");
return (Criteria) this;
}
public Criteria andCreateByNotEqualTo(String value) {
addCriterion("create_by <>", value, "createBy");
return (Criteria) this;
}
public Criteria andCreateByGreaterThan(String value) {
addCriterion("create_by >", value, "createBy");
return (Criteria) this;
}
public Criteria andCreateByGreaterThanOrEqualTo(String value) {
addCriterion("create_by >=", value, "createBy");
return (Criteria) this;
}
public Criteria andCreateByLessThan(String value) {
addCriterion("create_by <", value, "createBy");
return (Criteria) this;
}
public Criteria andCreateByLessThanOrEqualTo(String value) {
addCriterion("create_by <=", value, "createBy");
return (Criteria) this;
}
public Criteria andCreateByLike(String value) {
addCriterion("create_by like", value, "createBy");
return (Criteria) this;
}
public Criteria andCreateByNotLike(String value) {
addCriterion("create_by not like", value, "createBy");
return (Criteria) this;
}
public Criteria andCreateByIn(List<String> values) {
addCriterion("create_by in", values, "createBy");
return (Criteria) this;
}
public Criteria andCreateByNotIn(List<String> values) {
addCriterion("create_by not in", values, "createBy");
return (Criteria) this;
}
public Criteria andCreateByBetween(String value1, String value2) {
addCriterion("create_by between", value1, value2, "createBy");
return (Criteria) this;
}
public Criteria andCreateByNotBetween(String value1, String value2) {
addCriterion("create_by not between", value1, value2, "createBy");
return (Criteria) this;
}
public Criteria andCreateTimeIsNull() {
addCriterion("create_time is null");
return (Criteria) this;
}
public Criteria andCreateTimeIsNotNull() {
addCriterion("create_time is not null");
return (Criteria) this;
}
public Criteria andCreateTimeEqualTo(Date value) {
addCriterion("create_time =", value, "createTime");
return (Criteria) this;
}
public Criteria andCreateTimeNotEqualTo(Date value) {
addCriterion("create_time <>", value, "createTime");
return (Criteria) this;
}
public Criteria andCreateTimeGreaterThan(Date value) {
addCriterion("create_time >", value, "createTime");
return (Criteria) this;
}
public Criteria andCreateTimeGreaterThanOrEqualTo(Date value) {
addCriterion("create_time >=", value, "createTime");
return (Criteria) this;
}
public Criteria andCreateTimeLessThan(Date value) {
addCriterion("create_time <", value, "createTime");
return (Criteria) this;
}
public Criteria andCreateTimeLessThanOrEqualTo(Date value) {
addCriterion("create_time <=", value, "createTime");
return (Criteria) this;
}
public Criteria andCreateTimeIn(List<Date> values) {
addCriterion("create_time in", values, "createTime");
return (Criteria) this;
}
public Criteria andCreateTimeNotIn(List<Date> values) {
addCriterion("create_time not in", values, "createTime");
return (Criteria) this;
}
public Criteria andCreateTimeBetween(Date value1, Date value2) {
addCriterion("create_time between", value1, value2, "createTime");
return (Criteria) this;
}
public Criteria andCreateTimeNotBetween(Date value1, Date value2) {
addCriterion("create_time not between", value1, value2, "createTime");
return (Criteria) this;
}
public Criteria andUpdateByIsNull() {
addCriterion("update_by is null");
return (Criteria) this;
}
public Criteria andUpdateByIsNotNull() {
addCriterion("update_by is not null");
return (Criteria) this;
}
public Criteria andUpdateByEqualTo(String value) {
addCriterion("update_by =", value, "updateBy");
return (Criteria) this;
}
public Criteria andUpdateByNotEqualTo(String value) {
addCriterion("update_by <>", value, "updateBy");
return (Criteria) this;
}
public Criteria andUpdateByGreaterThan(String value) {
addCriterion("update_by >", value, "updateBy");
return (Criteria) this;
}
public Criteria andUpdateByGreaterThanOrEqualTo(String value) {
addCriterion("update_by >=", value, "updateBy");
return (Criteria) this;
}
public Criteria andUpdateByLessThan(String value) {
addCriterion("update_by <", value, "updateBy");
return (Criteria) this;
}
public Criteria andUpdateByLessThanOrEqualTo(String value) {
addCriterion("update_by <=", value, "updateBy");
return (Criteria) this;
}
public Criteria andUpdateByLike(String value) {
addCriterion("update_by like", value, "updateBy");
return (Criteria) this;
}
public Criteria andUpdateByNotLike(String value) {
addCriterion("update_by not like", value, "updateBy");
return (Criteria) this;
}
public Criteria andUpdateByIn(List<String> values) {
addCriterion("update_by in", values, "updateBy");
return (Criteria) this;
}
public Criteria andUpdateByNotIn(List<String> values) {
addCriterion("update_by not in", values, "updateBy");
return (Criteria) this;
}
public Criteria andUpdateByBetween(String value1, String value2) {
addCriterion("update_by between", value1, value2, "updateBy");
return (Criteria) this;
}
public Criteria andUpdateByNotBetween(String value1, String value2) {
addCriterion("update_by not between", value1, value2, "updateBy");
return (Criteria) this;
}
public Criteria andUpdateTimeIsNull() {
addCriterion("update_time is null");
return (Criteria) this;
}
public Criteria andUpdateTimeIsNotNull() {
addCriterion("update_time is not null");
return (Criteria) this;
}
public Criteria andUpdateTimeEqualTo(Date value) {
addCriterion("update_time =", value, "updateTime");
return (Criteria) this;
}
public Criteria andUpdateTimeNotEqualTo(Date value) {
addCriterion("update_time <>", value, "updateTime");
return (Criteria) this;
}
public Criteria andUpdateTimeGreaterThan(Date value) {
addCriterion("update_time >", value, "updateTime");
return (Criteria) this;
}
public Criteria andUpdateTimeGreaterThanOrEqualTo(Date value) {
addCriterion("update_time >=", value, "updateTime");
return (Criteria) this;
}
public Criteria andUpdateTimeLessThan(Date value) {
addCriterion("update_time <", value, "updateTime");
return (Criteria) this;
}
public Criteria andUpdateTimeLessThanOrEqualTo(Date value) {
addCriterion("update_time <=", value, "updateTime");
return (Criteria) this;
}
public Criteria andUpdateTimeIn(List<Date> values) {
addCriterion("update_time in", values, "updateTime");
return (Criteria) this;
}
public Criteria andUpdateTimeNotIn(List<Date> values) {
addCriterion("update_time not in", values, "updateTime");
return (Criteria) this;
}
public Criteria andUpdateTimeBetween(Date value1, Date value2) {
addCriterion("update_time between", value1, value2, "updateTime");
return (Criteria) this;
}
public Criteria andUpdateTimeNotBetween(Date value1, Date value2) {
addCriterion("update_time not between", value1, value2, "updateTime");
return (Criteria) this;
}
public Criteria andRemarkIsNull() {
addCriterion("remark is null");
return (Criteria) this;
}
public Criteria andRemarkIsNotNull() {
addCriterion("remark is not null");
return (Criteria) this;
}
public Criteria andRemarkEqualTo(String value) {
addCriterion("remark =", value, "remark");
return (Criteria) this;
}
public Criteria andRemarkNotEqualTo(String value) {
addCriterion("remark <>", value, "remark");
return (Criteria) this;
}
public Criteria andRemarkGreaterThan(String value) {
addCriterion("remark >", value, "remark");
return (Criteria) this;
}
public Criteria andRemarkGreaterThanOrEqualTo(String value) {
addCriterion("remark >=", value, "remark");
return (Criteria) this;
}
public Criteria andRemarkLessThan(String value) {
addCriterion("remark <", value, "remark");
return (Criteria) this;
}
public Criteria andRemarkLessThanOrEqualTo(String value) {
addCriterion("remark <=", value, "remark");
return (Criteria) this;
}
public Criteria andRemarkLike(String value) {
addCriterion("remark like", value, "remark");
return (Criteria) this;
}
public Criteria andRemarkNotLike(String value) {
addCriterion("remark not like", value, "remark");
return (Criteria) this;
}
public Criteria andRemarkIn(List<String> values) {
addCriterion("remark in", values, "remark");
return (Criteria) this;
}
public Criteria andRemarkNotIn(List<String> values) {
addCriterion("remark not in", values, "remark");
return (Criteria) this;
}
public Criteria andRemarkBetween(String value1, String value2) {
addCriterion("remark between", value1, value2, "remark");
return (Criteria) this;
}
public Criteria andRemarkNotBetween(String value1, String value2) {
addCriterion("remark not between", value1, value2, "remark");
return (Criteria) this;
}
}
public static class Criteria extends GeneratedCriteria {
protected Criteria() {
super();
}
}
public static class Criterion {
private String condition;
private Object value;
private Object secondValue;
private boolean noValue;
private boolean singleValue;
private boolean betweenValue;
private boolean listValue;
private String typeHandler;
public String getCondition() {
return condition;
}
public Object getValue() {
return value;
}
public Object getSecondValue() {
return secondValue;
}
public boolean isNoValue() {
return noValue;
}
public boolean isSingleValue() {
return singleValue;
}
public boolean isBetweenValue() {
return betweenValue;
}
public boolean isListValue() {
return listValue;
}
public String getTypeHandler() {
return typeHandler;
}
protected Criterion(String condition) {
super();
this.condition = condition;
this.typeHandler = null;
this.noValue = true;
}
protected Criterion(String condition, Object value, String typeHandler) {
super();
this.condition = condition;
this.value = value;
this.typeHandler = typeHandler;
if (value instanceof List<?>) {
this.listValue = true;
} else {
this.singleValue = true;
}
}
protected Criterion(String condition, Object value) {
this(condition, value, null);
}
protected Criterion(String condition, Object value, Object secondValue, String typeHandler) {
super();
this.condition = condition;
this.value = value;
this.secondValue = secondValue;
this.typeHandler = typeHandler;
this.betweenValue = true;
}
protected Criterion(String condition, Object value, Object secondValue) {
this(condition, value, secondValue, null);
}
}
}

11
acupuncture-system/src/main/java/com/acupuncture/system/domain/po/RmsReportType.java

@ -20,6 +20,8 @@ public class RmsReportType implements Serializable {
private String remark; private String remark;
private String file;
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
public Long getId() { public Long getId() {
@ -86,6 +88,14 @@ public class RmsReportType implements Serializable {
this.remark = remark == null ? null : remark.trim(); this.remark = remark == null ? null : remark.trim();
} }
public String getFile() {
return file;
}
public void setFile(String file) {
this.file = file == null ? null : file.trim();
}
@Override @Override
public String toString() { public String toString() {
StringBuilder sb = new StringBuilder(); StringBuilder sb = new StringBuilder();
@ -100,6 +110,7 @@ public class RmsReportType implements Serializable {
sb.append(", updateBy=").append(updateBy); sb.append(", updateBy=").append(updateBy);
sb.append(", updateTime=").append(updateTime); sb.append(", updateTime=").append(updateTime);
sb.append(", remark=").append(remark); sb.append(", remark=").append(remark);
sb.append(", file=").append(file);
sb.append("]"); sb.append("]");
return sb.toString(); return sb.toString();
} }

70
acupuncture-system/src/main/java/com/acupuncture/system/domain/po/RmsReportTypeExample.java

@ -624,6 +624,76 @@ public class RmsReportTypeExample {
addCriterion("remark not between", value1, value2, "remark"); addCriterion("remark not between", value1, value2, "remark");
return (Criteria) this; return (Criteria) this;
} }
public Criteria andFileIsNull() {
addCriterion("file is null");
return (Criteria) this;
}
public Criteria andFileIsNotNull() {
addCriterion("file is not null");
return (Criteria) this;
}
public Criteria andFileEqualTo(String value) {
addCriterion("file =", value, "file");
return (Criteria) this;
}
public Criteria andFileNotEqualTo(String value) {
addCriterion("file <>", value, "file");
return (Criteria) this;
}
public Criteria andFileGreaterThan(String value) {
addCriterion("file >", value, "file");
return (Criteria) this;
}
public Criteria andFileGreaterThanOrEqualTo(String value) {
addCriterion("file >=", value, "file");
return (Criteria) this;
}
public Criteria andFileLessThan(String value) {
addCriterion("file <", value, "file");
return (Criteria) this;
}
public Criteria andFileLessThanOrEqualTo(String value) {
addCriterion("file <=", value, "file");
return (Criteria) this;
}
public Criteria andFileLike(String value) {
addCriterion("file like", value, "file");
return (Criteria) this;
}
public Criteria andFileNotLike(String value) {
addCriterion("file not like", value, "file");
return (Criteria) this;
}
public Criteria andFileIn(List<String> values) {
addCriterion("file in", values, "file");
return (Criteria) this;
}
public Criteria andFileNotIn(List<String> values) {
addCriterion("file not in", values, "file");
return (Criteria) this;
}
public Criteria andFileBetween(String value1, String value2) {
addCriterion("file between", value1, value2, "file");
return (Criteria) this;
}
public Criteria andFileNotBetween(String value1, String value2) {
addCriterion("file not between", value1, value2, "file");
return (Criteria) this;
}
} }
public static class Criteria extends GeneratedCriteria { public static class Criteria extends GeneratedCriteria {

106
acupuncture-system/src/main/java/com/acupuncture/system/domain/po/RmsReportTypeTenant.java

@ -0,0 +1,106 @@
package com.acupuncture.system.domain.po;
import java.io.Serializable;
import java.util.Date;
public class RmsReportTypeTenant implements Serializable {
private Long id;
private Long reportTypeId;
private Long tenantId;
private String createBy;
private Date createTime;
private String updateBy;
private Date updateTime;
private String remark;
private static final long serialVersionUID = 1L;
public Long getId() {
return id;
}
public void setId(Long id) {
this.id = id;
}
public Long getReportTypeId() {
return reportTypeId;
}
public void setReportTypeId(Long reportTypeId) {
this.reportTypeId = reportTypeId;
}
public Long getTenantId() {
return tenantId;
}
public void setTenantId(Long tenantId) {
this.tenantId = tenantId;
}
public String getCreateBy() {
return createBy;
}
public void setCreateBy(String createBy) {
this.createBy = createBy == null ? null : createBy.trim();
}
public Date getCreateTime() {
return createTime;
}
public void setCreateTime(Date createTime) {
this.createTime = createTime;
}
public String getUpdateBy() {
return updateBy;
}
public void setUpdateBy(String updateBy) {
this.updateBy = updateBy == null ? null : updateBy.trim();
}
public Date getUpdateTime() {
return updateTime;
}
public void setUpdateTime(Date updateTime) {
this.updateTime = updateTime;
}
public String getRemark() {
return remark;
}
public void setRemark(String remark) {
this.remark = remark == null ? null : remark.trim();
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append(getClass().getSimpleName());
sb.append(" [");
sb.append("Hash = ").append(hashCode());
sb.append(", id=").append(id);
sb.append(", reportTypeId=").append(reportTypeId);
sb.append(", tenantId=").append(tenantId);
sb.append(", createBy=").append(createBy);
sb.append(", createTime=").append(createTime);
sb.append(", updateBy=").append(updateBy);
sb.append(", updateTime=").append(updateTime);
sb.append(", remark=").append(remark);
sb.append("]");
return sb.toString();
}
}

711
acupuncture-system/src/main/java/com/acupuncture/system/domain/po/RmsReportTypeTenantExample.java

@ -0,0 +1,711 @@
package com.acupuncture.system.domain.po;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
public class RmsReportTypeTenantExample {
protected String orderByClause;
protected boolean distinct;
protected List<Criteria> oredCriteria;
public RmsReportTypeTenantExample() {
oredCriteria = new ArrayList<Criteria>();
}
public void setOrderByClause(String orderByClause) {
this.orderByClause = orderByClause;
}
public String getOrderByClause() {
return orderByClause;
}
public void setDistinct(boolean distinct) {
this.distinct = distinct;
}
public boolean isDistinct() {
return distinct;
}
public List<Criteria> getOredCriteria() {
return oredCriteria;
}
public void or(Criteria criteria) {
oredCriteria.add(criteria);
}
public Criteria or() {
Criteria criteria = createCriteriaInternal();
oredCriteria.add(criteria);
return criteria;
}
public Criteria createCriteria() {
Criteria criteria = createCriteriaInternal();
if (oredCriteria.size() == 0) {
oredCriteria.add(criteria);
}
return criteria;
}
protected Criteria createCriteriaInternal() {
Criteria criteria = new Criteria();
return criteria;
}
public void clear() {
oredCriteria.clear();
orderByClause = null;
distinct = false;
}
protected abstract static class GeneratedCriteria {
protected List<Criterion> criteria;
protected GeneratedCriteria() {
super();
criteria = new ArrayList<Criterion>();
}
public boolean isValid() {
return criteria.size() > 0;
}
public List<Criterion> getAllCriteria() {
return criteria;
}
public List<Criterion> getCriteria() {
return criteria;
}
protected void addCriterion(String condition) {
if (condition == null) {
throw new RuntimeException("Value for condition cannot be null");
}
criteria.add(new Criterion(condition));
}
protected void addCriterion(String condition, Object value, String property) {
if (value == null) {
throw new RuntimeException("Value for " + property + " cannot be null");
}
criteria.add(new Criterion(condition, value));
}
protected void addCriterion(String condition, Object value1, Object value2, String property) {
if (value1 == null || value2 == null) {
throw new RuntimeException("Between values for " + property + " cannot be null");
}
criteria.add(new Criterion(condition, value1, value2));
}
public Criteria andIdIsNull() {
addCriterion("id is null");
return (Criteria) this;
}
public Criteria andIdIsNotNull() {
addCriterion("id is not null");
return (Criteria) this;
}
public Criteria andIdEqualTo(Long value) {
addCriterion("id =", value, "id");
return (Criteria) this;
}
public Criteria andIdNotEqualTo(Long value) {
addCriterion("id <>", value, "id");
return (Criteria) this;
}
public Criteria andIdGreaterThan(Long value) {
addCriterion("id >", value, "id");
return (Criteria) this;
}
public Criteria andIdGreaterThanOrEqualTo(Long value) {
addCriterion("id >=", value, "id");
return (Criteria) this;
}
public Criteria andIdLessThan(Long value) {
addCriterion("id <", value, "id");
return (Criteria) this;
}
public Criteria andIdLessThanOrEqualTo(Long value) {
addCriterion("id <=", value, "id");
return (Criteria) this;
}
public Criteria andIdIn(List<Long> values) {
addCriterion("id in", values, "id");
return (Criteria) this;
}
public Criteria andIdNotIn(List<Long> values) {
addCriterion("id not in", values, "id");
return (Criteria) this;
}
public Criteria andIdBetween(Long value1, Long value2) {
addCriterion("id between", value1, value2, "id");
return (Criteria) this;
}
public Criteria andIdNotBetween(Long value1, Long value2) {
addCriterion("id not between", value1, value2, "id");
return (Criteria) this;
}
public Criteria andReportTypeIdIsNull() {
addCriterion("report_type_id is null");
return (Criteria) this;
}
public Criteria andReportTypeIdIsNotNull() {
addCriterion("report_type_id is not null");
return (Criteria) this;
}
public Criteria andReportTypeIdEqualTo(Long value) {
addCriterion("report_type_id =", value, "reportTypeId");
return (Criteria) this;
}
public Criteria andReportTypeIdNotEqualTo(Long value) {
addCriterion("report_type_id <>", value, "reportTypeId");
return (Criteria) this;
}
public Criteria andReportTypeIdGreaterThan(Long value) {
addCriterion("report_type_id >", value, "reportTypeId");
return (Criteria) this;
}
public Criteria andReportTypeIdGreaterThanOrEqualTo(Long value) {
addCriterion("report_type_id >=", value, "reportTypeId");
return (Criteria) this;
}
public Criteria andReportTypeIdLessThan(Long value) {
addCriterion("report_type_id <", value, "reportTypeId");
return (Criteria) this;
}
public Criteria andReportTypeIdLessThanOrEqualTo(Long value) {
addCriterion("report_type_id <=", value, "reportTypeId");
return (Criteria) this;
}
public Criteria andReportTypeIdIn(List<Long> values) {
addCriterion("report_type_id in", values, "reportTypeId");
return (Criteria) this;
}
public Criteria andReportTypeIdNotIn(List<Long> values) {
addCriterion("report_type_id not in", values, "reportTypeId");
return (Criteria) this;
}
public Criteria andReportTypeIdBetween(Long value1, Long value2) {
addCriterion("report_type_id between", value1, value2, "reportTypeId");
return (Criteria) this;
}
public Criteria andReportTypeIdNotBetween(Long value1, Long value2) {
addCriterion("report_type_id not between", value1, value2, "reportTypeId");
return (Criteria) this;
}
public Criteria andTenantIdIsNull() {
addCriterion("tenant_id is null");
return (Criteria) this;
}
public Criteria andTenantIdIsNotNull() {
addCriterion("tenant_id is not null");
return (Criteria) this;
}
public Criteria andTenantIdEqualTo(Long value) {
addCriterion("tenant_id =", value, "tenantId");
return (Criteria) this;
}
public Criteria andTenantIdNotEqualTo(Long value) {
addCriterion("tenant_id <>", value, "tenantId");
return (Criteria) this;
}
public Criteria andTenantIdGreaterThan(Long value) {
addCriterion("tenant_id >", value, "tenantId");
return (Criteria) this;
}
public Criteria andTenantIdGreaterThanOrEqualTo(Long value) {
addCriterion("tenant_id >=", value, "tenantId");
return (Criteria) this;
}
public Criteria andTenantIdLessThan(Long value) {
addCriterion("tenant_id <", value, "tenantId");
return (Criteria) this;
}
public Criteria andTenantIdLessThanOrEqualTo(Long value) {
addCriterion("tenant_id <=", value, "tenantId");
return (Criteria) this;
}
public Criteria andTenantIdIn(List<Long> values) {
addCriterion("tenant_id in", values, "tenantId");
return (Criteria) this;
}
public Criteria andTenantIdNotIn(List<Long> values) {
addCriterion("tenant_id not in", values, "tenantId");
return (Criteria) this;
}
public Criteria andTenantIdBetween(Long value1, Long value2) {
addCriterion("tenant_id between", value1, value2, "tenantId");
return (Criteria) this;
}
public Criteria andTenantIdNotBetween(Long value1, Long value2) {
addCriterion("tenant_id not between", value1, value2, "tenantId");
return (Criteria) this;
}
public Criteria andCreateByIsNull() {
addCriterion("create_by is null");
return (Criteria) this;
}
public Criteria andCreateByIsNotNull() {
addCriterion("create_by is not null");
return (Criteria) this;
}
public Criteria andCreateByEqualTo(String value) {
addCriterion("create_by =", value, "createBy");
return (Criteria) this;
}
public Criteria andCreateByNotEqualTo(String value) {
addCriterion("create_by <>", value, "createBy");
return (Criteria) this;
}
public Criteria andCreateByGreaterThan(String value) {
addCriterion("create_by >", value, "createBy");
return (Criteria) this;
}
public Criteria andCreateByGreaterThanOrEqualTo(String value) {
addCriterion("create_by >=", value, "createBy");
return (Criteria) this;
}
public Criteria andCreateByLessThan(String value) {
addCriterion("create_by <", value, "createBy");
return (Criteria) this;
}
public Criteria andCreateByLessThanOrEqualTo(String value) {
addCriterion("create_by <=", value, "createBy");
return (Criteria) this;
}
public Criteria andCreateByLike(String value) {
addCriterion("create_by like", value, "createBy");
return (Criteria) this;
}
public Criteria andCreateByNotLike(String value) {
addCriterion("create_by not like", value, "createBy");
return (Criteria) this;
}
public Criteria andCreateByIn(List<String> values) {
addCriterion("create_by in", values, "createBy");
return (Criteria) this;
}
public Criteria andCreateByNotIn(List<String> values) {
addCriterion("create_by not in", values, "createBy");
return (Criteria) this;
}
public Criteria andCreateByBetween(String value1, String value2) {
addCriterion("create_by between", value1, value2, "createBy");
return (Criteria) this;
}
public Criteria andCreateByNotBetween(String value1, String value2) {
addCriterion("create_by not between", value1, value2, "createBy");
return (Criteria) this;
}
public Criteria andCreateTimeIsNull() {
addCriterion("create_time is null");
return (Criteria) this;
}
public Criteria andCreateTimeIsNotNull() {
addCriterion("create_time is not null");
return (Criteria) this;
}
public Criteria andCreateTimeEqualTo(Date value) {
addCriterion("create_time =", value, "createTime");
return (Criteria) this;
}
public Criteria andCreateTimeNotEqualTo(Date value) {
addCriterion("create_time <>", value, "createTime");
return (Criteria) this;
}
public Criteria andCreateTimeGreaterThan(Date value) {
addCriterion("create_time >", value, "createTime");
return (Criteria) this;
}
public Criteria andCreateTimeGreaterThanOrEqualTo(Date value) {
addCriterion("create_time >=", value, "createTime");
return (Criteria) this;
}
public Criteria andCreateTimeLessThan(Date value) {
addCriterion("create_time <", value, "createTime");
return (Criteria) this;
}
public Criteria andCreateTimeLessThanOrEqualTo(Date value) {
addCriterion("create_time <=", value, "createTime");
return (Criteria) this;
}
public Criteria andCreateTimeIn(List<Date> values) {
addCriterion("create_time in", values, "createTime");
return (Criteria) this;
}
public Criteria andCreateTimeNotIn(List<Date> values) {
addCriterion("create_time not in", values, "createTime");
return (Criteria) this;
}
public Criteria andCreateTimeBetween(Date value1, Date value2) {
addCriterion("create_time between", value1, value2, "createTime");
return (Criteria) this;
}
public Criteria andCreateTimeNotBetween(Date value1, Date value2) {
addCriterion("create_time not between", value1, value2, "createTime");
return (Criteria) this;
}
public Criteria andUpdateByIsNull() {
addCriterion("update_by is null");
return (Criteria) this;
}
public Criteria andUpdateByIsNotNull() {
addCriterion("update_by is not null");
return (Criteria) this;
}
public Criteria andUpdateByEqualTo(String value) {
addCriterion("update_by =", value, "updateBy");
return (Criteria) this;
}
public Criteria andUpdateByNotEqualTo(String value) {
addCriterion("update_by <>", value, "updateBy");
return (Criteria) this;
}
public Criteria andUpdateByGreaterThan(String value) {
addCriterion("update_by >", value, "updateBy");
return (Criteria) this;
}
public Criteria andUpdateByGreaterThanOrEqualTo(String value) {
addCriterion("update_by >=", value, "updateBy");
return (Criteria) this;
}
public Criteria andUpdateByLessThan(String value) {
addCriterion("update_by <", value, "updateBy");
return (Criteria) this;
}
public Criteria andUpdateByLessThanOrEqualTo(String value) {
addCriterion("update_by <=", value, "updateBy");
return (Criteria) this;
}
public Criteria andUpdateByLike(String value) {
addCriterion("update_by like", value, "updateBy");
return (Criteria) this;
}
public Criteria andUpdateByNotLike(String value) {
addCriterion("update_by not like", value, "updateBy");
return (Criteria) this;
}
public Criteria andUpdateByIn(List<String> values) {
addCriterion("update_by in", values, "updateBy");
return (Criteria) this;
}
public Criteria andUpdateByNotIn(List<String> values) {
addCriterion("update_by not in", values, "updateBy");
return (Criteria) this;
}
public Criteria andUpdateByBetween(String value1, String value2) {
addCriterion("update_by between", value1, value2, "updateBy");
return (Criteria) this;
}
public Criteria andUpdateByNotBetween(String value1, String value2) {
addCriterion("update_by not between", value1, value2, "updateBy");
return (Criteria) this;
}
public Criteria andUpdateTimeIsNull() {
addCriterion("update_time is null");
return (Criteria) this;
}
public Criteria andUpdateTimeIsNotNull() {
addCriterion("update_time is not null");
return (Criteria) this;
}
public Criteria andUpdateTimeEqualTo(Date value) {
addCriterion("update_time =", value, "updateTime");
return (Criteria) this;
}
public Criteria andUpdateTimeNotEqualTo(Date value) {
addCriterion("update_time <>", value, "updateTime");
return (Criteria) this;
}
public Criteria andUpdateTimeGreaterThan(Date value) {
addCriterion("update_time >", value, "updateTime");
return (Criteria) this;
}
public Criteria andUpdateTimeGreaterThanOrEqualTo(Date value) {
addCriterion("update_time >=", value, "updateTime");
return (Criteria) this;
}
public Criteria andUpdateTimeLessThan(Date value) {
addCriterion("update_time <", value, "updateTime");
return (Criteria) this;
}
public Criteria andUpdateTimeLessThanOrEqualTo(Date value) {
addCriterion("update_time <=", value, "updateTime");
return (Criteria) this;
}
public Criteria andUpdateTimeIn(List<Date> values) {
addCriterion("update_time in", values, "updateTime");
return (Criteria) this;
}
public Criteria andUpdateTimeNotIn(List<Date> values) {
addCriterion("update_time not in", values, "updateTime");
return (Criteria) this;
}
public Criteria andUpdateTimeBetween(Date value1, Date value2) {
addCriterion("update_time between", value1, value2, "updateTime");
return (Criteria) this;
}
public Criteria andUpdateTimeNotBetween(Date value1, Date value2) {
addCriterion("update_time not between", value1, value2, "updateTime");
return (Criteria) this;
}
public Criteria andRemarkIsNull() {
addCriterion("remark is null");
return (Criteria) this;
}
public Criteria andRemarkIsNotNull() {
addCriterion("remark is not null");
return (Criteria) this;
}
public Criteria andRemarkEqualTo(String value) {
addCriterion("remark =", value, "remark");
return (Criteria) this;
}
public Criteria andRemarkNotEqualTo(String value) {
addCriterion("remark <>", value, "remark");
return (Criteria) this;
}
public Criteria andRemarkGreaterThan(String value) {
addCriterion("remark >", value, "remark");
return (Criteria) this;
}
public Criteria andRemarkGreaterThanOrEqualTo(String value) {
addCriterion("remark >=", value, "remark");
return (Criteria) this;
}
public Criteria andRemarkLessThan(String value) {
addCriterion("remark <", value, "remark");
return (Criteria) this;
}
public Criteria andRemarkLessThanOrEqualTo(String value) {
addCriterion("remark <=", value, "remark");
return (Criteria) this;
}
public Criteria andRemarkLike(String value) {
addCriterion("remark like", value, "remark");
return (Criteria) this;
}
public Criteria andRemarkNotLike(String value) {
addCriterion("remark not like", value, "remark");
return (Criteria) this;
}
public Criteria andRemarkIn(List<String> values) {
addCriterion("remark in", values, "remark");
return (Criteria) this;
}
public Criteria andRemarkNotIn(List<String> values) {
addCriterion("remark not in", values, "remark");
return (Criteria) this;
}
public Criteria andRemarkBetween(String value1, String value2) {
addCriterion("remark between", value1, value2, "remark");
return (Criteria) this;
}
public Criteria andRemarkNotBetween(String value1, String value2) {
addCriterion("remark not between", value1, value2, "remark");
return (Criteria) this;
}
}
public static class Criteria extends GeneratedCriteria {
protected Criteria() {
super();
}
}
public static class Criterion {
private String condition;
private Object value;
private Object secondValue;
private boolean noValue;
private boolean singleValue;
private boolean betweenValue;
private boolean listValue;
private String typeHandler;
public String getCondition() {
return condition;
}
public Object getValue() {
return value;
}
public Object getSecondValue() {
return secondValue;
}
public boolean isNoValue() {
return noValue;
}
public boolean isSingleValue() {
return singleValue;
}
public boolean isBetweenValue() {
return betweenValue;
}
public boolean isListValue() {
return listValue;
}
public String getTypeHandler() {
return typeHandler;
}
protected Criterion(String condition) {
super();
this.condition = condition;
this.typeHandler = null;
this.noValue = true;
}
protected Criterion(String condition, Object value, String typeHandler) {
super();
this.condition = condition;
this.value = value;
this.typeHandler = typeHandler;
if (value instanceof List<?>) {
this.listValue = true;
} else {
this.singleValue = true;
}
}
protected Criterion(String condition, Object value) {
this(condition, value, null);
}
protected Criterion(String condition, Object value, Object secondValue, String typeHandler) {
super();
this.condition = condition;
this.value = value;
this.secondValue = secondValue;
this.typeHandler = typeHandler;
this.betweenValue = true;
}
protected Criterion(String condition, Object value, Object secondValue) {
this(condition, value, secondValue, null);
}
}
}

106
acupuncture-system/src/main/java/com/acupuncture/system/domain/po/SysNoticeUser.java

@ -0,0 +1,106 @@
package com.acupuncture.system.domain.po;
import java.io.Serializable;
import java.util.Date;
public class SysNoticeUser implements Serializable {
private Long id;
private Long noticeId;
private Long userId;
private String createBy;
private Date createTime;
private String updateBy;
private Date updateTime;
private String remark;
private static final long serialVersionUID = 1L;
public Long getId() {
return id;
}
public void setId(Long id) {
this.id = id;
}
public Long getNoticeId() {
return noticeId;
}
public void setNoticeId(Long noticeId) {
this.noticeId = noticeId;
}
public Long getUserId() {
return userId;
}
public void setUserId(Long userId) {
this.userId = userId;
}
public String getCreateBy() {
return createBy;
}
public void setCreateBy(String createBy) {
this.createBy = createBy == null ? null : createBy.trim();
}
public Date getCreateTime() {
return createTime;
}
public void setCreateTime(Date createTime) {
this.createTime = createTime;
}
public String getUpdateBy() {
return updateBy;
}
public void setUpdateBy(String updateBy) {
this.updateBy = updateBy == null ? null : updateBy.trim();
}
public Date getUpdateTime() {
return updateTime;
}
public void setUpdateTime(Date updateTime) {
this.updateTime = updateTime;
}
public String getRemark() {
return remark;
}
public void setRemark(String remark) {
this.remark = remark == null ? null : remark.trim();
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append(getClass().getSimpleName());
sb.append(" [");
sb.append("Hash = ").append(hashCode());
sb.append(", id=").append(id);
sb.append(", noticeId=").append(noticeId);
sb.append(", userId=").append(userId);
sb.append(", createBy=").append(createBy);
sb.append(", createTime=").append(createTime);
sb.append(", updateBy=").append(updateBy);
sb.append(", updateTime=").append(updateTime);
sb.append(", remark=").append(remark);
sb.append("]");
return sb.toString();
}
}

711
acupuncture-system/src/main/java/com/acupuncture/system/domain/po/SysNoticeUserExample.java

@ -0,0 +1,711 @@
package com.acupuncture.system.domain.po;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
public class SysNoticeUserExample {
protected String orderByClause;
protected boolean distinct;
protected List<Criteria> oredCriteria;
public SysNoticeUserExample() {
oredCriteria = new ArrayList<Criteria>();
}
public void setOrderByClause(String orderByClause) {
this.orderByClause = orderByClause;
}
public String getOrderByClause() {
return orderByClause;
}
public void setDistinct(boolean distinct) {
this.distinct = distinct;
}
public boolean isDistinct() {
return distinct;
}
public List<Criteria> getOredCriteria() {
return oredCriteria;
}
public void or(Criteria criteria) {
oredCriteria.add(criteria);
}
public Criteria or() {
Criteria criteria = createCriteriaInternal();
oredCriteria.add(criteria);
return criteria;
}
public Criteria createCriteria() {
Criteria criteria = createCriteriaInternal();
if (oredCriteria.size() == 0) {
oredCriteria.add(criteria);
}
return criteria;
}
protected Criteria createCriteriaInternal() {
Criteria criteria = new Criteria();
return criteria;
}
public void clear() {
oredCriteria.clear();
orderByClause = null;
distinct = false;
}
protected abstract static class GeneratedCriteria {
protected List<Criterion> criteria;
protected GeneratedCriteria() {
super();
criteria = new ArrayList<Criterion>();
}
public boolean isValid() {
return criteria.size() > 0;
}
public List<Criterion> getAllCriteria() {
return criteria;
}
public List<Criterion> getCriteria() {
return criteria;
}
protected void addCriterion(String condition) {
if (condition == null) {
throw new RuntimeException("Value for condition cannot be null");
}
criteria.add(new Criterion(condition));
}
protected void addCriterion(String condition, Object value, String property) {
if (value == null) {
throw new RuntimeException("Value for " + property + " cannot be null");
}
criteria.add(new Criterion(condition, value));
}
protected void addCriterion(String condition, Object value1, Object value2, String property) {
if (value1 == null || value2 == null) {
throw new RuntimeException("Between values for " + property + " cannot be null");
}
criteria.add(new Criterion(condition, value1, value2));
}
public Criteria andIdIsNull() {
addCriterion("id is null");
return (Criteria) this;
}
public Criteria andIdIsNotNull() {
addCriterion("id is not null");
return (Criteria) this;
}
public Criteria andIdEqualTo(Long value) {
addCriterion("id =", value, "id");
return (Criteria) this;
}
public Criteria andIdNotEqualTo(Long value) {
addCriterion("id <>", value, "id");
return (Criteria) this;
}
public Criteria andIdGreaterThan(Long value) {
addCriterion("id >", value, "id");
return (Criteria) this;
}
public Criteria andIdGreaterThanOrEqualTo(Long value) {
addCriterion("id >=", value, "id");
return (Criteria) this;
}
public Criteria andIdLessThan(Long value) {
addCriterion("id <", value, "id");
return (Criteria) this;
}
public Criteria andIdLessThanOrEqualTo(Long value) {
addCriterion("id <=", value, "id");
return (Criteria) this;
}
public Criteria andIdIn(List<Long> values) {
addCriterion("id in", values, "id");
return (Criteria) this;
}
public Criteria andIdNotIn(List<Long> values) {
addCriterion("id not in", values, "id");
return (Criteria) this;
}
public Criteria andIdBetween(Long value1, Long value2) {
addCriterion("id between", value1, value2, "id");
return (Criteria) this;
}
public Criteria andIdNotBetween(Long value1, Long value2) {
addCriterion("id not between", value1, value2, "id");
return (Criteria) this;
}
public Criteria andNoticeIdIsNull() {
addCriterion("notice_id is null");
return (Criteria) this;
}
public Criteria andNoticeIdIsNotNull() {
addCriterion("notice_id is not null");
return (Criteria) this;
}
public Criteria andNoticeIdEqualTo(Long value) {
addCriterion("notice_id =", value, "noticeId");
return (Criteria) this;
}
public Criteria andNoticeIdNotEqualTo(Long value) {
addCriterion("notice_id <>", value, "noticeId");
return (Criteria) this;
}
public Criteria andNoticeIdGreaterThan(Long value) {
addCriterion("notice_id >", value, "noticeId");
return (Criteria) this;
}
public Criteria andNoticeIdGreaterThanOrEqualTo(Long value) {
addCriterion("notice_id >=", value, "noticeId");
return (Criteria) this;
}
public Criteria andNoticeIdLessThan(Long value) {
addCriterion("notice_id <", value, "noticeId");
return (Criteria) this;
}
public Criteria andNoticeIdLessThanOrEqualTo(Long value) {
addCriterion("notice_id <=", value, "noticeId");
return (Criteria) this;
}
public Criteria andNoticeIdIn(List<Long> values) {
addCriterion("notice_id in", values, "noticeId");
return (Criteria) this;
}
public Criteria andNoticeIdNotIn(List<Long> values) {
addCriterion("notice_id not in", values, "noticeId");
return (Criteria) this;
}
public Criteria andNoticeIdBetween(Long value1, Long value2) {
addCriterion("notice_id between", value1, value2, "noticeId");
return (Criteria) this;
}
public Criteria andNoticeIdNotBetween(Long value1, Long value2) {
addCriterion("notice_id not between", value1, value2, "noticeId");
return (Criteria) this;
}
public Criteria andUserIdIsNull() {
addCriterion("user_id is null");
return (Criteria) this;
}
public Criteria andUserIdIsNotNull() {
addCriterion("user_id is not null");
return (Criteria) this;
}
public Criteria andUserIdEqualTo(Long value) {
addCriterion("user_id =", value, "userId");
return (Criteria) this;
}
public Criteria andUserIdNotEqualTo(Long value) {
addCriterion("user_id <>", value, "userId");
return (Criteria) this;
}
public Criteria andUserIdGreaterThan(Long value) {
addCriterion("user_id >", value, "userId");
return (Criteria) this;
}
public Criteria andUserIdGreaterThanOrEqualTo(Long value) {
addCriterion("user_id >=", value, "userId");
return (Criteria) this;
}
public Criteria andUserIdLessThan(Long value) {
addCriterion("user_id <", value, "userId");
return (Criteria) this;
}
public Criteria andUserIdLessThanOrEqualTo(Long value) {
addCriterion("user_id <=", value, "userId");
return (Criteria) this;
}
public Criteria andUserIdIn(List<Long> values) {
addCriterion("user_id in", values, "userId");
return (Criteria) this;
}
public Criteria andUserIdNotIn(List<Long> values) {
addCriterion("user_id not in", values, "userId");
return (Criteria) this;
}
public Criteria andUserIdBetween(Long value1, Long value2) {
addCriterion("user_id between", value1, value2, "userId");
return (Criteria) this;
}
public Criteria andUserIdNotBetween(Long value1, Long value2) {
addCriterion("user_id not between", value1, value2, "userId");
return (Criteria) this;
}
public Criteria andCreateByIsNull() {
addCriterion("create_by is null");
return (Criteria) this;
}
public Criteria andCreateByIsNotNull() {
addCriterion("create_by is not null");
return (Criteria) this;
}
public Criteria andCreateByEqualTo(String value) {
addCriterion("create_by =", value, "createBy");
return (Criteria) this;
}
public Criteria andCreateByNotEqualTo(String value) {
addCriterion("create_by <>", value, "createBy");
return (Criteria) this;
}
public Criteria andCreateByGreaterThan(String value) {
addCriterion("create_by >", value, "createBy");
return (Criteria) this;
}
public Criteria andCreateByGreaterThanOrEqualTo(String value) {
addCriterion("create_by >=", value, "createBy");
return (Criteria) this;
}
public Criteria andCreateByLessThan(String value) {
addCriterion("create_by <", value, "createBy");
return (Criteria) this;
}
public Criteria andCreateByLessThanOrEqualTo(String value) {
addCriterion("create_by <=", value, "createBy");
return (Criteria) this;
}
public Criteria andCreateByLike(String value) {
addCriterion("create_by like", value, "createBy");
return (Criteria) this;
}
public Criteria andCreateByNotLike(String value) {
addCriterion("create_by not like", value, "createBy");
return (Criteria) this;
}
public Criteria andCreateByIn(List<String> values) {
addCriterion("create_by in", values, "createBy");
return (Criteria) this;
}
public Criteria andCreateByNotIn(List<String> values) {
addCriterion("create_by not in", values, "createBy");
return (Criteria) this;
}
public Criteria andCreateByBetween(String value1, String value2) {
addCriterion("create_by between", value1, value2, "createBy");
return (Criteria) this;
}
public Criteria andCreateByNotBetween(String value1, String value2) {
addCriterion("create_by not between", value1, value2, "createBy");
return (Criteria) this;
}
public Criteria andCreateTimeIsNull() {
addCriterion("create_time is null");
return (Criteria) this;
}
public Criteria andCreateTimeIsNotNull() {
addCriterion("create_time is not null");
return (Criteria) this;
}
public Criteria andCreateTimeEqualTo(Date value) {
addCriterion("create_time =", value, "createTime");
return (Criteria) this;
}
public Criteria andCreateTimeNotEqualTo(Date value) {
addCriterion("create_time <>", value, "createTime");
return (Criteria) this;
}
public Criteria andCreateTimeGreaterThan(Date value) {
addCriterion("create_time >", value, "createTime");
return (Criteria) this;
}
public Criteria andCreateTimeGreaterThanOrEqualTo(Date value) {
addCriterion("create_time >=", value, "createTime");
return (Criteria) this;
}
public Criteria andCreateTimeLessThan(Date value) {
addCriterion("create_time <", value, "createTime");
return (Criteria) this;
}
public Criteria andCreateTimeLessThanOrEqualTo(Date value) {
addCriterion("create_time <=", value, "createTime");
return (Criteria) this;
}
public Criteria andCreateTimeIn(List<Date> values) {
addCriterion("create_time in", values, "createTime");
return (Criteria) this;
}
public Criteria andCreateTimeNotIn(List<Date> values) {
addCriterion("create_time not in", values, "createTime");
return (Criteria) this;
}
public Criteria andCreateTimeBetween(Date value1, Date value2) {
addCriterion("create_time between", value1, value2, "createTime");
return (Criteria) this;
}
public Criteria andCreateTimeNotBetween(Date value1, Date value2) {
addCriterion("create_time not between", value1, value2, "createTime");
return (Criteria) this;
}
public Criteria andUpdateByIsNull() {
addCriterion("update_by is null");
return (Criteria) this;
}
public Criteria andUpdateByIsNotNull() {
addCriterion("update_by is not null");
return (Criteria) this;
}
public Criteria andUpdateByEqualTo(String value) {
addCriterion("update_by =", value, "updateBy");
return (Criteria) this;
}
public Criteria andUpdateByNotEqualTo(String value) {
addCriterion("update_by <>", value, "updateBy");
return (Criteria) this;
}
public Criteria andUpdateByGreaterThan(String value) {
addCriterion("update_by >", value, "updateBy");
return (Criteria) this;
}
public Criteria andUpdateByGreaterThanOrEqualTo(String value) {
addCriterion("update_by >=", value, "updateBy");
return (Criteria) this;
}
public Criteria andUpdateByLessThan(String value) {
addCriterion("update_by <", value, "updateBy");
return (Criteria) this;
}
public Criteria andUpdateByLessThanOrEqualTo(String value) {
addCriterion("update_by <=", value, "updateBy");
return (Criteria) this;
}
public Criteria andUpdateByLike(String value) {
addCriterion("update_by like", value, "updateBy");
return (Criteria) this;
}
public Criteria andUpdateByNotLike(String value) {
addCriterion("update_by not like", value, "updateBy");
return (Criteria) this;
}
public Criteria andUpdateByIn(List<String> values) {
addCriterion("update_by in", values, "updateBy");
return (Criteria) this;
}
public Criteria andUpdateByNotIn(List<String> values) {
addCriterion("update_by not in", values, "updateBy");
return (Criteria) this;
}
public Criteria andUpdateByBetween(String value1, String value2) {
addCriterion("update_by between", value1, value2, "updateBy");
return (Criteria) this;
}
public Criteria andUpdateByNotBetween(String value1, String value2) {
addCriterion("update_by not between", value1, value2, "updateBy");
return (Criteria) this;
}
public Criteria andUpdateTimeIsNull() {
addCriterion("update_time is null");
return (Criteria) this;
}
public Criteria andUpdateTimeIsNotNull() {
addCriterion("update_time is not null");
return (Criteria) this;
}
public Criteria andUpdateTimeEqualTo(Date value) {
addCriterion("update_time =", value, "updateTime");
return (Criteria) this;
}
public Criteria andUpdateTimeNotEqualTo(Date value) {
addCriterion("update_time <>", value, "updateTime");
return (Criteria) this;
}
public Criteria andUpdateTimeGreaterThan(Date value) {
addCriterion("update_time >", value, "updateTime");
return (Criteria) this;
}
public Criteria andUpdateTimeGreaterThanOrEqualTo(Date value) {
addCriterion("update_time >=", value, "updateTime");
return (Criteria) this;
}
public Criteria andUpdateTimeLessThan(Date value) {
addCriterion("update_time <", value, "updateTime");
return (Criteria) this;
}
public Criteria andUpdateTimeLessThanOrEqualTo(Date value) {
addCriterion("update_time <=", value, "updateTime");
return (Criteria) this;
}
public Criteria andUpdateTimeIn(List<Date> values) {
addCriterion("update_time in", values, "updateTime");
return (Criteria) this;
}
public Criteria andUpdateTimeNotIn(List<Date> values) {
addCriterion("update_time not in", values, "updateTime");
return (Criteria) this;
}
public Criteria andUpdateTimeBetween(Date value1, Date value2) {
addCriterion("update_time between", value1, value2, "updateTime");
return (Criteria) this;
}
public Criteria andUpdateTimeNotBetween(Date value1, Date value2) {
addCriterion("update_time not between", value1, value2, "updateTime");
return (Criteria) this;
}
public Criteria andRemarkIsNull() {
addCriterion("remark is null");
return (Criteria) this;
}
public Criteria andRemarkIsNotNull() {
addCriterion("remark is not null");
return (Criteria) this;
}
public Criteria andRemarkEqualTo(String value) {
addCriterion("remark =", value, "remark");
return (Criteria) this;
}
public Criteria andRemarkNotEqualTo(String value) {
addCriterion("remark <>", value, "remark");
return (Criteria) this;
}
public Criteria andRemarkGreaterThan(String value) {
addCriterion("remark >", value, "remark");
return (Criteria) this;
}
public Criteria andRemarkGreaterThanOrEqualTo(String value) {
addCriterion("remark >=", value, "remark");
return (Criteria) this;
}
public Criteria andRemarkLessThan(String value) {
addCriterion("remark <", value, "remark");
return (Criteria) this;
}
public Criteria andRemarkLessThanOrEqualTo(String value) {
addCriterion("remark <=", value, "remark");
return (Criteria) this;
}
public Criteria andRemarkLike(String value) {
addCriterion("remark like", value, "remark");
return (Criteria) this;
}
public Criteria andRemarkNotLike(String value) {
addCriterion("remark not like", value, "remark");
return (Criteria) this;
}
public Criteria andRemarkIn(List<String> values) {
addCriterion("remark in", values, "remark");
return (Criteria) this;
}
public Criteria andRemarkNotIn(List<String> values) {
addCriterion("remark not in", values, "remark");
return (Criteria) this;
}
public Criteria andRemarkBetween(String value1, String value2) {
addCriterion("remark between", value1, value2, "remark");
return (Criteria) this;
}
public Criteria andRemarkNotBetween(String value1, String value2) {
addCriterion("remark not between", value1, value2, "remark");
return (Criteria) this;
}
}
public static class Criteria extends GeneratedCriteria {
protected Criteria() {
super();
}
}
public static class Criterion {
private String condition;
private Object value;
private Object secondValue;
private boolean noValue;
private boolean singleValue;
private boolean betweenValue;
private boolean listValue;
private String typeHandler;
public String getCondition() {
return condition;
}
public Object getValue() {
return value;
}
public Object getSecondValue() {
return secondValue;
}
public boolean isNoValue() {
return noValue;
}
public boolean isSingleValue() {
return singleValue;
}
public boolean isBetweenValue() {
return betweenValue;
}
public boolean isListValue() {
return listValue;
}
public String getTypeHandler() {
return typeHandler;
}
protected Criterion(String condition) {
super();
this.condition = condition;
this.typeHandler = null;
this.noValue = true;
}
protected Criterion(String condition, Object value, String typeHandler) {
super();
this.condition = condition;
this.value = value;
this.typeHandler = typeHandler;
if (value instanceof List<?>) {
this.listValue = true;
} else {
this.singleValue = true;
}
}
protected Criterion(String condition, Object value) {
this(condition, value, null);
}
protected Criterion(String condition, Object value, Object secondValue, String typeHandler) {
super();
this.condition = condition;
this.value = value;
this.secondValue = secondValue;
this.typeHandler = typeHandler;
this.betweenValue = true;
}
protected Criterion(String condition, Object value, Object secondValue) {
this(condition, value, secondValue, null);
}
}
}

9
acupuncture-system/src/main/java/com/acupuncture/system/domain/vo/AdminReportVo.java

@ -6,6 +6,7 @@ import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data; import lombok.Data;
import java.util.Date; import java.util.Date;
import java.util.List;
/** /**
* @Author zzc * @Author zzc
@ -25,6 +26,12 @@ public class AdminReportVo {
private Date createTime; private Date createTime;
private List<Long> tenantIdList;
private String remark;
private String file;
} }
@Data @Data
@ -46,6 +53,8 @@ public class AdminReportVo {
private Date createTime; private Date createTime;
private String typeName; private String typeName;
private List<Long> tenantIdList;
} }
} }

3
acupuncture-system/src/main/java/com/acupuncture/system/domain/vo/DmsLoginUserVo.java

@ -42,6 +42,9 @@ public class DmsLoginUserVo {
private String status; private String status;
private String updateBy; private String updateBy;
private String remark; private String remark;
@ApiModelProperty("强制更新密码标志,初始密码/重置密码需要强制修改密码 0不需要重置 1需要")
private Byte forceUpdPwdFlag;
} }
@Data @Data

2
acupuncture-system/src/main/java/com/acupuncture/system/domain/vo/PmsTreatmentVo.java

@ -57,6 +57,8 @@ public class PmsTreatmentVo {
private String zyzdQt; private String zyzdQt;
private Long memberId; private Long memberId;
private Long managementId;
private String reportTitle;
@Data @Data
public static class QueueVo{ public static class QueueVo{

4
acupuncture-system/src/main/java/com/acupuncture/system/mapper/SysNoticeMapper.java

@ -2,6 +2,7 @@ package com.acupuncture.system.mapper;
import java.util.List; import java.util.List;
import com.acupuncture.system.domain.SysNotice; import com.acupuncture.system.domain.SysNotice;
import org.apache.ibatis.annotations.Param;
/** /**
* 通知公告表 数据层 * 通知公告表 数据层
@ -24,7 +25,8 @@ public interface SysNoticeMapper
* @param notice 公告信息 * @param notice 公告信息
* @return 公告集合 * @return 公告集合
*/ */
public List<SysNotice> selectNoticeList(SysNotice notice); public List<SysNotice> selectNoticeList(@Param("notice") SysNotice notice,
@Param("userId") Long userId);
/** /**
* 新增公告 * 新增公告

2
acupuncture-system/src/main/java/com/acupuncture/system/persist/dao/PmsTreatmentDao.java

@ -30,4 +30,6 @@ public interface PmsTreatmentDao {
List<PmsTreatmentVo.TreatmentVO> adminQuery(@Param("query") PmsTreatmentDto.TreatmentQueryDTO query); List<PmsTreatmentVo.TreatmentVO> adminQuery(@Param("query") PmsTreatmentDto.TreatmentQueryDTO query);
PmsTreatmentVo.TreatmentRecordVO adminQueryTreatment(@Param("id") Long id); PmsTreatmentVo.TreatmentRecordVO adminQueryTreatment(@Param("id") Long id);
List<PmsTreatmentVo.TreatmentRecordVO> adminQueryTreatmentZip(@Param("managementId") Long managementId);
} }

3
acupuncture-system/src/main/java/com/acupuncture/system/persist/dao/RmsReportDao.java

@ -16,4 +16,7 @@ public interface RmsReportDao {
List<AdminReportVo.TypeResult> queryTypeList(@Param("typeName") String typeName); List<AdminReportVo.TypeResult> queryTypeList(@Param("typeName") String typeName);
List<AdminReportVo.Result> queryManagerList(@Param("reportTitle") String reportTitle); List<AdminReportVo.Result> queryManagerList(@Param("reportTitle") String reportTitle);
List<AdminReportVo.Result> queryManagerListMy(@Param("reportTitle") String reportTitle,
@Param("idList") List<Long> idList);
} }

28
acupuncture-system/src/main/java/com/acupuncture/system/persist/mapper/RmsReportManagementTenantMapper.java

@ -0,0 +1,28 @@
package com.acupuncture.system.persist.mapper;
import com.acupuncture.system.domain.po.RmsReportManagementTenant;
import com.acupuncture.system.domain.po.RmsReportManagementTenantExample;
import java.util.List;
import org.apache.ibatis.annotations.Param;
public interface RmsReportManagementTenantMapper {
long countByExample(RmsReportManagementTenantExample example);
int deleteByPrimaryKey(Long id);
int insert(RmsReportManagementTenant record);
int insertSelective(RmsReportManagementTenant record);
List<RmsReportManagementTenant> selectByExample(RmsReportManagementTenantExample example);
RmsReportManagementTenant selectByPrimaryKey(Long id);
int updateByExampleSelective(@Param("record") RmsReportManagementTenant record, @Param("example") RmsReportManagementTenantExample example);
int updateByExample(@Param("record") RmsReportManagementTenant record, @Param("example") RmsReportManagementTenantExample example);
int updateByPrimaryKeySelective(RmsReportManagementTenant record);
int updateByPrimaryKey(RmsReportManagementTenant record);
}

28
acupuncture-system/src/main/java/com/acupuncture/system/persist/mapper/RmsReportTypeTenantMapper.java

@ -0,0 +1,28 @@
package com.acupuncture.system.persist.mapper;
import com.acupuncture.system.domain.po.RmsReportTypeTenant;
import com.acupuncture.system.domain.po.RmsReportTypeTenantExample;
import java.util.List;
import org.apache.ibatis.annotations.Param;
public interface RmsReportTypeTenantMapper {
long countByExample(RmsReportTypeTenantExample example);
int deleteByPrimaryKey(Long id);
int insert(RmsReportTypeTenant record);
int insertSelective(RmsReportTypeTenant record);
List<RmsReportTypeTenant> selectByExample(RmsReportTypeTenantExample example);
RmsReportTypeTenant selectByPrimaryKey(Long id);
int updateByExampleSelective(@Param("record") RmsReportTypeTenant record, @Param("example") RmsReportTypeTenantExample example);
int updateByExample(@Param("record") RmsReportTypeTenant record, @Param("example") RmsReportTypeTenantExample example);
int updateByPrimaryKeySelective(RmsReportTypeTenant record);
int updateByPrimaryKey(RmsReportTypeTenant record);
}

28
acupuncture-system/src/main/java/com/acupuncture/system/persist/mapper/SysNoticeUserMapper.java

@ -0,0 +1,28 @@
package com.acupuncture.system.persist.mapper;
import com.acupuncture.system.domain.po.SysNoticeUser;
import com.acupuncture.system.domain.po.SysNoticeUserExample;
import java.util.List;
import org.apache.ibatis.annotations.Param;
public interface SysNoticeUserMapper {
long countByExample(SysNoticeUserExample example);
int deleteByPrimaryKey(Long id);
int insert(SysNoticeUser record);
int insertSelective(SysNoticeUser record);
List<SysNoticeUser> selectByExample(SysNoticeUserExample example);
SysNoticeUser selectByPrimaryKey(Long id);
int updateByExampleSelective(@Param("record") SysNoticeUser record, @Param("example") SysNoticeUserExample example);
int updateByExample(@Param("record") SysNoticeUser record, @Param("example") SysNoticeUserExample example);
int updateByPrimaryKeySelective(SysNoticeUser record);
int updateByPrimaryKey(SysNoticeUser record);
}

17
acupuncture-system/src/main/java/com/acupuncture/system/service/AdminReportService.java

@ -1,6 +1,9 @@
package com.acupuncture.system.service; package com.acupuncture.system.service;
import com.acupuncture.common.annotation.DataSource;
import com.acupuncture.common.enums.DataSourceType;
import com.acupuncture.system.domain.dto.AdminReportDto; import com.acupuncture.system.domain.dto.AdminReportDto;
import com.acupuncture.system.domain.po.RmsReportManagement;
import com.acupuncture.system.domain.vo.AdminReportVo; import com.acupuncture.system.domain.vo.AdminReportVo;
import java.util.List; import java.util.List;
@ -40,6 +43,13 @@ public interface AdminReportService {
*/ */
Integer delete(AdminReportDto.DeleteDto dto); Integer delete(AdminReportDto.DeleteDto dto);
/**
* 查询我的上报管理
* @param dto
* @return
*/
List<AdminReportVo.Result> queryManagerListMy(AdminReportDto.QueryManagerDto dto);
/** /**
* 查询上报管理 * 查询上报管理
* @param dto * @param dto
@ -47,6 +57,13 @@ public interface AdminReportService {
*/ */
List<AdminReportVo.Result> queryManagerList(AdminReportDto.QueryManagerDto dto); List<AdminReportVo.Result> queryManagerList(AdminReportDto.QueryManagerDto dto);
/**
* 查询上报管理
* @param dto
* @return
*/
List<RmsReportManagement> queryManagerListByType(Long typeId);
/** /**
* 新增上报管理 * 新增上报管理
* @param dto * @param dto

12
acupuncture-system/src/main/java/com/acupuncture/system/service/PmsTreatmentService.java

@ -2,6 +2,7 @@ package com.acupuncture.system.service;
import com.acupuncture.system.domain.dto.PmsPatientDto; import com.acupuncture.system.domain.dto.PmsPatientDto;
import com.acupuncture.system.domain.dto.PmsTreatmentDto; import com.acupuncture.system.domain.dto.PmsTreatmentDto;
import com.acupuncture.system.domain.po.RmsReportManagement;
import com.acupuncture.system.domain.vo.PmsTreatmentVo; import com.acupuncture.system.domain.vo.PmsTreatmentVo;
import org.springframework.web.multipart.MultipartFile; import org.springframework.web.multipart.MultipartFile;
@ -42,7 +43,7 @@ public interface PmsTreatmentService {
* @param queryDTO * @param queryDTO
* @return * @return
*/ */
List<PmsTreatmentVo.TreatmentVO> listTreatment(PmsTreatmentDto.TreatmentQueryDTO queryDTO); List<PmsTreatmentVo.TreatmentVO> listTreatment(PmsTreatmentDto.TreatmentQueryDTO queryDTO, List<RmsReportManagement> rmsReportManagements);
void saveAidRecord(PmsTreatmentDto.SaveAidRecord dto); void saveAidRecord(PmsTreatmentDto.SaveAidRecord dto);
@ -61,7 +62,14 @@ public interface PmsTreatmentService {
String adminExportTreatmentPg(HttpServletResponse response, PmsTreatmentDto.ExportVO dto); String adminExportTreatmentPg(HttpServletResponse response, PmsTreatmentDto.ExportVO dto);
String adminExportTreatmentPgZip(HttpServletResponse response, PmsTreatmentDto.ExportZipVO dto) throws IOException;
void importTreatment(MultipartFile file) throws IOException; void importTreatment(MultipartFile file) throws IOException;
void importTreatmentAdmin(MultipartFile file, Long tenantId) throws IOException;
String[] getTenantId(MultipartFile file) throws IOException;
/** /**
* 查询诊疗档案 * 查询诊疗档案
* @param queryDTO * @param queryDTO
@ -71,4 +79,6 @@ public interface PmsTreatmentService {
void adminExportTreatment(HttpServletResponse response, PmsTreatmentDto.TreatmentQueryDTO dto); void adminExportTreatment(HttpServletResponse response, PmsTreatmentDto.TreatmentQueryDTO dto);
void aduit(Long treatmentId, Byte status);
} }

151
acupuncture-system/src/main/java/com/acupuncture/system/service/impl/AdminReportServiceImpl.java

@ -1,6 +1,7 @@
package com.acupuncture.system.service.impl; package com.acupuncture.system.service.impl;
import cn.hutool.core.bean.BeanUtil; import cn.hutool.core.bean.BeanUtil;
import cn.hutool.core.collection.CollUtil;
import cn.hutool.core.util.IdUtil; import cn.hutool.core.util.IdUtil;
import com.acupuncture.common.core.domain.R; import com.acupuncture.common.core.domain.R;
import com.acupuncture.common.utils.SecurityUtils; import com.acupuncture.common.utils.SecurityUtils;
@ -9,13 +10,17 @@ import com.acupuncture.system.domain.po.*;
import com.acupuncture.system.domain.vo.AdminReportVo; import com.acupuncture.system.domain.vo.AdminReportVo;
import com.acupuncture.system.persist.dao.RmsReportDao; import com.acupuncture.system.persist.dao.RmsReportDao;
import com.acupuncture.system.persist.mapper.RmsReportManagementMapper; import com.acupuncture.system.persist.mapper.RmsReportManagementMapper;
import com.acupuncture.system.persist.mapper.RmsReportManagementTenantMapper;
import com.acupuncture.system.persist.mapper.RmsReportTypeMapper; import com.acupuncture.system.persist.mapper.RmsReportTypeMapper;
import com.acupuncture.system.persist.mapper.RmsReportTypeTenantMapper;
import com.acupuncture.system.service.AdminReportService; import com.acupuncture.system.service.AdminReportService;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import javax.annotation.Resource; import javax.annotation.Resource;
import java.util.ArrayList;
import java.util.Date; import java.util.Date;
import java.util.List; import java.util.List;
import java.util.stream.Collectors;
/** /**
* @Author zzc * @Author zzc
@ -32,16 +37,40 @@ public class AdminReportServiceImpl implements AdminReportService {
private RmsReportManagementMapper rmsReportManagementMapper; private RmsReportManagementMapper rmsReportManagementMapper;
@Resource @Resource
private RmsReportDao rmsReportDao; private RmsReportDao rmsReportDao;
@Resource
private RmsReportTypeTenantMapper rmsReportTypeTenantMapper;
@Resource
private RmsReportManagementTenantMapper rmsReportManagementTenantMapper;
@Override @Override
public List<AdminReportVo.TypeResult> queryTypeList(String typeName) { public List<AdminReportVo.TypeResult> queryTypeList(String typeName) {
return rmsReportDao.queryTypeList(typeName); List<AdminReportVo.TypeResult> typeResults = rmsReportDao.queryTypeList(typeName);
if (CollUtil.isNotEmpty(typeResults)) {
for (AdminReportVo.TypeResult typeResult : typeResults) {
RmsReportTypeTenantExample rmsReportTypeTenantExample = new RmsReportTypeTenantExample();
rmsReportTypeTenantExample.createCriteria().andReportTypeIdEqualTo(typeResult.getId());
List<RmsReportTypeTenant> rmsReportTypeTenants = rmsReportTypeTenantMapper.selectByExample(rmsReportTypeTenantExample);
if (CollUtil.isNotEmpty(rmsReportTypeTenants)) {
typeResult.setTenantIdList(rmsReportTypeTenants.stream().map(RmsReportTypeTenant::getTenantId).collect(Collectors.toList()));
}
}
}
return typeResults;
} }
@Override @Override
public Integer insert(AdminReportDto.AddDto dto) { public Integer insert(AdminReportDto.AddDto dto) {
RmsReportType reportType = BeanUtil.copyProperties(dto, RmsReportType.class); RmsReportType reportType = BeanUtil.copyProperties(dto, RmsReportType.class);
reportType.setId(IdUtil.getSnowflakeNextId()); reportType.setId(IdUtil.getSnowflakeNextId());
if (CollUtil.isNotEmpty(dto.getTenantIdList())) {
for (Long tenantId : dto.getTenantIdList()) {
RmsReportTypeTenant rmsReportTypeTenant = new RmsReportTypeTenant();
rmsReportTypeTenant.setId(IdUtil.getSnowflakeNextId());
rmsReportTypeTenant.setReportTypeId(reportType.getId());
rmsReportTypeTenant.setTenantId(tenantId);
rmsReportTypeTenantMapper.insertSelective(rmsReportTypeTenant);
}
}
reportType.setCreateBy(SecurityUtils.getUsername()); reportType.setCreateBy(SecurityUtils.getUsername());
reportType.setTypeName(dto.getTypeName()); reportType.setTypeName(dto.getTypeName());
reportType.setCreateTime(new Date()); reportType.setCreateTime(new Date());
@ -50,14 +79,46 @@ public class AdminReportServiceImpl implements AdminReportService {
@Override @Override
public Integer update(AdminReportDto.UpdDto dto) { public Integer update(AdminReportDto.UpdDto dto) {
if (CollUtil.isNotEmpty(dto.getTenantIdList())) {
RmsReportTypeTenantExample rmsReportTypeTenantExample = new RmsReportTypeTenantExample();
rmsReportTypeTenantExample.createCriteria().andReportTypeIdEqualTo(dto.getId());
List<RmsReportTypeTenant> rmsReportTypeTenants = rmsReportTypeTenantMapper.selectByExample(rmsReportTypeTenantExample);
if (CollUtil.isNotEmpty(rmsReportTypeTenants)) {
for (RmsReportTypeTenant rmsReportTypeTenant : rmsReportTypeTenants) {
rmsReportTypeTenantMapper.deleteByPrimaryKey(rmsReportTypeTenant.getId());
}
}
for (Long tenantId : dto.getTenantIdList()) {
RmsReportTypeTenant rmsReportTypeTenant = new RmsReportTypeTenant();
rmsReportTypeTenant.setId(IdUtil.getSnowflakeNextId());
rmsReportTypeTenant.setReportTypeId(dto.getId());
rmsReportTypeTenant.setTenantId(tenantId);
rmsReportTypeTenantMapper.insertSelective(rmsReportTypeTenant);
}
}
RmsReportType reportType = BeanUtil.copyProperties(dto, RmsReportType.class); RmsReportType reportType = BeanUtil.copyProperties(dto, RmsReportType.class);
reportType.setTypeName(dto.getTypeName());
reportType.setUpdateBy(SecurityUtils.getUsername()); reportType.setUpdateBy(SecurityUtils.getUsername());
reportType.setCreateTime(new Date()); reportType.setCreateTime(new Date());
reportType.setFile(dto.getFile());
reportType.setRemark(dto.getRemark());
return rmsReportTypeMapper.updateByPrimaryKeySelective(reportType); return rmsReportTypeMapper.updateByPrimaryKeySelective(reportType);
} }
@Override @Override
public Integer delete(AdminReportDto.DeleteDto dto) { public Integer delete(AdminReportDto.DeleteDto dto) {
for (Long aLong : dto.getIdList()) {
RmsReportTypeTenantExample rmsReportTypeTenantExample = new RmsReportTypeTenantExample();
rmsReportTypeTenantExample.createCriteria().andReportTypeIdEqualTo(aLong);
List<RmsReportTypeTenant> rmsReportTypeTenants = rmsReportTypeTenantMapper.selectByExample(rmsReportTypeTenantExample);
if (CollUtil.isNotEmpty(rmsReportTypeTenants)) {
for (RmsReportTypeTenant rmsReportTypeTenant : rmsReportTypeTenants) {
rmsReportTypeTenantMapper.deleteByPrimaryKey(rmsReportTypeTenant.getId());
}
}
}
RmsReportTypeExample rmsReportTypeExample = new RmsReportTypeExample(); RmsReportTypeExample rmsReportTypeExample = new RmsReportTypeExample();
rmsReportTypeExample.createCriteria().andIdIn(dto.getIdList()); rmsReportTypeExample.createCriteria().andIdIn(dto.getIdList());
RmsReportType reportType = new RmsReportType(); RmsReportType reportType = new RmsReportType();
@ -65,23 +126,95 @@ public class AdminReportServiceImpl implements AdminReportService {
return rmsReportTypeMapper.updateByExampleSelective(reportType, rmsReportTypeExample); return rmsReportTypeMapper.updateByExampleSelective(reportType, rmsReportTypeExample);
} }
@Override
public List<AdminReportVo.Result> queryManagerListMy(AdminReportDto.QueryManagerDto dto) {
RmsReportManagementTenantExample rmsReportTypeTenantExample = new RmsReportManagementTenantExample();
rmsReportTypeTenantExample.createCriteria().andTenantIdEqualTo(SecurityUtils.getTenantId());
List<RmsReportManagementTenant> rmsReportTypeTenants = rmsReportManagementTenantMapper.selectByExample(rmsReportTypeTenantExample);
if (CollUtil.isEmpty(rmsReportTypeTenants)) {
return new ArrayList<>();
}
List<Long> idList = rmsReportTypeTenants.stream().map(RmsReportManagementTenant::getReportId).collect(Collectors.toList());
List<AdminReportVo.Result> results = rmsReportDao.queryManagerListMy(dto.getReportTitle(), idList);
if (CollUtil.isNotEmpty(results)) {
for (AdminReportVo.Result result : results) {
RmsReportManagementTenantExample rmsReportManagementTenantExample = new RmsReportManagementTenantExample();
rmsReportManagementTenantExample.createCriteria().andReportIdEqualTo(result.getId());
List<RmsReportManagementTenant> rmsReportManagementTenants = rmsReportManagementTenantMapper.selectByExample(rmsReportManagementTenantExample);
if (CollUtil.isNotEmpty(rmsReportManagementTenants)) {
result.setTenantIdList(rmsReportManagementTenants.stream().map(RmsReportManagementTenant::getTenantId).collect(Collectors.toList()));
}
}
}
return results;
}
@Override @Override
public List<AdminReportVo.Result> queryManagerList(AdminReportDto.QueryManagerDto dto) { public List<AdminReportVo.Result> queryManagerList(AdminReportDto.QueryManagerDto dto) {
return rmsReportDao.queryManagerList(dto.getReportTitle()); List<AdminReportVo.Result> results = rmsReportDao.queryManagerList(dto.getReportTitle());
if (CollUtil.isNotEmpty(results)) {
for (AdminReportVo.Result result : results) {
RmsReportManagementTenantExample rmsReportManagementTenantExample = new RmsReportManagementTenantExample();
rmsReportManagementTenantExample.createCriteria().andReportIdEqualTo(result.getId());
List<RmsReportManagementTenant> rmsReportManagementTenants = rmsReportManagementTenantMapper.selectByExample(rmsReportManagementTenantExample);
if (CollUtil.isNotEmpty(rmsReportManagementTenants)) {
result.setTenantIdList(rmsReportManagementTenants.stream().map(RmsReportManagementTenant::getTenantId).collect(Collectors.toList()));
}
}
}
return results;
}
@Override
public List<RmsReportManagement> queryManagerListByType(Long typeId) {
RmsReportManagementExample reportManagementExample = new RmsReportManagementExample();
reportManagementExample.createCriteria().andReportTypeEqualTo(typeId);
return rmsReportManagementMapper.selectByExample(reportManagementExample);
} }
@Override @Override
public Integer insertManager(AdminReportDto.AddManagerDto dto) { public Integer insertManager(AdminReportDto.AddManagerDto dto) {
RmsReportManagement reportManagement = BeanUtil.copyProperties(dto, RmsReportManagement.class); RmsReportManagement reportManagement = BeanUtil.copyProperties(dto, RmsReportManagement.class);
reportManagement.setId(IdUtil.getSnowflakeNextId()); reportManagement.setId(IdUtil.getSnowflakeNextId());
if (CollUtil.isNotEmpty(dto.getTenantIdList())) {
for (Long tenantId : dto.getTenantIdList()) {
RmsReportManagementTenant rmsReportTypeTenant = new RmsReportManagementTenant();
rmsReportTypeTenant.setId(IdUtil.getSnowflakeNextId());
rmsReportTypeTenant.setReportId(reportManagement.getId());
rmsReportTypeTenant.setTenantId(tenantId);
rmsReportManagementTenantMapper.insertSelective(rmsReportTypeTenant);
}
}
reportManagement.setStatus(dto.getStatus());
reportManagement.setCreateBy(SecurityUtils.getUsername()); reportManagement.setCreateBy(SecurityUtils.getUsername());
reportManagement.setCreateTime(new Date()); reportManagement.setCreateTime(new Date());
reportManagement.setStatus((byte) 0);
return rmsReportManagementMapper.insertSelective(reportManagement); return rmsReportManagementMapper.insertSelective(reportManagement);
} }
@Override @Override
public Integer updateManager(AdminReportDto.UpdManagerDto dto) { public Integer updateManager(AdminReportDto.UpdManagerDto dto) {
if (CollUtil.isNotEmpty(dto.getTenantIdList())) {
RmsReportManagementTenantExample rmsReportTypeTenantExample = new RmsReportManagementTenantExample();
rmsReportTypeTenantExample.createCriteria().andReportIdEqualTo(dto.getId());
List<RmsReportManagementTenant> rmsReportTypeTenants = rmsReportManagementTenantMapper.selectByExample(rmsReportTypeTenantExample);
if (CollUtil.isNotEmpty(rmsReportTypeTenants)) {
for (RmsReportManagementTenant rmsReportTypeTenant : rmsReportTypeTenants) {
rmsReportManagementTenantMapper.deleteByPrimaryKey(rmsReportTypeTenant.getId());
}
}
for (Long tenantId : dto.getTenantIdList()) {
RmsReportManagementTenant rmsReportTypeTenant = new RmsReportManagementTenant();
rmsReportTypeTenant.setId(IdUtil.getSnowflakeNextId());
rmsReportTypeTenant.setReportId(dto.getId());
rmsReportTypeTenant.setTenantId(tenantId);
rmsReportManagementTenantMapper.insertSelective(rmsReportTypeTenant);
}
}
RmsReportManagement reportManagement = BeanUtil.copyProperties(dto, RmsReportManagement.class); RmsReportManagement reportManagement = BeanUtil.copyProperties(dto, RmsReportManagement.class);
reportManagement.setUpdateBy(SecurityUtils.getUsername()); reportManagement.setUpdateBy(SecurityUtils.getUsername());
reportManagement.setCreateTime(new Date()); reportManagement.setCreateTime(new Date());
@ -90,6 +223,18 @@ public class AdminReportServiceImpl implements AdminReportService {
@Override @Override
public Integer deleteManager(AdminReportDto.DeleteManagerDto dto) { public Integer deleteManager(AdminReportDto.DeleteManagerDto dto) {
for (Long aLong : dto.getIdList()) {
RmsReportManagementTenantExample rmsReportTypeTenantExample = new RmsReportManagementTenantExample();
rmsReportTypeTenantExample.createCriteria().andReportIdEqualTo(aLong);
List<RmsReportManagementTenant> rmsReportTypeTenants = rmsReportManagementTenantMapper.selectByExample(rmsReportTypeTenantExample);
if (CollUtil.isNotEmpty(rmsReportTypeTenants)) {
for (RmsReportManagementTenant rmsReportTypeTenant : rmsReportTypeTenants) {
rmsReportManagementTenantMapper.deleteByPrimaryKey(rmsReportTypeTenant.getId());
}
}
}
RmsReportManagementExample reportManagementExample = new RmsReportManagementExample(); RmsReportManagementExample reportManagementExample = new RmsReportManagementExample();
reportManagementExample.createCriteria().andIdIn(dto.getIdList()); reportManagementExample.createCriteria().andIdIn(dto.getIdList());
RmsReportManagement reportManagement = new RmsReportManagement(); RmsReportManagement reportManagement = new RmsReportManagement();

1
acupuncture-system/src/main/java/com/acupuncture/system/service/impl/AdminTenantUserServiceImpl.java

@ -68,6 +68,7 @@ public class AdminTenantUserServiceImpl implements AdminTenantUserService {
DmsUser dmsUser = new DmsUser(); DmsUser dmsUser = new DmsUser();
dmsUser.setId(dto.getId()); dmsUser.setId(dto.getId());
dmsUser.setPassword(SecurityUtils.encryptPassword(dto.getPassword())); dmsUser.setPassword(SecurityUtils.encryptPassword(dto.getPassword()));
dmsUser.setForceUpdPwdFlag((byte) 1);
return dmsUserMapper.updateByPrimaryKeySelective(dmsUser); return dmsUserMapper.updateByPrimaryKeySelective(dmsUser);
} }
} }

1
acupuncture-system/src/main/java/com/acupuncture/system/service/impl/DmsLoginServiceImpl.java

@ -64,6 +64,7 @@ public class DmsLoginServiceImpl implements DmsLoginService {
user.setId(userId); user.setId(userId);
user.setUserName(username); user.setUserName(username);
user.setPassword(password); user.setPassword(password);
user.setForceUpdPwdFlag(( byte) 0);
return dmsUserDao.updateUser(user); return dmsUserDao.updateUser(user);
} }

372
acupuncture-system/src/main/java/com/acupuncture/system/service/impl/PmsTreatmentServiceImpl.java

@ -13,18 +13,20 @@ import cn.hutool.extra.pinyin.PinyinUtil;
import cn.hutool.poi.excel.BigExcelWriter; import cn.hutool.poi.excel.BigExcelWriter;
import cn.hutool.poi.excel.ExcelUtil; import cn.hutool.poi.excel.ExcelUtil;
import com.acupuncture.common.constant.UserConstants; import com.acupuncture.common.constant.UserConstants;
import com.acupuncture.common.core.domain.JsonResponse;
import com.acupuncture.common.core.redis.RedisCache; import com.acupuncture.common.core.redis.RedisCache;
import com.acupuncture.common.exception.base.BaseException; import com.acupuncture.common.exception.base.BaseException;
import com.acupuncture.common.utils.AsposeUtils; import com.acupuncture.common.utils.AsposeUtils;
import com.acupuncture.common.utils.ExceptionUtil; import com.acupuncture.common.utils.ExceptionUtil;
import com.acupuncture.common.utils.SecurityUtils; import com.acupuncture.common.utils.SecurityUtils;
import com.acupuncture.common.utils.ZipUtils;
import com.acupuncture.system.domain.dto.PmsPatientDto; import com.acupuncture.system.domain.dto.PmsPatientDto;
import com.acupuncture.system.domain.dto.PmsTreatmentDto; import com.acupuncture.system.domain.dto.PmsTreatmentDto;
import com.acupuncture.system.domain.po.*; import com.acupuncture.system.domain.po.*;
import com.acupuncture.system.domain.vo.FmsFollowupVo; import com.acupuncture.system.domain.vo.FmsFollowupVo;
import com.acupuncture.system.domain.vo.PmsPatientVo;
import com.acupuncture.system.domain.vo.PmsTreatmentVo; import com.acupuncture.system.domain.vo.PmsTreatmentVo;
import com.acupuncture.system.persist.dao.FmsFollowupDao; import com.acupuncture.system.persist.dao.FmsFollowupDao;
import com.acupuncture.system.persist.dao.PmsPatientDao;
import com.acupuncture.system.persist.dao.PmsTreatmentDao; import com.acupuncture.system.persist.dao.PmsTreatmentDao;
import com.acupuncture.system.persist.mapper.*; import com.acupuncture.system.persist.mapper.*;
import com.acupuncture.system.service.PmsPatientService; import com.acupuncture.system.service.PmsPatientService;
@ -42,9 +44,11 @@ import javax.servlet.ServletOutputStream;
import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpServletResponse;
import java.io.File; import java.io.File;
import java.io.IOException; import java.io.IOException;
import java.io.OutputStream;
import java.nio.file.Files; import java.nio.file.Files;
import java.nio.file.Paths; import java.nio.file.Paths;
import java.util.*; import java.util.*;
import java.util.concurrent.atomic.AtomicReference;
import java.util.function.Function; import java.util.function.Function;
import java.util.stream.Collectors; import java.util.stream.Collectors;
@ -75,6 +79,13 @@ public class PmsTreatmentServiceImpl implements PmsTreatmentService {
private RedisCache redisCache; private RedisCache redisCache;
@Resource @Resource
private DmsTenantMapper dmsTenantMapper; private DmsTenantMapper dmsTenantMapper;
@Resource
private PmsPatientDao pmsPatientDao;
@Resource
private RmsReportManagementMapper rmsReportManagementMapper;
@Resource
private UmsDataSourceMapper umsDataSourceMapper;
@Value("${file.TreamentTemplate}") @Value("${file.TreamentTemplate}")
private String treamentTemplate; private String treamentTemplate;
@Value("${file.pgTemplate}") @Value("${file.pgTemplate}")
@ -218,12 +229,19 @@ public class PmsTreatmentServiceImpl implements PmsTreatmentService {
} }
@Override @Override
public List<PmsTreatmentVo.TreatmentVO> listTreatment(PmsTreatmentDto.TreatmentQueryDTO queryDTO) { public List<PmsTreatmentVo.TreatmentVO> listTreatment(PmsTreatmentDto.TreatmentQueryDTO queryDTO, List<RmsReportManagement> rmsReportManagements) {
List<PmsTreatmentVo.TreatmentVO> query = pmsTreatmentDao.query(queryDTO, SecurityUtils.getTenantId()); List<PmsTreatmentVo.TreatmentVO> query = pmsTreatmentDao.query(queryDTO, SecurityUtils.getTenantId());
if (CollectionUtil.isNotEmpty(query)) { if (CollectionUtil.isNotEmpty(query)) {
//查询公共队列 //查询公共队列
Map<Long, String> map1 = new HashMap<>();
if (CollectionUtil.isNotEmpty(rmsReportManagements)) {
map1 = rmsReportManagements.stream().collect(Collectors.toMap(RmsReportManagement::getId, RmsReportManagement::getReportTitle));
}
List<Object> commonFollowupQueue = redisCache.getCacheList("common_followup_queue"); List<Object> commonFollowupQueue = redisCache.getCacheList("common_followup_queue");
for (PmsTreatmentVo.TreatmentVO treatmentVO : query) { for (PmsTreatmentVo.TreatmentVO treatmentVO : query) {
if (treatmentVO.getManagementId() != null) {
treatmentVO.setReportTitle(map1.get(treatmentVO.getManagementId()));
}
PmsTreatmentRecordExample pmsTreatmentRecordExample = new PmsTreatmentRecordExample(); PmsTreatmentRecordExample pmsTreatmentRecordExample = new PmsTreatmentRecordExample();
pmsTreatmentRecordExample.createCriteria().andDelFlagEqualTo((byte) 0).andQuestionCodeIn(CollectionUtil.newArrayList("JBXX_ZYZD", "JBXX_ZYZD_QT")).andTreatmentIdEqualTo(treatmentVO.getId()); pmsTreatmentRecordExample.createCriteria().andDelFlagEqualTo((byte) 0).andQuestionCodeIn(CollectionUtil.newArrayList("JBXX_ZYZD", "JBXX_ZYZD_QT")).andTreatmentIdEqualTo(treatmentVO.getId());
List<PmsTreatmentRecord> pmsTreatmentRecords = pmsTreatmentRecordMapper.selectByExample(pmsTreatmentRecordExample); List<PmsTreatmentRecord> pmsTreatmentRecords = pmsTreatmentRecordMapper.selectByExample(pmsTreatmentRecordExample);
@ -459,7 +477,7 @@ public class PmsTreatmentServiceImpl implements PmsTreatmentService {
@Override @Override
public void exportTreatment(HttpServletResponse response, PmsTreatmentDto.TreatmentQueryDTO dto) { public void exportTreatment(HttpServletResponse response, PmsTreatmentDto.TreatmentQueryDTO dto) {
List<PmsTreatmentVo.TreatmentVO> treatmentVOList = listTreatment(dto); List<PmsTreatmentVo.TreatmentVO> treatmentVOList = listTreatment(dto, null);
if (CollectionUtil.isEmpty(treatmentVOList)) { if (CollectionUtil.isEmpty(treatmentVOList)) {
throw new BaseException("暂无数据"); throw new BaseException("暂无数据");
} }
@ -655,9 +673,9 @@ public class PmsTreatmentServiceImpl implements PmsTreatmentService {
} }
PmsTreatmentRecordExample pmsTreatmentRecordExample = new PmsTreatmentRecordExample(); PmsTreatmentRecordExample pmsTreatmentRecordExample = new PmsTreatmentRecordExample();
pmsTreatmentRecordExample.createCriteria().andTreatmentIdEqualTo(dto.getTreatmentId()).andDelFlagEqualTo((byte) 0); pmsTreatmentRecordExample.createCriteria().andTreatmentIdEqualTo(dto.getTreatmentId()).andDelFlagEqualTo((byte) 0);
List<PmsTreatmentRecord> pmsTreatmentRecords = pmsTreatmentRecordMapper.selectByExample(pmsTreatmentRecordExample); // List<PmsTreatmentRecord> pmsTreatmentRecords = pmsTreatmentRecordMapper.selectByExample(pmsTreatmentRecordExample);
List<PmsTreatmentVo.TreatmentRecord> pmsTreatmentRecords = pmsTreatmentDao.adminSelectRecord(dto.getTreatmentId(), null);
String pdfName = treatmentRecordVO.getName() + "_" + treatmentRecordVO.getVisitNumber(); String pdfName = treatmentRecordVO.getName() + "_" + (StrUtil.isNotEmpty(treatmentRecordVO.getVisitNumber()) ? treatmentRecordVO.getVisitNumber() : System.currentTimeMillis());
String wordPath = profilePath + File.separator + pdfName + ".docx"; String wordPath = profilePath + File.separator + pdfName + ".docx";
String pdfPath = profilePath + File.separator + pdfName + ".pdf"; String pdfPath = profilePath + File.separator + pdfName + ".pdf";
try { try {
@ -667,45 +685,90 @@ public class PmsTreatmentServiceImpl implements PmsTreatmentService {
map.put("sex", treatmentRecordVO.getGender() == 0 ? "男" : "女"); map.put("sex", treatmentRecordVO.getGender() == 0 ? "男" : "女");
map.put("age", treatmentRecordVO.getAge() + " 岁"); map.put("age", treatmentRecordVO.getAge() + " 岁");
map.put("phone", treatmentRecordVO.getPhone()); map.put("phone", treatmentRecordVO.getPhone());
map.put("visitNum", treatmentRecordVO.getVisitNumber()); map.put("visitNum", StrUtil.isEmpty(treatmentRecordVO.getVisitNumber()) ? null : treatmentRecordVO.getVisitNumber());
map.put("visitTime", DateUtil.format(treatmentRecordVO.getVisitTime(), "yyyy-MM-dd")); map.put("visitTime", DateUtil.format(treatmentRecordVO.getVisitTime(), "yyyy-MM-dd"));
map.put("doctor", treatmentRecordVO.getDoctor()); map.put("doctor", treatmentRecordVO.getDoctor());
map.put("createBy", treatmentRecordVO.getCreateBy()); map.put("createBy", treatmentRecordVO.getCreateBy());
map.put("createTime", DateUtil.format(treatmentRecordVO.getCreateTime(), "yyyy-MM-dd HH:mm:ss")); map.put("createTime", DateUtil.format(treatmentRecordVO.getCreateTime(), "yyyy-MM-dd HH:mm:ss"));
map.put("status", treatmentRecordVO.getStatus() == 0 ? "未完成" : "已完成"); map.put("status", treatmentRecordVO.getStatus() == 0 ? "未完成" : "已完成");
map.put("report_date", DateUtil.format(new Date(), "yyyy-MM-dd")); map.put("report_date", DateUtil.format(new Date(), "yyyy-MM-dd"));
if (treatmentRecordVO != null) { if (StrUtil.isNotEmpty(treatmentRecordVO.getTenantName())) {
map.put("h_name", treatmentRecordVO.getTenantName()); map.put("h_name", treatmentRecordVO.getTenantName());
} }
if (CollectionUtil.isNotEmpty(pmsTreatmentRecords)) { if (CollectionUtil.isNotEmpty(pmsTreatmentRecords)) {
Map<String, PmsTreatmentRecord> recordMap = pmsTreatmentRecords.stream().collect(Collectors.toMap(PmsTreatmentRecord::getQuestionCode, Function.identity())); Map<String, List<PmsTreatmentVo.TreatmentRecord>> recordMap = pmsTreatmentRecords.stream().collect(Collectors.groupingBy(PmsTreatmentVo.TreatmentRecord::getQuestionCode));
map.put("Clinical_diagnosis", recordMap.get("JBXX_ZYZD") == null ? "" : StrUtil.split(recordMap.get("JBXX_ZYZD").getAnswer(), UserConstants.ANSWER_JOIN_STRING).stream().collect(Collectors.joining(", "))); map.put("Clinical_diagnosis", recordMap.get("JBXX_ZYZD") == null ? "" : StrUtil.split(recordMap.get("JBXX_ZYZD").get(0).getAnswerString(), UserConstants.ANSWER_JOIN_STRING).stream().collect(Collectors.joining(", ")));
map.put("PG_RTCF_TXLX", recordMap.get("PG_RTCF_TXLX") == null ? "" : recordMap.get("PG_RTCF_TXLX").getAnswer()); String txlx = recordMap.get("PG_RTCF_TXLX") == null ? "" : recordMap.get("PG_RTCF_TXLX").get(0).getAnswerString();
map.put("PG_RTCF_STNL", recordMap.get("PG_RTCF_STNL") == null ? "" : recordMap.get("PG_RTCF_STNL").getAnswer()); if (StrUtil.isEmpty(txlx)) {
map.put("PG_RTCF_JKPF", recordMap.get("PG_RTCF_JKPF") == null ? "" : recordMap.get("PG_RTCF_JKPF").getAnswer()); map.put("rtcf_flag", false);
map.put("PG_RTCF_TZ", recordMap.get("PG_RTCF_TZ") == null ? "" : recordMap.get("PG_RTCF_TZ").getAnswer()); } else {
map.put("PG_RTCF_QZTZ", recordMap.get("PG_RTCF_QZTZ") == null ? "" : recordMap.get("PG_RTCF_QZTZ").getAnswer()); map.put("rtcf_flag", true);
map.put("PG_RTCF_JRL", recordMap.get("PG_RTCF_JRL") == null ? "" : recordMap.get("PG_RTCF_JRL").getAnswer()); }
map.put("PG_RTCF_TBW", recordMap.get("PG_RTCF_TBW") == null ? "" : recordMap.get("PG_RTCF_TBW").getAnswer()); map.put("PG_RTCF_TXLX", txlx);
map.put("PG_RTCF_DBZ", recordMap.get("PG_RTCF_DBZ") == null ? "" : recordMap.get("PG_RTCF_DBZ").getAnswer()); map.put("PG_RTCF_STNL", recordMap.get("PG_RTCF_STNL") == null ? "" : recordMap.get("PG_RTCF_STNL").get(0).getAnswer());
map.put("PG_RTCF_GZ", recordMap.get("PG_RTCF_GZ") == null ? "" : recordMap.get("PG_RTCF_GZ").getAnswer()); map.put("PG_RTCF_JKPF", recordMap.get("PG_RTCF_JKPF") == null ? "" : recordMap.get("PG_RTCF_JKPF").get(0).getAnswer());
map.put("PG_RTCF_GGJ", recordMap.get("PG_RTCF_GGJ") == null ? "" : recordMap.get("PG_RTCF_GGJ").getAnswer()); map.put("PG_RTCF_TZ", recordMap.get("PG_RTCF_TZ") == null ? "" : recordMap.get("PG_RTCF_TZ").get(0).getAnswer());
map.put("PG_RTCF_ZF", recordMap.get("PG_RTCF_ZF") == null ? "" : recordMap.get("PG_RTCF_ZF").getAnswer()); map.put("PG_RTCF_QZTZ", recordMap.get("PG_RTCF_QZTZ") == null ? "" : recordMap.get("PG_RTCF_QZTZ").get(0).getAnswer());
map.put("PG_RTCF_WHR", recordMap.get("PG_RTCF_WHR") == null ? "" : recordMap.get("PG_RTCF_WHR").getAnswer()); map.put("PG_RTCF_JRL", recordMap.get("PG_RTCF_JRL") == null ? "" : recordMap.get("PG_RTCF_JRL").get(0).getAnswer());
map.put("PG_RTCF_BMI", recordMap.get("PG_RTCF_BMI") == null ? "" : recordMap.get("PG_RTCF_BMI").getAnswer()); map.put("PG_RTCF_TBW", recordMap.get("PG_RTCF_TBW") == null ? "" : recordMap.get("PG_RTCF_TBW").get(0).getAnswer());
map.put("PG_RTCF_PBF", recordMap.get("PG_RTCF_PBF") == null ? "" : recordMap.get("PG_RTCF_PBF").getAnswer()); map.put("PG_RTCF_DBZ", recordMap.get("PG_RTCF_DBZ") == null ? "" : recordMap.get("PG_RTCF_DBZ").get(0).getAnswer());
map.put("PG_RTCF_NZZFSP", recordMap.get("PG_RTCF_NZZFSP") == null ? "" : recordMap.get("PG_RTCF_NZZFSP").getAnswer()); map.put("PG_RTCF_GZ", recordMap.get("PG_RTCF_GZ") == null ? "" : recordMap.get("PG_RTCF_GZ").get(0).getAnswer());
map.put("PG_TZBS_ZYTZ", recordMap.get("PG_TZBS_ZYTZ") == null ? "" : recordMap.get("PG_TZBS_ZYTZ").getAnswer()); map.put("PG_RTCF_GGJ", recordMap.get("PG_RTCF_GGJ") == null ? "" : recordMap.get("PG_RTCF_GGJ").get(0).getAnswer());
map.put("PG_TZBS_JJTZ", recordMap.get("PG_TZBS_JJTZ") == null ? "" : StrUtil.split(recordMap.get("PG_TZBS_JJTZ").getAnswer(), UserConstants.ANSWER_JOIN_STRING).stream().collect(Collectors.joining(","))); map.put("PG_RTCF_ZF", recordMap.get("PG_RTCF_ZF") == null ? "" : recordMap.get("PG_RTCF_ZF").get(0).getAnswer());
map.put("PG_RTCF_WHR", recordMap.get("PG_RTCF_WHR") == null ? "" : recordMap.get("PG_RTCF_WHR").get(0).getAnswer());
map.put("PG_RTCF_BMI", recordMap.get("PG_RTCF_BMI") == null ? "" : recordMap.get("PG_RTCF_BMI").get(0).getAnswer());
map.put("PG_RTCF_PBF", recordMap.get("PG_RTCF_PBF") == null ? "" : recordMap.get("PG_RTCF_PBF").get(0).getAnswer());
map.put("PG_RTCF_NZZFSP", recordMap.get("PG_RTCF_NZZFSP") == null ? "" : recordMap.get("PG_RTCF_NZZFSP").get(0).getAnswer());
String tzbs = recordMap.get("PG_TZBS_ZYTZ") == null ? "" : recordMap.get("PG_TZBS_ZYTZ").get(0).getAnswerString();
if (StrUtil.isEmpty(tzbs)) {
map.put("bsjg_flag", false);
} else {
map.put("bsjg_flag", true);
}
map.put("PG_TZBS_ZYTZ", tzbs);
map.put("PG_TZBS_JJTZ", recordMap.get("PG_TZBS_JJTZ") == null ? "" : StrUtil.split(recordMap.get("PG_TZBS_JJTZ").get(0).getAnswerString(), UserConstants.ANSWER_JOIN_STRING).stream().collect(Collectors.joining(",")));
map.put("score1", recordMap.get("PG_TT_TAPS_DF") == null ? "" : recordMap.get("PG_TT_TAPS_DF").getAnswer()); String score1 = recordMap.get("PG_TT_TAPS_DF") == null ? "" : recordMap.get("PG_TT_TAPS_DF").get(0).getAnswerString();
map.put("score2", recordMap.get("PG_TT_TRACE_DF") == null ? "" : recordMap.get("PG_TT_TRACE_DF").getAnswer()); String score2 = recordMap.get("PG_TT_TRACE_DF") == null ? "" : recordMap.get("PG_TT_TRACE_DF").get(0).getAnswerString();
map.put("score3", recordMap.get("PG_TT_SRS22_DF") == null ? "" : recordMap.get("PG_TT_SRS22_DF").getAnswer()); String score3 = recordMap.get("PG_TT_SRS22_DF") == null ? "" : recordMap.get("PG_TT_SRS22_DF").get(0).getAnswerString();
map.put("score4", recordMap.get("PG_SM_PHQ-9_DF") == null ? "" : recordMap.get("PG_SM_PHQ-9_DF").getAnswer()); if (StrUtil.isEmpty(score1) && StrUtil.isEmpty(score2) && StrUtil.isEmpty(score3)) {
map.put("score5", recordMap.get("PG_SM_EPSW_DF") == null ? "" : recordMap.get("PG_SM_EPSW_DF").getAnswer()); map.put("ttpg_flag", false);
map.put("score6", recordMap.get("PG_SM_PSQI_DF") == null ? "" : recordMap.get("PG_SM_PSQI_DF").getAnswer()); } else {
map.put("score7", recordMap.get("PG_JL_HAMD-24_DF") == null ? "" : recordMap.get("PG_JL_HAMD-24_DF").getAnswer()); map.put("ttpg_flag", true);
map.put("score8", recordMap.get("PG_JL_SAS_DF") == null ? "" : recordMap.get("PG_JL_SAS_DF").getAnswer()); }
map.put("score1", score1);
map.put("score2", score2);
map.put("score3", score3);
String score4 = recordMap.get("PG_SM_PHQ-9_DF") == null ? "" : recordMap.get("PG_SM_PHQ-9_DF").get(0).getAnswerString();
String score5 = recordMap.get("PG_SM_EPSW_DF") == null ? "" : recordMap.get("PG_SM_EPSW_DF").get(0).getAnswerString();
String score6 = recordMap.get("PG_SM_PSQI_DF") == null ? "" : recordMap.get("PG_SM_PSQI_DF").get(0).getAnswerString();
if (StrUtil.isEmpty(score4) && StrUtil.isEmpty(score5) && StrUtil.isEmpty(score6)) {
map.put("smpg_flag", false);
} else {
map.put("smpg_flag", true);
}
map.put("table0", Tables.of(new String[][]{
new String[]{"00", "01"},
new String[]{"10", "11"}
}).border(BorderStyle.DEFAULT).create());
map.put("score4", score4);
map.put("score5", score5);
map.put("score6", score6);
String score7 = recordMap.get("PG_JL_HAMD-24_DF") == null ? "" : recordMap.get("PG_JL_HAMD-24_DF").get(0).getAnswerString();
String score8 = recordMap.get("PG_JL_SAS_DF") == null ? "" : recordMap.get("PG_JL_SAS_DF").get(0).getAnswerString();
if (StrUtil.isEmpty(score7) && StrUtil.isEmpty(score8)) {
map.put("jlpg_flag", false);
} else {
map.put("jlpg_flag", true);
}
map.put("score7", score7);
map.put("score8", score8);
} }
//渲染 //渲染
template.render(map); template.render(map);
@ -721,6 +784,144 @@ public class PmsTreatmentServiceImpl implements PmsTreatmentService {
return profileUrl + "/" + pdfName + ".pdf"; return profileUrl + "/" + pdfName + ".pdf";
} }
@Override
public String adminExportTreatmentPgZip(HttpServletResponse response, PmsTreatmentDto.ExportZipVO dto) throws IOException {
RmsReportManagement reportManagement = rmsReportManagementMapper.selectByPrimaryKey(dto.getManagementId());
if (reportManagement == null) {
return null;
}
return adminExportTreatmentPg(response, dto.getManagementId(), reportManagement.getReportTitle());
}
private String adminExportTreatmentPg(HttpServletResponse response, Long managementId, String title) throws IOException {
List<PmsTreatmentVo.TreatmentRecordVO> treatmentRecordVOS = pmsTreatmentDao.adminQueryTreatmentZip(managementId);
if (CollectionUtil.isEmpty(treatmentRecordVOS)) {
return null;
}
List<File> fileList = new ArrayList<>();
for (PmsTreatmentVo.TreatmentRecordVO treatmentRecordVO : treatmentRecordVOS) {
if (treatmentRecordVO == null) {
throw new BaseException("诊疗信息不存在");
}
PmsTreatmentRecordExample pmsTreatmentRecordExample = new PmsTreatmentRecordExample();
pmsTreatmentRecordExample.createCriteria().andTreatmentIdEqualTo(treatmentRecordVO.getId()).andDelFlagEqualTo((byte) 0);
// List<PmsTreatmentRecord> pmsTreatmentRecords = pmsTreatmentRecordMapper.selectByExample(pmsTreatmentRecordExample);
List<PmsTreatmentVo.TreatmentRecord> pmsTreatmentRecords = pmsTreatmentDao.adminSelectRecord(treatmentRecordVO.getId(), null);
String pdfName = treatmentRecordVO.getName() + "_" + (StrUtil.isNotEmpty(treatmentRecordVO.getVisitNumber()) ? treatmentRecordVO.getVisitNumber() : System.currentTimeMillis());
String wordPath = profilePath + File.separator + pdfName + ".docx";
String pdfPath = profilePath + File.separator + pdfName + ".pdf";
try {
XWPFTemplate template = XWPFTemplate.compile(pgTemplate);
Map<String, Object> map = new HashMap<>();
map.put("name", treatmentRecordVO.getName());
map.put("sex", treatmentRecordVO.getGender() == 0 ? "男" : "女");
map.put("age", treatmentRecordVO.getAge() + " 岁");
map.put("phone", treatmentRecordVO.getPhone());
map.put("visitNum", StrUtil.isEmpty(treatmentRecordVO.getVisitNumber()) ? null : treatmentRecordVO.getVisitNumber());
map.put("visitTime", DateUtil.format(treatmentRecordVO.getVisitTime(), "yyyy-MM-dd"));
map.put("doctor", treatmentRecordVO.getDoctor());
map.put("createBy", treatmentRecordVO.getCreateBy());
map.put("createTime", DateUtil.format(treatmentRecordVO.getCreateTime(), "yyyy-MM-dd HH:mm:ss"));
map.put("status", treatmentRecordVO.getStatus() == 0 ? "未完成" : "已完成");
map.put("report_date", DateUtil.format(new Date(), "yyyy-MM-dd"));
if (StrUtil.isNotEmpty(treatmentRecordVO.getTenantName())) {
map.put("h_name", treatmentRecordVO.getTenantName());
}
if (CollectionUtil.isNotEmpty(pmsTreatmentRecords)) {
Map<String, List<PmsTreatmentVo.TreatmentRecord>> recordMap = pmsTreatmentRecords.stream().collect(Collectors.groupingBy(PmsTreatmentVo.TreatmentRecord::getQuestionCode));
map.put("Clinical_diagnosis", recordMap.get("JBXX_ZYZD") == null ? "" : StrUtil.split(recordMap.get("JBXX_ZYZD").get(0).getAnswerString(), UserConstants.ANSWER_JOIN_STRING).stream().collect(Collectors.joining(", ")));
String txlx = recordMap.get("PG_RTCF_TXLX") == null ? "" : recordMap.get("PG_RTCF_TXLX").get(0).getAnswerString();
if (StrUtil.isEmpty(txlx)) {
map.put("rtcf_flag", false);
} else {
map.put("rtcf_flag", true);
}
map.put("PG_RTCF_TXLX", txlx);
map.put("PG_RTCF_STNL", recordMap.get("PG_RTCF_STNL") == null ? "" : recordMap.get("PG_RTCF_STNL").get(0).getAnswer());
map.put("PG_RTCF_JKPF", recordMap.get("PG_RTCF_JKPF") == null ? "" : recordMap.get("PG_RTCF_JKPF").get(0).getAnswer());
map.put("PG_RTCF_TZ", recordMap.get("PG_RTCF_TZ") == null ? "" : recordMap.get("PG_RTCF_TZ").get(0).getAnswer());
map.put("PG_RTCF_QZTZ", recordMap.get("PG_RTCF_QZTZ") == null ? "" : recordMap.get("PG_RTCF_QZTZ").get(0).getAnswer());
map.put("PG_RTCF_JRL", recordMap.get("PG_RTCF_JRL") == null ? "" : recordMap.get("PG_RTCF_JRL").get(0).getAnswer());
map.put("PG_RTCF_TBW", recordMap.get("PG_RTCF_TBW") == null ? "" : recordMap.get("PG_RTCF_TBW").get(0).getAnswer());
map.put("PG_RTCF_DBZ", recordMap.get("PG_RTCF_DBZ") == null ? "" : recordMap.get("PG_RTCF_DBZ").get(0).getAnswer());
map.put("PG_RTCF_GZ", recordMap.get("PG_RTCF_GZ") == null ? "" : recordMap.get("PG_RTCF_GZ").get(0).getAnswer());
map.put("PG_RTCF_GGJ", recordMap.get("PG_RTCF_GGJ") == null ? "" : recordMap.get("PG_RTCF_GGJ").get(0).getAnswer());
map.put("PG_RTCF_ZF", recordMap.get("PG_RTCF_ZF") == null ? "" : recordMap.get("PG_RTCF_ZF").get(0).getAnswer());
map.put("PG_RTCF_WHR", recordMap.get("PG_RTCF_WHR") == null ? "" : recordMap.get("PG_RTCF_WHR").get(0).getAnswer());
map.put("PG_RTCF_BMI", recordMap.get("PG_RTCF_BMI") == null ? "" : recordMap.get("PG_RTCF_BMI").get(0).getAnswer());
map.put("PG_RTCF_PBF", recordMap.get("PG_RTCF_PBF") == null ? "" : recordMap.get("PG_RTCF_PBF").get(0).getAnswer());
map.put("PG_RTCF_NZZFSP", recordMap.get("PG_RTCF_NZZFSP") == null ? "" : recordMap.get("PG_RTCF_NZZFSP").get(0).getAnswer());
String tzbs = recordMap.get("PG_TZBS_ZYTZ") == null ? "" : recordMap.get("PG_TZBS_ZYTZ").get(0).getAnswerString();
if (StrUtil.isEmpty(tzbs)) {
map.put("bsjg_flag", false);
} else {
map.put("bsjg_flag", true);
}
map.put("PG_TZBS_ZYTZ", tzbs);
map.put("PG_TZBS_JJTZ", recordMap.get("PG_TZBS_JJTZ") == null ? "" : StrUtil.split(recordMap.get("PG_TZBS_JJTZ").get(0).getAnswerString(), UserConstants.ANSWER_JOIN_STRING).stream().collect(Collectors.joining(",")));
String score1 = recordMap.get("PG_TT_TAPS_DF") == null ? "" : recordMap.get("PG_TT_TAPS_DF").get(0).getAnswerString();
String score2 = recordMap.get("PG_TT_TRACE_DF") == null ? "" : recordMap.get("PG_TT_TRACE_DF").get(0).getAnswerString();
String score3 = recordMap.get("PG_TT_SRS22_DF") == null ? "" : recordMap.get("PG_TT_SRS22_DF").get(0).getAnswerString();
if (StrUtil.isEmpty(score1) && StrUtil.isEmpty(score2) && StrUtil.isEmpty(score3)) {
map.put("ttpg_flag", false);
} else {
map.put("ttpg_flag", true);
}
map.put("score1", score1);
map.put("score2", score2);
map.put("score3", score3);
String score4 = recordMap.get("PG_SM_PHQ-9_DF") == null ? "" : recordMap.get("PG_SM_PHQ-9_DF").get(0).getAnswerString();
String score5 = recordMap.get("PG_SM_EPSW_DF") == null ? "" : recordMap.get("PG_SM_EPSW_DF").get(0).getAnswerString();
String score6 = recordMap.get("PG_SM_PSQI_DF") == null ? "" : recordMap.get("PG_SM_PSQI_DF").get(0).getAnswerString();
if (StrUtil.isEmpty(score4) && StrUtil.isEmpty(score5) && StrUtil.isEmpty(score6)) {
map.put("smpg_flag", false);
} else {
map.put("smpg_flag", true);
}
map.put("table0", Tables.of(new String[][]{
new String[]{"00", "01"},
new String[]{"10", "11"}
}).border(BorderStyle.DEFAULT).create());
map.put("score4", score4);
map.put("score5", score5);
map.put("score6", score6);
String score7 = recordMap.get("PG_JL_HAMD-24_DF") == null ? "" : recordMap.get("PG_JL_HAMD-24_DF").get(0).getAnswerString();
String score8 = recordMap.get("PG_JL_SAS_DF") == null ? "" : recordMap.get("PG_JL_SAS_DF").get(0).getAnswerString();
if (StrUtil.isEmpty(score7) && StrUtil.isEmpty(score8)) {
map.put("jlpg_flag", false);
} else {
map.put("jlpg_flag", true);
}
map.put("score7", score7);
map.put("score8", score8);
}
//渲染
template.render(map);
//以文件形式输出
template.writeAndClose(Files.newOutputStream(Paths.get(wordPath)));
//转换为pdf
AsposeUtils.doc2pdf(wordPath, pdfPath);
//删除word
FileUtil.del(wordPath);
fileList.add(new File(pdfPath));
} catch (Exception e) {
e.printStackTrace();
}
}
OutputStream outputStream = Files.newOutputStream(new File("/home/acupuncture/server/profile/upload/" + title + ".zip").toPath());
ZipUtils.toZip(fileList, outputStream);
return "/profile/upload/" + title + ".zip";
}
@Override @Override
public void importTreatment(MultipartFile file) throws IOException { public void importTreatment(MultipartFile file) throws IOException {
//读取excel //读取excel
@ -761,6 +962,93 @@ public class PmsTreatmentServiceImpl implements PmsTreatmentService {
}); });
} }
@Override
public void importTreatmentAdmin(MultipartFile file, Long tenantId) throws IOException {
//读取excel
List<PmsPatient> pmsPatientList = CollectionUtil.newArrayList();
ExcelUtil.readBySax(file.getInputStream(), 0, (sheetIndex, rowIndex, rowList) -> {
//中铝新材料有限公司电解厂2024年度职工健康体检统计表(非高温)
//序号 姓名 性别 出生日期 身份证号 婚姻状况 联系电话 部门 工号 工种 民族 国籍 防护措施 总工龄(年) 总工龄(月) 接害工龄(年) 接害工龄(月) 体检类别
try {
if (rowIndex < 1) {
return;
}
PmsPatient patient = new PmsPatient();
patient.setName(rowList.get(1).toString());
patient.setGender(rowList.get(2).toString().trim().equals("男") ? (byte) 0 : (byte) 1);
patient.setPinyinFull(PinyinUtil.getPinyin(patient.getName(), ""));
patient.setPinyinSimple(PinyinUtil.getFirstLetter(patient.getName(), ""));
patient.setBirthDate(DateUtil.parse(rowList.get(3).toString()));
patient.setEthnicity(rowList.get(4).toString());
patient.setEducationYears(Integer.parseInt(rowList.get(5).toString()));
patient.setPhone(rowList.get(6).toString());
patient.setIdCardType(Byte.valueOf( rowList.get(7).toString()));
patient.setIdCard(rowList.get(8).toString());
patient.setTenantId(tenantId);
patient.setSource(rowList.get(9).toString().trim().equals("筛查") ? (byte) 0 : rowList.get(9).toString().trim().equals("录入") ? (byte) 1 : (byte) 2);
patient.setCurrentIllnessHistory(rowList.get(10).toString());
patient.setCreateBy(SecurityUtils.getUsername());
patient.setId(IdUtil.getSnowflakeNextId());
// patient.setTenantId(SecurityUtils.getTenantId());
patient.setDelFlag((byte) 0);
patient.setCreateTime(new Date());
pmsPatientList.add(patient);
} catch (Exception e) {
e.printStackTrace();
throw new BaseException(StrUtil.format("导入患者信息错误:sheet:{},row:{}, {}",
sheetIndex + 1, rowIndex + 1, ExceptionUtil.getExceptionMessage(e)));
}
});
if (CollectionUtil.isNotEmpty(pmsPatientList)) {
//批量插入
batchSavePatient(pmsPatientList);
}
}
public Integer batchSavePatient(List<PmsPatient> list) {
int max = 2000;
for (int start = 0; start < list.size(); start += max) {
pmsPatientDao.batchInsert(list.subList(start,
start + (Math.min(list.size() - start, max)))
);
}
return list.size();
}
@Override
public String[] getTenantId(MultipartFile file) throws IOException {
AtomicReference<DmsTenant> tenantId = new AtomicReference<>(new DmsTenant());
//读取excel
List<PmsPatient> pmsPatientList = CollectionUtil.newArrayList();
ExcelUtil.readBySax(file.getInputStream(), 0, (sheetIndex, rowIndex, rowList) -> {
// 建档时间 患者姓名 性别 年龄 民族 受教育程度 手机号码 证件类型(0身份证;1护照或外国人永居证; 2港澳居民来往内地通行; 3台湾居民来往大陆通行证; 4其他;) 证件号码 门诊/住院 门诊号/住院号 门诊时间/住院时间 出院时间 责任医生 建档人
try {
if (rowIndex < 1) {
return;
}
String s = rowList.get(13).toString();
DmsTenantExample dmsTenantExample = new DmsTenantExample();
dmsTenantExample.createCriteria().andDelFlagEqualTo((byte) 0).andNameEqualTo(s);
List<DmsTenant> dmsTenants = dmsTenantMapper.selectByExample(dmsTenantExample);
if (CollectionUtil.isNotEmpty(dmsTenants)) {
tenantId.set(dmsTenants.get(0));
return;
}
return;
} catch (Exception e) {
e.printStackTrace();
throw new BaseException(StrUtil.format("导入诊疗信息错误:sheet:{},row:{}, {}", sheetIndex + 1, rowIndex + 1, ExceptionUtil.getExceptionMessage(e)));
}
});
UmsDataSource umsDataSource = umsDataSourceMapper.selectByPrimaryKey(tenantId.get().getDataSourceId());
if (umsDataSource != null ) {
return new String[]{umsDataSource.getDataSourceKey(), tenantId.get().getId() + ""};
}
return null;
}
@Override @Override
public List<PmsTreatmentVo.TreatmentVO> adminListTreatment(PmsTreatmentDto.TreatmentQueryDTO queryDTO) { public List<PmsTreatmentVo.TreatmentVO> adminListTreatment(PmsTreatmentDto.TreatmentQueryDTO queryDTO) {
List<PmsTreatmentVo.TreatmentVO> query = pmsTreatmentDao.adminQuery(queryDTO); List<PmsTreatmentVo.TreatmentVO> query = pmsTreatmentDao.adminQuery(queryDTO);
@ -768,9 +1056,9 @@ public class PmsTreatmentServiceImpl implements PmsTreatmentService {
//查询公共队列 //查询公共队列
List<Object> commonFollowupQueue = redisCache.getCacheList("common_followup_queue"); List<Object> commonFollowupQueue = redisCache.getCacheList("common_followup_queue");
for (PmsTreatmentVo.TreatmentVO treatmentVO : query) { for (PmsTreatmentVo.TreatmentVO treatmentVO : query) {
PmsTreatmentRecordExample pmsTreatmentRecordExample = new PmsTreatmentRecordExample(); // PmsTreatmentRecordExample pmsTreatmentRecordExample = new PmsTreatmentRecordExample();
pmsTreatmentRecordExample.createCriteria().andDelFlagEqualTo((byte) 0).andQuestionCodeEqualTo("JBXX_ZYZD").andTreatmentIdEqualTo(treatmentVO.getId()); // pmsTreatmentRecordExample.createCriteria().andDelFlagEqualTo((byte) 0).andQuestionCodeEqualTo("JBXX_ZYZD").andTreatmentIdEqualTo(treatmentVO.getId());
List<PmsTreatmentRecord> pmsTreatmentRecords = pmsTreatmentRecordMapper.selectByExample(pmsTreatmentRecordExample); // List<PmsTreatmentRecord> pmsTreatmentRecords = pmsTreatmentRecordMapper.selectByExample(pmsTreatmentRecordExample);
List<PmsTreatmentVo.TreatmentRecord> treatmentRecords = pmsTreatmentDao.adminSelectRecord(treatmentVO.getId(), CollectionUtil.newArrayList("JBXX_ZYZD")); List<PmsTreatmentVo.TreatmentRecord> treatmentRecords = pmsTreatmentDao.adminSelectRecord(treatmentVO.getId(), CollectionUtil.newArrayList("JBXX_ZYZD"));
if (CollectionUtil.isNotEmpty(treatmentRecords)) { if (CollectionUtil.isNotEmpty(treatmentRecords)) {
List<String> answer = treatmentRecords.get(0).getAnswer(); List<String> answer = treatmentRecords.get(0).getAnswer();
@ -868,4 +1156,12 @@ public class PmsTreatmentServiceImpl implements PmsTreatmentService {
IoUtil.close(out); IoUtil.close(out);
} }
} }
@Override
public void aduit(Long treatmentId, Byte status) {
PmsTreatment pmsTreatment = treatmentMapper.selectByPrimaryKey(treatmentId);
if (pmsTreatment != null) {
pmsTreatment.setStatus(status);
}
}
} }

151
acupuncture-system/src/main/java/com/acupuncture/system/service/impl/SysNoticeServiceImpl.java

@ -1,92 +1,193 @@
package com.acupuncture.system.service.impl; package com.acupuncture.system.service.impl;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Date;
import java.util.List; import java.util.List;
import java.util.stream.Collectors;
import cn.hutool.core.collection.CollUtil;
import cn.hutool.core.util.IdUtil;
import com.acupuncture.common.utils.SecurityUtils;
import com.acupuncture.system.domain.po.SysNoticeUser;
import com.acupuncture.system.domain.po.SysNoticeUserExample;
import com.acupuncture.system.persist.mapper.SysNoticeUserMapper;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import com.acupuncture.system.domain.SysNotice; import com.acupuncture.system.domain.SysNotice;
import com.acupuncture.system.mapper.SysNoticeMapper; import com.acupuncture.system.mapper.SysNoticeMapper;
import com.acupuncture.system.service.ISysNoticeService; import com.acupuncture.system.service.ISysNoticeService;
import org.springframework.transaction.annotation.Transactional;
import javax.annotation.Resource;
/** /**
* 公告 服务层实现 * 公告 服务层实现
* *
* @author acupuncture * @author acupuncture
*/ */
@Service @Service
public class SysNoticeServiceImpl implements ISysNoticeService @Transactional
{ public class SysNoticeServiceImpl implements ISysNoticeService {
@Autowired @Autowired
private SysNoticeMapper noticeMapper; private SysNoticeMapper noticeMapper;
@Resource
private SysNoticeUserMapper sysNoticeUserMapper;
/** /**
* 查询公告信息 * 查询公告信息
* *
* @param noticeId 公告ID * @param noticeId 公告ID
* @return 公告信息 * @return 公告信息
*/ */
@Override @Override
public SysNotice selectNoticeById(Long noticeId) public SysNotice selectNoticeById(Long noticeId) {
{ SysNotice sysNotice = noticeMapper.selectNoticeById(noticeId);
return noticeMapper.selectNoticeById(noticeId); if (sysNotice != null) {
SysNoticeUserExample sysNoticeUserExample = new SysNoticeUserExample();
sysNoticeUserExample.createCriteria().andNoticeIdEqualTo(sysNotice.getNoticeId());
List<SysNoticeUser> sysNoticeUsers = sysNoticeUserMapper.selectByExample(sysNoticeUserExample);
if (CollUtil.isNotEmpty(sysNoticeUsers)) {
sysNotice.setUserIdList(sysNoticeUsers.stream().map(SysNoticeUser::getUserId).collect(Collectors.toList()));
}
}
return sysNotice;
} }
/** /**
* 查询公告列表 * 查询公告列表
* *
* @param notice 公告信息 * @param notice 公告信息
* @return 公告集合 * @return 公告集合
*/ */
@Override @Override
public List<SysNotice> selectNoticeList(SysNotice notice) public List<SysNotice> selectNoticeList(SysNotice notice) {
{ if (!SecurityUtils.isAdmin(SecurityUtils.getUserId())) {
return noticeMapper.selectNoticeList(notice); SysNoticeUserExample sysNoticeUserExample = new SysNoticeUserExample();
sysNoticeUserExample.createCriteria().andUserIdEqualTo(SecurityUtils.getUserId());
List<SysNoticeUser> sysNoticeUsers = sysNoticeUserMapper.selectByExample(sysNoticeUserExample);
List<Long> noticeIdList = new ArrayList<>();
if (CollUtil.isNotEmpty(sysNoticeUsers)) {
noticeIdList = sysNoticeUsers.stream().map(sysNoticeUser -> sysNoticeUser.getNoticeId()).collect(Collectors.toList());
}
notice.setNoticeIdList(noticeIdList);
}
List<SysNotice> sysNotices = noticeMapper.selectNoticeList(notice, SecurityUtils.getUserId());
if (CollUtil.isNotEmpty(sysNotices)) {
for (SysNotice sysNotice : sysNotices) {
SysNoticeUserExample sysNoticeUserExample1 = new SysNoticeUserExample();
sysNoticeUserExample1.createCriteria().andNoticeIdEqualTo(sysNotice.getNoticeId());
List<SysNoticeUser> sysNoticeUsers1 = sysNoticeUserMapper.selectByExample(sysNoticeUserExample1);
if (CollUtil.isNotEmpty(sysNoticeUsers1)) {
sysNotice.setUserIdList(sysNoticeUsers1.stream().map(SysNoticeUser::getUserId).collect(Collectors.toList()));
}
}
}
return sysNotices;
} }
/** /**
* 新增公告 * 新增公告
* *
* @param notice 公告信息 * @param notice 公告信息
* @return 结果 * @return 结果
*/ */
@Override @Override
public int insertNotice(SysNotice notice) public int insertNotice(SysNotice notice) {
{ if (CollUtil.isNotEmpty(notice.getUserIdList())) {
return noticeMapper.insertNotice(notice); notice.setIsAll((byte) 0);
} else {
notice.setIsAll((byte) 1);
}
int i = noticeMapper.insertNotice(notice);
if (CollUtil.isNotEmpty(notice.getUserIdList())) {
for (Long userId : notice.getUserIdList()) {
SysNoticeUser sysNoticeUser = new SysNoticeUser();
sysNoticeUser.setId(IdUtil.getSnowflakeNextId());
sysNoticeUser.setNoticeId(notice.getNoticeId());
sysNoticeUser.setUserId(userId);
sysNoticeUser.setCreateBy(SecurityUtils.getUsername());
sysNoticeUser.setCreateTime(new Date());
//新增通知用户关联关系
sysNoticeUserMapper.insertSelective(sysNoticeUser);
}
}
return i;
} }
/** /**
* 修改公告 * 修改公告
* *
* @param notice 公告信息 * @param notice 公告信息
* @return 结果 * @return 结果
*/ */
@Override @Override
public int updateNotice(SysNotice notice) public int updateNotice(SysNotice notice) {
{ if (CollUtil.isNotEmpty(notice.getUserIdList())) {
return noticeMapper.updateNotice(notice); notice.setIsAll((byte) 0);
} else {
notice.setIsAll((byte) 1);
}
int i = noticeMapper.updateNotice(notice);
SysNoticeUserExample sysNoticeUserExample = new SysNoticeUserExample();
sysNoticeUserExample.createCriteria().andNoticeIdEqualTo(notice.getNoticeId());
List<SysNoticeUser> sysNoticeUsers = sysNoticeUserMapper.selectByExample(sysNoticeUserExample);
if (CollUtil.isNotEmpty(sysNoticeUsers)) {
for (SysNoticeUser sysNoticeUser : sysNoticeUsers) {
sysNoticeUserMapper.deleteByPrimaryKey(sysNoticeUser.getId());
}
}
if (CollUtil.isNotEmpty(notice.getUserIdList())) {
for (Long userId : notice.getUserIdList()) {
SysNoticeUser sysNoticeUser = new SysNoticeUser();
sysNoticeUser.setId(IdUtil.getSnowflakeNextId());
sysNoticeUser.setNoticeId(notice.getNoticeId());
sysNoticeUser.setUserId(userId);
sysNoticeUser.setCreateBy(SecurityUtils.getUsername());
sysNoticeUser.setCreateTime(new Date());
//新增通知用户关联关系
sysNoticeUserMapper.insertSelective(sysNoticeUser);
}
}
return i;
} }
/** /**
* 删除公告对象 * 删除公告对象
* *
* @param noticeId 公告ID * @param noticeId 公告ID
* @return 结果 * @return 结果
*/ */
@Override @Override
public int deleteNoticeById(Long noticeId) public int deleteNoticeById(Long noticeId) {
{ SysNoticeUserExample sysNoticeUserExample = new SysNoticeUserExample();
sysNoticeUserExample.createCriteria().andNoticeIdEqualTo(noticeId);
List<SysNoticeUser> sysNoticeUsers = sysNoticeUserMapper.selectByExample(sysNoticeUserExample);
if (CollUtil.isNotEmpty(sysNoticeUsers)) {
for (SysNoticeUser sysNoticeUser : sysNoticeUsers) {
sysNoticeUserMapper.deleteByPrimaryKey(sysNoticeUser.getId());
}
}
return noticeMapper.deleteNoticeById(noticeId); return noticeMapper.deleteNoticeById(noticeId);
} }
/** /**
* 批量删除公告信息 * 批量删除公告信息
* *
* @param noticeIds 需要删除的公告ID * @param noticeIds 需要删除的公告ID
* @return 结果 * @return 结果
*/ */
@Override @Override
public int deleteNoticeByIds(Long[] noticeIds) public int deleteNoticeByIds(Long[] noticeIds) {
{ SysNoticeUserExample sysNoticeUserExample = new SysNoticeUserExample();
sysNoticeUserExample.createCriteria().andNoticeIdIn(Arrays.asList(noticeIds));
List<SysNoticeUser> sysNoticeUsers = sysNoticeUserMapper.selectByExample(sysNoticeUserExample);
if (CollUtil.isNotEmpty(sysNoticeUsers)) {
for (SysNoticeUser sysNoticeUser : sysNoticeUsers) {
sysNoticeUserMapper.deleteByPrimaryKey(sysNoticeUser.getId());
}
}
return noticeMapper.deleteNoticeByIds(noticeIds); return noticeMapper.deleteNoticeByIds(noticeIds);
} }
} }

1
acupuncture-system/src/main/java/com/acupuncture/system/service/impl/SysUserOnlineServiceImpl.java

@ -87,6 +87,7 @@ public class SysUserOnlineServiceImpl implements ISysUserOnlineService
sysUserOnline.setBrowser(user.getBrowser()); sysUserOnline.setBrowser(user.getBrowser());
sysUserOnline.setOs(user.getOs()); sysUserOnline.setOs(user.getOs());
sysUserOnline.setLoginTime(user.getLoginTime()); sysUserOnline.setLoginTime(user.getLoginTime());
sysUserOnline.setLastVisitTime(user.getUser().getLoginDate());
if (StringUtils.isNotNull(user.getUser().getDept())) if (StringUtils.isNotNull(user.getUser().getDept()))
{ {
sysUserOnline.setDeptName(user.getUser().getDept().getDeptName()); sysUserOnline.setDeptName(user.getUser().getDept().getDeptName());

31
acupuncture-system/src/main/resources/mapper/dao/AdminRmsReportDao.xml

@ -7,7 +7,9 @@
id, id,
type_name as typeName, type_name as typeName,
create_by as createBy, create_by as createBy,
create_time as createTime create_time as createTime,
remark,
file
from rms_report_type from rms_report_type
where del_flag = 0 where del_flag = 0
<if test="typeName != null and typeName != ''"> <if test="typeName != null and typeName != ''">
@ -36,4 +38,31 @@
</if> </if>
order by m.create_time desc order by m.create_time desc
</select> </select>
<select id="queryManagerListMy" resultType="com.acupuncture.system.domain.vo.AdminReportVo$Result">
select
m.id,
m.report_title as reportTitle,
m.report_type as reportType,
m.time_range_start as timeRangeStart,
m.time_range_end as timeRangeEnd,
m.status,
m.create_by as createBy,
m.create_time as createTime,
t.type_name as typeName
from rms_report_management m
left join
rms_report_type t on m.report_type = t.id
where m.del_flag = 0
and m.status = 1
<if test="reportTitle != null and reportTitle != ''">
and m.report_title like concat('%', #{reportTitle}, '%')
</if>
<if test="idList != null and idList.size() > 0">
<foreach item="item" collection="idList" separator="," open="and m.id in (" close=")">
#{item}
</foreach>
</if>
order by m.create_time desc
</select>
</mapper> </mapper>

4
acupuncture-system/src/main/resources/mapper/dao/DmsUserDao.xml

@ -74,6 +74,7 @@
<if test="status != null and status != ''">status = #{status},</if> <if test="status != null and status != ''">status = #{status},</if>
<if test="updateBy != null and updateBy != ''">update_by = #{updateBy},</if> <if test="updateBy != null and updateBy != ''">update_by = #{updateBy},</if>
<if test="remark != null">remark = #{remark},</if> <if test="remark != null">remark = #{remark},</if>
<if test="forceUpdPwdFlag != null">force_upd_pwd_flag = #{forceUpdPwdFlag},</if>
update_time = sysdate() update_time = sysdate()
</set> </set>
where id = #{id} where id = #{id}
@ -97,7 +98,8 @@
u.sex as sex, u.sex as sex,
t.`name` as tenantName, t.`name` as tenantName,
t.contact_phone as tenantPhone, t.contact_phone as tenantPhone,
u.slaver_admin as slaverAdmin u.slaver_admin as slaverAdmin,
u.force_upd_pwd_flag as forceUpdPwdFlag
from from
dms_user u join dms_tenant t on u.tenant_id = t.id dms_user u join dms_tenant t on u.tenant_id = t.id
WHERE WHERE

128
acupuncture-system/src/main/resources/mapper/dao/PmsTreatmentDao.xml

@ -5,41 +5,42 @@
<select id="query" resultType="com.acupuncture.system.domain.vo.PmsTreatmentVo$TreatmentVO" <select id="query" resultType="com.acupuncture.system.domain.vo.PmsTreatmentVo$TreatmentVO"
parameterType="com.acupuncture.system.domain.dto.PmsTreatmentDto$TreatmentQueryDTO"> parameterType="com.acupuncture.system.domain.dto.PmsTreatmentDto$TreatmentQueryDTO">
select select
id, t.id,
patient_id as patientId, t.patient_id as patientId,
name, t.name,
gender, t.gender,
age, t.age,
birth_date as birthDate, t.birth_date as birthDate,
ethnicity, t.ethnicity,
education_years as educationYears, t.education_years as educationYears,
phone, t.phone,
id_card_type as idCardType, t.id_card_type as idCardType,
id_card as idCard, t.id_card as idCard,
visit_type as visitType, t.visit_type as visitType,
visit_number as visitNumber, t.visit_number as visitNumber,
visit_time as visitTime, t.visit_time as visitTime,
discharge_time as dischargeTime, t.discharge_time as dischargeTime,
doctor, t.doctor,
dept_name as deptName, t.dept_name as deptName,
diagnosis_code as diagnosisCode, t.diagnosis_code as diagnosisCode,
diagnosis_name as diagnosisName, t.diagnosis_name as diagnosisName,
status, t.status,
member_id as memberId, t.member_id as memberId,
create_by as createBy, t.create_by as createBy,
create_time as createTime t.create_time as createTime,
from pms_treatment t.management_id as managementId
where del_flag = 0 from pms_treatment t
where t.del_flag = 0
<if test="tenantId != null"> <if test="tenantId != null">
AND tenant_id = #{tenantId} AND t.tenant_id = #{tenantId}
</if> </if>
<if test="query.keywords != null and query.keywords != ''"> <if test="query.keywords != null and query.keywords != ''">
AND ( AND (
name LIKE CONCAT('%', #{query.keywords}, '%') t.name LIKE CONCAT('%', #{query.keywords}, '%')
OR pinyin_full LIKE CONCAT('%', #{query.keywords}, '%') OR t.pinyin_full LIKE CONCAT('%', #{query.keywords}, '%')
OR pinyin_simple LIKE CONCAT('%', #{query.keywords}, '%') OR t.pinyin_simple LIKE CONCAT('%', #{query.keywords}, '%')
OR phone LIKE CONCAT('%', #{query.keywords}, '%') OR t.phone LIKE CONCAT('%', #{query.keywords}, '%')
or id_card LIKE CONCAT('%', #{query.keywords}, '%') or t.id_card LIKE CONCAT('%', #{query.keywords}, '%')
) )
</if> </if>
<if test="query.patientId != null"> <if test="query.patientId != null">
@ -67,9 +68,21 @@
AND doctor = #{query.doctor} AND doctor = #{query.doctor}
</if> </if>
<if test="query.name != null and query.name != ''"> <if test="query.name != null and query.name != ''">
AND name = #{query.name} AND t.name = #{query.name}
</if>
<if test="query.managementIdList != null and query.managementIdList.size() > 0 ">
and management_id in
<foreach collection="query.managementIdList" item="item" open="(" separator="," close=")">
#{item}
</foreach>
</if>
<if test="query.startTime != null and query.startTime != ''">
and visit_time &gt;= #{query.startTime}
</if> </if>
order by update_time desc <if test="query.endTime != null and query.endTime != ''">
and visit_time &lt;= #{query.endTime}
</if>
order by t.update_time desc
</select> </select>
<select id="adminQuery" resultType="com.acupuncture.system.domain.vo.PmsTreatmentVo$TreatmentVO" <select id="adminQuery" resultType="com.acupuncture.system.domain.vo.PmsTreatmentVo$TreatmentVO"
@ -98,10 +111,14 @@
t.tenant_id as tenantId, t.tenant_id as tenantId,
t.create_by as createBy, t.create_by as createBy,
t.create_time as createTime, t.create_time as createTime,
d.name as tenantName d.name as tenantName,
t.management_id as managementId,
m.report_title as reportTitle
from v_pms_treatment t from v_pms_treatment t
left join left join
dms_tenant d on t.tenant_id = d.id dms_tenant d on t.tenant_id = d.id
left join
rms_report_management m on m.id = t.management_id
where t.del_flag = 0 where t.del_flag = 0
and t.status = 2 and t.status = 2
<if test="query.tenantId != null"> <if test="query.tenantId != null">
@ -143,6 +160,15 @@
<if test="query.name != null and query.name != ''"> <if test="query.name != null and query.name != ''">
AND t.name = #{query.name} AND t.name = #{query.name}
</if> </if>
<if test="query.managementId != null">
and t.management_id = #{query.managementId}
</if>
<if test="query.startTime != null and query.startTime != ''">
and t.visit_time &gt;= #{query.startTime}
</if>
<if test="query.endTime != null and query.endTime != ''">
and t.visit_time &lt;= #{query.endTime}
</if>
order by t.create_time desc order by t.create_time desc
</select> </select>
@ -179,6 +205,40 @@
and t.id = #{id} and t.id = #{id}
</select> </select>
<select id="adminQueryTreatmentZip" resultType="com.acupuncture.system.domain.vo.PmsTreatmentVo$TreatmentRecordVO">
select
t.id,
t.patient_id as patientId,
t.name,
t.gender,
t.age,
t.birth_date as birthDate,
t.ethnicity,
t.education_years as educationYears,
t.phone,
t.id_card_type as idCardType,
t.id_card as idCard,
t.visit_type as visitType,
t.visit_number as visitNumber,
t.visit_time as visitTime,
t.discharge_time as dischargeTime,
t.doctor,
t.dept_name as deptName,
t.diagnosis_code as diagnosisCode,
t.diagnosis_name as diagnosisName,
t.status,
t.create_by as createBy,
t.create_time as createTime,
d.name as tenantName
from
v_pms_treatment t
left join
dms_tenant d on t.tenant_id = d.id
where t.del_flag = 0
and t.status = 2
and t.management_id = #{managementId}
</select>
<insert id="batchInsertRecord"> <insert id="batchInsertRecord">
insert into pms_treatment_record insert into pms_treatment_record
( (

25
acupuncture-system/src/main/resources/mapper/system/DmsUserMapper.xml

@ -18,6 +18,7 @@
<result column="update_by" jdbcType="VARCHAR" property="updateBy" /> <result column="update_by" jdbcType="VARCHAR" property="updateBy" />
<result column="update_time" jdbcType="TIMESTAMP" property="updateTime" /> <result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
<result column="remark" jdbcType="VARCHAR" property="remark" /> <result column="remark" jdbcType="VARCHAR" property="remark" />
<result column="force_upd_pwd_flag" jdbcType="TINYINT" property="forceUpdPwdFlag" />
</resultMap> </resultMap>
<sql id="Example_Where_Clause"> <sql id="Example_Where_Clause">
<where> <where>
@ -79,7 +80,7 @@
</sql> </sql>
<sql id="Base_Column_List"> <sql id="Base_Column_List">
id, tenant_id, user_name, password, nick_name, email, phonenumber, sex, slaver_admin, id, tenant_id, user_name, password, nick_name, email, phonenumber, sex, slaver_admin,
status, del_flag, create_by, create_time, update_by, update_time, remark status, del_flag, create_by, create_time, update_by, update_time, remark, force_upd_pwd_flag
</sql> </sql>
<select id="selectByExample" parameterType="com.acupuncture.system.domain.po.DmsUserExample" resultMap="BaseResultMap"> <select id="selectByExample" parameterType="com.acupuncture.system.domain.po.DmsUserExample" resultMap="BaseResultMap">
select select
@ -111,13 +112,13 @@
phonenumber, sex, slaver_admin, phonenumber, sex, slaver_admin,
status, del_flag, create_by, status, del_flag, create_by,
create_time, update_by, update_time, create_time, update_by, update_time,
remark) remark, force_upd_pwd_flag)
values (#{id,jdbcType=BIGINT}, #{tenantId,jdbcType=BIGINT}, #{userName,jdbcType=VARCHAR}, values (#{id,jdbcType=BIGINT}, #{tenantId,jdbcType=BIGINT}, #{userName,jdbcType=VARCHAR},
#{password,jdbcType=VARCHAR}, #{nickName,jdbcType=VARCHAR}, #{email,jdbcType=VARCHAR}, #{password,jdbcType=VARCHAR}, #{nickName,jdbcType=VARCHAR}, #{email,jdbcType=VARCHAR},
#{phonenumber,jdbcType=VARCHAR}, #{sex,jdbcType=CHAR}, #{slaverAdmin,jdbcType=TINYINT}, #{phonenumber,jdbcType=VARCHAR}, #{sex,jdbcType=CHAR}, #{slaverAdmin,jdbcType=TINYINT},
#{status,jdbcType=CHAR}, #{delFlag,jdbcType=TINYINT}, #{createBy,jdbcType=VARCHAR}, #{status,jdbcType=CHAR}, #{delFlag,jdbcType=TINYINT}, #{createBy,jdbcType=VARCHAR},
#{createTime,jdbcType=TIMESTAMP}, #{updateBy,jdbcType=VARCHAR}, #{updateTime,jdbcType=TIMESTAMP}, #{createTime,jdbcType=TIMESTAMP}, #{updateBy,jdbcType=VARCHAR}, #{updateTime,jdbcType=TIMESTAMP},
#{remark,jdbcType=VARCHAR}) #{remark,jdbcType=VARCHAR}, #{forceUpdPwdFlag,jdbcType=TINYINT})
</insert> </insert>
<insert id="insertSelective" parameterType="com.acupuncture.system.domain.po.DmsUser"> <insert id="insertSelective" parameterType="com.acupuncture.system.domain.po.DmsUser">
insert into dms_user insert into dms_user
@ -170,6 +171,9 @@
<if test="remark != null"> <if test="remark != null">
remark, remark,
</if> </if>
<if test="forceUpdPwdFlag != null">
force_upd_pwd_flag,
</if>
</trim> </trim>
<trim prefix="values (" suffix=")" suffixOverrides=","> <trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="id != null"> <if test="id != null">
@ -220,6 +224,9 @@
<if test="remark != null"> <if test="remark != null">
#{remark,jdbcType=VARCHAR}, #{remark,jdbcType=VARCHAR},
</if> </if>
<if test="forceUpdPwdFlag != null">
#{forceUpdPwdFlag,jdbcType=TINYINT},
</if>
</trim> </trim>
</insert> </insert>
<select id="countByExample" parameterType="com.acupuncture.system.domain.po.DmsUserExample" resultType="java.lang.Long"> <select id="countByExample" parameterType="com.acupuncture.system.domain.po.DmsUserExample" resultType="java.lang.Long">
@ -279,6 +286,9 @@
<if test="record.remark != null"> <if test="record.remark != null">
remark = #{record.remark,jdbcType=VARCHAR}, remark = #{record.remark,jdbcType=VARCHAR},
</if> </if>
<if test="record.forceUpdPwdFlag != null">
force_upd_pwd_flag = #{record.forceUpdPwdFlag,jdbcType=TINYINT},
</if>
</set> </set>
<if test="_parameter != null"> <if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" /> <include refid="Update_By_Example_Where_Clause" />
@ -301,7 +311,8 @@
create_time = #{record.createTime,jdbcType=TIMESTAMP}, create_time = #{record.createTime,jdbcType=TIMESTAMP},
update_by = #{record.updateBy,jdbcType=VARCHAR}, update_by = #{record.updateBy,jdbcType=VARCHAR},
update_time = #{record.updateTime,jdbcType=TIMESTAMP}, update_time = #{record.updateTime,jdbcType=TIMESTAMP},
remark = #{record.remark,jdbcType=VARCHAR} remark = #{record.remark,jdbcType=VARCHAR},
force_upd_pwd_flag = #{record.forceUpdPwdFlag,jdbcType=TINYINT}
<if test="_parameter != null"> <if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" /> <include refid="Update_By_Example_Where_Clause" />
</if> </if>
@ -354,6 +365,9 @@
<if test="remark != null"> <if test="remark != null">
remark = #{remark,jdbcType=VARCHAR}, remark = #{remark,jdbcType=VARCHAR},
</if> </if>
<if test="forceUpdPwdFlag != null">
force_upd_pwd_flag = #{forceUpdPwdFlag,jdbcType=TINYINT},
</if>
</set> </set>
where id = #{id,jdbcType=BIGINT} where id = #{id,jdbcType=BIGINT}
</update> </update>
@ -373,7 +387,8 @@
create_time = #{createTime,jdbcType=TIMESTAMP}, create_time = #{createTime,jdbcType=TIMESTAMP},
update_by = #{updateBy,jdbcType=VARCHAR}, update_by = #{updateBy,jdbcType=VARCHAR},
update_time = #{updateTime,jdbcType=TIMESTAMP}, update_time = #{updateTime,jdbcType=TIMESTAMP},
remark = #{remark,jdbcType=VARCHAR} remark = #{remark,jdbcType=VARCHAR},
force_upd_pwd_flag = #{forceUpdPwdFlag,jdbcType=TINYINT}
where id = #{id,jdbcType=BIGINT} where id = #{id,jdbcType=BIGINT}
</update> </update>
</mapper> </mapper>

29
acupuncture-system/src/main/resources/mapper/system/PmsTreatmentMapper.xml

@ -32,6 +32,7 @@
<result column="update_by" jdbcType="VARCHAR" property="updateBy" /> <result column="update_by" jdbcType="VARCHAR" property="updateBy" />
<result column="update_time" jdbcType="TIMESTAMP" property="updateTime" /> <result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
<result column="remark" jdbcType="VARCHAR" property="remark" /> <result column="remark" jdbcType="VARCHAR" property="remark" />
<result column="management_id" jdbcType="BIGINT" property="managementId" />
</resultMap> </resultMap>
<sql id="Example_Where_Clause"> <sql id="Example_Where_Clause">
<where> <where>
@ -95,7 +96,7 @@
id, patient_id, name, pinyin_full, pinyin_simple, gender, age, birth_date, ethnicity, id, patient_id, name, pinyin_full, pinyin_simple, gender, age, birth_date, ethnicity,
education_years, phone, id_card_type, id_card, visit_type, visit_number, visit_time, education_years, phone, id_card_type, id_card, visit_type, visit_number, visit_time,
discharge_time, doctor, dept_name, diagnosis_code, diagnosis_name, status, member_id, discharge_time, doctor, dept_name, diagnosis_code, diagnosis_name, status, member_id,
del_flag, tenant_id, create_by, create_time, update_by, update_time, remark del_flag, tenant_id, create_by, create_time, update_by, update_time, remark, management_id
</sql> </sql>
<select id="selectByExample" parameterType="com.acupuncture.system.domain.po.PmsTreatmentExample" resultMap="BaseResultMap"> <select id="selectByExample" parameterType="com.acupuncture.system.domain.po.PmsTreatmentExample" resultMap="BaseResultMap">
select select
@ -131,8 +132,8 @@
dept_name, diagnosis_code, diagnosis_name, dept_name, diagnosis_code, diagnosis_name,
status, member_id, del_flag, status, member_id, del_flag,
tenant_id, create_by, create_time, tenant_id, create_by, create_time,
update_by, update_time, remark update_by, update_time, remark,
) management_id)
values (#{id,jdbcType=BIGINT}, #{patientId,jdbcType=BIGINT}, #{name,jdbcType=VARCHAR}, values (#{id,jdbcType=BIGINT}, #{patientId,jdbcType=BIGINT}, #{name,jdbcType=VARCHAR},
#{pinyinFull,jdbcType=VARCHAR}, #{pinyinSimple,jdbcType=VARCHAR}, #{gender,jdbcType=TINYINT}, #{pinyinFull,jdbcType=VARCHAR}, #{pinyinSimple,jdbcType=VARCHAR}, #{gender,jdbcType=TINYINT},
#{age,jdbcType=INTEGER}, #{birthDate,jdbcType=DATE}, #{ethnicity,jdbcType=VARCHAR}, #{age,jdbcType=INTEGER}, #{birthDate,jdbcType=DATE}, #{ethnicity,jdbcType=VARCHAR},
@ -142,8 +143,8 @@
#{deptName,jdbcType=VARCHAR}, #{diagnosisCode,jdbcType=VARCHAR}, #{diagnosisName,jdbcType=VARCHAR}, #{deptName,jdbcType=VARCHAR}, #{diagnosisCode,jdbcType=VARCHAR}, #{diagnosisName,jdbcType=VARCHAR},
#{status,jdbcType=TINYINT}, #{memberId,jdbcType=BIGINT}, #{delFlag,jdbcType=TINYINT}, #{status,jdbcType=TINYINT}, #{memberId,jdbcType=BIGINT}, #{delFlag,jdbcType=TINYINT},
#{tenantId,jdbcType=BIGINT}, #{createBy,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP}, #{tenantId,jdbcType=BIGINT}, #{createBy,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP},
#{updateBy,jdbcType=VARCHAR}, #{updateTime,jdbcType=TIMESTAMP}, #{remark,jdbcType=VARCHAR} #{updateBy,jdbcType=VARCHAR}, #{updateTime,jdbcType=TIMESTAMP}, #{remark,jdbcType=VARCHAR},
) #{managementId,jdbcType=BIGINT})
</insert> </insert>
<insert id="insertSelective" parameterType="com.acupuncture.system.domain.po.PmsTreatment"> <insert id="insertSelective" parameterType="com.acupuncture.system.domain.po.PmsTreatment">
insert into pms_treatment insert into pms_treatment
@ -238,6 +239,9 @@
<if test="remark != null"> <if test="remark != null">
remark, remark,
</if> </if>
<if test="managementId != null">
management_id,
</if>
</trim> </trim>
<trim prefix="values (" suffix=")" suffixOverrides=","> <trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="id != null"> <if test="id != null">
@ -330,6 +334,9 @@
<if test="remark != null"> <if test="remark != null">
#{remark,jdbcType=VARCHAR}, #{remark,jdbcType=VARCHAR},
</if> </if>
<if test="managementId != null">
#{managementId,jdbcType=BIGINT},
</if>
</trim> </trim>
</insert> </insert>
<select id="countByExample" parameterType="com.acupuncture.system.domain.po.PmsTreatmentExample" resultType="java.lang.Long"> <select id="countByExample" parameterType="com.acupuncture.system.domain.po.PmsTreatmentExample" resultType="java.lang.Long">
@ -431,6 +438,9 @@
<if test="record.remark != null"> <if test="record.remark != null">
remark = #{record.remark,jdbcType=VARCHAR}, remark = #{record.remark,jdbcType=VARCHAR},
</if> </if>
<if test="record.managementId != null">
management_id = #{record.managementId,jdbcType=BIGINT},
</if>
</set> </set>
<if test="_parameter != null"> <if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" /> <include refid="Update_By_Example_Where_Clause" />
@ -467,7 +477,8 @@
create_time = #{record.createTime,jdbcType=TIMESTAMP}, create_time = #{record.createTime,jdbcType=TIMESTAMP},
update_by = #{record.updateBy,jdbcType=VARCHAR}, update_by = #{record.updateBy,jdbcType=VARCHAR},
update_time = #{record.updateTime,jdbcType=TIMESTAMP}, update_time = #{record.updateTime,jdbcType=TIMESTAMP},
remark = #{record.remark,jdbcType=VARCHAR} remark = #{record.remark,jdbcType=VARCHAR},
management_id = #{record.managementId,jdbcType=BIGINT}
<if test="_parameter != null"> <if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" /> <include refid="Update_By_Example_Where_Clause" />
</if> </if>
@ -562,6 +573,9 @@
<if test="remark != null"> <if test="remark != null">
remark = #{remark,jdbcType=VARCHAR}, remark = #{remark,jdbcType=VARCHAR},
</if> </if>
<if test="managementId != null">
management_id = #{managementId,jdbcType=BIGINT},
</if>
</set> </set>
where id = #{id,jdbcType=BIGINT} where id = #{id,jdbcType=BIGINT}
</update> </update>
@ -595,7 +609,8 @@
create_time = #{createTime,jdbcType=TIMESTAMP}, create_time = #{createTime,jdbcType=TIMESTAMP},
update_by = #{updateBy,jdbcType=VARCHAR}, update_by = #{updateBy,jdbcType=VARCHAR},
update_time = #{updateTime,jdbcType=TIMESTAMP}, update_time = #{updateTime,jdbcType=TIMESTAMP},
remark = #{remark,jdbcType=VARCHAR} remark = #{remark,jdbcType=VARCHAR},
management_id = #{managementId,jdbcType=BIGINT}
where id = #{id,jdbcType=BIGINT} where id = #{id,jdbcType=BIGINT}
</update> </update>
</mapper> </mapper>

252
acupuncture-system/src/main/resources/mapper/system/RmsReportManagementTenantMapper.xml

@ -0,0 +1,252 @@
<?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.acupuncture.system.persist.mapper.RmsReportManagementTenantMapper">
<resultMap id="BaseResultMap" type="com.acupuncture.system.domain.po.RmsReportManagementTenant">
<id column="id" jdbcType="BIGINT" property="id" />
<result column="report_id" jdbcType="BIGINT" property="reportId" />
<result column="tenant_id" jdbcType="BIGINT" property="tenantId" />
<result column="create_by" jdbcType="VARCHAR" property="createBy" />
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
<result column="update_by" jdbcType="VARCHAR" property="updateBy" />
<result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
<result column="remark" jdbcType="VARCHAR" property="remark" />
</resultMap>
<sql id="Example_Where_Clause">
<where>
<foreach collection="oredCriteria" item="criteria" separator="or">
<if test="criteria.valid">
<trim prefix="(" prefixOverrides="and" suffix=")">
<foreach collection="criteria.criteria" item="criterion">
<choose>
<when test="criterion.noValue">
and ${criterion.condition}
</when>
<when test="criterion.singleValue">
and ${criterion.condition} #{criterion.value}
</when>
<when test="criterion.betweenValue">
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
</when>
<when test="criterion.listValue">
and ${criterion.condition}
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
#{listItem}
</foreach>
</when>
</choose>
</foreach>
</trim>
</if>
</foreach>
</where>
</sql>
<sql id="Update_By_Example_Where_Clause">
<where>
<foreach collection="example.oredCriteria" item="criteria" separator="or">
<if test="criteria.valid">
<trim prefix="(" prefixOverrides="and" suffix=")">
<foreach collection="criteria.criteria" item="criterion">
<choose>
<when test="criterion.noValue">
and ${criterion.condition}
</when>
<when test="criterion.singleValue">
and ${criterion.condition} #{criterion.value}
</when>
<when test="criterion.betweenValue">
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
</when>
<when test="criterion.listValue">
and ${criterion.condition}
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
#{listItem}
</foreach>
</when>
</choose>
</foreach>
</trim>
</if>
</foreach>
</where>
</sql>
<sql id="Base_Column_List">
id, report_id, tenant_id, create_by, create_time, update_by, update_time, remark
</sql>
<select id="selectByExample" parameterType="com.acupuncture.system.domain.po.RmsReportManagementTenantExample" resultMap="BaseResultMap">
select
<if test="distinct">
distinct
</if>
<include refid="Base_Column_List" />
from rms_report_management_tenant
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
<if test="orderByClause != null">
order by ${orderByClause}
</if>
</select>
<select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from rms_report_management_tenant
where id = #{id,jdbcType=BIGINT}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
delete from rms_report_management_tenant
where id = #{id,jdbcType=BIGINT}
</delete>
<insert id="insert" parameterType="com.acupuncture.system.domain.po.RmsReportManagementTenant">
insert into rms_report_management_tenant (id, report_id, tenant_id,
create_by, create_time, update_by,
update_time, remark)
values (#{id,jdbcType=BIGINT}, #{reportId,jdbcType=BIGINT}, #{tenantId,jdbcType=BIGINT},
#{createBy,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP}, #{updateBy,jdbcType=VARCHAR},
#{updateTime,jdbcType=TIMESTAMP}, #{remark,jdbcType=VARCHAR})
</insert>
<insert id="insertSelective" parameterType="com.acupuncture.system.domain.po.RmsReportManagementTenant">
insert into rms_report_management_tenant
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="id != null">
id,
</if>
<if test="reportId != null">
report_id,
</if>
<if test="tenantId != null">
tenant_id,
</if>
<if test="createBy != null">
create_by,
</if>
<if test="createTime != null">
create_time,
</if>
<if test="updateBy != null">
update_by,
</if>
<if test="updateTime != null">
update_time,
</if>
<if test="remark != null">
remark,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="id != null">
#{id,jdbcType=BIGINT},
</if>
<if test="reportId != null">
#{reportId,jdbcType=BIGINT},
</if>
<if test="tenantId != null">
#{tenantId,jdbcType=BIGINT},
</if>
<if test="createBy != null">
#{createBy,jdbcType=VARCHAR},
</if>
<if test="createTime != null">
#{createTime,jdbcType=TIMESTAMP},
</if>
<if test="updateBy != null">
#{updateBy,jdbcType=VARCHAR},
</if>
<if test="updateTime != null">
#{updateTime,jdbcType=TIMESTAMP},
</if>
<if test="remark != null">
#{remark,jdbcType=VARCHAR},
</if>
</trim>
</insert>
<select id="countByExample" parameterType="com.acupuncture.system.domain.po.RmsReportManagementTenantExample" resultType="java.lang.Long">
select count(*) from rms_report_management_tenant
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
</select>
<update id="updateByExampleSelective" parameterType="map">
update rms_report_management_tenant
<set>
<if test="record.id != null">
id = #{record.id,jdbcType=BIGINT},
</if>
<if test="record.reportId != null">
report_id = #{record.reportId,jdbcType=BIGINT},
</if>
<if test="record.tenantId != null">
tenant_id = #{record.tenantId,jdbcType=BIGINT},
</if>
<if test="record.createBy != null">
create_by = #{record.createBy,jdbcType=VARCHAR},
</if>
<if test="record.createTime != null">
create_time = #{record.createTime,jdbcType=TIMESTAMP},
</if>
<if test="record.updateBy != null">
update_by = #{record.updateBy,jdbcType=VARCHAR},
</if>
<if test="record.updateTime != null">
update_time = #{record.updateTime,jdbcType=TIMESTAMP},
</if>
<if test="record.remark != null">
remark = #{record.remark,jdbcType=VARCHAR},
</if>
</set>
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByExample" parameterType="map">
update rms_report_management_tenant
set id = #{record.id,jdbcType=BIGINT},
report_id = #{record.reportId,jdbcType=BIGINT},
tenant_id = #{record.tenantId,jdbcType=BIGINT},
create_by = #{record.createBy,jdbcType=VARCHAR},
create_time = #{record.createTime,jdbcType=TIMESTAMP},
update_by = #{record.updateBy,jdbcType=VARCHAR},
update_time = #{record.updateTime,jdbcType=TIMESTAMP},
remark = #{record.remark,jdbcType=VARCHAR}
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByPrimaryKeySelective" parameterType="com.acupuncture.system.domain.po.RmsReportManagementTenant">
update rms_report_management_tenant
<set>
<if test="reportId != null">
report_id = #{reportId,jdbcType=BIGINT},
</if>
<if test="tenantId != null">
tenant_id = #{tenantId,jdbcType=BIGINT},
</if>
<if test="createBy != null">
create_by = #{createBy,jdbcType=VARCHAR},
</if>
<if test="createTime != null">
create_time = #{createTime,jdbcType=TIMESTAMP},
</if>
<if test="updateBy != null">
update_by = #{updateBy,jdbcType=VARCHAR},
</if>
<if test="updateTime != null">
update_time = #{updateTime,jdbcType=TIMESTAMP},
</if>
<if test="remark != null">
remark = #{remark,jdbcType=VARCHAR},
</if>
</set>
where id = #{id,jdbcType=BIGINT}
</update>
<update id="updateByPrimaryKey" parameterType="com.acupuncture.system.domain.po.RmsReportManagementTenant">
update rms_report_management_tenant
set report_id = #{reportId,jdbcType=BIGINT},
tenant_id = #{tenantId,jdbcType=BIGINT},
create_by = #{createBy,jdbcType=VARCHAR},
create_time = #{createTime,jdbcType=TIMESTAMP},
update_by = #{updateBy,jdbcType=VARCHAR},
update_time = #{updateTime,jdbcType=TIMESTAMP},
remark = #{remark,jdbcType=VARCHAR}
where id = #{id,jdbcType=BIGINT}
</update>
</mapper>

28
acupuncture-system/src/main/resources/mapper/system/RmsReportTypeMapper.xml

@ -10,6 +10,7 @@
<result column="update_by" jdbcType="VARCHAR" property="updateBy" /> <result column="update_by" jdbcType="VARCHAR" property="updateBy" />
<result column="update_time" jdbcType="TIMESTAMP" property="updateTime" /> <result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
<result column="remark" jdbcType="VARCHAR" property="remark" /> <result column="remark" jdbcType="VARCHAR" property="remark" />
<result column="file" jdbcType="VARCHAR" property="file" />
</resultMap> </resultMap>
<sql id="Example_Where_Clause"> <sql id="Example_Where_Clause">
<where> <where>
@ -70,7 +71,8 @@
</where> </where>
</sql> </sql>
<sql id="Base_Column_List"> <sql id="Base_Column_List">
id, type_name, del_flag, create_by, create_time, update_by, update_time, remark id, type_name, del_flag, create_by, create_time, update_by, update_time, remark,
file
</sql> </sql>
<select id="selectByExample" parameterType="com.acupuncture.system.domain.po.RmsReportTypeExample" resultMap="BaseResultMap"> <select id="selectByExample" parameterType="com.acupuncture.system.domain.po.RmsReportTypeExample" resultMap="BaseResultMap">
select select
@ -99,10 +101,12 @@
<insert id="insert" parameterType="com.acupuncture.system.domain.po.RmsReportType"> <insert id="insert" parameterType="com.acupuncture.system.domain.po.RmsReportType">
insert into rms_report_type (id, type_name, del_flag, insert into rms_report_type (id, type_name, del_flag,
create_by, create_time, update_by, create_by, create_time, update_by,
update_time, remark) update_time, remark, file
)
values (#{id,jdbcType=BIGINT}, #{typeName,jdbcType=VARCHAR}, #{delFlag,jdbcType=TINYINT}, values (#{id,jdbcType=BIGINT}, #{typeName,jdbcType=VARCHAR}, #{delFlag,jdbcType=TINYINT},
#{createBy,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP}, #{updateBy,jdbcType=VARCHAR}, #{createBy,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP}, #{updateBy,jdbcType=VARCHAR},
#{updateTime,jdbcType=TIMESTAMP}, #{remark,jdbcType=VARCHAR}) #{updateTime,jdbcType=TIMESTAMP}, #{remark,jdbcType=VARCHAR}, #{file,jdbcType=VARCHAR}
)
</insert> </insert>
<insert id="insertSelective" parameterType="com.acupuncture.system.domain.po.RmsReportType"> <insert id="insertSelective" parameterType="com.acupuncture.system.domain.po.RmsReportType">
insert into rms_report_type insert into rms_report_type
@ -131,6 +135,9 @@
<if test="remark != null"> <if test="remark != null">
remark, remark,
</if> </if>
<if test="file != null">
file,
</if>
</trim> </trim>
<trim prefix="values (" suffix=")" suffixOverrides=","> <trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="id != null"> <if test="id != null">
@ -157,6 +164,9 @@
<if test="remark != null"> <if test="remark != null">
#{remark,jdbcType=VARCHAR}, #{remark,jdbcType=VARCHAR},
</if> </if>
<if test="file != null">
#{file,jdbcType=VARCHAR},
</if>
</trim> </trim>
</insert> </insert>
<select id="countByExample" parameterType="com.acupuncture.system.domain.po.RmsReportTypeExample" resultType="java.lang.Long"> <select id="countByExample" parameterType="com.acupuncture.system.domain.po.RmsReportTypeExample" resultType="java.lang.Long">
@ -192,6 +202,9 @@
<if test="record.remark != null"> <if test="record.remark != null">
remark = #{record.remark,jdbcType=VARCHAR}, remark = #{record.remark,jdbcType=VARCHAR},
</if> </if>
<if test="record.file != null">
file = #{record.file,jdbcType=VARCHAR},
</if>
</set> </set>
<if test="_parameter != null"> <if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" /> <include refid="Update_By_Example_Where_Clause" />
@ -206,7 +219,8 @@
create_time = #{record.createTime,jdbcType=TIMESTAMP}, create_time = #{record.createTime,jdbcType=TIMESTAMP},
update_by = #{record.updateBy,jdbcType=VARCHAR}, update_by = #{record.updateBy,jdbcType=VARCHAR},
update_time = #{record.updateTime,jdbcType=TIMESTAMP}, update_time = #{record.updateTime,jdbcType=TIMESTAMP},
remark = #{record.remark,jdbcType=VARCHAR} remark = #{record.remark,jdbcType=VARCHAR},
file = #{record.file,jdbcType=VARCHAR}
<if test="_parameter != null"> <if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" /> <include refid="Update_By_Example_Where_Clause" />
</if> </if>
@ -235,6 +249,9 @@
<if test="remark != null"> <if test="remark != null">
remark = #{remark,jdbcType=VARCHAR}, remark = #{remark,jdbcType=VARCHAR},
</if> </if>
<if test="file != null">
file = #{file,jdbcType=VARCHAR},
</if>
</set> </set>
where id = #{id,jdbcType=BIGINT} where id = #{id,jdbcType=BIGINT}
</update> </update>
@ -246,7 +263,8 @@
create_time = #{createTime,jdbcType=TIMESTAMP}, create_time = #{createTime,jdbcType=TIMESTAMP},
update_by = #{updateBy,jdbcType=VARCHAR}, update_by = #{updateBy,jdbcType=VARCHAR},
update_time = #{updateTime,jdbcType=TIMESTAMP}, update_time = #{updateTime,jdbcType=TIMESTAMP},
remark = #{remark,jdbcType=VARCHAR} remark = #{remark,jdbcType=VARCHAR},
file = #{file,jdbcType=VARCHAR}
where id = #{id,jdbcType=BIGINT} where id = #{id,jdbcType=BIGINT}
</update> </update>
</mapper> </mapper>

252
acupuncture-system/src/main/resources/mapper/system/RmsReportTypeTenantMapper.xml

@ -0,0 +1,252 @@
<?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.acupuncture.system.persist.mapper.RmsReportTypeTenantMapper">
<resultMap id="BaseResultMap" type="com.acupuncture.system.domain.po.RmsReportTypeTenant">
<id column="id" jdbcType="BIGINT" property="id" />
<result column="report_type_id" jdbcType="BIGINT" property="reportTypeId" />
<result column="tenant_id" jdbcType="BIGINT" property="tenantId" />
<result column="create_by" jdbcType="VARCHAR" property="createBy" />
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
<result column="update_by" jdbcType="VARCHAR" property="updateBy" />
<result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
<result column="remark" jdbcType="VARCHAR" property="remark" />
</resultMap>
<sql id="Example_Where_Clause">
<where>
<foreach collection="oredCriteria" item="criteria" separator="or">
<if test="criteria.valid">
<trim prefix="(" prefixOverrides="and" suffix=")">
<foreach collection="criteria.criteria" item="criterion">
<choose>
<when test="criterion.noValue">
and ${criterion.condition}
</when>
<when test="criterion.singleValue">
and ${criterion.condition} #{criterion.value}
</when>
<when test="criterion.betweenValue">
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
</when>
<when test="criterion.listValue">
and ${criterion.condition}
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
#{listItem}
</foreach>
</when>
</choose>
</foreach>
</trim>
</if>
</foreach>
</where>
</sql>
<sql id="Update_By_Example_Where_Clause">
<where>
<foreach collection="example.oredCriteria" item="criteria" separator="or">
<if test="criteria.valid">
<trim prefix="(" prefixOverrides="and" suffix=")">
<foreach collection="criteria.criteria" item="criterion">
<choose>
<when test="criterion.noValue">
and ${criterion.condition}
</when>
<when test="criterion.singleValue">
and ${criterion.condition} #{criterion.value}
</when>
<when test="criterion.betweenValue">
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
</when>
<when test="criterion.listValue">
and ${criterion.condition}
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
#{listItem}
</foreach>
</when>
</choose>
</foreach>
</trim>
</if>
</foreach>
</where>
</sql>
<sql id="Base_Column_List">
id, report_type_id, tenant_id, create_by, create_time, update_by, update_time, remark
</sql>
<select id="selectByExample" parameterType="com.acupuncture.system.domain.po.RmsReportTypeTenantExample" resultMap="BaseResultMap">
select
<if test="distinct">
distinct
</if>
<include refid="Base_Column_List" />
from rms_report_type_tenant
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
<if test="orderByClause != null">
order by ${orderByClause}
</if>
</select>
<select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from rms_report_type_tenant
where id = #{id,jdbcType=BIGINT}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
delete from rms_report_type_tenant
where id = #{id,jdbcType=BIGINT}
</delete>
<insert id="insert" parameterType="com.acupuncture.system.domain.po.RmsReportTypeTenant">
insert into rms_report_type_tenant (id, report_type_id, tenant_id,
create_by, create_time, update_by,
update_time, remark)
values (#{id,jdbcType=BIGINT}, #{reportTypeId,jdbcType=BIGINT}, #{tenantId,jdbcType=BIGINT},
#{createBy,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP}, #{updateBy,jdbcType=VARCHAR},
#{updateTime,jdbcType=TIMESTAMP}, #{remark,jdbcType=VARCHAR})
</insert>
<insert id="insertSelective" parameterType="com.acupuncture.system.domain.po.RmsReportTypeTenant">
insert into rms_report_type_tenant
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="id != null">
id,
</if>
<if test="reportTypeId != null">
report_type_id,
</if>
<if test="tenantId != null">
tenant_id,
</if>
<if test="createBy != null">
create_by,
</if>
<if test="createTime != null">
create_time,
</if>
<if test="updateBy != null">
update_by,
</if>
<if test="updateTime != null">
update_time,
</if>
<if test="remark != null">
remark,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="id != null">
#{id,jdbcType=BIGINT},
</if>
<if test="reportTypeId != null">
#{reportTypeId,jdbcType=BIGINT},
</if>
<if test="tenantId != null">
#{tenantId,jdbcType=BIGINT},
</if>
<if test="createBy != null">
#{createBy,jdbcType=VARCHAR},
</if>
<if test="createTime != null">
#{createTime,jdbcType=TIMESTAMP},
</if>
<if test="updateBy != null">
#{updateBy,jdbcType=VARCHAR},
</if>
<if test="updateTime != null">
#{updateTime,jdbcType=TIMESTAMP},
</if>
<if test="remark != null">
#{remark,jdbcType=VARCHAR},
</if>
</trim>
</insert>
<select id="countByExample" parameterType="com.acupuncture.system.domain.po.RmsReportTypeTenantExample" resultType="java.lang.Long">
select count(*) from rms_report_type_tenant
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
</select>
<update id="updateByExampleSelective" parameterType="map">
update rms_report_type_tenant
<set>
<if test="record.id != null">
id = #{record.id,jdbcType=BIGINT},
</if>
<if test="record.reportTypeId != null">
report_type_id = #{record.reportTypeId,jdbcType=BIGINT},
</if>
<if test="record.tenantId != null">
tenant_id = #{record.tenantId,jdbcType=BIGINT},
</if>
<if test="record.createBy != null">
create_by = #{record.createBy,jdbcType=VARCHAR},
</if>
<if test="record.createTime != null">
create_time = #{record.createTime,jdbcType=TIMESTAMP},
</if>
<if test="record.updateBy != null">
update_by = #{record.updateBy,jdbcType=VARCHAR},
</if>
<if test="record.updateTime != null">
update_time = #{record.updateTime,jdbcType=TIMESTAMP},
</if>
<if test="record.remark != null">
remark = #{record.remark,jdbcType=VARCHAR},
</if>
</set>
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByExample" parameterType="map">
update rms_report_type_tenant
set id = #{record.id,jdbcType=BIGINT},
report_type_id = #{record.reportTypeId,jdbcType=BIGINT},
tenant_id = #{record.tenantId,jdbcType=BIGINT},
create_by = #{record.createBy,jdbcType=VARCHAR},
create_time = #{record.createTime,jdbcType=TIMESTAMP},
update_by = #{record.updateBy,jdbcType=VARCHAR},
update_time = #{record.updateTime,jdbcType=TIMESTAMP},
remark = #{record.remark,jdbcType=VARCHAR}
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByPrimaryKeySelective" parameterType="com.acupuncture.system.domain.po.RmsReportTypeTenant">
update rms_report_type_tenant
<set>
<if test="reportTypeId != null">
report_type_id = #{reportTypeId,jdbcType=BIGINT},
</if>
<if test="tenantId != null">
tenant_id = #{tenantId,jdbcType=BIGINT},
</if>
<if test="createBy != null">
create_by = #{createBy,jdbcType=VARCHAR},
</if>
<if test="createTime != null">
create_time = #{createTime,jdbcType=TIMESTAMP},
</if>
<if test="updateBy != null">
update_by = #{updateBy,jdbcType=VARCHAR},
</if>
<if test="updateTime != null">
update_time = #{updateTime,jdbcType=TIMESTAMP},
</if>
<if test="remark != null">
remark = #{remark,jdbcType=VARCHAR},
</if>
</set>
where id = #{id,jdbcType=BIGINT}
</update>
<update id="updateByPrimaryKey" parameterType="com.acupuncture.system.domain.po.RmsReportTypeTenant">
update rms_report_type_tenant
set report_type_id = #{reportTypeId,jdbcType=BIGINT},
tenant_id = #{tenantId,jdbcType=BIGINT},
create_by = #{createBy,jdbcType=VARCHAR},
create_time = #{createTime,jdbcType=TIMESTAMP},
update_by = #{updateBy,jdbcType=VARCHAR},
update_time = #{updateTime,jdbcType=TIMESTAMP},
remark = #{remark,jdbcType=VARCHAR}
where id = #{id,jdbcType=BIGINT}
</update>
</mapper>

22
acupuncture-system/src/main/resources/mapper/system/SysDictDataMapper.xml

@ -17,11 +17,16 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result property="createBy" column="create_by" /> <result property="createBy" column="create_by" />
<result property="createTime" column="create_time" /> <result property="createTime" column="create_time" />
<result property="updateBy" column="update_by" /> <result property="updateBy" column="update_by" />
<result property="dataType" column="data_type" />
<result property="dataLength" column="data_length" />
<result property="isRequired" column="is_required" />
<result property="isSole" column="is_sole" />
<result property="updateTime" column="update_time" /> <result property="updateTime" column="update_time" />
</resultMap> </resultMap>
<sql id="selectDictDataVo"> <sql id="selectDictDataVo">
select dict_code, dict_sort, dict_label, dict_value, dict_type, css_class, list_class, is_default, status, create_by, create_time, remark select dict_code, dict_sort, dict_label, dict_value, dict_type, css_class, list_class, is_default, status, create_by, create_time, remark ,
data_type, data_length, is_required, is_sole
from sys_dict_data from sys_dict_data
</sql> </sql>
@ -84,6 +89,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="status != null">status = #{status},</if> <if test="status != null">status = #{status},</if>
<if test="remark != null">remark = #{remark},</if> <if test="remark != null">remark = #{remark},</if>
<if test="updateBy != null and updateBy != ''">update_by = #{updateBy},</if> <if test="updateBy != null and updateBy != ''">update_by = #{updateBy},</if>
<if test="dataType != null and dataType != ''">data_type = #{dataType} ,</if>
<if test="dataLength != null and dataLength != ''">data_length = #{dataLength} ,</if>
<if test="isRequired != null">is_required = #{isRequired} ,</if>
<if test="isSole != null">is_sole = #{isSole} ,</if>
update_time = sysdate() update_time = sysdate()
</set> </set>
where dict_code = #{dictCode} where dict_code = #{dictCode}
@ -105,6 +115,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="status != null">status,</if> <if test="status != null">status,</if>
<if test="remark != null and remark != ''">remark,</if> <if test="remark != null and remark != ''">remark,</if>
<if test="createBy != null and createBy != ''">create_by,</if> <if test="createBy != null and createBy != ''">create_by,</if>
<if test="dataType != null and dataType != ''">data_type,</if>
<if test="dataLength != null and dataLength != ''">data_length,</if>
<if test="isRequired != null">is_required,</if>
<if test="isSole != null">is_sole,</if>
create_time create_time
)values( )values(
<if test="dictSort != null">#{dictSort},</if> <if test="dictSort != null">#{dictSort},</if>
@ -117,6 +132,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="status != null">#{status},</if> <if test="status != null">#{status},</if>
<if test="remark != null and remark != ''">#{remark},</if> <if test="remark != null and remark != ''">#{remark},</if>
<if test="createBy != null and createBy != ''">#{createBy},</if> <if test="createBy != null and createBy != ''">#{createBy},</if>
<if test="dataType != null and dataType != ''">#{dataType},</if>
<if test="dataLength != null and dataLength != ''">#{dataLength},</if>
<if test="isRequired != null">#{isRequired},</if>
<if test="isSole != null">#{isSole},</if>
sysdate() sysdate()
) )
</insert> </insert>

9
acupuncture-system/src/main/resources/mapper/system/SysMenuMapper.xml

@ -26,10 +26,11 @@
<result property="updateTime" column="update_time" /> <result property="updateTime" column="update_time" />
<result property="updateBy" column="update_by" /> <result property="updateBy" column="update_by" />
<result property="remark" column="remark" /> <result property="remark" column="remark" />
<result property="clientType" column="client_type" />
</resultMap> </resultMap>
<sql id="selectMenuVo"> <sql id="selectMenuVo">
select menu_id, menu_name, parent_id, order_num, path, component, `query`, route_name, is_frame, is_cache, menu_type, visible, status, ifnull(perms,'') as perms, icon, create_time select menu_id, menu_name, parent_id, order_num, path, component, `query`, route_name, is_frame, is_cache, menu_type, visible, status, ifnull(perms,'') as perms, icon, create_time , client_type
from sys_menu from sys_menu
</sql> </sql>
@ -45,6 +46,9 @@
<if test="status != null and status != ''"> <if test="status != null and status != ''">
AND status = #{status} AND status = #{status}
</if> </if>
<if test="clientType != null">
AND client_type = #{clientType}
</if>
</where> </where>
order by parent_id, order_num order by parent_id, order_num
</select> </select>
@ -152,6 +156,7 @@
<if test="icon !=null and icon != ''">icon = #{icon},</if> <if test="icon !=null and icon != ''">icon = #{icon},</if>
<if test="remark != null and remark != ''">remark = #{remark},</if> <if test="remark != null and remark != ''">remark = #{remark},</if>
<if test="updateBy != null and updateBy != ''">update_by = #{updateBy},</if> <if test="updateBy != null and updateBy != ''">update_by = #{updateBy},</if>
<if test="clientType != null">client_type = #{clientType},</if>
update_time = sysdate() update_time = sysdate()
</set> </set>
where menu_id = #{menuId} where menu_id = #{menuId}
@ -176,6 +181,7 @@
<if test="icon != null and icon != ''">icon,</if> <if test="icon != null and icon != ''">icon,</if>
<if test="remark != null and remark != ''">remark,</if> <if test="remark != null and remark != ''">remark,</if>
<if test="createBy != null and createBy != ''">create_by,</if> <if test="createBy != null and createBy != ''">create_by,</if>
<if test="clientType != null">client_type,</if>
create_time create_time
)values( )values(
<if test="menuId != null and menuId != 0">#{menuId},</if> <if test="menuId != null and menuId != 0">#{menuId},</if>
@ -195,6 +201,7 @@
<if test="icon != null and icon != ''">#{icon},</if> <if test="icon != null and icon != ''">#{icon},</if>
<if test="remark != null and remark != ''">#{remark},</if> <if test="remark != null and remark != ''">#{remark},</if>
<if test="createBy != null and createBy != ''">#{createBy},</if> <if test="createBy != null and createBy != ''">#{createBy},</if>
<if test="clientType != null">#{clientType},</if>
sysdate() sysdate()
) )
</insert> </insert>

41
acupuncture-system/src/main/resources/mapper/system/SysNoticeMapper.xml

@ -30,19 +30,33 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<select id="selectNoticeList" parameterType="SysNotice" resultMap="SysNoticeResult"> <select id="selectNoticeList" parameterType="SysNotice" resultMap="SysNoticeResult">
<include refid="selectNoticeVo"/> <include refid="selectNoticeVo"/>
<where> <where>
<if test="noticeTitle != null and noticeTitle != ''"> <if test="notice.noticeTitle != null and notice.noticeTitle != ''">
AND notice_title like concat('%', #{noticeTitle}, '%') AND notice_title like concat('%', #{notice.noticeTitle}, '%')
</if> </if>
<if test="noticeType != null and noticeType != ''"> <if test="notice.noticeType != null and notice.noticeType != ''">
AND notice_type = #{noticeType} AND notice_type = #{notice.noticeType}
</if> </if>
<if test="createBy != null and createBy != ''"> <if test="notice.createBy != null and notice.createBy != ''">
AND create_by like concat('%', #{createBy}, '%') AND create_by like concat('%', #{notice.createBy}, '%')
</if> </if>
</where> <if test="userId != null and userId != 1">
<if test="notice.noticeIdList != null and notice.noticeIdList.size() > 0">
and ((notice_id in
<foreach collection="notice.noticeIdList" item="noticeId" open="(" separator="," close=")">
#{noticeId}
</foreach>
)
or is_all = 1
)
</if>
<if test="notice.noticeIdList == null or notice.noticeIdList.size() == 0">
and is_all = 1
</if>
</if>
</where>
</select> </select>
<insert id="insertNotice" parameterType="SysNotice"> <insert id="insertNotice" parameterType="SysNotice" useGeneratedKeys="true" keyProperty="noticeId">
insert into sys_notice ( insert into sys_notice (
<if test="noticeTitle != null and noticeTitle != '' ">notice_title, </if> <if test="noticeTitle != null and noticeTitle != '' ">notice_title, </if>
<if test="noticeType != null and noticeType != '' ">notice_type, </if> <if test="noticeType != null and noticeType != '' ">notice_type, </if>
@ -50,6 +64,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="status != null and status != '' ">status, </if> <if test="status != null and status != '' ">status, </if>
<if test="remark != null and remark != ''">remark,</if> <if test="remark != null and remark != ''">remark,</if>
<if test="createBy != null and createBy != ''">create_by,</if> <if test="createBy != null and createBy != ''">create_by,</if>
<if test="isAll != null">is_all,</if>
create_time create_time
)values( )values(
<if test="noticeTitle != null and noticeTitle != ''">#{noticeTitle}, </if> <if test="noticeTitle != null and noticeTitle != ''">#{noticeTitle}, </if>
@ -58,6 +73,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="status != null and status != ''">#{status}, </if> <if test="status != null and status != ''">#{status}, </if>
<if test="remark != null and remark != ''">#{remark},</if> <if test="remark != null and remark != ''">#{remark},</if>
<if test="createBy != null and createBy != ''">#{createBy},</if> <if test="createBy != null and createBy != ''">#{createBy},</if>
<if test="isAll != null">#{isAll},</if>
sysdate() sysdate()
) )
</insert> </insert>
@ -70,7 +86,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="noticeContent != null">notice_content = #{noticeContent}, </if> <if test="noticeContent != null">notice_content = #{noticeContent}, </if>
<if test="status != null and status != ''">status = #{status}, </if> <if test="status != null and status != ''">status = #{status}, </if>
<if test="updateBy != null and updateBy != ''">update_by = #{updateBy},</if> <if test="updateBy != null and updateBy != ''">update_by = #{updateBy},</if>
update_time = sysdate() <if test="isAll != null">is_all = #{isAll},</if>
update_time = sysdate()
</set> </set>
where notice_id = #{noticeId} where notice_id = #{noticeId}
</update> </update>

252
acupuncture-system/src/main/resources/mapper/system/SysNoticeUserMapper.xml

@ -0,0 +1,252 @@
<?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.acupuncture.system.persist.mapper.SysNoticeUserMapper">
<resultMap id="BaseResultMap" type="com.acupuncture.system.domain.po.SysNoticeUser">
<id column="id" jdbcType="BIGINT" property="id" />
<result column="notice_id" jdbcType="BIGINT" property="noticeId" />
<result column="user_id" jdbcType="BIGINT" property="userId" />
<result column="create_by" jdbcType="VARCHAR" property="createBy" />
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
<result column="update_by" jdbcType="VARCHAR" property="updateBy" />
<result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
<result column="remark" jdbcType="VARCHAR" property="remark" />
</resultMap>
<sql id="Example_Where_Clause">
<where>
<foreach collection="oredCriteria" item="criteria" separator="or">
<if test="criteria.valid">
<trim prefix="(" prefixOverrides="and" suffix=")">
<foreach collection="criteria.criteria" item="criterion">
<choose>
<when test="criterion.noValue">
and ${criterion.condition}
</when>
<when test="criterion.singleValue">
and ${criterion.condition} #{criterion.value}
</when>
<when test="criterion.betweenValue">
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
</when>
<when test="criterion.listValue">
and ${criterion.condition}
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
#{listItem}
</foreach>
</when>
</choose>
</foreach>
</trim>
</if>
</foreach>
</where>
</sql>
<sql id="Update_By_Example_Where_Clause">
<where>
<foreach collection="example.oredCriteria" item="criteria" separator="or">
<if test="criteria.valid">
<trim prefix="(" prefixOverrides="and" suffix=")">
<foreach collection="criteria.criteria" item="criterion">
<choose>
<when test="criterion.noValue">
and ${criterion.condition}
</when>
<when test="criterion.singleValue">
and ${criterion.condition} #{criterion.value}
</when>
<when test="criterion.betweenValue">
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
</when>
<when test="criterion.listValue">
and ${criterion.condition}
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
#{listItem}
</foreach>
</when>
</choose>
</foreach>
</trim>
</if>
</foreach>
</where>
</sql>
<sql id="Base_Column_List">
id, notice_id, user_id, create_by, create_time, update_by, update_time, remark
</sql>
<select id="selectByExample" parameterType="com.acupuncture.system.domain.po.SysNoticeUserExample" resultMap="BaseResultMap">
select
<if test="distinct">
distinct
</if>
<include refid="Base_Column_List" />
from sys_notice_user
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
<if test="orderByClause != null">
order by ${orderByClause}
</if>
</select>
<select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from sys_notice_user
where id = #{id,jdbcType=BIGINT}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
delete from sys_notice_user
where id = #{id,jdbcType=BIGINT}
</delete>
<insert id="insert" parameterType="com.acupuncture.system.domain.po.SysNoticeUser">
insert into sys_notice_user (id, notice_id, user_id,
create_by, create_time, update_by,
update_time, remark)
values (#{id,jdbcType=BIGINT}, #{noticeId,jdbcType=BIGINT}, #{userId,jdbcType=BIGINT},
#{createBy,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP}, #{updateBy,jdbcType=VARCHAR},
#{updateTime,jdbcType=TIMESTAMP}, #{remark,jdbcType=VARCHAR})
</insert>
<insert id="insertSelective" parameterType="com.acupuncture.system.domain.po.SysNoticeUser">
insert into sys_notice_user
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="id != null">
id,
</if>
<if test="noticeId != null">
notice_id,
</if>
<if test="userId != null">
user_id,
</if>
<if test="createBy != null">
create_by,
</if>
<if test="createTime != null">
create_time,
</if>
<if test="updateBy != null">
update_by,
</if>
<if test="updateTime != null">
update_time,
</if>
<if test="remark != null">
remark,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="id != null">
#{id,jdbcType=BIGINT},
</if>
<if test="noticeId != null">
#{noticeId,jdbcType=BIGINT},
</if>
<if test="userId != null">
#{userId,jdbcType=BIGINT},
</if>
<if test="createBy != null">
#{createBy,jdbcType=VARCHAR},
</if>
<if test="createTime != null">
#{createTime,jdbcType=TIMESTAMP},
</if>
<if test="updateBy != null">
#{updateBy,jdbcType=VARCHAR},
</if>
<if test="updateTime != null">
#{updateTime,jdbcType=TIMESTAMP},
</if>
<if test="remark != null">
#{remark,jdbcType=VARCHAR},
</if>
</trim>
</insert>
<select id="countByExample" parameterType="com.acupuncture.system.domain.po.SysNoticeUserExample" resultType="java.lang.Long">
select count(*) from sys_notice_user
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
</select>
<update id="updateByExampleSelective" parameterType="map">
update sys_notice_user
<set>
<if test="record.id != null">
id = #{record.id,jdbcType=BIGINT},
</if>
<if test="record.noticeId != null">
notice_id = #{record.noticeId,jdbcType=BIGINT},
</if>
<if test="record.userId != null">
user_id = #{record.userId,jdbcType=BIGINT},
</if>
<if test="record.createBy != null">
create_by = #{record.createBy,jdbcType=VARCHAR},
</if>
<if test="record.createTime != null">
create_time = #{record.createTime,jdbcType=TIMESTAMP},
</if>
<if test="record.updateBy != null">
update_by = #{record.updateBy,jdbcType=VARCHAR},
</if>
<if test="record.updateTime != null">
update_time = #{record.updateTime,jdbcType=TIMESTAMP},
</if>
<if test="record.remark != null">
remark = #{record.remark,jdbcType=VARCHAR},
</if>
</set>
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByExample" parameterType="map">
update sys_notice_user
set id = #{record.id,jdbcType=BIGINT},
notice_id = #{record.noticeId,jdbcType=BIGINT},
user_id = #{record.userId,jdbcType=BIGINT},
create_by = #{record.createBy,jdbcType=VARCHAR},
create_time = #{record.createTime,jdbcType=TIMESTAMP},
update_by = #{record.updateBy,jdbcType=VARCHAR},
update_time = #{record.updateTime,jdbcType=TIMESTAMP},
remark = #{record.remark,jdbcType=VARCHAR}
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByPrimaryKeySelective" parameterType="com.acupuncture.system.domain.po.SysNoticeUser">
update sys_notice_user
<set>
<if test="noticeId != null">
notice_id = #{noticeId,jdbcType=BIGINT},
</if>
<if test="userId != null">
user_id = #{userId,jdbcType=BIGINT},
</if>
<if test="createBy != null">
create_by = #{createBy,jdbcType=VARCHAR},
</if>
<if test="createTime != null">
create_time = #{createTime,jdbcType=TIMESTAMP},
</if>
<if test="updateBy != null">
update_by = #{updateBy,jdbcType=VARCHAR},
</if>
<if test="updateTime != null">
update_time = #{updateTime,jdbcType=TIMESTAMP},
</if>
<if test="remark != null">
remark = #{remark,jdbcType=VARCHAR},
</if>
</set>
where id = #{id,jdbcType=BIGINT}
</update>
<update id="updateByPrimaryKey" parameterType="com.acupuncture.system.domain.po.SysNoticeUser">
update sys_notice_user
set notice_id = #{noticeId,jdbcType=BIGINT},
user_id = #{userId,jdbcType=BIGINT},
create_by = #{createBy,jdbcType=VARCHAR},
create_time = #{createTime,jdbcType=TIMESTAMP},
update_by = #{updateBy,jdbcType=VARCHAR},
update_time = #{updateTime,jdbcType=TIMESTAMP},
remark = #{remark,jdbcType=VARCHAR}
where id = #{id,jdbcType=BIGINT}
</update>
</mapper>

9
acupuncture-system/src/main/resources/mapper/system/SysRoleMapper.xml

@ -19,11 +19,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result property="updateBy" column="update_by" /> <result property="updateBy" column="update_by" />
<result property="updateTime" column="update_time" /> <result property="updateTime" column="update_time" />
<result property="remark" column="remark" /> <result property="remark" column="remark" />
<result property="clientType" column="client_type" />
</resultMap> </resultMap>
<sql id="selectRoleVo"> <sql id="selectRoleVo">
select distinct r.role_id, r.role_name, r.role_key, r.role_sort, r.data_scope, r.menu_check_strictly, r.dept_check_strictly, select distinct r.role_id, r.role_name, r.role_key, r.role_sort, r.data_scope, r.menu_check_strictly, r.dept_check_strictly,
r.status, r.del_flag, r.create_time, r.remark r.status, r.del_flag, r.create_time, r.remark , r.client_type
from sys_role r from sys_role r
left join sys_user_role ur on ur.role_id = r.role_id left join sys_user_role ur on ur.role_id = r.role_id
left join sys_user u on u.user_id = ur.user_id left join sys_user u on u.user_id = ur.user_id
@ -51,6 +52,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="params.endTime != null and params.endTime != ''"><!-- 结束时间检索 --> <if test="params.endTime != null and params.endTime != ''"><!-- 结束时间检索 -->
and date_format(r.create_time,'%Y%m%d') &lt;= date_format(#{params.endTime},'%Y%m%d') and date_format(r.create_time,'%Y%m%d') &lt;= date_format(#{params.endTime},'%Y%m%d')
</if> </if>
<if test="clientType != null">
AND r.client_type = #{clientType}
</if>
<!-- 数据范围过滤 --> <!-- 数据范围过滤 -->
${params.dataScope} ${params.dataScope}
order by r.role_sort order by r.role_sort
@ -105,6 +109,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="status != null and status != ''">status,</if> <if test="status != null and status != ''">status,</if>
<if test="remark != null and remark != ''">remark,</if> <if test="remark != null and remark != ''">remark,</if>
<if test="createBy != null and createBy != ''">create_by,</if> <if test="createBy != null and createBy != ''">create_by,</if>
<if test="clientType != null">client_type,</if>
create_time create_time
)values( )values(
<if test="roleId != null and roleId != 0">#{roleId},</if> <if test="roleId != null and roleId != 0">#{roleId},</if>
@ -117,6 +122,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="status != null and status != ''">#{status},</if> <if test="status != null and status != ''">#{status},</if>
<if test="remark != null and remark != ''">#{remark},</if> <if test="remark != null and remark != ''">#{remark},</if>
<if test="createBy != null and createBy != ''">#{createBy},</if> <if test="createBy != null and createBy != ''">#{createBy},</if>
<if test="clientType != null">#{clientType},</if>
sysdate() sysdate()
) )
</insert> </insert>
@ -133,6 +139,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="status != null and status != ''">status = #{status},</if> <if test="status != null and status != ''">status = #{status},</if>
<if test="remark != null">remark = #{remark},</if> <if test="remark != null">remark = #{remark},</if>
<if test="updateBy != null and updateBy != ''">update_by = #{updateBy},</if> <if test="updateBy != null and updateBy != ''">update_by = #{updateBy},</if>
<if test="clientType != null">client_type = #{clientType},</if>
update_time = sysdate() update_time = sysdate()
</set> </set>
where role_id = #{roleId} where role_id = #{roleId}

Loading…
Cancel
Save