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
be901b0025
commit
17a6be72bd
|
@ -29,12 +29,7 @@ public class POResource {
|
|||
@QueryParam("ContractNum") String contractNum,
|
||||
@QueryParam("PODate") String PODate, String astuteProjectNumber)
|
||||
throws AstuteException, ParseException {
|
||||
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();
|
||||
return new ApiResponse(POService.getPOMaster(PONum, contractNum, PODate, astuteProjectNumber)).toResponse();
|
||||
}
|
||||
|
||||
@Path("/detail")
|
||||
|
@ -48,13 +43,9 @@ public class POResource {
|
|||
@PUT
|
||||
public Response updatePOMaster(@PathParam("PONum") String PONum, POMasterRequest request)
|
||||
throws AstuteException, ParseException {
|
||||
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(), request.getTitle());
|
||||
System.out.println("PODate in Resource is "+ request.getPODate());
|
||||
|
||||
POService.updatePOMaster(PONum, request.getContractNum(), request.getPODate(), request.getContractAmt(), request.getAstuteProjectNumber(), request.getTitle());
|
||||
return new ApiResponse(ApiResponse.UPDATE_ACCESS_SUCESS).toResponse();
|
||||
}
|
||||
|
||||
|
@ -70,14 +61,8 @@ public class POResource {
|
|||
@POST
|
||||
public Response createPOMaster(POMasterRequest request)
|
||||
throws AstuteException, ParseException {
|
||||
String dateStr = request.getPODate();
|
||||
Date date = null;
|
||||
if (dateStr != null) {
|
||||
SimpleDateFormat df = new SimpleDateFormat("yyyy-MM-dd");
|
||||
date = new java.sql.Date(df.parse(dateStr).getTime());
|
||||
}
|
||||
|
||||
POService.createPOMaster(request.getPoNum(), request.getContractNum(), date, request.getContractAmt(), request.getCustomerId(), request.getAstuteProjectNumber(),request.getTitle());
|
||||
POService.createPOMaster(request.getPoNum(), request.getContractNum(), request.getPODate(), request.getContractAmt(), request.getCustomerId(), request.getAstuteProjectNumber(),request.getTitle());
|
||||
return new ApiResponse(ApiResponse.UPDATE_ACCESS_SUCESS).toResponse();
|
||||
}
|
||||
@Path("/detail")
|
||||
|
|
Loading…
Reference in New Issue
Block a user