Loading... * 部分现场是先检查,然后再批量更新检查技师信息的,但是状态>50后,技师信息就存不上了 * 所以这里用vbs批量updata * 下面配置文件和脚本,现场没有的,直接新增就行 > ArtVBS.ini ```ini [VBS] Name=TW_StudyComplated.vbs ``` > TW_StudyComplated.vbs ```vbnet 'On Error Resume Next Call Main() Sub Main() strCheckserialnum = Param.GetNamedValue("CHECKSERIALNUM") strUserid = Param.GetNamedValue("Userid") strUserName = Param.GetNamedValue("UserName") If GetStudystatus(strcheckserialnum) > 30 and IsNull(GetPhotomakerid(strcheckserialnum)) Then '判断状态是否大于30并且技师id为空 result = UpdatePhotomaker(strcheckserialnum,struserid,strUserName) End If End Sub Function GetPhotomakerid(strcheckserialnum) '获取技师id strSql = "select s.photomakerid from studyinfo s where s.checkserialnum='" & strCheckserialnum & "'" Set rs = Param.commoninfoquery(strSql) If not rs.eof Then GetPhotomakerid = rs("photomakerid") Exit Function End If GetPhotomakerid = "" End Function Function GetStudystatus(strcheckserialnum) '获取检查状态 strSql = "select s.photomaker,s.photomakerid,s.studystatus from studyinfo s where s.checkserialnum='" & strCheckserialnum & "'" Set rs = Param.commoninfoquery(strSql) If not rs.eof Then StudyStatus = rs("studystatus") GetStudystatus = CInt(StudyStatus) Exit Function End If GetStudystatus = 0 End Function Function UpdatePhotomaker(strcheckserialnum,struserid,strUserName) '更新技师id strSql = "update studyinfo s set s.photomaker='" & strUserName & "', s.photomakerid='" & strUserid &"' where s.checkserialnum='" & strcheckserialnum & "'" UpdatePhotomaker = param.commoninfoupdate(strSql) End Function ``` 最后修改:2024 年 04 月 22 日 © 允许规范转载 赞 如果觉得我的文章对你有用,请随意赞赏