提交 28faf626 authored 作者: 许俊's avatar 许俊

修改

上级 c67d2e30
...@@ -108,6 +108,19 @@ ...@@ -108,6 +108,19 @@
</dependency> </dependency>
</dependencies> </dependencies>
</plugin>--> </plugin>-->
<plugin>
<groupId>com.github.wvengen</groupId>
<artifactId>proguard-maven-plugin</artifactId>
<dependencies>
<dependency>
<groupId>webapi</groupId>
<artifactId>k3cloud-webapi-client</artifactId>
<scope>system</scope>
<version>1.0</version>
<systemPath>${project.basedir}/src/main/resources/lib/k3cloud-webapi-client.jar</systemPath>
</dependency>
</dependencies>
</plugin>
</plugins> </plugins>
</build> </build>
</project> </project>
\ No newline at end of file
/*
package org.jeecg.modules.iost.API.Dao; package org.jeecg.modules.iost.API.Dao;
import kingdee.bos.webapi.client.K3CloudApiClient; import kingdee.bos.webapi.client.K3CloudApiClient;
...@@ -18,30 +18,30 @@ public class CategoryDao { ...@@ -18,30 +18,30 @@ public class CategoryDao {
static String pwd = "Kingdee$2021"; static String pwd = "Kingdee$2021";
static int lang = 2052; static int lang = 2052;
private String Stringwhere(Map<String,String> map){ private String Stringwhere(Map<String, String> map) {
String where = null; String where = null;
for (String key : map.keySet()) { for (String key : map.keySet()) {
String value = String.valueOf(map.get(key)); String value = String.valueOf(map.get(key));
if(value!=null && value!="") { if (value != null && value != "") {
if (where!=null){ if (where != null) {
where = where + " AND " + key + "=" + value; where = where + " AND " + key + "=" + value;
}else { } else {
where = key + "='" + value+"'"; where = key + "='" + value + "'";
} }
} }
} }
if (where!=null){ if (where != null) {
return ",\"FilterString\":\""+where+"\""; return ",\"FilterString\":\"" + where + "\"";
} }
return ""; return "";
} }
*/
/** /**
* 查询日期 * 查询日期
* @param map * @param map
* @return * @return
*//* */
private String Stringwheredate(Map<String, String> map,String date) { private String Stringwheredate(Map<String, String> map,String date) {
String where = null; String where = null;
...@@ -81,12 +81,12 @@ public class CategoryDao { ...@@ -81,12 +81,12 @@ public class CategoryDao {
return ""; return "";
} }
*/
/** /**
* 查询单据体 * 查询单据体
* @return * @return
* @throws Exception * @throws Exception
*//* */
K3CloudApiClient client = new K3CloudApiClient(K3CloudURL); K3CloudApiClient client = new K3CloudApiClient(K3CloudURL);
public List<List<Object>> select(String sFormId, Map<String,String> key,Map<String,String> where){ public List<List<Object>> select(String sFormId, Map<String,String> key,Map<String,String> where){
...@@ -109,14 +109,14 @@ public class CategoryDao { ...@@ -109,14 +109,14 @@ public class CategoryDao {
} }
*/
/** /**
* 查询日期 * 查询日期
* @param sFormId * @param sFormId
* @param key * @param key
* @param where * @param where
* @return * @return
*//* */
public List<List<Object>> selectdate(String sFormId, Map<String, String> key, Map<String, String> where,String date) { public List<List<Object>> selectdate(String sFormId, Map<String, String> key, Map<String, String> where,String date) {
...@@ -176,18 +176,18 @@ public class CategoryDao { ...@@ -176,18 +176,18 @@ public class CategoryDao {
String dateString = formatter.format(Ysterdayzerotime); String dateString = formatter.format(Ysterdayzerotime);
String content="FCreateDate >"+"\'"+"2021-06-21 00:00:00"+"\'"+" AND FCreateDate < "+"\'"+dateString+"\'"; String content="FCreateDate >"+"\'"+"2021-06-21 00:00:00"+"\'"+" AND FCreateDate < "+"\'"+dateString+"\'";
*/
/* String content="FCreateDate >"+"\'"+dateString1+"\'"+" AND FCreateDate < "+"\'"+dateString+"\'";*//* /* String content="FCreateDate >"+"\'"+dateString1+"\'"+" AND FCreateDate < "+"\'"+dateString+"\'";*/
return ",\"FilterString\":\""+content+"\""; return ",\"FilterString\":\""+content+"\"";
} }
*/
/** /**
* 查询单据体-查询今日之内的数据-返回星空云请求数据和响应信息 * 查询单据体-查询今日之内的数据-返回星空云请求数据和响应信息
* @return * @return
* @throws * @throws
*//* */
public List<Object> selectTodayAndReturn(String sFormId, Map<String,String> key){ public List<Object> selectTodayAndReturn(String sFormId, Map<String,String> key){
List<List<Object>> list = null; List<List<Object>> list = null;
...@@ -303,4 +303,4 @@ public class CategoryDao { ...@@ -303,4 +303,4 @@ public class CategoryDao {
return list; return list;
} }
} }
*/
package org.jeecg.modules.iost.basedata.controller;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.jeecg.common.aspect.annotation.AutoLog;
import org.springframework.http.HttpHeaders;
import org.springframework.http.HttpStatus;
import org.springframework.http.ResponseEntity;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import javax.servlet.http.HttpServletRequest;
import java.io.File;
import java.io.FileInputStream;
import java.io.IOException;
import java.io.InputStream;
@Api(tags = "APK")
@Component
@RequestMapping("/basedata/DownLoadApk")
public class DownLoadController {
/*下载APK*/
@AutoLog(value = "下载APK")
@ApiOperation(value = "下载APK", notes = "下载APK")
@RequestMapping("/download")
public ResponseEntity<byte[]> download(HttpServletRequest request) throws IOException {
String property = System.getProperty("user.dir");
//读取文件 jeecg-boot-module-system\src\main\resources\res\test.apk
File file = new File(property+"\\jeecg-boot-module-system\\src\\main\\resources\\res\\test.apk");
byte[] body = null;
InputStream is = new FileInputStream(file);
body = new byte[is.available()];
is.read(body);
HttpHeaders headers = new HttpHeaders();
//设置文件头
headers.add("Content-Disposition", "attchement;filename=" + new String("test.apk".getBytes("gb2312"), "ISO8859-1"));
HttpStatus statusCode = HttpStatus.OK;
ResponseEntity<byte[]> entity = new ResponseEntity<byte[]>(body, headers, statusCode);
return entity;
}
}
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论