mirror of
https://github.com/dyiop/astute.git
synced 2025-04-05 21:10:16 -04:00
Add files via upload
This commit is contained in:
parent
ff7e7bc768
commit
9fc4e405f3
|
@ -29,8 +29,11 @@ public class POResource {
|
|||
@QueryParam("ContractNum") String contractNum,
|
||||
@QueryParam("PODate") String PODate, String astuteProjectNumber)
|
||||
throws AstuteException, ParseException {
|
||||
SimpleDateFormat df = new SimpleDateFormat("yyyy-MM-dd");
|
||||
Date date = new java.sql.Date(df.parse(PODate).getTime());
|
||||
Date date = null;
|
||||
if (PODate != null) {
|
||||
SimpleDateFormat df = new SimpleDateFormat("yyyy-MM-dd");
|
||||
date = new java.sql.Date(df.parse(PODate).getTime());
|
||||
}
|
||||
return new ApiResponse(POService.getPOMaster(PONum, contractNum, date, astuteProjectNumber)).toResponse();
|
||||
}
|
||||
|
||||
|
@ -45,10 +48,12 @@ public class POResource {
|
|||
@PUT
|
||||
public Response updatePOMaster(@PathParam("PONum") String PONum, POMasterRequest request)
|
||||
throws AstuteException, ParseException {
|
||||
String dateStr = request.getPODate();
|
||||
SimpleDateFormat df = new SimpleDateFormat("yyyy-MM-dd");
|
||||
Date date = new java.sql.Date(df.parse(dateStr).getTime());
|
||||
|
||||
Date date = null;
|
||||
if (request.getPODate() != null) {
|
||||
String dateStr = request.getPODate();
|
||||
SimpleDateFormat df = new SimpleDateFormat("yyyy-MM-dd");
|
||||
date = new java.sql.Date(df.parse(dateStr).getTime());
|
||||
}
|
||||
POService.updatePOMaster(PONum, request.getContractNum(), date, request.getContractAmt(), request.getAstuteProjectNumber());
|
||||
return new ApiResponse(ApiResponse.UPDATE_ACCESS_SUCESS).toResponse();
|
||||
}
|
||||
|
@ -81,5 +86,3 @@ public class POResource {
|
|||
return new ApiResponse(ApiResponse.UPDATE_ACCESS_SUCESS).toResponse();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user