Ejemplo n.º 1
0
        public void generateExcelToCheck(List <FruQianHuoStruct> StockCheckList, List <FruReturnStruct> returnOrderListfru,
                                         List <RMAAIO_ReceiveOrderStruct> receiveOrderListTarget,
                                         List <ReturnOrderStructLBG> returnOrderList,
                                         string startTime, string endTime)
        {
            List <allContent> allcontentList = new List <allContent>();

            allContent sumContentAio = new allContent();

            sumContentAio.sheetName   = "FRU未还在途";
            sumContentAio.titleList   = new List <string>();
            sumContentAio.contentList = new List <object>();

            //厂商	客户别	仓库别	订单编号	客户料号	MB简称	MPN	DPK类型	收货数量	还货数量	欠货数量
            //sumContentAio.titleList.Add("厂商");
            //sumContentAio.titleList.Add("客户别");
            //sumContentAio.titleList.Add("仓库别");
            sumContentAio.titleList.Add("订单编号");
            sumContentAio.titleList.Add("客户料号");
            sumContentAio.titleList.Add("描述");
            sumContentAio.titleList.Add("MB简称");

            sumContentAio.titleList.Add("收货数量");
            sumContentAio.titleList.Add("还货数量");
            sumContentAio.titleList.Add("欠货数量");
            sumContentAio.titleList.Add("在途天数");

            foreach (FruQianHuoStruct stockcheck in StockCheckList)
            {
                ExportExcelContent ctest1 = new ExportExcelContent();
                List <string>      ct1    = new List <string>();
                //ct1.Add(stockcheck.vendor);
                //ct1.Add(stockcheck.product);
                //ct1.Add(stockcheck.storehouse);
                ct1.Add(stockcheck.orderno);
                ct1.Add(stockcheck.custom_material_no);
                ct1.Add(stockcheck.mpn);//此处mpn用做描述字段存储
                ct1.Add(stockcheck.mb_brief);

                ct1.Add(stockcheck.receiveNum);
                ct1.Add(stockcheck.returnNum);
                ct1.Add(stockcheck.diffNum);
                ct1.Add(stockcheck.tat);

                ctest1.contentArray = ct1;
                sumContentAio.contentList.Add(ctest1);
            }
            allcontentList.Add(sumContentAio);


            allContent sumContentAio2 = new allContent();

            sumContentAio2.sheetName   = "FRU TAT";
            sumContentAio2.titleList   = new List <string>();
            sumContentAio2.contentList = new List <object>();

            sumContentAio2.titleList.Add("订单编号");
            //sumContentAio2.titleList.Add("厂商");
            //sumContentAio2.titleList.Add("客户别");
            sumContentAio2.titleList.Add("客户料号");
            sumContentAio2.titleList.Add("机型");
            sumContentAio2.titleList.Add("名称");
            //sumContentAio2.titleList.Add("客户物料描述");
            sumContentAio2.titleList.Add("配件序号");
            //sumContentAio2.titleList.Add("客户序号");
            //sumContentAio2.titleList.Add("客户故障");
            //sumContentAio2.titleList.Add("生产日期");
            //sumContentAio2.titleList.Add("保内/保外");
            //sumContentAio2.titleList.Add("保外备注");
            //sumContentAio2.titleList.Add("厂商料号");
            //sumContentAio2.titleList.Add("MPN1");
            //sumContentAio2.titleList.Add("还货人");
            sumContentAio2.titleList.Add("收货日期");
            sumContentAio2.titleList.Add("还货日期");
            sumContentAio2.titleList.Add("TAT");
            sumContentAio2.titleList.Add("状态");

            foreach (FruReturnStruct stockcheck in returnOrderListfru)
            {
                ExportExcelContent ctest1 = new ExportExcelContent();
                List <string>      ct1    = new List <string>();

                ct1.Add(stockcheck.orderno);
                //ct1.Add(stockcheck.vendor);
                //ct1.Add(stockcheck.product);
                ct1.Add(stockcheck.customermaterialno);
                ct1.Add(stockcheck.machine_type);
                ct1.Add(stockcheck.name);
                //ct1.Add(stockcheck.customermaterialdes);

                ct1.Add(stockcheck.peijian_no);
                //ct1.Add(stockcheck.customer_serial_no);
                //ct1.Add(stockcheck.custom_fault);
                //ct1.Add(stockcheck.make_date);
                //ct1.Add(stockcheck.gurantee);
                //ct1.Add(stockcheck.gurantee_note);
                //ct1.Add(stockcheck.vendor_material_no);

                //ct1.Add(stockcheck.mpn1);
                //ct1.Add(stockcheck.receiver);
                ct1.Add(Utils.modifyDataFormat(stockcheck.make_date));//用来装载收货日期
                ct1.Add(Utils.modifyDataFormat(stockcheck.receive_date));
                ct1.Add(stockcheck.tat);
                ct1.Add(stockcheck._status);

                ctest1.contentArray = ct1;
                sumContentAio2.contentList.Add(ctest1);
            }
            allcontentList.Add(sumContentAio2);

            allContent sumContentAio3 = new allContent();

            sumContentAio3.sheetName   = "MB 未还在途";
            sumContentAio3.titleList   = new List <string>();
            sumContentAio3.contentList = new List <object>();

            //厂商	客户别	仓库别	订单编号	客户料号	MB简称	MPN	DPK类型	收货数量	还货数量	欠货数量
            sumContentAio3.titleList.Add("厂商");
            sumContentAio3.titleList.Add("客户别");
            sumContentAio3.titleList.Add("仓库别");
            sumContentAio3.titleList.Add("订单编号");
            sumContentAio3.titleList.Add("客户料号");
            sumContentAio3.titleList.Add("MB简称");
            sumContentAio3.titleList.Add("MPN");
            sumContentAio3.titleList.Add("DPK类型");

            sumContentAio3.titleList.Add("收货数量");
            sumContentAio3.titleList.Add("还货数量");
            sumContentAio3.titleList.Add("欠货数量");
            sumContentAio3.titleList.Add("在途天数");
            sumContentAio3.titleList.Add("超期原因");
            sumContentAio3.titleList.Add("料号");

            foreach (RMAAIO_ReceiveOrderStruct stockcheck in receiveOrderListTarget)
            {
                ExportExcelContent ctest1 = new ExportExcelContent();
                List <string>      ct1    = new List <string>();
                ct1.Add(stockcheck.vendor);
                ct1.Add(stockcheck.product);
                ct1.Add(stockcheck.storehouse);
                ct1.Add(stockcheck.orderno);
                ct1.Add(stockcheck.custom_material_no);
                ct1.Add(stockcheck.mb_brief);
                ct1.Add(stockcheck.mpn);
                ct1.Add(stockcheck.dpktype);
                ct1.Add(stockcheck.receiveNum);
                ct1.Add(stockcheck.returnNum);
                ct1.Add(stockcheck.diffNum);
                ct1.Add(stockcheck.tat);
                ct1.Add(stockcheck.reason);
                ct1.Add(stockcheck.waitMaterial);

                ctest1.contentArray = ct1;
                sumContentAio3.contentList.Add(ctest1);
            }
            allcontentList.Add(sumContentAio3);

            allContent sumContentAio4 = new allContent();

            sumContentAio4.sheetName   = "MB TAT";
            sumContentAio4.titleList   = new List <string>();
            sumContentAio4.contentList = new List <object>();

            sumContentAio4.titleList.Add("厂商");
            sumContentAio4.titleList.Add("客户别");
            sumContentAio4.titleList.Add("还货文件编号");
            sumContentAio4.titleList.Add("客户库别");
            sumContentAio4.titleList.Add("做单时间");
            sumContentAio4.titleList.Add("收货时间");
            sumContentAio4.titleList.Add("还货时间");
            sumContentAio4.titleList.Add("订单编号");
            sumContentAio4.titleList.Add("客户料号");
            sumContentAio4.titleList.Add("MB简称");
            sumContentAio4.titleList.Add("DPK状态");
            sumContentAio4.titleList.Add("跟踪条码");
            sumContentAio4.titleList.Add("客户序号");
            sumContentAio4.titleList.Add("厂商序号");
            sumContentAio4.titleList.Add("厂商料号");

            sumContentAio4.titleList.Add("TAT");
            sumContentAio4.titleList.Add("超期原因");
            sumContentAio4.titleList.Add("料号");
            sumContentAio4.titleList.Add("状态");

            foreach (ReturnOrderStructLBG stockcheck in returnOrderList)
            {
                ExportExcelContent ctest1 = new ExportExcelContent();
                List <string>      ct1    = new List <string>();

                ct1.Add(stockcheck.vendor);
                ct1.Add(stockcheck.product);
                ct1.Add(stockcheck.return_file_no);
                ct1.Add(stockcheck.storehouse);
                ct1.Add(stockcheck.order_make_date);
                ct1.Add(Utils.modifyDataFormat(stockcheck.receive_date));
                ct1.Add(Utils.modifyDataFormat(stockcheck.return_date));
                ct1.Add(stockcheck.orderno);
                ct1.Add(stockcheck.custommaterialNo);
                ct1.Add(stockcheck.mb_brief);
                ct1.Add(stockcheck.dpkpn);
                ct1.Add(stockcheck.track_serial_no);
                ct1.Add(stockcheck.custom_serial_no);
                ct1.Add(stockcheck.vendor_serail_no);
                ct1.Add(stockcheck.vendormaterialNo);
                ct1.Add(stockcheck.tat);
                ct1.Add(stockcheck.reason);
                ct1.Add(stockcheck.waitMaterial);
                ct1.Add(stockcheck._status);

                ctest1.contentArray = ct1;
                sumContentAio4.contentList.Add(ctest1);
            }
            allcontentList.Add(sumContentAio4);

            Utils.createMulitSheetsUsingNPOI("RMA_LBG信息" + "-" + startTime.Replace('/', '-') + "-" + endTime.Replace('/', '-') + ".xls", allcontentList);
        }
Ejemplo n.º 2
0
        public void generateExcelToCheck(List <RMAAIO_ReceiveOrderStruct> StockCheckList, List <ReturnOrderStructAIO> returnOrderList, string startTime, string endTime)
        {
            List <allContent> allcontentList = new List <allContent>();

            allContent sumContentAio = new allContent();

            sumContentAio.sheetName   = "MB 未还在途";
            sumContentAio.titleList   = new List <string>();
            sumContentAio.contentList = new List <object>();


            //厂商	客户别	仓库别	订单编号	客户料号	MB简称	MPN	DPK类型	收货数量	还货数量	欠货数量
            sumContentAio.titleList.Add("厂商");
            sumContentAio.titleList.Add("客户别");
            sumContentAio.titleList.Add("仓库别");
            sumContentAio.titleList.Add("订单编号");
            sumContentAio.titleList.Add("客户料号");
            sumContentAio.titleList.Add("MB简称");
            sumContentAio.titleList.Add("MPN");
            sumContentAio.titleList.Add("DPK类型");

            sumContentAio.titleList.Add("收货数量");
            sumContentAio.titleList.Add("还货数量");
            sumContentAio.titleList.Add("欠货数量");
            sumContentAio.titleList.Add("在途天数");
            sumContentAio.titleList.Add("超期原因");
            sumContentAio.titleList.Add("料号");


            foreach (RMAAIO_ReceiveOrderStruct stockcheck in StockCheckList)
            {
                ExportExcelContent ctest1 = new ExportExcelContent();
                List <string>      ct1    = new List <string>();
                ct1.Add(stockcheck.vendor);
                ct1.Add(stockcheck.product);
                ct1.Add(stockcheck.storehouse);
                ct1.Add(stockcheck.orderno);
                ct1.Add(stockcheck.custom_material_no);
                ct1.Add(stockcheck.mb_brief);
                ct1.Add(stockcheck.mpn);
                ct1.Add(stockcheck.dpktype);
                ct1.Add(stockcheck.receiveNum);
                ct1.Add(stockcheck.returnNum);
                ct1.Add(stockcheck.diffNum);
                ct1.Add(stockcheck.tat);
                ct1.Add(stockcheck.reason);
                ct1.Add(stockcheck.waitMaterial);

                ctest1.contentArray = ct1;
                sumContentAio.contentList.Add(ctest1);
            }
            allcontentList.Add(sumContentAio);


            allContent sumContentAio2 = new allContent();

            sumContentAio2.sheetName   = "MB TAT";
            sumContentAio2.titleList   = new List <string>();
            sumContentAio2.contentList = new List <object>();

            //sumContentAio2.titleList.Add("ID");
            sumContentAio2.titleList.Add("厂商");
            sumContentAio2.titleList.Add("客户别");
            sumContentAio2.titleList.Add("还货文件编号");
            sumContentAio2.titleList.Add("客户库别");
            sumContentAio2.titleList.Add("做单时间");
            sumContentAio2.titleList.Add("收货时间");
            sumContentAio2.titleList.Add("还货时间");
            sumContentAio2.titleList.Add("订单编号");
            sumContentAio2.titleList.Add("客户料号");
            sumContentAio2.titleList.Add("MB简称");
            sumContentAio2.titleList.Add("DPK状态");
            sumContentAio2.titleList.Add("跟踪条码");
            sumContentAio2.titleList.Add("客户序号");
            sumContentAio2.titleList.Add("厂商序号");
            sumContentAio2.titleList.Add("厂商料号");
            sumContentAio2.titleList.Add("状态");
            //sumContentAio2.titleList.Add("客责类别");
            //sumContentAio2.titleList.Add("客责描述");
            //sumContentAio2.titleList.Add("联想维修站编号");
            //sumContentAio2.titleList.Add("联想维修单编号");

            sumContentAio2.titleList.Add("TAT");

            foreach (ReturnOrderStructAIO stockcheck in returnOrderList)
            {
                ExportExcelContent ctest1 = new ExportExcelContent();
                List <string>      ct1    = new List <string>();

                // ct1.Add(stockcheck.Id);
                ct1.Add(stockcheck.vendor);
                ct1.Add(stockcheck.product);
                ct1.Add(stockcheck.return_file_no);
                ct1.Add(stockcheck.storehouse);
                ct1.Add(stockcheck.order_make_date);
                ct1.Add(Utils.modifyDataFormat(stockcheck.receive_date));
                ct1.Add(Utils.modifyDataFormat(stockcheck.return_date));
                ct1.Add(stockcheck.orderno);
                ct1.Add(stockcheck.custommaterialNo);
                ct1.Add(stockcheck.mb_brief);
                ct1.Add(stockcheck.dpkpn);
                ct1.Add(stockcheck.track_serial_no);
                ct1.Add(stockcheck.custom_serial_no);
                ct1.Add(stockcheck.vendor_serail_no);
                ct1.Add(stockcheck.vendormaterialNo);
                ct1.Add(stockcheck._status);
                //ct1.Add(stockcheck.custom_res_type);
                //ct1.Add(stockcheck.response_describe);
                //ct1.Add(stockcheck.lenovo_maintenance_no);
                //ct1.Add(stockcheck.lenovo_repair_no);
                ct1.Add(stockcheck.tat);

                ctest1.contentArray = ct1;
                sumContentAio2.contentList.Add(ctest1);
            }
            allcontentList.Add(sumContentAio2);

            Utils.createMulitSheetsUsingNPOI("RMA_AIO信息" + "-" + startTime.Replace('/', '-') + "-" + endTime.Replace('/', '-') + ".xls", allcontentList);
        }
Ejemplo n.º 3
0
        public void generateExcelToCheck(List <lifeCycleStruct> StockCheckList, string startTime, string endTime, List <lifeCycleSumStruct> bagWaitSumList)
        {
            List <allContent> allcontentList = new List <allContent>();

            allContent firstsheet = new allContent();

            firstsheet.sheetName   = "主板生命周期" + startTime.Replace('/', '-') + "-" + endTime.Replace('/', '-');
            firstsheet.titleList   = new List <string>();
            firstsheet.contentList = new List <object>();

            firstsheet.titleList.Add("跟踪条码");
            firstsheet.titleList.Add("站别");
            firstsheet.titleList.Add("输入人");
            firstsheet.titleList.Add("时间");

            firstsheet.titleList.Add("结果");

            firstsheet.titleList.Add("厂商");
            firstsheet.titleList.Add("客户别");
            firstsheet.titleList.Add("客户料号");
            firstsheet.titleList.Add("MB简称");
            firstsheet.titleList.Add("MPN");

            foreach (lifeCycleStruct stockcheck in StockCheckList)
            {
                ExportExcelContent ctest1 = new ExportExcelContent();
                List <string>      ct1    = new List <string>();
                ct1.Add(stockcheck.trackno);
                ct1.Add(stockcheck.station);
                ct1.Add(stockcheck.tester);
                ct1.Add(stockcheck.inputdate);

                ct1.Add(stockcheck.result);

                ct1.Add(stockcheck.product);
                ct1.Add(stockcheck.vendor);
                ct1.Add(stockcheck.custommaterialNo);
                ct1.Add(stockcheck.mb_brief);
                ct1.Add(stockcheck.mpn);

                ctest1.contentArray = ct1;
                firstsheet.contentList.Add(ctest1);
            }

            allcontentList.Add(firstsheet);

            allContent secondsheet = new allContent();

            secondsheet.sheetName   = "统计信息" + startTime.Replace('/', '-') + "-" + endTime.Replace('/', '-');
            secondsheet.titleList   = new List <string>();
            secondsheet.contentList = new List <object>();

            secondsheet.titleList.Add("站别");
            secondsheet.titleList.Add("数量");

            foreach (lifeCycleSumStruct stockcheck in bagWaitSumList)
            {
                ExportExcelContent ctest1 = new ExportExcelContent();
                List <string>      ct1    = new List <string>();
                ct1.Add(stockcheck.station);
                ct1.Add(stockcheck.returnNum + "");

                ctest1.contentArray = ct1;
                secondsheet.contentList.Add(ctest1);
            }

            allcontentList.Add(secondsheet);


            Utils.createMulitSheetsUsingNPOI("主板生命周期信息" + "-" + startTime.Replace('/', '-') + "-" + endTime.Replace('/', '-') + ".xls", allcontentList);
        }