diff --git a/renren-admin/src/main/java/io/renren/common/aspect/ActivitiNoticeAspect.java b/renren-admin/src/main/java/io/renren/common/aspect/ActivitiNoticeAspect.java index 5ef40aba..716468d5 100644 --- a/renren-admin/src/main/java/io/renren/common/aspect/ActivitiNoticeAspect.java +++ b/renren-admin/src/main/java/io/renren/common/aspect/ActivitiNoticeAspect.java @@ -362,6 +362,7 @@ public class ActivitiNoticeAspect { LOGGER.error("------------自动审批通过,不通知------------"); return; } + Boolean allowEntrust = Boolean.valueOf(kv.get("allowEntrust") != null ? kv.get("allowEntrust").toString() : Boolean.FALSE.toString()); // 允许被委托他人(特殊通知) String key = null; if (kv.containsKey("id")) { key = kv.getOrDefault("id", "").toString(); @@ -440,7 +441,14 @@ public class ActivitiNoticeAspect { try { SysUserDTO owner = sysUserService.get(Long.valueOf(finalCreator)); - String content = "【通知】" + owner.getRealName() + "发起的流程" + resourceName + activitiNoticeOperation.process() + " 已进入审核节点:" + activitiNoticeOperation.value() + ";当前审核人指派为您"; + String content = "【通知】" + owner.getRealName() + "发起的流程" + resourceName + activitiNoticeOperation.process() + + " 已进入审核节点:" + activitiNoticeOperation.value() + + ";当前审核人指派为您"; + if (allowEntrust) { + content = "【通知】" + owner.getRealName() + "发起的流程" + resourceName + activitiNoticeOperation.process() + + " 已进入审核节点:" + activitiNoticeOperation.value() + + ";因无法分配到审核人,故当前审核人指派为您"; + } Integer type = 10; if ("能力申请流程".equals(activitiNoticeOperation.process())) { type = 1; diff --git a/renren-admin/src/main/java/io/renren/common/dto/AuditingBaseDTO.java b/renren-admin/src/main/java/io/renren/common/dto/AuditingBaseDTO.java index 7c045cc5..40aa6524 100644 --- a/renren-admin/src/main/java/io/renren/common/dto/AuditingBaseDTO.java +++ b/renren-admin/src/main/java/io/renren/common/dto/AuditingBaseDTO.java @@ -47,4 +47,9 @@ public class AuditingBaseDTO implements Serializable { */ private String flowType = null; + /** + * 允许被委托他人(特殊通知) + */ + private Boolean allowEntrust = null; + } diff --git a/renren-admin/src/main/java/io/renren/modules/processForm/listener/v3/ApplyDeptListener.java b/renren-admin/src/main/java/io/renren/modules/processForm/listener/v3/ApplyDeptListener.java index daeaaae4..f2f52dcc 100644 --- a/renren-admin/src/main/java/io/renren/modules/processForm/listener/v3/ApplyDeptListener.java +++ b/renren-admin/src/main/java/io/renren/modules/processForm/listener/v3/ApplyDeptListener.java @@ -129,6 +129,7 @@ public class ApplyDeptListener implements TaskListener, ExecutionListener, Activ } else { logger.error("未查到 {} 对应 " + roleName, deptDTO.getName()); taskService.setAssignee(delegateTask.getId(), defaultAssigneeRoleId); + taskService.setVariable(delegateTask.getId(), "allowEntrust", Boolean.TRUE); // 允许被委托 assignee = defaultAssigneeRoleId; } diff --git a/renren-admin/src/main/java/io/renren/modules/processForm/listener/v3/ApplyDistrictListener.java b/renren-admin/src/main/java/io/renren/modules/processForm/listener/v3/ApplyDistrictListener.java index 6f7134eb..98edbbd6 100644 --- a/renren-admin/src/main/java/io/renren/modules/processForm/listener/v3/ApplyDistrictListener.java +++ b/renren-admin/src/main/java/io/renren/modules/processForm/listener/v3/ApplyDistrictListener.java @@ -111,6 +111,7 @@ public class ApplyDistrictListener implements TaskListener, ExecutionListener, A } else { logger.error("未查到 {} 对应 " + roleName, deptDTO.getName()); taskService.setAssignee(delegateTask.getId(), defaultAssigneeRoleId); + taskService.setVariable(delegateTask.getId(), "allowEntrust", Boolean.TRUE); // 允许被委托 assignee = defaultAssigneeRoleId; } mpComplete(delegateTask, assignee); diff --git a/renren-admin/src/main/java/io/renren/modules/processForm/listener/v3/CityListener.java b/renren-admin/src/main/java/io/renren/modules/processForm/listener/v3/CityListener.java index 7b1115c2..2e395691 100644 --- a/renren-admin/src/main/java/io/renren/modules/processForm/listener/v3/CityListener.java +++ b/renren-admin/src/main/java/io/renren/modules/processForm/listener/v3/CityListener.java @@ -112,6 +112,7 @@ public class CityListener implements TaskListener, ExecutionListener, ActivitiEv } else { logger.error("未查到 {} 对应 " + roleName, deptDTO.getName()); taskService.setAssignee(delegateTask.getId(), defaultAssigneeRoleId); + taskService.setVariable(delegateTask.getId(), "allowEntrust", Boolean.TRUE); // 允许被委托 assignee = defaultAssigneeRoleId; } mpComplete(delegateTask, assignee); diff --git a/renren-admin/src/main/java/io/renren/modules/processForm/listener/v3/CorrectionListenerV3.java b/renren-admin/src/main/java/io/renren/modules/processForm/listener/v3/CorrectionListenerV3.java index 20020f27..6a09caa0 100644 --- a/renren-admin/src/main/java/io/renren/modules/processForm/listener/v3/CorrectionListenerV3.java +++ b/renren-admin/src/main/java/io/renren/modules/processForm/listener/v3/CorrectionListenerV3.java @@ -196,6 +196,7 @@ public class CorrectionListenerV3 implements TaskListener, ExecutionListener, Ac } else { logger.error("未查到该部门 {} 对应的 {}", deptId, roleName); taskService.setAssignee(delegateTask.getId(), defaultAssigneeRoleId); + taskService.setVariable(delegateTask.getId(), "allowEntrust", Boolean.TRUE); // 允许被委托 assignee = defaultAssigneeRoleId; } if (kv.containsKey("tAbilityApplicationDTOList")) { diff --git a/renren-admin/src/main/java/io/renren/modules/processForm/listener/v3/OwnerDistrictListener.java b/renren-admin/src/main/java/io/renren/modules/processForm/listener/v3/OwnerDistrictListener.java index e26afcca..75fe139a 100644 --- a/renren-admin/src/main/java/io/renren/modules/processForm/listener/v3/OwnerDistrictListener.java +++ b/renren-admin/src/main/java/io/renren/modules/processForm/listener/v3/OwnerDistrictListener.java @@ -108,6 +108,7 @@ public class OwnerDistrictListener implements TaskListener, ExecutionListener, A } else { logger.error("未查到 {} 对应 " + roleName, deptDTO.getName()); taskService.setAssignee(delegateTask.getId(), defaultAssigneeRoleId); + taskService.setVariable(delegateTask.getId(), "allowEntrust", Boolean.TRUE); // 允许被委托 assignee = defaultAssigneeRoleId; } mpComplete(delegateTask, assignee); diff --git a/renren-admin/src/main/java/io/renren/modules/resource/controller/ResourceController.java b/renren-admin/src/main/java/io/renren/modules/resource/controller/ResourceController.java index 1039b641..c3e6e84f 100644 --- a/renren-admin/src/main/java/io/renren/modules/resource/controller/ResourceController.java +++ b/renren-admin/src/main/java/io/renren/modules/resource/controller/ResourceController.java @@ -641,4 +641,34 @@ public class ResourceController { } + @GetMapping("/getPraiseList") + @ApiOperation("获取好评榜") + @LogOperation("获取好评榜") + public Result getPraiseList() { + return new Result<>().ok(resourceService.getPraiseList()); + } + + @GetMapping("/getPopularList") + @ApiOperation("获取热门榜") + @LogOperation("获取热门榜") + public Result getPopularList() { + return new Result<>().ok(resourceService.getPopularList()); + } + + + @GetMapping("/getStarList") + @ApiOperation("获取明星榜") + @LogOperation("获取明星榜") + public Result getStarList() { + return new Result<>().ok(resourceService.getStarList()); + } + + + @GetMapping("/getPotentialList") + @ApiOperation("获取潜力榜") + @LogOperation("获取潜力榜") + public Result getPotentialList() { + return new Result<>().ok(resourceService.getPotentialList()); + } + } \ No newline at end of file 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 c434d682..770903c0 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 @@ -197,4 +197,12 @@ public interface ResourceDao extends BaseDao { List selectCollectList(@Param("resourceType") String resourceType, @Param("attrType") String attrType); List selectCollectResourceList(); + + List getPraiseList(); + + List getPopularList(@Param("startDate") String startDate); + + List getPotentialList(@Param("halfMonthDay") String halfMonthDay, @Param("monthDay") String monthDay); + + List getStarList(); } \ 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 fd9ea60a..bfb902fc 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 @@ -149,4 +149,12 @@ public interface ResourceService extends CrudService potentialList = resourceDao.getPotentialList(halfMonthDay, monthDay); + return potentialList; + } + } \ 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 dba3c146..a229dc7f 100644 --- a/renren-admin/src/main/resources/mapper/resource/ResourceDao.xml +++ b/renren-admin/src/main/resources/mapper/resource/ResourceDao.xml @@ -1757,39 +1757,54 @@ AND taa.resource_id = tdr.id AND (tdr.type = '应用资源' OR tdr.type = '智能算法' OR tdr.type = '图层服务' OR tdr.type = '开发组件' OR tdr.type = '业务组件') - AND taa.approve_status = #{approveStatus} AND sd.id = #{deptId} + + AND tdr.type = #{type} + AND SUBSTR(taa.create_date, 1, 10) BETWEEN #{startDate} AND #{endDate} GROUP BY sd.id, tdr.type - UNION + + UNION - SELECT - COUNT( id ) AS 'count', - dept AS 'deptName', - NULL AS "dept_id", - 99 AS "deptType", - NULL AS "district", - 'hys' AS 'type' - FROM - t_meetingroom_book tmb - GROUP BY - deptName + SELECT + COUNT( id ) AS 'count', + dept AS 'deptName', + NULL AS "dept_id", + 99 AS "deptType", + NULL AS "district", + 'hys' AS 'type' + FROM + t_meetingroom_book tmb + where 1=1 + + + AND tmb.state=2 + + + AND tmb.state=3 + + + AND tmb.state not in (2, 3) + + + + AND tmb.dept = #{deptId} + + + AND SUBSTR(tmb.create_date, 1, 10) BETWEEN #{startDate} AND #{endDate} + + GROUP BY + deptName + + + + + + + + + + \ No newline at end of file