diff --git a/src/main/java/com/utopiaindustries/controller/StitchingController.java b/src/main/java/com/utopiaindustries/controller/StitchingController.java index 486d91e..b54bc11 100644 --- a/src/main/java/com/utopiaindustries/controller/StitchingController.java +++ b/src/main/java/com/utopiaindustries/controller/StitchingController.java @@ -93,13 +93,13 @@ public class StitchingController { @RequestParam( value = "sku", required = false ) String sku, @RequestParam( value = "start-date", required = false) String startDate, @RequestParam( value = "end-date", required = false ) String endDate, - @RequestParam( value = "job-card-id", required = false ) String jobCardId, + @RequestParam(value = "bundle-id", required = false) Long bundleID, @RequestParam( value = "count", required = false, defaultValue = "100") Long count, Model model ,RedirectAttributes redirect){ LocalDate startDate1 = StringUtils.isNullOrEmpty(startDate) ? LocalDate.now().minusDays(30) : LocalDate.parse(startDate); LocalDate endDate1 = StringUtils.isNullOrEmpty(endDate) ? LocalDate.now() : LocalDate.parse(endDate); - List itemList = bundleService.getStitchedOfflineItems( id, itemId, sku, startDate, endDate, jobCardId ,count ); + List itemList = bundleService.getStitchedOfflineItems( id, itemId, sku, startDate, endDate, bundleID ,count ); model.addAttribute("items", itemList ) ; model.addAttribute("startDate", startDate1); model.addAttribute("endDate", endDate1); diff --git a/src/main/java/com/utopiaindustries/querybuilder/ctp/StichedOfflineItemQueryBuilder.java b/src/main/java/com/utopiaindustries/querybuilder/ctp/StichedOfflineItemQueryBuilder.java index fb90c68..453498d 100644 --- a/src/main/java/com/utopiaindustries/querybuilder/ctp/StichedOfflineItemQueryBuilder.java +++ b/src/main/java/com/utopiaindustries/querybuilder/ctp/StichedOfflineItemQueryBuilder.java @@ -8,7 +8,7 @@ import java.time.LocalDate; public class StichedOfflineItemQueryBuilder { - public static String buildQuery(String id, String itemId, String sku, String createdStartDate, String createdEndDate, String jobCardId, Long count) { + public static String buildQuery(String id, String itemId, String sku, String createdStartDate, String createdEndDate, Long bundleID, Long count) { // format date String formattedDate; String formattedEndDate; @@ -35,7 +35,7 @@ public class StichedOfflineItemQueryBuilder { .and() .columnEquals("item_id", itemId ) .and() - .columnEquals("job_card_id", jobCardId ) + .columnEquals("bundle_id", bundleID ) .and() .columnEqualToOrGreaterThan("created_at", startDate1) .and() diff --git a/src/main/java/com/utopiaindustries/service/BundleService.java b/src/main/java/com/utopiaindustries/service/BundleService.java index 2fc7b36..8cc618b 100644 --- a/src/main/java/com/utopiaindustries/service/BundleService.java +++ b/src/main/java/com/utopiaindustries/service/BundleService.java @@ -125,13 +125,13 @@ public class BundleService { /* * find finished Items by params * */ - public List getStitchedOfflineItems(String id, String itemId, String sku, String createdStartDate, String createdEndDate, String jobCardId, Long count ){ + public List getStitchedOfflineItems(String id, String itemId, String sku, String createdStartDate, String createdEndDate, Long bundleID, Long count ){ List stitchingOfflineItems = new ArrayList<>(); if( count == null ){ count = 100L; } - if( StringUtils.isAnyNotNullOrEmpty(id, itemId, sku, createdStartDate, createdEndDate, jobCardId ) ){ - String query = StichedOfflineItemQueryBuilder.buildQuery( id, itemId, sku, createdStartDate, createdEndDate, jobCardId , count ); + if( StringUtils.isAnyNotNullOrEmpty(id, itemId, sku, createdStartDate, createdEndDate, String.valueOf(bundleID) ) ){ + String query = StichedOfflineItemQueryBuilder.buildQuery( id, itemId, sku, createdStartDate, createdEndDate, bundleID , count ); System.out.println( query ); stitchingOfflineItems = stitchingOfflineItemDAO.findByQuery( query ); } else { diff --git a/src/main/resources/templates/cutting/bundles.html b/src/main/resources/templates/cutting/bundles.html index de8118c..f61f5c5 100644 --- a/src/main/resources/templates/cutting/bundles.html +++ b/src/main/resources/templates/cutting/bundles.html @@ -18,7 +18,7 @@
- +
diff --git a/src/main/resources/templates/cutting/master-bundles.html b/src/main/resources/templates/cutting/master-bundles.html index 2c2ae02..0e32bf5 100644 --- a/src/main/resources/templates/cutting/master-bundles.html +++ b/src/main/resources/templates/cutting/master-bundles.html @@ -19,7 +19,7 @@
ID
+ data-order="[[ 0, "dsc" ]]"> diff --git a/src/main/resources/templates/finishing/finished-item-list.html b/src/main/resources/templates/finishing/finished-item-list.html index 92d6726..76bead2 100644 --- a/src/main/resources/templates/finishing/finished-item-list.html +++ b/src/main/resources/templates/finishing/finished-item-list.html @@ -19,7 +19,7 @@
-
+
diff --git a/src/main/resources/templates/job-card-view-pdf.html b/src/main/resources/templates/job-card-view-pdf.html index 06bb654..a29330e 100644 --- a/src/main/resources/templates/job-card-view-pdf.html +++ b/src/main/resources/templates/job-card-view-pdf.html @@ -96,8 +96,6 @@ - - @@ -113,15 +111,6 @@ diff --git a/src/main/resources/templates/quality-control/inventory-accounts.html b/src/main/resources/templates/quality-control/inventory-accounts.html index b5739df..5516d6d 100644 --- a/src/main/resources/templates/quality-control/inventory-accounts.html +++ b/src/main/resources/templates/quality-control/inventory-accounts.html @@ -16,7 +16,7 @@

Packaging Inventory Accounts

-
ID
- - - - - - - -
+
diff --git a/src/main/resources/templates/quality-control/qc-items-list.html b/src/main/resources/templates/quality-control/qc-items-list.html index 65336e9..d6b4b3d 100644 --- a/src/main/resources/templates/quality-control/qc-items-list.html +++ b/src/main/resources/templates/quality-control/qc-items-list.html @@ -19,7 +19,7 @@
-
+
diff --git a/src/main/resources/templates/stitching/_finished-item-sidebar.html b/src/main/resources/templates/stitching/_finished-item-sidebar.html index 5b5ff78..46e2c32 100644 --- a/src/main/resources/templates/stitching/_finished-item-sidebar.html +++ b/src/main/resources/templates/stitching/_finished-item-sidebar.html @@ -20,8 +20,8 @@
- - + +
diff --git a/src/main/resources/templates/stitching/stitched-offline-items.html b/src/main/resources/templates/stitching/stitched-offline-items.html index 3b6f2bc..aa3a619 100644 --- a/src/main/resources/templates/stitching/stitched-offline-items.html +++ b/src/main/resources/templates/stitching/stitched-offline-items.html @@ -20,11 +20,12 @@
ID
+ data-order="[[ 0, "dsc" ]]"> + @@ -41,6 +42,7 @@ +
ID Item IDBundle ID Sku Created At Created By