Commit e2d5601a by liulei

APP文件上传

parent 1f338b73
......@@ -398,6 +398,7 @@ public class ServiceHPMT002 extends ServiceBase {
try {
CommonsMultipartFile multipartFile = Base64ToMultipartFile.base64toMultipartFile(files);
System.out.println("--------------------------------转换Base64成功");
JSONObject upload = UploadUtils.upload(multipartFile);
inInfo.set("id",upload.getString("docId"));
inInfo.setMsg("上传成功!");
......
......@@ -45,10 +45,12 @@ public class UploadUtils {
filePath = multipartFile.getOriginalFilename();
Long docSize = multipartFile.getSize();
String chgName = transformFileName(filePath);
System.out.println("----------------------------------解析Path");
String attachmentName;
Map<String, String> pathMap = getRealPath("A");
msg = (String)pathMap.get("dirId");
category = (String)pathMap.get("path");
System.out.println("----------------------------------获取dirId成功");
checkInvalidPath(category);
File dir = new File(category);
if (!dir.exists()) {
......@@ -120,6 +122,7 @@ public class UploadUtils {
Map hashMap = new HashMap();
hashMap.put("fkey","docRootDir");
List<Map> query = DaoBase.getInstance().query("EDCC03.query",hashMap);
System.out.println("----------------------------------获取path地址");
if (query.get(0).get("fvalue")!=null) {
ROOT_PATH= (String) query.get(0).get("fvalue");
}
......
......@@ -96,7 +96,7 @@ public class ServiceHPPZ015 extends ServiceBase {
HPPZ015.setProjCode(hpsc001.getProjCode());
HPPZ015.setTemplateName(inInfo.getString("templateName"));
HPPZ015.setCreatedBy(UserSession.getUserId());
HPPZ015.setCompanyCode(UserSession.getUserId());
HPPZ015.setCompanyCode(UserSessionUtils.getCompanyCode());
HPPZ015.setCreatedName(UserSession.getUserId()+"-"+UserSession.getLoginCName());
HPPZ015.setCreatedTime(sdf.format(new Date()));
HPPZ015.setUpdatedBy(null);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment