update - REQ-2324-调整设置待办为执行中代码,设置成功记录日志表
This commit is contained in:
parent
58bbaab61e
commit
4e30d009f8
@ -35,6 +35,7 @@ import cn.axzo.msg.center.service.util.JSONUtils;
|
|||||||
import cn.axzo.msg.center.utils.DateFormatUtil;
|
import cn.axzo.msg.center.utils.DateFormatUtil;
|
||||||
import cn.axzo.msg.center.utils.QueryFormatter;
|
import cn.axzo.msg.center.utils.QueryFormatter;
|
||||||
import cn.axzo.msg.center.utils.UUIDUtil;
|
import cn.axzo.msg.center.utils.UUIDUtil;
|
||||||
|
import cn.hutool.json.JSONUtil;
|
||||||
import com.alibaba.fastjson.JSONObject;
|
import com.alibaba.fastjson.JSONObject;
|
||||||
import com.baomidou.mybatisplus.extension.conditions.query.LambdaQueryChainWrapper;
|
import com.baomidou.mybatisplus.extension.conditions.query.LambdaQueryChainWrapper;
|
||||||
import com.google.common.base.Supplier;
|
import com.google.common.base.Supplier;
|
||||||
@ -137,6 +138,8 @@ public class TodoManager {
|
|||||||
if (CollectionUtils.isNotEmpty(routeButtons)) {
|
if (CollectionUtils.isNotEmpty(routeButtons)) {
|
||||||
supportBatchProcess = YesOrNo.YES;
|
supportBatchProcess = YesOrNo.YES;
|
||||||
}
|
}
|
||||||
|
} else if (template.getMsgCategory().equals(MessageCategoryEnum.APPROVAL_PENDING_MESSAGE)) {
|
||||||
|
//todo 审批代办判断是否存在"同意","驳回"按钮,才支持批量审批,需要合并2393代码根据按钮进行判断
|
||||||
}
|
}
|
||||||
request.setSupportBatchProcess(supportBatchProcess);
|
request.setSupportBatchProcess(supportBatchProcess);
|
||||||
List<Todo> todos = todoRecordBuilder.buildTodos(
|
List<Todo> todos = todoRecordBuilder.buildTodos(
|
||||||
@ -390,8 +393,18 @@ public class TodoManager {
|
|||||||
*/
|
*/
|
||||||
@Transactional(rollbackFor = Exception.class)
|
@Transactional(rollbackFor = Exception.class)
|
||||||
public Boolean batchSetProcessing(List<String> identityCodes) {
|
public Boolean batchSetProcessing(List<String> identityCodes) {
|
||||||
|
log.info("batch set processing...,request:{}", JSONUtil.toJsonStr(identityCodes));
|
||||||
|
if (CollectionUtils.isEmpty(identityCodes)) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
BizAssertions.assertTrue(CollectionUtils.isNotEmpty(identityCodes), "identityCodes列表不能为空");
|
BizAssertions.assertTrue(CollectionUtils.isNotEmpty(identityCodes), "identityCodes列表不能为空");
|
||||||
return todoDao.setExecutableProcessing(identityCodes);
|
Boolean updated = todoDao.batchSetExecutableProcessing(identityCodes);
|
||||||
|
if (updated) {
|
||||||
|
List<Todo> updatedTodos = todoDao.getByIdentityCodes(identityCodes);
|
||||||
|
TodoRequestContext ctx = TodoRequestContext.create("batchSetProcessing", identityCodes);
|
||||||
|
todoLogger.logTodosUpdated(ctx, updatedTodos);
|
||||||
|
}
|
||||||
|
return updated;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@ -49,6 +49,13 @@ public class TodoDao extends ServiceImpl<TodoMapper, Todo> {
|
|||||||
.list();
|
.list();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public List<Todo> getByIdentityCodes(List<String> identityCodes) {
|
||||||
|
return lambdaQuery()
|
||||||
|
.eq(Todo::getIdentityCode, identityCodes)
|
||||||
|
.eq(Todo::getIsDelete, TableIsDeleteEnum.NORMAL.value)
|
||||||
|
.list();
|
||||||
|
}
|
||||||
|
|
||||||
public Optional<Todo> getLatestByBiz(
|
public Optional<Todo> getLatestByBiz(
|
||||||
@Nullable String templateCode, String bizCode, String subBizCode, TodoType todoType) {
|
@Nullable String templateCode, String bizCode, String subBizCode, TodoType todoType) {
|
||||||
if (StringUtils.isBlank(bizCode) && StringUtils.isBlank(subBizCode))
|
if (StringUtils.isBlank(bizCode) && StringUtils.isBlank(subBizCode))
|
||||||
@ -98,7 +105,7 @@ public class TodoDao extends ServiceImpl<TodoMapper, Todo> {
|
|||||||
return new SampleTodos(todos);
|
return new SampleTodos(todos);
|
||||||
}
|
}
|
||||||
|
|
||||||
public Boolean setExecutableProcessing(List<String> identityCodes) {
|
public Boolean batchSetExecutableProcessing(List<String> identityCodes) {
|
||||||
return lambdaUpdate()
|
return lambdaUpdate()
|
||||||
.eq(Todo::getType, TodoType.EXECUTABLE)
|
.eq(Todo::getType, TodoType.EXECUTABLE)
|
||||||
.in(Todo::getIdentityCode, identityCodes)
|
.in(Todo::getIdentityCode, identityCodes)
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user