IBll.cs 4.84 KB
using HHECS.Model;
using System;
using System.Collections.Generic;
using System.Data;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace HHECS.Bll
{
    public interface IBll
    {
        IDbConnection GetConnection();
        BllResult<User> GetUserWithRoles(string userCode, string password);

        BllResult<List<MenuOperation>> FindMenuOperation(List<Role> roles);

        BllResult<List<MenuOperation>> GetAllMenuOperation();
        BllResult<MenuOperation> SaveMenuOperation(MenuOperation currentMenuOperation);
        BllResult UpdateMenuOperation(MenuOperation currentMenuOperation);
        BllResult DeleteMenuOperationByIds(List<int> ids);
        BllResult<List<Role>> GetAllRole();
        BllResult<Role> GetRoleById(int value);
        void GetMenuOperationIds(List<MenuOperation> list, List<MenuOperation> menuOperations, List<int> ids);
        BllResult<List<Location>> GetAllLocations(String containerCode, string row, string column, string layer, string roadway, string status, string code);
        BllResult<List<Config>> GetAllConfig();
        void Combine(List<MenuOperation> list, List<MenuOperation> menuOperations);
        BllResult<Role> InsertRoleAndMenuOperations(Role currentRole, List<MenuOperation> list);
        BllResult<List<T>> GetCommonModelByCondition<T>(string v);
        BllResult<Role> UpdateRoleAndMenuOperations(Role currentRole, List<MenuOperation> list);
        BllResult<List<User>> GetUserByCondition(string sql);
        BllResult SetUserDisable(List<int?> list,int enable);
        BllResult<User> SaveUserWithRoles(User currentUser, List<int> RoleIds);
        BllResult<int> GetCommonModelCount<T>(string sql);
        BllResult<User> UpdateUserWithRoles(User currentUser, List<int> RoleIds);
        /// <summary>
        /// 按照字典编码查找完整字典
        /// </summary>
        /// <param name="v"></param>
        /// <returns></returns>
        BllResult<Dict> GetDictWithDetails(string v);
        BllResult DeleteConfigByIds(List<int> list);
        BllResult DeleteRoleByIds(List<int> list);
        BllResult<int?> SaveCommonModel<T>(T model);
        BllResult UpdateCommonModel<T>(T model);
        BllResult DeleteDictByIds(List<int> list);
        BllResult<TaskEntity> CreatTask(string pallet, int station, string sourceLocation, string text3, int v2, int v3, int v4);
        BllResult DeleteCommonModelByIds<T>(List<int> list);
        BllResult DeleteEuipmentTypeByIds(List<int> list);
        BllResult DeleteEquipmentTypePropTemplateByIds(List<int> list);
        BllResult DeleteEuipmentByIds(List<int> ids);
        BllResult SyncEquipmentProp(int? id);
        /// <summary>
        /// 对通用对象实行分页
        /// </summary>
        /// <typeparam name="T">分页对象</typeparam>
        /// <param name="pageNumber">当前页</param>
        /// <param name="pageSize">每页大小</param>
        /// <param name="condition">条件</param>
        /// <param name="orderBy">排序字段,逗号隔开,默认升序,降序加esc</param>
        /// <returns></returns>
        BllResult<List<T>> GetCommonModeByPageCondition<T>(int pageNumber, int pageSize, string condition, string orderBy);
        BllResult SendTaskToWCS(int id);
        BllResult DeleteTask(int id);
        BllResult UpdateLocationStatus(string locationCode, int warehouseId, string newStatus);

        BllResult<int> ExcuteCommonSqlForInsertOrUpdate(string sql);

        BllResult HeartBeat();

        BllResult CompleteTask(string taskId);

        BllResult EmptyOutHandle(TaskEntity task);

        BllResult TaskDoubleInHandle(string flag, String location, int taskId);
        /// <summary>
        /// 根据索引获取堆垛机接出站台
        /// </summary>
        /// <param name="station"></param>
        /// <returns></returns>
        BllResult<Equipment> GetOutStationByIndex(int? station,int? port);
        /// <summary>
        /// 根据索引获取堆垛机接入站台
        /// </summary>
        /// <param name="station"></param>
        /// <returns></returns>
        BllResult<Equipment> GetInStationByIndex(int? station,int? port);
        BllResult TaskForkErrorHandle(int id);

        /// <summary>
        /// 请求WMS分配地址
        /// </summary>
        /// <typeparam name="T"></typeparam>
        /// <param name="id"></param>
        /// <param name="height"></param>
        /// <returns></returns>
        BllResult<T> GetDestinationLocation<T>(int id, string height,string weight);

        /// <summary>
        /// 执行库内取货的时候,判断是否需要移库处理,适用于双伸位的堆垛机
        /// </summary>
        /// <typeparam name="T"></typeparam>
        /// <param name="taskId"></param>
        /// <returns></returns>
        BllResult<T> ExecuteTaskRequest<T>(int taskId);

        string GetTaskDetailsForLED(TaskEntity task);

    }
}