|
|
|
|
@ -1,5 +1,6 @@
|
|
|
|
|
namespace BLL
|
|
|
|
|
{
|
|
|
|
|
using System;
|
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
using System.Data;
|
|
|
|
|
using System.Linq;
|
|
|
|
|
@ -40,6 +41,10 @@
|
|
|
|
|
{
|
|
|
|
|
htmlStr = GetSendCardHtml(id);
|
|
|
|
|
}
|
|
|
|
|
else if (menuId == Const.ProjectCostManageMenuId)
|
|
|
|
|
{
|
|
|
|
|
htmlStr = GetCostManageHtml(id);
|
|
|
|
|
}
|
|
|
|
|
if (!string.IsNullOrEmpty(htmlStr))
|
|
|
|
|
{
|
|
|
|
|
string filename = name + Funs.GetNewFileName();
|
|
|
|
|
@ -1769,5 +1774,170 @@
|
|
|
|
|
return sb.ToString();
|
|
|
|
|
}
|
|
|
|
|
#endregion
|
|
|
|
|
|
|
|
|
|
#region 安全费用
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 导出方法
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="grid"></param>
|
|
|
|
|
/// <returns></returns>
|
|
|
|
|
public static string GetCostManageHtml(string costManageId)
|
|
|
|
|
{
|
|
|
|
|
StringBuilder sb = new StringBuilder();
|
|
|
|
|
var getCostManage = CostManageService.GetCostManageById(costManageId);
|
|
|
|
|
if (getCostManage != null)
|
|
|
|
|
{
|
|
|
|
|
sb.Append("<meta http-equiv=\"content-type\" content=\"application/word; charset=UTF-8\"/>");
|
|
|
|
|
sb.Append("<table width=\"100% \" cellspacing=\"0\" rules=\"all\" border=\"1\" style=\"border-collapse:collapse;font-size: 10pt;\">");
|
|
|
|
|
sb.Append("<tr style=\"height: 35px\">");
|
|
|
|
|
sb.AppendFormat("<td align=\"center\" colspan=\"6\" style=\"width: 100%; font-size: 12pt; font-weight: bold;border-right: none;border-left: none;border-bottom: none;border-top: none; \">{0}</td> ", "分包HSE费用申请表");
|
|
|
|
|
sb.Append("</tr>");
|
|
|
|
|
|
|
|
|
|
sb.Append("<tr style=\"height: 35px\">");
|
|
|
|
|
sb.AppendFormat("<td align=\"center\" colspan=\"2\" >{0}</td> ", "项目名称");
|
|
|
|
|
sb.AppendFormat("<td align=\"center\" colspan=\"4\" >{0}</td> ", BLL.ProjectService.GetProjectNameByProjectId(getCostManage.ProjectId));
|
|
|
|
|
sb.Append("</tr>");
|
|
|
|
|
|
|
|
|
|
sb.Append("<tr style=\"height: 35px\">");
|
|
|
|
|
sb.AppendFormat("<td align=\"center\" colspan=\"2\" >{0}</td> ", "分包单位名称");
|
|
|
|
|
sb.AppendFormat("<td align=\"center\" colspan=\"4\" >{0}</td> ", BLL.UnitService.GetUnitNameByUnitId(getCostManage.UnitId));
|
|
|
|
|
sb.Append("</tr>");
|
|
|
|
|
|
|
|
|
|
sb.Append("<tr style=\"height: 35px\">");
|
|
|
|
|
sb.AppendFormat("<td align=\"center\" colspan=\"2\" >{0}</td> ", "合同号");
|
|
|
|
|
sb.AppendFormat("<td align=\"center\" >{0}</td> ", getCostManage.ContractNum);
|
|
|
|
|
sb.AppendFormat("<td align=\"center\" >{0}</td> ", "申请日期");
|
|
|
|
|
sb.AppendFormat("<td align=\"center\" colspan=\"2\" >{0}</td> ", string.Format("{0:yyyy-MM-dd}", getCostManage.CostManageDate));
|
|
|
|
|
sb.Append("</tr>");
|
|
|
|
|
|
|
|
|
|
sb.Append("<tr style=\"height: 35px\">");
|
|
|
|
|
sb.AppendFormat("<td align=\"center\" colspan=\"2\" >{0}</td> ", "HSE费用总金额(元)");
|
|
|
|
|
sb.AppendFormat("<td align=\"center\" >{0}</td> ", ProjectUnitService.GetSumHSECost(getCostManage.ProjectId, getCostManage.UnitId).ToString());
|
|
|
|
|
sb.AppendFormat("<td align=\"center\" >{0}</td> ", "已支付的HSE费用(元)");
|
|
|
|
|
sb.AppendFormat("<td align=\"center\" colspan=\"2\" >{0}</td> ", CostManageService.GetSumHSECost(getCostManage.ProjectId, getCostManage.UnitId, costManageId).ToString());
|
|
|
|
|
sb.Append("</tr>");
|
|
|
|
|
|
|
|
|
|
sb.Append("<tr style=\"height: 35px\">");
|
|
|
|
|
sb.AppendFormat("<td align=\"center\" colspan=\"6\" >{0}</td> ", "本次申请HSE费用明细");
|
|
|
|
|
sb.Append("</tr>");
|
|
|
|
|
|
|
|
|
|
sb.Append("<tr style=\"height: 35px\">");
|
|
|
|
|
sb.AppendFormat("<td align=\"center\" rowspan=\"2\" style=\"width: 10%; \" >{0}</td> ", "序号");
|
|
|
|
|
sb.AppendFormat("<td align=\"center\" colspan=\"3\" >{0}</td> ", "费用分项明细");
|
|
|
|
|
sb.AppendFormat("<td align=\"center\" rowspan=\"2\" style=\"width: 20%; \" >{0}</td> ", "费用(元)");
|
|
|
|
|
sb.AppendFormat("<td align=\"center\" rowspan=\"2\" >{0}</td> ", "备注");
|
|
|
|
|
sb.Append("</tr>");
|
|
|
|
|
|
|
|
|
|
sb.Append("<tr style=\"height: 35px\">");
|
|
|
|
|
sb.AppendFormat("<td align=\"center\" style=\"width: 15%; \" >{0}</td> ", "类别名称");
|
|
|
|
|
sb.AppendFormat("<td align=\"center\" style=\"width: 20%; \" >{0}</td> ", "分项名称");
|
|
|
|
|
sb.AppendFormat("<td align=\"center\" style=\"width: 15%; \" >{0}</td> ", "子项名称");
|
|
|
|
|
sb.Append("</tr>");
|
|
|
|
|
var getItem = BLL.CostManageItemService.GetCostManageItemByCostManageId(costManageId);
|
|
|
|
|
int i = 1;
|
|
|
|
|
foreach (var item in getItem)
|
|
|
|
|
{
|
|
|
|
|
sb.Append("<tr style=\"height: 35px\">");
|
|
|
|
|
sb.AppendFormat("<td align=\"center\" >{0}</td> ", i.ToString());
|
|
|
|
|
sb.AppendFormat("<td align=\"center\" >{0}</td> ", item.SupCostTypeName);
|
|
|
|
|
sb.AppendFormat("<td align=\"center\" >{0}</td> ", item.CostTypeName);
|
|
|
|
|
sb.AppendFormat("<td align=\"center\" >{0}</td> ", item.InvestCostProject);
|
|
|
|
|
sb.AppendFormat("<td align=\"center\" >{0}</td> ", item.PriceMoney.ToString());
|
|
|
|
|
sb.AppendFormat("<td align=\"center\" >{0}</td> ","");
|
|
|
|
|
sb.Append("</tr>");
|
|
|
|
|
i++;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
string opinin1 = string.Empty;string date1 = string.Empty;string signatureName1 = string.Empty;
|
|
|
|
|
var getFlow1 = Funs.DB.CostGoods_CostManageFlowOperate.FirstOrDefault(x => x.CostManageId == costManageId && x.SortIndex == 1);
|
|
|
|
|
if (getFlow1 != null)
|
|
|
|
|
{
|
|
|
|
|
opinin1 = getFlow1.Opinion;
|
|
|
|
|
date1 = string.Format("{0:yyyy-MM-dd}", getFlow1.OperaterTime);
|
|
|
|
|
signatureName1 = Person_PersonsService.getSignatureName(getFlow1.OperaterId);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
sb.Append("<tr style=\"height: 35px\">");
|
|
|
|
|
sb.AppendFormat("<td align=\"left\" colspan=\"6\" style=\"border-bottom: none;\" >{0}</td> ", "分包单位项目经理意见:");
|
|
|
|
|
sb.Append("</tr>");
|
|
|
|
|
sb.Append("<tr style=\"height: 35px\">");
|
|
|
|
|
sb.AppendFormat("<td align=\"left\" colspan=\"6\" style=\"border-top: none;border-bottom: none;\" >{0}</td> ", " " + opinin1);
|
|
|
|
|
sb.Append("</tr>");
|
|
|
|
|
|
|
|
|
|
sb.Append("<tr style=\"height: 35px\">");
|
|
|
|
|
sb.AppendFormat("<td align=\"right\" colspan=\"4\" style=\"border-top: none;border-right: none;\">{0}</td> ", "签字:" + signatureName1 + " ");
|
|
|
|
|
sb.AppendFormat("<td align=\"right\" colspan=\"2\" style=\"border-top: none;border-left: none;\">{0}</td> ", "日期:" + date1 + " ");
|
|
|
|
|
sb.Append("</tr>");
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
string opinin2 = string.Empty; string date2 = string.Empty; string signatureName2 = string.Empty;
|
|
|
|
|
var getFlow2 = Funs.DB.CostGoods_CostManageFlowOperate.FirstOrDefault(x => x.CostManageId == costManageId && x.SortIndex == 2);
|
|
|
|
|
if (getFlow2 != null)
|
|
|
|
|
{
|
|
|
|
|
opinin2 = getFlow2.Opinion;
|
|
|
|
|
date2 = string.Format("{0:yyyy-MM-dd}", getFlow2.OperaterTime);
|
|
|
|
|
signatureName2 = Person_PersonsService.getSignatureName(getFlow2.OperaterId);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
sb.Append("<tr style=\"height: 35px\">");
|
|
|
|
|
sb.AppendFormat("<td align=\"left\" colspan=\"6\" style=\"border-bottom: none;\" >{0}</td> ", "总包单位项目HSE经理意见:");
|
|
|
|
|
sb.Append("</tr>");
|
|
|
|
|
sb.Append("<tr style=\"height: 35px\">");
|
|
|
|
|
sb.AppendFormat("<td align=\"left\" colspan=\"6\" style=\"border-top: none;border-bottom: none;\" >{0}</td> ", " " + opinin2);
|
|
|
|
|
sb.Append("</tr>");
|
|
|
|
|
|
|
|
|
|
sb.Append("<tr style=\"height: 35px\">");
|
|
|
|
|
sb.AppendFormat("<td align=\"right\" colspan=\"4\" style=\"border-top: none;border-right: none;\">{0}</td> ", "签字:" + signatureName2 + " ");
|
|
|
|
|
sb.AppendFormat("<td align=\"right\" colspan=\"2\" style=\"border-top: none;border-left: none;\">{0}</td> ", "日期:" + date2 + " ");
|
|
|
|
|
sb.Append("</tr>");
|
|
|
|
|
|
|
|
|
|
string opinin3 = string.Empty; string date3 = string.Empty; string signatureName3 = string.Empty;
|
|
|
|
|
var getFlow3 = Funs.DB.CostGoods_CostManageFlowOperate.FirstOrDefault(x => x.CostManageId == costManageId && x.SortIndex == 3);
|
|
|
|
|
if (getFlow3 != null)
|
|
|
|
|
{
|
|
|
|
|
opinin3 = getFlow3.Opinion;
|
|
|
|
|
date3 = string.Format("{0:yyyy-MM-dd}", getFlow3.OperaterTime);
|
|
|
|
|
signatureName3 = Person_PersonsService.getSignatureName(getFlow3.OperaterId);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
sb.Append("<tr style=\"height: 35px\">");
|
|
|
|
|
sb.AppendFormat("<td align=\"left\" colspan=\"6\" style=\"border-bottom: none;\" >{0}</td> ", "总包单位项目控制经理意见:");
|
|
|
|
|
sb.Append("</tr>");
|
|
|
|
|
sb.Append("<tr style=\"height: 35px\">");
|
|
|
|
|
sb.AppendFormat("<td align=\"left\" colspan=\"6\" style=\"border-top: none;border-bottom: none;\" >{0}</td> ", " " + opinin3);
|
|
|
|
|
sb.Append("</tr>");
|
|
|
|
|
|
|
|
|
|
sb.Append("<tr style=\"height: 35px\">");
|
|
|
|
|
sb.AppendFormat("<td align=\"right\" colspan=\"4\" style=\"border-top: none;border-right: none;\">{0}</td> ", "签字:" + signatureName3 + " ");
|
|
|
|
|
sb.AppendFormat("<td align=\"right\" colspan=\"2\" style=\"border-top: none;border-left: none;\">{0}</td> ", "日期:" + date3 + " ");
|
|
|
|
|
sb.Append("</tr>");
|
|
|
|
|
|
|
|
|
|
string opinin4 = string.Empty; string date4 = string.Empty; string signatureName4 = string.Empty;
|
|
|
|
|
var getFlow4 = Funs.DB.CostGoods_CostManageFlowOperate.FirstOrDefault(x => x.CostManageId == costManageId && x.SortIndex == 4);
|
|
|
|
|
if (getFlow4 != null)
|
|
|
|
|
{
|
|
|
|
|
opinin4 = getFlow4.Opinion;
|
|
|
|
|
date4 = string.Format("{0:yyyy-MM-dd}", getFlow4.OperaterTime);
|
|
|
|
|
signatureName4 = Person_PersonsService.getSignatureName(getFlow4.OperaterId);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
sb.Append("<tr style=\"height: 35px\">");
|
|
|
|
|
sb.AppendFormat("<td align=\"left\" colspan=\"6\" style=\"border-bottom: none;\" >{0}</td> ", "总包单位项目经理意见:");
|
|
|
|
|
sb.Append("</tr>");
|
|
|
|
|
sb.Append("<tr style=\"height: 35px\">");
|
|
|
|
|
sb.AppendFormat("<td align=\"left\" colspan=\"6\" style=\"border-top: none;border-bottom: none;\" >{0}</td> ", " " + opinin4);
|
|
|
|
|
sb.Append("</tr>");
|
|
|
|
|
|
|
|
|
|
sb.Append("<tr style=\"height: 35px\">");
|
|
|
|
|
sb.AppendFormat("<td align=\"right\" colspan=\"4\" style=\"border-top: none;border-right: none;\">{0}</td> ", "签字:" + signatureName4 + " ");
|
|
|
|
|
sb.AppendFormat("<td align=\"right\" colspan=\"2\" style=\"border-top: none;border-left: none;\">{0}</td> ", "日期:" + date4 + " ");
|
|
|
|
|
sb.Append("</tr>");
|
|
|
|
|
|
|
|
|
|
sb.Append("</table>");
|
|
|
|
|
}
|
|
|
|
|
return sb.ToString();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
#endregion
|
|
|
|
|
}
|
|
|
|
|
}
|