SimpleDateFormat timeSDF = new SimpleDateFormat(propertiesConstants.getSimpleDateFormat()); HraPrmClaimCommon commonInsert = new HraPrmClaimCommon(); HraPrmClaimTransportation transportationInsert = new HraPrmClaimTransportation(); for(int i=0; i<uiPrmClaimTransportation.getTransportationRecordList().size(); i++) { commonInsert.setApplicationId(applicationId); commonInsert.setSeqNo(i+1); commonInsert.setStatus(propertiesConstants.getHraPrmClaimStatusCodePending()); commonInsert.setTransactionDate(timeSDF.parse(uiPrmClaimTransportation.getTransportationRecordList().get(i).getTranscationDateInString())); commonInsert.setType(uiPrmClaimTransportation.getTransportationRecordList().get(i).getType()); commonInsert.setAmount(new BigDecimal(Double.parseDouble(uiPrmClaimTransportation.getTransportationRecordList().get(i).getAmountInString()))); if (uiPrmClaimTransportation.getTransportationRecordList().get(i).getUploadFile() != null && uiPrmClaimTransportation.getTransportationRecordList().get(i).getUploadFile().getSize() > 0) { if (!uiPrmClaimTransportation.getTransportationRecordList().get(i).getUploadFile().getOriginalFilename().toLowerCase().endsWith(propertiesConstants.getHraFileUploadExtension())) throw new CoreKnownException(Constants.ERROR_CODE_ER0047, Constants.ERROR_CODE_ER0047); commonInsert.setAttachedBlob(new SerialBlob(uiPrmClaimTransportation.getTransportationRecordList().get(i).getUploadFile().getBytes())); } hraPrmClaimCommonDao.insert(commonInsert); transportationInsert.setApplicationId(applicationId); transportationInsert.setSeqNo(i+1); transportationInsert.setStartLocation(uiPrmClaimTransportation.getTransportationRecordList().get(i).getStartLocation()); transportationInsert.setEndLocation(uiPrmClaimTransportation.getTransportationRecordList().get(i).getEndLocation()); transportationInsert.setReason(uiPrmClaimTransportation.getTransportationRecordList().get(i).getReason()); hraPrmClaimTransportationDao.insert(transportationInsert); }
<pre lang="java">
hra_prm_claim_common
applicationId
hra_prm_claim_application
applicationid
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)