2023-06-28
This commit is contained in:
parent
71d2baca54
commit
f266afe56f
|
|
@ -1,5 +1,5 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Report ScriptLanguage="CSharp" ReportInfo.Created="12/29/2021 10:56:08" ReportInfo.Modified="06/26/2023 15:31:41" ReportInfo.CreatorVersion="2017.1.16.0">
|
||||
<Report ScriptLanguage="CSharp" ReportInfo.Created="12/29/2021 10:56:08" ReportInfo.Modified="06/28/2023 09:22:56" ReportInfo.CreatorVersion="2017.1.16.0">
|
||||
<ScriptText>using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
|
|
@ -99,7 +99,7 @@ namespace FastReport
|
|||
}
|
||||
</ScriptText>
|
||||
<Dictionary>
|
||||
<MsSqlDataConnection Name="Connection" ConnectionString="rijcmlqvJIqZbrmqGn7L0P56UFhaUHihKXxbhpqie4wmZgM2ymDKry7UxzO5md9ybQlkfKpN2rHYbp9GtH1LDQPa7z2vVu/kEnNnTKeHt9obmaC7TQDh0IvsUBSuzhGZdfAIK7YyBqykCgeZm5rvA6K5b7zHGdA+7pUpJ/9ZLpp1NuxWRGljdG+Vyp/4vwo6KXFJdHA"/>
|
||||
<MsSqlDataConnection Name="Connection" ConnectionString="rijcmlqvJIqZbrmqGn7L0P56UFhaUHihKXxbhpqie4wmZgM2ymDKry7UxzO5md9ybQlkfKpN2rHYbp9GtH1LDQPa7z2vVu/kEnNnTKeHt9obmaC7TQDh0IvsUBSuzhGZdfAIK7YyBqykCgeZm5rvA6K5b7zHGdA+7pUpJ/9ZLpp1NuxWRFaP4QmH3R+4iH+AADbdwUS"/>
|
||||
<TableDataSource Name="Table1" ReferenceName="Table1" DataType="System.Int32" Enabled="true">
|
||||
<Column Name="PrefabricatedComponents" DataType="System.String" PropName="CH_TrustCode"/>
|
||||
<Column Name="PlanStartDate" DataType="System.String" PropName="CH_TrustMan"/>
|
||||
|
|
|
|||
|
|
@ -237,7 +237,7 @@ namespace FineUIPro.Web.HJGL.PreDesign
|
|||
{
|
||||
string strSql = @" SELECT distinct com.PipelineComponentId,com.PipelineComponentCode,com.BoxNumber,
|
||||
com.PipelineId, punit.UnitName AS PreUnit,aunit.UnitName AS AssembleUnit,
|
||||
com.QRCode,com.State,com.ProductionState,pipe.PlanStartDate,com.DrawingName,com.ReceiveDate,
|
||||
com.QRCode,com.State,com.ProductionState,pipe.PlanStartDate,pipe.FlowingSection,com.DrawingName,com.ReceiveDate,
|
||||
person.PersonName
|
||||
FROM HJGL_Pipeline_Component com
|
||||
LEFT JOIN HJGL_Pipeline pipe ON pipe.PipelineId =com.PipelineId
|
||||
|
|
|
|||
|
|
@ -5,6 +5,12 @@
|
|||
<head runat="server">
|
||||
<title>二次焊口信息</title>
|
||||
<link href="../../res/css/common.css" rel="stylesheet" type="text/css" />
|
||||
<style>
|
||||
.customlabel span {
|
||||
color: red;
|
||||
font-weight: bold;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<form id="form1" runat="server">
|
||||
|
|
@ -47,6 +53,8 @@
|
|||
Width="240px" LabelWidth="80px" LabelAlign="Right">
|
||||
</f:TextBox>
|
||||
<f:CheckBox ID="ckIsAudit" runat ="server" Label="未审核" AutoPostBack="true" OnCheckedChanged="ckIsAudit_CheckedChanged"></f:CheckBox>
|
||||
<f:Label ID="lbSize" CssClass="customlabel" runat="server" Label="达因"></f:Label>
|
||||
|
||||
<f:DropDownList runat="server" ID="DropTwoJointType" Label="二次新增类型" LabelAlign="Right" LabelWidth="140px" AutoPostBack="true" OnSelectedIndexChanged="TextBox_TextChanged">
|
||||
<f:ListItem Text="新增口" Value="新增口" />
|
||||
<f:ListItem Text="修改口" Value="修改口" />
|
||||
|
|
|
|||
|
|
@ -292,7 +292,8 @@ namespace FineUIPro.Web.HJGL.WeldingManage
|
|||
}
|
||||
SqlParameter[] parameter = listStr.ToArray();
|
||||
DataTable tb = SQLHelper.GetDataTableRunText(strSql, parameter);
|
||||
|
||||
var SizeSum = tb.AsEnumerable().Select(x => x.Field<decimal>("Size")).Sum();
|
||||
lbSize.Text=SizeSum.ToString();
|
||||
// 2.获取当前分页数据
|
||||
Grid1.RecordCount = tb.Rows.Count;
|
||||
var table = this.GetPagedDataTable(Grid1, tb);
|
||||
|
|
@ -334,7 +335,8 @@ namespace FineUIPro.Web.HJGL.WeldingManage
|
|||
}
|
||||
SqlParameter[] parameter = listStr.ToArray();
|
||||
DataTable tb = SQLHelper.GetDataTableRunText(strSql, parameter);
|
||||
|
||||
var SizeSum = tb.AsEnumerable().Select(x => x.Field<decimal>("Size")).Sum();
|
||||
lbSize.Text = SizeSum.ToString();
|
||||
// 2.获取当前分页数据
|
||||
Grid1.RecordCount = tb.Rows.Count;
|
||||
var table = this.GetPagedDataTable(Grid1, tb);
|
||||
|
|
|
|||
|
|
@ -122,6 +122,15 @@ namespace FineUIPro.Web.HJGL.WeldingManage
|
|||
/// </remarks>
|
||||
protected global::FineUIPro.CheckBox ckIsAudit;
|
||||
|
||||
/// <summary>
|
||||
/// lbSize 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Label lbSize;
|
||||
|
||||
/// <summary>
|
||||
/// DropTwoJointType 控件。
|
||||
/// </summary>
|
||||
|
|
|
|||
|
|
@ -95,9 +95,10 @@
|
|||
</f:Toolbar>
|
||||
<f:Toolbar ID="Toolbar2" Position="Top" runat="server" ToolbarAlign="Left">
|
||||
<Items>
|
||||
<f:Label ID="lbSinglePreRate" CssClass="customlabel" runat="server" Label="主项预制率"></f:Label>
|
||||
<f:Label ID="lbShopSize" CssClass="customlabel" runat="server" Label="预制口达因"></f:Label>
|
||||
<f:Label ID="lbFiledSize" CssClass="customlabel" runat="server" Label="安装口达因"></f:Label>
|
||||
<f:Label ID="lbSinglePreRate" CssClass="customlabel" runat="server" Label="主项预制率(达因)" LabelWidth="140"></f:Label>
|
||||
<f:Label ID="lbSinglePreRateByWeldJoint" CssClass="customlabel" runat="server" Label="主项预制率(焊口)" LabelWidth="140"></f:Label>
|
||||
<f:Label ID="lbShopSize" CssClass="customlabel" runat="server" Label="预制口达因" LabelWidth="100"></f:Label>
|
||||
<f:Label ID="lbFiledSize" CssClass="customlabel" runat="server" Label="安装口达因" LabelWidth="100"></f:Label>
|
||||
|
||||
</Items>
|
||||
</f:Toolbar>
|
||||
|
|
|
|||
|
|
@ -234,16 +234,22 @@ namespace FineUIPro.Web.HJGL.WeldingManage
|
|||
this.BindGrid1(this.tvControlItem.SelectedNodeID);
|
||||
this.BindGrid2(this.tvControlItem.SelectedNodeID);
|
||||
this.BindGrid3(this.tvControlItem.SelectedNodeID);
|
||||
this.lbSinglePreRate.Label = "图纸预制率";
|
||||
this.lbSinglePreRate.Label = "图纸预制率(达因)";
|
||||
this.lbSinglePreRate.Text = GetRateByPipelineid(this.tvControlItem.SelectedNodeID);
|
||||
|
||||
this.lbSinglePreRateByWeldJoint.Label = "图纸预制率(焊口)";
|
||||
this.lbSinglePreRateByWeldJoint.Text = GetWeldJointRateByPipelineid(this.tvControlItem.SelectedNodeID);
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
this.hdUnitWorkId.Text = this.tvControlItem.SelectedNodeID;
|
||||
this.lbSinglePreRate.Label = "主项预制率";
|
||||
this.lbSinglePreRate.Label = "主项预制率(达因)";
|
||||
this.lbSinglePreRate.Text = GetRateByUnitWork(this.tvControlItem.SelectedNodeID);
|
||||
|
||||
this.lbSinglePreRateByWeldJoint.Label = "主项预制率(焊口)";
|
||||
this.lbSinglePreRateByWeldJoint.Text = GetWeldJointRateByUnitWork(this.tvControlItem.SelectedNodeID);
|
||||
|
||||
}
|
||||
this.lbShopSize.Text = ShopSumSize;
|
||||
this.lbFiledSize.Text = FieldSumSize;
|
||||
|
|
@ -437,6 +443,37 @@ namespace FineUIPro.Web.HJGL.WeldingManage
|
|||
}
|
||||
return "0%";
|
||||
}
|
||||
|
||||
private string GetWeldJointRateByUnitWork(string unitworkid)
|
||||
{
|
||||
string rate = "";
|
||||
int ShopNum = 0;
|
||||
int FieldNum = 0;
|
||||
int AllNum = 0;
|
||||
var db = Funs.DB;
|
||||
var q = from x in db.View_HJGL_WeldJoint where x.UnitWorkId == unitworkid select x;
|
||||
if (q != null && q.Count() > 0)
|
||||
{
|
||||
ShopNum = (from x in q
|
||||
where x.JointAttribute == "预制口"
|
||||
select x
|
||||
).Count();
|
||||
FieldNum = (from x in q
|
||||
where x.JointAttribute == "安装口"
|
||||
select x
|
||||
).Count();
|
||||
AllNum = ShopNum + FieldNum;
|
||||
|
||||
if (AllNum > 0)
|
||||
{
|
||||
var a = (decimal)100 * ShopNum / AllNum;
|
||||
rate = Math.Round((decimal)a, 1).ToString() + "%";
|
||||
}
|
||||
|
||||
return rate;
|
||||
}
|
||||
return "0%";
|
||||
}
|
||||
private string GetRateByPipelineid(string pipelineid)
|
||||
{
|
||||
string rate = "";
|
||||
|
|
@ -484,7 +521,40 @@ namespace FineUIPro.Web.HJGL.WeldingManage
|
|||
}
|
||||
return "0%";
|
||||
}
|
||||
/// <summary>
|
||||
/// 获取预制率(焊口) 预制口数量/总焊口数量
|
||||
/// </summary>
|
||||
/// <param name="pipelineid"></param>
|
||||
/// <returns></returns>
|
||||
private string GetWeldJointRateByPipelineid(string pipelineid)
|
||||
{
|
||||
string rate = "";
|
||||
int ShopNum = 0;
|
||||
int FieldNum = 0;
|
||||
int AllNum = 0;
|
||||
var db = Funs.DB;
|
||||
var q = from x in db.View_HJGL_WeldJoint where x.PipelineId == pipelineid select x;
|
||||
if (q != null && q.Count() > 0)
|
||||
{
|
||||
ShopNum = (from x in q
|
||||
where x.JointAttribute == "预制口" select x
|
||||
).Count();
|
||||
FieldNum = (from x in q
|
||||
where x.JointAttribute == "安装口"
|
||||
select x
|
||||
).Count();
|
||||
AllNum = ShopNum + FieldNum;
|
||||
|
||||
if (AllNum > 0)
|
||||
{
|
||||
var a = (decimal)100 * ShopNum / AllNum;
|
||||
rate = Math.Round((decimal)a, 1).ToString() + "%";
|
||||
}
|
||||
|
||||
return rate;
|
||||
}
|
||||
return "0%";
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
|
|
|
|||
|
|
@ -221,6 +221,15 @@ namespace FineUIPro.Web.HJGL.WeldingManage
|
|||
/// </remarks>
|
||||
protected global::FineUIPro.Label lbSinglePreRate;
|
||||
|
||||
/// <summary>
|
||||
/// lbSinglePreRateByWeldJoint 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Label lbSinglePreRateByWeldJoint;
|
||||
|
||||
/// <summary>
|
||||
/// lbShopSize 控件。
|
||||
/// </summary>
|
||||
|
|
|
|||
|
|
@ -146,24 +146,24 @@ namespace WebAPI.Controllers
|
|||
/// <returns></returns>
|
||||
[HttpPost]
|
||||
public async Task<Model.ResponeData> DownloadDocument([FromBody] Model.SaveOnlineFileItem toDoItem)
|
||||
//public async Task<Model.ResponeData> DownloadDocument( string UrlStr, string PCUrl)
|
||||
{
|
||||
var responeData = new Model.ResponeData();
|
||||
|
||||
HttpClient _httpClient = new HttpClient();
|
||||
try
|
||||
{
|
||||
// System.Net.ServicePointManager.SecurityProtocol = System.Net.SecurityProtocolType.Tls12;
|
||||
System.Net.ServicePointManager.SecurityProtocol = System.Net.SecurityProtocolType.Tls12;
|
||||
|
||||
// 发送 GET 请求以获取文件内容
|
||||
var response = await _httpClient.GetAsync(toDoItem.UrlStr);
|
||||
response.EnsureSuccessStatusCode();
|
||||
|
||||
string savePath = "";
|
||||
if (!string.IsNullOrEmpty(toDoItem.PCUrl))
|
||||
{
|
||||
savePath = ConfigurationManager.AppSettings["localRoot"]+toDoItem.PCUrl;
|
||||
|
||||
|
||||
savePath = ConfigurationManager.AppSettings["localRoot"] + toDoItem.PCUrl;
|
||||
}
|
||||
|
||||
if (savePath != null)
|
||||
{
|
||||
// 将文件内容保存到本地
|
||||
|
|
@ -171,19 +171,25 @@ namespace WebAPI.Controllers
|
|||
{
|
||||
await response.Content.CopyToAsync(fileStream);
|
||||
}
|
||||
responeData.data = "文件已成功下载并保存到本地";
|
||||
// Console.WriteLine("文件已成功下载并保存到本地。");
|
||||
|
||||
responeData.code = 1;
|
||||
responeData.data = "文件已成功下载并保存到本地";
|
||||
}
|
||||
else
|
||||
{
|
||||
responeData.code = 0;
|
||||
responeData.message = "保存路径为空";
|
||||
}
|
||||
return responeData;
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
responeData.code=0;
|
||||
responeData.code = 0;
|
||||
responeData.message = $"下载文件时出现错误:{ex.Message}";
|
||||
}
|
||||
|
||||
return responeData;
|
||||
}
|
||||
}
|
||||
|
||||
#region 附件上传
|
||||
/// <summary>
|
||||
/// 附件上传
|
||||
|
|
|
|||
Loading…
Reference in New Issue