whyclxw
2025-05-28 e16302f9d475c7cc4dd18c5abf1a23cb5502e362
src/main/java/com/whyc/service/PwrDevAlarmVerifyService.java
@@ -7,7 +7,10 @@
import com.whyc.mapper.PwrDevAlarmVerifyMapper;
import com.whyc.pojo.PwrDevAlarmVerify;
import com.whyc.pojo.PwrdevAlarm;
import com.whyc.pojo.WorkflowMain;
import com.whyc.util.ActionUtil;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Lazy;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
@@ -19,11 +22,20 @@
    @Resource
    private PwrDevAlarmVerifyMapper mapper;
    @Autowired
    @Lazy
    private AlarmManualClearService clearService;
    public Response<Object> getPage(PwrdevAlarm param) {
        List<Integer> allMainIds = clearService.getAllMainIds();
        //int userId = ActionUtil.getUser().getUId().intValue();
        List<PwrDevAlarmVerify> list = mapper.getList(param);
        list.stream().forEach(data -> {
            data.setAlarmName(AlarmDaoFactory.getAllAlarmName(data.getAlmType()));
            WorkflowMain main = data.getMain();
            if (main != null && allMainIds.contains(main.getId())){
                main.setFaultUploadDone(true);
            }
        });
        PageInfo<PwrDevAlarmVerify> pageInfo = new PageInfo<>(list);
        return new Response<>().set(1,pageInfo);