コード例 #1
0
def get_select_content(request):
    Logger.write_log("获取chart下拉数据")
    model_name = request.GET.get("model_name")
    object = request.GET.get('object')
    result = models_chart.get_select_content(model_name, object)
    jsonstr = json.dumps(result)
    return HttpResponse(jsonstr.encode("utf-8"))
コード例 #2
0
def getStartEndTime(request):
    Logger.write_log("获取Start End时间数据")
    model_name = request.GET.get('model_name')
    timeType = request.GET.get('timeType')
    result = models_ngreport.getStartEndTime(model_name, timeType)
    jsonstr = json.dumps(result)
    return HttpResponse(jsonstr)
コード例 #3
0
def del_worktime(request):
    Logger.write_log("del worktime")
    model = request.GET.get('model')
    worktime_name = request.GET.get('worktime_name')
    result = models_worktime.del_worktime(model, worktime_name)
    jsonstr = json.dumps(result)
    return HttpResponse(jsonstr)
コード例 #4
0
def initAssyData(request):
    Logger.write_log("初始化Assy数据")
    model = request.GET.get('model_name')
    result = []
    result = models_assy.initAssyData(model)
    jsonstr = json.dumps(result)
    return HttpResponse(jsonstr)
コード例 #5
0
def initSummaryOffsetData(request):
    Logger.write_log("初始化Summary Offset数据")
    model = request.GET.get('model_name')
    result = []
    result = models_summary_offset.initSummaryOffsetData(model)
    jsonstr = json.dumps(result)
    return HttpResponse(jsonstr)
コード例 #6
0
def initConfigureData(request):
    Logger.write_log("初始化Configure数据")
    model = request.GET.get('model_name')
    result = []
    result = models_configure.initConfigureData(model)
    jsonstr = json.dumps(result)
    return HttpResponse(jsonstr)
コード例 #7
0
def get_workTime(request):
    Logger.write_log("初始化WorkTime数据")
    model = request.GET.get('model_name')
    result = []
    result = models_configure.get_time_tbl_cd(model)
    jsonstr = json.dumps(result)
    return HttpResponse(jsonstr)
コード例 #8
0
def exits_mplan(request):
    '''m_plan当天数据是否存在'''
    Logger.write_log("m_plan当天数据是否存在")
    model = request.GET.get('model_name')
    result = models_ngreport.exits_mplan(model)
    jsonstr = json.dumps(result)
    return HttpResponse(jsonstr)
コード例 #9
0
def del_worktime_detail(request):
    Logger.write_log("del_worktime_detail")
    model = request.GET.get('model')
    worktime_name = request.GET.get('worktime_name')
    time_part = request.GET.get('time_part')
    result = models_worktime.del_worktime(model, worktime_name, time_part)
    jsonstr = json.dumps(result)
    return HttpResponse(jsonstr)
コード例 #10
0
def go_history(request):
    Logger.write_log("进入trend页面")
    objects = get_config('object')
    model = request.GET.get('model')
    return render(request, 'history.html', {
        "model": model,
        "objects": objects
    })
コード例 #11
0
def get_assytext(request):
    Logger.write_log("初始化AssyText数据")
    model = request.GET.get('model_name')
    line_cd = request.GET.get('line_cd')
    result = []
    result = models_configure.get_assy_text(model, line_cd)
    jsonstr = json.dumps(result)
    return HttpResponse(jsonstr)
コード例 #12
0
def update_worktime(request):
    Logger.write_log("更新work_time数据")
    model = request.GET.get('model_name')
    content = request.body.decode("utf-8")
    received_json_data = json.loads(content)
    result = models_configure.update_worktime(model, received_json_data)
    jsonstr = json.dumps(result)
    return HttpResponse(jsonstr)
コード例 #13
0
def add_worktime(request):
    Logger.write_log("add worktime")
    model = request.GET.get('model')
    str_json = str(request.GET.get('worktime'))
    worktime = json.loads(str_json)
    result = models_worktime.add_worktime(model, worktime)
    jsonstr = json.dumps(result)
    return HttpResponse(jsonstr)
コード例 #14
0
def get_configs(request):
    Logger.write_log("取得所有config信息")
    model_name = request.GET.get('model_name')
    from_process_at = request.GET.get('from')
    to_process_at = request.GET.get('to')
    result = models_common.get_configs(model_name, from_process_at,
                                       to_process_at)
    jsonstr = json.dumps(result)
    return HttpResponse(jsonstr)
コード例 #15
0
def get_2_defectdetail(request):
    Logger.write_log("获取Second具体不良信息")
    model_name = request.GET.get('model_name')
    data_seq = request.GET.get('data_seq')
    inspect_cd = request.GET.get('inspect_cd')
    result = models_common.get_defectdetail(model_name, data_seq, inspect_cd,
                                            'Second')
    jsonstr = json.dumps(result)
    return HttpResponse(jsonstr)
コード例 #16
0
def update_assy(request):
    Logger.write_log("更新Assy数据")
    model = request.GET.get('model_name')
    process_id = request.GET.get('process_id')
    assy_text = request.GET.get('assy_text')
    result = []
    result = models_assy.update_assy(model, process_id, assy_text)
    jsonstr = json.dumps(result)
    return HttpResponse(jsonstr)
コード例 #17
0
def edit_worktime_detail(request):
    Logger.write_log("del worktime")
    model = request.GET.get('model')
    worktime_name = request.GET.get('worktime_name')
    time_part = request.GET.get('time_part')
    field = request.GET.get('field')
    value = request.GET.get('value')
    result = models_worktime.edit_worktime_detail(model, field, value, worktime_name, time_part)
    jsonstr = json.dumps(result)
    return HttpResponse(jsonstr)
コード例 #18
0
def get_inspect(request):
    Logger.write_log("获取Inspect数据")
    model_name = request.GET.get('model_name')
    start_date = request.GET.get('from')
    end_date = request.GET.get('to')
    process_cd = request.GET.get('process')
    result = models_trend_chart.get_inspect(model_name, start_date, end_date,
                                            process_cd)
    jsonstr = json.dumps(result)
    return HttpResponse(jsonstr.encode("utf-8"))
コード例 #19
0
def getProcessDetail(request):
    Logger.write_log("获取Process数据")
    model_name = request.GET.get('model_name')
    search_date = request.GET.get('searchDate')
    lineNum = request.GET.get('lineNum')
    if not lineNum:
        lineNum = "2nd"
    result = models_progress.get_progressDetail(model_name, search_date,
                                                lineNum)
    jsonstr = json.dumps(result)
    return HttpResponse(jsonstr)
コード例 #20
0
def get_history_assy(request):
    Logger.write_log("获取history assy数据")
    result = get_config('database')
    model = request.GET.get('model_name')
    # print(result)
    for item in result:
        if (item['MODEL'] == model):
            target = item['ASSY']
            break
    jsonstr = json.dumps(target)
    return HttpResponse(jsonstr)
コード例 #21
0
def get_Trend_Data(request):
    Logger.write_log("获取defect数据")
    result = get_config('database')
    model = request.GET.get('model_name')
    # print(result)
    for item in result:
        if (item['MODEL'] == model):
            target = item['RGB']['Trend_Boundary_Value']
            break
    jsonstr = json.dumps(target)
    return HttpResponse(jsonstr)
コード例 #22
0
def get_lineSummaryDetail(request):
    Logger.write_log("统计所选Model的line/Assy信息")
    Search_date = request.GET.get('searchDate')
    model_name = request.GET.get('model_name')
    time_type = request.GET.get('time_type')
    lineNum = request.GET.get('lineNum')
    if not lineNum:
        lineNum = "2nd"
    result = models_common.get_lineSummaryDetail(model_name, Search_date,
                                                 time_type, lineNum)
    jsonstr = json.dumps(result)
    return HttpResponse(jsonstr)
コード例 #23
0
def search_history(request):
    Logger.write_log("初始化history数据")
    model = request.GET.get('model_name')
    object = request.GET.get('object')
    content = request.GET.get('content')
    dataType = request.GET.get('dataType')
    start_date = request.GET.get('from')
    end_date = request.GET.get('to')
    result = models_trend.get_trend(model, start_date, end_date, object,
                                    content, dataType)
    jsonstr = json.dumps(result)
    return HttpResponse(jsonstr)
コード例 #24
0
def search_defect(request):
    Logger.write_log("获取defect数据")
    model_name = request.GET.get('model_name')
    startTime = request.GET.get('from')
    endTime = request.GET.get('to')
    line = request.GET.get('line')
    assy = request.GET.get('assy')
    time_part = request.GET.get('time_part')
    top_rank = request.GET.get('top_rank')
    result = models_common.search_defect(model_name, startTime, endTime, line,
                                         assy, time_part, top_rank)
    jsonstr = json.dumps(result)
    return HttpResponse(jsonstr)
コード例 #25
0
def get_1_processdetail(request):
    Logger.write_log("根据assy,date,time_part,获取First工位信息一览")
    model_name = request.GET.get('model_name')
    line = request.GET.get('line')
    assy = request.GET.get('assy')
    process_at = request.GET.get('process_at')
    time_part = request.GET.get('time_part')
    selectedModel = request.GET.get('selectedModel')
    result = models_common.get_processdetail(model_name, line, assy,
                                             process_at, time_part, 'First',
                                             selectedModel)
    jsonstr = json.dumps(result)
    return HttpResponse(jsonstr)
コード例 #26
0
def search_trend(request):
    Logger.write_log("查询trend数据")
    model_name = request.POST.get('model')
    start_date = request.POST.get('from')
    end_date = request.POST.get('to')
    process_cd = request.POST.get('process')
    inspect_cd = request.POST.get('inspect')
    type = request.POST.get('datatype')
    time_part = request.POST.getlist('timepart')
    result = models_trend_chart.get_trend(model_name, start_date, end_date,
                                          process_cd, inspect_cd, time_part,
                                          type)
    jsonstr = json.dumps(result)
    return HttpResponse(jsonstr)
コード例 #27
0
def get_trendOfDefect(request):
    Logger.write_log("显示所有产线在各个时间段里的不良项目")
    model_name = request.GET.get('model_name')
    start_date = request.GET.get('from')
    end_date = request.GET.get('to')
    process_cd = request.GET.get('process_cd')
    inspect_cd = request.GET.get('inspect_cd')
    time_part = request.GET.get('time_part')
    dataType = request.GET.get('dataType')

    result = models_trend_chart.get_trend(model_name, start_date, end_date,
                                          process_cd, inspect_cd, time_part,
                                          dataType)
    jsonstr = json.dumps(result)
    return HttpResponse(jsonstr)
コード例 #28
0
def get_sntracert(request):
    Logger.write_log("显示工位信息以及各工位下的各部品状况信息")
    model_name = request.GET.get('model_name')
    from_process_at = request.GET.get('from')
    to_process_at = request.GET.get('to')
    config = request.GET.get('config')
    line = request.GET.get('line')
    datatype_id = request.GET.get('datatype_id')
    mode = request.GET.get('mode')
    pernum = request.GET.get('pernum')
    c_pernum = int(pernum)
    result = models_sntracert.get_sntracert(model_name, from_process_at,
                                            to_process_at, config, line,
                                            datatype_id, mode, c_pernum)
    jsonstr = json.dumps(result)
    return HttpResponse(jsonstr)
コード例 #29
0
def update_summary_offset(request):
    Logger.write_log("更新summary_offset数据")
    model = request.GET.get('model_name')
    received_json_data = json.loads(request.body.decode('utf-8'))
    for item in received_json_data:
        assy_text = item['assy_text']
        ng_count = item['ng_count']
        reason = item['reason']
        result = []
        result = models_summary_offset.update_summary_offset(
            model, assy_text, ng_count, reason)
        if (result['status'] == 'fail'):
            jsonstr = json.dumps(result)
            return HttpResponse(jsonstr)
    jsonstr = json.dumps(result)
    return HttpResponse(jsonstr)
コード例 #30
0
def search_chart(request):
    Logger.write_log("查询chart数据")
    result = []
    model_name = request.GET.get("model_name")
    start = request.GET.get('from')
    end = request.GET.get('to')
    object = request.GET.get('object')
    content = request.GET.get('content')
    type = request.GET.get('type')
    lineNum = request.GET.get('lineNum')
    if not lineNum:
        lineNum = "2nd"
    result = models_chart.search_chart(model_name, start, end, object, content,
                                       type, lineNum)
    jsonstr = json.dumps(result)
    return HttpResponse(jsonstr.encode("utf-8"))