whyclxw
7 天以前 a6018ae593fc2d2fb3ccfa4e7c34f28387326f6b
src/main/java/com/whyc/service/BattAlmparamService.java
@@ -10,11 +10,13 @@
import com.whyc.dto.Response;
import com.whyc.mapper.BattAlmparamMapper;
import com.whyc.pojo.db_param.BattAlmparam;
import com.whyc.pojo.db_station.BattInf;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.Arrays;
import java.util.List;
import java.util.stream.Collectors;
@Service
public class BattAlmparamService {
@@ -26,11 +28,9 @@
    //获取电池告警参数
    public Response getBattAlmParam(ParamAlmDto dto) {
        //根据查询条件获取电池组集合
        List<Integer> idList=binfService.getBattgroupIdList(dto);
        BattInf binf=binfService.getBattgroupIdList(dto.getBattgroupId());
        QueryWrapper wrapper=new QueryWrapper();
        if(idList!=null){
            wrapper.in("battgroup_id",idList);
        }
        wrapper.eq("battgroup_id",dto.getBattgroupId());
        if(dto.getAlmIdList()!=null){
            wrapper.in("alm_id",dto.getAlmIdList());
        }
@@ -38,7 +38,7 @@
        //PageHelper.startPage(dto.getPageNum(),dto.getPageSize());
        List<BattAlmparam> list = mapper.selectList(wrapper);
        //PageInfo<BattAlmparam> pageInfo=new PageInfo<>(list);
        return new Response().setII(1,list!=null,list,"获取电池告警参数");
        return new Response().setIII(1,list!=null,list,binf,"获取电池告警参数");
    }
    //修改电池告警参数
    public Response setBattAlmParam(List<BattAlmparam> almparamList) {