|
|
|
@ -24,10 +24,11 @@ |
|
|
|
|
<result column="invoice_name" jdbcType="VARCHAR" property="invoiceName"/> |
|
|
|
|
<result column="invoice_taxno" jdbcType="VARCHAR" property="invoiceTaxno"/> |
|
|
|
|
<result column="mdm_multicode_json" jdbcType="VARCHAR" property="mdmMulticodeJson"/> |
|
|
|
|
<result column="status" jdbcType="VARCHAR" property="status"/> |
|
|
|
|
</resultMap> |
|
|
|
|
|
|
|
|
|
<sql id="Buyer_Base_Column_List"> |
|
|
|
|
id,taxpayer_code,purchase_name,address,phone,bank_of_deposit,bank_number,email,sjh,remarks,create_time,create_user_id,modify_time,modify_user_id,ghf_qylx,xhf_nsrsbh,xhf_mc,buyer_code,invoice_name,invoice_taxno,mdm_multicode_json |
|
|
|
|
id,taxpayer_code,purchase_name,address,phone,bank_of_deposit,bank_number,email,sjh,remarks,create_time,create_user_id,modify_time,modify_user_id,ghf_qylx,xhf_nsrsbh,xhf_mc,buyer_code,invoice_name,invoice_taxno,mdm_multicode_json,status |
|
|
|
|
</sql> |
|
|
|
|
<!-- 查询 --> |
|
|
|
|
<select parameterType="map" id="selectBuyerList" resultMap="BaseResultMap"> |
|
|
|
@ -52,7 +53,8 @@ |
|
|
|
|
xhf_nsrsbh, |
|
|
|
|
xhf_mc, |
|
|
|
|
buyer_code, |
|
|
|
|
create_time |
|
|
|
|
create_time, |
|
|
|
|
status |
|
|
|
|
FROM |
|
|
|
|
buyer_manage_info |
|
|
|
|
<where> |
|
|
|
@ -80,6 +82,10 @@ |
|
|
|
|
<if test="map.xhfMc != null and map.xhfMc !='' "> |
|
|
|
|
and xhf_mc = #{map.xhfMc,jdbcType=VARCHAR} |
|
|
|
|
</if> |
|
|
|
|
<!-- 客户状态--> |
|
|
|
|
<if test="map.status != null and map.status !='' "> |
|
|
|
|
and status = #{map.status,jdbcType=VARCHAR} |
|
|
|
|
</if> |
|
|
|
|
<!--购买方纳税人识别号--> |
|
|
|
|
<if test="map.taxpayerCode !=null and map.taxpayerCode !=''"> |
|
|
|
|
and taxpayer_code = #{map.taxpayerCode,jdbcType=VARCHAR} |
|
|
|
@ -121,7 +127,8 @@ |
|
|
|
|
xhf_nsrsbh, |
|
|
|
|
xhf_mc, |
|
|
|
|
buyer_code, |
|
|
|
|
rownum as rowno |
|
|
|
|
rownum as rowno, |
|
|
|
|
status |
|
|
|
|
FROM |
|
|
|
|
buyer_manage_info |
|
|
|
|
<where> |
|
|
|
@ -133,6 +140,10 @@ |
|
|
|
|
<if test="map.xhfMc != null and map.xhfMc !='' "> |
|
|
|
|
and xhf_mc = #{map.xhfMc,jdbcType=VARCHAR} |
|
|
|
|
</if> |
|
|
|
|
<!-- 客户状态--> |
|
|
|
|
<if test="map.status != null and map.status !='' "> |
|
|
|
|
and status = #{map.status,jdbcType=VARCHAR} |
|
|
|
|
</if> |
|
|
|
|
<if test="shList != null and shList.size() == 0"> |
|
|
|
|
and xhf_nsrsbh = '' |
|
|
|
|
</if> |
|
|
|
@ -239,6 +250,9 @@ |
|
|
|
|
<if test="buyer.mdmMulticodeJson != null "> |
|
|
|
|
mdm_multicode_json = #{buyer.mdmMulticodeJson,jdbcType=VARCHAR}, |
|
|
|
|
</if> |
|
|
|
|
<if test="buyer.status != null "> |
|
|
|
|
status = #{buyer.status,jdbcType=VARCHAR}, |
|
|
|
|
</if> |
|
|
|
|
</set> |
|
|
|
|
<where> |
|
|
|
|
id = #{buyer.id,jdbcType=VARCHAR} |
|
|
|
@ -324,6 +338,9 @@ |
|
|
|
|
<if test="mdmMulticodeJson != null"> |
|
|
|
|
mdm_multicode_json, |
|
|
|
|
</if> |
|
|
|
|
<if test="status != null"> |
|
|
|
|
status, |
|
|
|
|
</if> |
|
|
|
|
|
|
|
|
|
</trim> |
|
|
|
|
|
|
|
|
@ -394,6 +411,9 @@ |
|
|
|
|
<if test="mdmMulticodeJson != null"> |
|
|
|
|
#{mdmMulticodeJson,jdbcType=VARCHAR}, |
|
|
|
|
</if> |
|
|
|
|
<if test="status != null"> |
|
|
|
|
#{status,jdbcType=VARCHAR}, |
|
|
|
|
</if> |
|
|
|
|
</trim> |
|
|
|
|
</insert> |
|
|
|
|
|
|
|
|
@ -460,6 +480,9 @@ |
|
|
|
|
<if test="mdmMulticodeJson != null"> |
|
|
|
|
mdm_multicode_json, |
|
|
|
|
</if> |
|
|
|
|
<if test="status != null"> |
|
|
|
|
status, |
|
|
|
|
</if> |
|
|
|
|
|
|
|
|
|
</trim> |
|
|
|
|
|
|
|
|
@ -511,6 +534,8 @@ |
|
|
|
|
</if> |
|
|
|
|
<if test="mdmMulticodeJson != null"> #{mdmMulticodeJson,jdbcType=VARCHAR}, |
|
|
|
|
</if> |
|
|
|
|
<if test="status != null"> #{status,jdbcType=VARCHAR}, |
|
|
|
|
</if> |
|
|
|
|
</trim> |
|
|
|
|
on duplicate key update |
|
|
|
|
<if test="id != null"> |
|
|
|
@ -570,7 +595,10 @@ |
|
|
|
|
invoice_taxno = VALUES(invoice_taxno), |
|
|
|
|
</if> |
|
|
|
|
<if test="mdmMulticodeJson != null"> |
|
|
|
|
mdm_multicode_json = VALUES(mdm_multicode_json) |
|
|
|
|
mdm_multicode_json = VALUES(mdm_multicode_json), |
|
|
|
|
</if> |
|
|
|
|
<if test="status != null"> |
|
|
|
|
status = VALUES(status) |
|
|
|
|
</if> |
|
|
|
|
</insert> |
|
|
|
|
<insert id="insertBuyerByList"> |
|
|
|
@ -595,7 +623,8 @@ |
|
|
|
|
buyer_code, |
|
|
|
|
invoice_name, |
|
|
|
|
invoice_taxno, |
|
|
|
|
mdm_multicode_json |
|
|
|
|
mdm_multicode_json, |
|
|
|
|
status |
|
|
|
|
) |
|
|
|
|
values |
|
|
|
|
<foreach collection="list" item="item" index="index" |
|
|
|
@ -621,7 +650,8 @@ |
|
|
|
|
#{item.buyerCode,jdbcType=VARCHAR}, |
|
|
|
|
#{item.invoiceName,jdbcType=VARCHAR}, |
|
|
|
|
#{item.invoiceTaxno,jdbcType=VARCHAR}, |
|
|
|
|
#{item.mdmMulticodeJson,jdbcType=VARCHAR} |
|
|
|
|
#{item.mdmMulticodeJson,jdbcType=VARCHAR}, |
|
|
|
|
#{item.status,jdbcType=VARCHAR} |
|
|
|
|
) |
|
|
|
|
</foreach> |
|
|
|
|
</insert> |
|
|
|
@ -660,6 +690,9 @@ |
|
|
|
|
<if test="map.id!=null and map.id!=''"> |
|
|
|
|
AND id !=#{map.id,jdbcType=VARCHAR} |
|
|
|
|
</if> |
|
|
|
|
<if test="map.status!=null and map.status!=''"> |
|
|
|
|
AND status =#{map.status,jdbcType=VARCHAR} |
|
|
|
|
</if> |
|
|
|
|
</where> |
|
|
|
|
</select> |
|
|
|
|
|
|
|
|
@ -687,7 +720,8 @@ |
|
|
|
|
to_char(modify_time,'yyyy-MM-dd') as modifyTime, |
|
|
|
|
</if> |
|
|
|
|
modify_user_id, |
|
|
|
|
ghf_qylx |
|
|
|
|
ghf_qylx, |
|
|
|
|
status |
|
|
|
|
FROM |
|
|
|
|
buyer_manage_info |
|
|
|
|
<where> |
|
|
|
@ -725,6 +759,9 @@ |
|
|
|
|
and rownum <=10 |
|
|
|
|
</if> |
|
|
|
|
</if> |
|
|
|
|
<if test="status != null and status != ''"> |
|
|
|
|
and status = #{status,jdbcType=VARCHAR} |
|
|
|
|
</if> |
|
|
|
|
</where> |
|
|
|
|
</select> |
|
|
|
|
|
|
|
|
@ -751,7 +788,8 @@ |
|
|
|
|
to_char(modify_time,'yyyy-MM-dd') as modifyTime, |
|
|
|
|
</if> |
|
|
|
|
modify_user_id, |
|
|
|
|
ghf_qylx |
|
|
|
|
ghf_qylx, |
|
|
|
|
status |
|
|
|
|
FROM |
|
|
|
|
buyer_manage_info |
|
|
|
|
<where> |
|
|
|
@ -764,6 +802,9 @@ |
|
|
|
|
<if test="nsrsbh != null and nsrsbh != ''"> |
|
|
|
|
and xhf_nsrsbh = #{nsrsbh,jdbcType=VARCHAR} |
|
|
|
|
</if> |
|
|
|
|
<if test="status != null and status != ''"> |
|
|
|
|
and status = #{status,jdbcType=VARCHAR} |
|
|
|
|
</if> |
|
|
|
|
</where> |
|
|
|
|
</select> |
|
|
|
|
|
|
|
|
@ -816,7 +857,8 @@ |
|
|
|
|
ghf_qylx, |
|
|
|
|
xhf_nsrsbh, |
|
|
|
|
xhf_mc, |
|
|
|
|
buyer_code |
|
|
|
|
buyer_code, |
|
|
|
|
status |
|
|
|
|
FROM |
|
|
|
|
buyer_manage_info |
|
|
|
|
<where> |
|
|
|
@ -848,6 +890,9 @@ |
|
|
|
|
<if test="buyer.id != null and buyer.id != ''"> |
|
|
|
|
and id = #{buyer.id,jdbcType=VARCHAR} |
|
|
|
|
</if> |
|
|
|
|
<if test="buyer.status != null and buyer.status != ''"> |
|
|
|
|
and status = #{buyer.status,jdbcType=VARCHAR} |
|
|
|
|
</if> |
|
|
|
|
</where> |
|
|
|
|
</select> |
|
|
|
|
</mapper> |
|
|
|
|