change PO's field type int to varchar according requirements

properties-config
usama.jameel 2025-02-03 10:27:54 +05:00
parent 2ef5b2121e
commit 0627de2a98
4 changed files with 8 additions and 10 deletions

View File

@ -20,7 +20,7 @@ public class JobCardRowMapper implements RowMapper<JobCard> {
jobCard.setInventoryStatus( rs.getString("inventory_status")); jobCard.setInventoryStatus( rs.getString("inventory_status"));
jobCard.setCustomer( rs.getString("customer") ); jobCard.setCustomer( rs.getString("customer") );
jobCard.setLotNumber( rs.getString("lot_number") ); jobCard.setLotNumber( rs.getString("lot_number") );
jobCard.setPurchaseOrderId( rs.getLong("purchase_order_id") ); jobCard.setPurchaseOrderId( rs.getString("purchase_order_id") );
jobCard.setLocationSiteId( rs.getLong("location_site_id" ) ); jobCard.setLocationSiteId( rs.getLong("location_site_id" ) );
jobCard.setDescription( rs.getString("description" ) ); jobCard.setDescription( rs.getString("description" ) );
return jobCard; return jobCard;

View File

@ -117,7 +117,7 @@ public class PurchaseOrderDAO {
} }
// find // find
public PurchaseOrder find(long id) { public PurchaseOrder find(String id) {
MapSqlParameterSource params = new MapSqlParameterSource(); MapSqlParameterSource params = new MapSqlParameterSource();
params.addValue("id", id); params.addValue("id", id);
List<PurchaseOrder> purchaseOrders = namedParameterJdbcTemplate.query(SELECT_QUERY, params, new PurchaseOrderRowMapper()); List<PurchaseOrder> purchaseOrders = namedParameterJdbcTemplate.query(SELECT_QUERY, params, new PurchaseOrderRowMapper());

View File

@ -24,7 +24,7 @@ public class JobCard {
private String inventoryStatus; private String inventoryStatus;
private String customer; private String customer;
private String lotNumber; private String lotNumber;
private long purchaseOrderId; private String purchaseOrderId;
private long locationSiteId; private long locationSiteId;
private String description; private String description;
// wrapper // wrapper
@ -106,11 +106,11 @@ public class JobCard {
this.lotNumber = lotNumber; this.lotNumber = lotNumber;
} }
public long getPurchaseOrderId() { public String getPurchaseOrderId() {
return purchaseOrderId; return purchaseOrderId;
} }
public void setPurchaseOrderId(long purchaseOrderId) { public void setPurchaseOrderId(String purchaseOrderId) {
this.purchaseOrderId = purchaseOrderId; this.purchaseOrderId = purchaseOrderId;
} }

View File

@ -34,11 +34,9 @@
</div> </div>
</div> </div>
<div class="form-row"> <div class="form-row">
<div class="col-sm-3 form-group" th:with="title=*{purchaseOrderTitle},id=*{purchaseOrderId}"> <div class="col-sm-3 form-group">
<purchase-order-search th:attr="id=${id},title=${title}" <label>Purchase Order</label>
v-bind:id-field-name="'purchaseOrderId'" <input type="text" class="form-control" th:field="*{purchaseOrderId}" required>
>
</purchase-order-search>
</div> </div>
<div class="col-sm-3 form-group" th:with="title=*{locationTitle},id=*{locationSiteId}"> <div class="col-sm-3 form-group" th:with="title=*{locationTitle},id=*{locationSiteId}">
<location-site-search th:attr="id=${id},title=${title}" <location-site-search th:attr="id=${id},title=${title}"