Browse Source

4库导入

JiangPengLi 2 months ago
parent
commit
c3708ce236

+ 12 - 4
projects-service/src/main/java/com/rtrh/projects/modules/projects/mapper/SubInfoMapper.xml

@@ -70,7 +70,9 @@
             amt_zjz = #{item.amtZjz},
             amt_ss = #{item.amtSs},
             num_p = #{item.numP},
-            remark = #{item.remark}
+            remark = #{item.remark},
+            chh_desc = #{item.chhDesc},
+            name_zrr_lead = #{item.nameZrrLead}
             WHERE
             id = #{item.id}
         </foreach>
@@ -87,7 +89,9 @@
             amt_zjz = #{item.amtZjz},
             amt_ss = #{item.amtSs},
             num_p = #{item.numP},
-            remark = #{item.remark}
+            remark = #{item.remark},
+            chh_desc = #{item.chhDesc},
+            name_zrr_lead = #{item.nameZrrLead}
             WHERE
             id = #{item.id}
         </foreach>
@@ -103,7 +107,9 @@
             amt_zjz = #{item.amtZjz},
             amt_ss = #{item.amtSs},
             num_p = #{item.numP},
-            remark = #{item.remark}
+            remark = #{item.remark},
+            chh_desc = #{item.chhDesc},
+            name_zrr_lead = #{item.nameZrrLead}
             WHERE
             id = #{item.id}
         </foreach>
@@ -290,7 +296,9 @@
         s.status_red AS statusRed,
         s.reason,
         s.red_name AS redName,
-        s.red_date AS redDate
+        s.red_date AS redDate,
+        s.chh_desc AS chhDesc,
+        s.name_zrr_lead AS nameZrrLead
         <if test="vo.status!=null and vo.status==3 and vo.month!=null and vo.month!=''">
             ,src.yearPlanAmt
         </if>

+ 6 - 16
projects-service/src/main/java/com/rtrh/projects/modules/projects/po/SubInfoGxj.java

@@ -132,27 +132,12 @@ public class SubInfoGxj extends TableBaseColomn implements Serializable {
     @JsonFormat(pattern="yyyy-MM-dd",timezone="GMT+8")
     private Date rgDate;
 
-    // // 创建人登录id
-    // private String createUserId;
-    //
     // 创建人登录名称
     private String createUserName;
 
-    // // 创建时间
-    // private Date createTime;
-    //
-    // // 更新人id
-    // private String lastUpdateUserId;
-
     // 更新人名称
     private String lastUpdateUserName;
 
-    // // 最后一次更新时间
-    // private Date lastUpdateTime;
-
-    // // 删除标记 0正常 1删除
-    // private Boolean logicDeleteFlag;
-
     // 产值
     private BigDecimal amtCz;
     // 增加值
@@ -177,6 +162,12 @@ public class SubInfoGxj extends TableBaseColomn implements Serializable {
     private String redName;
     // 红黄灯时间
     private Date redDate;
+    // 备案核准时间
+    private Date filingDate;
+    // 牵头部门
+    private String chhDesc;
+    // 责任领导
+    private String nameZrrLead;
 
     // 前期手续数量
     private Long preProceNum;
@@ -186,7 +177,6 @@ public class SubInfoGxj extends TableBaseColomn implements Serializable {
 
     private String preContent;
 
-    private Date filingDate;
 
     public BigDecimal getAmtTotal() {
         return amtTotal == null ? BigDecimal.ZERO : amtTotal;

+ 1 - 1
projects-service/src/main/java/com/rtrh/projects/modules/projects/po/SubPreNewGxj.java

@@ -29,7 +29,7 @@ public class SubPreNewGxj implements Serializable {
 
     private String subPreGxjId;
 
-    private String datePre;
+    private Date datePre;
 
     private String lastUpdateUserid;
 

+ 2 - 0
projects-service/src/main/java/com/rtrh/projects/modules/projects/service/impl/SubInfoServiceImpl.java

@@ -5732,6 +5732,7 @@ public class SubInfoServiceImpl implements SubInfoService {
 
 
     @Override
+    @Transactional(rollbackFor = {Exception.class, RuntimeException.class})
     public void importCbDetailExcel(List<SubInfoCbVO> list, LoginUserVO userVO) {
         // 获取区县
         Map<String, String> jsddMap = Optional.ofNullable(tSysTableService.getByKind(SysTableKind.JSDD))
@@ -5840,6 +5841,7 @@ public class SubInfoServiceImpl implements SubInfoService {
     }
 
     @Override
+    @Transactional(rollbackFor = {Exception.class, RuntimeException.class})
     public void importEndDetailExcel(List<SubInfoTcVO> list, LoginUserVO loginUser) {
         // 获取区县
         Map<String, String> jsddMap = Optional.ofNullable(tSysTableService.getByKind(SysTableKind.JSDD))

+ 4 - 1
projects-service/src/main/java/com/rtrh/projects/modules/projects/service/impl/SubPreGxjInfoServiceImpl.java

@@ -1,6 +1,7 @@
 package com.rtrh.projects.modules.projects.service.impl;
 
 import cn.hutool.core.collection.CollUtil;
+import cn.hutool.core.date.DateTime;
 import cn.hutool.core.date.DateUtil;
 import cn.hutool.core.util.IdUtil;
 import cn.hutool.core.util.StrUtil;
@@ -95,7 +96,9 @@ public class SubPreGxjInfoServiceImpl implements ISubPreGxjInfoService {
                     preNewGxj.setId(IdUtil.getSnowflakeNextIdStr());
                     preNewGxj.setSubId(subId);
                     preNewGxj.setSubPreGxjId(item.getSubPreFlowGxjId());
-                    preNewGxj.setDatePre(item.getDatePre());
+                    if (StrUtil.isNotBlank(item.getDatePre())){
+                        preNewGxj.setDatePre(DateUtil.parse(item.getDatePre(), "yyyy-MM-dd"));
+                    }
                     preNewGxj.setLastUpdateUserName(userVO.getLoginName());
                     preNewGxj.setLastUpdateTime(new Date());
                     preNewGxj.setLastUpdateUserid(userVO.getId());

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

@@ -96,7 +96,7 @@ public class PreNewConGxjVO {
             subPreNewGxj.setLastUpdateUserName(loginUser.getRealName());
             subPreNewGxj.setLogicDeleteFlag(false);
             Date datePre = BeanUtil.getProperty(this, v);
-            subPreNewGxj.setDatePre(DateUtil.format(datePre, "yyyy-MM-dd"));
+            subPreNewGxj.setDatePre(datePre);
             list.add(subPreNewGxj);
         });
         return list;

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

@@ -33,10 +33,10 @@ public class SubInfoTcVO {
     private String progress;
 
     @Excel(name = "牵头部门", width = 30.0)
-    private String deptName;
+    private String chhDesc;
 
     @Excel(name = "责任领导",  width = 30.0)
-    private String leader;
+    private String nameZrrLead;
 
 
     @Excel(name = "产值", width = 12.0)

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

@@ -38,10 +38,10 @@ public class SubInfoXjVO {
     private String preContent;
 
     @Excel(name = "牵头部门",  width = 30.0)
-    private String deptName;
+    private String chhDesc;
 
     @Excel(name = "责任领导",  width = 30.0)
-    private String leader;
+    private String nameZrrLead;
 
 
 

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

@@ -46,10 +46,10 @@ public class SubInfoZjVO{
     private String progress;
 
     @Excel(name = "牵头部门", width = 30.0)
-    private String deptName;
+    private String chhDesc;
 
     @Excel(name = "责任领导", width = 30.0)
-    private String leader;
+    private String nameZrrLead;
 
 
     @Excel(name = "产值", width = 12.0)

+ 3 - 6
projects/src/main/java/com/rtrh/projects/web/controller/subject/SubInfoController.java

@@ -33,10 +33,7 @@ import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Controller;
 import org.springframework.ui.Model;
 import org.springframework.ui.ModelMap;
-import org.springframework.web.bind.annotation.GetMapping;
-import org.springframework.web.bind.annotation.PostMapping;
-import org.springframework.web.bind.annotation.RequestBody;
-import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.*;
 import org.springframework.web.servlet.ModelAndView;
 
 import com.rtrh.common.util.StringUtil;
@@ -901,12 +898,12 @@ public class SubInfoController extends BaseController {
     }
 
     @GetMapping("editProcedure")
-    public ModelAndView editProcedure(String id,String statusArrStr, ModelMap model) {
+    public ModelAndView editProcedure(String id, String statusStr, ModelMap model) {
         if (StringUtil.isNotEmpty(id)){
             model.put("id", id);
         }
         List<String> subjectIds = getSubjectIds();
-        List<Map<String, Object>> subNameList = subInfoService.queryAllSubNames(statusArrStr,subjectIds);
+        List<Map<String, Object>> subNameList = subInfoService.queryAllSubNames(statusStr,subjectIds);
         model.put("subNameList", subNameList);
         //建设地点
         model.put("JSDD", tSysTableService.getByKind(SysTableKind.JSDD));

+ 4 - 5
projects/src/main/java/com/rtrh/projects/web/controller/subject/SubInfoExportController.java

@@ -1080,8 +1080,8 @@ public class SubInfoExportController extends BaseController {
             add(new ExcelExportEntity("解决就业人数", "numP", 12));
             add(new ExcelExportEntity("年度投资(亿元)", "yearPlanAmt", 12));
             add(new ExcelExportEntity("进展情况", "progress", 30));
-            add(new ExcelExportEntity("牵头部门", "deptName", 30));
-            add(new ExcelExportEntity("责任领导", "leader", 15));
+            add(new ExcelExportEntity("牵头部门", "chhDesc", 30));
+            add(new ExcelExportEntity("责任领导", "nameZrrLead", 15));
             add(new ExcelExportEntity("备注", "remark", 15));
         }};
         List<Map<String, Object>> collect = exportList.stream().map(e -> {
@@ -1811,7 +1811,7 @@ public class SubInfoExportController extends BaseController {
                 vo.setIndex(i + 1 + "");
                 hyList.add(vo);
             }
-            // 添加前计算合并行
+            // 添加合并行
             allSize.add(exportList.size() + 2);
             allSize.add(2);
             exportList.addAll(hyList);
@@ -1832,7 +1832,6 @@ public class SubInfoExportController extends BaseController {
         // 合并单元格
         CellStyle nonCenterCellStyle = createNonCenterBoldCellStyle(workbook);
         Sheet sheet = workbook.getSheetAt(0);
-        // allSize.add(2);
         for (Integer row : new HashSet<>(allSize)) {
             sheet.addMergedRegion(new CellRangeAddress(row, row, 1, 4));
             // 获取合并区域的左上角单元格并设置样式
@@ -1844,7 +1843,7 @@ public class SubInfoExportController extends BaseController {
                 }
             }
         }
-        // 设置自适应行高,i为需要自适应行高的起始行号, 起始行号为3 但是因为下标从0开始3需要减一,因为表格是循环生成,需要一行一行设置自适应高度
+        // 行高内容自适应
         for (int i = 4; i <= list.size() + allSize.size() + 3; i++) {
             Optional.ofNullable(sheet.getRow(i)).ifPresent(row -> row.setHeight((short) -1));
         }

+ 1 - 1
projects/src/main/java/com/rtrh/projects/web/controller/subject/api/SubInfoApiController.java

@@ -240,7 +240,7 @@ public class SubInfoApiController extends BaseController {
             }
             message.add("导入成功");
         } catch (Exception e) {
-            message.add("导入失败:" + e.getMessage());
+            message.addError("导入失败:" + e.getMessage());
             e.printStackTrace();
         }
         return message;

+ 9 - 0
projects/src/main/webapp/asset/modules/App.js

@@ -566,6 +566,15 @@
 		getParentIframe : function(){
 			return top.parentIframe ? top.parentIframe : parent;
 		},
+		/**
+		 * 判断空字符串
+		 */
+		isEmpty: function (str){
+			return !str || str.length === 0;
+		},
+		isNoBlank:function (str){
+			return /^\s*$/.test(str);
+		},
 
 		/**
 		 * 弹出信息方法封装

+ 5 - 5
projects/src/main/webapp/vmodules/subject/subInfo/tz/cb.jsp

@@ -490,16 +490,16 @@
                     accept: 'file', // 普通文件
                     exts: 'xls|xlsx', // 限制文件类型
                     done: function (res) {
-                        if (res.success === true) {
+                        /*if (res.success === true) {
                             self.getData();
-                            // layui.layer.msg('导入成功!');
+                            layui.layer.msg('导入成功!');
                         } else {
                             layui.layer.msg('导入失败:' + res.message, {icon: 5});
-                        }
+                        }*/
                     },
-                    error: function (res) {
+                    /*error: function (res) {
                         layui.layer.msg('上传失败,请稍后再试' + res.message, {icon: 5});
-                    }
+                    }*/
                 });
 
                 this.winH = document.body.clientHeight;

+ 4 - 4
projects/src/main/webapp/vmodules/subject/subInfo/tz/procedure.jsp

@@ -523,12 +523,12 @@
         },
         methods: {
             toEditProcedure: function (obj) {
-                let statusArrStr = this.subInfoStatus.getValue("valueList").map(item => item.value).join(',')
-                window.location.href = App.getUrl("/subject/subInfo/editProcedure?id=" + obj.data.id+"&statusArrStr"+ statusArrStr);
+                let statusStr = this.subInfoStatus.getValue("valueList").map(item => item.value).join(',')
+                window.location.href = App.getUrl("/subject/subInfo/editProcedure?id=" + obj.data.id+"&statusStr="+ statusStr);
             },
             addProcedure(){
-                let statusArrStr = this.subInfoStatus.getValue("valueList").map(item => item.value).join(',')
-                window.location.href = App.getUrl("/subject/subInfo/editProcedure?id=''&statusArrStr=" + statusArrStr);
+                let statusStr = this.subInfoStatus.getValue("valueList").map(item => item.value).join(',')
+                window.location.href = App.getUrl("/subject/subInfo/editProcedure?id=''&statusStr=" + statusStr);
             },
             delProcedure(obj){
                 let self = this;