病案室终审增加ca

master
linjj 2 years ago
parent bce79c8389
commit 836e3f9876

@ -8,6 +8,7 @@ package com.emr.controller;
import com.emr.entity.*;
import com.emr.service.*;
import com.emr.service.ipml.CaSignServiceImpl;
import com.emr.util.Msg;
import com.emr.util.ThreadExcelUtils;
import com.emr.util.XMLUtil;
@ -25,6 +26,7 @@ import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.xml.namespace.QName;
@ -57,6 +59,8 @@ public class lastVerifyController {
@Autowired(required = false)
private Archive_Master_FollowingService archive_master_followingService;
@Resource
private CaSignServiceImpl caSignService;
@RequestMapping(value = "/lastVerifys")
public String faults(Model model) {
@ -325,6 +329,8 @@ public class lastVerifyController {
//留观号审核推送第三方
archiveMasterService.requestObservationRecord(inpatientNo,"AUDITED",null,null);
}
//调用ca签章接口
caSignService.caSignByMasterId(emrFaultDetail.getArchiveDetailId());
}
return Msg.success();
}

@ -15,6 +15,7 @@ import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;
import org.springframework.util.FileSystemUtils;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
@ -22,7 +23,10 @@ import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.File;
import java.io.IOException;
import java.text.DateFormat;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.Calendar;
import java.util.Date;
import java.util.List;
@ -68,6 +72,44 @@ public class taskController {
PDFUtils.delAllFile(pdfErrorUrl);
}
@Scheduled(cron="0 0 1 * * ?")//每天4点触发cron="0 0 4 * * ?"
public void taskPDF() throws IOException {
Date date1 = new Date();
Calendar calendar = Calendar.getInstance(); //得到日历
calendar.setTime(date1);//把当前时间赋给日历
calendar.add(calendar.DATE, -15); //设置为前15天
Date date2 = calendar.getTime();//获取15天前的时间
DateFormat format = new SimpleDateFormat("yyyy-MM-dd");
Date date;
//转换成时间戳
long t1 = date2.getTime();
try {
File f = new File("D:\\docus\\caCopy");
File[] files = f.listFiles();
for (int i = 0; i < files.length; i++) {
//获取文件路径
String filePath = files[i].getCanonicalPath();
//获取文件名,文件名为yyyy--mm--dd格式时间
String lastTime = files[i].getName();
//将lastTime时间转为long类型
try {
date = format.parse(lastTime);
} catch (ParseException e) {
throw new RuntimeException(e);
}
Long timestamp = date.getTime();
if (timestamp < t1) {
//删除
FileSystemUtils.deleteRecursively(new File(filePath));
}
}
} catch (IOException e) {
e.printStackTrace();
}
}
//@Scheduled(cron="0 0 3 * * ?")//每天3点触发0 0 3 * * ?
//@Scheduled(cron="${fixedDelay}")
public void task2() throws IOException {

Loading…
Cancel
Save