dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #08597
Re: [Branch ~dhis2-devs-core/dhis2/trunk] Rev 2090: Work in Progress for Bangladesh Manpower Module
Neeraj,
Do you have some background info on the BD Manpower module? It sounds
interesting, is it a full Human Resource thing, and also including
payroll?
Knut
On Wed, Nov 17, 2010 at 12:01 PM, <noreply@xxxxxxxxxxxxx> wrote:
> ------------------------------------------------------------
> revno: 2090
> committer: Neeraj <neeraj.hisp@xxxxxxxxx>
> branch nick: dhis2
> timestamp: Wed 2010-11-17 16:19:09 +0530
> message:
> Work in Progress for Bangladesh Manpower Module
> added:
> local/bd/dhis-web-linelisting-manpower/src/main/java/org/hisp/dhis/ll/action/lldataentry/ValidateEmployeeExistAction.java
> local/bd/dhis-web-linelisting-manpower/src/main/webapp/dhis-web-linelisting-mp/responseEmployeeExist.vm
> modified:
> local/bd/dhis-web-linelisting-manpower/src/main/java/org/hisp/dhis/ll/action/employee/GetEmployeeListAction.java
> local/bd/dhis-web-linelisting-manpower/src/main/java/org/hisp/dhis/ll/action/lldataentry/FormAction.java
> local/bd/dhis-web-linelisting-manpower/src/main/java/org/hisp/dhis/ll/action/lldataentry/GetValidatePostVacantAction.java
> local/bd/dhis-web-linelisting-manpower/src/main/java/org/hisp/dhis/ll/action/lldataentry/SaveEmplyeePostAction.java
> local/bd/dhis-web-linelisting-manpower/src/main/java/org/hisp/dhis/ll/action/lldataentry/SelectAction.java
> local/bd/dhis-web-linelisting-manpower/src/main/java/org/hisp/dhis/ll/action/lldataentry/ShowEmployeePostFormAction.java
> local/bd/dhis-web-linelisting-manpower/src/main/resources/META-INF/dhis/beans.xml
> local/bd/dhis-web-linelisting-manpower/src/main/resources/struts.xml
> local/bd/dhis-web-linelisting-manpower/src/main/webapp/dhis-web-linelisting-mp/employeePost.vm
> local/bd/dhis-web-linelisting-manpower/src/main/webapp/dhis-web-linelisting-mp/form.vm
> local/bd/dhis-web-linelisting-manpower/src/main/webapp/dhis-web-linelisting-mp/javascript/form.js
> local/in/dhis-in-api/src/main/java/org/hisp/dhis/linelisting/Employee.java
> local/in/dhis-in-services/dhis-in-service-dbmanager/src/main/java/org/hisp/dhis/dbmanager/DataBaseManagerInterface.java
> local/in/dhis-in-services/dhis-in-service-dbmanager/src/main/java/org/hisp/dhis/dbmanager/mysql/MySQLDataBaseManager.java
>
>
> --
> lp:dhis2
> https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk
>
> Your team DHIS 2 developers is subscribed to branch lp:dhis2.
> To unsubscribe from this branch go to https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk/+edit-subscription
>
> === modified file 'local/bd/dhis-web-linelisting-manpower/src/main/java/org/hisp/dhis/ll/action/employee/GetEmployeeListAction.java'
> --- local/bd/dhis-web-linelisting-manpower/src/main/java/org/hisp/dhis/ll/action/employee/GetEmployeeListAction.java 2010-10-28 11:40:15 +0000
> +++ local/bd/dhis-web-linelisting-manpower/src/main/java/org/hisp/dhis/ll/action/employee/GetEmployeeListAction.java 2010-11-17 10:49:09 +0000
> @@ -41,7 +41,7 @@
> {
>
> employeeList = new ArrayList<Employee>( employeeService.getAllEmployee() );
> -
> +
> return SUCCESS;
> }
> }
>
> === modified file 'local/bd/dhis-web-linelisting-manpower/src/main/java/org/hisp/dhis/ll/action/lldataentry/FormAction.java'
> --- local/bd/dhis-web-linelisting-manpower/src/main/java/org/hisp/dhis/ll/action/lldataentry/FormAction.java 2010-10-20 06:14:25 +0000
> +++ local/bd/dhis-web-linelisting-manpower/src/main/java/org/hisp/dhis/ll/action/lldataentry/FormAction.java 2010-11-17 10:49:09 +0000
> @@ -37,6 +37,8 @@
> import org.hisp.dhis.datavalue.DataValue;
> import org.hisp.dhis.datavalue.DataValueService;
> import org.hisp.dhis.dbmanager.DataBaseManagerInterface;
> +import org.hisp.dhis.linelisting.Employee;
> +import org.hisp.dhis.linelisting.EmployeeService;
> import org.hisp.dhis.linelisting.LineListDataElementMap;
> import org.hisp.dhis.linelisting.LineListDataValue;
> import org.hisp.dhis.linelisting.LineListElement;
> @@ -87,14 +89,7 @@
> {
> this.lineListService = lineListService;
> }
> -/*
> - private I18n i18n;
>
> - public void setI18n( I18n i18n )
> - {
> - this.i18n = i18n;
> - }
> -*/
> private DataValueService dataValueService;
>
> public void setDataValueService( DataValueService dataValueService )
> @@ -102,11 +97,17 @@
> this.dataValueService = dataValueService;
> }
>
> + private EmployeeService employeeService;
> +
> + public void setEmployeeService( EmployeeService employeeService )
> + {
> + this.employeeService = employeeService;
> + }
> +
> // --------------------------------------------------------------------------
> // Parameters
> // --------------------------------------------------------------------------
>
> -
> private Map<String, DataValue> dataValueMap;
>
> public Map<String, DataValue> getDataValueMap()
> @@ -127,14 +128,7 @@
> {
> return sactionedPostdataelement;
> }
> -/*
> - private Integer count1;
>
> - public void setCount1( Integer count1 )
> - {
> - this.count1 = count1;
> - }
> -*/
> private Integer selectedLineListGroupId;
>
> public Integer getSelectedLineListGroupId()
> @@ -184,14 +178,7 @@
> {
> return llElementOptionsMap;
> }
> -/*
> - private Map<LineListElement, String> llElementValuesMap;
>
> - public void setLlElementValuesMap( Map<LineListElement, String> llElementValuesMap )
> - {
> - this.llElementValuesMap = llElementValuesMap;
> - }
> -*/
> private List<LineListDataValue> llDataValuesList;
>
> public List<LineListDataValue> getLlDataValuesList()
> @@ -204,10 +191,18 @@
> this.llDataValuesList = llDataValuesList;
> }
>
> + private List<Employee> employeeList;
> +
> + public List<Employee> getEmployeeList()
> + {
> + return employeeList;
> + }
> +
> private Collection<LineListOption> lineListOptions;
>
> public String execute() throws Exception
> {
> + employeeList = new ArrayList<Employee>();
>
> OrganisationUnit organisationUnit = selectedStateManager.getSelectedOrganisationUnit();
>
> @@ -218,7 +213,7 @@
> llElementOptionsMap = new HashMap<String, Collection<LineListOption>>();
>
> List<Integer> recordNumbers = new ArrayList<Integer>();
> -
> +
> lineListElements = new ArrayList<LineListElement>( lineListGroup.getLineListElements() );
> if ( lineListElements.size() == 0 )
> {
> @@ -253,10 +248,8 @@
>
> if( lineListGroup != null && lineListGroup.getPeriodType().getName().equalsIgnoreCase( "OnChange" ) )
> {
> - //period = periodService.getPeriod( 0 );
> period = dataBaseManagerInterface.getRecentPeriodForOnChangeData( lineListGroup.getShortName(), postLineListElementName, lineListOption.getName(), organisationUnit );
>
> - //System.out.println("CurPeriod: "+period.getId());
> }
> else
> {
> @@ -295,7 +288,6 @@
> {
> sactionedPostdataelement = mapName;
> }
> - //System.out.println("sactionedPostdataelement = "+sactionedPostdataelement + " dataValue = "+dataValue.getValue());
> dataValueMap.put( mapName, dataValue );
>
> dataelementMap.put( mapName, lineListDataElementMap.getDataElement().getName() + " : " + lineListDataElementMap.getDataElementOptionCombo().getName() );
> @@ -303,11 +295,12 @@
>
> llDataValuesList = new ArrayList<LineListDataValue>();
>
> - //llDataValuesList = dataBaseManagerInterface.getFromLLTable( lineListGroup.getShortName(), organisationUnit, period );
> - //llDataValuesList = dataBaseManagerInterface.getLLValuesByLLElementValue( lineListGroup.getShortName(), postLineListElementName, lineListOption.getName(), organisationUnit, period );
> llDataValuesList = dataBaseManagerInterface.getLLValuesFilterByLLElements( lineListGroup.getShortName(), llElementValueMap, organisationUnit, period );
>
> - if ( llDataValuesList.isEmpty() || llDataValuesList == null )
> + // HardCoding Column Name
> +
> + String pdsCodeColName = "pdscode";
> + if ( llDataValuesList == null || llDataValuesList.isEmpty() )
> {
> return SUCCESS;
> }
> @@ -315,6 +308,19 @@
> {
> for ( LineListDataValue llDataValue : llDataValuesList )
> {
> + Map<String, String> llValueMap = llDataValue.getLineListValues();
> + if ( llValueMap != null)
> + {
> + String pdsCode = llValueMap.get( pdsCodeColName );
> + if( pdsCode != null )
> + {
> + Employee employee = employeeService.getEmployeeByPDSCode( pdsCode );
> + if( employee != null )
> + {
> + employeeList.add( employee );
> + }
> + }
> + }
> recordNumbers.add( Integer.valueOf( llDataValue.getRecordNumber() ) );
> }
> }
>
> === modified file 'local/bd/dhis-web-linelisting-manpower/src/main/java/org/hisp/dhis/ll/action/lldataentry/GetValidatePostVacantAction.java'
> --- local/bd/dhis-web-linelisting-manpower/src/main/java/org/hisp/dhis/ll/action/lldataentry/GetValidatePostVacantAction.java 2010-11-14 14:20:26 +0000
> +++ local/bd/dhis-web-linelisting-manpower/src/main/java/org/hisp/dhis/ll/action/lldataentry/GetValidatePostVacantAction.java 2010-11-17 10:49:09 +0000
> @@ -89,13 +89,13 @@
> // --------------------------------------------------------------------------
> // Input/Output
> // --------------------------------------------------------------------------
> - private String datavalue;
> -
> - public void setDatavalue( String datavalue )
> + private String dataValue;
> +
> + public void setDataValue( String dataValue )
> {
> - this.datavalue = datavalue;
> + this.dataValue = dataValue;
> }
> -
> +
> private String dataValueMapKey;
>
> public void setDataValueMapKey( String dataValueMapKey )
> @@ -129,8 +129,6 @@
> {
> OrganisationUnit organisationunit = selectedStateManager.getSelectedOrganisationUnit();
>
> - Period period = selectedStateManager.getSelectedPeriod();
> -
> lineListGroup = selectedStateManager.getSelectedLineListGroup();
>
> LineListOption lineListOption = selectedStateManager.getSelectedLineListOption();
> @@ -144,13 +142,14 @@
> llElementValueMap.put( postLineListElementName, lineListOption.getName() );
> llElementValueMap.put( lastWorkingDateLLElementName, "null" );
>
> - int recordNo = dataBaseManagerInterface.getLLValueCountByLLElements( departmentLineListName, llElementValueMap, organisationunit, period );
> + int recordNo = dataBaseManagerInterface.getLLValueCountByLLElements( departmentLineListName, llElementValueMap, organisationunit );
> + System.out .println("The Entered Value is: " + dataValue + "Column name is: " + postLineListElementName );
>
> - int dataValue = Integer.parseInt( datavalue );
> + int input = Integer.parseInt( dataValue );
>
> - if( dataValue > recordNo )
> + if( input > recordNo )
> {
> - message = "Number of Sanctioned Position is " + dataValue + "And Number of Filled Position is " + recordNo + "\n Do you want to Add ?";
> + message = "Number of Sanctioned Position is " + input + " And Number of Filled Position is " + recordNo + "\nDo you want to Add ?";
> saveDataValue();
> return SUCCESS;
> }
> @@ -181,13 +180,13 @@
> DataElementCategoryOptionCombo optionCombo = optionComboService
> .getDataElementCategoryOptionCombo( optionComboId );
>
> - if ( datavalue != null && datavalue.trim().length() == 0 )
> + if ( dataValue != null && dataValue.trim().length() == 0 )
> {
> - datavalue = null;
> + dataValue = null;
> }
> - if ( datavalue != null )
> + if ( dataValue != null )
> {
> - datavalue = datavalue.trim();
> + dataValue = dataValue.trim();
> }
>
> DataValue dataValueObj = dataValueService.getDataValue( organisationunit, dataElement, historyPeriod, optionCombo );
> @@ -199,16 +198,16 @@
>
> if ( dataValueObj == null )
> {
> - if ( datavalue != null )
> + if ( dataValue != null )
> {
> - dataValueObj = new DataValue( dataElement, historyPeriod, organisationunit, datavalue, storedBy, new Date(), null,
> + dataValueObj = new DataValue( dataElement, historyPeriod, organisationunit, dataValue, storedBy, new Date(), null,
> optionCombo );
> dataValueService.addDataValue( dataValueObj );
> }
> }
> else
> {
> - dataValueObj.setValue( datavalue );
> + dataValueObj.setValue( dataValue );
> dataValueObj.setTimestamp( new Date() );
> dataValueObj.setStoredBy( storedBy );
>
>
> === modified file 'local/bd/dhis-web-linelisting-manpower/src/main/java/org/hisp/dhis/ll/action/lldataentry/SaveEmplyeePostAction.java'
> --- local/bd/dhis-web-linelisting-manpower/src/main/java/org/hisp/dhis/ll/action/lldataentry/SaveEmplyeePostAction.java 2010-11-14 14:20:26 +0000
> +++ local/bd/dhis-web-linelisting-manpower/src/main/java/org/hisp/dhis/ll/action/lldataentry/SaveEmplyeePostAction.java 2010-11-17 10:49:09 +0000
> @@ -26,46 +26,46 @@
> public class SaveEmplyeePostAction
> implements Action
> {
> -
> - //---------------------------------------------------------------------------
> - // Dependencies
> - //---------------------------------------------------------------------------
> -
> +
> + // ---------------------------------------------------------------------------
> + // Dependencies
> + // ---------------------------------------------------------------------------
> +
> private LineListService lineListService;
>
> public void setLineListService( LineListService lineListService )
> {
> this.lineListService = lineListService;
> }
> -
> +
> private SelectedStateManager selectedStateManager;
>
> public void setSelectedStateManager( SelectedStateManager selectedStateManager )
> {
> this.selectedStateManager = selectedStateManager;
> }
> -
> +
> private CurrentUserService currentUserService;
>
> public void setCurrentUserService( CurrentUserService currentUserService )
> {
> this.currentUserService = currentUserService;
> }
> -
> +
> private DataBaseManagerInterface dbManagerInterface;
>
> public void setDbManagerInterface( DataBaseManagerInterface dbManagerInterface )
> {
> this.dbManagerInterface = dbManagerInterface;
> }
> -
> +
> private I18nFormat format;
>
> public void setFormat( I18nFormat format )
> {
> this.format = format;
> }
> -
> +
> private PeriodService periodService;
>
> public void setPeriodService( PeriodService periodService )
> @@ -73,16 +73,23 @@
> this.periodService = periodService;
> }
>
> - //---------------------------------------------------------------------------
> - //Input/Output
> - //---------------------------------------------------------------------------
> + // ---------------------------------------------------------------------------
> + // Input/Output
> + // ---------------------------------------------------------------------------
> private String department;
> -
> +
> public void setDepartment( String department )
> {
> this.department = department;
> }
>
> + private String post;
> +
> + public void setPost( String post )
> + {
> + this.post = post;
> + }
> +
> private Integer groupid;
>
> public void setGroupid( Integer groupid )
> @@ -96,58 +103,94 @@
> {
> return storedBy;
> }
> -
> +
> public String reportingDate;
>
> public void setReportingDate( String reportingDate )
> {
> this.reportingDate = reportingDate;
> }
> +
> + public String getReportingDate()
> + {
> + return reportingDate;
> + }
> +
> + private String dataValueMapKey;
> +
> + public String getDataValueMapKey()
> + {
> + return dataValueMapKey;
> + }
> +
> + public void setDataValueMapKey( String dataValueMapKey )
> + {
> + this.dataValueMapKey = dataValueMapKey;
> + }
> +
> + private String dataValue;
> +
> + public String getDataValue()
> + {
> + return dataValue;
> + }
> +
> + public void setDataValue( String dataValue )
> + {
> + this.dataValue = dataValue;
> + }
> +
>
> private LineListGroup lineListGroup;
>
> - //--------------------------------------------------------------------------
> - //Action Implementation
> - //--------------------------------------------------------------------------
> -
> + // --------------------------------------------------------------------------
> + // Action Implementation
> + // --------------------------------------------------------------------------
> +
> public String execute()
> {
> HttpServletRequest request = ServletActionContext.getRequest();
> -
> - System.out.println("GroupId id :::::" + groupid );
> -
> - Collection<LineListElement> linelistElements = lineListService.getLineListGroup( groupid ).getLineListElements();
> -
> +
> + System.out.println( "GroupId id :::::" + groupid );
> +
> + Collection<LineListElement> linelistElements = lineListService.getLineListGroup( groupid )
> + .getLineListElements();
> +
> lineListGroup = selectedStateManager.getSelectedLineListGroup();
> -
> +
> OrganisationUnit organisationUnit = selectedStateManager.getSelectedOrganisationUnit();
> -
> +
> Period historyPeriod = getHistoryPeriod();
> -
> +
> int recordNo = dbManagerInterface.getMaxRecordNumber( department ) + 1;
> -
> +
> Map<String, String> llElementValuesMap = new HashMap<String, String>();
> LineListDataValue llDataValue = new LineListDataValue();
> for ( LineListElement linelistElement : linelistElements )
> {
> String linelistElementValue = request.getParameter( linelistElement.getShortName() );
> -
> +
> if ( linelistElementValue != null && linelistElementValue.trim().equals( "" ) )
> {
> linelistElementValue = "";
> }
> llElementValuesMap.put( linelistElement.getShortName(), linelistElementValue );
> }
> -
> - // add map in linelist data value
> +
> + String postColumnId = linelistElements.iterator().next().getShortName();
> + llElementValuesMap.put( postColumnId, post );
> + System.out.println("*********"+postColumnId + " ------ " + post + "**********");
> +
> + // add map in linelist data value
> llDataValue.setLineListValues( llElementValuesMap );
>
> - //add period and source to row
> + // add period and source to row
> llDataValue.setPeriod( historyPeriod );
> llDataValue.setSource( organisationUnit );
>
> // add recordNumber to pass to the update query
> llDataValue.setRecordNumber( recordNo );
> +
>
> // add stored by, timestamp in linelist data value
> storedBy = currentUserService.getCurrentUsername();
> @@ -158,31 +201,30 @@
> }
>
> llDataValue.setStoredBy( storedBy );
> -
> +
> boolean valueInserted = dbManagerInterface.insertSingleLLValueIntoDb( llDataValue, department );
> - if( valueInserted )
> + if ( valueInserted )
> {
> - System.out.println("Values Successfully Inserted in DB");
> + System.out.println( "Values Successfully Inserted in DB" );
> }
>
> return SUCCESS;
> }
>
> - private Period getHistoryPeriod( )
> + private Period getHistoryPeriod()
> {
> Date historyDate = format.parseDate( reportingDate );
> - System.out.println("Report Date is :::::::" + reportingDate );
> -
> + System.out.println( "Report Date is :::::::" + reportingDate );
> +
> Period period;
> period = periodService.getPeriod( 0 );
> Period historyPeriod;
> -
>
> if ( lineListGroup != null && lineListGroup.getPeriodType().getName().equalsIgnoreCase( "OnChange" ) )
> {
> PeriodType dailyPeriodType = new DailyPeriodType();
> historyPeriod = dailyPeriodType.createPeriod( historyDate );
> -
> +
> System.out.println( reportingDate + " : " + historyPeriod );
> if ( historyPeriod == null )
> {
> @@ -198,10 +240,10 @@
>
> historyPeriod = period;
> }
> -
> +
> return historyPeriod;
> }
> -
> +
> private final Period reloadPeriod( Period period )
> {
> return periodService.getPeriod( period.getStartDate(), period.getEndDate(), period.getPeriodType() );
> @@ -220,5 +262,5 @@
>
> return storedPeriod;
> }
> -
> +
> }
>
> === modified file 'local/bd/dhis-web-linelisting-manpower/src/main/java/org/hisp/dhis/ll/action/lldataentry/SelectAction.java'
> --- local/bd/dhis-web-linelisting-manpower/src/main/java/org/hisp/dhis/ll/action/lldataentry/SelectAction.java 2010-10-20 06:14:25 +0000
> +++ local/bd/dhis-web-linelisting-manpower/src/main/java/org/hisp/dhis/ll/action/lldataentry/SelectAction.java 2010-11-17 10:49:09 +0000
> @@ -83,28 +83,7 @@
> {
> this.lineListService = lineListService;
> }
> -/*
> - private DataElementService dataElementService;
> -
> - public void setDataElementService( DataElementService dataElementService )
> - {
> - this.dataElementService = dataElementService;
> - }
> -
> - private DataEntryFormService dataEntryFormService;
> -
> - public void setDataEntryFormService( DataEntryFormService dataEntryFormService )
> - {
> - this.dataEntryFormService = dataEntryFormService;
> - }
> -
> - private PeriodService periodService;
> -
> - public void setPeriodService( PeriodService periodService )
> - {
> - this.periodService = periodService;
> - }
> -*/
> +
> // -------------------------------------------------------------------------
> // Output
> // -------------------------------------------------------------------------
> @@ -259,8 +238,6 @@
> // Load LineListGroups
> // ---------------------------------------------------------------------
> lineListGroups = selectedStateManager.loadLineListGroupsForSelectedOrgUnit( organisationUnit );
> - // lineListGroups = new ArrayList<LineListGroup>(
> - // lineListService.getLineListGroupsBySource( organisationUnit ) );
>
> // ---------------------------------------------------------------------
> // Remove LineListGroups which don't have a CalendarPeriodType or are
> @@ -287,7 +264,6 @@
> {
> selectedLineListGroupId = selectedLineListGroup.getId();
> selectedStateManager.setSelectedLineListGroup( selectedLineListGroup );
> - //System.out.println("REturning SUCCESS from linelist group which is selected");
> }
> else
> {
> @@ -300,7 +276,6 @@
> selectedStateManager.clearSelectedLineListOption();
> selectedStateManager.clearSelectedPeriod();
>
> - //System.out.println("REturning SUCCESS from linelist group which is not selected");
> return SUCCESS;
> }
>
> @@ -317,25 +292,16 @@
> if ( selectedLineListOptionId != null && !selectedLineListOptionId.equalsIgnoreCase( "null" ) )
> {
> selectedLineListOption = lineListService.getLineListOptionByName( selectedLineListOptionId );
> - /*
> - if(selectedLineListOption == null )
> -
> - System.out.println("1");
> - else
> - System.out.println("1.1");
> - */
> }
> else
> {
> selectedLineListOption = selectedStateManager.getSelectedLineListOption();
> - //System.out.println("2");
> }
>
> if ( selectedLineListOption != null && lineListOptions.contains( selectedLineListOption ) )
> {
> selectedLineListOptionId = selectedLineListOption.getName();
> selectedStateManager.setSelectedLineListOption( selectedLineListOption );
> - //System.out.println("3");
> }
> else
> {
> @@ -345,7 +311,6 @@
> selectedStateManager.clearSelectedLineListOption();
> selectedStateManager.clearSelectedPeriod();
>
> - //System.out.println("4");
> return SUCCESS;
> }
>
> @@ -378,9 +343,7 @@
> selectedPeriodIndex = null;
> selectedStateManager.clearSelectedPeriod();
>
> - //System.out.println("REturning default from from period block");
> return DEFAULT_FORM;
> - // periods.add( periodService.getPeriod( 0 ) );
> }
> else
> {
>
> === modified file 'local/bd/dhis-web-linelisting-manpower/src/main/java/org/hisp/dhis/ll/action/lldataentry/ShowEmployeePostFormAction.java'
> --- local/bd/dhis-web-linelisting-manpower/src/main/java/org/hisp/dhis/ll/action/lldataentry/ShowEmployeePostFormAction.java 2010-11-12 14:18:09 +0000
> +++ local/bd/dhis-web-linelisting-manpower/src/main/java/org/hisp/dhis/ll/action/lldataentry/ShowEmployeePostFormAction.java 2010-11-17 10:49:09 +0000
> @@ -60,13 +60,37 @@
> return linelistGroupId;
> }
>
> + private String dataValueMapKey;
> +
> + public String getDataValueMapKey()
> + {
> + return dataValueMapKey;
> + }
> +
> + public void setDataValueMapKey( String dataValueMapKey )
> + {
> + this.dataValueMapKey = dataValueMapKey;
> + }
> +
> + private String dataValue;
> +
> + public String getDataValue()
> + {
> + return dataValue;
> + }
> +
> + public void setDataValue( String dataValue )
> + {
> + this.dataValue = dataValue;
> + }
> +
> public String reportingDate;
>
> public String getReportingDate()
> {
> return reportingDate;
> }
> -
> +
> public void setReportingDate( String reportingDate )
> {
> this.reportingDate = reportingDate;
>
> === added file 'local/bd/dhis-web-linelisting-manpower/src/main/java/org/hisp/dhis/ll/action/lldataentry/ValidateEmployeeExistAction.java'
> --- local/bd/dhis-web-linelisting-manpower/src/main/java/org/hisp/dhis/ll/action/lldataentry/ValidateEmployeeExistAction.java 1970-01-01 00:00:00 +0000
> +++ local/bd/dhis-web-linelisting-manpower/src/main/java/org/hisp/dhis/ll/action/lldataentry/ValidateEmployeeExistAction.java 2010-11-17 10:49:09 +0000
> @@ -0,0 +1,107 @@
> +package org.hisp.dhis.ll.action.lldataentry;
> +
> +import java.util.HashMap;
> +import java.util.Map;
> +
> +import org.hisp.dhis.dbmanager.DataBaseManagerInterface;
> +import org.hisp.dhis.linelisting.Employee;
> +import org.hisp.dhis.linelisting.EmployeeService;
> +import org.hisp.dhis.linelisting.LineListGroup;
> +import org.hisp.dhis.linelisting.LineListOption;
> +import org.hisp.dhis.organisationunit.OrganisationUnit;
> +
> +import com.opensymphony.xwork2.Action;
> +
> +public class ValidateEmployeeExistAction
> +implements Action
> +{
> + // -------------------------------------------------------------------------
> + // Dependencies
> + // -------------------------------------------------------------------------
> +
> + private EmployeeService employeeService;
> +
> + public void setEmployeeService( EmployeeService employeeService )
> + {
> + this.employeeService = employeeService;
> + }
> +
> + private SelectedStateManager selectedStateManager;
> +
> + public void setSelectedStateManager( SelectedStateManager selectedStateManager )
> + {
> + this.selectedStateManager = selectedStateManager;
> + }
> +
> + private DataBaseManagerInterface dataBaseManagerInterface;
> +
> + public void setDataBaseManagerInterface( DataBaseManagerInterface dataBaseManagerInterface )
> + {
> + this.dataBaseManagerInterface = dataBaseManagerInterface;
> + }
> +
> + // -------------------------------------------------------------------------
> + // Input/output
> + // -------------------------------------------------------------------------
> +
> + private String pdsCode;
> +
> + public void setPdsCode( String pdsCode )
> + {
> + this.pdsCode = pdsCode;
> + }
> +
> + private Employee employee;
> +
> + public Employee getEmployee()
> + {
> + return employee;
> + }
> +
> + private String message;
> +
> + public String getMessage()
> + {
> + return message;
> + }
> +
> + //private String EMPLOYEEEXIST;
> +
> + //--------------------------------------------------------------------------
> + //Action Implementation
> + //--------------------------------------------------------------------------
> +
> + public String execute()
> + {
> + employee = employeeService.getEmployeeByPDSCode( pdsCode );
> +
> + OrganisationUnit organisationUnit = selectedStateManager.getSelectedOrganisationUnit();
> + LineListGroup lineListGroup = selectedStateManager.getSelectedLineListGroup();
> + LineListOption lineListOption = selectedStateManager.getSelectedLineListOption();
> + String departmentLineListName = lineListGroup.getName();
> +
> + String pdsCodeColumnName = "pdscode";
> + Map<String, String> llElementValueMap = new HashMap<String, String>();
> + llElementValueMap.put( pdsCodeColumnName, pdsCode );
> +
> + if ( employee == null )
> + {
> + message = "The Employee with this PDSCode does not exist. Do you want to add new Employee?";
> + return INPUT;
> + }
> + else
> + {
> + message = "Employee name with this PDSCode is : " + employee.getName();
> + int employeeRecord = dataBaseManagerInterface.getLLValueCountByLLElements( departmentLineListName, llElementValueMap, organisationUnit );
> + System.out.println("Employee record is :" + employeeRecord );
> + if ( employeeRecord != 0 )
> + {
> + message = "The Detail of this Employee already exist. Do you wantt to update Record?";
> + return "employeeexist";
> + }
> + }
> +
> + return SUCCESS;
> + }
> +
> +}
>
> === modified file 'local/bd/dhis-web-linelisting-manpower/src/main/resources/META-INF/dhis/beans.xml'
> --- local/bd/dhis-web-linelisting-manpower/src/main/resources/META-INF/dhis/beans.xml 2010-11-15 08:26:40 +0000
> +++ local/bd/dhis-web-linelisting-manpower/src/main/resources/META-INF/dhis/beans.xml 2010-11-17 10:49:09 +0000
> @@ -458,6 +458,9 @@
> <property name="dataValueService">
> <ref bean="org.hisp.dhis.datavalue.DataValueService"/>
> </property>
> + <property name="employeeService">
> + <ref bean="org.hisp.dhis.linelisting.EmployeeService"/>
> + </property>
> </bean>
>
> <bean id="org.hisp.dhis.ll.action.lldataentry.SaveValueAction"
> @@ -493,7 +496,13 @@
> <property name="optionComboService" ref="org.hisp.dhis.dataelement.DataElementCategoryService"/>
> </bean>
>
> -
> + <bean id="org.hisp.dhis.ll.action.lldataentry.ValidateEmployeeExistAction"
> + class="org.hisp.dhis.ll.action.lldataentry.ValidateEmployeeExistAction" scope="prototype">
> + <property name="selectedStateManager" ref="org.hisp.dhis.ll.action.lldataentry.SelectedStateManager"/>
> + <property name="dataBaseManagerInterface" ref="org.hisp.dhis.dbmanager.DataBaseManagerInterface"/>
> + <property name="employeeService" ref="org.hisp.dhis.linelisting.EmployeeService"/>
> + </bean>
> +
> <bean id="org.hisp.dhis.ll.action.llValidation.GetLineListValidationRuleListAction"
> class="org.hisp.dhis.ll.action.llValidation.GetLineListValidationRuleListAction">
> <property name="validationRuleService">
>
> === modified file 'local/bd/dhis-web-linelisting-manpower/src/main/resources/struts.xml'
> --- local/bd/dhis-web-linelisting-manpower/src/main/resources/struts.xml 2010-11-15 08:26:40 +0000
> +++ local/bd/dhis-web-linelisting-manpower/src/main/resources/struts.xml 2010-11-17 10:49:09 +0000
> @@ -411,7 +411,6 @@
>
> <action name="saveEmployeePost" class="org.hisp.dhis.ll.action.lldataentry.SaveEmplyeePostAction">
> <result name="success" type="velocity">/main.vm</result>
> - <param name="page">/dhis-web-linelisting-mp/select.vm</param>
> </action>
>
> <action name="updateLineListEntry"
> @@ -420,10 +419,11 @@
> <param name="requiredAuthorities">F_LINELISTEntry_UPDATE</param>
> </action>
>
> - <action name="getEmployeeName"
> - class="org.hisp.dhis.ll.action.employee.GetEmployeeAction">
> + <action name="validateEmployeeExist"
> + class="org.hisp.dhis.ll.action.lldataentry.ValidateEmployeeExistAction">
> <result name="success" type="velocity-xml">/dhis-web-linelisting-mp/responseSuccess.vm</result>
> <result name="input" type="velocity-xml">/dhis-web-linelisting-mp/responseInput.vm</result>
> + <result name="employeeexist" type="velocity-xml">/dhis-web-linelisting-mp/responseEmployeeExist.vm</result>
> <param name="onExceptionReturn">plainTextError</param>
> </action>
>
>
> === modified file 'local/bd/dhis-web-linelisting-manpower/src/main/webapp/dhis-web-linelisting-mp/employeePost.vm'
> --- local/bd/dhis-web-linelisting-manpower/src/main/webapp/dhis-web-linelisting-mp/employeePost.vm 2010-11-14 14:20:26 +0000
> +++ local/bd/dhis-web-linelisting-manpower/src/main/webapp/dhis-web-linelisting-mp/employeePost.vm 2010-11-17 10:49:09 +0000
> @@ -19,6 +19,10 @@
> <td>
> <input type="hidden" name="groupid" id="groupid" value="$linelistGroupId">
> <input type="hidden" name="reportingDate" id="reportingDate" value="$reportingDate">
> + <input type="text" name="dataValue" id="dataValue" value="$dataValue">
> + </td>
> + <td>
> + <input type="text" name="dataValueMapKey" id="dataValueMapKey" value="$dataValueMapKey">
> </td>
> </tr>
>
>
> === modified file 'local/bd/dhis-web-linelisting-manpower/src/main/webapp/dhis-web-linelisting-mp/form.vm'
> --- local/bd/dhis-web-linelisting-manpower/src/main/webapp/dhis-web-linelisting-mp/form.vm 2010-11-14 14:20:26 +0000
> +++ local/bd/dhis-web-linelisting-manpower/src/main/webapp/dhis-web-linelisting-mp/form.vm 2010-11-17 10:49:09 +0000
> @@ -4,7 +4,7 @@
> <script>
> var rowCount = 0;
> var sancPos = 0;
> -
> + var dataValueMapKey;
> function setSancPost( curSancPos )
> {
> sancPos = curSancPos;
> @@ -29,7 +29,7 @@
> <td align="center">$count1</td>
> <td>$dataElementName</td>
> <td align="center"><input type="text" id="$dataValueMapKey" name="$dataValueMapKey" value="$!dataValue.value" onchange="setSancPost(this.value)"/>
> - <script>sancPos='$!dataValue.value';</script>
> + <script>sancPos='$!dataValue.value'; dataValueMapKey='$dataValueMapKey';</script>
> #if( $sactionedPostdataelement == $dataValueMapKey)
> <input type="button" value="Add" onclick="validatePostVacant( '$dataValueMapKey' )">
> #end
> @@ -39,101 +39,33 @@
> #end
>
> </table>
> -<!--
> -<table id="tblGrid" width="100%">
> -
> - <tr>
> - <th width="20">Sr.No.</th>
> - #foreach( $lineListElement in $lineListElements )
> - <th>$lineListElement.name</th>
> - #end
> - <th width="20">Delete</th>
> +
> +<table class="listTable" id="listTable" align="centre">
> +
> +
> + <col>
> + <col width="20">
> + <col width="20">
> + <tr>
> + <td>$i18n.getString( "filter_by_name" ) : <form style="display:inline" action="none" onsubmit="return false"><div style="inline"><input type="text" onkeyup="filterValues( this.value )"></div></form></td>
> + <td></td><td></td>
> </tr>
> -
> - #set($maxRecord = 0)
> - #set($recordNumberList = "")
> - #set($calInfo = "")
> - #set($srno = 0)
> -
> - #if($llDataValuesList.size()!=0)
> -
> - #foreach($llDataValue in $llDataValuesList)
> - #set($srno = $srno + 1)
> - #set($recordNumber = $llDataValue.recordNumber)
> - #set($recordNumberList = $recordNumberList + $recordNumber +":")
> - #set($llElementValuesMap = $llDataValue.lineListValues)
> -
> - <tr>
> - <td><label id="sr.no">$srno</label></td>
> - #set( $colCount = 0 )
> - #foreach( $lineListElement in $lineListElements )
> - #set($element = $lineListElement.shortName+':'+$recordNumber)
> - #set($getDate = 'getDate:'+$element)
> - #if($lineListElement.PresentationType == 'text')
> - <td>
> - <input type="text" name="$element" id = "$element" style="width:10em" onchange="return valueChanged($recordNumber,'$lineListElement.shortName')" value=$!llElementValuesMap.get($element)>
> - </td>
> - #elseif($lineListElement.PresentationType == 'combobox')
> - <td>
> - <select name="$element" id="$element" onchange="return valueChanged($recordNumber,'$lineListElement.shortName')">
> - <option name="SelectOption" value="" selected>--Select--</option>
> - #set($lineListOptions = $llElementOptionsMap.get($lineListElement.shortName))
> - #foreach( $lineListOption in $lineListOptions )
> - <option name="$lineListOption.name" value="$lineListOption.name" #if($lineListOption.name == $llElementValuesMap.get($element)) selected #end>$lineListOption.name</option>
> - #end
> - </select>
> - </td>
> - #elseif($lineListElement.PresentationType == 'calender')
> - <td>
> - <input type="text" id="$element" name="$element" style="width:10em" value="$!llElementValuesMap.get($element)" onchange="return valueChanged($recordNumber,'$lineListElement.shortName')">
> - <img src="../images/calendar_icon.gif" width="16" height="16" id="$getDate" style="cursor: pointer;" title="$i18n.getString("date_selector")" onmouseover="this.style.background='orange';" onmouseout="this.style.background='green'" alt="Date">
> - </td>
> - <script type="text/javascript">
> - Calendar.setup({
> - inputField : "$element", // id of the input field
> - ifFormat : "$i18n.getString("format.date.label")", // format of the input field
> - button : "$getDate" // trigger for the calendar (button ID)
> - });
> - </script>
> - #end
> - #end
> - <td>
> - <a href="javascript:removeLLRecord( '$recordNumber' )" title="$i18n.getString( "remove" )"><img src="../images/delete.png" alt="$i18n.getString( "remove" )"></a>
> - </td>
> - <td>
> - <input type="hidden" name="recordNumber:$recordNumber" id="recordNumber:$recordNumber" value="$recordNumber" style="width:10px;">
> - </td>
> - <td>
> - <input type="hidden" name="changedValue:$recordNumber" id="changedValue:$recordNumber">
> - </td>
> - </tr>
> - #set($maxRecord = $maxRecord + 1)
> - #end
> - #end
> -
> -</table>
> -
> -<br/><br/><br/>
> -
> -<table>
> - <tr>
> - <td>
> - <center><input type="submit" value="Save">
> - <input type="hidden" id="reportedDate" name="reportedDate">
> - </td>
> - <td>
> - <input type="text" name="recordsFromDb" id="recordsFromDb" value="$maxRecord">recordsFromDb
> - <input type="hidden" name="delRecordNo" id="delRecordNo" >
> - </td>
> - <td>
> - <input type="text" name="totalRecords" id="totalRecords">totalRecords
> - </td>
> - <td>
> - <input type="hidden" name="recordNumbersList" id="recordNumbersList" value="$recordNumberList">
> - </td>
> + <tr>
> + <th>$i18n.getString( "name" ) - $i18n.getString( "pdscode" )</th>
> + <th colspan="2">$i18n.getString( "operations" )</th>
> </tr>
> + <tbody id="list">
> + #set( $mark = false )
> + #foreach( $employee in $employeeList )
> + <tr id="tr${employee.pdsCode}">
> + <td#alternate( $mark )>$encoder.htmlEncode( $employee.name ) - $encoder.htmlEncode( $employee.pdsCode )</td>
> + <td style="text-align:center"#alternate( $mark )><a href="showUpdateEmployeePostForm.action?id=$employee.pdsCode" title="$i18n.getString( "edit" )"><img src="../images/edit.png" alt="$i18n.getString( "edit" )"></a></td>
> + <td style="text-align:center"#alternate( $mark )><a href="javascript:showEmployeePostDetails( '$employee.pdsCode' )" title="$i18n.getString( "show_details" )"><img src="../images/information.png" alt="$i18n.getString( "show_details" )"></a></td>
> + #end
> +
> + <tbody>
> </table>
> --->
> +</form>
> <script type="text/javascript">
>
> $calInfo
>
> === modified file 'local/bd/dhis-web-linelisting-manpower/src/main/webapp/dhis-web-linelisting-mp/javascript/form.js'
> --- local/bd/dhis-web-linelisting-manpower/src/main/webapp/dhis-web-linelisting-mp/javascript/form.js 2010-11-14 14:20:26 +0000
> +++ local/bd/dhis-web-linelisting-manpower/src/main/webapp/dhis-web-linelisting-mp/javascript/form.js 2010-11-17 10:49:09 +0000
> @@ -1,16 +1,12 @@
> -
> var currentPDSCode;
>
> function validatePostVacant( dataValueMapKey )
> {
> var reportingDate = document.getElementById('reportingDate').value;
> -
> - alert( sancPos +" : " + reportingDate );
> var request = new Request();
> request.setResponseTypeXML('element');
> request.setCallbackSuccess( elementReceived );
> - request.send( 'getValidatePostVacant.action?datavalue=' + sancPos + '&dataValueMapKey=' + dataValueMapKey + '&reportingDate=' + reportingDate);
> - //window.location.href = 'getValidatePostVacant.action?datavalue=' + sancPos + '&dataValueMapKey=' + dataValueMapKey + '&reportingDate=' + reportingDate;
> + request.send( 'getValidatePostVacant.action?dataValue=' + sancPos + '&dataValueMapKey=' + dataValueMapKey + '&reportingDate=' + reportingDate);
> }
>
> function elementReceived( recordNo )
> @@ -20,7 +16,7 @@
> {
> if( confirm ( recordNo.firstChild.nodeValue ) )
> {
> - showEmployeePostForm();
> + showEmployeePostForm( sancPos, dataValueMapKey );
> }
> }
> else if (type == 'input' )
> @@ -35,12 +31,11 @@
> var request = new Request();
> request.setResponseTypeXML( 'employee' );
> request.setCallbackSuccess( employeeReceived );
> - request.send( 'getEmployeeName.action?pdsCode=' + pdsCode );
> + request.send( 'validateEmployeeExist.action?pdsCode=' + pdsCode );
> }
>
> function employeeReceived( employeeElement )
> {
> - //messageElement = employeeElement.getElementsByTagName( "message" )[0];
> var type = employeeElement.getAttribute( "type" );
> if (type == 'success')
> {
> @@ -52,10 +47,25 @@
> var field = document.getElementById( currentPDSCode );
> field.value = "";
> setTimeout(function(){
> - field.focus();field.select();
> - },2);
> - }
> - }
> + field.focus();field.select();
> + },2);
> + }
> + }
> + else if(type == 'employeeexist')
> + {
> + if( confirm( employeeElement.firstChild.nodeValue ) )
> + {
> + alert("Edit Employee");
> + }
> + else
> + {
> + var field = document.getElementById( currentPDSCode );
> + field.value = "";
> + setTimeout(function(){
> + field.focus();field.select();
> + },2);
> + }
> + }
> else if(type == 'input')
> {
> if( confirm( employeeElement.firstChild.nodeValue ) )
> @@ -122,10 +132,7 @@
> {
> var tempStr1;
>
> - tempStr1 = '<select name="'+tempStr+'" id="'+tempStr+'" ><option name="SelectOption" value="" selected>--Select--</option>';
> -
> - //alert(oCell.innerHTML);
> - //<select name="+tempStr+" id="+tempStr+"><option value="NONE" selected="selected">--Select--</option></select>
> + tempStr1 = '<select name="'+tempStr+'" id="'+tempStr+'" ><option name="SelectOption" value="" selected>--Select--</option>';
>
> for( var j=0; j<options.length; j++ )
> {
> @@ -139,10 +146,8 @@
>
> i++;
> }
> -
> }
>
> -
> function removeLLRecord( delRecordNo )
> {
> var result = window.confirm( 'Do you want to save new records and delete this record' );
> @@ -153,17 +158,13 @@
> document.getElementById('delRecordNo').value = delRecordNo;
>
> document.getElementById('LineListDataEntryForm').submit();
> -
> - //window.location.href = 'saveandDelValueAction.action?recordId=' + nextRecordNo;
> }
> -
> }
>
> -function showEmployeePostForm()
> +function showEmployeePostForm( sancPos, dataValueMapKey )
> {
> - //alert( dataValueMapKey );
> var reportingDate = document.getElementById( "reportingDate" ).value;
> - var url = 'showEmployeePostForm.action?reportingDate=' + reportingDate;
> + var url = 'showEmployeePostForm.action?reportingDate=' + reportingDate + '&dataValue=' + sancPos + '&dataValueMapKey=' + dataValueMapKey;
> $('#contentDataRecord').dialog('destroy').remove();
> $('<div id="contentDataRecord" style="z-index: 1;">' ).load(url).dialog({
> title: 'Employee Post Detail',
> @@ -174,7 +175,4 @@
> width: 420,
> height: 380
> });
> -}
> -
> -
> -
> +}
> \ No newline at end of file
>
> === added file 'local/bd/dhis-web-linelisting-manpower/src/main/webapp/dhis-web-linelisting-mp/responseEmployeeExist.vm'
> --- local/bd/dhis-web-linelisting-manpower/src/main/webapp/dhis-web-linelisting-mp/responseEmployeeExist.vm 1970-01-01 00:00:00 +0000
> +++ local/bd/dhis-web-linelisting-manpower/src/main/webapp/dhis-web-linelisting-mp/responseEmployeeExist.vm 2010-11-17 10:49:09 +0000
> @@ -0,0 +1,2 @@
> +<?xml version="1.0" encoding="UTF-8"?>
> +<message type="employeeexist">$encoder.xmlEncode( $message )</message>
> \ No newline at end of file
>
> === modified file 'local/in/dhis-in-api/src/main/java/org/hisp/dhis/linelisting/Employee.java'
> --- local/in/dhis-in-api/src/main/java/org/hisp/dhis/linelisting/Employee.java 2010-11-15 08:26:40 +0000
> +++ local/in/dhis-in-api/src/main/java/org/hisp/dhis/linelisting/Employee.java 2010-11-17 10:49:09 +0000
> @@ -88,7 +88,7 @@
> /**
> * isTransferred
> */
> - private boolean isTransferred = false;
> + private Boolean isTransferred = false;
>
> // -------------------------------------------------------------------------
> // Constructors
> @@ -114,7 +114,7 @@
>
> public Employee( String pdsCode, String name, Date dateOfBirth, Date lprDate, String sex,
> Date joinDateToGovtService, String resAddress, String contactNumber, String emergencyContactNumber,
> - boolean isTransferred )
> + Boolean isTransferred )
> {
> this.pdsCode = pdsCode;
> this.name = name;
> @@ -255,7 +255,7 @@
> this.emergencyContactNumber = emergencyContactNumber;
> }
>
> - public boolean getIsTransferred()
> + public Boolean getIsTransferred()
> {
> return isTransferred;
> }
>
> === modified file 'local/in/dhis-in-services/dhis-in-service-dbmanager/src/main/java/org/hisp/dhis/dbmanager/DataBaseManagerInterface.java'
> --- local/in/dhis-in-services/dhis-in-service-dbmanager/src/main/java/org/hisp/dhis/dbmanager/DataBaseManagerInterface.java 2010-11-14 14:20:26 +0000
> +++ local/in/dhis-in-services/dhis-in-service-dbmanager/src/main/java/org/hisp/dhis/dbmanager/DataBaseManagerInterface.java 2010-11-17 10:49:09 +0000
> @@ -35,7 +35,7 @@
>
> public boolean updateLLValue( List<LineListDataValue> llDataValuesList, String tableName );
>
> - public int getLLValueCountByLLElements( String tablename, Map<String,String> llElementValueMap, Source source, Period period );
> + public int getLLValueCountByLLElements( String tablename, Map<String,String> llElementValueMap, Source source );
>
> public List<LineListDataValue> getLLValuesFilterByLLElements( String tableName, Map<String,String> llElementValueMap, Source source, Period period );
>
>
> === modified file 'local/in/dhis-in-services/dhis-in-service-dbmanager/src/main/java/org/hisp/dhis/dbmanager/mysql/MySQLDataBaseManager.java'
> --- local/in/dhis-in-services/dhis-in-service-dbmanager/src/main/java/org/hisp/dhis/dbmanager/mysql/MySQLDataBaseManager.java 2010-11-15 18:05:51 +0000
> +++ local/in/dhis-in-services/dhis-in-service-dbmanager/src/main/java/org/hisp/dhis/dbmanager/mysql/MySQLDataBaseManager.java 2010-11-17 10:49:09 +0000
> @@ -552,7 +552,7 @@
> //Statement statement = null;
>
> // creating map of element and its values
> - Map<String, String> llElementValuesMap = new HashMap<String, String>();
> + //Map<String, String> llElementValuesMap = new HashMap<String, String>();
>
> List<LineListDataValue> llDataValues = new ArrayList<LineListDataValue>();
> // LineListDataValue llDataValue = new LineListDataValue();
> @@ -610,12 +610,14 @@
> while ( result.next() )
> {
> LineListDataValue llDataValue = new LineListDataValue();
> + Map<String, String> llElementValuesMap = new HashMap<String, String>();
> llDataValue.setRecordNumber( result.getInt( "recordnumber" ) );
> Iterator it1 = elementsCollection.iterator();
> while ( it1.hasNext() )
> {
> element = (LineListElement) it1.next();
> - name = element.getShortName() + ":" + result.getInt( "recordnumber" );
> + //name = element.getShortName() + ":" + result.getInt( "recordnumber" );
> + name = element.getShortName();
> if ( element.getDataType().equalsIgnoreCase( "string" ) )
> {
> String tempString = result.getString( element.getShortName() );
> @@ -668,7 +670,7 @@
>
> }
>
> - public int getLLValueCountByLLElements( String tableName, Map<String, String> llElementValueMap, Source source, Period period )
> + public int getLLValueCountByLLElements( String tableName, Map<String, String> llElementValueMap, Source source )
> {
> String columnDefinition = "";
> int noOfRows = 0;
>
>
> _______________________________________________
> Mailing list: https://launchpad.net/~dhis2-devs
> Post to : dhis2-devs@xxxxxxxxxxxxxxxxxxx
> Unsubscribe : https://launchpad.net/~dhis2-devs
> More help : https://help.launchpad.net/ListHelp
>
>
--
Cheers,
Knut Staring
Follow ups
References