| | |
| | | @Excel(name = "目的地址") |
| | | private String destinationAddress; |
| | | |
| | | /** 出发地经度 */ |
| | | @Excel(name = "出发地经度") |
| | | private java.math.BigDecimal departureLongitude; |
| | | |
| | | /** 出发地纬度 */ |
| | | @Excel(name = "出发地纬度") |
| | | private java.math.BigDecimal departureLatitude; |
| | | |
| | | /** 目的地经度 */ |
| | | @Excel(name = "目的地经度") |
| | | private java.math.BigDecimal destinationLongitude; |
| | | |
| | | /** 目的地纬度 */ |
| | | @Excel(name = "目的地纬度") |
| | | private java.math.BigDecimal destinationLatitude; |
| | | |
| | | /** 预计公里数 */ |
| | | @Excel(name = "预计公里数") |
| | | private java.math.BigDecimal estimatedDistance; |
| | | |
| | | /** 计划开始时间 */ |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | @Excel(name = "计划开始时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss") |
| | |
| | | /** 操作日志列表 */ |
| | | private List<SysTaskLog> operationLogs; |
| | | |
| | | /** 急救转运扩展信息 */ |
| | | private SysTaskEmergency emergencyInfo; |
| | | |
| | | /** 福祉车扩展信息 */ |
| | | private SysTaskWelfare welfareInfo; |
| | | |
| | | public void setTaskId(Long taskId) { |
| | | this.taskId = taskId; |
| | | } |
| | |
| | | |
| | | public String getDestinationAddress() { |
| | | return destinationAddress; |
| | | } |
| | | |
| | | public void setDepartureLongitude(java.math.BigDecimal departureLongitude) { |
| | | this.departureLongitude = departureLongitude; |
| | | } |
| | | |
| | | public java.math.BigDecimal getDepartureLongitude() { |
| | | return departureLongitude; |
| | | } |
| | | |
| | | public void setDepartureLatitude(java.math.BigDecimal departureLatitude) { |
| | | this.departureLatitude = departureLatitude; |
| | | } |
| | | |
| | | public java.math.BigDecimal getDepartureLatitude() { |
| | | return departureLatitude; |
| | | } |
| | | |
| | | public void setDestinationLongitude(java.math.BigDecimal destinationLongitude) { |
| | | this.destinationLongitude = destinationLongitude; |
| | | } |
| | | |
| | | public java.math.BigDecimal getDestinationLongitude() { |
| | | return destinationLongitude; |
| | | } |
| | | |
| | | public void setDestinationLatitude(java.math.BigDecimal destinationLatitude) { |
| | | this.destinationLatitude = destinationLatitude; |
| | | } |
| | | |
| | | public java.math.BigDecimal getDestinationLatitude() { |
| | | return destinationLatitude; |
| | | } |
| | | |
| | | public void setEstimatedDistance(java.math.BigDecimal estimatedDistance) { |
| | | this.estimatedDistance = estimatedDistance; |
| | | } |
| | | |
| | | public java.math.BigDecimal getEstimatedDistance() { |
| | | return estimatedDistance; |
| | | } |
| | | |
| | | public void setPlannedStartTime(Date plannedStartTime) { |
| | |
| | | return operationLogs; |
| | | } |
| | | |
| | | public void setEmergencyInfo(SysTaskEmergency emergencyInfo) { |
| | | this.emergencyInfo = emergencyInfo; |
| | | } |
| | | |
| | | public SysTaskEmergency getEmergencyInfo() { |
| | | return emergencyInfo; |
| | | } |
| | | |
| | | public void setWelfareInfo(SysTaskWelfare welfareInfo) { |
| | | this.welfareInfo = welfareInfo; |
| | | } |
| | | |
| | | public SysTaskWelfare getWelfareInfo() { |
| | | return welfareInfo; |
| | | } |
| | | |
| | | /** |
| | | * 判断是否可以变更状态 |
| | | */ |
| | |
| | | // 状态流转规则 |
| | | switch (currentStatus) { |
| | | case PENDING: |
| | | return newStatus == TaskStatus.IN_PROGRESS || newStatus == TaskStatus.CANCELLED; |
| | | // 待处理 -> 出发中、已取消 |
| | | return newStatus == TaskStatus.DEPARTING || newStatus == TaskStatus.CANCELLED; |
| | | case DEPARTING: |
| | | // 出发中 -> 已到达、已取消 |
| | | return newStatus == TaskStatus.ARRIVED || newStatus == TaskStatus.CANCELLED; |
| | | case ARRIVED: |
| | | // 已到达 -> 返程中 |
| | | return newStatus == TaskStatus.RETURNING; |
| | | case RETURNING: |
| | | // 返程中 -> 已完成 |
| | | return newStatus == TaskStatus.COMPLETED; |
| | | case IN_PROGRESS: |
| | | // 兼容旧数据:任务中 -> 已完成、已取消、待处理 |
| | | return newStatus == TaskStatus.COMPLETED || newStatus == TaskStatus.CANCELLED || newStatus == TaskStatus.PENDING; |
| | | case COMPLETED: |
| | | case CANCELLED: |
| | | // 已完成、已取消 -> 不允许任何状态变更 |
| | | return false; |
| | | default: |
| | | return false; |
| | |
| | | ", deptName='" + deptName + '\'' + |
| | | '}'; |
| | | } |
| | | } |
| | | } |