搜索bug处理
parent
253f559ba5
commit
8446811b6f
|
@ -1,65 +1,65 @@
|
||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?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">
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||||
<mapper namespace="com.zcloud.mapper.datasource.bus.ShiftWorkRulesMapper">
|
<mapper namespace="com.zcloud.mapper.datasource.bus.ShiftWorkRulesMapper">
|
||||||
|
|
||||||
<!--表名 -->
|
<!--表名 -->
|
||||||
<sql id="tableName">
|
<sql id="tableName">
|
||||||
BUS_SHIFTWORKRULES
|
BUS_SHIFTWORKRULES
|
||||||
</sql>
|
</sql>
|
||||||
|
|
||||||
<!--数据字典表名 -->
|
<!--数据字典表名 -->
|
||||||
<sql id="dicTableName">
|
<sql id="dicTableName">
|
||||||
SYS_DICTIONARIES
|
SYS_DICTIONARIES
|
||||||
</sql>
|
</sql>
|
||||||
|
|
||||||
<!-- 字段 -->
|
<!-- 字段 -->
|
||||||
<sql id="Field">
|
<sql id="Field">
|
||||||
f.NAME,
|
f.NAME,
|
||||||
f.CORPINFO_ID,
|
f.CORPINFO_ID,
|
||||||
f.CREATOR,
|
f.CREATOR,
|
||||||
f.CREATTIME,
|
f.CREATTIME,
|
||||||
f.OPERATOR,
|
f.OPERATOR,
|
||||||
f.OPERATTIME,
|
f.OPERATTIME,
|
||||||
f.ISDELETE,
|
f.ISDELETE,
|
||||||
f.PARENTID,
|
f.PARENTID,
|
||||||
f.LEVEL,
|
f.LEVEL,
|
||||||
f.ISCUSTOM,
|
f.ISCUSTOM,
|
||||||
f.SHIFTWORKRULES_ID
|
f.SHIFTWORKRULES_ID
|
||||||
</sql>
|
</sql>
|
||||||
|
|
||||||
<!-- 字段用于新增 -->
|
<!-- 字段用于新增 -->
|
||||||
<sql id="Field2">
|
<sql id="Field2">
|
||||||
NAME,
|
NAME,
|
||||||
CORPINFO_ID,
|
CORPINFO_ID,
|
||||||
CREATOR,
|
CREATOR,
|
||||||
CREATTIME,
|
CREATTIME,
|
||||||
OPERATOR,
|
OPERATOR,
|
||||||
OPERATTIME,
|
OPERATTIME,
|
||||||
ISDELETE,
|
ISDELETE,
|
||||||
PARENTID,
|
PARENTID,
|
||||||
LEVEL,
|
LEVEL,
|
||||||
ISCUSTOM,
|
ISCUSTOM,
|
||||||
SHIFTWORKRULES_ID
|
SHIFTWORKRULES_ID
|
||||||
</sql>
|
</sql>
|
||||||
|
|
||||||
<!-- 字段值 -->
|
<!-- 字段值 -->
|
||||||
<sql id="FieldValue">
|
<sql id="FieldValue">
|
||||||
#{NAME},
|
#{NAME},
|
||||||
#{CORPINFO_ID},
|
#{CORPINFO_ID},
|
||||||
#{CREATOR},
|
#{CREATOR},
|
||||||
#{CREATTIME},
|
#{CREATTIME},
|
||||||
#{OPERATOR},
|
#{OPERATOR},
|
||||||
#{OPERATTIME},
|
#{OPERATTIME},
|
||||||
#{ISDELETE},
|
#{ISDELETE},
|
||||||
#{PARENTID},
|
#{PARENTID},
|
||||||
#{LEVEL},
|
#{LEVEL},
|
||||||
#{ISCUSTOM},
|
#{ISCUSTOM},
|
||||||
#{SHIFTWORKRULES_ID}
|
#{SHIFTWORKRULES_ID}
|
||||||
</sql>
|
</sql>
|
||||||
|
|
||||||
<!-- 新增-->
|
<!-- 新增-->
|
||||||
<insert id="save" parameterType="pd">
|
<insert id="save" parameterType="pd">
|
||||||
insert into
|
insert into
|
||||||
<include refid="tableName"></include>
|
<include refid="tableName"></include>
|
||||||
(
|
(
|
||||||
<include refid="Field2"></include>
|
<include refid="Field2"></include>
|
||||||
|
@ -67,7 +67,7 @@
|
||||||
<include refid="FieldValue"></include>
|
<include refid="FieldValue"></include>
|
||||||
)
|
)
|
||||||
</insert>
|
</insert>
|
||||||
|
|
||||||
<!-- 删除-->
|
<!-- 删除-->
|
||||||
<delete id="delete" parameterType="pd">
|
<delete id="delete" parameterType="pd">
|
||||||
update
|
update
|
||||||
|
@ -76,10 +76,10 @@
|
||||||
ISDELETE = '1',
|
ISDELETE = '1',
|
||||||
OPERATOR = #{OPERATOR},
|
OPERATOR = #{OPERATOR},
|
||||||
OPERATTIME = #{OPERATTIME}
|
OPERATTIME = #{OPERATTIME}
|
||||||
where
|
where
|
||||||
SHIFTWORKRULES_ID = #{SHIFTWORKRULES_ID}
|
SHIFTWORKRULES_ID = #{SHIFTWORKRULES_ID}
|
||||||
</delete>
|
</delete>
|
||||||
|
|
||||||
<!-- 删除-->
|
<!-- 删除-->
|
||||||
<delete id="deleteByPar" parameterType="pd">
|
<delete id="deleteByPar" parameterType="pd">
|
||||||
update
|
update
|
||||||
|
@ -88,15 +88,15 @@
|
||||||
ISDELETE = '1',
|
ISDELETE = '1',
|
||||||
OPERATOR = #{OPERATOR},
|
OPERATOR = #{OPERATOR},
|
||||||
OPERATTIME = #{OPERATTIME}
|
OPERATTIME = #{OPERATTIME}
|
||||||
where
|
where
|
||||||
PARENTID = #{PARENTID}
|
PARENTID = #{PARENTID}
|
||||||
</delete>
|
</delete>
|
||||||
|
|
||||||
<!-- 修改 -->
|
<!-- 修改 -->
|
||||||
<update id="edit" parameterType="pd">
|
<update id="edit" parameterType="pd">
|
||||||
update
|
update
|
||||||
<include refid="tableName"></include>
|
<include refid="tableName"></include>
|
||||||
set
|
set
|
||||||
<if test="NAME != null and NAME != ''"><!-- 关键词检索 -->
|
<if test="NAME != null and NAME != ''"><!-- 关键词检索 -->
|
||||||
NAME = #{NAME},
|
NAME = #{NAME},
|
||||||
</if>
|
</if>
|
||||||
|
@ -109,56 +109,57 @@
|
||||||
<if test="OPERATTIME != null and OPERATTIME != ''"><!-- 关键词检索 -->
|
<if test="OPERATTIME != null and OPERATTIME != ''"><!-- 关键词检索 -->
|
||||||
OPERATTIME = #{OPERATTIME},
|
OPERATTIME = #{OPERATTIME},
|
||||||
</if>
|
</if>
|
||||||
|
|
||||||
SHIFTWORKRULES_ID = SHIFTWORKRULES_ID
|
SHIFTWORKRULES_ID = SHIFTWORKRULES_ID
|
||||||
where
|
where
|
||||||
SHIFTWORKRULES_ID = #{SHIFTWORKRULES_ID}
|
SHIFTWORKRULES_ID = #{SHIFTWORKRULES_ID}
|
||||||
</update>
|
</update>
|
||||||
|
|
||||||
<!-- 通过ID获取数据 -->
|
<!-- 通过ID获取数据 -->
|
||||||
<select id="findById" parameterType="pd" resultType="pd">
|
<select id="findById" parameterType="pd" resultType="pd">
|
||||||
select
|
select
|
||||||
<include refid="Field"></include>
|
<include refid="Field"></include>
|
||||||
from
|
from
|
||||||
<include refid="tableName"></include> f
|
<include refid="tableName"></include> f
|
||||||
where
|
where
|
||||||
f.SHIFTWORKRULES_ID = #{SHIFTWORKRULES_ID}
|
f.SHIFTWORKRULES_ID = #{SHIFTWORKRULES_ID}
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<!-- 列表 -->
|
<!-- 列表 -->
|
||||||
<select id="datalistPage" parameterType="page" resultType="pd">
|
<select id="datalistPage" parameterType="page" resultType="pd">
|
||||||
select
|
select
|
||||||
<include refid="Field"></include>
|
<include refid="Field"></include>
|
||||||
from
|
from
|
||||||
<include refid="tableName"></include> f
|
<include refid="tableName"></include> f
|
||||||
where f.ISDELETE = '0'
|
where f.ISDELETE = '0'
|
||||||
<if test="pd.KEYWORDS != null and pd.KEYWORDS != ''"><!-- 关键词检索 -->
|
<if test="pd.KEYWORDS != null and pd.KEYWORDS != ''"><!-- 关键词检索 -->
|
||||||
and
|
and
|
||||||
(
|
(
|
||||||
|
NAME LIKE CONCAT(CONCAT('%', #{pd.KEYWORDS}),'%')
|
||||||
<!-- 根据需求自己加检索条件
|
<!-- 根据需求自己加检索条件
|
||||||
字段1 LIKE CONCAT(CONCAT('%', #{pd.KEYWORDS}),'%')
|
字段1 LIKE CONCAT(CONCAT('%', #{pd.KEYWORDS}),'%')
|
||||||
or
|
or
|
||||||
字段2 LIKE CONCAT(CONCAT('%', #{pd.KEYWORDS}),'%')
|
字段2 LIKE CONCAT(CONCAT('%', #{pd.KEYWORDS}),'%')
|
||||||
-->
|
-->
|
||||||
)
|
)
|
||||||
</if>
|
</if>
|
||||||
<if test="pd.PARENTID != null and pd.PARENTID != ''"><!-- 关键词检索 -->
|
<if test="pd.PARENTID != null and pd.PARENTID != ''"><!-- 关键词检索 -->
|
||||||
and f.PARENTID = #{pd.PARENTID}
|
and f.PARENTID = #{pd.PARENTID}
|
||||||
</if>
|
</if>
|
||||||
<if test="pd.CORPINFO_ID != null and pd.CORPINFO_ID != ''"><!-- 关键词检索 -->
|
<if test="pd.CORPINFO_ID != null and pd.CORPINFO_ID != ''"><!-- 关键词检索 -->
|
||||||
and f.CORPINFO_ID = #{pd.CORPINFO_ID}
|
and f.CORPINFO_ID = #{pd.CORPINFO_ID}
|
||||||
</if>
|
</if>
|
||||||
<if test="pd.LEVEL != null and pd.LEVEL != ''"><!-- 关键词检索 -->
|
<if test="pd.LEVEL != null and pd.LEVEL != ''"><!-- 关键词检索 -->
|
||||||
and f.LEVEL = #{pd.LEVEL}
|
and f.LEVEL = #{pd.LEVEL}
|
||||||
</if>
|
</if>
|
||||||
|
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<!-- 列表(全部) -->
|
<!-- 列表(全部) -->
|
||||||
<select id="listAll" parameterType="pd" resultType="pd">
|
<select id="listAll" parameterType="pd" resultType="pd">
|
||||||
SELECT
|
SELECT
|
||||||
<include refid="Field"></include>
|
<include refid="Field"></include>
|
||||||
FROM
|
FROM
|
||||||
<include refid="tableName"></include> f
|
<include refid="tableName"></include> f
|
||||||
WHERE f.ISDELETE = '0'
|
WHERE f.ISDELETE = '0'
|
||||||
AND f.CORPINFO_ID = #{CORPINFO_ID}
|
AND f.CORPINFO_ID = #{CORPINFO_ID}
|
||||||
|
@ -166,21 +167,21 @@
|
||||||
AND f.PARENTID = #{PARENTID}
|
AND f.PARENTID = #{PARENTID}
|
||||||
</if>
|
</if>
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<!-- 批量删除 -->
|
<!-- 批量删除 -->
|
||||||
<delete id="deleteAll" parameterType="String">
|
<delete id="deleteAll" parameterType="String">
|
||||||
update
|
update
|
||||||
<include refid="tableName"></include>
|
<include refid="tableName"></include>
|
||||||
set
|
set
|
||||||
ISDELETE = '1'
|
ISDELETE = '1'
|
||||||
where
|
where
|
||||||
SHIFTWORKRULES_ID in
|
SHIFTWORKRULES_ID in
|
||||||
<foreach item="item" index="index" collection="ArrayDATA_IDS" open="(" separator="," close=")">
|
<foreach item="item" index="index" collection="ArrayDATA_IDS" open="(" separator="," close=")">
|
||||||
#{item}
|
#{item}
|
||||||
</foreach>
|
</foreach>
|
||||||
</delete>
|
</delete>
|
||||||
|
|
||||||
|
|
||||||
<!-- 排班类型1是否使用 -->
|
<!-- 排班类型1是否使用 -->
|
||||||
<select id="isUseOne" parameterType="pd" resultType="int">
|
<select id="isUseOne" parameterType="pd" resultType="int">
|
||||||
SELECT COUNT(1) FROM SYS_USER WHERE SHIFTDUTYONE = #{SHIFTWORKRULES_ID}
|
SELECT COUNT(1) FROM SYS_USER WHERE SHIFTDUTYONE = #{SHIFTWORKRULES_ID}
|
||||||
|
|
Loading…
Reference in New Issue