蔡德晨 5 anni fa
parent
commit
9375159d93

+ 2 - 1
src/main/java/com/jeeplus/common/utils/excel/ImportExcel.java

@@ -306,7 +306,8 @@ public class ImportExcel {
 				} else if (cell.getCellType() == Cell.CELL_TYPE_STRING) {
 					val = cell.getStringCellValue();
 				} else if (cell.getCellType() == Cell.CELL_TYPE_FORMULA) {
-					val = cell.getCellFormula();
+//					val = cell.getCellFormula();
+					val = cell.getNumericCellValue();
 				} else if (cell.getCellType() == Cell.CELL_TYPE_BOOLEAN) {
 					val = cell.getBooleanCellValue();
 				} else if (cell.getCellType() == Cell.CELL_TYPE_ERROR) {

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

@@ -919,7 +919,11 @@ public List<JkxlDetailFee> findList(String id,String type){
         double word2total=0.0;
         double csFees2 = ExcelUtil.getDouble(total,BashInfo.CSXM2,1,2);//措施费二
         double otherDlTotal =  ExcelUtil.getDouble(qt,BashInfo.QT_HJ,0,2);//获取其他项目费合计
-        double feesDlCount =  ExcelUtil.getDouble(gf,BashInfo.QT_HJ,0,4);//获取规费合计
+        //规费
+        double jzGf = BashInfo.getJzGf(gf);
+        double azGf = BashInfo.getAzGf(gf);
+//        double feesDlCount =  ExcelUtil.getDouble(gf,BashInfo.QT_HJ,0,4);//获取规费合计
+        double feesDlCount =  jzGf+azGf;//获取规费合计
         int[] comlumn2 = {12,15};//定义所要数组
         List<JkxlAdjustFee> wsbFees = BashInfo.getWsbFee(total);
         double wsbfee = 0.00;
@@ -945,8 +949,6 @@ public List<JkxlDetailFee> findList(String id,String type){
         //安装措施费
         double azCsFee = BashInfo.getAzCsfee(csqd);
         double[] csJzFee = BashInfo.getJzCsfee(csqd); //建筑措施费
-        //规费
-        double azGf = BashInfo.getAzGf(gf);
         //获取结算表中基础数据
         double jsCs = ExcelUtil.getDouble(total,BashInfo.JS_CSXM,1,2);
         double jsGf = ExcelUtil.getDouble(total,BashInfo.JS_GF,1,2);

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

@@ -81,10 +81,13 @@ public class BashInfo {
     public static final String TBJG = "竣工结算价合计";
     public static final String TBJG1 = "投标报价";
     public static final String TBJG2 = "最终结算价";
+    public static final String TBJG3 = "最高投标限价";
+    public static final String TBJG4 = "最终工程造价";
     public static final String CE = "差额";
     public static final String CS_JZ = "建筑措施项目";
     public static final String CS_AZ = "安装措施项目";
     public static final String GF_AZ = "安装规费项目";
+    public static final String GF_JZ = "建筑规费项目";
     public static final String FBR_JZ = "建筑";
     public static final String FBR_AZ = "安装";
 
@@ -433,6 +436,35 @@ public class BashInfo {
     }
 
     /**
+     * 电缆建筑规费
+     * @param importExcel
+     * @return
+     */
+    public static double getJzGf(ImportExcel importExcel){
+        int lastRow = importExcel.getLastDataRowNum();
+        double d = 0.00;
+        List list = new ArrayList();
+        for(int i=0;i<lastRow;i++){
+            String type = importExcel.getValue(i+1,1);
+            list.add(type);
+        }
+        if(!list.contains(GF_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,4);
+                break;
+            }
+        }
+        return d;
+    }
+
+    /**
      *电缆安装获取规费
      */
     public static double getAzGf(ImportExcel importExcel) {
@@ -596,7 +628,7 @@ public class BashInfo {
         double gcjs = 0.00;
         for(int i=0;i<lastRow;i++){
             String type = importExcel.getValue(i+1,1);
-            if(type.equals(TBJG) || type.equals(GCJS) || type.equals(TBJG1) || type.equals(TBJG2)){
+            if(type.equals(TBJG) || type.equals(GCJS) || type.equals(TBJG1) || type.equals(TBJG2) || type.equals(TBJG3)|| type.equals(TBJG4)){
                 gcjs = importExcel.getDouble(i+1,2);
             }
         }

+ 6 - 3
src/main/java/com/jeeplus/modules/sg/substation/service/SubstationService.java

@@ -119,12 +119,15 @@ public class SubstationService {
         double word1total =  ExcelUtil.getDouble(csqd1,BashInfo.QT_HJ,0,4);//获取措施费清单计价表一
 //        double word2total=ExcelUtil.getDouble(csqd2,SubstationInfo.CS_JZ,0,10);//获取措施费二表措施项目合计金额
         double otherBdzTotal =  ExcelUtil.getDouble(qt,BashInfo.QT_HJ,0,2);//获取其他项目费合计
-        double feesBdzCount =  ExcelUtil.getDouble(gf,BashInfo.QT_HJ,0,4);//获取规费合计
+       //规费
+        double jzGf = BashInfo.getJzGf(gf);
+        double azGf = BashInfo.getAzGf(gf);
+//        double feesBdzCount =  ExcelUtil.getDouble(gf,BashInfo.QT_HJ,0,4);//获取规费合计
+        double feesBdzCount =  jzGf+azGf;//获取规费合计
 
        //安装措施费
        double azCsFee = BashInfo.getAzCsfee(csqd1);
-       //安装规费
-       double azGf = BashInfo.getAzGf(gf);
+
        //获取结算表中基础数据
        double jsCs = ExcelUtil.getDouble(total,BashInfo.JS_CSXM,1,2);
        double jsGf = ExcelUtil.getDouble(total,BashInfo.JS_GF,1,2);