Merge branch 'dev' into 0418_小程序开发

This commit is contained in:
zhangheng 2024-05-15 11:17:21 +08:00
commit de9065e8d6
16 changed files with 144 additions and 51 deletions

View File

@ -199,6 +199,11 @@ public class Constants {
*/
public static final String AGENCY_CODE = "AYC";
/**
* 科室病种编码
*/
public static final String DISEASE_TYPE_CODE = "DTC";
/**
* 任务状态编码
*/

View File

@ -49,6 +49,7 @@ public class AgencyController extends BaseController {
*/
@GetMapping("/selectAgencyList")
public AjaxResult selectAgencyByIdList(Agency agency) {
// TODO 根据用户角色确定查询范围
return agencyService.selectAgencyByIdList(agency);
}

View File

@ -8,6 +8,7 @@ import com.xinelu.common.core.page.TableDataInfo;
import com.xinelu.common.enums.BusinessType;
import com.xinelu.common.utils.poi.ExcelUtil;
import com.xinelu.manage.domain.patientinfo.PatientInfo;
import com.xinelu.manage.dto.patientinfo.PatientBaseInfoDto;
import com.xinelu.manage.dto.patientinfo.PatientInfoDto;
import com.xinelu.manage.service.patientinfo.IPatientInfoService;
import io.swagger.annotations.Api;
@ -92,6 +93,17 @@ public class PatientInfoController extends BaseController {
return R.ok(patientInfoService.updatePatientInfo(patientInfo));
}
/**
* 患者配置--修改患者信息
*/
@ApiOperation("患者配置--修改患者信息")
@PreAuthorize("@ss.hasPermi('manage:patientInfo:edit')")
@Log(title = "患者信息", businessType = BusinessType.UPDATE)
@PutMapping("/updateBaseInfo")
public R<PatientInfo> updateBaseInfo(@RequestBody PatientBaseInfoDto patientInfo) {
return R.ok(patientInfoService.updateBaseInfo(patientInfo));
}
/**
* 删除患者信息
*/

View File

@ -52,7 +52,7 @@ public class PatientVisitRecordController extends BaseController {
* 查询患者就诊记录基本信息列表
*/
@ApiOperation("查询患者就诊记录基本信息列表")
@PreAuthorize("@ss.hasPermi('manage:visit:list')")
//@PreAuthorize("@ss.hasPermi('manage:visit:list')")
@GetMapping("/getList")
public AjaxResult getList(PatientVisitRecordDto patientVisitRecord) {
List<PatientVisitRecord> list = patientVisitRecordService.selectPatientVisitRecordList(patientVisitRecord);
@ -93,7 +93,7 @@ public class PatientVisitRecordController extends BaseController {
* 新增患者就诊记录基本信息
*/
@ApiOperation("新增患者就诊记录基本信息")
@PreAuthorize("@ss.hasPermi('manage:visit:add')")
//@PreAuthorize("@ss.hasPermi('manage:visit:add')")
@Log(title = "患者就诊记录基本信息", businessType = BusinessType.INSERT)
@PostMapping
public R<String> add(@Valid @RequestBody PatientVisitRecordSaveDto patientVisitRecord) {
@ -105,7 +105,7 @@ public class PatientVisitRecordController extends BaseController {
* 修改患者就诊记录基本信息
*/
@ApiOperation("修改患者就诊记录基本信息")
@PreAuthorize("@ss.hasPermi('manage:visit:edit')")
//@PreAuthorize("@ss.hasPermi('manage:visit:edit')")
@Log(title = "患者就诊记录基本信息", businessType = BusinessType.UPDATE)
@PutMapping
public AjaxResult edit(@Valid @RequestBody PatientVisitRecord patientVisitRecord) {
@ -116,7 +116,7 @@ public class PatientVisitRecordController extends BaseController {
* 患者配置就诊信息保存
*/
@ApiOperation("患者配置——就诊信息保存")
@PreAuthorize("@ss.hasPermi('manage:visit:add')")
//@PreAuthorize("@ss.hasPermi('manage:visit:add')")
@Log(title = "患者就诊记录基本信息", businessType = BusinessType.INSERT)
@PostMapping("saveRecord")
public R<String> saveRecord(@Valid @RequestBody PatientVisitRecordInfoSaveDto saveDto) {
@ -129,7 +129,7 @@ public class PatientVisitRecordController extends BaseController {
* 修改患者就诊记录基本信息
*/
@ApiOperation("患者配置——就诊信息修改")
@PreAuthorize("@ss.hasPermi('manage:visit:edit')")
//@PreAuthorize("@ss.hasPermi('manage:visit:edit')")
@Log(title = "患者就诊记录基本信息", businessType = BusinessType.UPDATE)
@PutMapping("updateRecord")
public AjaxResult updateRecord(@Valid @RequestBody PatientVisitRecordInfoSaveDto patientVisitRecord) {

View File

@ -34,7 +34,6 @@ public class AgencyCategory extends BaseEntity {
* 父级类别id
*/
@ApiModelProperty(value = "父级类别id")
@Excel(name = "父级类别id")
private Long parentCategoryId;
/**
@ -48,7 +47,6 @@ public class AgencyCategory extends BaseEntity {
* 类别编码
*/
@ApiModelProperty(value = "类别编码")
@Excel(name = "类别编码")
private String categoryCode;
/**

View File

@ -0,0 +1,79 @@
package com.xinelu.manage.dto.patientinfo;
import io.swagger.annotations.ApiModelProperty;
import java.time.LocalDate;
import lombok.Data;
/**
* @description: 患者基本信息
* @author: haown
* @create: 2024-05-08 09:10
**/
@Data
public class PatientBaseInfoDto {
/**
* 主键id
*/
private Long id;
/**
* 居民信息表id
*/
@ApiModelProperty(value = "居民信息表id")
private Long residentId;
/**
* 患者姓名
*/
@ApiModelProperty(value = "患者姓名")
private String patientName;
/**
* 患者电话
*/
@ApiModelProperty(value = "患者电话")
private String patientPhone;
/**
* 家属电话
*/
@ApiModelProperty(value = "家属电话")
private String familyMemberPhone;
/**
* 出生日期格式yyyy-MM-dd
*/
@ApiModelProperty(value = "出生日期格式yyyy-MM-dd")
private LocalDate birthDate;
/**
* 身份证号
*/
@ApiModelProperty(value = "身份证号")
private String cardNo;
/**
* 性别MALEFEMALE
*/
@ApiModelProperty(value = "性别MALEFEMALE")
private String sex;
/**
* 住址
*/
@ApiModelProperty(value = "住址")
private String address;
/**
* 所属医院id
*/
@ApiModelProperty(value = "所属医院id")
private Long hospitalAgencyId;
/**
* 所属医院名称
*/
@ApiModelProperty(value = "所属医院名称")
private String hospitalAgencyName;
}

View File

@ -1,6 +1,8 @@
package com.xinelu.manage.service.departmentdiseasetype.impl;
import com.xinelu.common.constant.Constants;
import com.xinelu.common.core.domain.AjaxResult;
import com.xinelu.common.utils.codes.GenerateSystemCodeUtil;
import com.xinelu.manage.domain.departmentdiseasetype.DepartmentDiseaseType;
import com.xinelu.manage.mapper.departmentdiseasetype.DepartmentDiseaseTypeMapper;
import com.xinelu.manage.service.departmentdiseasetype.IDepartmentDiseaseTypeService;
@ -24,6 +26,8 @@ import java.util.List;
public class DepartmentDiseaseTypeServiceImpl implements IDepartmentDiseaseTypeService {
@Resource
private DepartmentDiseaseTypeMapper departmentDiseaseTypeMapper;
@Resource
private GenerateSystemCodeUtil generateSystemCodeUtil;
/**
* 查询科室病种信息
@ -56,6 +60,7 @@ public class DepartmentDiseaseTypeServiceImpl implements IDepartmentDiseaseTypeS
@Override
public int insertDepartmentDiseaseType(DepartmentDiseaseType departmentDiseaseType) {
departmentDiseaseType.setCreateTime(LocalDateTime.now());
departmentDiseaseType.setDiseaseTypeCode(Constants.DISEASE_TYPE_CODE + generateSystemCodeUtil.generateSystemCode(Constants.DISEASE_TYPE_CODE));
return departmentDiseaseTypeMapper.insertDepartmentDiseaseType(departmentDiseaseType);
}

View File

@ -93,7 +93,6 @@ public class InfoServiceImpl implements IInfoService {
if (Objects.isNull(infoByID)) {
return AjaxResult.error("当前资讯信息不存在,无法修改,请联系管理员!");
}
//添加修改人 修改时间
info.setInfoReviser(SecurityUtils.getUsername());
info.setInfoModifyTime(LocalDateTime.now());
@ -101,12 +100,10 @@ public class InfoServiceImpl implements IInfoService {
if (count <= 0) {
throw new ServiceException("修改资讯信息失败,请联系管理员!");
}
//如果两个图片不相等删除之前的图片
if (!info.getInfoLargePictureUrl().equals(infoByID.getInfoLargePictureUrl())) {
deletePictureUrl(infoByID.getInfoLargePictureUrl());
}
//遍历修改前后内容相不相等如果不为空且不相等寻找遍历前后图片的差集然后删除.
if (StringUtils.isNotBlank(info.getInfoContent()) && StringUtils.isNotBlank(infoByID.getInfoContent())
&& !info.getInfoContent().equals(infoByID.getInfoContent())) {
@ -117,7 +114,6 @@ public class InfoServiceImpl implements IInfoService {
//遍历删除图片
List<String> subList = new ArrayList<>(CollectionUtils.subtract(infoImgSrc, infoByIDImgSrc));
for (String picUrl : subList) {
if (StringUtils.isBlank(picUrl)) { //删除富文本图片
continue;
}
@ -126,7 +122,6 @@ public class InfoServiceImpl implements IInfoService {
//删除富文本图片
deletePictureUrl(substring);
}
}
return AjaxResult.success();
}

View File

@ -1,6 +1,7 @@
package com.xinelu.manage.service.patientinfo;
import com.xinelu.manage.domain.patientinfo.PatientInfo;
import com.xinelu.manage.dto.patientinfo.PatientBaseInfoDto;
import com.xinelu.manage.dto.patientinfo.PatientInfoDto;
import java.util.List;
@ -39,10 +40,18 @@ public interface IPatientInfoService {
* 修改患者信息
*
* @param patientInfo 患者信息
* @return 结果
* @return 患者信息
*/
PatientInfo updatePatientInfo(PatientInfo patientInfo);
/**
* 患者基本信息
*
* @param patientInfo 患者基本信息
* @return 患者信息
*/
PatientInfo updateBaseInfo(PatientBaseInfoDto patientInfo);
/**
* 批量删除患者信息
*

View File

@ -11,6 +11,7 @@ import com.xinelu.manage.domain.patientinfo.PatientInfo;
import com.xinelu.manage.domain.patientvisitrecord.PatientVisitRecord;
import com.xinelu.manage.domain.residentinfo.ResidentInfo;
import com.xinelu.manage.domain.signpatientrecord.SignPatientRecord;
import com.xinelu.manage.dto.patientinfo.PatientBaseInfoDto;
import com.xinelu.manage.dto.patientinfo.PatientInfoDto;
import com.xinelu.manage.dto.patientvisitrecord.PatientVisitRecordDto;
import com.xinelu.manage.mapper.patientinfo.PatientInfoMapper;
@ -144,12 +145,8 @@ public class PatientInfoServiceImpl implements IPatientInfoService {
throw new ServiceException("请输入身份证号");
}
// 根据身份证号计算性别出生日期
if (patientInfo.getBirthDate() == null) {
patientInfo.setBirthDate(BaseUtil.getBirthday(patientInfo.getCardNo()));
}
if (StringUtils.isBlank(patientInfo.getSex())) {
patientInfo.setSex(BaseUtil.getGender(patientInfo.getCardNo()));
}
patientInfo.setBirthDate(BaseUtil.getBirthday(patientInfo.getCardNo()));
patientInfo.setSex(BaseUtil.getGender(patientInfo.getCardNo()));
ResidentInfo residentInfo = new ResidentInfo();
if (patientInfo.getResidentId() != null) {
residentInfo = residentInfoMapper.selectResidentInfoById(patientInfo.getResidentId());
@ -187,7 +184,13 @@ public class PatientInfoServiceImpl implements IPatientInfoService {
return patientInfo;
}
/**
@Override public PatientInfo updateBaseInfo(PatientBaseInfoDto patientInfo) {
PatientInfo patientInfo1 = patientInfoMapper.selectPatientInfoById(patientInfo.getId());
BeanUtils.copyBeanProp(patientInfo1, patientInfo);
return updatePatientInfo(patientInfo1);
}
/**
* 批量删除患者信息
*
* @param ids 需要删除的患者信息主键

View File

@ -209,6 +209,9 @@ public class PatientVisitRecordServiceImpl implements IPatientVisitRecordService
@Override
@Transactional(rollbackFor = Exception.class)
public int saveRecord(PatientVisitRecordInfoSaveDto saveDto) {
if (saveDto.getPatientId() == null) {
throw new ServiceException("患者信息传输错误!");
}
PatientVisitRecord patientVisitRecord = new PatientVisitRecord();
// 查询患者基本信息
PatientBaseInfoVo patientBaseInfo = patientMapper.getPatientBaseInfo(saveDto.getPatientId());
@ -249,11 +252,14 @@ public class PatientVisitRecordServiceImpl implements IPatientVisitRecordService
* @return 结果
*/
@Override
@Transactional
@Transactional(rollbackFor = Exception.class)
public int updateRecord(PatientVisitRecordInfoSaveDto updDto) {
if (updDto.getId() == null) {
throw new ServiceException("数据传输错误");
}
if (updDto.getPatientId() == null) {
throw new ServiceException("患者信息传输错误!");
}
PatientVisitRecord patientVisitRecord = new PatientVisitRecord();
BeanUtils.copyBeanProp(patientVisitRecord, updDto);
patientVisitRecord.setUpdateBy(SecurityUtils.getLoginUser().getUser().getNickName());

View File

@ -206,12 +206,8 @@
<if test="voicebroadcast != null">voicebroadcast =
#{voicebroadcast},
</if>
<if test="diseaseTypeId != null">disease_type_id =
#{diseaseTypeId},
</if>
<if test="diseaseTypeName != null">disease_type_name =
#{diseaseTypeName},
</if>
disease_type_id = #{diseaseTypeId},
disease_type_name = #{diseaseTypeName},
<if test="propagandaLink != null">propaganda_link =
#{propagandaLink},
</if>

View File

@ -224,12 +224,8 @@
<if test="departmentName != null">department_name =
#{departmentName},
</if>
<if test="diseaseTypeId != null">disease_type_id =
#{diseaseTypeId},
</if>
<if test="diseaseTypeName != null">disease_type_name =
#{diseaseTypeName},
</if>
disease_type_id = #{diseaseTypeId},
disease_type_name = #{diseaseTypeName},
<if test="commonScriptName != null">common_script_name =
#{commonScriptName},
</if>

View File

@ -330,12 +330,8 @@
<if test="departmentName != null">department_name =
#{departmentName},
</if>
<if test="diseaseTypeId != null">disease_type_id =
#{diseaseTypeId},
</if>
<if test="diseaseTypeName != null">disease_type_name =
#{diseaseTypeName},
</if>
disease_type_id = #{diseaseTypeId},
disease_type_name = #{diseaseTypeName},
<if test="packageName != null">package_name =
#{packageName},
</if>

View File

@ -246,12 +246,8 @@
<if test="departmentName != null">department_name =
#{departmentName},
</if>
<if test="diseaseTypeId != null">disease_type_id =
#{diseaseTypeId},
</if>
<if test="diseaseTypeName != null">disease_type_name =
#{diseaseTypeName},
</if>
disease_type_id = #{diseaseTypeId},
disease_type_name = #{diseaseTypeName},
<if test="textMessageName != null">text_message_name =
#{textMessageName},
</if>

View File

@ -277,12 +277,8 @@
<if test="departmentName != null">department_name =
#{departmentName},
</if>
<if test="diseaseTypeId != null">disease_type_id =
#{diseaseTypeId},
</if>
<if test="diseaseTypeName != null">disease_type_name =
#{diseaseTypeName},
</if>
disease_type_id = #{diseaseTypeId},
disease_type_name = #{diseaseTypeName},
<if test="wechatTemplateName != null">wechat_template_name =
#{wechatTemplateName},
</if>