whyclxw
2025-04-18 b2300d14a4a41029c47615f757e621e025f18cda
修改
4个文件已修改
39 ■■■■■ 已修改文件
src/main/java/com/whyc/aop/OperationLogAspect.java 12 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/whyc/constant/OperationLogEnum.java 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/whyc/controller/StationInfController.java 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/whyc/service/StationInfService.java 19 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/whyc/aop/OperationLogAspect.java
@@ -109,14 +109,14 @@
                type2 = OperationLogEnum.TYPE_2_USER_UPDATE_PASSWORD.getType();
                operationTypeName = OperationLogEnum.TYPE_2_USER_UPDATE_PASSWORD.getName();
            }
        }else if(classNameTrue.contains("lockRt")){ //告警设置
        }else if(classNameTrue.contains("lockRt")){ //控制设置
            type1 = OperationLogEnum.TYPE_1_SERVICE.getType();
            if(methodName.startsWith("cancle")){
                type2 = OperationLogEnum.TYPE_2_Cancle_SETPARAM.getType();
                operationTypeName = OperationLogEnum.TYPE_2_Cancle_SETPARAM.getName();
            }
            if(methodName.startsWith("open")){
            if(methodName.startsWith("lockOpen")){
                type2 = OperationLogEnum.TYPE_2_Open_SETPARAMPL.getType();
                operationTypeName = OperationLogEnum.TYPE_2_Open_SETPARAMPL.getName();
            }
@@ -128,6 +128,14 @@
                type2 = OperationLogEnum.TYPE_2_Del_STARTPL.getType();
                operationTypeName = OperationLogEnum.TYPE_2_Del_STARTPL.getName();
            }
            if(methodName.startsWith("OpenBl")){
                type2 = OperationLogEnum.TYPE_2_Bl_Open.getType();
                operationTypeName = OperationLogEnum.TYPE_2_Bl_Open.getName();
            }
            if(methodName.startsWith("closeBl")){
                type2 = OperationLogEnum.TYPE_2_Bl_Colse.getType();
                operationTypeName = OperationLogEnum.TYPE_2_Bl_Colse.getName();
            }
        }
src/main/java/com/whyc/constant/OperationLogEnum.java
@@ -24,6 +24,8 @@
    TYPE_2_Open_SETPARAMPL(202,"远程开锁"),
    TYPE_2_Add_START(203,"添加授权卡"),
    TYPE_2_Del_STARTPL(204,"移除授权卡"),
    TYPE_2_Bl_Open(205,"开启蓝牙"),
    TYPE_2_Bl_Colse(206,"关闭蓝牙"),
    TYPE_EXCEPTION(21, "接口调用异常"),
src/main/java/com/whyc/controller/StationInfController.java
@@ -52,4 +52,10 @@
        return service.getStatiaon(dto);
    }
    @ApiOperation(value = "根据stationid和包机组id查询机房名和包机组名")
    @GetMapping("getNamebyId")
    public Response getNamebyId(@RequestParam Integer stationId,@RequestParam Integer baojiId){
        return service.getNamebyId(stationId,baojiId);
    }
}
src/main/java/com/whyc/service/StationInfService.java
@@ -7,9 +7,11 @@
import com.whyc.dto.Response;
import com.whyc.dto.Station.Provice;
import com.whyc.dto.StationDto;
import com.whyc.mapper.BaojigroupMapper;
import com.whyc.mapper.StationInfMapper;
import com.whyc.pojo.plus_inf.LockInf;
import com.whyc.pojo.plus_inf.StationInf;
import com.whyc.pojo.plus_user.Baojigroup;
import com.whyc.util.ActionUtil;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
@@ -22,8 +24,11 @@
    @Autowired(required = false)
    private StationInfMapper mapper;
    @Autowired(required = false)
    @Autowired
    private LockInfService linfService;
    @Autowired(required = false)
    private BaojigroupMapper groupMapper;
    //获取左侧列表
    public Response getLeftStation(int uid) {
@@ -139,4 +144,16 @@
        PageInfo pageInfo=new PageInfo(list);
        return new Response().setII(1,list!=null,pageInfo,"查询机房");
    }
    //根据stationid和包机组id查询机房名和包机组名
    public Response getNamebyId(Integer stationId, Integer baojiId) {
        QueryWrapper wrapper=new QueryWrapper();
        wrapper.eq("station_id",stationId);
        wrapper.last("limit 1");
        StationInf sinf=mapper.selectOne(wrapper);
        QueryWrapper wrapper1=new QueryWrapper();
        wrapper1.eq("id",baojiId);
        wrapper1.last("limit 1");
        Baojigroup baoji=groupMapper.selectOne(wrapper1);
        return new Response().setIII(1,true,sinf,baoji,"根据stationid和包机组id查询机房名和包机组名");
    }
}