|
|
@@ -52,6 +52,30 @@ class LandInfoDto
|
|
|
$dataLand->setSeedPlantingTimes($landInfoDto->crop->plantTime);
|
|
|
}
|
|
|
}
|
|
|
+ // 下一阶段的时间
|
|
|
+ if (!empty($landInfoDto->crop->stageEndTime)) {
|
|
|
+ if (is_string($landInfoDto->crop->stageEndTime)) {
|
|
|
+ $nextGrowthTime = strtotime($landInfoDto->crop->stageEndTime);
|
|
|
+ $dataLand->setStageNextTimes($nextGrowthTime);
|
|
|
+ }
|
|
|
+ else if (is_numeric($landInfoDto->crop->stageEndTime)) {
|
|
|
+ $dataLand->setStageNextTimes($landInfoDto->crop->stageEndTime);
|
|
|
+
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ // 阶段开始时间
|
|
|
+ if (!empty($landInfoDto->crop->stageStartTime)) {
|
|
|
+ if (is_string($landInfoDto->crop->stageStartTime)) {
|
|
|
+ $nextGrowthTime = strtotime($landInfoDto->crop->stageStartTime);
|
|
|
+ $dataLand->setStageStartTimes($nextGrowthTime);
|
|
|
+ }
|
|
|
+ else if (is_numeric($landInfoDto->crop->stageStartTime)) {
|
|
|
+ $dataLand->setStageStartTimes($landInfoDto->crop->stageStartTime);
|
|
|
+
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
|
|
|
// 设置种子状态,这里需要将Farm模块的生长阶段映射到Proto的种子状态
|
|
|
// 假设我们有一个映射关系,这里简单地直接使用生长阶段值
|