From 4e027e9f04bfc54e1daa5243510d6e9c5c0e003d Mon Sep 17 00:00:00 2001 From: lizhicheng Date: Wed, 14 Sep 2022 17:09:13 +0800 Subject: [PATCH] =?UTF-8?q?=E6=96=B0=E5=A2=9E=E4=B8=8A=E6=9E=B6=E3=80=81?= =?UTF-8?q?=E7=94=B3=E8=AF=B7=E8=AF=A6=E6=83=85=E7=BB=9F=E8=AE=A1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../common/controller/CensusController.java | 28 ++++++++++ .../modules/resource/dao/ResourceDao.java | 8 +++ .../resource/service/ResourceService.java | 4 ++ .../service/impl/ResourceServiceImpl.java | 35 +++++++++++- .../resources/mapper/resource/ResourceDao.xml | 53 +++++++++++++++++++ 5 files changed, 127 insertions(+), 1 deletion(-) diff --git a/renren-admin/src/main/java/io/renren/common/controller/CensusController.java b/renren-admin/src/main/java/io/renren/common/controller/CensusController.java index 606c6aa7..6658fb0d 100644 --- a/renren-admin/src/main/java/io/renren/common/controller/CensusController.java +++ b/renren-admin/src/main/java/io/renren/common/controller/CensusController.java @@ -372,4 +372,32 @@ public class CensusController { return new Result().ok(resourceService.selectDeptDetailTypeCountList(params)); } + @GetMapping("/selectCensusResourceTable") + @ApiOperation("查询部门上架资源及审批结果详细信息") + @LogOperation("查询部门上架资源及审批结果详细信息") + @ApiImplicitParams({ + @ApiImplicitParam(name = "startDate", value = "开始时间", paramType = "query", dataType = "String"), + @ApiImplicitParam(name = "endDate", value = "结束时间", paramType = "query", dataType = "String"), + @ApiImplicitParam(name = "type", value = "资源类型", paramType = "query", dataType = "String"), + @ApiImplicitParam(name = "deptId", value = "所属部门", paramType = "query", dataType = "long"), + @ApiImplicitParam(name = "approveStatus", value = "审核状态", paramType = "query", dataType = "String"), + }) + public Result selectCensusResourceTable(@RequestParam Map params){ + return new Result().ok(resourceService.selectCensusResourceTable(params)); + } + + @GetMapping("/selectCensusApplyTable") + @ApiOperation("查询部门申请资源及审批结果详细信息") + @LogOperation("查询部门申请资源及审批结果详细信息") + @ApiImplicitParams({ + @ApiImplicitParam(name = "startDate", value = "开始时间", paramType = "query", dataType = "String"), + @ApiImplicitParam(name = "endDate", value = "结束时间", paramType = "query", dataType = "String"), + @ApiImplicitParam(name = "type", value = "资源类型", paramType = "query", dataType = "String"), + @ApiImplicitParam(name = "deptId", value = "所属部门", paramType = "query", dataType = "long"), + @ApiImplicitParam(name = "approveStatus", value = "审核状态", paramType = "query", dataType = "String"), + }) + public Result selectCensusApplyTable(@RequestParam Map params){ + return new Result().ok(resourceService.selectCensusApplyTable(params)); + } + } diff --git a/renren-admin/src/main/java/io/renren/modules/resource/dao/ResourceDao.java b/renren-admin/src/main/java/io/renren/modules/resource/dao/ResourceDao.java index d32053eb..c52428d9 100644 --- a/renren-admin/src/main/java/io/renren/modules/resource/dao/ResourceDao.java +++ b/renren-admin/src/main/java/io/renren/modules/resource/dao/ResourceDao.java @@ -192,4 +192,12 @@ public interface ResourceDao extends BaseDao { @Param("deptId") Long deptId, @Param("startDate") String startDate, @Param("endDate") String endDate); + + List selectCensusResourceTable(@Param("delFlags") List delFlags, + @Param("deptId") Long deptId, + @Param("type") String type, + @Param("startDate") String startDate, + @Param("endDate") String endDate); + + List selectCensusApplyTable(Map params); } \ No newline at end of file diff --git a/renren-admin/src/main/java/io/renren/modules/resource/service/ResourceService.java b/renren-admin/src/main/java/io/renren/modules/resource/service/ResourceService.java index 3c0510d3..dc2d9411 100644 --- a/renren-admin/src/main/java/io/renren/modules/resource/service/ResourceService.java +++ b/renren-admin/src/main/java/io/renren/modules/resource/service/ResourceService.java @@ -142,4 +142,8 @@ public interface ResourceService extends CrudService delFlags=new ArrayList<>(); if(params.get("approveStatus") != null){ if("审核完成".equals(params.get("approveStatus"))){ @@ -2051,4 +2054,34 @@ public class ResourceServiceImpl extends CrudServiceImpl delFlags=new ArrayList<>(); + if(params.get("approveStatus") != null){ + if("审核完成".equals(params.get("approveStatus"))){ + delFlags.add(0); + }else if("审核中".equals(params.get("approveStatus"))){ + delFlags.add(2); + delFlags.add(3); + } + }else { + delFlags.add(0); + delFlags.add(2); + delFlags.add(3); + } + return resourceDao.selectCensusResourceTable(delFlags, deptId, type, startDate, endDate); + } + + @Override + public Object selectCensusApplyTable(Map params){ + return resourceDao.selectCensusApplyTable(params); + } + } \ No newline at end of file diff --git a/renren-admin/src/main/resources/mapper/resource/ResourceDao.xml b/renren-admin/src/main/resources/mapper/resource/ResourceDao.xml index fdb83a31..9e0a2c9e 100644 --- a/renren-admin/src/main/resources/mapper/resource/ResourceDao.xml +++ b/renren-admin/src/main/resources/mapper/resource/ResourceDao.xml @@ -1761,4 +1761,57 @@ tdr.dept_id, tdr.type + + + + \ No newline at end of file