From 6f30b5c886cd05081d6250eb0506816fb2ac80ec Mon Sep 17 00:00:00 2001
From: lidongdong <1459917685@qq.com>
Date: 星期二, 22 十一月 2022 14:11:30 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/huacheng_test' into huacheng_test
---
flower_city/src/main/java/com/dg/core/controller/TransactionEventController.java | 25 +++++++++++++++++++------
1 files changed, 19 insertions(+), 6 deletions(-)
diff --git a/flower_city/src/main/java/com/dg/core/controller/TransactionEventController.java b/flower_city/src/main/java/com/dg/core/controller/TransactionEventController.java
index 96f601b..f58bfe8 100644
--- a/flower_city/src/main/java/com/dg/core/controller/TransactionEventController.java
+++ b/flower_city/src/main/java/com/dg/core/controller/TransactionEventController.java
@@ -78,15 +78,25 @@
@RequestParam(value = "pageSize",required = false) Integer pageSize,
@RequestParam(value = "keyword",required = false) String keyword,
@RequestParam(value = "classifyGrade",required = false) String classifyGrade,
+ @RequestParam(value = "departmentId",required = false) String departmentId,
@CurrentUser SysUser sysUser)
{
Assert.notNull(pageNum, "pageNum 不能为空");
Assert.notNull(pageSize, "pageSize 不能为空");
Page<TransactionEvent> pageParam = new Page<>(pageNum,pageSize);
-// List<String> ids=iOrganizationChartService.getIds(sysUser.getDepartmentId());
- List<TransactionEvent> list = iTransactionEventService.selectConfigList(pageParam,pageSize,keyword,
+ List<TransactionEvent> list;
+ int num;
+ if (departmentId!=null&&departmentId.length()>0){
+ List<String> ids=iOrganizationChartService.getDepartmentId(departmentId);
+ list = iTransactionEventService.selectConfigList(pageParam,pageSize,keyword,
+ classifyGrade,ids);
+ num=iTransactionEventService.countNum(keyword,classifyGrade,ids);
+
+ }else {
+ list = iTransactionEventService.selectConfigList(pageParam,pageSize,keyword,
classifyGrade,null);
- int num=iTransactionEventService.countNum(keyword,classifyGrade,null);
+ num=iTransactionEventService.countNum(keyword,classifyGrade,null);
+ }
return getDataTable(list,num);
}
@@ -101,7 +111,10 @@
public TableDataInfo<TransactionEvent> selectConfigList(@RequestBody List<String> DepartmentId,
@CurrentUser SysUser sysUser)
{
-// List<String> ids=iOrganizationChartService.getIds(DepartmentId);
+ if(DepartmentId==null||DepartmentId.size()<1)
+ {
+ DepartmentId=null;
+ }
List<TransactionEvent> list = iTransactionEventService.selectConfigList(null,null,DepartmentId);
int num=iTransactionEventService.countNum(null,null,DepartmentId);
return getDataTable(list,num);
@@ -225,7 +238,7 @@
@GetMapping("/queryByClassifyIdConfigList")
public TableDataInfo queryByClassifyIdConfigList(@RequestParam(value = "pageNum",required = false) Integer pageNum,
@RequestParam(value = "pageSize",required = false) Integer pageSize,
- @RequestParam("classifyId") String classifyId,
+ @RequestParam(value = "classifyId",required = false) String classifyId,
@RequestParam(required = false,name="departmentId") Integer departmentId){
Assert.notNull(pageNum, "pageNum 不能为空");
Assert.notNull(pageSize, "pageSize 不能为空");
@@ -333,7 +346,7 @@
{
boolean a = false;
String fileName = file.getOriginalFilename();
- Integer b = iTransactionEventService.batchImport(fileName, file);
+ Integer b = iTransactionEventService.batchImport(fileName, file);
if (b == 3) {//
return ResultData.success("全部导入成功");//全部导入成功
} else if (b == 2) {
--
Gitblit v1.7.1