## 合同模板生成 * 开发地址: http://117.78.50.82:9089 * 测试地址: http://192.168.21.31:88/crm-print ### 销售合同 * 请求路径 /contract/gen/sellContract * 请求方法 post * 入参 | 字段 | 名称 | 类型 | 说明 | | ------------------------- | ----------------- | ------ | -------------------------------------------- | | conCode | 合同编号 | string | | | appDate | 签约日期 | string | | | clientName | 采购方 | string | | | registeredAddress | 注册地址 | string | | | taxNumber | 统一社会信用代码 | string | | | paymentMethod | 本合同的付款方式 | string | | | paymentDayOne | 本合同的付款方式1 | string | | | paymentDayTwo | 本合同的付款方式2 | string | | | invoiceType | 增值税 | string | | | qualityDay | 质量验收日 | string | | | responsibility | 违约金日 | string | | | copies | 合同份数 | string | 默认2 | | perCopies | 各执份数 | string | 默认1 | | contractProductDetailVo | 产品详情 | object | | | --\|contractTotalMoney | 合同总金额 | string | | | --\|contractTotalMoneyBig | 合同总金额大写 | string | | | --\|list | 产品明细列表 | array | 如果值为空,请传new ArrayList() ,不要传null | | --\|--\|seqNo | 序号 | string | | | --\|--\|productnum | 货号 | string | | | --\|--\|productname | 产品名 | string | | | --\|--\|spec | 规格 | string | | | --\|--\|salenum | 数量 | string | | | --\|--\|taxprice | 单价 | string | | | --\|--\|sumaell | 小计 | string | | | deliveryTime | 交货时间方式 | string | | | deliveryTimeOne | 交货时间方式1 | string | | | deliveryTimeTwo | 交货时间方式2 | | | | address | 交货地点 | string | | | acceptPhone | 联系电话 | string | | | firstName | 甲方 | string | | * 样例 ```java{ { "conCode": "NJXS000272021090802", "appDate": "2021年09月09日", "clientName": "上海晶旷生物科技有限公司", "registeredAddress": "麓谷企业广场", "taxNumber": "123123123213212313213213", "paymentMethod": "1.1", "paymentDayOne": "3", "paymentDayTwo": "2", "invoiceType": "普通发票", "qualityDay": "3", "responsibility": "五", "copies": "2", "perCopies": "3", "contractProductDetailVo":{ "contractTotalMoney": "10", "contractTotalMoneyBig": "10", "list":[ {"seqNo":"1","productnum":"03.02.03.0869","productname":"TruePrep® RNA Library Prep Kit for Illumina","spec":"6 rxn","salenum": "1","taxprice": "5","sumaell": "5"}, {"seqNo":"2","productnum":"03.02.02.02.0337","productname":"DL2000 Plus DNA Marker","spec":"250 μl","salenum": "1","taxprice": "5","sumaell": "5"} ] }, "deliveryTime": "2.1.1", "deliveryTimeOne": "3", "address":"湖北省武汉市硚口区解放大道65号海尔国际广场8号楼22层", "acceptPhone": "18874850463", "firstName": "上海晶旷生物科技有限公" } ``` * 出参 | 字段 | 名称 | 类型 | 说明 | | ---------- | -------- | ------ | ------------------------ | | resultCode | 结果编码 | int | 200 成功,其他失败 | | resultMsg | 结果消息 | string | 结果消息 | | result | 预览地址 | string | 结果成功时才会有预览地址 | * 样例 ```java{ "resultMsg": "success", "resultCode": 200, "result": "http://117.78.50.82:9089/onlinePreview?url=aHR0cDovLzExNy43OC41MC44Mjo5MDg5Ly85NmZmZDE3MjU1YzY0YTlkOTdjODA1NzM4NzhiYzFjYS5kb2N4" } ``` ### 框架合同 * 请求路径 /contract/gen/frameContract * 请求方法 post * 入参 | 字段 | 名称 | 类型 | 说明 | | ------------------- | ---------------- | ------ | -------------------------------------------- | | conCode | 合同编号 | string | | | appDate | 签约日期 | string | | | clientName | 采购方 | string | | | registeredAddress | 注册地址 | string | | | taxNumber | 统一社会信用代码 | string | | | contractPeriodStart | 合同期限开始日期 | string | | | contractPeriodEnd | 合同期限结束日期 | string | | | afterShipDay | 发货日 | string | | | paymentMethod | 合同的付款方式 | string | | | paymentDayOne | 合同的付款方式1 | string | | | paymentDayTwo | 合同的付款方式2 | string | | | checkDay | 验收日 | string | | | validInteInterval | 有效期月 | string | | | responsibility | 违约金额 | string | | | firstName | 甲方 | sring | | | firstRepresentative | 授权代表 | string | | | list | 产品列表 | array | 如果值为空,请传new ArrayList() ,不要传null | | --\|seqNo | 序号 | string | | | --\|productnum | 货号 | string | | | --\|productname | 产品名称 | string | | | --\|spec | 规格 | string | | | --\|taxprice | 单价 | string | | | deliveryTime | 发货方式 | string | | | deliveryTimeOne | 发货方式1 | string | | | deliveryTimeTwo | 发货方式2 | string | | * 样例 ```java{ "conCode": "NJXS000272021090802", "appDate": "2021年09月11日", "clientName": "上海晶旷生物科技有限公司", "registeredAddress": "麓谷企业广场", "taxNumber": "123123123213212313213213", "afterShipDay": "5", "contractPeriodStart": "2021年09月09日", "contractPeriodEnd": "2021年09月10日", "paymentMethod": "2", "paymentDayOne": "3%", "checkDay": "3", "validInteInterval": "五", "responsibility":"千分之五", "firstName":"上海晶旷生物科技有限公司", "firstRepresentative": "张三", "list":[ {"seqNo":"1","itemNo":"03.02.03.0869","productName":"TruePrep® RNA Library Prep Kit for Illumina","spec":"6 rxn","price": "5"}, {"seqNo":"2","itemNo":"03.02.02.02.0337","productName":"DL2000 Plus DNA Marker","spec":"250 μl","price": "5"} ], "deliveryTime": "2.1.1", "deliveryTimeOne": "3" } ``` * 出参 | 字段 | 名称 | 类型 | 说明 | | ---------- | -------- | ------ | ------------------------ | | resultCode | 结果编码 | int | 200 成功,其他失败 | | resultMsg | 结果消息 | string | 结果消息 | | result | 预览地址 | string | 结果成功时才会有预览地址 | * 样例 ```java{ "resultMsg": "success", "resultCode": 200, "result": "http://117.78.50.82:9089/onlinePreview?url=aHR0cDovLzExNy43OC41MC44Mjo5MDg5Ly9kYTdhODU5NDhlOWY0MmFjYmFkNTc1MzRlNGFlMGU5NS5kb2N4" } ``` ### 合同模板上传 * 请求方法post * 请求路径 /contract/upload/{templateName} * 入参 | 字段 | 名称 | 类型 | 说明 | | ------------------- | ---------------- | ------ | -------------------------------------------- | | file | 上传文件 | MultipartFile | | | templateName | path变量 | 销售合同 sellContract、框架合同 frameContract| * 出参 | 字段 | 名称 | 类型 | 说明 | | ---------- | -------- | ------ | ------------------------ | | resultCode | 结果编码 | int | 200 成功,其他失败 | | resultMsg | 结果消息 | string | 结果消息 | | result | 预览地址 | string | 结果成功时才会有下载地址 | * 样例 ```java { "resultMsg": "成功", "resultCode": 200, "result": "http://117.78.50.82:9089/crm-print/template/sellContract.docx" } ``` ### 合同模板下载列表 * 请求方法post * 请求路径 /contract/list/template * 入参 | 字段 | 名称 | 类型 | 说明 | | ------------------- | ---------------- | ------ | -------------------------------------------- | | templateNames | 所有模板列表 | array | | * 样例 ```java ["sellContract","frameContract"] ``` * 出参 | 字段 | 名称 | 类型 | 说明 | | ---------- | -------- | ------ | ------------------------ | | resultCode | 结果编码 | int | 200 成功,其他失败 | | resultMsg | 结果消息 | string | 结果消息 | | result | 预览地址 | array | 结果成功时才会有下载地址列表 | * 样例 ````java { "resultMsg": "成功", "resultCode": 200, "result": [ "http://117.78.50.82:9089/crm-print/template/sellContract.docx", "http://117.78.50.82:9089/crm-print/template/frameContract.docx" ] } ```` ## docker部署 ### 需要映射的路径 * /data/file 文件存储路径 * /data/file/cache 缓存路径 * 输出文件预览服务部署文档。 * 性能压测。