Ejemplo n.º 1
0
        public List <GenericDistressProperty> getDistressList(string salesOrg)
        {
            List <ZV04IProperty> zvIList = dataCollectorSap.getZV04IList(salesOrg, IDAEnum.Task.distress);

            if (zvIList is null)
            {
                return(null);
            }
            else
            {
                zvIList = zvIList.Where(x => (x.orderQty > x.confirmedQty || x.confirmedQty == 0) && x.rejReason != "ZR").ToList();
            }

            List <ZV04HNProperty>            zvHNList = dataCollectorSap.getZV04HNList(salesOrg, IDAEnum.Task.distress) ?? new List <ZV04HNProperty>();
            List <ZV04PProperty>             zvPList  = dataCollectorSap.getZV04PList(salesOrg, IDAEnum.Task.distress) ?? new List <ZV04PProperty>();
            List <CriticalItemsDataProperty> ciList   = dataCollectorServer.getCriticalItemsDataList(salesOrg) ?? new List <CriticalItemsDataProperty>();
            List <CustomerDataProperty>      cdList   = dataCollectorServer.getCustomerDataList(salesOrg) ?? new List <CustomerDataProperty>();
            List <RejectionsProperty>        rdList   = dataCollectorServer.getRejectionsLogList(salesOrg) ?? new List <RejectionsProperty>();
            List <SwitchesProperty>          sdList   = dataCollectorServer.getSwitchesLogList(salesOrg) ?? new List <SwitchesProperty>();
            List <MM03Property>    mmList             = dataCollectorServer.getMM03List(salesOrg) ?? new List <MM03Property>();
            List <SkuDataProperty> skuList            = dataCollectorServer.getSkuDataList(salesOrg) ?? new List <SkuDataProperty>();


            //Left outer join in linq done through "into group" giving a default value for objects that are null joined
            List <GenericDistressProperty> list = getGenericDistressList(salesOrg: salesOrg, zv04iObj: zvIList,
                                                                         zv04hnObj: zvHNList, zv04pObj: zvPList,
                                                                         criticalItemObj: ciList, customerDataObj: cdList,
                                                                         rejectionDataObj: rdList, switchesDataObj: sdList,
                                                                         materialMasterObj: mmList, skuObj: skuList);

            List <GenericDistressProperty> finalListWithStock = getFinalListWithStockDetails(list: list, salesOrg: salesOrg);

            finalListWithStock.OrderBy(x => x.order).ThenBy(x => x.item);

            return(list);
        }
Ejemplo n.º 2
0
 public List <RejectionsProperty> getReleaseRejectionsListFromLog(string salesOrg)
 {
     return(dataCollectorServer.getRejectionsLogList(salesOrg).Distinct((x, y) => x.orderNumber == y.orderNumber && x.sku == y.sku).ToList());
 }