mirror of
https://gitee.com/hhyykk/ipms-sjy.git
synced 2025-07-25 00:15:06 +08:00
[feat] 新增项目跟踪模块
This commit is contained in:
@ -1,4 +1,4 @@
|
||||
package cn.iocoder.yudao.module.pms.api.project;
|
||||
package cn.iocoder.yudao.module.pms.api.budget;
|
||||
|
||||
import cn.iocoder.yudao.framework.common.util.object.BeanUtils;
|
||||
import cn.iocoder.yudao.module.pms.api.budegt.BudgetApi;
|
@ -20,13 +20,9 @@ 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 static cn.iocoder.yudao.framework.security.core.util.SecurityFrameworkUtils.getLoginUserId;
|
||||
|
||||
|
@ -0,0 +1,95 @@
|
||||
package cn.iocoder.yudao.module.pms.controller.admin.projecttracking;
|
||||
|
||||
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.pms.controller.admin.projecttracking.vo.*;
|
||||
import cn.iocoder.yudao.module.pms.dal.dataobject.projecttracking.ProjectTrackingDO;
|
||||
import cn.iocoder.yudao.module.pms.service.projecttracking.ProjectTrackingService;
|
||||
|
||||
@Tag(name = "管理后台 - 项目跟踪信息")
|
||||
@RestController
|
||||
@RequestMapping("/pms/project-tracking")
|
||||
@Validated
|
||||
public class ProjectTrackingController {
|
||||
|
||||
@Resource
|
||||
private ProjectTrackingService projectTrackingService;
|
||||
|
||||
@PostMapping("/create")
|
||||
@Operation(summary = "创建项目跟踪信息")
|
||||
@PreAuthorize("@ss.hasPermission('pms:project-tracking:create')")
|
||||
public CommonResult<Long> createProjectTracking(@Valid @RequestBody ProjectTrackingSaveReqVO createReqVO) {
|
||||
return success(projectTrackingService.createProjectTracking(createReqVO));
|
||||
}
|
||||
|
||||
@PutMapping("/update")
|
||||
@Operation(summary = "更新项目跟踪信息")
|
||||
@PreAuthorize("@ss.hasPermission('pms:project-tracking:update')")
|
||||
public CommonResult<Boolean> updateProjectTracking(@Valid @RequestBody ProjectTrackingSaveReqVO updateReqVO) {
|
||||
projectTrackingService.updateProjectTracking(updateReqVO);
|
||||
return success(true);
|
||||
}
|
||||
|
||||
@DeleteMapping("/delete")
|
||||
@Operation(summary = "删除项目跟踪信息")
|
||||
@Parameter(name = "id", description = "编号", required = true)
|
||||
@PreAuthorize("@ss.hasPermission('pms:project-tracking:delete')")
|
||||
public CommonResult<Boolean> deleteProjectTracking(@RequestParam("id") Long id) {
|
||||
projectTrackingService.deleteProjectTracking(id);
|
||||
return success(true);
|
||||
}
|
||||
|
||||
@GetMapping("/get")
|
||||
@Operation(summary = "获得项目跟踪信息")
|
||||
@Parameter(name = "id", description = "编号", required = true, example = "1024")
|
||||
@PreAuthorize("@ss.hasPermission('pms:project-tracking:query')")
|
||||
public CommonResult<ProjectTrackingRespVO> getProjectTracking(@RequestParam("id") Long id) {
|
||||
ProjectTrackingDO projectTracking = projectTrackingService.getProjectTracking(id);
|
||||
return success(BeanUtils.toBean(projectTracking, ProjectTrackingRespVO.class));
|
||||
}
|
||||
|
||||
@GetMapping("/page")
|
||||
@Operation(summary = "获得项目跟踪信息分页")
|
||||
@PreAuthorize("@ss.hasPermission('pms:project-tracking:query')")
|
||||
public CommonResult<PageResult<ProjectTrackingRespVO>> getProjectTrackingPage(@Valid ProjectTrackingPageReqVO pageReqVO) {
|
||||
PageResult<ProjectTrackingDO> pageResult = projectTrackingService.getProjectTrackingPage(pageReqVO);
|
||||
return success(BeanUtils.toBean(pageResult, ProjectTrackingRespVO.class));
|
||||
}
|
||||
|
||||
@GetMapping("/export-excel")
|
||||
@Operation(summary = "导出项目跟踪信息 Excel")
|
||||
@PreAuthorize("@ss.hasPermission('pms:project-tracking:export')")
|
||||
@ApiAccessLog(operateType = EXPORT)
|
||||
public void exportProjectTrackingExcel(@Valid ProjectTrackingPageReqVO pageReqVO,
|
||||
HttpServletResponse response) throws IOException {
|
||||
pageReqVO.setPageSize(PageParam.PAGE_SIZE_NONE);
|
||||
List<ProjectTrackingDO> list = projectTrackingService.getProjectTrackingPage(pageReqVO).getList();
|
||||
// 导出 Excel
|
||||
ExcelUtils.write(response, "项目跟踪信息.xls", "数据", ProjectTrackingRespVO.class,
|
||||
BeanUtils.toBean(list, ProjectTrackingRespVO.class));
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,166 @@
|
||||
package cn.iocoder.yudao.module.pms.controller.admin.projecttracking.vo;
|
||||
|
||||
import lombok.*;
|
||||
import java.util.*;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageParam;
|
||||
import java.math.BigDecimal;
|
||||
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 ProjectTrackingPageReqVO extends PageParam {
|
||||
|
||||
@Schema(description = "跟踪项目名称", example = "张三")
|
||||
private String name;
|
||||
|
||||
@Schema(description = "项目类型", example = "2")
|
||||
private String type;
|
||||
|
||||
@Schema(description = "跟踪编号")
|
||||
private String trackingCode;
|
||||
|
||||
@Schema(description = "省份")
|
||||
private String province;
|
||||
|
||||
@Schema(description = "城市")
|
||||
private String city;
|
||||
|
||||
@Schema(description = "项目概况")
|
||||
private String projectOverview;
|
||||
|
||||
@Schema(description = "项目总金额")
|
||||
private BigDecimal projectAmount;
|
||||
|
||||
@Schema(description = "预计公司合同总金额")
|
||||
private BigDecimal companyContractAmount;
|
||||
|
||||
@Schema(description = "有效合同额")
|
||||
private BigDecimal effectiveContractAmount;
|
||||
|
||||
@Schema(description = "建设方")
|
||||
private BigDecimal constructionSide;
|
||||
|
||||
@Schema(description = "发包人")
|
||||
private BigDecimal lettingPartyPeople;
|
||||
|
||||
@Schema(description = "客户联系人")
|
||||
private String customerUser;
|
||||
|
||||
@Schema(description = "客户电话")
|
||||
private String customerPhone;
|
||||
|
||||
@Schema(description = "协作单位")
|
||||
private String cooperationCompany;
|
||||
|
||||
@Schema(description = "跟踪部门")
|
||||
private String trackingDep;
|
||||
|
||||
@Schema(description = "部门负责人")
|
||||
private String depManager;
|
||||
|
||||
@Schema(description = "项目负责人")
|
||||
private String projectManager;
|
||||
|
||||
@Schema(description = "开始跟踪时间")
|
||||
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
|
||||
private LocalDateTime[] startTime;
|
||||
|
||||
@Schema(description = "项目跟踪情况")
|
||||
private String projectTrackingCondition;
|
||||
|
||||
@Schema(description = "下一步工作计划")
|
||||
private String nextWorkPlan;
|
||||
|
||||
@Schema(description = "需协调事项")
|
||||
private String coordinationMatters;
|
||||
|
||||
@Schema(description = "备注", example = "你猜")
|
||||
private String remark;
|
||||
|
||||
@Schema(description = "落地可能性")
|
||||
private BigDecimal possibility;
|
||||
|
||||
@Schema(description = "漏斗预期")
|
||||
private BigDecimal funnelExpectation;
|
||||
|
||||
@Schema(description = "委托方式")
|
||||
private String entrustMethod;
|
||||
|
||||
@Schema(description = "预计投标时间")
|
||||
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
|
||||
private LocalDateTime[] biddingTime;
|
||||
|
||||
@Schema(description = "三月内投标项目")
|
||||
private LocalDateTime bidProject;
|
||||
|
||||
@Schema(description = "是否审批")
|
||||
private Boolean approve;
|
||||
|
||||
@Schema(description = "评审附件url", example = "https://www.iocoder.cn")
|
||||
private String reviewFileUrl;
|
||||
|
||||
@Schema(description = "预计落地时间")
|
||||
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
|
||||
private LocalDateTime[] endTime;
|
||||
|
||||
@Schema(description = "确认落地情况")
|
||||
private Boolean confirmation;
|
||||
|
||||
@Schema(description = "中标通知书url", example = "https://www.iocoder.cn")
|
||||
private String winFileUrl;
|
||||
|
||||
@Schema(description = "项目编号")
|
||||
private String code;
|
||||
|
||||
@Schema(description = "未落地原因", example = "不喜欢")
|
||||
private String reason;
|
||||
|
||||
@Schema(description = "最后编辑人")
|
||||
private String finalEditor;
|
||||
|
||||
@Schema(description = "最后编辑时间")
|
||||
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
|
||||
private LocalDateTime[] finalEditTime;
|
||||
|
||||
@Schema(description = "创建者")
|
||||
private String creator;
|
||||
|
||||
@Schema(description = "创建时间")
|
||||
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
|
||||
private LocalDateTime[] createTime;
|
||||
|
||||
@Schema(description = "更新者")
|
||||
private String updater;
|
||||
|
||||
@Schema(description = "更新时间")
|
||||
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
|
||||
private LocalDateTime[] updateTime;
|
||||
|
||||
@Schema(description = "是否删除")
|
||||
private Boolean deleted;
|
||||
|
||||
@Schema(description = "租户编号", example = "10588")
|
||||
private Long tenantId;
|
||||
|
||||
@Schema(description = "客户公司id", example = "6379")
|
||||
private Long customerCompanyId;
|
||||
|
||||
@Schema(description = "跟踪部门id", example = "16997")
|
||||
private Long trackingDepId;
|
||||
|
||||
@Schema(description = "项目经理id", example = "22298")
|
||||
private Long projectManagerId;
|
||||
|
||||
@Schema(description = "省份id", example = "23298")
|
||||
private Long provinceId;
|
||||
|
||||
@Schema(description = "城市id", example = "4115")
|
||||
private Long cityId;
|
||||
|
||||
}
|
@ -0,0 +1,192 @@
|
||||
package cn.iocoder.yudao.module.pms.controller.admin.projecttracking.vo;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.*;
|
||||
import java.util.*;
|
||||
import java.math.BigDecimal;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
import java.time.LocalDateTime;
|
||||
import com.alibaba.excel.annotation.*;
|
||||
import cn.iocoder.yudao.framework.excel.core.annotations.DictFormat;
|
||||
import cn.iocoder.yudao.framework.excel.core.convert.DictConvert;
|
||||
|
||||
@Schema(description = "管理后台 - 项目跟踪信息 Response VO")
|
||||
@Data
|
||||
@ExcelIgnoreUnannotated
|
||||
public class ProjectTrackingRespVO {
|
||||
|
||||
@Schema(description = "主键", requiredMode = Schema.RequiredMode.REQUIRED, example = "5418")
|
||||
@ExcelProperty("主键")
|
||||
private Long id;
|
||||
|
||||
@Schema(description = "跟踪项目名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "张三")
|
||||
@ExcelProperty("跟踪项目名称")
|
||||
private String name;
|
||||
|
||||
@Schema(description = "项目类型", example = "2")
|
||||
@ExcelProperty(value = "项目类型", converter = DictConvert.class)
|
||||
@DictFormat("project_type") // TODO 代码优化:建议设置到对应的 DictTypeConstants 枚举类中
|
||||
private String type;
|
||||
|
||||
@Schema(description = "跟踪编号")
|
||||
@ExcelProperty("跟踪编号")
|
||||
private String trackingCode;
|
||||
|
||||
@Schema(description = "省份")
|
||||
@ExcelProperty("省份")
|
||||
private String province;
|
||||
|
||||
@Schema(description = "城市")
|
||||
@ExcelProperty("城市")
|
||||
private String city;
|
||||
|
||||
@Schema(description = "项目概况")
|
||||
@ExcelProperty("项目概况")
|
||||
private String projectOverview;
|
||||
|
||||
@Schema(description = "项目总金额")
|
||||
@ExcelProperty("项目总金额")
|
||||
private BigDecimal projectAmount;
|
||||
|
||||
@Schema(description = "预计公司合同总金额")
|
||||
@ExcelProperty("预计公司合同总金额")
|
||||
private BigDecimal companyContractAmount;
|
||||
|
||||
@Schema(description = "有效合同额")
|
||||
@ExcelProperty("有效合同额")
|
||||
private BigDecimal effectiveContractAmount;
|
||||
|
||||
@Schema(description = "建设方")
|
||||
@ExcelProperty("建设方")
|
||||
private BigDecimal constructionSide;
|
||||
|
||||
@Schema(description = "发包人")
|
||||
@ExcelProperty("发包人")
|
||||
private BigDecimal lettingPartyPeople;
|
||||
|
||||
@Schema(description = "客户联系人")
|
||||
@ExcelProperty("客户联系人")
|
||||
private String customerUser;
|
||||
|
||||
@Schema(description = "客户电话", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@ExcelProperty("客户电话")
|
||||
private String customerPhone;
|
||||
|
||||
@Schema(description = "协作单位")
|
||||
@ExcelProperty("协作单位")
|
||||
private String cooperationCompany;
|
||||
|
||||
@Schema(description = "跟踪部门")
|
||||
@ExcelProperty("跟踪部门")
|
||||
private String trackingDep;
|
||||
|
||||
@Schema(description = "部门负责人")
|
||||
@ExcelProperty("部门负责人")
|
||||
private String depManager;
|
||||
|
||||
@Schema(description = "项目负责人")
|
||||
@ExcelProperty("项目负责人")
|
||||
private String projectManager;
|
||||
|
||||
@Schema(description = "开始跟踪时间")
|
||||
@ExcelProperty("开始跟踪时间")
|
||||
private LocalDateTime startTime;
|
||||
|
||||
@Schema(description = "项目跟踪情况")
|
||||
@ExcelProperty("项目跟踪情况")
|
||||
private String projectTrackingCondition;
|
||||
|
||||
@Schema(description = "下一步工作计划")
|
||||
@ExcelProperty("下一步工作计划")
|
||||
private String nextWorkPlan;
|
||||
|
||||
@Schema(description = "需协调事项")
|
||||
@ExcelProperty("需协调事项")
|
||||
private String coordinationMatters;
|
||||
|
||||
@Schema(description = "备注", example = "你猜")
|
||||
@ExcelProperty("备注")
|
||||
private String remark;
|
||||
|
||||
@Schema(description = "落地可能性")
|
||||
@ExcelProperty("落地可能性")
|
||||
private BigDecimal possibility;
|
||||
|
||||
@Schema(description = "漏斗预期")
|
||||
@ExcelProperty("漏斗预期")
|
||||
private BigDecimal funnelExpectation;
|
||||
|
||||
@Schema(description = "委托方式")
|
||||
@ExcelProperty(value = "委托方式", converter = DictConvert.class)
|
||||
@DictFormat("entrust_method") // TODO 代码优化:建议设置到对应的 DictTypeConstants 枚举类中
|
||||
private String entrustMethod;
|
||||
|
||||
@Schema(description = "预计投标时间")
|
||||
@ExcelProperty("预计投标时间")
|
||||
private LocalDateTime biddingTime;
|
||||
|
||||
@Schema(description = "三月内投标项目")
|
||||
@ExcelProperty("三月内投标项目")
|
||||
private LocalDateTime bidProject;
|
||||
|
||||
@Schema(description = "是否审批")
|
||||
@ExcelProperty("是否审批")
|
||||
private Boolean approve;
|
||||
|
||||
@Schema(description = "评审附件url", example = "https://www.iocoder.cn")
|
||||
@ExcelProperty("评审附件url")
|
||||
private String reviewFileUrl;
|
||||
|
||||
@Schema(description = "预计落地时间")
|
||||
@ExcelProperty("预计落地时间")
|
||||
private LocalDateTime endTime;
|
||||
|
||||
@Schema(description = "确认落地情况")
|
||||
@ExcelProperty("确认落地情况")
|
||||
private Boolean confirmation;
|
||||
|
||||
@Schema(description = "中标通知书url", example = "https://www.iocoder.cn")
|
||||
@ExcelProperty("中标通知书url")
|
||||
private String winFileUrl;
|
||||
|
||||
@Schema(description = "项目编号")
|
||||
@ExcelProperty("项目编号")
|
||||
private String code;
|
||||
|
||||
@Schema(description = "未落地原因", example = "不喜欢")
|
||||
@ExcelProperty("未落地原因")
|
||||
private String reason;
|
||||
|
||||
@Schema(description = "最后编辑人")
|
||||
@ExcelProperty("最后编辑人")
|
||||
private String finalEditor;
|
||||
|
||||
@Schema(description = "最后编辑时间")
|
||||
@ExcelProperty("最后编辑时间")
|
||||
private LocalDateTime finalEditTime;
|
||||
|
||||
@Schema(description = "创建时间")
|
||||
@ExcelProperty("创建时间")
|
||||
private LocalDateTime createTime;
|
||||
|
||||
@Schema(description = "客户公司id", example = "6379")
|
||||
@ExcelProperty("客户公司id")
|
||||
private Long customerCompanyId;
|
||||
|
||||
@Schema(description = "跟踪部门id", example = "16997")
|
||||
@ExcelProperty("跟踪部门id")
|
||||
private Long trackingDepId;
|
||||
|
||||
@Schema(description = "项目经理id", example = "22298")
|
||||
@ExcelProperty("项目经理id")
|
||||
private Long projectManagerId;
|
||||
|
||||
@Schema(description = "省份id", example = "23298")
|
||||
@ExcelProperty("省份id")
|
||||
private Long provinceId;
|
||||
|
||||
@Schema(description = "城市id", example = "4115")
|
||||
@ExcelProperty("城市id")
|
||||
private Long cityId;
|
||||
|
||||
}
|
@ -0,0 +1,165 @@
|
||||
package cn.iocoder.yudao.module.pms.controller.admin.projecttracking.vo;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.*;
|
||||
import java.util.*;
|
||||
import jakarta.validation.constraints.*;
|
||||
import java.math.BigDecimal;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
@Schema(description = "管理后台 - 项目跟踪信息新增/修改 Request VO")
|
||||
@Data
|
||||
public class ProjectTrackingSaveReqVO {
|
||||
|
||||
@Schema(description = "主键", requiredMode = Schema.RequiredMode.REQUIRED, example = "5418")
|
||||
private Long id;
|
||||
|
||||
@Schema(description = "跟踪项目名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "张三")
|
||||
@NotEmpty(message = "跟踪项目名称不能为空")
|
||||
private String name;
|
||||
|
||||
@Schema(description = "项目类型", example = "2")
|
||||
private String type;
|
||||
|
||||
@Schema(description = "跟踪编号")
|
||||
private String trackingCode;
|
||||
|
||||
@Schema(description = "省份")
|
||||
private String province;
|
||||
|
||||
@Schema(description = "城市")
|
||||
private String city;
|
||||
|
||||
@Schema(description = "项目概况")
|
||||
private String projectOverview;
|
||||
|
||||
@Schema(description = "项目总金额")
|
||||
private BigDecimal projectAmount;
|
||||
|
||||
@Schema(description = "预计公司合同总金额")
|
||||
private BigDecimal companyContractAmount;
|
||||
|
||||
@Schema(description = "有效合同额")
|
||||
private BigDecimal effectiveContractAmount;
|
||||
|
||||
@Schema(description = "建设方")
|
||||
private BigDecimal constructionSide;
|
||||
|
||||
@Schema(description = "发包人")
|
||||
private BigDecimal lettingPartyPeople;
|
||||
|
||||
@Schema(description = "客户联系人")
|
||||
private String customerUser;
|
||||
|
||||
@Schema(description = "客户电话", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@NotEmpty(message = "客户电话不能为空")
|
||||
private String customerPhone;
|
||||
|
||||
@Schema(description = "协作单位")
|
||||
private String cooperationCompany;
|
||||
|
||||
@Schema(description = "跟踪部门")
|
||||
private String trackingDep;
|
||||
|
||||
@Schema(description = "部门负责人")
|
||||
private String depManager;
|
||||
|
||||
@Schema(description = "项目负责人")
|
||||
private String projectManager;
|
||||
|
||||
@Schema(description = "开始跟踪时间")
|
||||
private LocalDateTime startTime;
|
||||
|
||||
@Schema(description = "项目跟踪情况")
|
||||
private String projectTrackingCondition;
|
||||
|
||||
@Schema(description = "下一步工作计划")
|
||||
private String nextWorkPlan;
|
||||
|
||||
@Schema(description = "需协调事项")
|
||||
private String coordinationMatters;
|
||||
|
||||
@Schema(description = "备注", example = "你猜")
|
||||
private String remark;
|
||||
|
||||
@Schema(description = "落地可能性")
|
||||
private BigDecimal possibility;
|
||||
|
||||
@Schema(description = "漏斗预期")
|
||||
private BigDecimal funnelExpectation;
|
||||
|
||||
@Schema(description = "委托方式")
|
||||
private String entrustMethod;
|
||||
|
||||
@Schema(description = "预计投标时间")
|
||||
private LocalDateTime biddingTime;
|
||||
|
||||
@Schema(description = "三月内投标项目")
|
||||
private LocalDateTime bidProject;
|
||||
|
||||
@Schema(description = "是否审批")
|
||||
private Boolean approve;
|
||||
|
||||
@Schema(description = "评审附件url", example = "https://www.iocoder.cn")
|
||||
private String reviewFileUrl;
|
||||
|
||||
@Schema(description = "预计落地时间")
|
||||
private LocalDateTime endTime;
|
||||
|
||||
@Schema(description = "确认落地情况")
|
||||
private Boolean confirmation;
|
||||
|
||||
@Schema(description = "中标通知书url", example = "https://www.iocoder.cn")
|
||||
private String winFileUrl;
|
||||
|
||||
@Schema(description = "项目编号")
|
||||
private String code;
|
||||
|
||||
@Schema(description = "未落地原因", example = "不喜欢")
|
||||
private String reason;
|
||||
|
||||
@Schema(description = "最后编辑人")
|
||||
private String finalEditor;
|
||||
|
||||
@Schema(description = "最后编辑时间")
|
||||
private LocalDateTime finalEditTime;
|
||||
|
||||
@Schema(description = "创建者", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@NotEmpty(message = "创建者不能为空")
|
||||
private String creator;
|
||||
|
||||
@Schema(description = "创建时间")
|
||||
private LocalDateTime createTime;
|
||||
|
||||
@Schema(description = "更新者", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@NotEmpty(message = "更新者不能为空")
|
||||
private String updater;
|
||||
|
||||
@Schema(description = "更新时间")
|
||||
private LocalDateTime updateTime;
|
||||
|
||||
@Schema(description = "是否删除", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@NotNull(message = "是否删除不能为空")
|
||||
private Boolean deleted;
|
||||
|
||||
@Schema(description = "租户编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "10588")
|
||||
@NotNull(message = "租户编号不能为空")
|
||||
private Long tenantId;
|
||||
|
||||
@Schema(description = "客户公司id", example = "6379")
|
||||
private Long customerCompanyId;
|
||||
|
||||
@Schema(description = "跟踪部门id", example = "16997")
|
||||
private Long trackingDepId;
|
||||
|
||||
@Schema(description = "项目经理id", example = "22298")
|
||||
private Long projectManagerId;
|
||||
|
||||
@Schema(description = "省份id", example = "23298")
|
||||
private Long provinceId;
|
||||
|
||||
@Schema(description = "城市id", example = "4115")
|
||||
private Long cityId;
|
||||
|
||||
}
|
@ -0,0 +1,211 @@
|
||||
package cn.iocoder.yudao.module.pms.dal.dataobject.projecttracking;
|
||||
|
||||
import lombok.*;
|
||||
import java.util.*;
|
||||
import java.math.BigDecimal;
|
||||
import java.math.BigDecimal;
|
||||
import java.math.BigDecimal;
|
||||
import java.math.BigDecimal;
|
||||
import java.math.BigDecimal;
|
||||
import java.time.LocalDateTime;
|
||||
import java.math.BigDecimal;
|
||||
import java.math.BigDecimal;
|
||||
import java.time.LocalDateTime;
|
||||
import java.time.LocalDateTime;
|
||||
import java.time.LocalDateTime;
|
||||
import java.time.LocalDateTime;
|
||||
import java.time.LocalDateTime;
|
||||
import java.time.LocalDateTime;
|
||||
import com.baomidou.mybatisplus.annotation.*;
|
||||
import cn.iocoder.yudao.framework.mybatis.core.dataobject.BaseDO;
|
||||
|
||||
/**
|
||||
* 项目跟踪信息 DO
|
||||
*
|
||||
* @author 管理员
|
||||
*/
|
||||
@TableName("pms_project_tracking")
|
||||
@KeySequence("pms_project_tracking_seq") // 用于 Oracle、PostgreSQL、Kingbase、DB2、H2 数据库的主键自增。如果是 MySQL 等数据库,可不写。
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@ToString(callSuper = true)
|
||||
@Builder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
public class ProjectTrackingDO extends BaseDO {
|
||||
|
||||
/**
|
||||
* 主键
|
||||
*/
|
||||
@TableId
|
||||
private Long id;
|
||||
/**
|
||||
* 跟踪项目名称
|
||||
*/
|
||||
private String name;
|
||||
/**
|
||||
* 项目类型
|
||||
*
|
||||
* 枚举 {@link TODO project_type 对应的类}
|
||||
*/
|
||||
private String type;
|
||||
/**
|
||||
* 跟踪编号
|
||||
*/
|
||||
private String trackingCode;
|
||||
/**
|
||||
* 省份
|
||||
*/
|
||||
private String province;
|
||||
/**
|
||||
* 城市
|
||||
*/
|
||||
private String city;
|
||||
/**
|
||||
* 项目概况
|
||||
*/
|
||||
private String projectOverview;
|
||||
/**
|
||||
* 项目总金额
|
||||
*/
|
||||
private BigDecimal projectAmount;
|
||||
/**
|
||||
* 预计公司合同总金额
|
||||
*/
|
||||
private BigDecimal companyContractAmount;
|
||||
/**
|
||||
* 有效合同额
|
||||
*/
|
||||
private BigDecimal effectiveContractAmount;
|
||||
/**
|
||||
* 建设方
|
||||
*/
|
||||
private BigDecimal constructionSide;
|
||||
/**
|
||||
* 发包人
|
||||
*/
|
||||
private BigDecimal lettingPartyPeople;
|
||||
/**
|
||||
* 客户联系人
|
||||
*/
|
||||
private String customerUser;
|
||||
/**
|
||||
* 客户电话
|
||||
*/
|
||||
private String customerPhone;
|
||||
/**
|
||||
* 协作单位
|
||||
*/
|
||||
private String cooperationCompany;
|
||||
/**
|
||||
* 跟踪部门
|
||||
*/
|
||||
private String trackingDep;
|
||||
/**
|
||||
* 部门负责人
|
||||
*/
|
||||
private String depManager;
|
||||
/**
|
||||
* 项目负责人
|
||||
*/
|
||||
private String projectManager;
|
||||
/**
|
||||
* 开始跟踪时间
|
||||
*/
|
||||
private LocalDateTime startTime;
|
||||
/**
|
||||
* 项目跟踪情况
|
||||
*/
|
||||
private String projectTrackingCondition;
|
||||
/**
|
||||
* 下一步工作计划
|
||||
*/
|
||||
private String nextWorkPlan;
|
||||
/**
|
||||
* 需协调事项
|
||||
*/
|
||||
private String coordinationMatters;
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
private String remark;
|
||||
/**
|
||||
* 落地可能性
|
||||
*/
|
||||
private BigDecimal possibility;
|
||||
/**
|
||||
* 漏斗预期
|
||||
*/
|
||||
private BigDecimal funnelExpectation;
|
||||
/**
|
||||
* 委托方式
|
||||
*
|
||||
* 枚举 {@link TODO entrust_method 对应的类}
|
||||
*/
|
||||
private String entrustMethod;
|
||||
/**
|
||||
* 预计投标时间
|
||||
*/
|
||||
private LocalDateTime biddingTime;
|
||||
/**
|
||||
* 三月内投标项目
|
||||
*/
|
||||
private LocalDateTime bidProject;
|
||||
/**
|
||||
* 是否审批
|
||||
*/
|
||||
private Boolean approve;
|
||||
/**
|
||||
* 评审附件url
|
||||
*/
|
||||
private String reviewFileUrl;
|
||||
/**
|
||||
* 预计落地时间
|
||||
*/
|
||||
private LocalDateTime endTime;
|
||||
/**
|
||||
* 确认落地情况
|
||||
*/
|
||||
private Boolean confirmation;
|
||||
/**
|
||||
* 中标通知书url
|
||||
*/
|
||||
private String winFileUrl;
|
||||
/**
|
||||
* 项目编号
|
||||
*/
|
||||
private String code;
|
||||
/**
|
||||
* 未落地原因
|
||||
*/
|
||||
private String reason;
|
||||
/**
|
||||
* 最后编辑人
|
||||
*/
|
||||
private String finalEditor;
|
||||
/**
|
||||
* 最后编辑时间
|
||||
*/
|
||||
private LocalDateTime finalEditTime;
|
||||
/**
|
||||
* 客户公司id
|
||||
*/
|
||||
private Long customerCompanyId;
|
||||
/**
|
||||
* 跟踪部门id
|
||||
*/
|
||||
private Long trackingDepId;
|
||||
/**
|
||||
* 项目经理id
|
||||
*/
|
||||
private Long projectManagerId;
|
||||
/**
|
||||
* 省份id
|
||||
*/
|
||||
private Long provinceId;
|
||||
/**
|
||||
* 城市id
|
||||
*/
|
||||
private Long cityId;
|
||||
|
||||
}
|
@ -0,0 +1,70 @@
|
||||
package cn.iocoder.yudao.module.pms.dal.mysql.projecttracking;
|
||||
|
||||
|
||||
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.pms.dal.dataobject.projecttracking.ProjectTrackingDO;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import cn.iocoder.yudao.module.pms.controller.admin.projecttracking.vo.*;
|
||||
|
||||
/**
|
||||
* 项目跟踪信息 Mapper
|
||||
*
|
||||
* @author 管理员
|
||||
*/
|
||||
@Mapper
|
||||
public interface ProjectTrackingMapper extends BaseMapperX<ProjectTrackingDO> {
|
||||
|
||||
default PageResult<ProjectTrackingDO> selectPage(ProjectTrackingPageReqVO reqVO) {
|
||||
return selectPage(reqVO, new LambdaQueryWrapperX<ProjectTrackingDO>()
|
||||
.likeIfPresent(ProjectTrackingDO::getName, reqVO.getName())
|
||||
.eqIfPresent(ProjectTrackingDO::getType, reqVO.getType())
|
||||
.eqIfPresent(ProjectTrackingDO::getTrackingCode, reqVO.getTrackingCode())
|
||||
.eqIfPresent(ProjectTrackingDO::getProvince, reqVO.getProvince())
|
||||
.eqIfPresent(ProjectTrackingDO::getCity, reqVO.getCity())
|
||||
.eqIfPresent(ProjectTrackingDO::getProjectOverview, reqVO.getProjectOverview())
|
||||
.eqIfPresent(ProjectTrackingDO::getProjectAmount, reqVO.getProjectAmount())
|
||||
.eqIfPresent(ProjectTrackingDO::getCompanyContractAmount, reqVO.getCompanyContractAmount())
|
||||
.eqIfPresent(ProjectTrackingDO::getEffectiveContractAmount, reqVO.getEffectiveContractAmount())
|
||||
.eqIfPresent(ProjectTrackingDO::getConstructionSide, reqVO.getConstructionSide())
|
||||
.eqIfPresent(ProjectTrackingDO::getLettingPartyPeople, reqVO.getLettingPartyPeople())
|
||||
.eqIfPresent(ProjectTrackingDO::getCustomerUser, reqVO.getCustomerUser())
|
||||
.eqIfPresent(ProjectTrackingDO::getCustomerPhone, reqVO.getCustomerPhone())
|
||||
.eqIfPresent(ProjectTrackingDO::getCooperationCompany, reqVO.getCooperationCompany())
|
||||
.eqIfPresent(ProjectTrackingDO::getTrackingDep, reqVO.getTrackingDep())
|
||||
.eqIfPresent(ProjectTrackingDO::getDepManager, reqVO.getDepManager())
|
||||
.eqIfPresent(ProjectTrackingDO::getProjectManager, reqVO.getProjectManager())
|
||||
.betweenIfPresent(ProjectTrackingDO::getStartTime, reqVO.getStartTime())
|
||||
.eqIfPresent(ProjectTrackingDO::getProjectTrackingCondition, reqVO.getProjectTrackingCondition())
|
||||
.eqIfPresent(ProjectTrackingDO::getNextWorkPlan, reqVO.getNextWorkPlan())
|
||||
.eqIfPresent(ProjectTrackingDO::getCoordinationMatters, reqVO.getCoordinationMatters())
|
||||
.eqIfPresent(ProjectTrackingDO::getRemark, reqVO.getRemark())
|
||||
.eqIfPresent(ProjectTrackingDO::getPossibility, reqVO.getPossibility())
|
||||
.eqIfPresent(ProjectTrackingDO::getFunnelExpectation, reqVO.getFunnelExpectation())
|
||||
.eqIfPresent(ProjectTrackingDO::getEntrustMethod, reqVO.getEntrustMethod())
|
||||
.betweenIfPresent(ProjectTrackingDO::getBiddingTime, reqVO.getBiddingTime())
|
||||
.eqIfPresent(ProjectTrackingDO::getBidProject, reqVO.getBidProject())
|
||||
.eqIfPresent(ProjectTrackingDO::getApprove, reqVO.getApprove())
|
||||
.eqIfPresent(ProjectTrackingDO::getReviewFileUrl, reqVO.getReviewFileUrl())
|
||||
.betweenIfPresent(ProjectTrackingDO::getEndTime, reqVO.getEndTime())
|
||||
.eqIfPresent(ProjectTrackingDO::getConfirmation, reqVO.getConfirmation())
|
||||
.eqIfPresent(ProjectTrackingDO::getWinFileUrl, reqVO.getWinFileUrl())
|
||||
.eqIfPresent(ProjectTrackingDO::getCode, reqVO.getCode())
|
||||
.eqIfPresent(ProjectTrackingDO::getReason, reqVO.getReason())
|
||||
.eqIfPresent(ProjectTrackingDO::getFinalEditor, reqVO.getFinalEditor())
|
||||
.betweenIfPresent(ProjectTrackingDO::getFinalEditTime, reqVO.getFinalEditTime())
|
||||
.eqIfPresent(ProjectTrackingDO::getCreator, reqVO.getCreator())
|
||||
.betweenIfPresent(ProjectTrackingDO::getCreateTime, reqVO.getCreateTime())
|
||||
.eqIfPresent(ProjectTrackingDO::getUpdater, reqVO.getUpdater())
|
||||
.betweenIfPresent(ProjectTrackingDO::getUpdateTime, reqVO.getUpdateTime())
|
||||
.eqIfPresent(ProjectTrackingDO::getDeleted, reqVO.getDeleted())
|
||||
.eqIfPresent(ProjectTrackingDO::getCustomerCompanyId, reqVO.getCustomerCompanyId())
|
||||
.eqIfPresent(ProjectTrackingDO::getTrackingDepId, reqVO.getTrackingDepId())
|
||||
.eqIfPresent(ProjectTrackingDO::getProjectManagerId, reqVO.getProjectManagerId())
|
||||
.eqIfPresent(ProjectTrackingDO::getProvinceId, reqVO.getProvinceId())
|
||||
.eqIfPresent(ProjectTrackingDO::getCityId, reqVO.getCityId())
|
||||
.orderByDesc(ProjectTrackingDO::getId));
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,55 @@
|
||||
package cn.iocoder.yudao.module.pms.service.projecttracking;
|
||||
|
||||
import java.util.*;
|
||||
import jakarta.validation.*;
|
||||
import cn.iocoder.yudao.module.pms.controller.admin.projecttracking.vo.*;
|
||||
import cn.iocoder.yudao.module.pms.dal.dataobject.projecttracking.ProjectTrackingDO;
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageResult;
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageParam;
|
||||
|
||||
/**
|
||||
* 项目跟踪信息 Service 接口
|
||||
*
|
||||
* @author 管理员
|
||||
*/
|
||||
public interface ProjectTrackingService {
|
||||
|
||||
/**
|
||||
* 创建项目跟踪信息
|
||||
*
|
||||
* @param createReqVO 创建信息
|
||||
* @return 编号
|
||||
*/
|
||||
Long createProjectTracking(@Valid ProjectTrackingSaveReqVO createReqVO);
|
||||
|
||||
/**
|
||||
* 更新项目跟踪信息
|
||||
*
|
||||
* @param updateReqVO 更新信息
|
||||
*/
|
||||
void updateProjectTracking(@Valid ProjectTrackingSaveReqVO updateReqVO);
|
||||
|
||||
/**
|
||||
* 删除项目跟踪信息
|
||||
*
|
||||
* @param id 编号
|
||||
*/
|
||||
void deleteProjectTracking(Long id);
|
||||
|
||||
/**
|
||||
* 获得项目跟踪信息
|
||||
*
|
||||
* @param id 编号
|
||||
* @return 项目跟踪信息
|
||||
*/
|
||||
ProjectTrackingDO getProjectTracking(Long id);
|
||||
|
||||
/**
|
||||
* 获得项目跟踪信息分页
|
||||
*
|
||||
* @param pageReqVO 分页查询
|
||||
* @return 项目跟踪信息分页
|
||||
*/
|
||||
PageResult<ProjectTrackingDO> getProjectTrackingPage(ProjectTrackingPageReqVO pageReqVO);
|
||||
|
||||
}
|
@ -0,0 +1,74 @@
|
||||
package cn.iocoder.yudao.module.pms.service.projecttracking;
|
||||
|
||||
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.pms.controller.admin.projecttracking.vo.*;
|
||||
import cn.iocoder.yudao.module.pms.dal.dataobject.projecttracking.ProjectTrackingDO;
|
||||
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.pms.dal.mysql.projecttracking.ProjectTrackingMapper;
|
||||
|
||||
import static cn.iocoder.yudao.framework.common.exception.util.ServiceExceptionUtil.exception;
|
||||
import static cn.iocoder.yudao.module.pms.enums.ErrorCodeConstants.*;
|
||||
|
||||
/**
|
||||
* 项目跟踪信息 Service 实现类
|
||||
*
|
||||
* @author 管理员
|
||||
*/
|
||||
@Service
|
||||
@Validated
|
||||
public class ProjectTrackingServiceImpl implements ProjectTrackingService {
|
||||
|
||||
@Resource
|
||||
private ProjectTrackingMapper projectTrackingMapper;
|
||||
|
||||
@Override
|
||||
public Long createProjectTracking(ProjectTrackingSaveReqVO createReqVO) {
|
||||
// 插入
|
||||
ProjectTrackingDO projectTracking = BeanUtils.toBean(createReqVO, ProjectTrackingDO.class);
|
||||
projectTrackingMapper.insert(projectTracking);
|
||||
// 返回
|
||||
return projectTracking.getId();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void updateProjectTracking(ProjectTrackingSaveReqVO updateReqVO) {
|
||||
// 校验存在
|
||||
validateProjectTrackingExists(updateReqVO.getId());
|
||||
// 更新
|
||||
ProjectTrackingDO updateObj = BeanUtils.toBean(updateReqVO, ProjectTrackingDO.class);
|
||||
projectTrackingMapper.updateById(updateObj);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void deleteProjectTracking(Long id) {
|
||||
// 校验存在
|
||||
validateProjectTrackingExists(id);
|
||||
// 删除
|
||||
projectTrackingMapper.deleteById(id);
|
||||
}
|
||||
|
||||
private void validateProjectTrackingExists(Long id) {
|
||||
if (projectTrackingMapper.selectById(id) == null) {
|
||||
throw exception(PROJECT_TRACKING_NOT_EXISTS);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public ProjectTrackingDO getProjectTracking(Long id) {
|
||||
return projectTrackingMapper.selectById(id);
|
||||
}
|
||||
|
||||
@Override
|
||||
public PageResult<ProjectTrackingDO> getProjectTrackingPage(ProjectTrackingPageReqVO pageReqVO) {
|
||||
return projectTrackingMapper.selectPage(pageReqVO);
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,12 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="cn.iocoder.yudao.module.pms.dal.mysql.projecttracking.ProjectTrackingMapper">
|
||||
|
||||
<!--
|
||||
一般情况下,尽可能使用 Mapper 进行 CRUD 增删改查即可。
|
||||
无法满足的场景,例如说多表关联查询,才使用 XML 编写 SQL。
|
||||
代码生成器暂时只生成 Mapper XML 文件本身,更多推荐 MybatisX 快速开发插件来生成查询。
|
||||
文档可见:https://www.iocoder.cn/MyBatis/x-plugins/
|
||||
-->
|
||||
|
||||
</mapper>
|
Reference in New Issue
Block a user