k94314517
2024-08-20 ade1b378ff2f0781be2fbc537b6c09237a50631a
server/visits/dmvisit_service/src/main/java/com/doumee/dao/business/model/PlatformJob.java
@@ -2,6 +2,7 @@
import com.baomidou.mybatisplus.annotation.TableField;
import com.doumee.core.annotation.excel.ExcelColumn;
import com.doumee.core.utils.Constants;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import com.baomidou.mybatisplus.annotation.IdType;
@@ -11,6 +12,7 @@
import com.fasterxml.jackson.annotation.JsonFormat;
import java.util.Date;
import java.math.BigDecimal;
import java.util.Objects;
/**
 * 月台调度作业信息表
@@ -91,7 +93,6 @@
    @ApiModelProperty(value = "签到时间")
    @ExcelColumn(name="签到时间")
    private Date signDate;
    @ApiModelProperty(value = "签到方式 0app签到 1扫码签到", example = "1")
@@ -113,6 +114,9 @@
    @ApiModelProperty(value = "最近分配月台编码(关联platform)", example = "1")
    @ExcelColumn(name="最近分配月台编码(关联platform)")
    private Integer platformId;
    @ApiModelProperty(value = "月台分组编码(关联platform_group)", example = "1")
    @ExcelColumn(name="月台分组编码(关联platform_group)")
    private Integer platformGroupId;
    @ApiModelProperty(value = "通知入园等待时间")
    @ExcelColumn(name="通知入园等待时间")
@@ -138,17 +142,14 @@
    @ApiModelProperty(value = "开始作业时间")
    @ExcelColumn(name="开始作业时间")
    private Date startDate;
    @ApiModelProperty(value = "作业完成时间(最终时间)")
    @ExcelColumn(name="作业完成时间(最终时间)")
    private Date doneDate;
    @ApiModelProperty(value = "异常挂起时间")
    @ExcelColumn(name="异常挂起时间")
    private Date errorDate;
    @ApiModelProperty(value = "异常挂起人编码", example = "1")
@@ -161,7 +162,6 @@
    @ApiModelProperty(value = "月台转交时间")
    @ExcelColumn(name="月台转交时间")
    private Date transPlatformDate;
    @ApiModelProperty(value = "月台转交处理人", example = "1")
@@ -208,7 +208,6 @@
    @ApiModelProperty(value = "车辆进厂下发时间")
    @ExcelColumn(name="车辆进厂下发时间")
    private Date inHkdate;
    @ApiModelProperty(value = "作业类型 0自有车卸货 1自有车装货 2外协车卸货 3外协车装货 4市公司外协车卸货", example = "1")
@@ -233,7 +232,6 @@
    @ApiModelProperty(value = "作废时间")
    @ExcelColumn(name="作废时间")
    private Date cancelDate;
    @ApiModelProperty(value = "作废处理人编码", example = "1")
@@ -268,6 +266,10 @@
    @TableField(exist = false)
    private Long lineUpNum;
    @ApiModelProperty(value = "关联月台组编码(关联platform_group表)", example = "1")
    @TableField(exist = false)
    private Integer groupId;
    @ApiModelProperty(value = "作业月台名称")
    @TableField(exist = false)
    private String platformName ;
@@ -276,4 +278,34 @@
    @TableField(exist = false)
    private BigDecimal getDistance;
    @ApiModelProperty(value = "业务触发时间  时间")
    @TableField(exist = false)
    private Long optTime;
    @ApiModelProperty(value = "已作业时间")
    @TableField(exist = false)
    private Long workTime;
    @ApiModelProperty(value = "WMS任务信息")
    @TableField(exist = false)
    private  PlatformWmsJob platformWmsJob;
    public void dealTime(){
        if(Constants.equalsInteger(this.getStatus(),Constants.PlatformJobStatus.WAIT_CONFIRM.getKey())
                || Constants.equalsInteger(this.getStatus(),Constants.PlatformJobStatus.WART_SIGN_IN.getKey())
         ){
            return;
        }
        if(Constants.equalsInteger(this.getStatus(),Constants.PlatformJobStatus.WAIT_CALL.getKey())){
            this.setOptTime(this.getSignDate().getTime());
        }else if(Constants.equalsInteger(this.getStatus(),Constants.PlatformJobStatus.IN_WAIT.getKey())){
            this.setOptTime(this.getInwaitDate().getTime());
        }else if(Constants.equalsInteger(this.getStatus(),Constants.PlatformJobStatus.CALLED.getKey())){
            this.setOptTime(this.getCallDate().getTime());
        }else if(Constants.equalsInteger(this.getStatus(),Constants.PlatformJobStatus.WORKING.getKey())){
            this.setOptTime(this.getStartDate().getTime());
        }
    }
}