| | |
| | | private UserFamiliesRoomMapper userFamiliesRoomMapper; |
| | | @Resource |
| | | private FamiliesRoomMapper familiesRoomMapper; |
| | | @Resource |
| | | private UserBeChangeLogMapper userBeChangeLogMapper; |
| | | |
| | | |
| | | |
| | |
| | | logger.error("新增治疗单处理科室关系,用户id为空"); |
| | | return; |
| | | } |
| | | User user = userMapper.selectOneByKey(treatSingle.getUserId()); |
| | | if (user == null){ |
| | | logger.error("新增治疗单处理科室关系,查询用户失败"+treatSingle.getUserId()); |
| | | return; |
| | | } |
| | | SqlSentence sqlSentence = new SqlSentence(); |
| | | Map<String,Object> sqlMap = new HashMap<>(); |
| | | sqlMap.put("isDel",BaseEntity.NO); |
| | |
| | | } |
| | | userFamiliesRoom.setIsDefault(0); |
| | | if (userFamiliesRoomMapper.insert(userFamiliesRoom) != 1){ |
| | | throw new TipsException("新增失败!"+ JSON.toJSONString(userFamiliesRoom)); |
| | | throw new TipsException("新增失败1!"+ JSON.toJSONString(userFamiliesRoom)); |
| | | } |
| | | //新增修改记录 |
| | | UserBeChangeLog userBeChangeLog = new UserBeChangeLog(); |
| | | userBeChangeLog.setUserId(user.getId()); |
| | | userBeChangeLog.setUserName(user.getName()); |
| | | userBeChangeLog.setUserLevel(user.getUserLevel()); |
| | | userBeChangeLog.setUserType(user.getUserType()); |
| | | userBeChangeLog.setUserStatus(user.getUserStatus()); |
| | | userBeChangeLog.setHisCorpUserId(user.getHisCorpUserId()); |
| | | userBeChangeLog.setBelongShopId(user.getShopId()); |
| | | userBeChangeLog.setMemberNO(user.getMemberNO()); |
| | | userBeChangeLog.setCIQ(user.getCIQ()); |
| | | userBeChangeLog.setChangeType(UserBeChangeLog.CHANGE_TYPE_ROOM_DOCTOR); |
| | | userBeChangeLog.setCommonId(treatProjectDoctor.getCommonId()); |
| | | if (employee != null){ |
| | | userBeChangeLog.setCommonValue(employee.getCnName()); |
| | | } |
| | | userBeChangeLog.setRoomId(treatProjectDoctor.getDepartmentId()); |
| | | userBeChangeLog.setRoomName(familiesRoom.getFamiliesRoomName()); |
| | | userBeChangeLog.setRemark("新增治疗单处理科室关系"); |
| | | if (userBeChangeLogMapper.insert(userBeChangeLog) != 1){ |
| | | throw new TipsException("新增失败2!"+ JSON.toJSONString(userBeChangeLog)); |
| | | } |
| | | } |
| | | } |