| | |
| | | import com.ruoyi.common.core.domain.entity.SysDept; |
| | | import com.ruoyi.common.core.domain.entity.SysUser; |
| | | import com.ruoyi.quartz.service.ICollectHISService; |
| | | import com.smartor.domain.HnDataGatherVO; |
| | | import com.smartor.domain.Icd10; |
| | | import com.smartor.service.IHNGatherPatArchiveService; |
| | | import com.ruoyi.datacollection.domain.HnDataGatherVO; |
| | | import com.ruoyi.common.core.domain.entity.Icd10; |
| | | import com.ruoyi.datacollection.service.IHNGatherPatArchiveService; |
| | | import com.smartor.common.SpecificArchiveConstants; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import lombok.extern.slf4j.Slf4j; |
| | |
| | | @PostMapping("/collect") |
| | | @ApiOperation("同步病人相关数据") |
| | | public AjaxResult hnDataGather(@RequestBody HnDataGatherVO hnDataGatherVO) { |
| | | try { |
| | | Integer count =ichService.sync(); |
| | | return AjaxResult.success(count); |
| | | } catch (Exception ex) { |
| | | return AjaxResult.error(ex.getMessage()); |
| | | } |
| | | |
| | | //Boolean aBoolean = ichService.hnDataGather(hnDataGatherVO); |
| | | Integer count= ichService.sync(); |
| | | return AjaxResult.success(count); |
| | | } |
| | | |
| | | /** |
| | | * 采集丽水市妇幼保健院门诊接诊完成记录,并生成妇科/儿科档案。 |
| | | * 请求体可传 startTime、endTime(yyyy-MM-dd 或 yyyy-MM-dd HH:mm:ss),不传默认采集昨天。 |
| | | */ |
| | | @PostMapping("/collectMchArchive") |
| | | @ApiOperation("采集丽水妇幼门诊接诊完成记录并生成专科档案") |
| | | public AjaxResult collectMchArchive(@RequestBody(required = false) HnDataGatherVO hnDataGatherVO) { |
| | | try { |
| | | HnDataGatherVO request = hnDataGatherVO != null ? hnDataGatherVO : new HnDataGatherVO(); |
| | | Integer count = ichService.collectMchOuthospAndGenerateArchive( |
| | | SpecificArchiveConstants.LISHUI_MCH_ORG_ID, request.getStartTime(), request.getEndTime()); |
| | | return AjaxResult.success(count); |
| | | } catch (Exception ex) { |
| | | log.error("采集丽水妇幼门诊接诊完成记录失败", ex); |
| | | return AjaxResult.error(ex.getMessage()); |
| | | } |
| | | } |
| | | |
| | | /** |
| | |
| | | } |
| | | |
| | | /** |
| | | * 用户信息集合信息数据采集 |
| | | * 用户信息集合信息数据采集(异步执行,接口立即返回) |
| | | */ |
| | | @PostMapping("/collectUser") |
| | | @ApiOperation("同步用户信息") |
| | | public AjaxResult selectUserList(@RequestBody SysUser sysUser) { |
| | | Integer integer = ichService.selectUserList(sysUser); |
| | | return AjaxResult.success(integer); |
| | | boolean submitted = ichService.selectUserListAsync(sysUser); |
| | | if (!submitted) { |
| | | return AjaxResult.warn("用户信息同步任务正在执行中,请勿重复提交"); |
| | | } |
| | | return AjaxResult.success("用户信息同步任务已提交,后台执行中,请通过日志查看进度"); |
| | | } |
| | | |
| | | /** |