liurunyu
2025-08-18 4fd99c2a20258abc53085ae6f8d8cd54be91a626
pipIrr-platform/pipIrr-web/pipIrr-web-model/src/main/java/com/dy/pipIrrModel/crops/CropsSv.java
@@ -3,8 +3,11 @@
import com.dy.common.util.DateTime;
import com.dy.common.webUtil.QueryResultVo;
import com.dy.pipIrrGlobal.daoMd.MdCropsMapper;
import com.dy.pipIrrGlobal.daoPr.PrStWeatherMapper;
import com.dy.pipIrrGlobal.pojoMd.MdCrops;
import com.dy.pipIrrGlobal.pojoPr.PrStWeather;
import com.dy.pipIrrGlobal.voMd.VoCrops;
import com.dy.pipIrrGlobal.voPr.VoWeather;
import lombok.extern.slf4j.Slf4j;
import org.apache.dubbo.common.utils.PojoUtils;
import org.springframework.beans.factory.annotation.Autowired;
@@ -24,6 +27,7 @@
public class CropsSv {
    private MdCropsMapper mdCropsDao ;
    private PrStWeatherMapper prStWeatherMapper ;
    @Autowired
    private void setDao(MdCropsMapper dao) { this.mdCropsDao = dao; }
@@ -38,6 +42,12 @@
        if(vo != null){
            this.setStoppedStr(vo) ;
            this.setLife(vo) ;
            if(vo.weatherId != null){
                VoWeather wVo = this.prStWeatherMapper.selectOne(vo.weatherId) ;
                if(wVo != null){
                    vo.weatherName = wVo.getName() ;
                }
            }
        }
        return vo ;
    }
@@ -139,6 +149,7 @@
                        }
                        if(days > vo.life4End){
                            vo.lifeCur = "已结束" ;
                            vo.lifeLenStr = "--" ;
                        }
                    }
                    if(vo.life3Start != null && vo.life3End != null){
@@ -163,8 +174,12 @@
                        }
                        if(days < vo.life1Start){
                            vo.lifeCur = "未开始" ;
                            vo.lifeLenStr = "--" ;
                        }
                    }
                }else{
                    vo.lifeCur = "未开始" ;
                    vo.lifeLenStr = "--" ;
                }
            }
        }catch (Exception e){