mirror of
https://codeup.aliyun.com/64f7d6b8ce01efaafef1e678/coal/coal.git
synced 2026-01-25 07:46:40 +08:00
完善
This commit is contained in:
@@ -4,5 +4,25 @@ import cn.lihongjie.coal.base.dto.OrgCommonDto;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import org.hibernate.annotations.Comment;
|
||||
|
||||
import java.time.LocalDate;
|
||||
|
||||
@Data
|
||||
public class CreateDeliveryInformationDto extends OrgCommonDto {}
|
||||
public class CreateDeliveryInformationDto extends OrgCommonDto {
|
||||
|
||||
private LocalDate deliveryDate;
|
||||
|
||||
|
||||
@Comment("收货数量")
|
||||
private Double amount;
|
||||
|
||||
|
||||
@Comment("车数")
|
||||
private Double carCount;
|
||||
|
||||
|
||||
private String purchaseOrder;
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -4,5 +4,22 @@ import cn.lihongjie.coal.base.dto.OrgCommonDto;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import org.hibernate.annotations.Comment;
|
||||
|
||||
import java.time.LocalDate;
|
||||
|
||||
@Data
|
||||
public class DeliveryInformationDto extends OrgCommonDto {}
|
||||
public class DeliveryInformationDto extends OrgCommonDto {
|
||||
|
||||
|
||||
private LocalDate deliveryDate;
|
||||
|
||||
|
||||
@Comment("收货数量")
|
||||
private Double amount;
|
||||
|
||||
|
||||
@Comment("车数")
|
||||
private Double carCount;
|
||||
|
||||
}
|
||||
|
||||
@@ -4,5 +4,25 @@ import cn.lihongjie.coal.base.dto.OrgCommonDto;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import org.hibernate.annotations.Comment;
|
||||
|
||||
import java.time.LocalDate;
|
||||
|
||||
@Data
|
||||
public class UpdateDeliveryInformationDto extends OrgCommonDto {}
|
||||
public class UpdateDeliveryInformationDto extends OrgCommonDto {
|
||||
|
||||
|
||||
private LocalDate deliveryDate;
|
||||
|
||||
|
||||
@Comment("收货数量")
|
||||
private Double amount;
|
||||
|
||||
|
||||
@Comment("车数")
|
||||
private Double carCount;
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -2,7 +2,29 @@ package cn.lihongjie.coal.purchaseOrder.dto;
|
||||
|
||||
import cn.lihongjie.coal.base.dto.OrgCommonDto;
|
||||
|
||||
import jakarta.persistence.ManyToOne;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import org.hibernate.annotations.Comment;
|
||||
|
||||
@Data
|
||||
public class CreatePurchaseOrderDto extends OrgCommonDto {}
|
||||
public class CreatePurchaseOrderDto extends OrgCommonDto {
|
||||
|
||||
@ManyToOne
|
||||
@Comment("煤炭信息")
|
||||
private String coalInfo;
|
||||
|
||||
|
||||
@Comment("采购数量")
|
||||
private Double amount;
|
||||
|
||||
|
||||
|
||||
@Comment("采购单价")
|
||||
private Double price;
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -1,8 +1,60 @@
|
||||
package cn.lihongjie.coal.purchaseOrder.dto;
|
||||
|
||||
import cn.lihongjie.coal.base.dto.OrgCommonDto;
|
||||
import cn.lihongjie.coal.coalInfo.dto.CoalInfoDto;
|
||||
import cn.lihongjie.coal.deliveryInformation.entity.DeliveryInformationEntity;
|
||||
|
||||
import jakarta.persistence.ManyToOne;
|
||||
import jakarta.persistence.OneToMany;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import org.hibernate.annotations.Comment;
|
||||
import org.hibernate.annotations.Formula;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Data
|
||||
public class PurchaseOrderDto extends OrgCommonDto {}
|
||||
public class PurchaseOrderDto extends OrgCommonDto {
|
||||
|
||||
|
||||
@ManyToOne
|
||||
@Comment("煤炭信息")
|
||||
private CoalInfoDto coalInfo;
|
||||
|
||||
@OneToMany(mappedBy = "purchaseOrder")
|
||||
private List<DeliveryInformationEntity> deliveryInformationList;
|
||||
|
||||
|
||||
@Comment("采购数量")
|
||||
private Double amount;
|
||||
|
||||
|
||||
@Formula("(select sum(d.amount) from t_delivery_information d where d.purchase_order_id = id)")
|
||||
private Double receivedAmount;
|
||||
|
||||
|
||||
@Formula("(amount - (select sum(d.amount) from t_delivery_information d where d.purchase_order_id = id))")
|
||||
private Double leftAmount;
|
||||
|
||||
|
||||
@Comment("采购单价")
|
||||
private Double price;
|
||||
|
||||
@Formula("(amount * price)")
|
||||
private Double total;
|
||||
|
||||
@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 = 'purchaseOrder.status'\n"
|
||||
+ " and i.code = order_status)")
|
||||
private String orderStatusName;
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -2,7 +2,27 @@ package cn.lihongjie.coal.purchaseOrder.dto;
|
||||
|
||||
import cn.lihongjie.coal.base.dto.OrgCommonDto;
|
||||
|
||||
import jakarta.persistence.ManyToOne;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import org.hibernate.annotations.Comment;
|
||||
|
||||
@Data
|
||||
public class UpdatePurchaseOrderDto extends OrgCommonDto {}
|
||||
public class UpdatePurchaseOrderDto extends OrgCommonDto {
|
||||
|
||||
|
||||
@ManyToOne
|
||||
@Comment("煤炭信息")
|
||||
private String coalInfo;
|
||||
|
||||
|
||||
@Comment("采购数量")
|
||||
private Double amount;
|
||||
|
||||
|
||||
|
||||
@Comment("采购单价")
|
||||
private Double price;
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user