# -*- coding:utf-8 -*-
# 作者：齐振鋆
# 日期：2023/1/13
# 描述:
import json
import re
import requests

from urllib import parse
from unit.public.TimeUnit import TimeUnit

tu = TimeUnit()
api = 'http://10.17.65.216:8088/portal/r/jd'
headers = {
    'Content-Type': 'application/x-www-form-urlencoded; charset=utf-8'
}
session = requests.session()


def gk_request(data):
    response = session.post(api, headers=headers, data=parse.urlencode(data)).text
    print('\n', response)
    return response


# dHnoQcI1fnwGr67e7QwxqfQjhB5QxdWwyUPAO1GUdfvbmd1KzEeJ0tts8eCxOB+bwqGlE7+7LIxCXrLyzZMGxhRIsTiAlPgB3Y1wlMrv1aaii2yWyjQY5y/aIkkfGICLgCKwrVItTn7q8stkv30tPdTVq4e1k9hF5epnI+60nb8=
# 533fa49d3ab7e57c2454740a783a3f9b8a227a3ca3623dca6d2e07812c2ad077919502877537631668cd7da34a28b5a36e8ee0003609703864eec1dfb5ec344a780cdece3dcf61d49e2f8cf83929c361a604289a44158c5508f718ba661e97d7e203f7a74e21cf2d6969f8c3dc953833e556a548fd06bf8791ca9dbf0b68cc8d
def get_session():
    body = {
        'userid': 'qizhenjun',
        'pwd': 'dHnoQcI1fnwGr67e7QwxqfQjhB5QxdWwyUPAO1GUdfvbmd1KzEeJ0tts8eCxOB+bwqGlE7+7LIxCXrLyzZMGxhRIsTiAlPgB3Y1wlMrv1aaii2yWyjQY5y/aIkkfGICLgCKwrVItTn7q8stkv30tPdTVq4e1k9hF5epnI+60nb8=',
        'rememberMeUid': 'on',
        'mobile': '',
        'cmd': 'CLIENT_USER_LOGIN',
        'sid': '',
        'deviceType': 'pc',
        '_CACHE_LOGIN_TIME_': '{}'.format(tu.get_timezone()),
        'pwdEncode': 'RSA',
        'timeZone': 8,
        'loginUrl': 'http://10.17.65.216:8088/portal/'
    }
    response = gk_request(body)
    return json.loads(response)['data']['sid']


def get_process_task_id(s_id):
    body = {
        'cmd': 'CLIENT_BPM_WORKLIST_PROCESSINST_CREATE_AJAX_PREPAGE',
        'sid': s_id,
        'isDwCreate': True,
        'processGroupId': 'obj_fa7e36de0c254f3086ce43bc9dce75b7',
        'processDefId': 'obj_4fc09a3dd5bf430c80f29f75e1d8f793',
        'extParam': '"手术借出/手术请领单"'
    }
    response = gk_request(body)
    processInstId = re.search('processInstId=(.*)&openState', response).group(1)
    taskInstId = re.search('taskInstId=(.*)&', response).group(1)
    return processInstId, taskInstId


def get_bo_def_id(s_id, p_i_id, t_i_id):
    body = {
        'sid': s_id,
        'cmd': 'CLIENT_BPM_FORM_MAIN_PAGE_JSON',
        'processInstId': p_i_id,
        'taskInstId': t_i_id,
        'currentPage': 1,
        'openState': 1,
        'formDefId': '10feec89-c9c8-4b7e-b9a0-e6dbd6eef59e',
        'boId': '',
        'displayToolbar': True,
        'extParam': {
            "isDisplayToolbar": True,
            "isInitTaskOpen": False,
            "displayToolbar": "true",
            "isVue": "true",
            "openState": "1",
            "extParam": "",
            "formDefId": "",
            "boId": "",
            "serverName": "10.17.65.216",
            "taskInstId": t_i_id,
            "navFunctionName": "com.awspaas.user.apps.cmdc.surgery/手术跟台手术请领流程",
            "firstOpen": True,
            "responseType": "W",
            "param": "",
            "clientIp": "10.17.73.97",
            "processInstId": p_i_id,
            "currentPage": "",
            "lang": ""
        }
    }
    response = gk_request(body)
    jsonData = json.loads(response)
    return jsonData['data']['processContext']['boId'], jsonData['data']['processContext']['boDefId'], jsonData['data']['usertaskComment']['commentId']


def ssqld(s_id, process_inst_id, task_inst_id, bo_id, bo_def_id, c_id):
    body = {
        'cmd': 'CLIENT_BPM_FORM_PAGE_P_SAVE_DATA',
        'processInstId': process_inst_id,
        'taskInstId': task_inst_id,
        'openState': '1',
        'formDefId': '10feec89-c9c8-4b7e-b9a0-e6dbd6eef59e',  # 请领单创建固定
        'formData': {
            "F_ORDER_STATUS": "100",
            "F_REMARK": "testtesttestremark",
            "F_BUSINESS_CODE": "122006",
            "F_LOAN_ENTREPOT_CODE": "",
            "F_OPERATION_KIND": "A",
            "F_PHONE": "13333333333",
            "F_SALESMAN_NAME": "段炼",
            "F_CONTACT": "test",
            "F_DISTRIBUTE_CUST_NO": "1000591",
            "F_DISTRIBUTE_CUST_NAME": "南京医科大学附属逸夫医院",
            "F_OPERATION_DATE": "2023-01-31",
            "ID": bo_id,
            "F_BORROW_ENTREPOT_NAME": "",
            "F_SUCCESSION": "",
            "F_TAX_RATE_AREA": "",
            "F_RETURNIN_ENTREPOT_NAME": "",
            "F_EPARTMENE_DESC": "",
            "F_CST_ENQUIRY_NO": "自动生成无需填写",
            "F_SALESMAN_CODE": "88020206",
            "F_OPERATION_TYPE": "B",
            "F_COMPANY_NAME": "国药集团四川省医疗器械有限公司",
            "F_LOAN_ENTREPOT_NAME": "",
            "F_BUSINESS_NAME": "商务部",
            "F_EUDXIG6E": "0",
            "F_CUST_NAME": "南京医科大学附属逸夫医院",
            "F_CUST_CODE": "1000591",
            "F_TAX_RATE": "",
            "F_EPARTMENE": "",
            "F_COMPANY_CODE": "00122",
            "F_BORROW_ENTREPOT_CODE": "",
            "F_OPERATION_DOCTOR": "test",
            "F_LOAN_TYPE": "A",
            "F_ORDER_NO": "自动生成无需填写",
            "F_TERMS_PAYMENT": "",
            "F_RETURNIN_ENTREPOT_CODE": ""
        },
        'formDataExtends': {
            "F_ORDER_STATUS": {
                "displayValue": "100",
                "extends": {}
            },
            "F_REMARK": {
                "displayValue": "testtesttestremark",
                "extends": {}
            },
            "F_BUSINESS_CODE": {
                "displayValue": "122006",
                "extends": {}
            },
            "F_LOAN_ENTREPOT_CODE": {
                "displayValue": "",
                "extends": {}
            },
            "F_OPERATION_KIND": {
                "displayValue": "踝关节",
                "extends": {}
            },
            "F_PHONE": {
                "displayValue": "13333333333",
                "extends": {}
            },
            "F_SALESMAN_NAME": {
                "displayValue": "段炼",
                "extends": {}
            },
            "F_CONTACT": {
                "displayValue": "test",
                "extends": {}
            },
            "F_DISTRIBUTE_CUST_NO": {
                "displayValue": "1000591",
                "extends": {}
            },
            "F_DISTRIBUTE_CUST_NAME": {
                "displayValue": "南京医科大学附属逸夫医院",
                "extends": {}
            },
            "F_OPERATION_DATE": {
                "displayValue": "2023-01-31",
                "extends": {}
            },
            "F_BORROW_ENTREPOT_NAME": {
                "displayValue": "",
                "extends": {}
            },
            "F_SUCCESSION": {
                "displayValue": "",
                "extends": {}
            },
            "F_TAX_RATE_AREA": {
                "displayValue": "",
                "extends": {}
            },
            "F_RETURNIN_ENTREPOT_NAME": {
                "displayValue": "",
                "extends": {}
            },
            "F_EPARTMENE_DESC": {
                "displayValue": "",
                "extends": {}
            },
            "F_CST_ENQUIRY_NO": {
                "displayValue": "自动生成无需填写",
                "extends": {}
            },
            "F_SALESMAN_CODE": {
                "displayValue": "88020206",
                "extends": {}
            },
            "F_OPERATION_TYPE": {
                "displayValue": "翻修手术",
                "extends": {}
            },
            "F_COMPANY_NAME": {
                "displayValue": "国药集团四川省医疗器械有限公司",
                "extends": {}
            },
            "F_LOAN_ENTREPOT_NAME": {
                "displayValue": "",
                "extends": {}
            },
            "F_BUSINESS_NAME": {
                "displayValue": "商务部",
                "extends": {}
            },
            "F_EUDXIG6E": {
                "displayValue": "0",
                "extends": {}
            },
            "F_CUST_NAME": {
                "displayValue": "南京医科大学附属逸夫医院",
                "extends": {}
            },
            "F_CUST_CODE": {
                "displayValue": "1000591",
                "extends": {}
            },
            "F_TAX_RATE": {
                "displayValue": "",
                "extends": {}
            },
            "F_EPARTMENE": {
                "displayValue": "",
                "extends": {}
            },
            "F_COMPANY_CODE": {
                "displayValue": "00122",
                "extends": {}
            },
            "F_BORROW_ENTREPOT_CODE": {
                "displayValue": "",
                "extends": {}
            },
            "F_OPERATION_DOCTOR": {
                "displayValue": "test",
                "extends": {}
            },
            "F_LOAN_TYPE": {
                "displayValue": "手术借出",
                "extends": {}
            },
            "F_ORDER_NO": {
                "displayValue": "自动生成无需填写",
                "extends": {}
            },
            "F_TERMS_PAYMENT": {
                "displayValue": "",
                "extends": {}
            },
            "F_RETURNIN_ENTREPOT_CODE": {
                "displayValue": "",
                "extends": {}
            }
        },
        'oldFormData': '',
        'oldFormDataExtend': '',
        'gridData': {
            "56a7292d-5c67-4ea1-829e-152cafe50381": {
                "boDefName": "BO_EU_SURGERY_IOR_DETAIL",
                "boDefId": bo_def_id,
                "oldData": [],
                "oldDataExtend": {},
                "items": [
                    {
                        "F_PACKAGE_NUM": "",
                        "F_IS_MBA": "N",
                        "F_APPLY_NUM": "52",
                        "F_BUSINESS_CODE": "",
                        "F_STE_NUM": "",
                        "F_LOAN_ENTREPOT_CODE": "",
                        "F_LOSE_DATE": "",
                        "F_OPERATION_KIND": "",
                        "F_PHONE": "",
                        "F_PRO_TXT": "",
                        "F_PRO_NUM": "",
                        "F_PRO_REMARK": "",
                        "F_MANVENDER_CODE": "7127515",
                        "F_IS_IMPORT": "0",
                        "F_PRODUCR_DATE": "",
                        "F_UNIT_COST": "",
                        "F_OPERATION_DATE": "",
                        "ID": "3aae3ee4-19ac-4696-a4af-54a4c302ed75",
                        "F_UN_DISTRI_QTY": "52",
                        "F_BORROW_ENTREPOT_NAME": "",
                        "F_SUCCESSION": "",
                        "F_PUR_ENT_COA": "",
                        "ORGID": "f59d724b-8991-4c87-9e91-45a280b6f677",
                        "F_RETURNIN_ENTREPOT_NAME": "",
                        "F_OVERSEAS_MAN_NAME": "",
                        "F_ENTRUSTED_LICENCE": "",
                        "F_CST_ENQUIRY_NO": "",
                        "F_QIPU": "52",
                        "CREATEDATE": "2023-01-11 14:51:57",
                        "F_UDI": "",
                        "F_BUSINESS_NAME": "",
                        "F_TOTAL_COST": "",
                        "F_COMMODITY_CODE": "10174665",
                        "F_SERIAL_MANGE_FLAG": "N",
                        "F_PRO_LICENCE": "",
                        "F_TAX_RATE": "",
                        "F_TOTAL_CX": "",
                        "F_LOAN_TYPE_DISPLAYVALUE": "",
                        "F_COMPANY_CODE": "",
                        "F_BORROW_ENTREPOT_CODE": "",
                        "F_REG_CER": "",
                        "UPDATEDATE": "2023-01-11 14:52:00",
                        "F_MANVENDER_NAME": "",
                        "F_AREA_CODE": "",
                        "F_SALES_VOLUMES": "52",
                        "F_PUR_PROJECT_CODE": "",
                        "F_SALEUNIT_TXT": "个",
                        "UPDATEUSER": "qizhenjun",
                        "F_STE_DATE": "",
                        "F_FACMAT_CODE": "",
                        "F_SUPPLIER_CODE": "",
                        "F_ENTRUSTED_NAME": "",
                        "F_COMMODITY_NAME": "通风管---蒋林玲",
                        "F_REFERENCE": "",
                        "F_SALESMAN_NAME": "",
                        "F_CONTACT": "",
                        "BINDID": process_inst_id,
                        "F_DISTRIBUTE_CUST_NO": "",
                        "CREATEUSER": "qizhenjun",
                        "F_DISTRIBUTE_CUST_NAME": "",
                        "F_CARGO_NAME": "",
                        "F_QW8KJ0WR": "",
                        "F_STE_VALID_PERIOD": "",
                        "F_SUPPLIER_REMARK": "",
                        "F_SPECIFICATION": "1016011",
                        "F_PUR_PROJECT_DESC": "",
                        "F_TAX_RATE_AREA": "",
                        "F_LOCATION": "",
                        "F_EPARTMENE_DESC": "",
                        "F_ENTRUSTED_CODE": "",
                        "F_SALESMAN_CODE": "",
                        "F_MAINUNIT_CODE": "EA",
                        "F_AREA_NAME": "",
                        "F_COMPANY_NAME": "",
                        "F_LOAN_ENTREPOT_NAME": "",
                        "F_OPERATION_TYPE": "",
                        "F_SALEUNIT_CODE": "EA",
                        "F_CUST_NAME": "",
                        "F_CUST_CODE": "",
                        "F_MAINUNIT_TXT": "",
                        "F_EPARTMENE": "",
                        "F_STORE_COND": "999",
                        "F_OPERATION_DOCTOR": "",
                        "F_SUPPLIER_NAME": "",
                        "F_LOAN_TYPE": "",
                        "F_LINE_NUM": "1",
                        "F_BATCH_NO": "",
                        "F_TERMS_PAYMENT": "",
                        "F_ORDER_NO": "",
                        "F_RETURNIN_ENTREPOT_CODE": "",
                        "ISEND": False,
                        "F_LINE_TYPE": "",
                        "F_ENTRUST_INS": "",
                        "F_DTL_STATUS": "100",
                        "FORM_EDITGRID_DATA_ATTR_COLUMN": {
                            "isCreate": False,
                            "readonly": False,
                            "isDetail": "false",
                            "remove": True
                        },
                        "PROCESSDEFID": "obj_4fc09a3dd5bf430c80f29f75e1d8f793"
                    },
                    {
                        "F_PACKAGE_NUM": "",
                        "F_IS_MBA": "N",
                        "F_APPLY_NUM": "52",
                        "F_BUSINESS_CODE": "",
                        "F_STE_NUM": "",
                        "F_LOAN_ENTREPOT_CODE": "",
                        "F_LOSE_DATE": "",
                        "F_OPERATION_KIND": "",
                        "F_PHONE": "",
                        "F_PRO_TXT": "",
                        "F_PRO_NUM": "",
                        "F_PRO_REMARK": "",
                        "F_MANVENDER_CODE": "7024263",
                        "F_IS_IMPORT": "0",
                        "F_PRODUCR_DATE": "",
                        "F_UNIT_COST": "",
                        "F_OPERATION_DATE": "",
                        "ID": "ab331446-c3aa-4bd0-8c9f-2c8070290ce9",
                        "F_UN_DISTRI_QTY": "52",
                        "F_BORROW_ENTREPOT_NAME": "",
                        "F_SUCCESSION": "",
                        "F_PUR_ENT_COA": "",
                        "ORGID": "f59d724b-8991-4c87-9e91-45a280b6f677",
                        "F_RETURNIN_ENTREPOT_NAME": "",
                        "F_OVERSEAS_MAN_NAME": "",
                        "F_ENTRUSTED_LICENCE": "",
                        "F_CST_ENQUIRY_NO": "",
                        "F_QIPU": "52",
                        "CREATEDATE": "2023-01-11 14:51:58",
                        "F_UDI": "",
                        "F_BUSINESS_NAME": "",
                        "F_TOTAL_COST": "",
                        "F_COMMODITY_CODE": "10154871",
                        "F_SERIAL_MANGE_FLAG": "N",
                        "F_PRO_LICENCE": "",
                        "F_TAX_RATE": "",
                        "F_TOTAL_CX": "",
                        "F_LOAN_TYPE_DISPLAYVALUE": "",
                        "F_COMPANY_CODE": "",
                        "F_BORROW_ENTREPOT_CODE": "",
                        "F_REG_CER": "",
                        "UPDATEDATE": "2023-01-11 14:52:00",
                        "F_MANVENDER_NAME": "",
                        "F_AREA_CODE": "",
                        "F_SALES_VOLUMES": "52",
                        "F_PUR_PROJECT_CODE": "",
                        "F_SALEUNIT_TXT": "个",
                        "UPDATEUSER": "qizhenjun",
                        "F_STE_DATE": "",
                        "F_FACMAT_CODE": "1011",
                        "F_SUPPLIER_CODE": "",
                        "F_ENTRUSTED_NAME": "",
                        "F_COMMODITY_NAME": "旋转铰链膝关节系统组件",
                        "F_REFERENCE": "",
                        "F_SALESMAN_NAME": "",
                        "F_CONTACT": "",
                        "BINDID": process_inst_id,
                        "F_DISTRIBUTE_CUST_NO": "",
                        "CREATEUSER": "qizhenjun",
                        "F_DISTRIBUTE_CUST_NAME": "",
                        "F_CARGO_NAME": "",
                        "F_QW8KJ0WR": "",
                        "F_STE_VALID_PERIOD": "",
                        "F_SUPPLIER_REMARK": "",
                        "F_SPECIFICATION": "623401L",
                        "F_PUR_PROJECT_DESC": "",
                        "F_TAX_RATE_AREA": "",
                        "F_LOCATION": "",
                        "F_EPARTMENE_DESC": "",
                        "F_ENTRUSTED_CODE": "",
                        "F_SALESMAN_CODE": "",
                        "F_MAINUNIT_CODE": "EA",
                        "F_AREA_NAME": "",
                        "F_COMPANY_NAME": "",
                        "F_LOAN_ENTREPOT_NAME": "",
                        "F_OPERATION_TYPE": "",
                        "F_SALEUNIT_CODE": "EA",
                        "F_CUST_NAME": "",
                        "F_CUST_CODE": "",
                        "F_MAINUNIT_TXT": "",
                        "F_EPARTMENE": "",
                        "F_STORE_COND": "999",
                        "F_OPERATION_DOCTOR": "",
                        "F_SUPPLIER_NAME": "",
                        "F_LOAN_TYPE": "",
                        "F_LINE_NUM": "2",
                        "F_BATCH_NO": "",
                        "F_TERMS_PAYMENT": "",
                        "F_ORDER_NO": "",
                        "F_RETURNIN_ENTREPOT_CODE": "",
                        "ISEND": False,
                        "F_LINE_TYPE": "",
                        "F_ENTRUST_INS": "",
                        "F_DTL_STATUS": "100",
                        "FORM_EDITGRID_DATA_ATTR_COLUMN": {
                            "isCreate": False,
                            "readonly": False,
                            "isDetail": "false",
                            "remove": True
                        },
                        "PROCESSDEFID": "obj_4fc09a3dd5bf430c80f29f75e1d8f793"
                    }
                ],
                "itemsExtend": {
                    "ab331446-c3aa-4bd0-8c9f-2c8070290ce9": {
                        "F_PACKAGE_NUM": {
                            "displayValue": "",
                            "extends": {}
                        },
                        "F_IS_MBA": {
                            "displayValue": "N",
                            "extends": {}
                        },
                        "F_APPLY_NUM": {
                            "displayValue": "52",
                            "extends": {}
                        },
                        "F_BUSINESS_CODE": {
                            "displayValue": "",
                            "extends": {}
                        },
                        "F_STE_NUM": {
                            "displayValue": "",
                            "extends": {}
                        },
                        "F_LOAN_ENTREPOT_CODE": {
                            "displayValue": "",
                            "extends": {}
                        },
                        "F_LOSE_DATE": {
                            "displayValue": "",
                            "extends": {}
                        },
                        "F_OPERATION_KIND": {
                            "displayValue": "",
                            "extends": {}
                        },
                        "F_PHONE": {
                            "displayValue": "",
                            "extends": {}
                        },
                        "F_PRO_TXT": {
                            "displayValue": "",
                            "extends": {}
                        },
                        "F_PRO_NUM": {
                            "displayValue": "",
                            "extends": {}
                        },
                        "F_PRO_REMARK": {
                            "displayValue": "",
                            "extends": {}
                        },
                        "F_MANVENDER_CODE": {
                            "displayValue": "7024263",
                            "extends": {}
                        },
                        "F_IS_IMPORT": {
                            "displayValue": "0",
                            "extends": {}
                        },
                        "F_PRODUCR_DATE": {
                            "displayValue": "",
                            "extends": {}
                        },
                        "F_UNIT_COST": {
                            "displayValue": "",
                            "extends": {}
                        },
                        "F_OPERATION_DATE": {
                            "displayValue": "",
                            "extends": {}
                        },
                        "F_UN_DISTRI_QTY": {
                            "displayValue": "52",
                            "extends": {}
                        },
                        "F_BORROW_ENTREPOT_NAME": {
                            "displayValue": "",
                            "extends": {}
                        },
                        "F_SUCCESSION": {
                            "displayValue": "",
                            "extends": {}
                        },
                        "F_PUR_ENT_COA": {
                            "displayValue": "",
                            "extends": {}
                        },
                        "F_RETURNIN_ENTREPOT_NAME": {
                            "displayValue": "",
                            "extends": {}
                        },
                        "F_OVERSEAS_MAN_NAME": {
                            "displayValue": "",
                            "extends": {}
                        },
                        "F_ENTRUSTED_LICENCE": {
                            "displayValue": "",
                            "extends": {}
                        },
                        "F_CST_ENQUIRY_NO": {
                            "displayValue": "",
                            "extends": {}
                        },
                        "F_QIPU": {
                            "displayValue": "52",
                            "extends": {}
                        },
                        "F_UDI": {
                            "displayValue": "",
                            "extends": {}
                        },
                        "F_BUSINESS_NAME": {
                            "displayValue": "",
                            "extends": {}
                        },
                        "F_TOTAL_COST": {
                            "displayValue": "",
                            "extends": {}
                        },
                        "F_COMMODITY_CODE": {
                            "displayValue": "10154871",
                            "extends": {}
                        },
                        "F_SERIAL_MANGE_FLAG": {
                            "displayValue": "N",
                            "extends": {}
                        },
                        "F_PRO_LICENCE": {
                            "displayValue": "",
                            "extends": {}
                        },
                        "F_TAX_RATE": {
                            "displayValue": "",
                            "extends": {}
                        },
                        "F_TOTAL_CX": {
                            "displayValue": "",
                            "extends": {}
                        },
                        "F_COMPANY_CODE": {
                            "displayValue": "",
                            "extends": {}
                        },
                        "F_BORROW_ENTREPOT_CODE": {
                            "displayValue": "",
                            "extends": {}
                        },
                        "F_REG_CER": {
                            "displayValue": "",
                            "extends": {}
                        },
                        "F_MANVENDER_NAME": {
                            "displayValue": "",
                            "extends": {}
                        },
                        "F_AREA_CODE": {
                            "displayValue": "",
                            "extends": {}
                        },
                        "F_SALES_VOLUMES": {
                            "displayValue": "52",
                            "extends": {}
                        },
                        "F_PUR_PROJECT_CODE": {
                            "displayValue": "",
                            "extends": {}
                        },
                        "F_SALEUNIT_TXT": {
                            "displayValue": "个",
                            "extends": {}
                        },
                        "F_STE_DATE": {
                            "displayValue": "",
                            "extends": {}
                        },
                        "F_FACMAT_CODE": {
                            "displayValue": "1011",
                            "extends": {}
                        },
                        "F_SUPPLIER_CODE": {
                            "displayValue": "",
                            "extends": {}
                        },
                        "F_ENTRUSTED_NAME": {
                            "displayValue": "",
                            "extends": {}
                        },
                        "F_COMMODITY_NAME": {
                            "displayValue": "旋转铰链膝关节系统组件",
                            "extends": {}
                        },
                        "F_REFERENCE": {
                            "displayValue": "",
                            "extends": {}
                        },
                        "F_SALESMAN_NAME": {
                            "displayValue": "",
                            "extends": {}
                        },
                        "F_CONTACT": {
                            "displayValue": "",
                            "extends": {}
                        },
                        "F_DISTRIBUTE_CUST_NO": {
                            "displayValue": "",
                            "extends": {}
                        },
                        "F_DISTRIBUTE_CUST_NAME": {
                            "displayValue": "",
                            "extends": {}
                        },
                        "F_CARGO_NAME": {
                            "displayValue": "",
                            "extends": {}
                        },
                        "F_QW8KJ0WR": {
                            "displayValue": "",
                            "extends": {}
                        },
                        "F_STE_VALID_PERIOD": {
                            "displayValue": "",
                            "extends": {}
                        },
                        "F_SUPPLIER_REMARK": {
                            "displayValue": "",
                            "extends": {}
                        },
                        "F_SPECIFICATION": {
                            "displayValue": "623401L",
                            "extends": {}
                        },
                        "F_PUR_PROJECT_DESC": {
                            "displayValue": "",
                            "extends": {}
                        },
                        "F_TAX_RATE_AREA": {
                            "displayValue": "",
                            "extends": {}
                        },
                        "F_LOCATION": {
                            "displayValue": "",
                            "extends": {}
                        },
                        "F_EPARTMENE_DESC": {
                            "displayValue": "",
                            "extends": {}
                        },
                        "F_ENTRUSTED_CODE": {
                            "displayValue": "",
                            "extends": {}
                        },
                        "F_SALESMAN_CODE": {
                            "displayValue": "",
                            "extends": {}
                        },
                        "F_MAINUNIT_CODE": {
                            "displayValue": "EA",
                            "extends": {}
                        },
                        "F_AREA_NAME": {
                            "displayValue": "",
                            "extends": {}
                        },
                        "F_COMPANY_NAME": {
                            "displayValue": "",
                            "extends": {}
                        },
                        "F_LOAN_ENTREPOT_NAME": {
                            "displayValue": "",
                            "extends": {}
                        },
                        "F_OPERATION_TYPE": {
                            "displayValue": "",
                            "extends": {}
                        },
                        "F_SALEUNIT_CODE": {
                            "displayValue": "EA",
                            "extends": {}
                        },
                        "F_CUST_NAME": {
                            "displayValue": "",
                            "extends": {}
                        },
                        "F_CUST_CODE": {
                            "displayValue": "",
                            "extends": {}
                        },
                        "F_MAINUNIT_TXT": {
                            "displayValue": "",
                            "extends": {}
                        },
                        "F_EPARTMENE": {
                            "displayValue": "",
                            "extends": {}
                        },
                        "F_STORE_COND": {
                            "displayValue": "999",
                            "extends": {}
                        },
                        "F_OPERATION_DOCTOR": {
                            "displayValue": "",
                            "extends": {}
                        },
                        "F_SUPPLIER_NAME": {
                            "displayValue": "",
                            "extends": {}
                        },
                        "F_LOAN_TYPE": {
                            "displayValue": "",
                            "extends": {}
                        },
                        "F_LINE_NUM": {
                            "displayValue": "2",
                            "extends": {}
                        },
                        "F_BATCH_NO": {
                            "displayValue": "",
                            "extends": {}
                        },
                        "F_TERMS_PAYMENT": {
                            "displayValue": "",
                            "extends": {}
                        },
                        "F_ORDER_NO": {
                            "displayValue": "",
                            "extends": {}
                        },
                        "F_RETURNIN_ENTREPOT_CODE": {
                            "displayValue": "",
                            "extends": {}
                        },
                        "F_LINE_TYPE": {
                            "displayValue": "",
                            "extends": {}
                        },
                        "F_ENTRUST_INS": {
                            "displayValue": "",
                            "extends": {}
                        },
                        "F_DTL_STATUS": {
                            "displayValue": "100",
                            "extends": {}
                        }
                    },
                    "3aae3ee4-19ac-4696-a4af-54a4c302ed75": {
                        "F_PACKAGE_NUM": {
                            "displayValue": "",
                            "extends": {}
                        },
                        "F_IS_MBA": {
                            "displayValue": "N",
                            "extends": {}
                        },
                        "F_APPLY_NUM": {
                            "displayValue": "52",
                            "extends": {}
                        },
                        "F_BUSINESS_CODE": {
                            "displayValue": "",
                            "extends": {}
                        },
                        "F_STE_NUM": {
                            "displayValue": "",
                            "extends": {}
                        },
                        "F_LOAN_ENTREPOT_CODE": {
                            "displayValue": "",
                            "extends": {}
                        },
                        "F_LOSE_DATE": {
                            "displayValue": "",
                            "extends": {}
                        },
                        "F_OPERATION_KIND": {
                            "displayValue": "",
                            "extends": {}
                        },
                        "F_PHONE": {
                            "displayValue": "",
                            "extends": {}
                        },
                        "F_PRO_TXT": {
                            "displayValue": "",
                            "extends": {}
                        },
                        "F_PRO_NUM": {
                            "displayValue": "",
                            "extends": {}
                        },
                        "F_PRO_REMARK": {
                            "displayValue": "",
                            "extends": {}
                        },
                        "F_MANVENDER_CODE": {
                            "displayValue": "7127515",
                            "extends": {}
                        },
                        "F_IS_IMPORT": {
                            "displayValue": "0",
                            "extends": {}
                        },
                        "F_PRODUCR_DATE": {
                            "displayValue": "",
                            "extends": {}
                        },
                        "F_UNIT_COST": {
                            "displayValue": "",
                            "extends": {}
                        },
                        "F_OPERATION_DATE": {
                            "displayValue": "",
                            "extends": {}
                        },
                        "F_UN_DISTRI_QTY": {
                            "displayValue": "52",
                            "extends": {}
                        },
                        "F_BORROW_ENTREPOT_NAME": {
                            "displayValue": "",
                            "extends": {}
                        },
                        "F_SUCCESSION": {
                            "displayValue": "",
                            "extends": {}
                        },
                        "F_PUR_ENT_COA": {
                            "displayValue": "",
                            "extends": {}
                        },
                        "F_RETURNIN_ENTREPOT_NAME": {
                            "displayValue": "",
                            "extends": {}
                        },
                        "F_OVERSEAS_MAN_NAME": {
                            "displayValue": "",
                            "extends": {}
                        },
                        "F_ENTRUSTED_LICENCE": {
                            "displayValue": "",
                            "extends": {}
                        },
                        "F_CST_ENQUIRY_NO": {
                            "displayValue": "",
                            "extends": {}
                        },
                        "F_QIPU": {
                            "displayValue": "52",
                            "extends": {}
                        },
                        "F_UDI": {
                            "displayValue": "",
                            "extends": {}
                        },
                        "F_BUSINESS_NAME": {
                            "displayValue": "",
                            "extends": {}
                        },
                        "F_TOTAL_COST": {
                            "displayValue": "",
                            "extends": {}
                        },
                        "F_COMMODITY_CODE": {
                            "displayValue": "10174665",
                            "extends": {}
                        },
                        "F_SERIAL_MANGE_FLAG": {
                            "displayValue": "N",
                            "extends": {}
                        },
                        "F_PRO_LICENCE": {
                            "displayValue": "",
                            "extends": {}
                        },
                        "F_TAX_RATE": {
                            "displayValue": "",
                            "extends": {}
                        },
                        "F_TOTAL_CX": {
                            "displayValue": "",
                            "extends": {}
                        },
                        "F_COMPANY_CODE": {
                            "displayValue": "",
                            "extends": {}
                        },
                        "F_BORROW_ENTREPOT_CODE": {
                            "displayValue": "",
                            "extends": {}
                        },
                        "F_REG_CER": {
                            "displayValue": "",
                            "extends": {}
                        },
                        "F_MANVENDER_NAME": {
                            "displayValue": "",
                            "extends": {}
                        },
                        "F_AREA_CODE": {
                            "displayValue": "",
                            "extends": {}
                        },
                        "F_SALES_VOLUMES": {
                            "displayValue": "52",
                            "extends": {}
                        },
                        "F_PUR_PROJECT_CODE": {
                            "displayValue": "",
                            "extends": {}
                        },
                        "F_SALEUNIT_TXT": {
                            "displayValue": "个",
                            "extends": {}
                        },
                        "F_STE_DATE": {
                            "displayValue": "",
                            "extends": {}
                        },
                        "F_FACMAT_CODE": {
                            "displayValue": "",
                            "extends": {}
                        },
                        "F_SUPPLIER_CODE": {
                            "displayValue": "",
                            "extends": {}
                        },
                        "F_ENTRUSTED_NAME": {
                            "displayValue": "",
                            "extends": {}
                        },
                        "F_COMMODITY_NAME": {
                            "displayValue": "通风管---蒋林玲",
                            "extends": {}
                        },
                        "F_REFERENCE": {
                            "displayValue": "",
                            "extends": {}
                        },
                        "F_SALESMAN_NAME": {
                            "displayValue": "",
                            "extends": {}
                        },
                        "F_CONTACT": {
                            "displayValue": "",
                            "extends": {}
                        },
                        "F_DISTRIBUTE_CUST_NO": {
                            "displayValue": "",
                            "extends": {}
                        },
                        "F_DISTRIBUTE_CUST_NAME": {
                            "displayValue": "",
                            "extends": {}
                        },
                        "F_CARGO_NAME": {
                            "displayValue": "",
                            "extends": {}
                        },
                        "F_QW8KJ0WR": {
                            "displayValue": "",
                            "extends": {}
                        },
                        "F_STE_VALID_PERIOD": {
                            "displayValue": "",
                            "extends": {}
                        },
                        "F_SUPPLIER_REMARK": {
                            "displayValue": "",
                            "extends": {}
                        },
                        "F_SPECIFICATION": {
                            "displayValue": "1016011",
                            "extends": {}
                        },
                        "F_PUR_PROJECT_DESC": {
                            "displayValue": "",
                            "extends": {}
                        },
                        "F_TAX_RATE_AREA": {
                            "displayValue": "",
                            "extends": {}
                        },
                        "F_LOCATION": {
                            "displayValue": "",
                            "extends": {}
                        },
                        "F_EPARTMENE_DESC": {
                            "displayValue": "",
                            "extends": {}
                        },
                        "F_ENTRUSTED_CODE": {
                            "displayValue": "",
                            "extends": {}
                        },
                        "F_SALESMAN_CODE": {
                            "displayValue": "",
                            "extends": {}
                        },
                        "F_MAINUNIT_CODE": {
                            "displayValue": "EA",
                            "extends": {}
                        },
                        "F_AREA_NAME": {
                            "displayValue": "",
                            "extends": {}
                        },
                        "F_COMPANY_NAME": {
                            "displayValue": "",
                            "extends": {}
                        },
                        "F_LOAN_ENTREPOT_NAME": {
                            "displayValue": "",
                            "extends": {}
                        },
                        "F_OPERATION_TYPE": {
                            "displayValue": "",
                            "extends": {}
                        },
                        "F_SALEUNIT_CODE": {
                            "displayValue": "EA",
                            "extends": {}
                        },
                        "F_CUST_NAME": {
                            "displayValue": "",
                            "extends": {}
                        },
                        "F_CUST_CODE": {
                            "displayValue": "",
                            "extends": {}
                        },
                        "F_MAINUNIT_TXT": {
                            "displayValue": "",
                            "extends": {}
                        },
                        "F_EPARTMENE": {
                            "displayValue": "",
                            "extends": {}
                        },
                        "F_STORE_COND": {
                            "displayValue": "999",
                            "extends": {}
                        },
                        "F_OPERATION_DOCTOR": {
                            "displayValue": "",
                            "extends": {}
                        },
                        "F_SUPPLIER_NAME": {
                            "displayValue": "",
                            "extends": {}
                        },
                        "F_LOAN_TYPE": {
                            "displayValue": "",
                            "extends": {}
                        },
                        "F_LINE_NUM": {
                            "displayValue": "1",
                            "extends": {}
                        },
                        "F_BATCH_NO": {
                            "displayValue": "",
                            "extends": {}
                        },
                        "F_TERMS_PAYMENT": {
                            "displayValue": "",
                            "extends": {}
                        },
                        "F_ORDER_NO": {
                            "displayValue": "",
                            "extends": {}
                        },
                        "F_RETURNIN_ENTREPOT_CODE": {
                            "displayValue": "",
                            "extends": {}
                        },
                        "F_LINE_TYPE": {
                            "displayValue": "",
                            "extends": {}
                        },
                        "F_ENTRUST_INS": {
                            "displayValue": "",
                            "extends": {}
                        },
                        "F_DTL_STATUS": {
                            "displayValue": "100",
                            "extends": {}
                        }
                    }
                }
            }
        },
        'boId': bo_id,
        'boDefId': bo_def_id,
        'isCreate': True,
        'commentInfo': {
            "msg": "",
            "isSelected": True,
            "isValidateForm": True,
            "commentOption": "提交",
            "commentId": c_id,
            "isCommentCreate": True,
            "hasFiles": False,
            "setComments": False,
            "processDefId": "obj_4fc09a3dd5bf430c80f29f75e1d8f793"
        },
        'isTransact': True,
        'isValidateForm': True,
        'currentPage': '1',
        'sid': s_id
    }
    response = gk_request(body)


if __name__ == '__main__':
    sid = get_session()
    # print(tu.get_timezone())
    # pId, tId = get_process_task_id(sid)
    # boId, boDefId, commentId = get_bo_def_id(sid, pId, tId)
    # ssqld(sid, pId, tId, boId, boDefId, commentId)


