// // POST: /SortingOrder/DownSortOrder/ public ActionResult DownSortOrder(string beginDate, string endDate, string sortLineCode, bool isSortDown, string batch) { string errorInfo = string.Empty; string lineErrorInfo = string.Empty; string custErrorInfo = string.Empty; bool bResult = false; bool lineResult = false; beginDate = Convert.ToDateTime(beginDate).ToString("yyyyMMdd"); endDate = Convert.ToDateTime(endDate).ToString("yyyyMMdd"); DownSortingInfoBll sortBll = new DownSortingInfoBll(); DownRouteBll routeBll = new DownRouteBll(); DownSortingOrderBll orderBll = new DownSortingOrderBll(); DownCustomerBll custBll = new DownCustomerBll(); DownDistStationBll stationBll = new DownDistStationBll(); DownDistCarBillBll carBll = new DownDistCarBillBll(); routeBll.DeleteTable(); bool custResult = custBll.DownCustomerInfo(); stationBll.DownDistStationInfo(); carBll.DownDistCarBillInfo(beginDate); if (isSortDown) { //从分拣下载分拣数据 lineResult = routeBll.DownSortRouteInfo(); bResult = sortBll.GetSortingOrderDate(beginDate, endDate, sortLineCode, batch, out errorInfo); } else { //从营销下载分拣数据 lineResult = routeBll.DownRouteInfo(); bResult = orderBll.GetSortingOrderDate(beginDate, endDate, out errorInfo); } string info = "线路:" + lineErrorInfo + "。客户:" + custErrorInfo + "。分拣" + errorInfo; string msg = bResult ? "下载成功" : "下载失败"; return(Json(JsonMessageHelper.getJsonMessage(bResult, msg, errorInfo), "text", JsonRequestBehavior.AllowGet)); }
//主单结单 // POST: /StockOutBill/DownOutBillMaster/ public ActionResult DownOutBillMaster(string beginDate, string endDate, string wareCode, string billType) { string errorInfo = string.Empty; beginDate = Convert.ToDateTime(beginDate).ToString("yyyyMMdd"); endDate = Convert.ToDateTime(endDate).ToString("yyyyMMdd"); bool bResult = false; DownUnitBll ubll = new DownUnitBll(); DownProductBll pbll = new DownProductBll(); DownOutBillBll ibll = new DownOutBillBll(); DownCustomerBll custBll = new DownCustomerBll(); try { if (!SystemParameterService.SetSystemParameter()) { ubll.DownUnitCodeInfo(); pbll.DownProductInfo(); custBll.DownCustomerInfo(); } else { ubll.DownUnitInfo(); //创联 pbll.DownProductInfos(); //创联 custBll.DownCustomerInfos(); //创联 } bResult = ibll.GetOutBills(beginDate, endDate, this.User.Identity.Name.ToString(), out errorInfo, wareCode, billType); } catch (Exception e) { errorInfo += e.Message; } string msg = bResult ? "下载成功" : "下载失败"; return(Json(JsonMessageHelper.getJsonMessage(bResult, msg, errorInfo), "text", JsonRequestBehavior.AllowGet)); }