소스 검색

20190805提交

xs 5 년 전
부모
커밋
b0d9a94f5c

+ 11 - 68
src/main/java/com/jeeplus/modules/sg/overheadline/service/SettlementService.java

@@ -1,6 +1,7 @@
 package com.jeeplus.modules.sg.overheadline.service;
 
 import com.jeeplus.common.utils.excel.ImportExcel;
+import com.jeeplus.common.utils.sg.ExcelUtil;
 import com.jeeplus.modules.sg.overheadline.entity.Settlement;
 import com.jeeplus.modules.sg.overheadline.mapper.SettlementMapper;
 import com.jeeplus.modules.sg.overheadline.util.BashInfo;
@@ -48,11 +49,17 @@ public class SettlementService {
         ImportExcel otherProject = new ImportExcel(file,1,BashInfo.SHEET_QTFY);
         ImportExcel feesProject  = new ImportExcel(file,1,BashInfo.SHEET_GFQD);
         Map<String,Object[]> builtMap = getCompletionWorks(completion);
-        Double builtTotal = getBuiltStilts(built);
+        Double builtTotal = ExcelUtil.getDouble(built,BashInfo.QT_HJ,0,2);//获取架空线路工程费用汇总表 分部分项 合计
+//        Double builtTotal = getBuiltStilts(built);
+
+        Double wordtotal =  ExcelUtil.getDouble(wordFirst,BashInfo.QT_HJ,0,4);//获取措施费清单计价表
+//        Double wordtotal = getWording(wordFirst);
+
+        Double otherTotal =  ExcelUtil.getDouble(otherProject,BashInfo.QT_HJ,0,2);//获取其他项目费合计
+//        Double otherTotal = getOtherProject(otherProject);
         Double[] divisiontotal = getDivisionOf(division);
-        Double wordtotal = getWording(wordFirst);
-        Double otherTotal = getOtherProject(otherProject);
-        Double feescount  = getFeesTotal(feesProject);
+        Double feescount =  ExcelUtil.getDouble(feesProject,BashInfo.QT_HJ,0,4);//获取规费合计
+//        Double feescount  = getFeesTotal(feesProject);
         return getTotality(builtMap,builtTotal,divisiontotal,wordtotal,otherTotal,feescount,id);
     }
     /*
@@ -153,70 +160,6 @@ public class SettlementService {
         return  map;
     }
     /*
-      获取架空合计
-     */
-    public Double getBuiltStilts(ImportExcel importExcel){
-        Double value = 0.0;
-        String type="";
-        Integer lastDataRowNum = importExcel.getLastDataRowNum();
-        for (int i = 2; i < lastDataRowNum ; i++) {
-            type = importExcel.getValue(i+1,0);
-            if (type.equals(BashInfo.QT_HJ)){
-                value = importExcel.getDouble(i+1,2);
-                break;
-            }
-        }
-        return value;
-    }
-    /*
-      获取措施费合计
-     */
-    public Double getWording(ImportExcel importExcel){
-        Double value = 0.0;
-        String type = "";
-        Integer lastDataRowNum = importExcel.getLastDataRowNum();
-        for (int i = 2; i <lastDataRowNum ; i++) {
-            type = importExcel.getValue(i+1,0);
-            if (type.equals(BashInfo.QT_HJ)){
-                value = importExcel.getDouble(i+1,4);
-                break;
-            }
-        }
-        return value;
-    }
-    /*
-      获取其他项目费
-     */
-    public Double getOtherProject(ImportExcel importExcel){
-        Double value = 0.0;
-        String type= "";
-        Integer lastDataRowNum = importExcel.getLastDataRowNum();
-        for (int i = 0; i <lastDataRowNum ; i++) {
-            type = importExcel.getValue(i+1,0);
-            if (type.equals(BashInfo.QT_HJ)){
-                value = importExcel.getDouble(i+1,2);
-                break;
-            }
-        }
-        return  value;
-    }
-    /*
-      获取规费合计
-     */
-    public Double getFeesTotal(ImportExcel importExcel){
-        Double value = 0.0;
-        String type = "";
-        Integer lastDataRowNum = importExcel.getLastDataRowNum();
-        for (int i = 2; i < lastDataRowNum; i++) {
-            type = importExcel.getValue(i+1,0);
-            if (type.equals(BashInfo.QT_HJ)){
-                value = importExcel.getDouble(i+1,4);
-                break;
-            }
-        }
-        return value;
-    }
-    /*
       获取分工清单
      */
     public Double[] getDivisionOf(ImportExcel importExcel){

+ 3 - 0
src/main/java/com/jeeplus/modules/sg/overheadline/web/OverheadLineController.java

@@ -89,6 +89,9 @@ public class OverheadLineController extends BaseController {
     List<JkxlAdjustFee> list2 = feeAdjustService.getTzFee(jkxlAdjustFee);
     //数据校验展示
     List<Settlement> list3 = settlementService.selectSettlementService(id);
+//    for (int i = 0; i < list3.size(); i++) {
+//      System.out.println("查找出来的顺序:=============="+list3.get(i));
+//    }
     HashMap map = new HashMap();
     map.put("list1",list1);
     map.put("list",list);

+ 2 - 1
src/main/webapp/webpage/modules/sg/free/wbslist.jsp

@@ -390,7 +390,7 @@
             ]]
             ,data:[
                 <c:if test="${not empty map.list3}">
-                <c:forEach items="${map.list3}" var="data" varStatus="id">
+                <c:forEach items="${map.list3}" var="data" varStatus="index">
                 {
                     "id":"${data.id}",
                     "setname": "${data.entryName}",
@@ -410,6 +410,7 @@
             if(obj.event === 'byz'){
                 layer.open({
                     type: 1,
+                    title:data.entryName,
                     skin: 'layui-layer-rim',
                     area: ['420px', '240px'],
                     content: data.reason