蔡德晨 5 лет назад
Родитель
Сommit
ae28d660e5

+ 1 - 1
src/main/java/com/jeeplus/modules/sg/overheadline/service/OverheadLineService.java

@@ -478,7 +478,7 @@ public class OverheadLineService {
             double zjgcJzTotal = ExcelUtil.getDouble(jzhz,BashInfo.QT_HJ,0,3);//建筑直接工程费合计
             double zjgcAzTotal = ExcelUtil.getDouble(azhz,BashInfo.QT_HJ,0,3);//安装直接工程费合计
             double[] aqwmJzFees = ExcelUtil.getDoubleArray(csqd,BashInfo.CS_AQWM,1, new int[]{3, 4});  //建筑安全文明施工费
-            double[] aqwmAzFees = BashInfo.getAqwfAzFee(csqd);  //建筑安全文明施工费
+            double[] aqwmAzFees = BashInfo.getAqwfAzFee(csqd);  //安装安全文明施工费
             double zgJz = zjgcJzTotal-(aqwmJzFees[1]/(aqwmJzFees[0]/100));
             double zgAz = zjgcAzTotal-(aqwmAzFees[1]/(aqwmAzFees[0]/100));
             double jxslJz = new BigDecimal(zgJz/(fbrJzFee-zgJz)).setScale(2, BigDecimal.ROUND_HALF_UP).doubleValue(); //建筑进项税率

+ 37 - 1
src/main/java/com/jeeplus/modules/sg/overheadline/util/BashInfo.java

@@ -68,6 +68,9 @@ public class BashInfo {
     public static final String CS_JZ = "建筑措施项目";
     public static final String CS_AZ = "安装措施项目";
     public static final String GF_AZ = "安装规费项目";
+    public static final String FBR_JZ = "建筑";
+    public static final String FBR_AZ = "安装";
+
 
 
     public static final String DLJZ = "电缆建筑";
@@ -319,6 +322,34 @@ public class BashInfo {
         return  rate;
     }
 
+
+    /**
+     * 获取发包人建筑费
+     * @param importExcel
+     * @return
+     */
+    public static double getFbrJzFee(ImportExcel importExcel){
+        int lastRow = importExcel.getLastDataRowNum();
+        double d = 0.00;
+        for(int i=0;i<lastRow;i++){
+            String type = importExcel.getValue(i+1,1);
+            if(!type.contains(FBR_JZ)){
+                return d;
+            }
+        }
+        for(int i=0;i<lastRow;i++){
+            String type = importExcel.getValue(i+1,0);
+            if(type.equals("")){
+                continue;
+            }
+            if(type.equals(QT_XJ)){
+                d = importExcel.getDouble(i+1,6);
+                break;
+            }
+        }
+        return d;
+    }
+
     /**
      * 获取发包人安装费
      * @param importExcel
@@ -328,6 +359,12 @@ public class BashInfo {
         int lastRow = importExcel.getLastDataRowNum();
         double d = 0.00;
         for(int i=0;i<lastRow;i++){
+            String type = importExcel.getValue(i+1,1);
+            if(!type.contains(FBR_AZ)){
+                return d;
+            }
+        }
+        for(int i=0;i<lastRow;i++){
             String type = importExcel.getValue(i+1,0);
             if(type.equals("")){
                 continue;
@@ -357,7 +394,6 @@ public class BashInfo {
         double[] r = new double[2];
         r[0] = d;
         r[1] = e;
-
         return r;
     }