|
@@ -1,5 +1,14 @@
|
|
|
package com.diagbot.facade;
|
|
|
|
|
|
+
|
|
|
+import java.text.ParseException;
|
|
|
+import java.text.SimpleDateFormat;
|
|
|
+import java.util.ArrayList;
|
|
|
+import java.util.Date;
|
|
|
+import java.util.List;
|
|
|
+
|
|
|
+import org.springframework.stereotype.Component;
|
|
|
+
|
|
|
import com.diagbot.dto.LisDataDTO;
|
|
|
import com.diagbot.dto.LisRetrieveDTO;
|
|
|
import com.diagbot.dto.LisRetrieveListAllDTO;
|
|
@@ -13,10 +22,6 @@ import com.diagbot.vo.LisExcelWrapperVO;
|
|
|
import com.diagbot.vo.LisGroupNameVO;
|
|
|
import com.diagbot.vo.PacsArgumentsVO;
|
|
|
import com.diagbot.vo.PacsCheckItemVO;
|
|
|
-import org.springframework.stereotype.Component;
|
|
|
-
|
|
|
-import java.util.ArrayList;
|
|
|
-import java.util.List;
|
|
|
|
|
|
@Component
|
|
|
public class DockingImportFacade {
|
|
@@ -35,8 +40,12 @@ public class DockingImportFacade {
|
|
|
LisRetrieveDTO list = new LisRetrieveDTO();
|
|
|
list.setGroupName("呼吸道病毒三联检" + i);
|
|
|
list.setInspectDoctor("admin" + i);// TODO 测试数据
|
|
|
- list.setInspectTime(DateUtil.now());// TODO 测试数据
|
|
|
- list.setReportTime(DateUtil.now());
|
|
|
+ try {
|
|
|
+ list.setInspectTime(StringToDate(i));// TODO 测试数据
|
|
|
+ list.setReportTime(StringToDate(i));
|
|
|
+ } catch (ParseException e) {
|
|
|
+ e.printStackTrace();
|
|
|
+ }
|
|
|
list.setSpecimenType("血清" + i);// TODO 测试数据
|
|
|
lisRetrieveDTO.add(list);
|
|
|
}
|
|
@@ -57,12 +66,33 @@ public class DockingImportFacade {
|
|
|
lisExcelWrapperVO.setMax("1" + i);
|
|
|
lisExcelWrapperVO.setMealName("-空腹血糖(Glu)" + i);// TODO 测试数据
|
|
|
lisExcelWrapperVO.setMin("" + i);// TODO 测试数据
|
|
|
- lisExcelWrapperVO.setTime("");// TODO 测试数据
|
|
|
- lisExcelWrapperVO.setType("1");// TODO 测试数据
|
|
|
+ lisExcelWrapperVO.setTime("2019-06-25"+i+":00:00");// TODO 测试数据
|
|
|
+ if(i==1){
|
|
|
+ lisExcelWrapperVO.setType("0");// TODO 测试数据
|
|
|
+ } else if(i==2){
|
|
|
+ lisExcelWrapperVO.setType("2");// TODO 测试数据
|
|
|
+ }else if(i==3){
|
|
|
+ lisExcelWrapperVO.setType("3");// TODO 测试数据
|
|
|
+ }else if(i==4){
|
|
|
+ lisExcelWrapperVO.setType("1");// TODO 测试数据
|
|
|
+ }else{
|
|
|
+ lisExcelWrapperVO.setType("1");// TODO 测试数据
|
|
|
+ }
|
|
|
lisExcelWrapperVO.setUniquemealName("-空腹血糖(Glu)" + i);
|
|
|
lisExcelWrapperVO.setUniqueName("糖代谢检查" + i);// TODO 测试数据
|
|
|
lisExcelWrapperVO.setUnit("mo/l");// TODO 测试数据
|
|
|
- lisExcelWrapperVO.setValue("15" + i);// TODO 测试数据
|
|
|
+ if(i==1){
|
|
|
+ lisExcelWrapperVO.setValue("2");// TODO 测试数据;// TODO 测试数据
|
|
|
+ } else if(i==2){
|
|
|
+ lisExcelWrapperVO.setValue("15" + i);// TODO 测试数据
|
|
|
+ }else if(i==3){
|
|
|
+ lisExcelWrapperVO.setValue("0.1" + i);// TODO 测试数据
|
|
|
+ }else if(i==4){
|
|
|
+ lisExcelWrapperVO.setValue("黑色");// TODO 测试数据
|
|
|
+ }else{
|
|
|
+ lisExcelWrapperVO.setValue("1" + i);// TODO 测试数据
|
|
|
+ }
|
|
|
+
|
|
|
lisExcelWrapper.add(lisExcelWrapperVO);// TODO 测试数据
|
|
|
}
|
|
|
|
|
@@ -83,10 +113,15 @@ public class DockingImportFacade {
|
|
|
for (int i = 0; i < 10; i++) {// TODO 测试数据
|
|
|
PacsRetrieveDTO list = new PacsRetrieveDTO();// TODO 测试数据
|
|
|
list.setCheckItem("呼吸道病毒三联检" + i);// TODO 测试数据
|
|
|
+ list.setApplicationDate("2019-05-31 "+i+":00:00");
|
|
|
list.setCheckNum("123456" + i);// TODO 测试数据
|
|
|
list.setName("心电图" + i);// TODO 测试数据
|
|
|
- list.setInspectTime(DateUtil.now());// TODO 测试数据
|
|
|
- list.setReportTime(DateUtil.now());// TODO 测试数据
|
|
|
+ try {
|
|
|
+ list.setInspectTime(StringToDate(i));// TODO 测试数据
|
|
|
+ list.setReportTime(StringToDate(i));
|
|
|
+ } catch (ParseException e) {
|
|
|
+ e.printStackTrace();
|
|
|
+ }
|
|
|
list.setApplicationNum("8888" + i);// TODO 测试数据
|
|
|
list.setType(i);// TODO 测试数据
|
|
|
pacsRetrieveDTO.add(list);// TODO 测试数据
|
|
@@ -113,5 +148,13 @@ public class DockingImportFacade {
|
|
|
pacsDataDTO.setPacsResultDTO(pacsExcelWrapper);// TODO 测试数据
|
|
|
return pacsDataDTO;// TODO 测试数据
|
|
|
}
|
|
|
+ //字符串转换成Date
|
|
|
+ public static Date StringToDate(int i) throws ParseException {
|
|
|
+ String strDate = "2019-05-15";
|
|
|
+ String format2 = "yyyy-MM-dd HH:mm:ss";
|
|
|
+ String Time =strDate+ i+":00:00";
|
|
|
+ SimpleDateFormat sdf = new SimpleDateFormat(format2);
|
|
|
+ return sdf.parse(Time);
|
|
|
|
|
|
+ }
|
|
|
}
|