Merge remote-tracking branch 'origin/dev' into dev

This commit is contained in:
efren
2025-06-27 15:37:47 +08:00
97 changed files with 1039 additions and 368 deletions

View File

@ -75,6 +75,8 @@
END AS access_type_text,
w.start_time,
w.end_time,
w.review_status,
w.approve_status,
CASE
WHEN w.review_status = 0 THEN '未开始'
WHEN w.review_status = 1 THEN '进行中'
@ -140,6 +142,8 @@
</if>
</where>
GROUP BY
w.review_status,
w.approve_status,
w.id,
w.access_work_name,
w.dept_id,
@ -154,6 +158,7 @@
w.update_by,
w.update_time,
w.last_update_time
order by w.create_time desc
</select>
@ -196,6 +201,8 @@
</if>
</where>
GROUP BY
w.review_status,
w.approve_status,
w.id,
w.access_work_name,
w.dept_id,
@ -210,6 +217,7 @@
w.update_by,
w.update_time,
w.last_update_time
order by w.create_time desc
</select>
@ -256,6 +264,8 @@
</if>
</where>
GROUP BY
w.review_status,
w.approve_status,
w.id,
w.access_work_name,
w.dept_id,
@ -270,6 +280,7 @@
w.update_by,
w.update_time,
w.last_update_time
order by w.create_time desc
</select>

View File

@ -15,32 +15,40 @@
</resultMap>
<sql id="selectCoscoMessageVo">
select id, receiver_id, content, read, type, create_time, update_time
from cosco_message
SELECT
m.id,
m.receiver_id,
m.content,
m.`read`,
m.type,
m.create_time,
m.update_time
FROM
cosco_message m
</sql>
<select id="selectCoscoMessageList" parameterType="com.chinaunicom.zyhy.ebtp.supplier.coscosupplier.entity.CoscoMessage" resultMap="CoscoMessageResult">
<include refid="selectCoscoMessageVo"/>
<where>
<if test="receiverId != null and receiverId != ''">
and receiver_id = #{receiverId}
</if>
<if test="content != null and content != ''">
and content = #{content}
</if>
<if test="read != null ">
and read = #{read}
</if>
<if test="type != null and type != ''">
and type = #{type}
</if>
<if test="vo.receiverId != null and vo.receiverId != ''">
and m.receiver_id = #{vo.receiverId}
</if>
<if test="vo.content != null and vo.content != ''">
and m.content = #{vo.content}
</if>
<if test="vo.read != null ">
and m.`read` = #{vo.read}
</if>
<if test="vo.type != null and vo.type != ''">
and m.type = #{vo.type}
</if>
</where>
</select>
<select id="selectCoscoMessageById" parameterType="String"
resultMap="CoscoMessageResult">
<include refid="selectCoscoMessageVo"/>
where id = #{id}
where m.id = #{id}
</select>
<insert id="insertCoscoMessage" parameterType="com.chinaunicom.zyhy.ebtp.supplier.coscosupplier.entity.CoscoMessage">
@ -81,7 +89,7 @@
<if test="content != null and content != ''">content =
#{content},
</if>
<if test="read != null">read =
<if test="read != null">`read` =
#{read},
</if>
<if test="type != null">type =
@ -94,7 +102,7 @@
#{updateTime},
</if>
</trim>
where id = #{id}
where receiver_id = #{receiverId}
</update>
<update id="deleteCoscoMessageById" parameterType="String">

View File

@ -125,6 +125,32 @@
cosco_supplier_base
</sql>
<sql id="selectMySupplierBaseVo">
SELECT
GROUP_CONCAT(DISTINCT cc.category_name SEPARATOR ', ') AS categoryName,
CASE supplier_type
WHEN 'dvs' THEN '境内企业'
WHEN 'ovs' THEN '境外企业'
WHEN 'pe' THEN '个人'
END AS supplier_type_cn,
csb.enterprise_type,
cas.id,
cas.access_work_id,
cas.supplier_id,
csb.`name`,
caw.update_time
FROM
cosco_access_supplier cas
LEFT JOIN cosco_access_work caw ON cas.access_work_id = caw.id
LEFT JOIN cosco_supplier_base csb ON cas.supplier_id = csb.id
left join cosco_access_supplier_category casc on csb.id = casc.supplier_id and casc.del_flag = 'normal'
left join cosco_category cc on casc.category_id = cc.id and cc.del_flag = 'normal'
</sql>
<select id="selectPageList" parameterType="com.chinaunicom.zyhy.ebtp.supplier.coscosupplier.entity.CoscoSupplierBase" resultMap="CoscoSupplierBaseResult">
<include refid="selectCoscoSupplierBaseVo"/>
<where>
@ -239,6 +265,129 @@
</select>
<select id="getMySupplierBasePage" parameterType="com.chinaunicom.zyhy.ebtp.supplier.coscosupplier.entity.CoscoSupplierBase" resultMap="CoscoSupplierBaseResult">
<include refid="selectMySupplierBaseVo"/>
<where>
AND caw.apply_type = '0'
<if test="vo.createBy != null and vo.createBy != ''">
and caw.create_by = #{vo.createBy}
</if>
<if test="vo.categoryId != null and vo.categoryId != ''">
and cc.id = #{vo.categoryId}
</if>
<if test="vo.deptId != null and vo.deptId != ''">
and csb.dept_id = #{vo.deptId}
</if>
<if test="vo.supplierType != null and vo.supplierType != ''">
and csb.supplier_type = #{vo.supplierType}
</if>
<if test="vo.enterpriseType != null and vo.enterpriseType != ''">
and csb.enterprise_type = #{vo.enterpriseType}
</if>
<if test="vo.name != null and vo.name != ''">
and csb.`name` like concat('%', #{vo.name}, '%')
</if>
<if test="vo.nameEn != null and vo.nameEn != ''">
and csb.name_en = #{vo.nameEn}
</if>
<if test="vo.socialCreditCode != null and vo.socialCreditCode != ''">
and csb.social_credit_code = #{vo.socialCreditCode}
</if>
<if test="vo.accessStatus != null ">
and csb.access_status = #{vo.accessStatus}
</if>
<if test="vo.blacklistStatus != null ">
and csb.blacklist_status = #{vo.blacklistStatus}
</if>
<if test="vo.greylistStatus != null ">
and csb.greylist_status = #{vo.greylistStatus}
</if>
<if test="vo.fillinStatus != null ">
and csb.fillin_status = #{vo.fillinStatus}
</if>
<if test="vo.fillinBy != null and vo.fillinBy != ''">
and csb.fillin_by = #{vo.fillinBy}
</if>
<if test="vo.sapCode != null and vo.sapCode != ''">
and csb.sap_code = #{vo.sapCode}
</if>
<if test="vo.lastUpdateTime != null ">
and csb.last_update_time = #{vo.lastUpdateTime}
</if>
</where>
GROUP BY
cas.id,
cas.access_work_id,
cas.supplier_id,
csb.`name`,
caw.update_time ,
csb.enterprise_type
order by csb.create_time desc
</select>
<select id="getMySupplierBaseList" parameterType="com.chinaunicom.zyhy.ebtp.supplier.coscosupplier.entity.CoscoSupplierBase" resultMap="CoscoSupplierBaseResult">
<include refid="selectMySupplierBaseVo"/>
<where>
AND caw.apply_type = '0'
<if test="createBy != null and createBy != ''">
and caw.create_by = #{createBy}
</if>
<if test="categoryId != null and categoryId != ''">
and cc.id = #{categoryId}
</if>
<if test="deptId != null and deptId != ''">
and csb.dept_id = #{deptId}
</if>
<if test="supplierType != null and supplierType != ''">
and csb.supplier_type = #{supplierType}
</if>
<if test="enterpriseType != null and enterpriseType != ''">
and csb.enterprise_type = #{enterpriseType}
</if>
<if test="name != null and name != ''">
and csb.`name` like concat('%', #{name}, '%')
</if>
<if test="nameEn != null and nameEn != ''">
and csb.name_en = #{nameEn}
</if>
<if test="socialCreditCode != null and socialCreditCode != ''">
and csb.social_credit_code = #{socialCreditCode}
</if>
<if test="accessStatus != null ">
and csb.access_status = #{accessStatus}
</if>
<if test="blacklistStatus != null ">
and csb.blacklist_status = #{blacklistStatus}
</if>
<if test="greylistStatus != null ">
and csb.greylist_status = #{greylistStatus}
</if>
<if test="fillinStatus != null ">
and csb.fillin_status = #{fillinStatus}
</if>
<if test="fillinBy != null and fillinBy != ''">
and csb.fillin_by = #{fillinBy}
</if>
<if test="sapCode != null and sapCode != ''">
and csb.sap_code = #{sapCode}
</if>
<if test="lastUpdateTime != null ">
and csb.last_update_time = #{lastUpdateTime}
</if>
</where>
GROUP BY
cas.id,
cas.access_work_id,
cas.supplier_id,
csb.`name`,
caw.update_time ,
csb.enterprise_type
order by csb.create_time desc
</select>
<select id="selectCoscoSupplierBaseList" parameterType="com.chinaunicom.zyhy.ebtp.supplier.coscosupplier.entity.CoscoSupplierBase" resultMap="CoscoSupplierBaseResult">
<include refid="selectCoscoSupplierBaseVo"/>
<where>
@ -682,8 +831,15 @@
GROUP BY
casc.supplier_id
) category_info ON category_info.supplier_id = csb.id
WHERE
cas.access_status = 1
<if test="vo.name != null and vo.name != ''">
and csb.name like concat('%', #{vo.name}, '%')
</if>
<if test="vo.supplierType != null and vo.supplierType != ''">
and csb.supplier_type = #{vo.supplierType}
</if>
AND csb.del_flag = 'normal'
<if test="vo.deptList != null and vo.deptList.size > 0">
AND cas.dept_id IN
@ -707,6 +863,7 @@
</foreach>
</if>
)
GROUP BY
csb.id

View File

@ -23,7 +23,9 @@
SELECT
id,
exit_theme,
exit_reason,
dept_id,
approve_status,
CASE
WHEN approve_status = 0 THEN '待审批'
WHEN approve_status = 1 THEN '通过'