edit gitignore

barcode-print
saif 2024-12-24 12:28:42 +05:00
parent 5da9b3c7d2
commit 4bf30ff247
696 changed files with 20 additions and 337972 deletions

View File

@ -112,6 +112,7 @@ public class StitchingController {
inventoryService.createStitchingOfflineItemsFromJobCard( jobCard );
redirectAttributes.addFlashAttribute("success", "Finished Item Created Successfully");
} catch ( Exception exception ){
exception.printStackTrace();
redirectAttributes.addFlashAttribute( "error", exception.getMessage() );
}
return "redirect:/stitching/stitching-offline-items";

View File

@ -18,7 +18,7 @@ public class InventoryAccountDAO {
private final String TABLE_NAME = "cut_to_pack.inventory_account";
private final String SELECT_QUERY = String.format( "SELECT * FROM %s WHERE id = :id", TABLE_NAME );
private final String SELECT_ALL_QUERY = String.format( "SELECT * FROM %s ORDER BY id DESC", TABLE_NAME );
private final String SELECT_ALL_QUERY = String.format( "SELECT * FROM %s ORDER BY title DESC", TABLE_NAME );
private final String DELETE_QUERY = String.format( "DELETE FROM %s WHERE id = :id", TABLE_NAME );
private final String INSERT_QUERY = String.format( "INSERT INTO %s (id, title, parent_entity_type, parent_entity_id, active, created_by, created_at, location_site_id, notes, is_packaging) VALUES (:id, :title, :parent_entity_type, :parent_entity_id, :active, :created_by, :created_at, :location_site_id, :notes, :is_packaging) ON DUPLICATE KEY UPDATE title = VALUES(title), parent_entity_type = VALUES(parent_entity_type), parent_entity_id = VALUES(parent_entity_id), active = VALUES(active), created_by = VALUES(created_by), created_at = VALUES(created_at), location_site_id = VALUES(location_site_id), notes = VALUES(notes), is_packaging = VALUES(is_packaging)", TABLE_NAME );
private final String SELECT_BY_IDS = String.format( "SELECT * FROM %s WHERE id IN (:ids)", TABLE_NAME );

View File

@ -256,9 +256,11 @@ public class InventoryService {
throw new RuntimeException( "Item cant be Empty | null");
}
for ( JobCardItem jobCardItem : cardItems) {
int finalQuantity = jobCardItem.getActualProduction( ).compareTo( jobCardItem.getTotalProduction( ).add( jobCardItem.getProduction( )));
if ( finalQuantity < 0) {
throw new RuntimeException( " Items cant be generated because it exceeds from limit of expected Production");
if( jobCardItem.getTotalProduction() != null ){
int finalQuantity = jobCardItem.getActualProduction( ).compareTo( jobCardItem.getTotalProduction( ).add( jobCardItem.getProduction( )));
if ( finalQuantity < 0) {
throw new RuntimeException( " Items cant be generated because it exceeds from limit of expected Production");
}
}
}
}

View File

@ -89,11 +89,13 @@ public class UserService {
List<Authority> newRoles = user.getAuthorities();
newRoles.forEach(authority -> authority.setUsername( user.getUsername() ));
List<UserInventoryAccount> newInventoryAccounts = user.getInventoryAccounts();
newInventoryAccounts.forEach(account -> account.setUsername( user.getUsername() ));
if( newInventoryAccounts != null ){
newInventoryAccounts.forEach(account -> account.setUsername( user.getUsername() ));
userInventoryAccountDAO.saveAll( newInventoryAccounts );
}
// save
authorityDAO.saveAll( newRoles );
userInventoryAccountDAO.saveAll( newInventoryAccounts );
}
private void deletePreviousRolesAndAccounts( User user ){

View File

@ -16,7 +16,7 @@
}
},
template : `
<table class="table table-bordered bg-white col-sm-8">
<table class="table table-bordered bg-white col-sm-10">
<thead>
<tr>
<th>ID</th>

View File

@ -48,7 +48,8 @@
<div class="col-sm-3 form-group" data-vue-app th:with="id=*{locationSiteId},title=*{locationTitle}">
<location-site-search th:attr="id=${id},title=${title}"
v-bind:label-text="'Location Site'"
v-bind:id-field-name="'locationSiteId'">
v-bind:id-field-name="'locationSiteId'"
v-bind:required="true">
</location-site-search>
</div>
</div>

View File

@ -17,7 +17,7 @@
<a th:href="@{/inventory-accounts/new}" class="btn btn-primary">Add New</a>
</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 class="table table-striped" data-table data-order="[[ 0, &quot;asc&quot; ]]">
<thead>
<tr>
<th>ID</th>
@ -36,7 +36,10 @@
<td th:text="*{id}"></td>
<td th:text="*{title}"></td>
<td th:text="*{parentEntityType}"></td>
<td th:text="*{active}"></td>
<td>
<span class="badge badge-success" th:if="*{active}">ACTIVE</span>
<span class="badge badge-danger" th:unless="*{active}">INACTIVE</span>
</td>
<td th:text="*{createdBy}"></td>
<td ctp:formatdatetime="*{createdAt}"></td>
<td th:text="*{locationTitle}"></td>

View File

@ -29,7 +29,6 @@
</tr>
</tbody>
</table>
<h4>No process found.</h4>
</div>
</main>
</div>

View File

@ -32,7 +32,7 @@
<td th:text="*{username}"></td>
<td th:text="*{authorities}"></td>
<td>
<input type="checkbox" th:checked="*{enabled}" />
<input onclick="return false;" type="checkbox" th:checked="*{enabled}" />
</td>
<td th:text="*{inventoryAccounts}"></td>
<td>

View File

@ -1,70 +0,0 @@
application:
title: Cut To Pack Service
version: v1.0
spring:
resources:
chain:
cache: false
strategy:
content:
enabled: true
paths: /**
html-application-cache: true
enabled: true
cache:
period: 0
static-locations: file:./src/main/resources/static/
thymeleaf:
check-template-location: true
cache: false
prefix: file:./src/main/resources/templates/
uinddatasource:
jdbcUrl: jdbc:mysql://192.168.90.108:3306/uind_vms
username: utopia
password: Utopia01
driverClassName: com.mysql.cj.jdbc.Driver
logbackUrl: jdbc:mysql://192.168.90.108:3306/uind_logs?serverTimezone=Asia/Karachi
hikari:
maximum-pool-size: 5
pool-name: UINDMainPool
leak-detection-threshold: 2000
cosmosdatasource:
jdbcUrl: jdbc:mysql://192.168.90.108:3307
username: utopia
password: Utopia01
driverClassName: com.mysql.cj.jdbc.Driver
hikari:
maximum-pool-size: 5
pool-name: UINDCosmosPool
leak-detection-threshold: 2000
localdatasource:
jdbcUrl: jdbc:mysql://192.168.90.108:3306/cut_to_pack
username: utopia
password: Utopia01
driverClassName: com.mysql.cj.jdbc.Driver
hikari:
maximum-pool-size: 5
pool-name: CTPPool
leak-detection-threshold: 2000
server:
servlet:
context-path: /ctp
tomcat:
remoteip:
remote-ip-header: X-FORWARDED-FOR
max-parameter-count: 50000
port: 8080
compression:
enabled: true
mime-types: text/html, text/xml, text/plain, text/css, text/javascript, application/javascript, application/json, application/xml
min-response-size: 2KB
thymeleaf-layout-dialect:
version: 2.1.1
ctp:
cipher:
key: BC87A69BFCEC4A71E73B8DCCC4F14
seed-value : 7XYXo8Qq6D

View File

@ -1,8 +0,0 @@
,-----. ,--. ,--------. ,------. ,--.
' .--./,--.,--.,-' '-. '--. .--',---. | .--. ' ,--,--.,---.| |,-.
| | | || |'-. .-' | | | .-. | | '--' |' ,-. | .--'| /
' '--'\' '' ' | | | | ' '-' ' | | --' \ '-' \ `--.| \ \
`-----' `----' `--' `--' `---' `--' `--`--'`---'`--'`--'
${application.title} ${application.version}
Powered by Spring Boot ${spring-boot.version}

Some files were not shown because too many files have changed in this diff Show More