fixed comments
parent
f7f8cf8df3
commit
9a6514c724
|
@ -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 = "bundle-id", required = false) Long bundleID,
|
||||
@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<StitchingOfflineItem> itemList = bundleService.getStitchedOfflineItems( id, itemId, sku, startDate, endDate, bundleID ,count );
|
||||
List<StitchingOfflineItem> itemList = bundleService.getStitchedOfflineItems( id, itemId, sku, startDate, endDate, bundleId ,count );
|
||||
model.addAttribute("items", itemList ) ;
|
||||
model.addAttribute("startDate", startDate1);
|
||||
model.addAttribute("endDate", endDate1);
|
||||
|
|
|
@ -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, Long bundleID, 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("bundle_id", bundleID )
|
||||
.columnEquals("bundle_id", bundleId )
|
||||
.and()
|
||||
.columnEqualToOrGreaterThan("created_at", startDate1)
|
||||
.and()
|
||||
|
|
|
@ -125,13 +125,13 @@ public class BundleService {
|
|||
/*
|
||||
* find finished Items by params
|
||||
* */
|
||||
public List<StitchingOfflineItem> getStitchedOfflineItems(String id, String itemId, String sku, String createdStartDate, String createdEndDate, Long bundleID, Long count ){
|
||||
public List<StitchingOfflineItem> getStitchedOfflineItems(String id, String itemId, String sku, String createdStartDate, String createdEndDate, Long bundleId, Long count ){
|
||||
List<StitchingOfflineItem> stitchingOfflineItems = new ArrayList<>();
|
||||
if( count == null ){
|
||||
count = 100L;
|
||||
}
|
||||
if( StringUtils.isAnyNotNullOrEmpty(id, itemId, sku, createdStartDate, createdEndDate, String.valueOf(bundleID) ) ){
|
||||
String query = StichedOfflineItemQueryBuilder.buildQuery( id, itemId, sku, createdStartDate, createdEndDate, bundleID , 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 {
|
||||
|
|
|
@ -18,7 +18,7 @@
|
|||
<div th:replace="_fragments :: table-loading-skeleton"></div>
|
||||
<form th:action="@{/cutting/generate-bundle-barcodes}" method="post">
|
||||
<input hidden="hidden" name="artifactType" value="Bundle">
|
||||
<table class="table table-striped" data-table data-order="[[ 0, "dsc" ]]">
|
||||
<table class="table table-striped" data-table data-order="[[ 0, "desc" ]]">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>ID</th>
|
||||
|
|
|
@ -19,7 +19,7 @@
|
|||
<form th:action="@{/cutting/generate-master-barcodes}" method="post">
|
||||
<input hidden="hidden" name="artifactType" value="MasterBundle">
|
||||
<table class="table table-striped table-bordered" data-bundle-table
|
||||
data-order="[[ 0, "dsc" ]]">
|
||||
data-order="[[ 0, "desc" ]]">
|
||||
<thead>
|
||||
<tr>
|
||||
<th></th>
|
||||
|
|
|
@ -20,7 +20,7 @@
|
|||
<form th:action="@{/stitching/generate-barcodes}" method="post">
|
||||
<input hidden="hidden" name="artifactType" value="FinishedItem">
|
||||
<table th:if="${ #lists != null && #lists.size(items) != 0 }" class="table table-striped table-bordered" data-table
|
||||
data-order="[[ 0, "dsc" ]]">
|
||||
data-order="[[ 0, "desc" ]]">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>ID</th>
|
||||
|
|
Loading…
Reference in New Issue