Esempio n. 1
0
        /// <summary>
        /// 出库按报损逻辑
        /// </summary>
        public bool SubmitHandOutDoc(string wareid, string remark, string userid, string operateip, string clientid)
        {
            string guid = Guid.NewGuid().ToString();
            bool   bl   = StockDAL.SubmitDamagedDoc(guid, (int)EnumDocType.SGCK, 0, remark, wareid, userid, operateip, clientid);

            if (bl)
            {
                LogBusiness.AddActionLog(IntFactoryEnum.EnumSystemType.Client, IntFactoryEnum.EnumLogObjectType.StockOut, EnumLogType.Create, "", userid, clientid);
            }
            return(bl);
        }
Esempio n. 2
0
        public static bool CreateStorageDoc(string wareid, string remark, string userid, string operateip, string clientid)
        {
            string guid = Guid.NewGuid().ToString();
            bool   bl   = StockDAL.AddStorageDoc(guid, (int)EnumDocType.RK, 0, remark, wareid, userid, operateip, clientid);

            if (bl)
            {
                //日志
                LogBusiness.AddActionLog(IntFactoryEnum.EnumSystemType.Client, IntFactoryEnum.EnumLogObjectType.StockIn, EnumLogType.Create, "", userid, clientid);
            }
            return(bl);
        }
Esempio n. 3
0
        /// <summary>
        /// 将任务解锁
        /// </summary>
        /// <param name="taskID"></param>
        /// <param name="operateid"></param>
        /// <param name="ip"></param>
        /// <param name="clientid"></param>
        /// <param name="result"></param>
        /// <returns></returns>
        public static bool UnLockTask(string taskID, string operateid, string ip, string clientid, out int result)
        {
            bool flag = TaskDAL.BaseProvider.UnLockTask(taskID, operateid, out result);

            if (flag)
            {
                string msg = "将任务解锁";
                LogBusiness.AddLog(taskID, EnumLogObjectType.OrderTask, msg, operateid, ip, "", clientid);
                LogBusiness.AddActionLog(IntFactoryEnum.EnumSystemType.Client, IntFactoryEnum.EnumLogObjectType.OrderTask, EnumLogType.Update, "", operateid, clientid);
            }

            return(flag);
        }
Esempio n. 4
0
        /// <summary>
        /// 修改任务截至日期
        /// </summary>
        /// <param name="taskID"></param>
        /// <param name="endTime"></param>
        /// <returns></returns>
        public static bool UpdateTaskEndTime(string taskID, DateTime?endTime, string operateid, string ip, string clientid, out int result)
        {
            bool flag = TaskDAL.BaseProvider.UpdateTaskEndTime(taskID, endTime, operateid, out result);

            if (flag)
            {
                string msg = "将任务截至日期设为:" + (endTime == null ? "未指定日期" : endTime.Value.Date.ToString("yyyy-MM-dd"));
                LogBusiness.AddLog(taskID, EnumLogObjectType.OrderTask, msg, operateid, ip, "", clientid);
                LogBusiness.AddActionLog(IntFactoryEnum.EnumSystemType.Client, IntFactoryEnum.EnumLogObjectType.OrderTask, EnumLogType.Update, "", operateid, clientid);
            }

            return(flag);
        }
Esempio n. 5
0
        /// <summary>
        /// 将任务标记完成
        /// </summary>
        /// <param name="taskID"></param>
        /// <returns></returns>
        public static bool FinishTask(string taskID, string operateid, string ip, string clientid, out int result)
        {
            bool flag = TaskDAL.BaseProvider.FinishTask(taskID, operateid, out result);

            if (flag)
            {
                string msg = "将任务标记为完成";
                LogBusiness.AddLog(taskID, EnumLogObjectType.OrderTask, msg, operateid, ip, "", clientid);
                LogBusiness.AddActionLog(IntFactoryEnum.EnumSystemType.Client, IntFactoryEnum.EnumLogObjectType.OrderTask, EnumLogType.Update, "", operateid, clientid);

                //通知任务完成消息通知给它下级任务
                WeiXinMPPush.BasePush.SendTaskFinishPush(taskID);
            }

            return(flag);
        }
Esempio n. 6
0
        public string CreateCustomer(string name, int type, string sourceid, string industryid, int extent, string citycode, string address,
                                     string contactname, string mobile, string officephone, string email, string jobs, string desc, string ownerid, string operateid, string clientid)
        {
            string id = Guid.NewGuid().ToString();
            bool   bl = CustomDAL.BaseProvider.CreateCustomer(id, name, type, sourceid, industryid, extent, citycode, address, contactname, mobile, officephone, email, jobs, desc, ownerid, operateid, clientid);

            if (!bl)
            {
                id = "";
            }
            else
            {
                //日志
                LogBusiness.AddActionLog(IntFactoryEnum.EnumSystemType.Client, IntFactoryEnum.EnumLogObjectType.Customer, EnumLogType.Create, "", operateid, clientid);
            }
            return(id);
        }
Esempio n. 7
0
        public static Users CreateUser(EnumAccountType accountType, string loginname, string loginpwd, string name, string mobile, string email, string citycode, string address, string jobs,
                                       string roleid, string departid, string parentid, string clientid, string operateid, out int result)
        {
            string userid = Guid.NewGuid().ToString().ToLower();

            loginpwd = CloudSalesTool.Encrypt.GetEncryptPwd(loginpwd, loginname);

            Users user = null;

            DataTable dt = OrganizationDAL.BaseProvider.CreateUser((int)accountType, userid, loginname, loginpwd, name, mobile, email, citycode, address, jobs, roleid, departid, parentid, clientid, operateid, out result);

            if (dt.Rows.Count > 0)
            {
                user = GetUserByUserID(userid, clientid);
                //日志
                LogBusiness.AddActionLog(IntFactoryEnum.EnumSystemType.Client, IntFactoryEnum.EnumLogObjectType.User, EnumLogType.Create, "", operateid, user.ClientID);
            }
            return(user);
        }
Esempio n. 8
0
        public string AddProduct(string productCode, string productName, string generalName, string prodiverid, string unitid,
                                 string categoryid, int status, int ispublic, string attrlist, string valuelist, string attrvaluelist, decimal commonprice, decimal price, decimal weight,
                                 int isallow, decimal discountValue, string productImg, string shapeCode, string description, List <ProductDetail> details, string operateid, string clientid, ref int result)
        {
            lock (SingleLock)
            {
                var    dal = new ProductsDAL();
                string pid = dal.AddProduct(productCode, productName, generalName, prodiverid, unitid, categoryid, status, ispublic, attrlist,
                                            valuelist, attrvaluelist, commonprice, price, weight, isallow, discountValue, productImg, shapeCode, description, operateid, clientid, ref result);
                //产品添加成功添加子产品
                if (!string.IsNullOrEmpty(pid))
                {
                    //日志
                    LogBusiness.AddActionLog(IntFactoryEnum.EnumSystemType.Client, IntFactoryEnum.EnumLogObjectType.Product, EnumLogType.Create, "", operateid, clientid);

                    foreach (var model in details)
                    {
                        dal.AddProductDetails(pid, model.DetailsCode, model.ShapeCode, model.SaleAttr, model.AttrValue, model.SaleAttrValue, model.Price, model.Weight, model.ImgS, model.Description, model.Remark, operateid, clientid);
                    }
                }
                return(pid);
            }
        }