wangfeng 5 лет назад
Родитель
Сommit
59b408471d

+ 1 - 0
knowledgeman-service/src/main/java/com/diagbot/enums/TermEnum.java

@@ -6,6 +6,7 @@ import lombok.Setter;
 
 public enum TermEnum implements KeyedNamed{
 
+	    Dis(0,"诊断"),
 	    Symptom(1, "症状"),
 	    Vital(2, "体征结果"),
 	    LisMax(3, "化验大项"),

+ 3 - 1
knowledgeman-service/src/main/java/com/diagbot/facade/DiagnoseImportFacade.java

@@ -259,7 +259,9 @@ public class DiagnoseImportFacade {
 	 */
 	public String getType(Integer type, Integer questionType) {
 		String typeName = "";
-		if (type == DiagnoseFeatureTypeEnum.Symptom.getKey()) {
+		if (type == DiagnoseFeatureTypeEnum.Dis.getKey()){
+			typeName = TermEnum.getName(0);
+		} else if (type == DiagnoseFeatureTypeEnum.Symptom.getKey()) {
 			typeName = TermEnum.getName(1);
 		} else if (type == DiagnoseFeatureTypeEnum.Vital.getKey()) {
 			typeName = TermEnum.getName(2);

+ 9 - 5
knowledgeman-service/src/main/java/com/diagbot/util/VerifyUtil.java

@@ -42,7 +42,7 @@ public class VerifyUtil {
      * @return
      */
     public static boolean checkCodeEquation(List<String> coding, String str) {
-		boolean res = false;
+		boolean res = true;
 		// 分割出所有的数字
 		String[] split = str.split("\\+");
 		String[] digitalSplit = str.split("[+ ( / ) 任 一 二 三 四 五 六 七 八 九 十  ]");
@@ -62,21 +62,25 @@ public class VerifyUtil {
 				boolean end = str1.endsWith(")");
 
 				if (start == false || end == false) {
-					throw new CommonException(CommonErrorCode.SERVER_IS_ERROR, "公式格式有误");
+					res = false;
+					break;
+					//throw new CommonException(CommonErrorCode.SERVER_IS_ERROR, "公式格式有误");
 				}
 				String str2 = split[i].substring(split[i].indexOf(")") + 1);
 				String[] array = { "任一", "任二", "任三", "任四", "任五", "任六", "任七", "任八", "任九", "任十" };
 				if (str2.length() > 0) {
 					boolean pp = Arrays.asList(array).contains(str2);
 					if (pp == false) {
-						throw new CommonException(CommonErrorCode.SERVER_IS_ERROR, "公式格式有误");
+						res = false;
+						break;
 					}
 				} else {
-					throw new CommonException(CommonErrorCode.SERVER_IS_ERROR, "公式格式有误");
+					res = false;
+					break;
 				}
 			}
 		} else {
-			throw new CommonException(CommonErrorCode.SERVER_IS_ERROR, "公式格式有误");
+			res = false;
 		}
 
 		return res;