Compare commits
3 Commits
01f8cd78a6
...
4bf30ff247
Author | SHA1 | Date |
---|---|---|
|
4bf30ff247 | |
|
5da9b3c7d2 | |
|
f85249d084 |
|
@ -112,6 +112,7 @@ public class StitchingController {
|
||||||
inventoryService.createStitchingOfflineItemsFromJobCard( jobCard );
|
inventoryService.createStitchingOfflineItemsFromJobCard( jobCard );
|
||||||
redirectAttributes.addFlashAttribute("success", "Finished Item Created Successfully");
|
redirectAttributes.addFlashAttribute("success", "Finished Item Created Successfully");
|
||||||
} catch ( Exception exception ){
|
} catch ( Exception exception ){
|
||||||
|
exception.printStackTrace();
|
||||||
redirectAttributes.addFlashAttribute( "error", exception.getMessage() );
|
redirectAttributes.addFlashAttribute( "error", exception.getMessage() );
|
||||||
}
|
}
|
||||||
return "redirect:/stitching/stitching-offline-items";
|
return "redirect:/stitching/stitching-offline-items";
|
||||||
|
|
|
@ -18,7 +18,7 @@ public class InventoryAccountDAO {
|
||||||
|
|
||||||
private final String TABLE_NAME = "cut_to_pack.inventory_account";
|
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_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 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 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 );
|
private final String SELECT_BY_IDS = String.format( "SELECT * FROM %s WHERE id IN (:ids)", TABLE_NAME );
|
||||||
|
|
|
@ -256,9 +256,11 @@ public class InventoryService {
|
||||||
throw new RuntimeException( "Item cant be Empty | null");
|
throw new RuntimeException( "Item cant be Empty | null");
|
||||||
}
|
}
|
||||||
for ( JobCardItem jobCardItem : cardItems) {
|
for ( JobCardItem jobCardItem : cardItems) {
|
||||||
int finalQuantity = jobCardItem.getActualProduction( ).compareTo( jobCardItem.getTotalProduction( ).add( jobCardItem.getProduction( )));
|
if( jobCardItem.getTotalProduction() != null ){
|
||||||
if ( finalQuantity < 0) {
|
int finalQuantity = jobCardItem.getActualProduction( ).compareTo( jobCardItem.getTotalProduction( ).add( jobCardItem.getProduction( )));
|
||||||
throw new RuntimeException( " Items cant be generated because it exceeds from limit of expected Production");
|
if ( finalQuantity < 0) {
|
||||||
|
throw new RuntimeException( " Items cant be generated because it exceeds from limit of expected Production");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -89,11 +89,13 @@ public class UserService {
|
||||||
List<Authority> newRoles = user.getAuthorities();
|
List<Authority> newRoles = user.getAuthorities();
|
||||||
newRoles.forEach(authority -> authority.setUsername( user.getUsername() ));
|
newRoles.forEach(authority -> authority.setUsername( user.getUsername() ));
|
||||||
List<UserInventoryAccount> newInventoryAccounts = user.getInventoryAccounts();
|
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
|
// save
|
||||||
authorityDAO.saveAll( newRoles );
|
authorityDAO.saveAll( newRoles );
|
||||||
userInventoryAccountDAO.saveAll( newInventoryAccounts );
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void deletePreviousRolesAndAccounts( User user ){
|
private void deletePreviousRolesAndAccounts( User user ){
|
||||||
|
|
|
@ -16,7 +16,7 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
template : `
|
template : `
|
||||||
<table class="table table-bordered bg-white col-sm-8">
|
<table class="table table-bordered bg-white col-sm-10">
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th>ID</th>
|
<th>ID</th>
|
||||||
|
|
|
@ -48,7 +48,8 @@
|
||||||
<div class="col-sm-3 form-group" data-vue-app th:with="id=*{locationSiteId},title=*{locationTitle}">
|
<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}"
|
<location-site-search th:attr="id=${id},title=${title}"
|
||||||
v-bind:label-text="'Location Site'"
|
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>
|
</location-site-search>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -17,7 +17,7 @@
|
||||||
<a th:href="@{/inventory-accounts/new}" class="btn btn-primary">Add New</a>
|
<a th:href="@{/inventory-accounts/new}" class="btn btn-primary">Add New</a>
|
||||||
</div>
|
</div>
|
||||||
<div th:replace="_fragments :: table-loading-skeleton"></div>
|
<div th:replace="_fragments :: table-loading-skeleton"></div>
|
||||||
<table class="table table-striped table-bordered" data-table data-order="[[ 0, "asc" ]]">
|
<table class="table table-striped" data-table data-order="[[ 0, "asc" ]]">
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th>ID</th>
|
<th>ID</th>
|
||||||
|
@ -36,7 +36,10 @@
|
||||||
<td th:text="*{id}"></td>
|
<td th:text="*{id}"></td>
|
||||||
<td th:text="*{title}"></td>
|
<td th:text="*{title}"></td>
|
||||||
<td th:text="*{parentEntityType}"></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 th:text="*{createdBy}"></td>
|
||||||
<td ctp:formatdatetime="*{createdAt}"></td>
|
<td ctp:formatdatetime="*{createdAt}"></td>
|
||||||
<td th:text="*{locationTitle}"></td>
|
<td th:text="*{locationTitle}"></td>
|
||||||
|
|
|
@ -29,7 +29,6 @@
|
||||||
</tr>
|
</tr>
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
<h4>No process found.</h4>
|
|
||||||
</div>
|
</div>
|
||||||
</main>
|
</main>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -32,7 +32,7 @@
|
||||||
<td th:text="*{username}"></td>
|
<td th:text="*{username}"></td>
|
||||||
<td th:text="*{authorities}"></td>
|
<td th:text="*{authorities}"></td>
|
||||||
<td>
|
<td>
|
||||||
<input type="checkbox" th:checked="*{enabled}" />
|
<input onclick="return false;" type="checkbox" th:checked="*{enabled}" />
|
||||||
</td>
|
</td>
|
||||||
<td th:text="*{inventoryAccounts}"></td>
|
<td th:text="*{inventoryAccounts}"></td>
|
||||||
<td>
|
<td>
|
||||||
|
|
|
@ -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
|
|
|
@ -1,8 +0,0 @@
|
||||||
,-----. ,--. ,--------. ,------. ,--.
|
|
||||||
' .--./,--.,--.,-' '-. '--. .--',---. | .--. ' ,--,--.,---.| |,-.
|
|
||||||
| | | || |'-. .-' | | | .-. | | '--' |' ,-. | .--'| /
|
|
||||||
' '--'\' '' ' | | | | ' '-' ' | | --' \ '-' \ `--.| \ \
|
|
||||||
`-----' `----' `--' `--' `---' `--' `--`--'`---'`--'`--'
|
|
||||||
|
|
||||||
${application.title} ${application.version}
|
|
||||||
Powered by Spring Boot ${spring-boot.version}
|
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue