Browse Source

已采购维多利亚代码修正

yzc 2 years ago
parent
commit
89ba7958e9
72 changed files with 1231 additions and 1658 deletions
  1. 8 0
      hx-purchase/src/main/java/com/fjhx/purchase/controller/arrival/ArrivalController.java
  2. 8 4
      hx-purchase/src/main/java/com/fjhx/purchase/entity/arrival/po/Arrival.java
  3. 5 0
      hx-purchase/src/main/java/com/fjhx/purchase/entity/purchase/vo/PurchaseDetailVo.java
  4. 0 7
      hx-purchase/src/main/java/com/fjhx/purchase/flow/SalesReturnFlow.java
  5. 0 8
      hx-purchase/src/main/java/com/fjhx/purchase/service/WdlySalesReturnService.java
  6. 5 0
      hx-purchase/src/main/java/com/fjhx/purchase/service/arrival/ArrivalService.java
  7. 74 13
      hx-purchase/src/main/java/com/fjhx/purchase/service/arrival/impl/ArrivalServiceImpl.java
  8. 82 0
      hx-victoriatourist/src/main/java/com/fjhx/victoriatourist/controller/deliver/DeliverGoodsController.java
  9. 71 0
      hx-victoriatourist/src/main/java/com/fjhx/victoriatourist/controller/deliver/DeliverGoodsDetailsController.java
  10. 0 68
      hx-victoriatourist/src/main/java/com/fjhx/victoriatourist/controller/logistics/LogisticsDetailsController.java
  11. 0 68
      hx-victoriatourist/src/main/java/com/fjhx/victoriatourist/controller/logistics/LogisticsInfoController.java
  12. 0 68
      hx-victoriatourist/src/main/java/com/fjhx/victoriatourist/controller/order/OrderDetailsController.java
  13. 0 68
      hx-victoriatourist/src/main/java/com/fjhx/victoriatourist/controller/order/OrderInfoController.java
  14. 17 0
      hx-victoriatourist/src/main/java/com/fjhx/victoriatourist/entity/deliver/dto/DeliverGoodsDetailsDto.java
  15. 17 0
      hx-victoriatourist/src/main/java/com/fjhx/victoriatourist/entity/deliver/dto/DeliverGoodsDetailsSelectDto.java
  16. 24 0
      hx-victoriatourist/src/main/java/com/fjhx/victoriatourist/entity/deliver/dto/DeliverGoodsDto.java
  17. 3 3
      hx-victoriatourist/src/main/java/com/fjhx/victoriatourist/entity/deliver/dto/DeliverGoodsSelectDto.java
  18. 42 0
      hx-victoriatourist/src/main/java/com/fjhx/victoriatourist/entity/deliver/po/DeliverGoods.java
  19. 37 0
      hx-victoriatourist/src/main/java/com/fjhx/victoriatourist/entity/deliver/po/DeliverGoodsDetails.java
  20. 49 0
      hx-victoriatourist/src/main/java/com/fjhx/victoriatourist/entity/deliver/vo/DeliverGoodsDetailsVo.java
  21. 17 0
      hx-victoriatourist/src/main/java/com/fjhx/victoriatourist/entity/deliver/vo/DeliverGoodsVo.java
  22. 0 17
      hx-victoriatourist/src/main/java/com/fjhx/victoriatourist/entity/logistics/dto/LogisticsDetailsDto.java
  23. 0 17
      hx-victoriatourist/src/main/java/com/fjhx/victoriatourist/entity/logistics/dto/LogisticsDetailsSelectDto.java
  24. 0 22
      hx-victoriatourist/src/main/java/com/fjhx/victoriatourist/entity/logistics/dto/LogisticsInfoDto.java
  25. 0 17
      hx-victoriatourist/src/main/java/com/fjhx/victoriatourist/entity/logistics/dto/LogisticsInfoSelectDto.java
  26. 0 63
      hx-victoriatourist/src/main/java/com/fjhx/victoriatourist/entity/logistics/po/LogisticsDetails.java
  27. 0 72
      hx-victoriatourist/src/main/java/com/fjhx/victoriatourist/entity/logistics/po/LogisticsInfo.java
  28. 0 17
      hx-victoriatourist/src/main/java/com/fjhx/victoriatourist/entity/logistics/vo/LogisticsDetailsVo.java
  29. 0 17
      hx-victoriatourist/src/main/java/com/fjhx/victoriatourist/entity/logistics/vo/LogisticsInfoVo.java
  30. 0 17
      hx-victoriatourist/src/main/java/com/fjhx/victoriatourist/entity/order/dto/OrderDetailsDto.java
  31. 0 17
      hx-victoriatourist/src/main/java/com/fjhx/victoriatourist/entity/order/dto/OrderInfoDto.java
  32. 0 68
      hx-victoriatourist/src/main/java/com/fjhx/victoriatourist/entity/order/po/OrderDetails.java
  33. 0 118
      hx-victoriatourist/src/main/java/com/fjhx/victoriatourist/entity/order/po/OrderInfo.java
  34. 0 17
      hx-victoriatourist/src/main/java/com/fjhx/victoriatourist/entity/order/vo/OrderDetailsVo.java
  35. 0 17
      hx-victoriatourist/src/main/java/com/fjhx/victoriatourist/entity/order/vo/OrderInfoVo.java
  36. 26 0
      hx-victoriatourist/src/main/java/com/fjhx/victoriatourist/mapper/deliver/DeliverGoodsDetailsMapper.java
  37. 31 0
      hx-victoriatourist/src/main/java/com/fjhx/victoriatourist/mapper/deliver/DeliverGoodsMapper.java
  38. 0 26
      hx-victoriatourist/src/main/java/com/fjhx/victoriatourist/mapper/logistics/LogisticsDetailsMapper.java
  39. 0 32
      hx-victoriatourist/src/main/java/com/fjhx/victoriatourist/mapper/logistics/MyLogisticsInfoMapper.java
  40. 0 26
      hx-victoriatourist/src/main/java/com/fjhx/victoriatourist/mapper/order/OrderDetailsMapper.java
  41. 0 26
      hx-victoriatourist/src/main/java/com/fjhx/victoriatourist/mapper/order/OrderInfoMapper.java
  42. 0 70
      hx-victoriatourist/src/main/java/com/fjhx/victoriatourist/service/WdlySalesReturnServiceImpl.java
  43. 49 0
      hx-victoriatourist/src/main/java/com/fjhx/victoriatourist/service/deliver/DeliverGoodsDetailsService.java
  44. 56 0
      hx-victoriatourist/src/main/java/com/fjhx/victoriatourist/service/deliver/DeliverGoodsService.java
  45. 91 0
      hx-victoriatourist/src/main/java/com/fjhx/victoriatourist/service/deliver/impl/DeliverGoodsDetailsServiceImpl.java
  46. 123 0
      hx-victoriatourist/src/main/java/com/fjhx/victoriatourist/service/deliver/impl/DeliverGoodsServiceImpl.java
  47. 0 46
      hx-victoriatourist/src/main/java/com/fjhx/victoriatourist/service/logistics/LogisticsDetailsService.java
  48. 0 46
      hx-victoriatourist/src/main/java/com/fjhx/victoriatourist/service/logistics/MyLogisticsInfoService.java
  49. 0 57
      hx-victoriatourist/src/main/java/com/fjhx/victoriatourist/service/logistics/impl/LogisticsDetailsServiceImpl.java
  50. 0 179
      hx-victoriatourist/src/main/java/com/fjhx/victoriatourist/service/logistics/impl/MyLogisticsInfoServiceImpl.java
  51. 0 46
      hx-victoriatourist/src/main/java/com/fjhx/victoriatourist/service/order/OrderDetailsService.java
  52. 0 46
      hx-victoriatourist/src/main/java/com/fjhx/victoriatourist/service/order/OrderInfoService.java
  53. 0 57
      hx-victoriatourist/src/main/java/com/fjhx/victoriatourist/service/order/impl/OrderDetailsServiceImpl.java
  54. 0 57
      hx-victoriatourist/src/main/java/com/fjhx/victoriatourist/service/order/impl/OrderInfoServiceImpl.java
  55. 17 0
      hx-victoriatourist/src/main/resources/mapper/deliver/DeliverGoodsDetailsMapper.xml
  56. 27 0
      hx-victoriatourist/src/main/resources/mapper/deliver/DeliverGoodsMapper.xml
  57. 0 22
      hx-victoriatourist/src/main/resources/mapper/logistics/LogisticsDetailsMapper.xml
  58. 0 39
      hx-victoriatourist/src/main/resources/mapper/logistics/MyLogisticsInfoMapper.xml
  59. 0 23
      hx-victoriatourist/src/main/resources/mapper/order/OrderDetailsMapper.xml
  60. 0 34
      hx-victoriatourist/src/main/resources/mapper/order/OrderInfoMapper.xml
  61. 68 0
      hx-wms/src/main/java/com/fjhx/wms/controller/stock/StockWaitDetailsController.java
  62. 17 0
      hx-wms/src/main/java/com/fjhx/wms/entity/stock/dto/StockWaitDetailsDto.java
  63. 3 3
      hx-wms/src/main/java/com/fjhx/wms/entity/stock/dto/StockWaitDetailsSelectDto.java
  64. 11 2
      hx-wms/src/main/java/com/fjhx/wms/entity/stock/po/StockWait.java
  65. 52 0
      hx-wms/src/main/java/com/fjhx/wms/entity/stock/po/StockWaitDetails.java
  66. 17 0
      hx-wms/src/main/java/com/fjhx/wms/entity/stock/vo/StockWaitDetailsVo.java
  67. 8 0
      hx-wms/src/main/java/com/fjhx/wms/entity/stock/vo/StockWaitVo.java
  68. 26 0
      hx-wms/src/main/java/com/fjhx/wms/mapper/stock/StockWaitDetailsMapper.java
  69. 46 0
      hx-wms/src/main/java/com/fjhx/wms/service/stock/StockWaitDetailsService.java
  70. 57 0
      hx-wms/src/main/java/com/fjhx/wms/service/stock/impl/StockWaitDetailsServiceImpl.java
  71. 27 18
      hx-wms/src/main/java/com/fjhx/wms/service/stock/impl/StockWaitServiceImpl.java
  72. 20 0
      hx-wms/src/main/resources/mapper/stock/StockWaitDetailsMapper.xml

+ 8 - 0
hx-purchase/src/main/java/com/fjhx/purchase/controller/arrival/ArrivalController.java

@@ -54,6 +54,14 @@ public class ArrivalController {
     }
 
     /**
+     * 到货新增 维多利亚
+     */
+    @PostMapping("/addBywdly")
+    public void addByWdly(@RequestBody Arrival arrival) {
+        arrivalService.addByWdly(arrival);
+    }
+
+    /**
      * 到货编辑
      */
     @PostMapping("/edit")

+ 8 - 4
hx-purchase/src/main/java/com/fjhx/purchase/entity/arrival/po/Arrival.java

@@ -3,18 +3,17 @@ package com.fjhx.purchase.entity.arrival.po;
 import com.baomidou.mybatisplus.annotation.TableField;
 import com.baomidou.mybatisplus.annotation.TableName;
 import com.ruoyi.common.core.domain.BasePo;
-import java.util.Date;
-import java.util.List;
-
 import lombok.Getter;
 import lombok.Setter;
 
+import java.util.List;
+
 /**
  * <p>
  * 到货
  * </p>
  *
- * @author 
+ * @author
  * @since 2023-04-07
  */
 @Getter
@@ -53,4 +52,9 @@ public class Arrival extends BasePo {
      */
     @TableField(exist = false)
     private Integer arrivalStatus;
+
+    /**
+     * 维多利亚扩展
+     */
+    private String victoriatouristJson;
 }

+ 5 - 0
hx-purchase/src/main/java/com/fjhx/purchase/entity/purchase/vo/PurchaseDetailVo.java

@@ -25,4 +25,9 @@ public class PurchaseDetailVo extends PurchaseDetail {
      */
     private BigDecimal noQualifiedCount;
 
+    /**
+     * 发货数量
+     */
+    private BigDecimal deliverGoodsQuantity;
+
 }

+ 0 - 7
hx-purchase/src/main/java/com/fjhx/purchase/flow/SalesReturnFlow.java

@@ -14,7 +14,6 @@ import com.fjhx.purchase.entity.sales.po.SalesReturn;
 import com.fjhx.purchase.entity.sales.po.SalesReturnDetail;
 import com.fjhx.purchase.service.sales.SalesReturnDetailService;
 import com.fjhx.purchase.service.sales.SalesReturnService;
-import com.fjhx.purchase.service.WdlySalesReturnService;
 import com.fjhx.purchase.util.code.CodeEnum;
 import com.fjhx.wms.entity.stock.po.StockWait;
 import com.fjhx.wms.service.stock.StockWaitService;
@@ -62,8 +61,6 @@ public class SalesReturnFlow extends FlowDelegate {
             }
             salesReturnDetailService.saveBatch(salesReturnDetailList);
         }
-        //调用维多利亚扩展
-        startByWdly(salesReturn);
         return salesReturn.getId();
     }
 
@@ -110,8 +107,4 @@ public class SalesReturnFlow extends FlowDelegate {
         stockWaitService.saveBatch(stockWaitList);
     }
 
-    public void startByWdly(SalesReturn salesReturn) {
-        WdlySalesReturnService wdly = SpringUtil.getBean(WdlySalesReturnService.class);
-        wdly.startByWdly(salesReturn);
-    }
 }

+ 0 - 8
hx-purchase/src/main/java/com/fjhx/purchase/service/WdlySalesReturnService.java

@@ -1,8 +0,0 @@
-package com.fjhx.purchase.service;
-
-import com.fjhx.purchase.entity.sales.po.SalesReturn;
-
-public interface WdlySalesReturnService {
-
-    void startByWdly(SalesReturn salesReturn);
-}

+ 5 - 0
hx-purchase/src/main/java/com/fjhx/purchase/service/arrival/ArrivalService.java

@@ -34,6 +34,11 @@ public interface ArrivalService extends BaseService<Arrival> {
     void add(Arrival arrival);
 
     /**
+     * 到货新增 维多利亚
+     */
+    void addByWdly(Arrival arrival);
+
+    /**
      * 到货编辑
      */
     void edit(ArrivalDto arrivalDto);

+ 74 - 13
hx-purchase/src/main/java/com/fjhx/purchase/service/arrival/impl/ArrivalServiceImpl.java

@@ -1,33 +1,33 @@
 package com.fjhx.purchase.service.arrival.impl;
 
+import cn.hutool.core.bean.BeanUtil;
+import cn.hutool.core.util.ObjectUtil;
 import com.baomidou.dynamic.datasource.annotation.DS;
 import com.baomidou.mybatisplus.core.toolkit.CollectionUtils;
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
 import com.fjhx.common.constant.SourceConstant;
+import com.fjhx.purchase.entity.arrival.dto.ArrivalDto;
+import com.fjhx.purchase.entity.arrival.dto.ArrivalSelectDto;
 import com.fjhx.purchase.entity.arrival.po.Arrival;
 import com.fjhx.purchase.entity.arrival.po.ArrivalDetail;
+import com.fjhx.purchase.entity.arrival.vo.ArrivalVo;
 import com.fjhx.purchase.entity.purchase.po.Purchase;
-import com.fjhx.purchase.entity.purchase.po.PurchaseDetail;
 import com.fjhx.purchase.mapper.arrival.ArrivalMapper;
 import com.fjhx.purchase.service.arrival.ArrivalDetailService;
 import com.fjhx.purchase.service.arrival.ArrivalService;
-import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
 import com.fjhx.purchase.service.purchase.PurchaseDetailService;
 import com.fjhx.purchase.service.purchase.PurchaseService;
 import com.fjhx.purchase.util.code.CodeEnum;
 import com.fjhx.wms.entity.stock.po.StockWait;
+import com.fjhx.wms.entity.stock.po.StockWaitDetails;
+import com.fjhx.wms.service.stock.StockWaitDetailsService;
 import com.fjhx.wms.service.stock.StockWaitService;
+import com.ruoyi.common.utils.wrapper.IWrapper;
 import io.seata.spring.annotation.GlobalTransactional;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
-import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
-import com.fjhx.purchase.entity.arrival.vo.ArrivalVo;
-import com.fjhx.purchase.entity.arrival.dto.ArrivalSelectDto;
-import com.ruoyi.common.utils.wrapper.IWrapper;
-import com.fjhx.purchase.entity.arrival.dto.ArrivalDto;
-import cn.hutool.core.bean.BeanUtil;
-import org.springframework.transaction.annotation.Transactional;
 
-import java.math.BigDecimal;
 import java.util.ArrayList;
 import java.util.List;
 
@@ -37,7 +37,7 @@ import java.util.List;
  * 到货 服务实现类
  * </p>
  *
- * @author 
+ * @author
  * @since 2023-04-07
  */
 @DS(SourceConstant.PURCHASE)
@@ -55,6 +55,8 @@ public class ArrivalServiceImpl extends ServiceImpl<ArrivalMapper, Arrival> impl
 
     @Autowired
     private PurchaseService purchaseService;
+    @Autowired
+    private StockWaitDetailsService stockWaitDetailsService;
 
 
     @Override
@@ -74,6 +76,7 @@ public class ArrivalServiceImpl extends ServiceImpl<ArrivalMapper, Arrival> impl
 
     /**
      * 添加
+     *
      * @param arrival
      */
     @GlobalTransactional
@@ -88,9 +91,9 @@ public class ArrivalServiceImpl extends ServiceImpl<ArrivalMapper, Arrival> impl
         purchaseService.updateById(purchase);
         //取出到货明细
         List<ArrivalDetail> arrivalDetailList = arrival.getArrivalDetailList();
-        if(CollectionUtils.isNotEmpty(arrivalDetailList)){
+        if (CollectionUtils.isNotEmpty(arrivalDetailList)) {
             List<StockWait> stockWaitList = new ArrayList<>();
-            for(ArrivalDetail d:arrivalDetailList){
+            for (ArrivalDetail d : arrivalDetailList) {
                 //todo 这一块是做了采购到货状态修改。前端已经完成
                 //查询采购明细
 //                PurchaseDetail purchaseDetail = purchaseDetailService.getById(d.getPurchaseDetailId());
@@ -113,6 +116,64 @@ public class ArrivalServiceImpl extends ServiceImpl<ArrivalMapper, Arrival> impl
             }
             arrivalDetailService.saveBatch(arrivalDetailList);
             stockWaitService.saveBatch(stockWaitList);
+            //维多利亚扩展修改
+            if (ObjectUtil.isNotEmpty(arrival.getVictoriatouristJson())) {
+                //创建待入库记录、
+                for (ArrivalDetail d : arrivalDetailList) {
+                    d.setArrivalId(arrival.getId());
+                    StockWait stockWait = new StockWait();
+                    stockWait.setProductId(d.getBussinessId());
+                    stockWait.setBusinessId(d.getId());//到货明细ID
+                    stockWait.setType(1);//入库
+                    stockWait.setStatus(0);//待入库
+                    stockWait.setBusinessType(3);//采购到货
+                    stockWait.setQuantity(d.getCount());
+                    stockWaitList.add(stockWait);
+                }
+            }
+        }
+    }
+
+    /**
+     * 维多利亚到货
+     */
+    @GlobalTransactional
+    @Override
+    public void addByWdly(Arrival arrival) {
+        arrival.setCode(CodeEnum.ARRIVAL.getCode());
+        this.save(arrival);
+        //修改采购状态
+        Purchase purchase = new Purchase();
+        purchase.setArrivalStatus(arrival.getArrivalStatus());
+        purchase.setId(arrival.getPurchaseId());
+        purchaseService.updateById(purchase);
+        //创建待入库记录
+        String victoriatouristJson = arrival.getVictoriatouristJson();
+//        JSONObject json = JSONObject.parseObject(victoriatouristJson);
+        StockWait stockWait = new StockWait();
+        stockWait.setType(1);//入库
+        stockWait.setStatus(0);//待入库
+        stockWait.setBusinessType(3);//采购到货
+        //将业务id设置成到货id
+        stockWait.setBusinessId(arrival.getId());
+        stockWait.setVictoriatouristJson(victoriatouristJson);
+        stockWaitService.save(stockWait);
+        //取出到货明细
+        List<ArrivalDetail> arrivalDetailList = arrival.getArrivalDetailList();
+        if (CollectionUtils.isNotEmpty(arrivalDetailList)) {
+            List<StockWaitDetails> stockWaitDetailsList = new ArrayList<>();
+            for (ArrivalDetail d : arrivalDetailList) {
+                d.setArrivalId(arrival.getId());
+                StockWaitDetails stockWaitDetails = new StockWaitDetails();
+                stockWaitDetails.setStockWaitId(stockWait.getId());
+                //业务明细id设置成到货明细id
+                stockWaitDetails.setBusinessDetailsId(d.getId());
+                stockWaitDetails.setProductId(d.getBussinessId());
+                stockWaitDetails.setQuantity(d.getCount());
+                stockWaitDetailsList.add(stockWaitDetails);
+            }
+            arrivalDetailService.saveBatch(arrivalDetailList);
+            stockWaitDetailsService.saveBatch(stockWaitDetailsList);
         }
     }
 

+ 82 - 0
hx-victoriatourist/src/main/java/com/fjhx/victoriatourist/controller/deliver/DeliverGoodsController.java

@@ -0,0 +1,82 @@
+package com.fjhx.victoriatourist.controller.deliver;
+
+import com.fjhx.victoriatourist.entity.deliver.po.DeliverGoods;
+import com.fjhx.victoriatourist.entity.deliver.vo.DeliverGoodsDetailsVo;
+import org.springframework.web.bind.annotation.*;
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import com.fjhx.victoriatourist.entity.deliver.vo.DeliverGoodsVo;
+import com.fjhx.victoriatourist.entity.deliver.dto.DeliverGoodsSelectDto;
+import com.fjhx.victoriatourist.entity.deliver.dto.DeliverGoodsDto;
+import com.ruoyi.common.core.domain.BaseSelectDto;
+import com.fjhx.victoriatourist.service.deliver.DeliverGoodsService;
+import org.springframework.beans.factory.annotation.Autowired;
+
+import java.util.List;
+
+
+/**
+ * <p>
+ * 发货 前端控制器
+ * </p>
+ *
+ * @author 
+ * @since 2023-04-13
+ */
+@RestController
+@RequestMapping("/deliverGoods")
+public class DeliverGoodsController {
+
+    @Autowired
+    private DeliverGoodsService deliverGoodsService;
+
+    /**
+     * 发货分页
+     */
+    @PostMapping("/page")
+    public Page<DeliverGoodsVo> page(@RequestBody DeliverGoodsSelectDto dto) {
+        return deliverGoodsService.getPage(dto);
+    }
+
+    /**
+     * 发货明细
+     */
+    @PostMapping("/detail")
+    public List<DeliverGoodsDetailsVo> detail(@RequestBody BaseSelectDto dto) {
+        return deliverGoodsService.detail(dto.getId());
+    }
+
+    /**
+     * 发货新增
+     */
+    @PostMapping("/add")
+    public void add(@RequestBody DeliverGoodsDto deliverGoodsDto) {
+        deliverGoodsService.add(deliverGoodsDto);
+    }
+
+    /**
+     * 发货编辑
+     */
+    @PostMapping("/edit")
+    public void edit(@RequestBody DeliverGoodsDto deliverGoodsDto) {
+        deliverGoodsService.edit(deliverGoodsDto);
+    }
+
+    /**
+     * 发货删除
+     */
+    @PostMapping("/delete")
+    public void delete(@RequestBody BaseSelectDto dto) {
+        deliverGoodsService.delete(dto.getId());
+    }
+
+    /**
+     * 发货列表
+     *
+     * @return
+     */
+    @PostMapping("/list")
+    public List<DeliverGoods> list(@RequestBody BaseSelectDto dto) {
+        return deliverGoodsService.list(dto.getId());
+    }
+
+}

+ 71 - 0
hx-victoriatourist/src/main/java/com/fjhx/victoriatourist/controller/deliver/DeliverGoodsDetailsController.java

@@ -0,0 +1,71 @@
+package com.fjhx.victoriatourist.controller.deliver;
+
+import com.fjhx.purchase.entity.purchase.vo.PurchaseDetailVo;
+import org.springframework.web.bind.annotation.*;
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import com.fjhx.victoriatourist.entity.deliver.vo.DeliverGoodsDetailsVo;
+import com.fjhx.victoriatourist.entity.deliver.dto.DeliverGoodsDetailsSelectDto;
+import com.fjhx.victoriatourist.entity.deliver.dto.DeliverGoodsDetailsDto;
+import com.ruoyi.common.core.domain.BaseSelectDto;
+import com.fjhx.victoriatourist.service.deliver.DeliverGoodsDetailsService;
+import org.springframework.beans.factory.annotation.Autowired;
+
+import java.util.List;
+
+
+/**
+ * <p>
+ * 发货明细 前端控制器
+ * </p>
+ *
+ * @author 
+ * @since 2023-04-13
+ */
+@RestController
+@RequestMapping("/deliverGoodsDetails")
+public class DeliverGoodsDetailsController {
+
+    @Autowired
+    private DeliverGoodsDetailsService deliverGoodsDetailsService;
+
+    /**
+     * 发货明细分页
+     */
+    @PostMapping("/page")
+    public Page<DeliverGoodsDetailsVo> page(@RequestBody DeliverGoodsDetailsSelectDto dto) {
+        return deliverGoodsDetailsService.getPage(dto);
+    }
+
+    /**
+     * 发货明细明细
+     */
+    @PostMapping("/detail")
+    public List<PurchaseDetailVo> detail(@RequestBody BaseSelectDto dto) {
+        return deliverGoodsDetailsService.detail(dto.getId());
+    }
+
+    /**
+     * 发货明细新增
+     */
+    @PostMapping("/add")
+    public void add(@RequestBody DeliverGoodsDetailsDto deliverGoodsDetailsDto) {
+        deliverGoodsDetailsService.add(deliverGoodsDetailsDto);
+    }
+
+    /**
+     * 发货明细编辑
+     */
+    @PostMapping("/edit")
+    public void edit(@RequestBody DeliverGoodsDetailsDto deliverGoodsDetailsDto) {
+        deliverGoodsDetailsService.edit(deliverGoodsDetailsDto);
+    }
+
+    /**
+     * 发货明细删除
+     */
+    @PostMapping("/delete")
+    public void delete(@RequestBody BaseSelectDto dto) {
+        deliverGoodsDetailsService.delete(dto.getId());
+    }
+
+}

+ 0 - 68
hx-victoriatourist/src/main/java/com/fjhx/victoriatourist/controller/logistics/LogisticsDetailsController.java

@@ -1,68 +0,0 @@
-package com.fjhx.victoriatourist.controller.logistics;
-
-import org.springframework.web.bind.annotation.*;
-import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
-import com.fjhx.victoriatourist.entity.logistics.vo.LogisticsDetailsVo;
-import com.fjhx.victoriatourist.entity.logistics.dto.LogisticsDetailsSelectDto;
-import com.fjhx.victoriatourist.entity.logistics.dto.LogisticsDetailsDto;
-import com.ruoyi.common.core.domain.BaseSelectDto;
-import com.fjhx.victoriatourist.service.logistics.LogisticsDetailsService;
-import org.springframework.beans.factory.annotation.Autowired;
-
-
-/**
- * <p>
- * 物流明细 前端控制器
- * </p>
- *
- * @author 
- * @since 2023-04-12
- */
-@RestController
-@RequestMapping("/logisticsDetails")
-public class LogisticsDetailsController {
-
-    @Autowired
-    private LogisticsDetailsService logisticsDetailsService;
-
-    /**
-     * 物流明细分页
-     */
-    @PostMapping("/page")
-    public Page<LogisticsDetailsVo> page(@RequestBody LogisticsDetailsSelectDto dto) {
-        return logisticsDetailsService.getPage(dto);
-    }
-
-    /**
-     * 物流明细明细
-     */
-    @PostMapping("/detail")
-    public LogisticsDetailsVo detail(@RequestBody BaseSelectDto dto) {
-        return logisticsDetailsService.detail(dto.getId());
-    }
-
-    /**
-     * 物流明细新增
-     */
-    @PostMapping("/add")
-    public void add(@RequestBody LogisticsDetailsDto logisticsDetailsDto) {
-        logisticsDetailsService.add(logisticsDetailsDto);
-    }
-
-    /**
-     * 物流明细编辑
-     */
-    @PostMapping("/edit")
-    public void edit(@RequestBody LogisticsDetailsDto logisticsDetailsDto) {
-        logisticsDetailsService.edit(logisticsDetailsDto);
-    }
-
-    /**
-     * 物流明细删除
-     */
-    @PostMapping("/delete")
-    public void delete(@RequestBody BaseSelectDto dto) {
-        logisticsDetailsService.delete(dto.getId());
-    }
-
-}

+ 0 - 68
hx-victoriatourist/src/main/java/com/fjhx/victoriatourist/controller/logistics/LogisticsInfoController.java

@@ -1,68 +0,0 @@
-package com.fjhx.victoriatourist.controller.logistics;
-
-import org.springframework.web.bind.annotation.*;
-import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
-import com.fjhx.victoriatourist.entity.logistics.vo.LogisticsInfoVo;
-import com.fjhx.victoriatourist.entity.logistics.dto.LogisticsInfoSelectDto;
-import com.fjhx.victoriatourist.entity.logistics.dto.LogisticsInfoDto;
-import com.ruoyi.common.core.domain.BaseSelectDto;
-import com.fjhx.victoriatourist.service.logistics.MyLogisticsInfoService;
-import org.springframework.beans.factory.annotation.Autowired;
-
-
-/**
- * <p>
- * 物流信息 前端控制器
- * </p>
- *
- * @author 
- * @since 2023-04-12
- */
-@RestController
-@RequestMapping("/logisticsInfo")
-public class LogisticsInfoController {
-
-    @Autowired
-    private MyLogisticsInfoService logisticsInfoService;
-
-    /**
-     * 物流信息分页
-     */
-    @PostMapping("/page")
-    public Page<LogisticsInfoVo> page(@RequestBody LogisticsInfoSelectDto dto) {
-        return logisticsInfoService.getPage(dto);
-    }
-
-    /**
-     * 物流信息明细
-     */
-    @PostMapping("/detail")
-    public LogisticsInfoVo detail(@RequestBody BaseSelectDto dto) {
-        return logisticsInfoService.detail(dto.getId());
-    }
-
-    /**
-     * 物流信息新增
-     */
-    @PostMapping("/add")
-    public void add(@RequestBody LogisticsInfoDto logisticsInfoDto) {
-        logisticsInfoService.add(logisticsInfoDto);
-    }
-
-    /**
-     * 物流信息编辑
-     */
-    @PostMapping("/edit")
-    public void edit(@RequestBody LogisticsInfoDto logisticsInfoDto) {
-        logisticsInfoService.edit(logisticsInfoDto);
-    }
-
-    /**
-     * 物流信息删除
-     */
-    @PostMapping("/delete")
-    public void delete(@RequestBody BaseSelectDto dto) {
-        logisticsInfoService.delete(dto.getId());
-    }
-
-}

+ 0 - 68
hx-victoriatourist/src/main/java/com/fjhx/victoriatourist/controller/order/OrderDetailsController.java

@@ -1,68 +0,0 @@
-package com.fjhx.victoriatourist.controller.order;
-
-import org.springframework.web.bind.annotation.*;
-import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
-import com.fjhx.victoriatourist.entity.order.vo.OrderDetailsVo;
-import com.fjhx.victoriatourist.entity.order.dto.OrderDetailsSelectDto;
-import com.fjhx.victoriatourist.entity.order.dto.OrderDetailsDto;
-import com.ruoyi.common.core.domain.BaseSelectDto;
-import com.fjhx.victoriatourist.service.order.OrderDetailsService;
-import org.springframework.beans.factory.annotation.Autowired;
-
-
-/**
- * <p>
- * 订单明细 前端控制器
- * </p>
- *
- * @author 
- * @since 2023-04-13
- */
-@RestController
-@RequestMapping("/orderDetails")
-public class OrderDetailsController {
-
-    @Autowired
-    private OrderDetailsService orderDetailsService;
-
-    /**
-     * 订单明细分页
-     */
-    @PostMapping("/page")
-    public Page<OrderDetailsVo> page(@RequestBody OrderDetailsSelectDto dto) {
-        return orderDetailsService.getPage(dto);
-    }
-
-    /**
-     * 订单明细明细
-     */
-    @PostMapping("/detail")
-    public OrderDetailsVo detail(@RequestBody BaseSelectDto dto) {
-        return orderDetailsService.detail(dto.getId());
-    }
-
-    /**
-     * 订单明细新增
-     */
-    @PostMapping("/add")
-    public void add(@RequestBody OrderDetailsDto orderDetailsDto) {
-        orderDetailsService.add(orderDetailsDto);
-    }
-
-    /**
-     * 订单明细编辑
-     */
-    @PostMapping("/edit")
-    public void edit(@RequestBody OrderDetailsDto orderDetailsDto) {
-        orderDetailsService.edit(orderDetailsDto);
-    }
-
-    /**
-     * 订单明细删除
-     */
-    @PostMapping("/delete")
-    public void delete(@RequestBody BaseSelectDto dto) {
-        orderDetailsService.delete(dto.getId());
-    }
-
-}

+ 0 - 68
hx-victoriatourist/src/main/java/com/fjhx/victoriatourist/controller/order/OrderInfoController.java

@@ -1,68 +0,0 @@
-package com.fjhx.victoriatourist.controller.order;
-
-import org.springframework.web.bind.annotation.*;
-import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
-import com.fjhx.victoriatourist.entity.order.vo.OrderInfoVo;
-import com.fjhx.victoriatourist.entity.order.dto.OrderInfoSelectDto;
-import com.fjhx.victoriatourist.entity.order.dto.OrderInfoDto;
-import com.ruoyi.common.core.domain.BaseSelectDto;
-import com.fjhx.victoriatourist.service.order.OrderInfoService;
-import org.springframework.beans.factory.annotation.Autowired;
-
-
-/**
- * <p>
- * 订单 前端控制器
- * </p>
- *
- * @author 
- * @since 2023-04-13
- */
-@RestController
-@RequestMapping("/orderInfo")
-public class OrderInfoController {
-
-    @Autowired
-    private OrderInfoService orderInfoService;
-
-    /**
-     * 订单分页
-     */
-    @PostMapping("/page")
-    public Page<OrderInfoVo> page(@RequestBody OrderInfoSelectDto dto) {
-        return orderInfoService.getPage(dto);
-    }
-
-    /**
-     * 订单明细
-     */
-    @PostMapping("/detail")
-    public OrderInfoVo detail(@RequestBody BaseSelectDto dto) {
-        return orderInfoService.detail(dto.getId());
-    }
-
-    /**
-     * 订单新增
-     */
-    @PostMapping("/add")
-    public void add(@RequestBody OrderInfoDto orderInfoDto) {
-        orderInfoService.add(orderInfoDto);
-    }
-
-    /**
-     * 订单编辑
-     */
-    @PostMapping("/edit")
-    public void edit(@RequestBody OrderInfoDto orderInfoDto) {
-        orderInfoService.edit(orderInfoDto);
-    }
-
-    /**
-     * 订单删除
-     */
-    @PostMapping("/delete")
-    public void delete(@RequestBody BaseSelectDto dto) {
-        orderInfoService.delete(dto.getId());
-    }
-
-}

+ 17 - 0
hx-victoriatourist/src/main/java/com/fjhx/victoriatourist/entity/deliver/dto/DeliverGoodsDetailsDto.java

@@ -0,0 +1,17 @@
+package com.fjhx.victoriatourist.entity.deliver.dto;
+
+import com.fjhx.victoriatourist.entity.deliver.po.DeliverGoodsDetails;
+import lombok.Getter;
+import lombok.Setter;
+
+/**
+ * 发货明细新增编辑入参实体
+ *
+ * @author 
+ * @since 2023-04-13
+ */
+@Getter
+@Setter
+public class DeliverGoodsDetailsDto extends DeliverGoodsDetails {
+
+}

+ 17 - 0
hx-victoriatourist/src/main/java/com/fjhx/victoriatourist/entity/deliver/dto/DeliverGoodsDetailsSelectDto.java

@@ -0,0 +1,17 @@
+package com.fjhx.victoriatourist.entity.deliver.dto;
+
+import com.ruoyi.common.core.domain.BaseSelectDto;
+import lombok.Getter;
+import lombok.Setter;
+
+/**
+ * 发货明细列表查询入参实体
+ *
+ * @author 
+ * @since 2023-04-13
+ */
+@Getter
+@Setter
+public class DeliverGoodsDetailsSelectDto extends BaseSelectDto {
+
+}

+ 24 - 0
hx-victoriatourist/src/main/java/com/fjhx/victoriatourist/entity/deliver/dto/DeliverGoodsDto.java

@@ -0,0 +1,24 @@
+package com.fjhx.victoriatourist.entity.deliver.dto;
+
+import com.fjhx.victoriatourist.entity.deliver.po.DeliverGoods;
+import com.fjhx.victoriatourist.entity.deliver.po.DeliverGoodsDetails;
+import lombok.Getter;
+import lombok.Setter;
+
+import java.util.List;
+
+/**
+ * 发货新增编辑入参实体
+ *
+ * @author
+ * @since 2023-04-13
+ */
+@Getter
+@Setter
+public class DeliverGoodsDto extends DeliverGoods {
+
+    /**
+     * 发货明细列表
+     */
+    private List<DeliverGoodsDetails> deliverGoodsDetailsList;
+}

+ 3 - 3
hx-victoriatourist/src/main/java/com/fjhx/victoriatourist/entity/order/dto/OrderInfoSelectDto.java → hx-victoriatourist/src/main/java/com/fjhx/victoriatourist/entity/deliver/dto/DeliverGoodsSelectDto.java

@@ -1,17 +1,17 @@
-package com.fjhx.victoriatourist.entity.order.dto;
+package com.fjhx.victoriatourist.entity.deliver.dto;
 
 import com.ruoyi.common.core.domain.BaseSelectDto;
 import lombok.Getter;
 import lombok.Setter;
 
 /**
- * 订单列表查询入参实体
+ * 发货列表查询入参实体
  *
  * @author 
  * @since 2023-04-13
  */
 @Getter
 @Setter
-public class OrderInfoSelectDto extends BaseSelectDto {
+public class DeliverGoodsSelectDto extends BaseSelectDto {
 
 }

+ 42 - 0
hx-victoriatourist/src/main/java/com/fjhx/victoriatourist/entity/deliver/po/DeliverGoods.java

@@ -0,0 +1,42 @@
+package com.fjhx.victoriatourist.entity.deliver.po;
+
+import com.ruoyi.common.core.domain.BasePo;
+import com.baomidou.mybatisplus.annotation.TableName;
+import java.util.Date;
+import lombok.Getter;
+import lombok.Setter;
+
+/**
+ * <p>
+ * 发货
+ * </p>
+ *
+ * @author 
+ * @since 2023-04-13
+ */
+@Getter
+@Setter
+@TableName("deliver_goods")
+public class DeliverGoods extends BasePo {
+
+    /**
+     * 物流公司编号
+     */
+    private String logisticsCompanyCode;
+
+    /**
+     * 物流单号
+     */
+    private String code;
+
+    /**
+     * 采购单号
+     */
+    private Long purchaseId;
+
+    /**
+     * 状态 0未到货 1到货
+     */
+    private Integer status;
+
+}

+ 37 - 0
hx-victoriatourist/src/main/java/com/fjhx/victoriatourist/entity/deliver/po/DeliverGoodsDetails.java

@@ -0,0 +1,37 @@
+package com.fjhx.victoriatourist.entity.deliver.po;
+
+import com.baomidou.mybatisplus.annotation.TableName;
+import com.ruoyi.common.core.domain.BasePo;
+import lombok.Getter;
+import lombok.Setter;
+
+import java.math.BigDecimal;
+
+/**
+ * <p>
+ * 发货明细
+ * </p>
+ *
+ * @author
+ * @since 2023-04-13
+ */
+@Getter
+@Setter
+@TableName("deliver_goods_details")
+public class DeliverGoodsDetails extends BasePo {
+    /**
+     * 发货id
+     */
+    private Long deliverGoodsId;
+
+    /**
+     * 采购单明细id
+     */
+    private Long purchaseDetailId;
+
+    /**
+     * 发货数量
+     */
+    private BigDecimal deliverGoodsQuantity;
+
+}

+ 49 - 0
hx-victoriatourist/src/main/java/com/fjhx/victoriatourist/entity/deliver/vo/DeliverGoodsDetailsVo.java

@@ -0,0 +1,49 @@
+package com.fjhx.victoriatourist.entity.deliver.vo;
+
+import com.fjhx.victoriatourist.entity.deliver.po.DeliverGoodsDetails;
+import lombok.Getter;
+import lombok.Setter;
+
+import java.math.BigDecimal;
+
+/**
+ * 发货明细列表查询返回值实体
+ *
+ * @author
+ * @since 2023-04-13
+ */
+@Getter
+@Setter
+public class DeliverGoodsDetailsVo extends DeliverGoodsDetails {
+
+    /**
+     * 产品类型
+     */
+    private Integer type;
+    /**
+     * 产品编号
+     */
+    private String code;
+    /**
+     * 产品名称
+     */
+    private String name;
+    /**
+     * 产品规格
+     */
+    private String spec;
+    /**
+     * 产品单位
+     */
+    private String unit;
+    /**
+     * 采购数量
+     */
+    private BigDecimal count;
+
+    /**
+     * 在途数量
+     */
+    private BigDecimal transitQuantity;
+
+}

+ 17 - 0
hx-victoriatourist/src/main/java/com/fjhx/victoriatourist/entity/deliver/vo/DeliverGoodsVo.java

@@ -0,0 +1,17 @@
+package com.fjhx.victoriatourist.entity.deliver.vo;
+
+import com.fjhx.victoriatourist.entity.deliver.po.DeliverGoods;
+import lombok.Getter;
+import lombok.Setter;
+
+/**
+ * 发货列表查询返回值实体
+ *
+ * @author 
+ * @since 2023-04-13
+ */
+@Getter
+@Setter
+public class DeliverGoodsVo extends DeliverGoods {
+
+}

+ 0 - 17
hx-victoriatourist/src/main/java/com/fjhx/victoriatourist/entity/logistics/dto/LogisticsDetailsDto.java

@@ -1,17 +0,0 @@
-package com.fjhx.victoriatourist.entity.logistics.dto;
-
-import com.fjhx.victoriatourist.entity.logistics.po.LogisticsDetails;
-import lombok.Getter;
-import lombok.Setter;
-
-/**
- * 物流明细新增编辑入参实体
- *
- * @author 
- * @since 2023-04-12
- */
-@Getter
-@Setter
-public class LogisticsDetailsDto extends LogisticsDetails {
-
-}

+ 0 - 17
hx-victoriatourist/src/main/java/com/fjhx/victoriatourist/entity/logistics/dto/LogisticsDetailsSelectDto.java

@@ -1,17 +0,0 @@
-package com.fjhx.victoriatourist.entity.logistics.dto;
-
-import com.ruoyi.common.core.domain.BaseSelectDto;
-import lombok.Getter;
-import lombok.Setter;
-
-/**
- * 物流明细列表查询入参实体
- *
- * @author 
- * @since 2023-04-12
- */
-@Getter
-@Setter
-public class LogisticsDetailsSelectDto extends BaseSelectDto {
-
-}

+ 0 - 22
hx-victoriatourist/src/main/java/com/fjhx/victoriatourist/entity/logistics/dto/LogisticsInfoDto.java

@@ -1,22 +0,0 @@
-package com.fjhx.victoriatourist.entity.logistics.dto;
-
-import com.fjhx.victoriatourist.entity.logistics.po.LogisticsDetails;
-import com.fjhx.victoriatourist.entity.logistics.po.LogisticsInfo;
-import lombok.Getter;
-import lombok.Setter;
-
-import java.util.List;
-
-/**
- * 物流信息新增编辑入参实体
- *
- * @author 
- * @since 2023-04-12
- */
-@Getter
-@Setter
-public class LogisticsInfoDto extends LogisticsInfo {
-
-    List<LogisticsDetails> details;
-
-}

+ 0 - 17
hx-victoriatourist/src/main/java/com/fjhx/victoriatourist/entity/logistics/dto/LogisticsInfoSelectDto.java

@@ -1,17 +0,0 @@
-package com.fjhx.victoriatourist.entity.logistics.dto;
-
-import com.ruoyi.common.core.domain.BaseSelectDto;
-import lombok.Getter;
-import lombok.Setter;
-
-/**
- * 物流信息列表查询入参实体
- *
- * @author 
- * @since 2023-04-12
- */
-@Getter
-@Setter
-public class LogisticsInfoSelectDto extends BaseSelectDto {
-
-}

+ 0 - 63
hx-victoriatourist/src/main/java/com/fjhx/victoriatourist/entity/logistics/po/LogisticsDetails.java

@@ -1,63 +0,0 @@
-package com.fjhx.victoriatourist.entity.logistics.po;
-
-import com.baomidou.mybatisplus.annotation.TableName;
-import com.ruoyi.common.core.domain.BasePo;
-import lombok.Getter;
-import lombok.Setter;
-
-import java.math.BigDecimal;
-
-/**
- * <p>
- * 物流明细
- * </p>
- *
- * @author
- * @since 2023-04-12
- */
-@Getter
-@Setter
-@TableName("logistics_details")
-public class LogisticsDetails extends BasePo {
-
-    /**
-     * 物流信息id
-     */
-    private Long logisticsInfoId;
-
-    /**
-     * 物流信息编码
-     */
-    private String logisticsInfoCode;
-
-    /**
-     * 采购单id
-     */
-    private Long purchaseId;
-
-    /**
-     * 申购单id
-     */
-    private Long applyPurchaseId;
-
-    /**
-     * 发货数量
-     */
-    private BigDecimal shipmentQuantity;
-
-    /**
-     * 已入库数量
-     */
-    private BigDecimal receiptQuantity;
-
-    /**
-     * 备注
-     */
-    private String remark;
-
-    /**
-     * 采购明细id
-     */
-    private Long purchaseDetailId;
-
-}

+ 0 - 72
hx-victoriatourist/src/main/java/com/fjhx/victoriatourist/entity/logistics/po/LogisticsInfo.java

@@ -1,72 +0,0 @@
-package com.fjhx.victoriatourist.entity.logistics.po;
-
-import com.ruoyi.common.core.domain.BasePo;
-import com.baomidou.mybatisplus.annotation.TableName;
-import java.util.Date;
-import lombok.Getter;
-import lombok.Setter;
-
-/**
- * <p>
- * 物流信息
- * </p>
- *
- * @author 
- * @since 2023-04-12
- */
-@Getter
-@Setter
-@TableName("logistics_info")
-public class LogisticsInfo extends BasePo {
-
-    /**
-     * 业务id
-     */
-    private Long businessId;
-
-    /**
-     * 业务编码
-     */
-    private String businessCode;
-
-    /**
-     * 业务类型(1采购进货(入库) 2京东订单出货(出库) 3销售订单出货(出库) 4(京东退货))
-     */
-    private Integer businessType;
-
-    /**
-     * 仓库id
-     */
-    private Long warehouseId;
-
-    /**
-     * 采购进货 完成状态:0、未完成 / 未到货;1、已完成 / 已到货
-     */
-    private Integer status;
-
-    /**
-     * 采购进货 入库状态:10、未入库;20、部分入库;30、已入库
-     */
-    private Integer inStockStatus;
-
-    /**
-     * 物流单号
-     */
-    private String code;
-
-    /**
-     * 物流公司编码
-     */
-    private String logisticsCompanyCode;
-
-    /**
-     * 物流状态 -1未查询到快递信息 0在途,1揽收,2疑难,3签收,4退签,5派件,6退回,7转投,8清关,14拒签,15完成
-     */
-    private Integer logisticsStatus;
-
-    /**
-     * 是否是快递100 1是 0不是
-     */
-    private Integer isKd100;
-
-}

+ 0 - 17
hx-victoriatourist/src/main/java/com/fjhx/victoriatourist/entity/logistics/vo/LogisticsDetailsVo.java

@@ -1,17 +0,0 @@
-package com.fjhx.victoriatourist.entity.logistics.vo;
-
-import com.fjhx.victoriatourist.entity.logistics.po.LogisticsDetails;
-import lombok.Getter;
-import lombok.Setter;
-
-/**
- * 物流明细列表查询返回值实体
- *
- * @author 
- * @since 2023-04-12
- */
-@Getter
-@Setter
-public class LogisticsDetailsVo extends LogisticsDetails {
-
-}

+ 0 - 17
hx-victoriatourist/src/main/java/com/fjhx/victoriatourist/entity/logistics/vo/LogisticsInfoVo.java

@@ -1,17 +0,0 @@
-package com.fjhx.victoriatourist.entity.logistics.vo;
-
-import com.fjhx.victoriatourist.entity.logistics.po.LogisticsInfo;
-import lombok.Getter;
-import lombok.Setter;
-
-/**
- * 物流信息列表查询返回值实体
- *
- * @author 
- * @since 2023-04-12
- */
-@Getter
-@Setter
-public class LogisticsInfoVo extends LogisticsInfo {
-
-}

+ 0 - 17
hx-victoriatourist/src/main/java/com/fjhx/victoriatourist/entity/order/dto/OrderDetailsDto.java

@@ -1,17 +0,0 @@
-package com.fjhx.victoriatourist.entity.order.dto;
-
-import com.fjhx.victoriatourist.entity.order.po.OrderDetails;
-import lombok.Getter;
-import lombok.Setter;
-
-/**
- * 订单明细新增编辑入参实体
- *
- * @author 
- * @since 2023-04-13
- */
-@Getter
-@Setter
-public class OrderDetailsDto extends OrderDetails {
-
-}

+ 0 - 17
hx-victoriatourist/src/main/java/com/fjhx/victoriatourist/entity/order/dto/OrderInfoDto.java

@@ -1,17 +0,0 @@
-package com.fjhx.victoriatourist.entity.order.dto;
-
-import com.fjhx.victoriatourist.entity.order.po.OrderInfo;
-import lombok.Getter;
-import lombok.Setter;
-
-/**
- * 订单新增编辑入参实体
- *
- * @author 
- * @since 2023-04-13
- */
-@Getter
-@Setter
-public class OrderInfoDto extends OrderInfo {
-
-}

+ 0 - 68
hx-victoriatourist/src/main/java/com/fjhx/victoriatourist/entity/order/po/OrderDetails.java

@@ -1,68 +0,0 @@
-package com.fjhx.victoriatourist.entity.order.po;
-
-import com.ruoyi.common.core.domain.BasePo;
-import com.baomidou.mybatisplus.annotation.FieldFill;
-import com.baomidou.mybatisplus.annotation.TableField;
-import com.baomidou.mybatisplus.annotation.TableName;
-import com.baomidou.mybatisplus.annotation.Version;
-import java.math.BigDecimal;
-import java.util.Date;
-import lombok.Getter;
-import lombok.Setter;
-
-/**
- * <p>
- * 订单明细
- * </p>
- *
- * @author 
- * @since 2023-04-13
- */
-@Getter
-@Setter
-@TableName("order_details")
-public class OrderDetails extends BasePo {
-
-    /**
-     * 订单id
-     */
-    private Long orderId;
-
-    /**
-     * 产品id
-     */
-    private Long productId;
-
-    /**
-     * 数量
-     */
-    private BigDecimal quantity;
-
-    /**
-     * 单价
-     */
-    private BigDecimal price;
-
-    /**
-     * 未出库数量
-     */
-    private BigDecimal notIssuedQuantity;
-
-    /**
-     * 版本号
-     */
-    @TableField(fill = FieldFill.INSERT)
-    @Version
-    private Integer version;
-
-    /**
-     * 备注
-     */
-    private String remark;
-
-    /**
-     * 预约号
-     */
-    private Long reservationNumber;
-
-}

+ 0 - 118
hx-victoriatourist/src/main/java/com/fjhx/victoriatourist/entity/order/po/OrderInfo.java

@@ -1,118 +0,0 @@
-package com.fjhx.victoriatourist.entity.order.po;
-
-import com.ruoyi.common.core.domain.BasePo;
-import com.baomidou.mybatisplus.annotation.TableName;
-import java.math.BigDecimal;
-import java.util.Date;
-import lombok.Getter;
-import lombok.Setter;
-
-/**
- * <p>
- * 订单
- * </p>
- *
- * @author 
- * @since 2023-04-13
- */
-@Getter
-@Setter
-@TableName("order_info")
-public class OrderInfo extends BasePo {
-
-    /**
-     * 订单类型(1线上 2线下 3京东订单 4补偿 5补发 6线下退换货 7采购退货)
-     */
-    private Integer type;
-
-    /**
-     * 客户id
-     */
-    private Long customerInfoId;
-
-    /**
-     * 编号
-     */
-    private String code;
-
-    /**
-     * 订单金额
-     */
-    private BigDecimal amountMoney;
-
-    /**
-     * 下单时间
-     */
-    private Date orderTime;
-
-    /**
-     * 订单状态 1进行中 2已完成 3已取消
-     */
-    private Integer status;
-
-    /**
-     * 出库状态 1未出库 2进行中 3已出库
-     */
-    private Integer issueStatus;
-
-    /**
-     * 售后状态 1跟进中(补发中、未补发未收到退货) 2已补发 3未补发收到退货 4已补发收到退货 5已补发未收到退货 6结束
-     */
-    private Integer afterSalesStatus;
-
-    /**
-     * 国家
-     */
-    private String countryId;
-
-    /**
-     * 省
-     */
-    private String provinceId;
-
-    /**
-     * 市
-     */
-    private String cityId;
-
-    /**
-     * 详细地址
-     */
-    private String detailedAddress;
-
-    /**
-     * 联系人
-     */
-    private String contacts;
-
-    /**
-     * 联系电话
-     */
-    private String phone;
-
-    /**
-     * 联系电话前缀类型
-     */
-    private Integer phonePrefixType;
-
-    /**
-     * 导入excel关联id
-     */
-    private Long excelImportId;
-
-    /**
-     * 配送中心
-     */
-    private String distributionCenter;
-
-    /**
-     * 京东仓库
-     */
-    private String jdWarehouse;
-
-    /**
-     * 备注
-     */
-    private String remark;
-
-}

+ 0 - 17
hx-victoriatourist/src/main/java/com/fjhx/victoriatourist/entity/order/vo/OrderDetailsVo.java

@@ -1,17 +0,0 @@
-package com.fjhx.victoriatourist.entity.order.vo;
-
-import com.fjhx.victoriatourist.entity.order.po.OrderDetails;
-import lombok.Getter;
-import lombok.Setter;
-
-/**
- * 订单明细列表查询返回值实体
- *
- * @author 
- * @since 2023-04-13
- */
-@Getter
-@Setter
-public class OrderDetailsVo extends OrderDetails {
-
-}

+ 0 - 17
hx-victoriatourist/src/main/java/com/fjhx/victoriatourist/entity/order/vo/OrderInfoVo.java

@@ -1,17 +0,0 @@
-package com.fjhx.victoriatourist.entity.order.vo;
-
-import com.fjhx.victoriatourist.entity.order.po.OrderInfo;
-import lombok.Getter;
-import lombok.Setter;
-
-/**
- * 订单列表查询返回值实体
- *
- * @author 
- * @since 2023-04-13
- */
-@Getter
-@Setter
-public class OrderInfoVo extends OrderInfo {
-
-}

+ 26 - 0
hx-victoriatourist/src/main/java/com/fjhx/victoriatourist/mapper/deliver/DeliverGoodsDetailsMapper.java

@@ -0,0 +1,26 @@
+package com.fjhx.victoriatourist.mapper.deliver;
+
+import com.fjhx.victoriatourist.entity.deliver.po.DeliverGoodsDetails;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import com.fjhx.victoriatourist.entity.deliver.vo.DeliverGoodsDetailsVo;
+import com.ruoyi.common.utils.wrapper.IWrapper;
+import org.apache.ibatis.annotations.Param;
+
+
+/**
+ * <p>
+ * 发货明细 Mapper 接口
+ * </p>
+ *
+ * @author 
+ * @since 2023-04-13
+ */
+public interface DeliverGoodsDetailsMapper extends BaseMapper<DeliverGoodsDetails> {
+
+    /**
+     * 发货明细分页
+     */
+    Page<DeliverGoodsDetailsVo> getPage(@Param("page") Page<Object> page, @Param("ew") IWrapper<DeliverGoodsDetails> wrapper);
+
+}

+ 31 - 0
hx-victoriatourist/src/main/java/com/fjhx/victoriatourist/mapper/deliver/DeliverGoodsMapper.java

@@ -0,0 +1,31 @@
+package com.fjhx.victoriatourist.mapper.deliver;
+
+import com.fjhx.victoriatourist.entity.deliver.po.DeliverGoods;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import com.fjhx.victoriatourist.entity.deliver.vo.DeliverGoodsDetailsVo;
+import com.fjhx.victoriatourist.entity.deliver.vo.DeliverGoodsVo;
+import com.ruoyi.common.utils.wrapper.IWrapper;
+import org.apache.ibatis.annotations.Param;
+
+import java.util.List;
+
+
+/**
+ * <p>
+ * 发货 Mapper 接口
+ * </p>
+ *
+ * @author 
+ * @since 2023-04-13
+ */
+public interface DeliverGoodsMapper extends BaseMapper<DeliverGoods> {
+
+    /**
+     * 发货分页
+     */
+    Page<DeliverGoodsVo> getPage(@Param("page") Page<Object> page, @Param("ew") IWrapper<DeliverGoods> wrapper);
+
+    List<DeliverGoodsDetailsVo> listDeliverGoodsDetails(@Param("ew") IWrapper<DeliverGoods> wrapper);
+
+}

+ 0 - 26
hx-victoriatourist/src/main/java/com/fjhx/victoriatourist/mapper/logistics/LogisticsDetailsMapper.java

@@ -1,26 +0,0 @@
-package com.fjhx.victoriatourist.mapper.logistics;
-
-import com.fjhx.victoriatourist.entity.logistics.po.LogisticsDetails;
-import com.baomidou.mybatisplus.core.mapper.BaseMapper;
-import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
-import com.fjhx.victoriatourist.entity.logistics.vo.LogisticsDetailsVo;
-import com.ruoyi.common.utils.wrapper.IWrapper;
-import org.apache.ibatis.annotations.Param;
-
-
-/**
- * <p>
- * 物流明细 Mapper 接口
- * </p>
- *
- * @author 
- * @since 2023-04-12
- */
-public interface LogisticsDetailsMapper extends BaseMapper<LogisticsDetails> {
-
-    /**
-     * 物流明细分页
-     */
-    Page<LogisticsDetailsVo> getPage(@Param("page") Page<Object> page, @Param("ew") IWrapper<LogisticsDetails> wrapper);
-
-}

+ 0 - 32
hx-victoriatourist/src/main/java/com/fjhx/victoriatourist/mapper/logistics/MyLogisticsInfoMapper.java

@@ -1,32 +0,0 @@
-package com.fjhx.victoriatourist.mapper.logistics;
-
-import com.fjhx.purchase.entity.purchase.vo.PurchaseDetailVo;
-import com.fjhx.victoriatourist.entity.logistics.po.LogisticsDetails;
-import com.fjhx.victoriatourist.entity.logistics.po.LogisticsInfo;
-import com.baomidou.mybatisplus.core.mapper.BaseMapper;
-import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
-import com.fjhx.victoriatourist.entity.logistics.vo.LogisticsInfoVo;
-import com.ruoyi.common.utils.wrapper.IWrapper;
-import org.apache.ibatis.annotations.Param;
-
-import java.util.List;
-
-
-/**
- * <p>
- * 物流信息 Mapper 接口
- * </p>
- *
- * @author 
- * @since 2023-04-12
- */
-public interface MyLogisticsInfoMapper extends BaseMapper<LogisticsInfo> {
-
-    /**
-     * 物流信息分页
-     */
-    Page<LogisticsInfoVo> getPage(@Param("page") Page<Object> page, @Param("ew") IWrapper<LogisticsInfo> wrapper);
-
-    List<PurchaseDetailVo> getQualityDetailByPurchaseDetailId(@Param("ew") IWrapper<LogisticsDetails> wrapper);
-
-}

+ 0 - 26
hx-victoriatourist/src/main/java/com/fjhx/victoriatourist/mapper/order/OrderDetailsMapper.java

@@ -1,26 +0,0 @@
-package com.fjhx.victoriatourist.mapper.order;
-
-import com.fjhx.victoriatourist.entity.order.po.OrderDetails;
-import com.baomidou.mybatisplus.core.mapper.BaseMapper;
-import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
-import com.fjhx.victoriatourist.entity.order.vo.OrderDetailsVo;
-import com.ruoyi.common.utils.wrapper.IWrapper;
-import org.apache.ibatis.annotations.Param;
-
-
-/**
- * <p>
- * 订单明细 Mapper 接口
- * </p>
- *
- * @author 
- * @since 2023-04-13
- */
-public interface OrderDetailsMapper extends BaseMapper<OrderDetails> {
-
-    /**
-     * 订单明细分页
-     */
-    Page<OrderDetailsVo> getPage(@Param("page") Page<Object> page, @Param("ew") IWrapper<OrderDetails> wrapper);
-
-}

+ 0 - 26
hx-victoriatourist/src/main/java/com/fjhx/victoriatourist/mapper/order/OrderInfoMapper.java

@@ -1,26 +0,0 @@
-package com.fjhx.victoriatourist.mapper.order;
-
-import com.fjhx.victoriatourist.entity.order.po.OrderInfo;
-import com.baomidou.mybatisplus.core.mapper.BaseMapper;
-import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
-import com.fjhx.victoriatourist.entity.order.vo.OrderInfoVo;
-import com.ruoyi.common.utils.wrapper.IWrapper;
-import org.apache.ibatis.annotations.Param;
-
-
-/**
- * <p>
- * 订单 Mapper 接口
- * </p>
- *
- * @author 
- * @since 2023-04-13
- */
-public interface OrderInfoMapper extends BaseMapper<OrderInfo> {
-
-    /**
-     * 订单分页
-     */
-    Page<OrderInfoVo> getPage(@Param("page") Page<Object> page, @Param("ew") IWrapper<OrderInfo> wrapper);
-
-}

+ 0 - 70
hx-victoriatourist/src/main/java/com/fjhx/victoriatourist/service/WdlySalesReturnServiceImpl.java

@@ -1,70 +0,0 @@
-package com.fjhx.victoriatourist.service;
-
-import cn.hutool.extra.spring.SpringUtil;
-import com.alibaba.fastjson.JSONObject;
-import com.baomidou.mybatisplus.core.toolkit.ObjectUtils;
-import com.fjhx.purchase.entity.purchase.po.Purchase;
-import com.fjhx.purchase.entity.sales.po.SalesReturn;
-import com.fjhx.purchase.entity.sales.po.SalesReturnDetail;
-import com.fjhx.purchase.service.purchase.PurchaseService;
-import com.fjhx.purchase.service.WdlySalesReturnService;
-import com.fjhx.victoriatourist.entity.order.po.OrderDetails;
-import com.fjhx.victoriatourist.entity.order.po.OrderInfo;
-import com.fjhx.victoriatourist.service.order.OrderDetailsService;
-import com.fjhx.victoriatourist.service.order.OrderInfoService;
-import com.obs.services.internal.ServiceException;
-
-import java.math.BigDecimal;
-import java.util.ArrayList;
-import java.util.List;
-
-public class WdlySalesReturnServiceImpl implements WdlySalesReturnService {
-    @Override
-    public void startByWdly(SalesReturn salesReturn) {
-        //判断是否存在维多利亚数据存在就处理
-        if (ObjectUtils.isEmpty(salesReturn.getVictoriatouristJson())) {
-            return;
-        }
-        PurchaseService purchaseService = SpringUtil.getBean(PurchaseService.class);
-        OrderInfoService orderInfoService = SpringUtil.getBean(OrderInfoService.class);
-        OrderDetailsService orderDetailsService = SpringUtil.getBean(OrderDetailsService.class);
-
-        //查询采购订单信息
-        String victoriatouristJson = salesReturn.getVictoriatouristJson();
-        JSONObject json = JSONObject.parseObject(victoriatouristJson);
-        Purchase purchase = purchaseService.getById(json.getLong("purchaseId"));
-        //创建退货订单
-        OrderInfo orderInfo = new OrderInfo();
-        orderInfo.setType(7);
-        orderInfo.setCode(purchase.getCode());
-        orderInfo.setStatus(1);
-        orderInfo.setIssueStatus(1);
-        orderInfo.setContacts(json.getString("contacts"));//收件人
-        orderInfo.setPhone(json.getString("phone"));//联系电话
-        orderInfo.setCityId(json.getString("cityId"));//所在市
-        orderInfo.setProvinceId(json.getString("provinceId"));//所在省
-        orderInfo.setCountryId(json.getString("countryId"));//所在国家
-        orderInfo.setDetailedAddress(json.getString("detailedAddress"));//详细地址
-        orderInfoService.save(orderInfo);
-        //创建订单明细
-        List<OrderDetails> orderDetailsList = new ArrayList<>();
-        for (SalesReturnDetail salesReturnDetail : salesReturn.getSalesReturnDetailList()) {
-            String victoriatouristJson1 = salesReturnDetail.getVictoriatouristJson();
-            if (ObjectUtils.isEmpty(victoriatouristJson1)) {
-                throw new ServiceException("物品单价不能为空");
-            }
-            JSONObject json1 = JSONObject.parseObject(victoriatouristJson);
-            //忽略退货数量为0或小于0的物品
-            if (salesReturnDetail.getCount().compareTo(BigDecimal.ZERO) > 0) {
-                OrderDetails orderDetails = new OrderDetails();
-                orderDetails.setOrderId(orderInfo.getId());
-                orderDetails.setProductId(salesReturnDetail.getBussinessId());
-                orderDetails.setQuantity(salesReturnDetail.getCount());
-                orderDetails.setPrice(json1.getBigDecimal("unitPrice"));
-                orderDetails.setNotIssuedQuantity(salesReturnDetail.getCount());
-                orderDetailsList.add(orderDetails);
-            }
-        }
-        orderDetailsService.saveBatch(orderDetailsList);
-    }
-}

+ 49 - 0
hx-victoriatourist/src/main/java/com/fjhx/victoriatourist/service/deliver/DeliverGoodsDetailsService.java

@@ -0,0 +1,49 @@
+package com.fjhx.victoriatourist.service.deliver;
+
+import com.fjhx.purchase.entity.purchase.vo.PurchaseDetailVo;
+import com.fjhx.victoriatourist.entity.deliver.po.DeliverGoodsDetails;
+import com.ruoyi.common.core.service.BaseService;
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import com.fjhx.victoriatourist.entity.deliver.vo.DeliverGoodsDetailsVo;
+import com.fjhx.victoriatourist.entity.deliver.dto.DeliverGoodsDetailsSelectDto;
+import com.fjhx.victoriatourist.entity.deliver.dto.DeliverGoodsDetailsDto;
+
+import java.util.List;
+
+
+/**
+ * <p>
+ * 发货明细 服务类
+ * </p>
+ *
+ * @author 
+ * @since 2023-04-13
+ */
+public interface DeliverGoodsDetailsService extends BaseService<DeliverGoodsDetails> {
+
+    /**
+     * 发货明细分页
+     */
+    Page<DeliverGoodsDetailsVo> getPage(DeliverGoodsDetailsSelectDto dto);
+
+    /**
+     * 发货明细明细
+     */
+    List<PurchaseDetailVo> detail(Long id);
+
+    /**
+     * 发货明细新增
+     */
+    void add(DeliverGoodsDetailsDto deliverGoodsDetailsDto);
+
+    /**
+     * 发货明细编辑
+     */
+    void edit(DeliverGoodsDetailsDto deliverGoodsDetailsDto);
+
+    /**
+     * 发货明细删除
+     */
+    void delete(Long id);
+
+}

+ 56 - 0
hx-victoriatourist/src/main/java/com/fjhx/victoriatourist/service/deliver/DeliverGoodsService.java

@@ -0,0 +1,56 @@
+package com.fjhx.victoriatourist.service.deliver;
+
+import com.fjhx.victoriatourist.entity.deliver.po.DeliverGoods;
+import com.fjhx.victoriatourist.entity.deliver.vo.DeliverGoodsDetailsVo;
+import com.ruoyi.common.core.service.BaseService;
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import com.fjhx.victoriatourist.entity.deliver.vo.DeliverGoodsVo;
+import com.fjhx.victoriatourist.entity.deliver.dto.DeliverGoodsSelectDto;
+import com.fjhx.victoriatourist.entity.deliver.dto.DeliverGoodsDto;
+
+import java.util.List;
+
+
+/**
+ * <p>
+ * 发货 服务类
+ * </p>
+ *
+ * @author 
+ * @since 2023-04-13
+ */
+public interface DeliverGoodsService extends BaseService<DeliverGoods> {
+
+    /**
+     * 发货分页
+     */
+    Page<DeliverGoodsVo> getPage(DeliverGoodsSelectDto dto);
+
+    /**
+     * 发货明细
+     */
+    List<DeliverGoodsDetailsVo> detail(Long id);
+
+    /**
+     * 发货新增
+     */
+    void add(DeliverGoodsDto deliverGoodsDto);
+
+    /**
+     * 发货编辑
+     */
+    void edit(DeliverGoodsDto deliverGoodsDto);
+
+    /**
+     * 发货删除
+     */
+    void delete(Long id);
+
+    /**
+     * 发货列表
+     *
+     * @return
+     */
+    List<DeliverGoods> list(Long id);
+
+}

+ 91 - 0
hx-victoriatourist/src/main/java/com/fjhx/victoriatourist/service/deliver/impl/DeliverGoodsDetailsServiceImpl.java

@@ -0,0 +1,91 @@
+package com.fjhx.victoriatourist.service.deliver.impl;
+
+import cn.hutool.core.bean.BeanUtil;
+import cn.hutool.core.util.ObjectUtil;
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import com.fjhx.purchase.entity.purchase.po.PurchaseDetail;
+import com.fjhx.purchase.entity.purchase.vo.PurchaseDetailVo;
+import com.fjhx.purchase.entity.purchase.vo.PurchaseVo;
+import com.fjhx.purchase.service.purchase.PurchaseDetailService;
+import com.fjhx.purchase.service.purchase.PurchaseService;
+import com.fjhx.victoriatourist.entity.deliver.dto.DeliverGoodsDetailsDto;
+import com.fjhx.victoriatourist.entity.deliver.dto.DeliverGoodsDetailsSelectDto;
+import com.fjhx.victoriatourist.entity.deliver.po.DeliverGoodsDetails;
+import com.fjhx.victoriatourist.entity.deliver.vo.DeliverGoodsDetailsVo;
+import com.fjhx.victoriatourist.mapper.deliver.DeliverGoodsDetailsMapper;
+import com.fjhx.victoriatourist.service.deliver.DeliverGoodsDetailsService;
+import com.ruoyi.common.utils.wrapper.IWrapper;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+import java.math.BigDecimal;
+import java.util.List;
+import java.util.Map;
+import java.util.stream.Collectors;
+
+
+/**
+ * <p>
+ * 发货明细 服务实现类
+ * </p>
+ *
+ * @author
+ * @since 2023-04-13
+ */
+@Service
+public class DeliverGoodsDetailsServiceImpl extends ServiceImpl<DeliverGoodsDetailsMapper, DeliverGoodsDetails> implements DeliverGoodsDetailsService {
+
+    @Autowired
+    PurchaseDetailService purchaseDetailService;
+    @Autowired
+    PurchaseService purchaseService;
+
+    @Override
+    public Page<DeliverGoodsDetailsVo> getPage(DeliverGoodsDetailsSelectDto dto) {
+        IWrapper<DeliverGoodsDetails> wrapper = getWrapper();
+        wrapper.orderByDesc("dgd", DeliverGoodsDetails::getId);
+        Page<DeliverGoodsDetailsVo> page = this.baseMapper.getPage(dto.getPage(), wrapper);
+        return page;
+    }
+
+    @Override
+    public List<PurchaseDetailVo> detail(Long id) {
+        PurchaseVo detail = purchaseService.detail(id);
+        List<PurchaseDetail> purchaseDetailList1 = detail.getPurchaseDetailList();
+        List<PurchaseDetailVo> purchaseDetailVoList = BeanUtil.copyToList(purchaseDetailList1, PurchaseDetailVo.class);
+        //根据采购明细查发货明细
+        List<Long> pdids = purchaseDetailVoList.stream().map(PurchaseDetail::getId).collect(Collectors.toList());
+        List<DeliverGoodsDetails> list = list(q -> q.in(DeliverGoodsDetails::getPurchaseDetailId, pdids));
+        Map<Long, List<DeliverGoodsDetails>> collect = list.stream().collect(Collectors.groupingBy(DeliverGoodsDetails::getId));
+        for (PurchaseDetailVo purchaseDetail:purchaseDetailVoList){
+            //赋值已发货数量
+            purchaseDetail.setDeliverGoodsQuantity(BigDecimal.ZERO);
+            List<DeliverGoodsDetails> deliverGoodsDetailsList1 = collect.get(purchaseDetail.getId());
+            if (ObjectUtil.isEmpty(deliverGoodsDetailsList1)){
+                continue;
+            }
+            BigDecimal count = deliverGoodsDetailsList1.stream()
+                    .map(DeliverGoodsDetails::getDeliverGoodsQuantity)
+                    .reduce(BigDecimal.ZERO, BigDecimal::add);
+            purchaseDetail.setDeliverGoodsQuantity(count);
+        }
+        return purchaseDetailVoList;
+    }
+
+    @Override
+    public void add(DeliverGoodsDetailsDto deliverGoodsDetailsDto) {
+        this.save(deliverGoodsDetailsDto);
+    }
+
+    @Override
+    public void edit(DeliverGoodsDetailsDto deliverGoodsDetailsDto) {
+        this.updateById(deliverGoodsDetailsDto);
+    }
+
+    @Override
+    public void delete(Long id) {
+        this.removeById(id);
+    }
+
+}

+ 123 - 0
hx-victoriatourist/src/main/java/com/fjhx/victoriatourist/service/deliver/impl/DeliverGoodsServiceImpl.java

@@ -0,0 +1,123 @@
+package com.fjhx.victoriatourist.service.deliver.impl;
+
+import cn.hutool.core.util.ObjectUtil;
+import com.baomidou.dynamic.datasource.annotation.DS;
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import com.fjhx.common.constant.SourceConstant;
+import com.fjhx.item.entity.product.po.ProductInfo;
+import com.fjhx.item.service.product.ProductInfoService;
+import com.fjhx.purchase.entity.purchase.po.PurchaseDetail;
+import com.fjhx.purchase.service.purchase.PurchaseDetailService;
+import com.fjhx.victoriatourist.entity.deliver.dto.DeliverGoodsDto;
+import com.fjhx.victoriatourist.entity.deliver.dto.DeliverGoodsSelectDto;
+import com.fjhx.victoriatourist.entity.deliver.po.DeliverGoods;
+import com.fjhx.victoriatourist.entity.deliver.po.DeliverGoodsDetails;
+import com.fjhx.victoriatourist.entity.deliver.vo.DeliverGoodsDetailsVo;
+import com.fjhx.victoriatourist.entity.deliver.vo.DeliverGoodsVo;
+import com.fjhx.victoriatourist.mapper.deliver.DeliverGoodsMapper;
+import com.fjhx.victoriatourist.service.deliver.DeliverGoodsDetailsService;
+import com.fjhx.victoriatourist.service.deliver.DeliverGoodsService;
+import com.ruoyi.common.utils.wrapper.IWrapper;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+import org.springframework.transaction.annotation.Transactional;
+
+import java.util.List;
+import java.util.Map;
+import java.util.function.Function;
+import java.util.stream.Collectors;
+
+
+/**
+ * <p>
+ * 发货 服务实现类
+ * </p>
+ *
+ * @author
+ * @since 2023-04-13
+ */
+@DS(SourceConstant.VICTORIATOURIST)
+@Service
+public class DeliverGoodsServiceImpl extends ServiceImpl<DeliverGoodsMapper, DeliverGoods> implements DeliverGoodsService {
+    @Autowired
+    DeliverGoodsDetailsService deliverGoodsDetailsService;
+    @Autowired
+    ProductInfoService productInfoService;
+    @Autowired
+    PurchaseDetailService purchaseDetailService;
+
+    @Override
+    public Page<DeliverGoodsVo> getPage(DeliverGoodsSelectDto dto) {
+        IWrapper<DeliverGoods> wrapper = getWrapper();
+        wrapper.orderByDesc("dg", DeliverGoods::getId);
+        Page<DeliverGoodsVo> page = this.baseMapper.getPage(dto.getPage(), wrapper);
+        return page;
+    }
+
+    @Override
+    public List<DeliverGoodsDetailsVo> detail(Long id) {
+        //根据发货id查发货明细
+        IWrapper<DeliverGoods> wrapper = IWrapper.getWrapper();
+        wrapper.eq(DeliverGoods::getId, id);
+        wrapper.eq(DeliverGoods::getStatus, 0);
+        List<DeliverGoodsDetailsVo> deliverGoodsDetailsVos = baseMapper.listDeliverGoodsDetails(wrapper);
+        //获取采购明细列表
+        //赋值产品信息
+        List<Long> pdids = deliverGoodsDetailsVos.stream().map(DeliverGoodsDetails::getPurchaseDetailId).collect(Collectors.toList());
+        List<PurchaseDetail> purchaseDetailList = purchaseDetailService.listByIds(pdids);
+        Map<Long, Long> goodidmap = purchaseDetailList.stream().collect(Collectors.toMap(PurchaseDetail::getId, PurchaseDetail::getBussinessId));
+        List<Long> goodids = purchaseDetailList.stream().map(PurchaseDetail::getBussinessId).collect(Collectors.toList());
+        List<ProductInfo> productInfos = productInfoService.listByIds(goodids);
+        Map<Long, ProductInfo> productInfoMap = productInfos.stream().collect(Collectors.toMap(ProductInfo::getId, Function.identity()));
+        //获取采购明细信息
+        Map<Long, PurchaseDetail> purchaseDetailMap = purchaseDetailList.stream().collect(Collectors.toMap(PurchaseDetail::getId,Function.identity()));
+
+        for (DeliverGoodsDetailsVo deliverGoodsDetailsVo : deliverGoodsDetailsVos) {
+            //赋值产品信息
+            Long goodid = goodidmap.get(deliverGoodsDetailsVo.getPurchaseDetailId());
+            ProductInfo productInfo = productInfoMap.get(goodid);
+            if (ObjectUtil.isNotEmpty(productInfo)) {
+                deliverGoodsDetailsVo.setType(productInfo.getType());
+                deliverGoodsDetailsVo.setCode(productInfo.getCode());
+                deliverGoodsDetailsVo.setName(productInfo.getName());
+                deliverGoodsDetailsVo.setSpec(productInfo.getSpec());
+                deliverGoodsDetailsVo.setUnit(productInfo.getUnit());
+            }
+            //赋值采购数量,现在在途数量
+            PurchaseDetail purchaseDetail = purchaseDetailMap.get(deliverGoodsDetailsVo.getPurchaseDetailId());
+            deliverGoodsDetailsVo.setCount(purchaseDetail.getCount());
+        }
+        return deliverGoodsDetailsVos;
+    }
+
+    @Transactional(rollbackFor = Exception.class)
+    @Override
+    public void add(DeliverGoodsDto deliverGoodsDto) {
+        this.save(deliverGoodsDto);
+        deliverGoodsDto.setStatus(0);
+        List<DeliverGoodsDetails> deliverGoodsDetailsList = deliverGoodsDto.getDeliverGoodsDetailsList();
+        for (DeliverGoodsDetails deliverGoodsDetails : deliverGoodsDetailsList) {
+            deliverGoodsDetails.setDeliverGoodsId(deliverGoodsDto.getId());
+        }
+        deliverGoodsDetailsService.saveBatch(deliverGoodsDetailsList);
+    }
+
+    @Override
+    public void edit(DeliverGoodsDto deliverGoodsDto) {
+        this.updateById(deliverGoodsDto);
+    }
+
+    @Override
+    public void delete(Long id) {
+        this.removeById(id);
+    }
+
+    @Override
+    public List<DeliverGoods> list(Long id) {
+        //根据采购id查发货列表
+        List<DeliverGoods> list = list(q -> q.eq(DeliverGoods::getPurchaseId, id).eq(DeliverGoods::getStatus, 0));
+        return list;
+    }
+
+}

+ 0 - 46
hx-victoriatourist/src/main/java/com/fjhx/victoriatourist/service/logistics/LogisticsDetailsService.java

@@ -1,46 +0,0 @@
-package com.fjhx.victoriatourist.service.logistics;
-
-import com.fjhx.victoriatourist.entity.logistics.po.LogisticsDetails;
-import com.ruoyi.common.core.service.BaseService;
-import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
-import com.fjhx.victoriatourist.entity.logistics.vo.LogisticsDetailsVo;
-import com.fjhx.victoriatourist.entity.logistics.dto.LogisticsDetailsSelectDto;
-import com.fjhx.victoriatourist.entity.logistics.dto.LogisticsDetailsDto;
-
-
-/**
- * <p>
- * 物流明细 服务类
- * </p>
- *
- * @author 
- * @since 2023-04-12
- */
-public interface LogisticsDetailsService extends BaseService<LogisticsDetails> {
-
-    /**
-     * 物流明细分页
-     */
-    Page<LogisticsDetailsVo> getPage(LogisticsDetailsSelectDto dto);
-
-    /**
-     * 物流明细明细
-     */
-    LogisticsDetailsVo detail(Long id);
-
-    /**
-     * 物流明细新增
-     */
-    void add(LogisticsDetailsDto logisticsDetailsDto);
-
-    /**
-     * 物流明细编辑
-     */
-    void edit(LogisticsDetailsDto logisticsDetailsDto);
-
-    /**
-     * 物流明细删除
-     */
-    void delete(Long id);
-
-}

+ 0 - 46
hx-victoriatourist/src/main/java/com/fjhx/victoriatourist/service/logistics/MyLogisticsInfoService.java

@@ -1,46 +0,0 @@
-package com.fjhx.victoriatourist.service.logistics;
-
-import com.fjhx.victoriatourist.entity.logistics.po.LogisticsInfo;
-import com.ruoyi.common.core.service.BaseService;
-import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
-import com.fjhx.victoriatourist.entity.logistics.vo.LogisticsInfoVo;
-import com.fjhx.victoriatourist.entity.logistics.dto.LogisticsInfoSelectDto;
-import com.fjhx.victoriatourist.entity.logistics.dto.LogisticsInfoDto;
-
-
-/**
- * <p>
- * 物流信息 服务类
- * </p>
- *
- * @author 
- * @since 2023-04-12
- */
-public interface MyLogisticsInfoService extends BaseService<LogisticsInfo> {
-
-    /**
-     * 物流信息分页
-     */
-    Page<LogisticsInfoVo> getPage(LogisticsInfoSelectDto dto);
-
-    /**
-     * 物流信息明细
-     */
-    LogisticsInfoVo detail(Long id);
-
-    /**
-     * 物流信息新增
-     */
-    void add(LogisticsInfoDto logisticsInfoDto);
-
-    /**
-     * 物流信息编辑
-     */
-    void edit(LogisticsInfoDto logisticsInfoDto);
-
-    /**
-     * 物流信息删除
-     */
-    void delete(Long id);
-
-}

+ 0 - 57
hx-victoriatourist/src/main/java/com/fjhx/victoriatourist/service/logistics/impl/LogisticsDetailsServiceImpl.java

@@ -1,57 +0,0 @@
-package com.fjhx.victoriatourist.service.logistics.impl;
-
-import com.fjhx.victoriatourist.entity.logistics.po.LogisticsDetails;
-import com.fjhx.victoriatourist.mapper.logistics.LogisticsDetailsMapper;
-import com.fjhx.victoriatourist.service.logistics.LogisticsDetailsService;
-import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
-import org.springframework.stereotype.Service;
-import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
-import com.fjhx.victoriatourist.entity.logistics.vo.LogisticsDetailsVo;
-import com.fjhx.victoriatourist.entity.logistics.dto.LogisticsDetailsSelectDto;
-import com.ruoyi.common.utils.wrapper.IWrapper;
-import com.fjhx.victoriatourist.entity.logistics.dto.LogisticsDetailsDto;
-import cn.hutool.core.bean.BeanUtil;
-
-
-/**
- * <p>
- * 物流明细 服务实现类
- * </p>
- *
- * @author 
- * @since 2023-04-12
- */
-@Service
-public class LogisticsDetailsServiceImpl extends ServiceImpl<LogisticsDetailsMapper, LogisticsDetails> implements LogisticsDetailsService {
-
-    @Override
-    public Page<LogisticsDetailsVo> getPage(LogisticsDetailsSelectDto dto) {
-        IWrapper<LogisticsDetails> wrapper = getWrapper();
-        wrapper.orderByDesc("ld", LogisticsDetails::getId);
-        Page<LogisticsDetailsVo> page = this.baseMapper.getPage(dto.getPage(), wrapper);
-        return page;
-    }
-
-    @Override
-    public LogisticsDetailsVo detail(Long id) {
-        LogisticsDetails LogisticsDetails = this.getById(id);
-        LogisticsDetailsVo result = BeanUtil.toBean(LogisticsDetails, LogisticsDetailsVo.class);
-        return result;
-    }
-
-    @Override
-    public void add(LogisticsDetailsDto logisticsDetailsDto) {
-        this.save(logisticsDetailsDto);
-    }
-
-    @Override
-    public void edit(LogisticsDetailsDto logisticsDetailsDto) {
-        this.updateById(logisticsDetailsDto);
-    }
-
-    @Override
-    public void delete(Long id) {
-        this.removeById(id);
-    }
-
-}

+ 0 - 179
hx-victoriatourist/src/main/java/com/fjhx/victoriatourist/service/logistics/impl/MyLogisticsInfoServiceImpl.java

@@ -1,179 +0,0 @@
-package com.fjhx.victoriatourist.service.logistics.impl;
-
-import cn.hutool.core.bean.BeanUtil;
-import cn.hutool.core.util.ObjectUtil;
-import com.baomidou.mybatisplus.core.toolkit.IdWorker;
-import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
-import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
-import com.fjhx.kd100.event.Kd100CallbackEvent;
-import com.fjhx.kd100.util.KD100Util;
-import com.fjhx.purchase.entity.purchase.po.Purchase;
-import com.fjhx.purchase.entity.purchase.vo.PurchaseDetailVo;
-import com.fjhx.purchase.service.purchase.PurchaseService;
-import com.fjhx.victoriatourist.entity.logistics.dto.LogisticsInfoDto;
-import com.fjhx.victoriatourist.entity.logistics.dto.LogisticsInfoSelectDto;
-import com.fjhx.victoriatourist.entity.logistics.po.LogisticsDetails;
-import com.fjhx.victoriatourist.entity.logistics.po.LogisticsInfo;
-import com.fjhx.victoriatourist.entity.logistics.vo.LogisticsInfoVo;
-import com.fjhx.victoriatourist.mapper.logistics.MyLogisticsInfoMapper;
-import com.fjhx.victoriatourist.service.logistics.LogisticsDetailsService;
-import com.fjhx.victoriatourist.service.logistics.MyLogisticsInfoService;
-import com.fjhx.victoriatourist.utils.Assert;
-import com.fjhx.victoriatourist.utils.LogisticsConstant;
-import com.obs.services.internal.ServiceException;
-import com.ruoyi.common.utils.wrapper.IWrapper;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.context.event.EventListener;
-import org.springframework.stereotype.Service;
-
-import java.math.BigDecimal;
-import java.util.List;
-import java.util.Map;
-import java.util.function.Function;
-import java.util.stream.Collectors;
-
-
-/**
- * <p>
- * 物流信息 服务实现类
- * </p>
- *
- * @author
- * @since 2023-04-12
- */
-@Service
-public class MyLogisticsInfoServiceImpl extends ServiceImpl<MyLogisticsInfoMapper, LogisticsInfo> implements MyLogisticsInfoService {
-
-    @Autowired
-    PurchaseService purchaseService;
-    @Autowired
-    LogisticsDetailsService logisticsDetailsService;
-
-    @EventListener
-    public void kd100EventListener(Kd100CallbackEvent event) {
-        com.fjhx.kd100.entity.logistics.po.LogisticsInfo logisticsInfo = event.getLogisticsInfo();
-        //监听物流状态变化
-        if (KD100Util.getTableName(LogisticsInfo.class).equals(logisticsInfo.getTableName())) {
-            LogisticsInfo byId = getById(logisticsInfo.getBusinessId());
-            byId.setLogisticsStatus(logisticsInfo.getState());
-            updateById(byId);
-        }
-    }
-
-    @Override
-    public Page<LogisticsInfoVo> getPage(LogisticsInfoSelectDto dto) {
-        IWrapper<LogisticsInfo> wrapper = getWrapper();
-        wrapper.orderByDesc("li", LogisticsInfo::getId);
-        Page<LogisticsInfoVo> page = this.baseMapper.getPage(dto.getPage(), wrapper);
-        return page;
-    }
-
-    @Override
-    public LogisticsInfoVo detail(Long id) {
-        LogisticsInfo LogisticsInfo = this.getById(id);
-        LogisticsInfoVo result = BeanUtil.toBean(LogisticsInfo, LogisticsInfoVo.class);
-        return result;
-    }
-
-    @Override
-    public void add(LogisticsInfoDto logisticsInfoDto) {
-        Long businessId = logisticsInfoDto.getBusinessId();
-        String logisticsCompanyCode = logisticsInfoDto.getLogisticsCompanyCode();
-        String code = logisticsInfoDto.getCode();
-        List<LogisticsDetails> details = logisticsInfoDto.getDetails();
-
-        Assert.notEmpty(businessId, "业务id不能为空");
-        Assert.notEmpty(logisticsCompanyCode, "物流公司编码不能为空");
-        Assert.notEmpty(code, "物流单号不能为空");
-        Assert.notEmpty(details, "发货明细不能为空");
-
-        Purchase purchase = purchaseService.getById(businessId);
-        Assert.notEmpty(purchase, "未知采购id");
-
-        // 物流信息id
-        long logisticsInfoId = IdWorker.getId();
-
-        //根据传入的物流明细列表中的采购明细查 已采购数量/质检合格数量/质检不合格数量
-        List<Long> purchaseDetailIds = details.stream().map(LogisticsDetails::getPurchaseDetailId).collect(Collectors.toList());
-        IWrapper<LogisticsDetails> wrapper = IWrapper.getWrapper();
-        wrapper.in(LogisticsDetails::getPurchaseDetailId, purchaseDetailIds);
-        List<PurchaseDetailVo> purchaseDetailVoList = baseMapper.getQualityDetailByPurchaseDetailId(wrapper);
-        //根据采购明细id分组
-        Map<Long, PurchaseDetailVo> purchaseDetailVoMap = purchaseDetailVoList.stream()
-                .collect(Collectors.toMap(PurchaseDetailVo::getId, Function.identity()));
-        //遍历物流明细列表检查条件
-
-        //获取所有申购id
-//        List<Long> applyPurchaseIds = details.stream().map(LogisticsDetails::getApplyPurchaseId).collect(Collectors.toList());
-        //查询质检明细信息
-//        List<QualityDetailsVo> qualityDetailsByApplyId = qualityDetailsService.getQualityDetailsByApplyId(applyPurchaseIds);
-//        Map<Long, QualityDetailsVo> qualityDetailsVoMap = qualityDetailsByApplyId.stream().collect(Collectors.groupingBy(QualityDetailsVo::getApplyId,
-//                Collectors.collectingAndThen(Collectors.toList(), value -> value.get(0))));
-//
-        details = details.stream()
-                .filter(item -> ObjectUtil.defaultIfNull(item.getShipmentQuantity(), BigDecimal.ZERO).compareTo(BigDecimal.ZERO) > 0)
-                .peek(item -> {
-//                    Long applyPurchaseId = item.getApplyPurchaseId();
-//                    Assert.notEmpty(applyPurchaseId, "申购id不能为空");
-
-                    //获取质检明细id
-                    Long purchaseDetailId = item.getPurchaseDetailId();
-                    Assert.notEmpty(purchaseDetailId, "质检明细id不能为空");
-
-
-                    //判断发货数量 + SUM(质检合格数量)不能大于“已采购数量”
-//                    QualityDetailsVo qualityDetailsVo = qualityDetailsVoMap.get(applyPurchaseId);
-                    PurchaseDetailVo purchaseDetailVo = purchaseDetailVoMap.get(purchaseDetailId);
-                    //质检合格数量,和已采购数量
-                    BigDecimal qualifiedQuantity = purchaseDetailVo.getQualifiedCount();
-                    BigDecimal purchaseQuantity = purchaseDetailVo.getCount();
-//                    if(ObjectUtil.isNotEmpty(qualityDetailsVo)){
-//                        if(ObjectUtil.isNotEmpty(qualityDetailsVo.getQualifiedQuantity())) {
-//                            qualifiedQuantity = qualityDetailsVo.getQualifiedQuantity();
-//                        }
-//                        if(ObjectUtil.isNotEmpty(qualityDetailsVo.getPurchaseQuantity())) {
-//                            purchaseQuantity = qualityDetailsVo.getPurchaseQuantity();
-//                        }
-//                    }
-                    if (item.getShipmentQuantity().add(qualifiedQuantity).compareTo(purchaseQuantity) > 0) {
-                        throw new ServiceException("发货数量 + 质检合格数量 不能大于“已采购数量”");
-                    }
-
-                    item.setLogisticsInfoId(logisticsInfoId);
-                    item.setLogisticsInfoCode(code);
-                    item.setReceiptQuantity(BigDecimal.ZERO);
-
-                }).collect(Collectors.toList());
-        Assert.notEmpty(details, "发货数量全为0");
-
-
-        // 物流状态
-//        Integer state = KD100Util.getStateAndMonitor(logisticsCompanyCode, code);
-        Integer state = KD100Util.monitor(logisticsCompanyCode, code, logisticsInfoId, 1, LogisticsInfo.class).getState();
-        logisticsInfoDto.setId(logisticsInfoId);
-        logisticsInfoDto.setBusinessType(1);
-        logisticsInfoDto.setBusinessCode(purchase.getCode());
-        logisticsInfoDto.setLogisticsStatus(state);
-        logisticsInfoDto.setStatus(LogisticsConstant.Status.STATUS_0);
-        logisticsInfoDto.setInStockStatus(LogisticsConstant.InStockStatus.STATUS_10);
-        this.save(logisticsInfoDto);
-
-        // 保存明细
-        logisticsDetailsService.saveBatch(details);
-//
-//        // 保存附件
-//        FileClientUtil.bindingFile(logisticsInfoId, logisticsInfoVo.getFileInfos());
-
-    }
-
-    @Override
-    public void edit(LogisticsInfoDto logisticsInfoDto) {
-        this.updateById(logisticsInfoDto);
-    }
-
-    @Override
-    public void delete(Long id) {
-        this.removeById(id);
-    }
-
-}

+ 0 - 46
hx-victoriatourist/src/main/java/com/fjhx/victoriatourist/service/order/OrderDetailsService.java

@@ -1,46 +0,0 @@
-package com.fjhx.victoriatourist.service.order;
-
-import com.fjhx.victoriatourist.entity.order.po.OrderDetails;
-import com.ruoyi.common.core.service.BaseService;
-import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
-import com.fjhx.victoriatourist.entity.order.vo.OrderDetailsVo;
-import com.fjhx.victoriatourist.entity.order.dto.OrderDetailsSelectDto;
-import com.fjhx.victoriatourist.entity.order.dto.OrderDetailsDto;
-
-
-/**
- * <p>
- * 订单明细 服务类
- * </p>
- *
- * @author 
- * @since 2023-04-13
- */
-public interface OrderDetailsService extends BaseService<OrderDetails> {
-
-    /**
-     * 订单明细分页
-     */
-    Page<OrderDetailsVo> getPage(OrderDetailsSelectDto dto);
-
-    /**
-     * 订单明细明细
-     */
-    OrderDetailsVo detail(Long id);
-
-    /**
-     * 订单明细新增
-     */
-    void add(OrderDetailsDto orderDetailsDto);
-
-    /**
-     * 订单明细编辑
-     */
-    void edit(OrderDetailsDto orderDetailsDto);
-
-    /**
-     * 订单明细删除
-     */
-    void delete(Long id);
-
-}

+ 0 - 46
hx-victoriatourist/src/main/java/com/fjhx/victoriatourist/service/order/OrderInfoService.java

@@ -1,46 +0,0 @@
-package com.fjhx.victoriatourist.service.order;
-
-import com.fjhx.victoriatourist.entity.order.po.OrderInfo;
-import com.ruoyi.common.core.service.BaseService;
-import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
-import com.fjhx.victoriatourist.entity.order.vo.OrderInfoVo;
-import com.fjhx.victoriatourist.entity.order.dto.OrderInfoSelectDto;
-import com.fjhx.victoriatourist.entity.order.dto.OrderInfoDto;
-
-
-/**
- * <p>
- * 订单 服务类
- * </p>
- *
- * @author 
- * @since 2023-04-13
- */
-public interface OrderInfoService extends BaseService<OrderInfo> {
-
-    /**
-     * 订单分页
-     */
-    Page<OrderInfoVo> getPage(OrderInfoSelectDto dto);
-
-    /**
-     * 订单明细
-     */
-    OrderInfoVo detail(Long id);
-
-    /**
-     * 订单新增
-     */
-    void add(OrderInfoDto orderInfoDto);
-
-    /**
-     * 订单编辑
-     */
-    void edit(OrderInfoDto orderInfoDto);
-
-    /**
-     * 订单删除
-     */
-    void delete(Long id);
-
-}

+ 0 - 57
hx-victoriatourist/src/main/java/com/fjhx/victoriatourist/service/order/impl/OrderDetailsServiceImpl.java

@@ -1,57 +0,0 @@
-package com.fjhx.victoriatourist.service.order.impl;
-
-import com.fjhx.victoriatourist.entity.order.po.OrderDetails;
-import com.fjhx.victoriatourist.mapper.order.OrderDetailsMapper;
-import com.fjhx.victoriatourist.service.order.OrderDetailsService;
-import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
-import org.springframework.stereotype.Service;
-import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
-import com.fjhx.victoriatourist.entity.order.vo.OrderDetailsVo;
-import com.fjhx.victoriatourist.entity.order.dto.OrderDetailsSelectDto;
-import com.ruoyi.common.utils.wrapper.IWrapper;
-import com.fjhx.victoriatourist.entity.order.dto.OrderDetailsDto;
-import cn.hutool.core.bean.BeanUtil;
-
-
-/**
- * <p>
- * 订单明细 服务实现类
- * </p>
- *
- * @author 
- * @since 2023-04-13
- */
-@Service
-public class OrderDetailsServiceImpl extends ServiceImpl<OrderDetailsMapper, OrderDetails> implements OrderDetailsService {
-
-    @Override
-    public Page<OrderDetailsVo> getPage(OrderDetailsSelectDto dto) {
-        IWrapper<OrderDetails> wrapper = getWrapper();
-        wrapper.orderByDesc("od", OrderDetails::getId);
-        Page<OrderDetailsVo> page = this.baseMapper.getPage(dto.getPage(), wrapper);
-        return page;
-    }
-
-    @Override
-    public OrderDetailsVo detail(Long id) {
-        OrderDetails OrderDetails = this.getById(id);
-        OrderDetailsVo result = BeanUtil.toBean(OrderDetails, OrderDetailsVo.class);
-        return result;
-    }
-
-    @Override
-    public void add(OrderDetailsDto orderDetailsDto) {
-        this.save(orderDetailsDto);
-    }
-
-    @Override
-    public void edit(OrderDetailsDto orderDetailsDto) {
-        this.updateById(orderDetailsDto);
-    }
-
-    @Override
-    public void delete(Long id) {
-        this.removeById(id);
-    }
-
-}

+ 0 - 57
hx-victoriatourist/src/main/java/com/fjhx/victoriatourist/service/order/impl/OrderInfoServiceImpl.java

@@ -1,57 +0,0 @@
-package com.fjhx.victoriatourist.service.order.impl;
-
-import com.fjhx.victoriatourist.entity.order.po.OrderInfo;
-import com.fjhx.victoriatourist.mapper.order.OrderInfoMapper;
-import com.fjhx.victoriatourist.service.order.OrderInfoService;
-import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
-import org.springframework.stereotype.Service;
-import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
-import com.fjhx.victoriatourist.entity.order.vo.OrderInfoVo;
-import com.fjhx.victoriatourist.entity.order.dto.OrderInfoSelectDto;
-import com.ruoyi.common.utils.wrapper.IWrapper;
-import com.fjhx.victoriatourist.entity.order.dto.OrderInfoDto;
-import cn.hutool.core.bean.BeanUtil;
-
-
-/**
- * <p>
- * 订单 服务实现类
- * </p>
- *
- * @author 
- * @since 2023-04-13
- */
-@Service
-public class OrderInfoServiceImpl extends ServiceImpl<OrderInfoMapper, OrderInfo> implements OrderInfoService {
-
-    @Override
-    public Page<OrderInfoVo> getPage(OrderInfoSelectDto dto) {
-        IWrapper<OrderInfo> wrapper = getWrapper();
-        wrapper.orderByDesc("oi", OrderInfo::getId);
-        Page<OrderInfoVo> page = this.baseMapper.getPage(dto.getPage(), wrapper);
-        return page;
-    }
-
-    @Override
-    public OrderInfoVo detail(Long id) {
-        OrderInfo OrderInfo = this.getById(id);
-        OrderInfoVo result = BeanUtil.toBean(OrderInfo, OrderInfoVo.class);
-        return result;
-    }
-
-    @Override
-    public void add(OrderInfoDto orderInfoDto) {
-        this.save(orderInfoDto);
-    }
-
-    @Override
-    public void edit(OrderInfoDto orderInfoDto) {
-        this.updateById(orderInfoDto);
-    }
-
-    @Override
-    public void delete(Long id) {
-        this.removeById(id);
-    }
-
-}

+ 17 - 0
hx-victoriatourist/src/main/resources/mapper/deliver/DeliverGoodsDetailsMapper.xml

@@ -0,0 +1,17 @@
+<?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.fjhx.victoriatourist.mapper.deliver.DeliverGoodsDetailsMapper">
+    <select id="getPage" resultType="com.fjhx.victoriatourist.entity.deliver.vo.DeliverGoodsDetailsVo">
+        select
+            dgd.id,
+            dgd.purchase_detail_id,
+            dgd.deliver_goods_quantity,
+            dgd.create_user,
+            dgd.create_time,
+            dgd.update_user,
+            dgd.update_time
+        from deliver_goods_details dgd
+            ${ew.customSqlSegment}
+    </select>
+
+</mapper>

+ 27 - 0
hx-victoriatourist/src/main/resources/mapper/deliver/DeliverGoodsMapper.xml

@@ -0,0 +1,27 @@
+<?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.fjhx.victoriatourist.mapper.deliver.DeliverGoodsMapper">
+    <select id="getPage" resultType="com.fjhx.victoriatourist.entity.deliver.vo.DeliverGoodsVo">
+        select
+            dg.id,
+            dg.logistics_company_code,
+            dg.code,
+            dg.purchase_id,
+            dg.status,
+            dg.create_user,
+            dg.create_time,
+            dg.update_user,
+            dg.update_time
+        from deliver_goods dg
+            ${ew.customSqlSegment}
+    </select>
+    <select id="listDeliverGoodsDetails"
+            resultType="com.fjhx.victoriatourist.entity.deliver.vo.DeliverGoodsDetailsVo">
+        SELECT
+            dgd.*
+        FROM
+            deliver_goods dg
+                JOIN deliver_goods_details dgd ON dgd.deliver_goods_id = dg.id
+    </select>
+
+</mapper>

+ 0 - 22
hx-victoriatourist/src/main/resources/mapper/logistics/LogisticsDetailsMapper.xml

@@ -1,22 +0,0 @@
-<?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.fjhx.victoriatourist.mapper.logistics.LogisticsDetailsMapper">
-    <select id="getPage" resultType="com.fjhx.victoriatourist.entity.logistics.vo.LogisticsDetailsVo">
-        select
-            ld.id,
-            ld.logistics_info_id,
-            ld.logistics_info_code,
-            ld.purchase_id,
-            ld.apply_purchase_id,
-            ld.shipment_quantity,
-            ld.receipt_quantity,
-            ld.remark,
-            ld.create_user,
-            ld.create_time,
-            ld.update_user,
-            ld.update_time
-        from logistics_details ld
-            ${ew.customSqlSegment}
-    </select>
-
-</mapper>

+ 0 - 39
hx-victoriatourist/src/main/resources/mapper/logistics/MyLogisticsInfoMapper.xml

@@ -1,39 +0,0 @@
-<?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.fjhx.victoriatourist.mapper.logistics.MyLogisticsInfoMapper">
-    <select id="getPage" resultType="com.fjhx.victoriatourist.entity.logistics.vo.LogisticsInfoVo">
-        select
-            li.id,
-            li.business_id,
-            li.business_code,
-            li.business_type,
-            li.warehouse_id,
-            li.status,
-            li.in_stock_status,
-            li.code,
-            li.logistics_company_code,
-            li.logistics_status,
-            li.is_kd100,
-            li.create_user,
-            li.create_time,
-            li.update_user,
-            li.update_time
-        from logistics_info li
-            ${ew.customSqlSegment}
-    </select>
-    <select id="getQualityDetailByPurchaseDetailId"
-            resultType="com.fjhx.purchase.entity.purchase.vo.PurchaseDetailVo">
-        SELECT
-            pd.id,
-            sum( pd.count ) `count`,
-            IFNULL( sum( qd.qualified_count ), 0 ) qualified_count,
-            IFNULL( sum( qd.no_qualified_count ), 0 ) no_qualified_count
-        FROM
-            purchase_detail pd
-                LEFT JOIN arrival_detail ad ON ad.purchase_detail_id = pd.id
-                LEFT JOIN quality_detail qd ON qd.arrival_detail_id = ad.id
-        GROUP BY
-            pd.id
-    </select>
-
-</mapper>

+ 0 - 23
hx-victoriatourist/src/main/resources/mapper/order/OrderDetailsMapper.xml

@@ -1,23 +0,0 @@
-<?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.fjhx.victoriatourist.mapper.order.OrderDetailsMapper">
-    <select id="getPage" resultType="com.fjhx.victoriatourist.entity.order.vo.OrderDetailsVo">
-        select
-            od.id,
-            od.order_id,
-            od.product_id,
-            od.quantity,
-            od.price,
-            od.not_issued_quantity,
-            od.version,
-            od.remark,
-            od.create_user,
-            od.create_time,
-            od.update_user,
-            od.update_time,
-            od.reservation_number
-        from order_details od
-            ${ew.customSqlSegment}
-    </select>
-
-</mapper>

+ 0 - 34
hx-victoriatourist/src/main/resources/mapper/order/OrderInfoMapper.xml

@@ -1,34 +0,0 @@
-<?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.fjhx.victoriatourist.mapper.order.OrderInfoMapper">
-    <select id="getPage" resultType="com.fjhx.victoriatourist.entity.order.vo.OrderInfoVo">
-        select
-            oi.id,
-            oi.type,
-            oi.customer_info_id,
-            oi.code,
-            oi.amount_money,
-            oi.order_time,
-            oi.status,
-            oi.issue_status,
-            oi.after_sales_status,
-            oi.country_id,
-            oi.province_id,
-            oi.city_id,
-            oi.detailed_address,
-            oi.contacts,
-            oi.phone,
-            oi.phone_prefix_type,
-            oi.excel_import_id,
-            oi.distribution_center,
-            oi.jd_warehouse,
-            oi.remark,
-            oi.create_user,
-            oi.create_time,
-            oi.update_user,
-            oi.update_time
-        from order_info oi
-            ${ew.customSqlSegment}
-    </select>
-
-</mapper>

+ 68 - 0
hx-wms/src/main/java/com/fjhx/wms/controller/stock/StockWaitDetailsController.java

@@ -0,0 +1,68 @@
+package com.fjhx.wms.controller.stock;
+
+import org.springframework.web.bind.annotation.*;
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import com.fjhx.wms.entity.stock.vo.StockWaitDetailsVo;
+import com.fjhx.wms.entity.stock.dto.StockWaitDetailsSelectDto;
+import com.fjhx.wms.entity.stock.dto.StockWaitDetailsDto;
+import com.ruoyi.common.core.domain.BaseSelectDto;
+import com.fjhx.wms.service.stock.StockWaitDetailsService;
+import org.springframework.beans.factory.annotation.Autowired;
+
+
+/**
+ * <p>
+ * 待出入库明细 前端控制器
+ * </p>
+ *
+ * @author 
+ * @since 2023-04-13
+ */
+@RestController
+@RequestMapping("/stockWaitDetails")
+public class StockWaitDetailsController {
+
+    @Autowired
+    private StockWaitDetailsService stockWaitDetailsService;
+
+    /**
+     * 待出入库明细分页
+     */
+    @PostMapping("/page")
+    public Page<StockWaitDetailsVo> page(@RequestBody StockWaitDetailsSelectDto dto) {
+        return stockWaitDetailsService.getPage(dto);
+    }
+
+    /**
+     * 待出入库明细明细
+     */
+    @PostMapping("/detail")
+    public StockWaitDetailsVo detail(@RequestBody BaseSelectDto dto) {
+        return stockWaitDetailsService.detail(dto.getId());
+    }
+
+    /**
+     * 待出入库明细新增
+     */
+    @PostMapping("/add")
+    public void add(@RequestBody StockWaitDetailsDto stockWaitDetailsDto) {
+        stockWaitDetailsService.add(stockWaitDetailsDto);
+    }
+
+    /**
+     * 待出入库明细编辑
+     */
+    @PostMapping("/edit")
+    public void edit(@RequestBody StockWaitDetailsDto stockWaitDetailsDto) {
+        stockWaitDetailsService.edit(stockWaitDetailsDto);
+    }
+
+    /**
+     * 待出入库明细删除
+     */
+    @PostMapping("/delete")
+    public void delete(@RequestBody BaseSelectDto dto) {
+        stockWaitDetailsService.delete(dto.getId());
+    }
+
+}

+ 17 - 0
hx-wms/src/main/java/com/fjhx/wms/entity/stock/dto/StockWaitDetailsDto.java

@@ -0,0 +1,17 @@
+package com.fjhx.wms.entity.stock.dto;
+
+import com.fjhx.wms.entity.stock.po.StockWaitDetails;
+import lombok.Getter;
+import lombok.Setter;
+
+/**
+ * 待出入库明细新增编辑入参实体
+ *
+ * @author 
+ * @since 2023-04-13
+ */
+@Getter
+@Setter
+public class StockWaitDetailsDto extends StockWaitDetails {
+
+}

+ 3 - 3
hx-victoriatourist/src/main/java/com/fjhx/victoriatourist/entity/order/dto/OrderDetailsSelectDto.java → hx-wms/src/main/java/com/fjhx/wms/entity/stock/dto/StockWaitDetailsSelectDto.java

@@ -1,17 +1,17 @@
-package com.fjhx.victoriatourist.entity.order.dto;
+package com.fjhx.wms.entity.stock.dto;
 
 import com.ruoyi.common.core.domain.BaseSelectDto;
 import lombok.Getter;
 import lombok.Setter;
 
 /**
- * 订单明细列表查询入参实体
+ * 待出入库明细列表查询入参实体
  *
  * @author 
  * @since 2023-04-13
  */
 @Getter
 @Setter
-public class OrderDetailsSelectDto extends BaseSelectDto {
+public class StockWaitDetailsSelectDto extends BaseSelectDto {
 
 }

+ 11 - 2
hx-wms/src/main/java/com/fjhx/wms/entity/stock/po/StockWait.java

@@ -2,8 +2,10 @@ package com.fjhx.wms.entity.stock.po;
 
 import com.ruoyi.common.core.domain.BasePo;
 import com.baomidou.mybatisplus.annotation.TableName;
+
 import java.math.BigDecimal;
 import java.util.Date;
+
 import lombok.Getter;
 import lombok.Setter;
 
@@ -12,7 +14,7 @@ import lombok.Setter;
  * 待出入库
  * </p>
  *
- * @author 
+ * @author
  * @since 2023-03-22
  */
 @Getter
@@ -25,7 +27,9 @@ public class StockWait extends BasePo {
      */
     private Integer type;
 
-    /**业务类型*/
+    /**
+     * 业务类型
+     */
     private Integer businessType;
 
     /**
@@ -58,4 +62,9 @@ public class StockWait extends BasePo {
      */
     private Integer status;
 
+    /**
+     * 维多利亚扩展
+     */
+    private String victoriatouristJson;
+
 }

+ 52 - 0
hx-wms/src/main/java/com/fjhx/wms/entity/stock/po/StockWaitDetails.java

@@ -0,0 +1,52 @@
+package com.fjhx.wms.entity.stock.po;
+
+import com.ruoyi.common.core.domain.BasePo;
+import com.baomidou.mybatisplus.annotation.TableName;
+import java.math.BigDecimal;
+import java.util.Date;
+import lombok.Getter;
+import lombok.Setter;
+
+/**
+ * <p>
+ * 待出入库明细
+ * </p>
+ *
+ * @author 
+ * @since 2023-04-13
+ */
+@Getter
+@Setter
+@TableName("stock_wait_details")
+public class StockWaitDetails extends BasePo {
+
+    /**
+     * 待入库id
+     */
+    private Long stockWaitId;
+
+    /**
+     * 商品id
+     */
+    private Long productId;
+
+    /**
+     * 数量
+     */
+    private BigDecimal quantity;
+
+    /**
+     * 已入库数量
+     */
+    private BigDecimal receiptQuantity;
+
+    /**
+     * 维多利亚扩展
+     */
+    private String victoriatouristJson;
+
+    /**业务明细id*/
+
+    private Long businessDetailsId;
+
+}

+ 17 - 0
hx-wms/src/main/java/com/fjhx/wms/entity/stock/vo/StockWaitDetailsVo.java

@@ -0,0 +1,17 @@
+package com.fjhx.wms.entity.stock.vo;
+
+import com.fjhx.wms.entity.stock.po.StockWaitDetails;
+import lombok.Getter;
+import lombok.Setter;
+
+/**
+ * 待出入库明细列表查询返回值实体
+ *
+ * @author 
+ * @since 2023-04-13
+ */
+@Getter
+@Setter
+public class StockWaitDetailsVo extends StockWaitDetails {
+
+}

+ 8 - 0
hx-wms/src/main/java/com/fjhx/wms/entity/stock/vo/StockWaitVo.java

@@ -1,9 +1,12 @@
 package com.fjhx.wms.entity.stock.vo;
 
 import com.fjhx.wms.entity.stock.po.StockWait;
+import com.fjhx.wms.entity.stock.po.StockWaitDetails;
 import lombok.Getter;
 import lombok.Setter;
 
+import java.util.List;
+
 /**
  * 待出入库列表查询返回值实体
  *
@@ -19,4 +22,9 @@ public class StockWaitVo extends StockWait {
      */
     private String productName;
 
+    /**
+     * 待入库明细
+     */
+    private List<StockWaitDetailsVo> stockWaitDetailsList;
+
 }

+ 26 - 0
hx-wms/src/main/java/com/fjhx/wms/mapper/stock/StockWaitDetailsMapper.java

@@ -0,0 +1,26 @@
+package com.fjhx.wms.mapper.stock;
+
+import com.fjhx.wms.entity.stock.po.StockWaitDetails;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import com.fjhx.wms.entity.stock.vo.StockWaitDetailsVo;
+import com.ruoyi.common.utils.wrapper.IWrapper;
+import org.apache.ibatis.annotations.Param;
+
+
+/**
+ * <p>
+ * 待出入库明细 Mapper 接口
+ * </p>
+ *
+ * @author 
+ * @since 2023-04-13
+ */
+public interface StockWaitDetailsMapper extends BaseMapper<StockWaitDetails> {
+
+    /**
+     * 待出入库明细分页
+     */
+    Page<StockWaitDetailsVo> getPage(@Param("page") Page<Object> page, @Param("ew") IWrapper<StockWaitDetails> wrapper);
+
+}

+ 46 - 0
hx-wms/src/main/java/com/fjhx/wms/service/stock/StockWaitDetailsService.java

@@ -0,0 +1,46 @@
+package com.fjhx.wms.service.stock;
+
+import com.fjhx.wms.entity.stock.po.StockWaitDetails;
+import com.ruoyi.common.core.service.BaseService;
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import com.fjhx.wms.entity.stock.vo.StockWaitDetailsVo;
+import com.fjhx.wms.entity.stock.dto.StockWaitDetailsSelectDto;
+import com.fjhx.wms.entity.stock.dto.StockWaitDetailsDto;
+
+
+/**
+ * <p>
+ * 待出入库明细 服务类
+ * </p>
+ *
+ * @author 
+ * @since 2023-04-13
+ */
+public interface StockWaitDetailsService extends BaseService<StockWaitDetails> {
+
+    /**
+     * 待出入库明细分页
+     */
+    Page<StockWaitDetailsVo> getPage(StockWaitDetailsSelectDto dto);
+
+    /**
+     * 待出入库明细明细
+     */
+    StockWaitDetailsVo detail(Long id);
+
+    /**
+     * 待出入库明细新增
+     */
+    void add(StockWaitDetailsDto stockWaitDetailsDto);
+
+    /**
+     * 待出入库明细编辑
+     */
+    void edit(StockWaitDetailsDto stockWaitDetailsDto);
+
+    /**
+     * 待出入库明细删除
+     */
+    void delete(Long id);
+
+}

+ 57 - 0
hx-wms/src/main/java/com/fjhx/wms/service/stock/impl/StockWaitDetailsServiceImpl.java

@@ -0,0 +1,57 @@
+package com.fjhx.wms.service.stock.impl;
+
+import com.fjhx.wms.entity.stock.po.StockWaitDetails;
+import com.fjhx.wms.mapper.stock.StockWaitDetailsMapper;
+import com.fjhx.wms.service.stock.StockWaitDetailsService;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import org.springframework.stereotype.Service;
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import com.fjhx.wms.entity.stock.vo.StockWaitDetailsVo;
+import com.fjhx.wms.entity.stock.dto.StockWaitDetailsSelectDto;
+import com.ruoyi.common.utils.wrapper.IWrapper;
+import com.fjhx.wms.entity.stock.dto.StockWaitDetailsDto;
+import cn.hutool.core.bean.BeanUtil;
+
+
+/**
+ * <p>
+ * 待出入库明细 服务实现类
+ * </p>
+ *
+ * @author 
+ * @since 2023-04-13
+ */
+@Service
+public class StockWaitDetailsServiceImpl extends ServiceImpl<StockWaitDetailsMapper, StockWaitDetails> implements StockWaitDetailsService {
+
+    @Override
+    public Page<StockWaitDetailsVo> getPage(StockWaitDetailsSelectDto dto) {
+        IWrapper<StockWaitDetails> wrapper = getWrapper();
+        wrapper.orderByDesc("swd", StockWaitDetails::getId);
+        Page<StockWaitDetailsVo> page = this.baseMapper.getPage(dto.getPage(), wrapper);
+        return page;
+    }
+
+    @Override
+    public StockWaitDetailsVo detail(Long id) {
+        StockWaitDetails StockWaitDetails = this.getById(id);
+        StockWaitDetailsVo result = BeanUtil.toBean(StockWaitDetails, StockWaitDetailsVo.class);
+        return result;
+    }
+
+    @Override
+    public void add(StockWaitDetailsDto stockWaitDetailsDto) {
+        this.save(stockWaitDetailsDto);
+    }
+
+    @Override
+    public void edit(StockWaitDetailsDto stockWaitDetailsDto) {
+        this.updateById(stockWaitDetailsDto);
+    }
+
+    @Override
+    public void delete(Long id) {
+        this.removeById(id);
+    }
+
+}

+ 27 - 18
hx-wms/src/main/java/com/fjhx/wms/service/stock/impl/StockWaitServiceImpl.java

@@ -1,33 +1,26 @@
 package com.fjhx.wms.service.stock.impl;
 
+import cn.hutool.core.bean.BeanUtil;
 import cn.hutool.core.util.ObjectUtil;
 import com.baomidou.dynamic.datasource.annotation.DS;
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
 import com.fjhx.common.constant.SourceConstant;
 import com.fjhx.item.entity.product.po.ProductInfo;
 import com.fjhx.item.service.product.ProductInfoService;
-import com.fjhx.wms.entity.stock.po.Stock;
-import com.fjhx.wms.entity.stock.po.StockJournal;
-import com.fjhx.wms.entity.stock.po.StockJournalDetails;
-import com.fjhx.wms.entity.stock.po.StockWait;
-import com.fjhx.wms.entity.stock.vo.StockVo;
+import com.fjhx.wms.entity.stock.dto.StockWaitDto;
+import com.fjhx.wms.entity.stock.dto.StockWaitSelectDto;
+import com.fjhx.wms.entity.stock.po.*;
+import com.fjhx.wms.entity.stock.vo.StockWaitDetailsVo;
+import com.fjhx.wms.entity.stock.vo.StockWaitVo;
 import com.fjhx.wms.mapper.stock.StockWaitMapper;
-import com.fjhx.wms.service.stock.StockJournalDetailsService;
-import com.fjhx.wms.service.stock.StockJournalService;
-import com.fjhx.wms.service.stock.StockService;
-import com.fjhx.wms.service.stock.StockWaitService;
-import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import com.fjhx.wms.service.stock.*;
 import com.obs.services.internal.ServiceException;
+import com.ruoyi.common.utils.wrapper.IWrapper;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
-import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
-import com.fjhx.wms.entity.stock.vo.StockWaitVo;
-import com.fjhx.wms.entity.stock.dto.StockWaitSelectDto;
-import com.ruoyi.common.utils.wrapper.IWrapper;
-import com.fjhx.wms.entity.stock.dto.StockWaitDto;
-import cn.hutool.core.bean.BeanUtil;
 import org.springframework.transaction.annotation.Transactional;
 
-import java.util.ArrayList;
 import java.util.Arrays;
 import java.util.List;
 import java.util.Map;
@@ -53,6 +46,8 @@ public class StockWaitServiceImpl extends ServiceImpl<StockWaitMapper, StockWait
     StockJournalService stockJournalService;
     @Autowired
     StockJournalDetailsService stockJournalDetailsService;
+    @Autowired
+    StockWaitDetailsService stockWaitDetailsService;
 
     @Override
     public Page<StockWaitVo> getPage(StockWaitSelectDto dto) {
@@ -71,7 +66,7 @@ public class StockWaitServiceImpl extends ServiceImpl<StockWaitMapper, StockWait
                     Collectors.collectingAndThen(Collectors.toList(), value -> value.get(0))));
             for (StockWaitVo stockWaitVo : records) {
                 ProductInfo productInfo = productInfoMap.get(stockWaitVo.getProductId());
-                if(ObjectUtil.isNotEmpty(productInfo)) {
+                if (ObjectUtil.isNotEmpty(productInfo)) {
                     stockWaitVo.setProductName(productInfo.getName());
                 }
             }
@@ -89,6 +84,20 @@ public class StockWaitServiceImpl extends ServiceImpl<StockWaitMapper, StockWait
         return result;
     }
 
+    public StockWaitVo detailByWdly(Long id) {
+        StockWaitVo detail = detail(id);
+        List<StockWaitDetails> list = stockWaitDetailsService.list(q -> q.eq(StockWaitDetails::getStockWaitId, id));
+        List<StockWaitDetailsVo> stockWaitDetailsVos = BeanUtil.copyToList(list, StockWaitDetailsVo.class);
+        //根据业务id(到货id)查询采购单id
+
+        //赋值物品信息和采购信息
+        for (StockWaitDetails stockWaitDetails : stockWaitDetailsVos) {
+
+        }
+        detail.setStockWaitDetailsList(stockWaitDetailsVos);
+        return detail;
+    }
+
     @Transactional(rollbackFor = Exception.class)
     @Override
     public void add(StockWaitDto stockWaitDto) {

+ 20 - 0
hx-wms/src/main/resources/mapper/stock/StockWaitDetailsMapper.xml

@@ -0,0 +1,20 @@
+<?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.fjhx.wms.mapper.stock.StockWaitDetailsMapper">
+    <select id="getPage" resultType="com.fjhx.wms.entity.stock.vo.StockWaitDetailsVo">
+        select
+            swd.id,
+            swd.stock_wait_id,
+            swd.product_id,
+            swd.quantity,
+            swd.receipt_quantity,
+            swd.create_user,
+            swd.create_time,
+            swd.update_user,
+            swd.update_time,
+            swd.victoriatourist_json
+        from stock_wait_details swd
+            ${ew.customSqlSegment}
+    </select>
+
+</mapper>