Przeglądaj źródła

Merge branch 'invest-dev' of http://git.dgtis.com/15896567520/RuoYi-flowable-master into invest-dev

armg 1 rok temu
rodzic
commit
03ded8fb05

+ 105 - 0
ruoyi-admin/src/main/java/com/ruoyi/web/controller/invest/TProjectRecordController.java

@@ -0,0 +1,105 @@
+package com.ruoyi.web.controller.invest;
+
+import java.util.List;
+import javax.servlet.http.HttpServletResponse;
+
+import com.ruoyi.system.domain.invest.TProjectRecord;
+import com.ruoyi.system.service.invest.ITProjectRecordService;
+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.common.utils.poi.ExcelUtil;
+import com.ruoyi.common.core.page.TableDataInfo;
+
+/**
+ * 跟进记录Controller
+ * 
+ * @author ruoyi
+ * @date 2024-02-21
+ */
+@RestController
+@RequestMapping("/invest/record")
+public class TProjectRecordController extends BaseController
+{
+    @Autowired
+    private ITProjectRecordService tProjectRecordService;
+
+    /**
+     * 查询跟进记录列表
+     */
+    @PreAuthorize("@ss.hasPermi('invest:record:list')")
+    @GetMapping("/list")
+    public TableDataInfo list(TProjectRecord tProjectRecord)
+    {
+        startPage();
+        List<TProjectRecord> list = tProjectRecordService.selectTProjectRecordList(tProjectRecord);
+        return getDataTable(list);
+    }
+
+    /**
+     * 导出跟进记录列表
+     */
+    @PreAuthorize("@ss.hasPermi('invest:record:export')")
+    @Log(title = "跟进记录", businessType = BusinessType.EXPORT)
+    @PostMapping("/export")
+    public void export(HttpServletResponse response, TProjectRecord tProjectRecord)
+    {
+        List<TProjectRecord> list = tProjectRecordService.selectTProjectRecordList(tProjectRecord);
+        ExcelUtil<TProjectRecord> util = new ExcelUtil<TProjectRecord>(TProjectRecord.class);
+        util.exportExcel(response, list, "跟进记录数据");
+    }
+
+    /**
+     * 获取跟进记录详细信息
+     */
+    @PreAuthorize("@ss.hasPermi('invest:record:query')")
+    @GetMapping(value = "/{id}")
+    public AjaxResult getInfo(@PathVariable("id") String id)
+    {
+        return success(tProjectRecordService.selectTProjectRecordById(id));
+    }
+
+    /**
+     * 新增跟进记录
+     */
+    @PreAuthorize("@ss.hasPermi('invest:record:add')")
+    @Log(title = "跟进记录", businessType = BusinessType.INSERT)
+    @PostMapping
+    public AjaxResult add(@RequestBody TProjectRecord tProjectRecord)
+    {
+        return toAjax(tProjectRecordService.insertTProjectRecord(tProjectRecord));
+    }
+
+    /**
+     * 修改跟进记录
+     */
+    @PreAuthorize("@ss.hasPermi('invest:record:edit')")
+    @Log(title = "跟进记录", businessType = BusinessType.UPDATE)
+    @PutMapping
+    public AjaxResult edit(@RequestBody TProjectRecord tProjectRecord)
+    {
+        return toAjax(tProjectRecordService.updateTProjectRecord(tProjectRecord));
+    }
+
+    /**
+     * 删除跟进记录
+     */
+    @PreAuthorize("@ss.hasPermi('invest:record:remove')")
+    @Log(title = "跟进记录", businessType = BusinessType.DELETE)
+	@DeleteMapping("/{ids}")
+    public AjaxResult remove(@PathVariable String[] ids)
+    {
+        return toAjax(tProjectRecordService.deleteTProjectRecordByIds(ids));
+    }
+}

+ 2 - 0
ruoyi-generator/src/main/resources/vm/java/serviceImpl.java.vm

@@ -12,6 +12,7 @@ import org.springframework.stereotype.Service;
 #if($table.sub)
 import java.util.ArrayList;
 import com.ruoyi.common.utils.StringUtils;
+import com.ruoyi.common.utils.uuid.IdUtils;
 import org.springframework.transaction.annotation.Transactional;
 import ${packageName}.domain.${subClassName};
 #end
@@ -70,6 +71,7 @@ public class ${ClassName}ServiceImpl implements I${ClassName}Service
 #foreach ($column in $columns)
 #if($column.javaField == 'createTime')
         ${className}.setCreateTime(DateUtils.getNowDate());
+        ${className}.setId(IdUtils.fastSimpleUUID());
 #end
 #end
 #if($table.sub)

+ 1 - 0
ruoyi-system/src/main/java/com/ruoyi/system/domain/invest/TProjectPool.java

@@ -18,6 +18,7 @@ public class TProjectPool extends BaseEntity
     private static final long serialVersionUID = 1L;
 
     /** 主键id */
+
     private String id;
 
     /** 项目名称 */

+ 153 - 0
ruoyi-system/src/main/java/com/ruoyi/system/domain/invest/TProjectRecord.java

@@ -0,0 +1,153 @@
+package com.ruoyi.system.domain.invest;
+
+import java.util.Date;
+import com.fasterxml.jackson.annotation.JsonFormat;
+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;
+
+/**
+ * 跟进记录对象 t_project_record
+ * 
+ * @author ruoyi
+ * @date 2024-02-21
+ */
+public class TProjectRecord extends BaseEntity
+{
+    private static final long serialVersionUID = 1L;
+
+    /** 主键ID */
+    private String id;
+
+    /** 项目ID */
+    @Excel(name = "项目ID")
+    private String porjectId;
+
+    /** 联系人 */
+    @Excel(name = "联系人")
+    private String contacts;
+
+    /** 实际跟进日期 */
+    @JsonFormat(pattern = "yyyy-MM-dd")
+    @Excel(name = "实际跟进日期", width = 30, dateFormat = "yyyy-MM-dd")
+    private Date realityUpDate;
+
+    /** 跟进人 */
+    @Excel(name = "跟进人")
+    private String upPerson;
+
+    /** 跟进方式 */
+    @Excel(name = "跟进方式")
+    private String upWay;
+
+    /** 跟进内容 */
+    private String upContent;
+
+    /** 备注 */
+    private String mark;
+
+    /** 状态 */
+    private String delFlag;
+
+    public void setId(String id) 
+    {
+        this.id = id;
+    }
+
+    public String getId() 
+    {
+        return id;
+    }
+    public void setPorjectId(String porjectId) 
+    {
+        this.porjectId = porjectId;
+    }
+
+    public String getPorjectId() 
+    {
+        return porjectId;
+    }
+    public void setContacts(String contacts) 
+    {
+        this.contacts = contacts;
+    }
+
+    public String getContacts() 
+    {
+        return contacts;
+    }
+    public void setRealityUpDate(Date realityUpDate) 
+    {
+        this.realityUpDate = realityUpDate;
+    }
+
+    public Date getRealityUpDate() 
+    {
+        return realityUpDate;
+    }
+    public void setUpPerson(String upPerson) 
+    {
+        this.upPerson = upPerson;
+    }
+
+    public String getUpPerson() 
+    {
+        return upPerson;
+    }
+    public void setUpWay(String upWay) 
+    {
+        this.upWay = upWay;
+    }
+
+    public String getUpWay() 
+    {
+        return upWay;
+    }
+    public void setUpContent(String upContent) 
+    {
+        this.upContent = upContent;
+    }
+
+    public String getUpContent() 
+    {
+        return upContent;
+    }
+    public void setMark(String mark) 
+    {
+        this.mark = mark;
+    }
+
+    public String getMark() 
+    {
+        return mark;
+    }
+    public void setDelFlag(String delFlag) 
+    {
+        this.delFlag = delFlag;
+    }
+
+    public String getDelFlag() 
+    {
+        return delFlag;
+    }
+
+    @Override
+    public String toString() {
+        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
+            .append("id", getId())
+            .append("porjectId", getPorjectId())
+            .append("contacts", getContacts())
+            .append("realityUpDate", getRealityUpDate())
+            .append("upPerson", getUpPerson())
+            .append("upWay", getUpWay())
+            .append("upContent", getUpContent())
+            .append("mark", getMark())
+            .append("delFlag", getDelFlag())
+            .append("createBy", getCreateBy())
+            .append("createTime", getCreateTime())
+            .append("updateBy", getUpdateBy())
+            .append("updateTime", getUpdateTime())
+            .toString();
+    }
+}

+ 62 - 0
ruoyi-system/src/main/java/com/ruoyi/system/mapper/invest/TProjectRecordMapper.java

@@ -0,0 +1,62 @@
+package com.ruoyi.system.mapper.invest;
+
+import com.ruoyi.system.domain.invest.TProjectRecord;
+
+import java.util.List;
+
+/**
+ * 跟进记录Mapper接口
+ * 
+ * @author ruoyi
+ * @date 2024-02-21
+ */
+public interface TProjectRecordMapper 
+{
+    /**
+     * 查询跟进记录
+     * 
+     * @param id 跟进记录主键
+     * @return 跟进记录
+     */
+    public TProjectRecord selectTProjectRecordById(String id);
+
+    /**
+     * 查询跟进记录列表
+     * 
+     * @param tProjectRecord 跟进记录
+     * @return 跟进记录集合
+     */
+    public List<TProjectRecord> selectTProjectRecordList(TProjectRecord tProjectRecord);
+
+    /**
+     * 新增跟进记录
+     * 
+     * @param tProjectRecord 跟进记录
+     * @return 结果
+     */
+    public int insertTProjectRecord(TProjectRecord tProjectRecord);
+
+    /**
+     * 修改跟进记录
+     * 
+     * @param tProjectRecord 跟进记录
+     * @return 结果
+     */
+    public int updateTProjectRecord(TProjectRecord tProjectRecord);
+
+    /**
+     * 删除跟进记录
+     * 
+     * @param id 跟进记录主键
+     * @return 结果
+     */
+    public int deleteTProjectRecordById(String id);
+
+    /**
+     * 批量删除跟进记录
+     * 
+     * @param ids 需要删除的数据主键集合
+     * @return 结果
+     */
+    public int deleteTProjectRecordByIds(String[] ids);
+}

+ 62 - 0
ruoyi-system/src/main/java/com/ruoyi/system/service/invest/ITProjectRecordService.java

@@ -0,0 +1,62 @@
+package com.ruoyi.system.service.invest;
+
+import com.ruoyi.system.domain.invest.TProjectRecord;
+
+import java.util.List;
+
+/**
+ * 跟进记录Service接口
+ * 
+ * @author ruoyi
+ * @date 2024-02-21
+ */
+public interface ITProjectRecordService 
+{
+    /**
+     * 查询跟进记录
+     * 
+     * @param id 跟进记录主键
+     * @return 跟进记录
+     */
+    public TProjectRecord selectTProjectRecordById(String id);
+
+    /**
+     * 查询跟进记录列表
+     * 
+     * @param tProjectRecord 跟进记录
+     * @return 跟进记录集合
+     */
+    public List<TProjectRecord> selectTProjectRecordList(TProjectRecord tProjectRecord);
+
+    /**
+     * 新增跟进记录
+     * 
+     * @param tProjectRecord 跟进记录
+     * @return 结果
+     */
+    public int insertTProjectRecord(TProjectRecord tProjectRecord);
+
+    /**
+     * 修改跟进记录
+     * 
+     * @param tProjectRecord 跟进记录
+     * @return 结果
+     */
+    public int updateTProjectRecord(TProjectRecord tProjectRecord);
+
+    /**
+     * 批量删除跟进记录
+     * 
+     * @param ids 需要删除的跟进记录主键集合
+     * @return 结果
+     */
+    public int deleteTProjectRecordByIds(String[] ids);
+
+    /**
+     * 删除跟进记录信息
+     * 
+     * @param id 跟进记录主键
+     * @return 结果
+     */
+    public int deleteTProjectRecordById(String id);
+}

+ 5 - 0
ruoyi-system/src/main/java/com/ruoyi/system/service/invest/impl/TProjectPoolServiceImpl.java

@@ -1,7 +1,11 @@
 package com.ruoyi.system.service.invest.impl;
 
 import java.util.List;
+import java.util.UUID;
+
+import com.fasterxml.jackson.annotation.ObjectIdGenerators;
 import com.ruoyi.common.utils.DateUtils;
+import com.ruoyi.common.utils.uuid.IdUtils;
 import com.ruoyi.system.domain.invest.TProjectPool;
 import com.ruoyi.system.mapper.invest.TProjectPoolMapper;
 import com.ruoyi.system.service.invest.ITProjectPoolService;
@@ -54,6 +58,7 @@ public class TProjectPoolServiceImpl implements ITProjectPoolService
     public int insertTProjectPool(TProjectPool tProjectPool)
     {
         tProjectPool.setCreateTime(DateUtils.getNowDate());
+        tProjectPool.setId(IdUtils.fastSimpleUUID());
         return tProjectPoolMapper.insertTProjectPool(tProjectPool);
     }
 

+ 98 - 0
ruoyi-system/src/main/java/com/ruoyi/system/service/invest/impl/TProjectRecordServiceImpl.java

@@ -0,0 +1,98 @@
+package com.ruoyi.system.service.invest.impl;
+
+import java.util.List;
+import com.ruoyi.common.utils.DateUtils;
+import com.ruoyi.common.utils.uuid.IdUtils;
+import com.ruoyi.system.domain.invest.TProjectRecord;
+import com.ruoyi.system.mapper.invest.TProjectRecordMapper;
+import com.ruoyi.system.service.invest.ITProjectRecordService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+/**
+ * 跟进记录Service业务层处理
+ * 
+ * @author ruoyi
+ * @date 2024-02-21
+ */
+@Service
+public class TProjectRecordServiceImpl implements ITProjectRecordService
+{
+    @Autowired
+    private TProjectRecordMapper tProjectRecordMapper;
+
+    /**
+     * 查询跟进记录
+     * 
+     * @param id 跟进记录主键
+     * @return 跟进记录
+     */
+    @Override
+    public TProjectRecord selectTProjectRecordById(String id)
+    {
+        return tProjectRecordMapper.selectTProjectRecordById(id);
+    }
+
+    /**
+     * 查询跟进记录列表
+     * 
+     * @param tProjectRecord 跟进记录
+     * @return 跟进记录
+     */
+    @Override
+    public List<TProjectRecord> selectTProjectRecordList(TProjectRecord tProjectRecord)
+    {
+        return tProjectRecordMapper.selectTProjectRecordList(tProjectRecord);
+    }
+
+    /**
+     * 新增跟进记录
+     * 
+     * @param tProjectRecord 跟进记录
+     * @return 结果
+     */
+    @Override
+    public int insertTProjectRecord(TProjectRecord tProjectRecord)
+    {
+        tProjectRecord.setCreateTime(DateUtils.getNowDate());
+        tProjectRecord.setId(IdUtils.fastSimpleUUID());
+        return tProjectRecordMapper.insertTProjectRecord(tProjectRecord);
+    }
+
+    /**
+     * 修改跟进记录
+     * 
+     * @param tProjectRecord 跟进记录
+     * @return 结果
+     */
+    @Override
+    public int updateTProjectRecord(TProjectRecord tProjectRecord)
+    {
+        tProjectRecord.setUpdateTime(DateUtils.getNowDate());
+        return tProjectRecordMapper.updateTProjectRecord(tProjectRecord);
+    }
+
+    /**
+     * 批量删除跟进记录
+     * 
+     * @param ids 需要删除的跟进记录主键
+     * @return 结果
+     */
+    @Override
+    public int deleteTProjectRecordByIds(String[] ids)
+    {
+        return tProjectRecordMapper.deleteTProjectRecordByIds(ids);
+    }
+
+    /**
+     * 删除跟进记录信息
+     * 
+     * @param id 跟进记录主键
+     * @return 结果
+     */
+    @Override
+    public int deleteTProjectRecordById(String id)
+    {
+        return tProjectRecordMapper.deleteTProjectRecordById(id);
+    }
+}

+ 106 - 0
ruoyi-system/src/main/resources/mapper/invest/TProjectRecordMapper.xml

@@ -0,0 +1,106 @@
+<?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.system.mapper.invest.TProjectRecordMapper">
+    
+    <resultMap type="TProjectRecord" id="TProjectRecordResult">
+        <result property="id"    column="id"    />
+        <result property="porjectId"    column="porject_id"    />
+        <result property="contacts"    column="contacts"    />
+        <result property="realityUpDate"    column="reality_up_date"    />
+        <result property="upPerson"    column="up_person"    />
+        <result property="upWay"    column="up_way"    />
+        <result property="upContent"    column="up_content"    />
+        <result property="mark"    column="mark"    />
+        <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="selectTProjectRecordVo">
+        select id, porject_id, contacts, reality_up_date, up_person, up_way, up_content, mark, del_flag, create_by, create_time, update_by, update_time from t_project_record
+    </sql>
+
+    <select id="selectTProjectRecordList" parameterType="TProjectRecord" resultMap="TProjectRecordResult">
+        <include refid="selectTProjectRecordVo"/>
+        <where>  
+            <if test="porjectId != null  and porjectId != ''"> and porject_id = #{porjectId}</if>
+            <if test="contacts != null  and contacts != ''"> and contacts = #{contacts}</if>
+            <if test="realityUpDate != null "> and reality_up_date = #{realityUpDate}</if>
+            <if test="upPerson != null  and upPerson != ''"> and up_person = #{upPerson}</if>
+            <if test="upWay != null  and upWay != ''"> and up_way = #{upWay}</if>
+        </where>
+    </select>
+    
+    <select id="selectTProjectRecordById" parameterType="String" resultMap="TProjectRecordResult">
+        <include refid="selectTProjectRecordVo"/>
+        where id = #{id}
+    </select>
+        
+    <insert id="insertTProjectRecord" parameterType="TProjectRecord">
+        insert into t_project_record
+        <trim prefix="(" suffix=")" suffixOverrides=",">
+            <if test="id != null">id,</if>
+            <if test="porjectId != null">porject_id,</if>
+            <if test="contacts != null">contacts,</if>
+            <if test="realityUpDate != null">reality_up_date,</if>
+            <if test="upPerson != null">up_person,</if>
+            <if test="upWay != null">up_way,</if>
+            <if test="upContent != null">up_content,</if>
+            <if test="mark != null">mark,</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="porjectId != null">#{porjectId},</if>
+            <if test="contacts != null">#{contacts},</if>
+            <if test="realityUpDate != null">#{realityUpDate},</if>
+            <if test="upPerson != null">#{upPerson},</if>
+            <if test="upWay != null">#{upWay},</if>
+            <if test="upContent != null">#{upContent},</if>
+            <if test="mark != null">#{mark},</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="updateTProjectRecord" parameterType="TProjectRecord">
+        update t_project_record
+        <trim prefix="SET" suffixOverrides=",">
+            <if test="porjectId != null">porject_id = #{porjectId},</if>
+            <if test="contacts != null">contacts = #{contacts},</if>
+            <if test="realityUpDate != null">reality_up_date = #{realityUpDate},</if>
+            <if test="upPerson != null">up_person = #{upPerson},</if>
+            <if test="upWay != null">up_way = #{upWay},</if>
+            <if test="upContent != null">up_content = #{upContent},</if>
+            <if test="mark != null">mark = #{mark},</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="deleteTProjectRecordById" parameterType="String">
+        delete from t_project_record where id = #{id}
+    </delete>
+
+    <delete id="deleteTProjectRecordByIds" parameterType="String">
+        delete from t_project_record where id in 
+        <foreach item="id" collection="array" open="(" separator="," close=")">
+            #{id}
+        </foreach>
+    </delete>
+</mapper>