diff --git a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/enterprise/EnterpriseController.java b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/enterprise/EnterpriseController.java index 7812506..25d621b 100644 --- a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/enterprise/EnterpriseController.java +++ b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/enterprise/EnterpriseController.java @@ -1,11 +1,16 @@ package cn.iocoder.yudao.module.system.controller.admin.enterprise; +import cn.iocoder.yudao.framework.security.core.util.SecurityFrameworkUtils; import cn.iocoder.yudao.module.infra.api.file.FileApi; +import cn.iocoder.yudao.module.system.controller.admin.taglibrary.vo.TagLibraryPageReqVO; +import cn.iocoder.yudao.module.system.controller.admin.taglibrary.vo.TagLibraryRespVO; +import cn.iocoder.yudao.module.system.dal.dataobject.dept.DeptDO; import cn.iocoder.yudao.module.system.dal.dataobject.enterpriseauditlog.EnterpriseAuditLogDO; import cn.iocoder.yudao.module.system.dal.dataobject.enterprisetag.EnterpriseTagDO; import cn.iocoder.yudao.module.system.dal.dataobject.fileInfo.FileInfoDO; import cn.iocoder.yudao.module.system.dal.dataobject.qualification.EnterpriseQualificationDO; import cn.iocoder.yudao.module.system.dal.dataobject.taglibrary.TagLibraryDO; +import cn.iocoder.yudao.module.system.dal.dataobject.user.AdminUserDO; import cn.iocoder.yudao.module.system.dal.mysql.enterpriseauditlog.EnterpriseAuditLogMapper; import cn.iocoder.yudao.module.system.dal.mysql.enterprisetag.EnterpriseTagMapper; import cn.iocoder.yudao.module.system.dal.mysql.fileInfo.FileInfoMapper; @@ -14,6 +19,7 @@ import cn.iocoder.yudao.module.system.dal.mysql.taglibrary.TagLibraryMapper; import cn.iocoder.yudao.module.system.service.fileInfo.FileInfoService; import cn.iocoder.yudao.module.system.service.qualification.EnterpriseQualificationService; import cn.iocoder.yudao.module.system.service.taglibrary.TagLibraryService; +import cn.iocoder.yudao.module.system.service.user.AdminUserService; import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import lombok.extern.slf4j.Slf4j; @@ -68,6 +74,8 @@ public class EnterpriseController { private TagLibraryMapper tagLibraryMapper; @Resource private EnterpriseTagMapper enterpriseTagMapper; + @Resource + private AdminUserService adminUserService; @PostMapping("/create") @Operation(summary = "创建企业") @@ -122,6 +130,18 @@ public class EnterpriseController { return success(BeanUtils.toBean(enterprise, EnterpriseRespVO.class)); } + @GetMapping("/pcpage") + @Operation(summary = "电脑端获得企业标签分页") + @PreAuthorize("@ss.hasPermission('system:tag-library:query')") + public CommonResult> getTagLibraryPcPage(EnterprisePageReqVO pageReqVO) { + PageResult pageResult = enterpriseService.getEnterprisePage(pageReqVO); + pageResult.getList().forEach(item->{ + item.setInviterName(adminUserService.getUser(Long.valueOf(item.getUserId())).getNickname()); + }); + return success(BeanUtils.toBean(pageResult, EnterpriseRespVO.class)); + } + + @GetMapping("/page") @Operation(summary = "获得企业分页") @PreAuthorize("@ss.hasPermission('system:enterprise:query')") @@ -195,6 +215,9 @@ public class EnterpriseController { return success(BeanUtils.toBean(pageResult, EnterpriseRespVO.class)); } + + + @GetMapping("/export-excel") @Operation(summary = "导出企业 Excel") @PreAuthorize("@ss.hasPermission('system:enterprise:export')") diff --git a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/enterprise/vo/EnterprisePageReqVO.java b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/enterprise/vo/EnterprisePageReqVO.java index 2db7cb3..8d32687 100644 --- a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/enterprise/vo/EnterprisePageReqVO.java +++ b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/enterprise/vo/EnterprisePageReqVO.java @@ -67,4 +67,8 @@ public class EnterprisePageReqVO extends PageParam { @Schema(description = "管理部门", example = "26433") private Long deptId; + @Schema(description = "邀请人") + private String inviterName; + + } diff --git a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/enterprise/vo/EnterpriseRespVO.java b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/enterprise/vo/EnterpriseRespVO.java index 74329ba..34b0106 100644 --- a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/enterprise/vo/EnterpriseRespVO.java +++ b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/enterprise/vo/EnterpriseRespVO.java @@ -97,5 +97,11 @@ public class EnterpriseRespVO { @Schema(description = "企业标签", example = "26433") private List tagList; + @Schema(description = "邀请人") + @ExcelProperty("邀请人") + private String inviterName; + + + } diff --git a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/enterprise/vo/EnterpriseSaveReqVO.java b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/enterprise/vo/EnterpriseSaveReqVO.java index 5ea96a6..94374e7 100644 --- a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/enterprise/vo/EnterpriseSaveReqVO.java +++ b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/enterprise/vo/EnterpriseSaveReqVO.java @@ -4,6 +4,7 @@ import io.swagger.v3.oas.annotations.media.Schema; import lombok.*; import java.time.LocalDate; +import java.time.LocalDateTime; import java.util.*; import javax.validation.constraints.NotEmpty; @@ -28,7 +29,6 @@ public class EnterpriseSaveReqVO { private String region; @Schema(description = "企业名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "张三") - @NotEmpty(message = "企业名称不能为空") private String enterprisesName; @Schema(description = "企业地址") @@ -47,7 +47,7 @@ public class EnterpriseSaveReqVO { private String introduction; @Schema(description = "企业成立时间") - private LocalDate establishmentDate; + private LocalDateTime establishmentDate; @Schema(description = "企业经纬度") private String gpsLocation; diff --git a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/qualification/EnterpriseQualificationController.java b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/qualification/EnterpriseQualificationController.java index 675645f..318fb38 100644 --- a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/qualification/EnterpriseQualificationController.java +++ b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/qualification/EnterpriseQualificationController.java @@ -1,5 +1,7 @@ package cn.iocoder.yudao.module.system.controller.admin.qualification; +import cn.iocoder.yudao.module.system.dal.dataobject.enterprise.EnterpriseDO; +import cn.iocoder.yudao.module.system.service.enterprise.EnterpriseService; import org.springframework.web.bind.annotation.*; import org.springframework.validation.annotation.Validated; import org.springframework.security.access.prepost.PreAuthorize; @@ -37,6 +39,10 @@ public class EnterpriseQualificationController { @Resource private EnterpriseQualificationService enterpriseQualificationService; + @Resource + private EnterpriseService enterpriseService; + + @PostMapping("/create") @Operation(summary = "创建企业资质") // @PreAuthorize("@ss.hasPermission('system:enterprise-qualification:create')") @@ -75,6 +81,9 @@ public class EnterpriseQualificationController { // @PreAuthorize("@ss.hasPermission('system:enterprise-qualification:query')") public CommonResult> getEnterpriseQualificationPage(EnterpriseQualificationPageReqVO pageReqVO) { PageResult pageResult = enterpriseQualificationService.getEnterpriseQualificationPage(pageReqVO); + pageResult.getList().forEach(item->{ + item.setEnterpriseName(enterpriseService.getEnterprise(Long.valueOf(item.getEnterpriseId())).getEnterprisesName()); + }); return success(BeanUtils.toBean(pageResult, EnterpriseQualificationRespVO.class)); } diff --git a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/qualification/vo/EnterpriseQualificationPageReqVO.java b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/qualification/vo/EnterpriseQualificationPageReqVO.java index 791b051..b3c8962 100644 --- a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/qualification/vo/EnterpriseQualificationPageReqVO.java +++ b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/qualification/vo/EnterpriseQualificationPageReqVO.java @@ -22,6 +22,10 @@ public class EnterpriseQualificationPageReqVO extends PageParam { @Schema(description = "企业ID", example = "28564") private Long enterpriseId; + @Schema(description = "企业名称", example = "28564") + private String enterpriseName; + + @Schema(description = "资质名称,例如:排污许可证、环保合格证", example = "张三") private String qualificationName; diff --git a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/qualification/vo/EnterpriseQualificationRespVO.java b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/qualification/vo/EnterpriseQualificationRespVO.java index bb6fc60..1af2b1a 100644 --- a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/qualification/vo/EnterpriseQualificationRespVO.java +++ b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/qualification/vo/EnterpriseQualificationRespVO.java @@ -22,9 +22,14 @@ public class EnterpriseQualificationRespVO { @ExcelProperty("企业ID") private Long enterpriseId; + @Schema(description = "企业名称", example = "28564") + @ExcelProperty("企业名称") + private String enterpriseName; + + @Schema(description = "资质名称,例如:排污许可证、环保合格证", requiredMode = Schema.RequiredMode.REQUIRED, example = "张三") @ExcelProperty("资质名称,例如:排污许可证、环保合格证") - private Integer qualificationName; + private String qualificationName; @Schema(description = "资质到期日期") @ExcelProperty("资质到期日期") diff --git a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/qualification/vo/EnterpriseQualificationSaveReqVO.java b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/qualification/vo/EnterpriseQualificationSaveReqVO.java index 838f84b..726b4e8 100644 --- a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/qualification/vo/EnterpriseQualificationSaveReqVO.java +++ b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/qualification/vo/EnterpriseQualificationSaveReqVO.java @@ -5,6 +5,7 @@ import lombok.*; import javax.validation.constraints.NotNull; import java.time.LocalDate; +import java.time.LocalDateTime; import java.util.*; @Schema(description = "管理后台 - 企业资质新增/修改 Request VO") @@ -15,14 +16,13 @@ public class EnterpriseQualificationSaveReqVO { private Long id; @Schema(description = "企业ID", example = "28564", requiredMode = Schema.RequiredMode.REQUIRED) - @NotNull private Long enterpriseId; @Schema(description = "资质名称,例如:排污许可证、环保合格证", requiredMode = Schema.RequiredMode.REQUIRED, example = "张三") - private Integer qualificationName; + private String qualificationName; @Schema(description = "资质到期日期") - private LocalDate expiryDate; + private LocalDateTime expiryDate; @Schema(description = "资质描述,详细说明资质信息", example = "随便") private String qualificationDescription; @@ -34,7 +34,7 @@ public class EnterpriseQualificationSaveReqVO { private String creator; @Schema(description = "办理日期") - private LocalDate handleDate; + private LocalDateTime handleDate; @Schema(description = "资质编号") private String enterpriseAuth; diff --git a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/taskinfo/TaskInfoController.java b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/taskinfo/TaskInfoController.java index 39b87f8..31984b7 100644 --- a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/taskinfo/TaskInfoController.java +++ b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/taskinfo/TaskInfoController.java @@ -1,6 +1,10 @@ package cn.iocoder.yudao.module.system.controller.admin.taskinfo; +import cn.iocoder.yudao.framework.security.core.util.SecurityFrameworkUtils; import cn.iocoder.yudao.module.infra.api.job.JobApi; +import cn.iocoder.yudao.module.system.dal.dataobject.dept.DeptDO; +import cn.iocoder.yudao.module.system.dal.dataobject.user.AdminUserDO; +import cn.iocoder.yudao.module.system.service.dept.DeptService; import cn.iocoder.yudao.module.system.service.user.AdminUserService; import org.springframework.web.bind.annotation.*; import org.springframework.validation.annotation.Validated; @@ -41,6 +45,9 @@ public class TaskInfoController { private TaskInfoService taskInfoService; @Resource private AdminUserService adminUserService; + @Resource + private DeptService deptService; + @PostMapping("/create") @@ -81,7 +88,10 @@ public class TaskInfoController { @PreAuthorize("@ss.hasPermission('system:task-info:query')") public CommonResult> getTaskInfoPage(@Valid TaskInfoPageReqVO pageReqVO) { PageResult pageResult = taskInfoService.getTaskInfoPage(pageReqVO); + AdminUserDO user = adminUserService.getUser(SecurityFrameworkUtils.getLoginUserId()); + DeptDO dep= deptService.getDept( user.getDeptId()); pageResult.getList().forEach(item->{ + item.setPublishDep(dep.getName()); item.setCreateName(adminUserService.getUser(Long.valueOf(item.getCreator())).getRealName()); }); return success(BeanUtils.toBean(pageResult, TaskInfoRespVO.class)); diff --git a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/taskinfo/vo/TaskInfoPageReqVO.java b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/taskinfo/vo/TaskInfoPageReqVO.java index 47662dd..9f08545 100644 --- a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/taskinfo/vo/TaskInfoPageReqVO.java +++ b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/taskinfo/vo/TaskInfoPageReqVO.java @@ -20,7 +20,11 @@ public class TaskInfoPageReqVO extends PageParam { @Schema(description = "任务标题") private String title; - @Schema(description = "任务描述", example = "你猜") + @Schema(description = "任务编号", example = "") + private String taskNumber; + + + @Schema(description = "任务描述", example = "") private String description; @Schema(description = "执行周期") diff --git a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/taskinfo/vo/TaskInfoRespVO.java b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/taskinfo/vo/TaskInfoRespVO.java index 0b9ec8b..8201a65 100644 --- a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/taskinfo/vo/TaskInfoRespVO.java +++ b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/taskinfo/vo/TaskInfoRespVO.java @@ -1,5 +1,6 @@ package cn.iocoder.yudao.module.system.controller.admin.taskinfo.vo; +import com.baomidou.mybatisplus.annotation.TableField; import io.swagger.v3.oas.annotations.media.Schema; import lombok.*; @@ -20,6 +21,12 @@ public class TaskInfoRespVO { @ExcelProperty("任务ID,主键") private Long id; + + //任务编号 + @Schema(description = "任务编号", example = "你猜") + @ExcelProperty("任务编号") + private String taskNumber; + @Schema(description = "任务标题", requiredMode = Schema.RequiredMode.REQUIRED) @ExcelProperty("任务标题") private String title; @@ -82,4 +89,12 @@ public class TaskInfoRespVO { @ExcelProperty("创建人名字") private String createName; + + @Schema(description = "发布部门") + @ExcelProperty("发布部门") + private String publishDep; + + + + } diff --git a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/dal/dataobject/enterprise/EnterpriseDO.java b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/dal/dataobject/enterprise/EnterpriseDO.java index 2ca89dd..45863f9 100644 --- a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/dal/dataobject/enterprise/EnterpriseDO.java +++ b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/dal/dataobject/enterprise/EnterpriseDO.java @@ -97,4 +97,8 @@ public class EnterpriseDO extends BaseDO { @TableField(exist = false) private List tagList; + //邀请人姓名 + @TableField(exist = false) + private String inviterName; + } diff --git a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/dal/dataobject/qualification/EnterpriseQualificationDO.java b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/dal/dataobject/qualification/EnterpriseQualificationDO.java index 66289a1..7a6fb1c 100644 --- a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/dal/dataobject/qualification/EnterpriseQualificationDO.java +++ b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/dal/dataobject/qualification/EnterpriseQualificationDO.java @@ -31,10 +31,12 @@ public class EnterpriseQualificationDO extends BaseDO { * 企业ID */ private Long enterpriseId; + + /** * 资质名称,例如:排污许可证、环保合格证 */ - private Integer qualificationName; + private String qualificationName; /** * 资质到期日期 */ @@ -53,5 +55,8 @@ public class EnterpriseQualificationDO extends BaseDO { */ private String enterpriseAuth; + //企业名称 + @TableField(exist = false) + private String enterpriseName; } diff --git a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/dal/dataobject/taskinfo/TaskInfoDO.java b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/dal/dataobject/taskinfo/TaskInfoDO.java index 66b619d..44d828e 100644 --- a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/dal/dataobject/taskinfo/TaskInfoDO.java +++ b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/dal/dataobject/taskinfo/TaskInfoDO.java @@ -29,6 +29,10 @@ public class TaskInfoDO extends BaseDO { */ @TableId private Long id; + + //任务编号 + @TableField(exist = false) + private String taskNumber; /** * 任务标题 */ @@ -85,4 +89,15 @@ public class TaskInfoDO extends BaseDO { @TableField(exist = false) private String createName; + + //发布部门 + @TableField(exist = false) + private String publishDep; + + + + + + + } diff --git a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/dal/mysql/enterprise/EnterpriseMapper.java b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/dal/mysql/enterprise/EnterpriseMapper.java index 149390e..c1a1d49 100644 --- a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/dal/mysql/enterprise/EnterpriseMapper.java +++ b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/dal/mysql/enterprise/EnterpriseMapper.java @@ -38,4 +38,8 @@ public interface EnterpriseMapper extends BaseMapperX { .orderByDesc(EnterpriseDO::getId)); } + default List selectListByStatus() { + return selectList(); + } + }