From ce8e60d1194595a889727365972022cc3d0bd19c Mon Sep 17 00:00:00 2001 From: fangcheng Date: Thu, 30 Mar 2017 14:06:25 +0800 Subject: [PATCH] =?UTF-8?q?=E7=97=85=E5=8F=B2=E6=8E=A5=E5=8F=A3=E5=BC=80?= =?UTF-8?q?=E5=8F=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/lyms/hospital/entity/history/HistorySource.java | 4 +++- .../service/history/impl/HistorySourceServiceImpl.java | 6 ++---- .../src/test/java/test/hospital/BaseServiceTest.java | 11 +++++++++++ parent/hospital.web/src/test/java/test/hospital/BaseTest.java | 2 +- .../src/test/java/test/hospital/history/HistoryTest.java | 7 ++++--- 5 files changed, 21 insertions(+), 9 deletions(-) diff --git a/parent/hospital.mac/src/main/java/com/lyms/hospital/entity/history/HistorySource.java b/parent/hospital.mac/src/main/java/com/lyms/hospital/entity/history/HistorySource.java index 51840a0..95680a4 100644 --- a/parent/hospital.mac/src/main/java/com/lyms/hospital/entity/history/HistorySource.java +++ b/parent/hospital.mac/src/main/java/com/lyms/hospital/entity/history/HistorySource.java @@ -3,6 +3,8 @@ package com.lyms.hospital.entity.history; import com.baomidou.mybatisplus.annotations.TableId; import com.baomidou.mybatisplus.annotations.TableField; import com.baomidou.mybatisplus.annotations.TableName; +import com.lyms.util.InstanceUtils; + import java.io.Serializable; import java.util.List; @@ -59,7 +61,7 @@ public class HistorySource implements Serializable { * 子级别元素 */ @TableField(exist=false) - private List children; + private List children = InstanceUtils.newArrayList(); public String getId() { return id; diff --git a/parent/hospital.mac/src/main/java/com/lyms/hospital/service/history/impl/HistorySourceServiceImpl.java b/parent/hospital.mac/src/main/java/com/lyms/hospital/service/history/impl/HistorySourceServiceImpl.java index b89e03d..b030ed9 100644 --- a/parent/hospital.mac/src/main/java/com/lyms/hospital/service/history/impl/HistorySourceServiceImpl.java +++ b/parent/hospital.mac/src/main/java/com/lyms/hospital/service/history/impl/HistorySourceServiceImpl.java @@ -31,8 +31,8 @@ public class HistorySourceServiceImpl extends ServiceImpl dataList = null; EntityWrapper ew = new EntityWrapper(); ew.where("enable=1"); - if(null != historyPatientType){ - ew.and("type={}", "'"+historyPatientType+"'"); + if(historyPatientType.length > 0){ + ew.and("type={0}", "'"+historyPatientType[0]+"'"); } dataList = selectList(ew); return dataList; @@ -47,13 +47,11 @@ public class HistorySourceServiceImpl extends ServiceImpl