Commit 8d26570c by liulei

APP文件上传

parent 252f053c
......@@ -49,11 +49,6 @@ public class ServiceHPMT001 extends ServiceBase {
try {
String queryMonth = inInfo.getString("queryMonth");
String companyCode = UserSessionUtils.getCompanyCode();
if (StrUtil.isEmpty(companyCode)) {
resultMap.put("status", 403);
resultMap.put("message","票据过期或请求不合法,请重新登录或获取合法权限!");
return resultMap;
}
Map sqlMap = new HashMap();
sqlMap.put("queryMonth", queryMonth);
sqlMap.put("companyCode", companyCode);
......@@ -156,11 +151,6 @@ public class ServiceHPMT001 extends ServiceBase {
try {
String queryMonth = inInfo.getString("queryMonth");
String companyCode = UserSessionUtils.getCompanyCode();
if (StrUtil.isEmpty(companyCode)) {
resultMap.put("status", 403);
resultMap.put("message","票据过期或请求不合法,请重新登录或获取合法权限!");
return resultMap;
}
Map sqlMap = new HashMap();
sqlMap.put("queryMonth", queryMonth);
sqlMap.put("companyCode", companyCode);
......
......@@ -13,6 +13,7 @@ import com.baosight.hpjx.hp.constant.HPSqlConstant;
import com.baosight.hpjx.hp.mt.untils.Base64ToMultipartFile;
import com.baosight.hpjx.hp.mt.untils.Base64Utils;
import com.baosight.hpjx.hp.mt.untils.UploadUtils;
import com.baosight.hpjx.hp.mt.untils.UploadUtils2;
import com.baosight.hpjx.hp.sc.domain.HPSC002A;
import com.baosight.hpjx.hp.sc.domain.HPSC005;
import com.baosight.hpjx.hp.xs.domain.User;
......@@ -72,11 +73,6 @@ public class ServiceHPMT002 extends ServiceBase {
int offset = inInfo.getInt("offset");//当前页
int pageSize = inInfo.getInt("pageSize");//每页条数
String companyCode = UserSessionUtils.getCompanyCode();
if (StrUtil.isEmpty(companyCode)) {
resultMap.put("status", 403);
resultMap.put("message","票据过期或请求不合法,请重新登录或获取合法权限!");
return resultMap;
}
Map sqlMap = new HashMap();
sqlMap.put("companyCode", companyCode);
sqlMap.put("projName", projName);
......@@ -114,11 +110,6 @@ public class ServiceHPMT002 extends ServiceBase {
try {
String projName = inInfo.getString("projName");
String companyCode = UserSessionUtils.getCompanyCode();
if (StrUtil.isEmpty(companyCode)) {
resultMap.put("status", 403);
resultMap.put("message","票据过期或请求不合法,请重新登录或获取合法权限!");
return resultMap;
}
Map sqlMap = new HashMap();
sqlMap.put("companyCode", companyCode);
sqlMap.put("projName", projName);
......@@ -145,11 +136,6 @@ public class ServiceHPMT002 extends ServiceBase {
try {
String queryMonth = inInfo.getString("queryMonth");
String companyCode = UserSessionUtils.getCompanyCode();
if (StrUtil.isEmpty(companyCode)) {
resultMap.put("status", 403);
resultMap.put("message","票据过期或请求不合法,请重新登录或获取合法权限!");
return resultMap;
}
Map sqlMap = new HashMap();
sqlMap.put("companyCode", companyCode);
sqlMap.put("queryMonth", queryMonth);
......@@ -179,11 +165,6 @@ public class ServiceHPMT002 extends ServiceBase {
int offset = inInfo.getInt("offset");//当前页
int pageSize = inInfo.getInt("pageSize");//每页条数
String companyCode = UserSessionUtils.getCompanyCode();
if (StrUtil.isEmpty(companyCode)) {
resultMap.put("status", 403);
resultMap.put("message","票据过期或请求不合法,请重新登录或获取合法权限!");
return resultMap;
}
Map sqlMap = new HashMap();
sqlMap.put("companyCode", companyCode);
sqlMap.put("projName", projName);
......@@ -217,11 +198,6 @@ public class ServiceHPMT002 extends ServiceBase {
try {
String id = inInfo.getString("id");
String companyCode = UserSessionUtils.getCompanyCode();
if (StrUtil.isEmpty(companyCode)) {
resultMap.put("status", 403);
resultMap.put("message","票据过期或请求不合法,请重新登录或获取合法权限!");
return resultMap;
}
String ROOT_PATH= "";
Map hashMap = new HashMap();
hashMap.put("fkey","docRootDir");
......@@ -296,11 +272,6 @@ public class ServiceHPMT002 extends ServiceBase {
String inventCode = inInfo.getString("inventCode");//部件id
String subInventCode = inInfo.getString("subInventCode");//零件id
String companyCode = UserSessionUtils.getCompanyCode();
if (StrUtil.isEmpty(companyCode)) {
resultMap.put("status", 403);
resultMap.put("message","票据过期或请求不合法,请重新登录或获取合法权限!");
return resultMap;
}
Map sqlMap = new HashMap();
sqlMap.put("companyCode", companyCode);
sqlMap.put("factoryCode", factoryId);
......@@ -317,7 +288,7 @@ public class ServiceHPMT002 extends ServiceBase {
List<Map> queryPartCode = this.dao.query("HPMT002.queryPartCode", sqlMap);
List<Map> queryTedcm01 = this.dao.query("HPXSOrg.queryTedcm01",tedcm01);
if(subInventCode!=null&&!subInventCode.equals("")){
List<Map> queryProdTaskNo = this.dao.query("HPMT002.queryProdTaskNo");
List<Map> queryProdTaskNo = this.dao.query("HPMT002.queryProdTaskNo",sqlMap);
resultMap.put("ProdTaskNo",queryProdTaskNo);
}
resultMap.put("Factory",queryFactory);
......@@ -347,11 +318,6 @@ public class ServiceHPMT002 extends ServiceBase {
try {
String docId = inInfo.getString("docId");
String companyCode = UserSessionUtils.getCompanyCode();
if (StrUtil.isEmpty(companyCode)) {
resultMap.put("status", 403);
resultMap.put("message", "票据过期或请求不合法,请重新登录或获取合法权限!");
return resultMap;
}
HPZL001 fZl001 = new HPZL001();
Map attr = inInfo.getAttr();
fZl001.fromMap(attr);
......@@ -411,11 +377,6 @@ public class ServiceHPMT002 extends ServiceBase {
try {
String docId = inInfo.getString("docId");
String companyCode = UserSessionUtils.getCompanyCode();
if (StrUtil.isEmpty(companyCode)) {
resultMap.put("status", 403);
resultMap.put("message", "票据过期或请求不合法,请重新登录或获取合法权限!");
return resultMap;
}
HPZL001 fZl001 = new HPZL001();
Map attr = inInfo.getAttr();
fZl001.fromMap(attr);
......@@ -464,15 +425,9 @@ public class ServiceHPMT002 extends ServiceBase {
Map resultMap = new HashMap();
try {
String files = inInfo.getString("files");
String companyCode = UserSessionUtils.getCompanyCode();
if (StrUtil.isEmpty(companyCode)) {
resultMap.put("status", 403);
resultMap.put("message", "票据过期或请求不合法,请重新登录或获取合法权限!");
return resultMap;
}
CommonsMultipartFile multipartFile = Base64ToMultipartFile.base64toMultipartFile(files);
System.out.println("--------------------------------转换Base64成功");
JSONObject upload = UploadUtils.upload(multipartFile);
JSONObject upload = UploadUtils2.upload(multipartFile);
resultMap.put("id",upload.getString("docId"));
resultMap.put("status", EiConstant.STATUS_SUCCESS);
resultMap.put("message", "SUCCESS");
......
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