// 复制机器 public ResultObj <int> CopyOneMachine(string oldMachineId, string newMachineId, string newDeviceId, [FromBody] List <string> copyItem) { ICommon icommon = new CommonService(); int result = icommon.CheckMachineId(newMachineId, newDeviceId); if (result > 0) { return(Content(0, ResultCode.Fail, "该机器编号已存在")); } IMachineOperation imachine = new MachineOperationService(); return(Content(imachine.CopyOneMachine(oldMachineId, newMachineId, newDeviceId, copyItem, ""))); }
public ResultObj <List <CommonDic> > GetMachines(string name = "", int pageIndex = 1, int pageSize = 10) { IMachineOperation imachine = new MachineOperationService(); CommonDic dic = new CommonDic(); dic.Name = name; int totalcount = imachine.GetMachinesCount(dic, pageIndex, pageSize); var pagination = new Pagination { PageSize = pageSize, PageIndex = pageIndex, StartIndex = 0, TotalRows = totalcount, TotalPage = 0 }; return(Content(imachine.GetMachines(dic, pageIndex, pageSize), pagination)); }