@ -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.cmd.shiftmanagement.toolkit.ShiftManagementToolKit ;
import com.engine.kq.util.ExcelUtil ;
import com.engine.kq.util.KQDurationCalculatorUtil ;
@ -87,7 +87,6 @@ public class ExportDailyExcelCmd extends AbstractCommonCommand<Map<String, Objec
showColumns . add ( "kqdate" ) ;
showColumns . add ( "serialid" ) ;
showColumns . removeIf ( showColumn - > showColumn . trim ( ) . equals ( "" ) ) ;
List < String > tmpShowColumns = new ArrayList < > ( ) ;
for ( String showColumn : showColumns ) {
tmpShowColumns . add ( showColumn ) ;
@ -176,20 +175,23 @@ public class ExportDailyExcelCmd extends AbstractCommonCommand<Map<String, Objec
titleList . add ( title ) ;
}
//刘浩 导出新增列[大夜班天数]-begin
title = new HashMap < > ( ) ;
title . put ( "title" , "大夜班天数" ) ;
title . put ( "width" , 30 * 256 ) ;
title . put ( "rowSpan" , 3 ) ;
titleList . add ( title ) ;
//刘浩 导出新增列[小夜班天数]-begin
title = new HashMap < > ( ) ;
title . put ( "title" , "小夜班天数" ) ;
title . put ( "width" , 30 * 256 ) ;
title . put ( "rowSpan" , 3 ) ;
titleList . add ( title ) ;
if ( showColumns . contains ( "nightdaysd" ) ) {
//刘浩 导出新增列[大夜班天数]-begin
title = new HashMap < > ( ) ;
title . put ( "title" , "大夜班天数" ) ;
title . put ( "width" , 30 * 256 ) ;
title . put ( "rowSpan" , 3 ) ;
titleList . add ( title ) ;
}
if ( showColumns . contains ( "nightdaysx" ) ) {
//刘浩 导出新增列[小夜班天数]-begin
title = new HashMap < > ( ) ;
title . put ( "title" , "小夜班天数" ) ;
title . put ( "width" , 30 * 256 ) ;
title . put ( "rowSpan" , 3 ) ;
titleList . add ( title ) ;
}
//刘浩 导出新增列[夜班天数]-end
sheet . put ( "titleList" , titleList ) ;
@ -462,7 +464,7 @@ public class ExportDailyExcelCmd extends AbstractCommonCommand<Map<String, Objec
double holidayOvertime_nonleave = Util . getDoubleValue ( Util . null2String ( flowData . get ( id + "|" + kqdate + "|holidayOvertime_nonleave" ) ) ) ;
holidayOvertime_nonleave = holidayOvertime_nonleave < 0 ? 0 : holidayOvertime_nonleave ;
fieldValue = KQDurationCalculatorUtil . getDurationRound ( String . valueOf ( workingDayOvertime_4leave + restDayOvertime_4leave + holidayOvertime_4leave +
workingDayOvertime_nonleave + restDayOvertime_nonleave + holidayOvertime_nonleave ) ) ;
workingDayOvertime_nonleave + restDayOvertime_nonleave + holidayOvertime_nonleave ) ) ;
data . add ( getFieldValueByUnitType ( fieldValue , kqReportFieldComInfo . getUnittype ( KQReportFieldComInfo . field2Id . get ( "overtimeTotal" ) ) ) ) ;
continue ;
} else if ( fieldName . equals ( "businessLeave" ) | | fieldName . equals ( "officialBusiness" ) ) {
@ -493,7 +495,7 @@ public class ExportDailyExcelCmd extends AbstractCommonCommand<Map<String, Objec
fieldValue = Util . null2String ( rs . getString ( fieldName ) ) ;
fieldValue = getFieldValueByUnitType ( fieldValue , kqReportFieldComInfo . getUnittype ( fieldid ) ) ;
}
if ( ! fieldName . equals ( "leave" ) ) {
fieldValue = Util . formatMultiLang ( fieldValue , "" + user . getLanguage ( ) ) ;
data . add ( fieldValue ) ;
@ -504,27 +506,29 @@ public class ExportDailyExcelCmd extends AbstractCommonCommand<Map<String, Objec
writeLog ( "howec-serialidx:::::::::" + serialidx ) ;
writeLog ( "howec-signintime1x:::::::::" + signintime1x ) ;
writeLog ( "howec-signouttime1x:::::::::" + signouttime1x ) ;
if ( serialidx . contains ( "值夜班" ) ) {
if ( ( ! "未打卡" . equals ( signintime1x ) ) & & ( ! "未打卡" . equals ( signouttime1x ) ) ) {
data . add ( "1" ) ;
if ( showColumns . contains ( "nightdaysd" ) ) {
if ( serialidx . contains ( "值夜班" ) ) {
if ( ( ! "未打卡" . equals ( signintime1x ) ) & & ( ! "未打卡" . equals ( signouttime1x ) ) ) {
data . add ( "1" ) ;
} else {
data . add ( "0" ) ;
}
} else {
data . add ( "0" ) ;
}
} else {
data . add ( "0" ) ;
}
// 刘浩 小夜班天数 --
if ( serialidx . contains ( "两班夜班" ) ) {
if ( ( ! "未打卡" . equals ( signintime1x ) ) & & ( ! "未打卡" . equals ( signouttime1x ) ) ) {
data . add ( "1" ) ;
if ( showColumns . contains ( "nightdaysx" ) ) {
if ( serialidx . contains ( "两班夜班" ) ) {
if ( ( ! "未打卡" . equals ( signintime1x ) ) & & ( ! "未打卡" . equals ( signouttime1x ) ) ) {
data . add ( "1" ) ;
} else {
data . add ( "0" ) ;
}
} else {
data . add ( "0" ) ;
}
} else {
data . add ( "0" ) ;
}
//刘浩 大小夜班天数 -- end
dataList . add ( data ) ;
}