소스 검색

1.通话记录增加语音文件地址字段 2.停水公告关联小区泵站逻辑调整 新增关系表

王苗苗 2 주 전
부모
커밋
6af63189e7

+ 11 - 171
slibra-system/src/main/java/com/slibra/business/domain/TCallRecord.java

@@ -2,6 +2,10 @@ package com.slibra.business.domain;
 
 import java.util.Date;
 import com.fasterxml.jackson.annotation.JsonFormat;
+import lombok.AllArgsConstructor;
+import lombok.Builder;
+import lombok.Data;
+import lombok.NoArgsConstructor;
 import org.apache.commons.lang3.builder.ToStringBuilder;
 import org.apache.commons.lang3.builder.ToStringStyle;
 import com.slibra.common.annotation.Excel;
@@ -13,6 +17,10 @@ import com.slibra.common.core.domain.BaseEntity;
  * @author slibra
  * @date 2024-11-11
  */
+@Data
+@Builder
+@NoArgsConstructor
+@AllArgsConstructor
 public class TCallRecord extends BaseEntity
 {
     private static final long serialVersionUID = 1L;
@@ -66,6 +74,9 @@ public class TCallRecord extends BaseEntity
     @Excel(name = "业务类型", readConverterExp = "创=个返回字符串")
     private String bussinessType;
 
+    //存储语音的URL
+    private String url;
+
     /** 是否已转录音(0否 1是) */
     @Excel(name = "是否已转录音", readConverterExp = "0=否,1=是")
     private Long hasParsed;
@@ -81,175 +92,4 @@ public class TCallRecord extends BaseEntity
     @Excel(name = "乐观锁")
     private Long revision;
 
-    public void setId(Long id) 
-    {
-        this.id = id;
-    }
-
-    public Long getId() 
-    {
-        return id;
-    }
-    public void setType(Long type) 
-    {
-        this.type = type;
-    }
-
-    public Long getType() 
-    {
-        return type;
-    }
-    public void setUserId(Long userId) 
-    {
-        this.userId = userId;
-    }
-
-    public Long getUserId() 
-    {
-        return userId;
-    }
-    public void setUserName(String userName) 
-    {
-        this.userName = userName;
-    }
-
-    public String getUserName() 
-    {
-        return userName;
-    }
-    public void setServiceCategory(Long serviceCategory) 
-    {
-        this.serviceCategory = serviceCategory;
-    }
-
-    public Long getServiceCategory() 
-    {
-        return serviceCategory;
-    }
-    public void setTimeBegin(Date timeBegin) 
-    {
-        this.timeBegin = timeBegin;
-    }
-
-    public Date getTimeBegin() 
-    {
-        return timeBegin;
-    }
-    public void setTimeEnd(Date timeEnd) 
-    {
-        this.timeEnd = timeEnd;
-    }
-
-    public Date getTimeEnd() 
-    {
-        return timeEnd;
-    }
-    public void setTimes(String times) 
-    {
-        this.times = times;
-    }
-
-    public String getTimes() 
-    {
-        return times;
-    }
-    public void setCategory(Long category) 
-    {
-        this.category = category;
-    }
-
-    public Long getCategory() 
-    {
-        return category;
-    }
-    public void setStatus(Long status) 
-    {
-        this.status = status;
-    }
-
-    public Long getStatus() 
-    {
-        return status;
-    }
-    public void setPhone(String phone) 
-    {
-        this.phone = phone;
-    }
-
-    public String getPhone() 
-    {
-        return phone;
-    }
-    public void setBussinessType(String bussinessType) 
-    {
-        this.bussinessType = bussinessType;
-    }
-
-    public String getBussinessType() 
-    {
-        return bussinessType;
-    }
-    public void setHasParsed(Long hasParsed) 
-    {
-        this.hasParsed = hasParsed;
-    }
-
-    public Long getHasParsed() 
-    {
-        return hasParsed;
-    }
-    public void setParsedVoiceContent(String parsedVoiceContent) 
-    {
-        this.parsedVoiceContent = parsedVoiceContent;
-    }
-
-    public String getParsedVoiceContent() 
-    {
-        return parsedVoiceContent;
-    }
-    public void setDelFlag(Long delFlag) 
-    {
-        this.delFlag = delFlag;
-    }
-
-    public Long getDelFlag() 
-    {
-        return delFlag;
-    }
-    public void setRevision(Long revision) 
-    {
-        this.revision = revision;
-    }
-
-    public Long getRevision() 
-    {
-        return revision;
-    }
-
-    @Override
-    public String toString() {
-        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
-            .append("id", getId())
-            .append("type", getType())
-            .append("userId", getUserId())
-            .append("userName", getUserName())
-            .append("serviceCategory", getServiceCategory())
-            .append("timeBegin", getTimeBegin())
-            .append("timeEnd", getTimeEnd())
-            .append("times", getTimes())
-            .append("category", getCategory())
-            .append("status", getStatus())
-            .append("phone", getPhone())
-            .append("bussinessType", getBussinessType())
-            .append("remark", getRemark())
-            .append("hasParsed", getHasParsed())
-            .append("parsedVoiceContent", getParsedVoiceContent())
-            .append("delFlag", getDelFlag())
-            .append("revision", getRevision())
-            .append("createBy", getCreateBy())
-            .append("createTime", getCreateTime())
-            .append("updateBy", getUpdateBy())
-            .append("updateTime", getUpdateTime())
-            .toString();
-    }
 }

+ 2 - 0
slibra-system/src/main/java/com/slibra/business/domain/TCutOffWater.java

@@ -42,8 +42,10 @@ public class TCutOffWater extends BaseEntity
     @Excel(name = "停水原因")
     private String reason;
 
+    //2024年11月14日15:28:52 一个停水可以添加多个小区-泵站,只要保障小区和泵站一起是唯一的就可以了,此字段不再使用
     /** 关联的泵站-小区楼号的ID */
     @Excel(name = "关联的泵站-小区楼号的ID")
+    @Deprecated
     private String pumpingStationNeighborhoodBuildingId;
 
     /** 删除标志(0代表存在 2代表删除) */

+ 48 - 0
slibra-system/src/main/java/com/slibra/business/domain/TCutOffWaterExtra.java

@@ -0,0 +1,48 @@
+package com.slibra.business.domain;
+
+import lombok.AllArgsConstructor;
+import lombok.Builder;
+import lombok.Data;
+import lombok.NoArgsConstructor;
+import org.apache.commons.lang3.builder.ToStringBuilder;
+import org.apache.commons.lang3.builder.ToStringStyle;
+import com.slibra.common.annotation.Excel;
+import com.slibra.common.core.domain.BaseEntity;
+
+/**
+ * 停水记录管理小区泵站关系对象 t_cut_off_water_extra
+ * 
+ * @author slibra
+ * @date 2024-11-14
+ */
+@Data
+@Builder
+@NoArgsConstructor
+@AllArgsConstructor
+public class TCutOffWaterExtra extends BaseEntity
+{
+    private static final long serialVersionUID = 1L;
+
+    /** 主键 */
+    private Long id;
+
+    /** 停水信息表ID */
+    @Excel(name = "停水信息表ID")
+    private String cutOffWaterId;
+
+    /** 小区ID */
+    @Excel(name = "小区ID")
+    private String neighborhoodId;
+
+    /** 泵站ID */
+    @Excel(name = "泵站ID")
+    private String pumpingStationId;
+
+    /** 删除标志(0代表存在 2代表删除) */
+    private Long delFlag;
+
+    /** 乐观锁 */
+    @Excel(name = "乐观锁")
+    private Long revision;
+
+}

+ 61 - 0
slibra-system/src/main/java/com/slibra/business/mapper/TCutOffWaterExtraMapper.java

@@ -0,0 +1,61 @@
+package com.slibra.business.mapper;
+
+import java.util.List;
+import com.slibra.business.domain.TCutOffWaterExtra;
+
+/**
+ * 停水记录管理小区泵站关系Mapper接口
+ * 
+ * @author slibra
+ * @date 2024-11-14
+ */
+public interface TCutOffWaterExtraMapper 
+{
+    /**
+     * 查询停水记录管理小区泵站关系
+     * 
+     * @param id 停水记录管理小区泵站关系主键
+     * @return 停水记录管理小区泵站关系
+     */
+    public TCutOffWaterExtra selectTCutOffWaterExtraById(Long id);
+
+    /**
+     * 查询停水记录管理小区泵站关系列表
+     * 
+     * @param tCutOffWaterExtra 停水记录管理小区泵站关系
+     * @return 停水记录管理小区泵站关系集合
+     */
+    public List<TCutOffWaterExtra> selectTCutOffWaterExtraList(TCutOffWaterExtra tCutOffWaterExtra);
+
+    /**
+     * 新增停水记录管理小区泵站关系
+     * 
+     * @param tCutOffWaterExtra 停水记录管理小区泵站关系
+     * @return 结果
+     */
+    public int insertTCutOffWaterExtra(TCutOffWaterExtra tCutOffWaterExtra);
+
+    /**
+     * 修改停水记录管理小区泵站关系
+     * 
+     * @param tCutOffWaterExtra 停水记录管理小区泵站关系
+     * @return 结果
+     */
+    public int updateTCutOffWaterExtra(TCutOffWaterExtra tCutOffWaterExtra);
+
+    /**
+     * 删除停水记录管理小区泵站关系
+     * 
+     * @param id 停水记录管理小区泵站关系主键
+     * @return 结果
+     */
+    public int deleteTCutOffWaterExtraById(Long id);
+
+    /**
+     * 批量删除停水记录管理小区泵站关系
+     * 
+     * @param ids 需要删除的数据主键集合
+     * @return 结果
+     */
+    public int deleteTCutOffWaterExtraByIds(Long[] ids);
+}

+ 61 - 0
slibra-system/src/main/java/com/slibra/business/service/ITCutOffWaterExtraService.java

@@ -0,0 +1,61 @@
+package com.slibra.business.service;
+
+import java.util.List;
+import com.slibra.business.domain.TCutOffWaterExtra;
+
+/**
+ * 停水记录管理小区泵站关系Service接口
+ * 
+ * @author slibra
+ * @date 2024-11-14
+ */
+public interface ITCutOffWaterExtraService 
+{
+    /**
+     * 查询停水记录管理小区泵站关系
+     * 
+     * @param id 停水记录管理小区泵站关系主键
+     * @return 停水记录管理小区泵站关系
+     */
+    public TCutOffWaterExtra selectTCutOffWaterExtraById(Long id);
+
+    /**
+     * 查询停水记录管理小区泵站关系列表
+     * 
+     * @param tCutOffWaterExtra 停水记录管理小区泵站关系
+     * @return 停水记录管理小区泵站关系集合
+     */
+    public List<TCutOffWaterExtra> selectTCutOffWaterExtraList(TCutOffWaterExtra tCutOffWaterExtra);
+
+    /**
+     * 新增停水记录管理小区泵站关系
+     * 
+     * @param tCutOffWaterExtra 停水记录管理小区泵站关系
+     * @return 结果
+     */
+    public int insertTCutOffWaterExtra(TCutOffWaterExtra tCutOffWaterExtra);
+
+    /**
+     * 修改停水记录管理小区泵站关系
+     * 
+     * @param tCutOffWaterExtra 停水记录管理小区泵站关系
+     * @return 结果
+     */
+    public int updateTCutOffWaterExtra(TCutOffWaterExtra tCutOffWaterExtra);
+
+    /**
+     * 批量删除停水记录管理小区泵站关系
+     * 
+     * @param ids 需要删除的停水记录管理小区泵站关系主键集合
+     * @return 结果
+     */
+    public int deleteTCutOffWaterExtraByIds(Long[] ids);
+
+    /**
+     * 删除停水记录管理小区泵站关系信息
+     * 
+     * @param id 停水记录管理小区泵站关系主键
+     * @return 结果
+     */
+    public int deleteTCutOffWaterExtraById(Long id);
+}

+ 96 - 0
slibra-system/src/main/java/com/slibra/business/service/impl/TCutOffWaterExtraServiceImpl.java

@@ -0,0 +1,96 @@
+package com.slibra.business.service.impl;
+
+import java.util.List;
+import com.slibra.common.utils.DateUtils;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+import com.slibra.business.mapper.TCutOffWaterExtraMapper;
+import com.slibra.business.domain.TCutOffWaterExtra;
+import com.slibra.business.service.ITCutOffWaterExtraService;
+
+/**
+ * 停水记录管理小区泵站关系Service业务层处理
+ * 
+ * @author slibra
+ * @date 2024-11-14
+ */
+@Service
+public class TCutOffWaterExtraServiceImpl implements ITCutOffWaterExtraService 
+{
+    @Autowired
+    private TCutOffWaterExtraMapper tCutOffWaterExtraMapper;
+
+    /**
+     * 查询停水记录管理小区泵站关系
+     * 
+     * @param id 停水记录管理小区泵站关系主键
+     * @return 停水记录管理小区泵站关系
+     */
+    @Override
+    public TCutOffWaterExtra selectTCutOffWaterExtraById(Long id)
+    {
+        return tCutOffWaterExtraMapper.selectTCutOffWaterExtraById(id);
+    }
+
+    /**
+     * 查询停水记录管理小区泵站关系列表
+     * 
+     * @param tCutOffWaterExtra 停水记录管理小区泵站关系
+     * @return 停水记录管理小区泵站关系
+     */
+    @Override
+    public List<TCutOffWaterExtra> selectTCutOffWaterExtraList(TCutOffWaterExtra tCutOffWaterExtra)
+    {
+        return tCutOffWaterExtraMapper.selectTCutOffWaterExtraList(tCutOffWaterExtra);
+    }
+
+    /**
+     * 新增停水记录管理小区泵站关系
+     * 
+     * @param tCutOffWaterExtra 停水记录管理小区泵站关系
+     * @return 结果
+     */
+    @Override
+    public int insertTCutOffWaterExtra(TCutOffWaterExtra tCutOffWaterExtra)
+    {
+        tCutOffWaterExtra.setCreateTime(DateUtils.getNowDate());
+        return tCutOffWaterExtraMapper.insertTCutOffWaterExtra(tCutOffWaterExtra);
+    }
+
+    /**
+     * 修改停水记录管理小区泵站关系
+     * 
+     * @param tCutOffWaterExtra 停水记录管理小区泵站关系
+     * @return 结果
+     */
+    @Override
+    public int updateTCutOffWaterExtra(TCutOffWaterExtra tCutOffWaterExtra)
+    {
+        tCutOffWaterExtra.setUpdateTime(DateUtils.getNowDate());
+        return tCutOffWaterExtraMapper.updateTCutOffWaterExtra(tCutOffWaterExtra);
+    }
+
+    /**
+     * 批量删除停水记录管理小区泵站关系
+     * 
+     * @param ids 需要删除的停水记录管理小区泵站关系主键
+     * @return 结果
+     */
+    @Override
+    public int deleteTCutOffWaterExtraByIds(Long[] ids)
+    {
+        return tCutOffWaterExtraMapper.deleteTCutOffWaterExtraByIds(ids);
+    }
+
+    /**
+     * 删除停水记录管理小区泵站关系信息
+     * 
+     * @param id 停水记录管理小区泵站关系主键
+     * @return 结果
+     */
+    @Override
+    public int deleteTCutOffWaterExtraById(Long id)
+    {
+        return tCutOffWaterExtraMapper.deleteTCutOffWaterExtraById(id);
+    }
+}

+ 6 - 2
slibra-system/src/main/resources/mapper/business/TCallRecordMapper.xml

@@ -17,6 +17,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         <result property="status"    column="status"    />
         <result property="phone"    column="phone"    />
         <result property="bussinessType"    column="bussiness_type"    />
+        <result property="url"    column="url"    />
         <result property="remark"    column="remark"    />
         <result property="hasParsed"    column="has_parsed"    />
         <result property="parsedVoiceContent"    column="parsed_voice_content"    />
@@ -29,10 +30,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
     </resultMap>
 
     <sql id="selectTCallRecordVo">
-        select id, type, user_id, user_name, service_category, time_begin, time_end, times, category, status, phone, bussiness_type, remark, has_parsed, parsed_voice_content, del_flag, revision, create_by, create_time, update_by, update_time from t_call_record
+        select id, type, user_id, user_name, service_category, time_begin, time_end, times, category, status, phone, bussiness_type, url, remark, has_parsed, parsed_voice_content, del_flag, revision, create_by, create_time, update_by, update_time from t_call_record
     </sql>
 
-    
+
     <select id="selectTCallRecordById" parameterType="Long" resultMap="TCallRecordResult">
         <include refid="selectTCallRecordVo"/>
         where id = #{id} and del_flag = 0
@@ -52,6 +53,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="status != null">status,</if>
             <if test="phone != null">phone,</if>
             <if test="bussinessType != null">bussiness_type,</if>
+            <if test="url != null">url,</if>
             <if test="remark != null">remark,</if>
             <if test="hasParsed != null">has_parsed,</if>
             <if test="parsedVoiceContent != null">parsed_voice_content,</if>
@@ -74,6 +76,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="status != null">#{status},</if>
             <if test="phone != null">#{phone},</if>
             <if test="bussinessType != null">#{bussinessType},</if>
+            <if test="url != null">#{url},</if>
             <if test="remark != null">#{remark},</if>
             <if test="hasParsed != null">#{hasParsed},</if>
             <if test="parsedVoiceContent != null">#{parsedVoiceContent},</if>
@@ -100,6 +103,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="status != null">status = #{status},</if>
             <if test="phone != null">phone = #{phone},</if>
             <if test="bussinessType != null">bussiness_type = #{bussinessType},</if>
+            <if test="url != null">url = #{url},</if>
             <if test="remark != null">remark = #{remark},</if>
             <if test="hasParsed != null">has_parsed = #{hasParsed},</if>
             <if test="parsedVoiceContent != null">parsed_voice_content = #{parsedVoiceContent},</if>

+ 100 - 0
slibra-system/src/main/resources/mapper/business/TCutOffWaterExtraMapper.xml

@@ -0,0 +1,100 @@
+<?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.slibra.business.mapper.TCutOffWaterExtraMapper">
+    
+    <resultMap type="TCutOffWaterExtra" id="TCutOffWaterExtraResult">
+        <result property="id"    column="id"    />
+        <result property="cutOffWaterId"    column="cut_off_water_id"    />
+        <result property="neighborhoodId"    column="neighborhood_id"    />
+        <result property="pumpingStationId"    column="pumping_station_id"    />
+        <result property="delFlag"    column="del_flag"    />
+        <result property="revision"    column="revision"    />
+        <result property="createBy"    column="create_by"    />
+        <result property="createTime"    column="create_time"    />
+        <result property="updateBy"    column="update_by"    />
+        <result property="updateTime"    column="update_time"    />
+        <result property="remark"    column="remark"    />
+    </resultMap>
+
+    <sql id="selectTCutOffWaterExtraVo">
+        select id, cut_off_water_id, neighborhood_id, pumping_station_id, del_flag, revision, create_by, create_time, update_by, update_time, remark from t_cut_off_water_extra
+    </sql>
+
+    <select id="selectTCutOffWaterExtraList" parameterType="TCutOffWaterExtra" resultMap="TCutOffWaterExtraResult">
+        <include refid="selectTCutOffWaterExtraVo"/>
+        <where>
+            1 = 1
+            <if test="cutOffWaterId != null  and cutOffWaterId != ''"> and cut_off_water_id = #{cutOffWaterId}</if>
+            <if test="neighborhoodId != null  and neighborhoodId != ''"> and neighborhood_id = #{neighborhoodId}</if>
+            <if test="pumpingStationId != null  and pumpingStationId != ''"> and pumping_station_id = #{pumpingStationId}</if>
+            <if test="revision != null "> and revision = #{revision}</if>
+        </where>
+        and del_flag = 0 order by id desc
+    </select>
+    
+    <select id="selectTCutOffWaterExtraById" parameterType="Long" resultMap="TCutOffWaterExtraResult">
+        <include refid="selectTCutOffWaterExtraVo"/>
+        where id = #{id} and del_flag = 0
+    </select>
+        
+    <insert id="insertTCutOffWaterExtra" parameterType="TCutOffWaterExtra" useGeneratedKeys="true" keyProperty="id">
+        insert into t_cut_off_water_extra
+        <trim prefix="(" suffix=")" suffixOverrides=",">
+            <if test="cutOffWaterId != null">cut_off_water_id,</if>
+            <if test="neighborhoodId != null">neighborhood_id,</if>
+            <if test="pumpingStationId != null">pumping_station_id,</if>
+            <if test="delFlag != null">del_flag,</if>
+            <if test="revision != null">revision,</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>
+            <if test="remark != null">remark,</if>
+         </trim>
+        <trim prefix="values (" suffix=")" suffixOverrides=",">
+            <if test="cutOffWaterId != null">#{cutOffWaterId},</if>
+            <if test="neighborhoodId != null">#{neighborhoodId},</if>
+            <if test="pumpingStationId != null">#{pumpingStationId},</if>
+            <if test="delFlag != null">#{delFlag},</if>
+            <if test="revision != null">#{revision},</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>
+            <if test="remark != null">#{remark},</if>
+         </trim>
+    </insert>
+
+    <update id="updateTCutOffWaterExtra" parameterType="TCutOffWaterExtra">
+        update t_cut_off_water_extra
+        <trim prefix="SET" suffixOverrides=",">
+            <if test="cutOffWaterId != null">cut_off_water_id = #{cutOffWaterId},</if>
+            <if test="neighborhoodId != null">neighborhood_id = #{neighborhoodId},</if>
+            <if test="pumpingStationId != null">pumping_station_id = #{pumpingStationId},</if>
+            <if test="delFlag != null">del_flag = #{delFlag},</if>
+            <if test="revision != null">revision = #{revision},</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>
+            <if test="remark != null">remark = #{remark},</if>
+        </trim>
+        ,revision = revision + 1
+        where id = #{id}
+    </update>
+
+    
+
+    <delete id="deleteTCutOffWaterExtraById" parameterType="Long">
+        update t_cut_off_water_extra set del_flag = 2,revision = revision + 1 where del_flag = 0 and id = #{id}
+    </delete>
+
+    <delete id="deleteTCutOffWaterExtraByIds" parameterType="String">
+        update t_cut_off_water_extra set del_flag = 2,revision = revision + 1 where del_flag = 0 and id in
+        <foreach item="id" collection="array" open="(" separator="," close=")">
+            #{id}
+        </foreach>
+    </delete>
+</mapper>