public List getWorkDailyLogList(String type, Date date,String userId,String queryInfo)
{
StringBuffer sql = new StringBuffer("select guid, title as 标题,convert(char(10),createddate,20) as 日期");
sql.append(getAppRelationCore().getPersonManagementFacade().getColumnStatement("Hr_dailylog")).append(" from Hr_dailyLog where convert(char(10),createddate,20) between ? and ? and creator = ? and title like '%'+?+'%'");
String params[] = new String[4];
GregorianCalendar calendar = new GregorianCalendar();
calendar.setTime(date);
if(type.equals("week"))
{
calendar.set(GregorianCalendar.DAY_OF_WEEK,1);
params[0] = PortalUtil.convertDateToString(PortalUtil.SQL_DATE_PATTERN, calendar.getTime());
calendar.set(GregorianCalendar.DAY_OF_WEEK,7);
params[1] = PortalUtil.convertDateToString(PortalUtil.SQL_DATE_PATTERN, calendar.getTime());
}
if(type.equals("month"))
{
calendar.set(GregorianCalendar.DAY_OF_MONTH,1);
params[0] = PortalUtil.convertDateToString(PortalUtil.SQL_DATE_PATTERN, calendar.getTime());
calendar.set(GregorianCalendar.DAY_OF_MONTH,calendar.getActualMaximum(GregorianCalendar.DAY_OF_MONTH));
params[1] = PortalUtil.convertDateToString(PortalUtil.SQL_DATE_PATTERN, calendar.getTime());
}
if(type.equals("year"))
{
calendar.set(GregorianCalendar.DAY_OF_YEAR,1);
params[0] = PortalUtil.convertDateToString(PortalUtil.SQL_DATE_PATTERN, calendar.getTime());
calendar.set(GregorianCalendar.DAY_OF_YEAR,calendar.getActualMaximum(GregorianCalendar.DAY_OF_YEAR));
params[1] = PortalUtil.convertDateToString(PortalUtil.SQL_DATE_PATTERN, calendar.getTime());
}
if(type.equals("day"))
{
params[0] = PortalUtil.convertDateToString(PortalUtil.SQL_DATE_PATTERN, calendar.getTime());
params[1] = PortalUtil.convertDateToString(PortalUtil.SQL_DATE_PATTERN, calendar.getTime());
}
params[2] = userId;
params[3] = queryInfo;
return this.getCommonDAO().findBySQL(sql.toString(),params).getRows(); //To change body of implemented methods use File | Settings | File Templates.
}
分享到:
相关推荐
The first line of the input file contains the number of the input dates in the file. The next n lines contain n dates in the Haab calendar format, each in separate line. The year is smaller then 5000....
The sample project includes the usage of the library. Support for Android 4.0 and up. Feel free to fork or issue pull requests on github. Issues can be reported on the github issue tracker. Demo ...
Coverage of the long-awaited introduction of a well-designed date/time/calendar library (JSR 310) A concise introduction to JavaFX, which is positioned to replace Swing GUIs, and to the Nashorn ...
Lots of Sample Apps and Code You will learn what you need to know to work professionally with Fullstack Vue: The Complete Guide to Vue.js You’ll build: A Server-Persisted Shopping Cart: Use the ...
- **Sample Code**: The cookbook provides examples of how to implement custom keyboards and extensions, including setting up the UI and handling events. #### 3. **Accessing Users’ Health-Related ...
DialogFragments modeled after the AOSP Clock ...For a working implementation of this project see the sample/ folder. Calendar Date Picker button.setOnClickListener(new View.OnClickListener() { @Override
<END><br>46,FldrView.zip The Folderview ActiveX Control mimics the behaviour of the Windows Explorer Treeview showing the tree structure of the files and folders and other items in the shell's ...
"<END><br>17 , statusbar.zip "This is a sample of the StatusBar control that is part of the Microsoft Windows Common Controls(COMCTL32.OCX). "<END><br>18 , tabstrip.zip "This is a sample of the...
Added CBCGPCalendarBar::GetState method - returns the calendar style flags specified in SetState method. CBCGPRibbonEdit displays a drop-down window upon pressing F4 key. Added CBCGPShellManager::...
Includes several Sample applications for the TTMSFMXGrid component History : --------- v1.0 : first release v1.0.0.1 Fixed : Issue with setting the focus on the form (Can be activated / ...
The super clean and flexible layout would enable you to easily build web applications. It can be used to create a saas based interface, custom admin panels, dashboard, CRM, CMS, e-commerce panel, etc...
Mojo Framework and Sample Code 22 webOSdev 22 Summary 23 2. Application Basics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25 ...