供应商准入退出
This commit is contained in:
@ -78,6 +78,16 @@
|
||||
</select>
|
||||
|
||||
|
||||
|
||||
<select id="selectCount" parameterType="com.chinaunicom.zyhy.ebtp.supplier.coscosupplier.entity.CoscoAccessSupplierCategory" resultType="Integer">
|
||||
select count(0) from cosco_access_supplier_category
|
||||
where
|
||||
supplier_id = #{supplierId} and del_flag = 'normal'
|
||||
<if test="deptId != null and deptId != ''">
|
||||
and dept_id = #{deptId}
|
||||
</if>
|
||||
</select>
|
||||
|
||||
<select id="selectExitCategoryList" parameterType="com.chinaunicom.zyhy.ebtp.supplier.coscosupplier.entity.CoscoAccessSupplierCategory" resultMap="CoscoAccessSupplierCategoryResult">
|
||||
SELECT
|
||||
s.`name` as supplierName,
|
||||
@ -145,6 +155,7 @@
|
||||
<if test="updateBy != null">update_by,</if>
|
||||
<if test="updateTime != null">update_time,</if>
|
||||
<if test="lastUpdateTime != null">last_update_time,</if>
|
||||
<if test="deptId != null">dept_id,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="id != null">#{id},</if>
|
||||
@ -157,6 +168,7 @@
|
||||
<if test="updateBy != null">#{updateBy},</if>
|
||||
<if test="updateTime != null">#{updateTime},</if>
|
||||
<if test="lastUpdateTime != null">#{lastUpdateTime},</if>
|
||||
<if test="deptId != null">#{deptId},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
<insert id="batchCoscoAccessSupplierCategory" parameterType="java.util.List">
|
||||
@ -197,13 +209,23 @@
|
||||
<if test="lastUpdateTime != null">last_update_time =
|
||||
#{lastUpdateTime},
|
||||
</if>
|
||||
<if test="deptId != null">dept_id =
|
||||
#{deptId},
|
||||
</if>
|
||||
</trim>
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
<update id="deleteCoscoAccessSupplierCategoryById" parameterType="com.chinaunicom.zyhy.ebtp.supplier.coscosupplier.entity.CoscoAccessSupplierCategory">
|
||||
update cosco_access_supplier_category set del_flag = 'deleted'
|
||||
where supplier_id = #{supplierId} and category_id = #{categoryId}
|
||||
where supplier_id = #{supplierId}
|
||||
<if test="categoryId != null">
|
||||
and category_id = #{categoryId}
|
||||
</if>
|
||||
<if test="deptId != null">
|
||||
and dept_id = #{deptId}
|
||||
</if>
|
||||
|
||||
</update>
|
||||
|
||||
<update id="deleteCoscoAccessSupplierCategoryByIds" parameterType="String">
|
||||
|
@ -106,10 +106,16 @@
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="accessWorkId != null">access_work_id,</if>
|
||||
<if test="supplierId != null">supplier_id,</if>
|
||||
<if test="id != null">id,</if>
|
||||
<if test="deptId != null">dept_id,</if>
|
||||
<if test="accessStatus != null">access_status,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="accessWorkId != null">#{accessWorkId},</if>
|
||||
<if test="supplierId != null">#{supplierId},</if>
|
||||
<if test="id != null">#{id},</if>
|
||||
<if test="deptId != null">#{deptId},</if>
|
||||
<if test="accessStatus != null">#{accessStatus},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
<insert id="batchCoscoAccessSupplier" parameterType="java.util.List">
|
||||
@ -123,11 +129,26 @@
|
||||
<update id="updateCoscoAccessSupplier" parameterType="com.chinaunicom.zyhy.ebtp.supplier.coscosupplier.entity.CoscoAccessSupplier">
|
||||
update cosco_access_supplier
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="supplierId != null">supplier_id =
|
||||
#{supplierId},
|
||||
<if test="accessStatus != null">access_status =
|
||||
#{accessStatus},
|
||||
</if>
|
||||
</trim>
|
||||
where access_work_id = #{accessWorkId}
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
|
||||
<update id="updateCoscoAccessSupplierBySupplierIdAndDeptId" parameterType="com.chinaunicom.zyhy.ebtp.supplier.coscosupplier.entity.CoscoAccessSupplier">
|
||||
update cosco_access_supplier
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="accessStatus != null">access_status =
|
||||
#{accessStatus},
|
||||
</if>
|
||||
</trim>
|
||||
where supplier_id = #{supplierId}
|
||||
<if test="deptId != null">dept_id =
|
||||
and dept_id = #{deptId}
|
||||
</if>
|
||||
|
||||
</update>
|
||||
|
||||
<update id="deleteCoscoAccessSupplierByAccessWorkId" parameterType="String">
|
||||
|
@ -0,0 +1,111 @@
|
||||
<?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.chinaunicom.zyhy.ebtp.supplier.coscosupplier.dao.mapper.CoscoMessageMapper">
|
||||
|
||||
<resultMap type="com.chinaunicom.zyhy.ebtp.supplier.coscosupplier.entity.CoscoMessage" id="CoscoMessageResult">
|
||||
<result property="id" column="id"/>
|
||||
<result property="receiverId" column="receiver_id"/>
|
||||
<result property="content" column="content"/>
|
||||
<result property="read" column="read"/>
|
||||
<result property="type" column="type"/>
|
||||
<result property="createTime" column="create_time"/>
|
||||
<result property="updateTime" column="update_time"/>
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectCoscoMessageVo">
|
||||
select id, receiver_id, content, read, type, create_time, update_time
|
||||
from cosco_message
|
||||
</sql>
|
||||
|
||||
<select id="selectCoscoMessageList" parameterType="com.chinaunicom.zyhy.ebtp.supplier.coscosupplier.entity.CoscoMessage" resultMap="CoscoMessageResult">
|
||||
<include refid="selectCoscoMessageVo"/>
|
||||
<where>
|
||||
<if test="receiverId != null and receiverId != ''">
|
||||
and receiver_id = #{receiverId}
|
||||
</if>
|
||||
<if test="content != null and content != ''">
|
||||
and content = #{content}
|
||||
</if>
|
||||
<if test="read != null ">
|
||||
and read = #{read}
|
||||
</if>
|
||||
<if test="type != null and type != ''">
|
||||
and type = #{type}
|
||||
</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectCoscoMessageById" parameterType="String"
|
||||
resultMap="CoscoMessageResult">
|
||||
<include refid="selectCoscoMessageVo"/>
|
||||
where id = #{id}
|
||||
</select>
|
||||
|
||||
<insert id="insertCoscoMessage" parameterType="com.chinaunicom.zyhy.ebtp.supplier.coscosupplier.entity.CoscoMessage">
|
||||
insert into cosco_message
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="id != null">id,</if>
|
||||
<if test="receiverId != null and receiverId != ''">receiver_id,</if>
|
||||
<if test="content != null and content != ''">content,</if>
|
||||
<if test="read != null">read,</if>
|
||||
<if test="type != null">type,</if>
|
||||
<if test="createTime != null">create_time,</if>
|
||||
<if test="updateTime != null">update_time,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="id != null">#{id},</if>
|
||||
<if test="receiverId != null and receiverId != ''">#{receiverId},</if>
|
||||
<if test="content != null and content != ''">#{content},</if>
|
||||
<if test="read != null">#{read},</if>
|
||||
<if test="type != null">#{type},</if>
|
||||
<if test="createTime != null">#{createTime},</if>
|
||||
<if test="updateTime != null">#{updateTime},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
<insert id="batchCoscoMessage" parameterType="java.util.List">
|
||||
insert into cosco_message
|
||||
( id, receiver_id, content, read, type, create_time, update_time)
|
||||
values
|
||||
<foreach item="item" index="index" collection="list" separator=",">
|
||||
( #{item.id}, #{item.receiverId}, #{item.content}, #{item.read}, #{item.type}, #{item.createTime}, #{item.updateTime})
|
||||
</foreach>
|
||||
</insert>
|
||||
<update id="updateCoscoMessage" parameterType="com.chinaunicom.zyhy.ebtp.supplier.coscosupplier.entity.CoscoMessage">
|
||||
update cosco_message
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="receiverId != null and receiverId != ''">receiver_id =
|
||||
#{receiverId},
|
||||
</if>
|
||||
<if test="content != null and content != ''">content =
|
||||
#{content},
|
||||
</if>
|
||||
<if test="read != null">read =
|
||||
#{read},
|
||||
</if>
|
||||
<if test="type != null">type =
|
||||
#{type},
|
||||
</if>
|
||||
<if test="createTime != null">create_time =
|
||||
#{createTime},
|
||||
</if>
|
||||
<if test="updateTime != null">update_time =
|
||||
#{updateTime},
|
||||
</if>
|
||||
</trim>
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
<update id="deleteCoscoMessageById" parameterType="String">
|
||||
update cosco_message set del_flag = 2
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
<update id="deleteCoscoMessageByIds" parameterType="String">
|
||||
update cosco_message set del_flag = 2 where id in
|
||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</update>
|
||||
</mapper>
|
@ -196,7 +196,7 @@
|
||||
</update>
|
||||
|
||||
<update id="deleteCoscoSupplierBankByIds" parameterType="String">
|
||||
update cosco_supplier_bank set del_flag = 2 where id in
|
||||
update cosco_supplier_bank set del_flag = 'deleted' where id in
|
||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
|
@ -243,7 +243,7 @@
|
||||
<include refid="selectCoscoSupplierBaseVo"/>
|
||||
<where>
|
||||
and del_flag = 'normal'
|
||||
<if test="vo.deptId != null and vo.deptId != ''">
|
||||
<if test="deptId != null and deptId != ''">
|
||||
and dept_id = #{vo.deptId}
|
||||
</if>
|
||||
<if test="supplierType != null and supplierType != ''">
|
||||
|
@ -21,27 +21,73 @@
|
||||
<result property="supplierType" column="supplier_type"/>
|
||||
<result property="enterpriseType" column="enterprise_type"/>
|
||||
<result property="approveStatusText" column="approve_status_text"/>
|
||||
<result property="enterpriseType" column="enterprise_type"/>
|
||||
<result property="title" column="title"/>
|
||||
<result property="changeDesc" column="change_desc"/>
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectCoscoSupplierChangeApplyVo">
|
||||
select id, supplier_id, change_by, change_time, approve_status,
|
||||
CASE
|
||||
WHEN approve_status = 0 THEN '审批中'
|
||||
WHEN approve_status = 1 THEN '通过'
|
||||
WHEN approve_status = 2 THEN '驳回'
|
||||
ELSE CAST(approve_status AS CHAR)
|
||||
END AS approve_status_text,
|
||||
work_flow_id, del_flag, create_by, create_time, update_by, update_time, last_update_time
|
||||
from cosco_supplier_change_apply
|
||||
SELECT
|
||||
c.id,
|
||||
c.supplier_id,
|
||||
sb.`name` AS supplierName,
|
||||
CASE
|
||||
WHEN sb.supplier_type = 'dvs' THEN
|
||||
'境内企业'
|
||||
WHEN sb.supplier_type = 'ovs' THEN
|
||||
'境外企业'
|
||||
WHEN sb.supplier_type = 'pe' THEN
|
||||
'个人'
|
||||
END AS supplier_type,
|
||||
c.change_by,
|
||||
c.change_time,
|
||||
c.approve_status,
|
||||
CASE
|
||||
WHEN c.approve_status = 0 THEN
|
||||
'审批中'
|
||||
WHEN c.approve_status = 1 THEN
|
||||
'通过'
|
||||
WHEN c.approve_status = 2 THEN
|
||||
'驳回' ELSE CAST( c.approve_status AS CHAR )
|
||||
END AS approve_status_text,
|
||||
c.work_flow_id,
|
||||
c.del_flag,
|
||||
c.create_time,
|
||||
|
||||
c.last_update_time,
|
||||
c.title,
|
||||
c.change_desc ,
|
||||
wo.maxTime as update_time,
|
||||
wo.deptNames
|
||||
|
||||
FROM
|
||||
cosco_supplier_change_apply c
|
||||
LEFT JOIN cosco_supplier_base sb ON c.supplier_id = sb.id
|
||||
left join (
|
||||
SELECT
|
||||
cas.supplier_id,
|
||||
MAX(w.update_time) AS maxTime,
|
||||
GROUP_CONCAT(DISTINCT w.dept_id SEPARATOR ',') AS deptNames
|
||||
FROM
|
||||
cosco_access_work w
|
||||
LEFT JOIN
|
||||
cosco_access_supplier cas ON w.id = cas.access_work_id
|
||||
WHERE
|
||||
w.apply_type = 0
|
||||
GROUP BY
|
||||
cas.supplier_id
|
||||
) wo on wo.supplier_id = sb.id
|
||||
</sql>
|
||||
|
||||
|
||||
<select id="selectPageList" parameterType="com.chinaunicom.zyhy.ebtp.supplier.coscosupplier.entity.CoscoSupplierChangeApply" resultMap="CoscoSupplierChangeApplyResult">
|
||||
SELECT
|
||||
csca.id,
|
||||
sb.id as supplier_id,
|
||||
csca.change_time,
|
||||
c.id,
|
||||
c.title,
|
||||
c.change_desc,
|
||||
c.supplier_id,
|
||||
CASE
|
||||
|
||||
WHEN sb.supplier_type = 'dvs' THEN
|
||||
'境内企业'
|
||||
WHEN sb.supplier_type = 'ovs' THEN
|
||||
@ -49,33 +95,42 @@
|
||||
WHEN sb.supplier_type = 'pe' THEN
|
||||
'个人'
|
||||
END AS supplier_type,
|
||||
sb.`name` AS supplierName,
|
||||
sb.enterprise_type,
|
||||
c.change_by,
|
||||
c.change_time,
|
||||
c.approve_status,
|
||||
CASE
|
||||
|
||||
WHEN csca.approve_status = 0 THEN
|
||||
WHEN c.approve_status = 0 THEN
|
||||
'审批中'
|
||||
WHEN csca.approve_status = 1 THEN
|
||||
WHEN c.approve_status = 1 THEN
|
||||
'通过'
|
||||
WHEN csca.approve_status = 2 THEN
|
||||
'驳回'
|
||||
WHEN c.approve_status = 2 THEN
|
||||
'驳回' ELSE CAST( c.approve_status AS CHAR )
|
||||
END AS approve_status_text,
|
||||
sb.`name` as supplierName,
|
||||
sb.enterprise_type,
|
||||
caw.update_time
|
||||
FROM
|
||||
cosco_supplier_base sb
|
||||
LEFT JOIN (
|
||||
SELECT c.id, c.supplier_id, c.change_time, c.approve_status
|
||||
FROM cosco_supplier_change_apply c
|
||||
INNER JOIN (
|
||||
SELECT supplier_id, MAX(change_time) AS latest_time
|
||||
FROM cosco_supplier_change_apply
|
||||
GROUP BY supplier_id
|
||||
) m ON c.supplier_id = m.supplier_id AND c.change_time = m.latest_time
|
||||
c.work_flow_id,
|
||||
c.create_time,
|
||||
wo.maxTime as update_time
|
||||
|
||||
) csca ON sb.id = csca.supplier_id
|
||||
left join cosco_access_supplier cas on sb.id = cas.supplier_id
|
||||
left join cosco_access_work caw on cas.access_work_id = caw.id and caw.del_flag = 'normal'
|
||||
where sb.access_status = 1 and sb.blacklist_status = 0 and sb.greylist_status = 0 and caw.apply_type = 0 and sb.del_flag = 'normal'
|
||||
FROM
|
||||
cosco_supplier_change_apply c
|
||||
LEFT JOIN cosco_supplier_base sb ON c.supplier_id = sb.id
|
||||
left join (
|
||||
SELECT
|
||||
cas.supplier_id,
|
||||
MAX(w.update_time) AS maxTime
|
||||
FROM
|
||||
cosco_access_work w
|
||||
LEFT JOIN
|
||||
cosco_access_supplier cas ON w.id = cas.access_work_id
|
||||
WHERE
|
||||
w.apply_type = 0
|
||||
GROUP BY
|
||||
cas.supplier_id
|
||||
) wo on wo.supplier_id = sb.id
|
||||
WHERE
|
||||
sb.del_flag = 'normal'
|
||||
<if test="vo.supplierName != null and vo.supplierName != ''">
|
||||
and sb.name like concat('%', #{vo.supplierName}, '%')
|
||||
</if>
|
||||
@ -83,37 +138,37 @@
|
||||
and sb.supplier_type = #{vo.supplierType}
|
||||
</if>
|
||||
<if test="vo.startTime!=null and vo.startTime != ''">
|
||||
and csca.change_time >= #{vo.startTime}
|
||||
and c.change_time >= #{vo.startTime}
|
||||
</if>
|
||||
<if test="vo.endTime!=null and vo.endTime != ''">
|
||||
and csca.change_time <= #{vo.endTime}
|
||||
and c.change_time <= #{vo.endTime}
|
||||
</if>
|
||||
<if test="vo.approveStatus!=null and vo.approveStatus != ''">
|
||||
and csca.approve_status = #{vo.approveStatus}
|
||||
and c.approve_status = #{vo.approveStatus}
|
||||
</if>
|
||||
order by sb.create_time desc
|
||||
order by c.create_time desc
|
||||
</select>
|
||||
|
||||
<select id="selectCoscoSupplierChangeApplyList" parameterType="com.chinaunicom.zyhy.ebtp.supplier.coscosupplier.entity.CoscoSupplierChangeApply" resultMap="CoscoSupplierChangeApplyResult">
|
||||
<include refid="selectCoscoSupplierChangeApplyVo"/>
|
||||
<where>
|
||||
<if test="vo.supplierId != null and vo.supplierId != ''">
|
||||
and supplier_id = #{vo.supplierId}
|
||||
and c.supplier_id = #{vo.supplierId}
|
||||
</if>
|
||||
<if test="vo.changeBy != null and vo.changeBy != ''">
|
||||
and change_by = #{vo.changeBy}
|
||||
and c.change_by = #{vo.changeBy}
|
||||
</if>
|
||||
<if test="vo.changeTime != null ">
|
||||
and change_time = #{vo.changeTime}
|
||||
and c.change_time = #{vo.changeTime}
|
||||
</if>
|
||||
<if test="vo.approveStatus != null ">
|
||||
and approve_status = #{vo.approveStatus}
|
||||
and c.approve_status = #{vo.approveStatus}
|
||||
</if>
|
||||
<if test="vo.workFlowId != null and vo.workFlowId != ''">
|
||||
and work_flow_id = #{vo.workFlowId}
|
||||
and c.work_flow_id = #{vo.workFlowId}
|
||||
</if>
|
||||
<if test="vo.lastUpdateTime != null ">
|
||||
and last_update_time = #{vo.lastUpdateTime}
|
||||
and c.last_update_time = #{vo.lastUpdateTime}
|
||||
</if>
|
||||
</where>
|
||||
</select>
|
||||
@ -121,15 +176,15 @@
|
||||
<select id="selectCoscoSupplierChangeApplyById" parameterType="String"
|
||||
resultMap="CoscoSupplierChangeApplyResult">
|
||||
<include refid="selectCoscoSupplierChangeApplyVo"/>
|
||||
where id = #{id}
|
||||
where c.id = #{id}
|
||||
</select>
|
||||
|
||||
<select id="selectBySupplierId" parameterType="String"
|
||||
resultMap="CoscoSupplierChangeApplyResult">
|
||||
<include refid="selectCoscoSupplierChangeApplyVo"/>
|
||||
WHERE supplier_id = #{supplierId}
|
||||
AND del_flag = 'normal'
|
||||
ORDER BY change_time DESC
|
||||
WHERE c.supplier_id = #{supplierId}
|
||||
AND c.del_flag = 'normal'
|
||||
ORDER BY c.change_time DESC
|
||||
LIMIT 1 OFFSET 1;
|
||||
</select>
|
||||
|
||||
@ -149,6 +204,8 @@
|
||||
<if test="updateBy != null">update_by,</if>
|
||||
<if test="updateTime != null">update_time,</if>
|
||||
<if test="lastUpdateTime != null">last_update_time,</if>
|
||||
<if test="title != null">title,</if>
|
||||
<if test="changeDesc != null">change_desc,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="id != null">#{id},</if>
|
||||
@ -163,6 +220,8 @@
|
||||
<if test="updateBy != null">#{updateBy},</if>
|
||||
<if test="updateTime != null">#{updateTime},</if>
|
||||
<if test="lastUpdateTime != null">#{lastUpdateTime},</if>
|
||||
<if test="title != null">#{title},</if>
|
||||
<if test="changeDesc != null">#{changeDesc},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
<insert id="batchCoscoSupplierChangeApply" parameterType="java.util.List">
|
||||
@ -209,12 +268,18 @@
|
||||
<if test="lastUpdateTime != null">last_update_time =
|
||||
#{lastUpdateTime},
|
||||
</if>
|
||||
<if test="title != null">title =
|
||||
#{title},
|
||||
</if>
|
||||
<if test="changeDesc != null">change_desc =
|
||||
#{changeDesc},
|
||||
</if>
|
||||
</trim>
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
<update id="deleteCoscoSupplierChangeApplyById" parameterType="String">
|
||||
update cosco_supplier_change_apply set del_flag = 2
|
||||
update cosco_supplier_change_apply set del_flag = 'deleted'
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
|
@ -0,0 +1,156 @@
|
||||
<?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.chinaunicom.zyhy.ebtp.supplier.coscosupplier.dao.mapper.CoscoSupplierChangeHistoryMapper">
|
||||
|
||||
<resultMap type="com.chinaunicom.zyhy.ebtp.supplier.coscosupplier.entity.CoscoSupplierChangeHistory" id="CoscoSupplierChangeHistoryResult">
|
||||
<result property="id" column="id"/>
|
||||
<result property="supplierChangeApplyId" column="supplier_change_apply_id"/>
|
||||
<result property="tableName" column="table_name"/>
|
||||
<result property="fieldName" column="field_name"/>
|
||||
<result property="fieldAnnotation" column="field_annotation"/>
|
||||
<result property="oldValue" column="old_value"/>
|
||||
<result property="newValue" column="new_value"/>
|
||||
<result property="delFlag" column="del_flag"/>
|
||||
<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="lastUpdateTime" column="last_update_time"/>
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectCoscoSupplierChangeHistoryVo">
|
||||
select id, supplier_change_apply_id, table_name, field_name, field_annotation, old_value, new_value, del_flag, create_by, create_time, update_by, update_time, last_update_time
|
||||
from cosco_supplier_change_history
|
||||
</sql>
|
||||
|
||||
<select id="selectCoscoSupplierChangeHistoryList" parameterType="com.chinaunicom.zyhy.ebtp.supplier.coscosupplier.entity.CoscoSupplierChangeHistory" resultMap="CoscoSupplierChangeHistoryResult">
|
||||
<include refid="selectCoscoSupplierChangeHistoryVo"/>
|
||||
<where>
|
||||
<if test="supplierChangeApplyId != null and supplierChangeApplyId != ''">
|
||||
and supplier_change_apply_id = #{supplierChangeApplyId}
|
||||
</if>
|
||||
<if test="tableName != null and tableName != ''">
|
||||
and table_name like concat('%', #{tableName}, '%')
|
||||
</if>
|
||||
<if test="fieldName != null and fieldName != ''">
|
||||
and field_name like concat('%', #{fieldName}, '%')
|
||||
</if>
|
||||
<if test="fieldAnnotation != null and fieldAnnotation != ''">
|
||||
and field_annotation = #{fieldAnnotation}
|
||||
</if>
|
||||
<if test="oldValue != null and oldValue != ''">
|
||||
and old_value = #{oldValue}
|
||||
</if>
|
||||
<if test="newValue != null and newValue != ''">
|
||||
and new_value = #{newValue}
|
||||
</if>
|
||||
<if test="lastUpdateTime != null ">
|
||||
and last_update_time = #{lastUpdateTime}
|
||||
</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectCoscoSupplierChangeHistoryById" parameterType="String"
|
||||
resultMap="CoscoSupplierChangeHistoryResult">
|
||||
<include refid="selectCoscoSupplierChangeHistoryVo"/>
|
||||
where id = #{id}
|
||||
</select>
|
||||
|
||||
<insert id="insertCoscoSupplierChangeHistory" parameterType="com.chinaunicom.zyhy.ebtp.supplier.coscosupplier.entity.CoscoSupplierChangeHistory">
|
||||
insert into cosco_supplier_change_history
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="id != null">id,</if>
|
||||
<if test="supplierChangeApplyId != null and supplierChangeApplyId != ''">supplier_change_apply_id,</if>
|
||||
<if test="tableName != null and tableName != ''">table_name,</if>
|
||||
<if test="fieldName != null and fieldName != ''">field_name,</if>
|
||||
<if test="fieldAnnotation != null and fieldAnnotation != ''">field_annotation,</if>
|
||||
<if test="oldValue != null and oldValue != ''">old_value,</if>
|
||||
<if test="newValue != null and newValue != ''">new_value,</if>
|
||||
<if test="delFlag != null and delFlag != ''">del_flag,</if>
|
||||
<if test="createBy != null and createBy != ''">create_by,</if>
|
||||
<if test="createTime != null">create_time,</if>
|
||||
<if test="updateBy != null">update_by,</if>
|
||||
<if test="updateTime != null">update_time,</if>
|
||||
<if test="lastUpdateTime != null">last_update_time,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="id != null">#{id},</if>
|
||||
<if test="supplierChangeApplyId != null and supplierChangeApplyId != ''">#{supplierChangeApplyId},</if>
|
||||
<if test="tableName != null and tableName != ''">#{tableName},</if>
|
||||
<if test="fieldName != null and fieldName != ''">#{fieldName},</if>
|
||||
<if test="fieldAnnotation != null and fieldAnnotation != ''">#{fieldAnnotation},</if>
|
||||
<if test="oldValue != null and oldValue != ''">#{oldValue},</if>
|
||||
<if test="newValue != null and newValue != ''">#{newValue},</if>
|
||||
<if test="delFlag != null and delFlag != ''">#{delFlag},</if>
|
||||
<if test="createBy != null and createBy != ''">#{createBy},</if>
|
||||
<if test="createTime != null">#{createTime},</if>
|
||||
<if test="updateBy != null">#{updateBy},</if>
|
||||
<if test="updateTime != null">#{updateTime},</if>
|
||||
<if test="lastUpdateTime != null">#{lastUpdateTime},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
<insert id="batchCoscoSupplierChangeHistory" parameterType="java.util.List">
|
||||
insert into cosco_supplier_change_history
|
||||
( id, supplier_change_apply_id, table_name, field_name, field_annotation, old_value, new_value, create_by, create_time, update_by, update_time, last_update_time)
|
||||
values
|
||||
<foreach item="item" index="index" collection="list" separator=",">
|
||||
( #{item.id}, #{item.supplierChangeApplyId}, #{item.tableName}, #{item.fieldName}, #{item.fieldAnnotation}, #{item.oldValue}, #{item.newValue}, #{item.createBy}, #{item.createTime}, #{item.updateBy}, #{item.updateTime}, #{item.lastUpdateTime})
|
||||
</foreach>
|
||||
</insert>
|
||||
<update id="updateCoscoSupplierChangeHistory" parameterType="com.chinaunicom.zyhy.ebtp.supplier.coscosupplier.entity.CoscoSupplierChangeHistory">
|
||||
update cosco_supplier_change_history
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="supplierChangeApplyId != null and supplierChangeApplyId != ''">supplier_change_apply_id =
|
||||
#{supplierChangeApplyId},
|
||||
</if>
|
||||
<if test="tableName != null and tableName != ''">table_name =
|
||||
#{tableName},
|
||||
</if>
|
||||
<if test="fieldName != null and fieldName != ''">field_name =
|
||||
#{fieldName},
|
||||
</if>
|
||||
<if test="fieldAnnotation != null and fieldAnnotation != ''">field_annotation =
|
||||
#{fieldAnnotation},
|
||||
</if>
|
||||
<if test="oldValue != null and oldValue != ''">old_value =
|
||||
#{oldValue},
|
||||
</if>
|
||||
<if test="newValue != null and newValue != ''">new_value =
|
||||
#{newValue},
|
||||
</if>
|
||||
<if test="delFlag != null and delFlag != ''">del_flag =
|
||||
#{delFlag},
|
||||
</if>
|
||||
<if test="createBy != null and createBy != ''">create_by =
|
||||
#{createBy},
|
||||
</if>
|
||||
<if test="createTime != null">create_time =
|
||||
#{createTime},
|
||||
</if>
|
||||
<if test="updateBy != null">update_by =
|
||||
#{updateBy},
|
||||
</if>
|
||||
<if test="updateTime != null">update_time =
|
||||
#{updateTime},
|
||||
</if>
|
||||
<if test="lastUpdateTime != null">last_update_time =
|
||||
#{lastUpdateTime},
|
||||
</if>
|
||||
</trim>
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
<update id="deleteCoscoSupplierChangeHistoryById" parameterType="String">
|
||||
update cosco_supplier_change_history set del_flag = 2
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
<update id="deleteCoscoSupplierChangeHistoryByIds" parameterType="String">
|
||||
update cosco_supplier_change_history set del_flag = 2 where id in
|
||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</update>
|
||||
</mapper>
|
@ -28,6 +28,44 @@
|
||||
from cosco_supplier_invoice
|
||||
</sql>
|
||||
|
||||
|
||||
<select id="selectPageList" parameterType="com.chinaunicom.zyhy.ebtp.supplier.coscosupplier.entity.CoscoSupplierInvoice" resultMap="CoscoSupplierInvoiceResult">
|
||||
<include refid="selectCoscoSupplierInvoiceVo"/>
|
||||
<where>
|
||||
<if test="vo.supplierId != null and vo.supplierId != ''">
|
||||
and supplier_id = #{vo.supplierId}
|
||||
</if>
|
||||
<if test="vo.taxpayerType != null and vo.taxpayerType != ''">
|
||||
and taxpayer_type = #{taxpayerType}
|
||||
</if>
|
||||
<if test="vo.taxpayerCode != null and vo.taxpayerCode != ''">
|
||||
and taxpayer_code = #{vo.taxpayerCode}
|
||||
</if>
|
||||
<if test="vo.phone != null and vo.phone != ''">
|
||||
and phone = #{vo.phone}
|
||||
</if>
|
||||
<if test="vo.account != null and vo.account != ''">
|
||||
and account = #{vo.account}
|
||||
</if>
|
||||
<if test="vo.head != null and vo.head != ''">
|
||||
and head = #{vo.head}
|
||||
</if>
|
||||
<if test="vo.address != null and vo.address != ''">
|
||||
and address = #{vo.address}
|
||||
</if>
|
||||
<if test="vo.bank != null and vo.bank != ''">
|
||||
and bank = #{vo.bank}
|
||||
</if>
|
||||
<if test="vo.qualificationCertificate != null and vo.qualificationCertificate != ''">
|
||||
and qualification_certificate = #{vo.qualificationCertificate}
|
||||
</if>
|
||||
<if test="vo.lastUpdateTime != null ">
|
||||
and last_update_time = #{vo.lastUpdateTime}
|
||||
</if>
|
||||
</where>
|
||||
order by create_time desc
|
||||
</select>
|
||||
|
||||
<select id="selectCoscoSupplierInvoiceList" parameterType="com.chinaunicom.zyhy.ebtp.supplier.coscosupplier.entity.CoscoSupplierInvoice" resultMap="CoscoSupplierInvoiceResult">
|
||||
<include refid="selectCoscoSupplierInvoiceVo"/>
|
||||
<where>
|
||||
@ -177,7 +215,7 @@
|
||||
</update>
|
||||
|
||||
<update id="deleteCoscoSupplierInvoiceByIds" parameterType="String">
|
||||
update cosco_supplier_invoice set del_flag = 2 where id in
|
||||
update cosco_supplier_invoice set del_flag = 'deleted' where id in
|
||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
|
@ -28,6 +28,45 @@
|
||||
from cosco_supplier_qualifications
|
||||
</sql>
|
||||
|
||||
|
||||
<select id="selectPageList" parameterType="com.chinaunicom.zyhy.ebtp.supplier.coscosupplier.entity.CoscoSupplierQualifications" resultMap="CoscoSupplierQualificationsResult">
|
||||
<include refid="selectCoscoSupplierQualificationsVo"/>
|
||||
<where>
|
||||
<if test="vo.supplierId != null and vo.supplierId != ''">
|
||||
and supplier_id = #{vo.supplierId}
|
||||
</if>
|
||||
<if test="vo.certificateType != null and vo.certificateType != ''">
|
||||
and certificate_type = #{vo.certificateType}
|
||||
</if>
|
||||
<if test="vo.name != null and vo.name != ''">
|
||||
and name like concat('%', #{vo.name}, '%')
|
||||
</if>
|
||||
<if test="vo.code != null and vo.code != ''">
|
||||
and code = #{vo.code}
|
||||
</if>
|
||||
<if test="vo.typeLevel != null and vo.typeLevel != ''">
|
||||
and type_level = #{vo.typeLevel}
|
||||
</if>
|
||||
<if test="vo.authority != null and vo.authority != ''">
|
||||
and authority = #{vo.authority}
|
||||
</if>
|
||||
<if test="vo.dateTime != null ">
|
||||
and date_time = #{vo.dateTime}
|
||||
</if>
|
||||
<if test="vo.termOfValidity != null ">
|
||||
and term_of_validity = #{vo.termOfValidity}
|
||||
</if>
|
||||
<if test="vo.accessory != null and vo.accessory != ''">
|
||||
and accessory = #{vo.accessory}
|
||||
</if>
|
||||
<if test="vo.lastUpdateTime != null ">
|
||||
and last_update_time = #{vo.lastUpdateTime}
|
||||
</if>
|
||||
</where>
|
||||
order by create_time desc
|
||||
</select>
|
||||
|
||||
|
||||
<select id="selectCoscoSupplierQualificationsList" parameterType="com.chinaunicom.zyhy.ebtp.supplier.coscosupplier.entity.CoscoSupplierQualifications" resultMap="CoscoSupplierQualificationsResult">
|
||||
<include refid="selectCoscoSupplierQualificationsVo"/>
|
||||
<where>
|
||||
@ -177,7 +216,7 @@
|
||||
</update>
|
||||
|
||||
<update id="deleteCoscoSupplierQualificationsByIds" parameterType="String">
|
||||
update cosco_supplier_qualifications set del_flag = 2 where id in
|
||||
update cosco_supplier_qualifications set del_flag = 'deleted' where id in
|
||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
|
@ -19,13 +19,67 @@
|
||||
<result property="updateBy" column="update_by"/>
|
||||
<result property="updateTime" column="update_time"/>
|
||||
<result property="lastUpdateTime" column="last_update_time"/>
|
||||
<result property="attachmentsTypeCn" column="attachments_type_cn"/>
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectCoscoSupplierSurveyAttachmentsVo">
|
||||
select id, supplier_id, attachments_type, file_name, file_type, file_size, file_path, file_url, del_flag, create_by, create_time, update_by, update_time, last_update_time
|
||||
from cosco_supplier_survey_attachments
|
||||
SELECT
|
||||
id,
|
||||
supplier_id,
|
||||
attachments_type,
|
||||
CASE attachments_type
|
||||
WHEN 'commitment' THEN '供应商反商业贿赂承诺书'
|
||||
WHEN 'accessory' THEN '其他附件'
|
||||
WHEN 'change' THEN '变更证明文件'
|
||||
ELSE attachments_type
|
||||
END AS attachments_type_cn,
|
||||
file_name,
|
||||
file_type,
|
||||
file_size,
|
||||
file_path,
|
||||
file_url,
|
||||
del_flag,
|
||||
create_by,
|
||||
create_time,
|
||||
update_by,
|
||||
update_time,
|
||||
last_update_time
|
||||
FROM
|
||||
cosco_supplier_survey_attachments
|
||||
</sql>
|
||||
|
||||
|
||||
<select id="selectPageList" parameterType="com.chinaunicom.zyhy.ebtp.supplier.coscosupplier.entity.CoscoSupplierSurveyAttachments" resultMap="CoscoSupplierSurveyAttachmentsResult">
|
||||
<include refid="selectCoscoSupplierSurveyAttachmentsVo"/>
|
||||
<where>
|
||||
<if test="vo.supplierId != null and vo.supplierId != ''">
|
||||
and supplier_id = #{vo.supplierId}
|
||||
</if>
|
||||
<if test="vo.attachmentsType != null and vo.attachmentsType != ''">
|
||||
and attachments_type = #{vo.attachmentsType}
|
||||
</if>
|
||||
<if test="vo.fileName != null and vo.fileName != ''">
|
||||
and file_name like concat('%', #{vo.fileName}, '%')
|
||||
</if>
|
||||
<if test="vo.fileType != null and vo.fileType != ''">
|
||||
and file_type = #{vo.fileType}
|
||||
</if>
|
||||
<if test="vo.fileSize != null and vo.fileSize != ''">
|
||||
and file_size = #{vo.fileSize}
|
||||
</if>
|
||||
<if test="vo.filePath != null and vo.filePath != ''">
|
||||
and file_path = #{vo.filePath}
|
||||
</if>
|
||||
<if test="vo.fileUrl != null and vo.fileUrl != ''">
|
||||
and file_url = #{vo.fileUrl}
|
||||
</if>
|
||||
<if test="vo.lastUpdateTime != null ">
|
||||
and last_update_time = #{vo.lastUpdateTime}
|
||||
</if>
|
||||
</where>
|
||||
order by create_time desc
|
||||
</select>
|
||||
|
||||
<select id="selectCoscoSupplierSurveyAttachmentsList" parameterType="com.chinaunicom.zyhy.ebtp.supplier.coscosupplier.entity.CoscoSupplierSurveyAttachments" resultMap="CoscoSupplierSurveyAttachmentsResult">
|
||||
<include refid="selectCoscoSupplierSurveyAttachmentsVo"/>
|
||||
<where>
|
||||
@ -154,12 +208,12 @@
|
||||
</update>
|
||||
|
||||
<update id="deleteCoscoSupplierSurveyAttachmentsById" parameterType="String">
|
||||
update cosco_supplier_survey_attachments set del_flag = 2
|
||||
update cosco_supplier_survey_attachments set del_flag = 'deleted'
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
<update id="deleteCoscoSupplierSurveyAttachmentsByIds" parameterType="String">
|
||||
update cosco_supplier_survey_attachments set del_flag = 2 where id in
|
||||
update cosco_supplier_survey_attachments set del_flag = 'deleted' where id in
|
||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
|
@ -17,6 +17,7 @@
|
||||
<select id="selectCoscoSupplierexitSupplierList" parameterType="com.chinaunicom.zyhy.ebtp.supplier.coscosupplier.entity.CoscoSupplierexitSupplier" resultMap="CoscoSupplierexitSupplierResult">
|
||||
<include refid="selectCoscoSupplierexitSupplierVo"/>
|
||||
<where>
|
||||
supplierexit_id = #{supplierexitId}
|
||||
</where>
|
||||
</select>
|
||||
|
||||
|
Reference in New Issue
Block a user