|
@@ -1,6 +1,5 @@
|
|
|
package com.chuanghai.h3c_reporting.controller;
|
|
package com.chuanghai.h3c_reporting.controller;
|
|
|
|
|
|
|
|
-import com.alibaba.fastjson.JSONObject;
|
|
|
|
|
import com.chuanghai.h3c_reporting.anno.AdminLoginCheck;
|
|
import com.chuanghai.h3c_reporting.anno.AdminLoginCheck;
|
|
|
import com.chuanghai.h3c_reporting.bo.CloseReporting;
|
|
import com.chuanghai.h3c_reporting.bo.CloseReporting;
|
|
|
import com.chuanghai.h3c_reporting.bo.DeleteReporting;
|
|
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 com.chuanghai.h3c_reporting.vo.InformationReportingVO;
|
|
|
import lombok.extern.slf4j.Slf4j;
|
|
import lombok.extern.slf4j.Slf4j;
|
|
|
import org.apache.ibatis.annotations.Param;
|
|
import org.apache.ibatis.annotations.Param;
|
|
|
|
|
+import org.apache.tomcat.util.buf.StringUtils;
|
|
|
import org.springframework.beans.BeanUtils;
|
|
import org.springframework.beans.BeanUtils;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.web.bind.annotation.*;
|
|
import org.springframework.web.bind.annotation.*;
|
|
@@ -46,23 +46,11 @@ public class InformationReportingController {
|
|
|
*/
|
|
*/
|
|
|
@PostMapping("/add")
|
|
@PostMapping("/add")
|
|
|
public CommonResult<String> add(@Valid @RequestBody InformationReportingVO staffEntity) {
|
|
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();
|
|
InformationReporting reporting = new InformationReporting();
|
|
|
BeanUtils.copyProperties(staffEntity, reporting);
|
|
BeanUtils.copyProperties(staffEntity, reporting);
|
|
|
LocalDateTime localDateTime = LocalDateTime.now();
|
|
LocalDateTime localDateTime = LocalDateTime.now();
|