|
@@ -1421,17 +1421,19 @@ public class PmDemandServiceImpl extends ServiceImpl<PmDemandMapper, PmDemand> i
|
|
|
* @return
|
|
|
*/
|
|
|
public String pmDemandGetTips(Date planDeliverTime) throws ParseException {
|
|
|
- //提示信息:定义距离结束时间一周内提示
|
|
|
- Integer remindTine = 1000 * 60 * 60 * 24 * 7;
|
|
|
- //少于一周便提醒
|
|
|
- double surplus = planDeliverTime.getTime() - System.currentTimeMillis();
|
|
|
- if (surplus < remindTine) {
|
|
|
- int i = new Double(Math.ceil(surplus / 1000 / 60 / 60 / 24)).intValue();
|
|
|
- //剩余天数(向上取整)
|
|
|
- if (i > 0) {
|
|
|
- return "距离计划交付时间不足" + i + "天";
|
|
|
- } else {
|
|
|
- return "已超过计划完成时间" + i + "天";
|
|
|
+ if(!ObjectUtils.isEmpty(planDeliverTime)){
|
|
|
+ //提示信息:定义距离结束时间一周内提示
|
|
|
+ Integer remindTine = 1000 * 60 * 60 * 24 * 7;
|
|
|
+ //少于一周便提醒
|
|
|
+ double surplus = planDeliverTime.getTime() - System.currentTimeMillis();
|
|
|
+ if (surplus < remindTine) {
|
|
|
+ int i = new Double(Math.ceil(surplus / 1000 / 60 / 60 / 24)).intValue();
|
|
|
+ //剩余天数(向上取整)
|
|
|
+ if (i > 0) {
|
|
|
+ return "距离计划交付时间不足" + i + "天";
|
|
|
+ } else {
|
|
|
+ return "已超过计划完成时间" + i + "天";
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
return "";
|