|
@@ -25,13 +25,14 @@
|
|
|
<result property="updateBy" column="update_by" />
|
|
<result property="updateBy" column="update_by" />
|
|
|
<result property="updateTime" column="update_time" />
|
|
<result property="updateTime" column="update_time" />
|
|
|
<result property="remark" column="remark" />
|
|
<result property="remark" column="remark" />
|
|
|
|
|
+ <result property="importMemberId" column="import_member_id" />
|
|
|
</resultMap>
|
|
</resultMap>
|
|
|
|
|
|
|
|
<sql id="selectFsCompanyCustomerVo">
|
|
<sql id="selectFsCompanyCustomerVo">
|
|
|
select id, customer_name, sex, age, address, phone, filing_time,
|
|
select id, customer_name, sex, age, address, phone, filing_time,
|
|
|
company_user_id, company_user_name, appointment_time, doctor_id, doctor_name,
|
|
company_user_id, company_user_name, appointment_time, doctor_id, doctor_name,
|
|
|
present_illness, current_medication, allergy_history,
|
|
present_illness, current_medication, allergy_history,
|
|
|
- create_by, create_time, update_by, update_time, remark, del_flag
|
|
|
|
|
|
|
+ create_by, create_time, update_by, update_time, remark, del_flag,import_member_id
|
|
|
from fs_company_customer
|
|
from fs_company_customer
|
|
|
</sql>
|
|
</sql>
|
|
|
|
|
|
|
@@ -56,6 +57,9 @@
|
|
|
<if test="endTime != null and endTime != ''">
|
|
<if test="endTime != null and endTime != ''">
|
|
|
and filing_time <= #{endTime}
|
|
and filing_time <= #{endTime}
|
|
|
</if>
|
|
</if>
|
|
|
|
|
+ <if test="importMemberId != null">
|
|
|
|
|
+ and import_member_id = #{importMemberId}
|
|
|
|
|
+ </if>
|
|
|
order by filing_time desc
|
|
order by filing_time desc
|
|
|
</select>
|
|
</select>
|
|
|
|
|
|
|
@@ -106,6 +110,7 @@
|
|
|
<if test="allergyHistory != null">allergy_history,</if>
|
|
<if test="allergyHistory != null">allergy_history,</if>
|
|
|
<if test="createBy != null">create_by,</if>
|
|
<if test="createBy != null">create_by,</if>
|
|
|
<if test="remark != null">remark,</if>
|
|
<if test="remark != null">remark,</if>
|
|
|
|
|
+ <if test="importMemberId != null">import_member_id,</if>
|
|
|
create_time
|
|
create_time
|
|
|
</trim>
|
|
</trim>
|
|
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
@@ -125,16 +130,17 @@
|
|
|
<if test="allergyHistory != null">#{allergyHistory},</if>
|
|
<if test="allergyHistory != null">#{allergyHistory},</if>
|
|
|
<if test="createBy != null">#{createBy},</if>
|
|
<if test="createBy != null">#{createBy},</if>
|
|
|
<if test="remark != null">#{remark},</if>
|
|
<if test="remark != null">#{remark},</if>
|
|
|
|
|
+ <if test="importMemberId != null">#{importMemberId},</if>
|
|
|
sysdate()
|
|
sysdate()
|
|
|
</trim>
|
|
</trim>
|
|
|
</insert>
|
|
</insert>
|
|
|
|
|
|
|
|
<!-- 遇到重复电话直接忽略,继续插入下一条 -->
|
|
<!-- 遇到重复电话直接忽略,继续插入下一条 -->
|
|
|
<insert id="insertBatchFsCompanyCustomer">
|
|
<insert id="insertBatchFsCompanyCustomer">
|
|
|
- INSERT IGNORE INTO fs_company_customer (customer_name, address, phone)
|
|
|
|
|
|
|
+ INSERT IGNORE INTO fs_company_customer (customer_name, address, phone,create_time,import_member_id)
|
|
|
VALUES
|
|
VALUES
|
|
|
<foreach collection="companyCustomers" item="item" separator=",">
|
|
<foreach collection="companyCustomers" item="item" separator=",">
|
|
|
- (#{item.customerName}, #{item.address}, #{item.phone})
|
|
|
|
|
|
|
+ (#{item.customerName}, #{item.address}, #{item.phone},#{item.createTime},#{item.importMemberId})
|
|
|
</foreach>
|
|
</foreach>
|
|
|
</insert>
|
|
</insert>
|
|
|
|
|
|
|
@@ -156,6 +162,7 @@
|
|
|
<if test="currentMedication != null">current_medication = #{currentMedication},</if>
|
|
<if test="currentMedication != null">current_medication = #{currentMedication},</if>
|
|
|
<if test="allergyHistory != null">allergy_history = #{allergyHistory},</if>
|
|
<if test="allergyHistory != null">allergy_history = #{allergyHistory},</if>
|
|
|
<if test="remark != null">remark = #{remark},</if>
|
|
<if test="remark != null">remark = #{remark},</if>
|
|
|
|
|
+ <if test="importMemberId != null">import_member_id = #{importMemberId},</if>
|
|
|
<if test="updateBy != null">update_by = #{updateBy},</if>
|
|
<if test="updateBy != null">update_by = #{updateBy},</if>
|
|
|
update_time = sysdate()
|
|
update_time = sysdate()
|
|
|
</set>
|
|
</set>
|