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