|
|
@@ -2,16 +2,25 @@ package com.cnd3b.restcontroller.enterprise.tagentauth;
|
|
|
|
|
|
import com.alibaba.fastjson.JSONArray;
|
|
|
import com.alibaba.fastjson.JSONObject;
|
|
|
+import com.aliyun.oss.model.PutObjectRequest;
|
|
|
import com.cnd3b.common.Controller;
|
|
|
import com.cnd3b.common.data.Row;
|
|
|
import com.cnd3b.common.data.Rows;
|
|
|
import com.cnd3b.common.data.SQLFactory;
|
|
|
+import com.cnd3b.common.parameter.parameter;
|
|
|
+import com.cnd3b.restcontroller.system.system.uploadExcelData;
|
|
|
+import com.cnd3b.utility.qywechat.base.Parameter;
|
|
|
import p2.common.parse.S;
|
|
|
import p2.pao.PaoRemote;
|
|
|
import p2.pao.PaoSetRemote;
|
|
|
import p2.util.P2Exception;
|
|
|
|
|
|
+import java.io.ByteArrayInputStream;
|
|
|
+import java.io.InputStream;
|
|
|
import java.util.ArrayList;
|
|
|
+import java.util.Base64;
|
|
|
+
|
|
|
+import static com.cnd3b.utility.aliyun.oss.AliyunOSSUtil.BUCKE_NAME_1;
|
|
|
|
|
|
public class tagentauth extends Controller {
|
|
|
/**
|
|
|
@@ -133,4 +142,26 @@ public class tagentauth extends Controller {
|
|
|
Rows rows = sqlFactory.runSqlQuery();
|
|
|
return getSucReturnObject().setDataByPaging(rows).preloading(1).toString();
|
|
|
}
|
|
|
+
|
|
|
+ /**
|
|
|
+ * µ¼Èëexcel
|
|
|
+ *
|
|
|
+ * @return
|
|
|
+ */
|
|
|
+ public String upLoadExcel() {
|
|
|
+ String base64Str = content.getString("byteStr");
|
|
|
+ if (base64Str.length() == 0) {
|
|
|
+ return getErrReturnObject().setErrMsg("ÎļþΪ¿Õ").toString();
|
|
|
+ }
|
|
|
+ byte[] byteStr = Base64.getDecoder().decode(base64Str);
|
|
|
+ JSONObject content = new JSONObject();
|
|
|
+ content.put("tuserid", parameter.tuserid);
|
|
|
+ uploadExcelData uploadExcelData = new uploadExcelData(content);
|
|
|
+ InputStream input = new ByteArrayInputStream(byteStr);
|
|
|
+ ;
|
|
|
+
|
|
|
+ return uploadExcelData.upLoadExcel2(input);
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
}
|