创建/更新签约工地

接口地址:/openapi/zxb/customerInfo/saveOrUpdate

请求方式:POST

请求数据类型:multipart/form-data

响应数据类型:*/*

接口描述:
签约公司: https://doc.mokan.cn/docs/open-api/open-api-1d3olci3vp1uk#19onsd 查询type为COMPANY的公司,取id

1设计师: 调用https://doc.mokan.cn/docs/open-api/open-api-1d3ol4t51dta0#569q0p 接口, 取userId

contractFileList:新增必传,修改可不传,上传了文件会覆盖之前的文件
contractUrl: 新增不传,作为文件的地址回显,如果修改没有修改文件,重新传此参数

请求示例:

请求参数:

参数名称 参数说明 请求类型 是否必须 数据类型 schema
  id id false integer(int64)
  projectName 工地名称 true string
  address 详细地址 true string
  orgId 签约公司id true integer(int64)
  houseOwnerName 业主姓名 true string
  houseOwnerPhone 业主手机号 true string
  houseOwnerIdCard 业主身份证号 true string
  contractNo 合同号 true string
  contractAmountYuan 合同金额 false number(bigdecimal)
  earnestAmountYuan 定金金额 false number(bigdecimal)
  designerId 设计师id true integer(int64)
  planStartDate 计划开工时间 false string(date-time)
  planEndDate 计划完工日期 false string(date-time)
  contractFileList 合同文件集合 false file
  contractUrl 合同文件json false string
  latitude 纬度 false string
  longitude 经度 false string

响应状态:

状态码 说明 schema
200 OK R
201 Created
401 Unauthorized
403 Forbidden
404 Not Found

响应参数:

参数名称 参数说明 类型 schema
code integer(int32) integer(int32)
data true/false Boolean
message string
successful boolean

响应示例:

{
    "code": 0,
    "data": true/false,
    "message": "",
    "successful": true
}

分页列表

接口地址:/openapi/zxb/customerInfo/page?pageNo=1&pageSize=10

请求方式:POST

请求数据类型:application/json

响应数据类型:*/*

接口描述:

请求示例:

{
  "contractNo": "",
  "projectName": "",
  "houseOwnerName": "业主姓名或业主电话"
}

请求参数:

参数名称 参数说明 请求类型 是否必须 数据类型 schema
OpenZxbCustomerInfoDTO OpenZxbCustomerInfoDTO body true object object
  contractNo 合同号 false string
  projectName 工地名称 false string
  houseOwnerName 业主姓名或业主电话 false string

响应状态:

状态码 说明 schema
200 OK R«open-platform 分页简单对象«ProjectPfVo»»
201 Created
401 Unauthorized
403 Forbidden
404 Not Found

响应参数:

参数名称 参数说明 类型 schema
code integer(int32) integer(int32)
data open-platform 分页简单对象«ProjectPfVo» open-platform 分页简单对象«ProjectPfVo»
  current 当前页 integer(int64)
  records 查询数据列表 array ProjectPfVo
   id ID integer(int64)
   tenantId 租户id integer(int64)
   orgId 签约公司id integer(int64)
   orgName 签约公司名称 string
   projectName 工地名称 string
   address 地址 string
   houseOwnerName 业主名称 string
   houseOwnerPhone 业主手机号 string
   houseOwnerIdCard 业主身份证 string
   houseOwnerUserId 业主用户ID integer(int64)
   contractNo 合同号 string
   designerId 设计师ID integer(int64)
   designerName 设计师名称 string
   planDays 计划天数 integer(int32)
   planStartDate 计划开始时间 string(date-time)
   planEndDate 计划结束时间 string(date-time)
   contractUrl 合同文件json string
   longitude 经度 string
   latitude 纬度 string
   contractAmountYuan 合同金额 number(bigdecimal)
   earnestAmountYuan 定金金额 number(bigdecimal)
   orderRelease 订单已释放 boolean
   settleOff 无需清算标识 boolean
  size 每页显示条数 integer(int64)
  total 总数 integer(int64)
message string
successful boolean

响应示例:

{
    "code": 0,
    "data": {
        "current": 0,
        "records": [
            {
                "id": 1,
                "tenantId": 1,
                "orgId": 1,
                "orgName": "",
                "projectName": "",
                "address": "",
                "houseOwnerName": "",
                "houseOwnerPhone": 0,
                "houseOwnerIdCard": "",
                "houseOwnerUserId": 1,
                "contractNo": "",
                "designerId": 1,
                "designerName": "",
                "planDays": 1,
                "planEndDate": "",
                "planStartDate": "",
                "contractUrl": "",
                "longitude": "",
                "latitude": "",
                "contractAmountYuan": 1.11,
                "earnestAmountYuan": 1.11,
                "orderRelease": true,
                "settleOff": false
            }
        ],
        "size": 0,
        "total": 0
    },
    "message": "",
    "successful": true
}

根据id详情

接口地址:/openapi/zxb/customerInfo/getById?id=123

请求方式:GET

请求数据类型:application/x-www-form-urlencoded

响应数据类型:*/*

接口描述:

请求参数:

参数名称 参数说明 请求类型 是否必须 数据类型 schema
id 签约工地id path true integer(int64)

响应状态:

状态码 说明 schema
200 OK R«OpenZxbCustomerInfoVO»
401 Unauthorized
403 Forbidden
404 Not Found

响应参数:

参数名称 参数说明 类型 schema
code integer(int32) integer(int32)
data OpenZxbCustomerInfoVO
  id ID integer(int64)
  tenantId 租户id integer(int64)
  orgId 签约公司id integer(int64)
  orgName 签约公司名称 string
  projectName 工地名称 string
  address 地址 string
  houseOwnerName 业主名称 string
  houseOwnerPhone 业主手机号 string
  houseOwnerIdCard 业主身份证 string
  houseOwnerUserId 业主用户ID integer(int64)
  contractNo 合同号 string
  designerId 设计师ID integer(int64)
  designerName 设计师名称 string
  planDays 计划天数 integer(int32)
  planStartDate 计划开始时间 string(date-time)
  planEndDate 计划结束时间 string(date-time)
  contractUrl 合同文件json string
  longitude 经度 string
  latitude 纬度 string
  contractAmountYuan 合同金额 number(bigdecimal)
  earnestAmountYuan 定金金额 number(bigdecimal)
  orderRelease 订单已释放 boolean
  settleOff 无需清算标识 boolean
message string
successful boolean

响应示例:

{
    "code": 0,
    "data": {
        "id": 1,
        "tenantId": 1,
        "orgId": 1,
        "orgName": "",
        "projectName": "",
        "address": "",
        "houseOwnerName": "",
        "houseOwnerPhone": 0,
        "houseOwnerIdCard": "",
        "houseOwnerUserId": 1,
        "contractNo": "",
        "designerId": 1,
        "designerName": "",
        "planDays": 1,
        "planEndDate": "",
        "planStartDate": "",
        "contractUrl": "",
        "longitude": "",
        "latitude": "",
        "contractAmountYuan": 1.11,
        "earnestAmountYuan": 1.11,
        "orderRelease": true,
        "settleOff": false
    },
    "message": "",
    "successful": true
}

根据ID删除签约工地

接口地址:/openapi/zxb/customerInfo/{id}

请求方式:DELETE

请求数据类型:application/x-www-form-urlencoded

响应数据类型:*/*

接口描述:

请求参数:

参数名称 参数说明 请求类型 是否必须 数据类型 schema
id id path true integer(int64)

响应状态:

状态码 说明 schema
200 OK R«Worker»
401 Unauthorized
403 Forbidden
404 Not Found

响应参数:

参数名称 参数说明 类型 schema
code integer(int32) integer(int32)
data object
message string
successful boolean

响应示例:

{
    "code": 0,
    "data": {},
    "message": "",
    "successful": true
}

资金结算

接口地址:/openapi/zxb/customerInfo/fundSettlement?id=123

请求方式:POST

请求数据类型:application/x-www-form-urlencoded

响应数据类型:*/*

接口描述:
id为签约工地id或业务工地id

请求参数:

参数名称 参数说明 请求类型 是否必须 数据类型 schema
id id path true integer(int64)

响应状态:

状态码 说明 schema
200 OK R«Worker»
401 Unauthorized
403 Forbidden
404 Not Found

响应参数:

参数名称 参数说明 类型 schema
code integer(int32) integer(int32)
data object
message string
successful boolean

响应示例:

{
    "code": 0,
    "data": {},
    "message": "",
    "successful": true
}

根据签约工地查询详情(用于确认开工时查询,组装新增实际工地时,用于回填实际工地的数据组装)

接口地址:/openapi/zxb/customerInfo/detailByCustomerId/{customerId}

请求方式:GET

请求数据类型:application/x-www-form-urlencoded

响应数据类型:*/*

接口描述:
合同附件请在签约工地修改接口处理好,确认开工时不能修改合同附件

请求参数:

参数名称 参数说明 请求类型 是否必须 数据类型 schema
customerId 签约工地id path true integer(int64)

响应状态:

状态码 说明 schema
200 OK R«OneStepProjectAddParam»
401 Unauthorized
403 Forbidden
404 Not Found

响应参数:

参数名称 参数说明 类型 schema
code integer(int32) integer(int32)
data OneStepProjectAddParam
  project 工地基本信息 object
   name 工地名称 string
   orgId 组织id integer(int64)
   orgId 签约公司id integer(int64)
   contractNo 合同号 string
   address 地址 string
   longitude 经度 string
   latitude 纬度 string
   planStartDate 计划开始时间 string(date-time)
   planEndDate 计划结束时间 string(date-time)
   contractAmountYuan 合同金额 number(bigdecimal)
   earnestAmountYuan 定金金额 number(bigdecimal)
   contractUrl 合同文件json string
   cooperationCompanyId 签约公司id integer(int64)
  houseOwners 业主信息 object
   userName 业主名称 string
   phoneNumber 业主手机号 string
   idCard 业主身份证号 string
   userId 业主用户ID integer(int64)
  positionMemberMap 工地相关成员(设计师数据) map
   1363006906646626305 岗位id integer(int64)
    userName 用户名称 string
    userId 用户id integer(int64)
    orgId 组织id integer(int64)
    orgName 组织名称 string
    positionId 岗位id integer(int64)
    positionName 岗位名称 integer(int64)
    phoneNumber 用户手机号 string
message string
successful boolean

响应示例:

{
    "code": 200,
    "message": "成功",
    "data": {
        "project": {
            "name": "12312312311",
            "orgId": "1363692883161612290",
            "contractNo": "123331233",
            "address": "吉林省通化市集安市水云涧·美宿(集安火盆街店)",
            "longitude": "126.188324",
            "latitude": "41.128125",
            "planStartDate": "2025-10-23",
            "planEndDate": "2025-10-30",
            "contractAmountYuan": 123.00,
            "earnestAmountYuan": 321.00,
            "contractUrl": "[{\"url\": \"https://test.com/202510/0d5871d3-658c-4153-8c31-a1ddc18c4c8a.pdf\", \"name\": \"test.pdf\", \"type\": \"application/pdf\"}]",
            "cooperationCompanyId": "1363692883161612290",
            "houseOwners": [
                {
                    "userName": "123",
                    "userId": "1981250826076684289",
                    "phoneNumber": "12312312312",
                    "idCard": "123123123123123"
                }
            ],
            "positionMemberMap": {
                "1363006906646626305": [
                    {
                        "userId": "1364141217155510274",
                        "userName": "杜霖儿",
                        "orgId": "1364141051308535810",
                        "orgName": "设计一部",
                        "positionId": "1363006906646626305",
                        "positionName": "设计师",
                        "phoneNumber": "16284953758"
                    }
                ]
            }
        }
    },
    "successful": true
}

签约工地确认开工(创建在建工地)

接口地址: 调用下面一步工地新增或普通新增工地,后续工地维护接口调用https://doc.mokan.cn/docs/open-api/open-api-1d3ol4t51dta0 里的接口

请求方式:POST

请求数据类型:application/x-www-form-urlencoded

响应数据类型:*/*

接口描述:
根据上个接口的返回数据组装创建在建工地数据,且自行补充其他必填参数
创建在建工地时新增需传参数:zxbCustomerId(签约工地id)、contractAmountYuan(合同金额(元))、earnestAmountYuan(定金金额(元))、contractUrl(合同附件url)、cooperationCompanyId(签约公司ID)、positionMemberMap(成员信息)

请求参数:

一步工地新增(带设备)

接口地址:/openapi/project/auto/oneStepAdd

请求方式:POST

请求数据类型:application/json

响应数据类型:*/*

提示:

为保证大屏正常显示,工地地址格式为:省市区街道小区名称
如:四川省成都市成华区仙韵二路33号泰博理想城

请求示例:

{
        "projectDevices": [{
                "serialNum": "DV6xxxxxx",
                "bindDate": "2022-06-29 18:00:54"
        }],
        "houseOwners":[{
            "userName":"张三",
            "phoneNumber":"1235545",
            "userId": "1981250826076684289",
            "idCard": "123123123123123" 
        }],
        "project": {
                "address": "xxxxxx泰博理想城",
                "supervisorName": "李主要(主要负责人)",
                "supervisorPhone": "1811xxx382",
                "managerName": "张次要(次要负责人)",
                "managerPhone": "1308xxx568",
                "stageId": 1802656139923218436,
                "name": "xxx邦泰天著18-1-13-52",
                "planDays": 75,
                "weekendWork": "true",
                "applyToSecondMaster":false,
                "latitude":"28.119164",
                "longitude":"112.963421",
                "productName":"产品名称",
                "companyId":"xxx",

                // 以下5个字段为签约工地回写字段
                "zxbCustomerId": 123,
                "contractAmountYuan": 1.12,
                "earnestAmountYuan": 1.1,
                "contractUrl": "[{\"url\": \"https://test.com/202510/0d5871d3-658c-4153-8c31-a1ddc18c4c8a.pdf\", \"name\": \"test.pdf\", \"type\": \"application/pdf\"}]",
                "cooperationCompanyId": 123
        },
        "positionMemberMap": { // 该字段为签约工地回写字段
            "1363006906646626305": [
                {
                    "userId": "1364141217155510274",
                    "userName": "杜霖儿",
                    "orgId": "1364141051308535810",
                    "orgName": "设计一部",
                    "positionId": "1363006906646626305",
                    "positionName": "设计师",
                    "phoneNumber": "16284953758"
                }
            ]
        }
}

请求参数:

请求参数:

参数名称 参数说明 请求类型 是否必须 数据类型 schema
oneStepProjectAddParam OneStepProjectAddParam body true OneStepProjectAddParam OneStepProjectAddParam
  project 项目信息 true ProjectPfVo ProjectPfVo
    address 详细地址 false string
    applyToSecondMaster 设备自动领用到次要负责人 false boolean
    bathRoom false integer
    bedRoom false integer
    budgetAmount 预算 false number
    buildArea 建筑面积 false number
    contractNo 合同号 false string
    estateName 楼盘名称 false string
    houseNum false string
    houseRoom 房间号 false string
    houseUnit 单元 false string
    innerArea 室内面积 false number
    latitude 纬度 false string
    longitude 经度 false string
    livingRoom false integer
    name 工地名称 true string
    stageId 当前施工阶段ID false long
    planDays 计划工期 true integer
    planStartDate 计划开始时间 true string
    productName 产品名称 false string
    supervisorPhone 第一负责人电话 true string
    supervisorName 第一负责人名称 true string
    managerPhone 第二负责人电话 true string
    managerName 第二负责人名称 true string
    weekendWork 周末施工 true boolean
    companyId 公司id false string
    zxbCustomerId 签约工地id(如果为签约工地转在建工地,必填该字段) false long
    contractAmountYuan 合同金额 false BigDecimal
    earnestAmountYuan 定金金额 false BigDecimal
    contractUrl 合同附件url false string
    cooperationCompanyId 签约公司id false long
  projectDevices 项目设备列表 true array ProjectDeviceVO
    area 区域 true string
    bindDate 绑定时间 yyyy-MM-dd HH:mm:ss true string
    serialNum 设备串号 true string
  houseOwners 业主列表 false array ProjectMember
    userName 名称 true string
    phoneNumber 电话号码 true string
    userId 业主userId false long
    idCard 业主身份证号 false string
  positionMemberMap 工地相关成员(设计师数据) false array ProjectMemberRequest
   1363006906646626305 岗位id integer(int64)
    userName 用户名称 string
    userId 用户id integer(int64)
    orgId 组织id integer(int64)
    orgName 组织名称 string
    positionId 岗位id integer(int64)
    positionName 岗位名称 integer(int64)
    phoneNumber 用户手机号 string

响应状态:

状态码 说明 schema
200 OK R
201 Created
401 Unauthorized
403 Forbidden
404 Not Found

响应参数:

参数名称 参数说明 类型 schema
code integer(int32) integer(int32)
data Long
message string
successful boolean

响应示例:

{
    "code": 200,
    "data": "123456789522562",
    "message": "",
    "successful": true
}

普通新增工地(推荐使用一步新增)

接口地址:/openapi/project/add

请求方式:POST

请求数据类型:application/json

响应数据类型:*/*

接口描述:

请求示例:

{
    "address": "",
    "bathRoom": 0,
    "bedRoom": 0,
    "budgetAmount": 0,
    "buildArea": 0,
    "contractNo": "",
    "customerName": "",
    "customerPhone": "",
    "estateName": "",
    "houseNum": "1",
    "houseRoom": "1",
    "houseUnit": "1",
    "innerArea": 0,
    "latitude": "",
    "livingRoom": 0,
    "longitude": "",
    "managerEopId": 0,
    "name": "",
    "planDays": 0,
    "planStartDate": "",
    "supervisorEopId": 0,
    "weekendWork": false,
    "stageId":0,
    "productName":"产品名称",

    // 以下7个字段为签约工地回写字段
    "zxbCustomerId": 123,
    "contractAmountYuan": 1.12,
    "earnestAmountYuan": 1.1,
    "contractUrl": "[{\"url\": \"https://test.com/202510/0d5871d3-658c-4153-8c31-a1ddc18c4c8a.pdf\", \"name\": \"test.pdf\", \"type\": \"application/pdf\"}]",
    "cooperationCompanyId": 123,
    "houseOwners":[{
        "userName":"张三",
        "phoneNumber":"1235545",
        "userId": "1981250826076684289",
        "idCard": "123123123123123"
    }],
    "positionMemberMap": {
        "1363006906646626305": [
            {
                "userId": "1364141217155510274",
                "userName": "杜霖儿",
                "orgId": "1364141051308535810",
                "orgName": "设计一部",
                "positionId": "1363006906646626305",
                "positionName": "设计师",
                "phoneNumber": "16284953758"
            }
        ]
    }
}

请求参数:

参数名称 参数说明 请求类型 是否必须 数据类型 schema
projectPfVo ProjectPfVo body true ProjectPfVo ProjectPfVo
  name 工地名称 true string
  address 详细地址 true string
  supervisorEopId 项目监理岗位关系id true integer(int64)
  managerEopId 项目经理岗位关系id true integer(int64)
  planDays 计划工期 true integer(int32)
  planStartDate 开工时间 true string(date-time)
  weekendWork 周末施工 true boolean
  bathRoom false integer(int32)
  bedRoom false integer(int32)
  budgetAmount 预算 false number(bigdecimal)
  buildArea 建筑面积 false number(bigdecimal)
  contractNo 合同号 false string
  customerName 顾客名称 false string
  customerPhone 电话 false string
  estateName 楼盘名称 false string
  houseNum false string
  houseRoom 房间号 false string
  houseUnit 单元 false string
  innerArea 室内面积 false number(bigdecimal)
  latitude 纬度 false string
  livingRoom false integer(int32)
  longitude 经度 false string
  realEndDate 实际结束时间 false string(date-time)
  realStartDate 实际开始时间 false string(date-time)
  stageId 施工阶段ID false long
  productName 产品名称 false string
  zxbCustomerId 签约工地id(如果为签约工地转在建工地,必填该字段) false long
  contractAmountYuan 合同金额 false BigDecimal
  earnestAmountYuan 定金金额 false BigDecimal
  contractUrl 合同附件url false string
  cooperationCompanyId 签约公司id false long
  houseOwners 业主列表 false array ProjectMember
    userName 名称 true string
    phoneNumber 电话号码 true string
    userId 业主userId false long
    idCard 业主身份证号 false string
  positionMemberMap 工地相关成员(设计师数据) false array ProjectMemberRequest
   1363006906646626305 岗位id integer(int64)
    userName 用户名称 string
    userId 用户id integer(int64)
    orgId 组织id integer(int64)
    orgName 组织名称 string
    positionId 岗位id integer(int64)
    positionName 岗位名称 integer(int64)
    phoneNumber 用户手机号 string

响应状态:

状态码 说明 schema
200 OK R
201 Created
401 Unauthorized
403 Forbidden
404 Not Found

响应参数:

参数名称 参数说明 类型 schema
code integer(int32) integer(int32)
data 工地id Long
message string
successful boolean

响应示例:

{
    "code": 0,
    "data": {},
    "message": "",
    "successful": true
}
作者:admin  创建时间:2025-10-23 14:32
最后编辑:admin  更新时间:2025-12-04 11:01