예제 #1
0
def removeRecord(oid):
    guguDao = mongoDao()
    guguDao.remove_a_record(oid)
    return ""
예제 #2
0
def saveRecord():
    content = request.json
    content['pcs'] = int(content['pcs'])
    guguDao = mongoDao()
    guguDao.add_a_record(content)
    return ""
예제 #3
0
def precaculate_pcs(targetPn, opType, pcs):
    guguDao = mongoDao()
    f = guguDao.pre_saving_test(targetPn, pcs, opType)
    return str(f)
예제 #4
0
def bomByPn(pn):
    if __isLogined():
        guguDao = mongoDao()
        records = guguDao.read_records_by_pn(pn)
        return render_template('bom.html', data = records, leaf_level = True, not_bom = True)
    return redirect('/login')
예제 #5
0
def summary():
    guguDao = mongoDao()
    w = guguDao.aggregrate_records()
    return render_template('summary.html', data = w)