|
@@ -8,6 +8,7 @@ import java.io.InputStream;
|
|
|
import java.net.URLEncoder;
|
|
|
import java.util.HashSet;
|
|
|
import java.util.LinkedHashMap;
|
|
|
+import java.util.List;
|
|
|
import java.util.Map;
|
|
|
import java.util.Set;
|
|
|
|
|
@@ -23,10 +24,19 @@ import org.springframework.web.bind.annotation.RequestParam;
|
|
|
import org.springframework.web.bind.annotation.ResponseBody;
|
|
|
import org.springframework.web.multipart.MultipartFile;
|
|
|
|
|
|
+import com.alibaba.fastjson.JSON;
|
|
|
+import com.fuzamei.constant.BattleResult;
|
|
|
+import com.fuzamei.constant.HintMSG;
|
|
|
+import com.fuzamei.constant.Role;
|
|
|
+import com.fuzamei.entity.UserDetail;
|
|
|
+import com.fuzamei.entity.ValuationAccount;
|
|
|
+import com.fuzamei.service.AttachmentService;
|
|
|
+import com.fuzamei.service.UserAuthoricationService;
|
|
|
import com.fuzamei.service.ValuationAccountingService;
|
|
|
import com.fuzamei.utils.JSONUtil;
|
|
|
import com.fuzamei.utils.MapUtil;
|
|
|
import com.fuzamei.utils.PageDTO;
|
|
|
+import com.fuzamei.utils.ValidationUtil;
|
|
|
|
|
|
/**
|
|
|
* 估值核算模块实现
|
|
@@ -40,14 +50,28 @@ public class ValuationAccountingAction {
|
|
|
@Autowired
|
|
|
private ValuationAccountingService valuationAccountingService;
|
|
|
|
|
|
+ @Autowired
|
|
|
+ private UserAuthoricationService userAuthoricationService;
|
|
|
+
|
|
|
+ @Autowired
|
|
|
+ private AttachmentService attachmentService;
|
|
|
+
|
|
|
private static final String SP = File.separator; //系统分隔符,随操作系统而决定
|
|
|
|
|
|
+ private static final int ROW_NUM = 10; // 分页每页显示数据的数量
|
|
|
/**
|
|
|
*
|
|
|
* @Title: queryOperationHistoryInformation
|
|
|
* @Description: TODO(估值核算的查询结果,包括所有的查询条件也包括进去了)
|
|
|
- * @param @param data
|
|
|
- * @param @return 设定文件
|
|
|
+ * 前端传过来的json格式为:
|
|
|
+ * {
|
|
|
+ * "userId":"xxx",
|
|
|
+ * "page":"1",
|
|
|
+ * "fundName":"",
|
|
|
+ * "battleResult":"",
|
|
|
+ * "startTime":"",
|
|
|
+ * "endTime":""
|
|
|
+ * }
|
|
|
* @return Map<String,Object> 返回类型
|
|
|
* @author ylx
|
|
|
* @date 2017年12月18日 下午3:17:30
|
|
@@ -56,22 +80,110 @@ public class ValuationAccountingAction {
|
|
|
@RequestMapping(value="/queryValuationAccountingInformation",method=RequestMethod.POST)
|
|
|
@ResponseBody
|
|
|
public Map<String,Object> queryOperationHistoryInformation(@RequestBody String data){
|
|
|
-
|
|
|
- System.out.println("查询估值核算数据");
|
|
|
-
|
|
|
- Map<String, Object> map = JSONUtil.jsonToMap(data);
|
|
|
-
|
|
|
- PageDTO pageDto = valuationAccountingService.queryValuationAccountingInformation(map);
|
|
|
-
|
|
|
- return JSONUtil.getJsonMap(200, true, "查询成功", pageDto);
|
|
|
+ try {
|
|
|
+ System.out.println("查询估值核算数据");
|
|
|
+ @SuppressWarnings("unchecked")
|
|
|
+ Map<String, Object> map = JSON.parseObject(data, Map.class);
|
|
|
+ int userId = ValidationUtil.checkAndAssignInt(map.get("userId")); //userId只要是一个int类型即可
|
|
|
+ userAuthoricationService.checkUserAuthority(userId,Role.ADMIN,Role.ACCOUNTING_POS_OF_TBC); //查看用户非空和权限
|
|
|
+ int page = ValidationUtil.checkMinAndAssignInt(map.get("page"), 1); // 默认页是第一页
|
|
|
+ String fundName=ValidationUtil.checkBlankStringAndAssignEmptyIfIsBlank(map.get("fundName")); //基金名默认为空
|
|
|
+ String battleResult=ValidationUtil.checkBlankStringAndAssignEmptyIfIsBlank(map.get("battleResult")); //比对结果默认为空
|
|
|
+ long startTime = ValidationUtil.checkAndAssignDefaultLong(map.get("startTime"), 0L); //开始时间默认0
|
|
|
+ long endTime = ValidationUtil.checkAndAssignDefaultLong(map.get("endTime"), Long.MAX_VALUE); //结束时间默认Long最大值
|
|
|
+ Map<String, Object> mapToService = new LinkedHashMap<String, Object>(); //这个map是去service层调取数据的
|
|
|
+ mapToService.put("userId", userId);
|
|
|
+ mapToService.put("startPage", (page - 1) * ROW_NUM);
|
|
|
+ mapToService.put("fundName", fundName);
|
|
|
+ mapToService.put("battleResult", battleResult);
|
|
|
+ //如果时间顺序错位,要重新进行排位
|
|
|
+ if (startTime <= endTime) {
|
|
|
+ mapToService.put("startTime", startTime);
|
|
|
+ mapToService.put("endTime", endTime);
|
|
|
+ } else {
|
|
|
+ mapToService.put("startTime", startTime);
|
|
|
+ mapToService.put("endTime", Long.MAX_VALUE);
|
|
|
+ }
|
|
|
+ mapToService.put("rowNum", ROW_NUM); // 默认每页显示数据是10条,可根据需求修改分页数量
|
|
|
+ PageDTO pageDto = valuationAccountingService.queryValuationAccountingInformation(mapToService);
|
|
|
+ return JSONUtil.getJsonMap(200, true, HintMSG.QUERY_SUCCESS, pageDto);
|
|
|
+ } catch (Exception e) {
|
|
|
+ return JSONUtil.getJsonMap(500, false, HintMSG.QUERY_FAIL+":"+e.getMessage(), null);
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
+
|
|
|
+ /**
|
|
|
+ *
|
|
|
+ * @Title: queryOperationHistoryInformation
|
|
|
+ * @Description: TODO(查看估值核算基金的下载信息的小弹框)
|
|
|
+ * @param @param data
|
|
|
+ * 前端传过来的json格式
|
|
|
+ * {
|
|
|
+ * userId:"xxx",
|
|
|
+ * fundId:""
|
|
|
+ * }
|
|
|
+ * @param @return 设定文件
|
|
|
+ * @return Map<String,Object> 返回类型
|
|
|
+ * @author ylx
|
|
|
+ * @date 2017年12月28日 下午1:48:43
|
|
|
+ * @throws
|
|
|
+ */
|
|
|
+ @RequestMapping(value="/checkoutDownloadInformation",method=RequestMethod.POST)
|
|
|
+ @ResponseBody
|
|
|
+ public Map<String,Object> checkoutDownloadInformation(@RequestBody String data){
|
|
|
+ try {
|
|
|
+ @SuppressWarnings("unchecked")
|
|
|
+ Map<String, Object> map = JSON.parseObject(data, Map.class);
|
|
|
+ int userId = ValidationUtil.checkAndAssignInt(map.get("userId")); //userId只要是一个int类型即可
|
|
|
+ userAuthoricationService.checkUserAuthority(userId,Role.ADMIN,Role.ACCOUNTING_POS_OF_TBC); //查看用户非空和权限
|
|
|
+ int fundId = ValidationUtil.checkAndAssignInt(map.get("fundId")); //fundId只要是一个int类型即可
|
|
|
+ List<ValuationAccount> listToClient = valuationAccountingService.checkoutDownloadInformation(fundId); //这个map是去service层调取数据的
|
|
|
+ return JSONUtil.getJsonMap(200, true, HintMSG.CHECK_SUCCESS, listToClient);
|
|
|
+ } catch (Exception e) {
|
|
|
+ return JSONUtil.getJsonMap(500, false, HintMSG.CHECK_FAIL+":"+e.getMessage(), null);
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ /**
|
|
|
+ *
|
|
|
+ * @Title: checkoutDownloadInformation
|
|
|
+ * @Description: TODO(管理人首次上传估值报表弹出的界面需要显示的ID号)
|
|
|
+ * 前端传过来的json数据格式
|
|
|
+ * {
|
|
|
+ * "userId":"xxx"
|
|
|
+ * }
|
|
|
+ * @param @return 返回一个fundId的值用于弹框中首次创建基金id的回显
|
|
|
+ * @return Map<String,Object> 返回类型
|
|
|
+ * @author ylx
|
|
|
+ * @date 2017年12月28日 下午3:39:18
|
|
|
+ * @throws
|
|
|
+ */
|
|
|
+ @RequestMapping(value="/fistUploadFundDataByAdmin",method=RequestMethod.POST)
|
|
|
+ @ResponseBody
|
|
|
+ public Map<String,Object> fistUploadFundDataByAdmin(@RequestBody String data){
|
|
|
+ try {
|
|
|
+ @SuppressWarnings("unchecked")
|
|
|
+ Map<String, Object> map = JSON.parseObject(data, Map.class);
|
|
|
+ int userId = ValidationUtil.checkAndAssignInt(map.get("userId")); //userId只要是一个int类型即可
|
|
|
+ userAuthoricationService.checkUserAuthority(userId,Role.ADMIN); //查看用户非空和权限
|
|
|
+ Map<String, Object> mapToClient = valuationAccountingService.generateFundId(); //这个map是去service层调fundId的
|
|
|
+ return JSONUtil.getJsonMap(200, true, HintMSG.CHECK_SUCCESS, mapToClient);
|
|
|
+ } catch (Exception e) {
|
|
|
+ return JSONUtil.getJsonMap(500, false, HintMSG.CHECK_FAIL+":"+e.getMessage(), null);
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
/**
|
|
|
*
|
|
|
* @Title: download
|
|
|
* @Description: TODO(估值核算界面,下载功能实现)
|
|
|
- * @param @param request
|
|
|
- * @param @param response
|
|
|
+ * 前端通过get或post发来请求
|
|
|
+ * url:链接地址
|
|
|
+ * userId:用户id号
|
|
|
* @param @param url
|
|
|
* @param @return 设定文件
|
|
|
* @return Map<String,Object> 返回类型
|
|
@@ -81,9 +193,18 @@ public class ValuationAccountingAction {
|
|
|
*/
|
|
|
@RequestMapping(value="/downloadValuationPOI")
|
|
|
@ResponseBody
|
|
|
- public Map<String, Object> download(HttpServletRequest request,HttpServletResponse response,@RequestParam("url") String url) {
|
|
|
+ public Map<String, Object> download(HttpServletRequest request,HttpServletResponse response,
|
|
|
+ @RequestParam("url") String url,
|
|
|
+ @RequestParam("userId") Object uId) {
|
|
|
try {
|
|
|
+ int userId=ValidationUtil.checkAndAssignInt(uId);
|
|
|
+ userAuthoricationService.checkUserAuthority(userId,Role.ADMIN,Role.ACCOUNTING_POS_OF_TBC); //查看用户非空和权限(管理员和核算岗都能进行下载)
|
|
|
+ url=ValidationUtil.checkBlankAndAssignString(url); //对传过来的url进行非空校验
|
|
|
String fileName = request.getServletContext().getRealPath("")+url; //SP是系统分隔符
|
|
|
+ //如果文件不存在直接抛出异常
|
|
|
+ if(!new File(fileName).exists()){
|
|
|
+ throw new RuntimeException(HintMSG.FILE_NOT_FOUND);
|
|
|
+ }
|
|
|
InputStream bis = new BufferedInputStream(new FileInputStream(new File(fileName)));
|
|
|
String filename = url.substring(url.lastIndexOf("/")+1); //截取文件名
|
|
|
filename = URLEncoder.encode(filename,"UTF-8");
|
|
@@ -97,9 +218,9 @@ public class ValuationAccountingAction {
|
|
|
}
|
|
|
out.close();
|
|
|
bis.close();
|
|
|
- return JSONUtil.getJsonMap(200, true, "下载成功",null); //返回给前端一个map进行前段提示
|
|
|
+ return JSONUtil.getJsonMap(200, true, HintMSG.DOWNLOAD_SUCCESS,null); //返回给前端一个map进行前段提示
|
|
|
} catch (Exception e) {
|
|
|
- return JSONUtil.getJsonMap(500, false, "下载出现异常:"+e.getMessage(),null); //返回给前端一个map进行前段提示
|
|
|
+ return JSONUtil.getJsonMap(500, false, HintMSG.DOWNLOAD_FAIL+":"+e.getMessage(),null); //返回给前端一个map进行前段提示
|
|
|
}
|
|
|
}
|
|
|
|
|
@@ -108,11 +229,12 @@ public class ValuationAccountingAction {
|
|
|
* @Title: upload
|
|
|
* @Description: TODO(实现管理员估值核算的报表文件上传功能---------->>暂时按照一次上传一个文件进行实现)
|
|
|
*
|
|
|
- * 如果是管理岗的人员进行上传,则是创建一条新的数据进数据库,同时在附件表中插入一条新的数据
|
|
|
- *
|
|
|
- * @param @param file
|
|
|
- * @param @param request
|
|
|
- * @param @param fundId 基金id号,前端随机生成?????还是说后台生成????TODO
|
|
|
+ * 因为是首次创建,管理岗的人员进行上传,则是创建一条新的数据进数据库,同时在附件表中插入一条新的数据,同时还要在操作记录也要插入一条操作记录,操作记录hash以这个文件的hash为准
|
|
|
+ * @ Attention: 首次上传,所以大部分的信息可以写死
|
|
|
+ * 首次创建基金id号要生成,基金名,托管资产都要从用户这里获取
|
|
|
+ * 传过来的参数以表单形式提交
|
|
|
+ * @param @param userId 用户id号
|
|
|
+ * @param @param fundId 基金id号,前端随机生成?????还是说后台生成????================================>暂时通过打开估值核算弹框自动生成TODO
|
|
|
* @param @param fundName 基金名称,客户端手动输入生成并传输过来
|
|
|
* @param @param assets 托管资产,客户端手动输入生成并传输过来
|
|
|
* @param @return 设定文件
|
|
@@ -121,34 +243,51 @@ public class ValuationAccountingAction {
|
|
|
* @date 2017年12月18日 下午5:29:38
|
|
|
* @throws
|
|
|
*/
|
|
|
- @RequestMapping(value="/uploadValuationPOIByAdmin",method=RequestMethod.POST)
|
|
|
+ @RequestMapping(value="/uploadValuationPOIByAdminForTheFirstTime",method=RequestMethod.POST)
|
|
|
@ResponseBody
|
|
|
- public Map<String, Object> uploadValuationPOIByAdmin(@RequestParam("file") MultipartFile file,HttpServletRequest request,@RequestParam("fundId") String fundId,@RequestParam("fundName") String fundName, @RequestParam("assets") String assets ) {
|
|
|
+ public Map<String, Object> uploadValuationPOIByAdmin(@RequestParam("file") MultipartFile file,HttpServletRequest request,
|
|
|
+ @RequestParam("fundId") String fId,
|
|
|
+ @RequestParam("fundName") String fName,
|
|
|
+ @RequestParam("assets") String ass,
|
|
|
+ @RequestParam("userId") Object uId) {
|
|
|
try {
|
|
|
+ int userId=ValidationUtil.checkAndAssignInt(uId);
|
|
|
+ UserDetail userDetail = userAuthoricationService.checkUserAuthority(userId,Role.ADMIN); //查看用户非空和权限(管理员创建并上传的权限)
|
|
|
+ Integer fundId=ValidationUtil.checkAndAssignInt(fId); //基金id号
|
|
|
+ valuationAccountingService.checkIfHasTheSameFundId(fundId); //对传过来的基金id进行查重校验
|
|
|
+ String fundName=ValidationUtil.checkBlankAndAssignString(fName); //基金名称===============================>>基金名要不要查重?TODO
|
|
|
+ String assets=ValidationUtil.checkBlankAndAssignString(ass); //托管资产名称============================>>托管资产要不要查重?TODO
|
|
|
+ Integer attachmentId = attachmentService.generateAtachmentId(); //生成一个不重复的附件Id号==================>>生成id号的机制待定TODO
|
|
|
+ if(file.isEmpty()){
|
|
|
+ throw new RuntimeException("上传文件不能为空");
|
|
|
+ }
|
|
|
String path = request.getServletContext().getRealPath("")+SP+"content"; //SP是系统分隔符
|
|
|
File dir=new File(path);
|
|
|
if(!dir.exists()){
|
|
|
dir.mkdirs();
|
|
|
}
|
|
|
-
|
|
|
String filename = file.getOriginalFilename();
|
|
|
+ String url = "/content/"+ValidationUtil.checkBlankAndAssignString(filename); //url路径名称被赋值之前先进行filename的校验
|
|
|
+ String attachmentName = filename; //附件名称,已经校验过,不需要再进行校验了
|
|
|
String pathFile=path+SP+filename;
|
|
|
File newFile=new File(pathFile);
|
|
|
- file.transferTo(newFile);
|
|
|
-
|
|
|
- Map<String, Object> map =new LinkedHashMap<String, Object>();
|
|
|
- map.put("fundId", fundId);
|
|
|
- map.put("fundName", fundName);
|
|
|
- map.put("assets", assets);
|
|
|
- map.put("url", "/content/"+filename); //将文件下载路径url通过map传到service层进行校验
|
|
|
- map.put("attachmentName", filename); //将文件以附件名的形式通过map传递到service层中进行校验
|
|
|
+ file.transferTo(newFile); //此时文件已经上传成功---->upload file success
|
|
|
|
|
|
+ Map<String, Object> mapToService =new LinkedHashMap<String, Object>();
|
|
|
+ mapToService.put("userId", userId); //用户id号
|
|
|
+ mapToService.put("userDetail", userDetail); //用户详细信息封装入map
|
|
|
+ mapToService.put("fundId", fundId);
|
|
|
+ mapToService.put("fundName", fundName);
|
|
|
+ mapToService.put("assets", assets);
|
|
|
+ mapToService.put("url", url); //将文件下载路径url通过map传到service层进行校验
|
|
|
+ mapToService.put("attachmentName", attachmentName); //将文件以附件名的形式通过map传递到service层中进行校验
|
|
|
+ mapToService.put("attachmentId", attachmentId); //附件id号封装好
|
|
|
//这里是以管理岗的身份进行插入的,注意银行的估值报表暂时先不插入数据
|
|
|
- valuationAccountingService.insertInformationIntoTableByAdmin(map); //将获取到的数据插入到表中
|
|
|
+ valuationAccountingService.insertInformationIntoTableByAdminForTheFirstTime(mapToService); //将获取到的数据插入到表中
|
|
|
|
|
|
- return JSONUtil.getJsonMap(200, true, "上传成功",null); //返回给前端一个map进行前段提示
|
|
|
+ return JSONUtil.getJsonMap(200, true, HintMSG.UPLOAD_SUCCESS,null); //返回给前端一个map进行前段提示
|
|
|
} catch (Exception e) {
|
|
|
- return JSONUtil.getJsonMap(500, false, "上传出现异常"+e.getMessage(),null); //返回给前端一个map进行前段提示
|
|
|
+ return JSONUtil.getJsonMap(500, false, HintMSG.UPLOAD_FAIL+":"+e.getMessage(),null); //返回给前端一个map进行前段提示
|
|
|
}
|
|
|
}
|
|
|
|
|
@@ -157,20 +296,58 @@ public class ValuationAccountingAction {
|
|
|
* @Title: upload
|
|
|
* @Description: TODO(实现银行估值核算的报表文件上传功能---------->>暂时按照一次上传一个文件进行实现)
|
|
|
* @param @param file
|
|
|
- * @param @param request
|
|
|
* @param @param fundId
|
|
|
* @param @param fundName
|
|
|
- * @param @param assets
|
|
|
- * @param @return 设定文件
|
|
|
+ * @param @param userId
|
|
|
+ * @param @return 这里上传人有可能是银行也有可能是管理岗的人,这里要进行校验
|
|
|
* @return Map<String,Object> 返回类型
|
|
|
* @author ylx
|
|
|
* @date 2017年12月18日 下午8:17:47
|
|
|
* @throws
|
|
|
*/
|
|
|
- @RequestMapping(value="/uploadValuationPOIByBank",method=RequestMethod.POST)
|
|
|
+ @RequestMapping(value="/uploadValuationPOIByBankOrByAdmin",method=RequestMethod.POST)
|
|
|
@ResponseBody
|
|
|
- public Map<String, Object> uploadValuationPOIByBank(@RequestParam("file") MultipartFile file,HttpServletRequest request,@RequestParam("fundId") String fundId,@RequestParam("fundName") String fundName, @RequestParam("assets") String assets ) {
|
|
|
+ public Map<String, Object> uploadValuationPOIByBank(@RequestParam("file") MultipartFile file,HttpServletRequest request,
|
|
|
+ @RequestParam("fundId") String fId,
|
|
|
+ @RequestParam("fundName") String fName,
|
|
|
+ @RequestParam("userId") Object uId) {
|
|
|
try {
|
|
|
+ if(file.isEmpty()){
|
|
|
+ throw new RuntimeException("上传文件不能为空");
|
|
|
+ }
|
|
|
+ int userId=ValidationUtil.checkAndAssignInt(uId);
|
|
|
+ UserDetail userDetail = userAuthoricationService.checkUserAuthority(userId,Role.ADMIN,Role.ACCOUNTING_POS_OF_TBC);//查看用户非空和权限(管理员创建并上传的权限)
|
|
|
+ Integer fundId=ValidationUtil.checkAndAssignInt(fId); //基金id号
|
|
|
+ String fundName=ValidationUtil.checkBlankAndAssignString(fName); //基金名称
|
|
|
+ ValuationAccount valuationAccount = valuationAccountingService.checkIfFundExists(fundId,fundName); //对传过来的基金id进行检测是否存在,并赋值对账结果,不存在就报错(因为这个时候基金信息已经存在)
|
|
|
+ //获得对账结果
|
|
|
+ String battleResult = valuationAccount.getBattle_result();
|
|
|
+ List<String> roleList=userDetail.getRole_name();
|
|
|
+
|
|
|
+ //已经对账结束,无法继续上传文件
|
|
|
+ if(BattleResult.CONSISTENT.equals(battleResult)){
|
|
|
+ throw new RuntimeException("对账结果一致,无法继续上传文件");
|
|
|
+ }
|
|
|
+
|
|
|
+ //判断是否是管理岗
|
|
|
+ if(roleList.contains(Role.ADMIN)){
|
|
|
+ if(BattleResult.TO_BE_MATCHED.equals(battleResult)){
|
|
|
+ throw new RuntimeException("待对账中无法重复上传");
|
|
|
+ }
|
|
|
+ //接下来肯定是对账结果不一致,说明可以上传文件===================>>待做TODO
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
+ //接下来的业务肯定是银行
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+ Integer attachmentId = attachmentService.generateAtachmentId(); //生成一个不重复的附件Id号==================>>生成id号的机制待定TODO
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
String path = request.getServletContext().getRealPath("")+SP+"content"; //SP是系统分隔符
|
|
|
File dir=new File(path);
|
|
|
if(!dir.exists()){
|
|
@@ -184,18 +361,15 @@ public class ValuationAccountingAction {
|
|
|
Map<String, Object> map =new LinkedHashMap<String, Object>();
|
|
|
map.put("fundId", fundId);
|
|
|
map.put("fundName", fundName);
|
|
|
- map.put("assets", assets);
|
|
|
map.put("url", "/content/"+filename); //将文件下载路径url通过map传到service层进行校验
|
|
|
map.put("attachmentName", filename); //将文件以附件名的形式通过map传递到service层中进行校验
|
|
|
|
|
|
//这里是以银行的身份将数据进行更新
|
|
|
valuationAccountingService.updateInformationByBank(map); //将获取到的数据更新到已有的估值核算表中,这个表是由管理岗创建的
|
|
|
-
|
|
|
- return JSONUtil.getJsonMap(200, true, "上传成功",null); //返回给前端一个map进行前段提示
|
|
|
+ return JSONUtil.getJsonMap(200, true, HintMSG.UPLOAD_SUCCESS,null); //返回给前端一个map进行前段提示
|
|
|
} catch (Exception e) {
|
|
|
- return JSONUtil.getJsonMap(500, false, "上传出现异常"+e.getMessage(),null); //返回给前端一个map进行前段提示
|
|
|
+ return JSONUtil.getJsonMap(500, false, HintMSG.UPLOAD_FAIL+":"+e.getMessage(),null); //返回给前端一个map进行前段提示
|
|
|
}
|
|
|
}
|
|
|
|
|
|
-
|
|
|
}
|