jiangping
2024-09-09 c47f7b9c4899036c52ad0e4f46c4aff7102110bc
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,12 +93,26 @@
    @ApiModelProperty(value = "签到时间")
    @ExcelColumn(name="签到时间")
    private Date signDate;
    @ApiModelProperty(value = "签到方式 0app签到 1扫码签到", example = "1")
    @ExcelColumn(name="签到方式 0app签到 1扫码签到")
    private Integer singType;
    @ApiModelProperty(value = "通知WMS作业绑定月台时间")
    @ExcelColumn(name="通知WMS作业绑定月台时间")
    private Date wmsSendDate;
    @ApiModelProperty(value = "通知WMS作业绑定月台状态 0待通知 1通知成功 2通知失败", example = "1")
    @ExcelColumn(name="通知WMS作业绑定月台状态 0待通知 1通知成功 2通知失败")
    private Integer wmsSendStatus;
    @ApiModelProperty(value = "通知WMS作业绑定月台編碼", example = "1")
    @ExcelColumn(name="通知WMS作业绑定月台編碼")
    private String wmsSendPlatformCode;
    @ApiModelProperty(value = "通知WMS作业绑定月台备注", example = "1")
    @ExcelColumn(name="通知WMS作业绑定月台备注")
    private String wmsSendInfo;
    @ApiModelProperty(value = "通知WMS作业绑定月台次数", example = "1")
    @ExcelColumn(name="通知WMS作业绑定月台次数")
    private Integer wmsSendNum;
    @ApiModelProperty(value = "签到距离(米)", example = "1")
    @ExcelColumn(name="签到距离(米)")
@@ -161,7 +177,6 @@
    @ApiModelProperty(value = "月台转交时间")
    @ExcelColumn(name="月台转交时间")
    private Date transPlatformDate;
    @ApiModelProperty(value = "月台转交处理人", example = "1")
@@ -264,18 +279,78 @@
    @ApiModelProperty(value = "前方排队数量", example = "1")
    @TableField(exist = false)
    private Long lineUpNum;
    private Integer lineUpNum;
    @ApiModelProperty(value = "关联月台组编码(关联platform_group表)", example = "1")
    @ApiModelProperty(value = "预计等待时间", example = "1")
    @TableField(exist = false)
    private Integer groupId;
    private String waitTime;
    @ApiModelProperty(value = "预计完成时间", example = "1")
    @TableField(exist = false)
    private String finishTimeStr;
    @ApiModelProperty(value = "作业月台名称")
    @TableField(exist = false)
    private String platformName ;
    @ApiModelProperty(value = "wms业务主键")
    @TableField(exist = false)
    private Integer wmsId ;
    @ApiModelProperty(value = "月台组类型:0安泰物流装货 1安泰物流卸货 2市公司卸货")
    @TableField(exist = false)
    private Integer groupType ;
    @ApiModelProperty(value = "承运商")
    @TableField(exist = false)
    private String carrierName ;
    @ApiModelProperty(value = "距离签到点距离")
    @TableField(exist = false)
    private BigDecimal getDistance;
    @ApiModelProperty(value = "月台作业效率(万支/小时)", hidden = true)
    @TableField(exist = false)
    private BigDecimal workRate;
    @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;
    @ApiModelProperty(value = "收货地(目的地)")
    @TableField(exist = false)
    private String repertotyAddress;
    @ApiModelProperty(value = "wms月台编号")
    @TableField(exist = false)
    private String platformWmsCode;
    @ApiModelProperty(value = "叫号类型:1=叫号入园 ; 2=月台叫号 ; 3=排队情况", example = "1")
    @TableField(exist = false)
    private Integer callType;
    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());
        }
    }
}