|
|
@@ -31,15 +31,20 @@
|
|
|
<result property="completeStatus" column="complete_status" />
|
|
|
<result property="deptId" column="dept_id" />
|
|
|
<result property="deptName" column="dept_name" />
|
|
|
+ <!-- 口袋助理相关字段 -->
|
|
|
+ <result property="kdzlAddWechatStatus" column="kdzl_add_wechat_status" />
|
|
|
+ <result property="kdzlMakeStatus" column="kdzl_make_status" />
|
|
|
+ <result property="kdzlCallStatus" column="kdzl_call_status" />
|
|
|
</resultMap>
|
|
|
|
|
|
<sql id="selectFsCompanyCustomerVo">
|
|
|
select id, customer_name, sex, age, address, phone, filing_time,
|
|
|
- company_user_id, company_user_name, appointment_time, doctor_id, doctor_name,
|
|
|
- present_illness, current_medication, allergy_history,
|
|
|
- create_by, create_time, update_by, update_time, remark, del_flag, import_member_id,
|
|
|
- buy_count, claim_status,
|
|
|
- complete_status, dept_id, dept_name
|
|
|
+ company_user_id, company_user_name, appointment_time, doctor_id, doctor_name,
|
|
|
+ present_illness, current_medication, allergy_history,
|
|
|
+ create_by, create_time, update_by, update_time, remark, del_flag, import_member_id,
|
|
|
+ buy_count, claim_status,
|
|
|
+ complete_status, dept_id, dept_name,
|
|
|
+ kdzl_add_wechat_status, kdzl_make_status, kdzl_call_status
|
|
|
from fs_company_customer
|
|
|
</sql>
|
|
|
|
|
|
@@ -204,6 +209,10 @@
|
|
|
<if test="completeStatus != null">complete_status,</if>
|
|
|
<if test="deptId != null">dept_id,</if>
|
|
|
<if test="deptName != null">dept_name,</if>
|
|
|
+ <!-- 口袋助理字段 -->
|
|
|
+ <if test="kdzlAddWechatStatus != null">kdzl_add_wechat_status,</if>
|
|
|
+ <if test="kdzlMakeStatus != null">kdzl_make_status,</if>
|
|
|
+ <if test="kdzlCallStatus != null">kdzl_call_status,</if>
|
|
|
create_time
|
|
|
</trim>
|
|
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
|
@@ -229,21 +238,27 @@
|
|
|
<if test="completeStatus != null">#{completeStatus},</if>
|
|
|
<if test="deptId != null">#{deptId},</if>
|
|
|
<if test="deptName != null">#{deptName},</if>
|
|
|
+ <!-- 口袋助理字段值 -->
|
|
|
+ <if test="kdzlAddWechatStatus != null">#{kdzlAddWechatStatus},</if>
|
|
|
+ <if test="kdzlMakeStatus != null">#{kdzlMakeStatus},</if>
|
|
|
+ <if test="kdzlCallStatus != null">#{kdzlCallStatus},</if>
|
|
|
sysdate()
|
|
|
</trim>
|
|
|
</insert>
|
|
|
|
|
|
- <!-- 批量新增-->
|
|
|
+ <!-- 批量新增(保持原字段不变,新字段不在此处插入,如有需要可另行扩展) -->
|
|
|
<insert id="insertBatchFsCompanyCustomer" parameterType="list">
|
|
|
INSERT IGNORE INTO fs_company_customer (
|
|
|
customer_name, phone, address, create_time,
|
|
|
- import_member_id, present_illness, current_medication, allergy_history, claim_status
|
|
|
+ import_member_id, present_illness, current_medication, allergy_history, claim_status,
|
|
|
+ kdzl_add_wechat_status, kdzl_make_status, kdzl_call_status
|
|
|
) VALUES
|
|
|
<foreach collection="companyCustomers" item="item" separator=",">
|
|
|
(
|
|
|
#{item.customerName}, #{item.phone}, #{item.address}, #{item.createTime},
|
|
|
#{item.importMemberId}, #{item.presentIllness}, #{item.currentMedication},
|
|
|
- #{item.allergyHistory}, #{item.claimStatus}
|
|
|
+ #{item.allergyHistory}, #{item.claimStatus},
|
|
|
+ #{item.kdzlAddWechatStatus}, #{item.kdzlMakeStatus}, #{item.kdzlCallStatus}
|
|
|
)
|
|
|
</foreach>
|
|
|
</insert>
|
|
|
@@ -272,6 +287,10 @@
|
|
|
<if test="completeStatus != null">complete_status = #{completeStatus},</if>
|
|
|
<if test="deptId != null">dept_id = #{deptId},</if>
|
|
|
<if test="deptName != null">dept_name = #{deptName},</if>
|
|
|
+ <!-- 口袋助理字段 -->
|
|
|
+ <if test="kdzlAddWechatStatus != null">kdzl_add_wechat_status = #{kdzlAddWechatStatus},</if>
|
|
|
+ <if test="kdzlMakeStatus != null">kdzl_make_status = #{kdzlMakeStatus},</if>
|
|
|
+ <if test="kdzlCallStatus != null">kdzl_call_status = #{kdzlCallStatus},</if>
|
|
|
<if test="updateBy != null">update_by = #{updateBy},</if>
|
|
|
update_time = sysdate()
|
|
|
</set>
|
|
|
@@ -319,6 +338,21 @@
|
|
|
WHEN import_member_id = #{item.importMemberId} THEN #{item.allergyHistory}
|
|
|
</foreach>
|
|
|
</trim>
|
|
|
+ <trim prefix="kdzl_add_wechat_status = CASE" suffix="END,">
|
|
|
+ <foreach collection="companyCustomers" item="item">
|
|
|
+ WHEN import_member_id = #{item.importMemberId} THEN #{item.kdzlAddWechatStatus}
|
|
|
+ </foreach>
|
|
|
+ </trim>
|
|
|
+ <trim prefix="kdzl_make_status = CASE" suffix="END,">
|
|
|
+ <foreach collection="companyCustomers" item="item">
|
|
|
+ WHEN import_member_id = #{item.importMemberId} THEN #{item.kdzlMakeStatus}
|
|
|
+ </foreach>
|
|
|
+ </trim>
|
|
|
+ <trim prefix="kdzl_call_status = CASE" suffix="END,">
|
|
|
+ <foreach collection="companyCustomers" item="item">
|
|
|
+ WHEN import_member_id = #{item.importMemberId} THEN #{item.kdzlCallStatus}
|
|
|
+ </foreach>
|
|
|
+ </trim>
|
|
|
</trim>
|
|
|
WHERE import_member_id IN
|
|
|
<foreach collection="companyCustomers" item="item" open="(" separator="," close=")">
|