问题: - 导入成功条数显示为负数 - 原因:成功数量计算使用 validRecords.size() - failures.size() - 但没有使用实际的数据库操作返回值 修复: - saveBatchWithUpsert 和 saveBatch 方法现在返回 int - 累加实际的数据库影响行数 - 使用 actualSuccessCount 变量跟踪真实成功数量 影响范围: - CcdiIntermediaryPersonImportServiceImpl - CcdiIntermediaryEntityImportServiceImpl
13 lines
536 B
JavaScript
13 lines
536 B
JavaScript
// Dates in zip file entries are stored as DosDateTime
|
|
// Spec is here: https://docs.microsoft.com/en-us/windows/win32/api/winbase/nf-winbase-dosdatetimetofiletime
|
|
|
|
module.exports = function parseDateTime(date, time) {
|
|
const day = date & 0x1F;
|
|
const month = date >> 5 & 0x0F;
|
|
const year = (date >> 9 & 0x7F) + 1980;
|
|
const seconds = time ? (time & 0x1F) * 2 : 0;
|
|
const minutes = time ? (time >> 5) & 0x3F : 0;
|
|
const hours = time ? (time >> 11): 0;
|
|
|
|
return new Date(Date.UTC(year, month-1, day, hours, minutes, seconds));
|
|
}; |