| | |
| | | //测试环境sid、appkey、密钥请到旺店通开放平台-自助对接-申请测试环境内查看,测试环境url=https://sandbox.wangdian.cn/openapi2/ |
| | | //调用正式环境时请将sid、appkey、appsecret切换为实际参数,参数在旺店通开放平台-自助对接-应用管理内应用状态为已上线的应用中查看,调用正式环境注意切换正式环境url=https://api.wangdian.cn/openapi2/ |
| | | Map<String, String> params = new HashMap<String, String>(); |
| | | params.put("type", "1"); |
| | | params.put("type", "20"); |
| | | try { |
| | | String response = client.execute("warehouse_query.php", params); |
| | | log.info("云仓仓库查询结果:{}", response); |
| | |
| | | } |
| | | |
| | | public static void main(String[] args) { |
| | | WdtClient client = new WdtClient("apidevnew2", "hytycw02-test", "c7ae51196", "https://sandbox.wangdian.cn/openapi2/"); |
| | | // WdtClient client = new WdtClient("apidevnew2", "hytycw02-test", "c7ae51196", "https://sandbox.wangdian.cn/openapi2/"); |
| | | WdtClient client = new WdtClient("hytycw02", "hytycw02-gwb", "43cc52d9003870031bdd99d68e639ab9", "https://api.wangdian.cn/openapi2/"); |
| | | //测试环境sid、appkey、密钥请到旺店通开放平台-自助对接-申请测试环境内查看,测试环境url=https://sandbox.wangdian.cn/openapi2/ |
| | | //调用正式环境时请将sid、appkey、appsecret切换为实际参数,参数在旺店通开放平台-自助对接-应用管理内应用状态为已上线的应用中查看,调用正式环境注意切换正式环境url=https://api.wangdian.cn/openapi2/ |
| | | Map<String, String> params = new HashMap<String, String>(); |
| | | params.put("type", "1"); |
| | | params.put("type", "20"); |
| | | params.put("warehouse_no", "HNYT"); |
| | | |
| | | try { |
| | | String response = client.execute("warehouse_query.php", params); |
| | |
| | | * @param receiver_district 收件人区县,传为中文名称需与旺店通地址库匹配 |
| | | * @param receiver_address 收件人地址详情,传为中文名称,需与旺店通地址库匹配,点击查看,如果不传省市区,则会尝试从详细地址解析省市区,必须是空格分隔的才能解析成功,需要注意直辖市的地址格式,举例“北京 北京市 海淀区 花园路xxxx” |
| | | * @param receiver_mobile 手机号码 |
| | | * @param warehouse_no 仓库编号 |
| | | */ |
| | | public static JSONObject tradePush(String sid, String appkey, String appsecret, String url, |
| | | TErpProcurement erpProcurement, List<TErpProcurementGoods> erpProcurementGoods, |
| | | Integer trade_status,Integer status,Integer refund_status,String clinicName, |
| | | String shop_no,String receiver_name,String receiver_province, |
| | | String receiver_city,String receiver_district,String receiver_address, |
| | | String receiver_mobile) { |
| | | String receiver_mobile,String warehouse_no) { |
| | | WdtClient client = new WdtClient(sid, appkey, appsecret, url); |
| | | //测试环境sid、appkey、密钥请到旺店通开放平台-自助对接-申请测试环境内查看,测试环境url=https://sandbox.wangdian.cn/openapi2/ |
| | | //调用正式环境时请将sid、appkey、appsecret切换为实际参数,参数在旺店通开放平台-自助对接-应用管理内应用状态为已上线的应用中查看,调用正式环境注意切换正式环境url=https://api.wangdian.cn/openapi2/ |
| | |
| | | trade_1.put("ext_cod_fee", 0); |
| | | trade_1.put("other_amount", 0); |
| | | trade_1.put("paid", erpProcurement.getPayMoney()); |
| | | trade_1.put("warehouse_no", warehouse_no); |
| | | trade_1.put("order_list", order_list); |
| | | trade_list.add(trade_1); |
| | | |
| | |
| | | private TCrmClinicCloudWarehouseService crmClinicCloudWarehouseService; |
| | | @Autowired |
| | | private TErpGoodsService erpGoodsService; |
| | | @Autowired |
| | | private TCrmWarehouseService crmWarehouseService; |
| | | |
| | | @Async |
| | | @EventListener(TradeOrderEvent.class) |
| | |
| | | if (Objects.isNull(crmClinicCloudWarehouse)) { |
| | | tSysCloudMessage.setErrorMessage("未查询到采购单诊所云仓信息"); |
| | | } |
| | | // 查询仓库 |
| | | TCrmWarehouse crmWarehouse = crmWarehouseService.getById(crmClinicCloudWarehouse.getWarehouseId()); |
| | | if (Objects.isNull(crmWarehouse)) { |
| | | tSysCloudMessage.setErrorMessage("未查询到仓库绑定信息"); |
| | | } |
| | | if (!StringUtils.hasLength(tSysCloudMessage.getErrorMessage())){ |
| | | if("1".equals(type)){ |
| | | TradePush.tradePush(sysCloudConfig.getSid(), sysCloudConfig.getAppKey(), sysCloudConfig.getAppSecret(), sysCloudConfig.getUrl(), |
| | | erpProcurement,erpProcurementGoodsList,30,30,0,crmClinic.getPersonChargeName(),crmSupplierCloudShop.getCloudShopNo(), |
| | | crmClinic.getPersonChargeName(),crmClinic.getProvinceName(),crmClinic.getCityName(),crmClinic.getDistrictName(), |
| | | crmClinic.getClinicAddress(),crmClinic.getPhone()); |
| | | crmClinic.getClinicAddress(),crmClinic.getPhone(),crmWarehouse.getCloudWarehouseNo()); |
| | | }else { |
| | | TradePush.tradePush(sysCloudConfig.getSid(), sysCloudConfig.getAppKey(), sysCloudConfig.getAppSecret(), sysCloudConfig.getUrl(), |
| | | erpProcurement,erpProcurementGoodsList,80,80,5,crmClinic.getPersonChargeName(),crmSupplierCloudShop.getCloudShopNo(), |
| | | crmClinic.getPersonChargeName(),crmClinic.getProvinceName(),crmClinic.getCityName(),crmClinic.getDistrictName(), |
| | | crmClinic.getClinicAddress(),crmClinic.getPhone()); |
| | | crmClinic.getClinicAddress(),crmClinic.getPhone(),crmWarehouse.getCloudWarehouseNo()); |
| | | } |
| | | } |
| | | }else { |
| | |
| | | @TableField("cloud_warehouse") |
| | | private Integer cloudWarehouse; |
| | | |
| | | @ApiModelProperty(value = "仓库编号") |
| | | @TableField("cloud_warehouse_no") |
| | | private String cloudWarehouseNo; |
| | | @ApiModelProperty(value = "仓库id") |
| | | @TableField("warehouse_id") |
| | | private String warehouseId; |
| | | |
| | | |
| | | } |
| | |
| | | @TableField("status") |
| | | private Integer status; |
| | | |
| | | @ApiModelProperty(value = "云仓类型 1=旺店通") |
| | | @TableField("cloud_warehouse") |
| | | private Integer cloudWarehouse; |
| | | |
| | | @ApiModelProperty(value = "仓库编号") |
| | | @TableField("cloud_warehouse_no") |
| | | private String cloudWarehouseNo; |
| | | |
| | | } |
| | |
| | | <id column="id" property="id" /> |
| | | <result column="clinic_id" property="clinicId" /> |
| | | <result column="cloud_warehouse" property="cloudWarehouse" /> |
| | | <result column="cloud_warehouse_no" property="cloudWarehouseNo" /> |
| | | <result column="warehouse_id" property="warehouseId" /> |
| | | </resultMap> |
| | | |
| | | <!-- 通用查询结果列 --> |
| | | <sql id="Base_Column_List"> |
| | | id, clinic_id, cloud_warehouse, cloud_warehouse_no |
| | | id, clinic_id, cloud_warehouse, warehouse_id |
| | | </sql> |
| | | |
| | | </mapper> |
| | |
| | | <result column="account" property="account" /> |
| | | <result column="remarks" property="remarks" /> |
| | | <result column="status" property="status" /> |
| | | <result column="cloud_warehouse" property="cloudWarehouse" /> |
| | | <result column="cloud_warehouse_no" property="cloudWarehouseNo" /> |
| | | <result column="create_time" property="createTime" /> |
| | | <result column="update_time" property="updateTime" /> |
| | | <result column="create_by" property="createBy" /> |
| | |
| | | |
| | | <!-- 通用查询结果列 --> |
| | | <sql id="Base_Column_List"> |
| | | id, user_id, warehouse_name, warehouse_address, warehouse_contact, warehouse_phone, account, remarks, status, create_time, update_time, create_by, update_by, disabled |
| | | id, user_id, warehouse_name, warehouse_address, warehouse_contact, warehouse_phone, account, remarks, status, |
| | | cloud_warehouse,cloud_warehouse_no,create_time, update_time, create_by, update_by, disabled |
| | | </sql> |
| | | <select id="pageList" resultType="com.ruoyi.system.vo.TCrmWarehouseVO"> |
| | | SELECT |