| | |
| | | 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 java.io.Serializable; |
| | | import java.text.SimpleDateFormat; |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | |
| | | @Data |
| | | @TableName("man_item") |
| | | public class Item implements Serializable { |
| | | |
| | |
| | | * 开始时间 |
| | | */ |
| | | @ApiModelProperty(value= "开始时间") |
| | | @TableField("start_time") |
| | | @TableField(value = "start_time", strategy = FieldStrategy.IGNORED) |
| | | @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") |
| | | private Date startTime; |
| | | |
| | | /** |
| | | * 结束时间 |
| | | */ |
| | | @ApiModelProperty(value= "结束时间") |
| | | @TableField("end_time") |
| | | @TableField(value = "end_time" ,strategy = FieldStrategy.IGNORED) |
| | | @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") |
| | | private Date endTime; |
| | | |
| | | /** |
| | | * 状态 1: 正常 0: 禁用 |
| | | */ |
| | | @ApiModelProperty(value= "状态 1: 正常 0: 禁用 ") |
| | | @ApiModelProperty(value= "状态 1: 正常 0: 完结 ") |
| | | private Integer status; |
| | | |
| | | /** |
| | |
| | | */ |
| | | @ApiModelProperty(value= "添加时间") |
| | | @TableField("create_time") |
| | | @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") |
| | | private Date createTime; |
| | | |
| | | /** |
| | |
| | | */ |
| | | @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; |
| | | |
| | | public Item() {} |
| | | |
| | | public Item(Long hostId, String uuid,String name,String inUuid,String cstmrUuid,String cstmr,String member,String leader,Date startTime,Date endTime,Integer status,Long createBy,Date createTime,Long updateBy,Date updateTime,String memo) { |
| | | this.hostId = hostId; |
| | | this.name = name; |
| | | this.inUuid = inUuid; |
| | | this.cstmrUuid = cstmrUuid; |
| | | this.cstmr = cstmr; |
| | | this.member = member; |
| | | this.leader = leader; |
| | | this.startTime = startTime; |
| | | this.endTime = endTime; |
| | | this.status = status; |
| | | this.createBy = createBy; |
| | | this.createTime = createTime; |
| | | this.updateBy = updateBy; |
| | | this.updateTime = updateTime; |
| | | this.memo = memo; |
| | | } |
| | | |
| | | |
| | | // Item item = new Item( |
| | | // null, // 项目编号[非空] |
| | |
| | | // null // 备注 |
| | | // ); |
| | | |
| | | public String getProjectStatus$(){ |
| | | ProjectStatusService bean = SpringUtils.getBean(ProjectStatusService.class); |
| | | ProjectStatus id = bean.selectOne(new EntityWrapper<ProjectStatus>().eq("id", this.projectStatus)); |
| | | if (!Cools.isEmpty(this.id)) { |
| | | return id.getStatusName(); |
| | | } |
| | | return null; |
| | | } |
| | | public Long getId() { |
| | | return id; |
| | | } |
| | |
| | | public String getUuid() { |
| | | return uuid; |
| | | } |
| | | |
| | | |
| | | public void setUuid(String uuid) { |
| | | this.uuid = uuid; |
| | |
| | | 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; |
| | | } |
| | |
| | | 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) { |
| | |
| | | switch (this.status){ |
| | | case 1: |
| | | return "正常"; |
| | | case 0: |
| | | case 3: |
| | | return "完结"; |
| | | case 2: |
| | | return "禁用"; |
| | | default: |
| | | return String.valueOf(this.status); |
| | |
| | | } |
| | | return null; |
| | | } |
| | | public String getCstmrUuid$(){ |
| | | CstmrService bean = SpringUtils.getBean(CstmrService.class); |
| | | Cstmr id = bean.selectOne(new EntityWrapper<Cstmr>() |
| | | .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<ProjectType>() |
| | | .eq("id", this.type)); |
| | | if (!Cools.isEmpty(id)) { |
| | | return id.getTypeName(); |
| | | } |
| | | return null; |
| | | } |
| | | |
| | | public void setUpdateBy(Long updateBy) { |
| | | this.updateBy = updateBy; |
| | |
| | | } |
| | | |
| | | |
| | | |
| | | } |