| | |
| | | import com.ruoyi.quartz.service.ICollectHISService; |
| | | import com.smartor.domain.*; |
| | | import com.smartor.mapper.*; |
| | | import com.smartor.service.IPatMedOuthospService; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.apache.commons.collections4.CollectionUtils; |
| | | import org.apache.commons.lang3.ArrayUtils; |
| | |
| | | private SysUser2Mapper sysUser2Mapper; |
| | | |
| | | @Autowired |
| | | private SysUserRole2Mapper sysUserRoleMapper; |
| | | private IPatMedOuthospService patMedOuthospService; |
| | | |
| | | @Autowired |
| | | private SysDept2Mapper sysDept2Mapper; |
| | |
| | | patMedOuthosp1.setCampusid(patMedOuthosp1.getOrgid()); |
| | | patMedOuthosp1.setOrgid("1"); |
| | | } |
| | | count += patMedOuthospMapper.updatePatMedOuthosp(patMedOuthosp1); |
| | | count += patMedOuthospService.updatePatMedOuthosp(patMedOuthosp1); |
| | | } else { |
| | | patMedOuthosp1.setCreateTime(new Date()); |
| | | //市一 院区id对应orgid,机构id为默认的1 |
| | |
| | | patMedOuthosp1.setCampusid(patMedOuthosp1.getOrgid()); |
| | | patMedOuthosp1.setOrgid("1"); |
| | | } |
| | | count += patMedOuthospMapper.insertPatMedOuthosp(patMedOuthosp1); |
| | | count += patMedOuthospService.insertPatMedOuthosp(patMedOuthosp1); |
| | | } |
| | | } catch (Exception ex) { |
| | | log.info("同步出入院:" + ex.getMessage()); |
| | |
| | | patArchiveMapper.insertPatArchiveSingle(patArchives.get(0)); |
| | | patMedOuthosp1.setPatid(patArchives.get(0).getId()); |
| | | } |
| | | i = patMedOuthospMapper.insertPatMedOuthosp(patMedOuthosp1); |
| | | i = patMedOuthospService.insertPatMedOuthosp(patMedOuthosp1); |
| | | } |
| | | |
| | | return i; |