diff --git a/docs/山海接口数据/返回数据-1.待配货列表.json b/docs/山海接口数据/返回数据-1.待配货列表.json new file mode 100644 index 0000000..597ea67 --- /dev/null +++ b/docs/山海接口数据/返回数据-1.待配货列表.json @@ -0,0 +1,414 @@ +{ + "code": 200, + "msg": "获取成功", + "data": { + "list": [ + { + "id": 10888, + "apply_no": "1010739269970043022", + "agent_id": 10022, + "order_id": "101966", + "storehouse_id": 11, + "status": 5, + "create_time": 1685925970, + "confirm_time": 1685925970, + "cancel_time": 0, + "workflow_unique": "1_8_0_136_1", + "other_img": null, + "agent_name": "保定市锦润新能源科技有限公司", + "storehouse_name": "藁城荣名库", + "storehouse_area_id": 13992, + "storehouse_address": "石家庄顺泰仓储中心", + "order_num": 1, + "customer_name": "樊红梅", + "check_time": "2023-06-05 08:46:39", + "check_status": "审核通过", + "check_remark": "同意", + "storehouse_info": "河北省石家庄市藁城区石家庄顺泰仓储中心", + "create_time_text": "2023-06-05 08:46:10", + "confirm_time_text": "2023-06-05 08:46:10", + "cancel_time_text": "", + "status_text": "已交货" + }, + { + "id": 10887, + "apply_no": "5990739269652022012", + "agent_id": 10012, + "order_id": "101198", + "storehouse_id": 10, + "status": 5, + "create_time": 1685925652, + "confirm_time": 1685925652, + "cancel_time": 0, + "workflow_unique": "2_3_0_136_1", + "other_img": null, + "agent_name": "【曲阜整县】成都盛世中丰工程有限公司", + "storehouse_name": "曲阜荣名库", + "storehouse_area_id": 322275, + "storehouse_address": "山东省济宁市曲阜市", + "order_num": 1, + "customer_name": "李振菊", + "check_time": "2023-06-05 08:41:43", + "check_status": "审核通过", + "check_remark": "无", + "storehouse_info": "山东省济宁市曲阜市山东省济宁市曲阜市", + "create_time_text": "2023-06-05 08:40:52", + "confirm_time_text": "2023-06-05 08:40:52", + "cancel_time_text": "", + "status_text": "已交货" + }, + { + "id": 10886, + "apply_no": "4560739269594986012", + "agent_id": 10012, + "order_id": "101163", + "storehouse_id": 10, + "status": 5, + "create_time": 1685925594, + "confirm_time": 1685925595, + "cancel_time": 0, + "workflow_unique": "2_3_0_136_1", + "other_img": null, + "agent_name": "【曲阜整县】成都盛世中丰工程有限公司", + "storehouse_name": "曲阜荣名库", + "storehouse_area_id": 322275, + "storehouse_address": "山东省济宁市曲阜市", + "order_num": 1, + "customer_name": "穆秀明", + "check_time": "2023-06-05 08:41:10", + "check_status": "审核通过", + "check_remark": "无", + "storehouse_info": "山东省济宁市曲阜市山东省济宁市曲阜市", + "create_time_text": "2023-06-05 08:39:54", + "confirm_time_text": "2023-06-05 08:39:55", + "cancel_time_text": "", + "status_text": "已交货" + }, + { + "id": 10885, + "apply_no": "9650739269251092012", + "agent_id": 10012, + "order_id": "101381", + "storehouse_id": 10, + "status": 5, + "create_time": 1685925251, + "confirm_time": 1685925251, + "cancel_time": 0, + "workflow_unique": "2_3_0_136_1", + "other_img": null, + "agent_name": "【曲阜整县】成都盛世中丰工程有限公司", + "storehouse_name": "曲阜荣名库", + "storehouse_area_id": 322275, + "storehouse_address": "山东省济宁市曲阜市", + "order_num": 1, + "customer_name": "孟燕", + "check_time": "2023-06-05 08:38:18", + "check_status": "审核通过", + "check_remark": "无", + "storehouse_info": "山东省济宁市曲阜市山东省济宁市曲阜市", + "create_time_text": "2023-06-05 08:34:11", + "confirm_time_text": "2023-06-05 08:34:11", + "cancel_time_text": "", + "status_text": "已交货" + }, + { + "id": 10884, + "apply_no": "5160739269171365012", + "agent_id": 10012, + "order_id": "101492", + "storehouse_id": 10, + "status": 5, + "create_time": 1685925171, + "confirm_time": 1685925171, + "cancel_time": 0, + "workflow_unique": "2_3_0_136_1", + "other_img": null, + "agent_name": "【曲阜整县】成都盛世中丰工程有限公司", + "storehouse_name": "曲阜荣名库", + "storehouse_area_id": 322275, + "storehouse_address": "山东省济宁市曲阜市", + "order_num": 1, + "customer_name": "孟庆丁", + "check_time": "2023-06-05 08:36:52", + "check_status": "审核通过", + "check_remark": "无", + "storehouse_info": "山东省济宁市曲阜市山东省济宁市曲阜市", + "create_time_text": "2023-06-05 08:32:51", + "confirm_time_text": "2023-06-05 08:32:51", + "cancel_time_text": "", + "status_text": "已交货" + }, + { + "id": 10883, + "apply_no": "5530739112714807011", + "agent_id": 10011, + "order_id": "102859", + "storehouse_id": 15, + "status": 5, + "create_time": 1685768714, + "confirm_time": 1685768714, + "cancel_time": 0, + "workflow_unique": "1_8_0_136_1", + "other_img": null, + "agent_name": "安阳营销中心", + "storehouse_name": "安阳荣名库", + "storehouse_area_id": 373193, + "storehouse_address": "", + "order_num": 1, + "customer_name": "韩秀永", + "check_time": "2023-06-03 13:07:26", + "check_status": "审核通过", + "check_remark": "无", + "storehouse_info": "河南省安阳市文峰区", + "create_time_text": "2023-06-03 13:05:14", + "confirm_time_text": "2023-06-03 13:05:14", + "cancel_time_text": "", + "status_text": "已交货" + }, + { + "id": 10882, + "apply_no": "3640739112516368002", + "agent_id": 10002, + "order_id": "102832", + "storehouse_id": 15, + "status": 5, + "create_time": 1685768516, + "confirm_time": 1685768516, + "cancel_time": 0, + "workflow_unique": "1_8_0_136_1", + "other_img": null, + "agent_name": "【安阳整县】安阳项目直营(王成)", + "storehouse_name": "安阳荣名库", + "storehouse_area_id": 373193, + "storehouse_address": "", + "order_num": 1, + "customer_name": "白华成", + "check_time": "2023-06-03 13:02:11", + "check_status": "审核通过", + "check_remark": "无", + "storehouse_info": "河南省安阳市文峰区", + "create_time_text": "2023-06-03 13:01:56", + "confirm_time_text": "2023-06-03 13:01:56", + "cancel_time_text": "", + "status_text": "已交货" + }, + { + "id": 10881, + "apply_no": "9180739098598843089", + "agent_id": 89, + "order_id": "102516,102733", + "storehouse_id": 15, + "status": 5, + "create_time": 1685754598, + "confirm_time": 1685754599, + "cancel_time": 0, + "workflow_unique": "1_8_0_136_1", + "other_img": null, + "agent_name": "【安阳整县】河北冀朋工程项目管理有限公司", + "storehouse_name": "安阳荣名库", + "storehouse_area_id": 373193, + "storehouse_address": "", + "order_num": 2, + "customer_name": "梁保丰,蔺桃书", + "check_time": "2023-06-03 09:10:29", + "check_status": "审核通过", + "check_remark": "无", + "storehouse_info": "河南省安阳市文峰区", + "create_time_text": "2023-06-03 09:09:58", + "confirm_time_text": "2023-06-03 09:09:59", + "cancel_time_text": "", + "status_text": "已交货" + }, + { + "id": 10880, + "apply_no": "7370739098463460001", + "agent_id": 10001, + "order_id": "101930,102729", + "storehouse_id": 15, + "status": 5, + "create_time": 1685754463, + "confirm_time": 1685754464, + "cancel_time": 0, + "workflow_unique": "1_8_0_136_1", + "other_img": null, + "agent_name": "【安阳整县】启阳(安阳)新能源有限公司", + "storehouse_name": "安阳荣名库", + "storehouse_area_id": 373193, + "storehouse_address": "", + "order_num": 2, + "customer_name": "申月敏,西于曹村村民委员会", + "check_time": "2023-06-03 09:13:36", + "check_status": "审核通过", + "check_remark": "无", + "storehouse_info": "河南省安阳市文峰区", + "create_time_text": "2023-06-03 09:07:43", + "confirm_time_text": "2023-06-03 09:07:44", + "cancel_time_text": "", + "status_text": "已交货" + }, + { + "id": 10878, + "apply_no": "8710739011498797022", + "agent_id": 10022, + "order_id": "101409", + "storehouse_id": 11, + "status": 5, + "create_time": 1685667498, + "confirm_time": 1685667499, + "cancel_time": 0, + "workflow_unique": "1_8_0_136_1", + "other_img": null, + "agent_name": "保定市锦润新能源科技有限公司", + "storehouse_name": "藁城荣名库", + "storehouse_area_id": 13992, + "storehouse_address": "石家庄顺泰仓储中心", + "order_num": 1, + "customer_name": "郭双凯", + "check_time": "2023-06-02 09:02:28", + "check_status": "审核通过", + "check_remark": "同意", + "storehouse_info": "河北省石家庄市藁城区石家庄顺泰仓储中心", + "create_time_text": "2023-06-02 08:58:18", + "confirm_time_text": "2023-06-02 08:58:19", + "cancel_time_text": "", + "status_text": "已交货" + }, + { + "id": 10875, + "apply_no": "1240739011317324022", + "agent_id": 10022, + "order_id": "101838", + "storehouse_id": 11, + "status": 5, + "create_time": 1685667317, + "confirm_time": 1685667317, + "cancel_time": 0, + "workflow_unique": "1_8_0_136_1", + "other_img": null, + "agent_name": "保定市锦润新能源科技有限公司", + "storehouse_name": "藁城荣名库", + "storehouse_area_id": 13992, + "storehouse_address": "石家庄顺泰仓储中心", + "order_num": 1, + "customer_name": "王桂英", + "check_time": "2023-06-02 09:02:42", + "check_status": "审核通过", + "check_remark": "同意", + "storehouse_info": "河北省石家庄市藁城区石家庄顺泰仓储中心", + "create_time_text": "2023-06-02 08:55:17", + "confirm_time_text": "2023-06-02 08:55:17", + "cancel_time_text": "", + "status_text": "已交货" + }, + { + "id": 10874, + "apply_no": "7670738958783762006", + "agent_id": 10006, + "order_id": "102866", + "storehouse_id": 15, + "status": 5, + "create_time": 1685614783, + "confirm_time": 1685614784, + "cancel_time": 0, + "workflow_unique": "1_8_0_136_1", + "other_img": null, + "agent_name": "【安阳项目】唐县冉灏新能源开发有限责任公司", + "storehouse_name": "安阳荣名库", + "storehouse_area_id": 373193, + "storehouse_address": "", + "order_num": 1, + "customer_name": "李春芳", + "check_time": "2023-06-01 18:20:06", + "check_status": "审核通过", + "check_remark": "无", + "storehouse_info": "河南省安阳市文峰区", + "create_time_text": "2023-06-01 18:19:43", + "confirm_time_text": "2023-06-01 18:19:44", + "cancel_time_text": "", + "status_text": "已交货" + }, + { + "id": 10873, + "apply_no": "1690738939960254011", + "agent_id": 10011, + "order_id": "102673", + "storehouse_id": 15, + "status": 5, + "create_time": 1685595960, + "confirm_time": 1685595960, + "cancel_time": 0, + "workflow_unique": "1_8_0_136_1", + "other_img": null, + "agent_name": "安阳营销中心", + "storehouse_name": "安阳荣名库", + "storehouse_area_id": 373193, + "storehouse_address": "", + "order_num": 1, + "customer_name": "李长林", + "check_time": "2023-06-01 13:06:13", + "check_status": "审核通过", + "check_remark": "无", + "storehouse_info": "河南省安阳市文峰区", + "create_time_text": "2023-06-01 13:06:00", + "confirm_time_text": "2023-06-01 13:06:00", + "cancel_time_text": "", + "status_text": "已交货" + }, + { + "id": 10872, + "apply_no": "3280738936391438001", + "agent_id": 10001, + "order_id": "101533,101581", + "storehouse_id": 15, + "status": 5, + "create_time": 1685592391, + "confirm_time": 1685592392, + "cancel_time": 0, + "workflow_unique": "1_8_0_136_1", + "other_img": null, + "agent_name": "【安阳整县】启阳(安阳)新能源有限公司", + "storehouse_name": "安阳荣名库", + "storehouse_area_id": 373193, + "storehouse_address": "", + "order_num": 2, + "customer_name": "西何坟村村民委员会,西何坟村村民委员会", + "check_time": "2023-06-01 12:10:48", + "check_status": "审核通过", + "check_remark": "无", + "storehouse_info": "河南省安阳市文峰区", + "create_time_text": "2023-06-01 12:06:31", + "confirm_time_text": "2023-06-01 12:06:32", + "cancel_time_text": "", + "status_text": "已交货" + }, + { + "id": 10871, + "apply_no": "2490738933926896006", + "agent_id": 10006, + "order_id": "102848", + "storehouse_id": 15, + "status": 5, + "create_time": 1685589926, + "confirm_time": 1685589927, + "cancel_time": 0, + "workflow_unique": "1_8_0_136_1", + "other_img": null, + "agent_name": "【安阳项目】唐县冉灏新能源开发有限责任公司", + "storehouse_name": "安阳荣名库", + "storehouse_area_id": 373193, + "storehouse_address": "", + "order_num": 1, + "customer_name": "李春芳", + "check_time": "2023-06-01 11:25:47", + "check_status": "审核通过", + "check_remark": "无", + "storehouse_info": "河南省安阳市文峰区", + "create_time_text": "2023-06-01 11:25:26", + "confirm_time_text": "2023-06-01 11:25:27", + "cancel_time_text": "", + "status_text": "已交货" + } + ], + "count": 2464 + } +} \ No newline at end of file diff --git a/docs/山海接口数据/返回数据-2.查看物料实发.json b/docs/山海接口数据/返回数据-2.查看物料实发.json new file mode 100644 index 0000000..19eb433 --- /dev/null +++ b/docs/山海接口数据/返回数据-2.查看物料实发.json @@ -0,0 +1,72 @@ +{ + "code": 200, + "msg": "保存成功", + "data": [ + { + "id": 109502, + "apply_id": 10888, + "materiel_id": 59, + "materiel_no": "1004000047", + "answer_price": "75574.4", + "answer_num": 76, + "actual_price": "0", + "actual_num": 0, + "frozen_agent_stock_num": 76, + "brand_name": "山海智慧-天合", + "note": "整包出库,每包31个", + "status": 1, + "remark": "", + "materiel_group": 1, + "materiel_group_text": "组件", + "materiel_name": "晶科475", + "agent_name": "保定市锦润新能源科技有限公司", + "apply_no": "1010739269970043022", + "inventory_num": 26674, + "agent_id": 10022 + }, + { + "id": 109503, + "apply_id": 10888, + "materiel_id": 38, + "materiel_no": "2001000036", + "answer_price": "9377.5", + "answer_num": 1, + "actual_price": "0", + "actual_num": 0, + "frozen_agent_stock_num": 1, + "brand_name": "山海新能-锦浪", + "note": "按单位出库", + "status": 1, + "remark": "", + "materiel_group": 2, + "materiel_group_text": "逆变器", + "materiel_name": "逆变器-36", + "agent_name": "保定市锦润新能源科技有限公司", + "apply_no": "1010739269970043022", + "inventory_num": 1, + "agent_id": 10022 + }, + { + "id": 109504, + "apply_id": 10888, + "materiel_id": 27, + "materiel_no": "3001000040", + "answer_price": "1174.8", + "answer_num": 1, + "actual_price": "0", + "actual_num": 0, + "frozen_agent_stock_num": 1, + "brand_name": "山海智慧", + "note": "按单位出库", + "status": 1, + "remark": "", + "materiel_group": 3, + "materiel_group_text": "配电箱", + "materiel_name": "2号箱25-36kw", + "agent_name": "保定市锦润新能源科技有限公司", + "apply_no": "1010739269970043022", + "inventory_num": 10, + "agent_id": 10022 + } + ] +} \ No newline at end of file diff --git a/yxt-supervise-gf-api/src/main/java/com/yxt/supervise/gf/api/utils/RsaUtil.java b/yxt-supervise-gf-api/src/main/java/com/yxt/supervise/gf/api/utils/RsaUtil.java index b871c8c..475800e 100644 --- a/yxt-supervise-gf-api/src/main/java/com/yxt/supervise/gf/api/utils/RsaUtil.java +++ b/yxt-supervise-gf-api/src/main/java/com/yxt/supervise/gf/api/utils/RsaUtil.java @@ -1,14 +1,9 @@ package com.yxt.supervise.gf.api.utils; - import cn.hutool.crypto.SecureUtil; -import cn.hutool.crypto.asymmetric.RSA; -import org.apache.commons.codec.digest.DigestUtils; -import sun.misc.BASE64Encoder; import javax.crypto.Cipher; -import javax.crypto.NoSuchPaddingException; import java.io.ByteArrayOutputStream; import java.security.*; import java.security.interfaces.RSAPrivateKey; diff --git a/yxt-supervise-gf-biz/src/main/java/com/yxt/supervise/gf/shanhai/ShHttp.java b/yxt-supervise-gf-biz/src/main/java/com/yxt/supervise/gf/shanhai/ShHttp.java new file mode 100644 index 0000000..c3a0efa --- /dev/null +++ b/yxt-supervise-gf-biz/src/main/java/com/yxt/supervise/gf/shanhai/ShHttp.java @@ -0,0 +1,82 @@ +package com.yxt.supervise.gf.shanhai; + +import cn.hutool.http.HttpRequest; +import cn.hutool.json.JSONUtil; +import com.sun.istack.NotNull; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.springframework.util.Assert; + +import java.util.Map; + +public class ShHttp { + private static final Logger L = LoggerFactory.getLogger(ShHttp.class); + + private static String publicKey = "MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA1Z/+Bslu203UtutmzMW/" + + "FqS9bQvaMXQHgvU+ilNR5Hm2IZZalBWPoSbCGzlCUA19C3X6T17X09OMa6aDPKBm" + + "F6yXvUI7E/nWM9qUJ5hj4zVO/9GoH03WUyCWSBQg4f+LcnLS75v8nI6moOJ5ILkH" + + "mg2KNbEdx55UWjSqBatEopnLWtMFDGZswEbKBH3e2yalK6ddh2kUrtcuQGqFYm/u" + + "ViAOV+KoptwY2MCNSRLKYE4pCA2BCit7nr3EqNZRqqhKaOE44iyv45zCFrllx3nn" + + "wF3X/l+rR4G7Vc7HZwiqKF3RXl9PqmTLJkzhdpAdQX/Kr3SRRHsv/DzKjAZr/2jK" + + "rQIDAQAB"; + private static String key = "sJI8PuGweKztQ6nLgp3dqcwljdKGFjPBD3XyUqCFsVG8rYhAIbD2AkNIKaefbjOB"; + + // private static String baseUrl = "http://hf-service.tiefaos.com"; + private static String baseUrl = "http://hf.lx-obj.top"; + + public static String doGet(String apiUrl, Map params) { + String url = baseUrl + apiUrl; + HttpRequest httpRequest = HttpRequest.get(url); + HttpRequest request = fillHeaders(httpRequest); + String body = request.form(params) + .execute() + .body(); + + L.info("山海Get请求接口:{}###参数:{}###返回值:{}", apiUrl, params, body); + return body; + } + + + public static String dopost(String apiUrl, Map map) { + String url = baseUrl + apiUrl; + String bodyJson = JSONUtil.toJsonStr(map); + HttpRequest httpRequest = HttpRequest.post(url); + HttpRequest request = fillHeaders(httpRequest); +// String body = request.form(params) + String body = request.body(bodyJson) + .execute() + .body(); + + L.info("山海Post请求接口:{}###参数:{}###返回值:{}", apiUrl, bodyJson, body); + return body; + } + + private static HttpRequest fillHeaders(@NotNull HttpRequest httpRequest) { + Assert.notNull(httpRequest); + if (httpRequest == null) + return null; + + String date = headerDate(); + String data = headerData(date); + return httpRequest + .header("date", date) + .header("data", data); + } + + private static String headerData(String date) { + + String res = "jiq07RIXsX/YwIkXCK4VdhIZcnuFHd+ERekZzMdZT7yxGAyON4s/qtJeJcG9z6uJMtqSUKWTvREc4CNsyuStXacJ2bGgKCzFc" + + "UTwwBUJ7AQ2ybhedpkA7JWqJ1UjooLGUYZfoTduygH2r7LG0qRgigQGD3WdB53WLuC11kT5wAzMnFtbBDHpH78oNjGhvmWpa" + + "R6meDCI2OM0GtCWwBxOagCYt8V5DfD47VyNHYn0xFRva4GFBF6K19061h1cu68eXxfIZj+clMweGlICgeXhktq8Z1T0Xmbah" + + "FjhyTmdXuRxZBeQkLsot00XJHwQ48B6Z/VdOPpqoD95NTngRdV3+A=="; // 测试数据 + + return res; + } + + private static String headerDate() { + String res = "" + (System.currentTimeMillis() / 1000); + + res = "1683516744"; // 测试数据 + return res; + } +} diff --git a/yxt-supervise-gf-biz/src/main/java/com/yxt/supervise/gf/shanhai/ShRequester.java b/yxt-supervise-gf-biz/src/main/java/com/yxt/supervise/gf/shanhai/ShRequester.java new file mode 100644 index 0000000..36f8617 --- /dev/null +++ b/yxt-supervise-gf-biz/src/main/java/com/yxt/supervise/gf/shanhai/ShRequester.java @@ -0,0 +1,47 @@ +package com.yxt.supervise.gf.shanhai; + +import cn.hutool.core.bean.BeanUtil; +import cn.hutool.json.JSON; +import cn.hutool.json.JSONObject; +import cn.hutool.json.JSONUtil; +import com.yxt.supervise.gf.shanhai.req.Apply_materialIndex; +import com.yxt.supervise.gf.shanhai.resp.ApplyMaterial; +import com.yxt.supervise.gf.shanhai.resp.BaseResponse; +import com.yxt.supervise.gf.shanhai.resp.BaseResponseListObj; + +import java.util.HashMap; +import java.util.Map; + +public class ShRequester { + + private static String api$system$apply_material$index = "/api/system/apply_material/index"; //1.待配货列表 + private static String api$system$apply_material$get_actual_order_material = "/api/system/apply_material/get_actual_order_material"; //2.查看物料实发 + + /** + * 1.待配货列表 + * + * @return + */ + public static BaseResponse> getApi$system$apply_material$index(Apply_materialIndex reqParams) { + Map param = null; + if (reqParams != null) + param = BeanUtil.beanToMap(reqParams); + BaseResponse> resp = new BaseResponse<>(); + String s = ShHttp.doGet(api$system$apply_material$index, param); + JSONObject jsonObject = JSONUtil.parseObj(s); + return resp; + } + + /** + * 2.查看物料实发 + * + * @param id 备货申请id + * @return + */ + public static String getApi$system$apply_material$get_actual_order_material(String id) { + Map params = new HashMap<>(); + params.put("id", id); + String s = ShHttp.doGet(api$system$apply_material$get_actual_order_material, params); + return s; + } +} diff --git a/yxt-supervise-gf-biz/src/main/java/com/yxt/supervise/gf/shanhai/req/Apply_materialIndex.java b/yxt-supervise-gf-biz/src/main/java/com/yxt/supervise/gf/shanhai/req/Apply_materialIndex.java new file mode 100644 index 0000000..54c5782 --- /dev/null +++ b/yxt-supervise-gf-biz/src/main/java/com/yxt/supervise/gf/shanhai/req/Apply_materialIndex.java @@ -0,0 +1,17 @@ +package com.yxt.supervise.gf.shanhai.req; + +import lombok.Data; + +@Data +public class Apply_materialIndex { + + private String apply_no; // 7400736700760759034 申请单号 + private String username; // 王玉 客户姓名 + private String agent_id; // 10 代理商id + private String status; // 5 状态 待库管确认信息-0,库管已确认-1,已撤回-2,待出库审核-3,待提货-4,已交货-5,待交货审核-6 + +// search_create_time false 2023-05-09 +// 2023-05-10 申请日期 +// search_check_time false 2023-05-09 +// 2023-05-10 审核日期 +} diff --git a/yxt-supervise-gf-biz/src/main/java/com/yxt/supervise/gf/shanhai/resp/ApplyMaterial.java b/yxt-supervise-gf-biz/src/main/java/com/yxt/supervise/gf/shanhai/resp/ApplyMaterial.java new file mode 100644 index 0000000..9f87d71 --- /dev/null +++ b/yxt-supervise-gf-biz/src/main/java/com/yxt/supervise/gf/shanhai/resp/ApplyMaterial.java @@ -0,0 +1,61 @@ +package com.yxt.supervise.gf.shanhai.resp; + +import lombok.Data; + +@Data +public class ApplyMaterial { +// { +// "id": 10888, +// "apply_no": "1010739269970043022", +// "agent_id": 10022, +// "order_id": "101966", +// "storehouse_id": 11, +// "status": 5, +// "create_time": 1685925970, +// "confirm_time": 1685925970, +// "cancel_time": 0, +// "workflow_unique": "1_8_0_136_1", +// "other_img": null, +// "agent_name": "保定市锦润新能源科技有限公司", +// "storehouse_name": "藁城荣名库", +// "storehouse_area_id": 13992, +// "storehouse_address": "石家庄顺泰仓储中心", +// "order_num": 1, +// "customer_name": "樊红梅", +// "check_time": "2023-06-05 08:46:39", +// "check_status": "审核通过", +// "check_remark": "同意", +// "storehouse_info": "河北省石家庄市藁城区石家庄顺泰仓储中心", +// "create_time_text": "2023-06-05 08:46:10", +// "confirm_time_text": "2023-06-05 08:46:10", +// "cancel_time_text": "", +// "status_text": "已交货" +// } + + private long id; // 10888,备货申请id + private String apply_no; // "1010739269970043022",备货申请编号 + private long agent_id; // 10022, + private String order_id; // "101966", + private String storehouse_id; // 11, + private String status; // 5, + private String create_time; // 1685925970, + private String confirm_time; // 1685925970, + private String cancel_time; // 0, + private String workflow_unique; // "1_8_0_136_1", + private String other_img; // null, + private String agent_name; // "保定市锦润新能源科技有限公司", + private String storehouse_name; // "藁城荣名库", + private String storehouse_area_id; // 13992, + private String storehouse_address; // "石家庄顺泰仓储中心", + private String order_num; // 1, + private String customer_name; // "樊红梅", + private String check_time; // "2023-06-05 08:46:39", + private String check_status; // "审核通过", + private String check_remark; // "同意", + private String storehouse_info; // "河北省石家庄市藁城区石家庄顺泰仓储中心", + private String create_time_text; // "2023-06-05 08:46:10", + private String confirm_time_text; // "2023-06-05 08:46:10", + private String cancel_time_text; // "", + private String status_text; // "已交货" + +} diff --git a/yxt-supervise-gf-biz/src/main/java/com/yxt/supervise/gf/shanhai/resp/BaseResponse.java b/yxt-supervise-gf-biz/src/main/java/com/yxt/supervise/gf/shanhai/resp/BaseResponse.java new file mode 100644 index 0000000..f12be4c --- /dev/null +++ b/yxt-supervise-gf-biz/src/main/java/com/yxt/supervise/gf/shanhai/resp/BaseResponse.java @@ -0,0 +1,33 @@ +package com.yxt.supervise.gf.shanhai.resp; + +public class BaseResponse { + + //{"code":404,"msg":"header参数验证错误","data":null} + private int code; + private String msg; + private T data; + + public int getCode() { + return code; + } + + public void setCode(int code) { + this.code = code; + } + + public String getMsg() { + return msg; + } + + public void setMsg(String msg) { + this.msg = msg; + } + + public T getData() { + return data; + } + + public void setData(T data) { + this.data = data; + } +} diff --git a/yxt-supervise-gf-biz/src/main/java/com/yxt/supervise/gf/shanhai/resp/BaseResponseListObj.java b/yxt-supervise-gf-biz/src/main/java/com/yxt/supervise/gf/shanhai/resp/BaseResponseListObj.java new file mode 100644 index 0000000..2c39d68 --- /dev/null +++ b/yxt-supervise-gf-biz/src/main/java/com/yxt/supervise/gf/shanhai/resp/BaseResponseListObj.java @@ -0,0 +1,25 @@ +package com.yxt.supervise.gf.shanhai.resp; + +import java.util.List; + +public class BaseResponseListObj { + + private List list; + private long count; + + public List getList() { + return list; + } + + public void setList(List list) { + this.list = list; + } + + public long getCount() { + return count; + } + + public void setCount(long count) { + this.count = count; + } +} diff --git a/yxt-supervise-gf-biz/src/test/java/demo/tool/SecurTest.java b/yxt-supervise-gf-biz/src/test/java/demo/tool/SecurTest.java new file mode 100644 index 0000000..b6262a7 --- /dev/null +++ b/yxt-supervise-gf-biz/src/test/java/demo/tool/SecurTest.java @@ -0,0 +1,67 @@ +package demo.tool; + +import cn.hutool.core.codec.Base64; +import cn.hutool.core.date.DateUtil; +import cn.hutool.core.util.CharsetUtil; +import cn.hutool.core.util.StrUtil; +import cn.hutool.crypto.SecureUtil; +import cn.hutool.crypto.asymmetric.KeyType; +import cn.hutool.crypto.asymmetric.RSA; +import cn.hutool.http.HttpRequest; +import com.yxt.supervise.gf.api.utils.RsaUtil; +import com.yxt.supervise.gf.shanhai.ShRequester; +import com.yxt.supervise.gf.shanhai.resp.BaseResponse; +import org.junit.Test; + +import java.util.Date; + +public class SecurTest { + + // @Test + public void testDate() { + long l = System.currentTimeMillis(); +// System.out.println("" + l); +// System.out.println(DateUtil.format(new Date(),"yyyyMMddHHmmss")); + + String publicKey = "MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA1Z/+Bslu203UtutmzMW/" + + "FqS9bQvaMXQHgvU+ilNR5Hm2IZZalBWPoSbCGzlCUA19C3X6T17X09OMa6aDPKBm" + + "F6yXvUI7E/nWM9qUJ5hj4zVO/9GoH03WUyCWSBQg4f+LcnLS75v8nI6moOJ5ILkH" + + "mg2KNbEdx55UWjSqBatEopnLWtMFDGZswEbKBH3e2yalK6ddh2kUrtcuQGqFYm/u" + + "ViAOV+KoptwY2MCNSRLKYE4pCA2BCit7nr3EqNZRqqhKaOE44iyv45zCFrllx3nn" + + "wF3X/l+rR4G7Vc7HZwiqKF3RXl9PqmTLJkzhdpAdQX/Kr3SRRHsv/DzKjAZr/2jK" + + "rQIDAQAB"; + + String key = "sJI8PuGweKztQ6nLgp3dqcwljdKGFjPBD3XyUqCFsVG8rYhAIbD2AkNIKaefbjOB"; + String date = "" + (l / 1000); + String keyMd5 = SecureUtil.md5(key); + String data1 = key + date + keyMd5; + String privateKeyBase64 = Base64.encode(key); + String publicKeyBase64 = Base64.encode(publicKey); + + RSA rsa = new RSA(null, publicKey); +// String data = SecureUtil.rsa(privateKeyBase64, publicKeyBase64).encryptBase64(data1, KeyType.PublicKey); + byte[] encrypt = rsa.encrypt(StrUtil.bytes(data1, CharsetUtil.CHARSET_UTF_8), KeyType.PublicKey); + String data = StrUtil.str(encrypt, CharsetUtil.CHARSET_UTF_8); + System.out.println(data); + +// String body = HttpRequest.get("http://hf-service.tiefaos.com/api/system/apply_material/index") + +// String data = "jiq07RIXsX/YwIkXCK4VdhIZcnuFHd+ERekZzMdZT7yxGAyON4s/qtJeJcG9z6uJMtqSUKWTvREc4CNsyuStXacJ2bGgKCzFcUTwwBUJ7AQ2ybhedpkA7JWqJ1UjooLGUYZfoTduygH2r7LG0qRgigQGD3WdB53WLuC11kT5wAzMnFtbBDHpH78oNjGhvmWpaR6meDCI2OM0GtCWwBxOagCYt8V5DfD47VyNHYn0xFRva4GFBF6K19061h1cu68eXxfIZj+clMweGlICgeXhktq8Z1T0XmbahFjhyTmdXuRxZBeQkLsot00XJHwQ48B6Z/VdOPpqoD95NTngRdV3+A=="; +// String date = "1683516744"; + String body = HttpRequest.get("http://hf.lx-obj.top/api/system/apply_material/index") + .header("data", data) + .header("date", date) + .execute() + .body(); + System.out.println(body); + } + + @Test + public void testRequester() { + BaseResponse api$system$applyMaterial$index = ShRequester.getApi$system$apply_material$index(null); + System.out.println(api$system$applyMaterial$index); + +// String api$system$applyMaterial$getActualOrderMaterial = ShRequester.getApi$system$apply_material$get_actual_order_material("10888"); +// System.out.println(api$system$applyMaterial$getActualOrderMaterial); + } +}