ctp-working #1

Merged
saif.haq merged 8 commits from ctp-working into main 2025-01-06 07:04:54 +00:00
There is no content yet.
usama.jameel added 6 commits 2025-01-03 05:01:35 +00:00
saif.haq reviewed 2025-01-03 05:05:48 +00:00
@ -52,1 +54,4 @@
LocalDate endDate1 = StringUtils.isNullOrEmpty(endDate) ? LocalDate.now() : LocalDate.parse(endDate);
List<FinishedItem> itemList = bundleService.getFinishedItem( id, itemId, sku, startDate1.toString(), endDate1.toString(), jobCardId ,count );
model.addAttribute("items", itemList ) ;
if(StringUtils.isNullOrEmpty( startDate) || StringUtils.isNullOrEmpty( endDate )){
Collaborator

move upward before db query

move upward before db query
usama.jameel marked this conversation as resolved
saif.haq reviewed 2025-01-03 05:05:50 +00:00
saif.haq reviewed 2025-01-03 05:06:57 +00:00
@ -70,6 +77,9 @@ public class FinishingController {
// 5 for Finishing
model.addAttribute("accounts", inventoryAccountService.getInventoryAccounts( id, title, active, createdBy, startDate, endDate, siteId, count, "PROCESS", "5" , false ));
model.addAttribute("locations", locationService.findAll() );
if(count == null){
Collaborator

remove check

remove check
usama.jameel marked this conversation as resolved
saif.haq reviewed 2025-01-03 05:08:22 +00:00
@ -50,1 +57,4 @@
model.addAttribute("locations", locationService.findAll() );
LocalDate startDate = StringUtils.isNullOrEmpty(createdStartDate) ? LocalDate.now().minusDays(30) : LocalDate.parse(createdStartDate);
LocalDate endDate = StringUtils.isNullOrEmpty(createdEndDate) ? LocalDate.now() : LocalDate.parse(createdEndDate);
if(StringUtils.isNullOrEmpty( createdStartDate) || StringUtils.isNullOrEmpty( createdEndDate )){
Collaborator

move check before db call

move check before db call
usama.jameel marked this conversation as resolved
saif.haq reviewed 2025-01-03 05:08:52 +00:00
@ -142,2 +154,4 @@
return "redirect:/job-cards";
}
@GetMapping( value = "/job-card-detail/{id}" )
Collaborator

job-card/view/{id}

job-card/view/{id}
usama.jameel marked this conversation as resolved
saif.haq reviewed 2025-01-03 05:09:23 +00:00
@ -41,8 +44,9 @@ public class PackagingController {
Model model ){
model.addAttribute("accounts", inventoryAccountService.getInventoryAccounts( id, title, active, createdBy, startDate, endDate, siteId, count , null, null,true ) );
model.addAttribute("locations", locationService.findAll() );
if(count == null){
Collaborator

remove check

remove check
usama.jameel marked this conversation as resolved
saif.haq reviewed 2025-01-03 05:09:42 +00:00
@ -68,1 +70,4 @@
LocalDate endDate1 = StringUtils.isNullOrEmpty(endDate) ? LocalDate.now() : LocalDate.parse(endDate);
List<FinishedItem> itemList = bundleService.getFinishedItem( id, itemId, sku, startDate1.toString(), endDate1.toString(), jobCardId ,count );
model.addAttribute("items", itemList ) ;
if(StringUtils.isNullOrEmpty( startDate) || StringUtils.isNullOrEmpty( endDate )){
Collaborator

move check up

move check up
usama.jameel marked this conversation as resolved
saif.haq reviewed 2025-01-03 05:09:55 +00:00
@ -0,0 +27,4 @@
}
@GetMapping( "/summary")
public String showMasterBundles(@RequestParam(value = "item-id", required = false ) String itemId,
Collaborator

formatting

formatting
usama.jameel marked this conversation as resolved
saif.haq reviewed 2025-01-03 05:10:19 +00:00
@ -0,0 +39,4 @@
ArrayList<LocalDate> arrayList = generateDateList(startDate1,endDate1);
model.addAttribute("dateLimits", arrayList);
model.addAttribute("tableData", getDataByFilteration);
if(StringUtils.isNullOrEmpty( startDate) || StringUtils.isNullOrEmpty( endDate )){
Collaborator

move check up before db call

move check up before db call
usama.jameel marked this conversation as resolved
saif.haq reviewed 2025-01-03 05:11:50 +00:00
@ -97,0 +110,4 @@
redirect.addFlashAttribute("error", model.getAttribute("message"));
}
}
if(StringUtils.isNullOrEmpty( startDate) || StringUtils.isNullOrEmpty( endDate )){
Collaborator

..

..
usama.jameel marked this conversation as resolved
saif.haq reviewed 2025-01-03 05:13:40 +00:00
@ -114,3 +133,3 @@
} catch ( Exception exception ){
exception.printStackTrace();
redirectAttributes.addFlashAttribute( "error", exception.getMessage() );
redirectAttributes.addFlashAttribute( "message", exception.getMessage() );
Collaborator

..

..
usama.jameel marked this conversation as resolved
saif.haq reviewed 2025-01-03 05:14:06 +00:00
@ -126,0 +143,4 @@
if (ids == null){
redirectAttributes.addFlashAttribute( "message", "Select At least One CheckBox" );
return "redirect:/stitching/stitching-offline-items";
}else {
Collaborator

remove else

remove else
usama.jameel marked this conversation as resolved
saif.haq reviewed 2025-01-03 05:14:42 +00:00
@ -82,11 +82,13 @@ public class AuthorityDAO {
// save all
public int[] saveAll( List<Authority> authorities ) {
List<MapSqlParameterSource> batchArgs = new ArrayList<>();
if (authorities == null){
Collaborator

move to service

move to service
usama.jameel marked this conversation as resolved
saif.haq reviewed 2025-01-03 05:15:43 +00:00
@ -0,0 +6,4 @@
import java.sql.ResultSet;
import java.sql.SQLException;
public class FinishOfflineItemRowMapper implements RowMapper<FinishedItem> {
Collaborator

rename to FinishItemRowMapper

rename to FinishItemRowMapper
usama.jameel marked this conversation as resolved
saif.haq reviewed 2025-01-03 05:16:12 +00:00
@ -98,6 +104,10 @@ public class FinishedItemDAO {
return namedParameterJdbcTemplate.query( query, new FinishedItemRowMapper() );
}
public List<FinishedItem> findFinishOfflineItemByQuery(String query ){
Collaborator

rename

rename
usama.jameel marked this conversation as resolved
saif.haq reviewed 2025-01-03 05:16:45 +00:00
@ -123,10 +139,37 @@ public class FinishedItemDAO {
}
public HashMap<Long, Long> findTotalCount(List<Long> itemIds, long jobCardId) {
Collaborator

rename function

rename function
usama.jameel marked this conversation as resolved
saif.haq reviewed 2025-01-03 05:17:37 +00:00
@ -130,2 +160,4 @@
return namedParameterJdbcTemplate.query( SELECT_BY_STITCHED_ITEM_IDS, params, new FinishedItemRowMapper() );
}
public List<StitchingOfflineItem> findByBarcodeAndApprovedStatus( List<StitchingOfflineItem> finishedItems ){
Collaborator

rename function params

rename function params
usama.jameel marked this conversation as resolved
saif.haq reviewed 2025-01-03 05:18:15 +00:00
@ -111,2 +113,4 @@
return namedParameterJdbcTemplate.query( query, new JobCardRowMapper() );
}
public List<JobCard> findByAllWithLimit(Long limit){
Collaborator

findByLimit()

findByLimit()
usama.jameel marked this conversation as resolved
saif.haq reviewed 2025-01-03 05:18:40 +00:00
@ -116,2 +125,4 @@
return namedParameterJdbcTemplate.query( SELECT_BY_MASTER_ID , params, new StitchingOfflineItemRowMapper() );
}
public HashMap<Long, Long> findTotalCount(List<Long> itemIds, long jobCardId) {
Collaborator

rename fn name

rename fn name
usama.jameel marked this conversation as resolved
saif.haq reviewed 2025-01-03 05:22:25 +00:00
@ -54,0 +56,4 @@
* get finished Items By Job Card ID
* */
public FinishedItem findFinishedItemByJobCardId( long id ){
FinishedItem finishedItem = finishedItemDAO.find( id );
Collaborator

findByJobcardId

findByJobcardId
usama.jameel marked this conversation as resolved
saif.haq reviewed 2025-01-03 05:24:23 +00:00
@ -259,0 +283,4 @@
return stitchingOfflineItemDAO.findByJobCardId( jobCardId );
}
public HashMap<Long, Long> totalStitchingItem(List<Long> itemIds, long jobCardId ){
Collaborator

Map

Map
usama.jameel marked this conversation as resolved
saif.haq reviewed 2025-01-03 05:25:31 +00:00
@ -0,0 +44,4 @@
}
List<SummaryInventoryReport> summaries = summaryInventoryReportDao.findByFilter(itemId1, sku1, startDate1, endDate1);
Map<String, Map<String, List<SummaryInventoryReport>>> tableData = new HashMap<>();
Collaborator

name var as map keys

name var as map keys
usama.jameel marked this conversation as resolved
saif.haq reviewed 2025-01-03 05:27:08 +00:00
@ -18,3 +18,3 @@
</div>
<div th:replace="_fragments :: table-loading-skeleton"></div>
<table class="table table-striped" data-table data-order="[[ 0, &quot;asc&quot; ]]">
<table th:if="${#lists.size(accounts) != 0 && #lists != null }" class="table table-striped table-bordered" data-table data-order="[[ 0, &quot;asc&quot; ]]">
Collaborator

check conditions

check conditions
usama.jameel marked this conversation as resolved
saif.haq reviewed 2025-01-03 05:27:28 +00:00
@ -17,3 +17,3 @@
</div>
<div th:replace="_fragments :: table-loading-skeleton"></div>
<table class="table table-striped font-sm" data-table data-order="[[ 0, &quot;asc&quot; ]]">
<table th:if="${#lists.size(cards) != 0 && #lists != null }" class="table table-striped font-sm" data-table data-order="[[ 0, &quot;asc&quot; ]]">
Collaborator

check conditions

check conditions
usama.jameel marked this conversation as resolved
saif.haq reviewed 2025-01-03 05:27:53 +00:00
@ -0,0 +12,4 @@
<div class="col-sm">
<h3 >Summary</h3>
Collaborator

remove spaces

remove spaces
usama.jameel marked this conversation as resolved
saif.haq reviewed 2025-01-03 05:28:23 +00:00
@ -20,3 +20,3 @@
<form th:action="@{/stitching/generate-barcodes}" method="post">
<input hidden="hidden" name="artifactType" value="FinishedItem">
<table class="table table-striped table-bordered" data-table
<table th:if="${#lists.size(items) != 0 && #lists != null }" class="table table-striped table-bordered" data-table
Collaborator

..

..
usama.jameel marked this conversation as resolved
saif.haq reviewed 2025-01-03 05:28:50 +00:00
@ -18,3 +18,3 @@
</div>
<div th:replace="_fragments :: table-loading-skeleton"></div>
<table class="table table-striped table-bordered" data-table data-order="[[ 0, &quot;asc&quot; ]]">
<table th:if="${#lists.size(users) != 0 && #lists != null }" class="table table-striped table-bordered" data-table data-order="[[ 0, &quot;asc&quot; ]]">
Collaborator

..

..
usama.jameel marked this conversation as resolved
saif.haq approved these changes 2025-01-03 05:29:02 +00:00
usama.jameel added 1 commit 2025-01-06 06:11:40 +00:00
usama.jameel added 1 commit 2025-01-06 06:16:17 +00:00
saif.haq merged commit 87847bd054 into main 2025-01-06 07:04:54 +00:00
Sign in to join this conversation.
No reviewers
No Label
No Milestone
No project
No Assignees
2 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: UIND/cut-to-pack-service#1
There is no content yet.