package cn.estsh.i3plus.pojo.wms.bean;

import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiParam;
import lombok.Data;

import java.io.Serializable;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.UUID;

/**
 * @Description : sap接口基础公共字段
 * @Reference :
 * @Author : amy
 * @CreateDate : 2019-06-17 16:21
 * @Modify:
 **/
@Data
public class SapBase implements Serializable {

    private static final long serialVersionUID = -3373467948186161102L;
    @ApiParam(value = "处理人", example = "-1")
    private String actusr = "导入";

    @ApiParam(value = "SID", example = "-1")
    private String sid = "";

    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
    @ApiParam(value = "接收数据日期", example = "-1")
    private String recymd;

    @JsonFormat(pattern = "HH:mm:ss", timezone = "GMT+8")
    @ApiParam(value = "接收数据时间", example = "-1")
    private String rechms;

    @ApiParam(value = "同步标志", example = "-1")
    private String synflg = "N";

    @ApiParam(value = "同步日期", example = "-1")
    private String synymd;

    @ApiParam(value = "同步时间", example = "-1")
    private String synhms;

    @ApiParam(value = "处理标志", example = "-1")
    private String actflg = "N";

    @ApiParam(value = "处理日期", example = "-1")
    private String actymd;

    @ApiParam(value = "处理时间", example = "-1")
    private String acthms ="00:00:00";

    @ApiParam(value = "状态标志", example = "-1")
    private String staflg = "N";

    @ApiParam(value = "顺序号", example = "-1")
    private Integer seq = 1;

    @ApiParam(value = "GUID", example = "-1")
    private String guid = UUID.randomUUID().toString();

    public String getSynymdTime() {
        return (new SimpleDateFormat("yyyy-MM-dd")).format(new Date());
    }

    public String getSynhmsTime() {
        SimpleDateFormat format = new SimpleDateFormat("HH:mm:ss");
        return format.format(new Date());
    }
}
