mrzhssss
2022-01-14 3528bc13c81aa4a37e6fc411bcd0800a1871acff
src/main/java/zy/cloud/wms/manager/entity/ProjectPlan.java
@@ -1,6 +1,9 @@
package zy.cloud.wms.manager.entity;
import com.core.common.Cools;import io.swagger.annotations.ApiModelProperty;
import com.baomidou.mybatisplus.mapper.EntityWrapper;
import com.core.common.Cools;
import com.core.common.SpringUtils;
import io.swagger.annotations.ApiModelProperty;
import io.swagger.annotations.ApiModelProperty;
import com.baomidou.mybatisplus.annotations.TableId;
import com.baomidou.mybatisplus.enums.IdType;
@@ -10,6 +13,7 @@
import java.text.SimpleDateFormat;
import java.util.Date;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;
import java.text.SimpleDateFormat;
import java.util.Date;
@@ -36,8 +40,12 @@
import io.swagger.annotations.ApiModelProperty;
import com.baomidou.mybatisplus.annotations.TableName;
import zy.cloud.wms.manager.service.FlowStatusService;
import zy.cloud.wms.manager.service.ItemService;
import java.io.Serializable;
@Data
@TableName("sys_project_plan")
public class ProjectPlan implements Serializable {
@@ -46,6 +54,7 @@
    /**
     * 唯一ID
     */
    @TableId(value = "id",type = IdType.AUTO)
    @ApiModelProperty(value= "唯一ID")
    private Long id;
@@ -150,7 +159,7 @@
     */
    @ApiModelProperty(value= "创建人id")
    @TableField("create_id")
    private Integer createId;
    private Long createId;
    /**
     * 修改时间
@@ -165,7 +174,7 @@
     */
    @ApiModelProperty(value= "修改人id")
    @TableField("modify_id")
    private Integer modifyId;
    private Long modifyId;
    /**
     * 节点名称
@@ -175,26 +184,6 @@
    private String flowName;
    public ProjectPlan() {}
    public ProjectPlan(Long itemId,Integer weightNum,Integer flowId,Date startTime,Date realStartTime,Date endTime,Date realEndTime,Integer delay,String delayReason,String memo,String dutyDepartment,String dutyMan,Date createTime,Integer createId,Date modifyTime,Integer modifyId,String flowName) {
        this.itemId = itemId;
        this.weightNum = weightNum;
        this.flowId = flowId;
        this.startTime = startTime;
        this.realStartTime = realStartTime;
        this.endTime = endTime;
        this.realEndTime = realEndTime;
        this.delay = delay;
        this.delayReason = delayReason;
        this.memo = memo;
        this.dutyDepartment = dutyDepartment;
        this.dutyMan = dutyMan;
        this.createTime = createTime;
        this.createId = createId;
        this.modifyTime = modifyTime;
        this.modifyId = modifyId;
        this.flowName = flowName;
    }
//    ProjectPlan projectPlan = new ProjectPlan(
//            null,    // 项目ID[非空]
@@ -216,6 +205,16 @@
//            null    // 节点名称
//    );
    public String getItemId$(){
        ItemService bean = SpringUtils.getBean(ItemService.class);
        Item id = bean.selectOne(new EntityWrapper<Item>()
                .eq("id", this.itemId));
        if (!Cools.isEmpty(id)) {
            return id.getName();
        }
        return null;
    }
    public Long getId() {
        return id;
    }
@@ -256,7 +255,7 @@
        if (Cools.isEmpty(this.startTime)){
            return "";
        }
        return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(this.startTime);
        return new SimpleDateFormat("yyyy-MM-dd").format(this.startTime);
    }
    public void setStartTime(Date startTime) {
@@ -271,7 +270,7 @@
        if (Cools.isEmpty(this.realStartTime)){
            return "";
        }
        return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(this.realStartTime);
        return new SimpleDateFormat("yyyy-MM-dd").format(this.realStartTime);
    }
    public void setRealStartTime(Date realStartTime) {
@@ -286,7 +285,7 @@
        if (Cools.isEmpty(this.endTime)){
            return "";
        }
        return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(this.endTime);
        return new SimpleDateFormat("yyyy-MM-dd").format(this.endTime);
    }
    public void setEndTime(Date endTime) {
@@ -301,7 +300,7 @@
        if (Cools.isEmpty(this.realEndTime)){
            return "";
        }
        return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(this.realEndTime);
        return new SimpleDateFormat("yyyy-MM-dd").format(this.realEndTime);
    }
    public void setRealEndTime(Date realEndTime) {
@@ -363,13 +362,13 @@
        this.createTime = createTime;
    }
    public Integer getCreateId() {
        return createId;
    }
    public void setCreateId(Integer createId) {
        this.createId = createId;
    }
//    public Integer getCreateId() {
//        return createId;
//    }
//
//    public void setCreateId(Integer createId) {
//        this.createId = createId;
//    }
    public Date getModifyTime() {
        return modifyTime;
@@ -385,14 +384,14 @@
    public void setModifyTime(Date modifyTime) {
        this.modifyTime = modifyTime;
    }
    public Integer getModifyId() {
        return modifyId;
    }
    public void setModifyId(Integer modifyId) {
        this.modifyId = modifyId;
    }
//
//    public Integer getModifyId() {
//        return modifyId;
//    }
//
//    public void setModifyId(Integer modifyId) {
//        this.modifyId = modifyId;
//    }
    public String getFlowName() {
        return flowName;
@@ -402,5 +401,24 @@
        this.flowName = flowName;
    }
//    public String getItemId$(){
//        ItemService itemService = SpringUtils.getBean(ItemService.class);
//        Item id = itemService.selectOne(new EntityWrapper<Item>()
//                .eq("id", this.getItemId()));
//        if (!Cools.isEmpty(id)) {
//
//            return id.getName();
//        }else {
//            return null;
//        }
//    }
    public String getFlowId$(){
        FlowStatusService bean = SpringUtils.getBean(FlowStatusService.class);
        FlowStatus id = bean.selectOne(new EntityWrapper<FlowStatus>()
                .eq("id", this.flowId));
        if (!Cools.isEmpty(id)) {
            return id.getName();
        }
        return null;
    }
}