fixed job card print and add bundle id in stitching offline item and make table dsc order
parent
229be993d5
commit
be08c72056
|
@ -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<StitchingOfflineItem> itemList = bundleService.getStitchedOfflineItems( id, itemId, sku, startDate, endDate, jobCardId ,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, 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()
|
||||
|
|
|
@ -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, String jobCardId, 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, 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 {
|
||||
|
|
|
@ -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, "asc" ]]">
|
||||
<table class="table table-striped" data-table data-order="[[ 0, "dsc" ]]">
|
||||
<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, "asc" ]]">
|
||||
data-order="[[ 0, "dsc" ]]">
|
||||
<thead>
|
||||
<tr>
|
||||
<th></th>
|
||||
|
|
|
@ -19,7 +19,7 @@
|
|||
<div th:replace="_fragments :: table-loading-skeleton"></div>
|
||||
<form th:action="@{/cutting/generate-barcodes}" method="post">
|
||||
<input hidden="hidden" name="artifactType" value="Bundle">
|
||||
<table class="table table-striped" data-table data-order="[[ 0, "asc" ]]">
|
||||
<table class="table table-striped" data-table data-order="[[ 0, "dsc" ]]">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>ID</th>
|
||||
|
|
|
@ -96,8 +96,6 @@
|
|||
<td th:text="'Expected Production'"></td>
|
||||
<td th:text="'Actual Production'"></td>
|
||||
<td th:text="'Total Production'"></td>
|
||||
<td th:text="'Total Stitching Item'"></td>
|
||||
<td th:text="'Total Finish Item'"></td>
|
||||
<td th:text="'Cut Piece Items'"></td>
|
||||
</tr>
|
||||
</thead>
|
||||
|
@ -113,15 +111,6 @@
|
|||
<td style="border: 1px solid black;" th:text="${totalStitchingItem.get(cardItem.getItemId())}"></td>
|
||||
<td style="border: 1px solid black;" th:text="${totalFinishItem.get(cardItem.getItemId())}"></td>
|
||||
<td style="margin:0px; padding:0px">
|
||||
<table class="bordered">
|
||||
<tbody>
|
||||
<tr th:each="cutPieceItem : ${cutPiece}"
|
||||
th:if="*{cardItem.getId() == cutPieceItem.getJobCardItemId()}">
|
||||
<td style="border: 1px solid black;" th:text="${cutPieceItem.getType()}"></td>
|
||||
<td style="border: 1px solid black;" th:text="${cutPieceItem.getQuantity()}"></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
<h3>Packaging Inventory Accounts</h3>
|
||||
</div>
|
||||
<div th:replace="_fragments :: table-loading-skeleton"></div>
|
||||
<table class="table table-striped" data-account-table data-order="[[ 0, "asc" ]]">
|
||||
<table class="table table-striped" data-account-table data-order="[[ 0, "dsc" ]]">
|
||||
<thead>
|
||||
<tr>
|
||||
<th></th>
|
||||
|
|
|
@ -19,7 +19,7 @@
|
|||
<div th:replace="_fragments :: table-loading-skeleton"></div>
|
||||
<form th:action="@{/cutting/generate-barcodes}" method="post">
|
||||
<input hidden="hidden" name="artifactType" value="Bundle">
|
||||
<table class="table table-striped" data-table data-order="[[ 0, "asc" ]]">
|
||||
<table class="table table-striped" data-table data-order="[[ 0, "dcs" ]]">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>ID</th>
|
||||
|
|
|
@ -20,8 +20,8 @@
|
|||
<input type="text" class="form-control" name="sku" maxlength="100" th:value="${param['sku']}">
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label>Master Bundle ID</label>
|
||||
<input type="text" class="form-control" name="job-card-id" maxlength="100" th:value="${param['job-card-id']}">
|
||||
<label>Bundle ID</label>
|
||||
<input type="number" class="form-control" name="bundle-id" maxlength="100" th:value="${param['bundle-id' ?: 100]}">
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label>Start Date</label>
|
||||
|
|
|
@ -20,11 +20,12 @@
|
|||
<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, "asc" ]]">
|
||||
data-order="[[ 0, "dsc" ]]">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>ID</th>
|
||||
<th>Item ID</th>
|
||||
<th>Bundle ID</th>
|
||||
<th>Sku</th>
|
||||
<th>Created At</th>
|
||||
<th>Created By</th>
|
||||
|
@ -41,6 +42,7 @@
|
|||
<tr th:each="item : ${items}" th:object="${item}">
|
||||
<td th:text="*{id}"></td>
|
||||
<td th:text="*{itemId}"></td>
|
||||
<td th:text="*{bundleId}"></td>
|
||||
<td th:text="*{sku}"></td>
|
||||
<td ctp:formatdatetime="*{createdAt}"></td>
|
||||
<td th:text="*{createdBy}"></td>
|
||||
|
|
Loading…
Reference in New Issue