diff --git a/src/main/java/com/zcloud/controller/bus/CorpInfoController.java b/src/main/java/com/zcloud/controller/bus/CorpInfoController.java index b731e4b2..9bbb42b6 100644 --- a/src/main/java/com/zcloud/controller/bus/CorpInfoController.java +++ b/src/main/java/com/zcloud/controller/bus/CorpInfoController.java @@ -7,6 +7,9 @@ import java.util.HashMap; import java.util.List; import java.util.Map; +import com.alibaba.fastjson.JSON; +import com.alibaba.fastjson.JSONObject; +import com.google.gson.JsonObject; import com.zcloud.aspect.DockAnnotation; import com.zcloud.service.bus.CorpInfoRelatedService; import com.zcloud.service.system.DictionariesService; @@ -164,7 +167,7 @@ public class CorpInfoController extends BaseController { @RequestMapping(value="/edit", headers = "content-type=multipart/form-data") @ResponseBody @Transactional - @DockAnnotation(hasAnnex = true) + @DockAnnotation public Object edit( @RequestParam(value="imgFiles",required=false) MultipartFile[] imgFiles, @RequestParam(value="fourFiles",required=false) MultipartFile[] fourFiles) throws Exception{ @@ -200,7 +203,8 @@ public class CorpInfoController extends BaseController { pdNew.put("PASSWORD", new SimpleHash("SHA-1", pd.getString("CORP_NAME"), Const.DEFAULT_PASSWORD).toString()); //密码加密 corpinfoService.editCorpUserNew(pdNew); corpinfoService.editCorpdeptNew(pdNew); - map.put("dockData","对接接口"); + pd.put("pdNew",pdNew); + map.put("dockData", JSON.toJSONString(pd)); return map; } @RequestMapping(value="/editIsReceive") @@ -550,15 +554,16 @@ public class CorpInfoController extends BaseController { String ffile = DateUtil.getDays(); String filePath = PathUtil.getProjectpath() + Const.FILEPATHFILE + ffile; //文件上传路径 String fileName = ""; //执0行上传 - + String IMGFILES_ID = this.get32UUID(); if (null != file && !file.isEmpty()) { // String filePath = PathUtil.getProjectpath() +"/"+ Const.FILEPATHYHTP + ffile; //文件上传路径 //fileName = FileUpload.fileUp(file, filePath, this.get32UUID()); //执行上传 fileName = this.get32UUID()+file.getOriginalFilename().substring(file.getOriginalFilename().lastIndexOf(".")); byte[] bytes = file.getBytes(); - Smb.sshSftp(file, fileName,Const.FILEPATHYHTP + ffile); + Smb.sshSftp(file, fileName,Const.FILEPATHYHTP + ffile,IMGFILES_ID, FOREIGN_KEY, TYPE); + } - pd.put("IMGFILES_ID", this.get32UUID()); + pd.put("IMGFILES_ID", IMGFILES_ID ); pd.put("FILEPATH", Const.FILEPATHYHTP + ffile+"/"+fileName); imgfilesService.save(pd); }