This commit is contained in:
parent
f0cc8cc5a9
commit
6fedef22c0
|
@ -226,7 +226,9 @@ public class AbilityCenterControllerV2 {
|
|||
final List<Long> ids = dtoList.stream().map(TAbilityApplicationDTO::getId).collect(Collectors.toList()); // 发起申请的表单id
|
||||
// 仿照请求接口 /act/running/startOfBusinessKey
|
||||
ProcessStartDTO processStartDTO = new ProcessStartDTO();
|
||||
processStartDTO.setBusinessKey(basic_facilities ? tAbilityApplicationDTOList.stream().filter(index -> StringUtils.isNotEmpty(index.getResourceId())).map(TAbilityApplicationDTO::getResourceId).findFirst().orElse(null) : JSON.toJSONString(ids.stream().limit(5).collect(Collectors.toList()))); // 申请的id列表 json字符 做businesskey
|
||||
processStartDTO.setBusinessKey(basic_facilities ? tAbilityApplicationDTOList.stream().filter(index -> StringUtils.isNotEmpty(index.getResourceId()))
|
||||
.map(TAbilityApplicationDTO::getResourceId).findFirst().orElse(null) :
|
||||
JSON.toJSONString(ids.stream().limit(5).collect(Collectors.toList()))); // 申请的id列表 json字符 做businesskey
|
||||
processStartDTO.setProcessDefinitionKey(key); //限定
|
||||
AuditingBaseDTO auditingBaseDTO = new AuditingBaseDTO();
|
||||
auditingBaseDTO.setCompleteEntry(Boolean.TRUE); // 首次录入
|
||||
|
@ -252,7 +254,8 @@ public class AbilityCenterControllerV2 {
|
|||
// 仿照请求接口 /processForm/tabilityapplication/updateInstanceId
|
||||
CompletableFuture.runAsync(() -> {
|
||||
if (dto.getBusinessKey() != null) {
|
||||
String[] sqls = dtoList.stream().map(i -> String.format("UPDATE t_ability_application SET instance_id = %s WHERE id = %s", dto.getProcessInstanceId(), i.getId())).collect(Collectors.toList()).toArray(new String[dtoList.size()]);
|
||||
String[] sqls = dtoList.stream().map(i -> String.format("UPDATE t_ability_application SET instance_id = %s WHERE id = %s", dto.getProcessInstanceId(), i.getId()))
|
||||
.collect(Collectors.toList()).toArray(new String[dtoList.size()]);
|
||||
jdbcTemplate.batchUpdate(sqls);
|
||||
}
|
||||
}, executor);
|
||||
|
|
|
@ -105,7 +105,8 @@ public class CodeGenerationUtils {
|
|||
try {
|
||||
String finalTableName = tableName;
|
||||
String finalNo = no;
|
||||
String[] sqls = id.stream().map(i -> String.format("UPDATE %s SET apply_number = '%s' WHERE id = %s;", finalTableName, finalNo, i)).collect(Collectors.toList()).toArray(new String[id.size()]);
|
||||
String[] sqls = id.stream().map(i -> String.format("UPDATE %s SET apply_number = '%s' WHERE id = %s;", finalTableName, finalNo, i))
|
||||
.collect(Collectors.toList()).toArray(new String[id.size()]);
|
||||
jdbcTemplate.batchUpdate(sqls);
|
||||
} catch (Exception exception) {
|
||||
logger.error("流水号写入失败", exception);
|
||||
|
|
Loading…
Reference in New Issue