This commit is contained in:
2025-09-01 09:37:56 +08:00
44 changed files with 1787 additions and 1459 deletions
+10 -1
View File
@@ -57,7 +57,16 @@
<HintPath>..\packages\EmitMapper.1.0.0\lib\EmitMapper.dll</HintPath>
</Reference>
<Reference Include="FastReport">
<HintPath>E:\工作\天辰施工平台\SGGL_TCC\SGGL\BLL\bin\Debug\FastReport.dll</HintPath>
<HintPath>..\FineUIPro\Reference BLL\FastReport.dll</HintPath>
</Reference>
<Reference Include="FastReport.Bars">
<HintPath>..\FineUIPro\Reference BLL\FastReport.Bars.dll</HintPath>
</Reference>
<Reference Include="FastReport.Compat">
<HintPath>..\FineUIPro\Reference BLL\FastReport.Compat.dll</HintPath>
</Reference>
<Reference Include="FastReport.Editor">
<HintPath>..\FineUIPro\Reference BLL\FastReport.Editor.dll</HintPath>
</Reference>
<Reference Include="FineUIPro, Version=6.3.0.0, Culture=neutral, PublicKeyToken=9cbe753c029f291a, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
+18
View File
@@ -1468,6 +1468,24 @@ namespace BLL
return response.Content;
}
public static string RequestGet(string Baseurl, Dictionary<string, string> Token)
{
ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls12;
var client = new RestClient(Baseurl);
client.Timeout = -1;
var request = new RestRequest(Method.GET);
foreach (var item in Token)
{
request.AddHeader(item.Key, item.Value);
}
request.AddHeader("ClientId", SysConstSetService.ClientId);
request.AddHeader("OperationCode", Baseurl.Substring(Baseurl.LastIndexOf("/", StringComparison.Ordinal) + 1));
IRestResponse response = client.Execute(request);
return response.Content;
}
/// <summary>
/// 根据星期几返回值
/// </summary>
@@ -94,16 +94,12 @@ namespace BLL
public static string GetMinPlanStartDate(string PackagingManageId)
{
string PlanStartDate = "";
DataTable tb = BLL.HJGL_PackagingmanageService.GetPackagingDetailById(PackagingManageId);
if (tb == null || tb.Rows.Count == 0)
var tb = GetPackagingDetailById(PackagingManageId);
if (tb == null || tb.Count == 0)
{
return PlanStartDate;
}
var dtTable = tb.AsEnumerable().OrderBy(o => o["PlanStartDate"]).CopyToDataTable();
if (dtTable.Rows != null && dtTable.Rows.Count > 0)
{
PlanStartDate = dtTable.Rows[0]["PlanStartDate"].ToString();
}
PlanStartDate = tb.OrderBy(x => x.PlanStartDate).FirstOrDefault()?.PlanStartDate.ToString();
return PlanStartDate;
}
@@ -172,7 +168,7 @@ namespace BLL
/// </summary>
/// <param name="PackagingManageId"></param>
/// <returns></returns>
public static DataTable GetPackagingDetailById(string PackagingManageId)
/* public static DataTable GetPackagingDetailById(string PackagingManageId)
{
DataTable tb = new DataTable();
var model = GetHJGL_PackagingManageById(PackagingManageId);
@@ -191,8 +187,54 @@ namespace BLL
tb = SQLHelper.GetDataTableRunText(strSql, parameter);
}
return tb;
}
}*/
public static List<Model.PackagingManagePrintOutput> GetPackagingDetailById(string PackagingManageId)
{
var model = GetHJGL_PackagingManageById(PackagingManageId);
var result = new List<Model.PackagingManagePrintOutput>();
if (string.IsNullOrEmpty(model.PipelineComponentId))
return new List<Model.PackagingManagePrintOutput>();
var PipelineComponentIds = model.PipelineComponentId.Split(',');
if (model.TypeInt == (int)HJGL_PackagingmanageService.TypeInt.)
{
var query = from com in Funs.DB.HJGL_Pipeline_Component
join pipe in Funs.DB.HJGL_Pipeline on com.PipelineId equals pipe.PipelineId into pipeGroup
from pipe in pipeGroup.DefaultIfEmpty()
join unitwork in Funs.DB.WBS_UnitWork on pipe.UnitWorkId equals unitwork.UnitWorkId into unitworkGroup
from unitwork in unitworkGroup.DefaultIfEmpty()
where PipelineComponentIds.Contains(com.PipelineComponentId)
orderby com.PipelineComponentCode
select new Model.PackagingManagePrintOutput
{
PipelineComponentId = com.PipelineComponentId,
PipelineComponentCode = com.PipelineComponentCode,
PlanStartDate = pipe != null && pipe.PlanStartDate != null ? pipe.PlanStartDate : DateTime.Now,
UnitWorkName = unitwork != null ? unitwork.UnitWorkName : "",
num = "1",
CU = "个",
FlowingSection = pipe != null ? pipe.FlowingSection : ""
};
result = query.ToList();
}
else
{
var query = HJGLPackagingmanagedetailService.GetPackagingData(PackagingManageId).ToList();
var detailList = from x in query
select new Model.PackagingManagePrintOutput
{
PipelineComponentId = x.Id,
PipelineComponentCode = x.MaterialCode,
num = x.Number.ToString(),
CU = x.MaterialUnit,
UnitWorkName = x.UnitWorkId == null ? "" : UnitWorkService.GetNameById(x.UnitWorkId),
FlowingSection = x.FlowingSection,
};
result = detailList.ToList();
}
return result;
}
/// <summary>
/// 根据项目号获取包装编号历史记录
/// </summary>
@@ -87,38 +87,6 @@ namespace BLL
return (pagedData, totalCount);
}
/// <summary>
/// 获取分页列表
/// </summary>
/// <param name="table"></param>
/// <param name="grid1"></param>
/// <returns></returns>
public static IEnumerable GetListData(Model.HJGL_TrainNumberManage table, Grid grid1)
{
var q = GetByQueryModle(table);
Count = q.Count();
if (Count == 0)
{
return null;
}
q = q.Skip(grid1.PageSize * grid1.PageIndex).Take(grid1.PageSize);
// q = SortConditionHelper.SortingAndPaging(q, Grid1.SortField, Grid1.SortDirection, Grid1.PageIndex, Grid1.PageSize);
return from x in q
select new
{
x.Id,
x.TrainNumber,
x.ProjectId,
x.State,
x.DriverName,
x.DriverPhone,
x.LicensePlateNumber,
x.ContactName,
x.ContactPhone,
x.Remark,
};
}
public static Model.HJGL_TrainNumberManage GetModelById(string Id)
{
return Funs.DB.HJGL_TrainNumberManage.FirstOrDefault(x => x.Id == Id);
@@ -150,6 +118,7 @@ namespace BLL
ContactName = newtable.ContactName,
ContactPhone = newtable.ContactPhone,
Remark = newtable.Remark,
ReceiveDate=newtable.ReceiveDate,
};
Funs.DB.HJGL_TrainNumberManage.InsertOnSubmit(table);
Funs.DB.SubmitChanges();
@@ -170,6 +139,7 @@ namespace BLL
table.ContactName = newtable.ContactName;
table.ContactPhone = newtable.ContactPhone;
table.Remark = newtable.Remark;
table.ReceiveDate = newtable.ReceiveDate;
Funs.DB.SubmitChanges();
}
}