代码提交

master-p
17602169347 1 year ago
parent 39ad4dfb72
commit 2c16788d8f

@ -0,0 +1,102 @@
package com.yunxi.scm.module.xxjj.controller.admin.subjectfollowmanagement;
import org.springframework.web.bind.annotation.*;
import javax.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 javax.validation.constraints.*;
import javax.validation.*;
import javax.servlet.http.*;
import java.util.*;
import java.io.IOException;
import com.yunxi.scm.framework.common.pojo.PageResult;
import com.yunxi.scm.framework.common.pojo.CommonResult;
import static com.yunxi.scm.framework.common.pojo.CommonResult.success;
import com.yunxi.scm.framework.excel.core.util.ExcelUtils;
import com.yunxi.scm.framework.operatelog.core.annotations.OperateLog;
import static com.yunxi.scm.framework.operatelog.core.enums.OperateTypeEnum.*;
import com.yunxi.scm.module.xxjj.controller.admin.subjectfollowmanagement.vo.*;
import com.yunxi.scm.module.xxjj.dal.dataobject.subjectfollowmanagement.SubjectFollowManagementDO;
import com.yunxi.scm.module.xxjj.convert.subjectfollowmanagement.SubjectFollowManagementConvert;
import com.yunxi.scm.module.xxjj.service.subjectfollowmanagement.SubjectFollowManagementService;
@Tag(name = "管理后台 - 主体跟进管理")
@RestController
@RequestMapping("/xxjj/subject-follow-management")
@Validated
public class SubjectFollowManagementController {
@Resource
private SubjectFollowManagementService subjectFollowManagementService;
@PostMapping("/create")
@Operation(summary = "创建主体跟进管理")
@PreAuthorize("@ss.hasPermission('xxjj:subject-follow-management:create')")
public CommonResult<Long> createSubjectFollowManagement(@Valid @RequestBody SubjectFollowManagementCreateReqVO createReqVO) {
return success(subjectFollowManagementService.createSubjectFollowManagement(createReqVO));
}
@PutMapping("/update")
@Operation(summary = "更新主体跟进管理")
@PreAuthorize("@ss.hasPermission('xxjj:subject-follow-management:update')")
public CommonResult<Boolean> updateSubjectFollowManagement(@Valid @RequestBody SubjectFollowManagementUpdateReqVO updateReqVO) {
subjectFollowManagementService.updateSubjectFollowManagement(updateReqVO);
return success(true);
}
@DeleteMapping("/delete")
@Operation(summary = "删除主体跟进管理")
@Parameter(name = "id", description = "编号", required = true)
@PreAuthorize("@ss.hasPermission('xxjj:subject-follow-management:delete')")
public CommonResult<Boolean> deleteSubjectFollowManagement(@RequestParam("id") Long id) {
subjectFollowManagementService.deleteSubjectFollowManagement(id);
return success(true);
}
@GetMapping("/get")
@Operation(summary = "获得主体跟进管理")
@Parameter(name = "id", description = "编号", required = true, example = "1024")
@PreAuthorize("@ss.hasPermission('xxjj:subject-follow-management:query')")
public CommonResult<SubjectFollowManagementRespVO> getSubjectFollowManagement(@RequestParam("id") Long id) {
SubjectFollowManagementDO subjectFollowManagement = subjectFollowManagementService.getSubjectFollowManagement(id);
return success(SubjectFollowManagementConvert.INSTANCE.convert(subjectFollowManagement));
}
@GetMapping("/list")
@Operation(summary = "获得主体跟进管理列表")
@Parameter(name = "ids", description = "编号列表", required = true, example = "1024,2048")
@PreAuthorize("@ss.hasPermission('xxjj:subject-follow-management:query')")
public CommonResult<List<SubjectFollowManagementRespVO>> getSubjectFollowManagementList(@RequestParam("ids") Collection<Long> ids) {
List<SubjectFollowManagementDO> list = subjectFollowManagementService.getSubjectFollowManagementList(ids);
return success(SubjectFollowManagementConvert.INSTANCE.convertList(list));
}
@GetMapping("/page")
@Operation(summary = "获得主体跟进管理分页")
@PreAuthorize("@ss.hasPermission('xxjj:subject-follow-management:query')")
public CommonResult<PageResult<SubjectFollowManagementRespVO>> getSubjectFollowManagementPage(@Valid SubjectFollowManagementPageReqVO pageVO) {
PageResult<SubjectFollowManagementDO> pageResult = subjectFollowManagementService.getSubjectFollowManagementPage(pageVO);
return success(SubjectFollowManagementConvert.INSTANCE.convertPage(pageResult));
}
@GetMapping("/export-excel")
@Operation(summary = "导出主体跟进管理 Excel")
@PreAuthorize("@ss.hasPermission('xxjj:subject-follow-management:export')")
@OperateLog(type = EXPORT)
public void exportSubjectFollowManagementExcel(@Valid SubjectFollowManagementExportReqVO exportReqVO,
HttpServletResponse response) throws IOException {
List<SubjectFollowManagementDO> list = subjectFollowManagementService.getSubjectFollowManagementList(exportReqVO);
// 导出 Excel
List<SubjectFollowManagementExcelVO> datas = SubjectFollowManagementConvert.INSTANCE.convertList02(list);
ExcelUtils.write(response, "主体跟进管理.xls", "数据", SubjectFollowManagementExcelVO.class, datas);
}
}

@ -0,0 +1,64 @@
package com.yunxi.scm.module.xxjj.controller.admin.subjectfollowmanagement.vo;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.*;
import java.util.*;
import java.time.LocalDateTime;
import java.time.LocalDateTime;
import java.time.LocalDateTime;
import java.time.LocalDateTime;
import javax.validation.constraints.*;
import org.springframework.format.annotation.DateTimeFormat;
import static com.yunxi.scm.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND;
/**
* Base VO VO 使
* VO Swagger
*/
@Data
public class SubjectFollowManagementBaseVO {
@Schema(description = "业务id", requiredMode = Schema.RequiredMode.REQUIRED, example = "10252")
@NotNull(message = "业务id不能为空")
private Long businessId;
@Schema(description = "代表人类型(0客户 1供应商 2服务商)", example = "2")
private String businessType;
@Schema(description = "任务标题")
private String title;
@Schema(description = "身份证号")
private String idCard;
@Schema(description = "开始时间")
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
private LocalDateTime startTime;
@Schema(description = "结束时间")
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
private LocalDateTime endTime;
@Schema(description = "负责人员")
private String responsible;
@Schema(description = "参与人员")
private String partake;
@Schema(description = "标记颜色")
private String mark;
@Schema(description = "紧要程度(0重要 1紧急 2普通 3较低)")
private String urgency;
@Schema(description = "提醒类型(0准时提醒 1提前5分钟 2提前15分钟 3提前30分钟 4提前1小时)", example = "1")
private String remindType;
@Schema(description = "任务描述", example = "你猜")
private String description;
@Schema(description = "附件")
private String annex;
}

@ -0,0 +1,14 @@
package com.yunxi.scm.module.xxjj.controller.admin.subjectfollowmanagement.vo;
import lombok.*;
import java.util.*;
import io.swagger.v3.oas.annotations.media.Schema;
import javax.validation.constraints.*;
@Schema(description = "管理后台 - 主体跟进管理创建 Request VO")
@Data
@EqualsAndHashCode(callSuper = true)
@ToString(callSuper = true)
public class SubjectFollowManagementCreateReqVO extends SubjectFollowManagementBaseVO {
}

@ -0,0 +1,66 @@
package com.yunxi.scm.module.xxjj.controller.admin.subjectfollowmanagement.vo;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.*;
import java.util.*;
import java.time.LocalDateTime;
import java.time.LocalDateTime;
import java.time.LocalDateTime;
import java.time.LocalDateTime;
import com.alibaba.excel.annotation.ExcelProperty;
/**
* Excel VO
*
* @author
*/
@Data
public class SubjectFollowManagementExcelVO {
@ExcelProperty("主键id")
private Long id;
@ExcelProperty("业务id")
private Long businessId;
@ExcelProperty("代表人类型(0客户 1供应商 2服务商)")
private String businessType;
@ExcelProperty("任务标题")
private String title;
@ExcelProperty("身份证号")
private String idCard;
@ExcelProperty("开始时间")
private LocalDateTime startTime;
@ExcelProperty("结束时间")
private LocalDateTime endTime;
@ExcelProperty("负责人员")
private String responsible;
@ExcelProperty("参与人员")
private String partake;
@ExcelProperty("标记颜色")
private String mark;
@ExcelProperty("紧要程度(0重要 1紧急 2普通 3较低)")
private String urgency;
@ExcelProperty("提醒类型(0准时提醒 1提前5分钟 2提前15分钟 3提前30分钟 4提前1小时)")
private String remindType;
@ExcelProperty("任务描述")
private String description;
@ExcelProperty("附件")
private String annex;
@ExcelProperty("创建时间")
private LocalDateTime createTime;
}

@ -0,0 +1,61 @@
package com.yunxi.scm.module.xxjj.controller.admin.subjectfollowmanagement.vo;
import lombok.*;
import java.util.*;
import io.swagger.v3.oas.annotations.media.Schema;
import com.yunxi.scm.framework.common.pojo.PageParam;
import java.time.LocalDateTime;
import org.springframework.format.annotation.DateTimeFormat;
import static com.yunxi.scm.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND;
@Schema(description = "管理后台 - 主体跟进管理 Excel 导出 Request VO参数和 SubjectFollowManagementPageReqVO 是一致的")
@Data
public class SubjectFollowManagementExportReqVO {
@Schema(description = "业务id", example = "10252")
private Long businessId;
@Schema(description = "代表人类型(0客户 1供应商 2服务商)", example = "2")
private String businessType;
@Schema(description = "任务标题")
private String title;
@Schema(description = "身份证号")
private String idCard;
@Schema(description = "开始时间")
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
private LocalDateTime[] startTime;
@Schema(description = "结束时间")
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
private LocalDateTime[] endTime;
@Schema(description = "负责人员")
private String responsible;
@Schema(description = "参与人员")
private String partake;
@Schema(description = "标记颜色")
private String mark;
@Schema(description = "紧要程度(0重要 1紧急 2普通 3较低)")
private String urgency;
@Schema(description = "提醒类型(0准时提醒 1提前5分钟 2提前15分钟 3提前30分钟 4提前1小时)", example = "1")
private String remindType;
@Schema(description = "任务描述", example = "你猜")
private String description;
@Schema(description = "附件")
private String annex;
@Schema(description = "创建时间")
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
private LocalDateTime[] createTime;
}

@ -0,0 +1,63 @@
package com.yunxi.scm.module.xxjj.controller.admin.subjectfollowmanagement.vo;
import lombok.*;
import java.util.*;
import io.swagger.v3.oas.annotations.media.Schema;
import com.yunxi.scm.framework.common.pojo.PageParam;
import org.springframework.format.annotation.DateTimeFormat;
import java.time.LocalDateTime;
import static com.yunxi.scm.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 SubjectFollowManagementPageReqVO extends PageParam {
@Schema(description = "业务id", example = "10252")
private Long businessId;
@Schema(description = "代表人类型(0客户 1供应商 2服务商)", example = "2")
private String businessType;
@Schema(description = "任务标题")
private String title;
@Schema(description = "身份证号")
private String idCard;
@Schema(description = "开始时间")
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
private LocalDateTime[] startTime;
@Schema(description = "结束时间")
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
private LocalDateTime[] endTime;
@Schema(description = "负责人员")
private String responsible;
@Schema(description = "参与人员")
private String partake;
@Schema(description = "标记颜色")
private String mark;
@Schema(description = "紧要程度(0重要 1紧急 2普通 3较低)")
private String urgency;
@Schema(description = "提醒类型(0准时提醒 1提前5分钟 2提前15分钟 3提前30分钟 4提前1小时)", example = "1")
private String remindType;
@Schema(description = "任务描述", example = "你猜")
private String description;
@Schema(description = "附件")
private String annex;
@Schema(description = "创建时间")
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
private LocalDateTime[] createTime;
}

@ -0,0 +1,19 @@
package com.yunxi.scm.module.xxjj.controller.admin.subjectfollowmanagement.vo;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.*;
import java.time.LocalDateTime;
@Schema(description = "管理后台 - 主体跟进管理 Response VO")
@Data
@EqualsAndHashCode(callSuper = true)
@ToString(callSuper = true)
public class SubjectFollowManagementRespVO extends SubjectFollowManagementBaseVO {
@Schema(description = "主键id", requiredMode = Schema.RequiredMode.REQUIRED, example = "23298")
private Long id;
@Schema(description = "创建时间", requiredMode = Schema.RequiredMode.REQUIRED)
private LocalDateTime createTime;
}

@ -0,0 +1,18 @@
package com.yunxi.scm.module.xxjj.controller.admin.subjectfollowmanagement.vo;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.*;
import java.util.*;
import javax.validation.constraints.*;
@Schema(description = "管理后台 - 主体跟进管理更新 Request VO")
@Data
@EqualsAndHashCode(callSuper = true)
@ToString(callSuper = true)
public class SubjectFollowManagementUpdateReqVO extends SubjectFollowManagementBaseVO {
@Schema(description = "主键id", requiredMode = Schema.RequiredMode.REQUIRED, example = "23298")
@NotNull(message = "主键id不能为空")
private Long id;
}

@ -0,0 +1,34 @@
package com.yunxi.scm.module.xxjj.convert.subjectfollowmanagement;
import java.util.*;
import com.yunxi.scm.framework.common.pojo.PageResult;
import org.mapstruct.Mapper;
import org.mapstruct.factory.Mappers;
import com.yunxi.scm.module.xxjj.controller.admin.subjectfollowmanagement.vo.*;
import com.yunxi.scm.module.xxjj.dal.dataobject.subjectfollowmanagement.SubjectFollowManagementDO;
/**
* Convert
*
* @author
*/
@Mapper
public interface SubjectFollowManagementConvert {
SubjectFollowManagementConvert INSTANCE = Mappers.getMapper(SubjectFollowManagementConvert.class);
SubjectFollowManagementDO convert(SubjectFollowManagementCreateReqVO bean);
SubjectFollowManagementDO convert(SubjectFollowManagementUpdateReqVO bean);
SubjectFollowManagementRespVO convert(SubjectFollowManagementDO bean);
List<SubjectFollowManagementRespVO> convertList(List<SubjectFollowManagementDO> list);
PageResult<SubjectFollowManagementRespVO> convertPage(PageResult<SubjectFollowManagementDO> page);
List<SubjectFollowManagementExcelVO> convertList02(List<SubjectFollowManagementDO> list);
}

@ -0,0 +1,85 @@
package com.yunxi.scm.module.xxjj.dal.dataobject.subjectfollowmanagement;
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.yunxi.scm.framework.mybatis.core.dataobject.BaseDO;
/**
* DO
*
* @author
*/
@TableName("xxjj_subject_follow_management")
@KeySequence("xxjj_subject_follow_management_seq") // 用于 Oracle、PostgreSQL、Kingbase、DB2、H2 数据库的主键自增。如果是 MySQL 等数据库,可不写。
@Data
@EqualsAndHashCode(callSuper = true)
@ToString(callSuper = true)
@Builder
@NoArgsConstructor
@AllArgsConstructor
public class SubjectFollowManagementDO extends BaseDO {
/**
* id
*/
@TableId
private Long id;
/**
* id
*/
private Long businessId;
/**
* (0 1 2)
*/
private String businessType;
/**
*
*/
private String title;
/**
*
*/
private String idCard;
/**
*
*/
private LocalDateTime startTime;
/**
*
*/
private LocalDateTime endTime;
/**
*
*/
private String responsible;
/**
*
*/
private String partake;
/**
*
*/
private String mark;
/**
* (0 1 2 3)
*/
private String urgency;
/**
* (0 15 215 330 41)
*/
private String remindType;
/**
*
*/
private String description;
/**
*
*/
private String annex;
}

@ -0,0 +1,58 @@
package com.yunxi.scm.module.xxjj.dal.mysql.subjectfollowmanagement;
import java.util.*;
import com.yunxi.scm.framework.common.pojo.PageResult;
import com.yunxi.scm.framework.mybatis.core.query.LambdaQueryWrapperX;
import com.yunxi.scm.framework.mybatis.core.mapper.BaseMapperX;
import com.yunxi.scm.module.xxjj.dal.dataobject.subjectfollowmanagement.SubjectFollowManagementDO;
import org.apache.ibatis.annotations.Mapper;
import com.yunxi.scm.module.xxjj.controller.admin.subjectfollowmanagement.vo.*;
/**
* Mapper
*
* @author
*/
@Mapper
public interface SubjectFollowManagementMapper extends BaseMapperX<SubjectFollowManagementDO> {
default PageResult<SubjectFollowManagementDO> selectPage(SubjectFollowManagementPageReqVO reqVO) {
return selectPage(reqVO, new LambdaQueryWrapperX<SubjectFollowManagementDO>()
.eqIfPresent(SubjectFollowManagementDO::getBusinessId, reqVO.getBusinessId())
.eqIfPresent(SubjectFollowManagementDO::getBusinessType, reqVO.getBusinessType())
.eqIfPresent(SubjectFollowManagementDO::getTitle, reqVO.getTitle())
.eqIfPresent(SubjectFollowManagementDO::getIdCard, reqVO.getIdCard())
.betweenIfPresent(SubjectFollowManagementDO::getStartTime, reqVO.getStartTime())
.betweenIfPresent(SubjectFollowManagementDO::getEndTime, reqVO.getEndTime())
.eqIfPresent(SubjectFollowManagementDO::getResponsible, reqVO.getResponsible())
.eqIfPresent(SubjectFollowManagementDO::getPartake, reqVO.getPartake())
.eqIfPresent(SubjectFollowManagementDO::getMark, reqVO.getMark())
.eqIfPresent(SubjectFollowManagementDO::getUrgency, reqVO.getUrgency())
.eqIfPresent(SubjectFollowManagementDO::getRemindType, reqVO.getRemindType())
.eqIfPresent(SubjectFollowManagementDO::getDescription, reqVO.getDescription())
.eqIfPresent(SubjectFollowManagementDO::getAnnex, reqVO.getAnnex())
.betweenIfPresent(SubjectFollowManagementDO::getCreateTime, reqVO.getCreateTime())
.orderByDesc(SubjectFollowManagementDO::getId));
}
default List<SubjectFollowManagementDO> selectList(SubjectFollowManagementExportReqVO reqVO) {
return selectList(new LambdaQueryWrapperX<SubjectFollowManagementDO>()
.eqIfPresent(SubjectFollowManagementDO::getBusinessId, reqVO.getBusinessId())
.eqIfPresent(SubjectFollowManagementDO::getBusinessType, reqVO.getBusinessType())
.eqIfPresent(SubjectFollowManagementDO::getTitle, reqVO.getTitle())
.eqIfPresent(SubjectFollowManagementDO::getIdCard, reqVO.getIdCard())
.betweenIfPresent(SubjectFollowManagementDO::getStartTime, reqVO.getStartTime())
.betweenIfPresent(SubjectFollowManagementDO::getEndTime, reqVO.getEndTime())
.eqIfPresent(SubjectFollowManagementDO::getResponsible, reqVO.getResponsible())
.eqIfPresent(SubjectFollowManagementDO::getPartake, reqVO.getPartake())
.eqIfPresent(SubjectFollowManagementDO::getMark, reqVO.getMark())
.eqIfPresent(SubjectFollowManagementDO::getUrgency, reqVO.getUrgency())
.eqIfPresent(SubjectFollowManagementDO::getRemindType, reqVO.getRemindType())
.eqIfPresent(SubjectFollowManagementDO::getDescription, reqVO.getDescription())
.eqIfPresent(SubjectFollowManagementDO::getAnnex, reqVO.getAnnex())
.betweenIfPresent(SubjectFollowManagementDO::getCreateTime, reqVO.getCreateTime())
.orderByDesc(SubjectFollowManagementDO::getId));
}
}

@ -0,0 +1,70 @@
package com.yunxi.scm.module.xxjj.service.subjectfollowmanagement;
import java.util.*;
import javax.validation.*;
import com.yunxi.scm.module.xxjj.controller.admin.subjectfollowmanagement.vo.*;
import com.yunxi.scm.module.xxjj.dal.dataobject.subjectfollowmanagement.SubjectFollowManagementDO;
import com.yunxi.scm.framework.common.pojo.PageResult;
/**
* Service
*
* @author
*/
public interface SubjectFollowManagementService {
/**
*
*
* @param createReqVO
* @return
*/
Long createSubjectFollowManagement(@Valid SubjectFollowManagementCreateReqVO createReqVO);
/**
*
*
* @param updateReqVO
*/
void updateSubjectFollowManagement(@Valid SubjectFollowManagementUpdateReqVO updateReqVO);
/**
*
*
* @param id
*/
void deleteSubjectFollowManagement(Long id);
/**
*
*
* @param id
* @return
*/
SubjectFollowManagementDO getSubjectFollowManagement(Long id);
/**
*
*
* @param ids
* @return
*/
List<SubjectFollowManagementDO> getSubjectFollowManagementList(Collection<Long> ids);
/**
*
*
* @param pageReqVO
* @return
*/
PageResult<SubjectFollowManagementDO> getSubjectFollowManagementPage(SubjectFollowManagementPageReqVO pageReqVO);
/**
* , Excel
*
* @param exportReqVO
* @return
*/
List<SubjectFollowManagementDO> getSubjectFollowManagementList(SubjectFollowManagementExportReqVO exportReqVO);
}

@ -0,0 +1,82 @@
package com.yunxi.scm.module.xxjj.service.subjectfollowmanagement;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
import org.springframework.validation.annotation.Validated;
import java.util.*;
import com.yunxi.scm.module.xxjj.controller.admin.subjectfollowmanagement.vo.*;
import com.yunxi.scm.module.xxjj.dal.dataobject.subjectfollowmanagement.SubjectFollowManagementDO;
import com.yunxi.scm.framework.common.pojo.PageResult;
import com.yunxi.scm.module.xxjj.convert.subjectfollowmanagement.SubjectFollowManagementConvert;
import com.yunxi.scm.module.xxjj.dal.mysql.subjectfollowmanagement.SubjectFollowManagementMapper;
import static com.yunxi.scm.framework.common.exception.util.ServiceExceptionUtil.exception;
import static com.yunxi.scm.module.xxjj.enums.ErrorCodeConstants.*;
/**
* Service
*
* @author
*/
@Service
@Validated
public class SubjectFollowManagementServiceImpl implements SubjectFollowManagementService {
@Resource
private SubjectFollowManagementMapper subjectFollowManagementMapper;
@Override
public Long createSubjectFollowManagement(SubjectFollowManagementCreateReqVO createReqVO) {
// 插入
SubjectFollowManagementDO subjectFollowManagement = SubjectFollowManagementConvert.INSTANCE.convert(createReqVO);
subjectFollowManagementMapper.insert(subjectFollowManagement);
// 返回
return subjectFollowManagement.getId();
}
@Override
public void updateSubjectFollowManagement(SubjectFollowManagementUpdateReqVO updateReqVO) {
// 校验存在
validateSubjectFollowManagementExists(updateReqVO.getId());
// 更新
SubjectFollowManagementDO updateObj = SubjectFollowManagementConvert.INSTANCE.convert(updateReqVO);
subjectFollowManagementMapper.updateById(updateObj);
}
@Override
public void deleteSubjectFollowManagement(Long id) {
// 校验存在
validateSubjectFollowManagementExists(id);
// 删除
subjectFollowManagementMapper.deleteById(id);
}
private void validateSubjectFollowManagementExists(Long id) {
if (subjectFollowManagementMapper.selectById(id) == null) {
throw exception(SUBJECT_FOLLOW_MANAGEMENT_NOT_EXISTS);
}
}
@Override
public SubjectFollowManagementDO getSubjectFollowManagement(Long id) {
return subjectFollowManagementMapper.selectById(id);
}
@Override
public List<SubjectFollowManagementDO> getSubjectFollowManagementList(Collection<Long> ids) {
return subjectFollowManagementMapper.selectBatchIds(ids);
}
@Override
public PageResult<SubjectFollowManagementDO> getSubjectFollowManagementPage(SubjectFollowManagementPageReqVO pageReqVO) {
return subjectFollowManagementMapper.selectPage(pageReqVO);
}
@Override
public List<SubjectFollowManagementDO> getSubjectFollowManagementList(SubjectFollowManagementExportReqVO exportReqVO) {
return subjectFollowManagementMapper.selectList(exportReqVO);
}
}

@ -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="com.yunxi.scm.module.xxjj.dal.mysql.subjectfollowmanagement.SubjectFollowManagementMapper">
<!--
一般情况下,尽可能使用 Mapper 进行 CRUD 增删改查即可。
无法满足的场景,例如说多表关联查询,才使用 XML 编写 SQL。
代码生成器暂时只生成 Mapper XML 文件本身,更多推荐 MybatisX 快速开发插件来生成查询。
文档可见https://www.iocoder.cn/MyBatis/x-plugins/
-->
</mapper>

@ -0,0 +1,255 @@
package com.yunxi.scm.module.xxjj.service.subjectfollowmanagement;
import org.junit.jupiter.api.Disabled;
import org.junit.jupiter.api.Test;
import org.springframework.boot.test.mock.mockito.MockBean;
import javax.annotation.Resource;
import com.yunxi.scm.framework.test.core.ut.BaseDbUnitTest;
import com.yunxi.scm.module.xxjj.controller.admin.subjectfollowmanagement.vo.*;
import com.yunxi.scm.module.xxjj.dal.dataobject.subjectfollowmanagement.SubjectFollowManagementDO;
import com.yunxi.scm.module.xxjj.dal.mysql.subjectfollowmanagement.SubjectFollowManagementMapper;
import com.yunxi.scm.framework.common.pojo.PageResult;
import javax.annotation.Resource;
import org.springframework.context.annotation.Import;
import java.util.*;
import java.time.LocalDateTime;
import static cn.hutool.core.util.RandomUtil.*;
import static com.yunxi.scm.module.xxjj.enums.ErrorCodeConstants.*;
import static com.yunxi.scm.framework.test.core.util.AssertUtils.*;
import static com.yunxi.scm.framework.test.core.util.RandomUtils.*;
import static com.yunxi.scm.framework.common.util.date.LocalDateTimeUtils.*;
import static com.yunxi.scm.framework.common.util.object.ObjectUtils.*;
import static com.yunxi.scm.framework.common.util.date.DateUtils.*;
import static org.junit.jupiter.api.Assertions.*;
import static org.mockito.Mockito.*;
/**
* {@link SubjectFollowManagementServiceImpl}
*
* @author
*/
@Import(SubjectFollowManagementServiceImpl.class)
public class SubjectFollowManagementServiceImplTest extends BaseDbUnitTest {
@Resource
private SubjectFollowManagementServiceImpl subjectFollowManagementService;
@Resource
private SubjectFollowManagementMapper subjectFollowManagementMapper;
@Test
public void testCreateSubjectFollowManagement_success() {
// 准备参数
SubjectFollowManagementCreateReqVO reqVO = randomPojo(SubjectFollowManagementCreateReqVO.class);
// 调用
Long subjectFollowManagementId = subjectFollowManagementService.createSubjectFollowManagement(reqVO);
// 断言
assertNotNull(subjectFollowManagementId);
// 校验记录的属性是否正确
SubjectFollowManagementDO subjectFollowManagement = subjectFollowManagementMapper.selectById(subjectFollowManagementId);
assertPojoEquals(reqVO, subjectFollowManagement);
}
@Test
public void testUpdateSubjectFollowManagement_success() {
// mock 数据
SubjectFollowManagementDO dbSubjectFollowManagement = randomPojo(SubjectFollowManagementDO.class);
subjectFollowManagementMapper.insert(dbSubjectFollowManagement);// @Sql: 先插入出一条存在的数据
// 准备参数
SubjectFollowManagementUpdateReqVO reqVO = randomPojo(SubjectFollowManagementUpdateReqVO.class, o -> {
o.setId(dbSubjectFollowManagement.getId()); // 设置更新的 ID
});
// 调用
subjectFollowManagementService.updateSubjectFollowManagement(reqVO);
// 校验是否更新正确
SubjectFollowManagementDO subjectFollowManagement = subjectFollowManagementMapper.selectById(reqVO.getId()); // 获取最新的
assertPojoEquals(reqVO, subjectFollowManagement);
}
@Test
public void testUpdateSubjectFollowManagement_notExists() {
// 准备参数
SubjectFollowManagementUpdateReqVO reqVO = randomPojo(SubjectFollowManagementUpdateReqVO.class);
// 调用, 并断言异常
assertServiceException(() -> subjectFollowManagementService.updateSubjectFollowManagement(reqVO), SUBJECT_FOLLOW_MANAGEMENT_NOT_EXISTS);
}
@Test
public void testDeleteSubjectFollowManagement_success() {
// mock 数据
SubjectFollowManagementDO dbSubjectFollowManagement = randomPojo(SubjectFollowManagementDO.class);
subjectFollowManagementMapper.insert(dbSubjectFollowManagement);// @Sql: 先插入出一条存在的数据
// 准备参数
Long id = dbSubjectFollowManagement.getId();
// 调用
subjectFollowManagementService.deleteSubjectFollowManagement(id);
// 校验数据不存在了
assertNull(subjectFollowManagementMapper.selectById(id));
}
@Test
public void testDeleteSubjectFollowManagement_notExists() {
// 准备参数
Long id = randomLongId();
// 调用, 并断言异常
assertServiceException(() -> subjectFollowManagementService.deleteSubjectFollowManagement(id), SUBJECT_FOLLOW_MANAGEMENT_NOT_EXISTS);
}
@Test
@Disabled // TODO 请修改 null 为需要的值,然后删除 @Disabled 注解
public void testGetSubjectFollowManagementPage() {
// mock 数据
SubjectFollowManagementDO dbSubjectFollowManagement = randomPojo(SubjectFollowManagementDO.class, o -> { // 等会查询到
o.setBusinessId(null);
o.setBusinessType(null);
o.setTitle(null);
o.setIdCard(null);
o.setStartTime(null);
o.setEndTime(null);
o.setResponsible(null);
o.setPartake(null);
o.setMark(null);
o.setUrgency(null);
o.setRemindType(null);
o.setDescription(null);
o.setAnnex(null);
o.setCreateTime(null);
});
subjectFollowManagementMapper.insert(dbSubjectFollowManagement);
// 测试 businessId 不匹配
subjectFollowManagementMapper.insert(cloneIgnoreId(dbSubjectFollowManagement, o -> o.setBusinessId(null)));
// 测试 businessType 不匹配
subjectFollowManagementMapper.insert(cloneIgnoreId(dbSubjectFollowManagement, o -> o.setBusinessType(null)));
// 测试 title 不匹配
subjectFollowManagementMapper.insert(cloneIgnoreId(dbSubjectFollowManagement, o -> o.setTitle(null)));
// 测试 idCard 不匹配
subjectFollowManagementMapper.insert(cloneIgnoreId(dbSubjectFollowManagement, o -> o.setIdCard(null)));
// 测试 startTime 不匹配
subjectFollowManagementMapper.insert(cloneIgnoreId(dbSubjectFollowManagement, o -> o.setStartTime(null)));
// 测试 endTime 不匹配
subjectFollowManagementMapper.insert(cloneIgnoreId(dbSubjectFollowManagement, o -> o.setEndTime(null)));
// 测试 responsible 不匹配
subjectFollowManagementMapper.insert(cloneIgnoreId(dbSubjectFollowManagement, o -> o.setResponsible(null)));
// 测试 partake 不匹配
subjectFollowManagementMapper.insert(cloneIgnoreId(dbSubjectFollowManagement, o -> o.setPartake(null)));
// 测试 mark 不匹配
subjectFollowManagementMapper.insert(cloneIgnoreId(dbSubjectFollowManagement, o -> o.setMark(null)));
// 测试 urgency 不匹配
subjectFollowManagementMapper.insert(cloneIgnoreId(dbSubjectFollowManagement, o -> o.setUrgency(null)));
// 测试 remindType 不匹配
subjectFollowManagementMapper.insert(cloneIgnoreId(dbSubjectFollowManagement, o -> o.setRemindType(null)));
// 测试 description 不匹配
subjectFollowManagementMapper.insert(cloneIgnoreId(dbSubjectFollowManagement, o -> o.setDescription(null)));
// 测试 annex 不匹配
subjectFollowManagementMapper.insert(cloneIgnoreId(dbSubjectFollowManagement, o -> o.setAnnex(null)));
// 测试 createTime 不匹配
subjectFollowManagementMapper.insert(cloneIgnoreId(dbSubjectFollowManagement, o -> o.setCreateTime(null)));
// 准备参数
SubjectFollowManagementPageReqVO reqVO = new SubjectFollowManagementPageReqVO();
reqVO.setBusinessId(null);
reqVO.setBusinessType(null);
reqVO.setTitle(null);
reqVO.setIdCard(null);
reqVO.setStartTime(buildBetweenTime(2023, 2, 1, 2023, 2, 28));
reqVO.setEndTime(buildBetweenTime(2023, 2, 1, 2023, 2, 28));
reqVO.setResponsible(null);
reqVO.setPartake(null);
reqVO.setMark(null);
reqVO.setUrgency(null);
reqVO.setRemindType(null);
reqVO.setDescription(null);
reqVO.setAnnex(null);
reqVO.setCreateTime(buildBetweenTime(2023, 2, 1, 2023, 2, 28));
// 调用
PageResult<SubjectFollowManagementDO> pageResult = subjectFollowManagementService.getSubjectFollowManagementPage(reqVO);
// 断言
assertEquals(1, pageResult.getTotal());
assertEquals(1, pageResult.getList().size());
assertPojoEquals(dbSubjectFollowManagement, pageResult.getList().get(0));
}
@Test
@Disabled // TODO 请修改 null 为需要的值,然后删除 @Disabled 注解
public void testGetSubjectFollowManagementList() {
// mock 数据
SubjectFollowManagementDO dbSubjectFollowManagement = randomPojo(SubjectFollowManagementDO.class, o -> { // 等会查询到
o.setBusinessId(null);
o.setBusinessType(null);
o.setTitle(null);
o.setIdCard(null);
o.setStartTime(null);
o.setEndTime(null);
o.setResponsible(null);
o.setPartake(null);
o.setMark(null);
o.setUrgency(null);
o.setRemindType(null);
o.setDescription(null);
o.setAnnex(null);
o.setCreateTime(null);
});
subjectFollowManagementMapper.insert(dbSubjectFollowManagement);
// 测试 businessId 不匹配
subjectFollowManagementMapper.insert(cloneIgnoreId(dbSubjectFollowManagement, o -> o.setBusinessId(null)));
// 测试 businessType 不匹配
subjectFollowManagementMapper.insert(cloneIgnoreId(dbSubjectFollowManagement, o -> o.setBusinessType(null)));
// 测试 title 不匹配
subjectFollowManagementMapper.insert(cloneIgnoreId(dbSubjectFollowManagement, o -> o.setTitle(null)));
// 测试 idCard 不匹配
subjectFollowManagementMapper.insert(cloneIgnoreId(dbSubjectFollowManagement, o -> o.setIdCard(null)));
// 测试 startTime 不匹配
subjectFollowManagementMapper.insert(cloneIgnoreId(dbSubjectFollowManagement, o -> o.setStartTime(null)));
// 测试 endTime 不匹配
subjectFollowManagementMapper.insert(cloneIgnoreId(dbSubjectFollowManagement, o -> o.setEndTime(null)));
// 测试 responsible 不匹配
subjectFollowManagementMapper.insert(cloneIgnoreId(dbSubjectFollowManagement, o -> o.setResponsible(null)));
// 测试 partake 不匹配
subjectFollowManagementMapper.insert(cloneIgnoreId(dbSubjectFollowManagement, o -> o.setPartake(null)));
// 测试 mark 不匹配
subjectFollowManagementMapper.insert(cloneIgnoreId(dbSubjectFollowManagement, o -> o.setMark(null)));
// 测试 urgency 不匹配
subjectFollowManagementMapper.insert(cloneIgnoreId(dbSubjectFollowManagement, o -> o.setUrgency(null)));
// 测试 remindType 不匹配
subjectFollowManagementMapper.insert(cloneIgnoreId(dbSubjectFollowManagement, o -> o.setRemindType(null)));
// 测试 description 不匹配
subjectFollowManagementMapper.insert(cloneIgnoreId(dbSubjectFollowManagement, o -> o.setDescription(null)));
// 测试 annex 不匹配
subjectFollowManagementMapper.insert(cloneIgnoreId(dbSubjectFollowManagement, o -> o.setAnnex(null)));
// 测试 createTime 不匹配
subjectFollowManagementMapper.insert(cloneIgnoreId(dbSubjectFollowManagement, o -> o.setCreateTime(null)));
// 准备参数
SubjectFollowManagementExportReqVO reqVO = new SubjectFollowManagementExportReqVO();
reqVO.setBusinessId(null);
reqVO.setBusinessType(null);
reqVO.setTitle(null);
reqVO.setIdCard(null);
reqVO.setStartTime(buildBetweenTime(2023, 2, 1, 2023, 2, 28));
reqVO.setEndTime(buildBetweenTime(2023, 2, 1, 2023, 2, 28));
reqVO.setResponsible(null);
reqVO.setPartake(null);
reqVO.setMark(null);
reqVO.setUrgency(null);
reqVO.setRemindType(null);
reqVO.setDescription(null);
reqVO.setAnnex(null);
reqVO.setCreateTime(buildBetweenTime(2023, 2, 1, 2023, 2, 28));
// 调用
List<SubjectFollowManagementDO> list = subjectFollowManagementService.getSubjectFollowManagementList(reqVO);
// 断言
assertEquals(1, list.size());
assertPojoEquals(dbSubjectFollowManagement, list.get(0));
}
}

@ -0,0 +1,31 @@
import { defHttp } from '@/utils/http/axios'
// 查询主体跟进管理列表
export function getSubjectFollowManagementPage(params) {
return defHttp.get({ url: '/xxjj/subject-follow-management/page', params })
}
// 查询主体跟进管理详情
export function getSubjectFollowManagement(id: number) {
return defHttp.get({ url: '/xxjj/subject-follow-management/get?id=' + id })
}
// 新增主体跟进管理
export function createSubjectFollowManagement(data) {
return defHttp.post({ url: '/xxjj/subject-follow-management/create', data })
}
// 修改主体跟进管理
export function updateSubjectFollowManagement(data) {
return defHttp.put({ url: '/xxjj/subject-follow-management/update', data })
}
// 删除主体跟进管理
export function deleteSubjectFollowManagement(id: number) {
return defHttp.delete({ url: '/xxjj/subject-follow-management/delete?id=' + id })
}
// 导出主体跟进管理 Excel
export function exportSubjectFollowManagement(params) {
return defHttp.download({ url: '/xxjj/subject-follow-management/export-excel', params }, '主体跟进管理.xls')
}

@ -0,0 +1,57 @@
<template>
<BasicModal v-bind="$attrs" @register="registerModal" :title="isUpdate ? t('action.edit') : t('action.create')" @ok="handleSubmit">
<BasicForm @register="registerForm" />
</BasicModal>
</template>
<script lang="ts" setup>
import { ref, unref } from 'vue'
import { useI18n } from '@/hooks/web/useI18n'
import { useMessage } from '@/hooks/web/useMessage'
import { BasicForm, useForm } from '@/components/Form'
import { BasicModal, useModalInner } from '@/components/Modal'
import { createFormSchema, updateFormSchema } from './subjectFollowManagement.data'
import { createSubjectFollowManagement, getSubjectFollowManagement, updateSubjectFollowManagement } from '@/api/xxjj/subjectFollowManagement'
defineOptions({ name: 'SubjectFollowManagementModal' })
const { t } = useI18n()
const { createMessage } = useMessage()
const emit = defineEmits(['success', 'register'])
const isUpdate = ref(true)
const [registerForm, { setFieldsValue, resetFields, resetSchema, validate }] = useForm({
labelWidth: 120,
baseColProps: { span: 24 },
schemas: createFormSchema,
showActionButtonGroup: false,
actionColOptions: { span: 23 }
})
const [registerModal, { setModalProps, closeModal }] = useModalInner(async (data) => {
resetFields()
setModalProps({ confirmLoading: false })
isUpdate.value = !!data?.isUpdate
if (unref(isUpdate)) {
resetSchema(updateFormSchema)
const res = await getSubjectFollowManagement(data.record.id)
setFieldsValue({ ...res })
}
})
async function handleSubmit() {
try {
const values = await validate()
setModalProps({ confirmLoading: true })
if (unref(isUpdate)) {
await updateSubjectFollowManagement(values)
} else {
await createSubjectFollowManagement(values)
}
closeModal()
emit('success')
createMessage.success(t('common.saveSuccessText'))
} finally {
setModalProps({ confirmLoading: false })
}
}
</script>

@ -0,0 +1,92 @@
<template>
<div>
<BasicTable @register="registerTable">
<template #toolbar>
<a-button type="primary" v-auth="['xxjj:subject-follow-management:create']" :preIcon="IconEnum.ADD" @click="handleCreate">
{{ t('action.create') }}
</a-button>
<a-button type="warning" v-auth="['xxjj:subject-follow-management:export']" :preIcon="IconEnum.EXPORT" @click="handleExport">
{{ t('action.export') }}
</a-button>
</template>
<template #bodyCell="{ column, record }">
<template v-if="column.key === 'action'">
<TableAction
:actions="[
{ icon: IconEnum.EDIT, label: t('action.edit'), auth: 'xxjj:subject-follow-management:update', onClick: handleEdit.bind(null, record) },
{
icon: IconEnum.DELETE,
color: 'error',
label: t('action.delete'),
auth: 'xxjj:subject-follow-management:delete',
popConfirm: {
title: t('common.delMessage'),
placement: 'left',
confirm: handleDelete.bind(null, record)
}
}
]"
/>
</template>
</template>
</BasicTable>
<SubjectFollowManagementModal @register="registerModal" @success="reload()" />
</div>
</template>
<script lang="ts" setup>
import { useI18n } from '@/hooks/web/useI18n'
import { useMessage } from '@/hooks/web/useMessage'
import { useModal } from '@/components/Modal'
import SubjectFollowManagementModal from './SubjectFollowManagementModal.vue'
import { IconEnum } from '@/enums/appEnum'
import { BasicTable, useTable, TableAction } from '@/components/Table'
import { deleteSubjectFollowManagement, exportSubjectFollowManagement, getSubjectFollowManagementPage } from '@/api/xxjj/subjectFollowManagement'
import { columns, searchFormSchema } from './subjectFollowManagement.data'
defineOptions({ name: 'SubjectFollowManagement' })
const { t } = useI18n()
const { createConfirm, createMessage } = useMessage()
const [registerModal, { openModal }] = useModal()
const [registerTable, { getForm, reload }] = useTable({
title: '客户跟进',
api: getSubjectFollowManagementPage,
columns,
formConfig: { labelWidth: 120, schemas: searchFormSchema },
useSearchForm: true,
showTableSetting: true,
actionColumn: {
width: 140,
title: t('common.action'),
dataIndex: 'action',
fixed: 'right'
}
})
function handleCreate() {
openModal(true, { isUpdate: false })
}
function handleEdit(record: Recordable) {
openModal(true, { record, isUpdate: true })
}
async function handleExport() {
createConfirm({
title: t('common.exportTitle'),
iconType: 'warning',
content: t('common.exportMessage'),
async onOk() {
await exportSubjectFollowManagement(getForm().getFieldsValue())
createMessage.success(t('common.exportSuccessText'))
}
})
}
async function handleDelete(record: Recordable) {
await deleteSubjectFollowManagement(record.id)
createMessage.success(t('common.delSuccessText'))
reload()
}
</script>

@ -0,0 +1,397 @@
import { BasicColumn, FormSchema, useRender } from '@/components/Table'
import { DICT_TYPE, getDictOptions } from '@/utils/dict'
import { getListSimpleUsers } from '@/api/system/user'
export const columns: BasicColumn[] = [
{
title: '主键id',
dataIndex: 'id',
width: 160
},
{
title: '业务id',
dataIndex: 'businessId',
width: 160
},
{
title: '代表人类型(0客户 1供应商 2服务商)',
dataIndex: 'businessType',
width: 160
},
{
title: '任务标题',
dataIndex: 'title',
width: 160
},
{
title: '身份证号',
dataIndex: 'idCard',
width: 160
},
{
title: '开始时间',
dataIndex: 'startTime',
width: 180,
customRender: ({ text }) => {
return useRender.renderDate(text)
}
},
{
title: '结束时间',
dataIndex: 'endTime',
width: 180,
customRender: ({ text }) => {
return useRender.renderDate(text)
}
},
{
title: '负责人员',
dataIndex: 'responsible',
width: 160
},
{
title: '参与人员',
dataIndex: 'partake',
width: 160
},
{
title: '标记颜色',
dataIndex: 'mark',
width: 160
},
{
title: '紧要程度(0重要 1紧急 2普通 3较低)',
dataIndex: 'urgency',
width: 160
},
{
title: '提醒类型(0准时提醒 1提前5分钟 2提前15分钟 3提前30分钟 4提前1小时)',
dataIndex: 'remindType',
width: 160
},
{
title: '任务描述',
dataIndex: 'description',
width: 160
},
{
title: '附件',
dataIndex: 'annex',
width: 160
},
{
title: '创建时间',
dataIndex: 'createTime',
width: 180,
customRender: ({ text }) => {
return useRender.renderDate(text)
}
},
]
export const searchFormSchema: FormSchema[] = [
/* {
label: '业务id',
field: 'businessId',
component: 'Input',
colProps: { span: 4 }
}, */
{
label: '代表人类型',
field: 'businessType',
component: 'Select',
componentProps: {
options: [],
hidden: true,
},
defaultValue: '0',
show: false,
colProps: { span: 4 }
},
{
label: '任务标题',
field: 'title',
component: 'Input',
colProps: { span: 4 }
},
{
label: '客户分类',
field: 'calssify',
component: 'Select',
componentProps: {
options: getDictOptions(DICT_TYPE.CUSTOMER_CALSSIFY)
},
colProps: { span: 4 }
},
{
label: '行业分类',
field: 'industryClassify',
component: 'Select',
componentProps: {
options: getDictOptions(DICT_TYPE.industryClassify)
},
colProps: { span: 4 }
},
{
label: '企业性质',
field: 'enterpriseNature',
component: 'Select',
componentProps: {
options: getDictOptions(DICT_TYPE.enterpriseNature)
},
colProps: { span: 4 }
},
/* {
label: '身份证号',
field: 'idCard',
component: 'Input',
colProps: { span: 4 }
},
{
label: '开始时间',
field: 'startTime',
component: 'RangePicker',
colProps: { span: 4 }
},
{
label: '结束时间',
field: 'endTime',
component: 'RangePicker',
colProps: { span: 4 }
},
{
label: '负责人员',
field: 'responsible',
component: 'Input',
colProps: { span: 4 }
},
{
label: '参与人员',
field: 'partake',
component: 'Input',
colProps: { span: 4 }
},
{
label: '标记颜色',
field: 'mark',
component: 'Input',
colProps: { span: 4 }
},
{
label: '紧要程度(0重要 1紧急 2普通 3较低)',
field: 'urgency',
component: 'Input',
colProps: { span: 4 }
},
{
label: '提醒类型(0准时提醒 1提前5分钟 2提前15分钟 3提前30分钟 4提前1小时)',
field: 'remindType',
component: 'Select',
componentProps: {
options: []
},
colProps: { span: 4 }
},
{
label: '任务描述',
field: 'description',
colProps: { span: 4 }
},
{
label: '附件',
field: 'annex',
colProps: { span: 4 }
},
{
label: '创建时间',
field: 'createTime',
component: 'RangePicker',
colProps: { span: 4 }
}, */
]
export const createFormSchema: FormSchema[] = [
{
label: '编号',
field: 'id',
show: false,
component: 'Input'
},
{
label: '代表人类型(0客户 1供应商 2服务商)',
field: 'businessType',
component: 'Select',
defaultValue: '0',
show: false,
componentProps: {
options:[]
}
},
{
label: '任务标题',
field: 'title',
required: true,
component: 'Input'
},
{
label: '开始时间',
field: 'startTime',
required: true,
component: 'DatePicker',
componentProps: {
showTime: true,
format: 'YYYY-MM-DD HH:mm:ss',
valueFormat: 'x',
},
},
{
label: '结束时间',
field: 'endTime',
required: true,
component: 'DatePicker',
componentProps: {
showTime: true,
format: 'YYYY-MM-DD HH:mm:ss',
valueFormat: 'x',
},
},
{
label: '关联客户',
field: 'businessId',
required: true,
component: 'ApiTreeSelect',
componentProps: {
api: () => getListSimpleUsers(),
parentLabel: '主类目',
fieldNames: {
label: 'name',
key: 'id',
value: 'id',
},
handleTree: 'id',
},
},
{
label: '负责人员',
field: 'responsible',
component: 'Input'
},
{
label: '参与人员',
field: 'partake',
component: 'Input'
},
{
label: '标记颜色',
field: 'mark',
component: 'Input'
},
{
label: '紧要程度(0重要 1紧急 2普通 3较低)',
field: 'urgency',
component: 'Input'
},
{
label: '提醒类型(0准时提醒 1提前5分钟 2提前15分钟 3提前30分钟 4提前1小时)',
field: 'remindType',
component: 'Select',
componentProps: {
options:[]
}
},
{
label: '任务描述',
field: 'description',
component: 'InputTextArea'
},
{
label: '附件',
field: 'annex',
component: 'FileUpload',
componentProps: {
fileType: 'image',
maxCount: 1
}
},
]
export const updateFormSchema: FormSchema[] = [
{
label: '编号',
field: 'id',
show: false,
component: 'Input'
},
{
label: '业务id',
field: 'businessId',
required: true,
component: 'Input'
},
{
label: '代表人类型(0客户 1供应商 2服务商)',
field: 'businessType',
component: 'Select',
componentProps: {
options:[]
}
},
{
label: '任务标题',
field: 'title',
component: 'Input'
},
{
label: '身份证号',
field: 'idCard',
component: 'Input'
},
{
label: '开始时间',
field: 'startTime',
component: 'DatePicker'
},
{
label: '结束时间',
field: 'endTime',
component: 'DatePicker'
},
{
label: '负责人员',
field: 'responsible',
component: 'Input'
},
{
label: '参与人员',
field: 'partake',
component: 'Input'
},
{
label: '标记颜色',
field: 'mark',
component: 'Input'
},
{
label: '紧要程度(0重要 1紧急 2普通 3较低)',
field: 'urgency',
component: 'Input'
},
{
label: '提醒类型(0准时提醒 1提前5分钟 2提前15分钟 3提前30分钟 4提前1小时)',
field: 'remindType',
component: 'Select',
componentProps: {
options:[]
}
},
{
label: '任务描述',
field: 'description',
component: 'InputTextArea'
},
{
label: '附件',
field: 'annex',
component: 'Upload'
},
]
Loading…
Cancel
Save