Merge remote-tracking branch 'origin/main'

This commit is contained in:
顾君禹
2025-08-31 14:04:15 +08:00
3 changed files with 7 additions and 1 deletions

View File

@@ -32,6 +32,8 @@ public class ProductionPlanResp2VO {
private String text;
@Schema(description = "地块数量")
private int size;
@Schema(description = "计划ID")
private String planId;
@Schema(description = "计划编号")
private String planNumber;
@Schema(description = "种植物种-编码")

View File

@@ -77,11 +77,14 @@ public class BaseInfoServiceImpl implements BaseInfoService {
BaseInfoDO sourceBaseInfoDO = baseInfoMapper.selectById(baseId);
BigDecimal oldArea = sourceBaseInfoDO.getArea();
BigDecimal newArea = updateReqVO.getArea();
if (oldArea.compareTo(newArea) == 0) {
return ;
}
// 更新
BaseInfoDO updateObj = BeanUtils.toBean(updateReqVO, BaseInfoDO.class);
baseInfoMapper.updateById(updateObj);
// 同步
productionPlanService.syncBaseAreaToAllPlansByBaseId(baseId, newArea, oldArea);
// productionPlanService.syncBaseAreaToAllPlansByBaseId(baseId, newArea, oldArea);
}
@Override

View File

@@ -318,6 +318,7 @@ public class CropFarmingCenterServiceImpl implements CropFarmingCenterService {
subNode.setText(speciesNameMap.get(subPlan.getPlantSpeciesCode()));
subNode.setPlantSpeciesCode(subPlan.getPlantSpeciesCode());
subNode.setPlantSpeciesName(speciesNameMap.get(subPlan.getPlantSpeciesCode()));
subNode.setPlanId(subPlan.getId());
subNode.setPlanNumber(subPlan.getPlanNumber());
subNode.setPlanStatus(subPlan.getPlanStatus());
subNode.setPlanStatusName(PLAN_MAP.getOrDefault(subPlan.getPlanStatus(),""));