module.exports=(async (wb) => {
    var sheet = wb.getWorksheet(6);
    var insertrows = [];
    sheet.eachRow({ includeEmpty: true }, function (row, rowNumber) {
        if (rowNumber >= 5 && rowNumber <= 41) {
            row.eachCell({ includeEmpty: true }, function (cell, colNumber) {
                if (colNumber == 3) {
                    if (typeof cell.value == "object") {
                        desc="";
                        cell.value.richText.forEach(element => {
                            desc += element.text.replace(" ","");
                        });
                    } else {
                        desc = cell.value.replace(" ","");
                    }
                    cachetmp=desc;
                    
                }
                if (colNumber == 4) {
                    desc=cachetmp+"/资产原值";
                }
                if (colNumber == 5) {
                    desc=cachetmp+"/本年折旧、摊销额";
                }
                if (colNumber == 6) {
                    desc+="/累计折旧、摊销额";
                }
                if (colNumber == 7) {
                    desc=cachetmp+"/资产计税基础";
                }
                if (colNumber == 8) {
                    desc=cachetmp+"/税收折旧、摊销额";
                }
                if (colNumber == 9) {
                    desc=cachetmp+"/享受加速折旧政策的资产按税收一般规定计算的折旧、摊销额";
                }
                if (colNumber == 10) {
                    desc=cachetmp+"/加速折旧、摊销统计额";
                }
                if (colNumber == 11) {
                    desc=cachetmp+"/ 累计折旧、摊销额";
                }
                if (colNumber == 12) {
                    desc=cachetmp+"/ 纳税调整金额";
                }
                if (colNumber >=4 && colNumber <=12) {
                    var colpos=colNumber-3;
                    var buildRow = {};
                    buildRow.rpttypecode = "ITY_COST";
                    buildRow.valstr = cell.value?(typeof cell.value=="object"?cell.value.result:cell.value):"0";
                    buildRow.desc = desc;
                    buildRow.position = rowNumber + "-" + colpos;
                    insertrows.push(buildRow);
                }
            });
        }
    });
    return insertrows;
});