Explorar o código

fix 资料审核

he2802 %!s(int64=4) %!d(string=hai) anos
pai
achega
1932ad839d
Modificáronse 29 ficheiros con 1394 adicións e 0 borrados
  1. 112 0
      zhongzheng-admin/src/main/java/com/zhongzheng/controller/base/ProfileFieldController.java
  2. 112 0
      zhongzheng-admin/src/main/java/com/zhongzheng/controller/base/ProfileTpController.java
  3. 36 0
      zhongzheng-system/src/main/java/com/zhongzheng/modules/base/bo/ProfileFieldAddBo.java
  4. 41 0
      zhongzheng-system/src/main/java/com/zhongzheng/modules/base/bo/ProfileFieldEditBo.java
  5. 48 0
      zhongzheng-system/src/main/java/com/zhongzheng/modules/base/bo/ProfileFieldQueryBo.java
  6. 39 0
      zhongzheng-system/src/main/java/com/zhongzheng/modules/base/bo/ProfileTpAddBo.java
  7. 33 0
      zhongzheng-system/src/main/java/com/zhongzheng/modules/base/bo/ProfileTpBusinessAddBo.java
  8. 41 0
      zhongzheng-system/src/main/java/com/zhongzheng/modules/base/bo/ProfileTpBusinessEditBo.java
  9. 51 0
      zhongzheng-system/src/main/java/com/zhongzheng/modules/base/bo/ProfileTpBusinessQueryBo.java
  10. 45 0
      zhongzheng-system/src/main/java/com/zhongzheng/modules/base/bo/ProfileTpEditBo.java
  11. 48 0
      zhongzheng-system/src/main/java/com/zhongzheng/modules/base/bo/ProfileTpQueryBo.java
  12. 41 0
      zhongzheng-system/src/main/java/com/zhongzheng/modules/base/domain/ProfileField.java
  13. 41 0
      zhongzheng-system/src/main/java/com/zhongzheng/modules/base/domain/ProfileTp.java
  14. 37 0
      zhongzheng-system/src/main/java/com/zhongzheng/modules/base/domain/ProfileTpBusiness.java
  15. 14 0
      zhongzheng-system/src/main/java/com/zhongzheng/modules/base/mapper/ProfileFieldMapper.java
  16. 14 0
      zhongzheng-system/src/main/java/com/zhongzheng/modules/base/mapper/ProfileTpBusinessMapper.java
  17. 14 0
      zhongzheng-system/src/main/java/com/zhongzheng/modules/base/mapper/ProfileTpMapper.java
  18. 52 0
      zhongzheng-system/src/main/java/com/zhongzheng/modules/base/service/IProfileFieldService.java
  19. 52 0
      zhongzheng-system/src/main/java/com/zhongzheng/modules/base/service/IProfileTpBusinessService.java
  20. 52 0
      zhongzheng-system/src/main/java/com/zhongzheng/modules/base/service/IProfileTpService.java
  21. 101 0
      zhongzheng-system/src/main/java/com/zhongzheng/modules/base/service/impl/ProfileFieldServiceImpl.java
  22. 99 0
      zhongzheng-system/src/main/java/com/zhongzheng/modules/base/service/impl/ProfileTpBusinessServiceImpl.java
  23. 100 0
      zhongzheng-system/src/main/java/com/zhongzheng/modules/base/service/impl/ProfileTpServiceImpl.java
  24. 39 0
      zhongzheng-system/src/main/java/com/zhongzheng/modules/base/vo/ProfileFieldVo.java
  25. 43 0
      zhongzheng-system/src/main/java/com/zhongzheng/modules/base/vo/ProfileTpBusinessVo.java
  26. 39 0
      zhongzheng-system/src/main/java/com/zhongzheng/modules/base/vo/ProfileTpVo.java
  27. 17 0
      zhongzheng-system/src/main/resources/mapper/modules/base/ProfileFieldMapper.xml
  28. 16 0
      zhongzheng-system/src/main/resources/mapper/modules/base/ProfileTpBusinessMapper.xml
  29. 17 0
      zhongzheng-system/src/main/resources/mapper/modules/base/ProfileTpMapper.xml

+ 112 - 0
zhongzheng-admin/src/main/java/com/zhongzheng/controller/base/ProfileFieldController.java

@@ -0,0 +1,112 @@
+package com.zhongzheng.controller.base;
+
+import java.util.List;
+import java.util.Arrays;
+
+import com.zhongzheng.modules.base.bo.ProfileFieldAddBo;
+import com.zhongzheng.modules.base.bo.ProfileFieldEditBo;
+import com.zhongzheng.modules.base.bo.ProfileFieldQueryBo;
+import com.zhongzheng.modules.base.service.IProfileFieldService;
+import com.zhongzheng.modules.base.vo.ProfileFieldVo;
+import lombok.RequiredArgsConstructor;
+import org.springframework.security.access.prepost.PreAuthorize;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.PutMapping;
+import org.springframework.web.bind.annotation.DeleteMapping;
+import org.springframework.web.bind.annotation.PathVariable;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+import com.zhongzheng.common.annotation.Log;
+import com.zhongzheng.common.core.controller.BaseController;
+import com.zhongzheng.common.core.domain.AjaxResult;
+import com.zhongzheng.common.enums.BusinessType;
+import com.zhongzheng.common.utils.poi.ExcelUtil;
+import com.zhongzheng.common.core.page.TableDataInfo;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+
+/**
+ * 资料字段Controller
+ *
+ * @author hjl
+ * @date 2021-11-19
+ */
+@Api(value = "资料字段控制器", tags = {"资料字段管理"})
+@RequiredArgsConstructor(onConstructor_ = @Autowired)
+@RestController
+@RequestMapping("/base/profile/field")
+public class ProfileFieldController extends BaseController {
+
+    private final IProfileFieldService iProfileFieldService;
+
+    /**
+     * 查询资料字段列表
+     */
+    @ApiOperation("查询资料字段列表")
+    @PreAuthorize("@ss.hasPermi('system:field:list')")
+    @GetMapping("/list")
+    public TableDataInfo<ProfileFieldVo> list(ProfileFieldQueryBo bo) {
+        startPage();
+        List<ProfileFieldVo> list = iProfileFieldService.queryList(bo);
+        return getDataTable(list);
+    }
+
+    /**
+     * 导出资料字段列表
+     */
+  /*  @ApiOperation("导出资料字段列表")
+    @PreAuthorize("@ss.hasPermi('system:field:export')")
+    @Log(title = "资料字段", businessType = BusinessType.EXPORT)
+    @GetMapping("/export")
+    public AjaxResult<ProfileFieldVo> export(ProfileFieldQueryBo bo) {
+        List<ProfileFieldVo> list = iProfileFieldService.queryList(bo);
+        ExcelUtil<ProfileFieldVo> util = new ExcelUtil<ProfileFieldVo>(ProfileFieldVo.class);
+        return util.exportExcel(list, "资料字段");
+    }*/
+
+    /**
+     * 获取资料字段详细信息
+     */
+    @ApiOperation("获取资料字段详细信息")
+    @PreAuthorize("@ss.hasPermi('system:field:query')")
+    @GetMapping("/{fieldId}")
+    public AjaxResult<ProfileFieldVo> getInfo(@PathVariable("fieldId" ) Long fieldId) {
+        return AjaxResult.success(iProfileFieldService.queryById(fieldId));
+    }
+
+    /**
+     * 新增资料字段
+     */
+    /*@ApiOperation("新增资料字段")
+    @PreAuthorize("@ss.hasPermi('system:field:add')")
+    @Log(title = "资料字段", businessType = BusinessType.INSERT)
+    @PostMapping()
+    public AjaxResult<Void> add(@RequestBody ProfileFieldAddBo bo) {
+        return toAjax(iProfileFieldService.insertByAddBo(bo) ? 1 : 0);
+    }*/
+
+    /**
+     * 修改资料字段
+     */
+   /* @ApiOperation("修改资料字段")
+    @PreAuthorize("@ss.hasPermi('system:field:edit')")
+    @Log(title = "资料字段", businessType = BusinessType.UPDATE)
+    @PutMapping()
+    public AjaxResult<Void> edit(@RequestBody ProfileFieldEditBo bo) {
+        return toAjax(iProfileFieldService.updateByEditBo(bo) ? 1 : 0);
+    }*/
+
+    /**
+     * 删除资料字段
+     */
+    /*@ApiOperation("删除资料字段")
+    @PreAuthorize("@ss.hasPermi('system:field:remove')")
+    @Log(title = "资料字段" , businessType = BusinessType.DELETE)
+    @DeleteMapping("/{fieldIds}")
+    public AjaxResult<Void> remove(@PathVariable Long[] fieldIds) {
+        return toAjax(iProfileFieldService.deleteWithValidByIds(Arrays.asList(fieldIds), true) ? 1 : 0);
+    }*/
+}

+ 112 - 0
zhongzheng-admin/src/main/java/com/zhongzheng/controller/base/ProfileTpController.java

@@ -0,0 +1,112 @@
+package com.zhongzheng.controller.base;
+
+import java.util.List;
+import java.util.Arrays;
+
+import com.zhongzheng.modules.base.bo.ProfileTpAddBo;
+import com.zhongzheng.modules.base.bo.ProfileTpEditBo;
+import com.zhongzheng.modules.base.bo.ProfileTpQueryBo;
+import com.zhongzheng.modules.base.service.IProfileTpService;
+import com.zhongzheng.modules.base.vo.ProfileTpVo;
+import lombok.RequiredArgsConstructor;
+import org.springframework.security.access.prepost.PreAuthorize;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.PutMapping;
+import org.springframework.web.bind.annotation.DeleteMapping;
+import org.springframework.web.bind.annotation.PathVariable;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+import com.zhongzheng.common.annotation.Log;
+import com.zhongzheng.common.core.controller.BaseController;
+import com.zhongzheng.common.core.domain.AjaxResult;
+import com.zhongzheng.common.enums.BusinessType;
+import com.zhongzheng.common.utils.poi.ExcelUtil;
+import com.zhongzheng.common.core.page.TableDataInfo;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+
+/**
+ * 资料模板Controller
+ *
+ * @author hjl
+ * @date 2021-11-19
+ */
+@Api(value = "资料模板控制器", tags = {"资料模板管理"})
+@RequiredArgsConstructor(onConstructor_ = @Autowired)
+@RestController
+@RequestMapping("/base/profile/tp")
+public class ProfileTpController extends BaseController {
+
+    private final IProfileTpService iProfileTpService;
+
+    /**
+     * 查询资料模板列表
+     */
+    @ApiOperation("查询资料模板列表")
+    @PreAuthorize("@ss.hasPermi('system:tp:list')")
+    @GetMapping("/list")
+    public TableDataInfo<ProfileTpVo> list(ProfileTpQueryBo bo) {
+        startPage();
+        List<ProfileTpVo> list = iProfileTpService.queryList(bo);
+        return getDataTable(list);
+    }
+
+    /**
+     * 导出资料模板列表
+     */
+   /* @ApiOperation("导出资料模板列表")
+    @PreAuthorize("@ss.hasPermi('system:tp:export')")
+    @Log(title = "资料模板", businessType = BusinessType.EXPORT)
+    @GetMapping("/export")
+    public AjaxResult<ProfileTpVo> export(ProfileTpQueryBo bo) {
+        List<ProfileTpVo> list = iProfileTpService.queryList(bo);
+        ExcelUtil<ProfileTpVo> util = new ExcelUtil<ProfileTpVo>(ProfileTpVo.class);
+        return util.exportExcel(list, "资料模板");
+    }*/
+
+    /**
+     * 获取资料模板详细信息
+     */
+    @ApiOperation("获取资料模板详细信息")
+    @PreAuthorize("@ss.hasPermi('system:tp:query')")
+    @GetMapping("/{profileTpId}")
+    public AjaxResult<ProfileTpVo> getInfo(@PathVariable("profileTpId" ) Long profileTpId) {
+        return AjaxResult.success(iProfileTpService.queryById(profileTpId));
+    }
+
+    /**
+     * 新增资料模板
+     */
+    @ApiOperation("新增资料模板")
+    @PreAuthorize("@ss.hasPermi('system:tp:add')")
+    @Log(title = "资料模板", businessType = BusinessType.INSERT)
+    @PostMapping()
+    public AjaxResult<Void> add(@RequestBody ProfileTpAddBo bo) {
+        return toAjax(iProfileTpService.insertByAddBo(bo) ? 1 : 0);
+    }
+
+    /**
+     * 修改资料模板
+     */
+    @ApiOperation("修改资料模板")
+    @PreAuthorize("@ss.hasPermi('system:tp:edit')")
+    @Log(title = "资料模板", businessType = BusinessType.UPDATE)
+    @PostMapping("/edit")
+    public AjaxResult<Void> edit(@RequestBody ProfileTpEditBo bo) {
+        return toAjax(iProfileTpService.updateByEditBo(bo) ? 1 : 0);
+    }
+
+    /**
+     * 删除资料模板
+     */
+   /* @ApiOperation("删除资料模板")
+    @PreAuthorize("@ss.hasPermi('system:tp:remove')")
+    @Log(title = "资料模板" , businessType = BusinessType.DELETE)
+    @DeleteMapping("/{profileTpIds}")
+    public AjaxResult<Void> remove(@PathVariable Long[] profileTpIds) {
+        return toAjax(iProfileTpService.deleteWithValidByIds(Arrays.asList(profileTpIds), true) ? 1 : 0);
+    }*/
+}

+ 36 - 0
zhongzheng-system/src/main/java/com/zhongzheng/modules/base/bo/ProfileFieldAddBo.java

@@ -0,0 +1,36 @@
+package com.zhongzheng.modules.base.bo;
+
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import com.fasterxml.jackson.annotation.JsonFormat;
+import lombok.Data;
+import java.util.Date;
+
+
+
+/**
+ * 资料字段添加对象 profile_field
+ *
+ * @author hjl
+ * @date 2021-11-19
+ */
+@Data
+@ApiModel("资料字段添加对象")
+public class ProfileFieldAddBo {
+
+    /** $column.columnComment */
+    @ApiModelProperty("$column.columnComment")
+    private String fieldName;
+    /** $column.columnComment */
+    @ApiModelProperty("$column.columnComment")
+    private String fieldKey;
+    /** 0 禁用 1启用 */
+    @ApiModelProperty("0 禁用 1启用")
+    private Integer status;
+    /** 添加时间 */
+    @ApiModelProperty("添加时间")
+    private Long createTime;
+    /** 修改时间 */
+    @ApiModelProperty("修改时间")
+    private Long updateTime;
+}

+ 41 - 0
zhongzheng-system/src/main/java/com/zhongzheng/modules/base/bo/ProfileFieldEditBo.java

@@ -0,0 +1,41 @@
+package com.zhongzheng.modules.base.bo;
+
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import com.fasterxml.jackson.annotation.JsonFormat;
+import lombok.Data;
+import java.util.Date;
+
+
+/**
+ * 资料字段编辑对象 profile_field
+ *
+ * @author hjl
+ * @date 2021-11-19
+ */
+@Data
+@ApiModel("资料字段编辑对象")
+public class ProfileFieldEditBo {
+
+    /** $column.columnComment */
+    @ApiModelProperty("$column.columnComment")
+    private Long fieldId;
+
+    /** $column.columnComment */
+    @ApiModelProperty("$column.columnComment")
+    private String fieldName;
+
+    /** $column.columnComment */
+    @ApiModelProperty("$column.columnComment")
+    private String fieldKey;
+
+    /** 0 禁用 1启用 */
+    @ApiModelProperty("0 禁用 1启用")
+    private Integer status;
+
+    /** 修改时间 */
+    @ApiModelProperty("修改时间")
+    private Long updateTime;
+
+
+}

+ 48 - 0
zhongzheng-system/src/main/java/com/zhongzheng/modules/base/bo/ProfileFieldQueryBo.java

@@ -0,0 +1,48 @@
+package com.zhongzheng.modules.base.bo;
+
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+
+import java.util.Date;
+import java.util.Map;
+import java.util.HashMap;
+
+import com.zhongzheng.common.core.domain.BaseEntity;
+
+/**
+ * 资料字段分页查询对象 profile_field
+ *
+ * @author hjl
+ * @date 2021-11-19
+ */
+@Data
+@EqualsAndHashCode(callSuper = true)
+@ApiModel("资料字段分页查询对象")
+public class ProfileFieldQueryBo extends BaseEntity {
+
+	/** 分页大小 */
+	@ApiModelProperty("分页大小")
+	private Integer pageSize;
+	/** 当前页数 */
+	@ApiModelProperty("当前页数")
+	private Integer pageNum;
+	/** 排序列 */
+	@ApiModelProperty("排序列")
+	private String orderByColumn;
+	/** 排序的方向desc或者asc */
+	@ApiModelProperty(value = "排序的方向", example = "asc,desc")
+	private String isAsc;
+
+
+	/** $column.columnComment */
+	@ApiModelProperty("$column.columnComment")
+	private String fieldName;
+	/** $column.columnComment */
+	@ApiModelProperty("$column.columnComment")
+	private String fieldKey;
+	/** 0 禁用 1启用 */
+	@ApiModelProperty("0 禁用 1启用")
+	private Integer status;
+}

+ 39 - 0
zhongzheng-system/src/main/java/com/zhongzheng/modules/base/bo/ProfileTpAddBo.java

@@ -0,0 +1,39 @@
+package com.zhongzheng.modules.base.bo;
+
+import com.zhongzheng.modules.course.bo.CourseChapterBusinessAddBo;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import com.fasterxml.jackson.annotation.JsonFormat;
+import lombok.Data;
+import java.util.Date;
+import java.util.List;
+
+
+/**
+ * 资料模板添加对象 profile_tp
+ *
+ * @author hjl
+ * @date 2021-11-19
+ */
+@Data
+@ApiModel("资料模板添加对象")
+public class ProfileTpAddBo {
+
+    /** 模板名称 */
+    @ApiModelProperty("模板名称")
+    private String name;
+    /** 编码 */
+    @ApiModelProperty("编码")
+    private String code;
+    /** 0 禁用 1启用 */
+    @ApiModelProperty("0 禁用 1启用")
+    private Integer status;
+    /** 添加时间 */
+    @ApiModelProperty("添加时间")
+    private Long createTime;
+    /** 修改时间 */
+    @ApiModelProperty("修改时间")
+    private Long updateTime;
+    @ApiModelProperty("业务层级列表")
+    private List<ProfileTpBusinessAddBo> businessList;
+}

+ 33 - 0
zhongzheng-system/src/main/java/com/zhongzheng/modules/base/bo/ProfileTpBusinessAddBo.java

@@ -0,0 +1,33 @@
+package com.zhongzheng.modules.base.bo;
+
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import com.fasterxml.jackson.annotation.JsonFormat;
+import lombok.Data;
+import java.util.Date;
+
+
+
+/**
+ * 资料模板业务层次添加对象 profile_tp_business
+ *
+ * @author hjl
+ * @date 2021-11-19
+ */
+@Data
+@ApiModel("资料模板业务层次添加对象")
+public class ProfileTpBusinessAddBo {
+
+    /** 资料模板id */
+    @ApiModelProperty("资料模板id")
+    private Long profileTpId;
+    /** 教育类型id */
+    @ApiModelProperty("教育类型id")
+    private Long educationTypeId;
+    /** 业务层次id */
+    @ApiModelProperty("业务层次id")
+    private Long businessId;
+    /** 项目ID */
+    @ApiModelProperty("项目ID")
+    private Long projectId;
+}

+ 41 - 0
zhongzheng-system/src/main/java/com/zhongzheng/modules/base/bo/ProfileTpBusinessEditBo.java

@@ -0,0 +1,41 @@
+package com.zhongzheng.modules.base.bo;
+
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import com.fasterxml.jackson.annotation.JsonFormat;
+import lombok.Data;
+import java.util.Date;
+
+
+/**
+ * 资料模板业务层次编辑对象 profile_tp_business
+ *
+ * @author hjl
+ * @date 2021-11-19
+ */
+@Data
+@ApiModel("资料模板业务层次编辑对象")
+public class ProfileTpBusinessEditBo {
+
+    /** $column.columnComment */
+    @ApiModelProperty("$column.columnComment")
+    private Long id;
+
+    /** 资料模板id */
+    @ApiModelProperty("资料模板id")
+    private Long profileTpId;
+
+    /** 教育类型id */
+    @ApiModelProperty("教育类型id")
+    private Long educationTypeId;
+
+    /** 业务层次id */
+    @ApiModelProperty("业务层次id")
+    private Long businessId;
+
+
+    /** 项目ID */
+    @ApiModelProperty("项目ID")
+    private Long projectId;
+
+}

+ 51 - 0
zhongzheng-system/src/main/java/com/zhongzheng/modules/base/bo/ProfileTpBusinessQueryBo.java

@@ -0,0 +1,51 @@
+package com.zhongzheng.modules.base.bo;
+
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+
+import java.util.Date;
+import java.util.Map;
+import java.util.HashMap;
+
+import com.zhongzheng.common.core.domain.BaseEntity;
+
+/**
+ * 资料模板业务层次分页查询对象 profile_tp_business
+ *
+ * @author hjl
+ * @date 2021-11-19
+ */
+@Data
+@EqualsAndHashCode(callSuper = true)
+@ApiModel("资料模板业务层次分页查询对象")
+public class ProfileTpBusinessQueryBo extends BaseEntity {
+
+	/** 分页大小 */
+	@ApiModelProperty("分页大小")
+	private Integer pageSize;
+	/** 当前页数 */
+	@ApiModelProperty("当前页数")
+	private Integer pageNum;
+	/** 排序列 */
+	@ApiModelProperty("排序列")
+	private String orderByColumn;
+	/** 排序的方向desc或者asc */
+	@ApiModelProperty(value = "排序的方向", example = "asc,desc")
+	private String isAsc;
+
+
+	/** 资料模板id */
+	@ApiModelProperty("资料模板id")
+	private Long profileTpId;
+	/** 教育类型id */
+	@ApiModelProperty("教育类型id")
+	private Long educationTypeId;
+	/** 业务层次id */
+	@ApiModelProperty("业务层次id")
+	private Long businessId;
+	/** 项目ID */
+	@ApiModelProperty("项目ID")
+	private Long projectId;
+}

+ 45 - 0
zhongzheng-system/src/main/java/com/zhongzheng/modules/base/bo/ProfileTpEditBo.java

@@ -0,0 +1,45 @@
+package com.zhongzheng.modules.base.bo;
+
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import com.fasterxml.jackson.annotation.JsonFormat;
+import lombok.Data;
+import java.util.Date;
+import java.util.List;
+
+
+/**
+ * 资料模板编辑对象 profile_tp
+ *
+ * @author hjl
+ * @date 2021-11-19
+ */
+@Data
+@ApiModel("资料模板编辑对象")
+public class ProfileTpEditBo {
+
+    /** 资料模板ID */
+    @ApiModelProperty("资料模板ID")
+    private Long profileTpId;
+
+    /** 模板名称 */
+    @ApiModelProperty("模板名称")
+    private String name;
+
+    /** 编码 */
+    @ApiModelProperty("编码")
+    private String code;
+
+
+    /** 0 禁用 1启用 */
+    @ApiModelProperty("0 禁用 1启用")
+    private Integer status;
+
+    /** 修改时间 */
+    @ApiModelProperty("修改时间")
+    private Long updateTime;
+
+    @ApiModelProperty("业务层级列表")
+    private List<ProfileTpBusinessAddBo> businessList;
+
+}

+ 48 - 0
zhongzheng-system/src/main/java/com/zhongzheng/modules/base/bo/ProfileTpQueryBo.java

@@ -0,0 +1,48 @@
+package com.zhongzheng.modules.base.bo;
+
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+
+import java.util.Date;
+import java.util.Map;
+import java.util.HashMap;
+
+import com.zhongzheng.common.core.domain.BaseEntity;
+
+/**
+ * 资料模板分页查询对象 profile_tp
+ *
+ * @author hjl
+ * @date 2021-11-19
+ */
+@Data
+@EqualsAndHashCode(callSuper = true)
+@ApiModel("资料模板分页查询对象")
+public class ProfileTpQueryBo extends BaseEntity {
+
+	/** 分页大小 */
+	@ApiModelProperty("分页大小")
+	private Integer pageSize;
+	/** 当前页数 */
+	@ApiModelProperty("当前页数")
+	private Integer pageNum;
+	/** 排序列 */
+	@ApiModelProperty("排序列")
+	private String orderByColumn;
+	/** 排序的方向desc或者asc */
+	@ApiModelProperty(value = "排序的方向", example = "asc,desc")
+	private String isAsc;
+
+
+	/** 模板名称 */
+	@ApiModelProperty("模板名称")
+	private String name;
+	/** 编码 */
+	@ApiModelProperty("编码")
+	private String code;
+	/** 0 禁用 1启用 */
+	@ApiModelProperty("0 禁用 1启用")
+	private Integer status;
+}

+ 41 - 0
zhongzheng-system/src/main/java/com/zhongzheng/modules/base/domain/ProfileField.java

@@ -0,0 +1,41 @@
+package com.zhongzheng.modules.base.domain;
+
+import com.baomidou.mybatisplus.annotation.*;
+import lombok.Data;
+import lombok.NoArgsConstructor;
+import lombok.experimental.Accessors;
+import java.io.Serializable;
+import java.util.Date;
+import java.math.BigDecimal;
+import com.zhongzheng.common.annotation.Excel;
+
+/**
+ * 资料字段对象 profile_field
+ *
+ * @author hjl
+ * @date 2021-11-19
+ */
+@Data
+@NoArgsConstructor
+@Accessors(chain = true)
+@TableName("profile_field")
+public class ProfileField implements Serializable {
+
+private static final long serialVersionUID=1L;
+
+    /** $column.columnComment */
+    @TableId(value = "field_id")
+    private Long fieldId;
+    /** $column.columnComment */
+    private String fieldName;
+    /** $column.columnComment */
+    private String fieldKey;
+    /** 0 禁用 1启用 */
+    private Integer status;
+    /** 添加时间 */
+    @TableField(fill = FieldFill.INSERT)
+    private Long createTime;
+    /** 修改时间 */
+    @TableField(fill = FieldFill.INSERT_UPDATE)
+    private Long updateTime;
+}

+ 41 - 0
zhongzheng-system/src/main/java/com/zhongzheng/modules/base/domain/ProfileTp.java

@@ -0,0 +1,41 @@
+package com.zhongzheng.modules.base.domain;
+
+import com.baomidou.mybatisplus.annotation.*;
+import lombok.Data;
+import lombok.NoArgsConstructor;
+import lombok.experimental.Accessors;
+import java.io.Serializable;
+import java.util.Date;
+import java.math.BigDecimal;
+import com.zhongzheng.common.annotation.Excel;
+
+/**
+ * 资料模板对象 profile_tp
+ *
+ * @author hjl
+ * @date 2021-11-19
+ */
+@Data
+@NoArgsConstructor
+@Accessors(chain = true)
+@TableName("profile_tp")
+public class ProfileTp implements Serializable {
+
+private static final long serialVersionUID=1L;
+
+    /** 资料模板ID */
+    @TableId(value = "profile_tp_id")
+    private Long profileTpId;
+    /** 模板名称 */
+    private String name;
+    /** 编码 */
+    private String code;
+    /** 0 禁用 1启用 */
+    private Integer status;
+    /** 添加时间 */
+    @TableField(fill = FieldFill.INSERT)
+    private Long createTime;
+    /** 修改时间 */
+    @TableField(fill = FieldFill.INSERT_UPDATE)
+    private Long updateTime;
+}

+ 37 - 0
zhongzheng-system/src/main/java/com/zhongzheng/modules/base/domain/ProfileTpBusiness.java

@@ -0,0 +1,37 @@
+package com.zhongzheng.modules.base.domain;
+
+import com.baomidou.mybatisplus.annotation.*;
+import lombok.Data;
+import lombok.NoArgsConstructor;
+import lombok.experimental.Accessors;
+import java.io.Serializable;
+import java.util.Date;
+import java.math.BigDecimal;
+import com.zhongzheng.common.annotation.Excel;
+
+/**
+ * 资料模板业务层次对象 profile_tp_business
+ *
+ * @author hjl
+ * @date 2021-11-19
+ */
+@Data
+@NoArgsConstructor
+@Accessors(chain = true)
+@TableName("profile_tp_business")
+public class ProfileTpBusiness implements Serializable {
+
+private static final long serialVersionUID=1L;
+
+    /** $column.columnComment */
+    @TableId(value = "id")
+    private Long id;
+    /** 资料模板id */
+    private Long profileTpId;
+    /** 教育类型id */
+    private Long educationTypeId;
+    /** 业务层次id */
+    private Long businessId;
+    /** 项目ID */
+    private Long projectId;
+}

+ 14 - 0
zhongzheng-system/src/main/java/com/zhongzheng/modules/base/mapper/ProfileFieldMapper.java

@@ -0,0 +1,14 @@
+package com.zhongzheng.modules.base.mapper;
+
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.zhongzheng.modules.base.domain.ProfileField;
+
+/**
+ * 资料字段Mapper接口
+ *
+ * @author hjl
+ * @date 2021-11-19
+ */
+public interface ProfileFieldMapper extends BaseMapper<ProfileField> {
+
+}

+ 14 - 0
zhongzheng-system/src/main/java/com/zhongzheng/modules/base/mapper/ProfileTpBusinessMapper.java

@@ -0,0 +1,14 @@
+package com.zhongzheng.modules.base.mapper;
+
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.zhongzheng.modules.base.domain.ProfileTpBusiness;
+
+/**
+ * 资料模板业务层次Mapper接口
+ *
+ * @author hjl
+ * @date 2021-11-19
+ */
+public interface ProfileTpBusinessMapper extends BaseMapper<ProfileTpBusiness> {
+
+}

+ 14 - 0
zhongzheng-system/src/main/java/com/zhongzheng/modules/base/mapper/ProfileTpMapper.java

@@ -0,0 +1,14 @@
+package com.zhongzheng.modules.base.mapper;
+
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.zhongzheng.modules.base.domain.ProfileTp;
+
+/**
+ * 资料模板Mapper接口
+ *
+ * @author hjl
+ * @date 2021-11-19
+ */
+public interface ProfileTpMapper extends BaseMapper<ProfileTp> {
+
+}

+ 52 - 0
zhongzheng-system/src/main/java/com/zhongzheng/modules/base/service/IProfileFieldService.java

@@ -0,0 +1,52 @@
+package com.zhongzheng.modules.base.service;
+
+import com.baomidou.mybatisplus.extension.service.IService;
+import com.zhongzheng.modules.base.bo.ProfileFieldAddBo;
+import com.zhongzheng.modules.base.bo.ProfileFieldEditBo;
+import com.zhongzheng.modules.base.bo.ProfileFieldQueryBo;
+import com.zhongzheng.modules.base.domain.ProfileField;
+import com.zhongzheng.modules.base.vo.ProfileFieldVo;
+
+import java.util.Collection;
+import java.util.List;
+
+/**
+ * 资料字段Service接口
+ *
+ * @author hjl
+ * @date 2021-11-19
+ */
+public interface IProfileFieldService extends IService<ProfileField> {
+	/**
+	 * 查询单个
+	 * @return
+	 */
+	ProfileFieldVo queryById(Long fieldId);
+
+	/**
+	 * 查询列表
+	 */
+	List<ProfileFieldVo> queryList(ProfileFieldQueryBo bo);
+
+	/**
+	 * 根据新增业务对象插入资料字段
+	 * @param bo 资料字段新增业务对象
+	 * @return
+	 */
+	Boolean insertByAddBo(ProfileFieldAddBo bo);
+
+	/**
+	 * 根据编辑业务对象修改资料字段
+	 * @param bo 资料字段编辑业务对象
+	 * @return
+	 */
+	Boolean updateByEditBo(ProfileFieldEditBo bo);
+
+	/**
+	 * 校验并删除数据
+	 * @param ids 主键集合
+	 * @param isValid 是否校验,true-删除前校验,false-不校验
+	 * @return
+	 */
+	Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid);
+}

+ 52 - 0
zhongzheng-system/src/main/java/com/zhongzheng/modules/base/service/IProfileTpBusinessService.java

@@ -0,0 +1,52 @@
+package com.zhongzheng.modules.base.service;
+
+import com.baomidou.mybatisplus.extension.service.IService;
+import com.zhongzheng.modules.base.bo.ProfileTpBusinessAddBo;
+import com.zhongzheng.modules.base.bo.ProfileTpBusinessEditBo;
+import com.zhongzheng.modules.base.bo.ProfileTpBusinessQueryBo;
+import com.zhongzheng.modules.base.domain.ProfileTpBusiness;
+import com.zhongzheng.modules.base.vo.ProfileTpBusinessVo;
+
+import java.util.Collection;
+import java.util.List;
+
+/**
+ * 资料模板业务层次Service接口
+ *
+ * @author hjl
+ * @date 2021-11-19
+ */
+public interface IProfileTpBusinessService extends IService<ProfileTpBusiness> {
+	/**
+	 * 查询单个
+	 * @return
+	 */
+	ProfileTpBusinessVo queryById(Long id);
+
+	/**
+	 * 查询列表
+	 */
+	List<ProfileTpBusinessVo> queryList(ProfileTpBusinessQueryBo bo);
+
+	/**
+	 * 根据新增业务对象插入资料模板业务层次
+	 * @param bo 资料模板业务层次新增业务对象
+	 * @return
+	 */
+	Boolean insertByAddBo(ProfileTpBusinessAddBo bo);
+
+	/**
+	 * 根据编辑业务对象修改资料模板业务层次
+	 * @param bo 资料模板业务层次编辑业务对象
+	 * @return
+	 */
+	Boolean updateByEditBo(ProfileTpBusinessEditBo bo);
+
+	/**
+	 * 校验并删除数据
+	 * @param ids 主键集合
+	 * @param isValid 是否校验,true-删除前校验,false-不校验
+	 * @return
+	 */
+	Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid);
+}

+ 52 - 0
zhongzheng-system/src/main/java/com/zhongzheng/modules/base/service/IProfileTpService.java

@@ -0,0 +1,52 @@
+package com.zhongzheng.modules.base.service;
+
+import com.baomidou.mybatisplus.extension.service.IService;
+import com.zhongzheng.modules.base.bo.ProfileTpAddBo;
+import com.zhongzheng.modules.base.bo.ProfileTpEditBo;
+import com.zhongzheng.modules.base.bo.ProfileTpQueryBo;
+import com.zhongzheng.modules.base.domain.ProfileTp;
+import com.zhongzheng.modules.base.vo.ProfileTpVo;
+
+import java.util.Collection;
+import java.util.List;
+
+/**
+ * 资料模板Service接口
+ *
+ * @author hjl
+ * @date 2021-11-19
+ */
+public interface IProfileTpService extends IService<ProfileTp> {
+	/**
+	 * 查询单个
+	 * @return
+	 */
+	ProfileTpVo queryById(Long profileTpId);
+
+	/**
+	 * 查询列表
+	 */
+	List<ProfileTpVo> queryList(ProfileTpQueryBo bo);
+
+	/**
+	 * 根据新增业务对象插入资料模板
+	 * @param bo 资料模板新增业务对象
+	 * @return
+	 */
+	Boolean insertByAddBo(ProfileTpAddBo bo);
+
+	/**
+	 * 根据编辑业务对象修改资料模板
+	 * @param bo 资料模板编辑业务对象
+	 * @return
+	 */
+	Boolean updateByEditBo(ProfileTpEditBo bo);
+
+	/**
+	 * 校验并删除数据
+	 * @param ids 主键集合
+	 * @param isValid 是否校验,true-删除前校验,false-不校验
+	 * @return
+	 */
+	Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid);
+}

+ 101 - 0
zhongzheng-system/src/main/java/com/zhongzheng/modules/base/service/impl/ProfileFieldServiceImpl.java

@@ -0,0 +1,101 @@
+package com.zhongzheng.modules.base.service.impl;
+
+import cn.hutool.core.bean.BeanUtil;
+import cn.hutool.core.util.StrUtil;
+import com.zhongzheng.common.utils.DateUtils;
+import com.zhongzheng.modules.base.bo.ProfileFieldAddBo;
+import com.zhongzheng.modules.base.bo.ProfileFieldEditBo;
+import com.zhongzheng.modules.base.bo.ProfileFieldQueryBo;
+import com.zhongzheng.modules.base.domain.ProfileField;
+import com.zhongzheng.modules.base.mapper.ProfileFieldMapper;
+import com.zhongzheng.modules.base.service.IProfileFieldService;
+import com.zhongzheng.modules.base.vo.ProfileFieldVo;
+import org.springframework.stereotype.Service;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
+import com.baomidou.mybatisplus.core.toolkit.Wrappers;
+import com.github.pagehelper.Page;
+
+import java.util.Collection;
+import java.util.Collections;
+import java.util.List;
+import java.util.stream.Collectors;
+
+/**
+ * 资料字段Service业务层处理
+ *
+ * @author hjl
+ * @date 2021-11-19
+ */
+@Service
+public class ProfileFieldServiceImpl extends ServiceImpl<ProfileFieldMapper, ProfileField> implements IProfileFieldService {
+
+    @Override
+    public ProfileFieldVo queryById(Long fieldId){
+        ProfileField db = this.baseMapper.selectById(fieldId);
+        return BeanUtil.toBean(db, ProfileFieldVo.class);
+    }
+
+    @Override
+    public List<ProfileFieldVo> queryList(ProfileFieldQueryBo bo) {
+        LambdaQueryWrapper<ProfileField> lqw = Wrappers.lambdaQuery();
+        lqw.like(StrUtil.isNotBlank(bo.getFieldName()), ProfileField::getFieldName, bo.getFieldName());
+        lqw.eq(StrUtil.isNotBlank(bo.getFieldKey()), ProfileField::getFieldKey, bo.getFieldKey());
+        lqw.eq(bo.getStatus() != null, ProfileField::getStatus, bo.getStatus());
+        return entity2Vo(this.list(lqw));
+    }
+
+    /**
+    * 实体类转化成视图对象
+    *
+    * @param collection 实体类集合
+    * @return
+    */
+    private List<ProfileFieldVo> entity2Vo(Collection<ProfileField> collection) {
+        List<ProfileFieldVo> voList = collection.stream()
+                .map(any -> BeanUtil.toBean(any, ProfileFieldVo.class))
+                .collect(Collectors.toList());
+        if (collection instanceof Page) {
+            Page<ProfileField> page = (Page<ProfileField>)collection;
+            Page<ProfileFieldVo> pageVo = new Page<>();
+            BeanUtil.copyProperties(page,pageVo);
+            pageVo.addAll(voList);
+            voList = pageVo;
+        }
+        return voList;
+    }
+
+    @Override
+    public Boolean insertByAddBo(ProfileFieldAddBo bo) {
+        ProfileField add = BeanUtil.toBean(bo, ProfileField.class);
+        validEntityBeforeSave(add);
+        add.setCreateTime(DateUtils.getNowTime());
+        add.setUpdateTime(DateUtils.getNowTime());
+        return this.save(add);
+    }
+
+    @Override
+    public Boolean updateByEditBo(ProfileFieldEditBo bo) {
+        ProfileField update = BeanUtil.toBean(bo, ProfileField.class);
+        validEntityBeforeSave(update);
+        update.setUpdateTime(DateUtils.getNowTime());
+        return this.updateById(update);
+    }
+
+    /**
+     * 保存前的数据校验
+     *
+     * @param entity 实体类数据
+     */
+    private void validEntityBeforeSave(ProfileField entity){
+        //TODO 做一些数据校验,如唯一约束
+    }
+
+    @Override
+    public Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid) {
+        if(isValid){
+            //TODO 做一些业务上的校验,判断是否需要校验
+        }
+        return this.removeByIds(ids);
+    }
+}

+ 99 - 0
zhongzheng-system/src/main/java/com/zhongzheng/modules/base/service/impl/ProfileTpBusinessServiceImpl.java

@@ -0,0 +1,99 @@
+package com.zhongzheng.modules.base.service.impl;
+
+import cn.hutool.core.bean.BeanUtil;
+import cn.hutool.core.util.StrUtil;
+import com.zhongzheng.common.utils.DateUtils;
+import com.zhongzheng.modules.base.bo.ProfileTpBusinessAddBo;
+import com.zhongzheng.modules.base.bo.ProfileTpBusinessEditBo;
+import com.zhongzheng.modules.base.bo.ProfileTpBusinessQueryBo;
+import com.zhongzheng.modules.base.domain.ProfileTpBusiness;
+import com.zhongzheng.modules.base.mapper.ProfileTpBusinessMapper;
+import com.zhongzheng.modules.base.service.IProfileTpBusinessService;
+import com.zhongzheng.modules.base.vo.ProfileTpBusinessVo;
+import org.springframework.stereotype.Service;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
+import com.baomidou.mybatisplus.core.toolkit.Wrappers;
+import com.github.pagehelper.Page;
+
+import java.util.Collection;
+import java.util.Collections;
+import java.util.List;
+import java.util.stream.Collectors;
+
+/**
+ * 资料模板业务层次Service业务层处理
+ *
+ * @author hjl
+ * @date 2021-11-19
+ */
+@Service
+public class ProfileTpBusinessServiceImpl extends ServiceImpl<ProfileTpBusinessMapper, ProfileTpBusiness> implements IProfileTpBusinessService {
+
+    @Override
+    public ProfileTpBusinessVo queryById(Long id){
+        ProfileTpBusiness db = this.baseMapper.selectById(id);
+        return BeanUtil.toBean(db, ProfileTpBusinessVo.class);
+    }
+
+    @Override
+    public List<ProfileTpBusinessVo> queryList(ProfileTpBusinessQueryBo bo) {
+        LambdaQueryWrapper<ProfileTpBusiness> lqw = Wrappers.lambdaQuery();
+        lqw.eq(bo.getProfileTpId() != null, ProfileTpBusiness::getProfileTpId, bo.getProfileTpId());
+        lqw.eq(bo.getEducationTypeId() != null, ProfileTpBusiness::getEducationTypeId, bo.getEducationTypeId());
+        lqw.eq(bo.getBusinessId() != null, ProfileTpBusiness::getBusinessId, bo.getBusinessId());
+        lqw.eq(bo.getProjectId() != null, ProfileTpBusiness::getProjectId, bo.getProjectId());
+        return entity2Vo(this.list(lqw));
+    }
+
+    /**
+    * 实体类转化成视图对象
+    *
+    * @param collection 实体类集合
+    * @return
+    */
+    private List<ProfileTpBusinessVo> entity2Vo(Collection<ProfileTpBusiness> collection) {
+        List<ProfileTpBusinessVo> voList = collection.stream()
+                .map(any -> BeanUtil.toBean(any, ProfileTpBusinessVo.class))
+                .collect(Collectors.toList());
+        if (collection instanceof Page) {
+            Page<ProfileTpBusiness> page = (Page<ProfileTpBusiness>)collection;
+            Page<ProfileTpBusinessVo> pageVo = new Page<>();
+            BeanUtil.copyProperties(page,pageVo);
+            pageVo.addAll(voList);
+            voList = pageVo;
+        }
+        return voList;
+    }
+
+    @Override
+    public Boolean insertByAddBo(ProfileTpBusinessAddBo bo) {
+        ProfileTpBusiness add = BeanUtil.toBean(bo, ProfileTpBusiness.class);
+        validEntityBeforeSave(add);
+        return this.save(add);
+    }
+
+    @Override
+    public Boolean updateByEditBo(ProfileTpBusinessEditBo bo) {
+        ProfileTpBusiness update = BeanUtil.toBean(bo, ProfileTpBusiness.class);
+        validEntityBeforeSave(update);
+        return this.updateById(update);
+    }
+
+    /**
+     * 保存前的数据校验
+     *
+     * @param entity 实体类数据
+     */
+    private void validEntityBeforeSave(ProfileTpBusiness entity){
+        //TODO 做一些数据校验,如唯一约束
+    }
+
+    @Override
+    public Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid) {
+        if(isValid){
+            //TODO 做一些业务上的校验,判断是否需要校验
+        }
+        return this.removeByIds(ids);
+    }
+}

+ 100 - 0
zhongzheng-system/src/main/java/com/zhongzheng/modules/base/service/impl/ProfileTpServiceImpl.java

@@ -0,0 +1,100 @@
+package com.zhongzheng.modules.base.service.impl;
+
+import cn.hutool.core.bean.BeanUtil;
+import cn.hutool.core.util.StrUtil;
+import com.zhongzheng.common.utils.DateUtils;
+import com.zhongzheng.modules.base.bo.ProfileTpAddBo;
+import com.zhongzheng.modules.base.bo.ProfileTpEditBo;
+import com.zhongzheng.modules.base.bo.ProfileTpQueryBo;
+import com.zhongzheng.modules.base.domain.ProfileTp;
+import com.zhongzheng.modules.base.mapper.ProfileTpMapper;
+import com.zhongzheng.modules.base.service.IProfileTpService;
+import com.zhongzheng.modules.base.vo.ProfileTpVo;
+import org.springframework.stereotype.Service;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
+import com.baomidou.mybatisplus.core.toolkit.Wrappers;
+import com.github.pagehelper.Page;
+import java.util.Collection;
+import java.util.Collections;
+import java.util.List;
+import java.util.stream.Collectors;
+
+/**
+ * 资料模板Service业务层处理
+ *
+ * @author hjl
+ * @date 2021-11-19
+ */
+@Service
+public class ProfileTpServiceImpl extends ServiceImpl<ProfileTpMapper, ProfileTp> implements IProfileTpService {
+
+    @Override
+    public ProfileTpVo queryById(Long profileTpId){
+        ProfileTp db = this.baseMapper.selectById(profileTpId);
+        return BeanUtil.toBean(db, ProfileTpVo.class);
+    }
+
+    @Override
+    public List<ProfileTpVo> queryList(ProfileTpQueryBo bo) {
+        LambdaQueryWrapper<ProfileTp> lqw = Wrappers.lambdaQuery();
+        lqw.like(StrUtil.isNotBlank(bo.getName()), ProfileTp::getName, bo.getName());
+        lqw.eq(StrUtil.isNotBlank(bo.getCode()), ProfileTp::getCode, bo.getCode());
+        lqw.eq(bo.getStatus() != null, ProfileTp::getStatus, bo.getStatus());
+        return entity2Vo(this.list(lqw));
+    }
+
+    /**
+    * 实体类转化成视图对象
+    *
+    * @param collection 实体类集合
+    * @return
+    */
+    private List<ProfileTpVo> entity2Vo(Collection<ProfileTp> collection) {
+        List<ProfileTpVo> voList = collection.stream()
+                .map(any -> BeanUtil.toBean(any, ProfileTpVo.class))
+                .collect(Collectors.toList());
+        if (collection instanceof Page) {
+            Page<ProfileTp> page = (Page<ProfileTp>)collection;
+            Page<ProfileTpVo> pageVo = new Page<>();
+            BeanUtil.copyProperties(page,pageVo);
+            pageVo.addAll(voList);
+            voList = pageVo;
+        }
+        return voList;
+    }
+
+    @Override
+    public Boolean insertByAddBo(ProfileTpAddBo bo) {
+        ProfileTp add = BeanUtil.toBean(bo, ProfileTp.class);
+        validEntityBeforeSave(add);
+        add.setCreateTime(DateUtils.getNowTime());
+        add.setUpdateTime(DateUtils.getNowTime());
+        return this.save(add);
+    }
+
+    @Override
+    public Boolean updateByEditBo(ProfileTpEditBo bo) {
+        ProfileTp update = BeanUtil.toBean(bo, ProfileTp.class);
+        validEntityBeforeSave(update);
+        update.setUpdateTime(DateUtils.getNowTime());
+        return this.updateById(update);
+    }
+
+    /**
+     * 保存前的数据校验
+     *
+     * @param entity 实体类数据
+     */
+    private void validEntityBeforeSave(ProfileTp entity){
+        //TODO 做一些数据校验,如唯一约束
+    }
+
+    @Override
+    public Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid) {
+        if(isValid){
+            //TODO 做一些业务上的校验,判断是否需要校验
+        }
+        return this.removeByIds(ids);
+    }
+}

+ 39 - 0
zhongzheng-system/src/main/java/com/zhongzheng/modules/base/vo/ProfileFieldVo.java

@@ -0,0 +1,39 @@
+package com.zhongzheng.modules.base.vo;
+
+import com.zhongzheng.common.annotation.Excel;
+import com.fasterxml.jackson.annotation.JsonFormat;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+import java.util.Date;
+
+
+
+/**
+ * 资料字段视图对象 mall_package
+ *
+ * @author hjl
+ * @date 2021-11-19
+ */
+@Data
+@ApiModel("资料字段视图对象")
+public class ProfileFieldVo {
+	private static final long serialVersionUID = 1L;
+
+	/** $pkColumn.columnComment */
+	@ApiModelProperty("$pkColumn.columnComment")
+	private Long fieldId;
+
+	/** $column.columnComment */
+	@Excel(name = "${comment}" , readConverterExp = "$column.readConverterExp()")
+	@ApiModelProperty("$column.columnComment")
+	private String fieldName;
+	/** $column.columnComment */
+	@Excel(name = "${comment}" , readConverterExp = "$column.readConverterExp()")
+	@ApiModelProperty("$column.columnComment")
+	private String fieldKey;
+	/** 0 禁用 1启用 */
+	@Excel(name = "0 禁用 1启用")
+	@ApiModelProperty("0 禁用 1启用")
+	private Integer status;
+}

+ 43 - 0
zhongzheng-system/src/main/java/com/zhongzheng/modules/base/vo/ProfileTpBusinessVo.java

@@ -0,0 +1,43 @@
+package com.zhongzheng.modules.base.vo;
+
+import com.zhongzheng.common.annotation.Excel;
+import com.fasterxml.jackson.annotation.JsonFormat;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+import java.util.Date;
+
+
+
+/**
+ * 资料模板业务层次视图对象 mall_package
+ *
+ * @author hjl
+ * @date 2021-11-19
+ */
+@Data
+@ApiModel("资料模板业务层次视图对象")
+public class ProfileTpBusinessVo {
+	private static final long serialVersionUID = 1L;
+
+	/** $pkColumn.columnComment */
+	@ApiModelProperty("$pkColumn.columnComment")
+	private Long id;
+
+	/** 资料模板id */
+	@Excel(name = "资料模板id")
+	@ApiModelProperty("资料模板id")
+	private Long profileTpId;
+	/** 教育类型id */
+	@Excel(name = "教育类型id")
+	@ApiModelProperty("教育类型id")
+	private Long educationTypeId;
+	/** 业务层次id */
+	@Excel(name = "业务层次id")
+	@ApiModelProperty("业务层次id")
+	private Long businessId;
+	/** 项目ID */
+	@Excel(name = "项目ID")
+	@ApiModelProperty("项目ID")
+	private Long projectId;
+}

+ 39 - 0
zhongzheng-system/src/main/java/com/zhongzheng/modules/base/vo/ProfileTpVo.java

@@ -0,0 +1,39 @@
+package com.zhongzheng.modules.base.vo;
+
+import com.zhongzheng.common.annotation.Excel;
+import com.fasterxml.jackson.annotation.JsonFormat;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+import java.util.Date;
+
+
+
+/**
+ * 资料模板视图对象 mall_package
+ *
+ * @author hjl
+ * @date 2021-11-19
+ */
+@Data
+@ApiModel("资料模板视图对象")
+public class ProfileTpVo {
+	private static final long serialVersionUID = 1L;
+
+	/** 资料模板ID */
+	@ApiModelProperty("资料模板ID")
+	private Long profileTpId;
+
+	/** 模板名称 */
+	@Excel(name = "模板名称")
+	@ApiModelProperty("模板名称")
+	private String name;
+	/** 编码 */
+	@Excel(name = "编码")
+	@ApiModelProperty("编码")
+	private String code;
+	/** 0 禁用 1启用 */
+	@Excel(name = "0 禁用 1启用")
+	@ApiModelProperty("0 禁用 1启用")
+	private Integer status;
+}

+ 17 - 0
zhongzheng-system/src/main/resources/mapper/modules/base/ProfileFieldMapper.xml

@@ -0,0 +1,17 @@
+<?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.zhongzheng.modules.base.mapper.ProfileFieldMapper">
+
+    <resultMap type="com.zhongzheng.modules.base.domain.ProfileField" id="ProfileFieldResult">
+        <result property="fieldId" column="field_id"/>
+        <result property="fieldName" column="field_name"/>
+        <result property="fieldKey" column="field_key"/>
+        <result property="status" column="status"/>
+        <result property="createTime" column="create_time"/>
+        <result property="updateTime" column="update_time"/>
+    </resultMap>
+
+
+</mapper>

+ 16 - 0
zhongzheng-system/src/main/resources/mapper/modules/base/ProfileTpBusinessMapper.xml

@@ -0,0 +1,16 @@
+<?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.zhongzheng.modules.base.mapper.ProfileTpBusinessMapper">
+
+    <resultMap type="com.zhongzheng.modules.base.domain.ProfileTpBusiness" id="ProfileTpBusinessResult">
+        <result property="id" column="id"/>
+        <result property="profileTpId" column="profile_tp_id"/>
+        <result property="educationTypeId" column="education_type_id"/>
+        <result property="businessId" column="business_id"/>
+        <result property="projectId" column="project_id"/>
+    </resultMap>
+
+
+</mapper>

+ 17 - 0
zhongzheng-system/src/main/resources/mapper/modules/base/ProfileTpMapper.xml

@@ -0,0 +1,17 @@
+<?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.zhongzheng.modules.base.mapper.ProfileTpMapper">
+
+    <resultMap type="com.zhongzheng.modules.base.domain.ProfileTp" id="ProfileTpResult">
+        <result property="profileTpId" column="profile_tp_id"/>
+        <result property="name" column="name"/>
+        <result property="code" column="code"/>
+        <result property="status" column="status"/>
+        <result property="createTime" column="create_time"/>
+        <result property="updateTime" column="update_time"/>
+    </resultMap>
+
+
+</mapper>