update===>:修改筛查相关接口。

This commit is contained in:
haown 2023-10-09 14:35:08 +08:00
parent 1c3fdca7d7
commit 9ba3a31af1
23 changed files with 255 additions and 104 deletions

View File

@ -6,7 +6,7 @@ spring:
druid:
# 主库数据源
master:
url: jdbc:mysql://101.200.89.70:8000/xinelu-database?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
url: jdbc:mysql://182.92.166.109:8000/xinelu-database?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
username: root
password: 1qaz!@#$
# 从库数据源

View File

@ -217,7 +217,7 @@ swagger:
# 是否开启swagger
enabled: true
# 请求前缀
pathMapping: /dev-api
pathMapping:
# 防止XSS攻击
xss:

View File

@ -113,6 +113,11 @@ public class SysUser extends BaseEntity {
*/
private String stationPersonPassword;
/**
* 医生主键
*/
private Long hospitalPersonId;
/**
* 部门对象
*/
@ -334,7 +339,15 @@ public class SysUser extends BaseEntity {
this.roleId = roleId;
}
@Override
public Long getHospitalPersonId() {
return hospitalPersonId;
}
public void setHospitalPersonId(Long hospitalPersonId) {
this.hospitalPersonId = hospitalPersonId;
}
@Override
public String toString() {
return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
.append("userId", getUserId())

View File

@ -1,16 +0,0 @@
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

@ -0,0 +1,36 @@
package com.xinelu.applet.controller.applethospitalinfo;
import com.xinelu.common.core.controller.BaseController;
import com.xinelu.common.core.domain.AjaxResult;
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 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-10-09 11:06
**/
@Api(tags = "小程序医院信息管理控制器")
@RestController
@RequestMapping("/nurseApplet/hospital")
public class AppletHospitalInfoController extends BaseController {
@Resource
private IHospitalInfoService hospitalInfoService;
/**
* 查询医院信息管理列表
*/
@ApiOperation("查询医院信息管理列表")
@GetMapping("/getList")
public AjaxResult getList(HospitalInfo hospitalInfo) {
List<HospitalInfo> list = hospitalInfoService.selectHospitalInfoList(hospitalInfo);
return AjaxResult.success(list);
}
}

View File

@ -0,0 +1,35 @@
package com.xinelu.applet.controller.appletscheduleplandetail;
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-22 10:28
**/
@Api(tags = "小程序医生排班计划控制器")
@RestController
@RequestMapping("/nurseApplet/schedule/plandetail")
public class AppletSchedulePlanController 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

@ -3,8 +3,11 @@ package com.xinelu.manage.controller.screeningproject;
import com.xinelu.common.core.controller.BaseController;
import com.xinelu.common.core.domain.R;
import com.xinelu.common.core.page.TableDataInfo;
import com.xinelu.common.utils.SecurityUtils;
import com.xinelu.common.utils.uuid.IdUtils;
import com.xinelu.manage.domain.hospitalpersoninfo.HospitalPersonInfo;
import com.xinelu.manage.domain.screeningproject.ScreeningProject;
import com.xinelu.manage.service.hospitalpersoninfo.IHospitalPersonInfoService;
import com.xinelu.manage.service.screeningproject.IScreeningProjectService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
@ -35,6 +38,9 @@ public class ScreeningProjectController extends BaseController {
@Resource
private IScreeningProjectService projectService;
@Resource
private IHospitalPersonInfoService personInfoService;
@ApiOperation("服务项目分页列表")
@GetMapping("list")
public TableDataInfo list(ScreeningProject project) {
@ -53,8 +59,12 @@ public class ScreeningProjectController extends BaseController {
@ApiOperation("新增服务项目")
@PostMapping("add")
public R<String> add(@RequestBody ScreeningProject project) {
if (projectService.checkSameProjectName(project.getProjectName(), project.getDeptId(), null)) {
return R.fail("" + project.getDeptName() + "】已存在服务项目【" + project.getProjectName() + "】,不能重复添加");
// 根据当前登录用户获取医生主键
HospitalPersonInfo hospitalPersonInfo = personInfoService.selectHospitalPersonInfoById(SecurityUtils.getLoginUser().getUser().getHospitalPersonId());
project.setHospitalId(hospitalPersonInfo.getHospitalId());
project.setHospitalName(hospitalPersonInfo.getPersonName());
if (projectService.checkSameProjectName(project.getProjectName(), project.getHospitalId(), null)) {
return R.fail("" + project.getHospitalName() + "】已存在服务项目【" + project.getProjectName() + "】,不能重复添加");
}
//价格校验
if (Objects.isNull(project.getDiscount())) {
@ -83,8 +93,8 @@ public class ScreeningProjectController extends BaseController {
@ApiOperation("修改服务项目")
@PostMapping("update")
public R<?> update(@RequestBody ScreeningProject project) {
if (projectService.checkSameProjectName(project.getProjectName(), project.getDeptId(), project.getProjectId())) {
return R.fail("" + project.getDeptName() + "】已存在服务项目【" + project.getProjectName() + "】,不能重复添加");
if (projectService.checkSameProjectName(project.getProjectName(), project.getHospitalId(), project.getProjectId())) {
return R.fail("" + project.getHospitalName() + "】已存在服务项目【" + project.getProjectName() + "】,不能重复添加");
}
//价格校验
if (Objects.isNull(project.getDiscount())) {

View File

@ -44,7 +44,11 @@ public class ScreeningRecordController extends BaseController {
@ApiOperation(value = "居民预约筛查列表")
public TableDataInfo screeningList(ScreeningRecordDTO query) {
startPage();
return getDataTable(screeningRecordService.screeningList(query));
try {
return getDataTable(screeningRecordService.screeningList(query));
} catch (Exception e) {
throw new RuntimeException(e);
}
}
@GetMapping("/list")

View File

@ -128,6 +128,16 @@ public class HospitalPersonInfo extends BaseDomain implements Serializable {
*/
private String personPictureUrl;
/**
* 科室人员账号
*/
private String personAccount;
/**
* 科室人员密码
*/
private String personPassword;
@Override
public String toString() {

View File

@ -60,13 +60,13 @@ public class ScreeningProject extends BaseEntity {
* 医院编号
*/
@ApiModelProperty("医院编号")
private String deptId;
private Long hospitalId;
/**
* 医院名称
*/
@ApiModelProperty("医院名称")
private String deptName;
private String hospitalName;
/**
* 删除标识0存在1已删除

View File

@ -49,12 +49,12 @@ public class ScreeningRecord implements Serializable {
/**
* 医院编号
*/
private String deptId;
private Long hospitalId;
/**
* 医院名称
*/
private String deptName;
private String hospitalName;
/**
* 预约项目业务主键
@ -108,7 +108,7 @@ public class ScreeningRecord implements Serializable {
* 医生编号
*/
@ApiModelProperty("医生编号")
private String doctorId;
private Long doctorId;
/**
* 医生名称

View File

@ -43,10 +43,10 @@ public class ScreeningApplyDTO implements Serializable {
private Date applyEndTime;
@ApiModelProperty(value = "预约机构业务主键", required = true)
private String deptId;
private Long hospitalId;
@ApiModelProperty(value = "预约机构名称", required = true)
private String deptName;
private String hospitalName;
@ApiModelProperty(value = "预约项目业务主键", required = true)
private String projectId;

View File

@ -52,13 +52,13 @@ public class ScreeningRecordApplyDTO implements Serializable {
* 医院编号
*/
@ApiModelProperty("医院编号")
private String deptId;
private Long hospitalId;
/**
* 医院名称
*/
@ApiModelProperty("医院名称")
private String deptName;
private String hospitalName;
@ApiModelProperty("项目业务主键")
private String projectId;
@ -87,7 +87,7 @@ public class ScreeningRecordApplyDTO implements Serializable {
* 医生编号
*/
@ApiModelProperty("医生编号")
private String doctorId;
private Long doctorId;
/**
* 医生名称

View File

@ -52,13 +52,13 @@ public class ScreeningRecordDTO extends BaseEntity {
* 医院编号
*/
@ApiModelProperty("医院编号")
private String deptId;
private Long hospitalId;
/**
* 医院名称
*/
@ApiModelProperty("医院名称")
private String deptName;
private String hospitalName;
@ApiModelProperty("预约项目业务主键")
private String projectId;

View File

@ -26,6 +26,6 @@ public interface ScreeningProjectMapper {
int updateByPrimaryKey(ScreeningProject record);
Integer checkSameName(@Param("projectName") String projectName, @Param("deptId") String deptId, @Param("projectId") String projectId);
Integer checkSameName(@Param("projectName") String projectName, @Param("deptId") Long deptId, @Param("projectId") String projectId);
}

View File

@ -3,6 +3,7 @@ package com.xinelu.manage.service.hospitalpersoninfo.impl;
import com.xinelu.common.config.XinELuConfig;
import com.xinelu.common.constant.Constants;
import com.xinelu.common.core.domain.AjaxResult;
import com.xinelu.common.core.domain.entity.SysUser;
import com.xinelu.common.exception.ServiceException;
import com.xinelu.common.utils.SecurityUtils;
import com.xinelu.common.utils.codes.GenerateSystemCodeUtil;
@ -14,6 +15,7 @@ import com.xinelu.manage.mapper.hospitalpersoncertificate.HospitalPersonCertific
import com.xinelu.manage.mapper.hospitalpersoninfo.HospitalPersonInfoMapper;
import com.xinelu.manage.service.hospitalpersoninfo.IHospitalPersonInfoService;
import com.xinelu.manage.vo.hospitalpersoninfo.HospitalPersonInfoVO;
import com.xinelu.system.mapper.SysUserMapper;
import java.io.File;
import java.math.BigDecimal;
import java.time.LocalDateTime;
@ -48,6 +50,9 @@ public class HospitalPersonInfoServiceImpl implements IHospitalPersonInfoService
@Resource
private HospitalPersonCertificateMapper hospitalPersonCertificateMapper;
@Resource
private SysUserMapper userMapper;
/**
* 查询健康咨询-科室人员信息
*
@ -126,6 +131,15 @@ public class HospitalPersonInfoServiceImpl implements IHospitalPersonInfoService
throw new ServiceException("新增科室人员资质证书信息失败,请联系管理员!");
}
}
// 保存到sys_user表
SysUser sysUser = new SysUser();
sysUser.setUserName(hospitalPersonInfo.getPersonAccount());
sysUser.setPassword(SecurityUtils.encryptPassword(hospitalPersonInfo.getPersonPassword()));
sysUser.setNickName(hospitalPersonInfo.getPersonName());
sysUser.setHospitalPersonId(hospitalPersonInfo.getId());
sysUser.setStatus("0");
sysUser.setDelFlag("0");
userMapper.insertUser(sysUser);
return AjaxResult.success();
}

View File

@ -27,5 +27,5 @@ public interface IScreeningProjectService {
* @author gaoyu
* @date 2022-11-23 10:20
*/
boolean checkSameProjectName(String projectName, String deptId, String projectId);
boolean checkSameProjectName(String projectName, Long deptId, String projectId);
}

View File

@ -1,9 +1,13 @@
package com.xinelu.manage.service.screeningproject.impl;
import com.xinelu.common.utils.SecurityUtils;
import com.xinelu.manage.domain.hospitalinfo.HospitalInfo;
import com.xinelu.manage.domain.hospitalpersoninfo.HospitalPersonInfo;
import com.xinelu.manage.domain.screeningproject.ScreeningProject;
import com.xinelu.manage.mapper.hospitalinfo.HospitalInfoMapper;
import com.xinelu.manage.mapper.hospitalpersoninfo.HospitalPersonInfoMapper;
import com.xinelu.manage.mapper.screeningproject.ScreeningProjectMapper;
import com.xinelu.manage.service.screeningproject.IScreeningProjectService;
import com.xinelu.system.mapper.SysDeptMapper;
import java.util.List;
import javax.annotation.Resource;
import org.springframework.stereotype.Service;
@ -19,22 +23,36 @@ public class ScreeningProjectServiceImpl implements IScreeningProjectService {
@Resource
private ScreeningProjectMapper projectMapper;
@Resource
private SysDeptMapper deptMapper;
private HospitalPersonInfoMapper hospitalPersonInfoMapper;
@Resource
private HospitalInfoMapper hospitalInfoMapper;
@Override public List<ScreeningProject> findList(ScreeningProject project) {
return projectMapper.findList(project);
}
@Override public int insert(ScreeningProject project) {
// TODO 设置机构
// project.setDeptName(deptMapper.selectDeptById(project.getDeptId()).getDeptName());
HospitalPersonInfo hospitalPersonInfo = hospitalPersonInfoMapper.selectHospitalPersonInfoById(SecurityUtils.getLoginUser().getUser().getHospitalPersonId());
if (hospitalPersonInfo != null) {
project.setHospitalId(hospitalPersonInfo.getHospitalId());
HospitalInfo hospital = hospitalInfoMapper.selectHospitalInfoById(hospitalPersonInfo.getHospitalId());
if (hospital != null) {
project.setHospitalName(hospital.getHospitalName());
}
}
return projectMapper.insertSelective(project);
}
@Override
public int update(ScreeningProject project) {
// TODO 设置机构
// project.setDeptName(deptMapper.selectDeptById(project.getDeptId()).getDeptName());
HospitalPersonInfo hospitalPersonInfo = hospitalPersonInfoMapper.selectHospitalPersonInfoById(SecurityUtils.getLoginUser().getUser().getHospitalPersonId());
if (hospitalPersonInfo != null) {
project.setHospitalId(hospitalPersonInfo.getHospitalId());
HospitalInfo hospital = hospitalInfoMapper.selectHospitalInfoById(hospitalPersonInfo.getHospitalId());
if (hospital != null) {
project.setHospitalName(hospital.getHospitalName());
}
}
return projectMapper.updateByPrimaryKey(project);
}
@ -42,7 +60,7 @@ public class ScreeningProjectServiceImpl implements IScreeningProjectService {
projectMapper.updateByPrimaryKeySelective(project);
}
@Override public boolean checkSameProjectName(String projectName, String deptId, String projectId) {
@Override public boolean checkSameProjectName(String projectName, Long deptId, String projectId) {
return projectMapper.checkSameName(projectName, deptId, projectId) != null;
}
}

View File

@ -16,7 +16,7 @@ import java.util.List;
*/
public interface IScreeningRecordService {
List<ScreeningRecordVo> screeningList(ScreeningRecordDTO query);
List<ScreeningRecordVo> screeningList(ScreeningRecordDTO query) throws Exception;
/**
* @Author mengkuiliang

View File

@ -10,12 +10,16 @@ import com.xinelu.common.utils.DateUtils;
import com.xinelu.common.utils.SecurityUtils;
import com.xinelu.common.utils.bean.BeanUtils;
import com.xinelu.common.utils.uuid.IdUtils;
import com.xinelu.manage.domain.hospitalinfo.HospitalInfo;
import com.xinelu.manage.domain.hospitalpersoninfo.HospitalPersonInfo;
import com.xinelu.manage.domain.screeningproject.ScreeningProject;
import com.xinelu.manage.domain.screeningrecord.ScreeningRecord;
import com.xinelu.manage.dto.screeningrecord.ScreeningApplyDTO;
import com.xinelu.manage.dto.screeningrecord.ScreeningRecordApplyDTO;
import com.xinelu.manage.dto.screeningrecord.ScreeningRecordDTO;
import com.xinelu.manage.dto.screeningrecord.ScreeningRecordSaveDTO;
import com.xinelu.manage.mapper.hospitalinfo.HospitalInfoMapper;
import com.xinelu.manage.mapper.hospitalpersoninfo.HospitalPersonInfoMapper;
import com.xinelu.manage.mapper.screeningrecord.ScreeningRecordMapper;
import com.xinelu.manage.service.patientinfo.IPatientInfoService;
import com.xinelu.manage.service.screeningrecord.IScreeningRecordService;
@ -45,13 +49,19 @@ public class ScreeningRecordServiceImpl implements IScreeningRecordService {
private ScreeningRecordMapper screeningRecordMapper;
@Resource
private IPatientInfoService patientService;
//@Resource
//private IScreeningProjectRecordService projectRecordService;
@Resource
private HospitalPersonInfoMapper hospitalPersonInfoMapper;
@Resource
private HospitalInfoMapper hospitalInfoMapper;
@Override
public List<ScreeningRecordVo> screeningList(ScreeningRecordDTO query) {
// TODO 通过机构查询
// query.setDeptId(SecurityUtils.getDeptId());
public List<ScreeningRecordVo> screeningList(ScreeningRecordDTO query) throws Exception {
HospitalPersonInfo hospitalPersonInfo = hospitalPersonInfoMapper.selectHospitalPersonInfoById(SecurityUtils.getLoginUser().getUser().getHospitalPersonId());
if (hospitalPersonInfo != null) {
query.setHospitalId(hospitalPersonInfo.getHospitalId());
} else {
throw new Exception("该账号未关联医生");
}
return screeningRecordMapper.screeningList(query);
}
@ -97,7 +107,7 @@ public class ScreeningRecordServiceImpl implements IScreeningRecordService {
// 查询 同一机构的同一筛查项目在同一天是否有预约
ScreeningRecordDTO query = new ScreeningRecordDTO();
query.setPatientId(body.getPatientId());
query.setDeptId(body.getDeptId());
query.setHospitalId(body.getHospitalId());
query.setProjectId(body.getProjectId());
query.setApplyStartDate(body.getApplyStartTime());
query.setApplyEndDate(body.getApplyEndTime());
@ -136,9 +146,17 @@ public class ScreeningRecordServiceImpl implements IScreeningRecordService {
@Override
public Integer update(ScreeningRecord body) {
// TODO 用户id
//body.setDoctorId(SecurityUtils.getUserId());
body.setDeptName(SecurityUtils.getLoginUser().getUser().getDept().getDeptName());
HospitalPersonInfo hospitalPersonInfo = hospitalPersonInfoMapper.selectHospitalPersonInfoById(SecurityUtils.getLoginUser().getUser().getHospitalPersonId());
if (hospitalPersonInfo != null) {
body.setDoctorId(hospitalPersonInfo.getId());
body.setDoctorName(hospitalPersonInfo.getPersonName());
HospitalInfo hospitalInfo = hospitalInfoMapper.selectHospitalInfoById(hospitalPersonInfo.getHospitalId());
if (hospitalInfo != null) {
body.setHospitalId(hospitalInfo.getId());
body.setHospitalName(hospitalInfo.getHospitalName());
}
}
body.setScreeningStatus("4");
body.setScreeningDate(new Date());
int flag = screeningRecordMapper.update(body);
@ -192,8 +210,7 @@ public class ScreeningRecordServiceImpl implements IScreeningRecordService {
if (StringUtils.equals("3", screeningRecord.getScreeningStatus()) || StringUtils.equals("4", screeningRecord.getScreeningStatus())) {
throw new Exception("该预约已登记,请勿重复登记。");
}
// TODO 当前登录用户id
//screeningRecord.setDoctorId(loginUser.getUserId());
screeningRecord.setDoctorId(loginUser.getUser().getHospitalPersonId());
screeningRecord.setDoctorName(loginUser.getUser().getNickName());
screeningRecord.setRegistrationDate(new Date());
screeningRecord.setScreeningStatus("3");
@ -320,12 +337,18 @@ public class ScreeningRecordServiceImpl implements IScreeningRecordService {
screeningRecord.setProjectId(project.getProjectId());
screeningRecord.setProjectName(project.getProjectName());
screeningRecord.setPatientId(body.getPatientId());
// TODO 用户id
//screeningRecord.setDoctorId(SecurityUtils.getUserId());
screeningRecord.setDoctorId(SecurityUtils.getLoginUser().getUser().getHospitalPersonId());
screeningRecord.setDoctorName(SecurityUtils.getLoginUser().getUser().getNickName());
// TODO 机构id
//screeningRecord.setDeptId(SecurityUtils.getDeptId());
screeningRecord.setDeptName(SecurityUtils.getLoginUser().getUser().getDept().getDeptName());
HospitalPersonInfo hospitalPersonInfo = hospitalPersonInfoMapper.selectHospitalPersonInfoById(SecurityUtils.getLoginUser().getUser().getHospitalPersonId());
if (hospitalPersonInfo == null) {
throw new Exception("当前用户未绑定医生账号");
} else {
HospitalInfo hospitalInfo = hospitalInfoMapper.selectHospitalInfoById(hospitalPersonInfo.getHospitalId());
if (hospitalInfo != null) {
screeningRecord.setHospitalId(hospitalInfo.getId());
screeningRecord.setHospitalName(hospitalInfo.getHospitalName());
}
}
screeningRecord.setScreeningStatus("1");
screeningRecord.setScreeningType("2");
screeningRecord.setApplyStartTime(new Date());

View File

@ -13,8 +13,8 @@
<result property="discount" column="discount" jdbcType="INTEGER"/>
<result property="discountPrice" column="discount_price" jdbcType="VARCHAR"/>
<result property="status" column="status" jdbcType="CHAR"/>
<result property="deptId" column="dept_id" jdbcType="VARCHAR"/>
<result property="deptName" column="dept_name" jdbcType="VARCHAR"/>
<result property="hospitalId" column="hospital_id" jdbcType="BIGINT"/>
<result property="hospitalName" column="hospital_name" jdbcType="VARCHAR"/>
<result property="createBy" column="create_by" jdbcType="VARCHAR"/>
<result property="createTime" column="create_time" jdbcType="DATE"/>
<result property="updateBy" column="update_by" jdbcType="VARCHAR"/>
@ -26,8 +26,8 @@
<sql id="Base_Column_List">
id,project_id,project_name,
project_type,price,discount,
discount_price,status,dept_id,
dept_name,create_by,create_time,
discount_price,status,hospital_id,
hospital_name,create_by,create_time,
update_by,update_time,del_flag,
remark
</sql>
@ -39,8 +39,8 @@
<if test="projectName != null and projectName != ''">
and project_name like concat( '%' ,#{projectName}, '%')
</if>
<if test="deptId != null and deptId != ''">
and dept_id = #{deptId}
<if test="hospitalId != null and hospitalId != ''">
and hospital_id = #{hospitalId}
</if>
<if test="projectType != null and projectType != ''">
and project_type = #{projectType}
@ -69,14 +69,14 @@
insert into screening_project
( id,project_id,project_name
,project_type,price,discount
,discount_price,status,dept_id
,dept_name,create_by,create_time
,discount_price,status,hospital_id
,hospital_name,create_by,create_time
,update_by,update_time,del_flag
,remark)
values (#{id,jdbcType=BIGINT},#{projectId,jdbcType=VARCHAR},#{projectName,jdbcType=VARCHAR}
,#{projectType,jdbcType=CHAR},#{price,jdbcType=DECIMAL},#{discount,jdbcType=INTEGER}
,#{discountPrice,jdbcType=VARCHAR},#{status,jdbcType=CHAR},#{deptId,jdbcType=VARCHAR}
,#{deptName,jdbcType=VARCHAR},#{createBy,jdbcType=VARCHAR},#{createTime,jdbcType=DATE}
,#{discountPrice,jdbcType=VARCHAR},#{status,jdbcType=CHAR},#{hospitalId,jdbcType=BIGINT}
,#{hospitalName,jdbcType=VARCHAR},#{createBy,jdbcType=VARCHAR},#{createTime,jdbcType=DATE}
,#{updateBy,jdbcType=VARCHAR},#{updateTime,jdbcType=DATE},#{delFlag,jdbcType=CHAR}
,#{remark,jdbcType=VARCHAR})
</insert>
@ -91,8 +91,8 @@
<if test="discount != null">discount,</if>
<if test="discountPrice != null">discount_price,</if>
<if test="status != null">status,</if>
<if test="deptId != null">dept_id,</if>
<if test="deptName != null">dept_name,</if>
<if test="hospitalId != null">hospital_id,</if>
<if test="hospitalName != null">hospital_name,</if>
<if test="createBy != null">create_by,</if>
<if test="createTime != null">create_time,</if>
<if test="updateBy != null">update_by,</if>
@ -109,8 +109,8 @@
<if test="discount != null">#{discount,jdbcType=INTEGER},</if>
<if test="discountPrice != null">#{discountPrice,jdbcType=DECIMAL},</if>
<if test="status != null">#{status,jdbcType=CHAR},</if>
<if test="deptId != null">#{deptId,jdbcType=VARCHAR},</if>
<if test="deptName != null">#{deptName,jdbcType=VARCHAR},</if>
<if test="hospitalId != null">#{hospitalId,jdbcType=BIGINT},</if>
<if test="hospitalName != null">#{hospitalName,jdbcType=VARCHAR},</if>
<if test="createBy != null">#{createBy,jdbcType=VARCHAR},</if>
<if test="createTime != null">#{createTime,jdbcType=DATE},</if>
<if test="updateBy != null">#{updateBy,jdbcType=VARCHAR},</if>
@ -140,11 +140,11 @@
<if test="status != null">
status = #{status,jdbcType=CHAR},
</if>
<if test="deptId != null">
dept_id = #{deptId,jdbcType=VARCHAR},
<if test="hospitalId != null">
hospital_id = #{hospitalId,jdbcType=BIGINT},
</if>
<if test="deptName != null">
dept_name = #{deptName,jdbcType=VARCHAR},
<if test="hospitalName != null">
hospital_name = #{hospitalName,jdbcType=VARCHAR},
</if>
<if test="createBy != null">
create_by = #{createBy,jdbcType=VARCHAR},
@ -176,8 +176,8 @@
discount = #{discount,jdbcType=INTEGER},
discount_price = #{discountPrice,jdbcType=VARCHAR},
status = #{status,jdbcType=CHAR},
dept_id = #{deptId,jdbcType=VARCHAR},
dept_name = #{deptName,jdbcType=VARCHAR},
hospital_id = #{hospitalId,jdbcType=BIGINT},
hospital_name = #{hospitalName,jdbcType=VARCHAR},
create_by = #{createBy,jdbcType=VARCHAR},
create_time = #{createTime,jdbcType=DATE},
update_by = #{updateBy,jdbcType=VARCHAR},
@ -187,7 +187,7 @@
where project_id = #{projectId,jdbcType=VARCHAR}
</update>
<select id="checkSameName" resultType="java.lang.Integer">
select 1 from screening_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 hospital_id = #{hospitalId}
<if test="projectId != null and projectId != ''">
and project_id != #{projectId}
</if>

View File

@ -10,8 +10,8 @@
<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"/>
<result property="deptName" column="dept_name" jdbcType="VARCHAR"/>
<result property="hospitalId" column="hospital_id" jdbcType="BIGINT"/>
<result property="hospitalName" column="hospita_name" jdbcType="VARCHAR"/>
<result property="projectId" column="project_id" jdbcType="VARCHAR"/>
<result property="projectName" column="project_name" jdbcType="VARCHAR"/>
<result property="applyStartTime" column="apply_start_time" jdbcType="TIMESTAMP"/>
@ -21,7 +21,7 @@
<result property="diagnosticResult" column="diagnostic_result" jdbcType="VARCHAR"/>
<result property="attachment" column="attachment" jdbcType="VARCHAR"/>
<result property="attachmentTwo" column="attachment_two" jdbcType="VARCHAR"/>
<result property="doctorId" column="doctor_id" jdbcType="VARCHAR"/>
<result property="doctorId" column="doctor_id" jdbcType="BIGINT"/>
<result property="doctorName" column="doctor_name" jdbcType="VARCHAR"/>
<result property="applyCode" column="apply_code" jdbcType="VARCHAR"/>
<result property="applyBarcode" column="apply_barcode" jdbcType="VARCHAR"/>
@ -36,7 +36,7 @@
<sql id="Base_Column_List">
id,screening_id,patient_id,screening_status,
disease,dept_id,IFNULL(dept_name, '') as dept_name,
disease,hospital_id,IFNULL(hospita_name, '') as hospita_name,
project_id, project_name,
apply_start_time,apply_end_time, screening_date,
content,diagnostic_result,attachment,attachment_two,
@ -46,7 +46,7 @@
<sql id="Insert_Column">
screening_id,patient_id,screening_status,
disease,dept_id,dept_name,
disease,hospital_id,hospita_name,
project_id, project_name,
apply_start_time, apply_end_time, screening_date,
content,diagnostic_result,attachment,attachment_two,
@ -57,7 +57,7 @@
<insert id="insert">
insert into screening_record (<include refid="Insert_Column"></include>)
values (#{screeningId}, #{patientId}, #{screeningStatus},
#{disease}, #{deptId}, #{deptName},
#{disease}, #{hospitalId}, #{hospitalName},
#{projectId},#{projectName},
#{applyStartTime}, #{applyEndTime},#{screeningDate},
#{content}, #{diagnosticResult},#{attachment},#{attachmentTwo},
@ -74,11 +74,11 @@
<if test="screeningStatus != null">
screening_status = #{screeningStatus},
</if>
<if test="deptId != null">
dept_id = #{deptId},
<if test="hospitalId != null">
hospital_id = #{hospitalId},
</if>
<if test="deptName != null">
dept_name = #{deptName},
<if test="hospitalName != null">
hospita_name = #{hospitalName},
</if>
<if test="projectId != null">
project_id = #{projectId},
@ -179,11 +179,11 @@
<if test="address != null and address != ''">
and address like concat('%', #{address}, '%')
</if>
<if test="deptId != null and deptId != ''">
and dept_id = #{deptId}
<if test="hospitalId != null and hospitalId != ''">
and hospital_id = #{hospitalId}
</if>
<if test="deptName != null and deptName != ''">
and dept_name = #{deptName}
<if test="hospitalName != null and hospitalName != ''">
and hospita_name = #{hospitalName}
</if>
<if test="projectId != null and projectId != ''">
and project_id = #{projectId}
@ -216,7 +216,7 @@
<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.patient_id,d.project_id,d.project_name
,d.dept_id,d.dept_name,d.apply_start_time,d.apply_end_time,
,d.hospital_id,d.hospita_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,
case when date_format(apply_end_time, '%y%m%d%H%i') &lt; date_format(now(), '%y%m%d%H%i') then '1'
@ -240,11 +240,11 @@
<if test="address != null and address != ''">
and r.address like concat('%', #{address}, '%')
</if>
<if test="deptId != null and deptId != ''">
and d.dept_id = #{deptId}
<if test="hospitalId != null and hospitalId != ''">
and d.hospital_id = #{hospitalId}
</if>
<if test="deptName != null and deptName != ''">
and d.dept_name = #{deptName}
<if test="hospitalName != null and hospitalName != ''">
and d.hospita_name = #{hospitalName}
</if>
<if test="projectId != null and projectId != ''">
and d.project_id = #{projectId}
@ -318,7 +318,7 @@
<!-- 获取筛查结果记录 -->
<select id="record" resultType="com.xinelu.manage.vo.screeningrecord.ScreeningRecordVo">
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.disease,ssr.hospital_id,IFNULL(ssr.hospita_name, '') as hospita_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,
ssr.remark,sf.suffix as fileType

View File

@ -23,6 +23,7 @@
<result property="updateBy" column="update_by"/>
<result property="updateTime" column="update_time"/>
<result property="remark" column="remark"/>
<result property="hospitalPersonId" column="hospital_person_id"/>
<association property="dept" column="dept_id" javaType="SysDept" resultMap="deptResult"/>
<collection property="roles" javaType="java.util.List" resultMap="RoleResult"/>
</resultMap>
@ -47,7 +48,8 @@
</resultMap>
<sql id="selectUserVo">
select u.user_id, u.dept_id, u.user_name, u.nick_name, u.email, u.avatar, u.phonenumber, u.password, u.sex, u.status, u.del_flag, u.login_ip, u.login_date, u.create_by, u.create_time, u.remark,
select u.user_id, u.dept_id, u.user_name, u.nick_name, u.email, u.avatar, u.phonenumber, u.password, u.sex, u.status,
u.del_flag, u.login_ip, u.login_date, u.create_by, u.create_time, u.remark, u.hospital_person_id,
d.dept_id, d.parent_id, d.ancestors, d.dept_name, d.order_num, d.leader, d.status as dept_status,
r.role_id, r.role_name, r.role_key, r.role_sort, r.data_scope, r.status as role_status
from sys_user u
@ -160,6 +162,7 @@
<if test="status != null and status != ''">status,</if>
<if test="createBy != null and createBy != ''">create_by,</if>
<if test="remark != null and remark != ''">remark,</if>
<if test="hospitalPersonId != null and hospitalPersonId != ''">hospital_person_id,</if>
create_time
)values(
<if test="userId != null and userId != ''">#{userId},</if>
@ -174,6 +177,7 @@
<if test="status != null and status != ''">#{status},</if>
<if test="createBy != null and createBy != ''">#{createBy},</if>
<if test="remark != null and remark != ''">#{remark},</if>
<if test="hospitalPersonId != null and hospitalPersonId != ''">#{hospitalPersonId},</if>
sysdate()
)
</insert>