This commit is contained in:
parent
8a9a90e77d
commit
0a6cd1ea69
|
@ -162,7 +162,7 @@
|
|||
</site>
|
||||
<site name="WebApi" id="2">
|
||||
<application path="/" applicationPool="Clr4IntegratedAppPool">
|
||||
<virtualDirectory path="/" physicalPath="E:\湛江巴斯夫\Basf_TCC7\HJGL\WebApi" />
|
||||
<virtualDirectory path="/" physicalPath="E:\MyProject\ZJ_BSF\Basf_TCC7\HJGL\WebApi" />
|
||||
</application>
|
||||
<bindings>
|
||||
<binding protocol="http" bindingInformation="*:3862:localhost" />
|
||||
|
@ -250,7 +250,7 @@
|
|||
</site>
|
||||
<site name="FineUIPro.Web(10)" id="13">
|
||||
<application path="/" applicationPool="Clr4IntegratedAppPool">
|
||||
<virtualDirectory path="/" physicalPath="E:\湛江巴斯夫\Basf_TCC7\HJGL\FineUIPro.Web" />
|
||||
<virtualDirectory path="/" physicalPath="E:\MyProject\ZJ_BSF\Basf_TCC7\HJGL\FineUIPro.Web" />
|
||||
</application>
|
||||
<bindings>
|
||||
<binding protocol="http" bindingInformation="*:13960:localhost" />
|
||||
|
|
Binary file not shown.
|
@ -178,6 +178,7 @@
|
|||
<Compile Include="WeldingProcess\TrustManage\Batch_BatchTrustService.cs" />
|
||||
<Compile Include="WeldingProcess\TrustManage\Batch_PointBatchItemService.cs" />
|
||||
<Compile Include="WeldingProcess\TrustManage\Batch_PointBatchService.cs" />
|
||||
<Compile Include="WeldingProcess\WeldingManage\DailyReportCompleteService.cs" />
|
||||
<Compile Include="WeldingProcess\WeldingManage\Pipeline_PipelineDetectionTypeService.cs" />
|
||||
<Compile Include="WeldingProcess\WeldingManage\Pipeline_PipelineService.cs" />
|
||||
<Compile Include="WeldingProcess\WeldingManage\Pipeline_WeldingDailyService.cs" />
|
||||
|
|
|
@ -530,6 +530,11 @@ namespace BLL
|
|||
/// </summary>
|
||||
public const string HJGL_PreWeldReportMenuId = "8D92CA4E-F267-4175-9152-56F095668FC9";
|
||||
|
||||
/// <summary>
|
||||
/// 日报完成情况
|
||||
/// </summary>
|
||||
public const string DailyReportCompleteMenuId = "948B01F1-27B4-49DF-9315-C42BB7BBE7AF";
|
||||
|
||||
#endregion
|
||||
|
||||
|
||||
|
|
|
@ -84,24 +84,6 @@ namespace BLL
|
|||
return (from x in Funs.DB.Welder_TeamGroup orderby x.TeamGroupCode select x).ToList();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 班组下拉选择项
|
||||
/// </summary>
|
||||
/// <param name="dropName"></param>
|
||||
/// <param name="isShowPlease"></param>
|
||||
/// <param name="itemText"></param>
|
||||
public static void InitTeamGroupDropDownList(FineUIPro.DropDownList dropName, bool isShowPlease,string itemText)
|
||||
{
|
||||
dropName.DataValueField = "TeamGroupId";
|
||||
dropName.DataTextField = "TeamGroupName";
|
||||
dropName.DataSource = GetTeamGroupList();
|
||||
dropName.DataBind();
|
||||
if (isShowPlease)
|
||||
{
|
||||
Funs.FineUIPleaseSelect(dropName,itemText);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取班组下拉选择项
|
||||
/// </summary>
|
||||
|
|
|
@ -0,0 +1,92 @@
|
|||
using Model;
|
||||
using NPOI.SS.Formula.Functions;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
|
||||
namespace BLL
|
||||
{
|
||||
public partial class DailyReportCompleteService
|
||||
{
|
||||
/// <summary>
|
||||
/// 获取日报完成信息
|
||||
/// </summary>
|
||||
/// <param name="completeId">Id</param>
|
||||
/// <returns></returns>
|
||||
public static Model.Pipeline_DailyReportComplete GetDailyReportComplete(string completeId)
|
||||
{
|
||||
return Funs.DB.Pipeline_DailyReportComplete.FirstOrDefault(x => x.DailyReportCompleteId == completeId);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 增加日报完成信息
|
||||
/// </summary>
|
||||
/// <param name="complete"></param>
|
||||
public static void AddDailyReportComplete(Model.Pipeline_DailyReportComplete complete)
|
||||
{
|
||||
Model.HJGLDB db = Funs.DB;
|
||||
Model.Pipeline_DailyReportComplete newR = new Model.Pipeline_DailyReportComplete();
|
||||
newR.DailyReportCompleteId = complete.DailyReportCompleteId;
|
||||
newR.ProjectId =complete.ProjectId;
|
||||
newR.UnitId = complete.UnitId;
|
||||
newR.TeamGroupId =complete.TeamGroupId;
|
||||
newR.DailyReportDate = complete.DailyReportDate;
|
||||
newR.IsComplete = complete.IsComplete;
|
||||
|
||||
db.Pipeline_DailyReportComplete.InsertOnSubmit(newR);
|
||||
db.SubmitChanges();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 修改日报完成信息
|
||||
/// </summary>
|
||||
/// <param name="complete"></param>
|
||||
public static void UpdateDailyReportComplete(Model.Pipeline_DailyReportComplete complete)
|
||||
{
|
||||
Model.HJGLDB db = Funs.DB;
|
||||
Model.Pipeline_DailyReportComplete newR = db.Pipeline_DailyReportComplete.First(e => e.DailyReportCompleteId == complete.DailyReportCompleteId);
|
||||
newR.ProjectId = complete.ProjectId;
|
||||
newR.UnitId = complete.UnitId;
|
||||
newR.TeamGroupId = complete.TeamGroupId;
|
||||
newR.DailyReportDate = complete.DailyReportDate;
|
||||
newR.IsComplete = complete.IsComplete;
|
||||
|
||||
db.SubmitChanges();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 删除日报完成信息
|
||||
/// </summary>
|
||||
/// <param name="completeId"></param>
|
||||
public static void DeleteDailyReportComplete(string completeId)
|
||||
{
|
||||
Model.HJGLDB db = Funs.DB;
|
||||
Model.Pipeline_DailyReportComplete delR = db.Pipeline_DailyReportComplete.First(e => e.DailyReportCompleteId == completeId);
|
||||
db.Pipeline_DailyReportComplete.DeleteOnSubmit(delR);
|
||||
db.SubmitChanges();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 是否存在日报完成信息
|
||||
/// </summary>
|
||||
/// <param name="projectId"></param>
|
||||
/// <param name="completeId"></param>
|
||||
/// <param name="teamGroup"></param>
|
||||
/// <param name="reportDate"></param>
|
||||
/// <returns>是否存在</returns>
|
||||
public static bool IsExistDailyReportComplete(string projectId , string completeId, string teamGroup, DateTime reportDate)
|
||||
{
|
||||
bool isExist = false;
|
||||
var role = Funs.DB.Pipeline_DailyReportComplete.FirstOrDefault(x => x.ProjectId == projectId && x.TeamGroupId==teamGroup && x.DailyReportDate== reportDate && x.DailyReportCompleteId != completeId);
|
||||
if (role != null)
|
||||
{
|
||||
isExist = true;
|
||||
}
|
||||
return isExist;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
}
|
|
@ -1259,6 +1259,8 @@
|
|||
<Content Include="WeldingProcess\TrustManage\TrustBatchManage.aspx" />
|
||||
<Content Include="WeldingProcess\TrustManage\TrustBatchOut.aspx" />
|
||||
<Content Include="WeldingProcess\TrustManage\TrustBatchSelect.aspx" />
|
||||
<Content Include="WeldingProcess\WeldingManage\DailyReportComplete.aspx" />
|
||||
<Content Include="WeldingProcess\WeldingManage\DailyReportCompleteEdit.aspx" />
|
||||
<Content Include="WeldingProcess\WeldingManage\JointInfo.aspx" />
|
||||
<Content Include="WeldingProcess\WeldingManage\JointInfoBatchEdit.aspx" />
|
||||
<Content Include="WeldingProcess\WeldingManage\JointInfoCopy.aspx" />
|
||||
|
@ -5591,6 +5593,20 @@
|
|||
<Compile Include="WeldingProcess\TrustManage\TrustBatchSelect.aspx.designer.cs">
|
||||
<DependentUpon>TrustBatchSelect.aspx</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="WeldingProcess\WeldingManage\DailyReportComplete.aspx.cs">
|
||||
<DependentUpon>DailyReportComplete.aspx</DependentUpon>
|
||||
<SubType>ASPXCodeBehind</SubType>
|
||||
</Compile>
|
||||
<Compile Include="WeldingProcess\WeldingManage\DailyReportComplete.aspx.designer.cs">
|
||||
<DependentUpon>DailyReportComplete.aspx</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="WeldingProcess\WeldingManage\DailyReportCompleteEdit.aspx.cs">
|
||||
<DependentUpon>DailyReportCompleteEdit.aspx</DependentUpon>
|
||||
<SubType>ASPXCodeBehind</SubType>
|
||||
</Compile>
|
||||
<Compile Include="WeldingProcess\WeldingManage\DailyReportCompleteEdit.aspx.designer.cs">
|
||||
<DependentUpon>DailyReportCompleteEdit.aspx</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="WeldingProcess\WeldingManage\GetWdldingDailyItem.ashx.cs">
|
||||
<DependentUpon>GetWdldingDailyItem.ashx</DependentUpon>
|
||||
</Compile>
|
||||
|
|
|
@ -485,7 +485,7 @@ namespace FineUIPro.Web.CheckManage
|
|||
if (ndtItem != string.Empty)
|
||||
{
|
||||
var q = BLL.Batch_NDEItemService.GetNDEItemById(ndtItem);
|
||||
if (q.PassFilm != q.TotalFilm && q.SubmitDate.HasValue)
|
||||
if ((q.PassFilm != q.TotalFilm || q.Remark.Contains("修磨") || q.Remark.Contains("异物")) && q.SubmitDate.HasValue)
|
||||
{
|
||||
string window = String.Format("RepairNotice.aspx?NDEItemID={0}", ndtItem, "返修通知单");
|
||||
PageContext.RegisterStartupScript(WindowRepair.GetShowReference(window));
|
||||
|
|
|
@ -210,7 +210,7 @@ namespace FineUIPro.Web.WeldingProcess.CheckManage
|
|||
if (repairRecord != null && !string.IsNullOrEmpty(repairRecord.RepairRecordCode))
|
||||
{
|
||||
// 取返修单后4位
|
||||
code4 = repairRecord.RepairRecordCode.Substring(repairRecord.RepairRecordCode.Length - 4);
|
||||
code4 = repairRecord.RepairRecordCode.Substring(repairRecord.RepairRecordCode.Length - 5);
|
||||
// 取返修单后2位
|
||||
code2 = repairRecord.RepairRecordCode.Substring(repairRecord.RepairRecordCode.Length - 2);
|
||||
}
|
||||
|
@ -245,7 +245,7 @@ namespace FineUIPro.Web.WeldingProcess.CheckManage
|
|||
List<SqlParameter> listStr = new List<SqlParameter>();
|
||||
listStr.Add(new SqlParameter("@DetectionTypeId", repairRecord.DetectionTypeId));
|
||||
// 如果是第二次返修不加载扩透口
|
||||
if (!code4.Contains("K1") && code2 == "R2")
|
||||
if (!code4.Contains("EX1") && code2 == "R2")
|
||||
{
|
||||
listStr.Add(new SqlParameter("@ProjectId", "0"));
|
||||
}
|
||||
|
@ -263,7 +263,7 @@ namespace FineUIPro.Web.WeldingProcess.CheckManage
|
|||
}
|
||||
else
|
||||
{
|
||||
if (ndtItem.JudgeGrade == "修磨" || ndtItem.JudgeGrade == "异物")
|
||||
if (ndtItem.Remark.Contains("修磨") || ndtItem.Remark.Contains("异物"))
|
||||
{
|
||||
listStr.Add(new SqlParameter("@ProjectId", "0"));
|
||||
}
|
||||
|
@ -724,7 +724,7 @@ namespace FineUIPro.Web.WeldingProcess.CheckManage
|
|||
if (code != null && !string.IsNullOrEmpty(code.RepairRecordCode))
|
||||
{
|
||||
// 取返修单后4位
|
||||
string code4 = code.RepairRecordCode.Substring(code.RepairRecordCode.Length - 4);
|
||||
string code4 = code.RepairRecordCode.Substring(code.RepairRecordCode.Length - 5);
|
||||
// 取返修单后2位
|
||||
string code2 = code.RepairRecordCode.Substring(code.RepairRecordCode.Length - 2);
|
||||
if (code2 == "R1")
|
||||
|
@ -749,7 +749,7 @@ namespace FineUIPro.Web.WeldingProcess.CheckManage
|
|||
}
|
||||
else
|
||||
{
|
||||
if (code4.Contains("K1") && code2 == "R2")
|
||||
if (code4.Contains("EX1") && code2 == "R2")
|
||||
{
|
||||
Grid1.SelectAllRows();
|
||||
}
|
||||
|
|
|
@ -81,7 +81,10 @@ namespace FineUIPro.Web.WeldingProcess.CheckManage
|
|||
{
|
||||
newItem.RepairRecordCode = q.TrustBatchCode + "-" + q.WeldJointCode + "P1";
|
||||
}
|
||||
|
||||
else if (q.Remark.Contains("异物"))
|
||||
{
|
||||
newItem.RepairRecordCode = q.TrustBatchCode + "-" + q.WeldJointCode + "S1";
|
||||
}
|
||||
else
|
||||
{
|
||||
newItem.RepairRecordCode = q.TrustBatchCode + "-" + q.WeldJointCode + "R1";
|
||||
|
|
|
@ -664,13 +664,20 @@ namespace FineUIPro.Web.WeldingProcess.TestPackageManage
|
|||
Alert.ShowInTop("请选择打印报表!", MessageBoxIcon.Warning);
|
||||
return;
|
||||
}
|
||||
if (string.IsNullOrEmpty(this.tvControlItem.SelectedNodeID) )
|
||||
if (string.IsNullOrEmpty(this.tvControlItem.SelectedNodeID))
|
||||
{
|
||||
Alert.ShowInTop("请选择试压包!", MessageBoxIcon.Warning);
|
||||
return;
|
||||
}
|
||||
|
||||
CreateDataExcel(selectValArray);
|
||||
try
|
||||
{
|
||||
CreateDataExcel(selectValArray);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
ShowNotify($"导出失败:{ex.Message}", MessageBoxIcon.Error);
|
||||
}
|
||||
}
|
||||
|
||||
#region 绘画模版
|
||||
|
@ -745,7 +752,7 @@ namespace FineUIPro.Web.WeldingProcess.TestPackageManage
|
|||
ws.GetRow(rowIndex + 11).Height = 11 * 20;
|
||||
|
||||
ws.GetRow(rowIndex + 10).GetCell(1).SetCellValue("试压包号\r\nTest Package No.");
|
||||
ws.GetRow(rowIndex + 10).GetCell(4).SetCellValue("UG-130-FW-HT-0001");
|
||||
ws.GetRow(rowIndex + 10).GetCell(4).SetCellValue(this.tvControlItem.SelectedNode.Text);
|
||||
|
||||
ws.AddMergedRegion(new CellRangeAddress(rowIndex + 12, rowIndex + 13, 2, 4));
|
||||
ws.AddMergedRegion(new CellRangeAddress(rowIndex + 12, rowIndex + 13, 6, 7));
|
||||
|
@ -3110,32 +3117,66 @@ namespace FineUIPro.Web.WeldingProcess.TestPackageManage
|
|||
{
|
||||
var info = GetTestPackageInfo(this.tvControlItem.SelectedNodeID);
|
||||
|
||||
string sql = @" SELECT
|
||||
WeldSilkId,
|
||||
a.PipelineCode,
|
||||
e.WorkAreaCode,
|
||||
a.WeldJointCode,
|
||||
a.Specification,
|
||||
a.Material1Code,
|
||||
a.WeldingMethodCode,
|
||||
a.WeldingDate,
|
||||
a.WeldSilkCode,
|
||||
a.WeldMatCode,
|
||||
a.BackingWelderCode,
|
||||
a.CoverWelderCode,
|
||||
a.ProjectName,
|
||||
(select top 1 EnProjectName from Base_Project where ProjectId=b.ProjectId ) as EnProjectName,
|
||||
(select top 1 WorkAreaName from Project_WorkArea where WorkAreaId=c.WorkAreaId) as WorkAreaName,
|
||||
(select top 1 EnWorkAreaName from Project_WorkArea where WorkAreaId=c.WorkAreaId) as EnWorkAreaName,
|
||||
a.IsHotProess,(case a.IsHotProess when 1 then '是' else '否' end) as IsHotProessName,PrepareTemp,
|
||||
WeldingLocationCode,a.WeldTypeCode,
|
||||
(SELECT TOP 1 n.NDEReportNo FROM dbo.Batch_NDEItem n WHERE n.TrustBatchItemId=
|
||||
(SELECT TOP 1 bt.TrustBatchItemId FROM dbo.Batch_BatchTrustItem bt WHERE bt.WeldJointId=a.WeldJointId)) AS NDEReportNo
|
||||
FROM PTP_TestPackage as b inner join
|
||||
PTP_PipelineList as c on b.PTP_ID=c.PTP_ID
|
||||
inner join View_Pipeline_WeldJoint as a on c.PipelineId=a.PipelineId
|
||||
left join Project_WorkArea as e on e.WorkAreaId=c.WorkAreaId
|
||||
WHERE Is_hjName='是' and b.PTP_ID=@PTPID and a.projectId=@projectId
|
||||
string sql = @" SELECT * FROM (
|
||||
SELECT
|
||||
b.PTP_ID,
|
||||
a.projectId,
|
||||
WeldSilkId,
|
||||
a.PipelineCode,
|
||||
a.WeldJointCode,
|
||||
a.Specification,
|
||||
a.MaterialCode,
|
||||
a.WeldingMethodCode,
|
||||
a.WeldingDate,
|
||||
(CASE WHEN a.WeldMatId IS NOT NULL AND a.WeldSilkId IS NOT NULL THEN a.WeldSilkId+'|'+ a.WeldMatId
|
||||
WHEN a.WeldMatId IS NOT NULL AND a.WeldSilkId IS NULL THEN a.WeldMatId
|
||||
WHEN a.WeldSilkId IS NOT NULL AND a.WeldMatId IS NULL THEN a.WeldSilkId
|
||||
ELSE '' END) AS WeldMaterial,
|
||||
a.BackingWelderCode,
|
||||
a.CoverWelderCode,
|
||||
a.ProjectName,
|
||||
(select top 1 EnProjectName from Base_Project where ProjectId=b.ProjectId ) as EnProjectName,
|
||||
(select top 1 WorkAreaName from Project_WorkArea where WorkAreaId=c.WorkAreaId) as WorkAreaName,
|
||||
(select top 1 EnWorkAreaName from Project_WorkArea where WorkAreaId=c.WorkAreaId) as EnWorkAreaName,
|
||||
a.IsHotProess,(case a.IsHotProess when 1 then '是' else '否' end) as IsHotProessName,PrepareTemp,
|
||||
WeldingLocationCode,a.WeldTypeCode,
|
||||
(SELECT TOP 1 n.NDEReportNo FROM dbo.Batch_NDEItem n WHERE n.TrustBatchItemId=
|
||||
(SELECT TOP 1 bt.TrustBatchItemId FROM dbo.Batch_BatchTrustItem bt WHERE bt.WeldJointId=a.WeldJointId)) AS NDEReportNo
|
||||
FROM PTP_TestPackage as b inner join
|
||||
PTP_PipelineList as c on b.PTP_ID=c.PTP_ID
|
||||
inner join View_Pipeline_WeldJoint as a on c.PipelineId=a.PipelineId
|
||||
WHERE c.isAll=1
|
||||
UNION ALL
|
||||
SELECT
|
||||
b.PTP_ID,
|
||||
a.projectId,
|
||||
WeldSilkId,
|
||||
a.PipelineCode,
|
||||
a.WeldJointCode,
|
||||
a.Specification,
|
||||
a.MaterialCode,
|
||||
a.WeldingMethodCode,
|
||||
a.WeldingDate,
|
||||
(CASE WHEN a.WeldMatId IS NOT NULL AND a.WeldSilkId IS NOT NULL THEN a.WeldSilkId+'|'+ a.WeldMatId
|
||||
WHEN a.WeldMatId IS NOT NULL AND a.WeldSilkId IS NULL THEN a.WeldMatId
|
||||
WHEN a.WeldSilkId IS NOT NULL AND a.WeldMatId IS NULL THEN a.WeldSilkId
|
||||
ELSE '' END) AS WeldMaterial,
|
||||
a.BackingWelderCode,
|
||||
a.CoverWelderCode,
|
||||
a.ProjectName,
|
||||
(select top 1 EnProjectName from Base_Project where ProjectId=b.ProjectId ) as EnProjectName,
|
||||
(select top 1 WorkAreaName from Project_WorkArea where WorkAreaId=c.WorkAreaId) as WorkAreaName,
|
||||
(select top 1 EnWorkAreaName from Project_WorkArea where WorkAreaId=c.WorkAreaId) as EnWorkAreaName,
|
||||
a.IsHotProess,(case a.IsHotProess when 1 then '是' else '否' end) as IsHotProessName,PrepareTemp,
|
||||
WeldingLocationCode,a.WeldTypeCode,
|
||||
(SELECT TOP 1 n.NDEReportNo FROM dbo.Batch_NDEItem n WHERE n.TrustBatchItemId=
|
||||
(SELECT TOP 1 bt.TrustBatchItemId FROM dbo.Batch_BatchTrustItem bt WHERE bt.WeldJointId=a.WeldJointId)) AS NDEReportNo
|
||||
FROM PTP_TestPackage as b inner join
|
||||
PTP_PipelineList as c on b.PTP_ID=c.PTP_ID
|
||||
inner join View_Pipeline_WeldJoint as a on c.PipelineId=a.PipelineId
|
||||
WHERE c.isAll=0 AND CHARINDEX(','+a.WeldJointCode+',',','+c.WeldJonintCode+',')>0
|
||||
|
||||
) AS T WHERE PTP_ID=@PTPID and projectId=@projectId
|
||||
";
|
||||
|
||||
SqlParameter[] parms = {
|
||||
|
@ -3334,23 +3375,15 @@ namespace FineUIPro.Web.WeldingProcess.TestPackageManage
|
|||
//规格mm
|
||||
ws.GetRow(dataIndex).GetCell(5).SetCellValue(dr["Specification"].ToString());
|
||||
//材质
|
||||
ws.GetRow(dataIndex).GetCell(6).SetCellValue(dr["Material1Code"].ToString());
|
||||
ws.GetRow(dataIndex).GetCell(6).SetCellValue(dr["MaterialCode"].ToString());
|
||||
//焊接位置
|
||||
ws.GetRow(dataIndex).GetCell(7).SetCellValue(dr["WeldingLocationCode"].ToString());
|
||||
//焊接方法
|
||||
ws.GetRow(dataIndex).GetCell(8).SetCellValue(dr["WeldingMethodCode"].ToString());
|
||||
//焊材牌号
|
||||
List<string> silkMats = new List<string>();
|
||||
if (!string.IsNullOrWhiteSpace(dr["WeldSilkCode"].ToString()))
|
||||
{
|
||||
silkMats.Add(dr["WeldSilkCode"].ToString());
|
||||
}
|
||||
if (!string.IsNullOrWhiteSpace(dr["WeldMatCode"].ToString()))
|
||||
{
|
||||
silkMats.Add(dr["WeldMatCode"].ToString());
|
||||
}
|
||||
if (silkMats.Count > 0) silkMats = silkMats.GroupBy(x => x).Select(x => x.Key).ToList();
|
||||
ws.GetRow(dataIndex).GetCell(10).SetCellValue(string.Join("/", silkMats));
|
||||
|
||||
string silkMats = ConvertWeldMaterial(dr["WeldMaterial"].ToString());
|
||||
|
||||
ws.GetRow(dataIndex).GetCell(10).SetCellValue(silkMats);
|
||||
//实际预热温度
|
||||
ws.GetRow(dataIndex).GetCell(12).SetCellValue(dr["PrepareTemp"].ToString());
|
||||
//焊接日期
|
||||
|
@ -3718,7 +3751,7 @@ namespace FineUIPro.Web.WeldingProcess.TestPackageManage
|
|||
ws.GetRow(dataIndex).GetCell(5).SetCellValue(dr["totalNum"].ToString());
|
||||
ws.GetRow(dataIndex).GetCell(7).SetCellValue(dr["Fnum"].ToString());
|
||||
ws.GetRow(dataIndex).GetCell(9).SetCellValue(dr["WelderCode"].ToString());
|
||||
ws.GetRow(dataIndex).GetCell(11).SetCellValue(dr["Fnum"].ToString());
|
||||
ws.GetRow(dataIndex).GetCell(11).SetCellValue(dr["totalNum"].ToString());
|
||||
ws.GetRow(dataIndex).GetCell(13).SetCellValue(dr["NdeNum"].ToString());
|
||||
ws.GetRow(dataIndex).GetCell(15).SetCellValue(dr["FNdeNum"].ToString());
|
||||
string a = string.IsNullOrEmpty(dr["NdeNum"].ToString())?"0": dr["NdeNum"].ToString();
|
||||
|
@ -4812,8 +4845,8 @@ namespace FineUIPro.Web.WeldingProcess.TestPackageManage
|
|||
ws.GetRow(dataIndex).GetCell(9).SetCellValue(dr["RTNDEReportNo"].ToString());
|
||||
ws.GetRow(dataIndex).GetCell(11).SetCellValue(dr["PTCheckResult"].ToString());
|
||||
ws.GetRow(dataIndex).GetCell(12).SetCellValue(dr["PTNDEReportNo"].ToString());
|
||||
ws.GetRow(dataIndex).GetCell(14).SetCellValue(dr[""].ToString());
|
||||
ws.GetRow(dataIndex).GetCell(15).SetCellValue(dr[""].ToString());
|
||||
ws.GetRow(dataIndex).GetCell(14).SetCellValue("");
|
||||
ws.GetRow(dataIndex).GetCell(15).SetCellValue("");
|
||||
ws.GetRow(dataIndex).GetCell(17).SetCellValue(dr["Remark"].ToString());
|
||||
j++;
|
||||
}
|
||||
|
@ -6534,7 +6567,7 @@ namespace FineUIPro.Web.WeldingProcess.TestPackageManage
|
|||
{
|
||||
Directory.CreateDirectory(filePath);
|
||||
}
|
||||
string fileName = "模版报表-" + DateTime.Now.ToString("yyyyMMddHHmmss") + ".xlsx";
|
||||
string fileName = "试压包报表-" + DateTime.Now.ToString("yyyyMMddHHmmss") + ".xlsx";
|
||||
string ReportFileName = filePath + fileName;
|
||||
|
||||
//XSSFWorkbook hssfworkbook = new XSSFWorkbook();
|
||||
|
@ -6735,7 +6768,87 @@ namespace FineUIPro.Web.WeldingProcess.TestPackageManage
|
|||
|
||||
|
||||
#region 私有方法
|
||||
protected string ConvertWeldMaterial(object WeldMaterial)
|
||||
{
|
||||
string weldMaterial = string.Empty;
|
||||
string silkName = string.Empty;
|
||||
string fluxName = string.Empty;
|
||||
string matName = string.Empty;
|
||||
|
||||
if (WeldMaterial != null)
|
||||
{
|
||||
string[] wmts = WeldMaterial.ToString().Split('|');
|
||||
if (wmts.Count() > 0)
|
||||
{
|
||||
if (wmts.Count() == 1)
|
||||
{
|
||||
string[] silks = wmts[0].Split(',');
|
||||
if (silks.Count() > 1) // 焊丝
|
||||
{
|
||||
foreach (string s in silks)
|
||||
{
|
||||
var silk = BLL.Base_ConsumablesService.GetConsumablesByConsumablesId(s);
|
||||
if (!string.IsNullOrEmpty(silk.UserFlux))
|
||||
{
|
||||
fluxName = fluxName + silk.UserFlux + "/";
|
||||
silkName = silkName + silk.ConsumablesName + "/";
|
||||
}
|
||||
else
|
||||
{
|
||||
silkName = silkName + silk.ConsumablesName + "/";
|
||||
}
|
||||
}
|
||||
|
||||
if (fluxName.Length > 0)
|
||||
{
|
||||
fluxName = fluxName.Substring(0, fluxName.Length - 1);
|
||||
weldMaterial = silkName + fluxName;
|
||||
}
|
||||
else
|
||||
{
|
||||
weldMaterial = silkName.Substring(0, silkName.Length - 1);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
var mat = BLL.Base_ConsumablesService.GetConsumablesByConsumablesId(wmts[0]);
|
||||
weldMaterial = mat==null?"": mat.ConsumablesName;
|
||||
}
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
string[] silks = wmts[0].Split(',');
|
||||
foreach (string s in silks)
|
||||
{
|
||||
var silk = BLL.Base_ConsumablesService.GetConsumablesByConsumablesId(s);
|
||||
if (!string.IsNullOrEmpty(silk.UserFlux))
|
||||
{
|
||||
fluxName = fluxName + silk.UserFlux + "/";
|
||||
silkName = silkName + silk.ConsumablesName + "/";
|
||||
}
|
||||
else
|
||||
{
|
||||
silkName = silkName + silk.ConsumablesName + "/";
|
||||
}
|
||||
}
|
||||
|
||||
var mat = BLL.Base_ConsumablesService.GetConsumablesByConsumablesId(wmts[1]);
|
||||
weldMaterial = silkName + mat.ConsumablesName;
|
||||
|
||||
if (fluxName.Length > 0)
|
||||
{
|
||||
fluxName = fluxName.Substring(0, fluxName.Length - 1);
|
||||
weldMaterial = silkName + mat.ConsumablesName + "/" + fluxName;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return weldMaterial;
|
||||
}
|
||||
public static TestPackageInfoViewModel GetTestPackageInfo(string ptpId)
|
||||
{
|
||||
var result = (from a in Funs.DB.PTP_TestPackage
|
||||
|
|
|
@ -118,7 +118,7 @@
|
|||
runat="server" OnClick="btnbtnOpenResetPoint_Click">
|
||||
</f:Button>
|
||||
<f:Button ID="btnClear" Text="手动关闭批" ToolTip="手动关闭批" Icon="ArrowOutLonger" runat="server"
|
||||
ConfirmText="确定要手动关闭批吗?" OnClick="btnbtnClear_Click">
|
||||
ConfirmText="确定要手动关闭批的待处理状态吗?" OnClick="btnbtnClear_Click">
|
||||
</f:Button>
|
||||
<f:Button ID="btnSelectExpandPoint" Text="重新选择扩口" ToolTip="重新选择扩口" Icon="ArrowRefresh"
|
||||
runat="server" OnClick="btnSelectExpandPoint_Click" Hidden="true">
|
||||
|
|
|
@ -855,7 +855,7 @@ namespace FineUIPro.Web.WeldingProcess.TrustManage
|
|||
}
|
||||
|
||||
/// <summary>
|
||||
/// 手动结束批(暂不用)
|
||||
/// 手动结束批
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
|
@ -863,23 +863,30 @@ namespace FineUIPro.Web.WeldingProcess.TrustManage
|
|||
{
|
||||
if (CommonService.GetAllButtonPowerList(this.CurrUser.LoginProjectId, this.CurrUser.UserId, Const.HJGL_PointManageMenuId, Const.BtnClearBatch))
|
||||
{
|
||||
string info = "该批次已关闭!";
|
||||
var point = BLL.Batch_PointBatchService.GetPointBatchById(this.PointBatchId);
|
||||
if (point != null && !point.EndDate.HasValue)
|
||||
string info = "该批次待处理状态的焊口已关闭!";
|
||||
var pointItemList = (from x in Funs.DB.Batch_PointBatchItem where x.PointBatchId == this.PointBatchId && (x.IsCompletedPoint == null || x.IsCompletedPoint == false) select x).ToList();
|
||||
foreach (var item in pointItemList)
|
||||
{
|
||||
var q = Funs.DB.Batch_PointBatchItem.FirstOrDefault(x => x.PointBatchId == PointBatchId && x.PointState == "1");
|
||||
if (q != null)
|
||||
{
|
||||
BLL.Batch_PointBatchService.UpdatePointBatch(PointBatchId, System.DateTime.Now);
|
||||
this.txtEndDate.Text = point.EndDate.Value.ToShortDateString();
|
||||
this.txtState.Text = "批关闭";
|
||||
BLL.Sys_LogService.AddLog(BLL.Const.System_3, this.CurrUser.LoginProjectId, this.CurrUser.UserId, Const.HJGL_PointManageMenuId, Const.BtnClearBatch, this.PointBatchId);
|
||||
}
|
||||
else
|
||||
{
|
||||
info = "该批次未点口,请手动点口后再结束批!";
|
||||
}
|
||||
item.IsCompletedPoint = true;
|
||||
}
|
||||
Funs.DB.SubmitChanges();
|
||||
|
||||
//var point = BLL.Batch_PointBatchService.GetPointBatchById(this.PointBatchId);
|
||||
//if (point != null && !point.EndDate.HasValue)
|
||||
//{
|
||||
// var q = Funs.DB.Batch_PointBatchItem.FirstOrDefault(x => x.PointBatchId == PointBatchId && x.PointState == "1");
|
||||
// if (q != null)
|
||||
// {
|
||||
// BLL.Batch_PointBatchService.UpdatePointBatch(PointBatchId, System.DateTime.Now);
|
||||
// this.txtEndDate.Text = point.EndDate.Value.ToShortDateString();
|
||||
// this.txtState.Text = "批关闭";
|
||||
// BLL.Sys_LogService.AddLog(BLL.Const.System_3, this.CurrUser.LoginProjectId, this.CurrUser.UserId, Const.HJGL_PointManageMenuId, Const.BtnClearBatch, this.PointBatchId);
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// info = "该批次未点口,请手动点口后再结束批!";
|
||||
// }
|
||||
//}
|
||||
Alert.ShowInTop(info);
|
||||
}
|
||||
else
|
||||
|
|
|
@ -558,6 +558,14 @@ namespace FineUIPro.Web.WeldingProcess.TrustManage
|
|||
pointItem.JLAudit = Const.GlyId;
|
||||
Funs.DB.SubmitChanges();
|
||||
}
|
||||
|
||||
// 导入后该批次里所有口都关闭
|
||||
var pointItemList = (from x in Funs.DB.Batch_PointBatchItem where x.PointBatchId == newBatchTrust.TopointBatch && (x.IsCompletedPoint == null || x.IsCompletedPoint == false) select x).ToList();
|
||||
foreach (var item in pointItemList)
|
||||
{
|
||||
item.IsCompletedPoint = true;
|
||||
}
|
||||
Funs.DB.SubmitChanges();
|
||||
}
|
||||
|
||||
ShowNotify("导入成功!", MessageBoxIcon.Success);
|
||||
|
|
|
@ -0,0 +1,93 @@
|
|||
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="DailyReportComplete.aspx.cs" Inherits="FineUIPro.Web.WeldingProcess.WeldingManage.DailyReportComplete" %>
|
||||
|
||||
<!DOCTYPE html>
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head runat="server">
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
<title>日报完成情况</title>
|
||||
|
||||
</head>
|
||||
<body>
|
||||
<form id="form1" runat="server">
|
||||
<f:PageManager ID="PageManager1" AutoSizePanelID="Panel1" runat="server" />
|
||||
<f:Panel ID="Panel1" runat="server" Margin="5px" BodyPadding="5px" ShowBorder="false"
|
||||
ShowHeader="false" Layout="VBox" BoxConfigAlign="Stretch">
|
||||
<Items>
|
||||
<f:Grid ID="Grid1" ShowBorder="true" ShowHeader="false" Title="日报完成情况" DataIDField="DailyReportCompleteId"
|
||||
EnableCollapse="true" runat="server" BoxFlex="1" EnableColumnLines="true"
|
||||
AllowSorting="true" OnSort="Grid1_Sort"
|
||||
AllowPaging="true" IsDatabasePaging="true" PageSize="15" OnPageIndexChange="Grid1_PageIndexChange"
|
||||
EnableRowDoubleClickEvent="true" OnRowDoubleClick="Grid1_RowDoubleClick" EnableTextSelection="True">
|
||||
<Toolbars>
|
||||
<f:Toolbar ID="Toolbar1" Position="Top" runat="server" ToolbarAlign="Left">
|
||||
<Items>
|
||||
<f:DropDownList ID="drpTeamGroup" runat="server" Label="施工班组"
|
||||
LabelAlign="Right" Width="280px">
|
||||
</f:DropDownList>
|
||||
<f:Button ID="BtnAnalyse" Text="查询" Icon="ChartPie"
|
||||
runat="server" OnClick="BtnAnalyse_Click">
|
||||
</f:Button>
|
||||
<f:ToolbarFill ID="ToolbarFill1" runat="server">
|
||||
</f:ToolbarFill>
|
||||
<f:Button ID="btnNew" ToolTip="<%$ Resources:Lan,Add %>" Icon="Add" EnablePostBack="true"
|
||||
runat="server" OnClick="btnNew_Click">
|
||||
</f:Button>
|
||||
</Items>
|
||||
</f:Toolbar>
|
||||
</Toolbars>
|
||||
<Columns>
|
||||
<f:RenderField HeaderText="单位代码" ColumnID="UnitCode" DataField="UnitCode" Width="150"></f:RenderField>
|
||||
<f:RenderField HeaderText="施工班组" ColumnID="TeamGroupName" DataField="TeamGroupName" Width="180"></f:RenderField>
|
||||
<f:RenderField HeaderText="日报日期" ColumnID="DailyReportDate" DataField="DailyReportDate" Width="200"></f:RenderField>
|
||||
<f:CheckBoxField Width="160px" RenderAsStaticField="true" TextAlign="Center" DataField="IsComplete" HeaderText="是否完成" />
|
||||
</Columns>
|
||||
<Listeners>
|
||||
<f:Listener Event="beforerowcontextmenu" Handler="onRowContextMenu" />
|
||||
</Listeners>
|
||||
<PageItems>
|
||||
<f:ToolbarSeparator ID="ToolbarSeparator1" runat="server">
|
||||
</f:ToolbarSeparator>
|
||||
<f:ToolbarText ID="ToolbarText1" runat="server" Text="<%$ Resources:Lan,NumberOfRecordsPerPage %>">
|
||||
</f:ToolbarText>
|
||||
<f:DropDownList runat="server" ID="ddlPageSize" Width="80px" AutoPostBack="true"
|
||||
OnSelectedIndexChanged="ddlPageSize_SelectedIndexChanged">
|
||||
<f:ListItem Text="10" Value="10" />
|
||||
<f:ListItem Text="15" Value="15" />
|
||||
<f:ListItem Text="20" Value="20" />
|
||||
<f:ListItem Text="25" Value="25" />
|
||||
</f:DropDownList>
|
||||
</PageItems>
|
||||
</f:Grid>
|
||||
</Items>
|
||||
</f:Panel>
|
||||
<f:Window ID="Window1" Title="<%$ Resources:Lan,PopForm %>" Hidden="true" EnableIFrame="true"
|
||||
EnableMaximize="true" Target="self" EnableResize="true" runat="server" OnClose="Window1_Close"
|
||||
IsModal="true" Width="700px" Height="360px">
|
||||
</f:Window>
|
||||
<f:Menu ID="Menu1" runat="server">
|
||||
<f:MenuButton ID="btnMenuEdit" OnClick="btnMenuEdit_Click" Icon="BulletEdit" EnablePostBack="true"
|
||||
runat="server" Text="<%$ Resources:Lan,Edit %>">
|
||||
</f:MenuButton>
|
||||
<f:MenuButton ID="btnMenuDelete" OnClick="btnMenuDelete_Click" EnablePostBack="true"
|
||||
Icon="Delete" ConfirmText="<%$ Resources:Lan,DeleteReminder %>" ConfirmTarget="Top"
|
||||
runat="server" Text="<%$ Resources:Lan,Delete %>">
|
||||
</f:MenuButton>
|
||||
<f:MenuButton ID="btnMenuView" OnClick="btnMenuView_Click" Icon="Find" EnablePostBack="true"
|
||||
runat="server" Text="<%$ Resources:Lan,View %>">
|
||||
</f:MenuButton>
|
||||
</f:Menu>
|
||||
</form>
|
||||
<script type="text/javascript">
|
||||
var menuID = '<%= Menu1.ClientID %>';
|
||||
// 返回false,来阻止浏览器右键菜单
|
||||
function onRowContextMenu(event, rowId) {
|
||||
F(menuID).show(); //showAt(event.pageX, event.pageY);
|
||||
return false;
|
||||
}
|
||||
|
||||
function reloadGrid() {
|
||||
__doPostBack(null, 'reloadGrid');
|
||||
}
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,248 @@
|
|||
using BLL;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Data.SqlClient;
|
||||
using System.Data;
|
||||
using System.Linq;
|
||||
using System.Web;
|
||||
using System.Web.UI;
|
||||
using System.Web.UI.WebControls;
|
||||
using AspNet = System.Web.UI.WebControls;
|
||||
using static System.Windows.Forms.VisualStyles.VisualStyleElement;
|
||||
|
||||
namespace FineUIPro.Web.WeldingProcess.WeldingManage
|
||||
{
|
||||
public partial class DailyReportComplete : PageBase
|
||||
{
|
||||
#region 加载
|
||||
/// <summary>
|
||||
/// 加载页面
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void Page_Load(object sender, EventArgs e)
|
||||
{
|
||||
if (!IsPostBack)
|
||||
{
|
||||
this.ddlPageSize.SelectedValue = this.Grid1.PageSize.ToString();
|
||||
var teamGroup = BLL.Welder_TeamGroupService.GetAllTeamGroupList(CurrUser.LoginProjectId, "");
|
||||
drpTeamGroup.DataValueField = "Value";
|
||||
drpTeamGroup.DataTextField = "Text";
|
||||
drpTeamGroup.DataSource = teamGroup;
|
||||
drpTeamGroup.DataBind();
|
||||
Funs.FineUIPleaseSelect(drpTeamGroup, "");
|
||||
this.BindGrid();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 绑定数据
|
||||
/// </summary>
|
||||
private void BindGrid()
|
||||
{
|
||||
string strSql = @"SELECT daily.DailyReportCompleteId,unit.UnitCode,team.TeamGroupName,daily.DailyReportDate,daily.IsComplete
|
||||
FROM dbo.Pipeline_DailyReportComplete daily
|
||||
LEFT JOIN dbo.Welder_TeamGroup team ON team.TeamGroupId = daily.TeamGroupId
|
||||
LEFT JOIN dbo.Base_Unit unit ON unit.UnitId = daily.UnitId
|
||||
WHERE 1=1";
|
||||
List<SqlParameter> parms = new List<SqlParameter>();
|
||||
if (this.drpTeamGroup.SelectedValue != "" && this.drpTeamGroup.SelectedValue!=Const._Null)
|
||||
{
|
||||
strSql += " and daily.TeamGroupId = @TeamGroupId ";
|
||||
parms.Add(new SqlParameter("@TeamGroupId", this.drpTeamGroup.SelectedValue));
|
||||
}
|
||||
strSql += " ORDER BY daily.DailyReportDate DESC ";
|
||||
SqlParameter[] parameter = parms.ToArray();
|
||||
DataTable dt = SQLHelper.GetDataTableRunText(strSql, parameter);
|
||||
Grid1.RecordCount = dt.Rows.Count;
|
||||
var table = this.GetPagedDataTable(Grid1, dt);
|
||||
Grid1.DataSource = table;
|
||||
Grid1.DataBind();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 改变索引事件
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void Grid1_PageIndexChange(object sender, GridPageEventArgs e)
|
||||
{
|
||||
BindGrid();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 分页下拉选择事件
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void ddlPageSize_SelectedIndexChanged(object sender, EventArgs e)
|
||||
{
|
||||
Grid1.PageSize = Convert.ToInt32(ddlPageSize.SelectedValue);
|
||||
BindGrid();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 排序
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void Grid1_Sort(object sender, FineUIPro.GridSortEventArgs e)
|
||||
{
|
||||
this.BindGrid();
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region 统计按钮事件
|
||||
/// <summary>
|
||||
/// 统计
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void BtnAnalyse_Click(object sender, EventArgs e)
|
||||
{
|
||||
BindGrid();
|
||||
|
||||
}
|
||||
|
||||
#region 增加按钮事件
|
||||
/// <summary>
|
||||
/// 增加按钮事件
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void btnNew_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (GetButtonPower(Const.BtnAdd))
|
||||
{
|
||||
PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("DailyReportCompleteEdit.aspx", "新增 - ")));
|
||||
}
|
||||
else
|
||||
{
|
||||
Alert.ShowInTop(Resources.Lan.NoPrivilegePrompt, MessageBoxIcon.Warning);
|
||||
return;
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region 编辑/查看/删除数据
|
||||
|
||||
/// <summary>
|
||||
/// 编辑
|
||||
/// </summary>
|
||||
private void EditData()
|
||||
{
|
||||
if (GetButtonPower(BLL.Const.BtnModify))
|
||||
{
|
||||
if (Grid1.SelectedRowIndexArray.Length == 0)
|
||||
{
|
||||
Alert.ShowInParent(Resources.Lan.SelectLeastOneRecord);
|
||||
return;
|
||||
}
|
||||
string Id = Grid1.SelectedRowID;
|
||||
PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("DailyReportCompleteEdit.aspx?completeId={0}", Id, "编辑 - ")));
|
||||
}
|
||||
else
|
||||
{
|
||||
ShowNotify(Resources.Lan.NoPrivilegePrompt, MessageBoxIcon.Warning);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Grid行双击事件
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void Grid1_RowDoubleClick(object sender, GridRowClickEventArgs e)
|
||||
{
|
||||
EditData();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 右键编辑事件
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void btnMenuEdit_Click(object sender, EventArgs e)
|
||||
{
|
||||
this.EditData();
|
||||
}
|
||||
|
||||
protected void btnMenuView_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (GetButtonPower(BLL.Const.BtnSee))
|
||||
{
|
||||
PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("DailyReportCompleteEdit.aspx?completeId={0}", Grid1.SelectedRowID, "查看 - ")));
|
||||
}
|
||||
else
|
||||
{
|
||||
ShowNotify(Resources.Lan.NoPrivilegePrompt, MessageBoxIcon.Warning);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 批量删除数据
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void btnMenuDelete_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (GetButtonPower(BLL.Const.BtnDelete))
|
||||
{
|
||||
string strShowNotify = string.Empty;
|
||||
if (Grid1.SelectedRowIndexArray.Length > 0)
|
||||
{
|
||||
foreach (int rowIndex in Grid1.SelectedRowIndexArray)
|
||||
{
|
||||
string rowID = Grid1.DataKeys[rowIndex][0].ToString();
|
||||
BLL.DailyReportCompleteService.DeleteDailyReportComplete(rowID);
|
||||
BLL.Sys_LogService.AddLog(Const.System_1, this.CurrUser.LoginProjectId, this.CurrUser.UserId, Const.DailyReportCompleteMenuId, Const.BtnDelete, rowID);
|
||||
}
|
||||
}
|
||||
|
||||
if (!string.IsNullOrEmpty(strShowNotify))
|
||||
{
|
||||
Alert.ShowInTop(strShowNotify, MessageBoxIcon.Warning);
|
||||
}
|
||||
else
|
||||
{
|
||||
BindGrid();
|
||||
ShowNotify(Resources.Lan.DeletedSuccessfully, MessageBoxIcon.Success);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
ShowNotify(Resources.Lan.NoPrivilegePrompt, MessageBoxIcon.Warning);
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region 关闭窗口
|
||||
/// <summary>
|
||||
/// 关闭窗口
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void Window1_Close(object sender, EventArgs e)
|
||||
{
|
||||
BindGrid();
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region 获取按钮权限
|
||||
/// <summary>
|
||||
/// 获取按钮权限
|
||||
/// </summary>
|
||||
/// <param name="button"></param>
|
||||
/// <returns></returns>
|
||||
private bool GetButtonPower(string button)
|
||||
{
|
||||
return BLL.CommonService.GetAllButtonPowerList(this.CurrUser.LoginProjectId, this.CurrUser.UserId, BLL.Const.DailyReportCompleteMenuId, button);
|
||||
}
|
||||
#endregion
|
||||
|
||||
#endregion
|
||||
|
||||
}
|
||||
}
|
170
HJGL/FineUIPro.Web/WeldingProcess/WeldingManage/DailyReportComplete.aspx.designer.cs
generated
Normal file
170
HJGL/FineUIPro.Web/WeldingProcess/WeldingManage/DailyReportComplete.aspx.designer.cs
generated
Normal file
|
@ -0,0 +1,170 @@
|
|||
//------------------------------------------------------------------------------
|
||||
// <自动生成>
|
||||
// 此代码由工具生成。
|
||||
//
|
||||
// 对此文件的更改可能导致不正确的行为,如果
|
||||
// 重新生成代码,则所做更改将丢失。
|
||||
// </自动生成>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace FineUIPro.Web.WeldingProcess.WeldingManage
|
||||
{
|
||||
|
||||
|
||||
public partial class DailyReportComplete
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
/// form1 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.HtmlControls.HtmlForm form1;
|
||||
|
||||
/// <summary>
|
||||
/// PageManager1 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.PageManager PageManager1;
|
||||
|
||||
/// <summary>
|
||||
/// Panel1 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Panel Panel1;
|
||||
|
||||
/// <summary>
|
||||
/// Grid1 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Grid Grid1;
|
||||
|
||||
/// <summary>
|
||||
/// Toolbar1 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Toolbar Toolbar1;
|
||||
|
||||
/// <summary>
|
||||
/// drpTeamGroup 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.DropDownList drpTeamGroup;
|
||||
|
||||
/// <summary>
|
||||
/// BtnAnalyse 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Button BtnAnalyse;
|
||||
|
||||
/// <summary>
|
||||
/// ToolbarFill1 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.ToolbarFill ToolbarFill1;
|
||||
|
||||
/// <summary>
|
||||
/// btnNew 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Button btnNew;
|
||||
|
||||
/// <summary>
|
||||
/// ToolbarSeparator1 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.ToolbarSeparator ToolbarSeparator1;
|
||||
|
||||
/// <summary>
|
||||
/// ToolbarText1 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.ToolbarText ToolbarText1;
|
||||
|
||||
/// <summary>
|
||||
/// ddlPageSize 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.DropDownList ddlPageSize;
|
||||
|
||||
/// <summary>
|
||||
/// Window1 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Window Window1;
|
||||
|
||||
/// <summary>
|
||||
/// Menu1 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Menu Menu1;
|
||||
|
||||
/// <summary>
|
||||
/// btnMenuEdit 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.MenuButton btnMenuEdit;
|
||||
|
||||
/// <summary>
|
||||
/// btnMenuDelete 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.MenuButton btnMenuDelete;
|
||||
|
||||
/// <summary>
|
||||
/// btnMenuView 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.MenuButton btnMenuView;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,54 @@
|
|||
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="DailyReportCompleteEdit.aspx.cs" Inherits="FineUIPro.Web.WeldingProcess.WeldingManage.DailyReportCompleteEdit" %>
|
||||
|
||||
<!DOCTYPE html>
|
||||
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head runat="server">
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
|
||||
<title></title>
|
||||
</head>
|
||||
<body>
|
||||
<form id="form1" runat="server">
|
||||
<f:PageManager ID="PageManager1" AutoSizePanelID="SimpleForm1" runat="server" />
|
||||
<f:Form ID="SimpleForm1" ShowBorder="false" ShowHeader="false" AutoScroll="true"
|
||||
BodyPadding="10px" runat="server" RedStarPosition="BeforeText" LabelAlign="Right">
|
||||
<Rows>
|
||||
<f:FormRow>
|
||||
<Items>
|
||||
<f:DropDownList ID="drpUnit" runat="server" Label="单位名称">
|
||||
</f:DropDownList>
|
||||
</Items>
|
||||
</f:FormRow>
|
||||
<f:FormRow>
|
||||
<Items>
|
||||
<f:DropDownList ID="drpTeamGroup" runat="server" Label="施工班组" Required="true" ShowRedStar="true">
|
||||
</f:DropDownList>
|
||||
</Items>
|
||||
</f:FormRow>
|
||||
<f:FormRow>
|
||||
<Items>
|
||||
<f:DatePicker ID="txtDailyReportDate" runat="server" Label="日报日期" Required="true" ShowRedStar="true"></f:DatePicker>
|
||||
</Items>
|
||||
</f:FormRow>
|
||||
<f:FormRow>
|
||||
<Items>
|
||||
<f:CheckBox ID="chkIsComplete" runat="server" Text="是否完成">
|
||||
</f:CheckBox>
|
||||
</Items>
|
||||
</f:FormRow>
|
||||
</Rows>
|
||||
<Toolbars>
|
||||
<f:Toolbar ID="Toolbar1" Position="Bottom" ToolbarAlign="Right" runat="server">
|
||||
<Items>
|
||||
<f:Button ID="btnSave" Icon="SystemSave" runat="server" Text="提交数据" ValidateForms="SimpleForm1"
|
||||
OnClick="btnSave_Click">
|
||||
</f:Button>
|
||||
<f:Button ID="btnClose" EnablePostBack="false" Text="关闭" runat="server" Icon="SystemClose">
|
||||
</f:Button>
|
||||
</Items>
|
||||
</f:Toolbar>
|
||||
</Toolbars>
|
||||
</f:Form>
|
||||
</form>
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,124 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Web;
|
||||
using System.Web.UI;
|
||||
using System.Web.UI.WebControls;
|
||||
using BLL;
|
||||
|
||||
namespace FineUIPro.Web.WeldingProcess.WeldingManage
|
||||
{
|
||||
public partial class DailyReportCompleteEdit : PageBase
|
||||
{
|
||||
protected void Page_Load(object sender, EventArgs e)
|
||||
{
|
||||
if (!IsPostBack)
|
||||
{
|
||||
LoadData();
|
||||
string completeId = Request.Params["completeId"];
|
||||
BLL.Base_UnitService.InitUnitDropDownList(this.drpUnit, false, BLL.Const.UnitType_5, Resources.Lan.PleaseSelect);//单位
|
||||
|
||||
var teamGroup = BLL.Welder_TeamGroupService.GetAllTeamGroupList(CurrUser.LoginProjectId, "");
|
||||
drpTeamGroup.DataValueField = "Value";
|
||||
drpTeamGroup.DataTextField = "Text";
|
||||
drpTeamGroup.DataSource = teamGroup;
|
||||
drpTeamGroup.DataBind();
|
||||
Funs.FineUIPleaseSelect(drpTeamGroup, "");
|
||||
|
||||
if (!string.IsNullOrEmpty(completeId))
|
||||
{
|
||||
var daily = BLL.DailyReportCompleteService.GetDailyReportComplete(completeId);
|
||||
if (daily != null)
|
||||
{
|
||||
drpUnit.SelectedValue=daily.UnitId;
|
||||
drpTeamGroup.SelectedValue = daily.TeamGroupId;
|
||||
if (daily.DailyReportDate.HasValue)
|
||||
{
|
||||
this.txtDailyReportDate.Text = string.Format("{0:yyyy-MM-dd}", daily.DailyReportDate);
|
||||
}
|
||||
if (daily.IsComplete == true)
|
||||
{
|
||||
chkIsComplete.Checked = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
chkIsComplete.Checked = false;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 加载页面
|
||||
/// </summary>
|
||||
private void LoadData()
|
||||
{
|
||||
btnClose.OnClientClick = ActiveWindow.GetHideReference();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 提交按钮
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void btnSave_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (CommonService.GetAllButtonPowerList(this.CurrUser.LoginProjectId, this.CurrUser.UserId, Const.RoleMenuId, Const.BtnSave))
|
||||
{
|
||||
string completeId = Request.Params["completeId"];
|
||||
if (drpTeamGroup.SelectedValue == null || drpTeamGroup.SelectedValue == "")
|
||||
{
|
||||
Alert.ShowInParent("施工班组不能为空!");
|
||||
return;
|
||||
}
|
||||
|
||||
string param = completeId != null ? completeId.ToString() : "";
|
||||
if (BLL.DailyReportCompleteService.IsExistDailyReportComplete(this.CurrUser.LoginProjectId, param, drpTeamGroup.SelectedValue,Convert.ToDateTime(txtDailyReportDate.Text).Date))
|
||||
{
|
||||
Alert.ShowInParent("该施工班组这天的日报情况已存在!");
|
||||
return;
|
||||
}
|
||||
else
|
||||
{
|
||||
Model.Pipeline_DailyReportComplete newR = new Model.Pipeline_DailyReportComplete();
|
||||
newR.ProjectId = this.CurrUser.LoginProjectId;
|
||||
newR.UnitId = drpUnit.SelectedValue;
|
||||
newR.TeamGroupId = drpTeamGroup.SelectedValue;
|
||||
newR.DailyReportDate=Convert.ToDateTime(txtDailyReportDate.Text).Date;
|
||||
newR.IsComplete=chkIsComplete.Checked;
|
||||
|
||||
|
||||
if (this.chkIsComplete.Checked)
|
||||
{
|
||||
newR.IsComplete = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
newR.IsComplete = false;
|
||||
}
|
||||
|
||||
if (string.IsNullOrEmpty(completeId))
|
||||
{
|
||||
string newKeyID = SQLHelper.GetNewID(typeof(Model.Pipeline_DailyReportComplete));
|
||||
newR.DailyReportCompleteId = newKeyID;
|
||||
BLL.DailyReportCompleteService.AddDailyReportComplete(newR);
|
||||
BLL.Sys_LogService.AddLog(Const.System_1, this.CurrUser.LoginProjectId, this.CurrUser.UserId, Const.DailyReportCompleteMenuId, Const.BtnAdd, newKeyID);
|
||||
}
|
||||
else
|
||||
{
|
||||
newR.DailyReportCompleteId = completeId;
|
||||
BLL.DailyReportCompleteService.UpdateDailyReportComplete(newR);
|
||||
BLL.Sys_LogService.AddLog(Const.System_1, this.CurrUser.LoginProjectId, this.CurrUser.UserId, Const.DailyReportCompleteMenuId, Const.BtnModify, completeId);
|
||||
}
|
||||
PageContext.RegisterStartupScript(ActiveWindow.GetHidePostBackReference());
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
ShowNotify("您没有这个权限,请与管理员联系!");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
107
HJGL/FineUIPro.Web/WeldingProcess/WeldingManage/DailyReportCompleteEdit.aspx.designer.cs
generated
Normal file
107
HJGL/FineUIPro.Web/WeldingProcess/WeldingManage/DailyReportCompleteEdit.aspx.designer.cs
generated
Normal file
|
@ -0,0 +1,107 @@
|
|||
//------------------------------------------------------------------------------
|
||||
// <自动生成>
|
||||
// 此代码由工具生成。
|
||||
//
|
||||
// 对此文件的更改可能导致不正确的行为,如果
|
||||
// 重新生成代码,则所做更改将丢失。
|
||||
// </自动生成>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace FineUIPro.Web.WeldingProcess.WeldingManage
|
||||
{
|
||||
|
||||
|
||||
public partial class DailyReportCompleteEdit
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
/// form1 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.HtmlControls.HtmlForm form1;
|
||||
|
||||
/// <summary>
|
||||
/// PageManager1 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.PageManager PageManager1;
|
||||
|
||||
/// <summary>
|
||||
/// SimpleForm1 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Form SimpleForm1;
|
||||
|
||||
/// <summary>
|
||||
/// drpUnit 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.DropDownList drpUnit;
|
||||
|
||||
/// <summary>
|
||||
/// drpTeamGroup 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.DropDownList drpTeamGroup;
|
||||
|
||||
/// <summary>
|
||||
/// txtDailyReportDate 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.DatePicker txtDailyReportDate;
|
||||
|
||||
/// <summary>
|
||||
/// chkIsComplete 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.CheckBox chkIsComplete;
|
||||
|
||||
/// <summary>
|
||||
/// Toolbar1 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Toolbar Toolbar1;
|
||||
|
||||
/// <summary>
|
||||
/// btnSave 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Button btnSave;
|
||||
|
||||
/// <summary>
|
||||
/// btnClose 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Button btnClose;
|
||||
}
|
||||
}
|
|
@ -74,6 +74,7 @@ namespace FineUIPro.Web.WeldingProcess.WeldingReport
|
|||
Grid1.DataBind();
|
||||
|
||||
var distinctPipelineCode = tb.AsEnumerable().GroupBy(row => row.Field<string>("PipelineCode")).Select(group => group.First());
|
||||
var distinctSingleNumber = tb.AsEnumerable().GroupBy(row => row.Field<string>("SingleNumber")).Select(group => group.First());
|
||||
var backingWelder = tb.AsEnumerable().Where(row => row.Field<string>("BackingWelderCode")!=null).GroupBy(row => row.Field<string>("BackingWelderCode")).Select(group => group.First());
|
||||
var coverWelder = tb.AsEnumerable().Where(row => row.Field<string>("CoverWelderCode")!= null).GroupBy(row => row.Field<string>("CoverWelderCode")).Select(group => group.First());
|
||||
var jotNum = from x in tb.AsEnumerable()
|
||||
|
@ -82,6 +83,7 @@ namespace FineUIPro.Web.WeldingProcess.WeldingReport
|
|||
select new { pipe=g.Key.pipe,jot=g.Key.jot, Size=g.Key.Size };
|
||||
JObject summary = new JObject();
|
||||
summary.Add("tfNumber", "合计");
|
||||
summary.Add("SingleNumber", distinctSingleNumber.Count().ToString());
|
||||
summary.Add("PipelineCode", distinctPipelineCode.Count().ToString());
|
||||
summary.Add("WeldJointCode", jotNum.Count());
|
||||
summary.Add("JOT_Size", jotNum.Sum(x=>Convert.ToDouble(x.Size)));
|
||||
|
@ -388,6 +390,7 @@ namespace FineUIPro.Web.WeldingProcess.WeldingReport
|
|||
}
|
||||
|
||||
var distinctPipelineCode = tb.AsEnumerable().GroupBy(row => row.Field<string>("PipelineCode")).Select(group => group.First());
|
||||
var distinctSingleNumber = tb.AsEnumerable().GroupBy(row => row.Field<string>("SingleNumber")).Select(group => group.First());
|
||||
var backingWelder = tb.AsEnumerable().GroupBy(row => row.Field<string>("BackingWelderCode")).Select(group => group.First());
|
||||
var coverWelder = tb.AsEnumerable().GroupBy(row => row.Field<string>("CoverWelderCode")).Select(group => group.First());
|
||||
var jotNum = from x in tb.AsEnumerable()
|
||||
|
@ -401,6 +404,11 @@ namespace FineUIPro.Web.WeldingProcess.WeldingReport
|
|||
reportModel.GetRow(rowIndex).GetCell(0).SetCellValue("合计:");
|
||||
reportModel.GetRow(rowIndex).GetCell(0).CellStyle.SetFont(cs_content_Font);//将字体绑定到样式
|
||||
|
||||
//单线图号
|
||||
if (reportModel.GetRow(rowIndex).GetCell(4) == null) reportModel.GetRow(rowIndex).CreateCell(4);
|
||||
reportModel.GetRow(rowIndex).GetCell(4).SetCellValue(distinctSingleNumber.Count().ToString());
|
||||
reportModel.GetRow(rowIndex).GetCell(4).CellStyle.SetFont(cs_content_Font);
|
||||
|
||||
//管线号
|
||||
if (reportModel.GetRow(rowIndex).GetCell(5) == null) reportModel.GetRow(rowIndex).CreateCell(5);
|
||||
reportModel.GetRow(rowIndex).GetCell(5).SetCellValue(distinctPipelineCode.Count().ToString());
|
||||
|
|
File diff suppressed because it is too large
Load Diff
Binary file not shown.
Loading…
Reference in New Issue