Add files via upload

This commit is contained in:
gopi17701 2018-07-25 16:40:05 -04:00 committed by GitHub
parent 75ddd48669
commit 65003d0bb0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -71,8 +71,11 @@ public class POResource {
public Response createPOMaster(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 (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());
return new ApiResponse(ApiResponse.UPDATE_ACCESS_SUCESS).toResponse();