|
|
@@ -1,9 +1,13 @@
|
|
|
package org.jeecg;
|
|
|
|
|
|
+import cn.hutool.core.bean.BeanUtil;
|
|
|
import org.jeecg.modules.demo.mock.MockController;
|
|
|
import org.jeecg.modules.demo.test.entity.JeecgDemo;
|
|
|
import org.jeecg.modules.demo.test.mapper.JeecgDemoMapper;
|
|
|
import org.jeecg.modules.demo.test.service.IJeecgDemoService;
|
|
|
+import org.jeecg.modules.medical.entity.AdviceDetailsVO;
|
|
|
+import org.jeecg.modules.medical.entity.DiagnosesVO;
|
|
|
+import org.jeecg.modules.medical.entity.MidIncidentWarningVO;
|
|
|
import org.jeecg.modules.medical.ruleengine.SPELUtil;
|
|
|
import org.jeecg.modules.system.service.ISysDataLogService;
|
|
|
import org.junit.Assert;
|
|
|
@@ -14,7 +18,9 @@ import org.springframework.boot.test.context.SpringBootTest;
|
|
|
import org.springframework.test.context.junit4.SpringRunner;
|
|
|
|
|
|
import javax.annotation.Resource;
|
|
|
+import java.util.ArrayList;
|
|
|
import java.util.List;
|
|
|
+import java.util.Map;
|
|
|
|
|
|
@RunWith(SpringRunner.class)
|
|
|
@SpringBootTest(webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT,classes = JeecgSystemApplication.class)
|
|
|
@@ -24,7 +30,28 @@ public class SpelTest {
|
|
|
|
|
|
@Test
|
|
|
public void testSpel(){
|
|
|
-
|
|
|
+ MidIncidentWarningVO midIncidentWarningVO = new MidIncidentWarningVO();
|
|
|
+ List<DiagnosesVO> diagnosesVOList = new ArrayList<>();
|
|
|
+ DiagnosesVO diagnosesVO = new DiagnosesVO();
|
|
|
+ diagnosesVO.setDiagnose_desc("1111");
|
|
|
+ diagnosesVO.setDiagnose_code("11113");
|
|
|
+ DiagnosesVO diagnosesVO1 = new DiagnosesVO();
|
|
|
+ diagnosesVO1.setDiagnose_desc("1112");
|
|
|
+ diagnosesVO1.setDiagnose_code("11123");
|
|
|
+ diagnosesVOList.add(diagnosesVO);
|
|
|
+ diagnosesVOList.add(diagnosesVO1);
|
|
|
+ midIncidentWarningVO.setDiagnoses(diagnosesVOList);
|
|
|
+ List<AdviceDetailsVO> AdviceDetailsVOList = new ArrayList<>();
|
|
|
+ AdviceDetailsVO detailsVO = new AdviceDetailsVO();
|
|
|
+ detailsVO.setProject_code("women");
|
|
|
+ AdviceDetailsVOList.add(detailsVO);
|
|
|
+ AdviceDetailsVO detailsVO1 = new AdviceDetailsVO();
|
|
|
+ detailsVO1.setProject_code("women111");
|
|
|
+ AdviceDetailsVOList.add(detailsVO1);
|
|
|
+ midIncidentWarningVO.setAdvice_details(AdviceDetailsVOList);
|
|
|
+ Map<String,Object> dataMap = BeanUtil.beanToMap(midIncidentWarningVO);
|
|
|
+ Object list = dataMap.get("advice_details");
|
|
|
+ System.out.println(list instanceof List);
|
|
|
}
|
|
|
|
|
|
}
|