Browse Source

有效面谈逻辑修改

anderx 9 months ago
parent
commit
b56c770e56

+ 64 - 6
src/main/java/com/goafanti/common/dao/PublicReleaseDetailsMapper.java

@@ -3,21 +3,79 @@ package com.goafanti.common.dao;
 import com.goafanti.common.model.PublicReleaseDetails;
 import com.goafanti.weChat.bo.InputPublicRelease;
 import com.goafanti.weChat.bo.OutPublicReleaseDetails;
+import org.apache.ibatis.annotations.Param;
 
 import java.util.List;
 
+/**
+ * 公出详情表(PublicReleaseDetails)表数据库访问层
+ *
+ * @author makejava
+ * @since 2025-04-17 11:37:36
+ */
 public interface PublicReleaseDetailsMapper {
-    int deleteByPrimaryKey(Integer id);
 
-    int insert(PublicReleaseDetails record);
+    /**
+     * 通过ID查询单条数据
+     *
+     * @param id 主键
+     * @return 实例对象
+     */
+    PublicReleaseDetails selectById(Integer id);
 
-    int insertSelective(PublicReleaseDetails record);
 
-    PublicReleaseDetails selectByPrimaryKey(Integer id);
+    /**
+     * 查询指定行数据
+     *
+     * @param publicReleaseDetails 查询条件
+     * @return 对象列表
+     */
+    List<PublicReleaseDetails> findPublicReleaseDetailsList(PublicReleaseDetails publicReleaseDetails);
+
+    /**
+     * 统计总行数
+     *
+     * @param publicReleaseDetails 查询条件
+     * @return 总行数
+     */
+    int findPublicReleaseDetailsCount(PublicReleaseDetails publicReleaseDetails);
+
+    /**
+     * 新增数据
+     *
+     * @param publicReleaseDetails 实例对象
+     * @return 影响行数
+     */
+    int insert(PublicReleaseDetails publicReleaseDetails);
+
 
-    int updateByPrimaryKeySelective(PublicReleaseDetails record);
 
-    int updateByPrimaryKey(PublicReleaseDetails record);
+    /**
+     * 批量新增或按主键更新数据(MyBatis原生foreach方法)
+     *
+     * @param entities List<PublicReleaseDetails> 实例对象列表
+     * @return 影响行数
+     * @throws org.springframework.jdbc.BadSqlGrammarException 入参是空List的时候会抛SQL语句错误的异常,请自行校验入参
+     */
+    int insertOrUpdateBatch(@Param("entities") List<PublicReleaseDetails> entities);
+
+    /**
+     * 修改数据
+     *
+     * @param publicReleaseDetails 实例对象
+     * @return 影响行数
+     */
+    int update(PublicReleaseDetails publicReleaseDetails);
+
+    /**
+     * 通过主键删除数据
+     *
+     * @param id 主键
+     * @return 影响行数
+     */
+    int deleteById(Integer id);
+
+    int insertSelective(PublicReleaseDetails record);
 
     List<OutPublicReleaseDetails> selectByPrid(Integer id);
 

+ 320 - 172
src/main/java/com/goafanti/common/mapper/PublicReleaseDetailsMapper.xml

@@ -1,180 +1,342 @@
 <?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">
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
 <mapper namespace="com.goafanti.common.dao.PublicReleaseDetailsMapper">
 
-    <resultMap id="BaseResultMap" type="com.goafanti.common.model.PublicReleaseDetails">
-            <id property="id" column="id" jdbcType="INTEGER"/>
-            <result property="prid" column="prid" jdbcType="INTEGER"/>
-            <result property="uid" column="uid" jdbcType="VARCHAR"/>
-            <result property="ufid" column="ufid" jdbcType="VARCHAR"/>
-            <result property="newUser" column="new_user" jdbcType="INTEGER"/>
-            <result property="signSum" column="sign_sum" jdbcType="INTEGER"/>
-            <result property="longitude" column="longitude" jdbcType="VARCHAR"/>
-            <result property="latitude" column="latitude" jdbcType="VARCHAR"/>
-            <result property="clockIn" column="clock_in" jdbcType="INTEGER"/>
-            <result property="clockInTime" column="clock_in_time" jdbcType="TIMESTAMP"/>
-            <result property="photoUrl" column="photo_url" jdbcType="VARCHAR"/>
-            <result property="districtName" column="district_name" jdbcType="VARCHAR"/>
-            <result property="clockInRemarks" column="clock_in_remarks" jdbcType="VARCHAR"/>
-            <result property="duration" column="duration" jdbcType="DOUBLE"/>
-            <result property="mainStatus" column="main_status" jdbcType="INTEGER"/>
-            <result property="updateTime" column="update_time" jdbcType="TIMESTAMP"/>
-            <result property="addressName" column="address_name" jdbcType="VARCHAR"/>
+    <resultMap type="com.goafanti.common.model.PublicReleaseDetails" id="PublicReleaseDetailsMap">
+        <result property="id" column="id" jdbcType="INTEGER"/>
+        <result property="prid" column="prid" jdbcType="INTEGER"/>
+        <result property="uid" column="uid" jdbcType="VARCHAR"/>
+        <result property="ufid" column="ufid" jdbcType="VARCHAR"/>
+        <result property="newUser" column="new_user" jdbcType="INTEGER"/>
+        <result property="signSum" column="sign_sum" jdbcType="INTEGER"/>
+        <result property="longitude" column="longitude" jdbcType="VARCHAR"/>
+        <result property="latitude" column="latitude" jdbcType="VARCHAR"/>
+        <result property="clockIn" column="clock_in" jdbcType="INTEGER"/>
+        <result property="clockInTime" column="clock_in_time" jdbcType="TIMESTAMP"/>
+        <result property="photoUrl" column="photo_url" jdbcType="VARCHAR"/>
+        <result property="districtName" column="district_name" jdbcType="VARCHAR"/>
+        <result property="clockInRemarks" column="clock_in_remarks" jdbcType="VARCHAR"/>
+        <result property="duration" column="duration" jdbcType="NUMERIC"/>
+        <result property="mainStatus" column="main_status" jdbcType="INTEGER"/>
+        <result property="updateTime" column="update_time" jdbcType="TIMESTAMP"/>
+        <result property="addressName" column="address_name" jdbcType="VARCHAR"/>
+        <result property="interviewStatus" column="interview_status" jdbcType="INTEGER"/>
     </resultMap>
 
-    <sql id="Base_Column_List">
-        id,prid,uid,
-        ufid,new_user,sign_sum,
-        longitude,latitude,clock_in,
-        clock_in_time,photo_url,district_name,
-        clock_in_remarks,duration,main_status,
-        update_time,address_name
+    <sql id="PublicReleaseDetailsAllSql">
+        id, prid, uid, ufid, new_user, sign_sum, longitude, latitude, clock_in, clock_in_time, photo_url, district_name, clock_in_remarks, duration, main_status, update_time, address_name, interview_status
     </sql>
 
-    <select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
+    <!--查询单个-->
+    <select id="selectById" resultMap="PublicReleaseDetailsMap">
         select
-        <include refid="Base_Column_List" />
+        <include refid="PublicReleaseDetailsAllSql"/>
         from public_release_details
-        where  id = #{id,jdbcType=INTEGER} 
+        where id = #{id}
     </select>
 
-    <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
-        delete from public_release_details
-        where  id = #{id,jdbcType=INTEGER} 
-    </delete>
-    <insert id="insert" keyColumn="id" keyProperty="id" parameterType="com.goafanti.common.model.PublicReleaseDetails" useGeneratedKeys="true">
-        insert into public_release_details
-        ( id,prid,uid
-        ,ufid,new_user,sign_sum
-        ,longitude,latitude,clock_in
-        ,clock_in_time,photo_url,district_name
-        ,clock_in_remarks,duration,main_status
-        ,update_time,address_name)
-        values (#{id,jdbcType=INTEGER},#{prid,jdbcType=INTEGER},#{uid,jdbcType=VARCHAR}
-        ,#{ufid,jdbcType=VARCHAR},#{newUser,jdbcType=INTEGER},#{signSum,jdbcType=INTEGER}
-        ,#{longitude,jdbcType=VARCHAR},#{latitude,jdbcType=VARCHAR},#{clockIn,jdbcType=INTEGER}
-        ,#{clockInTime,jdbcType=TIMESTAMP},#{photoUrl,jdbcType=VARCHAR},#{districtName,jdbcType=VARCHAR}
-        ,#{clockInRemarks,jdbcType=VARCHAR},#{duration,jdbcType=DOUBLE},#{mainStatus,jdbcType=INTEGER}
-        ,#{updateTime,jdbcType=TIMESTAMP},#{addressName,jdbcType=VARCHAR})
+    <!--新增所有列-->
+    <insert id="insert" keyProperty="id" useGeneratedKeys="true">
+        insert into public_release_details(prid, uid, ufid, new_user, sign_sum, longitude, latitude, clock_in,
+                                           clock_in_time, photo_url, district_name, clock_in_remarks, duration,
+                                           main_status, update_time, address_name, interview_status)
+        values (#{prid}, #{uid}, #{ufid}, #{newUser}, #{signSum}, #{longitude}, #{latitude}, #{clockIn}, #{clockInTime},
+                #{photoUrl}, #{districtName}, #{clockInRemarks}, #{duration}, #{mainStatus}, #{updateTime},
+                #{addressName}, #{interviewStatus})
     </insert>
+
+    <insert id="insertBatch">
+        insert into public_release_details (prid, `uid`, ufid,
+        new_user, sign_sum, longitude,
+        latitude, clock_in, clock_in_time,
+        photo_url, district_name,duration,main_status,address_name)
+        values
+        <foreach  collection="list" item="prd"  separator=",">
+            (#{prd.prid,jdbcType=INTEGER}, #{prd.uid,jdbcType=VARCHAR}, #{prd.ufid,jdbcType=VARCHAR},
+            #{prd.newUser,jdbcType=INTEGER}, #{prd.signSum,jdbcType=INTEGER}, #{prd.longitude,jdbcType=VARCHAR},
+            #{prd.latitude,jdbcType=VARCHAR}, #{prd.clockIn,jdbcType=INTEGER}, #{prd.clockInTime,jdbcType=TIMESTAMP},
+            #{prd.photoUrl,jdbcType=VARCHAR}, #{prd.districtName,jdbcType=VARCHAR},#{prd.duration,jdbcType=DOUBLE},
+            #{prd.mainStatus,jdbcType=INTEGER},#{prd.addressName,jdbcType=VARCHAR})
+        </foreach>
+    </insert>
+
+
+    <insert id="insertOrUpdateBatch" keyProperty="id" useGeneratedKeys="true">
+        insert into public_release_details(prid, uid, ufid, new_user, sign_sum, longitude, latitude, clock_in,
+        clock_in_time, photo_url, district_name, clock_in_remarks, duration, main_status, update_time, address_name,
+        interview_status)
+        values
+        <foreach collection="entities" item="entity" separator=",">
+            (#{entity.prid}, #{entity.uid}, #{entity.ufid}, #{entity.newUser}, #{entity.signSum}, #{entity.longitude},
+            #{entity.latitude}, #{entity.clockIn}, #{entity.clockInTime}, #{entity.photoUrl}, #{entity.districtName},
+            #{entity.clockInRemarks}, #{entity.duration}, #{entity.mainStatus}, #{entity.updateTime},
+            #{entity.addressName}, #{entity.interviewStatus})
+        </foreach>
+        on duplicate key update
+        prid = values(prid),
+        uid = values(uid),
+        ufid = values(ufid),
+        new_user = values(new_user),
+        sign_sum = values(sign_sum),
+        longitude = values(longitude),
+        latitude = values(latitude),
+        clock_in = values(clock_in),
+        clock_in_time = values(clock_in_time),
+        photo_url = values(photo_url),
+        district_name = values(district_name),
+        clock_in_remarks = values(clock_in_remarks),
+        duration = values(duration),
+        main_status = values(main_status),
+        update_time = values(update_time),
+        address_name = values(address_name),
+        interview_status = values(interview_status)
+    </insert>
+
+    <!--通过主键修改数据-->
+    <update id="update">
+        update public_release_details
+        <set>
+            <if test="prid != null">
+                prid = #{prid},
+            </if>
+            <if test="uid != null and uid != ''">
+                uid = #{uid},
+            </if>
+            <if test="ufid != null and ufid != ''">
+                ufid = #{ufid},
+            </if>
+            <if test="newUser != null">
+                new_user = #{newUser},
+            </if>
+            <if test="signSum != null">
+                sign_sum = #{signSum},
+            </if>
+            <if test="longitude != null and longitude != ''">
+                longitude = #{longitude},
+            </if>
+            <if test="latitude != null and latitude != ''">
+                latitude = #{latitude},
+            </if>
+            <if test="clockIn != null">
+                clock_in = #{clockIn},
+            </if>
+            <if test="clockInTime != null">
+                clock_in_time = #{clockInTime},
+            </if>
+            <if test="photoUrl != null and photoUrl != ''">
+                photo_url = #{photoUrl},
+            </if>
+            <if test="districtName != null and districtName != ''">
+                district_name = #{districtName},
+            </if>
+            <if test="clockInRemarks != null and clockInRemarks != ''">
+                clock_in_remarks = #{clockInRemarks},
+            </if>
+            <if test="duration != null">
+                duration = #{duration},
+            </if>
+            <if test="mainStatus != null">
+                main_status = #{mainStatus},
+            </if>
+            <if test="updateTime != null">
+                update_time = #{updateTime},
+            </if>
+            <if test="addressName != null and addressName != ''">
+                address_name = #{addressName},
+            </if>
+            <if test="interviewStatus != null">
+                interview_status = #{interviewStatus},
+            </if>
+        </set>
+        where id = #{id}
+    </update>
+
+
+
+    <!--查询指定行数据-->
+    <select id="findPublicReleaseDetailsList" resultMap="PublicReleaseDetailsMap">
+        select
+        <include refid="PublicReleaseDetailsAllSql"/>
+
+        from public_release_details
+        <where>
+            <if test="id != null">
+                and id = #{id}
+            </if>
+            <if test="prid != null">
+                and prid = #{prid}
+            </if>
+            <if test="uid != null and uid != ''">
+                and uid = #{uid}
+            </if>
+            <if test="ufid != null and ufid != ''">
+                and ufid = #{ufid}
+            </if>
+            <if test="newUser != null">
+                and new_user = #{newUser}
+            </if>
+            <if test="signSum != null">
+                and sign_sum = #{signSum}
+            </if>
+            <if test="longitude != null and longitude != ''">
+                and longitude = #{longitude}
+            </if>
+            <if test="latitude != null and latitude != ''">
+                and latitude = #{latitude}
+            </if>
+            <if test="clockIn != null">
+                and clock_in = #{clockIn}
+            </if>
+            <if test="clockInTime != null">
+                and clock_in_time = #{clockInTime}
+            </if>
+            <if test="photoUrl != null and photoUrl != ''">
+                and photo_url = #{photoUrl}
+            </if>
+            <if test="districtName != null and districtName != ''">
+                and district_name = #{districtName}
+            </if>
+            <if test="clockInRemarks != null and clockInRemarks != ''">
+                and clock_in_remarks = #{clockInRemarks}
+            </if>
+            <if test="duration != null">
+                and duration = #{duration}
+            </if>
+            <if test="mainStatus != null">
+                and main_status = #{mainStatus}
+            </if>
+            <if test="updateTime != null">
+                and update_time = #{updateTime}
+            </if>
+            <if test="addressName != null and addressName != ''">
+                and address_name = #{addressName}
+            </if>
+            <if test="interviewStatus != null">
+                and interview_status = #{interviewStatus}
+            </if>
+        </where>
+        <if test="page_sql != null">
+            ${page_sql}
+        </if>
+    </select>
+
+    <!--统计总行数-->
+    <select id="findPublicReleaseDetailsCount" resultType="java.lang.Integer">
+        select count(1)
+        from public_release_details
+        <where>
+            <if test="id != null">
+                and id = #{id}
+            </if>
+            <if test="prid != null">
+                and prid = #{prid}
+            </if>
+            <if test="uid != null and uid != ''">
+                and uid = #{uid}
+            </if>
+            <if test="ufid != null and ufid != ''">
+                and ufid = #{ufid}
+            </if>
+            <if test="newUser != null">
+                and new_user = #{newUser}
+            </if>
+            <if test="signSum != null">
+                and sign_sum = #{signSum}
+            </if>
+            <if test="longitude != null and longitude != ''">
+                and longitude = #{longitude}
+            </if>
+            <if test="latitude != null and latitude != ''">
+                and latitude = #{latitude}
+            </if>
+            <if test="clockIn != null">
+                and clock_in = #{clockIn}
+            </if>
+            <if test="clockInTime != null">
+                and clock_in_time = #{clockInTime}
+            </if>
+            <if test="photoUrl != null and photoUrl != ''">
+                and photo_url = #{photoUrl}
+            </if>
+            <if test="districtName != null and districtName != ''">
+                and district_name = #{districtName}
+            </if>
+            <if test="clockInRemarks != null and clockInRemarks != ''">
+                and clock_in_remarks = #{clockInRemarks}
+            </if>
+            <if test="duration != null">
+                and duration = #{duration}
+            </if>
+            <if test="mainStatus != null">
+                and main_status = #{mainStatus}
+            </if>
+            <if test="updateTime != null">
+                and update_time = #{updateTime}
+            </if>
+            <if test="addressName != null and addressName != ''">
+                and address_name = #{addressName}
+            </if>
+            <if test="interviewStatus != null">
+                and interview_status = #{interviewStatus}
+            </if>
+        </where>
+    </select>
+
+    <!--通过主键删除-->
+    <delete id="deleteById">
+        delete
+        from public_release_details
+        where id = #{id}
+    </delete>
+
+
     <insert id="insertSelective" keyColumn="id" keyProperty="id" parameterType="com.goafanti.common.model.PublicReleaseDetails" useGeneratedKeys="true">
         insert into public_release_details
         <trim prefix="(" suffix=")" suffixOverrides=",">
-                <if test="id != null">id,</if>
-                <if test="prid != null">prid,</if>
-                <if test="uid != null">uid,</if>
-                <if test="ufid != null">ufid,</if>
-                <if test="newUser != null">new_user,</if>
-                <if test="signSum != null">sign_sum,</if>
-                <if test="longitude != null">longitude,</if>
-                <if test="latitude != null">latitude,</if>
-                <if test="clockIn != null">clock_in,</if>
-                <if test="clockInTime != null">clock_in_time,</if>
-                <if test="photoUrl != null">photo_url,</if>
-                <if test="districtName != null">district_name,</if>
-                <if test="clockInRemarks != null">clock_in_remarks,</if>
-                <if test="duration != null">duration,</if>
-                <if test="mainStatus != null">main_status,</if>
-                <if test="updateTime != null">update_time,</if>
-                <if test="addressName != null">address_name,</if>
+            <if test="id != null">id,</if>
+            <if test="prid != null">prid,</if>
+            <if test="uid != null">uid,</if>
+            <if test="ufid != null">ufid,</if>
+            <if test="newUser != null">new_user,</if>
+            <if test="signSum != null">sign_sum,</if>
+            <if test="longitude != null">longitude,</if>
+            <if test="latitude != null">latitude,</if>
+            <if test="clockIn != null">clock_in,</if>
+            <if test="clockInTime != null">clock_in_time,</if>
+            <if test="photoUrl != null">photo_url,</if>
+            <if test="districtName != null">district_name,</if>
+            <if test="clockInRemarks != null">clock_in_remarks,</if>
+            <if test="duration != null">duration,</if>
+            <if test="mainStatus != null">main_status,</if>
+            <if test="updateTime != null">update_time,</if>
+            <if test="addressName != null">address_name,</if>
+            <if test="interviewStatus != null">
+                 interview_status ,
+            </if>
         </trim>
         <trim prefix="values (" suffix=")" suffixOverrides=",">
-                <if test="id != null">#{id,jdbcType=INTEGER},</if>
-                <if test="prid != null">#{prid,jdbcType=INTEGER},</if>
-                <if test="uid != null">#{uid,jdbcType=VARCHAR},</if>
-                <if test="ufid != null">#{ufid,jdbcType=VARCHAR},</if>
-                <if test="newUser != null">#{newUser,jdbcType=INTEGER},</if>
-                <if test="signSum != null">#{signSum,jdbcType=INTEGER},</if>
-                <if test="longitude != null">#{longitude,jdbcType=VARCHAR},</if>
-                <if test="latitude != null">#{latitude,jdbcType=VARCHAR},</if>
-                <if test="clockIn != null">#{clockIn,jdbcType=INTEGER},</if>
-                <if test="clockInTime != null">#{clockInTime,jdbcType=TIMESTAMP},</if>
-                <if test="photoUrl != null">#{photoUrl,jdbcType=VARCHAR},</if>
-                <if test="districtName != null">#{districtName,jdbcType=VARCHAR},</if>
-                <if test="clockInRemarks != null">#{clockInRemarks,jdbcType=VARCHAR},</if>
-                <if test="duration != null">#{duration,jdbcType=DOUBLE},</if>
-                <if test="mainStatus != null">#{mainStatus,jdbcType=INTEGER},</if>
-                <if test="updateTime != null">#{updateTime,jdbcType=TIMESTAMP},</if>
-                <if test="addressName != null">#{addressName,jdbcType=VARCHAR},</if>
+            <if test="id != null">#{id,jdbcType=INTEGER},</if>
+            <if test="prid != null">#{prid,jdbcType=INTEGER},</if>
+            <if test="uid != null">#{uid,jdbcType=VARCHAR},</if>
+            <if test="ufid != null">#{ufid,jdbcType=VARCHAR},</if>
+            <if test="newUser != null">#{newUser,jdbcType=INTEGER},</if>
+            <if test="signSum != null">#{signSum,jdbcType=INTEGER},</if>
+            <if test="longitude != null">#{longitude,jdbcType=VARCHAR},</if>
+            <if test="latitude != null">#{latitude,jdbcType=VARCHAR},</if>
+            <if test="clockIn != null">#{clockIn,jdbcType=INTEGER},</if>
+            <if test="clockInTime != null">#{clockInTime,jdbcType=TIMESTAMP},</if>
+            <if test="photoUrl != null">#{photoUrl,jdbcType=VARCHAR},</if>
+            <if test="districtName != null">#{districtName,jdbcType=VARCHAR},</if>
+            <if test="clockInRemarks != null">#{clockInRemarks,jdbcType=VARCHAR},</if>
+            <if test="duration != null">#{duration,jdbcType=DOUBLE},</if>
+            <if test="mainStatus != null">#{mainStatus,jdbcType=INTEGER},</if>
+            <if test="updateTime != null">#{updateTime,jdbcType=TIMESTAMP},</if>
+            <if test="addressName != null">#{addressName,jdbcType=VARCHAR},</if>
+            <if test="interviewStatus != null">
+                 #{interviewStatus},
+            </if>
         </trim>
     </insert>
-    <update id="updateByPrimaryKeySelective" parameterType="com.goafanti.common.model.PublicReleaseDetails">
-        update public_release_details
-        <set>
-                <if test="prid != null">
-                    prid = #{prid,jdbcType=INTEGER},
-                </if>
-                <if test="uid != null">
-                    uid = #{uid,jdbcType=VARCHAR},
-                </if>
-                <if test="ufid != null">
-                    ufid = #{ufid,jdbcType=VARCHAR},
-                </if>
-                <if test="newUser != null">
-                    new_user = #{newUser,jdbcType=INTEGER},
-                </if>
-                <if test="signSum != null">
-                    sign_sum = #{signSum,jdbcType=INTEGER},
-                </if>
-                <if test="longitude != null">
-                    longitude = #{longitude,jdbcType=VARCHAR},
-                </if>
-                <if test="latitude != null">
-                    latitude = #{latitude,jdbcType=VARCHAR},
-                </if>
-                <if test="clockIn != null">
-                    clock_in = #{clockIn,jdbcType=INTEGER},
-                </if>
-                <if test="clockInTime != null">
-                    clock_in_time = #{clockInTime,jdbcType=TIMESTAMP},
-                </if>
-                <if test="photoUrl != null">
-                    photo_url = #{photoUrl,jdbcType=VARCHAR},
-                </if>
-                <if test="districtName != null">
-                    district_name = #{districtName,jdbcType=VARCHAR},
-                </if>
-                <if test="clockInRemarks != null">
-                    clock_in_remarks = #{clockInRemarks,jdbcType=VARCHAR},
-                </if>
-                <if test="duration != null">
-                    duration = #{duration,jdbcType=DOUBLE},
-                </if>
-                <if test="mainStatus != null">
-                    main_status = #{mainStatus,jdbcType=INTEGER},
-                </if>
-                <if test="updateTime != null">
-                    update_time = #{updateTime,jdbcType=TIMESTAMP},
-                </if>
-                <if test="addressName != null">
-                    address_name = #{addressName,jdbcType=VARCHAR},
-                </if>
-        </set>
-        where   id = #{id,jdbcType=INTEGER} 
-    </update>
-    <update id="updateByPrimaryKey" parameterType="com.goafanti.common.model.PublicReleaseDetails">
-        update public_release_details
-        set 
-            prid =  #{prid,jdbcType=INTEGER},
-            uid =  #{uid,jdbcType=VARCHAR},
-            ufid =  #{ufid,jdbcType=VARCHAR},
-            new_user =  #{newUser,jdbcType=INTEGER},
-            sign_sum =  #{signSum,jdbcType=INTEGER},
-            longitude =  #{longitude,jdbcType=VARCHAR},
-            latitude =  #{latitude,jdbcType=VARCHAR},
-            clock_in =  #{clockIn,jdbcType=INTEGER},
-            clock_in_time =  #{clockInTime,jdbcType=TIMESTAMP},
-            photo_url =  #{photoUrl,jdbcType=VARCHAR},
-            district_name =  #{districtName,jdbcType=VARCHAR},
-            clock_in_remarks =  #{clockInRemarks,jdbcType=VARCHAR},
-            duration =  #{duration,jdbcType=DOUBLE},
-            main_status =  #{mainStatus,jdbcType=INTEGER},
-            update_time =  #{updateTime,jdbcType=TIMESTAMP},
-            address_name =  #{addressName,jdbcType=VARCHAR}
-        where   id = #{id,jdbcType=INTEGER} 
-    </update>
 
 
 
@@ -188,20 +350,6 @@
         where prid = #{id,jdbcType=INTEGER} order by a.update_time desc
     </select>
 
-    <insert id="insertBatch">
-        insert into public_release_details (prid, `uid`, ufid,
-        new_user, sign_sum, longitude,
-        latitude, clock_in, clock_in_time,
-        photo_url, district_name,duration,main_status,address_name)
-        values
-        <foreach  collection="list" item="prd"  separator=",">
-            (#{prd.prid,jdbcType=INTEGER}, #{prd.uid,jdbcType=VARCHAR}, #{prd.ufid,jdbcType=VARCHAR},
-            #{prd.newUser,jdbcType=INTEGER}, #{prd.signSum,jdbcType=INTEGER}, #{prd.longitude,jdbcType=VARCHAR},
-            #{prd.latitude,jdbcType=VARCHAR}, #{prd.clockIn,jdbcType=INTEGER}, #{prd.clockInTime,jdbcType=TIMESTAMP},
-            #{prd.photoUrl,jdbcType=VARCHAR}, #{prd.districtName,jdbcType=VARCHAR},#{prd.duration,jdbcType=DOUBLE},
-            #{prd.mainStatus,jdbcType=INTEGER},#{prd.addressName,jdbcType=VARCHAR})
-        </foreach>
-    </insert>
 
     <select id="getNamesByPrid" resultType="java.lang.String">
         select  GROUP_CONCAT(b.nickname)userNames

+ 8 - 1
src/main/java/com/goafanti/common/mapper/UserInterviewProjectMapper.xml

@@ -194,7 +194,14 @@
             a.id, a.uid, a.aid, a.pid, a.examine_status, a.examine_status_other, a.buy_status, a.buy_status_other,
             b.bname name
         from user_interview_project a left join business_project b on a.pid=b.id
-        where a.uid = #{uid} and a.aid = #{aid}
+        <where>
+            <if test="aid != null and aid != ''">
+                and a.aid = #{aid}
+            </if>
+            <if test="uid != null and uid != ''">
+                and a.uid = #{uid}
+            </if>
+        </where>
     </select>
 
 

+ 22 - 125
src/main/java/com/goafanti/common/model/PublicReleaseDetails.java

@@ -3,333 +3,230 @@ package com.goafanti.common.model;
 import java.io.Serializable;
 import java.util.Date;
 
+
 /**
- * 公出详情表
- * @TableName public_release_details
+ * 公出详情表(PublicReleaseDetails)实体类
+ *
+ * @author makejava
+ * @since 2025-04-17 11:35:19
  */
 public class PublicReleaseDetails implements Serializable {
-    /**
-     * 
-     */
-    private Integer id;
+    private static final long serialVersionUID = 709091961650101768L;
 
+    private Integer id;
     /**
      * 公出编号
      */
     private Integer prid;
-
     /**
      * 客户id
      */
     private String uid;
-
     /**
      * 跟进id
      */
     private String ufid;
-
     /**
      * 客户类型 0新客户 1老客户
      */
     private Integer newUser;
-
     /**
      * 签单数
      */
     private Integer signSum;
-
     /**
      * 经度
      */
     private String longitude;
-
     /**
      * 纬度
      */
     private String latitude;
-
     /**
      * 打卡状态 1正常打卡 2异常打卡
      */
     private Integer clockIn;
-
     /**
      * 打卡时间
      */
     private Date clockInTime;
-
     /**
      * 照片
      */
     private String photoUrl;
-
     /**
      * 公出企业地址
      */
     private String districtName;
-
     /**
      * 打卡说明
      */
     private String clockInRemarks;
-
     /**
      * 时长
      */
     private Double duration;
-
     /**
      * 0辅助 1主要(根据客户是否是公出人判断)
      */
     private Integer mainStatus;
-
     /**
      * 修改时间
      */
     private Date updateTime;
-
     /**
      * 公出企业地址
      */
     private String addressName;
-
-    private static final long serialVersionUID = 1L;
-
     /**
-     * 
+     * 有效面谈 0=否,1=是
      */
+    private Integer interviewStatus;
+
+
     public Integer getId() {
         return id;
     }
 
-    /**
-     * 
-     */
     public void setId(Integer id) {
         this.id = id;
     }
 
-    /**
-     * 公出编号
-     */
     public Integer getPrid() {
         return prid;
     }
 
-    /**
-     * 公出编号
-     */
     public void setPrid(Integer prid) {
         this.prid = prid;
     }
 
-    /**
-     * 客户id
-     */
     public String getUid() {
         return uid;
     }
 
-    /**
-     * 客户id
-     */
     public void setUid(String uid) {
         this.uid = uid;
     }
 
-    /**
-     * 跟进id
-     */
     public String getUfid() {
         return ufid;
     }
 
-    /**
-     * 跟进id
-     */
     public void setUfid(String ufid) {
         this.ufid = ufid;
     }
 
-    /**
-     * 客户类型 0新客户 1老客户
-     */
     public Integer getNewUser() {
         return newUser;
     }
 
-    /**
-     * 客户类型 0新客户 1老客户
-     */
     public void setNewUser(Integer newUser) {
         this.newUser = newUser;
     }
 
-    /**
-     * 签单数
-     */
     public Integer getSignSum() {
         return signSum;
     }
 
-    /**
-     * 签单数
-     */
     public void setSignSum(Integer signSum) {
         this.signSum = signSum;
     }
 
-    /**
-     * 经度
-     */
     public String getLongitude() {
         return longitude;
     }
 
-    /**
-     * 经度
-     */
     public void setLongitude(String longitude) {
         this.longitude = longitude;
     }
 
-    /**
-     * 纬度
-     */
     public String getLatitude() {
         return latitude;
     }
 
-    /**
-     * 纬度
-     */
     public void setLatitude(String latitude) {
         this.latitude = latitude;
     }
 
-    /**
-     * 打卡状态 1正常打卡 2异常打卡
-     */
     public Integer getClockIn() {
         return clockIn;
     }
 
-    /**
-     * 打卡状态 1正常打卡 2异常打卡
-     */
     public void setClockIn(Integer clockIn) {
         this.clockIn = clockIn;
     }
 
-    /**
-     * 打卡时间
-     */
     public Date getClockInTime() {
         return clockInTime;
     }
 
-    /**
-     * 打卡时间
-     */
     public void setClockInTime(Date clockInTime) {
         this.clockInTime = clockInTime;
     }
 
-    /**
-     * 照片
-     */
     public String getPhotoUrl() {
         return photoUrl;
     }
 
-    /**
-     * 照片
-     */
     public void setPhotoUrl(String photoUrl) {
         this.photoUrl = photoUrl;
     }
 
-    /**
-     * 公出企业地址
-     */
     public String getDistrictName() {
         return districtName;
     }
 
-    /**
-     * 公出企业地址
-     */
     public void setDistrictName(String districtName) {
         this.districtName = districtName;
     }
 
-    /**
-     * 打卡说明
-     */
     public String getClockInRemarks() {
         return clockInRemarks;
     }
 
-    /**
-     * 打卡说明
-     */
     public void setClockInRemarks(String clockInRemarks) {
         this.clockInRemarks = clockInRemarks;
     }
 
-    /**
-     * 时长
-     */
     public Double getDuration() {
         return duration;
     }
 
-    /**
-     * 时长
-     */
     public void setDuration(Double duration) {
         this.duration = duration;
     }
 
-    /**
-     * 0辅助 1主要(根据客户是否是公出人判断)
-     */
     public Integer getMainStatus() {
         return mainStatus;
     }
 
-    /**
-     * 0辅助 1主要(根据客户是否是公出人判断)
-     */
     public void setMainStatus(Integer mainStatus) {
         this.mainStatus = mainStatus;
     }
 
-    /**
-     * 修改时间
-     */
     public Date getUpdateTime() {
         return updateTime;
     }
 
-    /**
-     * 修改时间
-     */
     public void setUpdateTime(Date updateTime) {
         this.updateTime = updateTime;
     }
 
-    /**
-     * 公出企业地址
-     */
     public String getAddressName() {
         return addressName;
     }
 
-    /**
-     * 公出企业地址
-     */
     public void setAddressName(String addressName) {
         this.addressName = addressName;
     }
-}
+
+    public Integer getInterviewStatus() {
+        return interviewStatus;
+    }
+
+    public void setInterviewStatus(Integer interviewStatus) {
+        this.interviewStatus = interviewStatus;
+    }
+
+}
+

+ 23 - 7
src/main/java/com/goafanti/weChat/service/impl/PublicReleaseServiceImpl.java

@@ -142,7 +142,9 @@ public class PublicReleaseServiceImpl extends BaseMybatisDao<PublicReleaseMapper
 		}
 		addPRD(in, users, str, prdList);
 		addPublicReleaseDateClock(in);
-		pushUserArchivesInterview(in);
+		if (in.getType()==0){
+			pushUserArchivesInterview(in);
+		}
 		String userNames=str.substring(0,str.length()-1);
 		in.setUserNames(userNames);
 		PublicRelease updateName=new PublicRelease();
@@ -166,7 +168,21 @@ public class PublicReleaseServiceImpl extends BaseMybatisDao<PublicReleaseMapper
 					userArchivesInterviewMapper.update(uai);
 				}
 			}
-
+			//根据客户判定出来本次公出,如果有则标记有效
+			List<UserInterviewProjectBo> userInterviewProjectBos = userInterviewProjectMapper.selectByAid(null, e.getUid());
+			List<UserInterviewProjectBo> collect = userInterviewProjectBos.stream().filter(e2 -> e2.getType() == 0).collect(Collectors.toList());
+			if (!collect.isEmpty()){
+				OutPublicReleaseDetails newPRD=new OutPublicReleaseDetails();
+				newPRD.setId(e.getId());
+				newPRD.setInterviewStatus(1);
+				publicReleaseDetailsMapper.update(newPRD);
+				for (UserInterviewProjectBo userInterviewProjectBo : collect) {
+					UserInterviewProject userInterviewProject=new UserInterviewProject();
+					userInterviewProject.setId(userInterviewProjectBo.getId());
+					userInterviewProject.setType(1);
+					userInterviewProjectMapper.update(userInterviewProject);
+				}
+			}
 
 		}
 	}
@@ -656,7 +672,7 @@ public class PublicReleaseServiceImpl extends BaseMybatisDao<PublicReleaseMapper
 				}
 			}
 			if (flag){
-				publicReleaseDetailsMapper.deleteByPrimaryKey(prd.getId());
+				publicReleaseDetailsMapper.deleteById(prd.getId());
 			}
 		}
 	}
@@ -760,7 +776,7 @@ public class PublicReleaseServiceImpl extends BaseMybatisDao<PublicReleaseMapper
 					newprd.setDuration(duration);
 				}
 				index++;
-				publicReleaseDetailsMapper.updateByPrimaryKeySelective(newprd);
+				publicReleaseDetailsMapper.update(newprd);
 			}
 		}
 		StringBuffer str=new StringBuffer();
@@ -1759,7 +1775,7 @@ public class PublicReleaseServiceImpl extends BaseMybatisDao<PublicReleaseMapper
 				}
 			}
 			if (flag){
-				publicReleaseDetailsMapper.deleteByPrimaryKey(out2.getId());
+				publicReleaseDetailsMapper.deleteById(out2.getId());
 			}
 		}
 		//信息补充,修改时没有打卡信息
@@ -1957,7 +1973,7 @@ public class PublicReleaseServiceImpl extends BaseMybatisDao<PublicReleaseMapper
 				PublicReleaseLog log = new PublicReleaseLog(id, aid, PublicReleaseLog.states.dk.getCode(), str, new Date());
 				log.setPhotoUrl(photoUrl);
 				publicReleaseLogMapper.insertSelective(log);
-				publicReleaseDetailsMapper.updateByPrimaryKeySelective(prd);
+				publicReleaseDetailsMapper.update(prd);
 				flag=true;
 				clockCount++;
 			}else if (prd.getClockIn()==1){
@@ -2800,7 +2816,7 @@ public class PublicReleaseServiceImpl extends BaseMybatisDao<PublicReleaseMapper
 		updateprd.setDistrictName(in.getDistrictName());
 		updateprd.setClockIn(0);
 		addpublicLog(in.getId(),5,"发起公出地点修改");
-		return publicReleaseDetailsMapper.updateByPrimaryKeySelective(updateprd);
+		return publicReleaseDetailsMapper.update(updateprd);
 	}
 
 	@Override