mirror of
https://codeup.aliyun.com/64f7d6b8ce01efaafef1e678/coal/coal.git
synced 2026-01-25 15:55:18 +08:00
完善设备工单
This commit is contained in:
@@ -2,7 +2,45 @@ package cn.lihongjie.coal.deviceWorkOrder.dto;
|
||||
|
||||
import cn.lihongjie.coal.base.dto.OrgCommonDto;
|
||||
|
||||
import jakarta.persistence.ManyToOne;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import org.hibernate.annotations.Comment;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.List;
|
||||
|
||||
@Data
|
||||
public class CreateDeviceWorkOrderDto extends OrgCommonDto {}
|
||||
public class CreateDeviceWorkOrderDto extends OrgCommonDto {
|
||||
|
||||
|
||||
|
||||
@Comment("提单人名称")
|
||||
private String proposerName;
|
||||
|
||||
@Comment("提单人联系方式")
|
||||
private String proposerContact;
|
||||
|
||||
|
||||
@ManyToOne
|
||||
private String device;
|
||||
|
||||
@Comment("工单时间")
|
||||
private LocalDateTime time;
|
||||
|
||||
@Comment("工单类型")
|
||||
private String type;
|
||||
|
||||
|
||||
@Comment("工单状态")
|
||||
private String orderStatus;
|
||||
|
||||
|
||||
|
||||
|
||||
private List<CreateDeviceWorkOrderDto> details;
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -1,12 +1,79 @@
|
||||
package cn.lihongjie.coal.deviceWorkOrder.dto;
|
||||
|
||||
import cn.lihongjie.coal.base.dto.OrgCommonDto;
|
||||
import cn.lihongjie.coal.device.entity.DeviceEntity;
|
||||
import cn.lihongjie.coal.deviceWorkOrderDetail.dto.DeviceWorkOrderDetailDto;
|
||||
import cn.lihongjie.coal.user.entity.UserEntity;
|
||||
|
||||
import jakarta.persistence.ManyToOne;
|
||||
import jakarta.persistence.OneToMany;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import org.hibernate.annotations.ColumnDefault;
|
||||
import org.hibernate.annotations.Comment;
|
||||
import org.hibernate.annotations.Formula;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.List;
|
||||
|
||||
@Data
|
||||
public class DeviceWorkOrderDto extends OrgCommonDto {
|
||||
|
||||
@Comment("提单人名称")
|
||||
private String proposerName;
|
||||
|
||||
@Comment("提单人联系方式")
|
||||
private String proposerContact;
|
||||
|
||||
|
||||
@ManyToOne
|
||||
private DeviceEntity device;
|
||||
|
||||
@Comment("工单时间")
|
||||
private LocalDateTime time;
|
||||
|
||||
@Comment("工单类型")
|
||||
private String type;
|
||||
|
||||
@Formula(
|
||||
"(select i.name\n"
|
||||
+ "from t_dictionary d,\n"
|
||||
+ " t_dictionary_item i\n"
|
||||
+ "where d.id = i.dictionary_id\n"
|
||||
+ " and d.code = 'device.workOrder.status'\n"
|
||||
+ " and i.code = type)")
|
||||
private String typeName;
|
||||
|
||||
@Comment("工单状态")
|
||||
private String orderStatus;
|
||||
|
||||
@Formula(
|
||||
"(select i.name\n"
|
||||
+ "from t_dictionary d,\n"
|
||||
+ " t_dictionary_item i\n"
|
||||
+ "where d.id = i.dictionary_id\n"
|
||||
+ " and d.code = 'device.workOrder.status'\n"
|
||||
+ " and i.code = order_status)")
|
||||
private String orderStatusName;
|
||||
|
||||
@Comment("归档状态")
|
||||
@ColumnDefault("'0'")
|
||||
private String archiveStatus;
|
||||
|
||||
@Formula(
|
||||
"(select i.name\n"
|
||||
+ "from t_dictionary d,\n"
|
||||
+ " t_dictionary_item i\n"
|
||||
+ "where d.id = i.dictionary_id\n"
|
||||
+ " and d.code = 'archiveStatus'\n"
|
||||
+ " and i.code = archive_status)")
|
||||
private String archiveStatusName;
|
||||
|
||||
|
||||
private List<DeviceWorkOrderDetailDto> details;
|
||||
|
||||
|
||||
@OneToMany
|
||||
private List<UserEntity> workers;
|
||||
}
|
||||
|
||||
@@ -2,7 +2,40 @@ package cn.lihongjie.coal.deviceWorkOrder.dto;
|
||||
|
||||
import cn.lihongjie.coal.base.dto.OrgCommonDto;
|
||||
|
||||
import jakarta.persistence.ManyToOne;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import org.hibernate.annotations.Comment;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.List;
|
||||
|
||||
@Data
|
||||
public class UpdateDeviceWorkOrderDto extends OrgCommonDto {}
|
||||
public class UpdateDeviceWorkOrderDto extends OrgCommonDto {
|
||||
|
||||
@Comment("提单人名称")
|
||||
private String proposerName;
|
||||
|
||||
@Comment("提单人联系方式")
|
||||
private String proposerContact;
|
||||
|
||||
|
||||
@ManyToOne
|
||||
private String device;
|
||||
|
||||
@Comment("工单时间")
|
||||
private LocalDateTime time;
|
||||
|
||||
@Comment("工单类型")
|
||||
private String type;
|
||||
|
||||
|
||||
@Comment("工单状态")
|
||||
private String orderStatus;
|
||||
|
||||
|
||||
|
||||
|
||||
private List<CreateDeviceWorkOrderDto> details;
|
||||
}
|
||||
|
||||
@@ -1,10 +1,12 @@
|
||||
package cn.lihongjie.coal.deviceWorkOrder.entity;
|
||||
|
||||
import cn.lihongjie.coal.base.entity.OrgCommonEntity;
|
||||
import cn.lihongjie.coal.device.entity.DeviceEntity;
|
||||
import cn.lihongjie.coal.deviceWorkOrderDetail.entity.DeviceWorkOrderDetailEntity;
|
||||
import cn.lihongjie.coal.user.entity.UserEntity;
|
||||
|
||||
import jakarta.persistence.Entity;
|
||||
import jakarta.persistence.ManyToOne;
|
||||
import jakarta.persistence.OneToMany;
|
||||
|
||||
import lombok.Data;
|
||||
@@ -28,6 +30,10 @@ public class DeviceWorkOrderEntity extends OrgCommonEntity {
|
||||
@Comment("提单人联系方式")
|
||||
private String proposerContact;
|
||||
|
||||
|
||||
@ManyToOne
|
||||
private DeviceEntity device;
|
||||
|
||||
@Comment("工单时间")
|
||||
private LocalDateTime time;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user