|
|
@ -7,6 +7,7 @@ import com.galaxis.rcs.common.enums.LCCDirection; |
|
|
import com.galaxis.rcs.amr.PtrAgvItem; |
|
|
import com.galaxis.rcs.amr.PtrAgvItem; |
|
|
import com.google.common.base.Strings; |
|
|
import com.google.common.base.Strings; |
|
|
import com.google.common.collect.Lists; |
|
|
import com.google.common.collect.Lists; |
|
|
|
|
|
import com.google.common.collect.Maps; |
|
|
import com.yvan.entity.AgvStatusVo; |
|
|
import com.yvan.entity.AgvStatusVo; |
|
|
import com.yvan.logisticsModel.LogisticsRuntimeService; |
|
|
import com.yvan.logisticsModel.LogisticsRuntimeService; |
|
|
import com.yvan.workbench.SpringContext; |
|
|
import com.yvan.workbench.SpringContext; |
|
|
@ -157,19 +158,43 @@ public class LccController { |
|
|
|
|
|
|
|
|
QueryDSL queryDsl = DaoFactory.getQueryDSL(); |
|
|
QueryDSL queryDsl = DaoFactory.getQueryDSL(); |
|
|
var rowEffect = queryDsl.insert(lccInvLpn) |
|
|
var rowEffect = queryDsl.insert(lccInvLpn) |
|
|
.populate(inv); |
|
|
.populate(inv) |
|
|
|
|
|
.execute(); |
|
|
|
|
|
|
|
|
return R.success(true); |
|
|
return R.success(true); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
public static R<Object> getLpnLocations(@RequestBody Map<String, Object> params) { |
|
|
public static R<Object> getLpnLocations(@RequestBody Map<String, Object> params) { |
|
|
String lpn = Conv.asString(params.get("lpn")); |
|
|
|
|
|
Long envId = Conv.asLong(params.get("envId")); |
|
|
Long envId = Conv.asLong(params.get("envId")); |
|
|
|
|
|
|
|
|
if (Strings.isNullOrEmpty(lpn)) { |
|
|
if (envId == null || envId <= 0) { |
|
|
return R.fail("lpn Must not be empty"); |
|
|
return R.fail("envId Must not be empty"); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
return R.success(true); |
|
|
var queryDsl = DaoFactory.getQueryDSL(); |
|
|
|
|
|
var lpnList = queryDsl.select(QueryDslUtils.linkedMap( |
|
|
|
|
|
lccBasContainer.lpn |
|
|
|
|
|
)) |
|
|
|
|
|
.from(lccBasContainer) |
|
|
|
|
|
.where(lccBasContainer.envId.eq(envId)) |
|
|
|
|
|
.where(lccBasContainer.isActive.eq(true)) |
|
|
|
|
|
.fetch(); |
|
|
|
|
|
|
|
|
|
|
|
var locationList = queryDsl.select(QueryDslUtils.linkedMap( |
|
|
|
|
|
lccBasLocation.locCode, |
|
|
|
|
|
lccBasLocation.rack, |
|
|
|
|
|
lccBasLocation.bay, |
|
|
|
|
|
lccBasLocation.level, |
|
|
|
|
|
lccBasLocation.cell |
|
|
|
|
|
)) |
|
|
|
|
|
.from(lccBasLocation) |
|
|
|
|
|
.where(lccBasLocation.envId.eq(envId)) |
|
|
|
|
|
.fetch(); |
|
|
|
|
|
|
|
|
|
|
|
Map<String, Object> result = Maps.newHashMap(); |
|
|
|
|
|
result.put("lpnList", lpnList); |
|
|
|
|
|
result.put("locationList", locationList); |
|
|
|
|
|
|
|
|
|
|
|
return R.success(result); |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|