|
|
@@ -20,6 +20,7 @@ import com.yunfeiyun.agmp.iots.warn.util.WarnMessageBuilderUtil;
|
|
|
import lombok.extern.slf4j.Slf4j;
|
|
|
import org.springframework.beans.BeanUtils;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
+import org.springframework.beans.factory.annotation.Value;
|
|
|
import org.springframework.stereotype.Service;
|
|
|
|
|
|
import java.util.*;
|
|
|
@@ -36,6 +37,9 @@ public class WarnPestService {
|
|
|
@Autowired
|
|
|
private IIotPestService iotPestService;
|
|
|
|
|
|
+ @Value("warn.cbdDateDiff:1")
|
|
|
+ private int cbdDateDiff;
|
|
|
+
|
|
|
/**
|
|
|
* 虫害处理入口
|
|
|
*/
|
|
|
@@ -104,7 +108,7 @@ public class WarnPestService {
|
|
|
}
|
|
|
|
|
|
String getDateBefore() {
|
|
|
- return DateUtils.parseDateToStr("yyyy-MM-dd", DateUtils.addDays(new Date(), -1));
|
|
|
+ return DateUtils.parseDateToStr("yyyy-MM-dd", DateUtils.addDays(new Date(), -cbdDateDiff));
|
|
|
}
|
|
|
|
|
|
/**
|