2 次代碼提交 fae237e936 ... febef96514

作者 SHA1 備註 提交日期
  Wayne febef96514 Merge branch 'master' of http://8.137.121.180:10880/longping/subject_gxj 2 月之前
  Wayne d3723ec7cd 项目导出,储备项目和投产项目完成 2 月之前

+ 2 - 1
projects-service/src/main/java/com/rtrh/projects/modules/projects/mapper/SubInfoMapper.xml

@@ -188,7 +188,8 @@
         s.logic_delete_flag AS logicDeleteFlag,
         s.status_lamp AS statusLamp,
         s.kind_nature AS kindNature,
-        s.addre AS addre
+        s.addre AS addre,
+        s.filing_date AS filingDate
         <if test="vo.status!=null and vo.status==3 and vo.month!=null and vo.month!=''">
             ,src.yearPlanAmt
         </if>

+ 2 - 0
projects-service/src/main/java/com/rtrh/projects/modules/projects/po/SubInfoGxj.java

@@ -164,4 +164,6 @@ public class SubInfoGxj extends TableBaseColomn implements Serializable {
     private BigDecimal yearPlanAmt;
 
     private String preContent;
+
+    private String filingDate;
 }

+ 5 - 2
projects-service/src/main/java/com/rtrh/projects/modules/projects/vo/export/SubInfoCbVO.java

@@ -7,9 +7,12 @@ import lombok.EqualsAndHashCode;
 @Data
 @EqualsAndHashCode(callSuper = true)
 public class SubInfoCbVO extends SubInfoBaseDetailVo {
-    @Excel(name = "进展情况", orderNum = "5", width = 30.0)
+    @Excel(name = "备案/核准时间", orderNum = "5", width = 30.0)
+    private String filingDate;
+
+    @Excel(name = "进展情况", orderNum = "6", width = 30.0)
     private String progress;
 
-    @Excel(name = "备注",orderNum = "6", width = 30.0)
+    @Excel(name = "备注",orderNum = "7", width = 30.0)
     private String remark;
 }

+ 7 - 1
projects-service/src/main/java/com/rtrh/projects/modules/projects/vo/export/SubInfoTcVO.java

@@ -29,6 +29,12 @@ public class SubInfoTcVO {
     @Excel(name = "进展情况", orderNum = "5", width = 30.0)
     private String progress;
 
-    @Excel(name = "备注", orderNum = "6", width = 30.0)
+    @Excel(name = "牵头部门", orderNum = "6", width = 30.0)
+    private String deptName;
+
+    @Excel(name = "责任领导", orderNum = "7", width = 30.0)
+    private String leader;
+
+    @Excel(name = "备注", orderNum = "8", width = 30.0)
     private String remark;
 }

+ 39 - 3
projects/src/main/java/com/rtrh/projects/web/controller/subject/SubInfoExportController.java

@@ -1187,6 +1187,7 @@ public class SubInfoExportController extends BaseController {
         List<SubInfoTotalExcel> list = subInfoService.exportTotalExcelByStatus(vo);
         List<TSystable> jsddDict = tSysTableService.getByKind(SysTableKind.JSDD);
         Map<String, String> jsddMap = jsddDict.stream().collect(Collectors.toMap(TSystable::getCode, TSystable::getTitle));
+        Map<String, String> jsddTitleMap = jsddDict.stream().collect(Collectors.toMap(TSystable::getTitle, TSystable::getCode));
         Map<String, String> hyflMap = subInduService.queryParentAll().stream().collect(Collectors.toMap(SubIndu::getCode, SubIndu::getTitle));
         // 0.项目总库导出总表
         if (StringUtils.isBlank(vo.getStatus())){
@@ -1205,8 +1206,32 @@ public class SubInfoExportController extends BaseController {
             hj.setList(subHeadEntities);
             entityList.add(hj);
 
-            for (String subjectId : subjectIds) {
-                ExcelExportEntity jsdd = new ExcelExportEntity(jsddMap.get(subjectId), subjectId);
+            // 创建for循环,循环5次
+            List<String> newSubjectIds = new ArrayList<>();
+            if (subjectIds.contains(jsddTitleMap.get("伊州区"))){
+                newSubjectIds.add(jsddTitleMap.get("伊州区"));
+            }
+            if (subjectIds.contains(jsddTitleMap.get("巴里坤县"))){
+                newSubjectIds.add(jsddTitleMap.get("巴里坤县"));
+            }
+            if (subjectIds.contains(jsddTitleMap.get("伊吾县"))){
+                newSubjectIds.add(jsddTitleMap.get("伊吾县"));
+            }
+            if (subjectIds.contains(jsddTitleMap.get("高新区"))){
+                newSubjectIds.add(jsddTitleMap.get("高新区"));
+            }
+            if (subjectIds.contains(jsddTitleMap.get("市本级"))){
+                newSubjectIds.add(jsddTitleMap.get("市本级"));
+            }
+
+
+            for (String subjectId : newSubjectIds) {
+                ExcelExportEntity jsdd = null;
+                if (jsddMap.get(subjectId).equals("市本级")) {
+                    jsdd = new ExcelExportEntity("其他", subjectId);
+                }else {
+                    jsdd = new ExcelExportEntity(jsddMap.get(subjectId), subjectId);
+                }
                 List<ExcelExportEntity> ddHead = new ArrayList<>();
                 ddHead.add(getExcelExportEntity("项目个数", "count", 12));
                 ddHead.add(getExcelExportEntity("计划总投资(亿元)", "amt", 20));
@@ -1320,7 +1345,18 @@ public class SubInfoExportController extends BaseController {
                 BigDecimal reduce = list.stream().map(SubInfoTotalExcel::getAmtTotal).reduce(BigDecimal.ZERO, BigDecimal::add);
                 exportData.add(new SubInfoTotalInfoVO("合计", "合计", list.size(), reduce.divide(new BigDecimal("10000"), 2, RoundingMode.HALF_UP)));
                 // 4.导出
-                ExportParams exportParams = new ExportParams("项目库基本情况","项目库基本情况", ExcelType.XSSF);
+                ExportParams exportParams = null;
+                if (vo.getStatus().equals("1")){
+                    exportParams = new ExportParams("“四个一批”储备项目库基本情况","“四个一批”储备项目库基本情况", ExcelType.XSSF);
+                }else if (vo.getStatus().equals("2")){
+                    exportParams = new ExportParams("“四个一批”新建项目库基本情况","“四个一批”新建项目库基本情况", ExcelType.XSSF);
+                }else if (vo.getStatus().equals("3")){
+                    exportParams = new ExportParams("“四个一批”在建项目库基本情况","“四个一批”在建项目库基本情况", ExcelType.XSSF);
+                }else if (vo.getStatus().equals("9")){
+                    exportParams = new ExportParams("“四个一批”投产库基本情况","“四个一批”投产库基本情况", ExcelType.XSSF);
+                }else {
+                    exportParams = new ExportParams("“四个一批”项目库基本情况","“四个一批”项目库基本情况", ExcelType.XSSF);
+                }
                 exportParams.setStyle(ExcelStyleUtil.class);
                 int mergeTotalStartRow = exportData.size() + 1;
                 Workbook workbook = ExcelExportUtil.exportExcel(exportParams, SubInfoTotalInfoVO.class, exportData);