update AuditFlowController

This commit is contained in:
2025-08-19 09:17:22 +02:00
parent cc6e49683b
commit 44a0fb93b9
2 changed files with 9 additions and 14 deletions

View File

@@ -13,22 +13,22 @@ Imports VERAG_PROG_ALLGEMEIN.TESTJSON
Namespace ApiController.Controllers
Public Class SDLController
Public Class AuditFlowController
Inherits System.Web.Http.ApiController
''' <summary>
''' Upload Files in Base64-Format and attach it to an existring LKW (with avisoId) or an specific consignment (with sendungsId)
''' Upload Attachment in Base64-Format and attach it to an existring LKW (with avisoId) or an specific consignment (with sendungsId)
''' </summary>
'''
''' <returns>OK, if file is uploaded or ERROR-Code if something went wrong</returns>
''' <response code="200">Returns 200 file is uploaded sucessfully</response>
''' <response code="400">Returns 400 upload failed</response>
''' <response code="200">Returns 200 if sucessfully</response>
''' <response code="400">Returns 400 update/upload failed</response>
<ApiVersion("1")>
<System.Web.Http.Route("api/v{version:apiVersion}/AuditFlow")>
<System.Web.Http.Route("api/v{version:apiVersion}/setCheckDone")>
<BasicAuthentication>
Public Async Function SetzePruefungAufErledigtMitAnhaengen(pruefungsId As Integer, Bemerkung As String, anhaengeBase64 As List(Of String)) As Task(Of HttpResponseMessage)
Public Async Function SetzePruefungAufErledigtMitAnhaengen(pruefungsId As Integer, Bemerkung As String, Optional anhaengeBase64 As List(Of String) = Nothing) As Task(Of HttpResponseMessage)
' Globale Fehlerbehandlung einstellen
VERAG_PROG_ALLGEMEIN.cAllgemein.TESTSYSTEM = False
VERAG_PROG_ALLGEMEIN.cAllgemein.ERR_OP_GLOBAL = VERAG_PROG_ALLGEMEIN.ERROR_OP.LOG
@@ -41,16 +41,11 @@ Namespace ApiController.Controllers
Return Request.CreateErrorResponse(HttpStatusCode.BadRequest, "Der Parameter 'Bemerkung' darf nicht leer sein.")
End If
If anhaengeBase64 Is Nothing OrElse anhaengeBase64.Count = 0 Then
Return Request.CreateErrorResponse(HttpStatusCode.BadRequest, "Das 'anhaengeBase64' darf nicht leer sein.")
End If
If pruefungsId <= 0 Then
Return Request.CreateErrorResponse(HttpStatusCode.BadRequest, "PrüfungsID muss gesetzt werden")
End If
If VERAG_PROG_ALLGEMEIN.cAuditFlow.SetzePruefungAufErledigtMitAnhaengen(pruefungsId, Bemerkung, anhaengeBase64) Then
Return Request.CreateResponse(HttpStatusCode.OK)

View File

@@ -383,7 +383,7 @@
<Compile Include="Controllers\CustomsDeclaration\CustomsDeclarationController.vb" />
<Compile Include="Controllers\NCTS\NCTSController.vb" />
<Compile Include="Controllers\NEWTESTController\NEWTESTController.vb" />
<Compile Include="Controllers\SDLControler\SDLController.vb" />
<Compile Include="Controllers\SDLControler\AuditFlowController.vb" />
<Compile Include="Controllers\TestController\TESTController.vb" />
<Compile Include="cREST_Options.vb" />
<Compile Include="Global.asax.vb">