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
|
final List<Long> ids = dtoList.stream().map(TAbilityApplicationDTO::getId).collect(Collectors.toList()); // 发起申请的表单id
|
||||||
// 仿照请求接口 /act/running/startOfBusinessKey
|
// 仿照请求接口 /act/running/startOfBusinessKey
|
||||||
ProcessStartDTO processStartDTO = new ProcessStartDTO();
|
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); //限定
|
processStartDTO.setProcessDefinitionKey(key); //限定
|
||||||
AuditingBaseDTO auditingBaseDTO = new AuditingBaseDTO();
|
AuditingBaseDTO auditingBaseDTO = new AuditingBaseDTO();
|
||||||
auditingBaseDTO.setCompleteEntry(Boolean.TRUE); // 首次录入
|
auditingBaseDTO.setCompleteEntry(Boolean.TRUE); // 首次录入
|
||||||
|
@ -252,7 +254,8 @@ public class AbilityCenterControllerV2 {
|
||||||
// 仿照请求接口 /processForm/tabilityapplication/updateInstanceId
|
// 仿照请求接口 /processForm/tabilityapplication/updateInstanceId
|
||||||
CompletableFuture.runAsync(() -> {
|
CompletableFuture.runAsync(() -> {
|
||||||
if (dto.getBusinessKey() != null) {
|
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);
|
jdbcTemplate.batchUpdate(sqls);
|
||||||
}
|
}
|
||||||
}, executor);
|
}, executor);
|
||||||
|
|
|
@ -105,7 +105,8 @@ public class CodeGenerationUtils {
|
||||||
try {
|
try {
|
||||||
String finalTableName = tableName;
|
String finalTableName = tableName;
|
||||||
String finalNo = no;
|
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);
|
jdbcTemplate.batchUpdate(sqls);
|
||||||
} catch (Exception exception) {
|
} catch (Exception exception) {
|
||||||
logger.error("流水号写入失败", exception);
|
logger.error("流水号写入失败", exception);
|
||||||
|
|
Loading…
Reference in New Issue