Commit b6ff7777 by chamberone

feat: 排班输出json格式调整

1 parent 48d47dd5
...@@ -3,6 +3,8 @@ package com.dituhui.pea.dispatch.pojo; ...@@ -3,6 +3,8 @@ package com.dituhui.pea.dispatch.pojo;
import org.optaplanner.core.api.domain.entity.PlanningEntity; import org.optaplanner.core.api.domain.entity.PlanningEntity;
import org.optaplanner.core.api.domain.variable.ShadowVariable; import org.optaplanner.core.api.domain.variable.ShadowVariable;
import com.fasterxml.jackson.annotation.JsonIgnore;
import lombok.Data; import lombok.Data;
import org.optaplanner.core.api.domain.variable.InverseRelationShadowVariable; import org.optaplanner.core.api.domain.variable.InverseRelationShadowVariable;
...@@ -18,6 +20,7 @@ public class Customer { ...@@ -18,6 +20,7 @@ public class Customer {
private long id; private long id;
private String code; private String code;
@JsonIgnore
private Location location; private Location location;
// 时间窗 分钟 // 时间窗 分钟
private int startTime; private int startTime;
...@@ -27,8 +30,11 @@ public class Customer { ...@@ -27,8 +30,11 @@ public class Customer {
private String requiredSkill; private String requiredSkill;
// Shadow variables // Shadow variables
@JsonIgnore
private Technician technician; private Technician technician;
@JsonIgnore
private Customer previousCustomer; private Customer previousCustomer;
@JsonIgnore
private Customer nextCustomer; private Customer nextCustomer;
// 到达时间 // 到达时间
private Integer arrivalTime; private Integer arrivalTime;
...@@ -139,8 +145,4 @@ public class Customer { ...@@ -139,8 +145,4 @@ public class Customer {
return previousCustomer.getLocation().getPathTimeTo(location); return previousCustomer.getLocation().getPathTimeTo(location);
} }
// @Override
// public String toString() {
// return "Customer{" + "id=" + id + '}';
// }
} }
...@@ -11,6 +11,8 @@ import org.optaplanner.core.api.domain.entity.PlanningEntity; ...@@ -11,6 +11,8 @@ import org.optaplanner.core.api.domain.entity.PlanningEntity;
import org.optaplanner.core.api.domain.lookup.PlanningId; import org.optaplanner.core.api.domain.lookup.PlanningId;
import org.optaplanner.core.api.domain.variable.PlanningListVariable; import org.optaplanner.core.api.domain.variable.PlanningListVariable;
import com.fasterxml.jackson.annotation.JsonIgnore;
import lombok.Data; import lombok.Data;
@Data @Data
...@@ -20,6 +22,7 @@ public class Technician { ...@@ -20,6 +22,7 @@ public class Technician {
@PlanningId @PlanningId
private long id; private long id;
private String code; private String code;
@JsonIgnore
private Depot depot; private Depot depot;
// 上班时间窗 分钟480-1080 8-18点 // 上班时间窗 分钟480-1080 8-18点
...@@ -31,6 +34,7 @@ public class Technician { ...@@ -31,6 +34,7 @@ public class Technician {
// 偏好坐标 // 偏好坐标
// private Location preferredlocation; // private Location preferredlocation;
// teck code : customer code , distance // teck code : customer code , distance
@JsonIgnore
private Map<String, Long> preferredlocationDistanceMap = new HashMap<String, Long>(); private Map<String, Long> preferredlocationDistanceMap = new HashMap<String, Long>();
@PlanningListVariable @PlanningListVariable
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!