|
|
@@ -19,7 +19,6 @@ import java.io.BufferedReader;
|
|
|
import java.io.File;
|
|
|
import java.io.IOException;
|
|
|
import java.io.InputStreamReader;
|
|
|
-import java.net.http.HttpResponse;
|
|
|
import java.util.ArrayList;
|
|
|
import java.util.HashMap;
|
|
|
import java.util.List;
|
|
|
@@ -32,7 +31,7 @@ import java.util.Map;
|
|
|
public class ThematicImpl implements ThematicService {
|
|
|
//默认参数配置
|
|
|
private Integer page_default = 1; //页码
|
|
|
- private Integer limit_default = 100; //每页条数
|
|
|
+ private Integer limit_default = 10; //每页条数
|
|
|
@Resource
|
|
|
private ThematicMapper thematicMapper;
|
|
|
@Value("${temp}")
|
|
|
@@ -49,7 +48,6 @@ public class ThematicImpl implements ThematicService {
|
|
|
private FzssFxrwrzHandleService fzssFxrwrzHandleService;
|
|
|
|
|
|
|
|
|
-
|
|
|
@Override
|
|
|
public R<Object> list(String name, String rwlx, Integer page, Integer limit) {
|
|
|
try {
|
|
|
@@ -77,14 +75,17 @@ public class ThematicImpl implements ThematicService {
|
|
|
try {
|
|
|
List<ThematicTask> datas = thematicMapper.list(null, null, null, null, id);
|
|
|
if (datas != null && datas.size() > 0) {
|
|
|
- thematicMapper.drop(id);
|
|
|
if ("1".equals(type)) { //仅删除任务记录
|
|
|
-
|
|
|
+ thematicMapper.drop(id);
|
|
|
} else if ("2".equals(type)) { //删除任务记录和制图成果
|
|
|
- String filepath = thematicMapper.productFile(id);
|
|
|
- File file = new File(filepath);
|
|
|
- org.apache.commons.io.FileUtils.deleteDirectory(file.getParentFile());
|
|
|
- thematicMapper.productDelete(id);
|
|
|
+ thematicMapper.drop(id);
|
|
|
+ List<ThematicDetails> details = thematicMapper.productlist(null, id, 0, 1000);
|
|
|
+ for (ThematicDetails cur : details) {
|
|
|
+ String filepath = thematicMapper.productFile(cur.getId());
|
|
|
+ File file = new File(filepath);
|
|
|
+ org.apache.commons.io.FileUtils.deleteDirectory(file.getParentFile());
|
|
|
+ thematicMapper.productDelete(cur.getId());
|
|
|
+ }
|
|
|
}
|
|
|
} else {
|
|
|
return R.fail("id参数有误!");
|
|
|
@@ -97,10 +98,10 @@ public class ThematicImpl implements ThematicService {
|
|
|
}
|
|
|
|
|
|
@Override
|
|
|
- public R<Object> launch(String name, String rwlx, String ztfw, String ztry) {
|
|
|
+ public R<Object> launch(String name, String rwlx, String ztfw, String ztry, String ztdw) {
|
|
|
String uuid = StringUtils.getUUID();
|
|
|
// 插入制图任务表
|
|
|
- thematicMapper.addRw(uuid, name, rwlx, ztfw, ztry);
|
|
|
+ thematicMapper.addRw(uuid, name, rwlx, ztfw, ztry, ztdw);
|
|
|
fzssFxrwrzHandleService.insertFxrwrz(uuid, "地籍制图", "任务创建成功", "info");
|
|
|
|
|
|
// 判断需要执行的python脚本
|
|
|
@@ -167,7 +168,7 @@ public class ThematicImpl implements ThematicService {
|
|
|
if (limit == null) {
|
|
|
limit = limit_default;
|
|
|
}
|
|
|
- limit = limit_default;
|
|
|
+ //limit = limit_default;
|
|
|
Integer offset = (page - 1) * limit;
|
|
|
name = ""; //todo 这里先清空名称查询条件,避免统计数量错误
|
|
|
List<ThematicDetails> datas = thematicMapper.productlist(name, taskid, offset, limit);
|