Browse Source

用户绑定角色

hnzxyjhyy
ccsens_zhengzhichuan 2 weeks ago
parent
commit
17e0097015
  1. 141
      ruisi_java/ruisi-system/src/main/java/com/ccsens/system/service/impl/DockServiceImpl.java
  2. 8
      ruisi_java/ruisi-web-client/src/main/resources/application-dev.yml
  3. 10
      ruisi_java/ruisi-web-client/src/main/resources/application-prod.yml

141
ruisi_java/ruisi-system/src/main/java/com/ccsens/system/service/impl/DockServiceImpl.java

@ -15,6 +15,8 @@ import com.ccsens.common.enums.DataSourceType;
import com.ccsens.common.exception.base.BaseException; import com.ccsens.common.exception.base.BaseException;
import com.ccsens.common.utils.DateUtils; import com.ccsens.common.utils.DateUtils;
import com.ccsens.common.utils.SecurityUtils; import com.ccsens.common.utils.SecurityUtils;
import com.ccsens.common.utils.StringUtils;
import com.ccsens.system.domain.SysUserRole;
import com.ccsens.system.domain.dto.DockDto; import com.ccsens.system.domain.dto.DockDto;
import com.ccsens.system.domain.po.*; import com.ccsens.system.domain.po.*;
import com.ccsens.system.persist.dao.DockDao; import com.ccsens.system.persist.dao.DockDao;
@ -66,13 +68,15 @@ public class DockServiceImpl implements DockService {
@Resource @Resource
private PmsPatientBodyMapper pmsPatientBodyMapper; private PmsPatientBodyMapper pmsPatientBodyMapper;
@Resource @Resource
private PmsPatientDiagnosisMapper pmsPatientDiagnosisMapper; private PmsPatientDiagnosisMapper pmsPatientDiagnosisMapper;
@Resource @Resource
private PmsPatientParentIllnessMapper pmsPatientParentIllnessMapper; private PmsPatientParentIllnessMapper pmsPatientParentIllnessMapper;
@Resource @Resource
private SysDeptMapper sysDeptMapper; private SysDeptMapper sysDeptMapper;
@Resource @Resource
private SysUserMapper sysUserMapper; private SysUserMapper sysUserMapper;
@Resource
private SysUserRoleMapper userRoleMapper;
@Value("${hospitalId:}") @Value("${hospitalId:}")
private Long hospitalId; private Long hospitalId;
@ -265,7 +269,7 @@ public class DockServiceImpl implements DockService {
} }
} }
}else { } else {
//不存在新增 //不存在新增
PmsPatient pmsPatient = BeanUtil.copyProperties(dockPatientBaseInfo, PmsPatient.class); PmsPatient pmsPatient = BeanUtil.copyProperties(dockPatientBaseInfo, PmsPatient.class);
pmsPatient.setId(IdUtil.getSnowflake().nextId()); pmsPatient.setId(IdUtil.getSnowflake().nextId());
@ -274,30 +278,30 @@ public class DockServiceImpl implements DockService {
} }
} }
public void syncHospitalData(){ public void syncHospitalData() {
//患者信息 //患者信息
try { try {
syncPmsPatient(); syncPmsPatient();
}catch (Exception e){ } catch (Exception e) {
log.error("患者信息同步失败",e); log.error("患者信息同步失败", e);
} }
//就诊信息 //就诊信息
try { try {
syncPmsPatientVisitInfo(); syncPmsPatientVisitInfo();
}catch (Exception e){ } catch (Exception e) {
log.error("就诊信息同步失败",e); log.error("就诊信息同步失败", e);
} }
//诊断信息 //诊断信息
try { try {
syncPmsPatientDiagnosis(); syncPmsPatientDiagnosis();
}catch (Exception e){ } catch (Exception e) {
log.error("诊断信息同步失败",e); log.error("诊断信息同步失败", e);
} }
//用药信息 //用药信息
try { try {
syncPmsPatientParentIllness(); syncPmsPatientParentIllness();
}catch (Exception e){ } catch (Exception e) {
log.error("用药信息同步失败",e); log.error("用药信息同步失败", e);
} }
} }
@ -305,20 +309,21 @@ public class DockServiceImpl implements DockService {
@DataSource(value = DataSourceType.MASTER) @DataSource(value = DataSourceType.MASTER)
@Transactional(propagation = Propagation.REQUIRES_NEW, rollbackFor = Exception.class) @Transactional(propagation = Propagation.REQUIRES_NEW, rollbackFor = Exception.class)
public void syncUmsUserMaster(List<SysUser> sysUsers) { public void syncUmsUserMaster(List<SysUser> sysUsers) {
if(CollUtil.isNotEmpty(sysUsers)){ if (CollUtil.isNotEmpty(sysUsers)) {
for (SysUser sysUser : sysUsers) { for (SysUser sysUser : sysUsers) {
//根据code查找用户 //根据code查找用户
SysUser user = new SysUser(); SysUser user = new SysUser();
user.setEmplCode(sysUser.getEmplCode()); user.setEmplCode(sysUser.getEmplCode());
List<SysUser> users = sysUserMapper.selectUserList(user); List<SysUser> users = sysUserMapper.selectUserList(user);
if (CollUtil.isEmpty(users)) { if (CollUtil.isEmpty(users)) {
sysUser.setDeptId(hospitalId);
sysUserMapper.insertUser(sysUser); sysUserMapper.insertUser(sysUser);
} }
} }
} }
} }
// @DataSource(value = DataSourceType.SLAVE) // @DataSource(value = DataSourceType.SLAVE)
// @Transactional(propagation = Propagation.REQUIRES_NEW, rollbackFor = Exception.class) // @Transactional(propagation = Propagation.REQUIRES_NEW, rollbackFor = Exception.class)
public List<SysUser> syncUmsUserSlave() { public List<SysUser> syncUmsUserSlave() {
List<SysUser> returnUsers = new ArrayList<>(); List<SysUser> returnUsers = new ArrayList<>();
@ -335,7 +340,7 @@ public class DockServiceImpl implements DockService {
List<SysDept> sysDepts = sysDeptMapper.selectDeptList(sysDept); List<SysDept> sysDepts = sysDeptMapper.selectDeptList(sysDept);
if (CollUtil.isEmpty(sysDepts)) { if (CollUtil.isEmpty(sysDepts)) {
continue; continue;
}else { } else {
sysDept = sysDepts.get(0); sysDept = sysDepts.get(0);
} }
SysUser sysUser = new SysUser(); SysUser sysUser = new SysUser();
@ -350,6 +355,13 @@ public class DockServiceImpl implements DockService {
//获取一年后的日期 //获取一年后的日期
sysUser.setValidDate(DateUtil.offset(new Date(), DateField.YEAR, 1)); sysUser.setValidDate(DateUtil.offset(new Date(), DateField.YEAR, 1));
sysUserMapper.insertUser(sysUser); sysUserMapper.insertUser(sysUser);
// 新增用户与角色管理
SysUserRole ur = new SysUserRole();
ur.setUserId(sysUser.getUserId());
ur.setRoleId(104L);
userRoleMapper.batchUserRole(CollUtil.newArrayList(ur));
returnUsers.add(sysUser); returnUsers.add(sysUser);
dockEmpl.setSync("1"); dockEmpl.setSync("1");
dockEmplMapper.updateByPrimaryKeySelective(dockEmpl); dockEmplMapper.updateByPrimaryKeySelective(dockEmpl);
@ -358,7 +370,7 @@ public class DockServiceImpl implements DockService {
return returnUsers; return returnUsers;
} }
// @DataSource(value = DataSourceType.SLAVE) // @DataSource(value = DataSourceType.SLAVE)
// @Transactional(propagation = Propagation.REQUIRES_NEW, rollbackFor = Exception.class) // @Transactional(propagation = Propagation.REQUIRES_NEW, rollbackFor = Exception.class)
public List<SysDept> syncUmsDeptSlave() { public List<SysDept> syncUmsDeptSlave() {
List<SysDept> returnDepts = new ArrayList<>(); List<SysDept> returnDepts = new ArrayList<>();
@ -381,7 +393,7 @@ public class DockServiceImpl implements DockService {
sysDept.setDeptCode(dockDept.getDeptCode()); sysDept.setDeptCode(dockDept.getDeptCode());
sysDeptMapper.insertDept(sysDept); sysDeptMapper.insertDept(sysDept);
returnDepts.add(sysDept); returnDepts.add(sysDept);
}else { } else {
sysDept = sysDepts.get(0); sysDept = sysDepts.get(0);
sysDept.setParentId(hospitalId); sysDept.setParentId(hospitalId);
sysDept.setAncestors("0," + hospitalId); sysDept.setAncestors("0," + hospitalId);
@ -399,7 +411,7 @@ public class DockServiceImpl implements DockService {
@DataSource(value = DataSourceType.MASTER) @DataSource(value = DataSourceType.MASTER)
@Transactional(propagation = Propagation.REQUIRES_NEW, rollbackFor = Exception.class) @Transactional(propagation = Propagation.REQUIRES_NEW, rollbackFor = Exception.class)
public void syncUmsDeptMaster(List<SysDept> sysDepts) { public void syncUmsDeptMaster(List<SysDept> sysDepts) {
if(CollUtil.isNotEmpty(sysDepts)){ if (CollUtil.isNotEmpty(sysDepts)) {
sysDepts.forEach(sysDept -> { sysDepts.forEach(sysDept -> {
//根据code查找系统的部门信息 //根据code查找系统的部门信息
SysDept dept = new SysDept(); SysDept dept = new SysDept();
@ -407,7 +419,7 @@ public class DockServiceImpl implements DockService {
List<SysDept> depts = sysDeptMapper.selectDeptList(dept); List<SysDept> depts = sysDeptMapper.selectDeptList(dept);
if (CollUtil.isEmpty(depts)) { if (CollUtil.isEmpty(depts)) {
sysDeptMapper.insertDept(sysDept); sysDeptMapper.insertDept(sysDept);
}else { } else {
SysDept sysDept1 = depts.get(0); SysDept sysDept1 = depts.get(0);
sysDept.setDeptId(sysDept1.getDeptId()); sysDept.setDeptId(sysDept1.getDeptId());
sysDeptMapper.updateDept(sysDept); sysDeptMapper.updateDept(sysDept);
@ -417,8 +429,6 @@ public class DockServiceImpl implements DockService {
} }
private void syncPmsPatient() { private void syncPmsPatient() {
DockPatientBaseInfoExample dockPatientBaseInfoExample = new DockPatientBaseInfoExample(); DockPatientBaseInfoExample dockPatientBaseInfoExample = new DockPatientBaseInfoExample();
dockPatientBaseInfoExample.createCriteria().andSyncEqualTo("0").andDelFlagEqualTo((byte) 0); dockPatientBaseInfoExample.createCriteria().andSyncEqualTo("0").andDelFlagEqualTo((byte) 0);
@ -427,7 +437,7 @@ public class DockServiceImpl implements DockService {
return; return;
} }
for (DockPatientBaseInfo dockPatientBaseInfo : dockPatientBaseInfos) { for (DockPatientBaseInfo dockPatientBaseInfo : dockPatientBaseInfos) {
if(ObjectUtil.isNull(dockPatientBaseInfo.getPatientNo())){ if (ObjectUtil.isNull(dockPatientBaseInfo.getPatientNo())) {
continue; continue;
} }
//根据患者患者唯一编号查询业务表内患者信息 //根据患者患者唯一编号查询业务表内患者信息
@ -440,7 +450,7 @@ public class DockServiceImpl implements DockService {
pmsPatient = pmsPatients.get(0); pmsPatient = pmsPatients.get(0);
disposePmsPatient(dockPatientBaseInfo, pmsPatient); disposePmsPatient(dockPatientBaseInfo, pmsPatient);
pmsPatientMapper.updateByPrimaryKeySelective(pmsPatient); pmsPatientMapper.updateByPrimaryKeySelective(pmsPatient);
}else { } else {
//不存在则插入 //不存在则插入
pmsPatient = new PmsPatient(); pmsPatient = new PmsPatient();
pmsPatient.setId(IdUtil.getSnowflake().nextId()); pmsPatient.setId(IdUtil.getSnowflake().nextId());
@ -458,7 +468,7 @@ public class DockServiceImpl implements DockService {
DockPatientVisitInfoExample dockPatientVisitInfoExample = new DockPatientVisitInfoExample(); DockPatientVisitInfoExample dockPatientVisitInfoExample = new DockPatientVisitInfoExample();
dockPatientVisitInfoExample.createCriteria().andSyncEqualTo("0"); dockPatientVisitInfoExample.createCriteria().andSyncEqualTo("0");
List<DockPatientVisitInfo> dockPatientVisitInfos = dockPatientVisitInfoMapper.selectByExample(dockPatientVisitInfoExample); List<DockPatientVisitInfo> dockPatientVisitInfos = dockPatientVisitInfoMapper.selectByExample(dockPatientVisitInfoExample);
if(CollUtil.isEmpty(dockPatientVisitInfos)){ if (CollUtil.isEmpty(dockPatientVisitInfos)) {
return; return;
} }
for (DockPatientVisitInfo dockPatientVisitInfo : dockPatientVisitInfos) { for (DockPatientVisitInfo dockPatientVisitInfo : dockPatientVisitInfos) {
@ -486,11 +496,11 @@ public class DockServiceImpl implements DockService {
pmsPatient.setId(IdUtil.getSnowflake().nextId()); pmsPatient.setId(IdUtil.getSnowflake().nextId());
disposePmsPatient(dockPatientBaseInfos.get(0), pmsPatient); disposePmsPatient(dockPatientBaseInfos.get(0), pmsPatient);
pmsPatientMapper.insertSelective(pmsPatient); pmsPatientMapper.insertSelective(pmsPatient);
}else { } else {
//不存在表示患者确实不存在,直接跳过这个就诊信息 //不存在表示患者确实不存在,直接跳过这个就诊信息
return null; return null;
} }
}else { } else {
pmsPatient = pmsPatients.get(0); pmsPatient = pmsPatients.get(0);
} }
//根据就诊流水号查询业务表内患者就诊信息 //根据就诊流水号查询业务表内患者就诊信息
@ -503,7 +513,7 @@ public class DockServiceImpl implements DockService {
pmsPatientBody.setPatientId(pmsPatient.getId()); pmsPatientBody.setPatientId(pmsPatient.getId());
disposePmsPatientBody(dockPatientVisitInfo, pmsPatientBody); disposePmsPatientBody(dockPatientVisitInfo, pmsPatientBody);
pmsPatientBodyMapper.updateByPrimaryKeySelective(pmsPatientBody); pmsPatientBodyMapper.updateByPrimaryKeySelective(pmsPatientBody);
}else { } else {
pmsPatientBody = new PmsPatientBody(); pmsPatientBody = new PmsPatientBody();
pmsPatientBody.setId(IdUtil.getSnowflake().nextId()); pmsPatientBody.setId(IdUtil.getSnowflake().nextId());
pmsPatientBody.setPatientId(pmsPatient.getId()); pmsPatientBody.setPatientId(pmsPatient.getId());
@ -542,7 +552,7 @@ public class DockServiceImpl implements DockService {
if (pmsPatientBody == null) { if (pmsPatientBody == null) {
continue; continue;
} }
}else { } else {
//不存在则跳过 //不存在则跳过
continue; continue;
} }
@ -588,17 +598,17 @@ public class DockServiceImpl implements DockService {
List<PmsPatientBody> pmsPatientBodies = pmsPatientBodyMapper.selectByExample(pmsPatientBodyExample); List<PmsPatientBody> pmsPatientBodies = pmsPatientBodyMapper.selectByExample(pmsPatientBodyExample);
if (CollUtil.isNotEmpty(pmsPatientBodies)) { if (CollUtil.isNotEmpty(pmsPatientBodies)) {
pmsPatientBody = pmsPatientBodies.get(0); pmsPatientBody = pmsPatientBodies.get(0);
}else { } else {
//不存在则查找同步表的就诊信息 //不存在则查找同步表的就诊信息
DockPatientVisitInfoExample dockPatientVisitInfoExample = new DockPatientVisitInfoExample(); DockPatientVisitInfoExample dockPatientVisitInfoExample = new DockPatientVisitInfoExample();
dockPatientVisitInfoExample.createCriteria().andVisitNoEqualTo(key).andDelFlagEqualTo((byte) 0); dockPatientVisitInfoExample.createCriteria().andVisitNoEqualTo(key).andDelFlagEqualTo((byte) 0);
List<DockPatientVisitInfo> dockPatientVisitInfos = dockPatientVisitInfoMapper.selectByExample(dockPatientVisitInfoExample); List<DockPatientVisitInfo> dockPatientVisitInfos = dockPatientVisitInfoMapper.selectByExample(dockPatientVisitInfoExample);
if (CollUtil.isNotEmpty(dockPatientVisitInfos)){ if (CollUtil.isNotEmpty(dockPatientVisitInfos)) {
pmsPatientBody = savePatientBady(dockPatientVisitInfos.get(0)); pmsPatientBody = savePatientBady(dockPatientVisitInfos.get(0));
if (pmsPatientBody == null) { if (pmsPatientBody == null) {
continue; continue;
} }
}else { } else {
//不存在则跳过 //不存在则跳过
continue; continue;
} }
@ -657,7 +667,6 @@ public class DockServiceImpl implements DockService {
} }
private void disposePmsPatient(DockPatientBaseInfo dockPatientBaseInfo, PmsPatient pmsPatient) { private void disposePmsPatient(DockPatientBaseInfo dockPatientBaseInfo, PmsPatient pmsPatient) {
pmsPatient.setPatientNo(dockPatientBaseInfo.getPatientNo()); pmsPatient.setPatientNo(dockPatientBaseInfo.getPatientNo());
@ -673,15 +682,15 @@ public class DockServiceImpl implements DockService {
// 性别转换:将"男"/"女"转换为 0/1 // 性别转换:将"男"/"女"转换为 0/1
String sex = dockPatientBaseInfo.getSex(); String sex = dockPatientBaseInfo.getSex();
if ("男".equals(sex)) { if ("男".equals(sex)) {
pmsPatient.setSex((byte)0); pmsPatient.setSex((byte) 0);
} else if ("女".equals(sex)) { } else if ("女".equals(sex)) {
pmsPatient.setSex((byte)1); pmsPatient.setSex((byte) 1);
} else { } else {
// 如果已经有数字代码,直接转换 // 如果已经有数字代码,直接转换
try { try {
pmsPatient.setSex(Byte.parseByte(sex)); pmsPatient.setSex(Byte.parseByte(sex));
} catch (NumberFormatException e) { } catch (NumberFormatException e) {
pmsPatient.setSex((byte)0); // 默认值 pmsPatient.setSex((byte) 0); // 默认值
} }
} }
@ -691,57 +700,57 @@ public class DockServiceImpl implements DockService {
// 教育程度转换 // 教育程度转换
String educationalStatus = dockPatientBaseInfo.getEducationalStatus(); String educationalStatus = dockPatientBaseInfo.getEducationalStatus();
if ("文盲".equals(educationalStatus)) { if ("文盲".equals(educationalStatus)) {
pmsPatient.setEducationalStatus((byte)1); pmsPatient.setEducationalStatus((byte) 1);
} else if ("小学".equals(educationalStatus)) { } else if ("小学".equals(educationalStatus)) {
pmsPatient.setEducationalStatus((byte)2); pmsPatient.setEducationalStatus((byte) 2);
} else if ("初中".equals(educationalStatus)) { } else if ("初中".equals(educationalStatus)) {
pmsPatient.setEducationalStatus((byte)3); pmsPatient.setEducationalStatus((byte) 3);
} else if ("高中".equals(educationalStatus)) { } else if ("高中".equals(educationalStatus)) {
pmsPatient.setEducationalStatus((byte)4); pmsPatient.setEducationalStatus((byte) 4);
} else if ("大学".equals(educationalStatus)) { } else if ("大学".equals(educationalStatus)) {
pmsPatient.setEducationalStatus((byte)5); pmsPatient.setEducationalStatus((byte) 5);
} else if ("大学以上".equals(educationalStatus)) { } else if ("大学以上".equals(educationalStatus)) {
pmsPatient.setEducationalStatus((byte)6); pmsPatient.setEducationalStatus((byte) 6);
} else if ("其他".equals(educationalStatus)) { } else if ("其他".equals(educationalStatus)) {
pmsPatient.setEducationalStatus((byte)7); pmsPatient.setEducationalStatus((byte) 7);
} else { } else {
try { try {
pmsPatient.setEducationalStatus(Byte.parseByte(educationalStatus)); pmsPatient.setEducationalStatus(Byte.parseByte(educationalStatus));
} catch (NumberFormatException e) { } catch (NumberFormatException e) {
pmsPatient.setEducationalStatus((byte)7); // 默认其他 pmsPatient.setEducationalStatus((byte) 7); // 默认其他
} }
} }
// 职业转换 // 职业转换
String career = dockPatientBaseInfo.getCareer(); String career = dockPatientBaseInfo.getCareer();
if ("农林牧渔水利生产人员".equals(career)) { if ("农林牧渔水利生产人员".equals(career)) {
pmsPatient.setCareer((byte)1); pmsPatient.setCareer((byte) 1);
} else if ("教师".equals(career)) { } else if ("教师".equals(career)) {
pmsPatient.setCareer((byte)2); pmsPatient.setCareer((byte) 2);
} else if ("医务工作者".equals(career)) { } else if ("医务工作者".equals(career)) {
pmsPatient.setCareer((byte)3); pmsPatient.setCareer((byte) 3);
} else if ("专业技术人员".equals(career)) { } else if ("专业技术人员".equals(career)) {
pmsPatient.setCareer((byte)4); pmsPatient.setCareer((byte) 4);
} else if ("生产、运输设备操作人员及有关人员".equals(career)) { } else if ("生产、运输设备操作人员及有关人员".equals(career)) {
pmsPatient.setCareer((byte)5); pmsPatient.setCareer((byte) 5);
} else if ("商业、服务业人员".equals(career)) { } else if ("商业、服务业人员".equals(career)) {
pmsPatient.setCareer((byte)6); pmsPatient.setCareer((byte) 6);
} else if ("国家机关、事业单位、企业负责人".equals(career)) { } else if ("国家机关、事业单位、企业负责人".equals(career)) {
pmsPatient.setCareer((byte)7); pmsPatient.setCareer((byte) 7);
} else if ("国家机关、事业单位、企业办事人员和有关人员".equals(career)) { } else if ("国家机关、事业单位、企业办事人员和有关人员".equals(career)) {
pmsPatient.setCareer((byte)8); pmsPatient.setCareer((byte) 8);
} else if ("军人".equals(career)) { } else if ("军人".equals(career)) {
pmsPatient.setCareer((byte)9); pmsPatient.setCareer((byte) 9);
} else if ("媒体、文体类工作人员".equals(career)) { } else if ("媒体、文体类工作人员".equals(career)) {
pmsPatient.setCareer((byte)10); pmsPatient.setCareer((byte) 10);
} else if ("在校学生".equals(career)) { } else if ("在校学生".equals(career)) {
pmsPatient.setCareer((byte)11); pmsPatient.setCareer((byte) 11);
} else if ("未就业".equals(career)) { } else if ("未就业".equals(career)) {
pmsPatient.setCareer((byte)12); pmsPatient.setCareer((byte) 12);
} else if ("家务".equals(career)) { } else if ("家务".equals(career)) {
pmsPatient.setCareer((byte)13); pmsPatient.setCareer((byte) 13);
} else if ("其他".equals(career)) { } else if ("其他".equals(career)) {
pmsPatient.setCareer((byte)14); pmsPatient.setCareer((byte) 14);
} else { } else {
try { try {
pmsPatient.setCareer(Byte.parseByte(career)); pmsPatient.setCareer(Byte.parseByte(career));
@ -753,19 +762,19 @@ public class DockServiceImpl implements DockService {
// 婚姻状况转换 // 婚姻状况转换
String maritalStatus = dockPatientBaseInfo.getMaritalStatus(); String maritalStatus = dockPatientBaseInfo.getMaritalStatus();
if ("未婚".equals(maritalStatus)) { if ("未婚".equals(maritalStatus)) {
pmsPatient.setMaritalStatus((byte)1); pmsPatient.setMaritalStatus((byte) 1);
} else if ("已婚".equals(maritalStatus)) { } else if ("已婚".equals(maritalStatus)) {
pmsPatient.setMaritalStatus((byte)2); pmsPatient.setMaritalStatus((byte) 2);
} else if ("离异".equals(maritalStatus)) { } else if ("离异".equals(maritalStatus)) {
pmsPatient.setMaritalStatus((byte)3); pmsPatient.setMaritalStatus((byte) 3);
} else if ("分居".equals(maritalStatus)) { } else if ("分居".equals(maritalStatus)) {
pmsPatient.setMaritalStatus((byte)4); pmsPatient.setMaritalStatus((byte) 4);
} else if ("丧偶".equals(maritalStatus)) { } else if ("丧偶".equals(maritalStatus)) {
pmsPatient.setMaritalStatus((byte)5); pmsPatient.setMaritalStatus((byte) 5);
} else if ("同居".equals(maritalStatus)) { } else if ("同居".equals(maritalStatus)) {
pmsPatient.setMaritalStatus((byte)6); pmsPatient.setMaritalStatus((byte) 6);
} else if ("其他".equals(maritalStatus)) { } else if ("其他".equals(maritalStatus)) {
pmsPatient.setMaritalStatus((byte)7); pmsPatient.setMaritalStatus((byte) 7);
} else { } else {
try { try {
pmsPatient.setMaritalStatus(Byte.parseByte(maritalStatus)); pmsPatient.setMaritalStatus(Byte.parseByte(maritalStatus));
@ -782,11 +791,11 @@ public class DockServiceImpl implements DockService {
// 居住状态转换 // 居住状态转换
String dwellingState = dockPatientBaseInfo.getDwellingState(); String dwellingState = dockPatientBaseInfo.getDwellingState();
if ("独居".equals(dwellingState)) { if ("独居".equals(dwellingState)) {
pmsPatient.setDwellingState((byte)1); pmsPatient.setDwellingState((byte) 1);
} else if ("与配偶或对象或子女".equals(dwellingState)) { } else if ("与配偶或对象或子女".equals(dwellingState)) {
pmsPatient.setDwellingState((byte)2); pmsPatient.setDwellingState((byte) 2);
} else if ("与亲戚或朋友居住".equals(dwellingState)) { } else if ("与亲戚或朋友居住".equals(dwellingState)) {
pmsPatient.setDwellingState((byte)3); pmsPatient.setDwellingState((byte) 3);
} else { } else {
try { try {
pmsPatient.setDwellingState(Byte.parseByte(dwellingState)); pmsPatient.setDwellingState(Byte.parseByte(dwellingState));

8
ruisi_java/ruisi-web-client/src/main/resources/application-dev.yml

@ -11,14 +11,14 @@ spring:
# password: po3OynBO[M3579p6L7)o # password: po3OynBO[M3579p6L7)o
url: jdbc:mysql://127.0.0.1:3306/ruisi_cga?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8 url: jdbc:mysql://127.0.0.1:3306/ruisi_cga?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
username: root username: root
password: 123456 password: q7510327
# 从库数据源 # 从库数据源
slave: slave:
# 从数据源开关/默认关闭 # 从数据源开关/默认关闭
enabled: true enabled: true
url: jdbc:mysql://127.0.0.1:3306/ruisi_cga_yf1?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8 url: jdbc:mysql://127.0.0.1:3306/ruisi_cga_hnszyyy?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
username: root username: root
password: 123456 password: q7510327
# driverClassName: oracle.jdbc.driver.OracleDriver # driverClassName: oracle.jdbc.driver.OracleDriver
# url: jdbc:oracle:thin:@200.1.8.115:1521:hisdb # url: jdbc:oracle:thin:@200.1.8.115:1521:hisdb
# username: interface_lnpg # username: interface_lnpg
@ -126,6 +126,6 @@ informed:
clientVersion: v1.8.3.0 clientVersion: v1.8.3.0
# 医院id,不同医院部署的时候需要修改 # 医院id,不同医院部署的时候需要修改
hospitalId: 174 hospitalId: 178
generalPassword: cga123# generalPassword: cga123#

10
ruisi_java/ruisi-web-client/src/main/resources/application-prod.yml

@ -12,10 +12,10 @@ spring:
# 从库数据源 # 从库数据源
slave: slave:
# 从数据源开关/默认关闭 # 从数据源开关/默认关闭
enabled: false enabled: true
url: url: jdbc:mysql://172.16.21.24:23306/ruisi_cga_hnszyyy?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
username: username: root
password: password: xian#2024!!!
# 初始连接数 # 初始连接数
initialSize: 5 initialSize: 5
# 最小连接池数量 # 最小连接池数量
@ -131,5 +131,5 @@ informed:
clientVersion: v1.8.3.0 clientVersion: v1.8.3.0
# 医院id,不同医院部署的时候需要修改 # 医院id,不同医院部署的时候需要修改
hospitalId: 174 hospitalId: 178
generalPassword: cga123# generalPassword: cga123#
Loading…
Cancel
Save