package zy.cloud.wms.manager.entity; import com.baomidou.mybatisplus.annotations.TableField; import com.baomidou.mybatisplus.annotations.TableId; import com.baomidou.mybatisplus.annotations.TableName; import com.baomidou.mybatisplus.enums.FieldStrategy; import com.baomidou.mybatisplus.enums.IdType; import com.baomidou.mybatisplus.mapper.EntityWrapper; import com.core.common.Cools; import com.core.common.SpringUtils; import io.swagger.annotations.ApiModelProperty; import lombok.Data; import org.springframework.format.annotation.DateTimeFormat; import zy.cloud.wms.manager.service.CstmrService; import zy.cloud.wms.manager.service.ProjectStatusService; import zy.cloud.wms.manager.service.ProjectTypeService; import zy.cloud.wms.system.entity.Host; import zy.cloud.wms.system.entity.User; import zy.cloud.wms.system.service.HostService; import zy.cloud.wms.system.service.UserService; import java.io.Serializable; import java.text.SimpleDateFormat; import java.util.Date; import java.util.List; @Data @TableName("man_item") public class Item implements Serializable { private static final long serialVersionUID = 1L; /** * ID */ @ApiModelProperty(value= "ID") @TableId(value = "id", type = IdType.AUTO) private Long id; /** * 所属项目 */ @ApiModelProperty(value= "所属项目") @TableField("host_id") private Long hostId; /** * 项目编号 */ @ApiModelProperty(value= "项目编号") @TableId(value = "uuid", type = IdType.INPUT) private String uuid; /** * 项目名称 */ @ApiModelProperty(value= "项目名称") private String name; /** * 内部编号 */ @ApiModelProperty(value= "内部编号") @TableField("in_uuid") private String inUuid; /** * 客户编号 */ @ApiModelProperty(value= "客户编号") @TableField("cstmr_uuid") private String cstmrUuid; /** * 客户 */ @ApiModelProperty(value= "客户") private String cstmr; /** * 项目成员 */ @ApiModelProperty(value= "项目成员") private String member; /** * 项目经理 */ @ApiModelProperty(value= "项目经理") private String leader; /** * 开始时间 */ @ApiModelProperty(value= "开始时间") @TableField(value = "start_time", strategy = FieldStrategy.IGNORED) @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") private Date startTime; /** * 结束时间 */ @ApiModelProperty(value= "结束时间") @TableField(value = "end_time" ,strategy = FieldStrategy.IGNORED) @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") private Date endTime; /** * 状态 1: 正常 0: 禁用 */ @ApiModelProperty(value= "状态 1: 正常 0: 完结 ") private Integer status; /** * 添加人员 */ @ApiModelProperty(value= "添加人员") @TableField("create_by") private Long createBy; /** * 添加时间 */ @ApiModelProperty(value= "添加时间") @TableField("create_time") @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") private Date createTime; /** * 修改人员 */ @ApiModelProperty(value= "修改人员") @TableField("update_by") private Long updateBy; /** * 修改时间 */ @ApiModelProperty(value= "修改时间") @TableField("update_time") @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") private Date updateTime; /** * 备注 */ @ApiModelProperty(value= "备注") private String memo; @TableField("type") private String type; @TableField(value = "real_start_time", strategy = FieldStrategy.IGNORED) @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") private Date realStartTime; @TableField(value = "real_end_time", strategy = FieldStrategy.IGNORED) @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") private Date realEndTime; @TableField("real_month") private Integer realMonth; @TableField("duty_department") private String dutyDepartment; @TableField("duty_man") private String dutyMan; @TableField("origin_area") private String originArea; @TableField("project_status") private Integer projectStatus; /** * 订单类型 */ @ApiModelProperty(value= "订单类型") @TableField("orderDesc") private String orderDesc; /** * 业务员 */ @ApiModelProperty(value= "业务员") @TableField("salesman") private String salesman; /** * 售前核价金额 */ @ApiModelProperty(value= "售前核价金额") @TableField("presaleAmt") private Double presaleAmt; /** * 销售预交货期 */ @ApiModelProperty(value= "销售预交货期") @TableField("predeDate") @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") private Date predeDate; /** * 销售预安装期 */ @ApiModelProperty(value= "销售预安装期") @TableField("preinDate") @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") private Date preinDate; /** * 产品重量 */ @ApiModelProperty(value= "产品重量") @TableField("weight") private Double weight; /** * 是否安装 */ @ApiModelProperty(value= "安装") @TableField("installMk") private Integer installMk; /** * 是否运输 */ @ApiModelProperty(value= "运输") @TableField("deliveryMk") private Integer deliveryMk; /** * 客户联系人 */ @ApiModelProperty(value= "客户联系人") @TableField("custMan") private String custMan; /** * 联系方式 */ @ApiModelProperty(value= "联系方式") @TableField("custMobile") private String custMobile; /** * 联系地址 */ @ApiModelProperty(value= "联系地址") @TableField("custAdress") private String custAdress; /** * 进度 */ @ApiModelProperty(value= "进度") @TableField("progressRate") private String progressRate; /** * 车辆信息 */ @ApiModelProperty(value= "车辆信息") @TableField("planCarInfo") private String planCarInfo; /** * 预计发货日期 */ @ApiModelProperty(value= "预计发货日期") @TableField("plandeDate") @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") private Date plandeDate; /** * 实际发货日期 */ @ApiModelProperty(value= "实际发货日期") @TableField("realdeDate") @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") private Date realdeDate; /** * 预计安装日期 */ @ApiModelProperty(value= "预计安装日期") @TableField("planinDate") @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") private Date planinDate; /** * 实际安装日期 */ @ApiModelProperty(value= "实际安装日期") @TableField("realinDate") @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") private Date realinDate; /** * 预计运费 */ @ApiModelProperty(value= "预计运费") @TableField("plandeAmt") private Double plandeAmt; /** * 实际运费 */ @ApiModelProperty(value= "实际运费") @TableField("realdeAmt") private Double realdeAmt; /** * 预计安装费 */ @ApiModelProperty(value= "预计安装费") @TableField("planinAmt") private Double planinAmt; /** * 实际安装费 */ @ApiModelProperty(value= "实际安装费") @TableField("realinAmt") private Double realinAmt; /** * 预计初验日期 */ @ApiModelProperty(value= "预计初验日期") @TableField("planFADate") @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") private Date planFADate; /** * 实际初验日期 */ @ApiModelProperty(value= "实际初验日期") @TableField("realFADate") @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") private Date realFADate; /** * 预计终验日期 */ @ApiModelProperty(value= "预计终验日期") @TableField("planLADate") @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") private Date planLADate; /** * 实际终验日期 */ @ApiModelProperty(value= "实际终验日期") @TableField("realLADate") @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") private Date realLADate; /** * 预计车辆数量 */ @ApiModelProperty(value= "预计车辆数量") @TableField("planCarnumber") private Integer planCarnumber; /** * 预计车辆数量 */ @ApiModelProperty(value= "超出金额") @TableField("Excess_amount") private Double ExcessAmount; /** * 预计车辆数量 */ @ApiModelProperty(value= "超出天数") @TableField("Excess_time") private Integer ExcessTime; public Item() {} // Item item = new Item( // null, // 项目编号[非空] // null, // 项目名称 // null, // 内部编号 // null, // 客户编号 // null, // 客户 // null, // 项目成员 // null, // 项目经理 // null, // 开始时间 // null, // 结束时间 // null, // 状态 // null, // 添加人员 // null, // 添加时间 // null, // 修改人员 // null, // 修改时间 // null // 备注 // ); public String getProjectStatus$(){ ProjectStatusService bean = SpringUtils.getBean(ProjectStatusService.class); ProjectStatus id = bean.selectOne(new EntityWrapper().eq("id", this.projectStatus)); if (!Cools.isEmpty(this.id)) { return id.getStatusName(); } return null; } public Long getId() { return id; } public void setId(Long id) { this.id = id; } public Long getHostId() { return hostId; } public void setHostId(Long hostId) { this.hostId = hostId; } public String getHostId$(){ HostService service = SpringUtils.getBean(HostService.class); Host host = service.selectById(this.hostId); if (!Cools.isEmpty(host)){ return String.valueOf(host.getName()); } return null; } public String getUuid() { return uuid; } public void setUuid(String uuid) { this.uuid = uuid; } public String getName() { return name; } public void setName(String name) { this.name = name; } public String getInUuid() { return inUuid; } public void setInUuid(String inUuid) { this.inUuid = inUuid; } public String getCstmrUuid() { return cstmrUuid; } public void setCstmrUuid(String cstmrUuid) { this.cstmrUuid = cstmrUuid; } public String getCstmr() { return cstmr; } public void setCstmr(String cstmr) { this.cstmr = cstmr; } public String getMember() { return member; } public void setMember(String member) { this.member = member; } public String getLeader() { return leader; } public void setLeader(String leader) { this.leader = leader; } public Date getStartTime() { return startTime; } public String getStartTime$(){ if (Cools.isEmpty(this.startTime)){ return ""; } return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(this.startTime); } public String getStartTime0$(){ if (Cools.isEmpty(this.startTime)){ return ""; } return new SimpleDateFormat("yyyy-MM-dd").format(this.startTime); } public void setStartTime(Date startTime) { this.startTime = startTime; } public Date getEndTime() { return endTime; } public String getEndTime$(){ if (Cools.isEmpty(this.endTime)){ return ""; } return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(this.endTime); } public String getEndTime0$(){ if (Cools.isEmpty(this.endTime)){ return ""; } return new SimpleDateFormat("yyyy-MM-dd").format(this.endTime); } public void setEndTime(Date endTime) { this.endTime = endTime; } public Integer getStatus() { return status; } public String getStatus$(){ if (null == this.status){ return null; } switch (this.status){ case 1: return "正常"; case 3: return "完结"; case 2: return "禁用"; default: return String.valueOf(this.status); } } public String getInstallMk$(){ if (null == this.installMk){ return null; } switch (this.installMk){ case 0: return "否"; case 1: return "是"; default: return String.valueOf(this.installMk); } } public String getDeliveryMk$(){ if (null == this.deliveryMk){ return null; } switch (this.deliveryMk){ case 0: return "否"; case 1: return "是"; default: return String.valueOf(this.deliveryMk); } } public void setStatus(Integer status) { this.status = status; } public Long getCreateBy() { return createBy; } public String getCreateBy$(){ UserService service = SpringUtils.getBean(UserService.class); User user = service.selectById(this.createBy); if (!Cools.isEmpty(user)){ return String.valueOf(user.getNickname()); } return null; } public void setCreateBy(Long createBy) { this.createBy = createBy; } public Date getCreateTime() { return createTime; } public String getCreateTime$(){ if (Cools.isEmpty(this.createTime)){ return ""; } return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(this.createTime); } public void setCreateTime(Date createTime) { this.createTime = createTime; } public Long getUpdateBy() { return updateBy; } public String getUpdateBy$(){ UserService service = SpringUtils.getBean(UserService.class); User user = service.selectById(this.updateBy); if (!Cools.isEmpty(user)){ return String.valueOf(user.getNickname()); } return null; } public String getCstmrUuid$(){ CstmrService bean = SpringUtils.getBean(CstmrService.class); Cstmr id = bean.selectOne(new EntityWrapper() .eq("id", this.cstmrUuid)); if (!Cools.isEmpty(id)) { return id.getName(); } return null; } public String getRealStartTime$(){ if (!Cools.isEmpty(this.realStartTime)) { return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(this.realStartTime); }else { return ""; } } public String getRealStartTime0$(){ if (!Cools.isEmpty(this.realStartTime)) { return new SimpleDateFormat("yyyy-MM-dd").format(this.realStartTime); }else { return ""; } } public String getRealEndTime$(){ if (!Cools.isEmpty(this.realEndTime)) { return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(this.realEndTime); }else { return ""; } } public String getRealEndTime0$(){ if (!Cools.isEmpty(this.realEndTime)) { return new SimpleDateFormat("yyyy-MM-dd").format(this.realEndTime); }else { return ""; } } public String getType$(){ ProjectTypeService bean = SpringUtils.getBean(ProjectTypeService.class); ProjectType id = bean.selectOne(new EntityWrapper() .eq("id", this.type)); if (!Cools.isEmpty(id)) { return id.getTypeName(); } return null; } public void setUpdateBy(Long updateBy) { this.updateBy = updateBy; } public Date getUpdateTime() { return updateTime; } public String getUpdateTime$(){ if (Cools.isEmpty(this.updateTime)){ return ""; } return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(this.updateTime); } public void setUpdateTime(Date updateTime) { this.updateTime = updateTime; } public String getMemo() { return memo; } public void setMemo(String memo) { this.memo = memo; } public String getPredeDate$(){ if (Cools.isEmpty(this.predeDate)){ return ""; } return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(this.predeDate); } public String getPredeDate0$(){ if (Cools.isEmpty(this.predeDate)){ return ""; } return new SimpleDateFormat("yyyy-MM-dd").format(this.predeDate); } public String getPreinDate$(){ if (Cools.isEmpty(this.preinDate)){ return ""; } return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(this.preinDate); } public String getPreinDate0$(){ if (Cools.isEmpty(this.preinDate)){ return ""; } return new SimpleDateFormat("yyyy-MM-dd").format(this.preinDate); } public String getPlandeDate$(){ if (Cools.isEmpty(this.plandeDate)){ return ""; } return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(this.plandeDate); } public String getPlandeDate0$(){ if (Cools.isEmpty(this.plandeDate)){ return ""; } return new SimpleDateFormat("yyyy-MM-dd").format(this.plandeDate); } public String getRealdeDate$(){ if (Cools.isEmpty(this.realdeDate)){ return ""; } return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(this.realdeDate); } public String getRealdeDate0$(){ if (Cools.isEmpty(this.realdeDate)){ return ""; } return new SimpleDateFormat("yyyy-MM-dd").format(this.realdeDate); } public String getPlaninDate$(){ if (Cools.isEmpty(this.planinDate)){ return ""; } return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(this.planinDate); } public String getPlaninDate0$(){ if (Cools.isEmpty(this.planinDate)){ return ""; } return new SimpleDateFormat("yyyy-MM-dd").format(this.planinDate); } public String getRealinDate$(){ if (Cools.isEmpty(this.realinDate)){ return ""; } return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(this.realinDate); } public String getRealinDate0$(){ if (Cools.isEmpty(this.realinDate)){ return ""; } return new SimpleDateFormat("yyyy-MM-dd").format(this.realinDate); } public String getPlanFADate$(){ if (Cools.isEmpty(this.planFADate)){ return ""; } return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(this.planFADate); } public String getPlanFADate0$(){ if (Cools.isEmpty(this.planFADate)){ return ""; } return new SimpleDateFormat("yyyy-MM-dd").format(this.planFADate); } public String getRealFADate$(){ if (Cools.isEmpty(this.realFADate)){ return ""; } return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(this.realFADate); } public String getRealFADate0$(){ if (Cools.isEmpty(this.realFADate)){ return ""; } return new SimpleDateFormat("yyyy-MM-dd").format(this.realFADate); } public String getPlanLADate$(){ if (Cools.isEmpty(this.planLADate)){ return ""; } return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(this.planLADate); } public String getPlanLADate0$(){ if (Cools.isEmpty(this.planLADate)){ return ""; } return new SimpleDateFormat("yyyy-MM-dd").format(this.planLADate); } public String getRealLADate$(){ if (Cools.isEmpty(this.realLADate)){ return ""; } return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(this.realLADate); } public String getRealLADate0$(){ if (Cools.isEmpty(this.realLADate)){ return ""; } return new SimpleDateFormat("yyyy-MM-dd").format(this.realLADate); } }