コード例 #1
0
def startJob(newRecord):
    conn = make_connection()
    c = conn.cursor()
    SQL = Q.InsertIntoJobRecord(newRecord)
    c.execute(SQL)
    conn.commit()
    SQL = Q.SelectLastJobRecord()
    c.execute(SQL)
    JobIndex = c.fetchone()[0]
    SQL = Q.InsertInitnialActivity(newRecord, JobIndex)
    c.execute(SQL)
    conn.commit()
    end_connection(conn)
コード例 #2
0
def reformateDate_jobRecord(query):
    conn = make_connection()
    c = conn.cursor()
    SQL = Q.selectDateToUpdate(query)
    c.execute(SQL)
    items = c.fetchall()
    return items
コード例 #3
0
def logActivity(details):
    conn = make_connection()
    c = conn.cursor()
    SQL = Q.InsertActivity(details)
    c.execute(SQL)
    conn.commit()
    end_connection(conn)
コード例 #4
0
def getJobType():
    conn = make_connection()
    c = conn.cursor()
    SQL = Q.SelectJobType()
    c.execute(SQL)
    items = c.fetchall()
    end_connection(conn)
    return items
コード例 #5
0
def getNoteStringLength(id):
    conn = make_connection()
    c = conn.cursor()
    SQL = Q.SelectNotesByID(id)
    c.execute(SQL)
    items = c.fetchall()[0][0]
    end_connection(conn)
    return items
コード例 #6
0
def updateDateField(record, date, query):
    conn = make_connection()
    c = conn.cursor()
    SQL = Q.updateDateFormat(record, date, query)
    c.execute(SQL)
    conn.commit()
    end_connection(conn)
    return SQL
コード例 #7
0
def getJobTypeCount(routing):
    conn = make_connection()
    c = conn.cursor()
    SQL = Q.SelectJobTypeCount(routing)
    c.execute(SQL)
    items = c.fetchone()
    end_connection(conn)
    return items
コード例 #8
0
def getCompletedJobsList(query_type):
    conn = make_connection()
    c = conn.cursor()
    SQL = Q.SelectCompletedJobList(query_type)
    c.execute(SQL)
    items = c.fetchall()
    end_connection(conn)
    return items
コード例 #9
0
def RunningJobsCount():
    conn = make_connection()
    c = conn.cursor()
    SQL = Q.SelectRunningJobsCount()
    c.execute(SQL)
    value = c.fetchone()[0]
    end_connection(conn)
    return value
コード例 #10
0
def getTodaysCellCount():
    conn = make_connection()
    c = conn.cursor()
    SQL = Q.SelectCompleteByWorkCellDaily()
    c.execute(SQL)
    items = c.fetchall()
    end_connection(conn)
    return items
コード例 #11
0
def updateJobNotes(details):
    conn = make_connection()
    c = conn.cursor()
    SQL = Q.UpdateJobNotes(details)
    c.execute(SQL)
    conn.commit()
    end_connection(conn)
    return SQL
コード例 #12
0
def getActiveOperators():
    conn = make_connection()
    c = conn.cursor()
    SQL = Q.SelectActiveOperators()
    c.execute(SQL)
    items = c.fetchall()
    end_connection(conn)
    return items
コード例 #13
0
def setUpdateForm(JobID):
    conn = make_connection()
    c = conn.cursor()
    SQL = Q.SelectJobToUpdate(JobID)
    c.execute(SQL)
    items = c.fetchall()
    end_connection(conn)
    return items
コード例 #14
0
def getStatusByID(id):
    conn = make_connection()
    c = conn.cursor()
    SQL = Q.SelectStatusById(id)
    c.execute(SQL)
    value = c.fetchone()[0]
    end_connection(conn)
    return value
コード例 #15
0
def getFinalOperationByID(id):
    conn = make_connection()
    c = conn.cursor()
    SQL = Q.SelectFinalOperation(id)
    c.execute(SQL)
    value = c.fetchone()[0]
    end_connection(conn)
    return value
コード例 #16
0
def getCellCountAggregets():
    conn = make_connection()
    c = conn.cursor()
    SQL = Q.selectCountAggregates()
    c.execute(SQL)
    items = c.fetchall()
    end_connection(conn)
    return items
コード例 #17
0
def getLastJobRecord():
    conn = make_connection()
    c = conn.cursor()
    SQL = Q.SelectLastJobRecord()
    c.execute(SQL)
    value = c.fetchone()[0]
    end_connection(conn)
    return value
コード例 #18
0
def getReport():
    conn = make_connection()
    c = conn.cursor()
    SQL = Q.SelectNightlyReportQuerey()
    c.execute(SQL)
    items = c.fetchall()
    end_connection(conn)
    return items
コード例 #19
0
def getJobsCompleteThisWeek():
    conn = make_connection()
    c = conn.cursor()
    SQL = Q.SelectCompleteThisWeekCount()
    c.execute(SQL)
    value = c.fetchone()[0]
    end_connection(conn)
    return value
コード例 #20
0
def getRunningJobsList():
    conn = make_connection()
    c = conn.cursor()
    SQL = Q.SelectRunningJobList()
    c.execute(SQL)
    items = c.fetchall()
    end_connection(conn)
    return items