lipc 4 jaren geleden
bovenliggende
commit
b778dbdb9a
1 gewijzigde bestanden met toevoegingen van 39 en 22 verwijderingen
  1. 39 22
      tran-service/src/main/java/com/diagbot/web/InquiryInfoController.java

+ 39 - 22
tran-service/src/main/java/com/diagbot/web/InquiryInfoController.java

@@ -165,12 +165,13 @@ public class InquiryInfoController {
             //年龄为必须值,通过生日计算
             int age;
             Calendar now = Calendar.getInstance();
-            now.setTime(new Date());// 当前时间
+            // 当前时间
+            now.setTime(new Date());
 
             Calendar birth = Calendar.getInstance();
             birth.setTime(patientInfoDTO.getBirthday());
-
-            if (birth.after(now)) {//如果传入的时间,在当前时间的后面,返回0岁
+            //如果传入的时间,在当前时间的后面,返回0岁
+            if (birth.after(now)) {
                 age = 0;
             } else {
                 age = now.get(Calendar.YEAR) - birth.get(Calendar.YEAR);
@@ -273,8 +274,10 @@ public class InquiryInfoController {
 
         String mrId;
         String url;
-        StringBuffer sb3 = new StringBuffer();//放化验细项列表
-        StringBuffer sb4 = new StringBuffer();//放辅检列表
+        //放化验细项列表
+        StringBuffer sb3 = new StringBuffer();
+        //放辅检列表
+        StringBuffer sb4 = new StringBuffer();
         String[] orderCode;
         //统计接口
         InputInfo inputInfo = new InputInfo();
@@ -305,7 +308,7 @@ public class InquiryInfoController {
             }
             pushJoinVO.setDiag(li);
             pushJoinVO.setDiagOrder(li);
-            if(li.size()>0){
+            if (li.size() > 0) {
                 pushJoinVO.setDiseaseName(li.get(0));
             }
 
@@ -554,7 +557,8 @@ public class InquiryInfoController {
             case "7":
                 pushJoinVO.setRuleType("1");
                 pushDto = dataServiceClient.push(pushJoinVO);
-                if (pushDto.data.getHasIndications() != null && pushDto.data.getHasIndications().equals("1")) {
+                //hasIndications : 有无病情提示标志(0:无,1:有)
+                if (pushDto.data.getHasIndications() != null && "1".equals(pushDto.data.getHasIndications())) {
                     mrId = mrFacade.createMr(pushJoinVO);
 
                     url = "http://192.1.3.116:5446/indexHorizontal.html?" +
@@ -576,7 +580,8 @@ public class InquiryInfoController {
             case "8":
                 pushJoinVO.setRuleType("2");
                 pushDto = dataServiceClient.push(pushJoinVO);
-                if (pushDto.data.getHasIndications() != null && pushDto.data.getHasIndications().equals("1")) {
+                //hasIndications : 有无病情提示标志(0:无,1:有)
+                if (pushDto.data.getHasIndications() != null && "1".equals(pushDto.data.getHasIndications())) {
                     if (pushJoinVO.getLisOrder() != null && pushJoinVO.getLisOrder().size() > 0) {
 
                         mrId = mrFacade.createMr(pushJoinVO);
@@ -622,11 +627,13 @@ public class InquiryInfoController {
                 //门诊 化验辅检静态知识
             case "9":
                 if (pushJoinVO.getLisOrder() != null && pushJoinVO.getLisOrder().size() > 0) {
-                    if (!sb3.toString().equals("")) {
+                    if (!"".equals(sb3.toString())) {
                         mrId = mrFacade.createMr(pushJoinVO);
                         url = "http://192.1.3.116:5446/indexHorizontal.html?" +
-                                "mrId=" + mrId + //redis保存产生唯一值
-                                "&tipsInfoList=" + URLEncoder.encode(sb3.toString(), "UTF-8") +  //多个提示信息内容
+                                //redis保存产生唯一值
+                                "mrId=" + mrId +
+                                //多个提示信息内容
+                                "&tipsInfoList=" + URLEncoder.encode(sb3.toString(), "UTF-8") +
                                 "&showTab=1" +
                                 "&hospitalCode=" + pushJoinVO.getHosCode() + //医院编码
                                 "&plan=9" +
@@ -644,11 +651,13 @@ public class InquiryInfoController {
                     }
 
                 } else if (pushJoinVO.getPacsOrder() != null && pushJoinVO.getPacsOrder().size() > 0) {
-                    if (!sb4.toString().equals("")) {
+                    if (!"".equals(sb4.toString())) {
                         mrId = mrFacade.createMr(pushJoinVO);
                         url = "http://192.1.3.116:5446/indexHorizontal.html?" +
-                                "mrId=" + mrId + //redis保存产生唯一值
-                                "&tipsInfoList=" + URLEncoder.encode(sb4.toString(), "UTF-8") +  //多个提示信息内容
+                                //redis保存产生唯一值
+                                "mrId=" + mrId +
+                                //多个提示信息内容
+                                "&tipsInfoList=" + URLEncoder.encode(sb4.toString(), "UTF-8") +
                                 "&showTab=1" +
                                 "&hospitalCode=" + pushJoinVO.getHosCode() + //医院编码
                                 "&plan=9" +
@@ -707,7 +716,8 @@ public class InquiryInfoController {
             case "4":
                 pushJoinVO.setRuleType("1");
                 pushDto = dataServiceClient.push(pushJoinVO);
-                if (pushDto.data.getHasIndications() != null && pushDto.data.getHasIndications().equals("1")) {
+                //hasIndications : 有无病情提示标志(0:无,1:有)
+                if (pushDto.data.getHasIndications() != null && "1".equals(pushDto.data.getHasIndications())) {
                     mrId = mrFacade.createMr(pushJoinVO);
 
                     url = "http://192.1.3.116:5446/index.html?" +
@@ -729,7 +739,8 @@ public class InquiryInfoController {
             case "5":
                 pushJoinVO.setRuleType("2");
                 pushDto = dataServiceClient.push(pushJoinVO);
-                if (pushDto.data.getHasIndications() != null && pushDto.data.getHasIndications().equals("1")) {
+                //hasIndications : 有无病情提示标志(0:无,1:有)
+                if (pushDto.data.getHasIndications() != null && "1".equals(pushDto.data.getHasIndications())) {
                     if (pushJoinVO.getLisOrder() != null && pushJoinVO.getLisOrder().size() > 0) {
 
                         mrId = mrFacade.createMr(pushJoinVO);
@@ -773,12 +784,14 @@ public class InquiryInfoController {
                 //住院 化验辅检静态知识
             case "6":
                 if (pushJoinVO.getLisOrder() != null && pushJoinVO.getLisOrder().size() > 0) {
-                    if (!sb3.toString().equals("")) {
+                    if (!"".equals(sb3.toString())) {
                         mrId = mrFacade.createMr(pushJoinVO);
 
                         url = "http://192.1.3.116:5446/index.html?" +
-                                "mrId=" + mrId + //redis保存产生唯一值
-                                "&tipsInfoList=" + URLEncoder.encode(sb3.toString(), "UTF-8") +  //多个提示信息内容
+                                //redis保存产生唯一值
+                                "mrId=" + mrId +
+                                //多个提示信息内容
+                                "&tipsInfoList=" + URLEncoder.encode(sb3.toString(), "UTF-8") +
                                 "&showTab=1" +
                                 "&hospitalCode=" + pushJoinVO.getHosCode() + //医院编码
                                 "&plan=6" +
@@ -795,12 +808,14 @@ public class InquiryInfoController {
                         return RespDTO.onError("暂未维护该项目静态知识!");
                     }
                 } else if (pushJoinVO.getPacsOrder() != null && pushJoinVO.getPacsOrder().size() > 0) {
-                    if (!sb4.toString().equals("")) {
+                    if (!"".equals(sb4.toString())) {
                         mrId = mrFacade.createMr(pushJoinVO);
 
                         url = "http://192.1.3.116:5446/index.html?" +
-                                "mrId=" + mrId + //redis保存产生唯一值
-                                "&tipsInfoList=" + URLEncoder.encode(sb4.toString(), "UTF-8") +  //多个提示信息内容
+                                //redis保存产生唯一值
+                                "mrId=" + mrId +
+                                //多个提示信息内容
+                                "&tipsInfoList=" + URLEncoder.encode(sb4.toString(), "UTF-8") +
                                 "&showTab=1" +
                                 "&hospitalCode=" + pushJoinVO.getHosCode() + //医院编码
                                 "&plan=6" +
@@ -818,6 +833,8 @@ public class InquiryInfoController {
                     }
                 }
                 return RespDTO.onError("未传入化验辅检套餐名称!");
+            default:
+
         }
         return RespDTO.onError("传入code无效!");
     }