def METHOD_NAME(request):
    try:
        sectcode:str = request.GET["sectcode"]
        landcode:str = request.GET["landcode"]
    except MultiValueDictKeyError:
        missing_params = [p for p in ("sectcode", "landcode") if p not in request.GET]
        missing_params = ", ".join(missing_params)
        return HttpResponse(
            f"Missing query parameter: {missing_params}.",
            status=400,
        )
    # landcode length should be 8
    if len(landcode) != 8 and not landcode.isnumeric():
        return HttpResponse(
            f"The landcode should be number and length is 8 (e.g. landcode 82-18 should be 00820018)",
            status=400
        )
    # 因為在資料庫裡面， landcode 有多種儲存格式 82-18, 00820018 所以需要將 landcode 轉成這兩種格式來搜尋
    landcode_1 = f"{int(landcode[:4])}-{int(landcode[4:])}"
    try:
        factory = Factory.objects.filter(Q(sectcode=sectcode), Q(landcode=landcode) | Q(landcode=landcode_1)).get()
        serializer = FactorySerializer(factory)
        return JsonResponse(serializer.data, safe=False)
    except FactoryDoesNotExist as e:
        return HttpResponse(
            f"Does not exist",
            status=404
        )