材料入库导入增加序号

This commit is contained in:
2024-11-12 17:56:01 +08:00
parent 2cdb47a854
commit 57a4adcd9e
17 changed files with 115 additions and 28 deletions
+2 -2
View File
@@ -45,8 +45,8 @@ namespace BLL
};
public static Dictionary<string, int> PlanPrintMap = new Dictionary<string, int>
{
{ "采购通知单" ,(int)TypeInt.},
{ "退料通知单" ,(int)TypeInt.退},
{ "采购入库申请单" ,(int)TypeInt.},
{ "退料入库申请单" ,(int)TypeInt.退},
{ "其他入库通知单" ,(int)TypeInt.},
{ "材料领用申请单" ,(int)TypeInt.},
{ "补料申请单" ,(int)TypeInt.},
+7 -1
View File
@@ -37,6 +37,7 @@ namespace BLL
(string.IsNullOrEmpty(table.InOutPlanMasterId) || x.InOutPlanMasterId.Contains(table.InOutPlanMasterId)) &&
(string.IsNullOrEmpty(table.PipelineComponentId) || x.PipelineComponentId.Contains(table.PipelineComponentId)) &&
(string.IsNullOrEmpty(table.MaterialCode) || x.MaterialCode.Contains(table.MaterialCode))
orderby x.SortIndex
select new Model.Tw_InOutDetailOutput
{
Id = x.Id,
@@ -49,7 +50,7 @@ namespace BLL
MaterialName = mat.MaterialName,
MaterialDef= mat.MaterialDef,
StockNum = stock.StockNum ?? 0,
}
}
;
return q;
@@ -94,6 +95,7 @@ namespace BLL
MaterialCode = newtable.MaterialCode,
PlanNum = newtable.PlanNum,
ActNum = newtable.ActNum,
SortIndex = newtable.SortIndex
};
Funs.DB.Tw_InOutPlanDetail.InsertOnSubmit(table);
Funs.DB.SubmitChanges();
@@ -106,11 +108,14 @@ namespace BLL
/// <param name="inoutPlanMasterId"></param>
public static void AddList(IEnumerable<Model.Tw_InOutPlanDetail> list, string inoutPlanMasterId)
{
int sortIndex = 1;
foreach (var item in list)
{
item.Id= SQLHelper.GetNewID();
item.SortIndex= sortIndex;
item.InOutPlanMasterId = inoutPlanMasterId;
Add(item);
sortIndex++;
}
}
public static void Update(Model.Tw_InOutPlanDetail newtable)
@@ -125,6 +130,7 @@ namespace BLL
table.MaterialCode = newtable.MaterialCode;
table.PlanNum = newtable.PlanNum;
table.ActNum = newtable.ActNum;
table.SortIndex= newtable.SortIndex;
Funs.DB.SubmitChanges();
}
@@ -43,6 +43,7 @@ namespace BLL
from warehouseperson in warehousepersons.DefaultIfEmpty()
join unit in Funs.DB.Base_Unit on x.ReqUnitId equals unit.UnitId into units
from unit in units.DefaultIfEmpty()
orderby x.CreateDate descending
where
(string.IsNullOrEmpty(table.Id) || x.Id.Contains(table.Id)) &&
(string.IsNullOrEmpty(table.ProjectId) || x.ProjectId.Contains(table.ProjectId)) &&
@@ -157,6 +158,7 @@ namespace BLL
var result = q.Skip(grid1.PageSize * grid1.PageIndex).Take(grid1.PageSize).ToList();
// q = SortConditionHelper.SortingAndPaging(q, Grid1.SortField, Grid1.SortDirection, Grid1.PageIndex, Grid1.PageSize);
return from x in result
select new Model.Tw_InOutMasterOutput
{
Id = x.Id,
+19
View File
@@ -121,5 +121,24 @@ namespace BLL
}
public static IEnumerable GePrintListByInputMasterIds(List<string> inputMasterIds)
{
var q = from x in Funs.DB.Tw_InputDetail
join mat in Funs.DB.HJGL_MaterialCodeLib on x.MaterialCode equals mat.MaterialCode into mm
from mat in mm.DefaultIfEmpty()
join y in Funs.DB.Tw_InputMaster on x.InputMasterId equals y.Id
where inputMasterIds.Contains(x.InputMasterId)
orderby y.CusBillCode , x.MaterialCode
select new
{
= y.CusBillCode,
= x.MaterialCode,
= mat.MaterialName,
= mat.MaterialDef,
= x.PlanNum,
= x.ActNum,
};
return q;
}
}
}