This commit is contained in:
parent
8b222bd7c3
commit
6b59df065d
Binary file not shown.
Binary file not shown.
|
@ -162,7 +162,7 @@
|
||||||
</site>
|
</site>
|
||||||
<site name="WebApi" id="2">
|
<site name="WebApi" id="2">
|
||||||
<application path="/" applicationPool="Clr4IntegratedAppPool">
|
<application path="/" applicationPool="Clr4IntegratedAppPool">
|
||||||
<virtualDirectory path="/" physicalPath="E:\湛江巴斯夫\Basf_TCC7\HJGL\WebApi" />
|
<virtualDirectory path="/" physicalPath="E:\MyProject\ZJ_BSF\Basf_TCC7\HJGL\WebApi" />
|
||||||
</application>
|
</application>
|
||||||
<bindings>
|
<bindings>
|
||||||
<binding protocol="http" bindingInformation="*:3862:localhost" />
|
<binding protocol="http" bindingInformation="*:3862:localhost" />
|
||||||
|
@ -250,7 +250,7 @@
|
||||||
</site>
|
</site>
|
||||||
<site name="FineUIPro.Web(10)" id="13">
|
<site name="FineUIPro.Web(10)" id="13">
|
||||||
<application path="/" applicationPool="Clr4IntegratedAppPool">
|
<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>
|
</application>
|
||||||
<bindings>
|
<bindings>
|
||||||
<binding protocol="http" bindingInformation="*:13960:localhost" />
|
<binding protocol="http" bindingInformation="*:13960:localhost" />
|
||||||
|
|
Binary file not shown.
|
@ -112,6 +112,11 @@ namespace BLL
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public const string BtnCancelAuditing = "取消审核";
|
public const string BtnCancelAuditing = "取消审核";
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 发送邮件
|
||||||
|
/// </summary>
|
||||||
|
public const string BtnSendEmail = "发送邮件";
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 焊口取消
|
/// 焊口取消
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
@ -655,6 +660,11 @@ namespace BLL
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 焊接日报导出
|
||||||
|
/// </summary>
|
||||||
|
public const string WeldDailyExportMenuId = "CE3B4B0E-C751-4BA6-A7AF-A46D434AD6DD";
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
|
@ -2,6 +2,8 @@ using System;
|
||||||
using System.Data;
|
using System.Data;
|
||||||
using System.Data.SqlClient;
|
using System.Data.SqlClient;
|
||||||
using System.Collections;
|
using System.Collections;
|
||||||
|
using NPOI.SS.Formula.Functions;
|
||||||
|
using System.Text;
|
||||||
|
|
||||||
namespace BLL
|
namespace BLL
|
||||||
{
|
{
|
||||||
|
@ -995,7 +997,5 @@ namespace BLL
|
||||||
}
|
}
|
||||||
return i;
|
return i;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -76,7 +76,8 @@ namespace BLL
|
||||||
AcceptLevel = pointBatchItem.AcceptLevel,
|
AcceptLevel = pointBatchItem.AcceptLevel,
|
||||||
RepairRecordId = pointBatchItem.RepairRecordId,
|
RepairRecordId = pointBatchItem.RepairRecordId,
|
||||||
BatchOrder = pointBatchItem.BatchOrder,
|
BatchOrder = pointBatchItem.BatchOrder,
|
||||||
IsCompletedPoint=pointBatchItem.IsCompletedPoint
|
IsCompletedPoint=pointBatchItem.IsCompletedPoint,
|
||||||
|
EnterDate = pointBatchItem.EnterDate
|
||||||
};
|
};
|
||||||
db.Batch_PointBatchItem.InsertOnSubmit(newPointBatchItem);
|
db.Batch_PointBatchItem.InsertOnSubmit(newPointBatchItem);
|
||||||
db.SubmitChanges();
|
db.SubmitChanges();
|
||||||
|
@ -204,7 +205,13 @@ namespace BLL
|
||||||
|
|
||||||
db.SubmitChanges();
|
db.SubmitChanges();
|
||||||
}
|
}
|
||||||
public static void UpdatePointBatchOrder(string pointBatchItemId, int batchOrder)
|
|
||||||
|
/// <summary>
|
||||||
|
/// 批次段完成
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="pointBatchItemId"></param>
|
||||||
|
/// <param name="batchOrder"></param>
|
||||||
|
public static void UpdatePointBatchOrder(string pointBatchItemId, bool batchOrder)
|
||||||
{
|
{
|
||||||
Model.HJGLDB db = Funs.DB;
|
Model.HJGLDB db = Funs.DB;
|
||||||
Model.Batch_PointBatchItem newPointBatchItem = db.Batch_PointBatchItem.FirstOrDefault(e => e.PointBatchItemId == pointBatchItemId);
|
Model.Batch_PointBatchItem newPointBatchItem = db.Batch_PointBatchItem.FirstOrDefault(e => e.PointBatchItemId == pointBatchItemId);
|
||||||
|
@ -305,6 +312,7 @@ namespace BLL
|
||||||
newPointBatchItem.AcceptLevel = "Ⅰ";
|
newPointBatchItem.AcceptLevel = "Ⅰ";
|
||||||
}
|
}
|
||||||
newPointBatchItem.IsCompletedPoint = false;
|
newPointBatchItem.IsCompletedPoint = false;
|
||||||
|
newPointBatchItem.EnterDate = DateTime.Now;
|
||||||
BLL.Batch_PointBatchItemService.AddPointBatchItem(newPointBatchItem); // 插入明细表
|
BLL.Batch_PointBatchItemService.AddPointBatchItem(newPointBatchItem); // 插入明细表
|
||||||
|
|
||||||
|
|
||||||
|
@ -322,23 +330,14 @@ namespace BLL
|
||||||
&& (j.CoverWelderId == coverWelderId || j.BackingWelderId==backingWelderId)
|
&& (j.CoverWelderId == coverWelderId || j.BackingWelderId==backingWelderId)
|
||||||
&& x.PointDate.HasValue
|
&& x.PointDate.HasValue
|
||||||
select x;
|
select x;
|
||||||
if (Funs.UsingUnit == "TCC11")
|
|
||||||
{
|
|
||||||
if (threeJot.Count() <= 1)
|
|
||||||
{
|
|
||||||
UpdatePointBatchItem(pointBatchItemId, "1", System.DateTime.Now, null);
|
|
||||||
UpdateWelderFirst(pointBatchItemId, true);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
if (threeJot.Count() <= 2)
|
if (threeJot.Count() <= 2)
|
||||||
{
|
{
|
||||||
UpdatePointBatchItem(pointBatchItemId, "1", System.DateTime.Now, null);
|
UpdatePointBatchItem(pointBatchItemId, "1", System.DateTime.Now, null);
|
||||||
UpdateWelderFirst(pointBatchItemId, true);
|
UpdateWelderFirst(pointBatchItemId, true);
|
||||||
|
UpdatePointBatchOrder(pointBatchItemId, true);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
//// 焊工在这个批首道口RT要覆盖 不要了
|
#region 焊工在这个批首道口RT要覆盖 不要了
|
||||||
//var joints = from x in Funs.DB.Batch_PointBatchItem
|
//var joints = from x in Funs.DB.Batch_PointBatchItem
|
||||||
// join y in Funs.DB.Batch_PointBatch on x.PointBatchId equals y.PointBatchId
|
// join y in Funs.DB.Batch_PointBatch on x.PointBatchId equals y.PointBatchId
|
||||||
// join z in Funs.DB.Base_DetectionType on y.DetectionTypeId equals z.DetectionTypeId
|
// join z in Funs.DB.Base_DetectionType on y.DetectionTypeId equals z.DetectionTypeId
|
||||||
|
@ -351,81 +350,87 @@ namespace BLL
|
||||||
// UpdatePointBatchItem(pointBatchItemId, "1", System.DateTime.Now, null);
|
// UpdatePointBatchItem(pointBatchItemId, "1", System.DateTime.Now, null);
|
||||||
// UpdatePipelineFirst(pointBatchItemId, true);
|
// UpdatePipelineFirst(pointBatchItemId, true);
|
||||||
//}
|
//}
|
||||||
|
#endregion
|
||||||
|
|
||||||
// 管径大于等于500必点
|
// 管径大于等于500必点
|
||||||
if (jot.Dia >= 500)
|
if (jot.Dia >= 500)
|
||||||
{
|
{
|
||||||
UpdatePointBatchItem(pointBatchItemId, "1", System.DateTime.Now, null);
|
UpdatePointBatchItem(pointBatchItemId, "1", System.DateTime.Now, null);
|
||||||
|
UpdatePointBatchOrder(pointBatchItemId, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (jot.IsGoldJoint == true)
|
if (jot.IsGoldJoint == true)
|
||||||
{
|
{
|
||||||
UpdatePointBatchItem(pointBatchItemId, "1", System.DateTime.Now, null);
|
UpdatePointBatchItem(pointBatchItemId, "1", System.DateTime.Now, null);
|
||||||
|
UpdatePointBatchOrder(pointBatchItemId, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
// 一个段位的数量
|
|
||||||
int dnum = Convert.ToInt32((double)100 / (double)rate.DetectionRateValue);
|
|
||||||
|
|
||||||
// 批里未完成点口的焊口
|
#region 暂不用了
|
||||||
var totalJot = from x in Funs.DB.Batch_PointBatchItem
|
//// 一个段位的数量
|
||||||
join y in Funs.DB.Pipeline_WeldJoint on x.WeldJointId equals y.WeldJointId
|
//int dnum = Convert.ToInt32((double)100 / (double)rate.DetectionRateValue);
|
||||||
where x.PointBatchId == pointBatchId && x.IsCompletedPoint == false
|
|
||||||
&& (y.CoverWelderId==coverWelderId || y.BackingWelderId==backingWelderId)
|
|
||||||
&& y.WeldingDate.HasValue
|
|
||||||
&& (y.IsCancel == false || y.IsCancel == null)
|
|
||||||
select x;
|
|
||||||
int totalnum = totalJot.Count();
|
|
||||||
// 时间>15处理放globle
|
|
||||||
//DateTime lastWeldingDate = totalJot.Select(x => x.WeldingDate.Value).Min();
|
|
||||||
//if((DateTime.Now.Date- lastWeldingDate).Days>=15)
|
|
||||||
|
|
||||||
// 该段达到检测比例的数量
|
//// 批里未完成点口的焊口
|
||||||
if (dnum == totalnum)
|
//var totalJot = from x in Funs.DB.Batch_PointBatchItem
|
||||||
{
|
// join y in Funs.DB.Pipeline_WeldJoint on x.WeldJointId equals y.WeldJointId
|
||||||
var GJot = from x in Funs.DB.Batch_PointBatchItem
|
// where x.PointBatchId == pointBatchId && x.IsCompletedPoint == false
|
||||||
join y in Funs.DB.Pipeline_WeldJoint on x.WeldJointId equals y.WeldJointId
|
// && (y.CoverWelderId==coverWelderId || y.BackingWelderId==backingWelderId)
|
||||||
where x.PointBatchId == pointBatchId && x.IsCompletedPoint == false
|
// && y.WeldingDate.HasValue
|
||||||
&& (y.IsCancel == false || y.IsCancel == null) && y.JointAttribute== "固定F"
|
// && (y.IsCancel == false || y.IsCancel == null)
|
||||||
select x;
|
// select x;
|
||||||
|
//int totalnum = totalJot.Count();
|
||||||
|
//// 时间>15处理放globle
|
||||||
|
////DateTime lastWeldingDate = totalJot.Select(x => x.WeldingDate.Value).Min();
|
||||||
|
////if((DateTime.Now.Date- lastWeldingDate).Days>=15)
|
||||||
|
|
||||||
// 先查找固定口数量,如有固定口,则优先点
|
//// 该段达到检测比例的数量
|
||||||
if (GJot.Count() > 0)
|
//if (dnum == totalnum)
|
||||||
{
|
//{
|
||||||
int Gnum = GJot.Count();
|
// var GJot = from x in Funs.DB.Batch_PointBatchItem
|
||||||
int rnum = Funs.GetRandomNum(1, Gnum);
|
// join y in Funs.DB.Pipeline_WeldJoint on x.WeldJointId equals y.WeldJointId
|
||||||
int j = 1;
|
// where x.PointBatchId == pointBatchId && x.IsCompletedPoint == false
|
||||||
foreach (var g in GJot)
|
// && (y.IsCancel == false || y.IsCancel == null) && y.JointAttribute== "固定F"
|
||||||
{
|
// select x;
|
||||||
if (rnum == j)
|
|
||||||
{
|
|
||||||
UpdatePointBatchItem(g.PointBatchItemId, "1", System.DateTime.Now, null);
|
|
||||||
}
|
|
||||||
j++;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
int rnum = Funs.GetRandomNum(1, totalnum);
|
|
||||||
int j = 1;
|
|
||||||
foreach (var g in totalJot)
|
|
||||||
{
|
|
||||||
if (rnum == j)
|
|
||||||
{
|
|
||||||
UpdatePointBatchItem(g.PointBatchItemId, "1", System.DateTime.Now, null);
|
|
||||||
}
|
|
||||||
j++;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
int batchOrder= GetMaxBatchOrder(pointBatchId);
|
// // 先查找固定口数量,如有固定口,则优先点
|
||||||
// 点口后,更新该段批里的所有口为完成点口,并更新分段的顺序
|
// if (GJot.Count() > 0)
|
||||||
foreach (var g in totalJot)
|
// {
|
||||||
{
|
// int Gnum = GJot.Count();
|
||||||
UpdateIsCompletedPoint(g.PointBatchItemId, true);
|
// int rnum = Funs.GetRandomNum(1, Gnum);
|
||||||
UpdatePointBatchOrder(g.PointBatchItemId, batchOrder);
|
// int j = 1;
|
||||||
}
|
// foreach (var g in GJot)
|
||||||
}
|
// {
|
||||||
|
// if (rnum == j)
|
||||||
|
// {
|
||||||
|
// UpdatePointBatchItem(g.PointBatchItemId, "1", System.DateTime.Now, null);
|
||||||
|
// }
|
||||||
|
// j++;
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
// else
|
||||||
|
// {
|
||||||
|
// int rnum = Funs.GetRandomNum(1, totalnum);
|
||||||
|
// int j = 1;
|
||||||
|
// foreach (var g in totalJot)
|
||||||
|
// {
|
||||||
|
// if (rnum == j)
|
||||||
|
// {
|
||||||
|
// UpdatePointBatchItem(g.PointBatchItemId, "1", System.DateTime.Now, null);
|
||||||
|
// }
|
||||||
|
// j++;
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
|
||||||
|
// //int batchOrder= GetMaxBatchOrder(pointBatchId);
|
||||||
|
// // 点口后,更新该段批里的所有口为完成点口,并更新分段的顺序
|
||||||
|
// foreach (var g in totalJot)
|
||||||
|
// {
|
||||||
|
// UpdateIsCompletedPoint(g.PointBatchItemId, true);
|
||||||
|
// //UpdatePointBatchOrder(g.PointBatchItemId, batchOrder);
|
||||||
|
// }
|
||||||
|
//}
|
||||||
|
#endregion
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -822,17 +827,17 @@ namespace BLL
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
// 返回进批的顺序
|
// 返回进批的顺序
|
||||||
public static int GetMaxBatchOrder(string pointBatchId)
|
//public static int GetMaxBatchOrder(string pointBatchId)
|
||||||
{
|
//{
|
||||||
int orderNum = 1;
|
// int orderNum = 1;
|
||||||
Model.HJGLDB db = Funs.DB;
|
// Model.HJGLDB db = Funs.DB;
|
||||||
var batchItem = db.Batch_PointBatchItem.Where(x => x.PointBatchId == pointBatchId && x.IsCompletedPoint==true);
|
// var batchItem = db.Batch_PointBatchItem.Where(x => x.PointBatchId == pointBatchId && x.IsCompletedPoint==true);
|
||||||
if (batchItem.Count() > 0)
|
// if (batchItem.Count() > 0)
|
||||||
{
|
// {
|
||||||
orderNum = (batchItem.Max(x => x.BatchOrder) != null ? batchItem.Max(x => x.BatchOrder).Value : 0) + 1;
|
// orderNum = (batchItem.Max(x => x.BatchOrder) != null ? batchItem.Max(x => x.BatchOrder).Value : 0) + 1;
|
||||||
}
|
// }
|
||||||
return orderNum;
|
// return orderNum;
|
||||||
}
|
//}
|
||||||
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<ProjectView>ProjectFiles</ProjectView>
|
<ProjectView>ProjectFiles</ProjectView>
|
||||||
<LastActiveSolutionConfig>Debug|Any CPU</LastActiveSolutionConfig>
|
<LastActiveSolutionConfig>Release|Any CPU</LastActiveSolutionConfig>
|
||||||
<UseIISExpress>true</UseIISExpress>
|
<UseIISExpress>true</UseIISExpress>
|
||||||
<Use64BitIISExpress />
|
<Use64BitIISExpress />
|
||||||
<IISExpressSSLPort />
|
<IISExpressSSLPort />
|
||||||
|
|
|
@ -47,8 +47,8 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
// 开启线程
|
// 开启线程
|
||||||
System.Threading.Thread LoadServiceData = new System.Threading.Thread(new System.Threading.ThreadStart(ExpirePoint));
|
//System.Threading.Thread LoadServiceData = new System.Threading.Thread(new System.Threading.ThreadStart(ExpirePoint));
|
||||||
LoadServiceData.Start();
|
//LoadServiceData.Start();
|
||||||
|
|
||||||
// 开启超焊信息提取
|
// 开启超焊信息提取
|
||||||
System.Threading.Thread LoadServiceSuperQue = new System.Threading.Thread(new System.Threading.ThreadStart(SuperQueWelding));
|
System.Threading.Thread LoadServiceSuperQue = new System.Threading.Thread(new System.Threading.ThreadStart(SuperQueWelding));
|
||||||
|
@ -137,12 +137,12 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
int batchOrder = BLL.Batch_PointBatchItemService.GetMaxBatchOrder(r["PointBatchId"].ToString());
|
//int batchOrder = BLL.Batch_PointBatchItemService.GetMaxBatchOrder(r["PointBatchId"].ToString());
|
||||||
// 点口后,更新该段批里的所有口为完成点口,并更新分段的顺序
|
// 点口后,更新该段批里的所有口为完成点口,并更新分段的顺序
|
||||||
foreach (var g in jotList)
|
foreach (var g in jotList)
|
||||||
{
|
{
|
||||||
BLL.Batch_PointBatchItemService.UpdateIsCompletedPoint(g.PointBatchItemId, true);
|
BLL.Batch_PointBatchItemService.UpdateIsCompletedPoint(g.PointBatchItemId, true);
|
||||||
BLL.Batch_PointBatchItemService.UpdatePointBatchOrder(g.PointBatchItemId, batchOrder);
|
//BLL.Batch_PointBatchItemService.UpdatePointBatchOrder(g.PointBatchItemId, batchOrder);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -162,13 +162,14 @@
|
||||||
|
|
||||||
void SuperQueWelding_Elapsed(object sender, System.Timers.ElapsedEventArgs e)
|
void SuperQueWelding_Elapsed(object sender, System.Timers.ElapsedEventArgs e)
|
||||||
{
|
{
|
||||||
bool canWPS = true;
|
|
||||||
var jotList = (from x in Funs.DB.Pipeline_WeldJoint where x.WeldingDailyId != null && x.WeldingMethodId != null select x).ToList();
|
var jotList = (from x in Funs.DB.Pipeline_WeldJoint where x.WeldingDailyId != null && x.WeldingMethodId != null select x).ToList();
|
||||||
foreach (var jot in jotList)
|
foreach (var jot in jotList)
|
||||||
{
|
{
|
||||||
var wps = BLL.WPQListServiceService.GetWPQById(jot.WPQId);
|
var wps = BLL.WPQListServiceService.GetWPQById(jot.WPQId);
|
||||||
string floorWelder = jot.BackingWelderId;
|
string floorWelder = jot.BackingWelderId;
|
||||||
string cellWelder = jot.CoverWelderId;
|
string cellWelder = jot.CoverWelderId;
|
||||||
|
|
||||||
|
bool canWPS = true;
|
||||||
if (wps != null)
|
if (wps != null)
|
||||||
{
|
{
|
||||||
// 验证焊工WPS资质
|
// 验证焊工WPS资质
|
||||||
|
@ -203,7 +204,11 @@
|
||||||
decimal? sch = jot.Thickness;
|
decimal? sch = jot.Thickness;
|
||||||
|
|
||||||
string[] wmeCodes = mat.WeldingMethodCode.Split('+');
|
string[] wmeCodes = mat.WeldingMethodCode.Split('+');
|
||||||
string location = loc.WeldingLocationCode;
|
string location = string.Empty;
|
||||||
|
if (loc != null)
|
||||||
|
{
|
||||||
|
location = loc.WeldingLocationCode;
|
||||||
|
}
|
||||||
string ste = jot.Material1Id;
|
string ste = jot.Material1Id;
|
||||||
|
|
||||||
List<Model.Welder_WelderQualify> floorWelderQualifys = (from x in Funs.DB.Welder_WelderQualify
|
List<Model.Welder_WelderQualify> floorWelderQualifys = (from x in Funs.DB.Welder_WelderQualify
|
||||||
|
@ -261,14 +266,17 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
if (canWPS == false || canSave == false)
|
if (canWPS == false || canSave == false)
|
||||||
{
|
{
|
||||||
jot.IsSuperQueWelding = true;
|
jot.IsSuperQueWelding = true;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
jot.IsSuperQueWelding = null;
|
||||||
|
}
|
||||||
|
}
|
||||||
Funs.DB.SubmitChanges();
|
Funs.DB.SubmitChanges();
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
protected void Session_Start(object sender, EventArgs e)
|
protected void Session_Start(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
|
|
|
@ -51,7 +51,7 @@
|
||||||
<add path="ChartImg.axd" verb="GET,POST,HEAD" type="System.Web.UI.DataVisualization.Charting.ChartHttpHandler, System.Web.DataVisualization, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" validate="false"/>
|
<add path="ChartImg.axd" verb="GET,POST,HEAD" type="System.Web.UI.DataVisualization.Charting.ChartHttpHandler, System.Web.DataVisualization, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" validate="false"/>
|
||||||
<add path="Reserved.ReportViewerWebControl.axd" verb="*" type="Microsoft.Reporting.WebForms.HttpHandler, Microsoft.ReportViewer.WebForms, Version=15.0.0.0, Culture=neutral, PublicKeyToken=89845DCD8080CC91" validate="false"/>
|
<add path="Reserved.ReportViewerWebControl.axd" verb="*" type="Microsoft.Reporting.WebForms.HttpHandler, Microsoft.ReportViewer.WebForms, Version=15.0.0.0, Culture=neutral, PublicKeyToken=89845DCD8080CC91" validate="false"/>
|
||||||
</httpHandlers>
|
</httpHandlers>
|
||||||
<compilation debug="true" targetFramework="4.8">
|
<compilation debug="false" targetFramework="4.8">
|
||||||
<assemblies>
|
<assemblies>
|
||||||
<!--<add assembly="Microsoft.Build.Framework, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A" />-->
|
<!--<add assembly="Microsoft.Build.Framework, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A" />-->
|
||||||
<add assembly="System.Management, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"/>
|
<add assembly="System.Management, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"/>
|
||||||
|
|
|
@ -88,13 +88,13 @@
|
||||||
</f:RenderField>
|
</f:RenderField>
|
||||||
<f:RenderField Width="100px" ColumnID="CheckDate" DataField="CheckDate" SortField="CheckDate"
|
<f:RenderField Width="100px" ColumnID="CheckDate" DataField="CheckDate" SortField="CheckDate"
|
||||||
FieldType="Date" Renderer="Date" RendererArgument="yyyy-MM-dd" HeaderText="考试日期"
|
FieldType="Date" Renderer="Date" RendererArgument="yyyy-MM-dd" HeaderText="考试日期"
|
||||||
HeaderTextAlign="Center" TextAlign="Center" Locked="true">
|
HeaderTextAlign="Center" TextAlign="Center" Locked="true" Hidden="true">
|
||||||
</f:RenderField>
|
</f:RenderField>
|
||||||
<f:RenderField Width="110px" ColumnID="ExamProject" DataField="ExamProject" SortField="ExamProject"
|
<f:RenderField Width="110px" ColumnID="ExamProject" DataField="ExamProject" SortField="ExamProject"
|
||||||
FieldType="String" HeaderTextAlign="Center" TextAlign="Left" HeaderText="考试项目" Locked="true">
|
FieldType="String" HeaderTextAlign="Center" TextAlign="Left" HeaderText="考试项目" Locked="true" Hidden="true">
|
||||||
</f:RenderField>
|
</f:RenderField>
|
||||||
<f:RenderField Width="110px" ColumnID="IsPass" DataField="IsPass" SortField="IsPass"
|
<f:RenderField Width="110px" ColumnID="IsPass" DataField="IsPass" SortField="IsPass"
|
||||||
FieldType="String" HeaderTextAlign="Center" TextAlign="Left" HeaderText="是否合格" Locked="true">
|
FieldType="String" HeaderTextAlign="Center" TextAlign="Left" HeaderText="是否合格" Locked="true" Hidden="true">
|
||||||
</f:RenderField>
|
</f:RenderField>
|
||||||
<f:RenderField Width="90px" ColumnID="WeldingMethodId" DataField="WeldingMethodId" SortField="WeldingMethodId"
|
<f:RenderField Width="90px" ColumnID="WeldingMethodId" DataField="WeldingMethodId" SortField="WeldingMethodId"
|
||||||
FieldType="String" HeaderTextAlign="Center" TextAlign="Left" HeaderText="焊接类型">
|
FieldType="String" HeaderTextAlign="Center" TextAlign="Left" HeaderText="焊接类型">
|
||||||
|
|
|
@ -41,19 +41,19 @@
|
||||||
</f:FormRow>
|
</f:FormRow>
|
||||||
<f:FormRow>
|
<f:FormRow>
|
||||||
<Items>
|
<Items>
|
||||||
<f:DatePicker runat="server" DateFormatString="yyyy-MM-dd" Label="考试日期" ID="txtCheckDate" LabelWidth="120px" EnableEdit="false">
|
<f:DatePicker runat="server" DateFormatString="yyyy-MM-dd" Label="考试日期" ID="txtCheckDate" LabelWidth="120px" EnableEdit="false" Hidden="true">
|
||||||
</f:DatePicker>
|
</f:DatePicker>
|
||||||
</Items>
|
</Items>
|
||||||
</f:FormRow>
|
</f:FormRow>
|
||||||
<f:FormRow>
|
<f:FormRow>
|
||||||
<Items>
|
<Items>
|
||||||
<f:TextBox ID="txtExamProject" runat="server" Label="考试项目" MaxLength="50" LabelWidth="120px">
|
<f:TextBox ID="txtExamProject" runat="server" Label="考试项目" MaxLength="50" LabelWidth="120px" Hidden="true">
|
||||||
</f:TextBox>
|
</f:TextBox>
|
||||||
</Items>
|
</Items>
|
||||||
</f:FormRow>
|
</f:FormRow>
|
||||||
<f:FormRow>
|
<f:FormRow>
|
||||||
<Items>
|
<Items>
|
||||||
<f:DropDownList ID="drpIsPass" runat="server" Label="是否合格" LabelWidth="120px">
|
<f:DropDownList ID="drpIsPass" runat="server" Label="是否合格" LabelWidth="120px" Hidden="true">
|
||||||
<f:ListItem Value="是" Text="是" Selected="true" />
|
<f:ListItem Value="是" Text="是" Selected="true" />
|
||||||
<f:ListItem Value="否" Text="否" />
|
<f:ListItem Value="否" Text="否" />
|
||||||
</f:DropDownList>
|
</f:DropDownList>
|
||||||
|
|
|
@ -117,6 +117,9 @@
|
||||||
</f:TextBox>
|
</f:TextBox>
|
||||||
<f:ToolbarFill ID="ToolbarFill2" runat="server">
|
<f:ToolbarFill ID="ToolbarFill2" runat="server">
|
||||||
</f:ToolbarFill>
|
</f:ToolbarFill>
|
||||||
|
<f:Button ID="btnExport" Text="打印" ToolTip="导出" EnableAjax="false" DisableControlBeforePostBack="false" Icon="ApplicationGet" runat="server"
|
||||||
|
OnClick="btnExport_Click">
|
||||||
|
</f:Button>
|
||||||
</Items>
|
</Items>
|
||||||
</f:Toolbar>
|
</f:Toolbar>
|
||||||
</Toolbars>
|
</Toolbars>
|
||||||
|
@ -144,11 +147,10 @@
|
||||||
HeaderTextAlign="Center" TextAlign="Left" Width="120px">
|
HeaderTextAlign="Center" TextAlign="Left" Width="120px">
|
||||||
</f:RenderField>
|
</f:RenderField>
|
||||||
<f:RenderField HeaderText="<%$ Resources:Lan,QualityNo %>" ColumnID="QualityNo" DataField="QualityNo"
|
<f:RenderField HeaderText="<%$ Resources:Lan,QualityNo %>" ColumnID="QualityNo" DataField="QualityNo"
|
||||||
FieldType="String" TextAlign="Left" Width="150px">
|
FieldType="String" TextAlign="Left" Width="150px" Hidden="true">
|
||||||
|
|
||||||
</f:RenderField>
|
</f:RenderField>
|
||||||
<f:RenderField HeaderText="<%$ Resources:Lan,Acceptance %>" ColumnID="Acceptance"
|
<f:RenderField HeaderText="<%$ Resources:Lan,Acceptance %>" ColumnID="Acceptance"
|
||||||
DataField="Acceptance" FieldType="String" TextAlign="Left" Width="150px">
|
DataField="Acceptance" FieldType="String" TextAlign="Left" Width="150px" Hidden="true">
|
||||||
|
|
||||||
</f:RenderField>
|
</f:RenderField>
|
||||||
</Columns>
|
</Columns>
|
||||||
|
|
|
@ -4,10 +4,9 @@ using System.Collections.Generic;
|
||||||
using System.Data.SqlClient;
|
using System.Data.SqlClient;
|
||||||
using System.Data;
|
using System.Data;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Web;
|
using NPOI.SS.UserModel;
|
||||||
using System.Web.UI;
|
using NPOI.XSSF.UserModel;
|
||||||
using System.Web.UI.WebControls;
|
|
||||||
using static System.Windows.Forms.VisualStyles.VisualStyleElement;
|
|
||||||
|
|
||||||
namespace FineUIPro.Web.WeldingProcess.PMI
|
namespace FineUIPro.Web.WeldingProcess.PMI
|
||||||
{
|
{
|
||||||
|
@ -384,6 +383,176 @@ namespace FineUIPro.Web.WeldingProcess.PMI
|
||||||
#endregion
|
#endregion
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
|
protected void btnExport_Click(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
Alert.ShowInTop("待开发!", MessageBoxIcon.Warning);
|
||||||
|
return;
|
||||||
|
//if (CommonService.GetAllButtonPowerList(this.CurrUser.LoginProjectId, this.CurrUser.UserId, Const.HJGL_BatchTrustMenuId, Const.BtnOut))
|
||||||
|
//{
|
||||||
|
|
||||||
|
// if (string.IsNullOrWhiteSpace(this.tvControlItem.SelectedNodeID))
|
||||||
|
// {
|
||||||
|
// Alert.ShowInTop("请选择委托单!", MessageBoxIcon.Warning);
|
||||||
|
// return;
|
||||||
|
// }
|
||||||
|
// string rootPath = Server.MapPath("~/") + Const.ExcelUrl;
|
||||||
|
// //导出文件
|
||||||
|
// string filePath = rootPath + DateTime.Now.ToString("yyyyMMddhhmmss") + "\\";
|
||||||
|
// if (!Directory.Exists(filePath))
|
||||||
|
// {
|
||||||
|
// Directory.CreateDirectory(filePath);
|
||||||
|
// }
|
||||||
|
// string ReportFileName = filePath + "out1.xlsx";
|
||||||
|
// int rowIndex = 0;
|
||||||
|
// XSSFWorkbook hssfworkbook = new XSSFWorkbook();
|
||||||
|
// XSSFSheet ws = new XSSFSheet();
|
||||||
|
// string trustBatchId = this.tvControlItem.SelectedNodeID;
|
||||||
|
//}
|
||||||
|
//else
|
||||||
|
//{
|
||||||
|
// ShowNotify(Resources.Lan.NoPrivilegePrompt, MessageBoxIcon.Warning);
|
||||||
|
//}
|
||||||
|
}
|
||||||
|
|
||||||
|
#region 私有方法
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 获取某一列的所有值
|
||||||
|
/// </summary>
|
||||||
|
/// <typeparam name="T">列数据类型</typeparam>
|
||||||
|
/// <param name="dtSource">数据表</param>
|
||||||
|
/// <param name="filedName">列名</param>
|
||||||
|
/// <returns></returns>
|
||||||
|
public static List<T> GetColumnValues<T>(DataTable dtSource, string filedName)
|
||||||
|
{
|
||||||
|
return (from r in dtSource.AsEnumerable() select r.Field<T>(filedName)).ToList<T>();
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 无损检测委托单行和列
|
||||||
|
/// </summary>
|
||||||
|
/// <returns></returns>
|
||||||
|
private XSSFSheet WsExcelCreateRow(XSSFSheet ws, XSSFWorkbook hssfworkbook, int sRows, int eRows, ICellStyle style, int cStart, int cEnd, int excelpart, bool isnobk = false)
|
||||||
|
{
|
||||||
|
for (int i = sRows; i <= eRows; i++)
|
||||||
|
{
|
||||||
|
ws.CreateRow(i);
|
||||||
|
if (excelpart == 1)
|
||||||
|
{
|
||||||
|
ws.GetRow(i).HeightInPoints =
|
||||||
|
i == sRows ? 27.75f :
|
||||||
|
i == (sRows + 1) ? 25.5f :
|
||||||
|
i == (sRows + 2) ? 25.5f :
|
||||||
|
i == (sRows + 3) ? 25.5f :
|
||||||
|
i == (sRows + 4) ? 23.25f :
|
||||||
|
i == (sRows + 5) ? 23.25f :
|
||||||
|
i == (sRows + 6) ? 23.25f :
|
||||||
|
i == (sRows + 7) ? 23.25f :
|
||||||
|
i == (sRows + 8) ? 23.25f :
|
||||||
|
i == (sRows + 9) ? 23.25f :
|
||||||
|
i == (sRows + 10) ? 23.25f :
|
||||||
|
i == (sRows + 11) ? 23.25f :
|
||||||
|
i == (sRows + 12) ? 23.25f :
|
||||||
|
17f;
|
||||||
|
}
|
||||||
|
else if (excelpart == 2)
|
||||||
|
{
|
||||||
|
|
||||||
|
ws.GetRow(i).HeightInPoints = 25.5f;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
ws.GetRow(i).HeightInPoints = 15.5f;
|
||||||
|
}
|
||||||
|
for (int j = cStart; j <= cEnd; j++)
|
||||||
|
{
|
||||||
|
ws.GetRow(i).CreateCell(j);
|
||||||
|
if (isnobk)
|
||||||
|
{
|
||||||
|
ws.GetRow(i).GetCell(j).CellStyle = CommonPrint.SetExcelStyle(hssfworkbook, BorderStyle.None, BorderStyle.None, BorderStyle.None, BorderStyle.None, VerticalAlignment.Center, HorizontalAlignment.Center, 10.5, true, false);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
ws.GetRow(i).GetCell(j).CellStyle = style;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return ws;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 材料及配件检测委托单行和列
|
||||||
|
/// </summary>
|
||||||
|
/// <returns></returns>
|
||||||
|
private XSSFSheet ClExcelCreateRow(XSSFSheet ws, XSSFWorkbook hssfworkbook, int sRows, int eRows, ICellStyle style, int cStart, int cEnd, bool istitle = false, bool isnobk = false)
|
||||||
|
{
|
||||||
|
for (int i = sRows; i <= eRows; i++)
|
||||||
|
{
|
||||||
|
ws.CreateRow(i);
|
||||||
|
if (istitle)
|
||||||
|
{
|
||||||
|
ws.GetRow(i).HeightInPoints =
|
||||||
|
i == sRows ? 27.75f :
|
||||||
|
i == (sRows + 1) ? 25f :
|
||||||
|
i == (sRows + 2) ? 21.75f :
|
||||||
|
i == (sRows + 3) ? 21.75f :
|
||||||
|
i == (sRows + 5) ? 28f :
|
||||||
|
14.75f;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
ws.GetRow(i).HeightInPoints = 14.75f;
|
||||||
|
}
|
||||||
|
for (int j = cStart; j <= cEnd; j++)
|
||||||
|
{
|
||||||
|
ws.GetRow(i).CreateCell(j);
|
||||||
|
if (isnobk)
|
||||||
|
{
|
||||||
|
ws.GetRow(i).GetCell(j).CellStyle = CommonPrint.SetExcelStyle(hssfworkbook, BorderStyle.None, BorderStyle.None, NPOI.SS.UserModel.BorderStyle.None, NPOI.SS.UserModel.BorderStyle.None, VerticalAlignment.Center, HorizontalAlignment.Center, 10, true, false);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
ws.GetRow(i).GetCell(j).CellStyle = style;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return ws;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 查询指定条数分页
|
||||||
|
/// </summary>
|
||||||
|
/// <returns></returns>
|
||||||
|
public static DataTable GetPageToTable(DataTable dt, int StartNum, int EndNum)
|
||||||
|
{
|
||||||
|
//0页代表每页数据,直接返回
|
||||||
|
if (EndNum == 0) return dt;
|
||||||
|
//数据源为空返回空DataTable
|
||||||
|
if (dt == null) return new DataTable();
|
||||||
|
|
||||||
|
DataTable newdt = dt.Copy();
|
||||||
|
newdt.Clear();//copy dt的框架
|
||||||
|
|
||||||
|
if (StartNum >= dt.Rows.Count)
|
||||||
|
return newdt;//源数据记录数小于等于要显示的记录,直接返回dt
|
||||||
|
|
||||||
|
if (EndNum > dt.Rows.Count)
|
||||||
|
EndNum = dt.Rows.Count;
|
||||||
|
for (int i = StartNum; i <= EndNum - 1; i++)
|
||||||
|
{
|
||||||
|
DataRow newdr = newdt.NewRow();
|
||||||
|
DataRow dr = dt.Rows[i];
|
||||||
|
foreach (DataColumn column in dt.Columns)
|
||||||
|
{
|
||||||
|
newdr[column.ColumnName] = dr[column.ColumnName];
|
||||||
|
}
|
||||||
|
newdt.Rows.Add(newdr);
|
||||||
|
}
|
||||||
|
return newdt;
|
||||||
|
}
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
#region 获取按钮权限
|
#region 获取按钮权限
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 获取按钮权限
|
/// 获取按钮权限
|
||||||
|
|
|
@ -257,6 +257,15 @@ namespace FineUIPro.Web.WeldingProcess.PMI
|
||||||
/// </remarks>
|
/// </remarks>
|
||||||
protected global::FineUIPro.ToolbarFill ToolbarFill2;
|
protected global::FineUIPro.ToolbarFill ToolbarFill2;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// btnExport 控件。
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// 自动生成的字段。
|
||||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||||
|
/// </remarks>
|
||||||
|
protected global::FineUIPro.Button btnExport;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// ToolbarSeparator1 控件。
|
/// ToolbarSeparator1 控件。
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|
|
@ -117,14 +117,14 @@
|
||||||
TextAlign="Left" Width="220px">
|
TextAlign="Left" Width="220px">
|
||||||
</f:RenderField>
|
</f:RenderField>
|
||||||
<f:RenderField HeaderText="<%$ Resources:Lan,QualityNo %>" ColumnID="QualityNo" DataField="QualityNo"
|
<f:RenderField HeaderText="<%$ Resources:Lan,QualityNo %>" ColumnID="QualityNo" DataField="QualityNo"
|
||||||
FieldType="String" TextAlign="Left" Width="150px">
|
FieldType="String" TextAlign="Left" Width="150px" Hidden="true">
|
||||||
<Editor>
|
<Editor>
|
||||||
<f:TextBox ID="tbxEditorQualityNo" Required="true" runat="server">
|
<f:TextBox ID="tbxEditorQualityNo" Required="true" runat="server">
|
||||||
</f:TextBox>
|
</f:TextBox>
|
||||||
</Editor>
|
</Editor>
|
||||||
</f:RenderField>
|
</f:RenderField>
|
||||||
<f:RenderField HeaderText="<%$ Resources:Lan,Acceptance %>" ColumnID="Acceptance"
|
<f:RenderField HeaderText="<%$ Resources:Lan,Acceptance %>" ColumnID="Acceptance"
|
||||||
DataField="Acceptance" FieldType="String" TextAlign="Left" Width="150px">
|
DataField="Acceptance" FieldType="String" TextAlign="Left" Width="150px" Hidden="true">
|
||||||
<Editor>
|
<Editor>
|
||||||
<f:TextBox ID="txtEditorAcceptance" Required="true" runat="server">
|
<f:TextBox ID="txtEditorAcceptance" Required="true" runat="server">
|
||||||
</f:TextBox>
|
</f:TextBox>
|
||||||
|
|
|
@ -85,7 +85,15 @@ namespace FineUIPro.Web.WeldingProcess.PMI
|
||||||
this.drpUnitId.SelectedValue = trust.UnitId;
|
this.drpUnitId.SelectedValue = trust.UnitId;
|
||||||
}
|
}
|
||||||
this.txtDetectionMethod.Text = "PMI光谱分析";
|
this.txtDetectionMethod.Text = "PMI光谱分析";
|
||||||
|
if (!string.IsNullOrEmpty(trust.DetectionStandard))
|
||||||
|
{
|
||||||
this.txtDetectionStandard.Text = trust.DetectionStandard;
|
this.txtDetectionStandard.Text = trust.DetectionStandard;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
txtDetectionStandard.Text = "GB 50184-2011";
|
||||||
|
}
|
||||||
|
|
||||||
if (!string.IsNullOrEmpty(trust.Tabler))
|
if (!string.IsNullOrEmpty(trust.Tabler))
|
||||||
{
|
{
|
||||||
this.txtTabler.Text = BLL.Sys_UserService.GetUserNameByUserId(trust.Tabler);
|
this.txtTabler.Text = BLL.Sys_UserService.GetUserNameByUserId(trust.Tabler);
|
||||||
|
@ -94,6 +102,7 @@ namespace FineUIPro.Web.WeldingProcess.PMI
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
txtDetectionStandard.Text = "GB 50184-2011";
|
||||||
this.txtTabler.Text = this.CurrUser.UserName;
|
this.txtTabler.Text = this.CurrUser.UserName;
|
||||||
this.SimpleForm1.Reset(); //重置所有字段
|
this.SimpleForm1.Reset(); //重置所有字段
|
||||||
}
|
}
|
||||||
|
|
|
@ -151,10 +151,10 @@
|
||||||
TextAlign="Center" Width="160px">
|
TextAlign="Center" Width="160px">
|
||||||
</f:RenderField>
|
</f:RenderField>
|
||||||
<f:RenderField HeaderText="<%$ Resources:Lan,QualityNo %>" ColumnID="QualityNo" DataField="QualityNo"
|
<f:RenderField HeaderText="<%$ Resources:Lan,QualityNo %>" ColumnID="QualityNo" DataField="QualityNo"
|
||||||
FieldType="String" TextAlign="Left" Width="150px">
|
FieldType="String" TextAlign="Left" Width="150px" Hidden="true">
|
||||||
</f:RenderField>
|
</f:RenderField>
|
||||||
<f:RenderField HeaderText="<%$ Resources:Lan,Acceptance %>" ColumnID="Acceptance"
|
<f:RenderField HeaderText="<%$ Resources:Lan,Acceptance %>" ColumnID="Acceptance"
|
||||||
DataField="Acceptance" FieldType="String" TextAlign="Left" Width="150px">
|
DataField="Acceptance" FieldType="String" TextAlign="Left" Width="150px" Hidden="true">
|
||||||
</f:RenderField>
|
</f:RenderField>
|
||||||
<%-- 检测日期 --%>
|
<%-- 检测日期 --%>
|
||||||
<f:RenderField HeaderText="<%$ Resources:Lan,FilmDate %>" ColumnID="checkTime"
|
<f:RenderField HeaderText="<%$ Resources:Lan,FilmDate %>" ColumnID="checkTime"
|
||||||
|
|
|
@ -4106,12 +4106,12 @@ namespace FineUIPro.Web.WeldingProcess.TestPackageManage
|
||||||
ws.SetColumnWidth(12, 6 * 256);//M
|
ws.SetColumnWidth(12, 6 * 256);//M
|
||||||
ws.SetColumnWidth(13, 5 * 256);//N
|
ws.SetColumnWidth(13, 5 * 256);//N
|
||||||
ws.SetColumnWidth(14, 4 * 256);//O
|
ws.SetColumnWidth(14, 4 * 256);//O
|
||||||
ws.SetColumnWidth(15, 6 * 256);//P
|
ws.SetColumnWidth(15, 4 * 256);//P
|
||||||
ws.SetColumnWidth(16, 4 * 256);//Q
|
ws.SetColumnWidth(16, 4 * 256);//Q
|
||||||
ws.SetColumnWidth(17, 5 * 256);//R
|
ws.SetColumnWidth(17, 5 * 256);//R
|
||||||
ws.SetColumnWidth(18, 6 * 256);//S
|
ws.SetColumnWidth(18, 5 * 256);//S
|
||||||
ws.SetColumnWidth(19, 7 * 256);//T
|
ws.SetColumnWidth(19, 5 * 256);//T
|
||||||
ws.SetColumnWidth(20, 13 * 256);//U
|
ws.SetColumnWidth(20, 18 * 256);//U
|
||||||
|
|
||||||
ws.AddMergedRegion(new CellRangeAddress(rowIndex, rowIndex + 3, 0, 2));
|
ws.AddMergedRegion(new CellRangeAddress(rowIndex, rowIndex + 3, 0, 2));
|
||||||
ws.GetRow(rowIndex).GetCell(0).SetCellValue("SH/T 3503-J412-1-2007");
|
ws.GetRow(rowIndex).GetCell(0).SetCellValue("SH/T 3503-J412-1-2007");
|
||||||
|
@ -7514,7 +7514,7 @@ namespace FineUIPro.Web.WeldingProcess.TestPackageManage
|
||||||
{
|
{
|
||||||
Directory.CreateDirectory(filePath);
|
Directory.CreateDirectory(filePath);
|
||||||
}
|
}
|
||||||
string fileName = "模版报表-" + DateTime.Now.ToString("yyyyMMddHHmmss") + ".xlsx";
|
string fileName = "试压包报表-" + DateTime.Now.ToString("yyyyMMddHHmmss") + ".xlsx";
|
||||||
string ReportFileName = filePath + fileName;
|
string ReportFileName = filePath + fileName;
|
||||||
|
|
||||||
//XSSFWorkbook hssfworkbook = new XSSFWorkbook();
|
//XSSFWorkbook hssfworkbook = new XSSFWorkbook();
|
||||||
|
|
|
@ -114,6 +114,14 @@
|
||||||
<f:Button ID="btnHandGenerate" Text="手动生成委托单" ToolTip="勾选需要生成委托单的焊口手动生成委托单" Icon="TableEdit" runat="server"
|
<f:Button ID="btnHandGenerate" Text="手动生成委托单" ToolTip="勾选需要生成委托单的焊口手动生成委托单" Icon="TableEdit" runat="server"
|
||||||
OnClick="btnHandGenerate_Click" >
|
OnClick="btnHandGenerate_Click" >
|
||||||
</f:Button>
|
</f:Button>
|
||||||
|
|
||||||
|
</Items>
|
||||||
|
</f:Toolbar>
|
||||||
|
<f:Toolbar ID="Toolbar4" Position="Top" runat="server" ToolbarAlign="Right">
|
||||||
|
<Items>
|
||||||
|
<f:Button ID="btnDailyCompPoint" Text="日报完成点口" ToolTip="日报忋完成审核点口" Icon="ArrowUndo"
|
||||||
|
runat="server" OnClick="btnDailyCompPoint_Click">
|
||||||
|
</f:Button>
|
||||||
<f:Button ID="btnbtnOpenResetPoint" Text="打开重新点口" ToolTip="打开重新点口" Icon="ArrowUndo"
|
<f:Button ID="btnbtnOpenResetPoint" Text="打开重新点口" ToolTip="打开重新点口" Icon="ArrowUndo"
|
||||||
runat="server" OnClick="btnbtnOpenResetPoint_Click">
|
runat="server" OnClick="btnbtnOpenResetPoint_Click">
|
||||||
</f:Button>
|
</f:Button>
|
||||||
|
|
|
@ -854,6 +854,332 @@ namespace FineUIPro.Web.WeldingProcess.TrustManage
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 日报完成点口
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="sender"></param>
|
||||||
|
/// <param name="e"></param>
|
||||||
|
protected void btnDailyCompPoint_Click(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
if (CommonService.GetAllButtonPowerList(this.CurrUser.LoginProjectId, this.CurrUser.UserId, Const.HJGL_PointManageMenuId, Const.BtnOpenResetPoint))
|
||||||
|
{
|
||||||
|
string strSql = @"SELECT jot.ProjectId, pItem.PointBatchId,jot.CoverWelderId,rate.DetectionRateValue
|
||||||
|
FROM dbo.Batch_PointBatchItem pItem
|
||||||
|
LEFT JOIN dbo.Batch_PointBatch point ON point.PointBatchId = pItem.PointBatchId
|
||||||
|
LEFT JOIN dbo.Pipeline_WeldJoint jot ON jot.WeldJointId = pItem.WeldJointId
|
||||||
|
LEFT JOIN dbo.Base_DetectionRate rate ON rate.DetectionRateId=point.DetectionRateId
|
||||||
|
WHERE pItem.IsCompletedPoint=0
|
||||||
|
GROUP BY jot.ProjectId, pItem.PointBatchId,jot.CoverWelderId,rate.DetectionRateValue";
|
||||||
|
DataTable dt = SQLHelper.GetDataTableRunText(strSql, null);
|
||||||
|
if (dt.Rows.Count > 0)
|
||||||
|
{
|
||||||
|
foreach (DataRow r in dt.Rows)
|
||||||
|
{
|
||||||
|
// 已处理但批段未关闭的焊口
|
||||||
|
List<PointBatchList> batchNoClose = (from x in Funs.DB.Batch_PointBatchItem
|
||||||
|
join y in Funs.DB.Pipeline_WeldJoint on x.WeldJointId equals y.WeldJointId
|
||||||
|
where x.PointBatchId == r["PointBatchId"].ToString()
|
||||||
|
&& y.CoverWelderId == r["CoverWelderId"].ToString()
|
||||||
|
&& (x.BatchOrder == false || x.BatchOrder == null)
|
||||||
|
&& x.IsCompletedPoint == true
|
||||||
|
&& (y.IsCancel == false || y.IsCancel == null)
|
||||||
|
select new PointBatchList { PointBatchItemId = x.PointBatchItemId, JointAttribute = y.JointAttribute }).ToList();
|
||||||
|
|
||||||
|
// 未处理焊口
|
||||||
|
List<PointBatchList> jotList = (from x in Funs.DB.Batch_PointBatchItem
|
||||||
|
join y in Funs.DB.Pipeline_WeldJoint on x.WeldJointId equals y.WeldJointId
|
||||||
|
where x.PointBatchId == r["PointBatchId"].ToString()
|
||||||
|
&& y.CoverWelderId == r["CoverWelderId"].ToString()
|
||||||
|
&& (x.IsCompletedPoint == false || x.IsCompletedPoint == null)
|
||||||
|
&& (y.IsCancel == false || y.IsCancel == null)
|
||||||
|
orderby x.EnterDate
|
||||||
|
select new PointBatchList { PointBatchItemId = x.PointBatchItemId, JointAttribute = y.JointAttribute }).ToList();
|
||||||
|
|
||||||
|
// 未处理固定焊口
|
||||||
|
List<PointBatchList> GJot = jotList.Where(x=>x.JointAttribute == "固定F").ToList();
|
||||||
|
|
||||||
|
if (Convert.ToInt32(r["DetectionRateValue"]) != 0)
|
||||||
|
{
|
||||||
|
// 批中一段的数量
|
||||||
|
int dnum = Convert.ToInt32((double)100 / (int)r["DetectionRateValue"]);
|
||||||
|
// 已处理但批段未关闭的焊口数量
|
||||||
|
int batchNoCloseNum = batchNoClose.Count();
|
||||||
|
// 未处理焊口数量
|
||||||
|
int jotListNum = jotList.Count();
|
||||||
|
// 未处理固定焊口数量
|
||||||
|
int GJotNum = GJot.Count();
|
||||||
|
|
||||||
|
#region batchNoCloseNum大于0表示批段已处理但批段未关闭的焊口集合里,些批段已点口
|
||||||
|
if (batchNoCloseNum > 0)
|
||||||
|
{
|
||||||
|
if ((batchNoCloseNum + jotListNum) > dnum)
|
||||||
|
{
|
||||||
|
// 关闭上一个批段还需要的数量
|
||||||
|
int closeNum = dnum - batchNoCloseNum;
|
||||||
|
var bachtclose = jotList.GetRange(0, closeNum);
|
||||||
|
// 补足上一个批段,关闭同时状态为已处理
|
||||||
|
foreach (var g in bachtclose)
|
||||||
|
{
|
||||||
|
BLL.Batch_PointBatchItemService.UpdatePointBatchOrder(g.PointBatchItemId, true);
|
||||||
|
BLL.Batch_PointBatchItemService.UpdateIsCompletedPoint(g.PointBatchItemId, true);
|
||||||
|
}
|
||||||
|
foreach (var g in batchNoClose)
|
||||||
|
{
|
||||||
|
BLL.Batch_PointBatchItemService.UpdatePointBatchOrder(g.PointBatchItemId, true);
|
||||||
|
}
|
||||||
|
|
||||||
|
if ((jotListNum - closeNum) > dnum)
|
||||||
|
{
|
||||||
|
// 取模(余数)
|
||||||
|
int modelNum = (jotListNum - closeNum) % dnum;
|
||||||
|
// 取整
|
||||||
|
double doubleNum = Math.Ceiling((double)((jotListNum - closeNum) / (double)dnum));
|
||||||
|
int intNum = Convert.ToInt32(doubleNum);
|
||||||
|
// 补足上一个批段后剩余的待处理的列表
|
||||||
|
var remailList = jotList.GetRange(closeNum, (jotListNum - closeNum));
|
||||||
|
|
||||||
|
for (int i = 0; i < intNum; i++)
|
||||||
|
{
|
||||||
|
if (modelNum == 0)
|
||||||
|
{
|
||||||
|
var bachtOrder = remailList.GetRange(i * dnum, dnum);
|
||||||
|
var bachtOrderG = bachtOrder.Where(p => p.JointAttribute == "固定F").ToList();
|
||||||
|
// 点口
|
||||||
|
GetRandomPoint(bachtOrderG, bachtOrder);
|
||||||
|
// 状态为已处理状态,并关闭此批段
|
||||||
|
foreach (var g in bachtOrder)
|
||||||
|
{
|
||||||
|
BLL.Batch_PointBatchItemService.UpdateIsCompletedPoint(g.PointBatchItemId, true);
|
||||||
|
BLL.Batch_PointBatchItemService.UpdatePointBatchOrder(g.PointBatchItemId, true);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
if (i != intNum - 1)
|
||||||
|
{
|
||||||
|
var bachtOrder = remailList.GetRange(i * dnum, dnum);
|
||||||
|
var bachtOrderG = bachtOrder.Where(p => p.JointAttribute == "固定F").ToList();
|
||||||
|
// 点口
|
||||||
|
GetRandomPoint(bachtOrderG, bachtOrder);
|
||||||
|
// 状态为已处理状态,并关闭此批段
|
||||||
|
foreach (var g in bachtOrder)
|
||||||
|
{
|
||||||
|
BLL.Batch_PointBatchItemService.UpdateIsCompletedPoint(g.PointBatchItemId, true);
|
||||||
|
BLL.Batch_PointBatchItemService.UpdatePointBatchOrder(g.PointBatchItemId, true);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// 最后一个段
|
||||||
|
else
|
||||||
|
{
|
||||||
|
var bachtOrder = remailList.GetRange(i * dnum, modelNum);
|
||||||
|
var bachtOrderG = bachtOrder.Where(p => p.JointAttribute == "固定F").ToList();
|
||||||
|
// 点口
|
||||||
|
GetRandomPoint(bachtOrderG, bachtOrder);
|
||||||
|
// 状态为已处理状态,此批段不关闭
|
||||||
|
foreach (var g in bachtOrder)
|
||||||
|
{
|
||||||
|
BLL.Batch_PointBatchItemService.UpdateIsCompletedPoint(g.PointBatchItemId, true);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else if ((jotListNum - closeNum) == dnum)
|
||||||
|
{
|
||||||
|
var bachtOrder = jotList.GetRange(closeNum, (jotListNum - closeNum));
|
||||||
|
var bachtOrderG = bachtOrder.Where(p => p.JointAttribute == "固定F").ToList();
|
||||||
|
// 点口
|
||||||
|
GetRandomPoint(bachtOrderG, bachtOrder);
|
||||||
|
|
||||||
|
// 状态为已处理状态,并关闭此批段
|
||||||
|
foreach (var g in bachtOrder)
|
||||||
|
{
|
||||||
|
BLL.Batch_PointBatchItemService.UpdateIsCompletedPoint(g.PointBatchItemId, true);
|
||||||
|
BLL.Batch_PointBatchItemService.UpdatePointBatchOrder(g.PointBatchItemId, true);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
var bachtOrder = jotList.GetRange(closeNum, (jotListNum - closeNum));
|
||||||
|
var bachtOrderG = bachtOrder.Where(p => p.JointAttribute == "固定F").ToList();
|
||||||
|
// 点口
|
||||||
|
GetRandomPoint(bachtOrderG, bachtOrder);
|
||||||
|
|
||||||
|
// 状态为已处理状态,此批段没关闭
|
||||||
|
foreach (var g in bachtOrder)
|
||||||
|
{
|
||||||
|
BLL.Batch_PointBatchItemService.UpdateIsCompletedPoint(g.PointBatchItemId, true);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
// 当未关闭的批段+未处理焊口的数量等于探伤比例数量时批段关闭
|
||||||
|
else if (batchNoCloseNum + jotListNum == dnum)
|
||||||
|
{
|
||||||
|
// 批段关闭
|
||||||
|
foreach (var g in batchNoClose)
|
||||||
|
{
|
||||||
|
BLL.Batch_PointBatchItemService.UpdatePointBatchOrder(g.PointBatchItemId, true);
|
||||||
|
}
|
||||||
|
// 批段关闭,状态为已处理
|
||||||
|
foreach (var g in jotList)
|
||||||
|
{
|
||||||
|
BLL.Batch_PointBatchItemService.UpdatePointBatchOrder(g.PointBatchItemId, true);
|
||||||
|
BLL.Batch_PointBatchItemService.UpdateIsCompletedPoint(g.PointBatchItemId, true);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
// 待处理完成,但批段未关闭
|
||||||
|
foreach (var g in jotList)
|
||||||
|
{
|
||||||
|
BLL.Batch_PointBatchItemService.UpdateIsCompletedPoint(g.PointBatchItemId, true);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region batchNoCloseNum等于0表示这个批段开始
|
||||||
|
else
|
||||||
|
{
|
||||||
|
if (jotListNum > dnum)
|
||||||
|
{
|
||||||
|
// 取模(余数)
|
||||||
|
int modelNum = jotList.Count() % dnum;
|
||||||
|
// 取整
|
||||||
|
double doubleNum = Math.Ceiling((double)jotList.Count() / (double)dnum);
|
||||||
|
int intNum=Convert.ToInt32(doubleNum);
|
||||||
|
|
||||||
|
for (int i = 0; i < intNum; i++)
|
||||||
|
{
|
||||||
|
if (modelNum == 0)
|
||||||
|
{
|
||||||
|
var bachtOrder = jotList.GetRange(i * dnum, dnum);
|
||||||
|
var bachtOrderG = bachtOrder.Where(p => p.JointAttribute == "固定F").ToList();
|
||||||
|
// 点口
|
||||||
|
GetRandomPoint(bachtOrderG, bachtOrder);
|
||||||
|
// 状态为已处理状态,并关闭此批段
|
||||||
|
foreach (var g in bachtOrder)
|
||||||
|
{
|
||||||
|
BLL.Batch_PointBatchItemService.UpdateIsCompletedPoint(g.PointBatchItemId, true);
|
||||||
|
BLL.Batch_PointBatchItemService.UpdatePointBatchOrder(g.PointBatchItemId, true);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
if (i != intNum - 1)
|
||||||
|
{
|
||||||
|
var bachtOrder = jotList.GetRange(i * dnum, dnum);
|
||||||
|
var bachtOrderG = bachtOrder.Where(p => p.JointAttribute == "固定F").ToList();
|
||||||
|
// 点口
|
||||||
|
GetRandomPoint(bachtOrderG, bachtOrder);
|
||||||
|
// 状态为已处理状态,并关闭此批段
|
||||||
|
foreach (var g in bachtOrder)
|
||||||
|
{
|
||||||
|
BLL.Batch_PointBatchItemService.UpdateIsCompletedPoint(g.PointBatchItemId, true);
|
||||||
|
BLL.Batch_PointBatchItemService.UpdatePointBatchOrder(g.PointBatchItemId, true);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// 最后一个段
|
||||||
|
else
|
||||||
|
{
|
||||||
|
var bachtOrder = jotList.GetRange(i * dnum, modelNum);
|
||||||
|
var bachtOrderG = bachtOrder.Where(p => p.JointAttribute == "固定F").ToList();
|
||||||
|
// 点口
|
||||||
|
GetRandomPoint(bachtOrderG, bachtOrder);
|
||||||
|
// 状态为已处理状态,此批段不关闭
|
||||||
|
foreach (var g in bachtOrder)
|
||||||
|
{
|
||||||
|
BLL.Batch_PointBatchItemService.UpdateIsCompletedPoint(g.PointBatchItemId, true);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else if (jotListNum == dnum)
|
||||||
|
{
|
||||||
|
// 点口
|
||||||
|
GetRandomPoint(GJot, jotList);
|
||||||
|
// 状态为已处理状态,并关闭此批段
|
||||||
|
foreach (var g in jotList)
|
||||||
|
{
|
||||||
|
BLL.Batch_PointBatchItemService.UpdateIsCompletedPoint(g.PointBatchItemId, true);
|
||||||
|
BLL.Batch_PointBatchItemService.UpdatePointBatchOrder(g.PointBatchItemId, true);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
// 点口
|
||||||
|
GetRandomPoint(GJot, jotList);
|
||||||
|
// 状态为已处理状态,但批段不关闭
|
||||||
|
foreach (var g in jotList)
|
||||||
|
{
|
||||||
|
BLL.Batch_PointBatchItemService.UpdateIsCompletedPoint(g.PointBatchItemId, true);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
// 不点口,状态为变已处理,批段完成
|
||||||
|
foreach (var q in jotList)
|
||||||
|
{
|
||||||
|
BLL.Batch_PointBatchItemService.UpdateIsCompletedPoint(q.PointBatchItemId, true);
|
||||||
|
BLL.Batch_PointBatchItemService.UpdatePointBatchOrder(q.PointBatchItemId, true);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
ShowNotify(Resources.Lan.NoPrivilegePrompt, MessageBoxIcon.Warning);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private void GetRandomPoint(List<PointBatchList> GJot, List<PointBatchList> jotList)
|
||||||
|
{
|
||||||
|
// 先查找固定口数量,如有固定口,则优先点
|
||||||
|
if (GJot.Count() > 0)
|
||||||
|
{
|
||||||
|
int Gnum = GJot.Count();
|
||||||
|
int rnum = Funs.GetRandomNum(1, Gnum);
|
||||||
|
int j = 1;
|
||||||
|
foreach (var g in GJot)
|
||||||
|
{
|
||||||
|
if (rnum == j)
|
||||||
|
{
|
||||||
|
BLL.Batch_PointBatchItemService.UpdatePointBatchItem(g.PointBatchItemId, "1", System.DateTime.Now, null);
|
||||||
|
}
|
||||||
|
j++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
if (jotList.Count() > 0)
|
||||||
|
{
|
||||||
|
int rnum = Funs.GetRandomNum(1, jotList.Count());
|
||||||
|
int j = 1;
|
||||||
|
foreach (var g in jotList)
|
||||||
|
{
|
||||||
|
if (rnum == j)
|
||||||
|
{
|
||||||
|
BLL.Batch_PointBatchItemService.UpdatePointBatchItem(g.PointBatchItemId, "1", System.DateTime.Now, null);
|
||||||
|
}
|
||||||
|
j++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 手动结束批
|
/// 手动结束批
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
@ -1632,6 +1958,20 @@ namespace FineUIPro.Web.WeldingProcess.TrustManage
|
||||||
return newTrustCode;
|
return newTrustCode;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private class PointBatchList
|
||||||
|
{
|
||||||
|
public string PointBatchItemId
|
||||||
|
{
|
||||||
|
get;
|
||||||
|
set;
|
||||||
|
}
|
||||||
|
public string JointAttribute
|
||||||
|
{
|
||||||
|
get;
|
||||||
|
set;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -203,6 +203,24 @@ namespace FineUIPro.Web.WeldingProcess.TrustManage
|
||||||
/// </remarks>
|
/// </remarks>
|
||||||
protected global::FineUIPro.Button btnHandGenerate;
|
protected global::FineUIPro.Button btnHandGenerate;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Toolbar4 控件。
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// 自动生成的字段。
|
||||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||||
|
/// </remarks>
|
||||||
|
protected global::FineUIPro.Toolbar Toolbar4;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// btnDailyCompPoint 控件。
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// 自动生成的字段。
|
||||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||||
|
/// </remarks>
|
||||||
|
protected global::FineUIPro.Button btnDailyCompPoint;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// btnbtnOpenResetPoint 控件。
|
/// btnbtnOpenResetPoint 控件。
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|
|
@ -102,13 +102,15 @@ namespace FineUIPro.Web.WeldingProcess.WeldingManage
|
||||||
|
|
||||||
protected void BtnExtract_Click(object sender, EventArgs e)
|
protected void BtnExtract_Click(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
bool canWPS = true;
|
var jotList = (from x in Funs.DB.Pipeline_WeldJoint where x.ProjectId == this.CurrUser.LoginProjectId && x.WeldingDailyId != null && x.WeldingMethodId != null
|
||||||
var jotList = (from x in Funs.DB.Pipeline_WeldJoint where x.ProjectId == this.CurrUser.LoginProjectId && x.WeldingDailyId != null && x.WeldingMethodId != null select x).ToList();
|
select x).ToList(); // && x.PipelineId== "246c6b8c-8fbd-480c-9810-43062bf09646"
|
||||||
foreach (var jot in jotList)
|
foreach (var jot in jotList)
|
||||||
{
|
{
|
||||||
var wps = BLL.WPQListServiceService.GetWPQById(jot.WPQId);
|
var wps = BLL.WPQListServiceService.GetWPQById(jot.WPQId);
|
||||||
string floorWelder = jot.BackingWelderId;
|
string floorWelder = jot.BackingWelderId;
|
||||||
string cellWelder = jot.CoverWelderId;
|
string cellWelder = jot.CoverWelderId;
|
||||||
|
|
||||||
|
bool canWPS = true;
|
||||||
if (wps != null)
|
if (wps != null)
|
||||||
{
|
{
|
||||||
// 验证焊工WPS资质
|
// 验证焊工WPS资质
|
||||||
|
@ -143,7 +145,12 @@ namespace FineUIPro.Web.WeldingProcess.WeldingManage
|
||||||
decimal? sch = jot.Thickness;
|
decimal? sch = jot.Thickness;
|
||||||
|
|
||||||
string[] wmeCodes = mat.WeldingMethodCode.Split('+');
|
string[] wmeCodes = mat.WeldingMethodCode.Split('+');
|
||||||
string location = loc.WeldingLocationCode;
|
|
||||||
|
string location=string.Empty;
|
||||||
|
if (loc != null)
|
||||||
|
{
|
||||||
|
location = loc.WeldingLocationCode;
|
||||||
|
}
|
||||||
string ste = jot.Material1Id;
|
string ste = jot.Material1Id;
|
||||||
|
|
||||||
List<Model.Welder_WelderQualify> floorWelderQualifys = (from x in Funs.DB.Welder_WelderQualify
|
List<Model.Welder_WelderQualify> floorWelderQualifys = (from x in Funs.DB.Welder_WelderQualify
|
||||||
|
@ -201,13 +208,17 @@ namespace FineUIPro.Web.WeldingProcess.WeldingManage
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (canWPS == false || canSave == false)
|
||||||
if (canWPS==false || canSave == false)
|
|
||||||
{
|
{
|
||||||
jot.IsSuperQueWelding = true;
|
jot.IsSuperQueWelding = true;
|
||||||
|
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
jot.IsSuperQueWelding = null;
|
||||||
|
}
|
||||||
|
}
|
||||||
Funs.DB.SubmitChanges();
|
Funs.DB.SubmitChanges();
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
ShowNotify("提取完成");
|
ShowNotify("提取完成");
|
||||||
return;
|
return;
|
||||||
|
|
|
@ -9,6 +9,7 @@ using NPOI.SS.Util;
|
||||||
using NPOI.XSSF.UserModel;
|
using NPOI.XSSF.UserModel;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using BLL;
|
using BLL;
|
||||||
|
using System.Web.Configuration;
|
||||||
|
|
||||||
namespace FineUIPro.Web.WeldingProcess.WeldingManage
|
namespace FineUIPro.Web.WeldingProcess.WeldingManage
|
||||||
{
|
{
|
||||||
|
@ -353,6 +354,11 @@ namespace FineUIPro.Web.WeldingProcess.WeldingManage
|
||||||
var weldJoints = BLL.Pipeline_WeldJointService.GetWeldlinesByWeldingDailyId(weldingDailyId);
|
var weldJoints = BLL.Pipeline_WeldJointService.GetWeldlinesByWeldingDailyId(weldingDailyId);
|
||||||
if (weldJoints.Count() > 0)
|
if (weldJoints.Count() > 0)
|
||||||
{
|
{
|
||||||
|
string[] jointList = weldJoints.Select(p => p.WeldJointId).ToArray();
|
||||||
|
var pointBatchList = from x in Funs.DB.Batch_PointBatchItem
|
||||||
|
where jointList.Contains(x.WeldJointId)
|
||||||
|
select x;
|
||||||
|
string[] pointBatchIdList = pointBatchList.Select(p => p.PointBatchId).Distinct().ToArray();
|
||||||
foreach (var item in weldJoints)
|
foreach (var item in weldJoints)
|
||||||
{
|
{
|
||||||
var updateWeldJoint = BLL.Pipeline_WeldJointService.GetWeldJointByWeldJointId(item.WeldJointId);
|
var updateWeldJoint = BLL.Pipeline_WeldJointService.GetWeldJointByWeldJointId(item.WeldJointId);
|
||||||
|
@ -369,8 +375,42 @@ namespace FineUIPro.Web.WeldingProcess.WeldingManage
|
||||||
BLL.Batch_NDEItemService.DeleteAllNDEInfoToWeldJoint(item.WeldJointId);
|
BLL.Batch_NDEItemService.DeleteAllNDEInfoToWeldJoint(item.WeldJointId);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 打开批
|
||||||
|
if (pointBatchIdList.Count() > 0)
|
||||||
|
{
|
||||||
|
foreach (string p in pointBatchIdList)
|
||||||
|
{
|
||||||
|
var pItem = (from x in Funs.DB.Batch_PointBatchItem
|
||||||
|
orderby x.EnterDate descending
|
||||||
|
where x.PointBatchId == p
|
||||||
|
select x).ToList();
|
||||||
|
int pItemNum = pItem.Count();
|
||||||
|
if (pItemNum > 0)
|
||||||
|
{
|
||||||
|
var batch = BLL.Batch_PointBatchService.GetPointBatchById(p);
|
||||||
|
var rate = BLL.Base_DetectionRateService.GetDetectionRateByDetectionRateId(batch.DetectionRateId);
|
||||||
|
int dnum = Convert.ToInt32((double)100 / (int)rate.DetectionRateValue);
|
||||||
|
// 取模(余数)
|
||||||
|
int modelNum = pItemNum % dnum;
|
||||||
|
// 等于0不处理
|
||||||
|
if (modelNum != 0)
|
||||||
|
{
|
||||||
|
var bachtOrder = pItem.GetRange(0, modelNum);
|
||||||
|
foreach (var g in bachtOrder)
|
||||||
|
{
|
||||||
|
BLL.Batch_PointBatchItemService.UpdatePointBatchOrder(g.PointBatchItemId, false);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
BLL.Pipeline_WeldingDailyService.DeleteWeldingDailyByWeldingDailyId(weldingDailyId);
|
BLL.Pipeline_WeldingDailyService.DeleteWeldingDailyByWeldingDailyId(weldingDailyId);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
BLL.Sys_LogService.AddLog(BLL.Const.System_3, this.CurrUser.LoginProjectId, this.CurrUser.UserId, Const.HJGL_WeldReportMenuId, Const.BtnDelete, weldingDailyId);
|
BLL.Sys_LogService.AddLog(BLL.Const.System_3, this.CurrUser.LoginProjectId, this.CurrUser.UserId, Const.HJGL_WeldReportMenuId, Const.BtnDelete, weldingDailyId);
|
||||||
ShowNotify(Resources.Lan.DeletedSuccessfully, MessageBoxIcon.Success);
|
ShowNotify(Resources.Lan.DeletedSuccessfully, MessageBoxIcon.Success);
|
||||||
this.BindGrid();
|
this.BindGrid();
|
||||||
|
@ -1019,6 +1059,7 @@ namespace FineUIPro.Web.WeldingProcess.WeldingManage
|
||||||
// }
|
// }
|
||||||
//}
|
//}
|
||||||
|
|
||||||
|
string oldmat1 = d.Material1Id;
|
||||||
if (ds.Tables[0].Rows[i]["材质1"] != null && !string.IsNullOrEmpty(ds.Tables[0].Rows[i]["材质1"].ToString()))
|
if (ds.Tables[0].Rows[i]["材质1"] != null && !string.IsNullOrEmpty(ds.Tables[0].Rows[i]["材质1"].ToString()))
|
||||||
{
|
{
|
||||||
var steel = materials.FirstOrDefault(x => x.MaterialCode == ds.Tables[0].Rows[i]["材质1"].ToString());
|
var steel = materials.FirstOrDefault(x => x.MaterialCode == ds.Tables[0].Rows[i]["材质1"].ToString());
|
||||||
|
@ -1050,7 +1091,7 @@ namespace FineUIPro.Web.WeldingProcess.WeldingManage
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if ((!string.IsNullOrEmpty(d.Material2Id) && steel.MaterialId != d.Material2Id)
|
if ((!string.IsNullOrEmpty(d.Material2Id) && steel.MaterialId != d.Material2Id)
|
||||||
&& (!string.IsNullOrEmpty(d.Material1Id) && steel.MaterialId != d.Material1Id))
|
&& (!string.IsNullOrEmpty(oldmat1) && steel.MaterialId != oldmat1))
|
||||||
{
|
{
|
||||||
errorInfos += (i + 2) + "行,材质2[" + ds.Tables[0].Rows[i]["材质2"].ToString() + "]验证不一至;";
|
errorInfos += (i + 2) + "行,材质2[" + ds.Tables[0].Rows[i]["材质2"].ToString() + "]验证不一至;";
|
||||||
}
|
}
|
||||||
|
@ -1061,7 +1102,7 @@ namespace FineUIPro.Web.WeldingProcess.WeldingManage
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
string oldCom1 = d.PipeAssembly1Id;
|
||||||
if (ds.Tables[0].Rows[i]["组件1"] != null && !string.IsNullOrEmpty(ds.Tables[0].Rows[i]["组件1"].ToString()))
|
if (ds.Tables[0].Rows[i]["组件1"] != null && !string.IsNullOrEmpty(ds.Tables[0].Rows[i]["组件1"].ToString()))
|
||||||
{
|
{
|
||||||
var com = componentss.FirstOrDefault(x => x.ComponentsCode == ds.Tables[0].Rows[i]["组件1"].ToString());
|
var com = componentss.FirstOrDefault(x => x.ComponentsCode == ds.Tables[0].Rows[i]["组件1"].ToString());
|
||||||
|
@ -1093,8 +1134,8 @@ namespace FineUIPro.Web.WeldingProcess.WeldingManage
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if ((!string.IsNullOrEmpty(d.PipeAssembly1Id) && com.ComponentsId != d.PipeAssembly1Id)
|
if ((!string.IsNullOrEmpty(d.PipeAssembly2Id) && com.ComponentsId != d.PipeAssembly2Id)
|
||||||
&& (!string.IsNullOrEmpty(d.PipeAssembly2Id) && com.ComponentsId != d.PipeAssembly2Id))
|
&& (!string.IsNullOrEmpty(oldCom1) && com.ComponentsId != oldCom1))
|
||||||
{
|
{
|
||||||
errorInfos += (i + 2) + "行,组件2[" + ds.Tables[0].Rows[i]["组件2"].ToString() + "]验证不一至;";
|
errorInfos += (i + 2) + "行,组件2[" + ds.Tables[0].Rows[i]["组件2"].ToString() + "]验证不一至;";
|
||||||
}
|
}
|
||||||
|
@ -1105,6 +1146,7 @@ namespace FineUIPro.Web.WeldingProcess.WeldingManage
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
string oldHeartNo1 = d.HeartNo1;
|
||||||
if (ds.Tables[0].Rows[i]["炉批号1"] != null && !string.IsNullOrEmpty(ds.Tables[0].Rows[i]["炉批号1"].ToString()))
|
if (ds.Tables[0].Rows[i]["炉批号1"] != null && !string.IsNullOrEmpty(ds.Tables[0].Rows[i]["炉批号1"].ToString()))
|
||||||
{
|
{
|
||||||
if ((!string.IsNullOrEmpty(d.HeartNo1) && ds.Tables[0].Rows[i]["炉批号1"].ToString() != d.HeartNo1)
|
if ((!string.IsNullOrEmpty(d.HeartNo1) && ds.Tables[0].Rows[i]["炉批号1"].ToString() != d.HeartNo1)
|
||||||
|
@ -1120,7 +1162,7 @@ namespace FineUIPro.Web.WeldingProcess.WeldingManage
|
||||||
|
|
||||||
if (ds.Tables[0].Rows[i]["炉批号2"] != null && !string.IsNullOrEmpty(ds.Tables[0].Rows[i]["炉批号2"].ToString()))
|
if (ds.Tables[0].Rows[i]["炉批号2"] != null && !string.IsNullOrEmpty(ds.Tables[0].Rows[i]["炉批号2"].ToString()))
|
||||||
{
|
{
|
||||||
if ((!string.IsNullOrEmpty(d.HeartNo1) && ds.Tables[0].Rows[i]["炉批号2"].ToString() != d.HeartNo1)
|
if ((!string.IsNullOrEmpty(oldHeartNo1) && ds.Tables[0].Rows[i]["炉批号2"].ToString() != oldHeartNo1)
|
||||||
&& (!string.IsNullOrEmpty(d.HeartNo2) && ds.Tables[0].Rows[i]["炉批号2"].ToString() != d.HeartNo2))
|
&& (!string.IsNullOrEmpty(d.HeartNo2) && ds.Tables[0].Rows[i]["炉批号2"].ToString() != d.HeartNo2))
|
||||||
{
|
{
|
||||||
errorInfos += (i + 2) + "行,炉批号2[" + ds.Tables[0].Rows[i]["炉批号2"].ToString() + "]验证不一至;";
|
errorInfos += (i + 2) + "行,炉批号2[" + ds.Tables[0].Rows[i]["炉批号2"].ToString() + "]验证不一至;";
|
||||||
|
|
|
@ -340,6 +340,8 @@ namespace FineUIPro.Web.WeldingProcess.WeldingManage
|
||||||
var wps = BLL.WPQListServiceService.GetWPQById(item.WPQId);
|
var wps = BLL.WPQListServiceService.GetWPQById(item.WPQId);
|
||||||
|
|
||||||
// 验证焊工资质
|
// 验证焊工资质
|
||||||
|
if (wps != null)
|
||||||
|
{
|
||||||
if (item.BackingWelderId == item.CoverWelderId)
|
if (item.BackingWelderId == item.CoverWelderId)
|
||||||
{
|
{
|
||||||
if (!wps.WelderIds.Contains(item.BackingWelderId))
|
if (!wps.WelderIds.Contains(item.BackingWelderId))
|
||||||
|
@ -358,6 +360,11 @@ namespace FineUIPro.Web.WeldingProcess.WeldingManage
|
||||||
errorCheck += rowIndex + "行,焊工:" + item.CoverWelderId + "无WPS焊接资质,";
|
errorCheck += rowIndex + "行,焊工:" + item.CoverWelderId + "无WPS焊接资质,";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
errorCheck += rowIndex + "行,WPS不能为空,";
|
||||||
|
}
|
||||||
|
|
||||||
// 验证数据是否一至
|
// 验证数据是否一至
|
||||||
if (!string.IsNullOrEmpty(item.WeldTypeId) && !string.IsNullOrEmpty(jot.WeldTypeId) && item.WeldTypeId != jot.WeldTypeId)
|
if (!string.IsNullOrEmpty(item.WeldTypeId) && !string.IsNullOrEmpty(jot.WeldTypeId) && item.WeldTypeId != jot.WeldTypeId)
|
||||||
|
|
|
@ -37,6 +37,9 @@
|
||||||
<f:DropDownList ID="drpUnit" runat="server" Label="施工单位" LabelAlign="Right" Width="240px" EmptyText="请选择施工单位"
|
<f:DropDownList ID="drpUnit" runat="server" Label="施工单位" LabelAlign="Right" Width="240px" EmptyText="请选择施工单位"
|
||||||
LabelWidth="90px">
|
LabelWidth="90px">
|
||||||
</f:DropDownList>
|
</f:DropDownList>
|
||||||
|
<f:DropDownList ID="drpJointAttribute" Label="<%$ Resources:Lan,WeldingJointQuality %>" runat="server" LabelAlign="Right" Width="180px"
|
||||||
|
LabelWidth="90px">
|
||||||
|
</f:DropDownList>
|
||||||
<f:DropDownList ID="drpTeamGroup" runat="server" Label="班组" EnableCheckBoxSelect="true" EnableMultiSelect="true"
|
<f:DropDownList ID="drpTeamGroup" runat="server" Label="班组" EnableCheckBoxSelect="true" EnableMultiSelect="true"
|
||||||
LabelAlign="Right" Width="160px" LabelWidth="80px">
|
LabelAlign="Right" Width="160px" LabelWidth="80px">
|
||||||
</f:DropDownList>
|
</f:DropDownList>
|
||||||
|
@ -45,6 +48,15 @@
|
||||||
<f:ListItem Value="未审核" Text="未审核" />
|
<f:ListItem Value="未审核" Text="未审核" />
|
||||||
<f:ListItem Value="已审核" Text="已审核" />
|
<f:ListItem Value="已审核" Text="已审核" />
|
||||||
</f:DropDownList>
|
</f:DropDownList>
|
||||||
|
|
||||||
|
<f:ToolbarFill ID="ToolbarFill1" runat="server">
|
||||||
|
</f:ToolbarFill>
|
||||||
|
</Items>
|
||||||
|
</f:Toolbar>
|
||||||
|
</Toolbars>
|
||||||
|
<Toolbars>
|
||||||
|
<f:Toolbar ID="Toolbar2" Position="Top" runat="server" ToolbarAlign="Left">
|
||||||
|
<Items>
|
||||||
<f:DatePicker runat="server" Label="焊接日期" ID="txtStarTime" LabelAlign="Right"
|
<f:DatePicker runat="server" Label="焊接日期" ID="txtStarTime" LabelAlign="Right"
|
||||||
LabelWidth="90px" Width="210px">
|
LabelWidth="90px" Width="210px">
|
||||||
</f:DatePicker>
|
</f:DatePicker>
|
||||||
|
@ -53,15 +65,8 @@
|
||||||
<f:DatePicker runat="server" ID="txtEndTime" LabelAlign="Right" LabelWidth="80px"
|
<f:DatePicker runat="server" ID="txtEndTime" LabelAlign="Right" LabelWidth="80px"
|
||||||
Width="110px">
|
Width="110px">
|
||||||
</f:DatePicker>
|
</f:DatePicker>
|
||||||
<f:ToolbarFill ID="ToolbarFill1" runat="server">
|
<f:ToolbarFill ID="ToolbarFill2" runat="server">
|
||||||
</f:ToolbarFill>
|
</f:ToolbarFill>
|
||||||
|
|
||||||
</Items>
|
|
||||||
</f:Toolbar>
|
|
||||||
</Toolbars>
|
|
||||||
<Toolbars>
|
|
||||||
<f:Toolbar ID="Toolbar2" Position="Top" runat="server" ToolbarAlign="Left">
|
|
||||||
<Items>
|
|
||||||
<f:Button ID="BtnAnalyse" Text="<%$ Resources:Lan,Statistics %>" Icon="ChartPie"
|
<f:Button ID="BtnAnalyse" Text="<%$ Resources:Lan,Statistics %>" Icon="ChartPie"
|
||||||
runat="server" OnClick="BtnAnalyse_Click">
|
runat="server" OnClick="BtnAnalyse_Click">
|
||||||
</f:Button>
|
</f:Button>
|
||||||
|
|
|
@ -40,6 +40,13 @@ namespace FineUIPro.Web.WeldingProcess.WeldingReport
|
||||||
drpTeamGroup.DataSource = teamGroup;
|
drpTeamGroup.DataSource = teamGroup;
|
||||||
drpTeamGroup.DataBind();
|
drpTeamGroup.DataBind();
|
||||||
Funs.FineUIPleaseSelect(drpTeamGroup, "");
|
Funs.FineUIPleaseSelect(drpTeamGroup, "");
|
||||||
|
|
||||||
|
// 焊口属性
|
||||||
|
this.drpJointAttribute.DataTextField = "Text";
|
||||||
|
this.drpJointAttribute.DataValueField = "Value";
|
||||||
|
this.drpJointAttribute.DataSource = BLL.DropListService.HJGL_JointAttributeItem();
|
||||||
|
this.drpJointAttribute.DataBind();
|
||||||
|
Funs.FineUIPleaseSelect(this.drpJointAttribute, Resources.Lan.PleaseSelect);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -103,6 +110,11 @@ namespace FineUIPro.Web.WeldingProcess.WeldingReport
|
||||||
strSql += " AND pipeline.UnitId = @UnitId";
|
strSql += " AND pipeline.UnitId = @UnitId";
|
||||||
listStr.Add(new SqlParameter("@UnitId", drpUnit.SelectedValue));
|
listStr.Add(new SqlParameter("@UnitId", drpUnit.SelectedValue));
|
||||||
}
|
}
|
||||||
|
if (this.drpJointAttribute.SelectedValue != Const._Null)
|
||||||
|
{
|
||||||
|
strSql += " AND weldJoint.JointAttribute = @JointAttribute";
|
||||||
|
listStr.Add(new SqlParameter("@JointAttribute", drpJointAttribute.SelectedValue));
|
||||||
|
}
|
||||||
if (this.drpTeamGroup.SelectedValueArray.Length>0)
|
if (this.drpTeamGroup.SelectedValueArray.Length>0)
|
||||||
{
|
{
|
||||||
string[] teamGroupList = drpTeamGroup.SelectedValueArray;
|
string[] teamGroupList = drpTeamGroup.SelectedValueArray;
|
||||||
|
@ -252,12 +264,14 @@ namespace FineUIPro.Web.WeldingProcess.WeldingReport
|
||||||
|
|
||||||
//批量审核
|
//批量审核
|
||||||
|
|
||||||
protected void btnAuditAll_Click(object sender,EventArgs e)
|
protected void btnAuditAll_Click(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
if (CommonService.GetAllButtonPowerList(this.CurrUser.LoginProjectId, this.CurrUser.UserId, Const.WeldDailyExportMenuId, Const.BtnAuditing))
|
||||||
{
|
{
|
||||||
var data = this.GetDataTable();
|
var data = this.GetDataTable();
|
||||||
if (string.IsNullOrEmpty(txtStarTime.Text) && string.IsNullOrEmpty(txtEndTime.Text))
|
if (string.IsNullOrEmpty(txtStarTime.Text) && string.IsNullOrEmpty(txtEndTime.Text))
|
||||||
{
|
{
|
||||||
ShowNotify("请按照日期选择要审核的日报!",MessageBoxIcon.Warning);
|
ShowNotify("请按照日期选择要审核的日报!", MessageBoxIcon.Warning);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
List<string> ids = new List<string>();
|
List<string> ids = new List<string>();
|
||||||
|
@ -269,8 +283,16 @@ namespace FineUIPro.Web.WeldingProcess.WeldingReport
|
||||||
this.BindGrid();
|
this.BindGrid();
|
||||||
ShowNotify("批量审核成功!", MessageBoxIcon.Success);
|
ShowNotify("批量审核成功!", MessageBoxIcon.Success);
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
ShowNotify(Resources.Lan.NoPrivilegePrompt, MessageBoxIcon.Warning);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
//审核
|
//审核
|
||||||
protected void btnAudit_Click(object sender,EventArgs e)
|
protected void btnAudit_Click(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
if (CommonService.GetAllButtonPowerList(this.CurrUser.LoginProjectId, this.CurrUser.UserId, Const.WeldDailyExportMenuId, Const.BtnAuditing))
|
||||||
{
|
{
|
||||||
var listIds = GetWeldJointIdList();
|
var listIds = GetWeldJointIdList();
|
||||||
if (listIds.Count == 0)
|
if (listIds.Count == 0)
|
||||||
|
@ -278,13 +300,22 @@ namespace FineUIPro.Web.WeldingProcess.WeldingReport
|
||||||
ShowNotify("请选择要审核的焊接日报数据", MessageBoxIcon.Warning);
|
ShowNotify("请选择要审核的焊接日报数据", MessageBoxIcon.Warning);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
ModifyAuditStatus(listIds,1);
|
ModifyAuditStatus(listIds, 1);
|
||||||
this.BindGrid();
|
this.BindGrid();
|
||||||
|
|
||||||
ShowNotify("批量审核成功!", MessageBoxIcon.Success);
|
ShowNotify("批量审核成功!", MessageBoxIcon.Success);
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
ShowNotify(Resources.Lan.NoPrivilegePrompt, MessageBoxIcon.Warning);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
//取消审核
|
//取消审核
|
||||||
protected void btnCancel_Click(object sender, EventArgs e)
|
protected void btnCancel_Click(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
if (CommonService.GetAllButtonPowerList(this.CurrUser.LoginProjectId, this.CurrUser.UserId, Const.WeldDailyExportMenuId, Const.BtnCancelAuditing))
|
||||||
{
|
{
|
||||||
var listIds = GetWeldJointIdList();
|
var listIds = GetWeldJointIdList();
|
||||||
if (listIds.Count == 0)
|
if (listIds.Count == 0)
|
||||||
|
@ -292,18 +323,26 @@ namespace FineUIPro.Web.WeldingProcess.WeldingReport
|
||||||
ShowNotify("请选择要取消审核的焊接日报数据", MessageBoxIcon.Warning);
|
ShowNotify("请选择要取消审核的焊接日报数据", MessageBoxIcon.Warning);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
ModifyAuditStatus(listIds,0);
|
ModifyAuditStatus(listIds, 0);
|
||||||
this.BindGrid();
|
this.BindGrid();
|
||||||
ShowNotify("批量取消审核成功!", MessageBoxIcon.Success);
|
ShowNotify("批量取消审核成功!", MessageBoxIcon.Success);
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
ShowNotify(Resources.Lan.NoPrivilegePrompt, MessageBoxIcon.Warning);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
//发送邮件
|
//发送邮件
|
||||||
protected void btnSendEmail_Click(object sender,EventArgs e)
|
protected void btnSendEmail_Click(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
if (CommonService.GetAllButtonPowerList(this.CurrUser.LoginProjectId, this.CurrUser.UserId, Const.WeldDailyExportMenuId, Const.BtnSendEmail))
|
||||||
{
|
{
|
||||||
DataTable dt = GetDataTableAuditStatus();
|
DataTable dt = GetDataTableAuditStatus();
|
||||||
if (dt.Rows.Count == 0)
|
if (dt.Rows.Count == 0)
|
||||||
{
|
{
|
||||||
ShowNotify("暂无已审核的数据!",MessageBoxIcon.Warning);
|
ShowNotify("暂无已审核的数据!", MessageBoxIcon.Warning);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
string rootPath = Server.MapPath("~/") + Const.ExcelUrl;
|
string rootPath = Server.MapPath("~/") + Const.ExcelUrl;
|
||||||
|
@ -326,7 +365,7 @@ namespace FineUIPro.Web.WeldingProcess.WeldingReport
|
||||||
XSSFSheet ws = (XSSFSheet)hssfworkbook.CreateSheet("Sheet1");
|
XSSFSheet ws = (XSSFSheet)hssfworkbook.CreateSheet("Sheet1");
|
||||||
|
|
||||||
int rowIndex = 0;
|
int rowIndex = 0;
|
||||||
var style = CommonPrint.SetExcelStyle(hssfworkbook, BorderStyle.None, BorderStyle.None, BorderStyle.None, BorderStyle.None, VerticalAlignment.Center, NPOI.SS.UserModel.HorizontalAlignment.Center, 20, true, true, "微软雅黑");
|
var style = CommonPrint.SetExcelStyle(hssfworkbook, BorderStyle.None, BorderStyle.None, BorderStyle.None, BorderStyle.None, VerticalAlignment.Center, NPOI.SS.UserModel.HorizontalAlignment.Center, 20, true, true, "Arial");
|
||||||
|
|
||||||
#region 头部
|
#region 头部
|
||||||
ws = ExcelCreateRow(ws, hssfworkbook, rowIndex, rowIndex, style, 0, 19, true);
|
ws = ExcelCreateRow(ws, hssfworkbook, rowIndex, rowIndex, style, 0, 19, true);
|
||||||
|
@ -507,6 +546,12 @@ namespace FineUIPro.Web.WeldingProcess.WeldingReport
|
||||||
ShowNotify($"发送失败,原因:{ex.Message}", MessageBoxIcon.Error);
|
ShowNotify($"发送失败,原因:{ex.Message}", MessageBoxIcon.Error);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
ShowNotify(Resources.Lan.NoPrivilegePrompt, MessageBoxIcon.Warning);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
protected void Window1_Close(object sender, EventArgs e)
|
protected void Window1_Close(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
this.BindGrid();
|
this.BindGrid();
|
||||||
|
@ -580,7 +625,7 @@ namespace FineUIPro.Web.WeldingProcess.WeldingReport
|
||||||
XSSFSheet ws = (XSSFSheet)hssfworkbook.CreateSheet("Sheet1");
|
XSSFSheet ws = (XSSFSheet)hssfworkbook.CreateSheet("Sheet1");
|
||||||
|
|
||||||
int rowIndex = 0;
|
int rowIndex = 0;
|
||||||
var style = CommonPrint.SetExcelStyle(hssfworkbook, BorderStyle.None, BorderStyle.None, BorderStyle.None, BorderStyle.None, VerticalAlignment.Center, NPOI.SS.UserModel.HorizontalAlignment.Center, 20, true, true, "微软雅黑");
|
var style = CommonPrint.SetExcelStyle(hssfworkbook, BorderStyle.None, BorderStyle.None, BorderStyle.None, BorderStyle.None, VerticalAlignment.Center, NPOI.SS.UserModel.HorizontalAlignment.Center, 20, true, true, "Arial");
|
||||||
|
|
||||||
#region 头部
|
#region 头部
|
||||||
ws = ExcelCreateRow(ws, hssfworkbook, rowIndex, rowIndex, style, 0, 19, true);
|
ws = ExcelCreateRow(ws, hssfworkbook, rowIndex, rowIndex, style, 0, 19, true);
|
||||||
|
|
|
@ -86,6 +86,15 @@ namespace FineUIPro.Web.WeldingProcess.WeldingReport
|
||||||
/// </remarks>
|
/// </remarks>
|
||||||
protected global::FineUIPro.DropDownList drpUnit;
|
protected global::FineUIPro.DropDownList drpUnit;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// drpJointAttribute 控件。
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// 自动生成的字段。
|
||||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||||
|
/// </remarks>
|
||||||
|
protected global::FineUIPro.DropDownList drpJointAttribute;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// drpTeamGroup 控件。
|
/// drpTeamGroup 控件。
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
@ -104,6 +113,24 @@ namespace FineUIPro.Web.WeldingProcess.WeldingReport
|
||||||
/// </remarks>
|
/// </remarks>
|
||||||
protected global::FineUIPro.DropDownList drpAudit;
|
protected global::FineUIPro.DropDownList drpAudit;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// ToolbarFill1 控件。
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// 自动生成的字段。
|
||||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||||
|
/// </remarks>
|
||||||
|
protected global::FineUIPro.ToolbarFill ToolbarFill1;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Toolbar2 控件。
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// 自动生成的字段。
|
||||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||||
|
/// </remarks>
|
||||||
|
protected global::FineUIPro.Toolbar Toolbar2;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// txtStarTime 控件。
|
/// txtStarTime 控件。
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
@ -132,22 +159,13 @@ namespace FineUIPro.Web.WeldingProcess.WeldingReport
|
||||||
protected global::FineUIPro.DatePicker txtEndTime;
|
protected global::FineUIPro.DatePicker txtEndTime;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// ToolbarFill1 控件。
|
/// ToolbarFill2 控件。
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <remarks>
|
/// <remarks>
|
||||||
/// 自动生成的字段。
|
/// 自动生成的字段。
|
||||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||||
/// </remarks>
|
/// </remarks>
|
||||||
protected global::FineUIPro.ToolbarFill ToolbarFill1;
|
protected global::FineUIPro.ToolbarFill ToolbarFill2;
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Toolbar2 控件。
|
|
||||||
/// </summary>
|
|
||||||
/// <remarks>
|
|
||||||
/// 自动生成的字段。
|
|
||||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|
||||||
/// </remarks>
|
|
||||||
protected global::FineUIPro.Toolbar Toolbar2;
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// BtnAnalyse 控件。
|
/// BtnAnalyse 控件。
|
||||||
|
|
|
@ -29,6 +29,10 @@ namespace Model
|
||||||
|
|
||||||
#region 可扩展性方法定义
|
#region 可扩展性方法定义
|
||||||
partial void OnCreated();
|
partial void OnCreated();
|
||||||
|
partial void OnCreated()
|
||||||
|
{
|
||||||
|
this.CommandTimeout = 600;
|
||||||
|
}
|
||||||
partial void InsertAttachFile(AttachFile instance);
|
partial void InsertAttachFile(AttachFile instance);
|
||||||
partial void UpdateAttachFile(AttachFile instance);
|
partial void UpdateAttachFile(AttachFile instance);
|
||||||
partial void DeleteAttachFile(AttachFile instance);
|
partial void DeleteAttachFile(AttachFile instance);
|
||||||
|
@ -11772,7 +11776,7 @@ namespace Model
|
||||||
|
|
||||||
private string _RepairRecordId;
|
private string _RepairRecordId;
|
||||||
|
|
||||||
private System.Nullable<int> _BatchOrder;
|
private System.Nullable<bool> _BatchOrder;
|
||||||
|
|
||||||
private System.Nullable<bool> _IsCompletedPoint;
|
private System.Nullable<bool> _IsCompletedPoint;
|
||||||
|
|
||||||
|
@ -11782,6 +11786,8 @@ namespace Model
|
||||||
|
|
||||||
private string _QTAudit;
|
private string _QTAudit;
|
||||||
|
|
||||||
|
private System.Nullable<System.DateTime> _EnterDate;
|
||||||
|
|
||||||
private EntitySet<Batch_BatchTrustItem> _Batch_BatchTrustItem;
|
private EntitySet<Batch_BatchTrustItem> _Batch_BatchTrustItem;
|
||||||
|
|
||||||
private EntityRef<Pipeline_WeldJoint> _Pipeline_WeldJoint;
|
private EntityRef<Pipeline_WeldJoint> _Pipeline_WeldJoint;
|
||||||
|
@ -11832,7 +11838,7 @@ namespace Model
|
||||||
partial void OnIsAuditChanged();
|
partial void OnIsAuditChanged();
|
||||||
partial void OnRepairRecordIdChanging(string value);
|
partial void OnRepairRecordIdChanging(string value);
|
||||||
partial void OnRepairRecordIdChanged();
|
partial void OnRepairRecordIdChanged();
|
||||||
partial void OnBatchOrderChanging(System.Nullable<int> value);
|
partial void OnBatchOrderChanging(System.Nullable<bool> value);
|
||||||
partial void OnBatchOrderChanged();
|
partial void OnBatchOrderChanged();
|
||||||
partial void OnIsCompletedPointChanging(System.Nullable<bool> value);
|
partial void OnIsCompletedPointChanging(System.Nullable<bool> value);
|
||||||
partial void OnIsCompletedPointChanged();
|
partial void OnIsCompletedPointChanged();
|
||||||
|
@ -11842,6 +11848,8 @@ namespace Model
|
||||||
partial void OnGLGSAuditChanged();
|
partial void OnGLGSAuditChanged();
|
||||||
partial void OnQTAuditChanging(string value);
|
partial void OnQTAuditChanging(string value);
|
||||||
partial void OnQTAuditChanged();
|
partial void OnQTAuditChanged();
|
||||||
|
partial void OnEnterDateChanging(System.Nullable<System.DateTime> value);
|
||||||
|
partial void OnEnterDateChanged();
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
public Batch_PointBatchItem()
|
public Batch_PointBatchItem()
|
||||||
|
@ -12260,8 +12268,8 @@ namespace Model
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_BatchOrder", DbType="Int")]
|
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_BatchOrder", DbType="Bit")]
|
||||||
public System.Nullable<int> BatchOrder
|
public System.Nullable<bool> BatchOrder
|
||||||
{
|
{
|
||||||
get
|
get
|
||||||
{
|
{
|
||||||
|
@ -12360,6 +12368,26 @@ namespace Model
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_EnterDate", DbType="DateTime")]
|
||||||
|
public System.Nullable<System.DateTime> EnterDate
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
return this._EnterDate;
|
||||||
|
}
|
||||||
|
set
|
||||||
|
{
|
||||||
|
if ((this._EnterDate != value))
|
||||||
|
{
|
||||||
|
this.OnEnterDateChanging(value);
|
||||||
|
this.SendPropertyChanging();
|
||||||
|
this._EnterDate = value;
|
||||||
|
this.SendPropertyChanged("EnterDate");
|
||||||
|
this.OnEnterDateChanged();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
[global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_Batch_BatchTrustItem_Batch_PointBatchItem", Storage="_Batch_BatchTrustItem", ThisKey="PointBatchItemId", OtherKey="PointBatchItemId", DeleteRule="NO ACTION")]
|
[global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_Batch_BatchTrustItem_Batch_PointBatchItem", Storage="_Batch_BatchTrustItem", ThisKey="PointBatchItemId", OtherKey="PointBatchItemId", DeleteRule="NO ACTION")]
|
||||||
public EntitySet<Batch_BatchTrustItem> Batch_BatchTrustItem
|
public EntitySet<Batch_BatchTrustItem> Batch_BatchTrustItem
|
||||||
{
|
{
|
||||||
|
|
|
@ -8,7 +8,7 @@
|
||||||
<IISExpressWindowsAuthentication />
|
<IISExpressWindowsAuthentication />
|
||||||
<IISExpressUseClassicPipelineMode />
|
<IISExpressUseClassicPipelineMode />
|
||||||
<UseGlobalApplicationHostFile />
|
<UseGlobalApplicationHostFile />
|
||||||
<LastActiveSolutionConfig>Debug|Any CPU</LastActiveSolutionConfig>
|
<LastActiveSolutionConfig>Release|Any CPU</LastActiveSolutionConfig>
|
||||||
<NameOfLastUsedPublishProfile>FolderProfile</NameOfLastUsedPublishProfile>
|
<NameOfLastUsedPublishProfile>FolderProfile</NameOfLastUsedPublishProfile>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<ProjectExtensions>
|
<ProjectExtensions>
|
||||||
|
|
Binary file not shown.
Loading…
Reference in New Issue