예제 #1
0
 // 保存托盘表体信息
 public async Task <ActionResult> SaveTrayBody(string trayNo, string barcode, string qty, string iNum, bool bInTray, DataRow dr, string BarcodeDatabaseName, string BarcodeDatabaseConnString)
 {
     return(await Task.Run(() =>
     {
         return Content(JsonAppHelper.ToJson(api.SaveTrayBody(trayNo, barcode, qty, iNum, bInTray, dr, BarcodeDatabaseName, BarcodeDatabaseConnString)));
     }));
 }
예제 #2
0
        public override ActionResult GetTreeGridJson(string keyword, string searchFiled, string list, string orderBy = " ORDER BY F_SortCode ")
        {
            string[] classnameList = typeof(Mst_PositionInfo).ToString().Split('.');
            string   condition     = "";

            if (string.IsNullOrEmpty(list))
            {
                condition = GetKeywordCondition(keyword, searchFiled);
            }
            else
            {
                condition = GetAdvCondition(JsonConvert.DeserializeObject <List <AdvSearchEntity> >(list));
            }
            TreeInfoEntity entity = new TreeInfoEntity();

            entity.F_Condition   = string.IsNullOrEmpty(condition) ? string.Empty : " AND " + condition;
            entity.F_CType       = 1;
            entity.F_KeyFiled    = "F_Id";
            entity.F_ParentFiled = "F_ParentId";
            entity.F_SortCode    = orderBy;
            entity.F_TableName   = classnameList[classnameList.Length - 1].Replace("Info", string.Empty);
            var dt = BLLFactory <AppCommon> .Instance.GetTreeInfo(entity);  //baseBLL.Find(condition, orderBy);

            string dataStr = JsonAppHelper.ToJson(dt);
            var    data    = JsonAppHelper.ToList <Mst_PositionInfo>(dataStr);

            foreach (var item in data)
            {
                string name = BLLFactory <Mst_Warehouse> .Instance.FindByID(item.F_WarehouseId).F_FullName;

                item.F_WarehouseName = string.IsNullOrEmpty(name) ? "" : name;
            }
            return(Content(GetTreeGridJsonStr(data)));
        }
예제 #3
0
 //条码解析
 public async Task <ActionResult> BarcodeAnalyze(string OPERORDER, string BARCODE, string DBNAME)
 {
     return(await Task.Run(() =>
     {
         return Content(JsonAppHelper.ToJson(api.BarcodeAnalyze(OPERORDER, BARCODE, DBNAME)));
     }));
 }
예제 #4
0
        public virtual ActionResult GetGridJson(string keyword, string searchFiled, string sortFiled = " F_SortCode ")
        {
            SearchCondition condition = new SearchCondition();
            var             data      = baseBLL.Find(GetKeywordCondition(keyword, searchFiled), " ORDER BY " + sortFiled);

            return(Content(JsonAppHelper.ToJson(data)));
        }
예제 #5
0
 //读取单表信息
 public async Task <ActionResult> GetSingleTableInfo(string tableName, string valueMember, string displayMember, string filedName, string where, string dbName, bool bDistinct, string sortFiled)
 {
     return(await Task.Run(() =>
     {
         return Content(JsonAppHelper.ToJson(api.GetSingleTableInfo(tableName, valueMember, displayMember, filedName, where, dbName, bDistinct, sortFiled)));
     }));
 }
예제 #6
0
 //获取登录用户权限
 public async Task <ActionResult> GetLoginUserModule(string userid, string ADMINNAME, string userpwd, string ADMINPWD)
 {
     return(await Task.Run(() =>
     {
         return Content(JsonAppHelper.ToJson(api.GetLoginUserModule(userid, ADMINNAME, userpwd, ADMINPWD)));
     }));
 }
예제 #7
0
 //判断是否存在更新
 public async Task <ActionResult> GetUIUpdate(string myVersion)
 {
     return(await Task.Run(() =>
     {
         return Content(JsonAppHelper.ToJson(api.GetUIUpdate(myVersion)));
     }));
 }
예제 #8
0
 //获取系统时间
 public async Task <ActionResult> GetServerTime()
 {
     return(await Task.Run(() =>
     {
         return Content(JsonAppHelper.ToJson(api.GetServerTime()));
     }));
 }
예제 #9
0
 //获取临时扫描记录
 public async Task <ActionResult> ScanFinish(string operOrder, string baseName)
 {
     return(await Task.Run(() =>
     {
         return Content(JsonAppHelper.ToJson(api.ScanFinish(operOrder, baseName)));
     }));
 }
예제 #10
0
 //获取临时扫描记录
 public async Task <ActionResult> bFIFO(string BARCODE, string operOrder, string baseName, string CWHCODE)
 {
     return(await Task.Run(() =>
     {
         return Content(JsonAppHelper.ToJson(api.bFIFO(BARCODE, operOrder, baseName, CWHCODE)));
     }));
 }
예제 #11
0
 //获取grid行信息
 public async Task <ActionResult> GetGridRow(string formName, string gridName, string orderType, string cVouchID)
 {
     return(await Task.Run(() =>
     {
         return Content(JsonAppHelper.ToJson(api.GetGridRow(formName, gridName, orderType, cVouchID)));
     }));
 }
예제 #12
0
        /// <summary>
        /// 禁用启用仓库,货位配置
        /// </summary>
        /// <param name="Id">仓库ID</param>
        /// <param name="Type">更改类型</param>
        /// <returns></returns>
        public ActionResult UpEnMark(string Id, int Type)
        {
            //获取当前仓库状态
            Mst_WarehouseInfo warehouseInfo = BLLFactory <Mst_Warehouse> .Instance.FindByID(Id);

            ResultModel result = new ResultModel();

            if (Type == 0)//如果是对仓库进行操作
            {
                result.bSuccess = BLLFactory <Mst_Warehouse> .Instance.UpEnMask(Id);
            }
            if (Type == 1)//对货位配置进行操作
            {
                if (warehouseInfo.F_PositionManagement == true)
                {
                    warehouseInfo.F_PositionManagement = false;
                }
                else
                {
                    warehouseInfo.F_PositionManagement = true;
                }
                result.bSuccess = BLLFactory <Mst_Warehouse> .Instance.Update(warehouseInfo, Id);
            }

            result.message = result.bSuccess ? "操作成功" : "操作失败,请刷新后重试";
            return(Content(JsonAppHelper.ToJson(result)));
        }
예제 #13
0
        /// <summary>
        /// 批量添加
        /// </summary>
        /// <param name="F_BenginNum"></param>
        /// <param name="F_EndNum"></param>
        /// <param name="F_Prefix"></param>
        /// <param name="Info"></param>
        /// <returns></returns>
        public ActionResult SubmitForm1(int F_BenginNum, int F_EndNum, string F_Prefix, Mst_PositionInfo Info)
        {
            ResultModel result = new ResultModel();
            //拼接编号
            List <Mst_PositionInfo> list     = new List <Mst_PositionInfo>();
            List <Mst_PositionInfo> infoList = BLLFactory <Mst_Position> .Instance.GetAll();

            //循环添加
            for (int i = F_BenginNum; i <= F_EndNum; i++)
            {
                Mst_PositionInfo info = new Mst_PositionInfo();

                info.F_WarehouseId = Info.F_WarehouseId;
                info.F_Property    = Info.F_Property;
                info.F_Type        = Info.F_Type;
                info.F_EnabledMark = Info.F_EnabledMark;
                info.F_ParentId    = Info.F_ParentId;
                info.F_Description = Info.F_Description;
                info.F_EnCode      = F_Prefix + i.ToString().PadLeft(F_EndNum.ToString().Length, '0');
                info.F_FullName    = Info.F_FullName;
                list.Add(info);
                if (infoList.FindAll(u => u.F_EnCode == info.F_EnCode).Count > 0)
                {
                    result.bSuccess = false;
                    result.message  = info.F_EnCode + "已存在,请输入合适序号";
                    return(Content(JsonAppHelper.ToJson(result)));
                }
            }

            result.bSuccess = BLLFactory <Mst_Position> .Instance.InsertRange(list);

            result.message = result.bSuccess == true ? "添加成功" : "添加失败,请刷新后重试";
            return(Content(JsonAppHelper.ToJson(result)));
        }
예제 #14
0
 //获取业务模块
 public async Task <ActionResult> GetVouchModel(string condition)
 {
     return(await Task.Run(() =>
     {
         return Content(JsonAppHelper.ToJson(api.GetVouchModel(condition)));
     }));
 }
예제 #15
0
 //获取临时扫描记录
 public async Task <ActionResult> GetScanInfo(string operOrder)
 {
     return(await Task.Run(() =>
     {
         return Content(JsonAppHelper.ToJson(api.GetScanInfo(operOrder)));
     }));
 }
예제 #16
0
 //获取扫描列表信息
 public async Task <ActionResult> SaveTempScanHead(DataRow dr, string userid)
 {
     return(await Task.Run(() =>
     {
         return Content(JsonAppHelper.ToJson(api.SaveTempScanHead(dr, userid)));
     }));
 }
예제 #17
0
 //获取扫描列表信息
 public async Task <ActionResult> SaveTempScanBody(DataRow dr, bool bDel, string OPERORDER, string CVOUCHID, string CWHCODE, string userid, string baseName)
 {
     return(await Task.Run(() =>
     {
         return Content(JsonAppHelper.ToJson(api.SaveTempScanBody(dr, bDel, OPERORDER, CVOUCHID, CWHCODE, userid, baseName)));
     }));
 }
예제 #18
0
 //条码解析
 public async Task <ActionResult> GetFeedingTips(string orderNo)
 {
     return(await Task.Run(() =>
     {
         return Content(JsonAppHelper.ToJson(api.GetFeedingTips(orderNo)));
     }));
 }
예제 #19
0
 //获取扫描列表信息
 public async Task <ActionResult> GetTempScanHead(string condition)
 {
     return(await Task.Run(() =>
     {
         return Content(JsonAppHelper.ToJson(api.GetTempScanHead(condition)));
     }));
 }
예제 #20
0
        /// <summary>
        /// 提交表单
        /// </summary>
        /// <param name="info">对象</param>
        /// <param name="keyValue">主键</param>
        /// <returns></returns>
        public ActionResult SubmitForm1(Mst_CargoPositionInfo Info, int F_BenginNum, int F_EndNum, string F_Prefix)
        {
            //拼接编号
            List <Mst_CargoPositionInfo> list = new List <Mst_CargoPositionInfo>();

            //循环添加
            for (int i = F_BenginNum; i <= F_EndNum; i++)
            {
                Mst_CargoPositionInfo info = new Mst_CargoPositionInfo();
                info.F_FullName    = Info.F_FullName;
                info.F_WarehouseId = Info.F_WarehouseId;
                info.F_Unit        = Info.F_Unit;
                info.F_Description = Info.F_Description;
                string Num = i + "";
                while (Num.Length < 4)
                {
                    Num = "0" + Num;
                }
                info.F_EnCode = F_Prefix + Num;
                //info.F_FullName += Num;
                list.Add(info);
            }
            try
            {
                BLLFactory <Mst_CargoPosition> .Instance.InsertRange(list);

                return(Success(JsonAppHelper.ToJson(list)));
            }
            catch (Exception ex)
            {
                return(Error("货位编码已存在,请重新输入"));
            }
        }
예제 #21
0
        public ActionResult Copys(string F_Id, string F_FullName, string F_EnCode, string F_Page, string F_GridId)
        {
            //组织主表数据
            Sys_GridColumnSettingInfo info = new Sys_GridColumnSettingInfo();

            info.F_CreatorTime   = DateTime.Now;
            info.F_CreatorUserId = CurrentUser.F_Account;
            info.F_Id            = Guid.NewGuid().ToString();
            info.F_FullName      = F_FullName;
            info.F_EnCode        = F_EnCode;
            info.F_Page          = F_Page;
            info.F_GridId        = F_GridId;
            info.F_ParentId      = "0";
            //组织详细表信息
            List <Sys_GridColumnSettingInfo> list = new List <Sys_GridColumnSettingInfo>();
            SearchCondition condition             = new SearchCondition();

            condition.AddCondition("F_ParentId", F_Id, SqlOperator.Equal);
            var data = BLLFactory <Sys_GridColumnSetting> .Instance.Find(condition.BuildConditionSql().Replace("Where (1=1)  AND ", string.Empty));

            foreach (Sys_GridColumnSettingInfo model in data)
            {
                model.F_Id            = Guid.NewGuid().ToString();
                model.F_CreatorTime   = DateTime.Now;
                model.F_CreatorUserId = info.F_CreatorUserId;
                model.F_ParentId      = info.F_Id;
                model.F_Page          = info.F_Page;
                model.F_GridId        = info.F_GridId;
                list.Add(model);
            }
            BLLFactory <Sys_GridColumnSetting> .Instance.Copys(info, list);

            return(Content(JsonAppHelper.ToJson(true)));
        }
예제 #22
0
 // 根据托盘号 获取托盘表头信息
 public async Task <ActionResult> GetTrayInfo(string trayNo, bool bGetHead, bool bGetBody, string U8DatabaseName)
 {
     return(await Task.Run(() =>
     {
         return Content(JsonAppHelper.ToJson(api.GetTrayInfo(trayNo, bGetHead, bGetBody, U8DatabaseName)));
     }));
 }
예제 #23
0
        public ActionResult GetListGridJson(string keyValue, string sidx = " F_EnCode ", string sord = "desc")
        {
            //此处需要新建一张表体视图,暂时使用表代替
            SearchCondition condition = new SearchCondition();

            condition.AddCondition("F_HeadId", keyValue, SqlOperator.Equal);
            return(Content(JsonAppHelper.ToJson(BLLFactory <InStock_Body> .Instance.Find(GetConditionStr(condition)))));
        }
예제 #24
0
 //获取登录用户权限
 public async Task <ActionResult> Login(string userID, string userPwd, string DatabaseConnString)
 {
     return(await Task.Run(() =>
     {
         string errorInfo = string.Empty;
         return Content(JsonAppHelper.ToJson(api.Login(userID, userPwd, out errorInfo, DatabaseConnString)));
     }));
 }
예제 #25
0
        public ActionResult GetEnCodeList()
        {
            SearchCondition search = new SearchCondition();

            search.AddCondition("F_Status", 1, SqlOperator.Equal);
            List <PI_HeadInfo> list = BLLFactory <PI_Head> .Instance.Find(GetConditionStr(search));

            return(Content(JsonAppHelper.ToJson(list)));
        }
        /// <summary>
        /// 获取表体
        /// </summary>
        /// <param name="keyValue"></param>
        /// <returns></returns>
        public ActionResult GetFormJson1(string keyValue)
        {
            SearchCondition condition = new SearchCondition();

            condition.AddCondition("F_HId", keyValue, SqlOperator.Equal);
            List <SO_BodyInfo> list = BLLFactory <SO_Body> .Instance.Find(condition.BuildConditionSql().Replace("Where (1=1)  AND ", string.Empty));

            return(Content(JsonAppHelper.ToJson(list)));
        }
예제 #27
0
        /// <summary>
        /// 查询子表
        /// </summary>
        /// <param name="keyValue"></param>
        /// <returns></returns>
        public ActionResult GetListGridJson(string keyValue)
        {
            SearchCondition search = new SearchCondition();

            search.AddCondition("F_HeadId", keyValue, SqlOperator.Equal);
            List <V_PACKLISTBODYSELInfo> packs = BLLFactory <V_PACKLISTBODYSEL> .Instance.Find(GetConditionStr(search));

            return(Content(JsonAppHelper.ToJson(packs)));
        }
예제 #28
0
        /// <summary>
        /// 查询表体
        /// </summary>
        /// <param name="keyValue"></param>
        /// <returns></returns>
        public ActionResult GetFormJson1(string keyValue)
        {
            SearchCondition search = new SearchCondition();

            search.AddCondition("F_Hid", keyValue, SqlOperator.Equal);
            List <SO_ReturnedStockBodyInfo> list = BLLFactory <SO_ReturnedStockBody> .Instance.Find(GetConditionStr(search));

            return(Content(JsonAppHelper.ToJson(list)));
        }
예제 #29
0
        /// <summary>
        /// 根据出库单据Id查询单据表体信息
        /// </summary>
        /// <param name="KeyValue"></param>
        /// <returns></returns>
        public ActionResult GetOutGoods(string KeyValue)
        {
            SearchCondition search = new SearchCondition();

            search.AddCondition("F_HeadId", KeyValue, SqlOperator.Equal);
            List <V_PACKLISTSELInfo> list = BLLFactory <V_PACKLISTSEL> .Instance.Find(GetConditionStr(search));

            return(Content(JsonAppHelper.ToJson(list)));
        }
예제 #30
0
        /// <summary>
        /// 根据主键ID查询子表关联数据
        /// </summary>
        /// <param name="keyValue"></param>
        /// <returns></returns>
        public ActionResult GetFormJson1(string keyValue)
        {
            // 通过主表ID 获取下方所有子表ID
            SearchCondition condition = new SearchCondition();

            condition.AddCondition("F_ParentId", keyValue, SqlOperator.Equal, true, "g");
            var detailList = BLLFactory <SYS_BarcodeSettingDetail> .Instance.Find(condition.BuildConditionSql().Replace("Where (1=1)  AND ", string.Empty));

            return(Content(JsonAppHelper.ToJson(detailList)));
        }