Browse Source

第二版 导出字段优化

刘一凡 3 years ago
parent
commit
cec3971f0e

+ 5 - 17
src/main/java/com/chuanghai/h3c_reporting/controller/InformationReportingController.java

@@ -1,6 +1,5 @@
 package com.chuanghai.h3c_reporting.controller;
 
-import com.alibaba.fastjson.JSONObject;
 import com.chuanghai.h3c_reporting.anno.AdminLoginCheck;
 import com.chuanghai.h3c_reporting.bo.CloseReporting;
 import com.chuanghai.h3c_reporting.bo.DeleteReporting;
@@ -14,6 +13,7 @@ import com.chuanghai.h3c_reporting.service.InformationReportingService;
 import com.chuanghai.h3c_reporting.vo.InformationReportingVO;
 import lombok.extern.slf4j.Slf4j;
 import org.apache.ibatis.annotations.Param;
+import org.apache.tomcat.util.buf.StringUtils;
 import org.springframework.beans.BeanUtils;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.web.bind.annotation.*;
@@ -46,23 +46,11 @@ public class InformationReportingController {
      */
     @PostMapping("/add")
     public CommonResult<String> add(@Valid @RequestBody InformationReportingVO staffEntity) {
-//        if (!StringUtils.hasText(staffEntity.getName())) {
-//            throw new RRException(BizCodeEnume.PARAMETER_ERROR, "姓名不能为空");
-//        }
-//        if (!StringUtils.hasText(staffEntity.getPhone())) {
-//            throw new RRException(BizCodeEnume.PARAMETER_ERROR, "手机号不能为空");
-//        }
-//        if (!StringUtils.hasText(staffEntity.getWxPhone())) {
-//            throw new RRException(BizCodeEnume.PARAMETER_ERROR, "微信绑定手机号不能为空");
-//        }
-//        if (!StringUtils.hasText(staffEntity.getCompany())) {
-//            throw new RRException(BizCodeEnume.PARAMETER_ERROR, "单位名称不能为空");
-//        }
-//        if (!StringUtils.hasText(staffEntity.getContent())) {
-//            throw new RRException(BizCodeEnume.PARAMETER_ERROR, "事件登记不能为空");
-//        }
 
-        staffEntity.setProduct(JSONObject.toJSONString(staffEntity.getBProduct()));
+//        staffEntity.setProduct(JSONObject.toJSONString(staffEntity.getBProduct()));
+        String product = StringUtils.join(Arrays.asList(staffEntity.getBProduct()), ',');
+        staffEntity.setProduct(product);
+
         InformationReporting reporting = new InformationReporting();
         BeanUtils.copyProperties(staffEntity, reporting);
         LocalDateTime localDateTime = LocalDateTime.now();

+ 1 - 1
src/main/java/com/chuanghai/h3c_reporting/entity/InformationReporting.java

@@ -80,7 +80,7 @@ public class InformationReporting implements Serializable {
     /**
      * 预计投标时间
      */
-    @ColumnWidth(15)
+    @ColumnWidth(20)
     @ExcelProperty(value = "预计投标时间")
     private String tenderTime;