|
|
@ -52,23 +52,26 @@ public class DeviceManager { |
|
|
|
|
|
|
|
|
public static Page<LinkedHashMap<String, Object>> queryInvLpn(QueryInvLpnReq req) { |
|
|
public static Page<LinkedHashMap<String, Object>> queryInvLpn(QueryInvLpnReq req) { |
|
|
SQLQuery<LinkedHashMap<String, Object>> query = QUERY_DSL.select(QueryDslUtils.linkedMap(lccInvLpn, lccBasLocation, lccBasContainer)) |
|
|
SQLQuery<LinkedHashMap<String, Object>> query = QUERY_DSL.select(QueryDslUtils.linkedMap(lccInvLpn, lccBasLocation, lccBasContainer)) |
|
|
.from(lccInvLpn) |
|
|
.from(lccInvLpn) |
|
|
.innerJoin(lccBasLocation).on( |
|
|
.innerJoin(lccBasLocation).on( |
|
|
lccInvLpn.locCode.eq(lccBasLocation.locCode).and( |
|
|
lccInvLpn.locCode.eq(lccBasLocation.locCode).and( |
|
|
lccBasLocation.envId.eq(lccBasLocation.envId) |
|
|
lccBasLocation.envId.eq(lccBasLocation.envId) |
|
|
) |
|
|
|
|
|
) |
|
|
) |
|
|
.innerJoin(lccBasContainer).on( |
|
|
) |
|
|
lccInvLpn.lpn.eq(lccInvLpn.lpn).and( |
|
|
.innerJoin(lccBasContainer).on( |
|
|
lccBasContainer.envId.eq(lccInvLpn.envId) |
|
|
lccInvLpn.lpn.eq(lccInvLpn.lpn).and( |
|
|
) |
|
|
lccBasContainer.envId.eq(lccInvLpn.envId) |
|
|
).orderBy(lccInvLpn.lpn.asc()); |
|
|
) |
|
|
|
|
|
).orderBy(lccInvLpn.lpn.asc()); |
|
|
if (StringUtils.isNotBlank(req.getLpn())) { |
|
|
if (StringUtils.isNotBlank(req.getLpn())) { |
|
|
query.where(lccInvLpn.lpn.eq(req.getLpn().trim())); |
|
|
query.where(lccInvLpn.lpn.eq(req.getLpn().trim())); |
|
|
} |
|
|
} |
|
|
if (StringUtils.isNotBlank(req.getLocCode())) { |
|
|
if (StringUtils.isNotBlank(req.getLocCode())) { |
|
|
query.where(lccInvLpn.locCode.eq(req.getLocCode().trim())); |
|
|
query.where(lccInvLpn.locCode.eq(req.getLocCode().trim())); |
|
|
} |
|
|
} |
|
|
|
|
|
if (req.getEnvId() != null) { |
|
|
|
|
|
query.where(lccInvLpn.envId.eq(req.getEnvId())); |
|
|
|
|
|
} |
|
|
return QueryDslUtils.queryByPage(query, QueryByPage.getCurrent()); |
|
|
return QueryDslUtils.queryByPage(query, QueryByPage.getCurrent()); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|