提交 e2d2e595 authored 作者: kxjia's avatar kxjia

修改存档功能

上级 738d9d93
...@@ -283,11 +283,13 @@ public class BaosongTaskAllocController extends JeecgController<BaosongTaskAlloc ...@@ -283,11 +283,13 @@ public class BaosongTaskAllocController extends JeecgController<BaosongTaskAlloc
for (BaosongTaskAlloc alloc : allocTplList) { for (BaosongTaskAlloc alloc : allocTplList) {
tplIdSet.add(alloc.getItemid()); tplIdSet.add(alloc.getItemid());
} }
if(tplIdSet.size()>0) {
List<BaosongTplItem> itemList = baosongTplItemService.lambdaQuery() List<BaosongTplItem> itemList = baosongTplItemService.lambdaQuery()
.in(BaosongTplItem::getId,tplIdSet) .in(BaosongTplItem::getId, tplIdSet)
.list(); .list();
for (BaosongTplItem item : itemList) { for (BaosongTplItem item : itemList) {
retCodeSet.add(item.getPcode()+"_"+item.getCode()); retCodeSet.add(item.getPcode() + "_" + item.getCode());
}
} }
return Result.OK(retCodeSet); return Result.OK(retCodeSet);
} catch (Exception e) { } catch (Exception e) {
......
...@@ -65,13 +65,28 @@ public class BaosongTaskController extends JeecgController<BaosongTask, IBaosong ...@@ -65,13 +65,28 @@ public class BaosongTaskController extends JeecgController<BaosongTask, IBaosong
@RequestParam(name="pageSize", defaultValue="10") Integer pageSize, @RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
HttpServletRequest req) { HttpServletRequest req) {
QueryWrapper<BaosongTask> queryWrapper = QueryGenerator.initQueryWrapper(baosongTask, req.getParameterMap()); QueryWrapper<BaosongTask> queryWrapper = QueryGenerator.initQueryWrapper(baosongTask, req.getParameterMap());
queryWrapper.ne("sta",9);
Page<BaosongTask> page = new Page<BaosongTask>(pageNo, pageSize); Page<BaosongTask> page = new Page<BaosongTask>(pageNo, pageSize);
IPage<BaosongTask> pageList = baosongTaskService.page(page, queryWrapper); IPage<BaosongTask> pageList = baosongTaskService.page(page, queryWrapper);
setStaValue (baosongTask,pageList.getRecords()); setStaValue (baosongTask,pageList.getRecords());
return Result.OK(pageList); return Result.OK(pageList);
} }
@GetMapping(value = "/archiveList")
public Result<IPage<BaosongTask>> archiveList(BaosongTask baosongTask,
@RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
@RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
HttpServletRequest req) {
QueryWrapper<BaosongTask> queryWrapper = QueryGenerator.initQueryWrapper(baosongTask, req.getParameterMap());
queryWrapper.eq("sta",9);
Page<BaosongTask> page = new Page<BaosongTask>(pageNo, pageSize);
IPage<BaosongTask> pageList = baosongTaskService.page(page, queryWrapper);
return Result.OK(pageList);
}
@GetMapping(value = "/listForFillData") @GetMapping(value = "/listForFillData")
public Result<IPage<BaosongTask>> listForFillData(BaosongTask baosongTask, public Result<IPage<BaosongTask>> listForFillData(BaosongTask baosongTask,
@RequestParam(name="pageNo", defaultValue="1") Integer pageNo, @RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
......
...@@ -92,6 +92,7 @@ public class BaosongTaskReviewController extends JeecgController<BaosongTaskRevi ...@@ -92,6 +92,7 @@ public class BaosongTaskReviewController extends JeecgController<BaosongTaskRevi
return Result.OK(pageList); return Result.OK(pageList);
} }
/** /**
* 添加 * 添加
* *
...@@ -203,6 +204,9 @@ public class BaosongTaskReviewController extends JeecgController<BaosongTaskRevi ...@@ -203,6 +204,9 @@ public class BaosongTaskReviewController extends JeecgController<BaosongTaskRevi
Integer tplId = taskReview.getTplid(); Integer tplId = taskReview.getTplid();
Integer taskId = taskReview.getTaskid(); Integer taskId = taskReview.getTaskid();
List<TaskRecordVo> list = baosongTaskReviewService.queryTaskRecordForXml(taskReview); List<TaskRecordVo> list = baosongTaskReviewService.queryTaskRecordForXml(taskReview);
if(list==null||list.size()==0){
return Result.error("未查询到数据");
};
BaosongTpl baosongTpl = baosongTplService.getById(tplId); BaosongTpl baosongTpl = baosongTplService.getById(tplId);
BaosongTask baosongTask = baosongTaskService.getById(taskId); BaosongTask baosongTask = baosongTaskService.getById(taskId);
try { try {
...@@ -217,7 +221,7 @@ public class BaosongTaskReviewController extends JeecgController<BaosongTaskRevi ...@@ -217,7 +221,7 @@ public class BaosongTaskReviewController extends JeecgController<BaosongTaskRevi
} catch (Exception e) { } catch (Exception e) {
e.printStackTrace(); e.printStackTrace();
} }
return null; return Result.error("未知错误");
} }
private static void saveDocumentToFile(Document document, String filePath) { private static void saveDocumentToFile(Document document, String filePath) {
...@@ -252,7 +256,11 @@ public class BaosongTaskReviewController extends JeecgController<BaosongTaskRevi ...@@ -252,7 +256,11 @@ public class BaosongTaskReviewController extends JeecgController<BaosongTaskRevi
} }
private String getReportFilePath(BaosongTaskReview taskReview) { private String getReportFilePath(BaosongTaskReview taskReview) {
String strPath = "/baosong/report/"+taskReview.getTaskname()+"-"+taskReview.getTplname()+".xml"; String taskName = taskReview.getTaskname();
taskName = taskName==null?taskReview.getTaskid().toString():taskName;
String tplName = taskReview.getTplname();
tplName = tplName==null?taskReview.getTplid().toString():tplName;
String strPath = "/baosong/report/"+taskName+"-"+tplName+".xml";
return strPath; return strPath;
} }
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论