fix (farm): 首页-户主信息集合,生产计划-开始功能
-
This commit is contained in:
@@ -158,8 +158,6 @@ public class CropFarmingCenterController {
|
|||||||
@PutMapping("/production-plan/restart")
|
@PutMapping("/production-plan/restart")
|
||||||
public CommonResult<Boolean> restartPlanning(@RequestBody ProductionPlanUpdateReqVO updateReqVO) {
|
public CommonResult<Boolean> restartPlanning(@RequestBody ProductionPlanUpdateReqVO updateReqVO) {
|
||||||
updateReqVO.setPlanStatus(CommonConstants.PLAN_STATUS_2);
|
updateReqVO.setPlanStatus(CommonConstants.PLAN_STATUS_2);
|
||||||
// TODO: 2025/8/29 这里存在业务逻辑问题 ,等产品确认
|
|
||||||
// 如果地块, 物种 模型 被删除 ,则不可以重启
|
|
||||||
cropFarmingCenterService.restartProductionPlan(updateReqVO);
|
cropFarmingCenterService.restartProductionPlan(updateReqVO);
|
||||||
return success(true);
|
return success(true);
|
||||||
}
|
}
|
||||||
@@ -183,6 +181,7 @@ public class CropFarmingCenterController {
|
|||||||
@Operation(summary = "生产计划-结束按钮")
|
@Operation(summary = "生产计划-结束按钮")
|
||||||
@PutMapping("/production-plan/finish")
|
@PutMapping("/production-plan/finish")
|
||||||
public CommonResult<Boolean> finishPlanning(@RequestBody ProductionPlanUpdateReqVO updateReqVO) {
|
public CommonResult<Boolean> finishPlanning(@RequestBody ProductionPlanUpdateReqVO updateReqVO) {
|
||||||
|
updateReqVO.setPlanStatus(CommonConstants.PLAN_STATUS_2);
|
||||||
cropFarmingCenterService.updateProductionPlan(updateReqVO);
|
cropFarmingCenterService.updateProductionPlan(updateReqVO);
|
||||||
return success(true);
|
return success(true);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -255,7 +255,7 @@ public class CropFarmingCenterServiceImpl implements CropFarmingCenterService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
ProductionPlanDO planDO = BeanUtils.toBean(updateReqVO, ProductionPlanDO.class);
|
ProductionPlanDO planDO = BeanUtils.toBean(updateReqVO, ProductionPlanDO.class);
|
||||||
planDO.setPlanStatus(CommonConstants.PLAN_STATUS_3);
|
// planDO.setPlanStatus(CommonConstants.PLAN_STATUS_3);
|
||||||
planDO.setPracticalYields(one.getPredictedYields());
|
planDO.setPracticalYields(one.getPredictedYields());
|
||||||
productionPlanMapper.updateById(planDO);
|
productionPlanMapper.updateById(planDO);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -76,6 +76,7 @@ public class HomeServiceImpl implements HomeService {
|
|||||||
// 员工集合 <id,name>
|
// 员工集合 <id,name>
|
||||||
Map<String, String> employeeNameMap = personnelManagementService.getEmployeeNameMap();
|
Map<String, String> employeeNameMap = personnelManagementService.getEmployeeNameMap();
|
||||||
|
|
||||||
|
// 基地概要信息
|
||||||
BaseOverviewInfo baseOverviewInfo = null;
|
BaseOverviewInfo baseOverviewInfo = null;
|
||||||
if (StringUtils.isEmpty(baseId)) {
|
if (StringUtils.isEmpty(baseId)) {
|
||||||
baseOverviewInfo = this.getCompanyInfo();
|
baseOverviewInfo = this.getCompanyInfo();
|
||||||
@@ -83,12 +84,16 @@ public class HomeServiceImpl implements HomeService {
|
|||||||
BaseInfoDO baseObj = baseInfoService.getBaseInfo(baseId);
|
BaseInfoDO baseObj = baseInfoService.getBaseInfo(baseId);
|
||||||
baseOverviewInfo = this.getBaseOverviewInfo(baseObj, employeeNameMap);
|
baseOverviewInfo = this.getBaseOverviewInfo(baseObj, employeeNameMap);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 统计信息
|
||||||
StatisticalInfo statisticalInfo = this.getStatisticalInfo(baseId);
|
StatisticalInfo statisticalInfo = this.getStatisticalInfo(baseId);
|
||||||
|
|
||||||
|
// 基地集合
|
||||||
List<HomeInfo.BaseInfo> baseList = new ArrayList<>();
|
List<HomeInfo.BaseInfo> baseList = new ArrayList<>();
|
||||||
for (BaseInfoDO baseInfoDO : baseInfoService.getBaseInfosById(baseId)) {
|
for (BaseInfoDO baseInfoDO : baseInfoService.getBaseInfosById(baseId)) {
|
||||||
baseList.add(this.getBaseInfo(baseInfoDO,employeeNameMap));
|
baseList.add(this.getBaseInfo(baseInfoDO,employeeNameMap));
|
||||||
}
|
}
|
||||||
|
|
||||||
return new HomeInfo(baseOverviewInfo, statisticalInfo,baseList);
|
return new HomeInfo(baseOverviewInfo, statisticalInfo,baseList);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -155,7 +160,7 @@ public class HomeServiceImpl implements HomeService {
|
|||||||
// 地块浮框信息
|
// 地块浮框信息
|
||||||
List<PlotPopupFrame> plotPopupFrame = this.getPlotPopupFrame(e.getId(), employeeNameMap);
|
List<PlotPopupFrame> plotPopupFrame = this.getPlotPopupFrame(e.getId(), employeeNameMap);
|
||||||
// 户主流转信息
|
// 户主流转信息
|
||||||
List<PlotLesseeDetailsRespVO> lesseeList = plotInfoService.getPlotLesseeList(e.getPlotId());
|
List<PlotLesseeDetailsRespVO> lesseeList = plotInfoService.getPlotLesseeList(e.getId());
|
||||||
|
|
||||||
PlotInfo t = new PlotInfo();
|
PlotInfo t = new PlotInfo();
|
||||||
t.setBaseId(e.getBaseId());
|
t.setBaseId(e.getBaseId());
|
||||||
|
|||||||
Reference in New Issue
Block a user