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")
@@ -161,7 +162,6 @@
    @ApiModelProperty(value = "月台转交时间")
    @ExcelColumn(name="月台转交时间")
    private Date transPlatformDate;
    @ApiModelProperty(value = "月台转交处理人", example = "1")
@@ -278,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());
        }
    }
}