فهرست منبع

统计表相关修改

wangqiang 2 سال پیش
والد
کامیت
1c29ac5cbe
49فایلهای تغییر یافته به همراه3400 افزوده شده و 1223 حذف شده
  1. 1 2
      src/main/java/com/jeeplus/modules/cg/reservemanagementcenter/reserveManage/mapper/DemoliteMapper.java
  2. 136 26
      src/main/java/com/jeeplus/modules/cg/reservemanagementcenter/statisticalTable/entity/BudgetStats.java
  3. 124 0
      src/main/java/com/jeeplus/modules/cg/reservemanagementcenter/statisticalTable/entity/Cable.java
  4. 10 1
      src/main/java/com/jeeplus/modules/cg/reservemanagementcenter/statisticalTable/entity/ConstructeScale.java
  5. 18 0
      src/main/java/com/jeeplus/modules/cg/reservemanagementcenter/statisticalTable/entity/DemoliteList.java
  6. 47 9
      src/main/java/com/jeeplus/modules/cg/reservemanagementcenter/statisticalTable/entity/NormativeAudit.java
  7. 179 119
      src/main/java/com/jeeplus/modules/cg/reservemanagementcenter/statisticalTable/entity/ProgressStats.java
  8. 16 3
      src/main/java/com/jeeplus/modules/cg/reservemanagementcenter/statisticalTable/mapper/BudgetStatsMapper.java
  9. 44 0
      src/main/java/com/jeeplus/modules/cg/reservemanagementcenter/statisticalTable/mapper/CableMapper.java
  10. 6 7
      src/main/java/com/jeeplus/modules/cg/reservemanagementcenter/statisticalTable/mapper/ConstructeScaleMapper.java
  11. 14 7
      src/main/java/com/jeeplus/modules/cg/reservemanagementcenter/statisticalTable/mapper/NormativeAuditMapper.java
  12. 20 33
      src/main/java/com/jeeplus/modules/cg/reservemanagementcenter/statisticalTable/mapper/ProgressStatsMapper.java
  13. 103 5
      src/main/java/com/jeeplus/modules/cg/reservemanagementcenter/statisticalTable/mapper/xml/BudgetStatsMapper.xml
  14. 176 0
      src/main/java/com/jeeplus/modules/cg/reservemanagementcenter/statisticalTable/mapper/xml/CableMapper.xml
  15. 6 5
      src/main/java/com/jeeplus/modules/cg/reservemanagementcenter/statisticalTable/mapper/xml/ConstructeScaleMapper.xml
  16. 2 1
      src/main/java/com/jeeplus/modules/cg/reservemanagementcenter/statisticalTable/mapper/xml/DemoliteListMapper.xml
  17. 1 1
      src/main/java/com/jeeplus/modules/cg/reservemanagementcenter/statisticalTable/mapper/xml/EnginnerQueryMapper.xml
  18. 34 10
      src/main/java/com/jeeplus/modules/cg/reservemanagementcenter/statisticalTable/mapper/xml/NormativeAuditMapper.xml
  19. 56 72
      src/main/java/com/jeeplus/modules/cg/reservemanagementcenter/statisticalTable/mapper/xml/ProgressStatsMapper.xml
  20. 1 1
      src/main/java/com/jeeplus/modules/cg/reservemanagementcenter/statisticalTable/mapper/xml/SpecialSupplyMapper.xml
  21. 77 2
      src/main/java/com/jeeplus/modules/cg/reservemanagementcenter/statisticalTable/service/BudgetStatsService.java
  22. 54 0
      src/main/java/com/jeeplus/modules/cg/reservemanagementcenter/statisticalTable/service/CableService.java
  23. 6 4
      src/main/java/com/jeeplus/modules/cg/reservemanagementcenter/statisticalTable/service/ConstructeScaleService.java
  24. 22 4
      src/main/java/com/jeeplus/modules/cg/reservemanagementcenter/statisticalTable/service/NormativeAuditService.java
  25. 30 22
      src/main/java/com/jeeplus/modules/cg/reservemanagementcenter/statisticalTable/service/ProgressStatsService.java
  26. 258 155
      src/main/java/com/jeeplus/modules/cg/reservemanagementcenter/statisticalTable/util/ExcelExportUtil.java
  27. 124 55
      src/main/java/com/jeeplus/modules/cg/reservemanagementcenter/statisticalTable/util/ExcelImportUtil.java
  28. 55 84
      src/main/java/com/jeeplus/modules/cg/reservemanagementcenter/statisticalTable/web/BudgetStatsController.java
  29. 209 0
      src/main/java/com/jeeplus/modules/cg/reservemanagementcenter/statisticalTable/web/CableController.java
  30. 30 22
      src/main/java/com/jeeplus/modules/cg/reservemanagementcenter/statisticalTable/web/ConstructeScaleController.java
  31. 10 21
      src/main/java/com/jeeplus/modules/cg/reservemanagementcenter/statisticalTable/web/EnginnerQueryController.java
  32. 160 66
      src/main/java/com/jeeplus/modules/cg/reservemanagementcenter/statisticalTable/web/NormativeAuditController.java
  33. 545 344
      src/main/java/com/jeeplus/modules/cg/reservemanagementcenter/statisticalTable/web/ProgressStatsController.java
  34. 10 21
      src/main/java/com/jeeplus/modules/cg/reservemanagementcenter/statisticalTable/web/SpecialSupplyController.java
  35. 5 26
      src/main/java/com/jeeplus/modules/sg/financial/settlement/web/ProjectBudgetController.java
  36. BIN
      src/main/resources/freemarker/excelmodel/budgetStats.xlsx
  37. BIN
      src/main/resources/freemarker/excelmodel/cable.xlsx
  38. BIN
      src/main/resources/freemarker/excelmodel/constructeScale.xlsx
  39. BIN
      src/main/resources/freemarker/excelmodel/demoliteList.xlsx
  40. BIN
      src/main/resources/freemarker/excelmodel/progressStats.xlsx
  41. 16 16
      src/main/webapp/webpage/modules/cg/statisticalTable/budgetStats/budgetStats.js
  42. 278 0
      src/main/webapp/webpage/modules/cg/statisticalTable/cable/cable.js
  43. 112 0
      src/main/webapp/webpage/modules/cg/statisticalTable/cable/cable.jsp
  44. 3 2
      src/main/webapp/webpage/modules/cg/statisticalTable/constructeScale/constructeScale.js
  45. 16 45
      src/main/webapp/webpage/modules/cg/statisticalTable/demoliteList/demoliteList.js
  46. 170 18
      src/main/webapp/webpage/modules/cg/statisticalTable/normative/normative.js
  47. 6 1
      src/main/webapp/webpage/modules/cg/statisticalTable/normative/normative.jsp
  48. 191 0
      src/main/webapp/webpage/modules/cg/statisticalTable/normative/normativeEdit.jsp
  49. 19 13
      src/main/webapp/webpage/modules/cg/statisticalTable/progressStats/progressStats.js

+ 1 - 2
src/main/java/com/jeeplus/modules/cg/reservemanagementcenter/reserveManage/mapper/DemoliteMapper.java

@@ -3,7 +3,6 @@ package com.jeeplus.modules.cg.reservemanagementcenter.reserveManage.mapper;
 import com.jeeplus.core.persistence.BaseMapper;
 import com.jeeplus.core.persistence.annotation.MyBatisMapper;
 import com.jeeplus.modules.cg.reservemanagementcenter.reserveManage.entity.Demolite;
-import com.jeeplus.modules.sg.managementcenter.materialinfo.entity.MaterialInfo;
 import org.apache.ibatis.annotations.Param;
 
 import java.util.List;
@@ -17,7 +16,7 @@ import java.util.List;
 public interface DemoliteMapper extends BaseMapper<Demolite> {
 
     /**
-     * 插入对应的项目甲供材信息
+     * 插入对应的项目拆旧清册信息
      * */
     void insertList(@Param("list") List<Demolite> list);
 

+ 136 - 26
src/main/java/com/jeeplus/modules/cg/reservemanagementcenter/statisticalTable/entity/BudgetStats.java

@@ -9,9 +9,7 @@ import com.jeeplus.core.persistence.DataEntity;
  **/
 public class BudgetStats extends DataEntity<BudgetStats> {
 
-    private String reserveProgress;                     //储备进度
-    private String implementPlan;                       //是否纳入实施计划
-    private String implementBatch;                      //初定实施批次
+
     private String projectReserveId;                    //项目储备编号
     private String pretrialEstimateAmount;              //概算信息(审前)- 总概算金额(含税)
     private String pretrialEstimateAmountExcludeTax;    //概算信息(审前)- 总概算金额(不含税)
@@ -35,6 +33,8 @@ public class BudgetStats extends DataEntity<BudgetStats> {
     private String afterTrialSupervisionFee;            //概算信息(审后)- 监理费(含税)
     private String budgetRevision;                      //是否完成概算修改
     private String completeTime;                        //概算修改完成时间
+    private String designChange;                        //是否有设计变更
+    private String designChangeStatus;                  //设计变更状态
 
     //储备项目基本信息
     private String projectYear;             //项目年份
@@ -55,30 +55,20 @@ public class BudgetStats extends DataEntity<BudgetStats> {
     private String costEstimate;             //费用估算
     private String basicRemarks;             //备注
 
+    private String reserveProgress;          //储备进度
+    private String implementPlan;            //是否纳入实施计划
+    private String implementBatch;           //初定实施批次
+    private String projectReleaseBatch;      //项目下达批次
+    private String ownerProjectManager;      //业主项目经理
+    private String siteManagementUnit;       //现场施工管理单位
+    private String electricalProjectManager; //施工项目经理(电气)
+    private String civilEngineerProjectManager; //施工项目经理(土建)
+    private String electricalSubcontractor;  //电气分包单位
+    private String electricalContact;        //电气联系人、联系电话
+    private String civilEngineerSubcontractor; //土建分包单位
+    private String civilEngineerContact;     //土建联系人、联系电话
+    private String subcontractInfoRemark;     //分包信息-备注
 
-    public String getReserveProgress() {
-        return reserveProgress;
-    }
-
-    public void setReserveProgress(String reserveProgress) {
-        this.reserveProgress = reserveProgress;
-    }
-
-    public String getImplementPlan() {
-        return implementPlan;
-    }
-
-    public void setImplementPlan(String implementPlan) {
-        this.implementPlan = implementPlan;
-    }
-
-    public String getImplementBatch() {
-        return implementBatch;
-    }
-
-    public void setImplementBatch(String implementBatch) {
-        this.implementBatch = implementBatch;
-    }
 
     public String getProjectReserveId() {
         return projectReserveId;
@@ -264,6 +254,22 @@ public class BudgetStats extends DataEntity<BudgetStats> {
         this.completeTime = completeTime;
     }
 
+    public String getDesignChange() {
+        return designChange;
+    }
+
+    public void setDesignChange(String designChange) {
+        this.designChange = designChange;
+    }
+
+    public String getDesignChangeStatus() {
+        return designChangeStatus;
+    }
+
+    public void setDesignChangeStatus(String designChangeStatus) {
+        this.designChangeStatus = designChangeStatus;
+    }
+
     public String getProjectYear() {
         return projectYear;
     }
@@ -399,4 +405,108 @@ public class BudgetStats extends DataEntity<BudgetStats> {
     public void setBasicRemarks(String basicRemarks) {
         this.basicRemarks = basicRemarks;
     }
+
+    public String getReserveProgress() {
+        return reserveProgress;
+    }
+
+    public void setReserveProgress(String reserveProgress) {
+        this.reserveProgress = reserveProgress;
+    }
+
+    public String getImplementPlan() {
+        return implementPlan;
+    }
+
+    public void setImplementPlan(String implementPlan) {
+        this.implementPlan = implementPlan;
+    }
+
+    public String getImplementBatch() {
+        return implementBatch;
+    }
+
+    public void setImplementBatch(String implementBatch) {
+        this.implementBatch = implementBatch;
+    }
+
+    public String getProjectReleaseBatch() {
+        return projectReleaseBatch;
+    }
+
+    public void setProjectReleaseBatch(String projectReleaseBatch) {
+        this.projectReleaseBatch = projectReleaseBatch;
+    }
+
+    public String getOwnerProjectManager() {
+        return ownerProjectManager;
+    }
+
+    public void setOwnerProjectManager(String ownerProjectManager) {
+        this.ownerProjectManager = ownerProjectManager;
+    }
+
+    public String getSiteManagementUnit() {
+        return siteManagementUnit;
+    }
+
+    public void setSiteManagementUnit(String siteManagementUnit) {
+        this.siteManagementUnit = siteManagementUnit;
+    }
+
+    public String getElectricalProjectManager() {
+        return electricalProjectManager;
+    }
+
+    public void setElectricalProjectManager(String electricalProjectManager) {
+        this.electricalProjectManager = electricalProjectManager;
+    }
+
+    public String getCivilEngineerProjectManager() {
+        return civilEngineerProjectManager;
+    }
+
+    public void setCivilEngineerProjectManager(String civilEngineerProjectManager) {
+        this.civilEngineerProjectManager = civilEngineerProjectManager;
+    }
+
+    public String getElectricalSubcontractor() {
+        return electricalSubcontractor;
+    }
+
+    public void setElectricalSubcontractor(String electricalSubcontractor) {
+        this.electricalSubcontractor = electricalSubcontractor;
+    }
+
+    public String getElectricalContact() {
+        return electricalContact;
+    }
+
+    public void setElectricalContact(String electricalContact) {
+        this.electricalContact = electricalContact;
+    }
+
+    public String getCivilEngineerSubcontractor() {
+        return civilEngineerSubcontractor;
+    }
+
+    public void setCivilEngineerSubcontractor(String civilEngineerSubcontractor) {
+        this.civilEngineerSubcontractor = civilEngineerSubcontractor;
+    }
+
+    public String getCivilEngineerContact() {
+        return civilEngineerContact;
+    }
+
+    public void setCivilEngineerContact(String civilEngineerContact) {
+        this.civilEngineerContact = civilEngineerContact;
+    }
+
+    public String getSubcontractInfoRemark() {
+        return subcontractInfoRemark;
+    }
+
+    public void setSubcontractInfoRemark(String subcontractInfoRemark) {
+        this.subcontractInfoRemark = subcontractInfoRemark;
+    }
 }

+ 124 - 0
src/main/java/com/jeeplus/modules/cg/reservemanagementcenter/statisticalTable/entity/Cable.java

@@ -0,0 +1,124 @@
+package com.jeeplus.modules.cg.reservemanagementcenter.statisticalTable.entity;
+
+import com.jeeplus.core.persistence.DataEntity;
+
+/**
+ * 电缆段长统计表
+ * @author: 王强
+ * @create: 2022-11-04 08:51
+ **/
+public class Cable extends DataEntity<Cable> {
+
+    private String projectReserveId;        //项目储备编号
+    private String projectName;             //项目名称
+    private String specifications;          //电缆规格型号
+    private String civilEngineer;           //是否含土建
+    private String pipeLayeCable;           //是否在现有管道施放电缆
+    private String completePipe;            //是否完成通管
+    private String completeMeasurement;     //是否完成实测
+    private String measureLength;           //实测长度
+    private String designCableLength;           //设计电缆段长
+    private String segmentLengthClassinication; //段长分类
+    private String projectManager;          //项目经理
+    private String remarks;                 //备注
+
+
+    public String getProjectReserveId() {
+        return projectReserveId;
+    }
+
+    public void setProjectReserveId(String projectReserveId) {
+        this.projectReserveId = projectReserveId;
+    }
+
+    public String getProjectName() {
+        return projectName;
+    }
+
+    public void setProjectName(String projectName) {
+        this.projectName = projectName;
+    }
+
+    public String getSpecifications() {
+        return specifications;
+    }
+
+    public void setSpecifications(String specifications) {
+        this.specifications = specifications;
+    }
+
+    public String getCivilEngineer() {
+        return civilEngineer;
+    }
+
+    public void setCivilEngineer(String civilEngineer) {
+        this.civilEngineer = civilEngineer;
+    }
+
+    public String getPipeLayeCable() {
+        return pipeLayeCable;
+    }
+
+    public void setPipeLayeCable(String pipeLayeCable) {
+        this.pipeLayeCable = pipeLayeCable;
+    }
+
+    public String getCompletePipe() {
+        return completePipe;
+    }
+
+    public void setCompletePipe(String completePipe) {
+        this.completePipe = completePipe;
+    }
+
+    public String getCompleteMeasurement() {
+        return completeMeasurement;
+    }
+
+    public void setCompleteMeasurement(String completeMeasurement) {
+        this.completeMeasurement = completeMeasurement;
+    }
+
+    public String getMeasureLength() {
+        return measureLength;
+    }
+
+    public void setMeasureLength(String measureLength) {
+        this.measureLength = measureLength;
+    }
+
+    public String getDesignCableLength() {
+        return designCableLength;
+    }
+
+    public void setDesignCableLength(String designCableLength) {
+        this.designCableLength = designCableLength;
+    }
+
+    public String getSegmentLengthClassinication() {
+        return segmentLengthClassinication;
+    }
+
+    public void setSegmentLengthClassinication(String segmentLengthClassinication) {
+        this.segmentLengthClassinication = segmentLengthClassinication;
+    }
+
+    public String getProjectManager() {
+        return projectManager;
+    }
+
+    public void setProjectManager(String projectManager) {
+        this.projectManager = projectManager;
+    }
+
+    @Override
+    public String getRemarks() {
+        return remarks;
+    }
+
+    @Override
+    public void setRemarks(String remarks) {
+        this.remarks = remarks;
+    }
+
+}

+ 10 - 1
src/main/java/com/jeeplus/modules/cg/reservemanagementcenter/statisticalTable/entity/ConstructeScale.java

@@ -29,7 +29,8 @@ public class ConstructeScale extends DataEntity<ConstructeScale> {
     private String costEstimate;            //费用估算
 
     //统计表-:概预算统计表
-    private String afterTrialEstimateAmount;        //概算
+    private String afterTrialEstimateAmount;        //总概算金额(含税)
+    private String afterTrialEstimateAmountExcludeTax;        //总概算金额(不含税)
 
     //从其字段
     private String reserveProgress;            //项目进度
@@ -207,6 +208,14 @@ public class ConstructeScale extends DataEntity<ConstructeScale> {
         this.afterTrialEstimateAmount = afterTrialEstimateAmount;
     }
 
+    public String getAfterTrialEstimateAmountExcludeTax() {
+        return afterTrialEstimateAmountExcludeTax;
+    }
+
+    public void setAfterTrialEstimateAmountExcludeTax(String afterTrialEstimateAmountExcludeTax) {
+        this.afterTrialEstimateAmountExcludeTax = afterTrialEstimateAmountExcludeTax;
+    }
+
     public String getReserveProgress() {
         return reserveProgress;
     }

+ 18 - 0
src/main/java/com/jeeplus/modules/cg/reservemanagementcenter/statisticalTable/entity/DemoliteList.java

@@ -9,6 +9,7 @@ import com.jeeplus.core.persistence.DataEntity;
  **/
 public class DemoliteList extends DataEntity<DemoliteList> {
 
+    private String projectYear;         //项目年份
     private String projectReserveId;    //项目储备编号
     private String projectName;         //项目名称
     private String materialName;        //物料名称
@@ -16,6 +17,23 @@ public class DemoliteList extends DataEntity<DemoliteList> {
     private String unit;                //单位
     private String count;               //数量
     private String remark;              //备注
+    private String projectNumber;       //项目定义号
+
+    public String getProjectYear() {
+        return projectYear;
+    }
+
+    public void setProjectYear(String projectYear) {
+        this.projectYear = projectYear;
+    }
+
+    public String getProjectNumber() {
+        return projectNumber;
+    }
+
+    public void setProjectNumber(String projectNumber) {
+        this.projectNumber = projectNumber;
+    }
 
     public String getProjectReserveId() {
         return projectReserveId;

+ 47 - 9
src/main/java/com/jeeplus/modules/cg/reservemanagementcenter/statisticalTable/entity/NormativeAudit.java

@@ -36,11 +36,17 @@ public class NormativeAudit extends DataEntity<NormativeAudit> {
     private String budgetBook;               //预算书
     private String designManual;             //设计说明书
     private String materialList;             //提资材料清册
-    private String feasibilityReport;        //可研报告
     private String projectProposal;          //项目建议书
     private String oldInventoryDemolition;   //拆旧清册
     private String noStopWorkPlan;           //不停电作业方案/停电作业申报表
     private String castPlaceApprovalForm;    //土建现浇审批单
+
+    private String drawingAndSiteProblem;                //图纸与现场一致性问题
+    private String communicationProblem;                 //自动化通信方式问题
+    private String civilPrefabricateProblem;             //土建预制化问题
+    private String liveWorkNumProblem;                   //带电作业次数问题
+    private String projectManagerOtherProblem;           //其他问题
+
     private String reviewMaterial;           //甲供材优选审核
     private String aSupplyTob;               //甲供转乙供情况
     private String templateCorrect;          //预算模板是否正确
@@ -255,14 +261,6 @@ public class NormativeAudit extends DataEntity<NormativeAudit> {
         this.materialList = materialList;
     }
 
-    public String getFeasibilityReport() {
-        return feasibilityReport;
-    }
-
-    public void setFeasibilityReport(String feasibilityReport) {
-        this.feasibilityReport = feasibilityReport;
-    }
-
     public String getProjectProposal() {
         return projectProposal;
     }
@@ -295,6 +293,46 @@ public class NormativeAudit extends DataEntity<NormativeAudit> {
         this.castPlaceApprovalForm = castPlaceApprovalForm;
     }
 
+    public String getDrawingAndSiteProblem() {
+        return drawingAndSiteProblem;
+    }
+
+    public void setDrawingAndSiteProblem(String drawingAndSiteProblem) {
+        this.drawingAndSiteProblem = drawingAndSiteProblem;
+    }
+
+    public String getCommunicationProblem() {
+        return communicationProblem;
+    }
+
+    public void setCommunicationProblem(String communicationProblem) {
+        this.communicationProblem = communicationProblem;
+    }
+
+    public String getCivilPrefabricateProblem() {
+        return civilPrefabricateProblem;
+    }
+
+    public void setCivilPrefabricateProblem(String civilPrefabricateProblem) {
+        this.civilPrefabricateProblem = civilPrefabricateProblem;
+    }
+
+    public String getLiveWorkNumProblem() {
+        return liveWorkNumProblem;
+    }
+
+    public void setLiveWorkNumProblem(String liveWorkNumProblem) {
+        this.liveWorkNumProblem = liveWorkNumProblem;
+    }
+
+    public String getProjectManagerOtherProblem() {
+        return projectManagerOtherProblem;
+    }
+
+    public void setProjectManagerOtherProblem(String projectManagerOtherProblem) {
+        this.projectManagerOtherProblem = projectManagerOtherProblem;
+    }
+
     public String getReviewMaterial() {
         return reviewMaterial;
     }

+ 179 - 119
src/main/java/com/jeeplus/modules/cg/reservemanagementcenter/statisticalTable/entity/ProgressStats.java

@@ -9,8 +9,17 @@ import com.jeeplus.core.persistence.DataEntity;
  **/
 public class ProgressStats extends DataEntity<ProgressStats> {
 
-    private String projectReserveId;                //项目储备编号
-    private String reserveProgress;                 //储备进度
+    private String projectReserveId;        //项目储备编号
+    private String projectName;             //储备项目名称
+    private String requirementType;         //储备项目类型
+    private String demandUnit;              //需求提出单位
+    private String reserveBatches;          //储备批次
+    private String basicRemarks;            //备注
+
+    private String reserveProgress;         //储备进度
+    private String implementPlan;           //是否纳入实施计划
+    private String initialImplementBatch;   //初定实施批次
+
     private String inspectDepartmentReview;         //是否通过运检部评审
     private String inspectDepartmentReviewTime;     //通过运检部评审时间
     private String releaseReserveTime;              //运检部下达储备时间
@@ -19,29 +28,43 @@ public class ProgressStats extends DataEntity<ProgressStats> {
     private String limitDate;                       //初设提交限定日期
     private String onSiteConfess;                   //是否进行现场交底
     private String confessCompleteTime;             //交底完成时间
-    private String completeDesign;                  //是否完成初设
-    private String submitTime;                      //初设提交时间
-    private String completeDraw;                    //是否完成审图
-    private String drawAudit;                       //是否通过图纸审核
-    private String reasonForFailure;                //未通过原因分析
-    private String passAuditDate;                   //通过审核日期
-    private String changeDesign;                    //是否需设计变更
-    private String completeReview;                  //概预算-是否完成审核
+
+    private String includeReserve;          //是否进行储备
+    private String completeDesign;          //是否完成初设
+    private String submitTime;              //初设提交时间
+
+    private String completeDraw;            //是否进行审图
+    private String completeDrawDate;        //审图日期
+    private String drawAudit;               //是否通过图纸审核
+    private String passAuditDate;           //通过审核日期
+    private String reasonForFailure;        //未通过原因分析
+    private String changeDesign;            //是否需设计变更
+    private String drawRemarks;             //项目经理审图-备注
+
+
+    private String whetherToAudit;                  //概预算-是否进行审核
+    private String auditDate;                       //概预算-审核日期
     private String expertReview;                    //概预算-是否通过专家审核
-    private String estimateReasonForFailure;        //概预算-未通过原因分析
     private String estimatePassAuditDate;           //概预算-通过审核日期
+    private String estimateReasonForFailure;        //概预算-未通过原因分析
     private String estimateChangeDesign;            //概预算-是否需设计变更
+    private String budgetRemarks;                   //概预算审核-备注
+
     private String provincialCompanyReview;         //是否参加省公司评审
-    private String provincialCompanyReviewBatch;    //省公司评审批次
+    private String provincialCompanyReviewBatch;    //省公司评审批次/日期
     private String passProvincialCompanyReview;     //是否通过省公司评审
-    private String causeAnalysis;                   //未通过原因分析
+    private String causeAnalysis;                   //评审意见
     private String designChange;                    //是否需设计变更
+    private String provincialCompanyRemarks;        //省公司评审-备注
+
     private String drawingReview;                   //图纸联合审查-是否进行图纸审查
-    private String reviewDate;                      //图纸联合审查-审图日期
+    private String reviewDate;                      //图纸联合审查-联合审图日期
     private String passDrawingReview;               //图纸联合审查-是否通过图纸审查
-    private String reviewComment;                   //图纸联合审查未通过审图意见
-    private String approvedDate;                    //图纸联合审查通过审核日期
+    private String approvedDate;                    //图纸联合审查-通过联合审图日期
+    private String reviewComment;                   //图纸联合审查-审图意见
     private String jointReviewDesignChange;         //图纸联合审查-是否需设计变更
+    private String drawingUnionRemarks;             //图纸联合审查-备注
+
     private String drawingFinalize;                 //图纸是否定稿
     private String finalDate;                       //定稿日期
     private String formalDrawing;                   //是否打印正式图纸
@@ -49,17 +72,6 @@ public class ProgressStats extends DataEntity<ProgressStats> {
     private String transferProjectCenterDate;       //正式图纸移交项目中心日期
     private String transferToConstructionUnitDate;  //正式图纸移交施工单位日期
 
-    //储备项目基本信息
-    private String projectName;             //项目名称
-    private String requirementType;         //需求类型
-    private String demandUnit;              //需求单位
-    private String reserveBatches;          //储备批次
-    private String basicRemarks;            //备注
-    //储备项目交底信息汇总统计表
-    private String implementPlan;           //是否纳入实施计划
-    private String initialImplementBatch;   //初定实施批次
-    private String includeReserve;          //是否纳入储备
-
     public String getProjectReserveId() {
         return projectReserveId;
     }
@@ -68,6 +80,46 @@ public class ProgressStats extends DataEntity<ProgressStats> {
         this.projectReserveId = projectReserveId;
     }
 
+    public String getProjectName() {
+        return projectName;
+    }
+
+    public void setProjectName(String projectName) {
+        this.projectName = projectName;
+    }
+
+    public String getRequirementType() {
+        return requirementType;
+    }
+
+    public void setRequirementType(String requirementType) {
+        this.requirementType = requirementType;
+    }
+
+    public String getDemandUnit() {
+        return demandUnit;
+    }
+
+    public void setDemandUnit(String demandUnit) {
+        this.demandUnit = demandUnit;
+    }
+
+    public String getReserveBatches() {
+        return reserveBatches;
+    }
+
+    public void setReserveBatches(String reserveBatches) {
+        this.reserveBatches = reserveBatches;
+    }
+
+    public String getBasicRemarks() {
+        return basicRemarks;
+    }
+
+    public void setBasicRemarks(String basicRemarks) {
+        this.basicRemarks = basicRemarks;
+    }
+
     public String getReserveProgress() {
         return reserveProgress;
     }
@@ -76,6 +128,22 @@ public class ProgressStats extends DataEntity<ProgressStats> {
         this.reserveProgress = reserveProgress;
     }
 
+    public String getImplementPlan() {
+        return implementPlan;
+    }
+
+    public void setImplementPlan(String implementPlan) {
+        this.implementPlan = implementPlan;
+    }
+
+    public String getInitialImplementBatch() {
+        return initialImplementBatch;
+    }
+
+    public void setInitialImplementBatch(String initialImplementBatch) {
+        this.initialImplementBatch = initialImplementBatch;
+    }
+
     public String getInspectDepartmentReview() {
         return inspectDepartmentReview;
     }
@@ -140,6 +208,14 @@ public class ProgressStats extends DataEntity<ProgressStats> {
         this.confessCompleteTime = confessCompleteTime;
     }
 
+    public String getIncludeReserve() {
+        return includeReserve;
+    }
+
+    public void setIncludeReserve(String includeReserve) {
+        this.includeReserve = includeReserve;
+    }
+
     public String getCompleteDesign() {
         return completeDesign;
     }
@@ -164,20 +240,20 @@ public class ProgressStats extends DataEntity<ProgressStats> {
         this.completeDraw = completeDraw;
     }
 
-    public String getDrawAudit() {
-        return drawAudit;
+    public String getCompleteDrawDate() {
+        return completeDrawDate;
     }
 
-    public void setDrawAudit(String drawAudit) {
-        this.drawAudit = drawAudit;
+    public void setCompleteDrawDate(String completeDrawDate) {
+        this.completeDrawDate = completeDrawDate;
     }
 
-    public String getReasonForFailure() {
-        return reasonForFailure;
+    public String getDrawAudit() {
+        return drawAudit;
     }
 
-    public void setReasonForFailure(String reasonForFailure) {
-        this.reasonForFailure = reasonForFailure;
+    public void setDrawAudit(String drawAudit) {
+        this.drawAudit = drawAudit;
     }
 
     public String getPassAuditDate() {
@@ -188,6 +264,14 @@ public class ProgressStats extends DataEntity<ProgressStats> {
         this.passAuditDate = passAuditDate;
     }
 
+    public String getReasonForFailure() {
+        return reasonForFailure;
+    }
+
+    public void setReasonForFailure(String reasonForFailure) {
+        this.reasonForFailure = reasonForFailure;
+    }
+
     public String getChangeDesign() {
         return changeDesign;
     }
@@ -196,28 +280,36 @@ public class ProgressStats extends DataEntity<ProgressStats> {
         this.changeDesign = changeDesign;
     }
 
-    public String getCompleteReview() {
-        return completeReview;
+    public String getDrawRemarks() {
+        return drawRemarks;
     }
 
-    public void setCompleteReview(String completeReview) {
-        this.completeReview = completeReview;
+    public void setDrawRemarks(String drawRemarks) {
+        this.drawRemarks = drawRemarks;
     }
 
-    public String getExpertReview() {
-        return expertReview;
+    public String getWhetherToAudit() {
+        return whetherToAudit;
     }
 
-    public void setExpertReview(String expertReview) {
-        this.expertReview = expertReview;
+    public void setWhetherToAudit(String whetherToAudit) {
+        this.whetherToAudit = whetherToAudit;
     }
 
-    public String getEstimateReasonForFailure() {
-        return estimateReasonForFailure;
+    public String getAuditDate() {
+        return auditDate;
     }
 
-    public void setEstimateReasonForFailure(String estimateReasonForFailure) {
-        this.estimateReasonForFailure = estimateReasonForFailure;
+    public void setAuditDate(String auditDate) {
+        this.auditDate = auditDate;
+    }
+
+    public String getExpertReview() {
+        return expertReview;
+    }
+
+    public void setExpertReview(String expertReview) {
+        this.expertReview = expertReview;
     }
 
     public String getEstimatePassAuditDate() {
@@ -228,6 +320,14 @@ public class ProgressStats extends DataEntity<ProgressStats> {
         this.estimatePassAuditDate = estimatePassAuditDate;
     }
 
+    public String getEstimateReasonForFailure() {
+        return estimateReasonForFailure;
+    }
+
+    public void setEstimateReasonForFailure(String estimateReasonForFailure) {
+        this.estimateReasonForFailure = estimateReasonForFailure;
+    }
+
     public String getEstimateChangeDesign() {
         return estimateChangeDesign;
     }
@@ -236,6 +336,14 @@ public class ProgressStats extends DataEntity<ProgressStats> {
         this.estimateChangeDesign = estimateChangeDesign;
     }
 
+    public String getBudgetRemarks() {
+        return budgetRemarks;
+    }
+
+    public void setBudgetRemarks(String budgetRemarks) {
+        this.budgetRemarks = budgetRemarks;
+    }
+
     public String getProvincialCompanyReview() {
         return provincialCompanyReview;
     }
@@ -276,6 +384,14 @@ public class ProgressStats extends DataEntity<ProgressStats> {
         this.designChange = designChange;
     }
 
+    public String getProvincialCompanyRemarks() {
+        return provincialCompanyRemarks;
+    }
+
+    public void setProvincialCompanyRemarks(String provincialCompanyRemarks) {
+        this.provincialCompanyRemarks = provincialCompanyRemarks;
+    }
+
     public String getDrawingReview() {
         return drawingReview;
     }
@@ -300,14 +416,6 @@ public class ProgressStats extends DataEntity<ProgressStats> {
         this.passDrawingReview = passDrawingReview;
     }
 
-    public String getReviewComment() {
-        return reviewComment;
-    }
-
-    public void setReviewComment(String reviewComment) {
-        this.reviewComment = reviewComment;
-    }
-
     public String getApprovedDate() {
         return approvedDate;
     }
@@ -316,6 +424,14 @@ public class ProgressStats extends DataEntity<ProgressStats> {
         this.approvedDate = approvedDate;
     }
 
+    public String getReviewComment() {
+        return reviewComment;
+    }
+
+    public void setReviewComment(String reviewComment) {
+        this.reviewComment = reviewComment;
+    }
+
     public String getJointReviewDesignChange() {
         return jointReviewDesignChange;
     }
@@ -324,6 +440,14 @@ public class ProgressStats extends DataEntity<ProgressStats> {
         this.jointReviewDesignChange = jointReviewDesignChange;
     }
 
+    public String getDrawingUnionRemarks() {
+        return drawingUnionRemarks;
+    }
+
+    public void setDrawingUnionRemarks(String drawingUnionRemarks) {
+        this.drawingUnionRemarks = drawingUnionRemarks;
+    }
+
     public String getDrawingFinalize() {
         return drawingFinalize;
     }
@@ -371,68 +495,4 @@ public class ProgressStats extends DataEntity<ProgressStats> {
     public void setTransferToConstructionUnitDate(String transferToConstructionUnitDate) {
         this.transferToConstructionUnitDate = transferToConstructionUnitDate;
     }
-
-    public String getProjectName() {
-        return projectName;
-    }
-
-    public void setProjectName(String projectName) {
-        this.projectName = projectName;
-    }
-
-    public String getRequirementType() {
-        return requirementType;
-    }
-
-    public void setRequirementType(String requirementType) {
-        this.requirementType = requirementType;
-    }
-
-    public String getDemandUnit() {
-        return demandUnit;
-    }
-
-    public void setDemandUnit(String demandUnit) {
-        this.demandUnit = demandUnit;
-    }
-
-    public String getReserveBatches() {
-        return reserveBatches;
-    }
-
-    public void setReserveBatches(String reserveBatches) {
-        this.reserveBatches = reserveBatches;
-    }
-
-    public String getBasicRemarks() {
-        return basicRemarks;
-    }
-
-    public void setBasicRemarks(String basicRemarks) {
-        this.basicRemarks = basicRemarks;
-    }
-
-    public String getImplementPlan() {
-        return implementPlan;
-    }
-
-    public void setImplementPlan(String implementPlan) {
-        this.implementPlan = implementPlan;
-    }
-
-    public String getInitialImplementBatch() {
-        return initialImplementBatch;
-    }
-
-    public void setInitialImplementBatch(String initialImplementBatch) {
-        this.initialImplementBatch = initialImplementBatch;
-    }
-
-    public String getIncludeReserve() {
-        return includeReserve;
-    }
-
-    public void setIncludeReserve(String includeReserve) {
-        this.includeReserve = includeReserve;
-    }
 }

+ 16 - 3
src/main/java/com/jeeplus/modules/cg/reservemanagementcenter/statisticalTable/mapper/BudgetStatsMapper.java

@@ -6,6 +6,7 @@ import com.jeeplus.modules.cg.reservemanagementcenter.statisticalTable.entity.Bu
 import com.jeeplus.modules.cg.reservemanagementcenter.statisticalTable.entity.History;
 import org.apache.ibatis.annotations.Param;
 
+import java.util.Date;
 import java.util.List;
 
 /**
@@ -17,6 +18,19 @@ import java.util.List;
 public interface BudgetStatsMapper extends BaseMapper<BudgetStats> {
 
     /**
+     * 获取省公司评审表的  更新时间
+     * @param proId
+     * @return
+     */
+    Date getTimeByProID(String proId);
+
+    /**
+     * 根据项目储备id删除对应数据
+     * @param proId
+     */
+    void deleteByProId(String proId);
+
+    /**
      * 批量添加储备项目概预算统计信息
      * @param list
      * @return
@@ -53,12 +67,11 @@ public interface BudgetStatsMapper extends BaseMapper<BudgetStats> {
     List<History> getHistoryByExecuteId(String executeId);
 
     /**
-     * 根据executeId和节点名称查出历史节点信息
+     * 根据executeId查出历史节点信息
      * @param executeId
      * @return
      */
-    List<History> getHistoryByActName(@Param("executeId") String executeId,
-                                @Param("name") String name);
+    List<History> getHistoryByActName(@Param("executeId") String executeId);
 
     /**
      * 根据节点的时间和executeId来查找

+ 44 - 0
src/main/java/com/jeeplus/modules/cg/reservemanagementcenter/statisticalTable/mapper/CableMapper.java

@@ -0,0 +1,44 @@
+package com.jeeplus.modules.cg.reservemanagementcenter.statisticalTable.mapper;
+
+import com.jeeplus.core.persistence.BaseMapper;
+import com.jeeplus.core.persistence.annotation.MyBatisMapper;
+import com.jeeplus.modules.cg.reservemanagementcenter.statisticalTable.entity.Cable;
+import com.jeeplus.modules.cg.reservemanagementcenter.statisticalTable.entity.MaterialData;
+import org.apache.ibatis.annotations.Param;
+
+import java.util.List;
+
+/**
+ * 电缆段长统计表  mapper
+ * @author: 王强
+ * @create: 2022-11-04 08:54
+ **/
+@MyBatisMapper
+public interface CableMapper extends BaseMapper<Cable> {
+
+    /**
+     * 根据项目名称去 甲供材表中获取数据
+     * @param name
+     * @return
+     */
+    List<MaterialData> getByProjectName(String name);
+
+    /**
+     * 根据项目储备id删除对应数据
+     * @param proId
+     */
+    void deleteByProId(String proId);
+
+    /**
+     * 批量添加电缆段长统计表信息
+     * @param list
+     */
+    void insertList(@Param("list") List<Cable> list);
+
+    /**
+     * 导出数据查询
+     * @param cable
+     * @return
+     */
+    List<Cable> exportFindList(Cable cable);
+}

+ 6 - 7
src/main/java/com/jeeplus/modules/cg/reservemanagementcenter/statisticalTable/mapper/ConstructeScaleMapper.java

@@ -19,6 +19,12 @@ import java.util.List;
 public interface ConstructeScaleMapper extends BaseMapper<ConstructeScale> {
 
     /**
+     * 根据 proid 删除对应数据
+     * @param proId
+     */
+    void deleteByProId(String proId);
+
+    /**
      * 批量添加储备项目概预算统计信息
      * @param list
      * @return
@@ -40,13 +46,6 @@ public interface ConstructeScaleMapper extends BaseMapper<ConstructeScale> {
     String getByProjectReserveId(String projectReserveId);
 
     /**
-     * 根据executeId查出当前节点的名称
-     * @param executeId
-     * @return
-     */
-    String getByExecuteId(String executeId);
-
-    /**
      * 根据executeId查出历史节点信息
      * @param executeId
      * @return

+ 14 - 7
src/main/java/com/jeeplus/modules/cg/reservemanagementcenter/statisticalTable/mapper/NormativeAuditMapper.java

@@ -2,6 +2,7 @@ package com.jeeplus.modules.cg.reservemanagementcenter.statisticalTable.mapper;
 
 import com.jeeplus.core.persistence.BaseMapper;
 import com.jeeplus.core.persistence.annotation.MyBatisMapper;
+import com.jeeplus.modules.cg.reservemanagementcenter.reserveManage.entity.DocumentInfo;
 import com.jeeplus.modules.cg.reservemanagementcenter.statisticalTable.entity.History;
 import com.jeeplus.modules.cg.reservemanagementcenter.statisticalTable.entity.NormativeAudit;
 
@@ -14,6 +15,19 @@ import java.util.List;
  **/
 @MyBatisMapper
 public interface NormativeAuditMapper extends BaseMapper<NormativeAudit> {
+    
+    /**
+     * 根据项目储备id  去数据库中查所有的文件路径信息
+     * @param proId
+     * @return
+     */
+    DocumentInfo getByProId(String proId);
+
+    /**
+     * 将文件路径放入  流程文件信息表中
+     * @param audit
+     */
+    void updateDocumentInfo(NormativeAudit audit);
 
     /**
      * 导出数据查询
@@ -30,13 +44,6 @@ public interface NormativeAuditMapper extends BaseMapper<NormativeAudit> {
     int getCountByProjectReserveId(String projectReserveId);
 
     /**
-     * 根据projectReserveId查出proc_ins_id
-     * @param projectReserveId
-     * @return
-     */
-    String getByProjectReserveId(String projectReserveId);
-
-    /**
      * 根据executeId查出历史节点信息
      * @param executeId
      * @return

+ 20 - 33
src/main/java/com/jeeplus/modules/cg/reservemanagementcenter/statisticalTable/mapper/ProgressStatsMapper.java

@@ -2,9 +2,8 @@ package com.jeeplus.modules.cg.reservemanagementcenter.statisticalTable.mapper;
 
 import com.jeeplus.core.persistence.BaseMapper;
 import com.jeeplus.core.persistence.annotation.MyBatisMapper;
+import com.jeeplus.modules.cg.reservemanagementcenter.reserveManage.entity.FeedBackBudget;
 import com.jeeplus.modules.cg.reservemanagementcenter.statisticalTable.entity.History;
-import com.jeeplus.modules.cg.reservemanagementcenter.statisticalTable.entity.HistoryComment;
-import com.jeeplus.modules.cg.reservemanagementcenter.statisticalTable.entity.HistoryVarinst;
 import com.jeeplus.modules.cg.reservemanagementcenter.statisticalTable.entity.ProgressStats;
 import org.apache.ibatis.annotations.Param;
 
@@ -19,6 +18,19 @@ import java.util.List;
 public interface ProgressStatsMapper extends BaseMapper<ProgressStats> {
 
     /**
+     * 根据 ProInsId 和时间 去历史节点表查退回意见
+     * @param proInsId
+     * @return
+     */
+    String getCommentByProInsId(@Param("proInsId") String proInsId, @Param("time")String time);
+
+    /**
+     * 根据项目储备id删除对应数据
+     * @param proId
+     */
+    void deleteByProId(String proId);
+
+    /**
      * 批量添加储备项目概预算统计信息
      * @param list
      * @return
@@ -42,41 +54,16 @@ public interface ProgressStatsMapper extends BaseMapper<ProgressStats> {
     String getByProjectReserveId(String projectReserveId);
 
     /**
-     * 根据executeId查出当前节点的名称
-     * @param executeId
-     * @return
-     */
-    String getByExecuteId(String executeId);
-
-    /**
-     * 根据executeId查出历史节点信息
-     * @param executeId
-     * @return
-     */
-    List<History> getHistoryByExecuteId(String executeId);
-
-    /**
-     * 根据executeId和节点名称查出历史节点信息
-     * @param executeId
+     * 根据proInsId 和节点名称去 历史表中 查设计单位节点信息
+     * @param proInsId
+     * @param name
      * @return
      */
-    List<History> getHistoryByActName(@Param("executeId") String executeId,
-                                      @Param("name") String name);
-
-    /**
-     * 根据节点的时间和executeId来查找
-     * @param time
-     * @return
-     */
-    History getHistoryByTime(@Param("time")String time,@Param("executeId")String executeId);
-
-    HistoryComment getCommentByTime(@Param("time")String time,@Param("executeId")String executeId);
+    List<History> getHistoryByProInsId(@Param("proInsId") String proInsId, @Param("name") String name);
 
     /**
-     * 在历史遍历表中,根据procInstId和时间来判断是哪条流程线
-     * @param time
-     * @param procInstId
+     * 根据项目储备id查反馈信息
      * @return
      */
-    HistoryVarinst getByProcInstId(@Param("time")String time,@Param("procInstId")String procInstId);
+    FeedBackBudget getByProId(String proId);
 }

+ 103 - 5
src/main/java/com/jeeplus/modules/cg/reservemanagementcenter/statisticalTable/mapper/xml/BudgetStatsMapper.xml

@@ -47,10 +47,72 @@
 		b.requirementType,
 		b.costEstimate,
 		b.basicRemarks,
-		c.implementPlan,
+		c.includeReserve as 'implementPlan',
 		c.initialImplementBatch as implementBatch
     </sql>
 
+    <insert id="insert">
+        insert into cg_budget_stats (
+        id,
+        create_by,
+        create_date,
+        update_by,
+        update_date,
+        del_flag,
+        projectReserveId,
+        pretrialEstimateAmount,
+        pretrialEstimateAmountExcludeTax,
+        pretrialDeductibleAmount,
+        pretrialConstructeConsts,
+        pretrialMaterialAmount,
+        pretrialOtherExpanses,
+        pretrialPreliminaryConstructeFee,
+        pretrialSurveyFee,
+        pretrialDesignFee,
+        pretrialSupervisionFee,
+        afterTrialEstimateAmount,
+        afterTrialEstimateAmountExcludeTax,
+        afterTrialDeductibleAmount,
+        afterTrialConstructeConsts,
+        afterTrialMaterialAmount,
+        afterTrialOtherExpanses,
+        afterTrialPreliminaryConstructeFee,
+        afterTrialSurveyFee,
+        afterTrialDesignFee,
+        afterTrialSupervisionFee
+        )
+        values
+            (
+            #{id},
+            #{createBy.id},
+            #{createDate},
+            #{updateBy.id},
+            #{updateDate},
+            #{delFlag},
+            #{projectReserveId},
+            #{pretrialEstimateAmount},
+            #{pretrialEstimateAmountExcludeTax},
+            #{pretrialDeductibleAmount},
+            #{pretrialConstructeConsts},
+            #{pretrialMaterialAmount},
+            #{pretrialOtherExpanses},
+            #{pretrialPreliminaryConstructeFee},
+            #{pretrialSurveyFee},
+            #{pretrialDesignFee},
+            #{pretrialSupervisionFee},
+            #{afterTrialEstimateAmount},
+            #{afterTrialEstimateAmountExcludeTax},
+            #{afterTrialDeductibleAmount},
+            #{afterTrialConstructeConsts},
+            #{afterTrialMaterialAmount},
+            #{afterTrialOtherExpanses},
+            #{afterTrialPreliminaryConstructeFee},
+            #{afterTrialSurveyFee},
+            #{afterTrialDesignFee},
+            #{afterTrialSupervisionFee}
+            )
+    </insert>
+
     <insert id="insertList">
         insert into cg_budget_stats (
         id,
@@ -115,6 +177,39 @@
         </foreach>
     </insert>
 
+    <update id="update">
+		update
+        cg_budget_stats
+        set
+        update_by = #{updateBy.id},
+        update_date = #{updateDate},
+        pretrialEstimateAmount = #{afterTrialSupervisionFee},
+        pretrialEstimateAmountExcludeTax = #{afterTrialSupervisionFee},
+        pretrialDeductibleAmount = #{afterTrialSupervisionFee},
+        pretrialConstructeConsts = #{afterTrialSupervisionFee},
+        pretrialMaterialAmount = #{afterTrialSupervisionFee},
+        pretrialOtherExpanses = #{afterTrialSupervisionFee},
+        pretrialPreliminaryConstructeFee = #{afterTrialSupervisionFee},
+        pretrialSurveyFee = #{afterTrialSupervisionFee},
+        pretrialDesignFee = #{afterTrialSupervisionFee},
+        pretrialSupervisionFee = #{afterTrialSupervisionFee},
+        afterTrialEstimateAmount = #{afterTrialSupervisionFee},
+        afterTrialEstimateAmountExcludeTax = #{afterTrialSupervisionFee},
+        afterTrialDeductibleAmount = #{afterTrialSupervisionFee},
+        afterTrialConstructeConsts = #{afterTrialSupervisionFee},
+        afterTrialMaterialAmount = #{afterTrialSupervisionFee},
+        afterTrialOtherExpanses = #{afterTrialSupervisionFee},
+        afterTrialPreliminaryConstructeFee = #{afterTrialSupervisionFee},
+        afterTrialSurveyFee = #{afterTrialSupervisionFee},
+        afterTrialDesignFee = #{afterTrialSupervisionFee},
+        afterTrialSupervisionFee = #{afterTrialSupervisionFee}
+        where id = #{id}
+	</update>
+
+    <delete id="deleteByProId">
+        delete from cg_budget_stats where projectReserveId = #{proId}
+    </delete>
+
     <select id="findList" resultType="com.jeeplus.modules.cg.reservemanagementcenter.statisticalTable.entity.BudgetStats">
         select
         <include refid="reserveManagementColumns"/>
@@ -195,25 +290,28 @@
         </choose>
     </select>
     <select id="getByExecuteId" resultType="java.lang.String">
-        SELECT NAME_ FROM `act_ru_task` WHERE EXECUTION_ID_ = #{executeId}
+        SELECT NAME_ FROM `act_ru_task` WHERE PROC_INST_ID_ = #{executeId}
     </select>
     <select id="getByProjectReserveId" resultType="java.lang.String">
         SELECT proc_ins_id from cg_personnel_activiti where projectReserveId = #{projectReserveId}
     </select>
     <select id="getHistoryByExecuteId" resultType="com.jeeplus.modules.cg.reservemanagementcenter.statisticalTable.entity.History">
         select ACT_NAME_ as name,START_TIME_ as startTime,END_TIME_ as endTime from act_hi_actinst
-        WHERE EXECUTION_ID_ = #{executeId} and ACT_NAME_ is not null ORDER BY startTime desc
+        WHERE PROC_INST_ID_ = #{executeId} and ACT_NAME_ is not null ORDER BY startTime desc
     </select>
     <select id="getHistoryByActName"
             resultType="com.jeeplus.modules.cg.reservemanagementcenter.statisticalTable.entity.History">
         select ACT_NAME_ as name,START_TIME_ as startTime,END_TIME_ as endTime from act_hi_actinst
-        WHERE EXECUTION_ID_ = #{executeId} and ACT_NAME_ is not null and ACT_NAME_ = #{name}
+        WHERE PROC_INST_ID_ = #{executeId} and ACT_NAME_ is not null
         ORDER BY startTime desc
     </select>
     <select id="getHistoryByTime"
             resultType="com.jeeplus.modules.cg.reservemanagementcenter.statisticalTable.entity.History">
         select ACT_NAME_ as name,START_TIME_ as startTime,END_TIME_ as endTime from act_hi_actinst
-        WHERE EXECUTION_ID_ = #{executeId}
+        WHERE PROC_INST_ID_ = #{executeId}
         and START_TIME_ = #{time} and ACT_NAME_ is not null
     </select>
+    <select id="getTimeByProID" resultType="java.util.Date">
+        SELECT update_date FROM `cg_reserve_company_review` WHERE projectReserveId = #{proId}
+    </select>
 </mapper>

+ 176 - 0
src/main/java/com/jeeplus/modules/cg/reservemanagementcenter/statisticalTable/mapper/xml/CableMapper.xml

@@ -0,0 +1,176 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.jeeplus.modules.cg.reservemanagementcenter.statisticalTable.mapper.CableMapper">
+
+    <sql id="cableColumns">
+        a.id as "id",
+        a.create_by AS "createBy.id",
+		a.create_date AS "createDate",
+		a.update_by AS "updateBy.id",
+		a.update_date AS "updateDate",
+		a.del_flag AS "delFlag",
+        a.projectReserveId,
+        a.civilEngineer,
+        a.pipeLayeCable,
+        a.completePipe,
+        a.completeMeasurement,
+        a.measureLength,
+        a.segmentLengthClassinication,
+        a.remarks,
+        b.ownerProjectManager
+
+    </sql>
+
+    <insert id="insert">
+        insert into cg_cable (
+        id,
+        create_by,
+        create_date,
+        update_by,
+        update_date,
+        del_flag,
+        projectReserveId,
+        civilEngineer,
+        pipeLayeCable,
+        completePipe,
+        completeMeasurement,
+        measureLength,
+        segmentLengthClassinication,
+        remarks
+        )
+        values
+            (
+            #{id},
+            #{createBy.id},
+            #{createDate},
+            #{updateBy.id},
+            #{updateDate},
+            #{delFlag},
+            #{projectReserveId},
+            #{civilEngineer},
+            #{pipeLayeCable},
+            #{completePipe},
+            #{completeMeasurement},
+            #{measureLength},
+            #{segmentLengthClassinication},
+            #{remarks}
+            )
+    </insert>
+    <insert id="insertList">
+        insert into cg_cable (
+        id,
+        create_by,
+        create_date,
+        update_by,
+        update_date,
+        del_flag,
+        projectReserveId,
+        civilEngineer,
+        pipeLayeCable,
+        completePipe,
+        completeMeasurement,
+        measureLength,
+        segmentLengthClassinication,
+        remarks
+        )
+        values
+        <foreach collection="list" item="item" index="index" separator="," >
+            (
+            #{item.id},
+            #{item.createBy.id},
+            #{item.createDate},
+            #{item.updateBy.id},
+            #{item.updateDate},
+            #{item.delFlag},
+            #{item.projectReserveId},
+            #{item.civilEngineer},
+            #{item.pipeLayeCable},
+            #{item.completePipe},
+            #{item.completeMeasurement},
+            #{item.measureLength},
+            #{item.segmentLengthClassinication},
+            #{item.remarks}
+            )
+        </foreach>
+    </insert>
+    <delete id="deleteByProId">
+        delete from
+        cg_cable
+        where projectReserveId = #{proId}
+    </delete>
+
+    <select id="findList" resultType="com.jeeplus.modules.cg.reservemanagementcenter.statisticalTable.entity.Cable">
+        select
+        <include refid="cableColumns"/>
+        from cg_cable a
+        left join cg_reserve_process b
+        on a.projectReserveId = b.projectReserveId
+        <where>
+            a.del_flag = 0
+            <if test="projectReserveId!=null and projectReserveId!=''">
+                and a.projectReserveId like concat('%', #{projectReserveId}, '%')
+            </if>
+            <if test="projectName!=null and projectName!=''">
+                and b.projectName like concat('%', #{projectName}, '%')
+            </if>
+            <if test="dataScope != null and dataScope != ''">
+                ${dataScope}
+            </if>
+        </where>
+        <choose>
+            <when test="page !=null and page.orderBy != null and page.orderBy != ''">
+                ORDER BY ${page.orderBy}
+            </when>
+            <otherwise>
+                ORDER BY a.update_date DESC
+            </otherwise>
+        </choose>
+    </select>
+
+    <update id="delete">
+        delete from
+        cg_cable
+        where id = #{id}
+    </update>
+
+    <select id="get" resultType="com.jeeplus.modules.cg.reservemanagementcenter.statisticalTable.entity.Cable">
+        select
+        <include refid="cableColumns"/>
+        from cg_cable a
+        left join cg_reserve_process b
+        on a.projectReserveId = b.projectReserveId
+        where a.id = #{id}
+    </select>
+    <select id="exportFindList"
+            resultType="com.jeeplus.modules.cg.reservemanagementcenter.statisticalTable.entity.Cable">
+        select
+        <include refid="cableColumns"/>
+        from cg_cable a
+        left join cg_reserve_process b
+        on a.projectReserveId = b.projectReserveId
+        <where>
+            a.del_flag = 0
+            <if test="projectReserveId!=null and projectReserveId!=''">
+                and a.projectReserveId like concat('%', #{projectReserveId}, '%')
+            </if>
+            <if test="projectName!=null and projectName!=''">
+                and b.projectName like concat('%', #{projectName}, '%')
+            </if>
+            <if test="dataScope != null and dataScope != ''">
+                ${dataScope}
+            </if>
+        </where>
+        <choose>
+            <when test="page !=null and page.orderBy != null and page.orderBy != ''">
+                ORDER BY ${page.orderBy}
+            </when>
+            <otherwise>
+                ORDER BY a.update_date DESC
+            </otherwise>
+        </choose>
+    </select>
+    <select id="getByProjectName"
+            resultType="com.jeeplus.modules.cg.reservemanagementcenter.statisticalTable.entity.MaterialData">
+        select materialCode,materialName,extendDescription,unit,totalCount from cg_material_data where projectName = #{name}
+    </select>
+</mapper>

+ 6 - 5
src/main/java/com/jeeplus/modules/cg/reservemanagementcenter/statisticalTable/mapper/xml/ConstructeScaleMapper.xml

@@ -24,8 +24,8 @@
 		b.cellNumber,
 		b.projectName,
 		b.constructionNecessityAndContent,
-		b.costEstimate,
-		c.afterTrialEstimateAmount
+		c.afterTrialEstimateAmount,
+		c.afterTrialEstimateAmountExcludeTax
 
     </sql>
 
@@ -68,6 +68,9 @@
             )
         </foreach>
     </insert>
+    <delete id="deleteByProId">
+        delete from cg_constructe_scale where projectReserveId = #{proId}
+    </delete>
 
     <select id="findList" resultType="com.jeeplus.modules.cg.reservemanagementcenter.statisticalTable.entity.ConstructeScale">
         select
@@ -149,9 +152,7 @@
     <select id="getByProjectReserveId" resultType="java.lang.String">
         SELECT proc_ins_id from cg_personnel_activiti where projectReserveId = #{projectReserveId}
     </select>
-    <select id="getByExecuteId" resultType="java.lang.String">
-        SELECT NAME_ FROM `act_ru_task` WHERE EXECUTION_ID_ = #{executeId}
-    </select>
+
     <select id="getHistoryByExecuteId"
             resultType="com.jeeplus.modules.cg.reservemanagementcenter.statisticalTable.entity.History">
         select ACT_NAME_ as name,START_TIME_ as startTime,END_TIME_ as endTime from act_hi_actinst

+ 2 - 1
src/main/java/com/jeeplus/modules/cg/reservemanagementcenter/statisticalTable/mapper/xml/DemoliteListMapper.xml

@@ -10,7 +10,8 @@
         a.count,
         a.remark,
         a.name as materialName,
-        b.projectName
+        b.projectName,
+        b.projectYear
 
     </sql>
 

+ 1 - 1
src/main/java/com/jeeplus/modules/cg/reservemanagementcenter/statisticalTable/mapper/xml/EnginnerQueryMapper.xml

@@ -21,7 +21,7 @@
 		b.requirementType,
 		b.costEstimate,
 		b.basicRemarks,
-		c.implementPlan,
+		c.includeReserve as implementPlan,
 		c.initialImplementBatch as implementBatch
     </sql>
 

+ 34 - 10
src/main/java/com/jeeplus/modules/cg/reservemanagementcenter/statisticalTable/mapper/xml/NormativeAuditMapper.xml

@@ -21,12 +21,14 @@
 		a.requirementType,
 		a.costEstimate,
 		a.basicRemarks,
-		b.implementPlan,
+		b.includeReserve as implementPlan,
 		b.initialImplementBatch as implementBatch,
-		c.drawings as blueprint,
 		c.budgetStatement as budgetBook,
-		c.drawingSpecification as designManual,
 		c.projectProposal as projectProposal,
+		c.drawings as blueprint,
+		c.drawingSpecification as designManual,
+		c.demolition as oldInventoryDemolition,
+		c.approvalForm as castPlaceApprovalForm,
 		d.preferedCase as reviewMaterial,
 		d.transferSituation as aSupplyTob,
 		d.budgetTemplateCheck as templateCorrect,
@@ -37,16 +39,34 @@
 		d.materialCheck as materialSupplyB,
 		d.liveWorkFeeCheck as chargeLiveWork,
 		d.demolitionEngineeringProblems as chargeDemolitionWork,
-		d.otherProblem as otherProblem
+		d.otherProblem as otherProblem,
+		d.drawingAndSiteProblem as drawingAndSiteProblem,
+		d.communicationProblem as communicationProblem,
+		d.civilPrefabricateProblem as civilPrefabricateProblem,
+		d.liveWorkNumProblem as liveWorkNumProblem,
+		d.projectManagerOtherProblem as projectManagerOtherProblem
     </sql>
+    <update id="updateDocumentInfo">
+        update cg_document_info set
+        update_by = #{updateBy.id},
+        update_date = #{updateDate},
+        budgetStatement = #{budgetBook},
+        projectProposal = #{projectProposal},
+        drawings = #{blueprint},
+        drawingSpecification = #{designManual},
+        demolition = #{oldInventoryDemolition},
+        approvalForm = #{castPlaceApprovalForm}
+        where projectReserveId = #{projectReserveId}
+    </update>
 
     <select id="findList" resultType="com.jeeplus.modules.cg.reservemanagementcenter.statisticalTable.entity.NormativeAudit">
         select
+        a.id as id,
         <include refid="reserveManagementColumns"/>
         from cg_reserve_process a
         left join cg_reserve_summary_statistics b
         on a.projectReserveId = b.projectReserveId
-        left join cg_personnel_activiti c
+        left join cg_document_info c
         on a.projectReserveId = c.projectReserveId
         left join cg_feedback_on_budget d
         on a.projectReserveId = d.projectReserveId
@@ -80,7 +100,7 @@
         from cg_reserve_process a
         left join cg_reserve_summary_statistics b
         on a.projectReserveId = b.projectReserveId
-        left join cg_personnel_activiti c
+        left join cg_document_info c
         on a.projectReserveId = c.projectReserveId
         left join cg_feedback_on_budget d
         on a.projectReserveId = d.projectReserveId
@@ -107,11 +127,12 @@
     </select>
 
     <select id="get" resultType="com.jeeplus.modules.cg.reservemanagementcenter.statisticalTable.entity.NormativeAudit">
+        select
         <include refid="reserveManagementColumns"/>
         from cg_reserve_process a
         left join cg_reserve_summary_statistics b
         on a.projectReserveId = b.projectReserveId
-        left join cg_personnel_activiti c
+        left join cg_document_info c
         on a.projectReserveId = c.projectReserveId
         left join cg_feedback_on_budget d
         on a.projectReserveId = d.projectReserveId
@@ -120,9 +141,6 @@
     <select id="getCountByProjectReserveId" resultType="java.lang.Integer">
         select count(*) from cg_demolition_list where projectReserveId = #{projectReserveId}
     </select>
-    <select id="getByProjectReserveId" resultType="java.lang.String">
-        SELECT proc_ins_id from cg_personnel_activiti where projectReserveId = #{projectReserveId}
-    </select>
 
     <select id="getHistoryByExecuteId"
             resultType="com.jeeplus.modules.cg.reservemanagementcenter.statisticalTable.entity.History">
@@ -133,4 +151,10 @@
     <select id="getByExecuteId" resultType="java.lang.String">
         SELECT NAME_ FROM `act_ru_task` WHERE EXECUTION_ID_ = #{executeId}
     </select>
+    <select id="getByProId"
+            resultType="com.jeeplus.modules.cg.reservemanagementcenter.reserveManage.entity.DocumentInfo">
+        select budgetStatement,projectProposal,drawings,drawingSpecification,
+        demolition,approvalForm from cg_document_info where projectReserveId = #{proId}
+    </select>
+
 </mapper>

+ 56 - 72
src/main/java/com/jeeplus/modules/cg/reservemanagementcenter/statisticalTable/mapper/xml/ProgressStatsMapper.xml

@@ -16,29 +16,25 @@
 		a.limitDate,
 		a.onSiteConfess,
 		a.confessCompleteTime,
-		a.provincialCompanyReview,
-		a.provincialCompanyReviewBatch,
-		a.passProvincialCompanyReview,
-		a.causeAnalysis,
-		a.designChange,
-		a.drawingReview,
-		a.reviewDate,
-		a.passDrawingReview,
-		a.reviewComment,
-		a.approvedDate,
-		a.jointReviewDesignChange,
-		a.formalDrawing,
+		a.drawRemarks,
+		a.budgetRemarks,
+		a.drawingUnionRemarks,
 		a.drawingDate,
-		a.transferProjectCenterDate,
-		a.transferToConstructionUnitDate,
         b.projectName,
         b.requirementType,
         b.demandUnit,
         b.reserveBatches,
         b.basicRemarks,
-        c.implementPlan,
+        c.includeReserve as implementPlan,
         c.initialImplementBatch,
-        c.includeReserve
+        c.includeReserve,
+        c.drawOfficeDrawn as formalDrawing,
+        d.joinProvincialCompanyReview as provincialCompanyReview,
+        d.batchOfProvincialCompany as provincialCompanyReviewBatch,
+        d.passProvincialCompanyReview as passProvincialCompanyReview,
+        d.reviewComments as causeAnalysis,
+        d.designChangeRequired as designChange,
+        d.companyRemarks as provincialCompanyRemarks
     </sql>
 
     <insert id="insertList">
@@ -56,21 +52,10 @@
         limitDate,
         onSiteConfess,
         confessCompleteTime,
-        provincialCompanyReview,
-        provincialCompanyReviewBatch,
-        passProvincialCompanyReview,
-        causeAnalysis,
-        designChange,
-        drawingReview,
-        reviewDate,
-        passDrawingReview,
-        reviewComment,
-        approvedDate,
-        jointReviewDesignChange,
-        formalDrawing,
-        drawingDate,
-        transferProjectCenterDate,
-        transferToConstructionUnitDate
+        drawRemarks,
+        budgetRemarks,
+        drawingUnionRemarks,
+        drawingDate
         )
         values
         <foreach collection="list" item="item" index="index" separator="," >
@@ -88,24 +73,16 @@
             #{item.limitDate},
             #{item.onSiteConfess},
             #{item.confessCompleteTime},
-            #{item.provincialCompanyReview},
-            #{item.provincialCompanyReviewBatch},
-            #{item.passProvincialCompanyReview},
-            #{item.causeAnalysis},
-            #{item.designChange},
-            #{item.drawingReview},
-            #{item.reviewDate},
-            #{item.passDrawingReview},
-            #{item.reviewComment},
-            #{item.approvedDate},
-            #{item.jointReviewDesignChange},
-            #{item.formalDrawing},
-            #{item.drawingDate},
-            #{item.transferProjectCenterDate},
-            #{item.transferToConstructionUnitDate}
+            #{item.drawRemarks},
+            #{item.budgetRemarks},
+            #{item.drawingUnionRemarks},
+            #{item.drawingDate}
             )
         </foreach>
     </insert>
+    <delete id="deleteByProId">
+        delete from cg_progress_stats where projectReserveId = #{proId}
+    </delete>
 
     <select id="findList" resultType="com.jeeplus.modules.cg.reservemanagementcenter.statisticalTable.entity.ProgressStats">
         select
@@ -115,6 +92,8 @@
         on a.projectReserveId = b.projectReserveId
         left join cg_reserve_summary_statistics c
         on a.projectReserveId = c.projectReserveId
+        left join cg_reserve_company_review d
+        on a.projectReserveId = d.projectReserveId
         <where>
             a.del_flag = 0
             <if test="projectReserveId!=null and projectReserveId!=''">
@@ -151,6 +130,8 @@
         on a.projectReserveId = b.projectReserveId
         left join cg_reserve_summary_statistics c
         on a.projectReserveId = c.projectReserveId
+        left join cg_reserve_company_review d
+        on a.projectReserveId = d.projectReserveId
         where a.id = #{id}
     </select>
     <select id="selectCount" resultType="java.lang.Integer">
@@ -165,6 +146,8 @@
         on a.projectReserveId = b.projectReserveId
         left join cg_reserve_summary_statistics c
         on a.projectReserveId = c.projectReserveId
+        left join cg_reserve_company_review d
+        on a.projectReserveId = d.projectReserveId
         <where>
             a.del_flag = 0
             <if test="projectReserveId!=null and projectReserveId!=''">
@@ -189,35 +172,36 @@
     <select id="getByProjectReserveId" resultType="java.lang.String">
         SELECT proc_ins_id from cg_personnel_activiti where projectReserveId = #{projectReserveId}
     </select>
-    <select id="getByExecuteId" resultType="java.lang.String">
-        SELECT NAME_ FROM `act_ru_task` WHERE EXECUTION_ID_ = #{executeId}
-    </select>
-    <select id="getHistoryByExecuteId" resultType="com.jeeplus.modules.cg.reservemanagementcenter.statisticalTable.entity.History">
-        select ACT_NAME_ as name,START_TIME_ as startTime,END_TIME_ as endTime from act_hi_actinst
-        WHERE EXECUTION_ID_ = #{executeId} and ACT_NAME_ is not null
-        ORDER BY START_TIME_ desc
-    </select>
-    <select id="getHistoryByActName"
+    <select id="getHistoryByProInsId"
             resultType="com.jeeplus.modules.cg.reservemanagementcenter.statisticalTable.entity.History">
-        select ACT_NAME_ as name,START_TIME_ as startTime,END_TIME_ as endTime from act_hi_actinst
-        WHERE EXECUTION_ID_ = #{executeId} and ACT_NAME_ is not null and ACT_NAME_ = #{name}
-        ORDER BY startTime desc
+            SELECT ACT_NAME_,END_TIME_,START_TIME_ FROM `act_hi_actinst`
+            WHERE PROC_INST_ID_ = #{proInsId} AND ACT_NAME_ = #{name}  ORDER BY START_TIME_ DESC
     </select>
-    <select id="getHistoryByTime"
-            resultType="com.jeeplus.modules.cg.reservemanagementcenter.statisticalTable.entity.History">
-        select ACT_NAME_ as name,START_TIME_ as startTime,END_TIME_ as endTime from act_hi_actinst
-        WHERE EXECUTION_ID_ = #{executeId}
-        and START_TIME_ = #{time} and ACT_NAME_ is not null
+    <select id="getByProId"
+            resultType="com.jeeplus.modules.cg.reservemanagementcenter.reserveManage.entity.FeedBackBudget">
+        select
+        preferedCase,
+        transferSituation,
+        budgetTemplateCheck,
+        quotaApplicationCheck,
+        workLoadCheck,
+        checkTheFee,
+        supplyCheck,
+        materialCheck,
+        liveWorkFeeCheck,
+        demolitionEngineeringProblems,
+        otherProblem,
+        drawingAndSiteProblem,
+        communicationProblem,
+        civilPrefabricateProblem,
+        liveWorkNumProblem,
+        projectManagerOtherProblem
+        from cg_feedback_on_budget where projectReserveId = #{proId}
     </select>
-    <select id="getCommentByTime"
-            resultType="com.jeeplus.modules.cg.reservemanagementcenter.statisticalTable.entity.HistoryComment">
+    <select id="getCommentByProInsId" resultType="java.lang.String">
         SELECT MESSAGE_ FROM `act_hi_comment`
-        WHERE PROC_INST_ID_ = #{executeId} and TIME_ = #{time}
-    </select>
-    <select id="getByProcInstId"
-            resultType="com.jeeplus.modules.cg.reservemanagementcenter.statisticalTable.entity.HistoryVarinst">
-        select * from act_hi_varinst where PROC_INST_ID_ = #{procInstId} and CREATE_TIME_ = #{time}
-        and LAST_UPDATED_TIME_ = #{time}
-        and LONG_ != 0
+        WHERE PROC_INST_ID_ = #{proInsId}  AND TIME_ = #{time}
     </select>
+
+
 </mapper>

+ 1 - 1
src/main/java/com/jeeplus/modules/cg/reservemanagementcenter/statisticalTable/mapper/xml/SpecialSupplyMapper.xml

@@ -21,7 +21,7 @@
 		b.requirementType,
 		b.costEstimate,
 		b.basicRemarks,
-		c.implementPlan,
+		c.includeReserve as implementPlan,
 		c.initialImplementBatch as implementBatch
     </sql>
 

+ 77 - 2
src/main/java/com/jeeplus/modules/cg/reservemanagementcenter/statisticalTable/service/BudgetStatsService.java

@@ -1,5 +1,6 @@
 package com.jeeplus.modules.cg.reservemanagementcenter.statisticalTable.service;
 
+import com.jeeplus.common.utils.StringUtils;
 import com.jeeplus.core.persistence.Page;
 import com.jeeplus.core.service.CrudService;
 import com.jeeplus.modules.cg.reservemanagementcenter.statisticalTable.entity.BudgetStats;
@@ -10,6 +11,7 @@ import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 import org.springframework.transaction.annotation.Transactional;
 
+import java.util.Date;
 import java.util.List;
 
 /**
@@ -24,11 +26,27 @@ public class BudgetStatsService extends CrudService<BudgetStatsMapper, BudgetSta
     @Autowired
     private BudgetStatsMapper dao;
 
+    /**
+     * 获取省公司评审表的  更新时间
+     * @param proId
+     * @return
+     */
+    public Date getTimeByProID(String proId){
+        return dao.getTimeByProID(proId);
+    }
+
     @Transactional(readOnly = false)
     public void insertList(@Param("list") List<BudgetStats> list){
+        List<BudgetStats> statsList = dao.exportFindList(null);
         for(BudgetStats budgetStats : list){
+            statsList.forEach(sta->{
+                if (sta.getProjectReserveId().equals(budgetStats.getProjectReserveId())){
+                    dao.deleteByProId(sta.getProjectReserveId());
+                }
+            });
             budgetStats.preInsert();
         }
+
         dao.insertList(list);
     }
 
@@ -37,6 +55,13 @@ public class BudgetStatsService extends CrudService<BudgetStatsMapper, BudgetSta
         return pageList;
     }
 
+
+    @Transactional(readOnly = false)
+    public void update(BudgetStats budgetStats) {
+
+        super.save(budgetStats);
+    }
+
     /**
      * 删除方法
      * @param budgetStats
@@ -67,12 +92,62 @@ public class BudgetStatsService extends CrudService<BudgetStatsMapper, BudgetSta
         return dao.getHistoryByExecuteId(executeId);
     }
 
-    public List<History> getHistoryByActName(String executeId,String name){
-        return dao.getHistoryByActName(executeId, name);
+    public List<History> getHistoryByActName(String executeId){
+        return dao.getHistoryByActName(executeId);
     }
 
     public History getHistoryByTime(String time,String executeId){
         return dao.getHistoryByTime(time, executeId);
     }
 
+    //获取储备进度列值的公共方法
+    public String getReserveProgress(String proId){
+        //根据projectReserveId查出流程表的proc_ins_id
+        String procInsId = mapper.getByProjectReserveId(proId);
+        //根据procInsId查出历史流程名称和时间
+        List<History> histories = mapper.getHistoryByExecuteId(procInsId);
+
+        String val = "";
+
+        //当size>0时待办有历史流程,
+        if (histories.size()>0){
+
+            //计数器
+            int sjCount = 0;
+            for (int k=0;k<histories.size();k++){
+                if (histories.get(k).getName().equals("设计单位上传文件")){
+                    ++sjCount;
+                    if (sjCount==1 & StringUtils.isEmpty(histories.get(0).getEndTime())){
+                        val = "设计委托发起";
+                    }else if (sjCount>1 & StringUtils.isEmpty(histories.get(0).getEndTime())){
+                        val = "设计委托修改中";
+                    }
+                }
+
+                if (sjCount ==1 & (histories.get(0).getName().equals("项目经理审图") ||
+                        histories.get(0).getName().equals("联合审图") ||
+                        histories.get(0).getName().equals("技经人员审预算")) &
+                        StringUtils.isEmpty(histories.get(0).getEndTime())){
+                    val = "设计委托审核中";
+                }else if (sjCount ==1 &
+                        (histories.get(0).getName().equals("技经人员审预算")||histories.get(0).getName().equals("联合审图")) &
+                        StringUtils.isNotEmpty(histories.get(0).getEndTime())){
+                    val = "设计委托审核完成";
+                }else if (sjCount >1 & (histories.get(0).getName().equals("项目经理审图") ||
+                        histories.get(0).getName().equals("联合审图") ||
+                        histories.get(0).getName().equals("技经人员审预算")) &
+                        StringUtils.isEmpty(histories.get(0).getEndTime())){
+                    val = "设计委托修改审核中";
+                }else if (sjCount >1 &
+                        (histories.get(0).getName().equals("技经人员审预算")||histories.get(0).getName().equals("联合审图")) &
+                        StringUtils.isNotEmpty(histories.get(0).getEndTime())){
+                    val = "设计委托修改审核完成";
+                }
+
+            }
+        }else {
+            val = "设计委托未发起";
+        }
+        return val;
+    }
 }

+ 54 - 0
src/main/java/com/jeeplus/modules/cg/reservemanagementcenter/statisticalTable/service/CableService.java

@@ -0,0 +1,54 @@
+package com.jeeplus.modules.cg.reservemanagementcenter.statisticalTable.service;
+
+import com.jeeplus.core.service.CrudService;
+import com.jeeplus.modules.cg.reservemanagementcenter.statisticalTable.entity.Cable;
+import com.jeeplus.modules.cg.reservemanagementcenter.statisticalTable.entity.MaterialData;
+import com.jeeplus.modules.cg.reservemanagementcenter.statisticalTable.mapper.CableMapper;
+import org.apache.ibatis.annotations.Param;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+import org.springframework.transaction.annotation.Transactional;
+
+import java.util.List;
+
+/**
+ * 电缆段长统计表 service
+ * @author: 王强
+ * @create: 2022-11-04 08:56
+ **/
+@Service
+@Transactional(readOnly = true)
+public class CableService extends CrudService<CableMapper, Cable> {
+
+    @Autowired
+    private CableMapper dao;
+
+    /**
+     * 根据项目名称去 甲供材表中获取数据
+     * @param name
+     * @return
+     */
+    public List<MaterialData> getByProjectName(String name){
+        return dao.getByProjectName(name);
+    }
+
+    @Transactional(readOnly = false)
+    public void insertList(@Param("list") List<Cable> list){
+        List<Cable> statsList = dao.exportFindList(null);
+        for(Cable cable : list){
+            statsList.forEach(sta->{
+                if (sta.getProjectReserveId().equals(cable.getProjectReserveId())){
+                    dao.deleteByProId(sta.getProjectReserveId());
+                }
+            });
+            cable.preInsert();
+        }
+
+        dao.insertList(list);
+    }
+    public List<Cable> exportFindList(Cable cable) {
+        List<Cable> pageList = dao.exportFindList(cable);
+        return pageList;
+    }
+
+}

+ 6 - 4
src/main/java/com/jeeplus/modules/cg/reservemanagementcenter/statisticalTable/service/ConstructeScaleService.java

@@ -29,7 +29,13 @@ public class ConstructeScaleService extends CrudService<ConstructeScaleMapper, C
 
     @Transactional(readOnly = false)
     public void insertList(@Param("list") List<ConstructeScale> list) {
+        List<ConstructeScale> scaleList = dao.exportFindList(null);
         for (ConstructeScale constructeScale : list) {
+            scaleList.forEach(sc->{
+                if (sc.getProjectReserveId().equals(constructeScale.getProjectReserveId())){
+                    dao.deleteByProId(sc.getProjectReserveId());
+                }
+            });
             constructeScale.preInsert();
         }
         dao.insertList(list);
@@ -59,10 +65,6 @@ public class ConstructeScaleService extends CrudService<ConstructeScaleMapper, C
         return dao.getByProjectReserveId(projectReserveId);
     }
 
-    public String getByExecuteId(String executeId) {
-        return dao.getByExecuteId(executeId);
-    }
-
     public List<History> getHistoryByExecuteId(String executeId) {
         return dao.getHistoryByExecuteId(executeId);
     }

+ 22 - 4
src/main/java/com/jeeplus/modules/cg/reservemanagementcenter/statisticalTable/service/NormativeAuditService.java

@@ -2,6 +2,7 @@ package com.jeeplus.modules.cg.reservemanagementcenter.statisticalTable.service;
 
 import com.jeeplus.core.persistence.Page;
 import com.jeeplus.core.service.CrudService;
+import com.jeeplus.modules.cg.reservemanagementcenter.reserveManage.entity.DocumentInfo;
 import com.jeeplus.modules.cg.reservemanagementcenter.statisticalTable.entity.History;
 import com.jeeplus.modules.cg.reservemanagementcenter.statisticalTable.entity.NormativeAudit;
 import com.jeeplus.modules.cg.reservemanagementcenter.statisticalTable.mapper.NormativeAuditMapper;
@@ -23,6 +24,25 @@ public class NormativeAuditService extends CrudService<NormativeAuditMapper, Nor
     @Autowired
     private NormativeAuditMapper auditMapper;
 
+    /**
+     * 根据项目储备id  去数据库中查所有的文件路径信息
+     * @param proId
+     * @return
+     */
+    public DocumentInfo getByProId(String proId){
+        return auditMapper.getByProId(proId);
+    }
+
+    /**
+     * 将文件路径放入  流程文件信息表中
+     * @param audit
+     */
+    @Transactional(readOnly = false)
+    public void updateDocumentInfo(NormativeAudit audit){
+        audit.preUpdate();
+        auditMapper.updateDocumentInfo(audit);
+    }
+
     public Page<NormativeAudit> findPage(Page<NormativeAudit> page, NormativeAudit normativeAudit) {
         Page<NormativeAudit> pageList = super.findPage(page, normativeAudit);
         return pageList;
@@ -37,10 +57,6 @@ public class NormativeAuditService extends CrudService<NormativeAuditMapper, Nor
         return auditMapper.getCountByProjectReserveId(projectReserveId);
     }
 
-    public String getByProjectReserveId(String projectReserveId){
-        return auditMapper.getByProjectReserveId(projectReserveId);
-    }
-
     public List<History> getHistoryByExecuteId(String executeId){
         return auditMapper.getHistoryByExecuteId(executeId);
     }
@@ -48,4 +64,6 @@ public class NormativeAuditService extends CrudService<NormativeAuditMapper, Nor
     public String getByExecuteId(String executeId){
         return auditMapper.getByExecuteId(executeId);
     }
+
+
 }

+ 30 - 22
src/main/java/com/jeeplus/modules/cg/reservemanagementcenter/statisticalTable/service/ProgressStatsService.java

@@ -2,9 +2,8 @@ package com.jeeplus.modules.cg.reservemanagementcenter.statisticalTable.service;
 
 import com.jeeplus.core.persistence.Page;
 import com.jeeplus.core.service.CrudService;
+import com.jeeplus.modules.cg.reservemanagementcenter.reserveManage.entity.FeedBackBudget;
 import com.jeeplus.modules.cg.reservemanagementcenter.statisticalTable.entity.History;
-import com.jeeplus.modules.cg.reservemanagementcenter.statisticalTable.entity.HistoryComment;
-import com.jeeplus.modules.cg.reservemanagementcenter.statisticalTable.entity.HistoryVarinst;
 import com.jeeplus.modules.cg.reservemanagementcenter.statisticalTable.entity.ProgressStats;
 import com.jeeplus.modules.cg.reservemanagementcenter.statisticalTable.mapper.ProgressStatsMapper;
 import org.apache.ibatis.annotations.Param;
@@ -26,9 +25,24 @@ public class ProgressStatsService extends CrudService<ProgressStatsMapper, Progr
     @Autowired
     private ProgressStatsMapper dao;
 
+    /**
+     * 根据 ProInsId 和时间 去历史节点表查退回意见
+     * @param proInsId
+     * @return
+     */
+    public String getCommentByProInsId(String proInsId,String time){
+        return dao.getCommentByProInsId(proInsId, time);
+    }
+
     @Transactional(readOnly = false)
     public void insertList(@Param("list") List<ProgressStats> list){
+        List<ProgressStats> statsList = mapper.exportFindList(null);
         for(ProgressStats progressStats : list){
+            statsList.forEach(sta->{
+                if (sta.getProjectReserveId().equals(progressStats.getProjectReserveId())){
+                    dao.deleteByProId(sta.getProjectReserveId());
+                }
+            });
             progressStats.preInsert();
         }
         dao.insertList(list);
@@ -61,27 +75,21 @@ public class ProgressStatsService extends CrudService<ProgressStatsMapper, Progr
         return dao.getByProjectReserveId(projectReserveId);
     }
 
-    public String getByExecuteId(String executeId){
-        return dao.getByExecuteId(executeId);
-    }
-
-    public List<History> getHistoryByExecuteId(String executeId){
-        return dao.getHistoryByExecuteId(executeId);
-    }
-
-    public List<History> getHistoryByActName(String executeId,String name){
-        return dao.getHistoryByActName(executeId, name);
-    }
-
-    public History getHistoryByTime(String time,String executeId){
-        return dao.getHistoryByTime(time, executeId);
-    }
-
-    public HistoryComment getCommentByTime(String time, String executeId){
-        return dao.getCommentByTime(time, executeId);
+    /**
+     * 根据proInsId 和节点名称去 历史表中 查设计单位节点信息
+     * @param proInsId
+     * @param name
+     * @return
+     */
+    public List<History> getHistoryByProInsId(String proInsId, String name){
+        return dao.getHistoryByProInsId(proInsId, name);
     }
 
-    public HistoryVarinst getByProcInstId(String time, String procInstId){
-        return dao.getByProcInstId(time, procInstId);
+    /**
+     * 根据项目储备id查反馈信息
+     * @return
+     */
+    public FeedBackBudget getByProId(String proId){
+        return dao.getByProId(proId);
     }
 }

+ 258 - 155
src/main/java/com/jeeplus/modules/cg/reservemanagementcenter/statisticalTable/util/ExcelExportUtil.java

@@ -63,6 +63,63 @@ public class ExcelExportUtil {
     }
 
     /**
+     * 导出电缆段长统计表信息
+     * @param response
+     * @param workbook
+     * @param list
+     */
+    public void exportCable(HttpServletResponse response, XSSFWorkbook workbook, List<Cable> list){
+        try {
+            int index = 1;//第一列序号
+            int rowNum = 2;//数据起始列
+            Sheet sheet = workbook.getSheetAt(0);
+            for(int i=0;i<list.size();i++){
+                Row row = sheet.createRow(rowNum+i);
+                Cell cell0 = crateCell(workbook,row,0); //序号
+                Cell cell1 = crateCell(workbook,row,3); //项目储备编号
+                Cell cell2 = crateCell(workbook,row,4); //项目名称
+                Cell cell3 = crateCell(workbook,row,5); //电缆规格型号
+                Cell cell4 = crateCell(workbook,row,6); //是否含土建
+                Cell cell5 = crateCell(workbook,row,7); //是否在现有管道施放电缆
+                Cell cell6 = crateCell(workbook,row,8); //是否完成通管
+                Cell cell7 = crateCell(workbook,row,9); //是否完成实测
+                Cell cell8 = crateCell(workbook,row,10); //实测长度
+                Cell cell9 = crateCell(workbook,row,11); //设计电缆段长
+                Cell cell10 = crateCell(workbook,row,12); //段长分类
+                Cell cell11 = crateCell(workbook,row,13); //项目经理
+                Cell cell12 = crateCell(workbook,row,14); //备注
+
+                Cable cable = list.get(i);
+
+                cell0.setCellValue(String.valueOf(index++));
+                cell1.setCellValue(cable.getProjectReserveId());
+                cell2.setCellValue(cable.getProjectName());
+                cell3.setCellValue(cable.getSpecifications());
+                cell4.setCellValue(cable.getCivilEngineer());
+                cell5.setCellValue(cable.getPipeLayeCable());
+                cell6.setCellValue(cable.getCompletePipe());
+                cell7.setCellValue(cable.getCompleteMeasurement());
+                cell8.setCellValue(cable.getMeasureLength());
+                cell9.setCellValue(cable.getDesignCableLength());
+                cell10.setCellValue(cable.getSegmentLengthClassinication());
+                cell11.setCellValue(cable.getProjectManager());
+                cell12.setCellValue(cable.getRemarks());
+
+            }
+
+            String str = URLEncoder.encode("储备项目电缆段长统计表.xlsx", "UTF8");
+            response.setHeader("Content-Disposition", "attachment;filename="+str);
+            response.setContentType("application/vnd.ms-excel;charset=UTF-8");
+            OutputStream outputStream = response.getOutputStream();
+            workbook.write(outputStream);
+            outputStream.flush();
+            outputStream.close();
+        } catch (IOException e) {
+            e.printStackTrace();
+        }
+    }
+
+    /**
      * 导出储备项目概预算统计表信息
      * @param response
      * @param workbook
@@ -97,28 +154,41 @@ public class ExcelExportUtil {
                 Cell cell19 = crateCell(workbook,row,19); //储备进度
                 Cell cell20 = crateCell(workbook,row,20); //是否纳入实施计划
                 Cell cell21 = crateCell(workbook,row,21); //初定实施批次
-                Cell cell22 = crateCell(workbook,row,22); //审前总概算金额(含税)
-                Cell cell23 = crateCell(workbook,row,23); //审前总概算金额(不含税)
-                Cell cell24 = crateCell(workbook,row,24); //审前可抵扣金额(税金)
-                Cell cell25 = crateCell(workbook,row,25); //审前施工费(含税)
-                Cell cell26 = crateCell(workbook,row,26); //审前甲供物资金额(含税)
-                Cell cell27 = crateCell(workbook,row,27); //审前其他费用(含税)
-                Cell cell28 = crateCell(workbook,row,28); //审前前期工程费(含税)
-                Cell cell29 = crateCell(workbook,row,29); //审前勘察费(含税)
-                Cell cell30 = crateCell(workbook,row,30); //审前设计费(含税)
-                Cell cell31 = crateCell(workbook,row,31); //审前监理费(含税)
-                Cell cell32 = crateCell(workbook,row,32); //审后总概算金额(含税)
-                Cell cell33 = crateCell(workbook,row,33); //审后总概算金额(不含税)
-                Cell cell34 = crateCell(workbook,row,34); //审后可抵扣金额(税金)
-                Cell cell35 = crateCell(workbook,row,35); //审后施工费(含税)
-                Cell cell36 = crateCell(workbook,row,36); //审后甲供物资金额(含税)
-                Cell cell37 = crateCell(workbook,row,37); //审后其他费用(含税)
-                Cell cell38 = crateCell(workbook,row,38); //审后前期工程费(含税)
-                Cell cell39 = crateCell(workbook,row,39); //审后勘察费(含税)
-                Cell cell40 = crateCell(workbook,row,40); //审后设计费(含税)
-                Cell cell41 = crateCell(workbook,row,41); //审后监理费(含税)
-                Cell cell42 = crateCell(workbook,row,42); //是否完成概算修改
-                Cell cell43 = crateCell(workbook,row,43); //概算修改完成时间
+
+                Cell cell22 = crateCell(workbook,row,22); //项目下达批次
+                Cell cell23 = crateCell(workbook,row,23); //业主项目经理
+                Cell cell24 = crateCell(workbook,row,24); //现场施工管理单位
+                Cell cell25 = crateCell(workbook,row,25); //施工项目经理(电气)
+                Cell cell26 = crateCell(workbook,row,26); //施工项目经理(土建)
+                Cell cell27 = crateCell(workbook,row,27); //电气分包单位
+                Cell cell28 = crateCell(workbook,row,28); //电气联系人、联系电话
+                Cell cell29 = crateCell(workbook,row,29); //土建分包单位
+                Cell cell30 = crateCell(workbook,row,30); //土建联系人、联系电话
+                Cell cell31 = crateCell(workbook,row,31); //备注
+                Cell cell32 = crateCell(workbook,row,32); //总概算金额(含税)
+                Cell cell33 = crateCell(workbook,row,33); //总概算金额(不含税)
+                Cell cell34 = crateCell(workbook,row,34); //可抵扣金额(税金)
+                Cell cell35 = crateCell(workbook,row,35); //施工费(含税)
+                Cell cell36 = crateCell(workbook,row,36); //甲供物资金额(含税)
+                Cell cell37 = crateCell(workbook,row,37); //其他费用(含税)
+                Cell cell38 = crateCell(workbook,row,38); //前期工程费(含税)
+                Cell cell39 = crateCell(workbook,row,39); //勘察费(含税)
+                Cell cell40 = crateCell(workbook,row,40); //设计费(含税)
+                Cell cell41 = crateCell(workbook,row,41); //监理费(含税)
+                Cell cell42 = crateCell(workbook,row,42); //总概算金额(含税)
+                Cell cell43 = crateCell(workbook,row,43); //总概算金额(不含税)
+                Cell cell44 = crateCell(workbook,row,44); //可抵扣金额(税金)
+                Cell cell45 = crateCell(workbook,row,45); //施工费(含税)
+                Cell cell46 = crateCell(workbook,row,46); //甲供物资金额(含税)
+                Cell cell47 = crateCell(workbook,row,47); //其他费用(含税)
+                Cell cell48 = crateCell(workbook,row,48); //前期工程费(含税)
+                Cell cell49 = crateCell(workbook,row,49); //勘察费(含税)
+                Cell cell50 = crateCell(workbook,row,50); //设计费(含税)
+                Cell cell51 = crateCell(workbook,row,51); //监理费(含税)
+                Cell cell52 = crateCell(workbook,row,52); //是否完成概算修改
+                Cell cell53 = crateCell(workbook,row,53); //概算修改完成时间
+                Cell cell54 = crateCell(workbook,row,54); //是否有设计变更
+                Cell cell55 = crateCell(workbook,row,55); //设计变更状态
 
                 BudgetStats budgetStats = list.get(i);
 
@@ -140,36 +210,49 @@ public class ExcelExportUtil {
                 cell15.setCellValue(budgetStats.getNetRackProjectDivide());
                 cell16.setCellValue(budgetStats.getRequirementType());
 
-                String costEstimateStr= budgetStats.getCostEstimate().toString();
-                if(StringUtils.isNotBlank(costEstimateStr)){
+                String costEstimateStr= budgetStats.getCostEstimate();
+                if(StringUtils.isNotEmpty(costEstimateStr)){
                     cell17.setCellValue(Double.parseDouble(costEstimateStr));
                 }
                 cell18.setCellValue(budgetStats.getBasicRemarks());
                 cell19.setCellValue(budgetStats.getReserveProgress());
                 cell20.setCellValue(budgetStats.getImplementPlan());
                 cell21.setCellValue(budgetStats.getImplementBatch());
-                cell22.setCellValue(budgetStats.getPretrialEstimateAmount());
-                cell23.setCellValue(budgetStats.getPretrialEstimateAmountExcludeTax());
-                cell24.setCellValue(budgetStats.getPretrialDeductibleAmount());
-                cell25.setCellValue(budgetStats.getPretrialConstructeConsts());
-                cell26.setCellValue(budgetStats.getPretrialMaterialAmount());
-                cell27.setCellValue(budgetStats.getPretrialOtherExpanses());
-                cell28.setCellValue(budgetStats.getPretrialPreliminaryConstructeFee());
-                cell29.setCellValue(budgetStats.getPretrialSurveyFee());
-                cell30.setCellValue(budgetStats.getPretrialDesignFee());
-                cell31.setCellValue(budgetStats.getPretrialSupervisionFee());
-                cell32.setCellValue(budgetStats.getAfterTrialEstimateAmount());
-                cell33.setCellValue(budgetStats.getAfterTrialEstimateAmountExcludeTax());
-                cell34.setCellValue(budgetStats.getAfterTrialDeductibleAmount());
-                cell35.setCellValue(budgetStats.getAfterTrialConstructeConsts());
-                cell36.setCellValue(budgetStats.getAfterTrialMaterialAmount());
-                cell37.setCellValue(budgetStats.getAfterTrialOtherExpanses());
-                cell38.setCellValue(budgetStats.getAfterTrialPreliminaryConstructeFee());
-                cell39.setCellValue(budgetStats.getAfterTrialSurveyFee());
-                cell40.setCellValue(budgetStats.getAfterTrialDesignFee());
-                cell41.setCellValue(budgetStats.getAfterTrialSupervisionFee());
-                cell42.setCellValue(budgetStats.getBudgetRevision());
-                cell43.setCellValue(budgetStats.getCompleteTime());
+                cell22.setCellValue(budgetStats.getProjectReleaseBatch());
+                cell23.setCellValue(budgetStats.getOwnerProjectManager());
+                cell24.setCellValue(budgetStats.getSiteManagementUnit());
+                cell25.setCellValue(budgetStats.getElectricalProjectManager());
+                cell26.setCellValue(budgetStats.getCivilEngineerProjectManager());
+                cell27.setCellValue(budgetStats.getElectricalSubcontractor());
+                cell28.setCellValue(budgetStats.getElectricalContact());
+                cell29.setCellValue(budgetStats.getCivilEngineerSubcontractor());
+                cell30.setCellValue(budgetStats.getCivilEngineerContact());
+                cell31.setCellValue(budgetStats.getSubcontractInfoRemark());
+                cell32.setCellValue(budgetStats.getPretrialEstimateAmount());
+                cell33.setCellValue(budgetStats.getPretrialEstimateAmountExcludeTax());
+                cell34.setCellValue(budgetStats.getPretrialDeductibleAmount());
+                cell35.setCellValue(budgetStats.getPretrialConstructeConsts());
+                cell36.setCellValue(budgetStats.getPretrialMaterialAmount());
+                cell37.setCellValue(budgetStats.getPretrialOtherExpanses());
+                cell38.setCellValue(budgetStats.getPretrialPreliminaryConstructeFee());
+                cell39.setCellValue(budgetStats.getPretrialSurveyFee());
+                cell40.setCellValue(budgetStats.getPretrialDesignFee());
+                cell41.setCellValue(budgetStats.getPretrialSupervisionFee());
+                cell42.setCellValue(budgetStats.getAfterTrialEstimateAmount());
+                cell43.setCellValue(budgetStats.getAfterTrialEstimateAmountExcludeTax());
+                cell44.setCellValue(budgetStats.getAfterTrialDeductibleAmount());
+                cell45.setCellValue(budgetStats.getAfterTrialConstructeConsts());
+                cell46.setCellValue(budgetStats.getAfterTrialMaterialAmount());
+                cell47.setCellValue(budgetStats.getAfterTrialOtherExpanses());
+                cell48.setCellValue(budgetStats.getAfterTrialPreliminaryConstructeFee());
+                cell49.setCellValue(budgetStats.getAfterTrialSurveyFee());
+                cell50.setCellValue(budgetStats.getAfterTrialDesignFee());
+                cell51.setCellValue(budgetStats.getAfterTrialSupervisionFee());
+                cell52.setCellValue(budgetStats.getBudgetRevision());
+                cell53.setCellValue(budgetStats.getCompleteTime());
+                cell54.setCellValue(budgetStats.getDesignChange());
+                cell55.setCellValue(budgetStats.getDesignChangeStatus());
+
             }
 
             String str = URLEncoder.encode("储备项目概预算统计表.xlsx", "UTF8");
@@ -197,105 +280,119 @@ public class ExcelExportUtil {
             Sheet sheet = workbook.getSheetAt(0);
             for(int i=0;i<list.size();i++){
                 Row row = sheet.createRow(rowNum+i);
-                Cell cell0 = crateCell(workbook,row,0); //序号
-                Cell cell1 = crateCell(workbook,row,1); //储备项目编号
-                Cell cell2 = crateCell(workbook,row,2); //储备项目名称
-                Cell cell3 = crateCell(workbook,row,3); //储备项目类型
-                Cell cell4 = crateCell(workbook,row,4); //需求提出单位
-                Cell cell5 = crateCell(workbook,row,5); //储备批次
-                Cell cell6 = crateCell(workbook,row,6); //备注
-                Cell cell7 = crateCell(workbook,row,7); //储备进度
-                Cell cell8 = crateCell(workbook,row,8); //是否纳入实施计划
-                Cell cell9 = crateCell(workbook,row,9); //初定实施批次
-                Cell cell10 = crateCell(workbook,row,10); //是否通过运检部评审
-                Cell cell11 = crateCell(workbook,row,11); //通过运检部评审时间
-                Cell cell12 = crateCell(workbook,row,12); //运检部下达储备时间
-                Cell cell13 = crateCell(workbook,row,13); //是否发出设计委托
-                Cell cell14 = crateCell(workbook,row,14); //设计委托发出时间
-                Cell cell15 = crateCell(workbook,row,15); //初设提交限定日期
-                Cell cell16 = crateCell(workbook,row,16); //是否进行现场交底
-                Cell cell17 = crateCell(workbook,row,17); //交底完成时间
-                Cell cell18 = crateCell(workbook,row,18); //是否进行储备
-                Cell cell19 = crateCell(workbook,row,19); //是否完成初设
-                Cell cell20 = crateCell(workbook,row,20); //初设提交时间
-                Cell cell21 = crateCell(workbook,row,21); //是否完成审图
+
+                Cell cell0 = crateCell(workbook,row,0); //储备项目编号
+                Cell cell1 = crateCell(workbook,row,1); //储备项目名称
+                Cell cell2 = crateCell(workbook,row,2); //储备项目类型
+                Cell cell3 = crateCell(workbook,row,3); //需求提出单位
+                Cell cell4 = crateCell(workbook,row,4); //储备批次
+                Cell cell5 = crateCell(workbook,row,5); //备注
+                Cell cell6 = crateCell(workbook,row,6); //储备进度
+                Cell cell7 = crateCell(workbook,row,7); //是否纳入实施计划
+                Cell cell8 = crateCell(workbook,row,8); //初定实施批次
+                Cell cell9 = crateCell(workbook,row,9); //是否通过运检部评审
+                Cell cell10 = crateCell(workbook,row,10); //通过运检部评审时间
+                Cell cell11 = crateCell(workbook,row,11); //运检部下达储备时间
+                Cell cell12 = crateCell(workbook,row,12); //是否发出设计委托
+                Cell cell13 = crateCell(workbook,row,13); //设计委托发出时间
+                Cell cell14 = crateCell(workbook,row,14); //初设提交限定日期
+                Cell cell15 = crateCell(workbook,row,15); //是否进行现场交底
+                Cell cell16 = crateCell(workbook,row,16); //交底完成时间
+                Cell cell17 = crateCell(workbook,row,17); //是否进行储备
+                Cell cell18 = crateCell(workbook,row,18); //是否完成初设
+                Cell cell19 = crateCell(workbook,row,19); //初设提交时间
+                Cell cell20 = crateCell(workbook,row,20); //是否进行审图
+                Cell cell21 = crateCell(workbook,row,21); //审图日期
                 Cell cell22 = crateCell(workbook,row,22); //是否通过图纸审核
-                Cell cell23 = crateCell(workbook,row,23); //未通过原因分析
-                Cell cell24 = crateCell(workbook,row,24); //通过审核日期
+                Cell cell23 = crateCell(workbook,row,23); //通过审核日期
+                Cell cell24 = crateCell(workbook,row,24); //未通过原因分析
                 Cell cell25 = crateCell(workbook,row,25); //是否需设计变更
-                Cell cell26 = crateCell(workbook,row,26); //是否完成审核
-                Cell cell27 = crateCell(workbook,row,27); //是否通过专家审核
-                Cell cell28 = crateCell(workbook,row,28); //未通过原因分析
-                Cell cell29 = crateCell(workbook,row,29); //通过审核日期
-                Cell cell30 = crateCell(workbook,row,30); //是否需设计变更
-                Cell cell31 = crateCell(workbook,row,31); //是否参加省公司评审
-                Cell cell32 = crateCell(workbook,row,32); //省公司评审批次
-                Cell cell33 = crateCell(workbook,row,33); //是否通过省公司评审
-                Cell cell34 = crateCell(workbook,row,34); //未通过原因分析
-                Cell cell35 = crateCell(workbook,row,35); //是否需设计变更
-                Cell cell36 = crateCell(workbook,row,36); //是否进行图纸审查
-                Cell cell37 = crateCell(workbook,row,37); //审图日期
-                Cell cell38 = crateCell(workbook,row,38); //是否通过图纸审查
-                Cell cell39 = crateCell(workbook,row,39); //未通过审图意见
-                Cell cell40 = crateCell(workbook,row,40); //通过审核日期
-                Cell cell41 = crateCell(workbook,row,41); //是否需设计变更
-                Cell cell42 = crateCell(workbook,row,42); //图纸是否定稿
-                Cell cell43 = crateCell(workbook,row,43); //定稿日期
-                Cell cell44 = crateCell(workbook,row,44); //是否打印正式图纸
-                Cell cell45 = crateCell(workbook,row,45); //通知出图日期
-                Cell cell46 = crateCell(workbook,row,46); //正式图纸移交项目中心日期
-                Cell cell47 = crateCell(workbook,row,47); //正式图纸移交施工单位日期
+                Cell cell26 = crateCell(workbook,row,26); //项目经理审图-备注
+
+                Cell cell27 = crateCell(workbook,row,27); //概预算-是否进行审核
+                Cell cell28 = crateCell(workbook,row,28); //概预算-审核日期
+                Cell cell29 = crateCell(workbook,row,29); //概预算-是否通过专家审核
+                Cell cell30 = crateCell(workbook,row,30); //概预算-通过审核日期
+                Cell cell31 = crateCell(workbook,row,31); //概预算-未通过原因分析
+                Cell cell32 = crateCell(workbook,row,32); //概预算-是否需设计变更
+                Cell cell33 = crateCell(workbook,row,33); //概预算审核-备注
+                Cell cell34 = crateCell(workbook,row,34); //是否参加省公司评审
+                Cell cell35 = crateCell(workbook,row,35); //省公司评审批次/日期
+                Cell cell36 = crateCell(workbook,row,36); //是否通过省公司评审
+                Cell cell37 = crateCell(workbook,row,37); //评审意见
+                Cell cell38 = crateCell(workbook,row,38); //是否需设计变更
+                Cell cell39 = crateCell(workbook,row,39); //省公司评审-备注
+
+                Cell cell40 = crateCell(workbook,row,40); //图纸联合审查-是否进行图纸审查
+                Cell cell41 = crateCell(workbook,row,41); //图纸联合审查-联合审图日期
+                Cell cell42 = crateCell(workbook,row,42); //图纸联合审查-是否通过图纸审查
+                Cell cell43 = crateCell(workbook,row,43); //图纸联合审查-通过联合审图日期
+                Cell cell44 = crateCell(workbook,row,44); //图纸联合审查-审图意见
+                Cell cell45 = crateCell(workbook,row,45); //图纸联合审查-是否需设计变更
+                Cell cell46 = crateCell(workbook,row,46); //图纸联合审查-备注
+
+                Cell cell47 = crateCell(workbook,row,47); //图纸是否定稿
+                Cell cell48 = crateCell(workbook,row,48); //定稿日期
+                Cell cell49 = crateCell(workbook,row,49); //是否打印正式图纸
+                Cell cell50 = crateCell(workbook,row,50); //通知出图日期
+                Cell cell51 = crateCell(workbook,row,51); //正式图纸移交项目中心日期
+                Cell cell52 = crateCell(workbook,row,52); //正式图纸移交施工单位日期
 
                 ProgressStats progressStats = list.get(i);
 
-                cell0.setCellValue(String.valueOf(index++));
-                cell1.setCellValue(progressStats.getProjectReserveId());
-                cell2.setCellValue(progressStats.getProjectName());
-                cell3.setCellValue(progressStats.getRequirementType());
-                cell4.setCellValue(progressStats.getDemandUnit());
-                cell5.setCellValue(progressStats.getReserveBatches());
-                cell6.setCellValue(progressStats.getBasicRemarks());
-                cell7.setCellValue(progressStats.getReserveProgress());
-                cell8.setCellValue(progressStats.getImplementPlan());
-                cell9.setCellValue(progressStats.getInitialImplementBatch());
-                cell10.setCellValue(progressStats.getInspectDepartmentReview());
-                cell11.setCellValue(progressStats.getInspectDepartmentReviewTime());
-                cell12.setCellValue(progressStats.getReleaseReserveTime());
-                cell13.setCellValue(progressStats.getDesignCommission());
-                cell14.setCellValue(progressStats.getDesignCommissionIssueTime());
-                cell15.setCellValue(progressStats.getLimitDate());
-                cell16.setCellValue(progressStats.getOnSiteConfess());
-                cell17.setCellValue(progressStats.getConfessCompleteTime());
-                cell18.setCellValue(progressStats.getIncludeReserve());
-                cell19.setCellValue(progressStats.getCompleteDesign());
-                cell20.setCellValue(progressStats.getSubmitTime());
-                cell21.setCellValue(progressStats.getCompleteDraw());
+                cell0.setCellValue(progressStats.getProjectReserveId());
+                cell1.setCellValue(progressStats.getProjectName());
+                cell2.setCellValue(progressStats.getRequirementType());
+                cell3.setCellValue(progressStats.getDemandUnit());
+                cell4.setCellValue(progressStats.getReserveBatches());
+                cell5.setCellValue(progressStats.getBasicRemarks());
+                cell6.setCellValue(progressStats.getReserveProgress());
+                cell7.setCellValue(progressStats.getImplementPlan());
+                cell8.setCellValue(progressStats.getInitialImplementBatch());
+                cell9.setCellValue(progressStats.getInspectDepartmentReview());
+                cell10.setCellValue(progressStats.getInspectDepartmentReviewTime());
+                cell11.setCellValue(progressStats.getReleaseReserveTime());
+                cell12.setCellValue(progressStats.getDesignCommission());
+                cell13.setCellValue(progressStats.getDesignCommissionIssueTime());
+                cell14.setCellValue(progressStats.getLimitDate());
+                cell15.setCellValue(progressStats.getOnSiteConfess());
+                cell16.setCellValue(progressStats.getConfessCompleteTime());
+                cell17.setCellValue(progressStats.getIncludeReserve());
+                cell18.setCellValue(progressStats.getCompleteDesign());
+                cell19.setCellValue(progressStats.getSubmitTime());
+                cell20.setCellValue(progressStats.getCompleteDraw());
+                cell21.setCellValue(progressStats.getCompleteDrawDate());
                 cell22.setCellValue(progressStats.getDrawAudit());
-                cell23.setCellValue(progressStats.getReasonForFailure());
-                cell24.setCellValue(progressStats.getPassAuditDate());
+                cell23.setCellValue(progressStats.getPassAuditDate());
+                cell24.setCellValue(progressStats.getReasonForFailure());
                 cell25.setCellValue(progressStats.getChangeDesign());
-                cell26.setCellValue(progressStats.getCompleteReview());
-                cell27.setCellValue(progressStats.getExpertReview());
-                cell28.setCellValue(progressStats.getEstimateReasonForFailure());
-                cell29.setCellValue(progressStats.getEstimatePassAuditDate());
-                cell30.setCellValue(progressStats.getEstimateChangeDesign());
-                cell31.setCellValue(progressStats.getProvincialCompanyReview());
-                cell32.setCellValue(progressStats.getProvincialCompanyReviewBatch());
-                cell33.setCellValue(progressStats.getPassProvincialCompanyReview());
-                cell34.setCellValue(progressStats.getCauseAnalysis());
-                cell35.setCellValue(progressStats.getDesignChange());
-                cell36.setCellValue(progressStats.getDrawingReview());
-                cell37.setCellValue(progressStats.getReviewDate());
-                cell38.setCellValue(progressStats.getPassDrawingReview());
-                cell39.setCellValue(progressStats.getReviewComment());
-                cell40.setCellValue(progressStats.getApprovedDate());
-                cell41.setCellValue(progressStats.getJointReviewDesignChange());
-                cell42.setCellValue(progressStats.getDrawingFinalize());
-                cell43.setCellValue(progressStats.getFinalDate());
-                cell44.setCellValue(progressStats.getFormalDrawing());
-                cell45.setCellValue(progressStats.getDrawingDate());
-                cell46.setCellValue(progressStats.getTransferProjectCenterDate());
-                cell47.setCellValue(progressStats.getTransferToConstructionUnitDate());
+                cell26.setCellValue(progressStats.getDrawRemarks());
+                cell27.setCellValue(progressStats.getWhetherToAudit());
+                cell28.setCellValue(progressStats.getAuditDate());
+                cell29.setCellValue(progressStats.getExpertReview());
+                cell30.setCellValue(progressStats.getEstimatePassAuditDate());
+                cell31.setCellValue(progressStats.getEstimateReasonForFailure());
+                cell32.setCellValue(progressStats.getEstimateChangeDesign());
+                cell33.setCellValue(progressStats.getBudgetRemarks());
+                cell34.setCellValue(progressStats.getProvincialCompanyReview());
+                cell35.setCellValue(progressStats.getProvincialCompanyReviewBatch());
+                cell36.setCellValue(progressStats.getPassProvincialCompanyReview());
+                cell37.setCellValue(progressStats.getCauseAnalysis());
+                cell38.setCellValue(progressStats.getDesignChange());
+                cell39.setCellValue(progressStats.getProvincialCompanyRemarks());
+                cell40.setCellValue(progressStats.getDrawingReview());
+                cell41.setCellValue(progressStats.getReviewDate());
+                cell42.setCellValue(progressStats.getPassDrawingReview());
+                cell43.setCellValue(progressStats.getApprovedDate());
+                cell44.setCellValue(progressStats.getReviewComment());
+                cell45.setCellValue(progressStats.getJointReviewDesignChange());
+                cell46.setCellValue(progressStats.getDrawingUnionRemarks());
+                cell47.setCellValue(progressStats.getDrawingFinalize());
+                cell48.setCellValue(progressStats.getFinalDate());
+                cell49.setCellValue(progressStats.getFormalDrawing());
+                cell50.setCellValue(progressStats.getDrawingDate());
+                cell51.setCellValue(progressStats.getTransferProjectCenterDate());
+                cell52.setCellValue(progressStats.getTransferToConstructionUnitDate());
 
             }
 
@@ -320,7 +417,7 @@ public class ExcelExportUtil {
     public void exportConstructe(HttpServletResponse response, XSSFWorkbook workbook, List<ConstructeScale> list){
         try {
             int index = 1;//第一列序号
-            int rowNum = 2;//数据起始列
+            int rowNum = 3;//数据起始列
             Sheet sheet = workbook.getSheetAt(0);
             for(int i=0;i<list.size();i++){
                 Row row = sheet.createRow(rowNum+i);
@@ -364,7 +461,8 @@ public class ExcelExportUtil {
                 Cell cell37 = crateCell(workbook,row,37); //费用估算
                 Cell cell38 = crateCell(workbook,row,38); //是否迎峰度夏项目
                 Cell cell39 = crateCell(workbook,row,39); //通过第几批项目评审
-                Cell cell40 = crateCell(workbook,row,40); //概算
+                Cell cell40 = crateCell(workbook,row,40); //概算(含税)
+                Cell cell41 = crateCell(workbook,row,41); //概算(不含税)
 
 
                 ConstructeScale constructeScale = list.get(i);
@@ -410,6 +508,7 @@ public class ExcelExportUtil {
                 cell38.setCellValue(constructeScale.getPeakSummerProject());
                 cell39.setCellValue(constructeScale.getProjectReview());
                 cell40.setCellValue(constructeScale.getAfterTrialEstimateAmount());
+                cell41.setCellValue(constructeScale.getAfterTrialEstimateAmountExcludeTax());
 
             }
 
@@ -679,24 +778,28 @@ public class ExcelExportUtil {
             for(int i=0;i<list.size();i++){
                 Row row = sheet.createRow(rowNum+i);
                 Cell cell0 = crateCell(workbook,row,0); //序号
-                Cell cell1 = crateCell(workbook,row,1); //储备项目名称
-                Cell cell2 = crateCell(workbook,row,2); //储备项目编码
-                Cell cell3 = crateCell(workbook,row,3); //物料名称
-                Cell cell4 = crateCell(workbook,row,4); //规格型号
-                Cell cell5 = crateCell(workbook,row,5); //单位
-                Cell cell6 = crateCell(workbook,row,6); //数量
-                Cell cell7 = crateCell(workbook,row,7); //备注
+                Cell cell1 = crateCell(workbook,row,1); //储备年份
+                Cell cell2 = crateCell(workbook,row,2); //储备项目名称
+                Cell cell3 = crateCell(workbook,row,3); //储备项目编码
+                Cell cell4 = crateCell(workbook,row,4); //项目定义号
+                Cell cell5 = crateCell(workbook,row,5); //物料名称
+                Cell cell6 = crateCell(workbook,row,6); //规格型号
+                Cell cell7 = crateCell(workbook,row,7); //单位
+                Cell cell8 = crateCell(workbook,row,8); //数量
+                Cell cell9 = crateCell(workbook,row,9); //备注
 
                 DemoliteList demoliteList = list.get(i);
 
                 cell0.setCellValue(String.valueOf(index++));
-                cell1.setCellValue(demoliteList.getProjectName());
-                cell2.setCellValue(demoliteList.getProjectReserveId());
-                cell3.setCellValue(demoliteList.getMaterialName());
-                cell4.setCellValue(demoliteList.getSpecification());
-                cell5.setCellValue(demoliteList.getUnit());
-                cell6.setCellValue(demoliteList.getCount());
-                cell7.setCellValue(demoliteList.getRemark());
+                cell1.setCellValue(demoliteList.getProjectYear());
+                cell2.setCellValue(demoliteList.getProjectName());
+                cell3.setCellValue(demoliteList.getProjectReserveId());
+                cell4.setCellValue(demoliteList.getProjectNumber());
+                cell5.setCellValue(demoliteList.getMaterialName());
+                cell6.setCellValue(demoliteList.getSpecification());
+                cell7.setCellValue(demoliteList.getUnit());
+                cell8.setCellValue(demoliteList.getCount());
+                cell9.setCellValue(demoliteList.getRemark());
 
             }
 
@@ -803,7 +906,7 @@ public class ExcelExportUtil {
                 cell23.setCellValue(audit.getBudgetBook());
                 cell24.setCellValue(audit.getDesignManual());
                 cell25.setCellValue(audit.getMaterialList());
-                cell26.setCellValue(audit.getFeasibilityReport());
+//                cell26.setCellValue(audit.getFeasibilityReport());
                 cell27.setCellValue(audit.getProjectProposal());
                 cell28.setCellValue(audit.getOldInventoryDemolition());
                 cell29.setCellValue(audit.getNoStopWorkPlan());

+ 124 - 55
src/main/java/com/jeeplus/modules/cg/reservemanagementcenter/statisticalTable/util/ExcelImportUtil.java

@@ -1,6 +1,7 @@
 package com.jeeplus.modules.cg.reservemanagementcenter.statisticalTable.util;
 
 import com.jeeplus.modules.cg.reservemanagementcenter.statisticalTable.entity.BudgetStats;
+import com.jeeplus.modules.cg.reservemanagementcenter.statisticalTable.entity.Cable;
 import com.jeeplus.modules.cg.reservemanagementcenter.statisticalTable.entity.ConstructeScale;
 import com.jeeplus.modules.cg.reservemanagementcenter.statisticalTable.entity.ProgressStats;
 import com.jeeplus.modules.sg.managementcenter.materialproject.util.ImportUtil;
@@ -25,6 +26,41 @@ public class ExcelImportUtil {
      * @param importUtil
      * @return List<BudgetStats> 导入表格数据
      */
+    public static List<Cable> getCableUtil(ImportUtil importUtil) throws ParseException {
+        int lastRow = importUtil.getLastDataRowNum();
+        List<Cable> list = new ArrayList<Cable>();
+        Cable cable = null;
+
+        for(int i=2; i<=lastRow;i++) {
+            cable = new Cable();
+            Row row = importUtil.getRow(i);
+
+//            String reserveProjectName = (String) importUtil.getCellValue(row, 1);
+            //获取项目储备编号
+            String projectReserveId = (String) importUtil.getCellValue(row, 3);
+            if (StringUtils.isNotBlank(projectReserveId)) {
+
+                cable.setProjectReserveId((String) importUtil.getCellValue(row, 3));
+                cable.setCivilEngineer((String) importUtil.getCellValue(row, 6));
+                cable.setPipeLayeCable((String) importUtil.getCellValue(row, 7));
+                cable.setCompletePipe((String) importUtil.getCellValue(row, 8));
+                cable.setCompleteMeasurement((String) importUtil.getCellValue(row, 9));
+                cable.setMeasureLength((String) importUtil.getCellValue(row, 10));
+                cable.setSegmentLengthClassinication((String) importUtil.getCellValue(row, 12));
+                cable.setRemarks((String) importUtil.getCellValue(row, 14));
+
+                list.add(cable);
+            }
+        }
+        return list;
+    }
+
+    /**
+     * 获取储备项目概预算统计表表格数据
+     *
+     * @param importUtil
+     * @return List<BudgetStats> 导入表格数据
+     */
     public static List<BudgetStats> getBudgetUtil(ImportUtil importUtil) throws ParseException {
         int lastRow = importUtil.getLastDataRowNum();
         List<BudgetStats> list = new ArrayList<BudgetStats>();
@@ -34,37 +70,34 @@ public class ExcelImportUtil {
             budgetStats = new BudgetStats();
             Row row = importUtil.getRow(i);
 
-            String reserveProjectName = (String) importUtil.getCellValue(row, 1);
+//            String reserveProjectName = (String) importUtil.getCellValue(row, 1);
             //获取项目储备编号
             String projectReserveId = (String) importUtil.getCellValue(row, 10);
-            if (StringUtils.isNotBlank(reserveProjectName)) {
-                if (StringUtils.isNotBlank(projectReserveId)) {
-
-                    budgetStats.setProjectReserveId((String) importUtil.getCellValue(row, 10));
-                    budgetStats.setPretrialEstimateAmount((String) importUtil.getCellValue(row, 22));
-                    budgetStats.setPretrialEstimateAmountExcludeTax((String) importUtil.getCellValue(row, 23));
-                    budgetStats.setPretrialDeductibleAmount((String) importUtil.getCellValue(row, 24));
-                    budgetStats.setPretrialConstructeConsts((String) importUtil.getCellValue(row, 25));
-                    budgetStats.setPretrialMaterialAmount((String) importUtil.getCellValue(row, 26));
-                    budgetStats.setPretrialOtherExpanses((String) importUtil.getCellValue(row, 27));
-                    budgetStats.setPretrialPreliminaryConstructeFee((String) importUtil.getCellValue(row, 28));
-                    budgetStats.setPretrialSurveyFee((String) importUtil.getCellValue(row, 29));
-                    budgetStats.setPretrialDesignFee((String) importUtil.getCellValue(row, 30));
-                    budgetStats.setPretrialSupervisionFee((String) importUtil.getCellValue(row, 31));
-                    budgetStats.setAfterTrialEstimateAmount((String) importUtil.getCellValue(row, 32));
-                    budgetStats.setAfterTrialEstimateAmountExcludeTax((String) importUtil.getCellValue(row, 33));
-                    budgetStats.setAfterTrialDeductibleAmount((String) importUtil.getCellValue(row, 34));
-                    budgetStats.setAfterTrialConstructeConsts((String) importUtil.getCellValue(row, 35));
-                    budgetStats.setAfterTrialMaterialAmount((String) importUtil.getCellValue(row, 36));
-                    budgetStats.setAfterTrialOtherExpanses((String) importUtil.getCellValue(row, 37));
-                    budgetStats.setAfterTrialPreliminaryConstructeFee((String) importUtil.getCellValue(row, 38));
-                    budgetStats.setAfterTrialSurveyFee((String) importUtil.getCellValue(row, 39));
-                    budgetStats.setAfterTrialDesignFee((String) importUtil.getCellValue(row, 40));
-                    budgetStats.setAfterTrialSupervisionFee((String) importUtil.getCellValue(row, 41));
-
-                    list.add(budgetStats);
-                }
-
+            if (StringUtils.isNotBlank(projectReserveId)) {
+
+                budgetStats.setProjectReserveId((String) importUtil.getCellValue(row, 10));
+                budgetStats.setPretrialEstimateAmount((String) importUtil.getCellValue(row, 32));
+                budgetStats.setPretrialEstimateAmountExcludeTax((String) importUtil.getCellValue(row, 33));
+                budgetStats.setPretrialDeductibleAmount((String) importUtil.getCellValue(row, 34));
+                budgetStats.setPretrialConstructeConsts((String) importUtil.getCellValue(row, 35));
+                budgetStats.setPretrialMaterialAmount((String) importUtil.getCellValue(row, 36));
+                budgetStats.setPretrialOtherExpanses((String) importUtil.getCellValue(row, 37));
+                budgetStats.setPretrialPreliminaryConstructeFee((String) importUtil.getCellValue(row, 38));
+                budgetStats.setPretrialSurveyFee((String) importUtil.getCellValue(row, 39));
+                budgetStats.setPretrialDesignFee((String) importUtil.getCellValue(row, 40));
+                budgetStats.setPretrialSupervisionFee((String) importUtil.getCellValue(row, 41));
+                budgetStats.setAfterTrialEstimateAmount((String) importUtil.getCellValue(row, 42));
+                budgetStats.setAfterTrialEstimateAmountExcludeTax((String) importUtil.getCellValue(row, 43));
+                budgetStats.setAfterTrialDeductibleAmount((String) importUtil.getCellValue(row, 44));
+                budgetStats.setAfterTrialConstructeConsts((String) importUtil.getCellValue(row, 45));
+                budgetStats.setAfterTrialMaterialAmount((String) importUtil.getCellValue(row, 46));
+                budgetStats.setAfterTrialOtherExpanses((String) importUtil.getCellValue(row, 47));
+                budgetStats.setAfterTrialPreliminaryConstructeFee((String) importUtil.getCellValue(row, 48));
+                budgetStats.setAfterTrialSurveyFee((String) importUtil.getCellValue(row, 49));
+                budgetStats.setAfterTrialDesignFee((String) importUtil.getCellValue(row, 50));
+                budgetStats.setAfterTrialSupervisionFee((String) importUtil.getCellValue(row, 51));
+
+                list.add(budgetStats);
             }
         }
         return list;
@@ -80,6 +113,7 @@ public class ExcelImportUtil {
         int lastRow = importUtil.getLastDataRowNum();
         List<ProgressStats> list = new ArrayList<ProgressStats>();
         ProgressStats progressStats = null;
+        SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
         for (int i = 3; i <= lastRow; i++) {
             progressStats = new ProgressStats();
             Row row = importUtil.getRow(i);
@@ -91,33 +125,68 @@ public class ExcelImportUtil {
                 if (StringUtils.isNotBlank(projectReserveId)) {
                     progressStats.setProjectReserveId((String) importUtil.getCellValue(row, 0));//项目储备编号
                     progressStats.setInspectDepartmentReview((String) importUtil.getCellValue(row, 9));//是否通过运检部评审
-                    progressStats.setInspectDepartmentReviewTime((String) importUtil.getCellValue(row, 10));//通过运检部评审时间
-                    progressStats.setReleaseReserveTime((String) importUtil.getCellValue(row, 11));//运检部下达储备时间
-//                    progressStats.setLimitDate(format.parse((String) importUtil.getCellValue(row, 14)).toString());//初设提交限定日期
-                    progressStats.setLimitDate(dateFormat((String) importUtil.getCellValue(row, 14)));//初设提交限定日期
+
+                    if (StringUtils.isNotEmpty((String) importUtil.getCellValue(row, 10))){
+                        try {
+                            Date parse = format.parse((String) importUtil.getCellValue(row, 10));
+                            progressStats.setInspectDepartmentReviewTime(format.format(parse));//通过运检部评审时间
+                        }catch (Exception e){
+                            progressStats.setInspectDepartmentReviewTime(null);//通过运检部评审时间
+                        }
+                    }else {
+                        progressStats.setInspectDepartmentReviewTime(null);//通过运检部评审时间
+                    }
+
+                    if (StringUtils.isNotEmpty((String) importUtil.getCellValue(row, 11))){
+                        try {
+                            Date parse = format.parse((String) importUtil.getCellValue(row, 11));
+                            progressStats.setReleaseReserveTime(format.format(parse));//运检部下达储备时间
+                        }catch (Exception e){
+                            progressStats.setReleaseReserveTime(null);//运检部下达储备时间
+                        }
+                    }else {
+                        progressStats.setReleaseReserveTime(null);//运检部下达储备时间
+                    }
+
+                    if (StringUtils.isNotEmpty((String) importUtil.getCellValue(row, 14))){
+                        try {
+                            Date parse = format.parse((String) importUtil.getCellValue(row, 14));
+                            progressStats.setLimitDate(format.format(parse));//初设提交限定日期
+                        }catch (Exception e){
+                            progressStats.setLimitDate(null);//初设提交限定日期
+                        }
+                    }else {
+                        progressStats.setLimitDate(null);//初设提交限定日期
+                    }
+
                     progressStats.setOnSiteConfess((String) importUtil.getCellValue(row, 15));//是否进行现场交底
-//                    progressStats.setConfessCompleteTime(format.parse((String) importUtil.getCellValue(row, 16)).toString());//交底完成时间
-                    progressStats.setConfessCompleteTime(dateFormat((String) importUtil.getCellValue(row, 16)));//交底完成时间
-                    progressStats.setProvincialCompanyReview((String) importUtil.getCellValue(row, 30));//省公司评审-是否参加省公司评审
-                    progressStats.setProvincialCompanyReviewBatch((String) importUtil.getCellValue(row, 31));//省公司评审-省公司评审批次
-                    progressStats.setPassProvincialCompanyReview((String) importUtil.getCellValue(row, 32));//省公司评审-是否通过省公司评审
-                    progressStats.setCauseAnalysis((String) importUtil.getCellValue(row, 33));//省公司评审-未通过原因分析
-                    progressStats.setDesignChange((String) importUtil.getCellValue(row, 34));//省公司评审-是否需设计变更
-                    progressStats.setDrawingReview((String) importUtil.getCellValue(row, 35));//图纸联合审查-是否进行图纸审查
-//                    progressStats.setReviewDate(format.parse((String) importUtil.getCellValue(row, 36)).toString());//图纸联合审查-审图日期
-                    progressStats.setReviewDate(dateFormat((String) importUtil.getCellValue(row, 36)));//图纸联合审查-审图日期
-                    progressStats.setPassDrawingReview((String) importUtil.getCellValue(row, 37));//图纸联合审查-是否通过图纸审查
-                    progressStats.setReviewComment((String) importUtil.getCellValue(row, 38));//图纸联合审查-未通过审图意见
-//                    progressStats.setApprovedDate(format.parse((String) importUtil.getCellValue(row, 39)).toString());//图纸联合审查-通过审核日期
-                    progressStats.setApprovedDate(dateFormat((String) importUtil.getCellValue(row, 39)));//图纸联合审查-通过审核日期
-                    progressStats.setJointReviewDesignChange((String) importUtil.getCellValue(row, 40));//图纸联合审查-是否需设计变更
-                    progressStats.setFormalDrawing((String) importUtil.getCellValue(row, 43));//是否打印正式图纸
-//                    progressStats.setDrawingDate(format.parse((String) importUtil.getCellValue(row, 44)).toString());//通知出图日期
-                    progressStats.setDrawingDate(dateFormat((String) importUtil.getCellValue(row, 44)));//通知出图日期
-//                    progressStats.setTransferProjectCenterDate(format.parse((String) importUtil.getCellValue(row, 45)).toString());//正式图纸移交项目中心日期
-                    progressStats.setTransferProjectCenterDate(dateFormat((String) importUtil.getCellValue(row, 45)));//正式图纸移交项目中心日期
-//                    progressStats.setTransferToConstructionUnitDate(format.parse((String) importUtil.getCellValue(row, 46)).toString());//正式图纸移交施工单位日期
-                    progressStats.setTransferToConstructionUnitDate(dateFormat((String) importUtil.getCellValue(row, 46)));//正式图纸移交施工单位日期
+
+                    if (StringUtils.isNotEmpty((String) importUtil.getCellValue(row, 16))){
+                        try {
+                            Date parse = format.parse((String) importUtil.getCellValue(row, 16));
+                            progressStats.setConfessCompleteTime(format.format(parse));//交底完成时间
+                        }catch (Exception e){
+                            progressStats.setConfessCompleteTime(null);//交底完成时间
+                        }
+                    }else {
+                        progressStats.setConfessCompleteTime(null);//交底完成时间
+                    }
+
+                    progressStats.setDrawRemarks((String) importUtil.getCellValue(row, 26));//项目经理审图-备注
+                    progressStats.setBudgetRemarks((String) importUtil.getCellValue(row, 33));//概预算审核-备注
+                    progressStats.setDrawingUnionRemarks((String) importUtil.getCellValue(row, 46));//图纸联合审查-备注
+
+                    if (StringUtils.isNotEmpty((String) importUtil.getCellValue(row, 50))){
+                        try {
+                            Date parse = format.parse((String) importUtil.getCellValue(row, 50));
+                            progressStats.setDrawingDate(format.format(parse));//通知出图日期
+                        }catch (Exception e){
+                            progressStats.setDrawingDate(null);//通知出图日期
+                        }
+                    }else {
+                        progressStats.setDrawingDate(null);//通知出图日期
+                    }
+
 
                     list.add(progressStats);
                 }

+ 55 - 84
src/main/java/com/jeeplus/modules/cg/reservemanagementcenter/statisticalTable/web/BudgetStatsController.java

@@ -91,53 +91,36 @@ public class BudgetStatsController extends BaseController {
         BudgetStats stats = null;
         for (int i=0;i<list.size();i++){
             stats = list.get(i);
-            //根据projectReserveId查出流程表的proc_ins_id
-            String procInsId = statsService.getByProjectReserveId(stats.getProjectReserveId());
-            //根据procInsId查出历史流程名称和时间
-            List<History> histories = statsService.getHistoryByExecuteId(procInsId);
-            //当size>0时待办有历史流程,
-            if (histories.size()>0){
-                //根据proc_ins_id去运行时任务节点表(act_ru_task)中查出当前流程名称
-                String name = statsService.getByExecuteId(procInsId);
-                //设置项目进度
-                stats.setReserveProgress(name);
-
-                //设置是否完成概算修改
-                //第一种情况,修改中 先在历史表中查出技经人员审预算相关的信息
-                List<History> his = statsService.getHistoryByActName(procInsId,"技经人员审预算");
-                if (his.size()>0){
-                    //根据他的完成时间来找下一个节点的信息
-                    String strTime = his.get(0).getEndTime();
-                    History history = statsService.getHistoryByTime(strTime,procInsId);
-                    SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd HH:mm");
-                    String comTime = "";
-                    if (strTime!=null){
-                        Date parse = format.parse(strTime);
-                        comTime = format.format(parse);
-                    }
-                    if (history == null){
-                        stats.setBudgetRevision("无需修改");
-                        stats.setCompleteTime(comTime);
-                    }else {
-                        //修改中的状态
-                        if (history.getName().equals("设计单位查看错误原因")){
-                            List<History> historyByActName = statsService.getHistoryByActName(procInsId,"设计单位查看错误原因");
-                            String endTime = historyByActName.get(0).getEndTime();
-                            if (endTime == null){
-                                stats.setBudgetRevision("修改中");
-                                stats.setCompleteTime(comTime);
-                            }else {
-                                //未完成状态
-                                stats.setBudgetRevision("未完成");
-                                stats.setCompleteTime(comTime);
-                            }
-                        }
-                    }
-
+            stats.setReserveProgress(statsService.getReserveProgress(stats.getProjectReserveId()));
+            if (stats.getReserveProgress().equals("设计委托修改中")){
+                stats.setBudgetRevision("修改中");
+            }else if (stats.getReserveProgress().equals("设计委托修改审核中")){
+                stats.setBudgetRevision("未完成");
+            }else if (stats.getReserveProgress().equals("设计委托修改审核完成")){
+                stats.setBudgetRevision("修改完成");
+                //根据projectReserveId查出流程表的proc_ins_id
+                String procInsId = statsService.getByProjectReserveId(stats.getProjectReserveId());
+                //根据procInsId查出历史流程名称和时间
+                List<History> histories = statsService.getHistoryByExecuteId(procInsId);
+                String endTime = histories.get(0).getEndTime();
+                //读取省公司评审表 根据项目储备id 获取它的更新时间
+                Date timeByProID = statsService.getTimeByProID(stats.getProjectReserveId());
+                SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
+                Date date1 = format.parse(endTime);
+                if (date1.before(timeByProID)){
+                    stats.setCompleteTime(format.format(timeByProID));
+                }else {
+                    stats.setCompleteTime(endTime);
                 }
-            }else {
-                stats.setReserveProgress("");
+
+            }else if (stats.getReserveProgress().equals("设计委托审核完成")){
+                stats.setBudgetRevision("无需修改");
+            }else if (stats.getReserveProgress().equals("设计委托审核中")){
+                stats.setBudgetRevision("空");
             }
+
+
+
             statsList.add(stats);
         }
         page.setList(statsList);
@@ -184,53 +167,41 @@ public class BudgetStatsController extends BaseController {
     @ResponseBody
     @RequiresPermissions("cg:reservemanagementcenter:budgetStats:export")
     @RequestMapping(value = "export")
-    public void exportExcel(BudgetStats budgetStats, HttpServletRequest request, HttpServletResponse response) {
+    public void exportExcel(BudgetStats budgetStats, HttpServletRequest request, HttpServletResponse response) throws ParseException {
         List<BudgetStats> list = statsService.exportFindList(budgetStats);
 
         List<BudgetStats> statsList = new ArrayList<>();
         BudgetStats stats = null;
         for (int i=0;i<list.size();i++){
             stats = list.get(i);
-            //根据projectReserveId查出流程表的proc_ins_id
-            String procInsId = statsService.getByProjectReserveId(stats.getProjectReserveId());
-            //根据procInsId查出历史流程名称和时间
-            List<History> histories = statsService.getHistoryByExecuteId(procInsId);
-            //当size>0时待办有历史流程,
-            if (histories.size()>0){
-                //根据proc_ins_id去运行时任务节点表(act_ru_task)中查出当前流程名称
-                String name = statsService.getByExecuteId(procInsId);
-                //设置项目进度
-                stats.setReserveProgress(name);
-                //设置是否完成概算修改
-                //第一种情况,修改中 先在历史表中查出技经人员审预算相关的信息
-                List<History> his = statsService.getHistoryByActName(procInsId,"技经人员审预算");
-                if (his.size()>0){
-                    //根据他的完成时间来找下一个节点的信息
-                    String strTime = his.get(0).getEndTime();
-                    History history = statsService.getHistoryByTime(strTime,procInsId);
-                    if (history == null){
-                        stats.setBudgetRevision("无需修改");
-                        stats.setCompleteTime(strTime);
-                    }else {
-                        //修改中的状态
-                        if (history.getName().equals("设计单位查看错误原因")){
-                            List<History> historyByActName = statsService.getHistoryByActName(procInsId,"设计单位查看错误原因");
-                            String endTime = historyByActName.get(0).getEndTime();
-                            if (endTime == null){
-                                stats.setBudgetRevision("修改中");
-                                stats.setCompleteTime(strTime);
-                            }else {
-                                //未完成状态
-                                stats.setBudgetRevision("未完成");
-                                stats.setCompleteTime(strTime);
-                            }
-                        }
-                    }
-
+            stats.setReserveProgress(statsService.getReserveProgress(stats.getProjectReserveId()));
+            if (stats.getReserveProgress().equals("设计委托修改中")){
+                stats.setBudgetRevision("修改中");
+            }else if (stats.getReserveProgress().equals("设计委托修改审核中")){
+                stats.setBudgetRevision("未完成");
+            }else if (stats.getReserveProgress().equals("设计委托修改审核完成")){
+                stats.setBudgetRevision("修改完成");
+                //根据projectReserveId查出流程表的proc_ins_id
+                String procInsId = statsService.getByProjectReserveId(stats.getProjectReserveId());
+                //根据procInsId查出历史流程名称和时间
+                List<History> histories = statsService.getHistoryByExecuteId(procInsId);
+                String endTime = histories.get(0).getEndTime();
+                //读取省公司评审表 根据项目储备id 获取它的更新时间
+                Date timeByProID = statsService.getTimeByProID(stats.getProjectReserveId());
+                SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
+                Date date1 = format.parse(endTime);
+                if (date1.before(timeByProID)){
+                    stats.setCompleteTime(format.format(timeByProID));
+                }else {
+                    stats.setCompleteTime(endTime);
                 }
-            }else {
-                stats.setReserveProgress("");
+
+            }else if (stats.getReserveProgress().equals("设计委托审核完成")){
+                stats.setBudgetRevision("无需修改");
+            }else if (stats.getReserveProgress().equals("设计委托审核中")){
+                stats.setBudgetRevision("空");
             }
+
             statsList.add(stats);
         }
         //生成序列号

+ 209 - 0
src/main/java/com/jeeplus/modules/cg/reservemanagementcenter/statisticalTable/web/CableController.java

@@ -0,0 +1,209 @@
+package com.jeeplus.modules.cg.reservemanagementcenter.statisticalTable.web;
+
+import com.jeeplus.common.json.AjaxJson;
+import com.jeeplus.common.utils.StringUtils;
+import com.jeeplus.core.persistence.Page;
+import com.jeeplus.core.web.BaseController;
+import com.jeeplus.modules.cg.reservemanagementcenter.statisticalTable.entity.Cable;
+import com.jeeplus.modules.cg.reservemanagementcenter.statisticalTable.entity.MaterialData;
+import com.jeeplus.modules.cg.reservemanagementcenter.statisticalTable.service.CableService;
+import com.jeeplus.modules.cg.reservemanagementcenter.statisticalTable.util.ExcelExportUtil;
+import com.jeeplus.modules.cg.reservemanagementcenter.statisticalTable.util.ExcelImportUtil;
+import com.jeeplus.modules.sg.managementcenter.materialproject.util.ImportUtil;
+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.stereotype.Controller;
+import org.springframework.ui.Model;
+import org.springframework.web.bind.annotation.ModelAttribute;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RequestParam;
+import org.springframework.web.bind.annotation.ResponseBody;
+import org.springframework.web.multipart.MultipartFile;
+
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+import java.text.ParseException;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Map;
+
+/**
+ * 电缆段长统计表 controller
+ * @author: 王强
+ * @create: 2022-11-04 09:04
+ **/
+@Controller
+@RequestMapping(value = "${adminPath}/cg/reservemanagementcenter/cable")
+public class CableController extends BaseController {
+
+    @Autowired
+    private CableService cableService;
+
+    @ModelAttribute
+    public Cable get(@RequestParam(required = false) String id) {
+        Cable entity = null;
+        if (StringUtils.isNotBlank(id)) {
+            entity = cableService.get(id);
+        }
+        if (entity == null) {
+            entity = new Cable();
+        }
+        return entity;
+    }
+
+    /**
+     * 电缆段长统计表页面
+     * @param cable
+     * @param model
+     * @return
+     */
+    @RequiresPermissions("cg:reservemanagementcenter:cable:list")
+    @RequestMapping(value = "cableList")
+    public String budgetList(Cable cable, Model model) {
+        model.addAttribute("cable", cable);
+        return "modules/cg/statisticalTable/cable/cable";
+    }
+
+    /**
+     * 储备项目概预算数据列表
+     * @param cable
+     * @param request
+     * @param response
+     * @param model
+     * @return
+     */
+    @ResponseBody
+    @RequiresPermissions("cg:reservemanagementcenter:cable:list")
+    @RequestMapping(value = "list")
+    public Map<String, Object> basicData(Cable cable, HttpServletRequest request, HttpServletResponse response, Model model) throws ParseException {
+
+        Page<Cable> page = cableService.findPage(new Page<Cable>(request, response), cable);
+
+        List<Cable> list = page.getList();
+        List<Cable> cableList = new ArrayList<>();
+        Cable ca = null;
+        for (int i=0;i<list.size();i++){
+            ca = list.get(i);
+            //进行赋值操作
+            //根据物料编码 和 物料描述从cg_material_data表中获取相应的数据
+            List<MaterialData> dataList = cableService.getByProjectName(ca.getProjectName());
+            Double sum1 = 0.0;
+            Double sum2 = 0.0;
+            Double sum3 = 0.0;
+            cableList.add(ca);
+            if (dataList.size()>0){
+                for (int j=0;j<dataList.size();j++){
+                    if (dataList.get(j).getMaterialCode().equals("500108108") &
+                            dataList.get(j).getMaterialName().equals("电力电缆,AC10kV,YJV,400,3,22,ZC,无阻水")){
+                        sum1 += Double.parseDouble(dataList.get(j).getTotalCount());
+                        ca.setSpecifications("电力电缆,AC10kV,YJV,400,3,22,ZC,无阻水");
+                        ca.setDesignCableLength(sum1 + "");
+                        cableList.add(ca);
+                    }else if (dataList.get(j).getMaterialCode().equals("500108302") &
+                            dataList.get(j).getMaterialName().equals("电力电缆,AC10kV,YJV,240,3,22,ZC,无阻水")){
+                        sum2 += Double.parseDouble(dataList.get(j).getTotalCount());
+                        ca.setSpecifications("电力电缆,AC10kV,YJV,240,3,22,ZC,无阻水");
+                        ca.setDesignCableLength(sum2 + "");
+                        cableList.add(ca);
+                    }else if (dataList.get(j).getMaterialCode().equals("500108478") &
+                            dataList.get(j).getMaterialName().equals("电力电缆,AC10kV,YJV,70,3,22,ZC,无阻水")){
+                        sum3 += Double.parseDouble(dataList.get(j).getTotalCount());
+                        ca.setSpecifications("电力电缆,AC10kV,YJV,70,3,22,ZC,无阻水");
+                        ca.setDesignCableLength(sum3 + "");
+                        cableList.add(ca);
+                    }
+                }
+            }
+
+        }
+
+        return getBootstrapData(page);
+    }
+
+    /**
+     * 删除表单
+     */
+    @ResponseBody
+    @RequiresPermissions(value={"cg:reservemanagementcenter:cable:del"},logical= Logical.OR)
+    @RequestMapping(value = "deleteAll")
+    public AjaxJson delete(String ids){
+        AjaxJson j = new AjaxJson();
+        String idArray[] =ids.split(",");
+        for(String id : idArray){
+            cableService.delete(cableService.get(id));
+        }
+        j.setMsg("删除电缆段长统计表信息成功");
+        return j;
+    }
+
+    /**
+     *  导入Excel数据
+     */
+    @ResponseBody
+    @RequiresPermissions("cg:reservemanagementcenter:cable:import")
+    @RequestMapping(value = "import")
+    public AjaxJson importBasic(@RequestParam("file") MultipartFile file, HttpServletResponse response, HttpServletRequest request) {
+        AjaxJson j = new AjaxJson();
+        try {
+            ImportUtil importUtil = new ImportUtil(file, 0, 0);
+            //获取导入表格所有数据
+            List<Cable> cables = ExcelImportUtil.getCableUtil(importUtil);
+            cableService.insertList(cables);
+        } catch (Exception e) {
+            j.setSuccess(false);
+            j.setMsg("导入储备项目概预算信息失败!失败信息:" + e.getMessage());
+        }
+        return j;
+    }
+
+    //导出excel
+    @ResponseBody
+    @RequiresPermissions("cg:reservemanagementcenter:cable:export")
+    @RequestMapping(value = "export")
+    public void exportExcel(Cable cable, HttpServletRequest request, HttpServletResponse response) throws ParseException {
+        List<Cable> list = cableService.exportFindList(cable);
+
+        List<Cable> cableList = new ArrayList<>();
+        Cable ca = null;
+        for (int i=0;i<list.size();i++){
+            ca = list.get(i);
+            //进行赋值操作
+            //根据物料编码 和 物料描述从cg_material_data表中获取相应的数据
+            List<MaterialData> dataList = cableService.getByProjectName(ca.getProjectName());
+            Double sum1 = 0.0;
+            Double sum2 = 0.0;
+            Double sum3 = 0.0;
+            cableList.add(ca);
+            if (dataList.size()>0){
+                for (int j=0;j<dataList.size();j++){
+                    if (dataList.get(j).getMaterialCode().equals("500108108") &
+                            dataList.get(j).getExtendDescription().equals("电力电缆,AC10kV,YJV,400,3,22,ZC,无阻水")){
+                        sum1 += Double.parseDouble(dataList.get(j).getTotalCount());
+                        ca.setSpecifications("电力电缆,AC10kV,YJV,400,3,22,ZC,无阻水");
+                        ca.setDesignCableLength(sum1 + "");
+                        cableList.add(ca);
+                    }else if (dataList.get(j).getMaterialCode().equals("500108302") &
+                            dataList.get(j).getExtendDescription().equals("电力电缆,AC10kV,YJV,240,3,22,ZC,无阻水")){
+                        sum2 += Double.parseDouble(dataList.get(j).getTotalCount());
+                        ca.setSpecifications("电力电缆,AC10kV,YJV,240,3,22,ZC,无阻水");
+                        ca.setDesignCableLength(sum2 + "");
+                        cableList.add(ca);
+                    }else if (dataList.get(j).getMaterialCode().equals("500108478") &
+                            dataList.get(j).getExtendDescription().equals("电力电缆,AC10kV,YJV,70,3,22,ZC,无阻水")){
+                        sum3 += Double.parseDouble(dataList.get(j).getTotalCount());
+                        ca.setSpecifications("电力电缆,AC10kV,YJV,70,3,22,ZC,无阻水");
+                        ca.setDesignCableLength(sum3 + "");
+                        cableList.add(ca);
+                    }
+                }
+            }
+
+        }
+
+        ExcelExportUtil util = ExcelExportUtil.getOne();
+        XSSFWorkbook workbook = util.getWorkbook("cable");
+        util.exportCable(response,workbook,cableList);
+    }
+}

+ 30 - 22
src/main/java/com/jeeplus/modules/cg/reservemanagementcenter/statisticalTable/web/ConstructeScaleController.java

@@ -4,10 +4,11 @@ import com.jeeplus.common.json.AjaxJson;
 import com.jeeplus.common.utils.StringUtils;
 import com.jeeplus.core.persistence.Page;
 import com.jeeplus.core.web.BaseController;
-import com.jeeplus.modules.cg.reservemanagementcenter.statisticalTable.entity.MaterialData;
-import com.jeeplus.modules.cg.reservemanagementcenter.statisticalTable.entity.StandardDetail;
 import com.jeeplus.modules.cg.reservemanagementcenter.statisticalTable.entity.ConstructeScale;
 import com.jeeplus.modules.cg.reservemanagementcenter.statisticalTable.entity.History;
+import com.jeeplus.modules.cg.reservemanagementcenter.statisticalTable.entity.MaterialData;
+import com.jeeplus.modules.cg.reservemanagementcenter.statisticalTable.entity.StandardDetail;
+import com.jeeplus.modules.cg.reservemanagementcenter.statisticalTable.service.BudgetStatsService;
 import com.jeeplus.modules.cg.reservemanagementcenter.statisticalTable.service.ConstructeScaleService;
 import com.jeeplus.modules.cg.reservemanagementcenter.statisticalTable.util.ExcelExportUtil;
 import com.jeeplus.modules.cg.reservemanagementcenter.statisticalTable.util.ExcelImportUtil;
@@ -26,6 +27,7 @@ import org.springframework.web.multipart.MultipartFile;
 
 import javax.servlet.http.HttpServletRequest;
 import javax.servlet.http.HttpServletResponse;
+import java.text.DecimalFormat;
 import java.util.ArrayList;
 import java.util.List;
 import java.util.Map;
@@ -42,6 +44,9 @@ public class ConstructeScaleController extends BaseController {
     @Autowired
     private ConstructeScaleService scaleService;
 
+    @Autowired
+    private BudgetStatsService budgetStatsService;
+
     @ModelAttribute
     public ConstructeScale get(@RequestParam(required = false) String id) {
         ConstructeScale entity = null;
@@ -108,17 +113,20 @@ public class ConstructeScaleController extends BaseController {
             //根据projectReserveId查出流程表的proc_ins_id
             String procInsId = scaleService.getByProjectReserveId(scale.getProjectReserveId());
             //根据proc_ins_id去运行时任务节点表(act_ru_task)中查出当前流程名称
-            String name = scaleService.getByExecuteId(procInsId);
+            //设置储备进度
+            scale.setReserveProgress(budgetStatsService.getReserveProgress(scale.getProjectReserveId()));
+            //设置费用估算
+            if (StringUtils.isNotEmpty(scale.getAfterTrialEstimateAmountExcludeTax())){
+                Double num = Double.valueOf(scale.getAfterTrialEstimateAmountExcludeTax());
+                DecimalFormat decimalFormat = new DecimalFormat("#.00");
+                String format = decimalFormat.format(num / 10000);
+                scale.setCostEstimate(format);
+            }
+
             //根据procInsId查出历史流程名称和时间
             List<History> histories = scaleService.getHistoryByExecuteId(procInsId);
             //当size>0时待办有历史流程,
             if (histories.size()>0){
-                //设置项目进度
-                scale.setReserveProgress(name);
-                scale.setCityCompany("国网镇江供电公司");
-                //根据相关规则设置物料信息
-                //根物料规范的数据比对,判断在线开甲供材属于哪一类型的数据
-                //先从物料详细数据中查出规范数据
                 List<StandardDetail> detailList = scaleService.getStandardDetail();
                 //在从在线开甲供材的表中查出所有数据
                 List<MaterialData> materialDataList = scaleService.getMaterialData(scale.getProjectName());
@@ -261,13 +269,10 @@ public class ConstructeScaleController extends BaseController {
                         }
                     }
                 }
-            }else {
-                //设置项目进度
-                scale.setReserveProgress("");
             }
             list.add(scale);
         }
-        System.out.println("list:" + list);
+
         page.setList(list);
         return getBootstrapData(page);
     }
@@ -308,16 +313,21 @@ public class ConstructeScaleController extends BaseController {
             //根据projectReserveId查出流程表的proc_ins_id
             String procInsId = scaleService.getByProjectReserveId(scale.getProjectReserveId());
             //根据proc_ins_id去运行时任务节点表(act_ru_task)中查出当前流程名称
-            String name = scaleService.getByExecuteId(procInsId);
+            //设置储备进度
+            scale.setReserveProgress(budgetStatsService.getReserveProgress(scale.getProjectReserveId()));
+
+            //设置费用估算
+            if (StringUtils.isNotEmpty(scale.getAfterTrialEstimateAmountExcludeTax())){
+                Double num = Double.valueOf(scale.getAfterTrialEstimateAmountExcludeTax());
+                DecimalFormat decimalFormat = new DecimalFormat("#.00");
+                String format = decimalFormat.format(num / 10000);
+                scale.setCostEstimate(format);
+            }
+
             //根据procInsId查出历史流程名称和时间
             List<History> histories = scaleService.getHistoryByExecuteId(procInsId);
             //当size>0时待办有历史流程,
             if (histories.size()>0){
-                //设置项目进度
-                scale.setReserveProgress(name);
-                //根据相关规则设置物料信息
-                //根物料规范的数据比对,判断在线开甲供材属于哪一类型的数据
-                //先从物料详细数据中查出规范数据
                 List<StandardDetail> detailList = scaleService.getStandardDetail();
                 //在从在线开甲供材的表中查出所有数据
                 List<MaterialData> materialDataList = scaleService.getMaterialData(scale.getProjectName());
@@ -354,6 +364,7 @@ public class ConstructeScaleController extends BaseController {
                                     && detailList.get(k).getMaterialDescription().equals(materialDataList.get(j).getMaterialName())){
                                 if (detailList.get(k).getProjectCategory().equals("开关柜")){
                                     kgSum += Double.parseDouble(materialDataList.get(j).getTotalCount());
+                                    num = kgSum + "";
                                     scale.setSwitchCabinet(num);
                                 }
                                 if (detailList.get(k).getProjectCategory().equals("架空线路")){
@@ -460,9 +471,6 @@ public class ConstructeScaleController extends BaseController {
                         }
                     }
                 }
-            }else {
-                //设置项目进度
-                scale.setReserveProgress("");
             }
             list.add(scale);
         }

+ 10 - 21
src/main/java/com/jeeplus/modules/cg/reservemanagementcenter/statisticalTable/web/EnginnerQueryController.java

@@ -4,7 +4,7 @@ import com.jeeplus.common.utils.StringUtils;
 import com.jeeplus.core.persistence.Page;
 import com.jeeplus.core.web.BaseController;
 import com.jeeplus.modules.cg.reservemanagementcenter.statisticalTable.entity.EnginnerQuery;
-import com.jeeplus.modules.cg.reservemanagementcenter.statisticalTable.entity.History;
+import com.jeeplus.modules.cg.reservemanagementcenter.statisticalTable.service.BudgetStatsService;
 import com.jeeplus.modules.cg.reservemanagementcenter.statisticalTable.service.EnginnerQueryService;
 import com.jeeplus.modules.cg.reservemanagementcenter.statisticalTable.util.ExcelExportUtil;
 import org.apache.poi.xssf.usermodel.XSSFWorkbook;
@@ -35,6 +35,9 @@ public class EnginnerQueryController extends BaseController {
     @Autowired
     private EnginnerQueryService queryService;
 
+    @Autowired
+    private BudgetStatsService budgetStatsService;
+
     @ModelAttribute
     public EnginnerQuery get(@RequestParam(required = false) String id) {
         EnginnerQuery entity = null;
@@ -81,16 +84,9 @@ public class EnginnerQueryController extends BaseController {
             query = list.get(i);
             //根据projectReserveId查出流程表的proc_ins_id
             String procInsId = queryService.getByProjectReserveId(query.getProjectReserveId());
-            //根据procInsId查出历史流程名称和时间
-            List<History> histories = queryService.getHistoryByExecuteId(procInsId);
-            //当size>0时待办有历史流程,
-            if (histories.size()>0){
-                //根据proc_ins_id去运行时任务节点表(act_ru_task)中查出当前流程名称
-                String name = queryService.getByExecuteId(procInsId);
-                query.setReserveProgress(name);
-            }else {
-                query.setReserveProgress("");
-            }
+            //设置储备进度
+            query.setReserveProgress(budgetStatsService.getReserveProgress(query.getProjectReserveId()));
+
             //设置立杆信息数据
             //根据物料编码查询物料总量
             Double sum1 = queryService.getData("500033660","","");
@@ -151,16 +147,9 @@ public class EnginnerQueryController extends BaseController {
             query = list.get(i);
             //根据projectReserveId查出流程表的proc_ins_id
             String procInsId = queryService.getByProjectReserveId(query.getProjectReserveId());
-            //根据procInsId查出历史流程名称和时间
-            List<History> histories = queryService.getHistoryByExecuteId(procInsId);
-            //当size>0时待办有历史流程,
-            if (histories.size()>0){
-                //根据proc_ins_id去运行时任务节点表(act_ru_task)中查出当前流程名称
-                String name = queryService.getByExecuteId(procInsId);
-                query.setReserveProgress(name);
-            }else {
-                query.setReserveProgress("");
-            }
+            //设置储备进度
+            query.setReserveProgress(budgetStatsService.getReserveProgress(query.getProjectReserveId()));
+
             //设置立杆信息数据
             //根据物料编码查询物料总量
             Double sum1 = queryService.getData("500033660","","");

+ 160 - 66
src/main/java/com/jeeplus/modules/cg/reservemanagementcenter/statisticalTable/web/NormativeAuditController.java

@@ -1,24 +1,42 @@
 package com.jeeplus.modules.cg.reservemanagementcenter.statisticalTable.web;
 
+import com.jeeplus.common.json.AjaxJson;
+import com.jeeplus.common.utils.PropertiesLoader;
 import com.jeeplus.common.utils.StringUtils;
 import com.jeeplus.core.persistence.Page;
 import com.jeeplus.core.web.BaseController;
-import com.jeeplus.modules.cg.reservemanagementcenter.statisticalTable.entity.History;
+import com.jeeplus.core.web.Servlets;
+import com.jeeplus.modules.cg.reservemanagementcenter.reserveManage.entity.Demolite;
+import com.jeeplus.modules.cg.reservemanagementcenter.reserveManage.entity.DocumentInfo;
+import com.jeeplus.modules.cg.reservemanagementcenter.reserveManage.service.DemoliteService;
+import com.jeeplus.modules.cg.reservemanagementcenter.reserveManage.service.ReserveProcessProjectService;
+import com.jeeplus.modules.cg.reservemanagementcenter.reserveManage.utils.ReserveProcessProjectProUtil;
 import com.jeeplus.modules.cg.reservemanagementcenter.statisticalTable.entity.NormativeAudit;
+import com.jeeplus.modules.cg.reservemanagementcenter.statisticalTable.service.BudgetStatsService;
 import com.jeeplus.modules.cg.reservemanagementcenter.statisticalTable.service.NormativeAuditService;
 import com.jeeplus.modules.cg.reservemanagementcenter.statisticalTable.util.ExcelExportUtil;
+import com.jeeplus.modules.sg.managementcenter.materialproject.util.ImportUtil;
+import org.apache.poi.openxml4j.exceptions.InvalidFormatException;
 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.mock.web.MockMultipartFile;
 import org.springframework.stereotype.Controller;
 import org.springframework.ui.Model;
 import org.springframework.web.bind.annotation.ModelAttribute;
 import org.springframework.web.bind.annotation.RequestMapping;
 import org.springframework.web.bind.annotation.RequestParam;
 import org.springframework.web.bind.annotation.ResponseBody;
+import org.springframework.web.multipart.MultipartFile;
 
 import javax.servlet.http.HttpServletRequest;
 import javax.servlet.http.HttpServletResponse;
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.IOException;
+import java.io.InputStream;
+import java.text.ParseException;
 import java.util.ArrayList;
 import java.util.List;
 import java.util.Map;
@@ -32,9 +50,28 @@ import java.util.Map;
 @RequestMapping(value = "${adminPath}/cg/reservemanagementcenter/normative")
 public class NormativeAuditController extends BaseController {
 
+    /**
+     * 判断服务器系统类型,1是windows系统,2是linux系统
+     */
+    public static final String SYS_TYPE = System.getProperty("os.name").toLowerCase().startsWith("win") ? "1" : "2";
+
+    /**
+     * 属性文件加载对象
+     */
+    private static PropertiesLoader loader = new PropertiesLoader("/properties/jeeplus.properties");
+
+    @Autowired
+    private ReserveProcessProjectService projectService;
+
+    @Autowired
+    private DemoliteService demoliteService;
+
     @Autowired
     private NormativeAuditService auditService;
 
+    @Autowired
+    private BudgetStatsService statsService;
+
     @ModelAttribute
     public NormativeAudit get(@RequestParam(required = false) String id) {
         NormativeAudit entity = null;
@@ -80,39 +117,17 @@ public class NormativeAuditController extends BaseController {
         for (int i=0;i<list.size();i++){
             audit = list.get(i);
             //进行赋值操作
-            //根据projectReserveId查出流程表的proc_ins_id
-            String procInsId = auditService.getByProjectReserveId(audit.getProjectReserveId());
-            //根据procInsId查出历史流程名称和时间
-            List<History> histories = auditService.getHistoryByExecuteId(procInsId);
-            //当size>0时待办有历史流程,
-            if (histories.size()>0){
-                //根据proc_ins_id去运行时任务节点表(act_ru_task)中查出当前流程名称
-                String name = auditService.getByExecuteId(procInsId);
-                audit.setReserveProgress(name);
-            }else {
-                audit.setReserveProgress("");
-            }
+            //设置储备进度
+            audit.setReserveProgress(statsService.getReserveProgress(audit.getProjectReserveId()));
             //设置完整性校核相关值
-            audit.setBlueprint(audit.getBlueprint() ==null ? "" : audit.getBlueprint());
-            audit.setBudgetBook(audit.getBudgetBook() ==null ? "" : audit.getBudgetBook());
-            audit.setDesignManual(audit.getDesignManual() ==null ? "" : audit.getDesignManual());
-
-            audit.setProjectProposal(audit.getProjectProposal() ==null ? "" : audit.getProjectProposal());
+//            audit.setBlueprint(audit.getBlueprint() ==null ? "" : audit.getBlueprint());
+//            audit.setBudgetBook(audit.getBudgetBook() ==null ? "" : audit.getBudgetBook());
+//            audit.setDesignManual(audit.getDesignManual() ==null ? "" : audit.getDesignManual());
+//
+//            audit.setProjectProposal(audit.getProjectProposal() ==null ? "" : audit.getProjectProposal());
             //设置拆旧清册
-            int count = auditService.getCountByProjectReserveId(audit.getProjectReserveId());
-            audit.setOldInventoryDemolition(count >0 ? "" : null);
-            //设置技经驳回意见
-            audit.setReviewMaterial(audit.getReviewMaterial() == null ? "是" : "否(" + audit.getReviewMaterial() + ")");
-            audit.setaSupplyTob(audit.getaSupplyTob() == null ? "是" : "否(" + audit.getaSupplyTob() + ")");
-            audit.setTemplateCorrect(audit.getTemplateCorrect() == null ? "是" : "否(" + audit.getTemplateCorrect() + ")");
-            audit.setCorrectApplication(audit.getCorrectApplication() == null ? "是" : "否(" + audit.getCorrectApplication() + ")");
-            audit.setWorkloadConsistent(audit.getWorkloadConsistent() == null ? "是" : "否(" + audit.getWorkloadConsistent() + ")");
-            audit.setFeeCorrect(audit.getFeeCorrect() == null ? "是" : "否(" + audit.getFeeCorrect() + ")");
-            audit.setMaterialSupplyA(audit.getMaterialSupplyA() == null ? "是" : "否(" + audit.getMaterialSupplyA() + ")");
-            audit.setMaterialSupplyB(audit.getMaterialSupplyB() == null ? "是" : "否(" + audit.getMaterialSupplyB() + ")");
-            audit.setChargeLiveWork(audit.getChargeLiveWork() == null ? "是" : "否(" + audit.getChargeLiveWork() + ")");
-            audit.setChargeDemolitionWork(audit.getChargeDemolitionWork() == null ? "是" : "否(" + audit.getChargeDemolitionWork() + ")");
-            audit.setOtherProblem(audit.getOtherProblem() == null ? "是" : "否(" + audit.getOtherProblem() + ")");
+//            int count = auditService.getCountByProjectReserveId(audit.getProjectReserveId());
+//            audit.setOldInventoryDemolition(count >0 ? "有" : null);
 
             auditList.add(audit);
         }
@@ -132,40 +147,17 @@ public class NormativeAuditController extends BaseController {
         for (int i=0;i<list.size();i++){
             audit = list.get(i);
             //进行赋值操作
-            //根据projectReserveId查出流程表的proc_ins_id
-            String procInsId = auditService.getByProjectReserveId(audit.getProjectReserveId());
-            //根据procInsId查出历史流程名称和时间
-            List<History> histories = auditService.getHistoryByExecuteId(procInsId);
-            //当size>0时待办有历史流程,
-            if (histories.size()>0){
-                //根据proc_ins_id去运行时任务节点表(act_ru_task)中查出当前流程名称
-                String name = auditService.getByExecuteId(procInsId);
-                audit.setReserveProgress(name);
-            }else {
-                audit.setReserveProgress("");
-            }
-            //设置完整性校核相关值
-            audit.setBlueprint(audit.getBlueprint() ==null ? "" : audit.getBlueprint());
-            audit.setBudgetBook(audit.getBudgetBook() ==null ? "" : audit.getBudgetBook());
-            audit.setDesignManual(audit.getDesignManual() ==null ? "" : audit.getDesignManual());
-
-            audit.setProjectProposal(audit.getProjectProposal() ==null ? "" : audit.getProjectProposal());
-            //设置拆旧清册
-            int count = auditService.getCountByProjectReserveId(audit.getProjectReserveId());
-            audit.setOldInventoryDemolition(count >0 ? "" : null);
-            //设置技经驳回意见
-            audit.setReviewMaterial(audit.getReviewMaterial() == null ? "是" : "否(" + audit.getReviewMaterial() + ")");
-            audit.setaSupplyTob(audit.getaSupplyTob() == null ? "是" : "否(" + audit.getaSupplyTob() + ")");
-            audit.setTemplateCorrect(audit.getTemplateCorrect() == null ? "是" : "否(" + audit.getTemplateCorrect() + ")");
-            audit.setCorrectApplication(audit.getCorrectApplication() == null ? "是" : "否(" + audit.getCorrectApplication() + ")");
-            audit.setWorkloadConsistent(audit.getWorkloadConsistent() == null ? "是" : "否(" + audit.getWorkloadConsistent() + ")");
-            audit.setFeeCorrect(audit.getFeeCorrect() == null ? "是" : "否(" + audit.getFeeCorrect() + ")");
-            audit.setMaterialSupplyA(audit.getMaterialSupplyA() == null ? "是" : "否(" + audit.getMaterialSupplyA() + ")");
-            audit.setMaterialSupplyB(audit.getMaterialSupplyB() == null ? "是" : "否(" + audit.getMaterialSupplyB() + ")");
-            audit.setChargeLiveWork(audit.getChargeLiveWork() == null ? "是" : "否(" + audit.getChargeLiveWork() + ")");
-            audit.setChargeDemolitionWork(audit.getChargeDemolitionWork() == null ? "是" : "否(" + audit.getChargeDemolitionWork() + ")");
-            audit.setOtherProblem(audit.getOtherProblem() == null ? "是" : "否(" + audit.getOtherProblem() + ")");
-
+            //设置储备进度
+            audit.setReserveProgress(statsService.getReserveProgress(audit.getProjectReserveId()));
+            //对文件路径进行截取操作,只需要他的文件名称
+            audit.setBlueprint(fileNameSubString(audit.getBlueprint()));
+            audit.setBudgetBook(fileNameSubString(audit.getBudgetBook()));
+            audit.setDesignManual(fileNameSubString(audit.getDesignManual()));
+            audit.setMaterialList(fileNameSubString(audit.getMaterialList()));
+            audit.setProjectProposal(fileNameSubString(audit.getProjectProposal()));
+            audit.setOldInventoryDemolition(fileNameSubString(audit.getOldInventoryDemolition()));
+            audit.setNoStopWorkPlan(fileNameSubString(audit.getNoStopWorkPlan()));
+            audit.setCastPlaceApprovalForm(fileNameSubString(audit.getCastPlaceApprovalForm()));
             auditList.add(audit);
         }
 
@@ -181,4 +173,106 @@ public class NormativeAuditController extends BaseController {
         util.exportNormative(response,workbook,auditList);
     }
 
+    /**
+     * 专职人员增加,编辑表单页面
+     * @param normativeAudit
+     * @param model
+     * @return
+     */
+    @RequiresPermissions(value={"cg:reservemanagementcenter:normative:edit"},logical= Logical.OR)
+    @RequestMapping(value = "form")
+    public String form(NormativeAudit normativeAudit, Model model) {
+        model.addAttribute("normativeAudit", normativeAudit);
+        return "modules/cg/statisticalTable/normative/normativeEdit";
+    }
+
+    /**
+     * 修改表单
+     * @param audit
+     * @return
+     */
+    @ResponseBody
+    @RequiresPermissions(value={"cg:reservemanagementcenter:companyReview:edit"},logical=Logical.OR)
+    @RequestMapping(value = "update")
+    public AjaxJson update(NormativeAudit audit) throws IOException, InvalidFormatException, ParseException {
+        AjaxJson j = new AjaxJson();
+        /**
+         * 后台hibernate-validation插件校验
+         */
+        String errMsg = beanValidator(audit);
+        if (StringUtils.isNotBlank(errMsg)){
+            j.setSuccess(false);
+            j.setMsg(errMsg);
+            return j;
+
+        }
+        //根据流程状态,当流程进行中或完成时,不允许修改
+        int processStatus = projectService.getProcessStatus(audit.getProjectReserveId());
+        if (processStatus != 1 & processStatus != 2){
+            //对文件数据进行处理
+            //1、将上传的所有文件的路径放到 cg_document_info(流程文件信息表)中
+            auditService.updateDocumentInfo(audit);
+            //2、拆旧清册需要进行 持久化操作
+            //在将拆旧清册数据存入数据库前先查出库中有没有这个project ReserveId的相关数据
+            //先判断  拆旧清册的文件与原数据库中的文件是否是同一个文件,是同一个,则不需要进行持久化
+            DocumentInfo info = auditService.getByProId(audit.getProjectReserveId());
+            if (!info.getDemolition().equals(audit.getOldInventoryDemolition())){
+                String projectReserveId = audit.getProjectReserveId();
+                demoliteService.deleteByProjectReserveId(projectReserveId);
+                //获取拆旧清册数据
+                //String index out of range: -1 这个异常一般是截取字符串时报的错误。
+                File file = new File(audit.getOldInventoryDemolition());
+                String path = file.getAbsolutePath();
+                int index = file.getAbsolutePath().indexOf("fileServer");
+
+                String FILE_PREFIX = loader.getProperty("linux.file.store.prefix");
+
+                if (SYS_TYPE.equals("1")) {
+                    path = path.substring(index-1);
+
+                } else {
+                    //liunx file store prefix
+                    path = FILE_PREFIX + Servlets.getRequest().getContextPath() + path.substring(index-1);
+                    path = path.replaceAll("\\\\","/");
+                }
+
+                File demoFile = new File(path);
+
+                InputStream inputStream = new FileInputStream(demoFile);
+                MultipartFile multipartFile = new MockMultipartFile("file", demoFile.getName(), null, inputStream);
+                ImportUtil importUtil = new ImportUtil(multipartFile, 0, 0);
+                //获取导入表格所有数据
+                List<Demolite> reserveManagementList = ReserveProcessProjectProUtil.getDemoliteUtil(importUtil, projectReserveId);
+                //将数据存入数据库
+                demoliteService.insertList(reserveManagementList);
+
+            }
+        }
+
+        return j;
+    }
+
+    public String fileNameSubString(String fileName){
+        //可能是多个文件的情况
+        //1、先拆分
+        if (StringUtils.isNotEmpty(fileName)){
+            String[] split = fileName.split("\\|");
+            String name = "";
+            for (int i=0;i<split.length;i++){
+                //截取字符串
+                //1、查找最后一次/出现的位置
+                int i1 = split[i].lastIndexOf("/");
+                String substring = split[i].substring(i1+1);
+                if (StringUtils.isNotEmpty(name)){
+                    name = name + "," + substring;
+                }else {
+                    name = substring;
+                }
+            }
+            return name;
+        }else {
+            return "";
+        }
+
+    }
 }

+ 545 - 344
src/main/java/com/jeeplus/modules/cg/reservemanagementcenter/statisticalTable/web/ProgressStatsController.java

@@ -4,14 +4,12 @@ import com.jeeplus.common.json.AjaxJson;
 import com.jeeplus.common.utils.StringUtils;
 import com.jeeplus.core.persistence.Page;
 import com.jeeplus.core.web.BaseController;
-import com.jeeplus.modules.cg.reservemanagementcenter.reserveManage.entity.ReserveProcessProject;
-import com.jeeplus.modules.cg.reservemanagementcenter.reserveManage.entity.ReserveSummary;
+import com.jeeplus.modules.cg.reservemanagementcenter.reserveManage.entity.FeedBackBudget;
 import com.jeeplus.modules.cg.reservemanagementcenter.reserveManage.service.ReserveProcessProjectService;
 import com.jeeplus.modules.cg.reservemanagementcenter.reserveManage.service.SummaryStatisticService;
 import com.jeeplus.modules.cg.reservemanagementcenter.statisticalTable.entity.History;
-import com.jeeplus.modules.cg.reservemanagementcenter.statisticalTable.entity.HistoryComment;
-import com.jeeplus.modules.cg.reservemanagementcenter.statisticalTable.entity.HistoryVarinst;
 import com.jeeplus.modules.cg.reservemanagementcenter.statisticalTable.entity.ProgressStats;
+import com.jeeplus.modules.cg.reservemanagementcenter.statisticalTable.service.BudgetStatsService;
 import com.jeeplus.modules.cg.reservemanagementcenter.statisticalTable.service.ProgressStatsService;
 import com.jeeplus.modules.cg.reservemanagementcenter.statisticalTable.util.ExcelExportUtil;
 import com.jeeplus.modules.cg.reservemanagementcenter.statisticalTable.util.ExcelImportUtil;
@@ -49,6 +47,9 @@ public class ProgressStatsController extends BaseController {
     private ProgressStatsService statsService;
 
     @Autowired
+    private BudgetStatsService budgetStatsService;
+
+    @Autowired
     private SummaryStatisticService statisticService;
 
     @Autowired
@@ -100,216 +101,294 @@ public class ProgressStatsController extends BaseController {
             //进行赋值操作
             //查出proc_ins_id
             stats = list.get(i);
-            String procInsId = statsService.getByProjectReserveId(stats.getProjectReserveId());
-            //设置是否纳入实施计划 及 初定实施批次 及是否纳入储备
-//            ReserveSummary summary = new ReserveSummary();
-//            summary.setProjectReserveId(stats.getProjectReserveId());
-//            ReserveSummary reserveSummary = statisticService.queryByProjectReserveId(summary);
-//            stats.setImplementPlan(reserveSummary.getImplementPlan());
-//            stats.setInitialImplementBatch(reserveSummary.getInitialImplementBatch());
-//            stats.setIncludeReserve(reserveSummary.getIncludeReserve());
-//            //设置项目名称,储备项目类型,需求提出单位,储备批次,备注
-//            ReserveProcessProject process = new ReserveProcessProject();
-//            process.setProjectReserveId(stats.getProjectReserveId());
-//            ReserveProcessProject project = projectService.queryByProjectReserveId(process);
-//            stats.setProjectName(project.getProjectName());
-//            stats.setRequirementType(project.getRequirementType());
-//            stats.setDemandUnit(project.getDemandUnit());
-//            stats.setReserveBatches(project.getReserveBatches());
-//            stats.setBasicRemarks(project.getBasicRemarks());
-            //设置设计委托发出时间 及 是否发出设计委托
-            //查看历史流程节点信息
-            //根据procInsId查出历史流程名称和时间
-            List<History> histories = statsService.getHistoryByExecuteId(procInsId);
-            //没有流程的情况
-            if (histories.size()==0){
-                stats.setReserveProgress("");
-                //设置是否发出设计委托
-                stats.setDesignCommission("否");
-                stats.setDesignCommissionIssueTime(null);
-                //设置初设提交时间 及 是否完成初设
-                stats.setCompleteDesign("否");
-                stats.setSubmitTime(null);
-                //设置是否完成审图,是否通过图纸审核,未通过原因分析,通过审核日期,是否需设计变更
-                stats.setCompleteDraw("");
-                stats.setDrawAudit("");
-                stats.setReasonForFailure("");
-                stats.setPassAuditDate(null);
-                //设置是否完成审核,是否通过专家审核,未通过原因分析,通过审核日期,是否需设计变更
-                stats.setCompleteReview("");
-                stats.setExpertReview("");
-                stats.setEstimateReasonForFailure("");
-                stats.setEstimatePassAuditDate(null);
-                //设置图纸是否定稿,定稿日期
-                stats.setDrawingFinalize("");
-                stats.setFinalDate(null);
-                //设置是否需设计变更
-                stats.setChangeDesign("");
+            //设置储备进度
+            stats.setReserveProgress(budgetStatsService.getReserveProgress(stats.getProjectReserveId()));
+            //设置是否发出设计委托
+            if (StringUtils.isNotEmpty(stats.getReserveProgress())){
+                stats.setDesignCommission("是");
             }else {
-                stats.setChangeDesign("");
-                //根据节点名称查找技经人员审预算
-                List<History> ysHistory = statsService.getHistoryByActName(procInsId, "技经人员审预算");
-                if (ysHistory.size()>0){
-                    String ysEndTime = ysHistory.get(ysHistory.size() - 1).getEndTime();
-                    //判断是哪条流程线
-                    HistoryVarinst ysProcInstId = statsService.getByProcInstId(ysEndTime, procInsId);
-                    //不通过的状态
-                    if (ysProcInstId.getName().equals("!pass")){
-                        stats.setChangeDesign("不通过");
-                    }
-                }
-
-                //根据procInsId查出当前流程名称
-                String name = statsService.getByExecuteId(procInsId);
-                if (name == null){
-                    stats.setReserveProgress("流程结束");
+                stats.setDesignCommission("否");
+            }
+            //设置设计委托发起时间    从历史表中获取最近的设计单位结束时间
+            String procInsId = statsService.getByProjectReserveId(stats.getProjectReserveId());
+            List<History> history = statsService.getHistoryByProInsId(procInsId, "设计单位上传文件");
+            if (history.size()>0){
+                stats.setDesignCommissionIssueTime(history.get(0).getStartTime());
+                //设置初设提交时间
+                stats.setSubmitTime(history.get(history.size()-1).getStartTime());
+                //设置是否完成初设
+                if (StringUtils.isNotEmpty(stats.getSubmitTime())){
+                    stats.setCompleteDesign("是");
                 }else {
-                    //设置储备进度
-                    stats.setReserveProgress(name);
+                    stats.setCompleteDesign("否");
                 }
-                //有流程的情况
-                String startTime = histories.get(histories.size() - 1).getStartTime();
-
-                //时间设置修改
-                SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd HH:mm");
-                String comTime = "";
-                if (startTime!=null){
-                    Date parse = format.parse(startTime);
-                    comTime = format.format(parse);
+                //设置是否进行审图
+                if (StringUtils.isNotEmpty(history.get(0).getEndTime())){
+                    stats.setCompleteDraw("是");
+                    stats.setCompleteDrawDate(history.get(0).getEndTime());
+                }else {
+                    stats.setCompleteDraw("否");
                 }
+                //设置是否通过图纸审核  查出最近的项目经理审图节点数据,根据他的结束时间查是否有下一个节点
+                List<History> jlHis = statsService.getHistoryByProInsId(procInsId, "项目经理审图");
+                List<History> lhHis = statsService.getHistoryByProInsId(procInsId, "联合审图");
+                List<History> gysHis = statsService.getHistoryByProInsId(procInsId, "技经人员审预算");
+                int status = projectService.getProcessStatus(stats.getProjectReserveId());
 
-                stats.setDesignCommission("是");
-                stats.setDesignCommissionIssueTime(comTime);
-                //设置初设提交时间 及 是否完成初设
-                //根据节点名称查找
-                List<History> history = statsService.getHistoryByActName(procInsId, "设计单位上传施工图纸");
-                String endTime = history.get(history.size() - 1).getEndTime();
-
-                //时间修改设置
-                if (endTime!=null){
-                    Date parse = format.parse(endTime);
-                    comTime = format.format(parse);
-                }
+                //从反馈表中查
+                FeedBackBudget feBook = statsService.getByProId(stats.getProjectReserveId());
+                if (jlHis.size()>0){
+                    if (StringUtils.isNotEmpty(jlHis.get(0).getEndTime())){
+                        if (jlHis.get(0).getEndTime().equals(history.get(0).getStartTime())){
+                            //说明是不通过
+                            stats.setDrawAudit("不通过");
+                            //设置通过审核日期
+                            stats.setPassAuditDate(jlHis.get(0).getEndTime());
+                            //设置未通过原因分析
 
-                if (endTime != null){
-                    stats.setCompleteDesign("是");
-                    stats.setSubmitTime(comTime);
-                }else {
-                    stats.setCompleteDesign("否");
-                    stats.setSubmitTime(null);
-                }
-                //设置是否完成审图,是否通过图纸审核,未通过原因分析,通过审核日期,是否需设计变更
-                //在历史表中根据节点名称查找
-                List<History> history02 = statsService.getHistoryByActName(procInsId, "联合审图配网项目经理审图");
-                if (history02.size()>0){
-                    String endTime02 = history02.get(0).getEndTime();
+                            String info = "";
+                            if (StringUtils.isNotEmpty(feBook.getDrawingAndSiteProblem())){
+                                info = feBook.getDrawingAndSiteProblem();
+                            }
+                            if (StringUtils.isNotEmpty(feBook.getCommunicationProblem())){
+                                if (StringUtils.isNotEmpty(info)){
+                                    info += "、" + feBook.getCommunicationProblem();
+                                }else {
+                                    info = feBook.getCommunicationProblem();
+                                }
+                            }
+                            if (StringUtils.isNotEmpty(feBook.getCivilPrefabricateProblem())){
+                                if (StringUtils.isNotEmpty(info)){
+                                    info += "、" + feBook.getCivilPrefabricateProblem();
+                                }else {
+                                    info = feBook.getCivilPrefabricateProblem();
+                                }
+                            }
+                            if (StringUtils.isNotEmpty(feBook.getLiveWorkNumProblem())){
+                                if (StringUtils.isNotEmpty(info)){
+                                    info += "、" + feBook.getLiveWorkNumProblem();
+                                }else {
+                                    info = feBook.getLiveWorkNumProblem();
+                                }
+                            }
+                            if (StringUtils.isNotEmpty(feBook.getProjectManagerOtherProblem())){
+                                if (StringUtils.isNotEmpty(info)){
+                                    info += "、" + feBook.getProjectManagerOtherProblem();
+                                }else {
+                                    info = feBook.getProjectManagerOtherProblem();
+                                }
+                            }
 
-                    //时间修改设置
-                    if (endTime02!=null){
-                        Date parse = format.parse(endTime02);
-                        comTime = format.format(parse);
+                            stats.setReasonForFailure(info);
+                            //设置是否需设计变更
+                            stats.setChangeDesign("是");
+                        }else if (gysHis.get(0).getStartTime().equals(jlHis.get(0).getEndTime())){
+                            //说明是通过
+                            stats.setDrawAudit("通过");
+                            //设置通过审核日期
+                            stats.setPassAuditDate(jlHis.get(0).getEndTime());
+                            //设置是否需设计变更
+                            stats.setChangeDesign("否");
+                        }else if (status == 3){
+                            //取消
+                            stats.setDrawAudit("取消");
+                            //设置通过审核日期
+                            stats.setPassAuditDate(jlHis.get(0).getEndTime());
+                            //设置是否需设计变更
+                            stats.setChangeDesign("否");
+                        }else if (status == 4){
+                            stats.setDrawAudit("待定");
+                            //设置通过审核日期
+                            stats.setPassAuditDate(jlHis.get(0).getEndTime());
+                            //设置是否需设计变更
+                            stats.setChangeDesign("否");
+                        }
                     }
-
-                    //刚进入联合审图的情况
-                    if (endTime02 == null){
-                        stats.setCompleteDraw("");
-                        stats.setDrawAudit("");
-                        stats.setReasonForFailure("");
-                        stats.setPassAuditDate(null);
-                    }else {
-                        //根据时间来查找下一个节点的(联合审图下一步)信息
-                        History historyByTime = statsService.getHistoryByTime(endTime02, procInsId);
-                        HistoryComment comment = statsService.getCommentByTime(endTime02, procInsId);
-                        if (historyByTime != null){
-                            //通过的情况
-                            if (historyByTime.getName().equals("设计单位上传预算书")){
-                                stats.setCompleteDraw("是");
-                                stats.setDrawAudit("是");
-                                stats.setReasonForFailure("");
-                                stats.setPassAuditDate(comTime);
-                            }else if (historyByTime.getName().equals("设计单位上传施工图纸")){
-                                //不通过
-                                stats.setCompleteDraw("否");
-                                stats.setDrawAudit("不通过");
-                                stats.setReasonForFailure(comment.getMessage());
-                                stats.setPassAuditDate(comTime);
+                }
+                //设置概预算审核是否进行审核
+                if (gysHis.size()>0){
+                    if (StringUtils.isNotEmpty(gysHis.get(0).getEndTime())){
+                        if (gysHis.get(0).getStartTime().equals(jlHis.get(0).getEndTime())){
+                            stats.setWhetherToAudit("是");
+                            //设置概预算审核日期
+                            stats.setAuditDate(gysHis.get(0).getStartTime());
+                            //设置是否通过专家审核
+                            if (StringUtils.isNotEmpty(gysHis.get(0).getEndTime())){
+                                if (gysHis.get(0).getEndTime().equals(history.get(0).getStartTime())){
+                                    //说明是未通过
+                                    stats.setExpertReview("不通过");
+                                    //设置通过审核日期
+                                    stats.setEstimatePassAuditDate(gysHis.get(0).getEndTime());
+                                    //设置未通过原因分析
+                                    String info = "";
+                                    if (StringUtils.isNotEmpty(feBook.getPreferedCase())){
+                                        info = feBook.getPreferedCase();
+                                    }
+                                    if (StringUtils.isNotEmpty(feBook.getTransferSituation())){
+                                        if (StringUtils.isNotEmpty(info)){
+                                            info += "、" + feBook.getTransferSituation();
+                                        }else {
+                                            info = feBook.getTransferSituation();
+                                        }
+                                    }
+                                    if (StringUtils.isNotEmpty(feBook.getBudgetTemplateCheck())){
+                                        if (StringUtils.isNotEmpty(info)){
+                                            info += "、" + feBook.getBudgetTemplateCheck();
+                                        }else {
+                                            info = feBook.getBudgetTemplateCheck();
+                                        }
+                                    }
+                                    if (StringUtils.isNotEmpty(feBook.getQuotaApplicationCheck())){
+                                        if (StringUtils.isNotEmpty(info)){
+                                            info += "、" + feBook.getQuotaApplicationCheck();
+                                        }else {
+                                            info = feBook.getQuotaApplicationCheck();
+                                        }
+                                    }
+                                    if (StringUtils.isNotEmpty(feBook.getWorkLoadCheck())){
+                                        if (StringUtils.isNotEmpty(info)){
+                                            info += "、" + feBook.getWorkLoadCheck();
+                                        }else {
+                                            info = feBook.getWorkLoadCheck();
+                                        }
+                                    }
+                                    if (StringUtils.isNotEmpty(feBook.getCheckTheFee())){
+                                        if (StringUtils.isNotEmpty(info)){
+                                            info += "、" + feBook.getCheckTheFee();
+                                        }else {
+                                            info = feBook.getCheckTheFee();
+                                        }
+                                    }
+                                    if (StringUtils.isNotEmpty(feBook.getSupplyCheck())){
+                                        if (StringUtils.isNotEmpty(info)){
+                                            info += "、" + feBook.getSupplyCheck();
+                                        }else {
+                                            info = feBook.getSupplyCheck();
+                                        }
+                                    }
+                                    if (StringUtils.isNotEmpty(feBook.getMaterialCheck())){
+                                        if (StringUtils.isNotEmpty(info)){
+                                            info += "、" + feBook.getMaterialCheck();
+                                        }else {
+                                            info = feBook.getMaterialCheck();
+                                        }
+                                    }
+                                    if (StringUtils.isNotEmpty(feBook.getLiveWorkFeeCheck())){
+                                        if (StringUtils.isNotEmpty(info)){
+                                            info += "、" + feBook.getLiveWorkFeeCheck();
+                                        }else {
+                                            info = feBook.getLiveWorkFeeCheck();
+                                        }
+                                    }
+                                    if (StringUtils.isNotEmpty(feBook.getDemolitionEngineeringProblems())){
+                                        if (StringUtils.isNotEmpty(info)){
+                                            info += "、" + feBook.getDemolitionEngineeringProblems();
+                                        }else {
+                                            info = feBook.getDemolitionEngineeringProblems();
+                                        }
+                                    }
+                                    if (StringUtils.isNotEmpty(feBook.getOtherProblem())){
+                                        if (StringUtils.isNotEmpty(info)){
+                                            info += "、" + feBook.getOtherProblem();
+                                        }else {
+                                            info = feBook.getOtherProblem();
+                                        }
+                                    }
+                                    stats.setEstimateReasonForFailure(info);
+                                    //设置是否需设计变更
+                                    stats.setEstimateChangeDesign("是");
+                                }else {
+                                    //说明是通过
+                                    stats.setExpertReview("通过");
+                                    //设置通过审核日期
+                                    stats.setEstimatePassAuditDate(gysHis.get(0).getEndTime());
+                                    //设置是否需设计变更
+                                    stats.setEstimateChangeDesign("否");
+                                }
                             }
                         }else {
-                            //还有一种是  取消、待定的情况  流程结束
-                            stats.setCompleteDraw("否");
-                            //判断是哪条流程线
-                            HistoryVarinst byProcInstId = statsService.getByProcInstId(endTime02, procInsId);
-                            if (byProcInstId.getName().equals("no")){
-                                stats.setDrawAudit("取消");
-                                stats.setReasonForFailure(comment.getMessage());
-                                stats.setPassAuditDate(comTime);
-                            }else if (byProcInstId.getName().equals("rural")){
-                                stats.setDrawAudit("待定");
-                                stats.setReasonForFailure(comment.getMessage());
-                                stats.setPassAuditDate(comTime);
-                            }
+                            stats.setWhetherToAudit("否");
                         }
                     }
-                }else {
-                    stats.setCompleteDraw("");
-                    stats.setDrawAudit("");
-                    stats.setReasonForFailure("");
-                    stats.setPassAuditDate(null);
                 }
-                //设置是否完成审核,是否通过专家审核,未通过原因分析,通过审核日期,是否需设计变更  概预算审核
-                //在历史表中根据节点名称查找是否就行了概预算审核
-                List<History> history03 = statsService.getHistoryByActName(procInsId, "技经人员审预算");
-                if (history03.size()>0){
-                    String endTime03 = history03.get(0).getEndTime();
 
-                    //时间修改设置
-                    if (endTime03!=null){
-                        Date parse = format.parse(endTime03);
-                        comTime = format.format(parse);
+                //设置是否进行图纸审查
+                if (lhHis.size()>0){
+                    if (StringUtils.isNotEmpty(lhHis.get(0).getEndTime())){
+                        if (lhHis.get(0).getEndTime().equals(history.get(0).getStartTime())){
+                            stats.setDrawingReview("是");
+                            //设置联合审图日期
+                            stats.setReviewDate(lhHis.get(0).getStartTime());
+                            //设置是否通过图纸审查
+                            if (StringUtils.isNotEmpty(lhHis.get(0).getEndTime())){
+                                //设置审图意见  从历史意见表中根据时间获取
+                                String comment = statsService.getCommentByProInsId(procInsId,lhHis.get(0).getEndTime());
+                                if (lhHis.get(0).getEndTime().equals(history.get(0).getStartTime())){
+                                    //说明是不通过
+                                    stats.setPassDrawingReview("不通过");
+                                    //设置通过联合审图日期
+                                    stats.setApprovedDate(lhHis.get(0).getEndTime());
+                                    //设置审图意见
+                                    stats.setReviewComment(comment);
+                                    //设置是否需设计变更
+                                    stats.setJointReviewDesignChange("是");
+                                }else if (status == 3){
+                                    //取消
+                                    stats.setPassDrawingReview("取消");
+                                    //设置通过联合审图日期
+                                    stats.setApprovedDate(lhHis.get(0).getEndTime());
+                                    stats.setReviewComment(comment);
+                                    //设置是否需设计变更
+                                    stats.setJointReviewDesignChange("是");
+                                }else if (status == 4){
+                                    //取消
+                                    stats.setPassDrawingReview("待定");
+                                    //设置通过联合审图日期
+                                    stats.setApprovedDate(lhHis.get(0).getEndTime());
+                                    stats.setReviewComment(comment);
+                                    //设置是否需设计变更
+                                    stats.setJointReviewDesignChange("是");
+                                }else {
+                                    //通过
+                                    stats.setPassDrawingReview("通过");
+                                    //设置通过联合审图日期
+                                    stats.setApprovedDate(lhHis.get(0).getEndTime());
+                                    //设置是否需设计变更
+                                    stats.setJointReviewDesignChange("否");
+                                }
+                            }
+                        }
                     }
-
-                    //刚进入审预算的情况
-                    if (endTime03 == null){
-                        stats.setCompleteReview("");
-                        stats.setExpertReview("");
-                        stats.setEstimateReasonForFailure("");
-                        stats.setEstimatePassAuditDate(null);
-                        //设置图纸是否定稿,定稿日期
-                        stats.setDrawingFinalize("");
-                        stats.setFinalDate(null);
+                }
+                //设置定稿日期
+                if (StringUtils.isNotEmpty(stats.getPassAuditDate()) &
+                        StringUtils.isNotEmpty(stats.getPassProvincialCompanyReview()) &
+                        StringUtils.isNotEmpty(stats.getApprovedDate())){
+                    Date timeByProID = budgetStatsService.getTimeByProID(stats.getProjectReserveId());
+                    SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
+                    Date date1 = format.parse(stats.getPassAuditDate());
+                    Date date2 = format.parse(stats.getApprovedDate());
+                    if (timeByProID.before(date1)){
+                        if (date1.before(date2)) {
+                            stats.setFinalDate(format.format(date2));
+                        }else {
+                            stats.setFinalDate(format.format(date1));
+                        }
                     }else {
-                        //根据时间来查找下一个节点的信息(是通过还是驳回)
-                        History hi = statsService.getHistoryByTime(endTime03,procInsId);
-                        HistoryComment comment = statsService.getCommentByTime(endTime03, procInsId);
-                        //通过的情况
-                        if (hi == null){
-                            stats.setCompleteReview("是");
-                            stats.setExpertReview("是");
-                            stats.setEstimateReasonForFailure("");
-                            stats.setEstimatePassAuditDate(comTime);
-                            //设置图纸是否定稿,定稿日期
-                            stats.setDrawingFinalize("是");
-                            stats.setFinalDate(comTime);
+                        if (timeByProID.before(date2)){
+                            stats.setFinalDate(format.format(date2));
                         }else {
-                            //驳回的情况
-                            stats.setCompleteReview("否");
-                            stats.setExpertReview("否");
-                            stats.setEstimateReasonForFailure(comment.getMessage());
-                            stats.setEstimatePassAuditDate(comTime);
-                            //设置图纸是否定稿,定稿日期
-                            stats.setDrawingFinalize("否");
-                            stats.setFinalDate("");
+                            stats.setFinalDate(format.format(timeByProID));
                         }
                     }
-                }else {
-                    stats.setCompleteReview("");
-                    stats.setExpertReview("");
-                    stats.setEstimateReasonForFailure("");
-                    stats.setEstimatePassAuditDate(null);
-                    //设置图纸是否定稿,定稿日期
-                    stats.setDrawingFinalize("");
-                    stats.setFinalDate(null);
+                    //设置图纸是否定稿
+                    if (StringUtils.isNotEmpty(stats.getFinalDate())){
+                        stats.setDrawingFinalize("是");
+                    }else {
+                        stats.setDrawingFinalize("否");
+                    }
                 }
+
             }
 
             statsList.add(stats);
@@ -359,7 +438,7 @@ public class ProgressStatsController extends BaseController {
     @ResponseBody
     @RequiresPermissions("cg:reservemanagementcenter:progressStats:export")
     @RequestMapping(value = "export")
-    public void exportExcel(ProgressStats progressStats, HttpServletRequest request, HttpServletResponse response) {
+    public void exportExcel(ProgressStats progressStats, HttpServletRequest request, HttpServletResponse response) throws ParseException {
         List<ProgressStats> list = statsService.exportFindList(progressStats);
 
         List<ProgressStats> statsList = new ArrayList<>();
@@ -368,170 +447,292 @@ public class ProgressStatsController extends BaseController {
             //进行赋值操作
             //查出proc_ins_id
             stats = list.get(i);
-            String procInsId = statsService.getByProjectReserveId(stats.getProjectReserveId());
-            //设置是否纳入实施计划 及 初定实施批次 及是否纳入储备
-            ReserveSummary summary = new ReserveSummary();
-            summary.setProjectReserveId(stats.getProjectReserveId());
-            ReserveSummary reserveSummary = statisticService.queryByProjectReserveId(summary);
-//            stats.setImplementPlan(reserveSummary.getImplementPlan());
-            stats.setInitialImplementBatch(reserveSummary.getInitialImplementBatch());
-            stats.setIncludeReserve(reserveSummary.getIncludeReserve());
-            //设置项目名称,储备项目类型,需求提出单位,储备批次,备注
-            ReserveProcessProject process = new ReserveProcessProject();
-            process.setProjectReserveId(stats.getProjectReserveId());
-            ReserveProcessProject project = projectService.queryByProjectReserveId(process);
-            stats.setProjectName(project.getProjectName());
-            stats.setRequirementType(project.getRequirementType());
-            stats.setDemandUnit(project.getDemandUnit());
-            stats.setReserveBatches(project.getReserveBatches());
-            stats.setBasicRemarks(project.getBasicRemarks());
-            //设置设计委托发出时间 及 是否发出设计委托
-            //查看历史流程节点信息
-            //根据procInsId查出历史流程名称和时间
-            List<History> histories = statsService.getHistoryByExecuteId(procInsId);
-            //没有流程的情况
-            if (histories.size()==0){
-                //设置是否发出设计委托
-                stats.setDesignCommission("否");
-                stats.setDesignCommissionIssueTime(null);
-                //设置初设提交时间 及 是否完成初设
-                stats.setCompleteDesign("否");
-                stats.setSubmitTime(null);
-                //设置是否完成审图,是否通过图纸审核,未通过原因分析,通过审核日期,是否需设计变更
-                stats.setCompleteDraw("");
-                stats.setDrawAudit("");
-                stats.setReasonForFailure("");
-                stats.setPassAuditDate(null);
-                //设置是否完成审核,是否通过专家审核,未通过原因分析,通过审核日期,是否需设计变更
-                stats.setCompleteReview("");
-                stats.setExpertReview("");
-                stats.setEstimateReasonForFailure("");
-                stats.setEstimatePassAuditDate(null);
-                //设置图纸是否定稿,定稿日期
-                stats.setDrawingFinalize("");
-                stats.setFinalDate(null);
-            }else {
-                //根据procInsId查出当前流程名称
-                String name = statsService.getByExecuteId(procInsId);
-                if (name == null){
-                    stats.setReserveProgress("流程结束");
-                }else {
-                    //设置储备进度
-                    stats.setReserveProgress(name);
-                }
-                //有流程的情况
-                String startTime = histories.get(histories.size() - 1).getStartTime();
+            //设置储备进度
+            stats.setReserveProgress(budgetStatsService.getReserveProgress(stats.getProjectReserveId()));
+            //设置是否发出设计委托
+            if (StringUtils.isNotEmpty(stats.getReserveProgress())){
                 stats.setDesignCommission("是");
-                stats.setDesignCommissionIssueTime(startTime);
-                //设置初设提交时间 及 是否完成初设
-                //根据节点名称查找
-                List<History> history = statsService.getHistoryByActName(procInsId, "设计单位上传施工图纸");
-                String endTime = history.get(history.size() - 1).getEndTime();
-                if (endTime != null){
+            }else {
+                stats.setDesignCommission("否");
+            }
+            //设置设计委托发起时间    从历史表中获取最近的设计单位结束时间
+            String procInsId = statsService.getByProjectReserveId(stats.getProjectReserveId());
+            List<History> history = statsService.getHistoryByProInsId(procInsId, "设计单位上传文件");
+            if (history.size()>0){
+                stats.setDesignCommissionIssueTime(history.get(0).getStartTime());
+                //设置初设提交时间
+                stats.setSubmitTime(history.get(history.size()-1).getStartTime());
+                //设置是否完成初设
+                if (StringUtils.isNotEmpty(stats.getSubmitTime())){
                     stats.setCompleteDesign("是");
-                    stats.setSubmitTime(endTime);
                 }else {
                     stats.setCompleteDesign("否");
-                    stats.setSubmitTime(null);
                 }
-                //设置是否完成审图,是否通过图纸审核,未通过原因分析,通过审核日期,是否需设计变更
-                //在历史表中根据节点名称查找
-                List<History> history02 = statsService.getHistoryByActName(procInsId, "联合审图配网项目经理审图");
-                if (history02.size()>0){
-                    String endTime02 = history02.get(0).getEndTime();
-                    //刚进入联合审图的情况
-                    if (endTime02 == null){
-                        stats.setCompleteDraw("");
-                        stats.setDrawAudit("");
-                        stats.setReasonForFailure("");
-                        stats.setPassAuditDate(null);
-                    }else {
-                        //根据时间来查找下一个节点的(联合审图下一步)信息
-                        History historyByTime = statsService.getHistoryByTime(endTime02, procInsId);
-                        HistoryComment comment = statsService.getCommentByTime(endTime02, procInsId);
-                        if (historyByTime != null){
-                            //通过的情况
-                            if (historyByTime.getName().equals("设计单位上传预算书")){
-                                stats.setCompleteDraw("是");
-                                stats.setDrawAudit("是");
-                                stats.setReasonForFailure("");
-                                stats.setPassAuditDate(endTime02);
-                            }else if (historyByTime.getName().equals("设计单位上传施工图纸")){
-                                //不通过
-                                stats.setCompleteDraw("否");
-                                stats.setDrawAudit("不通过");
-                                stats.setReasonForFailure(comment.getMessage());
-                                stats.setPassAuditDate(endTime02);
+                //设置是否进行审图
+                if (StringUtils.isNotEmpty(history.get(0).getEndTime())){
+                    stats.setCompleteDraw("是");
+                    stats.setCompleteDrawDate(history.get(0).getEndTime());
+                }else {
+                    stats.setCompleteDraw("否");
+                }
+                //设置是否通过图纸审核  查出最近的项目经理审图节点数据,根据他的结束时间查是否有下一个节点
+                List<History> jlHis = statsService.getHistoryByProInsId(procInsId, "项目经理审图");
+                List<History> lhHis = statsService.getHistoryByProInsId(procInsId, "联合审图");
+                List<History> gysHis = statsService.getHistoryByProInsId(procInsId, "技经人员审预算");
+                int status = projectService.getProcessStatus(stats.getProjectReserveId());
+
+                //从反馈表中查
+                FeedBackBudget feBook = statsService.getByProId(stats.getProjectReserveId());
+                if (jlHis.size()>0){
+                    if (StringUtils.isNotEmpty(jlHis.get(0).getEndTime())){
+                        if (jlHis.get(0).getEndTime().equals(history.get(0).getStartTime())){
+                            //说明是不通过
+                            stats.setDrawAudit("不通过");
+                            //设置通过审核日期
+                            stats.setPassAuditDate(jlHis.get(0).getEndTime());
+                            //设置未通过原因分析
+
+                            String info = "";
+                            if (StringUtils.isNotEmpty(feBook.getDrawingAndSiteProblem())){
+                                info = feBook.getDrawingAndSiteProblem();
                             }
-                        }else {
-                            //还有一种是  取消、待定的情况  流程结束
-                            stats.setCompleteDraw("否");
-                            //判断是哪条流程线
-                            HistoryVarinst byProcInstId = statsService.getByProcInstId(endTime02, procInsId);
-                            if (byProcInstId.getName().equals("no")){
-                                stats.setDrawAudit("取消");
-                                stats.setReasonForFailure(comment.getMessage());
-                                stats.setPassAuditDate(endTime02);
-                            }else if (byProcInstId.getName().equals("rural")){
-                                stats.setDrawAudit("待定");
-                                stats.setReasonForFailure(comment.getMessage());
-                                stats.setPassAuditDate(endTime02);
+                            if (StringUtils.isNotEmpty(feBook.getCommunicationProblem())){
+                                if (StringUtils.isNotEmpty(info)){
+                                    info += "、" + feBook.getCommunicationProblem();
+                                }else {
+                                    info = feBook.getCommunicationProblem();
+                                }
+                            }
+                            if (StringUtils.isNotEmpty(feBook.getCivilPrefabricateProblem())){
+                                if (StringUtils.isNotEmpty(info)){
+                                    info += "、" + feBook.getCivilPrefabricateProblem();
+                                }else {
+                                    info = feBook.getCivilPrefabricateProblem();
+                                }
+                            }
+                            if (StringUtils.isNotEmpty(feBook.getLiveWorkNumProblem())){
+                                if (StringUtils.isNotEmpty(info)){
+                                    info += "、" + feBook.getLiveWorkNumProblem();
+                                }else {
+                                    info = feBook.getLiveWorkNumProblem();
+                                }
                             }
+                            if (StringUtils.isNotEmpty(feBook.getProjectManagerOtherProblem())){
+                                if (StringUtils.isNotEmpty(info)){
+                                    info += "、" + feBook.getProjectManagerOtherProblem();
+                                }else {
+                                    info = feBook.getProjectManagerOtherProblem();
+                                }
+                            }
+
+                            stats.setReasonForFailure(info);
+                            //设置是否需设计变更
+                            stats.setChangeDesign("是");
+                        }else if (gysHis.get(0).getStartTime().equals(jlHis.get(0).getEndTime())){
+                            //说明是通过
+                            stats.setDrawAudit("通过");
+                            //设置通过审核日期
+                            stats.setPassAuditDate(jlHis.get(0).getEndTime());
+                            //设置是否需设计变更
+                            stats.setChangeDesign("否");
+                        }else if (status == 3){
+                            //取消
+                            stats.setDrawAudit("取消");
+                            //设置通过审核日期
+                            stats.setPassAuditDate(jlHis.get(0).getEndTime());
+                            //设置是否需设计变更
+                            stats.setChangeDesign("否");
+                        }else if (status == 4){
+                            stats.setDrawAudit("待定");
+                            //设置通过审核日期
+                            stats.setPassAuditDate(jlHis.get(0).getEndTime());
+                            //设置是否需设计变更
+                            stats.setChangeDesign("否");
                         }
                     }
-                }else {
-                    stats.setCompleteDraw("");
-                    stats.setDrawAudit("");
-                    stats.setReasonForFailure("");
-                    stats.setPassAuditDate(null);
                 }
-                //设置是否完成审核,是否通过专家审核,未通过原因分析,通过审核日期,是否需设计变更  概预算审核
-                //在历史表中根据节点名称查找是否就行了概预算审核
-                List<History> history03 = statsService.getHistoryByActName(procInsId, "技经人员审预算");
-                if (history03.size()>0){
-                    String endTime03 = history03.get(0).getEndTime();
-                    //刚进入审预算的情况
-                    if (endTime03 == null){
-                        stats.setCompleteReview("");
-                        stats.setExpertReview("");
-                        stats.setEstimateReasonForFailure("");
-                        stats.setEstimatePassAuditDate(null);
-                        //设置图纸是否定稿,定稿日期
-                        stats.setDrawingFinalize("");
-                        stats.setFinalDate(null);
+                //设置概预算审核是否进行审核
+                if (gysHis.size()>0){
+                    if (gysHis.get(0).getStartTime().equals(jlHis.get(0).getEndTime())){
+                        stats.setWhetherToAudit("是");
+                        //设置概预算审核日期
+                        stats.setAuditDate(gysHis.get(0).getStartTime());
+                        //设置是否通过专家审核
+                        if (StringUtils.isNotEmpty(gysHis.get(0).getEndTime())){
+                            if (gysHis.get(0).getEndTime().equals(history.get(0).getStartTime())){
+                                //说明是未通过
+                                stats.setExpertReview("不通过");
+                                //设置通过审核日期
+                                stats.setEstimatePassAuditDate(gysHis.get(0).getEndTime());
+                                //设置未通过原因分析
+                                String info = "";
+                                if (StringUtils.isNotEmpty(feBook.getPreferedCase())){
+                                    info = feBook.getPreferedCase();
+                                }
+                                if (StringUtils.isNotEmpty(feBook.getTransferSituation())){
+                                    if (StringUtils.isNotEmpty(info)){
+                                        info += "、" + feBook.getTransferSituation();
+                                    }else {
+                                        info = feBook.getTransferSituation();
+                                    }
+                                }
+                                if (StringUtils.isNotEmpty(feBook.getBudgetTemplateCheck())){
+                                    if (StringUtils.isNotEmpty(info)){
+                                        info += "、" + feBook.getBudgetTemplateCheck();
+                                    }else {
+                                        info = feBook.getBudgetTemplateCheck();
+                                    }
+                                }
+                                if (StringUtils.isNotEmpty(feBook.getQuotaApplicationCheck())){
+                                    if (StringUtils.isNotEmpty(info)){
+                                        info += "、" + feBook.getQuotaApplicationCheck();
+                                    }else {
+                                        info = feBook.getQuotaApplicationCheck();
+                                    }
+                                }
+                                if (StringUtils.isNotEmpty(feBook.getWorkLoadCheck())){
+                                    if (StringUtils.isNotEmpty(info)){
+                                        info += "、" + feBook.getWorkLoadCheck();
+                                    }else {
+                                        info = feBook.getWorkLoadCheck();
+                                    }
+                                }
+                                if (StringUtils.isNotEmpty(feBook.getCheckTheFee())){
+                                    if (StringUtils.isNotEmpty(info)){
+                                        info += "、" + feBook.getCheckTheFee();
+                                    }else {
+                                        info = feBook.getCheckTheFee();
+                                    }
+                                }
+                                if (StringUtils.isNotEmpty(feBook.getSupplyCheck())){
+                                    if (StringUtils.isNotEmpty(info)){
+                                        info += "、" + feBook.getSupplyCheck();
+                                    }else {
+                                        info = feBook.getSupplyCheck();
+                                    }
+                                }
+                                if (StringUtils.isNotEmpty(feBook.getMaterialCheck())){
+                                    if (StringUtils.isNotEmpty(info)){
+                                        info += "、" + feBook.getMaterialCheck();
+                                    }else {
+                                        info = feBook.getMaterialCheck();
+                                    }
+                                }
+                                if (StringUtils.isNotEmpty(feBook.getLiveWorkFeeCheck())){
+                                    if (StringUtils.isNotEmpty(info)){
+                                        info += "、" + feBook.getLiveWorkFeeCheck();
+                                    }else {
+                                        info = feBook.getLiveWorkFeeCheck();
+                                    }
+                                }
+                                if (StringUtils.isNotEmpty(feBook.getDemolitionEngineeringProblems())){
+                                    if (StringUtils.isNotEmpty(info)){
+                                        info += "、" + feBook.getDemolitionEngineeringProblems();
+                                    }else {
+                                        info = feBook.getDemolitionEngineeringProblems();
+                                    }
+                                }
+                                if (StringUtils.isNotEmpty(feBook.getOtherProblem())){
+                                    if (StringUtils.isNotEmpty(info)){
+                                        info += "、" + feBook.getOtherProblem();
+                                    }else {
+                                        info = feBook.getOtherProblem();
+                                    }
+                                }
+                                stats.setEstimateReasonForFailure(info);
+                                //设置是否需设计变更
+                                stats.setEstimateChangeDesign("是");
+                            }else {
+                                //说明是通过
+                                stats.setExpertReview("通过");
+                                //设置通过审核日期
+                                stats.setEstimatePassAuditDate(gysHis.get(0).getEndTime());
+                                //设置是否需设计变更
+                                stats.setEstimateChangeDesign("否");
+                            }
+                        }
                     }else {
-                        //根据时间来查找下一个节点的信息(是通过还是驳回)
-                        History hi = statsService.getHistoryByTime(endTime03,procInsId);
-                        HistoryComment comment = statsService.getCommentByTime(endTime03, procInsId);
-                        //通过的情况
-                        if (hi == null){
-                            stats.setCompleteReview("是");
-                            stats.setExpertReview("是");
-                            stats.setEstimateReasonForFailure("");
-                            stats.setEstimatePassAuditDate(endTime03);
-                            //设置图纸是否定稿,定稿日期
-                            stats.setDrawingFinalize("是");
-                            stats.setFinalDate(endTime03);
+                        stats.setWhetherToAudit("否");
+                    }
+                }
+
+                //设置是否进行图纸审查
+                if (lhHis.size()>0){
+                    if (StringUtils.isNotEmpty(history.get(0).getEndTime())){
+                        if (history.get(0).getEndTime().equals(lhHis.get(0).getStartTime())){
+                            stats.setDrawingReview("是");
+                            //设置联合审图日期
+                            stats.setReviewDate(lhHis.get(0).getStartTime());
+                            //设置是否通过图纸审查
+                            if (StringUtils.isNotEmpty(lhHis.get(0).getEndTime())){
+                                //设置审图意见  从历史意见表中根据时间获取
+                                String comment = statsService.getCommentByProInsId(procInsId,lhHis.get(0).getEndTime());
+                                if (lhHis.get(0).getEndTime().equals(history.get(0).getStartTime())){
+                                    //说明是不通过
+                                    stats.setPassDrawingReview("不通过");
+                                    //设置通过联合审图日期
+                                    stats.setApprovedDate(lhHis.get(0).getEndTime());
+                                    //设置审图意见
+                                    stats.setReviewComment(comment);
+                                    //设置是否需设计变更
+                                    stats.setJointReviewDesignChange("是");
+                                }else if (status == 3){
+                                    //取消
+                                    stats.setPassDrawingReview("取消");
+                                    //设置通过联合审图日期
+                                    stats.setApprovedDate(lhHis.get(0).getEndTime());
+                                    stats.setReviewComment(comment);
+                                    //设置是否需设计变更
+                                    stats.setJointReviewDesignChange("是");
+                                }else if (status == 4){
+                                    //取消
+                                    stats.setPassDrawingReview("待定");
+                                    //设置通过联合审图日期
+                                    stats.setApprovedDate(lhHis.get(0).getEndTime());
+                                    stats.setReviewComment(comment);
+                                    //设置是否需设计变更
+                                    stats.setJointReviewDesignChange("是");
+                                }else {
+                                    //通过
+                                    stats.setPassDrawingReview("通过");
+                                    //设置通过联合审图日期
+                                    stats.setApprovedDate(lhHis.get(0).getEndTime());
+                                    //设置是否需设计变更
+                                    stats.setJointReviewDesignChange("否");
+                                }
+                            }
+                        }
+                    }
+                }
+                //设置定稿日期
+                if (StringUtils.isNotEmpty(stats.getPassAuditDate()) &
+                        StringUtils.isNotEmpty(stats.getPassProvincialCompanyReview()) &
+                        StringUtils.isNotEmpty(stats.getApprovedDate())){
+                    Date timeByProID = budgetStatsService.getTimeByProID(stats.getProjectReserveId());
+                    SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
+                    Date date1 = format.parse(stats.getPassAuditDate());
+                    Date date2 = format.parse(stats.getApprovedDate());
+                    if (timeByProID.before(date1)){
+                        if (date1.before(date2)) {
+                            stats.setFinalDate(format.format(date2));
+                        }else {
+                            stats.setFinalDate(format.format(date1));
+                        }
+                    }else {
+                        if (timeByProID.before(date2)){
+                            stats.setFinalDate(format.format(date2));
                         }else {
-                            //驳回的情况
-                            stats.setCompleteReview("否");
-                            stats.setExpertReview("否");
-                            stats.setEstimateReasonForFailure(comment.getMessage());
-                            stats.setEstimatePassAuditDate(endTime03);
-                            //设置图纸是否定稿,定稿日期
-                            stats.setDrawingFinalize("否");
-                            stats.setFinalDate("");
+                            stats.setFinalDate(format.format(timeByProID));
                         }
                     }
-                }else {
-                    stats.setCompleteReview("");
-                    stats.setExpertReview("");
-                    stats.setEstimateReasonForFailure("");
-                    stats.setEstimatePassAuditDate(null);
-                    //设置图纸是否定稿,定稿日期
-                    stats.setDrawingFinalize("");
-                    stats.setFinalDate(null);
+                    //设置图纸是否定稿
+                    if (StringUtils.isNotEmpty(stats.getFinalDate())){
+                        stats.setDrawingFinalize("是");
+                    }else {
+                        stats.setDrawingFinalize("否");
+                    }
                 }
+
             }
 
             statsList.add(stats);

+ 10 - 21
src/main/java/com/jeeplus/modules/cg/reservemanagementcenter/statisticalTable/web/SpecialSupplyController.java

@@ -3,8 +3,8 @@ package com.jeeplus.modules.cg.reservemanagementcenter.statisticalTable.web;
 import com.jeeplus.common.utils.StringUtils;
 import com.jeeplus.core.persistence.Page;
 import com.jeeplus.core.web.BaseController;
-import com.jeeplus.modules.cg.reservemanagementcenter.statisticalTable.entity.History;
 import com.jeeplus.modules.cg.reservemanagementcenter.statisticalTable.entity.SpecialSupply;
+import com.jeeplus.modules.cg.reservemanagementcenter.statisticalTable.service.BudgetStatsService;
 import com.jeeplus.modules.cg.reservemanagementcenter.statisticalTable.service.SpecialSupplyService;
 import com.jeeplus.modules.cg.reservemanagementcenter.statisticalTable.util.ExcelExportUtil;
 import org.apache.poi.xssf.usermodel.XSSFWorkbook;
@@ -35,6 +35,10 @@ public class SpecialSupplyController extends BaseController {
     @Autowired
     private SpecialSupplyService supplyService;
 
+    @Autowired
+    private BudgetStatsService budgetStatsService;
+
+
     @ModelAttribute
     public SpecialSupply get(@RequestParam(required = false) String id) {
         SpecialSupply entity = null;
@@ -82,16 +86,9 @@ public class SpecialSupplyController extends BaseController {
             //进行赋值操作
             //根据projectReserveId查出流程表的proc_ins_id
             String procInsId = supplyService.getByProjectReserveId(supply.getProjectReserveId());
-            //根据procInsId查出历史流程名称和时间
-            List<History> histories = supplyService.getHistoryByExecuteId(procInsId);
-            //当size>0时待办有历史流程,
-            if (histories.size()>0){
-                //根据proc_ins_id去运行时任务节点表(act_ru_task)中查出当前流程名称
-                String name = supplyService.getByExecuteId(procInsId);
-                supply.setReserveProgress(name);
-            }else {
-                supply.setReserveProgress("");
-            }
+            //设置储备进度
+            supply.setReserveProgress(budgetStatsService.getReserveProgress(supply.getProjectReserveId()));
+
             //设置20kv物资统计
             //设置高低压开关柜统计
             Double kgg1 = supplyService.getData("500116761", "环网柜,AC10kV,630A,负荷开关柜,SF6,户内。SF6灭弧,带避雷器,电动,端子排", "");
@@ -134,16 +131,8 @@ public class SpecialSupplyController extends BaseController {
             //进行赋值操作
             //根据projectReserveId查出流程表的proc_ins_id
             String procInsId = supplyService.getByProjectReserveId(supply.getProjectReserveId());
-            //根据procInsId查出历史流程名称和时间
-            List<History> histories = supplyService.getHistoryByExecuteId(procInsId);
-            //当size>0时待办有历史流程,
-            if (histories.size()>0){
-                //根据proc_ins_id去运行时任务节点表(act_ru_task)中查出当前流程名称
-                String name = supplyService.getByExecuteId(procInsId);
-                supply.setReserveProgress(name);
-            }else {
-                supply.setReserveProgress("");
-            }
+            //设置储备进度
+            supply.setReserveProgress(budgetStatsService.getReserveProgress(supply.getProjectReserveId()));
             //设置20kv物资统计
             //设置高低压开关柜统计
             Double kgg1 = supplyService.getData("500116761", "环网柜,AC10kV,630A,负荷开关柜,SF6,户内。SF6灭弧,带避雷器,电动,端子排", "");

+ 5 - 26
src/main/java/com/jeeplus/modules/sg/financial/settlement/web/ProjectBudgetController.java

@@ -3,15 +3,11 @@
  */
 package com.jeeplus.modules.sg.financial.settlement.web;
 
-import com.drew.metadata.jfif.JfifDescriptor;
 import com.jeeplus.common.json.AjaxJson;
-import com.jeeplus.common.utils.CacheUtils;
 import com.jeeplus.common.utils.StringUtils;
 import com.jeeplus.common.utils.excel.ImportExcel;
 import com.jeeplus.core.persistence.Page;
 import com.jeeplus.core.web.BaseController;
-import com.jeeplus.modules.sg.audit.information.utils.FreemarkerUtil;
-import com.jeeplus.modules.sg.audit.information.utils.ResponseUtil;
 import com.jeeplus.modules.sg.financial.erpcredit.entity.ErpAccount;
 import com.jeeplus.modules.sg.financial.erpcredit.entity.ErpCredit;
 import com.jeeplus.modules.sg.financial.erpcredit.entity.ErpCreditEquipment;
@@ -20,7 +16,6 @@ import com.jeeplus.modules.sg.financial.erpcredit.util.ErpInfo;
 import com.jeeplus.modules.sg.financial.erpcredit.util.ImportUtil;
 import com.jeeplus.modules.sg.financial.erpcredit.util.Result;
 import com.jeeplus.modules.sg.financial.erpcredit.util.ValidationUtils;
-import com.jeeplus.modules.sg.financial.settlement.entity.Corresponding;
 import com.jeeplus.modules.sg.financial.settlement.entity.CostCheck;
 import com.jeeplus.modules.sg.financial.settlement.entity.DonorMaterial;
 import com.jeeplus.modules.sg.financial.settlement.entity.ProjectBudget;
@@ -29,26 +24,11 @@ import com.jeeplus.modules.sg.financial.settlement.service.CostCheckService;
 import com.jeeplus.modules.sg.financial.settlement.service.DonorMaterialService;
 import com.jeeplus.modules.sg.financial.settlement.service.ProjectBudgetService;
 import com.jeeplus.modules.sg.financial.settlement.util.MyExportUtil;
-import com.jeeplus.modules.sg.settActivi.entity.SettActivi;
-import com.jeeplus.modules.sg.settActivi.entity.SettList;
-import com.jeeplus.modules.sys.entity.DictValue;
-import com.jeeplus.modules.sys.utils.DictUtils;
-import com.jeeplus.modules.sys.utils.UserUtils;
-import com.jeeplus.modules.test.one.dialog.entity.Leave1;
-import freemarker.template.Configuration;
-import freemarker.template.Template;
-import net.oschina.j2cache.CacheChannel;
-import net.oschina.j2cache.J2Cache;
-import net.oschina.j2cache.redis.RedisCacheProvider;
-import net.oschina.j2cache.redis.RedisClient;
-import net.oschina.j2cache.redis.RedisUtils;
 import org.apache.poi.ss.usermodel.Row;
 import org.apache.poi.xssf.usermodel.XSSFWorkbook;
 import org.apache.shiro.authz.annotation.Logical;
 import org.apache.shiro.authz.annotation.RequiresPermissions;
-import org.nustaq.serialization.FSTObjectOutput;
 import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.security.web.authentication.SimpleUrlAuthenticationFailureHandler;
 import org.springframework.stereotype.Controller;
 import org.springframework.ui.Model;
 import org.springframework.web.bind.annotation.ModelAttribute;
@@ -56,19 +36,18 @@ import org.springframework.web.bind.annotation.RequestMapping;
 import org.springframework.web.bind.annotation.RequestParam;
 import org.springframework.web.bind.annotation.ResponseBody;
 import org.springframework.web.multipart.MultipartFile;
-import redis.clients.jedis.Jedis;
 
-import javax.json.Json;
 import javax.servlet.http.HttpServletRequest;
 import javax.servlet.http.HttpServletResponse;
 import javax.servlet.http.HttpSession;
 import javax.validation.ConstraintViolationException;
-import java.io.File;
-import java.io.IOException;
 import java.math.BigDecimal;
 import java.text.ParseException;
 import java.text.SimpleDateFormat;
-import java.util.*;
+import java.util.ArrayList;
+import java.util.Date;
+import java.util.List;
+import java.util.Map;
 
 /**
  * 概预算基本信息维护
@@ -803,4 +782,4 @@ public class ProjectBudgetController extends BaseController {
         }
         return j;
     }
-}
+}

BIN
src/main/resources/freemarker/excelmodel/budgetStats.xlsx


BIN
src/main/resources/freemarker/excelmodel/cable.xlsx


BIN
src/main/resources/freemarker/excelmodel/constructeScale.xlsx


BIN
src/main/resources/freemarker/excelmodel/demoliteList.xlsx


BIN
src/main/resources/freemarker/excelmodel/progressStats.xlsx


+ 16 - 16
src/main/webapp/webpage/modules/cg/statisticalTable/budgetStats/budgetStats.js

@@ -82,9 +82,11 @@ $(document).ready(function () {
                 [
                     {checkbox:true,width: 36},
                     {"title":"储备项目基本信息","colspan":21,"halign":"center","align": "center",width: "4200px"},
+                    {"title":"项目参建(单位)人员信息","colspan":5,"halign":"center","align": "center",width: "1000px"},
+                    {"title":"分包信息","colspan":5,"halign":"center","align": "center",width: "1000px"},
                     {"title":"概算信息(审前)","colspan":10,"halign":"center","align": "center",width: "2000px"},
                     {"title":"概算信息(审后)","colspan":10,"halign":"center","align": "center",width: "2000px"},
-                    {"title":"概算状态","colspan":2,"halign":"center","align": "center",width: "400px"}
+                    {"title":"概算状态","colspan":4,"halign":"center","align": "center",width: "800px"}
                 ],
                 [
                     {checkbox:true,width: 36},
@@ -97,21 +99,7 @@ $(document).ready(function () {
                     { field: 'blockSupply', title: "供电区域", valign:"middle", align:"center", colspan: 1 },
                     { field: 'gridNumber', title: "网格编号", valign:"middle", align:"center", colspan: 1 },
                     { field: 'cellNumber', title: "单元格编号", valign:"middle", align:"center", colspan: 1 ,formatter:paramsMatter},
-                    { field: 'projectReserveId', title: "项目储备编号", valign:"middle", align:"center", colspan: 1,
-                        formatter:function(value, row , index){
-
-                            if(value == null || value ==""){
-                                value = "-";
-                            }
-                        <c:choose>
-                            <c:when test="${fns:hasPermission('cg:reservemanagementcenter:reserveManage:view')}">
-                            return "<a href='javascript:view(\""+row.id+"\")'>"+value+"</a>";
-                        </c:when>
-                            <c:otherwise>
-                            return value;
-                        </c:otherwise>
-                            </c:choose>
-                        }},
+                    { field: 'projectReserveId', title: "项目储备编号", valign:"middle", align:"center", colspan: 1 },
                     { field: 'projectName', title: "项目名称", valign:"middle", align:"center", colspan: 1,formatter:paramsMatter},
                     { field: 'constructionNecessityAndContent', title: "建设必要性及内容", valign:"middle", align:"center", colspan: 1,formatter:paramsMatter},
                     { field: 'substationName', title: "变电站名称", valign:"middle", align:"center", colspan: 1 },
@@ -123,6 +111,16 @@ $(document).ready(function () {
                     { field: 'reserveProgress', title: "储备进度", valign:"middle", align:"center", colspan: 1 },
                     { field: 'implementPlan', title: "是否纳入实施计划", valign:"middle", align:"center", colspan: 1 },
                     { field: 'implementBatch', title: "初定实施批次", valign:"middle", align:"center", colspan: 1 },
+                    { field: 'projectReleaseBatch', title: "项目下达批次", valign:"middle", align:"center", colspan: 1 },
+                    { field: 'ownerProjectManager', title: "业主项目经理", valign:"middle", align:"center", colspan: 1 },
+                    { field: 'siteManagementUnit', title: "现场施工管理单位", valign:"middle", align:"center", colspan: 1 },
+                    { field: 'electricalProjectManager', title: "施工项目经理(电气)", valign:"middle", align:"center", colspan: 1 },
+                    { field: 'civilEngineerProjectManager', title: "施工项目经理(土建)", valign:"middle", align:"center", colspan: 1 },
+                    { field: 'electricalSubcontractor', title: "电气分包单位", valign:"middle", align:"center", colspan: 1 },
+                    { field: 'electricalContact', title: "电气联系人、联系电话", valign:"middle", align:"center", colspan: 1 },
+                    { field: 'civilEngineerSubcontractor', title: "土建分包单位", valign:"middle", align:"center", colspan: 1 },
+                    { field: 'civilEngineerContact', title: "土建联系人、联系电话", valign:"middle", align:"center", colspan: 1 },
+                    { field: 'subcontractInfoRemark', title: "备注", valign:"middle", align:"center", colspan: 1 },
                     { field: 'pretrialEstimateAmount', title: "总概算金额(含税)", valign:"middle", align:"center", colspan: 1 },
                     { field: 'pretrialEstimateAmountExcludeTax', title: "审前总概算金额(不含税)", valign:"middle", align:"center", colspan: 1 },
                     { field: 'pretrialDeductibleAmount', title: "审前可抵扣金额(税金)", valign:"middle", align:"center", colspan: 1 },
@@ -145,6 +143,8 @@ $(document).ready(function () {
                     { field: 'afterTrialSupervisionFee', title: "审后监理费(含税)", valign:"middle", align:"center", colspan: 1 },
                     { field: 'budgetRevision', title: "是否完成概算修改", valign:"middle", align:"center", colspan: 1 },
                     { field: 'completeTime', title: "概算修改完成时间", valign:"middle", align:"center", colspan: 1 },
+                    { field: 'designChange', title: "是否有设计变更", valign:"middle", align:"center", colspan: 1 },
+                    { field: 'designChangeStatus', title: "设计变更状态", valign:"middle", align:"center", colspan: 1 },
 
 
                 ],

+ 278 - 0
src/main/webapp/webpage/modules/cg/statisticalTable/cable/cable.js

@@ -0,0 +1,278 @@
+<%@ page contentType="text/html;charset=UTF-8" %>
+<script >
+$(document).ready(function () {
+    $('#projectTable').bootstrapTable({
+        //请求方法
+        method: 'post',
+        //类型json
+        dataType: "json",
+        contentType: "application/x-www-form-urlencoded",
+        //显示检索按钮
+        showSearch: true,
+        //显示刷新按钮
+        showRefresh: true,
+        //显示切换手机试图按钮
+        showToggle: true,
+        //显示 内容列下拉框
+        showColumns: true,
+        //显示到处按钮
+        showExport: true,
+        //显示切换分页按钮
+        showPaginationSwitch: true,
+        //最低显示2行
+        minimumCountColumns: 2,
+        //是否显示行间隔色
+        striped: true,
+        //是否使用缓存,默认为true,所以一般情况下需要设置一下这个属性(*)
+        cache: false,
+        //是否显示分页(*)
+        pagination: true,
+        //排序方式
+        sortOrder: "asc",
+        //初始化加载第一页,默认第一页
+        pageNumber: 1,
+        //每页的记录行数(*)
+        pageSize: 5,
+        //可供选择的每页的行数(*)
+        pageList: [5, 10, 25, 50, 100],
+        //这个接口需要处理bootstrap table传递的固定参数,并返回特定格式的json数据
+        url: "${ctx}/cg/reservemanagementcenter/cable/list",
+        //默认值为 'limit',传给服务端的参数为:limit, offset, search, sort, order Else
+        //queryParamsType:'',
+        ////查询参数,每次调用是会带上这个参数,可自定义
+        queryParams: function (params) {
+            var searchParam = $("#searchForm").serializeJSON();
+            searchParam.pageNo = params.limit === undefined ? "1" : params.offset / params.limit + 1;
+            searchParam.pageSize = params.limit === undefined ? -1 : params.limit;
+            searchParam.orderBy = params.sort === undefined ? "" : params.sort + " " + params.order;
+            return searchParam;
+        },
+        //分页方式:client客户端分页,server服务端分页(*)
+        sidePagination: "server",
+        contextMenuTrigger: "right",//pc端 按右键弹出菜单
+        contextMenuTriggerMobile: "press",//手机端 弹出菜单,click:单击, press:长按。
+        contextMenu: '#context-menu',
+        onContextMenuItem: function (row, $el) {
+            if ($el.data("item") == "edit") {
+                edit(row.id);
+            } else if ($el.data("item") == "view") {
+                view(row.id);
+            } else if ($el.data("item") == "delete") {
+                jp.confirm('确认要删除该表单记录吗?', function () {
+                    jp.loading();
+                    jp.get("${ctx}/cg/reservemanagementcenter/project/delete?id=" + row.id, function (data) {
+                        if (data.success) {
+                            $('#projectTable').bootstrapTable('refresh');
+                            jp.success(data.msg);
+                        } else {
+                            jp.error(data.msg);
+                        }
+                    })
+                });
+            }
+        },
+
+        onClickRow: function (row, $el) {
+        },
+        onShowSearch: function () {
+            $("#search-collapse").slideToggle();
+        },
+        columns:
+            [
+                [
+                    {checkbox:true,width: 36},
+                    {"title":"储备项目基本信息","colspan":12,"halign":"center","align": "center",width: "2400px"},
+                ],
+                [
+                    {checkbox:true,width: 36},
+                    { field: 'projectReserveId', title: "储备编号", valign:"middle", align:"center", colspan: 1 },
+                    { field: 'projectName', title: "项目名称", valign:"middle", align:"center", colspan: 1 ,formatter:paramsMatter},
+                    { field: 'specifications', title: "电缆规格型号", valign:"middle", align:"center", colspan: 1 },
+                    { field: 'civilEngineer', title: "是否含土建", valign:"middle", align:"center", colspan: 1 },
+                    { field: 'pipeLayeCable', title: "是否在现有管道施放电缆", valign:"middle", align:"center", colspan: 1 },
+                    { field: 'completePipe', title: "是否完成通管", valign:"middle", align:"center", colspan: 1 },
+                    { field: 'completeMeasurement', title: "是否完成实测", valign:"middle", align:"center", colspan: 1 },
+                    { field: 'measureLength', title: "实测长度", valign:"middle", align:"center", colspan: 1 },
+                    { field: 'designCableLength', title: "设计电缆段长", valign:"middle", align:"center", colspan: 1 },
+                    { field: 'segmentLengthClassinication', title: "段长分类", valign:"middle", align:"center", colspan: 1 },
+                    { field: 'projectManager', title: "项目经理", valign:"middle", align:"center", colspan: 1 },
+                    { field: 'remarks', title: "备注", valign:"middle", align:"center", colspan: 1 ,formatter:paramsMatter},
+
+                ],
+
+            ]
+    });
+
+
+    if (navigator.userAgent.match(/(iPhone|iPod|Android|ios)/i)) {//如果是移动端
+        $('#projectTable').bootstrapTable("toggleView");
+    }
+
+    $('#projectTable').on('check.bs.table uncheck.bs.table load-success.bs.table ' +
+        'check-all.bs.table uncheck-all.bs.table', function () {
+        $('#remove').prop('disabled', !$('#projectTable').bootstrapTable('getSelections').length);
+        $('#view,#edit,#jlEdit').prop('disabled', $('#projectTable').bootstrapTable('getSelections').length != 1);
+    });
+
+    $("#btnImport").click(function () {
+        jp.open({
+            type: 2,
+            area: [500, 200],
+            auto: true,
+            title: "导入数据",
+            content: "${ctx}/tag/importExcel",
+            btn: ['确定', '关闭'],
+            btn1: function (index, layero) {
+                var iframeWin = layero.find('iframe')[0]; //得到iframe页的窗口对象,执行iframe页的方法:iframeWin.method();
+                iframeWin.contentWindow.importExcel('${ctx}/cg/reservemanagementcenter/cable/import', function (data) {
+                    if (data.success) {
+                        jp.success(data.msg);
+                        refresh();
+                    } else {
+                        jp.error(data.msg);
+                    }
+                    jp.close(index);
+                });//调用保存事件
+                return false;
+            },
+            btn2: function (index) {
+                //  jp.close(index);
+            }
+        });
+    });
+
+    $("#jlImport").click(function () {
+        jp.open({
+            type: 2,
+            area: [500, 200],
+            auto: true,
+            title: "导入数据",
+            content: "${ctx}/tag/importExcel",
+            btn: ['确定', '关闭'],
+            btn1: function (index, layero) {
+                var iframeWin = layero.find('iframe')[0]; //得到iframe页的窗口对象,执行iframe页的方法:iframeWin.method();
+                iframeWin.contentWindow.importExcel('${ctx}/cg/reservemanagementcenter/reserveManage/jlImport', function (data) {
+                    if (data.success) {
+                        jp.success(data.msg);
+                        refresh();
+                    } else {
+                        jp.error(data.msg);
+                    }
+                    jp.close(index);
+                });//调用保存事件
+                return false;
+            },
+
+            btn2: function (index) {
+                //  jp.close(index);
+            }
+        });
+    });
+
+    $("#btnExport").click(function () {
+        var projectReserveId = $("#projectReserveId").val();
+        var projectName = $("#projectName").val();
+        console.log(projectReserveId)
+        jp.downloadFile('${ctx}/cg/reservemanagementcenter/cable/export?projectReserveId=' + projectReserveId + '&projectName=' + projectName);
+    });
+
+    $("#search").click("click", function () {// 绑定查询按扭
+        $('#projectTable').bootstrapTable('refresh');
+    });
+
+    $("#reset").click("click", function () {// 绑定查询按扭
+        $("#searchForm  input").val("");
+        $("#searchForm  select").val("");
+        $("#searchForm  .select-item").html("");
+        $('#projectTable').bootstrapTable('refresh');
+    });
+
+    $('#beginBeginDate').datetimepicker({
+        format: "YYYY-MM-DD HH:mm:ss"
+    });
+    $('#endBeginDate').datetimepicker({
+        format: "YYYY-MM-DD HH:mm:ss"
+    });
+    $('#endDate').datetimepicker({
+        format: "YYYY-MM-DD HH:mm:ss"
+    });
+});
+
+//表格超出宽度鼠标悬停显示td内容
+function paramsMatter(value,row,index,field) {
+    var span = document.createElement('span');
+    span.setAttribute('title',value);
+    span.innerHTML = value;
+    return span.outerHTML;
+}
+
+function getIdSelections() {
+    return $.map($("#projectTable").bootstrapTable('getSelections'), function (row) {
+        return row.id
+    });
+}
+
+
+//刷新列表
+function refresh() {
+    $('#projectTable').bootstrapTable('refresh');
+}
+
+function add() {
+    jp.openSaveDialog('新增储备项目基本信息', "${ctx}/cg/reservemanagementcenter/reserveManage/form", '800px', '500px');
+}
+
+
+function edit(id) {//没有权限时,不显示确定按钮
+    if (id == undefined) {
+        id = getIdSelections();
+    }
+    jp.openSaveDialog('编辑储备项目基本信息', "${ctx}/cg/reservemanagementcenter/reserveManage/form?id=" + id, '800px', '500px');
+}
+
+function jlEdit(id) {//没有权限时,不显示确定按钮
+    if (id == undefined) {
+        id = getIdSelections();
+    }
+    jp.openSaveDialog('编辑储备项目基本信息', "${ctx}/cg/reservemanagementcenter/reserveManage/jlEdit?id=" + id, '800px', '500px');
+}
+
+function view(id) {//没有权限时,不显示确定按钮
+    if (id == undefined) {
+        id = getIdSelections();
+    }
+    jp.openViewDialog('查看储备项目基本信息', "${ctx}/cg/reservemanagementcenter/reserveManage/view?id=" + id, '800px', '500px');
+}
+
+function deleteAll(){
+
+    jp.confirm('确认要删除该储备项目基本信息吗?', function(){
+        jp.loading();
+        jp.get("${ctx}/cg/reservemanagementcenter/cable/deleteAll?ids=" + getIdSelections(), function(data){
+            if(data.success){
+                $('#projectTable').bootstrapTable('refresh');
+                jp.success(data.msg);
+            }else{
+                jp.error(data.msg);
+            }
+        })
+
+    })
+}
+//转换日期格式(时间戳转换为datetime格式)
+function changeDateFormat(cellval) {
+    var dateVal = cellval + "";
+    if (cellval != null) {
+        var date = new Date(parseInt(dateVal.replace("/Date(", "").replace(")/", ""), 10));
+        var month = date.getMonth() + 1 < 10 ? "0" + (date.getMonth() + 1) : date.getMonth() + 1;
+        var currentDate = date.getDate() < 10 ? "0" + date.getDate() : date.getDate();
+
+        /*var hours = date.getHours() < 10 ? "0" + date.getHours() : date.getHours();
+        var minutes = date.getMinutes() < 10 ? "0" + date.getMinutes() : date.getMinutes();
+        var seconds = date.getSeconds() < 10 ? "0" + date.getSeconds() : date.getSeconds();*/
+
+        return date.getFullYear() + "-" + month + "-" + currentDate /*+ " " + hours + ":" + minutes + ":" + seconds*/;
+    }
+}
+
+</script>

+ 112 - 0
src/main/webapp/webpage/modules/cg/statisticalTable/cable/cable.jsp

@@ -0,0 +1,112 @@
+<%@ page contentType="text/html;charset=UTF-8" %>
+<%@ include file="/webpage/include/taglib.jsp"%>
+<html>
+<head>
+	<title>项目储备信息</title>
+	<meta http-equiv="Content-type" content="text/html; charset=utf-8">
+	<meta name="decorator" content="ani"/>
+	<%@ include file="/webpage/include/bootstraptable.jsp"%>
+	<%@include file="/webpage/include/treeview.jsp" %>
+	<%@include file="cable.js" %>
+	<style type="text/css">
+		.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;
+			white-space: nowrap;
+			overflow: hidden;
+			text-overflow: ellipsis;
+			word-wrap:break-word;
+		}
+		.bootstrap-table .table thead>tr>th {
+			padding: 0;
+			margin: 0;
+			width: 3000px;
+		}
+	</style>
+</head>
+<body>
+	<div class="wrapper wrapper-content">
+	<div class="panel panel-primary">
+	<div class="panel-heading">
+		<h3 class="panel-title">项目储备信息</h3>
+	</div>
+	<div class="panel-body">
+		<!-- 搜索 -->
+		<div id="search-collapse" class="collapse">
+			<div class="accordion-inner">
+				<form:form id="searchForm" modelAttribute="cable" class="form form-horizontal well clearfix">
+					<div class="col-xs-12 col-sm-6 col-md-4">
+						<label class="label-item single-overflow pull-left" title="储备编码:">储备编码:</label>
+						<form:input path="projectReserveId" htmlEscape="false" maxlength="100"  class=" form-control"/>
+					</div>
+					<div class="col-xs-12 col-sm-6 col-md-4">
+						<label class="label-item single-overflow pull-left" title="项目名称:">项目名称:</label>
+						<form:input path="projectName" htmlEscape="false" maxlength="100"  class=" form-control"/>
+					</div>
+					<div class="col-xs-12 col-sm-6 col-md-4">
+						<div style="margin-top:26px">
+							<a  id="search" class="btn btn-primary btn-rounded  btn-bordered btn-sm"><i class="fa fa-search"></i> 查询</a>
+							<a  id="reset" class="btn btn-primary btn-rounded  btn-bordered btn-sm" ><i class="fa fa-refresh"></i> 重置</a>
+						</div>
+					</div>
+				</form:form>
+			</div>
+		</div>
+
+	<!-- 工具栏 -->
+	<div id="toolbar">
+			<%--<shiro:hasPermission name="cg:reservemanagementcenter:reserveManage:add">
+				<button id="add" class="btn btn-primary" onclick="add()">
+					<i class="glyphicon glyphicon-plus"></i> 新增
+				</button>
+			</shiro:hasPermission>
+			<shiro:hasPermission name="cg:reservemanagementcenter:reserveManage:edit">
+				<button id="edit" class="btn btn-primary" onclick="edit()">
+					<i class="glyphicon glyphicon-edit"></i> 修改 <!--专职修改-->
+				</button>
+			</shiro:hasPermission>
+			<shiro:hasPermission name="sg:managementcenter:reserveManagement:jlEdit">
+				<button id="jlEdit" class="btn btn-primary" onclick="jlEdit()">
+					<i class="glyphicon glyphicon-edit"></i> 修改 <!--经理修改-->
+				</button>
+			</shiro:hasPermission>
+			<shiro:hasPermission name="cg:reservemanagementcenter:reserveManage:del">
+				<button id="remove" class="btn btn-danger" onclick="deleteAll()">
+					<i class="glyphicon glyphicon-remove"></i> 删除
+				</button>
+			</shiro:hasPermission>--%>
+			<shiro:hasPermission name="cg:reservemanagementcenter:cable:del">
+				<button id="remove" class="btn btn-danger" onclick="deleteAll()">
+					<i class="glyphicon glyphicon-remove"></i> 删除
+				</button>
+			</shiro:hasPermission>
+			<shiro:hasPermission name="cg:reservemanagementcenter:cable:import">
+				<button id="btnImport" class="btn btn-info">
+					<i class="fa fa-folder-open-o"></i> 导入
+				</button>
+			</shiro:hasPermission>
+			<%--<shiro:hasPermission name="sg:managementcenter:reserveManagement:jlImport">
+				<button id="jlImport" class="btn btn-info">
+					<i class="fa fa-folder-open-o"></i> 导入  <!--经理导入-->
+				</button>
+			</shiro:hasPermission>--%>
+			<shiro:hasPermission name="cg:reservemanagementcenter:cable:export">
+				<button id="btnExport" class="btn btn-warning">
+					<i class="fa fa-file-excel-o"></i> 导出
+				</button>
+			</shiro:hasPermission>
+	</div>
+	<!-- 表格 -->
+	<table id="projectTable" style="table-layout:fixed" class="table" data-toolbar="#toolbar"></table>
+
+	</div>
+	</div>
+	</div>
+</body>
+</html>

+ 3 - 2
src/main/webapp/webpage/modules/cg/statisticalTable/constructeScale/constructeScale.js

@@ -81,7 +81,7 @@ $(document).ready(function () {
             [
                 [
                     {checkbox:true,width: 36},
-                    {"title":"国网江苏省电力有限公司2022年第二批配电网工程项目明细表","colspan":40,"halign":"center","align": "center"},
+                    {"title":"国网江苏省电力有限公司2022年第二批配电网工程项目明细表","colspan":41,"halign":"center","align": "center"},
                 ],
                 [
                     {checkbox:true,width: 36},
@@ -99,7 +99,8 @@ $(document).ready(function () {
                     { field: 'costEstimate', title: "费用估算", valign:"middle", align:"center", colspan: 1, rowspan: 2 },
                     { field: 'peakSummerProject', title: "是否迎峰度夏项目", valign:"middle", align:"center", colspan: 1, rowspan: 2 },
                     { field: 'projectReview', title: "通过第几批项目评审", valign:"middle", align:"center", colspan: 1, rowspan: 2 },
-                    { field: 'afterTrialEstimateAmount', title: "概算", valign:"middle", align:"center", colspan: 1, rowspan: 2 }
+                    { field: 'afterTrialEstimateAmount', title: "概算(含税)", valign:"middle", align:"center", colspan: 1, rowspan: 2 },
+                    { field: 'afterTrialEstimateAmountExcludeTax', title: "概算(不含税)", valign:"middle", align:"center", colspan: 1, rowspan: 2 }
                 ],
 
                 [

+ 16 - 45
src/main/webapp/webpage/modules/cg/statisticalTable/demoliteList/demoliteList.js

@@ -79,51 +79,22 @@ $(document).ready(function () {
         },
         columns:
             [
-                {
-                    checkbox: true,
-                    width:36,
-
-                },
-                {
-                    field: 'projectName',
-                    width: 80,
-                    title: '项目名称',
-                    formatter:paramsMatter
-                }
-                , {
-                    field: 'projectReserveId',
-                    width:90,
-                    title: '项目储备编号',
-
-                },{
-                    field: 'materialName',
-                    width:80,
-                    title: '物料名称',
-                    formatter:paramsMatter
-
-                },{
-                    field: 'specification',
-                    width:80,
-                    title: '规格型号',
-                    formatter:paramsMatter
-
-                },{
-                    field: 'unit',
-                    width:80,
-                    title: '单位',
-
-                },{
-                    field: 'count',
-                    width:80,
-                    title: '数量',
-
-                },{
-                    field: 'remark',
-                    width:80,
-                    title: '备注',
-                    formatter:paramsMatter
-
-                },
+                [
+                    {checkbox:true,width: 36},
+                    {"title":"储备项目拆旧物资汇总表","colspan":9,"halign":"center","align": "center",width: "1800px"}
+                ],
+                [
+                    {checkbox:true,width: 36},
+                    { field: 'projectYear', title: '项目年份', valign:"middle", align:"center" },
+                    { field: 'projectName', title: '储备项目名称', valign:"middle", align:"center" ,formatter:paramsMatter},
+                    { field: 'projectReserveId', title: '储备项目编码', valign:"middle", align:"center" },
+                    { field: 'projectNumber', title: '项目定义号', valign:"middle", align:"center" },
+                    { field: 'materialName', title: '物料名称', valign:"middle", align:"center" },
+                    { field: 'specification', title: '规格型号', valign:"middle", align:"center" },
+                    { field: 'unit', title: '单位', valign:"middle", align:"center" },
+                    { field: 'count', title: '数量', valign:"middle", align:"center" },
+                    { field: 'remark', title: '备注', valign:"middle", align:"center" ,formatter:paramsMatter}
+                ]
         ]
     });
 

+ 170 - 18
src/main/webapp/webpage/modules/cg/statisticalTable/normative/normative.js

@@ -83,7 +83,7 @@ $(document).ready(function () {
                     {checkbox:true,width: 36},
                     {"title":"储备项目基本信息","colspan":18,"halign":"center","align": "center",width: "3600px"},
                     {"title":"实施计划","colspan":3,"halign":"center","align": "center",width: "600px"},
-                    {"title":"完整性校验","colspan":9,"halign":"center","align": "center",width: "1800px"},
+                    {"title":"完整性校验","colspan":9,"halign":"center","align": "center",width: "2700px"},
                     {"title":"甲供材情况核对","colspan":2,"halign":"center","align": "center",width: "400px"},
                     {"title":"概算核对","colspan":9,"halign":"center","align": "center",width: "1800px"},
                     {"title":"概预算调整","colspan":2,"halign":"center","align": "center",width: "400px"},
@@ -112,15 +112,150 @@ $(document).ready(function () {
                     { field: 'reserveProgress', title: '储备进度', valign:"middle", align:"center" },
                     { field: 'implementPlan', title: '是否纳入实施计划', valign:"middle", align:"center" },
                     { field: 'implementBatch', title: '初定实施批次', valign:"middle", align:"center" },
-                    { field: 'blueprint', title: '图纸', valign:"middle", align:"center" },
-                    { field: 'budgetBook', title: '预算书', valign:"middle", align:"center" },
-                    { field: 'designManual', title: '设计说明书', valign:"middle", align:"center" },
-                    { field: 'materialList', title: '提资材料清册', valign:"middle", align:"center" },
-                    { field: 'feasibilityReport', title: '可研报告', valign:"middle", align:"center" },
-                    { field: 'projectProposal', title: '项目建议书', valign:"middle", align:"center" },
-                    { field: 'oldInventoryDemolition', title: '拆旧清册', valign:"middle", align:"center" },
-                    { field: 'noStopWorkPlan', title: '不停电作业方案', valign:"middle", align:"center" },
-                    { field: 'castPlaceApprovalForm', title: '土建现浇审批单', valign:"middle", align:"center" },
+                    { field: 'blueprint', title: '图纸', valign:"middle", align:"center",
+                        formatter:function(value, row , index){
+                            if (value){
+                                var valueArray = value.split("|");
+                                var labelArray = [];
+                                for(var i =0 ; i<valueArray.length; i++){
+                                    if(!/\.(gif|jpg|jpeg|png|GIF|JPG|PNG)$/.test(valueArray[i]))
+                                    {
+                                        labelArray[i] = "<a href=\""+valueArray[i]+"\">"+decodeURIComponent(valueArray[i].substring(valueArray[i].lastIndexOf("/")+1))+"</a>" + "</br>"
+                                        // labelArray[i] = "<a href='javascript:fileUpLoad(\""+value+"\")'>"+decodeURIComponent(valueArray[i].substring(valueArray[i].lastIndexOf("/")+1))+"</a>" + "</br>"
+                                    }
+                                }
+                                return labelArray.join(" ");
+                            }
+                        }
+                    },
+                    { field: 'budgetBook', title: '预算书', valign:"middle", align:"center",
+                        formatter:function(value, row , index){
+                            if (value){
+                                var valueArray = value.split("|");
+                                var labelArray = [];
+                                for(var i =0 ; i<valueArray.length; i++){
+                                    if(!/\.(gif|jpg|jpeg|png|GIF|JPG|PNG)$/.test(valueArray[i]))
+                                    {
+                                        labelArray[i] = "<a href=\""+valueArray[i]+"\">"+decodeURIComponent(valueArray[i].substring(valueArray[i].lastIndexOf("/")+1))+"</a>" + "</br>"
+                                        // labelArray[i] = "<a href='javascript:fileUpLoad(\""+value+"\")'>"+decodeURIComponent(valueArray[i].substring(valueArray[i].lastIndexOf("/")+1))+"</a>" + "</br>"
+                                    }
+                                }
+                                return labelArray.join(" ");
+                            }
+                        }
+                    },
+                    { field: 'designManual', title: '设计说明书', valign:"middle", align:"center",
+                        formatter:function(value, row , index){
+                            if (value){
+                                var valueArray = value.split("|");
+                                var labelArray = [];
+                                for(var i =0 ; i<valueArray.length; i++){
+                                    if(!/\.(gif|jpg|jpeg|png|GIF|JPG|PNG)$/.test(valueArray[i]))
+                                    {
+                                        labelArray[i] = "<a href=\""+valueArray[i]+"\">"+decodeURIComponent(valueArray[i].substring(valueArray[i].lastIndexOf("/")+1))+"</a>" + "</br>"
+                                        // labelArray[i] = "<a href='javascript:fileUpLoad(\""+value+"\")'>"+decodeURIComponent(valueArray[i].substring(valueArray[i].lastIndexOf("/")+1))+"</a>" + "</br>"
+                                    }
+                                }
+                                return labelArray.join(" ");
+                            }
+                        }
+                    },
+                    { field: 'materialList', title: '提资材料清册', valign:"middle", align:"center",
+                        formatter:function(value, row , index){
+                            if (value){
+                                var valueArray = value.split("|");
+                                var labelArray = [];
+                                for(var i =0 ; i<valueArray.length; i++){
+                                    if(!/\.(gif|jpg|jpeg|png|GIF|JPG|PNG)$/.test(valueArray[i]))
+                                    {
+                                        labelArray[i] = "<a href=\""+valueArray[i]+"\">"+decodeURIComponent(valueArray[i].substring(valueArray[i].lastIndexOf("/")+1))+"</a>" + "</br>"
+                                        // labelArray[i] = "<a href='javascript:fileUpLoad(\""+value+"\")'>"+decodeURIComponent(valueArray[i].substring(valueArray[i].lastIndexOf("/")+1))+"</a>" + "</br>"
+                                    }
+                                }
+                                return labelArray.join(" ");
+                            }
+                        }
+                    },
+                    { field: 'feasibilityReport', title: '可研报告', valign:"middle", align:"center",
+                        formatter:function(value, row , index){
+                            if (value){
+                                var valueArray = value.split("|");
+                                var labelArray = [];
+                                for(var i =0 ; i<valueArray.length; i++){
+                                    if(!/\.(gif|jpg|jpeg|png|GIF|JPG|PNG)$/.test(valueArray[i]))
+                                    {
+                                        labelArray[i] = "<a href=\""+valueArray[i]+"\">"+decodeURIComponent(valueArray[i].substring(valueArray[i].lastIndexOf("/")+1))+"</a>" + "</br>"
+                                        // labelArray[i] = "<a href='javascript:fileUpLoad(\""+value+"\")'>"+decodeURIComponent(valueArray[i].substring(valueArray[i].lastIndexOf("/")+1))+"</a>" + "</br>"
+                                    }
+                                }
+                                return labelArray.join(" ");
+                            }
+                        }
+                    },
+                    { field: 'projectProposal', title: '项目建议书', valign:"middle", align:"center",
+                        formatter:function(value, row , index){
+                            if (value){
+                                var valueArray = value.split("|");
+                                var labelArray = [];
+                                for(var i =0 ; i<valueArray.length; i++){
+                                    if(!/\.(gif|jpg|jpeg|png|GIF|JPG|PNG)$/.test(valueArray[i]))
+                                    {
+                                        labelArray[i] = "<a href=\""+valueArray[i]+"\">"+decodeURIComponent(valueArray[i].substring(valueArray[i].lastIndexOf("/")+1))+"</a>" + "</br>"
+                                        // labelArray[i] = "<a href='javascript:fileUpLoad(\""+value+"\")'>"+decodeURIComponent(valueArray[i].substring(valueArray[i].lastIndexOf("/")+1))+"</a>" + "</br>"
+                                    }
+                                }
+                                return labelArray.join(" ");
+                            }
+                        }
+                    },
+                    { field: 'oldInventoryDemolition', title: '拆旧清册', valign:"middle", align:"center",
+                        formatter:function(value, row , index){
+                            if (value){
+                                var valueArray = value.split("|");
+                                var labelArray = [];
+                                for(var i =0 ; i<valueArray.length; i++){
+                                    if(!/\.(gif|jpg|jpeg|png|GIF|JPG|PNG)$/.test(valueArray[i]))
+                                    {
+                                        labelArray[i] = "<a href=\""+valueArray[i]+"\">"+decodeURIComponent(valueArray[i].substring(valueArray[i].lastIndexOf("/")+1))+"</a>" + "</br>"
+                                        // labelArray[i] = "<a href='javascript:fileUpLoad(\""+value+"\")'>"+decodeURIComponent(valueArray[i].substring(valueArray[i].lastIndexOf("/")+1))+"</a>" + "</br>"
+                                    }
+                                }
+                                return labelArray.join(" ");
+                            }
+                        }
+                    },
+                    { field: 'noStopWorkPlan', title: '不停电作业方案', valign:"middle", align:"center",
+                        formatter:function(value, row , index){
+                            if (value){
+                                var valueArray = value.split("|");
+                                var labelArray = [];
+                                for(var i =0 ; i<valueArray.length; i++){
+                                    if(!/\.(gif|jpg|jpeg|png|GIF|JPG|PNG)$/.test(valueArray[i]))
+                                    {
+                                        labelArray[i] = "<a href=\""+valueArray[i]+"\">"+decodeURIComponent(valueArray[i].substring(valueArray[i].lastIndexOf("/")+1))+"</a>" + "</br>"
+                                        // labelArray[i] = "<a href='javascript:fileUpLoad(\""+value+"\")'>"+decodeURIComponent(valueArray[i].substring(valueArray[i].lastIndexOf("/")+1))+"</a>" + "</br>"
+                                    }
+                                }
+                                return labelArray.join(" ");
+                            }
+                        }
+                    },
+                    { field: 'castPlaceApprovalForm', title: '土建现浇审批单', valign:"middle", align:"center",
+                        formatter:function(value, row , index){
+                            if (value){
+                                var valueArray = value.split("|");
+                                var labelArray = [];
+                                for(var i =0 ; i<valueArray.length; i++){
+                                    if(!/\.(gif|jpg|jpeg|png|GIF|JPG|PNG)$/.test(valueArray[i]))
+                                    {
+                                        labelArray[i] = "<a href=\""+valueArray[i]+"\">"+decodeURIComponent(valueArray[i].substring(valueArray[i].lastIndexOf("/")+1))+"</a>" + "</br>"
+                                        // labelArray[i] = "<a href='javascript:fileUpLoad(\""+value+"\")'>"+decodeURIComponent(valueArray[i].substring(valueArray[i].lastIndexOf("/")+1))+"</a>" + "</br>"
+                                    }
+                                }
+                                return labelArray.join(" ");
+                            }
+                        }
+                    },
                     { field: 'reviewMaterial', title: '甲供材优选审核', valign:"middle", align:"center" },
                     { field: 'aSupplyTob', title: '甲供转乙供情况', valign:"middle", align:"center" },
                     { field: 'templateCorrect', title: '预算模板是否正确', valign:"middle", align:"center" },
@@ -234,6 +369,31 @@ $(document).ready(function () {
     });
 });
 
+function edit(id) {//没有权限时,不显示确定按钮
+    if (id == undefined) {
+        id = getIdSelections();
+    }
+    jp.openSaveDialog('编辑流程上传文件信息', "${ctx}/cg/reservemanagementcenter/normative/form?id=" + id, '800px', '500px');
+}
+
+function fileUpLoad() {
+    jp.open({
+        type: 2,
+        area: ['800px', '300px'],
+        title:"上传文件",
+        auto:true,
+        content: "${ctx}/tag/fileUpload?fileValues="+encodeURI(encodeURI($("input[name='${path}']").val()))+"&uploadPath=${uploadPath}"+"&type=${type}"+"&readonly=${readonly}"
+            +"&fileNumLimit=${fileNumLimit}"+"&fileSizeLimit=${fileSizeLimit}"+"&allowedExtensions=${allowedExtensions}"+"&deniedExtensions=${deniedExtensions}",
+        cancel: function(index, layero){
+            var iframeWin = layero.find('iframe')[0]; //得到iframe页的窗口对象,执行iframe页的方法:iframeWin.method();
+            var fileNames =iframeWin.contentWindow.getUploadFileNames();//调用保存事件
+            var fileValues =iframeWin.contentWindow.getUploadFileValues();//调用保存事件
+            $("#${path}").val(fileNames);
+            $("input[name='${path}']").val(fileValues);
+        }
+    });
+}
+
 //表格超出宽度鼠标悬停显示td内容
 function paramsMatter(value,row,index,field) {
     var span = document.createElement('span');
@@ -258,14 +418,6 @@ function add() {
     jp.openSaveDialog('新增储备项目基本信息', "${ctx}/cg/reservemanagementcenter/reserveManage/form", '800px', '500px');
 }
 
-
-function edit(id) {//没有权限时,不显示确定按钮
-    if (id == undefined) {
-        id = getIdSelections();
-    }
-    jp.openSaveDialog('编辑储备项目基本信息', "${ctx}/cg/reservemanagementcenter/reserveManage/form?id=" + id, '800px', '500px');
-}
-
 function jlEdit(id) {//没有权限时,不显示确定按钮
     if (id == undefined) {
         id = getIdSelections();

+ 6 - 1
src/main/webapp/webpage/modules/cg/statisticalTable/normative/normative.jsp

@@ -26,7 +26,7 @@
 		.bootstrap-table .table thead>tr>th {
 			padding: 0;
 			margin: 0;
-			width: 7000px;
+			/*width: 7000px;*/
 		}
 	</style>
 </head>
@@ -72,6 +72,11 @@
 					<i class="fa fa-folder-open-o"></i> 导入
 				</button>
 			</shiro:hasPermission>--%>
+				<shiro:hasPermission name="cg:reservemanagementcenter:normative:edit">
+					<button id="edit" class="btn btn-primary" onclick="edit()">
+						<i class="glyphicon glyphicon-edit"></i> 修改 <!--专职修改-->
+					</button>
+				</shiro:hasPermission>
 
 			<shiro:hasPermission name="cg:reservemanagementcenter:normative:export">
 				<button id="btnExport" class="btn btn-warning">

+ 191 - 0
src/main/webapp/webpage/modules/cg/statisticalTable/normative/normativeEdit.jsp

@@ -0,0 +1,191 @@
+<%@ page contentType="text/html;charset=UTF-8" %>
+<%@ include file="/webpage/include/taglib.jsp"%>
+<html>
+<head>
+	<title>编辑流程上传文件信息</title>
+	<meta name="decorator" content="ani"/>
+	<%@ include file="/webpage/include/bootstraptable.jsp"%>
+	<%@ include file="/webpage/include/treeview.jsp" %>
+	<script type="text/javascript">
+		$(document).ready(function() {
+
+			$('#beginDate').datetimepicker({
+				format: "YYYY-MM-DD HH:mm:ss"
+			});
+			$('#endDate').datetimepicker({
+				format: "YYYY-MM-DD HH:mm:ss"
+			});
+		});
+		function save() {
+
+			var isValidate = jp.validateForm('#inputForm');//校验表单
+			if(!isValidate){
+				return false;
+			}else{
+				jp.loading();
+				jp.post("${ctx}/cg/reservemanagementcenter/normative/update",$('#inputForm').serialize(),function(data){
+					if(data.success){
+						jp.getParent().refresh();
+						var dialogIndex = parent.layer.getFrameIndex(window.name); // 获取窗口索引
+						parent.layer.close(dialogIndex);
+						jp.success(data.msg)
+					}else{
+						jp.error(data.msg);
+					}
+				})
+			}
+
+		}
+	</script>
+</head>
+<body class="bg-white">
+<div class="panel-body">
+	<form:form id="inputForm" modelAttribute="normativeAudit" class="form-horizontal">
+		<form:hidden path="id"/>
+		<table class="table table-bordered">
+			<tbody>
+			<tr>
+				<td colspan="4" class="width-15 active"><label class="">储备项目基本信息:</label></td>
+			</tr>
+			<tr>
+				<td class="width-15 active"><label class="">项目年份:</label></td>
+				<td class="width-35">
+					<form:input path="projectYear" htmlEscape="false" readonly="true"  class="form-control"/>
+				</td>
+				<td class="width-15 active"><label class="">项目性质:</label></td>
+				<td class="width-35">
+					<form:input path="projectNature" htmlEscape="false"    readonly="true"  class="form-control"/>
+				</td>
+			</tr>
+			<tr>
+				<td class="width-15 active"><label class="">需求单位:</label></td>
+				<td class="width-35">
+					<form:input path="demandUnit" htmlEscape="false"    readonly="true"  class="form-control"/>
+				</td>
+				<td class="width-15 active"><label class="">区域:</label></td>
+				<td class="width-35">
+					<form:input path="district" htmlEscape="false"    readonly="true"  class="form-control"/>
+				</td>
+			</tr>
+			<tr>
+				<td class="width-15 active"><label class="">项目分组:</label></td>
+				<td class="width-35">
+					<form:input path="projectGroup" htmlEscape="false"    readonly="true"  class="form-control"/>
+				</td>
+				<td class="width-15 active"><label class="">储备批次:</label></td>
+				<td class="width-35">
+					<form:input path="reserveBatches" htmlEscape="false"    readonly="true"  class="form-control"/>
+				</td>
+			</tr>
+			<tr>
+				<td class="width-15 active"><label class="">供电区域:</label></td>
+				<td class="width-35">
+					<form:input path="blockSupply" htmlEscape="false"    readonly="true"  class="form-control"/>
+				</td>
+				<td class="width-15 active"><label class="">网格编号:</label></td>
+				<td class="width-35">
+					<form:input path="gridNumber" htmlEscape="false"    readonly="true"  class="form-control"/>
+				</td>
+			</tr>
+			<tr>
+				<td class="width-15 active"><label class="">单元格编号:</label></td>
+				<td class="width-35">
+					<form:input path="cellNumber" htmlEscape="false"    readonly="true"  class="form-control"/>
+				</td>
+				<td class="width-15 active"><label class="">项目储备编号:</label></td>
+				<td class="width-35">
+					<form:input path="projectReserveId" htmlEscape="false"  readonly="true"  class="form-control"/>
+				</td>
+			</tr>
+			<tr>
+				<td class="width-15 active"><label class="">项目名称:</label></td>
+				<td class="width-35">
+					<form:input path="projectName" htmlEscape="false"  readonly="true"  class="form-control"/>
+				</td>
+				<td class="width-15 active"><label class="">建设必要性及内容:</label></td>
+				<td class="width-35">
+					<form:input path="constructionNecessityAndContent" htmlEscape="false"    readonly="true"  class="form-control"/>
+				</td>
+			</tr>
+			<tr>
+				<td class="width-15 active"><label class="">变电站名称:</label></td>
+				<td class="width-35">
+					<form:input path="substationName" htmlEscape="false"    readonly="true"  class="form-control"/>
+				</td>
+				<td class="width-15 active"><label class="">线路名称:</label></td>
+				<td class="width-35">
+					<form:input path="circuitName" htmlEscape="false"    readonly="true"  class="form-control"/>
+				</td>
+			</tr>
+			<tr>
+				<td class="width-15 active"><label class="">网架项目划分:</label></td>
+				<td class="width-35">
+					<form:input path="netRackProjectDivide" htmlEscape="false" readonly="true"    class="form-control"/>
+				</td>
+				<td class="width-15 active"><label class="">需求类型:</label></td>
+				<td class="width-35">
+					<form:input path="requirementType" htmlEscape="false" readonly="true"    class="form-control"/>
+				</td>
+			</tr>
+			<tr>
+				<td class="width-15 active"><label class="">费用估算:</label></td>
+				<td class="width-35">
+					<form:input path="costEstimate" htmlEscape="false" readonly="true"    class="form-control number money"/>
+				</td>
+				<td class="width-15 active"><label class="">备注:</label></td>
+				<td class="width-35">
+					<form:input path="basicRemarks" htmlEscape="false" readonly="true"    class="form-control number money"/>
+				</td>
+			</tr>
+
+			<tr>
+				<td colspan="4" class="width-15 active"><label class="">流程上传文件信息:</label></td>
+			</tr>
+			<tr>
+				<td class="width-15 active"><label class="">图纸:</label></td>
+				<td class="width-35">
+					<sys:fileUpload path="blueprint"  value="${normativeAudit.blueprint}" type="*" uploadPath="/personnelTurnover" />
+				</td>
+				<td class="width-15 active"><label class="">预算书:</label></td>
+				<td class="width-35">
+					<sys:fileUpload path="budgetBook"  value="${normativeAudit.budgetBook}" type="*" uploadPath="/personnelTurnover" readonly="false"/>
+				</td>
+
+			</tr>
+			<tr>
+				<td class="width-15 active"><label class="">设计说明书:</label></td>
+				<td class="width-35">
+					<sys:fileUpload path="designManual"  value="${normativeAudit.designManual}" type="*" uploadPath="/personnelTurnover" />
+				</td>
+				<td class="width-15 active"><label class="">提资材料清册:</label></td>
+				<td class="width-35">
+					<sys:fileUpload path="materialList"  value="${normativeAudit.materialList}" type="*" uploadPath="/personnelTurnover" />
+				</td>
+			</tr>
+			<tr>
+				<td class="width-15 active"><label class="">项目建议书:</label></td>
+				<td class="width-35">
+					<sys:fileUpload path="projectProposal"  value="${normativeAudit.projectProposal}" type="*" uploadPath="/personnelTurnover" />
+				</td>
+				<td class="width-15 active"><label class="">拆旧清册:</label></td>
+				<td class="width-35">
+					<sys:fileUpload path="oldInventoryDemolition"  value="${normativeAudit.oldInventoryDemolition}" type="*" uploadPath="/personnelTurnover" />
+				</td>
+			</tr>
+
+			<tr>
+				<td class="width-15 active"><label class="">不停电作业方案/停电作业申报表:</label></td>
+				<td class="width-35">
+					<sys:fileUpload path="noStopWorkPlan"  value="${normativeAudit.noStopWorkPlan}" type="*" uploadPath="/personnelTurnover" />
+				</td>
+				<td class="width-15 active"><label class="">土建现浇审批单:</label></td>
+				<td class="width-35">
+					<sys:fileUpload path="castPlaceApprovalForm"  value="${normativeAudit.castPlaceApprovalForm}" type="*" uploadPath="/personnelTurnover" />
+				</td>
+			</tr>
+			</tbody>
+		</table>
+	</form:form>
+</div>
+</body>
+</html>

+ 19 - 13
src/main/webapp/webpage/modules/cg/statisticalTable/progressStats/progressStats.js

@@ -81,7 +81,7 @@ $(document).ready(function () {
             [
                 [
                     {checkbox:true,width: 36},
-                    {"title":"储备项目设计全流程跟踪","colspan":47,"halign":"center","align": "center"}
+                    {"title":"储备项目设计全流程跟踪","colspan":53,"halign":"center","align": "center",width: "10600px"}
                 ],
                 [
                     {checkbox:true,width: 36},
@@ -91,10 +91,10 @@ $(document).ready(function () {
                     { title: "设计委托", valign:"middle", align:"center", colspan: 3, rowspan: 1 },
                     { title: "储备交底", valign:"middle", align:"center", colspan: 3, rowspan: 1 },
                     { title: "图纸初设", valign:"middle", align:"center", colspan: 2, rowspan: 1 },
-                    { title: "项目经理审图", valign:"middle", align:"center", colspan: 5, rowspan: 1 },
-                    { title: "概预算审核", valign:"middle", align:"center", colspan: 5, rowspan: 1 },
-                    { title: "省公司评审", valign:"middle", align:"center", colspan: 5, rowspan: 1 },
-                    { title: "图纸联合审查", valign:"middle", align:"center", colspan: 6, rowspan: 1 },
+                    { title: "项目经理审图", valign:"middle", align:"center", colspan: 7, rowspan: 1 },
+                    { title: "概预算审核", valign:"middle", align:"center", colspan: 7, rowspan: 1 },
+                    { title: "省公司评审", valign:"middle", align:"center", colspan: 6, rowspan: 1 },
+                    { title: "图纸联合审查", valign:"middle", align:"center", colspan: 7, rowspan: 1 },
                     { title: "图纸定稿", valign:"middle", align:"center", colspan: 6, rowspan: 1 },
                 ],
                 [
@@ -119,27 +119,33 @@ $(document).ready(function () {
                     { field: 'includeReserve', title: '是否进行储备', valign:"middle", align:"center" },
                     { field: 'completeDesign', title: '是否完成初设', valign:"middle", align:"center" },
                     { field: 'submitTime', title: '初设提交时间', valign:"middle", align:"center" },
-                    { field: 'completeDraw', title: '是否完成审图', valign:"middle", align:"center" },
+                    { field: 'completeDraw', title: '是否进行审图', valign:"middle", align:"center" },
+                    { field: 'completeDrawDate', title: '审图日期', valign:"middle", align:"center" },
                     { field: 'drawAudit', title: '是否通过图纸审核', valign:"middle", align:"center" },
-                    { field: 'reasonForFailure', title: '未通过原因分析', valign:"middle", align:"center" ,formatter:paramsMatter},
                     { field: 'passAuditDate', title: '通过审核日期', valign:"middle", align:"center" },
+                    { field: 'reasonForFailure', title: '未通过原因分析', valign:"middle", align:"center" ,formatter:paramsMatter},
                     { field: 'changeDesign', title: '是否需设计变更', valign:"middle", align:"center" },
-                    { field: 'completeReview', title: '是否完成审核', valign:"middle", align:"center" },
+                    { field: 'drawRemarks', title: '备注', valign:"middle", align:"center" ,formatter:paramsMatter},
+                    { field: 'completeReview', title: '是否进行审核', valign:"middle", align:"center" },
+                    { field: 'auditDate', title: '审核日期', valign:"middle", align:"center" },
                     { field: 'expertReview', title: '是否通过专家审核', valign:"middle", align:"center" },
-                    { field: 'estimateReasonForFailure', title: '未通过原因分析', valign:"middle", align:"center" ,formatter:paramsMatter},
                     { field: 'estimatePassAuditDate', title: '通过审核日期', valign:"middle", align:"center" },
+                    { field: 'estimateReasonForFailure', title: '未通过原因分析', valign:"middle", align:"center" ,formatter:paramsMatter},
                     { field: 'estimateChangeDesign', title: '是否需设计变更', valign:"middle", align:"center" },
+                    { field: 'budgetRemarks', title: '备注', valign:"middle", align:"center" ,formatter:paramsMatter},
                     { field: 'provincialCompanyReview', title: '是否参加省公司评审', valign:"middle", align:"center" },
-                    { field: 'provincialCompanyReviewBatch', title: '省公司评审批次', valign:"middle", align:"center" },
+                    { field: 'provincialCompanyReviewBatch', title: '省公司评审批次/日期', valign:"middle", align:"center" },
                     { field: 'passProvincialCompanyReview', title: '是否通过省公司评审', valign:"middle", align:"center" },
-                    { field: 'causeAnalysis', title: '未通过原因分析', valign:"middle", align:"center" ,formatter:paramsMatter},
+                    { field: 'causeAnalysis', title: '评审意见', valign:"middle", align:"center" ,formatter:paramsMatter},
                     { field: 'designChange', title: '是否需设计变更', valign:"middle", align:"center" },
+                    { field: 'provincialCompanyRemarks', title: '备注', valign:"middle", align:"center" ,formatter:paramsMatter},
                     { field: 'drawingReview', title: '是否进行图纸审查', valign:"middle", align:"center" },
-                    { field: 'reviewDate', title: '审图日期', valign:"middle", align:"center" },
+                    { field: 'reviewDate', title: '联合审图日期', valign:"middle", align:"center" },
                     { field: 'passDrawingReview', title: '是否通过图纸审查', valign:"middle", align:"center" },
-                    { field: 'reviewComment', title: '未通过审图意见', valign:"middle", align:"center" ,formatter:paramsMatter},
                     { field: 'approvedDate', title: '通过审核日期', valign:"middle", align:"center" },
+                    { field: 'reviewComment', title: '审图意见', valign:"middle", align:"center" ,formatter:paramsMatter},
                     { field: 'jointReviewDesignChange', title: '是否需设计变更', valign:"middle", align:"center" },
+                    { field: 'drawingUnionRemarks', title: '备注', valign:"middle", align:"center" ,formatter:paramsMatter},
                     { field: 'drawingFinalize', title: '图纸是否定稿', valign:"middle", align:"center" },
                     { field: 'finalDate', title: '定稿日期', valign:"middle", align:"center" },
                     { field: 'formalDrawing', title: '是否打印正式图纸', valign:"middle", align:"center" },