Browse Source

我的企微客户添加聊天记录 erp新接口对接

xgb 1 tháng trước cách đây
mục cha
commit
f81a599c8f
25 tập tin đã thay đổi với 3652 bổ sung105 xóa
  1. 108 0
      fs-admin/src/main/java/com/fs/hisStore/controller/FsStoreRefundPushRecordScrmController.java
  2. 35 11
      fs-company/src/main/java/com/fs/company/controller/common/CommonController.java
  3. 6 0
      fs-company/src/main/java/com/fs/company/controller/qw/QwExternalContactController.java
  4. 2 0
      fs-service/src/main/java/com/fs/erp/dto/ErpGoodsStockQueryRequert.java
  5. 18 0
      fs-service/src/main/java/com/fs/erp/dto/ErpRefundOrderDTO.java
  6. 10 0
      fs-service/src/main/java/com/fs/erp/dto/ErpRefundOrderQueryRequest.java
  7. 11 0
      fs-service/src/main/java/com/fs/erp/dto/ErpRefundOrderQueryResponse.java
  8. 9 1
      fs-service/src/main/java/com/fs/erp/dto/sdk/wangdianTwo/api/WdtTradeAPI.java
  9. 320 0
      fs-service/src/main/java/com/fs/erp/dto/sdk/wangdianTwo/api/dto/CreateStockInRefundOrderRequest.java
  10. 61 0
      fs-service/src/main/java/com/fs/erp/dto/sdk/wangdianTwo/api/dto/CreateStockInRefundOrderResponse.java
  11. 163 0
      fs-service/src/main/java/com/fs/erp/dto/sdk/wangdianTwo/api/dto/RefundSearchRequest.java
  12. 1794 0
      fs-service/src/main/java/com/fs/erp/dto/sdk/wangdianTwo/api/dto/RefundSearchResponse.java
  13. 62 0
      fs-service/src/main/java/com/fs/erp/dto/sdk/wangdianTwo/api/dto/VirtualWarehouseStockSearchRequest.java
  14. 344 0
      fs-service/src/main/java/com/fs/erp/dto/sdk/wangdianTwo/api/dto/VirtualWarehouseStockSearchResponse.java
  15. 8 0
      fs-service/src/main/java/com/fs/erp/service/IErpGoodsService.java
  16. 13 0
      fs-service/src/main/java/com/fs/erp/service/IErpOrderService.java
  17. 34 0
      fs-service/src/main/java/com/fs/erp/service/impl/BaseWdtTwoErpService.java
  18. 39 35
      fs-service/src/main/java/com/fs/erp/service/impl/WdtTwoErpGoodsServiceImpl.java
  19. 65 58
      fs-service/src/main/java/com/fs/erp/service/impl/WdtTwoErpOrderServiceImpl.java
  20. 153 0
      fs-service/src/main/java/com/fs/hisStore/domain/FsStoreRefundPushRecordScrm.java
  21. 24 0
      fs-service/src/main/java/com/fs/hisStore/mapper/FsStoreRefundPushRecordScrmMapper.java
  22. 79 0
      fs-service/src/main/java/com/fs/hisStore/param/StoreRefundPushParam.java
  23. 48 0
      fs-service/src/main/java/com/fs/hisStore/service/IFsStoreRefundPushRecordScrmService.java
  24. 183 0
      fs-service/src/main/java/com/fs/hisStore/service/impl/FsStoreRefundPushRecordScrmServiceImpl.java
  25. 63 0
      fs-service/src/main/resources/mapper/hisStore/FsStoreRefundPushRecordScrmMapper.xml

+ 108 - 0
fs-admin/src/main/java/com/fs/hisStore/controller/FsStoreRefundPushRecordScrmController.java

@@ -0,0 +1,108 @@
+package com.fs.hisStore.controller;
+
+import com.fs.common.annotation.Log;
+import com.fs.common.core.controller.BaseController;
+import com.fs.common.core.domain.AjaxResult;
+import com.fs.common.core.page.TableDataInfo;
+import com.fs.common.enums.BusinessType;
+import com.fs.common.utils.poi.ExcelUtil;
+import com.fs.hisStore.domain.FsStoreRefundPushRecordScrm;
+import com.fs.hisStore.param.StoreRefundPushParam;
+import com.fs.hisStore.service.IFsStoreRefundPushRecordScrmService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.security.access.prepost.PreAuthorize;
+import org.springframework.validation.annotation.Validated;
+import org.springframework.web.bind.annotation.*;
+
+import javax.servlet.http.HttpServletResponse;
+import java.util.Arrays;
+import java.util.List;
+
+/**
+ * 退货入库单推送记录Controller
+ *
+ * @author fs
+ * @date 2026-04-17
+ */
+@RestController
+@RequestMapping("/store/refundPush")
+public class FsStoreRefundPushRecordScrmController extends BaseController {
+
+    @Autowired
+    private IFsStoreRefundPushRecordScrmService refundPushRecordService;
+
+    /**
+     * 查询退货入库单推送记录列表
+     */
+    @PreAuthorize("@ss.hasPermi('store:refundPush:list')")
+    @GetMapping("/list")
+    public TableDataInfo list(FsStoreRefundPushRecordScrm record) {
+        startPage();
+        List<FsStoreRefundPushRecordScrm> list = refundPushRecordService.selectFsStoreRefundPushRecordList(record);
+        return getDataTable(list);
+    }
+
+//    /**
+//     * 导出退货入库单推送记录列表
+//     */
+//    @PreAuthorize("@ss.hasPermi('store:refundPush:export')")
+//    @Log(title = "退货入库单推送记录", businessType = BusinessType.EXPORT)
+//    @PostMapping("/export")
+//    public void export(HttpServletResponse response, FsStoreRefundPushRecordScrm record) {
+//        List<FsStoreRefundPushRecordScrm> list = refundPushRecordService.selectFsStoreRefundPushRecordList(record);
+//        ExcelUtil<FsStoreRefundPushRecordScrm> util = new ExcelUtil<>(FsStoreRefundPushRecordScrm.class);
+//        util.exportExcel(response, list, "退货入库单推送记录数据");
+//    }
+
+    /**
+     * 获取退货入库单推送记录详细信息
+     */
+    @PreAuthorize("@ss.hasPermi('store:refundPush:query')")
+    @GetMapping(value = "/{id}")
+    public AjaxResult getInfo(@PathVariable("id") Long id) {
+        return AjaxResult.success(refundPushRecordService.getById(id));
+    }
+
+    /**
+     * 推送退货入库单到ERP
+     */
+    @PreAuthorize("@ss.hasPermi('store:refundPush:push')")
+    @Log(title = "推送退货入库单", businessType = BusinessType.INSERT)
+    @PostMapping("/push")
+    public AjaxResult push(@Validated @RequestBody StoreRefundPushParam param) {
+        boolean result = refundPushRecordService.pushRefundOrder(param);
+        return result ? AjaxResult.success("推送成功") : AjaxResult.error("推送失败");
+    }
+
+    /**
+     * 重新推送
+     */
+    @PreAuthorize("@ss.hasPermi('store:refundPush:rePush')")
+    @Log(title = "重新推送退货入库单", businessType = BusinessType.UPDATE)
+    @PostMapping("/rePush/{id}")
+    public AjaxResult rePush(@PathVariable Long id) {
+        boolean result = refundPushRecordService.rePush(id);
+        return result ? AjaxResult.success("重新推送成功") : AjaxResult.error("重新推送失败");
+    }
+
+    /**
+     * 批量推送
+     */
+    @PreAuthorize("@ss.hasPermi('store:refundPush:batchPush')")
+    @Log(title = "批量推送退货入库单", businessType = BusinessType.UPDATE)
+    @PostMapping("/batchPush")
+    public AjaxResult batchPush(@RequestBody List<Long> ids) {
+        boolean result = refundPushRecordService.batchPush(ids);
+        return result ? AjaxResult.success("批量推送完成") : AjaxResult.error("部分推送失败");
+    }
+
+    /**
+     * 删除退货入库单推送记录
+     */
+    @PreAuthorize("@ss.hasPermi('store:refundPush:remove')")
+    @Log(title = "退货入库单推送记录", businessType = BusinessType.DELETE)
+    @DeleteMapping("/{ids}")
+    public AjaxResult remove(@PathVariable Long[] ids) {
+        return toAjax(refundPushRecordService.removeByIds(Arrays.asList(ids)));
+    }
+}

+ 35 - 11
fs-company/src/main/java/com/fs/company/controller/common/CommonController.java

@@ -15,10 +15,7 @@ import com.fs.company.utils.AudioUtils;
 import com.fs.company.vo.WangUploadVO;
 import com.fs.erp.domain.ErpDeliverys;
 import com.fs.erp.domain.ErpOrderQuery;
-import com.fs.erp.dto.ErpGoodsStockQueryRequert;
-import com.fs.erp.dto.ErpGoodsStockQueryResponse;
-import com.fs.erp.dto.ErpOrderQueryRequert;
-import com.fs.erp.dto.ErpOrderQueryResponse;
+import com.fs.erp.dto.*;
 import com.fs.erp.service.IErpOrderService;
 import com.fs.erp.service.impl.WdtTwoErpGoodsServiceImpl;
 import com.fs.framework.config.ServerConfig;
@@ -171,17 +168,44 @@ public class CommonController
 //        return R.ok();
 //    }
 
-    @GetMapping("common/test")
-    public R test(String barcode) throws Exception
-    {
+//    @GetMapping("common/test")
+//    public R test(String barcode) throws Exception
+//    {
+//
+//        ErpGoodsStockQueryRequert queryRequert = new ErpGoodsStockQueryRequert();
+//        queryRequert.setBarcode(barcode);
+//
+//        ErpGoodsStockQueryResponse response =     wdtTwoErpGoodsService.getGoodsStock(queryRequert);
+//
+//
+//        log.info("查询结果:{}",response);
+//        return R.ok();
+//    }
 
-        ErpGoodsStockQueryRequert queryRequert = new ErpGoodsStockQueryRequert();
-        queryRequert.setBarcode(barcode);
+//    @GetMapping("common/test")
+//    public R test(String barcode,String virtualWarehouseNo) throws Exception
+//    {
+//
+//        ErpGoodsStockQueryRequert queryRequert = new ErpGoodsStockQueryRequert();
+//        queryRequert.setBarcode(barcode);
+//        queryRequert.setVirtualWarehouseNo(virtualWarehouseNo);
+//
+//        ErpGoodsStockQueryResponse response =     wdtTwoErpGoodsService.searchVirtualWarehouseStock(queryRequert);
+//
+//
+//        log.info("查询结果:{}",response);
+//        return R.ok();
+//    }
 
-        ErpGoodsStockQueryResponse response =     wdtTwoErpGoodsService.getGoodsStock(queryRequert);
+    @GetMapping("common/test")
+    public R test(String orderCode) throws Exception
+    {
+        ErpRefundOrderQueryRequest request = new ErpRefundOrderQueryRequest();
+        request.setOrderCode(orderCode);
+        ErpRefundOrderQueryResponse search = wdtTwoOrderService.search(request);
 
 
-        log.info("查询结果:{}",response);
+        log.info("查询结果:{}",search);
         return R.ok();
     }
 

+ 6 - 0
fs-company/src/main/java/com/fs/company/controller/qw/QwExternalContactController.java

@@ -289,6 +289,12 @@ public class QwExternalContactController extends BaseController
             }
 
         });
+        // 查询用户沟通内容
+
+        // 查询用户身体情况
+
+
+
 
         return getDataTable(list);
     }

+ 2 - 0
fs-service/src/main/java/com/fs/erp/dto/ErpGoodsStockQueryRequert.java

@@ -7,6 +7,8 @@ import java.io.Serializable;
 @Data
 public class ErpGoodsStockQueryRequert implements Serializable {
     String barcode;
+    // 虚拟仓编号
+    String VirtualWarehouseNo;
     Integer page_no;
     Integer page_size;
 

+ 18 - 0
fs-service/src/main/java/com/fs/erp/dto/ErpRefundOrderDTO.java

@@ -0,0 +1,18 @@
+package com.fs.erp.dto;
+
+import lombok.Data;
+
+import java.io.Serializable;
+
+/**
+ * 订单退款DTO
+ */
+@Data
+public class ErpRefundOrderDTO implements Serializable {
+    private static final long serialVersionUID = 1L;
+
+    // 原始单号
+    private String orderCode;
+    // erp 退换单号
+    private String refundNo;
+}

+ 10 - 0
fs-service/src/main/java/com/fs/erp/dto/ErpRefundOrderQueryRequest.java

@@ -0,0 +1,10 @@
+package com.fs.erp.dto;
+
+import lombok.Data;
+
+import java.io.Serializable;
+
+@Data
+public class ErpRefundOrderQueryRequest implements Serializable {
+    String orderCode; // 原始订单号
+}

+ 11 - 0
fs-service/src/main/java/com/fs/erp/dto/ErpRefundOrderQueryResponse.java

@@ -0,0 +1,11 @@
+package com.fs.erp.dto;
+
+import lombok.Data;
+
+import java.util.List;
+
+@Data
+public class ErpRefundOrderQueryResponse extends BaseResponse {
+
+    List<ErpRefundOrderDTO> refundOrders; // 原始订单号
+}

+ 9 - 1
fs-service/src/main/java/com/fs/erp/dto/sdk/wangdianTwo/api/WdtTradeAPI.java

@@ -1,6 +1,7 @@
 package com.fs.erp.dto.sdk.wangdianTwo.api;
 
 
+import com.fs.erp.dto.sdk.wangdianTwo.WdtErpException;
 import com.fs.erp.dto.sdk.wangdianTwo.api.dto.*;
 import com.fs.erp.dto.sdk.wangdianTwo.impl.Api;
 import com.fs.erp.dto.sdk.wangdianTwo.Pager;
@@ -27,9 +28,16 @@ public interface WdtTradeAPI
 	@Api(value = "aftersales.refund.RawRefund.upload2", paged = false)
 	RawRefundUpload2Response rawRefundUpload(String shopNo,List<RawRefundUpload2Request.RefundOrder> orderList);
 
+	// 虚拟仓库库存查询
+	@Api(value = "setting.strategy.VirtualWarehouse.stockSearch", paged = true)
+	VirtualWarehouseStockSearchResponse searchVirtualWarehouseStock(VirtualWarehouseStockSearchRequest request, Pager pager);
 
+	// 退货入库单推送
+	@Api(value = "wms.stockin.Refund.createOrder", paged = false)
+	CreateStockInRefundOrderResponse createStockInRefundOrder(CreateStockInRefundOrderRequest request);
 
-
+	@Api(value = "aftersales.refund.Refund.search", paged = true)
+	RefundSearchResponse search(RefundSearchRequest request, Pager pager);
 
 
 }

+ 320 - 0
fs-service/src/main/java/com/fs/erp/dto/sdk/wangdianTwo/api/dto/CreateStockInRefundOrderRequest.java

@@ -0,0 +1,320 @@
+package com.fs.erp.dto.sdk.wangdianTwo.api.dto;
+
+import com.google.gson.annotations.SerializedName;
+
+import java.io.Serializable;
+import java.math.BigDecimal;
+import java.util.List;
+
+/**
+ * @description: 创建入库退换单请求对象
+ * @author: Xgb
+ * @createDate: 2026/4/16
+ * @version: 1.0
+ */
+public class CreateStockInRefundOrderRequest implements Serializable {
+
+    private static final long serialVersionUID = 1L;
+
+    /**
+     * 退换单号
+     */
+    @SerializedName("refund_no")
+    private String refundNo;
+
+    /**
+     * 外部单号
+     */
+    @SerializedName("out_stockin_no")
+    private String outStockinNo;
+
+    /**
+     * 仓库编号(不支持传入多个仓库编号)
+     */
+    @SerializedName("warehouse_no")
+    private String warehouseNo;
+
+    /**
+     * 系统物流公司编号
+     */
+    @SerializedName("logistics_code")
+    private String logisticsCode;
+
+    /**
+     * 物流单号
+     */
+    @SerializedName("logistics_no")
+    private String logisticsNo;
+
+    /**
+     * 备注
+     */
+    @SerializedName("remark")
+    private String remark;
+
+    /**
+     * 创建模式
+     * 默认0
+     * 0:编辑中
+     * 1:已提交
+     * 2:已审核
+     */
+    @SerializedName("create_mode")
+    private Integer createMode;
+
+    /**
+     * 是否创建批次
+     * true:创建
+     * false:不创建
+     * 默认不创建
+     */
+    @SerializedName("is_create_batch")
+    private Boolean isCreateBatch;
+
+    /**
+     * 单据明细
+     */
+    @SerializedName("detail_list")
+    private List<DetailItem> detailList;
+
+    // Getters and Setters
+    public String getRefundNo() {
+        return refundNo;
+    }
+
+    public void setRefundNo(String refundNo) {
+        this.refundNo = refundNo;
+    }
+
+    public String getOutStockinNo() {
+        return outStockinNo;
+    }
+
+    public void setOutStockinNo(String outStockinNo) {
+        this.outStockinNo = outStockinNo;
+    }
+
+    public String getWarehouseNo() {
+        return warehouseNo;
+    }
+
+    public void setWarehouseNo(String warehouseNo) {
+        this.warehouseNo = warehouseNo;
+    }
+
+    public String getLogisticsCode() {
+        return logisticsCode;
+    }
+
+    public void setLogisticsCode(String logisticsCode) {
+        this.logisticsCode = logisticsCode;
+    }
+
+    public String getLogisticsNo() {
+        return logisticsNo;
+    }
+
+    public void setLogisticsNo(String logisticsNo) {
+        this.logisticsNo = logisticsNo;
+    }
+
+    public String getRemark() {
+        return remark;
+    }
+
+    public void setRemark(String remark) {
+        this.remark = remark;
+    }
+
+    public Integer getCreateMode() {
+        return createMode;
+    }
+
+    public void setCreateMode(Integer createMode) {
+        this.createMode = createMode;
+    }
+
+    public Boolean getIsCreateBatch() {
+        return isCreateBatch;
+    }
+
+    public void setIsCreateBatch(Boolean isCreateBatch) {
+        this.isCreateBatch = isCreateBatch;
+    }
+
+    public List<DetailItem> getDetailList() {
+        return detailList;
+    }
+
+    public void setDetailList(List<DetailItem> detailList) {
+        this.detailList = detailList;
+    }
+
+    /**
+     * 明细信息实体类
+     */
+    public static class DetailItem implements Serializable {
+
+        private static final long serialVersionUID = 1L;
+
+        /**
+         * 商家编码
+         */
+        @SerializedName("spec_no")
+        private String specNo;
+
+        /**
+         * 数量
+         */
+        @SerializedName("num")
+        private BigDecimal num;
+
+        /**
+         * 是否残次品
+         * true:残次品
+         * false:正品
+         * 默认false
+         */
+        @SerializedName("defect")
+        private Boolean defect;
+
+        /**
+         * sn码,多个之间使用英文逗号分隔
+         * 当传入sn信息时,create_mode需要传为0
+         */
+        @SerializedName("sn_strings")
+        private String snStrings;
+
+        /**
+         * 批次号
+         */
+        @SerializedName("batch_no")
+        private String batchNo;
+
+        /**
+         * 有效期
+         */
+        @SerializedName("expire_date")
+        private String expireDate;
+
+        /**
+         * 货位编号
+         */
+        @SerializedName("position_no")
+        private String positionNo;
+
+        /**
+         * 生产日期
+         */
+        @SerializedName("production_date")
+        private String productionDate;
+
+        /**
+         * 备注
+         */
+        @SerializedName("remark")
+        private String remark;
+
+        /**
+         * 批次备注
+         */
+        @SerializedName("batch_remark")
+        private String batchRemark;
+
+        /**
+         * 入库价
+         * 不传默认取退换单明细中的价格字段
+         */
+        @SerializedName("stockin_price")
+        private BigDecimal stockinPrice;
+
+        // Getters and Setters
+        public String getSpecNo() {
+            return specNo;
+        }
+
+        public void setSpecNo(String specNo) {
+            this.specNo = specNo;
+        }
+
+        public BigDecimal getNum() {
+            return num;
+        }
+
+        public void setNum(BigDecimal num) {
+            this.num = num;
+        }
+
+        public Boolean getDefect() {
+            return defect;
+        }
+
+        public void setDefect(Boolean defect) {
+            this.defect = defect;
+        }
+
+        public String getSnStrings() {
+            return snStrings;
+        }
+
+        public void setSnStrings(String snStrings) {
+            this.snStrings = snStrings;
+        }
+
+        public String getBatchNo() {
+            return batchNo;
+        }
+
+        public void setBatchNo(String batchNo) {
+            this.batchNo = batchNo;
+        }
+
+        public String getExpireDate() {
+            return expireDate;
+        }
+
+        public void setExpireDate(String expireDate) {
+            this.expireDate = expireDate;
+        }
+
+        public String getPositionNo() {
+            return positionNo;
+        }
+
+        public void setPositionNo(String positionNo) {
+            this.positionNo = positionNo;
+        }
+
+        public String getProductionDate() {
+            return productionDate;
+        }
+
+        public void setProductionDate(String productionDate) {
+            this.productionDate = productionDate;
+        }
+
+        public String getRemark() {
+            return remark;
+        }
+
+        public void setRemark(String remark) {
+            this.remark = remark;
+        }
+
+        public String getBatchRemark() {
+            return batchRemark;
+        }
+
+        public void setBatchRemark(String batchRemark) {
+            this.batchRemark = batchRemark;
+        }
+
+        public BigDecimal getStockinPrice() {
+            return stockinPrice;
+        }
+
+        public void setStockinPrice(BigDecimal stockinPrice) {
+            this.stockinPrice = stockinPrice;
+        }
+    }
+}

+ 61 - 0
fs-service/src/main/java/com/fs/erp/dto/sdk/wangdianTwo/api/dto/CreateStockInRefundOrderResponse.java

@@ -0,0 +1,61 @@
+package com.fs.erp.dto.sdk.wangdianTwo.api.dto;
+
+import com.google.gson.annotations.SerializedName;
+
+import java.io.Serializable;
+
+/**
+ * @description: 创建入库退换单响应对象
+ * @author: Xgb
+ * @createDate: 2026/4/16
+ * @version: 1.0
+ */
+public class CreateStockInRefundOrderResponse implements Serializable {
+
+    private static final long serialVersionUID = 1L;
+
+    /**
+     * 状态码
+     * 返回0为正常
+     */
+    @SerializedName("status")
+    private Integer status;
+
+    /**
+     * 错误信息
+     * 无错误信息不返回
+     */
+    @SerializedName("message")
+    private String message;
+
+    /**
+     * 入库单号
+     */
+    @SerializedName("data")
+    private String data;
+
+    // Getters and Setters
+    public Integer getStatus() {
+        return status;
+    }
+
+    public void setStatus(Integer status) {
+        this.status = status;
+    }
+
+    public String getMessage() {
+        return message;
+    }
+
+    public void setMessage(String message) {
+        this.message = message;
+    }
+
+    public String getData() {
+        return data;
+    }
+
+    public void setData(String data) {
+        this.data = data;
+    }
+}

+ 163 - 0
fs-service/src/main/java/com/fs/erp/dto/sdk/wangdianTwo/api/dto/RefundSearchRequest.java

@@ -0,0 +1,163 @@
+package com.fs.erp.dto.sdk.wangdianTwo.api.dto;
+
+public class RefundSearchRequest
+{
+
+	public static final Byte STATUS_CANCEL = 10; // 已取消
+	public static final Byte STATUS_WAIT_CHECK = 20; // 待审核
+	public static final Byte STATUS_AGREE = 30; // 已审核
+	public static final Byte STATUS_SETTLED = 80; // 已结算
+	public static final Byte STATUS_WAIT_POST = 85; // 待过账
+	public static final Byte STATUS_POSTED = 86; // 已过账
+	public static final Byte STATUS_NO_PLANNED_COST = 87; // 成本确认
+	public static final Byte STATUS_COMPLETE = 90; // 已完成
+
+	/**
+	 * 未入库
+	 */
+	public static final Byte STOCKIN_STATUS_NONE = 0;
+	/**
+	 * 待入库
+	 */
+	public static final Byte STOCKIN_STATUS_WAIT = 1;
+	/**
+	 * 部分入库
+	 */
+	public static final Byte STOCKIN_STATUS_PART = 2;
+	/**
+	 * 全部入库
+	 */
+	public static final Byte STOCKIN_STATUS_FULL = 3;
+	/**
+	 * 终止入库,停止等待
+	 */
+	public static final Byte STOCKIN_STATUS_DISCARD = 4;
+
+	/**
+	 * 退款(未发货,退款申请)
+	 */
+	public static final Byte REFUND_TYPE_REFUND = 1;
+	/**
+	 * 退货
+	 */
+	public static final Byte REFUND_TYPE_RETURN_GOODS = 2;
+	/**
+	 * 换货
+	 */
+	public static final Byte REFUND_TYPE_SWAP_GOODS = 3;
+	/**
+	 * 退款不退货
+	 */
+	public static final Byte REFUND_TYPE_REFUND_NOT_RETURN = 4;
+
+	private String shopNos;
+	private String tid;
+	private String buyerNick;
+	private String tradeNo;
+	private String refundNo;
+	private String modifiedFrom;
+	private String modifiedTo;
+	private Byte status;
+	private Byte stockinStatus;
+	private Byte type;
+
+	public String getShopNos()
+	{
+		return shopNos;
+	}
+
+	public void setShopNos(String shopNos)
+	{
+		this.shopNos = shopNos;
+	}
+
+	public String getTid()
+	{
+		return tid;
+	}
+
+	public void setTid(String tid)
+	{
+		this.tid = tid;
+	}
+
+	public String getBuyerNick()
+	{
+		return buyerNick;
+	}
+
+	public void setBuyerNick(String buyerNick)
+	{
+		this.buyerNick = buyerNick;
+	}
+
+	public String getTradeNo()
+	{
+		return tradeNo;
+	}
+
+	public void setTradeNo(String tradeNo)
+	{
+		this.tradeNo = tradeNo;
+	}
+
+	public String getRefundNo()
+	{
+		return refundNo;
+	}
+
+	public void setRefundNo(String refundNo)
+	{
+		this.refundNo = refundNo;
+	}
+
+	public String getModifiedFrom()
+	{
+		return modifiedFrom;
+	}
+
+	public void setModifiedFrom(String modifiedFrom)
+	{
+		this.modifiedFrom = modifiedFrom;
+	}
+
+	public String getModifiedTo()
+	{
+		return modifiedTo;
+	}
+
+	public void setModifiedTo(String modifiedTo)
+	{
+		this.modifiedTo = modifiedTo;
+	}
+
+	public Byte getStatus()
+	{
+		return status;
+	}
+
+	public void setStatus(Byte status)
+	{
+		this.status = status;
+	}
+
+	public Byte getStockinStatus()
+	{
+		return stockinStatus;
+	}
+
+	public void setStockinStatus(Byte stockinStatus)
+	{
+		this.stockinStatus = stockinStatus;
+	}
+
+	public Byte getType()
+	{
+		return type;
+	}
+
+	public void setType(Byte type)
+	{
+		this.type = type;
+	}
+}

+ 1794 - 0
fs-service/src/main/java/com/fs/erp/dto/sdk/wangdianTwo/api/dto/RefundSearchResponse.java

@@ -0,0 +1,1794 @@
+package com.fs.erp.dto.sdk.wangdianTwo.api.dto;
+
+import com.google.gson.annotations.SerializedName;
+
+import java.math.BigDecimal;
+import java.util.List;
+
+public class RefundSearchResponse
+{
+	/*
+	{ "status": 0, "data": { "total_count": 170, "order": [{ "tid_list":
+	"P32779733707900", "detail_list": [{ "platform_id": 19, "oid":
+	"vpubaoP32779733707900:1486", "tid": "P32779733707900", "trade_no":
+	"JY201903270026", "num": 1.0000, "price": 0.0100, "original_price":
+	0.0100, "refund_num": 1.0000, "total_amount": 0.0100, "refund_amount":
+	0.0100, "is_guarantee": true, "goods_no": "all", "goods_name": "阿拉蕾",
+	"spec_name": "颜色:蓝色", "spec_no": "all1", "barcode": "all1",
+	"stockin_num": 0.0000, "remark": "", "api_goods_name": "阿拉蕾",
+	"api_spec_name": "阿拉蕾:颜色:粉红黄条纹" }], "refund_no": "TK1903270003",
+	"remark": "", "type": 1, "stockin_status": 0, "flag_name": "无",
+	"return_goods_count": 1.0000, "receiver_telno": "15201460155",
+	"receiver_name": "刘子渲", "modified": 1553680649000, "note_count": 0,
+	"shop_no": "weipubao", "from_type": 0, "created": 1553680627000,
+	"return_logistics_no": "", "trade_no_list": "JY201903270026",
+	"guarantee_refund_amount": 0.0100, "return_goods_amount": 0.0100,
+	"return_logistics_name": "", "buyer_nick": "Vpubao15201460155",
+	"operator_name": "刘子渲", "actual_refund_amount": 0.0100,
+	"return_warehouse_no": "", "direct_refund_amount": 0.0000,
+	"receive_amount": 0.0000, "customer_name": "系统", "reason_name": "无",
+	"status": 10, "revert_reason_name": "无" }] } }
+	 */
+
+	@SerializedName("total_count")
+	private Integer total;
+	@SerializedName("order")
+	private List<RefundOrderDto> orders;
+
+	public Integer getTotal()
+	{
+		return total;
+	}
+
+	public void setTotal(Integer total)
+	{
+		this.total = total;
+	}
+
+	public List<RefundOrderDto> getOrders()
+	{
+		return orders;
+	}
+
+	public void setOrders(List<RefundOrderDto> orders)
+	{
+		this.orders = orders;
+	}
+
+	public static class RefundOrderDto
+	{
+
+		/**
+		 * 退款(未发货,退款申请)
+		 */
+		public static final Byte REFUND_TYPE_REFUND = 1;
+		/**
+		 * 退货
+		 */
+		public static final Byte REFUND_TYPE_RETURN_GOODS = 2;
+		/**
+		 * 换货
+		 */
+		public static final Byte REFUND_TYPE_SWAP_GOODS = 3;
+		/**
+		 * 退款不退货
+		 */
+		public static final Byte REFUND_TYPE_REFUND_NOT_RETURN = 4;
+
+		/**
+		 * 未入库
+		 */
+		public static final Byte STOCKIN_STATUS_NONE = 0;
+		/**
+		 * 待入库
+		 */
+		public static final Byte STOCKIN_STATUS_WAIT = 1;
+		/**
+		 * 部分入库
+		 */
+		public static final Byte STOCKIN_STATUS_PART = 2;
+		/**
+		 * 全部入库
+		 */
+		public static final Byte STOCKIN_STATUS_FULL = 3;
+		/**
+		 * 终止入库,停止等待
+		 */
+		public static final Byte STOCKIN_STATUS_DISCARD = 4;
+
+		/**
+		 * 10 已取消
+		 */
+		public static final Byte STATUS_CANCEL = 10; // 已取消
+		/**
+		 * 20 待审核
+		 */
+		public static final Byte STATUS_WAIT_CHECK = 20; // 待审核
+		/**
+		 * 30 已审核
+		 */
+		public static final Byte STATUS_AGREE = 30; // 已审核
+		/**
+		 * 80 已结算
+		 */
+		public static final Byte STATUS_SETTLED = 80; // 已结算
+		/**
+		 * 85 待过账
+		 */
+		public static final Byte STATUS_WAIT_POST = 85; // 待过账
+		/**
+		 * 86 已过账
+		 */
+		public static final Byte STATUS_POSTED = 86; // 已过账
+		/**
+		 * 87 成本确认
+		 */
+		public static final Byte STATUS_NO_PLANNED_COST = 87; // 成本确认
+		/**
+		 * 90 已完成
+		 */
+		public static final Byte STATUS_COMPLETE = 90; // 已完成
+
+		private String tidList;
+		private String refundNo;
+		private String remark;
+		private Byte type;
+		private Byte stockinStatus;
+		private Integer processStatus;
+		private Integer consignMode;
+		private Integer customerId;
+		private String flagName;
+		private BigDecimal returnGoodsCount;
+		private String receiverTelno;
+		private String receiverName;
+		private String modified;
+		private BigDecimal noteCount;
+		private String shopNo;
+		private Byte fromType;
+		private String created;
+		private String settleTime;
+		private String checkTime;
+		private String returnLogisticsNo;
+		private String tradeNoList;
+		private BigDecimal guaranteeRefundAmount;
+		private BigDecimal returnGoodsAmount;
+		private String returnLogisticsName;
+		private Integer reasonId;
+		private String reasonName;
+		private String buyerNick;
+		private String operatorName;
+		private BigDecimal actualRefundAmount;
+		private Integer revertReason;
+		private String revertReasonName;
+		private Integer badReason;
+		private String returnWarehouseNo;
+		private Integer warehouseType;
+		private BigDecimal directRefundAmount;
+		private BigDecimal receiveAmount;
+		private String customerName;
+		private Byte status;
+		private String oaid;
+		private Integer refundId;
+		private Integer tradeId;
+		private Integer platformId;
+		private Integer shopId;
+		private String rawRefundNos;
+		private Integer returnWarehouseId;
+		private String payId;
+		private String wmsOwnerNo;
+		private String returnMaskInfo;
+		private String modifiedDate;
+		private String refundTime;
+		private String fenxiaoTid;
+		private String fenxiaoNickNo;
+		private String wmsCode;
+		private Integer rrStatus;
+		private String currentPhaseTimeout;
+		private String fenxiaoDistributorId;
+		private String fenxiaoDistributorName;
+		private String orderType;
+		private List<RefundOrderInfoDto> detailList;
+
+		@SerializedName("swap_order")
+		private SwapOrderDto swapOrder;
+
+		private List<AmountDetailDto> amountDetailList;
+
+		public String getTidList()
+		{
+			return tidList;
+		}
+
+		public void setTidList(String tidList)
+		{
+			this.tidList = tidList;
+		}
+
+		public String getRefundNo()
+		{
+			return refundNo;
+		}
+
+		public void setRefundNo(String refundNo)
+		{
+			this.refundNo = refundNo;
+		}
+
+		public String getRemark()
+		{
+			return remark;
+		}
+
+		public void setRemark(String remark)
+		{
+			this.remark = remark;
+		}
+
+		public Byte getType()
+		{
+			return type;
+		}
+
+		public void setType(Byte type)
+		{
+			this.type = type;
+		}
+
+		public Byte getStockinStatus()
+		{
+			return stockinStatus;
+		}
+
+		public void setStockinStatus(Byte stockinStatus)
+		{
+			this.stockinStatus = stockinStatus;
+		}
+
+		public String getFlagName()
+		{
+			return flagName;
+		}
+
+		public void setFlagName(String flagName)
+		{
+			this.flagName = flagName;
+		}
+
+		public BigDecimal getReturnGoodsCount()
+		{
+			return returnGoodsCount;
+		}
+
+		public void setReturnGoodsCount(BigDecimal returnGoodsCount)
+		{
+			this.returnGoodsCount = returnGoodsCount;
+		}
+
+		public String getReceiverTelno()
+		{
+			return receiverTelno;
+		}
+
+		public void setReceiverTelno(String receiverTelno)
+		{
+			this.receiverTelno = receiverTelno;
+		}
+
+		public String getReceiverName()
+		{
+			return receiverName;
+		}
+
+		public void setReceiverName(String receiverName)
+		{
+			this.receiverName = receiverName;
+		}
+
+		public String getModified()
+		{
+			return modified;
+		}
+
+		public void setModified(String modified)
+		{
+			this.modified = modified;
+		}
+
+		public BigDecimal getNoteCount()
+		{
+			return noteCount;
+		}
+
+		public void setNoteCount(BigDecimal noteCount)
+		{
+			this.noteCount = noteCount;
+		}
+
+		public String getShopNo()
+		{
+			return shopNo;
+		}
+
+		public void setShopNo(String shopNo)
+		{
+			this.shopNo = shopNo;
+		}
+
+		public Byte getFromType()
+		{
+			return fromType;
+		}
+
+		public void setFromType(Byte fromType)
+		{
+			this.fromType = fromType;
+		}
+
+		public String getCreated()
+		{
+			return created;
+		}
+
+		public void setCreated(String created)
+		{
+			this.created = created;
+		}
+
+		public String getReturnLogisticsNo()
+		{
+			return returnLogisticsNo;
+		}
+
+		public void setReturnLogisticsNo(String returnLogisticsNo)
+		{
+			this.returnLogisticsNo = returnLogisticsNo;
+		}
+
+		public String getTradeNoList()
+		{
+			return tradeNoList;
+		}
+
+		public void setTradeNoList(String tradeNoList)
+		{
+			this.tradeNoList = tradeNoList;
+		}
+
+		public BigDecimal getGuaranteeRefundAmount()
+		{
+			return guaranteeRefundAmount;
+		}
+
+		public Integer getProcessStatus()
+		{
+			return processStatus;
+		}
+
+		public void setProcessStatus(Integer processStatus)
+		{
+			this.processStatus = processStatus;
+		}
+
+		public Integer getConsignMode()
+		{
+			return consignMode;
+		}
+
+		public void setConsignMode(Integer consignMode)
+		{
+			this.consignMode = consignMode;
+		}
+
+		public Integer getCustomerId()
+		{
+			return customerId;
+		}
+
+		public void setCustomerId(Integer customerId)
+		{
+			this.customerId = customerId;
+		}
+
+		public String getSettleTime()
+		{
+			return settleTime;
+		}
+
+		public void setSettleTime(String settleTime)
+		{
+			this.settleTime = settleTime;
+		}
+
+		public String getCheckTime()
+		{
+			return checkTime;
+		}
+
+		public void setCheckTime(String checkTime)
+		{
+			this.checkTime = checkTime;
+		}
+
+		public Integer getReasonId()
+		{
+			return reasonId;
+		}
+
+		public void setReasonId(Integer reasonId)
+		{
+			this.reasonId = reasonId;
+		}
+
+		public Integer getRevertReason()
+		{
+			return revertReason;
+		}
+
+		public void setRevertReason(Integer revertReason)
+		{
+			this.revertReason = revertReason;
+		}
+
+		public Integer getBadReason()
+		{
+			return badReason;
+		}
+
+		public void setBadReason(Integer badReason)
+		{
+			this.badReason = badReason;
+		}
+
+		public Integer getWarehouseType()
+		{
+			return warehouseType;
+		}
+
+		public void setWarehouseType(Integer warehouseType)
+		{
+			this.warehouseType = warehouseType;
+		}
+
+		public String getOaid()
+		{
+			return oaid;
+		}
+
+		public void setOaid(String oaid)
+		{
+			this.oaid = oaid;
+		}
+
+		public Integer getRefundId()
+		{
+			return refundId;
+		}
+
+		public void setRefundId(Integer refundId)
+		{
+			this.refundId = refundId;
+		}
+
+		public Integer getTradeId()
+		{
+			return tradeId;
+		}
+
+		public void setTradeId(Integer tradeId)
+		{
+			this.tradeId = tradeId;
+		}
+
+		public Integer getPlatformId()
+		{
+			return platformId;
+		}
+
+		public void setPlatformId(Integer platformId)
+		{
+			this.platformId = platformId;
+		}
+
+		public Integer getShopId()
+		{
+			return shopId;
+		}
+
+		public void setShopId(Integer shopId)
+		{
+			this.shopId = shopId;
+		}
+
+		public String getRawRefundNos()
+		{
+			return rawRefundNos;
+		}
+
+		public void setRawRefundNos(String rawRefundNos)
+		{
+			this.rawRefundNos = rawRefundNos;
+		}
+
+		public Integer getReturnWarehouseId()
+		{
+			return returnWarehouseId;
+		}
+
+		public void setReturnWarehouseId(Integer returnWarehouseId)
+		{
+			this.returnWarehouseId = returnWarehouseId;
+		}
+
+		public String getPayId()
+		{
+			return payId;
+		}
+
+		public void setPayId(String payId)
+		{
+			this.payId = payId;
+		}
+
+		public String getWmsOwnerNo()
+		{
+			return wmsOwnerNo;
+		}
+
+		public void setWmsOwnerNo(String wmsOwnerNo)
+		{
+			this.wmsOwnerNo = wmsOwnerNo;
+		}
+
+		public String getReturnMaskInfo()
+		{
+			return returnMaskInfo;
+		}
+
+		public void setReturnMaskInfo(String returnMaskInfo)
+		{
+			this.returnMaskInfo = returnMaskInfo;
+		}
+
+		public String getModifiedDate()
+		{
+			return modifiedDate;
+		}
+
+		public void setModifiedDate(String modifiedDate)
+		{
+			this.modifiedDate = modifiedDate;
+		}
+
+		public String getFenxiaoTid()
+		{
+			return fenxiaoTid;
+		}
+
+		public void setFenxiaoTid(String fenxiaoTid)
+		{
+			this.fenxiaoTid = fenxiaoTid;
+		}
+
+		public String getFenxiaoNickNo()
+		{
+			return fenxiaoNickNo;
+		}
+
+		public void setFenxiaoNickNo(String fenxiaoNickNo)
+		{
+			this.fenxiaoNickNo = fenxiaoNickNo;
+		}
+
+		public String getWmsCode()
+		{
+			return wmsCode;
+		}
+
+		public void setWmsCode(String wmsCode)
+		{
+			this.wmsCode = wmsCode;
+		}
+
+		public Integer getRrStatus()
+		{
+			return rrStatus;
+		}
+
+		public void setRrStatus(Integer rrStatus)
+		{
+			this.rrStatus = rrStatus;
+		}
+
+		public String getCurrentPhaseTimeout()
+		{
+			return currentPhaseTimeout;
+		}
+
+		public void setCurrentPhaseTimeout(String currentPhaseTimeout)
+		{
+			this.currentPhaseTimeout = currentPhaseTimeout;
+		}
+
+		public String getFenxiaoDistributorId()
+		{
+			return fenxiaoDistributorId;
+		}
+
+		public void setFenxiaoDistributorId(String fenxiaoDistributorId)
+		{
+			this.fenxiaoDistributorId = fenxiaoDistributorId;
+		}
+
+		public String getFenxiaoDistributorName()
+		{
+			return fenxiaoDistributorName;
+		}
+
+		public void setFenxiaoDistributorName(String fenxiaoDistributorName)
+		{
+			this.fenxiaoDistributorName = fenxiaoDistributorName;
+		}
+
+		public String getOrderType()
+		{
+			return orderType;
+		}
+
+		public void setOrderType(String orderType)
+		{
+			this.orderType = orderType;
+		}
+
+		public List<AmountDetailDto> getAmountDetailList()
+		{
+			return amountDetailList;
+		}
+
+		public void setAmountDetailList(List<AmountDetailDto> amountDetailList)
+		{
+			this.amountDetailList = amountDetailList;
+		}
+
+
+		public SwapOrderDto getSwapOrder()
+		{
+			return swapOrder;
+		}
+
+		public void setSwapOrder(SwapOrderDto swapOrder)
+		{
+			this.swapOrder = swapOrder;
+		}
+
+		public void setGuaranteeRefundAmount(BigDecimal guaranteeRefundAmount)
+		{
+			this.guaranteeRefundAmount = guaranteeRefundAmount;
+		}
+
+		public BigDecimal getReturnGoodsAmount()
+		{
+			return returnGoodsAmount;
+		}
+
+		public void setReturnGoodsAmount(BigDecimal returnGoodsAmount)
+		{
+			this.returnGoodsAmount = returnGoodsAmount;
+		}
+
+		public String getReturnLogisticsName()
+		{
+			return returnLogisticsName;
+		}
+
+		public void setReturnLogisticsName(String returnLogisticsName)
+		{
+			this.returnLogisticsName = returnLogisticsName;
+		}
+
+		public String getBuyerNick()
+		{
+			return buyerNick;
+		}
+
+		public void setBuyerNick(String buyerNick)
+		{
+			this.buyerNick = buyerNick;
+		}
+
+		public String getOperatorName()
+		{
+			return operatorName;
+		}
+
+		public void setOperatorName(String operatorName)
+		{
+			this.operatorName = operatorName;
+		}
+
+		public BigDecimal getActualRefundAmount()
+		{
+			return actualRefundAmount;
+		}
+
+		public void setActualRefundAmount(BigDecimal actualRefundAmount)
+		{
+			this.actualRefundAmount = actualRefundAmount;
+		}
+
+		public String getReturnWarehouseNo()
+		{
+			return returnWarehouseNo;
+		}
+
+		public void setReturnWarehouseNo(String returnWarehouseNo)
+		{
+			this.returnWarehouseNo = returnWarehouseNo;
+		}
+
+		public BigDecimal getDirectRefundAmount()
+		{
+			return directRefundAmount;
+		}
+
+		public void setDirectRefundAmount(BigDecimal directRefundAmount)
+		{
+			this.directRefundAmount = directRefundAmount;
+		}
+
+		public BigDecimal getReceiveAmount()
+		{
+			return receiveAmount;
+		}
+
+		public void setReceiveAmount(BigDecimal receiveAmount)
+		{
+			this.receiveAmount = receiveAmount;
+		}
+
+		public String getCustomerName()
+		{
+			return customerName;
+		}
+
+		public void setCustomerName(String customerName)
+		{
+			this.customerName = customerName;
+		}
+
+		public String getReasonName()
+		{
+			return reasonName;
+		}
+
+		public void setReasonName(String reasonName)
+		{
+			this.reasonName = reasonName;
+		}
+
+		public Byte getStatus()
+		{
+			return status;
+		}
+
+		public void setStatus(Byte status)
+		{
+			this.status = status;
+		}
+
+		public String getRevertReasonName()
+		{
+			return revertReasonName;
+		}
+
+		public void setRevertReasonName(String revertReasonName)
+		{
+			this.revertReasonName = revertReasonName;
+		}
+
+		public List<RefundOrderInfoDto> getDetailList()
+		{
+			return detailList;
+		}
+
+		public void setDetailList(List<RefundOrderInfoDto> detailList)
+		{
+			this.detailList = detailList;
+		}
+
+
+		public String getRefundTime()
+		{
+			return refundTime;
+		}
+
+		public void setRefundTime(String refundTime)
+		{
+			this.refundTime = refundTime;
+		}
+	}
+
+	public static class RefundOrderInfoDto
+	{
+
+		private Integer recId;
+		private Integer refundId;
+		private String oid;
+		private Integer salesTradeId;
+		private Integer platformId;
+		private String tid;
+		private String tradeNo;
+		private BigDecimal num;
+		private BigDecimal price;
+		private BigDecimal originalPrice;
+		private BigDecimal checkedCostPrice;
+		private BigDecimal refundNum;
+		private BigDecimal totalAmount;
+		private BigDecimal refundAmount;
+
+		@SerializedName("is_guarantee")
+		private Boolean guarantee;
+		private String goodsNo;
+		private String goodsName;
+		private String specName;
+		private String specNo;
+		private String specCode;
+		private String barcode;
+		private BigDecimal stockinNum;
+		private BigDecimal discount;
+		private BigDecimal paid;
+		private String remark;
+		private String apiGoodsName;
+		private String apiSpecName;
+		private String rawRefundNo;
+		private String rawRefundNos;
+		private Integer tradeOrderId;
+		private String goodsId;
+		private String specId;
+		private Integer sysGoodsId;
+		private Integer sysSpecId;
+		private String modified;
+		private Integer suiteId;
+		private String suiteName;
+		private String suiteNo;
+		private Integer platGoodsCount;
+		private BigDecimal suiteNum;
+		private String created;
+		private String modifiedDate;
+		private Integer giftType;
+		private String currentPhaseTimeout;
+		private String brandName;
+
+		public Integer getPlatformId()
+		{
+			return platformId;
+		}
+
+		public void setPlatformId(Integer platformId)
+		{
+			this.platformId = platformId;
+		}
+
+		public String getOid()
+		{
+			return oid;
+		}
+
+		public void setOid(String oid)
+		{
+			this.oid = oid;
+		}
+
+		public String getTid()
+		{
+			return tid;
+		}
+
+		public void setTid(String tid)
+		{
+			this.tid = tid;
+		}
+
+		public String getTradeNo()
+		{
+			return tradeNo;
+		}
+
+		public void setTradeNo(String tradeNo)
+		{
+			this.tradeNo = tradeNo;
+		}
+
+		public BigDecimal getNum()
+		{
+			return num;
+		}
+
+		public void setNum(BigDecimal num)
+		{
+			this.num = num;
+		}
+
+		public BigDecimal getPrice()
+		{
+			return price;
+		}
+
+		public void setPrice(BigDecimal price)
+		{
+			this.price = price;
+		}
+
+		public BigDecimal getOriginalPrice()
+		{
+			return originalPrice;
+		}
+
+		public void setOriginalPrice(BigDecimal originalPrice)
+		{
+			this.originalPrice = originalPrice;
+		}
+
+		public BigDecimal getRefundNum()
+		{
+			return refundNum;
+		}
+
+		public void setRefundNum(BigDecimal refundNum)
+		{
+			this.refundNum = refundNum;
+		}
+
+		public BigDecimal getTotalAmount()
+		{
+			return totalAmount;
+		}
+
+		public void setTotalAmount(BigDecimal totalAmount)
+		{
+			this.totalAmount = totalAmount;
+		}
+
+		public BigDecimal getRefundAmount()
+		{
+			return refundAmount;
+		}
+
+		public void setRefundAmount(BigDecimal refundAmount)
+		{
+			this.refundAmount = refundAmount;
+		}
+
+		public boolean isGuarantee()
+		{
+			return guarantee;
+		}
+
+		public void setGuarantee(boolean guarantee)
+		{
+			this.guarantee = guarantee;
+		}
+
+		public String getGoodsNo()
+		{
+			return goodsNo;
+		}
+
+		public void setGoodsNo(String goodsNo)
+		{
+			this.goodsNo = goodsNo;
+		}
+
+		public String getGoodsName()
+		{
+			return goodsName;
+		}
+
+		public void setGoodsName(String goodsName)
+		{
+			this.goodsName = goodsName;
+		}
+
+		public String getSpecName()
+		{
+			return specName;
+		}
+
+		public void setSpecName(String specName)
+		{
+			this.specName = specName;
+		}
+
+		public String getSpecNo()
+		{
+			return specNo;
+		}
+
+		public void setSpecNo(String specNo)
+		{
+			this.specNo = specNo;
+		}
+
+		public String getBarcode()
+		{
+			return barcode;
+		}
+
+		public void setBarcode(String barcode)
+		{
+			this.barcode = barcode;
+		}
+
+		public BigDecimal getStockinNum()
+		{
+			return stockinNum;
+		}
+
+		public void setStockinNum(BigDecimal stockinNum)
+		{
+			this.stockinNum = stockinNum;
+		}
+
+		public String getRemark()
+		{
+			return remark;
+		}
+
+		public void setRemark(String remark)
+		{
+			this.remark = remark;
+		}
+
+		public String getApiGoodsName()
+		{
+			return apiGoodsName;
+		}
+
+		public void setApiGoodsName(String apiGoodsName)
+		{
+			this.apiGoodsName = apiGoodsName;
+		}
+
+		public String getApiSpecName()
+		{
+			return apiSpecName;
+		}
+
+		public void setApiSpecName(String apiSpecName)
+		{
+			this.apiSpecName = apiSpecName;
+		}
+
+		public Integer getRecId()
+		{
+			return recId;
+		}
+
+		public void setRecId(Integer recId)
+		{
+			this.recId = recId;
+		}
+
+		public Integer getRefundId()
+		{
+			return refundId;
+		}
+
+		public void setRefundId(Integer refundId)
+		{
+			this.refundId = refundId;
+		}
+
+		public Integer getSalesTradeId()
+		{
+			return salesTradeId;
+		}
+
+		public void setSalesTradeId(Integer salesTradeId)
+		{
+			this.salesTradeId = salesTradeId;
+		}
+
+		public BigDecimal getCheckedCostPrice()
+		{
+			return checkedCostPrice;
+		}
+
+		public void setCheckedCostPrice(BigDecimal checkedCostPrice)
+		{
+			this.checkedCostPrice = checkedCostPrice;
+		}
+
+		public Boolean getGuarantee()
+		{
+			return guarantee;
+		}
+
+		public void setGuarantee(Boolean guarantee)
+		{
+			this.guarantee = guarantee;
+		}
+
+		public String getSpecCode()
+		{
+			return specCode;
+		}
+
+		public void setSpecCode(String specCode)
+		{
+			this.specCode = specCode;
+		}
+
+		public BigDecimal getDiscount()
+		{
+			return discount;
+		}
+
+		public void setDiscount(BigDecimal discount)
+		{
+			this.discount = discount;
+		}
+
+		public BigDecimal getPaid()
+		{
+			return paid;
+		}
+
+		public void setPaid(BigDecimal paid)
+		{
+			this.paid = paid;
+		}
+
+		public String getRawRefundNo()
+		{
+			return rawRefundNo;
+		}
+
+		public void setRawRefundNo(String rawRefundNo)
+		{
+			this.rawRefundNo = rawRefundNo;
+		}
+
+		public String getRawRefundNos()
+		{
+			return rawRefundNos;
+		}
+
+		public void setRawRefundNos(String rawRefundNos)
+		{
+			this.rawRefundNos = rawRefundNos;
+		}
+
+		public Integer getTradeOrderId()
+		{
+			return tradeOrderId;
+		}
+
+		public void setTradeOrderId(Integer tradeOrderId)
+		{
+			this.tradeOrderId = tradeOrderId;
+		}
+
+		public String getGoodsId()
+		{
+			return goodsId;
+		}
+
+		public void setGoodsId(String goodsId)
+		{
+			this.goodsId = goodsId;
+		}
+
+		public String getSpecId()
+		{
+			return specId;
+		}
+
+		public void setSpecId(String specId)
+		{
+			this.specId = specId;
+		}
+
+		public Integer getSysGoodsId()
+		{
+			return sysGoodsId;
+		}
+
+		public void setSysGoodsId(Integer sysGoodsId)
+		{
+			this.sysGoodsId = sysGoodsId;
+		}
+
+		public Integer getSysSpecId()
+		{
+			return sysSpecId;
+		}
+
+		public void setSysSpecId(Integer sysSpecId)
+		{
+			this.sysSpecId = sysSpecId;
+		}
+
+		public String getModified()
+		{
+			return modified;
+		}
+
+		public void setModified(String modified)
+		{
+			this.modified = modified;
+		}
+
+		public Integer getSuiteId()
+		{
+			return suiteId;
+		}
+
+		public void setSuiteId(Integer suiteId)
+		{
+			this.suiteId = suiteId;
+		}
+
+		public String getSuiteName()
+		{
+			return suiteName;
+		}
+
+		public void setSuiteName(String suiteName)
+		{
+			this.suiteName = suiteName;
+		}
+
+		public String getSuiteNo()
+		{
+			return suiteNo;
+		}
+
+		public void setSuiteNo(String suiteNo)
+		{
+			this.suiteNo = suiteNo;
+		}
+
+		public Integer getPlatGoodsCount()
+		{
+			return platGoodsCount;
+		}
+
+		public void setPlatGoodsCount(Integer platGoodsCount)
+		{
+			this.platGoodsCount = platGoodsCount;
+		}
+
+		public BigDecimal getSuiteNum()
+		{
+			return suiteNum;
+		}
+
+		public void setSuiteNum(BigDecimal suiteNum)
+		{
+			this.suiteNum = suiteNum;
+		}
+
+		public String getCreated()
+		{
+			return created;
+		}
+
+		public void setCreated(String created)
+		{
+			this.created = created;
+		}
+
+		public String getModifiedDate()
+		{
+			return modifiedDate;
+		}
+
+		public void setModifiedDate(String modifiedDate)
+		{
+			this.modifiedDate = modifiedDate;
+		}
+
+		public Integer getGiftType()
+		{
+			return giftType;
+		}
+
+		public void setGiftType(Integer giftType)
+		{
+			this.giftType = giftType;
+		}
+
+		public String getCurrentPhaseTimeout()
+		{
+			return currentPhaseTimeout;
+		}
+
+		public void setCurrentPhaseTimeout(String currentPhaseTimeout)
+		{
+			this.currentPhaseTimeout = currentPhaseTimeout;
+		}
+
+		public String getBrandName()
+		{
+			return brandName;
+		}
+
+		public void setBrandName(String brandName)
+		{
+			this.brandName = brandName;
+		}
+	}
+
+	public static class SwapOrderInfoDto
+	{
+
+		private Integer recId;
+		private Integer refundId;
+		private String oid;
+		private Byte targetType;
+		private Integer targetId;
+		private Boolean defect;
+		private String goodsName;
+		private String goodsNo;
+		private String specName;
+		private String specCode;
+		private String merchantNo;
+		private BigDecimal price;
+		private BigDecimal totalAmount;
+		private BigDecimal num;
+		private String remark;
+
+		public Byte getTargetType()
+		{
+			return targetType;
+		}
+
+		public void setTargetType(Byte targetType)
+		{
+			this.targetType = targetType;
+		}
+
+		public int getTargetId()
+		{
+			return targetId;
+		}
+
+		public void setTargetId(int targetId)
+		{
+			this.targetId = targetId;
+		}
+
+		public boolean isDefect()
+		{
+			return defect;
+		}
+
+		public void setDefect(boolean defect)
+		{
+			this.defect = defect;
+		}
+
+		public String getGoodsName()
+		{
+			return goodsName;
+		}
+
+		public void setGoodsName(String goodsName)
+		{
+			this.goodsName = goodsName;
+		}
+
+		public String getGoodsNo()
+		{
+			return goodsNo;
+		}
+
+		public void setGoodsNo(String goodsNo)
+		{
+			this.goodsNo = goodsNo;
+		}
+
+		public String getSpecName()
+		{
+			return specName;
+		}
+
+		public void setSpecName(String specName)
+		{
+			this.specName = specName;
+		}
+
+		public String getSpecCode()
+		{
+			return specCode;
+		}
+
+		public void setSpecCode(String specCode)
+		{
+			this.specCode = specCode;
+		}
+
+		public String getMerchantNo()
+		{
+			return merchantNo;
+		}
+
+		public void setMerchantNo(String merchantNo)
+		{
+			this.merchantNo = merchantNo;
+		}
+
+		public BigDecimal getPrice()
+		{
+			return price;
+		}
+
+		public void setPrice(BigDecimal price)
+		{
+			this.price = price;
+		}
+
+		public BigDecimal getTotalAmount()
+		{
+			return totalAmount;
+		}
+
+		public void setTotalAmount(BigDecimal totalAmount)
+		{
+			this.totalAmount = totalAmount;
+		}
+
+		public BigDecimal getNum()
+		{
+			return num;
+		}
+
+		public void setNum(BigDecimal num)
+		{
+			this.num = num;
+		}
+
+		public String getRemark()
+		{
+			return remark;
+		}
+
+		public void setRemark(String remark)
+		{
+			this.remark = remark;
+		}
+
+		public String getOid()
+		{
+			return oid;
+		}
+
+		public void setOid(String oid)
+		{
+			this.oid = oid;
+		}
+
+		public Integer getRecId()
+		{
+			return recId;
+		}
+
+		public void setRecId(Integer recId)
+		{
+			this.recId = recId;
+		}
+
+		public Integer getRefundId()
+		{
+			return refundId;
+		}
+
+		public void setRefundId(Integer refundId)
+		{
+			this.refundId = refundId;
+		}
+
+		public void setTargetId(Integer targetId)
+		{
+			this.targetId = targetId;
+		}
+
+		public Boolean getDefect()
+		{
+			return defect;
+		}
+
+		public void setDefect(Boolean defect)
+		{
+			this.defect = defect;
+		}
+	}
+
+	public static class AmountDetailDto
+	{
+		private Integer recId;
+		private Integer refundId;
+		private Integer refundType;
+		private Integer isReturn;
+		private BigDecimal refundAmount;
+		private BigDecimal receiveAmount;
+
+		@SerializedName("is_guarantee")
+		private Boolean guarantee;
+		private Integer accountId;
+		private String payAccount;
+		private String accountName;
+		private String accountBank;
+
+		@SerializedName("is_auto")
+		private Boolean auto;
+		private String remark;
+
+		public Integer getRecId()
+		{
+			return recId;
+		}
+
+		public void setRecId(Integer recId)
+		{
+			this.recId = recId;
+		}
+
+		public Integer getRefundId()
+		{
+			return refundId;
+		}
+
+		public void setRefundId(Integer refundId)
+		{
+			this.refundId = refundId;
+		}
+
+		public Integer getRefundType()
+		{
+			return refundType;
+		}
+
+		public void setRefundType(Integer refundType)
+		{
+			this.refundType = refundType;
+		}
+
+		public Integer getIsReturn()
+		{
+			return isReturn;
+		}
+
+		public void setIsReturn(Integer isReturn)
+		{
+			this.isReturn = isReturn;
+		}
+
+		public BigDecimal getRefundAmount()
+		{
+			return refundAmount;
+		}
+
+		public void setRefundAmount(BigDecimal refundAmount)
+		{
+			this.refundAmount = refundAmount;
+		}
+
+		public BigDecimal getReceiveAmount()
+		{
+			return receiveAmount;
+		}
+
+		public void setReceiveAmount(BigDecimal receiveAmount)
+		{
+			this.receiveAmount = receiveAmount;
+		}
+
+		public Boolean getGuarantee()
+		{
+			return guarantee;
+		}
+
+		public void setGuarantee(Boolean guarantee)
+		{
+			this.guarantee = guarantee;
+		}
+
+		public Integer getAccountId()
+		{
+			return accountId;
+		}
+
+		public void setAccountId(Integer accountId)
+		{
+			this.accountId = accountId;
+		}
+
+		public String getPayAccount()
+		{
+			return payAccount;
+		}
+
+		public void setPayAccount(String payAccount)
+		{
+			this.payAccount = payAccount;
+		}
+
+		public String getAccountName()
+		{
+			return accountName;
+		}
+
+		public void setAccountName(String accountName)
+		{
+			this.accountName = accountName;
+		}
+
+		public String getAccountBank()
+		{
+			return accountBank;
+		}
+
+		public void setAccountBank(String accountBank)
+		{
+			this.accountBank = accountBank;
+		}
+
+		public Boolean getAuto()
+		{
+			return auto;
+		}
+
+		public void setAuto(Boolean auto)
+		{
+			this.auto = auto;
+		}
+
+		public String getRemark()
+		{
+			return remark;
+		}
+
+		public void setRemark(String remark)
+		{
+			this.remark = remark;
+		}
+	}
+	public static class SwapOrderDto
+	{
+		private String tid;
+		private Integer swapProvince;
+		private Integer swapCity;
+		private String swapArea;
+		private Integer swapDistrict;
+		private Integer swapLogisticsId;
+		private BigDecimal postAmount;
+		private BigDecimal otherAmount;
+		private String shopNo;
+		private String shopName;
+		private String warehouseNo;
+
+		@SerializedName("swap_order_detail_list")
+		private List<SwapOrderInfoDto> swapOutDetailList;
+
+		public String getTid()
+		{
+			return tid;
+		}
+
+		public void setTid(String tid)
+		{
+			this.tid = tid;
+		}
+
+		public Integer getSwapProvince()
+		{
+			return swapProvince;
+		}
+
+		public void setSwapProvince(Integer swapProvince)
+		{
+			this.swapProvince = swapProvince;
+		}
+
+		public Integer getSwapCity()
+		{
+			return swapCity;
+		}
+
+		public void setSwapCity(Integer swapCity)
+		{
+			this.swapCity = swapCity;
+		}
+
+		public String getSwapArea()
+		{
+			return swapArea;
+		}
+
+		public void setSwapArea(String swapArea)
+		{
+			this.swapArea = swapArea;
+		}
+
+		public Integer getSwapDistrict()
+		{
+			return swapDistrict;
+		}
+
+		public void setSwapDistrict(Integer swapDistrict)
+		{
+			this.swapDistrict = swapDistrict;
+		}
+
+		public Integer getSwapLogisticsId()
+		{
+			return swapLogisticsId;
+		}
+
+		public void setSwapLogisticsId(Integer swapLogisticsId)
+		{
+			this.swapLogisticsId = swapLogisticsId;
+		}
+
+		public BigDecimal getPostAmount()
+		{
+			return postAmount;
+		}
+
+		public void setPostAmount(BigDecimal postAmount)
+		{
+			this.postAmount = postAmount;
+		}
+
+		public BigDecimal getOtherAmount()
+		{
+			return otherAmount;
+		}
+
+		public void setOtherAmount(BigDecimal otherAmount)
+		{
+			this.otherAmount = otherAmount;
+		}
+
+		public String getShopNo()
+		{
+			return shopNo;
+		}
+
+		public void setShopNo(String shopNo)
+		{
+			this.shopNo = shopNo;
+		}
+
+		public String getShopName()
+		{
+			return shopName;
+		}
+
+		public void setShopName(String shopName)
+		{
+			this.shopName = shopName;
+		}
+
+		public String getWarehouseNo()
+		{
+			return warehouseNo;
+		}
+
+		public void setWarehouseNo(String warehouseNo)
+		{
+			this.warehouseNo = warehouseNo;
+		}
+
+		public List<SwapOrderInfoDto> getSwapOutDetailList()
+		{
+			return swapOutDetailList;
+		}
+
+		public void setSwapOutDetailList(List<SwapOrderInfoDto> swapOutDetailList)
+		{
+			this.swapOutDetailList = swapOutDetailList;
+		}
+	}
+}

+ 62 - 0
fs-service/src/main/java/com/fs/erp/dto/sdk/wangdianTwo/api/dto/VirtualWarehouseStockSearchRequest.java

@@ -0,0 +1,62 @@
+package com.fs.erp.dto.sdk.wangdianTwo.api.dto;
+
+import com.google.gson.annotations.SerializedName;
+
+public class VirtualWarehouseStockSearchRequest
+{
+	@SerializedName("start_time") private String startTime;
+	@SerializedName("virtual_warehouse_no") private String virtualWarehouseNo;
+	@SerializedName("spec_nos") private String specNos;
+	@SerializedName("warehouse_no") private String warehouseNo;
+	@SerializedName("end_time") private String endTime;
+
+	public String getStartTime()
+	{
+		return startTime;
+	}
+
+	public void setStartTime(String startTime)
+	{
+		this.startTime = startTime;
+	}
+
+	public String getVirtualWarehouseNo()
+	{
+		return virtualWarehouseNo;
+	}
+
+	public void setVirtualWarehouseNo(String virtualWarehouseNo)
+	{
+		this.virtualWarehouseNo = virtualWarehouseNo;
+	}
+
+	public String getSpecNos()
+	{
+		return specNos;
+	}
+
+	public void setSpecNos(String specNos)
+	{
+		this.specNos = specNos;
+	}
+
+	public String getWarehouseNo()
+	{
+		return warehouseNo;
+	}
+
+	public void setWarehouseNo(String warehouseNo)
+	{
+		this.warehouseNo = warehouseNo;
+	}
+
+	public String getEndTime()
+	{
+		return endTime;
+	}
+
+	public void setEndTime(String endTime)
+	{
+		this.endTime = endTime;
+	}
+}

+ 344 - 0
fs-service/src/main/java/com/fs/erp/dto/sdk/wangdianTwo/api/dto/VirtualWarehouseStockSearchResponse.java

@@ -0,0 +1,344 @@
+package com.fs.erp.dto.sdk.wangdianTwo.api.dto;
+
+import com.google.gson.annotations.SerializedName;
+
+import java.math.BigDecimal;
+import java.util.List;
+
+public class VirtualWarehouseStockSearchResponse
+{
+	@SerializedName("detail_list") private List<Detail> detailList;
+	@SerializedName("total_count") private Integer total;
+
+	public static class Detail
+	{
+		@SerializedName("alarm_num") private BigDecimal alarmNum;
+		@SerializedName("goods_no") private String goodsNo;
+		@SerializedName("spec_no") private String specNo;
+		@SerializedName("purchase_num") private BigDecimal purchaseNum;
+		@SerializedName("avaliable_num") private BigDecimal avaliableNum;
+		@SerializedName("warehouse_no") private String warehouseNo;
+		@SerializedName("spec_id") private Integer specId;
+		@SerializedName("vir_warehouse_name") private String virWarehouseName;
+		@SerializedName("vir_warehouse_no") private String virWarehouseNo;
+		@SerializedName("num_14days") private BigDecimal num14days;
+		@SerializedName("out_num") private BigDecimal outNum;
+		@SerializedName("lock_num") private BigDecimal lockNum;
+		@SerializedName("goods_name") private String goodsName;
+		@SerializedName("now_lock_num") private BigDecimal nowLockNum;
+		@SerializedName("num_day") private BigDecimal numDay;
+		@SerializedName("rec_id") private Integer recId;
+		@SerializedName("can_use_lock_num") private BigDecimal canUseLockNum;
+		@SerializedName("num_month") private BigDecimal numMonth;
+		@SerializedName("can_use_num") private BigDecimal canUseNum;
+		@SerializedName("vir_warehouse_id") private Integer virWarehouseId;
+		@SerializedName("warehouse_name") private String warehouseName;
+		@SerializedName("factory_num") private BigDecimal factoryNum;
+		@SerializedName("sum_lock_num") private BigDecimal sumLockNum;
+		@SerializedName("num_yesterday") private BigDecimal numYesterday;
+		@SerializedName("spec_name") private String specName;
+		@SerializedName("assigned_num") private BigDecimal assignedNum;
+		@SerializedName("num_7days") private BigDecimal num7days;
+		@SerializedName("warehouse_id") private Integer warehouseId;
+
+		public BigDecimal getAlarmNum()
+		{
+			return alarmNum;
+		}
+
+		public void setAlarmNum(BigDecimal alarmNum)
+		{
+			this.alarmNum = alarmNum;
+		}
+
+		public String getGoodsNo()
+		{
+			return goodsNo;
+		}
+
+		public void setGoodsNo(String goodsNo)
+		{
+			this.goodsNo = goodsNo;
+		}
+
+		public String getSpecNo()
+		{
+			return specNo;
+		}
+
+		public void setSpecNo(String specNo)
+		{
+			this.specNo = specNo;
+		}
+
+		public BigDecimal getPurchaseNum()
+		{
+			return purchaseNum;
+		}
+
+		public void setPurchaseNum(BigDecimal purchaseNum)
+		{
+			this.purchaseNum = purchaseNum;
+		}
+
+		public BigDecimal getAvaliableNum()
+		{
+			return avaliableNum;
+		}
+
+		public void setAvaliableNum(BigDecimal avaliableNum)
+		{
+			this.avaliableNum = avaliableNum;
+		}
+
+		public String getWarehouseNo()
+		{
+			return warehouseNo;
+		}
+
+		public void setWarehouseNo(String warehouseNo)
+		{
+			this.warehouseNo = warehouseNo;
+		}
+
+		public Integer getSpecId()
+		{
+			return specId;
+		}
+
+		public void setSpecId(Integer specId)
+		{
+			this.specId = specId;
+		}
+
+		public String getVirWarehouseName()
+		{
+			return virWarehouseName;
+		}
+
+		public void setVirWarehouseName(String virWarehouseName)
+		{
+			this.virWarehouseName = virWarehouseName;
+		}
+
+		public String getVirWarehouseNo()
+		{
+			return virWarehouseNo;
+		}
+
+		public void setVirWarehouseNo(String virWarehouseNo)
+		{
+			this.virWarehouseNo = virWarehouseNo;
+		}
+
+		public BigDecimal getNum14days()
+		{
+			return num14days;
+		}
+
+		public void setNum14days(BigDecimal num14days)
+		{
+			this.num14days = num14days;
+		}
+
+		public BigDecimal getOutNum()
+		{
+			return outNum;
+		}
+
+		public void setOutNum(BigDecimal outNum)
+		{
+			this.outNum = outNum;
+		}
+
+		public BigDecimal getLockNum()
+		{
+			return lockNum;
+		}
+
+		public void setLockNum(BigDecimal lockNum)
+		{
+			this.lockNum = lockNum;
+		}
+
+		public String getGoodsName()
+		{
+			return goodsName;
+		}
+
+		public void setGoodsName(String goodsName)
+		{
+			this.goodsName = goodsName;
+		}
+
+		public BigDecimal getNowLockNum()
+		{
+			return nowLockNum;
+		}
+
+		public void setNowLockNum(BigDecimal nowLockNum)
+		{
+			this.nowLockNum = nowLockNum;
+		}
+
+		public BigDecimal getNumDay()
+		{
+			return numDay;
+		}
+
+		public void setNumDay(BigDecimal numDay)
+		{
+			this.numDay = numDay;
+		}
+
+		public Integer getRecId()
+		{
+			return recId;
+		}
+
+		public void setRecId(Integer recId)
+		{
+			this.recId = recId;
+		}
+
+		public BigDecimal getCanUseLockNum()
+		{
+			return canUseLockNum;
+		}
+
+		public void setCanUseLockNum(BigDecimal canUseLockNum)
+		{
+			this.canUseLockNum = canUseLockNum;
+		}
+
+		public BigDecimal getNumMonth()
+		{
+			return numMonth;
+		}
+
+		public void setNumMonth(BigDecimal numMonth)
+		{
+			this.numMonth = numMonth;
+		}
+
+		public BigDecimal getCanUseNum()
+		{
+			return canUseNum;
+		}
+
+		public void setCanUseNum(BigDecimal canUseNum)
+		{
+			this.canUseNum = canUseNum;
+		}
+
+		public Integer getVirWarehouseId()
+		{
+			return virWarehouseId;
+		}
+
+		public void setVirWarehouseId(Integer virWarehouseId)
+		{
+			this.virWarehouseId = virWarehouseId;
+		}
+
+		public String getWarehouseName()
+		{
+			return warehouseName;
+		}
+
+		public void setWarehouseName(String warehouseName)
+		{
+			this.warehouseName = warehouseName;
+		}
+
+		public BigDecimal getFactoryNum()
+		{
+			return factoryNum;
+		}
+
+		public void setFactoryNum(BigDecimal factoryNum)
+		{
+			this.factoryNum = factoryNum;
+		}
+
+		public BigDecimal getSumLockNum()
+		{
+			return sumLockNum;
+		}
+
+		public void setSumLockNum(BigDecimal sumLockNum)
+		{
+			this.sumLockNum = sumLockNum;
+		}
+
+		public BigDecimal getNumYesterday()
+		{
+			return numYesterday;
+		}
+
+		public void setNumYesterday(BigDecimal numYesterday)
+		{
+			this.numYesterday = numYesterday;
+		}
+
+		public String getSpecName()
+		{
+			return specName;
+		}
+
+		public void setSpecName(String specName)
+		{
+			this.specName = specName;
+		}
+
+		public BigDecimal getAssignedNum()
+		{
+			return assignedNum;
+		}
+
+		public void setAssignedNum(BigDecimal assignedNum)
+		{
+			this.assignedNum = assignedNum;
+		}
+
+		public BigDecimal getNum7days()
+		{
+			return num7days;
+		}
+
+		public void setNum7days(BigDecimal num7days)
+		{
+			this.num7days = num7days;
+		}
+
+		public Integer getWarehouseId()
+		{
+			return warehouseId;
+		}
+
+		public void setWarehouseId(Integer warehouseId)
+		{
+			this.warehouseId = warehouseId;
+		}
+	}
+
+	public List<Detail> getDetailList()
+	{
+		return detailList;
+	}
+
+	public void setDetailList(List<Detail> detailList)
+	{
+		this.detailList = detailList;
+	}
+
+	public Integer getTotal()
+	{
+		return total;
+	}
+
+	public void setTotal(Integer total)
+	{
+		this.total = total;
+	}
+}

+ 8 - 0
fs-service/src/main/java/com/fs/erp/service/IErpGoodsService.java

@@ -3,6 +3,8 @@ package com.fs.erp.service;
 import com.fs.erp.domain.ErpGoods;
 import com.fs.erp.dto.*;
 
+import java.util.Map;
+
 public interface IErpGoodsService
 {
 
@@ -12,5 +14,11 @@ public interface IErpGoodsService
     ErpGoodsQueryResponse getGoodsScrm(ErpGoodsQueryRequert param);
     ErpGoodsStockQueryResponse getGoodsStock(ErpGoodsStockQueryRequert param);
     ErpGoodsStockQueryResponse getGoodsStockScrm(ErpGoodsStockQueryRequert param);
+
+    //  虚拟仓库查询接口 目前只实现了 旺店通
+    default ErpGoodsStockQueryResponse searchVirtualWarehouseStock(ErpGoodsStockQueryRequert param)
+    {
+        throw new RuntimeException("不支持该方法");
+    }
 }
 

+ 13 - 0
fs-service/src/main/java/com/fs/erp/service/IErpOrderService.java

@@ -3,6 +3,8 @@ package com.fs.erp.service;
 import com.fs.erp.domain.ErpOrder;
 import com.fs.erp.domain.ErpRefundOrder;
 import com.fs.erp.dto.*;
+import com.fs.erp.dto.sdk.wangdianTwo.api.dto.CreateStockInRefundOrderRequest;
+import com.fs.erp.dto.sdk.wangdianTwo.api.dto.CreateStockInRefundOrderResponse;
 import com.fs.his.domain.FsStoreOrder;
 import com.fs.hisStore.domain.FsStoreOrderScrm;
 
@@ -36,5 +38,16 @@ public interface IErpOrderService
         throw new RuntimeException("不支持该方法");
     }
 
+    default ErpRefundOrderQueryResponse search(ErpRefundOrderQueryRequest param)
+    {
+        throw new RuntimeException("不支持该方法");
+    }
+
+    default CreateStockInRefundOrderResponse pushRefundStockInOrder(CreateStockInRefundOrderRequest request)
+    {
+        throw new RuntimeException("不支持该方法");
+    }
+
+
 }
 

+ 34 - 0
fs-service/src/main/java/com/fs/erp/service/impl/BaseWdtTwoErpService.java

@@ -0,0 +1,34 @@
+package com.fs.erp.service.impl;
+
+import com.fs.erp.dto.sdk.wangdianTwo.api.WdtTradeAPI;
+import com.fs.erp.dto.sdk.wangdianTwo.impl.ApiFactory;
+import com.fs.erp.dto.sdk.wangdianTwo.impl.WdtTwoClient;
+import com.fs.his.utils.ConfigUtil;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Component;
+
+import javax.annotation.PostConstruct;
+
+@Slf4j
+@Component
+public abstract class BaseWdtTwoErpService {
+
+    @Autowired
+    protected ConfigUtil configUtil;
+
+    protected WdtTwoClient client;
+    protected WdtTradeAPI api;
+
+    @PostConstruct
+    private void init() {
+        this.client = (WdtTwoClient) WdtTwoClient.get(
+                configUtil.getErpConfig().getErpWdSid(),
+                configUtil.getSysConfig().getErpWdBaseUrl(),
+                configUtil.getErpConfig().getErpWdAppKey(),
+                configUtil.getErpConfig().getErpWdAppsecret()
+        );
+        this.api = ApiFactory.get(client, WdtTradeAPI.class);
+        log.info("旺店通ERP客户端初始化成功");
+    }
+}

+ 39 - 35
fs-service/src/main/java/com/fs/erp/service/impl/WdtTwoErpGoodsServiceImpl.java

@@ -10,34 +10,24 @@ import com.fs.erp.dto.sdk.wangdian.enums.PaymentStatus;
 import com.fs.erp.dto.sdk.wangdian.enums.RefundStatus;
 import com.fs.erp.dto.sdk.wangdian.enums.TradeStatus;
 import com.fs.erp.dto.sdk.wangdianTwo.Pager;
+import com.fs.erp.dto.sdk.wangdianTwo.WdtErpException;
 import com.fs.erp.dto.sdk.wangdianTwo.api.WdtTradeAPI;
 import com.fs.erp.dto.sdk.wangdianTwo.api.dto.*;
-import com.fs.erp.dto.sdk.wangdianTwo.impl.ApiFactory;
-import com.fs.erp.dto.sdk.wangdianTwo.impl.WdtTwoClient;
+
 import com.fs.erp.service.IErpGoodsService;
 import com.fs.his.config.FsSysConfig;
-import com.fs.his.domain.FsUser;
 import com.fs.his.mapper.FsUserMapper;
-import com.fs.his.utils.ConfigUtil;
-import com.fs.hisStore.config.FsErpConfig;
-import com.fs.hisStore.domain.FsStoreOrderScrm;
-import com.fs.hisStore.domain.FsStoreProductScrm;
+
 import com.fs.hisStore.service.IFsStoreOrderItemScrmService;
 import com.fs.hisStore.service.IFsStoreOrderScrmService;
 import com.fs.hisStore.service.IFsStoreProductScrmService;
-import com.fs.hisStore.vo.FsStoreOrderItemVO;
-import com.hc.openapi.tool.util.StringUtils;
 import lombok.extern.slf4j.Slf4j;
-import org.apache.commons.collections4.CollectionUtils;
-import org.apache.http.client.utils.DateUtils;
 import org.apache.http.util.Asserts;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.context.annotation.Primary;
 import org.springframework.stereotype.Service;
 
-import javax.annotation.PostConstruct;
-import java.math.BigDecimal;
-import java.math.RoundingMode;
+
 import java.util.*;
 
 /**
@@ -50,10 +40,8 @@ import java.util.*;
 @Slf4j
 @Service
 @Primary
-public class WdtTwoErpGoodsServiceImpl implements IErpGoodsService {
+public class WdtTwoErpGoodsServiceImpl extends BaseWdtTwoErpService implements IErpGoodsService {
 
-    @Autowired
-    ConfigUtil configUtil;
 
     @Autowired
     private IFsStoreOrderScrmService fsStoreOrderScrmService;
@@ -68,24 +56,6 @@ public class WdtTwoErpGoodsServiceImpl implements IErpGoodsService {
     private FsUserMapper fsUserMapper;
 
 
-
-    // 延迟初始化这些字段
-    private WdtTwoClient client;
-    private WdtTradeAPI api;
-
-    @PostConstruct
-    private void init() {
-        // 在 Spring 容器完成依赖注入后初始化
-        this.client = (WdtTwoClient)WdtTwoClient.get(
-                configUtil.getErpConfig().getErpWdSid(),
-                configUtil.getSysConfig().getErpWdBaseUrl(),
-                configUtil.getErpConfig().getErpWdAppKey(),
-                configUtil.getErpConfig().getErpWdAppsecret()
-        );
-        this.api = ApiFactory.get(client, WdtTradeAPI.class);
-    }
-
-
     @Override
     public BaseResponse addGoods(ErpGoods goods) {
         return null;
@@ -154,6 +124,40 @@ public class WdtTwoErpGoodsServiceImpl implements IErpGoodsService {
 
     }
 
+    @Override
+    public  ErpGoodsStockQueryResponse searchVirtualWarehouseStock(ErpGoodsStockQueryRequert param)
+    {
+        VirtualWarehouseStockSearchRequest request = new VirtualWarehouseStockSearchRequest();
+        request.setVirtualWarehouseNo(param.getVirtualWarehouseNo());
+        request.setSpecNos(param.getBarcode());
+
+
+        VirtualWarehouseStockSearchResponse response = api.searchVirtualWarehouseStock(request, new Pager(1, 0, true));
+        if (response.getTotal() <= 0) {
+            log.info("获取erp库存失败! 商品编码{}", param.getBarcode());
+            throw new RuntimeException("该商品erp系统不存在");
+        }
+
+        List<VirtualWarehouseStockSearchResponse.Detail> detailList = response.getDetailList();
+        List<ErpGoodsStock> list = new ArrayList<>();
+        for (VirtualWarehouseStockSearchResponse.Detail stock : detailList) {
+            ErpGoodsStock erpGoodsStock = new ErpGoodsStock();
+            erpGoodsStock.setBarcode(param.getBarcode());
+            erpGoodsStock.setQty(String.valueOf(stock.getAvaliableNum()).split("\\.")[0]); // 公有仓可用数
+            erpGoodsStock.setSalable_qty(String.valueOf(stock.getCanUseNum()).split("\\.")[0]); // 可用数
+
+            list.add(erpGoodsStock);
+        }
+
+        ErpGoodsStockQueryResponse erpGoodsStockQueryResponse = new ErpGoodsStockQueryResponse();
+        erpGoodsStockQueryResponse.setStocks(list);
+        return erpGoodsStockQueryResponse;
+    }
+
+
+
+
+
 
 
 }

+ 65 - 58
fs-service/src/main/java/com/fs/erp/service/impl/WdtTwoErpOrderServiceImpl.java

@@ -1,36 +1,23 @@
 package com.fs.erp.service.impl;
 
-import cn.hutool.core.util.ObjectUtil;
 import com.alibaba.fastjson.JSON;
 import com.alibaba.fastjson.JSONObject;
-import com.alibaba.fastjson.PropertyNamingStrategy;
-import com.alibaba.fastjson.parser.ParserConfig;
-import com.alibaba.fastjson.serializer.SerializeConfig;
 import com.baomidou.mybatisplus.core.toolkit.ObjectUtils;
-import com.fs.common.exception.ServiceException;
-import com.fs.erp.converter.ErpWdtToErpOrderMapper;
-import com.fs.erp.domain.*;
+import com.fs.erp.domain.ErpDeliverys;
+import com.fs.erp.domain.ErpOrder;
+import com.fs.erp.domain.ErpOrderQuery;
+import com.fs.erp.domain.ErpRefundOrder;
 import com.fs.erp.dto.*;
-import com.fs.erp.dto.sdk.wangdian.api.WdtClient;
-import com.fs.erp.dto.sdk.wangdian.enums.*;
+import com.fs.erp.dto.sdk.wangdian.enums.DeliveryTerm;
+import com.fs.erp.dto.sdk.wangdian.enums.PaymentStatus;
+import com.fs.erp.dto.sdk.wangdian.enums.RefundStatus;
+import com.fs.erp.dto.sdk.wangdian.enums.TradeStatus;
 import com.fs.erp.dto.sdk.wangdianTwo.Pager;
-import com.fs.erp.dto.sdk.wangdianTwo.api.WdtTradeAPI;
 import com.fs.erp.dto.sdk.wangdianTwo.api.dto.*;
-import com.fs.erp.dto.sdk.wangdianTwo.impl.ApiFactory;
-import com.fs.erp.dto.sdk.wangdianTwo.impl.WdtTwoClient;
-import com.fs.erp.dto.wdt.*;
 import com.fs.erp.service.IErpOrderService;
-import com.fs.his.config.FsSysConfig;
 import com.fs.his.domain.FsStoreOrder;
-import com.fs.his.domain.FsStoreOrderItem;
-import com.fs.his.domain.FsStoreProduct;
 import com.fs.his.domain.FsUser;
-import com.fs.his.mapper.FsStoreOrderMapper;
 import com.fs.his.mapper.FsUserMapper;
-import com.fs.his.service.IFsStoreOrderItemService;
-import com.fs.his.service.IFsStoreOrderService;
-import com.fs.his.service.IFsStoreProductService;
-import com.fs.his.utils.ConfigUtil;
 import com.fs.hisStore.config.FsErpConfig;
 import com.fs.hisStore.domain.FsStoreOrderScrm;
 import com.fs.hisStore.domain.FsStoreProductScrm;
@@ -47,22 +34,15 @@ import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.context.annotation.Primary;
 import org.springframework.stereotype.Service;
 
-import javax.annotation.PostConstruct;
-import java.io.IOException;
 import java.math.BigDecimal;
 import java.math.RoundingMode;
-import java.time.Instant;
-import java.time.LocalDateTime;
-import java.time.format.DateTimeFormatter;
 import java.util.*;
 
 @Slf4j
 @Service
 @Primary
-public class WdtTwoErpOrderServiceImpl implements IErpOrderService {
+public class WdtTwoErpOrderServiceImpl extends BaseWdtTwoErpService implements IErpOrderService {
 
-    @Autowired
-    ConfigUtil configUtil;
 
     @Autowired
     private IFsStoreOrderScrmService fsStoreOrderScrmService;
@@ -77,24 +57,6 @@ public class WdtTwoErpOrderServiceImpl implements IErpOrderService {
     private FsUserMapper fsUserMapper;
 
 
-
-    // 延迟初始化这些字段
-    private WdtTwoClient client;
-    private WdtTradeAPI api;
-
-    @PostConstruct
-    private void init() {
-        // 在 Spring 容器完成依赖注入后初始化
-        this.client = (WdtTwoClient)WdtTwoClient.get(
-                configUtil.getErpConfig().getErpWdSid(),
-                configUtil.getSysConfig().getErpWdBaseUrl(),
-                configUtil.getErpConfig().getErpWdAppKey(),
-                configUtil.getErpConfig().getErpWdAppsecret()
-        );
-        this.api = ApiFactory.get(client, WdtTradeAPI.class);
-    }
-
-
     @Override
     public ErpOrderResponse addOrder(ErpOrder order) {
         return null;
@@ -315,7 +277,7 @@ public class WdtTwoErpOrderServiceImpl implements IErpOrderService {
 
         // 优惠券 目前不添加
         PushSelf2Response response = api.pushSelf2(request.getShopNo(), request.getRawTrades(), request.getRawTradeOrders(), request.getDiscountInfos());
-        if (response.getChgCount() <= 0 && response.getNewCount()<=0) {
+        if (response.getChgCount() <= 0 && response.getNewCount() <= 0) {
             log.info("订单推送失败: [{}]", response.getErrorList().get(0).getError());
             throw new RuntimeException(String.format("订单推送失败, 原因: %s", response.getErrorList().get(0).getError()));
         } else {
@@ -330,8 +292,6 @@ public class WdtTwoErpOrderServiceImpl implements IErpOrderService {
     }
 
 
-
-
     @Override
     public ErpOrderResponse refundOrder(ErpRefundOrder order) {
         return null;
@@ -354,7 +314,7 @@ public class WdtTwoErpOrderServiceImpl implements IErpOrderService {
     }
 
     @Override
-    public ErpOrderQueryResponse getOrder(ErpOrderQueryRequert param){
+    public ErpOrderQueryResponse getOrder(ErpOrderQueryRequert param) {
         QuerySelfOrderDetailRequest request = new QuerySelfOrderDetailRequest();
         request.setSrcTid(param.getCode());
         QuerySelfOrderDetailResponse response = api.querySelfOrderWithDetail(request, new Pager(1, 0, true));
@@ -449,7 +409,7 @@ public class WdtTwoErpOrderServiceImpl implements IErpOrderService {
             erpOrderQuery.setPayment(order.getPaid().doubleValue());
         }
 
-        if(order.getConsignTime() != null){
+        if (order.getConsignTime() != null) {
             erpOrderQuery.setConsignTime(new Date(Long.parseLong(order.getConsignTime())));
         }
 
@@ -581,8 +541,8 @@ public class WdtTwoErpOrderServiceImpl implements IErpOrderService {
         request.setOrderList(orders);
 
 
-        RawRefundUpload2Response response = api.rawRefundUpload(request.getShopNo(),request.getOrderList());
-        if (response.getChgCount() <= 0 && response.getNewCount()<=0) {
+        RawRefundUpload2Response response = api.rawRefundUpload(request.getShopNo(), request.getOrderList());
+        if (response.getChgCount() <= 0 && response.getNewCount() <= 0) {
             log.info("退款单更新失败: {}", response);
             throw new RuntimeException(String.format("退款单更新失败, 原因: %s", response.getErrorList().get(0).getError()));
 
@@ -594,12 +554,12 @@ public class WdtTwoErpOrderServiceImpl implements IErpOrderService {
 
 
     @Override
-    public BaseResponse refundUpdate(ErpRefundUpdateRequest param){
+    public BaseResponse refundUpdate(ErpRefundUpdateRequest param) {
         return null;
     }
 
     @Override
-    public ErpOrderResponse finishOrder(ErpOrder order){
+    public ErpOrderResponse finishOrder(ErpOrder order) {
         return null;
     }
 
@@ -826,7 +786,7 @@ public class WdtTwoErpOrderServiceImpl implements IErpOrderService {
 
         // 优惠券 目前不添加
         PushSelf2Response response = api.pushSelf2(request.getShopNo(), request.getRawTrades(), request.getRawTradeOrders(), request.getDiscountInfos());
-        if (response.getChgCount() <= 0 && response.getNewCount()<=0) {
+        if (response.getChgCount() <= 0 && response.getNewCount() <= 0) {
             log.info("未发货退款单更新失败: {}", response);
             throw new RuntimeException(String.format("退款单更新失败, 原因: %s", response.getErrorList().get(0).getError()));
         } else {
@@ -841,8 +801,55 @@ public class WdtTwoErpOrderServiceImpl implements IErpOrderService {
     }
 
     @Override
-    public Map<String,Object>  stockOutOrderQueryTrade(ErpOrderQueryRequert param){
+    public Map<String, Object> stockOutOrderQueryTrade(ErpOrderQueryRequert param) {
         return null;
     }
 
+
+    @Override
+    public ErpRefundOrderQueryResponse search(ErpRefundOrderQueryRequest param) {
+        RefundSearchRequest request = new RefundSearchRequest();
+        request.setTid(param.getOrderCode());// 原始单号
+
+        RefundSearchResponse response = api.search(request, new Pager(20, 0, true));
+        if (response.getTotal() <= 0) {
+            log.info("订单信息不存在 订单号{}", param.getOrderCode());
+            throw new RuntimeException("订单信息不存在");
+        }
+
+        List<ErpRefundOrderDTO> list = new ArrayList<>();
+
+        List<RefundSearchResponse.RefundOrderDto> orders = response.getOrders();
+        for (RefundSearchResponse.RefundOrderDto orderDto : orders) {
+            ErpRefundOrderDTO orderDTO = new ErpRefundOrderDTO();
+            orderDTO.setOrderCode(orderDto.getTidList());
+            orderDTO.setRefundNo(orderDto.getRefundNo());
+            list.add(orderDTO);
+        }
+
+        ErpRefundOrderQueryResponse refundOrderQueryResponse = new ErpRefundOrderQueryResponse();
+        refundOrderQueryResponse.setRefundOrders(list);
+
+        return refundOrderQueryResponse;
+    }
+
+    @Override
+    public CreateStockInRefundOrderResponse pushRefundStockInOrder(CreateStockInRefundOrderRequest request) {
+        log.info("推送退货入库单到ERP,请求参数:{}", JSON.toJSONString(request));
+
+        try {
+            CreateStockInRefundOrderResponse response = api.createStockInRefundOrder(request);
+
+            if (response.getStatus() == 0) {
+                log.info("退货入库单推送成功,入库单号:{}", response.getData());
+            } else {
+                log.error("退货入库单推送失败,错误信息:{}", response.getMessage());
+            }
+
+            return response;
+        } catch (Exception e) {
+            log.error("退货入库单推送异常", e);
+            throw new RuntimeException("退货入库单推送异常: " + e.getMessage(), e);
+        }
+    }
 }

+ 153 - 0
fs-service/src/main/java/com/fs/hisStore/domain/FsStoreRefundPushRecordScrm.java

@@ -0,0 +1,153 @@
+package com.fs.hisStore.domain;
+
+import com.baomidou.mybatisplus.annotation.*;
+import com.fasterxml.jackson.annotation.JsonFormat;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import lombok.experimental.Accessors;
+
+import java.io.Serializable;
+import java.util.Date;
+
+/**
+ * 退货入库单推送记录对象 fs_store_refund_push_record_scrm
+ *
+ * @author fs
+ * @date 2026-04-17
+ */
+@Data
+@EqualsAndHashCode(callSuper = false)
+@Accessors(chain = true)
+@TableName("fs_store_refund_push_record_scrm")
+public class FsStoreRefundPushRecordScrm implements Serializable {
+
+    private static final long serialVersionUID = 1L;
+
+    /**
+     * 主键ID
+     */
+    @TableId(value = "id", type = IdType.AUTO)
+    private Long id;
+
+    /**
+     * 订单ID
+     */
+    private Long orderId;
+
+    /**
+     * 订单号
+     */
+    private String orderCode;
+
+    /**
+     * 退换单号
+     */
+    private String refundNo;
+
+    /**
+     * 外部入库单号
+     */
+    private String outStockinNo;
+
+    /**
+     * 仓库编号
+     */
+    private String warehouseNo;
+
+    /**
+     * 物流公司编号
+     */
+    private String logisticsCode;
+
+    /**
+     * 物流单号
+     */
+    private String logisticsNo;
+
+    /**
+     * 备注
+     */
+    private String remark;
+
+    /**
+     * 创建模式:0-编辑中,1-已提交,2-已审核
+     */
+    private Integer createMode;
+
+    /**
+     * 是否创建批次:0-否,1-是
+     */
+    private Integer isCreateBatch;
+
+    /**
+     * 单据明细JSON
+     */
+    private String detailList;
+
+    /**
+     * 推送状态:0-待推送,1-推送中,2-推送成功,3-推送失败
+     */
+    private Integer pushStatus;
+
+    /**
+     * 推送结果信息
+     */
+    private String pushResult;
+
+    /**
+     * 返回的入库单号
+     */
+    private String stockinNo;
+
+    /**
+     * 错误信息
+     */
+    private String errorMessage;
+
+    /**
+     * 重试次数
+     */
+    private Integer retryCount;
+
+    /**
+     * 公司ID
+     */
+    private Long companyId;
+
+    /**
+     * 部门ID
+     */
+    private Long deptId;
+
+    /**
+     * 创建者
+     */
+    @TableField(fill = FieldFill.INSERT)
+    private String createBy;
+
+    /**
+     * 创建时间
+     */
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+    @TableField(fill = FieldFill.INSERT)
+    private Date createTime;
+
+    /**
+     * 更新者
+     */
+    @TableField(fill = FieldFill.INSERT_UPDATE)
+    private String updateBy;
+
+    /**
+     * 更新时间
+     */
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+    @TableField(fill = FieldFill.INSERT_UPDATE)
+    private Date updateTime;
+
+    /**
+     * 删除标志(0代表存在 2代表删除)
+     */
+    @TableLogic
+    private String delFlag;
+}

+ 24 - 0
fs-service/src/main/java/com/fs/hisStore/mapper/FsStoreRefundPushRecordScrmMapper.java

@@ -0,0 +1,24 @@
+package com.fs.hisStore.mapper;
+
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.fs.hisStore.domain.FsStoreRefundPushRecordScrm;
+import org.apache.ibatis.annotations.Param;
+
+import java.util.List;
+
+/**
+ * 退货入库单推送记录Mapper接口
+ *
+ * @author fs
+ * @date 2026-04-17
+ */
+public interface FsStoreRefundPushRecordScrmMapper extends BaseMapper<FsStoreRefundPushRecordScrm> {
+
+    /**
+     * 查询退货入库单推送记录列表
+     *
+     * @param record 退货入库单推送记录
+     * @return 退货入库单推送记录集合
+     */
+    List<FsStoreRefundPushRecordScrm> selectFsStoreRefundPushRecordList(FsStoreRefundPushRecordScrm record);
+}

+ 79 - 0
fs-service/src/main/java/com/fs/hisStore/param/StoreRefundPushParam.java

@@ -0,0 +1,79 @@
+package com.fs.hisStore.param;
+
+import com.fs.erp.dto.sdk.wangdianTwo.api.dto.CreateStockInRefundOrderRequest;
+import lombok.Data;
+
+import javax.validation.constraints.NotBlank;
+import javax.validation.constraints.NotNull;
+import java.io.Serializable;
+import java.util.List;
+
+/**
+ * 退货入库单推送参数
+ *
+ * @author fs
+ * @date 2026-04-17
+ */
+@Data
+public class StoreRefundPushParam implements Serializable {
+
+    private static final long serialVersionUID = 1L;
+
+    /**
+     * 订单ID
+     */
+    private Long orderId;
+
+    /**
+     * 订单号
+     */
+    private String orderCode;
+
+    /**
+     * 退换单号
+     */
+    @NotBlank(message = "退换单号不能为空")
+    private String refundNo;
+
+    /**
+     * 外部入库单号
+     */
+    private String outStockinNo;
+
+    /**
+     * 仓库编号
+     */
+    @NotBlank(message = "仓库编号不能为空")
+    private String warehouseNo;
+
+    /**
+     * 物流公司编号
+     */
+    private String logisticsCode;
+
+    /**
+     * 物流单号
+     */
+    private String logisticsNo;
+
+    /**
+     * 备注
+     */
+    private String remark;
+
+    /**
+     * 创建模式:0-编辑中,1-已提交,2-已审核
+     */
+    private Integer createMode;
+
+    /**
+     * 是否创建批次:0-否,1-是
+     */
+    private Integer isCreateBatch;
+
+    /**
+     * 单据明细
+     */
+    @NotNull(message = "单据明细不能为空")
+    private List<CreateStockInRefundOrderRequest.DetailItem> detailList;
+}

+ 48 - 0
fs-service/src/main/java/com/fs/hisStore/service/IFsStoreRefundPushRecordScrmService.java

@@ -0,0 +1,48 @@
+package com.fs.hisStore.service;
+
+import com.baomidou.mybatisplus.extension.service.IService;
+import com.fs.hisStore.domain.FsStoreRefundPushRecordScrm;
+import com.fs.hisStore.param.StoreRefundPushParam;
+
+import java.util.List;
+
+/**
+ * 退货入库单推送记录Service接口
+ *
+ * @author fs
+ * @date 2026-04-17
+ */
+public interface IFsStoreRefundPushRecordScrmService extends IService<FsStoreRefundPushRecordScrm> {
+
+    /**
+     * 查询退货入库单推送记录列表
+     *
+     * @param record 退货入库单推送记录
+     * @return 退货入库单推送记录集合
+     */
+    List<FsStoreRefundPushRecordScrm> selectFsStoreRefundPushRecordList(FsStoreRefundPushRecordScrm record);
+
+    /**
+     * 推送退货入库单到ERP
+     *
+     * @param param 推送参数
+     * @return 结果
+     */
+    boolean pushRefundOrder(StoreRefundPushParam param);
+
+    /**
+     * 重新推送
+     *
+     * @param id 记录ID
+     * @return 结果
+     */
+    boolean rePush(Long id);
+
+    /**
+     * 批量推送
+     *
+     * @param ids ID列表
+     * @return 结果
+     */
+    boolean batchPush(List<Long> ids);
+}

+ 183 - 0
fs-service/src/main/java/com/fs/hisStore/service/impl/FsStoreRefundPushRecordScrmServiceImpl.java

@@ -0,0 +1,183 @@
+package com.fs.hisStore.service.impl;
+
+import com.alibaba.fastjson.JSON;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import com.fs.erp.dto.sdk.wangdianTwo.api.dto.CreateStockInRefundOrderRequest;
+import com.fs.erp.dto.sdk.wangdianTwo.api.dto.CreateStockInRefundOrderResponse;
+import com.fs.erp.service.IErpOrderService;
+import com.fs.erp.service.impl.WdtTwoErpOrderServiceImpl;
+import com.fs.hisStore.domain.FsStoreRefundPushRecordScrm;
+import com.fs.hisStore.mapper.FsStoreRefundPushRecordScrmMapper;
+import com.fs.hisStore.param.StoreRefundPushParam;
+import com.fs.hisStore.service.IFsStoreRefundPushRecordScrmService;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+import org.springframework.transaction.annotation.Transactional;
+
+import java.util.Date;
+import java.util.List;
+
+@Slf4j
+@Service
+public class FsStoreRefundPushRecordScrmServiceImpl extends ServiceImpl<FsStoreRefundPushRecordScrmMapper, FsStoreRefundPushRecordScrm> implements IFsStoreRefundPushRecordScrmService {
+
+    @Autowired
+    private WdtTwoErpOrderServiceImpl erpOrderService;
+
+    @Override
+    public List<FsStoreRefundPushRecordScrm> selectFsStoreRefundPushRecordList(FsStoreRefundPushRecordScrm record) {
+        return baseMapper.selectFsStoreRefundPushRecordList(record);
+    }
+
+    @Override
+    @Transactional(rollbackFor = Exception.class)
+    public boolean pushRefundOrder(StoreRefundPushParam param) {
+        FsStoreRefundPushRecordScrm record = new FsStoreRefundPushRecordScrm();
+        record.setOrderId(param.getOrderId());
+        record.setOrderCode(param.getOrderCode());
+        record.setRefundNo(param.getRefundNo());
+        record.setOutStockinNo(param.getOutStockinNo());
+        record.setWarehouseNo(param.getWarehouseNo());
+        record.setLogisticsCode(param.getLogisticsCode());
+        record.setLogisticsNo(param.getLogisticsNo());
+        record.setRemark(param.getRemark());
+        record.setCreateMode(param.getCreateMode() != null ? param.getCreateMode() : 0);
+        record.setIsCreateBatch(param.getIsCreateBatch() != null ? param.getIsCreateBatch() : 0);
+        record.setDetailList(JSON.toJSONString(param.getDetailList()));
+        record.setPushStatus(1);
+        record.setRetryCount(0);
+        record.setCreateTime(new Date());
+
+        try {
+            this.save(record);
+
+            CreateStockInRefundOrderRequest request = buildErpRequest(param);
+
+            CreateStockInRefundOrderResponse response = erpOrderService.pushRefundStockInOrder(request);
+
+            if (response.getStatus() == 0) {
+                record.setPushStatus(2);
+                record.setPushResult("推送成功");
+                record.setStockinNo(response.getData());
+                record.setErrorMessage(null);
+                log.info("退货入库单推送成功,订单号:{},入库单号:{}", param.getOrderCode(), response.getData());
+            } else {
+                record.setPushStatus(3);
+                record.setPushResult("推送失败");
+                record.setErrorMessage(response.getMessage());
+                log.error("退货入库单推送失败,订单号:{},错误信息:{}", param.getOrderCode(), response.getMessage());
+            }
+
+            record.setUpdateTime(new Date());
+            this.updateById(record);
+
+            return response.getStatus() == 0;
+
+        } catch (Exception e) {
+            log.error("退货入库单推送异常,订单号:{}", param.getOrderCode(), e);
+            record.setPushStatus(3);
+            record.setPushResult("推送异常");
+            record.setErrorMessage(e.getMessage());
+            record.setUpdateTime(new Date());
+            this.updateById(record);
+            return false;
+        }
+    }
+
+    @Override
+    @Transactional(rollbackFor = Exception.class)
+    public boolean rePush(Long id) {
+        FsStoreRefundPushRecordScrm record = this.getById(id);
+        if (record == null) {
+            log.error("推送记录不存在,ID:{}", id);
+            return false;
+        }
+
+        try {
+            record.setPushStatus(1);
+            record.setRetryCount(record.getRetryCount() + 1);
+            record.setUpdateTime(new Date());
+            this.updateById(record);
+
+            List<CreateStockInRefundOrderRequest.DetailItem> detailList =
+                    JSON.parseArray(record.getDetailList(), CreateStockInRefundOrderRequest.DetailItem.class);
+
+            StoreRefundPushParam param = new StoreRefundPushParam();
+            param.setOrderId(record.getOrderId());
+            param.setOrderCode(record.getOrderCode());
+            param.setRefundNo(record.getRefundNo());
+            param.setOutStockinNo(record.getOutStockinNo());
+            param.setWarehouseNo(record.getWarehouseNo());
+            param.setLogisticsCode(record.getLogisticsCode());
+            param.setLogisticsNo(record.getLogisticsNo());
+            param.setRemark(record.getRemark());
+            param.setCreateMode(record.getCreateMode());
+            param.setIsCreateBatch(record.getIsCreateBatch());
+            param.setDetailList(detailList);
+
+            CreateStockInRefundOrderRequest request = buildErpRequest(param);
+            CreateStockInRefundOrderResponse response = erpOrderService.pushRefundStockInOrder(request);
+
+            if (response.getStatus() == 0) {
+                record.setPushStatus(2);
+                record.setPushResult("重新推送成功");
+                record.setStockinNo(response.getData());
+                record.setErrorMessage(null);
+                log.info("退货入库单重新推送成功,ID:{},入库单号:{}", id, response.getData());
+            } else {
+                record.setPushStatus(3);
+                record.setPushResult("重新推送失败");
+                record.setErrorMessage(response.getMessage());
+                log.error("退货入库单重新推送失败,ID:{},错误信息:{}", id, response.getMessage());
+            }
+
+            record.setUpdateTime(new Date());
+            this.updateById(record);
+
+            return response.getStatus() == 0;
+
+        } catch (Exception e) {
+            log.error("退货入库单重新推送异常,ID:{}", id, e);
+            record.setPushStatus(3);
+            record.setPushResult("重新推送异常");
+            record.setErrorMessage(e.getMessage());
+            record.setUpdateTime(new Date());
+            this.updateById(record);
+            return false;
+        }
+    }
+
+    @Override
+    @Transactional(rollbackFor = Exception.class)
+    public boolean batchPush(List<Long> ids) {
+        if (ids == null || ids.isEmpty()) {
+            return false;
+        }
+
+        boolean allSuccess = true;
+        for (Long id : ids) {
+            boolean success = rePush(id);
+            if (!success) {
+                allSuccess = false;
+            }
+        }
+
+        return allSuccess;
+    }
+
+    private CreateStockInRefundOrderRequest buildErpRequest(StoreRefundPushParam param) {
+        CreateStockInRefundOrderRequest request = new CreateStockInRefundOrderRequest();
+        request.setRefundNo(param.getRefundNo());
+        request.setOutStockinNo(param.getOutStockinNo());
+        request.setWarehouseNo(param.getWarehouseNo());
+        request.setLogisticsCode(param.getLogisticsCode());
+        request.setLogisticsNo(param.getLogisticsNo());
+        request.setRemark(param.getRemark());
+        request.setCreateMode(param.getCreateMode());
+        request.setIsCreateBatch(param.getIsCreateBatch() == 1);
+        request.setDetailList(param.getDetailList());
+        return request;
+    }
+}
+

+ 63 - 0
fs-service/src/main/resources/mapper/hisStore/FsStoreRefundPushRecordScrmMapper.xml

@@ -0,0 +1,63 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE mapper
+        PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
+        "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.fs.hisStore.mapper.FsStoreRefundPushRecordScrmMapper">
+
+    <resultMap type="com.fs.hisStore.domain.FsStoreRefundPushRecordScrm" id="FsStoreRefundPushRecordScrmResult">
+        <result property="id"    column="id"    />
+        <result property="orderId"    column="order_id"    />
+        <result property="orderCode"    column="order_code"    />
+        <result property="refundNo"    column="refund_no"    />
+        <result property="outStockinNo"    column="out_stockin_no"    />
+        <result property="warehouseNo"    column="warehouse_no"    />
+        <result property="logisticsCode"    column="logistics_code"    />
+        <result property="logisticsNo"    column="logistics_no"    />
+        <result property="remark"    column="remark"    />
+        <result property="createMode"    column="create_mode"    />
+        <result property="isCreateBatch"    column="is_create_batch"    />
+        <result property="detailList"    column="detail_list"    />
+        <result property="pushStatus"    column="push_status"    />
+        <result property="pushResult"    column="push_result"    />
+        <result property="stockinNo"    column="stockin_no"    />
+        <result property="errorMessage"    column="error_message"    />
+        <result property="retryCount"    column="retry_count"    />
+        <result property="companyId"    column="company_id"    />
+        <result property="deptId"    column="dept_id"    />
+        <result property="createBy"    column="create_by"    />
+        <result property="createTime"    column="create_time"    />
+        <result property="updateBy"    column="update_by"    />
+        <result property="updateTime"    column="update_time"    />
+        <result property="delFlag"    column="del_flag"    />
+    </resultMap>
+
+    <sql id="selectFsStoreRefundPushRecordVo">
+        select id, order_id, order_code, refund_no, out_stockin_no, warehouse_no,
+               logistics_code, logistics_no, remark, create_mode, is_create_batch,
+               detail_list, push_status, push_result, stockin_no, error_message,
+               retry_count, company_id, dept_id, create_by, create_time,
+               update_by, update_time, del_flag
+        from fs_store_refund_push_record_scrm
+    </sql>
+
+    <select id="selectFsStoreRefundPushRecordList" parameterType="com.fs.hisStore.domain.FsStoreRefundPushRecordScrm" resultMap="FsStoreRefundPushRecordScrmResult">
+        <include refid="selectFsStoreRefundPushRecordVo"/>
+        <where>
+            <if test="orderId != null "> and order_id = #{orderId}</if>
+            <if test="orderCode != null  and orderCode != ''"> and order_code like concat('%', #{orderCode}, '%')</if>
+            <if test="refundNo != null  and refundNo != ''"> and refund_no like concat('%', #{refundNo}, '%')</if>
+            <if test="outStockinNo != null  and outStockinNo != ''"> and out_stockin_no like concat('%', #{outStockinNo}, '%')</if>
+            <if test="pushStatus != null "> and push_status = #{pushStatus}</if>
+            <if test="companyId != null "> and company_id = #{companyId}</if>
+            <if test="deptId != null "> and dept_id = #{deptId}</if>
+            <if test="params.beginTime != null and params.beginTime != ''">
+                and date_format(create_time,'%Y%m%d') &gt;= date_format(#{params.beginTime},'%Y%m%d')
+            </if>
+            <if test="params.endTime != null and params.endTime != ''">
+                and date_format(create_time,'%Y%m%d') &lt;= date_format(#{params.endTime},'%Y%m%d')
+            </if>
+        </where>
+        order by create_time desc
+    </select>
+
+</mapper>