From 869edb425d2e931d756c756c16ee5b3f42ee027a Mon Sep 17 00:00:00 2001
From: zf <1603559716@qq.com>
Date: Fri, 04 Aug 2023 13:49:20 +0800
Subject: [PATCH] bug修改
---
src/main/java/com/gk/hotwork/Mapper/mybatis/SafetySelfInspectionMapper.xml | 23 ++++++++++++++++++-----
1 files changed, 18 insertions(+), 5 deletions(-)
diff --git a/src/main/java/com/gk/hotwork/Mapper/mybatis/SafetySelfInspectionMapper.xml b/src/main/java/com/gk/hotwork/Mapper/mybatis/SafetySelfInspectionMapper.xml
index c3ec6c8..ec4215d 100644
--- a/src/main/java/com/gk/hotwork/Mapper/mybatis/SafetySelfInspectionMapper.xml
+++ b/src/main/java/com/gk/hotwork/Mapper/mybatis/SafetySelfInspectionMapper.xml
@@ -14,7 +14,7 @@
<result column="inspection_name" property="inspectionName" jdbcType="BIGINT" />
<result column="inspection_time" property="inspectionTime" jdbcType="BIGINT" />
- <result column="inspector" property="inspector" jdbcType="VARCHAR" />
+ <result column="inspector" property="inspector" jdbcType="BIGINT" />
<result column="status" property="status" jdbcType="VARCHAR" />
<result column="inspector_name" property="inspectorName" jdbcType="VARCHAR" />
@@ -25,15 +25,19 @@
from safety_self_inspection as a
left join user as b on a.inspector = b.id and b.isdel = 0
LEFT JOIN userroles as c on b.id = c.userid
+ left join company as co on a.checked_company_id = co.id
where a.valid_flag = 1
+ <if test="params.flag != null and params.flag != '' ">
+ and a.flag = #{params.flag}
+ </if>
<if test="params.inspectionName != null and params.inspectionName != ''">
and a.inspection_name like concat("%",#{params.inspectionName},"%")
</if>
- <if test="params.companyid != null and params.companyid != ''">
- and b.companyid = #{params.companyid}
- </if>
<if test="params.checkedCompanyId != null">
- and b.checkedCompanyId = #{params.checkedCompanyId}
+ and a.checked_company_id = #{params.checkedCompanyId}
+ </if>
+ <if test="params.checkedCompanyName != null and params.checkedCompanyName != ''">
+ and a.checked_company_name like concat("%",#{params.checkedCompanyName},"%")
</if>
<if test="params.roleid != null ">
and c.roleid = #{params.roleid}
@@ -47,6 +51,15 @@
<if test="params.inspectionEndTime != null and params.inspectionEndTime != ''" >
and a.inspection_time <![CDATA[ <= ]]> #{params.inspectionEndTime}
</if>
+ <if test="params.province != null and params.province != ''" >
+ and co.province = #{params.province}
+ </if>
+ <if test="params.city != null and params.city != ''" >
+ and co.city = #{params.city}
+ </if>
+ <if test="params.area != null and params.area != ''" >
+ and co.area = #{params.area}
+ </if>
order by a.create_time desc
</select>
--
Gitblit v1.9.2