update===>:医生排班接口。
This commit is contained in:
parent
e9e3397c51
commit
e01e61954c
@ -37,6 +37,13 @@
|
||||
<version>1.6.2</version>
|
||||
</dependency>
|
||||
|
||||
<!-- Swagger3增强插件 knife4j -->
|
||||
<dependency>
|
||||
<groupId>com.github.xiaoymin</groupId>
|
||||
<artifactId>knife4j-spring-boot-starter</artifactId>
|
||||
<version>3.0.3</version>
|
||||
</dependency>
|
||||
|
||||
<!-- Mysql驱动包 -->
|
||||
<dependency>
|
||||
<groupId>mysql</groupId>
|
||||
|
||||
@ -1,8 +1,11 @@
|
||||
package com.xinelu.web.core.config;
|
||||
|
||||
import com.github.xiaoymin.knife4j.spring.annotations.EnableKnife4j;
|
||||
import com.xinelu.common.config.XinELuConfig;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
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.Value;
|
||||
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.PathSelectors;
|
||||
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.service.contexts.SecurityContext;
|
||||
import springfox.documentation.spring.web.plugins.Docket;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import springfox.documentation.swagger2.annotations.EnableSwagger2;
|
||||
|
||||
/**
|
||||
* Swagger2的接口配置
|
||||
@ -24,6 +30,8 @@ import java.util.List;
|
||||
* @author xinelu
|
||||
*/
|
||||
@Configuration
|
||||
@EnableKnife4j
|
||||
@EnableSwagger2
|
||||
public class SwaggerConfig {
|
||||
/**
|
||||
* 系统基础配置
|
||||
|
||||
@ -11,6 +11,8 @@ import com.xinelu.common.utils.poi.ExcelUtil;
|
||||
import com.xinelu.manage.dto.hospitaldepartmentinfo.HospitalDepartmentDTO;
|
||||
import com.xinelu.manage.domain.hospitaldepartmentinfo.HospitalDepartmentInfo;
|
||||
import com.xinelu.manage.service.hospitaldepartmentinfo.IHospitalDepartmentInfoService;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import java.util.List;
|
||||
import javax.annotation.Resource;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
@ -30,6 +32,7 @@ import org.springframework.web.bind.annotation.RestController;
|
||||
* @author zh
|
||||
* @date 2023-02-13
|
||||
*/
|
||||
@Api(tags = "科室信息管理控制器")
|
||||
@RestController
|
||||
@RequestMapping("/system/hospitalDepartment")
|
||||
public class HospitalDepartmentInfoController extends BaseController {
|
||||
@ -37,8 +40,9 @@ public class HospitalDepartmentInfoController extends BaseController {
|
||||
private IHospitalDepartmentInfoService hospitalDepartmentInfoService;
|
||||
|
||||
/**
|
||||
* 查询科室信息管理列表
|
||||
* 查询科室信息管理分页列表
|
||||
*/
|
||||
@ApiOperation("查询科室信息管理分页列表")
|
||||
@PreAuthorize("@ss.hasPermi('system:hospitalDepartment:list')")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(HospitalDepartmentInfo hospitalDepartmentInfo) {
|
||||
@ -47,9 +51,21 @@ public class HospitalDepartmentInfoController extends BaseController {
|
||||
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')")
|
||||
@Log(title = "科室信息管理", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
@ -62,6 +78,7 @@ public class HospitalDepartmentInfoController extends BaseController {
|
||||
/**
|
||||
* 获取科室信息管理详细信息
|
||||
*/
|
||||
@ApiOperation("获取科室信息管理详细信息")
|
||||
@PreAuthorize("@ss.hasPermi('system:hospitalDepartment:query')")
|
||||
@GetMapping(value = "/{id}")
|
||||
public AjaxResult getInfo(@PathVariable("id") Long id) {
|
||||
@ -71,6 +88,7 @@ public class HospitalDepartmentInfoController extends BaseController {
|
||||
/**
|
||||
* 新增科室信息管理
|
||||
*/
|
||||
@ApiOperation("新增科室信息管理")
|
||||
@PreAuthorize("@ss.hasPermi('system:hospitalDepartment:add')")
|
||||
@Log(title = "科室信息管理", businessType = BusinessType.INSERT)
|
||||
@PostMapping("/add")
|
||||
@ -81,6 +99,7 @@ public class HospitalDepartmentInfoController extends BaseController {
|
||||
/**
|
||||
* 修改科室信息管理
|
||||
*/
|
||||
@ApiOperation("修改科室信息管理")
|
||||
@PreAuthorize("@ss.hasPermi('system:hospitalDepartment:edit')")
|
||||
@Log(title = "科室信息管理", businessType = BusinessType.UPDATE)
|
||||
@PostMapping("/edit")
|
||||
@ -91,6 +110,7 @@ public class HospitalDepartmentInfoController extends BaseController {
|
||||
/**
|
||||
* 删除科室信息管理
|
||||
*/
|
||||
@ApiOperation("删除科室信息管理")
|
||||
@PreAuthorize("@ss.hasPermi('system:hospitalDepartment:remove')")
|
||||
@Log(title = "科室信息管理", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{ids}")
|
||||
|
||||
@ -10,6 +10,8 @@ import com.xinelu.common.enums.BusinessType;
|
||||
import com.xinelu.common.utils.poi.ExcelUtil;
|
||||
import com.xinelu.manage.domain.hospitalinfo.HospitalInfo;
|
||||
import com.xinelu.manage.service.hospitalinfo.IHospitalInfoService;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import java.util.List;
|
||||
import javax.annotation.Resource;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
@ -31,6 +33,7 @@ import org.springframework.web.bind.annotation.RestController;
|
||||
* @author xinyilu
|
||||
* @date 2023-02-13
|
||||
*/
|
||||
@Api(tags = "医院信息管理控制器")
|
||||
@RestController
|
||||
@RequestMapping("/system/hospital")
|
||||
public class HospitalInfoController extends BaseController {
|
||||
@ -40,6 +43,7 @@ public class HospitalInfoController extends BaseController {
|
||||
/**
|
||||
* 查询医院信息管理列表
|
||||
*/
|
||||
@ApiOperation("查询医院信息管理分页列表")
|
||||
@PreAuthorize("@ss.hasPermi('system:hospital:list')")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(HospitalInfo hospitalInfo) {
|
||||
@ -48,9 +52,21 @@ public class HospitalInfoController extends BaseController {
|
||||
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')")
|
||||
@Log(title = "医院信息管理", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
@ -63,6 +79,7 @@ public class HospitalInfoController extends BaseController {
|
||||
/**
|
||||
* 获取医院信息管理详细信息
|
||||
*/
|
||||
@ApiOperation("获取医院信息管理详细信息")
|
||||
@PreAuthorize("@ss.hasPermi('system:hospital:query')")
|
||||
@GetMapping(value = "/{id}")
|
||||
public AjaxResult getInfo(@PathVariable("id") Long id) {
|
||||
@ -72,6 +89,7 @@ public class HospitalInfoController extends BaseController {
|
||||
/**
|
||||
* 新增医院信息管理
|
||||
*/
|
||||
@ApiOperation("新增医院信息管理")
|
||||
@PreAuthorize("@ss.hasPermi('system:hospital:add')")
|
||||
@Log(title = "医院信息管理", businessType = BusinessType.INSERT)
|
||||
@PostMapping("/add")
|
||||
@ -82,6 +100,7 @@ public class HospitalInfoController extends BaseController {
|
||||
/**
|
||||
* 修改医院信息管理
|
||||
*/
|
||||
@ApiOperation("修改医院信息管理")
|
||||
@PreAuthorize("@ss.hasPermi('system:hospital:edit')")
|
||||
@Log(title = "医院信息管理", businessType = BusinessType.UPDATE)
|
||||
@PostMapping("/edit")
|
||||
@ -92,6 +111,7 @@ public class HospitalInfoController extends BaseController {
|
||||
/**
|
||||
* 删除医院信息管理
|
||||
*/
|
||||
@ApiOperation("修改医院信息管理")
|
||||
@PreAuthorize("@ss.hasPermi('system:hospital:remove')")
|
||||
@Log(title = "医院信息管理", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{ids}")
|
||||
|
||||
@ -8,9 +8,12 @@ import com.xinelu.common.custominterface.Insert;
|
||||
import com.xinelu.common.custominterface.Update;
|
||||
import com.xinelu.common.enums.BusinessType;
|
||||
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.service.hospitalpersoninfo.IHospitalPersonInfoService;
|
||||
import com.xinelu.manage.vo.hospitalpersoninfo.HospitalPersonInfoVO;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import java.util.List;
|
||||
import javax.annotation.Resource;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
@ -30,6 +33,7 @@ import org.springframework.web.bind.annotation.RestController;
|
||||
* @author xinyilu
|
||||
* @date 2023-02-14
|
||||
*/
|
||||
@Api(tags = "健康咨询-科室人员信息控制器")
|
||||
@RestController
|
||||
@RequestMapping("/system/hospitalPerson")
|
||||
public class HospitalPersonInfoController extends BaseController {
|
||||
@ -37,8 +41,9 @@ public class HospitalPersonInfoController extends BaseController {
|
||||
private IHospitalPersonInfoService hospitalPersonInfoService;
|
||||
|
||||
/**
|
||||
* 查询健康咨询-科室人员信息列表
|
||||
* 查询健康咨询-科室人员信息分页列表
|
||||
*/
|
||||
@ApiOperation("查询健康咨询-科室人员信息分页列表")
|
||||
@PreAuthorize("@ss.hasPermi('system:hospitalPerson:list')")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(HospitalPersonInfoVO hospitalPersonInfo) {
|
||||
@ -47,9 +52,21 @@ public class HospitalPersonInfoController extends BaseController {
|
||||
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')")
|
||||
@Log(title = "健康咨询-科室人员信息", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
@ -62,6 +79,7 @@ public class HospitalPersonInfoController extends BaseController {
|
||||
/**
|
||||
* 获取健康咨询-科室人员信息详细信息
|
||||
*/
|
||||
@ApiOperation("获取健康咨询-科室人员信息详细信息")
|
||||
@PreAuthorize("@ss.hasPermi('system:hospitalPerson:query')")
|
||||
@GetMapping(value = "/{id}")
|
||||
public AjaxResult getInfo(@PathVariable("id") Long id) {
|
||||
@ -71,6 +89,7 @@ public class HospitalPersonInfoController extends BaseController {
|
||||
/**
|
||||
* 新增健康咨询-科室人员信息
|
||||
*/
|
||||
@ApiOperation("新增健康咨询-科室人员信息")
|
||||
@PreAuthorize("@ss.hasPermi('system:hospitalPerson:add')")
|
||||
@Log(title = "健康咨询-科室人员信息", businessType = BusinessType.INSERT)
|
||||
@PostMapping("/add")
|
||||
@ -81,6 +100,7 @@ public class HospitalPersonInfoController extends BaseController {
|
||||
/**
|
||||
* 修改健康咨询-科室人员信息
|
||||
*/
|
||||
@ApiOperation("修改健康咨询-科室人员信息")
|
||||
@PreAuthorize("@ss.hasPermi('system:hospitalPerson:edit')")
|
||||
@Log(title = "健康咨询-科室人员信息", businessType = BusinessType.UPDATE)
|
||||
@PostMapping("/edit")
|
||||
@ -91,6 +111,7 @@ public class HospitalPersonInfoController extends BaseController {
|
||||
/**
|
||||
* 删除健康咨询-科室人员信息
|
||||
*/
|
||||
@ApiOperation("删除健康咨询-科室人员信息")
|
||||
@PreAuthorize("@ss.hasPermi('system:hospitalPerson:remove')")
|
||||
@Log(title = "健康咨询-科室人员信息", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{ids}")
|
||||
|
||||
@ -10,6 +10,7 @@ import io.swagger.annotations.ApiImplicitParam;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import java.util.List;
|
||||
import javax.annotation.Resource;
|
||||
import org.springframework.web.bind.annotation.DeleteMapping;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
@ -31,9 +32,9 @@ public class ScheduleController extends BaseController {
|
||||
private IScheduleService scheduleService;
|
||||
|
||||
/**
|
||||
* 查询班次列表
|
||||
* 查询班次分页列表
|
||||
*/
|
||||
@ApiOperation("查询班次列表")
|
||||
@ApiOperation("查询班次分页列表")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(Schedule schedule) {
|
||||
startPage();
|
||||
@ -41,6 +42,16 @@ public class ScheduleController extends BaseController {
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询班次列表
|
||||
*/
|
||||
@ApiOperation("查询班次列表")
|
||||
@GetMapping("/getList")
|
||||
public R<List<Schedule>> getList(Schedule schedule) {
|
||||
List<Schedule> list = scheduleService.getList(schedule);
|
||||
return R.ok(list);
|
||||
}
|
||||
|
||||
@ApiOperation("新增班次")
|
||||
@PostMapping("add")
|
||||
public R<String> add(@RequestBody Schedule schedule) {
|
||||
@ -49,15 +60,25 @@ public class ScheduleController extends BaseController {
|
||||
|
||||
@ApiOperation("修改班次")
|
||||
@PostMapping("update")
|
||||
public R<?> update(@RequestBody Schedule schedule) {
|
||||
public R<String> update(@RequestBody Schedule schedule) {
|
||||
return scheduleService.update(schedule) < 0 ? R.fail("修改失败") : R.ok();
|
||||
}
|
||||
|
||||
@ApiOperation("逻辑删除班次")
|
||||
@PostMapping("delete/{id}")
|
||||
@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);
|
||||
return R.ok();
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取班次详细信息
|
||||
*/
|
||||
@ApiOperation("获取班次详细信息")
|
||||
@GetMapping(value = "getById/{id}")
|
||||
public R<Schedule> getById(@PathVariable("id") Long id) {
|
||||
return R.ok(scheduleService.getById(id));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ -1,8 +1,17 @@
|
||||
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 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.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
@ -14,11 +23,41 @@ import org.springframework.web.bind.annotation.RestController;
|
||||
@Api(tags = "医生排班计划控制器")
|
||||
@RestController
|
||||
@RequestMapping("/system/schedule/plan")
|
||||
public class SchedulePlanController {
|
||||
public class SchedulePlanController extends BaseController {
|
||||
|
||||
@Resource
|
||||
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("保存失败");
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ -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);
|
||||
}
|
||||
}
|
||||
@ -2,6 +2,7 @@ package com.xinelu.manage.domain.schedule;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.xinelu.common.core.domain.BaseEntity;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import java.time.LocalTime;
|
||||
import lombok.Data;
|
||||
|
||||
@ -19,50 +20,59 @@ public class Schedule extends BaseEntity {
|
||||
/**
|
||||
* 医院主键
|
||||
*/
|
||||
@ApiModelProperty("医院主键")
|
||||
private Long hospitalId;
|
||||
|
||||
/**
|
||||
* 医院名称
|
||||
*/
|
||||
@ApiModelProperty("医院名称")
|
||||
private String hospitalName;
|
||||
|
||||
/**
|
||||
* 班次名称
|
||||
*/
|
||||
@ApiModelProperty("班次名称")
|
||||
private String scheduleName;
|
||||
|
||||
/**
|
||||
* 班次上午开始时间
|
||||
*/
|
||||
@ApiModelProperty("班次上午开始时间")
|
||||
@JsonFormat(timezone = "GMT+8", pattern = "HH:mm")
|
||||
private LocalTime forenoonStartTime;
|
||||
|
||||
/**
|
||||
* 班次上午结束时间
|
||||
*/
|
||||
@ApiModelProperty("班次上午结束时间")
|
||||
@JsonFormat(timezone = "GMT+8", pattern = "HH:mm")
|
||||
private LocalTime forenoonEndTime;
|
||||
|
||||
/**
|
||||
* 班次下午开始时间
|
||||
*/
|
||||
@ApiModelProperty("班次下午开始时间")
|
||||
@JsonFormat(timezone = "GMT+8", pattern = "HH:mm")
|
||||
private LocalTime afternoonStartTime;
|
||||
|
||||
/**
|
||||
* 班次下午结束时间
|
||||
*/
|
||||
@ApiModelProperty("班次下午结束时间")
|
||||
@JsonFormat(timezone = "GMT+8", pattern = "HH:mm")
|
||||
private LocalTime afternoonEndTime;
|
||||
|
||||
/**
|
||||
* 启用状态(0正常 1停用)
|
||||
*/
|
||||
@ApiModelProperty("启用状态(0正常 1停用)")
|
||||
private String status;
|
||||
|
||||
/**
|
||||
* 删除标志(0代表存在 1代表删除)
|
||||
*/
|
||||
@ApiModelProperty("删除标志(0代表存在 1代表删除)")
|
||||
private String delFlag;
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@ -1,6 +1,9 @@
|
||||
package com.xinelu.manage.domain.scheduleplan;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.xinelu.common.core.domain.BaseEntity;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import java.time.LocalDate;
|
||||
import lombok.Data;
|
||||
|
||||
@ -9,6 +12,7 @@ import lombok.Data;
|
||||
* @TableName schedule_plan
|
||||
*/
|
||||
@Data
|
||||
@ApiModel("医生排班计划表")
|
||||
public class SchedulePlan extends BaseEntity {
|
||||
/**
|
||||
* 主键
|
||||
@ -18,76 +22,93 @@ public class SchedulePlan extends BaseEntity {
|
||||
/**
|
||||
* 医院主键
|
||||
*/
|
||||
@ApiModelProperty("医院id")
|
||||
private Long hospitalId;
|
||||
|
||||
/**
|
||||
* 医院名称
|
||||
*/
|
||||
@ApiModelProperty("医院名称")
|
||||
private String hospitalName;
|
||||
|
||||
/**
|
||||
* 所属部门id
|
||||
*/
|
||||
@ApiModelProperty("所属部门id")
|
||||
private Long departmentId;
|
||||
|
||||
/**
|
||||
* 所属部门名称
|
||||
*/
|
||||
@ApiModelProperty("所属部门名称")
|
||||
private String departmentName;
|
||||
|
||||
/**
|
||||
* 班次主键
|
||||
*/
|
||||
@ApiModelProperty("班次id")
|
||||
private Long scheduleId;
|
||||
|
||||
/**
|
||||
* 班次名称
|
||||
*/
|
||||
@ApiModelProperty("班次名称")
|
||||
private String scheduleName;
|
||||
|
||||
/**
|
||||
* 医生主键
|
||||
*/
|
||||
@ApiModelProperty("医生id")
|
||||
private Long doctorId;
|
||||
|
||||
/**
|
||||
* 医生姓名
|
||||
*/
|
||||
@ApiModelProperty("医生姓名")
|
||||
private String doctorName;
|
||||
|
||||
/**
|
||||
* 排班开始日期
|
||||
*/
|
||||
@ApiModelProperty("排班开始日期")
|
||||
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd")
|
||||
private LocalDate scheduleStartDate;
|
||||
|
||||
/**
|
||||
* 排班结束日期
|
||||
*/
|
||||
@ApiModelProperty("排班结束日期")
|
||||
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd")
|
||||
private LocalDate scheduleEndDate;
|
||||
|
||||
/**
|
||||
* 每人可预约分钟数
|
||||
*/
|
||||
@ApiModelProperty("每人可预约分钟数")
|
||||
private Integer minutesPerPatient;
|
||||
|
||||
/**
|
||||
* 每天可预约人数
|
||||
*/
|
||||
@ApiModelProperty(value = "每天可预约人数",hidden = true)
|
||||
private Integer patientsPerDay;
|
||||
|
||||
/**
|
||||
* 出诊地点
|
||||
*/
|
||||
@ApiModelProperty("出诊地点")
|
||||
private String scheduleAddress;
|
||||
|
||||
/**
|
||||
* 启用状态(0正常 1停用)
|
||||
*/
|
||||
@ApiModelProperty("启用状态(0正常 1停用)")
|
||||
private String status;
|
||||
|
||||
/**
|
||||
* 删除标志(0代表存在 1代表删除)
|
||||
*/
|
||||
@ApiModelProperty("删除标志(0代表存在 1代表删除)")
|
||||
private String delFlag;
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@ -51,6 +51,11 @@ public class SchedulePlanDetail implements Serializable {
|
||||
*/
|
||||
private String applyState;
|
||||
|
||||
/**
|
||||
* 启用状态(0启用 1停用)
|
||||
*/
|
||||
private String status;
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
}
|
||||
@ -34,7 +34,7 @@ public class ScreeningRecordApplyDTO implements Serializable {
|
||||
* 居民姓名
|
||||
*/
|
||||
@ApiModelProperty(value = "居民姓名", required = true)
|
||||
private String residentName;
|
||||
private String patientName;
|
||||
|
||||
/**
|
||||
* 状态(1:已预约 2:取消预约 3:已登记 4:已完成)
|
||||
|
||||
@ -28,7 +28,7 @@ public class ScreeningRecordDTO extends BaseEntity {
|
||||
* 居民姓名
|
||||
*/
|
||||
@ApiModelProperty(value = "居民姓名")
|
||||
private String residentName;
|
||||
private String patientName;
|
||||
|
||||
/**
|
||||
* 身份证号
|
||||
|
||||
@ -29,6 +29,14 @@ public interface HospitalPersonInfoMapper {
|
||||
*/
|
||||
List<HospitalPersonInfoVO> selectHospitalPersonInfoList(HospitalPersonInfoVO hospitalPersonInfo);
|
||||
|
||||
/**
|
||||
* 查询健康咨询-科室人员信息列表
|
||||
*
|
||||
* @param hospitalPersonInfo 健康咨询-科室人员信息
|
||||
* @return 健康咨询-科室人员信息集合
|
||||
*/
|
||||
List<HospitalPersonInfo> selectList(HospitalPersonInfo hospitalPersonInfo);
|
||||
|
||||
/**
|
||||
* 新增健康咨询-科室人员信息
|
||||
*
|
||||
|
||||
@ -25,4 +25,6 @@ public interface SchedulePlanDetailMapper {
|
||||
|
||||
int batchInsert(List<SchedulePlanDetail> record);
|
||||
|
||||
List<SchedulePlanDetail> getList(SchedulePlanDetail planDetail);
|
||||
|
||||
}
|
||||
|
||||
@ -1,6 +1,7 @@
|
||||
package com.xinelu.manage.service.hospitalpersoninfo;
|
||||
|
||||
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.vo.hospitalpersoninfo.HospitalPersonInfoVO;
|
||||
import java.util.List;
|
||||
@ -28,6 +29,8 @@ public interface IHospitalPersonInfoService {
|
||||
*/
|
||||
List<HospitalPersonInfoVO> selectHospitalPersonInfoList(HospitalPersonInfoVO hospitalPersonInfo);
|
||||
|
||||
List<HospitalPersonInfo> getList(HospitalPersonInfo hospitalPersonInfo);
|
||||
|
||||
/**
|
||||
* 新增健康咨询-科室人员信息
|
||||
*
|
||||
|
||||
@ -70,7 +70,11 @@ public class HospitalPersonInfoServiceImpl implements IHospitalPersonInfoService
|
||||
return hospitalPersonInfoMapper.selectHospitalPersonInfoList(hospitalPersonInfo);
|
||||
}
|
||||
|
||||
/**
|
||||
@Override public List<HospitalPersonInfo> getList(HospitalPersonInfo hospitalPersonInfo) {
|
||||
return hospitalPersonInfoMapper.selectList(hospitalPersonInfo);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增健康咨询-科室人员信息
|
||||
*
|
||||
* @param hospitalPersonInfo 健康咨询-科室人员信息
|
||||
|
||||
@ -14,7 +14,9 @@ public interface IScheduleService {
|
||||
|
||||
int update(Schedule schedule);
|
||||
|
||||
int delete(long id);
|
||||
int delete(Long id);
|
||||
|
||||
List<Schedule> getList(Schedule schedule);
|
||||
|
||||
Schedule getById(Long id);
|
||||
}
|
||||
|
||||
@ -20,19 +20,30 @@ public class ScheduleServiceImpl implements IScheduleService {
|
||||
@Resource
|
||||
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.setCreateTime(new Date());
|
||||
return scheduleMapper.insertSelective(schedule);
|
||||
}
|
||||
|
||||
@Override public int update(Schedule schedule) {
|
||||
try {
|
||||
verify(schedule);
|
||||
} catch (Exception e) {
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
schedule.setUpdateBy(SecurityUtils.getLoginUser().getUser().getNickName());
|
||||
schedule.setUpdateTime(new Date());
|
||||
return scheduleMapper.updateByPrimaryKeySelective(schedule);
|
||||
}
|
||||
|
||||
@Override public int delete(long id) {
|
||||
@Override public int delete(Long id) {
|
||||
Schedule schedule = new Schedule();
|
||||
schedule.setId(id);
|
||||
schedule.setDelFlag("1");
|
||||
@ -44,6 +55,45 @@ public class ScheduleServiceImpl implements IScheduleService {
|
||||
@Override public List<Schedule> getList(Schedule 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("下午开始时间应在下午结束时间之前!");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -44,7 +44,7 @@ public class SchedulePlanServiceImpl implements ISchedulePlanService {
|
||||
// 保存排班计划
|
||||
schedulePlan.setDelFlag("0");
|
||||
if (StringUtils.isBlank(schedulePlan.getStatus())) {
|
||||
schedulePlan.setStatus("1");
|
||||
schedulePlan.setStatus("0");
|
||||
}
|
||||
int flag = schedulePlanMapper.insert(schedulePlan);
|
||||
|
||||
@ -52,6 +52,9 @@ public class SchedulePlanServiceImpl implements ISchedulePlanService {
|
||||
if (flag > 0) {
|
||||
// 计算排班天数
|
||||
long days = ChronoUnit.DAYS.between(schedulePlan.getScheduleStartDate(), schedulePlan.getScheduleEndDate());
|
||||
if (days < 0) {
|
||||
throw new Exception("排班结束时间应在排班开始时间之后。");
|
||||
}
|
||||
for (int i = 0; i <= days; i++) {
|
||||
int patientsPerDay = 0;
|
||||
// 排班计划明细
|
||||
@ -59,6 +62,9 @@ public class SchedulePlanServiceImpl implements ISchedulePlanService {
|
||||
SchedulePlanDetail schedulePlanDetail = new SchedulePlanDetail();
|
||||
schedulePlanDetail.setSchedulePlanId(schedulePlan.getId());
|
||||
schedulePlanDetail.setScheduleDate(schedulePlan.getScheduleStartDate().plusDays(i));
|
||||
schedulePlanDetail.setDoctorId(schedulePlan.getDoctorId());
|
||||
schedulePlanDetail.setDoctorName(schedulePlan.getDoctorName());
|
||||
schedulePlanDetail.setStatus("0");
|
||||
// 生成上午计划
|
||||
if (schedule.getForenoonStartTime() != null && schedule.getForenoonEndTime() != null) {
|
||||
// 根据时间间隔计算时间段
|
||||
|
||||
@ -1,6 +1,7 @@
|
||||
package com.xinelu.manage.service.scheduleplandetail;
|
||||
|
||||
import com.xinelu.manage.domain.scheduleplandetail.SchedulePlanDetail;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author haown
|
||||
@ -11,4 +12,5 @@ public interface ISchedulePlanDetailService {
|
||||
|
||||
int save(SchedulePlanDetail planDetail);
|
||||
|
||||
List<SchedulePlanDetail> getList(SchedulePlanDetail planDetail);
|
||||
}
|
||||
|
||||
@ -3,6 +3,7 @@ package com.xinelu.manage.service.scheduleplandetail.impl;
|
||||
import com.xinelu.manage.domain.scheduleplandetail.SchedulePlanDetail;
|
||||
import com.xinelu.manage.mapper.scheduleplandetail.SchedulePlanDetailMapper;
|
||||
import com.xinelu.manage.service.scheduleplandetail.ISchedulePlanDetailService;
|
||||
import java.util.List;
|
||||
import javax.annotation.Resource;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
@ -20,6 +21,10 @@ public class SchedulePlanDetailServiceImpl implements ISchedulePlanDetailService
|
||||
@Override public int save(SchedulePlanDetail planDetail) {
|
||||
return planDetailMapper.insert(planDetail);
|
||||
}
|
||||
|
||||
@Override public List<SchedulePlanDetail> getList(SchedulePlanDetail planDetail) {
|
||||
return planDetailMapper.getList(planDetail);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -118,7 +118,7 @@ public class ScreeningRecordServiceImpl implements IScreeningRecordService {
|
||||
if(flag > 0) {
|
||||
// 推送消息
|
||||
//JSONObject jsonObject = new JSONObject();
|
||||
//jsonObject.fluentPut("recipientName", registerVo.getResidentName())
|
||||
//jsonObject.fluentPut("recipientName", registerVo.getPatientName())
|
||||
// .fluentPut("handleDate", recordBody.getApplyStartTime())
|
||||
// .fluentPut("hospitalName", recordBody.getDeptName())
|
||||
// .fluentPut("applyContent", recordBody.getProjectName())
|
||||
@ -338,7 +338,7 @@ public class ScreeningRecordServiceImpl implements IScreeningRecordService {
|
||||
//jsonObject.fluentPut("senderNo", SecurityUtils.getUserId())
|
||||
// .fluentPut("senderName", SecurityUtils.getLoginUser().getUser().getNickName())
|
||||
// .fluentPut("doctorName", SecurityUtils.getLoginUser().getUser().getNickName())
|
||||
// .fluentPut("recipientName", register.getResidentName())
|
||||
// .fluentPut("recipientName", register.getPatientName())
|
||||
// .fluentPut("recipientIdentity", register.getIdentity())
|
||||
// .fluentPut("sendTime", DateUtils.formatDate(new Date(), "yyyy-MM-dd HH:mm:ss"))
|
||||
// .fluentPut("messageType", "4")
|
||||
|
||||
@ -42,7 +42,7 @@
|
||||
</sql>
|
||||
|
||||
<select id="selectHospitalDepartmentInfoList" parameterType="com.xinelu.manage.domain.hospitaldepartmentinfo.HospitalDepartmentInfo"
|
||||
resultMap="HospitalDepartmentInfoResult">
|
||||
resultType="com.xinelu.manage.domain.hospitaldepartmentinfo.HospitalDepartmentInfo">
|
||||
<include refid="selectHospitalDepartmentInfoVo"/>
|
||||
<where>
|
||||
<if test="parentId != null ">
|
||||
|
||||
@ -141,6 +141,44 @@
|
||||
</where>
|
||||
ORDER BY id DESC
|
||||
</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"
|
||||
resultMap="HospitalPersonByIdVO">
|
||||
|
||||
@ -12,13 +12,14 @@
|
||||
<result property="scheduleDate" column="schedule_date" jdbcType="DATE"/>
|
||||
<result property="scheduleStartTime" column="schedule_start_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"/>
|
||||
</resultMap>
|
||||
|
||||
<sql id="Base_Column_List">
|
||||
id,schedule_plan_id,doctor_id,
|
||||
doctor_name,schedule_date,schedule_start_time,
|
||||
schedule_end_time,apply_state
|
||||
schedule_end_time,status,apply_state
|
||||
</sql>
|
||||
|
||||
<select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
|
||||
@ -36,10 +37,10 @@
|
||||
insert into schedule_plan_detail
|
||||
( id,schedule_plan_id,doctor_id
|
||||
,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}
|
||||
,#{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 id="insertSelective" keyColumn="id" keyProperty="id" parameterType="com.xinelu.manage.domain.scheduleplandetail.SchedulePlanDetail" useGeneratedKeys="true">
|
||||
insert into schedule_plan_detail
|
||||
@ -51,6 +52,7 @@
|
||||
<if test="scheduleDate != null">schedule_date,</if>
|
||||
<if test="scheduleStartTime != null">schedule_start_time,</if>
|
||||
<if test="scheduleEndTime != null">schedule_end_time,</if>
|
||||
<if test="status != null">status,</if>
|
||||
<if test="applyState != null">apply_state,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
@ -61,6 +63,7 @@
|
||||
<if test="scheduleDate != null">#{scheduleDate,jdbcType=DATE},</if>
|
||||
<if test="scheduleStartTime != null">#{scheduleStartTime,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>
|
||||
</trim>
|
||||
</insert>
|
||||
@ -85,6 +88,9 @@
|
||||
<if test="scheduleEndTime != null">
|
||||
schedule_end_time = #{scheduleEndTime,jdbcType=TIME},
|
||||
</if>
|
||||
<if test="status != null">
|
||||
status = #{status,jdbcType=CHAR},
|
||||
</if>
|
||||
<if test="applyState != null">
|
||||
apply_state = #{applyState,jdbcType=VARCHAR},
|
||||
</if>
|
||||
@ -100,6 +106,7 @@
|
||||
schedule_date = #{scheduleDate,jdbcType=DATE},
|
||||
schedule_start_time = #{scheduleStartTime,jdbcType=TIME},
|
||||
schedule_end_time = #{scheduleEndTime,jdbcType=TIME},
|
||||
status = #{status,jdbcType=CHAR},
|
||||
apply_state = #{applyState,jdbcType=VARCHAR}
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</update>
|
||||
@ -107,12 +114,28 @@
|
||||
insert into schedule_plan_detail
|
||||
(schedule_plan_id,doctor_id
|
||||
,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=",">
|
||||
(#{schedulePlanId,jdbcType=BIGINT},#{doctorId,jdbcType=BIGINT}
|
||||
,#{doctorName,jdbcType=VARCHAR},#{scheduleDate,jdbcType=DATE},#{scheduleStartTime,jdbcType=TIME}
|
||||
,#{scheduleEndTime,jdbcType=TIME},#{applyState,jdbcType=VARCHAR})
|
||||
(#{item.schedulePlanId},#{item.doctorId}
|
||||
,#{item.doctorName},#{item.scheduleDate},#{item.scheduleStartTime}
|
||||
,#{item.scheduleEndTime},#{item.status},#{item.applyState})
|
||||
</foreach>
|
||||
|
||||
</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>
|
||||
|
||||
@ -34,7 +34,7 @@
|
||||
|
||||
<select id="findList" resultMap="BaseResultMap">
|
||||
select <include refid="Base_Column_List" />
|
||||
from sd_project
|
||||
from screening_project
|
||||
where del_flag = '0'
|
||||
<if test="projectName != null and projectName != ''">
|
||||
and project_name like concat( '%' ,#{projectName}, '%')
|
||||
@ -57,16 +57,16 @@
|
||||
<select id="selectByPrimaryKey" parameterType="java.lang.String" resultMap="BaseResultMap">
|
||||
select
|
||||
<include refid="Base_Column_List" />
|
||||
from sd_project
|
||||
from screening_project
|
||||
where project_id = #{projectId,jdbcType=VARCHAR}
|
||||
</select>
|
||||
|
||||
<delete id="deleteByPrimaryKey" parameterType="java.lang.String">
|
||||
delete from sd_project
|
||||
delete from screening_project
|
||||
where project_id = #{projectId,jdbcType=VARCHAR}
|
||||
</delete>
|
||||
<insert id="insert">
|
||||
insert into sd_project
|
||||
insert into screening_project
|
||||
( id,project_id,project_name
|
||||
,project_type,price,discount
|
||||
,discount_price,status,dept_id
|
||||
@ -81,7 +81,7 @@
|
||||
,#{remark,jdbcType=VARCHAR})
|
||||
</insert>
|
||||
<insert id="insertSelective">
|
||||
insert into sd_project
|
||||
insert into screening_project
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="id != null">id,</if>
|
||||
<if test="projectId != null">project_id,</if>
|
||||
@ -120,7 +120,7 @@
|
||||
</trim>
|
||||
</insert>
|
||||
<update id="updateByPrimaryKeySelective" parameterType="com.xinelu.manage.domain.screeningproject.ScreeningProject">
|
||||
update sd_project
|
||||
update screening_project
|
||||
<set>
|
||||
<if test="projectName != null">
|
||||
project_name = #{projectName,jdbcType=VARCHAR},
|
||||
@ -168,7 +168,7 @@
|
||||
where project_id = #{projectId,jdbcType=VARCHAR}
|
||||
</update>
|
||||
<update id="updateByPrimaryKey" parameterType="com.xinelu.manage.domain.screeningproject.ScreeningProject">
|
||||
update sd_project
|
||||
update screening_project
|
||||
set
|
||||
project_name = #{projectName,jdbcType=VARCHAR},
|
||||
project_type = #{projectType,jdbcType=CHAR},
|
||||
@ -187,7 +187,7 @@
|
||||
where project_id = #{projectId,jdbcType=VARCHAR}
|
||||
</update>
|
||||
<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 != ''">
|
||||
and project_id != #{projectId}
|
||||
</if>
|
||||
|
||||
@ -55,7 +55,7 @@
|
||||
|
||||
<!-- 新增 -->
|
||||
<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},
|
||||
#{disease}, #{deptId}, #{deptName},
|
||||
#{projectId},#{projectName},
|
||||
@ -66,7 +66,7 @@
|
||||
|
||||
<!-- 修改 -->
|
||||
<update id="update">
|
||||
update sd_screening_record
|
||||
update screening_record
|
||||
<set>
|
||||
<if test="disease != null">
|
||||
disease = #{disease},
|
||||
@ -143,7 +143,7 @@
|
||||
|
||||
<!-- 更新预约状态 -->
|
||||
<update id="updateStatus">
|
||||
update sd_screening_record set screening_status = #{screeningStatus}
|
||||
update screening_record set screening_status = #{screeningStatus}
|
||||
<if test="screeningDate != null">
|
||||
,screening_date = #{screeningDate}
|
||||
</if>
|
||||
@ -152,12 +152,12 @@
|
||||
|
||||
<!-- 获取预约详情 -->
|
||||
<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 id="getScreeningBypatientId" resultType="com.xinelu.manage.vo.screeningrecord.ScreeningRecordVo">
|
||||
select <include refid="Base_Column_List"></include> from sd_screening_record
|
||||
<select id="getScreeningByPatientId" resultType="com.xinelu.manage.vo.screeningrecord.ScreeningRecordVo">
|
||||
select <include refid="Base_Column_List"></include> from screening_record
|
||||
where patient_id = #{patientId} and screening_status in ('1', '3')
|
||||
and screening_type = '1'
|
||||
limit 1
|
||||
@ -170,8 +170,8 @@
|
||||
<if test="patientId != null and patientId != ''">
|
||||
and patient_id = #{patientId}
|
||||
</if>
|
||||
<if test="residentName != null and residentName != ''">
|
||||
and resident_name like concat(#{residentName}, '%')
|
||||
<if test="patientName != null and patientName != ''">
|
||||
and patient_name like concat(#{patientName}, '%')
|
||||
</if>
|
||||
<if test="identity != null and identity != ''">
|
||||
and identity = #{identity}
|
||||
@ -225,14 +225,14 @@
|
||||
else '0' end as hasResult,
|
||||
case when diagnostic_result is not null then '1'
|
||||
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>
|
||||
d.screening_status != '2' and r.del_flag = '0' and r.status = '0'
|
||||
<if test="screeningStatus != null and screeningStatus != ''">
|
||||
and d.screening_status = #{screeningStatus}
|
||||
</if>
|
||||
<if test="residentName != null and residentName != ''">
|
||||
and r.resident_name like concat(#{residentName}, '%')
|
||||
<if test="patientName != null and patientName != ''">
|
||||
and r.patient_name like concat(#{patientName}, '%')
|
||||
</if>
|
||||
<if test="identity != null and identity != ''">
|
||||
and r.identity = #{identity}
|
||||
@ -309,7 +309,7 @@
|
||||
select <include refid="Base_Column_List"></include>,
|
||||
case when date_format(apply_end_time, '%y%m%d%H%i') < date_format(now(), '%y%m%d%H%i') then '1'
|
||||
else '0' end as exceedStatus
|
||||
from sd_screening_record record
|
||||
from screening_record record
|
||||
where screening_status != '2'
|
||||
<include refid="where"></include>
|
||||
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.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
|
||||
from sd_screening_record ssr
|
||||
from screening_record ssr
|
||||
LEFT JOIN sys_file sf ON sf.file_id=ssr.attachment
|
||||
where 1=1
|
||||
<include refid="where"></include>
|
||||
@ -331,7 +331,7 @@
|
||||
|
||||
<!-- 获取最新一次筛查结果 -->
|
||||
<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}
|
||||
<if test="screeningType != null">
|
||||
and screening_type = #{screeningType}
|
||||
@ -351,13 +351,13 @@
|
||||
</select>
|
||||
|
||||
<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}
|
||||
</select>
|
||||
<select id="selectTimeLineList" parameterType="java.lang.String" resultType="com.xinelu.common.core.domain.TimelineVo">
|
||||
select
|
||||
screening_id as id, date_format(apply_start_time,'%Y-%m-%d') as createTime
|
||||
from sd_screening_record
|
||||
from screening_record
|
||||
where
|
||||
patient_id = #{patientId} and screening_status in('1','3','4') and screening_type = '1'
|
||||
order by apply_start_time desc
|
||||
|
||||
Loading…
Reference in New Issue
Block a user