コード例 #1
0
        public ActionResult SaveBomData(string strJsonBomList, string orderNo, DateTime orderDate, string strCollarHead)
        {
            var materList = strJsonBomList.ToObject <List <Mes_BomRecordEntity> >();
            var bomList   = materList.Select(c => new Mes_MaterEntity
            {
                P_GoodsCode = c.B_GoodsCode,
                P_GoodsName = c.B_GoodsName,
                P_Unit      = c.B_Unit,
                P_Qty       = c.B_Total,
                P_OrderNo   = orderNo,
                P_OrderDate = orderDate,
                P_ErpCode   = c.B_ErpCode
            }).ToList();

            productOrderManagerIBLL.SaveBomList(bomList);

            var collarHead  = strCollarHead.ToObject <Mes_CollarHeadEntity>();//领料单头
            var codeRulebll = new CodeRuleBLL();

            if (toolsIBLL.IsOrderNo("Mes_CollarHead", "C_CollarNo", codeRulebll.GetBillCode(((int)ErpEnums.OrderNoRuleEnum.PickMater).ToString())))
            {
                //若重复 先占用再赋值
                codeRulebll.UseRuleSeed(((int)ErpEnums.OrderNoRuleEnum.PickMater).ToString()); //标志已使用
                collarHead.C_CollarNo = codeRulebll.GetBillCode(((int)ErpEnums.OrderNoRuleEnum.PickMater).ToString());
            }
            else
            {
                collarHead.C_CollarNo = codeRulebll.GetBillCode(((int)ErpEnums.OrderNoRuleEnum.PickMater).ToString());
            }
            var detailList = new List <Mes_CollarDetailEntity>();

            materList.ForEach(d => detailList.Add(new Mes_CollarDetailEntity()
            {
                C_Qty        = d.B_Qty,
                C_Remark     = d.B_Remark,
                C_GoodsCode  = d.B_GoodsCode,
                C_GoodsName  = d.B_GoodsName,
                C_SupplyCode = d.G_SupplyCode,
                C_SupplyName = d.G_SupplyName,
                C_TeamCode   = collarHead.C_TeamCode,
                C_Unit       = d.B_Unit,
                C_OrderNo    = collarHead.P_OrderNo,
                C_CollarNo   = collarHead.C_CollarNo,
                C_Price      = d.G_Price,
                C_Batch      = DateTime.Now.ToString("yyyyMMdd")
            }));
            pickingMaterIbll.SaveEntity("", collarHead, detailList);
            return(Success("处理成功!"));
        }
コード例 #2
0
 public ActionResult TelphoneLiOrderForm()
 {
     if (Request["keyValue"] == null)
     {
         ViewBag.OrderCode = codeRuleBLL.GetBillCode(SystemInfo.CurrentModuleId);
     }
     return(View());
 }
コード例 #3
0
 public ActionResult Form()
 {
     if (Request["keyValue"] == null)
     {
         ViewBag.OrderCode = codeRuleBLL.GetBillCode(SystemInfo.CurrentUserId, "", ((int)CodeRuleEnum.Customer_OrderCode).ToString());
     }
     return(View());
 }
コード例 #4
0
ファイル: ChanceController.cs プロジェクト: ilbjyaya/Tengre
 public ActionResult Form()
 {
     if (Request["keyValue"] == null)
     {
         ViewBag.EnCode = codeRuleBLL.GetBillCode(SystemInfo.CurrentUserId, SystemInfo.CurrentModuleId);
     }
     return(View());
 }
コード例 #5
0
 public ActionResult Sales_ContractForm()
 {
     if (Request["keyValue"] == null)
     {
         ViewBag.ContractNum = codeRuleBLL.GetBillCode(SystemInfo.CurrentModuleId);
     }
     return(View());
 }
コード例 #6
0
 public ActionResult TelphoneOrderForm()
 {
     if (Request["keyValue"] == null)
     {
         ViewBag.OrderCode = codeRuleBLL.GetBillCode(SystemInfo.CurrentUserId, SystemInfo.CurrentModuleId);
         //ViewBag.OrderCode = codeRuleBLL.GetBillCode(SystemInfo.CurrentUserId, "", ((int)CodeRuleEnum.Telphone_OrderCode).ToString());
     }
     return(View());
 }
コード例 #7
0
 public ActionResult TelphoneOrderForm()
 {
     if (Request["keyValue"] == null)
     {
         ViewBag.OrderCode = codeRuleBLL.GetBillCode("c576c3f7-631d-4108-baaf-1495bdc0d6bb");
         //ViewBag.OrderCode = codeRuleBLL.GetBillCode(SystemInfo.CurrentUserId, "", ((int)CodeRuleEnum.Telphone_OrderCode).ToString());
     }
     return(View());
 }
コード例 #8
0
 public ActionResult Form()
 {
     if (Request["keyValue"] == null)
     {
         ViewBag.OrderCode = codeRuleBLL.GetBillCode(SystemInfo.CurrentUserId, "", ((int)CodeRuleEnum.Customer_OrderCode).ToString());
     }
     ViewBag.DepartmentName = Convert.ToString(OperatorProvider.Provider.Current().DepartmentName);
     ViewBag.CreateUserName = OperatorProvider.Provider.Current().UserName;
     ViewBag.CreateUserId   = OperatorProvider.Provider.Current().UserId;
     return(View());
 }
コード例 #9
0
        /// <summary>
        /// 订单详情页面
        /// </summary>
        /// <param name="CustomerId"></param>
        /// <param name="CustomerName"></param>
        /// <param name="CustomerCompany"></param>
        /// <returns></returns>
        public ActionResult SaleForm(string CustomerId, string CustomerName, string CustomerCompany)
        {
            if (Request["keyValue"] == null)
            {
                ViewBag.ContractNum = codeRuleBLL.GetBillCode("12cf9ca5-f1e3-49e5-8360-8cd4271b854f");
            }

            ViewBag.UserName        = Code.OperatorProvider.Provider.Current().UserName;
            ViewBag.UserId          = Code.OperatorProvider.Provider.Current().UserId;
            ViewBag.CustomerId      = CustomerId;
            ViewBag.CustomerName    = CustomerName;
            ViewBag.CustomerCompany = CustomerCompany;
            ViewBag.productList     = productBLL.GetList("{\"ParentId\":\"0\"}");
            return(View());
            //ViewBag.UserName = "******";
            //ViewBag.UserId = "5348b6c5-0f20-4fda-bee4-b5d3ed50ca5d";
            //ViewBag.CustomerId = "c2e300d4-ed46-45a6-8d34-d42d19a281b9";
            //ViewBag.CustomerName = "张三";
            //ViewBag.CustomerCompany = "张三店11";
            //ViewBag.productList = productBLL.GetList("{\"ParentId\":\"0\"}");
            //return View();
        }
コード例 #10
0
        public ActionResult SaveForm(TelphoneOrderEntity entity, string smsCode)
        {
            //1.验证手机验证码是否有效,是否过期
            var sms = smsBll.GetList("{}").Where(t => t.Tel == entity.Contact && t.Type == (int)SmsType.号码预定).OrderByDescending(t => t.CreateDate).FirstOrDefault();

            if (sms != null)
            {
                ValidateSmsCode(sms, smsCode);

                string[] tels    = entity.Telphone.Split(',');
                string[] amounts = entity.PaidDate.ToString().Split(',');
                for (int i = 0; i < tels.Length; i++)
                {
                    entity.Telphone = tels[i];
                    entity.Amount   = Convert.ToDecimal(amounts[i]);

                    if (Request["keyValue"] == null)
                    {
                        entity.OrderCode = codeRuleBLL.GetBillCode("c576c3f7-631d-4108-baaf-1495bdc0d6bb");
                        //ViewBag.OrderCode = codeRuleBLL.GetBillCode(SystemInfo.CurrentUserId, "", ((int)CodeRuleEnum.Telphone_OrderCode).ToString());
                    }

                    entity.CheckMark = 0;
                    //插入预约号码
                    orderBll.SaveForm("", entity);

                    //SendToUser(entity);//微信提醒到配置的openid
                    //SendToTemplate();
                }


                return(Content("true"));
            }
            else
            {
                return(Content("验证码有误"));
            }
        }
コード例 #11
0
 /// <summary>
 /// 添加/编辑商机
 /// </summary>
 /// <param name="_"></param>
 /// <returns></returns>
 private Negotiator SaveChance(dynamic _)
 {
     try
     {
         var  recdata       = this.GetModule <ReceiveModule <ChanceEntity> >();
         var  moduleId      = "66f6301c-1789-4525-a7d2-2b83272aafa6";
         bool resValidation = this.DataValidation(recdata.userid, recdata.token);
         if (!resValidation)
         {
             return(this.SendData(ResponseType.Fail, "后台无登录信息"));
         }
         else
         {
             recdata.data.EnCode = codeRuleBLL.GetBillCode(recdata.userid, moduleId);
             chancebll.SaveForm(recdata.data.ChanceId, recdata.data);
             return(this.SendData(ResponseType.Success));
         }
     }
     catch
     {
         return(this.SendData(ResponseType.Fail, "异常"));
     }
 }
コード例 #12
0
        public ActionResult FlowProcessNewForm()
        {
            ViewBag.Code = codeRuleBLL.GetBillCode(SystemInfo.CurrentUserId, SystemInfo.CurrentModuleId);

            return(View());
        }
コード例 #13
0
 public ActionResult FlowProcessBuider()
 {
     ViewBag.Code = codeRuleBLL.GetBillCode(SystemInfo.CurrentUserId, "", "10007");
     return(View());
 }
コード例 #14
0
ファイル: CodeRuleTest.cs プロジェクト: JerryForNet/wuye
 public void TestMethod1()
 {
     CodeRuleBLL bll  = new CodeRuleBLL();
     string      code = bll.GetBillCode("0f36148c-719f-41e0-8c8c-16ffbc40d0e0", "10002");
 }