提交代码

This commit is contained in:
2023-11-29 18:02:03 +08:00
parent a8799ec7bb
commit d7ae172c39
17 changed files with 1188 additions and 14 deletions
+1
View File
@@ -644,6 +644,7 @@
<Compile Include="ProjectData\Project_SysSetService.cs" />
<Compile Include="ProjectData\TeamGroupService.cs" />
<Compile Include="ProjectData\UnitWorkService.cs" />
<Compile Include="PZHGL\InformationProject\ConstructionLogHJGLService.cs" />
<Compile Include="PZHGL\InformationProject\ConstructionLogMachineService.cs" />
<Compile Include="PZHGL\InformationProject\ConstructionLogManagementService.cs" />
<Compile Include="PZHGL\InformationProject\ConstructionLogPersonService.cs" />
@@ -1,5 +1,5 @@
using FineUIPro;
using System;
using System.Collections;
using System.Collections.Generic;
@@ -75,7 +75,7 @@ namespace BLL
IQueryable<Model.HJGL_PackagingManage> q1 = (from x in db.HJGL_PackagingManage
join y in db.HJGL_Pipeline_Component on x.PipelineComponentId equals y.PipelineComponentId
join z in db.HJGL_Pipeline on y.PipelineId equals z.PipelineId
select x
select x
);
if (!string.IsNullOrEmpty(name))
{
@@ -121,7 +121,7 @@ namespace BLL
}
return PlanStartDate;
}
public static List<PackagingManageItem> GetPackagingManageList(string projectId,string PackagingCode)
public static List<PackagingManageItem> GetPackagingManageList(string projectId, string PackagingCode)
{
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
{
@@ -131,7 +131,7 @@ namespace BLL
join m in db.Person_Persons on x.ReceiveMan equals m.PersonId into tt
from t in tt.DefaultIfEmpty()
where x.ProjectId == projectId
&&(string.IsNullOrEmpty(PackagingCode)|| x.PackagingCode.Contains(PackagingCode) )
&& (string.IsNullOrEmpty(PackagingCode) || x.PackagingCode.Contains(PackagingCode))
select new PackagingManageItem
{
PackagingManageId = x.PackagingManageId,
@@ -142,7 +142,7 @@ namespace BLL
StackingPosition = x.StackingPosition,
State = x.State,
ReceiveMan = t.PersonName,
ReceiveDate = string.Format("{0:g}", x.ReceiveDate),
ReceiveDate = x.ReceiveDate.HasValue ? string.Format("{0:g}", x.ReceiveDate) : "",
PlanStartDate = GetMinPlanStartDate(x.PackagingManageId),
}).Distinct();
@@ -156,8 +156,8 @@ namespace BLL
/// <param name="PackagingManageId"></param>
public static void PutOutOrder(string PackagingManageId)
{
var model= GetHJGL_PackagingManageById(PackagingManageId);
if (model.State==state_0)
var model = GetHJGL_PackagingManageById(PackagingManageId);
if (model.State == state_0)
{
model.State = state_1;
UpdateHJGL_PackagingManage(model);
@@ -173,7 +173,7 @@ namespace BLL
{
DataTable tb = new DataTable();
var model = GetHJGL_PackagingManageById(PackagingManageId);
if (!string .IsNullOrEmpty(model.PipelineComponentId))
if (!string.IsNullOrEmpty(model.PipelineComponentId))
{
var PipelineComponentIds = model.PipelineComponentId.Split(',');
string strSql = @"select com.PipelineComponentId, com.PipelineComponentCode,pipe.PlanStartDate,unitwork.UnitWorkName,'1' as num ,'个' as CU
@@ -185,7 +185,7 @@ namespace BLL
strSql += string.Format("where com.PipelineComponentId in ( {0}) ", "'" + string.Join("','", PipelineComponentIds) + "'");
SqlParameter[] parameter = listStr.ToArray();
tb = SQLHelper.GetDataTableRunText(strSql, parameter);
}
}
return tb;
}
@@ -195,7 +195,7 @@ namespace BLL
/// </summary>
/// <param name="projectid"></param>
/// <returns></returns>
public static List<string > GetPackagingCode(string projectid)
public static List<string> GetPackagingCode(string projectid)
{
Model.SGGLDB db = Funs.DB;
var q = (from x in db.HJGL_PackagingManage
@@ -244,8 +244,8 @@ namespace BLL
table.ContactName = newtable.ContactName;
table.ContactPhone = newtable.ContactPhone;
table.Remark = newtable.Remark;
table.ReceiveMan=newtable.ReceiveMan;
table.ReceiveDate=newtable.ReceiveDate;
table.ReceiveMan = newtable.ReceiveMan;
table.ReceiveDate = newtable.ReceiveDate;
db.SubmitChanges();
}
@@ -322,6 +322,14 @@ namespace BLL
updateWeldJoint.BackingWelderId = null;
BLL.WeldJointService.UpdateWeldJoint(updateWeldJoint);
var weldTask = BLL.WeldTaskService.GetWeldTaskByWeldJointId(weldJointId);
if (weldTask != null)
{
weldTask.CoverWelderId = null;
weldTask.BackingWelderId = null;
BLL.WeldTaskService.UpdateWeldTask(weldTask);
}
var pointBatchItems = from x in Funs.DB.HJGL_Batch_PointBatchItem where x.WeldJointId == weldJointId select x;
string pointBatchId = pointBatchItems.FirstOrDefault().PointBatchId;
@@ -0,0 +1,69 @@
using System.Collections.Generic;
using System.Linq;
namespace BLL
{
public class ConstructionLogHJGLService
{
public static Model.SGGLDB db = Funs.DB;
/// <summary>
/// 获取施工日志焊接数据明细列表
/// </summary>
/// <param name="satartRowIndex"></param>
/// <param name="maximumRows"></param>
/// <returns></returns>
public static List<Model.ZHGL_ConstructionLogHJGL> getListData(string ConstructionLogId)
{
return (from x in db.ZHGL_ConstructionLogHJGL
where x.ConstructionLogId == ConstructionLogId
select x).ToList();
}
/// <summary>
/// 增加施工日志焊接数据明细
/// </summary>
/// <param name="managerRuleApprove">施工日志焊接数据明细实体</param>
public static void AddConstructionLogHJGL(Model.ZHGL_ConstructionLogHJGL constructionLogHJGL)
{
Model.SGGLDB db = Funs.DB;
Model.ZHGL_ConstructionLogHJGL newConstructionLogHJGL = new Model.ZHGL_ConstructionLogHJGL();
newConstructionLogHJGL.ConstructionLogHJGLId = constructionLogHJGL.ConstructionLogHJGLId;
newConstructionLogHJGL.ConstructionLogId = constructionLogHJGL.ConstructionLogId;
newConstructionLogHJGL.UnitWorkId = constructionLogHJGL.UnitWorkId;
newConstructionLogHJGL.TodayCompleteSize = constructionLogHJGL.TodayCompleteSize;
newConstructionLogHJGL.TotalCompleteSize = constructionLogHJGL.TotalCompleteSize;
newConstructionLogHJGL.TotalSize = constructionLogHJGL.TotalSize;
newConstructionLogHJGL.TotalRate = constructionLogHJGL.TotalRate;
newConstructionLogHJGL.TomorrowPlanSize = constructionLogHJGL.TomorrowPlanSize;
db.ZHGL_ConstructionLogHJGL.InsertOnSubmit(newConstructionLogHJGL);
db.SubmitChanges();
}
/// <summary>
/// 根据月报id删除对应的所有施工日志焊接数据明细
/// </summary>
/// <param name="ConstructionLogId">施工日志焊接数据明细编号</param>
public static void DeleteConstructionLogHJGLsByConstructionLogId(string ConstructionLogId)
{
Model.SGGLDB db = Funs.DB;
var q = (from x in db.ZHGL_ConstructionLogHJGL where x.ConstructionLogId == ConstructionLogId select x).ToList();
if (q.Count() > 0)
{
db.ZHGL_ConstructionLogHJGL.DeleteAllOnSubmit(q);
db.SubmitChanges();
}
}
/// <summary>
/// 根据月报id获取对应的所有施工日志焊接数据明细
/// </summary>
/// <param name="ConstructionLogId">施工日志焊接数据明细编号</param>
public static List<Model.ZHGL_ConstructionLogHJGL> GetConstructionLogHJGLsByConstructionLogId(string ConstructionLogId)
{
Model.SGGLDB db = Funs.DB;
return (from x in db.ZHGL_ConstructionLogHJGL where x.ConstructionLogId == ConstructionLogId orderby x.UnitWorkId select x).ToList();
}
}
}