入库单修改,增加入库明细序号,修改入库单打印模板。
This commit is contained in:
@@ -30,7 +30,7 @@ namespace BLL
|
||||
from mat in mm.DefaultIfEmpty()
|
||||
join master in Funs.DB.Tw_InOutPlanMaster on x.InOutPlanMasterId equals master.Id into masters
|
||||
from master in masters.DefaultIfEmpty()
|
||||
join stock in Funs.DB.Tw_MaterialStock on new { x.MaterialCode, master.WarehouseCode } equals new { MaterialCode = stock.PipeLineMatCode, stock.WarehouseCode } into st
|
||||
join stock in Funs.DB.Tw_MaterialStock on new { x.MaterialCode, master.WarehouseCode,master.ProjectId } equals new { MaterialCode = stock.PipeLineMatCode, stock.WarehouseCode, stock .ProjectId} into st
|
||||
from stock in st.DefaultIfEmpty()
|
||||
where
|
||||
(string.IsNullOrEmpty(table.Id) || x.Id.Contains(table.Id)) &&
|
||||
|
||||
@@ -35,6 +35,7 @@ namespace BLL
|
||||
(string.IsNullOrEmpty(table.InputMasterId) || x.InputMasterId.Contains(table.InputMasterId)) &&
|
||||
(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,
|
||||
@@ -45,7 +46,8 @@ namespace BLL
|
||||
ActNum = x.ActNum,
|
||||
PipelineComponentCode = y.PipelineComponentCode,
|
||||
MaterialName = mat.MaterialName,
|
||||
MaterialDef = mat.MaterialDef
|
||||
MaterialDef = mat.MaterialDef,
|
||||
SortIndex = x.SortIndex
|
||||
}
|
||||
;
|
||||
|
||||
@@ -88,6 +90,7 @@ namespace BLL
|
||||
MaterialCode = newtable.MaterialCode,
|
||||
PlanNum = newtable.PlanNum,
|
||||
ActNum = newtable.ActNum,
|
||||
SortIndex = newtable.SortIndex
|
||||
};
|
||||
Funs.DB.Tw_InputDetail.InsertOnSubmit(table);
|
||||
Funs.DB.SubmitChanges();
|
||||
@@ -105,6 +108,7 @@ namespace BLL
|
||||
table.MaterialCode = newtable.MaterialCode;
|
||||
table.PlanNum = newtable.PlanNum;
|
||||
table.ActNum = newtable.ActNum;
|
||||
table.SortIndex = newtable.SortIndex;
|
||||
Funs.DB.SubmitChanges();
|
||||
}
|
||||
|
||||
@@ -128,7 +132,7 @@ namespace BLL
|
||||
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
|
||||
orderby y.CusBillCode,x.SortIndex
|
||||
select new
|
||||
{
|
||||
入库单编号 = y.CusBillCode,
|
||||
|
||||
@@ -294,6 +294,7 @@ namespace BLL
|
||||
MaterialCode = detail.MaterialCode,
|
||||
PlanNum = detail.PlanNum,
|
||||
ActNum = detail.ActNum,
|
||||
SortIndex = detail.SortIndex,
|
||||
};
|
||||
TwInputdetailService.Add(detailTable);
|
||||
TwMaterialstockService.UpdateStockNum(master.ProjectId, detail.MaterialCode, master.WarehouseCode, TwConst.InOutType.入库, detailTable.ActNum);
|
||||
|
||||
@@ -31,7 +31,7 @@ namespace BLL
|
||||
from mat in mm.DefaultIfEmpty()
|
||||
join master in Funs.DB.Tw_OutputMaster on x.OutputMasterId equals master.Id into masters
|
||||
from master in masters.DefaultIfEmpty()
|
||||
join stock in Funs.DB.Tw_MaterialStock on new { x.MaterialCode,master.WarehouseCode} equals new { MaterialCode=stock.PipeLineMatCode,stock.WarehouseCode } into st
|
||||
join stock in Funs.DB.Tw_MaterialStock on new { x.MaterialCode, master.WarehouseCode, master.ProjectId } equals new { MaterialCode = stock.PipeLineMatCode, stock.WarehouseCode, stock.ProjectId } into st
|
||||
from stock in st.DefaultIfEmpty()
|
||||
where
|
||||
(string.IsNullOrEmpty(table.Id) || x.Id.Contains(table.Id)) &&
|
||||
|
||||
Reference in New Issue
Block a user