This commit is contained in:
wangliwen 2022-06-27 10:37:56 +08:00
parent 481b4a4fec
commit ae3e7c80a1
1 changed files with 18 additions and 18 deletions

View File

@ -134,24 +134,24 @@ public class CorrectionListenerV2 implements TaskListener, ExecutionListener, Ac
}
}
builder.registerTypeAdapter(Date.class, (JsonDeserializer<Date>) (json, typeOfT, context) -> new Date(json.getAsJsonPrimitive().getAsLong()));
Gson gson = builder.create();
JsonElement jsonElement = gson.toJsonTree(kv);
TAbilityApplicationDTO abilityApplicationDTO = gson.fromJson(jsonElement, TAbilityApplicationDTO.class);
if (abilityApplicationDTO != null) {
if (abilityApplicationDTO.getReject() != null && abilityApplicationDTO.getReject() == Boolean.TRUE) { // 存在被拒绝的节点
abilityApplicationDTO.setDelFlag(0);
abilityApplicationDTO.setApproveStatus("不通过");
tAbilityApplicationService.update(abilityApplicationDTO);
logger.error("审批不通过申请id:" + abilityApplicationDTO.getId());
} else {
abilityApplicationDTO.setDelFlag(0);
abilityApplicationDTO.setApproveStatus("通过");
tAbilityApplicationService.update(abilityApplicationDTO);
logger.error("审批通过申请id:" + abilityApplicationDTO.getId());
}
}
// builder.registerTypeAdapter(Date.class, (JsonDeserializer<Date>) (json, typeOfT, context) -> new Date(json.getAsJsonPrimitive().getAsLong()));
//
// Gson gson = builder.create();
// JsonElement jsonElement = gson.toJsonTree(kv);
// TAbilityApplicationDTO abilityApplicationDTO = gson.fromJson(jsonElement, TAbilityApplicationDTO.class);
// if (abilityApplicationDTO != null) {
// if (abilityApplicationDTO.getReject() != null && abilityApplicationDTO.getReject() == Boolean.TRUE) { // 存在被拒绝的节点
// abilityApplicationDTO.setDelFlag(0);
// abilityApplicationDTO.setApproveStatus("不通过");
// tAbilityApplicationService.update(abilityApplicationDTO);
// logger.error("审批不通过申请id:" + abilityApplicationDTO.getId());
// } else {
// abilityApplicationDTO.setDelFlag(0);
// abilityApplicationDTO.setApproveStatus("通过");
// tAbilityApplicationService.update(abilityApplicationDTO);
// logger.error("审批通过申请id:" + abilityApplicationDTO.getId());
// }
// }
}
/**