aiM18开发者中心 aiM18开发者中心
文档主页
  • 平台

    • 平台总体概述
    • 前端开发须知
    • 后台开发须知
    • EBI开发须知
    • JSF组件属性表
    • BPM扩展接口
    • 一查到底扩展接口
    • 手机App设置
  • ERP

    • ERP 后端扩展
    • ERP 应用配置
    • ERP 前端扩展
  • 教程

    • 设置Eclipse开发环境
    • 创建App教程
  • 平台相关

    • API授权
    • 通用的数据对象
    • 核心的API
    • EBI相关接口
  • 企业资源规划
  • 人力资本管理
  • 业务流程处理
  • 日程管理
  • 文档管理
  • 教程

    • 通过API与aiM18进行交互
教程
GitHub (opens new window)
文档主页
  • 平台

    • 平台总体概述
    • 前端开发须知
    • 后台开发须知
    • EBI开发须知
    • JSF组件属性表
    • BPM扩展接口
    • 一查到底扩展接口
    • 手机App设置
  • ERP

    • ERP 后端扩展
    • ERP 应用配置
    • ERP 前端扩展
  • 教程

    • 设置Eclipse开发环境
    • 创建App教程
  • 平台相关

    • API授权
    • 通用的数据对象
    • 核心的API
    • EBI相关接口
  • 企业资源规划
  • 人力资本管理
  • 业务流程处理
  • 日程管理
  • 文档管理
  • 教程

    • 通过API与aiM18进行交互
教程
GitHub (opens new window)
  • 通用

    • 访问授权
    • 通用JSON对象
    • 核心服务
    • 商业智能
    • 错误码说明
  • 业务流程管理

    • 业务流程管理
  • 日程管理

    • 日程管理
  • 文档管理

    • 文档管理系统
  • 企业资源规划

    • API授权流程
    • 基础资料
    • 财务
    • 财务EBI
    • 委外代销
    • EBI
    • 仓库管理方案
    • 零售
    • 零售储值
    • 零售和第三方物流
    • 生产
      • 主生产工单
        • 获取主生产工单列表
        • 一、接口描述
        • 二、接口调用说明
        • 新增主生产工单(自动补全)
        • 一、接口描述
        • 二、接口调用说明
        • 读取主生产工单
        • 一、接口描述
        • 二、接口调用说明
        • 保存主生产工单
        • 一、接口描述
        • 二、接口调用说明
        • 删除主生产工单
        • 一、接口描述
        • 二、接口调用说明
        • 读取EBI数据:主生产工单列表
        • 一、接口描述
        • 二、接口调用说明
        • 读取EBI数据:主生产工单数据来源报告
        • 一、接口描述
        • 二、接口调用说明
      • 工艺派工单
        • 获取工艺派工单列表
        • 一、接口描述
        • 二、接口调用说明
        • 新增工艺派工单(自动补全)
        • 一、接口描述
        • 二、接口调用说明
        • 读取工艺派工单
        • 一、接口描述
        • 二、接口调用说明
        • 保存工艺派工单
        • 一、接口描述
        • 二、接口调用说明
        • 删除工艺派工单
        • 一、接口描述
        • 二、接口调用说明
        • 读取EBI数据:工艺派工单报告
        • 一、接口描述
        • 二、接口调用说明
      • 工艺完工单
        • 获取工艺完工单列表
        • 一、接口描述
        • 二、接口调用说明
        • 新增工艺完工单(自动补全)
        • 一、接口描述
        • 二、接口调用说明
        • 读取工艺完工单
        • 一、接口描述
        • 二、接口调用说明
        • 保存工艺完工单
        • 一、接口描述
        • 二、接口调用说明
        • 删除工艺完工单
        • 一、接口描述
        • 二、接口调用说明
        • 读取EBI数据:工艺完工单报告
        • 一、接口描述
        • 二、接口调用说明
      • 生产领料单
        • 获取生产领料单列表
        • 一、接口描述
        • 二、接口调用说明
        • 新增生产领料单(自动补全)
        • 一、接口描述
        • 二、接口调用说明
        • 读取生产领料单
        • 一、接口描述
        • 二、接口调用说明
        • 保存生产领料单
        • 一、接口描述
        • 二、接口调用说明
        • 删除生产领料单
        • 一、接口描述
        • 二、接口调用说明
        • 读取EBI数据:生产领料单报告
        • 一、接口描述
        • 二、接口调用说明
      • 生产退料单
        • 获取生产退料单列表
        • 一、接口描述
        • 二、接口调用说明
        • 新增生产退料单(自动补全)
        • 一、接口描述
        • 二、接口调用说明
        • 读取生产退料单
        • 一、接口描述
        • 二、接口调用说明
        • 保存生产退料单
        • 一、接口描述
        • 二、接口调用说明
        • 删除生产退料单
        • 一、接口描述
        • 二、接口调用说明
        • 读取EBI数据:生产退料单报告
        • 一、接口描述
        • 二、接口调用说明
      • 生产完工单
        • 获取生产完工单列表
        • 一、接口描述
        • 二、接口调用说明
        • 新增生产完工单(自动补全)
        • 一、接口描述
        • 二、接口调用说明
        • 读取生产完工单
        • 一、接口描述
        • 二、接口调用说明
        • 保存生产完工单
        • 一、接口描述
        • 二、接口调用说明
        • 删除生产完工单
        • 一、接口描述
        • 二、接口调用说明
      • 生产入库单
        • 获取生产入库单列表
        • 一、接口描述
        • 二、接口调用说明
        • 新增生产入库单(自动补全)
        • 一、接口描述
        • 二、接口调用说明
        • 读取生产入库单
        • 一、接口描述
        • 二、接口调用说明
        • 保存生产入库单
        • 一、接口描述
        • 二、接口调用说明
        • 删除生产入库单
        • 一、接口描述
        • 二、接口调用说明
        • 读取EBI数据:生产入库报告
        • 一、接口描述
        • 二、接口调用说明
    • 贸易和财务
    • 采购
    • 销售
    • 库存
    • 委外
  • 人力资本管理

    • API授权流程
    • 绩效管理
    • 考勤管理
    • 临时工
    • 人事管理
    • 请假管理
    • 医疗索偿
    • 薪资管理
    • 招聘管理
    • 培训&资助
  • Web Services中文
  • 企业资源规划
Multiable
2024-07-12
目录

生产

# 主生产工单

# 获取主生产工单列表

# 一、接口描述

​ 用于获取主生产工单列表(同UI界面左侧的Search List数据)

# 二、接口调用说明

​ 1、请求说明

URL http://[server]/jsf/rfws/search/search
http请求方式 GET
编码类型 UTF-8

​ 2、URL参数

参数 类型 必填 说明
authorization String(Header) 是 OAuth获取的Access Token
client_id String(Header) 是 aiM18[授权应用列表]中的Client ID
stSearch String(Query) 是 prodMjob
beId long(Query) 是 aiM18企业法人[部门]的ID
formatId long(Query) 否 aiM18[查询格式]的ID,用于获取[查询格式]步骤二中设定的栏位格式;若不使用此参数,则使用默认设置。
startRow int(Query) 否 返回结果的开始行
endRow int(Query) 否 返回结果的结束行
quickSearchStr String(Query) 否 用于设定关键字查找数据

​ 3、请求示例

	CloseableHttpClient client = HttpClientBuilder.create().build();
	CloseableHttpResponse res = null;
	try {

		String url = "http://" + HostIP + ":" + HostPort + "/jsf/rfws/search/search";
		String param = "&stSearch=prodMjob&beId=" + beId;

		HttpGet get = new HttpGet(url + "?" + param);
		get.addHeader("authorization", access_token);
		get.addHeader("client_id", ClientID);
		res = client.execute(get);
		if (res.getStatusLine().getStatusCode() == HttpStatus.SC_OK) {
			JSONObject json = JSON.parseObject(EntityUtils.toString(res.getEntity()));
		}
		get.releaseConnection();
	} catch (Exception e) {
		e.printStackTrace();
	} finally {
		try {
			if (res != null) {
				res.close();
			}
			if (client != null) {
				client.close();
			}
		} catch (Exception ex) {
			ex.printStackTrace();
		}
	}			

​ 4、返回示例

{
    "stSearch": "prodMjob",
    "size": 178,
    "stSearchDisplay": "主生产工单",
    "values": [
        {
            "tDate": "2022-03-31",
            "code": "MJ220005",
            "st_id": 425,
            "st_code": "MJ220005",
            "prodMainMjob.lastModifyUid.simpleUser.desc__lang": "Milk",
            "st_desc": "MJ220005",
            "iRev": 3,
            "id": 425,
            "lastModifyDate": "2022-03-31 15:08:16"
        }
    ]
}

# 新增主生产工单(自动补全)

# 一、接口描述

​ 1. 用于新增【主生产工单】

​ 2. 此接口方法有如下特点:

​ a. 支持使用code 替代 id 栏位

​ b. 职员栏位未填时,自动使用个人选项中的默认职员

​ c. 单据日期未填时,根据贸易参数设定中的日期选项取值

# 二、接口调用说明

​ 1、请求说明

URL http://[server]/jsf/rfws/erp/bsFlow/save/prodMjob
http请求方式 POST
编码类型 UTF-8

​ 2、URL参数

参数 类型 必填 说明
authorization String(Header) 是 OAuth获取的Access Token
client_id String(Header) 是 aiM18[授权应用列表]中的Client ID

​ 3、请求示例

	CloseableHttpClient client = HttpClientBuilder.create().build();
	CloseableHttpResponse res = null;
	try {

		String url = "http://" + HostIP + ":" + HostPort + "/jsf/rfws/erp/bsFlow/save/prodMjob";
		String param = "";

		HttpPost post = new HttpPost(url + "?" + param);
		post.addHeader("authorization", access_token);
		post.addHeader("client_id", ClientID);

		StringEntity entity = new StringEntity(data.toJSONString(), ContentType.APPLICATION_JSON);
		entity.setContentEncoding("UTF-8");
		post.setEntity(entity);

		res = client.execute(post);
		if (res.getStatusLine().getStatusCode() == HttpStatus.SC_OK) {
			JSONObject json = JSON.parseObject(EntityUtils.toString(res.getEntity()));

			if (json != null) {
				recordId = json.getLongValue("tranId");
			}
			System.out.println(json);
		}

		post.releaseConnection();
	} catch (Exception e) {
		e.printStackTrace();
	} finally {
		try {
			if (res != null) {
				res.close();
			}
			if (client != null) {
				client.close();
			}
		} catch (Exception ex) {
			ex.printStackTrace();
		}
	}

data数据示例:(注:输入的 proId 必须要有生效的物料明细表)

{
    "beId": 142,
    "tDate": "2022-03-23",
    "code": "MJOBTEST2",
    "virDeptId": 7,
    "prodmjobt": [
        {
            "sourceId": 0,
            "lot": "A",
            "oriQty": 100,
            "sourceLot": "",
            "cDate": "2022-03-31",
            "sourceType": "pro",
            "sDate": "2022-03-23",
            "proId": 4634,
            "qty": 100,
            "unitId": 39720,
            "proLot": "A",
            "oriUnitId": 39720
        }
    ]
}

​ 4、返回示例

{
    "tranId": 438,
    "tranCode": "MJOBTEST2",
    "message": "",
    "status": true
}

# 读取主生产工单

# 一、接口描述

​ 用于读取主生产工单数据

# 二、接口调用说明

​ 1、请求说明

URL http://[server]/jsf/rfws/root/api/read/prodMjob
http请求方式 GET
编码类型 UTF-8

​ 2、URL参数

参数 类型 必填 说明
authorization String(Header) 是 OAuth获取的Access Token
client_id String(Header) 是 aiM18[授权应用列表]中的Client ID
menuCode String(Query) 是 prodMjob
id long(Query) 是 主生产工单的id
param String(Query) 否 额外的系统参数;JSON字符串

​ 3、请求示例

		CloseableHttpClient client = HttpClientBuilder.create().build();
		CloseableHttpResponse res = null;
		try {

			String url = "http://" + HostIP + ":" + HostPort + "/jsf/rfws/root/api/read/prodMjob";
			String param = "&menuCode=prodMjob&id=" + id;

			HttpGet get = new HttpGet(url + "?" + param);
			get.addHeader("authorization", access_token);
			get.addHeader("client_id", ClientID);
			res = client.execute(get);
			if (res.getStatusLine().getStatusCode() == HttpStatus.SC_OK) {
				JSONObject json = JSON.parseObject(EntityUtils.toString(res.getEntity()));

				System.out.println(json);
			}

			get.releaseConnection();
		} catch (Exception e) {
			e.printStackTrace();
		} finally {
			try {
				if (res != null) {
					res.close();
				}
				if (client != null) {
					client.close();
				}
			} catch (Exception ex) {
				ex.printStackTrace();
			}
		}

​ 4、返回示例

{
    "data": {},
    "messages": [
        {
            "msgDetail": "找不到相关记录,记录可能已被删除或你没有访问权限",
            "msgCode": "core_141019"
        }
    ],
    "status": false
}
{
    "data": {
        "prodmjobmatt": [
            {
                "udfPJPwidth": 0,
                "udfPJPtestNum": 0,
                "oriMatLot": "A",
                "dualQty": 101,
                "preQty": 0.1,
                "bomQtyUnitId": 39233,
                "itemNo": "     1",
                "isSemi": false,
                "bomTreeLevel": "",
                "oriQty": 101,
                "bomReqQty": 101,
                "oriMatId": 4236,
                "bDesc": "木材 sc 1",
                "bDesc_zh-TW": "木材 tc 1",
                "refdest": "",
                "id": 3550,
                "udfPJPtestBool": false,
                "matcatId": 0,
                "dDesc_haha1": "",
                "hId": 425,
                "level": "  2",
                "bomPreQty": 0.1,
                "udfPJPtestLookup": 0,
                "completed": false,
                "footerKey": "     1",
                "dDesc": "<p>1</p>",
                "udfPJPstring1": "111",
                "i18nField": "{\"bDesc_en\": \"木材 1\", \"dDesc_en\": \"<p>1</p>\", \"dDesc_ctw\": \"<p>1</p>\", \"bDesc_zh-CN\": \"木材 sc 1\", \"bDesc_zh-TW\": \"木材 tc 1\", \"dDesc_zh-CN\": \"<p>1</p>\", \"dDesc_zh-TW\": \"<p>1</p>\"}",
                "qty": 101,
                "tDate": 1648483200000,
                "dDesc_ctw": "<p>1</p>",
                "pproId": 4634,
                "iRev": 3,
                "dDesc_zh-CN": "<p>1</p>",
                "wastageQty": 0,
                "bDesc_ctw": "",
                "ce01Module": "prodMjob",
                "bomWastageQty": 0,
                "lot": "A",
                "bDesc_haha1": "",
                "treeLevel": "   1-   2-   1",
                "dDesc_zh-TW": "<p>1</p>",
                "processId": 12,
                "plot": "A",
                "udfPJPtestStr": "22",
                "bDesc_ccn": "",
                "unitId": 39233,
                "udfPJPtestDate": -2209017600000,
                "dDesc_ccn": "",
                "stdQty": 100,
                "bomId": 75,
                "bDesc_en": "木材 1",
                "udfPJPlength": 0,
                "dDesc_en": "<p>1</p>",
                "oriUnitId": 39233,
                "dualUnitId": 4174,
                "proId": 4236,
                "bomLot": "A",
                "bomStdQty": 100,
                "remarks": "",
                "bDesc_zh-CN": "木材 sc 1"
            },
            {
                "udfPJPwidth": 0,
                "udfPJPtestNum": 0,
                "oriMatLot": "A",
                "dualQty": 106,
                "preQty": 6,
                "bomQtyUnitId": 38887,
                "itemNo": "     2",
                "isSemi": false,
                "bomTreeLevel": "",
                "oriQty": 106,
                "bomReqQty": 106,
                "oriMatId": 3972,
                "bDesc": "圓形鑽石+0 (SI1) sc",
                "bDesc_zh-TW": "圓形鑽石+0 (SI1) tc",
                "refdest": "",
                "id": 3551,
                "udfPJPtestBool": false,
                "matcatId": 0,
                "dDesc_haha1": "",
                "hId": 425,
                "level": "  2",
                "bomPreQty": 6,
                "udfPJPtestLookup": 0,
                "completed": false,
                "footerKey": "     1",
                "dDesc": "",
                "udfPJPstring1": "",
                "i18nField": "{\"bDesc_en\": \"圓形鑽石+0 (SI1)\", \"bDesc_zh-CN\": \"圓形鑽石+0 (SI1) sc\", \"bDesc_zh-TW\": \"圓形鑽石+0 (SI1) tc\"}",
                "qty": 106,
                "tDate": 1648483200000,
                "dDesc_ctw": "",
                "pproId": 4634,
                "iRev": 3,
                "dDesc_zh-CN": "",
                "wastageQty": 0,
                "bDesc_ctw": "",
                "ce01Module": "prodMjob",
                "bomWastageQty": 0,
                "lot": "A",
                "bDesc_haha1": "",
                "treeLevel": "   1-   1-   1",
                "dDesc_zh-TW": "",
                "processId": 11,
                "plot": "A",
                "udfPJPtestStr": "",
                "bDesc_ccn": "",
                "unitId": 38887,
                "udfPJPtestDate": -2209017600000,
                "dDesc_ccn": "",
                "stdQty": 100,
                "bomId": 75,
                "bDesc_en": "圓形鑽石+0 (SI1)",
                "udfPJPlength": 0,
                "dDesc_en": "",
                "oriUnitId": 38887,
                "dualUnitId": 3937,
                "proId": 3972,
                "bomLot": "A",
                "bomStdQty": 100,
                "remarks": "",
                "bDesc_zh-CN": "圓形鑽石+0 (SI1) sc"
            }
        ],
        "prodremmjob": [
            {
                "hId": 425,
                "i18nField": "{\"remarks_zh-CN\": \"\"}",
                "remarks_zh-CN": "",
                "remarks_ccn": "",
                "remarks_en": "",
                "remarks_haha1": "",
                "iRev": 3,
                "id": 425,
                "remarks_zh-TW": "",
                "remarks": "",
                "remarks_ctw": "",
                "ce01Module": "prodMjob"
            }
        ],
        "prodmjobprot": [
            {
                "sourceId": 0,
                "udfPJPwidth": 0,
                "udfPJPtestNum": 1000,
                "dualQty": 100,
                "itemNo": "     1",
                "beId": 142,
                "oriQty": 100,
                "bDesc": "多工艺产品 sc 1",
                "bDesc_zh-TW": "多工艺产品 tc 1",
                "id": 501,
                "qcRequired": true,
                "udfPJPtestBool": true,
                "subcon": false,
                "dDesc_haha1": "",
                "hId": 425,
                "cDate": 1648656000000,
                "perCtn": 0,
                "udfPJPtestLookup": 0,
                "sideMark": "",
                "published": true,
                "completed": false,
                "volume": 0,
                "jobId": 0,
                "seedtime": 0,
                "footerKey": "     1",
                "dDesc": "<p>钻石套装 -- 18K鑽戒 (女) 1<br></p>",
                "udfPJPstring1": "Big",
                "i18nField": "{\"bDesc_en\": \"多工艺产品 1\", \"dDesc_en\": \"<p>钻石套装 -- 18K鑽戒 (女) 1<br></p>\", \"bDesc_zh-CN\": \"多工艺产品 sc 1\", \"bDesc_zh-TW\": \"多工艺产品 tc 1\", \"dDesc_zh-CN\": \"<p>钻石套装 -- 18K鑽戒 (女) 1<br></p>\", \"dDesc_zh-TW\": \"<p>&nbsp;</p>\"}",
                "sourceType": "pro",
                "sDate": 1648483200000,
                "subcQty": 0,
                "qty": 100,
                "jobLeadTime": 2,
                "dDesc_ctw": "",
                "nw": 0,
                "iRev": 3,
                "dDesc_zh-CN": "<p>钻石套装 -- 18K鑽戒 (女) 1<br></p>",
                "confirmed": true,
                "bDesc_ctw": "",
                "ce01Module": "prodMjob",
                "lot": "A",
                "prodQty": 100,
                "bDesc_haha1": "",
                "dDesc_zh-TW": "<p>&nbsp;</p>",
                "udfPJPtestStr": "UK",
                "bDesc_ccn": "",
                "unitId": 39720,
                "udfPJPtestDate": 1521129600000,
                "dDesc_ccn": "",
                "mainMark": "",
                "psfId": 3,
                "bomId": 75,
                "bDesc_en": "多工艺产品 1",
                "udfPJPlength": 0,
                "dDesc_en": "<p>钻石套装 -- 18K鑽戒 (女) 1<br></p>",
                "oriUnitId": 39720,
                "dualUnitId": 4489,
                "gw": 0,
                "sourceLot": "",
                "prodDetail": "<p>使用前请先摇一摇</p>",
                "proId": 4634,
                "cuspono": "",
                "remarks": "",
                "bDesc_zh-CN": "多工艺产品 sc 1"
            }
        ],
        "prodmjobtree": [
            {
                "hId": 425,
                "bomId": 75,
                "level": 1,
                "iRev": 3,
                "itemNo": "     1",
                "type": "pro",
                "ce01Module": "prodMjob",
                "sourceFooterKey": "     1",
                "rqty": 1,
                "masterProId": 4634,
                "pQty": 100,
                "treeLevel": "   1",
                "footerKey": "     1",
                "reqQty": 100,
                "processId": 0,
                "amWastage": 0,
                "bomReqQty": 0,
                "matId": 4634,
                "masterBomId": 75,
                "proId": 4634,
                "unitId": 39720,
                "id": 8049,
                "matBomId": 75
            },
            {
                "hId": 425,
                "bomId": 75,
                "level": 2,
                "iRev": 3,
                "itemNo": "     2",
                "type": "process",
                "ce01Module": "prodMjob",
                "sourceFooterKey": "     1",
                "rqty": 1,
                "masterProId": 4634,
                "pQty": 100,
                "treeLevel": "   1-   1",
                "footerKey": "     1",
                "reqQty": 0,
                "processId": 11,
                "amWastage": 0,
                "bomReqQty": 0,
                "matId": 0,
                "masterBomId": 75,
                "proId": 4634,
                "unitId": 39720,
                "id": 8050,
                "matBomId": 75
            },
            {
                "hId": 425,
                "bomId": 75,
                "level": 3,
                "iRev": 3,
                "itemNo": "     3",
                "type": "material",
                "ce01Module": "prodMjob",
                "sourceFooterKey": "     1",
                "rqty": 1,
                "masterProId": 4634,
                "pQty": 100,
                "treeLevel": "   1-   1-   1",
                "footerKey": "     1",
                "reqQty": 106,
                "processId": 11,
                "amWastage": 0,
                "bomReqQty": 106,
                "matId": 3972,
                "masterBomId": 75,
                "proId": 4634,
                "unitId": 39720,
                "id": 8051,
                "matBomId": 75
            },
            {
                "hId": 425,
                "bomId": 75,
                "level": 3,
                "iRev": 3,
                "itemNo": "     4",
                "type": "material",
                "ce01Module": "prodMjob",
                "sourceFooterKey": "     1",
                "rqty": 1,
                "masterProId": 4634,
                "pQty": 100,
                "treeLevel": "   1-   1-   2",
                "footerKey": "     1",
                "reqQty": 100,
                "processId": 11,
                "amWastage": 0,
                "bomReqQty": 100,
                "matId": 3971,
                "masterBomId": 75,
                "proId": 4634,
                "unitId": 39720,
                "id": 8052,
                "matBomId": 75
            },
            {
                "hId": 425,
                "bomId": 75,
                "level": 2,
                "iRev": 3,
                "itemNo": "     5",
                "type": "process",
                "ce01Module": "prodMjob",
                "sourceFooterKey": "     1",
                "rqty": 1,
                "masterProId": 4634,
                "pQty": 100,
                "treeLevel": "   1-   2",
                "footerKey": "     1",
                "reqQty": 0,
                "processId": 12,
                "amWastage": 0,
                "bomReqQty": 0,
                "matId": 0,
                "masterBomId": 75,
                "proId": 4634,
                "unitId": 39720,
                "id": 8053,
                "matBomId": 75
            },
            {
                "hId": 425,
                "bomId": 75,
                "level": 3,
                "iRev": 3,
                "itemNo": "     6",
                "type": "material",
                "ce01Module": "prodMjob",
                "sourceFooterKey": "     1",
                "rqty": 1,
                "masterProId": 4634,
                "pQty": 100,
                "treeLevel": "   1-   2-   1",
                "footerKey": "     1",
                "reqQty": 101,
                "processId": 12,
                "amWastage": 0,
                "bomReqQty": 101,
                "matId": 4236,
                "masterBomId": 75,
                "proId": 4634,
                "unitId": 39720,
                "id": 8054,
                "matBomId": 75
            }
        ],
        "prodmjobphoto": [
            {
                "hId": 425,
                "footerKey": "     1",
                "photoId": 612,
                "iRev": 3,
                "id": 125,
                "itemNo": "     1",
                "ce01Module": "prodMjob",
                "desc": "2"
            }
        ],
        "prodmjobt": [
            {
                "sourceId": 0,
                "udfPJPwidth": 0,
                "udfPJPtestNum": 1000,
                "dualQty": 100,
                "prqFooterKey": "",
                "itemNo": "     1",
                "prqSourceId": 0,
                "beId": 142,
                "oriQty": 100,
                "bDesc": "多工艺产品 sc 1",
                "bDesc_zh-TW": "多工艺产品 tc 1",
                "newLotno": 0,
                "id": 574,
                "udfPJPtestBool": true,
                "subcon": false,
                "dDesc_haha1": "",
                "hId": 425,
                "cDate": 1648656000000,
                "udfPJPtestLookup": 0,
                "prqResultId": 0,
                "completed": false,
                "dDesc": "<p>钻石套装 -- 18K鑽戒 (女) 1<br></p>",
                "footerKey": "     1",
                "udfPJPstring1": "Big",
                "i18nField": "{\"bDesc_en\": \"多工艺产品 1\", \"dDesc_en\": \"<p>钻石套装 -- 18K鑽戒 (女) 1<br></p>\", \"bDesc_zh-CN\": \"多工艺产品 sc 1\", \"bDesc_zh-TW\": \"多工艺产品 tc 1\", \"dDesc_zh-CN\": \"<p>钻石套装 -- 18K鑽戒 (女) 1<br></p>\", \"dDesc_zh-TW\": \"<p>&nbsp;</p>\"}",
                "sourceType": "pro",
                "sourceDDate": -2209017600000,
                "sDate": 1648483200000,
                "qty": 100,
                "lotNoId": 0,
                "dDesc_ctw": "",
                "costAmt": 0,
                "pproId": 4634,
                "iRev": 3,
                "dDesc_zh-CN": "<p>钻石套装 -- 18K鑽戒 (女) 1<br></p>",
                "bDesc_ctw": "",
                "ce01Module": "prodMjob",
                "lot": "A",
                "sourceDate": -2209017600000,
                "bDesc_haha1": "",
                "dDesc_zh-TW": "<p>&nbsp;</p>",
                "udfPJPtestStr": "UK",
                "bDesc_ccn": "",
                "unitId": 39720,
                "udfPJPtestDate": 1521129600000,
                "dDesc_ccn": "",
                "locId": 0,
                "psfId": 3,
                "bomId": 75,
                "bDesc_en": "多工艺产品 1",
                "udfPJPlength": 0,
                "dDesc_en": "<p>钻石套装 -- 18K鑽戒 (女) 1<br></p>",
                "dualUnitId": 4489,
                "oriUnitId": 39720,
                "prqSourceType": "pro",
                "sourceLot": "",
                "prqSourceLot": "",
                "proId": 4634,
                "cuspono": "",
                "ndFooterKey": "     1",
                "proLot": "A",
                "bDesc_zh-CN": "多工艺产品 sc 1"
            }
        ],
        "prodmjobpt": [
            {
                "sHour": 1,
                "cuId": 2,
                "dualQty": 100,
                "itemNo": "     1",
                "wcgDesc": "出水",
                "bomTreeLevel": "",
                "oriQty": 100,
                "id": 2063,
                "doctypeId": 0,
                "subcon": false,
                "pcNeed": true,
                "processRemarks_zh-TW": "",
                "hId": 425,
                "cDate": 1648656000000,
                "autoGenPw": false,
                "processItemNoDesc": "     2",
                "level": "  1",
                "dispNeed": true,
                "processDesc": "鑲石後電金",
                "completed": false,
                "wcgId": 15,
                "capUse": 201,
                "jobId": 1650,
                "cDateTime": "",
                "footerKey": "     1",
                "i18nField": "{\"processRemarks_zh-CN\": \"<p>aaaaaaaa</p>\"}",
                "processItemNo": "     1",
                "sDate": 1648483200000,
                "compId": 0,
                "qty": 100,
                "pHour": 200,
                "pbomId": 0,
                "tDate": 1648656000000,
                "pproId": 0,
                "endAccord": "latest",
                "processRemarks_zh-CN": "<p>aaaaaaaa</p>",
                "iRev": 3,
                "ce01Module": "prodMjob",
                "lot": "A",
                "treeLevel": "   1-   1",
                "plot": "",
                "processId": 11,
                "startAccord": "latest",
                "unitId": 39720,
                "minCap": 0,
                "processRemarks_ccn": "",
                "autoGenDisp": false,
                "sDateTime": "",
                "pjobId": 0,
                "bomId": 75,
                "processRemarks_ctw": "",
                "processRemarks_haha1": "",
                "pjobType": "prodJob",
                "processRemarks_en": "",
                "sFrequency": "job",
                "oriUnitId": 39720,
                "dualUnitId": 4489,
                "proId": 4634,
                "ndFooterKey": "     1",
                "processRemarks": "<p>aaaaaaaa</p>"
            },
            {
                "sHour": 0,
                "cuId": 2,
                "dualQty": 100,
                "itemNo": "     2",
                "wcgDesc": "披锋",
                "bomTreeLevel": "",
                "oriQty": 100,
                "id": 2064,
                "doctypeId": 0,
                "subcon": true,
                "pcNeed": false,
                "processRemarks_zh-TW": "",
                "hId": 425,
                "cDate": 1648656000000,
                "autoGenPw": false,
                "processItemNoDesc": "     1",
                "level": "  1",
                "dispNeed": false,
                "processDesc": "鑲石",
                "completed": false,
                "wcgId": 16,
                "capUse": 0,
                "jobId": 1651,
                "cDateTime": "",
                "footerKey": "     1",
                "i18nField": "{\"processRemarks_zh-CN\": \"<p>bbbbb</p>\"}",
                "processItemNo": "     2",
                "sDate": 1648483200000,
                "compId": 0,
                "qty": 100,
                "pHour": 0,
                "pbomId": 0,
                "tDate": 1648656000000,
                "pproId": 0,
                "endAccord": "latest",
                "processRemarks_zh-CN": "<p>bbbbb</p>",
                "iRev": 3,
                "ce01Module": "prodMjob",
                "lot": "A",
                "treeLevel": "   1-   2",
                "plot": "",
                "processId": 12,
                "startAccord": "latest",
                "unitId": 39720,
                "minCap": 0,
                "processRemarks_ccn": "",
                "autoGenDisp": false,
                "sDateTime": "",
                "pjobId": 0,
                "bomId": 75,
                "processRemarks_ctw": "",
                "processRemarks_haha1": "",
                "pjobType": "prodJob",
                "processRemarks_en": "",
                "sFrequency": "job",
                "oriUnitId": 39720,
                "dualUnitId": 4489,
                "proId": 4634,
                "ndFooterKey": "     2",
                "processRemarks": "<p>bbbbb</p>"
            }
        ],
        "prodmainmjob": [
            {
                "tDate": 1648656000000,
                "lastModifyUid": 20,
                "code": "MJ220005",
                "cnDeptId": 218,
                "considerSeedTime": true,
                "useAccess": false,
                "virDeptId": 1,
                "expiredDate": -2209017600000,
                "iRev": 3,
                "sysJson": "{\"autoGenCode\":{\"snId\":1034,\"code\":\"MJ220005\",\"sn\":\"5\"}}",
                "viewCode": "prodMjob",
                "ce01Module": "prodMjob",
                "recalcSch": false,
                "beId": 142,
                "expired": false,
                "printCount": 0,
                "useAccessBl": false,
                "id": 425,
                "doctypeId": 0,
                "statusModifyDate": 1648710495000,
                "locked": false,
                "lastModifyDate": 1648710496000,
                "createUid": 20,
                "createDate": 1648710488000,
                "rev": "1",
                "lastApproveUid": 20,
                "expiredUid": 0,
                "useAccessWl": false,
                "considerJobLeadTime": false,
                "useAccessAutoCalc": false,
                "staffId": 21,
                "status": "Y"
            }
        ]
    },
    "messages": [],
    "status": true
}

# 保存主生产工单

# 一、接口描述

​ 用于新增或者更新【主生产工单】

# 二、接口调用说明

​ 1、请求说明

URL http://[server]/jsf/rfws/root/api/save/prodMjob
http请求方式 PUT
编码类型 UTF-8

​ 2、URL参数

参数 类型 必填 说明
authorization String(Header) 是 OAuth获取的Access Token
client_id String(Header) 是 aiM18[授权应用列表]中的Client ID
menuCode String(Query) 是 prodMjob
param String(Query) 否 额外的系统参数;JSON字符串

​ 3、请求示例

	CloseableHttpClient client = HttpClientBuilder.create().build();
	CloseableHttpResponse res = null;
	try {

		String url = "http://" + HostIP + ":" + HostPort + "/jsf/rfws/root/api/save/prodMjob";
		String param = "&menuCode=prodMjob";

		HttpPut put = new HttpPut(url + "?" + param);
		put.addHeader("authorization", access_token);
		put.addHeader("client_id", ClientID);

		StringEntity entity = new StringEntity(data.toJSONString(), ContentType.APPLICATION_JSON);
		entity.setContentEncoding("UTF-8");
		put.setEntity(entity);

		res = client.execute(put);
		if (res.getStatusLine().getStatusCode() == HttpStatus.SC_OK) {
			JSONObject json = JSON.parseObject(EntityUtils.toString(res.getEntity()));

			if (json != null) {
				recordId = json.getLongValue("recordId");
			}

			System.out.println(json);
		}

		put.releaseConnection();
	} catch (Exception e) {
		e.printStackTrace();
	} finally {
		try {
			if (res != null) {
				res.close();
			}
			if (client != null) {
				client.close();
			}
		} catch (Exception ex) {
			ex.printStackTrace();
		}
	}				

Entity的JSON格式数据如下:

{
    "prodmjobmatt": {
        "values": [
            {
                "tDate": "2022-03-23",
                "level": "  2",
                "pproId": 4634,
                "preQty": 6,
                "oriUnitId": 38887,
                "lot": "A",
                "oriQty": 106,
                "treeLevel": "   1-   1-   1",
                "footerKey": "     1",
                "proId": 3972,
                "qty": 106,
                "unitId": 38887,
                "proLot": "A",
                "stdQty": 100
            }
        ]
    },
    "prodmjobprot": {
        "values": [
            {
                "sourceId": 0,
                "cDate": "2022-03-31",
                "oriUnitId": 39720,
                "lot": "A",
                "oriQty": 100,
                "sourceLot": "",
                "footerKey": "     1",
                "sourceType": "pro",
                "sDate": "2022-03-23",
                "proId": 4634,
                "qty": 100,
                "unitId": 39720,
                "proLot": "A"
            }
        ]
    },
    "prodmjobt": {
        "values": [
            {
                "sourceId": 0,
                "cDate": "2022-03-31",
                "oriUnitId": 39720,
                "lot": "A",
                "oriQty": 100,
                "sourceLot": "",
                "footerKey": "     1",
                "sourceType": "pro",
                "sDate": "2022-03-23",
                "proId": 4634,
                "qty": 100,
                "unitId": 39720,
                "ndFooterKey": "     1",
                "proLot": "A"
            }
        ]
    },
    "prodmjobpt": {
        "values": [
            {
                "tDate": "2022-03-23",
                "cDate": "2022-03-31",
                "cuId": 2,
                "level": "  1",
                "dispNeed": true,
                "wcgId": 15,
                "oriUnitId": 39720,
                "lot": "A",
                "oriQty": 100,
                "treeLevel": "   1-   1",
                "footerKey": "     1",
                "processId": 11,
                "sDate": "2022-03-23",
                "proId": 4634,
                "qty": 100,
                "unitId": 39720,
                "proLot": "A",
                "pcNeed": true
            }
        ]
    },
    "prodmainmjob": {
        "values": [
            {
                "beId": 142,
                "tDate": "2022-03-23",
                "code": "MJOBTEST",
                "virDeptId": 7,
                "staffId": 785
            }
        ]
    }
}

​ 4、返回示例

{
    "recordId": 439,
    "messages": [],
    "status": true
}
{
    "recordId": 0,
    "messages": [
        {
            "msgDetail": "必填项为空",
            "msgCode": "core_101905"
        }
    ],
    "status": false
}	

# 删除主生产工单

# 一、接口描述

​ 用于删除主生产工单

# 二、接口调用说明

​ 1、请求说明

URL http://[server]/jsf/rfws/root/api/delete/prodMjob
http请求方式 DELETE
编码类型 UTF-8

​ 2、URL参数

参数 类型 必填 说明
authorization String(Header) 是 OAuth获取的Access Token
client_id String(Header) 是 aiM18[授权应用列表]中的Client ID
menuCode String(Query) 是 prodMjob
id long(Query) 是 主生产工单的id
param String(Query) 否 额外的系统参数;JSON字符串

​ 3、请求示例

	CloseableHttpClient client = HttpClientBuilder.create().build();
	CloseableHttpResponse res = null;
	try {

		String url = "http://" + HostIP + ":" + HostPort + "/jsf/rfws/root/api/delete/prodMjob";
		String param = "&menuCode=prodMjob&id=" + id;

		HttpDelete delete = new HttpDelete(url + "?" + param);
		delete.addHeader("authorization", access_token);
		delete.addHeader("client_id", ClientID);

		res = client.execute(delete);
		if (res.getStatusLine().getStatusCode() == HttpStatus.SC_OK) {
			JSONObject json = JSON.parseObject(EntityUtils.toString(res.getEntity()));

			System.out.println(json);
		}

		delete.releaseConnection();
	} catch (Exception e) {
		e.printStackTrace();
	} finally {
		try {
			if (res != null) {
				res.close();
			}
			if (client != null) {
				client.close();
			}
		} catch (Exception ex) {
			ex.printStackTrace();
		}
	}				

​ 4、返回示例

{
	"messages": [],
	"status": true
}
{
    "messages": [
        {
            "msgDetail": "单据已被删除",
            "msgCode": "core_101017"
        }
    ],
    "status": false
}

# 读取EBI数据:主生产工单列表

# 一、接口描述

​ 用于执行EBI[主生产工单列表],返回EBI数据

# 二、接口调用说明

​ 1、请求说明

URL http://[server]/jsf/rfws/ebiWidget/loadReport
http请求方式 GET
编码类型 UTF-8

​ 2、URL参数

参数 类型 必填 说明
authorization String(Header) 是 OAuth获取的Access Token
client_id String(Header) 是 aiM18[授权应用列表]中的Client ID
formatId long(Query) 是 通过EBI接口获取到formatId
beId long(Query) 否 企业法人的ID。若不传,则查询所有有权限的BE数据
offset int(Query) 否 返回结果的开始行
rows int(Query) 否 返回结果的结束行

​ 3、请求示例

	CloseableHttpClient client = HttpClientBuilder.create().build();
	CloseableHttpResponse res = null;
	try {

		String url = "http://" + HostIP + ":" + HostPort + "/jsf/rfws/ebiWidget/loadReport";
		String param = "&formatId=" + formatId;

		HttpGet get = new HttpGet(url + "?" + param);
		get.addHeader("authorization", access_token);
		get.addHeader("client_id", ClientID);
		res = client.execute(get);
		if (res.getStatusLine().getStatusCode() == HttpStatus.SC_OK) {
			JSONObject json = JSON.parseObject(EntityUtils.toString(res.getEntity()));

			System.out.println(json);
		}

		get.releaseConnection();
	} catch (Exception e) {
		e.printStackTrace();
	} finally {
		try {
			if (res != null) {
				res.close();
			}
			if (client != null) {
				client.close();
			}
		} catch (Exception ex) {
			ex.printStackTrace();
		}
	}				

​ 4、返回示例

{
    "size": 1,
    "rows": [
        {
            "MAIN_compQty": "0.0000",
            "MAIN_outQty": "5.0000",
            "aiM18ReservedCol_dataIndex": 1,
            "MAIN_pdnPwRate": "0.00",
            "MAIN_pdnOutPwQty": "0.0000",
            "MAIN_planQty": "5.0000",
            "MJOB_A_code": "MJOB20170015",
            "PRO_A_id": "3967",
            "MAIN_pdnQty": "0.0000",
            "MAIN_outPdnQty": "5.0000",
            "MJOB_A_id": "29",
            "MAIN_pdnRate": "0.00",
            "MAIN_pwRate": "0.00",
            "PRO_A_code": "MX-JZ-F"
        }
    ]
}

ebi1

# 读取EBI数据:主生产工单数据来源报告

# 一、接口描述

​ 用于执行EBI[主生产工单数据来源报告],返回EBI数据

# 二、接口调用说明

​ 1、请求说明

URL http://[server]/jsf/rfws/ebiWidget/loadReport
http请求方式 GET
编码类型 UTF-8

​ 2、URL参数

参数 类型 必填 说明
authorization String(Header) 是 OAuth获取的Access Token
client_id String(Header) 是 aiM18[授权应用列表]中的Client ID
formatId long(Query) 是 通过EBI接口获取到formatId
beId long(Query) 否 企业法人的ID。若不传,则查询所有有权限的BE数据
offset int(Query) 否 返回结果的开始行
rows int(Query) 否 返回结果的结束行

​ 3、请求示例

	CloseableHttpClient client = HttpClientBuilder.create().build();
	CloseableHttpResponse res = null;
	try {

		String url = "http://" + HostIP + ":" + HostPort + "/jsf/rfws/ebiWidget/loadReport";
		String param = "&formatId=" + formatId;

		HttpGet get = new HttpGet(url + "?" + param);
		get.addHeader("authorization", access_token);
		get.addHeader("client_id", ClientID);
		res = client.execute(get);
		if (res.getStatusLine().getStatusCode() == HttpStatus.SC_OK) {
			JSONObject json = JSON.parseObject(EntityUtils.toString(res.getEntity()));

			System.out.println(json);
		}

		get.releaseConnection();
	} catch (Exception e) {
		e.printStackTrace();
	} finally {
		try {
			if (res != null) {
				res.close();
			}
			if (client != null) {
				client.close();
			}
		} catch (Exception ex) {
			ex.printStackTrace();
		}
	}				

​ 4、返回示例

{
    "size": 1,
    "rows": [
        {
            "MAIN_sourceType": "oldso",
            "MAIN_outQty": "8.0000",
            "MAIN_sourceQty": "11.0000",
            "aiM18ReservedCol_dataIndex": 1,
            "MAIN_basicDualQty": "0.00",
            "MAIN_sourceId": "764",
            "MAIN_sourceCode": "SO0170237"
        }
    ]
}

ebi2

# 工艺派工单

# 获取工艺派工单列表

# 一、接口描述

​ 用于获取工艺派工单列表(同UI界面左侧的Search List数据)

# 二、接口调用说明

​ 1、请求说明

URL http://[server]/jsf/rfws/search/search
http请求方式 GET
编码类型 UTF-8

​ 2、URL参数

参数 类型 必填 说明
authorization String(Header) 是 OAuth获取的Access Token
client_id String(Header) 是 aiM18[授权应用列表]中的Client ID
stSearch String(Query) 是 prodDisp
beId long(Query) 是 aiM18企业法人[部门]的ID
formatId long(Query) 否 aiM18[查询格式]的ID,用于获取[查询格式]步骤二中设定的栏位格式;若不使用此参数,则使用默认设置。
startRow int(Query) 否 返回结果的开始行
endRow int(Query) 否 返回结果的结束行
quickSearchStr String(Query) 否 用于设定关键字查找数据

​ 3、请求示例

	CloseableHttpClient client = HttpClientBuilder.create().build();
	CloseableHttpResponse res = null;
	try {

		String url = "http://" + HostIP + ":" + HostPort + "/jsf/rfws/search/search";
		String param = "&stSearch=prodDisp&beId=" + beId;

		HttpGet get = new HttpGet(url + "?" + param);
		get.addHeader("authorization", access_token);
		get.addHeader("client_id", ClientID);
		res = client.execute(get);
		if (res.getStatusLine().getStatusCode() == HttpStatus.SC_OK) {
			JSONObject json = JSON.parseObject(EntityUtils.toString(res.getEntity()));
		}
		get.releaseConnection();
	} catch (Exception e) {
		e.printStackTrace();
	} finally {
		try {
			if (res != null) {
				res.close();
			}
			if (client != null) {
				client.close();
			}
		} catch (Exception ex) {
			ex.printStackTrace();
		}
	}			

​ 4、返回示例

{
    "stSearch": "prodDisp",
    "size": 1,
    "stSearchDisplay": "工艺派工单",
    "values": [
        {
            "tDate": "2021-12-06",
            "code": "DISP20210004",
            "st_id": 136,
            "st_code": "DISP20210004",
            "st_desc": "DISP20210004",
            "iRev": 2,
            "prodMainDisp.lastModifyUid.simpleUser.desc__lang": "Milk",
            "id": 136,
            "lastModifyDate": "2021-12-06 18:06:35"
        }
    ]
}

# 新增工艺派工单(自动补全)

# 一、接口描述

​ 1. 用于新增【工艺派工单】

​ 2. 此接口方法有如下特点:

​ a. 支持使用code 替代 id 栏位

​ b. 职员栏位未填时,自动使用个人选项中的默认职员

​ c. 单据日期未填时,根据贸易参数设定中的日期选项取值

# 二、接口调用说明

​ 1、请求说明

URL http://[server]/jsf/rfws/erp/bsFlow/save/prodDisp
http请求方式 POST
编码类型 UTF-8

​ 2、URL参数

参数 类型 必填 说明
authorization String(Header) 是 OAuth获取的Access Token
client_id String(Header) 是 aiM18[授权应用列表]中的Client ID

​ 3、请求示例

	CloseableHttpClient client = HttpClientBuilder.create().build();
	CloseableHttpResponse res = null;
	try {

		String url = "http://" + HostIP + ":" + HostPort + "/jsf/rfws/erp/bsFlow/save/prodDisp";
		String param = "";

		HttpPost post = new HttpPost(url + "?" + param);
		post.addHeader("authorization", access_token);
		post.addHeader("client_id", ClientID);

		StringEntity entity = new StringEntity(data.toJSONString(), ContentType.APPLICATION_JSON);
		entity.setContentEncoding("UTF-8");
		post.setEntity(entity);

		res = client.execute(post);
		if (res.getStatusLine().getStatusCode() == HttpStatus.SC_OK) {
			JSONObject json = JSON.parseObject(EntityUtils.toString(res.getEntity()));

			if (json != null) {
				recordId = json.getLongValue("tranId");
			}
			System.out.println(json);
		}

		post.releaseConnection();
	} catch (Exception e) {
		e.printStackTrace();
	} finally {
		try {
			if (res != null) {
				res.close();
			}
			if (client != null) {
				client.close();
			}
		} catch (Exception ex) {
			ex.printStackTrace();
		}
	}

data数据示例:

{
    "beId": 142,
    "tDate": "2022-03-23",
    "code": "DISPTEST",
    "virDeptId": 7,
    "proddispt": [
        {
            "lot": "A",
            "jobId": 1650,
            "oriQty": 100,
            "proId": 4634,
            "oriUnitId": 39720
        }
    ]
}

​ 4、返回示例

{
    "tranId": 137,
    "tranCode": "DISPTEST",
    "message": "",
    "status": true
}

# 读取工艺派工单

# 一、接口描述

​ 用于读取工艺派工单数据

# 二、接口调用说明

​ 1、请求说明

URL http://[server]/jsf/rfws/root/api/read/prodDisp
http请求方式 GET
编码类型 UTF-8

​ 2、URL参数

参数 类型 必填 说明
authorization String(Header) 是 OAuth获取的Access Token
client_id String(Header) 是 aiM18[授权应用列表]中的Client ID
menuCode String(Query) 是 prodDisp
id long(Query) 是 工艺派工单的id
param String(Query) 否 额外的系统参数;JSON字符串

​ 3、请求示例

		CloseableHttpClient client = HttpClientBuilder.create().build();
		CloseableHttpResponse res = null;
		try {

			String url = "http://" + HostIP + ":" + HostPort + "/jsf/rfws/root/api/read/prodDisp";
			String param = "&menuCode=prodDisp&id=" + id;

			HttpGet get = new HttpGet(url + "?" + param);
			get.addHeader("authorization", access_token);
			get.addHeader("client_id", ClientID);
			res = client.execute(get);
			if (res.getStatusLine().getStatusCode() == HttpStatus.SC_OK) {
				JSONObject json = JSON.parseObject(EntityUtils.toString(res.getEntity()));

				System.out.println(json);
			}

			get.releaseConnection();
		} catch (Exception e) {
			e.printStackTrace();
		} finally {
			try {
				if (res != null) {
					res.close();
				}
				if (client != null) {
					client.close();
				}
			} catch (Exception ex) {
				ex.printStackTrace();
			}
		}

​ 4、返回示例

{
    "data": {},
    "messages": [
        {
            "msgDetail": "找不到相关记录,记录可能已被删除或你没有访问权限",
            "msgCode": "core_141019"
        }
    ],
    "status": false
}
{
    "data": {
        "proddispstt": [
            {
                "sourceId": 425,
                "dDesc_ctw": "",
                "dualQty": 0,
                "iRev": 1,
                "itemNo": "     1",
                "dDesc_zh-CN": "<p>钻石套装 -- 18K鑽戒 (女) 1<br></p>",
                "bDesc_ctw": "",
                "ce01Module": "prodDisp",
                "beId": 142,
                "sourceDate": 1647964800000,
                "oriQty": 100,
                "bDesc_haha1": "",
                "dDesc_zh-TW": "<p>&nbsp;</p>",
                "bDesc": "多工艺产品 sc 1",
                "bDesc_ccn": "",
                "bDesc_zh-TW": "多工艺产品 tc 1",
                "unitId": 39720,
                "dDesc_ccn": "",
                "id": 279,
                "dDesc_haha1": "",
                "hId": 137,
                "cDate": 1648656000000,
                "bDesc_en": "多工艺产品 1",
                "dDesc_en": "<p>钻石套装 -- 18K鑽戒 (女) 1<br></p>",
                "sourceProId": 4634,
                "oriUnitId": 39720,
                "dualUnitId": 0,
                "jobId": 1650,
                "sourceLot": "A",
                "sourceMjobLot": "A",
                "footerKey": "     1",
                "dDesc": "<p>钻石套装 -- 18K鑽戒 (女) 1<br></p>",
                "i18nField": "{\"bDesc_en\": \"多工艺产品 1\", \"dDesc_en\": \"<p>钻石套装 -- 18K鑽戒 (女) 1<br></p>\", \"bDesc_zh-CN\": \"多工艺产品 sc 1\", \"bDesc_zh-TW\": \"多工艺产品 tc 1\", \"dDesc_zh-CN\": \"<p>钻石套装 -- 18K鑽戒 (女) 1<br></p>\", \"dDesc_zh-TW\": \"<p>&nbsp;</p>\"}",
                "sourceType": "prodMjob",
                "sourceDDate": -2209017600000,
                "proId": 4634,
                "qty": 100,
                "bDesc_zh-CN": "多工艺产品 sc 1"
            }
        ],
        "prodremdisp": [
            {
                "hId": 137,
                "i18nField": "{\"remarks_zh-CN\": \"\"}",
                "remarks_zh-CN": "",
                "remarks_ccn": "",
                "remarks_en": "",
                "remarks_haha1": "",
                "iRev": 1,
                "id": 138,
                "remarks_zh-TW": "",
                "remarks": "",
                "remarks_ctw": "",
                "ce01Module": "prodDisp"
            }
        ],
        "proddispt": [
            {
                "dDesc_ctw": "",
                "dualQty": 0,
                "endAccord": "latest",
                "iRev": 1,
                "itemNo": "     1",
                "dDesc_zh-CN": "<p>钻石套装 -- 18K鑽戒 (女) 1<br></p>",
                "wcgDesc": "出水",
                "bDesc_ctw": "",
                "ce01Module": "prodDisp",
                "beId": 142,
                "ttlCapAss": 0,
                "oriQty": 100,
                "bDesc_haha1": "",
                "dDesc_zh-TW": "<p>&nbsp;</p>",
                "processId": 11,
                "startAccord": "latest",
                "bDesc": "多工艺产品 sc 1",
                "bDesc_ccn": "",
                "bDesc_zh-TW": "多工艺产品 tc 1",
                "unitId": 39720,
                "dDesc_ccn": "",
                "id": 209,
                "dDesc_haha1": "",
                "pjobId": 0,
                "hId": 137,
                "mjobId": 425,
                "cDate": 1648656000000,
                "bDesc_en": "多工艺产品 1",
                "processDesc": "鑲石後電金",
                "dDesc_en": "<p>钻石套装 -- 18K鑽戒 (女) 1<br></p>",
                "wcgId": 15,
                "oriUnitId": 39720,
                "dualUnitId": 4489,
                "jobId": 1650,
                "footerKey": "     1",
                "dDesc": "<p>钻石套装 -- 18K鑽戒 (女) 1<br></p>",
                "i18nField": "{\"bDesc_en\": \"多工艺产品 1\", \"dDesc_en\": \"<p>钻石套装 -- 18K鑽戒 (女) 1<br></p>\", \"bDesc_zh-CN\": \"多工艺产品 sc 1\", \"bDesc_zh-TW\": \"多工艺产品 tc 1\", \"dDesc_zh-CN\": \"<p>钻石套装 -- 18K鑽戒 (女) 1<br></p>\", \"dDesc_zh-TW\": \"<p>&nbsp;</p>\"}",
                "sDate": 1647964800000,
                "proId": 4634,
                "qty": 100,
                "bDesc_zh-CN": "多工艺产品 sc 1"
            }
        ],
        "prodmaindisp": [
            {
                "tDate": 1647964800000,
                "lastModifyUid": 20,
                "code": "DISPTEST",
                "cnDeptId": 0,
                "useAccess": false,
                "virDeptId": 7,
                "expiredDate": -2209017600000,
                "iRev": 1,
                "sysJson": "",
                "viewCode": "prodDisp",
                "ce01Module": "prodDisp",
                "beId": 142,
                "expired": false,
                "printCount": 0,
                "useAccessBl": false,
                "id": 137,
                "doctypeId": 0,
                "statusModifyDate": 1648868324000,
                "locked": false,
                "lastModifyDate": 1648868324000,
                "createUid": 20,
                "createDate": 1648868324000,
                "rev": "1",
                "lastApproveUid": 20,
                "expiredUid": 0,
                "useAccessWl": false,
                "useAccessAutoCalc": false,
                "staffId": 21,
                "status": "Y"
            }
        ]
    },
    "messages": [],
    "status": true
}

# 保存工艺派工单

# 一、接口描述

​ 用于新增或者更新【工艺派工单】

# 二、接口调用说明

​ 1、请求说明

URL http://[server]/jsf/rfws/root/api/save/prodDisp
http请求方式 PUT
编码类型 UTF-8

​ 2、URL参数

参数 类型 必填 说明
authorization String(Header) 是 OAuth获取的Access Token
client_id String(Header) 是 aiM18[授权应用列表]中的Client ID
menuCode String(Query) 是 prodDisp
param String(Query) 否 额外的系统参数;JSON字符串

​ 3、请求示例

	CloseableHttpClient client = HttpClientBuilder.create().build();
	CloseableHttpResponse res = null;
	try {

		String url = "http://" + HostIP + ":" + HostPort + "/jsf/rfws/root/api/save/prodDisp";
		String param = "&menuCode=prodDisp";

		HttpPut put = new HttpPut(url + "?" + param);
		put.addHeader("authorization", access_token);
		put.addHeader("client_id", ClientID);

		StringEntity entity = new StringEntity(data.toJSONString(), ContentType.APPLICATION_JSON);
		entity.setContentEncoding("UTF-8");
		put.setEntity(entity);

		res = client.execute(put);
		if (res.getStatusLine().getStatusCode() == HttpStatus.SC_OK) {
			JSONObject json = JSON.parseObject(EntityUtils.toString(res.getEntity()));

			if (json != null) {
				recordId = json.getLongValue("recordId");
			}

			System.out.println(json);
		}

		put.releaseConnection();
	} catch (Exception e) {
		e.printStackTrace();
	} finally {
		try {
			if (res != null) {
				res.close();
			}
			if (client != null) {
				client.close();
			}
		} catch (Exception ex) {
			ex.printStackTrace();
		}
	}				

Entity的JSON格式数据如下:

{
    "proddispstt": {
        "values": [
            {
                "sourceId": 425,
                "cDate": "2022-03-31",
                "oriUnitId": 39720,
                "sourceDate": "2022-03-23",
                "lot": "A",
                "jobId": 1650,
                "oriQty": 100,
                "sourceLot": "A",
                "sourceMjobLot": "A",
                "footerKey": "     1",
                "sourceType": "prodMjob",
                "proId": 4634,
                "qty": 100,
                "unitId": 39720,
                "proLot": "A"
            }
        ]
    },
    "proddispt": {
        "values": [
            {
                "mjobId": 425,
                "cDate": "2022-03-31",
                "wcgId": 15,
                "oriUnitId": 39720,
                "lot": "A",
                "jobId": 1650,
                "oriQty": 100,
                "footerKey": "     1",
                "processId": 11,
                "sDate": "2022-03-23",
                "proId": 4634,
                "qty": 100,
                "unitId": 39720
            }
        ]
    },
    "prodmaindisp": {
        "values": [
            {
                "beId": 142,
                "tDate": "2022-03-23",
                "code": "DISPTEST2",
                "virDeptId": 7,
                "staffId": 785
            }
        ]
    }
}

​ 4、返回示例

{
    "recordId": 138,
    "messages": [],
    "status": true
}
{
    "recordId": 0,
    "messages": [
        {
            "msgDetail": "必填项为空",
            "msgCode": "core_101905"
        }
    ],
    "status": false
}	

# 删除工艺派工单

# 一、接口描述

​ 用于删除工艺派工单

# 二、接口调用说明

​ 1、请求说明

URL http://[server]/jsf/rfws/root/api/delete/prodDisp
http请求方式 DELETE
编码类型 UTF-8

​ 2、URL参数

参数 类型 必填 说明
authorization String(Header) 是 OAuth获取的Access Token
client_id String(Header) 是 aiM18[授权应用列表]中的Client ID
menuCode String(Query) 是 prodDisp
id long(Query) 是 工艺派工单的id
param String(Query) 否 额外的系统参数;JSON字符串

​ 3、请求示例

	CloseableHttpClient client = HttpClientBuilder.create().build();
	CloseableHttpResponse res = null;
	try {

		String url = "http://" + HostIP + ":" + HostPort + "/jsf/rfws/root/api/delete/prodDisp";
		String param = "&menuCode=prodDisp&id=" + id;

		HttpDelete delete = new HttpDelete(url + "?" + param);
		delete.addHeader("authorization", access_token);
		delete.addHeader("client_id", ClientID);

		res = client.execute(delete);
		if (res.getStatusLine().getStatusCode() == HttpStatus.SC_OK) {
			JSONObject json = JSON.parseObject(EntityUtils.toString(res.getEntity()));

			System.out.println(json);
		}

		delete.releaseConnection();
	} catch (Exception e) {
		e.printStackTrace();
	} finally {
		try {
			if (res != null) {
				res.close();
			}
			if (client != null) {
				client.close();
			}
		} catch (Exception ex) {
			ex.printStackTrace();
		}
	}				

​ 4、返回示例

{
	"messages": [],
	"status": true
}
{
    "messages": [
        {
            "msgDetail": "单据已被删除",
            "msgCode": "core_101017"
        }
    ],
    "status": false
}

# 读取EBI数据:工艺派工单报告

# 一、接口描述

​ 用于执行EBI[工艺派工单报告],返回EBI数据

# 二、接口调用说明

​ 1、请求说明

URL http://[server]/jsf/rfws/ebiWidget/loadReport
http请求方式 GET
编码类型 UTF-8

​ 2、URL参数

参数 类型 必填 说明
authorization String(Header) 是 OAuth获取的Access Token
client_id String(Header) 是 aiM18[授权应用列表]中的Client ID
formatId long(Query) 是 通过EBI接口获取到formatId
beId long(Query) 否 企业法人的ID。若不传,则查询所有有权限的BE数据
offset int(Query) 否 返回结果的开始行
rows int(Query) 否 返回结果的结束行

​ 3、请求示例

	CloseableHttpClient client = HttpClientBuilder.create().build();
	CloseableHttpResponse res = null;
	try {

		String url = "http://" + HostIP + ":" + HostPort + "/jsf/rfws/ebiWidget/loadReport";
		String param = "&formatId=" + formatId;

		HttpGet get = new HttpGet(url + "?" + param);
		get.addHeader("authorization", access_token);
		get.addHeader("client_id", ClientID);
		res = client.execute(get);
		if (res.getStatusLine().getStatusCode() == HttpStatus.SC_OK) {
			JSONObject json = JSON.parseObject(EntityUtils.toString(res.getEntity()));

			System.out.println(json);
		}

		get.releaseConnection();
	} catch (Exception e) {
		e.printStackTrace();
	} finally {
		try {
			if (res != null) {
				res.close();
			}
			if (client != null) {
				client.close();
			}
		} catch (Exception ex) {
			ex.printStackTrace();
		}
	}				

​ 4、返回示例

{
    "size": 1,
    "rows": [
        {
            "MAIN_outQty": "0.0000",
            "DISP_A_id": "23",
            "aiM18ReservedCol_dataIndex": 1,
            "MAIN_qty": "5.0000",
            "MAIN_pcQty": "5.0000",
            "DISP_A_code": "DISP20170032"
        }
    ]
}

ebi2

# 工艺完工单

# 获取工艺完工单列表

# 一、接口描述

​ 用于获取工艺完工单列表(同UI界面左侧的Search List数据)

# 二、接口调用说明

​ 1、请求说明

URL http://[server]/jsf/rfws/search/search
http请求方式 GET
编码类型 UTF-8

​ 2、URL参数

参数 类型 必填 说明
authorization String(Header) 是 OAuth获取的Access Token
client_id String(Header) 是 aiM18[授权应用列表]中的Client ID
stSearch String(Query) 是 prodPc
beId long(Query) 是 aiM18企业法人[部门]的ID
formatId long(Query) 否 aiM18[查询格式]的ID,用于获取[查询格式]步骤二中设定的栏位格式;若不使用此参数,则使用默认设置。
startRow int(Query) 否 返回结果的开始行
endRow int(Query) 否 返回结果的结束行
quickSearchStr String(Query) 否 用于设定关键字查找数据

​ 3、请求示例

	CloseableHttpClient client = HttpClientBuilder.create().build();
	CloseableHttpResponse res = null;
	try {

		String url = "http://" + HostIP + ":" + HostPort + "/jsf/rfws/search/search";
		String param = "&stSearch=prodPc&beId=" + beId;

		HttpGet get = new HttpGet(url + "?" + param);
		get.addHeader("authorization", access_token);
		get.addHeader("client_id", ClientID);
		res = client.execute(get);
		if (res.getStatusLine().getStatusCode() == HttpStatus.SC_OK) {
			JSONObject json = JSON.parseObject(EntityUtils.toString(res.getEntity()));
		}
		get.releaseConnection();
	} catch (Exception e) {
		e.printStackTrace();
	} finally {
		try {
			if (res != null) {
				res.close();
			}
			if (client != null) {
				client.close();
			}
		} catch (Exception ex) {
			ex.printStackTrace();
		}
	}			

​ 4、返回示例

{
    "stSearch": "prodPc",
    "size": 1,
    "stSearchDisplay": "工艺完工单",
    "values": [
        {
            "tDate": "2021-09-27",
            "code": "PC20210002",
            "st_id": 102,
            "st_code": "PC20210002",
            "prodMainPc.lastModifyUid.simpleUser.desc__lang": "Milk",
            "st_desc": "PC20210002",
            "iRev": 3,
            "id": 102,
            "lastModifyDate": "2021-09-26 14:19:52"
        }
    ]
}

# 新增工艺完工单(自动补全)

# 一、接口描述

​ 1. 用于新增【工艺完工单】

​ 2. 此接口方法有如下特点:

​ a. 支持使用code 替代 id 栏位

​ b. 职员栏位未填时,自动使用个人选项中的默认职员

​ c. 单据日期未填时,根据贸易参数设定中的日期选项取值

# 二、接口调用说明

​ 1、请求说明

URL http://[server]/jsf/rfws/erp/bsFlow/save/prodPc
http请求方式 POST
编码类型 UTF-8

​ 2、URL参数

参数 类型 必填 说明
authorization String(Header) 是 OAuth获取的Access Token
client_id String(Header) 是 aiM18[授权应用列表]中的Client ID

​ 3、请求示例

	CloseableHttpClient client = HttpClientBuilder.create().build();
	CloseableHttpResponse res = null;
	try {

		String url = "http://" + HostIP + ":" + HostPort + "/jsf/rfws/erp/bsFlow/save/prodPc";
		String param = "";

		HttpPost post = new HttpPost(url + "?" + param);
		post.addHeader("authorization", access_token);
		post.addHeader("client_id", ClientID);

		StringEntity entity = new StringEntity(data.toJSONString(), ContentType.APPLICATION_JSON);
		entity.setContentEncoding("UTF-8");
		post.setEntity(entity);

		res = client.execute(post);
		if (res.getStatusLine().getStatusCode() == HttpStatus.SC_OK) {
			JSONObject json = JSON.parseObject(EntityUtils.toString(res.getEntity()));

			if (json != null) {
				recordId = json.getLongValue("tranId");
			}
			System.out.println(json);
		}

		post.releaseConnection();
	} catch (Exception e) {
		e.printStackTrace();
	} finally {
		try {
			if (res != null) {
				res.close();
			}
			if (client != null) {
				client.close();
			}
		} catch (Exception ex) {
			ex.printStackTrace();
		}
	}

data数据示例:

{
    "beId": 142,
    "tDate": "2022-03-23",
    "code": "PCTEST",
    "virDeptId": 7,
    "prodpct": [
        {
            "sourceId": 139,
            "lot": "A",
            "jobId": 1650,
            "oriQty": 100,
            "sourceType": "prodDisp",
            "proId": 4634,
            "oriUnitId": 39720,
            "passQty": 100
        }
    ]
}

​ 4、返回示例

{
    "tranId": 104,
    "tranCode": "PCTEST",
    "message": "",
    "status": true
}

# 读取工艺完工单

# 一、接口描述

​ 用于读取工艺完工单数据

# 二、接口调用说明

​ 1、请求说明

URL http://[server]/jsf/rfws/root/api/read/prodPc
http请求方式 GET
编码类型 UTF-8

​ 2、URL参数

参数 类型 必填 说明
authorization String(Header) 是 OAuth获取的Access Token
client_id String(Header) 是 aiM18[授权应用列表]中的Client ID
menuCode String(Query) 是 prodPc
id long(Query) 是 工艺完工单的id
param String(Query) 否 额外的系统参数;JSON字符串

​ 3、请求示例

		CloseableHttpClient client = HttpClientBuilder.create().build();
		CloseableHttpResponse res = null;
		try {

			String url = "http://" + HostIP + ":" + HostPort + "/jsf/rfws/root/api/read/prodPc";
			String param = "&menuCode=prodPc&id=" + id;

			HttpGet get = new HttpGet(url + "?" + param);
			get.addHeader("authorization", access_token);
			get.addHeader("client_id", ClientID);
			res = client.execute(get);
			if (res.getStatusLine().getStatusCode() == HttpStatus.SC_OK) {
				JSONObject json = JSON.parseObject(EntityUtils.toString(res.getEntity()));

				System.out.println(json);
			}

			get.releaseConnection();
		} catch (Exception e) {
			e.printStackTrace();
		} finally {
			try {
				if (res != null) {
					res.close();
				}
				if (client != null) {
					client.close();
				}
			} catch (Exception ex) {
				ex.printStackTrace();
			}
		}

​ 4、返回示例

{
    "data": {},
    "messages": [
        {
            "msgDetail": "找不到相关记录,记录可能已被删除或你没有访问权限",
            "msgCode": "core_141019"
        }
    ],
    "status": false
}
{
    "data": {
        "prodrempc": [
            {
                "hId": 104,
                "i18nField": "{\"remarks_zh-CN\": \"\"}",
                "remarks_zh-CN": "",
                "remarks_ccn": "",
                "remarks_en": "",
                "remarks_haha1": "",
                "iRev": 1,
                "id": 104,
                "remarks_zh-TW": "",
                "remarks": "",
                "remarks_ctw": "",
                "ce01Module": "prodPc"
            }
        ],
        "prodmainpc": [
            {
                "tDate": 1647964800000,
                "lastModifyUid": 20,
                "code": "PCTEST",
                "cnDeptId": 0,
                "useAccess": false,
                "virDeptId": 7,
                "expiredDate": -2209017600000,
                "iRev": 1,
                "sysJson": "",
                "viewCode": "prodPc",
                "ce01Module": "prodPc",
                "beId": 142,
                "expired": false,
                "printCount": 0,
                "useAccessBl": false,
                "id": 104,
                "doctypeId": 0,
                "statusModifyDate": 1648870289000,
                "locked": false,
                "lastModifyDate": 1648870289000,
                "createUid": 20,
                "createDate": 1648870289000,
                "rev": "1",
                "lastApproveUid": 20,
                "expiredUid": 0,
                "useAccessWl": false,
                "useAccessAutoCalc": false,
                "staffId": 785,
                "status": "Y"
            }
        ],
        "prodpct": [
            {
                "sourceId": 139,
                "failQty": 0,
                "dualQty": 0,
                "itemNo": "     1",
                "laborStaffId": 0,
                "wcgDesc": "出水",
                "beId": 142,
                "oriQty": 100,
                "bDesc": "多工艺产品 sc 1",
                "bDesc_zh-TW": "多工艺产品 tc 1",
                "directLaborUnit": "staff",
                "id": 224,
                "dDesc_haha1": "",
                "hId": 104,
                "autoGenPw": false,
                "processDesc": "鑲石後電金",
                "wcgId": 15,
                "calcByLaborCountedQty": false,
                "passQty": 100,
                "jobId": 1650,
                "footerKey": "     1",
                "dDesc": "<p>钻石套装 -- 18K鑽戒 (女) 1<br></p>",
                "laborCountedQty": 100,
                "i18nField": "{\"bDesc_en\": \"多工艺产品 1\", \"dDesc_en\": \"<p>钻石套装 -- 18K鑽戒 (女) 1<br></p>\", \"bDesc_zh-CN\": \"多工艺产品 sc 1\", \"bDesc_zh-TW\": \"多工艺产品 tc 1\", \"dDesc_zh-CN\": \"<p>钻石套装 -- 18K鑽戒 (女) 1<br></p>\", \"dDesc_zh-TW\": \"<p>&nbsp;</p>\"}",
                "sourceType": "prodDisp",
                "qty": 100,
                "scrapMachineQty": 0,
                "dDesc_ctw": "",
                "iRev": 1,
                "dDesc_zh-CN": "<p>钻石套装 -- 18K鑽戒 (女) 1<br></p>",
                "bDesc_ctw": "",
                "ce01Module": "prodPc",
                "bDesc_haha1": "",
                "dDesc_zh-TW": "<p>&nbsp;</p>",
                "processId": 11,
                "bDesc_ccn": "",
                "scrapMQty": 0,
                "unitId": 39720,
                "dDesc_ccn": "",
                "pjobId": 0,
                "mjobId": 425,
                "bDesc_en": "多工艺产品 1",
                "scrapQty": 0,
                "dDesc_en": "<p>钻石套装 -- 18K鑽戒 (女) 1<br></p>",
                "oriUnitId": 39720,
                "dualUnitId": 4489,
                "noLaborCost": false,
                "sourceLot": "",
                "laborGroupId": 0,
                "proId": 4634,
                "dispId": 139,
                "bDesc_zh-CN": "多工艺产品 sc 1"
            }
        ],
        "prodpcstt": [
            {
                "sourceId": 425,
                "dDesc_ctw": "",
                "dualQty": 0,
                "iRev": 1,
                "itemNo": "     1",
                "dDesc_zh-CN": "<p>钻石套装 -- 18K鑽戒 (女) 1<br></p>",
                "bDesc_ctw": "",
                "ce01Module": "prodPc",
                "beId": 142,
                "oriQty": 100,
                "bDesc_haha1": "",
                "dDesc_zh-TW": "<p>&nbsp;</p>",
                "bDesc": "多工艺产品 sc 1",
                "bDesc_ccn": "",
                "bDesc_zh-TW": "多工艺产品 tc 1",
                "unitId": 39720,
                "dDesc_ccn": "",
                "id": 299,
                "dDesc_haha1": "",
                "hId": 104,
                "bDesc_en": "多工艺产品 1",
                "dDesc_en": "<p>钻石套装 -- 18K鑽戒 (女) 1<br></p>",
                "sourceProId": 4634,
                "oriUnitId": 39720,
                "dualUnitId": 0,
                "jobId": 1650,
                "sourceLot": "A",
                "sourceMjobLot": "A",
                "footerKey": "     1",
                "dDesc": "<p>钻石套装 -- 18K鑽戒 (女) 1<br></p>",
                "i18nField": "{\"bDesc_en\": \"多工艺产品 1\", \"dDesc_en\": \"<p>钻石套装 -- 18K鑽戒 (女) 1<br></p>\", \"bDesc_zh-CN\": \"多工艺产品 sc 1\", \"bDesc_zh-TW\": \"多工艺产品 tc 1\", \"dDesc_zh-CN\": \"<p>钻石套装 -- 18K鑽戒 (女) 1<br></p>\", \"dDesc_zh-TW\": \"<p>&nbsp;</p>\"}",
                "sourceType": "prodMjob",
                "proId": 4634,
                "qty": 100,
                "dispId": 139,
                "bDesc_zh-CN": "多工艺产品 sc 1"
            }
        ]
    },
    "messages": [],
    "status": true
}

# 保存工艺完工单

# 一、接口描述

​ 用于新增或者更新【工艺完工单】

# 二、接口调用说明

​ 1、请求说明

URL http://[server]/jsf/rfws/root/api/save/prodPc
http请求方式 PUT
编码类型 UTF-8

​ 2、URL参数

参数 类型 必填 说明
authorization String(Header) 是 OAuth获取的Access Token
client_id String(Header) 是 aiM18[授权应用列表]中的Client ID
menuCode String(Query) 是 prodPc
param String(Query) 否 额外的系统参数;JSON字符串

​ 3、请求示例

	CloseableHttpClient client = HttpClientBuilder.create().build();
	CloseableHttpResponse res = null;
	try {

		String url = "http://" + HostIP + ":" + HostPort + "/jsf/rfws/root/api/save/prodPc";
		String param = "&menuCode=prodPc";

		HttpPut put = new HttpPut(url + "?" + param);
		put.addHeader("authorization", access_token);
		put.addHeader("client_id", ClientID);

		StringEntity entity = new StringEntity(data.toJSONString(), ContentType.APPLICATION_JSON);
		entity.setContentEncoding("UTF-8");
		put.setEntity(entity);

		res = client.execute(put);
		if (res.getStatusLine().getStatusCode() == HttpStatus.SC_OK) {
			JSONObject json = JSON.parseObject(EntityUtils.toString(res.getEntity()));

			if (json != null) {
				recordId = json.getLongValue("recordId");
			}

			System.out.println(json);
		}

		put.releaseConnection();
	} catch (Exception e) {
		e.printStackTrace();
	} finally {
		try {
			if (res != null) {
				res.close();
			}
			if (client != null) {
				client.close();
			}
		} catch (Exception ex) {
			ex.printStackTrace();
		}
	}				

Entity的JSON格式数据如下:

{
    "prodmainpc": {
        "values": [
            {
                "beId": 142,
                "tDate": "2022-03-23",
                "code": "PCTEST2",
                "virDeptId": 7,
                "staffId": 785
            }
        ]
    },
    "prodpct": {
        "values": [
            {
                "sourceId": 139,
                "mjobId": 425,
                "wcgId": 15,
                "oriUnitId": 39720,
                "passQty": 100,
                "lot": "A",
                "jobId": 1650,
                "oriQty": 100,
                "sourceLot": "",
                "footerKey": "     1",
                "sourceType": "prodDisp",
                "processId": 11,
                "proId": 4634,
                "qty": 100,
                "unitId": 39720,
                "dispId": 139
            }
        ]
    },
    "prodpcstt": {
        "values": [
            {
                "sourceId": 425,
                "sourceProId": 4634,
                "oriUnitId": 39720,
                "lot": "A",
                "jobId": 1650,
                "oriQty": 100,
                "sourceLot": "A",
                "sourceMjobLot": "A",
                "footerKey": "     1",
                "sourceType": "prodMjob",
                "proId": 4634,
                "qty": 100,
                "unitId": 39720,
                "dispId": 139
            }
        ]
    }
}

​ 4、返回示例

{
    "recordId": 138,
    "messages": [],
    "status": true
}
{
    "recordId": 0,
    "messages": [
        {
            "msgDetail": "必填项为空",
            "msgCode": "core_101905"
        }
    ],
    "status": false
}	

# 删除工艺完工单

# 一、接口描述

​ 用于删除工艺完工单

# 二、接口调用说明

​ 1、请求说明

URL http://[server]/jsf/rfws/root/api/delete/prodPc
http请求方式 DELETE
编码类型 UTF-8

​ 2、URL参数

参数 类型 必填 说明
authorization String(Header) 是 OAuth获取的Access Token
client_id String(Header) 是 aiM18[授权应用列表]中的Client ID
menuCode String(Query) 是 prodPc
id long(Query) 是 工艺完工单的id
param String(Query) 否 额外的系统参数;JSON字符串

​ 3、请求示例

	CloseableHttpClient client = HttpClientBuilder.create().build();
	CloseableHttpResponse res = null;
	try {

		String url = "http://" + HostIP + ":" + HostPort + "/jsf/rfws/root/api/delete/prodPc";
		String param = "&menuCode=prodPc&id=" + id;

		HttpDelete delete = new HttpDelete(url + "?" + param);
		delete.addHeader("authorization", access_token);
		delete.addHeader("client_id", ClientID);

		res = client.execute(delete);
		if (res.getStatusLine().getStatusCode() == HttpStatus.SC_OK) {
			JSONObject json = JSON.parseObject(EntityUtils.toString(res.getEntity()));

			System.out.println(json);
		}

		delete.releaseConnection();
	} catch (Exception e) {
		e.printStackTrace();
	} finally {
		try {
			if (res != null) {
				res.close();
			}
			if (client != null) {
				client.close();
			}
		} catch (Exception ex) {
			ex.printStackTrace();
		}
	}				

​ 4、返回示例

{
	"messages": [],
	"status": true
}
{
    "messages": [
        {
            "msgDetail": "单据已被删除",
            "msgCode": "core_101017"
        }
    ],
    "status": false
}

# 读取EBI数据:工艺完工单报告

# 一、接口描述

​ 用于执行EBI[工艺完工单报告],返回EBI数据

# 二、接口调用说明

​ 1、请求说明

URL http://[server]/jsf/rfws/ebiWidget/loadReport
http请求方式 GET
编码类型 UTF-8

​ 2、URL参数

参数 类型 必填 说明
authorization String(Header) 是 OAuth获取的Access Token
client_id String(Header) 是 aiM18[授权应用列表]中的Client ID
formatId long(Query) 是 通过EBI接口获取到formatId
beId long(Query) 否 企业法人的ID。若不传,则查询所有有权限的BE数据
offset int(Query) 否 返回结果的开始行
rows int(Query) 否 返回结果的结束行

​ 3、请求示例

	CloseableHttpClient client = HttpClientBuilder.create().build();
	CloseableHttpResponse res = null;
	try {

		String url = "http://" + HostIP + ":" + HostPort + "/jsf/rfws/ebiWidget/loadReport";
		String param = "&formatId=" + formatId;

		HttpGet get = new HttpGet(url + "?" + param);
		get.addHeader("authorization", access_token);
		get.addHeader("client_id", ClientID);
		res = client.execute(get);
		if (res.getStatusLine().getStatusCode() == HttpStatus.SC_OK) {
			JSONObject json = JSON.parseObject(EntityUtils.toString(res.getEntity()));

			System.out.println(json);
		}

		get.releaseConnection();
	} catch (Exception e) {
		e.printStackTrace();
	} finally {
		try {
			if (res != null) {
				res.close();
			}
			if (client != null) {
				client.close();
			}
		} catch (Exception ex) {
			ex.printStackTrace();
		}
	}				

​ 4、返回示例

{
    "size": 1,
    "rows": [
        {
            "MAIN_outProdQty": "5.0000",
            "MAINPC_A_id": "1",
            "MJOBPRO_A_id": "3964",
            "aiM18ReservedCol_dataIndex": 1,
            "MAIN_stType": "prodDisp",
            "MAIN_stCode": "DISP20170003",
            "MAIN_sourceId": "764",
            "MAIN_sourceCode": "SO0170237",
            "PRO_A_id": "3967",
            "MAINPC_A_code": "PC20170001",
            "MAIN_sourceCDate": "2017.08.03",
            "MJOBPRO_A_code": "MX-JZ",
            "MAIN_sourceType": "oldso",
            "MAIN_stId": "3",
            "MAIN_pwQty": "0.0000",
            "MAIN_outPcQty": "5.0000",
            "MAINSO_A_code": "",
            "PRO_A_code": "MX-JZ-F",
            "MAIN_sourceDDate": "2017.08.01",
            "MAINSO_A_id": "0"
        }
    ]
}

ebi2

# 生产领料单

# 获取生产领料单列表

# 一、接口描述

​ 用于获取生产领料单列表(同UI界面左侧的Search List数据)

# 二、接口调用说明

​ 1、请求说明

URL http://[server]/jsf/rfws/search/search
http请求方式 GET
编码类型 UTF-8

​ 2、URL参数

参数 类型 必填 说明
authorization String(Header) 是 OAuth获取的Access Token
client_id String(Header) 是 aiM18[授权应用列表]中的Client ID
stSearch String(Query) 是 prodPick
beId long(Query) 是 aiM18企业法人[部门]的ID
formatId long(Query) 否 aiM18[查询格式]的ID,用于获取[查询格式]步骤二中设定的栏位格式;若不使用此参数,则使用默认设置。
startRow int(Query) 否 返回结果的开始行
endRow int(Query) 否 返回结果的结束行
quickSearchStr String(Query) 否 用于设定关键字查找数据

​ 3、请求示例

	CloseableHttpClient client = HttpClientBuilder.create().build();
	CloseableHttpResponse res = null;
	try {

		String url = "http://" + HostIP + ":" + HostPort + "/jsf/rfws/search/search";
		String param = "&stSearch=prodPick&beId=" + beId;

		HttpGet get = new HttpGet(url + "?" + param);
		get.addHeader("authorization", access_token);
		get.addHeader("client_id", ClientID);
		res = client.execute(get);
		if (res.getStatusLine().getStatusCode() == HttpStatus.SC_OK) {
			JSONObject json = JSON.parseObject(EntityUtils.toString(res.getEntity()));
		}
		get.releaseConnection();
	} catch (Exception e) {
		e.printStackTrace();
	} finally {
		try {
			if (res != null) {
				res.close();
			}
			if (client != null) {
				client.close();
			}
		} catch (Exception ex) {
			ex.printStackTrace();
		}
	}			

​ 4、返回示例

{
    "stSearch": "prodPick",
    "size": 1,
    "stSearchDisplay": "生产领料单",
    "values": [
        {
            "tDate": "2022-03-01",
            "code": "PICK20220003",
            "st_id": 125,
            "st_code": "PICK20220003",
            "prodMainPick.lastModifyUid.simpleUser.desc__lang": "Milk",
            "st_desc": "PICK20220003",
            "iRev": 2,
            "id": 125,
            "lastModifyDate": "2022-03-17 12:17:48"
        }
    ]
}

# 新增生产领料单(自动补全)

# 一、接口描述

​ 1. 用于新增【生产领料单】

​ 2. 此接口方法有如下特点:

​ a. 支持使用code 替代 id 栏位

​ b. 职员栏位未填时,自动使用个人选项中的默认职员

​ c. 单据日期未填时,根据贸易参数设定中的日期选项取值

# 二、接口调用说明

​ 1、请求说明

URL http://[server]/jsf/rfws/erp/bsFlow/save/prodPick
http请求方式 POST
编码类型 UTF-8

​ 2、URL参数

参数 类型 必填 说明
authorization String(Header) 是 OAuth获取的Access Token
client_id String(Header) 是 aiM18[授权应用列表]中的Client ID

​ 3、请求示例

	CloseableHttpClient client = HttpClientBuilder.create().build();
	CloseableHttpResponse res = null;
	try {

		String url = "http://" + HostIP + ":" + HostPort + "/jsf/rfws/erp/bsFlow/save/prodPick";
		String param = "";

		HttpPost post = new HttpPost(url + "?" + param);
		post.addHeader("authorization", access_token);
		post.addHeader("client_id", ClientID);

		StringEntity entity = new StringEntity(data.toJSONString(), ContentType.APPLICATION_JSON);
		entity.setContentEncoding("UTF-8");
		post.setEntity(entity);

		res = client.execute(post);
		if (res.getStatusLine().getStatusCode() == HttpStatus.SC_OK) {
			JSONObject json = JSON.parseObject(EntityUtils.toString(res.getEntity()));

			if (json != null) {
				recordId = json.getLongValue("tranId");
			}
			System.out.println(json);
		}

		post.releaseConnection();
	} catch (Exception e) {
		e.printStackTrace();
	} finally {
		try {
			if (res != null) {
				res.close();
			}
			if (client != null) {
				client.close();
			}
		} catch (Exception ex) {
			ex.printStackTrace();
		}
	}

data数据示例:

{
    "beId": 142,
    "tDate": "2022-03-23",
    "code": "PCTEST",
    "virDeptId": 7,
    "prodpickmatt": [
        {
            "sourceId": 1650,
            "lot": "A",
            "jobId": 1650,
            "oriQty": 100,
            "sourceLot": "A",
            "sourceType": "prodJob",
            "proId": 3972,
            "oriUnitId": 38887,
            "locId": 15
        }
    ]
}

​ 4、返回示例

{
    "tranId": 126,
    "tranCode": "PICKTEST",
    "message": "",
    "status": true
}

# 读取生产领料单

# 一、接口描述

​ 用于读取生产领料单数据

# 二、接口调用说明

​ 1、请求说明

URL http://[server]/jsf/rfws/root/api/read/prodPick
http请求方式 GET
编码类型 UTF-8

​ 2、URL参数

参数 类型 必填 说明
authorization String(Header) 是 OAuth获取的Access Token
client_id String(Header) 是 aiM18[授权应用列表]中的Client ID
menuCode String(Query) 是 prodPick
id long(Query) 是 生产领料单的id
param String(Query) 否 额外的系统参数;JSON字符串

​ 3、请求示例

		CloseableHttpClient client = HttpClientBuilder.create().build();
		CloseableHttpResponse res = null;
		try {

			String url = "http://" + HostIP + ":" + HostPort + "/jsf/rfws/root/api/read/prodPick";
			String param = "&menuCode=prodPick&id=" + id;

			HttpGet get = new HttpGet(url + "?" + param);
			get.addHeader("authorization", access_token);
			get.addHeader("client_id", ClientID);
			res = client.execute(get);
			if (res.getStatusLine().getStatusCode() == HttpStatus.SC_OK) {
				JSONObject json = JSON.parseObject(EntityUtils.toString(res.getEntity()));

				System.out.println(json);
			}

			get.releaseConnection();
		} catch (Exception e) {
			e.printStackTrace();
		} finally {
			try {
				if (res != null) {
					res.close();
				}
				if (client != null) {
					client.close();
				}
			} catch (Exception ex) {
				ex.printStackTrace();
			}
		}

​ 4、返回示例

{
    "data": {},
    "messages": [
        {
            "msgDetail": "找不到相关记录,记录可能已被删除或你没有访问权限",
            "msgCode": "core_141019"
        }
    ],
    "status": false
}
{
    "data": {
        "prodpickmatt": [
            {
                "lotnoNumAttr17": 0,
                "lotnoNumAttr16": 0,
                "lotnoNumAttr15": 0,
                "lotnoNumAttr14": 0,
                "lotnoNumAttr19": 0,
                "pbDesc": "多工艺产品 sc 1",
                "lotnoNumAttr18": 0,
                "lotnoLookupAttr20": 0,
                "lotnoNumAttr13": 0,
                "lotnoNumAttr12": 0,
                "lotnoNumAttr11": 0,
                "lotnoNumAttr10": 0,
                "isSemi": false,
                "lotnoLookupAttr16": 0,
                "oriQty": 100,
                "lotnoLookupAttr17": 0,
                "lotnoLookupAttr14": 0,
                "lotnoLookupAttr15": 0,
                "lotnoLookupAttr18": 0,
                "bDesc_zh-TW": "圓形鑽石+0 (SI1) tc",
                "lotnoLookupAttr19": 0,
                "newLotno": 0,
                "refdest": "",
                "lotnoLot": "A",
                "id": 455,
                "pbDesc_zh-TW": "",
                "dDesc_haha1": "",
                "lotnoNumAttr20": 0,
                "pdDesc_ccn": "",
                "lotnoLookupAttr12": 0,
                "wcgId": 15,
                "lotnoLookupAttr13": 0,
                "lotnoLookupAttr10": 0,
                "lotnoLookupAttr11": 0,
                "wcId": 0,
                "i18nField": "{\"bDesc_en\": \"圓形鑽石+0 (SI1)\", \"bDesc_zh-CN\": \"圓形鑽石+0 (SI1) sc\", \"bDesc_zh-TW\": \"圓形鑽石+0 (SI1) tc\", \"dDesc_zh-CN\": \"\", \"pbDesc_zh-CN\": \"多工艺产品 sc 1\", \"pdDesc_zh-CN\": \"<p>钻石套装 -- 18K鑽戒 (女) 1<br></p>\"}",
                "pbDesc_zh-CN": "多工艺产品 sc 1",
                "sourceType": "prodJob",
                "jobModule": "prodJob",
                "costAmt": 0,
                "pproId": 4634,
                "iRev": 1,
                "bDesc_ctw": "",
                "ce01Module": "prodPick",
                "lot": "A",
                "lotnoDateAttr3": -2209017600000,
                "lotnoDateAttr4": -2209017600000,
                "lotnoDateAttr1": -2209017600000,
                "lotnoDateAttr2": -2209017600000,
                "lotnoDateAttr7": -2209017600000,
                "processId": 11,
                "lotnoDateAttr8": -2209017600000,
                "bDesc_ccn": "",
                "lotnoDateAttr5": -2209017600000,
                "lotnoDateAttr6": -2209017600000,
                "unitId": 38887,
                "lotnoDateAttr9": -2209017600000,
                "matLot": "A",
                "pbDesc_ctw": "",
                "psfId": 3,
                "locId": 15,
                "pjobId": 0,
                "mjobId": 425,
                "bDesc_en": "圓形鑽石+0 (SI1)",
                "pdDesc": "<p>钻石套装 -- 18K鑽戒 (女) 1<br></p>",
                "pdDesc_haha1": "",
                "pdDesc_en": "",
                "lotnoTextAttr1": "",
                "lotnoTextAttr2": "",
                "lotnoTextAttr3": "",
                "lotnoTextAttr4": "",
                "lotnoTextAttr5": "",
                "lotnoTextAttr6": "",
                "lotnoTextAttr7": "",
                "lotnoTextAttr8": "",
                "ndFooterKey": "",
                "lotnoTextAttr9": "",
                "bDesc_zh-CN": "圓形鑽石+0 (SI1) sc",
                "sourceId": 1650,
                "dualQty": 0,
                "itemNo": "     1",
                "wcgDesc": "出水",
                "beId": 142,
                "pdDesc_zh-CN": "<p>钻石套装 -- 18K鑽戒 (女) 1<br></p>",
                "bDesc": "圓形鑽石+0 (SI1) sc",
                "matcatId": 0,
                "hId": 126,
                "pbDesc_ccn": "",
                "lotnoNumAttr1": 1001,
                "lotnoNumAttr2": 0,
                "lotnoNumAttr3": 0,
                "lotnoNumAttr4": 0,
                "processDesc": "鑲石後電金",
                "pdDesc_zh-TW": "",
                "jobId": 1650,
                "lotnoExpDate": 253402271999000,
                "footerKey": "     1",
                "dDesc": "",
                "qty": 100,
                "lotnoNumAttr5": 0,
                "lotnoNumAttr6": 0,
                "lotnoNumAttr7": 0,
                "lotnoNumAttr8": 0,
                "lotnoNumAttr9": 0,
                "lotNoId": 5388,
                "lotnoTextAttr16": "",
                "dDesc_ctw": "",
                "lotnoTextAttr15": "",
                "lotnoTextAttr18": "",
                "lotnoTextAttr17": "",
                "lotnoTextAttr12": "",
                "lotnoTextAttr11": "",
                "lotnoDateAttr20": -2209017600000,
                "lotnoTextAttr14": "",
                "lotnoTextAttr13": "",
                "dDesc_zh-CN": "",
                "lotnoTextAttr19": "",
                "bDesc_haha1": "",
                "dDesc_zh-TW": "",
                "pdDesc_ctw": "",
                "plot": "A",
                "dDesc_ccn": "",
                "pbDesc_haha1": "",
                "lotnoTextAttr10": "",
                "pbDesc_en": "",
                "dDesc_en": "",
                "oriUnitId": 38887,
                "dualUnitId": 3937,
                "lotnoLookupAttr5": 0,
                "lotnoLookupAttr6": 0,
                "sourceLot": "A",
                "lotnoLookupAttr7": 0,
                "lotnoDateAttr18": -2209017600000,
                "lotnoLookupAttr8": 0,
                "lotnoDateAttr19": -2209017600000,
                "lotno": "mx20220112a",
                "lotnoLookupAttr9": 0,
                "proId": 3972,
                "lotnoDateAttr12": -2209017600000,
                "lotnoDateAttr13": -2209017600000,
                "lotnoDateAttr10": -2209017600000,
                "lotnoDateAttr11": -2209017600000,
                "lotnoTextAttr20": "",
                "lotnoLookupAttr1": 0,
                "lotnoDateAttr16": -2209017600000,
                "lotnoLookupAttr2": 0,
                "lotnoDateAttr17": -2209017600000,
                "remarks": "",
                "lotnoLookupAttr3": 0,
                "lotnoDateAttr14": -2209017600000,
                "lotnoLookupAttr4": 0,
                "lotnoDateAttr15": -2209017600000
            }
        ],
        "prodrempick": [
            {
                "hId": 126,
                "i18nField": "{\"remarks_zh-CN\": \"\"}",
                "remarks_zh-CN": "",
                "remarks_ccn": "",
                "remarks_en": "",
                "remarks_haha1": "",
                "iRev": 1,
                "id": 126,
                "remarks_zh-TW": "",
                "remarks": "",
                "remarks_ctw": "",
                "ce01Module": "prodPick"
            }
        ],
        "prodmainpick": [
            {
                "tDate": 1647964800000,
                "lastModifyUid": 20,
                "code": "PICKTEST",
                "cnDeptId": 0,
                "useAccess": false,
                "virDeptId": 7,
                "expiredDate": -2209017600000,
                "iRev": 1,
                "sysJson": "",
                "viewCode": "prodPick",
                "ce01Module": "prodPick",
                "beId": 142,
                "expired": false,
                "printCount": 0,
                "useAccessBl": false,
                "id": 126,
                "doctypeId": 0,
                "statusModifyDate": 1648872249000,
                "locked": false,
                "lastModifyDate": 1648872249000,
                "createUid": 20,
                "locId": 0,
                "createDate": 1648872249000,
                "rev": "1",
                "lastApproveUid": 20,
                "expiredUid": 0,
                "useAccessWl": false,
                "useAccessAutoCalc": false,
                "staffId": 785,
                "status": "Y"
            }
        ]
    },
    "messages": [],
    "status": true
}

# 保存生产领料单

# 一、接口描述

​ 用于新增或者更新【生产领料单】

# 二、接口调用说明

​ 1、请求说明

URL http://[server]/jsf/rfws/root/api/save/prodPick
http请求方式 PUT
编码类型 UTF-8

​ 2、URL参数

参数 类型 必填 说明
authorization String(Header) 是 OAuth获取的Access Token
client_id String(Header) 是 aiM18[授权应用列表]中的Client ID
menuCode String(Query) 是 prodPick
param String(Query) 否 额外的系统参数;JSON字符串

​ 3、请求示例

	CloseableHttpClient client = HttpClientBuilder.create().build();
	CloseableHttpResponse res = null;
	try {

		String url = "http://" + HostIP + ":" + HostPort + "/jsf/rfws/root/api/save/prodPick";
		String param = "&menuCode=prodPick";

		HttpPut put = new HttpPut(url + "?" + param);
		put.addHeader("authorization", access_token);
		put.addHeader("client_id", ClientID);

		StringEntity entity = new StringEntity(data.toJSONString(), ContentType.APPLICATION_JSON);
		entity.setContentEncoding("UTF-8");
		put.setEntity(entity);

		res = client.execute(put);
		if (res.getStatusLine().getStatusCode() == HttpStatus.SC_OK) {
			JSONObject json = JSON.parseObject(EntityUtils.toString(res.getEntity()));

			if (json != null) {
				recordId = json.getLongValue("recordId");
			}

			System.out.println(json);
		}

		put.releaseConnection();
	} catch (Exception e) {
		e.printStackTrace();
	} finally {
		try {
			if (res != null) {
				res.close();
			}
			if (client != null) {
				client.close();
			}
		} catch (Exception ex) {
			ex.printStackTrace();
		}
	}				

Entity的JSON格式数据如下:

{
    "prodpickmatt": {
        "values": [
            {
                "sourceId": 1650,
                "mjobId": 425,
                "pproId": 4634,
                "wcgId": 15,
                "oriUnitId": 38887,
                "lot": "A",
                "jobId": 1650,
                "oriQty": 100,
                "sourceLot": "A",
                "footerKey": "     1",
                "sourceType": "prodJob",
                "processId": 11,
                "plot": "A",
                "proId": 3972,
                "qty": 100,
                "unitId": 38887,
                "matLot": "A",
                "locId": 15
            }
        ]
    },
    "prodmainpick": {
        "values": [
            {
                "beId": 142,
                "tDate": "2022-03-23",
                "code": "PICKTEST2",
                "virDeptId": 7,
                "staffId": 785
            }
        ]
    }
}

​ 4、返回示例

{
    "recordId": 127,
    "messages": [],
    "status": true
}
{
    "recordId": 0,
    "messages": [
        {
            "msgDetail": "必填项为空",
            "msgCode": "core_101905"
        }
    ],
    "status": false
}	

# 删除生产领料单

# 一、接口描述

​ 用于删除生产领料单

# 二、接口调用说明

​ 1、请求说明

URL http://[server]/jsf/rfws/root/api/delete/prodPick
http请求方式 DELETE
编码类型 UTF-8

​ 2、URL参数

参数 类型 必填 说明
authorization String(Header) 是 OAuth获取的Access Token
client_id String(Header) 是 aiM18[授权应用列表]中的Client ID
menuCode String(Query) 是 prodPick
id long(Query) 是 生产领料单的id
param String(Query) 否 额外的系统参数;JSON字符串

​ 3、请求示例

	CloseableHttpClient client = HttpClientBuilder.create().build();
	CloseableHttpResponse res = null;
	try {

		String url = "http://" + HostIP + ":" + HostPort + "/jsf/rfws/root/api/delete/prodPick";
		String param = "&menuCode=prodPick&id=" + id;

		HttpDelete delete = new HttpDelete(url + "?" + param);
		delete.addHeader("authorization", access_token);
		delete.addHeader("client_id", ClientID);

		res = client.execute(delete);
		if (res.getStatusLine().getStatusCode() == HttpStatus.SC_OK) {
			JSONObject json = JSON.parseObject(EntityUtils.toString(res.getEntity()));

			System.out.println(json);
		}

		delete.releaseConnection();
	} catch (Exception e) {
		e.printStackTrace();
	} finally {
		try {
			if (res != null) {
				res.close();
			}
			if (client != null) {
				client.close();
			}
		} catch (Exception ex) {
			ex.printStackTrace();
		}
	}				

​ 4、返回示例

{
	"messages": [],
	"status": true
}
{
    "messages": [
        {
            "msgDetail": "单据已被删除",
            "msgCode": "core_101017"
        }
    ],
    "status": false
}

# 读取EBI数据:生产领料单报告

# 一、接口描述

​ 用于执行EBI[生产领料单报告],返回EBI数据

# 二、接口调用说明

​ 1、请求说明

URL http://[server]/jsf/rfws/ebiWidget/loadReport
http请求方式 GET
编码类型 UTF-8

​ 2、URL参数

参数 类型 必填 说明
authorization String(Header) 是 OAuth获取的Access Token
client_id String(Header) 是 aiM18[授权应用列表]中的Client ID
formatId long(Query) 是 通过EBI接口获取到formatId
beId long(Query) 否 企业法人的ID。若不传,则查询所有有权限的BE数据
offset int(Query) 否 返回结果的开始行
rows int(Query) 否 返回结果的结束行

​ 3、请求示例

	CloseableHttpClient client = HttpClientBuilder.create().build();
	CloseableHttpResponse res = null;
	try {

		String url = "http://" + HostIP + ":" + HostPort + "/jsf/rfws/ebiWidget/loadReport";
		String param = "&formatId=" + formatId;

		HttpGet get = new HttpGet(url + "?" + param);
		get.addHeader("authorization", access_token);
		get.addHeader("client_id", ClientID);
		res = client.execute(get);
		if (res.getStatusLine().getStatusCode() == HttpStatus.SC_OK) {
			JSONObject json = JSON.parseObject(EntityUtils.toString(res.getEntity()));

			System.out.println(json);
		}

		get.releaseConnection();
	} catch (Exception e) {
		e.printStackTrace();
	} finally {
		try {
			if (res != null) {
				res.close();
			}
			if (client != null) {
				client.close();
			}
		} catch (Exception ex) {
			ex.printStackTrace();
		}
	}				

​ 4、返回示例

{
    "size": 1,
    "rows": [
        {
            "MJPROT_A_bomId": "10",
            "MATT_A_proId": "3968",
            "aiM18ReservedCol_dataIndex": 1,
            "MJPROT_A_bomId_code": "MX-JZ-F",
            "PICK_A_code": "PICK20170011",
            "PICK_A_id": "16",
            "MATT_A_proId_code": "MX-JZ-18AW"
        }
    ]
}

ebi2

# 生产退料单

# 获取生产退料单列表

# 一、接口描述

​ 用于获取生产退料单列表(同UI界面左侧的Search List数据)

# 二、接口调用说明

​ 1、请求说明

URL http://[server]/jsf/rfws/search/search
http请求方式 GET
编码类型 UTF-8

​ 2、URL参数

参数 类型 必填 说明
authorization String(Header) 是 OAuth获取的Access Token
client_id String(Header) 是 aiM18[授权应用列表]中的Client ID
stSearch String(Query) 是 prodPr
beId long(Query) 是 aiM18企业法人[部门]的ID
formatId long(Query) 否 aiM18[查询格式]的ID,用于获取[查询格式]步骤二中设定的栏位格式;若不使用此参数,则使用默认设置。
startRow int(Query) 否 返回结果的开始行
endRow int(Query) 否 返回结果的结束行
quickSearchStr String(Query) 否 用于设定关键字查找数据

​ 3、请求示例

	CloseableHttpClient client = HttpClientBuilder.create().build();
	CloseableHttpResponse res = null;
	try {

		String url = "http://" + HostIP + ":" + HostPort + "/jsf/rfws/search/search";
		String param = "&stSearch=prodPr&beId=" + beId;

		HttpGet get = new HttpGet(url + "?" + param);
		get.addHeader("authorization", access_token);
		get.addHeader("client_id", ClientID);
		res = client.execute(get);
		if (res.getStatusLine().getStatusCode() == HttpStatus.SC_OK) {
			JSONObject json = JSON.parseObject(EntityUtils.toString(res.getEntity()));
		}
		get.releaseConnection();
	} catch (Exception e) {
		e.printStackTrace();
	} finally {
		try {
			if (res != null) {
				res.close();
			}
			if (client != null) {
				client.close();
			}
		} catch (Exception ex) {
			ex.printStackTrace();
		}
	}			

​ 4、返回示例

{
    "stSearch": "prodPr",
    "size": 12,
    "stSearchDisplay": "生产退料单",
    "values": [
        {
            "tDate": "2021-08-18",
            "prodMainPr.lastModifyUid.simpleUser.desc__lang": "Milk",
            "code": "PR20210002",
            "st_id": 17,
            "st_code": "PR20210002",
            "st_desc": "PR20210002",
            "iRev": 1,
            "id": 17,
            "lastModifyDate": "2021-08-18 14:26:09"
        }
    ]
}

# 新增生产退料单(自动补全)

# 一、接口描述

​ 1. 用于新增【生产退料单】

​ 2. 此接口方法有如下特点:

​ a. 支持使用code 替代 id 栏位

​ b. 职员栏位未填时,自动使用个人选项中的默认职员

​ c. 单据日期未填时,根据贸易参数设定中的日期选项取值

# 二、接口调用说明

​ 1、请求说明

URL http://[server]/jsf/rfws/erp/bsFlow/save/prodPr
http请求方式 POST
编码类型 UTF-8

​ 2、URL参数

参数 类型 必填 说明
authorization String(Header) 是 OAuth获取的Access Token
client_id String(Header) 是 aiM18[授权应用列表]中的Client ID

​ 3、请求示例

	CloseableHttpClient client = HttpClientBuilder.create().build();
	CloseableHttpResponse res = null;
	try {

		String url = "http://" + HostIP + ":" + HostPort + "/jsf/rfws/erp/bsFlow/save/prodPr";
		String param = "";

		HttpPost post = new HttpPost(url + "?" + param);
		post.addHeader("authorization", access_token);
		post.addHeader("client_id", ClientID);

		StringEntity entity = new StringEntity(data.toJSONString(), ContentType.APPLICATION_JSON);
		entity.setContentEncoding("UTF-8");
		post.setEntity(entity);

		res = client.execute(post);
		if (res.getStatusLine().getStatusCode() == HttpStatus.SC_OK) {
			JSONObject json = JSON.parseObject(EntityUtils.toString(res.getEntity()));

			if (json != null) {
				recordId = json.getLongValue("tranId");
			}
			System.out.println(json);
		}

		post.releaseConnection();
	} catch (Exception e) {
		e.printStackTrace();
	} finally {
		try {
			if (res != null) {
				res.close();
			}
			if (client != null) {
				client.close();
			}
		} catch (Exception ex) {
			ex.printStackTrace();
		}
	}

data数据示例:

{
    "beId": 142,
    "tDate": "2022-03-23",
    "code": "PRTEST",
    "virDeptId": 7,
    "prodprt": [
        {
            "sourceId": 128,
            "lot": "A",
            "oriQty": 100,
            "sourceLot": "A",
            "sourceType": "prodPick",
            "proId": 3972,
            "pickId": 128,
            "pickLot": "A",
            "oriUnitId": 38887,
            "locId": 15,
            "lotNoId": 5388
        }
    ]
}

​ 4、返回示例

{
    "tranId": 18,
    "tranCode": "PRTEST",
    "message": "",
    "status": true
}

# 读取生产退料单

# 一、接口描述

​ 用于读取生产退料单数据

# 二、接口调用说明

​ 1、请求说明

URL http://[server]/jsf/rfws/root/api/read/prodPr
http请求方式 GET
编码类型 UTF-8

​ 2、URL参数

参数 类型 必填 说明
authorization String(Header) 是 OAuth获取的Access Token
client_id String(Header) 是 aiM18[授权应用列表]中的Client ID
menuCode String(Query) 是 prodPr
id long(Query) 是 生产退料单的id
param String(Query) 否 额外的系统参数;JSON字符串

​ 3、请求示例

		CloseableHttpClient client = HttpClientBuilder.create().build();
		CloseableHttpResponse res = null;
		try {

			String url = "http://" + HostIP + ":" + HostPort + "/jsf/rfws/root/api/read/prodPr";
			String param = "&menuCode=prodPr&id=" + id;

			HttpGet get = new HttpGet(url + "?" + param);
			get.addHeader("authorization", access_token);
			get.addHeader("client_id", ClientID);
			res = client.execute(get);
			if (res.getStatusLine().getStatusCode() == HttpStatus.SC_OK) {
				JSONObject json = JSON.parseObject(EntityUtils.toString(res.getEntity()));

				System.out.println(json);
			}

			get.releaseConnection();
		} catch (Exception e) {
			e.printStackTrace();
		} finally {
			try {
				if (res != null) {
					res.close();
				}
				if (client != null) {
					client.close();
				}
			} catch (Exception ex) {
				ex.printStackTrace();
			}
		}

​ 4、返回示例

{
    "data": {},
    "messages": [
        {
            "msgDetail": "找不到相关记录,记录可能已被删除或你没有访问权限",
            "msgCode": "core_141019"
        }
    ],
    "status": false
}
{
    "data": {
        "prodrempr": [
            {
                "hId": 18,
                "i18nField": "{\"remarks_zh-CN\": \"\"}",
                "remarks_zh-CN": "",
                "remarks_ccn": "",
                "remarks_en": "",
                "remarks_haha1": "",
                "iRev": 1,
                "id": 18,
                "remarks_zh-TW": "",
                "remarks": "",
                "remarks_ctw": "",
                "ce01Module": "prodPr"
            }
        ],
        "prodprt": [
            {
                "lotnoNumAttr17": 0,
                "lotnoNumAttr16": 0,
                "lotnoNumAttr15": 0,
                "lotnoNumAttr14": 0,
                "lotnoNumAttr19": 0,
                "pbDesc": "多工艺产品 sc 1",
                "lotnoNumAttr18": 0,
                "pickId": 128,
                "lotnoLookupAttr20": 0,
                "lotnoNumAttr13": 0,
                "lotnoNumAttr12": 0,
                "lotnoNumAttr11": 0,
                "lotnoNumAttr10": 0,
                "isSemi": false,
                "lotnoLookupAttr16": 0,
                "oriQty": 100,
                "lotnoLookupAttr17": 0,
                "lotnoLookupAttr14": 0,
                "lotnoLookupAttr15": 0,
                "lotnoLookupAttr18": 0,
                "bDesc_zh-TW": "圓形鑽石+0 (SI1) tc",
                "lotnoLookupAttr19": 0,
                "newLotno": 0,
                "lotnoLot": "A",
                "id": 24,
                "pbDesc_zh-TW": "",
                "dDesc_haha1": "",
                "lotnoNumAttr20": 0,
                "pdDesc_ccn": "",
                "lotnoLookupAttr12": 0,
                "wcgId": 15,
                "lotnoLookupAttr13": 0,
                "lotnoLookupAttr10": 0,
                "lotnoLookupAttr11": 0,
                "wcId": 0,
                "i18nField": "{\"bDesc_en\": \"圓形鑽石+0 (SI1)\", \"bDesc_zh-CN\": \"圓形鑽石+0 (SI1) sc\", \"bDesc_zh-TW\": \"圓形鑽石+0 (SI1) tc\", \"dDesc_zh-CN\": \"\", \"pbDesc_zh-CN\": \"多工艺产品 sc 1\", \"pdDesc_zh-CN\": \"<p>钻石套装 -- 18K鑽戒 (女) 1<br></p>\"}",
                "pbDesc_zh-CN": "多工艺产品 sc 1",
                "sourceType": "prodPick",
                "jobModule": "prodJob",
                "costAmt": 0,
                "pproId": 4634,
                "iRev": 1,
                "bDesc_ctw": "",
                "ce01Module": "prodPr",
                "lot": "A",
                "lotnoDateAttr3": -2209017600000,
                "lotnoDateAttr4": -2209017600000,
                "lotnoDateAttr1": -2209017600000,
                "lotnoDateAttr2": -2209017600000,
                "lotnoDateAttr7": -2209017600000,
                "lotnoDateAttr8": -2209017600000,
                "bDesc_ccn": "",
                "lotnoDateAttr5": -2209017600000,
                "lotnoDateAttr6": -2209017600000,
                "unitId": 38887,
                "lotnoDateAttr9": -2209017600000,
                "matLot": "A",
                "pbDesc_ctw": "",
                "locId": 15,
                "psfId": 3,
                "mjobId": 425,
                "bDesc_en": "圓形鑽石+0 (SI1)",
                "pdDesc": "<p>钻石套装 -- 18K鑽戒 (女) 1<br></p>",
                "pdDesc_haha1": "",
                "pdDesc_en": "",
                "lotnoTextAttr1": "",
                "lotnoTextAttr2": "",
                "lotnoTextAttr3": "",
                "lotnoTextAttr4": "",
                "lotnoTextAttr5": "",
                "lotnoTextAttr6": "",
                "lotnoTextAttr7": "",
                "lotnoTextAttr8": "",
                "lotnoTextAttr9": "",
                "bDesc_zh-CN": "圓形鑽石+0 (SI1) sc",
                "sourceId": 128,
                "dualQty": 0,
                "itemNo": "     1",
                "beId": 142,
                "pdDesc_zh-CN": "<p>钻石套装 -- 18K鑽戒 (女) 1<br></p>",
                "bDesc": "圓形鑽石+0 (SI1) sc",
                "hId": 18,
                "pbDesc_ccn": "",
                "lotnoNumAttr1": 1001,
                "lotnoNumAttr2": 0,
                "lotnoNumAttr3": 0,
                "lotnoNumAttr4": 0,
                "pdDesc_zh-TW": "",
                "jobId": 1650,
                "lotnoExpDate": 253402271999000,
                "footerKey": "     1",
                "dDesc": "",
                "qty": 100,
                "lotnoNumAttr5": 0,
                "lotnoNumAttr6": 0,
                "lotnoNumAttr7": 0,
                "lotnoNumAttr8": 0,
                "lotnoNumAttr9": 0,
                "lotNoId": 5388,
                "lotnoTextAttr16": "",
                "dDesc_ctw": "",
                "lotnoTextAttr15": "",
                "lotnoTextAttr18": "",
                "lotnoTextAttr17": "",
                "lotnoTextAttr12": "",
                "lotnoTextAttr11": "",
                "lotnoDateAttr20": -2209017600000,
                "lotnoTextAttr14": "",
                "lotnoTextAttr13": "",
                "dDesc_zh-CN": "",
                "lotnoTextAttr19": "",
                "bDesc_haha1": "",
                "dDesc_zh-TW": "",
                "pdDesc_ctw": "",
                "plot": "A",
                "dDesc_ccn": "",
                "pbDesc_haha1": "",
                "lotnoTextAttr10": "",
                "pbDesc_en": "",
                "dDesc_en": "",
                "oriUnitId": 38887,
                "dualUnitId": 3937,
                "lotnoLookupAttr5": 0,
                "lotnoLookupAttr6": 0,
                "sourceLot": "A",
                "lotnoLookupAttr7": 0,
                "lotnoDateAttr18": -2209017600000,
                "lotnoLookupAttr8": 0,
                "lotnoDateAttr19": -2209017600000,
                "lotno": "mx20220112a",
                "lotnoLookupAttr9": 0,
                "proId": 3972,
                "lotnoDateAttr12": -2209017600000,
                "lotnoDateAttr13": -2209017600000,
                "lotnoDateAttr10": -2209017600000,
                "pickLot": "A",
                "lotnoDateAttr11": -2209017600000,
                "lotnoTextAttr20": "",
                "lotnoLookupAttr1": 0,
                "lotnoDateAttr16": -2209017600000,
                "lotnoLookupAttr2": 0,
                "lotnoDateAttr17": -2209017600000,
                "lotnoLookupAttr3": 0,
                "lotnoDateAttr14": -2209017600000,
                "lotnoLookupAttr4": 0,
                "lotnoDateAttr15": -2209017600000
            }
        ],
        "prodmainpr": [
            {
                "tDate": 1647964800000,
                "lastModifyUid": 20,
                "code": "PRTEST",
                "cnDeptId": 0,
                "useAccess": false,
                "virDeptId": 7,
                "expiredDate": -2209017600000,
                "iRev": 1,
                "sysJson": "",
                "viewCode": "prodPr",
                "ce01Module": "prodPr",
                "beId": 142,
                "expired": false,
                "printCount": 0,
                "useAccessBl": false,
                "id": 18,
                "doctypeId": 0,
                "statusModifyDate": 1648873463000,
                "locked": false,
                "lastModifyDate": 1648873463000,
                "createUid": 20,
                "locId": 0,
                "createDate": 1648873463000,
                "rev": "1",
                "lastApproveUid": 20,
                "expiredUid": 0,
                "useAccessWl": false,
                "useAccessAutoCalc": false,
                "staffId": 785,
                "status": "Y"
            }
        ]
    },
    "messages": [],
    "status": true
}

# 保存生产退料单

# 一、接口描述

​ 用于新增或者更新【生产退料单】

# 二、接口调用说明

​ 1、请求说明

URL http://[server]/jsf/rfws/root/api/save/prodPr
http请求方式 PUT
编码类型 UTF-8

​ 2、URL参数

参数 类型 必填 说明
authorization String(Header) 是 OAuth获取的Access Token
client_id String(Header) 是 aiM18[授权应用列表]中的Client ID
menuCode String(Query) 是 prodPr
param String(Query) 否 额外的系统参数;JSON字符串

​ 3、请求示例

	CloseableHttpClient client = HttpClientBuilder.create().build();
	CloseableHttpResponse res = null;
	try {

		String url = "http://" + HostIP + ":" + HostPort + "/jsf/rfws/root/api/save/prodPr";
		String param = "&menuCode=prodPr";

		HttpPut put = new HttpPut(url + "?" + param);
		put.addHeader("authorization", access_token);
		put.addHeader("client_id", ClientID);

		StringEntity entity = new StringEntity(data.toJSONString(), ContentType.APPLICATION_JSON);
		entity.setContentEncoding("UTF-8");
		put.setEntity(entity);

		res = client.execute(put);
		if (res.getStatusLine().getStatusCode() == HttpStatus.SC_OK) {
			JSONObject json = JSON.parseObject(EntityUtils.toString(res.getEntity()));

			if (json != null) {
				recordId = json.getLongValue("recordId");
			}

			System.out.println(json);
		}

		put.releaseConnection();
	} catch (Exception e) {
		e.printStackTrace();
	} finally {
		try {
			if (res != null) {
				res.close();
			}
			if (client != null) {
				client.close();
			}
		} catch (Exception ex) {
			ex.printStackTrace();
		}
	}				

Entity的JSON格式数据如下:

{
    "prodprt": {
        "values": [
            {
                "sourceId": 128,
                "mjobId": 425,
                "pproId": 4634,
                "pickId": 128,
                "wcgId": 15,
                "oriUnitId": 38887,
                "lot": "A",
                "jobId": 1650,
                "oriQty": 100,
                "sourceLot": "A",
                "footerKey": "     1",
                "sourceType": "prodPick",
                "processId": 11,
                "plot": "A",
                "proId": 3972,
                "qty": 100,
                "unitId": 38887,
                "pickLot": "A",
                "matLot": "A",
                "locId": 15,
                "psfId": 3,
                "lotNoId": 5388
            }
        ]
    },
    "prodmainpr": {
        "values": [
            {
                "beId": 142,
                "tDate": "2022-03-23",
                "code": "PICKTEST2",
                "virDeptId": 7,
                "staffId": 785
            }
        ]
    }
}

​ 4、返回示例

{
    "recordId": 19,
    "messages": [],
    "status": true
}
{
    "recordId": 0,
    "messages": [
        {
            "msgDetail": "必填项为空",
            "msgCode": "core_101905"
        }
    ],
    "status": false
}	

# 删除生产退料单

# 一、接口描述

​ 用于删除生产退料单

# 二、接口调用说明

​ 1、请求说明

URL http://[server]/jsf/rfws/root/api/delete/prodPr
http请求方式 DELETE
编码类型 UTF-8

​ 2、URL参数

参数 类型 必填 说明
authorization String(Header) 是 OAuth获取的Access Token
client_id String(Header) 是 aiM18[授权应用列表]中的Client ID
menuCode String(Query) 是 prodPr
id long(Query) 是 生产退料单的id
param String(Query) 否 额外的系统参数;JSON字符串

​ 3、请求示例

	CloseableHttpClient client = HttpClientBuilder.create().build();
	CloseableHttpResponse res = null;
	try {

		String url = "http://" + HostIP + ":" + HostPort + "/jsf/rfws/root/api/delete/prodPr";
		String param = "&menuCode=prodPr&id=" + id;

		HttpDelete delete = new HttpDelete(url + "?" + param);
		delete.addHeader("authorization", access_token);
		delete.addHeader("client_id", ClientID);

		res = client.execute(delete);
		if (res.getStatusLine().getStatusCode() == HttpStatus.SC_OK) {
			JSONObject json = JSON.parseObject(EntityUtils.toString(res.getEntity()));

			System.out.println(json);
		}

		delete.releaseConnection();
	} catch (Exception e) {
		e.printStackTrace();
	} finally {
		try {
			if (res != null) {
				res.close();
			}
			if (client != null) {
				client.close();
			}
		} catch (Exception ex) {
			ex.printStackTrace();
		}
	}				

​ 4、返回示例

{
	"messages": [],
	"status": true
}
{
    "messages": [
        {
            "msgDetail": "单据已被删除",
            "msgCode": "core_101017"
        }
    ],
    "status": false
}

# 读取EBI数据:生产退料单报告

# 一、接口描述

​ 用于执行EBI[生产退料单报告],返回EBI数据

# 二、接口调用说明

​ 1、请求说明

URL http://[server]/jsf/rfws/ebiWidget/loadReport
http请求方式 GET
编码类型 UTF-8

​ 2、URL参数

参数 类型 必填 说明
authorization String(Header) 是 OAuth获取的Access Token
client_id String(Header) 是 aiM18[授权应用列表]中的Client ID
formatId long(Query) 是 通过EBI接口获取到formatId
beId long(Query) 否 企业法人的ID。若不传,则查询所有有权限的BE数据
offset int(Query) 否 返回结果的开始行
rows int(Query) 否 返回结果的结束行

​ 3、请求示例

	CloseableHttpClient client = HttpClientBuilder.create().build();
	CloseableHttpResponse res = null;
	try {

		String url = "http://" + HostIP + ":" + HostPort + "/jsf/rfws/ebiWidget/loadReport";
		String param = "&formatId=" + formatId;

		HttpGet get = new HttpGet(url + "?" + param);
		get.addHeader("authorization", access_token);
		get.addHeader("client_id", ClientID);
		res = client.execute(get);
		if (res.getStatusLine().getStatusCode() == HttpStatus.SC_OK) {
			JSONObject json = JSON.parseObject(EntityUtils.toString(res.getEntity()));

			System.out.println(json);
		}

		get.releaseConnection();
	} catch (Exception e) {
		e.printStackTrace();
	} finally {
		try {
			if (res != null) {
				res.close();
			}
			if (client != null) {
				client.close();
			}
		} catch (Exception ex) {
			ex.printStackTrace();
		}
	}				

​ 4、返回示例

{
    "size": 1,
    "rows": [
        {
            "aiM18ReservedCol_dataIndex": 1,
            "PR_A_code": "PR20170007",
            "PR_A_id": "7"
        }
    ]
}

ebi2

# 生产完工单

# 获取生产完工单列表

# 一、接口描述

​ 用于获取生产完工单列表(同UI界面左侧的Search List数据)

# 二、接口调用说明

​ 1、请求说明

URL http://[server]/jsf/rfws/search/search
http请求方式 GET
编码类型 UTF-8

​ 2、URL参数

参数 类型 必填 说明
authorization String(Header) 是 OAuth获取的Access Token
client_id String(Header) 是 aiM18[授权应用列表]中的Client ID
stSearch String(Query) 是 prodPdn
beId long(Query) 是 aiM18企业法人[部门]的ID
formatId long(Query) 否 aiM18[查询格式]的ID,用于获取[查询格式]步骤二中设定的栏位格式;若不使用此参数,则使用默认设置。
startRow int(Query) 否 返回结果的开始行
endRow int(Query) 否 返回结果的结束行
quickSearchStr String(Query) 否 用于设定关键字查找数据

​ 3、请求示例

	CloseableHttpClient client = HttpClientBuilder.create().build();
	CloseableHttpResponse res = null;
	try {

		String url = "http://" + HostIP + ":" + HostPort + "/jsf/rfws/search/search";
		String param = "&stSearch=prodPdn&beId=" + beId;

		HttpGet get = new HttpGet(url + "?" + param);
		get.addHeader("authorization", access_token);
		get.addHeader("client_id", ClientID);
		res = client.execute(get);
		if (res.getStatusLine().getStatusCode() == HttpStatus.SC_OK) {
			JSONObject json = JSON.parseObject(EntityUtils.toString(res.getEntity()));
		}
		get.releaseConnection();
	} catch (Exception e) {
		e.printStackTrace();
	} finally {
		try {
			if (res != null) {
				res.close();
			}
			if (client != null) {
				client.close();
			}
		} catch (Exception ex) {
			ex.printStackTrace();
		}
	}			

​ 4、返回示例

{
    "stSearch": "prodPdn",
    "size": 1,
    "stSearchDisplay": "生产完工单",
    "values": [
        {
            "tDate": "2021-09-26",
            "code": "PDN20210005",
            "st_id": 30,
            "st_code": "PDN20210005",
            "st_desc": "PDN20210005",
            "iRev": 5,
            "id": 30,
            "prodMainPdn.lastModifyUid.simpleUser.desc__lang": "Milk",
            "lastModifyDate": "2021-09-26 14:23:15"
        }
    ]
}

# 新增生产完工单(自动补全)

# 一、接口描述

​ 1. 用于新增【生产完工单】

​ 2. 此接口方法有如下特点:

​ a. 支持使用code 替代 id 栏位

​ b. 职员栏位未填时,自动使用个人选项中的默认职员

​ c. 单据日期未填时,根据贸易参数设定中的日期选项取值

# 二、接口调用说明

​ 1、请求说明

URL http://[server]/jsf/rfws/erp/bsFlow/save/prodPdn
http请求方式 POST
编码类型 UTF-8

​ 2、URL参数

参数 类型 必填 说明
authorization String(Header) 是 OAuth获取的Access Token
client_id String(Header) 是 aiM18[授权应用列表]中的Client ID

​ 3、请求示例

	CloseableHttpClient client = HttpClientBuilder.create().build();
	CloseableHttpResponse res = null;
	try {

		String url = "http://" + HostIP + ":" + HostPort + "/jsf/rfws/erp/bsFlow/save/prodPdn";
		String param = "";

		HttpPost post = new HttpPost(url + "?" + param);
		post.addHeader("authorization", access_token);
		post.addHeader("client_id", ClientID);

		StringEntity entity = new StringEntity(data.toJSONString(), ContentType.APPLICATION_JSON);
		entity.setContentEncoding("UTF-8");
		post.setEntity(entity);

		res = client.execute(post);
		if (res.getStatusLine().getStatusCode() == HttpStatus.SC_OK) {
			JSONObject json = JSON.parseObject(EntityUtils.toString(res.getEntity()));

			if (json != null) {
				recordId = json.getLongValue("tranId");
			}
			System.out.println(json);
		}

		post.releaseConnection();
	} catch (Exception e) {
		e.printStackTrace();
	} finally {
		try {
			if (res != null) {
				res.close();
			}
			if (client != null) {
				client.close();
			}
		} catch (Exception ex) {
			ex.printStackTrace();
		}
	}

data数据示例:

{
    "beId": 142,
    "tDate": "2022-03-23",
    "code": "PDNTEST",
    "virDeptId": 7,
    "prodpdnt": [
        {
            "sourceId": 425,
            "lot": "A",
            "oriQty": 100,
            "sourceLot": "A",
            "sourceType": "prodMjob",
            "proId": 4634,
            "mlot": "A",
            "mproId": 4634,
            "oriUnitId": 39720
        }
    ]
}

​ 4、返回示例

{
    "tranId": 32,
    "tranCode": "PDNTEST",
    "message": "",
    "status": true
}

# 读取生产完工单

# 一、接口描述

​ 用于读取生产完工单数据

# 二、接口调用说明

​ 1、请求说明

URL http://[server]/jsf/rfws/root/api/read/prodPdn
http请求方式 GET
编码类型 UTF-8

​ 2、URL参数

参数 类型 必填 说明
authorization String(Header) 是 OAuth获取的Access Token
client_id String(Header) 是 aiM18[授权应用列表]中的Client ID
menuCode String(Query) 是 prodPdn
id long(Query) 是 生产完工单的id
param String(Query) 否 额外的系统参数;JSON字符串

​ 3、请求示例

		CloseableHttpClient client = HttpClientBuilder.create().build();
		CloseableHttpResponse res = null;
		try {

			String url = "http://" + HostIP + ":" + HostPort + "/jsf/rfws/root/api/read/prodPdn";
			String param = "&menuCode=prodPdn&id=" + id;

			HttpGet get = new HttpGet(url + "?" + param);
			get.addHeader("authorization", access_token);
			get.addHeader("client_id", ClientID);
			res = client.execute(get);
			if (res.getStatusLine().getStatusCode() == HttpStatus.SC_OK) {
				JSONObject json = JSON.parseObject(EntityUtils.toString(res.getEntity()));

				System.out.println(json);
			}

			get.releaseConnection();
		} catch (Exception e) {
			e.printStackTrace();
		} finally {
			try {
				if (res != null) {
					res.close();
				}
				if (client != null) {
					client.close();
				}
			} catch (Exception ex) {
				ex.printStackTrace();
			}
		}

​ 4、返回示例

{
    "data": {},
    "messages": [
        {
            "msgDetail": "找不到相关记录,记录可能已被删除或你没有访问权限",
            "msgCode": "core_141019"
        }
    ],
    "status": false
}
{
    "data": {
        "prodpdnstt": [
            {
                "sourceId": 425,
                "dDesc_ctw": "",
                "dualQty": 0,
                "iRev": 1,
                "itemNo": "     1",
                "dDesc_zh-CN": "<p>钻石套装 -- 18K鑽戒 (女) 1<br></p>",
                "bDesc_ctw": "",
                "ce01Module": "prodPdn",
                "beId": 142,
                "lot": "",
                "oriQty": 100,
                "bDesc_haha1": "",
                "dDesc_zh-TW": "<p>&nbsp;</p>",
                "bDesc": "多工艺产品 sc 1",
                "bDesc_ccn": "",
                "bDesc_zh-TW": "多工艺产品 tc 1",
                "unitId": 39720,
                "dDesc_ccn": "",
                "id": 75,
                "dDesc_haha1": "",
                "hId": 32,
                "bDesc_en": "多工艺产品 1",
                "stId": 425,
                "dDesc_en": "<p>钻石套装 -- 18K鑽戒 (女) 1<br></p>",
                "sourceProId": 4634,
                "oriUnitId": 39720,
                "dualUnitId": 0,
                "sourceLot": "A",
                "sourceMjobLot": "A",
                "footerKey": "     1",
                "dDesc": "<p>钻石套装 -- 18K鑽戒 (女) 1<br></p>",
                "i18nField": "{\"bDesc_en\": \"多工艺产品 1\", \"dDesc_en\": \"<p>钻石套装 -- 18K鑽戒 (女) 1<br></p>\", \"bDesc_zh-CN\": \"多工艺产品 sc 1\", \"bDesc_zh-TW\": \"多工艺产品 tc 1\", \"dDesc_zh-CN\": \"<p>钻石套装 -- 18K鑽戒 (女) 1<br></p>\", \"dDesc_zh-TW\": \"<p>&nbsp;</p>\"}",
                "sourceType": "prodMjob",
                "mlot": "A",
                "proId": 4634,
                "qty": 100,
                "stLot": "A",
                "mproId": 4634,
                "stType": "prodMjob",
                "bDesc_zh-CN": "多工艺产品 sc 1"
            }
        ],
        "prodrempdn": [
            {
                "hId": 32,
                "i18nField": "{\"remarks_zh-CN\": \"\"}",
                "remarks_zh-CN": "",
                "remarks_ccn": "",
                "remarks_en": "",
                "remarks_haha1": "",
                "iRev": 1,
                "id": 32,
                "remarks_zh-TW": "",
                "remarks": "",
                "remarks_ctw": "",
                "ce01Module": "prodPdn"
            }
        ],
        "prodmainpdn": [
            {
                "tDate": 1647964800000,
                "lastModifyUid": 20,
                "code": "PDNTEST",
                "cnDeptId": 0,
                "useAccess": false,
                "virDeptId": 7,
                "expiredDate": -2209017600000,
                "iRev": 1,
                "sysJson": "",
                "viewCode": "prodPdn",
                "ce01Module": "prodPdn",
                "beId": 142,
                "expired": false,
                "printCount": 0,
                "useAccessBl": false,
                "id": 32,
                "doctypeId": 0,
                "statusModifyDate": 1648889785000,
                "locked": false,
                "lastModifyDate": 1648889785000,
                "createUid": 20,
                "createDate": 1648889785000,
                "rev": "1",
                "lastApproveUid": 20,
                "expiredUid": 0,
                "useAccessWl": false,
                "useAccessAutoCalc": false,
                "staffId": 785,
                "status": "Y"
            }
        ],
        "prodpdnt": [
            {
                "sourceId": 425,
                "dDesc_ctw": "",
                "dualQty": 0,
                "iRev": 1,
                "itemNo": "     1",
                "dDesc_zh-CN": "<p>钻石套装 -- 18K鑽戒 (女) 1<br></p>",
                "bDesc_ctw": "",
                "ce01Module": "prodPdn",
                "beId": 142,
                "lot": "A",
                "oriQty": 100,
                "bDesc_haha1": "",
                "dDesc_zh-TW": "<p>&nbsp;</p>",
                "bDesc": "多工艺产品 sc 1",
                "bDesc_ccn": "",
                "bDesc_zh-TW": "多工艺产品 tc 1",
                "unitId": 39720,
                "dDesc_ccn": "",
                "id": 42,
                "qcRequired": true,
                "psfId": 3,
                "dDesc_haha1": "",
                "hId": 32,
                "bDesc_en": "多工艺产品 1",
                "dDesc_en": "<p>钻石套装 -- 18K鑽戒 (女) 1<br></p>",
                "oriUnitId": 39720,
                "dualUnitId": 4489,
                "jobId": 0,
                "sourceLot": "A",
                "footerKey": "     1",
                "dDesc": "<p>钻石套装 -- 18K鑽戒 (女) 1<br></p>",
                "i18nField": "{\"bDesc_en\": \"多工艺产品 1\", \"dDesc_en\": \"<p>钻石套装 -- 18K鑽戒 (女) 1<br></p>\", \"bDesc_zh-CN\": \"多工艺产品 sc 1\", \"bDesc_zh-TW\": \"多工艺产品 tc 1\", \"dDesc_zh-CN\": \"<p>钻石套装 -- 18K鑽戒 (女) 1<br></p>\", \"dDesc_zh-TW\": \"<p>&nbsp;</p>\"}",
                "sourceType": "prodMjob",
                "mlot": "A",
                "proId": 4634,
                "qty": 100,
                "mproId": 4634,
                "bDesc_zh-CN": "多工艺产品 sc 1"
            }
        ]
    },
    "messages": [],
    "status": true
}

# 保存生产完工单

# 一、接口描述

​ 用于新增或者更新【生产完工单】

# 二、接口调用说明

​ 1、请求说明

URL http://[server]/jsf/rfws/root/api/save/prodPdn
http请求方式 PUT
编码类型 UTF-8

​ 2、URL参数

参数 类型 必填 说明
authorization String(Header) 是 OAuth获取的Access Token
client_id String(Header) 是 aiM18[授权应用列表]中的Client ID
menuCode String(Query) 是 prodPdn
param String(Query) 否 额外的系统参数;JSON字符串

​ 3、请求示例

	CloseableHttpClient client = HttpClientBuilder.create().build();
	CloseableHttpResponse res = null;
	try {

		String url = "http://" + HostIP + ":" + HostPort + "/jsf/rfws/root/api/save/prodPdn";
		String param = "&menuCode=prodPdn";

		HttpPut put = new HttpPut(url + "?" + param);
		put.addHeader("authorization", access_token);
		put.addHeader("client_id", ClientID);

		StringEntity entity = new StringEntity(data.toJSONString(), ContentType.APPLICATION_JSON);
		entity.setContentEncoding("UTF-8");
		put.setEntity(entity);

		res = client.execute(put);
		if (res.getStatusLine().getStatusCode() == HttpStatus.SC_OK) {
			JSONObject json = JSON.parseObject(EntityUtils.toString(res.getEntity()));

			if (json != null) {
				recordId = json.getLongValue("recordId");
			}

			System.out.println(json);
		}

		put.releaseConnection();
	} catch (Exception e) {
		e.printStackTrace();
	} finally {
		try {
			if (res != null) {
				res.close();
			}
			if (client != null) {
				client.close();
			}
		} catch (Exception ex) {
			ex.printStackTrace();
		}
	}				

Entity的JSON格式数据如下:

{
    "prodpdnstt": {
        "values": [
            {
                "sourceId": 425,
                "stId": 425,
                "sourceProId": 4634,
                "oriUnitId": 39720,
                "lot": "A",
                "oriQty": 100,
                "sourceLot": "A",
                "sourceMjobLot": "A",
                "footerKey": "     1",
                "sourceType": "prodMjob",
                "mlot": "A",
                "proId": 4634,
                "qty": 100,
                "unitId": 39720,
                "stLot": "A",
                "mproId": 4634,
                "stType": "prodMjob"
            }
        ]
    },
    "prodmainpdn": {
        "values": [
            {
                "beId": 142,
                "tDate": "2022-03-23",
                "code": "PDNTEST2",
                "virDeptId": 7,
                "staffId": 785
            }
        ]
    },
    "prodpdnt": {
        "values": [
            {
                "sourceId": 425,
                "oriUnitId": 39720,
                "lot": "A",
                "oriQty": 100,
                "sourceLot": "A",
                "footerKey": "     1",
                "sourceType": "prodMjob",
                "mlot": "A",
                "proId": 4634,
                "qty": 100,
                "unitId": 39720,
                "mproId": 4634,
                "psfId": 3
            }
        ]
    }
}

​ 4、返回示例

{
    "recordId": 33,
    "messages": [],
    "status": true
}
{
    "recordId": 0,
    "messages": [
        {
            "msgDetail": "必填项为空",
            "msgCode": "core_101905"
        }
    ],
    "status": false
}	

# 删除生产完工单

# 一、接口描述

​ 用于删除生产完工单

# 二、接口调用说明

​ 1、请求说明

URL http://[server]/jsf/rfws/root/api/delete/prodPdn
http请求方式 DELETE
编码类型 UTF-8

​ 2、URL参数

参数 类型 必填 说明
authorization String(Header) 是 OAuth获取的Access Token
client_id String(Header) 是 aiM18[授权应用列表]中的Client ID
menuCode String(Query) 是 prodPdn
id long(Query) 是 生产完工单的id
param String(Query) 否 额外的系统参数;JSON字符串

​ 3、请求示例

	CloseableHttpClient client = HttpClientBuilder.create().build();
	CloseableHttpResponse res = null;
	try {

		String url = "http://" + HostIP + ":" + HostPort + "/jsf/rfws/root/api/delete/prodPdn";
		String param = "&menuCode=prodPdn&id=" + id;

		HttpDelete delete = new HttpDelete(url + "?" + param);
		delete.addHeader("authorization", access_token);
		delete.addHeader("client_id", ClientID);

		res = client.execute(delete);
		if (res.getStatusLine().getStatusCode() == HttpStatus.SC_OK) {
			JSONObject json = JSON.parseObject(EntityUtils.toString(res.getEntity()));

			System.out.println(json);
		}

		delete.releaseConnection();
	} catch (Exception e) {
		e.printStackTrace();
	} finally {
		try {
			if (res != null) {
				res.close();
			}
			if (client != null) {
				client.close();
			}
		} catch (Exception ex) {
			ex.printStackTrace();
		}
	}				

​ 4、返回示例

{
	"messages": [],
	"status": true
}
{
    "messages": [
        {
            "msgDetail": "单据已被删除",
            "msgCode": "core_101017"
        }
    ],
    "status": false
}

# 生产入库单

# 获取生产入库单列表

# 一、接口描述

​ 用于获取生产入库单列表(同UI界面左侧的Search List数据)

# 二、接口调用说明

​ 1、请求说明

URL http://[server]/jsf/rfws/search/search
http请求方式 GET
编码类型 UTF-8

​ 2、URL参数

参数 类型 必填 说明
authorization String(Header) 是 OAuth获取的Access Token
client_id String(Header) 是 aiM18[授权应用列表]中的Client ID
stSearch String(Query) 是 prodPw
beId long(Query) 是 aiM18企业法人[部门]的ID
formatId long(Query) 否 aiM18[查询格式]的ID,用于获取[查询格式]步骤二中设定的栏位格式;若不使用此参数,则使用默认设置。
startRow int(Query) 否 返回结果的开始行
endRow int(Query) 否 返回结果的结束行
quickSearchStr String(Query) 否 用于设定关键字查找数据

​ 3、请求示例

	CloseableHttpClient client = HttpClientBuilder.create().build();
	CloseableHttpResponse res = null;
	try {

		String url = "http://" + HostIP + ":" + HostPort + "/jsf/rfws/search/search";
		String param = "&stSearch=prodPw&beId=" + beId;

		HttpGet get = new HttpGet(url + "?" + param);
		get.addHeader("authorization", access_token);
		get.addHeader("client_id", ClientID);
		res = client.execute(get);
		if (res.getStatusLine().getStatusCode() == HttpStatus.SC_OK) {
			JSONObject json = JSON.parseObject(EntityUtils.toString(res.getEntity()));
		}
		get.releaseConnection();
	} catch (Exception e) {
		e.printStackTrace();
	} finally {
		try {
			if (res != null) {
				res.close();
			}
			if (client != null) {
				client.close();
			}
		} catch (Exception ex) {
			ex.printStackTrace();
		}
	}			

​ 4、返回示例

{
    "stSearch": "prodPw",
    "size": 1,
    "stSearchDisplay": "生产入库单",
    "values": [
        {
            "tDate": "2022-03-03",
            "code": "PW20220002",
            "st_id": 113,
            "st_code": "PW20220002",
            "prodMainPw.lastModifyUid.simpleUser.desc__lang": "Milk",
            "st_desc": "PW20220002",
            "iRev": 5,
            "id": 113,
            "lastModifyDate": "2022-03-03 16:43:46"
        }
    ]
}

# 新增生产入库单(自动补全)

# 一、接口描述

​ 1. 用于新增【生产入库单】

​ 2. 此接口方法有如下特点:

​ a. 支持使用code 替代 id 栏位

​ b. 职员栏位未填时,自动使用个人选项中的默认职员

​ c. 单据日期未填时,根据贸易参数设定中的日期选项取值

# 二、接口调用说明

​ 1、请求说明

URL http://[server]/jsf/rfws/erp/bsFlow/save/prodPw
http请求方式 POST
编码类型 UTF-8

​ 2、URL参数

参数 类型 必填 说明
authorization String(Header) 是 OAuth获取的Access Token
client_id String(Header) 是 aiM18[授权应用列表]中的Client ID

​ 3、请求示例

	CloseableHttpClient client = HttpClientBuilder.create().build();
	CloseableHttpResponse res = null;
	try {

		String url = "http://" + HostIP + ":" + HostPort + "/jsf/rfws/erp/bsFlow/save/prodPw";
		String param = "";

		HttpPost post = new HttpPost(url + "?" + param);
		post.addHeader("authorization", access_token);
		post.addHeader("client_id", ClientID);

		StringEntity entity = new StringEntity(data.toJSONString(), ContentType.APPLICATION_JSON);
		entity.setContentEncoding("UTF-8");
		post.setEntity(entity);

		res = client.execute(post);
		if (res.getStatusLine().getStatusCode() == HttpStatus.SC_OK) {
			JSONObject json = JSON.parseObject(EntityUtils.toString(res.getEntity()));

			if (json != null) {
				recordId = json.getLongValue("tranId");
			}
			System.out.println(json);
		}

		post.releaseConnection();
	} catch (Exception e) {
		e.printStackTrace();
	} finally {
		try {
			if (res != null) {
				res.close();
			}
			if (client != null) {
				client.close();
			}
		} catch (Exception ex) {
			ex.printStackTrace();
		}
	}

data数据示例:

{
    "beId": 142,
    "tDate": "2022-03-23",
    "code": "PWTEST",
    "virDeptId": 7,
    "prodpwt": [
        {
            "sourceId": 425,
            "lot": "A",
            "oriQty": 100,
            "sourceLot": "A",
            "sourceType": "prodMjob",
            "proId": 4634,
            "mlot": "A",
            "mproId": 4634,
            "oriUnitId": 39720
        }
    ],
    "locId": 15
}

​ 4、返回示例

{
    "tranId": 115,
    "tranCode": "PWTEST",
    "message": "",
    "status": true
}

# 读取生产入库单

# 一、接口描述

​ 用于读取生产入库单数据

# 二、接口调用说明

​ 1、请求说明

URL http://[server]/jsf/rfws/root/api/read/prodPw
http请求方式 GET
编码类型 UTF-8

​ 2、URL参数

参数 类型 必填 说明
authorization String(Header) 是 OAuth获取的Access Token
client_id String(Header) 是 aiM18[授权应用列表]中的Client ID
menuCode String(Query) 是 prodPw
id long(Query) 是 生产入库单的id
param String(Query) 否 额外的系统参数;JSON字符串

​ 3、请求示例

		CloseableHttpClient client = HttpClientBuilder.create().build();
		CloseableHttpResponse res = null;
		try {

			String url = "http://" + HostIP + ":" + HostPort + "/jsf/rfws/root/api/read/prodPw";
			String param = "&menuCode=prodPw&id=" + id;

			HttpGet get = new HttpGet(url + "?" + param);
			get.addHeader("authorization", access_token);
			get.addHeader("client_id", ClientID);
			res = client.execute(get);
			if (res.getStatusLine().getStatusCode() == HttpStatus.SC_OK) {
				JSONObject json = JSON.parseObject(EntityUtils.toString(res.getEntity()));

				System.out.println(json);
			}

			get.releaseConnection();
		} catch (Exception e) {
			e.printStackTrace();
		} finally {
			try {
				if (res != null) {
					res.close();
				}
				if (client != null) {
					client.close();
				}
			} catch (Exception ex) {
				ex.printStackTrace();
			}
		}

​ 4、返回示例

{
    "data": {},
    "messages": [
        {
            "msgDetail": "找不到相关记录,记录可能已被删除或你没有访问权限",
            "msgCode": "core_141019"
        }
    ],
    "status": false
}
{
    "data": {
        "prodmainpw": [
            {
                "tDate": 1647964800000,
                "lastModifyUid": 20,
                "code": "PWTEST",
                "cnDeptId": 0,
                "useAccess": false,
                "virDeptId": 7,
                "expiredDate": -2209017600000,
                "iRev": 1,
                "sysJson": "",
                "viewCode": "prodPw",
                "ce01Module": "prodPw",
                "beId": 142,
                "expired": false,
                "printCount": 0,
                "autoGen": false,
                "useAccessBl": false,
                "id": 115,
                "doctypeId": 0,
                "statusModifyDate": 1648890621000,
                "locked": false,
                "lastModifyDate": 1648890621000,
                "createUid": 20,
                "locId": 15,
                "createDate": 1648890621000,
                "rev": "1",
                "lastApproveUid": 20,
                "expiredUid": 0,
                "useAccessWl": false,
                "useAccessAutoCalc": false,
                "staffId": 785,
                "status": "Y"
            }
        ],
        "prodpwstt": [
            {
                "sourceId": 425,
                "dDesc_ctw": "",
                "dualQty": 0,
                "iRev": 1,
                "itemNo": "     1",
                "dDesc_zh-CN": "<p>钻石套装 -- 18K鑽戒 (女) 1<br></p>",
                "bDesc_ctw": "",
                "ce01Module": "prodPw",
                "beId": 142,
                "isSemi": false,
                "lot": "A",
                "oriQty": 100,
                "bDesc_haha1": "",
                "dDesc_zh-TW": "",
                "bDesc": "多工艺产品 sc 1",
                "bDesc_ccn": "",
                "bDesc_zh-TW": "",
                "unitId": 39720,
                "dDesc_ccn": "",
                "id": 162,
                "dDesc_haha1": "",
                "hId": 115,
                "mjobId": 425,
                "bDesc_en": "",
                "pdnLot": "",
                "stId": 425,
                "dDesc_en": "",
                "pdnId": 0,
                "sourceProId": 4634,
                "oriUnitId": 39720,
                "dualUnitId": 0,
                "sourceLot": "A",
                "sourceMjobLot": "A",
                "footerKey": "     1",
                "dDesc": "<p>钻石套装 -- 18K鑽戒 (女) 1<br></p>",
                "i18nField": "{\"bDesc_zh-CN\": \"多工艺产品 sc 1\", \"dDesc_zh-CN\": \"<p>钻石套装 -- 18K鑽戒 (女) 1<br></p>\"}",
                "semiLot": "A",
                "sourceType": "prodMjob",
                "mlot": "A",
                "proId": 4634,
                "qty": 100,
                "ndFooterKey": "     1",
                "stLot": "A",
                "mproId": 4634,
                "stType": "prodMjob",
                "bDesc_zh-CN": "多工艺产品 sc 1"
            }
        ],
        "prodpwmattlot": [
            {
                "hId": 115,
                "dualQty": 0,
                "costAmt": 0,
                "pickId": 128,
                "iRev": 1,
                "itemNo": "     1",
                "oriUnitId": 38887,
                "dualUnitId": 3937,
                "ce01Module": "prodPw",
                "beId": 142,
                "jobId": 1650,
                "oriQty": 100,
                "footerKey": "     1",
                "pickType": "prodPick",
                "qty": 100,
                "proId": 3972,
                "newLotno": 0,
                "ndFooterKey": "     1",
                "unitId": 38887,
                "id": 330,
                "pickLot": "A",
                "locId": 15,
                "lotNoId": 5388
            }
        ],
        "prodpwmatt": [
            {
                "dDesc_ctw": "",
                "dualQty": 0,
                "iRev": 1,
                "itemNo": "     1",
                "dDesc_zh-CN": "",
                "wcgDesc": "出水",
                "bDesc_ctw": "",
                "ce01Module": "prodPw",
                "beId": 142,
                "oriQty": 100,
                "bDesc_haha1": "",
                "dDesc_zh-TW": "",
                "processId": 11,
                "bDesc": "圓形鑽石+0 (SI1) sc",
                "bDesc_ccn": "",
                "bDesc_zh-TW": "",
                "unitId": 38887,
                "refdest": "",
                "dDesc_ccn": "",
                "id": 420,
                "jobType": "prodJob",
                "matLot": "A",
                "matcatId": 0,
                "dDesc_haha1": "",
                "hId": 115,
                "bDesc_en": "",
                "lastPw": false,
                "processDesc": "鑲石後電金",
                "dDesc_en": "",
                "wcgId": 15,
                "oriUnitId": 38887,
                "dualUnitId": 3937,
                "jobId": 1650,
                "footerKey": "     1",
                "dDesc": "",
                "i18nField": "{\"bDesc_zh-CN\": \"圓形鑽石+0 (SI1) sc\", \"dDesc_zh-CN\": \"\"}",
                "proId": 3972,
                "qty": 100,
                "ndFooterKey": "     1",
                "remarks": "",
                "bDesc_zh-CN": "圓形鑽石+0 (SI1) sc"
            }
        ],
        "prodpwt": [
            {
                "lotnoNumAttr17": 0,
                "lotnoNumAttr16": 0,
                "lotnoNumAttr15": 0,
                "lotnoNumAttr14": 0,
                "lotnoNumAttr19": 0,
                "pbDesc": "",
                "lotnoNumAttr18": 0,
                "lotnoLookupAttr20": 0,
                "lotnoNumAttr13": 0,
                "lotnoNumAttr12": 0,
                "lotnoNumAttr11": 0,
                "lotnoNumAttr10": 0,
                "isSemi": false,
                "lotnoLookupAttr16": 0,
                "oriQty": 100,
                "lotnoLookupAttr17": 0,
                "lotnoLookupAttr14": 0,
                "lotnoLookupAttr15": 0,
                "lotnoLookupAttr18": 0,
                "bDesc_zh-TW": "多工艺产品 tc 1",
                "lotnoLookupAttr19": 0,
                "newLotno": 1,
                "lotnoLot": "A",
                "id": 138,
                "pbDesc_zh-TW": "",
                "dDesc_haha1": "",
                "matUc": 0,
                "lotnoNumAttr20": 0,
                "pdDesc_ccn": "",
                "lotnoLookupAttr12": 0,
                "lotnoLookupAttr13": 0,
                "lotnoLookupAttr10": 0,
                "passQty": 0,
                "lotnoLookupAttr11": 0,
                "i18nField": "{\"bDesc_en\": \"多工艺产品 1\", \"dDesc_en\": \"<p>钻石套装 -- 18K鑽戒 (女) 1<br></p>\", \"bDesc_zh-CN\": \"多工艺产品 sc 1\", \"bDesc_zh-TW\": \"多工艺产品 tc 1\", \"dDesc_zh-CN\": \"<p>钻石套装 -- 18K鑽戒 (女) 1<br></p>\", \"dDesc_zh-TW\": \"<p>&nbsp;</p>\", \"pbDesc_zh-CN\": \"\", \"pdDesc_zh-CN\": \"\"}",
                "pbDesc_zh-CN": "",
                "sourceType": "prodMjob",
                "mproId": 4634,
                "pproId": 0,
                "costAmt": 0,
                "iRev": 1,
                "bDesc_ctw": "",
                "ce01Module": "prodPw",
                "lot": "A",
                "lotnoDateAttr3": -2209017600000,
                "lotnoDateAttr4": -2209017600000,
                "lotnoDateAttr1": -2209017600000,
                "lotnoDateAttr2": -2209017600000,
                "lotnoDateAttr7": -2209017600000,
                "lotnoDateAttr8": -2209017600000,
                "bDesc_ccn": "",
                "lotnoDateAttr5": -2209017600000,
                "lotnoDateAttr6": -2209017600000,
                "unitId": 39720,
                "lotnoDateAttr9": -2209017600000,
                "pbDesc_ctw": "",
                "psfId": 3,
                "locId": 15,
                "directLaborUc": 0,
                "mjobId": 425,
                "bomId": 75,
                "bDesc_en": "多工艺产品 1",
                "pdDesc": "",
                "scrapQty": 0,
                "pdDesc_haha1": "",
                "pdDesc_en": "",
                "lotnoTextAttr1": "",
                "lotnoTextAttr2": "",
                "lotnoTextAttr3": "",
                "lotnoTextAttr4": "",
                "lotnoTextAttr5": "",
                "lotnoTextAttr6": "",
                "lotnoTextAttr7": "",
                "lotnoTextAttr8": "",
                "lotnoTextAttr9": "",
                "bDesc_zh-CN": "多工艺产品 sc 1",
                "sourceId": 425,
                "dualQty": 0,
                "supMatUc": 0,
                "itemNo": "     1",
                "uc": 0,
                "beId": 142,
                "pdDesc_zh-CN": "",
                "bDesc": "多工艺产品 sc 1",
                "hId": 115,
                "pbDesc_ccn": "",
                "lotnoNumAttr1": 0,
                "lotnoNumAttr2": 0,
                "lotnoNumAttr3": 0,
                "lotnoNumAttr4": 0,
                "pdDesc_zh-TW": "",
                "mjobModule": "prodMjob",
                "jobId": 0,
                "lotnoExpDate": 253402271999000,
                "footerKey": "     1",
                "dDesc": "<p>钻石套装 -- 18K鑽戒 (女) 1<br></p>",
                "qty": 100,
                "lotnoNumAttr5": 0,
                "lotnoNumAttr6": 0,
                "lotnoNumAttr7": 0,
                "lotnoNumAttr8": 0,
                "lotnoNumAttr9": 0,
                "lotNoId": 5492,
                "lotnoTextAttr16": "",
                "dDesc_ctw": "",
                "lotnoTextAttr15": "",
                "lotnoTextAttr18": "",
                "lotnoTextAttr17": "",
                "lotnoTextAttr12": "",
                "lotnoTextAttr11": "",
                "lotnoDateAttr20": -2209017600000,
                "lotnoTextAttr14": "",
                "lotnoTextAttr13": "",
                "dDesc_zh-CN": "<p>钻石套装 -- 18K鑽戒 (女) 1<br></p>",
                "lotnoTextAttr19": "",
                "bDesc_haha1": "",
                "dDesc_zh-TW": "<p>&nbsp;</p>",
                "pdDesc_ctw": "",
                "subconLaborUc": 0,
                "dDesc_ccn": "",
                "pbDesc_haha1": "",
                "lotnoTextAttr10": "",
                "bomDesc": "多个自制工艺",
                "pbDesc_en": "",
                "dDesc_en": "<p>钻石套装 -- 18K鑽戒 (女) 1<br></p>",
                "oriUnitId": 39720,
                "dualUnitId": 4489,
                "lotnoLookupAttr5": 0,
                "lotnoLookupAttr6": 0,
                "sourceLot": "A",
                "lotnoLookupAttr7": 0,
                "lotnoDateAttr18": -2209017600000,
                "lotnoLookupAttr8": 0,
                "lotnoDateAttr19": -2209017600000,
                "lotno": "PWTEST00000000000000",
                "lotnoLookupAttr9": 0,
                "semiLot": "A",
                "mlot": "A",
                "proId": 4634,
                "lotnoDateAttr12": -2209017600000,
                "lotnoDateAttr13": -2209017600000,
                "lotnoDateAttr10": -2209017600000,
                "lotnoDateAttr11": -2209017600000,
                "lotnoTextAttr20": "",
                "lotnoLookupAttr1": 0,
                "lotnoDateAttr16": -2209017600000,
                "lotnoLookupAttr2": 0,
                "lotnoDateAttr17": -2209017600000,
                "lotnoLookupAttr3": 0,
                "lotnoDateAttr14": -2209017600000,
                "lotnoLookupAttr4": 0,
                "lotnoDateAttr15": -2209017600000
            }
        ],
        "prodrempw": [
            {
                "hId": 115,
                "i18nField": "{\"remarks_zh-CN\": \"\"}",
                "remarks_zh-CN": "",
                "remarks_ccn": "",
                "remarks_en": "",
                "remarks_haha1": "",
                "iRev": 1,
                "id": 114,
                "remarks_zh-TW": "",
                "remarks": "",
                "remarks_ctw": "",
                "ce01Module": "prodPw"
            }
        ]
    },
    "messages": [],
    "status": true
}

# 保存生产入库单

# 一、接口描述

​ 用于新增或者更新【生产入库单】

# 二、接口调用说明

​ 1、请求说明

URL http://[server]/jsf/rfws/root/api/save/prodPw
http请求方式 PUT
编码类型 UTF-8

​ 2、URL参数

参数 类型 必填 说明
authorization String(Header) 是 OAuth获取的Access Token
client_id String(Header) 是 aiM18[授权应用列表]中的Client ID
menuCode String(Query) 是 prodPw
param String(Query) 否 额外的系统参数;JSON字符串

​ 3、请求示例

	CloseableHttpClient client = HttpClientBuilder.create().build();
	CloseableHttpResponse res = null;
	try {

		String url = "http://" + HostIP + ":" + HostPort + "/jsf/rfws/root/api/save/prodPw";
		String param = "&menuCode=prodPw";

		HttpPut put = new HttpPut(url + "?" + param);
		put.addHeader("authorization", access_token);
		put.addHeader("client_id", ClientID);

		StringEntity entity = new StringEntity(data.toJSONString(), ContentType.APPLICATION_JSON);
		entity.setContentEncoding("UTF-8");
		put.setEntity(entity);

		res = client.execute(put);
		if (res.getStatusLine().getStatusCode() == HttpStatus.SC_OK) {
			JSONObject json = JSON.parseObject(EntityUtils.toString(res.getEntity()));

			if (json != null) {
				recordId = json.getLongValue("recordId");
			}

			System.out.println(json);
		}

		put.releaseConnection();
	} catch (Exception e) {
		e.printStackTrace();
	} finally {
		try {
			if (res != null) {
				res.close();
			}
			if (client != null) {
				client.close();
			}
		} catch (Exception ex) {
			ex.printStackTrace();
		}
	}				

Entity的JSON格式数据如下:

{
    "prodmainpw": {
        "values": [
            {
                "beId": 142,
                "tDate": "2022-03-23",
                "code": "PWTEST2",
                "virDeptId": 7,
                "staffId": 785,
                "locId": 15
            }
        ]
    },
    "prodpwstt": {
        "values": [
            {
                "sourceId": 425,
                "mjobId": 425,
                "stId": 425,
                "sourceProId": 4634,
                "oriUnitId": 39720,
                "lot": "A",
                "oriQty": 100,
                "sourceLot": "A",
                "sourceMjobLot": "A",
                "footerKey": "     1",
                "semiLot": "A",
                "sourceType": "prodMjob",
                "mlot": "A",
                "proId": 4634,
                "qty": 100,
                "unitId": 39720,
                "ndFooterKey": "     1",
                "stLot": "A",
                "mproId": 4634,
                "stType": "prodMjob"
            }
        ]
    },
    "prodpwmattlot": {
        "values": [
            {
                "pickId": 128,
                "oriUnitId": 38887,
                "lot": "A",
                "jobId": 1650,
                "oriQty": 100,
                "footerKey": "     1",
                "pickType": "prodPick",
                "proId": 3972,
                "qty": 100,
                "unitId": 38887,
                "ndFooterKey": "     1",
                "pickLot": "A",
                "locId": 15,
                "lotNoId": 5388
            }
        ]
    },
    "prodpwmatt": {
        "values": [
            {
                "wcgId": 15,
                "oriUnitId": 39720,
                "lot": "A",
                "jobId": 1650,
                "oriQty": 100,
                "footerKey": "     1",
                "processId": 11,
                "proId": 4634,
                "qty": 100,
                "unitId": 39720,
                "ndFooterKey": "     1",
                "jobType": "prodJob",
                "matLot": "A",
                "jobLot": "A"
            }
        ]
    },
    "prodpwt": {
        "values": [
            {
                "sourceId": 425,
                "mjobId": 425,
                "bomId": 75,
                "oriUnitId": 39720,
                "passQty": 100,
                "lot": "A",
                "isSemi": false,
                "oriQty": 100,
                "sourceLot": "A",
                "footerKey": "     1",
                "sourceType": "prodMjob",
                "semiLot": "A",
                "mlot": "A",
                "proId": 4634,
                "qty": 100,
                "unitId": 39720,
                "mproId": 4634,
                "psfId": 3,
                "locId": 15
            }
        ]
    }
}

​ 4、返回示例

{
    "recordId": 116,
    "messages": [],
    "status": true
}
{
    "recordId": 0,
    "messages": [
        {
            "msgDetail": "必填项为空",
            "msgCode": "core_101905"
        }
    ],
    "status": false
}	

# 删除生产入库单

# 一、接口描述

​ 用于删除生产入库单

# 二、接口调用说明

​ 1、请求说明

URL http://[server]/jsf/rfws/root/api/delete/prodPw
http请求方式 DELETE
编码类型 UTF-8

​ 2、URL参数

参数 类型 必填 说明
authorization String(Header) 是 OAuth获取的Access Token
client_id String(Header) 是 aiM18[授权应用列表]中的Client ID
menuCode String(Query) 是 prodPw
id long(Query) 是 生产入库单的id
param String(Query) 否 额外的系统参数;JSON字符串

​ 3、请求示例

	CloseableHttpClient client = HttpClientBuilder.create().build();
	CloseableHttpResponse res = null;
	try {

		String url = "http://" + HostIP + ":" + HostPort + "/jsf/rfws/root/api/delete/prodPw";
		String param = "&menuCode=prodPw&id=" + id;

		HttpDelete delete = new HttpDelete(url + "?" + param);
		delete.addHeader("authorization", access_token);
		delete.addHeader("client_id", ClientID);

		res = client.execute(delete);
		if (res.getStatusLine().getStatusCode() == HttpStatus.SC_OK) {
			JSONObject json = JSON.parseObject(EntityUtils.toString(res.getEntity()));

			System.out.println(json);
		}

		delete.releaseConnection();
	} catch (Exception e) {
		e.printStackTrace();
	} finally {
		try {
			if (res != null) {
				res.close();
			}
			if (client != null) {
				client.close();
			}
		} catch (Exception ex) {
			ex.printStackTrace();
		}
	}				

​ 4、返回示例

{
	"messages": [],
	"status": true
}
{
    "messages": [
        {
            "msgDetail": "单据已被删除",
            "msgCode": "core_101017"
        }
    ],
    "status": false
}

# 读取EBI数据:生产入库报告

# 一、接口描述

​ 用于执行EBI[生产入库报告],返回EBI数据

# 二、接口调用说明

​ 1、请求说明

URL http://[server]/jsf/rfws/ebiWidget/loadReport
http请求方式 GET
编码类型 UTF-8

​ 2、URL参数

参数 类型 必填 说明
authorization String(Header) 是 OAuth获取的Access Token
client_id String(Header) 是 aiM18[授权应用列表]中的Client ID
formatId long(Query) 是 通过EBI接口获取到formatId
beId long(Query) 否 企业法人的ID。若不传,则查询所有有权限的BE数据
offset int(Query) 否 返回结果的开始行
rows int(Query) 否 返回结果的结束行

​ 3、请求示例

	CloseableHttpClient client = HttpClientBuilder.create().build();
	CloseableHttpResponse res = null;
	try {

		String url = "http://" + HostIP + ":" + HostPort + "/jsf/rfws/ebiWidget/loadReport";
		String param = "&formatId=" + formatId;

		HttpGet get = new HttpGet(url + "?" + param);
		get.addHeader("authorization", access_token);
		get.addHeader("client_id", ClientID);
		res = client.execute(get);
		if (res.getStatusLine().getStatusCode() == HttpStatus.SC_OK) {
			JSONObject json = JSON.parseObject(EntityUtils.toString(res.getEntity()));

			System.out.println(json);
		}

		get.releaseConnection();
	} catch (Exception e) {
		e.printStackTrace();
	} finally {
		try {
			if (res != null) {
				res.close();
			}
			if (client != null) {
				client.close();
			}
		} catch (Exception ex) {
			ex.printStackTrace();
		}
	}				

​ 4、返回示例

{
    "size": 1,
    "rows": [
        {
            "MAIN_outQty": "0.0000",
            "MAINPW_A_code": "PW20210005",
            "PWT_A_proId_code": "MX-JZ-F5",
            "aiM18ReservedCol_dataIndex": 1,
            "MAINPW_A_id": "90",
            "LOTNO_A_lotno": "PW202100050000000000",
            "MAINPW_A_tDate": "2021.04.29",
            "MAIN_prodQty": "100.0000",
            "MAIN_newLotno": "Y",
            "PWT_A_mlot": "A",
            "MAIN_lotQty": "40.0000",
            "MAIN_consumReqQty": "0.0000",
            "PWT_A_oriQty": "40.0000",
            "MAIN_matReqQty": "0.0000",
            "PWT_A_proId": "4634",
            "MAIN_matReqQtyPerUnit": "0.0000"
        }
    ]
}

ebi2

Last Updated: 2025/04/09, 02:58:38
零售和第三方物流
贸易和财务

← 零售和第三方物流 贸易和财务→

Theme by Vdoing | Copyright © 1990-2025 Multiable | MIT License
  • 跟随系统
  • 浅色模式
  • 深色模式
  • 阅读模式