|
@@ -129,12 +129,13 @@ public class WeightImpl implements IWeight {
|
|
|
JSONObject everyTimeWeightJo = JSONObject.parseObject(data);
|
|
|
// ProdWeightEntity newWeightEntity = JSON.toJavaObject(everyTimeWeightJo,ProdWeightEntity.class);
|
|
|
// ProdWeightEntity addWeightEntity = prodWeightRepo.saveAndFlush(newWeightEntity);
|
|
|
- ProdWeightEntity addWeightEntity = new ProdWeightEntity();
|
|
|
- addWeightEntity.setFarmId(everyTimeWeightJo.getInteger("farmId"));
|
|
|
- addWeightEntity.setGrossWeight(everyTimeWeightJo.getFloat("grossWeight"));
|
|
|
- addWeightEntity.setTareWeight(everyTimeWeightJo.getFloat("tareWeight"));
|
|
|
- addWeightEntity.setNetWeight(everyTimeWeightJo.getFloat("netWeight"));
|
|
|
- addWeightEntity.setAddTime(everyTimeWeightJo.getTimestamp("addTime"));
|
|
|
+ ProdWeightEntity newWeightEntity = new ProdWeightEntity();
|
|
|
+ newWeightEntity.setFarmId(everyTimeWeightJo.getInteger("farmId"));
|
|
|
+ newWeightEntity.setGrossWeight(everyTimeWeightJo.getFloat("grossWeight"));
|
|
|
+ newWeightEntity.setTareWeight(everyTimeWeightJo.getFloat("tareWeight"));
|
|
|
+ newWeightEntity.setNetWeight(everyTimeWeightJo.getFloat("netWeight"));
|
|
|
+ newWeightEntity.setAddTime(everyTimeWeightJo.getTimestamp("addTime"));
|
|
|
+ ProdWeightEntity addWeightEntity = prodWeightRepo.saveAndFlush(newWeightEntity);
|
|
|
log.info("保存每次称重>>"+addWeightEntity);
|
|
|
}
|
|
|
}
|