This commit is contained in:
2026-04-28 20:01:33 +08:00
59 changed files with 4362 additions and 1806 deletions
+1 -1
View File
@@ -566,7 +566,7 @@ namespace BLL
{
var getPersons = from x in db.View_SitePerson_Person
where x.ProjectId == projectId && x.States == Const.ProjectPersonStates_1
where x.ProjectId == projectId
select new Model.PersonItem
{
SitePersonId = x.SitePersonId,
+2 -2
View File
@@ -17,8 +17,8 @@ namespace BLL
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
{
var getUser = db.Person_Persons.FirstOrDefault(x => (x.Account == userInfo.Account || x.Telephone == userInfo.Telephone || x.PersonName == userInfo.Account)
&& x.Password == Funs.EncryptionPassword(userInfo.Password) && (!x.IsPost.HasValue || x.IsPost == true)
&& (x.Account.Length > 1 || x.PersonId == Const.hfnbdId || x.PersonId == Const.sysglyId));
&& x.Password == Funs.EncryptionPassword(userInfo.Password) && (!x.IsPost.HasValue || x.IsPost == true));
/*&& (x.Account.Length > 1 || x.PersonId == Const.hfnbdId || x.PersonId == Const.sysglyId))*/
if (getUser != null)
{
Model.UserItem newItem = new Model.UserItem();
File diff suppressed because it is too large Load Diff
@@ -461,9 +461,8 @@ namespace BLL
weldingDaily.UnitWorkId = joint.UnitWorkId;
weldingDaily.UnitId = weldTask?.UnitId;
weldingDaily.Tabler = Personid;
weldingDaily.TableDate = Convert.ToDateTime(time).Date;
db.HJGL_WeldingDaily.InsertOnSubmit(weldingDaily);
db.SubmitChanges();
weldingDaily.TableDate = Convert.ToDateTime(time).Date;
BLL.WeldingDailyService.AddWeldingDaily(weldingDaily);
}
BLL.HJGL_PipelineComponentjointService.UpdateStateByWeldJointId(WeldJointId, (DateTime)weldingDaily.WeldingDate);//更改预制口实际时间和状态
PipelineService.UpdataDateByWeldJointId(WeldJointId);//更改安装口时间和状态
@@ -1,4 +1,4 @@
using System;
using System;
using System.Collections.Generic;
namespace BLL
@@ -53,6 +53,11 @@ namespace BLL
{
throw new Exception("当前包装状态不可修改车次号");
}
// 检查包装是否已关联其他车次
if (!string.IsNullOrEmpty(packModel.TrainNumberId) && packModel.TrainNumberId != trainNumberId)
{
throw new Exception("该包装已在其他车次中存在,不能重复添加");
}
packModel.TrainNumberId = trainNumberId;
HJGLPackagingmanageService.UpdateHJGL_PackagingManage(packModel);
}
+2 -1
View File
@@ -837,6 +837,7 @@
<Compile Include="ZHGL\RealName\OnPostService.cs" />
<Compile Include="ZHGL\RealName\RealNameMonitorService.cs" />
<Compile Include="ZHGL\RealName\RealName_ProjectService.cs" />
<Compile Include="ZHGL\RealName\SedinRealName.Service.cs" />
<Compile Include="ZHGL\RealName\SynchroSetService.cs" />
<Compile Include="ZHGL\Supervise\SubUnitCheckRectifyItemService.cs" />
<Compile Include="ZHGL\Supervise\SubUnitCheckRectifyService.cs" />
@@ -935,4 +936,4 @@
<Target Name="AfterBuild">
</Target>
-->
</Project>
</Project>
+75 -58
View File
@@ -27,42 +27,54 @@ namespace BLL
NeedNum = g.Sum(x => x.Number) ?? 0,
};
///实际材料入库数量列表
var RealInMateriaList = from x in db.Tw_InputDetail
join master in db.Tw_InputMaster on x.InputMasterId equals master.Id
join y in db.HJGL_MaterialCodeLib on x.MaterialCode equals y.MaterialCode
where master.ProjectId == projectid && master.WarehouseCode == WarehouseCode
group x by x.MaterialCode
var RealInMateriaList = (from x in db.Tw_InputDetail
join master in db.Tw_InputMaster on x.InputMasterId equals master.Id
join y in db.HJGL_MaterialCodeLib on x.MaterialCode equals y.MaterialCode
where master.ProjectId == projectid && master.WarehouseCode == WarehouseCode
group x by x.MaterialCode
into g
where (string.IsNullOrEmpty(materialCode) || g.Key.Contains(materialCode))
select new
{
g.Key,
RealNum = g.Sum(x => x.ActNum) ?? 0,
};
where (string.IsNullOrEmpty(materialCode) || g.Key.Contains(materialCode))
select new
{
g.Key,
RealNum = g.Sum(x => x.ActNum) ?? 0,
}).ToList();
//库存数量
var tw_MaterialStock = from x in db.Tw_MaterialStock
where x.WarehouseCode == WarehouseCode && x.ProjectId == projectid
select x;
var tw_MaterialStock = (from x in db.Tw_MaterialStock
where x.WarehouseCode == WarehouseCode && x.ProjectId == projectid
select x).ToList();
var needMateriaList = NeedOutMateriaList.ToList();
var materialCodeList = needMateriaList.Select(x => x.Key)
.Union(RealInMateriaList.Select(x => x.Key))
.Distinct()
.ToList();
var StatisticsList = (from x in NeedOutMateriaList
join y in RealInMateriaList on x.Key equals y.Key into gg
from y in gg.DefaultIfEmpty()
join z in db.HJGL_MaterialCodeLib on x.Key equals z.MaterialCode into zz
from z in zz.DefaultIfEmpty()
join m in tw_MaterialStock on x.Key equals m.PipeLineMatCode into mm
from m in mm.DefaultIfEmpty()
var materialInfoList = (from x in db.HJGL_MaterialCodeLib
where materialCodeList.Contains(x.MaterialCode)
select x).ToList();
var StatisticsList = (from code in materialCodeList
join x in needMateriaList on code equals x.Key into needGroup
from x in needGroup.DefaultIfEmpty()
join y in RealInMateriaList on code equals y.Key into realGroup
from y in realGroup.DefaultIfEmpty()
join z in materialInfoList on code equals z.MaterialCode into infoGroup
from z in infoGroup.DefaultIfEmpty()
join m in tw_MaterialStock on code equals m.PipeLineMatCode into stockGroup
from m in stockGroup.DefaultIfEmpty()
orderby code
select new Tw_ArrivalStatisticsOutPut
{
MaterialCode = x.Key,
MaterialCode = code,
StockNum = m == null ? 0 : (decimal)m.StockNum,
NeedNum = x.NeedNum,
NeedNum = x == null ? 0 : x.NeedNum,
RealNum = y == null ? 0 : y.RealNum,
MaterialName = z.MaterialName,
MaterialSpec = z.MaterialSpec,
MaterialUnit = z.MaterialUnit,
MaterialDef = z.MaterialDef,
MatchRate = (x.NeedNum == 0 ? 0 : Math.Round((y == null ? 0 : y.RealNum) / x.NeedNum, 4, MidpointRounding.ToEven)),
MaterialName = z == null ? null : z.MaterialName,
MaterialSpec = z == null ? null : z.MaterialSpec,
MaterialUnit = z == null ? null : z.MaterialUnit,
MaterialDef = z == null ? null : z.MaterialDef,
MatchRate = (x == null || x.NeedNum == 0 ? 0 : Math.Round((y == null ? 0 : y.RealNum) / x.NeedNum, 4, MidpointRounding.ToEven)),
}).ToList();
foreach (var item in StatisticsList)
{
@@ -86,7 +98,35 @@ namespace BLL
WarehouseCode = warehouseCode,
ProjectId = projectId
};
var stockList = TwMaterialstockService.GetTw_MaterialStockByModle(twMaterialStockOutput).ToList();//获取库存列表
var stockList = TwMaterialstockService.GetTw_MaterialStockByModle(twMaterialStockOutput).ToList();//获取库存列表
// 预扣除出库申请单中状态为待审核/已审核的材料数量
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
{
var outboundMaterials = from detail in db.Tw_InOutPlanDetail
join master in db.Tw_InOutPlanMaster on detail.InOutPlanMasterId equals master.Id
where master.InOutType == (int)TwConst.InOutType.
&& (master.State == (int)TwConst.State. || master.State == (int)TwConst.State.)
&& master.WarehouseCode == warehouseCode
&& master.ProjectId == projectId
group detail by detail.MaterialCode into g
select new
{
MaterialCode = g.Key,
TotalPlanNum = g.Sum(d => d.PlanNum) ?? 0
};
var outboundList = outboundMaterials.ToList();
foreach (var outbound in outboundList)
{
var stock = stockList.FirstOrDefault(x => x.PipeLineMatCode == outbound.MaterialCode);
if (stock != null)
{
stock.StockNum -= outbound.TotalPlanNum;
}
}
}
foreach (var material in requiredMaterials)
{
material.Id = Guid.NewGuid().ToString();
@@ -121,40 +161,17 @@ namespace BLL
/// <param name="pipelineId"></param>
/// <returns></returns>
public static decimal? GetPipeMatch(string pipelineId)
{
{
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
{
var twPipeMatMatchOutputs = new List<Tw_PipeMatMatchOutput>();
List<string> pipelineIds = new List<string>();
pipelineIds.Add(pipelineId);
var pipelineModel = PipelineService.GetPipelineByPipelineId(pipelineId);
string warehouseCode = BLL.Base_WarehouseService.GetWarehouseByWarehouseId(PipelineService.GetPipelineByPipelineId(pipelineModel.PipelineId).WarehouseId).WarehouseName;
// 获取所需材料列表
var requiredMaterials = (from x in db.HJGL_PipeLineMat
join y in db.HJGL_MaterialCodeLib on x.MaterialCode equals y.MaterialCode
join z in db.HJGL_Pipeline on x.PipelineId equals z.PipelineId
join m in db.WBS_UnitWork on z.UnitWorkId equals m.UnitWorkId
where z.PipelineId == pipelineId && x.PrefabricatedComponents != "" //x.PrefabricatedComponents!="" 用于筛选非散件材料
select new Tw_PipeMatMatchOutput
{
Id = Guid.NewGuid().ToString(),
PipelineId = x.PipelineId,
PipelineCode = z.PipelineCode,
UnitWorkId = z.UnitWorkId,
UnitWorkName = m.UnitWorkName,
PrefabricatedComponents = x.PrefabricatedComponents,
MaterialCode = x.MaterialCode,
MaterialName = y.MaterialName,
MaterialSpec = y.MaterialSpec,
MaterialUnit = y.MaterialUnit,
MaterialDef = y.MaterialDef,
NeedNum = x.Number,
}
).ToList();
twPipeMatMatchOutputs = GetMatMatchOutput(requiredMaterials, warehouseCode, pipelineModel.ProjectId);
var result = twPipeMatMatchOutputs.Any()
? twPipeMatMatchOutputs.Average(x => x.MatchRate)
: 0;
return result;
var PipeMatMatch = GetPipeMatMatch(pipelineModel.ProjectId, pipelineIds, warehouseCode);
var pipeMatchRate = GetPipeMatch(PipeMatMatch).FirstOrDefault(x => x.PipelineId == pipelineId);
return pipeMatchRate?.MatchRate;
}
}
/// <summary>
+2 -1
View File
@@ -130,7 +130,8 @@ namespace BLL
AuditDate2 = x.AuditDate2,
WarehouseMan = x.WarehouseMan,
WarehouseManName = x.WarehouseManName,
WarehouseDate = x.WarehouseDate
WarehouseDate = x.WarehouseDate,
Remark=x.Remark
};
}
+4 -1
View File
@@ -5358,6 +5358,9 @@ namespace BLL
/// </summary>
public const string CQMS_MeetingMenuId = "30754DF1-CB18-4F53-BB66-2B2A398D7180";
/// <summary>
/// 质量会议
/// </summary>
public const string EntryEducationTrainTypeId = "8920c9cc-fa92-49b2-9493-775a55da27bb";
}
}
@@ -208,7 +208,7 @@ namespace BLL
//小于500的焊口按比例及规则点口
var batchItems500Down = from x in db.HJGL_Batch_PointBatchItem
join y in db.HJGL_WeldJoint on x.WeldJointId equals y.WeldJointId
where y.Dia < 500 && x.PointBatchId == pointBatchId
where (y.Dia < 500 || y.Dia == null) && x.PointBatchId == pointBatchId
select x;
if (batch.DetectionRateId != null && batchItems500Down.Count() > 0)
{
@@ -219,11 +219,11 @@ namespace BLL
var weldG = from x in db.HJGL_Batch_PointBatchItem
join y in db.HJGL_WeldJoint on x.WeldJointId equals y.WeldJointId
where y.JointAttribute == "安装口" && y.Dia < 500 && x.PointBatchId == pointBatchId
where y.JointAttribute == "安装口" && (y.Dia < 500 || y.Dia == null) && x.PointBatchId == pointBatchId
select x;
var weldA = from x in db.HJGL_Batch_PointBatchItem
join y in db.HJGL_WeldJoint on x.WeldJointId equals y.WeldJointId
where y.JointAttribute == "预制口" && y.Dia < 500 && x.PointBatchId == pointBatchId
where y.JointAttribute == "预制口" && (y.Dia < 500 || y.Dia == null) && x.PointBatchId == pointBatchId
select x;
if (weldG.Count() > 0)
{
@@ -1,4 +1,4 @@
using FastReport.DevComponents.DotNetBar;
using FastReport.DevComponents.DotNetBar;
using FineUIPro;
using Model;
using System;
@@ -15,7 +15,9 @@ namespace BLL
public static class HJGLPackagingmanageService
{
#region Fields
/// <summary>
/// 包装分类映射字典
/// </summary>
public static Dictionary<string, int> CategoryIntMap = new Dictionary<string, int>
{
{ "打捆" ,(int)CategoryInt.},
@@ -141,19 +143,30 @@ namespace BLL
/// <exception cref="Exception">当该预制组件已被包装时抛出异常</exception>
public static void AddPipelineComponentToPackaging(string packagingManageId, string pipelineComponentId)
{
var ComponentModel = BLL.HJGL_PipelineComponentService.GetPipelineComponentById(pipelineComponentId);
if (ComponentModel != null)
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
{
var model = new Model.HJGL_PackagingManageDetail()
bool existsInCurrentPackaging = db.HJGL_PackagingManageDetail.Any(x => x.PackagingManageId == packagingManageId && x.PipelineComponentId == pipelineComponentId);
if (existsInCurrentPackaging)
{
Id = SQLHelper.GetNewID(),
PackagingManageId = packagingManageId,
PipelineId = ComponentModel.PipelineId,
PipelineComponentId = pipelineComponentId,
CreateTime = DateTime.Now,
CreateUser = null,
};
HJGLPackagingmanagedetailService.Add(model);
return;
}
ValidatePipelineComponentsNotInOtherPackaging(pipelineComponentId);
var ComponentModel = BLL.HJGL_PipelineComponentService.GetPipelineComponentById(pipelineComponentId);
if (ComponentModel != null)
{
var model = new Model.HJGL_PackagingManageDetail()
{
Id = SQLHelper.GetNewID(),
PackagingManageId = packagingManageId,
PipelineId = ComponentModel.PipelineId,
PipelineComponentId = pipelineComponentId,
CreateTime = DateTime.Now,
CreateUser = null,
};
db.HJGL_PackagingManageDetail.InsertOnSubmit(model);
db.SubmitChanges();
}
}
}
@@ -170,6 +183,7 @@ namespace BLL
db1.HJGL_PackagingManage.DeleteOnSubmit(table);
db1.SubmitChanges();
}
HJGLPackagingmanagedetailService.DeleteByPackagingManageId(PackagingManageId);
}
/// <summary>
@@ -528,6 +542,20 @@ namespace BLL
{
baseQuery = baseQuery.Where(z => z.train.Id != null && z.train.Id.Contains(filter.TrainNumberId));
}
// 是否关联车次筛选
if (filter.HasTrainNumber.HasValue)
{
if (filter.HasTrainNumber.Value)
{
// 已关联车次:TrainNumberId 不为空
baseQuery = baseQuery.Where(z => z.x.TrainNumberId != null && z.x.TrainNumberId != "");
}
else
{
// 未关联车次:TrainNumberId 为空
baseQuery = baseQuery.Where(z => z.x.TrainNumberId == null || z.x.TrainNumberId == "");
}
}
}
baseQuery = baseQuery.OrderByDescending(z => (z.x.ReceiveDate ?? DateTime.MinValue)).ThenBy(z => z.x.PackagingCode);
@@ -545,6 +573,9 @@ namespace BLL
ReceiveMan = z.train.ContactName,
ReceiveDate = string.Format("{0:g}", z.x.ReceiveDate),
TrainNumber = z.train.TrainNumber,
ComponentCount = db.HJGL_PackagingManageDetail.Count(d => d.PackagingManageId == z.x.PackagingManageId),
CategoryInt = z.x.CategoryInt,
CategoryString = z.x.CategoryInt == 10 ? "打捆" : (z.x.CategoryInt == 20 ? "装箱" : (z.x.CategoryInt == 30 ? "散装" : ""))
}).Distinct();
totalCount = q.Count();
@@ -613,6 +644,11 @@ namespace BLL
}
// 创建新的包装明细记录
var addedComponentIds = allComponentIds.Except(existingComponentIds).ToList();
foreach (var item in addedComponentIds)
{
ValidatePipelineComponentsNotInOtherPackaging(item);
}
var newDetailList = new List<Model.HJGL_PackagingManageDetail>();
foreach (var item in allComponentIds)
{
@@ -652,6 +688,28 @@ namespace BLL
/// 获取包装状态下拉框选项
/// </summary>
/// <returns>包装状态列表,包含状态文本和值的映射关系</returns>
private static void ValidatePipelineComponentsNotInOtherPackaging(string pipelineComponentId)
{
if (string.IsNullOrEmpty(pipelineComponentId))
{
return;
}
var existDetail = (from detail in Funs.DB.HJGL_PackagingManageDetail
join pack in Funs.DB.HJGL_PackagingManage on detail.PackagingManageId equals pack.PackagingManageId
where detail.PipelineComponentId == pipelineComponentId
select new
{
detail.PipelineComponentId,
PackagingCode = pack == null ? null : pack.PackagingCode
}).FirstOrDefault();
if (existDetail != null)
{
string packagingCodeText = string.IsNullOrEmpty(existDetail.PackagingCode) ? string.Empty : (",包装编号:" + existDetail.PackagingCode);
throw new Exception("组件已在其他包装中存在" + packagingCodeText + "。");
}
}
public static ListItem[] GetState()
{
ListItem[] list = new ListItem[3];
@@ -734,4 +792,4 @@ namespace BLL
}
#endregion Methods
}
}
}
@@ -144,11 +144,19 @@ namespace BLL
public static void DeleteById(string Id)
{
Model.HJGL_TrainNumberManage table = Funs.DB.HJGL_TrainNumberManage.FirstOrDefault(x => x.Id == Id);
var db = Funs.DB;
Model.HJGL_TrainNumberManage table = db.HJGL_TrainNumberManage.FirstOrDefault(x => x.Id == Id);
if (table != null)
{
Funs.DB.HJGL_TrainNumberManage.DeleteOnSubmit(table);
Funs.DB.SubmitChanges();
var packagingList = db.HJGL_PackagingManage.Where(x => x.TrainNumberId == Id).ToList();
foreach (var item in packagingList)
{
item.TrainNumberId = null;
item.TrainNumber = null;
}
db.HJGL_TrainNumberManage.DeleteOnSubmit(table);
db.SubmitChanges();
}
}
@@ -167,4 +175,4 @@ namespace BLL
}
}
}
}
}
@@ -197,5 +197,24 @@ namespace BLL
}
return icount;
}
/// <summary>
/// 根据人员id、日期获取入场教育合格考试记录
/// </summary>
/// <param name="testRecordId"></param>
/// <returns></returns>
public static Model.Training_TestRecord GetOKTestRecordByPersonIdAndDate(string testManId, DateTime? date)
{
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
{
var testRecord = (from x in db.Training_TestRecord
join y in db.Training_TestPlan on x.TestPlanId equals y.TestPlanId
join z in db.Training_Plan on y.PlanId equals z.PlanId
where x.TestManId == testManId && x.TestStartTime >= date && x.TestScores >= 60
&& z.TrainTypeId == BLL.Const.EntryEducationTrainTypeId
select x).FirstOrDefault();
return testRecord;
}
}
}
}
@@ -49,21 +49,23 @@ namespace BLL
/// <param name="lawRegulationIdentify">法律法规辨识实体</param>
public static void UpdateLawRegulationIdentify(Model.Law_LawRegulationIdentify lawRegulationIdentify)
{
Model.SGGLDB db = Funs.DB;
Model.Law_LawRegulationIdentify newLawRegulationIdentify = db.Law_LawRegulationIdentify.FirstOrDefault(e => e.LawRegulationIdentifyId == lawRegulationIdentify.LawRegulationIdentifyId);
if (newLawRegulationIdentify != null)
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
{
newLawRegulationIdentify.VersionNumber = lawRegulationIdentify.VersionNumber;
newLawRegulationIdentify.ProjectId = lawRegulationIdentify.ProjectId;
newLawRegulationIdentify.IdentifyPerson = lawRegulationIdentify.IdentifyPerson;
newLawRegulationIdentify.IdentifyDate = lawRegulationIdentify.IdentifyDate;
newLawRegulationIdentify.ManagerContent = lawRegulationIdentify.ManagerContent;
newLawRegulationIdentify.IdentifyConclude = lawRegulationIdentify.IdentifyConclude;
newLawRegulationIdentify.States = lawRegulationIdentify.States;
newLawRegulationIdentify.GroupMember = lawRegulationIdentify.GroupMember;
newLawRegulationIdentify.Remark = lawRegulationIdentify.Remark;
newLawRegulationIdentify.UpdateDate = lawRegulationIdentify.UpdateDate;
db.SubmitChanges();
Model.Law_LawRegulationIdentify newLawRegulationIdentify = db.Law_LawRegulationIdentify.FirstOrDefault(e => e.LawRegulationIdentifyId == lawRegulationIdentify.LawRegulationIdentifyId);
if (newLawRegulationIdentify != null)
{
newLawRegulationIdentify.VersionNumber = lawRegulationIdentify.VersionNumber;
newLawRegulationIdentify.ProjectId = lawRegulationIdentify.ProjectId;
newLawRegulationIdentify.IdentifyPerson = lawRegulationIdentify.IdentifyPerson;
newLawRegulationIdentify.IdentifyDate = lawRegulationIdentify.IdentifyDate;
newLawRegulationIdentify.ManagerContent = lawRegulationIdentify.ManagerContent;
newLawRegulationIdentify.IdentifyConclude = lawRegulationIdentify.IdentifyConclude;
newLawRegulationIdentify.States = lawRegulationIdentify.States;
newLawRegulationIdentify.GroupMember = lawRegulationIdentify.GroupMember;
newLawRegulationIdentify.Remark = lawRegulationIdentify.Remark;
newLawRegulationIdentify.UpdateDate = lawRegulationIdentify.UpdateDate;
db.SubmitChanges();
}
}
}
@@ -3058,7 +3058,7 @@ namespace BLL
from projectType in projectTypeJoin.DefaultIfEmpty()
join sysConst in Funs.DB.Sys_Const on new { ProjectState2 = "", GroupId = BLL.ConstValue.GroupId_ProjectState } equals new { ProjectState2 = sysConst.ConstValue, GroupId = sysConst.GroupId } into sysConstJoin
from sysConst in sysConstJoin.DefaultIfEmpty()
where project.ProjectState == "1" && project.MasterSysId != null
where project.ProjectState == "1" && project.MasterSysId != null && project.IsCNCECShow == true
select new ProjectOutput
{
ProjectId = project.ProjectId,
File diff suppressed because it is too large Load Diff
+21 -10
View File
@@ -474,18 +474,29 @@ namespace FineUIPro.Web.CLGL
return;
}
string planId = Grid1.SelectedRowID;
string message = TwOutputmasterService.RevokeGenOutMasterByPlanId(planId);
if (string.IsNullOrEmpty(message))
var planMaster = BLL.TwInOutplanmasterService.GetById(planId);
switch (planMaster.State)
{
ShowNotify("撤销出库成功!", MessageBoxIcon.Success);
BindGrid();
}
else
{
Alert.ShowInTop(message, MessageBoxIcon.Warning);
return;
case (int)TwConst.State.:
planMaster.State = (int)TwConst.State.;
planMaster.AuditMan = null;
planMaster.AuditDate = null;
TwInOutplanmasterService.Update(planMaster);
BindGrid();
ShowNotify("撤销审核成功!", MessageBoxIcon.Success);
}
break;
case (int)TwConst.State.:
TwOutputmasterService.RevokeGenOutMasterByPlanId(planId);
BindGrid();
ShowNotify("撤销出库单成功!", MessageBoxIcon.Success);
break;
default:
Alert.ShowInTop("请选择有效的计划!", MessageBoxIcon.Warning);
break;
}
}
+11 -3
View File
@@ -38,6 +38,10 @@ namespace FineUIPro.Web.Controls
{
ReportPath = Request.Params["ReportPath"];
WebReport1.StartReport += WebReport1_StartReport;
if (string.IsNullOrEmpty(ReportPath) || !System.IO.File.Exists(ReportPath))
{
throw new System.IO.FileNotFoundException("打印模板不存在!", ReportPath);
}
if (dataTables != null && dataTables.Count > 0)
{
for (int i = 0; i < dataTables.Count; i++)
@@ -49,8 +53,12 @@ namespace FineUIPro.Web.Controls
WebReport1.Report.Load(ReportPath);
if (WebReport1.Report.Dictionary.Connections.Count > 0)
{
WebReport1.Report.Dictionary.Connections[0].ConnectionString = Funs.ConnString;
WebReport1.Report.Save(ReportPath);
var reportConnection = WebReport1.Report.Dictionary.Connections[0];
if (reportConnection.ConnectionString != Funs.ConnString)
{
reportConnection.ConnectionString = Funs.ConnString;
WebReport1.Report.Save(ReportPath);
}
}
WebReport1.ReportFile = ReportPath;
WebReport1.Prepare();
@@ -69,4 +77,4 @@ namespace FineUIPro.Web.Controls
}
}
}
}
}
@@ -0,0 +1,87 @@
<?xml version="1.0" encoding="utf-8"?>
<Report ScriptLanguage="CSharp" ReportInfo.Created="04/19/2026 09:00:00" ReportInfo.Modified="04/19/2026 00:22:44" ReportInfo.CreatorVersion="2017.1.16.0">
<ScriptText>using System;
using System.Collections;
using System.Collections.Generic;
using System.ComponentModel;
using System.Windows.Forms;
using System.Drawing;
using System.Data;
using FastReport;
using FastReport.Data;
using FastReport.Dialog;
using FastReport.Table;
using FastReport.Utils;
namespace FastReport
{
public class ReportScript
{
private void TableData_ManualBuild(object sender, EventArgs e)
{
DataSourceBase rowData = Report.GetDataSource(&quot;Table1&quot;);
rowData.Init();
while (rowData.HasMoreRows)
{
TableData.PrintRow(0);
TableData.PrintColumns();
rowData.Next();
}
}
}
}
</ScriptText>
<Dictionary>
<TableDataSource Name="Table1" ReferenceName="Table1" DataType="System.Int32" Enabled="true">
<Column Name="PipelineCode" DataType="System.String"/>
<Column Name="SegmentCode" DataType="System.String"/>
<Column Name="WeldJointCode" DataType="System.String"/>
<Column Name="WeldJointMaterial" DataType="System.String"/>
<Column Name="DiaAndThickness" DataType="System.String"/>
</TableDataSource>
<Parameter Name="Code" DataType="System.String"/>
<Parameter Name="UnitWorkName" DataType="System.String"/>
</Dictionary>
<ReportPage Name="Page1" Landscape="true" PaperWidth="297" PaperHeight="210" RawPaperSize="9">
<PageHeaderBand Name="PageHeader1" Width="1047.06" Height="97.33">
<TableObject Name="TableHeader" Left="9.45" Top="9.45" Width="1028.16" Height="87.88" Border.Lines="All" Fill.Color="255, 255, 255">
<TableColumn Name="Column1" Width="204.86"/>
<TableColumn Name="Column2" Width="204.86"/>
<TableColumn Name="Column3" Width="274.66"/>
<TableColumn Name="Column4" Width="343.78"/>
<TableRow Name="Row1" Height="31.18">
<TableCell Name="Cell1" Text="任务单焊口号(安装)" HorzAlign="Center" VertAlign="Center" Font="宋体, 18pt, style=Bold" ColSpan="4"/>
<TableCell Name="Cell2"/>
<TableCell Name="Cell3"/>
<TableCell Name="Cell4"/>
</TableRow>
<TableRow Name="Row2" Height="28.35">
<TableCell Name="Cell5" Text="装置名称:[UnitWorkName]" VertAlign="Center" Font="宋体, 12pt" ColSpan="2"/>
<TableCell Name="Cell6"/>
<TableCell Name="Cell7" Text="任务单编号:[Code]" VertAlign="Center" Font="宋体, 12pt" ColSpan="2"/>
<TableCell Name="Cell8"/>
</TableRow>
<TableRow Name="Row3" Height="28.35">
<TableCell Name="Cell9" Border.Lines="All" Text="管线号" HorzAlign="Center" VertAlign="Center" Font="宋体, 13pt"/>
<TableCell Name="Cell10" Border.Lines="All" Text="焊口号" HorzAlign="Center" VertAlign="Center" Font="宋体, 13pt"/>
<TableCell Name="Cell11" Border.Lines="All" Text="材质" HorzAlign="Center" VertAlign="Center" Font="宋体, 13pt"/>
<TableCell Name="Cell12" Border.Lines="All" Text="规格" HorzAlign="Center" VertAlign="Center" Font="宋体, 13pt"/>
</TableRow>
</TableObject>
</PageHeaderBand>
<DataBand Name="Data1" Top="101.54" Width="1047.06" Height="28.35">
<TableObject Name="TableData" Left="9.45" Width="1028.16" Height="28.35" Border.Lines="All" ManualBuildEvent="TableData_ManualBuild">
<TableColumn Name="DataColumn1" Width="204.86"/>
<TableColumn Name="DataColumn2" Width="204.86"/>
<TableColumn Name="DataColumn3" Width="274.66"/>
<TableColumn Name="DataColumn4" Width="343.78"/>
<TableRow Name="DataRow1" Height="28.35">
<TableCell Name="DataCell1" Border.Lines="All" Text="[Table1.PipelineCode]" HorzAlign="Center" VertAlign="Center" Font="宋体, 11pt"/>
<TableCell Name="DataCell2" Border.Lines="All" Text="[Table1.WeldJointCode]" HorzAlign="Center" VertAlign="Center" Font="宋体, 11pt"/>
<TableCell Name="DataCell3" Border.Lines="All" Text="[Table1.WeldJointMaterial]" HorzAlign="Center" VertAlign="Center" Font="宋体, 11pt"/>
<TableCell Name="DataCell4" Border.Lines="All" Text="[Table1.DiaAndThickness]" HorzAlign="Center" VertAlign="Center" Font="宋体, 11pt"/>
</TableRow>
</TableObject>
</DataBand>
</ReportPage>
</Report>
@@ -0,0 +1,93 @@
<?xml version="1.0" encoding="utf-8"?>
<Report ScriptLanguage="CSharp" ReportInfo.Created="04/19/2026 09:00:00" ReportInfo.Modified="04/19/2026 00:22:04" ReportInfo.CreatorVersion="2017.1.16.0">
<ScriptText>using System;
using System.Collections;
using System.Collections.Generic;
using System.ComponentModel;
using System.Windows.Forms;
using System.Drawing;
using System.Data;
using FastReport;
using FastReport.Data;
using FastReport.Dialog;
using FastReport.Table;
using FastReport.Utils;
namespace FastReport
{
public class ReportScript
{
private void TableData_ManualBuild(object sender, EventArgs e)
{
DataSourceBase rowData = Report.GetDataSource(&quot;Table1&quot;);
rowData.Init();
while (rowData.HasMoreRows)
{
TableData.PrintRow(0);
TableData.PrintColumns();
rowData.Next();
}
}
}
}
</ScriptText>
<Dictionary>
<TableDataSource Name="Table1" ReferenceName="Table1" DataType="System.Int32" Enabled="true">
<Column Name="PipelineCode" DataType="System.String"/>
<Column Name="SegmentCode" DataType="System.String"/>
<Column Name="WeldJointCode" DataType="System.String"/>
<Column Name="WeldJointMaterial" DataType="System.String"/>
<Column Name="DiaAndThickness" DataType="System.String"/>
</TableDataSource>
<Parameter Name="Code" DataType="System.String"/>
<Parameter Name="UnitWorkName" DataType="System.String"/>
</Dictionary>
<ReportPage Name="Page1" Landscape="true" PaperWidth="297" PaperHeight="210" RawPaperSize="9">
<PageHeaderBand Name="PageHeader1" Width="1047.06" Height="97.33">
<TableObject Name="TableHeader" Left="9.45" Top="9.45" Width="1028.16" Height="87.88" Border.Lines="All" Fill.Color="255, 255, 255">
<TableColumn Name="Column1" Width="159.75"/>
<TableColumn Name="Column2" Width="159.75"/>
<TableColumn Name="Column3" Width="159.75"/>
<TableColumn Name="Column4" Width="239.62"/>
<TableColumn Name="Column5" Width="309.29"/>
<TableRow Name="Row1" Height="31.18">
<TableCell Name="Cell1" Text="任务单焊口号(预制)" HorzAlign="Center" VertAlign="Center" Font="宋体, 18pt, style=Bold" ColSpan="5"/>
<TableCell Name="Cell2"/>
<TableCell Name="Cell3"/>
<TableCell Name="Cell4"/>
<TableCell Name="Cell5"/>
</TableRow>
<TableRow Name="Row2" Height="28.35">
<TableCell Name="Cell6" Text="装置名称:[UnitWorkName]" VertAlign="Center" Font="宋体, 12pt" ColSpan="2"/>
<TableCell Name="Cell7"/>
<TableCell Name="Cell8" Text="任务单编号:[Code]" VertAlign="Center" Font="宋体, 12pt" ColSpan="3"/>
<TableCell Name="Cell9"/>
<TableCell Name="Cell10"/>
</TableRow>
<TableRow Name="Row3" Height="28.35">
<TableCell Name="Cell11" Border.Lines="All" Text="管线号" HorzAlign="Center" VertAlign="Center" Font="宋体, 13pt"/>
<TableCell Name="Cell12" Border.Lines="All" Text="管段号" HorzAlign="Center" VertAlign="Center" Font="宋体, 13pt"/>
<TableCell Name="Cell13" Border.Lines="All" Text="焊口号" HorzAlign="Center" VertAlign="Center" Font="宋体, 13pt"/>
<TableCell Name="Cell14" Border.Lines="All" Text="材质" HorzAlign="Center" VertAlign="Center" Font="宋体, 13pt"/>
<TableCell Name="Cell15" Border.Lines="All" Text="规格" HorzAlign="Center" VertAlign="Center" Font="宋体, 13pt"/>
</TableRow>
</TableObject>
</PageHeaderBand>
<DataBand Name="Data1" Top="101.54" Width="1047.06" Height="28.35">
<TableObject Name="TableData" Left="9.45" Width="1028.16" Height="28.35" Border.Lines="All" ManualBuildEvent="TableData_ManualBuild">
<TableColumn Name="DataColumn1" Width="159.75"/>
<TableColumn Name="DataColumn2" Width="159.75"/>
<TableColumn Name="DataColumn3" Width="159.75"/>
<TableColumn Name="DataColumn4" Width="239.62"/>
<TableColumn Name="DataColumn5" Width="309.29"/>
<TableRow Name="DataRow1" Height="28.35">
<TableCell Name="DataCell1" Border.Lines="All" Text="[Table1.PipelineCode]" HorzAlign="Center" VertAlign="Center" Font="宋体, 11pt"/>
<TableCell Name="DataCell2" Border.Lines="All" Text="[Table1.SegmentCode]" HorzAlign="Center" VertAlign="Center" Font="宋体, 11pt"/>
<TableCell Name="DataCell3" Border.Lines="All" Text="[Table1.WeldJointCode]" HorzAlign="Center" VertAlign="Center" Font="宋体, 11pt"/>
<TableCell Name="DataCell4" Border.Lines="All" Text="[Table1.WeldJointMaterial]" HorzAlign="Center" VertAlign="Center" Font="宋体, 11pt"/>
<TableCell Name="DataCell5" Border.Lines="All" Text="[Table1.DiaAndThickness]" HorzAlign="Center" VertAlign="Center" Font="宋体, 11pt"/>
</TableRow>
</TableObject>
</DataBand>
</ReportPage>
</Report>
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<Report ScriptLanguage="CSharp" ReportInfo.Created="12/29/2021 10:56:08" ReportInfo.Modified="03/11/2026 16:07:53" ReportInfo.CreatorVersion="2017.1.16.0">
<Report ScriptLanguage="CSharp" ReportInfo.Created="12/29/2021 10:56:08" ReportInfo.Modified="04/14/2026 16:15:36" ReportInfo.CreatorVersion="2017.1.16.0">
<ScriptText>using System;
using System.Collections;
using System.Collections.Generic;
@@ -99,7 +99,7 @@ namespace FastReport
}
</ScriptText>
<Dictionary>
<MsSqlDataConnection Name="Connection" ConnectionString="rijcmlqvJIqZbrmqGn7L0P56UFhaUHihKXxbhpqie4wmZgM2ymDKry7UxzO5md9ybQlkfKpN2rHYbp9GtH1LDQPa7z2vVu/kEnNnTKeHt9obmaC7TQDh0IvsUBSuzhGZdfAIK7YyBqykCgeZm5rvA6K5b7zHGdA+7pUpJ/9ZLpp1NuxWRE/YXimGeniUNA/761p7jLt"/>
<MsSqlDataConnection Name="Connection" ConnectionString="rijcmlqvJIqZbrmqGn7L0P56UFhaUHihKXxbhpqie4wmZgM2ymDKry7UxzO5md9ybQlkfKpN2rHYbp9GtH1LDQPa7z2vVu/kEnNnTKeHt9obmaC7TQDh0IvsUBSuzhGZdfAIK7YyBqykCgeZm5rvA6K5b7zHGdA+7pUpJ/9ZLpp1NuxWRFvoS/O78nkZZeky9BsAtP/"/>
<TableDataSource Name="Table1" ReferenceName="Table1" DataType="System.Int32" Enabled="true">
<Column Name="PipelineComponentId" DataType="System.String"/>
<Column Name="PipelineComponentCode" DataType="System.String"/>
+1 -1
View File
@@ -17033,7 +17033,7 @@
</COMReference>
</ItemGroup>
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
<Import Project="$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v15.0\WebApplications\Microsoft.WebApplication.targets" />
<Import Project="$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v18.0\WebApplications\Microsoft.WebApplication.targets" />
<ProjectExtensions>
<VisualStudio>
<FlavorProperties GUID="{349c5851-65df-11da-9384-00065b846f21}">
@@ -125,8 +125,10 @@
DataField="PipelineCode" SortField="PipelineCode" FieldType="String" HeaderTextAlign="Center"
Width="150px">
</f:RenderField>--%>
<f:RenderField HeaderText="任务单编号" ColumnID="TaskCode" DataField="TaskCode"
SortField="TaskCode" FieldType="String" HeaderTextAlign="Center" Width="100px">
</f:RenderField>
<f:RenderField HeaderText="材质1" ColumnID="Material1Code" DataField="Material1Code" SortField="Material1Code" FieldType="String" HeaderTextAlign="Center"
TextAlign="Left" Width="90px">
</f:RenderField>
@@ -597,6 +597,7 @@ namespace FineUIPro.Web.HJGL.InfoQuery
= x.IsWeldOK,
= x.UnitName,
= x.FlowingSection,
= x.TaskCode,
1 = x.Material1Code,
2 = x.Material2Code,
= x.Size,
@@ -678,6 +679,7 @@ namespace FineUIPro.Web.HJGL.InfoQuery
= x.IsWeldOK,
= x.UnitName,
= x.FlowingSection,
= x.TaskCode,
1 = x.Material1Code,
2 = x.Material2Code,
= x.Size,
@@ -128,7 +128,7 @@
</f:RenderField>
<f:RenderField Width="150px" ColumnID="StackingPosition" DataField="StackingPosition"
FieldType="String" HeaderText="预制工作包" HeaderTextAlign="Center"
TextAlign="Left">
TextAlign="Left" Hidden="true">
</f:RenderField>
</Columns>
<PageItems>
@@ -1,4 +1,4 @@
using BLL;
using BLL;
using MiniExcelLibs;
using Model;
using System;
@@ -13,7 +13,6 @@ namespace FineUIPro.Web.HJGL.PreDesign
public partial class InstallList : PageBase
{
public int pageSize = 20;
public static IQueryable<View_HJGL_InstallData> GridDataTable = null;
protected void Page_Load(object sender, EventArgs e)
{
@@ -214,57 +213,24 @@ namespace FineUIPro.Web.HJGL.PreDesign
private void BindGrid()
{
if (tvControlItem.SelectedNode == null) return;
var view_HJGL_InstallDatas = BindData(Grid1.PageIndex+1, Grid1.PageSize,out int totalCount);
var view_HJGL_InstallDatas = BindData(Grid1.PageIndex+1, Grid1.PageSize,out int totalCount, out int componentCount, out int partCount);
// 2.获取当前分页数据
Grid1.RecordCount = totalCount;
var table = view_HJGL_InstallDatas;
Grid1.DataSource = table;
Grid1.DataBind();
// 更新汇总信息
UpdateSummary();
// 更新汇总信息(使用已统计的数据)
UpdateSummary(componentCount, partCount);
}
/// <summary>
/// 更新汇总信息
/// </summary>
private void UpdateSummary()
private void UpdateSummary(int componentCount, int partCount)
{
try
{
var baseQuery = from x in Funs.DB.View_HJGL_InstallData select x;
// 应用与数据绑定相同的筛选条件
if (tvControlItem.SelectedNode.CommandName.Split('|').Length == 2)
{
baseQuery = baseQuery.Where(x => x.UnitWorkId == tvControlItem.SelectedNode.NodeID);
}
else if (tvControlItem.SelectedNode.CommandName == "流水段")
{
baseQuery = baseQuery.Where(x => x.UnitWorkId == tvControlItem.SelectedNode.ParentNode.NodeID && x.FlowingSection == tvControlItem.SelectedNode.Text);
}
if (!string.IsNullOrEmpty(txtPipelineCode2.Text))
{
baseQuery = baseQuery.Where(x => x.PipelineCode.Contains(txtPipelineCode2.Text.Trim()));
}
if (!string.IsNullOrEmpty(txtPipelineComponentCode.Text))
{
baseQuery = baseQuery.Where(x => x.Code.Contains(txtPipelineComponentCode.Text.Trim()));
}
if (!string.IsNullOrEmpty(drpTypeStr.SelectedValue))
{
baseQuery = baseQuery.Where(x => x.TypeStr.Contains(drpTypeStr.SelectedValue));
}
if (!string.IsNullOrEmpty(txtPipelineCode.Text))
{
baseQuery = baseQuery.Where(x => x.PipelineCode.Contains(txtPipelineCode.Text.Trim()));
}
// 计算汇总数据
var componentCount = baseQuery.Count(x => x.TypeStr == "预制组件");
var partCount = baseQuery.Count(x => x.TypeStr == "预制散件");
// 更新汇总标签
lblSummary1.Text = $"预制组件数量:{componentCount}";
lblSummary2.Text = $"预制散件数量:{partCount}";
@@ -281,29 +247,61 @@ namespace FineUIPro.Web.HJGL.PreDesign
/// 查询数据
/// </summary>
/// <returns></returns>
private List<View_HJGL_InstallData> BindData(int pageIndex, int pageSize, out int totalCount)
private List<View_HJGL_InstallData> BindData(int pageIndex, int pageSize, out int totalCount, out int componentCount, out int partCount)
{
var baseQuery = GetIQueryableInstallDatas();
// 一次性统计所有需要的数据(使用 GroupBy 优化)
var stats = baseQuery
.GroupBy(x => x.TypeStr)
.Select(g => new { TypeStr = g.Key, Count = g.Count() })
.ToList();
// 从统计结果中提取数据
totalCount = stats.Sum(s => s.Count);
componentCount = stats.FirstOrDefault(s => s.TypeStr == "预制组件")?.Count ?? 0;
partCount = stats.FirstOrDefault(s => s.TypeStr == "预制散件")?.Count ?? 0;
// 分页保护
if (pageIndex <= 0) pageIndex = 1;
if (pageSize <= 0) pageSize = 10;
var query = baseQuery.Skip((pageIndex - 1) * pageSize).Take(pageSize).ToList();
// 预制组件数量显示为1,预制散件保持原始数量
foreach (var item in query)
{
if (item.TypeStr == "预制组件")
{
item.Number = 1;
}
}
return query;
}
var baseQuery=from x in Funs.DB.View_HJGL_InstallData
select x;
private IQueryable<View_HJGL_InstallData> GetIQueryableInstallDatas()
{
var baseQuery = from x in Funs.DB.View_HJGL_InstallData
select x;
if (tvControlItem.SelectedNode.CommandName.Split('|').Length == 2)
{
baseQuery = baseQuery.Where(x => x.UnitWorkId == tvControlItem.SelectedNode.NodeID);
baseQuery = baseQuery.Where(x => x.UnitWorkId == tvControlItem.SelectedNode.NodeID);
}
else if (tvControlItem.SelectedNode.CommandName == "流水段")
{
baseQuery = baseQuery.Where(x => x.UnitWorkId == tvControlItem.SelectedNode.ParentNode.NodeID && x.FlowingSection == tvControlItem.SelectedNode.Text);
}
}
if (!string.IsNullOrEmpty(txtPipelineCode2.Text))
{
baseQuery = baseQuery.Where(x => x.PipelineCode.Contains(txtPipelineCode2.Text.Trim()));
}
}
if (!string.IsNullOrEmpty(txtPipelineComponentCode.Text))
{
baseQuery = baseQuery.Where(x => x.Code.Contains(txtPipelineComponentCode.Text.Trim()));
}
}
if (!string.IsNullOrEmpty(drpTypeStr.SelectedValue))
{
baseQuery = baseQuery.Where(x => x.TypeStr.Contains(drpTypeStr.SelectedValue));
@@ -315,19 +313,13 @@ namespace FineUIPro.Web.HJGL.PreDesign
//}
if (!string.IsNullOrEmpty(txtPipelineCode.Text))
{
baseQuery = baseQuery.Where(x => x.PipelineCode.Contains(txtPipelineCode.Text.Trim()));
baseQuery = baseQuery.Where(x => x.PipelineCode.Contains(txtPipelineCode.Text.Trim()));
}
}
baseQuery = baseQuery.OrderBy(x => x.PipelineCode).ThenBy(x => x.Code);
totalCount = baseQuery.Count();
GridDataTable = baseQuery;
// 分页保护
if (pageIndex <= 0) pageIndex = 1;
if (pageSize <= 0) pageSize = 10;
var query = baseQuery.Skip((pageIndex - 1) * pageSize).Take(pageSize).ToList();
return query;
}
return baseQuery;
}
#endregion
#region
@@ -418,16 +410,18 @@ namespace FineUIPro.Web.HJGL.PreDesign
/// <param name="e"></param>
protected void btnOut_Click(object sender, EventArgs e)
{
if (GridDataTable != null)
{
var q = (from x in GridDataTable
var baseQuery = GetIQueryableInstallDatas();
var q = (from x in baseQuery
where x.Code != "裕-量"
select new
{
线 = x.PipelineCode,
= x.TypeStr,
= x.Code,
= (x.Matdef=="" || x.Matdef==null)?"-":x.Matdef,
= x.Number??1,
= x.TypeStr == "预制组件" ? 1 : (x.Number ?? 1),
= x.PackagingCode,
= x.TrainNumber,
= x.FlowingSection
@@ -435,7 +429,7 @@ namespace FineUIPro.Web.HJGL.PreDesign
string path = Funs.RootPath + @"File\Excel\Temp\PrePipelineInstallList.xlsx";
path = path.Replace(".xlsx", string.Format("{0:yyyy-MM-dd}", DateTime.Now) + ".xlsx");
MiniExcel.SaveAs(path, q);
MiniExcel.SaveAs(path, q, overwriteFile: true);
string fileName = $"安装清单-" + this.tvControlItem.SelectedNode.Text + "-" + string.Format("{0:yyyy-MM-dd}", DateTime.Now) + ".xlsx";
FileInfo info = new FileInfo(path);
@@ -448,7 +442,7 @@ namespace FineUIPro.Web.HJGL.PreDesign
System.Web.HttpContext.Current.Response.Flush();
System.Web.HttpContext.Current.Response.Close();
File.Delete(path);
}
}
}
}
@@ -292,11 +292,14 @@ namespace FineUIPro.Web.HJGL.PreDesign
listStr.Add(new SqlParameter("@ProductionState", drpProductionState.SelectedValue.ToString()));
}
if (!string.IsNullOrEmpty(drpFlowingSection.SelectedValue) && drpFlowingSection.SelectedValue != Const._Null)
if (!string.IsNullOrEmpty(drpFlowingSection.SelectedValue) && drpFlowingSection.SelectedValue != Const._Null)
{
strSql += " AND pipe.FlowingSection =@FlowingSection";
listStr.Add(new SqlParameter("@FlowingSection", drpFlowingSection.SelectedValue.ToString()));
}
// 过滤组件编号值为"裕-量"的行
strSql += " AND com.PipelineComponentCode != @ExcludeYuliang";
listStr.Add(new SqlParameter("@ExcludeYuliang", "裕-量"));
SqlParameter[] parameter = listStr.ToArray();
DataTable tb = SQLHelper.GetDataTableRunText(strSql, parameter);
GridDataTable = tb;
@@ -123,14 +123,14 @@
DataField="CompletedRate" FieldType="String" HeaderTextAlign="Center" TextAlign="Left"
Width="120px">
</f:RenderField>
<f:RenderField HeaderText="当前焊工数量" ColumnID="WelderCount"
<%-- <f:RenderField HeaderText="当前焊工数量" ColumnID="WelderCount"
DataField="WelderCount" FieldType="Int" HeaderTextAlign="Center" TextAlign="Left"
Width="120px">
</f:RenderField>
<f:RenderField HeaderText="焊工日功效" ColumnID="WarningWelderCount"
DataField="WarningWelderCount" FieldType="Float" HeaderTextAlign="Center" TextAlign="Left"
Width="120px">
</f:RenderField>
</f:RenderField>--%>
</Columns>
<PageItems>
<f:ToolbarSeparator ID="ToolbarSeparator2" runat="server">
@@ -574,13 +574,16 @@ namespace FineUIPro.Web.HJGL.WeldingManage
protected void btnDeletePipelineMatchMat_Click(object sender, EventArgs e)
{
if (Grid3.SelectedRowID != "")
if (Grid3.SelectedRowIDArray != null && Grid3.SelectedRowIDArray.Any())
{
dicSeclectPipeLine.Remove(Grid3.SelectedRowID);
var node = tvControlItem.FindNode(Grid3.SelectedRowID);
if (node != null)
foreach (string rowId in Grid3.SelectedRowIDArray)
{
node.Checked = false;
dicSeclectPipeLine.Remove(rowId);
var node = tvControlItem.FindNode(rowId);
if (node != null)
{
node.Checked = false;
}
}
tw_PipeMatMatchOutputs = TwArrivalStatisticsService.GetPipeMatMatch(this.CurrUser.LoginProjectId, dicSeclectPipeLine.Keys.ToList(), drpWarehouse.SelectedValue);
@@ -770,4 +773,4 @@ namespace FineUIPro.Web.HJGL.WeldingManage
this.InitTreeMenu();//加载树
}
}
}
}
@@ -85,6 +85,7 @@
<f:Button runat="server" ID="btnSearch" Icon="SystemSearch" ToolTip="查询" Text="查询" OnClick="btnSearch_Click">
</f:Button>
<f:ToolbarFill runat="server"></f:ToolbarFill>
<f:Label ID="lblTotalSize" runat="server" Text="总达因数:0" CssClass="customlabel"></f:Label>
<f:Button ID="btnPassMaster" Text="专工审核" Icon="ArrowRefresh" runat="server" OnClick="btnPassMaster_OnClick">
</f:Button>
<f:DatePicker ID="txtTaskDate" Label="计划焊接日期" runat="server"
@@ -115,6 +116,12 @@
<f:Button ID="btnPrintJoint" Text="打印焊口贴纸" Icon="Printer" runat="server"
OnClick="btnPrintJoint_Click">
</f:Button>
<f:Button ID="btnPrintTaskJointPrefab" Text="焊口打印(预制)" Icon="Printer" runat="server"
OnClick="btnPrintTaskJointPrefab_Click">
</f:Button>
<f:Button ID="btnPrintTaskJointInstall" Text="焊口打印(安装)" Icon="Printer" runat="server"
OnClick="btnPrintTaskJointInstall_Click">
</f:Button>
</Items>
</f:Toolbar>
</Toolbars>
@@ -279,6 +279,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage
private void BindGrid(List<Model.View_HJGL_WeldingTask> weldingTask)
{
UpdateTotalSizeLabel(weldingTask);
if (!string.IsNullOrEmpty(this.txtPipelineCode.Text.Trim()))
{
weldingTask = weldingTask.Where(e => e.PipelineCode.Contains(this.txtPipelineCode.Text.Trim())).OrderBy(x => x.PipeLineSortIndex).ToList();
@@ -320,6 +321,97 @@ namespace FineUIPro.Web.HJGL.WeldingManage
//this.btnSave.Hidden = false;
}
}
private void UpdateTotalSizeLabel(List<Model.View_HJGL_WeldingTask> weldingTask)
{
decimal totalSize = 0;
if (weldingTask != null && weldingTask.Count > 0)
{
totalSize = weldingTask.Sum(x => x.Size ?? 0);
}
lblTotalSize.Text = "总达因数:" + totalSize.ToString("0.##");
}
private List<Model.View_HJGL_WeldingTask> GetCurrentTaskList()
{
if (string.IsNullOrEmpty(tvControlItem.SelectedNodeID) || !tvControlItem.SelectedNodeID.Contains("|"))
{
return null;
}
DateTime? taskTime = Funs.GetNewDateTime(tvControlItem.SelectedNodeID.Split('|')[2]);
if (taskTime == null)
{
return null;
}
return BLL.WeldTaskService.GetWeldingTaskList(this.CurrUser.LoginProjectId,
tvControlItem.SelectedNodeID.Split('|')[0],
tvControlItem.SelectedNodeID.Split('|')[1],
Convert.ToDateTime(taskTime),
this.rbIsAudit.SelectedValue,
tvControlItem.SelectedNodeID.Split('|')[3]);
}
private void PrintTaskJoint(bool isInstall)
{
var taskList = GetCurrentTaskList();
if (taskList == null || !taskList.Any())
{
ShowNotify("请选择任务单", MessageBoxIcon.Question);
return;
}
BLL.FastReportService.ResetData();
var pipelineIds = taskList.Select(x => x.PipelineId).Distinct().ToList();
var pipelines = Funs.DB.HJGL_Pipeline.Where(x => pipelineIds.Contains(x.PipelineId)).ToList();
var result = taskList.OrderBy(x => x.PipeLineSortIndex).ThenBy(x => x.WeldJointCode).Select(x =>
{
var pipeline = pipelines.FirstOrDefault(y => y.PipelineId == x.PipelineId);
return new
{
PipelineCode = x.PipelineCode,
SegmentCode = isInstall ? string.Empty : (pipeline?.FlowingSection ?? x.PipelineCode),
WeldJointCode = !string.IsNullOrEmpty(x.PipelineCode) ? x.WeldJointCode.Replace(x.PipelineCode + "/", "") : x.WeldJointCode,
WeldJointMaterial = x.MaterialCode,
DiaAndThickness = x.Specification
};
}).ToList();
var tb = LINQToDataTable(result);
if (tb == null || tb.Rows.Count == 0)
{
ShowNotify("当前任务单无焊口数据", MessageBoxIcon.Question);
return;
}
tb.TableName = "Table1";
BLL.FastReportService.AddFastreportTable(tb);
var firstTask = Funs.DB.HJGL_WeldTask.FirstOrDefault(x => x.WeldTaskId == taskList[0].WeldTaskId);
BLL.FastReportService.AddFastreportParameter(new Dictionary<string, string>
{
{ "Code", firstTask?.TaskCode ?? string.Empty },
{ "UnitWorkName", UnitWorkService.getUnitWorkByUnitWorkId(taskList[0].UnitWorkId)?.UnitWorkName ?? string.Empty }
});
string rootPath = Server.MapPath("~/");
string initTemplatePath = isInstall ? "File\\Fastreport\\任务单焊口号_安装.frx" : "File\\Fastreport\\任务单焊口号_预制.frx";
if (File.Exists(rootPath + initTemplatePath))
{
PageContext.RegisterStartupScript(Window2.GetShowReference(String.Format("~/Controls/Fastreport.aspx?ReportPath={0}", rootPath + initTemplatePath)));
}
}
private string GetJointSpecText(decimal? dia, decimal? thickness)
{
string diaText = dia.HasValue ? dia.Value.ToString("0.##") : string.Empty;
string thicknessText = thickness.HasValue ? thickness.Value.ToString("0.##") : string.Empty;
if (string.IsNullOrEmpty(diaText) && string.IsNullOrEmpty(thicknessText))
{
return string.Empty;
}
return diaText + "*" + thicknessText;
}
#endregion
#region
@@ -1375,6 +1467,16 @@ namespace FineUIPro.Web.HJGL.WeldingManage
}
}
protected void btnPrintTaskJointPrefab_Click(object sender, EventArgs e)
{
PrintTaskJoint(false);
}
protected void btnPrintTaskJointInstall_Click(object sender, EventArgs e)
{
PrintTaskJoint(true);
}
protected void btnPrintTask_Click(object sender, EventArgs e)
{
if (!string.IsNullOrEmpty(tvControlItem.SelectedNodeID))
@@ -1397,13 +1499,13 @@ namespace FineUIPro.Web.HJGL.WeldingManage
where x.ProjectId == this.CurrUser.LoginProjectId &&
x.UnitWorkId == tvControlItem.SelectedNodeID.Split('|')[0] &&
x.UnitId == tvControlItem.SelectedNodeID.Split('|')[1]
&& x.TaskDate.Value.Date == time.Date && x.Tabler != null
&& x.TaskDate.Value.Date == time.Date && x.SerialNumber == tvControlItem.SelectedNodeID.Split('|')[3] && x.Tabler != null
select x).FirstOrDefault();
var weldTask = (from x in Funs.DB.HJGL_WeldTask
where x.ProjectId == this.CurrUser.LoginProjectId &&
x.UnitWorkId == tvControlItem.SelectedNodeID.Split('|')[0] &&
x.UnitId == tvControlItem.SelectedNodeID.Split('|')[1]
&& x.TaskDate.Value.Date == time.Date && x.AuditMan != null &&
&& x.TaskDate.Value.Date == time.Date && x.SerialNumber == tvControlItem.SelectedNodeID.Split('|')[3] && x.AuditMan != null &&
x.Tabler != null
select x).FirstOrDefault();
Model.Tw_PrintMaster printMaster = new Model.Tw_PrintMaster
@@ -1420,10 +1522,10 @@ namespace FineUIPro.Web.HJGL.WeldingManage
}
Dictionary<string, string> keyValuePairs = new Dictionary<string, string>();
keyValuePairs.Add("Code", UnitWorkService.getUnitWorkByUnitWorkId(tvControlItem.SelectedNodeID.Split('|')[0]).UnitWorkCode + string.Format("{0:yyyyMMdd}", taskTime.Value));
keyValuePairs.Add("Code", weldTask?.TaskCode ?? weldTask_CreateName?.TaskCode ?? string.Empty);
keyValuePairs.Add("TaskDate", string.Format("{0:yyyy-MM-dd}", taskTime.Value));
keyValuePairs.Add("UnitName", UnitService.GetUnitNameByUnitId(tvControlItem.SelectedNodeID.Split('|')[1]));
keyValuePairs.Add("UnitWorkName]", UnitWorkService.getUnitWorkByUnitWorkId(tvControlItem.SelectedNodeID.Split('|')[0]).UnitWorkName);
keyValuePairs.Add("UnitWorkName", UnitWorkService.getUnitWorkByUnitWorkId(tvControlItem.SelectedNodeID.Split('|')[0]).UnitWorkName);
// 创建一个新的DataTable
DataTable dataTable = new DataTable();
dataTable.TableName = "Data";
@@ -1543,4 +1645,4 @@ namespace FineUIPro.Web.HJGL.WeldingManage
}
}
}
}
}
@@ -212,6 +212,15 @@ namespace FineUIPro.Web.HJGL.WeldingManage
/// </remarks>
protected global::FineUIPro.Button btnSearch;
/// <summary>
/// lblTotalSize 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Label lblTotalSize;
/// <summary>
/// btnPassMaster 控件。
/// </summary>
@@ -302,6 +311,24 @@ namespace FineUIPro.Web.HJGL.WeldingManage
/// </remarks>
protected global::FineUIPro.Button btnPrintJoint;
/// <summary>
/// btnPrintTaskJointPrefab 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Button btnPrintTaskJointPrefab;
/// <summary>
/// btnPrintTaskJointInstall 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Button btnPrintTaskJointInstall;
/// <summary>
/// drpJointAttribute 控件。
/// </summary>
@@ -155,6 +155,8 @@
</f:RenderField>
<f:RenderField Hidden="true" Width="1px" HeaderText="培训次数" ColumnID="TrainCount1" DataField="TrainCount1">
</f:RenderField>
<f:RenderField Hidden="true" Width="1px" HeaderText="培训次数" ColumnID="TrainCount2" DataField="TrainCount2">
</f:RenderField>
</Columns>
<Listeners>
<f:Listener Event="beforerowcontextmenu" Handler="onRowContextMenu" />
@@ -195,7 +195,7 @@ namespace FineUIPro.Web.HSSE.SitePerson
}
string strSql = @"SELECT ProjectId,SitePersonId,PersonId,PersonName,IdentityCard,CardNo,PersonName
,WorkPostId,WorkPostName,UnitId,UnitName,TeamGroupId,TeamGroupName,InTime,RealNameAddTime,States, TrainCount,TrainCount1,YunMouState
,WorkPostId,WorkPostName,UnitId,UnitName,TeamGroupId,TeamGroupName,InTime,RealNameAddTime,States, TrainCount,TrainCount1,TrainCount2,YunMouState
FROM View_SitePerson_Person
Where ProjectId=@ProjectId ";
List<SqlParameter> listStr = new List<SqlParameter>
@@ -244,7 +244,8 @@ Where ProjectId=@ProjectId ";
}
if (this.ckTrain.Checked)
{
strSql += " AND (TrainCount =0 AND TrainCount1 =0)";
//strSql += " AND (TrainCount =0 AND TrainCount1 =0 AND TrainCount2=0)";
strSql += " AND TrainCount2=0";
}
if (this.ckIsUsed.Checked)
{
@@ -272,8 +273,9 @@ Where ProjectId=@ProjectId ";
// string personId = Grid1.Rows[i].DataKeys[0].ToString();
var tCount = Grid1.Rows[i].Values[8].ToString();
var tCount1 = Grid1.Rows[i].Values[9].ToString();
if (tCount == "0" && tCount1 == "0") ////未参加过培训的人员
var tCount2 = Grid1.Rows[i].Values[10].ToString();
//if (tCount == "0" && tCount1 == "0" && tCount2 == "0") ////未参加过培训的人员
if (tCount2 == "0") ////未参加过培训的人员
{
Grid1.Rows[i].RowCssClass = "Red";
}
@@ -731,7 +733,7 @@ Where ProjectId=@ProjectId ";
var getSitePerson = SitePerson_PersonService.GetSitePersonById(Grid1.SelectedRowID);
if (getSitePerson != null)
{
PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("../../Person/ProjectPersonView.aspx?SitePersonId={0}", this.SitePersonId, "查看 - ")));
PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("../../Person/ProjectPersonView.aspx?SitePersonId={0}", getSitePerson.SitePersonId, "查看 - ")));
}
}
@@ -748,7 +750,7 @@ Where ProjectId=@ProjectId ";
foreach (int rowIndex in Grid1.SelectedRowIndexArray)
{
string rowID = Grid1.DataKeys[rowIndex][0].ToString();
var sitePerson = Funs.DB.SitePerson_Person.FirstOrDefault(x => x.SitePersonId == rowID);
var sitePerson = Funs.DB.SitePerson_Person.FirstOrDefault(x => x.SitePersonId == rowID);
var person = Funs.DB.Person_Persons.FirstOrDefault(x => x.IdentityCard == sitePerson.IdentityCard);
if (!string.IsNullOrEmpty(person.PhotoUrl))
{
@@ -772,7 +774,7 @@ Where ProjectId=@ProjectId ";
protected void btnUpToYunMou_Click(object sender, EventArgs e)
{
var sitePerson = Funs.DB.SitePerson_Person.FirstOrDefault(x => x.SitePersonId == Grid1.SelectedRowID);
var person = Funs.DB.Person_Persons.FirstOrDefault(x => x.IdentityCard == sitePerson.IdentityCard);
var person = Funs.DB.Person_Persons.FirstOrDefault(x => x.IdentityCard == sitePerson.IdentityCard);
var token = YunMouHelper.getToken();
var res3 = YunMouHelper.updatePerson(person.IdentityCard, person.PersonName, string.IsNullOrEmpty(person.Telephone) ? "" : person.Telephone, person.PhotoUrl, token);
}
@@ -180,6 +180,8 @@ namespace FineUIPro.Web.common.ProjectSet
{
pdms.IsAuto = false;
}
UpsertBatchSetting("5", projectId);
ShowNotify("提交成功!", MessageBoxIcon.Success);
}
private void SaveColorModelSettings(string projectId)
{
File diff suppressed because one or more lines are too long
@@ -0,0 +1 @@
.wrap[data-v-27b9583d]{padding-bottom:1.875rem}
@@ -0,0 +1 @@
.wrap[data-v-099af148]{padding-bottom:1.875rem}
File diff suppressed because one or more lines are too long
@@ -0,0 +1 @@
.wrap[data-v-f24308e9]{padding-bottom:1.875rem}
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -0,0 +1 @@
import{h as e,s as l,a,_ as t,r as o,o as r,b as u,c as i,d as n,w as s,e as d,f as m,i as v,g as f,j as c}from"./index-BCk3NlG9.js";const p={baseURL:"https://sggl.sedin.com.cn/sgglapi/api/",validateStatus:e=>e>=200&&e<300};e.setConfig((e=>p)),e.interceptors.request.use((e=>(e.data=e.data||{},l(),e.header.token="AF17168B-87BD-4GLY-1111-F0A0A1158F9B",e)),(e=>Promise.reject(e))),e.interceptors.response.use((e=>{a();return e.data||{}}),(e=>Promise.reject(e)));const g=t({__name:"index",setup(l){const a=o({form:{}});return r((l=>{var t;console.log(l),t=null==l?void 0:l.id,e.get(`PipeJoint/getWeldJointByWeldJointId?WeldJointId=${t}`).then((e=>{console.log(e),a.form=e.data,a.form.CoverWelderName&&(a.form.welderName=a.form.CoverWelderName),a.form.BackingWelderName&&(a.form.welderName+="/"+a.form.BackingWelderName)}))})),(e,l)=>{const t=u(i("up-cell"),d),o=u(i("up-cell-group"),m),r=v;return f(),n(r,{class:"wrap"},{default:s((()=>[c(o,null,{default:s((()=>[c(t,{title:"管线",value:a.form.PipelineCode},null,8,["value"]),c(t,{title:"焊口",value:a.form.WeldJointCode},null,8,["value"]),c(t,{title:"焊接日期",value:a.form.WeldingDate},null,8,["value"]),c(t,{title:"材质一",value:a.form.Material1Code},null,8,["value"]),c(t,{title:"材质二",value:a.form.Material2Code},null,8,["value"]),c(t,{title:"达因",value:a.form.Size},null,8,["value"]),c(t,{title:"外径",value:a.form.Dia},null,8,["value"]),c(t,{title:"DN公称直径",value:a.form.DNDia},null,8,["value"]),c(t,{title:"壁厚",value:a.form.Thickness},null,8,["value"]),c(t,{title:"规格",value:a.form.Specification},null,8,["value"]),c(t,{title:"焊缝类型",value:a.form.WeldTypeCode},null,8,["value"]),c(t,{title:"焊接位置",value:a.form.WeldingLocationCode},null,8,["value"]),c(t,{title:"打底焊工",value:a.form.BackingWelderName},null,8,["value"]),c(t,{title:"盖面焊工",value:a.form.CoverWelderName},null,8,["value"])])),_:1})])),_:1})}}},[["__scopeId","data-v-099af148"]]);export{g as default};
@@ -0,0 +1 @@
import{h as e,s as l,a,_ as t,r as o,o as r,b as u,c as i,d as n,w as s,e as d,f as m,i as v,g as f,j as c}from"./index-Bvn6qVoR.js";const p={baseURL:"https://sggl.sedin.com.cn/sgglapi/api/",validateStatus:e=>e>=200&&e<300};e.setConfig((e=>p)),e.interceptors.request.use((e=>(e.data=e.data||{},l(),e.header.token="AF17168B-87BD-4GLY-1111-F0A0A1158F9B",e)),(e=>Promise.reject(e))),e.interceptors.response.use((e=>{a();return e.data||{}}),(e=>Promise.reject(e)));const g=t({__name:"index",setup(l){const a=o({form:{}});return r((l=>{var t;console.log(l),t=null==l?void 0:l.id,e.get(`PipeJoint/getWeldJointByWeldJointId?WeldJointId=${t}`).then((e=>{console.log(e),a.form=e.data,a.form.CoverWelderName&&(a.form.welderName=a.form.CoverWelderName),a.form.BackingWelderName&&(a.form.welderName+="/"+a.form.BackingWelderName)}))})),(e,l)=>{const t=u(i("up-cell"),d),o=u(i("up-cell-group"),m),r=v;return f(),n(r,{class:"wrap"},{default:s((()=>[c(o,null,{default:s((()=>[c(t,{title:"管线",value:a.form.PipelineCode},null,8,["value"]),c(t,{title:"焊口",value:a.form.WeldJointCode},null,8,["value"]),c(t,{title:"材质一",value:a.form.Material1Code},null,8,["value"]),c(t,{title:"材质二",value:a.form.Material2Code},null,8,["value"]),c(t,{title:"达因",value:a.form.Size},null,8,["value"]),c(t,{title:"外径",value:a.form.Dia},null,8,["value"]),c(t,{title:"DN公称直径",value:a.form.DNDia},null,8,["value"]),c(t,{title:"壁厚",value:a.form.Thickness},null,8,["value"]),c(t,{title:"规格",value:a.form.Specification},null,8,["value"]),c(t,{title:"焊缝类型",value:a.form.WeldTypeCode},null,8,["value"]),c(t,{title:"焊接位置",value:a.form.WeldingLocationCode},null,8,["value"]),c(t,{title:"打底焊工",value:a.form.BackingWelderName},null,8,["value"]),c(t,{title:"盖面焊工",value:a.form.CoverWelderName},null,8,["value"])])),_:1})])),_:1})}}},[["__scopeId","data-v-27b9583d"]]);export{g as default};
@@ -0,0 +1 @@
import{h as e,s as l,a,_ as t,r as o,o as u,b as r,c as i,d as n,w as s,e as d,f as m,i as v,g as f,j as c}from"./index-RspKKAD8.js";const p={baseURL:"https://sggl.sedin.com.cn/sgglapi/api/",validateStatus:e=>e>=200&&e<300};e.setConfig((e=>p)),e.interceptors.request.use((e=>(e.data=e.data||{},l(),e.header.token="AF17168B-87BD-4GLY-1111-F0A0A1158F9B",e)),(e=>Promise.reject(e))),e.interceptors.response.use((e=>{a();return e.data||{}}),(e=>Promise.reject(e)));const g=t({__name:"index",setup(l){const a=o({form:{}});return u((l=>{var t;console.log(l),t=null==l?void 0:l.id,e.get(`PipeJoint/getWeldJointByWeldJointId?WeldJointId=${t}`).then((e=>{console.log(e),a.form=e.data,a.form.CoverWelderName&&(a.form.welderName=a.form.CoverWelderName),a.form.BackingWelderName&&(a.form.welderName+="/"+a.form.BackingWelderName)}))})),(e,l)=>{const t=r(i("up-cell"),d),o=r(i("up-cell-group"),m),u=v;return f(),n(u,{class:"wrap"},{default:s((()=>[c(o,null,{default:s((()=>[c(t,{title:"管线",value:a.form.PipelineCode},null,8,["value"]),c(t,{title:"焊口",value:a.form.WeldJointCode},null,8,["value"]),c(t,{title:"焊接日期",value:a.form.WeldingDate},null,8,["value"]),c(t,{title:"焊工",value:a.form.welderName},null,8,["value"]),c(t,{title:"材质一",value:a.form.Material1Code},null,8,["value"]),c(t,{title:"材质二",value:a.form.Material2Code},null,8,["value"]),c(t,{title:"达因",value:a.form.Size},null,8,["value"]),c(t,{title:"外径",value:a.form.Dia},null,8,["value"]),c(t,{title:"DN公称直径",value:a.form.DNDia},null,8,["value"]),c(t,{title:"壁厚",value:a.form.Thickness},null,8,["value"]),c(t,{title:"规格",value:a.form.Specification},null,8,["value"]),c(t,{title:"焊接方法",value:a.form.WeldingMethodCode},null,8,["value"]),c(t,{title:"焊缝类型",value:a.form.WeldTypeCode},null,8,["value"]),c(t,{title:"焊接位置",value:a.form.WeldingLocationCode},null,8,["value"]),c(t,{title:"打底焊工",value:a.form.BackingWelderName},null,8,["value"]),c(t,{title:"盖面焊工",value:a.form.CoverWelderName},null,8,["value"])])),_:1})])),_:1})}}},[["__scopeId","data-v-f24308e9"]]);export{g as default};
File diff suppressed because one or more lines are too long
@@ -1,7 +1,7 @@
<!DOCTYPE html>
<html lang="en">
<head>
<link rel="stylesheet" href="/StaticPage/HJGL/assets/uni.b8bf2949.css">
<link rel="stylesheet" href="/StaticPage/HJGL/assets/uni.115a2c5d.css">
<meta charset="UTF-8" />
<script>
@@ -14,8 +14,8 @@
<title>WebH5</title>
<!--preload-links-->
<!--app-context-->
<script type="module" crossorigin src="/StaticPage/HJGL/assets/index-D_s_mHWI.js"></script>
<link rel="stylesheet" crossorigin href="/StaticPage/HJGL/assets/index-Dz4tKtNa.css">
<script type="module" crossorigin src="/StaticPage/HJGL/assets/index-BCk3NlG9.js"></script>
<link rel="stylesheet" crossorigin href="/StaticPage/HJGL/assets/index-th1baVH-.css">
</head>
<body>
<div id="app"><!--app-html--></div>
+20 -7
View File
@@ -124,26 +124,39 @@
<f:FormRow>
<Items>
<f:Panel runat="server" ID="panel2" RegionPosition="Center" RegionSplit="true" EnableCollapse="true" ShowBorder="true"
Layout="Fit" ShowHeader="true" RegionSplitWidth="20px" BodyPadding="1px" Height="215px" Title="施工单位进度统计"
TitleToolTip="施工单位进度统计" AutoScroll="true">
Layout="Fit" ShowHeader="true" RegionSplitWidth="20px" BodyPadding="1px" Height="215px" Title="进度质量"
TitleToolTip="进度质量" AutoScroll="true">
<Items>
<f:Grid ID="Grid3" ShowBorder="true" ShowHeader="false" Title="施工单位进度统计"
<f:Grid ID="Grid3" ShowBorder="true" ShowHeader="false" Title="进度质量"
EnableCollapse="true" runat="server" BoxFlex="1" DataKeyNames="UnitName"
EnableColumnLines="true" DataIDField="UnitName" AllowSorting="true" SortField="UnitName" SortDirection="ASC"
PageSize="15">
<Columns>
<f:RenderField HeaderText="施工单位" ColumnID="UnitName" ExpandUnusedSpace="true"
DataField="UnitName" SortField="UnitName" FieldType="String" HeaderTextAlign="Center"
TextAlign="Center" Width="300px">
TextAlign="Center" Width="200px">
</f:RenderField>
<f:RenderField HeaderText="当日完成达因数" ColumnID="TodayFinishSize"
DataField="TodayFinishSize" SortField="TodayFinishSize" FieldType="Double" HeaderTextAlign="Center"
TextAlign="Center" Width="250px">
TextAlign="Center" Width="150px">
</f:RenderField>
<f:RenderField HeaderText="累计已完成达因数" ColumnID="FinishSize"
DataField="FinishSize" SortField="FinishSize" FieldType="Double" HeaderTextAlign="Center"
TextAlign="Center" Width="250px">
TextAlign="Center" Width="150px">
</f:RenderField>
<f:RenderField HeaderText="当前焊工数量" ColumnID="CurrentWelders"
DataField="CurrentWelders" SortField="CurrentWelders" FieldType="Double" HeaderTextAlign="Center"
TextAlign="Center" Width="150px">
</f:RenderField>
<f:RenderField HeaderText="焊工日功效" ColumnID="WelderEfficiency"
DataField="WelderEfficiency" SortField="WelderEfficiency" FieldType="Double" HeaderTextAlign="Center"
TextAlign="Center" Width="150px">
</f:RenderField>
<f:RenderField HeaderText="焊接一次合格率" ColumnID="WeldingFirstPassRate"
DataField="WeldingFirstPassRate" SortField="WeldingFirstPassRate" FieldType="Double" HeaderTextAlign="Center"
TextAlign="Center" Width="150px">
</f:RenderField>
</Columns>
</f:Grid>
</Items>
@@ -230,7 +243,7 @@
</f:Panel>
</Items>
</f:FormRow>
</Rows>
</f:Form>
</Items>
@@ -403,7 +403,7 @@ WHERE UnitWorkId = @UnitWorkId";
List<SqlParameter> listStr = new List<SqlParameter>();
if (this.rbType.SelectedValue == "1")
{
// 优化:使用 CTE 和聚合替代嵌套子查询
// 优化:使用 CTE 和聚合替代嵌套子查询,增加焊工数量、焊工日功效、焊接一次合格率
strSql = @"
WITH UnitWeldingDaily AS (
--
@@ -413,8 +413,10 @@ WITH UnitWeldingDaily AS (
WHERE wd.ProjectId = @ProjectId
),
TodayStats AS (
--
SELECT wd.UnitId, SUM(ISNULL(jot.Size, 0)) AS TodayFinishSize
--
SELECT wd.UnitId,
SUM(ISNULL(jot.Size, 0)) AS TodayFinishSize,
COUNT(DISTINCT CASE WHEN jot.CoverWelderId IS NOT NULL AND jot.CoverWelderId != '' THEN jot.CoverWelderId END) AS CurrentWelders
FROM dbo.HJGL_WeldingDaily wd
INNER JOIN dbo.HJGL_WeldJoint jot ON jot.WeldingDailyId = wd.WeldingDailyId
WHERE wd.ProjectId = @ProjectId AND wd.WeldingDate = @WeldingDate AND jot.WeldingDailyId IS NOT NULL
@@ -427,19 +429,41 @@ CumulativeStats AS (
INNER JOIN dbo.HJGL_WeldJoint jot ON jot.WeldingDailyId = wd.WeldingDailyId
WHERE wd.ProjectId = @ProjectId AND wd.WeldingDate <= @WeldingDate AND jot.WeldingDailyId IS NOT NULL
GROUP BY wd.UnitId
),
NDERates AS (
--
SELECT wd.UnitId,
CAST(CASE WHEN COUNT(*) = 0 THEN 0
ELSE 100.0 * SUM(CASE WHEN nde.CheckResult != '2' THEN 1 ELSE 0 END) / COUNT(*)
END AS DECIMAL(8, 2)) AS WeldingFirstPassRate
FROM dbo.HJGL_Batch_NDEItem nde
INNER JOIN dbo.HJGL_Batch_BatchTrustItem bt ON nde.TrustBatchItemId = bt.TrustBatchItemId
INNER JOIN dbo.HJGL_Batch_PointBatchItem pb ON bt.PointBatchItemId = pb.PointBatchItemId
INNER JOIN dbo.HJGL_Batch_NDE n ON nde.NDEID = n.NDEID
INNER JOIN dbo.HJGL_WeldJoint wj ON bt.WeldJointId = wj.WeldJointId
INNER JOIN dbo.HJGL_WeldingDaily wd ON wj.WeldingDailyId = wd.WeldingDailyId
WHERE pb.PointDate IS NOT NULL AND pb.PointState = '1' AND bt.RepairRecordId IS NULL
AND n.ProjectId = @ProjectId
GROUP BY wd.UnitId
)
SELECT uwd.UnitName,
CAST(ISNULL(ts.TodayFinishSize, 0) AS DECIMAL(12, 3)) AS TodayFinishSize,
CAST(ISNULL(cs.FinishSize, 0) AS DECIMAL(12, 3)) AS FinishSize
CAST(ISNULL(cs.FinishSize, 0) AS DECIMAL(12, 3)) AS FinishSize,
ISNULL(ts.CurrentWelders, 0) AS CurrentWelders,
CASE WHEN ISNULL(ts.CurrentWelders, 0) = 0 THEN 0
ELSE CAST(ISNULL(ts.TodayFinishSize, 0) * 1.0 / ts.CurrentWelders AS DECIMAL(12, 3))
END AS WelderEfficiency,
ISNULL(nr.WeldingFirstPassRate, 0) AS WeldingFirstPassRate
FROM UnitWeldingDaily uwd
LEFT JOIN TodayStats ts ON uwd.UnitId = ts.UnitId
LEFT JOIN CumulativeStats cs ON uwd.UnitId = cs.UnitId";
LEFT JOIN CumulativeStats cs ON uwd.UnitId = cs.UnitId
LEFT JOIN NDERates nr ON uwd.UnitId = nr.UnitId";
listStr.Add(new SqlParameter("@ProjectId", (CurrUser != null) ? CurrUser.LoginProjectId : ""));
listStr.Add(new SqlParameter("@WeldingDate", this.txtWeldingDate.Text.Trim()));
}
else
{
// 优化:使用 CTE 和聚合(时间段模式)
// 优化:使用 CTE 和聚合(时间段模式),增加焊工数量、焊工日功效、焊接一次合格率
strSql = @"
WITH UnitWeldingDaily AS (
SELECT DISTINCT wd.UnitId, u.UnitName
@@ -448,8 +472,10 @@ WITH UnitWeldingDaily AS (
WHERE wd.ProjectId = @ProjectId
),
PeriodStats AS (
--
SELECT wd.UnitId, SUM(ISNULL(jot.Size, 0)) AS TodayFinishSize
--
SELECT wd.UnitId,
SUM(ISNULL(jot.Size, 0)) AS TodayFinishSize,
COUNT(DISTINCT CASE WHEN jot.CoverWelderId IS NOT NULL AND jot.CoverWelderId != '' THEN jot.CoverWelderId END) AS CurrentWelders
FROM dbo.HJGL_WeldingDaily wd
INNER JOIN dbo.HJGL_WeldJoint jot ON jot.WeldingDailyId = wd.WeldingDailyId
WHERE wd.ProjectId = @ProjectId AND wd.WeldingDate >= @WeldingStartDate AND wd.WeldingDate <= @WeldingEndDate AND jot.WeldingDailyId IS NOT NULL
@@ -462,13 +488,35 @@ CumulativeStats AS (
INNER JOIN dbo.HJGL_WeldJoint jot ON jot.WeldingDailyId = wd.WeldingDailyId
WHERE wd.ProjectId = @ProjectId AND wd.WeldingDate <= @WeldingEndDate AND jot.WeldingDailyId IS NOT NULL
GROUP BY wd.UnitId
),
NDERates AS (
--
SELECT wd.UnitId,
CAST(CASE WHEN COUNT(*) = 0 THEN 0
ELSE 100.0 * SUM(CASE WHEN nde.CheckResult != '2' THEN 1 ELSE 0 END) / COUNT(*)
END AS DECIMAL(8, 2)) AS WeldingFirstPassRate
FROM dbo.HJGL_Batch_NDEItem nde
INNER JOIN dbo.HJGL_Batch_BatchTrustItem bt ON nde.TrustBatchItemId = bt.TrustBatchItemId
INNER JOIN dbo.HJGL_Batch_PointBatchItem pb ON bt.PointBatchItemId = pb.PointBatchItemId
INNER JOIN dbo.HJGL_Batch_NDE n ON nde.NDEID = n.NDEID
INNER JOIN dbo.HJGL_WeldJoint wj ON bt.WeldJointId = wj.WeldJointId
INNER JOIN dbo.HJGL_WeldingDaily wd ON wj.WeldingDailyId = wd.WeldingDailyId
WHERE pb.PointDate IS NOT NULL AND pb.PointState = '1' AND bt.RepairRecordId IS NULL
AND n.ProjectId = @ProjectId
GROUP BY wd.UnitId
)
SELECT uwd.UnitName,
CAST(ISNULL(ps.TodayFinishSize, 0) AS DECIMAL(12, 3)) AS TodayFinishSize,
CAST(ISNULL(cs.FinishSize, 0) AS DECIMAL(12, 3)) AS FinishSize
CAST(ISNULL(cs.FinishSize, 0) AS DECIMAL(12, 3)) AS FinishSize,
ISNULL(ps.CurrentWelders, 0) AS CurrentWelders,
CASE WHEN ISNULL(ps.CurrentWelders, 0) = 0 THEN 0
ELSE CAST(ISNULL(ps.TodayFinishSize, 0) * 1.0 / ps.CurrentWelders AS DECIMAL(12, 3))
END AS WelderEfficiency,
ISNULL(nr.WeldingFirstPassRate, 0) AS WeldingFirstPassRate
FROM UnitWeldingDaily uwd
LEFT JOIN PeriodStats ps ON uwd.UnitId = ps.UnitId
LEFT JOIN CumulativeStats cs ON uwd.UnitId = cs.UnitId";
LEFT JOIN CumulativeStats cs ON uwd.UnitId = cs.UnitId
LEFT JOIN NDERates nr ON uwd.UnitId = nr.UnitId";
listStr.Add(new SqlParameter("@ProjectId", (CurrUser != null) ? CurrUser.LoginProjectId : ""));
listStr.Add(new SqlParameter("@WeldingStartDate", this.txtWeldingStartDate.Text.Trim()));
listStr.Add(new SqlParameter("@WeldingEndDate", this.txtWeldingEndDate.Text.Trim()));
@@ -646,6 +694,7 @@ LEFT JOIN CumulativeStats cs ON uwd.UnitId = cs.UnitId";
this.Grid1.Columns[1].HeaderText = "当日完成达因数";
this.Grid2.Columns[2].HeaderText = "当日完成达因数";
this.Grid3.Columns[1].HeaderText = "当日完成达因数";
this.Grid3.Columns[3].HeaderText = "当日焊工数量";
this.BtnAnalyse.Hidden = true;
BindGrid1();
BindGrid2(this.tvControlItem.SelectedNodeID);
@@ -659,6 +708,7 @@ LEFT JOIN CumulativeStats cs ON uwd.UnitId = cs.UnitId";
this.Grid1.Columns[1].HeaderText = "当期完成达因数";
this.Grid2.Columns[2].HeaderText = "当期完成达因数";
this.Grid3.Columns[1].HeaderText = "当期完成达因数";
this.Grid3.Columns[3].HeaderText = "当期焊工数量";
this.BtnAnalyse.Hidden = false;
}
}
+13 -1
View File
@@ -1,4 +1,4 @@
using System;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
@@ -20,6 +20,18 @@ namespace Model
public string ReceiveMan { get; set; }
public string ReceiveDate { get; set; }
public string TrainNumber { get; set; }
/// <summary>
/// 包装内数量(预制组件或散件数量)
/// </summary>
public int ComponentCount { get; set; }
/// <summary>
/// 包装分类代码
/// </summary>
public int? CategoryInt { get; set; }
/// <summary>
/// 包装分类名称
/// </summary>
public string CategoryString { get; set; }
}
+1 -2
View File
@@ -18,8 +18,7 @@ namespace Model
public string AuditManName2 { get; set; }
public string ReqUnitName { get; set; }
public string UnitWorkId { get; set; }
public string WeldTaskCode { get; set; }
public string Remark { get; set; }
public string WeldTaskCode { get; set; }
public int? PipeLineSortIndex { get; set; }
}
@@ -1,4 +1,4 @@
using System;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
@@ -55,5 +55,9 @@ namespace Model
/// 车次id
/// </summary>
public string TrainNumberId { get; set; }
/// <summary>
/// 是否关联车次(true:已关联, false:未关联, null:不筛选)
/// </summary>
public bool? HasTrainNumber { get; set; }
}
}
@@ -1,4 +1,4 @@
using System;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
@@ -31,6 +31,10 @@ namespace Model
public string TypeString { get; set; }
public int? CategoryInt { get; set; }
public string CategoryString { get; set; }
/// <summary>
/// 包装内数量(预制组件或散件数量)
/// </summary>
public int ComponentCount { get; set; }
#endregion Properties
+752 -278
View File
File diff suppressed because it is too large Load Diff
@@ -1,4 +1,4 @@
using BLL;
using BLL;
using Model;
using System;
using System.Collections.Generic;
@@ -229,6 +229,26 @@ namespace WebAPI.Controllers
return responeData;
}
/// <summary>
/// 获取包装分类列表
/// </summary>
/// <returns>包装分类字典</returns>
[HttpGet]
public Model.ResponeData GetPackagingCategories()
{
var responeData = new Model.ResponeData();
try
{
responeData.data = HJGLPackagingmanageService.CategoryIntMap;
}
catch (Exception ex)
{
responeData.code = 0;
responeData.message = ex.Message;
}
return responeData;
}
#endregion Methods
}
}
+15 -2
View File
@@ -436,7 +436,7 @@ namespace WebAPI.Controllers
/// <param name="name"></param>
/// <param name="pageIndex"></param>
/// <returns></returns>
public Model.ResponeData getTrainingPersonListByTrainTypeId(string projectId, string unitIds, string workPostIds, string trainTypeId, string name, int pageIndex, string startDate, string endDate,string isRepeat)
public Model.ResponeData getTrainingPersonListByTrainTypeId(string projectId, string unitIds, string workPostIds, string trainTypeId, string name, int pageIndex, string startDate, string endDate, string isRepeat)
{
var responeData = new Model.ResponeData();
try
@@ -546,7 +546,20 @@ namespace WebAPI.Controllers
var responeData = new Model.ResponeData();
try
{
SitePerson_PersonService.SetSitePerson_PersonStates(sitePersonId, states, DateTime.Now);
var getSitePerson = SitePerson_PersonService.GetSitePersonById(sitePersonId);
if (getSitePerson != null)
{
var testRecord = BLL.TestRecordService.GetOKTestRecordByPersonIdAndDate(getSitePerson.PersonId, getSitePerson.InTime);
if (testRecord != null)
{
SitePerson_PersonService.SetSitePerson_PersonStates(sitePersonId, states, DateTime.Now);
}
else
{
responeData.code = 0;
responeData.message = "入场教育考试未合格,无法审核入场!";
}
}
}
catch (Exception ex)
{