feat: 负责人等调整
This commit is contained in:
@@ -17,7 +17,9 @@ import org.agt.module.license.controller.admin.project.vo.ProjectListReqVO;
|
||||
import org.agt.module.license.controller.admin.project.vo.ProjectPageReqVO;
|
||||
import org.agt.module.license.controller.admin.project.vo.ProjectRespVO;
|
||||
import org.agt.module.license.controller.admin.project.vo.ProjectSaveReqVO;
|
||||
import org.agt.module.license.dal.dataobject.license.LicenseDO;
|
||||
import org.agt.module.license.dal.dataobject.project.ProjectDO;
|
||||
import org.agt.module.license.dal.mysql.license.LicenseMapper;
|
||||
import org.agt.module.license.service.project.ProjectService;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
@@ -45,6 +47,9 @@ public class ProjectController {
|
||||
@Resource
|
||||
private ProjectService projectService;
|
||||
|
||||
@Resource
|
||||
private LicenseMapper licenseMapper;
|
||||
|
||||
@PostMapping("/create")
|
||||
@Operation(summary = "创建项目")
|
||||
@PreAuthorize("@ss.hasPermission('license:project:create')")
|
||||
@@ -82,7 +87,15 @@ public class ProjectController {
|
||||
@Operation(summary = "获得项目分页")
|
||||
@PreAuthorize("@ss.hasPermission('license:project:query')")
|
||||
public CommonResult<PageResult<ProjectRespVO>> getProjectPage(@Valid ProjectPageReqVO pageReqVO) {
|
||||
PageResult<ProjectDO> pageResult = projectService.getProjectPage(pageReqVO);
|
||||
PageResult<ProjectDO> doPageResult = projectService.getProjectPage(pageReqVO);
|
||||
PageResult<ProjectRespVO> pageResult = BeanUtils.toBean(doPageResult, ProjectRespVO.class);
|
||||
List<ProjectRespVO> projects = pageResult.getList();
|
||||
for (ProjectRespVO project : projects) {
|
||||
LicenseDO licenseDO = licenseMapper.selectOne(LicenseDO::getProjectId, project.getId());
|
||||
if (licenseDO != null) {
|
||||
project.setSn(licenseDO.getSn());
|
||||
}
|
||||
}
|
||||
return success(BeanUtils.toBean(pageResult, ProjectRespVO.class));
|
||||
}
|
||||
|
||||
|
||||
@@ -33,19 +33,19 @@ public class ProjectListReqVO extends PageParam {
|
||||
private Integer businessStatus;
|
||||
|
||||
@Schema(description = "业务负责人")
|
||||
private Long businessOwner;
|
||||
private String businessOwner;
|
||||
|
||||
@Schema(description = "客户对接人")
|
||||
private Long customerOwner;
|
||||
private String customerOwner;
|
||||
|
||||
@Schema(description = "技术负责人1")
|
||||
private Long technicalOwnerA;
|
||||
private String technicalOwnerA;
|
||||
|
||||
@Schema(description = "技术负责人2")
|
||||
private Long technicalOwnerB;
|
||||
private String technicalOwnerB;
|
||||
|
||||
@Schema(description = "技术负责人3")
|
||||
private Long technicalOwnerC;
|
||||
private String technicalOwnerC;
|
||||
|
||||
@Schema(description = "项目开始时间")
|
||||
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
|
||||
|
||||
@@ -1,10 +1,12 @@
|
||||
package org.agt.module.license.controller.admin.project.vo;
|
||||
|
||||
import lombok.*;
|
||||
import java.util.*;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.ToString;
|
||||
import org.agt.framework.common.pojo.PageParam;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
import static org.agt.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND;
|
||||
@@ -28,19 +30,19 @@ public class ProjectPageReqVO extends PageParam {
|
||||
private Integer businessStatus;
|
||||
|
||||
@Schema(description = "业务负责人")
|
||||
private Long businessOwner;
|
||||
private String businessOwner;
|
||||
|
||||
@Schema(description = "客户对接人")
|
||||
private Long customerOwner;
|
||||
private String customerOwner;
|
||||
|
||||
@Schema(description = "技术负责人1")
|
||||
private Long technicalOwnerA;
|
||||
private String technicalOwnerA;
|
||||
|
||||
@Schema(description = "技术负责人2")
|
||||
private Long technicalOwnerB;
|
||||
private String technicalOwnerB;
|
||||
|
||||
@Schema(description = "技术负责人3")
|
||||
private Long technicalOwnerC;
|
||||
private String technicalOwnerC;
|
||||
|
||||
@Schema(description = "项目开始时间")
|
||||
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
|
||||
|
||||
@@ -10,7 +10,6 @@ import lombok.Data;
|
||||
import org.agt.framework.excel.core.annotations.DictFormat;
|
||||
import org.agt.framework.excel.core.convert.DictConvert;
|
||||
import org.agt.module.license.dal.dataobject.customer.CustomerDO;
|
||||
import org.agt.module.system.api.user.AdminUserApi;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
@@ -49,45 +48,24 @@ public class ProjectRespVO implements VO {
|
||||
private Integer businessStatus;
|
||||
|
||||
@Schema(description = "业务负责人ID", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@Trans(type = TransType.AUTO_TRANS, key = AdminUserApi.PREFIX, fields = "nickname", ref = "businessOwnerName")
|
||||
private Long businessOwner;
|
||||
@ExcelProperty("业务负责人")
|
||||
private String businessOwner;
|
||||
|
||||
@Schema(description = "客户对接人ID", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@Trans(type = TransType.AUTO_TRANS, key = AdminUserApi.PREFIX, fields = "nickname", ref = "customerOwnerName")
|
||||
private Long customerOwner;
|
||||
@ExcelProperty("客户对接人")
|
||||
private String customerOwner;
|
||||
|
||||
@Schema(description = "技术负责人1ID", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@Trans(type = TransType.AUTO_TRANS, key = AdminUserApi.PREFIX, fields = "nickname", ref = "technicalOwnerAName")
|
||||
private Long technicalOwnerA;
|
||||
@ExcelProperty("技术负责人1")
|
||||
private String technicalOwnerA;
|
||||
|
||||
@Schema(description = "技术负责人2ID")
|
||||
@Trans(type = TransType.AUTO_TRANS, key = AdminUserApi.PREFIX, fields = "nickname", ref = "technicalOwnerBName")
|
||||
private Long technicalOwnerB;
|
||||
@ExcelProperty("技术负责人2")
|
||||
private String technicalOwnerB;
|
||||
|
||||
@Schema(description = "技术负责人3ID")
|
||||
@Trans(type = TransType.AUTO_TRANS, key = AdminUserApi.PREFIX, fields = "nickname", ref = "technicalOwnerCName")
|
||||
private Long technicalOwnerC;
|
||||
|
||||
|
||||
@Schema(description = "业务负责人", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@ExcelProperty("业务负责人")
|
||||
private String businessOwnerName;
|
||||
|
||||
@Schema(description = "客户对接人", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@ExcelProperty("客户对接人")
|
||||
private String customerOwnerName;
|
||||
|
||||
@Schema(description = "技术负责人1", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@ExcelProperty("技术负责人1")
|
||||
private String technicalOwnerAName;
|
||||
|
||||
@Schema(description = "技术负责人2")
|
||||
@ExcelProperty("技术负责人2")
|
||||
private String technicalOwnerBName;
|
||||
|
||||
@Schema(description = "技术负责人3")
|
||||
@ExcelProperty("技术负责人3")
|
||||
private String technicalOwnerCName;
|
||||
private String technicalOwnerC;
|
||||
|
||||
@Schema(description = "项目开始时间")
|
||||
@ExcelProperty("项目开始时间")
|
||||
@@ -114,4 +92,7 @@ public class ProjectRespVO implements VO {
|
||||
@ExcelProperty("创建时间")
|
||||
private LocalDateTime createTime;
|
||||
|
||||
@Schema(description = "SN", example = "随便")
|
||||
@ExcelProperty("SN")
|
||||
private String sn;
|
||||
}
|
||||
@@ -1,10 +1,10 @@
|
||||
package org.agt.module.license.controller.admin.project.vo;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.*;
|
||||
import java.util.*;
|
||||
import jakarta.validation.constraints.*;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
import jakarta.validation.constraints.NotEmpty;
|
||||
import jakarta.validation.constraints.NotNull;
|
||||
import lombok.Data;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
@Schema(description = "管理后台 - 项目新增/修改 Request VO")
|
||||
@@ -35,21 +35,21 @@ public class ProjectSaveReqVO {
|
||||
|
||||
@Schema(description = "业务负责人", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@NotNull(message = "业务负责人不能为空")
|
||||
private Long businessOwner;
|
||||
private String businessOwner;
|
||||
|
||||
@Schema(description = "客户对接人", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@NotNull(message = "客户对接人不能为空")
|
||||
private Long customerOwner;
|
||||
private String customerOwner;
|
||||
|
||||
@Schema(description = "技术负责人1", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@NotNull(message = "技术负责人1不能为空")
|
||||
private Long technicalOwnerA;
|
||||
private String technicalOwnerA;
|
||||
|
||||
@Schema(description = "技术负责人2")
|
||||
private Long technicalOwnerB;
|
||||
private String technicalOwnerB;
|
||||
|
||||
@Schema(description = "技术负责人3")
|
||||
private Long technicalOwnerC;
|
||||
private String technicalOwnerC;
|
||||
|
||||
@Schema(description = "项目开始时间")
|
||||
private LocalDateTime startTime;
|
||||
|
||||
@@ -1,14 +1,18 @@
|
||||
package org.agt.module.license.dal.dataobject.project;
|
||||
|
||||
import lombok.*;
|
||||
import java.util.*;
|
||||
import java.time.LocalDateTime;
|
||||
import java.time.LocalDateTime;
|
||||
import java.time.LocalDateTime;
|
||||
import java.time.LocalDateTime;
|
||||
import com.baomidou.mybatisplus.annotation.*;
|
||||
import com.baomidou.mybatisplus.annotation.KeySequence;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.ToString;
|
||||
import org.agt.framework.mybatis.core.dataobject.BaseDO;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
/**
|
||||
* 项目 DO
|
||||
*
|
||||
@@ -54,23 +58,23 @@ public class ProjectDO extends BaseDO {
|
||||
/**
|
||||
* 业务负责人
|
||||
*/
|
||||
private Long businessOwner;
|
||||
private String businessOwner;
|
||||
/**
|
||||
* 客户对接人
|
||||
*/
|
||||
private Long customerOwner;
|
||||
private String customerOwner;
|
||||
/**
|
||||
* 技术负责人1
|
||||
*/
|
||||
private Long technicalOwnerA;
|
||||
private String technicalOwnerA;
|
||||
/**
|
||||
* 技术负责人2
|
||||
*/
|
||||
private Long technicalOwnerB;
|
||||
private String technicalOwnerB;
|
||||
/**
|
||||
* 技术负责人3
|
||||
*/
|
||||
private Long technicalOwnerC;
|
||||
private String technicalOwnerC;
|
||||
/**
|
||||
* 项目开始时间
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user