修改提交
This commit is contained in:
+3
-3
@@ -25,7 +25,7 @@ public interface InventoryQueryMapper {
|
||||
"<if test='q.batchNo != null and q.batchNo != \"\"'> AND EXISTS (SELECT 1 FROM ll_inventory_position p WHERE p.balance_id=ll_inventory_balance.id AND p.customer_id=ll_inventory_balance.customer_id AND p.batch_no LIKE CONCAT('%',#{q.batchNo},'%'))</if>" +
|
||||
"<if test='q.warehouseLocationCode != null and q.warehouseLocationCode != \"\"'> AND EXISTS (SELECT 1 FROM ll_inventory_position p WHERE p.balance_id=ll_inventory_balance.id AND p.customer_id=ll_inventory_balance.customer_id AND p.warehouse_location_code LIKE CONCAT('%',#{q.warehouseLocationCode},'%'))</if>" +
|
||||
"<choose>" +
|
||||
"<when test='q.inventoryStatus == \"AVAILABLE\"'> AND available_packages > 0</when>" +
|
||||
"<when test='q.inventoryStatus == \"AVAILABLE\"'> AND (available_packages+allocated_packages+picked_packages) > 0</when>" +
|
||||
"<when test='q.inventoryStatus == \"HOLD\"'> AND hold_packages > 0</when>" +
|
||||
"<when test='q.inventoryStatus == \"ALLOCATED\"'> AND allocated_packages > 0</when>" +
|
||||
"<when test='q.inventoryStatus == \"PICKED\"'> AND picked_packages > 0</when>" +
|
||||
@@ -48,7 +48,7 @@ public interface InventoryQueryMapper {
|
||||
"<if test='q.batchNo != null and q.batchNo != \"\"'> AND EXISTS (SELECT 1 FROM ll_inventory_position p2 WHERE p2.balance_id=b.id AND p2.customer_id=b.customer_id AND p2.batch_no LIKE CONCAT('%',#{q.batchNo},'%'))</if>" +
|
||||
"<if test='q.warehouseLocationCode != null and q.warehouseLocationCode != \"\"'> AND EXISTS (SELECT 1 FROM ll_inventory_position p2 WHERE p2.balance_id=b.id AND p2.customer_id=b.customer_id AND p2.warehouse_location_code LIKE CONCAT('%',#{q.warehouseLocationCode},'%'))</if>" +
|
||||
"<choose>" +
|
||||
"<when test='q.inventoryStatus == \"AVAILABLE\"'> AND b.available_packages > 0</when>" +
|
||||
"<when test='q.inventoryStatus == \"AVAILABLE\"'> AND (b.available_packages+b.allocated_packages+b.picked_packages) > 0</when>" +
|
||||
"<when test='q.inventoryStatus == \"HOLD\"'> AND b.hold_packages > 0</when>" +
|
||||
"<when test='q.inventoryStatus == \"ALLOCATED\"'> AND b.allocated_packages > 0</when>" +
|
||||
"<when test='q.inventoryStatus == \"PICKED\"'> AND b.picked_packages > 0</when>" +
|
||||
@@ -92,7 +92,7 @@ public interface InventoryQueryMapper {
|
||||
"<if test='q.skuCode != null and q.skuCode != \"\"'> AND sku_code LIKE CONCAT('%',#{q.skuCode},'%')</if>" +
|
||||
"<if test='q.warehouseLocationCode != null and q.warehouseLocationCode != \"\"'> AND warehouse_location_code LIKE CONCAT('%',#{q.warehouseLocationCode},'%')</if>" +
|
||||
"<choose>" +
|
||||
"<when test='q.inventoryStatus == \"AVAILABLE\"'> AND available_packages > 0</when>" +
|
||||
"<when test='q.inventoryStatus == \"AVAILABLE\"'> AND (available_packages+allocated_packages+picked_packages) > 0</when>" +
|
||||
"<when test='q.inventoryStatus == \"HOLD\"'> AND hold_packages > 0</when>" +
|
||||
"<when test='q.inventoryStatus == \"ALLOCATED\"'> AND allocated_packages > 0</when>" +
|
||||
"<when test='q.inventoryStatus == \"PICKED\"'> AND picked_packages > 0</when>" +
|
||||
|
||||
+3
-3
@@ -41,7 +41,7 @@ public class InventoryQueryService {
|
||||
long inTransitPackages = number(value.getInTransitPackages());
|
||||
long receivingPackages = number(value.getReceivingPackages());
|
||||
long procurementPackages = number(value.getProcurementPackages());
|
||||
long totalPackages = availablePackages + holdPackages + allocatedPackages + pickedPackages + receivingPackages;
|
||||
long totalPackages = availablePackages + holdPackages + allocatedPackages + pickedPackages;
|
||||
return new InventoryDashboardResponse(number(value.getDimensionCount()), mapper.countPallets(customerId, query),
|
||||
totalPackages, Math.max(0, totalPackages - holdPackages), holdPackages, allocatedPackages,
|
||||
pickedPackages, inTransitPackages,
|
||||
@@ -117,7 +117,7 @@ public class InventoryQueryService {
|
||||
long inTransitPackages = number(value.getInTransitPackages());
|
||||
long receivingPackages = number(value.getReceivingPackages());
|
||||
long procurementPackages = number(value.getProcurementPackages());
|
||||
long totalPackages = availablePackages + holdPackages + allocatedPackages + pickedPackages + receivingPackages;
|
||||
long totalPackages = availablePackages + holdPackages + allocatedPackages + pickedPackages;
|
||||
return new InventoryBalanceView(value.getId(), value.getCustomerId(), value.getCustomerName(), value.getOverseasWarehouseId(),
|
||||
value.getOverseasWarehouseCode(), value.getOverseasWarehouseName(), value.getDestinationWarehouseId(),
|
||||
value.getDestinationWarehouseCode(), value.getDestinationWarehouseName(), value.getInboundOrderId(),
|
||||
@@ -133,7 +133,7 @@ public class InventoryQueryService {
|
||||
long allocated = number(value.getAllocatedPackages());
|
||||
long picked = number(value.getPickedPackages());
|
||||
long receiving = number(value.getReceivingPackages());
|
||||
long total = available + hold + allocated + picked + receiving;
|
||||
long total = available + hold + allocated + picked;
|
||||
return new InventoryPositionView(value.getId(), value.getBalanceId(), value.getCustomerId(),
|
||||
value.getOverseasWarehouseId(), value.getDestinationWarehouseCode(), balance.getInboundOrderId(),
|
||||
balance.getInboundOrderNo(), balance.getInboundCode(),
|
||||
|
||||
Reference in New Issue
Block a user