fix (farm): 基地规划
- 地块编号导致的异常问题
This commit is contained in:
@@ -198,7 +198,9 @@ public class HomeInfo {
|
||||
@Schema(description = "任务进度-分母")
|
||||
private Integer progressBarDenominator;
|
||||
@Schema(description = "种植面积")
|
||||
private Double predictedArea;
|
||||
private String predictedArea;
|
||||
@Schema(description = "计划网箱数")
|
||||
private Integer predictedGridNumber;
|
||||
@Schema(description = "预计产量")
|
||||
private Integer predictedYields;
|
||||
@Schema(description = "计划执行状态")
|
||||
|
||||
@@ -369,7 +369,7 @@ public class HomeServiceImpl implements HomeService {
|
||||
int progressBarDenominator = modelManagementService.getFarmRecordCount(e.getSpeciesModelId());
|
||||
// 任务进度
|
||||
String progressBar = progressBarNumerator +"/"+progressBarDenominator;
|
||||
|
||||
Integer predictedGridNumber = e.getPredictedGridNumber();
|
||||
|
||||
PlanInfo target = new PlanInfo();
|
||||
target.setBaseId(e.getBaseId());
|
||||
@@ -383,7 +383,8 @@ public class HomeServiceImpl implements HomeService {
|
||||
target.setProgressBar(progressBar);
|
||||
target.setProgressBarNumerator(progressBarNumerator);
|
||||
target.setProgressBarDenominator(progressBarDenominator);
|
||||
target.setPredictedArea(Double.valueOf(beingPlotArea));
|
||||
target.setPredictedArea(beingPlotArea);
|
||||
target.setPredictedGridNumber(predictedGridNumber);
|
||||
target.setPredictedYields(e.getPredictedYields());
|
||||
target.setPlanStatus(e.getPlanStatus());
|
||||
target.setPlanStatusName(PLAN_MAP.getOrDefault(e.getPlanStatus(),"未开始"));
|
||||
|
||||
@@ -36,11 +36,13 @@ public class PlotLesseeServiceImpl implements PlotLesseeService {
|
||||
private final BaseInfoMapper baseInfoMapper;
|
||||
private final PlotInfoMapper plotInfoMapper;
|
||||
private final PlotLesseeMapper plotLesseeMapper;
|
||||
private final PlotInfoCacheService pCatchService;
|
||||
|
||||
public PlotLesseeServiceImpl(BaseInfoMapper baseInfoMapper, PlotInfoMapper plotInfoMapper, PlotLesseeMapper plotLesseeMapper) {
|
||||
public PlotLesseeServiceImpl(BaseInfoMapper baseInfoMapper, PlotInfoMapper plotInfoMapper, PlotLesseeMapper plotLesseeMapper, PlotInfoCacheService pCatchService) {
|
||||
this.baseInfoMapper = baseInfoMapper;
|
||||
this.plotInfoMapper = plotInfoMapper;
|
||||
this.plotLesseeMapper = plotLesseeMapper;
|
||||
this.pCatchService = pCatchService;
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -90,7 +92,7 @@ public class PlotLesseeServiceImpl implements PlotLesseeService {
|
||||
@Override
|
||||
public PlotLesseeImportRespVO importPlotLesseeInfoExcel(List<PlotLesseeForImportExcelRespVO> req) {
|
||||
Map<String, String> baseNameMap = baseInfoMapper.selectList().stream().collect(Collectors.toMap(BaseInfoDO::getId, BaseInfoDO::getName, (v1, v2) -> v1));
|
||||
Map<String, String> plotNameMap = plotInfoMapper.selectList().stream().collect(Collectors.toMap(PlotInfoDO::getPlotName, PlotInfoDO::getId, (v1, v2) -> v1));
|
||||
// Map<String, String> plotNameMap = plotInfoMapper.selectList().stream().collect(Collectors.toMap(PlotInfoDO::getPlotName, PlotInfoDO::getId, (v1, v2) -> v1));
|
||||
|
||||
PlotLesseeImportRespVO res = new PlotLesseeImportRespVO();
|
||||
res.setTotal(req.size());
|
||||
@@ -124,6 +126,7 @@ public class PlotLesseeServiceImpl implements PlotLesseeService {
|
||||
p.setPlotLeaseStatus(NO_CODE);
|
||||
p.setPlotColor(PLOT_COLOR_GREEN);
|
||||
plotInfoMapper.updateById(p);
|
||||
pCatchService.createOrUpdatePlotInfo(p);
|
||||
|
||||
sourcePObj.setLeaseStatus(NO_CODE);
|
||||
plotLesseeMapper.updateById(sourcePObj);
|
||||
@@ -201,7 +204,7 @@ public class PlotLesseeServiceImpl implements PlotLesseeService {
|
||||
public List<PlotLesseeDetailsRespVO> getPlotLesseeHistoryList(String plotId) {
|
||||
LambdaQueryWrapperX<PlotLesseeDO> x = new LambdaQueryWrapperX<>();
|
||||
x.eq(PlotLesseeDO::getDeleted, NO_CODE);
|
||||
x.eq(PlotLesseeDO::getLeaseStatus, NO_CODE);
|
||||
x.eq(PlotLesseeDO::getLeaseStatus, YES_CODE);
|
||||
x.eq(PlotLesseeDO::getPlotId, plotId);
|
||||
List<PlotLesseeDO> list = plotLesseeMapper.selectList(x);
|
||||
|
||||
@@ -276,6 +279,7 @@ public class PlotLesseeServiceImpl implements PlotLesseeService {
|
||||
p.setPlotLeaseStatus(YES_CODE);
|
||||
p.setPlotColor(PLOT_COLOR_BLUE);
|
||||
plotInfoMapper.updateById(p);
|
||||
pCatchService.createOrUpdatePlotInfo(p);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user