diff --git a/dl-module-base/src/main/java/cn/iocoder/yudao/module/company/entity/Company.java b/dl-module-base/src/main/java/cn/iocoder/yudao/module/company/entity/Company.java index b15bfc76..33e6f43d 100644 --- a/dl-module-base/src/main/java/cn/iocoder/yudao/module/company/entity/Company.java +++ b/dl-module-base/src/main/java/cn/iocoder/yudao/module/company/entity/Company.java @@ -4,7 +4,6 @@ import cn.iocoder.yudao.converter.DateFormatConverter; import cn.iocoder.yudao.framework.tenant.core.db.TenantBaseDO; import com.alibaba.excel.annotation.ExcelIgnoreUnannotated; import com.alibaba.excel.annotation.ExcelProperty; -import com.alibaba.excel.annotation.write.style.ContentRowHeight; import com.baomidou.mybatisplus.annotation.IdType; import com.baomidou.mybatisplus.annotation.TableName; import com.baomidou.mybatisplus.annotation.TableId; diff --git a/dl-module-base/src/main/java/cn/iocoder/yudao/module/company/entity/CompanyQuals.java b/dl-module-base/src/main/java/cn/iocoder/yudao/module/company/entity/CompanyQuals.java index d3a999ad..7851765e 100644 --- a/dl-module-base/src/main/java/cn/iocoder/yudao/module/company/entity/CompanyQuals.java +++ b/dl-module-base/src/main/java/cn/iocoder/yudao/module/company/entity/CompanyQuals.java @@ -1,9 +1,7 @@ package cn.iocoder.yudao.module.company.entity; -import cn.iocoder.yudao.converter.DateFormatConverter; import cn.iocoder.yudao.framework.tenant.core.db.TenantBaseDO; import com.alibaba.excel.annotation.ExcelIgnoreUnannotated; -import com.alibaba.excel.annotation.ExcelProperty; import com.baomidou.mybatisplus.annotation.IdType; import com.baomidou.mybatisplus.annotation.TableId; import com.baomidou.mybatisplus.annotation.TableName; diff --git a/dl-module-base/src/main/java/cn/iocoder/yudao/module/company/mapper/CompanyQualsMapper.java b/dl-module-base/src/main/java/cn/iocoder/yudao/module/company/mapper/CompanyQualsMapper.java index 72f64223..697d13a9 100644 --- a/dl-module-base/src/main/java/cn/iocoder/yudao/module/company/mapper/CompanyQualsMapper.java +++ b/dl-module-base/src/main/java/cn/iocoder/yudao/module/company/mapper/CompanyQualsMapper.java @@ -1,14 +1,8 @@ package cn.iocoder.yudao.module.company.mapper; -import cn.iocoder.yudao.module.company.entity.Company; import cn.iocoder.yudao.module.company.entity.CompanyQuals; -import cn.iocoder.yudao.module.company.vo.CompanyQualsReqVO; -import cn.iocoder.yudao.module.company.vo.CompanyReqVO; import com.baomidou.mybatisplus.core.mapper.BaseMapper; -import com.baomidou.mybatisplus.core.metadata.IPage; -import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import org.apache.ibatis.annotations.Mapper; -import org.apache.ibatis.annotations.Param; /** * 企业资质信息表 diff --git a/dl-module-base/src/main/java/cn/iocoder/yudao/module/company/service/CompanyQualsService.java b/dl-module-base/src/main/java/cn/iocoder/yudao/module/company/service/CompanyQualsService.java index 8efe4efc..53b4688f 100644 --- a/dl-module-base/src/main/java/cn/iocoder/yudao/module/company/service/CompanyQualsService.java +++ b/dl-module-base/src/main/java/cn/iocoder/yudao/module/company/service/CompanyQualsService.java @@ -1,13 +1,7 @@ package cn.iocoder.yudao.module.company.service; -import cn.iocoder.yudao.module.company.entity.Company; import cn.iocoder.yudao.module.company.entity.CompanyQuals; -import cn.iocoder.yudao.module.company.vo.CompanyQualsReqVO; import cn.iocoder.yudao.module.company.vo.CompanyQualsRespVO; -import cn.iocoder.yudao.module.company.vo.CompanyReqVO; -import cn.iocoder.yudao.module.company.vo.CompanyRespVO; -import com.baomidou.mybatisplus.core.metadata.IPage; -import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.service.IService; /** diff --git a/dl-module-base/src/main/java/cn/iocoder/yudao/module/company/service/impl/CompanyQualsServiceImpl.java b/dl-module-base/src/main/java/cn/iocoder/yudao/module/company/service/impl/CompanyQualsServiceImpl.java index c9a04212..d9cbd915 100644 --- a/dl-module-base/src/main/java/cn/iocoder/yudao/module/company/service/impl/CompanyQualsServiceImpl.java +++ b/dl-module-base/src/main/java/cn/iocoder/yudao/module/company/service/impl/CompanyQualsServiceImpl.java @@ -1,14 +1,9 @@ package cn.iocoder.yudao.module.company.service.impl; -import cn.iocoder.yudao.module.company.entity.Company; import cn.iocoder.yudao.module.company.entity.CompanyQuals; -import cn.iocoder.yudao.module.company.mapper.CompanyMapper; import cn.iocoder.yudao.module.company.mapper.CompanyQualsMapper; import cn.iocoder.yudao.module.company.service.CompanyQualsService; -import cn.iocoder.yudao.module.company.vo.CompanyQualsReqVO; import cn.iocoder.yudao.module.company.vo.CompanyQualsRespVO; -import com.baomidou.mybatisplus.core.metadata.IPage; -import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import org.springframework.stereotype.Service; diff --git a/dl-module-base/src/main/java/cn/iocoder/yudao/module/company/service/impl/CompanyServiceImpl.java b/dl-module-base/src/main/java/cn/iocoder/yudao/module/company/service/impl/CompanyServiceImpl.java index a754af33..3dbb8c57 100644 --- a/dl-module-base/src/main/java/cn/iocoder/yudao/module/company/service/impl/CompanyServiceImpl.java +++ b/dl-module-base/src/main/java/cn/iocoder/yudao/module/company/service/impl/CompanyServiceImpl.java @@ -1,6 +1,5 @@ package cn.iocoder.yudao.module.company.service.impl; -import cn.hutool.core.convert.Convert; import cn.hutool.core.util.StrUtil; import cn.iocoder.yudao.framework.common.enums.CommonStatusEnum; import cn.iocoder.yudao.framework.common.exception.ErrorCode; @@ -11,12 +10,9 @@ import cn.iocoder.yudao.module.system.api.dept.DeptApi; import cn.iocoder.yudao.module.system.api.dept.dto.DeptRespDTO; import cn.iocoder.yudao.module.system.api.permission.PermissionApi; import cn.iocoder.yudao.module.system.api.permission.RoleApi; -import cn.iocoder.yudao.module.system.api.permission.dto.RoleReqDTO; import cn.iocoder.yudao.module.system.api.user.AdminUserApi; import cn.iocoder.yudao.module.system.api.user.dto.AdminUserRespDTO; import cn.iocoder.yudao.module.system.api.user.dto.UserDTO; -import cn.iocoder.yudao.module.system.enums.permission.RoleCodeEnum; -import cn.iocoder.yudao.module.system.enums.permission.RoleTypeEnum; import com.baomidou.dynamic.datasource.annotation.DSTransactional; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import cn.iocoder.yudao.module.company.vo.CompanyReqVO; @@ -27,7 +23,6 @@ import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import cn.iocoder.yudao.module.company.mapper.CompanyMapper; import cn.iocoder.yudao.module.company.service.CompanyService; -import org.springframework.transaction.annotation.Transactional; import javax.annotation.Resource; @@ -38,8 +33,6 @@ import java.util.Set; import static cn.iocoder.yudao.framework.common.exception.util.ServiceExceptionUtil.exception; import static cn.iocoder.yudao.framework.common.util.collection.CollectionUtils.convertSet; -import static cn.iocoder.yudao.module.system.enums.ErrorCodeConstants.USER_NOT_EXISTS; -import static java.util.Collections.singleton; /** * 企业信息表(每个租户的下属企业信息);(dl_company)表服务实现类 diff --git a/dl-module-base/src/main/java/cn/iocoder/yudao/module/company/vo/CompanyQualsReqVO.java b/dl-module-base/src/main/java/cn/iocoder/yudao/module/company/vo/CompanyQualsReqVO.java index 9f5bd5a1..ea32c716 100644 --- a/dl-module-base/src/main/java/cn/iocoder/yudao/module/company/vo/CompanyQualsReqVO.java +++ b/dl-module-base/src/main/java/cn/iocoder/yudao/module/company/vo/CompanyQualsReqVO.java @@ -1,14 +1,7 @@ package cn.iocoder.yudao.module.company.vo; -import cn.iocoder.yudao.module.company.entity.Company; import cn.iocoder.yudao.module.company.entity.CompanyQuals; -import io.swagger.v3.oas.annotations.media.Schema; import lombok.Data; -import org.springframework.format.annotation.DateTimeFormat; - -import java.util.Date; - -import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND; /** * 企业资质信息表查询条件实体 diff --git a/dl-module-base/src/main/java/cn/iocoder/yudao/module/company/vo/CompanyQualsRespVO.java b/dl-module-base/src/main/java/cn/iocoder/yudao/module/company/vo/CompanyQualsRespVO.java index 59f6ded2..91f2703c 100644 --- a/dl-module-base/src/main/java/cn/iocoder/yudao/module/company/vo/CompanyQualsRespVO.java +++ b/dl-module-base/src/main/java/cn/iocoder/yudao/module/company/vo/CompanyQualsRespVO.java @@ -1,11 +1,8 @@ package cn.iocoder.yudao.module.company.vo; -import cn.iocoder.yudao.module.company.entity.Company; import cn.iocoder.yudao.module.company.entity.CompanyQuals; import lombok.Data; -import java.util.List; - /** * 企业资质返回结果或提交vo * @author vinjor-M diff --git a/dl-module-base/src/main/java/cn/iocoder/yudao/module/company/vo/CompanyRespVO.java b/dl-module-base/src/main/java/cn/iocoder/yudao/module/company/vo/CompanyRespVO.java index f6eba2c8..a61d3fd0 100644 --- a/dl-module-base/src/main/java/cn/iocoder/yudao/module/company/vo/CompanyRespVO.java +++ b/dl-module-base/src/main/java/cn/iocoder/yudao/module/company/vo/CompanyRespVO.java @@ -1,15 +1,10 @@ package cn.iocoder.yudao.module.company.vo; import cn.iocoder.yudao.module.company.entity.Company; -import io.swagger.v3.oas.annotations.media.Schema; import lombok.Data; -import org.springframework.format.annotation.DateTimeFormat; -import java.util.Date; import java.util.List; -import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND; - /** * 企业返回结果或提交vo * @author vinjor-M diff --git a/dl-module-company/pom.xml b/dl-module-company/pom.xml new file mode 100644 index 00000000..213828e7 --- /dev/null +++ b/dl-module-company/pom.xml @@ -0,0 +1,86 @@ + + + + cn.iocoder.boot + yudao + ${revision} + + 4.0.0 + dl-module-company + jar + ${project.artifactId} + + 点亮企业管理库 + + + + cn.iocoder.boot + yudao-module-system-api + ${revision} + + + cn.iocoder.boot + yudao-module-infra-api + ${revision} + + + cn.iocoder.boot + yudao-spring-boot-starter-biz-tenant + 2.1.0-jdk8-snapshot + + + + cn.iocoder.boot + yudao-spring-boot-starter-security + + + + org.springframework.boot + spring-boot-starter-validation + + + + + cn.iocoder.boot + yudao-spring-boot-starter-mybatis + + + + cn.iocoder.boot + yudao-spring-boot-starter-redis + + + + + cn.iocoder.boot + yudao-spring-boot-starter-job + + + + + cn.iocoder.boot + yudao-spring-boot-starter-mq + + + + + cn.iocoder.boot + yudao-spring-boot-starter-test + test + + + + + cn.iocoder.boot + yudao-spring-boot-starter-excel + + + + org.springframework.boot + spring-boot-starter-mail + + + + \ No newline at end of file diff --git a/dl-module-company/src/main/java/cn/iocoder/yudao/module/company/controller/admin/CompanyStaffController.java b/dl-module-company/src/main/java/cn/iocoder/yudao/module/company/controller/admin/CompanyStaffController.java new file mode 100644 index 00000000..d77d74c3 --- /dev/null +++ b/dl-module-company/src/main/java/cn/iocoder/yudao/module/company/controller/admin/CompanyStaffController.java @@ -0,0 +1,147 @@ +package cn.iocoder.yudao.module.company.controller.admin; + +import cn.hutool.core.util.StrUtil; +import cn.iocoder.yudao.framework.apilog.core.annotation.ApiAccessLog; +import cn.iocoder.yudao.framework.common.pojo.CommonResult; +import cn.iocoder.yudao.framework.common.util.object.BeanUtils; +import cn.iocoder.yudao.framework.excel.core.util.ExcelUtils; +import cn.iocoder.yudao.module.company.entity.CompanyStaff; +import cn.iocoder.yudao.module.company.service.CompanyStaffService; +import cn.iocoder.yudao.module.company.vo.CompanyStaffReqVO; +import cn.iocoder.yudao.module.company.vo.CompanyStaffRespVO; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import io.swagger.v3.oas.annotations.Operation; +import io.swagger.v3.oas.annotations.Parameter; +import io.swagger.v3.oas.annotations.tags.Tag; +import org.apache.commons.lang3.StringUtils; +import org.springframework.security.access.prepost.PreAuthorize; +import org.springframework.validation.annotation.Validated; +import org.springframework.web.bind.annotation.*; + +import javax.annotation.Resource; +import javax.servlet.http.HttpServletResponse; +import java.io.IOException; +import java.util.Arrays; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +import static cn.iocoder.yudao.framework.apilog.core.enums.OperateTypeEnum.EXPORT; +import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success; + +/** + * 企业管理-员工信息表 控制层 + * @author 小李 + * @date 17:14 2024/8/6 +**/ +@RestController +@RequestMapping("/company/staff") +@Tag(name = "管理后台 - 企业管理 - 员工管理") +@Validated +public class CompanyStaffController { + + @Resource + private CompanyStaffService staffService; + + /** + * 分页查询 + * @author 小李 + * @date 17:19 2024/8/6 + * @param pageReqVO 查询条件对象 + * @param pageNo 页码 + * @param pageSize 条数 + **/ + @GetMapping("/page") + @Operation(summary = "获得企业管理-员工信息表信息分页") + @PreAuthorize("@ss.hasPermission('company:staff:query')") + public CommonResult> getCompanyPage(CompanyStaffReqVO pageReqVO, + @RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo, + @RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize) { + Page page = new Page<>(pageNo, pageSize); + return success(staffService.queryListPage(pageReqVO, page)); + } + + /** + * 新增员工 + * @author 小李 + * @date 17:20 2024/8/6 + * @param staffRespVO 员工对象 + **/ + @PostMapping("/create") + @Operation(summary = "创建企业管理-员工信息表信息") + @PreAuthorize("@ss.hasPermission('company:staff:create')") + public CommonResult createCompany(@RequestBody CompanyStaffRespVO staffRespVO) { + staffService.saveStaff(staffRespVO); + return CommonResult.ok(); + } + + /** + * 修改员工 + * @author 小李 + * @date 17:24 2024/8/6 + * @param staffRespVO 员工对象 + **/ + @PutMapping("/update") + @Operation(summary = "更新企业管理-员工信息表信息") + @PreAuthorize("@ss.hasPermission('company:staff:update')") + public CommonResult updateCompany(@RequestBody CompanyStaffRespVO staffRespVO) { + staffService.updateStaff(staffRespVO); + return CommonResult.ok(); + } + + /** + * 删除员工 + * @author 小李 + * @date 17:28 2024/8/6 + * @param id 员工id + **/ + @DeleteMapping("/delete") + @Operation(summary = "删除企业管理-员工信息表信息") + @Parameter(name = "id", description = "编号", required = true) + @PreAuthorize("@ss.hasPermission('company:staff:delete')") + public CommonResult deleteCompany(@RequestParam("id") String id) { + staffService.deleteStaff(id); + return success(true); + } + + /** + * 查询员工 + * @author 小李 + * @date 17:59 2024/8/6 + * @param id + **/ + @GetMapping("/get") + @Operation(summary = "获得企业管理-员工信息表信息") + @Parameter(name = "id", description = "编号", required = true, example = "1024") + @PreAuthorize("@ss.hasPermission('company:staff:query')") + public CommonResult getCompany(@RequestParam("id") String id) { + CompanyStaff staff = staffService.getById(id); + CompanyStaffRespVO staffRespVO = BeanUtils.toBean(staff, CompanyStaffRespVO.class); + if(StringUtils.isNotEmpty(staffRespVO.getFileIds())){ + staffRespVO.setFileIdArray(Arrays.asList(staff.getFileIds().split(StrUtil.COMMA))); + } + return success(staffRespVO); + } + + /** + * @author 小李 + * @date 18:01 2024/8/6 + * @param pageReqVO 查询条件--暂时导出所有 + * @param response 响应体 + **/ + @GetMapping("/export-excel") + @Operation(summary = "导出企业管理-员工信息表 Excel") + @PreAuthorize("@ss.hasPermission('company:staff:export')") + @ApiAccessLog(operateType = EXPORT) + public void exportCompanyExcel(CompanyStaffReqVO pageReqVO, + HttpServletResponse response) throws IOException { + List list = staffService.list(); + // 导出 Excel + Map columnWidthMap = new HashMap<>(); + // 第一列的索引是0,宽度设置为20个字符宽 + columnWidthMap.put(9, 20); + columnWidthMap.put(10, 20); + ExcelUtils.write(response, "企业信息表.xls", "数据", CompanyStaff.class, list,columnWidthMap); + } +} diff --git a/dl-module-company/src/main/java/cn/iocoder/yudao/module/company/entity/CompanyStaff.java b/dl-module-company/src/main/java/cn/iocoder/yudao/module/company/entity/CompanyStaff.java new file mode 100644 index 00000000..af0d559f --- /dev/null +++ b/dl-module-company/src/main/java/cn/iocoder/yudao/module/company/entity/CompanyStaff.java @@ -0,0 +1,89 @@ +package cn.iocoder.yudao.module.company.entity; + + +import cn.iocoder.yudao.framework.tenant.core.db.TenantBaseDO; +import com.alibaba.excel.annotation.ExcelIgnoreUnannotated; +import com.alibaba.excel.annotation.ExcelProperty; +import com.baomidou.mybatisplus.annotation.IdType; +import com.baomidou.mybatisplus.annotation.TableId; +import com.baomidou.mybatisplus.annotation.TableName; +import lombok.Data; +import lombok.EqualsAndHashCode; + +import java.math.BigDecimal; +import java.time.LocalDate; + +/** + * 企业管理-员工信息实体 + * @author 小李 + * @date 16:25 2024/8/6 +**/ +@TableName("company_staff") +@Data +@EqualsAndHashCode(callSuper = true) +@ExcelIgnoreUnannotated +public class CompanyStaff extends TenantBaseDO { + /** 主键标识 */ + @TableId(type = IdType.INPUT) + private String id; + + /** 企业id(base_company表中的id) */ + private String corpId; + + /** 用户id(system_users表的id) */ + private Long userId; + + /** 部门id(system_dept表中的id) */ + private Long deptId; + + /** 工号 */ + @ExcelProperty("工号") + private String workNo; + + /** 姓名 */ + @ExcelProperty("姓名") + private String name; + + /** 手机号 */ + @ExcelProperty("手机号") + private String tel; + + /** 性别 */ + @ExcelProperty("性别") + private String sex; + + /** 家庭住址 */ + @ExcelProperty("家庭住址") + private String address; + + /** 工作日期 */ + @ExcelProperty("工作日期") + private LocalDate workDate; + + /** 工龄 */ + @ExcelProperty("工龄") + private BigDecimal workYear; + + /** 入职日期 */ + @ExcelProperty("入职日期") + private LocalDate joinedDate; + + /** 司龄 */ + @ExcelProperty("司龄") + private BigDecimal joinedYear; + + /** 学历 */ + @ExcelProperty("学历") + private String education; + + /** 个人简介 */ + @ExcelProperty("个人简介") + private String content; + + /** 唯一推广码(须保证全平台唯一,规则:字母+数字;字母全大写) */ + @ExcelProperty("唯一推广码") + private String uniqueCode; + + /** 附件ids(infra_file表中的id,多个英文逗号拼接) */ + private String fileIds; +} diff --git a/dl-module-company/src/main/java/cn/iocoder/yudao/module/company/mapper/CompanyStaffMapper.java b/dl-module-company/src/main/java/cn/iocoder/yudao/module/company/mapper/CompanyStaffMapper.java new file mode 100644 index 00000000..9470f15d --- /dev/null +++ b/dl-module-company/src/main/java/cn/iocoder/yudao/module/company/mapper/CompanyStaffMapper.java @@ -0,0 +1,24 @@ +package cn.iocoder.yudao.module.company.mapper; + +import cn.iocoder.yudao.module.company.entity.CompanyStaff; +import cn.iocoder.yudao.module.company.vo.CompanyStaffReqVO; +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; + +import java.util.List; + +/** + * 企业管理-员工信息表 + * @author 小李 + * @date 16:26 2024/8/6 + **/ +@Mapper +public interface CompanyStaffMapper extends BaseMapper { + + IPage selectStaffListPage(); + + List selectList(); +} diff --git a/dl-module-company/src/main/java/cn/iocoder/yudao/module/company/service/CompanyStaffService.java b/dl-module-company/src/main/java/cn/iocoder/yudao/module/company/service/CompanyStaffService.java new file mode 100644 index 00000000..330c99a0 --- /dev/null +++ b/dl-module-company/src/main/java/cn/iocoder/yudao/module/company/service/CompanyStaffService.java @@ -0,0 +1,50 @@ +package cn.iocoder.yudao.module.company.service; + +import cn.iocoder.yudao.module.company.entity.CompanyStaff; +import cn.iocoder.yudao.module.company.vo.CompanyStaffReqVO; +import cn.iocoder.yudao.module.company.vo.CompanyStaffRespVO; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import com.baomidou.mybatisplus.extension.service.IService; + +import javax.validation.Valid; + +/** + * 企业管理-员工信息表 服务 + * @author 小李 + * @date 16:29 2024/8/6 +**/ +public interface CompanyStaffService extends IService { + + /** + * 获得企业管理-员工信息表分页 + * @author 小李 + * @date 17:11 2024/8/6 + * @param pageReqVO 分页查询 + **/ + IPage queryListPage(CompanyStaffReqVO pageReqVO, Page page); + + /** + * 新增员工 + * @author 小李 + * @date 16:29 2024/8/6 + * @param staffRespVO 员工对象 + **/ + void saveStaff(@Valid CompanyStaffRespVO staffRespVO); + + /** + * 修改员工信息 + * @author 小李 + * @date 16:31 2024/8/6 + * @param staffRespVO 员工对象 + **/ + void updateStaff(@Valid CompanyStaffRespVO staffRespVO); + + /** + * 删除员工信息 + * @author 小李 + * @date 16:32 2024/8/6 + * @param id 员工ID + **/ + void deleteStaff(String id); +} diff --git a/dl-module-company/src/main/java/cn/iocoder/yudao/module/company/service/impl/CompanyStaffServiceImpl.java b/dl-module-company/src/main/java/cn/iocoder/yudao/module/company/service/impl/CompanyStaffServiceImpl.java new file mode 100644 index 00000000..fa59087e --- /dev/null +++ b/dl-module-company/src/main/java/cn/iocoder/yudao/module/company/service/impl/CompanyStaffServiceImpl.java @@ -0,0 +1,53 @@ +package cn.iocoder.yudao.module.company.service.impl; + +import cn.iocoder.yudao.module.company.entity.CompanyStaff; +import cn.iocoder.yudao.module.company.mapper.CompanyStaffMapper; +import cn.iocoder.yudao.module.company.service.CompanyStaffService; +import cn.iocoder.yudao.module.company.vo.CompanyStaffReqVO; +import cn.iocoder.yudao.module.company.vo.CompanyStaffRespVO; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import org.springframework.stereotype.Service; + +import javax.annotation.Resource; + +/** + * 企业管理-员工信息表 服务实现类 + * @author 小李 + * @date 16:29 2024/8/6 + **/ +@Service +public class CompanyStaffServiceImpl extends ServiceImpl implements CompanyStaffService { + + @Resource + private CompanyStaffMapper staffMapper; + + /** + * 获得企业管理-员工信息表分页 + * @author 小李 + * @date 17:11 2024/8/6 + * @param pageReqVO 分页查询 + * @param page 分页对象 + **/ + @Override + public IPage queryListPage(CompanyStaffReqVO pageReqVO, Page page) { + staffMapper.selectList(); + return staffMapper.selectStaffListPage(); + } + + @Override + public void saveStaff(CompanyStaffRespVO staffRespVO) { + + } + + @Override + public void updateStaff(CompanyStaffRespVO staffRespVO) { + + } + + @Override + public void deleteStaff(String id) { + + } +} diff --git a/dl-module-company/src/main/java/cn/iocoder/yudao/module/company/vo/CompanyStaffReqVO.java b/dl-module-company/src/main/java/cn/iocoder/yudao/module/company/vo/CompanyStaffReqVO.java new file mode 100644 index 00000000..a93c7312 --- /dev/null +++ b/dl-module-company/src/main/java/cn/iocoder/yudao/module/company/vo/CompanyStaffReqVO.java @@ -0,0 +1,13 @@ +package cn.iocoder.yudao.module.company.vo; + +import cn.iocoder.yudao.module.company.entity.CompanyStaff; +import lombok.Data; + +/** + * 员工查询VO + * @author 小李 + * @date 16:49 2024/8/6 +**/ +@Data +public class CompanyStaffReqVO extends CompanyStaff { +} diff --git a/dl-module-company/src/main/java/cn/iocoder/yudao/module/company/vo/CompanyStaffRespVO.java b/dl-module-company/src/main/java/cn/iocoder/yudao/module/company/vo/CompanyStaffRespVO.java new file mode 100644 index 00000000..6a7a45cc --- /dev/null +++ b/dl-module-company/src/main/java/cn/iocoder/yudao/module/company/vo/CompanyStaffRespVO.java @@ -0,0 +1,20 @@ +package cn.iocoder.yudao.module.company.vo; + +import cn.iocoder.yudao.module.company.entity.CompanyStaff; +import lombok.Data; + +import java.util.List; + +/** + * 员工响应或提交VO + * @author 小李 + * @date 16:50 2024/8/6 +**/ +@Data +public class CompanyStaffRespVO extends CompanyStaff { + + /** + * 员工附件IDS + */ + List fileIdArray; +} diff --git a/dl-module-company/src/main/resources/mapper/company/CompanyStaffMapper.xml b/dl-module-company/src/main/resources/mapper/company/CompanyStaffMapper.xml new file mode 100644 index 00000000..4f1b3679 --- /dev/null +++ b/dl-module-company/src/main/resources/mapper/company/CompanyStaffMapper.xml @@ -0,0 +1,53 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + select + id,corp_id,user_id, + dept_id,work_no,name, + tel,sex,address, + work_date,work_year,joined_date, + joined_year,education,content, + unique_code,file_ids,tenant_id, + deleted,creator,create_time, + updater,update_time + from company_staff + + + + + + \ No newline at end of file diff --git a/pom.xml b/pom.xml index 95fb32b5..186234fa 100644 --- a/pom.xml +++ b/pom.xml @@ -24,6 +24,7 @@ dl-module-base yudao-server + dl-module-company diff --git a/yudao-server/pom.xml b/yudao-server/pom.xml index beac859e..e2cf2bbc 100644 --- a/yudao-server/pom.xml +++ b/yudao-server/pom.xml @@ -37,6 +37,12 @@ dl-module-base ${revision} + + + cn.iocoder.boot + dl-module-company + ${revision} +