|
|
|
@ -27,6 +27,18 @@ import com.docus.bgts.utils.FileUtils;
|
|
|
|
import com.docus.bgts.utils.HttpUtils;
|
|
|
|
import com.docus.bgts.utils.HttpUtils;
|
|
|
|
import com.docus.bgts.utils.SnowflakeIdWorker;
|
|
|
|
import com.docus.bgts.utils.SnowflakeIdWorker;
|
|
|
|
import com.docus.bgts.utils.XmlUtils;
|
|
|
|
import com.docus.bgts.utils.XmlUtils;
|
|
|
|
|
|
|
|
import org.apache.commons.lang3.StringUtils;
|
|
|
|
|
|
|
|
import org.apache.cxf.endpoint.Client;
|
|
|
|
|
|
|
|
import org.apache.cxf.jaxws.endpoint.dynamic.JaxWsDynamicClientFactory;
|
|
|
|
|
|
|
|
import org.apache.cxf.transport.http.HTTPConduit;
|
|
|
|
|
|
|
|
import org.apache.cxf.transports.http.configuration.HTTPClientPolicy;
|
|
|
|
|
|
|
|
import org.apache.logging.log4j.LogManager;
|
|
|
|
|
|
|
|
import org.apache.logging.log4j.Logger;
|
|
|
|
|
|
|
|
import org.dom4j.Element;
|
|
|
|
|
|
|
|
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.ByteArrayInputStream;
|
|
|
|
import java.text.ParseException;
|
|
|
|
import java.text.ParseException;
|
|
|
|
import java.text.SimpleDateFormat;
|
|
|
|
import java.text.SimpleDateFormat;
|
|
|
|
@ -40,17 +52,6 @@ import java.util.List;
|
|
|
|
import java.util.Map;
|
|
|
|
import java.util.Map;
|
|
|
|
import java.util.concurrent.CountDownLatch;
|
|
|
|
import java.util.concurrent.CountDownLatch;
|
|
|
|
import java.util.concurrent.ThreadPoolExecutor;
|
|
|
|
import java.util.concurrent.ThreadPoolExecutor;
|
|
|
|
import org.apache.commons.lang3.StringUtils;
|
|
|
|
|
|
|
|
import org.apache.cxf.endpoint.Client;
|
|
|
|
|
|
|
|
import org.apache.cxf.jaxws.endpoint.dynamic.JaxWsDynamicClientFactory;
|
|
|
|
|
|
|
|
import org.apache.cxf.transport.http.HTTPConduit;
|
|
|
|
|
|
|
|
import org.apache.cxf.transports.http.configuration.HTTPClientPolicy;
|
|
|
|
|
|
|
|
import org.apache.logging.log4j.LogManager;
|
|
|
|
|
|
|
|
import org.apache.logging.log4j.Logger;
|
|
|
|
|
|
|
|
import org.dom4j.Element;
|
|
|
|
|
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
|
|
|
|
|
import org.springframework.beans.factory.annotation.Value;
|
|
|
|
|
|
|
|
import org.springframework.stereotype.Service;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@Service
|
|
|
|
@Service
|
|
|
|
public class BgtsServiceImpl implements IBgtsService {
|
|
|
|
public class BgtsServiceImpl implements IBgtsService {
|
|
|
|
@ -507,17 +508,34 @@ public class BgtsServiceImpl implements IBgtsService {
|
|
|
|
return map;
|
|
|
|
return map;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public static void main(String[] args) {
|
|
|
|
|
|
|
|
getSmCollectionTimeEcg("2025-01-01 16:00:02", "2025-01-05 14:20:02");
|
|
|
|
|
|
|
|
System.out.println( getSmCollectionTimeEcg("2025-01-01 16:00:02", "2025-01-05 14:20:02"));
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
public static Map<String, String> getSmCollectionTimeEcg(String admissDate, String disDate) {
|
|
|
|
public static Map<String, String> getSmCollectionTimeEcg(String admissDate, String disDate) {
|
|
|
|
Calendar calendar = Calendar.getInstance();
|
|
|
|
Calendar calendar = Calendar.getInstance();
|
|
|
|
Map<String, String> map = new HashMap();
|
|
|
|
Map<String, String> map = new HashMap();
|
|
|
|
|
|
|
|
|
|
|
|
try {
|
|
|
|
try {
|
|
|
|
|
|
|
|
int admissDateAmountHours = 6;
|
|
|
|
|
|
|
|
int disDateAmountHours = 30;
|
|
|
|
|
|
|
|
Object ecgAdmissDateHours = FileUtils.getJsonByName("ecgAdmissDateHours");
|
|
|
|
|
|
|
|
Object ecgDisDateHours = FileUtils.getJsonByName("ecgDisDateHours");
|
|
|
|
|
|
|
|
if (ecgAdmissDateHours != null) {
|
|
|
|
|
|
|
|
admissDateAmountHours = Integer.parseInt(ecgAdmissDateHours.toString());
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
if (ecgDisDateHours != null) {
|
|
|
|
|
|
|
|
disDateAmountHours = Integer.parseInt(ecgDisDateHours.toString());
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
calendar.setTime((new SimpleDateFormat("yyyy-MM-dd HH:mm:ss")).parse(admissDate));
|
|
|
|
calendar.setTime((new SimpleDateFormat("yyyy-MM-dd HH:mm:ss")).parse(admissDate));
|
|
|
|
calendar.add(10, -6);
|
|
|
|
calendar.add(Calendar.HOUR, -admissDateAmountHours);
|
|
|
|
Date dBefore = calendar.getTime();
|
|
|
|
Date dBefore = calendar.getTime();
|
|
|
|
Calendar calendar1 = Calendar.getInstance();
|
|
|
|
Calendar calendar1 = Calendar.getInstance();
|
|
|
|
calendar1.setTime((new SimpleDateFormat("yyyy-MM-dd HH:mm:ss")).parse(disDate));
|
|
|
|
calendar1.setTime((new SimpleDateFormat("yyyy-MM-dd HH:mm:ss")).parse(disDate));
|
|
|
|
calendar1.add(10, 30);
|
|
|
|
calendar1.add(Calendar.HOUR, disDateAmountHours);
|
|
|
|
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
|
|
|
|
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
|
|
|
|
String defaultStartDate = sdf.format(dBefore);
|
|
|
|
String defaultStartDate = sdf.format(dBefore);
|
|
|
|
String defaultEndDate = sdf.format(calendar1.getTime());
|
|
|
|
String defaultEndDate = sdf.format(calendar1.getTime());
|
|
|
|
|