@ -1,32 +1,45 @@
package com.docus.bgts.service ;
import ch.qos.logback.core.util.FileUtil ;
import com.alibaba.fastjson.JSON ;
import com.alibaba.fastjson.JSONArray ;
import com.alibaba.fastjson.JSONObject ;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper ;
import com.baomidou.mybatisplus.core.metadata.IPage ;
import com.docus.bgts.entity.* ;
import com.docus.bgts.enums.Codes ;
import com.docus.bgts.facade.IAfCollectTaskService ;
import com.docus.bgts.facade.IBgtsService ;
import com.docus.bgts.mapper.dbmysql.AfCollectAddMapper ;
import com.docus.bgts.mapper.dbmysql.AfInterfaceCollectSubMapper ;
import com.docus.bgts.mapper.dbmysql.MrReportErrorMapper ;
import com.docus.bgts.mapper.dbmysql.* ;
import com.docus.bgts.mapper.dboracle.VDocumentPdfMapper ;
import com.docus.bgts.mapper.dbsqlserver.PatientBLMapper ;
import com.docus.bgts.mapper.dbsqlserver.PatientBRMapper ;
import com.docus.bgts.mapper.dbsqlserver.ScanningMapper ;
import com.docus.bgts.mapper.dbsqlserver.TestttMapper ;
import com.docus.bgts.utils.* ;
import org.apache.commons.codec.digest.MurmurHash2 ;
import org.apache.commons.codec.digest.MurmurHash3 ;
import org.apache.commons.lang3.StringUtils ;
import org.apache.cxf.endpoint.Client ;
import org.apache.cxf.helpers.IOUtils ;
import org.apache.http.client.utils.DateUtils ;
import org.apache.logging.log4j.LogManager ;
import org.apache.logging.log4j.Logger ;
import org.dom4j.Document ;
import org.dom4j.DocumentHelper ;
import org.dom4j.Element ;
import org.dom4j.Text ;
import org.springframework.beans.BeanUtils ;
import org.springframework.beans.factory.annotation.Autowired ;
import org.springframework.beans.factory.annotation.Value ;
import org.springframework.stereotype.Service ;
import java.io.ByteArrayInputStream ;
import java.io.* ;
import java.lang.reflect.Method ;
import java.math.BigInteger ;
import java.nio.charset.StandardCharsets ;
import java.text.SimpleDateFormat ;
import java.time.LocalDateTime ;
import java.time.format.DateTimeFormatter ;
import java.util.* ;
@Service
@ -53,6 +66,26 @@ public class BgtsServiceImpl implements IBgtsService {
@Autowired
AfCollectAddMapper afCollectAddMapper ;
@Autowired
AfCollectTaskMapper afCollectTaskMapper ;
@Autowired
TestttMapper testMapper ;
@Autowired
PatientBRMapper patientBRMapper ;
@Autowired
PatientBLMapper patientBLMapper ;
@Autowired
TBasicOutMapper tBasicOutMapper ;
@Autowired
ScanningMapper scanningMapper ;
@Override
public void collect ( String empId ) throws Exception {
//通过empId获取报告单号集合
@ -62,7 +95,23 @@ public class BgtsServiceImpl implements IBgtsService {
//插入文件af_collect_task表数据
afCollectTaskService . insert ( reportDownDto ) ;
//通过报告单号集合采集
collectExams ( exams , empId , reportDownDto ) ;
collectExams ( exams , empId , reportDownDto ) ;
}
@Override
public void collectPacs ( String empId , String admissDate , String disDate , String times ) throws Exception {
//通过empId获取报告单号集合
List < String [ ] > exams = getExamNo ( empId , admissDate , disDate ) ;
String jzh = afCollectTaskService . getJzhByInpatientNo ( empId , times ) ;
if ( null = = jzh ) {
throw new RuntimeException ( "通过住院号与住院次数未匹配到患者" ) ;
}
//获取插入表数据
ReportDownDto reportDownDto = getUrlCreateReportDto ( exams , jzh ) ;
//插入文件af_collect_task表数据
afCollectTaskService . insert ( reportDownDto ) ;
//通过报告单号集合采集
collectExams ( exams , empId , reportDownDto ) ;
}
@Override
@ -77,7 +126,7 @@ public class BgtsServiceImpl implements IBgtsService {
exams . add ( strings ) ;
//获取插入表数据
ReportDownDto reportDownDto = getUrlCreateReportDto ( exams , empId ) ;
collectExams ( exams , empId , reportDownDto ) ;
collectExams ( exams , empId , reportDownDto ) ;
}
@Override
@ -92,14 +141,125 @@ public class BgtsServiceImpl implements IBgtsService {
//当前日期
Date date = new Date ( ) ;
String dateStr = simpleDateFormat . format ( date ) ;
collectByDate s ( startCollectTime , dateStr ) ;
collectByDate Jz ( startCollectTime , dateStr ) ;
//更新采集时间
addAfCollectAdd ( date ) ;
// addAfCollectAdd(date);
logger . info ( "--------------全量采集结束------------------" ) ;
}
@Override
public void collectxx ( ) {
logger . info ( "----------全量采集开始-----------" ) ;
//1.获取最早采集日期
SimpleDateFormat simpleDateFormat = new SimpleDateFormat ( "yyyy-MM-dd HH:mm:ss" ) ;
String startCollectTime = null ;
startCollectTime = String . valueOf ( FileUtils . getJsonByName ( "startCollectTime" ) ) ;
logger . info ( "----------采集初始时间:" + startCollectTime + " -------------------" ) ;
//当前日期
Date date = new Date ( ) ;
String dateStr = simpleDateFormat . format ( date ) ;
collectByDateTest ( startCollectTime , dateStr ) ;
//更新采集时间
// addAfCollectAdd(date);
logger . info ( "--------------全量采集结束------------------" ) ;
}
// /**
// * 根据时间到采集任务 手麻
// *
// * @param startDate
// * @param endDate
// */
// private void collectByDates(String startDate, String endDate) {
// //页码
// int current;
// //每页10条数据
// int size;
// String collectorid = String.valueOf(FileUtils.getJsonByName("collectorid"));
// String assortid = String.valueOf(FileUtils.getJsonByName("assortid"));
// int filesource = Integer.parseInt(String.valueOf(FileUtils.getJsonByName("filesource")));
// int filestoragetype = Integer.parseInt(String.valueOf(FileUtils.getJsonByName("filestoragetype")));
// Map<String, Object> headMap = new HashMap<>();
// headMap.put("Content-Type", "application/json");
// SnowflakeIdWorker idWorker = new SnowflakeIdWorker(0, 0);
// String indexFlag = String.valueOf(FileUtils.getJsonByName("indexFlag"));
// String serialnum = String.valueOf(FileUtils.getJsonByName("serialnum"));
// String filetitle = String.valueOf(FileUtils.getJsonByName("filetitle"));
// String downurl = String.valueOf(FileUtils.getJsonByName("downurl"));
// List<String> fieldArr = new ArrayList<>();
// fieldArr.add(indexFlag);
// fieldArr.add(serialnum);
// if (StringUtils.isNotBlank(filetitle)) {
// fieldArr.add(filetitle);
// }
// fieldArr.add(downurl);
// String namespace = String.valueOf(FileUtils.getJsonByName("namespace"));
// String tableName = String.valueOf(FileUtils.getJsonByName("tableName"));
// String collectTimeName = String.valueOf(FileUtils.getJsonByName("collectTimeName"));
// List<Map> maps;
// //2.获取第一页10条数据开始采集
// for (current = 1; ; current++) {
// size = 10 * current;
// maps = vDocumentPdfMapper.listCollectPage(size - 10, size, startDate, endDate, namespace, tableName, fieldArr, collectTimeName);
// logger.info("处理采集数据:" + maps);
// if (null == maps || maps.size() <= 0) {
// break;
// }
// maps:
// for (Map map : maps) {
// //获取过滤报告单
// String[] filterReports = String.valueOf(FileUtils.getJsonByName("filterReport")).split(",");
// if (filterReports.length > 0) {
// for (String filterReport : filterReports) {
// //需要过滤的报告单存在则不采集
// if (String.valueOf(map.get(filetitle)).equals(filterReport)) {
// continue maps;
// }
// }
// }
// ReportDownDto reportDownDto = new ReportDownDto();
// reportDownDto.setCollectorid(collectorid);
// reportDownDto.setAssortid(assortid);
// ReportDownPatientDto reportDownPatientDto = new ReportDownPatientDto();
// reportDownPatientDto.setJzh(String.valueOf(map.get(indexFlag)));
// reportDownDto.setPatient(reportDownPatientDto);
//
// List<ReportDownScanFileDto> reportDownScanFileDtos = new ArrayList<>();
// ReportDownScanFileDto reportDownScanFileDto = new ReportDownScanFileDto();
// reportDownScanFileDto.setDownurl(String.valueOf(map.get(downurl)));
// reportDownScanFileDto.setFilestoragetype(filestoragetype);
// reportDownScanFileDto.setFilesource(filesource);
// reportDownScanFileDto.setFiletitle(map.get(filetitle) == null ? "重症" + (System.currentTimeMillis()) : String.valueOf(map.get(filetitle)));
// reportDownScanFileDto.setSerialnum(StringUtils.isNotBlank(String.valueOf(map.get(serialnum))) ? String.valueOf(map.get(serialnum)) : String.valueOf(idWorker.nextId()));
// reportDownScanFileDtos.add(reportDownScanFileDto);
// reportDownDto.setScanfiles(reportDownScanFileDtos);
// String post;
// try {
// afCollectTaskService.insert(reportDownDto);
// //String uploadConnector = String.valueOf(FileUtils.getJsonByName("uploadConnector"));
// //调用下载接口
// post = HttpUtils.post(String.valueOf(FileUtils.getJsonByName(Codes.UPLOAD.getMessage())), headMap, JSON.parseObject(JSON.toJSONString(reportDownDto), Map.class));
// Map resMap = JSON.parseObject(post, Map.class);
// logger.info(reportDownDto);
// if (String.valueOf(resMap.get("code")).equals("500")) {
// throw new RuntimeException(String.valueOf(resMap.get("msg")));
// }
// } catch (Exception e) {
// //打印错误日志
// logger.info("采集出错:" + reportDownDto);
// logger.info(e);
// String stackTrace = ExceptionUtils.getStackTrace(e);
// logger.info("错误信息----------" + stackTrace);
// addMrReportErrorLog(reportDownDto);
// e.printStackTrace();
// }
// }
// }
// }
/ * *
* 根 据 时 间 到 采 集 任 务
* 根 据 时 间 到 采 集 任 务 重 症
*
* @param startDate
* @param endDate
@ -118,24 +278,30 @@ public class BgtsServiceImpl implements IBgtsService {
SnowflakeIdWorker idWorker = new SnowflakeIdWorker ( 0 , 0 ) ;
String indexFlag = String . valueOf ( FileUtils . getJsonByName ( "indexFlag" ) ) ;
String serialnum = String . valueOf ( FileUtils . getJsonByName ( "serialnum" ) ) ;
String filetitle = String . valueOf ( FileUtils . getJsonByName ( "filetitle" ) ) ;
//String filetitle = String.valueOf(FileUtils.getJsonByName("filetitle"));
String downurl = String . valueOf ( FileUtils . getJsonByName ( "downurl" ) ) ;
List < String > fieldArr = new ArrayList < > ( ) ;
String inPatientNo = String . valueOf ( FileUtils . getJsonByName ( "inPatientNo" ) ) ;
String visitId = String . valueOf ( FileUtils . getJsonByName ( "visitId" ) ) ;
List < String > fieldArr = new ArrayList < > ( ) ;
fieldArr . add ( indexFlag ) ;
fieldArr . add ( serialnum ) ;
if ( StringUtils . isNotBlank ( filetitle ) ) {
fieldArr . add ( filetitle ) ;
}
fieldArr . add ( inPatientNo ) ;
fieldArr . add ( visitId ) ;
// if(StringUtils.isNotBlank(filetitle)){
// fieldArr.add(filetitle);
// }
fieldArr . add ( downurl ) ;
String namespace = String . valueOf ( FileUtils . getJsonByName ( "namespace" ) ) ;
String tableName = String . valueOf ( FileUtils . getJsonByName ( "tableName" ) ) ;
String collectTimeName = String . valueOf ( FileUtils . getJsonByName ( "collectTimeName" ) ) ;
List < Map > maps ;
//2.获取第一页10条数据开始采集
logger . info ( "开始时间-----" + startDate + "结束时间-----" + "\n" + endDate ) ;
for ( current = 1 ; ; current + + ) {
size = 10 * current ;
maps = vDocumentPdfMapper . listCollectPage ( current , size , startDate , endDate , namespace , tableName , fieldArr , collectTimeName ) ;
logger . info ( "处理采集数据:" + maps ) ;
maps = vDocumentPdfMapper . listCollectPage ( size - 10 , size , startDate , endDate , namespace , tableName , fieldArr , collectTimeName ) ;
logger . info ( "处理采集数据:" + maps ) ;
if ( null = = maps | | maps . size ( ) < = 0 ) {
break ;
}
@ -143,30 +309,43 @@ public class BgtsServiceImpl implements IBgtsService {
ReportDownDto reportDownDto = new ReportDownDto ( ) ;
reportDownDto . setCollectorid ( collectorid ) ;
reportDownDto . setAssortid ( assortid ) ;
ReportDownPatientDto reportDownPatientDto = new ReportDownPatientDto ( ) ;
reportDownPatientDto . setJzh ( String . valueOf ( map . get ( indexFlag ) ) ) ;
reportDownPatientDto . setInPatientNo ( String . valueOf ( map . get ( inPatientNo ) ) ) ;
reportDownPatientDto . setVisitId ( String . valueOf ( map . get ( visitId ) ) ) ;
reportDownDto . setPatient ( reportDownPatientDto ) ;
// reportDownPatientDto.setJzh(String.valueOf(map.get(indexFlag)));
List < ReportDownScanFileDto > reportDownScanFileDtos = new ArrayList < > ( ) ;
ReportDownScanFileDto reportDownScanFileDto = new ReportDownScanFileDto ( ) ;
reportDownScanFileDto . setDownurl ( String . valueOf ( map . get ( downurl ) ) ) ;
reportDownScanFileDto . setFilestoragetype ( filestoragetype ) ;
reportDownScanFileDto . setFilesource ( filesource ) ;
reportDownScanFileDto . setFiletitle ( map . get ( filetitle ) = = null ? "重症" + ( System . currentTimeMillis ( ) ) : String . valueOf ( map . get ( filetitle ) ) ) ;
reportDownScanFileDto . setSerialnum ( StringUtils . isNotBlank ( String . valueOf ( map . get ( serialnum ) ) ) ? String . valueOf ( map . get ( serialnum ) ) : String . valueOf ( idWorker . nextId ( ) ) ) ;
//reportDownScanFileDto.setFiletitle(map.get(filetitle)==null?"重症"+(System.currentTimeMillis()):String.valueOf(map.get(filetitle)));
reportDownScanFileDto . setFiletitle ( StringUtils . isNotBlank ( String . valueOf ( map . get ( serialnum ) ) ) ? String . valueOf ( map . get ( serialnum ) ) : String . valueOf ( idWorker . nextId ( ) ) ) ;
reportDownScanFileDto . setSerialnum ( StringUtils . isNotBlank ( String . valueOf ( map . get ( serialnum ) ) ) ? String . valueOf ( map . get ( serialnum ) ) : String . valueOf ( idWorker . nextId ( ) ) ) ;
reportDownScanFileDtos . add ( reportDownScanFileDto ) ;
reportDownDto . setScanfiles ( reportDownScanFileDtos ) ;
String post ;
try {
afCollectTaskService . insert ( reportDownDto ) ;
post = HttpUtils . post ( String . valueOf ( FileUtils . getJsonByName ( Codes . UPLOAD . getMessage ( ) ) ) , headMap , JSON . parseObject ( JSON . toJSONString ( reportDownDto ) , Map . class ) ) ;
Map resMap = JSON . parseObject ( post , Map . class ) ;
if ( String . valueOf ( resMap . get ( "code" ) ) . equals ( "500" ) ) {
throw new RuntimeException ( String . valueOf ( resMap . get ( "msg" ) ) ) ;
afCollectTaskService . insertServer ( reportDownDto ) ;
//String uploadConnector = String.valueOf(FileUtils.getJsonByName("uploadConnector"));
String jzh = afCollectTaskService . getJzhByInpatientNo ( reportDownDto . getPatient ( ) . getInPatientNo ( ) , reportDownDto . getPatient ( ) . getVisitId ( ) ) ;
if ( null ! = jzh & & ! ( "" ) . equals ( jzh ) ) {
reportDownPatientDto . setJzh ( jzh ) ;
reportDownDto . setPatient ( reportDownPatientDto ) ;
post = HttpUtils . post ( String . valueOf ( FileUtils . getJsonByName ( Codes . UPLOAD . getMessage ( ) ) ) , headMap , JSON . parseObject ( JSON . toJSONString ( reportDownDto ) , Map . class ) ) ;
Map resMap = JSON . parseObject ( post , Map . class ) ;
logger . info ( reportDownDto ) ;
if ( String . valueOf ( resMap . get ( "code" ) ) . equals ( "500" ) ) {
throw new RuntimeException ( String . valueOf ( resMap . get ( "msg" ) ) ) ;
}
}
} catch ( Exception e ) {
logger . info ( "采集出错:" + reportDownDto ) ;
//打印错误日志
logger . info ( "采集出错:" + reportDownDto ) ;
logger . info ( e ) ;
// String stackTrace = ExceptionUtils.getStackTrace(e);
// logger.info("错误信息----------"+stackTrace);
addMrReportErrorLog ( reportDownDto ) ;
e . printStackTrace ( ) ;
}
@ -174,11 +353,89 @@ public class BgtsServiceImpl implements IBgtsService {
}
}
@Override
public void timerCollectSmDay ( ) {
logger . info ( "------采集器开始采集---------" ) ;
//获取前一天开始结束时间
Map < String , String > time = getSmCollectionTime ( new Date ( ) ) ;
collectByDateSm ( time . get ( "startDate" ) , time . get ( "endDate" ) ) ;
//更新采集时间
logger . info ( "--------采集器结束采集------" ) ;
}
@Override
public void SmCollect ( String inPatientId , String vistId ) {
List < Map > maps = scanningMapper . selectByInPatientId ( inPatientId , vistId ) ;
int i = scanningMapper . selectRow ( inPatientId , vistId ) ;
logger . info ( inPatientId + "患者扫描病历共" + i + "条----" ) ;
Map < String , Object > headMap = new HashMap < > ( ) ;
headMap . put ( "Content-Type" , "application/json" ) ;
int filesource = Integer . parseInt ( String . valueOf ( FileUtils . getJsonByName ( "filesource" ) ) ) ;
int filestoragetype = Integer . parseInt ( String . valueOf ( FileUtils . getJsonByName ( "filestoragetype" ) ) ) ;
String collectorid = String . valueOf ( FileUtils . getJsonByName ( "collectorid" ) ) ;
int filetype = Integer . parseInt ( String . valueOf ( FileUtils . getJsonByName ( "filetype" ) ) ) ;
String assortid = String . valueOf ( FileUtils . getJsonByName ( "assortid" ) ) ;
int i1 = 0 ;
for ( Map map : maps ) {
try {
i1 + + ;
logger . info ( "当前第" + i1 + "条------" ) ;
ReportDownDto reportDownDto = new ReportDownDto ( ) ;
reportDownDto . setCollectorid ( collectorid ) ;
reportDownDto . setAssortid ( String . valueOf ( map . get ( "分类id" ) ) ) ;
ReportDownPatientDto reportDownPatientDto = new ReportDownPatientDto ( ) ;
// reportDownPatientDto.setInPatientNo(String.valueOf(map.get("住院号")));
// reportDownPatientDto.setVisitId(String.valueOf(map.get("次数")));
String patientId = afCollectTaskService . getPatientIdByInpatientNo ( String . valueOf ( map . get ( "住院号" ) ) , String . valueOf ( map . get ( "次数" ) ) ) ;
if ( null ! = patientId ) {
reportDownPatientDto . setPatientid ( patientId ) ;
reportDownDto . setPatient ( reportDownPatientDto ) ;
List < ReportDownScanFileDto > reportDownScanFileDtos = new ArrayList < > ( ) ;
ReportDownScanFileDto reportDownScanFileDto = new ReportDownScanFileDto ( ) ;
reportDownScanFileDto . setFiletype ( filetype ) ;
reportDownScanFileDto . setDownurl ( String . valueOf ( map . get ( "图像路径" ) ) + "/" + String . valueOf ( map . get ( "文件名" ) ) ) ;
reportDownScanFileDto . setFiletitle ( String . valueOf ( map . get ( "文件名" ) ) . substring ( 0 , map . get ( "文件名" ) . toString ( ) . indexOf ( "." ) ) ) ;
//处理下载地址为唯一值
String ser = String . valueOf ( map . get ( "主键" ) ) + String . valueOf ( map . get ( "分段名称" ) ) + String . valueOf ( map . get ( "文件名" ) ) ;
reportDownScanFileDto . setSerialnum ( ser ) ;
reportDownScanFileDto . setFilestoragetype ( filestoragetype ) ;
reportDownScanFileDto . setFilesource ( filesource ) ;
reportDownScanFileDtos . add ( reportDownScanFileDto ) ;
reportDownDto . setScanfiles ( reportDownScanFileDtos ) ;
afCollectTaskService . insertServer ( reportDownDto ) ;
String post ;
logger . info ( "上传下载参数-----" + reportDownDto ) ;
post = HttpUtils . post ( String . valueOf ( FileUtils . getJsonByName ( Codes . UPLOAD . getMessage ( ) ) ) , headMap , JSON . parseObject ( JSON . toJSONString ( reportDownDto ) , Map . class ) ) ;
Map resMap = JSON . parseObject ( post , Map . class ) ;
if ( String . valueOf ( resMap . get ( "code" ) ) . equals ( "500" ) ) {
logger . info ( "下载服务-------" + String . valueOf ( resMap . get ( "msg" ) ) ) ;
}
} else {
logger . info ( String . valueOf ( map . get ( "住院号" ) ) + "患者基础信息不存在!" ) ;
}
} catch ( Exception e ) {
logger . error ( String . valueOf ( map . get ( "住院号" ) ) + e . getMessage ( ) ) ;
}
}
}
@Override
public void timerCollect ( ) {
logger . info ( "------采集器开始采集---------" ) ;
String collectorid = String . valueOf ( FileUtils . getJsonByName ( "collectorid" ) ) ;
//1.获取上次采集时间
Date time = afCollectAddMapper . getTimeByAdd ( ) ;
Date time ;
if ( collectorid . equals ( "5" ) ) {
time = afCollectAddMapper . getTimeByAdd ( 5 ) ;
} else if ( collectorid . equals ( "15" ) ) {
time = afCollectAddMapper . getTimeByAdd ( 15 ) ;
} else {
time = afCollectAddMapper . getTimeByAdd ( 24 ) ;
}
SimpleDateFormat simpleDateFormat = new SimpleDateFormat ( "yyyy-MM-dd HH:mm:ss" ) ;
String startDate = simpleDateFormat . format ( time ) ;
//当前日期
@ -191,12 +448,307 @@ public class BgtsServiceImpl implements IBgtsService {
}
@Override
public String test ( String collectSubId ) {
AfInterfaceCollectSub x = afInterfaceCollectSubMapper . selectById ( collectSubId ) ;
System . out . println ( x ) ;
return x . toString ( ) ;
public void timerCollectSmIncrement ( ) {
logger . info ( "------采集器开始采集---------" ) ;
String collectorid = String . valueOf ( FileUtils . getJsonByName ( "collectorid" ) ) ;
//1.获取上次采集时间
Date time ;
time = afCollectAddMapper . getTimeByAdd ( 25 ) ;
SimpleDateFormat simpleDateFormat = new SimpleDateFormat ( "yyyy-MM-dd HH:mm:ss" ) ;
String startDate = simpleDateFormat . format ( time ) ;
//当前日期
Date date = new Date ( ) ;
String endDate = simpleDateFormat . format ( date ) ;
logger . info ( "增量采集开始----采集扫描日期区间为" + startDate + "-----" + endDate ) ;
collectByDateSm ( startDate , endDate ) ;
//更新采集时间
addAfCollectAdd ( date ) ;
logger . info ( "--------采集器结束采集------" ) ;
}
/ * *
* 获 取 前 一 天 开 始 与 结 束 时 间
*
* @param date
* @return
* /
public static Map < String , String > getSmCollectionTime ( Date date ) {
Date dBefore ;
Calendar calendar = Calendar . getInstance ( ) ; //得到日历
calendar . setTime ( date ) ; //把当前时间赋给日历
calendar . add ( Calendar . DAY_OF_MONTH , - 1 ) ; //设置为前一天
dBefore = calendar . getTime ( ) ; //得到前一天的时间
SimpleDateFormat sdf = new SimpleDateFormat ( "yyyy-MM-dd" ) ; //设置时间格式
String defaultStartDate = sdf . format ( dBefore ) ; //格式化前一天
defaultStartDate = defaultStartDate + " 00:00:00" ;
String defaultEndDate = defaultStartDate . substring ( 0 , 10 ) + " 23:59:59" ;
Map < String , String > map = new HashMap < > ( ) ;
map . put ( "startDate" , defaultStartDate ) ;
map . put ( "endDate" , defaultEndDate ) ;
return map ;
}
/ * *
* 根 据 时 间 采 集 扫 描 电 子 病 历
* /
private void collectByDateJz ( String startDate , String endDate ) {
//页码
int startrow ;
//每页10条数据
int endrow ;
//2.获取第一页10条数据开始采集
logger . info ( "开始时间-----" + startDate + "结束时间-----" + "\n" + endDate ) ;
Map < String , Object > headMap = new HashMap < > ( ) ;
headMap . put ( "Content-Type" , "application/json" ) ;
int filesource = Integer . parseInt ( String . valueOf ( FileUtils . getJsonByName ( "filesource" ) ) ) ;
int filestoragetype = Integer . parseInt ( String . valueOf ( FileUtils . getJsonByName ( "filestoragetype" ) ) ) ;
String collectorid = String . valueOf ( FileUtils . getJsonByName ( "collectorid" ) ) ;
int filetype = Integer . parseInt ( String . valueOf ( FileUtils . getJsonByName ( "filetype" ) ) ) ;
String assortid = String . valueOf ( FileUtils . getJsonByName ( "assortid" ) ) ;
List < Map > maps ;
SimpleDateFormat simpleDateFormat = new SimpleDateFormat ( "yyyy-MM-dd" ) ;
String format ;
for ( startrow = 1 ; ; startrow + = 10 ) {
endrow = 10 + startrow ;
maps = scanningMapper . selectAllByDisDate ( startrow , endrow - 1 , startDate , endDate ) ;
logger . info ( "处理采集数据" + maps ) ;
// List<Map> maps = patientBRMapper.selectAll(1,1,startDate,endDate);
if ( null = = maps | | maps . size ( ) < = 0 ) {
break ;
}
try {
for ( Map map : maps ) {
try {
ReportDownDto reportDownDto = new ReportDownDto ( ) ;
reportDownDto . setCollectorid ( collectorid ) ;
reportDownDto . setAssortid ( String . valueOf ( map . get ( "分类id" ) ) ) ;
ReportDownPatientDto reportDownPatientDto = new ReportDownPatientDto ( ) ;
// reportDownPatientDto.setInPatientNo(String.valueOf(map.get("住院号")));
// reportDownPatientDto.setVisitId(String.valueOf(map.get("次数")));
Date parse = simpleDateFormat . parse ( String . valueOf ( map . get ( "出院日期" ) ) ) ;
format = simpleDateFormat . format ( parse ) ;
String patientId = afCollectTaskService . getPatientIdByInpatientNoAndDate ( String . valueOf ( map . get ( "住院号" ) ) , format ) ;
if ( null ! = patientId ) {
reportDownPatientDto . setPatientid ( patientId ) ;
reportDownDto . setPatient ( reportDownPatientDto ) ;
List < ReportDownScanFileDto > reportDownScanFileDtos = new ArrayList < > ( ) ;
ReportDownScanFileDto reportDownScanFileDto = new ReportDownScanFileDto ( ) ;
reportDownScanFileDto . setFiletype ( filetype ) ;
reportDownScanFileDto . setDownurl ( String . valueOf ( map . get ( "图像路径" ) ) + "/" + String . valueOf ( map . get ( "文件名" ) ) ) ;
reportDownScanFileDto . setFiletitle ( String . valueOf ( map . get ( "文件名" ) ) . substring ( 0 , map . get ( "文件名" ) . toString ( ) . indexOf ( "." ) ) ) ;
//处理下载地址为唯一值
String ser = String . valueOf ( map . get ( "主键" ) ) + String . valueOf ( map . get ( "分段名称" ) ) + String . valueOf ( map . get ( "文件名" ) ) ;
logger . info ( "唯一值++++++" + ser ) ;
reportDownScanFileDto . setSerialnum ( ser ) ;
reportDownScanFileDto . setFilestoragetype ( filestoragetype ) ;
reportDownScanFileDto . setFilesource ( filesource ) ;
reportDownScanFileDtos . add ( reportDownScanFileDto ) ;
reportDownDto . setScanfiles ( reportDownScanFileDtos ) ;
afCollectTaskService . insertServer ( reportDownDto ) ;
String post ;
logger . info ( "上传下载参数-----" + reportDownDto ) ;
post = HttpUtils . post ( String . valueOf ( FileUtils . getJsonByName ( Codes . UPLOAD . getMessage ( ) ) ) , headMap , JSON . parseObject ( JSON . toJSONString ( reportDownDto ) , Map . class ) ) ;
Map resMap = JSON . parseObject ( post , Map . class ) ;
if ( String . valueOf ( resMap . get ( "code" ) ) . equals ( "500" ) ) {
logger . info ( "下载服务-------" + String . valueOf ( resMap . get ( "msg" ) ) ) ;
}
} else {
logger . info ( String . valueOf ( map . get ( "住院号" ) ) + "患者基础信息不存在!" ) ;
}
} catch ( Exception e ) {
logger . error ( String . valueOf ( map . get ( "住院号" ) ) + e . getMessage ( ) ) ;
}
}
} catch ( Exception e ) {
e . printStackTrace ( ) ;
logger . error ( e . getMessage ( ) ) ;
} catch ( Throwable e ) {
logger . error ( "throwable{}" , e . getMessage ( ) ) ;
}
// System.err.println(startrow+"---------------"+(endrow-1));
// System.err.println("处理数据---"+maps);
maps . clear ( ) ;
}
}
/ * *
* 根 据 时 间 采 集 扫 描 电 子 病 历
* /
private void collectByDateTest ( String startDate , String endDate ) {
//页码
int startrow ;
//每页10条数据
int endrow ;
//2.获取第一页10条数据开始采集
logger . info ( "开始时间-----" + startDate + "结束时间-----" + "\n" + endDate ) ;
Map < String , Object > headMap = new HashMap < > ( ) ;
headMap . put ( "Content-Type" , "application/json" ) ;
int filesource = Integer . parseInt ( String . valueOf ( FileUtils . getJsonByName ( "filesource" ) ) ) ;
int filestoragetype = Integer . parseInt ( String . valueOf ( FileUtils . getJsonByName ( "filestoragetype" ) ) ) ;
String collectorid = String . valueOf ( FileUtils . getJsonByName ( "collectorid" ) ) ;
int filetype = Integer . parseInt ( String . valueOf ( FileUtils . getJsonByName ( "filetype" ) ) ) ;
String assortid = String . valueOf ( FileUtils . getJsonByName ( "assortid" ) ) ;
List < Map > maps ;
SimpleDateFormat simpleDateFormat = new SimpleDateFormat ( "yyyy-MM-dd" ) ;
String format ;
for ( startrow = 1 ; ; startrow + = 10 ) {
endrow = 10 + startrow ;
maps = scanningMapper . selectAllByDisDate ( startrow , endrow - 1 , startDate , endDate ) ;
logger . info ( "处理采集数据" + maps ) ;
// List<Map> maps = patientBRMapper.selectAll(1,1,startDate,endDate);
if ( null = = maps | | maps . size ( ) < = 0 ) {
break ;
}
try {
for ( Map map : maps ) {
try {
ReportDownDto reportDownDto = new ReportDownDto ( ) ;
reportDownDto . setCollectorid ( collectorid ) ;
reportDownDto . setAssortid ( String . valueOf ( map . get ( "分类id" ) ) ) ;
ReportDownPatientDto reportDownPatientDto = new ReportDownPatientDto ( ) ;
// reportDownPatientDto.setInPatientNo(String.valueOf(map.get("住院号")));
// reportDownPatientDto.setVisitId(String.valueOf(map.get("次数")));
Date parse = simpleDateFormat . parse ( String . valueOf ( map . get ( "出院日期" ) ) ) ;
format = simpleDateFormat . format ( parse ) ;
String patientId = afCollectTaskService . getPatientIdByInpatientNoAndDate ( String . valueOf ( map . get ( "住院号" ) ) , format ) ;
if ( null ! = patientId ) {
reportDownPatientDto . setPatientid ( patientId ) ;
reportDownDto . setPatient ( reportDownPatientDto ) ;
List < ReportDownScanFileDto > reportDownScanFileDtos = new ArrayList < > ( ) ;
ReportDownScanFileDto reportDownScanFileDto = new ReportDownScanFileDto ( ) ;
reportDownScanFileDto . setFiletype ( filetype ) ;
reportDownScanFileDto . setDownurl ( String . valueOf ( map . get ( "图像路径" ) ) + "/" + String . valueOf ( map . get ( "文件名" ) ) ) ;
reportDownScanFileDto . setFiletitle ( String . valueOf ( map . get ( "文件名" ) ) ) ;
//处理下载地址为唯一值
String ser = String . valueOf ( map . get ( "图像路径" ) . hashCode ( ) ) + "/" + String . valueOf ( map . get ( "文件名" ) . hashCode ( ) ) ;
int i1 = MurmurHash2 . hash32 ( ser ) ;
reportDownScanFileDto . setSerialnum ( Integer . toBinaryString ( i1 ) . toString ( ) ) ;
reportDownScanFileDto . setFilestoragetype ( filestoragetype ) ;
reportDownScanFileDto . setFilesource ( filesource ) ;
reportDownScanFileDtos . add ( reportDownScanFileDto ) ;
reportDownDto . setScanfiles ( reportDownScanFileDtos ) ;
afCollectTaskService . insertServer ( reportDownDto ) ;
String post ;
logger . info ( "上传下载参数-----" + reportDownDto ) ;
post = HttpUtils . post ( String . valueOf ( FileUtils . getJsonByName ( Codes . UPLOAD . getMessage ( ) ) ) , headMap , JSON . parseObject ( JSON . toJSONString ( reportDownDto ) , Map . class ) ) ;
Map resMap = JSON . parseObject ( post , Map . class ) ;
if ( String . valueOf ( resMap . get ( "code" ) ) . equals ( "500" ) ) {
logger . info ( "下载服务-------" + String . valueOf ( resMap . get ( "msg" ) ) ) ;
}
} else {
logger . info ( String . valueOf ( map . get ( "住院号" ) ) + "患者基础信息不存在!" ) ;
}
} catch ( Exception e ) {
logger . error ( String . valueOf ( map . get ( "住院号" ) ) + e . getMessage ( ) ) ;
}
}
} catch ( Exception e ) {
e . printStackTrace ( ) ;
logger . error ( e . getMessage ( ) ) ;
} catch ( Throwable e ) {
logger . error ( "throwable{}" , e . getMessage ( ) ) ;
}
// System.err.println(startrow+"---------------"+(endrow-1));
// System.err.println("处理数据---"+maps);
maps . clear ( ) ;
}
}
/ * *
* 根 据 时 间 采 集 扫 描 电 子 病 历
* /
private void collectByDateSm ( String startDate , String endDate ) {
//页码
int startrow ;
//每页10条数据
int endrow ;
//2.获取第一页10条数据开始采集
logger . info ( "开始时间-----" + startDate + "结束时间-----" + "\n" + endDate ) ;
Map < String , Object > headMap = new HashMap < > ( ) ;
headMap . put ( "Content-Type" , "application/json" ) ;
int filesource = Integer . parseInt ( String . valueOf ( FileUtils . getJsonByName ( "filesource" ) ) ) ;
int filestoragetype = Integer . parseInt ( String . valueOf ( FileUtils . getJsonByName ( "filestoragetype" ) ) ) ;
int filetype = Integer . parseInt ( String . valueOf ( FileUtils . getJsonByName ( "filetype" ) ) ) ;
String collectorid = String . valueOf ( FileUtils . getJsonByName ( "collectorid" ) ) ;
String assortid = String . valueOf ( FileUtils . getJsonByName ( "assortid" ) ) ;
List < Map > maps ;
SimpleDateFormat simpleDateFormat = new SimpleDateFormat ( "yyyy-MM-dd" ) ;
String format ;
for ( startrow = 1 ; ; startrow + = 10 ) {
endrow = 10 + startrow ;
maps = scanningMapper . selectAll ( startrow , endrow - 1 , startDate , endDate ) ;
// List<Map> maps = patientBRMapper.selectAll(1,1,startDate,endDate);
if ( null = = maps | | maps . size ( ) < = 0 ) {
break ;
}
try {
logger . info ( "处理采集数据" + maps ) ;
for ( Map map : maps ) {
try {
ReportDownDto reportDownDto = new ReportDownDto ( ) ;
reportDownDto . setCollectorid ( collectorid ) ;
reportDownDto . setAssortid ( String . valueOf ( map . get ( "分类id" ) ) ) ;
ReportDownPatientDto reportDownPatientDto = new ReportDownPatientDto ( ) ;
// reportDownPatientDto.setInPatientNo(String.valueOf(map.get("住院号")));
// reportDownPatientDto.setVisitId(String.valueOf(map.get("次数")));
Date parse = simpleDateFormat . parse ( String . valueOf ( map . get ( "出院日期" ) ) ) ;
format = simpleDateFormat . format ( parse ) ;
String patientId = afCollectTaskService . getPatientIdByInpatientNoAndDate ( String . valueOf ( map . get ( "住院号" ) ) , format ) ;
reportDownPatientDto . setPatientid ( patientId ) ;
reportDownDto . setPatient ( reportDownPatientDto ) ;
List < ReportDownScanFileDto > reportDownScanFileDtos = new ArrayList < > ( ) ;
ReportDownScanFileDto reportDownScanFileDto = new ReportDownScanFileDto ( ) ;
reportDownScanFileDto . setFiletype ( filetype ) ;
reportDownScanFileDto . setDownurl ( String . valueOf ( map . get ( "图像路径" ) ) + "/" + String . valueOf ( map . get ( "文件名" ) ) ) ;
reportDownScanFileDto . setFiletitle ( String . valueOf ( map . get ( "文件名" ) ) . substring ( 0 , map . get ( "文件名" ) . toString ( ) . indexOf ( "." ) ) ) ;
//处理下载地址为唯一值
String ser = String . valueOf ( map . get ( "主键" ) ) + String . valueOf ( map . get ( "分段名称" ) ) + String . valueOf ( map . get ( "文件名" ) ) ;
reportDownScanFileDto . setFiletitle ( String . valueOf ( map . get ( "文件名" ) ) ) ;
reportDownScanFileDto . setSerialnum ( ser ) ;
reportDownScanFileDto . setFilestoragetype ( filestoragetype ) ;
reportDownScanFileDto . setFilesource ( filesource ) ;
reportDownScanFileDtos . add ( reportDownScanFileDto ) ;
reportDownDto . setScanfiles ( reportDownScanFileDtos ) ;
afCollectTaskService . insertServer ( reportDownDto ) ;
String post ;
logger . info ( "上传下载参数-----" + reportDownDto ) ;
post = HttpUtils . post ( String . valueOf ( FileUtils . getJsonByName ( Codes . UPLOAD . getMessage ( ) ) ) , headMap , JSON . parseObject ( JSON . toJSONString ( reportDownDto ) , Map . class ) ) ;
Map resMap = JSON . parseObject ( post , Map . class ) ;
if ( String . valueOf ( resMap . get ( "code" ) ) . equals ( "500" ) ) {
logger . info ( "下载服务{}" , String . valueOf ( resMap . get ( "msg" ) ) ) ;
}
} catch ( Exception e ) {
logger . error ( String . valueOf ( map . get ( "住院号" ) + "错误信息" + e . getMessage ( ) ) ) ;
}
}
} catch ( Exception e ) {
e . printStackTrace ( ) ;
} catch ( Throwable t ) {
logger . error ( "throwable, {}" , t . getMessage ( ) ) ;
}
maps . clear ( ) ;
}
}
/ * *
* 更 新 采 集 时 间
* /
@ -204,7 +756,7 @@ public class BgtsServiceImpl implements IBgtsService {
String collectorid = String . valueOf ( FileUtils . getJsonByName ( "collectorid" ) ) ;
AfCollectAdd afCollectAdd = new AfCollectAdd ( ) ;
afCollectAdd . setBeginStageDate ( date ) ;
afCollectAddMapper . update ( afCollectAdd , new QueryWrapper < AfCollectAdd > ( ) . eq ( "classify" , collectorid ) ) ;
afCollectAddMapper . update ( afCollectAdd , new QueryWrapper < AfCollectAdd > ( ) . eq ( "classify" , collectorid ) ) ;
}
/ * *
@ -227,7 +779,7 @@ public class BgtsServiceImpl implements IBgtsService {
* @param exams
* @param empId
* /
private void collectExams ( List < String [ ] > exams , String empId , ReportDownDto reportDownDto ) throws Exception {
private void collectExams ( List < String [ ] > exams , String empId , ReportDownDto reportDownDto ) throws Exception {
//调用上传接口
Map < String , Object > headMap = new HashMap < > ( ) ;
headMap . put ( "Content-Type" , "application/json" ) ;
@ -269,6 +821,7 @@ public class BgtsServiceImpl implements IBgtsService {
return reportDownDto ;
}
/ * *
* 创 建 ReportDownScanFileDto 对 象 通 过 报 告 单 号
*
@ -279,15 +832,16 @@ public class BgtsServiceImpl implements IBgtsService {
ReportDownScanFileDto reportDownScanFileDto = new ReportDownScanFileDto ( ) ;
reportDownScanFileDto . setSerialnum ( exam [ 0 ] ) ;
reportDownScanFileDto . setFiletitle ( exam [ 1 ] ) ;
XmlUtils reqXmlUtils = new XmlUtils ( FileUtils . getXmlDetailsPath ( ) ) ;
XmlUtils reqXmlUtils = new XmlUtils ( FileUtils . getXmlDetailsPath ( ) ) ;
Element esbEntry = reqXmlUtils . getMsgElement ( ) ;
esbEntry . element ( "EXAM_NO" ) . setText ( exam [ 0 ] ) ;
String resXml = invokeWs ( reqXmlUtils . getDocument ( ) . asXML ( ) ) ;
logger . info ( "明细入参------------" + reqXmlUtils . getDocument ( ) . asXML ( ) ) ;
//解析XML
XmlUtils xmlUtils = new XmlUtils ( new ByteArrayInputStream ( resXml . getBytes ( "UTF-8" ) ) ) ;
String success = xmlUtils . isSuccess ( ) ;
if ( ! success . equals ( "ok" ) ) {
logger . info ( "发送错误:" + success ) ;
if ( ! success . equals ( "ok" ) ) {
logger . info ( "发送错误:" + success ) ;
throw new RuntimeException ( success ) ;
}
List < String > dis = ( List < String > ) FileUtils . getJsonByName ( "bgtsDetailRespon" ) ;
@ -306,9 +860,64 @@ public class BgtsServiceImpl implements IBgtsService {
private List < String [ ] > getExamNo ( String empId ) throws Exception {
List < String [ ] > exams = new ArrayList < > ( ) ;
XmlUtils reqXmlUtils = new XmlUtils ( FileUtils . getXmlPath ( ) ) ;
XmlUtils reqXmlUtils = new XmlUtils ( FileUtils . getXmlPath ( ) ) ;
Element reqElement = reqXmlUtils . getMsgElement ( ) ;
Map < String , Date > map = afCollectAddMapper . selectDate ( empId ) ;
reqElement . element ( "INHOSP_NO" ) . setText ( empId ) ;
reqElement . element ( "BEGIN_DATE" ) . setText ( new SimpleDateFormat ( FileUtils . getJsonByName ( "dateFormat" ) . toString ( ) ) . format ( map . get ( "admiss_date" ) ) ) ;
reqElement . element ( "END_DATE" ) . setText ( new SimpleDateFormat ( FileUtils . getJsonByName ( "dateFormat" ) . toString ( ) ) . format ( map . get ( "dis_date" ) ) ) ;
logger . info ( "-------根据患者主索引号查询多个报告单号,地址:" + wsUrl + ",方法:" + wsLocalMethod + "---------" ) ;
String xml = reqXmlUtils . getDocument ( ) . asXML ( ) ;
logger . info ( "---------------------------" ) ;
logger . info ( xml ) ;
logger . info ( "----------------------------" ) ;
String resXml = invokeWs ( xml ) ;
logger . info ( "---------返回值-------------" ) ;
logger . info ( resXml ) ;
logger . info ( "-----------------------------" ) ;
//解析XML
XmlUtils xmlUtils = new XmlUtils ( new ByteArrayInputStream ( resXml . getBytes ( "UTF-8" ) ) ) ;
String success = xmlUtils . isSuccess ( ) ;
if ( ! success . equals ( "ok" ) ) {
logger . info ( "发送错误:" + success ) ;
throw new RuntimeException ( success ) ;
}
List < String > dis = ( List < String > ) FileUtils . getJsonByName ( "bgtsRespon" ) ;
//数据所在节点
Element element = xmlUtils . getElement ( dis ) ;
List < Element > examInfos = element . elements ( "ExamInfo" ) ;
Element examNo ;
String [ ] key ;
for ( Element examInfo : examInfos ) {
key = new String [ 2 ] ;
examNo = examInfo . element ( String . valueOf ( FileUtils . getJsonByName ( "examNo" ) ) ) ;
if ( examNo ! = null ) {
key [ 0 ] = examNo . getText ( ) ;
}
Element examItemInfo = examInfo . element ( "ExamItemInfo" ) ;
if ( examItemInfo ! = null ) {
key [ 1 ] = examItemInfo . element ( String . valueOf ( FileUtils . getJsonByName ( "examItemName" ) ) ) . getText ( ) ;
}
exams . add ( key ) ;
}
return exams ;
}
/ * *
* 通 过 empId 获 取 报 告 单 号 集 合 pacs
*
* @param empId
* @return
* /
private List < String [ ] > getExamNo ( String empId , String admissDate , String disDate ) throws Exception {
List < String [ ] > exams = new ArrayList < > ( ) ;
XmlUtils reqXmlUtils = new XmlUtils ( FileUtils . getXmlPath ( ) ) ;
Element reqElement = reqXmlUtils . getMsgElement ( ) ;
Map < String , Date > map = afCollectAddMapper . selectDate ( empId ) ;
reqElement . element ( "INHOSP_INDEX_NO" ) . setText ( empId ) ;
reqElement . element ( "BEGIN_DATE" ) . setText ( admissDate ) ;
reqElement . element ( "END_DATE" ) . setText ( disDate ) ;
logger . info ( "-------根据患者主索引号查询多个报告单号,地址:" + wsUrl + ",方法:" + wsLocalMethod + "---------" ) ;
String xml = reqXmlUtils . getDocument ( ) . asXML ( ) ;
logger . info ( "---------------------------" ) ;
@ -321,8 +930,8 @@ public class BgtsServiceImpl implements IBgtsService {
//解析XML
XmlUtils xmlUtils = new XmlUtils ( new ByteArrayInputStream ( resXml . getBytes ( "UTF-8" ) ) ) ;
String success = xmlUtils . isSuccess ( ) ;
if ( ! success . equals ( "ok" ) ) {
logger . info ( "发送错误:" + success ) ;
if ( ! success . equals ( "ok" ) ) {
logger . info ( "发送错误:" + success ) ;
throw new RuntimeException ( success ) ;
}
List < String > dis = ( List < String > ) FileUtils . getJsonByName ( "bgtsRespon" ) ;
@ -347,6 +956,61 @@ public class BgtsServiceImpl implements IBgtsService {
}
/ * *
* 根 据 时 间 批 量 按 需 采 集
*
* @param startDate 开 始 时 间
* @param endDate 结 束 时 间
* @param collectorId 采 集 器 编 号
* /
public void collectByDate ( String startDate , String endDate , String collectorId ) {
//通过日期查询patientId集合
List < String > patientIds = afCollectTaskService . getjzhByDate ( startDate , endDate ) ;
//通过patientId集合与采集器编号查询报告单号
//List<String> c1s = afCollectTaskService.getC1ByPatientId(patientIds, collectorId);
//通过唯一报告单号查询patient_id
//List<String> patientIdByC1 = afCollectTaskService.getPatientIdByC1(c1s);
//通过patientId集合查询jzh
//List<String> jzhs = afCollectTaskService.getJzhByPatientId(patientIds);
//int i = -1;
//循环jzh与报告单号c1调用按需采集
// for (String c1 : c1s) {
// try {
// if (i<c1s.size()) {
// i++;
// //System.err.println(c1s.get(i) + "--------" + jzhs.get(i));
// //HttpUtils.get("127.0.0.1:"+port+"/collectByExamNo?emamNo="+c1+"&empId="+jzh);
// collectByExamNo(c1s.get(i), jzhs.get(i));
// }
//
//
// } catch (Exception e) {
// e.printStackTrace();
// }
// }
try {
for ( String patientId : patientIds ) {
if ( patientId ! = null ) {
logger . info ( "按需采集------患者" + patientId ) ;
collect ( patientId ) ;
}
}
// for (String jzh : jzhs) {
// if (jzh!=null) {
// logger.info("按需采集------患者"+jzh);
// collect(jzh);
// }
// }
} catch ( Exception e ) {
e . printStackTrace ( ) ;
}
}
public List < Map > test ( int size , int current ) {
return testMapper . selectAll ( size , current ) ;
}
/ * *
* 调 用 web service
*
@ -367,3 +1031,4 @@ public class BgtsServiceImpl implements IBgtsService {
}