Commit 4828effe by levphon

工单详情-导入

1 parent 6f36472d
......@@ -22,6 +22,10 @@ import org.apache.commons.collections.CollectionUtils;
import java.io.ByteArrayOutputStream;
import java.lang.reflect.Field;
import java.time.Duration;
import java.time.Instant;
import java.time.ZoneId;
import java.time.ZonedDateTime;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
......@@ -147,6 +151,15 @@ public class WorkOrderImportListener extends AnalysisEventListener<WorkOrderImpo
return false;
}
}
ZonedDateTime nowTime = ZonedDateTime.now();
ZonedDateTime dateTime = ZonedDateTime.ofInstant(Instant.ofEpochMilli(woi.getServiceTime().toInstant().toEpochMilli()), ZoneId.systemDefault());
Duration duration = Duration.between(nowTime, dateTime).abs();
if (duration.toDays() < 0) {
woi.setImportFailReason("期望安装日期不能小于当前日期");
log.warn(woi.toString());
return false;
}
//检查未完成工单
WorkOrder workOrder = workOrderService.getIncompleteWorkOrder(BizServiceTypeEnum.INSTALL.getType(), woi.getVin());
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!