merge conflict resolve.
commit
7f50fb2fb4
|
@ -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";
|
||||
|
|
|
@ -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 );
|
||||
|
|
|
@ -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");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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 ){
|
||||
|
|
|
@ -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>
|
||||
|
|
|
@ -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>
|
||||
|
|
|
@ -29,7 +29,6 @@
|
|||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<h4>No process found.</h4>
|
||||
</div>
|
||||
</main>
|
||||
</div>
|
||||
|
|
|
@ -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>
|
||||
|
|
|
@ -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.
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