智慧农业后台管理
zhongrj
2022-07-18 981a3d85848753a799da2d909089c2fe4fcd3ccf
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);