Ver código fonte

Merge remote-tracking branch 'origin/master'

xs 5 anos atrás
pai
commit
dc925b45a8

+ 9 - 0
src/main/java/com/jeeplus/modules/sg/entity/JkxlData.java

@@ -2,6 +2,7 @@ package com.jeeplus.modules.sg.entity;
 
 public class JkxlData {
     private String id;
+    private String wbsCode;
     private Double originalTotalCost;
     private Double originalRgCost;
     private Double originalCbrCost;
@@ -21,6 +22,14 @@ public class JkxlData {
     private Double tax;
     private Double totalFee;
 
+    public String getWbsCode() {
+        return wbsCode;
+    }
+
+    public void setWbsCode(String wbsCode) {
+        this.wbsCode = wbsCode;
+    }
+
     public Double getTotalFee() {
         return totalFee;
     }

+ 33 - 0
src/main/java/com/jeeplus/modules/sg/entity/WbsProject.java

@@ -0,0 +1,33 @@
+package com.jeeplus.modules.sg.entity;
+
+import java.util.Date;
+
+public class WbsProject {
+    private String id;
+    private String name;
+    private Date createDate;
+
+    public String getId() {
+        return id;
+    }
+
+    public void setId(String id) {
+        this.id = id;
+    }
+
+    public String getName() {
+        return name;
+    }
+
+    public void setName(String name) {
+        this.name = name;
+    }
+
+    public Date getCreateDate() {
+        return createDate;
+    }
+
+    public void setCreateDate(Date createDate) {
+        this.createDate = createDate;
+    }
+}

+ 4 - 0
src/main/java/com/jeeplus/modules/sg/mapper/JkxlMapper.java

@@ -1,9 +1,13 @@
 package com.jeeplus.modules.sg.mapper;
 
 import com.jeeplus.core.persistence.annotation.MyBatisMapper;
+import com.jeeplus.modules.sg.entity.JkxlData;
 import com.jeeplus.modules.sg.entity.RuleRatio;
+import com.jeeplus.modules.sg.entity.WbsProject;
 
 @MyBatisMapper
 public interface JkxlMapper {
     RuleRatio getValue(String ratioName);
+    void save(JkxlData jkxlData);
+    void saveProject(WbsProject project);
 }

+ 58 - 1
src/main/java/com/jeeplus/modules/sg/mapper/xml/JkxlMapper.xml

@@ -2,11 +2,68 @@
 <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
 <mapper namespace="com.jeeplus.modules.sg.mapper.JkxlMapper">
 	<select id="getValue" parameterType="String" resultType="com.jeeplus.modules.sg.entity.RuleRatio">
-		select a,value from sg_rule_ratio
+		select a,value from sg_rule_ratio a
 		<where>
 			ratio_name = #{ratioName}
 		</where>
 	</select>
 
+	<select id="getList" parameterType="String" resultType="com.jeeplus.modules.sg.entity.JkxlData">
+
+	</select>
+
+
+	<insert id="save" parameterType="com.jeeplus.modules.sg.entity.JkxlData">
+		insert into sg_wbs_fee
+		(id,
+		 original_total_cost,
+		 original_rg_cost,
+		 original_cbr_cost,
+		 original_fbr_cost,
+		 original_jx_cost,
+		 rg_cost,
+		 cbr_cost,
+		 fbr_cost,
+		 jx_cost,
+		 measures_fee1,
+		 measures_fee12,
+		 other_cost,
+		 fees,
+		 tex,
+		 total_fee
+		) values (
+		 id,
+		 originalTotalCost,
+		 originalRgCost,
+		 originalCbrCost,
+		 originalFbrCost,
+		 originalJxCost,
+		 rgCost,
+		 cbrCost,
+		 fbrCost,
+		 jxCost,
+		 measuresFee1,
+		 measuresFee2,
+		 otherCost,
+		 fees,
+		 tax,
+		 totalFee
+		)
+	</insert>
+
+	<insert id="saveProject" parameterType="com.jeeplus.modules.sg.entity.WbsProject">
+		insert into sg_wbs_project
+		(id,
+		 name,
+		 create_date
+		) values (
+		 id,
+		 name,
+		 createDate
+		)
+	</insert>
+
+
+
 	
 </mapper>

+ 13 - 0
src/main/java/com/jeeplus/modules/sg/service/JkxlService.java

@@ -1,9 +1,12 @@
 package com.jeeplus.modules.sg.service;
 
+import com.jeeplus.modules.sg.entity.JkxlData;
 import com.jeeplus.modules.sg.entity.RuleRatio;
+import com.jeeplus.modules.sg.entity.WbsProject;
 import com.jeeplus.modules.sg.mapper.JkxlMapper;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
+import org.springframework.transaction.annotation.Transactional;
 
 @Service
 public class JkxlService {
@@ -14,4 +17,14 @@ public class JkxlService {
    public RuleRatio getValueByName(String ratioName){
        return jkxlMapper.getValue(ratioName);
    }
+
+   @Transactional
+   public void save(JkxlData jkxlData){
+       jkxlMapper.save(jkxlData);
+   }
+
+    @Transactional
+   public void saveProject(WbsProject wbsProject){
+       jkxlMapper.saveProject(wbsProject);
+   }
 }

+ 19 - 0
src/main/java/com/jeeplus/modules/sg/util/BashInfo.java

@@ -1,10 +1,29 @@
 package com.jeeplus.modules.sg.util;
 
 public class BashInfo {
+    public static final String PROJECTNAME = "架空线路";
+    public static final String JCGC = "1 基础工程";
+    public static final String GTGC = "2 杆塔工程";
+    public static final String JDGC = "3 接地工程";
+    public static final String JXGC = "4 架线工程";
+    public static final String FJAZGC = "5 附件安装工程";
+    public static final String FZGC = "6 辅助工程";
     public static final String RATIO_RGTC = "人工调差系数";
     public static final String RATIO_CLTC = "材料调差系数";
     public static final String RATIO_JXTC = "机械调差系数";
     public static final String RATIO_CCRGTC = "拆除人工调差系数";
     public static final String RATIO_CCCLTC = "拆除材料调差系数";
     public static final String RATIO_CCJXTC = "拆除机械调差系数";
+    public static final String CS_LS = "临时设施费";
+    public static final String CS_AQWM = "安全文明施工费";
+    public static final String GF_WXZY = "危险作业意外伤害保险费";
+    public static final String QT_SGCDZY = "施工场地租用费";
+    public static final String QT_ZBDL = "招标代理费";
+    public static final String QT_HJ = "合计";
+    public static final String BZZSSL = "补增值税税率调整差额";
+    public static final String KJJGCC = "扣减甲供材超供材料费";
+    public static final String[] ids = {"39100000","39200000","39300000","39400000","39500000","39600000"};
+
+
+
 }

+ 97 - 9
src/main/java/com/jeeplus/modules/sg/util/JkxlExcel.java

@@ -10,53 +10,141 @@ import java.util.ArrayList;
 import java.util.List;
 
 public class JkxlExcel {
-    public static List<JkxlData> getData(MultipartFile  file,Double[] rate) throws IOException, InvalidFormatException {
+    public static List<JkxlData> getData(String  file) throws IOException, InvalidFormatException {
         ImportExcel importExcel = new ImportExcel(file,1,3);
         List<JkxlData> list = new ArrayList<>();
         int lastRow = importExcel.getLastDataRowNum();
         int[] row = new int[6];
+        double totalFee = 0.00;
         for(int i=0;i<lastRow;i++){
             String type =  importExcel.getValue(i+1,2);
+            if(type.equals(BashInfo.PROJECTNAME)){
+                totalFee = importExcel.getDouble(i+1,12);
+            }
             if(type.equals("1 基础工程")){
                 row[0] = i+1;
+                continue;
             }
             if(type.equals("2 杆塔工程")){
                 row[1] = i+1;
+                continue;
             }
             if(type.equals("3 接地工程")){
                 row[2] = i+1;
+                continue;
             }
             if(type.equals("4 架线工程")){
                 row[3] = i+1;
+                continue;
             }
             if(type.equals("5 附件安装工程")){
                 row[4] = i+1;
+                continue;
             }
             if(type.equals("6 辅助工程")){
                 row[5] = i+1;
+                break;
             }
         }
         for(int i=0;i<6;i++){
             JkxlData jkxlData = new JkxlData();
             Double originalRgCost = importExcel.getDouble(row[i],13);
-            Double rgCost = originalRgCost/(1+rate[0]);
+//            Double rgCost = originalRgCost/(1+rate[0]);
             Double originalCbrCost = importExcel.getDouble(row[i],14);
-            Double cbrCost = originalCbrCost/(1+rate[1]);
+//            Double cbrCost = originalCbrCost/(1+rate[1]);
             Double originalFbrCost = importExcel.getDouble(row[i],15);
-            Double fbrCost = originalFbrCost/(1+rate[1]);
+//            Double fbrCost = originalFbrCost/(1+0.17);
             Double originalJxrCost = importExcel.getDouble(row[i],17);
-            Double jxCost = originalJxrCost/(1+rate[2]);
+//            Double jxCost = originalJxrCost/(1+rate[2]);
             jkxlData.setOriginalTotalCost(importExcel.getDouble(row[i],12));
             jkxlData.setOriginalRgCost(originalRgCost);
-            jkxlData.setRgCost(rgCost);
+//            jkxlData.setRgCost(rgCost);
             jkxlData.setOriginalCbrCost(originalCbrCost);
-            jkxlData.setCbrCost(cbrCost);
+//            jkxlData.setCbrCost(cbrCost);
             jkxlData.setOriginalFbrCost(originalFbrCost);
-            jkxlData.setFbrCost(fbrCost);
+//            jkxlData.setFbrCost(fbrCost);
             jkxlData.setOriginalJxCost(originalJxrCost);
-            jkxlData.setJxCost(jxCost);
+//            jkxlData.setJxCost(jxCost);
             list.add(jkxlData);
         }
         return list;
     }
+
+
+//    public  static  double get(String file) throws IOException, InvalidFormatException {
+//        ImportExcel importExcel = new ImportExcel(file,1,1);
+//        int lastRow = importExcel.getLastDataRowNum();
+//        double lsRate = 0.00;
+//        double aqRate = 0.00;
+//        double totalRate = 0.00;
+//        for(int i=2;i<lastRow;i++){
+//            String type = importExcel.getValue(i+1,1);
+//            if(type.equals(BashInfo.CS_LS)){
+//                lsRate = importExcel.getDouble(i+1,3);
+//            }
+//            if(type.equals(BashInfo.CS_AQWM)){
+//                aqRate = importExcel.getDouble(i+1,3);
+//            }
+//            totalRate += importExcel.getDouble(i+1,3);
+//        }
+//        double[] rate = new double[2];
+//        rate[0] = (lsRate+aqRate)/100;
+//        rate[1] = (totalRate-lsRate-aqRate)/100;
+//        return  rate;
+//        double totalRate = 0.00;
+//        double wxzyRate = 0.00;
+//        for (int i = 2; i < lastRow; i++) {
+//            String type = importExcel.getValue(i + 1, 1);
+//            if (type.equals(BashInfo.GF_WXZY)) {
+//                wxzyRate = importExcel.getDouble(i + 1, 3);
+//            }
+//            if (!importExcel.getValue(i + 1, 2).equals("")) {
+//                totalRate += importExcel.getDouble(i + 1, 3);
+//            }
+//        }
+//        double[] rate = new double[2];
+//        rate[0] = wxzyRate / 100;
+//        rate[1] = (totalRate - wxzyRate) / 100;
+//        return rate;
+//        double cdFree = 0.00;
+//        double zbFree = 0.00;
+//        double totalFree = 0.00;
+//        for(int i=2;i<lastRow;i++){
+//            String type = importExcel.getValue(i+1,1);
+//            String type1 = importExcel.getValue(i+1,0);
+//            if(type.equals(BashInfo.QT_SGCDZY)){
+//                cdFree = importExcel.getDouble(i+1,2);
+//            }
+//            if(type.equals(BashInfo.QT_ZBDL)){
+//                zbFree = importExcel.getDouble(i+1,2);
+//            }
+////      totalFree += importExcel.getDouble(i+1,2);
+//            if(type1.equals(BashInfo.QT_HJ)){
+//                totalFree = importExcel.getDouble(i+1,2);
+//            }
+//        }
+//        double[] rate = new double[3];
+//        rate[0] = cdFree;
+//        rate[1] = zbFree;
+//        rate[2] = totalFree-cdFree-zbFree;
+//        return  rate;
+//        double bzFree = 0.00;
+//        double kcFree = 0.00;
+//        for(int i=0;i<lastRow;i++){
+//            String type = importExcel.getValue(i+1,1);
+//            if(type.equals(BashInfo.BZZSSL)){
+//                bzFree = importExcel.getDouble(i+1,2);
+//                continue;
+//            }
+//            if(type.equals(BashInfo.KJJGCC)){
+//                kcFree = importExcel.getDouble(i+1,2);
+//                break;
+//            }
+//        }
+//
+//        return  bzFree+kcFree;
+//    }
+
+
+
 }

+ 9 - 1
src/main/java/com/jeeplus/modules/sg/util/Text.java

@@ -2,6 +2,7 @@ package com.jeeplus.modules.sg.util;
 
 import com.jeeplus.common.utils.excel.ImportExcel;
 import com.jeeplus.modules.sg.entity.JkxlData;
+import com.jeeplus.modules.sg.web.JkxlController;
 import org.apache.poi.openxml4j.exceptions.InvalidFormatException;
 import org.hibernate.validator.constraints.EAN;
 import org.junit.Test;
@@ -13,6 +14,13 @@ public class Text {
  @Test
   public void text() throws IOException, InvalidFormatException {
       String file = "target/1.xls";
+      double[] d = {0.17,0.0332,0.0322};
 //      List<JkxlData> list = JkxlExcel.getData(file);
-  }
+//     double doubles = JkxlExcel.get(file);
+
+//     System.out.println(doubles);
+     JkxlController jkxlController = new JkxlController();
+//     List<JkxlData> data = jkxlController.getData(file, d);
+//     System.out.println(data);
+ }
 }

+ 246 - 4
src/main/java/com/jeeplus/modules/sg/web/JkxlController.java

@@ -3,6 +3,7 @@ package com.jeeplus.modules.sg.web;
 import com.jeeplus.common.utils.excel.ImportExcel;
 import com.jeeplus.core.web.BaseController;
 import com.jeeplus.modules.sg.entity.JkxlData;
+import com.jeeplus.modules.sg.entity.WbsProject;
 import com.jeeplus.modules.sg.service.JkxlService;
 import com.jeeplus.modules.sg.util.BashInfo;
 import org.apache.poi.openxml4j.exceptions.InvalidFormatException;
@@ -15,7 +16,11 @@ import org.springframework.web.servlet.mvc.support.RedirectAttributes;
 
 import javax.servlet.http.HttpServletRequest;
 import java.io.IOException;
+import java.text.SimpleDateFormat;
+import java.util.ArrayList;
+import java.util.Date;
 import java.util.List;
+import java.util.Random;
 
 /**
  * 架空线路
@@ -27,17 +32,254 @@ public class JkxlController extends BaseController {
   private JkxlService jkxlService;
 
   @RequestMapping("/import")
-  public String importFile(MultipartFile file, RedirectAttributes redirectAttributes, HttpServletRequest request, Model model){
+  public String importFile(String file, RedirectAttributes redirectAttributes, HttpServletRequest request, Model model){
+    double sl = Double.valueOf(request.getParameter("jxsl"));
+    String projectName = request.getParameter("name");
+    String id = getId();
     try {
-       Double value = jkxlService.getValueByName(BashInfo.RATIO_RGTC).getValue();
-
-
+      double[] rate = getRate();
+      WbsProject wbsProject = new WbsProject();
+      wbsProject.setId(id);
+      wbsProject.setName(projectName);
+      wbsProject.setCreateDate(new Date());
+      List<JkxlData> list = getData(file,rate,id,sl);
+      for(JkxlData jkxlData : list){
+        jkxlService.save(jkxlData);
+      }
     } catch (Exception e){
       addMessage(redirectAttributes, "导入失败");
     }
 
     addMessage(redirectAttributes, "导入成功");
+    return "redirect:/a/jkxl/list?id="+id;
+  }
+
+  @RequestMapping("/list")
+  public String list(HttpServletRequest request,Model model){
+    String id = request.getParameter("id");
     return "";
   }
 
+
+  public List<JkxlData> getData(String file,double[] rate,String id,double sl) throws IOException, InvalidFormatException {
+    ImportExcel importExcel = new ImportExcel(file,1,3);
+    ImportExcel csqd = new ImportExcel(file,1,8);
+    ImportExcel gf = new ImportExcel(file,1,17);
+    ImportExcel qt = new ImportExcel(file,1,10);
+    ImportExcel total = new ImportExcel(file,1,1);
+    double[] csRate = getCsRate(csqd);
+    double[] gfRate = getGfRate(gf);
+    double[] qtFees = getQtFees(qt);
+    double bzFees = getFees(total);
+    double totalFee = 0.00;
+    List<JkxlData> list = new ArrayList<>();
+    int lastRow = importExcel.getLastDataRowNum();
+    int[] row = new int[6];
+    for(int i=0;i<lastRow;i++){
+      String type =  importExcel.getValue(i+1,2);
+      if(type.equals(BashInfo.PROJECTNAME)){
+        totalFee = importExcel.getDouble(i+1,12);
+        continue;
+      }
+      if(type.equals(BashInfo.JCGC)){
+        row[0] = i+1;
+        continue;
+      }
+      if(type.equals(BashInfo.GTGC)){
+        row[1] = i+1;
+        continue;
+      }
+      if(type.equals(BashInfo.JDGC)){
+        row[2] = i+1;
+        continue;
+      }
+      if(type.equals(BashInfo.JXGC)){
+        row[3] = i+1;
+        continue;
+      }
+      if(type.equals(BashInfo.FJAZGC)){
+        row[4] = i+1;
+        continue;
+      }
+      if(type.equals(BashInfo.FZGC)){
+        row[5] = i+1;
+        break;
+      }
+    }
+    for(int i=0;i<6;i++){
+      JkxlData jkxlData = new JkxlData();
+      double originalTotalCost = importExcel.getDouble(row[i],12); //原合计
+      double otherRate = originalTotalCost/totalFee;   //其他费用分摊比例
+      double otherFee = qtFees[2]*otherRate;  //其他费用
+      double originalRgCost = importExcel.getDouble(row[i],13); //原人工费
+      double rgCost = originalRgCost/(1+rate[0]);  //后人工费
+      double originalCbrCost = importExcel.getDouble(row[i],14); //原承包人采购
+      double cbrCost = originalCbrCost/(1+rate[1]);  //后承包人采购
+      double originalFbrCost = importExcel.getDouble(row[i],15); //原发包人采购
+      double fbrCost = originalFbrCost/(1+sl); //后发包人采购
+      double originalJxrCost = importExcel.getDouble(row[i],17); //原机械费
+      double jxCost = originalJxrCost/(1+rate[2]); //后机械费
+      double measuresFee1 = (rgCost+cbrCost+fbrCost+jxCost)*csRate[0]; //措施费1
+      double measuresFee2 = rgCost*csRate[1];   //措施费2
+      double fees = rgCost*gfRate[1]*1.12+rgCost*gfRate[0];  //规费
+      double tax = (originalTotalCost+measuresFee1+measuresFee2+fees+otherFee)*0.09; //税金
+      double totalfee = originalTotalCost+measuresFee1+measuresFee2+fees+otherFee+tax-originalFbrCost; //合计
+      jkxlData.setOriginalTotalCost(originalTotalCost);
+      jkxlData.setOriginalRgCost(originalRgCost);
+      jkxlData.setRgCost(rgCost);
+      jkxlData.setOriginalCbrCost(originalCbrCost);
+      jkxlData.setCbrCost(cbrCost);
+      jkxlData.setOriginalFbrCost(originalFbrCost);
+      jkxlData.setFbrCost(fbrCost);
+      jkxlData.setOriginalJxCost(originalJxrCost);
+      jkxlData.setJxCost(jxCost);
+      jkxlData.setMeasuresFee1(measuresFee1);
+      jkxlData.setMeasuresFee2(measuresFee2);
+      jkxlData.setFees(fees);
+      jkxlData.setOtherCost(otherFee);
+      jkxlData.setTax(tax);
+      jkxlData.setTotalFee(totalfee);
+      jkxlData.setWbsCode(BashInfo.ids[i]);
+      jkxlData.setId(id);
+      list.add(jkxlData);
+    }
+    JkxlData jkxlData1 = new JkxlData();
+    JkxlData jkxlData2 = new JkxlData();
+    jkxlData1.setWbsCode("34120000");
+    jkxlData1.setTotalFee(qtFees[0]);
+    jkxlData2.setWbsCode("34220000");
+    jkxlData2.setTotalFee(qtFees[1]);
+    list.add(jkxlData1);
+    list.add(jkxlData2);
+    return list;
+
+  }
+
+
+  /**
+   *获取措施费率
+   */
+  public double[] getCsRate(ImportExcel importExcel){
+    int lastRow = importExcel.getLastDataRowNum();
+    double lsRate = 0.00;
+    double aqRate = 0.00;
+    double totalRate = 0.00;
+    for(int i=2;i<lastRow;i++){
+      String type = importExcel.getValue(i+1,1);
+      if(type.equals(BashInfo.CS_LS)){
+          lsRate = importExcel.getDouble(i+1,3);
+      }
+      if(type.equals(BashInfo.CS_AQWM)){
+        aqRate = importExcel.getDouble(i+1,3);
+      }
+      totalRate += importExcel.getDouble(i+1,3);
+    }
+    double[] rate = new double[2];
+    rate[0] = (lsRate+aqRate)/100;
+    rate[1] = (totalRate-lsRate-aqRate)/100;
+    return  rate;
+  }
+
+  /**
+   *获取规费率
+   */
+  public double[] getGfRate(ImportExcel importExcel) {
+    int lastRow = importExcel.getLastDataRowNum();
+    double totalRate = 0.00;
+    double wxzyRate = 0.00;
+    for (int i = 2; i < lastRow; i++) {
+      String type = importExcel.getValue(i + 1, 1);
+      if (type.equals(BashInfo.GF_WXZY)) {
+        wxzyRate = importExcel.getDouble(i + 1, 3);
+      }
+      if (!importExcel.getValue(i + 1, 2).equals("")) {
+        totalRate += importExcel.getDouble(i + 1, 3);
+      }
+    }
+    double[] rate = new double[2];
+    rate[0] = wxzyRate / 100;
+    rate[1] = (totalRate - wxzyRate) / 100;
+    return rate;
+  }
+
+  /**
+   * 获取其他费用
+   */
+  public double[] getQtFees(ImportExcel importExcel) {
+    int lastRow = importExcel.getLastDataRowNum();
+    double cdFree = 0.00;
+    double zbFree = 0.00;
+    double totalFree = 0.00;
+    for(int i=2;i<lastRow;i++){
+      String type = importExcel.getValue(i+1,1);
+      String type1 = importExcel.getValue(i+1,0);
+      if(type.equals(BashInfo.QT_SGCDZY)){
+        cdFree = importExcel.getDouble(i+1,2);
+      }
+      if(type.equals(BashInfo.QT_ZBDL)){
+        zbFree = importExcel.getDouble(i+1,2);
+      }
+      if(type1.equals(BashInfo.QT_HJ)){
+        totalFree = importExcel.getDouble(i+1,2);
+      }
+    }
+    double[] rate = new double[3];
+    rate[0] = cdFree;
+    rate[1] = zbFree;
+    rate[2] = totalFree-cdFree-zbFree;
+    return  rate;
+  }
+
+  /**
+   * 获取调差系数
+   * @return
+   */
+  public double[] getRate(){
+    double[] rate = new double[3];
+    rate[0] = jkxlService.getValueByName(BashInfo.RATIO_RGTC).getValue();
+    rate[1] = jkxlService.getValueByName(BashInfo.RATIO_CLTC).getValue();
+    rate[2] = jkxlService.getValueByName(BashInfo.RATIO_JXTC).getValue();
+    return rate;
+  }
+
+  /**
+   * 获取补增值税税率调整差额和扣减甲供材超供材料费
+   */
+  public double getFees(ImportExcel importExcel){
+    int lastRow = importExcel.getLastDataRowNum();
+    double bzFree = 0.00;
+    double kcFree = 0.00;
+    for(int i=0;i<lastRow;i++){
+      String type = importExcel.getValue(i+1,1);
+      if(type.equals(BashInfo.BZZSSL)){
+        bzFree = importExcel.getDouble(i+1,2);
+        continue;
+      }
+      if(type.equals(BashInfo.KJJGCC)){
+        kcFree = importExcel.getDouble(i+1,2);
+        break;
+      }
+    }
+
+    return  bzFree+kcFree;
+
+  }
+
+  public String getId() {
+     SimpleDateFormat sdf=new SimpleDateFormat("yyyyMMddHHmmss");
+     String newDate=sdf.format(new Date());
+     String result="";
+      Random random=new Random();
+     for(int i=0;i<3;i++){
+       result+=random.nextInt(10);
+     }
+     return newDate+result;
+ }
+
+
+
+
+
+
+
 }