update===>:医生排班接口。

This commit is contained in:
haown 2023-09-26 14:27:40 +08:00
parent e9e3397c51
commit e01e61954c
28 changed files with 403 additions and 54 deletions

View File

@ -37,6 +37,13 @@
<version>1.6.2</version> <version>1.6.2</version>
</dependency> </dependency>
<!-- Swagger3增强插件 knife4j -->
<dependency>
<groupId>com.github.xiaoymin</groupId>
<artifactId>knife4j-spring-boot-starter</artifactId>
<version>3.0.3</version>
</dependency>
<!-- Mysql驱动包 --> <!-- Mysql驱动包 -->
<dependency> <dependency>
<groupId>mysql</groupId> <groupId>mysql</groupId>

View File

@ -1,8 +1,11 @@
package com.xinelu.web.core.config; package com.xinelu.web.core.config;
import com.github.xiaoymin.knife4j.spring.annotations.EnableKnife4j;
import com.xinelu.common.config.XinELuConfig; import com.xinelu.common.config.XinELuConfig;
import io.swagger.annotations.ApiOperation; import io.swagger.annotations.ApiOperation;
import io.swagger.models.auth.In; import io.swagger.models.auth.In;
import java.util.ArrayList;
import java.util.List;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value; import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Bean;
@ -10,13 +13,16 @@ import org.springframework.context.annotation.Configuration;
import springfox.documentation.builders.ApiInfoBuilder; import springfox.documentation.builders.ApiInfoBuilder;
import springfox.documentation.builders.PathSelectors; import springfox.documentation.builders.PathSelectors;
import springfox.documentation.builders.RequestHandlerSelectors; import springfox.documentation.builders.RequestHandlerSelectors;
import springfox.documentation.service.*; import springfox.documentation.service.ApiInfo;
import springfox.documentation.service.ApiKey;
import springfox.documentation.service.AuthorizationScope;
import springfox.documentation.service.Contact;
import springfox.documentation.service.SecurityReference;
import springfox.documentation.service.SecurityScheme;
import springfox.documentation.spi.DocumentationType; import springfox.documentation.spi.DocumentationType;
import springfox.documentation.spi.service.contexts.SecurityContext; import springfox.documentation.spi.service.contexts.SecurityContext;
import springfox.documentation.spring.web.plugins.Docket; import springfox.documentation.spring.web.plugins.Docket;
import springfox.documentation.swagger2.annotations.EnableSwagger2;
import java.util.ArrayList;
import java.util.List;
/** /**
* Swagger2的接口配置 * Swagger2的接口配置
@ -24,6 +30,8 @@ import java.util.List;
* @author xinelu * @author xinelu
*/ */
@Configuration @Configuration
@EnableKnife4j
@EnableSwagger2
public class SwaggerConfig { public class SwaggerConfig {
/** /**
* 系统基础配置 * 系统基础配置

View File

@ -11,6 +11,8 @@ import com.xinelu.common.utils.poi.ExcelUtil;
import com.xinelu.manage.dto.hospitaldepartmentinfo.HospitalDepartmentDTO; import com.xinelu.manage.dto.hospitaldepartmentinfo.HospitalDepartmentDTO;
import com.xinelu.manage.domain.hospitaldepartmentinfo.HospitalDepartmentInfo; import com.xinelu.manage.domain.hospitaldepartmentinfo.HospitalDepartmentInfo;
import com.xinelu.manage.service.hospitaldepartmentinfo.IHospitalDepartmentInfoService; import com.xinelu.manage.service.hospitaldepartmentinfo.IHospitalDepartmentInfoService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import java.util.List; import java.util.List;
import javax.annotation.Resource; import javax.annotation.Resource;
import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpServletResponse;
@ -30,6 +32,7 @@ import org.springframework.web.bind.annotation.RestController;
* @author zh * @author zh
* @date 2023-02-13 * @date 2023-02-13
*/ */
@Api(tags = "科室信息管理控制器")
@RestController @RestController
@RequestMapping("/system/hospitalDepartment") @RequestMapping("/system/hospitalDepartment")
public class HospitalDepartmentInfoController extends BaseController { public class HospitalDepartmentInfoController extends BaseController {
@ -37,8 +40,9 @@ public class HospitalDepartmentInfoController extends BaseController {
private IHospitalDepartmentInfoService hospitalDepartmentInfoService; private IHospitalDepartmentInfoService hospitalDepartmentInfoService;
/** /**
* 查询科室信息管理列表 * 查询科室信息管理分页列表
*/ */
@ApiOperation("查询科室信息管理分页列表")
@PreAuthorize("@ss.hasPermi('system:hospitalDepartment:list')") @PreAuthorize("@ss.hasPermi('system:hospitalDepartment:list')")
@GetMapping("/list") @GetMapping("/list")
public TableDataInfo list(HospitalDepartmentInfo hospitalDepartmentInfo) { public TableDataInfo list(HospitalDepartmentInfo hospitalDepartmentInfo) {
@ -47,9 +51,21 @@ public class HospitalDepartmentInfoController extends BaseController {
return getDataTable(list); return getDataTable(list);
} }
/**
* 查询科室信息管理列表
*/
@ApiOperation("查询科室信息管理列表")
@PreAuthorize("@ss.hasPermi('system:hospitalDepartment:list')")
@GetMapping("/getList")
public AjaxResult getList(HospitalDepartmentInfo hospitalDepartmentInfo) {
List<HospitalDepartmentInfo> list = hospitalDepartmentInfoService.selectHospitalDepartmentInfoList(hospitalDepartmentInfo);
return AjaxResult.success(list);
}
/** /**
* 导出科室信息管理列表 * 导出科室信息管理列表
*/ */
@ApiOperation("导出科室信息管理列表")
@PreAuthorize("@ss.hasPermi('system:hospitalDepartment:export')") @PreAuthorize("@ss.hasPermi('system:hospitalDepartment:export')")
@Log(title = "科室信息管理", businessType = BusinessType.EXPORT) @Log(title = "科室信息管理", businessType = BusinessType.EXPORT)
@PostMapping("/export") @PostMapping("/export")
@ -62,6 +78,7 @@ public class HospitalDepartmentInfoController extends BaseController {
/** /**
* 获取科室信息管理详细信息 * 获取科室信息管理详细信息
*/ */
@ApiOperation("获取科室信息管理详细信息")
@PreAuthorize("@ss.hasPermi('system:hospitalDepartment:query')") @PreAuthorize("@ss.hasPermi('system:hospitalDepartment:query')")
@GetMapping(value = "/{id}") @GetMapping(value = "/{id}")
public AjaxResult getInfo(@PathVariable("id") Long id) { public AjaxResult getInfo(@PathVariable("id") Long id) {
@ -71,6 +88,7 @@ public class HospitalDepartmentInfoController extends BaseController {
/** /**
* 新增科室信息管理 * 新增科室信息管理
*/ */
@ApiOperation("新增科室信息管理")
@PreAuthorize("@ss.hasPermi('system:hospitalDepartment:add')") @PreAuthorize("@ss.hasPermi('system:hospitalDepartment:add')")
@Log(title = "科室信息管理", businessType = BusinessType.INSERT) @Log(title = "科室信息管理", businessType = BusinessType.INSERT)
@PostMapping("/add") @PostMapping("/add")
@ -81,6 +99,7 @@ public class HospitalDepartmentInfoController extends BaseController {
/** /**
* 修改科室信息管理 * 修改科室信息管理
*/ */
@ApiOperation("修改科室信息管理")
@PreAuthorize("@ss.hasPermi('system:hospitalDepartment:edit')") @PreAuthorize("@ss.hasPermi('system:hospitalDepartment:edit')")
@Log(title = "科室信息管理", businessType = BusinessType.UPDATE) @Log(title = "科室信息管理", businessType = BusinessType.UPDATE)
@PostMapping("/edit") @PostMapping("/edit")
@ -91,6 +110,7 @@ public class HospitalDepartmentInfoController extends BaseController {
/** /**
* 删除科室信息管理 * 删除科室信息管理
*/ */
@ApiOperation("删除科室信息管理")
@PreAuthorize("@ss.hasPermi('system:hospitalDepartment:remove')") @PreAuthorize("@ss.hasPermi('system:hospitalDepartment:remove')")
@Log(title = "科室信息管理", businessType = BusinessType.DELETE) @Log(title = "科室信息管理", businessType = BusinessType.DELETE)
@DeleteMapping("/{ids}") @DeleteMapping("/{ids}")

View File

@ -10,6 +10,8 @@ import com.xinelu.common.enums.BusinessType;
import com.xinelu.common.utils.poi.ExcelUtil; import com.xinelu.common.utils.poi.ExcelUtil;
import com.xinelu.manage.domain.hospitalinfo.HospitalInfo; import com.xinelu.manage.domain.hospitalinfo.HospitalInfo;
import com.xinelu.manage.service.hospitalinfo.IHospitalInfoService; import com.xinelu.manage.service.hospitalinfo.IHospitalInfoService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import java.util.List; import java.util.List;
import javax.annotation.Resource; import javax.annotation.Resource;
import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpServletResponse;
@ -31,6 +33,7 @@ import org.springframework.web.bind.annotation.RestController;
* @author xinyilu * @author xinyilu
* @date 2023-02-13 * @date 2023-02-13
*/ */
@Api(tags = "医院信息管理控制器")
@RestController @RestController
@RequestMapping("/system/hospital") @RequestMapping("/system/hospital")
public class HospitalInfoController extends BaseController { public class HospitalInfoController extends BaseController {
@ -40,6 +43,7 @@ public class HospitalInfoController extends BaseController {
/** /**
* 查询医院信息管理列表 * 查询医院信息管理列表
*/ */
@ApiOperation("查询医院信息管理分页列表")
@PreAuthorize("@ss.hasPermi('system:hospital:list')") @PreAuthorize("@ss.hasPermi('system:hospital:list')")
@GetMapping("/list") @GetMapping("/list")
public TableDataInfo list(HospitalInfo hospitalInfo) { public TableDataInfo list(HospitalInfo hospitalInfo) {
@ -48,9 +52,21 @@ public class HospitalInfoController extends BaseController {
return getDataTable(list); return getDataTable(list);
} }
/**
* 查询医院信息管理列表
*/
@ApiOperation("查询医院信息管理列表")
@PreAuthorize("@ss.hasPermi('system:hospital:list')")
@GetMapping("/getList")
public AjaxResult getList(HospitalInfo hospitalInfo) {
List<HospitalInfo> list = hospitalInfoService.selectHospitalInfoList(hospitalInfo);
return AjaxResult.success(list);
}
/** /**
* 导出医院信息管理列表 * 导出医院信息管理列表
*/ */
@ApiOperation("导出医院信息管理列表")
@PreAuthorize("@ss.hasPermi('system:hospital:export')") @PreAuthorize("@ss.hasPermi('system:hospital:export')")
@Log(title = "医院信息管理", businessType = BusinessType.EXPORT) @Log(title = "医院信息管理", businessType = BusinessType.EXPORT)
@PostMapping("/export") @PostMapping("/export")
@ -63,6 +79,7 @@ public class HospitalInfoController extends BaseController {
/** /**
* 获取医院信息管理详细信息 * 获取医院信息管理详细信息
*/ */
@ApiOperation("获取医院信息管理详细信息")
@PreAuthorize("@ss.hasPermi('system:hospital:query')") @PreAuthorize("@ss.hasPermi('system:hospital:query')")
@GetMapping(value = "/{id}") @GetMapping(value = "/{id}")
public AjaxResult getInfo(@PathVariable("id") Long id) { public AjaxResult getInfo(@PathVariable("id") Long id) {
@ -72,6 +89,7 @@ public class HospitalInfoController extends BaseController {
/** /**
* 新增医院信息管理 * 新增医院信息管理
*/ */
@ApiOperation("新增医院信息管理")
@PreAuthorize("@ss.hasPermi('system:hospital:add')") @PreAuthorize("@ss.hasPermi('system:hospital:add')")
@Log(title = "医院信息管理", businessType = BusinessType.INSERT) @Log(title = "医院信息管理", businessType = BusinessType.INSERT)
@PostMapping("/add") @PostMapping("/add")
@ -82,6 +100,7 @@ public class HospitalInfoController extends BaseController {
/** /**
* 修改医院信息管理 * 修改医院信息管理
*/ */
@ApiOperation("修改医院信息管理")
@PreAuthorize("@ss.hasPermi('system:hospital:edit')") @PreAuthorize("@ss.hasPermi('system:hospital:edit')")
@Log(title = "医院信息管理", businessType = BusinessType.UPDATE) @Log(title = "医院信息管理", businessType = BusinessType.UPDATE)
@PostMapping("/edit") @PostMapping("/edit")
@ -92,6 +111,7 @@ public class HospitalInfoController extends BaseController {
/** /**
* 删除医院信息管理 * 删除医院信息管理
*/ */
@ApiOperation("修改医院信息管理")
@PreAuthorize("@ss.hasPermi('system:hospital:remove')") @PreAuthorize("@ss.hasPermi('system:hospital:remove')")
@Log(title = "医院信息管理", businessType = BusinessType.DELETE) @Log(title = "医院信息管理", businessType = BusinessType.DELETE)
@DeleteMapping("/{ids}") @DeleteMapping("/{ids}")

View File

@ -8,9 +8,12 @@ import com.xinelu.common.custominterface.Insert;
import com.xinelu.common.custominterface.Update; import com.xinelu.common.custominterface.Update;
import com.xinelu.common.enums.BusinessType; import com.xinelu.common.enums.BusinessType;
import com.xinelu.common.utils.poi.ExcelUtil; import com.xinelu.common.utils.poi.ExcelUtil;
import com.xinelu.manage.domain.hospitalpersoninfo.HospitalPersonInfo;
import com.xinelu.manage.dto.hospitalpersoninfo.HospitalPersonInfoDTO; import com.xinelu.manage.dto.hospitalpersoninfo.HospitalPersonInfoDTO;
import com.xinelu.manage.service.hospitalpersoninfo.IHospitalPersonInfoService; import com.xinelu.manage.service.hospitalpersoninfo.IHospitalPersonInfoService;
import com.xinelu.manage.vo.hospitalpersoninfo.HospitalPersonInfoVO; import com.xinelu.manage.vo.hospitalpersoninfo.HospitalPersonInfoVO;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import java.util.List; import java.util.List;
import javax.annotation.Resource; import javax.annotation.Resource;
import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpServletResponse;
@ -30,6 +33,7 @@ import org.springframework.web.bind.annotation.RestController;
* @author xinyilu * @author xinyilu
* @date 2023-02-14 * @date 2023-02-14
*/ */
@Api(tags = "健康咨询-科室人员信息控制器")
@RestController @RestController
@RequestMapping("/system/hospitalPerson") @RequestMapping("/system/hospitalPerson")
public class HospitalPersonInfoController extends BaseController { public class HospitalPersonInfoController extends BaseController {
@ -37,8 +41,9 @@ public class HospitalPersonInfoController extends BaseController {
private IHospitalPersonInfoService hospitalPersonInfoService; private IHospitalPersonInfoService hospitalPersonInfoService;
/** /**
* 查询健康咨询-科室人员信息列表 * 查询健康咨询-科室人员信息分页列表
*/ */
@ApiOperation("查询健康咨询-科室人员信息分页列表")
@PreAuthorize("@ss.hasPermi('system:hospitalPerson:list')") @PreAuthorize("@ss.hasPermi('system:hospitalPerson:list')")
@GetMapping("/list") @GetMapping("/list")
public TableDataInfo list(HospitalPersonInfoVO hospitalPersonInfo) { public TableDataInfo list(HospitalPersonInfoVO hospitalPersonInfo) {
@ -47,9 +52,21 @@ public class HospitalPersonInfoController extends BaseController {
return getDataTable(list); return getDataTable(list);
} }
/**
* 查询健康咨询-科室人员信息列表
*/
@ApiOperation("查询健康咨询-科室人员信息列表")
@PreAuthorize("@ss.hasPermi('system:hospitalPerson:list')")
@GetMapping("/getList")
public AjaxResult getList(HospitalPersonInfoVO hospitalPersonInfo) {
List<HospitalPersonInfo> list = hospitalPersonInfoService.getList(hospitalPersonInfo);
return AjaxResult.success(list);
}
/** /**
* 导出健康咨询-科室人员信息列表 * 导出健康咨询-科室人员信息列表
*/ */
@ApiOperation("导出健康咨询-科室人员信息列表")
@PreAuthorize("@ss.hasPermi('system:hospitalPerson:export')") @PreAuthorize("@ss.hasPermi('system:hospitalPerson:export')")
@Log(title = "健康咨询-科室人员信息", businessType = BusinessType.EXPORT) @Log(title = "健康咨询-科室人员信息", businessType = BusinessType.EXPORT)
@PostMapping("/export") @PostMapping("/export")
@ -62,6 +79,7 @@ public class HospitalPersonInfoController extends BaseController {
/** /**
* 获取健康咨询-科室人员信息详细信息 * 获取健康咨询-科室人员信息详细信息
*/ */
@ApiOperation("获取健康咨询-科室人员信息详细信息")
@PreAuthorize("@ss.hasPermi('system:hospitalPerson:query')") @PreAuthorize("@ss.hasPermi('system:hospitalPerson:query')")
@GetMapping(value = "/{id}") @GetMapping(value = "/{id}")
public AjaxResult getInfo(@PathVariable("id") Long id) { public AjaxResult getInfo(@PathVariable("id") Long id) {
@ -71,6 +89,7 @@ public class HospitalPersonInfoController extends BaseController {
/** /**
* 新增健康咨询-科室人员信息 * 新增健康咨询-科室人员信息
*/ */
@ApiOperation("新增健康咨询-科室人员信息")
@PreAuthorize("@ss.hasPermi('system:hospitalPerson:add')") @PreAuthorize("@ss.hasPermi('system:hospitalPerson:add')")
@Log(title = "健康咨询-科室人员信息", businessType = BusinessType.INSERT) @Log(title = "健康咨询-科室人员信息", businessType = BusinessType.INSERT)
@PostMapping("/add") @PostMapping("/add")
@ -81,6 +100,7 @@ public class HospitalPersonInfoController extends BaseController {
/** /**
* 修改健康咨询-科室人员信息 * 修改健康咨询-科室人员信息
*/ */
@ApiOperation("修改健康咨询-科室人员信息")
@PreAuthorize("@ss.hasPermi('system:hospitalPerson:edit')") @PreAuthorize("@ss.hasPermi('system:hospitalPerson:edit')")
@Log(title = "健康咨询-科室人员信息", businessType = BusinessType.UPDATE) @Log(title = "健康咨询-科室人员信息", businessType = BusinessType.UPDATE)
@PostMapping("/edit") @PostMapping("/edit")
@ -91,6 +111,7 @@ public class HospitalPersonInfoController extends BaseController {
/** /**
* 删除健康咨询-科室人员信息 * 删除健康咨询-科室人员信息
*/ */
@ApiOperation("删除健康咨询-科室人员信息")
@PreAuthorize("@ss.hasPermi('system:hospitalPerson:remove')") @PreAuthorize("@ss.hasPermi('system:hospitalPerson:remove')")
@Log(title = "健康咨询-科室人员信息", businessType = BusinessType.DELETE) @Log(title = "健康咨询-科室人员信息", businessType = BusinessType.DELETE)
@DeleteMapping("/{ids}") @DeleteMapping("/{ids}")

View File

@ -10,6 +10,7 @@ import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiOperation; import io.swagger.annotations.ApiOperation;
import java.util.List; import java.util.List;
import javax.annotation.Resource; import javax.annotation.Resource;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable; import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.PostMapping;
@ -31,9 +32,9 @@ public class ScheduleController extends BaseController {
private IScheduleService scheduleService; private IScheduleService scheduleService;
/** /**
* 查询班次列表 * 查询班次分页列表
*/ */
@ApiOperation("查询班次列表") @ApiOperation("查询班次分页列表")
@GetMapping("/list") @GetMapping("/list")
public TableDataInfo list(Schedule schedule) { public TableDataInfo list(Schedule schedule) {
startPage(); startPage();
@ -41,6 +42,16 @@ public class ScheduleController extends BaseController {
return getDataTable(list); return getDataTable(list);
} }
/**
* 查询班次列表
*/
@ApiOperation("查询班次列表")
@GetMapping("/getList")
public R<List<Schedule>> getList(Schedule schedule) {
List<Schedule> list = scheduleService.getList(schedule);
return R.ok(list);
}
@ApiOperation("新增班次") @ApiOperation("新增班次")
@PostMapping("add") @PostMapping("add")
public R<String> add(@RequestBody Schedule schedule) { public R<String> add(@RequestBody Schedule schedule) {
@ -49,15 +60,25 @@ public class ScheduleController extends BaseController {
@ApiOperation("修改班次") @ApiOperation("修改班次")
@PostMapping("update") @PostMapping("update")
public R<?> update(@RequestBody Schedule schedule) { public R<String> update(@RequestBody Schedule schedule) {
return scheduleService.update(schedule) < 0 ? R.fail("修改失败") : R.ok(); return scheduleService.update(schedule) < 0 ? R.fail("修改失败") : R.ok();
} }
@ApiOperation("逻辑删除班次") @ApiOperation("逻辑删除班次")
@PostMapping("delete/{id}")
@ApiImplicitParam(name = "id", value = "班次主键", required = true, dataTypeClass = String.class) @ApiImplicitParam(name = "id", value = "班次主键", required = true, dataTypeClass = String.class)
public R<?> delete(@PathVariable Long id) { @DeleteMapping("/{id}")
public R<String> delete(@PathVariable Long id) {
scheduleService.delete(id); scheduleService.delete(id);
return R.ok(); return R.ok();
} }
/**
* 获取班次详细信息
*/
@ApiOperation("获取班次详细信息")
@GetMapping(value = "getById/{id}")
public R<Schedule> getById(@PathVariable("id") Long id) {
return R.ok(scheduleService.getById(id));
}
} }

View File

@ -1,8 +1,17 @@
package com.xinelu.manage.controller.scheduleplan; package com.xinelu.manage.controller.scheduleplan;
import com.xinelu.common.core.controller.BaseController;
import com.xinelu.common.core.domain.R;
import com.xinelu.common.core.page.TableDataInfo;
import com.xinelu.manage.domain.scheduleplan.SchedulePlan;
import com.xinelu.manage.service.scheduleplan.ISchedulePlanService; import com.xinelu.manage.service.scheduleplan.ISchedulePlanService;
import io.swagger.annotations.Api; import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import java.util.List;
import javax.annotation.Resource; import javax.annotation.Resource;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController; import org.springframework.web.bind.annotation.RestController;
@ -14,11 +23,41 @@ import org.springframework.web.bind.annotation.RestController;
@Api(tags = "医生排班计划控制器") @Api(tags = "医生排班计划控制器")
@RestController @RestController
@RequestMapping("/system/schedule/plan") @RequestMapping("/system/schedule/plan")
public class SchedulePlanController { public class SchedulePlanController extends BaseController {
@Resource @Resource
private ISchedulePlanService schedulePlanService; private ISchedulePlanService schedulePlanService;
/**
* 查询排班计划列表
*/
@ApiOperation("查询排班计划分页列表")
@GetMapping("/list")
public TableDataInfo list(SchedulePlan plan) {
startPage();
List<SchedulePlan> list = schedulePlanService.getList(plan);
return getDataTable(list);
}
/**
* 查询排班计划列表
*/
@ApiOperation("查询排班计划列表")
@GetMapping("/getList")
public R<List<SchedulePlan>> getList(SchedulePlan plan) {
List<SchedulePlan> list = schedulePlanService.getList(plan);
return R.ok(list);
}
@ApiOperation("新增医生排班计划")
@PostMapping("add")
public R<String> add(@RequestBody SchedulePlan schedulePlan) {
try {
schedulePlanService.save(schedulePlan);
return R.ok();
} catch (Exception e) {
return R.fail("保存失败");
}
}
} }

View File

@ -0,0 +1,34 @@
package com.xinelu.manage.controller.scheduleplandetail;
import com.xinelu.common.core.controller.BaseController;
import com.xinelu.common.core.domain.R;
import com.xinelu.manage.domain.scheduleplandetail.SchedulePlanDetail;
import com.xinelu.manage.service.scheduleplandetail.ISchedulePlanDetailService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import java.util.List;
import javax.annotation.Resource;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
/**
* @description: 排班计划明细控制器
* @author: haown
* @create: 2023-09-25 15:14
**/
@Api(tags = "排班计划明细控制器")
@RestController
@RequestMapping("/system/schedule/plandetail")
public class SchedulePlanDetailController extends BaseController {
@Resource
private ISchedulePlanDetailService planDetailService;
@ApiOperation("通过排班计划查询明细")
@GetMapping("/getList")
public R<List<SchedulePlanDetail>> getList(SchedulePlanDetail planDetail) {
List<SchedulePlanDetail> list = planDetailService.getList(planDetail);
return R.ok(list);
}
}

View File

@ -2,6 +2,7 @@ package com.xinelu.manage.domain.schedule;
import com.fasterxml.jackson.annotation.JsonFormat; import com.fasterxml.jackson.annotation.JsonFormat;
import com.xinelu.common.core.domain.BaseEntity; import com.xinelu.common.core.domain.BaseEntity;
import io.swagger.annotations.ApiModelProperty;
import java.time.LocalTime; import java.time.LocalTime;
import lombok.Data; import lombok.Data;
@ -19,50 +20,59 @@ public class Schedule extends BaseEntity {
/** /**
* 医院主键 * 医院主键
*/ */
@ApiModelProperty("医院主键")
private Long hospitalId; private Long hospitalId;
/** /**
* 医院名称 * 医院名称
*/ */
@ApiModelProperty("医院名称")
private String hospitalName; private String hospitalName;
/** /**
* 班次名称 * 班次名称
*/ */
@ApiModelProperty("班次名称")
private String scheduleName; private String scheduleName;
/** /**
* 班次上午开始时间 * 班次上午开始时间
*/ */
@ApiModelProperty("班次上午开始时间")
@JsonFormat(timezone = "GMT+8", pattern = "HH:mm") @JsonFormat(timezone = "GMT+8", pattern = "HH:mm")
private LocalTime forenoonStartTime; private LocalTime forenoonStartTime;
/** /**
* 班次上午结束时间 * 班次上午结束时间
*/ */
@ApiModelProperty("班次上午结束时间")
@JsonFormat(timezone = "GMT+8", pattern = "HH:mm") @JsonFormat(timezone = "GMT+8", pattern = "HH:mm")
private LocalTime forenoonEndTime; private LocalTime forenoonEndTime;
/** /**
* 班次下午开始时间 * 班次下午开始时间
*/ */
@ApiModelProperty("班次下午开始时间")
@JsonFormat(timezone = "GMT+8", pattern = "HH:mm") @JsonFormat(timezone = "GMT+8", pattern = "HH:mm")
private LocalTime afternoonStartTime; private LocalTime afternoonStartTime;
/** /**
* 班次下午结束时间 * 班次下午结束时间
*/ */
@ApiModelProperty("班次下午结束时间")
@JsonFormat(timezone = "GMT+8", pattern = "HH:mm") @JsonFormat(timezone = "GMT+8", pattern = "HH:mm")
private LocalTime afternoonEndTime; private LocalTime afternoonEndTime;
/** /**
* 启用状态0正常 1停用 * 启用状态0正常 1停用
*/ */
@ApiModelProperty("启用状态0正常 1停用")
private String status; private String status;
/** /**
* 删除标志0代表存在 1代表删除 * 删除标志0代表存在 1代表删除
*/ */
@ApiModelProperty("删除标志0代表存在 1代表删除")
private String delFlag; private String delFlag;
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;

View File

@ -1,6 +1,9 @@
package com.xinelu.manage.domain.scheduleplan; package com.xinelu.manage.domain.scheduleplan;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.xinelu.common.core.domain.BaseEntity; import com.xinelu.common.core.domain.BaseEntity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.time.LocalDate; import java.time.LocalDate;
import lombok.Data; import lombok.Data;
@ -9,6 +12,7 @@ import lombok.Data;
* @TableName schedule_plan * @TableName schedule_plan
*/ */
@Data @Data
@ApiModel("医生排班计划表")
public class SchedulePlan extends BaseEntity { public class SchedulePlan extends BaseEntity {
/** /**
* 主键 * 主键
@ -18,76 +22,93 @@ public class SchedulePlan extends BaseEntity {
/** /**
* 医院主键 * 医院主键
*/ */
@ApiModelProperty("医院id")
private Long hospitalId; private Long hospitalId;
/** /**
* 医院名称 * 医院名称
*/ */
@ApiModelProperty("医院名称")
private String hospitalName; private String hospitalName;
/** /**
* 所属部门id * 所属部门id
*/ */
@ApiModelProperty("所属部门id")
private Long departmentId; private Long departmentId;
/** /**
* 所属部门名称 * 所属部门名称
*/ */
@ApiModelProperty("所属部门名称")
private String departmentName; private String departmentName;
/** /**
* 班次主键 * 班次主键
*/ */
@ApiModelProperty("班次id")
private Long scheduleId; private Long scheduleId;
/** /**
* 班次名称 * 班次名称
*/ */
@ApiModelProperty("班次名称")
private String scheduleName; private String scheduleName;
/** /**
* 医生主键 * 医生主键
*/ */
@ApiModelProperty("医生id")
private Long doctorId; private Long doctorId;
/** /**
* 医生姓名 * 医生姓名
*/ */
@ApiModelProperty("医生姓名")
private String doctorName; private String doctorName;
/** /**
* 排班开始日期 * 排班开始日期
*/ */
@ApiModelProperty("排班开始日期")
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd")
private LocalDate scheduleStartDate; private LocalDate scheduleStartDate;
/** /**
* 排班结束日期 * 排班结束日期
*/ */
@ApiModelProperty("排班结束日期")
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd")
private LocalDate scheduleEndDate; private LocalDate scheduleEndDate;
/** /**
* 每人可预约分钟数 * 每人可预约分钟数
*/ */
@ApiModelProperty("每人可预约分钟数")
private Integer minutesPerPatient; private Integer minutesPerPatient;
/** /**
* 每天可预约人数 * 每天可预约人数
*/ */
@ApiModelProperty(value = "每天可预约人数",hidden = true)
private Integer patientsPerDay; private Integer patientsPerDay;
/** /**
* 出诊地点 * 出诊地点
*/ */
@ApiModelProperty("出诊地点")
private String scheduleAddress; private String scheduleAddress;
/** /**
* 启用状态0正常 1停用 * 启用状态0正常 1停用
*/ */
@ApiModelProperty("启用状态0正常 1停用")
private String status; private String status;
/** /**
* 删除标志0代表存在 1代表删除 * 删除标志0代表存在 1代表删除
*/ */
@ApiModelProperty("删除标志0代表存在 1代表删除")
private String delFlag; private String delFlag;
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;

View File

@ -51,6 +51,11 @@ public class SchedulePlanDetail implements Serializable {
*/ */
private String applyState; private String applyState;
/**
* 启用状态0启用 1停用
*/
private String status;
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
} }

View File

@ -34,7 +34,7 @@ public class ScreeningRecordApplyDTO implements Serializable {
* 居民姓名 * 居民姓名
*/ */
@ApiModelProperty(value = "居民姓名", required = true) @ApiModelProperty(value = "居民姓名", required = true)
private String residentName; private String patientName;
/** /**
* 状态1已预约 2取消预约 3已登记 4已完成 * 状态1已预约 2取消预约 3已登记 4已完成

View File

@ -28,7 +28,7 @@ public class ScreeningRecordDTO extends BaseEntity {
* 居民姓名 * 居民姓名
*/ */
@ApiModelProperty(value = "居民姓名") @ApiModelProperty(value = "居民姓名")
private String residentName; private String patientName;
/** /**
* 身份证号 * 身份证号

View File

@ -29,6 +29,14 @@ public interface HospitalPersonInfoMapper {
*/ */
List<HospitalPersonInfoVO> selectHospitalPersonInfoList(HospitalPersonInfoVO hospitalPersonInfo); List<HospitalPersonInfoVO> selectHospitalPersonInfoList(HospitalPersonInfoVO hospitalPersonInfo);
/**
* 查询健康咨询-科室人员信息列表
*
* @param hospitalPersonInfo 健康咨询-科室人员信息
* @return 健康咨询-科室人员信息集合
*/
List<HospitalPersonInfo> selectList(HospitalPersonInfo hospitalPersonInfo);
/** /**
* 新增健康咨询-科室人员信息 * 新增健康咨询-科室人员信息
* *

View File

@ -25,4 +25,6 @@ public interface SchedulePlanDetailMapper {
int batchInsert(List<SchedulePlanDetail> record); int batchInsert(List<SchedulePlanDetail> record);
List<SchedulePlanDetail> getList(SchedulePlanDetail planDetail);
} }

View File

@ -1,6 +1,7 @@
package com.xinelu.manage.service.hospitalpersoninfo; package com.xinelu.manage.service.hospitalpersoninfo;
import com.xinelu.common.core.domain.AjaxResult; import com.xinelu.common.core.domain.AjaxResult;
import com.xinelu.manage.domain.hospitalpersoninfo.HospitalPersonInfo;
import com.xinelu.manage.dto.hospitalpersoninfo.HospitalPersonInfoDTO; import com.xinelu.manage.dto.hospitalpersoninfo.HospitalPersonInfoDTO;
import com.xinelu.manage.vo.hospitalpersoninfo.HospitalPersonInfoVO; import com.xinelu.manage.vo.hospitalpersoninfo.HospitalPersonInfoVO;
import java.util.List; import java.util.List;
@ -28,6 +29,8 @@ public interface IHospitalPersonInfoService {
*/ */
List<HospitalPersonInfoVO> selectHospitalPersonInfoList(HospitalPersonInfoVO hospitalPersonInfo); List<HospitalPersonInfoVO> selectHospitalPersonInfoList(HospitalPersonInfoVO hospitalPersonInfo);
List<HospitalPersonInfo> getList(HospitalPersonInfo hospitalPersonInfo);
/** /**
* 新增健康咨询-科室人员信息 * 新增健康咨询-科室人员信息
* *

View File

@ -70,7 +70,11 @@ public class HospitalPersonInfoServiceImpl implements IHospitalPersonInfoService
return hospitalPersonInfoMapper.selectHospitalPersonInfoList(hospitalPersonInfo); return hospitalPersonInfoMapper.selectHospitalPersonInfoList(hospitalPersonInfo);
} }
/** @Override public List<HospitalPersonInfo> getList(HospitalPersonInfo hospitalPersonInfo) {
return hospitalPersonInfoMapper.selectList(hospitalPersonInfo);
}
/**
* 新增健康咨询-科室人员信息 * 新增健康咨询-科室人员信息
* *
* @param hospitalPersonInfo 健康咨询-科室人员信息 * @param hospitalPersonInfo 健康咨询-科室人员信息

View File

@ -14,7 +14,9 @@ public interface IScheduleService {
int update(Schedule schedule); int update(Schedule schedule);
int delete(long id); int delete(Long id);
List<Schedule> getList(Schedule schedule); List<Schedule> getList(Schedule schedule);
Schedule getById(Long id);
} }

View File

@ -20,19 +20,30 @@ public class ScheduleServiceImpl implements IScheduleService {
@Resource @Resource
private ScheduleMapper scheduleMapper; private ScheduleMapper scheduleMapper;
@Override public int save(Schedule schedule) { @Override
public int save(Schedule schedule) {
try {
verify(schedule);
} catch (Exception e) {
throw new RuntimeException(e);
}
schedule.setCreateBy(SecurityUtils.getLoginUser().getUser().getNickName()); schedule.setCreateBy(SecurityUtils.getLoginUser().getUser().getNickName());
schedule.setCreateTime(new Date()); schedule.setCreateTime(new Date());
return scheduleMapper.insertSelective(schedule); return scheduleMapper.insertSelective(schedule);
} }
@Override public int update(Schedule schedule) { @Override public int update(Schedule schedule) {
try {
verify(schedule);
} catch (Exception e) {
throw new RuntimeException(e);
}
schedule.setUpdateBy(SecurityUtils.getLoginUser().getUser().getNickName()); schedule.setUpdateBy(SecurityUtils.getLoginUser().getUser().getNickName());
schedule.setUpdateTime(new Date()); schedule.setUpdateTime(new Date());
return scheduleMapper.updateByPrimaryKeySelective(schedule); return scheduleMapper.updateByPrimaryKeySelective(schedule);
} }
@Override public int delete(long id) { @Override public int delete(Long id) {
Schedule schedule = new Schedule(); Schedule schedule = new Schedule();
schedule.setId(id); schedule.setId(id);
schedule.setDelFlag("1"); schedule.setDelFlag("1");
@ -44,6 +55,45 @@ public class ScheduleServiceImpl implements IScheduleService {
@Override public List<Schedule> getList(Schedule schedule) { @Override public List<Schedule> getList(Schedule schedule) {
return scheduleMapper.getList(schedule); return scheduleMapper.getList(schedule);
} }
@Override public Schedule getById(Long id) {
return scheduleMapper.selectByPrimaryKey(id);
}
private void verify(Schedule schedule) throws Exception {
if (schedule.getForenoonStartTime() == null && schedule.getForenoonEndTime() == null && schedule.getAfternoonStartTime() == null && schedule.getAfternoonEndTime() == null) {
throw new Exception("请选择开始时间和结束时间!");
}
if (schedule.getForenoonStartTime() == null) {
if (schedule.getForenoonEndTime() != null) {
throw new Exception("请选择上午开始时间!");
}
} else {
if (schedule.getForenoonEndTime() == null) {
throw new Exception("请选择上午结束时间!");
} else {
// 判断时间的先后顺序
if (schedule.getForenoonEndTime().isBefore(schedule.getForenoonStartTime())) {
throw new Exception("上午开始时间应在上午结束时间之前!");
}
}
}
if (schedule.getAfternoonStartTime() == null) {
if (schedule.getAfternoonEndTime() != null) {
throw new Exception("请选择下午开始时间!");
}
} else {
if (schedule.getAfternoonEndTime() == null) {
throw new Exception("请选择下午结束时间!");
} else {
// 判断时间的先后顺序
if (schedule.getAfternoonEndTime().isBefore(schedule.getAfternoonStartTime())) {
throw new Exception("下午开始时间应在下午结束时间之前!");
}
}
}
}
} }

View File

@ -44,7 +44,7 @@ public class SchedulePlanServiceImpl implements ISchedulePlanService {
// 保存排班计划 // 保存排班计划
schedulePlan.setDelFlag("0"); schedulePlan.setDelFlag("0");
if (StringUtils.isBlank(schedulePlan.getStatus())) { if (StringUtils.isBlank(schedulePlan.getStatus())) {
schedulePlan.setStatus("1"); schedulePlan.setStatus("0");
} }
int flag = schedulePlanMapper.insert(schedulePlan); int flag = schedulePlanMapper.insert(schedulePlan);
@ -52,6 +52,9 @@ public class SchedulePlanServiceImpl implements ISchedulePlanService {
if (flag > 0) { if (flag > 0) {
// 计算排班天数 // 计算排班天数
long days = ChronoUnit.DAYS.between(schedulePlan.getScheduleStartDate(), schedulePlan.getScheduleEndDate()); long days = ChronoUnit.DAYS.between(schedulePlan.getScheduleStartDate(), schedulePlan.getScheduleEndDate());
if (days < 0) {
throw new Exception("排班结束时间应在排班开始时间之后。");
}
for (int i = 0; i <= days; i++) { for (int i = 0; i <= days; i++) {
int patientsPerDay = 0; int patientsPerDay = 0;
// 排班计划明细 // 排班计划明细
@ -59,6 +62,9 @@ public class SchedulePlanServiceImpl implements ISchedulePlanService {
SchedulePlanDetail schedulePlanDetail = new SchedulePlanDetail(); SchedulePlanDetail schedulePlanDetail = new SchedulePlanDetail();
schedulePlanDetail.setSchedulePlanId(schedulePlan.getId()); schedulePlanDetail.setSchedulePlanId(schedulePlan.getId());
schedulePlanDetail.setScheduleDate(schedulePlan.getScheduleStartDate().plusDays(i)); schedulePlanDetail.setScheduleDate(schedulePlan.getScheduleStartDate().plusDays(i));
schedulePlanDetail.setDoctorId(schedulePlan.getDoctorId());
schedulePlanDetail.setDoctorName(schedulePlan.getDoctorName());
schedulePlanDetail.setStatus("0");
// 生成上午计划 // 生成上午计划
if (schedule.getForenoonStartTime() != null && schedule.getForenoonEndTime() != null) { if (schedule.getForenoonStartTime() != null && schedule.getForenoonEndTime() != null) {
// 根据时间间隔计算时间段 // 根据时间间隔计算时间段

View File

@ -1,6 +1,7 @@
package com.xinelu.manage.service.scheduleplandetail; package com.xinelu.manage.service.scheduleplandetail;
import com.xinelu.manage.domain.scheduleplandetail.SchedulePlanDetail; import com.xinelu.manage.domain.scheduleplandetail.SchedulePlanDetail;
import java.util.List;
/** /**
* @author haown * @author haown
@ -11,4 +12,5 @@ public interface ISchedulePlanDetailService {
int save(SchedulePlanDetail planDetail); int save(SchedulePlanDetail planDetail);
List<SchedulePlanDetail> getList(SchedulePlanDetail planDetail);
} }

View File

@ -3,6 +3,7 @@ package com.xinelu.manage.service.scheduleplandetail.impl;
import com.xinelu.manage.domain.scheduleplandetail.SchedulePlanDetail; import com.xinelu.manage.domain.scheduleplandetail.SchedulePlanDetail;
import com.xinelu.manage.mapper.scheduleplandetail.SchedulePlanDetailMapper; import com.xinelu.manage.mapper.scheduleplandetail.SchedulePlanDetailMapper;
import com.xinelu.manage.service.scheduleplandetail.ISchedulePlanDetailService; import com.xinelu.manage.service.scheduleplandetail.ISchedulePlanDetailService;
import java.util.List;
import javax.annotation.Resource; import javax.annotation.Resource;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
@ -20,6 +21,10 @@ public class SchedulePlanDetailServiceImpl implements ISchedulePlanDetailService
@Override public int save(SchedulePlanDetail planDetail) { @Override public int save(SchedulePlanDetail planDetail) {
return planDetailMapper.insert(planDetail); return planDetailMapper.insert(planDetail);
} }
@Override public List<SchedulePlanDetail> getList(SchedulePlanDetail planDetail) {
return planDetailMapper.getList(planDetail);
}
} }

View File

@ -118,7 +118,7 @@ public class ScreeningRecordServiceImpl implements IScreeningRecordService {
if(flag > 0) { if(flag > 0) {
// 推送消息 // 推送消息
//JSONObject jsonObject = new JSONObject(); //JSONObject jsonObject = new JSONObject();
//jsonObject.fluentPut("recipientName", registerVo.getResidentName()) //jsonObject.fluentPut("recipientName", registerVo.getPatientName())
// .fluentPut("handleDate", recordBody.getApplyStartTime()) // .fluentPut("handleDate", recordBody.getApplyStartTime())
// .fluentPut("hospitalName", recordBody.getDeptName()) // .fluentPut("hospitalName", recordBody.getDeptName())
// .fluentPut("applyContent", recordBody.getProjectName()) // .fluentPut("applyContent", recordBody.getProjectName())
@ -338,7 +338,7 @@ public class ScreeningRecordServiceImpl implements IScreeningRecordService {
//jsonObject.fluentPut("senderNo", SecurityUtils.getUserId()) //jsonObject.fluentPut("senderNo", SecurityUtils.getUserId())
// .fluentPut("senderName", SecurityUtils.getLoginUser().getUser().getNickName()) // .fluentPut("senderName", SecurityUtils.getLoginUser().getUser().getNickName())
// .fluentPut("doctorName", SecurityUtils.getLoginUser().getUser().getNickName()) // .fluentPut("doctorName", SecurityUtils.getLoginUser().getUser().getNickName())
// .fluentPut("recipientName", register.getResidentName()) // .fluentPut("recipientName", register.getPatientName())
// .fluentPut("recipientIdentity", register.getIdentity()) // .fluentPut("recipientIdentity", register.getIdentity())
// .fluentPut("sendTime", DateUtils.formatDate(new Date(), "yyyy-MM-dd HH:mm:ss")) // .fluentPut("sendTime", DateUtils.formatDate(new Date(), "yyyy-MM-dd HH:mm:ss"))
// .fluentPut("messageType", "4") // .fluentPut("messageType", "4")

View File

@ -42,7 +42,7 @@
</sql> </sql>
<select id="selectHospitalDepartmentInfoList" parameterType="com.xinelu.manage.domain.hospitaldepartmentinfo.HospitalDepartmentInfo" <select id="selectHospitalDepartmentInfoList" parameterType="com.xinelu.manage.domain.hospitaldepartmentinfo.HospitalDepartmentInfo"
resultMap="HospitalDepartmentInfoResult"> resultType="com.xinelu.manage.domain.hospitaldepartmentinfo.HospitalDepartmentInfo">
<include refid="selectHospitalDepartmentInfoVo"/> <include refid="selectHospitalDepartmentInfoVo"/>
<where> <where>
<if test="parentId != null "> <if test="parentId != null ">

View File

@ -141,6 +141,44 @@
</where> </where>
ORDER BY id DESC ORDER BY id DESC
</select> </select>
<select id="selectList"
parameterType="com.xinelu.manage.domain.hospitalpersoninfo.HospitalPersonInfo"
resultType="com.xinelu.manage.domain.hospitalpersoninfo.HospitalPersonInfo">
SELECT hpi.id, hpi.hospital_id, hpi.department_id,
hpi.person_code,
hpi.person_name,
hpi.person_phone,
hpi.person_address,
hpi.card_no,
hpi.academic_title,
hpi.consulting_fee,
hpi.person_introduce,
hpi.person_sort,
hpi.person_picture_url,
hpi.create_by,
hpi.create_time,
hpi.update_by,
hpi.update_time
FROM hospital_person_info hpi
<where>
<if test="hospitalId != null ">
and hpi.hospital_id = #{hospitalId}
</if>
<if test="departmentId != null ">
and hpi.department_id = #{departmentId}
</if>
<if test="personCode != null and personCode != ''">
and hpi.person_code = #{personCode}
</if>
<if test="personName != null and personName != ''">
and hpi.person_name like concat('%', #{personName}, '%')
</if>
<if test="academicTitle != null and academicTitle != ''">
and hpi.academic_title = #{academicTitle}
</if>
</where>
ORDER BY id DESC
</select>
<select id="selectHospitalPersonInfoById" parameterType="Long" <select id="selectHospitalPersonInfoById" parameterType="Long"
resultMap="HospitalPersonByIdVO"> resultMap="HospitalPersonByIdVO">

View File

@ -12,13 +12,14 @@
<result property="scheduleDate" column="schedule_date" jdbcType="DATE"/> <result property="scheduleDate" column="schedule_date" jdbcType="DATE"/>
<result property="scheduleStartTime" column="schedule_start_time" jdbcType="TIME"/> <result property="scheduleStartTime" column="schedule_start_time" jdbcType="TIME"/>
<result property="scheduleEndTime" column="schedule_end_time" jdbcType="TIME"/> <result property="scheduleEndTime" column="schedule_end_time" jdbcType="TIME"/>
<result property="status" column="status" jdbcType="CHAR"/>
<result property="applyState" column="apply_state" jdbcType="VARCHAR"/> <result property="applyState" column="apply_state" jdbcType="VARCHAR"/>
</resultMap> </resultMap>
<sql id="Base_Column_List"> <sql id="Base_Column_List">
id,schedule_plan_id,doctor_id, id,schedule_plan_id,doctor_id,
doctor_name,schedule_date,schedule_start_time, doctor_name,schedule_date,schedule_start_time,
schedule_end_time,apply_state schedule_end_time,status,apply_state
</sql> </sql>
<select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap"> <select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
@ -36,10 +37,10 @@
insert into schedule_plan_detail insert into schedule_plan_detail
( id,schedule_plan_id,doctor_id ( id,schedule_plan_id,doctor_id
,doctor_name,schedule_date,schedule_start_time ,doctor_name,schedule_date,schedule_start_time
,schedule_end_time,apply_state) ,schedule_end_time,status,apply_state)
values (#{id,jdbcType=BIGINT},#{schedulePlanId,jdbcType=BIGINT},#{doctorId,jdbcType=BIGINT} values (#{id,jdbcType=BIGINT},#{schedulePlanId,jdbcType=BIGINT},#{doctorId,jdbcType=BIGINT}
,#{doctorName,jdbcType=VARCHAR},#{scheduleDate,jdbcType=DATE},#{scheduleStartTime,jdbcType=TIME} ,#{doctorName,jdbcType=VARCHAR},#{scheduleDate,jdbcType=DATE},#{scheduleStartTime,jdbcType=TIME}
,#{scheduleEndTime,jdbcType=TIME},#{applyState,jdbcType=VARCHAR}) ,#{scheduleEndTime,jdbcType=TIME},#{status,jdbcType=CHAR},#{applyState,jdbcType=VARCHAR})
</insert> </insert>
<insert id="insertSelective" keyColumn="id" keyProperty="id" parameterType="com.xinelu.manage.domain.scheduleplandetail.SchedulePlanDetail" useGeneratedKeys="true"> <insert id="insertSelective" keyColumn="id" keyProperty="id" parameterType="com.xinelu.manage.domain.scheduleplandetail.SchedulePlanDetail" useGeneratedKeys="true">
insert into schedule_plan_detail insert into schedule_plan_detail
@ -51,6 +52,7 @@
<if test="scheduleDate != null">schedule_date,</if> <if test="scheduleDate != null">schedule_date,</if>
<if test="scheduleStartTime != null">schedule_start_time,</if> <if test="scheduleStartTime != null">schedule_start_time,</if>
<if test="scheduleEndTime != null">schedule_end_time,</if> <if test="scheduleEndTime != null">schedule_end_time,</if>
<if test="status != null">status,</if>
<if test="applyState != null">apply_state,</if> <if test="applyState != null">apply_state,</if>
</trim> </trim>
<trim prefix="values (" suffix=")" suffixOverrides=","> <trim prefix="values (" suffix=")" suffixOverrides=",">
@ -61,6 +63,7 @@
<if test="scheduleDate != null">#{scheduleDate,jdbcType=DATE},</if> <if test="scheduleDate != null">#{scheduleDate,jdbcType=DATE},</if>
<if test="scheduleStartTime != null">#{scheduleStartTime,jdbcType=TIME},</if> <if test="scheduleStartTime != null">#{scheduleStartTime,jdbcType=TIME},</if>
<if test="scheduleEndTime != null">#{scheduleEndTime,jdbcType=TIME},</if> <if test="scheduleEndTime != null">#{scheduleEndTime,jdbcType=TIME},</if>
<if test="status != null">#{status,jdbcType=CHAR},</if>
<if test="applyState != null">#{applyState,jdbcType=VARCHAR},</if> <if test="applyState != null">#{applyState,jdbcType=VARCHAR},</if>
</trim> </trim>
</insert> </insert>
@ -85,6 +88,9 @@
<if test="scheduleEndTime != null"> <if test="scheduleEndTime != null">
schedule_end_time = #{scheduleEndTime,jdbcType=TIME}, schedule_end_time = #{scheduleEndTime,jdbcType=TIME},
</if> </if>
<if test="status != null">
status = #{status,jdbcType=CHAR},
</if>
<if test="applyState != null"> <if test="applyState != null">
apply_state = #{applyState,jdbcType=VARCHAR}, apply_state = #{applyState,jdbcType=VARCHAR},
</if> </if>
@ -100,6 +106,7 @@
schedule_date = #{scheduleDate,jdbcType=DATE}, schedule_date = #{scheduleDate,jdbcType=DATE},
schedule_start_time = #{scheduleStartTime,jdbcType=TIME}, schedule_start_time = #{scheduleStartTime,jdbcType=TIME},
schedule_end_time = #{scheduleEndTime,jdbcType=TIME}, schedule_end_time = #{scheduleEndTime,jdbcType=TIME},
status = #{status,jdbcType=CHAR},
apply_state = #{applyState,jdbcType=VARCHAR} apply_state = #{applyState,jdbcType=VARCHAR}
where id = #{id,jdbcType=BIGINT} where id = #{id,jdbcType=BIGINT}
</update> </update>
@ -107,12 +114,28 @@
insert into schedule_plan_detail insert into schedule_plan_detail
(schedule_plan_id,doctor_id (schedule_plan_id,doctor_id
,doctor_name,schedule_date,schedule_start_time ,doctor_name,schedule_date,schedule_start_time
,schedule_end_time,apply_state) values ,schedule_end_time,status,apply_state) values
<foreach item="item" index="index" collection="list" separator=","> <foreach item="item" index="index" collection="list" separator=",">
(#{schedulePlanId,jdbcType=BIGINT},#{doctorId,jdbcType=BIGINT} (#{item.schedulePlanId},#{item.doctorId}
,#{doctorName,jdbcType=VARCHAR},#{scheduleDate,jdbcType=DATE},#{scheduleStartTime,jdbcType=TIME} ,#{item.doctorName},#{item.scheduleDate},#{item.scheduleStartTime}
,#{scheduleEndTime,jdbcType=TIME},#{applyState,jdbcType=VARCHAR}) ,#{item.scheduleEndTime},#{item.status},#{item.applyState})
</foreach> </foreach>
</insert> </insert>
<select id="getList" parameterType="com.xinelu.manage.domain.scheduleplandetail.SchedulePlanDetail" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from schedule_plan_detail
<where>
<if test="schedulePlanId != null">
and schedule_plan_id = #{schedulePlanId,jdbcType=BIGINT}
</if>
<if test="doctorId != null">
and doctor_id = #{doctorId,jdbcType=BIGINT}
</if>
<if test="scheduleDate != null">
and schedule_date = #{scheduleDate,jdbcType=DATE}
</if>
</where>
</select>
</mapper> </mapper>

View File

@ -34,7 +34,7 @@
<select id="findList" resultMap="BaseResultMap"> <select id="findList" resultMap="BaseResultMap">
select <include refid="Base_Column_List" /> select <include refid="Base_Column_List" />
from sd_project from screening_project
where del_flag = '0' where del_flag = '0'
<if test="projectName != null and projectName != ''"> <if test="projectName != null and projectName != ''">
and project_name like concat( '%' ,#{projectName}, '%') and project_name like concat( '%' ,#{projectName}, '%')
@ -57,16 +57,16 @@
<select id="selectByPrimaryKey" parameterType="java.lang.String" resultMap="BaseResultMap"> <select id="selectByPrimaryKey" parameterType="java.lang.String" resultMap="BaseResultMap">
select select
<include refid="Base_Column_List" /> <include refid="Base_Column_List" />
from sd_project from screening_project
where project_id = #{projectId,jdbcType=VARCHAR} where project_id = #{projectId,jdbcType=VARCHAR}
</select> </select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.String"> <delete id="deleteByPrimaryKey" parameterType="java.lang.String">
delete from sd_project delete from screening_project
where project_id = #{projectId,jdbcType=VARCHAR} where project_id = #{projectId,jdbcType=VARCHAR}
</delete> </delete>
<insert id="insert"> <insert id="insert">
insert into sd_project insert into screening_project
( id,project_id,project_name ( id,project_id,project_name
,project_type,price,discount ,project_type,price,discount
,discount_price,status,dept_id ,discount_price,status,dept_id
@ -81,7 +81,7 @@
,#{remark,jdbcType=VARCHAR}) ,#{remark,jdbcType=VARCHAR})
</insert> </insert>
<insert id="insertSelective"> <insert id="insertSelective">
insert into sd_project insert into screening_project
<trim prefix="(" suffix=")" suffixOverrides=","> <trim prefix="(" suffix=")" suffixOverrides=",">
<if test="id != null">id,</if> <if test="id != null">id,</if>
<if test="projectId != null">project_id,</if> <if test="projectId != null">project_id,</if>
@ -120,7 +120,7 @@
</trim> </trim>
</insert> </insert>
<update id="updateByPrimaryKeySelective" parameterType="com.xinelu.manage.domain.screeningproject.ScreeningProject"> <update id="updateByPrimaryKeySelective" parameterType="com.xinelu.manage.domain.screeningproject.ScreeningProject">
update sd_project update screening_project
<set> <set>
<if test="projectName != null"> <if test="projectName != null">
project_name = #{projectName,jdbcType=VARCHAR}, project_name = #{projectName,jdbcType=VARCHAR},
@ -168,7 +168,7 @@
where project_id = #{projectId,jdbcType=VARCHAR} where project_id = #{projectId,jdbcType=VARCHAR}
</update> </update>
<update id="updateByPrimaryKey" parameterType="com.xinelu.manage.domain.screeningproject.ScreeningProject"> <update id="updateByPrimaryKey" parameterType="com.xinelu.manage.domain.screeningproject.ScreeningProject">
update sd_project update screening_project
set set
project_name = #{projectName,jdbcType=VARCHAR}, project_name = #{projectName,jdbcType=VARCHAR},
project_type = #{projectType,jdbcType=CHAR}, project_type = #{projectType,jdbcType=CHAR},
@ -187,7 +187,7 @@
where project_id = #{projectId,jdbcType=VARCHAR} where project_id = #{projectId,jdbcType=VARCHAR}
</update> </update>
<select id="checkSameName" resultType="java.lang.Integer"> <select id="checkSameName" resultType="java.lang.Integer">
select 1 from sd_project where del_flag = '0' and project_name = #{projectName} and dept_id = #{deptId} select 1 from screening_project where del_flag = '0' and project_name = #{projectName} and dept_id = #{deptId}
<if test="projectId != null and projectId != ''"> <if test="projectId != null and projectId != ''">
and project_id != #{projectId} and project_id != #{projectId}
</if> </if>

View File

@ -55,7 +55,7 @@
<!-- 新增 --> <!-- 新增 -->
<insert id="insert"> <insert id="insert">
insert into sd_screening_record (<include refid="Insert_Column"></include>) insert into screening_record (<include refid="Insert_Column"></include>)
values (#{screeningId}, #{patientId}, #{screeningStatus}, values (#{screeningId}, #{patientId}, #{screeningStatus},
#{disease}, #{deptId}, #{deptName}, #{disease}, #{deptId}, #{deptName},
#{projectId},#{projectName}, #{projectId},#{projectName},
@ -66,7 +66,7 @@
<!-- 修改 --> <!-- 修改 -->
<update id="update"> <update id="update">
update sd_screening_record update screening_record
<set> <set>
<if test="disease != null"> <if test="disease != null">
disease = #{disease}, disease = #{disease},
@ -143,7 +143,7 @@
<!-- 更新预约状态 --> <!-- 更新预约状态 -->
<update id="updateStatus"> <update id="updateStatus">
update sd_screening_record set screening_status = #{screeningStatus} update screening_record set screening_status = #{screeningStatus}
<if test="screeningDate != null"> <if test="screeningDate != null">
,screening_date = #{screeningDate} ,screening_date = #{screeningDate}
</if> </if>
@ -152,12 +152,12 @@
<!-- 获取预约详情 --> <!-- 获取预约详情 -->
<select id="detail" resultType="com.xinelu.manage.vo.screeningrecord.ScreeningRecordVo"> <select id="detail" resultType="com.xinelu.manage.vo.screeningrecord.ScreeningRecordVo">
select <include refid="Base_Column_List"></include> from sd_screening_record where screening_id = #{screeningId} select <include refid="Base_Column_List"></include> from screening_record where screening_id = #{screeningId}
</select> </select>
<!-- 获取当前居民预约信息 --> <!-- 获取当前居民预约信息 -->
<select id="getScreeningBypatientId" resultType="com.xinelu.manage.vo.screeningrecord.ScreeningRecordVo"> <select id="getScreeningByPatientId" resultType="com.xinelu.manage.vo.screeningrecord.ScreeningRecordVo">
select <include refid="Base_Column_List"></include> from sd_screening_record select <include refid="Base_Column_List"></include> from screening_record
where patient_id = #{patientId} and screening_status in ('1', '3') where patient_id = #{patientId} and screening_status in ('1', '3')
and screening_type = '1' and screening_type = '1'
limit 1 limit 1
@ -170,8 +170,8 @@
<if test="patientId != null and patientId != ''"> <if test="patientId != null and patientId != ''">
and patient_id = #{patientId} and patient_id = #{patientId}
</if> </if>
<if test="residentName != null and residentName != ''"> <if test="patientName != null and patientName != ''">
and resident_name like concat(#{residentName}, '%') and patient_name like concat(#{patientName}, '%')
</if> </if>
<if test="identity != null and identity != ''"> <if test="identity != null and identity != ''">
and identity = #{identity} and identity = #{identity}
@ -225,14 +225,14 @@
else '0' end as hasResult, else '0' end as hasResult,
case when diagnostic_result is not null then '1' case when diagnostic_result is not null then '1'
else '0' end as hasDiagnose else '0' end as hasDiagnose
from sd_screening_record d left join sd_register r on d.patient_id = r.patient_id from screening_record d left join patient_info r on d.patient_id = r.patient_id
<where> <where>
d.screening_status != '2' and r.del_flag = '0' and r.status = '0' d.screening_status != '2' and r.del_flag = '0' and r.status = '0'
<if test="screeningStatus != null and screeningStatus != ''"> <if test="screeningStatus != null and screeningStatus != ''">
and d.screening_status = #{screeningStatus} and d.screening_status = #{screeningStatus}
</if> </if>
<if test="residentName != null and residentName != ''"> <if test="patientName != null and patientName != ''">
and r.resident_name like concat(#{residentName}, '%') and r.patient_name like concat(#{patientName}, '%')
</if> </if>
<if test="identity != null and identity != ''"> <if test="identity != null and identity != ''">
and r.identity = #{identity} and r.identity = #{identity}
@ -309,7 +309,7 @@
select <include refid="Base_Column_List"></include>, select <include refid="Base_Column_List"></include>,
case when date_format(apply_end_time, '%y%m%d%H%i') &lt; date_format(now(), '%y%m%d%H%i') then '1' case when date_format(apply_end_time, '%y%m%d%H%i') &lt; date_format(now(), '%y%m%d%H%i') then '1'
else '0' end as exceedStatus else '0' end as exceedStatus
from sd_screening_record record from screening_record record
where screening_status != '2' where screening_status != '2'
<include refid="where"></include> <include refid="where"></include>
order by apply_start_time desc order by apply_start_time desc
@ -322,7 +322,7 @@
ssr.apply_start_time,ssr.apply_end_time, ssr.screening_date,ssr.content,ssr.diagnostic_result,ssr.attachment,ssr.attachment_two, ssr.apply_start_time,ssr.apply_end_time, ssr.screening_date,ssr.content,ssr.diagnostic_result,ssr.attachment,ssr.attachment_two,
ssr.doctor_id,IFNULL(ssr.doctor_name,'') as doctor_name,ssr.apply_barcode,ssr.registration_date,ssr.screening_type,ssr.push_date,ssr.assess_record_id, ssr.doctor_id,IFNULL(ssr.doctor_name,'') as doctor_name,ssr.apply_barcode,ssr.registration_date,ssr.screening_type,ssr.push_date,ssr.assess_record_id,
ssr.remark,sf.suffix as fileType ssr.remark,sf.suffix as fileType
from sd_screening_record ssr from screening_record ssr
LEFT JOIN sys_file sf ON sf.file_id=ssr.attachment LEFT JOIN sys_file sf ON sf.file_id=ssr.attachment
where 1=1 where 1=1
<include refid="where"></include> <include refid="where"></include>
@ -331,7 +331,7 @@
<!-- 获取最新一次筛查结果 --> <!-- 获取最新一次筛查结果 -->
<select id="getScreeningOfLast" resultType="com.xinelu.manage.vo.screeningrecord.ScreeningRecordVo"> <select id="getScreeningOfLast" resultType="com.xinelu.manage.vo.screeningrecord.ScreeningRecordVo">
select <include refid="Base_Column_List"></include> from sd_screening_record select <include refid="Base_Column_List"></include> from screening_record
where patient_id = #{patientId} where patient_id = #{patientId}
<if test="screeningType != null"> <if test="screeningType != null">
and screening_type = #{screeningType} and screening_type = #{screeningType}
@ -351,13 +351,13 @@
</select> </select>
<select id="selectByScreeningId" resultMap="BaseResultMap"> <select id="selectByScreeningId" resultMap="BaseResultMap">
select <include refid="Base_Column_List"></include> from sd_screening_record select <include refid="Base_Column_List"></include> from screening_record
where screening_id = #{screeningId} where screening_id = #{screeningId}
</select> </select>
<select id="selectTimeLineList" parameterType="java.lang.String" resultType="com.xinelu.common.core.domain.TimelineVo"> <select id="selectTimeLineList" parameterType="java.lang.String" resultType="com.xinelu.common.core.domain.TimelineVo">
select select
screening_id as id, date_format(apply_start_time,'%Y-%m-%d') as createTime screening_id as id, date_format(apply_start_time,'%Y-%m-%d') as createTime
from sd_screening_record from screening_record
where where
patient_id = #{patientId} and screening_status in('1','3','4') and screening_type = '1' patient_id = #{patientId} and screening_status in('1','3','4') and screening_type = '1'
order by apply_start_time desc order by apply_start_time desc