哪位大神 能将asp的一段代码逻辑 用java语言实现!!!我QQ“:596963475 求大神!!!
2017-01-08 17:24
351 查看
"where Cell_Quantity >= 5 and Blood_Type <> '溶血' and Rh <> '溶血' and ((left(hlaa1,2) in ('" & HLAA1 & "','" & HLAA2 & "','" & HLAA3 & "','" & HLAA4 & "')) and hlaa1<>'') " & _ "or ((left(hlaa2,2) in ('" & HLAA1 & "','" & HLAA2 & "','" & HLAA3 & "','" & HLAA4 & "')) and hlaa2<>'') " & _ "or ((left(hlaa3,2) in ('" & HLAA1 & "','" & HLAA2 & "','" & HLAA3 & "','" & HLAA4 & "')) and hlaa3<>'') " & _ "or ((left(hlaa4,2) in ('" & HLAA1 & "','" & HLAA2 & "','" & HLAA3 & "','" & HLAA4 & "')) and hlaa4<>'') " & _ "or ((left(hlab1,2) in ('" & HLAB1 & "','" & HLAB2 & "','" & HLAB3 & "','" & HLAB4 & "')) and hlab1<>'') " & _ "or ((left(hlab2,2) in ('" & HLAB1 & "','" & HLAB2 & "','" & HLAB3 & "','" & HLAB4 & "')) and hlab2<>'') " & _ "or ((left(hlab3,2) in ('" & HLAB1 & "','" & HLAB2 & "','" & HLAB3 & "','" & HLAB4 & "')) and hlab3<>'') " & _ "or ((left(hlab4,2) in ('" & HLAB1 & "','" & HLAB2 & "','" & HLAB3 & "','" & HLAB4 & "')) and hlab4<>'') " & _ "or ((left(hladr1,2) in ('" & HLADR1 & "','" & HLADR2 & "','" & HLADR3 & "','" & HLADR4 & "')) and hladr1<>'') " & _ "or ((left(hladr2,2) in ('" & HLADR1 & "','" & HLADR2 & "','" & HLADR3 & "','" & HLADR4 & "')) and hladr2<>'') " & _ "or ((left(hladr3,2) in ('" & HLADR1 & "','" & HLADR2 & "','" & HLADR3 & "','" & HLADR4 & "')) and hladr3<>'') " & _ "or ((left(hladr4,2) in ('" & HLADR1 & "','" & HLADR2 & "','" & HLADR3 & "','" & HLADR4 & "')) and hladr4<>'') " set rs = server.CreateObject("adodb.recordset") Set rs = MatchConn.Execute(sql) Do While Not (rs.EOF Or rs.BOF) VPoints(0) = rs(1) VPoints(1) = rs(2) VPoints(2) = rs(3) VPoints(3) = rs(4) VPoints(4) = rs(5) VPoints(5) = rs(6) VPoints(6) = rs(7) VPoints(7) = rs(8) VPoints(8) = rs(9) VPoints(9) = rs(10) VPoints(10) = rs(11) VPoints(11) = rs(12) tPoints = MatchBloodTypePoint(PPoints, VPoints) If tPoints >= 4 Then 'get match id 'add dealing code by ywm MatchIDs.Add trim(rs(0)),tPoints select case tPoints case 4 S4 = S4 + 1 case 5 S5 = S5 + 1 case 6 S6 = S6 + 1 end select End If rs.MoveNext 'DoEvents Loop rs.Close '更新 LogConn.Execute("update SearchLog set M4 = '"& S4 &"',M5 = '"& S5 &"',M6 = '"& S6 &"' where ID = "& clng(ID) &"") '排序 SortDictionary MatchIDs,dictItem Set DoMatchCompare = MatchIDs Set rs = Nothing End Function Public Function MatchBloodTypePoint(ByRef PatientPoint(), ByRef VolunteerPoint()) Dim MatchCounter Dim Counter Dim i If UBound(PatientPoint) = 11 And UBound(VolunteerPoint) = 11 Then For i = 0 To UBound(PatientPoint) Step 4 Counter = MatchHLPoint(PatientPoint(i), PatientPoint(i + 1), PatientPoint(i + 2), PatientPoint(i + 3), VolunteerPoint(i), VolunteerPoint(i + 1), VolunteerPoint(i + 2), VolunteerPoint(i + 3)) MatchCounter = MatchCounter + Counter ' If MatchCounter >= 4 Then ' Exit For ' End If Next End If ' MsgBox MatchCounter ' If MatchCounter >= 4 Then ' MatchBloodTypePoint = True ' Else ' MatchBloodTypePoint = False ' End If MatchBloodTypePoint = MatchCounter End Function Public Function MatchHLPoint(ByVal PFirst, ByVal PSecond, ByVal PThird, ByVal PFourth, ByVal VFirst, ByVal VSecond, ByVal VThird, ByVal VFourth) Dim Counter Dim IsCrossMatch ConvertNumber VFirst, VThird TruncateNumber VFirst, VSecond, VThird, VFourth ' ConvertNumber PFirst, PThird ' TruncateNumber PFirst, PSecond, PThird, PFourth 'compare If Len(PFirst) > 0 Then If PFirst = VFirst Or PFirst = VSecond Then Counter = Counter + 1 ElseIf PFirst = VThird Or PFirst = VFourth Then Counter = Counter + 1 IsCrossMatch = True ElseIf Len(PSecond) > 0 Then If PSecond = VFirst Or PSecond = VSecond Then Counter = Counter + 1 ElseIf PSecond = VThird Or PSecond = VFourth Then Counter = Counter + 1 IsCrossMatch = True End If End If End If If Len(PThird) > 0 Then If Counter = 1 Then If IsCrossMatch Then If PThird = VFirst Or PThird = VSecond Then Counter = Counter + 1 ElseIf Len(PFourth) > 0 Then If PFourth = VFirst Or PFourth = VSecond T a5fa hen Counter = Counter + 1 End If End If Else If PThird = VThird Or PThird = VFourth Then Counter = Counter + 1 ElseIf Len(PFourth) > 0 Then If PFourth = VThird Or PFourth = VFourth Then Counter = Counter + 1 End If End If End If Else If PThird = VFirst Or PThird = VSecond Or PThird = VThird Or PThird = VFourth Then Counter = Counter + 1 ElseIf Len(PFourth) > 0 Then If PFourth = VFirst Or PFourth = VSecond Or PFourth = VThird Or PFourth = VFourth Then Counter = Counter + 1 End If End If End If End If MatchHLPoint = Counter End Function Public Sub ConvertNumber(ByRef First, ByRef Second) If Not IsNumeric(First) Then First = Second ElseIf Not IsNumeric(Second) Then Second = First End If End Sub Public Sub TruncateNumber(ByRef First, ByRef Second, ByRef Third, ByRef Fourth) If Len(First) = 4 Then First = Left(First, 2) ElseIf Len(First) = 1 Then First = "0" & First End If If Len(Second) = 4 Then Second = Left(Second, 2) ElseIf Len(Second) = 1 Then Second = "0" & Second End If If Len(Third) = 4 Then Third = Left(Third, 2) ElseIf Len(Third) = 1 Then Third = "0" & Third End If If Len(Fourth) = 4 Then Fourth = Left(Fourth, 2) ElseIf Len(Fourth) = 1 Then Fourth = "0" & Fourth End If End Sub %>
相关文章推荐
- asp中VBScript如何实现换行
- asp.net button onclick 按刷新会重复执行onclick事件
- ASP.NET WEB控件如何添加控件事件的响应函数
- 请教关于asp优化问题
- 如何用asp.net2.0的WSAT(网站管理工具)制作一个管理所有用户的网页
- 我用asp NetBox 花生壳建的站 为什么在我们本地用户打开不了只有我自己可以打开 而我有几位好友 重庆 湖南的可以登录
- 我用asp NetBox 花生壳建的站 为什么在我们本地用户打开不了只有我自己可以打开 而我有几位好友 重庆 湖南的可以登录
- ASP.NET Aries 入门开发教程4:查询区的下拉配置
- ASP.NET Aries 入门开发教程3:开发一个列表页面及操控查询区_0
- ASP.NET Aries 入门开发教程3:开发一个列表页面及操控查询区
- ASP.NET Aries 入门开发教程1:框架下载与运行
- AspectJ中的JoinPoint方法概要
- asp.net基于HashTable实现购物车的方法
- ASP.NET调用DLL
- ASP.NET Zero--3.菜单配置
- ASP.NET Core 中的那些认证中间件及一些重要知识点
- kali-sqlmap-asp网站渗透
- ASP.NET界面重定向传值
- 树莓派修改开机图片
- 树梅派应用48: 在树莓派2上安装 Windows 10