Browse Source

新增尽调代码、尽调人员关联代码

zjc 1 year ago
parent
commit
70ebdbf6fb

+ 159 - 0
ruoyi-admin/src/main/java/com/ruoyi/web/controller/invest/TProjectInvestigateController.java

@@ -0,0 +1,159 @@
+package com.ruoyi.web.controller.invest;
+
+import java.util.List;
+import javax.servlet.http.HttpServletResponse;
+
+import com.ruoyi.common.enums.FileType;
+import com.ruoyi.common.utils.StringUtils;
+import com.ruoyi.common.utils.uuid.IdUtils;
+import com.ruoyi.invest.domain.TProjectScoring;
+import com.ruoyi.tool.domain.TUnifyFile;
+import com.ruoyi.tool.service.ITUnifyFileService;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+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.ruoyi.common.annotation.Log;
+import com.ruoyi.common.core.controller.BaseController;
+import com.ruoyi.common.core.domain.AjaxResult;
+import com.ruoyi.common.enums.BusinessType;
+import com.ruoyi.invest.domain.TProjectInvestigate;
+import com.ruoyi.invest.service.ITProjectInvestigateService;
+import com.ruoyi.common.utils.poi.ExcelUtil;
+import com.ruoyi.common.core.page.TableDataInfo;
+
+/**
+ * 尽调关联Controller
+ * 
+ * @author zjc
+ * @date 2024-03-13
+ */
+@Api(tags = "尽职背调")
+@RestController
+@RequestMapping("/invest/investigate")
+public class TProjectInvestigateController extends BaseController
+{
+    @Autowired
+    private ITProjectInvestigateService tProjectInvestigateService;
+
+    @Autowired
+    private ITUnifyFileService tUnifyFileService;
+
+    /**
+     * 查询尽调关联列表
+     */
+    @ApiOperation("查询尽调关联列表")
+    @GetMapping("/list")
+    public TableDataInfo list(TProjectInvestigate tProjectInvestigate)
+    {
+        startPage();
+        List<TProjectInvestigate> list = tProjectInvestigateService.selectTProjectInvestigateList(tProjectInvestigate);
+        return getDataTable(list);
+    }
+
+    /**
+     * 导出尽调关联列表
+     */
+    @ApiOperation("导出尽调关联列表")
+    @Log(title = "尽调关联", businessType = BusinessType.EXPORT)
+    @PostMapping("/export")
+    public void export(HttpServletResponse response, TProjectInvestigate tProjectInvestigate)
+    {
+        List<TProjectInvestigate> list = tProjectInvestigateService.selectTProjectInvestigateList(tProjectInvestigate);
+        ExcelUtil<TProjectInvestigate> util = new ExcelUtil<TProjectInvestigate>(TProjectInvestigate.class);
+        util.exportExcel(response, list, "尽调关联数据");
+    }
+
+    /**
+     * 获取尽调关联详细信息
+     */
+    @ApiOperation("获取尽调关联详细信息")
+    @GetMapping(value = "/{id}")
+    public AjaxResult getInfo(@PathVariable("id") String id)
+    {
+        return success(tProjectInvestigateService.selectTProjectInvestigateById(id));
+    }
+
+    /**
+     * 新增尽调关联
+     */
+    @ApiOperation("新增尽调关联")
+    @Log(title = "尽调关联", businessType = BusinessType.INSERT)
+    @PostMapping
+    public AjaxResult add(@RequestBody TProjectInvestigate tProjectInvestigate)
+    {
+        tProjectInvestigate.setId(IdUtils.fastSimpleUUID());
+        // todo 保存附件信息
+        List<TUnifyFile> tUnifyFileList = tProjectInvestigate.getListFile();
+        if(!tUnifyFileList.isEmpty()){
+            for (TUnifyFile tUnifyFile:
+                    tUnifyFileList) {
+                tUnifyFile.setFileBusinessId(tProjectInvestigate.getId());//尽调ID
+                tUnifyFile.setUploadType(String.valueOf(FileType.INVESTIGATE.ordinal()));//文件类型:尽调
+                tUnifyFile.setCreateBy(getNickName());
+                tUnifyFileService.insertTUnifyFile(tUnifyFile);
+            }
+        }
+        return toAjax(tProjectInvestigateService.insertTProjectInvestigate(tProjectInvestigate));
+    }
+
+    /**
+     * 修改尽调关联
+     */
+    @ApiOperation("修改尽调关联")
+    @Log(title = "尽调关联", businessType = BusinessType.UPDATE)
+    @PutMapping
+    public AjaxResult edit(@RequestBody TProjectInvestigate tProjectInvestigate)
+    {
+        // todo 保存附件信息
+        List<TUnifyFile> tUnifyFileList = tProjectInvestigate.getListFile();
+        if(!tUnifyFileList.isEmpty()){
+            for (TUnifyFile tUnifyFile:
+                    tUnifyFileList) {
+                if(tUnifyFile.getId() == null){
+                    tUnifyFile.setFileBusinessId(tProjectInvestigate.getId());//尽调ID
+                    tUnifyFile.setUploadType(String.valueOf(FileType.INVESTIGATE.ordinal()));//文件类型:尽调
+                    tUnifyFile.setCreateBy(getNickName());
+                    tUnifyFileService.insertTUnifyFile(tUnifyFile);
+                }
+            }
+        }
+        return toAjax(tProjectInvestigateService.updateTProjectInvestigate(tProjectInvestigate));
+    }
+
+    /**
+     * 删除尽调关联
+     */
+    @ApiOperation("删除尽调关联")
+    @Log(title = "尽调关联", businessType = BusinessType.DELETE)
+	@DeleteMapping("/{ids}")
+    public AjaxResult remove(@PathVariable String[] ids)
+    {
+        return toAjax(tProjectInvestigateService.updateTProjectInvestigateByIds(ids));
+    }
+
+    /**
+     * 根据项目ID获取尽调
+     */
+    @ApiOperation("根据项目ID获取尽调数据")
+    @GetMapping(value = "/listProjectPoolId")
+    public AjaxResult listProjectPoolId(String projectPoolId)
+    {
+        if (StringUtils.isEmpty(projectPoolId))
+        {
+            return error("查询尽调数据失败,请提供项目ID!");
+        }
+        TProjectInvestigate tProjectInvestigate = tProjectInvestigateService.listProjectPoolId(projectPoolId);
+        AjaxResult ajax = AjaxResult.success();
+        ajax.put("tProjectInvestigate", tProjectInvestigate);
+        return ajax;
+    }
+}

+ 159 - 0
ruoyi-admin/src/main/java/com/ruoyi/web/controller/invest/TProjectInvestigatePersonController.java

@@ -0,0 +1,159 @@
+package com.ruoyi.web.controller.invest;
+
+import java.util.List;
+import javax.servlet.http.HttpServletResponse;
+
+import com.ruoyi.common.enums.FileType;
+import com.ruoyi.common.utils.StringUtils;
+import com.ruoyi.common.utils.uuid.IdUtils;
+import com.ruoyi.tool.domain.TUnifyFile;
+import com.ruoyi.tool.service.ITUnifyFileService;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+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.ruoyi.common.annotation.Log;
+import com.ruoyi.common.core.controller.BaseController;
+import com.ruoyi.common.core.domain.AjaxResult;
+import com.ruoyi.common.enums.BusinessType;
+import com.ruoyi.invest.domain.TProjectInvestigatePerson;
+import com.ruoyi.invest.service.ITProjectInvestigatePersonService;
+import com.ruoyi.common.utils.poi.ExcelUtil;
+import com.ruoyi.common.core.page.TableDataInfo;
+
+/**
+ * 尽调人员关联表Controller
+ * 
+ * @author zjc
+ * @date 2024-03-13
+ */
+@Api(tags = "尽调人员关联")
+@RestController
+@RequestMapping("/invest/person")
+public class TProjectInvestigatePersonController extends BaseController
+{
+    @Autowired
+    private ITProjectInvestigatePersonService tProjectInvestigatePersonService;
+
+    @Autowired
+    private ITUnifyFileService tUnifyFileService;
+
+    /**
+     * 查询尽调人员关联表列表
+     */
+    @ApiOperation("查询尽调人员关联表列表")
+    @GetMapping("/list")
+    public TableDataInfo list(TProjectInvestigatePerson tProjectInvestigatePerson)
+    {
+        startPage();
+        List<TProjectInvestigatePerson> list = tProjectInvestigatePersonService.selectTProjectInvestigatePersonList(tProjectInvestigatePerson);
+        return getDataTable(list);
+    }
+
+    /**
+     * 导出尽调人员关联表列表
+     */
+    @ApiOperation("导出尽调人员关联表列表")
+    @Log(title = "尽调人员关联表", businessType = BusinessType.EXPORT)
+    @PostMapping("/export")
+    public void export(HttpServletResponse response, TProjectInvestigatePerson tProjectInvestigatePerson)
+    {
+        List<TProjectInvestigatePerson> list = tProjectInvestigatePersonService.selectTProjectInvestigatePersonList(tProjectInvestigatePerson);
+        ExcelUtil<TProjectInvestigatePerson> util = new ExcelUtil<TProjectInvestigatePerson>(TProjectInvestigatePerson.class);
+        util.exportExcel(response, list, "尽调人员关联表数据");
+    }
+
+    /**
+     * 获取尽调人员关联表详细信息
+     */
+    @ApiOperation("获取尽调人员关联表详细信息")
+    @GetMapping(value = "/{id}")
+    public AjaxResult getInfo(@PathVariable("id") String id)
+    {
+        return success(tProjectInvestigatePersonService.selectTProjectInvestigatePersonById(id));
+    }
+
+    /**
+     * 新增尽调人员关联表
+     */
+    @ApiOperation("新增尽调人员关联表")
+    @Log(title = "尽调人员关联表", businessType = BusinessType.INSERT)
+    @PostMapping
+    public AjaxResult add(@RequestBody TProjectInvestigatePerson tProjectInvestigatePerson)
+    {
+        if(StringUtils.isNull(tProjectInvestigatePerson.getId())){
+            tProjectInvestigatePerson.setId(IdUtils.fastSimpleUUID());
+        }
+        tProjectInvestigatePerson.setInvestigatePerson(getNickName());
+        tProjectInvestigatePerson.setInvestigatePersonId(getUserId().toString());
+        tProjectInvestigatePerson.setDeptId(getDeptId());
+        // todo 保存附件信息
+        List<TUnifyFile> tUnifyFileList = tProjectInvestigatePerson.getListFile();
+        if(!tUnifyFileList.isEmpty()){
+            for (TUnifyFile tUnifyFile:
+                    tUnifyFileList) {
+                if(tUnifyFile.getId() == null){
+                    tUnifyFile.setFileBusinessId(tProjectInvestigatePerson.getId());//尽调ID
+                    tUnifyFile.setUploadType(String.valueOf(FileType.INVESTIGATE.ordinal()));//文件类型:尽调
+                    tUnifyFile.setCreateBy(getNickName());
+                    tUnifyFileService.insertTUnifyFile(tUnifyFile);
+                }
+            }
+        }
+        return toAjax(tProjectInvestigatePersonService.insertTProjectInvestigatePerson(tProjectInvestigatePerson));
+    }
+
+    /**
+     * 修改尽调人员关联表
+     */
+    @ApiOperation("修改尽调人员关联表")
+    @Log(title = "尽调人员关联表", businessType = BusinessType.UPDATE)
+    @PutMapping
+    public AjaxResult edit(@RequestBody TProjectInvestigatePerson tProjectInvestigatePerson)
+    {
+        // todo 保存附件信息
+        List<TUnifyFile> tUnifyFileList = tProjectInvestigatePerson.getListFile();
+        if(!tUnifyFileList.isEmpty()){
+            for (TUnifyFile tUnifyFile:
+                    tUnifyFileList) {
+                if(tUnifyFile.getId() == null){
+                    tUnifyFile.setFileBusinessId(tProjectInvestigatePerson.getId());//尽调ID
+                    tUnifyFile.setUploadType(String.valueOf(FileType.INVESTIGATE.ordinal()));//文件类型:尽调
+                    tUnifyFile.setCreateBy(getNickName());
+                    tUnifyFileService.insertTUnifyFile(tUnifyFile);
+                }
+            }
+        }
+        return toAjax(tProjectInvestigatePersonService.updateTProjectInvestigatePerson(tProjectInvestigatePerson));
+    }
+
+    /**
+     * 删除尽调人员关联表
+     */
+    @ApiOperation("删除尽调人员关联表")
+    @Log(title = "尽调人员关联表", businessType = BusinessType.DELETE)
+	@DeleteMapping("/{ids}")
+    public AjaxResult remove(@PathVariable String[] ids)
+    {
+        return toAjax(tProjectInvestigatePersonService.deleteTProjectInvestigatePersonByIds(ids));
+    }
+
+    /**
+     * 根据尽调申请ID获取尽调人员关联表详细信息
+     */
+    @ApiOperation("获取尽调人员关联表详细信息")
+    @GetMapping(value = "/getProjectInvestigateId")
+    public AjaxResult getProjectInvestigateId(String projectInvestigateId)
+    {
+        return success(tProjectInvestigatePersonService.selectByProjectInvestigateId(projectInvestigateId,getUserId()));
+    }
+
+}

+ 4 - 0
ruoyi-common/src/main/java/com/ruoyi/common/enums/FileType.java

@@ -38,4 +38,8 @@ public enum FileType {
      * 公司信息
      */
     COMPANY,
+    /**
+     * 尽职调查
+     */
+    INVESTIGATE,
 }

+ 168 - 0
ruoyi-system/src/main/java/com/ruoyi/invest/domain/TProjectInvestigate.java

@@ -0,0 +1,168 @@
+package com.ruoyi.invest.domain;
+
+import com.ruoyi.tool.domain.TUnifyFile;
+import org.apache.commons.lang3.builder.ToStringBuilder;
+import org.apache.commons.lang3.builder.ToStringStyle;
+import com.ruoyi.common.annotation.Excel;
+import com.ruoyi.common.core.domain.BaseEntity;
+
+import java.util.List;
+
+/**
+ * 尽调关联对象 t_project_investigate
+ * 
+ * @author zjc
+ * @date 2024-03-13
+ */
+public class TProjectInvestigate extends BaseEntity
+{
+    private static final long serialVersionUID = 1L;
+
+    /** $column.columnComment */
+    private String id;
+
+    /** 尽调名称 */
+    @Excel(name = "尽调名称")
+    private String investigateName;
+
+    /** 尽调编号 */
+    @Excel(name = "尽调编号")
+    private String investigateCode;
+
+    /** 项目id */
+    @Excel(name = "项目id")
+    private String projectPoolId;
+
+    /** 尽调人员 */
+    @Excel(name = "尽调人员")
+    private String investigatePerson;
+
+    /** $column.columnComment */
+    private String investigatePersonId;
+
+    /** 尽调费用(元) */
+    @Excel(name = "尽调费用", readConverterExp = "元=")
+    private String investigateCost;
+
+    /** 描述 */
+    @Excel(name = "描述")
+    private String describe;
+
+    /** 删除状态 */
+    private String delFlag;
+
+    /**
+     * 附件信息
+     */
+    private List<TUnifyFile> listFile;
+
+    public void setId(String id) 
+    {
+        this.id = id;
+    }
+
+    public String getId() 
+    {
+        return id;
+    }
+    public void setInvestigateName(String investigateName) 
+    {
+        this.investigateName = investigateName;
+    }
+
+    public String getInvestigateName() 
+    {
+        return investigateName;
+    }
+    public void setInvestigateCode(String investigateCode) 
+    {
+        this.investigateCode = investigateCode;
+    }
+
+    public String getInvestigateCode() 
+    {
+        return investigateCode;
+    }
+    public void setProjectPoolId(String projectPoolId) 
+    {
+        this.projectPoolId = projectPoolId;
+    }
+
+    public String getProjectPoolId() 
+    {
+        return projectPoolId;
+    }
+    public void setInvestigatePerson(String investigatePerson) 
+    {
+        this.investigatePerson = investigatePerson;
+    }
+
+    public String getInvestigatePerson() 
+    {
+        return investigatePerson;
+    }
+    public void setInvestigatePersonId(String investigatePersonId) 
+    {
+        this.investigatePersonId = investigatePersonId;
+    }
+
+    public String getInvestigatePersonId() 
+    {
+        return investigatePersonId;
+    }
+    public void setInvestigateCost(String investigateCost) 
+    {
+        this.investigateCost = investigateCost;
+    }
+
+    public String getInvestigateCost() 
+    {
+        return investigateCost;
+    }
+    public void setDescribe(String describe) 
+    {
+        this.describe = describe;
+    }
+
+    public String getDescribe() 
+    {
+        return describe;
+    }
+    public void setDelFlag(String delFlag) 
+    {
+        this.delFlag = delFlag;
+    }
+
+    public String getDelFlag() 
+    {
+        return delFlag;
+    }
+
+    public List<TUnifyFile> getListFile() {
+        return listFile;
+    }
+
+    public void setListFile(List<TUnifyFile> listFile) {
+        this.listFile = listFile;
+    }
+
+    @Override
+    public String toString() {
+        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
+            .append("id", getId())
+            .append("investigateName", getInvestigateName())
+            .append("investigateCode", getInvestigateCode())
+            .append("projectPoolId", getProjectPoolId())
+            .append("investigatePerson", getInvestigatePerson())
+            .append("investigatePersonId", getInvestigatePersonId())
+            .append("investigateCost", getInvestigateCost())
+            .append("describe", getDescribe())
+            .append("remark", getRemark())
+            .append("delFlag", getDelFlag())
+            .append("createBy", getCreateBy())
+            .append("createTime", getCreateTime())
+            .append("updateBy", getUpdateBy())
+            .append("updateTime", getUpdateTime())
+            .toString();
+    }
+}

+ 128 - 0
ruoyi-system/src/main/java/com/ruoyi/invest/domain/TProjectInvestigatePerson.java

@@ -0,0 +1,128 @@
+package com.ruoyi.invest.domain;
+
+import com.ruoyi.tool.domain.TUnifyFile;
+import org.apache.commons.lang3.builder.ToStringBuilder;
+import org.apache.commons.lang3.builder.ToStringStyle;
+import com.ruoyi.common.annotation.Excel;
+import com.ruoyi.common.core.domain.BaseEntity;
+
+import java.util.List;
+
+/**
+ * 尽调人员关联表对象 t_project_investigate_person
+ * 
+ * @author zjc
+ * @date 2024-03-13
+ */
+public class TProjectInvestigatePerson extends BaseEntity
+{
+    private static final long serialVersionUID = 1L;
+
+    /** 主键id */
+    private String id;
+
+    /** 尽调ID */
+    @Excel(name = "尽调ID")
+    private String projectInvestigateId;
+
+    /** 尽调人员名称 */
+    @Excel(name = "尽调人员名称")
+    private String investigatePerson;
+
+    /** 尽调人员ID */
+    @Excel(name = "尽调人员ID")
+    private String investigatePersonId;
+
+    /** 尽调人员部门ID */
+    @Excel(name = "尽调人员部门ID")
+    private Long deptId;
+
+    /** 尽调人员部门名称 */
+    @Excel(name = "尽调人员部门名称")
+    private String deptName;
+
+    /**
+     * 附件信息
+     */
+    private List<TUnifyFile> listFile;
+
+    public void setId(String id) 
+    {
+        this.id = id;
+    }
+
+    public String getId() 
+    {
+        return id;
+    }
+    public void setProjectInvestigateId(String projectInvestigateId) 
+    {
+        this.projectInvestigateId = projectInvestigateId;
+    }
+
+    public String getProjectInvestigateId() 
+    {
+        return projectInvestigateId;
+    }
+    public void setInvestigatePerson(String investigatePerson) 
+    {
+        this.investigatePerson = investigatePerson;
+    }
+
+    public String getInvestigatePerson() 
+    {
+        return investigatePerson;
+    }
+    public void setInvestigatePersonId(String investigatePersonId) 
+    {
+        this.investigatePersonId = investigatePersonId;
+    }
+
+    public String getInvestigatePersonId() 
+    {
+        return investigatePersonId;
+    }
+    public void setDeptId(Long deptId) 
+    {
+        this.deptId = deptId;
+    }
+
+    public Long getDeptId() 
+    {
+        return deptId;
+    }
+    public void setDeptName(String deptName) 
+    {
+        this.deptName = deptName;
+    }
+
+    public String getDeptName() 
+    {
+        return deptName;
+    }
+
+    public List<TUnifyFile> getListFile() {
+        return listFile;
+    }
+
+    public void setListFile(List<TUnifyFile> listFile) {
+        this.listFile = listFile;
+    }
+
+    @Override
+    public String toString() {
+        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
+            .append("id", getId())
+            .append("projectInvestigateId", getProjectInvestigateId())
+            .append("investigatePerson", getInvestigatePerson())
+            .append("investigatePersonId", getInvestigatePersonId())
+            .append("deptId", getDeptId())
+            .append("deptName", getDeptName())
+            .append("remark", getRemark())
+            .append("createBy", getCreateBy())
+            .append("createTime", getCreateTime())
+            .append("updateBy", getUpdateBy())
+            .append("updateTime", getUpdateTime())
+            .toString();
+    }
+}

+ 75 - 0
ruoyi-system/src/main/java/com/ruoyi/invest/mapper/TProjectInvestigateMapper.java

@@ -0,0 +1,75 @@
+package com.ruoyi.invest.mapper;
+
+import java.util.List;
+import com.ruoyi.invest.domain.TProjectInvestigate;
+
+/**
+ * 尽调关联Mapper接口
+ * 
+ * @author zjc
+ * @date 2024-03-13
+ */
+public interface TProjectInvestigateMapper 
+{
+    /**
+     * 查询尽调关联
+     * 
+     * @param id 尽调关联主键
+     * @return 尽调关联
+     */
+    public TProjectInvestigate selectTProjectInvestigateById(String id);
+
+    /**
+     * 查询尽调关联列表
+     * 
+     * @param tProjectInvestigate 尽调关联
+     * @return 尽调关联集合
+     */
+    public List<TProjectInvestigate> selectTProjectInvestigateList(TProjectInvestigate tProjectInvestigate);
+
+    /**
+     * 新增尽调关联
+     * 
+     * @param tProjectInvestigate 尽调关联
+     * @return 结果
+     */
+    public int insertTProjectInvestigate(TProjectInvestigate tProjectInvestigate);
+
+    /**
+     * 修改尽调关联
+     * 
+     * @param tProjectInvestigate 尽调关联
+     * @return 结果
+     */
+    public int updateTProjectInvestigate(TProjectInvestigate tProjectInvestigate);
+
+    /**
+     * 删除尽调关联
+     * 
+     * @param id 尽调关联主键
+     * @return 结果
+     */
+    public int deleteTProjectInvestigateById(String id);
+
+    /**
+     * 批量删除尽调关联
+     * 
+     * @param ids 需要删除的数据主键集合
+     * @return 结果
+     */
+    public int deleteTProjectInvestigateByIds(String[] ids);
+
+    /**
+     * 批量删除尽调关联
+     * @param ids
+     * @return
+     */
+    int updateTProjectInvestigateByIds(String[] ids);
+
+    /**
+     * 根据项目ID获取尽调数据
+     * @param projectPoolId
+     * @return
+     */
+    TProjectInvestigate listProjectPoolId(String projectPoolId);
+}

+ 71 - 0
ruoyi-system/src/main/java/com/ruoyi/invest/mapper/TProjectInvestigatePersonMapper.java

@@ -0,0 +1,71 @@
+package com.ruoyi.invest.mapper;
+
+import java.util.List;
+import com.ruoyi.invest.domain.TProjectInvestigatePerson;
+import org.apache.ibatis.annotations.Param;
+
+/**
+ * 尽调人员关联表Mapper接口
+ * 
+ * @author zjc
+ * @date 2024-03-13
+ */
+public interface TProjectInvestigatePersonMapper 
+{
+    /**
+     * 查询尽调人员关联表
+     * 
+     * @param id 尽调人员关联表主键
+     * @return 尽调人员关联表
+     */
+    public TProjectInvestigatePerson selectTProjectInvestigatePersonById(String id);
+
+    /**
+     * 查询尽调人员关联表列表
+     * 
+     * @param tProjectInvestigatePerson 尽调人员关联表
+     * @return 尽调人员关联表集合
+     */
+    public List<TProjectInvestigatePerson> selectTProjectInvestigatePersonList(TProjectInvestigatePerson tProjectInvestigatePerson);
+
+    /**
+     * 新增尽调人员关联表
+     * 
+     * @param tProjectInvestigatePerson 尽调人员关联表
+     * @return 结果
+     */
+    public int insertTProjectInvestigatePerson(TProjectInvestigatePerson tProjectInvestigatePerson);
+
+    /**
+     * 修改尽调人员关联表
+     * 
+     * @param tProjectInvestigatePerson 尽调人员关联表
+     * @return 结果
+     */
+    public int updateTProjectInvestigatePerson(TProjectInvestigatePerson tProjectInvestigatePerson);
+
+    /**
+     * 删除尽调人员关联表
+     * 
+     * @param id 尽调人员关联表主键
+     * @return 结果
+     */
+    public int deleteTProjectInvestigatePersonById(String id);
+
+    /**
+     * 批量删除尽调人员关联表
+     * 
+     * @param ids 需要删除的数据主键集合
+     * @return 结果
+     */
+    public int deleteTProjectInvestigatePersonByIds(String[] ids);
+
+    /**
+     * 根据尽调申请ID获取尽调人员关联表详细信息
+     *
+     * @param projectInvestigateId
+     * @param userId
+     * @return
+     */
+    TProjectInvestigatePerson selectByProjectInvestigateId(@Param("projectInvestigateId")String projectInvestigateId, @Param("userId")Long userId);
+}

+ 70 - 0
ruoyi-system/src/main/java/com/ruoyi/invest/service/ITProjectInvestigatePersonService.java

@@ -0,0 +1,70 @@
+package com.ruoyi.invest.service;
+
+import java.util.List;
+import com.ruoyi.invest.domain.TProjectInvestigatePerson;
+
+/**
+ * 尽调人员关联表Service接口
+ * 
+ * @author zjc
+ * @date 2024-03-13
+ */
+public interface ITProjectInvestigatePersonService 
+{
+    /**
+     * 查询尽调人员关联表
+     * 
+     * @param id 尽调人员关联表主键
+     * @return 尽调人员关联表
+     */
+    public TProjectInvestigatePerson selectTProjectInvestigatePersonById(String id);
+
+    /**
+     * 查询尽调人员关联表列表
+     * 
+     * @param tProjectInvestigatePerson 尽调人员关联表
+     * @return 尽调人员关联表集合
+     */
+    public List<TProjectInvestigatePerson> selectTProjectInvestigatePersonList(TProjectInvestigatePerson tProjectInvestigatePerson);
+
+    /**
+     * 新增尽调人员关联表
+     * 
+     * @param tProjectInvestigatePerson 尽调人员关联表
+     * @return 结果
+     */
+    public int insertTProjectInvestigatePerson(TProjectInvestigatePerson tProjectInvestigatePerson);
+
+    /**
+     * 修改尽调人员关联表
+     * 
+     * @param tProjectInvestigatePerson 尽调人员关联表
+     * @return 结果
+     */
+    public int updateTProjectInvestigatePerson(TProjectInvestigatePerson tProjectInvestigatePerson);
+
+    /**
+     * 批量删除尽调人员关联表
+     * 
+     * @param ids 需要删除的尽调人员关联表主键集合
+     * @return 结果
+     */
+    public int deleteTProjectInvestigatePersonByIds(String[] ids);
+
+    /**
+     * 删除尽调人员关联表信息
+     * 
+     * @param id 尽调人员关联表主键
+     * @return 结果
+     */
+    public int deleteTProjectInvestigatePersonById(String id);
+
+    /**
+     * 根据尽调申请ID获取尽调人员关联表详细信息
+     *
+     * @param projectInvestigateId
+     * @param userId
+     * @return
+     */
+    TProjectInvestigatePerson selectByProjectInvestigateId(String projectInvestigateId,Long userId);
+}

+ 75 - 0
ruoyi-system/src/main/java/com/ruoyi/invest/service/ITProjectInvestigateService.java

@@ -0,0 +1,75 @@
+package com.ruoyi.invest.service;
+
+import java.util.List;
+import com.ruoyi.invest.domain.TProjectInvestigate;
+
+/**
+ * 尽调关联Service接口
+ * 
+ * @author zjc
+ * @date 2024-03-13
+ */
+public interface ITProjectInvestigateService 
+{
+    /**
+     * 查询尽调关联
+     * 
+     * @param id 尽调关联主键
+     * @return 尽调关联
+     */
+    public TProjectInvestigate selectTProjectInvestigateById(String id);
+
+    /**
+     * 查询尽调关联列表
+     * 
+     * @param tProjectInvestigate 尽调关联
+     * @return 尽调关联集合
+     */
+    public List<TProjectInvestigate> selectTProjectInvestigateList(TProjectInvestigate tProjectInvestigate);
+
+    /**
+     * 新增尽调关联
+     * 
+     * @param tProjectInvestigate 尽调关联
+     * @return 结果
+     */
+    public int insertTProjectInvestigate(TProjectInvestigate tProjectInvestigate);
+
+    /**
+     * 修改尽调关联
+     * 
+     * @param tProjectInvestigate 尽调关联
+     * @return 结果
+     */
+    public int updateTProjectInvestigate(TProjectInvestigate tProjectInvestigate);
+
+    /**
+     * 批量删除尽调关联
+     * 
+     * @param ids 需要删除的尽调关联主键集合
+     * @return 结果
+     */
+    public int deleteTProjectInvestigateByIds(String[] ids);
+
+    /**
+     * 删除尽调关联信息
+     * 
+     * @param id 尽调关联主键
+     * @return 结果
+     */
+    public int deleteTProjectInvestigateById(String id);
+
+    /**
+     * 批量删除尽调关联
+     * @param ids
+     * @return
+     */
+    int updateTProjectInvestigateByIds(String[] ids);
+
+    /**
+     * 根据项目ID获取尽调
+     * @param projectPoolId
+     * @return
+     */
+    TProjectInvestigate listProjectPoolId(String projectPoolId);
+}

+ 116 - 0
ruoyi-system/src/main/java/com/ruoyi/invest/service/impl/TProjectInvestigatePersonServiceImpl.java

@@ -0,0 +1,116 @@
+package com.ruoyi.invest.service.impl;
+
+import java.util.List;
+import com.ruoyi.common.utils.DateUtils;
+import com.ruoyi.common.utils.StringUtils;
+import com.ruoyi.common.utils.uuid.IdUtils;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+import com.ruoyi.invest.mapper.TProjectInvestigatePersonMapper;
+import com.ruoyi.invest.domain.TProjectInvestigatePerson;
+import com.ruoyi.invest.service.ITProjectInvestigatePersonService;
+
+/**
+ * 尽调人员关联表Service业务层处理
+ * 
+ * @author zjc
+ * @date 2024-03-13
+ */
+@Service
+public class TProjectInvestigatePersonServiceImpl implements ITProjectInvestigatePersonService 
+{
+    @Autowired
+    private TProjectInvestigatePersonMapper tProjectInvestigatePersonMapper;
+
+    /**
+     * 查询尽调人员关联表
+     * 
+     * @param id 尽调人员关联表主键
+     * @return 尽调人员关联表
+     */
+    @Override
+    public TProjectInvestigatePerson selectTProjectInvestigatePersonById(String id)
+    {
+        return tProjectInvestigatePersonMapper.selectTProjectInvestigatePersonById(id);
+    }
+
+    /**
+     * 查询尽调人员关联表列表
+     * 
+     * @param tProjectInvestigatePerson 尽调人员关联表
+     * @return 尽调人员关联表
+     */
+    @Override
+    public List<TProjectInvestigatePerson> selectTProjectInvestigatePersonList(TProjectInvestigatePerson tProjectInvestigatePerson)
+    {
+        return tProjectInvestigatePersonMapper.selectTProjectInvestigatePersonList(tProjectInvestigatePerson);
+    }
+
+    /**
+     * 新增尽调人员关联表
+     * 
+     * @param tProjectInvestigatePerson 尽调人员关联表
+     * @return 结果
+     */
+    @Override
+    public int insertTProjectInvestigatePerson(TProjectInvestigatePerson tProjectInvestigatePerson)
+    {
+        TProjectInvestigatePerson po = tProjectInvestigatePersonMapper.selectTProjectInvestigatePersonById(tProjectInvestigatePerson.getId());
+        if(StringUtils.isNotNull(po)){
+            tProjectInvestigatePerson.setUpdateTime(DateUtils.getNowDate());
+            return tProjectInvestigatePersonMapper.updateTProjectInvestigatePerson(tProjectInvestigatePerson);
+        }else{
+            tProjectInvestigatePerson.setCreateTime(DateUtils.getNowDate());
+            return tProjectInvestigatePersonMapper.insertTProjectInvestigatePerson(tProjectInvestigatePerson);
+        }
+    }
+
+    /**
+     * 修改尽调人员关联表
+     * 
+     * @param tProjectInvestigatePerson 尽调人员关联表
+     * @return 结果
+     */
+    @Override
+    public int updateTProjectInvestigatePerson(TProjectInvestigatePerson tProjectInvestigatePerson)
+    {
+        tProjectInvestigatePerson.setUpdateTime(DateUtils.getNowDate());
+        return tProjectInvestigatePersonMapper.updateTProjectInvestigatePerson(tProjectInvestigatePerson);
+    }
+
+    /**
+     * 批量删除尽调人员关联表
+     * 
+     * @param ids 需要删除的尽调人员关联表主键
+     * @return 结果
+     */
+    @Override
+    public int deleteTProjectInvestigatePersonByIds(String[] ids)
+    {
+        return tProjectInvestigatePersonMapper.deleteTProjectInvestigatePersonByIds(ids);
+    }
+
+    /**
+     * 删除尽调人员关联表信息
+     * 
+     * @param id 尽调人员关联表主键
+     * @return 结果
+     */
+    @Override
+    public int deleteTProjectInvestigatePersonById(String id)
+    {
+        return tProjectInvestigatePersonMapper.deleteTProjectInvestigatePersonById(id);
+    }
+
+    /**
+     * 根据尽调申请ID获取尽调人员关联表详细信息
+     *
+     * @param projectInvestigateId
+     * @param userId
+     * @return
+     */
+    @Override
+    public TProjectInvestigatePerson selectByProjectInvestigateId(String projectInvestigateId, Long userId) {
+        return tProjectInvestigatePersonMapper.selectByProjectInvestigateId(projectInvestigateId,userId);
+    }
+}

+ 117 - 0
ruoyi-system/src/main/java/com/ruoyi/invest/service/impl/TProjectInvestigateServiceImpl.java

@@ -0,0 +1,117 @@
+package com.ruoyi.invest.service.impl;
+
+import java.util.List;
+import com.ruoyi.common.utils.DateUtils;
+import com.ruoyi.common.utils.uuid.IdUtils;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+import com.ruoyi.invest.mapper.TProjectInvestigateMapper;
+import com.ruoyi.invest.domain.TProjectInvestigate;
+import com.ruoyi.invest.service.ITProjectInvestigateService;
+
+/**
+ * 尽调关联Service业务层处理
+ * 
+ * @author zjc
+ * @date 2024-03-13
+ */
+@Service
+public class TProjectInvestigateServiceImpl implements ITProjectInvestigateService 
+{
+    @Autowired
+    private TProjectInvestigateMapper tProjectInvestigateMapper;
+
+    /**
+     * 查询尽调关联
+     * 
+     * @param id 尽调关联主键
+     * @return 尽调关联
+     */
+    @Override
+    public TProjectInvestigate selectTProjectInvestigateById(String id)
+    {
+        return tProjectInvestigateMapper.selectTProjectInvestigateById(id);
+    }
+
+    /**
+     * 查询尽调关联列表
+     * 
+     * @param tProjectInvestigate 尽调关联
+     * @return 尽调关联
+     */
+    @Override
+    public List<TProjectInvestigate> selectTProjectInvestigateList(TProjectInvestigate tProjectInvestigate)
+    {
+        return tProjectInvestigateMapper.selectTProjectInvestigateList(tProjectInvestigate);
+    }
+
+    /**
+     * 新增尽调关联
+     * 
+     * @param tProjectInvestigate 尽调关联
+     * @return 结果
+     */
+    @Override
+    public int insertTProjectInvestigate(TProjectInvestigate tProjectInvestigate)
+    {
+        tProjectInvestigate.setCreateTime(DateUtils.getNowDate());
+        return tProjectInvestigateMapper.insertTProjectInvestigate(tProjectInvestigate);
+    }
+
+    /**
+     * 修改尽调关联
+     * 
+     * @param tProjectInvestigate 尽调关联
+     * @return 结果
+     */
+    @Override
+    public int updateTProjectInvestigate(TProjectInvestigate tProjectInvestigate)
+    {
+        tProjectInvestigate.setUpdateTime(DateUtils.getNowDate());
+        return tProjectInvestigateMapper.updateTProjectInvestigate(tProjectInvestigate);
+    }
+
+    /**
+     * 批量删除尽调关联
+     * 
+     * @param ids 需要删除的尽调关联主键
+     * @return 结果
+     */
+    @Override
+    public int deleteTProjectInvestigateByIds(String[] ids)
+    {
+        return tProjectInvestigateMapper.deleteTProjectInvestigateByIds(ids);
+    }
+
+    /**
+     * 删除尽调关联信息
+     * 
+     * @param id 尽调关联主键
+     * @return 结果
+     */
+    @Override
+    public int deleteTProjectInvestigateById(String id)
+    {
+        return tProjectInvestigateMapper.deleteTProjectInvestigateById(id);
+    }
+
+    /**
+     * 批量删除尽调关联
+     * @param ids 需要删除的尽调关联主键
+     * @return
+     */
+    @Override
+    public int updateTProjectInvestigateByIds(String[] ids) {
+        return tProjectInvestigateMapper.updateTProjectInvestigateByIds(ids);
+    }
+
+    /**
+     * 根据项目ID获取尽调数据
+     * @param projectPoolId
+     * @return
+     */
+    @Override
+    public TProjectInvestigate listProjectPoolId(String projectPoolId) {
+        return tProjectInvestigateMapper.listProjectPoolId(projectPoolId);
+    }
+}

+ 128 - 0
ruoyi-system/src/main/resources/mapper/invest/TProjectInvestigateMapper.xml

@@ -0,0 +1,128 @@
+<?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.ruoyi.invest.mapper.TProjectInvestigateMapper">
+    
+    <resultMap type="TProjectInvestigate" id="TProjectInvestigateResult">
+        <result property="id"    column="id"    />
+        <result property="investigateName"    column="investigate_name"    />
+        <result property="investigateCode"    column="investigate_code"    />
+        <result property="projectPoolId"    column="project_pool_id"    />
+        <result property="investigatePerson"    column="investigate_person"    />
+        <result property="investigatePersonId"    column="investigate_person_id"    />
+        <result property="investigateCost"    column="investigate_cost"    />
+        <result property="describe"    column="describe_"    />
+        <result property="remark"    column="remark"    />
+        <result property="delFlag"    column="del_flag"    />
+        <result property="createBy"    column="create_by"    />
+        <result property="createTime"    column="create_time"    />
+        <result property="updateBy"    column="update_by"    />
+        <result property="updateTime"    column="update_time"    />
+    </resultMap>
+
+    <sql id="selectTProjectInvestigateVo">
+        select id, investigate_name, investigate_code, project_pool_id, investigate_person, investigate_person_id, investigate_cost, describe_, remark, del_flag, create_by, create_time, update_by, update_time from t_project_investigate
+    </sql>
+
+    <select id="selectTProjectInvestigateList" parameterType="TProjectInvestigate" resultMap="TProjectInvestigateResult">
+        <include refid="selectTProjectInvestigateVo"/>
+        <where>
+            del_flag = 0
+            <if test="investigateName != null  and investigateName != ''"> and investigate_name like concat('%', #{investigateName}, '%')</if>
+            <if test="investigateCode != null  and investigateCode != ''"> and investigate_code = #{investigateCode}</if>
+            <if test="projectPoolId != null  and projectPoolId != ''"> and project_pool_id = #{projectPoolId}</if>
+            <if test="investigatePerson != null  and investigatePerson != ''"> and investigate_person = #{investigatePerson}</if>
+            <if test="investigateCost != null  and investigateCost != ''"> and investigate_cost = #{investigateCost}</if>
+            <if test="describe != null  and describe != ''"> and describe = #{describe}</if>
+        </where>
+    </select>
+    
+    <select id="selectTProjectInvestigateById" parameterType="String" resultMap="TProjectInvestigateResult">
+        <include refid="selectTProjectInvestigateVo"/>
+        where id = #{id}
+    </select>
+        
+    <insert id="insertTProjectInvestigate" parameterType="TProjectInvestigate">
+        insert into t_project_investigate
+        <trim prefix="(" suffix=")" suffixOverrides=",">
+            <if test="id != null">id,</if>
+            <if test="investigateName != null">investigate_name,</if>
+            <if test="investigateCode != null">investigate_code,</if>
+            <if test="projectPoolId != null">project_pool_id,</if>
+            <if test="investigatePerson != null">investigate_person,</if>
+            <if test="investigatePersonId != null">investigate_person_id,</if>
+            <if test="investigateCost != null">investigate_cost,</if>
+            <if test="describe != null">describe_,</if>
+            <if test="remark != null">remark,</if>
+            <if test="delFlag != null">del_flag,</if>
+            <if test="createBy != null">create_by,</if>
+            <if test="createTime != null">create_time,</if>
+            <if test="updateBy != null">update_by,</if>
+            <if test="updateTime != null">update_time,</if>
+         </trim>
+        <trim prefix="values (" suffix=")" suffixOverrides=",">
+            <if test="id != null">#{id},</if>
+            <if test="investigateName != null">#{investigateName},</if>
+            <if test="investigateCode != null">#{investigateCode},</if>
+            <if test="projectPoolId != null">#{projectPoolId},</if>
+            <if test="investigatePerson != null">#{investigatePerson},</if>
+            <if test="investigatePersonId != null">#{investigatePersonId},</if>
+            <if test="investigateCost != null">#{investigateCost},</if>
+            <if test="describe != null">#{describe},</if>
+            <if test="remark != null">#{remark},</if>
+            <if test="delFlag != null">#{delFlag},</if>
+            <if test="createBy != null">#{createBy},</if>
+            <if test="createTime != null">#{createTime},</if>
+            <if test="updateBy != null">#{updateBy},</if>
+            <if test="updateTime != null">#{updateTime},</if>
+         </trim>
+    </insert>
+
+    <update id="updateTProjectInvestigate" parameterType="TProjectInvestigate">
+        update t_project_investigate
+        <trim prefix="SET" suffixOverrides=",">
+            <if test="investigateName != null">investigate_name = #{investigateName},</if>
+            <if test="investigateCode != null">investigate_code = #{investigateCode},</if>
+            <if test="projectPoolId != null">project_pool_id = #{projectPoolId},</if>
+            <if test="investigatePerson != null">investigate_person = #{investigatePerson},</if>
+            <if test="investigatePersonId != null">investigate_person_id = #{investigatePersonId},</if>
+            <if test="investigateCost != null">investigate_cost = #{investigateCost},</if>
+            <if test="describe != null">describe_ = #{describe},</if>
+            <if test="remark != null">remark = #{remark},</if>
+            <if test="delFlag != null">del_flag = #{delFlag},</if>
+            <if test="createBy != null">create_by = #{createBy},</if>
+            <if test="createTime != null">create_time = #{createTime},</if>
+            <if test="updateBy != null">update_by = #{updateBy},</if>
+            <if test="updateTime != null">update_time = #{updateTime},</if>
+        </trim>
+        where id = #{id}
+    </update>
+
+    <delete id="deleteTProjectInvestigateById" parameterType="String">
+        delete from t_project_investigate where id = #{id}
+    </delete>
+
+    <delete id="deleteTProjectInvestigateByIds" parameterType="String">
+        delete from t_project_investigate where id in 
+        <foreach item="id" collection="array" open="(" separator="," close=")">
+            #{id}
+        </foreach>
+    </delete>
+
+    <update id="updateTProjectInvestigateByIds" parameterType="String">
+        update t_project_investigate
+        set del_flag = 1
+        where id in
+        <foreach item="id" collection="array" open="(" separator="," close=")">
+            #{id}
+        </foreach>
+    </update>
+
+    <select id="listProjectPoolId" parameterType="String" resultMap="TProjectInvestigateResult">
+        <include refid="selectTProjectInvestigateVo"/>
+        where project_pool_id = #{projectPoolId} and del_flag = 0
+    </select>
+
+
+</mapper>

+ 104 - 0
ruoyi-system/src/main/resources/mapper/invest/TProjectInvestigatePersonMapper.xml

@@ -0,0 +1,104 @@
+<?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.ruoyi.invest.mapper.TProjectInvestigatePersonMapper">
+    
+    <resultMap type="TProjectInvestigatePerson" id="TProjectInvestigatePersonResult">
+        <result property="id"    column="id"    />
+        <result property="projectInvestigateId"    column="project_investigate_id"    />
+        <result property="investigatePerson"    column="investigate_person"    />
+        <result property="investigatePersonId"    column="investigate_person_id"    />
+        <result property="deptId"    column="dept_id"    />
+        <result property="deptName"    column="dept_name"    />
+        <result property="remark"    column="remark"    />
+        <result property="createBy"    column="create_by"    />
+        <result property="createTime"    column="create_time"    />
+        <result property="updateBy"    column="update_by"    />
+        <result property="updateTime"    column="update_time"    />
+    </resultMap>
+
+    <sql id="selectTProjectInvestigatePersonVo">
+        select id, project_investigate_id, investigate_person, investigate_person_id, dept_id, dept_name, remark, create_by, create_time, update_by, update_time from t_project_investigate_person
+    </sql>
+
+    <select id="selectTProjectInvestigatePersonList" parameterType="TProjectInvestigatePerson" resultMap="TProjectInvestigatePersonResult">
+        <include refid="selectTProjectInvestigatePersonVo"/>
+        <where>  
+            <if test="projectInvestigateId != null  and projectInvestigateId != ''"> and project_investigate_id = #{projectInvestigateId}</if>
+            <if test="investigatePerson != null  and investigatePerson != ''"> and investigate_person = #{investigatePerson}</if>
+            <if test="investigatePersonId != null  and investigatePersonId != ''"> and investigate_person_id = #{investigatePersonId}</if>
+            <if test="deptId != null "> and dept_id = #{deptId}</if>
+            <if test="deptName != null  and deptName != ''"> and dept_name like concat('%', #{deptName}, '%')</if>
+        </where>
+    </select>
+    
+    <select id="selectTProjectInvestigatePersonById" parameterType="String" resultMap="TProjectInvestigatePersonResult">
+        <include refid="selectTProjectInvestigatePersonVo"/>
+        where id = #{id}
+    </select>
+        
+    <insert id="insertTProjectInvestigatePerson" parameterType="TProjectInvestigatePerson">
+        insert into t_project_investigate_person
+        <trim prefix="(" suffix=")" suffixOverrides=",">
+            <if test="id != null">id,</if>
+            <if test="projectInvestigateId != null">project_investigate_id,</if>
+            <if test="investigatePerson != null">investigate_person,</if>
+            <if test="investigatePersonId != null">investigate_person_id,</if>
+            <if test="deptId != null">dept_id,</if>
+            <if test="deptName != null">dept_name,</if>
+            <if test="remark != null">remark,</if>
+            <if test="createBy != null">create_by,</if>
+            <if test="createTime != null">create_time,</if>
+            <if test="updateBy != null">update_by,</if>
+            <if test="updateTime != null">update_time,</if>
+         </trim>
+        <trim prefix="values (" suffix=")" suffixOverrides=",">
+            <if test="id != null">#{id},</if>
+            <if test="projectInvestigateId != null">#{projectInvestigateId},</if>
+            <if test="investigatePerson != null">#{investigatePerson},</if>
+            <if test="investigatePersonId != null">#{investigatePersonId},</if>
+            <if test="deptId != null">#{deptId},</if>
+            <if test="deptName != null">#{deptName},</if>
+            <if test="remark != null">#{remark},</if>
+            <if test="createBy != null">#{createBy},</if>
+            <if test="createTime != null">#{createTime},</if>
+            <if test="updateBy != null">#{updateBy},</if>
+            <if test="updateTime != null">#{updateTime},</if>
+         </trim>
+    </insert>
+
+    <update id="updateTProjectInvestigatePerson" parameterType="TProjectInvestigatePerson">
+        update t_project_investigate_person
+        <trim prefix="SET" suffixOverrides=",">
+            <if test="projectInvestigateId != null">project_investigate_id = #{projectInvestigateId},</if>
+            <if test="investigatePerson != null">investigate_person = #{investigatePerson},</if>
+            <if test="investigatePersonId != null">investigate_person_id = #{investigatePersonId},</if>
+            <if test="deptId != null">dept_id = #{deptId},</if>
+            <if test="deptName != null">dept_name = #{deptName},</if>
+            <if test="remark != null">remark = #{remark},</if>
+            <if test="createBy != null">create_by = #{createBy},</if>
+            <if test="createTime != null">create_time = #{createTime},</if>
+            <if test="updateBy != null">update_by = #{updateBy},</if>
+            <if test="updateTime != null">update_time = #{updateTime},</if>
+        </trim>
+        where id = #{id}
+    </update>
+
+    <delete id="deleteTProjectInvestigatePersonById" parameterType="String">
+        delete from t_project_investigate_person where id = #{id}
+    </delete>
+
+    <delete id="deleteTProjectInvestigatePersonByIds" parameterType="String">
+        delete from t_project_investigate_person where id in 
+        <foreach item="id" collection="array" open="(" separator="," close=")">
+            #{id}
+        </foreach>
+    </delete>
+
+    <select id="selectByProjectInvestigateId" parameterType="String" resultMap="TProjectInvestigatePersonResult">
+        <include refid="selectTProjectInvestigatePersonVo"/>
+        where project_investigate_id = #{projectInvestigateId} and investigate_person_id = #{userId}
+    </select>
+
+</mapper>