去除供应商类型多余代码
This commit is contained in:
@@ -30,7 +30,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<result property="weightThreshold" column="weight_threshold" />
|
||||
<result property="throwRatio" column="throw_ratio" />
|
||||
<result property="cooperationStartDate" column="cooperation_start_date" />
|
||||
<result property="contractStartDate" column="contract_start_date" />
|
||||
<result property="contractEndDate" column="contract_end_date" />
|
||||
<result property="cooperationStatus" column="cooperation_status" />
|
||||
<result property="channelIds" column="channel_ids" />
|
||||
@@ -48,7 +47,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
s.is_enable, s.purchaser_user_id, s.purchaser_user, s.settlement_user_id, s.settlement_user,
|
||||
s.service_user_id, s.service_user, s.ed, s.zq, s.settlement_type, s.temp_ed, s.account_balance,
|
||||
s.foreign_currency_balance, s.credit_ed, s.weight_threshold, s.throw_ratio, s.cooperation_start_date,
|
||||
s.contract_start_date, s.contract_end_date, s.cooperation_status, s.channel_ids, s.remark,
|
||||
s.contract_end_date, s.cooperation_status, s.channel_ids, s.remark,
|
||||
s.create_by, s.create_time, s.update_by, s.update_time, s.del_flag
|
||||
from sup_supplier s
|
||||
<!-- 数据权限:采购/销售(仅本人 s.purchaser_user_id)/部门经理(本部门 su.dept_id);
|
||||
@@ -123,7 +122,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<if test="weightThreshold != null">weight_threshold,</if>
|
||||
<if test="throwRatio != null">throw_ratio,</if>
|
||||
<if test="cooperationStartDate != null">cooperation_start_date,</if>
|
||||
<if test="contractStartDate != null">contract_start_date,</if>
|
||||
<if test="contractEndDate != null">contract_end_date,</if>
|
||||
<if test="cooperationStatus != null">cooperation_status,</if>
|
||||
<if test="channelIds != null">channel_ids,</if>
|
||||
@@ -157,7 +155,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<if test="weightThreshold != null">#{weightThreshold},</if>
|
||||
<if test="throwRatio != null">#{throwRatio},</if>
|
||||
<if test="cooperationStartDate != null">#{cooperationStartDate},</if>
|
||||
<if test="contractStartDate != null">#{contractStartDate},</if>
|
||||
<if test="contractEndDate != null">#{contractEndDate},</if>
|
||||
<if test="cooperationStatus != null">#{cooperationStatus},</if>
|
||||
<if test="channelIds != null">#{channelIds},</if>
|
||||
@@ -195,7 +192,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<if test="weightThreshold != null">weight_threshold = #{weightThreshold},</if>
|
||||
<if test="throwRatio != null">throw_ratio = #{throwRatio},</if>
|
||||
<if test="cooperationStartDate != null">cooperation_start_date = #{cooperationStartDate},</if>
|
||||
contract_start_date = #{contractStartDate},
|
||||
contract_end_date = #{contractEndDate},
|
||||
<if test="cooperationStatus != null">cooperation_status = #{cooperationStatus},</if>
|
||||
<if test="channelIds != null">channel_ids = #{channelIds},</if>
|
||||
|
||||
@@ -5,7 +5,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<mapper namespace="com.bms.customer.supplierinfo.mapper.OracleSupplierSyncMapper">
|
||||
|
||||
<!-- 服务商(供应商)主数据:TAB_SERVICE_INFO(2026-10-10 起替代取数错误的 TAB_SUPPLIER)
|
||||
SERVICE_TYPE 为中文口径:尾程渠道 -> 供应商类型 5(尾派服务商),清关 -> 4(清关行);
|
||||
SERVICE_TYPE 为中文口径,同步时按字典 bms_supplier_type 解析:尾程渠道 -> 尾派服务商,清关 -> 清关行;
|
||||
BL_OPEN:1 启用,其余停用 -->
|
||||
<select id="selectAllServiceInfo" resultType="java.util.HashMap" fetchSize="500">
|
||||
SELECT SERVICE_CODE, SERVICE_NAME, SERVICE_TYPE, BL_OPEN, REMARK, CREATE_DATE
|
||||
|
||||
@@ -25,12 +25,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
</insert>
|
||||
|
||||
<!-- 同步源(TAB_SERVICE_INFO/CHANNEL)无开票类型、卡车行类型、额度、账期,
|
||||
更新时这些列一律不动,保留库内维护值;supplier_type/channel_ids 以源为准 -->
|
||||
更新时这些列一律不动。supplier_type 仅在解析到字典键值时回写,源为空或对不上字典时保留原值 -->
|
||||
<update id="updateSyncSupplierByCode" parameterType="com.bms.customer.supplierinfo.domain.BmsSupplier">
|
||||
UPDATE sup_supplier
|
||||
SET supplier_name = #{supplierName}
|
||||
, is_enable = #{isEnable}
|
||||
, supplier_type = #{supplierType}
|
||||
<if test="supplierType != null">, supplier_type = #{supplierType}</if>
|
||||
, channel_ids = #{channelIds}
|
||||
<if test="remark != null">, remark = #{remark}</if>
|
||||
, update_by = #{updateBy}
|
||||
|
||||
@@ -1,130 +0,0 @@
|
||||
<?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.bms.system.mapper.BmsSupplierTypeMapper">
|
||||
|
||||
<resultMap type="BmsSupplierType" id="BmsSupplierTypeResult">
|
||||
<id property="typeId" column="type_id" />
|
||||
<result property="typeCode" column="type_code" />
|
||||
<result property="typeName" column="type_name" />
|
||||
<result property="typeSort" column="type_sort" />
|
||||
<result property="status" column="status" />
|
||||
<result property="remark" column="remark" />
|
||||
<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="delFlag" column="del_flag" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectVo">
|
||||
select type_id, type_code, type_name, type_sort, status, remark,
|
||||
create_by, create_time, update_by, update_time, del_flag
|
||||
from bms_supplier_type
|
||||
</sql>
|
||||
|
||||
<select id="selectList" parameterType="BmsSupplierType" resultMap="BmsSupplierTypeResult">
|
||||
<include refid="selectVo"/>
|
||||
<where>
|
||||
del_flag = '0'
|
||||
<if test="typeName != null and typeName != ''">
|
||||
and type_name like concat('%', #{typeName}, '%')
|
||||
</if>
|
||||
<if test="status != null and status != ''">
|
||||
and status = #{status}
|
||||
</if>
|
||||
</where>
|
||||
order by type_sort asc, type_id asc
|
||||
</select>
|
||||
|
||||
<select id="selectById" parameterType="Long" resultMap="BmsSupplierTypeResult">
|
||||
<include refid="selectVo"/>
|
||||
where type_id = #{typeId} and del_flag = '0'
|
||||
</select>
|
||||
|
||||
<select id="countByTypeCode" resultType="int">
|
||||
select count(1) from bms_supplier_type
|
||||
where del_flag = '0' and type_code = #{typeCode}
|
||||
<if test="excludeId != null">and type_id != #{excludeId}</if>
|
||||
</select>
|
||||
|
||||
<select id="countByTypeName" resultType="int">
|
||||
select count(1) from bms_supplier_type
|
||||
where del_flag = '0' and type_name = #{typeName}
|
||||
<if test="excludeId != null">and type_id != #{excludeId}</if>
|
||||
</select>
|
||||
|
||||
<insert id="insert" parameterType="BmsSupplierType" useGeneratedKeys="true" keyProperty="typeId">
|
||||
insert into bms_supplier_type (
|
||||
type_code, type_name, type_sort, status, remark, create_by, create_time, del_flag
|
||||
) values (
|
||||
#{typeCode}, #{typeName}, #{typeSort}, #{status}, #{remark}, #{createBy}, sysdate(), '0'
|
||||
)
|
||||
</insert>
|
||||
|
||||
<update id="update" parameterType="BmsSupplierType">
|
||||
update bms_supplier_type
|
||||
<set>
|
||||
<if test="typeName != null and typeName != ''">type_name = #{typeName},</if>
|
||||
<if test="typeSort != null">type_sort = #{typeSort},</if>
|
||||
<if test="status != null and status != ''">status = #{status},</if>
|
||||
<if test="remark != null">remark = #{remark},</if>
|
||||
<if test="updateBy != null">update_by = #{updateBy},</if>
|
||||
update_time = sysdate()
|
||||
</set>
|
||||
where type_id = #{typeId} and del_flag = '0'
|
||||
</update>
|
||||
|
||||
<update id="updateStatus" parameterType="BmsSupplierType">
|
||||
update bms_supplier_type
|
||||
set status = #{status},
|
||||
update_by = #{updateBy},
|
||||
update_time = sysdate()
|
||||
where type_id = #{typeId} and del_flag = '0'
|
||||
</update>
|
||||
|
||||
<update id="deleteByIds" parameterType="Long">
|
||||
update bms_supplier_type
|
||||
set del_flag = '1',
|
||||
type_code = concat(type_code, '#', type_id),
|
||||
type_name = concat(type_name, '#', type_id),
|
||||
update_time = sysdate()
|
||||
where del_flag = '0' and type_id in
|
||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</update>
|
||||
|
||||
<select id="selectDictCode" resultType="java.lang.Long">
|
||||
select dict_code from sys_dict_data
|
||||
where dict_type = #{dictType} and dict_value = #{dictValue}
|
||||
limit 1
|
||||
</select>
|
||||
|
||||
<insert id="insertDict" parameterType="BmsSupplierType">
|
||||
insert into sys_dict_data (
|
||||
dict_sort, dict_label, dict_value, dict_type, css_class, list_class,
|
||||
is_default, status, create_by, create_time, remark
|
||||
) values (
|
||||
#{typeSort}, #{typeName}, #{typeCode}, 'bms_supplier_type', '', 'primary',
|
||||
'N', #{status}, #{createBy}, sysdate(), #{remark}
|
||||
)
|
||||
</insert>
|
||||
|
||||
<update id="updateDict" parameterType="BmsSupplierType">
|
||||
update sys_dict_data
|
||||
set dict_sort = #{typeSort},
|
||||
dict_label = #{typeName},
|
||||
status = #{status},
|
||||
remark = #{remark},
|
||||
update_by = #{updateBy},
|
||||
update_time = sysdate()
|
||||
where dict_type = 'bms_supplier_type' and dict_value = #{typeCode}
|
||||
</update>
|
||||
|
||||
<delete id="deleteDictByCode">
|
||||
delete from sys_dict_data
|
||||
where dict_type = 'bms_supplier_type' and dict_value = #{typeCode}
|
||||
</delete>
|
||||
</mapper>
|
||||
Reference in New Issue
Block a user