Browse Source

任务、企业、资质列表返显

master
zy 2 months ago
parent
commit
0ae2d562a0
  1. 23
      yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/enterprise/EnterpriseController.java
  2. 4
      yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/enterprise/vo/EnterprisePageReqVO.java
  3. 6
      yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/enterprise/vo/EnterpriseRespVO.java
  4. 4
      yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/enterprise/vo/EnterpriseSaveReqVO.java
  5. 9
      yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/qualification/EnterpriseQualificationController.java
  6. 4
      yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/qualification/vo/EnterpriseQualificationPageReqVO.java
  7. 7
      yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/qualification/vo/EnterpriseQualificationRespVO.java
  8. 8
      yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/qualification/vo/EnterpriseQualificationSaveReqVO.java
  9. 10
      yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/taskinfo/TaskInfoController.java
  10. 6
      yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/taskinfo/vo/TaskInfoPageReqVO.java
  11. 15
      yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/taskinfo/vo/TaskInfoRespVO.java
  12. 4
      yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/dal/dataobject/enterprise/EnterpriseDO.java
  13. 7
      yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/dal/dataobject/qualification/EnterpriseQualificationDO.java
  14. 15
      yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/dal/dataobject/taskinfo/TaskInfoDO.java
  15. 4
      yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/dal/mysql/enterprise/EnterpriseMapper.java

23
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<PageResult<EnterpriseRespVO>> getTagLibraryPcPage(EnterprisePageReqVO pageReqVO) {
PageResult<EnterpriseDO> 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')")

4
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;
}

6
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<String> tagList;
@Schema(description = "邀请人")
@ExcelProperty("邀请人")
private String inviterName;
}

4
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;

9
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<PageResult<EnterpriseQualificationRespVO>> getEnterpriseQualificationPage(EnterpriseQualificationPageReqVO pageReqVO) {
PageResult<EnterpriseQualificationDO> pageResult = enterpriseQualificationService.getEnterpriseQualificationPage(pageReqVO);
pageResult.getList().forEach(item->{
item.setEnterpriseName(enterpriseService.getEnterprise(Long.valueOf(item.getEnterpriseId())).getEnterprisesName());
});
return success(BeanUtils.toBean(pageResult, EnterpriseQualificationRespVO.class));
}

4
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;

7
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("资质到期日期")

8
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;

10
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<PageResult<TaskInfoRespVO>> getTaskInfoPage(@Valid TaskInfoPageReqVO pageReqVO) {
PageResult<TaskInfoDO> 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));

6
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 = "执行周期")

15
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;
}

4
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<String> tagList;
//邀请人姓名
@TableField(exist = false)
private String inviterName;
}

7
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;
}

15
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;
}

4
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<EnterpriseDO> {
.orderByDesc(EnterpriseDO::getId));
}
default List<EnterpriseDO> selectListByStatus() {
return selectList();
}
}

Loading…
Cancel
Save