菜单

保存

基本信息

  • 用途说明:项目计划任务保存(wg_activity)
  • 请求方式:POST
  • 请求地址:https://api.kingdee.com/weigusoft/wg_cost/saveBill?access_token=&authority_info=

请求参数

headers参数

  • 所有的接口必须携带header参数
参数名称 参数示例 是否必填 参数说明
Content-Type application/json true 固定传:application/json
groupName ns-v7g6 true 分组名称,获取授权信息时返回的groupName
accountId 16xxxxxxxxxxxx true 账套ID,获取授权信息时返回的accountId
X-GW-Router-Addr https://tf.jdy.com true IDC域名,获取授权信息时返回的domain

params参数

参数名称 参数类型 是否必填 参数说明
access_token string true 金蝶云通行证token
authority_info string true 见文档authority_info参数说明

body参数

参数名称 必选 类型 说明
entityName true String 单据标识:wg_inv_crm_contact
data true Object 其他参数

data的数据结构:

参数 必选 字段类型 字段说明
id true String 单据id,修改时必填,新增不传该字段
wg_theme true String 任务主题
wg_plan_start_time true String 计划开始时间
wg_plan_completion_time true String 计划完成时间
hwg_project_id true String 所属项目id
projectstatus_id true String 项目阶段id
hwg_client_id true String 客户id
hwg_type_id true String 任务类型id
constrainttype true String 限制类型,'0': '越早越好',
        '1': '越晚越好',
        '2': '必须开始于',
        '3': '必须完成于',
        '4': '不得早于...开始',
        '5': '不得晚于...开始',
        '6': '不得早于...完成',
        '7': '不得晚于...完成',
afterexecuteprojectstatus_id true String 执行后项目阶段id
afterfinishprojectstatus_id true String 完成后项目阶段id
hwg_executor true String 执行人 传参示例:[{
             fbasedataid_id:id,//职员id
                name: name//职员名称
            }]
hwg_importance_id false String 重要性id
hwg_prepose_id false String 前置任务id
hwg_contacts_id false String 联系人id
wg_supplierid_id false String 供应商id
wg_afterexecution false String 执行后项目进度(%)
wg_aftercompletion false String 完成后项目进度(%)
milestone false Boolean 标记为里程碑
constraintdate false String 限制日期
tasktype false String 活动类型,0:固定单位,1:固定工期,2:固定工时
hwg_assignor_id false String 指派人id
wg_duration_days false String 计划工时
wg_describe false String 任务描述
wg_bill_type true String 单据类型,默认2,//1:CRM计划,2:项目计划,3:供应商
wg_source_type true String 源单类型,默认wg_project_files
wg_source_billid true String 源单id,项目档案id
wg_source_no true String 源单编号
durationformat true String 时间格式单位,默认:‘39’
wg_time_unit true String 时间单位 天,默认:0
outlinenumber true String 层级位置
outlinelevel true String 层级
ishavebasedata true String 默认:true,有多选基础资料时该字段必传

wg_allocationsentry

true Array 协作团队

wg_allocationsentry协作团队参数

参数名称 类型 字段说明
wg_collaborate_newtype String 协作类型
wg_cooperate_staff String 员工
wg_cooperate_dept String 部门
wg_cooperate_view Boolean 查看
wg_cooperate_edit Boolean 修改
wg_cooperate_del Boolean 删除
wg_cooperate_allocation Boolean 协作分配
wg_cooperate_assign Boolean 指派
wg_cooperate_stop Boolean 终止
report Boolean 汇报
follow Boolean 跟进
rework Boolean 返工
assign_remark String 备注
assign_allocuser String 分配人
assign_alloctime String 分配时间

请求示例

{
    "entityName": "wg_activity",
    "data": {
        "wg_bill_type": "2",
        "wg_source_type": "wg_project_files",
        "wg_source_billid": "2463968533374172160",
        "wg_source_no": "20260423",
        "durationformat": "39",
        "wg_time_unit": "0",
        "outlinenumber": "10",
        "outlinelevel": "1",
        "wg_allocationsentry": [
            {
                "wg_cooperate_staff_id": "1394084520470297600",
                "wg_cooperate_dept_id": "1358532443941896192",
                "wg_cooperate_view": true,
                "wg_cooperate_edit": true,
                "wg_cooperate_del": true,
                "wg_cooperate_allocation": true,
                "wg_cooperate_assign": true,
                "wg_cooperate_stop": true,
                "report": true,
                "follow": true,
                "rework": false,
                "assign_allocuser_id": "10102023",
                "assign_alloctime": "2026-05-07 17:24:30"
            },
            {
                "wg_cooperate_staff_id": "2143518979384175616",
                "wg_cooperate_dept_id": "1358532443941896192",
                "wg_cooperate_view": true,
                "wg_cooperate_edit": true,
                "wg_cooperate_del": true,
                "wg_cooperate_allocation": true,
                "wg_cooperate_assign": true,
                "wg_cooperate_stop": true,
                "report": true,
                "follow": true,
                "rework": false,
                "assign_allocuser_id": "10102023",
                "assign_alloctime": "2026-05-07 17:24:30"
            }
        ],
        "hwg_executor": [
            {
                "fbasedataid_id": "1394084520470297600",
                "name": "董素敏"
            },
            {
                "fbasedataid_id": "2143518979384175616",
                "name": "庄涵钰ZY"
            }
        ],
        "hwg_assignor_name": "董素敏",
        "hwg_assignor_id": "1394084520470297600",
        "wg_plan_start_time": "2026-05-07 17:23:30",
        "wg_plan_completion_time": "2026-05-08 00:23:30",
        "wg_duration_days": 8,
        "attachmentFiles": [
            {
                "url": "https://tf-ek.jdy.com/ierp/tempfile/download.do?configKey=redis.serversForCache.tempfile&id=tempfile-c677bb3f-c4d4-4101-a379-b30aeb481512",
                "name": "-FL14000001.png",
                "size": 9125
            }
        ],
        "hwg_project_name": "20260423",
        "hwg_project_id": "2463968533374172160",
        "hwg_project_number": "20260423",
        "protype_id": "2326821115579609088",
        "hwg_client_name": "0629为谷",
        "hwg_client_id": "1453663851282230272",
        "hwg_client_number": "06291222111",
        "wg_theme": "测试0507",
        "projectstatus_name": "旋地",
        "projectstatus_id": "1717451855249810432",
        "hwg_type_id": "1434159342399049728",
        "hwg_type_name": "任务",
        "constrainttype": "0",
        "constrainttype_name": "越早越好",
        "afterexecuteprojectstatus_name": "旋地",
        "afterexecuteprojectstatus_id": "1717451855249810432",
        "afterfinishprojectstatus_name": "施肥",
        "afterfinishprojectstatus_id": "1717452116202627072",
        "hwg_importance_id": "1434154845970908160",
        "hwg_importance_name": "一般",
        "hwg_prepose_wg_theme": "7",
        "hwg_prepose_id": "2466894225183128579",
        "hwg_contacts_id": "2271996860233172992",
        "hwg_contacts_contactperson": "0801测试联系人",
        "wg_supplierid_name": "海关",
        "wg_supplierid_id": "1594919397091191808",
        "wg_afterexecution": "5",
        "wg_aftercompletion": "10",
        "milestone": true,
        "constraintdate": "2026-05-28",
        "tasktype": "0",
        "tasktype_name": "固定单位",
        "wg_describe": "测试描述",
        "ishavebasedata": "true"
    }
}

响应示例

{
    "data": {
        "id": "2474185300587315200"
    },
    "errorCode": "success",
    "status": true,
    "success": true
}

curl:

curl "https://api.kingdee.com/weigusoft/wg_cost/saveBill?access_token=17780313868a755b61cb6b58fd2e75b0&authority_info=PPMOYUNrasfUyf2HTKMHQB747hB0MxLgZ0GYOvDLI93nzn9PNNOL26kBARL3FAib" ^
  -H "Accept: */*" ^
  -H "Accept-Language: zh-CN,zh;q=0.9" ^
  -H "Appuserid: 10102023" ^
  -H "Connection: keep-alive" ^
  -H "Content-Type: application/json;charset=UTF-8" ^
  -H "Origin: http://localhost:5173" ^
  -H "Referer: http://localhost:5173/" ^
  -H "Sec-Fetch-Dest: empty" ^
  -H "Sec-Fetch-Mode: cors" ^
  -H "Sec-Fetch-Site: cross-site" ^
  -H "User-Agent: Mozilla/5.0 (iPhone; CPU iPhone OS 16_6 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/16.6 Mobile/15E148 Safari/604.1" ^
  -H "X-GW-Router-Addr: https://tf-ek.jdy.com" ^
  -H "access_token: 17780313868a755b61cb6b58fd2e75b0" ^
  -H "accountId: 1675743896569628608" ^
  -H "groupName: ns-isv5" ^
  --data-raw ^"^{^\^"entityName^\^":^\^"wg_activity^\^",^\^"data^\^":^{^\^"wg_bill_type^\^":^\^"2^\^",^\^"wg_source_type^\^":^\^"wg_project_files^\^",^\^"wg_source_billid^\^":^\^"2463968533374172160^\^",^\^"wg_source_no^\^":^\^"20260423^\^",^\^"durationformat^\^":^\^"39^\^",^\^"wg_time_unit^\^":^\^"0^\^",^\^"outlinenumber^\^":^\^"10^\^",^\^"outlinelevel^\^":^\^"1^\^",^\^"wg_allocationsentry^\^":^[^{^\^"wg_cooperate_staff_id^\^":^\^"1394084520470297600^\^",^\^"wg_cooperate_dept_id^\^":^\^"1358532443941896192^\^",^\^"wg_cooperate_view^\^":true,^\^"wg_cooperate_edit^\^":true,^\^"wg_cooperate_del^\^":true,^\^"wg_cooperate_allocation^\^":true,^\^"wg_cooperate_assign^\^":true,^\^"wg_cooperate_stop^\^":true,^\^"report^\^":true,^\^"follow^\^":true,^\^"rework^\^":false,^\^"assign_allocuser_id^\^":^\^"10102023^\^",^\^"assign_alloctime^\^":^\^"2026-05-07 17:24:30^\^"^},^{^\^"wg_cooperate_staff_id^\^":^\^"2143518979384175616^\^",^\^"wg_cooperate_dept_id^\^":^\^"1358532443941896192^\^",^\^"wg_cooperate_view^\^":true,^\^"wg_cooperate_edit^\^":true,^\^"wg_cooperate_del^\^":true,^\^"wg_cooperate_allocation^\^":true,^\^"wg_cooperate_assign^\^":true,^\^"wg_cooperate_stop^\^":true,^\^"report^\^":true,^\^"follow^\^":true,^\^"rework^\^":false,^\^"assign_allocuser_id^\^":^\^"10102023^\^",^\^"assign_alloctime^\^":^\^"2026-05-07 17:24:30^\^"^}^],^\^"hwg_executor^\^":^[^{^\^"fbasedataid_id^\^":^\^"1394084520470297600^\^",^\^"name^\^":^\^"^董^素^敏^\^"^},^{^\^"fbasedataid_id^\^":^\^"2143518979384175616^\^",^\^"name^\^":^\^"^庄^涵^钰ZY^\^"^}^],^\^"hwg_assignor_name^\^":^\^"^董^素^敏^\^",^\^"hwg_assignor_id^\^":^\^"1394084520470297600^\^",^\^"wg_plan_start_time^\^":^\^"2026-05-07 17:23:30^\^",^\^"wg_plan_completion_time^\^":^\^"2026-05-08 00:23:30^\^",^\^"wg_duration_days^\^":8,^\^"attachmentFiles^\^":^[^{^\^"url^\^":^\^"https://tf-ek.jdy.com/ierp/tempfile/download.do?configKey=redis.serversForCache.tempfile&id=tempfile-c677bb3f-c4d4-4101-a379-b30aeb481512^\^",^\^"name^\^":^\^"-FL14000001.png^\^",^\^"size^\^":9125^}^],^\^"hwg_project_name^\^":^\^"20260423^\^",^\^"hwg_project_id^\^":^\^"2463968533374172160^\^",^\^"hwg_project_number^\^":^\^"20260423^\^",^\^"protype_id^\^":^\^"2326821115579609088^\^",^\^"hwg_client_name^\^":^\^"0629^为^谷^\^",^\^"hwg_client_id^\^":^\^"1453663851282230272^\^",^\^"hwg_client_number^\^":^\^"06291222111^\^",^\^"wg_theme^\^":^\^"^测^试0507^\^",^\^"projectstatus_name^\^":^\^"^旋^地^\^",^\^"projectstatus_id^\^":^\^"1717451855249810432^\^",^\^"hwg_type_id^\^":^\^"1434159342399049728^\^",^\^"hwg_type_name^\^":^\^"^任^务^\^",^\^"constrainttype^\^":^\^"0^\^",^\^"constrainttype_name^\^":^\^"^越^早^越^好^\^",^\^"afterexecuteprojectstatus_name^\^":^\^"^旋^地^\^",^\^"afterexecuteprojectstatus_id^\^":^\^"1717451855249810432^\^",^\^"afterfinishprojectstatus_name^\^":^\^"^施^肥^\^",^\^"afterfinishprojectstatus_id^\^":^\^"1717452116202627072^\^",^\^"hwg_importance_id^\^":^\^"1434154845970908160^\^",^\^"hwg_importance_name^\^":^\^"^一^般^\^",^\^"hwg_prepose_wg_theme^\^":^\^"7^\^",^\^"hwg_prepose_id^\^":^\^"2466894225183128579^\^",^\^"hwg_contacts_id^\^":^\^"2271996860233172992^\^",^\^"hwg_contacts_contactperson^\^":^\^"0801^测^试^联^系^人^\^",^\^"wg_supplierid_name^\^":^\^"^海^关^\^",^\^"wg_supplierid_id^\^":^\^"1594919397091191808^\^",^\^"wg_afterexecution^\^":^\^"5^\^",^\^"wg_aftercompletion^\^":^\^"10^\^",^\^"milestone^\^":true,^\^"constraintdate^\^":^\^"2026-05-28^\^",^\^"tasktype^\^":^\^"0^\^",^\^"tasktype_name^\^":^\^"^固^定^单^位^\^",^\^"wg_describe^\^":^\^"^测^试^描^述^\^",^\^"ishavebasedata^\^":^\^"true^\^"^}^}^"

分享文章
最近修改: 2026-05-07