|  |  |  | 
|---|
|  |  |  | import com.alibaba.fastjson.TypeReference; | 
|---|
|  |  |  | import com.doumee.api.BaseController; | 
|---|
|  |  |  | import com.doumee.biz.system.SystemDictDataBiz; | 
|---|
|  |  |  | import com.doumee.core.annotation.excel.ExcelToPdfTool; | 
|---|
|  |  |  | import com.doumee.core.annotation.trace.Trace; | 
|---|
|  |  |  | import com.doumee.core.constants.ResponseStatus; | 
|---|
|  |  |  | import com.doumee.core.exception.BusinessException; | 
|---|
|  |  |  | 
|---|
|  |  |  | throw  new BusinessException(ResponseStatus.BAD_REQUEST.getCode(),"验签不通过"); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | NotifyDataReq data   = JSONObject.parseObject(req.get("data"), NotifyDataReq.class); | 
|---|
|  |  |  | insuranceApplyService.dealSignResult(data); | 
|---|
|  |  |  | String r =  insuranceApplyService.dealSignResult(data); | 
|---|
|  |  |  | log.setRepose(r); | 
|---|
|  |  |  | }catch (Exception e){ | 
|---|
|  |  |  | log.setRepose("处理异常;"+e.getMessage()); | 
|---|
|  |  |  | context.put("success",false); | 
|---|
|  |  |  | 
|---|
|  |  |  | String tempFileName = nowDate + "/" + fileName; | 
|---|
|  |  |  | String key = folder + tempFileName;// 文件名 | 
|---|
|  |  |  | ALiYunUtil obs = new ALiYunUtil(endpoint,access_id, access_key); | 
|---|
|  |  |  | int type = 2; | 
|---|
|  |  |  | if(StringUtils.endsWith(key,".mp4")){ | 
|---|
|  |  |  | type =1; | 
|---|
|  |  |  | }else if(StringUtils.endsWith(key,".jpg") | 
|---|
|  |  |  | || StringUtils.endsWith(key,".JPG") | 
|---|
|  |  |  | || StringUtils.endsWith(key,".png") | 
|---|
|  |  |  | || StringUtils.endsWith(key,".PNG") | 
|---|
|  |  |  | || StringUtils.endsWith(key,".jpeg") | 
|---|
|  |  |  | || StringUtils.endsWith(key,".JPEG")){ | 
|---|
|  |  |  | type =0; | 
|---|
|  |  |  | } | 
|---|
|  |  |  | if (obs.uploadOnlineObject(file.getInputStream(),bucketName, key,null)) { | 
|---|
|  |  |  | // 移动成功,返回文件名 | 
|---|
|  |  |  | // sendSuccessMessage(response, resourcePath+key); | 
|---|
|  |  |  | 
|---|
|  |  |  | JSONObject fileJSON = new JSONObject(); | 
|---|
|  |  |  | fileJSON.put("url", resourcePath + key); | 
|---|
|  |  |  | fileJSON.put("imgaddr", tempFileName); | 
|---|
|  |  |  | fileJSON.put("type", type); | 
|---|
|  |  |  | fileJSON.put("imgname", fileName); | 
|---|
|  |  |  | fileJSON.put("originname", originname); | 
|---|
|  |  |  | context.put("data",fileJSON); | 
|---|