mirror of
https://codeup.aliyun.com/64f7d6b8ce01efaafef1e678/coal/coal.git
synced 2026-01-25 15:55:18 +08:00
完善订单
This commit is contained in:
@@ -61,6 +61,11 @@ public class CoalWashingDailyAnalysisService
|
||||
CoalWashingDailyAnalysisEntity entity = mapper.toEntity(request);
|
||||
entity.setOrganizationId(Ctx.currentUser().getOrganizationId());
|
||||
validate(entity);
|
||||
|
||||
if (entity.getProduct()!=null){
|
||||
entity.setName(entity.getProduct().getName());
|
||||
}
|
||||
|
||||
this.repository.save(entity);
|
||||
return getById(entity.getId());
|
||||
}
|
||||
@@ -102,7 +107,9 @@ public class CoalWashingDailyAnalysisService
|
||||
|
||||
|
||||
validate(entity);
|
||||
|
||||
if (entity.getProduct()!=null){
|
||||
entity.setName(entity.getProduct().getName());
|
||||
}
|
||||
this.repository.save(entity);
|
||||
|
||||
return getById(entity.getId());
|
||||
|
||||
@@ -31,6 +31,8 @@ public class PurchaseOrderEntity extends OrgCommonEntity {
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@OneToMany(mappedBy = "purchaseOrder", fetch = FetchType.LAZY)
|
||||
private List<WeightDeviceDataEntity> weightDataList;
|
||||
|
||||
@@ -90,12 +92,10 @@ public class PurchaseOrderEntity extends OrgCommonEntity {
|
||||
@Override
|
||||
public void prePersist() {
|
||||
super.prePersist();
|
||||
this.startTime = this.purchaseDate==null ? null: this.purchaseDate.atStartOfDay();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void preUpdate() {
|
||||
super.preUpdate();
|
||||
this.startTime = this.purchaseDate==null ? null: this.purchaseDate.atStartOfDay();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -103,12 +103,10 @@ public class SaleOrderEntity extends OrgCommonEntity {
|
||||
@Override
|
||||
public void prePersist() {
|
||||
super.prePersist();
|
||||
this.startTime = this.saleDate==null ? null: this.saleDate.atStartOfDay();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void preUpdate() {
|
||||
super.preUpdate();
|
||||
this.startTime = this.saleDate==null ? null: this.saleDate.atStartOfDay();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2,9 +2,16 @@ package cn.lihongjie.coal.supplier.dto;
|
||||
|
||||
import cn.lihongjie.coal.base.dto.OrgCommonDto;
|
||||
|
||||
import io.hypersistence.utils.hibernate.type.array.ListArrayType;
|
||||
|
||||
import jakarta.persistence.Column;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import org.hibernate.annotations.Comment;
|
||||
import org.hibernate.annotations.Type;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Data
|
||||
public class CreateSupplierDto extends OrgCommonDto {
|
||||
@@ -26,4 +33,11 @@ public class CreateSupplierDto extends OrgCommonDto {
|
||||
|
||||
@Comment("是否客户")
|
||||
private Boolean isCustomer;
|
||||
|
||||
|
||||
|
||||
@Comment("衡器宝别名")
|
||||
@Column(columnDefinition = "text[]")
|
||||
@Type(ListArrayType.class)
|
||||
private List<String> weightDataAlias;
|
||||
}
|
||||
|
||||
@@ -2,9 +2,16 @@ package cn.lihongjie.coal.supplier.dto;
|
||||
|
||||
import cn.lihongjie.coal.base.dto.OrgCommonDto;
|
||||
|
||||
import io.hypersistence.utils.hibernate.type.array.ListArrayType;
|
||||
|
||||
import jakarta.persistence.Column;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import org.hibernate.annotations.Comment;
|
||||
import org.hibernate.annotations.Type;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Data
|
||||
public class SupplierDto extends OrgCommonDto {
|
||||
@@ -25,4 +32,11 @@ public class SupplierDto extends OrgCommonDto {
|
||||
|
||||
@Comment("是否客户")
|
||||
private Boolean isCustomer;
|
||||
|
||||
|
||||
|
||||
@Comment("衡器宝别名")
|
||||
@Column(columnDefinition = "text[]")
|
||||
@Type(ListArrayType.class)
|
||||
private List<String> weightDataAlias;
|
||||
}
|
||||
|
||||
@@ -2,9 +2,16 @@ package cn.lihongjie.coal.supplier.dto;
|
||||
|
||||
import cn.lihongjie.coal.base.dto.OrgCommonDto;
|
||||
|
||||
import io.hypersistence.utils.hibernate.type.array.ListArrayType;
|
||||
|
||||
import jakarta.persistence.Column;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import org.hibernate.annotations.Comment;
|
||||
import org.hibernate.annotations.Type;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Data
|
||||
public class UpdateSupplierDto extends OrgCommonDto {
|
||||
@@ -26,4 +33,11 @@ public class UpdateSupplierDto extends OrgCommonDto {
|
||||
|
||||
@Comment("是否客户")
|
||||
private Boolean isCustomer;
|
||||
|
||||
|
||||
|
||||
@Comment("衡器宝别名")
|
||||
@Column(columnDefinition = "text[]")
|
||||
@Type(ListArrayType.class)
|
||||
private List<String> weightDataAlias;
|
||||
}
|
||||
|
||||
@@ -2,11 +2,17 @@ package cn.lihongjie.coal.supplier.entity;
|
||||
|
||||
import cn.lihongjie.coal.base.entity.OrgCommonEntity;
|
||||
|
||||
import io.hypersistence.utils.hibernate.type.array.ListArrayType;
|
||||
|
||||
import jakarta.persistence.Column;
|
||||
import jakarta.persistence.Entity;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import org.hibernate.annotations.Comment;
|
||||
import org.hibernate.annotations.Type;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Data
|
||||
@Entity
|
||||
@@ -32,4 +38,13 @@ public class SupplierEntity extends OrgCommonEntity {
|
||||
|
||||
@Comment("是否客户")
|
||||
private Boolean isCustomer;
|
||||
|
||||
|
||||
|
||||
|
||||
@Comment("衡器宝别名")
|
||||
@Column(columnDefinition = "text[]")
|
||||
@Type(ListArrayType.class)
|
||||
private List<String> weightDataAlias;
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user