mirror of
https://github.com/dyiop/astute.git
synced 2025-04-06 21:30:20 -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("ContractNum") String contractNum,
|
||||||
@QueryParam("PODate") String PODate, String astuteProjectNumber)
|
@QueryParam("PODate") String PODate, String astuteProjectNumber)
|
||||||
throws AstuteException, ParseException {
|
throws AstuteException, ParseException {
|
||||||
SimpleDateFormat df = new SimpleDateFormat("yyyy-MM-dd");
|
Date date = null;
|
||||||
Date date = new java.sql.Date(df.parse(PODate).getTime());
|
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();
|
return new ApiResponse(POService.getPOMaster(PONum, contractNum, date, astuteProjectNumber)).toResponse();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -45,10 +48,12 @@ public class POResource {
|
||||||
@PUT
|
@PUT
|
||||||
public Response updatePOMaster(@PathParam("PONum") String PONum, POMasterRequest request)
|
public Response updatePOMaster(@PathParam("PONum") String PONum, POMasterRequest request)
|
||||||
throws AstuteException, ParseException {
|
throws AstuteException, ParseException {
|
||||||
String dateStr = request.getPODate();
|
Date date = null;
|
||||||
SimpleDateFormat df = new SimpleDateFormat("yyyy-MM-dd");
|
if (request.getPODate() != null) {
|
||||||
Date date = new java.sql.Date(df.parse(dateStr).getTime());
|
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());
|
POService.updatePOMaster(PONum, request.getContractNum(), date, request.getContractAmt(), request.getAstuteProjectNumber());
|
||||||
return new ApiResponse(ApiResponse.UPDATE_ACCESS_SUCESS).toResponse();
|
return new ApiResponse(ApiResponse.UPDATE_ACCESS_SUCESS).toResponse();
|
||||||
}
|
}
|
||||||
|
@ -81,5 +86,3 @@ public class POResource {
|
||||||
return new ApiResponse(ApiResponse.UPDATE_ACCESS_SUCESS).toResponse();
|
return new ApiResponse(ApiResponse.UPDATE_ACCESS_SUCESS).toResponse();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user