供应商注册,准入
This commit is contained in:
@ -0,0 +1,70 @@
|
||||
<?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.CoscoAccessCategoryMapper">
|
||||
|
||||
<resultMap type="com.chinaunicom.zyhy.ebtp.supplier.coscosupplier.entity.CoscoAccessCategory" id="CoscoAccessCategoryResult">
|
||||
<result property="accessWorkId" column="access_work_id"/>
|
||||
<result property="categoryId" column="category_id"/>
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectCoscoAccessCategoryVo">
|
||||
select a.category_name as categoryName,c.access_work_id, c.category_id from cosco_access_category c
|
||||
left join cosco_category a on c.category_id = a.id
|
||||
</sql>
|
||||
|
||||
<select id="selectCoscoAccessCategoryList" parameterType="com.chinaunicom.zyhy.ebtp.supplier.coscosupplier.entity.CoscoAccessCategory" resultMap="CoscoAccessCategoryResult">
|
||||
<include refid="selectCoscoAccessCategoryVo"/>
|
||||
<where>
|
||||
c.access_work_id = #{accessWorkId}
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectCoscoAccessCategoryByAccessWorkId" parameterType="String"
|
||||
resultMap="CoscoAccessCategoryResult">
|
||||
<include refid="selectCoscoAccessCategoryVo"/>
|
||||
where c.access_work_id = #{accessWorkId}
|
||||
</select>
|
||||
|
||||
<insert id="insertCoscoAccessCategory" parameterType="com.chinaunicom.zyhy.ebtp.supplier.coscosupplier.entity.CoscoAccessCategory">
|
||||
insert into cosco_access_category
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="accessWorkId != null">access_work_id,</if>
|
||||
<if test="categoryId != null">category_id,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="accessWorkId != null">#{accessWorkId},</if>
|
||||
<if test="categoryId != null">#{categoryId},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
<insert id="batchCoscoAccessCategory" parameterType="java.util.List">
|
||||
insert into cosco_access_category
|
||||
( access_work_id, category_id)
|
||||
values
|
||||
<foreach item="item" index="index" collection="list" separator=",">
|
||||
( #{item.accessWorkId}, #{item.categoryId})
|
||||
</foreach>
|
||||
</insert>
|
||||
<update id="updateCoscoAccessCategory" parameterType="com.chinaunicom.zyhy.ebtp.supplier.coscosupplier.entity.CoscoAccessCategory">
|
||||
update cosco_access_category
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="categoryId != null">category_id =
|
||||
#{categoryId},
|
||||
</if>
|
||||
</trim>
|
||||
where access_work_id = #{accessWorkId}
|
||||
</update>
|
||||
|
||||
<update id="deleteCoscoAccessCategoryByAccessWorkId" parameterType="String">
|
||||
update cosco_access_category set del_flag = 2
|
||||
where access_work_id = #{accessWorkId}
|
||||
</update>
|
||||
|
||||
<update id="deleteCoscoAccessCategoryByAccessWorkIds" parameterType="String">
|
||||
update cosco_access_category set del_flag = 2 where access_work_id in
|
||||
<foreach item="accessWorkId" collection="array" open="(" separator="," close=")">
|
||||
#{accessWorkId}
|
||||
</foreach>
|
||||
</update>
|
||||
</mapper>
|
@ -0,0 +1,165 @@
|
||||
<?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.CoscoAccessItemAttachmentsMapper">
|
||||
|
||||
<resultMap type="com.chinaunicom.zyhy.ebtp.supplier.coscosupplier.entity.CoscoAccessItemAttachments" id="CoscoAccessItemAttachmentsResult">
|
||||
<result property="id" column="id"/>
|
||||
<result property="accessWorkId" column="access_work_id"/>
|
||||
<result property="accessUserItemId" column="access_user_item_id"/>
|
||||
<result property="fileName" column="file_name"/>
|
||||
<result property="fileType" column="file_type"/>
|
||||
<result property="fileSize" column="file_size"/>
|
||||
<result property="filePath" column="file_path"/>
|
||||
<result property="fileUrl" column="file_url"/>
|
||||
<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="selectCoscoAccessItemAttachmentsVo">
|
||||
select id, access_work_id, access_user_item_id, 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_access_item_attachments
|
||||
</sql>
|
||||
|
||||
<select id="selectCoscoAccessItemAttachmentsList" parameterType="com.chinaunicom.zyhy.ebtp.supplier.coscosupplier.entity.CoscoAccessItemAttachments" resultMap="CoscoAccessItemAttachmentsResult">
|
||||
<include refid="selectCoscoAccessItemAttachmentsVo"/>
|
||||
<where>
|
||||
<if test="accessWorkId != null and accessWorkId != ''">
|
||||
and access_work_id = #{accessWorkId}
|
||||
</if>
|
||||
<if test="accessUserItemId != null and accessUserItemId != ''">
|
||||
and access_user_item_id = #{accessUserItemId}
|
||||
</if>
|
||||
<if test="fileName != null and fileName != ''">
|
||||
and file_name like concat('%', #{fileName}, '%')
|
||||
</if>
|
||||
<if test="fileType != null and fileType != ''">
|
||||
and file_type = #{fileType}
|
||||
</if>
|
||||
<if test="fileSize != null and fileSize != ''">
|
||||
and file_size = #{fileSize}
|
||||
</if>
|
||||
<if test="filePath != null and filePath != ''">
|
||||
and file_path = #{filePath}
|
||||
</if>
|
||||
<if test="fileUrl != null and fileUrl != ''">
|
||||
and file_url = #{fileUrl}
|
||||
</if>
|
||||
<if test="lastUpdateTime != null ">
|
||||
and last_update_time = #{lastUpdateTime}
|
||||
</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectCoscoAccessItemAttachmentsById" parameterType="String"
|
||||
resultMap="CoscoAccessItemAttachmentsResult">
|
||||
<include refid="selectCoscoAccessItemAttachmentsVo"/>
|
||||
where id = #{id}
|
||||
</select>
|
||||
|
||||
<insert id="insertCoscoAccessItemAttachments" parameterType="com.chinaunicom.zyhy.ebtp.supplier.coscosupplier.entity.CoscoAccessItemAttachments">
|
||||
insert into cosco_access_item_attachments
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="id != null">id,</if>
|
||||
<if test="accessWorkId != null and accessWorkId != ''">access_work_id,</if>
|
||||
<if test="accessUserItemId != null and accessUserItemId != ''">access_user_item_id,</if>
|
||||
<if test="fileName != null">file_name,</if>
|
||||
<if test="fileType != null">file_type,</if>
|
||||
<if test="fileSize != null">file_size,</if>
|
||||
<if test="filePath != null">file_path,</if>
|
||||
<if test="fileUrl != null">file_url,</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="accessWorkId != null and accessWorkId != ''">#{accessWorkId},</if>
|
||||
<if test="accessUserItemId != null and accessUserItemId != ''">#{accessUserItemId},</if>
|
||||
<if test="fileName != null">#{fileName},</if>
|
||||
<if test="fileType != null">#{fileType},</if>
|
||||
<if test="fileSize != null">#{fileSize},</if>
|
||||
<if test="filePath != null">#{filePath},</if>
|
||||
<if test="fileUrl != null">#{fileUrl},</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="batchCoscoAccessItemAttachments" parameterType="java.util.List">
|
||||
insert into cosco_access_item_attachments
|
||||
( id, access_work_id, access_user_item_id, file_name, file_type, file_size, file_path, file_url, del_flag, create_by, create_time, update_by, update_time, last_update_time)
|
||||
values
|
||||
<foreach item="item" index="index" collection="list" separator=",">
|
||||
( #{item.id}, #{item.accessWorkId}, #{item.accessUserItemId}, #{item.fileName}, #{item.fileType}, #{item.fileSize}, #{item.filePath}, #{item.fileUrl}, #{item.delFlag}, #{item.createBy}, #{item.createTime}, #{item.updateBy}, #{item.updateTime}, #{item.lastUpdateTime})
|
||||
</foreach>
|
||||
</insert>
|
||||
<update id="updateCoscoAccessItemAttachments" parameterType="com.chinaunicom.zyhy.ebtp.supplier.coscosupplier.entity.CoscoAccessItemAttachments">
|
||||
update cosco_access_item_attachments
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="accessWorkId != null and accessWorkId != ''">access_work_id =
|
||||
#{accessWorkId},
|
||||
</if>
|
||||
<if test="accessUserItemId != null and accessUserItemId != ''">access_user_item_id =
|
||||
#{accessUserItemId},
|
||||
</if>
|
||||
<if test="fileName != null">file_name =
|
||||
#{fileName},
|
||||
</if>
|
||||
<if test="fileType != null">file_type =
|
||||
#{fileType},
|
||||
</if>
|
||||
<if test="fileSize != null">file_size =
|
||||
#{fileSize},
|
||||
</if>
|
||||
<if test="filePath != null">file_path =
|
||||
#{filePath},
|
||||
</if>
|
||||
<if test="fileUrl != null">file_url =
|
||||
#{fileUrl},
|
||||
</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="deleteCoscoAccessItemAttachmentsById" parameterType="String">
|
||||
update cosco_access_item_attachments set del_flag = 2
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
<update id="deleteCoscoAccessItemAttachmentsByIds" parameterType="String">
|
||||
update cosco_access_item_attachments set del_flag = 2 where id in
|
||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</update>
|
||||
</mapper>
|
@ -0,0 +1,138 @@
|
||||
<?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.CoscoAccessItemMapper">
|
||||
|
||||
<resultMap type="com.chinaunicom.zyhy.ebtp.supplier.coscosupplier.entity.CoscoAccessItem" id="CoscoAccessItemResult">
|
||||
<result property="id" column="id"/>
|
||||
<result property="accessWorkId" column="access_work_id"/>
|
||||
<result property="supplierId" column="supplier_id"/>
|
||||
<result property="itemType" column="item_type"/>
|
||||
<result property="itemName" column="item_name"/>
|
||||
<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="selectCoscoAccessItemVo">
|
||||
select id, access_work_id, supplier_id, item_type, item_name, del_flag, create_by, create_time, update_by, update_time, last_update_time
|
||||
from cosco_access_item
|
||||
</sql>
|
||||
|
||||
<select id="selectCoscoAccessItemList" parameterType="com.chinaunicom.zyhy.ebtp.supplier.coscosupplier.entity.CoscoAccessItem" resultMap="CoscoAccessItemResult">
|
||||
<include refid="selectCoscoAccessItemVo"/>
|
||||
<where>
|
||||
<if test="accessWorkId != null and accessWorkId != ''">
|
||||
and access_work_id = #{accessWorkId}
|
||||
</if>
|
||||
<if test="supplierId != null and supplierId != ''">
|
||||
and supplier_id = #{supplierId}
|
||||
</if>
|
||||
<if test="itemType != null and itemType != ''">
|
||||
and item_type = #{itemType}
|
||||
</if>
|
||||
<if test="itemName != null and itemName != ''">
|
||||
and item_name like concat('%', #{itemName}, '%')
|
||||
</if>
|
||||
<if test="lastUpdateTime != null ">
|
||||
and last_update_time = #{lastUpdateTime}
|
||||
</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectCoscoAccessItemById" parameterType="String"
|
||||
resultMap="CoscoAccessItemResult">
|
||||
<include refid="selectCoscoAccessItemVo"/>
|
||||
where id = #{id}
|
||||
</select>
|
||||
|
||||
<insert id="insertCoscoAccessItem" parameterType="com.chinaunicom.zyhy.ebtp.supplier.coscosupplier.entity.CoscoAccessItem">
|
||||
insert into cosco_access_item
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="id != null">id,</if>
|
||||
<if test="accessWorkId != null and accessWorkId != ''">access_work_id,</if>
|
||||
<if test="supplierId != null and supplierId != ''">supplier_id,</if>
|
||||
<if test="itemType != null and itemType != ''">item_type,</if>
|
||||
<if test="itemName != null and itemName != ''">item_name,</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="accessWorkId != null and accessWorkId != ''">#{accessWorkId},</if>
|
||||
<if test="supplierId != null and supplierId != ''">#{supplierId},</if>
|
||||
<if test="itemType != null and itemType != ''">#{itemType},</if>
|
||||
<if test="itemName != null and itemName != ''">#{itemName},</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="batchCoscoAccessItem" parameterType="java.util.List">
|
||||
insert into cosco_access_item
|
||||
( id, access_work_id, supplier_id, item_type, item_name, del_flag, create_by, create_time, update_by, update_time, last_update_time)
|
||||
values
|
||||
<foreach item="item" index="index" collection="list" separator=",">
|
||||
( #{item.id}, #{item.accessWorkId}, #{item.supplierId}, #{item.itemType}, #{item.itemName}, #{item.delFlag}, #{item.createBy}, #{item.createTime}, #{item.updateBy}, #{item.updateTime}, #{item.lastUpdateTime})
|
||||
</foreach>
|
||||
</insert>
|
||||
<update id="updateCoscoAccessItem" parameterType="com.chinaunicom.zyhy.ebtp.supplier.coscosupplier.entity.CoscoAccessItem">
|
||||
update cosco_access_item
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="accessWorkId != null and accessWorkId != ''">access_work_id =
|
||||
#{accessWorkId},
|
||||
</if>
|
||||
<if test="supplierId != null and supplierId != ''">supplier_id =
|
||||
#{supplierId},
|
||||
</if>
|
||||
<if test="itemType != null and itemType != ''">item_type =
|
||||
#{itemType},
|
||||
</if>
|
||||
<if test="itemName != null and itemName != ''">item_name =
|
||||
#{itemName},
|
||||
</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="deleteCoscoAccessItemById" parameterType="String">
|
||||
update cosco_access_item set del_flag = 2
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
<update id="deleteCoscoAccessItemByIds" parameterType="String">
|
||||
update cosco_access_item set del_flag = 2 where id in
|
||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</update>
|
||||
</mapper>
|
@ -0,0 +1,129 @@
|
||||
<?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.CoscoAccessSupplierCategoryMapper">
|
||||
|
||||
<resultMap type="com.chinaunicom.zyhy.ebtp.supplier.coscosupplier.entity.CoscoAccessSupplierCategory" id="CoscoAccessSupplierCategoryResult">
|
||||
<result property="id" column="id"/>
|
||||
<result property="accessWorkId" column="access_work_id"/>
|
||||
<result property="supplierId" column="supplier_id"/>
|
||||
<result property="categoryId" column="category_id"/>
|
||||
<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="selectCoscoAccessSupplierCategoryVo">
|
||||
select id, access_work_id, supplier_id, category_id, del_flag, create_by, create_time, update_by, update_time, last_update_time
|
||||
from cosco_access_supplier_category
|
||||
</sql>
|
||||
|
||||
<select id="selectCoscoAccessSupplierCategoryList" parameterType="com.chinaunicom.zyhy.ebtp.supplier.coscosupplier.entity.CoscoAccessSupplierCategory" resultMap="CoscoAccessSupplierCategoryResult">
|
||||
<include refid="selectCoscoAccessSupplierCategoryVo"/>
|
||||
<where>
|
||||
<if test="accessWorkId != null and accessWorkId != ''">
|
||||
and access_work_id = #{accessWorkId}
|
||||
</if>
|
||||
<if test="supplierId != null and supplierId != ''">
|
||||
and supplier_id = #{supplierId}
|
||||
</if>
|
||||
<if test="categoryId != null and categoryId != ''">
|
||||
and category_id = #{categoryId}
|
||||
</if>
|
||||
<if test="lastUpdateTime != null ">
|
||||
and last_update_time = #{lastUpdateTime}
|
||||
</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectCoscoAccessSupplierCategoryById" parameterType="String"
|
||||
resultMap="CoscoAccessSupplierCategoryResult">
|
||||
<include refid="selectCoscoAccessSupplierCategoryVo"/>
|
||||
where id = #{id}
|
||||
</select>
|
||||
|
||||
<insert id="insertCoscoAccessSupplierCategory" parameterType="com.chinaunicom.zyhy.ebtp.supplier.coscosupplier.entity.CoscoAccessSupplierCategory">
|
||||
insert into cosco_access_supplier_category
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="id != null">id,</if>
|
||||
<if test="accessWorkId != null and accessWorkId != ''">access_work_id,</if>
|
||||
<if test="supplierId != null and supplierId != ''">supplier_id,</if>
|
||||
<if test="categoryId != null">category_id,</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="accessWorkId != null and accessWorkId != ''">#{accessWorkId},</if>
|
||||
<if test="supplierId != null and supplierId != ''">#{supplierId},</if>
|
||||
<if test="categoryId != null">#{categoryId},</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="batchCoscoAccessSupplierCategory" parameterType="java.util.List">
|
||||
insert into cosco_access_supplier_category
|
||||
( id, access_work_id, supplier_id, category_id, del_flag, create_by, create_time, update_by, update_time, last_update_time)
|
||||
values
|
||||
<foreach item="item" index="index" collection="list" separator=",">
|
||||
( #{item.id}, #{item.accessWorkId}, #{item.supplierId}, #{item.categoryId}, #{item.delFlag}, #{item.createBy}, #{item.createTime}, #{item.updateBy}, #{item.updateTime}, #{item.lastUpdateTime})
|
||||
</foreach>
|
||||
</insert>
|
||||
<update id="updateCoscoAccessSupplierCategory" parameterType="com.chinaunicom.zyhy.ebtp.supplier.coscosupplier.entity.CoscoAccessSupplierCategory">
|
||||
update cosco_access_supplier_category
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="accessWorkId != null and accessWorkId != ''">access_work_id =
|
||||
#{accessWorkId},
|
||||
</if>
|
||||
<if test="supplierId != null and supplierId != ''">supplier_id =
|
||||
#{supplierId},
|
||||
</if>
|
||||
<if test="categoryId != null">category_id =
|
||||
#{categoryId},
|
||||
</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="deleteCoscoAccessSupplierCategoryById" parameterType="String">
|
||||
update cosco_access_supplier_category set del_flag = 2
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
<update id="deleteCoscoAccessSupplierCategoryByIds" parameterType="String">
|
||||
update cosco_access_supplier_category set del_flag = 2 where id in
|
||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</update>
|
||||
</mapper>
|
@ -0,0 +1,70 @@
|
||||
<?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.CoscoAccessSupplierMapper">
|
||||
|
||||
<resultMap type="com.chinaunicom.zyhy.ebtp.supplier.coscosupplier.entity.CoscoAccessSupplier" id="CoscoAccessSupplierResult">
|
||||
<result property="accessWorkId" column="access_work_id"/>
|
||||
<result property="supplierId" column="supplier_id"/>
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectCoscoAccessSupplierVo">
|
||||
select s.`name` as supplierName,a.access_work_id, a.supplier_id from cosco_access_supplier a
|
||||
left join cosco_supplier_base s on a.supplier_id = s.id
|
||||
</sql>
|
||||
|
||||
<select id="selectCoscoAccessSupplierList" parameterType="com.chinaunicom.zyhy.ebtp.supplier.coscosupplier.entity.CoscoAccessSupplier" resultMap="CoscoAccessSupplierResult">
|
||||
<include refid="selectCoscoAccessSupplierVo"/>
|
||||
<where>
|
||||
a.access_work_id = #{accessWorkId}
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectCoscoAccessSupplierByAccessWorkId" parameterType="String"
|
||||
resultMap="CoscoAccessSupplierResult">
|
||||
<include refid="selectCoscoAccessSupplierVo"/>
|
||||
where a.access_work_id = #{accessWorkId}
|
||||
</select>
|
||||
|
||||
<insert id="insertCoscoAccessSupplier" parameterType="com.chinaunicom.zyhy.ebtp.supplier.coscosupplier.entity.CoscoAccessSupplier">
|
||||
insert into cosco_access_supplier
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="accessWorkId != null">access_work_id,</if>
|
||||
<if test="supplierId != null">supplier_id,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="accessWorkId != null">#{accessWorkId},</if>
|
||||
<if test="supplierId != null">#{supplierId},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
<insert id="batchCoscoAccessSupplier" parameterType="java.util.List">
|
||||
insert into cosco_access_supplier
|
||||
( access_work_id, supplier_id)
|
||||
values
|
||||
<foreach item="item" index="index" collection="list" separator=",">
|
||||
( #{item.accessWorkId}, #{item.supplierId})
|
||||
</foreach>
|
||||
</insert>
|
||||
<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>
|
||||
</trim>
|
||||
where access_work_id = #{accessWorkId}
|
||||
</update>
|
||||
|
||||
<update id="deleteCoscoAccessSupplierByAccessWorkId" parameterType="String">
|
||||
update cosco_access_supplier set del_flag = 2
|
||||
where access_work_id = #{accessWorkId}
|
||||
</update>
|
||||
|
||||
<update id="deleteCoscoAccessSupplierByAccessWorkIds" parameterType="String">
|
||||
update cosco_access_supplier set del_flag = 2 where access_work_id in
|
||||
<foreach item="accessWorkId" collection="array" open="(" separator="," close=")">
|
||||
#{accessWorkId}
|
||||
</foreach>
|
||||
</update>
|
||||
</mapper>
|
@ -0,0 +1,161 @@
|
||||
<?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.CoscoAccessUserItemMapper">
|
||||
|
||||
<resultMap type="com.chinaunicom.zyhy.ebtp.supplier.coscosupplier.entity.CoscoAccessUserItem" id="CoscoAccessUserItemResult">
|
||||
<result property="id" column="id"/>
|
||||
<result property="accessWorkId" column="access_work_id"/>
|
||||
<result property="supplierId" column="supplier_id"/>
|
||||
<result property="itemId" column="item_id"/>
|
||||
<result property="reviewBy" column="review_by"/>
|
||||
<result property="reviewResult" column="review_result"/>
|
||||
<result property="remark" column="remark"/>
|
||||
<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="selectCoscoAccessUserItemVo">
|
||||
|
||||
select i.item_name as itemName,ui.review_by,
|
||||
ui.id, ui.access_work_id, ui.supplier_id, ui.item_id, ui.review_by,
|
||||
ui.review_result, ui.remark, ui.del_flag, ui.create_by,
|
||||
ui.create_time, ui.update_by, ui.update_time, ui.last_update_time
|
||||
from cosco_access_user_item ui
|
||||
left join cosco_access_item i on ui.item_id = i.id and i.del_flag = 'normal'
|
||||
|
||||
|
||||
|
||||
</sql>
|
||||
|
||||
<select id="selectCoscoAccessUserItemList" parameterType="com.chinaunicom.zyhy.ebtp.supplier.coscosupplier.entity.CoscoAccessUserItem" resultMap="CoscoAccessUserItemResult">
|
||||
<include refid="selectCoscoAccessUserItemVo"/>
|
||||
<where>
|
||||
<if test="accessWorkId != null and accessWorkId != ''">
|
||||
and ui.access_work_id = #{accessWorkId}
|
||||
</if>
|
||||
<if test="supplierId != null and supplierId != ''">
|
||||
and ui.supplier_id = #{supplierId}
|
||||
</if>
|
||||
<if test="itemId != null and itemId != ''">
|
||||
and ui.item_id = #{itemId}
|
||||
</if>
|
||||
<if test="reviewBy != null and reviewBy != ''">
|
||||
and ui.review_by = #{reviewBy}
|
||||
</if>
|
||||
<if test="reviewResult != null ">
|
||||
and ui.review_result = #{reviewResult}
|
||||
</if>
|
||||
<if test="lastUpdateTime != null ">
|
||||
and ui.last_update_time = #{lastUpdateTime}
|
||||
</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectCoscoAccessUserItemById" parameterType="String"
|
||||
resultMap="CoscoAccessUserItemResult">
|
||||
<include refid="selectCoscoAccessUserItemVo"/>
|
||||
where ui.id = #{id}
|
||||
</select>
|
||||
|
||||
<insert id="insertCoscoAccessUserItem" parameterType="com.chinaunicom.zyhy.ebtp.supplier.coscosupplier.entity.CoscoAccessUserItem">
|
||||
insert into cosco_access_user_item
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="id != null">id,</if>
|
||||
<if test="accessWorkId != null and accessWorkId != ''">access_work_id,</if>
|
||||
<if test="supplierId != null and supplierId != ''">supplier_id,</if>
|
||||
<if test="itemId != null and itemId != ''">item_id,</if>
|
||||
<if test="reviewBy != null">review_by,</if>
|
||||
<if test="reviewResult != null">review_result,</if>
|
||||
<if test="remark != null">remark,</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="accessWorkId != null and accessWorkId != ''">#{accessWorkId},</if>
|
||||
<if test="supplierId != null and supplierId != ''">#{supplierId},</if>
|
||||
<if test="itemId != null and itemId != ''">#{itemId},</if>
|
||||
<if test="reviewBy != null">#{reviewBy},</if>
|
||||
<if test="reviewResult != null">#{reviewResult},</if>
|
||||
<if test="remark != null">#{remark},</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="batchCoscoAccessUserItem" parameterType="java.util.List">
|
||||
insert into cosco_access_user_item
|
||||
( id, access_work_id, supplier_id, item_id, review_by, review_result, remark, del_flag, create_by, create_time, update_by, update_time, last_update_time)
|
||||
values
|
||||
<foreach item="item" index="index" collection="list" separator=",">
|
||||
( #{item.id}, #{item.accessWorkId}, #{item.supplierId}, #{item.itemId}, #{item.reviewBy}, #{item.reviewResult}, #{item.remark}, #{item.delFlag}, #{item.createBy}, #{item.createTime}, #{item.updateBy}, #{item.updateTime}, #{item.lastUpdateTime})
|
||||
</foreach>
|
||||
</insert>
|
||||
<update id="updateCoscoAccessUserItem" parameterType="com.chinaunicom.zyhy.ebtp.supplier.coscosupplier.entity.CoscoAccessUserItem">
|
||||
update cosco_access_user_item
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="accessWorkId != null and accessWorkId != ''">access_work_id =
|
||||
#{accessWorkId},
|
||||
</if>
|
||||
<if test="supplierId != null and supplierId != ''">supplier_id =
|
||||
#{supplierId},
|
||||
</if>
|
||||
<if test="itemId != null and itemId != ''">item_id =
|
||||
#{itemId},
|
||||
</if>
|
||||
<if test="reviewBy != null">review_by =
|
||||
#{reviewBy},
|
||||
</if>
|
||||
<if test="reviewResult != null">review_result =
|
||||
#{reviewResult},
|
||||
</if>
|
||||
<if test="remark != null">remark =
|
||||
#{remark},
|
||||
</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="deleteCoscoAccessUserItemById" parameterType="String">
|
||||
update cosco_access_user_item set del_flag = 2
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
<update id="deleteCoscoAccessUserItemByIds" parameterType="String">
|
||||
update cosco_access_user_item set del_flag = 2 where id in
|
||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</update>
|
||||
</mapper>
|
@ -0,0 +1,205 @@
|
||||
<?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.CoscoAccessUserMapper">
|
||||
|
||||
<resultMap type="com.chinaunicom.zyhy.ebtp.supplier.coscosupplier.entity.CoscoAccessUser" id="CoscoAccessUserResult">
|
||||
<result property="id" column="id"/>
|
||||
<result property="accessWorkId" column="access_work_id"/>
|
||||
<result property="userId" column="user_id"/>
|
||||
<result property="deptId" column="dept_id"/>
|
||||
<result property="isLeader" column="is_leader"/>
|
||||
<result property="reviewTime" column="review_time"/>
|
||||
<result property="status" column="status"/>
|
||||
<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="selectCoscoAccessUserVo">
|
||||
select id, access_work_id, user_id, dept_id, is_leader, review_time, status, del_flag, create_by, create_time, update_by, update_time, last_update_time
|
||||
from cosco_access_user
|
||||
</sql>
|
||||
|
||||
<select id="selectCoscoAccessUserList" parameterType="com.chinaunicom.zyhy.ebtp.supplier.coscosupplier.entity.CoscoAccessUser" resultMap="CoscoAccessUserResult">
|
||||
<include refid="selectCoscoAccessUserVo"/>
|
||||
<where>
|
||||
<if test="accessWorkId != null and accessWorkId != ''">
|
||||
and access_work_id = #{accessWorkId}
|
||||
</if>
|
||||
<if test="userId != null and userId != ''">
|
||||
and user_id = #{userId}
|
||||
</if>
|
||||
<if test="deptId != null and deptId != ''">
|
||||
and dept_id = #{deptId}
|
||||
</if>
|
||||
<if test="isLeader != null ">
|
||||
and is_leader = #{isLeader}
|
||||
</if>
|
||||
<if test="reviewTime != null ">
|
||||
and review_time = #{reviewTime}
|
||||
</if>
|
||||
<if test="status != null ">
|
||||
and status = #{status}
|
||||
</if>
|
||||
<if test="lastUpdateTime != null ">
|
||||
and last_update_time = #{lastUpdateTime}
|
||||
</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
|
||||
<select id="selectCountStatus" parameterType="com.chinaunicom.zyhy.ebtp.supplier.coscosupplier.entity.CoscoAccessUser" resultType="Integer">
|
||||
select count(0) from cosco_access_user where access_work_id = #{accessWorkId} and `status` = #{status} and is_leader = #{isLeader}
|
||||
</select>
|
||||
|
||||
<select id="selectCoscoAccessUserById" parameterType="String"
|
||||
resultMap="CoscoAccessUserResult">
|
||||
<include refid="selectCoscoAccessUserVo"/>
|
||||
where id = #{id}
|
||||
</select>
|
||||
|
||||
<insert id="insertCoscoAccessUser" parameterType="com.chinaunicom.zyhy.ebtp.supplier.coscosupplier.entity.CoscoAccessUser">
|
||||
insert into cosco_access_user
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="id != null">id,</if>
|
||||
<if test="accessWorkId != null and accessWorkId != ''">access_work_id,</if>
|
||||
<if test="userId != null and userId != ''">user_id,</if>
|
||||
<if test="deptId != null and deptId != ''">dept_id,</if>
|
||||
<if test="isLeader != null">is_leader,</if>
|
||||
<if test="reviewTime != null">review_time,</if>
|
||||
<if test="status != null">status,</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="accessWorkId != null and accessWorkId != ''">#{accessWorkId},</if>
|
||||
<if test="userId != null and userId != ''">#{userId},</if>
|
||||
<if test="deptId != null and deptId != ''">#{deptId},</if>
|
||||
<if test="isLeader != null">#{isLeader},</if>
|
||||
<if test="reviewTime != null">#{reviewTime},</if>
|
||||
<if test="status != null">#{status},</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="batchCoscoAccessUser" parameterType="java.util.List">
|
||||
insert into cosco_access_user
|
||||
( id, access_work_id, user_id, dept_id, is_leader, review_time, status, del_flag, create_by, create_time, update_by, update_time, last_update_time)
|
||||
values
|
||||
<foreach item="item" index="index" collection="list" separator=",">
|
||||
( #{item.id}, #{item.accessWorkId}, #{item.userId}, #{item.deptId}, #{item.isLeader}, #{item.reviewTime}, #{item.status}, #{item.delFlag}, #{item.createBy}, #{item.createTime}, #{item.updateBy}, #{item.updateTime}, #{item.lastUpdateTime})
|
||||
</foreach>
|
||||
</insert>
|
||||
<update id="updateCoscoAccessUser" parameterType="com.chinaunicom.zyhy.ebtp.supplier.coscosupplier.entity.CoscoAccessUser">
|
||||
update cosco_access_user
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="accessWorkId != null and accessWorkId != ''">access_work_id =
|
||||
#{accessWorkId},
|
||||
</if>
|
||||
<if test="userId != null and userId != ''">user_id =
|
||||
#{userId},
|
||||
</if>
|
||||
<if test="deptId != null and deptId != ''">dept_id =
|
||||
#{deptId},
|
||||
</if>
|
||||
<if test="isLeader != null">is_leader =
|
||||
#{isLeader},
|
||||
</if>
|
||||
<if test="reviewTime != null">review_time =
|
||||
#{reviewTime},
|
||||
</if>
|
||||
<if test="status != null">status =
|
||||
#{status},
|
||||
</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="updateCoscoAccessUserByUserId" parameterType="com.chinaunicom.zyhy.ebtp.supplier.coscosupplier.entity.CoscoAccessUser">
|
||||
update cosco_access_user
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="accessWorkId != null and accessWorkId != ''">access_work_id =
|
||||
#{accessWorkId},
|
||||
</if>
|
||||
<if test="userId != null and userId != ''">user_id =
|
||||
#{userId},
|
||||
</if>
|
||||
<if test="deptId != null and deptId != ''">dept_id =
|
||||
#{deptId},
|
||||
</if>
|
||||
<if test="isLeader != null">is_leader =
|
||||
#{isLeader},
|
||||
</if>
|
||||
<if test="reviewTime != null">review_time =
|
||||
#{reviewTime},
|
||||
</if>
|
||||
<if test="status != null">status =
|
||||
#{status},
|
||||
</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 access_work_id = #{accessWorkId} and user_id = #{userId}
|
||||
</update>
|
||||
|
||||
|
||||
<update id="deleteCoscoAccessUserById" parameterType="String">
|
||||
update cosco_access_user set del_flag = 2
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
<update id="deleteCoscoAccessUserByIds" parameterType="String">
|
||||
update cosco_access_user set del_flag = 2 where id in
|
||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</update>
|
||||
</mapper>
|
@ -0,0 +1,165 @@
|
||||
<?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.CoscoAccessWorkAttachmentsMapper">
|
||||
|
||||
<resultMap type="com.chinaunicom.zyhy.ebtp.supplier.coscosupplier.entity.CoscoAccessWorkAttachments" id="CoscoAccessWorkAttachmentsResult">
|
||||
<result property="id" column="id"/>
|
||||
<result property="accessWorkId" column="access_work_id"/>
|
||||
<result property="attachmentsType" column="attachments_type"/>
|
||||
<result property="fileName" column="file_name"/>
|
||||
<result property="fileType" column="file_type"/>
|
||||
<result property="fileSize" column="file_size"/>
|
||||
<result property="filePath" column="file_path"/>
|
||||
<result property="fileUrl" column="file_url"/>
|
||||
<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="selectCoscoAccessWorkAttachmentsVo">
|
||||
select id, access_work_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_access_work_attachments
|
||||
</sql>
|
||||
|
||||
<select id="selectCoscoAccessWorkAttachmentsList" parameterType="com.chinaunicom.zyhy.ebtp.supplier.coscosupplier.entity.CoscoAccessWorkAttachments" resultMap="CoscoAccessWorkAttachmentsResult">
|
||||
<include refid="selectCoscoAccessWorkAttachmentsVo"/>
|
||||
<where>
|
||||
<if test="accessWorkId != null and accessWorkId != ''">
|
||||
and access_work_id = #{accessWorkId}
|
||||
</if>
|
||||
<if test="attachmentsType != null and attachmentsType != ''">
|
||||
and attachments_type = #{attachmentsType}
|
||||
</if>
|
||||
<if test="fileName != null and fileName != ''">
|
||||
and file_name like concat('%', #{fileName}, '%')
|
||||
</if>
|
||||
<if test="fileType != null and fileType != ''">
|
||||
and file_type = #{fileType}
|
||||
</if>
|
||||
<if test="fileSize != null and fileSize != ''">
|
||||
and file_size = #{fileSize}
|
||||
</if>
|
||||
<if test="filePath != null and filePath != ''">
|
||||
and file_path = #{filePath}
|
||||
</if>
|
||||
<if test="fileUrl != null and fileUrl != ''">
|
||||
and file_url = #{fileUrl}
|
||||
</if>
|
||||
<if test="lastUpdateTime != null ">
|
||||
and last_update_time = #{lastUpdateTime}
|
||||
</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectCoscoAccessWorkAttachmentsById" parameterType="String"
|
||||
resultMap="CoscoAccessWorkAttachmentsResult">
|
||||
<include refid="selectCoscoAccessWorkAttachmentsVo"/>
|
||||
where id = #{id}
|
||||
</select>
|
||||
|
||||
<insert id="insertCoscoAccessWorkAttachments" parameterType="com.chinaunicom.zyhy.ebtp.supplier.coscosupplier.entity.CoscoAccessWorkAttachments">
|
||||
insert into cosco_access_work_attachments
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="id != null">id,</if>
|
||||
<if test="accessWorkId != null and accessWorkId != ''">access_work_id,</if>
|
||||
<if test="attachmentsType != null and attachmentsType != ''">attachments_type,</if>
|
||||
<if test="fileName != null">file_name,</if>
|
||||
<if test="fileType != null">file_type,</if>
|
||||
<if test="fileSize != null">file_size,</if>
|
||||
<if test="filePath != null">file_path,</if>
|
||||
<if test="fileUrl != null">file_url,</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="accessWorkId != null and accessWorkId != ''">#{accessWorkId},</if>
|
||||
<if test="attachmentsType != null and attachmentsType != ''">#{attachmentsType},</if>
|
||||
<if test="fileName != null">#{fileName},</if>
|
||||
<if test="fileType != null">#{fileType},</if>
|
||||
<if test="fileSize != null">#{fileSize},</if>
|
||||
<if test="filePath != null">#{filePath},</if>
|
||||
<if test="fileUrl != null">#{fileUrl},</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="batchCoscoAccessWorkAttachments" parameterType="java.util.List">
|
||||
insert into cosco_access_work_attachments
|
||||
( id, access_work_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)
|
||||
values
|
||||
<foreach item="item" index="index" collection="list" separator=",">
|
||||
( #{item.id}, #{item.accessWorkId}, #{item.attachmentsType}, #{item.fileName}, #{item.fileType}, #{item.fileSize}, #{item.filePath}, #{item.fileUrl}, #{item.delFlag}, #{item.createBy}, #{item.createTime}, #{item.updateBy}, #{item.updateTime}, #{item.lastUpdateTime})
|
||||
</foreach>
|
||||
</insert>
|
||||
<update id="updateCoscoAccessWorkAttachments" parameterType="com.chinaunicom.zyhy.ebtp.supplier.coscosupplier.entity.CoscoAccessWorkAttachments">
|
||||
update cosco_access_work_attachments
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="accessWorkId != null and accessWorkId != ''">access_work_id =
|
||||
#{accessWorkId},
|
||||
</if>
|
||||
<if test="attachmentsType != null and attachmentsType != ''">attachments_type =
|
||||
#{attachmentsType},
|
||||
</if>
|
||||
<if test="fileName != null">file_name =
|
||||
#{fileName},
|
||||
</if>
|
||||
<if test="fileType != null">file_type =
|
||||
#{fileType},
|
||||
</if>
|
||||
<if test="fileSize != null">file_size =
|
||||
#{fileSize},
|
||||
</if>
|
||||
<if test="filePath != null">file_path =
|
||||
#{filePath},
|
||||
</if>
|
||||
<if test="fileUrl != null">file_url =
|
||||
#{fileUrl},
|
||||
</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="deleteCoscoAccessWorkAttachmentsById" parameterType="String">
|
||||
update cosco_access_work_attachments set del_flag = 2
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
<update id="deleteCoscoAccessWorkAttachmentsByIds" parameterType="String">
|
||||
update cosco_access_work_attachments set del_flag = 2 where id in
|
||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</update>
|
||||
</mapper>
|
@ -0,0 +1,391 @@
|
||||
<?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.CoscoAccessWorkMapper">
|
||||
|
||||
<resultMap type="com.chinaunicom.zyhy.ebtp.supplier.coscosupplier.entity.CoscoAccessWork" id="CoscoAccessWorkResult">
|
||||
<result property="id" column="id"/>
|
||||
<result property="accessWorkName" column="access_work_name"/>
|
||||
<result property="deptId" column="dept_id"/>
|
||||
<result property="applyType" column="apply_type"/>
|
||||
<result property="accessType" column="access_type"/>
|
||||
<result property="startTime" column="start_time"/>
|
||||
<result property="endTime" column="end_time"/>
|
||||
<result property="reviewStatus" column="review_status"/>
|
||||
<result property="approveStatus" column="approve_status"/>
|
||||
<result property="workFlowId" column="work_flow_id"/>
|
||||
<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="selectCoscoAccessWorkVo">
|
||||
SELECT
|
||||
DISTINCT
|
||||
w.id,
|
||||
w.access_work_name,
|
||||
w.dept_id,
|
||||
CASE
|
||||
WHEN w.access_type = 'online' THEN '线上准入'
|
||||
WHEN w.access_type = 'offline' THEN '线下准入'
|
||||
ELSE w.access_type
|
||||
END AS access_type_text,
|
||||
w.start_time,
|
||||
w.end_time,
|
||||
CASE
|
||||
WHEN w.review_status = 0 THEN '未开始'
|
||||
WHEN w.review_status = 1 THEN '进行中'
|
||||
WHEN w.review_status = 2 THEN '结果汇总中'
|
||||
WHEN w.review_status = 3 THEN '已完成'
|
||||
ELSE CAST(w.review_status AS CHAR)
|
||||
END AS review_status_text,
|
||||
CASE
|
||||
WHEN w.approve_status = 0 THEN '审批中'
|
||||
WHEN w.approve_status = 1 THEN '通过'
|
||||
WHEN w.approve_status = 2 THEN '驳回'
|
||||
ELSE CAST(w.approve_status AS CHAR)
|
||||
END AS approve_status_text,
|
||||
w.work_flow_id,
|
||||
w.create_by,
|
||||
w.create_time,
|
||||
w.update_by,
|
||||
w.update_time,
|
||||
w.last_update_time
|
||||
FROM
|
||||
cosco_access_work w
|
||||
left join cosco_access_category c on w.id = c.access_work_id
|
||||
</sql>
|
||||
|
||||
|
||||
|
||||
<sql id="selectCoscoAccessWorkGroupVo">
|
||||
select GROUP_CONCAT(DISTINCT d.category_name SEPARATOR ', ') AS categoryName,
|
||||
w.id,
|
||||
w.access_work_name,
|
||||
w.dept_id,
|
||||
CASE
|
||||
WHEN w.access_type = 'online' THEN '线上准入'
|
||||
WHEN w.access_type = 'offline' THEN '线下准入'
|
||||
ELSE w.access_type
|
||||
END AS access_type_text,
|
||||
w.start_time,
|
||||
w.end_time,
|
||||
CASE
|
||||
WHEN w.review_status = 0 THEN '未开始'
|
||||
WHEN w.review_status = 1 THEN '进行中'
|
||||
WHEN w.review_status = 2 THEN '结果汇总中'
|
||||
WHEN w.review_status = 3 THEN '已完成'
|
||||
ELSE CAST(w.review_status AS CHAR)
|
||||
END AS review_status_text,
|
||||
CASE
|
||||
WHEN w.approve_status = 0 THEN '审批中'
|
||||
WHEN w.approve_status = 1 THEN '通过'
|
||||
WHEN w.approve_status = 2 THEN '驳回'
|
||||
ELSE CAST(w.approve_status AS CHAR)
|
||||
END AS approve_status_text,
|
||||
w.work_flow_id,
|
||||
w.create_by,
|
||||
w.create_time,
|
||||
w.update_by,
|
||||
w.update_time,
|
||||
w.last_update_time
|
||||
FROM
|
||||
cosco_access_work w
|
||||
LEFT JOIN cosco_access_category c ON w.id = c.access_work_id
|
||||
LEFT JOIN cosco_category d ON c.category_id = d.id and d.del_flag = 'normal'
|
||||
</sql>
|
||||
|
||||
|
||||
<select id="selectPageList" parameterType="com.chinaunicom.zyhy.ebtp.supplier.coscosupplier.entity.CoscoAccessWork" resultMap="CoscoAccessWorkResult">
|
||||
<include refid="selectCoscoAccessWorkGroupVo"/>
|
||||
<where>
|
||||
and w.del_flag = 'normal'
|
||||
<if test="vo.categoryId != null and vo.categoryId != ''">
|
||||
and c.category_id = #{vo.categoryId}
|
||||
</if>
|
||||
<if test="vo.accessWorkName != null and vo.accessWorkName != ''">
|
||||
and w.access_work_name like concat('%', #{vo.accessWorkName}, '%')
|
||||
</if>
|
||||
<if test="vo.deptId != null and vo.deptId != ''">
|
||||
and w.dept_id = #{vo.deptId}
|
||||
</if>
|
||||
<if test="vo.applyType != null and vo.applyType != ''">
|
||||
and w.apply_type = #{vo.applyType}
|
||||
</if>
|
||||
<if test="vo.accessType != null and vo.accessType != ''">
|
||||
and w.access_type = #{vo.accessType}
|
||||
</if>
|
||||
<if test="vo.startTime != null ">
|
||||
and w.start_time = #{vo.startTime}
|
||||
</if>
|
||||
<if test="vo.endTime != null ">
|
||||
and w.end_time = #{vo.endTime}
|
||||
</if>
|
||||
<if test="vo.reviewStatus != null ">
|
||||
and w.review_status = #{vo.reviewStatus}
|
||||
</if>
|
||||
<if test="vo.approveStatus != null ">
|
||||
and w.approve_status = #{vo.approveStatus}
|
||||
</if>
|
||||
<if test="vo.workFlowId != null and vo.workFlowId != ''">
|
||||
and w.work_flow_id = #{vo.workFlowId}
|
||||
</if>
|
||||
<if test="vo.lastUpdateTime != null ">
|
||||
and w.last_update_time = #{vo.lastUpdateTime}
|
||||
</if>
|
||||
</where>
|
||||
GROUP BY
|
||||
w.id,
|
||||
w.access_work_name,
|
||||
w.dept_id,
|
||||
access_type_text,
|
||||
w.start_time,
|
||||
w.end_time,
|
||||
review_status_text,
|
||||
approve_status_text,
|
||||
w.work_flow_id,
|
||||
w.create_by,
|
||||
w.create_time,
|
||||
w.update_by,
|
||||
w.update_time,
|
||||
w.last_update_time
|
||||
</select>
|
||||
|
||||
|
||||
<select id="selectCoscoAccessWorkList" parameterType="com.chinaunicom.zyhy.ebtp.supplier.coscosupplier.entity.CoscoAccessWork" resultMap="CoscoAccessWorkResult">
|
||||
<include refid="selectCoscoAccessWorkGroupVo"/>
|
||||
<where>
|
||||
and w.del_flag = 'normal'
|
||||
<if test="vo.categoryId != null and vo.categoryId != ''">
|
||||
and c.category_id = #{vo.categoryId}
|
||||
</if>
|
||||
<if test="vo.accessWorkName != null and vo.accessWorkName != ''">
|
||||
and w.access_work_name like concat('%', #{vo.accessWorkName}, '%')
|
||||
</if>
|
||||
<if test="vo.deptId != null and vo.deptId != ''">
|
||||
and w.dept_id = #{vo.deptId}
|
||||
</if>
|
||||
<if test="vo.applyType != null and vo.applyType != ''">
|
||||
and w.apply_type = #{vo.applyType}
|
||||
</if>
|
||||
<if test="vo.accessType != null and vo.accessType != ''">
|
||||
and w.access_type = #{vo.accessType}
|
||||
</if>
|
||||
<if test="vo.startTime != null ">
|
||||
and w.start_time = #{vo.startTime}
|
||||
</if>
|
||||
<if test="vo.endTime != null ">
|
||||
and w.end_time = #{vo.endTime}
|
||||
</if>
|
||||
<if test="vo.reviewStatus != null ">
|
||||
and w.review_status = #{vo.reviewStatus}
|
||||
</if>
|
||||
<if test="vo.approveStatus != null ">
|
||||
and w.approve_status = #{vo.approveStatus}
|
||||
</if>
|
||||
<if test="vo.workFlowId != null and vo.workFlowId != ''">
|
||||
and w.work_flow_id = #{vo.workFlowId}
|
||||
</if>
|
||||
<if test="vo.lastUpdateTime != null ">
|
||||
and w.last_update_time = #{vo.lastUpdateTime}
|
||||
</if>
|
||||
</where>
|
||||
GROUP BY
|
||||
w.id,
|
||||
w.access_work_name,
|
||||
w.dept_id,
|
||||
access_type_text,
|
||||
w.start_time,
|
||||
w.end_time,
|
||||
review_status_text,
|
||||
approve_status_text,
|
||||
w.work_flow_id,
|
||||
w.create_by,
|
||||
w.create_time,
|
||||
w.update_by,
|
||||
w.update_time,
|
||||
w.last_update_time
|
||||
</select>
|
||||
|
||||
|
||||
|
||||
<select id="selectApproveList" parameterType="com.chinaunicom.zyhy.ebtp.supplier.coscosupplier.entity.CoscoAccessWork" resultMap="CoscoAccessWorkResult">
|
||||
<include refid="selectCoscoAccessWorkGroupVo"/>
|
||||
<where>
|
||||
and w.del_flag = 'normal'
|
||||
<if test="vo.categoryId != null and vo.categoryId != ''">
|
||||
and c.category_id = #{vo.categoryId}
|
||||
</if>
|
||||
<if test="vo.accessWorkName != null and vo.accessWorkName != ''">
|
||||
and w.access_work_name like concat('%', #{vo.accessWorkName}, '%')
|
||||
</if>
|
||||
<if test="vo.deptId != null and vo.deptId != ''">
|
||||
and w.dept_id = #{vo.deptId}
|
||||
</if>
|
||||
<if test="vo.applyType != null and vo.applyType != ''">
|
||||
and w.apply_type = #{vo.applyType}
|
||||
</if>
|
||||
<if test="vo.accessType != null and vo.accessType != ''">
|
||||
and w.access_type = #{vo.accessType}
|
||||
</if>
|
||||
<if test="vo.startTime != null ">
|
||||
and w.start_time = #{vo.startTime}
|
||||
</if>
|
||||
<if test="vo.endTime != null ">
|
||||
and w.end_time = #{vo.endTime}
|
||||
</if>
|
||||
<if test="vo.reviewStatus != null ">
|
||||
and w.review_status = #{vo.reviewStatus}
|
||||
</if>
|
||||
<if test="vo.approveStatus != null ">
|
||||
and w.approve_status = #{vo.approveStatus}
|
||||
</if>
|
||||
<if test="vo.approveStatus == null ">
|
||||
and w.approve_status IN (0, 1, 2)
|
||||
</if>
|
||||
<if test="vo.workFlowId != null and vo.workFlowId != ''">
|
||||
and w.work_flow_id = #{vo.workFlowId}
|
||||
</if>
|
||||
<if test="vo.lastUpdateTime != null ">
|
||||
and w.last_update_time = #{vo.lastUpdateTime}
|
||||
</if>
|
||||
</where>
|
||||
GROUP BY
|
||||
w.id,
|
||||
w.access_work_name,
|
||||
w.dept_id,
|
||||
access_type_text,
|
||||
w.start_time,
|
||||
w.end_time,
|
||||
review_status_text,
|
||||
approve_status_text,
|
||||
w.work_flow_id,
|
||||
w.create_by,
|
||||
w.create_time,
|
||||
w.update_by,
|
||||
w.update_time,
|
||||
w.last_update_time
|
||||
</select>
|
||||
|
||||
|
||||
<select id="selectCoscoAccessWorkById" parameterType="String"
|
||||
resultMap="CoscoAccessWorkResult">
|
||||
<include refid="selectCoscoAccessWorkVo"/>
|
||||
where w.id = #{id}
|
||||
</select>
|
||||
|
||||
<insert id="insertCoscoAccessWork" parameterType="com.chinaunicom.zyhy.ebtp.supplier.coscosupplier.entity.CoscoAccessWork">
|
||||
insert into cosco_access_work
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="id != null">id,</if>
|
||||
<if test="accessWorkName != null and accessWorkName != ''">access_work_name,</if>
|
||||
<if test="deptId != null">dept_id,</if>
|
||||
<if test="applyType != null">apply_type,</if>
|
||||
<if test="accessType != null">access_type,</if>
|
||||
<if test="startTime != null">start_time,</if>
|
||||
<if test="endTime != null">end_time,</if>
|
||||
<if test="reviewStatus != null">review_status,</if>
|
||||
<if test="approveStatus != null">approve_status,</if>
|
||||
<if test="workFlowId != null">work_flow_id,</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="accessWorkName != null and accessWorkName != ''">#{accessWorkName},</if>
|
||||
<if test="deptId != null">#{deptId},</if>
|
||||
<if test="applyType != null">#{applyType},</if>
|
||||
<if test="accessType != null">#{accessType},</if>
|
||||
<if test="startTime != null">#{startTime},</if>
|
||||
<if test="endTime != null">#{endTime},</if>
|
||||
<if test="reviewStatus != null">#{reviewStatus},</if>
|
||||
<if test="approveStatus != null">#{approveStatus},</if>
|
||||
<if test="workFlowId != null">#{workFlowId},</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="batchCoscoAccessWork" parameterType="java.util.List">
|
||||
insert into cosco_access_work
|
||||
( id, access_work_name, dept_id, apply_type, access_type, start_time, end_time, review_status, approve_status, work_flow_id, del_flag, create_by, create_time, update_by, update_time, last_update_time)
|
||||
values
|
||||
<foreach item="item" index="index" collection="list" separator=",">
|
||||
( #{item.id}, #{item.accessWorkName}, #{item.deptId}, #{item.applyType}, #{item.accessType}, #{item.startTime}, #{item.endTime}, #{item.reviewStatus}, #{item.approveStatus}, #{item.workFlowId}, #{item.delFlag}, #{item.createBy}, #{item.createTime}, #{item.updateBy}, #{item.updateTime}, #{item.lastUpdateTime})
|
||||
</foreach>
|
||||
</insert>
|
||||
<update id="updateCoscoAccessWork" parameterType="com.chinaunicom.zyhy.ebtp.supplier.coscosupplier.entity.CoscoAccessWork">
|
||||
update cosco_access_work
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="accessWorkName != null and accessWorkName != ''">access_work_name =
|
||||
#{accessWorkName},
|
||||
</if>
|
||||
<if test="deptId != null">dept_id =
|
||||
#{deptId},
|
||||
</if>
|
||||
<if test="applyType != null">apply_type =
|
||||
#{applyType},
|
||||
</if>
|
||||
<if test="accessType != null">access_type =
|
||||
#{accessType},
|
||||
</if>
|
||||
<if test="startTime != null">start_time =
|
||||
#{startTime},
|
||||
</if>
|
||||
<if test="endTime != null">end_time =
|
||||
#{endTime},
|
||||
</if>
|
||||
<if test="reviewStatus != null">review_status =
|
||||
#{reviewStatus},
|
||||
</if>
|
||||
<if test="approveStatus != null">approve_status =
|
||||
#{approveStatus},
|
||||
</if>
|
||||
<if test="workFlowId != null">work_flow_id =
|
||||
#{workFlowId},
|
||||
</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="deleteCoscoAccessWorkById" parameterType="String">
|
||||
update cosco_access_work set del_flag = 2
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
<update id="deleteCoscoAccessWorkByIds" parameterType="String">
|
||||
update cosco_access_work set del_flag = 2 where id in
|
||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</update>
|
||||
</mapper>
|
@ -0,0 +1,204 @@
|
||||
<?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.CoscoSupplierBankMapper">
|
||||
|
||||
<resultMap type="com.chinaunicom.zyhy.ebtp.supplier.coscosupplier.entity.CoscoSupplierBank" id="CoscoSupplierBankResult">
|
||||
<result property="id" column="id"/>
|
||||
<result property="supplierId" column="supplier_id"/>
|
||||
<result property="interbankNumber" column="interbank_number"/>
|
||||
<result property="bank" column="bank"/>
|
||||
<result property="swiftCode" column="swift_code"/>
|
||||
<result property="accountName" column="account_name"/>
|
||||
<result property="account" column="account"/>
|
||||
<result property="currency" column="currency"/>
|
||||
<result property="nation" column="nation"/>
|
||||
<result property="province" column="province"/>
|
||||
<result property="city" column="city"/>
|
||||
<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="selectCoscoSupplierBankVo">
|
||||
select id, supplier_id, interbank_number, bank, swift_code, account_name, account, currency, nation, province, city, del_flag, create_by, create_time, update_by, update_time, last_update_time
|
||||
from cosco_supplier_bank
|
||||
</sql>
|
||||
|
||||
|
||||
<select id="selectPageList" parameterType="com.chinaunicom.zyhy.ebtp.supplier.coscosupplier.entity.CoscoSupplierBank" resultMap="CoscoSupplierBankResult">
|
||||
<include refid="selectCoscoSupplierBankVo"/>
|
||||
<where>
|
||||
<if test="vo.supplierId != null and vo.supplierId != ''">
|
||||
and supplier_id = #{vo.supplierId}
|
||||
</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectCoscoSupplierBankList" parameterType="com.chinaunicom.zyhy.ebtp.supplier.coscosupplier.entity.CoscoSupplierBank" resultMap="CoscoSupplierBankResult">
|
||||
<include refid="selectCoscoSupplierBankVo"/>
|
||||
<where>
|
||||
and del_flag = 'normal'
|
||||
<if test="supplierId != null and supplierId != ''">
|
||||
and supplier_id = #{supplierId}
|
||||
</if>
|
||||
<if test="interbankNumber != null and interbankNumber != ''">
|
||||
and interbank_number = #{interbankNumber}
|
||||
</if>
|
||||
<if test="bank != null and bank != ''">
|
||||
and bank = #{bank}
|
||||
</if>
|
||||
<if test="swiftCode != null and swiftCode != ''">
|
||||
and swift_code = #{swiftCode}
|
||||
</if>
|
||||
<if test="accountName != null and accountName != ''">
|
||||
and account_name like concat('%', #{accountName}, '%')
|
||||
</if>
|
||||
<if test="account != null and account != ''">
|
||||
and account = #{account}
|
||||
</if>
|
||||
<if test="currency != null and currency != ''">
|
||||
and currency = #{currency}
|
||||
</if>
|
||||
<if test="nation != null and nation != ''">
|
||||
and nation = #{nation}
|
||||
</if>
|
||||
<if test="province != null and province != ''">
|
||||
and province = #{province}
|
||||
</if>
|
||||
<if test="city != null and city != ''">
|
||||
and city = #{city}
|
||||
</if>
|
||||
<if test="lastUpdateTime != null ">
|
||||
and last_update_time = #{lastUpdateTime}
|
||||
</if>
|
||||
</where>
|
||||
order by create_time desc
|
||||
</select>
|
||||
|
||||
<select id="selectCoscoSupplierBankById" parameterType="String"
|
||||
resultMap="CoscoSupplierBankResult">
|
||||
<include refid="selectCoscoSupplierBankVo"/>
|
||||
where id = #{id}
|
||||
</select>
|
||||
|
||||
<insert id="insertCoscoSupplierBank" parameterType="com.chinaunicom.zyhy.ebtp.supplier.coscosupplier.entity.CoscoSupplierBank">
|
||||
insert into cosco_supplier_bank
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="id != null">id,</if>
|
||||
<if test="supplierId != null and supplierId != ''">supplier_id,</if>
|
||||
<if test="interbankNumber != null">interbank_number,</if>
|
||||
<if test="bank != null">bank,</if>
|
||||
<if test="swiftCode != null">swift_code,</if>
|
||||
<if test="accountName != null">account_name,</if>
|
||||
<if test="account != null">account,</if>
|
||||
<if test="currency != null">currency,</if>
|
||||
<if test="nation != null">nation,</if>
|
||||
<if test="province != null">province,</if>
|
||||
<if test="city != null">city,</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="supplierId != null and supplierId != ''">#{supplierId},</if>
|
||||
<if test="interbankNumber != null">#{interbankNumber},</if>
|
||||
<if test="bank != null">#{bank},</if>
|
||||
<if test="swiftCode != null">#{swiftCode},</if>
|
||||
<if test="accountName != null">#{accountName},</if>
|
||||
<if test="account != null">#{account},</if>
|
||||
<if test="currency != null">#{currency},</if>
|
||||
<if test="nation != null">#{nation},</if>
|
||||
<if test="province != null">#{province},</if>
|
||||
<if test="city != null">#{city},</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="batchCoscoSupplierBank" parameterType="java.util.List">
|
||||
insert into cosco_supplier_bank
|
||||
( id, supplier_id, interbank_number, bank, swift_code, account_name, account, currency, nation, province, city, del_flag, create_by, create_time, update_by, update_time, last_update_time)
|
||||
values
|
||||
<foreach item="item" index="index" collection="list" separator=",">
|
||||
( #{item.id}, #{item.supplierId}, #{item.interbankNumber}, #{item.bank}, #{item.swiftCode}, #{item.accountName}, #{item.account}, #{item.currency}, #{item.nation}, #{item.province}, #{item.city}, #{item.delFlag}, #{item.createBy}, #{item.createTime}, #{item.updateBy}, #{item.updateTime}, #{item.lastUpdateTime})
|
||||
</foreach>
|
||||
</insert>
|
||||
<update id="updateCoscoSupplierBank" parameterType="com.chinaunicom.zyhy.ebtp.supplier.coscosupplier.entity.CoscoSupplierBank">
|
||||
update cosco_supplier_bank
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="supplierId != null and supplierId != ''">supplier_id =
|
||||
#{supplierId},
|
||||
</if>
|
||||
<if test="interbankNumber != null">interbank_number =
|
||||
#{interbankNumber},
|
||||
</if>
|
||||
<if test="bank != null">bank =
|
||||
#{bank},
|
||||
</if>
|
||||
<if test="swiftCode != null">swift_code =
|
||||
#{swiftCode},
|
||||
</if>
|
||||
<if test="accountName != null">account_name =
|
||||
#{accountName},
|
||||
</if>
|
||||
<if test="account != null">account =
|
||||
#{account},
|
||||
</if>
|
||||
<if test="currency != null">currency =
|
||||
#{currency},
|
||||
</if>
|
||||
<if test="nation != null">nation =
|
||||
#{nation},
|
||||
</if>
|
||||
<if test="province != null">province =
|
||||
#{province},
|
||||
</if>
|
||||
<if test="city != null">city =
|
||||
#{city},
|
||||
</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="deleteCoscoSupplierBankById" parameterType="String">
|
||||
update cosco_supplier_bank set del_flag = 2
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
<update id="deleteCoscoSupplierBankByIds" parameterType="String">
|
||||
update cosco_supplier_bank set del_flag = 2 where id in
|
||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</update>
|
||||
</mapper>
|
@ -0,0 +1,516 @@
|
||||
<?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.CoscoSupplierBaseMapper">
|
||||
|
||||
<resultMap type="com.chinaunicom.zyhy.ebtp.supplier.coscosupplier.entity.CoscoSupplierBase" id="CoscoSupplierBaseResult">
|
||||
<result property="id" column="id"/>
|
||||
<result property="supplierType" column="supplier_type"/>
|
||||
<result property="licenceAccessory" column="licence_accessory"/>
|
||||
<result property="licenceDate" column="licence_date"/>
|
||||
<result property="enterpriseType" column="enterprise_type"/>
|
||||
<result property="name" column="name"/>
|
||||
<result property="nameEn" column="name_en"/>
|
||||
<result property="socialCreditCode" column="social_credit_code"/>
|
||||
<result property="range" column="range"/>
|
||||
<result property="regAddress" column="reg_address"/>
|
||||
<result property="workAddress" column="work_address"/>
|
||||
<result property="parentCompanyInvestor" column="parent_company_investor"/>
|
||||
<result property="legalPerson" column="legal_person"/>
|
||||
<result property="idCard" column="id_card"/>
|
||||
<result property="capital" column="capital"/>
|
||||
<result property="contactsName" column="contacts_name"/>
|
||||
<result property="contactsPhone" column="contacts_phone"/>
|
||||
<result property="contactsType" column="contacts_type"/>
|
||||
<result property="contactsEmail" column="contacts_email"/>
|
||||
<result property="telephone" column="telephone"/>
|
||||
<result property="nation" column="nation"/>
|
||||
<result property="vat" column="vat"/>
|
||||
<result property="taxpayerId" column="taxpayer_id"/>
|
||||
<result property="currency" column="currency"/>
|
||||
<result property="personName" column="person_name"/>
|
||||
<result property="personPhone" column="person_phone"/>
|
||||
<result property="personBank" column="person_bank"/>
|
||||
<result property="personAccount" column="person_account"/>
|
||||
<result property="remark" column="remark"/>
|
||||
<result property="accessStatus" column="access_status"/>
|
||||
<result property="blacklistStatus" column="blacklist_status"/>
|
||||
<result property="greylistStatus" column="greylist_status"/>
|
||||
<result property="fillinStatus" column="fillin_status"/>
|
||||
<result property="fillinBy" column="fillin_by"/>
|
||||
<result property="sapCode" column="sap_code"/>
|
||||
<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="selectCoscoSupplierBaseVo">
|
||||
select id, supplier_type, licence_accessory, licence_date, enterprise_type, name, name_en, social_credit_code, `range`, reg_address, work_address, parent_company_investor, legal_person, id_card, capital, contacts_name, contacts_phone, contacts_type, contacts_email, telephone, nation, vat, taxpayer_id, currency, person_name, person_phone, person_bank, person_account, remark, access_status, blacklist_status, greylist_status, fillin_status, fillin_by, sap_code, del_flag, create_by, create_time, update_by, update_time, last_update_time
|
||||
from cosco_supplier_base
|
||||
</sql>
|
||||
|
||||
<select id="selectPageList" parameterType="com.chinaunicom.zyhy.ebtp.supplier.coscosupplier.entity.CoscoSupplierBase" resultMap="CoscoSupplierBaseResult">
|
||||
<include refid="selectCoscoSupplierBaseVo"/>
|
||||
<where>
|
||||
and del_flag = 'normal'
|
||||
<if test="vo.supplierType != null and vo.supplierType != ''">
|
||||
and supplier_type = #{vo.supplierType}
|
||||
</if>
|
||||
<if test="vo.licenceAccessory != null and vo.licenceAccessory != ''">
|
||||
and licence_accessory = #{vo.licenceAccessory}
|
||||
</if>
|
||||
<if test="vo.licenceDate != null and vo.licenceDate != ''">
|
||||
and licence_date = #{vo.licenceDate}
|
||||
</if>
|
||||
<if test="vo.enterpriseType != null and vo.enterpriseType != ''">
|
||||
and enterprise_type = #{vo.enterpriseType}
|
||||
</if>
|
||||
<if test="vo.name != null and vo.name != ''">
|
||||
and name like concat('%', #{vo.name}, '%')
|
||||
</if>
|
||||
<if test="vo.nameEn != null and vo.nameEn != ''">
|
||||
and name_en = #{vo.nameEn}
|
||||
</if>
|
||||
<if test="vo.socialCreditCode != null and vo.socialCreditCode != ''">
|
||||
and social_credit_code = #{vo.socialCreditCode}
|
||||
</if>
|
||||
<if test="vo.range != null and vo.range != ''">
|
||||
and range = #{vo.range}
|
||||
</if>
|
||||
<if test="vo.regAddress != null and vo.regAddress != ''">
|
||||
and reg_address = #{vo.regAddress}
|
||||
</if>
|
||||
<if test="vo.workAddress != null and vo.workAddress != ''">
|
||||
and work_address = #{vo.workAddress}
|
||||
</if>
|
||||
<if test="vo.parentCompanyInvestor != null and vo.parentCompanyInvestor != ''">
|
||||
and parent_company_investor = #{vo.parentCompanyInvestor}
|
||||
</if>
|
||||
<if test="vo.legalPerson != null and vo.legalPerson != ''">
|
||||
and legal_person = #{vo.legalPerson}
|
||||
</if>
|
||||
<if test="vo.idCard != null and vo.idCard != ''">
|
||||
and id_card = #{vo.idCard}
|
||||
</if>
|
||||
<if test="vo.capital != null ">
|
||||
and capital = #{vo.capital}
|
||||
</if>
|
||||
<if test="vo.contactsName != null and vo.contactsName != ''">
|
||||
and contacts_name like concat('%', #{vo.contactsName}, '%')
|
||||
</if>
|
||||
<if test="vo.contactsPhone != null and vo.contactsPhone != ''">
|
||||
and contacts_phone = #{vo.contactsPhone}
|
||||
</if>
|
||||
<if test="vo.contactsType != null and vo.contactsType != ''">
|
||||
and contacts_type = #{vo.contactsType}
|
||||
</if>
|
||||
<if test="vo.contactsEmail != null and vo.contactsEmail != ''">
|
||||
and contacts_email = #{vo.contactsEmail}
|
||||
</if>
|
||||
<if test="vo.telephone != null and vo.telephone != ''">
|
||||
and telephone = #{telephone}
|
||||
</if>
|
||||
<if test="vo.nation != null and vo.nation != ''">
|
||||
and nation = #{nation}
|
||||
</if>
|
||||
<if test="vo.vat != null and vo.vat != ''">
|
||||
and vat = #{vo.vat}
|
||||
</if>
|
||||
<if test="vo.taxpayerId != null and vo.taxpayerId != ''">
|
||||
and taxpayer_id = #{vo.taxpayerId}
|
||||
</if>
|
||||
<if test="vo.currency != null and vo.currency != ''">
|
||||
and currency = #{vo.currency}
|
||||
</if>
|
||||
<if test="vo.personName != null and vo.personName != ''">
|
||||
and person_name like concat('%', #{vo.personName}, '%')
|
||||
</if>
|
||||
<if test="vo.personPhone != null and vo.personPhone != ''">
|
||||
and person_phone = #{vo.personPhone}
|
||||
</if>
|
||||
<if test="vo.personBank != null and vo.personBank != ''">
|
||||
and person_bank = #{vo.personBank}
|
||||
</if>
|
||||
<if test="vo.personAccount != null and vo.personAccount != ''">
|
||||
and person_account = #{vo.personAccount}
|
||||
</if>
|
||||
<if test="vo.accessStatus != null ">
|
||||
and access_status = #{vo.accessStatus}
|
||||
</if>
|
||||
<if test="vo.blacklistStatus != null ">
|
||||
and blacklist_status = #{vo.blacklistStatus}
|
||||
</if>
|
||||
<if test="vo.greylistStatus != null ">
|
||||
and greylist_status = #{vo.greylistStatus}
|
||||
</if>
|
||||
<if test="vo.fillinStatus != null ">
|
||||
and fillin_status = #{vo.fillinStatus}
|
||||
</if>
|
||||
<if test="vo.fillinBy != null and vo.fillinBy != ''">
|
||||
and fillin_by = #{vo.fillinBy}
|
||||
</if>
|
||||
<if test="vo.sapCode != null and vo.sapCode != ''">
|
||||
and sap_code = #{vo.sapCode}
|
||||
</if>
|
||||
<if test="vo.lastUpdateTime != null ">
|
||||
and last_update_time = #{vo.lastUpdateTime}
|
||||
</if>
|
||||
</where>
|
||||
order by create_time desc
|
||||
</select>
|
||||
|
||||
|
||||
<select id="selectCoscoSupplierBaseList" parameterType="com.chinaunicom.zyhy.ebtp.supplier.coscosupplier.entity.CoscoSupplierBase" resultMap="CoscoSupplierBaseResult">
|
||||
<include refid="selectCoscoSupplierBaseVo"/>
|
||||
<where>
|
||||
<if test="supplierType != null and supplierType != ''">
|
||||
and supplier_type = #{supplierType}
|
||||
</if>
|
||||
<if test="licenceAccessory != null and licenceAccessory != ''">
|
||||
and licence_accessory = #{licenceAccessory}
|
||||
</if>
|
||||
<if test="licenceDate != null and licenceDate != ''">
|
||||
and licence_date = #{licenceDate}
|
||||
</if>
|
||||
<if test="enterpriseType != null and enterpriseType != ''">
|
||||
and enterprise_type = #{enterpriseType}
|
||||
</if>
|
||||
<if test="name != null and name != ''">
|
||||
and name like concat('%', #{name}, '%')
|
||||
</if>
|
||||
<if test="nameEn != null and nameEn != ''">
|
||||
and name_en = #{nameEn}
|
||||
</if>
|
||||
<if test="socialCreditCode != null and socialCreditCode != ''">
|
||||
and social_credit_code = #{socialCreditCode}
|
||||
</if>
|
||||
<if test="range != null and range != ''">
|
||||
and range = #{range}
|
||||
</if>
|
||||
<if test="regAddress != null and regAddress != ''">
|
||||
and reg_address = #{regAddress}
|
||||
</if>
|
||||
<if test="workAddress != null and workAddress != ''">
|
||||
and work_address = #{workAddress}
|
||||
</if>
|
||||
<if test="parentCompanyInvestor != null and parentCompanyInvestor != ''">
|
||||
and parent_company_investor = #{parentCompanyInvestor}
|
||||
</if>
|
||||
<if test="legalPerson != null and legalPerson != ''">
|
||||
and legal_person = #{legalPerson}
|
||||
</if>
|
||||
<if test="idCard != null and idCard != ''">
|
||||
and id_card = #{idCard}
|
||||
</if>
|
||||
<if test="capital != null ">
|
||||
and capital = #{capital}
|
||||
</if>
|
||||
<if test="contactsName != null and contactsName != ''">
|
||||
and contacts_name like concat('%', #{contactsName}, '%')
|
||||
</if>
|
||||
<if test="contactsPhone != null and contactsPhone != ''">
|
||||
and contacts_phone = #{contactsPhone}
|
||||
</if>
|
||||
<if test="contactsType != null and contactsType != ''">
|
||||
and contacts_type = #{contactsType}
|
||||
</if>
|
||||
<if test="contactsEmail != null and contactsEmail != ''">
|
||||
and contacts_email = #{contactsEmail}
|
||||
</if>
|
||||
<if test="telephone != null and telephone != ''">
|
||||
and telephone = #{telephone}
|
||||
</if>
|
||||
<if test="nation != null and nation != ''">
|
||||
and nation = #{nation}
|
||||
</if>
|
||||
<if test="vat != null and vat != ''">
|
||||
and vat = #{vat}
|
||||
</if>
|
||||
<if test="taxpayerId != null and taxpayerId != ''">
|
||||
and taxpayer_id = #{taxpayerId}
|
||||
</if>
|
||||
<if test="currency != null and currency != ''">
|
||||
and currency = #{currency}
|
||||
</if>
|
||||
<if test="personName != null and personName != ''">
|
||||
and person_name like concat('%', #{personName}, '%')
|
||||
</if>
|
||||
<if test="personPhone != null and personPhone != ''">
|
||||
and person_phone = #{personPhone}
|
||||
</if>
|
||||
<if test="personBank != null and personBank != ''">
|
||||
and person_bank = #{personBank}
|
||||
</if>
|
||||
<if test="personAccount != null and personAccount != ''">
|
||||
and person_account = #{personAccount}
|
||||
</if>
|
||||
<if test="accessStatus != null ">
|
||||
and access_status = #{accessStatus}
|
||||
</if>
|
||||
<if test="blacklistStatus != null ">
|
||||
and blacklist_status = #{blacklistStatus}
|
||||
</if>
|
||||
<if test="greylistStatus != null ">
|
||||
and greylist_status = #{greylistStatus}
|
||||
</if>
|
||||
<if test="fillinStatus != null ">
|
||||
and fillin_status = #{fillinStatus}
|
||||
</if>
|
||||
<if test="fillinBy != null and fillinBy != ''">
|
||||
and fillin_by = #{fillinBy}
|
||||
</if>
|
||||
<if test="sapCode != null and sapCode != ''">
|
||||
and sap_code = #{sapCode}
|
||||
</if>
|
||||
<if test="lastUpdateTime != null ">
|
||||
and last_update_time = #{lastUpdateTime}
|
||||
</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectCoscoSupplierBaseById" parameterType="String"
|
||||
resultMap="CoscoSupplierBaseResult">
|
||||
<include refid="selectCoscoSupplierBaseVo"/>
|
||||
where id = #{id}
|
||||
</select>
|
||||
|
||||
<insert id="insertCoscoSupplierBase" parameterType="com.chinaunicom.zyhy.ebtp.supplier.coscosupplier.entity.CoscoSupplierBase">
|
||||
insert into cosco_supplier_base
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="id != null">id,</if>
|
||||
<if test="supplierType != null">supplier_type,</if>
|
||||
<if test="licenceAccessory != null">licence_accessory,</if>
|
||||
<if test="licenceDate != null">licence_date,</if>
|
||||
<if test="enterpriseType != null">enterprise_type,</if>
|
||||
<if test="name != null">name,</if>
|
||||
<if test="nameEn != null">name_en,</if>
|
||||
<if test="socialCreditCode != null">social_credit_code,</if>
|
||||
<if test="range != null">`range`,</if>
|
||||
<if test="regAddress != null">reg_address,</if>
|
||||
<if test="workAddress != null">work_address,</if>
|
||||
<if test="parentCompanyInvestor != null">parent_company_investor,</if>
|
||||
<if test="legalPerson != null">legal_person,</if>
|
||||
<if test="idCard != null">id_card,</if>
|
||||
<if test="capital != null">capital,</if>
|
||||
<if test="contactsName != null">contacts_name,</if>
|
||||
<if test="contactsPhone != null">contacts_phone,</if>
|
||||
<if test="contactsType != null">contacts_type,</if>
|
||||
<if test="contactsEmail != null">contacts_email,</if>
|
||||
<if test="telephone != null">telephone,</if>
|
||||
<if test="nation != null">nation,</if>
|
||||
<if test="vat != null">vat,</if>
|
||||
<if test="taxpayerId != null">taxpayer_id,</if>
|
||||
<if test="currency != null">currency,</if>
|
||||
<if test="personName != null">person_name,</if>
|
||||
<if test="personPhone != null">person_phone,</if>
|
||||
<if test="personBank != null">person_bank,</if>
|
||||
<if test="personAccount != null">person_account,</if>
|
||||
<if test="remark != null">remark,</if>
|
||||
<if test="accessStatus != null">access_status,</if>
|
||||
<if test="blacklistStatus != null">blacklist_status,</if>
|
||||
<if test="greylistStatus != null">greylist_status,</if>
|
||||
<if test="fillinStatus != null">fillin_status,</if>
|
||||
<if test="fillinBy != null">fillin_by,</if>
|
||||
<if test="sapCode != null">sap_code,</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="supplierType != null">#{supplierType},</if>
|
||||
<if test="licenceAccessory != null">#{licenceAccessory},</if>
|
||||
<if test="licenceDate != null">#{licenceDate},</if>
|
||||
<if test="enterpriseType != null">#{enterpriseType},</if>
|
||||
<if test="name != null">#{name},</if>
|
||||
<if test="nameEn != null">#{nameEn},</if>
|
||||
<if test="socialCreditCode != null">#{socialCreditCode},</if>
|
||||
<if test="range != null">#{range},</if>
|
||||
<if test="regAddress != null">#{regAddress},</if>
|
||||
<if test="workAddress != null">#{workAddress},</if>
|
||||
<if test="parentCompanyInvestor != null">#{parentCompanyInvestor},</if>
|
||||
<if test="legalPerson != null">#{legalPerson},</if>
|
||||
<if test="idCard != null">#{idCard},</if>
|
||||
<if test="capital != null">#{capital},</if>
|
||||
<if test="contactsName != null">#{contactsName},</if>
|
||||
<if test="contactsPhone != null">#{contactsPhone},</if>
|
||||
<if test="contactsType != null">#{contactsType},</if>
|
||||
<if test="contactsEmail != null">#{contactsEmail},</if>
|
||||
<if test="telephone != null">#{telephone},</if>
|
||||
<if test="nation != null">#{nation},</if>
|
||||
<if test="vat != null">#{vat},</if>
|
||||
<if test="taxpayerId != null">#{taxpayerId},</if>
|
||||
<if test="currency != null">#{currency},</if>
|
||||
<if test="personName != null">#{personName},</if>
|
||||
<if test="personPhone != null">#{personPhone},</if>
|
||||
<if test="personBank != null">#{personBank},</if>
|
||||
<if test="personAccount != null">#{personAccount},</if>
|
||||
<if test="remark != null">#{remark},</if>
|
||||
<if test="accessStatus != null">#{accessStatus},</if>
|
||||
<if test="blacklistStatus != null">#{blacklistStatus},</if>
|
||||
<if test="greylistStatus != null">#{greylistStatus},</if>
|
||||
<if test="fillinStatus != null">#{fillinStatus},</if>
|
||||
<if test="fillinBy != null">#{fillinBy},</if>
|
||||
<if test="sapCode != null">#{sapCode},</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="batchCoscoSupplierBase" parameterType="java.util.List">
|
||||
insert into cosco_supplier_base
|
||||
( id, supplier_type, licence_accessory, licence_date, enterprise_type, name, name_en, social_credit_code, range, reg_address, work_address, parent_company_investor, legal_person, id_card, capital, contacts_name, contacts_phone, contacts_type, contacts_email, telephone, nation, vat, taxpayer_id, currency, person_name, person_phone, person_bank, person_account, remark, access_status, blacklist_status, greylist_status, fillin_status, fillin_by, sap_code, del_flag, create_by, create_time, update_by, update_time, last_update_time)
|
||||
values
|
||||
<foreach item="item" index="index" collection="list" separator=",">
|
||||
( #{item.id}, #{item.supplierType}, #{item.licenceAccessory}, #{item.licenceDate}, #{item.enterpriseType}, #{item.name}, #{item.nameEn}, #{item.socialCreditCode}, #{item.range}, #{item.regAddress}, #{item.workAddress}, #{item.parentCompanyInvestor}, #{item.legalPerson}, #{item.idCard}, #{item.capital}, #{item.contactsName}, #{item.contactsPhone}, #{item.contactsType}, #{item.contactsEmail}, #{item.telephone}, #{item.nation}, #{item.vat}, #{item.taxpayerId}, #{item.currency}, #{item.personName}, #{item.personPhone}, #{item.personBank}, #{item.personAccount}, #{item.remark}, #{item.accessStatus}, #{item.blacklistStatus}, #{item.greylistStatus}, #{item.fillinStatus}, #{item.fillinBy}, #{item.sapCode}, #{item.delFlag}, #{item.createBy}, #{item.createTime}, #{item.updateBy}, #{item.updateTime}, #{item.lastUpdateTime})
|
||||
</foreach>
|
||||
</insert>
|
||||
<update id="updateCoscoSupplierBase" parameterType="com.chinaunicom.zyhy.ebtp.supplier.coscosupplier.entity.CoscoSupplierBase">
|
||||
update cosco_supplier_base
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="supplierType != null">supplier_type =
|
||||
#{supplierType},
|
||||
</if>
|
||||
<if test="licenceAccessory != null">licence_accessory =
|
||||
#{licenceAccessory},
|
||||
</if>
|
||||
<if test="licenceDate != null">licence_date =
|
||||
#{licenceDate},
|
||||
</if>
|
||||
<if test="enterpriseType != null">enterprise_type =
|
||||
#{enterpriseType},
|
||||
</if>
|
||||
<if test="name != null">name =
|
||||
#{name},
|
||||
</if>
|
||||
<if test="nameEn != null">name_en =
|
||||
#{nameEn},
|
||||
</if>
|
||||
<if test="socialCreditCode != null">social_credit_code =
|
||||
#{socialCreditCode},
|
||||
</if>
|
||||
<if test="range != null">range =
|
||||
#{range},
|
||||
</if>
|
||||
<if test="regAddress != null">reg_address =
|
||||
#{regAddress},
|
||||
</if>
|
||||
<if test="workAddress != null">work_address =
|
||||
#{workAddress},
|
||||
</if>
|
||||
<if test="parentCompanyInvestor != null">parent_company_investor =
|
||||
#{parentCompanyInvestor},
|
||||
</if>
|
||||
<if test="legalPerson != null">legal_person =
|
||||
#{legalPerson},
|
||||
</if>
|
||||
<if test="idCard != null">id_card =
|
||||
#{idCard},
|
||||
</if>
|
||||
<if test="capital != null">capital =
|
||||
#{capital},
|
||||
</if>
|
||||
<if test="contactsName != null">contacts_name =
|
||||
#{contactsName},
|
||||
</if>
|
||||
<if test="contactsPhone != null">contacts_phone =
|
||||
#{contactsPhone},
|
||||
</if>
|
||||
<if test="contactsType != null">contacts_type =
|
||||
#{contactsType},
|
||||
</if>
|
||||
<if test="contactsEmail != null">contacts_email =
|
||||
#{contactsEmail},
|
||||
</if>
|
||||
<if test="telephone != null">telephone =
|
||||
#{telephone},
|
||||
</if>
|
||||
<if test="nation != null">nation =
|
||||
#{nation},
|
||||
</if>
|
||||
<if test="vat != null">vat =
|
||||
#{vat},
|
||||
</if>
|
||||
<if test="taxpayerId != null">taxpayer_id =
|
||||
#{taxpayerId},
|
||||
</if>
|
||||
<if test="currency != null">currency =
|
||||
#{currency},
|
||||
</if>
|
||||
<if test="personName != null">person_name =
|
||||
#{personName},
|
||||
</if>
|
||||
<if test="personPhone != null">person_phone =
|
||||
#{personPhone},
|
||||
</if>
|
||||
<if test="personBank != null">person_bank =
|
||||
#{personBank},
|
||||
</if>
|
||||
<if test="personAccount != null">person_account =
|
||||
#{personAccount},
|
||||
</if>
|
||||
<if test="remark != null">remark =
|
||||
#{remark},
|
||||
</if>
|
||||
<if test="accessStatus != null">access_status =
|
||||
#{accessStatus},
|
||||
</if>
|
||||
<if test="blacklistStatus != null">blacklist_status =
|
||||
#{blacklistStatus},
|
||||
</if>
|
||||
<if test="greylistStatus != null">greylist_status =
|
||||
#{greylistStatus},
|
||||
</if>
|
||||
<if test="fillinStatus != null">fillin_status =
|
||||
#{fillinStatus},
|
||||
</if>
|
||||
<if test="fillinBy != null">fillin_by =
|
||||
#{fillinBy},
|
||||
</if>
|
||||
<if test="sapCode != null">sap_code =
|
||||
#{sapCode},
|
||||
</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="deleteCoscoSupplierBaseById" parameterType="String">
|
||||
update cosco_supplier_base set del_flag = 2
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
<update id="deleteCoscoSupplierBaseByIds" parameterType="String">
|
||||
update cosco_supplier_base set del_flag = 2 where id in
|
||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</update>
|
||||
</mapper>
|
@ -0,0 +1,185 @@
|
||||
<?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.CoscoSupplierInvoiceMapper">
|
||||
|
||||
<resultMap type="com.chinaunicom.zyhy.ebtp.supplier.coscosupplier.entity.CoscoSupplierInvoice" id="CoscoSupplierInvoiceResult">
|
||||
<result property="id" column="id"/>
|
||||
<result property="supplierId" column="supplier_id"/>
|
||||
<result property="taxpayerType" column="taxpayer_type"/>
|
||||
<result property="taxpayerCode" column="taxpayer_code"/>
|
||||
<result property="phone" column="phone"/>
|
||||
<result property="account" column="account"/>
|
||||
<result property="head" column="head"/>
|
||||
<result property="address" column="address"/>
|
||||
<result property="bank" column="bank"/>
|
||||
<result property="qualificationCertificate" column="qualification_certificate"/>
|
||||
<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="selectCoscoSupplierInvoiceVo">
|
||||
select id, supplier_id, taxpayer_type, taxpayer_code, phone, account, head, address, bank, qualification_certificate, del_flag, create_by, create_time, update_by, update_time, last_update_time
|
||||
from cosco_supplier_invoice
|
||||
</sql>
|
||||
|
||||
<select id="selectCoscoSupplierInvoiceList" parameterType="com.chinaunicom.zyhy.ebtp.supplier.coscosupplier.entity.CoscoSupplierInvoice" resultMap="CoscoSupplierInvoiceResult">
|
||||
<include refid="selectCoscoSupplierInvoiceVo"/>
|
||||
<where>
|
||||
and del_flag = 'normal'
|
||||
<if test="supplierId != null and supplierId != ''">
|
||||
and supplier_id = #{supplierId}
|
||||
</if>
|
||||
<if test="taxpayerType != null and taxpayerType != ''">
|
||||
and taxpayer_type = #{taxpayerType}
|
||||
</if>
|
||||
<if test="taxpayerCode != null and taxpayerCode != ''">
|
||||
and taxpayer_code = #{taxpayerCode}
|
||||
</if>
|
||||
<if test="phone != null and phone != ''">
|
||||
and phone = #{phone}
|
||||
</if>
|
||||
<if test="account != null and account != ''">
|
||||
and account = #{account}
|
||||
</if>
|
||||
<if test="head != null and head != ''">
|
||||
and head = #{head}
|
||||
</if>
|
||||
<if test="address != null and address != ''">
|
||||
and address = #{address}
|
||||
</if>
|
||||
<if test="bank != null and bank != ''">
|
||||
and bank = #{bank}
|
||||
</if>
|
||||
<if test="qualificationCertificate != null and qualificationCertificate != ''">
|
||||
and qualification_certificate = #{qualificationCertificate}
|
||||
</if>
|
||||
<if test="lastUpdateTime != null ">
|
||||
and last_update_time = #{lastUpdateTime}
|
||||
</if>
|
||||
</where>
|
||||
order by create_time desc
|
||||
</select>
|
||||
|
||||
<select id="selectCoscoSupplierInvoiceById" parameterType="String"
|
||||
resultMap="CoscoSupplierInvoiceResult">
|
||||
<include refid="selectCoscoSupplierInvoiceVo"/>
|
||||
where id = #{id}
|
||||
</select>
|
||||
|
||||
<insert id="insertCoscoSupplierInvoice" parameterType="com.chinaunicom.zyhy.ebtp.supplier.coscosupplier.entity.CoscoSupplierInvoice">
|
||||
insert into cosco_supplier_invoice
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="id != null">id,</if>
|
||||
<if test="supplierId != null and supplierId != ''">supplier_id,</if>
|
||||
<if test="taxpayerType != null">taxpayer_type,</if>
|
||||
<if test="taxpayerCode != null">taxpayer_code,</if>
|
||||
<if test="phone != null">phone,</if>
|
||||
<if test="account != null">account,</if>
|
||||
<if test="head != null">head,</if>
|
||||
<if test="address != null">address,</if>
|
||||
<if test="bank != null">bank,</if>
|
||||
<if test="qualificationCertificate != null">qualification_certificate,</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="supplierId != null and supplierId != ''">#{supplierId},</if>
|
||||
<if test="taxpayerType != null">#{taxpayerType},</if>
|
||||
<if test="taxpayerCode != null">#{taxpayerCode},</if>
|
||||
<if test="phone != null">#{phone},</if>
|
||||
<if test="account != null">#{account},</if>
|
||||
<if test="head != null">#{head},</if>
|
||||
<if test="address != null">#{address},</if>
|
||||
<if test="bank != null">#{bank},</if>
|
||||
<if test="qualificationCertificate != null">#{qualificationCertificate},</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="batchCoscoSupplierInvoice" parameterType="java.util.List">
|
||||
insert into cosco_supplier_invoice
|
||||
( id, supplier_id, taxpayer_type, taxpayer_code, phone, account, head, address, bank, qualification_certificate, del_flag, create_by, create_time, update_by, update_time, last_update_time)
|
||||
values
|
||||
<foreach item="item" index="index" collection="list" separator=",">
|
||||
( #{item.id}, #{item.supplierId}, #{item.taxpayerType}, #{item.taxpayerCode}, #{item.phone}, #{item.account}, #{item.head}, #{item.address}, #{item.bank}, #{item.qualificationCertificate}, #{item.delFlag}, #{item.createBy}, #{item.createTime}, #{item.updateBy}, #{item.updateTime}, #{item.lastUpdateTime})
|
||||
</foreach>
|
||||
</insert>
|
||||
<update id="updateCoscoSupplierInvoice" parameterType="com.chinaunicom.zyhy.ebtp.supplier.coscosupplier.entity.CoscoSupplierInvoice">
|
||||
update cosco_supplier_invoice
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="supplierId != null and supplierId != ''">supplier_id =
|
||||
#{supplierId},
|
||||
</if>
|
||||
<if test="taxpayerType != null">taxpayer_type =
|
||||
#{taxpayerType},
|
||||
</if>
|
||||
<if test="taxpayerCode != null">taxpayer_code =
|
||||
#{taxpayerCode},
|
||||
</if>
|
||||
<if test="phone != null">phone =
|
||||
#{phone},
|
||||
</if>
|
||||
<if test="account != null">account =
|
||||
#{account},
|
||||
</if>
|
||||
<if test="head != null">head =
|
||||
#{head},
|
||||
</if>
|
||||
<if test="address != null">address =
|
||||
#{address},
|
||||
</if>
|
||||
<if test="bank != null">bank =
|
||||
#{bank},
|
||||
</if>
|
||||
<if test="qualificationCertificate != null">qualification_certificate =
|
||||
#{qualificationCertificate},
|
||||
</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="deleteCoscoSupplierInvoiceById" parameterType="String">
|
||||
update cosco_supplier_invoice set del_flag = 2
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
<update id="deleteCoscoSupplierInvoiceByIds" parameterType="String">
|
||||
update cosco_supplier_invoice set del_flag = 2 where id in
|
||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</update>
|
||||
</mapper>
|
@ -0,0 +1,185 @@
|
||||
<?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.CoscoSupplierQualificationsMapper">
|
||||
|
||||
<resultMap type="com.chinaunicom.zyhy.ebtp.supplier.coscosupplier.entity.CoscoSupplierQualifications" id="CoscoSupplierQualificationsResult">
|
||||
<result property="id" column="id"/>
|
||||
<result property="supplierId" column="supplier_id"/>
|
||||
<result property="certificateType" column="certificate_type"/>
|
||||
<result property="name" column="name"/>
|
||||
<result property="code" column="code"/>
|
||||
<result property="typeLevel" column="type_level"/>
|
||||
<result property="authority" column="authority"/>
|
||||
<result property="dateTime" column="date_time"/>
|
||||
<result property="termOfValidity" column="term_of_validity"/>
|
||||
<result property="accessory" column="accessory"/>
|
||||
<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="selectCoscoSupplierQualificationsVo">
|
||||
select id, supplier_id, certificate_type, name, code, type_level, authority, date_time, term_of_validity, accessory, del_flag, create_by, create_time, update_by, update_time, last_update_time
|
||||
from cosco_supplier_qualifications
|
||||
</sql>
|
||||
|
||||
<select id="selectCoscoSupplierQualificationsList" parameterType="com.chinaunicom.zyhy.ebtp.supplier.coscosupplier.entity.CoscoSupplierQualifications" resultMap="CoscoSupplierQualificationsResult">
|
||||
<include refid="selectCoscoSupplierQualificationsVo"/>
|
||||
<where>
|
||||
and del_flag = 'normal'
|
||||
<if test="supplierId != null and supplierId != ''">
|
||||
and supplier_id = #{supplierId}
|
||||
</if>
|
||||
<if test="certificateType != null and certificateType != ''">
|
||||
and certificate_type = #{certificateType}
|
||||
</if>
|
||||
<if test="name != null and name != ''">
|
||||
and name like concat('%', #{name}, '%')
|
||||
</if>
|
||||
<if test="code != null and code != ''">
|
||||
and code = #{code}
|
||||
</if>
|
||||
<if test="typeLevel != null and typeLevel != ''">
|
||||
and type_level = #{typeLevel}
|
||||
</if>
|
||||
<if test="authority != null and authority != ''">
|
||||
and authority = #{authority}
|
||||
</if>
|
||||
<if test="dateTime != null ">
|
||||
and date_time = #{dateTime}
|
||||
</if>
|
||||
<if test="termOfValidity != null ">
|
||||
and term_of_validity = #{termOfValidity}
|
||||
</if>
|
||||
<if test="accessory != null and accessory != ''">
|
||||
and accessory = #{accessory}
|
||||
</if>
|
||||
<if test="lastUpdateTime != null ">
|
||||
and last_update_time = #{lastUpdateTime}
|
||||
</if>
|
||||
</where>
|
||||
order by create_time desc
|
||||
</select>
|
||||
|
||||
<select id="selectCoscoSupplierQualificationsById" parameterType="String"
|
||||
resultMap="CoscoSupplierQualificationsResult">
|
||||
<include refid="selectCoscoSupplierQualificationsVo"/>
|
||||
where id = #{id}
|
||||
</select>
|
||||
|
||||
<insert id="insertCoscoSupplierQualifications" parameterType="com.chinaunicom.zyhy.ebtp.supplier.coscosupplier.entity.CoscoSupplierQualifications">
|
||||
insert into cosco_supplier_qualifications
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="id != null">id,</if>
|
||||
<if test="supplierId != null and supplierId != ''">supplier_id,</if>
|
||||
<if test="certificateType != null">certificate_type,</if>
|
||||
<if test="name != null">name,</if>
|
||||
<if test="code != null">code,</if>
|
||||
<if test="typeLevel != null">type_level,</if>
|
||||
<if test="authority != null">authority,</if>
|
||||
<if test="dateTime != null">date_time,</if>
|
||||
<if test="termOfValidity != null">term_of_validity,</if>
|
||||
<if test="accessory != null">accessory,</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="supplierId != null and supplierId != ''">#{supplierId},</if>
|
||||
<if test="certificateType != null">#{certificateType},</if>
|
||||
<if test="name != null">#{name},</if>
|
||||
<if test="code != null">#{code},</if>
|
||||
<if test="typeLevel != null">#{typeLevel},</if>
|
||||
<if test="authority != null">#{authority},</if>
|
||||
<if test="dateTime != null">#{dateTime},</if>
|
||||
<if test="termOfValidity != null">#{termOfValidity},</if>
|
||||
<if test="accessory != null">#{accessory},</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="batchCoscoSupplierQualifications" parameterType="java.util.List">
|
||||
insert into cosco_supplier_qualifications
|
||||
( id, supplier_id, certificate_type, name, code, type_level, authority, date_time, term_of_validity, accessory, del_flag, create_by, create_time, update_by, update_time, last_update_time)
|
||||
values
|
||||
<foreach item="item" index="index" collection="list" separator=",">
|
||||
( #{item.id}, #{item.supplierId}, #{item.certificateType}, #{item.name}, #{item.code}, #{item.typeLevel}, #{item.authority}, #{item.dateTime}, #{item.termOfValidity}, #{item.accessory}, #{item.delFlag}, #{item.createBy}, #{item.createTime}, #{item.updateBy}, #{item.updateTime}, #{item.lastUpdateTime})
|
||||
</foreach>
|
||||
</insert>
|
||||
<update id="updateCoscoSupplierQualifications" parameterType="com.chinaunicom.zyhy.ebtp.supplier.coscosupplier.entity.CoscoSupplierQualifications">
|
||||
update cosco_supplier_qualifications
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="supplierId != null and supplierId != ''">supplier_id =
|
||||
#{supplierId},
|
||||
</if>
|
||||
<if test="certificateType != null">certificate_type =
|
||||
#{certificateType},
|
||||
</if>
|
||||
<if test="name != null">name =
|
||||
#{name},
|
||||
</if>
|
||||
<if test="code != null">code =
|
||||
#{code},
|
||||
</if>
|
||||
<if test="typeLevel != null">type_level =
|
||||
#{typeLevel},
|
||||
</if>
|
||||
<if test="authority != null">authority =
|
||||
#{authority},
|
||||
</if>
|
||||
<if test="dateTime != null">date_time =
|
||||
#{dateTime},
|
||||
</if>
|
||||
<if test="termOfValidity != null">term_of_validity =
|
||||
#{termOfValidity},
|
||||
</if>
|
||||
<if test="accessory != null">accessory =
|
||||
#{accessory},
|
||||
</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="deleteCoscoSupplierQualificationsById" parameterType="String">
|
||||
update cosco_supplier_qualifications set del_flag = 2
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
<update id="deleteCoscoSupplierQualificationsByIds" parameterType="String">
|
||||
update cosco_supplier_qualifications set del_flag = 2 where id in
|
||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</update>
|
||||
</mapper>
|
@ -0,0 +1,167 @@
|
||||
<?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.CoscoSupplierSurveyAttachmentsMapper">
|
||||
|
||||
<resultMap type="com.chinaunicom.zyhy.ebtp.supplier.coscosupplier.entity.CoscoSupplierSurveyAttachments" id="CoscoSupplierSurveyAttachmentsResult">
|
||||
<result property="id" column="id"/>
|
||||
<result property="supplierId" column="supplier_id"/>
|
||||
<result property="attachmentsType" column="attachments_type"/>
|
||||
<result property="fileName" column="file_name"/>
|
||||
<result property="fileType" column="file_type"/>
|
||||
<result property="fileSize" column="file_size"/>
|
||||
<result property="filePath" column="file_path"/>
|
||||
<result property="fileUrl" column="file_url"/>
|
||||
<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="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
|
||||
</sql>
|
||||
|
||||
<select id="selectCoscoSupplierSurveyAttachmentsList" parameterType="com.chinaunicom.zyhy.ebtp.supplier.coscosupplier.entity.CoscoSupplierSurveyAttachments" resultMap="CoscoSupplierSurveyAttachmentsResult">
|
||||
<include refid="selectCoscoSupplierSurveyAttachmentsVo"/>
|
||||
<where>
|
||||
and del_flag = 'normal'
|
||||
<if test="supplierId != null and supplierId != ''">
|
||||
and supplier_id = #{supplierId}
|
||||
</if>
|
||||
<if test="attachmentsType != null and attachmentsType != ''">
|
||||
and attachments_type = #{attachmentsType}
|
||||
</if>
|
||||
<if test="fileName != null and fileName != ''">
|
||||
and file_name like concat('%', #{fileName}, '%')
|
||||
</if>
|
||||
<if test="fileType != null and fileType != ''">
|
||||
and file_type = #{fileType}
|
||||
</if>
|
||||
<if test="fileSize != null and fileSize != ''">
|
||||
and file_size = #{fileSize}
|
||||
</if>
|
||||
<if test="filePath != null and filePath != ''">
|
||||
and file_path = #{filePath}
|
||||
</if>
|
||||
<if test="fileUrl != null and fileUrl != ''">
|
||||
and file_url = #{fileUrl}
|
||||
</if>
|
||||
<if test="lastUpdateTime != null ">
|
||||
and last_update_time = #{lastUpdateTime}
|
||||
</if>
|
||||
</where>
|
||||
order by create_time desc
|
||||
</select>
|
||||
|
||||
<select id="selectCoscoSupplierSurveyAttachmentsById" parameterType="String"
|
||||
resultMap="CoscoSupplierSurveyAttachmentsResult">
|
||||
<include refid="selectCoscoSupplierSurveyAttachmentsVo"/>
|
||||
where id = #{id}
|
||||
</select>
|
||||
|
||||
<insert id="insertCoscoSupplierSurveyAttachments" parameterType="com.chinaunicom.zyhy.ebtp.supplier.coscosupplier.entity.CoscoSupplierSurveyAttachments">
|
||||
insert into cosco_supplier_survey_attachments
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="id != null">id,</if>
|
||||
<if test="supplierId != null and supplierId != ''">supplier_id,</if>
|
||||
<if test="attachmentsType != null and attachmentsType != ''">attachments_type,</if>
|
||||
<if test="fileName != null">file_name,</if>
|
||||
<if test="fileType != null">file_type,</if>
|
||||
<if test="fileSize != null">file_size,</if>
|
||||
<if test="filePath != null">file_path,</if>
|
||||
<if test="fileUrl != null">file_url,</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="supplierId != null and supplierId != ''">#{supplierId},</if>
|
||||
<if test="attachmentsType != null and attachmentsType != ''">#{attachmentsType},</if>
|
||||
<if test="fileName != null">#{fileName},</if>
|
||||
<if test="fileType != null">#{fileType},</if>
|
||||
<if test="fileSize != null">#{fileSize},</if>
|
||||
<if test="filePath != null">#{filePath},</if>
|
||||
<if test="fileUrl != null">#{fileUrl},</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="batchCoscoSupplierSurveyAttachments" parameterType="java.util.List">
|
||||
insert into cosco_supplier_survey_attachments
|
||||
( 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)
|
||||
values
|
||||
<foreach item="item" index="index" collection="list" separator=",">
|
||||
( #{item.id}, #{item.supplierId}, #{item.attachmentsType}, #{item.fileName}, #{item.fileType}, #{item.fileSize}, #{item.filePath}, #{item.fileUrl}, #{item.delFlag}, #{item.createBy}, #{item.createTime}, #{item.updateBy}, #{item.updateTime}, #{item.lastUpdateTime})
|
||||
</foreach>
|
||||
</insert>
|
||||
<update id="updateCoscoSupplierSurveyAttachments" parameterType="com.chinaunicom.zyhy.ebtp.supplier.coscosupplier.entity.CoscoSupplierSurveyAttachments">
|
||||
update cosco_supplier_survey_attachments
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="supplierId != null and supplierId != ''">supplier_id =
|
||||
#{supplierId},
|
||||
</if>
|
||||
<if test="attachmentsType != null and attachmentsType != ''">attachments_type =
|
||||
#{attachmentsType},
|
||||
</if>
|
||||
<if test="fileName != null">file_name =
|
||||
#{fileName},
|
||||
</if>
|
||||
<if test="fileType != null">file_type =
|
||||
#{fileType},
|
||||
</if>
|
||||
<if test="fileSize != null">file_size =
|
||||
#{fileSize},
|
||||
</if>
|
||||
<if test="filePath != null">file_path =
|
||||
#{filePath},
|
||||
</if>
|
||||
<if test="fileUrl != null">file_url =
|
||||
#{fileUrl},
|
||||
</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="deleteCoscoSupplierSurveyAttachmentsById" parameterType="String">
|
||||
update cosco_supplier_survey_attachments set del_flag = 2
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
<update id="deleteCoscoSupplierSurveyAttachmentsByIds" parameterType="String">
|
||||
update cosco_supplier_survey_attachments set del_flag = 2 where id in
|
||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</update>
|
||||
</mapper>
|
@ -0,0 +1,165 @@
|
||||
<?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.CoscoSupplierSurveyMapper">
|
||||
|
||||
<resultMap type="com.chinaunicom.zyhy.ebtp.supplier.coscosupplier.entity.CoscoSupplierSurvey" id="CoscoSupplierSurveyResult">
|
||||
<result property="id" column="id"/>
|
||||
<result property="supplierId" column="supplier_id"/>
|
||||
<result property="supplierName" column="supplier_name"/>
|
||||
<result property="name" column="name"/>
|
||||
<result property="position" column="position"/>
|
||||
<result property="phone" column="phone"/>
|
||||
<result property="email" column="email"/>
|
||||
<result property="dateTime" column="date_time"/>
|
||||
<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="selectCoscoSupplierSurveyVo">
|
||||
select id, supplier_id, supplier_name, name, position, phone, email, date_time, del_flag, create_by, create_time, update_by, update_time, last_update_time
|
||||
from cosco_supplier_survey
|
||||
</sql>
|
||||
|
||||
<select id="selectCoscoSupplierSurveyList" parameterType="com.chinaunicom.zyhy.ebtp.supplier.coscosupplier.entity.CoscoSupplierSurvey" resultMap="CoscoSupplierSurveyResult">
|
||||
<include refid="selectCoscoSupplierSurveyVo"/>
|
||||
<where>
|
||||
<if test="supplierId != null and supplierId != ''">
|
||||
and supplier_id = #{supplierId}
|
||||
</if>
|
||||
<if test="supplierName != null and supplierName != ''">
|
||||
and supplier_name like concat('%', #{supplierName}, '%')
|
||||
</if>
|
||||
<if test="name != null and name != ''">
|
||||
and name like concat('%', #{name}, '%')
|
||||
</if>
|
||||
<if test="position != null and position != ''">
|
||||
and position = #{position}
|
||||
</if>
|
||||
<if test="phone != null and phone != ''">
|
||||
and phone = #{phone}
|
||||
</if>
|
||||
<if test="email != null and email != ''">
|
||||
and email = #{email}
|
||||
</if>
|
||||
<if test="dateTime != null ">
|
||||
and date_time = #{dateTime}
|
||||
</if>
|
||||
<if test="lastUpdateTime != null ">
|
||||
and last_update_time = #{lastUpdateTime}
|
||||
</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectCoscoSupplierSurveyById" parameterType="String"
|
||||
resultMap="CoscoSupplierSurveyResult">
|
||||
<include refid="selectCoscoSupplierSurveyVo"/>
|
||||
where id = #{id}
|
||||
</select>
|
||||
|
||||
<insert id="insertCoscoSupplierSurvey" parameterType="com.chinaunicom.zyhy.ebtp.supplier.coscosupplier.entity.CoscoSupplierSurvey">
|
||||
insert into cosco_supplier_survey
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="id != null">id,</if>
|
||||
<if test="supplierId != null and supplierId != ''">supplier_id,</if>
|
||||
<if test="supplierName != null">supplier_name,</if>
|
||||
<if test="name != null">name,</if>
|
||||
<if test="position != null">position,</if>
|
||||
<if test="phone != null">phone,</if>
|
||||
<if test="email != null">email,</if>
|
||||
<if test="dateTime != null">date_time,</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="supplierId != null and supplierId != ''">#{supplierId},</if>
|
||||
<if test="supplierName != null">#{supplierName},</if>
|
||||
<if test="name != null">#{name},</if>
|
||||
<if test="position != null">#{position},</if>
|
||||
<if test="phone != null">#{phone},</if>
|
||||
<if test="email != null">#{email},</if>
|
||||
<if test="dateTime != null">#{dateTime},</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="batchCoscoSupplierSurvey" parameterType="java.util.List">
|
||||
insert into cosco_supplier_survey
|
||||
( id, supplier_id, supplier_name, name, position, phone, email, date_time, del_flag, create_by, create_time, update_by, update_time, last_update_time)
|
||||
values
|
||||
<foreach item="item" index="index" collection="list" separator=",">
|
||||
( #{item.id}, #{item.supplierId}, #{item.supplierName}, #{item.name}, #{item.position}, #{item.phone}, #{item.email}, #{item.dateTime}, #{item.delFlag}, #{item.createBy}, #{item.createTime}, #{item.updateBy}, #{item.updateTime}, #{item.lastUpdateTime})
|
||||
</foreach>
|
||||
</insert>
|
||||
<update id="updateCoscoSupplierSurvey" parameterType="com.chinaunicom.zyhy.ebtp.supplier.coscosupplier.entity.CoscoSupplierSurvey">
|
||||
update cosco_supplier_survey
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="supplierId != null and supplierId != ''">supplier_id =
|
||||
#{supplierId},
|
||||
</if>
|
||||
<if test="supplierName != null">supplier_name =
|
||||
#{supplierName},
|
||||
</if>
|
||||
<if test="name != null">name =
|
||||
#{name},
|
||||
</if>
|
||||
<if test="position != null">position =
|
||||
#{position},
|
||||
</if>
|
||||
<if test="phone != null">phone =
|
||||
#{phone},
|
||||
</if>
|
||||
<if test="email != null">email =
|
||||
#{email},
|
||||
</if>
|
||||
<if test="dateTime != null">date_time =
|
||||
#{dateTime},
|
||||
</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="deleteCoscoSupplierSurveyById" parameterType="String">
|
||||
update cosco_supplier_survey set del_flag = 2
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
<update id="deleteCoscoSupplierSurveyByIds" parameterType="String">
|
||||
update cosco_supplier_survey set del_flag = 2 where id in
|
||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</update>
|
||||
</mapper>
|
@ -0,0 +1,129 @@
|
||||
<?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.CoscoSupplierSurveyQuestionReplyMapper">
|
||||
|
||||
<resultMap type="com.chinaunicom.zyhy.ebtp.supplier.coscosupplier.entity.CoscoSupplierSurveyQuestionReply" id="CoscoSupplierSurveyQuestionReplyResult">
|
||||
<result property="id" column="id"/>
|
||||
<result property="supplierId" column="supplier_id"/>
|
||||
<result property="surveyQuestionId" column="survey_question_id"/>
|
||||
<result property="replyValue" column="reply_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="selectCoscoSupplierSurveyQuestionReplyVo">
|
||||
select id, supplier_id, survey_question_id, reply_value, del_flag, create_by, create_time, update_by, update_time, last_update_time
|
||||
from cosco_supplier_survey_question_reply
|
||||
</sql>
|
||||
|
||||
<select id="selectCoscoSupplierSurveyQuestionReplyList" parameterType="com.chinaunicom.zyhy.ebtp.supplier.coscosupplier.entity.CoscoSupplierSurveyQuestionReply" resultMap="CoscoSupplierSurveyQuestionReplyResult">
|
||||
<include refid="selectCoscoSupplierSurveyQuestionReplyVo"/>
|
||||
<where>
|
||||
<if test="supplierId != null and supplierId != ''">
|
||||
and supplier_id = #{supplierId}
|
||||
</if>
|
||||
<if test="surveyQuestionId != null and surveyQuestionId != ''">
|
||||
and survey_question_id = #{surveyQuestionId}
|
||||
</if>
|
||||
<if test="replyValue != null and replyValue != ''">
|
||||
and reply_value = #{replyValue}
|
||||
</if>
|
||||
<if test="lastUpdateTime != null ">
|
||||
and last_update_time = #{lastUpdateTime}
|
||||
</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectCoscoSupplierSurveyQuestionReplyById" parameterType="String"
|
||||
resultMap="CoscoSupplierSurveyQuestionReplyResult">
|
||||
<include refid="selectCoscoSupplierSurveyQuestionReplyVo"/>
|
||||
where id = #{id}
|
||||
</select>
|
||||
|
||||
<insert id="insertCoscoSupplierSurveyQuestionReply" parameterType="com.chinaunicom.zyhy.ebtp.supplier.coscosupplier.entity.CoscoSupplierSurveyQuestionReply">
|
||||
insert into cosco_supplier_survey_question_reply
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="id != null">id,</if>
|
||||
<if test="supplierId != null and supplierId != ''">supplier_id,</if>
|
||||
<if test="surveyQuestionId != null and surveyQuestionId != ''">survey_question_id,</if>
|
||||
<if test="replyValue != null and replyValue != ''">reply_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="supplierId != null and supplierId != ''">#{supplierId},</if>
|
||||
<if test="surveyQuestionId != null and surveyQuestionId != ''">#{surveyQuestionId},</if>
|
||||
<if test="replyValue != null and replyValue != ''">#{replyValue},</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="batchCoscoSupplierSurveyQuestionReply" parameterType="java.util.List">
|
||||
insert into cosco_supplier_survey_question_reply
|
||||
( id, supplier_id, survey_question_id, reply_value, del_flag, create_by, create_time, update_by, update_time, last_update_time)
|
||||
values
|
||||
<foreach item="item" index="index" collection="list" separator=",">
|
||||
( #{item.id}, #{item.supplierId}, #{item.surveyQuestionId}, #{item.replyValue}, #{item.delFlag}, #{item.createBy}, #{item.createTime}, #{item.updateBy}, #{item.updateTime}, #{item.lastUpdateTime})
|
||||
</foreach>
|
||||
</insert>
|
||||
<update id="updateCoscoSupplierSurveyQuestionReply" parameterType="com.chinaunicom.zyhy.ebtp.supplier.coscosupplier.entity.CoscoSupplierSurveyQuestionReply">
|
||||
update cosco_supplier_survey_question_reply
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="supplierId != null and supplierId != ''">supplier_id =
|
||||
#{supplierId},
|
||||
</if>
|
||||
<if test="surveyQuestionId != null and surveyQuestionId != ''">survey_question_id =
|
||||
#{surveyQuestionId},
|
||||
</if>
|
||||
<if test="replyValue != null and replyValue != ''">reply_value =
|
||||
#{replyValue},
|
||||
</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="deleteCoscoSupplierSurveyQuestionReplyById" parameterType="String">
|
||||
update cosco_supplier_survey_question_reply set del_flag = 2
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
<update id="deleteCoscoSupplierSurveyQuestionReplyByIds" parameterType="String">
|
||||
update cosco_supplier_survey_question_reply set del_flag = 2 where id in
|
||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</update>
|
||||
</mapper>
|
@ -0,0 +1,315 @@
|
||||
<?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.CoscoSupplierTianyanchaIcMapper">
|
||||
|
||||
<resultMap type="com.chinaunicom.zyhy.ebtp.supplier.coscosupplier.entity.CoscoSupplierTianyanchaIc" id="CoscoSupplierTianyanchaIcResult">
|
||||
<result property="id" column="id"/>
|
||||
<result property="supplierId" column="supplier_id"/>
|
||||
<result property="tianyanchaIcId" column="tianyancha_ic_id"/>
|
||||
<result property="base" column="base"/>
|
||||
<result property="name" column="name"/>
|
||||
<result property="legalPersonName" column="legal_person_name"/>
|
||||
<result property="legalPersonType" column="legal_person_type"/>
|
||||
<result property="regNumber" column="reg_number"/>
|
||||
<result property="industry" column="industry"/>
|
||||
<result property="companyOrgType" column="company_org_type"/>
|
||||
<result property="regLocation" column="reg_location"/>
|
||||
<result property="estiblishTime" column="estiblish_time"/>
|
||||
<result property="fromTime" column="from_time"/>
|
||||
<result property="toTime" column="to_time"/>
|
||||
<result property="businessScope" column="business_scope"/>
|
||||
<result property="approvedTime" column="approved_time"/>
|
||||
<result property="regStatus" column="reg_status"/>
|
||||
<result property="regCapital" column="reg_capital"/>
|
||||
<result property="regInstitute" column="reg_institute"/>
|
||||
<result property="orgNumber" column="org_number"/>
|
||||
<result property="creditCode" column="credit_code"/>
|
||||
<result property="property3" column="property3"/>
|
||||
<result property="updatetime" column="updatetime"/>
|
||||
<result property="companyId" column="company_id"/>
|
||||
<result property="taxNumber" column="tax_number"/>
|
||||
<result property="email" column="email"/>
|
||||
<result property="website" column="website"/>
|
||||
<result property="phoneNumber" column="phone_number"/>
|
||||
<result property="lastUpdateTime" column="last_update_time"/>
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectCoscoSupplierTianyanchaIcVo">
|
||||
select id, supplier_id, tianyancha_ic_id, base, name, legal_person_name, legal_person_type, reg_number, industry, company_org_type, reg_location, estiblish_time, from_time, to_time, business_scope, approved_time, reg_status, reg_capital, reg_institute, org_number, credit_code, property3, updatetime, company_id, tax_number, email, website, phone_number, last_update_time
|
||||
from cosco_supplier_tianyancha_ic
|
||||
</sql>
|
||||
|
||||
<select id="selectCoscoSupplierTianyanchaIcList" parameterType="com.chinaunicom.zyhy.ebtp.supplier.coscosupplier.entity.CoscoSupplierTianyanchaIc" resultMap="CoscoSupplierTianyanchaIcResult">
|
||||
<include refid="selectCoscoSupplierTianyanchaIcVo"/>
|
||||
<where>
|
||||
<if test="supplierId != null and supplierId != ''">
|
||||
and supplier_id = #{supplierId}
|
||||
</if>
|
||||
<if test="tianyanchaIcId != null and tianyanchaIcId != ''">
|
||||
and tianyancha_ic_id = #{tianyanchaIcId}
|
||||
</if>
|
||||
<if test="base != null and base != ''">
|
||||
and base = #{base}
|
||||
</if>
|
||||
<if test="name != null and name != ''">
|
||||
and name like concat('%', #{name}, '%')
|
||||
</if>
|
||||
<if test="legalPersonName != null and legalPersonName != ''">
|
||||
and legal_person_name like concat('%', #{legalPersonName}, '%')
|
||||
</if>
|
||||
<if test="legalPersonType != null and legalPersonType != ''">
|
||||
and legal_person_type = #{legalPersonType}
|
||||
</if>
|
||||
<if test="regNumber != null and regNumber != ''">
|
||||
and reg_number = #{regNumber}
|
||||
</if>
|
||||
<if test="industry != null and industry != ''">
|
||||
and industry = #{industry}
|
||||
</if>
|
||||
<if test="companyOrgType != null and companyOrgType != ''">
|
||||
and company_org_type = #{companyOrgType}
|
||||
</if>
|
||||
<if test="regLocation != null and regLocation != ''">
|
||||
and reg_location = #{regLocation}
|
||||
</if>
|
||||
<if test="estiblishTime != null and estiblishTime != ''">
|
||||
and estiblish_time = #{estiblishTime}
|
||||
</if>
|
||||
<if test="fromTime != null and fromTime != ''">
|
||||
and from_time = #{fromTime}
|
||||
</if>
|
||||
<if test="toTime != null and toTime != ''">
|
||||
and to_time = #{toTime}
|
||||
</if>
|
||||
<if test="businessScope != null and businessScope != ''">
|
||||
and business_scope = #{businessScope}
|
||||
</if>
|
||||
<if test="approvedTime != null and approvedTime != ''">
|
||||
and approved_time = #{approvedTime}
|
||||
</if>
|
||||
<if test="regStatus != null and regStatus != ''">
|
||||
and reg_status = #{regStatus}
|
||||
</if>
|
||||
<if test="regCapital != null and regCapital != ''">
|
||||
and reg_capital = #{regCapital}
|
||||
</if>
|
||||
<if test="regInstitute != null and regInstitute != ''">
|
||||
and reg_institute = #{regInstitute}
|
||||
</if>
|
||||
<if test="orgNumber != null and orgNumber != ''">
|
||||
and org_number = #{orgNumber}
|
||||
</if>
|
||||
<if test="creditCode != null and creditCode != ''">
|
||||
and credit_code = #{creditCode}
|
||||
</if>
|
||||
<if test="property3 != null and property3 != ''">
|
||||
and property3 = #{property3}
|
||||
</if>
|
||||
<if test="updatetime != null and updatetime != ''">
|
||||
and updatetime = #{updatetime}
|
||||
</if>
|
||||
<if test="companyId != null and companyId != ''">
|
||||
and company_id = #{companyId}
|
||||
</if>
|
||||
<if test="taxNumber != null and taxNumber != ''">
|
||||
and tax_number = #{taxNumber}
|
||||
</if>
|
||||
<if test="email != null and email != ''">
|
||||
and email = #{email}
|
||||
</if>
|
||||
<if test="website != null and website != ''">
|
||||
and website = #{website}
|
||||
</if>
|
||||
<if test="phoneNumber != null and phoneNumber != ''">
|
||||
and phone_number = #{phoneNumber}
|
||||
</if>
|
||||
<if test="lastUpdateTime != null ">
|
||||
and last_update_time = #{lastUpdateTime}
|
||||
</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectCoscoSupplierTianyanchaIcById" parameterType="String"
|
||||
resultMap="CoscoSupplierTianyanchaIcResult">
|
||||
<include refid="selectCoscoSupplierTianyanchaIcVo"/>
|
||||
where id = #{id}
|
||||
</select>
|
||||
|
||||
<insert id="insertCoscoSupplierTianyanchaIc" parameterType="com.chinaunicom.zyhy.ebtp.supplier.coscosupplier.entity.CoscoSupplierTianyanchaIc">
|
||||
insert into cosco_supplier_tianyancha_ic
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="id != null">id,</if>
|
||||
<if test="supplierId != null">supplier_id,</if>
|
||||
<if test="tianyanchaIcId != null and tianyanchaIcId != ''">tianyancha_ic_id,</if>
|
||||
<if test="base != null">base,</if>
|
||||
<if test="name != null and name != ''">name,</if>
|
||||
<if test="legalPersonName != null">legal_person_name,</if>
|
||||
<if test="legalPersonType != null">legal_person_type,</if>
|
||||
<if test="regNumber != null">reg_number,</if>
|
||||
<if test="industry != null">industry,</if>
|
||||
<if test="companyOrgType != null">company_org_type,</if>
|
||||
<if test="regLocation != null">reg_location,</if>
|
||||
<if test="estiblishTime != null">estiblish_time,</if>
|
||||
<if test="fromTime != null">from_time,</if>
|
||||
<if test="toTime != null">to_time,</if>
|
||||
<if test="businessScope != null">business_scope,</if>
|
||||
<if test="approvedTime != null">approved_time,</if>
|
||||
<if test="regStatus != null">reg_status,</if>
|
||||
<if test="regCapital != null">reg_capital,</if>
|
||||
<if test="regInstitute != null">reg_institute,</if>
|
||||
<if test="orgNumber != null">org_number,</if>
|
||||
<if test="creditCode != null">credit_code,</if>
|
||||
<if test="property3 != null">property3,</if>
|
||||
<if test="updatetime != null">updatetime,</if>
|
||||
<if test="companyId != null">company_id,</if>
|
||||
<if test="taxNumber != null">tax_number,</if>
|
||||
<if test="email != null">email,</if>
|
||||
<if test="website != null">website,</if>
|
||||
<if test="phoneNumber != null">phone_number,</if>
|
||||
<if test="lastUpdateTime != null">last_update_time,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="id != null">#{id},</if>
|
||||
<if test="supplierId != null">#{supplierId},</if>
|
||||
<if test="tianyanchaIcId != null and tianyanchaIcId != ''">#{tianyanchaIcId},</if>
|
||||
<if test="base != null">#{base},</if>
|
||||
<if test="name != null and name != ''">#{name},</if>
|
||||
<if test="legalPersonName != null">#{legalPersonName},</if>
|
||||
<if test="legalPersonType != null">#{legalPersonType},</if>
|
||||
<if test="regNumber != null">#{regNumber},</if>
|
||||
<if test="industry != null">#{industry},</if>
|
||||
<if test="companyOrgType != null">#{companyOrgType},</if>
|
||||
<if test="regLocation != null">#{regLocation},</if>
|
||||
<if test="estiblishTime != null">#{estiblishTime},</if>
|
||||
<if test="fromTime != null">#{fromTime},</if>
|
||||
<if test="toTime != null">#{toTime},</if>
|
||||
<if test="businessScope != null">#{businessScope},</if>
|
||||
<if test="approvedTime != null">#{approvedTime},</if>
|
||||
<if test="regStatus != null">#{regStatus},</if>
|
||||
<if test="regCapital != null">#{regCapital},</if>
|
||||
<if test="regInstitute != null">#{regInstitute},</if>
|
||||
<if test="orgNumber != null">#{orgNumber},</if>
|
||||
<if test="creditCode != null">#{creditCode},</if>
|
||||
<if test="property3 != null">#{property3},</if>
|
||||
<if test="updatetime != null">#{updatetime},</if>
|
||||
<if test="companyId != null">#{companyId},</if>
|
||||
<if test="taxNumber != null">#{taxNumber},</if>
|
||||
<if test="email != null">#{email},</if>
|
||||
<if test="website != null">#{website},</if>
|
||||
<if test="phoneNumber != null">#{phoneNumber},</if>
|
||||
<if test="lastUpdateTime != null">#{lastUpdateTime},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
<insert id="batchCoscoSupplierTianyanchaIc" parameterType="java.util.List">
|
||||
insert into cosco_supplier_tianyancha_ic
|
||||
( id, supplier_id, tianyancha_ic_id, base, name, legal_person_name, legal_person_type, reg_number, industry, company_org_type, reg_location, estiblish_time, from_time, to_time, business_scope, approved_time, reg_status, reg_capital, reg_institute, org_number, credit_code, property3, updatetime, company_id, tax_number, email, website, phone_number, last_update_time)
|
||||
values
|
||||
<foreach item="item" index="index" collection="list" separator=",">
|
||||
( #{item.id}, #{item.supplierId}, #{item.tianyanchaIcId}, #{item.base}, #{item.name}, #{item.legalPersonName}, #{item.legalPersonType}, #{item.regNumber}, #{item.industry}, #{item.companyOrgType}, #{item.regLocation}, #{item.estiblishTime}, #{item.fromTime}, #{item.toTime}, #{item.businessScope}, #{item.approvedTime}, #{item.regStatus}, #{item.regCapital}, #{item.regInstitute}, #{item.orgNumber}, #{item.creditCode}, #{item.property3}, #{item.updatetime}, #{item.companyId}, #{item.taxNumber}, #{item.email}, #{item.website}, #{item.phoneNumber}, #{item.lastUpdateTime})
|
||||
</foreach>
|
||||
</insert>
|
||||
<update id="updateCoscoSupplierTianyanchaIc" parameterType="com.chinaunicom.zyhy.ebtp.supplier.coscosupplier.entity.CoscoSupplierTianyanchaIc">
|
||||
update cosco_supplier_tianyancha_ic
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="supplierId != null">supplier_id =
|
||||
#{supplierId},
|
||||
</if>
|
||||
<if test="tianyanchaIcId != null and tianyanchaIcId != ''">tianyancha_ic_id =
|
||||
#{tianyanchaIcId},
|
||||
</if>
|
||||
<if test="base != null">base =
|
||||
#{base},
|
||||
</if>
|
||||
<if test="name != null and name != ''">name =
|
||||
#{name},
|
||||
</if>
|
||||
<if test="legalPersonName != null">legal_person_name =
|
||||
#{legalPersonName},
|
||||
</if>
|
||||
<if test="legalPersonType != null">legal_person_type =
|
||||
#{legalPersonType},
|
||||
</if>
|
||||
<if test="regNumber != null">reg_number =
|
||||
#{regNumber},
|
||||
</if>
|
||||
<if test="industry != null">industry =
|
||||
#{industry},
|
||||
</if>
|
||||
<if test="companyOrgType != null">company_org_type =
|
||||
#{companyOrgType},
|
||||
</if>
|
||||
<if test="regLocation != null">reg_location =
|
||||
#{regLocation},
|
||||
</if>
|
||||
<if test="estiblishTime != null">estiblish_time =
|
||||
#{estiblishTime},
|
||||
</if>
|
||||
<if test="fromTime != null">from_time =
|
||||
#{fromTime},
|
||||
</if>
|
||||
<if test="toTime != null">to_time =
|
||||
#{toTime},
|
||||
</if>
|
||||
<if test="businessScope != null">business_scope =
|
||||
#{businessScope},
|
||||
</if>
|
||||
<if test="approvedTime != null">approved_time =
|
||||
#{approvedTime},
|
||||
</if>
|
||||
<if test="regStatus != null">reg_status =
|
||||
#{regStatus},
|
||||
</if>
|
||||
<if test="regCapital != null">reg_capital =
|
||||
#{regCapital},
|
||||
</if>
|
||||
<if test="regInstitute != null">reg_institute =
|
||||
#{regInstitute},
|
||||
</if>
|
||||
<if test="orgNumber != null">org_number =
|
||||
#{orgNumber},
|
||||
</if>
|
||||
<if test="creditCode != null">credit_code =
|
||||
#{creditCode},
|
||||
</if>
|
||||
<if test="property3 != null">property3 =
|
||||
#{property3},
|
||||
</if>
|
||||
<if test="updatetime != null">updatetime =
|
||||
#{updatetime},
|
||||
</if>
|
||||
<if test="companyId != null">company_id =
|
||||
#{companyId},
|
||||
</if>
|
||||
<if test="taxNumber != null">tax_number =
|
||||
#{taxNumber},
|
||||
</if>
|
||||
<if test="email != null">email =
|
||||
#{email},
|
||||
</if>
|
||||
<if test="website != null">website =
|
||||
#{website},
|
||||
</if>
|
||||
<if test="phoneNumber != null">phone_number =
|
||||
#{phoneNumber},
|
||||
</if>
|
||||
<if test="lastUpdateTime != null">last_update_time =
|
||||
#{lastUpdateTime},
|
||||
</if>
|
||||
</trim>
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
<update id="deleteCoscoSupplierTianyanchaIcById" parameterType="String">
|
||||
update cosco_supplier_tianyancha_ic set del_flag = 2
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
<update id="deleteCoscoSupplierTianyanchaIcByIds" parameterType="String">
|
||||
update cosco_supplier_tianyancha_ic set del_flag = 2 where id in
|
||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</update>
|
||||
</mapper>
|
@ -0,0 +1,128 @@
|
||||
<?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.CoscoSurveyQuestionMapper">
|
||||
|
||||
<resultMap type="com.chinaunicom.zyhy.ebtp.supplier.coscosupplier.entity.CoscoSurveyQuestion" id="CoscoSurveyQuestionResult">
|
||||
<result property="id" column="id"/>
|
||||
<result property="questionName" column="question_name"/>
|
||||
<result property="orderBy" column="order_by"/>
|
||||
<result property="remark" column="remark"/>
|
||||
<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="selectCoscoSurveyQuestionVo">
|
||||
select id, question_name, order_by, remark, del_flag, create_by, create_time, update_by, update_time, last_update_time
|
||||
from cosco_survey_question
|
||||
</sql>
|
||||
|
||||
<select id="selectCoscoSurveyQuestionList" parameterType="com.chinaunicom.zyhy.ebtp.supplier.coscosupplier.entity.CoscoSurveyQuestion" resultMap="CoscoSurveyQuestionResult">
|
||||
<include refid="selectCoscoSurveyQuestionVo"/>
|
||||
<where>
|
||||
and del_flag = 'normal'
|
||||
<if test="questionName != null and questionName != ''">
|
||||
and question_name like concat('%', #{questionName}, '%')
|
||||
</if>
|
||||
<if test="orderBy != null ">
|
||||
and order_by = #{orderBy}
|
||||
</if>
|
||||
<if test="lastUpdateTime != null ">
|
||||
and last_update_time = #{lastUpdateTime}
|
||||
</if>
|
||||
</where>
|
||||
order by create_time desc
|
||||
</select>
|
||||
|
||||
<select id="selectCoscoSurveyQuestionById" parameterType="String"
|
||||
resultMap="CoscoSurveyQuestionResult">
|
||||
<include refid="selectCoscoSurveyQuestionVo"/>
|
||||
where id = #{id}
|
||||
</select>
|
||||
|
||||
<insert id="insertCoscoSurveyQuestion" parameterType="com.chinaunicom.zyhy.ebtp.supplier.coscosupplier.entity.CoscoSurveyQuestion">
|
||||
insert into cosco_survey_question
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="id != null">id,</if>
|
||||
<if test="questionName != null and questionName != ''">question_name,</if>
|
||||
<if test="orderBy != null">order_by,</if>
|
||||
<if test="remark != null">remark,</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="questionName != null and questionName != ''">#{questionName},</if>
|
||||
<if test="orderBy != null">#{orderBy},</if>
|
||||
<if test="remark != null">#{remark},</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="batchCoscoSurveyQuestion" parameterType="java.util.List">
|
||||
insert into cosco_survey_question
|
||||
( id, question_name, order_by, remark, del_flag, create_by, create_time, update_by, update_time, last_update_time)
|
||||
values
|
||||
<foreach item="item" index="index" collection="list" separator=",">
|
||||
( #{item.id}, #{item.questionName}, #{item.orderBy}, #{item.remark}, #{item.delFlag}, #{item.createBy}, #{item.createTime}, #{item.updateBy}, #{item.updateTime}, #{item.lastUpdateTime})
|
||||
</foreach>
|
||||
</insert>
|
||||
<update id="updateCoscoSurveyQuestion" parameterType="com.chinaunicom.zyhy.ebtp.supplier.coscosupplier.entity.CoscoSurveyQuestion">
|
||||
update cosco_survey_question
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="questionName != null and questionName != ''">question_name =
|
||||
#{questionName},
|
||||
</if>
|
||||
<if test="orderBy != null">order_by =
|
||||
#{orderBy},
|
||||
</if>
|
||||
<if test="remark != null">remark =
|
||||
#{remark},
|
||||
</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="deleteCoscoSurveyQuestionById" parameterType="String">
|
||||
update cosco_survey_question set del_flag = 2
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
<update id="deleteCoscoSurveyQuestionByIds" parameterType="String">
|
||||
update cosco_survey_question set del_flag = 2 where id in
|
||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</update>
|
||||
</mapper>
|
@ -0,0 +1,140 @@
|
||||
<?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.CoscoSurveyQuestionOptionMapper">
|
||||
|
||||
<resultMap type="com.chinaunicom.zyhy.ebtp.supplier.coscosupplier.entity.CoscoSurveyQuestionOption" id="CoscoSurveyQuestionOptionResult">
|
||||
<result property="id" column="id"/>
|
||||
<result property="surveyQuestionId" column="survey_question_id"/>
|
||||
<result property="optionName" column="option_name"/>
|
||||
<result property="opentionValue" column="opention_value"/>
|
||||
<result property="orderBy" column="order_by"/>
|
||||
<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="selectCoscoSurveyQuestionOptionVo">
|
||||
select id, survey_question_id, option_name, opention_value, order_by, del_flag, create_by, create_time, update_by, update_time, last_update_time
|
||||
from cosco_survey_question_option
|
||||
</sql>
|
||||
|
||||
<select id="selectCoscoSurveyQuestionOptionList" parameterType="com.chinaunicom.zyhy.ebtp.supplier.coscosupplier.entity.CoscoSurveyQuestionOption" resultMap="CoscoSurveyQuestionOptionResult">
|
||||
<include refid="selectCoscoSurveyQuestionOptionVo"/>
|
||||
<where>
|
||||
and del_flag = 'normal'
|
||||
<if test="surveyQuestionId != null and surveyQuestionId != ''">
|
||||
and survey_question_id = #{surveyQuestionId}
|
||||
</if>
|
||||
<if test="optionName != null and optionName != ''">
|
||||
and option_name like concat('%', #{optionName}, '%')
|
||||
</if>
|
||||
<if test="opentionValue != null and opentionValue != ''">
|
||||
and opention_value = #{opentionValue}
|
||||
</if>
|
||||
<if test="orderBy != null ">
|
||||
and order_by = #{orderBy}
|
||||
</if>
|
||||
<if test="lastUpdateTime != null ">
|
||||
and last_update_time = #{lastUpdateTime}
|
||||
</if>
|
||||
</where>
|
||||
order by create_time desc
|
||||
</select>
|
||||
|
||||
<select id="selectCoscoSurveyQuestionOptionById" parameterType="String"
|
||||
resultMap="CoscoSurveyQuestionOptionResult">
|
||||
<include refid="selectCoscoSurveyQuestionOptionVo"/>
|
||||
where id = #{id}
|
||||
</select>
|
||||
|
||||
<insert id="insertCoscoSurveyQuestionOption" parameterType="com.chinaunicom.zyhy.ebtp.supplier.coscosupplier.entity.CoscoSurveyQuestionOption">
|
||||
insert into cosco_survey_question_option
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="id != null">id,</if>
|
||||
<if test="surveyQuestionId != null and surveyQuestionId != ''">survey_question_id,</if>
|
||||
<if test="optionName != null and optionName != ''">option_name,</if>
|
||||
<if test="opentionValue != null and opentionValue != ''">opention_value,</if>
|
||||
<if test="orderBy != null">order_by,</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="surveyQuestionId != null and surveyQuestionId != ''">#{surveyQuestionId},</if>
|
||||
<if test="optionName != null and optionName != ''">#{optionName},</if>
|
||||
<if test="opentionValue != null and opentionValue != ''">#{opentionValue},</if>
|
||||
<if test="orderBy != null">#{orderBy},</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="batchCoscoSurveyQuestionOption" parameterType="java.util.List">
|
||||
insert into cosco_survey_question_option
|
||||
( id, survey_question_id, option_name, opention_value, order_by, del_flag, create_by, create_time, update_by, update_time, last_update_time)
|
||||
values
|
||||
<foreach item="item" index="index" collection="list" separator=",">
|
||||
( #{item.id}, #{item.surveyQuestionId}, #{item.optionName}, #{item.opentionValue}, #{item.orderBy}, #{item.delFlag}, #{item.createBy}, #{item.createTime}, #{item.updateBy}, #{item.updateTime}, #{item.lastUpdateTime})
|
||||
</foreach>
|
||||
</insert>
|
||||
<update id="updateCoscoSurveyQuestionOption" parameterType="com.chinaunicom.zyhy.ebtp.supplier.coscosupplier.entity.CoscoSurveyQuestionOption">
|
||||
update cosco_survey_question_option
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="surveyQuestionId != null and surveyQuestionId != ''">survey_question_id =
|
||||
#{surveyQuestionId},
|
||||
</if>
|
||||
<if test="optionName != null and optionName != ''">option_name =
|
||||
#{optionName},
|
||||
</if>
|
||||
<if test="opentionValue != null and opentionValue != ''">opention_value =
|
||||
#{opentionValue},
|
||||
</if>
|
||||
<if test="orderBy != null">order_by =
|
||||
#{orderBy},
|
||||
</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="deleteCoscoSurveyQuestionOptionById" parameterType="String">
|
||||
update cosco_survey_question_option set del_flag = 2
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
<update id="deleteCoscoSurveyQuestionOptionByIds" parameterType="String">
|
||||
update cosco_survey_question_option set del_flag = 2 where id in
|
||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</update>
|
||||
</mapper>
|
Reference in New Issue
Block a user