Commit 329a29b8 authored by neo's avatar neo

[Bugfix] fixed error jobstatus field name

parent 6b991acf
......@@ -26,7 +26,7 @@ public class PeriodJobDto {
private String status;
private String errorMsg;
private String jotStatus;
private String jobStatus;
public PeriodJobDto copyFromPeriodJob(PeriodJob job) {
this.id = job.getId();
......@@ -40,15 +40,15 @@ public class PeriodJobDto {
this.errorMsg = job.getErrorMsg();
MyAsserts.assertNotEmpty(stepsCode, Exceptions.SERVER_ERROR_EXCEPTION);
if (StringUtils.isBlank(status)) this.jotStatus = STATUS_BEGIN;
if (StringUtils.isBlank(status)) this.jobStatus = STATUS_BEGIN;
else {
List<WrapPeriodJobDto.Task> tasks = WrapPeriodJobDto.fromJson(status);
if (Collections.isEmpty(tasks)) this.jotStatus = STATUS_BEGIN;
if (Collections.isEmpty(tasks)) this.jobStatus = STATUS_BEGIN;
else {
String[] codes = stepsCode.split(",");
if (tasks.size() < codes.length) this.jotStatus = STATUS_RUNNING;
if (tasks.size() < codes.length) this.jobStatus = STATUS_RUNNING;
else {
this.jotStatus = tasks.stream().anyMatch(m -> m.status.equals(STATUS_ERROR)) ? STATUS_ERROR : STATUS_END;
this.jobStatus = tasks.stream().anyMatch(m -> m.status.equals(STATUS_ERROR)) ? STATUS_ERROR : STATUS_END;
}
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment