浏览代码

获取模板和获取上次历史记录接口调整

gaodm 5 年之前
父节点
当前提交
f225543282

+ 4 - 1
icss-service/src/main/java/com/diagbot/facade/InquiryInfoFacade.java

@@ -13,6 +13,7 @@ import java.util.stream.Collectors;
 import javax.servlet.ServletOutputStream;
 import javax.servlet.http.HttpServletResponse;
 
+import com.diagbot.util.IntegerUtil;
 import org.apache.poi.hssf.usermodel.HSSFRow;
 import org.apache.poi.hssf.usermodel.HSSFSheet;
 import org.apache.poi.hssf.usermodel.HSSFWorkbook;
@@ -263,7 +264,9 @@ public class InquiryInfoFacade extends InquiryInfoServiceImpl {
         Map<String, Object> map = new HashMap<>();
         map.put("hospitalId", hospitalInfoDTO.getId());
         map.put("patientId", patientInfoDTO.getId());
-        map.put("sign", getLastOtherVO.getSign());
+        if (!IntegerUtil.isNull(getLastOtherVO.getSign())){
+            map.put("sign", getLastOtherVO.getSign());
+        }
         InquiryInfo inquiryInfo = baseMapper.getPatientLast(map);
 
         if (inquiryInfo != null) {

+ 1 - 1
icss-service/src/main/java/com/diagbot/vo/GetLastOtherVO.java

@@ -35,7 +35,7 @@ public class GetLastOtherVO {
      * 类型:0:结构化 1:文本模式
      */
 	@ApiModelProperty(value="类型:0:结构化 1:文本模式")
-    private Integer sign = 0;
+    private Integer sign;
 	
 	   
 }

+ 1 - 1
icss-service/src/main/java/com/diagbot/vo/TemplateInfoPageVO.java

@@ -37,7 +37,7 @@ public class TemplateInfoPageVO extends Page{
 	@NotNull(message = "请输入部门id")
 	private Long hospitalDeptId;//部门id
 	
-	@NotBlank(message = "请输入模板类型")
+//	@NotBlank(message = "请输入模板类型")
 	private String type;//模板类型
 	
 	private List<Integer> sex;//性别

+ 4 - 1
icss-service/src/main/resources/mapper/InquiryInfoMapper.xml

@@ -29,7 +29,10 @@
 		FROM icss_inquiry_info a JOIN icss_inquiry_detail b 
 		on a.id=b.inquiry_id
 		where a.hospital_id=#{hospitalId} and a.patient_id=#{patientId}
-		and a.sign=#{sign} and b.type=3 and a.is_deleted='N' 
+        <if test="sign != null and sign != ''">
+            and a.sign=#{sign}
+        </if>
+		and b.type=3 and a.is_deleted='N'
 		and b.is_deleted='N' 
 		group by a.id
 		ORDER BY a.gmt_create desc