From bada5213f95ef51ecd76cbe7b42eec5a84c62651 Mon Sep 17 00:00:00 2001
From: xiebin <123456>
Date: Wed, 20 Jul 2022 10:46:56 +0800
Subject: [PATCH] 首页农资入库数量统计 传入参数,之前是写死的值
---
src/main/java/org/springblade/modules/traceability/service/impl/TraceabilityServiceImpl.java | 14 ++++++--------
1 files changed, 6 insertions(+), 8 deletions(-)
diff --git a/src/main/java/org/springblade/modules/traceability/service/impl/TraceabilityServiceImpl.java b/src/main/java/org/springblade/modules/traceability/service/impl/TraceabilityServiceImpl.java
index 0bf0775..b1ada12 100644
--- a/src/main/java/org/springblade/modules/traceability/service/impl/TraceabilityServiceImpl.java
+++ b/src/main/java/org/springblade/modules/traceability/service/impl/TraceabilityServiceImpl.java
@@ -130,7 +130,7 @@
//插入扫描记录
SweepRecord sweepRecord = new SweepRecord();
sweepRecord.setCreateTime(new Date());
- sweepRecord.setCode(traceability.getId().toString());
+ sweepRecord.setCode(traceability1.getId().toString());
sweepRecord.setDeptId(traceability1.getDeptId());
//新增
sweepRecordService.save(sweepRecord);
@@ -145,13 +145,11 @@
LandVO landInfo = (LandVO)landService.getLandInfo(land);
//4. 查询农事记录信息(种植开始起)
List<FarmingRecordVO> farmingRecordVOList = farmingRecordService.getFarmingRecordByFarmPlantId(recoveryVO);
- //5. 查询企业信息
- Farm farm = new Farm();
- farm.setDeptId(traceability1.getDeptId());
- Farm farmVO = farmService.getOne(new QueryWrapper<>(farm));
+ //5. 查询农场信息
+ Farm farm = farmService.getById(recoveryVO.getFarmId());
//6. 数据封装
dto.setRecoveryVO(recoveryVO);
- dto.setFarm(farmVO);
+ dto.setFarm(farm);
dto.setRecordVOList(farmingRecordVOList);
dto.setPaperVOList(farmPaperList);
dto.setLandVO(landInfo);
@@ -159,7 +157,7 @@
if (null!=recoveryVO){
count = count + 20;
}
- if (null!=farmVO){
+ if (null!=farm){
count = count + 20;
}
if (null==landInfo){
@@ -200,7 +198,7 @@
//记录扫描记录
SweepRecord sweepRecord = new SweepRecord();
sweepRecord.setCreateTime(new Date());
- sweepRecord.setCode(traceability.getId().toString());
+ sweepRecord.setCode(traceability1.getId().toString());
sweepRecord.setDeptId(traceability1.getDeptId());
//新增
sweepRecordService.save(sweepRecord);
--
Gitblit v1.9.3