소스 검색

地接费用录入添加参数校验

yuanrf 1 년 전
부모
커밋
6b4e1ba71b
1개의 변경된 파일6개의 추가작업 그리고 0개의 파일을 삭제
  1. 6 0
      OASystem/OASystem.Api/Controllers/GroupsController.cs

+ 6 - 0
OASystem/OASystem.Api/Controllers/GroupsController.cs

@@ -5832,6 +5832,12 @@ namespace OASystem.API.Controllers
         {
             try
             {
+                #region 参数校验
+                if (dto.Currency <= 0) return Ok(JsonView(false, "币种错误!"));
+                var di = _sqlSugar.Queryable<Grp_DelegationInfo>().First(x => x.Id == dto.DiId && x.IsDel == 0);
+                if (di == null) return Ok(JsonView(false, "团组错误!"));
+                #endregion
+
                 Result groupData = await _carTouristGuideGroundRep.OpCarTouristGuideGroundContent(dto);
                 if (groupData.Code != 0)
                 {