PropertyService { public PropertyStatusValues createPropStatVal(final BasicProperty basicProperty, final String statusCode, final Date propCompletionDate, final String courtOrdNum, final Date orderDate, final String judgmtDetails, final String parentPropId) { LOGGER.debug("Entered into createPropStatVal"); LOGGER.debug("createPropStatVal: basicProperty: " + basicProperty + ", statusCode: " + statusCode + ", propCompletionDate: " + propCompletionDate + ", courtOrdNum: " + courtOrdNum + ", orderDate: " + orderDate + ", judgmtDetails: " + judgmtDetails + ", parentPropId: " + parentPropId); final PropertyStatusValues propStatVal = new PropertyStatusValues(); final PropertyStatus propertyStatus = (PropertyStatus) getPropPerServ() .find("from PropertyStatus where statusCode=?", statusCode); propStatVal.setIsActive("Y"); final User user = userService.getUserById(ApplicationThreadLocals.getUserId()); propStatVal.setCreatedDate(new Date()); propStatVal.setModifiedDate(new Date()); propStatVal.setCreatedBy(user); propStatVal.setModifiedBy(user); propStatVal.setPropertyStatus(propertyStatus); if (orderDate != null || courtOrdNum != null && !courtOrdNum.equals("") || judgmtDetails != null && !judgmtDetails.equals("")) { propStatVal.setReferenceDate(orderDate); propStatVal.setReferenceNo(courtOrdNum); propStatVal.setRemarks(judgmtDetails); } else { propStatVal.setReferenceDate(new Date()); propStatVal.setReferenceNo("0001"); } if (!statusCode.equals(PROP_CREATE_RSN) && propCompletionDate != null) { final String propCompDateStr = DateUtils.getFormattedDate(propCompletionDate, DATE_FORMAT_DDMMYYY); propStatVal.setExtraField1(propCompDateStr); } propStatVal.setBasicProperty(basicProperty); if (basicProperty.getPropertyMutationMaster() != null && basicProperty.getPropertyMutationMaster().getCode().equals(PROP_CREATE_RSN_BIFUR)) { final BasicProperty referenceBasicProperty = (BasicProperty) propPerServ .find("from BasicPropertyImpl bp where bp.upicNo=?", parentPropId); propStatVal.setReferenceBasicProperty(referenceBasicProperty); } LOGGER.debug("createPropStatVal: PropertyStatusValues: " + propStatVal); LOGGER.debug("Exiting from createPropStatVal"); return propStatVal; }  PropertyImpl createProperty(final PropertyImpl property, final String areaOfPlot, final String mutationCode,
                                       final String propTypeId, final String propUsageId, final String propOccId, final Character status,
                                       final String docnumber, final String nonResPlotArea, final Long floorTypeId, final Long roofTypeId,
                                       final Long wallTypeId, final Long woodTypeId, final Long taxExemptId, final Long propertyDepartmentId,
                                       final Long vacantLandPlotAreaId, final Long layoutApprovalAuthorityId, final Boolean nonVacant); void createFloors(final Property property, final String mutationCode, final String propUsageId,
                             final String propOccId); PropertyStatusValues createPropStatVal(final BasicProperty basicProperty, final String statusCode,
                                                  final Date propCompletionDate, final String courtOrdNum, final Date orderDate, final String judgmtDetails,
                                                  final String parentPropId); Property createDemand(final PropertyImpl property, final Date dateOfCompletion); @SuppressWarnings({ "unchecked", "rawtypes" }) Property createDemandForModify(final Property oldProperty, final Property newProperty,
                                          final Date dateOfCompletion); Property modifyDemand(final PropertyImpl propertyModel, final PropertyImpl oldProperty); Set<EgDemandDetails> getOldDemandDetails(final Property oldProperty, final Property newProperty); Map<Installment, Set<EgDemandDetails>> getEgDemandDetailsSetByInstallment(
            final Set<EgDemandDetails> demandDetailsSet); Ptdemand getCurrrentDemand(final Property property); Date getPropOccupatedDate(final String dateOfCompletion); void calculateExcessCollection(final Map<String, BigDecimal> dmdRsnAmt, final String rsn,
                                          final EgDemandDetails oldDmndDtls, final EgDemandDetails newDmndDtls); Map<Installment, EgDemandDetails> getEgDemandDetailsAsMap(final List<EgDemandDetails> demandDetailsList); Map<Installment, Set<EgDemandDetails>> getEgDemandDetailsSetAsMap(
            final List<EgDemandDetails> demandDetailsList, final List<Installment> instList); EgDemandDetails getEgDemandDetailsForReason(final Set<EgDemandDetails> egDemandDetailsSet,
                                                       final String demandReason); List<Map<String, EgDemandDetails>> getEgDemandDetailsAsMap(final Set<EgDemandDetails> egDemandDetailsSet); EgDemandDetails createDemandDetails(final BigDecimal amount, final BigDecimal amountCollected,
                                               final EgDemandReason dmdRsn, final Installment inst); void setFloorDmdCalTax(final UnitTaxCalculationInfo unitTax,
                                  final FloorwiseDemandCalculations floorDmdCalc); Date getLowestDtOfCompFloorWise(final List<Floor> floorList); Date getLowestDtOfConstFloorWise(final List<Floor> floorList); @SuppressWarnings({ "unchecked" }) void createAmalgPropStatVal(final String[] amalgPropIds, final BasicProperty parentBasicProperty); Property createArrearsDemand(final Property oldproperty, final Date dateOfCompletion,
                                        final PropertyImpl property); void addArrDmdDetToCurrentDmd(final Ptdemand ptDmd, final Ptdemand currPtDmd,
                                         final Installment effectiveInstall, final boolean isDemolition); @SuppressWarnings({ "rawtypes", "unchecked" }) PropertyImpl creteNewPropertyForObjectionWorkflow(final BasicProperty basicProperty2,
                                                             final String objectionNum, final Date objectionDate, final User objWfInitiator, final String docNumber,
                                                             final String modifyRsn); PersistenceService getPropPerServ(); void setPropPerServ(final PersistenceService propPerServ); APTaxCalculator getTaxCalculator(); void setTaxCalculator(final APTaxCalculator taxCalculator); PropertyTaxUtil getPropertyTaxUtil(); void setPropertyTaxUtil(final PropertyTaxUtil propertyTaxUtil); void setBasicPropertyService(final PersistenceService<BasicProperty, Long> basicPropertyService); void setWFPropStatValActive(final BasicProperty basicProperty); Map<Installment, Map<String, BigDecimal>> populateTaxesForVoucherCreation(final Property property); Map<Installment, Map<String, BigDecimal>> prepareRsnWiseDemandForOldProp(final Property property); Map<Installment, Map<String, BigDecimal>> prepareRsnWiseDemandForPropToBeDeactivated(
            final Property property); void adjustExcessCollectionAmount(final List<Installment> installments,
                                             final Map<Installment, Set<EgDemandDetails>> newDemandDetailsByInstallment, final Ptdemand ptDemand); void initiateDataEntryWorkflow(BasicProperty basicProperty, final User initiater); PropertyImpl changePropertyDetail(final PropertyImpl modProperty, final PropertyDetail propDetail,
                                             final Integer numOfFloors); List<DocumentType> getDocumentTypesForTransactionType(final TransactionType transactionType); void processAndStoreDocument(final List<Document> documents); List<String> propertyApplicationTypes(); void updateIndexes(final StateAware stateAwareObject, final String applicationType); User getOwnerName(final StateAware<Position> stateAwareObject); int getSlaValue(final String applicationType); Boolean hasDemandDues(final String assessmentNo); Map<String, Object> getWaterTaxDues(final String assessmentNo); Map<String, Object> getWaterTaxDues(final String assessmentNo, final HttpServletRequest request); String validationForBifurcation(final PropertyImpl propertyModel, final BasicProperty basicProperty,
                                           final String reason); PropertyImpl getLatestHistoryProperty(final String upicNo); Boolean isPropertyBifurcated(final BasicProperty basicProperty); BigDecimal convertYardToSquareMeters(final Float vacantLandArea); BigDecimal getPropertyArea(BigDecimal area, final Property property); Boolean isEmployee(final User user); Boolean isMeesevaUser(final User user); Boolean isCitizenPortalUser(final User user); Boolean isCscOperator(final User user); Boolean isDataEntryOperator(final User user); Assignment getUserPositionByZone(final BasicProperty basicProperty, final boolean isForMobile); Assignment getAssignmentByDeptDesigElecWard(final BasicProperty basicProperty); Assignment getMappedAssignmentForCscOperator(final BasicProperty basicProperty); String getDesignationForCscOperatorWorkFlow(); String getDepartmentForCscOperatorWorkFlow(); String getDepartmentForWorkFlow(); String getDesignationForThirdPartyUser(final boolean isForMobile); List<AppConfigValues> getThirdPartyUserRoles(); @ReadOnly @SuppressWarnings("unchecked") List<PropertyMaterlizeView> getPropertyByDemand(final String fromDemand, final String toDemand); @SuppressWarnings("unchecked") List<PropertyMaterlizeView> getPropertyByAssessmentAndOwnerDetails(final String assessmentNum,
                                                                              final String oldMuncipalNum, final String ownerName, final String doorNo); @ReadOnly @SuppressWarnings("unchecked") List<PropertyMaterlizeView> getPropertyByLocation(final Integer locationId, final String houseNo,
                                                             final String ownerName); @ReadOnly @SuppressWarnings("unchecked") List<PropertyMaterlizeView> getPropertyByBoundary(final Long zoneId, final Long wardId,
                                                             final String ownerName, final String houseNum); @ReadOnly @SuppressWarnings("unchecked") List<PropertyMaterlizeView> getPropertyByDoorNo(final String doorNo); @ReadOnly @SuppressWarnings("unchecked") List<PropertyMaterlizeView> getPropertyByOldMunicipalNo(final String oldMuncipalNum); Map<String, Object> getOldMunicipalNumQuery(final String oldMuncipalNum); Map<String, Object> getAssessmentNumQuery(final String assessmentNumber); Map<String, Object> getDoorNoQuery(final String doorNo); Map<String, Object> getMobileNumberQuery(final String mobileNumber); Map<String, Object> getBoundaryQuery(final Long zoneId, final Long wardId, final String ownerName,
                                                final String houseNum); Map<String, Object> getLocationQuery(final Long locationId, final String houseNo, final String ownerName); Map<String, Object> getDemandQuery(final String fromDemand, final String toDemand); Map<String, Object> getAssessmentAndOwnerDetailsQuery(final String oldMuncipalNum, final String ownerName,
                                                                 final String doorNo); @ReadOnly @SuppressWarnings("unchecked") List<PropertyMaterlizeView> getPropertyByMobileNumber(final String MobileNo); Assignment getWorkflowInitiator(final PropertyImpl property); List<HashMap<String, Object>> populateHistory(final StateAware<Position> stateAware); AssessmentDetails loadAssessmentDetails(final BasicProperty basicProperty); Map<String, BigDecimal> getCurrentPropertyTaxDetails(final Property propertyImpl); Map<String, BigDecimal> getCurrentPropertyTaxDetailsIncludingPenalty(final Property propertyImpl); Map<String, BigDecimal> getCurrentTaxAndBalance(final Map<String, BigDecimal> propertyTaxDetails,
                                                           final Date currDate); Map<String, BigDecimal> getCurrentTaxAndBalanceIncludingPenalty(final Map<String, BigDecimal> propertyTaxDetails,
                                                                           final Date currDate); Map<String, BigDecimal> getCurrentTaxDetails(final Map<String, Map<String, BigDecimal>> propertyTaxDetails,
                                                        final Date currDate); void calculateGrpPenalty(final Property modProperty, final Date propCompletionDate); Map<Installment, BigDecimal> getInstallmentWiseDemand(final EgDemand currentDemand); BigDecimal calculatePenalty(final Date latestCollReceiptDate, final Date fromDate, final BigDecimal amount); void updatePropertyDetail(final Property property, final Long floorTypeId, final Long roofTypeId,
                                     final Long wallTypeId, final Long woodTypeId, final String areaOfPlot, final String propertyCategory,
                                     final String nonResPlotArea, final String propUsageId, final String propOccId, final String propTypeId); void updateFloorDetails(final Property property, final List<Floor> savedFloorDetails); Date convertStringToDate(final String dateInString); List<Assignment> getAssignmentsForDesignation(final String designationName); void updateReferenceBasicProperty(final BasicProperty basicProperty, final String parentPropId); List<Map<String, Object>> getWCDetails(final String assessmentNo, final HttpServletRequest request); @ReadOnly BigDecimal getTotalPropertyTaxDue(final BasicProperty basicProperty); Set<FileStoreMapper> addToFileStore(final MultipartFile[] files); BigDecimal getTotalPropertyTaxDueIncludingPenalty(final BasicProperty basicProperty); List<PropertyStatusValues> findChildrenForProperty(final BasicProperty basicProperty); Assignment getUserOnRejection(final StateAware stateAware); String getDesignationForPositionAndUser(final Long positionId, final Long userId); @Transactional void saveDocumentTypeDetails(final BasicProperty basicProperty,
                                        final DocumentTypeDetails documentTypeDetails); @Transactional void updateDocumentTypeDetails(final BasicProperty basicProperty,
                                          final DocumentTypeDetails documentTypeDetails); void clearOldDocumentAttachments(final List<Document> documents,
                                            final DocumentTypeDetails documentTypeDetails); List<DocumentType> excludeOldDocumentAttachments(final DocumentTypeDetails documentTypeDetails); void amalgamateWaterConnections(final String assessmentNo, final List<String> childAssessments,
                                           final HttpServletRequest request); boolean isDuplicateDoorNumber(final String houseNo, final BasicProperty basicProperty); Map<Installment, Map<String, BigDecimal>> getExcessCollAmtMap(); void setExcessCollAmtMap(final Map<Installment, Map<String, BigDecimal>> excessCollAmtMap); EisCommonsService getEisCommonsService(); void setEisCommonsService(final EisCommonsService eisCommonsService); BigDecimal getTotalAlv(); void setTotalAlv(final BigDecimal totalAlv); void copyCollection(final PropertyImpl oldProperty, final PropertyImpl newProperty); @Transactional void pushPortalMessage(final StateAware stateAware, final String applictionType); @Transactional void updatePortalMessage(final StateAware stateAware, final String applictionType); PortalInbox getPortalInbox(final String applicationNumber); @Transactional void updatePortal(final StateAware stateAware, final String applicationType); @Transactional void pushPropertyMutationPortalMessage(final StateAware stateAware, final String applictionType); @Transactional void updatePropertyMutationPortalmessage(final StateAware stateAware, final String applictionType); @Transactional void pushVacancyRemissionPortalMessage(final StateAware stateAware, final String applictionType); @Transactional void updateVacancyRemissionPortalmessage(final StateAware stateAware, final String applicationType); @Transactional void pushRevisionPetitionPortalMessage(final StateAware stateAware, final String applictionType); @Transactional void updateRevisionPetitionPortalmessage(final StateAware stateAware, final String applictionType); BigDecimal getTotalTaxExcludingUACPenalty(Installment installment, Ptdemand ptDemand); Property getHistoryPropertyByUpinNo(BasicProperty basicProperty); Ptdemand getLatestDemandforHistoryProp(Property oldProperty); Map<String, Map<String, Object>> prepareDemandVoucherData(Property currProperty, Property existingProperty,
                                                                     boolean forCreate); Map<String, String> getGlCodesForTaxes(); Map<String, BigDecimal> fetchHeadwiseDetailsForDemandVoucher(Installment effectiveInstall,
                                                                        Installment currFirstHalf, Installment currSecondHalf, Ptdemand ptDemand); BigDecimal getSurveyTax(Property property, Date fromDate); boolean isLatestPropertyMutationClosed(String upicno); static final String APPLICATION_VIEW_URL; static final String SEARCH; static final String COUNT; static final String PARAMS; }
@Test public void shouldSetReferenceNumberTo1WhenOrderDateIsNull() throws Exception { System.out.println(propertyService); PropertyStatusValues propertyStatusValues = propertyService.createPropStatVal(new BasicPropertyImpl(), "", new Date(), null, null, null, "ok"); assertEquals("0001", propertyStatusValues.getReferenceNo()); }