Sfoglia il codice sorgente

更新告警状态

suntianwu 2 anni fa
parent
commit
26559e55e5

+ 3 - 0
purchase-system/src/main/java/com/ozs/pm/service/impl/PmDemandServiceImpl.java

@@ -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) {