yaozhixue 1 éve
szülő
commit
3a17eb6512

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

@@ -173,4 +173,7 @@ public interface PublicService {
     void setQitaKjmm(ItfTblAzWgmxQitaUpload mxup);
     Integer setfjType(Integer type,OrderInstallDetail detailone);
     String getFaOrderSmsfsma(String phone);
+    void setJyktFjType(ItfTblAzWgmxJyktFjUpload fj,OrderInstallDetail detailone);
+    void setSyktFjType(ItfTblAzWgmxSyktFjUpload fj,OrderInstallDetail detailone);
+    void setQitaFjType(ItfTblAzWgmxQitaFjUpload fj,OrderInstallDetail detailone);
 }

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

@@ -673,7 +673,7 @@ public class OrderBaseInstallCjOrWgServiceImpl implements orderBaseInstallCjOrWg
             ItfTblAzWgmxJyktFjUpload jyktfj = fileOrderDetailMapper.getFileUpload(request);
             if (jyktfj !=null){
                 // 修改类型对应关系
-                jyktfj.setType(publicService.setfjType(jyktfj.getType(),detailone));
+                publicService.setJyktFjType(jyktfj,detailone);
                 itfTblAzWgmxJyktFjUploadService.save(jyktfj);
             }
         } else if (mainName.equals("商用空调")){
@@ -689,7 +689,7 @@ public class OrderBaseInstallCjOrWgServiceImpl implements orderBaseInstallCjOrWg
             ItfTblAzWgmxQitaFjUpload otherfj = fileOrderDetailMapper.getOtherFileUpload(request);
             if (otherfj != null){
                 // 修改类型对应关系
-                otherfj.setType(publicService.setfjType(otherfj.getType(),detailone));
+                publicService.setQitaFjType(otherfj,detailone);
                 itfTblAzWgmxQitaFjUploadService.save(otherfj);
             }
         }
@@ -1701,7 +1701,7 @@ public class OrderBaseInstallCjOrWgServiceImpl implements orderBaseInstallCjOrWg
             ItfTblAzWgmxJyktFjUpload jyktfj = fileOrderDetailMapper.getFileUploadCJ(request);
             if (jyktfj !=null){
                 // 修改类型对应关系
-                jyktfj.setType(publicService.setfjType(jyktfj.getType(),detailone));
+                publicService.setJyktFjType(jyktfj,detailone);
                 if (!itfTblAzWgmxJyktFjUploadService.save(jyktfj)){
                     return Boolean.FALSE;
                 }
@@ -1729,7 +1729,7 @@ public class OrderBaseInstallCjOrWgServiceImpl implements orderBaseInstallCjOrWg
             ItfTblAzWgmxQitaFjUpload otherfj = fileOrderDetailMapper.getOtherFileUploadCj(request);
             if (otherfj != null){
                 // 修改类型对应关系
-                otherfj.setType(publicService.setfjType(otherfj.getType(),detailone));
+                publicService.setQitaFjType(otherfj,detailone);
                 if (!itfTblAzWgmxQitaFjUploadService.save(otherfj)){
                     return Boolean.FALSE;
                 }

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

@@ -30,6 +30,7 @@ import org.springframework.stereotype.Service;
 import javax.annotation.Resource;
 import java.io.File;
 import java.io.IOException;
+import java.math.BigDecimal;
 import java.text.ParseException;
 import java.text.SimpleDateFormat;
 import java.util.*;
@@ -1959,6 +1960,239 @@ public class PublicServiceImpl implements PublicService {
     }
 
     @Override
+    public void setSyktFjType(ItfTblAzWgmxSyktFjUpload fj,OrderInstallDetail detailone){
+        Integer type = fj.getType();
+        Integer result = type;
+        switch (type){
+            case 1:
+            case 37:
+                result = 0;
+                break;
+            case 3:
+            case 38:
+            case 41:
+                result = 1;
+                break;
+            case 13:
+            case 14:
+            case 15:
+            case 4:
+            case 6:
+            case 35:
+            case 39:
+                result = 4;
+                break;
+            case 5:
+            case 7:
+            case 16:
+            case 21:
+            case 33:
+            case 34:
+            case 40:
+            case 9:
+            case 10:
+            case 11:
+            case 12:
+            case 43:
+            case 31:
+                result = 5;
+                break;
+            case 2:
+                result = 7;
+                break;
+            case 44:
+                result = 8;
+                break;
+            case 8:
+            case 36:
+            case 17:
+            case 19:
+            case 20:
+                result = 6;
+                break;
+            case 18:
+            case 42:
+                result = 12;
+                break;
+            default:
+                result = 4;
+                break;
+        }
+        // 类型:ALL=一体机,INSIDE=内机,OUT=外机,INSIDE_OUT=一内一外
+        if (type == 42 || type == 18){
+            if (detailone.getType().equals("INSIDE") || detailone.getType().equals("INSIDE_OUT")){
+                result = 4;
+            } else if (detailone.getType().equals("OUT") || detailone.getType().equals("ALL")){
+                result = 5;
+            }
+        }
+
+        fj.setType(result);
+        if (result == 5 && (fj.getFjname().trim().equals("抽真空图"))){
+            fj.setFjindex(BigDecimal.ZERO);
+        }
+    }
+
+    // 同家用
+    @Override
+    public void setQitaFjType(ItfTblAzWgmxQitaFjUpload fj,OrderInstallDetail detailone){
+        Integer type = fj.getType();
+        Integer result = type;
+        switch (type){
+            case 1:
+            case 37:
+                result = 0;
+                break;
+            case 3:
+            case 38:
+            case 41:
+                result = 1;
+                break;
+            case 13:
+            case 14:
+            case 15:
+            case 4:
+            case 6:
+            case 35:
+            case 39:
+                result = 4;
+                break;
+            case 5:
+            case 7:
+            case 16:
+            case 21:
+            case 33:
+            case 34:
+            case 40:
+            case 9:
+            case 10:
+            case 11:
+            case 12:
+            case 43:
+            case 31:
+                result = 5;
+                break;
+            case 2:
+                result = 7;
+                break;
+            case 44:
+                result = 8;
+                break;
+            case 8:
+            case 36:
+            case 17:
+            case 19:
+            case 20:
+                result = 6;
+                break;
+            case 18:
+            case 42:
+                result = 12;
+                break;
+            default:
+                result = 4;
+                break;
+        }
+        // 类型:ALL=一体机,INSIDE=内机,OUT=外机,INSIDE_OUT=一内一外
+        if (type == 42 || type == 18){
+            if (detailone.getType().equals("INSIDE") || detailone.getType().equals("INSIDE_OUT")){
+                result = 4;
+            } else if (detailone.getType().equals("OUT") || detailone.getType().equals("ALL")){
+                result = 5;
+            }
+        }
+
+        fj.setType(result);
+        if (result == 5 && (fj.getFjname().trim().equals("抽真空图"))){
+            fj.setFjindex(BigDecimal.ZERO);
+        }
+    }
+
+
+    /* 6无,用于存放不需要上传的
+    0:内机条码图片
+    1:外机条码图片
+    4:内机其他图片(其他图片为多张,每张图片按fjindex进行排序,fjindex从0开始)
+            5:外机其他图片(其他图片为多张,每张图片按fjindex进行排序,fjindex从0开始)
+    type=5且fjindex=0的图片为抽真空图片
+    7:上墙图片
+    8:特殊安装确认书(需要签名)
+    */
+    @Override
+    public void setJyktFjType(ItfTblAzWgmxJyktFjUpload fj,OrderInstallDetail detailone){
+        Integer type = fj.getType();
+        Integer result = type;
+        switch (type){
+            case 1:
+            case 37:
+                result = 0;
+                break;
+            case 3:
+            case 38:
+            case 41:
+                result = 1;
+                break;
+            case 13:
+            case 14:
+            case 15:
+            case 4:
+            case 6:
+            case 35:
+            case 39:
+                result = 4;
+                break;
+            case 5:
+            case 7:
+            case 16:
+            case 21:
+            case 33:
+            case 34:
+            case 40:
+            case 9:
+            case 10:
+            case 11:
+            case 12:
+            case 43:
+            case 31:
+                result = 5;
+                break;
+            case 2:
+                result = 7;
+                break;
+            case 44:
+                result = 8;
+                break;
+            case 8:
+            case 36:
+            case 17:
+            case 19:
+            case 20:
+                result = 6;
+                break;
+            case 18:
+            case 42:
+                result = 12;
+                break;
+            default:
+                result = 4;
+                break;
+        }
+        // 类型:ALL=一体机,INSIDE=内机,OUT=外机,INSIDE_OUT=一内一外
+        if (type == 42 || type == 18){
+            if (detailone.getType().equals("INSIDE") || detailone.getType().equals("INSIDE_OUT")){
+                result = 4;
+            } else if (detailone.getType().equals("OUT") || detailone.getType().equals("ALL")){
+                result = 5;
+            }
+        }
+
+        fj.setType(result);
+        if (result == 5 && (fj.getFjname().trim().equals("抽真空图"))){
+            fj.setFjindex(BigDecimal.ZERO);
+        }
+    }
+
+    @Override
     public Integer setfjType(Integer type,OrderInstallDetail detailone){
         Integer result = type;
         switch (type){

BIN
syncdata/202310/8aaa8b9c79f5e2b2017a1a47e9347081