Quellcode durchsuchen

Merge remote-tracking branch 'origin/master'

yue vor 5 Jahren
Ursprung
Commit
d6943a0e0b

+ 43 - 124
src/main/java/com/jeeplus/modules/sg/financial/erpcredit/entity/ErpAccount.java

@@ -7,172 +7,91 @@ import java.io.Serializable;
 
 public class ErpAccount implements Serializable {
     private static final long serialVersionUID = 1L;
-//    private String companyCode;//公司代码
-//    private String aProfitCenter;//利润中心
-//    private String accountData;//过账日期
-//    private String voucherCode;//凭证代码
-//    private String archivingVoucher;//归档凭证类型
-//    private String numberOfArchiving;//归档凭证编码
-//    private String titleText;//凭证抬头文本
-//    private String hookWbsCode;//挂接WBS编码
-//    private String WbsCode;//WBS编码
 
     private String WbsDetails;//WBS描述
     private String ProjectDefinitionCode;//项目定义编码
     private String ProjectDefinitionDetails;//项目定义描述
-//    private String subjectCode;//科目代码
     private String subjectName;//科目名称
-//    private String borrowingDirection;//借贷方向
-    private String lineItemAmount;//行项目金额
+    private Double lineItemAmount;//行项目金额
     private String theNumber;//数量
-//    private String batch;//批次
-//    private String materialCode;//物料编码
     private String materialDetails;//物料描述
     private String unit;//单位
-    private String theInputTax;//进项税额
-//    private String taxPurposes;//转出进行税额
-//    private String taxNumbers;//转出凭证号码
-//    private String taxZcDate;//转出凭证过账日期
-//    private String supplier;//供应商)
+    private Double theInputTax;//进项税额
     private String supplierName;//供应商名称
 
-////    @ExcelField(title="公司代码")
-//    public String getCompanyCode() {
-//        return companyCode;
-//    }
-////    @ExcelField(title="利润中心")
-//    public String getaProfitCenter() {
-//        return aProfitCenter;
-//    }
-////    @ExcelField(title="凭证编码")
-//    public String getVoucherCode() {
-//        return voucherCode;
-//    }
-////    @ExcelField(title="归档凭证类型")
-//    public String getArchivingVoucher() {
-//        return archivingVoucher;
-//    }
-////    @ExcelField(title="归档凭证编码")
-//    public String getNumberOfArchiving() {
-//        return numberOfArchiving;
-//    }
-////    @ExcelField(title="凭证抬头文本")
-//    public String getTitleText() {
-//        return titleText;
-//    }
-////    @ExcelField(title="挂接WBS编码")
-//    public String getHookWbsCode() {
-//        return hookWbsCode;
-//    }
-////    @ExcelField(title="WBS编码")
-//    public String getWbsCode() {
-//        return WbsCode;
-//    }
-//    @ExcelField(title="WBS描述")
+    public static long getSerialVersionUID() {
+        return serialVersionUID;
+    }
+
     public String getWbsDetails() {
         return WbsDetails;
     }
-//    @ExcelField(title="项目定义编码")
-    public String getProjectDefinitionCode() {
-        return ProjectDefinitionCode;
-    }
-//    @ExcelField(title="项目定义描述")
-    public String getProjectDefinitionDetails() {
-        return ProjectDefinitionDetails;
-    }
-//    @ExcelField(title="科目代码")
-//    public String getSubjectCode() {
-//        return subjectCode;
-//    }
-//    @ExcelField(title="科目名称")
-    public String getSubjectName() {
-        return subjectName;
-    }
-//    @ExcelField(title="借贷方向")
-//    public String getBorrowingDirection() {
-//        return borrowingDirection;
-//    }
-//    @ExcelField(title="行项目金额")
-    public String getLineItemAmount() {
-        return lineItemAmount;
-    }
-//    @ExcelField(title="数量")
-    public String getTheNumber() {
-        return theNumber;
-    }
-//    @ExcelField(title="批次")
-//    public String getBatch() {
-//        return batch;
-//    }
-//    @ExcelField(title="物料编码")
-//    public String getMaterialCode() {
-//        return materialCode;
-//    }
-//    @ExcelField(title="物料描述")
-    public String getMaterialDetails() {
-        return materialDetails;
-    }
-//    @ExcelField(title="单位")
-    public String getUnit() {
-        return unit;
-    }
-//    @ExcelField(title="进项税额")
-//    public String getTheInputTax() {
-//        return theInputTax;
-//    }
-////    @ExcelField(title="转出进行税额")
-//    public String getTaxPurposes() {
-//        return taxPurposes;
-//    }
-////    @ExcelField(title="转出凭证号码")
-//    public String getTaxNumbers() {
-//        return taxNumbers;
-//    }
-////    @ExcelField(title="供应商")
-//    public String getSupplier() {
-//        return supplier;
-//    }
-////    @ExcelField(title="供应商名称")
-//    public String getSupplierNumber() {
-//        return supplierNumber;
-//    }
 
     public void setWbsDetails(String wbsDetails) {
         WbsDetails = wbsDetails;
     }
+
+    public String getProjectDefinitionCode() {
+        return ProjectDefinitionCode;
+    }
+
     public void setProjectDefinitionCode(String projectDefinitionCode) {
         ProjectDefinitionCode = projectDefinitionCode;
     }
+
+    public String getProjectDefinitionDetails() {
+        return ProjectDefinitionDetails;
+    }
+
     public void setProjectDefinitionDetails(String projectDefinitionDetails) {
         ProjectDefinitionDetails = projectDefinitionDetails;
     }
+
+    public String getSubjectName() {
+        return subjectName;
+    }
+
     public void setSubjectName(String subjectName) {
         this.subjectName = subjectName;
     }
-    public void setLineItemAmount(String lineItemAmount) {
+
+    public Double getLineItemAmount() {
+        return lineItemAmount;
+    }
+
+    public void setLineItemAmount(Double lineItemAmount) {
         this.lineItemAmount = lineItemAmount;
     }
+
+    public String getTheNumber() {
+        return theNumber;
+    }
+
     public void setTheNumber(String theNumber) {
         this.theNumber = theNumber;
     }
 
+    public String getMaterialDetails() {
+        return materialDetails;
+    }
+
     public void setMaterialDetails(String materialDetails) {
         this.materialDetails = materialDetails;
     }
-    public void setUnit(String unit) {
-        this.unit = unit;
-    }
 
+    public String getUnit() {
+        return unit;
+    }
 
-    public static long getSerialVersionUID() {
-        return serialVersionUID;
+    public void setUnit(String unit) {
+        this.unit = unit;
     }
 
-    public String getTheInputTax() {
+    public Double getTheInputTax() {
         return theInputTax;
     }
 
-    public void setTheInputTax(String theInputTax) {
+    public void setTheInputTax(Double theInputTax) {
         this.theInputTax = theInputTax;
     }
 

+ 75 - 3
src/main/java/com/jeeplus/modules/sg/financial/erpcredit/entity/ErpJudge.java

@@ -1,9 +1,41 @@
 package com.jeeplus.modules.sg.financial.erpcredit.entity;
 
 public class ErpJudge {
-    private String itemId;
-    private String mainFlag;
-    private String infoFlag;
+    private String itemId;//项目id
+    private String mainFlag;//是否有维护数据
+    private String mainStartDate;//是否有开工时间
+    private String mainEndDate;//是否有结束时间
+    private String mainApprovalNumber;//批准文号
+    private String mainDesign;//设计费
+    private String mainSupervision;//监理费
+    private String mainConstructionUnits;//施工单位
+    private String mainDesignUnits;    //设计单位
+    private String mainInvestmen;//发文总投资
+    private String infoFlag;//是否有物料描述
+
+    public String getMainConstructionUnits() {
+        return mainConstructionUnits;
+    }
+
+    public void setMainConstructionUnits(String mainConstructionUnits) {
+        this.mainConstructionUnits = mainConstructionUnits;
+    }
+
+    public String getMainDesignUnits() {
+        return mainDesignUnits;
+    }
+
+    public void setMainDesignUnits(String mainDesignUnits) {
+        this.mainDesignUnits = mainDesignUnits;
+    }
+
+    public String getMainInvestmen() {
+        return mainInvestmen;
+    }
+
+    public void setMainInvestmen(String mainInvestmen) {
+        this.mainInvestmen = mainInvestmen;
+    }
 
     public String getItemId() {
         return itemId;
@@ -28,4 +60,44 @@ public class ErpJudge {
     public void setInfoFlag(String infoFlag) {
         this.infoFlag = infoFlag;
     }
+
+    public String getMainStartDate() {
+        return mainStartDate;
+    }
+
+    public void setMainStartDate(String mainStartDate) {
+        this.mainStartDate = mainStartDate;
+    }
+
+    public String getMainEndDate() {
+        return mainEndDate;
+    }
+
+    public void setMainEndDate(String mainEndDate) {
+        this.mainEndDate = mainEndDate;
+    }
+
+    public String getMainApprovalNumber() {
+        return mainApprovalNumber;
+    }
+
+    public void setMainApprovalNumber(String mainApprovalNumber) {
+        this.mainApprovalNumber = mainApprovalNumber;
+    }
+
+    public String getMainDesign() {
+        return mainDesign;
+    }
+
+    public void setMainDesign(String mainDesign) {
+        this.mainDesign = mainDesign;
+    }
+
+    public String getMainSupervision() {
+        return mainSupervision;
+    }
+
+    public void setMainSupervision(String mainSupervision) {
+        this.mainSupervision = mainSupervision;
+    }
 }

+ 124 - 68
src/main/java/com/jeeplus/modules/sg/financial/erpcredit/service/ErpCreditService.java

@@ -134,20 +134,6 @@ public class ErpCreditService extends CrudService<ErpCreditMapper,ErpCredit> {
                 erpCreditMaterialMapper.delete(erpCreditChild2);
             }
         }
-//        for (ErpCreditChild3 erpCreditChild3 : erpCredit.getErpCreditChild3s()){
-//            if (ErpCreditChild3.DEL_FLAG_NORMAL.equals(erpCreditChild3.getDelFlag())){
-//                if (StringUtils.isBlank(erpCreditChild3.getId())){
-//                    erpCreditChild3.setErpCredit(erpCredit);
-//                    erpCreditChild3.preInsert();
-//                    erpCreditChild3Mapper.insert(erpCreditChild3);
-//                }else {
-//                    erpCreditChild3.preUpdate();
-//                    erpCreditChild3Mapper.update(erpCreditChild3);
-//                }
-//            }else {
-//                erpCreditChild3Mapper.delete(erpCreditChild3);
-//            }
-//        }
     }
 
     @Transactional(readOnly = false)
@@ -230,7 +216,7 @@ public class ErpCreditService extends CrudService<ErpCreditMapper,ErpCredit> {
             response.setContentType("text/html;charset=UTF-8");
             OutputStream toClient = new BufferedOutputStream(response.getOutputStream());
             response.setContentType("application/x-msdownload");
-            String newName = URLEncoder.encode("竣工结算表" + System.currentTimeMillis() + ".xlsx","UTF-8");
+            String newName = URLEncoder.encode("财务竣工结算表" + System.currentTimeMillis() + ".xlsx","UTF-8");
             response.addHeader("Content-Disposition","attachment;filename=\"" + newName + "\"");
             response.addHeader("Content-Length", "" + newFile.length());
             toClient.write(buffer);
@@ -249,80 +235,150 @@ public class ErpCreditService extends CrudService<ErpCreditMapper,ErpCredit> {
         // 删除创建的新文件
         // this.deleteFile(newFile);
     }
-    public List<ErpJudge> getMainTainList(List<ErpCredit> erpCredits,List<String> strings,List<String> maintainDataList){
+    //验证汇总
+    public List<ErpJudge> getAllCheck(List<ErpCredit> erpCredits){
+        Boolean flag = true;
         ErpJudge erpJudge = null;
-        for (String s:maintainDataList){
-            System.out.println("qweqwe="+s);
-        }
-        List<ErpJudge> erpJudges = new ArrayList<ErpJudge>();
-        if (maintainDataList.isEmpty()){
-            for (ErpCredit erpCredit1:erpCredits){
+        String str = "无";
+        //得到所有概预算数据集合
+        List<MaintainData> maintainDatas = dataMaintenanceService.getJudge();
+        List<Information> infoFlag = getInfoFlag(erpCredits);
+        List<ErpJudge> mainAll = getMainAll(erpCredits, maintainDatas);
+        for (Information information:infoFlag){
+            flag = true;
+            for (ErpJudge erpJudge1:mainAll){
+                if (information.getProjectId().equals(erpJudge1.getItemId())){
+                    erpJudge1.setInfoFlag("否");
+                    flag = false;
+                }
+            }
+            if (flag){
                 erpJudge = new ErpJudge();
-                erpJudge.setItemId(erpCredit1.getItemId());
-                erpJudge.setMainFlag("是");
+                erpJudge.setItemId(information.getProjectId());
+                erpJudge.setMainFlag(str);
+                erpJudge.setMainStartDate(str);//是否有开工时间
+                erpJudge.setMainEndDate(str);//是否有结束时间
+                erpJudge.setMainApprovalNumber(str);//批准文号
+                erpJudge.setMainDesign(str);//设计费
+                erpJudge.setMainSupervision(str);//监理费
+                erpJudge.setMainConstructionUnits(str);
+                erpJudge.setMainDesignUnits(str);//设计单位
+                erpJudge.setMainInvestmen(str);//发文总投资
                 erpJudge.setInfoFlag("否");
-                erpJudges.add(erpJudge);
+                mainAll.add(erpJudge);
             }
         }
-        return erpJudges;
+        return mainAll;
     }
-    //判断条件
-    public List<ErpJudge> getCheck(List<ErpCredit> erpCredits){
 
-        List<ErpJudge> erpJudges = new ArrayList<ErpJudge>();
-        ErpJudge erpJudge = null;
-        Map<String,List> map = new  HashMap<String,List>();
+
+    //得到物料为空的
+    public List<Information> getInfoFlag(List<ErpCredit> erpCredits){
         List<String> strings = new ArrayList<String>();
         for (ErpCredit erpCredit:erpCredits){
             strings.add(erpCredit.getItemId());
         }
-//        //得到物料是为完成数据
+       //得到物料是为完成数据
         List<Information> informationList = informationService.findNoFinishList(strings);
-        List<String> maintainData = dataMaintenanceService.getJudge(strings);
-        List<String> maintainDataList = new ArrayList<String>();
-        for (int i = 0; i < maintainData.size()-1; i++) {
-            maintainDataList.add(maintainData.get(i));
+        return informationList;
+    }
+    //维护数据汇总
+    public List<ErpJudge> getMainAll(List<ErpCredit> erpCredits,List<MaintainData> maintainDatas){
+        String str = "无";
+        List<ErpJudge> mainFlagSure = getMainFlagSure(erpCredits, maintainDatas);//维护数据有无的集合
+        List<ErpJudge> mainJuger = getMainJuger(erpCredits, maintainDatas);//得到所有维护数据 遍历得到 ErpJudge
+        for (ErpJudge erpJudge:mainJuger){
+            if (erpJudge.getMainStartDate().equals(str)||//是否有开工时间
+                erpJudge.getMainEndDate().equals(str)||//是否有结束时间
+                erpJudge.getMainApprovalNumber().equals(str)||//批准文号
+                erpJudge.getMainDesign().equals(str)||//设计费
+                erpJudge.getMainSupervision().equals(str)||//监理费
+                erpJudge.getMainConstructionUnits().equals(str)||
+                erpJudge.getMainDesignUnits().equals(str)||//设计单位
+                erpJudge.getMainInvestmen().equals(str)){//发文总投资
+                mainFlagSure.add(erpJudge);
+            }
         }
-        if (null!=informationList&&informationList.size()>0){
-            for (Information information:informationList){
-                erpJudge=new ErpJudge();
-                erpJudge.setItemId(information.getProjectId());
-                erpJudge.setMainFlag("有");
-                erpJudge.setInfoFlag("否");
+        return mainFlagSure;
+    }
+    //得到维护数据有无的集合
+    public List<ErpJudge> getMainFlagSure(List<ErpCredit> erpCredits,List<MaintainData> maintainDatas){
+        String str = "无";
+        Boolean flag  = true;
+        List<ErpJudge> erpJudges = new ArrayList<ErpJudge>();//得到所有维护数据的集合
+        ErpJudge erpJudge = null;
+        for (ErpCredit erpCredit1:erpCredits){
+            flag = true;
+            for (MaintainData maintainData:maintainDatas){
+                if (erpCredit1.getItemId().equals(maintainData.getProjectId())){
+                    flag = false;
+                    break;
+                }
+            }
+            if (flag){
+                erpJudge = new ErpJudge();
+                erpJudge.setItemId(erpCredit1.getItemId());
+                erpJudge.setMainFlag(str);
+                erpJudge.setMainStartDate(str);//是否有开工时间
+                erpJudge.setMainEndDate(str);//是否有结束时间
+                erpJudge.setMainApprovalNumber(str);//批准文号
+                erpJudge.setMainDesign(str);//设计费
+                erpJudge.setMainSupervision(str);//监理费
+                erpJudge.setMainConstructionUnits(str);
+                erpJudge.setMainDesignUnits(str);//设计单位
+                erpJudge.setMainInvestmen(str);//发文总投资
+                erpJudge.setInfoFlag("是");//物料是否完成
                 erpJudges.add(erpJudge);
             }
         }
-        if (null!=maintainDataList&&maintainDataList.size()>0){
-            Boolean flag = true;
-            for (String maintain:maintainDataList){
-                flag=true;
-                if (null!=erpJudges&&erpJudges.size()>0){
-                    for (ErpJudge erpJudge1:erpJudges){
-                       if (erpJudge1.getItemId().equals(maintain)){
-                           erpJudge1.setMainFlag("无");
-                           flag = false;
-                           break;
-                       }
+        return erpJudges;
+    }
+    //得到所有维护数据 遍历得到 ErpJudge
+    public List<ErpJudge> getMainJuger(List<ErpCredit> erpCredits,List<MaintainData> maintainDatas){
+        List<ErpJudge> erpJudges = new ArrayList<ErpJudge>();
+        ErpJudge erpJudge = null;
+        for (MaintainData maintainData:maintainDatas){
+            for (ErpCredit erpCredit1:erpCredits){
+                if (erpCredit1.getItemId().equals(maintainData.getProjectId())){
+                    erpJudge = new ErpJudge();
+                    erpJudge.setItemId(maintainData.getProjectId());//项目id
+                    erpJudge.setMainFlag("有");
+                    erpJudge.setMainStartDate("无");//是否有开工时间
+                    erpJudge.setMainEndDate("无");//是否有结束时间
+                    erpJudge.setMainApprovalNumber("无");//批准文号
+                    erpJudge.setMainDesign("无");//设计费
+                    erpJudge.setMainSupervision("无");//监理费
+                    erpJudge.setMainConstructionUnits("无");
+                    erpJudge.setMainDesignUnits("无");//设计单位
+                    erpJudge.setMainInvestmen("无");//发文总投资
+                    if (null!=maintainData.getStartDate()){
+                        erpJudge.setMainStartDate("有");//是否有开工时间
+                    }
+                    if ( null!=maintainData.getEndDate()){
+                        erpJudge.setMainEndDate("有");//竣工时间
+                    }
+                    if (null!=maintainData.getApprovalNumber()){
+                        erpJudge.setMainApprovalNumber("有");//批准文号
+                    }
+                    if (null!=maintainData.getDesignFee()){
+                        erpJudge.setMainDesign("有");//设计费
+                    }
+                    if (null!=maintainData.getSupervisionFee()){
+                        erpJudge.setMainSupervision("有");//监理费
+                    }
+                    if (null!=maintainData.getConstructionUnits()){
+                        erpJudge.setMainConstructionUnits("有");//施工单位
+                    }
+                    if (null!=maintainData.getDesignUnits()){
+                        erpJudge.setMainDesignUnits("有");//设计单位
+                    }
+                    if (null!=maintainData.getInvestment()){
+                        erpJudge.setMainInvestmen("有");//发文投资
                     }
-                }
-                if (flag){
-                    erpJudge=new ErpJudge();
-                    erpJudge.setItemId(maintain);
-                    erpJudge.setMainFlag("无");
-                    erpJudge.setInfoFlag("是");
                     erpJudges.add(erpJudge);
                 }
             }
         }
-        if (maintainData.get(maintainData.size()-1).equals("1")){
-                for (ErpCredit erpCredit1:erpCredits){
-                    erpJudge=new ErpJudge();
-                    erpJudge.setItemId(erpCredit1.getItemId());
-                    erpJudge.setMainFlag("无");
-                    erpJudge.setInfoFlag("是");
-                    erpJudges.add(erpJudge);
-                }
-        }
         return erpJudges;
     }
 }

+ 22 - 15
src/main/java/com/jeeplus/modules/sg/financial/erpcredit/util/ErpInfo.java

@@ -67,6 +67,9 @@ public  class ErpInfo {
 
     public final static String  CON_lINE = "-";
 
+    public final static String CON_JSQDK = "工程成本-待摊支出-建设期贷款利息";
+    public final static String CON_JSQDK1="工程成本-待摊支出-项目法人管理费-差旅";
+
     public final static String CON_PlPlQ=CON_PROJECT+CON_lINE+CON_PES+CON_lINE+CON_OTR;//工程成本-待摊支出-其他
 
     public final static String CON_PLPLPLQ=CON_PlPlQ+CON_lINE+CON_PES+CON_lINE+CON_PLPM+CON_lINE+CON_OTR;//工程成本-待摊支出-项目法人管理费-其他
@@ -95,12 +98,12 @@ public  class ErpInfo {
                 erpAccount.setProjectDefinitionCode(erpCode);
                 erpAccount.setProjectDefinitionDetails((String)importUtil.getCellValue(row,11));
                 erpAccount.setSubjectName((String)importUtil.getCellValue(row,13));
-                erpAccount.setLineItemAmount((String)importUtil.getCellValue(row,15));
+                erpAccount.setLineItemAmount(Double.parseDouble((String) importUtil.getCellValue(row,15)));
                 erpAccount.setTheNumber((String)importUtil.getCellValue(row,16));
                 erpAccount.setMaterialDetails((String)importUtil.getCellValue(row,19));
                 erpAccount.setUnit((String)importUtil.getCellValue(row,20));
                 erpAccount.setWbsDetails((String)importUtil.getCellValue(row,9));
-                erpAccount.setTheInputTax((String)importUtil.getCellValue(row,21));
+                erpAccount.setTheInputTax(Double.parseDouble((String) importUtil.getCellValue(row,21)));
                 erpAccount.setSupplierName((String)importUtil.getCellValue(row,26));
                 list.add(erpAccount);
             }
@@ -396,13 +399,13 @@ public  class ErpInfo {
         double consTotalFee=0.0;//施工费:合计
         double theInputNumer=0.0;//进项税额
         //判断 导入表格 对象 的行项目金额是否为空
-        if(!erpAccount.getLineItemAmount().isEmpty()){
-            actualInvestment = Double.parseDouble(erpAccount.getLineItemAmount());
-            consTotalFee = Double.parseDouble(erpAccount.getLineItemAmount());
+        if(null!=erpAccount.getLineItemAmount()){
+            actualInvestment = erpAccount.getLineItemAmount();
+            consTotalFee = erpAccount.getLineItemAmount();
         }
         //判断进项税额是否为空值
-        if (!erpAccount.getTheInputTax().isEmpty()){
-            theInputNumer=Double.parseDouble(erpAccount.getTheInputTax());
+        if (null!=erpAccount.getTheInputTax()){
+            theInputNumer=erpAccount.getTheInputTax();
         }
         if (flag){
             erpCredit.setTheInputTax(theInputNumer);//添加进项税额
@@ -467,8 +470,8 @@ public  class ErpInfo {
         double otherTotalFee=0.0;//其他费用合计
         double lineItemAmount=0.0;//行项目金额合计
         //判断 导入表格 对象 的行项目金额是否为空
-        if(!erpAccount.getLineItemAmount().isEmpty()){
-            lineItemAmount = Double.parseDouble(erpAccount.getLineItemAmount());
+        if(null!=erpAccount.getLineItemAmount()){
+            lineItemAmount = erpAccount.getLineItemAmount();
         }
         if (flag){
             erpCredit.setOtherSupervisorFee(0.0);//添加其他:监理费
@@ -485,7 +488,9 @@ public  class ErpInfo {
                         erpAccount.getSubjectName().contains(ErpInfo.CON_PLPLPLQ)||
                         erpAccount.getSubjectName().contains(ErpInfo.CON_PLM)||
                         erpAccount.getSubjectName().contains(ErpInfo.CON_PLPLPLQ2)||
-                        erpAccount.getSubjectName().contains(ErpInfo.CON_PLPLPLQ1)){
+                        erpAccount.getSubjectName().contains(ErpInfo.CON_PLPLPLQ1)||
+                        erpAccount.getSubjectName().contains(CON_JSQDK)||
+                        erpAccount.getSubjectName().contains(CON_JSQDK1)){
                     //判断WBS描述为工程监理费
                     if (erpAccount.getWbsDetails().equals(ErpInfo.CON_PSF)){
                         erpCredit.setOtherSupervisorFee(lineItemAmount);
@@ -515,7 +520,9 @@ public  class ErpInfo {
                         erpAccount.getSubjectName().contains(ErpInfo.CON_PLPLPLQ)||
                         erpAccount.getSubjectName().contains(ErpInfo.CON_PLM)||
                         erpAccount.getSubjectName().contains(ErpInfo.CON_PLPLPLQ2)||
-                        erpAccount.getSubjectName().contains(ErpInfo.CON_PLPLPLQ1)){
+                        erpAccount.getSubjectName().contains(ErpInfo.CON_PLPLPLQ1)||
+                        erpAccount.getSubjectName().contains(CON_JSQDK)||
+                        erpAccount.getSubjectName().contains(CON_JSQDK1)){
                     //筛选(WBS描述)为工程监理费的行项目金额合计
                     if (erpAccount.getWbsDetails().equals(ErpInfo.CON_PSF)){
                         otherSupervisorFee = erpCredit.getOtherSupervisorFee()+lineItemAmount;//监理费
@@ -602,8 +609,8 @@ public  class ErpInfo {
                 eqmNumbers = Double.parseDouble(erpAccount.getTheNumber()); //否则 获取设备台数 信息
             }
             //判断如行项目金额是否为空
-            if (!erpAccount.getLineItemAmount().isEmpty()){
-                eqmBookedFee = Double.parseDouble(erpAccount.getLineItemAmount());//行项目金额赋值费入账金额
+            if (null!=erpAccount.getLineItemAmount()){
+                eqmBookedFee = erpAccount.getLineItemAmount();//行项目金额赋值费入账金额
             }
             //判断当前 设备费 集合是否存在
             if (null!=creditListChild1&&creditListChild1.size()>0){
@@ -674,9 +681,9 @@ public  class ErpInfo {
             flag=true;//默认初始值 项目定义编号不同
             erpAccount = erpAccounts.get(i);
             //判断行项目金额是否为空
-            if (!erpAccount.getLineItemAmount().isEmpty()){
+            if (null!=erpAccount.getLineItemAmount()){
                 //赋值材料入账金额为行项目金额
-                eqmBookedFee2 = Double.parseDouble(erpAccount.getLineItemAmount());
+                eqmBookedFee2 = erpAccount.getLineItemAmount();
             }
             if (!erpAccount.getTheNumber().isEmpty()){//判断设备材料
                 eqmNumber2=Double.parseDouble(erpAccount.getTheNumber());

+ 16 - 6
src/main/java/com/jeeplus/modules/sg/financial/erpcredit/util/ExportUtilCalculate.java

@@ -568,7 +568,7 @@ public class ExportUtilCalculate {
         TransferOfEquipment transferOfPower2 = null;//定义设备表对象
 
         Double materialTotal = 0.0;//材料费总计
-
+        Double powerValueTotal = 0.0;//当前erp账户 所有设备费合计
         Double powerValue = 0.0;
         Double eqmFtIntalls = 0.0;//获取分摊安装费
         Double powerInstallFee = 0.0;//安装费用(线路)
@@ -581,11 +581,15 @@ public class ExportUtilCalculate {
         Double powerStandInFeeAll=0.0;//摊入费用
         Double powerDeliveredAssetsAll=0.0;//交付使用资产价值
         for (ErpCredit erpCredit:erpCredits){
+            powerValueTotal = 0.0;//当前erp账户 所有设备费合计 赋值初始值
             //材料费合计
             materialTotal = getErpCreditMaterial(erpCredit);//得到材料费
 
             erpCreditChild1s = erpCredit.getErpCreditChild1s();//得到设备费集合
-
+            //所有设备费累加
+            for (ErpCreditEquipment erpCreditEquipment:erpCreditChild1s){
+                powerValueTotal += erpCreditEquipment.getEqmBookedFee1();
+            }
             //得到安装费用
             if (null!=erpCredit.getConsInstallFee()&&erpCredit.getTenKvModel()!=null){ //安装费(x线路表)
                 powerInstallFee = erpCredit.getConsInstallFee()+materialTotal;
@@ -641,15 +645,21 @@ public class ExportUtilCalculate {
                         powerValueAll+=powerValue;//合计
                     }
                     //计算摊入费用
-                    powerEqmMater = Double.parseDouble(transferOfPower2.getPowerValue())+powerInstallFee;//设备价值加上安装费设备价值
+//                    powerEqmMater = Double.parseDouble(transferOfPower2.getPowerValue())+powerInstallFee;//设备价值加上安装费设备价值
+//                    if (erpCredit.getOtherTotalFee()!=null){
+//                        powerStandInFee=Double.parseDouble(transferOfPower2.getPowerValue())/powerEqmMater*erpCredit.getOtherTotalFee();
+//                    }else {
+//                        powerStandInFee =0.0;
+//                    }
+                    powerEqmMater = powerValueTotal+powerInstallFee;//设备价值加上安装费设备价值
                     if (erpCredit.getOtherTotalFee()!=null){
                         powerStandInFee=Double.parseDouble(transferOfPower2.getPowerValue())/powerEqmMater*erpCredit.getOtherTotalFee();
                     }else {
                         powerStandInFee =0.0;
                     }
-                    if (null==erpCredit.getTenKvModel()){
-                        powerStandInFee = erpCredit.getOtherTotalFee();
-                    }
+//                    if (null==erpCredit.getTenKvModel()){
+//                        powerStandInFee = erpCredit.getOtherTotalFee();
+//                    }
                     transferOfPower2.setPowerStandInFee(decimalFormat.format(powerStandInFee));//赋值设备分摊费用
                     if (null!=erpCredit.getConsInstallFee()){
                         powerDeliveredAssets+=powerStandInFee;//交付使用费用累加

+ 59 - 29
src/main/java/com/jeeplus/modules/sg/financial/erpcredit/web/ErpCreditController.java

@@ -24,6 +24,8 @@ import org.apache.poi.xssf.usermodel.XSSFCell;
 import org.apache.poi.xssf.usermodel.XSSFRow;
 import org.apache.poi.xssf.usermodel.XSSFSheet;
 import org.apache.poi.xssf.usermodel.XSSFWorkbook;
+import org.apache.shiro.authz.annotation.Logical;
+import org.apache.shiro.authz.annotation.RequiresPermissions;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.http.HttpRequest;
 import org.springframework.stereotype.Controller;
@@ -72,10 +74,9 @@ public class ErpCreditController extends BaseController {
 	/**
 	 * 表单列表页面
 	 */
-//	@RequiresPermissions("sg:financial:erpCredit:list")
+	@RequiresPermissions("sg:financial:erpCredit:list")
 	@RequestMapping(value = {"list", ""})
 	public String list(ErpCredit erpCredit, Model model) {
-//		model.addAttribute("leave1", erpCredit);
 		model.addAttribute("erpCredit", erpCredit);
 		return "modules/sg/financial/erp/erpCreditList";
 	}
@@ -84,7 +85,7 @@ public class ErpCreditController extends BaseController {
 	 * 表单列表数据
 	 */
 	@ResponseBody
-//	@RequiresPermissions("sg:financial:erpCredit:list")
+	@RequiresPermissions("sg:financial:erpCredit:list")
 	@RequestMapping(value = "data")
 	public Map<String, Object> data(ErpCredit erpCredit, HttpServletRequest request, HttpServletResponse response, Model model) throws Exception{
 		HttpSession session = request.getSession();
@@ -94,8 +95,8 @@ public class ErpCreditController extends BaseController {
 			erpCredit.setStatus(attribute);
 			page = erpCreditService.findPage(new Page<ErpCredit>(request, response), erpCredit);
 		}else {
-			erpCredit.setId("123456");
-			erpCredit.setStatus("0");
+//			erpCredit.setId("123456");
+//			erpCredit.setStatus("0");
 			page = erpCreditService.findPage(new Page<ErpCredit>(request, response), erpCredit);
 		}
 		return getBootstrapData(page);
@@ -104,13 +105,15 @@ public class ErpCreditController extends BaseController {
 	/**
 	 * 查看,增加,编辑表单表单页面
 	 */
-//	@RequiresPermissions(value={"sg:financial:erpCredit:view","sg:financial:erpCredit:add","sg:financial:erpCredit:edit"},logical=Logical.OR)
+	@RequiresPermissions(value={"sg:financial:erpCredit:view","sg:financial:erpCredit:add","sg:financial:erpCredit:edit"},logical= Logical.OR)
 	@RequestMapping(value = "form")
 	public String form(ErpCredit erpCredit, Model model) {
 		model.addAttribute("erpCredit", erpCredit);
 		return "modules/sg/financial/erp/erpCreditForm";
 	}
-
+	/*
+		提示
+	 */
 	@RequestMapping(value = "tips")
 	public String Tips(String str,Model model, HttpServletRequest request, HttpServletResponse response) throws UnsupportedEncodingException {
 		str = (String)request.getParameter("str");
@@ -125,7 +128,15 @@ public class ErpCreditController extends BaseController {
 				erpJudge = new ErpJudge();
 				erpJudge.setItemId(strings2[0]);
 				erpJudge.setMainFlag(strings2[1]);
-				erpJudge.setInfoFlag(strings2[2]);
+				erpJudge.setMainStartDate(strings2[2]);
+				erpJudge.setMainEndDate(strings2[3]);
+				erpJudge.setMainApprovalNumber(strings2[4]);
+				erpJudge.setMainDesign(strings2[5]);
+				erpJudge.setMainSupervision(strings2[6]);
+				erpJudge.setMainConstructionUnits(strings2[7]);
+				erpJudge.setMainDesignUnits(strings2[8]);
+				erpJudge.setMainInvestmen(strings2[9]);
+				erpJudge.setInfoFlag(strings2[10]);
 				erpJudges.add(erpJudge);
 			}
 		}else {
@@ -133,7 +144,15 @@ public class ErpCreditController extends BaseController {
 			erpJudge = new ErpJudge();
 			erpJudge.setItemId(strings3[0]);
 			erpJudge.setMainFlag(strings3[1]);
-			erpJudge.setInfoFlag(strings3[2]);
+			erpJudge.setMainStartDate(strings3[2]);
+			erpJudge.setMainEndDate(strings3[3]);
+			erpJudge.setMainApprovalNumber(strings3[4]);
+			erpJudge.setMainDesign(strings3[5]);
+			erpJudge.setMainSupervision(strings3[6]);
+			erpJudge.setMainConstructionUnits(strings3[7]);
+			erpJudge.setMainDesignUnits(strings3[8]);
+			erpJudge.setMainInvestmen(strings3[9]);
+			erpJudge.setInfoFlag(strings3[10]);
 			erpJudges.add(erpJudge);
 		}
 		model.addAttribute("erpList",erpJudges);
@@ -143,9 +162,17 @@ public class ErpCreditController extends BaseController {
 	 * 保存表单
 	 */
 	@ResponseBody
-//	@RequiresPermissions(value={"sg:financial:erpCredit:add","sg:financial:erpcredit:edit"},logical=Logical.OR)
+	@RequiresPermissions(value={"sg:financial:erpCredit:add","sg:financial:erpcredit:edit"},logical=Logical.OR)
 	@RequestMapping(value = "save")
-	public AjaxJson save(ErpCredit erpCredit, Model model) throws Exception{
+	public AjaxJson save(ErpCredit erpCredit, Model model,HttpServletRequest request, HttpServletResponse response) throws Exception{
+		HttpSession session = request.getSession();
+		String random = "";
+		random = (String) session.getAttribute("erpStatus");
+		if (random==null){
+			random = ErpInfo.getStatus();
+			request.getSession().setAttribute("erpStatus",random);
+		}
+		erpCredit.setStatus(random);
 		AjaxJson j = new AjaxJson();
 		/**
 		 * 后台hibernate-validation插件校验
@@ -167,7 +194,7 @@ public class ErpCreditController extends BaseController {
 	 * 删除表单
 	 */
 	@ResponseBody
-//	@RequiresPermissions("sg:financial:erpCredit:del")
+	@RequiresPermissions("sg:financial:erpCredit:del")
 	@RequestMapping(value = "delete")
 	public AjaxJson delete(ErpCredit erpCredit) {
 		AjaxJson j = new AjaxJson();
@@ -180,7 +207,7 @@ public class ErpCreditController extends BaseController {
 	 * 批量表单
 	 */
 	@ResponseBody
-//	@RequiresPermissions("sg:financial:erpCredit:del")
+	@RequiresPermissions("sg:financial:erpCredit:del")
 	@RequestMapping(value = "deleteAll")
 	public AjaxJson deleteAll(String ids) {
 		AjaxJson j = new AjaxJson();
@@ -196,14 +223,14 @@ public class ErpCreditController extends BaseController {
      * 导出excel列表文件
      */
     @ResponseBody
-//	@RequiresPermissions("sg:financial:erpCredit:export")
+	@RequiresPermissions("sg:financial:erpCredit:export")
     @RequestMapping(value = "exportList")
     public Result exportFileList(ErpCredit erpCredit,HttpServletRequest request, HttpServletResponse response){
         Result j = new Result();
         try {
-            String fileName = "erp账户列表"+DateUtils.getDate("yyyyMMddHHmmss")+".xlsx";
+            String fileName = "送审决算信息"+DateUtils.getDate("yyyyMMddHHmmss")+".xlsx";
             Page<ErpCredit> page = erpCreditService.findPage(new Page<ErpCredit>(request, response, -1), erpCredit);
-            new ExportExcel("erp账户列表", ErpCredit.class).setDataList(page.getList()).write(response, fileName).dispose();
+            new ExportExcel("送审决算信息", ErpCredit.class).setDataList(page.getList()).write(response, fileName).dispose();
 
             j.setSuccess(true);
             j.setMsg("导出成功!");
@@ -217,7 +244,7 @@ public class ErpCreditController extends BaseController {
 	 * 导出excel文件
 	 */
 	@ResponseBody
-//	@RequiresPermissions("sg:financial:erpCredit:export")
+	@RequiresPermissions("sg:financial:erpCredit:export")
 	@RequestMapping(value = "export")
 	public Result exportFile(String ids,HttpServletRequest request, HttpServletResponse response){
 		Result j = new Result();
@@ -242,7 +269,7 @@ public class ErpCreditController extends BaseController {
 	 * 导入Excel数据
 	 */
 	@ResponseBody
-//	@RequiresPermissions("sg:financial:erpCredit:import")
+	@RequiresPermissions("sg:financial:erpCredit:import")
 	@RequestMapping(value = "import")
 	public Result importFile(@RequestParam("file")MultipartFile file, HttpServletResponse response, HttpServletRequest request,Model model) throws IOException, InvalidFormatException {
 		Result j = new Result();
@@ -255,16 +282,21 @@ public class ErpCreditController extends BaseController {
             Boolean erpJugde = ErpInfo.getErpJugde(importUtil);
             if (erpJugde){
                 j.setSuccess(false);
-                j.setMsg("表不符合规范");
+                j.setMsg("导入失败!失败信息:"+"表不符合规范");
                 return j;
             }
-            List<ErpAccount> erpAccounts = ErpInfo.getErpAccount(importUtil);//获取表格数据
+			List<ErpAccount> erpAccounts = ErpInfo.getErpAccount(importUtil);//获取表格数据
 			List<ErpCredit> erpCredits = ErpInfo.getAllErpCreditList(erpAccounts);//获取单条数据
-			List<ErpJudge> erpJudges  = erpCreditService.getCheck(erpCredits);
+			//验证方法
+			List<ErpJudge> erpJudges  = erpCreditService.getAllCheck(erpCredits);
 			if (null!=erpJudges&&erpJudges.size()>0){
 				String judge = "";
 				for (ErpJudge erpJudge:erpJudges){
-					judge += erpJudge.getItemId()+","+erpJudge.getMainFlag()+","+erpJudge.getInfoFlag()+"-";
+					judge += erpJudge.getItemId()+","+erpJudge.getMainFlag()+","+
+							erpJudge.getMainStartDate()+","+erpJudge.getMainEndDate()+","+
+							erpJudge.getMainApprovalNumber()+","+erpJudge.getMainDesign()+"," +
+							erpJudge.getMainSupervision()+","+erpJudge.getMainConstructionUnits()+","+
+							erpJudge.getMainDesignUnits()+","+erpJudge.getMainInvestmen()+","+erpJudge.getInfoFlag()+"-";
 				}
 				judge = judge.substring(0,judge.length()-1);
 				j.setList(judge);
@@ -276,26 +308,24 @@ public class ErpCreditController extends BaseController {
 				str+=erpCredit.getItemId()+",";
 			}
 			str = str.substring(0,str.length()-1);
-			String random = ErpInfo.getStatus();
-			request.getSession().setAttribute("erpStatus",random);
+			String random = random = ErpInfo.getStatus();//保存session
+			request.getSession().setAttribute("erpStatus",random);;
 			for (ErpCredit erpCredit : erpCredits){
 				try{
 					erpCreditService.save(erpCredit,random);
 					successNum++;
-				}catch(ConstraintViolationException ex){
-					failureNum++;
 				}catch (Exception ex) {
 					failureNum++;
 				}
 			}
 			if (failureNum>0){
-				failureMsg.insert(0, ",失败 "+failureNum+" 条ERP账户记录。");
+				failureMsg.insert(0, ",失败 "+failureNum+" 条送审决算记录。");
 			}
-			j.setMsg( "已成功导入 "+successNum+" 条ERP账户记录"+failureMsg);
+			j.setMsg( "已成功导入 "+successNum+" 条送审决算记录"+failureMsg);
 			j.setList(str);
 		} catch (Exception e) {
 			j.setSuccess(false);
-			j.setMsg("导入ERP失败!失败信息:"+e.getMessage());
+			j.setMsg("导入送审决算失败!失败信息:"+e.getMessage());
 		}
 		return j;
 	}

+ 17 - 27
src/main/java/com/jeeplus/modules/sg/financial/settlement/service/DataMaintenanceService.java

@@ -69,35 +69,25 @@ public class DataMaintenanceService extends CrudService<DataMaintenanceMapper, M
     }
 
     //判断erp是否存在
-    public List<String> getJudge(List<String> strings){
-		boolean flagCount = true;
+    public List<MaintainData> getJudge(){
+//		boolean flagCount = true;
 		MaintainData maintainData1 = new MaintainData();
-		Boolean flag = false;
-		List<String> list = new ArrayList<>();//定义一个集合
+//		Boolean flag = false;
+//		List<String> list = new ArrayList<>();//定义一个集合
 		List<MaintainData> maintainDatas = dataMaintenanceMapper.findList(maintainData1);//得到维护表所有数据
-		if (null!=strings&&strings.size()>0){
-			if (null!=maintainDatas&&maintainDatas.size()>0){
-				flagCount = false;
-				for (String str :strings){
-					flag = true;
-					for (MaintainData maintainData:maintainDatas){
-						if (str.equals(maintainData.getProjectId())){
-							flag = false;
-							break;
-						}
-					}
-					if (flag){
-						list.add(str);
-					}
-				}
-			}
-		}
-		if (flagCount){
-			list.add("1");
-		}else {
-			list.add("2");
-		}
-		return list;
+//		for (String str :strings){
+//			flag = true;
+//			for (MaintainData maintainData:maintainDatas){
+//				if (str.equals(maintainData.getProjectId())){
+//					flag = false;
+//					break;
+//				}
+//			}
+//			if (flag){
+//				list.add(str);
+//			}
+//		}
+		return maintainDatas;
 	}
 
 	public void export(MaintainData maintainData , HttpServletResponse response){

+ 22 - 1
src/main/java/com/jeeplus/modules/sg/financial/settlement/web/DataMaintenanceController.java

@@ -11,6 +11,7 @@ import com.jeeplus.common.utils.excel.ExportExcel;
 import com.jeeplus.common.utils.excel.ImportExcel;
 import com.jeeplus.core.persistence.Page;
 import com.jeeplus.core.web.BaseController;
+import com.jeeplus.modules.sg.financial.erpcredit.util.ImportUtil;
 import com.jeeplus.modules.sg.financial.settlement.entity.MaintainData;
 import com.jeeplus.modules.sg.financial.settlement.service.DataMaintenanceService;
 import com.jeeplus.modules.sys.utils.UserUtils;
@@ -93,6 +94,7 @@ public class DataMaintenanceController extends BaseController {
 			    maintainData.setProjectId(sts[0]);
             }else {
                 maintainData.setProjectIds(sts);
+                maintainData.setProjectId(null);
             }
 		}
 		Page<MaintainData> page = dataMaintenanceService.findPage(new Page<MaintainData>(request, response), maintainData);
@@ -224,6 +226,12 @@ public class DataMaintenanceController extends BaseController {
 		AjaxJson j = new AjaxJson();
 		try {
 			ImportExcel ei = new ImportExcel(file, 2, 0);
+			Boolean mainJudge = getMainJudge(ei);
+			if (mainJudge){
+				j.setSuccess(false);
+				j.setMsg("导入失败!失败信息:"+"表不符合规范");
+				return j;
+			}
 			List<MaintainData> list = getData(ei);
 			dataMaintenanceService.saveList(list);
 			j.setMsg("导入成功");
@@ -317,7 +325,20 @@ public class DataMaintenanceController extends BaseController {
 	}
 
 
-
+	//校验数据表格是否正确
+	public static Boolean getMainJudge(ImportExcel importExcel){
+		Boolean flag = false;
+		Row row = importExcel.getRow(0);
+		String mainCode = (String) importExcel.getCellValue(row,0);
+		if (!mainCode.contains("项目定义")){
+			flag = true;
+		}
+		String lineItem = (String)importExcel.getCellValue(row,1);
+		if (!lineItem.contains("单位")){
+			flag = true;
+		}
+		return  flag;
+	}
 
 
 }

+ 17 - 17
src/main/webapp/webpage/modules/sg/financial/erp/erpCreditForm.jsp

@@ -2,7 +2,7 @@
 <%@ include file="/webpage/include/taglib.jsp"%>
 <html>
 <head>
-	<title>新增ERP账户</title>
+	<title>新增送审决算信息</title>
 	<meta name="decorator" content="ani"/>
 	<script type="text/javascript">
 
@@ -88,63 +88,63 @@
 				<tr>
 					<td class="width-15 active"><label class="">实际投资:</label></td>
 					<td class="width-35">
-						<form:input path="actualInvestment" htmlEscape="false"    class="form-control"/>
+						<form:input path="actualInvestment" htmlEscape="false"    class="form-control  number"/>
 					</td>
 					<td class="width-15 active"><label class="">移交生产的资产总值:</label></td>
 					<td class="width-35">
-						<form:input path="transferAssets" htmlEscape="false"    class="form-control"/>
+						<form:input path="transferAssets" htmlEscape="false"    class="form-control number"/>
 					</td>
 				</tr>
 				<tr>
 					<td class="width-15 active"><label class="">建筑费:</label></td>
 					<td class="width-35">
-						<form:input path="consBuildingFee" htmlEscape="false"    class="form-control"/>
+						<form:input path="consBuildingFee" htmlEscape="false"    class="form-control  number"/>
 					</td>
 					<td class="width-15 active"><label class="">安装费:</label></td>
 					<td class="width-35">
-						<form:input path="consInstallFee" htmlEscape="false"    class="form-control"/>
+						<form:input path="consInstallFee" htmlEscape="false"    class="form-control number"/>
 					</td>
 				</tr>
 				<tr>
 					<td class="width-15 active"><label class="">施工费:合计:</label></td>
 					<td class="width-35">
-						<form:input path="consTotalFee" htmlEscape="false"    class="form-control"/>
+						<form:input path="consTotalFee" htmlEscape="false"    class="form-control  number"/>
 					</td>
 				</tr>
 				<tr>
 					<td class="width-15 active"><label class="">监理费:</label></td>
 					<td class="width-35">
-						<form:input path="otherSupervisorFee" htmlEscape="false"    class="form-control"/>
+						<form:input path="otherSupervisorFee" htmlEscape="false"    class="form-control number"/>
 					</td>
 					<td class="width-15 active"><label class="">设计费:</label></td>
 					<td class="width-35">
-						<form:input path="otherDesignFee" htmlEscape="false"    class="form-control"/>
+						<form:input path="otherDesignFee" htmlEscape="false"    class="form-control number"/>
 					</td>
 				</tr>
 				<tr>
 					<td class="width-15 active"><label class="">项目前期工作费:</label></td>
 					<td class="width-35">
-						<form:input path="otherBeWorkFee" htmlEscape="false"    class="form-control"/>
+						<form:input path="otherBeWorkFee" htmlEscape="false"    class="form-control number"/>
 					</td>
 					<td class="width-15 active"><label class="">建设期贷款利息:</label></td>
 					<td class="width-35">
-						<form:input path="otherBuildLoan" htmlEscape="false"    class="form-control"/>
+						<form:input path="otherBuildLoan" htmlEscape="false"    class="form-control number"/>
 					</td>
 				</tr>
 				<tr>
 					<td class="width-15 active"><label class="">线路施工赔偿费:</label></td>
 					<td class="width-35">
-						<form:input path="otherLineDamages" htmlEscape="false"    class="form-control"/>
+						<form:input path="otherLineDamages" htmlEscape="false"    class="form-control number"/>
 					</td>
 					<td class="width-15 active"><label class="">法人管理费:</label></td>
 					<td class="width-35">
-						<form:input path="otherLegalManage" htmlEscape="false"    class="form-control"/>
+						<form:input path="otherLegalManage" htmlEscape="false"    class="form-control number"/>
 					</td>
 				</tr>
 				<tr>
 					<td class="width-15 active"><label class="">其他费用:合计:</label></td>
 					<td class="width-35">
-						<form:input path="otherTotalFee" htmlEscape="false"    class="form-control"/>
+						<form:input path="otherTotalFee" htmlEscape="false"    class="form-control  number"/>
 					</td>
 				</tr>
 		 	</tbody>
@@ -187,13 +187,13 @@
 						<input  name="erpCreditChild1s[{{idx}}].eqmUnit" class="form-control" type="text" value="{{row.eqmUnit}}"/>
 					</td>
 					<td>
-						<input  name="erpCreditChild1s[{{idx}}].eqmNumbers" class="form-control" type="text" value="{{row.eqmNumbers}}"/>
+						<input  name="erpCreditChild1s[{{idx}}].eqmNumbers" class="form-control number" type="text" value="{{row.eqmNumbers}}"/>
 					</td>
 					<td>
 						<input  name="erpCreditChild1s[{{idx}}].eqmTotalCapacity" class="form-control" type="text" value="{{row.eqmTotalCapacity}}"/>
 					</td>
 					<td>
-						<input  name="erpCreditChild1s[{{idx}}].eqmBookedFee1" class="form-control" type="text" value="{{row.eqmBookedFee1}}"/>
+						<input  name="erpCreditChild1s[{{idx}}].eqmBookedFee1" class="form-control number" type="text" value="{{row.eqmBookedFee1}}"/>
 					</td>
 
 					<td class="text-center" width="10">
@@ -234,12 +234,12 @@
 					</td>
 					
 					<td  class="max-width-250">
-						<input  name="erpCreditChild2s[{{idx}}].eqmMaterialDetails2" class="form-control required" type="text" value="{{row.eqmMaterialDetails2}}"/>
+						<input  name="erpCreditChild2s[{{idx}}].eqmMaterialDetails2" class="form-control " type="text" value="{{row.eqmMaterialDetails2}}"/>
 					</td>
 					
 					
 					<td  class="max-width-250">
-						<input  name="erpCreditChild2s[{{idx}}].mtlBookedFee2" class="form-control" type="text" value="{{row.mtlBookedFee2}}"/>
+						<input  name="erpCreditChild2s[{{idx}}].mtlBookedFee2" class="form-control number" type="text" value="{{row.mtlBookedFee2}}"/>
 					</td>
 					
 					<td class="text-center" width="10">

+ 1 - 1
src/main/webapp/webpage/modules/sg/financial/erp/erpCreditList.js

@@ -320,7 +320,7 @@ $(document).ready(function() {
 					  jp.close(index);
 	    	       }
 			});
-            getExport(flag,str)
+            // getExport(flag,str)
 		});
 	  $("#export").click(function(){//导出Excel文件
 			jp.downloadFile('${ctx}/sg/financial/erpCredit/exportList');

+ 24 - 24
src/main/webapp/webpage/modules/sg/financial/erp/erpCreditList.jsp

@@ -13,7 +13,7 @@
 	<div class="wrapper wrapper-content">
 	<div class="panel panel-primary">
 	<div class="panel-heading">
-		<h3 class="panel-title">Erp管理列表</h3>
+		<h3 class="panel-title">送审决算信息列表</h3>
 	</div>
 	<div class="panel-body">
 
@@ -37,34 +37,34 @@
 	
 	<!-- 工具栏 -->
 	<div id="toolbar">
-			<%--<shiro:hasPermission name="test:onetomany:dialog:testDataMain1:add">--%>
+			<shiro:hasPermission name="sg:financial:erpCredit:add">
 				<button id="add" class="btn btn-primary" onclick="add()">
 					<i class="glyphicon glyphicon-plus"></i> 新建
 				</button>
-			<%--</shiro:hasPermission>--%>
-				<%--<shiro:hasPermission name="test:onetomany:dialog:testDataMain1:del">--%>
+			</shiro:hasPermission>
+			<shiro:hasPermission name="sg:financial:erpCredit:del">
 				<button id="remove" class="btn btn-danger" disabled onclick="deleteAll()">
 					<i class="glyphicon glyphicon-remove"></i> 删除
 				</button>
-				<%--</shiro:hasPermission>--%>
-			<%--<shiro:hasPermission name="test:onetomany:dialog:testDataMain1:edit">--%>
-			    <button id="edit" class="btn btn-success" disabled onclick="edit()">
-	            	<i class="glyphicon glyphicon-edit"></i> 修改
-	        	</button>
+			</shiro:hasPermission>
+			<%--<shiro:hasPermission name="sg:financial:erpCredit:edit">--%>
+			    <%--<button id="edit" class="btn btn-success" disabled onclick="edit()">--%>
+	            	<%--<i class="glyphicon glyphicon-edit"></i> 修改--%>
+	        	<%--</button>--%>
 			<%--</shiro:hasPermission>--%>
-				<%--<shiro:hasPermission name="test:onetomany:dialog:testDataMain1:view">--%>
-				<button id="view" class="btn btn-default" onclick="view()">
-					<i class="fa fa-search-plus"></i> 查看
-				</button>
-				<%--</shiro:hasPermission>--%>
-			<%--<shiro:hasPermission name="test:onetomany:dialog:testDataMain1:import">--%>
-				<button id="btnImport" class="btn btn-info"><i class="fa fa-folder-open-o"></i> 导入</button>
+			<%--<shiro:hasPermission name="sg:financial:erpCredit:view">--%>
+				<%--<button id="view" class="btn btn-default" onclick="view()">--%>
+					<%--<i class="fa fa-search-plus"></i> 查看--%>
+				<%--</button>--%>
 			<%--</shiro:hasPermission>--%>
-			<%--<shiro:hasPermission name="test:onetomany:dialog:testDataMain1:export">--%>
+			<shiro:hasPermission name="sg:financial:erpCredit:import">
+				<button id="btnImport" class="btn btn-info"><i class="fa fa-folder-open-o"></i> 导入</button>
+			</shiro:hasPermission>
+			<shiro:hasPermission name="sg:financial:erpCredit:export">
 	        		<button id="export" class="btn btn-warning">
 					<i class="fa fa-file-excel-o"></i> 导出
 				</button>
-			 <%--</shiro:hasPermission>--%>
+			 </shiro:hasPermission>
 		    </div>
 		
 	<!-- 表格 -->
@@ -72,15 +72,15 @@
 
     <!-- context menu -->
     <ul id="context-menu" class="dropdown-menu">
-    	<%--<shiro:hasPermission name="test:onetomany:dialog:testDataMain1:view">--%>
+    	<shiro:hasPermission name="sg:financial:erpCredit:view">
         <li data-item="view"><a>查看</a></li>
-        <%--</shiro:hasPermission>--%>
-    	<%--<shiro:hasPermission name="test:onetomany:dialog:testDataMain1:edit">--%>
+        </shiro:hasPermission>
+    	<shiro:hasPermission name="sg:financial:erpCredit:edit">
         <li data-item="edit"><a>编辑</a></li>
-        <%--</shiro:hasPermission>--%>
-        <%--<shiro:hasPermission name="test:onetomany:dialog:testDataMain1:del">--%>
+        </shiro:hasPermission>
+        <shiro:hasPermission name="sg:financial:erpCredit:del">
         <li data-item="delete"><a>删除</a></li>
-        <%--</shiro:hasPermission>--%>
+        </shiro:hasPermission>
         <li data-item="action1"><a>取消</a></li>
     </ul>  
 	</div>

+ 19 - 3
src/main/webapp/webpage/modules/sg/financial/erp/erpCreditTips.jsp

@@ -9,9 +9,17 @@
 <table class="ani table">
 	<thead>
 	<tr>
-		<th width="35%">项目定义编号</th>
-		<th width="30%">有无维护数据</th>
-		<th width="30%">物料是否完成</th>
+		<th>项目定义编号</th>
+		<th>有无维护数据</th>
+		<th>有无开工时间</th>
+		<th>有无结束时间</th>
+		<th>有无批准文号</th>
+		<th>有无设计费</th>
+		<th>有无监理费</th>
+		<th>有无施工单位</th>
+		<th>有无设计单位</th>
+		<th>有无发文总投资</th>
+		<th>物料是否完成</th>
 	</tr>
 	</thead>
 	<tbody>
@@ -19,6 +27,14 @@
 			<tr>
 				<td>${erp.itemId}</td>
 				<td>${erp.mainFlag}</td>
+				<td>${erp.mainStartDate}</td>
+				<td>${erp.mainEndDate}</td>
+				<td>${erp.mainApprovalNumber}</td>
+				<td>${erp.mainDesign}</td>
+				<td>${erp.mainSupervision}</td>
+				<td>${erp.mainConstructionUnits}</td>
+				<td>${erp.mainDesignUnits}</td>
+				<td>${erp.mainInvestmen}</td>
 				<td>${erp.infoFlag}</td>
 			</tr>
 		</c:forEach>

+ 20 - 20
src/main/webapp/webpage/modules/sg/financial/settlement/dataMaintenanceForm.jsp

@@ -48,7 +48,7 @@
 					</td>
 					<td class="width-15 active"><label class="pull-right">设计单位:</label></td>
 					<td class="width-35">
-						<form:input path="designUnits" htmlEscape="false"    class="form-control "/>
+						<form:input path="designUnits" htmlEscape="false"    class="form-control"/>
 					</td>
 				</tr>
 				<tr>
@@ -58,17 +58,17 @@
 					</td>
 					<td class="width-15 active"><label class="pull-right">建筑地址:</label></td>
 					<td class="width-35">
-						<form:input path="address" htmlEscape="false"    class="form-control "/>
+						<form:input path="address" htmlEscape="false"    class="form-control"/>
 					</td>
 				</tr>
 				<tr>
 					<td class="width-15 active"><label class="pull-right">建设性质:</label></td>
 					<td class="width-35">
-						<form:input path="property" htmlEscape="false"    class="form-control "/>
+						<form:input path="property" htmlEscape="false"    class="form-control"/>
 					</td>
 					<td class="width-15 active"><label class="pull-right">发文总投资:</label></td>
 					<td class="width-35">
-						<form:input path="investment" htmlEscape="false"    class="form-control "/>
+						<form:input path="investment" htmlEscape="false"    class="form-control number"/>
 					</td>
 				</tr>
 				<tr>
@@ -94,59 +94,59 @@
 				<tr>
 					<td class="width-15 active"><label class="pull-right">批准文号:</label></td>
 					<td class="width-35">
-						<form:input path="approvalNumber" htmlEscape="false"    class="form-control required"/>
+						<form:input path="approvalNumber" htmlEscape="false"    class="form-control"/>
 					</td>
 					<td class="width-15 active"><label class="pull-right">建筑费:</label></td>
 					<td class="width-35">
-						<form:input path="buildingFee" htmlEscape="false"    class="form-control required"/>
+						<form:input path="buildingFee" htmlEscape="false"    class="form-control number"/>
 					</td>
 				</tr>
 				<tr>
 					<td class="width-15 active"><label class="pull-right">安装费:</label></td>
 					<td class="width-35">
-						<form:input path="installFee" htmlEscape="false"    class="form-control required"/>
+						<form:input path="installFee" htmlEscape="false"    class="form-control number"/>
 					</td>
 					<td class="width-15 active"><label class="pull-right">设备购置费:</label></td>
 					<td class="width-35">
-						<form:input path="equipmentFee" htmlEscape="false"    class="form-control required"/>
+						<form:input path="equipmentFee" htmlEscape="false"    class="form-control number"/>
 					</td>
 				</tr>
 				<tr>
 					<td class="width-15 active"><label class="pull-right">主材费:</label></td>
 					<td class="width-35">
-						<form:input path="materialFee" htmlEscape="false"    class="form-control required"/>
+						<form:input path="materialFee" htmlEscape="false"    class="form-control number"/>
 					</td>
 					<td class="width-15 active"><label class="pull-right">设计费:</label></td>
 					<td class="width-35">
-						<form:input path="designFee" htmlEscape="false"    class="form-control required"/>
+						<form:input path="designFee" htmlEscape="false"    class="form-control number"/>
 					</td>
 				</tr>
 				<tr>
 					<td class="width-15 active"><label class="pull-right">监理费:</label></td>
 					<td class="width-35">
-						<form:input path="supervisionFee" htmlEscape="false"    class="form-control required"/>
+						<form:input path="supervisionFee" htmlEscape="false"    class="form-control number"/>
 					</td>
 					<td class="width-15 active"><label class="pull-right">前期工作费:</label></td>
 					<td class="width-35">
-						<form:input path="preliminaryWorkFee" htmlEscape="false"    class="form-control required"/>
+						<form:input path="preliminaryWorkFee" htmlEscape="false"    class="form-control number"/>
 					</td>
 				</tr>
 				<tr>
 					<td class="width-15 active"><label class="pull-right">线路施工赔偿费:</label></td>
 					<td class="width-35">
-						<form:input path="damages" htmlEscape="false"    class="form-control required"/>
+						<form:input path="damages" htmlEscape="false"    class="form-control number"/>
 					</td>
 					<td class="width-15 active"><label class="pull-right">法人管理费:</label></td>
 					<td class="width-35">
-						<form:input path="managementFee" htmlEscape="false"    class="form-control required"/>
-					</td>
-				</tr>
-				<tr>
-					<td class="width-15 active"><label class="pull-right">合计:</label></td>
-					<td class="width-35">
-						<form:input path="totalFee" htmlEscape="false"    class="form-control required"/>
+						<form:input path="managementFee" htmlEscape="false"    class="form-control number"/>
 					</td>
 				</tr>
+				<%--<tr>--%>
+					<%--<td class="width-15 active"><label class="pull-right">合计:</label></td>--%>
+					<%--<td class="width-35">--%>
+						<%--<form:input path="totalFee" htmlEscape="false"    class="form-control required"/>--%>
+					<%--</td>--%>
+				<%--</tr>--%>
 		 	</tbody>
 		</table>
 	</form:form>

+ 29 - 6
src/main/webapp/webpage/modules/sg/financial/settlement/dataMaintenanceList.js

@@ -86,7 +86,9 @@ $(document).ready(function() {
 		    }
 			,{
 		        field: 'projectId',
+                width:120,
 		        title: '项目定义号'
+
 		        ,formatter:function(value, row , index){
 		        	value = jp.unescapeHTML(value);
 				   <c:choose>
@@ -105,74 +107,95 @@ $(document).ready(function() {
 		    }
 		    ,{
                        field: 'designUnits',
+                       width:230,
                        title: '设计单位'
+
                    }
 		    ,{
                        field: 'constructionUnits',
+                       width:160,
                        title: '施工单位'
+
                    }
 		    ,{
                        field: 'address',
+                       width:120,
                        title: '建筑地址'
                    }
 		    ,{
                        field: 'property',
+                       width:120,
                        title: '建筑属性'
                    }
 		    ,{
                        field: 'investment',
+                       width:100,
                        title: '发文总投资'
                    }
 			,{
 		              field: 'startDate',
 		              title: '开工时间',
+					  align:true,
+                      width:100,
 		              sortable: true,
 		              sortName: 'startDate'
 		    }
 			,{
 		              field: 'endDate',
 		              title: '竣工时间',
+                      width:100,
+                      align:true,
 		              sortable: true,
 		              sortName: 'endDate'
 		    }
 		    ,{
 					   field: 'approvalNumber',
+                       width:200,
 					   title: '审批文号'
                }
              ,{
 					   field: 'buildingFee',
+                       width:100,
 					   title: '建筑费'
                }
              ,{
 					   field: 'installFee',
+                       width:100,
 					   title: '安装费'
                }
              ,{
 					   field: 'equipmentFee',
+                       width:100,
 					   title: '设备购置费'
                }
             ,{
 					   field: 'materialFee',
+                       width:100,
 					   title: '主材费'
                }
              ,{
 					   field: 'designFee',
+                       width:100,
 					   title: '设计费'
                }
              ,{
                        field: 'supervisionFee',
+                       width:100,
                        title: '监理费'
                    }
             ,{
 					   field: 'preliminaryWorkFee',
+                       width:100,
 					   title: '前期工作费'
 				   }
             ,{
 					   field: 'damages',
+                       width:120,
 					   title: '线路施工赔偿费'
                }
             ,{
 					   field: 'managementFee',
+                       width:100,
 					   title: '法人管理费'
                }
              // ,{
@@ -273,12 +296,12 @@ $(document).ready(function() {
 		});
 
 
-	$("#dataTable").colResizable({
-		liveDrag:true,
-		gripInnerHtml:"<div class='grip'></div>",
-		draggingClass:"dragging",
-		resizeMode:'overflow'
-	});
+	// $("#dataTable").colResizable({
+	// 	liveDrag:true,
+	// 	gripInnerHtml:"<div class='grip'></div>",
+	// 	draggingClass:"dragging",
+	// 	resizeMode:'overflow'
+	// });
 		
 	});
 		

+ 23 - 11
src/main/webapp/webpage/modules/sg/financial/settlement/dataMaintenanceList.jsp

@@ -11,6 +11,18 @@
 	<script src="${ctxStatic}/plugin/bootstrapTable/bootstrap-table-resizable.js"></script>
 	<script src="${ctxStatic}/plugin/bootstrapTable/colResizable-1.6.js"></script>
 </head>
+<style>
+	.table {
+		table-layout:fixed;
+		word-break:break-all;
+		word-wrap:break-word;
+		text-align: center;
+	}
+	.table th, .table td {
+		text-align: center;
+		vertical-align: middle!important;
+	}
+</style>
 <body>
 	<div class="wrapper wrapper-content">
 	<div class="panel panel-primary">
@@ -50,16 +62,16 @@
 				<i class="glyphicon glyphicon-remove"></i> 删除
 			</button>
 		</shiro:hasPermission>
-			<shiro:hasPermission name="sg:settlement:edit">
-			    <button id="edit" class="btn btn-success" disabled onclick="edit()">
-	            	<i class="glyphicon glyphicon-edit"></i> 修改
-	        	</button>
-			</shiro:hasPermission>
-		<shiro:hasPermission name="sg:settlement:view">
-			<button id="view" class="btn btn-default" disabled onclick="view()">
-				<i class="fa fa-search-plus"></i> 查看
-			</button>
-		</shiro:hasPermission>
+			<%--<shiro:hasPermission name="sg:settlement:edit">--%>
+			    <%--<button id="edit" class="btn btn-success" disabled onclick="edit()">--%>
+	            	<%--<i class="glyphicon glyphicon-edit"></i> 修改--%>
+	        	<%--</button>--%>
+			<%--</shiro:hasPermission>--%>
+		<%--<shiro:hasPermission name="sg:settlement:view">--%>
+			<%--<button id="view" class="btn btn-default" disabled onclick="view()">--%>
+				<%--<i class="fa fa-search-plus"></i> 查看--%>
+			<%--</button>--%>
+		<%--</shiro:hasPermission>--%>
 		<shiro:hasPermission name="sg:settlement:export">
 			<button id="export1" class="btn btn-warning">
 				<i class="fa fa-file-excel-o"></i> 导出模板
@@ -81,7 +93,7 @@
 		    </div>
 		
 	<!-- 表格 -->
-	<table id="dataTable"   data-toolbar="#toolbar"></table>
+	<table id="dataTable" style="table-layout:fixed"  data-toolbar="#toolbar"></table>
 
     <!-- context menu -->
     <ul id="context-menu" class="dropdown-menu">

+ 1 - 1
src/main/webapp/webpage/modules/test/manytomany/studentCourseForm.jsp

@@ -54,7 +54,7 @@
 					</div>
 				</div>
 				<div class="form-group">
-					<label class="col-sm-2 control-label">备注信息:</label>
+					<label class="col-sm-2 control-label">备注信息:</label>`
 					<div class="col-sm-10">
 						<form:textarea path="remarks" htmlEscape="false" rows="4"    class="form-control "/>
 					</div>