mirror of
https://github.com/dyiop/astute.git
synced 2025-04-19 03:30:16 -04:00
Merge remote-tracking branch 'origin/master'
# Conflicts: # AstuteClient2/src/app/services/astute-client-service.ts
This commit is contained in:
commit
aaf92fcfa1
|
@ -170,7 +170,7 @@
|
||||||
<div class="modal-footer">
|
<div class="modal-footer">
|
||||||
<button class="btn btn-success" type="button"
|
<button class="btn btn-success" type="button"
|
||||||
[disabled]="!(ponum.value && podate.value && customerid.value && contractnum.value && contractamt.value)"
|
[disabled]="!(ponum.value && podate.value && customerid.value && contractnum.value && contractamt.value)"
|
||||||
(click)="addPo(projNum.value, ponum.value, podate.value, customerid.value, contractnum.value, contractamt.value, new)"
|
(click)="addPo(projNum.value, ponum.value, podate.value, customerid.value, contractnum.value, contractamt.value, potitle.value, new)"
|
||||||
>
|
>
|
||||||
Add
|
Add
|
||||||
</button>
|
</button>
|
||||||
|
@ -201,13 +201,22 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group row">
|
<div class="form-group row">
|
||||||
<label class="col-sm-2 col-form-label">PO Number</label>
|
<label class="col-sm-2 col-form-label">SO Title</label>
|
||||||
<div class="col-sm-10">
|
<div class="col-sm-10">
|
||||||
<input type="text" class="form-control" placeholder="PO Number" [value]="selected.ponum" #ponum disabled>
|
<select class="form-control" [value]="selected.title" #customerid disabled>
|
||||||
|
<option *ngFor="let customer of customers" [value]="customer.title">{{customer.title}}
|
||||||
|
</option>
|
||||||
|
</select>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group row">
|
<div class="form-group row">
|
||||||
<label class="col-sm-2 col-form-label">PO Date</label>
|
<label class="col-sm-2 col-form-label">SO Number</label>
|
||||||
|
<div class="col-sm-10">
|
||||||
|
<input type="text" class="form-control" placeholder="SO Number" [value]="selected.ponum" #ponum disabled>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group row">
|
||||||
|
<label class="col-sm-2 col-form-label">SO Date</label>
|
||||||
<div class="col-sm-10">
|
<div class="col-sm-10">
|
||||||
<input type="date" class="form-control" [value]="selected.podate" #podate>
|
<input type="date" class="form-control" [value]="selected.podate" #podate>
|
||||||
</div>
|
</div>
|
||||||
|
@ -323,7 +332,7 @@
|
||||||
<div class="modal-footer">
|
<div class="modal-footer">
|
||||||
<button class="btn btn-success" type="button"
|
<button class="btn btn-success" type="button"
|
||||||
[disabled]="!(ponum.value && podate.value && contractnum.value && contractamt.value)"
|
[disabled]="!(ponum.value && podate.value && contractnum.value && contractamt.value)"
|
||||||
(click)="editPo(projNum.value, ponum.value, podate.value, contractnum.value, contractamt.value, edit)"
|
(click)="editPo(projNum.value, ponum.value, podate.value, contractnum.value, contractamt.value, potitle.value, edit)"
|
||||||
>
|
>
|
||||||
Update
|
Update
|
||||||
</button>
|
</button>
|
||||||
|
|
|
@ -19,6 +19,7 @@ export class SalesOrderComponent implements OnInit {
|
||||||
// {headerName: 'Customer ID', field: 'customerId'},
|
// {headerName: 'Customer ID', field: 'customerId'},
|
||||||
{headerName: 'Customer Name', field: 'customerName'},
|
{headerName: 'Customer Name', field: 'customerName'},
|
||||||
{headerName: 'Contract Number', field: 'contractNum'},
|
{headerName: 'Contract Number', field: 'contractNum'},
|
||||||
|
{headerName: 'SO Title', field: 'title'},
|
||||||
{headerName: 'Contract Amount', field: 'contractAmt'},
|
{headerName: 'Contract Amount', field: 'contractAmt'},
|
||||||
{headerName: 'SO Date', field: 'podate'}
|
{headerName: 'SO Date', field: 'podate'}
|
||||||
];
|
];
|
||||||
|
@ -31,14 +32,15 @@ export class SalesOrderComponent implements OnInit {
|
||||||
this.refreshData();
|
this.refreshData();
|
||||||
}
|
}
|
||||||
|
|
||||||
addPo(projNum, ponum, podate, customerid, contractnum, contractamt, ref) {
|
addPo(projNum, ponum, podate, customerid, contractnum, contractamt, title, ref ) {
|
||||||
const poData = {
|
const poData = {
|
||||||
"astuteProjectNumber": projNum,
|
"astuteProjectNumber": projNum,
|
||||||
"poNum": ponum,
|
"poNum": ponum,
|
||||||
"PODate": this.formatDate(new Date(podate)),
|
"PODate": this.formatDate(new Date(podate)),
|
||||||
"customerId": customerid,
|
"customerId": customerid,
|
||||||
"contractNum": contractnum,
|
"contractNum": contractnum,
|
||||||
"contractAmt": contractamt,
|
"contractAmt": contractamt,
|
||||||
|
"title": title,
|
||||||
}
|
}
|
||||||
console.log (poData.PODate);
|
console.log (poData.PODate);
|
||||||
this.astuteClientService.createPO(poData).then((data) => {
|
this.astuteClientService.createPO(poData).then((data) => {
|
||||||
|
@ -70,13 +72,14 @@ export class SalesOrderComponent implements OnInit {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
editPo(projNum, ponum, podate, contractnum, contractamt, ref) {
|
editPo(projNum, ponum, podate, contractnum, contractamt, title, ref) {
|
||||||
const poData = {
|
const poData = {
|
||||||
"astuteProjectNumber": projNum,
|
"astuteProjectNumber": projNum,
|
||||||
"poNum": ponum,
|
"poNum": ponum,
|
||||||
"PODate": this.formatDate(new Date(podate)),
|
"PODate": this.formatDate(new Date(podate)),
|
||||||
"contractNum": contractnum,
|
"contractNum": contractnum,
|
||||||
"contractAmt": contractamt,
|
"contractAmt": contractamt,
|
||||||
|
"title": title,
|
||||||
}
|
}
|
||||||
console.log(poData);
|
console.log(poData);
|
||||||
this.astuteClientService.updatePO(ponum, poData).then((data) => {
|
this.astuteClientService.updatePO(ponum, poData).then((data) => {
|
||||||
|
|
|
@ -188,7 +188,6 @@ export class AstuteClientService {
|
||||||
public getInvoiceDetail(invoiceId: string): Promise<any> {
|
public getInvoiceDetail(invoiceId: string): Promise<any> {
|
||||||
console.log("*** In getInvoiceDetail()");
|
console.log("*** In getInvoiceDetail()");
|
||||||
const url = `${this.invoiceDetailUrl}?invoiceNumber=${invoiceId}`;
|
const url = `${this.invoiceDetailUrl}?invoiceNumber=${invoiceId}`;
|
||||||
console.log(url);
|
|
||||||
return this.http.get(url)
|
return this.http.get(url)
|
||||||
.toPromise()
|
.toPromise()
|
||||||
.then(response => {
|
.then(response => {
|
||||||
|
|
|
@ -99,11 +99,12 @@ CREATE TABLE IF NOT EXISTS `customer` (
|
||||||
PRIMARY KEY (`customer_id`)
|
PRIMARY KEY (`customer_id`)
|
||||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
||||||
|
|
||||||
-- Dumping data for table astute.customer: ~3 rows (approximately)
|
-- Dumping data for table astute.customer: ~4 rows (approximately)
|
||||||
/*!40000 ALTER TABLE `customer` DISABLE KEYS */;
|
/*!40000 ALTER TABLE `customer` DISABLE KEYS */;
|
||||||
INSERT INTO `customer` (`customer_id`, `customer_name`, `bill_to_dept`, `add1`, `add2`, `city`, `state`, `zip`, `zip_last_4`, `email`, `phone`, `fax`) VALUES
|
INSERT INTO `customer` (`customer_id`, `customer_name`, `bill_to_dept`, `add1`, `add2`, `city`, `state`, `zip`, `zip_last_4`, `email`, `phone`, `fax`) VALUES
|
||||||
('1', 'test4565', 'test123', 'test123', 'null', 'test123', 'md', 20874, 0, 'null', 0, 0),
|
('1', 'test4565', 'test123', 'test123', 'null', 'test123', 'md', 20874, 0, 'null', 0, 0),
|
||||||
('2', 'test123', 'test123', 'test123', NULL, 'test123', 'md', 20874, 0, NULL, 0, 0),
|
('2', 'test123', 'test123', 'test123', NULL, 'test123', 'md', 20874, 0, NULL, 0, 0),
|
||||||
|
('3', 'Hampton Road Transit', 'Accounts Payable', '3400 Victoria Blvd', '', 'Hampton', 'VA', 23661, 0, 'wcollins@hrtransit.org', 7572226000, 7572226000),
|
||||||
('test500', 'test500', 'test500', 'test500', 'test500', 'test500', 'md', 20874, 1234, 'Test@Test.com', 1231231233, 131231233);
|
('test500', 'test500', 'test500', 'test500', 'test500', 'test500', 'md', 20874, 1234, 'Test@Test.com', 1231231233, 131231233);
|
||||||
/*!40000 ALTER TABLE `customer` ENABLE KEYS */;
|
/*!40000 ALTER TABLE `customer` ENABLE KEYS */;
|
||||||
|
|
||||||
|
@ -371,14 +372,15 @@ CREATE TABLE IF NOT EXISTS `po` (
|
||||||
CONSTRAINT `po_customer_id_fk` FOREIGN KEY (`customer_id`) REFERENCES `customer` (`customer_id`)
|
CONSTRAINT `po_customer_id_fk` FOREIGN KEY (`customer_id`) REFERENCES `customer` (`customer_id`)
|
||||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
||||||
|
|
||||||
-- Dumping data for table astute.po: ~5 rows (approximately)
|
-- Dumping data for table astute.po: ~6 rows (approximately)
|
||||||
/*!40000 ALTER TABLE `po` DISABLE KEYS */;
|
/*!40000 ALTER TABLE `po` DISABLE KEYS */;
|
||||||
INSERT INTO `po` (`PO_num`, `contract_num`, `PO_date`, `contract_amt`, `customer_id`, `astute_project_num`, `po_id`) VALUES
|
INSERT INTO `po` (`PO_num`, `contract_num`, `PO_date`, `contract_amt`, `customer_id`, `astute_project_num`, `po_id`, `title`) VALUES
|
||||||
('EP2649247', 'test123', NULL, 30000.00, '1', 'null', 1),
|
('EP2649247', 'test123', NULL, 30000.00, '1', 'null', 1, 'SO Dummy Title for Test123'),
|
||||||
('test12', 'test', '2018-07-11', 60000.00, '1', 'adf', 2),
|
('HRT-16-72046', '16-72046', NULL, 23360.00, '3', 'HRT-01-01', 1, 'SO Dummy Title for 16-72046 adding upto 200 characters ****************************'),
|
||||||
('test3', 'test', '2018-07-12', 60000.00, '1', 'adf', 3),
|
('test12', 'test', '2018-07-11', 60000.00, '1', 'adf', 2, 'SO Dummy Title for test'),
|
||||||
('test5', 'test', '2018-07-13', 60000.00, '1', 'adf', 4),
|
('test3', 'test', '2018-07-12', 60000.00, '1', 'adf', 3, 'SO Dummy Title for test'),
|
||||||
('test500', 'test', NULL, 60000.00, 'Test500', 'test', 1);
|
('test5', 'test', '2018-07-13', 60000.00, '1', 'adf', 4, 'SO Dummy Title for test'),
|
||||||
|
('test500', 'test', NULL, 60000.00, 'Test500', 'test', 1, 'SO Dummy Title for test');
|
||||||
/*!40000 ALTER TABLE `po` ENABLE KEYS */;
|
/*!40000 ALTER TABLE `po` ENABLE KEYS */;
|
||||||
|
|
||||||
-- Dumping structure for table astute.po_detail
|
-- Dumping structure for table astute.po_detail
|
||||||
|
@ -399,13 +401,13 @@ CREATE TABLE IF NOT EXISTS `po_detail` (
|
||||||
|
|
||||||
-- Dumping data for table astute.po_detail: ~6 rows (approximately)
|
-- Dumping data for table astute.po_detail: ~6 rows (approximately)
|
||||||
/*!40000 ALTER TABLE `po_detail` DISABLE KEYS */;
|
/*!40000 ALTER TABLE `po_detail` DISABLE KEYS */;
|
||||||
INSERT INTO `po_detail` (`PO_num`, `line_item_no`, `service_desc`, `fee_type_id`, `qty`, `service_type_id`, `fee`, `remaining_qty`) VALUES
|
INSERT INTO `po_detail` (`PO_num`, `line_item_no`, `service_desc`, `fee_type_id`, `qty`, `service_type_id`, `fee`, `remaining_qty`, `title`) VALUES
|
||||||
('EP2649247', 1, 'test', 2, 38073, 1, NULL, NULL),
|
('EP2649247', 1, 'test', 2, 38073, 1, NULL, NULL, NULL),
|
||||||
('EP2649247', 2, 'test', 2, 16345, 1, NULL, NULL),
|
('EP2649247', 2, 'test', 2, 16345, 1, NULL, NULL, NULL),
|
||||||
('EP2649247', 3, 'test', 2, 4642, 2, NULL, NULL),
|
('EP2649247', 3, 'test', 2, 4642, 2, NULL, NULL, NULL),
|
||||||
('EP2649247', 4, 'test', 2, 880, 4, NULL, NULL),
|
('EP2649247', 4, 'test', 2, 880, 4, NULL, NULL, NULL),
|
||||||
('EP2649247', 6, 'test', 2, 456, 1, NULL, NULL),
|
('EP2649247', 6, 'test', 2, 456, 1, NULL, NULL, NULL),
|
||||||
('EP2649247', 16, 'test', 1, 1555, 1, NULL, NULL);
|
('EP2649247', 16, 'test', 1, 1555, 1, NULL, NULL, NULL);
|
||||||
/*!40000 ALTER TABLE `po_detail` ENABLE KEYS */;
|
/*!40000 ALTER TABLE `po_detail` ENABLE KEYS */;
|
||||||
|
|
||||||
-- Dumping structure for table astute.service_type
|
-- Dumping structure for table astute.service_type
|
||||||
|
|
|
@ -96,11 +96,11 @@ public abstract class DAO {
|
||||||
|
|
||||||
public abstract List<PODetail> getPODetail(String PONum, int lineItemNo) throws AstuteException;
|
public abstract List<PODetail> getPODetail(String PONum, int lineItemNo) throws AstuteException;
|
||||||
|
|
||||||
public abstract void updatePOMaster(String PONum, String contractNum, java.sql.Date PODate, Double contractAmt, String astuteProjectNumber) throws AstuteException;
|
public abstract void updatePOMaster(String PONum, String contractNum, java.sql.Date PODate, Double contractAmt, String astuteProjectNumber, String title) throws AstuteException;
|
||||||
|
|
||||||
public abstract void updatePODetail(String POnum, int lineItemNo, String serviceDesc, int feeTypeId, Double qty, Double fee, int serviceTypeId, Double remainingQuantity) throws AstuteException;
|
public abstract void updatePODetail(String POnum, int lineItemNo, String serviceDesc, int feeTypeId, Double qty, Double fee, int serviceTypeId, Double remainingQuantity) throws AstuteException;
|
||||||
|
|
||||||
public abstract void createPOMaster(String PONum, String contractNum, java.sql.Date PODate, Double contractAmt, String customerId, String astuteProjectNumber) throws AstuteException;
|
public abstract void createPOMaster(String PONum, String contractNum, java.sql.Date PODate, Double contractAmt, String customerId, String astuteProjectNumber, String title) throws AstuteException;
|
||||||
|
|
||||||
public abstract void createPODetail(String POnum, int lineItemNo, String serviceDesc, int feeTypeId, Double qty, Double fee, int serviceTypeId, Double remainingQuantity) throws AstuteException;
|
public abstract void createPODetail(String POnum, int lineItemNo, String serviceDesc, int feeTypeId, Double qty, Double fee, int serviceTypeId, Double remainingQuantity) throws AstuteException;
|
||||||
|
|
||||||
|
|
|
@ -40,7 +40,7 @@ public class SqlDAO extends DAO {
|
||||||
try {
|
try {
|
||||||
List<PO> pos = new ArrayList<>();
|
List<PO> pos = new ArrayList<>();
|
||||||
Statement stmt = conn.createStatement();
|
Statement stmt = conn.createStatement();
|
||||||
String sql = "SELECT PO_num, contract_num, PO_date, customer_id, contract_amt, astute_project_num FROM PO ";
|
String sql = "SELECT PO_num, contract_num, PO_date, customer_id, contract_amt, astute_project_num , title FROM PO ";
|
||||||
if (PONum != null && !PONum.isEmpty()) {
|
if (PONum != null && !PONum.isEmpty()) {
|
||||||
sql += "WHERE UPPER(PO_num) = '" + PONum.toUpperCase() + "'";
|
sql += "WHERE UPPER(PO_num) = '" + PONum.toUpperCase() + "'";
|
||||||
} else if (contractNum != null && !contractNum.isEmpty()) {
|
} else if (contractNum != null && !contractNum.isEmpty()) {
|
||||||
|
@ -59,7 +59,8 @@ public class SqlDAO extends DAO {
|
||||||
String customerId = rs.getString(4);
|
String customerId = rs.getString(4);
|
||||||
Double contractAmt = rs.getDouble(5);
|
Double contractAmt = rs.getDouble(5);
|
||||||
String astuteProjectNum = rs.getString(6);
|
String astuteProjectNum = rs.getString(6);
|
||||||
PO po = new PO(poNum, cntrctNum, poDate, customerId, contractAmt,astuteProjectNum);
|
String title = rs.getString(7);
|
||||||
|
PO po = new PO(poNum, cntrctNum, poDate, customerId, contractAmt,astuteProjectNum,title);
|
||||||
pos.add(po);
|
pos.add(po);
|
||||||
}
|
}
|
||||||
return pos;
|
return pos;
|
||||||
|
@ -108,7 +109,7 @@ public class SqlDAO extends DAO {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void updatePOMaster(String PONum, String contractNum, Date PODate, Double contractAmt, String astuteProjectNumber) throws AstuteException {
|
public void updatePOMaster(String PONum, String contractNum, Date PODate, Double contractAmt, String astuteProjectNumber, String title) throws AstuteException {
|
||||||
try {
|
try {
|
||||||
String sql = "UPDATE PO ";
|
String sql = "UPDATE PO ";
|
||||||
String updateClause = " SET ";
|
String updateClause = " SET ";
|
||||||
|
@ -123,6 +124,7 @@ public class SqlDAO extends DAO {
|
||||||
updateClause = updateClause + " PO_Date = STR_TO_DATE(" + PODate + ", '%Y-%m-%d')" + ",";
|
updateClause = updateClause + " PO_Date = STR_TO_DATE(" + PODate + ", '%Y-%m-%d')" + ",";
|
||||||
updateClause = updateClause + " contract_amt = " + contractAmt+ ",";
|
updateClause = updateClause + " contract_amt = " + contractAmt+ ",";
|
||||||
updateClause = updateClause + " astute_project_num = '" + astuteProjectNumber +"'";
|
updateClause = updateClause + " astute_project_num = '" + astuteProjectNumber +"'";
|
||||||
|
updateClause = updateClause + " title = '" + title +"'";
|
||||||
sql = sql+ updateClause + whereClause;
|
sql = sql+ updateClause + whereClause;
|
||||||
System.out.println(sql);
|
System.out.println(sql);
|
||||||
Statement stmt = conn.createStatement();
|
Statement stmt = conn.createStatement();
|
||||||
|
@ -185,15 +187,16 @@ public class SqlDAO extends DAO {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void createPOMaster(String PONum, String contractNum, Date PODate, Double contractAmt, String customerId, String astuteProjectNumber) throws AstuteException {
|
public void createPOMaster(String PONum, String contractNum, Date PODate, Double contractAmt, String customerId, String astuteProjectNumber, String title) throws AstuteException {
|
||||||
try {
|
try {
|
||||||
CallableStatement stmt = conn.prepareCall("{call create_PO(?,?,?,?,?,?)}");
|
CallableStatement stmt = conn.prepareCall("{call create_PO(?,?,?,?,?,?,?)}");
|
||||||
stmt.setString(1, PONum);
|
stmt.setString(1, PONum);
|
||||||
stmt.setString(2, contractNum);
|
stmt.setString(2, contractNum);
|
||||||
stmt.setDate(3, PODate);
|
stmt.setDate(3, PODate);
|
||||||
stmt.setDouble(4, contractAmt);
|
stmt.setDouble(4, contractAmt);
|
||||||
stmt.setString(5, customerId);
|
stmt.setString(5, customerId);
|
||||||
stmt.setString(6, astuteProjectNumber);
|
stmt.setString(6, astuteProjectNumber);
|
||||||
|
stmt.setString(7, title);
|
||||||
stmt.executeUpdate();
|
stmt.executeUpdate();
|
||||||
} catch (SQLException e) {
|
} catch (SQLException e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
|
@ -536,8 +539,8 @@ public class SqlDAO extends DAO {
|
||||||
int zip = rs.getInt(8);
|
int zip = rs.getInt(8);
|
||||||
int ziplast4 = rs.getInt(9);
|
int ziplast4 = rs.getInt(9);
|
||||||
String email = rs.getString(10);
|
String email = rs.getString(10);
|
||||||
int phone = rs.getInt(11);
|
Long phone = rs.getLong(11);
|
||||||
int fax = rs.getInt(12);
|
Long fax = rs.getLong(12);
|
||||||
Customer customer = new Customer(customerID, customerName,billToDept, add1, add2, city, state, zip, ziplast4, email, phone, fax);
|
Customer customer = new Customer(customerID, customerName,billToDept, add1, add2, city, state, zip, ziplast4, email, phone, fax);
|
||||||
customers.add(customer);
|
customers.add(customer);
|
||||||
}
|
}
|
||||||
|
|
|
@ -13,10 +13,10 @@ public class Customer {
|
||||||
int zip;
|
int zip;
|
||||||
int ziplast4;
|
int ziplast4;
|
||||||
String email;
|
String email;
|
||||||
int phone;
|
Long phone;
|
||||||
int fax;
|
Long fax;
|
||||||
|
|
||||||
public Customer(String customerId, String customerName, String billToDept, String add1, String add2, String city, String state, int zip, int ziplast4, String email, int phone, int fax) {
|
public Customer(String customerId, String customerName, String billToDept, String add1, String add2, String city, String state, int zip, int ziplast4, String email, Long phone, Long fax) {
|
||||||
this.customerId = customerId;
|
this.customerId = customerId;
|
||||||
this.customerName = customerName;
|
this.customerName = customerName;
|
||||||
this.billToDept = billToDept;
|
this.billToDept = billToDept;
|
||||||
|
@ -111,19 +111,19 @@ public class Customer {
|
||||||
this.email = email;
|
this.email = email;
|
||||||
}
|
}
|
||||||
|
|
||||||
public int getPhone() {
|
public Long getPhone() {
|
||||||
return phone;
|
return phone;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setPhone(int phone) {
|
public void setPhone(Long phone) {
|
||||||
this.phone = phone;
|
this.phone = phone;
|
||||||
}
|
}
|
||||||
|
|
||||||
public int getFax() {
|
public Long getFax() {
|
||||||
return fax;
|
return fax;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setFax(int fax) {
|
public void setFax(Long fax) {
|
||||||
this.fax = fax;
|
this.fax = fax;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -9,16 +9,18 @@ public class PO implements Serializable{
|
||||||
private String contractNum;
|
private String contractNum;
|
||||||
private Date PODate;
|
private Date PODate;
|
||||||
private Double contractAmt;
|
private Double contractAmt;
|
||||||
private String customerId;
|
private String customerId;
|
||||||
private String astuteProjectNumber;
|
private String astuteProjectNumber;
|
||||||
|
private String title;
|
||||||
|
|
||||||
public PO(String PONum, String contractNum, Date PODate, String customerId, Double contractAmt, String astuteProjectNum) {
|
public PO(String PONum, String contractNum, Date PODate, String customerId, Double contractAmt, String astuteProjectNum, String title) {
|
||||||
this.PONum = PONum;
|
this.PONum = PONum;
|
||||||
this.contractNum = contractNum;
|
this.contractNum = contractNum;
|
||||||
this.PODate = PODate;
|
this.PODate = PODate;
|
||||||
this.customerId = customerId;
|
this.customerId = customerId;
|
||||||
this.contractAmt = contractAmt;
|
this.contractAmt = contractAmt;
|
||||||
this.astuteProjectNumber = astuteProjectNum;
|
this.astuteProjectNumber = astuteProjectNum;
|
||||||
|
this.title = title;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -71,4 +73,12 @@ public class PO implements Serializable{
|
||||||
public void setAstuteProjectNumber(String astuteProjectNumber) {
|
public void setAstuteProjectNumber(String astuteProjectNumber) {
|
||||||
this.astuteProjectNumber = astuteProjectNumber;
|
this.astuteProjectNumber = astuteProjectNumber;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public String getTitle() {
|
||||||
|
return title;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setTitle(String title) {
|
||||||
|
this.title = title;
|
||||||
|
}
|
||||||
}
|
}
|
|
@ -10,6 +10,7 @@ public class POMasterRequest {
|
||||||
Double contractAmt;
|
Double contractAmt;
|
||||||
String customerId;
|
String customerId;
|
||||||
String astuteProjectNumber;
|
String astuteProjectNumber;
|
||||||
|
String title;
|
||||||
|
|
||||||
public String getPoNum() {
|
public String getPoNum() {
|
||||||
return poNum;
|
return poNum;
|
||||||
|
@ -58,4 +59,12 @@ public class POMasterRequest {
|
||||||
public void setAstuteProjectNumber(String astuteProjectNumber) {
|
public void setAstuteProjectNumber(String astuteProjectNumber) {
|
||||||
this.astuteProjectNumber = astuteProjectNumber;
|
this.astuteProjectNumber = astuteProjectNumber;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public String getTitle() {
|
||||||
|
return title;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setTitle(String title) {
|
||||||
|
this.title = title;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -54,7 +54,7 @@ public class POResource {
|
||||||
SimpleDateFormat df = new SimpleDateFormat("yyyy-MM-dd");
|
SimpleDateFormat df = new SimpleDateFormat("yyyy-MM-dd");
|
||||||
date = new java.sql.Date(df.parse(dateStr).getTime());
|
date = new java.sql.Date(df.parse(dateStr).getTime());
|
||||||
}
|
}
|
||||||
POService.updatePOMaster(PONum, request.getContractNum(), date, request.getContractAmt(), request.getAstuteProjectNumber());
|
POService.updatePOMaster(PONum, request.getContractNum(), date, request.getContractAmt(), request.getAstuteProjectNumber(), request.getTitle());
|
||||||
return new ApiResponse(ApiResponse.UPDATE_ACCESS_SUCESS).toResponse();
|
return new ApiResponse(ApiResponse.UPDATE_ACCESS_SUCESS).toResponse();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -77,7 +77,7 @@ public class POResource {
|
||||||
date = new java.sql.Date(df.parse(dateStr).getTime());
|
date = new java.sql.Date(df.parse(dateStr).getTime());
|
||||||
}
|
}
|
||||||
|
|
||||||
POService.createPOMaster(request.getPoNum(), request.getContractNum(), date, request.getContractAmt(), request.getCustomerId(), request.getAstuteProjectNumber());
|
POService.createPOMaster(request.getPoNum(), request.getContractNum(), date, request.getContractAmt(), request.getCustomerId(), request.getAstuteProjectNumber(),request.getTitle());
|
||||||
return new ApiResponse(ApiResponse.UPDATE_ACCESS_SUCESS).toResponse();
|
return new ApiResponse(ApiResponse.UPDATE_ACCESS_SUCESS).toResponse();
|
||||||
}
|
}
|
||||||
@Path("/detail")
|
@Path("/detail")
|
||||||
|
|
|
@ -27,9 +27,9 @@ public class POService extends Service{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public void updatePOMaster(String PONum, String contractNum, Date PODate, Double contractAmt, String astuteProjectNumber)
|
public void updatePOMaster(String PONum, String contractNum, Date PODate, Double contractAmt, String astuteProjectNumber, String title)
|
||||||
throws AstuteException {
|
throws AstuteException {
|
||||||
getDao().updatePOMaster(PONum, contractNum, PODate, contractAmt, astuteProjectNumber);
|
getDao().updatePOMaster(PONum, contractNum, PODate, contractAmt, astuteProjectNumber, title);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void updatePODetail(String POnum, int lineItemNo, String serviceDesc, int feeTypeId, Double qty, Double fee, int serviceTypeId, Double remainingQuantity)
|
public void updatePODetail(String POnum, int lineItemNo, String serviceDesc, int feeTypeId, Double qty, Double fee, int serviceTypeId, Double remainingQuantity)
|
||||||
|
@ -37,9 +37,9 @@ public class POService extends Service{
|
||||||
getDao().updatePODetail(POnum, lineItemNo, serviceDesc, feeTypeId, qty, fee, serviceTypeId, remainingQuantity);
|
getDao().updatePODetail(POnum, lineItemNo, serviceDesc, feeTypeId, qty, fee, serviceTypeId, remainingQuantity);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void createPOMaster(String PONum, String contractNum, Date PODate, Double contractAmt, String customerId, String astuteProjectNumber)
|
public void createPOMaster(String PONum, String contractNum, Date PODate, Double contractAmt, String customerId, String astuteProjectNumber, String title)
|
||||||
throws AstuteException {
|
throws AstuteException {
|
||||||
getDao().createPOMaster(PONum, contractNum, PODate, contractAmt, customerId, astuteProjectNumber);
|
getDao().createPOMaster(PONum, contractNum, PODate, contractAmt, customerId, astuteProjectNumber, title);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void createPODetail(String POnum, int lineItemNo, String serviceDesc, int feeTypeId, Double qty, Double fee, int serviceTypeId, Double remainingQuantity)
|
public void createPODetail(String POnum, int lineItemNo, String serviceDesc, int feeTypeId, Double qty, Double fee, int serviceTypeId, Double remainingQuantity)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user