diff --git a/src/main/java/com/example/webapi/controller/WeighingRecordController.java b/src/main/java/com/example/webapi/controller/WeighingRecordController.java index d525195..f018e32 100644 --- a/src/main/java/com/example/webapi/controller/WeighingRecordController.java +++ b/src/main/java/com/example/webapi/controller/WeighingRecordController.java @@ -76,7 +76,7 @@ public class WeighingRecordController { @RequestBody WeighingRecord entity) { WeighingRecord weighingRecord= service.save(entity); if(weighingRecord.getMaterielId()!=null){ - Optional result = transferRecordService.findById(weighingRecord.getMaterielId()); + Optional result = transferRecordService.findById(weighingRecord.getWtId()); if( result.isPresent()){ TransferRecord record= result.get(); record .setStatus(1); diff --git a/src/main/java/com/example/webapi/entity/MaterialInfo.java b/src/main/java/com/example/webapi/entity/MaterialInfo.java index cd3b3b3..3d109a8 100644 --- a/src/main/java/com/example/webapi/entity/MaterialInfo.java +++ b/src/main/java/com/example/webapi/entity/MaterialInfo.java @@ -11,6 +11,7 @@ import javax.persistence.*; @ApiModel(description = "品种信息实体") public class MaterialInfo { @Id + @GeneratedValue(strategy = GenerationType.IDENTITY) @Column(name = "ID") @ApiModelProperty(value = "品种ID", example = "1", notes = "主键,自动生成") private Integer id; diff --git a/src/main/java/com/example/webapi/entity/Supplier.java b/src/main/java/com/example/webapi/entity/Supplier.java index 29b8b35..426b3d1 100644 --- a/src/main/java/com/example/webapi/entity/Supplier.java +++ b/src/main/java/com/example/webapi/entity/Supplier.java @@ -11,6 +11,7 @@ import javax.persistence.*; @ApiModel(description = "供应商信息实体") public class Supplier { @Id + @GeneratedValue(strategy = GenerationType.IDENTITY) @Column(name = "ID") @ApiModelProperty(value = "供应商ID", example = "1", notes = "主键,自动生成") private Integer id; diff --git a/src/main/java/com/example/webapi/entity/SupplyVariety.java b/src/main/java/com/example/webapi/entity/SupplyVariety.java index f2ea143..b86918e 100644 --- a/src/main/java/com/example/webapi/entity/SupplyVariety.java +++ b/src/main/java/com/example/webapi/entity/SupplyVariety.java @@ -11,6 +11,7 @@ import javax.persistence.*; @ApiModel(description = "供应标识品种信息实体") public class SupplyVariety { @Id + @GeneratedValue(strategy = GenerationType.IDENTITY) @Column(name = "ID") @ApiModelProperty(value = "记录ID", example = "1", notes = "主键,自动生成") private Integer id; diff --git a/src/main/java/com/example/webapi/entity/TransferRecord.java b/src/main/java/com/example/webapi/entity/TransferRecord.java index 8ac2c07..7a1bc3a 100644 --- a/src/main/java/com/example/webapi/entity/TransferRecord.java +++ b/src/main/java/com/example/webapi/entity/TransferRecord.java @@ -13,6 +13,7 @@ import java.util.Date; @ApiModel(description = "转运记录实体") public class TransferRecord { @Id + @GeneratedValue(strategy = GenerationType.IDENTITY) @Column(name = "ID") @ApiModelProperty(value = "记录ID", example = "1", notes = "主键,自动生成") private Integer id; diff --git a/src/main/java/com/example/webapi/entity/TransportCompany.java b/src/main/java/com/example/webapi/entity/TransportCompany.java index 7f377fd..2081dd2 100644 --- a/src/main/java/com/example/webapi/entity/TransportCompany.java +++ b/src/main/java/com/example/webapi/entity/TransportCompany.java @@ -11,6 +11,7 @@ import javax.persistence.*; @ApiModel(description = "运输公司实体") public class TransportCompany { @Id + @GeneratedValue(strategy = GenerationType.IDENTITY) @Column(name = "编号") @ApiModelProperty(value = "公司ID", example = "1", notes = "主键,自动生成") private Integer id; diff --git a/src/main/java/com/example/webapi/entity/VehicleInfo.java b/src/main/java/com/example/webapi/entity/VehicleInfo.java index 8877aee..b97917e 100644 --- a/src/main/java/com/example/webapi/entity/VehicleInfo.java +++ b/src/main/java/com/example/webapi/entity/VehicleInfo.java @@ -11,6 +11,7 @@ import javax.persistence.*; @ApiModel(description = "车辆信息实体") public class VehicleInfo { @Id + @GeneratedValue(strategy = GenerationType.IDENTITY) @Column(name = "ID") @ApiModelProperty(value = "车辆ID", example = "1", notes = "主键,自动生成") private Integer id; diff --git a/src/main/java/com/example/webapi/entity/WeighingRecord.java b/src/main/java/com/example/webapi/entity/WeighingRecord.java index c21fe28..56d52b5 100644 --- a/src/main/java/com/example/webapi/entity/WeighingRecord.java +++ b/src/main/java/com/example/webapi/entity/WeighingRecord.java @@ -13,6 +13,7 @@ import java.util.Date; @ApiModel(description = "称重记录实体") public class WeighingRecord { @Id + @GeneratedValue(strategy = GenerationType.IDENTITY) @Column(name = "ID") @ApiModelProperty(value = "记录ID", example = "1", notes = "主键,自动生成") private Integer id;