bug修复;

This commit is contained in:
王奎兴
2025-12-13 22:59:26 +08:00
parent 4248a334ab
commit 0beab25b52
7 changed files with 37 additions and 6 deletions
@@ -53,4 +53,9 @@ public class CreateMaterialCommand {
@ApiModelProperty(value = "物料内容")
private String materialContent;
/**组织相关*/
private String topOrganizationId;
/**组织相关*/
private String organizationId;
}
@@ -38,7 +38,7 @@ public class MaterialCommandService {
command.getWeight(),
command.getMaterialVolume(),
command.getMaterialContent(),
command.getRemark(),
command.getRemark(),command.getTopOrganizationId(),command.getOrganizationId(),
codeGenerator
);
return materialRepository.save(material).getId();
@@ -61,7 +61,7 @@ public class MaterialCommandService {
command.getWeight(),
command.getMaterialVolume(),
command.getMaterialContent(),
command.getRemark()
command.getRemark(),command.getTopOrganizationId(),command.getOrganizationId()
);
materialRepository.update(material);
@@ -47,4 +47,8 @@ public class UpdateMaterialCommand {
@ApiModelProperty(value = "物料内容")
private String materialContent;
/**组织相关*/
private String topOrganizationId;
/**组织相关*/
private String organizationId;
}
@@ -33,6 +33,10 @@ public class Material {
private String materialContent;
private LocalDateTime createTime;
private LocalDateTime updateTime;
/**组织相关*/
private String topOrganizationId;
/**组织相关*/
private String organizationId;
// 私有构造方法
@@ -47,7 +51,7 @@ public class Material {
BigDecimal weight,
BigDecimal materialVolume,
String materialContent,
String remark) {
String remark,String topOrganizationId,String organizationId ) {
validateRequiredFields( category, name, unit);
this.ownerId = ownerId;
this.shipper = shipper;
@@ -63,6 +67,8 @@ public class Material {
this.materialContent = materialContent;
this.createTime = LocalDateTime.now();
this.updateTime = LocalDateTime.now();
this.topOrganizationId = topOrganizationId;
this.organizationId = organizationId;
}
@@ -78,10 +84,11 @@ public class Material {
BigDecimal weight,
BigDecimal materialVolume,
String materialContent,
String remark,
String remark,String topOrganizationId,String organizationId,
MaterialCodeGenerator codeGenerator) {
Material material = new Material(ownerId, shipper, category, name, model,
unit, value, codeManaged, weight, materialVolume, materialContent, remark
unit, value, codeManaged, weight, materialVolume, materialContent, remark,
topOrganizationId,organizationId
);
material.materialCode = codeGenerator.generate();
return material;
@@ -97,7 +104,7 @@ public class Material {
BigDecimal weight,
BigDecimal materialVolume,
String materialContent,
String remark) {
String remark,String topOrganizationId,String organizationId ) {
this.ownerId = ownerId;
this.shipper = shipper;
this.category = category;
@@ -111,6 +118,8 @@ public class Material {
this.codeManaged = codeManaged;
this.remark = remark;
this.updateTime = LocalDateTime.now();
this.topOrganizationId = topOrganizationId;
this.organizationId = organizationId;
}
// 保留的核心校验