XMTT 6 gadi atpakaļ
vecāks
revīzija
609d05129b

+ 16 - 0
src/main/java/com/ekexiu/project/bridge/envdata/EnvDataDao.java

@ -24,6 +24,7 @@ import org.jfw.apt.orm.annotation.dao.param.Like;
24 24
import org.jfw.apt.orm.annotation.dao.param.LtEq;
25 25
import org.jfw.apt.orm.annotation.dao.param.Set;
26 26
import org.jfw.apt.orm.annotation.dao.param.SqlColumn;
27
import org.jfw.apt.orm.annotation.dao.param.UnEquals;
27 28
import org.jfw.apt.orm.core.defaultImpl.StringHandler;
28 29
import org.jfw.util.PageQueryResult;
29 30
@ -112,5 +113,20 @@ public interface EnvDataDao {
112 113
    @Nullable
113 114
    EnvTransducer queryEnvTransducer(Connection con, String id) throws SQLException;
114 115
116
    @SelectOne
117
    @Nullable
118
    EnvServer querySerByCode(Connection con, String code, @Nullable @UnEquals String id, @Nullable Boolean active) throws SQLException;
119
120
    @SelectOne
121
    @Nullable
122
    EnvServer querySerBySeq(Connection con, String seq, @Nullable @UnEquals String id,@Nullable Boolean active) throws SQLException;
123
124
    @SelectOne
125
    @Nullable
126
    EnvServer queryTraByCode(Connection con, String code, @Nullable @UnEquals String id, @Nullable Boolean active) throws SQLException;
127
128
    @SelectOne
129
    @Nullable
130
    EnvServer queryTraBySeq(Connection con, String seq, @Nullable @UnEquals String id,@Nullable Boolean active) throws SQLException;
115 131
116 132
}

+ 24 - 0
src/main/java/com/ekexiu/project/bridge/envdata/EnvDataService.java

@ -142,6 +142,30 @@ public class EnvDataService {
142 142
        return envDataDao.queryEnvTransducer(con, id);
143 143
    }
144 144
145
    @Get
146
    @Path("/server/checkSeq")
147
    public EnvServer serverBySeq(@JdbcConn Connection con, String seq, @Nullable String id, @Nullable Boolean active)throws SQLException {
148
        return this.envDataDao.querySerBySeq(con, seq,id,active);
149
    }
150
151
    @Get
152
    @Path("/server/checkCode")
153
    public EnvServer serverByCode(@JdbcConn Connection con,String code,@Nullable String id,@Nullable Boolean active)throws SQLException {
154
        return this.envDataDao.querySerByCode(con, code, id,active);
155
    }
156
157
    @Get
158
    @Path("/transducer/checkSeq")
159
    public EnvServer transducerBySeq(@JdbcConn Connection con, String seq, @Nullable String id, @Nullable Boolean active)throws SQLException {
160
        return this.envDataDao.queryTraBySeq(con, seq,id,active);
161
    }
162
163
    @Get
164
    @Path("/transducer/checkCode")
165
    public EnvServer transducerByCode(@JdbcConn Connection con,String code,@Nullable String id,@Nullable Boolean active)throws SQLException {
166
        return this.envDataDao.queryTraByCode(con, code, id,active);
167
    }
168
145 169
    @Path("/all/byBridge")
146 170
    @Get
147 171
    @LoginUser