瀏覽代碼

EHSD交接单采购

caozj 2 年之前
父節點
當前提交
03c96022d5
共有 53 個文件被更改,包括 2051 次插入1 次删除
  1. 0 0
      hx-ehsd/src/main/java/com/fjhx/ehsd/a-json/EhsdPurchaseApi.json
  2. 0 0
      hx-ehsd/src/main/java/com/fjhx/ehsd/a-json/EhsdPurchaseArrivalApi.json
  3. 0 0
      hx-ehsd/src/main/java/com/fjhx/ehsd/a-json/EhsdPurchaseProductApi.json
  4. 0 0
      hx-ehsd/src/main/java/com/fjhx/ehsd/a-json/EhsdPurchaseProductMountingsApi.json
  5. 0 0
      hx-ehsd/src/main/java/com/fjhx/ehsd/a-json/EhsdPurchaseProjectApi.json
  6. 68 0
      hx-ehsd/src/main/java/com/fjhx/ehsd/controller/purchase/EhsdPurchaseArrivalController.java
  7. 68 0
      hx-ehsd/src/main/java/com/fjhx/ehsd/controller/purchase/EhsdPurchaseController.java
  8. 68 0
      hx-ehsd/src/main/java/com/fjhx/ehsd/controller/purchase/EhsdPurchaseProductController.java
  9. 68 0
      hx-ehsd/src/main/java/com/fjhx/ehsd/controller/purchase/EhsdPurchaseProductMountingsController.java
  10. 68 0
      hx-ehsd/src/main/java/com/fjhx/ehsd/controller/purchase/EhsdPurchaseProjectController.java
  11. 17 0
      hx-ehsd/src/main/java/com/fjhx/ehsd/entity/purchase/dto/EhsdPurchaseArrivalDto.java
  12. 17 0
      hx-ehsd/src/main/java/com/fjhx/ehsd/entity/purchase/dto/EhsdPurchaseArrivalSelectDto.java
  13. 17 0
      hx-ehsd/src/main/java/com/fjhx/ehsd/entity/purchase/dto/EhsdPurchaseDto.java
  14. 17 0
      hx-ehsd/src/main/java/com/fjhx/ehsd/entity/purchase/dto/EhsdPurchaseProductDto.java
  15. 17 0
      hx-ehsd/src/main/java/com/fjhx/ehsd/entity/purchase/dto/EhsdPurchaseProductMountingsDto.java
  16. 17 0
      hx-ehsd/src/main/java/com/fjhx/ehsd/entity/purchase/dto/EhsdPurchaseProductMountingsSelectDto.java
  17. 17 0
      hx-ehsd/src/main/java/com/fjhx/ehsd/entity/purchase/dto/EhsdPurchaseProductSelectDto.java
  18. 17 0
      hx-ehsd/src/main/java/com/fjhx/ehsd/entity/purchase/dto/EhsdPurchaseProjectDto.java
  19. 17 0
      hx-ehsd/src/main/java/com/fjhx/ehsd/entity/purchase/dto/EhsdPurchaseProjectSelectDto.java
  20. 17 0
      hx-ehsd/src/main/java/com/fjhx/ehsd/entity/purchase/dto/EhsdPurchaseSelectDto.java
  21. 188 0
      hx-ehsd/src/main/java/com/fjhx/ehsd/entity/purchase/po/EhsdPurchase.java
  22. 48 0
      hx-ehsd/src/main/java/com/fjhx/ehsd/entity/purchase/po/EhsdPurchaseArrival.java
  23. 92 0
      hx-ehsd/src/main/java/com/fjhx/ehsd/entity/purchase/po/EhsdPurchaseProduct.java
  24. 68 0
      hx-ehsd/src/main/java/com/fjhx/ehsd/entity/purchase/po/EhsdPurchaseProductMountings.java
  25. 44 0
      hx-ehsd/src/main/java/com/fjhx/ehsd/entity/purchase/po/EhsdPurchaseProject.java
  26. 17 0
      hx-ehsd/src/main/java/com/fjhx/ehsd/entity/purchase/vo/EhsdPurchaseArrivalVo.java
  27. 17 0
      hx-ehsd/src/main/java/com/fjhx/ehsd/entity/purchase/vo/EhsdPurchaseProductMountingsVo.java
  28. 17 0
      hx-ehsd/src/main/java/com/fjhx/ehsd/entity/purchase/vo/EhsdPurchaseProductVo.java
  29. 17 0
      hx-ehsd/src/main/java/com/fjhx/ehsd/entity/purchase/vo/EhsdPurchaseProjectVo.java
  30. 17 0
      hx-ehsd/src/main/java/com/fjhx/ehsd/entity/purchase/vo/EhsdPurchaseVo.java
  31. 134 0
      hx-ehsd/src/main/java/com/fjhx/ehsd/flow/EhsdPurchaseFlow.java
  32. 26 0
      hx-ehsd/src/main/java/com/fjhx/ehsd/mapper/purchase/EhsdPurchaseArrivalMapper.java
  33. 26 0
      hx-ehsd/src/main/java/com/fjhx/ehsd/mapper/purchase/EhsdPurchaseMapper.java
  34. 26 0
      hx-ehsd/src/main/java/com/fjhx/ehsd/mapper/purchase/EhsdPurchaseProductMapper.java
  35. 26 0
      hx-ehsd/src/main/java/com/fjhx/ehsd/mapper/purchase/EhsdPurchaseProductMountingsMapper.java
  36. 26 0
      hx-ehsd/src/main/java/com/fjhx/ehsd/mapper/purchase/EhsdPurchaseProjectMapper.java
  37. 46 0
      hx-ehsd/src/main/java/com/fjhx/ehsd/service/purchase/EhsdPurchaseArrivalService.java
  38. 46 0
      hx-ehsd/src/main/java/com/fjhx/ehsd/service/purchase/EhsdPurchaseProductMountingsService.java
  39. 46 0
      hx-ehsd/src/main/java/com/fjhx/ehsd/service/purchase/EhsdPurchaseProductService.java
  40. 46 0
      hx-ehsd/src/main/java/com/fjhx/ehsd/service/purchase/EhsdPurchaseProjectService.java
  41. 46 0
      hx-ehsd/src/main/java/com/fjhx/ehsd/service/purchase/EhsdPurchaseService.java
  42. 57 0
      hx-ehsd/src/main/java/com/fjhx/ehsd/service/purchase/impl/EhsdPurchaseArrivalServiceImpl.java
  43. 57 0
      hx-ehsd/src/main/java/com/fjhx/ehsd/service/purchase/impl/EhsdPurchaseProductMountingsServiceImpl.java
  44. 57 0
      hx-ehsd/src/main/java/com/fjhx/ehsd/service/purchase/impl/EhsdPurchaseProductServiceImpl.java
  45. 57 0
      hx-ehsd/src/main/java/com/fjhx/ehsd/service/purchase/impl/EhsdPurchaseProjectServiceImpl.java
  46. 57 0
      hx-ehsd/src/main/java/com/fjhx/ehsd/service/purchase/impl/EhsdPurchaseServiceImpl.java
  47. 103 0
      hx-ehsd/src/main/java/com/fjhx/ehsd/util/CodeEnum.java
  48. 20 0
      hx-ehsd/src/main/resources/mapper/purchase/EhsdPurchaseArrivalMapper.xml
  49. 46 0
      hx-ehsd/src/main/resources/mapper/purchase/EhsdPurchaseMapper.xml
  50. 24 0
      hx-ehsd/src/main/resources/mapper/purchase/EhsdPurchaseProductMapper.xml
  51. 24 0
      hx-ehsd/src/main/resources/mapper/purchase/EhsdPurchaseProductMountingsMapper.xml
  52. 19 0
      hx-ehsd/src/main/resources/mapper/purchase/EhsdPurchaseProjectMapper.xml
  53. 1 1
      hx-sale/src/main/java/com/fjhx/sale/flow/PurchaseFlow.java

File diff suppressed because it is too large
+ 0 - 0
hx-ehsd/src/main/java/com/fjhx/ehsd/a-json/EhsdPurchaseApi.json


File diff suppressed because it is too large
+ 0 - 0
hx-ehsd/src/main/java/com/fjhx/ehsd/a-json/EhsdPurchaseArrivalApi.json


File diff suppressed because it is too large
+ 0 - 0
hx-ehsd/src/main/java/com/fjhx/ehsd/a-json/EhsdPurchaseProductApi.json


File diff suppressed because it is too large
+ 0 - 0
hx-ehsd/src/main/java/com/fjhx/ehsd/a-json/EhsdPurchaseProductMountingsApi.json


File diff suppressed because it is too large
+ 0 - 0
hx-ehsd/src/main/java/com/fjhx/ehsd/a-json/EhsdPurchaseProjectApi.json


+ 68 - 0
hx-ehsd/src/main/java/com/fjhx/ehsd/controller/purchase/EhsdPurchaseArrivalController.java

@@ -0,0 +1,68 @@
+package com.fjhx.ehsd.controller.purchase;
+
+import org.springframework.web.bind.annotation.*;
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import com.fjhx.ehsd.entity.purchase.vo.EhsdPurchaseArrivalVo;
+import com.fjhx.ehsd.entity.purchase.dto.EhsdPurchaseArrivalSelectDto;
+import com.fjhx.ehsd.entity.purchase.dto.EhsdPurchaseArrivalDto;
+import com.ruoyi.common.core.domain.BaseSelectDto;
+import com.fjhx.ehsd.service.purchase.EhsdPurchaseArrivalService;
+import org.springframework.beans.factory.annotation.Autowired;
+
+
+/**
+ * <p>
+ * 采购合同-到货计划 前端控制器
+ * </p>
+ *
+ * @author 
+ * @since 2023-05-17
+ */
+@RestController
+@RequestMapping("/ehsdPurchaseArrival")
+public class EhsdPurchaseArrivalController {
+
+    @Autowired
+    private EhsdPurchaseArrivalService ehsdPurchaseArrivalService;
+
+    /**
+     * 采购合同-到货计划分页
+     */
+    @PostMapping("/page")
+    public Page<EhsdPurchaseArrivalVo> page(@RequestBody EhsdPurchaseArrivalSelectDto dto) {
+        return ehsdPurchaseArrivalService.getPage(dto);
+    }
+
+    /**
+     * 采购合同-到货计划明细
+     */
+    @PostMapping("/detail")
+    public EhsdPurchaseArrivalVo detail(@RequestBody BaseSelectDto dto) {
+        return ehsdPurchaseArrivalService.detail(dto.getId());
+    }
+
+    /**
+     * 采购合同-到货计划新增
+     */
+    @PostMapping("/add")
+    public void add(@RequestBody EhsdPurchaseArrivalDto ehsdPurchaseArrivalDto) {
+        ehsdPurchaseArrivalService.add(ehsdPurchaseArrivalDto);
+    }
+
+    /**
+     * 采购合同-到货计划编辑
+     */
+    @PostMapping("/edit")
+    public void edit(@RequestBody EhsdPurchaseArrivalDto ehsdPurchaseArrivalDto) {
+        ehsdPurchaseArrivalService.edit(ehsdPurchaseArrivalDto);
+    }
+
+    /**
+     * 采购合同-到货计划删除
+     */
+    @PostMapping("/delete")
+    public void delete(@RequestBody BaseSelectDto dto) {
+        ehsdPurchaseArrivalService.delete(dto.getId());
+    }
+
+}

+ 68 - 0
hx-ehsd/src/main/java/com/fjhx/ehsd/controller/purchase/EhsdPurchaseController.java

@@ -0,0 +1,68 @@
+package com.fjhx.ehsd.controller.purchase;
+
+import org.springframework.web.bind.annotation.*;
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import com.fjhx.ehsd.entity.purchase.vo.EhsdPurchaseVo;
+import com.fjhx.ehsd.entity.purchase.dto.EhsdPurchaseSelectDto;
+import com.fjhx.ehsd.entity.purchase.dto.EhsdPurchaseDto;
+import com.ruoyi.common.core.domain.BaseSelectDto;
+import com.fjhx.ehsd.service.purchase.EhsdPurchaseService;
+import org.springframework.beans.factory.annotation.Autowired;
+
+
+/**
+ * <p>
+ * ehsd采购表 前端控制器
+ * </p>
+ *
+ * @author 
+ * @since 2023-05-17
+ */
+@RestController
+@RequestMapping("/ehsdPurchase")
+public class EhsdPurchaseController {
+
+    @Autowired
+    private EhsdPurchaseService ehsdPurchaseService;
+
+    /**
+     * ehsd采购表分页
+     */
+    @PostMapping("/page")
+    public Page<EhsdPurchaseVo> page(@RequestBody EhsdPurchaseSelectDto dto) {
+        return ehsdPurchaseService.getPage(dto);
+    }
+
+    /**
+     * ehsd采购表明细
+     */
+    @PostMapping("/detail")
+    public EhsdPurchaseVo detail(@RequestBody BaseSelectDto dto) {
+        return ehsdPurchaseService.detail(dto.getId());
+    }
+
+    /**
+     * ehsd采购表新增
+     */
+    @PostMapping("/add")
+    public void add(@RequestBody EhsdPurchaseDto ehsdPurchaseDto) {
+        ehsdPurchaseService.add(ehsdPurchaseDto);
+    }
+
+    /**
+     * ehsd采购表编辑
+     */
+    @PostMapping("/edit")
+    public void edit(@RequestBody EhsdPurchaseDto ehsdPurchaseDto) {
+        ehsdPurchaseService.edit(ehsdPurchaseDto);
+    }
+
+    /**
+     * ehsd采购表删除
+     */
+    @PostMapping("/delete")
+    public void delete(@RequestBody BaseSelectDto dto) {
+        ehsdPurchaseService.delete(dto.getId());
+    }
+
+}

+ 68 - 0
hx-ehsd/src/main/java/com/fjhx/ehsd/controller/purchase/EhsdPurchaseProductController.java

@@ -0,0 +1,68 @@
+package com.fjhx.ehsd.controller.purchase;
+
+import org.springframework.web.bind.annotation.*;
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import com.fjhx.ehsd.entity.purchase.vo.EhsdPurchaseProductVo;
+import com.fjhx.ehsd.entity.purchase.dto.EhsdPurchaseProductSelectDto;
+import com.fjhx.ehsd.entity.purchase.dto.EhsdPurchaseProductDto;
+import com.ruoyi.common.core.domain.BaseSelectDto;
+import com.fjhx.ehsd.service.purchase.EhsdPurchaseProductService;
+import org.springframework.beans.factory.annotation.Autowired;
+
+
+/**
+ * <p>
+ * ehsd采购产品表 前端控制器
+ * </p>
+ *
+ * @author 
+ * @since 2023-05-17
+ */
+@RestController
+@RequestMapping("/ehsdPurchaseProduct")
+public class EhsdPurchaseProductController {
+
+    @Autowired
+    private EhsdPurchaseProductService ehsdPurchaseProductService;
+
+    /**
+     * ehsd采购产品表分页
+     */
+    @PostMapping("/page")
+    public Page<EhsdPurchaseProductVo> page(@RequestBody EhsdPurchaseProductSelectDto dto) {
+        return ehsdPurchaseProductService.getPage(dto);
+    }
+
+    /**
+     * ehsd采购产品表明细
+     */
+    @PostMapping("/detail")
+    public EhsdPurchaseProductVo detail(@RequestBody BaseSelectDto dto) {
+        return ehsdPurchaseProductService.detail(dto.getId());
+    }
+
+    /**
+     * ehsd采购产品表新增
+     */
+    @PostMapping("/add")
+    public void add(@RequestBody EhsdPurchaseProductDto ehsdPurchaseProductDto) {
+        ehsdPurchaseProductService.add(ehsdPurchaseProductDto);
+    }
+
+    /**
+     * ehsd采购产品表编辑
+     */
+    @PostMapping("/edit")
+    public void edit(@RequestBody EhsdPurchaseProductDto ehsdPurchaseProductDto) {
+        ehsdPurchaseProductService.edit(ehsdPurchaseProductDto);
+    }
+
+    /**
+     * ehsd采购产品表删除
+     */
+    @PostMapping("/delete")
+    public void delete(@RequestBody BaseSelectDto dto) {
+        ehsdPurchaseProductService.delete(dto.getId());
+    }
+
+}

+ 68 - 0
hx-ehsd/src/main/java/com/fjhx/ehsd/controller/purchase/EhsdPurchaseProductMountingsController.java

@@ -0,0 +1,68 @@
+package com.fjhx.ehsd.controller.purchase;
+
+import org.springframework.web.bind.annotation.*;
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import com.fjhx.ehsd.entity.purchase.vo.EhsdPurchaseProductMountingsVo;
+import com.fjhx.ehsd.entity.purchase.dto.EhsdPurchaseProductMountingsSelectDto;
+import com.fjhx.ehsd.entity.purchase.dto.EhsdPurchaseProductMountingsDto;
+import com.ruoyi.common.core.domain.BaseSelectDto;
+import com.fjhx.ehsd.service.purchase.EhsdPurchaseProductMountingsService;
+import org.springframework.beans.factory.annotation.Autowired;
+
+
+/**
+ * <p>
+ * ehsd采购产品配件表 前端控制器
+ * </p>
+ *
+ * @author 
+ * @since 2023-05-17
+ */
+@RestController
+@RequestMapping("/ehsdPurchaseProductMountings")
+public class EhsdPurchaseProductMountingsController {
+
+    @Autowired
+    private EhsdPurchaseProductMountingsService ehsdPurchaseProductMountingsService;
+
+    /**
+     * ehsd采购产品配件表分页
+     */
+    @PostMapping("/page")
+    public Page<EhsdPurchaseProductMountingsVo> page(@RequestBody EhsdPurchaseProductMountingsSelectDto dto) {
+        return ehsdPurchaseProductMountingsService.getPage(dto);
+    }
+
+    /**
+     * ehsd采购产品配件表明细
+     */
+    @PostMapping("/detail")
+    public EhsdPurchaseProductMountingsVo detail(@RequestBody BaseSelectDto dto) {
+        return ehsdPurchaseProductMountingsService.detail(dto.getId());
+    }
+
+    /**
+     * ehsd采购产品配件表新增
+     */
+    @PostMapping("/add")
+    public void add(@RequestBody EhsdPurchaseProductMountingsDto ehsdPurchaseProductMountingsDto) {
+        ehsdPurchaseProductMountingsService.add(ehsdPurchaseProductMountingsDto);
+    }
+
+    /**
+     * ehsd采购产品配件表编辑
+     */
+    @PostMapping("/edit")
+    public void edit(@RequestBody EhsdPurchaseProductMountingsDto ehsdPurchaseProductMountingsDto) {
+        ehsdPurchaseProductMountingsService.edit(ehsdPurchaseProductMountingsDto);
+    }
+
+    /**
+     * ehsd采购产品配件表删除
+     */
+    @PostMapping("/delete")
+    public void delete(@RequestBody BaseSelectDto dto) {
+        ehsdPurchaseProductMountingsService.delete(dto.getId());
+    }
+
+}

+ 68 - 0
hx-ehsd/src/main/java/com/fjhx/ehsd/controller/purchase/EhsdPurchaseProjectController.java

@@ -0,0 +1,68 @@
+package com.fjhx.ehsd.controller.purchase;
+
+import org.springframework.web.bind.annotation.*;
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import com.fjhx.ehsd.entity.purchase.vo.EhsdPurchaseProjectVo;
+import com.fjhx.ehsd.entity.purchase.dto.EhsdPurchaseProjectSelectDto;
+import com.fjhx.ehsd.entity.purchase.dto.EhsdPurchaseProjectDto;
+import com.ruoyi.common.core.domain.BaseSelectDto;
+import com.fjhx.ehsd.service.purchase.EhsdPurchaseProjectService;
+import org.springframework.beans.factory.annotation.Autowired;
+
+
+/**
+ * <p>
+ * 采购合同-收费项目 前端控制器
+ * </p>
+ *
+ * @author 
+ * @since 2023-05-17
+ */
+@RestController
+@RequestMapping("/ehsdPurchaseProject")
+public class EhsdPurchaseProjectController {
+
+    @Autowired
+    private EhsdPurchaseProjectService ehsdPurchaseProjectService;
+
+    /**
+     * 采购合同-收费项目分页
+     */
+    @PostMapping("/page")
+    public Page<EhsdPurchaseProjectVo> page(@RequestBody EhsdPurchaseProjectSelectDto dto) {
+        return ehsdPurchaseProjectService.getPage(dto);
+    }
+
+    /**
+     * 采购合同-收费项目明细
+     */
+    @PostMapping("/detail")
+    public EhsdPurchaseProjectVo detail(@RequestBody BaseSelectDto dto) {
+        return ehsdPurchaseProjectService.detail(dto.getId());
+    }
+
+    /**
+     * 采购合同-收费项目新增
+     */
+    @PostMapping("/add")
+    public void add(@RequestBody EhsdPurchaseProjectDto ehsdPurchaseProjectDto) {
+        ehsdPurchaseProjectService.add(ehsdPurchaseProjectDto);
+    }
+
+    /**
+     * 采购合同-收费项目编辑
+     */
+    @PostMapping("/edit")
+    public void edit(@RequestBody EhsdPurchaseProjectDto ehsdPurchaseProjectDto) {
+        ehsdPurchaseProjectService.edit(ehsdPurchaseProjectDto);
+    }
+
+    /**
+     * 采购合同-收费项目删除
+     */
+    @PostMapping("/delete")
+    public void delete(@RequestBody BaseSelectDto dto) {
+        ehsdPurchaseProjectService.delete(dto.getId());
+    }
+
+}

+ 17 - 0
hx-ehsd/src/main/java/com/fjhx/ehsd/entity/purchase/dto/EhsdPurchaseArrivalDto.java

@@ -0,0 +1,17 @@
+package com.fjhx.ehsd.entity.purchase.dto;
+
+import com.fjhx.ehsd.entity.purchase.po.EhsdPurchaseArrival;
+import lombok.Getter;
+import lombok.Setter;
+
+/**
+ * 采购合同-到货计划新增编辑入参实体
+ *
+ * @author 
+ * @since 2023-05-17
+ */
+@Getter
+@Setter
+public class EhsdPurchaseArrivalDto extends EhsdPurchaseArrival {
+
+}

+ 17 - 0
hx-ehsd/src/main/java/com/fjhx/ehsd/entity/purchase/dto/EhsdPurchaseArrivalSelectDto.java

@@ -0,0 +1,17 @@
+package com.fjhx.ehsd.entity.purchase.dto;
+
+import com.ruoyi.common.core.domain.BaseSelectDto;
+import lombok.Getter;
+import lombok.Setter;
+
+/**
+ * 采购合同-到货计划列表查询入参实体
+ *
+ * @author 
+ * @since 2023-05-17
+ */
+@Getter
+@Setter
+public class EhsdPurchaseArrivalSelectDto extends BaseSelectDto {
+
+}

+ 17 - 0
hx-ehsd/src/main/java/com/fjhx/ehsd/entity/purchase/dto/EhsdPurchaseDto.java

@@ -0,0 +1,17 @@
+package com.fjhx.ehsd.entity.purchase.dto;
+
+import com.fjhx.ehsd.entity.purchase.po.EhsdPurchase;
+import lombok.Getter;
+import lombok.Setter;
+
+/**
+ * ehsd采购表新增编辑入参实体
+ *
+ * @author 
+ * @since 2023-05-17
+ */
+@Getter
+@Setter
+public class EhsdPurchaseDto extends EhsdPurchase {
+
+}

+ 17 - 0
hx-ehsd/src/main/java/com/fjhx/ehsd/entity/purchase/dto/EhsdPurchaseProductDto.java

@@ -0,0 +1,17 @@
+package com.fjhx.ehsd.entity.purchase.dto;
+
+import com.fjhx.ehsd.entity.purchase.po.EhsdPurchaseProduct;
+import lombok.Getter;
+import lombok.Setter;
+
+/**
+ * ehsd采购产品表新增编辑入参实体
+ *
+ * @author 
+ * @since 2023-05-17
+ */
+@Getter
+@Setter
+public class EhsdPurchaseProductDto extends EhsdPurchaseProduct {
+
+}

+ 17 - 0
hx-ehsd/src/main/java/com/fjhx/ehsd/entity/purchase/dto/EhsdPurchaseProductMountingsDto.java

@@ -0,0 +1,17 @@
+package com.fjhx.ehsd.entity.purchase.dto;
+
+import com.fjhx.ehsd.entity.purchase.po.EhsdPurchaseProductMountings;
+import lombok.Getter;
+import lombok.Setter;
+
+/**
+ * ehsd采购产品配件表新增编辑入参实体
+ *
+ * @author 
+ * @since 2023-05-17
+ */
+@Getter
+@Setter
+public class EhsdPurchaseProductMountingsDto extends EhsdPurchaseProductMountings {
+
+}

+ 17 - 0
hx-ehsd/src/main/java/com/fjhx/ehsd/entity/purchase/dto/EhsdPurchaseProductMountingsSelectDto.java

@@ -0,0 +1,17 @@
+package com.fjhx.ehsd.entity.purchase.dto;
+
+import com.ruoyi.common.core.domain.BaseSelectDto;
+import lombok.Getter;
+import lombok.Setter;
+
+/**
+ * ehsd采购产品配件表列表查询入参实体
+ *
+ * @author 
+ * @since 2023-05-17
+ */
+@Getter
+@Setter
+public class EhsdPurchaseProductMountingsSelectDto extends BaseSelectDto {
+
+}

+ 17 - 0
hx-ehsd/src/main/java/com/fjhx/ehsd/entity/purchase/dto/EhsdPurchaseProductSelectDto.java

@@ -0,0 +1,17 @@
+package com.fjhx.ehsd.entity.purchase.dto;
+
+import com.ruoyi.common.core.domain.BaseSelectDto;
+import lombok.Getter;
+import lombok.Setter;
+
+/**
+ * ehsd采购产品表列表查询入参实体
+ *
+ * @author 
+ * @since 2023-05-17
+ */
+@Getter
+@Setter
+public class EhsdPurchaseProductSelectDto extends BaseSelectDto {
+
+}

+ 17 - 0
hx-ehsd/src/main/java/com/fjhx/ehsd/entity/purchase/dto/EhsdPurchaseProjectDto.java

@@ -0,0 +1,17 @@
+package com.fjhx.ehsd.entity.purchase.dto;
+
+import com.fjhx.ehsd.entity.purchase.po.EhsdPurchaseProject;
+import lombok.Getter;
+import lombok.Setter;
+
+/**
+ * 采购合同-收费项目新增编辑入参实体
+ *
+ * @author 
+ * @since 2023-05-17
+ */
+@Getter
+@Setter
+public class EhsdPurchaseProjectDto extends EhsdPurchaseProject {
+
+}

+ 17 - 0
hx-ehsd/src/main/java/com/fjhx/ehsd/entity/purchase/dto/EhsdPurchaseProjectSelectDto.java

@@ -0,0 +1,17 @@
+package com.fjhx.ehsd.entity.purchase.dto;
+
+import com.ruoyi.common.core.domain.BaseSelectDto;
+import lombok.Getter;
+import lombok.Setter;
+
+/**
+ * 采购合同-收费项目列表查询入参实体
+ *
+ * @author 
+ * @since 2023-05-17
+ */
+@Getter
+@Setter
+public class EhsdPurchaseProjectSelectDto extends BaseSelectDto {
+
+}

+ 17 - 0
hx-ehsd/src/main/java/com/fjhx/ehsd/entity/purchase/dto/EhsdPurchaseSelectDto.java

@@ -0,0 +1,17 @@
+package com.fjhx.ehsd.entity.purchase.dto;
+
+import com.ruoyi.common.core.domain.BaseSelectDto;
+import lombok.Getter;
+import lombok.Setter;
+
+/**
+ * ehsd采购表列表查询入参实体
+ *
+ * @author 
+ * @since 2023-05-17
+ */
+@Getter
+@Setter
+public class EhsdPurchaseSelectDto extends BaseSelectDto {
+
+}

+ 188 - 0
hx-ehsd/src/main/java/com/fjhx/ehsd/entity/purchase/po/EhsdPurchase.java

@@ -0,0 +1,188 @@
+package com.fjhx.ehsd.entity.purchase.po;
+
+import com.baomidou.mybatisplus.annotation.TableField;
+import com.ruoyi.common.core.domain.BasePo;
+import com.baomidou.mybatisplus.annotation.TableName;
+import java.math.BigDecimal;
+import java.util.Date;
+import java.util.List;
+
+import lombok.Getter;
+import lombok.Setter;
+
+/**
+ * <p>
+ * ehsd采购表
+ * </p>
+ *
+ * @author 
+ * @since 2023-05-17
+ */
+@Getter
+@Setter
+@TableName("ehsd_purchase")
+public class EhsdPurchase extends BasePo {
+
+    /**
+     * 编码
+     */
+    private String code;
+
+    /**
+     * 合同模版ID
+     */
+    private Long contractTemplateId;
+
+    /**
+     * 卖方公司ID
+     */
+    private Long sellCorporationId;
+
+    /**
+     * 卖方联系人名称
+     */
+    private String sellContactName;
+
+    /**
+     * 卖方联系人电话
+     */
+    private String sellContactNumber;
+
+    /**
+     * 卖方国家表id
+     */
+    private String sellCountryId;
+
+    /**
+     * 卖方省份id
+     */
+    private String sellProvinceId;
+
+    /**
+     * 卖方城市id
+     */
+    private String sellCityId;
+
+    /**
+     * 卖方详细地址
+     */
+    private String sellAddress;
+
+    /**
+     * 买方公司ID
+     */
+    private Long buyCorporationId;
+
+    /**
+     * 买方联系人名称
+     */
+    private String buyContactName;
+
+    /**
+     * 买方联系人电话
+     */
+    private String buyContactNumber;
+
+    /**
+     * 买方国家表id
+     */
+    private String buyCountryId;
+
+    /**
+     * 买方省份id
+     */
+    private String buyProvinceId;
+
+    /**
+     * 买方城市id
+     */
+    private String buyCityId;
+
+    /**
+     * 买方详细地址
+     */
+    private String buyAddress;
+
+    /**
+     * 买方邮编
+     */
+    private String buyPostalCode;
+
+    /**
+     * 审批状态 0草稿 10、审批中;20、驳回  30、审批通过 88:作废   99终止
+     */
+    private Integer status;
+
+    /**
+     * 采购总金额
+     */
+    private BigDecimal amount;
+
+    /**
+     * 条款内容
+     */
+    private String remark;
+
+    /**
+     * 币种(字典account_currency)
+     */
+    private String currency;
+
+    /**
+     * 交期
+     */
+    private String deliveryTime;
+
+    /**
+     * 交货类型字典(delivery_type)
+     */
+    private String deliveryType;
+
+    /**
+     * 发票类型
+     */
+    private String invoiceType;
+
+    /**
+     * 付款方式(字典funds_payment_method
+     */
+    private String paymentMethod;
+
+    /**
+     * 质保期
+     */
+    private Integer warranty;
+
+    /**
+     * 流程KEY
+     */
+    private String processInstanceId;
+
+    /**
+     * 审核通过时间
+     */
+    private Date approvedDate;
+
+    /**
+     * 创建人名称
+     */
+    private String userName;
+
+    /**
+     * 采购到货列表
+     */
+    @TableField(exist = false)
+    private List<EhsdPurchaseArrival> purchaseArrivalList;
+
+    /**
+     * 采购商品列表
+     */
+    @TableField(exist = false)
+    private List<EhsdPurchaseProduct> purchaseProductList;
+
+    /**
+     * 采购商品列表
+     */
+    @TableField(exist = false)
+    private List<EhsdPurchaseProject> purchaseProjectList;
+}

+ 48 - 0
hx-ehsd/src/main/java/com/fjhx/ehsd/entity/purchase/po/EhsdPurchaseArrival.java

@@ -0,0 +1,48 @@
+package com.fjhx.ehsd.entity.purchase.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-05-17
+ */
+@Getter
+@Setter
+@TableName("ehsd_purchase_arrival")
+public class EhsdPurchaseArrival extends BasePo {
+
+    /**
+     * 采购合同ID
+     */
+    private Long purchaseId;
+
+    /**
+     * 商品ID
+     */
+    private Long productId;
+
+    /**
+     * 到货日期
+     */
+    private Date arrivalTime;
+
+    /**
+     * 到货数量
+     */
+    private BigDecimal quantity;
+
+    /**
+     * 备注
+     */
+    private String remark;
+
+}

+ 92 - 0
hx-ehsd/src/main/java/com/fjhx/ehsd/entity/purchase/po/EhsdPurchaseProduct.java

@@ -0,0 +1,92 @@
+package com.fjhx.ehsd.entity.purchase.po;
+
+import com.baomidou.mybatisplus.annotation.TableField;
+import com.fjhx.file.entity.ObsFile;
+import com.ruoyi.common.core.domain.BasePo;
+import com.baomidou.mybatisplus.annotation.TableName;
+import java.math.BigDecimal;
+import java.util.List;
+
+import lombok.Getter;
+import lombok.Setter;
+
+/**
+ * <p>
+ * ehsd采购产品表
+ * </p>
+ *
+ * @author 
+ * @since 2023-05-17
+ */
+@Getter
+@Setter
+@TableName("ehsd_purchase_product")
+public class EhsdPurchaseProduct extends BasePo {
+
+    /**
+     * 采购单ID
+     */
+    private Long purchaseId;
+
+    /**
+     * 商品ID
+     */
+    private Long productId;
+
+    /**
+     * 商品名称
+     */
+    private String productName;
+
+    /**
+     * 商品型号
+     */
+    private String productModel;
+
+    /**
+     * 商品数量
+     */
+    private BigDecimal quantity;
+
+    /**
+     * 商品单价
+     */
+    private BigDecimal price;
+
+    /**
+     * 商品金额
+     */
+    private BigDecimal amount;
+
+    /**
+     * 备注
+     */
+    private String remark;
+
+    /**
+     * 尔弘时代扩展JSON
+     */
+    private String json;
+
+    /**
+     * 业务来源 0自建  1外销合同采购
+     */
+    private Integer dataResource;
+
+    /**
+     * 业务来源ID
+     */
+    private Long dataResourceId;
+
+    /**
+     * 产品配件列表
+     */
+    @TableField(exist = false)
+    private List<EhsdPurchaseProductMountings> purchaseProductMountingsList;
+
+    /**
+     * 附件列表
+     */
+    @TableField(exist = false)
+    private List<ObsFile> fileList;
+}

+ 68 - 0
hx-ehsd/src/main/java/com/fjhx/ehsd/entity/purchase/po/EhsdPurchaseProductMountings.java

@@ -0,0 +1,68 @@
+package com.fjhx.ehsd.entity.purchase.po;
+
+import com.ruoyi.common.core.domain.BasePo;
+import com.baomidou.mybatisplus.annotation.TableName;
+import java.math.BigDecimal;
+
+import lombok.Getter;
+import lombok.Setter;
+
+/**
+ * <p>
+ * ehsd采购产品配件表
+ * </p>
+ *
+ * @author 
+ * @since 2023-05-17
+ */
+@Getter
+@Setter
+@TableName("ehsd_purchase_product_mountings")
+public class EhsdPurchaseProductMountings extends BasePo {
+
+    /**
+     * 采购单ID
+     */
+    private Long purchaseProductId;
+
+    /**
+     * 商品ID
+     */
+    private Long productId;
+
+    /**
+     * 商品名称
+     */
+    private String productName;
+
+    /**
+     * 商品型号
+     */
+    private String productModel;
+
+    /**
+     * 商品数量
+     */
+    private BigDecimal quantity;
+
+    /**
+     * 商品单价
+     */
+    private BigDecimal price;
+
+    /**
+     * 商品金额
+     */
+    private BigDecimal amount;
+
+    /**
+     * 备注
+     */
+    private String remark;
+
+    /**
+     * 尔弘时代扩展JSON
+     */
+    private String json;
+
+}

+ 44 - 0
hx-ehsd/src/main/java/com/fjhx/ehsd/entity/purchase/po/EhsdPurchaseProject.java

@@ -0,0 +1,44 @@
+package com.fjhx.ehsd.entity.purchase.po;
+
+import com.ruoyi.common.core.domain.BasePo;
+import com.baomidou.mybatisplus.annotation.TableName;
+import java.math.BigDecimal;
+
+import lombok.Getter;
+import lombok.Setter;
+
+/**
+ * <p>
+ * 采购合同-收费项目
+ * </p>
+ *
+ * @author 
+ * @since 2023-05-17
+ */
+@Getter
+@Setter
+@TableName("ehsd_purchase_project")
+public class EhsdPurchaseProject extends BasePo {
+
+    /**
+     * 采购单ID
+     */
+    private Long purchaseId;
+
+    /**
+     * 收费项目
+
+     */
+    private String payName;
+
+    /**
+     * 金额
+     */
+    private BigDecimal amount;
+
+    /**
+     * 备注
+     */
+    private String remark;
+
+}

+ 17 - 0
hx-ehsd/src/main/java/com/fjhx/ehsd/entity/purchase/vo/EhsdPurchaseArrivalVo.java

@@ -0,0 +1,17 @@
+package com.fjhx.ehsd.entity.purchase.vo;
+
+import com.fjhx.ehsd.entity.purchase.po.EhsdPurchaseArrival;
+import lombok.Getter;
+import lombok.Setter;
+
+/**
+ * 采购合同-到货计划列表查询返回值实体
+ *
+ * @author 
+ * @since 2023-05-17
+ */
+@Getter
+@Setter
+public class EhsdPurchaseArrivalVo extends EhsdPurchaseArrival {
+
+}

+ 17 - 0
hx-ehsd/src/main/java/com/fjhx/ehsd/entity/purchase/vo/EhsdPurchaseProductMountingsVo.java

@@ -0,0 +1,17 @@
+package com.fjhx.ehsd.entity.purchase.vo;
+
+import com.fjhx.ehsd.entity.purchase.po.EhsdPurchaseProductMountings;
+import lombok.Getter;
+import lombok.Setter;
+
+/**
+ * ehsd采购产品配件表列表查询返回值实体
+ *
+ * @author 
+ * @since 2023-05-17
+ */
+@Getter
+@Setter
+public class EhsdPurchaseProductMountingsVo extends EhsdPurchaseProductMountings {
+
+}

+ 17 - 0
hx-ehsd/src/main/java/com/fjhx/ehsd/entity/purchase/vo/EhsdPurchaseProductVo.java

@@ -0,0 +1,17 @@
+package com.fjhx.ehsd.entity.purchase.vo;
+
+import com.fjhx.ehsd.entity.purchase.po.EhsdPurchaseProduct;
+import lombok.Getter;
+import lombok.Setter;
+
+/**
+ * ehsd采购产品表列表查询返回值实体
+ *
+ * @author 
+ * @since 2023-05-17
+ */
+@Getter
+@Setter
+public class EhsdPurchaseProductVo extends EhsdPurchaseProduct {
+
+}

+ 17 - 0
hx-ehsd/src/main/java/com/fjhx/ehsd/entity/purchase/vo/EhsdPurchaseProjectVo.java

@@ -0,0 +1,17 @@
+package com.fjhx.ehsd.entity.purchase.vo;
+
+import com.fjhx.ehsd.entity.purchase.po.EhsdPurchaseProject;
+import lombok.Getter;
+import lombok.Setter;
+
+/**
+ * 采购合同-收费项目列表查询返回值实体
+ *
+ * @author 
+ * @since 2023-05-17
+ */
+@Getter
+@Setter
+public class EhsdPurchaseProjectVo extends EhsdPurchaseProject {
+
+}

+ 17 - 0
hx-ehsd/src/main/java/com/fjhx/ehsd/entity/purchase/vo/EhsdPurchaseVo.java

@@ -0,0 +1,17 @@
+package com.fjhx.ehsd.entity.purchase.vo;
+
+import com.fjhx.ehsd.entity.purchase.po.EhsdPurchase;
+import lombok.Getter;
+import lombok.Setter;
+
+/**
+ * ehsd采购表列表查询返回值实体
+ *
+ * @author 
+ * @since 2023-05-17
+ */
+@Getter
+@Setter
+public class EhsdPurchaseVo extends EhsdPurchase {
+
+}

+ 134 - 0
hx-ehsd/src/main/java/com/fjhx/ehsd/flow/EhsdPurchaseFlow.java

@@ -0,0 +1,134 @@
+package com.fjhx.ehsd.flow;
+
+import com.alibaba.fastjson.JSONObject;
+import com.baomidou.dynamic.datasource.toolkit.DynamicDataSourceContextHolder;
+import com.baomidou.mybatisplus.core.toolkit.CollectionUtils;
+import com.baomidou.mybatisplus.core.toolkit.ObjectUtils;
+import com.baomidou.mybatisplus.core.toolkit.Wrappers;
+import com.fjhx.common.constant.SourceConstant;
+import com.fjhx.ehsd.entity.purchase.po.*;
+import com.fjhx.ehsd.service.purchase.*;
+import com.fjhx.file.utils.ObsFileUtil;
+import com.fjhx.flow.core.FlowDelegate;
+import com.fjhx.purchase.entity.purchase.enums.PurchaseDataResourceEnum;
+import com.fjhx.purchase.entity.purchase.enums.PurchaseDetailStatusEnum;
+import com.fjhx.purchase.entity.purchase.enums.PurchaseStatusEnum;
+import com.fjhx.purchase.entity.purchase.po.Purchase;
+import com.fjhx.purchase.entity.purchase.po.PurchaseDetail;
+import com.fjhx.purchase.service.purchase.PurchaseDetailService;
+import com.fjhx.purchase.service.purchase.PurchaseService;
+import com.fjhx.purchase.util.code.CodeEnum;
+import com.fjhx.sale.entity.contract.po.ContractProduct;
+import com.fjhx.sale.entity.sample.po.SampleProduct;
+import com.fjhx.sale.service.contract.ContractProductService;
+import com.fjhx.sale.service.sample.SampleProductService;
+import com.obs.services.internal.ServiceException;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Component;
+
+import java.math.BigDecimal;
+import java.util.ArrayList;
+import java.util.Date;
+import java.util.List;
+import java.util.stream.Collectors;
+
+/**
+ * EHSD采购流程
+ *
+ * @Author:caozj
+ * @DATE:2023/4/3 17:38
+ */
+@Component
+public class EhsdPurchaseFlow extends FlowDelegate {
+
+    @Autowired
+    private EhsdPurchaseService purchaseService;
+
+    @Autowired
+    private SampleProductService sampleProductService;
+
+    @Autowired
+    private EhsdPurchaseProductService purchaseProductService;
+
+    @Autowired
+    private EhsdPurchaseProjectService purchaseProjectService;
+
+    @Autowired
+    private EhsdPurchaseArrivalService purchaseArrivalService;
+
+    @Autowired
+    private ContractProductService contractProductService;
+
+    @Autowired
+    private EhsdPurchaseProductMountingsService purchaseProductMountingsService;
+
+
+    @Override
+    public String getFlowKey() {
+        return "ehsd_purchase_flow";
+    }
+
+    /**
+     * 发起流程
+     * @param flowId 流程ID
+     * @param submitData 采购数据
+     * @return
+     */
+    @Override
+    public Long start(Long flowId, JSONObject submitData) {
+        EhsdPurchase purchase = submitData.toJavaObject(EhsdPurchase.class);
+        purchase.setCode(CodeEnum.PURCHASE.getCode());
+        purchase.setStatus(PurchaseStatusEnum.UNDER_REVIEW.getKey());
+        purchaseService.save(purchase);
+        List<EhsdPurchaseProduct> purchaseProductList = purchase.getPurchaseProductList();
+        List<EhsdPurchaseProject> purchaseProjectList = purchase.getPurchaseProjectList();
+        List<EhsdPurchaseArrival> purchaseArrivalList = purchase.getPurchaseArrivalList();
+        List<EhsdPurchaseProductMountings> addMountingsList = new ArrayList<>();
+        if(CollectionUtils.isNotEmpty(purchaseProductList)){
+            for(EhsdPurchaseProduct s : purchaseProductList){//产品
+                s.setPurchaseId(purchase.getId());
+                List<EhsdPurchaseProductMountings> purchaseProductMountingsList = s.getPurchaseProductMountingsList();
+                if(CollectionUtils.isNotEmpty(purchaseProductMountingsList)){//产品配件
+                    purchaseProductMountingsList.forEach(obj -> obj.setId(s.getId()));
+                    addMountingsList.addAll(purchaseProductMountingsList);
+                }
+                ObsFileUtil.saveFile(s.getFileList(),s.getId());
+            }
+            purchaseProductService.saveBatch(purchaseProductList);
+            purchaseProductMountingsService.saveBatch(addMountingsList);
+        }
+        if(CollectionUtils.isNotEmpty(purchaseProjectList)){//到货
+            for(EhsdPurchaseProject s : purchaseProjectList){
+                s.setPurchaseId(purchase.getId());
+            }
+            purchaseProjectService.saveBatch(purchaseProjectList);
+        }
+        if(CollectionUtils.isNotEmpty(purchaseArrivalList)){//收费项目
+            for(EhsdPurchaseArrival s : purchaseArrivalList){
+                s.setPurchaseId(purchase.getId());
+            }
+            purchaseArrivalService.saveBatch(purchaseArrivalList);
+        }
+        return purchase.getId();
+    }
+
+    /**
+     * 结束流程
+     * @param flowId 流程ID
+     * @param businessId 业务ID
+     * @param submitData 数据
+     */
+    @Override
+    public void end(Long flowId, Long businessId, JSONObject submitData) {
+        //通过业务ID查询采购数据
+        EhsdPurchase purchase = purchaseService.getById(businessId);
+        if(ObjectUtils.isEmpty(purchase)){
+            throw new ServiceException("采购单不存在,或已被删除");
+        }
+        //修改采购状态为审批通过
+        purchase.setStatus(PurchaseStatusEnum.PASS.getKey());
+        purchase.setApprovedDate(new Date());
+        purchaseService.updateById(purchase);
+    }
+
+}

+ 26 - 0
hx-ehsd/src/main/java/com/fjhx/ehsd/mapper/purchase/EhsdPurchaseArrivalMapper.java

@@ -0,0 +1,26 @@
+package com.fjhx.ehsd.mapper.purchase;
+
+import com.fjhx.ehsd.entity.purchase.po.EhsdPurchaseArrival;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import com.fjhx.ehsd.entity.purchase.vo.EhsdPurchaseArrivalVo;
+import com.ruoyi.common.utils.wrapper.IWrapper;
+import org.apache.ibatis.annotations.Param;
+
+
+/**
+ * <p>
+ * 采购合同-到货计划 Mapper 接口
+ * </p>
+ *
+ * @author 
+ * @since 2023-05-17
+ */
+public interface EhsdPurchaseArrivalMapper extends BaseMapper<EhsdPurchaseArrival> {
+
+    /**
+     * 采购合同-到货计划分页
+     */
+    Page<EhsdPurchaseArrivalVo> getPage(@Param("page") Page<Object> page, @Param("ew") IWrapper<EhsdPurchaseArrival> wrapper);
+
+}

+ 26 - 0
hx-ehsd/src/main/java/com/fjhx/ehsd/mapper/purchase/EhsdPurchaseMapper.java

@@ -0,0 +1,26 @@
+package com.fjhx.ehsd.mapper.purchase;
+
+import com.fjhx.ehsd.entity.purchase.po.EhsdPurchase;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import com.fjhx.ehsd.entity.purchase.vo.EhsdPurchaseVo;
+import com.ruoyi.common.utils.wrapper.IWrapper;
+import org.apache.ibatis.annotations.Param;
+
+
+/**
+ * <p>
+ * ehsd采购表 Mapper 接口
+ * </p>
+ *
+ * @author 
+ * @since 2023-05-17
+ */
+public interface EhsdPurchaseMapper extends BaseMapper<EhsdPurchase> {
+
+    /**
+     * ehsd采购表分页
+     */
+    Page<EhsdPurchaseVo> getPage(@Param("page") Page<Object> page, @Param("ew") IWrapper<EhsdPurchase> wrapper);
+
+}

+ 26 - 0
hx-ehsd/src/main/java/com/fjhx/ehsd/mapper/purchase/EhsdPurchaseProductMapper.java

@@ -0,0 +1,26 @@
+package com.fjhx.ehsd.mapper.purchase;
+
+import com.fjhx.ehsd.entity.purchase.po.EhsdPurchaseProduct;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import com.fjhx.ehsd.entity.purchase.vo.EhsdPurchaseProductVo;
+import com.ruoyi.common.utils.wrapper.IWrapper;
+import org.apache.ibatis.annotations.Param;
+
+
+/**
+ * <p>
+ * ehsd采购产品表 Mapper 接口
+ * </p>
+ *
+ * @author 
+ * @since 2023-05-17
+ */
+public interface EhsdPurchaseProductMapper extends BaseMapper<EhsdPurchaseProduct> {
+
+    /**
+     * ehsd采购产品表分页
+     */
+    Page<EhsdPurchaseProductVo> getPage(@Param("page") Page<Object> page, @Param("ew") IWrapper<EhsdPurchaseProduct> wrapper);
+
+}

+ 26 - 0
hx-ehsd/src/main/java/com/fjhx/ehsd/mapper/purchase/EhsdPurchaseProductMountingsMapper.java

@@ -0,0 +1,26 @@
+package com.fjhx.ehsd.mapper.purchase;
+
+import com.fjhx.ehsd.entity.purchase.po.EhsdPurchaseProductMountings;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import com.fjhx.ehsd.entity.purchase.vo.EhsdPurchaseProductMountingsVo;
+import com.ruoyi.common.utils.wrapper.IWrapper;
+import org.apache.ibatis.annotations.Param;
+
+
+/**
+ * <p>
+ * ehsd采购产品配件表 Mapper 接口
+ * </p>
+ *
+ * @author 
+ * @since 2023-05-17
+ */
+public interface EhsdPurchaseProductMountingsMapper extends BaseMapper<EhsdPurchaseProductMountings> {
+
+    /**
+     * ehsd采购产品配件表分页
+     */
+    Page<EhsdPurchaseProductMountingsVo> getPage(@Param("page") Page<Object> page, @Param("ew") IWrapper<EhsdPurchaseProductMountings> wrapper);
+
+}

+ 26 - 0
hx-ehsd/src/main/java/com/fjhx/ehsd/mapper/purchase/EhsdPurchaseProjectMapper.java

@@ -0,0 +1,26 @@
+package com.fjhx.ehsd.mapper.purchase;
+
+import com.fjhx.ehsd.entity.purchase.po.EhsdPurchaseProject;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import com.fjhx.ehsd.entity.purchase.vo.EhsdPurchaseProjectVo;
+import com.ruoyi.common.utils.wrapper.IWrapper;
+import org.apache.ibatis.annotations.Param;
+
+
+/**
+ * <p>
+ * 采购合同-收费项目 Mapper 接口
+ * </p>
+ *
+ * @author 
+ * @since 2023-05-17
+ */
+public interface EhsdPurchaseProjectMapper extends BaseMapper<EhsdPurchaseProject> {
+
+    /**
+     * 采购合同-收费项目分页
+     */
+    Page<EhsdPurchaseProjectVo> getPage(@Param("page") Page<Object> page, @Param("ew") IWrapper<EhsdPurchaseProject> wrapper);
+
+}

+ 46 - 0
hx-ehsd/src/main/java/com/fjhx/ehsd/service/purchase/EhsdPurchaseArrivalService.java

@@ -0,0 +1,46 @@
+package com.fjhx.ehsd.service.purchase;
+
+import com.fjhx.ehsd.entity.purchase.po.EhsdPurchaseArrival;
+import com.ruoyi.common.core.service.BaseService;
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import com.fjhx.ehsd.entity.purchase.vo.EhsdPurchaseArrivalVo;
+import com.fjhx.ehsd.entity.purchase.dto.EhsdPurchaseArrivalSelectDto;
+import com.fjhx.ehsd.entity.purchase.dto.EhsdPurchaseArrivalDto;
+
+
+/**
+ * <p>
+ * 采购合同-到货计划 服务类
+ * </p>
+ *
+ * @author 
+ * @since 2023-05-17
+ */
+public interface EhsdPurchaseArrivalService extends BaseService<EhsdPurchaseArrival> {
+
+    /**
+     * 采购合同-到货计划分页
+     */
+    Page<EhsdPurchaseArrivalVo> getPage(EhsdPurchaseArrivalSelectDto dto);
+
+    /**
+     * 采购合同-到货计划明细
+     */
+    EhsdPurchaseArrivalVo detail(Long id);
+
+    /**
+     * 采购合同-到货计划新增
+     */
+    void add(EhsdPurchaseArrivalDto ehsdPurchaseArrivalDto);
+
+    /**
+     * 采购合同-到货计划编辑
+     */
+    void edit(EhsdPurchaseArrivalDto ehsdPurchaseArrivalDto);
+
+    /**
+     * 采购合同-到货计划删除
+     */
+    void delete(Long id);
+
+}

+ 46 - 0
hx-ehsd/src/main/java/com/fjhx/ehsd/service/purchase/EhsdPurchaseProductMountingsService.java

@@ -0,0 +1,46 @@
+package com.fjhx.ehsd.service.purchase;
+
+import com.fjhx.ehsd.entity.purchase.po.EhsdPurchaseProductMountings;
+import com.ruoyi.common.core.service.BaseService;
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import com.fjhx.ehsd.entity.purchase.vo.EhsdPurchaseProductMountingsVo;
+import com.fjhx.ehsd.entity.purchase.dto.EhsdPurchaseProductMountingsSelectDto;
+import com.fjhx.ehsd.entity.purchase.dto.EhsdPurchaseProductMountingsDto;
+
+
+/**
+ * <p>
+ * ehsd采购产品配件表 服务类
+ * </p>
+ *
+ * @author 
+ * @since 2023-05-17
+ */
+public interface EhsdPurchaseProductMountingsService extends BaseService<EhsdPurchaseProductMountings> {
+
+    /**
+     * ehsd采购产品配件表分页
+     */
+    Page<EhsdPurchaseProductMountingsVo> getPage(EhsdPurchaseProductMountingsSelectDto dto);
+
+    /**
+     * ehsd采购产品配件表明细
+     */
+    EhsdPurchaseProductMountingsVo detail(Long id);
+
+    /**
+     * ehsd采购产品配件表新增
+     */
+    void add(EhsdPurchaseProductMountingsDto ehsdPurchaseProductMountingsDto);
+
+    /**
+     * ehsd采购产品配件表编辑
+     */
+    void edit(EhsdPurchaseProductMountingsDto ehsdPurchaseProductMountingsDto);
+
+    /**
+     * ehsd采购产品配件表删除
+     */
+    void delete(Long id);
+
+}

+ 46 - 0
hx-ehsd/src/main/java/com/fjhx/ehsd/service/purchase/EhsdPurchaseProductService.java

@@ -0,0 +1,46 @@
+package com.fjhx.ehsd.service.purchase;
+
+import com.fjhx.ehsd.entity.purchase.po.EhsdPurchaseProduct;
+import com.ruoyi.common.core.service.BaseService;
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import com.fjhx.ehsd.entity.purchase.vo.EhsdPurchaseProductVo;
+import com.fjhx.ehsd.entity.purchase.dto.EhsdPurchaseProductSelectDto;
+import com.fjhx.ehsd.entity.purchase.dto.EhsdPurchaseProductDto;
+
+
+/**
+ * <p>
+ * ehsd采购产品表 服务类
+ * </p>
+ *
+ * @author 
+ * @since 2023-05-17
+ */
+public interface EhsdPurchaseProductService extends BaseService<EhsdPurchaseProduct> {
+
+    /**
+     * ehsd采购产品表分页
+     */
+    Page<EhsdPurchaseProductVo> getPage(EhsdPurchaseProductSelectDto dto);
+
+    /**
+     * ehsd采购产品表明细
+     */
+    EhsdPurchaseProductVo detail(Long id);
+
+    /**
+     * ehsd采购产品表新增
+     */
+    void add(EhsdPurchaseProductDto ehsdPurchaseProductDto);
+
+    /**
+     * ehsd采购产品表编辑
+     */
+    void edit(EhsdPurchaseProductDto ehsdPurchaseProductDto);
+
+    /**
+     * ehsd采购产品表删除
+     */
+    void delete(Long id);
+
+}

+ 46 - 0
hx-ehsd/src/main/java/com/fjhx/ehsd/service/purchase/EhsdPurchaseProjectService.java

@@ -0,0 +1,46 @@
+package com.fjhx.ehsd.service.purchase;
+
+import com.fjhx.ehsd.entity.purchase.po.EhsdPurchaseProject;
+import com.ruoyi.common.core.service.BaseService;
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import com.fjhx.ehsd.entity.purchase.vo.EhsdPurchaseProjectVo;
+import com.fjhx.ehsd.entity.purchase.dto.EhsdPurchaseProjectSelectDto;
+import com.fjhx.ehsd.entity.purchase.dto.EhsdPurchaseProjectDto;
+
+
+/**
+ * <p>
+ * 采购合同-收费项目 服务类
+ * </p>
+ *
+ * @author 
+ * @since 2023-05-17
+ */
+public interface EhsdPurchaseProjectService extends BaseService<EhsdPurchaseProject> {
+
+    /**
+     * 采购合同-收费项目分页
+     */
+    Page<EhsdPurchaseProjectVo> getPage(EhsdPurchaseProjectSelectDto dto);
+
+    /**
+     * 采购合同-收费项目明细
+     */
+    EhsdPurchaseProjectVo detail(Long id);
+
+    /**
+     * 采购合同-收费项目新增
+     */
+    void add(EhsdPurchaseProjectDto ehsdPurchaseProjectDto);
+
+    /**
+     * 采购合同-收费项目编辑
+     */
+    void edit(EhsdPurchaseProjectDto ehsdPurchaseProjectDto);
+
+    /**
+     * 采购合同-收费项目删除
+     */
+    void delete(Long id);
+
+}

+ 46 - 0
hx-ehsd/src/main/java/com/fjhx/ehsd/service/purchase/EhsdPurchaseService.java

@@ -0,0 +1,46 @@
+package com.fjhx.ehsd.service.purchase;
+
+import com.fjhx.ehsd.entity.purchase.po.EhsdPurchase;
+import com.ruoyi.common.core.service.BaseService;
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import com.fjhx.ehsd.entity.purchase.vo.EhsdPurchaseVo;
+import com.fjhx.ehsd.entity.purchase.dto.EhsdPurchaseSelectDto;
+import com.fjhx.ehsd.entity.purchase.dto.EhsdPurchaseDto;
+
+
+/**
+ * <p>
+ * ehsd采购表 服务类
+ * </p>
+ *
+ * @author 
+ * @since 2023-05-17
+ */
+public interface EhsdPurchaseService extends BaseService<EhsdPurchase> {
+
+    /**
+     * ehsd采购表分页
+     */
+    Page<EhsdPurchaseVo> getPage(EhsdPurchaseSelectDto dto);
+
+    /**
+     * ehsd采购表明细
+     */
+    EhsdPurchaseVo detail(Long id);
+
+    /**
+     * ehsd采购表新增
+     */
+    void add(EhsdPurchaseDto ehsdPurchaseDto);
+
+    /**
+     * ehsd采购表编辑
+     */
+    void edit(EhsdPurchaseDto ehsdPurchaseDto);
+
+    /**
+     * ehsd采购表删除
+     */
+    void delete(Long id);
+
+}

+ 57 - 0
hx-ehsd/src/main/java/com/fjhx/ehsd/service/purchase/impl/EhsdPurchaseArrivalServiceImpl.java

@@ -0,0 +1,57 @@
+package com.fjhx.ehsd.service.purchase.impl;
+
+import com.fjhx.ehsd.entity.purchase.po.EhsdPurchaseArrival;
+import com.fjhx.ehsd.mapper.purchase.EhsdPurchaseArrivalMapper;
+import com.fjhx.ehsd.service.purchase.EhsdPurchaseArrivalService;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import org.springframework.stereotype.Service;
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import com.fjhx.ehsd.entity.purchase.vo.EhsdPurchaseArrivalVo;
+import com.fjhx.ehsd.entity.purchase.dto.EhsdPurchaseArrivalSelectDto;
+import com.ruoyi.common.utils.wrapper.IWrapper;
+import com.fjhx.ehsd.entity.purchase.dto.EhsdPurchaseArrivalDto;
+import cn.hutool.core.bean.BeanUtil;
+
+
+/**
+ * <p>
+ * 采购合同-到货计划 服务实现类
+ * </p>
+ *
+ * @author 
+ * @since 2023-05-17
+ */
+@Service
+public class EhsdPurchaseArrivalServiceImpl extends ServiceImpl<EhsdPurchaseArrivalMapper, EhsdPurchaseArrival> implements EhsdPurchaseArrivalService {
+
+    @Override
+    public Page<EhsdPurchaseArrivalVo> getPage(EhsdPurchaseArrivalSelectDto dto) {
+        IWrapper<EhsdPurchaseArrival> wrapper = getWrapper();
+        wrapper.orderByDesc("epa", EhsdPurchaseArrival::getId);
+        Page<EhsdPurchaseArrivalVo> page = this.baseMapper.getPage(dto.getPage(), wrapper);
+        return page;
+    }
+
+    @Override
+    public EhsdPurchaseArrivalVo detail(Long id) {
+        EhsdPurchaseArrival EhsdPurchaseArrival = this.getById(id);
+        EhsdPurchaseArrivalVo result = BeanUtil.toBean(EhsdPurchaseArrival, EhsdPurchaseArrivalVo.class);
+        return result;
+    }
+
+    @Override
+    public void add(EhsdPurchaseArrivalDto ehsdPurchaseArrivalDto) {
+        this.save(ehsdPurchaseArrivalDto);
+    }
+
+    @Override
+    public void edit(EhsdPurchaseArrivalDto ehsdPurchaseArrivalDto) {
+        this.updateById(ehsdPurchaseArrivalDto);
+    }
+
+    @Override
+    public void delete(Long id) {
+        this.removeById(id);
+    }
+
+}

+ 57 - 0
hx-ehsd/src/main/java/com/fjhx/ehsd/service/purchase/impl/EhsdPurchaseProductMountingsServiceImpl.java

@@ -0,0 +1,57 @@
+package com.fjhx.ehsd.service.purchase.impl;
+
+import com.fjhx.ehsd.entity.purchase.po.EhsdPurchaseProductMountings;
+import com.fjhx.ehsd.mapper.purchase.EhsdPurchaseProductMountingsMapper;
+import com.fjhx.ehsd.service.purchase.EhsdPurchaseProductMountingsService;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import org.springframework.stereotype.Service;
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import com.fjhx.ehsd.entity.purchase.vo.EhsdPurchaseProductMountingsVo;
+import com.fjhx.ehsd.entity.purchase.dto.EhsdPurchaseProductMountingsSelectDto;
+import com.ruoyi.common.utils.wrapper.IWrapper;
+import com.fjhx.ehsd.entity.purchase.dto.EhsdPurchaseProductMountingsDto;
+import cn.hutool.core.bean.BeanUtil;
+
+
+/**
+ * <p>
+ * ehsd采购产品配件表 服务实现类
+ * </p>
+ *
+ * @author 
+ * @since 2023-05-17
+ */
+@Service
+public class EhsdPurchaseProductMountingsServiceImpl extends ServiceImpl<EhsdPurchaseProductMountingsMapper, EhsdPurchaseProductMountings> implements EhsdPurchaseProductMountingsService {
+
+    @Override
+    public Page<EhsdPurchaseProductMountingsVo> getPage(EhsdPurchaseProductMountingsSelectDto dto) {
+        IWrapper<EhsdPurchaseProductMountings> wrapper = getWrapper();
+        wrapper.orderByDesc("eppm", EhsdPurchaseProductMountings::getId);
+        Page<EhsdPurchaseProductMountingsVo> page = this.baseMapper.getPage(dto.getPage(), wrapper);
+        return page;
+    }
+
+    @Override
+    public EhsdPurchaseProductMountingsVo detail(Long id) {
+        EhsdPurchaseProductMountings EhsdPurchaseProductMountings = this.getById(id);
+        EhsdPurchaseProductMountingsVo result = BeanUtil.toBean(EhsdPurchaseProductMountings, EhsdPurchaseProductMountingsVo.class);
+        return result;
+    }
+
+    @Override
+    public void add(EhsdPurchaseProductMountingsDto ehsdPurchaseProductMountingsDto) {
+        this.save(ehsdPurchaseProductMountingsDto);
+    }
+
+    @Override
+    public void edit(EhsdPurchaseProductMountingsDto ehsdPurchaseProductMountingsDto) {
+        this.updateById(ehsdPurchaseProductMountingsDto);
+    }
+
+    @Override
+    public void delete(Long id) {
+        this.removeById(id);
+    }
+
+}

+ 57 - 0
hx-ehsd/src/main/java/com/fjhx/ehsd/service/purchase/impl/EhsdPurchaseProductServiceImpl.java

@@ -0,0 +1,57 @@
+package com.fjhx.ehsd.service.purchase.impl;
+
+import com.fjhx.ehsd.entity.purchase.po.EhsdPurchaseProduct;
+import com.fjhx.ehsd.mapper.purchase.EhsdPurchaseProductMapper;
+import com.fjhx.ehsd.service.purchase.EhsdPurchaseProductService;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import org.springframework.stereotype.Service;
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import com.fjhx.ehsd.entity.purchase.vo.EhsdPurchaseProductVo;
+import com.fjhx.ehsd.entity.purchase.dto.EhsdPurchaseProductSelectDto;
+import com.ruoyi.common.utils.wrapper.IWrapper;
+import com.fjhx.ehsd.entity.purchase.dto.EhsdPurchaseProductDto;
+import cn.hutool.core.bean.BeanUtil;
+
+
+/**
+ * <p>
+ * ehsd采购产品表 服务实现类
+ * </p>
+ *
+ * @author 
+ * @since 2023-05-17
+ */
+@Service
+public class EhsdPurchaseProductServiceImpl extends ServiceImpl<EhsdPurchaseProductMapper, EhsdPurchaseProduct> implements EhsdPurchaseProductService {
+
+    @Override
+    public Page<EhsdPurchaseProductVo> getPage(EhsdPurchaseProductSelectDto dto) {
+        IWrapper<EhsdPurchaseProduct> wrapper = getWrapper();
+        wrapper.orderByDesc("epp", EhsdPurchaseProduct::getId);
+        Page<EhsdPurchaseProductVo> page = this.baseMapper.getPage(dto.getPage(), wrapper);
+        return page;
+    }
+
+    @Override
+    public EhsdPurchaseProductVo detail(Long id) {
+        EhsdPurchaseProduct EhsdPurchaseProduct = this.getById(id);
+        EhsdPurchaseProductVo result = BeanUtil.toBean(EhsdPurchaseProduct, EhsdPurchaseProductVo.class);
+        return result;
+    }
+
+    @Override
+    public void add(EhsdPurchaseProductDto ehsdPurchaseProductDto) {
+        this.save(ehsdPurchaseProductDto);
+    }
+
+    @Override
+    public void edit(EhsdPurchaseProductDto ehsdPurchaseProductDto) {
+        this.updateById(ehsdPurchaseProductDto);
+    }
+
+    @Override
+    public void delete(Long id) {
+        this.removeById(id);
+    }
+
+}

+ 57 - 0
hx-ehsd/src/main/java/com/fjhx/ehsd/service/purchase/impl/EhsdPurchaseProjectServiceImpl.java

@@ -0,0 +1,57 @@
+package com.fjhx.ehsd.service.purchase.impl;
+
+import com.fjhx.ehsd.entity.purchase.po.EhsdPurchaseProject;
+import com.fjhx.ehsd.mapper.purchase.EhsdPurchaseProjectMapper;
+import com.fjhx.ehsd.service.purchase.EhsdPurchaseProjectService;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import org.springframework.stereotype.Service;
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import com.fjhx.ehsd.entity.purchase.vo.EhsdPurchaseProjectVo;
+import com.fjhx.ehsd.entity.purchase.dto.EhsdPurchaseProjectSelectDto;
+import com.ruoyi.common.utils.wrapper.IWrapper;
+import com.fjhx.ehsd.entity.purchase.dto.EhsdPurchaseProjectDto;
+import cn.hutool.core.bean.BeanUtil;
+
+
+/**
+ * <p>
+ * 采购合同-收费项目 服务实现类
+ * </p>
+ *
+ * @author 
+ * @since 2023-05-17
+ */
+@Service
+public class EhsdPurchaseProjectServiceImpl extends ServiceImpl<EhsdPurchaseProjectMapper, EhsdPurchaseProject> implements EhsdPurchaseProjectService {
+
+    @Override
+    public Page<EhsdPurchaseProjectVo> getPage(EhsdPurchaseProjectSelectDto dto) {
+        IWrapper<EhsdPurchaseProject> wrapper = getWrapper();
+        wrapper.orderByDesc("epp", EhsdPurchaseProject::getId);
+        Page<EhsdPurchaseProjectVo> page = this.baseMapper.getPage(dto.getPage(), wrapper);
+        return page;
+    }
+
+    @Override
+    public EhsdPurchaseProjectVo detail(Long id) {
+        EhsdPurchaseProject EhsdPurchaseProject = this.getById(id);
+        EhsdPurchaseProjectVo result = BeanUtil.toBean(EhsdPurchaseProject, EhsdPurchaseProjectVo.class);
+        return result;
+    }
+
+    @Override
+    public void add(EhsdPurchaseProjectDto ehsdPurchaseProjectDto) {
+        this.save(ehsdPurchaseProjectDto);
+    }
+
+    @Override
+    public void edit(EhsdPurchaseProjectDto ehsdPurchaseProjectDto) {
+        this.updateById(ehsdPurchaseProjectDto);
+    }
+
+    @Override
+    public void delete(Long id) {
+        this.removeById(id);
+    }
+
+}

+ 57 - 0
hx-ehsd/src/main/java/com/fjhx/ehsd/service/purchase/impl/EhsdPurchaseServiceImpl.java

@@ -0,0 +1,57 @@
+package com.fjhx.ehsd.service.purchase.impl;
+
+import com.fjhx.ehsd.entity.purchase.po.EhsdPurchase;
+import com.fjhx.ehsd.mapper.purchase.EhsdPurchaseMapper;
+import com.fjhx.ehsd.service.purchase.EhsdPurchaseService;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import org.springframework.stereotype.Service;
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import com.fjhx.ehsd.entity.purchase.vo.EhsdPurchaseVo;
+import com.fjhx.ehsd.entity.purchase.dto.EhsdPurchaseSelectDto;
+import com.ruoyi.common.utils.wrapper.IWrapper;
+import com.fjhx.ehsd.entity.purchase.dto.EhsdPurchaseDto;
+import cn.hutool.core.bean.BeanUtil;
+
+
+/**
+ * <p>
+ * ehsd采购表 服务实现类
+ * </p>
+ *
+ * @author 
+ * @since 2023-05-17
+ */
+@Service
+public class EhsdPurchaseServiceImpl extends ServiceImpl<EhsdPurchaseMapper, EhsdPurchase> implements EhsdPurchaseService {
+
+    @Override
+    public Page<EhsdPurchaseVo> getPage(EhsdPurchaseSelectDto dto) {
+        IWrapper<EhsdPurchase> wrapper = getWrapper();
+        wrapper.orderByDesc("ep", EhsdPurchase::getId);
+        Page<EhsdPurchaseVo> page = this.baseMapper.getPage(dto.getPage(), wrapper);
+        return page;
+    }
+
+    @Override
+    public EhsdPurchaseVo detail(Long id) {
+        EhsdPurchase EhsdPurchase = this.getById(id);
+        EhsdPurchaseVo result = BeanUtil.toBean(EhsdPurchase, EhsdPurchaseVo.class);
+        return result;
+    }
+
+    @Override
+    public void add(EhsdPurchaseDto ehsdPurchaseDto) {
+        this.save(ehsdPurchaseDto);
+    }
+
+    @Override
+    public void edit(EhsdPurchaseDto ehsdPurchaseDto) {
+        this.updateById(ehsdPurchaseDto);
+    }
+
+    @Override
+    public void delete(Long id) {
+        this.removeById(id);
+    }
+
+}

+ 103 - 0
hx-ehsd/src/main/java/com/fjhx/ehsd/util/CodeEnum.java

@@ -0,0 +1,103 @@
+package com.fjhx.ehsd.util;
+
+import cn.hutool.core.convert.Convert;
+import cn.hutool.core.date.DateUtil;
+import cn.hutool.core.text.CharSequenceUtil;
+import cn.hutool.core.util.ObjectUtil;
+import cn.hutool.extra.spring.SpringUtil;
+import com.baomidou.mybatisplus.extension.service.IService;
+import com.fjhx.ehsd.service.purchase.EhsdPurchaseService;
+import com.fjhx.purchase.service.arrival.ArrivalService;
+import com.fjhx.purchase.service.purchase.PurchaseService;
+import com.fjhx.purchase.service.quality.QualityService;
+import com.fjhx.purchase.service.sales.SalesReturnService;
+import com.fjhx.purchase.service.subscribe.SubscribeService;
+import com.obs.services.internal.ServiceException;
+import lombok.Getter;
+
+import java.util.Date;
+import java.util.Map;
+
+@Getter
+public enum CodeEnum {
+
+    //采购
+    PURCHASE("PO", "yyMM-", "code", 3, EhsdPurchaseService.class),
+    ;
+
+    CodeEnum(String prefix, String dateFormat, String codeFieldName, Integer length, Class<? extends IService<?>> serviceCls) {
+        this.prefix = prefix;
+        this.dateFormat = dateFormat;
+        this.length = length;
+        this.codeFieldName = codeFieldName;
+        this.service = SpringUtil.getBean(serviceCls);
+    }
+
+    // 编码前缀
+    private final String prefix;
+    // 编码加日期规则
+    private final String dateFormat;
+    // 长度
+    private final Integer length;
+    // 编码字段名
+    private final String codeFieldName;
+    // service
+    private final IService<?> service;
+
+    /**
+     * 获取键值对
+     */
+    public String getCode() {
+        String itemPrefix;
+
+        if (ObjectUtil.isNotEmpty(dateFormat)) {
+            Date date = new Date();
+            String format = DateUtil.format(date, dateFormat);
+            itemPrefix = prefix + format;
+        } else {
+            itemPrefix = prefix;
+        }
+
+        Object obj = service.query()
+                .likeRight(codeFieldName, itemPrefix)
+                .orderByDesc(codeFieldName)
+                .last("limit 1")
+                .one();
+
+        if (obj == null) {
+            return itemPrefix + autoGenericCode(length, 0);
+        }
+
+        Map<String, Object> map = Convert.toMap(String.class, Object.class, obj);
+
+        String code = Convert.toStr(map.get(CharSequenceUtil.toCamelCase(codeFieldName)));
+        Integer codeNum = Convert.toInt(code.substring(itemPrefix.length()));
+        if (ObjectUtil.isEmpty(codeNum)) {
+            throw new ServiceException("自定义编码与系统编码生成规则冲突,暂时无法生成编码,请联系管理员");
+        }
+
+        return itemPrefix + autoGenericCode(length, codeNum);
+    }
+
+    /**
+     * 获取键值对
+     */
+    public String getCode(String code) {
+        if (ObjectUtil.isNotEmpty(code)) {
+            Long count = service.query().eq(codeFieldName, code).count();
+            if (count != 0) {
+                throw new ServiceException("编码已存在");
+            }
+            return code;
+        } else {
+            return getCode();
+        }
+    }
+    /**
+     * 不够位数的在前面补0,保留num的长度位数字
+     */
+    private static String autoGenericCode(int length, Integer codeNum) {
+        return String.format("%0" + length + "d", codeNum + 1);
+    }
+
+}

+ 20 - 0
hx-ehsd/src/main/resources/mapper/purchase/EhsdPurchaseArrivalMapper.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.ehsd.mapper.purchase.EhsdPurchaseArrivalMapper">
+    <select id="getPage" resultType="com.fjhx.ehsd.entity.purchase.vo.EhsdPurchaseArrivalVo">
+        select
+            epa.id,
+            epa.purchase_id,
+            epa.product_id,
+            epa.arrival_time,
+            epa.quantity,
+            epa.remark,
+            epa.create_user,
+            epa.create_time,
+            epa.update_user,
+            epa.update_time
+        from ehsd_purchase_arrival epa
+            ${ew.customSqlSegment}
+    </select>
+
+</mapper>

+ 46 - 0
hx-ehsd/src/main/resources/mapper/purchase/EhsdPurchaseMapper.xml

@@ -0,0 +1,46 @@
+<?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.ehsd.mapper.purchase.EhsdPurchaseMapper">
+    <select id="getPage" resultType="com.fjhx.ehsd.entity.purchase.vo.EhsdPurchaseVo">
+        select
+            ep.id,
+            ep.code,
+            ep.business_id,
+            ep.business_type,
+            ep.contract_template_id,
+            ep.sell_corporation_id,
+            ep.sell_contact_name,
+            ep.sell_contact_number,
+            ep.sell_country_id,
+            ep.sell_province_id,
+            ep.sell_city_id,
+            ep.sell_address,
+            ep.buy_corporation_id,
+            ep.buy_contact_name,
+            ep.buy_contact_number,
+            ep.buy_country_id,
+            ep.buy_province_id,
+            ep.buy_city_id,
+            ep.buy_address,
+            ep.buy_postal_code,
+            ep.status,
+            ep.amount,
+            ep.remark,
+            ep.currency,
+            ep.delivery_time,
+            ep.delivery_type,
+            ep.invoice_type,
+            ep.payment_method,
+            ep.warranty,
+            ep.process_instance_id,
+            ep.approved_date,
+            ep.create_user,
+            ep.user_name,
+            ep.create_time,
+            ep.update_user,
+            ep.update_time
+        from ehsd_purchase ep
+            ${ew.customSqlSegment}
+    </select>
+
+</mapper>

+ 24 - 0
hx-ehsd/src/main/resources/mapper/purchase/EhsdPurchaseProductMapper.xml

@@ -0,0 +1,24 @@
+<?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.ehsd.mapper.purchase.EhsdPurchaseProductMapper">
+    <select id="getPage" resultType="com.fjhx.ehsd.entity.purchase.vo.EhsdPurchaseProductVo">
+        select
+            epp.id,
+            epp.purchase_id,
+            epp.product_id,
+            epp.product_name,
+            epp.product_model,
+            epp.quantity,
+            epp.price,
+            epp.amount,
+            epp.remark,
+            epp.json,
+            epp.create_user,
+            epp.create_time,
+            epp.update_user,
+            epp.update_time
+        from ehsd_purchase_product epp
+            ${ew.customSqlSegment}
+    </select>
+
+</mapper>

+ 24 - 0
hx-ehsd/src/main/resources/mapper/purchase/EhsdPurchaseProductMountingsMapper.xml

@@ -0,0 +1,24 @@
+<?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.ehsd.mapper.purchase.EhsdPurchaseProductMountingsMapper">
+    <select id="getPage" resultType="com.fjhx.ehsd.entity.purchase.vo.EhsdPurchaseProductMountingsVo">
+        select
+            eppm.id,
+            eppm.purchase_product_id,
+            eppm.product_id,
+            eppm.product_name,
+            eppm.product_model,
+            eppm.quantity,
+            eppm.price,
+            eppm.amount,
+            eppm.remark,
+            eppm.json,
+            eppm.create_user,
+            eppm.create_time,
+            eppm.update_user,
+            eppm.update_time
+        from ehsd_purchase_product_mountings eppm
+            ${ew.customSqlSegment}
+    </select>
+
+</mapper>

+ 19 - 0
hx-ehsd/src/main/resources/mapper/purchase/EhsdPurchaseProjectMapper.xml

@@ -0,0 +1,19 @@
+<?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.ehsd.mapper.purchase.EhsdPurchaseProjectMapper">
+    <select id="getPage" resultType="com.fjhx.ehsd.entity.purchase.vo.EhsdPurchaseProjectVo">
+        select
+            epp.id,
+            epp.purchase_id,
+            epp.pay_name,
+            epp.amount,
+            epp.remark,
+            epp.create_user,
+            epp.create_time,
+            epp.update_user,
+            epp.update_time
+        from ehsd_purchase_project epp
+            ${ew.customSqlSegment}
+    </select>
+
+</mapper>

+ 1 - 1
hx-sale/src/main/java/com/fjhx/sale/flow/PurchaseFlow.java

@@ -29,7 +29,7 @@ import java.util.Date;
 import java.util.List;
 
 /**
- * 采购流程
+ * EHSD采购流程
  *
  * @Author:caozj
  * @DATE:2023/4/3 17:38

Some files were not shown because too many files changed in this diff