|
@@ -7,12 +7,19 @@ import java.io.FileInputStream;
|
|
import java.io.IOException;
|
|
import java.io.IOException;
|
|
import java.io.InputStream;
|
|
import java.io.InputStream;
|
|
import java.net.URLEncoder;
|
|
import java.net.URLEncoder;
|
|
|
|
+import java.util.ArrayList;
|
|
import java.util.LinkedHashMap;
|
|
import java.util.LinkedHashMap;
|
|
import java.util.List;
|
|
import java.util.List;
|
|
import java.util.Map;
|
|
import java.util.Map;
|
|
|
|
+import java.util.Set;
|
|
|
|
|
|
import javax.servlet.http.HttpServletRequest;
|
|
import javax.servlet.http.HttpServletRequest;
|
|
import javax.servlet.http.HttpServletResponse;
|
|
import javax.servlet.http.HttpServletResponse;
|
|
|
|
+import javax.validation.ConstraintViolation;
|
|
|
|
+import javax.validation.Valid;
|
|
|
|
+import javax.validation.Validation;
|
|
|
|
+import javax.validation.Validator;
|
|
|
|
+import javax.validation.ValidatorFactory;
|
|
|
|
|
|
import org.apache.commons.io.FileUtils;
|
|
import org.apache.commons.io.FileUtils;
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
@@ -21,6 +28,9 @@ import org.springframework.http.HttpStatus;
|
|
import org.springframework.http.MediaType;
|
|
import org.springframework.http.MediaType;
|
|
import org.springframework.http.ResponseEntity;
|
|
import org.springframework.http.ResponseEntity;
|
|
import org.springframework.stereotype.Controller;
|
|
import org.springframework.stereotype.Controller;
|
|
|
|
+import org.springframework.validation.BindingResult;
|
|
|
|
+import org.springframework.validation.FieldError;
|
|
|
|
+import org.springframework.validation.annotation.Validated;
|
|
import org.springframework.web.bind.annotation.RequestBody;
|
|
import org.springframework.web.bind.annotation.RequestBody;
|
|
import org.springframework.web.bind.annotation.RequestMapping;
|
|
import org.springframework.web.bind.annotation.RequestMapping;
|
|
import org.springframework.web.bind.annotation.RequestMethod;
|
|
import org.springframework.web.bind.annotation.RequestMethod;
|
|
@@ -28,6 +38,7 @@ import org.springframework.web.bind.annotation.RequestParam;
|
|
import org.springframework.web.bind.annotation.ResponseBody;
|
|
import org.springframework.web.bind.annotation.ResponseBody;
|
|
import org.springframework.web.multipart.MultipartFile;
|
|
import org.springframework.web.multipart.MultipartFile;
|
|
|
|
|
|
|
|
+import com.alibaba.fastjson.JSON;
|
|
import com.fuzamei.entity.BusinessCheck;
|
|
import com.fuzamei.entity.BusinessCheck;
|
|
import com.fuzamei.service.BusinessDeclareService;
|
|
import com.fuzamei.service.BusinessDeclareService;
|
|
import com.fuzamei.utils.JSONUtil;
|
|
import com.fuzamei.utils.JSONUtil;
|
|
@@ -323,6 +334,23 @@ public class BusinessDeclareAction {
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
+ /*@RequestMapping(value="/test")
|
|
|
|
+ @ResponseBody
|
|
|
|
+ public Map<String, Object> test(@RequestBody String data){
|
|
|
|
+ try {
|
|
|
|
+ TestBO testBO = JSON.parseObject(data, TestBO.class);
|
|
|
|
+ List<String> list=validate(testBO);
|
|
|
|
+ if(!list.isEmpty()){
|
|
|
|
+ throw new RuntimeException(list.get(0));
|
|
|
|
+ }
|
|
|
|
+ return JSONUtil.getJsonMap(200, true, "成功",null);
|
|
|
|
+ } catch (Exception e) {
|
|
|
|
+ return JSONUtil.getJsonMap(200, true, "失败:"+e.getMessage(),null);
|
|
|
|
+ }
|
|
|
|
+ }*/
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+
|
|
|
|
|
|
/**
|
|
/**
|
|
* 上传文件功能模块
|
|
* 上传文件功能模块
|