ソースを参照

添加查询条件

黄远 5 年 前
コミット
d5cc48c45c

+ 5 - 0
lift-business-service/src/main/java/cn/com/ty/lift/business/maintenance/dao/entity/model/request/MtRecordRequest.java

@@ -90,4 +90,9 @@ public class MtRecordRequest extends PageRequest {
      * 维保记录id集合
      */
     private String recordIds;
+
+    /**
+     * 注册代码/自定义编号
+     */
+    private String liftCodeQuery;
 }

+ 4 - 0
lift-business-service/src/main/resources/mapper/maintenance/MaintenanceRecordMapper.xml

@@ -247,6 +247,10 @@
             <if test="cond.workDate != null">
                 AND mr.work_date = #{cond.workDate}
             </if>
+            <if test="cond.liftCodeQuery != null and cond.liftCodeQuery != ''">
+                AND li.registration_code like '%${liftCodeQuery}%'
+                OR li.custom_number like '%${liftCodeQuery}%'
+            </if>
     </select>
 
     <!--日常保养-保养单:根据条件汇总条数-->

+ 9 - 5
lift-system-service/src/main/resources/mapper/UserAccountMapper.xml

@@ -58,9 +58,13 @@
 
     <!-- 查询物业用户列表查询条件 -->
     <sql id="projectUserQueryCondition">
-        from project_user
+        from
+            project_user
         where
-        mt_company_id = #{companyId}
+            mt_company_id = #{companyId}
+        <if test = "projectId != null">
+            and project_id = #{projectId}
+        </if>
         <if test="userIdList != null">
             and user_id in
             <foreach item="item" index="index" collection="userIdList" open="(" separator="," close=")">
@@ -76,9 +80,9 @@
     <select id="getProjectUserList" parameterType="cn.com.ty.lift.system.user.dao.entity.model.PropertyUserRequest"
             resultType="cn.com.ty.lift.system.user.dao.entity.model.ProjectUser">
         select
-        project_id as projectId,
-        user_id as userId,
-        user_role as userRole
+            project_id as projectId,
+            user_id as userId,
+            user_role as userRole
         <include refid="projectUserQueryCondition"/>
         limit #{pageNum}, #{pageSize}
     </select>