⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 bas_operating.bas

📁 生产计划管理等信息 可以查询计划完成情况等
💻 BAS
字号:
Attribute VB_Name = "Bas_Operating"

Public Function AssertNodeIsBanzu(banzu As String) As Boolean
'判断子节点是一个部门
  SQL = "Select * from 班组信息 where 班组名称='" & banzu & "' "
  If rstmp.State = 1 Then rstmp.Close
  rstmp.Open SQL, DBConn, adOpenKeyset, adLockOptimistic, adCmdText
  If Not rstmp.EOF Then
     AssertNodeIsBanzu = True
  Else
     AssertNodeIsBanzu = False
  End If
End Function

Public Function GetCustomer(PlanID As String, SubPlanID As String) As String
'获取计划单中的客户名称
    Dim SQL1 As String
    SQL1 = "Select * from 计划信息 where 计划单号='" & PlanID & "' and 批次号='" & SubPlanID & "' "
    If rstmp.State = 1 Then rstmp.Close
    rstmp.Open SQL1, DBConn, adOpenKeyset, adLockOptimistic, adCmdText
    If Not rstmp.EOF Then GetCustomer = rstmp.Fields("客户名称").Value
End Function

Public Function GetGuiGe(PlanID As String, SubPlanID As String) As String
'获取计划单中的规格信息
    Dim SQL2 As String
    SQL2 = "Select * from 计划信息 where 计划单号='" & PlanID & "' and 批次号='" & SubPlanID & "' "
    If rstmp.State = 1 Then rstmp.Close
    rstmp.Open SQL2, DBConn, adOpenKeyset, adLockOptimistic, adCmdText
    If Not rstmp.EOF Then GetGuiGe = rstmp.Fields("电流规格").Value & "/" & rstmp.Fields("电表常数").Value & "/" & rstmp.Fields("等级").Value & "级"
End Function

Public Function GetDepartByPlanID(PlanID_9 As String) As String
'获取计划单中的规格信息
    Dim SQL2 As String
    SQL2 = "Select * from 计划信息 where 计划单号='" & Mid(PlanID_9, 1, 7) & "' and 批次号='" & Mid(PlanID_9, 8, 2) & "' "
    If rstmp.State = 1 Then rstmp.Close
    rstmp.Open SQL2, DBConn, adOpenKeyset, adLockOptimistic, adCmdText
    If Not rstmp.EOF Then GetDepartByPlanID = rstmp.Fields("部门名称").Value
End Function

Public Function GetMeterType(PlanID_9 As String) As String
'获取计划单中的表计类型
    Dim SQL2 As String
    SQL2 = "Select * from 计划信息 where 计划单号='" & Mid(PlanID_9, 1, 7) & "' and 批次号='" & Mid(PlanID_9, 8, 2) & "' "
    If rstmp.State = 1 Then rstmp.Close
    rstmp.Open SQL2, DBConn, adOpenKeyset, adLockOptimistic, adCmdText
    If Not rstmp.EOF Then GetMeterType = rstmp.Fields("表计类型").Value
End Function

Public Function GetDepart(PlanID As String, SubPlanID As String) As String
'获取计划单中的制造部门
    Dim SQL1 As String
    SQL1 = "Select * from 计划信息 where 计划单号='" & PlanID & "' and 批次号='" & SubPlanID & "' "
    If rstmp.State = 1 Then rstmp.Close
    rstmp.Open SQL1, DBConn, adOpenKeyset, adLockOptimistic, adCmdText
    If Not rstmp.EOF Then GetDepart = rstmp.Fields("部门名称").Value
End Function

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -