dev
This commit is contained in:
parent
99b6509365
commit
10dcebcac6
|
|
@ -29,8 +29,8 @@ public class OrganizationMemberController extends BaseController {
|
|||
String tel = parmsUtil.getString("tel");
|
||||
return success(organizationMemberService.pageList(page,size,name,tel));
|
||||
}
|
||||
@RequestMapping("/add")
|
||||
public Result<?> add() {
|
||||
@RequestMapping("/save")
|
||||
public Result<?> save() {
|
||||
OrganizationMemberSaveDto dto = parmsUtil.getObject("data", OrganizationMemberSaveDto.class);
|
||||
if(dto ==null){
|
||||
throw new MessageException("data参数为空");
|
||||
|
|
@ -38,12 +38,6 @@ public class OrganizationMemberController extends BaseController {
|
|||
organizationMemberService.save(dto);
|
||||
return success();
|
||||
}
|
||||
@RequestMapping("/edit")
|
||||
public Result<?> edit() {
|
||||
OrganizationMemberSaveDto dto = parmsUtil.getObject("data", OrganizationMemberSaveDto.class);
|
||||
organizationMemberService.edit(dto);
|
||||
return success();
|
||||
}
|
||||
@RequestMapping("/delete")
|
||||
public Result<?> delete() {
|
||||
Integer id = parmsUtil.getInteger("id");
|
||||
|
|
@ -60,8 +54,9 @@ public class OrganizationMemberController extends BaseController {
|
|||
}
|
||||
|
||||
@RequestMapping("/search")
|
||||
public Result<List<MemberVo>> allDoctorList() {
|
||||
public Result<List<OrganizationMember>> allDoctorList() {
|
||||
DockerSearchQuery dockerSearchQuery = parmsUtil.getObject("query", DockerSearchQuery.class);
|
||||
return success(organizationMemberService.doctorList(dockerSearchQuery));
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -61,8 +61,25 @@ public class OrganizationSectionController extends BaseController {
|
|||
OrganizationSection organizationSection = organizationSectionService.get(id);
|
||||
return success(organizationSection);
|
||||
}
|
||||
/**
|
||||
* 获取所有科室
|
||||
* @return
|
||||
*/
|
||||
@RequestMapping("/allList")
|
||||
public Result<List<JSONObject>> allList() {
|
||||
return success( organizationSectionService.getAllList());
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取当前成员的所属科室
|
||||
* @return
|
||||
*/
|
||||
@RequestMapping("/listByMemberId")
|
||||
public Result<List<OrganizationSection>> listByMemberId() {
|
||||
Integer memberId = parmsUtil.getInteger("memberId");
|
||||
if(memberId == null){
|
||||
throw new MessageException("memberId参数为空");
|
||||
}
|
||||
return success(organizationSectionService.listByMemberId(memberId));
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -17,7 +17,7 @@ import lombok.experimental.Accessors;
|
|||
* </p>
|
||||
*
|
||||
* @author NiuZiYuan
|
||||
* @since 2025-04-28
|
||||
* @since 2025-05-08
|
||||
*/
|
||||
@Getter
|
||||
@Setter
|
||||
|
|
@ -42,11 +42,11 @@ public class OrganizationMember implements Serializable {
|
|||
@ApiModelProperty("电子签名")
|
||||
private String electronicSignature;
|
||||
|
||||
@ApiModelProperty("性别")
|
||||
private String gender;
|
||||
@ApiModelProperty("性别 1男 2女")
|
||||
private Integer gender;
|
||||
|
||||
@ApiModelProperty("年龄")
|
||||
private String age;
|
||||
private Integer age;
|
||||
|
||||
@ApiModelProperty("创建时间")
|
||||
private LocalDateTime createDatetime;
|
||||
|
|
@ -54,9 +54,6 @@ public class OrganizationMember implements Serializable {
|
|||
@ApiModelProperty("身份证号")
|
||||
private String idCardNumber;
|
||||
|
||||
@ApiModelProperty("所属科室")
|
||||
private Integer sectionId;
|
||||
|
||||
@ApiModelProperty("备注")
|
||||
private String memo;
|
||||
|
||||
|
|
@ -71,4 +68,7 @@ public class OrganizationMember implements Serializable {
|
|||
|
||||
@ApiModelProperty("删除标记")
|
||||
private Boolean delFlag;
|
||||
|
||||
@ApiModelProperty("科室名称逗号分割")
|
||||
private String sectionNames;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -0,0 +1,37 @@
|
|||
package com.syjiaer.clinic.server.entity.organization;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import java.io.Serializable;
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
import lombok.ToString;
|
||||
import lombok.experimental.Accessors;
|
||||
/**
|
||||
* <p>
|
||||
*
|
||||
* </p>
|
||||
*
|
||||
* @author NiuZiYuan
|
||||
* @since 2025-05-08
|
||||
*/
|
||||
@Getter
|
||||
@Setter
|
||||
@ToString
|
||||
@Accessors(chain = true)
|
||||
@TableName("organization_member_section")
|
||||
@ApiModel(value = "OrganizationMemberSection对象", description = "")
|
||||
public class OrganizationMemberSection implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@ApiModelProperty("成员id")
|
||||
private Integer organizationMemberId;
|
||||
|
||||
@ApiModelProperty("科室id")
|
||||
private Integer organizationSectionId;
|
||||
|
||||
@ApiModelProperty("主键")
|
||||
private String id;
|
||||
}
|
||||
|
|
@ -3,24 +3,22 @@ package com.syjiaer.clinic.server.entity.organization;
|
|||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.syjiaer.clinic.server.common.annotations.NotNull;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import java.io.Serializable;
|
||||
import java.time.LocalDate;
|
||||
import java.time.LocalDateTime;
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
import lombok.ToString;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.time.LocalDate;
|
||||
import java.time.LocalDateTime;
|
||||
/**
|
||||
* <p>
|
||||
* 科室
|
||||
* </p>
|
||||
*
|
||||
* @author NiuZiYuan
|
||||
* @since 2025-04-09
|
||||
* @since 2025-05-08
|
||||
*/
|
||||
@Getter
|
||||
@Setter
|
||||
|
|
@ -40,15 +38,12 @@ public class OrganizationSection implements Serializable {
|
|||
private String code;
|
||||
|
||||
@ApiModelProperty("科室名称")
|
||||
@NotNull("请输入科室名称")
|
||||
private String name;
|
||||
|
||||
@ApiModelProperty("科别")
|
||||
@NotNull("请输入科别")
|
||||
private String caty;
|
||||
|
||||
@ApiModelProperty("开始日期")
|
||||
@NotNull("请输入开始日期")
|
||||
private LocalDate beginDate;
|
||||
|
||||
@ApiModelProperty("结束日期")
|
||||
|
|
@ -58,42 +53,34 @@ public class OrganizationSection implements Serializable {
|
|||
private String info;
|
||||
|
||||
@ApiModelProperty("负责人姓名")
|
||||
@NotNull("请输入负责人姓名")
|
||||
private String resperName;
|
||||
|
||||
@ApiModelProperty("负责人电话")
|
||||
@NotNull("请输入负责人电话")
|
||||
private String resperTel;
|
||||
|
||||
@ApiModelProperty("医疗服务范围")
|
||||
private String medServScp;
|
||||
|
||||
@ApiModelProperty("成立时间")
|
||||
@NotNull("请输入成立时间")
|
||||
private LocalDate creationDate;
|
||||
|
||||
@ApiModelProperty("批准床位数量")
|
||||
@NotNull("请输入批准床位数量")
|
||||
private Integer bedCnt;
|
||||
|
||||
@ApiModelProperty("医保认可床位数量")
|
||||
private Integer socialBedCnt;
|
||||
|
||||
@ApiModelProperty("医师人数")
|
||||
@NotNull("请输入医师人数")
|
||||
private Integer drPsncnt;
|
||||
|
||||
@ApiModelProperty("药师人数")
|
||||
@NotNull("请输入药师人数")
|
||||
private Integer pharPsncnt;
|
||||
|
||||
@ApiModelProperty("护士人数")
|
||||
@NotNull("请输入护士人数")
|
||||
private Integer nursPsncnt;
|
||||
|
||||
@ApiModelProperty("技师人数")
|
||||
@NotNull("请输入技师人数")
|
||||
private Integer tecnPsncnt ;
|
||||
private Integer tecnPsncnt;
|
||||
|
||||
@ApiModelProperty("备注")
|
||||
private String memo;
|
||||
|
|
|
|||
|
|
@ -4,8 +4,11 @@ import com.syjiaer.clinic.server.entity.manager.ManagerUser;
|
|||
import com.syjiaer.clinic.server.entity.organization.OrganizationMember;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Data
|
||||
public class OrganizationMemberSaveDto {
|
||||
private OrganizationMember memberInfo;
|
||||
private List<Integer> sectionIds;
|
||||
private ManagerUser userInfo;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -21,6 +21,5 @@ import java.util.List;
|
|||
*/
|
||||
public interface OrganizationMemberMapper extends BaseMapper<OrganizationMember> {
|
||||
|
||||
List<MemberVo> selectDetailByQuery(DockerSearchQuery query);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -0,0 +1,18 @@
|
|||
package com.syjiaer.clinic.server.mapper.organization;
|
||||
|
||||
import com.syjiaer.clinic.server.entity.organization.OrganizationMemberSection;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* Mapper 接口
|
||||
* </p>
|
||||
*
|
||||
* @author NiuZiYuan
|
||||
* @since 2025-05-08
|
||||
*/
|
||||
public interface OrganizationMemberSectionMapper extends BaseMapper<OrganizationMemberSection> {
|
||||
|
||||
}
|
||||
|
||||
|
|
@ -28,6 +28,7 @@ import com.syjiaer.clinic.server.entity.diagnosis.dto.GoodsRetailDto;
|
|||
import com.syjiaer.clinic.server.entity.diagnosis.dto.MedicalRecordSaveDto;
|
||||
import com.syjiaer.clinic.server.entity.diagnosis.vo.MedicalRecordVo;
|
||||
import com.syjiaer.clinic.server.entity.organization.OrganizationMember;
|
||||
import com.syjiaer.clinic.server.entity.organization.OrganizationMemberSection;
|
||||
import com.syjiaer.clinic.server.entity.organization.OrganizationSection;
|
||||
import com.syjiaer.clinic.server.entity.patient.PatientInfo;
|
||||
import com.syjiaer.clinic.server.entity.patient.PatientRegistration;
|
||||
|
|
@ -41,6 +42,7 @@ import com.syjiaer.clinic.server.mapper.diagnosis.DiagnosisMedicalGoodsListMappe
|
|||
import com.syjiaer.clinic.server.mapper.diagnosis.DiagnosisMedicalItemListMapper;
|
||||
import com.syjiaer.clinic.server.mapper.diagnosis.DiagnosisMedicalRecordMapper;
|
||||
import com.syjiaer.clinic.server.mapper.organization.OrganizationMemberMapper;
|
||||
import com.syjiaer.clinic.server.mapper.organization.OrganizationMemberSectionMapper;
|
||||
import com.syjiaer.clinic.server.mapper.organization.OrganizationSectionMapper;
|
||||
import com.syjiaer.clinic.server.mapper.patient.PatientInfoMapper;
|
||||
import com.syjiaer.clinic.server.mapper.patient.PatientRegistrationMapper;
|
||||
|
|
@ -72,6 +74,8 @@ public class MedicalRecordService extends BaseService {
|
|||
@Autowired
|
||||
private OrganizationSectionMapper organizationSectionMapper;
|
||||
@Autowired
|
||||
private OrganizationMemberSectionMapper organizationMemberSectionMapper;
|
||||
@Autowired
|
||||
private PatientRegistrationMapper patientRegistrationMapper;
|
||||
@Autowired
|
||||
private ItemService itemService;
|
||||
|
|
@ -226,8 +230,10 @@ public class MedicalRecordService extends BaseService {
|
|||
BeanUtils.copyProperties(registration, pRVo);
|
||||
OrganizationMember docker = organizationMemberMapper.selectById(registration.getOrganizationDoctorId());
|
||||
pRVo.setDoctorName(docker.getName());
|
||||
OrganizationSection section = organizationSectionMapper.selectById(docker.getSectionId());
|
||||
pRVo.setDoctorSection(section.getName());
|
||||
QueryWrapper<OrganizationMemberSection> queryWrapper = new QueryWrapper<>();
|
||||
queryWrapper.eq("organization_member_id", docker.getId());
|
||||
List<OrganizationMemberSection> section = organizationMemberSectionMapper.selectList(queryWrapper);
|
||||
pRVo.setDoctorSection("--");
|
||||
vo.setRegistrationInfoVo(pRVo);
|
||||
DiagnosisMedicalRecord diagnosisMedicalRecord = diagnosisMedicalRecordMapper.selectByDiagnosisCode(diaItem.getCode());
|
||||
vo.setDiagnosisMedicalRecord(diagnosisMedicalRecord);
|
||||
|
|
@ -378,10 +384,10 @@ public class MedicalRecordService extends BaseService {
|
|||
OrganizationMember docker = organizationMemberMapper.selectById(registration.getOrganizationDoctorId());
|
||||
vo.setDockerId(docker.getId());
|
||||
vo.setDockerName(docker.getName());
|
||||
if (docker.getSectionId() != null) {
|
||||
OrganizationSection section = organizationSectionMapper.selectById(docker.getSectionId());
|
||||
vo.setSectionName(section.getName());
|
||||
}
|
||||
// if (docker.getSectionId() != null) {
|
||||
// OrganizationSection section = organizationSectionMapper.selectById(docker.getSectionId());
|
||||
// vo.setSectionName(section.getName());
|
||||
// }
|
||||
QueryWrapper<Diagnosis> diagnosisQueryWrapper = new QueryWrapper<>();
|
||||
diagnosisQueryWrapper.eq("patient_id", vo.getPatientInfo().getId());
|
||||
diagnosisQueryWrapper.orderByDesc("create_time");
|
||||
|
|
|
|||
|
|
@ -9,11 +9,15 @@ import com.syjiaer.clinic.server.common.vo.Page;
|
|||
import com.syjiaer.clinic.server.entity.charge.dto.ChargeQuery;
|
||||
import com.syjiaer.clinic.server.entity.manager.ManagerUser;
|
||||
import com.syjiaer.clinic.server.entity.organization.OrganizationMember;
|
||||
import com.syjiaer.clinic.server.entity.organization.OrganizationMemberSection;
|
||||
import com.syjiaer.clinic.server.entity.organization.OrganizationSection;
|
||||
import com.syjiaer.clinic.server.entity.organization.dto.DockerSearchQuery;
|
||||
import com.syjiaer.clinic.server.entity.organization.dto.OrganizationMemberSaveDto;
|
||||
import com.syjiaer.clinic.server.entity.organization.vo.MemberVo;
|
||||
import com.syjiaer.clinic.server.mapper.manager.ManagerUserMapper;
|
||||
import com.syjiaer.clinic.server.mapper.organization.OrganizationMemberMapper;
|
||||
import com.syjiaer.clinic.server.mapper.organization.OrganizationMemberSectionMapper;
|
||||
import com.syjiaer.clinic.server.mapper.organization.OrganizationSectionMapper;
|
||||
import com.syjiaer.clinic.server.service.BaseService;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
|
|
@ -33,6 +37,10 @@ public class OrganizationMemberService extends BaseService {
|
|||
@Autowired
|
||||
private OrganizationMemberMapper organizationMemberMapper;
|
||||
@Autowired
|
||||
private OrganizationSectionMapper organizationSectionMapper;
|
||||
@Autowired
|
||||
private OrganizationMemberSectionMapper organizationMemberSectionMapper;
|
||||
@Autowired
|
||||
private FileUtil fileUtil;
|
||||
@Autowired
|
||||
private ManagerUserMapper managerUserMapper;
|
||||
|
|
@ -55,7 +63,7 @@ public class OrganizationMemberService extends BaseService {
|
|||
queryWrapper.eq("del_flag", false);
|
||||
Page<OrganizationMember> pageResult = pageHelper(pageNum, pageSize, queryWrapper, organizationMemberMapper, "create_datetime", false);
|
||||
List<OrganizationMemberSaveDto> dtoList = new ArrayList<>();
|
||||
for (OrganizationMember member : pageResult.getList()){
|
||||
for (OrganizationMember member : pageResult.getList()) {
|
||||
OrganizationMemberSaveDto dto = new OrganizationMemberSaveDto();
|
||||
dto.setMemberInfo(member);
|
||||
dto.setUserInfo(managerUserMapper.selectByOrganizationMemberId(member.getId()));
|
||||
|
|
@ -78,30 +86,47 @@ public class OrganizationMemberService extends BaseService {
|
|||
if (organizationMember == null) {
|
||||
throw new MessageException("data参数为空");
|
||||
}
|
||||
//成员信息
|
||||
if (organizationMember.getId() == null) {
|
||||
organizationMember.setCreateDatetime(LocalDateTime.now());
|
||||
organizationMemberMapper.insert(organizationMember);
|
||||
}
|
||||
|
||||
|
||||
//科室信息
|
||||
List<Integer> sectionIds = dto.getSectionIds();
|
||||
if (sectionIds == null || sectionIds.isEmpty()) {
|
||||
throw new MessageException("没有选择科室");
|
||||
}
|
||||
QueryWrapper<OrganizationMemberSection> delWrapper = new QueryWrapper<>();
|
||||
delWrapper.eq("organization_member_id", organizationMember.getId());
|
||||
organizationMemberSectionMapper.delete(delWrapper);
|
||||
List<OrganizationMemberSection> sectionList = new ArrayList<>();
|
||||
List<String> sectionNameList = new ArrayList<>();
|
||||
for (Integer sectionId : sectionIds) {
|
||||
OrganizationSection dbSection = organizationSectionMapper.selectById(sectionId);
|
||||
if (dbSection == null){
|
||||
throw new MessageException("科室不存在");
|
||||
}
|
||||
OrganizationMemberSection memberSection = new OrganizationMemberSection();
|
||||
memberSection.setOrganizationMemberId(organizationMember.getId());
|
||||
memberSection.setOrganizationSectionId(sectionId);
|
||||
memberSection.setId(memberSection.getOrganizationMemberId() + "_" + memberSection.getOrganizationSectionId());
|
||||
|
||||
sectionNameList.add(dbSection.getName());
|
||||
|
||||
sectionList.add(memberSection);
|
||||
}
|
||||
organizationMember.setSectionNames(String.join("-", sectionNameList));
|
||||
organizationMemberMapper.insertOrUpdate(organizationMember);
|
||||
organizationMemberSectionMapper.insert(sectionList);
|
||||
|
||||
ManagerUser user = dto.getUserInfo();
|
||||
user.setOrganizationMemberId(organizationMember.getId());
|
||||
user.setName(organizationMember.getName());
|
||||
managerUserMapper.insert(user);
|
||||
managerUserMapper.insertOrUpdate(user);
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* 编辑成员和用户信息
|
||||
*
|
||||
* @param dto
|
||||
*/
|
||||
public void edit(OrganizationMemberSaveDto dto) {
|
||||
OrganizationMember organizationMember = dto.getMemberInfo();
|
||||
if (organizationMember == null) {
|
||||
throw new MessageException("data参数为空");
|
||||
}
|
||||
organizationMemberMapper.updateById(organizationMember);
|
||||
ManagerUser user = dto.getUserInfo();
|
||||
user.setName(organizationMember.getName());
|
||||
managerUserMapper.updateById(user);
|
||||
}
|
||||
|
||||
/*
|
||||
* 删除成员信息
|
||||
|
|
@ -113,8 +138,8 @@ public class OrganizationMemberService extends BaseService {
|
|||
throw new MessageException("该成员不存在");
|
||||
}
|
||||
UpdateWrapper<OrganizationMember> updateWrapper = new UpdateWrapper();
|
||||
updateWrapper.set("del_flag",true);
|
||||
updateWrapper.eq("id",id);
|
||||
updateWrapper.set("del_flag", true);
|
||||
updateWrapper.eq("id", id);
|
||||
organizationMemberMapper.update(updateWrapper);
|
||||
try {
|
||||
fileUtil.deleteImage(organizationMember.getElectronicSignature());
|
||||
|
|
@ -143,16 +168,33 @@ public class OrganizationMemberService extends BaseService {
|
|||
OrganizationMemberSaveDto dto = new OrganizationMemberSaveDto();
|
||||
dto.setMemberInfo(organizationMemberMapper.selectById(id));
|
||||
dto.setUserInfo(managerUserMapper.selectByOrganizationMemberId(id));
|
||||
QueryWrapper<OrganizationMemberSection> msWrapper = new QueryWrapper<>();
|
||||
msWrapper.select("organization_section_id");
|
||||
msWrapper.eq("organization_member_id", id);
|
||||
List<Integer> sectionIds = organizationMemberSectionMapper.selectObjs(msWrapper);
|
||||
dto.setSectionIds(sectionIds);
|
||||
|
||||
return dto;
|
||||
}
|
||||
|
||||
/*
|
||||
* 获取医生列表
|
||||
*/
|
||||
public List<MemberVo> doctorList(DockerSearchQuery dockerSearchQuery) {
|
||||
if (dockerSearchQuery == null){
|
||||
public List<OrganizationMember> doctorList(DockerSearchQuery dockerSearchQuery) {
|
||||
if (dockerSearchQuery == null) {
|
||||
return new ArrayList<>();
|
||||
}
|
||||
return organizationMemberMapper.selectDetailByQuery(dockerSearchQuery);
|
||||
QueryWrapper<OrganizationMember> queryWrapper = new QueryWrapper<>();
|
||||
if (dockerSearchQuery.getRole() != null){
|
||||
queryWrapper.eq("role", dockerSearchQuery.getRole());
|
||||
}
|
||||
queryWrapper.eq("del_flag", false);
|
||||
if (dockerSearchQuery.getKeyword() != null && !dockerSearchQuery.getKeyword().isEmpty()){
|
||||
queryWrapper.and(wrapper -> wrapper
|
||||
.like("name", dockerSearchQuery.getKeyword())
|
||||
.like("section_names", dockerSearchQuery.getKeyword()));
|
||||
}
|
||||
|
||||
return organizationMemberMapper.selectList(queryWrapper);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -7,7 +7,9 @@ import com.syjiaer.clinic.server.common.config.Config;
|
|||
import com.syjiaer.clinic.server.common.exception.MessageException;
|
||||
import com.syjiaer.clinic.server.common.util.StringUtil;
|
||||
import com.syjiaer.clinic.server.common.vo.Page;
|
||||
import com.syjiaer.clinic.server.entity.organization.OrganizationMemberSection;
|
||||
import com.syjiaer.clinic.server.entity.organization.OrganizationSection;
|
||||
import com.syjiaer.clinic.server.mapper.organization.OrganizationMemberSectionMapper;
|
||||
import com.syjiaer.clinic.server.mapper.organization.OrganizationSectionMapper;
|
||||
import com.syjiaer.clinic.server.service.BaseService;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
|
|
@ -29,6 +31,8 @@ public class OrganizationSectionService extends BaseService {
|
|||
@Autowired
|
||||
private OrganizationSectionMapper organizationSectionMapper;
|
||||
@Autowired
|
||||
private OrganizationMemberSectionMapper organizationMemberSectionMapper;
|
||||
@Autowired
|
||||
private Config config;
|
||||
@Autowired
|
||||
private SocialRequest socialRequest;
|
||||
|
|
@ -197,4 +201,23 @@ public class OrganizationSectionService extends BaseService {
|
|||
return list;
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* 根据成员id查询科室
|
||||
* @param memberId
|
||||
* @return
|
||||
*/
|
||||
public List<OrganizationSection> listByMemberId(Integer memberId) {
|
||||
QueryWrapper<OrganizationMemberSection> msWrapper = new QueryWrapper<>();
|
||||
msWrapper.select("organization_section_id");
|
||||
msWrapper.eq("organization_member_id", memberId);
|
||||
List<Integer> sectionIds = organizationMemberSectionMapper.selectObjs(msWrapper);
|
||||
|
||||
QueryWrapper<OrganizationSection> sectionWrapper = new QueryWrapper<>();
|
||||
sectionWrapper.in("id", sectionIds);
|
||||
return organizationSectionMapper.selectList(sectionWrapper);
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -98,9 +98,9 @@ public class PatientRegistrationService extends BaseService {
|
|||
registration.setType(1);
|
||||
registration.setStatus(1);
|
||||
OrganizationMember docker = organizationMemberMapper.selectById(registration.getOrganizationDoctorId());
|
||||
OrganizationSection section = organizationSectionMapper.selectById(docker.getSectionId());
|
||||
// OrganizationSection section = organizationSectionMapper.selectById(docker.getSectionId());
|
||||
registration.setOrganizationDoctorId(docker.getId());
|
||||
registration.setOrganizationSectionId(section.getId());
|
||||
// registration.setOrganizationSectionId(section.getId());
|
||||
patientRegistrationMapper.insert(registration);
|
||||
//医保挂号
|
||||
if (mdtrtCertType == null || mdtrtCertNo == null || mdtrtCertType.isEmpty() || mdtrtCertNo.isEmpty()){
|
||||
|
|
@ -116,9 +116,9 @@ public class PatientRegistrationService extends BaseService {
|
|||
im2201.setIptOtpNo(fstNo);
|
||||
im2201.setAtddrNo(docker.getSocialMemberCode());
|
||||
im2201.setDrName(docker.getName());
|
||||
im2201.setDeptCode(section.getCode());
|
||||
im2201.setDeptName(section.getName());
|
||||
im2201.setCaty(section.getCaty());
|
||||
// im2201.setDeptCode(section.getCode());
|
||||
// im2201.setDeptName(section.getName());
|
||||
// im2201.setCaty(section.getCaty());
|
||||
JSONObject jsonObject = socialRequest.call2201(im2201);
|
||||
UpdateWrapper<PatientRegistration> regisWrapper = new UpdateWrapper<>();
|
||||
regisWrapper.set("mdtrt_id",((JSONObject)jsonObject.get("data")).get("mdtrt_id"));
|
||||
|
|
@ -137,7 +137,7 @@ public class PatientRegistrationService extends BaseService {
|
|||
registration.setAge(patient.getAge());
|
||||
registration.setPhone(patient.getPhone());
|
||||
//医生信息
|
||||
registration.setOrganizationSectionId(docker.getSectionId());
|
||||
// registration.setOrganizationSectionId(docker.getSectionId());
|
||||
registration.setOrganizationDoctorId(docker.getId());
|
||||
|
||||
//挂号信息
|
||||
|
|
@ -285,8 +285,8 @@ public class PatientRegistrationService extends BaseService {
|
|||
|
||||
OrganizationMember docker = organizationMemberMapper.selectById(registration.getOrganizationDoctorId());
|
||||
vo.setDoctorName(docker.getName());
|
||||
OrganizationSection section = organizationSectionMapper.selectById(docker.getSectionId());
|
||||
vo.setDoctorSection(section.getName());
|
||||
// OrganizationSection section = organizationSectionMapper.selectById(docker.getSectionId());
|
||||
// vo.setDoctorSection(section.getName());
|
||||
|
||||
QueryWrapper<PatientRegistration> queryWrapper = new QueryWrapper<>();
|
||||
queryWrapper.eq("patient_info_id",registration.getPatientInfoId());
|
||||
|
|
|
|||
|
|
@ -2,17 +2,5 @@
|
|||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.syjiaer.clinic.server.mapper.organization.OrganizationMemberMapper">
|
||||
|
||||
<select id="selectDetailByQuery" resultType="com.syjiaer.clinic.server.entity.organization.vo.MemberVo">
|
||||
SELECT om.*,os.name AS section_name
|
||||
FROM organization_member AS om LEFT JOIN organization_section AS os ON om.section_id = os.id
|
||||
<where>
|
||||
<if test="keyword != null and keyword != ''">
|
||||
(om.name LIKE concat('%', #{keyword}, '%')
|
||||
or os.name LIKE concat('%', #{keyword}, '%'))
|
||||
</if>
|
||||
<if test="role != null">
|
||||
And om.role = #{role}
|
||||
</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
|
|
|
|||
|
|
@ -0,0 +1,5 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.syjiaer.clinic.server.mapper.organization.OrganizationMemberSectionMapper">
|
||||
|
||||
</mapper>
|
||||
Loading…
Reference in New Issue