Browse Source

20190805提交

xs 5 years ago
parent
commit
c08056b22e

+ 9 - 36
src/main/java/com/jeeplus/modules/sg/overheadline/service/SettlementService.java

@@ -49,17 +49,14 @@ 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 = ExcelUtil.getDouble(built,BashInfo.QT_HJ,0,2);//获取架空线路工程费用汇总表 分部分项 合计
-//        Double builtTotal = getBuiltStilts(built);
+        double builtTotal = ExcelUtil.getDouble(built,BashInfo.QT_HJ,0,2);//获取架空线路工程费用汇总表 分部分项 合计
 
-        Double wordtotal =  ExcelUtil.getDouble(wordFirst,BashInfo.QT_HJ,0,4);//获取措施费清单计价表
-//        Double wordtotal = getWording(wordFirst);
+        double wordtotal =  ExcelUtil.getDouble(wordFirst,BashInfo.QT_HJ,0,4);//获取措施费清单计价表
 
-        Double otherTotal =  ExcelUtil.getDouble(otherProject,BashInfo.QT_HJ,0,2);//获取其他项目费合计
-//        Double otherTotal = getOtherProject(otherProject);
-        Double[] divisiontotal = getDivisionOf(division);
-        Double feescount =  ExcelUtil.getDouble(feesProject,BashInfo.QT_HJ,0,4);//获取规费合计
-//        Double feescount  = getFeesTotal(feesProject);
+        double otherTotal =  ExcelUtil.getDouble(otherProject,BashInfo.QT_HJ,0,2);//获取其他项目费合计
+        int[] comlumn2 = {12,14,15};
+        double[] divisiontotal=ExcelUtil.getDoubleArray(division,BashInfo.PROJECTNAME,2,comlumn2);//获取分工清单
+        double feescount =  ExcelUtil.getDouble(feesProject,BashInfo.QT_HJ,0,4);//获取规费合计
         return getTotality(builtMap,builtTotal,divisiontotal,wordtotal,otherTotal,feescount,id);
     }
     /*
@@ -67,9 +64,9 @@ public class SettlementService {
      */
     public Map<String,Object[]> getCompletionWorks(ImportExcel importExcel){
         Map<String,Object[]> map  = new LinkedHashMap<String, Object[]>();
-        Integer lastDataRowNum =  importExcel.getLastDataRowNum();
+        int lastDataRowNum =  importExcel.getLastDataRowNum();
         String key="";
-        Double val=0.0;
+        double val=0.0;
         String text = "";
         Object[] objects;
         for (int i = 2; i < lastDataRowNum; i++) {
@@ -160,33 +157,9 @@ public class SettlementService {
         return  map;
     }
     /*
-      获取分工清单
-     */
-    public Double[] getDivisionOf(ImportExcel importExcel){
-        Double count = 0.0;
-        Double fpermoney =  0.0;
-        Double cpermoney = 0.0;
-        String type="";
-        Integer lastDataRowNum = importExcel.getLastDataRowNum();
-        for (int i = 0; i < lastDataRowNum; i++) {
-            type = importExcel.getValue(i+1,2);
-            if (type.equals(BashInfo.PROJECTNAME)) {
-                count = importExcel.getDouble(i + 1, 12);
-                cpermoney = importExcel.getDouble(i + 1, 14);
-                fpermoney = importExcel.getDouble(i + 1, 15);
-                break;
-            }
-        }
-        Double[] val = new Double[3];
-        val[0] = count;
-        val[1] = cpermoney;
-        val[2] = fpermoney;
-        return  val;
-    }
-    /*
       结算汇总
      */
-    public List<Settlement> getTotality(Map<String,Object[]> builtMap,Double builtTotal,Double[] divisiontotal,Double wordtotal,Double otherTotal,Double feescount,String id){
+    public List<Settlement> getTotality(Map<String,Object[]> builtMap,double builtTotal,double[] divisiontotal,double wordtotal,double otherTotal,double feescount,String id){
         List<Settlement> list = new ArrayList<Settlement>();
         String key="";
         double count=0.0;

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

@@ -89,9 +89,6 @@ 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);