feat(HJGL): 新增材料仓库管理并优化管线划分页面
**新增功能:** - 添加材料仓库管理模块(增删改查) - 管线划分页面支持按流水段和管线划分筛选 - 管线划分页面支持批量设置仓库 **技术改进:** - 新增 Base_Warehouse 表和模型 - 扩展 HJGL_Pipeline 模型添加 WarehouseId 字段 - 优化管线查询支持多条件组合
This commit is contained in:
@@ -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 + ",";
|
||||
}
|
||||
@@ -607,10 +608,7 @@ namespace BLL
|
||||
|
||||
public static Dictionary<string, string> GetWarehouseCode(string projectId)
|
||||
{
|
||||
var q = (from x in Funs.DB.Tw_InOutPlanMaster
|
||||
where x.ProjectId == projectId &&
|
||||
x.InOutType == (int)TwConst.InOutType.入库
|
||||
select x.WarehouseCode).Distinct().ToDictionary(x => x, x => x);
|
||||
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 = "")
|
||||
|
||||
Reference in New Issue
Block a user