以下是我写的方法:
public List<Map<String, Object>> loadNotYetInEmployee(int shift, Date date,
int transitionVal, String type, User user) {
DateTime datetime = new DateTime(date);
datetime = datetime
.plus(Period.minutes(shiftTiming.getSession1InTime()));
List<Map<String, Object>> result = new ArrayList<Map<String, Object>>();
sql = SqlMapUtils.getSql("attendance.attendancestatus.latein",
parameters);
result = getJdbcTemplate().queryForList(sql);
for (int i = 0; i < result.size(); i++) {
Date punchInTime = (Date) result.get(i).get("punchtime");
DateTime punchTime = new DateTime(punchInTime);
}
return result;
}
Run Code Online (Sandbox Code Playgroud)
现在从我的方法你可以看到我在对象中有一个Joda-Time DateTime对象datetime
,从我的结果我得到一个时间戳,我转换为jodatime punchTime
.现在我想找出这两个日期之间的差异,我该怎么做?
提前致谢
我写了一个查询,其中一列是一个月.从那里我必须得到最小月,最大月和月中位数.以下是我的查询.
select ext.employee,
pl.fromdate,
ext.FULL_INC as full_inc,
prevExt.FULL_INC as prevInc,
(extract(year from age (pl.fromdate))*12 +extract(month from age (pl.fromdate))) as month,
case
when prevExt.FULL_INC is not null then (ext.FULL_INC -coalesce(prevExt.FULL_INC,0))
else 0
end as difference,
(case when prevExt.FULL_INC is not null then (ext.FULL_INC - prevExt.FULL_INC) / prevExt.FULL_INC*100 else 0 end) as percent
from pl_payroll pl
inner join pl_extpayfile ext
on pl.cid = ext.payrollid
and ext.FULL_INC is not null
left outer join pl_extpayfile prevExt
on prevExt.employee = ext.employee
and prevExt.cid = (select …
Run Code Online (Sandbox Code Playgroud) 在我的freemarker页面中,我创建了4个选项卡.我想要的:如果用户在第4个标签中,那么他才能看到提交按钮.当他在第一,第二或第三个标签时,他可以看到下一个和上一个按钮.如何使用jquery或javascript在按钮单击上创建活动的下一个或上一个选项卡?任何人请帮忙......
<div class="tabbable">
<ul class="nav nav-tabs">
<li class="active"><a href="#declarations1" data-toggle="tab">Declarations</a></li>
<li><a href="#hradetails1" data-toggle="tab">HRA Details</a></li>
<#if IsHidePrevEmpITDeclaration?exists && IsHidePrevEmpITDeclaration != "true">
<li><a href="#preEmpSalary1" data-toggle="tab">Previous Employment Salary</a></li>
</#if>
<li><a href="#otherIncome1" data-toggle="tab">Other Income</a></li>
</ul>
</div>
Run Code Online (Sandbox Code Playgroud)
提前致谢...
我正在创建一个Extjs网格.其中大部分列都是可编辑的.我需要的是,如果用户更改模糊的任何列值,我将调用我的方法根据其他列值进行一些计算.并将列值替换为计算值.code在这里.
var incomeTaxOverrideModel = new Ext.grid.ColumnModel([{
id : 'fromDate',
header : "From Date",
dataIndex : 'fromDate',
width : 80,
renderer : drenderer,
editor : this.fromDateEditor
}, {
id : 'toDate',
header : "To Date",
dataIndex : 'toDate',
width : 80,
renderer : drenderer,
editor : this.toDateEditor
}, {
id : 'rawTax',
header : "Raw Tax",
dataIndex : 'rawTax',
width : 80,
align : 'right',
selectOnFocus : true,
editor : new Ext.form.NumberField({"blur":this.calculateTaxForword}),
renderer : Gts.payItemRenderer()
}, {
id : 'surcharge',
header …
Run Code Online (Sandbox Code Playgroud) 我正进入(状态
List<Map<String,Object>> listMap = [
{employee=17, fromdate=2010-08-01 00:00:00.0, full_inc=25572.0000},
{employee=17, fromdate=2010-09-01 00:00:00.0, full_inc=28347.0000},
{employee=17, fromdate=2010-10-01 00:00:00.0, full_inc=37471.0000},
{employee=17, fromdate=2011-02-01 00:00:00.0, full_inc=47033.0000},
{employee=17, fromdate=2011-07-01 00:00:00.0, full_inc=50592.0000}
]
Run Code Online (Sandbox Code Playgroud)
谁能帮我如何在java中根据full_inc从高到低对这个地图列表进行排序