private Dept TransferTo(NewDeptRequest req) { if (null == req) { throw new Exception("参数不能为空"); } return(new Dept { DeptId = req.DeptId, Remark = req.Remark, DeptName = req.DeptName }); }
/// <summary> /// 创建科室 /// </summary> /// <param name="req"></param> /// <returns></returns> public ResultApi <string> PostDept(NewDeptRequest req) { var biz = new DeptBiz(TransferTo(req)); return(biz.SaveInfo());; }