Parcourir la source

支付方式调整

lihong il y a 2 ans
Parent
commit
d7f5ae5e6c
1 fichiers modifiés avec 17 ajouts et 1 suppressions
  1. 17 1
      src/main/java/thyyxxk/webserver/utils/CommonUtil.java

+ 17 - 1
src/main/java/thyyxxk/webserver/utils/CommonUtil.java

@@ -21,6 +21,7 @@ public class CommonUtil {
      * @return: java.lang.Integer
      **/
     public static Integer calcHiPaymtd (String insuplcAdmdvs, String medType, String insurtype, Date setlTime){
+        //// 长沙 4301 株洲4302   湘潭 4303   衡阳4304  郴州4310(郴州先不算) 省本级 439900
         //长沙市、县、浏阳、宁乡、望城、内五区的职工、居民的普通住院、外伤住院结算清单是按DRG传, 4
         //普通住院 2101 外伤住院 22
         List<String> medTypes = Arrays.asList("2101", "22");
@@ -34,7 +35,7 @@ public class CommonUtil {
             if (medType.equals("2102")) {
                 return  2;
             }
-            if(insuplcAdmdvs.startsWith("430") && insurtypes.contains(insurtype) && medTypes.contains(medType)){
+            if(matchInsuplcAdmdvs(insuplcAdmdvs) && insurtypes.contains(insurtype) && medTypes.contains(medType)){
                 return 4;
             }
         }catch (Exception e){
@@ -43,4 +44,19 @@ public class CommonUtil {
         // 其他都是按项目 1
         return 1;
     }
+
+    private static boolean matchInsuplcAdmdvs(String insuplcAdmdvs){
+        //省本级
+        if("439900".equals(insuplcAdmdvs)){
+            return true;
+        }
+        //长沙 4301 株洲4302   湘潭 4303   衡阳4304
+        String[] drgCityCode =  {"4301","4302","4303","4304"};
+        for(String code:drgCityCode){
+            if(insuplcAdmdvs.startsWith(code)){
+                return true;
+            }
+        }
+        return false;
+    }
 }