@ -457,6 +459,33 @@ public class ExportExcelCmd extends AbstractCommonCommand<Map<String, Object>> {
date=DateUtil.getDate(cal.getTime(),1);
date=DateUtil.getDate(cal.getTime(),1);
}
}
}
}
//刘浩 新增夜班天数
Stringresourceid=id;
if(map99!=null&&map99.keySet().size()>0){
Strings1="";
for(Strings99:map99.keySet()){
s1=s1+"'"+s99+"',";
}
s1=s1.substring(0,s1.length()-1);
Stringsql88="select b.resourceid,b.signintime,b.signouttime,b.serialid from kq_format_detail b where b.resourceid = "+resourceid+" and b.signintime is not null and b.signouttime is not null "+
" and b.signintime !='' and b.signouttime !='' "+
" and b.kqdate in("+s1+") and b.serialid in (3,5,6)";
Stringsql99="select count(b.resourceid) as sums from kq_format_detail b where b.resourceid = "+resourceid+" and b.signintime is not null and b.signouttime is not null "+
" and b.signintime !='' and b.signouttime !='' "+
" and b.kqdate in("+s1+") and b.serialid in (3,5,6)";
// new KQLog().info("id:"+id+":detialDatas:"+detialDatas);
// new KQLog().info("id:"+id+":detialDatas:"+detialDatas);
isEnd=false;
isEnd=false;
for(Stringdate=fromDate;!isEnd;){
for(Stringdate=fromDate;!isEnd;){
if(date.equals(toDate))isEnd=true;
if(date.equals(toDate))isEnd=true;
if(DateUtil.compDate(today,date)>0){
if(DateUtil.compDate(today,date)>0){
@ -482,6 +496,43 @@ public class GetKQReportCmd extends AbstractCommonCommand<Map<String, Object>> {
cal.setTime(DateUtil.parseToDate(date));
cal.setTime(DateUtil.parseToDate(date));
date=DateUtil.getDate(cal.getTime(),1);
date=DateUtil.getDate(cal.getTime(),1);
}
}
//liuhao 夜班天数
//刘浩 拿到日期 计算天数----begin
List<String>listdate=newArrayList<>();
SimpleDateFormatsdf=newSimpleDateFormat();
sdf.applyPattern("yyyy-MM-dd");
for(Stringkey99:data.keySet()){
try{
Datedate=sdf.parse(key99);
listdate.add(key99);
}catch(ParseExceptione){}
}
Stringresourceid=(String)data.get("resourceId");
if(listdate!=null&&listdate.size()>0){
Strings1="";
for(Stringstrdate:listdate){
s1=s1+"'"+strdate+"',";
}
s1=s1.substring(0,s1.length()-1);
Stringsql88="select b.resourceid,b.signintime,b.signouttime,b.serialid from kq_format_detail b where b.resourceid = "+resourceid+" and b.signintime is not null and b.signouttime is not null "+
" and b.signintime !='' and b.signouttime !='' "+
" and b.kqdate in("+s1+") and b.serialid in (3,5,6)";
Stringsql99="select count(b.resourceid) as sums from kq_format_detail b where b.resourceid = "+resourceid+" and b.signintime is not null and b.signouttime is not null "+
" and b.signintime !='' and b.signouttime !='' "+
" and b.kqdate in("+s1+") and b.serialid in (3,5,6)";