lighter_217 2 veckor sedan
förälder
incheckning
b17060656a

+ 1 - 1
src/main/java/thyyxxk/webserver/service/externalhttp/SiExecSrvc.java

@@ -9,7 +9,7 @@ import com.dtflys.forest.http.ForestResponse;
 
 import java.util.Map;
 
-@BaseRequest(baseURL = "http://webhis.thyy.cn:8077/ybjkdz")
+@BaseRequest(baseURL = "http://10.58.33.47:8086/CSB")
 public interface SiExecSrvc {
     @Post
     ForestResponse<byte[]> download(@Header Map<String, String> headerMap, @JSONBody JSONObject input);

+ 19 - 18
src/main/java/thyyxxk/webserver/service/medicalinsurance/SiDownloadService.java

@@ -9,6 +9,7 @@ import lombok.extern.slf4j.Slf4j;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 import thyyxxk.webserver.config.envionment.MedinsurConfig;
+import thyyxxk.webserver.config.exception.BizException;
 import thyyxxk.webserver.config.exception.ExceptionEnum;
 import thyyxxk.webserver.constants.Capacity;
 import thyyxxk.webserver.constants.sidicts.SiFunction;
@@ -34,7 +35,7 @@ public class SiDownloadService {
     private static final String RESULT_CODE = "infcode";
     private static final String ERROR_MESSAGE = "err_msg";
     private static final String OUTPUT = "output";
-    private static final String BEGIN_VERSION = "V00";
+    private static final String BEGIN_VERSION = "000000";
     private final ExecService exec;
     private final SiDownloadDao dnlddao;
     private final SiExecSrvc execSrvc;
@@ -235,7 +236,7 @@ public class SiDownloadService {
                 return ResultVoUtil.success(versionName);
             }
         }
-        return ResultVoUtil.fail(ExceptionEnum.LOGICAL_ERROR, result.getString(ERROR_MESSAGE));
+        throw new BizException(ExceptionEnum.LOGICAL_ERROR, result.getString(ERROR_MESSAGE));
     }
 
     public ResultVo<Map<String, Object>> downloadChineseHerbalCatalogue(String v) {
@@ -268,7 +269,7 @@ public class SiDownloadService {
             obj.put("path", filePath);
             return ResultVoUtil.success(obj);
         }
-        return ResultVoUtil.fail(ExceptionEnum.LOGICAL_ERROR, result.getString(ERROR_MESSAGE));
+        throw new BizException(ExceptionEnum.LOGICAL_ERROR, result.getString(ERROR_MESSAGE));
     }
 
     public ResultVo<String> execDwnldChnsHrblCtlg(String version) {
@@ -326,7 +327,7 @@ public class SiDownloadService {
                 return ResultVoUtil.success(versionName);
             }
         }
-        return ResultVoUtil.fail(ExceptionEnum.LOGICAL_ERROR, result.getString(ERROR_MESSAGE));
+        throw new BizException(ExceptionEnum.LOGICAL_ERROR, result.getString(ERROR_MESSAGE));
     }
 
     public ResultVo<Map<String, Object>> downloadEthnicMedicine(DwnldPrm prm) {
@@ -392,7 +393,7 @@ public class SiDownloadService {
                 return ResultVoUtil.success(versionName);
             }
         }
-        return ResultVoUtil.fail(ExceptionEnum.LOGICAL_ERROR, result.getString(ERROR_MESSAGE));
+        throw new BizException(ExceptionEnum.LOGICAL_ERROR, result.getString(ERROR_MESSAGE));
     }
 
     public ResultVo<Map<String, Object>> downloadMedicalSuppliesCatalogue(String v) {
@@ -447,7 +448,7 @@ public class SiDownloadService {
                 return ResultVoUtil.success(versionName);
             }
         }
-        return ResultVoUtil.fail(ExceptionEnum.LOGICAL_ERROR, result.getString(ERROR_MESSAGE));
+        throw new BizException(ExceptionEnum.LOGICAL_ERROR, result.getString(ERROR_MESSAGE));
     }
 
     public ResultVo<Map<String, Object>> downloadDiseasesAndDiagnosisCatalogue(String v) {
@@ -502,7 +503,7 @@ public class SiDownloadService {
                 return ResultVoUtil.success(versionName);
             }
         }
-        return ResultVoUtil.fail(ExceptionEnum.LOGICAL_ERROR, result.getString(ERROR_MESSAGE));
+        throw new BizException(ExceptionEnum.LOGICAL_ERROR, result.getString(ERROR_MESSAGE));
     }
 
     public ResultVo<Map<String, Object>> downloadOperationCatalogue(String v) {
@@ -561,7 +562,7 @@ public class SiDownloadService {
                 return ResultVoUtil.success(versionName);
             }
         }
-        return ResultVoUtil.fail(ExceptionEnum.LOGICAL_ERROR, result.getString(ERROR_MESSAGE));
+        throw new BizException(ExceptionEnum.LOGICAL_ERROR, result.getString(ERROR_MESSAGE));
     }
 
     public ResultVo<Map<String, Object>> downloadOutpatientSpecialChronicDiseasesCatalogue(String v) {
@@ -616,7 +617,7 @@ public class SiDownloadService {
                 return ResultVoUtil.success(versionName);
             }
         }
-        return ResultVoUtil.fail(ExceptionEnum.LOGICAL_ERROR, result.getString(ERROR_MESSAGE));
+        throw new BizException(ExceptionEnum.LOGICAL_ERROR, result.getString(ERROR_MESSAGE));
     }
 
     public ResultVo<Map<String, Object>> downloadPayByDiseaseCatalogue(String v) {
@@ -671,7 +672,7 @@ public class SiDownloadService {
                 return ResultVoUtil.success(versionName);
             }
         }
-        return ResultVoUtil.fail(ExceptionEnum.LOGICAL_ERROR, result.getString(ERROR_MESSAGE));
+        throw new BizException(ExceptionEnum.LOGICAL_ERROR, result.getString(ERROR_MESSAGE));
     }
 
     public ResultVo<Map<String, Object>> downloadDaytimeSurgeryDiseasesCatalogue(String v) {
@@ -726,7 +727,7 @@ public class SiDownloadService {
                 return ResultVoUtil.success(versionName);
             }
         }
-        return ResultVoUtil.fail(ExceptionEnum.LOGICAL_ERROR, result.getString(ERROR_MESSAGE));
+        throw new BizException(ExceptionEnum.LOGICAL_ERROR, result.getString(ERROR_MESSAGE));
     }
 
     public ResultVo<Map<String, Object>> downloadMedicalInsuranceCatalogue(DwnldPrm prm) {
@@ -754,7 +755,7 @@ public class SiDownloadService {
             map.put("list", output.getJSONArray("data"));
             return ResultVoUtil.success(map);
         }
-        return ResultVoUtil.fail(ExceptionEnum.LOGICAL_ERROR, result.getString(ERROR_MESSAGE));
+        throw new BizException(ExceptionEnum.LOGICAL_ERROR, result.getString(ERROR_MESSAGE));
     }
 
     public ResultVo<Map<String, Object>> downloadTumorMorphologyCatalogue(String v) {
@@ -809,7 +810,7 @@ public class SiDownloadService {
                 return ResultVoUtil.success(versionName);
             }
         }
-        return ResultVoUtil.fail(ExceptionEnum.LOGICAL_ERROR, result.getString(ERROR_MESSAGE));
+        throw new BizException(ExceptionEnum.LOGICAL_ERROR, result.getString(ERROR_MESSAGE));
     }
 
     public ResultVo<Map<String, Object>> downloadTraditionalChineseDiseasesCatalogue(String v) {
@@ -864,7 +865,7 @@ public class SiDownloadService {
                 return ResultVoUtil.success(versionName);
             }
         }
-        return ResultVoUtil.fail(ExceptionEnum.LOGICAL_ERROR, result.getString(ERROR_MESSAGE));
+        throw new BizException(ExceptionEnum.LOGICAL_ERROR, result.getString(ERROR_MESSAGE));
     }
 
     public ResultVo<Map<String, Object>> downloadTcmSyndromeCatalogue(String v) {
@@ -919,7 +920,7 @@ public class SiDownloadService {
                 return ResultVoUtil.success(versionName);
             }
         }
-        return ResultVoUtil.fail(ExceptionEnum.LOGICAL_ERROR, result.getString(ERROR_MESSAGE));
+        throw new BizException(ExceptionEnum.LOGICAL_ERROR, result.getString(ERROR_MESSAGE));
     }
 
     public ResultVo<Map<String, Object>> downloadMedicalInsuranceMatchCatalogue(DwnldPrm prm) {
@@ -1004,7 +1005,7 @@ public class SiDownloadService {
                     tempList.clear();
                 }
             }
-            if (tempList.size() > 0) {
+            if (!tempList.isEmpty()) {
                 dnlddao.insertSelfPayCatalogue(tempList);
             }
         }
@@ -1031,7 +1032,7 @@ public class SiDownloadService {
                         tempList.clear();
                     }
                 }
-                if (tempList.size() > 0) {
+                if (!tempList.isEmpty()) {
                     dnlddao.insertSelfPayCatalogue(tempList);
                 }
             }
@@ -1065,7 +1066,7 @@ public class SiDownloadService {
             map.put("list", list);
             return ResultVoUtil.success(map);
         }
-        return ResultVoUtil.fail(ExceptionEnum.LOGICAL_ERROR, result.getString(ERROR_MESSAGE));
+        throw new BizException(ExceptionEnum.LOGICAL_ERROR, result.getString(ERROR_MESSAGE));
     }
 
     public String downloadFile(String fileQuryNo, String filename) {