protected override void FillBody() { if (null == AssetsData) { return; } for (int index = 0; index < AssetsData.Count; index++) { DiffResult main = AssetsData[index]; TempRow = Sheet.CreateRow(NextRowIndex); TempRow.CreateCell(0).SetCellValue(index + 1); TempRow.CreateCell(1).SetCellValue(main.DiffState); TempRow.CreateCell(2).SetCellValue(main.LocalState); TempRow.CreateCell(3).SetCellValue(main.LocalCode); TempRow.CreateCell(4).SetCellValue(main.LocalName); TempRow.CreateCell(5).SetCellValue(main.LocalValue.ToString()); TempRow.CreateCell(6).SetCellValue(main.LocalMode); TempRow.CreateCell(7).SetCellValue(main.BxState); TempRow.CreateCell(8).SetCellValue(main.BxCode); TempRow.CreateCell(9).SetCellValue(main.BxName); TempRow.CreateCell(10).SetCellValue(main.BxValue.ToString()); TempRow.CreateCell(11).SetCellValue(main.BxMode); TempRow.CreateCell(12).SetCellValue(main.DiffState); TempRow.CreateCell(13).SetCellValue(main.DtCode); TempRow.CreateCell(14).SetCellValue(main.DtName); TempRow.CreateCell(15).SetCellValue(main.DtValue.ToString()); TempRow.CreateCell(16).SetCellValue(main.DtMode); NextRowIndex++; Thread.Sleep(10); } }
/// <summary> /// 表格底部信息输出 /// </summary> protected override void BuildFooter() { TempRow = Sheet.CreateRow(NextRowIndex); // // 单位负责人签字 // TempCell = TempRow.CreateCell(0); TempCell.CellStyle = CommCellStyle; TempCell.SetCellValue(string.Format("单位负责人签字:")); Sheet.AddMergedRegion(new CellRangeAddress(NextRowIndex, NextRowIndex, 0, 1)); // // 填表人签字 // TempCell = TempRow.CreateCell(5); TempCell.CellStyle = CommCellStyle; TempCell.SetCellValue(string.Format("填表人签字:")); Sheet.AddMergedRegion(new CellRangeAddress(NextRowIndex, NextRowIndex, 5, 8)); // // 填表日期 // TempCell = TempRow.CreateCell(9); TempCell.CellStyle = CommCellStyle; TempCell.SetCellValue(string.Format("填表日期:")); Sheet.AddMergedRegion(new CellRangeAddress(NextRowIndex, NextRowIndex, 9, 10)); //TempCell = TempRow.CreateCell(0); //TempCell.CellStyle = FooterCellStyle; //TempCell.SetCellValue(string.Format("打印日期:{0}", DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"))); //Sheet.AddMergedRegion(new CellRangeAddress(NextRowIndex, NextRowIndex, 0, 5)); NextRowIndex++; }
protected override void BuildHeader() { TempRow = Sheet.CreateRow(NextRowIndex); TempRow.CreateCell(0).SetCellValue("序号"); TempRow.CreateCell(1).SetCellValue("资产名称"); TempRow.CreateCell(2).SetCellValue("固定资产分类代码(2010国标码)"); TempRow.CreateCell(3).SetCellValue("资产分类名称(可以不录)"); TempRow.CreateCell(4).SetCellValue("计量单位"); TempRow.CreateCell(5).SetCellValue("使用属性"); TempRow.CreateCell(6).SetCellValue("使用状况"); TempRow.CreateCell(7).SetCellValue("取得方式"); TempRow.CreateCell(8).SetCellValue("取得日期(2013-1-1)"); TempRow.CreateCell(9).SetCellValue("品牌及规格型号"); TempRow.CreateCell(10).SetCellValue("数量"); TempRow.CreateCell(11).SetCellValue("价值类型"); TempRow.CreateCell(12).SetCellValue("价值"); TempRow.CreateCell(13).SetCellValue("财政性资金"); TempRow.CreateCell(14).SetCellValue("非财政性资金"); TempRow.CreateCell(15).SetCellValue("折旧"); TempRow.CreateCell(16).SetCellValue("累计折旧"); TempRow.CreateCell(17).SetCellValue("净值"); TempRow.CreateCell(18).SetCellValue("入账日期(2013-1-1)"); TempRow.CreateCell(19).SetCellValue("会计凭证号"); TempRow.CreateCell(20).SetCellValue("备注"); NextRowIndex++; }
protected override void FillBody() { TempRow = Sheet.CreateRow(NextRowIndex); TempRow.CreateCell(0).SetCellValue("资产编码"); TempRow.CreateCell(1).SetCellValue("资产名称"); TempRow.CreateCell(2).SetCellValue("动态编码"); TempRow.CreateCell(4).SetCellValue("计量单位"); TempRow.CreateCell(5).SetCellValue("数量"); TempRow.CreateCell(6).SetCellValue("价值"); TempRow.CreateCell(7).SetCellValue("规格型号"); TempRow.CreateCell(8).SetCellValue("存放地点"); TempRow.CreateCell(9).SetCellValue("盘点结果"); NextRowIndex++; foreach (var detail in _inventoryDto.Details) { TempRow = Sheet.CreateRow(NextRowIndex); TempRow.CreateCell(0).SetCellValue(detail.AssetsNo); TempRow.CreateCell(1).SetCellValue(detail.GoodsName); TempRow.CreateCell(2).SetCellValue(detail.UsedNum1); TempRow.CreateCell(4).SetCellValue(detail.MeasurementUnits); TempRow.CreateCell(5).SetCellValue(detail.Counts); TempRow.CreateCell(6).SetCellValue(detail.Money.ToString()); TempRow.CreateCell(7).SetCellValue(detail.ModelSpecification); TempRow.CreateCell(8).SetCellValue(detail.StorePlace); TempRow.CreateCell(9).SetCellValue(detail.InventoryResult); NextRowIndex++; } }
protected override void FillBody() { NextRowIndex = 6; foreach (var item in _ledgerTems) { TempRow = Sheet.CreateRow(NextRowIndex); // TempRow.CreateCell(34); //TempRow.PhysicalNumberOfCreateCell TempRow.CreateCell(1).SetCellValue(item.GoodsName); //商品名称 TempRow.CreateCell(2).SetCellValue(item.AssetsNum); //资产编号 TempRow.CreateCell(3).SetCellValue(item.GetDate); //购置日期 TempRow.CreateCell(4).SetCellValue(item.Brand + item.ModelSpecification); //规格型号 TempRow.CreateCell(5).SetCellValue(item.InCount); //数量 TempRow.CreateCell(6).SetCellValue((item.InPrice).ToString()); //单价 FillMoney(TempRow, item.InMoney, 7); // TempRow.CreateCell(7).SetCellValue(item.InMoney); //购入或掉拨金额 TempRow.CreateCell(18).SetCellValue(item.StorePlace); //使用地点 TempRow.CreateCell(19).SetCellValue(item.UsePeople); //使用(保管)人 TempRow.CreateCell(20).SetCellValue(item.OutCount); //报废或转出 数量 //报废或转出 FillMoney(TempRow, item.OutMoney, 21); //报废或转出 金额 TempRow.CreateCell(32).SetCellValue(item.Count); //余额 数量 FillMoney(TempRow, item.Money, 33); //余额 金额 NextRowIndex++; Thread.Sleep(10); } // }
protected override void FillBody() { TempRow = Sheet.CreateRow(NextRowIndex); TempRow.CreateCell(0).SetCellValue("序号"); TempRow.CreateCell(1).SetCellValue("学校名称"); TempRow.CreateCell(2).SetCellValue("固定资产名称"); TempRow.CreateCell(3).SetCellValue("品牌"); TempRow.CreateCell(4).SetCellValue("规格型号"); TempRow.CreateCell(5).SetCellValue("数量"); TempRow.CreateCell(6).SetCellValue("报送时间"); NextRowIndex++; int index = 1; foreach (var detail in _scrapApplyDto.AssetsScrapAttribute) { TempRow = Sheet.CreateRow(NextRowIndex); TempRow.CreateCell(0).SetCellValue(index.ToString()); TempRow.CreateCell(1).SetCellValue(title); TempRow.CreateCell(2).SetCellValue(detail.GoodsName); TempRow.CreateCell(3).SetCellValue(detail.Brand); TempRow.CreateCell(4).SetCellValue(detail.ModelSpecification); TempRow.CreateCell(5).SetCellValue(detail.Counts); NextRowIndex++; index++; } }
protected override void BuildFooter() { TempRow = Sheet.CreateRow(NextRowIndex); TempCell = TempRow.CreateCell(0); TempCell.CellStyle = FooterCellStyle; TempCell.SetCellValue(string.Format("打印日期:{0}", DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"))); Sheet.AddMergedRegion(new CellRangeAddress(NextRowIndex, NextRowIndex, 0, 5)); NextRowIndex++; }
protected override void BuildFooter() { TempRow = Sheet.CreateRow(NextRowIndex); TempCell = TempRow.CreateCell(0); TempCell.CellStyle = FooterCellStyle; TempCell.SetCellValue("注:请各校打印此表加盖公章,需纸制文档与电子文档各一份。"); Sheet.AddMergedRegion(new CellRangeAddress(NextRowIndex, NextRowIndex, 0, 6)); NextRowIndex++; }
protected override void BuildTitle() { var title = AssetsType.GetCnName(); Sheet.CreateRow(NextRowIndex).CreateCell(0).SetCellValue(title); NextRowIndex++; TempRow = Sheet.CreateRow(NextRowIndex); TempRow.CreateCell(0).SetCellValue("单位名称:"); TempRow.CreateCell(1).SetCellValue("测试单位"); NextRowIndex++; }
protected override void BuildTitle() { TempRow = Sheet.CreateRow(NextRowIndex); TempCell = TempRow.CreateCell(0); TempCell.CellStyle = HeaderStyle; TempCell.SetCellValue("资产维修单"); //设置单元格的高度 TempRow.Height = 30 * 20; Sheet.AddMergedRegion(new CellRangeAddress(NextRowIndex, NextRowIndex, 0, 5)); NextRowIndex++; }
protected override void FillBody() { if (null == AssetsData) { return; } for (int index = 0; index < AssetsData.Count; index++) { AssetsMain main = AssetsData[index]; TempRow = Sheet.CreateRow(NextRowIndex); TempRow.CreateCell(0).SetCellValue(index + 1); TempRow.CreateCell(1).SetCellValue(main.GoodsName); TempRow.CreateCell(2).SetCellValue(main.CatCode); TempRow.CreateCell(3).SetCellValue(""); TempRow.CreateCell(4).SetCellValue(main.MeasurementUnits); TempRow.CreateCell(5).SetCellValue(main.UsingStyle); TempRow.CreateCell(6).SetCellValue(main.UsingState); TempRow.CreateCell(7).SetCellValue(main.GetWay); TempRow.CreateCell(8).SetCellValue(main.GetDate.ToShortDateString()); var attrData = AssetsService.GetLand(main.AssetsNum); if (null != attrData) { TempRow.CreateCell(9).SetCellValue(attrData.PropertyForm); TempRow.CreateCell(10).SetCellValue(attrData.OwnershipCertificate); TempRow.CreateCell(11).SetCellValue(attrData.OwnershipStyle); TempRow.CreateCell(12).SetCellValue(attrData.OwnershipTime); TempRow.CreateCell(13).SetCellValue(attrData.OwnershipCertifiateNum); TempRow.CreateCell(14).SetCellValue(attrData.IssuingDate.ToShortDateString()); TempRow.CreateCell(15).SetCellValue(attrData.LandOwner); TempRow.CreateCell(16).SetCellValue(attrData.LandUserStyle); TempRow.CreateCell(17).SetCellValue(attrData.Location); TempRow.CreateCell(18).SetCellValue(attrData.AllArea.ToString()); TempRow.CreateCell(19).SetCellValue(attrData.SharingArea.ToString()); TempRow.CreateCell(20).SetCellValue(attrData.SingleArea.ToString()); } TempRow.CreateCell(21).SetCellValue(main.ValueType); TempRow.CreateCell(22).SetCellValue(main.Money.ToString()); TempRow.CreateCell(23).SetCellValue(main.GovMoney.ToString()); TempRow.CreateCell(24).SetCellValue(main.NoneGovMoney.ToString()); TempRow.CreateCell(25).SetCellValue(""); TempRow.CreateCell(26).SetCellValue(""); TempRow.CreateCell(27).SetCellValue(main.NetWorth.ToString()); TempRow.CreateCell(28).SetCellValue(main.PostingDate.ToShortDateString()); TempRow.CreateCell(29).SetCellValue(main.AcountDocNum); TempRow.CreateCell(30).SetCellValue(""); TempRow.CreateCell(31).SetCellValue(main.Memo); NextRowIndex++; Thread.Sleep(10); } }
protected override void BuildHeader() { TempRow = Sheet.CreateRow(NextRowIndex); TempCell = TempRow.CreateCell(0); TempCell.CellStyle = CommCellStyle; TempCell.SetCellValue(string.Format("编号:{0}", _borrowDto.BorrowInfo.EntityId.ToString().PadLeft(8, '0'))); Sheet.AddMergedRegion(new CellRangeAddress(NextRowIndex, NextRowIndex, 0, 1)); TempCell = TempRow.CreateCell(2); TempCell.CellStyle = CommCellStyle; TempCell.SetCellValue(string.Format("借用日期:{0}", _borrowDto.BorrowInfo.BorrowDate.ToString("yyyy-MM-dd"))); Sheet.AddMergedRegion(new CellRangeAddress(NextRowIndex, NextRowIndex, 2, 3)); TempCell = TempRow.CreateCell(4); TempCell.CellStyle = CommCellStyle; TempCell.SetCellValue(string.Format("预计归还日期:{0}", _borrowDto.BorrowInfo.BorrowLong.ToString("yyyy-MM-dd"))); Sheet.AddMergedRegion(new CellRangeAddress(NextRowIndex, NextRowIndex, 4, 5)); NextRowIndex++; TempRow = Sheet.CreateRow(NextRowIndex); TempCell = TempRow.CreateCell(0); TempCell.CellStyle = CommCellStyle; TempCell.SetCellValue(string.Format("借用人:{0}", _borrowDto.BorrowInfo.BorrowPerson)); Sheet.AddMergedRegion(new CellRangeAddress(NextRowIndex, NextRowIndex, 0, 1)); TempCell = TempRow.CreateCell(2); TempCell.CellStyle = CommCellStyle; TempCell.SetCellValue(string.Format("所在部门:{0}", _borrowDto.BorrowInfo.BorrowDeparitment)); Sheet.AddMergedRegion(new CellRangeAddress(NextRowIndex, NextRowIndex, 2, 3)); TempCell = TempRow.CreateCell(4); TempCell.CellStyle = CommCellStyle; TempCell.SetCellValue(string.Format("联系方式:{0}", _borrowDto.BorrowInfo.BorrowPersonPhone)); Sheet.AddMergedRegion(new CellRangeAddress(NextRowIndex, NextRowIndex, 4, 5)); //设置单元格的宽度 Sheet.SetColumnWidth(0, 20 * 256); Sheet.SetColumnWidth(1, 20 * 256); Sheet.SetColumnWidth(2, 20 * 256); Sheet.SetColumnWidth(3, 20 * 256); Sheet.SetColumnWidth(4, 20 * 256); Sheet.SetColumnWidth(5, 20 * 256); NextRowIndex++; TempRow = Sheet.CreateRow(NextRowIndex); TempRow.CreateCell(0).SetCellValue(string.Format("借用用途:{0}", _borrowDto.BorrowInfo.BorrowUse)); Sheet.AddMergedRegion(new CellRangeAddress(NextRowIndex, NextRowIndex, 0, 5)); NextRowIndex++; }
protected override void FillBody() { if (null == AssetsData) { return; } for (int index = 0; index < AssetsData.Count; index++) { AssetsMain main = AssetsData[index]; TempRow = Sheet.CreateRow(NextRowIndex); TempRow.CreateCell(0).SetCellValue(index + 1); TempRow.CreateCell(1).SetCellValue(main.GoodsName); TempRow.CreateCell(2).SetCellValue(main.CatCode); TempRow.CreateCell(3).SetCellValue(""); TempRow.CreateCell(4).SetCellValue(main.MeasurementUnits); TempRow.CreateCell(5).SetCellValue(main.UsingAttribute); TempRow.CreateCell(6).SetCellValue(main.UsingStyle); TempRow.CreateCell(7).SetCellValue(main.UsingState); TempRow.CreateCell(8).SetCellValue(main.GetWay); var attrData = AssetsService.GetCar(main.AssetsNum); if (null != attrData) { TempRow.CreateCell(9).SetCellValue(attrData.CarUser); TempRow.CreateCell(10).SetCellValue(attrData.UsingType); TempRow.CreateCell(11).SetCellValue(attrData.CarBrand); TempRow.CreateCell(12).SetCellValue(attrData.Organization); TempRow.CreateCell(13).SetCellValue(attrData.CarNum); TempRow.CreateCell(14).SetCellValue(attrData.CarRecCode); TempRow.CreateCell(15).SetCellValue(attrData.CarCertificateDate.ToShortDateString()); TempRow.CreateCell(16).SetCellValue(attrData.CarExhaust); TempRow.CreateCell(17).SetCellValue(attrData.CarEngineNum); TempRow.CreateCell(18).SetCellValue(attrData.CarErollDare.ToShortDateString()); TempRow.CreateCell(19).SetCellValue(attrData.CarOwner); } TempRow.CreateCell(20).SetCellValue(main.ValueType); TempRow.CreateCell(21).SetCellValue(main.Money.ToString()); TempRow.CreateCell(22).SetCellValue(main.GovMoney.ToString()); TempRow.CreateCell(23).SetCellValue(main.NoneGovMoney.ToString()); TempRow.CreateCell(24).SetCellValue(main.Depreciation.ToString()); TempRow.CreateCell(25).SetCellValue(main.AccumulateDepreciation.ToString()); TempRow.CreateCell(26).SetCellValue(main.NetWorth.ToString()); TempRow.CreateCell(27).SetCellValue(main.PostingDate.ToShortDateString()); TempRow.CreateCell(28).SetCellValue(main.AcountDocNum); TempRow.CreateCell(29).SetCellValue(main.Memo); NextRowIndex++; Thread.Sleep(10); } }
protected override void BuildTitle() { TempRow = Sheet.CreateRow(NextRowIndex); TempCell = TempRow.CreateCell(0); TempCell.CellStyle = HeaderStyle; TempCell.SetCellValue("海淀区行政事业单位国有资产处理明细表"); //设置单元格的高度 TempRow.Height = 30 * 20; IFont font = Workbook.CreateFont(); font.FontName = "宋体"; font.FontHeightInPoints = 19; font.Boldweight = (short)FontBoldWeight.Bold; TempCell.CellStyle.SetFont(font); Sheet.AddMergedRegion(new CellRangeAddress(NextRowIndex, NextRowIndex, 0, 10)); NextRowIndex++; }
protected override void BuildHeader() { TempRow = Sheet.CreateRow(NextRowIndex); TempCell = TempRow.CreateCell(0); TempCell.CellStyle = CommCellStyle; //TempCell.SetCellValue(string.Format("学校公章:")); Sheet.AddMergedRegion(new CellRangeAddress(NextRowIndex, NextRowIndex, 0, 1)); //设置单元格的宽度 //Sheet.SetColumnWidth(0, 20 * 10); //设置单元格的宽度 Sheet.SetColumnWidth(1, 20 * 256); Sheet.SetColumnWidth(2, 20 * 300); Sheet.SetColumnWidth(4, 20 * 300); NextRowIndex++; }
protected override void BuildHeader() { TempRow = Sheet.CreateRow(NextRowIndex); TempCell = TempRow.CreateCell(0); TempCell.CellStyle = CommCellStyle; TempCell.SetCellValue(string.Format("编号:{0}", _acquireDto.AquairInfo.EntityId.ToString().PadLeft(8, '0'))); Sheet.AddMergedRegion(new CellRangeAddress(NextRowIndex, NextRowIndex, 0, 1)); TempCell = TempRow.CreateCell(2); TempCell.CellStyle = CommCellStyle; TempCell.SetCellValue(string.Format("领用日期:{0}", _acquireDto.AquairInfo.AcquireDate.ToString("yyyy-MM-dd"))); Sheet.AddMergedRegion(new CellRangeAddress(NextRowIndex, NextRowIndex, 2, 3)); TempCell = TempRow.CreateCell(4); TempCell.CellStyle = CommCellStyle; TempCell.SetCellValue(string.Format("退还日期:{0}", _acquireDto.AquairInfo.SendBackDate.ToString("yyyy-MM-dd"))); Sheet.AddMergedRegion(new CellRangeAddress(NextRowIndex, NextRowIndex, 4, 5)); NextRowIndex++; TempRow = Sheet.CreateRow(NextRowIndex); TempCell = TempRow.CreateCell(0); TempCell.CellStyle = CommCellStyle; TempCell.SetCellValue(string.Format("退还人:{0}", _acquireDto.AquairInfo.SendBackPerson)); Sheet.AddMergedRegion(new CellRangeAddress(NextRowIndex, NextRowIndex, 0, 1)); /*TempCell = TempRow.CreateCell(2); * TempCell.CellStyle = CommCellStyle; * TempCell.SetCellValue(string.Format("联系方式:{0}", _borrowDto.BorrowInfo.re)); * Sheet.AddMergedRegion(new CellRangeAddress(NextRowIndex, NextRowIndex, 4, 5));*/ //设置单元格的宽度 Sheet.SetColumnWidth(0, 20 * 256); Sheet.SetColumnWidth(1, 20 * 256); Sheet.SetColumnWidth(2, 20 * 256); Sheet.SetColumnWidth(3, 20 * 256); Sheet.SetColumnWidth(4, 20 * 256); Sheet.SetColumnWidth(5, 20 * 256); NextRowIndex++; TempRow = Sheet.CreateRow(NextRowIndex); TempRow.CreateCell(0).SetCellValue(string.Format("退还说明:{0}", _acquireDto.AquairInfo.SendBackMemo)); Sheet.AddMergedRegion(new CellRangeAddress(NextRowIndex, NextRowIndex, 0, 5)); NextRowIndex++; }
protected override void BuildHeader() { TempRow = Sheet.CreateRow(NextRowIndex); TempCell = TempRow.CreateCell(0); TempCell.CellStyle = CommCellStyle; TempCell.SetCellValue(string.Format("编号:{0}", _repairDto.RepairInfo.EntityId.ToString().PadLeft(8, '0'))); Sheet.AddMergedRegion(new CellRangeAddress(NextRowIndex, NextRowIndex, 0, 1)); TempCell = TempRow.CreateCell(2); TempCell.CellStyle = CommCellStyle; TempCell.SetCellValue(string.Format("报修日期:{0}", _repairDto.RepairInfo.RepairDate.ToString("yyyy-MM-dd"))); Sheet.AddMergedRegion(new CellRangeAddress(NextRowIndex, NextRowIndex, 2, 3)); TempCell = TempRow.CreateCell(4); TempCell.CellStyle = CommCellStyle; TempCell.SetCellValue(string.Format("维修日期:{0}", _repairDto.RepairInfo.ServicesDate.ToString("yyyy-MM-dd"))); Sheet.AddMergedRegion(new CellRangeAddress(NextRowIndex, NextRowIndex, 4, 5)); NextRowIndex++; TempRow = Sheet.CreateRow(NextRowIndex); TempCell = TempRow.CreateCell(0); TempCell.CellStyle = CommCellStyle; TempCell.SetCellValue(string.Format("维修人:{0}", _repairDto.RepairInfo.ServicesPerson)); Sheet.AddMergedRegion(new CellRangeAddress(NextRowIndex, NextRowIndex, 0, 1)); TempCell = TempRow.CreateCell(2); TempCell.CellStyle = CommCellStyle; TempCell.SetCellValue(string.Format("联系方式:{0}", _repairDto.RepairInfo.ServicesPersonPhone)); Sheet.AddMergedRegion(new CellRangeAddress(NextRowIndex, NextRowIndex, 2, 3)); //设置单元格的宽度 Sheet.SetColumnWidth(0, 20 * 256); Sheet.SetColumnWidth(1, 20 * 256); Sheet.SetColumnWidth(2, 20 * 256); Sheet.SetColumnWidth(3, 20 * 256); Sheet.SetColumnWidth(4, 20 * 256); Sheet.SetColumnWidth(5, 20 * 256); NextRowIndex++; TempRow = Sheet.CreateRow(NextRowIndex); TempRow.CreateCell(0).SetCellValue(string.Format("维修说明:{0}", _repairDto.RepairInfo.ServicesMemo)); Sheet.AddMergedRegion(new CellRangeAddress(NextRowIndex, NextRowIndex, 0, 5)); NextRowIndex++; }
protected override void FillBody() { if (null == AssetsData) return; for(int index=0;index<AssetsData.Count;index++) { AssetsMain main = AssetsData[index]; TempRow = Sheet.CreateRow(NextRowIndex); TempRow.CreateCell(0).SetCellValue(index+1); //序号 TempRow.CreateCell(1).SetCellValue(main.GoodsName); //资产名称 TempRow.CreateCell(2).SetCellValue(main.CatCode); //资产分类代码 TempRow.CreateCell(3).SetCellValue(""); //资产分类名称 TempRow.CreateCell(4).SetCellValue(main.MeasurementUnits);//计量单位 TempRow.CreateCell(5).SetCellValue(main.UsingAttribute); //使用属性 TempRow.CreateCell(6).SetCellValue(main.UsingState); //使用状况 TempRow.CreateCell(7).SetCellValue(main.UsingStyle); //使用方向 TempRow.CreateCell(8).SetCellValue(main.GetWay); //取得方式 TempRow.CreateCell(9).SetCellValue(main.GetDate.ToShortDateString()); //取得时期 var attrData = AssetsService.GetBook(main.AssetsNum); if (null != attrData) { TempRow.CreateCell(10).SetCellValue(attrData.UseDate.ToShortTimeString());//投入使用日期 TempRow.CreateCell(11).SetCellValue(attrData.FileNum); //档案号 TempRow.CreateCell(12).SetCellValue(attrData.Press);//出版社 TempRow.CreateCell(13).SetCellValue(attrData.StoreYears);//保存年限 TempRow.CreateCell(14).SetCellValue(attrData.PressDate.ToShortTimeString()); //出版日期 } TempRow.CreateCell(15).SetCellValue(main.Counts); TempRow.CreateCell(16).SetCellValue(main.ValueType); TempRow.CreateCell(17).SetCellValue(main.Money.ToString()); TempRow.CreateCell(18).SetCellValue(main.GovMoney.ToString()); TempRow.CreateCell(19).SetCellValue(main.NoneGovMoney.ToString()); TempRow.CreateCell(20).SetCellValue(main.Depreciation.ToString()); TempRow.CreateCell(21).SetCellValue(main.AccumulateDepreciation.ToString()); TempRow.CreateCell(22).SetCellValue(main.NetWorth.ToString()); TempRow.CreateCell(23).SetCellValue(main.PostingDate.ToShortDateString()); TempRow.CreateCell(24).SetCellValue(main.AcountDocNum); TempRow.CreateCell(25).SetCellValue(main.Memo); //("备注"); NextRowIndex++; Thread.Sleep(10); } }
/// <summary> /// 填充数据到表格并给出进度 /// </summary> /// <param name="progressinfo"></param> protected override void FillBody(ref ProgressInfo progressinfo) { if (null == _ScrapMerge) { return; } TempRow = Sheet.CreateRow(NextRowIndex); // 使用属性0 TempRow.CreateCell(0).SetCellValue(_ScrapMerge.type); // // 换行 // NextRowIndex++; Thread.Sleep(10); }
/// <summary> /// 填充数据到表格并给出进度 /// </summary> /// <param name="progressinfo"></param> protected override void FillBody(ref ProgressInfo progressinfo) { if (null == _AssetsMain) { return; } TempRow = Sheet.CreateRow(NextRowIndex); // 使用属性0 TempRow.CreateCell(0).SetCellValue(_AssetsMain.CatCode); // // 换行 // NextRowIndex++; Thread.Sleep(10); }
protected override void FillBody() { if (null == AssetsData) { return; } for (int index = 0; index < AssetsData.Count; index++) { AssetsMain main = AssetsData[index]; TempRow = Sheet.CreateRow(NextRowIndex); TempRow.CreateCell(0).SetCellValue(index + 1); TempRow.CreateCell(1).SetCellValue(main.GoodsName); TempRow.CreateCell(2).SetCellValue(main.CatCode); TempRow.CreateCell(3).SetCellValue(""); TempRow.CreateCell(4).SetCellValue(main.MeasurementUnits); TempRow.CreateCell(5).SetCellValue(main.UsingAttribute); TempRow.CreateCell(6).SetCellValue(main.UsingStyle); TempRow.CreateCell(7).SetCellValue(main.UsingState); TempRow.CreateCell(8).SetCellValue(main.GetWay); TempRow.CreateCell(9).SetCellValue(main.GetDate.ToShortDateString()); TempRow.CreateCell(10).SetCellValue(main.Brand); var attrData = AssetsService.GetGeneral(main.AssetsNum); if (null != attrData) { TempRow.CreateCell(11).SetCellValue(attrData.DevUse); TempRow.CreateCell(10).SetCellValue(attrData.DevFactory + "-" + main.Brand); } TempRow.CreateCell(12).SetCellValue(main.ValueType); TempRow.CreateCell(13).SetCellValue(main.Money.ToString()); TempRow.CreateCell(14).SetCellValue(main.GovMoney.ToString()); TempRow.CreateCell(15).SetCellValue(main.NoneGovMoney.ToString()); TempRow.CreateCell(16).SetCellValue(main.Depreciation.ToString()); TempRow.CreateCell(17).SetCellValue(main.AccumulateDepreciation.ToString()); TempRow.CreateCell(18).SetCellValue(main.NetWorth.ToString()); TempRow.CreateCell(19).SetCellValue(main.PostingDate.ToShortDateString()); TempRow.CreateCell(20).SetCellValue(main.AcountDocNum); TempRow.CreateCell(21).SetCellValue(""); NextRowIndex++; Thread.Sleep(10); } }
protected override void BuildHeader() { TempRow = Sheet.CreateRow(NextRowIndex); TempCell = TempRow.CreateCell(0); TempCell.CellStyle = CommCellStyle; TempCell.SetCellValue(string.Format("编号:{0}", _inventoryDto.InventoryInfo.EntityId.ToString().PadLeft(8, '0'))); Sheet.AddMergedRegion(new CellRangeAddress(NextRowIndex, NextRowIndex, 0, 1)); TempCell = TempRow.CreateCell(2); TempCell.CellStyle = CommCellStyle; TempCell.SetCellValue(string.Format("盘点日期:{0}", _inventoryDto.InventoryInfo.InventoryOperationDate.ToString("yyyy-MM-dd"))); Sheet.AddMergedRegion(new CellRangeAddress(NextRowIndex, NextRowIndex, 2, 3)); TempCell = TempRow.CreateCell(4); TempCell.CellStyle = CommCellStyle; TempCell.SetCellValue(string.Format("盘点人:{0}", _inventoryDto.InventoryInfo.InventoryOperationPerson)); Sheet.AddMergedRegion(new CellRangeAddress(NextRowIndex, NextRowIndex, 4, 5)); NextRowIndex++; TempRow = Sheet.CreateRow(NextRowIndex); TempCell = TempRow.CreateCell(0); TempCell.CellStyle = CommCellStyle; TempCell.SetCellValue(string.Format("盘点部门:{0}", _inventoryDto.InventoryInfo.InventoryDepartment)); Sheet.AddMergedRegion(new CellRangeAddress(NextRowIndex, NextRowIndex, 0, 1)); TempCell = TempRow.CreateCell(2); TempCell.CellStyle = CommCellStyle; TempCell.SetCellValue(string.Format("操作部门:{0}", _inventoryDto.InventoryInfo.InventoryOperationDepartment)); Sheet.AddMergedRegion(new CellRangeAddress(NextRowIndex, NextRowIndex, 2, 3)); //TempCell.SetCellValue(string.Format("联系方式:{0}", _inventoryDto.InventoryInfo.)); //Sheet.AddMergedRegion(new CellRangeAddress(NextRowIndex, NextRowIndex, 2, 3)); //设置单元格的宽度 Sheet.SetColumnWidth(0, 20 * 256); Sheet.SetColumnWidth(1, 20 * 256); Sheet.SetColumnWidth(2, 20 * 256); Sheet.SetColumnWidth(3, 20 * 256); Sheet.SetColumnWidth(4, 20 * 256); Sheet.SetColumnWidth(5, 20 * 256); NextRowIndex++; }
protected override void FillBody() { TempRow = Sheet.CreateRow(NextRowIndex); TempRow.CreateCell(0).SetCellValue("资产编码"); TempRow.CreateCell(1).SetCellValue("资产名称"); TempRow.CreateCell(2).SetCellValue("资产类别"); TempRow.CreateCell(3).SetCellValue("价格"); TempRow.CreateCell(4).SetCellValue("数量"); TempRow.CreateCell(5).SetCellValue("退还状态"); NextRowIndex++; foreach (var detail in _acquireDto.Details) { TempRow = Sheet.CreateRow(NextRowIndex); TempRow.CreateCell(0).SetCellValue(detail.AssetsNo); TempRow.CreateCell(1).SetCellValue(detail.GoodsName); TempRow.CreateCell(2).SetCellValue(detail.CatCode); TempRow.CreateCell(3).SetCellValue(detail.Price.ToString()); TempRow.CreateCell(4).SetCellValue(detail.MeasurementUnits); TempRow.CreateCell(5).SetCellValue(detail.SendBackState); NextRowIndex++; } }
protected override void FillBody() { TempRow = Sheet.CreateRow(NextRowIndex); TempRow.CreateCell(0).SetCellValue("资产编码"); TempRow.CreateCell(1).SetCellValue("资产名称"); TempRow.CreateCell(2).SetCellValue("资产类别"); TempRow.CreateCell(3).SetCellValue("单价"); TempRow.CreateCell(4).SetCellValue("计量单位"); TempRow.CreateCell(5).SetCellValue("数量"); NextRowIndex++; foreach (var detail in _borrowDto.Details) { TempRow = Sheet.CreateRow(NextRowIndex); TempRow.CreateCell(0).SetCellValue(detail.AssetsNo); TempRow.CreateCell(1).SetCellValue(detail.GoodsName); TempRow.CreateCell(2).SetCellValue(detail.CatCode); TempRow.CreateCell(3).SetCellValue(detail.Price.ToString()); TempRow.CreateCell(4).SetCellValue(detail.MeasurementUnits); TempRow.CreateCell(5).SetCellValue(detail.BorrowCounts); NextRowIndex++; } }
protected override void FillBody() { TempRow = Sheet.CreateRow(NextRowIndex); TempRow.CreateCell(0).SetCellValue("序号"); TempRow.CreateCell(1).SetCellValue("资产名称"); TempRow.CreateCell(2).SetCellValue("资产编号"); TempRow.CreateCell(3).SetCellValue("购置年月"); TempRow.CreateCell(4).SetCellValue("型号"); TempRow.CreateCell(5).SetCellValue("数量"); TempRow.CreateCell(6).SetCellValue("单价(元)"); TempRow.CreateCell(7).SetCellValue("原值(元)"); TempRow.CreateCell(8).SetCellValue("现值(元)"); TempRow.CreateCell(9).SetCellValue("备注"); TempRow.CreateCell(10).SetCellValue("处置单编号"); NextRowIndex++; int index = 1; foreach (var detail in _scrapApplyDto.AssetsScrapAttribute) { TempRow = Sheet.CreateRow(NextRowIndex); TempRow.CreateCell(0).SetCellValue(index.ToString()); TempRow.CreateCell(1).SetCellValue(detail.GoodsName); TempRow.CreateCell(2).SetCellValue(detail.UsedNum1); TempRow.CreateCell(3).SetCellValue(detail.GetDate.ToShortDateString()); TempRow.CreateCell(4).SetCellValue(detail.ModelSpecification); TempRow.CreateCell(5).SetCellValue(detail.Counts); TempRow.CreateCell(6).SetCellValue((detail.Money / detail.Counts).ToString()); TempRow.CreateCell(7).SetCellValue(detail.Money.ToString()); TempRow.CreateCell(8).SetCellValue(detail.NetWorth.ToString()); TempRow.CreateCell(9).SetCellValue(detail.Memo); TempRow.CreateCell(10).SetCellValue(detail.AssetsNum); NextRowIndex++; index++; } }
protected override void BuildHeader() { TempRow = Sheet.CreateRow(NextRowIndex); TempRow.CreateCell(0).SetCellValue("序号"); TempRow.CreateCell(1).SetCellValue("资产名称"); TempRow.CreateCell(2).SetCellValue("固定资产分类代码(2010国标码)"); TempRow.CreateCell(3).SetCellValue("资产分类名称(可以不录)"); TempRow.CreateCell(4).SetCellValue("计量单位"); TempRow.CreateCell(5).SetCellValue("使用属性"); TempRow.CreateCell(6).SetCellValue("使用状况"); TempRow.CreateCell(7).SetCellValue("取得方式"); TempRow.CreateCell(8).SetCellValue("取得日期(2013-1-1)"); TempRow.CreateCell(9).SetCellValue("产权形式"); TempRow.CreateCell(10).SetCellValue("权属证明(有产权填)"); TempRow.CreateCell(11).SetCellValue("权属证号(有产权填)"); TempRow.CreateCell(12).SetCellValue("权属年限(月数,有产权填)"); TempRow.CreateCell(13).SetCellValue("发证日期(有产权填)"); TempRow.CreateCell(14).SetCellValue("房屋所有权人(有产权填)"); TempRow.CreateCell(15).SetCellValue("设计用途"); TempRow.CreateCell(16).SetCellValue("建筑结构"); TempRow.CreateCell(17).SetCellValue("坐落位置"); TempRow.CreateCell(18).SetCellValue("建筑面积(平米)"); TempRow.CreateCell(19).SetCellValue("价值类型"); TempRow.CreateCell(20).SetCellValue("价值"); TempRow.CreateCell(21).SetCellValue("财政性资金"); TempRow.CreateCell(22).SetCellValue("非财政性资金"); TempRow.CreateCell(23).SetCellValue("折旧"); TempRow.CreateCell(24).SetCellValue("累计折旧"); TempRow.CreateCell(25).SetCellValue("净值"); TempRow.CreateCell(26).SetCellValue("入账日期(2013-1-1)"); TempRow.CreateCell(27).SetCellValue("会计凭证号"); TempRow.CreateCell(28).SetCellValue("备注"); NextRowIndex++; }
protected override void BuildHeader() { TempRow = Sheet.CreateRow(NextRowIndex); TempRow.CreateCell(0).SetCellValue("序号"); TempRow.CreateCell(1).SetCellValue("资产名称"); TempRow.CreateCell(2).SetCellValue("固定资产分类代码(2010国标码)"); TempRow.CreateCell(3).SetCellValue("资产分类名称(可以不录)"); TempRow.CreateCell(4).SetCellValue("计量单位"); TempRow.CreateCell(5).SetCellValue("使用属性"); TempRow.CreateCell(6).SetCellValue("使用状况"); TempRow.CreateCell(7).SetCellValue("取得方式"); TempRow.CreateCell(8).SetCellValue("车辆用途"); TempRow.CreateCell(9).SetCellValue("使用性质"); TempRow.CreateCell(10).SetCellValue("品牌型号"); TempRow.CreateCell(11).SetCellValue("编制情况"); TempRow.CreateCell(12).SetCellValue("机动号牌号码(车牌号)"); TempRow.CreateCell(13).SetCellValue("机动车辆识别代号(车架号)"); TempRow.CreateCell(14).SetCellValue("机动车辆行驶证发证日期(2013-1-1)"); TempRow.CreateCell(15).SetCellValue("机动车排气量(升)"); TempRow.CreateCell(16).SetCellValue("机动车发动机号"); TempRow.CreateCell(17).SetCellValue("机动车行驶证注册登记日期(2013-1-1)"); TempRow.CreateCell(18).SetCellValue("机动车辆行驶证所有人"); TempRow.CreateCell(19).SetCellValue("价值类型"); TempRow.CreateCell(20).SetCellValue("价值"); TempRow.CreateCell(21).SetCellValue("财政性资金"); TempRow.CreateCell(22).SetCellValue("非财政性资金"); TempRow.CreateCell(23).SetCellValue("折旧"); TempRow.CreateCell(24).SetCellValue("累计折旧"); TempRow.CreateCell(25).SetCellValue("净值"); TempRow.CreateCell(26).SetCellValue("入账日期(2013-1-1)"); TempRow.CreateCell(27).SetCellValue("会计凭证号"); TempRow.CreateCell(28).SetCellValue("备注"); NextRowIndex++; }
protected override void BuildHeader() { TempRow = Sheet.CreateRow(NextRowIndex); TempCell = TempRow.CreateCell(0); TempCell.CellStyle = CommCellStyle; TempCell.SetCellValue(string.Format("填报单位名称(公章):")); Sheet.AddMergedRegion(new CellRangeAddress(NextRowIndex, NextRowIndex, 0, 1)); // // 单位名称 // TempCell = TempRow.CreateCell(2); TempCell.CellStyle = CommCellStyle; TempCell.SetCellValue(title); Sheet.AddMergedRegion(new CellRangeAddress(NextRowIndex, NextRowIndex, 2, 4)); // 合并单元格 // // 编号 // //TempRow = Sheet.CreateRow(NextRowIndex); TempCell = TempRow.CreateCell(8); TempCell.CellStyle = CommCellStyle; TempCell.SetCellValue(string.Format("编号:")); Sheet.AddMergedRegion(new CellRangeAddress(NextRowIndex, NextRowIndex, 8, 9)); //设置单元格的宽度 //Sheet.SetColumnWidth(0, 20 * 10); // 序号 Sheet.SetColumnWidth(1, 20 * 300); // 资产名称 Sheet.SetColumnWidth(2, 20 * 256); // 资产名称 Sheet.SetColumnWidth(3, 20 * 256); // 资产名称 Sheet.SetColumnWidth(4, 20 * 256); // 规格型号 Sheet.SetColumnWidth(11, 20 * 300); // 处置单编号 NextRowIndex++; }
protected override void FillBody() { if (null == AssetsData) { return; } for (int index = 0; index < AssetsData.Count; index++) { AssetsMain main = AssetsData[index]; TempRow = Sheet.CreateRow(NextRowIndex); // 使用属性0 TempRow.CreateCell(0).SetCellValue(main.UsingAttribute); // 资产编号1 TempRow.CreateCell(1).SetCellValue(main.AssetsNum); // 资产分类代码2 TempRow.CreateCell(2).SetCellValue(main.CatCode); // 资产分类名称3 TempRow.CreateCell(3).SetCellValue(""); // 资产名称4 TempRow.CreateCell(4).SetCellValue(main.GoodsName); // 计量单位5 TempRow.CreateCell(5).SetCellValue(main.MeasurementUnits); // 数量6 TempRow.CreateCell(6).SetCellValue(main.Counts); // 品牌及规格型号7 TempRow.CreateCell(7).SetCellValue(main.ModelSpecification); // 使用性质32 TempRow.CreateCell(32).SetCellValue(""); // 取得方式9 TempRow.CreateCell(9).SetCellValue(main.UsingStyle); // 使用状况10 TempRow.CreateCell(10).SetCellValue(main.UsingState); // 使用方向11 TempRow.CreateCell(11).SetCellValue(""); // 使用人12 TempRow.CreateCell(12).SetCellValue(main.UsePeople); // 价值类型13 TempRow.CreateCell(13).SetCellValue(main.ValueType); // 价值14 TempRow.CreateCell(14).SetCellValue(main.Money.ToString()); // 财政性资金15 TempRow.CreateCell(15).SetCellValue(main.GovMoney.ToString()); // 非财政性资金16 TempRow.CreateCell(16).SetCellValue(main.NoneGovMoney.ToString()); // 净值17 TempRow.CreateCell(17).SetCellValue(main.NetWorth.ToString()); // 取得日期19 TempRow.CreateCell(19).SetCellValue(main.GetDate.ToShortDateString()); // 使用管理部门20 TempRow.CreateCell(20).SetCellValue(main.UseDepartment); // 入账形式21 TempRow.CreateCell(21).SetCellValue(""); // 入账科目22 TempRow.CreateCell(22).SetCellValue(""); // 入账日期23 TempRow.CreateCell(23).SetCellValue(main.PostingDate.ToShortDateString()); // 会计凭证号24 TempRow.CreateCell(24).SetCellValue(main.AcountDocNum); // 存放地点25 TempRow.CreateCell(25).SetCellValue(main.StorePlace); // 备注56 TempRow.CreateCell(56).SetCellValue(main.Memo); // 附属信息 if (string.IsNullOrEmpty(main.CatCode)) { NextRowIndex++; continue; } var @type = main.CatCode.GetAssetsTypeByCatCode(); switch (@type) { case AssetsTypes.Land: // // // var attrData = AssetsService.GetLand(main.AssetsNum); if (null != attrData) { ////////////////////////////////////////////////////////////////// // 土地 ////////////////////////////////////////////////////////////////// // 产权形式39 TempRow.CreateCell(39).SetCellValue(attrData.PropertyForm); // 权属证明40 TempRow.CreateCell(40).SetCellValue(attrData.OwnershipCertificate); // 权属性质45 TempRow.CreateCell(45).SetCellValue(attrData.OwnershipStyle); // 权属年限38 TempRow.CreateCell(38).SetCellValue(attrData.OwnershipTime); // 权属证号44 TempRow.CreateCell(44).SetCellValue(attrData.OwnershipCertifiateNum); // 发证日期36 TempRow.CreateCell(36).SetCellValue(attrData.IssuingDate.ToShortDateString()); // 土地使用权人46 TempRow.CreateCell(46).SetCellValue(attrData.LandOwner); // 土地使用权类型41 TempRow.CreateCell(41).SetCellValue(attrData.LandUserStyle); // 地类(用途)48 // 坐落位置55 TempRow.CreateCell(55).SetCellValue(attrData.Location); // 土地使用权面积42 TempRow.CreateCell(42).SetCellValue(attrData.AllArea.ToString()); // 独用面积53 TempRow.CreateCell(53).SetCellValue(attrData.SingleArea.ToString()); // 分摊面积54 TempRow.CreateCell(54).SetCellValue(attrData.SharingArea.ToString()); ////////////////////////////////////////////////////////////////// // 土地 ////////////////////////////////////////////////////////////////// } break; case AssetsTypes.Car: // // // var carAttr = AssetsService.GetCar(main.AssetsNum); if (null != carAttr) { ////////////////////////////////////////////////////////////////// // 车辆 ////////////////////////////////////////////////////////////////// // 编制情况8 TempRow.CreateCell(8).SetCellValue(carAttr.Organization); // 行驶证注册登记日期18 TempRow.CreateCell(18).SetCellValue(carAttr.CarErollDare); // 号牌号码27 TempRow.CreateCell(27).SetCellValue(carAttr.CarNum); // 发动机号码28 TempRow.CreateCell(28).SetCellValue(carAttr.CarEngineNum); // 车辆识别代号(车架号)29 TempRow.CreateCell(29).SetCellValue(carAttr.CarRecCode); // 排气量30 TempRow.CreateCell(30).SetCellValue(carAttr.CarExhaust); // 车辆行驶证所有人31 TempRow.CreateCell(31).SetCellValue(carAttr.CarOwner); // 车辆用途50 TempRow.CreateCell(50).SetCellValue(carAttr.CarUser); ////////////////////////////////////////////////////////////////// // 车辆 ////////////////////////////////////////////////////////////////// } break; case AssetsTypes.Building: // // // var buildAttr = AssetsService.GetBuilding(main.AssetsNum); if (null != buildAttr) { ////////////////////////////////////////////////////////////////// // 构筑物 ////////////////////////////////////////////////////////////////// // 产权形式39 TempRow.CreateCell(39).SetCellValue(buildAttr.PropertyForm); // 权属证号44 TempRow.CreateCell(44).SetCellValue(buildAttr.OwnershipCertifiateNum); // 坐落位置55 TempRow.CreateCell(55).SetCellValue(buildAttr.Location); ////////////////////////////////////////////////////////////////// // 构筑物 ////////////////////////////////////////////////////////////////// } break; case AssetsTypes.Culturalrelic: // // // var culturaAttr = AssetsService.GetCulturalrelic(main.AssetsNum); if (null != culturaAttr) { ////////////////////////////////////////////////////////////////// // 文物 ////////////////////////////////////////////////////////////////// // 文物等级33 TempRow.CreateCell(33).SetCellValue(culturaAttr.GoodsLevel); // 藏品年代34 TempRow.CreateCell(34).SetCellValue(culturaAttr.Years); // 来源地/产地35 TempRow.CreateCell(35).SetCellValue(culturaAttr.SourcePlace); ////////////////////////////////////////////////////////////////// // 文物 ////////////////////////////////////////////////////////////////// } break; case AssetsTypes.Animalandplant: // // // var animalAttr = AssetsService.GetAnimalandplant(main.AssetsNum); if (null != animalAttr) { ////////////////////////////////////////////////////////////////// // 特种动植物 ////////////////////////////////////////////////////////////////// // 来源地/产地35 TempRow.CreateCell(35).SetCellValue(animalAttr.Palce); ////////////////////////////////////////////////////////////////// // 特种动植物 ////////////////////////////////////////////////////////////////// } break; case AssetsTypes.Furniture: break; case AssetsTypes.GeneralEquipment: // // // var GenaalAttr = AssetsService.GetGeneral(main.AssetsNum); if (null != GenaalAttr) { ////////////////////////////////////////////////////////////////// // 通用设备 ////////////////////////////////////////////////////////////////// // 设备用途49 TempRow.CreateCell(49).SetCellValue(GenaalAttr.DevUse); // 生产厂家26 TempRow.CreateCell(26).SetCellValue(GenaalAttr.DevFactory); ////////////////////////////////////////////////////////////////// // 通用设备 ////////////////////////////////////////////////////////////////// } break; case AssetsTypes.House: // // // var houseAttr = AssetsService.GetHouse(main.AssetsNum); if (null != houseAttr) { ////////////////////////////////////////////////////////////////// // 房屋 ////////////////////////////////////////////////////////////////// // 产权形式39 TempRow.CreateCell(39).SetCellValue(houseAttr.PropertyForm); // 权属证明40 TempRow.CreateCell(40).SetCellValue(houseAttr.OwnershipCertificate); // 权属证号44 TempRow.CreateCell(44).SetCellValue(houseAttr.OwnershipCertifiateNum); // 权属年限38 TempRow.CreateCell(38).SetCellValue(houseAttr.OwnershipTime); // 发证日期36 TempRow.CreateCell(36).SetCellValue(houseAttr.IssuingDate.ToShortDateString()); // 房屋所有权人47 TempRow.CreateCell(47).SetCellValue(houseAttr.HouseOwner); // 设计用途51 TempRow.CreateCell(51).SetCellValue(houseAttr.DesignUse); // 建筑结构52 TempRow.CreateCell(52).SetCellValue(houseAttr.BuildingStruccture); // 坐落位置55 TempRow.CreateCell(55).SetCellValue(houseAttr.Location); // 建筑面积43 TempRow.CreateCell(43).SetCellValue(houseAttr.Area.ToString()); ////////////////////////////////////////////////////////////////// // 房屋 ////////////////////////////////////////////////////////////////// } break; case AssetsTypes.SpecialEquipment: // // // var specialAttr = AssetsService.GetSpecial(main.AssetsNum); if (null != specialAttr) { ////////////////////////////////////////////////////////////////// // 专用设备 ////////////////////////////////////////////////////////////////// // 生产厂家26 TempRow.CreateCell(26).SetCellValue(specialAttr.DevFactory); ////////////////////////////////////////////////////////////////// // 专用设备 ////////////////////////////////////////////////////////////////// } break; case AssetsTypes.Book: // // // var bookAttr = AssetsService.GetBook(main.AssetsNum); if (null != bookAttr) { ////////////////////////////////////////////////////////////////// // 图书 ////////////////////////////////////////////////////////////////// // 投入使用日期37 TempRow.CreateCell(37).SetCellValue(bookAttr.UseDate.ToShortDateString()); ////////////////////////////////////////////////////////////////// // 图书 ////////////////////////////////////////////////////////////////// } break; } // // 换行 // NextRowIndex++; Thread.Sleep(10); } }
protected override void FillBody() { if (null == AssetsData) { return; } for (int index = 0; index < AssetsData.Count; index++) { AssetsMain main = AssetsData[index]; TempRow = Sheet.CreateRow(NextRowIndex); TempRow.CreateCell(0).SetCellValue(index + 1); TempRow.CreateCell(1).SetCellValue(main.GoodsName); TempRow.CreateCell(2).SetCellValue(main.CatCode); TempRow.CreateCell(3).SetCellValue(""); TempRow.CreateCell(4).SetCellValue(main.MeasurementUnits); // // 使用属性 // if (!string.IsNullOrEmpty(main.UsingAttribute)) { TempRow.CreateCell(5).SetCellValue(main.UsingAttribute); } else { TempRow.CreateCell(5).SetCellValue("01|办公设备"); } // // 使用状况 // if (!string.IsNullOrEmpty(main.UsingState)) { TempRow.CreateCell(6).SetCellValue(main.UsingState); } else { TempRow.CreateCell(6).SetCellValue("01|在用"); } // // 使用方向 // if (!string.IsNullOrEmpty(main.UsingStyle)) { TempRow.CreateCell(7).SetCellValue(main.UsingState); } else { TempRow.CreateCell(7).SetCellValue("01|自用"); } // // 取得方式 // if (!string.IsNullOrEmpty(main.GetWay)) { TempRow.CreateCell(8).SetCellValue(main.GetWay); } else { TempRow.CreateCell(8).SetCellValue("01|购置"); } // // 取得日期 // if (!string.IsNullOrEmpty(main.GetDate.ToShortDateString())) { TempRow.CreateCell(9).SetCellValue(main.GetDate.ToShortDateString()); } else { TempRow.CreateCell(9).SetCellValue(DateTime.Now.ToShortDateString()); } var attrData = AssetsService.GetAnimalandplant(main.AssetsNum); if (null != attrData) { TempRow.CreateCell(10).SetCellValue(attrData.Birthday.ToShortDateString()); TempRow.CreateCell(11).SetCellValue(attrData.Age); TempRow.CreateCell(12).SetCellValue(attrData.Class); TempRow.CreateCell(13).SetCellValue(attrData.Palce); } // // 取得方式 // if (main.Counts > 0) { TempRow.CreateCell(14).SetCellValue(main.Counts); } else { TempRow.CreateCell(14).SetCellValue("01|购置"); } TempRow.CreateCell(19).SetCellValue(main.Counts); TempRow.CreateCell(19).SetCellValue(main.ValueType); TempRow.CreateCell(20).SetCellValue(main.Money.ToString()); TempRow.CreateCell(21).SetCellValue(main.GovMoney.ToString()); TempRow.CreateCell(22).SetCellValue(main.NoneGovMoney.ToString()); TempRow.CreateCell(26).SetCellValue(main.PostingDate.ToShortDateString()); TempRow.CreateCell(27).SetCellValue(main.AcountDocNum); TempRow.CreateCell(28).SetCellValue(main.AssetsNum); NextRowIndex++; Thread.Sleep(10); } }