yaozhixue 1 年之前
父节点
当前提交
19ac3ed9d9

+ 1 - 0
src/main/java/com/zfire/jiasm/syncdata/service/PublicService.java

@@ -171,4 +171,5 @@ public interface PublicService {
     void setKjmm(ItfTblAzWgmxJyktUpload mxup);
     void setSyktKjmm(ItfTblAzWgmxSyktUpload mxup);
     void setQitaKjmm(ItfTblAzWgmxQitaUpload mxup);
+    Integer setfjType(Integer type);
 }

+ 6 - 70
src/main/java/com/zfire/jiasm/syncdata/service/impl/OrderBaseInstallCjOrWgServiceImpl.java

@@ -671,7 +671,7 @@ public class OrderBaseInstallCjOrWgServiceImpl implements orderBaseInstallCjOrWg
             ItfTblAzWgmxJyktFjUpload jyktfj = fileOrderDetailMapper.getFileUpload(request);
             if (jyktfj !=null){
                 // 修改类型对应关系
-                jyktfj.setType(setfjType(jyktfj.getType()));
+                jyktfj.setType(publicService.setfjType(jyktfj.getType()));
                 itfTblAzWgmxJyktFjUploadService.save(jyktfj);
             }
         } else if (mainName.equals("商用空调")){
@@ -679,7 +679,7 @@ public class OrderBaseInstallCjOrWgServiceImpl implements orderBaseInstallCjOrWg
             ItfTblAzWgmxSyktFjUpload syktfj = fileOrderDetailMapper.getSyFileUpload(request);
             if (syktfj !=null){
                 // 修改类型对应关系
-                syktfj.setType(setfjType(syktfj.getType()));
+                syktfj.setType(publicService.setfjType(syktfj.getType()));
                 itfTblAzWgmxSyktFjUploadService.save(syktfj);
             }
         } else {
@@ -687,76 +687,12 @@ public class OrderBaseInstallCjOrWgServiceImpl implements orderBaseInstallCjOrWg
             ItfTblAzWgmxQitaFjUpload otherfj = fileOrderDetailMapper.getOtherFileUpload(request);
             if (otherfj != null){
                 // 修改类型对应关系
-                otherfj.setType(setfjType(otherfj.getType()));
+                otherfj.setType(publicService.setfjType(otherfj.getType()));
                 itfTblAzWgmxQitaFjUploadService.save(otherfj);
             }
         }
     }
 
-    public Integer setfjType(Integer type) {
-        Integer result = type;
-        switch (type){
-            case 1:
-                result = 0;
-                break;
-            case 2:
-                result = 7;
-                break;
-            case 3:
-                result = 1;
-                break;
-            case 6:
-                result = 4;
-                break;
-            case 7:
-                result = 5;
-                break;
-            case 9:
-                result = 5;
-                break;
-            case 11:
-                result = 5;
-                break;
-            case 12:
-                result = 5;
-                break;
-            case 13:
-                result = 4;
-                break;
-            case 15:
-                result = 4;
-                break;
-            case 16:
-                result = 5;
-                break;
-            case 39:
-                result = 4;
-                break;
-            case 40:
-                result = 5;
-                break;
-            case 43:
-                result = 5;
-                break;
-            case 44:
-                result = 8;
-                break;
-            case 33:
-                result = 12;
-                break;
-            case 34:
-                result = 12;
-                break;
-            case 35:
-                result = 12;
-                break;
-            default:
-                result = 4;
-                break;
-        }
-        return result;
-    }
-
     public Boolean getFeeUpload(OrderBase orderBase) {
         // 根据辅材订单支付表存在支付时生成安装费用数据
         List<OrderPayOutlayItem> pitems = orderPayOutlayItemService.lambdaQuery()
@@ -1763,7 +1699,7 @@ public class OrderBaseInstallCjOrWgServiceImpl implements orderBaseInstallCjOrWg
             ItfTblAzWgmxJyktFjUpload jyktfj = fileOrderDetailMapper.getFileUploadCJ(request);
             if (jyktfj !=null){
                 // 修改类型对应关系
-                jyktfj.setType(setfjType(jyktfj.getType()));
+                jyktfj.setType(publicService.setfjType(jyktfj.getType()));
                 if (!itfTblAzWgmxJyktFjUploadService.save(jyktfj)){
                     return Boolean.FALSE;
                 }
@@ -1777,7 +1713,7 @@ public class OrderBaseInstallCjOrWgServiceImpl implements orderBaseInstallCjOrWg
             ItfTblAzWgmxSyktFjUpload syktfj = fileOrderDetailMapper.getSyFileUploadCj(request);
             if (syktfj !=null){
                 // 修改类型对应关系
-                syktfj.setType(setfjType(syktfj.getType()));
+                syktfj.setType(publicService.setfjType(syktfj.getType()));
                 if (!itfTblAzWgmxSyktFjUploadService.save(syktfj)){
                     return Boolean.FALSE;
                 }
@@ -1791,7 +1727,7 @@ public class OrderBaseInstallCjOrWgServiceImpl implements orderBaseInstallCjOrWg
             ItfTblAzWgmxQitaFjUpload otherfj = fileOrderDetailMapper.getOtherFileUploadCj(request);
             if (otherfj != null){
                 // 修改类型对应关系
-                otherfj.setType(setfjType(otherfj.getType()));
+                otherfj.setType(publicService.setfjType(otherfj.getType()));
                 if (!itfTblAzWgmxQitaFjUploadService.save(otherfj)){
                     return Boolean.FALSE;
                 }

+ 67 - 0
src/main/java/com/zfire/jiasm/syncdata/service/impl/PublicServiceImpl.java

@@ -1956,6 +1956,73 @@ public class PublicServiceImpl implements PublicService {
         }
     }
 
+    @Override
+    public Integer setfjType(Integer type){
+        Integer result = type;
+        switch (type){
+            case 1:
+            case 37:
+                result = 0;
+                break;
+            case 3:
+            case 38:
+            case 41:
+                result = 1;
+                break;
+            case 9:
+            case 10:
+            case 11:
+            case 12:
+            case 43:
+                result = 2;
+                break;
+            case 13:
+            case 14:
+            case 15:
+            case 16:
+            case 31:
+                result = 3;
+                break;
+            case 4:
+            case 6:
+            case 35:
+            case 39:
+                result = 4;
+                break;
+            case 5:
+            case 7:
+            case 21:
+            case 33:
+            case 34:
+            case 40:
+                result = 5;
+                break;
+            case 2:
+                result = 7;
+                break;
+            case 44:
+                result = 8;
+                break;
+            case 8:
+                result = 9;
+                break;
+            case 36:
+                result = 10;
+                break;
+            case 19:
+                result = 11;
+                break;
+            case 18:
+            case 42:
+                result = 12;
+                break;
+            default:
+                result = 4;
+                break;
+        }
+        return result;
+    }
+
     private String getAppraiseStatusr(String pjly) {
         String appraiseStatus = "";
         SatisfactionList sfs = getAppraiseStatus(pjly);

+ 15 - 0
src/main/java/com/zfire/jiasm/syncdata/test.java

@@ -205,6 +205,21 @@ List<String> result = new ArrayList<>();
         System.out.println(po);
         System.out.println(pt);
 
+
+        Integer t = 1;
+        switch (t) {
+            case 1:
+            case 37:
+                t = 0;
+                break;
+            default:
+                t = 1;
+                break;
+        }
+
+        System.out.println(t);
+
+
     }