/// <summary> /// 处理入库明细业务信息 /// </summary> /// <param name="ctx">数据上下文</param> /// <param name="indepotDetailInfo">入库明细信息</param> /// <param name="stockInfo">库存信息</param> public void ProcessInDepotDetail(DepotManagementDataContext ctx, S_InDepotDetailBill indepotDetailInfo, S_Stock stockInfo) { try { CE_SubsidiaryOperationType operationType = (CE_SubsidiaryOperationType)Enum.ToObject(typeof(CE_SubsidiaryOperationType), indepotDetailInfo.OperationType); IStoreServer storeService = ServerModule.ServerModuleFactory.GetServerModule <IStoreServer>(); switch (operationType) { case CE_SubsidiaryOperationType.报检入库: case CE_SubsidiaryOperationType.委外报检入库: InsertOnSubmitInDepotDetailBill(ctx, indepotDetailInfo); InDepotToolsInfo(ctx, indepotDetailInfo); InDepotGuagesInfo(ctx, indepotDetailInfo); storeService.InStore(ctx, stockInfo, operationType); break; case CE_SubsidiaryOperationType.采购退货: InsertOnSubmitInDepotDetailBill(ctx, indepotDetailInfo); InDepotToolsInfo(ctx, indepotDetailInfo); FetchGaugeInfo(ctx, indepotDetailInfo); storeService.OutStore(ctx, stockInfo, operationType); break; case CE_SubsidiaryOperationType.普通入库: InsertOnSubmitInDepotDetailBill(ctx, indepotDetailInfo); InDepotToolsInfo(ctx, indepotDetailInfo); InDepotGuagesInfo(ctx, indepotDetailInfo); storeService.InStore(ctx, stockInfo, operationType); storeService.UpdateAging(ctx, stockInfo, false); break; case CE_SubsidiaryOperationType.营销入库: case CE_SubsidiaryOperationType.自制件入库: case CE_SubsidiaryOperationType.自制件工装入库: InsertOnSubmitInDepotDetailBill(ctx, indepotDetailInfo); InDepotToolsInfo(ctx, indepotDetailInfo); InDepotGuagesInfo(ctx, indepotDetailInfo); InDepotWorkShop(ctx, indepotDetailInfo); storeService.InStore(ctx, stockInfo, operationType); break; case CE_SubsidiaryOperationType.营销退货: case CE_SubsidiaryOperationType.自制件退货: InsertOnSubmitInDepotDetailBill(ctx, indepotDetailInfo); InDepotToolsInfo(ctx, indepotDetailInfo); FetchGaugeInfo(ctx, indepotDetailInfo); InDepotWorkShop(ctx, indepotDetailInfo); storeService.OutStore(ctx, stockInfo, operationType); break; case CE_SubsidiaryOperationType.财务对冲: case CE_SubsidiaryOperationType.财务红冲: InsertOnSubmitInDepotDetailBill(ctx, indepotDetailInfo); break; default: break; } } catch (Exception ex) { throw new Exception(ex.Message); } }