服务指令预览接口 给不同状态数据加标识 便于前端判断
This commit is contained in:
parent
e305181bda
commit
b96f6e0125
|
|
@ -10,6 +10,7 @@ import lombok.extern.slf4j.Slf4j;
|
||||||
import org.apache.commons.compress.utils.Lists;
|
import org.apache.commons.compress.utils.Lists;
|
||||||
import org.jeecg.common.api.vo.Result;
|
import org.jeecg.common.api.vo.Result;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.util.CollectionUtils;
|
||||||
import org.springframework.web.bind.annotation.*;
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
import java.text.SimpleDateFormat;
|
import java.text.SimpleDateFormat;
|
||||||
|
|
@ -272,6 +273,28 @@ public class CareDirectiveApi {
|
||||||
//将来
|
//将来
|
||||||
future = careDirectivePlanApi.queryFuture(dto);
|
future = careDirectivePlanApi.queryFuture(dto);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//给数据加标识
|
||||||
|
if (!CollectionUtils.isEmpty(history)) {
|
||||||
|
history.stream().forEach(item -> {
|
||||||
|
if ("Y".equals(item.getIzFinish())) {
|
||||||
|
item.setExecuteStatus("hisOk");
|
||||||
|
} else {
|
||||||
|
item.setExecuteStatus("hisFaild");
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
if (!CollectionUtils.isEmpty(current)) {
|
||||||
|
current.stream().forEach(item -> {
|
||||||
|
item.setExecuteStatus("current");
|
||||||
|
});
|
||||||
|
}
|
||||||
|
if (!CollectionUtils.isEmpty(future)) {
|
||||||
|
future.stream().forEach(item -> {
|
||||||
|
item.setExecuteStatus("future");
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
//所有
|
//所有
|
||||||
all.addAll(history);
|
all.addAll(history);
|
||||||
all.addAll(current);
|
all.addAll(current);
|
||||||
|
|
|
||||||
|
|
@ -131,4 +131,7 @@ public class DirectiveOrderEntity implements Serializable {
|
||||||
* 子表信息
|
* 子表信息
|
||||||
*/
|
*/
|
||||||
private List<DirectiveOrderSubEntity> subList;
|
private List<DirectiveOrderSubEntity> subList;
|
||||||
|
|
||||||
|
// 历史成功hisOk 历史失败hisFaild 正在执行current 待执行future
|
||||||
|
private String executeStatus;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue