' 解析申请审批提交数据
ja = jo("info")("apply_data")("contents")
For i As Integer = 0 To ja.Count - 1
Dim jo4 As JObject =ja(i)
If jo("info")("sp_name").ToString() = "用车" Then
r("节点审批方式") = ja(0)("value")("text").ToString() & ja(1)("value")("text").ToString() & ja(2)("value")("text").ToString() & ")" ' & "车型(" & ja(3)("value")("text").ToString() & ")"
r("结束时间") = stt.AddSeconds(ja(4)("value")("date")("s_timestamp").ToString())
r("开始时间") = stt.AddSeconds(ja(3)("value")("date")("s_timestamp").ToString())
ElseIf jo("info")("sp_name").ToString() = "外出" Then
r("节点审批方式") = ja(0)("value")("text").ToString() & ja(1)("value")("text").ToString()
r("结束时间") = stt.AddSeconds(ja(2)("value")("attendance")("date_range")("new_end").ToString())
r("开始时间") = stt.AddSeconds(ja(2)("value")("attendance")("date_range")("new_begin").ToString())
ElseIf jo("info")("sp_name").ToString() = "请假" Then
' 解析请假类型
Dim ssss As String = "{" & vbcrlf & """options""" & ":" & ja(i)("value")("vacation")("selector")("options").ToString() & vbcrlf & "}"
Dim jo12 As JObject = JObject.Parse(ssss)
Dim ss3 As String
For Each jt As JToken In jo12("options")
Dim ss2 As String = "{" & vbcrlf & """value""" & ":" & jt("value").ToString() & vbcrlf & "}"
Dim lms As new List(of String)
Dim jo13 As JObject = JObject.Parse(ss2)
For Each jtt As JToken In jo13("value")
If lms.Contains(jtt("text").ToString()) = False Then
lms.Add(jtt("text").ToString())
End If
Next
ss3 = String.Join("、", lms.ToArray)
r("节点审批方式") = ss3 & ja(1)("value")("text").ToString()
Next
r("计时类型") = ja(0)("value")("vacation")("attendance")("date_range")("type").ToString()
r("结束时间") = stt.AddSeconds(ja(0)("value")("vacation")("attendance")("date_range")("new_end").ToString())
r("开始时间") = stt.AddSeconds(ja(0)("value")("vacation")("attendance")("date_range")("new_begin").ToString())
r("天数") = ja(0)("value")("vacation")("attendance")("date_range")("new_duration").ToString() /86400
ElseIf jo("info")("sp_name").ToString() = "加班" Then
r("节点审批方式") = ja(0)("value")("text").ToString() & ja(1)("value")("text").ToString()
r("结束时间") = stt.AddSeconds(ja(2)("value")("attendance")("date_range")("new_end").ToString())
r("开始时间") = stt.AddSeconds(ja(2)("value")("attendance")("date_range")("new_begin").ToString())
ElseIf jo("info")("sp_name").ToString() = "补卡" Then
r("节点审批方式") = ja(0)("value")("punch_correction")("state").ToString() & ja(0)("value")("punch_correction")("time").ToString() & ja(1)("value")("text").ToString()
End If
Next