|
|
|
|
@ -5,10 +5,7 @@ import com.alibaba.fastjson.JSONObject;
|
|
|
|
|
import com.emr.annotation.OptionalLog;
|
|
|
|
|
import com.emr.controller.FormTokenFlagUtil;
|
|
|
|
|
import com.emr.controller.JAXDynamicClientFactory;
|
|
|
|
|
import com.emr.dao.Archive_DetailMapper;
|
|
|
|
|
import com.emr.dao.CommomMapper;
|
|
|
|
|
import com.emr.dao.EmrComomSetMapper;
|
|
|
|
|
import com.emr.dao.Emr_DictionaryMapper;
|
|
|
|
|
import com.emr.dao.*;
|
|
|
|
|
import com.emr.dao.approve.Emr_Apply_ApproveMapper;
|
|
|
|
|
import com.emr.dao.commomSearch.ScanPathMapper;
|
|
|
|
|
import com.emr.dao.emrPdfWaterSet.EmrPdfWaterSetMapper;
|
|
|
|
|
@ -121,6 +118,8 @@ public class TemplateSearchController {
|
|
|
|
|
private CommomService commomService;
|
|
|
|
|
@Autowired
|
|
|
|
|
private Archive_DetailMapper archiveDetailMapper;
|
|
|
|
|
@Autowired
|
|
|
|
|
private Archive_MasterMapper archiveMasterMapper;
|
|
|
|
|
@Value("${export_pdf_hospital_info}")
|
|
|
|
|
private String hospitaInfo;
|
|
|
|
|
|
|
|
|
|
@ -1583,6 +1582,8 @@ public class TemplateSearchController {
|
|
|
|
|
EmrPdfWaterSet emrPdfWaterSet1 = commomService.getEmrPdfWaterSet(emrPdfWaterSet);
|
|
|
|
|
imgToPdfUtil.imageToPdf(response, scanPathVos, pdfName, emrPdfWaterSet,emrPdfWaterSet1);
|
|
|
|
|
}else {
|
|
|
|
|
//查询患者信息
|
|
|
|
|
List<ScanPathVo> merInfo = scanPathMapper.selectFilaname(patientIds);
|
|
|
|
|
List<Archive_Detail> archiveDetails = archiveDetailMapper.selectPdfPathByPatient(patientIds, assortIds);
|
|
|
|
|
if (null != archiveDetails && !archiveDetails.isEmpty()) {
|
|
|
|
|
for (Archive_Detail detail : archiveDetails) {
|
|
|
|
|
@ -1591,8 +1592,11 @@ public class TemplateSearchController {
|
|
|
|
|
filePaths.add(pdfPath);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
SimpleDateFormat fmt = new SimpleDateFormat("yyyyMMdd");
|
|
|
|
|
String filename = fmt.format(new Date());
|
|
|
|
|
SimpleDateFormat originalFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
|
|
|
|
|
SimpleDateFormat targetFormat = new SimpleDateFormat("yyyyMMdd");
|
|
|
|
|
Date date = originalFormat.parse(merInfo.get(0).getDisDate());
|
|
|
|
|
String formattedDate = targetFormat.format(date);
|
|
|
|
|
String filename = hospitaInfo+ "_" +merInfo.get(0).getInpatientNo()+ "_" + formattedDate.format(formattedDate);
|
|
|
|
|
Jpg2PdfUtil.mulFile2One3(response, filePaths, filename);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|