@ -5,7 +5,7 @@ import com.alibaba.fastjson.JSONObject;
import com.engine.common.biz.AbstractCommonCommand ;
import com.engine.common.entity.BizLogContext ;
import com.engine.core.interceptor.CommandContext ;
import com.engine.kq.biz. * ;
import com.engine.kq.biz. KQReportBiz ;
import com.engine.kq.util.ExcelUtil ;
import com.engine.kq.util.KQDurationCalculatorUtil ;
import com.engine.kq.util.UtilKQ ;
@ -143,6 +143,9 @@ public class ExportExcelCmd extends AbstractCommonCommand<Map<String, Object>> {
if ( "leave" . equalsIgnoreCase ( kqReportFieldComInfo . getFieldname ( ) ) & & leaveRules . size ( ) = = 0 ) {
continue ;
}
if ( "nightdaysd" . equals ( kqReportFieldComInfo . getFieldname ( ) ) | | "nightdaysx" . equals ( kqReportFieldComInfo . getFieldname ( ) ) ) {
continue ;
}
title = new HashMap < > ( ) ;
String unitType = KQReportBiz . getUnitType ( kqReportFieldComInfo , user ) ;
if ( unitType . length ( ) > 0 ) {
@ -191,18 +194,24 @@ public class ExportExcelCmd extends AbstractCommonCommand<Map<String, Object>> {
}
titleList . add ( title ) ;
}
if ( showColumns . contains ( "nightdaysd" ) ) {
//刘浩 新增一列[大夜班天数]
title = new HashMap ( ) ;
title . put ( "title" , "大夜班天数" ) ;
title . put ( "width" , 30 * 256 ) ;
title . put ( "rowSpan" , 3 ) ;
titleList . add ( title ) ;
}
if ( showColumns . contains ( "nightdaysx" ) ) {
//刘浩 新增一列[小夜班天数]
title = new HashMap ( ) ;
title . put ( "title" , "小夜班天数" ) ;
title . put ( "width" , 30 * 256 ) ;
title . put ( "rowSpan" , 3 ) ;
titleList . add ( title ) ;
}
sheet . put ( "titleList" , titleList ) ;
@ -296,6 +305,9 @@ public class ExportExcelCmd extends AbstractCommonCommand<Map<String, Object>> {
String fieldName = lsFieldDataKey . get ( fieldDataKeyIdx ) ;
String fieldid = KQReportFieldComInfo . field2Id . get ( fieldName ) ;
String fieldValue = "" ;
if ( fieldName . equals ( "nightdaysx" ) | | fieldName . equals ( "nightdaysd" ) ) {
continue ;
}
if ( fieldName . equals ( "subcompany" ) ) {
String tmpSubcompanyId = Util . null2String ( rs . getString ( "subcompanyid" ) ) ;
if ( tmpSubcompanyId . length ( ) = = 0 ) {
@ -509,7 +521,10 @@ public class ExportExcelCmd extends AbstractCommonCommand<Map<String, Object>> {
if ( rs99 . next ( ) ) {
counts99 = String . valueOf ( rs99 . getInt ( "sums" ) ) ;
}
if ( showColumns . contains ( "nightdaysd" ) ) {
data . add ( counts99 ) ;
}
//刘浩--小夜班天数统计
sql88 = "select b.resourceid,b.signintime,b.signouttime,b.serialid from kq_format_detail b inner join kq_ShiftManagement c on c.id = b.serialid where b.resourceid = " + resourceid + " and b.signintime is not null and b.signouttime is not null " +
@ -525,12 +540,17 @@ public class ExportExcelCmd extends AbstractCommonCommand<Map<String, Object>> {
if ( rs99 . next ( ) ) {
counts99 = String . valueOf ( rs99 . getInt ( "sums" ) ) ;
}
if ( showColumns . contains ( "nightdaysx" ) ) {
data . add ( counts99 ) ;
}
} else {
if ( showColumns . contains ( "nightdaysd" ) ) {
data . add ( "0" ) ;
}
if ( showColumns . contains ( "nightdaysx" ) ) {
data . add ( "0" ) ;
}
}
dataList . add ( data ) ;
}
sheet . put ( "dataList" , dataList ) ;