fixed comments
parent
f7f8cf8df3
commit
9a6514c724
|
@ -93,13 +93,13 @@ public class StitchingController {
|
||||||
@RequestParam( value = "sku", required = false ) String sku,
|
@RequestParam( value = "sku", required = false ) String sku,
|
||||||
@RequestParam( value = "start-date", required = false) String startDate,
|
@RequestParam( value = "start-date", required = false) String startDate,
|
||||||
@RequestParam( value = "end-date", required = false ) String endDate,
|
@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,
|
@RequestParam( value = "count", required = false, defaultValue = "100") Long count,
|
||||||
Model model
|
Model model
|
||||||
,RedirectAttributes redirect){
|
,RedirectAttributes redirect){
|
||||||
LocalDate startDate1 = StringUtils.isNullOrEmpty(startDate) ? LocalDate.now().minusDays(30) : LocalDate.parse(startDate);
|
LocalDate startDate1 = StringUtils.isNullOrEmpty(startDate) ? LocalDate.now().minusDays(30) : LocalDate.parse(startDate);
|
||||||
LocalDate endDate1 = StringUtils.isNullOrEmpty(endDate) ? LocalDate.now() : LocalDate.parse(endDate);
|
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("items", itemList ) ;
|
||||||
model.addAttribute("startDate", startDate1);
|
model.addAttribute("startDate", startDate1);
|
||||||
model.addAttribute("endDate", endDate1);
|
model.addAttribute("endDate", endDate1);
|
||||||
|
|
|
@ -8,7 +8,7 @@ import java.time.LocalDate;
|
||||||
|
|
||||||
public class StichedOfflineItemQueryBuilder {
|
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
|
// format date
|
||||||
String formattedDate;
|
String formattedDate;
|
||||||
String formattedEndDate;
|
String formattedEndDate;
|
||||||
|
@ -35,7 +35,7 @@ public class StichedOfflineItemQueryBuilder {
|
||||||
.and()
|
.and()
|
||||||
.columnEquals("item_id", itemId )
|
.columnEquals("item_id", itemId )
|
||||||
.and()
|
.and()
|
||||||
.columnEquals("bundle_id", bundleID )
|
.columnEquals("bundle_id", bundleId )
|
||||||
.and()
|
.and()
|
||||||
.columnEqualToOrGreaterThan("created_at", startDate1)
|
.columnEqualToOrGreaterThan("created_at", startDate1)
|
||||||
.and()
|
.and()
|
||||||
|
|
|
@ -125,13 +125,13 @@ public class BundleService {
|
||||||
/*
|
/*
|
||||||
* find finished Items by params
|
* 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<>();
|
List<StitchingOfflineItem> stitchingOfflineItems = new ArrayList<>();
|
||||||
if( count == null ){
|
if( count == null ){
|
||||||
count = 100L;
|
count = 100L;
|
||||||
}
|
}
|
||||||
if( StringUtils.isAnyNotNullOrEmpty(id, itemId, sku, createdStartDate, createdEndDate, String.valueOf(bundleID) ) ){
|
if( StringUtils.isAnyNotNullOrEmpty(id, itemId, sku, createdStartDate, createdEndDate, String.valueOf(bundleId) ) ){
|
||||||
String query = StichedOfflineItemQueryBuilder.buildQuery( id, itemId, sku, createdStartDate, createdEndDate, bundleID , count );
|
String query = StichedOfflineItemQueryBuilder.buildQuery( id, itemId, sku, createdStartDate, createdEndDate, bundleId , count );
|
||||||
System.out.println( query );
|
System.out.println( query );
|
||||||
stitchingOfflineItems = stitchingOfflineItemDAO.findByQuery( query );
|
stitchingOfflineItems = stitchingOfflineItemDAO.findByQuery( query );
|
||||||
} else {
|
} else {
|
||||||
|
|
|
@ -18,7 +18,7 @@
|
||||||
<div th:replace="_fragments :: table-loading-skeleton"></div>
|
<div th:replace="_fragments :: table-loading-skeleton"></div>
|
||||||
<form th:action="@{/cutting/generate-bundle-barcodes}" method="post">
|
<form th:action="@{/cutting/generate-bundle-barcodes}" method="post">
|
||||||
<input hidden="hidden" name="artifactType" value="Bundle">
|
<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>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th>ID</th>
|
<th>ID</th>
|
||||||
|
|
|
@ -19,7 +19,7 @@
|
||||||
<form th:action="@{/cutting/generate-master-barcodes}" method="post">
|
<form th:action="@{/cutting/generate-master-barcodes}" method="post">
|
||||||
<input hidden="hidden" name="artifactType" value="MasterBundle">
|
<input hidden="hidden" name="artifactType" value="MasterBundle">
|
||||||
<table class="table table-striped table-bordered" data-bundle-table
|
<table class="table table-striped table-bordered" data-bundle-table
|
||||||
data-order="[[ 0, "dsc" ]]">
|
data-order="[[ 0, "desc" ]]">
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th></th>
|
<th></th>
|
||||||
|
|
|
@ -20,7 +20,7 @@
|
||||||
<form th:action="@{/stitching/generate-barcodes}" method="post">
|
<form th:action="@{/stitching/generate-barcodes}" method="post">
|
||||||
<input hidden="hidden" name="artifactType" value="FinishedItem">
|
<input hidden="hidden" name="artifactType" value="FinishedItem">
|
||||||
<table th:if="${ #lists != null && #lists.size(items) != 0 }" class="table table-striped table-bordered" data-table
|
<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>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th>ID</th>
|
<th>ID</th>
|
||||||
|
|
Loading…
Reference in New Issue