|
@@ -43,6 +43,7 @@ import com.ozs.system.mapper.SysDeptMapper;
|
|
|
import com.ozs.system.mapper.SysRoleMapper;
|
|
|
import com.ozs.system.service.*;
|
|
|
import io.swagger.models.auth.In;
|
|
|
+import lombok.extern.slf4j.Slf4j;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.stereotype.Service;
|
|
|
import org.springframework.transaction.annotation.Transactional;
|
|
@@ -57,6 +58,7 @@ import org.springframework.util.ObjectUtils;
|
|
|
* @date 2023-01-16
|
|
|
*/
|
|
|
@Service
|
|
|
+@Slf4j
|
|
|
public class PmDemandServiceImpl extends ServiceImpl<PmDemandMapper, PmDemand> implements IPmDemandService {
|
|
|
|
|
|
@Autowired
|
|
@@ -1461,6 +1463,7 @@ public class PmDemandServiceImpl extends ServiceImpl<PmDemandMapper, PmDemand> i
|
|
|
PmDemand pmDemand = this.getById(demnadId);
|
|
|
List<SysDictData> data = iSysDictTypeService.selectDictDataByType("alert_time_setting");
|
|
|
int setting1 = Integer.parseInt(data.stream().filter(item -> item.getDictLabel().equals("计划提报时间")).collect(Collectors.toList()).get(0).getDictValue());
|
|
|
+ log.info("******** setting1 == " + setting1);
|
|
|
//需求提报时间:根据数据阈值中设置的提报时间进行判断,进行预警
|
|
|
int diff1 = DateUtils.differentDaysByMillisecond(pmDemand.getPlanDemandSubTime(), DateUtils.parseDate(DateUtils.getDate()));
|
|
|
if (ObjectUtils.isEmpty(pmDemand.getRealDemandCommitTime()) && diff1 >= setting1) {
|