新增上架、申请详情统计
This commit is contained in:
parent
7cbdb1c555
commit
4e027e9f04
|
@ -372,4 +372,32 @@ public class CensusController {
|
||||||
return new Result().ok(resourceService.selectDeptDetailTypeCountList(params));
|
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<String, Object> 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<String, Object> params){
|
||||||
|
return new Result().ok(resourceService.selectCensusApplyTable(params));
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -192,4 +192,12 @@ public interface ResourceDao extends BaseDao<ResourceEntity> {
|
||||||
@Param("deptId") Long deptId,
|
@Param("deptId") Long deptId,
|
||||||
@Param("startDate") String startDate,
|
@Param("startDate") String startDate,
|
||||||
@Param("endDate") String endDate);
|
@Param("endDate") String endDate);
|
||||||
|
|
||||||
|
List<Map> selectCensusResourceTable(@Param("delFlags") List<Integer> delFlags,
|
||||||
|
@Param("deptId") Long deptId,
|
||||||
|
@Param("type") String type,
|
||||||
|
@Param("startDate") String startDate,
|
||||||
|
@Param("endDate") String endDate);
|
||||||
|
|
||||||
|
List<Map> selectCensusApplyTable(Map params);
|
||||||
}
|
}
|
|
@ -142,4 +142,8 @@ public interface ResourceService extends CrudService<ResourceEntity, ResourceDTO
|
||||||
Object selectApplyDeptDetailTypeCountList(Map params);
|
Object selectApplyDeptDetailTypeCountList(Map params);
|
||||||
|
|
||||||
Object selectDeptDetailTypeCountList(Map params);
|
Object selectDeptDetailTypeCountList(Map params);
|
||||||
|
|
||||||
|
Object selectCensusResourceTable(Map params);
|
||||||
|
|
||||||
|
Object selectCensusApplyTable(Map params);
|
||||||
}
|
}
|
|
@ -2025,7 +2025,10 @@ public class ResourceServiceImpl extends CrudServiceImpl<ResourceDao, ResourceEn
|
||||||
public Object selectDeptDetailTypeCountList(Map params) {
|
public Object selectDeptDetailTypeCountList(Map params) {
|
||||||
String startDate= (String) params.get("startDate");
|
String startDate= (String) params.get("startDate");
|
||||||
String endDate= (String) params.get("endDate");
|
String endDate= (String) params.get("endDate");
|
||||||
Long deptId= Long.parseLong((String) params.get("deptId"));
|
Long deptId=null;
|
||||||
|
if(params.get("deptId") != null){
|
||||||
|
deptId= Long.parseLong((String) params.get("deptId"));
|
||||||
|
}
|
||||||
List<Integer> delFlags=new ArrayList<>();
|
List<Integer> delFlags=new ArrayList<>();
|
||||||
if(params.get("approveStatus") != null){
|
if(params.get("approveStatus") != null){
|
||||||
if("审核完成".equals(params.get("approveStatus"))){
|
if("审核完成".equals(params.get("approveStatus"))){
|
||||||
|
@ -2051,4 +2054,34 @@ public class ResourceServiceImpl extends CrudServiceImpl<ResourceDao, ResourceEn
|
||||||
return resultList;
|
return resultList;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Object selectCensusResourceTable(Map params){
|
||||||
|
String startDate= (String) params.get("startDate");
|
||||||
|
String endDate= (String) params.get("endDate");
|
||||||
|
Long deptId=null;
|
||||||
|
if(params.get("deptId") != null){
|
||||||
|
deptId= Long.parseLong((String) params.get("deptId"));
|
||||||
|
}
|
||||||
|
String type= (String) params.get("type");
|
||||||
|
List<Integer> 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);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
|
@ -1761,4 +1761,57 @@
|
||||||
tdr.dept_id,
|
tdr.dept_id,
|
||||||
tdr.type
|
tdr.type
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
<select id="selectCensusResourceTable" resultType="java.util.Map">
|
||||||
|
SELECT sd.name AS deptName, tdr.name AS resourceName, tdr.type, tdr.create_date AS createDate, if(tdr.del_flag=0, '审核通过', '审核中') AS approveStatus
|
||||||
|
FROM (SELECT IF(d.type='组件服务', A.attr_value, d.type) AS type, d.id, d.del_flag, d.dept_id, d.create_date, d.name
|
||||||
|
FROM tb_data_resource d LEFT JOIN tb_data_attr a ON d.id=a.data_resource_id AND a.attr_type='组件类型' AND a.del_flag=0
|
||||||
|
WHERE d.type NOT IN ('知识库','基础设施','数据资源')) tdr,
|
||||||
|
sys_dept sd
|
||||||
|
WHERE 1=1 AND tdr.dept_id=sd.id
|
||||||
|
<if test="null != delFlags">
|
||||||
|
AND tdr.del_flag in
|
||||||
|
<foreach item="delFlag" collection="delFlags" open="(" separator="," close=")">
|
||||||
|
#{delFlag}
|
||||||
|
</foreach>
|
||||||
|
</if>
|
||||||
|
<if test="deptId != null and deptId != ''">
|
||||||
|
AND sd.id = #{deptId}
|
||||||
|
</if>
|
||||||
|
<if test="type != null and type != ''">
|
||||||
|
AND tdr.type = #{type}
|
||||||
|
</if>
|
||||||
|
<if test="startDate != null and startDate != '' and endDate != null and endDate != ''">
|
||||||
|
AND SUBSTR(tdr.create_date, 1, 10) BETWEEN #{startDate} AND #{endDate}
|
||||||
|
</if>
|
||||||
|
ORDER BY tdr.create_date DESC
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<select id="selectCensusApplyTable" resultType="java.util.Map">
|
||||||
|
SELECT sd.name AS deptName, tdr.name AS resourceName, tdr.type, taa.create_date AS createDate, taa.approve_status AS approveStatus
|
||||||
|
FROM (SELECT IF(d.type='组件服务', A.attr_value, d.type) AS type, d.id, d.del_flag, d.dept_id, d.create_date, d.name
|
||||||
|
FROM tb_data_resource d LEFT JOIN tb_data_attr a ON d.id=a.data_resource_id AND a.attr_type='组件类型' AND a.del_flag=0
|
||||||
|
WHERE d.type NOT IN ('知识库','基础设施','数据资源')) tdr,
|
||||||
|
sys_dept sd,
|
||||||
|
sys_user su,
|
||||||
|
t_ability_application taa
|
||||||
|
WHERE 1 = 1
|
||||||
|
AND tdr.del_flag = 0
|
||||||
|
AND taa.user_id = su.id
|
||||||
|
AND su.dept_id = sd.id
|
||||||
|
AND taa.resource_id = tdr.id
|
||||||
|
<if test="approveStatus != null and approveStatus != ''">
|
||||||
|
AND taa.approve_status = #{approveStatus}
|
||||||
|
</if>
|
||||||
|
<if test="deptId != null and deptId != ''">
|
||||||
|
AND sd.id = #{deptId}
|
||||||
|
</if>
|
||||||
|
<if test="type != null and type != ''">
|
||||||
|
AND tdr.type = #{type}
|
||||||
|
</if>
|
||||||
|
<if test="startDate != null and startDate != '' and endDate != null and endDate != ''">
|
||||||
|
AND SUBSTR(taa.create_date, 1, 10) BETWEEN #{startDate} AND #{endDate}
|
||||||
|
</if>
|
||||||
|
ORDER BY taa.create_date DESC
|
||||||
|
</select>
|
||||||
</mapper>
|
</mapper>
|
Loading…
Reference in New Issue