diff --git a/pom.xml b/pom.xml
index 10ec1aa2d..28b751ffd 100644
--- a/pom.xml
+++ b/pom.xml
@@ -25,8 +25,9 @@
-
-
+ yudao-module-ai
+ yudao-module-pm
+
${project.artifactId}
diff --git a/sql/generateCode/menu_pm_customer.sql b/sql/generateCode/menu_pm_customer.sql
new file mode 100644
index 000000000..cbeef98e5
--- /dev/null
+++ b/sql/generateCode/menu_pm_customer.sql
@@ -0,0 +1,55 @@
+-- 菜单 SQL
+INSERT INTO system_menu(
+ name, permission, type, sort, parent_id,
+ path, icon, component, status, component_name
+)
+VALUES (
+ '客户信息管理', '', 2, 0, 2759,
+ 'customer', '', 'pm/customer/index', 0, 'Customer'
+);
+
+-- 按钮父菜单ID
+-- 暂时只支持 MySQL。如果你是 Oracle、PostgreSQL、SQLServer 的话,需要手动修改 @parentId 的部分的代码
+SELECT @parentId := LAST_INSERT_ID();
+
+-- 按钮 SQL
+INSERT INTO system_menu(
+ name, permission, type, sort, parent_id,
+ path, icon, component, status
+)
+VALUES (
+ '客户信息查询', 'pm:customer:query', 3, 1, @parentId,
+ '', '', '', 0
+);
+INSERT INTO system_menu(
+ name, permission, type, sort, parent_id,
+ path, icon, component, status
+)
+VALUES (
+ '客户信息创建', 'pm:customer:create', 3, 2, @parentId,
+ '', '', '', 0
+);
+INSERT INTO system_menu(
+ name, permission, type, sort, parent_id,
+ path, icon, component, status
+)
+VALUES (
+ '客户信息更新', 'pm:customer:update', 3, 3, @parentId,
+ '', '', '', 0
+);
+INSERT INTO system_menu(
+ name, permission, type, sort, parent_id,
+ path, icon, component, status
+)
+VALUES (
+ '客户信息删除', 'pm:customer:delete', 3, 4, @parentId,
+ '', '', '', 0
+);
+INSERT INTO system_menu(
+ name, permission, type, sort, parent_id,
+ path, icon, component, status
+)
+VALUES (
+ '客户信息导出', 'pm:customer:export', 3, 5, @parentId,
+ '', '', '', 0
+);
\ No newline at end of file
diff --git a/sql/generateCode/menu_subcontractor.sql b/sql/generateCode/menu_subcontractor.sql
new file mode 100644
index 000000000..8e36ce781
--- /dev/null
+++ b/sql/generateCode/menu_subcontractor.sql
@@ -0,0 +1,55 @@
+-- 菜单 SQL
+INSERT INTO system_menu(
+ name, permission, type, sort, parent_id,
+ path, icon, component, status, component_name
+)
+VALUES (
+ '供应商信息管理', '', 2, 0, 2759,
+ 'subcontractor', '', 'pm/subcontractor/index', 0, 'Subcontractor'
+);
+
+-- 按钮父菜单ID
+-- 暂时只支持 MySQL。如果你是 Oracle、PostgreSQL、SQLServer 的话,需要手动修改 @parentId 的部分的代码
+SELECT @parentId := LAST_INSERT_ID();
+
+-- 按钮 SQL
+INSERT INTO system_menu(
+ name, permission, type, sort, parent_id,
+ path, icon, component, status
+)
+VALUES (
+ '供应商信息查询', 'pm:subcontractor:query', 3, 1, @parentId,
+ '', '', '', 0
+);
+INSERT INTO system_menu(
+ name, permission, type, sort, parent_id,
+ path, icon, component, status
+)
+VALUES (
+ '供应商信息创建', 'pm:subcontractor:create', 3, 2, @parentId,
+ '', '', '', 0
+);
+INSERT INTO system_menu(
+ name, permission, type, sort, parent_id,
+ path, icon, component, status
+)
+VALUES (
+ '供应商信息更新', 'pm:subcontractor:update', 3, 3, @parentId,
+ '', '', '', 0
+);
+INSERT INTO system_menu(
+ name, permission, type, sort, parent_id,
+ path, icon, component, status
+)
+VALUES (
+ '供应商信息删除', 'pm:subcontractor:delete', 3, 4, @parentId,
+ '', '', '', 0
+);
+INSERT INTO system_menu(
+ name, permission, type, sort, parent_id,
+ path, icon, component, status
+)
+VALUES (
+ '供应商信息导出', 'pm:subcontractor:export', 3, 5, @parentId,
+ '', '', '', 0
+);
\ No newline at end of file
diff --git a/yudao-module-pm/pom.xml b/yudao-module-pm/pom.xml
new file mode 100644
index 000000000..56b502a9a
--- /dev/null
+++ b/yudao-module-pm/pom.xml
@@ -0,0 +1,23 @@
+
+
+ 4.0.0
+
+ cn.iocoder.boot
+ yudao
+ ${revision}
+
+
+ yudao-module-pm
+ pom
+ ${project.artifactId}
+
+ 项目管理模块
+
+
+ yudao-module-pm-api
+ yudao-module-pm-biz
+
+
+
\ No newline at end of file
diff --git a/yudao-module-pm/yudao-module-pm-api/pom.xml b/yudao-module-pm/yudao-module-pm-api/pom.xml
new file mode 100644
index 000000000..f21354d1f
--- /dev/null
+++ b/yudao-module-pm/yudao-module-pm-api/pom.xml
@@ -0,0 +1,27 @@
+
+
+ 4.0.0
+
+ cn.iocoder.boot
+ yudao-module-pm
+ ${revision}
+
+
+ yudao-module-pm-api
+ jar
+ ${project.artifactId}
+
+
+ 项目管理 API,暴露给业务系统调用
+
+
+
+
+ cn.iocoder.boot
+ yudao-common
+
+
+
+
\ No newline at end of file
diff --git a/yudao-module-pm/yudao-module-pm-api/src/main/java/cn/iocoder/yudao/module/pm/enums/DictTypeConstants.java b/yudao-module-pm/yudao-module-pm-api/src/main/java/cn/iocoder/yudao/module/pm/enums/DictTypeConstants.java
new file mode 100644
index 000000000..23ad849f2
--- /dev/null
+++ b/yudao-module-pm/yudao-module-pm-api/src/main/java/cn/iocoder/yudao/module/pm/enums/DictTypeConstants.java
@@ -0,0 +1,4 @@
+package cn.iocoder.yudao.module.pm.enums;
+
+public interface DictTypeConstants {
+}
diff --git a/yudao-module-pm/yudao-module-pm-api/src/main/java/cn/iocoder/yudao/module/pm/enums/ErrorCodeConstants.java b/yudao-module-pm/yudao-module-pm-api/src/main/java/cn/iocoder/yudao/module/pm/enums/ErrorCodeConstants.java
new file mode 100644
index 000000000..035b03a16
--- /dev/null
+++ b/yudao-module-pm/yudao-module-pm-api/src/main/java/cn/iocoder/yudao/module/pm/enums/ErrorCodeConstants.java
@@ -0,0 +1,8 @@
+package cn.iocoder.yudao.module.pm.enums;
+
+import cn.iocoder.yudao.framework.common.exception.ErrorCode;
+
+public interface ErrorCodeConstants {
+ ErrorCode CUSTOMER_NOT_EXISTS = new ErrorCode(1_060_000_000, "客户信息不存在");
+ ErrorCode SUBCONTRACTOR_NOT_EXISTS = new ErrorCode(1_061_000_000, "供应商信息不存在");
+}
diff --git a/yudao-module-pm/yudao-module-pm-api/src/main/java/cn/iocoder/yudao/module/pm/package-info.java b/yudao-module-pm/yudao-module-pm-api/src/main/java/cn/iocoder/yudao/module/pm/package-info.java
new file mode 100644
index 000000000..2bf850cd1
--- /dev/null
+++ b/yudao-module-pm/yudao-module-pm-api/src/main/java/cn/iocoder/yudao/module/pm/package-info.java
@@ -0,0 +1 @@
+package cn.iocoder.yudao.module.pm;
\ No newline at end of file
diff --git a/yudao-module-pm/yudao-module-pm-biz/pom.xml b/yudao-module-pm/yudao-module-pm-biz/pom.xml
new file mode 100644
index 000000000..3b4751201
--- /dev/null
+++ b/yudao-module-pm/yudao-module-pm-biz/pom.xml
@@ -0,0 +1,70 @@
+
+
+ 4.0.0
+
+ cn.iocoder.boot
+ yudao-module-pm
+ ${revision}
+
+
+ yudao-module-pm-biz
+ jar
+ ${project.artifactId}
+
+
+ 项目管理-业务模块
+
+
+
+
+ cn.iocoder.boot
+ yudao-module-pm-api
+ ${revision}
+
+
+
+
+ cn.iocoder.boot
+ yudao-module-bpm-api
+ ${revision}
+
+
+
+
+ cn.iocoder.boot
+ yudao-module-system-biz
+ ${revision}
+
+
+
+
+ cn.iocoder.boot
+ yudao-spring-boot-starter-web
+
+
+
+ cn.iocoder.boot
+ yudao-spring-boot-starter-security
+
+
+
+
+ cn.iocoder.boot
+ yudao-spring-boot-starter-mybatis
+
+
+
+
+ cn.iocoder.boot
+ yudao-spring-boot-starter-test
+
+
+
+ cn.iocoder.boot
+ yudao-spring-boot-starter-excel
+
+
+
+
\ No newline at end of file
diff --git a/yudao-module-pm/yudao-module-pm-biz/src/main/java/cn/iocoder/yudao/module/pm/controller/admin/customer/CustomerController.java b/yudao-module-pm/yudao-module-pm-biz/src/main/java/cn/iocoder/yudao/module/pm/controller/admin/customer/CustomerController.java
new file mode 100644
index 000000000..838a184fd
--- /dev/null
+++ b/yudao-module-pm/yudao-module-pm-biz/src/main/java/cn/iocoder/yudao/module/pm/controller/admin/customer/CustomerController.java
@@ -0,0 +1,95 @@
+package cn.iocoder.yudao.module.pm.controller.admin.customer;
+
+import org.springframework.web.bind.annotation.*;
+import jakarta.annotation.Resource;
+import org.springframework.validation.annotation.Validated;
+import org.springframework.security.access.prepost.PreAuthorize;
+import io.swagger.v3.oas.annotations.tags.Tag;
+import io.swagger.v3.oas.annotations.Parameter;
+import io.swagger.v3.oas.annotations.Operation;
+
+import jakarta.validation.constraints.*;
+import jakarta.validation.*;
+import jakarta.servlet.http.*;
+import java.util.*;
+import java.io.IOException;
+
+import cn.iocoder.yudao.framework.common.pojo.PageParam;
+import cn.iocoder.yudao.framework.common.pojo.PageResult;
+import cn.iocoder.yudao.framework.common.pojo.CommonResult;
+import cn.iocoder.yudao.framework.common.util.object.BeanUtils;
+import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success;
+
+import cn.iocoder.yudao.framework.excel.core.util.ExcelUtils;
+
+import cn.iocoder.yudao.framework.apilog.core.annotation.ApiAccessLog;
+import static cn.iocoder.yudao.framework.apilog.core.enums.OperateTypeEnum.*;
+
+import cn.iocoder.yudao.module.pm.controller.admin.customer.vo.*;
+import cn.iocoder.yudao.module.pm.dal.dataobject.customer.CustomerDO;
+import cn.iocoder.yudao.module.pm.service.customer.CustomerService;
+
+@Tag(name = "管理后台 - 客户信息")
+@RestController
+@RequestMapping("/pm/customer")
+@Validated
+public class CustomerController {
+
+ @Resource
+ private CustomerService customerService;
+
+ @PostMapping("/create")
+ @Operation(summary = "创建客户信息")
+ @PreAuthorize("@ss.hasPermission('pm:customer:create')")
+ public CommonResult createCustomer(@Valid @RequestBody CustomerSaveReqVO createReqVO) {
+ return success(customerService.createCustomer(createReqVO));
+ }
+
+ @PutMapping("/update")
+ @Operation(summary = "更新客户信息")
+ @PreAuthorize("@ss.hasPermission('pm:customer:update')")
+ public CommonResult updateCustomer(@Valid @RequestBody CustomerSaveReqVO updateReqVO) {
+ customerService.updateCustomer(updateReqVO);
+ return success(true);
+ }
+
+ @DeleteMapping("/delete")
+ @Operation(summary = "删除客户信息")
+ @Parameter(name = "id", description = "编号", required = true)
+ @PreAuthorize("@ss.hasPermission('pm:customer:delete')")
+ public CommonResult deleteCustomer(@RequestParam("id") Long id) {
+ customerService.deleteCustomer(id);
+ return success(true);
+ }
+
+ @GetMapping("/get")
+ @Operation(summary = "获得客户信息")
+ @Parameter(name = "id", description = "编号", required = true, example = "1024")
+ @PreAuthorize("@ss.hasPermission('pm:customer:query')")
+ public CommonResult getCustomer(@RequestParam("id") Long id) {
+ CustomerDO customer = customerService.getCustomer(id);
+ return success(BeanUtils.toBean(customer, CustomerRespVO.class));
+ }
+
+ @GetMapping("/page")
+ @Operation(summary = "获得客户信息分页")
+ @PreAuthorize("@ss.hasPermission('pm:customer:query')")
+ public CommonResult> getCustomerPage(@Valid CustomerPageReqVO pageReqVO) {
+ PageResult pageResult = customerService.getCustomerPage(pageReqVO);
+ return success(BeanUtils.toBean(pageResult, CustomerRespVO.class));
+ }
+
+ @GetMapping("/export-excel")
+ @Operation(summary = "导出客户信息 Excel")
+ @PreAuthorize("@ss.hasPermission('pm:customer:export')")
+ @ApiAccessLog(operateType = EXPORT)
+ public void exportCustomerExcel(@Valid CustomerPageReqVO pageReqVO,
+ HttpServletResponse response) throws IOException {
+ pageReqVO.setPageSize(PageParam.PAGE_SIZE_NONE);
+ List list = customerService.getCustomerPage(pageReqVO).getList();
+ // 导出 Excel
+ ExcelUtils.write(response, "客户信息.xls", "数据", CustomerRespVO.class,
+ BeanUtils.toBean(list, CustomerRespVO.class));
+ }
+
+}
\ No newline at end of file
diff --git a/yudao-module-pm/yudao-module-pm-biz/src/main/java/cn/iocoder/yudao/module/pm/controller/admin/customer/vo/CustomerPageReqVO.java b/yudao-module-pm/yudao-module-pm-biz/src/main/java/cn/iocoder/yudao/module/pm/controller/admin/customer/vo/CustomerPageReqVO.java
new file mode 100644
index 000000000..5a961e214
--- /dev/null
+++ b/yudao-module-pm/yudao-module-pm-biz/src/main/java/cn/iocoder/yudao/module/pm/controller/admin/customer/vo/CustomerPageReqVO.java
@@ -0,0 +1,36 @@
+package cn.iocoder.yudao.module.pm.controller.admin.customer.vo;
+
+import lombok.*;
+import java.util.*;
+import io.swagger.v3.oas.annotations.media.Schema;
+import cn.iocoder.yudao.framework.common.pojo.PageParam;
+import org.springframework.format.annotation.DateTimeFormat;
+import java.time.LocalDateTime;
+
+import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND;
+
+@Schema(description = "管理后台 - 客户信息分页 Request VO")
+@Data
+@EqualsAndHashCode(callSuper = true)
+@ToString(callSuper = true)
+public class CustomerPageReqVO extends PageParam {
+
+ @Schema(description = "主键", requiredMode = Schema.RequiredMode.REQUIRED, example = "18202")
+ private Long id;
+
+ @Schema(description = "客户名称", example = "设计院")
+ private String name;
+
+ @Schema(description = "组织机构代码", example = "91350200MAD0EHH44J")
+ private String code;
+
+ @Schema(description = "联系人", example = "张三")
+ private String contacts;
+
+ @Schema(description = "电话", example = "18655424896")
+ private String phone;
+
+ @Schema(description = "地址", example = "厦门市湖里区槟城道289号701室")
+ private String address;
+
+}
\ No newline at end of file
diff --git a/yudao-module-pm/yudao-module-pm-biz/src/main/java/cn/iocoder/yudao/module/pm/controller/admin/customer/vo/CustomerRespVO.java b/yudao-module-pm/yudao-module-pm-biz/src/main/java/cn/iocoder/yudao/module/pm/controller/admin/customer/vo/CustomerRespVO.java
new file mode 100644
index 000000000..601e36a24
--- /dev/null
+++ b/yudao-module-pm/yudao-module-pm-biz/src/main/java/cn/iocoder/yudao/module/pm/controller/admin/customer/vo/CustomerRespVO.java
@@ -0,0 +1,36 @@
+package cn.iocoder.yudao.module.pm.controller.admin.customer.vo;
+
+import io.swagger.v3.oas.annotations.media.Schema;
+import lombok.*;
+import java.util.*;
+import com.alibaba.excel.annotation.*;
+
+@Schema(description = "管理后台 - 客户信息 Response VO")
+@Data
+@ExcelIgnoreUnannotated
+public class CustomerRespVO {
+
+ @Schema(description = "主键", requiredMode = Schema.RequiredMode.REQUIRED, example = "18202")
+ private Long id;
+
+ @Schema(description = "客户名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "设计院")
+ @ExcelProperty("客户名称")
+ private String name;
+
+ @Schema(description = "组织机构代码", requiredMode = Schema.RequiredMode.REQUIRED, example = "91350200MAD0EHH44J")
+ @ExcelProperty("组织机构代码")
+ private String code;
+
+ @Schema(description = "联系人", requiredMode = Schema.RequiredMode.REQUIRED, example = "张三")
+ @ExcelProperty("联系人")
+ private String contacts;
+
+ @Schema(description = "电话", requiredMode = Schema.RequiredMode.REQUIRED, example = "18655424896")
+ @ExcelProperty("电话")
+ private String phone;
+
+ @Schema(description = "地址", requiredMode = Schema.RequiredMode.REQUIRED, example = "厦门市湖里区槟城道289号701室")
+ @ExcelProperty("地址")
+ private String address;
+
+}
\ No newline at end of file
diff --git a/yudao-module-pm/yudao-module-pm-biz/src/main/java/cn/iocoder/yudao/module/pm/controller/admin/customer/vo/CustomerSaveReqVO.java b/yudao-module-pm/yudao-module-pm-biz/src/main/java/cn/iocoder/yudao/module/pm/controller/admin/customer/vo/CustomerSaveReqVO.java
new file mode 100644
index 000000000..635c2dd58
--- /dev/null
+++ b/yudao-module-pm/yudao-module-pm-biz/src/main/java/cn/iocoder/yudao/module/pm/controller/admin/customer/vo/CustomerSaveReqVO.java
@@ -0,0 +1,35 @@
+package cn.iocoder.yudao.module.pm.controller.admin.customer.vo;
+
+import io.swagger.v3.oas.annotations.media.Schema;
+import lombok.*;
+import java.util.*;
+import jakarta.validation.constraints.*;
+
+@Schema(description = "管理后台 - 客户信息新增/修改 Request VO")
+@Data
+public class CustomerSaveReqVO {
+
+ @Schema(description = "主键", requiredMode = Schema.RequiredMode.REQUIRED, example = "18202")
+ private Long id;
+
+ @Schema(description = "客户名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "设计院")
+ @NotEmpty(message = "客户名称不能为空")
+ private String name;
+
+ @Schema(description = "组织机构代码", requiredMode = Schema.RequiredMode.REQUIRED, example = "91350200MAD0EHH44J")
+ @NotEmpty(message = "组织机构代码不能为空")
+ private String code;
+
+ @Schema(description = "联系人", requiredMode = Schema.RequiredMode.REQUIRED, example = "张三")
+ @NotEmpty(message = "联系人不能为空")
+ private String contacts;
+
+ @Schema(description = "电话", requiredMode = Schema.RequiredMode.REQUIRED, example = "18655424896")
+ @NotEmpty(message = "电话不能为空")
+ private String phone;
+
+ @Schema(description = "地址", requiredMode = Schema.RequiredMode.REQUIRED, example = "厦门市湖里区槟城道289号701室")
+ @NotEmpty(message = "地址不能为空")
+ private String address;
+
+}
\ No newline at end of file
diff --git a/yudao-module-pm/yudao-module-pm-biz/src/main/java/cn/iocoder/yudao/module/pm/controller/admin/subcontractor/SubcontractorController.java b/yudao-module-pm/yudao-module-pm-biz/src/main/java/cn/iocoder/yudao/module/pm/controller/admin/subcontractor/SubcontractorController.java
new file mode 100644
index 000000000..ed110e1d1
--- /dev/null
+++ b/yudao-module-pm/yudao-module-pm-biz/src/main/java/cn/iocoder/yudao/module/pm/controller/admin/subcontractor/SubcontractorController.java
@@ -0,0 +1,95 @@
+package cn.iocoder.yudao.module.pm.controller.admin.subcontractor;
+
+import org.springframework.web.bind.annotation.*;
+import jakarta.annotation.Resource;
+import org.springframework.validation.annotation.Validated;
+import org.springframework.security.access.prepost.PreAuthorize;
+import io.swagger.v3.oas.annotations.tags.Tag;
+import io.swagger.v3.oas.annotations.Parameter;
+import io.swagger.v3.oas.annotations.Operation;
+
+import jakarta.validation.constraints.*;
+import jakarta.validation.*;
+import jakarta.servlet.http.*;
+import java.util.*;
+import java.io.IOException;
+
+import cn.iocoder.yudao.framework.common.pojo.PageParam;
+import cn.iocoder.yudao.framework.common.pojo.PageResult;
+import cn.iocoder.yudao.framework.common.pojo.CommonResult;
+import cn.iocoder.yudao.framework.common.util.object.BeanUtils;
+import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success;
+
+import cn.iocoder.yudao.framework.excel.core.util.ExcelUtils;
+
+import cn.iocoder.yudao.framework.apilog.core.annotation.ApiAccessLog;
+import static cn.iocoder.yudao.framework.apilog.core.enums.OperateTypeEnum.*;
+
+import cn.iocoder.yudao.module.pm.controller.admin.subcontractor.vo.*;
+import cn.iocoder.yudao.module.pm.dal.dataobject.subcontractor.SubcontractorDO;
+import cn.iocoder.yudao.module.pm.service.subcontractor.SubcontractorService;
+
+@Tag(name = "管理后台 - 供应商信息")
+@RestController
+@RequestMapping("/pm/subcontractor")
+@Validated
+public class SubcontractorController {
+
+ @Resource
+ private SubcontractorService subcontractorService;
+
+ @PostMapping("/create")
+ @Operation(summary = "创建供应商信息")
+ @PreAuthorize("@ss.hasPermission('pm:subcontractor:create')")
+ public CommonResult createSubcontractor(@Valid @RequestBody SubcontractorSaveReqVO createReqVO) {
+ return success(subcontractorService.createSubcontractor(createReqVO));
+ }
+
+ @PutMapping("/update")
+ @Operation(summary = "更新供应商信息")
+ @PreAuthorize("@ss.hasPermission('pm:subcontractor:update')")
+ public CommonResult updateSubcontractor(@Valid @RequestBody SubcontractorSaveReqVO updateReqVO) {
+ subcontractorService.updateSubcontractor(updateReqVO);
+ return success(true);
+ }
+
+ @DeleteMapping("/delete")
+ @Operation(summary = "删除供应商信息")
+ @Parameter(name = "id", description = "编号", required = true)
+ @PreAuthorize("@ss.hasPermission('pm:subcontractor:delete')")
+ public CommonResult deleteSubcontractor(@RequestParam("id") Long id) {
+ subcontractorService.deleteSubcontractor(id);
+ return success(true);
+ }
+
+ @GetMapping("/get")
+ @Operation(summary = "获得供应商信息")
+ @Parameter(name = "id", description = "编号", required = true, example = "1024")
+ @PreAuthorize("@ss.hasPermission('pm:subcontractor:query')")
+ public CommonResult getSubcontractor(@RequestParam("id") Long id) {
+ SubcontractorDO subcontractor = subcontractorService.getSubcontractor(id);
+ return success(BeanUtils.toBean(subcontractor, SubcontractorRespVO.class));
+ }
+
+ @GetMapping("/page")
+ @Operation(summary = "获得供应商信息分页")
+ @PreAuthorize("@ss.hasPermission('pm:subcontractor:query')")
+ public CommonResult> getSubcontractorPage(@Valid SubcontractorPageReqVO pageReqVO) {
+ PageResult pageResult = subcontractorService.getSubcontractorPage(pageReqVO);
+ return success(BeanUtils.toBean(pageResult, SubcontractorRespVO.class));
+ }
+
+ @GetMapping("/export-excel")
+ @Operation(summary = "导出供应商信息 Excel")
+ @PreAuthorize("@ss.hasPermission('pm:subcontractor:export')")
+ @ApiAccessLog(operateType = EXPORT)
+ public void exportSubcontractorExcel(@Valid SubcontractorPageReqVO pageReqVO,
+ HttpServletResponse response) throws IOException {
+ pageReqVO.setPageSize(PageParam.PAGE_SIZE_NONE);
+ List list = subcontractorService.getSubcontractorPage(pageReqVO).getList();
+ // 导出 Excel
+ ExcelUtils.write(response, "供应商信息.xls", "数据", SubcontractorRespVO.class,
+ BeanUtils.toBean(list, SubcontractorRespVO.class));
+ }
+
+}
\ No newline at end of file
diff --git a/yudao-module-pm/yudao-module-pm-biz/src/main/java/cn/iocoder/yudao/module/pm/controller/admin/subcontractor/vo/SubcontractorPageReqVO.java b/yudao-module-pm/yudao-module-pm-biz/src/main/java/cn/iocoder/yudao/module/pm/controller/admin/subcontractor/vo/SubcontractorPageReqVO.java
new file mode 100644
index 000000000..53f543f83
--- /dev/null
+++ b/yudao-module-pm/yudao-module-pm-biz/src/main/java/cn/iocoder/yudao/module/pm/controller/admin/subcontractor/vo/SubcontractorPageReqVO.java
@@ -0,0 +1,33 @@
+package cn.iocoder.yudao.module.pm.controller.admin.subcontractor.vo;
+
+import lombok.*;
+import java.util.*;
+import io.swagger.v3.oas.annotations.media.Schema;
+import cn.iocoder.yudao.framework.common.pojo.PageParam;
+import org.springframework.format.annotation.DateTimeFormat;
+import java.time.LocalDateTime;
+
+import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND;
+
+@Schema(description = "管理后台 - 供应商信息分页 Request VO")
+@Data
+@EqualsAndHashCode(callSuper = true)
+@ToString(callSuper = true)
+public class SubcontractorPageReqVO extends PageParam {
+
+ @Schema(description = "供应商名称", example = "张三")
+ private String name;
+
+ @Schema(description = "组织机构代码", example = "12345")
+ private String code;
+
+ @Schema(description = "联系人", example = "张三")
+ private String contacts;
+
+ @Schema(description = "电话 ", example = "145789754112")
+ private String phone;
+
+ @Schema(description = "地址 ", example = "北京合同1234路")
+ private String address;
+
+}
\ No newline at end of file
diff --git a/yudao-module-pm/yudao-module-pm-biz/src/main/java/cn/iocoder/yudao/module/pm/controller/admin/subcontractor/vo/SubcontractorRespVO.java b/yudao-module-pm/yudao-module-pm-biz/src/main/java/cn/iocoder/yudao/module/pm/controller/admin/subcontractor/vo/SubcontractorRespVO.java
new file mode 100644
index 000000000..ec2aebddb
--- /dev/null
+++ b/yudao-module-pm/yudao-module-pm-biz/src/main/java/cn/iocoder/yudao/module/pm/controller/admin/subcontractor/vo/SubcontractorRespVO.java
@@ -0,0 +1,37 @@
+package cn.iocoder.yudao.module.pm.controller.admin.subcontractor.vo;
+
+import io.swagger.v3.oas.annotations.media.Schema;
+import lombok.*;
+import java.util.*;
+import com.alibaba.excel.annotation.*;
+
+@Schema(description = "管理后台 - 供应商信息 Response VO")
+@Data
+@ExcelIgnoreUnannotated
+public class SubcontractorRespVO {
+
+ @Schema(description = "主键", requiredMode = Schema.RequiredMode.REQUIRED, example = "9785")
+ @ExcelProperty("主键")
+ private Long id;
+
+ @Schema(description = "供应商名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "张三")
+ @ExcelProperty("供应商名称")
+ private String name;
+
+ @Schema(description = "组织机构代码", requiredMode = Schema.RequiredMode.REQUIRED, example = "12345")
+ @ExcelProperty("组织机构代码")
+ private String code;
+
+ @Schema(description = "联系人", requiredMode = Schema.RequiredMode.REQUIRED, example = "张三")
+ @ExcelProperty("联系人")
+ private String contacts;
+
+ @Schema(description = "电话 ", requiredMode = Schema.RequiredMode.REQUIRED, example = "145789754112")
+ @ExcelProperty("电话 ")
+ private String phone;
+
+ @Schema(description = "地址 ", requiredMode = Schema.RequiredMode.REQUIRED, example = "北京合同1234路")
+ @ExcelProperty("地址 ")
+ private String address;
+
+}
\ No newline at end of file
diff --git a/yudao-module-pm/yudao-module-pm-biz/src/main/java/cn/iocoder/yudao/module/pm/controller/admin/subcontractor/vo/SubcontractorSaveReqVO.java b/yudao-module-pm/yudao-module-pm-biz/src/main/java/cn/iocoder/yudao/module/pm/controller/admin/subcontractor/vo/SubcontractorSaveReqVO.java
new file mode 100644
index 000000000..947494091
--- /dev/null
+++ b/yudao-module-pm/yudao-module-pm-biz/src/main/java/cn/iocoder/yudao/module/pm/controller/admin/subcontractor/vo/SubcontractorSaveReqVO.java
@@ -0,0 +1,35 @@
+package cn.iocoder.yudao.module.pm.controller.admin.subcontractor.vo;
+
+import io.swagger.v3.oas.annotations.media.Schema;
+import lombok.*;
+import java.util.*;
+import jakarta.validation.constraints.*;
+
+@Schema(description = "管理后台 - 供应商信息新增/修改 Request VO")
+@Data
+public class SubcontractorSaveReqVO {
+
+ @Schema(description = "主键", requiredMode = Schema.RequiredMode.REQUIRED, example = "9785")
+ private Long id;
+
+ @Schema(description = "供应商名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "张三")
+ @NotEmpty(message = "供应商名称不能为空")
+ private String name;
+
+ @Schema(description = "组织机构代码", requiredMode = Schema.RequiredMode.REQUIRED, example = "12345")
+ @NotEmpty(message = "组织机构代码不能为空")
+ private String code;
+
+ @Schema(description = "联系人", requiredMode = Schema.RequiredMode.REQUIRED, example = "张三")
+ @NotEmpty(message = "联系人不能为空")
+ private String contacts;
+
+ @Schema(description = "电话 ", requiredMode = Schema.RequiredMode.REQUIRED, example = "145789754112")
+ @NotEmpty(message = "电话 不能为空")
+ private String phone;
+
+ @Schema(description = "地址 ", requiredMode = Schema.RequiredMode.REQUIRED, example = "北京合同1234路")
+ @NotEmpty(message = "地址 不能为空")
+ private String address;
+
+}
\ No newline at end of file
diff --git a/yudao-module-pm/yudao-module-pm-biz/src/main/java/cn/iocoder/yudao/module/pm/dal/dataobject/customer/CustomerDO.java b/yudao-module-pm/yudao-module-pm-biz/src/main/java/cn/iocoder/yudao/module/pm/dal/dataobject/customer/CustomerDO.java
new file mode 100644
index 000000000..6ba9ed491
--- /dev/null
+++ b/yudao-module-pm/yudao-module-pm-biz/src/main/java/cn/iocoder/yudao/module/pm/dal/dataobject/customer/CustomerDO.java
@@ -0,0 +1,71 @@
+package cn.iocoder.yudao.module.pm.dal.dataobject.customer;
+
+import lombok.*;
+import java.util.*;
+import java.time.LocalDateTime;
+import java.time.LocalDateTime;
+import com.baomidou.mybatisplus.annotation.*;
+import cn.iocoder.yudao.framework.mybatis.core.dataobject.BaseDO;
+
+/**
+ * 客户信息 DO
+ *
+ * @author hhyykk
+ */
+@TableName("pm_customer")
+@KeySequence("pm_customer_seq") // 用于 Oracle、PostgreSQL、Kingbase、DB2、H2 数据库的主键自增。如果是 MySQL 等数据库,可不写。
+@Data
+@EqualsAndHashCode(callSuper = true)
+@ToString(callSuper = true)
+@Builder
+@NoArgsConstructor
+@AllArgsConstructor
+public class CustomerDO extends BaseDO {
+
+ /**
+ * 主键
+ */
+ @TableId
+ private Long id;
+ /**
+ * 客户名称
+ */
+ private String name;
+ /**
+ * 组织机构代码
+ */
+ private String code;
+ /**
+ * 联系人
+ */
+ private String contacts;
+ /**
+ * 电话
+ */
+ private String phone;
+ /**
+ * 地址
+ */
+ private String address;
+ /**
+ * 拓展字段1
+ */
+ private String exText1;
+ /**
+ * 拓展字段2
+ */
+ private String exText2;
+ /**
+ * 拓展字段3
+ */
+ private String exText3;
+ /**
+ * 拓展字段3
+ */
+ private String exText4;
+ /**
+ * 拓展字段4
+ */
+ private String exText5;
+
+}
\ No newline at end of file
diff --git a/yudao-module-pm/yudao-module-pm-biz/src/main/java/cn/iocoder/yudao/module/pm/dal/dataobject/subcontractor/SubcontractorDO.java b/yudao-module-pm/yudao-module-pm-biz/src/main/java/cn/iocoder/yudao/module/pm/dal/dataobject/subcontractor/SubcontractorDO.java
new file mode 100644
index 000000000..f6ef36fb8
--- /dev/null
+++ b/yudao-module-pm/yudao-module-pm-biz/src/main/java/cn/iocoder/yudao/module/pm/dal/dataobject/subcontractor/SubcontractorDO.java
@@ -0,0 +1,71 @@
+package cn.iocoder.yudao.module.pm.dal.dataobject.subcontractor;
+
+import lombok.*;
+import java.util.*;
+import java.time.LocalDateTime;
+import java.time.LocalDateTime;
+import com.baomidou.mybatisplus.annotation.*;
+import cn.iocoder.yudao.framework.mybatis.core.dataobject.BaseDO;
+
+/**
+ * 供应商信息 DO
+ *
+ * @author hhyykk
+ */
+@TableName("pm_subcontractor")
+@KeySequence("pm_subcontractor_seq") // 用于 Oracle、PostgreSQL、Kingbase、DB2、H2 数据库的主键自增。如果是 MySQL 等数据库,可不写。
+@Data
+@EqualsAndHashCode(callSuper = true)
+@ToString(callSuper = true)
+@Builder
+@NoArgsConstructor
+@AllArgsConstructor
+public class SubcontractorDO extends BaseDO {
+
+ /**
+ * 主键
+ */
+ @TableId
+ private Long id;
+ /**
+ * 供应商名称
+ */
+ private String name;
+ /**
+ * 组织机构代码
+ */
+ private String code;
+ /**
+ * 联系人
+ */
+ private String contacts;
+ /**
+ * 电话
+ */
+ private String phone;
+ /**
+ * 地址
+ */
+ private String address;
+ /**
+ * 拓展字段1
+ */
+ private String exTxt1;
+ /**
+ * 拓展字段2
+ */
+ private String exTxt2;
+ /**
+ * 拓展字段3
+ */
+ private String exTxt3;
+ /**
+ * 拓展字段4
+ */
+ private String exTxt4;
+ /**
+ * 拓展字段5
+ */
+ private String exTxt5;
+
+}
\ No newline at end of file
diff --git a/yudao-module-pm/yudao-module-pm-biz/src/main/java/cn/iocoder/yudao/module/pm/dal/mysql/customer/CustomerMapper.java b/yudao-module-pm/yudao-module-pm-biz/src/main/java/cn/iocoder/yudao/module/pm/dal/mysql/customer/CustomerMapper.java
new file mode 100644
index 000000000..d8cf1da9c
--- /dev/null
+++ b/yudao-module-pm/yudao-module-pm-biz/src/main/java/cn/iocoder/yudao/module/pm/dal/mysql/customer/CustomerMapper.java
@@ -0,0 +1,30 @@
+package cn.iocoder.yudao.module.pm.dal.mysql.customer;
+
+import java.util.*;
+
+import cn.iocoder.yudao.framework.common.pojo.PageResult;
+import cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX;
+import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX;
+import cn.iocoder.yudao.module.pm.dal.dataobject.customer.CustomerDO;
+import org.apache.ibatis.annotations.Mapper;
+import cn.iocoder.yudao.module.pm.controller.admin.customer.vo.*;
+
+/**
+ * 客户信息 Mapper
+ *
+ * @author hhyykk
+ */
+@Mapper
+public interface CustomerMapper extends BaseMapperX {
+
+ default PageResult selectPage(CustomerPageReqVO reqVO) {
+ return selectPage(reqVO, new LambdaQueryWrapperX()
+ .likeIfPresent(CustomerDO::getName, reqVO.getName())
+ .likeIfPresent(CustomerDO::getCode, reqVO.getCode())
+ .likeIfPresent(CustomerDO::getContacts, reqVO.getContacts())
+ .likeIfPresent(CustomerDO::getPhone, reqVO.getPhone())
+ .likeIfPresent(CustomerDO::getAddress, reqVO.getAddress())
+ .orderByDesc(CustomerDO::getId));
+ }
+
+}
\ No newline at end of file
diff --git a/yudao-module-pm/yudao-module-pm-biz/src/main/java/cn/iocoder/yudao/module/pm/dal/mysql/subcontractor/SubcontractorMapper.java b/yudao-module-pm/yudao-module-pm-biz/src/main/java/cn/iocoder/yudao/module/pm/dal/mysql/subcontractor/SubcontractorMapper.java
new file mode 100644
index 000000000..32164a52f
--- /dev/null
+++ b/yudao-module-pm/yudao-module-pm-biz/src/main/java/cn/iocoder/yudao/module/pm/dal/mysql/subcontractor/SubcontractorMapper.java
@@ -0,0 +1,30 @@
+package cn.iocoder.yudao.module.pm.dal.mysql.subcontractor;
+
+import java.util.*;
+
+import cn.iocoder.yudao.framework.common.pojo.PageResult;
+import cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX;
+import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX;
+import cn.iocoder.yudao.module.pm.dal.dataobject.subcontractor.SubcontractorDO;
+import org.apache.ibatis.annotations.Mapper;
+import cn.iocoder.yudao.module.pm.controller.admin.subcontractor.vo.*;
+
+/**
+ * 供应商信息 Mapper
+ *
+ * @author hhyykk
+ */
+@Mapper
+public interface SubcontractorMapper extends BaseMapperX {
+
+ default PageResult selectPage(SubcontractorPageReqVO reqVO) {
+ return selectPage(reqVO, new LambdaQueryWrapperX()
+ .likeIfPresent(SubcontractorDO::getName, reqVO.getName())
+ .likeIfPresent(SubcontractorDO::getCode, reqVO.getCode())
+ .likeIfPresent(SubcontractorDO::getContacts, reqVO.getContacts())
+ .likeIfPresent(SubcontractorDO::getPhone, reqVO.getPhone())
+ .likeIfPresent(SubcontractorDO::getAddress, reqVO.getAddress())
+ .orderByDesc(SubcontractorDO::getId));
+ }
+
+}
\ No newline at end of file
diff --git a/yudao-module-pm/yudao-module-pm-biz/src/main/java/cn/iocoder/yudao/module/pm/package-info.java b/yudao-module-pm/yudao-module-pm-biz/src/main/java/cn/iocoder/yudao/module/pm/package-info.java
new file mode 100644
index 000000000..2bf850cd1
--- /dev/null
+++ b/yudao-module-pm/yudao-module-pm-biz/src/main/java/cn/iocoder/yudao/module/pm/package-info.java
@@ -0,0 +1 @@
+package cn.iocoder.yudao.module.pm;
\ No newline at end of file
diff --git a/yudao-module-pm/yudao-module-pm-biz/src/main/java/cn/iocoder/yudao/module/pm/service/customer/CustomerService.java b/yudao-module-pm/yudao-module-pm-biz/src/main/java/cn/iocoder/yudao/module/pm/service/customer/CustomerService.java
new file mode 100644
index 000000000..439e9ad1d
--- /dev/null
+++ b/yudao-module-pm/yudao-module-pm-biz/src/main/java/cn/iocoder/yudao/module/pm/service/customer/CustomerService.java
@@ -0,0 +1,55 @@
+package cn.iocoder.yudao.module.pm.service.customer;
+
+import java.util.*;
+import jakarta.validation.*;
+import cn.iocoder.yudao.module.pm.controller.admin.customer.vo.*;
+import cn.iocoder.yudao.module.pm.dal.dataobject.customer.CustomerDO;
+import cn.iocoder.yudao.framework.common.pojo.PageResult;
+import cn.iocoder.yudao.framework.common.pojo.PageParam;
+
+/**
+ * 客户信息 Service 接口
+ *
+ * @author hhyykk
+ */
+public interface CustomerService {
+
+ /**
+ * 创建客户信息
+ *
+ * @param createReqVO 创建信息
+ * @return 编号
+ */
+ Long createCustomer(@Valid CustomerSaveReqVO createReqVO);
+
+ /**
+ * 更新客户信息
+ *
+ * @param updateReqVO 更新信息
+ */
+ void updateCustomer(@Valid CustomerSaveReqVO updateReqVO);
+
+ /**
+ * 删除客户信息
+ *
+ * @param id 编号
+ */
+ void deleteCustomer(Long id);
+
+ /**
+ * 获得客户信息
+ *
+ * @param id 编号
+ * @return 客户信息
+ */
+ CustomerDO getCustomer(Long id);
+
+ /**
+ * 获得客户信息分页
+ *
+ * @param pageReqVO 分页查询
+ * @return 客户信息分页
+ */
+ PageResult getCustomerPage(CustomerPageReqVO pageReqVO);
+
+}
\ No newline at end of file
diff --git a/yudao-module-pm/yudao-module-pm-biz/src/main/java/cn/iocoder/yudao/module/pm/service/customer/CustomerServiceImpl.java b/yudao-module-pm/yudao-module-pm-biz/src/main/java/cn/iocoder/yudao/module/pm/service/customer/CustomerServiceImpl.java
new file mode 100644
index 000000000..fe293c1d2
--- /dev/null
+++ b/yudao-module-pm/yudao-module-pm-biz/src/main/java/cn/iocoder/yudao/module/pm/service/customer/CustomerServiceImpl.java
@@ -0,0 +1,74 @@
+package cn.iocoder.yudao.module.pm.service.customer;
+
+import org.springframework.stereotype.Service;
+import jakarta.annotation.Resource;
+import org.springframework.validation.annotation.Validated;
+import org.springframework.transaction.annotation.Transactional;
+
+import java.util.*;
+import cn.iocoder.yudao.module.pm.controller.admin.customer.vo.*;
+import cn.iocoder.yudao.module.pm.dal.dataobject.customer.CustomerDO;
+import cn.iocoder.yudao.framework.common.pojo.PageResult;
+import cn.iocoder.yudao.framework.common.pojo.PageParam;
+import cn.iocoder.yudao.framework.common.util.object.BeanUtils;
+
+import cn.iocoder.yudao.module.pm.dal.mysql.customer.CustomerMapper;
+
+import static cn.iocoder.yudao.framework.common.exception.util.ServiceExceptionUtil.exception;
+import static cn.iocoder.yudao.module.pm.enums.ErrorCodeConstants.*;
+
+/**
+ * 客户信息 Service 实现类
+ *
+ * @author hhyykk
+ */
+@Service
+@Validated
+public class CustomerServiceImpl implements CustomerService {
+
+ @Resource
+ private CustomerMapper customerMapper;
+
+ @Override
+ public Long createCustomer(CustomerSaveReqVO createReqVO) {
+ // 插入
+ CustomerDO customer = BeanUtils.toBean(createReqVO, CustomerDO.class);
+ customerMapper.insert(customer);
+ // 返回
+ return customer.getId();
+ }
+
+ @Override
+ public void updateCustomer(CustomerSaveReqVO updateReqVO) {
+ // 校验存在
+ validateCustomerExists(updateReqVO.getId());
+ // 更新
+ CustomerDO updateObj = BeanUtils.toBean(updateReqVO, CustomerDO.class);
+ customerMapper.updateById(updateObj);
+ }
+
+ @Override
+ public void deleteCustomer(Long id) {
+ // 校验存在
+ validateCustomerExists(id);
+ // 删除
+ customerMapper.deleteById(id);
+ }
+
+ private void validateCustomerExists(Long id) {
+ if (customerMapper.selectById(id) == null) {
+ throw exception(CUSTOMER_NOT_EXISTS);
+ }
+ }
+
+ @Override
+ public CustomerDO getCustomer(Long id) {
+ return customerMapper.selectById(id);
+ }
+
+ @Override
+ public PageResult getCustomerPage(CustomerPageReqVO pageReqVO) {
+ return customerMapper.selectPage(pageReqVO);
+ }
+
+}
\ No newline at end of file
diff --git a/yudao-module-pm/yudao-module-pm-biz/src/main/java/cn/iocoder/yudao/module/pm/service/subcontractor/SubcontractorService.java b/yudao-module-pm/yudao-module-pm-biz/src/main/java/cn/iocoder/yudao/module/pm/service/subcontractor/SubcontractorService.java
new file mode 100644
index 000000000..d0e2d8d5a
--- /dev/null
+++ b/yudao-module-pm/yudao-module-pm-biz/src/main/java/cn/iocoder/yudao/module/pm/service/subcontractor/SubcontractorService.java
@@ -0,0 +1,55 @@
+package cn.iocoder.yudao.module.pm.service.subcontractor;
+
+import java.util.*;
+import jakarta.validation.*;
+import cn.iocoder.yudao.module.pm.controller.admin.subcontractor.vo.*;
+import cn.iocoder.yudao.module.pm.dal.dataobject.subcontractor.SubcontractorDO;
+import cn.iocoder.yudao.framework.common.pojo.PageResult;
+import cn.iocoder.yudao.framework.common.pojo.PageParam;
+
+/**
+ * 供应商信息 Service 接口
+ *
+ * @author hhyykk
+ */
+public interface SubcontractorService {
+
+ /**
+ * 创建供应商信息
+ *
+ * @param createReqVO 创建信息
+ * @return 编号
+ */
+ Long createSubcontractor(@Valid SubcontractorSaveReqVO createReqVO);
+
+ /**
+ * 更新供应商信息
+ *
+ * @param updateReqVO 更新信息
+ */
+ void updateSubcontractor(@Valid SubcontractorSaveReqVO updateReqVO);
+
+ /**
+ * 删除供应商信息
+ *
+ * @param id 编号
+ */
+ void deleteSubcontractor(Long id);
+
+ /**
+ * 获得供应商信息
+ *
+ * @param id 编号
+ * @return 供应商信息
+ */
+ SubcontractorDO getSubcontractor(Long id);
+
+ /**
+ * 获得供应商信息分页
+ *
+ * @param pageReqVO 分页查询
+ * @return 供应商信息分页
+ */
+ PageResult getSubcontractorPage(SubcontractorPageReqVO pageReqVO);
+
+}
\ No newline at end of file
diff --git a/yudao-module-pm/yudao-module-pm-biz/src/main/java/cn/iocoder/yudao/module/pm/service/subcontractor/SubcontractorServiceImpl.java b/yudao-module-pm/yudao-module-pm-biz/src/main/java/cn/iocoder/yudao/module/pm/service/subcontractor/SubcontractorServiceImpl.java
new file mode 100644
index 000000000..4a4a0ccd5
--- /dev/null
+++ b/yudao-module-pm/yudao-module-pm-biz/src/main/java/cn/iocoder/yudao/module/pm/service/subcontractor/SubcontractorServiceImpl.java
@@ -0,0 +1,74 @@
+package cn.iocoder.yudao.module.pm.service.subcontractor;
+
+import org.springframework.stereotype.Service;
+import jakarta.annotation.Resource;
+import org.springframework.validation.annotation.Validated;
+import org.springframework.transaction.annotation.Transactional;
+
+import java.util.*;
+import cn.iocoder.yudao.module.pm.controller.admin.subcontractor.vo.*;
+import cn.iocoder.yudao.module.pm.dal.dataobject.subcontractor.SubcontractorDO;
+import cn.iocoder.yudao.framework.common.pojo.PageResult;
+import cn.iocoder.yudao.framework.common.pojo.PageParam;
+import cn.iocoder.yudao.framework.common.util.object.BeanUtils;
+
+import cn.iocoder.yudao.module.pm.dal.mysql.subcontractor.SubcontractorMapper;
+
+import static cn.iocoder.yudao.framework.common.exception.util.ServiceExceptionUtil.exception;
+import static cn.iocoder.yudao.module.pm.enums.ErrorCodeConstants.*;
+
+/**
+ * 供应商信息 Service 实现类
+ *
+ * @author hhyykk
+ */
+@Service
+@Validated
+public class SubcontractorServiceImpl implements SubcontractorService {
+
+ @Resource
+ private SubcontractorMapper subcontractorMapper;
+
+ @Override
+ public Long createSubcontractor(SubcontractorSaveReqVO createReqVO) {
+ // 插入
+ SubcontractorDO subcontractor = BeanUtils.toBean(createReqVO, SubcontractorDO.class);
+ subcontractorMapper.insert(subcontractor);
+ // 返回
+ return subcontractor.getId();
+ }
+
+ @Override
+ public void updateSubcontractor(SubcontractorSaveReqVO updateReqVO) {
+ // 校验存在
+ validateSubcontractorExists(updateReqVO.getId());
+ // 更新
+ SubcontractorDO updateObj = BeanUtils.toBean(updateReqVO, SubcontractorDO.class);
+ subcontractorMapper.updateById(updateObj);
+ }
+
+ @Override
+ public void deleteSubcontractor(Long id) {
+ // 校验存在
+ validateSubcontractorExists(id);
+ // 删除
+ subcontractorMapper.deleteById(id);
+ }
+
+ private void validateSubcontractorExists(Long id) {
+ if (subcontractorMapper.selectById(id) == null) {
+ throw exception(SUBCONTRACTOR_NOT_EXISTS);
+ }
+ }
+
+ @Override
+ public SubcontractorDO getSubcontractor(Long id) {
+ return subcontractorMapper.selectById(id);
+ }
+
+ @Override
+ public PageResult getSubcontractorPage(SubcontractorPageReqVO pageReqVO) {
+ return subcontractorMapper.selectPage(pageReqVO);
+ }
+
+}
\ No newline at end of file
diff --git a/yudao-module-pm/yudao-module-pm-biz/src/main/resources/mapper/customer/CustomerMapper.xml b/yudao-module-pm/yudao-module-pm-biz/src/main/resources/mapper/customer/CustomerMapper.xml
new file mode 100644
index 000000000..8cbc7fcb8
--- /dev/null
+++ b/yudao-module-pm/yudao-module-pm-biz/src/main/resources/mapper/customer/CustomerMapper.xml
@@ -0,0 +1,12 @@
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/yudao-module-pm/yudao-module-pm-biz/src/main/resources/mapper/subcontractor/SubcontractorMapper.xml b/yudao-module-pm/yudao-module-pm-biz/src/main/resources/mapper/subcontractor/SubcontractorMapper.xml
new file mode 100644
index 000000000..8d7520ba4
--- /dev/null
+++ b/yudao-module-pm/yudao-module-pm-biz/src/main/resources/mapper/subcontractor/SubcontractorMapper.xml
@@ -0,0 +1,12 @@
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/yudao-module-pms/yudao-module-pms-biz/pom.xml b/yudao-module-pms/yudao-module-pms-biz/pom.xml
index 66f320263..fe981318c 100644
--- a/yudao-module-pms/yudao-module-pms-biz/pom.xml
+++ b/yudao-module-pms/yudao-module-pms-biz/pom.xml
@@ -66,7 +66,7 @@
cn.iocoder.boot
yudao-module-cms-biz
- 2.1.0-snapshot
+ ${revision}
compile
diff --git a/yudao-server/pom.xml b/yudao-server/pom.xml
index 66706eac4..454f4264b 100644
--- a/yudao-server/pom.xml
+++ b/yudao-server/pom.xml
@@ -113,12 +113,20 @@
yudao-module-cms-biz
${revision}
+
+
+
+ cn.iocoder.boot
+ yudao-module-pm-biz
+ ${revision}
+
+
-
-
-
-
-
+
+ cn.iocoder.boot
+ yudao-module-ai-biz
+ ${revision}
+