Merge remote-tracking branch 'origin/jihan_0920_护理服务、商城、积分兑换、在线问诊功能分支' into jihan_0920_护理服务、商城、积分兑换、在线问诊功能分支

This commit is contained in:
纪寒 2023-09-22 16:44:46 +08:00
commit f3ee015e67
33 changed files with 504 additions and 130 deletions

View File

@ -0,0 +1,16 @@
package com.xinelu.applet.controller.appletSchedulePlan;
import io.swagger.annotations.Api;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
/**
* @description: 小程序医生排班计划控制器
* @author: haown
* @create: 2023-09-22 10:28
**/
@Api(tags = "小程序医生排班计划控制器")
@RestController
@RequestMapping("/nurseApplet/schedule/plan")
public class AppletSchedulePlanController {
}

View File

@ -109,16 +109,16 @@ public class AppletScreeningRecordController extends BaseController {
return R.ok(screeningRecordVo);
}
@GetMapping("/getScreening/{registerId}")
@GetMapping("/getScreening/{patientId}")
@ApiOperation(value = "获取当前预约信息")
public R<ScreeningRecordVo> getScreeningByRegisterId(@PathVariable String registerId) {
return R.ok(screeningRecordService.getScreeningByRegisterId(registerId));
public R<ScreeningRecordVo> getScreeningByPatientId(@PathVariable String patientId) {
return R.ok(screeningRecordService.getScreeningByPatientId(patientId));
}
@GetMapping("/last/{registerId}/{projectId}")
@GetMapping("/last/{patientId}/{projectId}")
@ApiOperation(value = "获取最新一次筛查结果")
public R<ScreeningRecordVo> last(@PathVariable String registerId, @PathVariable String projectId) {
ScreeningRecordVo screeningRecordVo = screeningRecordService.last(registerId, projectId);
public R<ScreeningRecordVo> last(@PathVariable String patientId, @PathVariable String projectId) {
ScreeningRecordVo screeningRecordVo = screeningRecordService.last(patientId, projectId);
return R.ok(screeningRecordVo);
}

View File

@ -1,6 +1,19 @@
package com.xinelu.manage.controller.schedule;
import io.swagger.annotations.ApiModel;
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.schedule.Schedule;
import com.xinelu.manage.service.schedule.IScheduleService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
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.PathVariable;
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;
@ -9,10 +22,42 @@ import org.springframework.web.bind.annotation.RestController;
* @author: haown
* @create: 2023-09-21 17:25
**/
@ApiModel(value = "排班班次控制器")
@Api(tags = "排班班次控制器")
@RestController
@RequestMapping("/system/schedule")
public class ScheduleController {
public class ScheduleController extends BaseController {
@Resource
private IScheduleService scheduleService;
/**
* 查询班次列表
*/
@ApiOperation("查询班次列表")
@GetMapping("/list")
public TableDataInfo list(Schedule schedule) {
startPage();
List<Schedule> list = scheduleService.getList(schedule);
return getDataTable(list);
}
@ApiOperation("新增班次")
@PostMapping("add")
public R<String> add(@RequestBody Schedule schedule) {
return scheduleService.save(schedule) > 0 ? R.ok() : R.fail("保存失败");
}
@ApiOperation("修改班次")
@PostMapping("update")
public R<?> 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) {
scheduleService.delete(id);
return R.ok();
}
}

View File

@ -0,0 +1,24 @@
package com.xinelu.manage.controller.scheduleplan;
import com.xinelu.manage.service.scheduleplan.ISchedulePlanService;
import io.swagger.annotations.Api;
import javax.annotation.Resource;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
/**
* @description: 医生排班计划控制器
* @author: haown
* @create: 2023-09-22 10:14
**/
@Api(tags = "医生排班计划控制器")
@RestController
@RequestMapping("/system/schedule/plan")
public class SchedulePlanController {
@Resource
private ISchedulePlanService schedulePlanService;
}

View File

@ -59,23 +59,23 @@ public class ScreeningRecordController extends BaseController {
return R.ok(screeningRecordService.detail(screeningId));
}
@GetMapping("/getScreening/{registerId}")
@GetMapping("/getScreening/{patientId}")
@ApiOperation(value = "获取当前预约信息")
public R<ScreeningRecordVo> getScreeningByRegisterId(@PathVariable String registerId) {
return R.ok(screeningRecordService.getScreeningByRegisterId(registerId));
public R<ScreeningRecordVo> getScreeningByPatientId(@PathVariable String patientId) {
return R.ok(screeningRecordService.getScreeningByPatientId(patientId));
}
@GetMapping("/last/{registerId}")
@GetMapping("/last/{patientId}")
@ApiOperation(value = "获取最新一次筛查结果")
public R<ScreeningRecordVo> last(@PathVariable String registerId) {
return R.ok(screeningRecordService.last(registerId,null));
public R<ScreeningRecordVo> last(@PathVariable String patientId) {
return R.ok(screeningRecordService.last(patientId,null));
}
@GetMapping("/timelineList/{registerId}")
@GetMapping("/timelineList/{patientId}")
@ApiOperation(value = "根据居民业务主键查询筛查记录时间轴", response = TimelineVo.class, notes = "根据居民业务主键查询筛查记录时间轴", httpMethod = "GET")
@ApiImplicitParam(name = "registerId", value = "居民业务主键", required = true, dataTypeClass = String.class)
public R<List<SelectVo>> TimelineList(@PathVariable("registerId") String registerId) {
return R.ok(screeningRecordService.getTimelineList(registerId));
@ApiImplicitParam(name = "patientId", value = "居民业务主键", required = true, dataTypeClass = String.class)
public R<List<SelectVo>> TimelineList(@PathVariable("patientId") String patientId) {
return R.ok(screeningRecordService.getTimelineList(patientId));
}
@GetMapping("/receive/{screeningId}")
@ -109,7 +109,7 @@ public class ScreeningRecordController extends BaseController {
@RepeatSubmit(interval = 2000, message = "请求过于频繁")
public R<String> pushScreening(@RequestBody ScreeningRecordSaveDTO body) {
try {
if (StringUtils.isBlank(body.getRegisterId())) {
if (StringUtils.isBlank(body.getPatientId())) {
return R.fail("请选择居民!");
}
if (CollectionUtils.isEmpty(body.getProjectList())) {

View File

@ -1,9 +1,8 @@
package com.xinelu.manage.domain.schedule;
import com.xinelu.common.core.domain.BaseDomain;
import io.swagger.annotations.ApiModel;
import java.io.Serializable;
import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.xinelu.common.core.domain.BaseEntity;
import java.time.LocalTime;
import lombok.Data;
/**
@ -11,8 +10,7 @@ import lombok.Data;
* @TableName schedule
*/
@Data
@ApiModel(value = "排班表对象", description = "schedule")
public class Schedule extends BaseDomain implements Serializable {
public class Schedule extends BaseEntity {
/**
* 主键
*/
@ -36,22 +34,37 @@ public class Schedule extends BaseDomain implements Serializable {
/**
* 班次上午开始时间
*/
private Date forenoonStartTime;
@JsonFormat(timezone = "GMT+8", pattern = "HH:mm")
private LocalTime forenoonStartTime;
/**
* 班次上午结束时间
*/
private Date forenoonEndTime;
@JsonFormat(timezone = "GMT+8", pattern = "HH:mm")
private LocalTime forenoonEndTime;
/**
* 班次下午开始时间
*/
private Date afternoonStartTime;
@JsonFormat(timezone = "GMT+8", pattern = "HH:mm")
private LocalTime afternoonStartTime;
/**
* 班次下午结束时间
*/
private Date afternoonEndTime;
@JsonFormat(timezone = "GMT+8", pattern = "HH:mm")
private LocalTime afternoonEndTime;
/**
* 启用状态0正常 1停用
*/
private String status;
/**
* 删除标志0代表存在 1代表删除
*/
private String delFlag;
private static final long serialVersionUID = 1L;
}

View File

@ -1,7 +1,7 @@
package com.xinelu.manage.domain.scheduleplan;
import com.xinelu.common.core.domain.BaseEntity;
import java.util.Date;
import java.time.LocalDate;
import lombok.Data;
/**
@ -58,12 +58,12 @@ public class SchedulePlan extends BaseEntity {
/**
* 排班开始日期
*/
private Date scheduleStartDate;
private LocalDate scheduleStartDate;
/**
* 排班结束日期
*/
private Date scheduleEndDate;
private LocalDate scheduleEndDate;
/**
* 每人可预约分钟数
@ -80,6 +80,16 @@ public class SchedulePlan extends BaseEntity {
*/
private String scheduleAddress;
/**
* 启用状态0正常 1停用
*/
private String status;
/**
* 删除标志0代表存在 1代表删除
*/
private String delFlag;
private static final long serialVersionUID = 1L;
}

View File

@ -1,7 +1,8 @@
package com.xinelu.manage.domain.scheduleplandetail;
import java.io.Serializable;
import java.util.Date;
import java.time.LocalDate;
import java.time.LocalTime;
import lombok.Data;
/**
@ -33,17 +34,17 @@ public class SchedulePlanDetail implements Serializable {
/**
* 排班日期
*/
private Date scheduleDate;
private LocalDate scheduleDate;
/**
* 开始时间
*/
private Date scheduleStartTime;
private LocalTime scheduleStartTime;
/**
* 结束时间
*/
private Date scheduleEndTime;
private LocalTime scheduleEndTime;
/**
* 预约状态0:未预约1已预约

View File

@ -26,13 +26,13 @@ public class ScreeningRecord implements Serializable {
* 居民业务主键
*/
@ApiModelProperty("居民业务主键")
private String registerId;
private String patientId;
/**
* 居民姓名
*/
@ApiModelProperty("居民姓名")
private String residentName;
private String patientName;
/**
* 状态1已预约 2取消预约 3已登记 4已完成

View File

@ -0,0 +1,13 @@
package com.xinelu.manage.dto.scheduleplan;
import io.swagger.annotations.ApiModel;
/**
* @description: 医生排班计划保存传输对象
* @author: haown
* @create: 2023-09-22 10:32
**/
@ApiModel("医生排班计划保存传输对象")
public class SchedulePlanSaveDTO {
}

View File

@ -22,7 +22,7 @@ public class ScreeningApplyDTO implements Serializable {
* 居民业务主键
*/
@ApiModelProperty(value = "居民业务主键")
private String registerId;
private String patientId;
@ApiModelProperty(value = "居民身份证号")
private String identity;

View File

@ -28,7 +28,7 @@ public class ScreeningRecordApplyDTO implements Serializable {
* 居民业务主键
*/
@ApiModelProperty(value = "居民业务主键", required = true)
private String registerId;
private String patientId;
/**
* 居民姓名

View File

@ -22,7 +22,7 @@ public class ScreeningRecordDTO extends BaseEntity {
* 居民业务主键
*/
@ApiModelProperty(value = "居民业务主键")
private String registerId;
private String patientId;
/**
* 居民姓名

View File

@ -16,7 +16,7 @@ import lombok.Data;
public class ScreeningRecordSaveDTO {
@ApiModelProperty("居民业务主键")
private String registerId;
private String patientId;
@ApiModelProperty("筛查项目列表")
private List<ScreeningProject> projectList;

View File

@ -1,11 +1,12 @@
package com.xinelu.manage.mapper.schedule;
import com.xinelu.manage.domain.schedule.Schedule;
import java.util.List;
/**
* @author Administrator
* @author haown
* @description 针对表schedule(排班班次表)的数据库操作Mapper
* @createDate 2023-09-21 10:16:44
* @createDate 2023-09-22 09:43:30
* @Entity com.xinelu.manage.domain.schedule.Schedule
*/
public interface ScheduleMapper {
@ -22,4 +23,6 @@ public interface ScheduleMapper {
int updateByPrimaryKey(Schedule record);
List<Schedule> getList(Schedule schedule);
}

View File

@ -1,11 +1,12 @@
package com.xinelu.manage.mapper.scheduleplan;
import com.xinelu.manage.domain.scheduleplan.SchedulePlan;
import java.util.List;
/**
* @author haown
* @author Administrator
* @description 针对表schedule_plan(医生排班计划表)的数据库操作Mapper
* @createDate 2023-09-21 17:17:23
* @createDate 2023-09-22 09:45:24
* @Entity com.xinelu.manage.domain.scheduleplan.SchedulePlan
*/
public interface SchedulePlanMapper {
@ -22,4 +23,5 @@ public interface SchedulePlanMapper {
int updateByPrimaryKey(SchedulePlan record);
List<SchedulePlan> getList(SchedulePlan record);
}

View File

@ -1,6 +1,7 @@
package com.xinelu.manage.mapper.scheduleplandetail;
import com.xinelu.manage.domain.scheduleplandetail.SchedulePlanDetail;
import java.util.List;
/**
* @author haown
@ -22,4 +23,6 @@ public interface SchedulePlanDetailMapper {
int updateByPrimaryKey(SchedulePlanDetail record);
int batchInsert(List<SchedulePlanDetail> record);
}

View File

@ -57,10 +57,10 @@ public interface ScreeningRecordMapper {
* @Author mengkuiliang
* @Description 获取当前居民预约信息
* @Date 2023-01-29 14:51
* @Param [registerId]
* @Param [patientId]
* @return com.disease.business.domain.vo.ScreeningRecordVo
**/
ScreeningRecordVo getScreeningByRegisterId(String registerId);
ScreeningRecordVo getScreeningByPatientId(String patientId);
/**
* @Author mengkuiliang
@ -84,14 +84,14 @@ public interface ScreeningRecordMapper {
* @Author mengkuiliang
* @Description 获取最新一次筛查结果
* @Date 2023-01-30 13:07
* @Param [registerId]
* @Param [patientId]
* @return com.disease.business.domain.vo.ScreeningRecordVo
**/
ScreeningRecordVo getScreeningOfLast(@Param("registerId") String registerId, @Param("screeningStatus")String screeningStatus, @Param("screeningType") String screeningType, @Param("projectId") String projectId);
ScreeningRecordVo getScreeningOfLast(@Param("patientId") String patientId, @Param("screeningStatus")String screeningStatus, @Param("screeningType") String screeningType, @Param("projectId") String projectId);
ScreeningRecord selectByScreeningId(String screeningId);
List<TimelineVo> selectTimeLineList(@Param("registerId") String registerId);
List<TimelineVo> selectTimeLineList(@Param("patientId") String patientId);
List<ScreeningRecordVo> screeningList(ScreeningRecordDTO query);
}

View File

@ -0,0 +1,20 @@
package com.xinelu.manage.service.schedule;
import com.xinelu.manage.domain.schedule.Schedule;
import java.util.List;
/**
* @author haown
* @description 针对表schedule(排班班次表)的数据库操作Service
* @createDate 2023-09-21 10:12:22
*/
public interface IScheduleService {
int save(Schedule schedule);
int update(Schedule schedule);
int delete(long id);
List<Schedule> getList(Schedule schedule);
}

View File

@ -1,10 +0,0 @@
package com.xinelu.manage.service.schedule;
/**
* @author haown
* @description 针对表schedule(排班班次表)的数据库操作Service
* @createDate 2023-09-21 10:12:22
*/
public interface ScheduleService {
}

View File

@ -1,16 +1,49 @@
package com.xinelu.manage.service.schedule.impl;
import com.xinelu.manage.service.schedule.ScheduleService;
import com.xinelu.common.utils.SecurityUtils;
import com.xinelu.manage.domain.schedule.Schedule;
import com.xinelu.manage.mapper.schedule.ScheduleMapper;
import com.xinelu.manage.service.schedule.IScheduleService;
import java.util.Date;
import java.util.List;
import javax.annotation.Resource;
import org.springframework.stereotype.Service;
/**
* @author Administrator
* @author haown
* @description 针对表schedule(排班班次表)的数据库操作Service实现
* @createDate 2023-09-21 10:12:22
*/
@Service
public class ScheduleServiceImpl implements ScheduleService {
public class ScheduleServiceImpl implements IScheduleService {
@Resource
private ScheduleMapper scheduleMapper;
@Override public int save(Schedule schedule) {
schedule.setCreateBy(SecurityUtils.getLoginUser().getUser().getNickName());
schedule.setCreateTime(new Date());
return scheduleMapper.insertSelective(schedule);
}
@Override public int update(Schedule schedule) {
schedule.setUpdateBy(SecurityUtils.getLoginUser().getUser().getNickName());
schedule.setUpdateTime(new Date());
return scheduleMapper.updateByPrimaryKeySelective(schedule);
}
@Override public int delete(long id) {
Schedule schedule = new Schedule();
schedule.setId(id);
schedule.setDelFlag("1");
schedule.setUpdateBy(SecurityUtils.getLoginUser().getUser().getNickName());
schedule.setUpdateTime(new Date());
return scheduleMapper.updateByPrimaryKeySelective(schedule);
}
@Override public List<Schedule> getList(Schedule schedule) {
return scheduleMapper.getList(schedule);
}
}

View File

@ -0,0 +1,18 @@
package com.xinelu.manage.service.scheduleplan;
import com.xinelu.manage.domain.scheduleplan.SchedulePlan;
import java.util.List;
/**
* @author haown
* @description 针对表schedule_plan(医生排班计划表)的数据库操作Service
* @createDate 2023-09-21 17:16:40
*/
public interface ISchedulePlanService {
List<SchedulePlan> getList(SchedulePlan schedulePlan);
int save(SchedulePlan schedulePlan) throws Exception;
}

View File

@ -1,10 +0,0 @@
package com.xinelu.manage.service.scheduleplan;
/**
* @author haown
* @description 针对表schedule_plan(医生排班计划表)的数据库操作Service
* @createDate 2023-09-21 17:16:40
*/
public interface SchedulePlanService {
}

View File

@ -1,7 +1,21 @@
package com.xinelu.manage.service.scheduleplan.impl;
import com.xinelu.manage.service.scheduleplan.SchedulePlanService;
import com.xinelu.common.utils.StringUtils;
import com.xinelu.common.utils.bean.BeanUtils;
import com.xinelu.manage.domain.schedule.Schedule;
import com.xinelu.manage.domain.scheduleplan.SchedulePlan;
import com.xinelu.manage.domain.scheduleplandetail.SchedulePlanDetail;
import com.xinelu.manage.mapper.schedule.ScheduleMapper;
import com.xinelu.manage.mapper.scheduleplan.SchedulePlanMapper;
import com.xinelu.manage.mapper.scheduleplandetail.SchedulePlanDetailMapper;
import com.xinelu.manage.service.scheduleplan.ISchedulePlanService;
import java.time.LocalTime;
import java.time.temporal.ChronoUnit;
import java.util.ArrayList;
import java.util.List;
import javax.annotation.Resource;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
/**
* @author haown
@ -9,8 +23,94 @@ import org.springframework.stereotype.Service;
* @createDate 2023-09-21 17:16:40
*/
@Service
public class SchedulePlanServiceImpl implements SchedulePlanService{
public class SchedulePlanServiceImpl implements ISchedulePlanService {
@Resource
private SchedulePlanMapper schedulePlanMapper;
@Resource
private ScheduleMapper scheduleMapper;
@Resource
private SchedulePlanDetailMapper planDetailMapper;
@Override public List<SchedulePlan> getList(SchedulePlan schedulePlan) {
return schedulePlanMapper.getList(schedulePlan);
}
@Override
@Transactional(rollbackFor = Exception.class)
public int save(SchedulePlan schedulePlan) throws Exception {
// 保存排班计划
schedulePlan.setDelFlag("0");
if (StringUtils.isBlank(schedulePlan.getStatus())) {
schedulePlan.setStatus("1");
}
int flag = schedulePlanMapper.insert(schedulePlan);
Schedule schedule = scheduleMapper.selectByPrimaryKey(schedulePlan.getScheduleId());
if (flag > 0) {
// 计算排班天数
long days = ChronoUnit.DAYS.between(schedulePlan.getScheduleStartDate(), schedulePlan.getScheduleEndDate());
for (int i = 0; i <= days; i++) {
int patientsPerDay = 0;
// 排班计划明细
List<SchedulePlanDetail> detailList = new ArrayList<>();
SchedulePlanDetail schedulePlanDetail = new SchedulePlanDetail();
schedulePlanDetail.setSchedulePlanId(schedulePlan.getId());
schedulePlanDetail.setScheduleDate(schedulePlan.getScheduleStartDate().plusDays(i));
// 生成上午计划
if (schedule.getForenoonStartTime() != null && schedule.getForenoonEndTime() != null) {
// 根据时间间隔计算时间段
long forenoonMinutes = ChronoUnit.MINUTES.between(schedule.getForenoonStartTime(), schedule.getForenoonEndTime());
if (forenoonMinutes % schedulePlan.getMinutesPerPatient() == 0) {
int number = (int) (forenoonMinutes / schedulePlan.getMinutesPerPatient());
patientsPerDay += forenoonMinutes / schedulePlan.getMinutesPerPatient();
detailList.addAll(genPlanDetail(schedulePlanDetail, number, schedule.getForenoonStartTime(), schedulePlan.getMinutesPerPatient()));
} else {
throw new Exception("上午上班时间不是每人可预约分钟数的倍数。");
}
}
// 生成下午计划
if (schedule.getAfternoonStartTime() != null && schedule.getAfternoonEndTime() != null) {
// 根据时间间隔计算时间段
long afternoonMinutes = ChronoUnit.MINUTES.between(schedule.getAfternoonStartTime(), schedule.getAfternoonEndTime());
if (afternoonMinutes % schedulePlan.getMinutesPerPatient() == 0) {
int number = (int) (afternoonMinutes / schedulePlan.getMinutesPerPatient());
patientsPerDay += afternoonMinutes / schedulePlan.getMinutesPerPatient();
detailList.addAll(genPlanDetail(schedulePlanDetail, number, schedule.getAfternoonStartTime(), schedulePlan.getMinutesPerPatient()));
} else {
throw new Exception("上午上班时间不是每人可预约分钟数的倍数。");
}
}
// 保存计划明细
planDetailMapper.batchInsert(detailList);
schedulePlan.setPatientsPerDay(patientsPerDay);
schedulePlanMapper.updateByPrimaryKey(schedulePlan);
}
}
return flag;
}
/**
* 生成计划明细
* @param number人数
* @param startTime开始时间
* @return
*/
private List<SchedulePlanDetail> genPlanDetail(SchedulePlanDetail schedulePlanDetail, int number, LocalTime startTime, int minutesPerPatient) {
List<SchedulePlanDetail> planDetails = new ArrayList<>();
for (int i = 0; i < number; i++) {
SchedulePlanDetail planDetail = new SchedulePlanDetail();
BeanUtils.copyBeanProp(planDetail, schedulePlanDetail);
planDetail.setScheduleStartTime(startTime.plusMinutes((long) minutesPerPatient * i));
planDetail.setScheduleEndTime(startTime.plusMinutes((long) minutesPerPatient * (i + 1)));
planDetail.setApplyState("0");
planDetails.add(planDetail);
}
return planDetails;
}
}

View File

@ -1,10 +1,14 @@
package com.xinelu.manage.service.scheduleplandetail;
import com.xinelu.manage.domain.scheduleplandetail.SchedulePlanDetail;
/**
* @author haown
* @description 针对表schedule_plan_detail(医生排班计划明细表)的数据库操作Service
* @createDate 2023-09-21 17:21:38
*/
public interface SchedulePlanDetailService {
public interface ISchedulePlanDetailService {
int save(SchedulePlanDetail planDetail);
}

View File

@ -1,6 +1,9 @@
package com.xinelu.manage.service.scheduleplandetail.impl;
import com.xinelu.manage.service.scheduleplandetail.SchedulePlanDetailService;
import com.xinelu.manage.domain.scheduleplandetail.SchedulePlanDetail;
import com.xinelu.manage.mapper.scheduleplandetail.SchedulePlanDetailMapper;
import com.xinelu.manage.service.scheduleplandetail.ISchedulePlanDetailService;
import javax.annotation.Resource;
import org.springframework.stereotype.Service;
/**
@ -9,8 +12,14 @@ import org.springframework.stereotype.Service;
* @createDate 2023-09-21 17:21:38
*/
@Service
public class SchedulePlanDetailServiceImpl implements SchedulePlanDetailService{
public class SchedulePlanDetailServiceImpl implements ISchedulePlanDetailService {
@Resource
private SchedulePlanDetailMapper planDetailMapper;
@Override public int save(SchedulePlanDetail planDetail) {
return planDetailMapper.insert(planDetail);
}
}

View File

@ -98,25 +98,25 @@ public interface IScreeningRecordService {
* @Param
* @return
**/
ScreeningRecordVo getScreeningByRegisterId(String registerId);
ScreeningRecordVo getScreeningByPatientId(String patientId);
/**
* @Author mengkuiliang
* @Description 获取最新一次筛查结果
* @Date 2023-01-30 11:45
* @Param [registerId]
* @Param [patientId]
* @return void
**/
ScreeningRecordVo last(String registerId,String projectId);
ScreeningRecordVo last(String patientId,String projectId);
/**
* @Author haown
* @Description 获取居民筛查记录时间轴
* @Date 2023-02-06 20:49
* @Param [registerId]
* @Param [patientId]
* @return void
**/
List<SelectVo> getTimelineList(String registerId);
List<SelectVo> getTimelineList(String patientId);
Integer pushScreening(ScreeningRecordSaveDTO body) throws Exception;

View File

@ -96,7 +96,7 @@ public class ScreeningRecordServiceImpl implements IScreeningRecordService {
}
// 查询 同一机构的同一筛查项目在同一天是否有预约
ScreeningRecordDTO query = new ScreeningRecordDTO();
query.setRegisterId(body.getRegisterId());
query.setPatientId(body.getPatientId());
query.setDeptId(body.getDeptId());
query.setProjectId(body.getProjectId());
query.setApplyStartDate(body.getApplyStartTime());
@ -131,7 +131,7 @@ public class ScreeningRecordServiceImpl implements IScreeningRecordService {
// .fluentPut("contentId", recordBody.getScreeningId());
//FdmpPushMegUtil.sendPost(jsonObject);
}
return body.getRegisterId();
return body.getPatientId();
}
@Override
@ -144,7 +144,7 @@ public class ScreeningRecordServiceImpl implements IScreeningRecordService {
int flag = screeningRecordMapper.update(body);
if (flag > 0) {
// TODO 推送提醒
//PatientInfoVO patientInfoVO = patientService.selectPatientInfoById(body.getRegisterId());
//PatientInfoVO patientInfoVO = patientService.selectPatientInfoById(body.getPatientId());
//JSONObject jsonObject = new JSONObject();
//jsonObject.fluentPut("senderNo", SecurityUtils.getUserId())
// .fluentPut("senderName", SecurityUtils.getLoginUser().getUser().getNickName())
@ -241,8 +241,8 @@ public class ScreeningRecordServiceImpl implements IScreeningRecordService {
* @return com.disease.business.domain.vo.ScreeningRecordVo
**/
@Override
public ScreeningRecordVo getScreeningByRegisterId(String registerId) {
ScreeningRecordVo recordVo = screeningRecordMapper.getScreeningByRegisterId(registerId);
public ScreeningRecordVo getScreeningByPatientId(String patientId) {
ScreeningRecordVo recordVo = screeningRecordMapper.getScreeningByPatientId(patientId);
if(recordVo == null) {
return null;
}
@ -254,12 +254,12 @@ public class ScreeningRecordServiceImpl implements IScreeningRecordService {
* @Author mengkuiliang
* @Description 获取最新一次筛查结果
* @Date 2023-01-30 11:46
* @Param [registerId]
* @Param [patientId]
* @return com.disease.business.domain.vo.ProjectRecordVo
**/
@Override
public ScreeningRecordVo last(String registerId,String projectId) {
ScreeningRecordVo recordVo = screeningRecordMapper.getScreeningOfLast(registerId, null, "1",projectId);
public ScreeningRecordVo last(String patientId,String projectId) {
ScreeningRecordVo recordVo = screeningRecordMapper.getScreeningOfLast(patientId, null, "1",projectId);
if(recordVo == null) {
return null;
}
@ -275,8 +275,8 @@ public class ScreeningRecordServiceImpl implements IScreeningRecordService {
return recordVo;
}
@Override public List<SelectVo> getTimelineList(String registerId) {
List<TimelineVo> timelineVos = screeningRecordMapper.selectTimeLineList(registerId);
@Override public List<SelectVo> getTimelineList(String patientId) {
List<TimelineVo> timelineVos = screeningRecordMapper.selectTimeLineList(patientId);
// 按照年份进行分组
Map<String, List<TimelineVo>> groupByTime = timelineVos.stream().collect(Collectors.groupingBy(item-> DateUtils.formatDate(item.getCreateTime(), "yyyy")));
List<SelectVo> timeList = new ArrayList<>();
@ -304,7 +304,7 @@ public class ScreeningRecordServiceImpl implements IScreeningRecordService {
String assessRecordId = "";
// 查询居民最新一次评估记录
//List<RiskAssessRecord> riskAssessRecords = riskAssessRecordMapper.selectByPatientId(body.getRegisterId());
//List<RiskAssessRecord> riskAssessRecords = riskAssessRecordMapper.selectByPatientId(body.getPatientId());
//if (riskAssessRecords != null && riskAssessRecords.size() > 0) {
// RiskAssessRecord riskAssessRecord = riskAssessRecords.get(riskAssessRecords.size() - 1);
// if (riskAssessRecord != null) {
@ -319,7 +319,7 @@ public class ScreeningRecordServiceImpl implements IScreeningRecordService {
screeningRecord.setScreeningId(IdUtils.fastSimpleUUID());
screeningRecord.setProjectId(project.getProjectId());
screeningRecord.setProjectName(project.getProjectName());
screeningRecord.setRegisterId(body.getRegisterId());
screeningRecord.setPatientId(body.getPatientId());
// TODO 用户id
//screeningRecord.setDoctorId(SecurityUtils.getUserId());
screeningRecord.setDoctorName(SecurityUtils.getLoginUser().getUser().getNickName());
@ -334,7 +334,7 @@ public class ScreeningRecordServiceImpl implements IScreeningRecordService {
if (flag > 0) {
// TODO 推送消息通知
//JSONObject jsonObject = new JSONObject();
//RegisterVo register = registerService.getByRegisterId(body.getRegisterId());
//RegisterVo register = registerService.getByPatientId(body.getPatientId());
//jsonObject.fluentPut("senderNo", SecurityUtils.getUserId())
// .fluentPut("senderName", SecurityUtils.getLoginUser().getUser().getNickName())
// .fluentPut("doctorName", SecurityUtils.getLoginUser().getUser().getNickName())
@ -362,7 +362,7 @@ public class ScreeningRecordServiceImpl implements IScreeningRecordService {
retObject.fluentPut("projectName", String.join("," , projectName))
.fluentPut("doctorName", screeningRecordVoList.get(0).getDoctorName());
// TODO 居民信息
//PatientInfoVO patientInfoVO = patientService.selectPatientInfoById(screeningRecordVoList.get(0).getRegisterId());
//PatientInfoVO patientInfoVO = patientService.selectPatientInfoById(screeningRecordVoList.get(0).getPatientId());
//retObject.fluentPut("name", patientInfoVO.getPatientName());
}

View File

@ -32,13 +32,13 @@ public class ScreeningRecordVo {
* 居民业务主键
*/
@ApiModelProperty("居民业务主键")
private String registerId;
private String patientId;
/**
* 居民姓名
*/
@ApiModelProperty("居民姓名")
private String residentName;
private String patientName;
/**
* 性别1 2

View File

@ -13,6 +13,8 @@
<result property="forenoonEndTime" column="forenoon_end_time" jdbcType="TIME"/>
<result property="afternoonStartTime" column="afternoon_start_time" jdbcType="TIME"/>
<result property="afternoonEndTime" column="afternoon_end_time" jdbcType="TIME"/>
<result property="status" column="status" jdbcType="CHAR"/>
<result property="delFlag" column="del_flag" jdbcType="CHAR"/>
<result property="createBy" column="create_by" jdbcType="VARCHAR"/>
<result property="createTime" column="create_time" jdbcType="TIMESTAMP"/>
<result property="updateBy" column="update_by" jdbcType="VARCHAR"/>
@ -22,8 +24,9 @@
<sql id="Base_Column_List">
id,hospital_id,hospital_name,
schedule_name,forenoon_start_time,forenoon_end_time,
afternoon_start_time,afternoon_end_time,create_by,
create_time,update_by,update_time
afternoon_start_time,afternoon_end_time,status,
del_flag,create_by,create_time,
update_by,update_time
</sql>
<select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
@ -41,14 +44,14 @@
insert into schedule
( id,hospital_id,hospital_name
,schedule_name,forenoon_start_time,forenoon_end_time
,afternoon_start_time,afternoon_end_time,create_by
,create_time,update_by,update_time
)
,afternoon_start_time,afternoon_end_time,status
,del_flag,create_by,create_time
,update_by,update_time)
values (#{id,jdbcType=BIGINT},#{hospitalId,jdbcType=BIGINT},#{hospitalName,jdbcType=VARCHAR}
,#{scheduleName,jdbcType=VARCHAR},#{forenoonStartTime,jdbcType=TIME},#{forenoonEndTime,jdbcType=TIME}
,#{afternoonStartTime,jdbcType=TIME},#{afternoonEndTime,jdbcType=TIME},#{createBy,jdbcType=VARCHAR}
,#{createTime,jdbcType=TIMESTAMP},#{updateBy,jdbcType=VARCHAR},#{updateTime,jdbcType=TIMESTAMP}
)
,#{afternoonStartTime,jdbcType=TIME},#{afternoonEndTime,jdbcType=TIME},#{status,jdbcType=CHAR}
,#{delFlag,jdbcType=CHAR},#{createBy,jdbcType=VARCHAR},#{createTime,jdbcType=TIMESTAMP}
,#{updateBy,jdbcType=VARCHAR},#{updateTime,jdbcType=TIMESTAMP})
</insert>
<insert id="insertSelective" keyColumn="id" keyProperty="id" parameterType="com.xinelu.manage.domain.schedule.Schedule" useGeneratedKeys="true">
insert into schedule
@ -61,6 +64,8 @@
<if test="forenoonEndTime != null">forenoon_end_time,</if>
<if test="afternoonStartTime != null">afternoon_start_time,</if>
<if test="afternoonEndTime != null">afternoon_end_time,</if>
<if test="status != null">status,</if>
<if test="delFlag != null">del_flag,</if>
<if test="createBy != null">create_by,</if>
<if test="createTime != null">create_time,</if>
<if test="updateBy != null">update_by,</if>
@ -75,6 +80,8 @@
<if test="forenoonEndTime != null">#{forenoonEndTime,jdbcType=TIME},</if>
<if test="afternoonStartTime != null">#{afternoonStartTime,jdbcType=TIME},</if>
<if test="afternoonEndTime != null">#{afternoonEndTime,jdbcType=TIME},</if>
<if test="status != null">#{status,jdbcType=CHAR},</if>
<if test="delFlag != null">#{delFlag,jdbcType=CHAR},</if>
<if test="createBy != null">#{createBy,jdbcType=VARCHAR},</if>
<if test="createTime != null">#{createTime,jdbcType=TIMESTAMP},</if>
<if test="updateBy != null">#{updateBy,jdbcType=VARCHAR},</if>
@ -105,6 +112,12 @@
<if test="afternoonEndTime != null">
afternoon_end_time = #{afternoonEndTime,jdbcType=TIME},
</if>
<if test="status != null">
status = #{status,jdbcType=CHAR},
</if>
<if test="delFlag != null">
del_flag = #{delFlag,jdbcType=CHAR},
</if>
<if test="createBy != null">
create_by = #{createBy,jdbcType=VARCHAR},
</if>
@ -130,10 +143,30 @@
forenoon_end_time = #{forenoonEndTime,jdbcType=TIME},
afternoon_start_time = #{afternoonStartTime,jdbcType=TIME},
afternoon_end_time = #{afternoonEndTime,jdbcType=TIME},
status = #{status,jdbcType=CHAR},
del_flag = #{delFlag,jdbcType=CHAR},
create_by = #{createBy,jdbcType=VARCHAR},
create_time = #{createTime,jdbcType=TIMESTAMP},
update_by = #{updateBy,jdbcType=VARCHAR},
update_time = #{updateTime,jdbcType=TIMESTAMP}
where id = #{id,jdbcType=BIGINT}
</update>
<select id="getList" parameterType="com.xinelu.manage.domain.schedule.Schedule" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from schedule
<where>
del_flag = '0'
<if test="hospitalId != null">
and hospital_id = #{hospitalId,jdbcType=BIGINT}
</if>
<if test="hospitalName != null">
and hospital_name like concat('%', #{hospitalName}, '%')
</if>
<if test="scheduleName != null">
and schedule_name like concat('%', #{scheduleName}, '%')
</if>
</where>
</select>
</mapper>

View File

@ -19,6 +19,8 @@
<result property="minutesPerPatient" column="minutes_per_patient" jdbcType="INTEGER"/>
<result property="patientsPerDay" column="patients_per_day" jdbcType="INTEGER"/>
<result property="scheduleAddress" column="schedule_address" jdbcType="VARCHAR"/>
<result property="status" column="status" jdbcType="CHAR"/>
<result property="delFlag" column="del_flag" jdbcType="CHAR"/>
<result property="createBy" column="create_by" jdbcType="VARCHAR"/>
<result property="createTime" column="create_time" jdbcType="TIMESTAMP"/>
<result property="updateBy" column="update_by" jdbcType="VARCHAR"/>
@ -30,8 +32,9 @@
department_id,department_name,schedule_id,
schedule_name,doctor_id,doctor_name,
schedule_start_date,schedule_end_date,minutes_per_patient,
patients_per_day,schedule_address,create_by,
create_time,update_by,update_time
patients_per_day,schedule_address,status,
del_flag,create_by,create_time,
update_by,update_time
</sql>
<select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
@ -51,16 +54,16 @@
,department_id,department_name,schedule_id
,schedule_name,doctor_id,doctor_name
,schedule_start_date,schedule_end_date,minutes_per_patient
,patients_per_day,schedule_address,create_by
,create_time,update_by,update_time
)
,patients_per_day,schedule_address,status
,del_flag,create_by,create_time
,update_by,update_time)
values (#{id,jdbcType=BIGINT},#{hospitalId,jdbcType=BIGINT},#{hospitalName,jdbcType=VARCHAR}
,#{departmentId,jdbcType=BIGINT},#{departmentName,jdbcType=VARCHAR},#{scheduleId,jdbcType=BIGINT}
,#{scheduleName,jdbcType=VARCHAR},#{doctorId,jdbcType=BIGINT},#{doctorName,jdbcType=VARCHAR}
,#{scheduleStartDate,jdbcType=DATE},#{scheduleEndDate,jdbcType=DATE},#{minutesPerPatient,jdbcType=INTEGER}
,#{patientsPerDay,jdbcType=INTEGER},#{scheduleAddress,jdbcType=VARCHAR},#{createBy,jdbcType=VARCHAR}
,#{createTime,jdbcType=TIMESTAMP},#{updateBy,jdbcType=VARCHAR},#{updateTime,jdbcType=TIMESTAMP}
)
,#{patientsPerDay,jdbcType=INTEGER},#{scheduleAddress,jdbcType=VARCHAR},#{status,jdbcType=CHAR}
,#{delFlag,jdbcType=CHAR},#{createBy,jdbcType=VARCHAR},#{createTime,jdbcType=TIMESTAMP}
,#{updateBy,jdbcType=VARCHAR},#{updateTime,jdbcType=TIMESTAMP})
</insert>
<insert id="insertSelective" keyColumn="id" keyProperty="id" parameterType="com.xinelu.manage.domain.scheduleplan.SchedulePlan" useGeneratedKeys="true">
insert into schedule_plan
@ -79,6 +82,8 @@
<if test="minutesPerPatient != null">minutes_per_patient,</if>
<if test="patientsPerDay != null">patients_per_day,</if>
<if test="scheduleAddress != null">schedule_address,</if>
<if test="status != null">status,</if>
<if test="delFlag != null">del_flag,</if>
<if test="createBy != null">create_by,</if>
<if test="createTime != null">create_time,</if>
<if test="updateBy != null">update_by,</if>
@ -99,6 +104,8 @@
<if test="minutesPerPatient != null">#{minutesPerPatient,jdbcType=INTEGER},</if>
<if test="patientsPerDay != null">#{patientsPerDay,jdbcType=INTEGER},</if>
<if test="scheduleAddress != null">#{scheduleAddress,jdbcType=VARCHAR},</if>
<if test="status != null">#{status,jdbcType=CHAR},</if>
<if test="delFlag != null">#{delFlag,jdbcType=CHAR},</if>
<if test="createBy != null">#{createBy,jdbcType=VARCHAR},</if>
<if test="createTime != null">#{createTime,jdbcType=TIMESTAMP},</if>
<if test="updateBy != null">#{updateBy,jdbcType=VARCHAR},</if>
@ -147,6 +154,12 @@
<if test="scheduleAddress != null">
schedule_address = #{scheduleAddress,jdbcType=VARCHAR},
</if>
<if test="status != null">
status = #{status,jdbcType=CHAR},
</if>
<if test="delFlag != null">
del_flag = #{delFlag,jdbcType=CHAR},
</if>
<if test="createBy != null">
create_by = #{createBy,jdbcType=VARCHAR},
</if>
@ -178,10 +191,32 @@
minutes_per_patient = #{minutesPerPatient,jdbcType=INTEGER},
patients_per_day = #{patientsPerDay,jdbcType=INTEGER},
schedule_address = #{scheduleAddress,jdbcType=VARCHAR},
status = #{status,jdbcType=CHAR},
del_flag = #{delFlag,jdbcType=CHAR},
create_by = #{createBy,jdbcType=VARCHAR},
create_time = #{createTime,jdbcType=TIMESTAMP},
update_by = #{updateBy,jdbcType=VARCHAR},
update_time = #{updateTime,jdbcType=TIMESTAMP}
where id = #{id,jdbcType=BIGINT}
</update>
<select id="getList" parameterType="com.xinelu.manage.domain.scheduleplan.SchedulePlan" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from schedule_plan
<where>
del_flag = '0'
<if test="hospitalId != null">
and hospital_id = #{hospitalId,jdbcType=BIGINT}
</if>
<if test="departmentId != null">
and department_id = #{departmentId,jdbcType=BIGINT}
</if>
<if test="scheduleId != null">
and schedule_id = #{scheduleId,jdbcType=BIGINT}
</if>
<if test="doctorId != null">
and doctor_id = #{doctorId,jdbcType=BIGINT}
</if>
</where>
</select>
</mapper>

View File

@ -103,4 +103,16 @@
apply_state = #{applyState,jdbcType=VARCHAR}
where id = #{id,jdbcType=BIGINT}
</update>
<insert id="batchInsert" keyColumn="id" keyProperty="id" parameterType="com.xinelu.manage.domain.scheduleplandetail.SchedulePlanDetail" useGeneratedKeys="true">
insert into schedule_plan_detail
(schedule_plan_id,doctor_id
,doctor_name,schedule_date,schedule_start_time
,schedule_end_time,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})
</foreach>
</insert>
</mapper>

View File

@ -7,7 +7,7 @@
<resultMap id="BaseResultMap" type="com.xinelu.manage.domain.screeningrecord.ScreeningRecord">
<id property="id" column="id" jdbcType="BIGINT"/>
<result property="screeningId" column="screening_id" jdbcType="VARCHAR"/>
<result property="registerId" column="register_id" jdbcType="VARCHAR"/>
<result property="patientId" column="patient_id" jdbcType="VARCHAR"/>
<result property="screeningStatus" column="screening_status" jdbcType="VARCHAR"/>
<result property="disease" column="disease" jdbcType="VARCHAR"/>
<result property="deptId" column="dept_id" jdbcType="VARCHAR"/>
@ -35,7 +35,7 @@
</resultMap>
<sql id="Base_Column_List">
id,screening_id,register_id,screening_status,
id,screening_id,patient_id,screening_status,
disease,dept_id,IFNULL(dept_name, '') as dept_name,
project_id, project_name,
apply_start_time,apply_end_time, screening_date,
@ -45,7 +45,7 @@
</sql>
<sql id="Insert_Column">
screening_id,register_id,screening_status,
screening_id,patient_id,screening_status,
disease,dept_id,dept_name,
project_id, project_name,
apply_start_time, apply_end_time, screening_date,
@ -56,7 +56,7 @@
<!-- 新增 -->
<insert id="insert">
insert into sd_screening_record (<include refid="Insert_Column"></include>)
values (#{screeningId}, #{registerId}, #{screeningStatus},
values (#{screeningId}, #{patientId}, #{screeningStatus},
#{disease}, #{deptId}, #{deptName},
#{projectId},#{projectName},
#{applyStartTime}, #{applyEndTime},#{screeningDate},
@ -156,9 +156,9 @@
</select>
<!-- 获取当前居民预约信息 -->
<select id="getScreeningByRegisterId" 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
where register_id = #{registerId} and screening_status in ('1', '3')
where patient_id = #{patientId} and screening_status in ('1', '3')
and screening_type = '1'
limit 1
</select>
@ -167,8 +167,8 @@
<if test="screeningStatus != null and screeningStatus != ''">
and screening_status = #{screeningStatus}
</if>
<if test="registerId != null and registerId != ''">
and register_id = #{registerId}
<if test="patientId != null and patientId != ''">
and patient_id = #{patientId}
</if>
<if test="residentName != null and residentName != ''">
and resident_name like concat(#{residentName}, '%')
@ -215,7 +215,7 @@
</sql>
<select id="screeningList" resultType="com.xinelu.manage.vo.screeningrecord.ScreeningRecordVo">
select r.resident_name,r.gender,r.birthday,r.phone,r.`identity`
,r.manage_status,r.manage_time,d.screening_id,d.register_id,d.project_id,d.project_name
,r.manage_status,r.manage_time,d.screening_id,d.patient_id,d.project_id,d.project_name
,d.dept_id,d.dept_name,d.apply_start_time,d.apply_end_time,
d.diagnostic_result,d.attachment,d.attachment_two,
d.registration_date,d.registration_code, d.registration_barcode,d.screening_type,d.push_date,
@ -225,7 +225,7 @@
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.register_id = r.register_id
from sd_screening_record d left join sd_register 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 != ''">
@ -317,7 +317,7 @@
<!-- 获取筛查结果记录 -->
<select id="record" resultType="com.xinelu.manage.vo.screeningrecord.ScreeningRecordVo">
select ssr.id,ssr.screening_id,ssr.register_id,ssr.screening_status,
select ssr.id,ssr.screening_id,ssr.patient_id,ssr.screening_status,
ssr.disease,ssr.dept_id,IFNULL(ssr.dept_name, '') as dept_name,ssr.project_id, ssr.project_name,
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,
@ -332,7 +332,7 @@
<!-- 获取最新一次筛查结果 -->
<select id="getScreeningOfLast" resultType="com.xinelu.manage.vo.screeningrecord.ScreeningRecordVo">
select <include refid="Base_Column_List"></include> from sd_screening_record
where register_id = #{registerId}
where patient_id = #{patientId}
<if test="screeningType != null">
and screening_type = #{screeningType}
</if>
@ -359,7 +359,7 @@
screening_id as id, date_format(apply_start_time,'%Y-%m-%d') as createTime
from sd_screening_record
where
register_id = #{registerId} 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
</select>
</mapper>