| | |
| | | using System.Text; |
| | | using System.Threading.Tasks; |
| | | using AutoMapper; |
| | | using SqlSugar; |
| | | using WIDESEAWCS_Core; |
| | | using WIDESEAWCS_Core.BaseRepository; |
| | | using WIDESEAWCS_Core.BaseServices; |
| | | using WIDESEAWCS_ITelescopicService; |
| | | using WIDESEAWCS_Model.Models; |
| | | <<<<<<< Updated upstream |
| | | ======= |
| | | using WIDESEAWCS_DTO; |
| | | using OfficeOpenXml.FormulaParsing.Excel.Functions.DateTime; |
| | | using WIDESEAWCS_DTO.Telescopic; |
| | | >>>>>>> Stashed changes |
| | | |
| | | namespace WIDESEAWCS_TelescopicService |
| | | { |
| | |
| | | { |
| | | _user = user; |
| | | } |
| | | <<<<<<< Updated upstream |
| | | |
| | | public WebResponseContent ShowMaintence() |
| | | ======= |
| | | public WebResponseContent ShowMaintence(PaginationDTO pagination) |
| | | >>>>>>> Stashed changes |
| | | { |
| | | try |
| | | { |
| | | var sys = _user.QueryData(); |
| | | var main = BaseDal.QueryData(); |
| | | int totalCount = 0; |
| | | var sys = _user.Db.Queryable<Sys_User>(); |
| | | var main = Db.Queryable<Dt_Maintenance>(); |
| | | |
| | | <<<<<<< Updated upstream |
| | | var result = sys.Join(main, |
| | | u => u.UserName, |
| | | m => m.UserAccount, |
| | | (u, m) => new |
| | | { |
| | | u.UserTrueName, |
| | | u.UserName, |
| | | u.CardNumber, |
| | | u.RoleName, |
| | | u.HeadImageUrl, |
| | | m.IsPossible, |
| | | }); |
| | | return new WebResponseContent { Status = true, Data = result }; |
| | | ======= |
| | | var query = sys.InnerJoin<Dt_Maintenance>((a, b) => a.UserName == b.UserAccount); |
| | | if (!string.IsNullOrEmpty(pagination.searchKeyword)) |
| | | { |
| | |
| | | Items = result |
| | | } |
| | | }; |
| | | >>>>>>> Stashed changes |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | | |
| | | return new WebResponseContent { Status = false, Data = ex }; |
| | | return new WebResponseContent { Status = false, Data = ex.Message }; |
| | | } |
| | | } |
| | | |
| | | <<<<<<< Updated upstream |
| | | public WebResponseContent PersonnelMonitoring(bool ispossible) |
| | | ======= |
| | | |
| | | |
| | | |
| | |
| | | /// <param name="searchKeyword"></param> |
| | | /// <returns></returns> |
| | | public WebResponseContent PersonnelMonitoring(PaginationDTO pagination) |
| | | >>>>>>> Stashed changes |
| | | { |
| | | try |
| | | { |
| | | var sys = _user.QueryData(); |
| | | var main = BaseDal.QueryData(); |
| | | int totalCount = 0; |
| | | var sys = _user.Db.Queryable<Sys_User>(); |
| | | var main = Db.Queryable<Dt_Maintenance>(); |
| | | |
| | | <<<<<<< Updated upstream |
| | | var result = sys.Join(main, |
| | | u => u.UserName, |
| | | m => m.UserAccount, |
| | | (u, m) => new |
| | | { |
| | | u.UserTrueName, |
| | | u.RoleName, |
| | | u.HeadImageUrl, |
| | | m.MaintenanceStatus, |
| | | m.MaintenanceDate, |
| | | m.IsPossible, |
| | | }).Where(x=>x.IsPossible== ispossible); |
| | | return new WebResponseContent { Status = true, Data = result }; |
| | | ======= |
| | | var query = sys.InnerJoin<Dt_Maintenance>((a, b) => a.UserName == b.UserAccount) |
| | | .Where((a, b) => b.IsPossible == "true"); // å
çé IsPossible 为 true çæ°æ® |
| | | |
| | |
| | | Items = result |
| | | } |
| | | }; |
| | | >>>>>>> Stashed changes |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | | |
| | | return new WebResponseContent { Status = false, Data = ex }; |
| | | return new WebResponseContent { Status = false, Data = ex.Message }; |
| | | } |
| | | } |
| | | |
| | | public WebResponseContent RunOperation(int id) |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | public WebResponseContent RunOperation(int id, string ispossible) |
| | | { |
| | | try |
| | | { |
| | | var mon = BaseDal.QueryFirst(x => x.ID == id); |
| | | mon.IsPossible = true; |
| | | BaseDal.UpdateData(mon); |
| | | if (ispossible == "true") |
| | | { |
| | | mon.IsPossible = "true"; |
| | | mon.MaintenanceDate = DateTime.Now; |
| | | BaseDal.UpdateData(mon); |
| | | } |
| | | else |
| | | { |
| | | mon.IsPossible = "false"; |
| | | BaseDal.UpdateData(mon); |
| | | } |
| | | return new WebResponseContent { Status = true, Data = mon }; |
| | | } |
| | | catch (Exception ex) |
| | |
| | | } |
| | | |
| | | /// <summary> |
| | | <<<<<<< Updated upstream |
| | | ======= |
| | | /// æ£ä¿®æä½è®°å½ |
| | | /// </summary> |
| | | /// <param name="pageIndex">页æ°</param> |
| | |
| | | |
| | | |
| | | /// <summary> |
| | | >>>>>>> Stashed changes |
| | | /// ç¶ææä¸¾ |
| | | /// </summary> |
| | | private enum Maint |