1
This commit is contained in:
@@ -320,7 +320,11 @@ namespace BLL
|
||||
{
|
||||
query = query.Where(x => x.ProjectName.Contains(filter.ProjectName));
|
||||
}
|
||||
|
||||
// 项目代号过滤(模糊查询)
|
||||
if (!string.IsNullOrEmpty(filter.ProjectCode))
|
||||
{
|
||||
query = query.Where(x => x.ProjectCode.Contains(filter.ProjectCode));
|
||||
}
|
||||
// 人员ID过滤
|
||||
if (!string.IsNullOrEmpty(filter.PersonId))
|
||||
{
|
||||
@@ -384,6 +388,7 @@ namespace BLL
|
||||
IdentityCard = x.IdentityCard,
|
||||
ProjectId = x.ProjectId,
|
||||
ProjectName = x.ProjectName,
|
||||
ProjectCode= x.ProjectCode,
|
||||
UnitId = x.UnitId,
|
||||
UnitName = x.UnitName,
|
||||
TeamGroupName = x.TeamGroupName,
|
||||
@@ -1112,14 +1117,17 @@ namespace BLL
|
||||
var query = from x in db.SitePerson_PersonInOut
|
||||
join y in db.SitePerson_Person on x.PersonId equals y.PersonId
|
||||
join z in db.Base_Project on x.ProjectId equals z.ProjectId
|
||||
where x.ChangeTime >= filter.StartTime && x.ChangeTime <= filter.EndTime && z.ProjectName.Contains(filter.ProjectName)
|
||||
where x.ChangeTime >= filter.StartTime && x.ChangeTime <= filter.EndTime
|
||||
select new Model.PersonInOutItem
|
||||
{
|
||||
PersonId = x.PersonId,
|
||||
PersonName = y.PersonName,
|
||||
ProjectId = x.ProjectId,
|
||||
ProjectCode=z.ProjectCode,
|
||||
ProjectName=z.ProjectName,
|
||||
UnitId = y.UnitId,
|
||||
UnitName = db.Base_Unit.First(z => z.UnitId == y.UnitId).UnitName,
|
||||
IdentityCard=x.IdentityCard,
|
||||
WorkPostId = y.WorkPostId,
|
||||
WorkPostName = db.Base_WorkPost.First(z => z.WorkPostId == y.WorkPostId).WorkPostName,
|
||||
IsIn = x.IsIn,
|
||||
@@ -1130,13 +1138,18 @@ namespace BLL
|
||||
|
||||
// 添加过滤条件
|
||||
if (filter != null)
|
||||
{
|
||||
{
|
||||
|
||||
// 单位名称过滤(模糊查询)
|
||||
if (!string.IsNullOrEmpty(filter.UnitName))
|
||||
{
|
||||
query = query.Where(x => x.UnitName.Contains(filter.UnitName));
|
||||
}
|
||||
|
||||
// 项目代号过滤(模糊查询)
|
||||
if (!string.IsNullOrEmpty(filter.ProjectCode))
|
||||
{
|
||||
query = query.Where(x => x.ProjectCode.Contains(filter.ProjectCode));
|
||||
}
|
||||
// 人员姓名过滤(模糊查询)
|
||||
if (!string.IsNullOrEmpty(filter.PersonName))
|
||||
{
|
||||
|
||||
@@ -406,6 +406,7 @@
|
||||
<Compile Include="HJGL\BaseInfo\Base_PressureService.cs" />
|
||||
<Compile Include="HJGL\BaseInfo\Base_PurgeMethodService.cs" />
|
||||
<Compile Include="HJGL\BaseInfo\Base_TestMediumService.cs" />
|
||||
<Compile Include="HJGL\BaseInfo\Base_WarehouseService.cs" />
|
||||
<Compile Include="HJGL\BaseInfo\Base_WeldingLocationServie.cs" />
|
||||
<Compile Include="HJGL\BaseInfo\Base_WeldingMethodService.cs" />
|
||||
<Compile Include="HJGL\BaseInfo\Base_WeldTypeService.cs" />
|
||||
|
||||
@@ -12,12 +12,12 @@ namespace BLL
|
||||
{
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
{
|
||||
string PipeArea = WarehouseCode == "工厂预制" ? "1" : "2";
|
||||
string WarehouseId = Base_WarehouseService.GetWarehouseList(projectid).Where(x => x.WarehouseName == WarehouseCode).Select(x => x.WarehouseId).FirstOrDefault();
|
||||
///所需材料数量列表
|
||||
var NeedOutMateriaList = 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
|
||||
where z.ProjectId == projectid && (string.IsNullOrEmpty(materialCode) || x.MaterialCode.Contains(materialCode)) && z.PipeArea == PipeArea
|
||||
where z.ProjectId == projectid && (string.IsNullOrEmpty(materialCode) || x.MaterialCode.Contains(materialCode)) && z.WarehouseId == WarehouseId
|
||||
group x by x.MaterialCode
|
||||
into g
|
||||
select new
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
using EmitMapper;
|
||||
using FineUIPro;
|
||||
using Microsoft.SqlServer.Dts.Runtime;
|
||||
using MiniExcelLibs;
|
||||
using Model;
|
||||
using System;
|
||||
@@ -264,7 +265,7 @@ namespace BLL
|
||||
string errorWarehouseCode = "";
|
||||
foreach (var item in warehouseCodeList)
|
||||
{
|
||||
if (!DropListService.HJGL_WarehouseCode().Select(x => x.Value == item).Any())
|
||||
if (!Base_WarehouseService.GetWarehouseList(projectid).Select(x => x.WarehouseName == item).Any())
|
||||
{
|
||||
errorWarehouseCode += item + ",";
|
||||
}
|
||||
@@ -605,7 +606,11 @@ namespace BLL
|
||||
return cusBillCode;
|
||||
}
|
||||
|
||||
|
||||
public static Dictionary<string, string> GetWarehouseCode(string projectId)
|
||||
{
|
||||
var q = Base_WarehouseService.GetWarehouseList(projectId).Distinct().ToDictionary(x => x.WarehouseName, x => x.WarehouseName);
|
||||
return q;
|
||||
}
|
||||
public static string GetDataInCusBillCode(string projectid, string unitcode, string typeString, string unitWorkCode = "", string Category = "")
|
||||
{
|
||||
if (typeString == TwConst.TypeInt.其他入库.ToString())
|
||||
|
||||
@@ -241,7 +241,7 @@ namespace BLL
|
||||
if (plan == null || plan.State != (int)TwConst.State.已审核)
|
||||
{
|
||||
return;
|
||||
}
|
||||
}
|
||||
//判断是否已经生成过入库单
|
||||
var queryIsExitInMaster = new Tw_InOutMasterOutput();
|
||||
queryIsExitInMaster.InOutPlanMasterId = planId;
|
||||
|
||||
@@ -2809,6 +2809,11 @@ namespace BLL
|
||||
/// </summary>
|
||||
public const string HJGL_ComponentsMenuId = "8IDKGJE2-09B1-4607-BC6D-865CE48F0009";
|
||||
|
||||
/// <summary>
|
||||
/// 材料仓库
|
||||
/// </summary>
|
||||
public const string HJGL_WarehouseMenuId = "2F027233-22EC-4063-A04F-FB9FE6A91588";
|
||||
|
||||
/// <summary>
|
||||
/// 探伤类型
|
||||
/// </summary>
|
||||
|
||||
@@ -0,0 +1,109 @@
|
||||
namespace BLL
|
||||
{
|
||||
using Model;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
|
||||
public static class Base_WarehouseService
|
||||
{
|
||||
/// <summary>
|
||||
/// 根据仓库ID获取仓库信息
|
||||
/// </summary>
|
||||
/// <param name="warehouseId">仓库ID</param>
|
||||
/// <returns>仓库实体</returns>
|
||||
public static Model.Base_Warehouse GetWarehouseByWarehouseId(string warehouseId)
|
||||
{
|
||||
return Funs.DB.Base_Warehouse.FirstOrDefault(e => e.WarehouseId == warehouseId);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 新增仓库信息
|
||||
/// </summary>
|
||||
/// <param name="warehouse">仓库实体</param>
|
||||
public static void AddWarehouse(Model.Base_Warehouse warehouse)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.Base_Warehouse newWarehouse = new Base_Warehouse
|
||||
{
|
||||
WarehouseId = warehouse.WarehouseId,
|
||||
WarehouseName = warehouse.WarehouseName,
|
||||
Remark = warehouse.Remark,
|
||||
ProjectId = warehouse.ProjectId,
|
||||
CreateUserId = warehouse.CreateUserId,
|
||||
CreateTime = warehouse.CreateTime,
|
||||
ModifyUserId = warehouse.ModifyUserId,
|
||||
ModifyTime = warehouse.ModifyTime,
|
||||
};
|
||||
db.Base_Warehouse.InsertOnSubmit(newWarehouse);
|
||||
db.SubmitChanges();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 更新仓库信息
|
||||
/// </summary>
|
||||
/// <param name="warehouse">仓库实体</param>
|
||||
public static void UpdateWarehouse(Model.Base_Warehouse warehouse)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.Base_Warehouse newWarehouse = db.Base_Warehouse.FirstOrDefault(e => e.WarehouseId == warehouse.WarehouseId);
|
||||
if (newWarehouse != null)
|
||||
{
|
||||
newWarehouse.WarehouseName = warehouse.WarehouseName;
|
||||
newWarehouse.Remark = warehouse.Remark;
|
||||
newWarehouse.ProjectId = warehouse.ProjectId;
|
||||
newWarehouse.ModifyUserId = warehouse.ModifyUserId;
|
||||
newWarehouse.ModifyTime = warehouse.ModifyTime;
|
||||
db.SubmitChanges();
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 根据仓库ID删除仓库信息
|
||||
/// </summary>
|
||||
/// <param name="warehouseId">仓库ID</param>
|
||||
public static void DeleteWarehouseByWarehouseId(string warehouseId)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.Base_Warehouse delWarehouse = db.Base_Warehouse.FirstOrDefault(e => e.WarehouseId == warehouseId);
|
||||
if (delWarehouse != null)
|
||||
{
|
||||
db.Base_Warehouse.DeleteOnSubmit(delWarehouse);
|
||||
db.SubmitChanges();
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取项目下所有仓库列表
|
||||
/// </summary>
|
||||
/// <param name="projectId">项目ID</param>
|
||||
/// <returns>仓库列表</returns>
|
||||
public static List<Model.Base_Warehouse> GetWarehouseList(string projectId)
|
||||
{
|
||||
var list = (from x in Funs.DB.Base_Warehouse
|
||||
where x.ProjectId == projectId
|
||||
orderby x.WarehouseName
|
||||
select x).ToList();
|
||||
|
||||
return list;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 初始化仓库下拉框
|
||||
/// </summary>
|
||||
/// <param name="dropName">下拉框控件</param>
|
||||
/// <param name="projectId">项目ID</param>
|
||||
/// <param name="isShowPlease">是否显示"请选择"</param>
|
||||
/// <param name="itemText">"请选择"项的文本</param>
|
||||
public static void InitWarehouseDropDownList(FineUIPro.DropDownList dropName, string projectId, bool isShowPlease, string itemText)
|
||||
{
|
||||
dropName.DataValueField = "WarehouseId";
|
||||
dropName.DataTextField = "WarehouseName";
|
||||
dropName.DataSource = GetWarehouseList(projectId);
|
||||
dropName.DataBind();
|
||||
if (isShowPlease)
|
||||
{
|
||||
Funs.FineUIPleaseSelect(dropName, itemText);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -118,7 +118,8 @@ namespace BLL
|
||||
SubmitMan = weldJoint.SubmitMan,
|
||||
TwoJointType = weldJoint.TwoJointType,
|
||||
CoverWelderTeamGroupId = weldJoint.CoverWelderTeamGroupId,
|
||||
BackingWelderTeamGroupId = weldJoint.BackingWelderTeamGroupId
|
||||
BackingWelderTeamGroupId = weldJoint.BackingWelderTeamGroupId,
|
||||
WeldJointPoint = weldJoint.WeldJointPoint
|
||||
};
|
||||
if (!string.IsNullOrEmpty(weldJoint.WeldJointId))
|
||||
{
|
||||
@@ -189,6 +190,7 @@ namespace BLL
|
||||
newWeldJoint.TwoJointType = weldJoint.TwoJointType;
|
||||
newWeldJoint.CoverWelderTeamGroupId = weldJoint.CoverWelderTeamGroupId;
|
||||
newWeldJoint.BackingWelderTeamGroupId = weldJoint.BackingWelderTeamGroupId;
|
||||
newWeldJoint.WeldJointPoint = weldJoint.WeldJointPoint;
|
||||
db.SubmitChanges();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user