|
@@ -49,7 +49,6 @@
|
|
|
<!--条件查询资产任务列表-->
|
|
|
<select id="selectPage" resultType="com.dayou.vo.AssetsVO">
|
|
|
SELECT DISTINCT
|
|
|
-# (@i := @i + 1) AS id,
|
|
|
nodeInfo.recordId AS id,
|
|
|
assets.id AS assetsId,
|
|
|
assets.name,
|
|
@@ -115,8 +114,7 @@
|
|
|
user,
|
|
|
post,
|
|
|
department,
|
|
|
- user_post ,
|
|
|
- work_task_record AS record
|
|
|
+ user_post
|
|
|
WHERE
|
|
|
user.id = user_post.user_id
|
|
|
AND user_post.post_id = post.id
|
|
@@ -151,34 +149,35 @@
|
|
|
#{item}
|
|
|
</foreach>
|
|
|
)
|
|
|
- AND (department.userId = assets.principal_id OR department.userId = assets.client_manager_id)
|
|
|
+ AND (department.userId = assets.principal_id OR department.userId = assets.client_manager_id OR department.userId = nodeInfo.handlerId)
|
|
|
</if>
|
|
|
WHERE assets.deleted = 0
|
|
|
AND nodeInfo.state = 'PENDING'
|
|
|
- #评估业务类别(业务类型)查询
|
|
|
<if test="assetsSelectDTO != null and assetsSelectDTO.assetsBusinessGener != null and assetsSelectDTO.assetsBusinessGener != '' ">
|
|
|
+ # 评估业务类别(业务类型)查询
|
|
|
AND assets.assets_business_gener = #{assetsSelectDTO.assetsBusinessGener}
|
|
|
</if>
|
|
|
- #项目负责人查询
|
|
|
<if test="assetsSelectDTO != null and assetsSelectDTO.principalId != null">
|
|
|
+ # 项目负责人查询
|
|
|
AND assets.principal_id = #{assetsSelectDTO.principalId}
|
|
|
</if>
|
|
|
- #客户经理查询
|
|
|
<if test="assetsSelectDTO != null and assetsSelectDTO.clientManagerId != null">
|
|
|
+ #客户经理查询
|
|
|
AND assets.client_manager_id = #{assetsSelectDTO.clientManagerId}
|
|
|
</if>
|
|
|
- #关键字模糊查询
|
|
|
<if test="assetsSelectDTO != null and assetsSelectDTO.keyWord != null and assetsSelectDTO.keyWord != '' ">
|
|
|
+ # 关键字模糊查询
|
|
|
AND (
|
|
|
assets.order_id LIKE CONCAT('%',#{assetsSelectDTO.keyWord},'%') OR
|
|
|
assets.name LIKE CONCAT('%',#{assetsSelectDTO.keyWord},'%') OR
|
|
|
nodeInfo.business_sub_id LIKE CONCAT('%',#{assetsSelectDTO.keyWord},'%') OR
|
|
|
nodeInfo.business_min_id LIKE CONCAT('%',#{assetsSelectDTO.keyWord},'%') OR
|
|
|
- customer.name LIKE CONCAT('%',#{assetsSelectDTO.keyWord},'%')
|
|
|
+ customer.name LIKE CONCAT('%',#{assetsSelectDTO.keyWord},'%') OR
|
|
|
+ (SELECT assets_name FROM assets_production WHERE assets_production.production_no = nodeInfo.business_min_id AND business_id = nodeInfo.businessId) LIKE CONCAT('%',#{assetsSelectDTO.keyWord},'%')
|
|
|
)
|
|
|
</if>
|
|
|
- # 根据处理节点查询(节点code)
|
|
|
<if test="assetsSelectDTO != null and assetsSelectDTO.nodeCode != null and assetsSelectDTO.nodeCode != '' ">
|
|
|
+ # 根据处理节点查询(节点code)
|
|
|
AND nodeInfo.currentNodeCode = #{assetsSelectDTO.nodeCode}
|
|
|
</if>
|
|
|
<if test="assetsSelectDTO != null and assetsSelectDTO.handlerId != null ">
|
|
@@ -765,18 +764,6 @@
|
|
|
AND id = #{userId}
|
|
|
</select>
|
|
|
|
|
|
- <!--通过客户经理id获取下单部门-->
|
|
|
- <select id="getManagerDepId" resultType="java.lang.Long">
|
|
|
- SELECT post.department_id
|
|
|
- FROM user,user_post,post
|
|
|
- WHERE user.id = user_post.user_id
|
|
|
- AND user_post.post_id = post.id
|
|
|
- AND user_post.deleted = 0
|
|
|
- AND post.deleted = 0
|
|
|
- AND user.id = #{managerId}
|
|
|
- LIMIT 1
|
|
|
- </select>
|
|
|
-
|
|
|
<!--获取资产下单部门-->
|
|
|
<select id="getMarkeDepartment" resultType="com.dayou.entity.Department">
|
|
|
SELECT department.id,department.name
|