mirror of
https://codeup.aliyun.com/67c68d4e484ca2f0a13ac3c1/ydc/jsowell-charger-web.git
synced 2026-07-22 23:22:32 +08:00
接入司机开票申请待办流程
This commit is contained in:
@@ -56,4 +56,10 @@ public interface SysTodoTaskMapper {
|
||||
int cancelTodo(@Param("todoId") Long todoId,
|
||||
@Param("reason") String reason,
|
||||
@Param("updateBy") String updateBy);
|
||||
|
||||
int cancelTodoByBusiness(@Param("businessType") String businessType,
|
||||
@Param("businessId") String businessId,
|
||||
@Param("assigneeUserId") Long assigneeUserId,
|
||||
@Param("reason") String reason,
|
||||
@Param("updateBy") String updateBy);
|
||||
}
|
||||
|
||||
@@ -19,6 +19,14 @@ public interface SysUserMapper {
|
||||
*/
|
||||
List<SysUser> selectUserList(SysUser sysUser);
|
||||
|
||||
/**
|
||||
* 查询部门及下级部门的正常用户 ID。
|
||||
*
|
||||
* @param deptId 部门 ID
|
||||
* @return 用户 ID 集合
|
||||
*/
|
||||
List<Long> selectActiveUserIdsByDeptTree(@Param("deptId") Long deptId);
|
||||
|
||||
/**
|
||||
* 根据条件分页查询已配用户角色列表
|
||||
*
|
||||
|
||||
@@ -0,0 +1,12 @@
|
||||
package com.jsowell.system.service;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 待办接收人解析服务。
|
||||
*
|
||||
* @author jsowell
|
||||
*/
|
||||
public interface TodoTaskAssigneeService {
|
||||
List<Long> findActiveUserIdsByDeptTree(Long deptId);
|
||||
}
|
||||
@@ -36,4 +36,7 @@ public interface TodoTaskService {
|
||||
boolean cancelForAssignee(Long todoId, Long assigneeUserId, String operatorName, String reason);
|
||||
|
||||
boolean cancel(Long todoId, Long operatorId, String operatorName, String reason);
|
||||
|
||||
int cancelByBusiness(String businessType, String businessId, Long assigneeUserId,
|
||||
String operatorName, String reason);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,28 @@
|
||||
package com.jsowell.system.service.impl;
|
||||
|
||||
import com.jsowell.common.exception.ServiceException;
|
||||
import com.jsowell.system.mapper.SysUserMapper;
|
||||
import com.jsowell.system.service.TodoTaskAssigneeService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 待办接收人解析服务实现。
|
||||
*
|
||||
* @author jsowell
|
||||
*/
|
||||
@Service
|
||||
public class TodoTaskAssigneeServiceImpl implements TodoTaskAssigneeService {
|
||||
@Autowired
|
||||
private SysUserMapper userMapper;
|
||||
|
||||
@Override
|
||||
public List<Long> findActiveUserIdsByDeptTree(Long deptId) {
|
||||
if (deptId == null || deptId <= 0) {
|
||||
throw new ServiceException("待办接收部门不能为空");
|
||||
}
|
||||
return userMapper.selectActiveUserIdsByDeptTree(deptId);
|
||||
}
|
||||
}
|
||||
@@ -191,6 +191,20 @@ public class TodoTaskServiceImpl implements TodoTaskService {
|
||||
throw new ServiceException("当前待办状态不允许取消");
|
||||
}
|
||||
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public int cancelByBusiness(String businessType, String businessId, Long assigneeUserId,
|
||||
String operatorName, String reason) {
|
||||
String safeBusinessType = normalizeRequired(businessType, "业务类型", 64);
|
||||
String safeBusinessId = normalizeRequired(businessId, "业务主键", 64);
|
||||
if (assigneeUserId != null) {
|
||||
validateUserId(assigneeUserId);
|
||||
}
|
||||
String safeReason = normalizeRequired(reason, "取消原因", 500);
|
||||
return todoTaskMapper.cancelTodoByBusiness(safeBusinessType, safeBusinessId, assigneeUserId,
|
||||
safeReason, normalizeOperator(operatorName, null));
|
||||
}
|
||||
|
||||
private SysTodoTask buildTask(TodoTaskCreateCommand command) {
|
||||
if (command.getAssigneeUserId() == null || command.getAssigneeUserId() <= 0) {
|
||||
throw new ServiceException("待办接收用户不能为空");
|
||||
|
||||
Reference in New Issue
Block a user