|
|
@ -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; |
|
|
@ -73,6 +75,8 @@ public class DockServiceImpl implements DockService { |
|
|
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; |
|
|
@ -312,6 +316,7 @@ public class DockServiceImpl implements DockService { |
|
|
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); |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
@ -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); |
|
|
@ -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); |
|
|
@ -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()); |
|
|
|