ctp-working #1
Loading…
Reference in New Issue
There is no content yet.
Delete Branch "ctp-working"
Deleting a branch is permanent. Although the deleted branch may exist for a short time before cleaning up, in most cases it CANNOT be undone. Continue?
@ -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 )){
move upward before db query
@ -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){
remove check
@ -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 )){
move check before db call
@ -142,2 +154,4 @@
return "redirect:/job-cards";
}
@GetMapping( value = "/job-card-detail/{id}" )
job-card/view/{id}
@ -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){
remove check
@ -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 )){
move check up
@ -0,0 +27,4 @@
}
@GetMapping( "/summary")
public String showMasterBundles(@RequestParam(value = "item-id", required = false ) String itemId,
formatting
@ -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 )){
move check up before db call
@ -97,0 +110,4 @@
redirect.addFlashAttribute("error", model.getAttribute("message"));
}
}
if(StringUtils.isNullOrEmpty( startDate) || StringUtils.isNullOrEmpty( endDate )){
..
@ -114,3 +133,3 @@
} catch ( Exception exception ){
exception.printStackTrace();
redirectAttributes.addFlashAttribute( "error", exception.getMessage() );
redirectAttributes.addFlashAttribute( "message", exception.getMessage() );
..
@ -126,0 +143,4 @@
if (ids == null){
redirectAttributes.addFlashAttribute( "message", "Select At least One CheckBox" );
return "redirect:/stitching/stitching-offline-items";
}else {
remove else
@ -82,11 +82,13 @@ public class AuthorityDAO {
// save all
public int[] saveAll( List<Authority> authorities ) {
List<MapSqlParameterSource> batchArgs = new ArrayList<>();
if (authorities == null){
move to service
@ -0,0 +6,4 @@
import java.sql.ResultSet;
import java.sql.SQLException;
public class FinishOfflineItemRowMapper implements RowMapper<FinishedItem> {
rename to FinishItemRowMapper
@ -98,6 +104,10 @@ public class FinishedItemDAO {
return namedParameterJdbcTemplate.query( query, new FinishedItemRowMapper() );
}
public List<FinishedItem> findFinishOfflineItemByQuery(String query ){
rename
@ -123,10 +139,37 @@ public class FinishedItemDAO {
}
public HashMap<Long, Long> findTotalCount(List<Long> itemIds, long jobCardId) {
rename function
@ -130,2 +160,4 @@
return namedParameterJdbcTemplate.query( SELECT_BY_STITCHED_ITEM_IDS, params, new FinishedItemRowMapper() );
}
public List<StitchingOfflineItem> findByBarcodeAndApprovedStatus( List<StitchingOfflineItem> finishedItems ){
rename function params
@ -111,2 +113,4 @@
return namedParameterJdbcTemplate.query( query, new JobCardRowMapper() );
}
public List<JobCard> findByAllWithLimit(Long limit){
findByLimit()
@ -116,2 +125,4 @@
return namedParameterJdbcTemplate.query( SELECT_BY_MASTER_ID , params, new StitchingOfflineItemRowMapper() );
}
public HashMap<Long, Long> findTotalCount(List<Long> itemIds, long jobCardId) {
rename fn name
@ -54,0 +56,4 @@
* get finished Items By Job Card ID
* */
public FinishedItem findFinishedItemByJobCardId( long id ){
FinishedItem finishedItem = finishedItemDAO.find( id );
findByJobcardId
@ -259,0 +283,4 @@
return stitchingOfflineItemDAO.findByJobCardId( jobCardId );
}
public HashMap<Long, Long> totalStitchingItem(List<Long> itemIds, long jobCardId ){
Map
@ -0,0 +44,4 @@
}
List<SummaryInventoryReport> summaries = summaryInventoryReportDao.findByFilter(itemId1, sku1, startDate1, endDate1);
Map<String, Map<String, List<SummaryInventoryReport>>> tableData = new HashMap<>();
name var as map keys
@ -18,3 +18,3 @@
</div>
<div th:replace="_fragments :: table-loading-skeleton"></div>
<table class="table table-striped" data-table data-order="[[ 0, "asc" ]]">
<table th:if="${#lists.size(accounts) != 0 && #lists != null }" class="table table-striped table-bordered" data-table data-order="[[ 0, "asc" ]]">
check conditions
@ -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, "asc" ]]">
<table th:if="${#lists.size(cards) != 0 && #lists != null }" class="table table-striped font-sm" data-table data-order="[[ 0, "asc" ]]">
check conditions
@ -0,0 +12,4 @@
<div class="col-sm">
<h3 >Summary</h3>
remove spaces
@ -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
..
@ -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, "asc" ]]">
<table th:if="${#lists.size(users) != 0 && #lists != null }" class="table table-striped table-bordered" data-table data-order="[[ 0, "asc" ]]">
..