Commit a1213087 by huangjinxin

Merge remote-tracking branch 'origin/develop' into develop

2 parents 4e612c11 bb1a8006
......@@ -26,7 +26,7 @@ public enum ConstraintNameEnum {
*/
technicianCapacityMatch,
/**
* 已分配匹配
* 已分配和已排除技术员匹配
*/
dispatchedMatch,
......
......@@ -93,10 +93,14 @@ public class DispatchConstraintProvider implements ConstraintProvider {
}
protected Constraint dispatchedMatch(ConstraintFactory factory) {
return factory.forEach(Customer.class)
.filter(customer -> customer.getDispatchedTechnicianCode() != null
&& ((customer.getTechnician() == null) || (!StringUtils
.equals(customer.getDispatchedTechnicianCode(), customer.getTechnician().getCode()))))
return factory.forEach(Customer.class).filter(customer ->
// 已分配
(customer.getDispatchedTechnicianCode() != null && ((customer.getTechnician() == null)
|| (!StringUtils.equals(customer.getDispatchedTechnicianCode(), customer.getTechnician().getCode()))))
||
// 已排除
(customer.getExclusiveTechnicianCode() != null && ((customer.getTechnician() == null) || (StringUtils
.equals(customer.getExclusiveTechnicianCode(), customer.getTechnician().getCode())))))
.penalizeLong(HardSoftLongScore.ONE_HARD, customer -> 50)
.asConstraint(ConstraintNameEnum.dispatchedMatch.name());
}
......
......@@ -21,8 +21,12 @@ public class Customer {
private long id;
private String code;
// 已分配
private String dispatchedTechnicianCode;
// 已排除
private String exclusiveTechnicianCode;
// orderid(code)+dt 确定唯一一条工单
private String dt;
@JsonIgnore
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!