//主单结单 // 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"); DownUnitBll ubll = new DownUnitBll(); DownProductBll pbll = new DownProductBll(); DownOutBillBll ibll = new DownOutBillBll(); ubll.DownUnitCodeInfo(); pbll.DownProductInfo(); bool bResult = ibll.GetOutBill(beginDate, endDate, this.User.Identity.Name.ToString(), out errorInfo, wareCode, billType); //bool bResult = OutBillMasterService.DownOutBillMaster(beginDate, endDate, out errorInfo); string msg = bResult ? "下载成功" : "下载失败"; return Json(JsonMessageHelper.getJsonMessage(bResult, msg, errorInfo), "text", JsonRequestBehavior.AllowGet); }
// // POST: /StockInBill/DownInBillMaster/ public ActionResult DownInBillMaster(string beginDate, string endDate, string wareCode, string billType, bool isInDown) { bool bResult = false; DownUnitBll ubll = new DownUnitBll(); DownProductBll pbll = new DownProductBll(); DownInBillBll ibll = new DownInBillBll(); DownDecidePlanBll planBll = new DownDecidePlanBll(); string errorInfo = string.Empty; try { beginDate = Convert.ToDateTime(beginDate).ToString("yyyyMMdd"); endDate = Convert.ToDateTime(endDate).ToString("yyyyMMdd"); if (!SystemParameterService.SetSystemParameter()) { ubll.DownUnitCodeInfo(); pbll.DownProductInfo(); if (isInDown) bResult = ibll.GetInBill(beginDate, endDate, this.User.Identity.Name.ToString(), wareCode, billType, out errorInfo); else bResult = planBll.GetInBillMiddle(beginDate, endDate, this.User.Identity.Name.ToString(), wareCode, billType, out errorInfo); } else { ubll.DownUnitInfo(); pbll.DownProductInfos(); if (isInDown) bResult = ibll.GetInBills(beginDate, endDate, this.User.Identity.Name.ToString(), wareCode, billType, out errorInfo); else bResult = planBll.GetInBillMiddle(beginDate, endDate, this.User.Identity.Name.ToString(), wareCode, billType, out errorInfo); } } catch (Exception e) { errorInfo += e.Message; } 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); }
// // POST: /StockInBill/DownInBillMaster/ public ActionResult DownInBillMaster(string beginDate, string endDate, string wareCode, string billType) { DownUnitBll ubll = new DownUnitBll(); DownProductBll pbll = new DownProductBll(); DownInBillBll ibll = new DownInBillBll(); DownDecidePlanBll planBll = new DownDecidePlanBll(); string errorInfo = string.Empty; if (beginDate == string.Empty || endDate == string.Empty) { beginDate = DateTime.Now.ToString("yyyyMMdd"); endDate = DateTime.Now.AddDays(1).Date.ToString("yyyyMMdd"); } else { beginDate = Convert.ToDateTime(beginDate).ToString("yyyyMMdd"); endDate = Convert.ToDateTime(endDate).AddDays(1).Date.ToString("yyyyMMdd"); } ubll.DownUnitCodeInfo(); pbll.DownProductInfo(); bool bResult = planBll.GetInBillMiddle(beginDate, endDate, this.User.Identity.Name.ToString(), wareCode, billType, out errorInfo); //bool bResult = ibll.GetInBill(beginDate, endDate, this.User.Identity.Name.ToString(), wareCode, billType, out errorInfo); //bool bResult = InBillMasterService.DownInBillMaster(beginDate, endDate, out errorInfo); string msg = bResult ? "下载成功" : "下载失败"; return Json(JsonMessageHelper.getJsonMessage(bResult, msg, errorInfo), "text", JsonRequestBehavior.AllowGet); }
// // 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(); DownUnitBll ubll = new DownUnitBll(); DownProductBll pbll = new DownProductBll(); try { ubll.DownUnitCodeInfo(); pbll.DownProductInfo(); routeBll.DeleteTable(); stationBll.DownDistStationInfo(); if (!SystemParameterService.SetSystemParameter()) { bool custResult = custBll.DownCustomerInfo(); 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); } } else { bool custResult = custBll.DownCustomerInfos();//创联 //carBll.DownDistCarBillInfo(beginDate); if (isSortDown) { //从分拣下载分拣数据 lineResult = routeBll.DownSortRouteInfo(); bResult = sortBll.GetSortingOrderDate(beginDate, endDate, sortLineCode, batch, out errorInfo); } else { //从营销下载分拣数据 创联 lineResult = routeBll.DownRouteInfos(); bResult = orderBll.GetSortingOrderDates(beginDate, endDate, out errorInfo); } } } catch (Exception e) { errorInfo += e.Message; } string info = "线路:" + lineErrorInfo + "。客户:" + custErrorInfo + "。分拣" + errorInfo; string msg = bResult ? "下载成功" : "下载失败"; return Json(JsonMessageHelper.getJsonMessage(bResult, msg, errorInfo), "text", JsonRequestBehavior.AllowGet); }