初次提交
This commit is contained in:
@ -0,0 +1,27 @@
|
||||
<?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">
|
||||
<mapper namespace="com.ho.flow.mapper.ActReDeploymentMapper">
|
||||
|
||||
<resultMap type="com.ho.flow.entity.process.ActReDeploymentVO" id="ActReDeploymentResult">
|
||||
<id property="id" column="id" />
|
||||
<result property="deployTime" column="deploy_time" />
|
||||
</resultMap>
|
||||
|
||||
|
||||
<sql id="selectDeploymentVo">
|
||||
select ID_ id,DEPLOY_TIME_ deploy_time from `ACT_RE_DEPLOYMENT`
|
||||
</sql>
|
||||
|
||||
|
||||
<select id="selectActReDeploymentByIds" parameterType="String" resultMap="ActReDeploymentResult">
|
||||
<include refid="selectDeploymentVo"/>
|
||||
where ID_ in
|
||||
<foreach collection="ids" item="id" index="index" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</select>
|
||||
|
||||
|
||||
</mapper>
|
||||
@ -0,0 +1,318 @@
|
||||
<?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">
|
||||
<mapper namespace="com.ho.flow.mapper.AlarmConfigMapper">
|
||||
|
||||
<resultMap id="BaseResultMap" type="com.ho.flow.vo.AlarmConfig">
|
||||
<id property="id" column="id" jdbcType="INTEGER"/>
|
||||
<result property="groupId" column="group_id" jdbcType="INTEGER"/>
|
||||
<result property="stationId" column="station_id" jdbcType="INTEGER"/>
|
||||
<result property="colDefineId" column="col_define_id" jdbcType="INTEGER"/>
|
||||
<result property="deviceTypeId" column="device_type_id" jdbcType="INTEGER"/>
|
||||
<result property="deviceType" column="device_type" jdbcType="VARCHAR"/>
|
||||
<result property="col" column="col" jdbcType="VARCHAR"/>
|
||||
<result property="colName" column="col_name" jdbcType="VARCHAR"/>
|
||||
<result property="sensType" column="sens_type" jdbcType="VARCHAR"/>
|
||||
<result property="info0" column="info0" jdbcType="VARCHAR"/>
|
||||
<result property="info1" column="info1" jdbcType="VARCHAR"/>
|
||||
<result property="upperLimit" column="upper_limit" jdbcType="DECIMAL"/>
|
||||
<result property="lowerLimit" column="lower_limit" jdbcType="DECIMAL"/>
|
||||
<result property="alarmLevel" column="alarm_level" jdbcType="DECIMAL"/>
|
||||
<result property="createTime" column="create_time" jdbcType="TIMESTAMP"/>
|
||||
<result property="updateTime" column="update_time" jdbcType="TIMESTAMP"/>
|
||||
<result property="deleted" column="deleted" jdbcType="VARCHAR"/>
|
||||
</resultMap>
|
||||
|
||||
<sql id="Base_Column_List">
|
||||
id
|
||||
,group_id,station_id,`scope`,
|
||||
col_define_id,device_type_id,device_name,device_type,
|
||||
col,col_name,sens_type,info0,info1,
|
||||
upper_limit,lower_limit,alarm_level,
|
||||
create_time,update_time,deleted
|
||||
</sql>
|
||||
|
||||
<sql id="Insert_Batch_Column_List">
|
||||
group_id
|
||||
,station_id,`scope`,
|
||||
col_define_id,device_type_id,device_name,device_type,
|
||||
col,col_name,sens_type,info0,info1,upper_limit,lower_limit,alarm_level,
|
||||
create_time,deleted
|
||||
</sql>
|
||||
|
||||
|
||||
<insert id="insert" keyColumn="id" keyProperty="id">
|
||||
insert into alarm_config
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="record.groupId != null">group_id,</if>
|
||||
<if test="record.stationId != null">station_id,</if>
|
||||
<if test="record.scope != null">scope,</if>
|
||||
<if test="record.colDefineId != null">col_define_id,</if>
|
||||
<if test="record.deviceTypeId != null">device_type_id ,</if>
|
||||
<if test="record.deviceName != null">device_name ,</if>
|
||||
<if test="record.deviceType != null">device_type,</if>
|
||||
<if test="record.col != null">col,</if>
|
||||
<if test="record.colName != null">col_name,</if>
|
||||
<if test="record.sensType != null">sens_type,</if>
|
||||
<if test="record.info0 != null">info0,</if>
|
||||
<if test="record.info1 != null">info1,</if>
|
||||
<if test="record.upperLimit != null">upper_limit,</if>
|
||||
<if test="record.lowerLimit != null">lower_limit,</if>
|
||||
<if test="record.alarmLevel != null">alarm_level,</if>
|
||||
<if test="record.createTime != null">create_time,</if>
|
||||
<if test="record.updateTime != null">update_time,</if>
|
||||
<if test="record.deleted != null">deleted,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="record.groupId != null">#{record.groupId,jdbcType=INTEGER},</if>
|
||||
<if test="record.stationId!= null">#{record.stationId,jdbcType=INTEGER},</if>
|
||||
<if test="record.scope!= null">#{record.scope,jdbcType=INTEGER},</if>
|
||||
<if test="record.colDefineId != null">#{record.colDefineId},</if>
|
||||
<if test="record.deviceTypeId != null">#{record.deviceTypeId},</if>
|
||||
<if test="record.deviceName != null">#{record.deviceName},</if>
|
||||
<if test="record.deviceType != null">#{record.deviceType},</if>
|
||||
<if test="record.col != null">#{record.col},</if>
|
||||
<if test="record.colName != null">#{record.colName},</if>
|
||||
<if test="record.sensType != null">#{record.sensType},</if>
|
||||
<if test="record.info0 != null">#{record.info0},</if>
|
||||
<if test="record.info1 != null">#{record.info1},</if>
|
||||
<if test="record.upperLimit != null">#{record.upperLimit},</if>
|
||||
<if test="record.lowerLimit != null">#{record.lowerLimit},</if>
|
||||
<if test="record.alarmLevel != null">#{record.alarmLevel},</if>
|
||||
<if test="record.createTime != null">#{record.createTime},</if>
|
||||
<if test="record.updateTime != null">#{record.updateTime},</if>
|
||||
<if test="record.deleted != null">#{record.deleted},</if>
|
||||
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<insert id="insertBatch" useGeneratedKeys="true" keyColumn="id" keyProperty="id">
|
||||
insert into alarm_config (<include refid="Insert_Batch_Column_List"/>)
|
||||
values
|
||||
<foreach item="item" collection="list" index="index" separator=",">
|
||||
(
|
||||
#{item.groupId},#{item.stationId},#{item.scope},
|
||||
#{item.colDefineId},#{item.deviceTypeId},#{item.deviceName},#{item.deviceType},
|
||||
#{item.col},#{item.colName},#{item.sensType},#{item.info0},#{item.info1},#{item.upperLimit},#{item.lowerLimit},
|
||||
#{item.alarmLevel},now(),1
|
||||
)
|
||||
</foreach>
|
||||
</insert>
|
||||
|
||||
<update id="updateBatch" keyColumn="id" keyProperty="id" parameterType="java.util.List" useGeneratedKeys="true">
|
||||
<foreach collection="list" item="item" index="index" separator=";">
|
||||
update alarm_config set device_name = #{item.deviceName},col_name = #{item.colName},sens_type = #{item.sensType},
|
||||
info0 = #{item.info0},info1 = #{item.info1},upper_limit = #{item.upperLimit},lower_limit = #{item.lowerLimit},
|
||||
alarm_level = #{item.alarmLevel}, update_time = #{item.updateTime}
|
||||
where id = #{item.id}
|
||||
</foreach>
|
||||
</update>
|
||||
|
||||
<update id="updateByPrimaryKeySelective">
|
||||
update alarm_config
|
||||
<set>
|
||||
<if test="record.groupId != null">
|
||||
group_id = #{record.groupId,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="record.stationId != null">
|
||||
station_id = #{record.stationId,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="record.colDefineId != null">
|
||||
col_define_id = #{record.colDefineId},
|
||||
</if>
|
||||
<if test="record.deviceTypeId != null">
|
||||
device_type_id = #{record.deviceTypeId},
|
||||
</if>
|
||||
|
||||
<if test="record.deviceType != null">
|
||||
device_type = #{record.deviceType},
|
||||
</if>
|
||||
<if test="record.deviceName != null">
|
||||
device_name = #{record.deviceName},
|
||||
</if>
|
||||
<if test="record.col != null">
|
||||
col = #{record.col},
|
||||
</if>
|
||||
<if test="record.colName != null">
|
||||
col_name = #{record.colName},
|
||||
</if>
|
||||
<if test="record.sensType != null">
|
||||
sens_type = #{record.sensType},
|
||||
</if>
|
||||
<if test="record.upperLimit != null">
|
||||
upper_limit = #{record.upperLimit},
|
||||
</if>
|
||||
<if test="record.lowerLimit != null">
|
||||
lower_limit = #{record.lowerLimit},
|
||||
</if>
|
||||
<if test="record.alarmLevel != null">
|
||||
alarm_level = #{record.alarmLevel},
|
||||
</if>
|
||||
<if test="record.createTime != null">
|
||||
create_time = #{record.createTime},
|
||||
</if>
|
||||
<if test="record.updateTime != null">
|
||||
update_time = #{record.updateTime},
|
||||
</if>
|
||||
<if test="record.deleted != null">
|
||||
deleted = #{record.deleted},
|
||||
</if>
|
||||
</set>
|
||||
where id = #{record.id,jdbcType=INTEGER}
|
||||
</update>
|
||||
|
||||
<select id="selectById" resultType="com.ho.flow.vo.AlarmConfig">
|
||||
select
|
||||
<include refid="Base_Column_List"/>
|
||||
from alarm_config
|
||||
where id = #{id,jdbcType=INTEGER}
|
||||
</select>
|
||||
|
||||
<select id="selectList" resultType="com.ho.flow.vo.AlarmConfig">
|
||||
select
|
||||
<include refid="Base_Column_List"/>
|
||||
from alarm_config
|
||||
<where>
|
||||
<if test="record.groupId != null">
|
||||
and group_id = #{record.groupId}
|
||||
</if>
|
||||
<if test="record.stationId != null">
|
||||
and station_id = #{record.stationId}
|
||||
</if>
|
||||
<if test="record.deviceType != null">
|
||||
and device_type = #{record.deviceType}
|
||||
</if>
|
||||
<if test="record.sensType != null">
|
||||
and sens_type = #{record.sensType}
|
||||
</if>
|
||||
<if test="record.alarmLevel != null">
|
||||
and alarm_level = #{record.alarmLevel}
|
||||
</if>
|
||||
<if test="record.otherAlarmLevel != null">
|
||||
and alarm_level != #{record.otherAlarmLevel}
|
||||
</if>
|
||||
<if test="record.scope != null">
|
||||
and `scope` = #{record.scope}
|
||||
</if>
|
||||
<if test="record.colIds!=null and record.colIds.size()!=0">
|
||||
and col_define_id in
|
||||
<foreach collection="record.colIds" item="item" open="(" close=")" separator=",">
|
||||
#{item}
|
||||
</foreach>
|
||||
</if>
|
||||
<if test="record.colName != null and record.colName !=''">
|
||||
and `col_name` LIKE CONCAT('%',#{record.colName},'%')
|
||||
</if>
|
||||
<if test="record.colNameList != null and record.colNameList.size >0 ">
|
||||
<foreach collection="record.colNameList" item="item" open=" " close=" " separator=" ">
|
||||
and `col_name` LIKE CONCAT('%',#{item},'%')
|
||||
</foreach>
|
||||
</if>
|
||||
<if test="record.deviceTypeList != null and record.deviceTypeList.size > 0">
|
||||
and device_type in
|
||||
<foreach collection="record.deviceTypeList" item="item" open="(" close=")" separator=",">
|
||||
#{item}
|
||||
</foreach>
|
||||
</if>
|
||||
<if test="record.deviceTypeSuffix != null">
|
||||
and device_type like concat('%',#{record.deviceTypeSuffix})
|
||||
</if>
|
||||
and deleted = 1
|
||||
</where>
|
||||
order by group_id,station_id, col, scope
|
||||
</select>
|
||||
|
||||
<select id="selectRepeatValue" resultType="com.ho.flow.vo.AlarmConfig">
|
||||
select
|
||||
<include refid="Base_Column_List"/>
|
||||
from alarm_config
|
||||
<where>
|
||||
<if test="groupId != null">
|
||||
and group_id = #{groupId}
|
||||
</if>
|
||||
<if test="stationId != null">
|
||||
and station_id = #{stationId}
|
||||
</if>
|
||||
<if test="scope != null">
|
||||
and scope = #{scope}
|
||||
</if>
|
||||
<if test="colDefineId != null">
|
||||
and col_define_id = #{colDefineId}
|
||||
</if>
|
||||
and deleted = 1
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectListByParams" resultType="com.ho.flow.vo.AlarmConfig">
|
||||
select
|
||||
<include refid="Base_Column_List"/>
|
||||
from alarm_config
|
||||
<where>
|
||||
<if test="stationId != null">
|
||||
and station_id = #{stationId}
|
||||
</if>
|
||||
<if test="deviceType != null">
|
||||
and device_type = #{deviceType}
|
||||
</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<delete id="deleteByPrimaryKey">
|
||||
delete
|
||||
from alarm_config
|
||||
where id = #{id,jdbcType=INTEGER}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteByParam">
|
||||
delete
|
||||
from alarm_config
|
||||
where station_id = #{stationId} or device_type like concat('%',#{deviceType})
|
||||
</delete>
|
||||
|
||||
<delete id="deleteBatch">
|
||||
delete
|
||||
from alarm_config
|
||||
<where>
|
||||
and id in
|
||||
<foreach collection="list" open="(" close=")" separator="," item="item">
|
||||
#{item}
|
||||
</foreach>
|
||||
</where>
|
||||
</delete>
|
||||
|
||||
<update id="updateByParams">
|
||||
update alarm_config
|
||||
<set>
|
||||
<if test="record.upperLimit != null">
|
||||
upper_limit = #{record.upperLimit},
|
||||
</if>
|
||||
<if test="record.lowerLimit != null">
|
||||
lower_limit = #{record.lowerLimit},
|
||||
</if>
|
||||
<if test="record.alarmLevel != null">
|
||||
alarm_level = #{record.alarmLevel},
|
||||
</if>
|
||||
<if test="record.updateTime != null">
|
||||
update_time = #{record.updateTime},
|
||||
</if>
|
||||
<if test="record.deleted != null">
|
||||
deleted = #{record.deleted},
|
||||
</if>
|
||||
</set>
|
||||
<where>
|
||||
<if test="record.scope != null">
|
||||
and `scope` = #{record.scope}
|
||||
</if>
|
||||
<if test="record.stationId != null">
|
||||
and station_id = #{record.stationId,jdbcType=INTEGER}
|
||||
</if>
|
||||
<if test="record.id != null">
|
||||
and col_define_id = #{record.id}
|
||||
</if>
|
||||
<if test="record.deviceType != null">
|
||||
and device_type = #{record.deviceType}
|
||||
</if>
|
||||
</where>
|
||||
</update>
|
||||
</mapper>
|
||||
@ -0,0 +1,36 @@
|
||||
<?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">
|
||||
<mapper namespace="com.ho.flow.mapper.BusiIdControlMapper">
|
||||
|
||||
<sql id="Base_Column_List">
|
||||
id
|
||||
,id_type,current_value
|
||||
</sql>
|
||||
|
||||
<select id="selectByType" resultType="com.ho.flow.vo.BusiIdControl">
|
||||
select
|
||||
<include refid="Base_Column_List"/>
|
||||
from busi_id_control
|
||||
<where>
|
||||
<if test="idType != null">
|
||||
and id_type = #{idType}
|
||||
</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<insert id="insert" keyColumn="id" keyProperty="id"
|
||||
useGeneratedKeys="true">
|
||||
insert into busi_id_control
|
||||
(id_type, current_value)
|
||||
values (#{idType}, #{currentValue})
|
||||
</insert>
|
||||
|
||||
<update id="update">
|
||||
update busi_id_control
|
||||
set current_value = #{currentValue}
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
</mapper>
|
||||
@ -0,0 +1,195 @@
|
||||
<?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">
|
||||
<mapper namespace="com.ho.flow.mapper.DeviceColDefineMapper">
|
||||
|
||||
|
||||
<sql id="Base_Column_List">
|
||||
`id`
|
||||
, `device_type_id`, `device_name`, `device_type`, `col`,
|
||||
`col_name`, `sens_type`,info0,info1
|
||||
</sql>
|
||||
|
||||
|
||||
<select id="selectPage" resultType="com.ho.flow.vo.DeviceColDefine">
|
||||
select
|
||||
<include refid="Base_Column_List"/>
|
||||
from device_col_define
|
||||
<where>
|
||||
<!--<if test="deviceType != null">
|
||||
and `device_type` LIKE CONCAT('%',#{deviceType},'%')
|
||||
</if>-->
|
||||
<if test="deviceType != null">
|
||||
and `device_type` = #{deviceType}
|
||||
</if>
|
||||
<if test="sensType != null">
|
||||
and sens_type = #{sensType}
|
||||
</if>
|
||||
<if test="col != null and col!=''">
|
||||
and `col` LIKE CONCAT('%',#{col},'%')
|
||||
</if>
|
||||
<if test="colName != null and colName!=''">
|
||||
and `col_name` LIKE CONCAT('%',#{colName},'%')
|
||||
</if>
|
||||
<if test="colNameList != null and colNameList.size >0 ">
|
||||
<foreach collection="colNameList" item="item" open=" " close=" " separator=" ">
|
||||
and `col_name` LIKE CONCAT('%',#{item},'%')
|
||||
</foreach>
|
||||
</if>
|
||||
<if test="name != null and name!=''">
|
||||
and (col_name LIKE concat('%',#{name},'%') or col LIKE concat('%',#{name},'%'))
|
||||
</if>
|
||||
<if test="deviceTypeList != null and deviceTypeList.size > 0">
|
||||
and device_type in
|
||||
<foreach collection="deviceTypeList" item="item" open="(" close=")" separator=",">
|
||||
#{item}
|
||||
</foreach>
|
||||
</if>
|
||||
<if test="deviceTypeSuffix !=null and deviceTypeSuffix !='' ">
|
||||
and device_type like concat('%',#{deviceTypeSuffix})
|
||||
</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectById" resultType="com.ho.flow.vo.DeviceColDefine">
|
||||
select
|
||||
<include refid="Base_Column_List"/>
|
||||
from device_col_define
|
||||
where id = #{id}
|
||||
</select>
|
||||
|
||||
<select id="selectByIdList" resultType="com.ho.flow.vo.DeviceColDefine">
|
||||
select
|
||||
<include refid="Base_Column_List"/>
|
||||
from device_col_define
|
||||
<where>
|
||||
<if test="deviceType!=null">
|
||||
and device_type = #{deviceType}
|
||||
</if>
|
||||
<if test="ids!=null and ids.size()!=0">
|
||||
and id in
|
||||
<foreach collection="ids" item="item" open="(" close=")" separator=",">
|
||||
#{item}
|
||||
</foreach>
|
||||
</if>
|
||||
</where>
|
||||
|
||||
</select>
|
||||
|
||||
<select id="selectByIdAndDeviceTypeId" resultType="com.ho.flow.vo.DeviceColDefine">
|
||||
select
|
||||
<include refid="Base_Column_List"/>
|
||||
from device_col_define
|
||||
<where>
|
||||
<if test="id != null">
|
||||
and id = #{id}
|
||||
</if>
|
||||
<if test="deviceTypeId != null">
|
||||
and device_type_id = #{deviceTypeId}
|
||||
</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectByColAndDeviceType" resultType="com.ho.flow.vo.DeviceColDefine">
|
||||
select
|
||||
<include refid="Base_Column_List"/>
|
||||
from device_col_define
|
||||
<where>
|
||||
<if test="col != null">
|
||||
and col = #{col}
|
||||
</if>
|
||||
<if test="deviceType != null">
|
||||
and device_type = #{deviceType}
|
||||
</if>
|
||||
|
||||
</where>
|
||||
</select>
|
||||
<select id="selectByDeviceType" resultType="com.ho.flow.vo.DeviceColDefine">
|
||||
select
|
||||
<include refid="Base_Column_List"/>
|
||||
from device_col_define
|
||||
where
|
||||
`device_type` LIKE CONCAT('%',#{deviceType},'%')
|
||||
</select>
|
||||
|
||||
<insert id="insertList" keyColumn="id" keyProperty="id" parameterType="java.util.List" useGeneratedKeys="true">
|
||||
insert into device_col_define (device_type_id,device_name,device_type,col,col_name,col_en,lang,sens_type,info0,info1) values
|
||||
<foreach collection="list" item="item" index="index" separator=",">
|
||||
(#{item.deviceTypeId},#{item.deviceName},#{item.deviceType},#{item.col},#{item.colName},#{item.colEn},#{item.lang},#{item.sensType},#{item.info0},#{item.info1})
|
||||
</foreach>
|
||||
</insert>
|
||||
|
||||
<update id="updateList" keyColumn="id" keyProperty="id" parameterType="java.util.List" useGeneratedKeys="true">
|
||||
<foreach collection="list" item="item" index="index" separator=";">
|
||||
update device_col_define set device_type_id = #{item.deviceTypeId}, device_name = #{item.deviceName},
|
||||
device_type = #{item.deviceType}, col = #{item.col},col_name = #{item.colName},
|
||||
col_en = #{item.colEn},lang = #{item.lang}, sens_type = #{item.sensType}, info0 = #{item.info0}, info1 = #{item.info1}
|
||||
where id = #{item.id}
|
||||
</foreach>
|
||||
</update>
|
||||
|
||||
<insert id="insertDeviceColDefine" keyColumn="id" keyProperty="id" parameterType="com.ho.flow.vo.DeviceColDefine"
|
||||
useGeneratedKeys="true">
|
||||
insert into device_col_define
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="deviceTypeId != null">device_type_id,</if>
|
||||
<if test="deviceName != null">device_name,</if>
|
||||
<if test="deviceType != null">device_type,</if>
|
||||
<if test="col != null">col,</if>
|
||||
<if test="colName != null">col_name,</if>
|
||||
<if test="sensType != null">sens_type,</if>
|
||||
<if test="info0 != null">info0,</if>
|
||||
<if test="info1 != null">info1,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="deviceTypeId != null">#{deviceTypeId},</if>
|
||||
<if test="deviceName != null">#{deviceName},</if>
|
||||
<if test="deviceType != null">#{deviceType},</if>
|
||||
<if test="col != null">#{col},</if>
|
||||
<if test="colName != null">#{colName},</if>
|
||||
<if test="sensType != null">#{sensType},</if>
|
||||
<if test="info0 != null">#{info0},</if>
|
||||
<if test="info1 != null">#{info1},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateDeviceColDefine" parameterType="com.ho.flow.vo.DeviceColDefine">
|
||||
update device_col_define
|
||||
<set>
|
||||
<if test="deviceName != null">
|
||||
device_name = #{deviceName},
|
||||
</if>
|
||||
<if test="deviceType != null">
|
||||
device_type = #{deviceType},
|
||||
</if>
|
||||
<if test="colName != null">
|
||||
col_name = #{colName},
|
||||
</if>
|
||||
<if test="sensType != null">
|
||||
sens_type = #{sensType},
|
||||
</if>
|
||||
<if test="info0 != null">
|
||||
info0 = #{info0},
|
||||
</if>
|
||||
<if test="info1 != null">
|
||||
info1 =#{info1},
|
||||
</if>
|
||||
</set>
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
<delete id="deleteDeviceColDefine">
|
||||
delete
|
||||
from device_col_define
|
||||
<where>
|
||||
<if test="ids != null and ids.size !=0">
|
||||
and id in
|
||||
<foreach collection="ids" open="(" close=")" separator="," item="item">
|
||||
#{item}
|
||||
</foreach>
|
||||
</if>
|
||||
</where>
|
||||
</delete>
|
||||
|
||||
</mapper>
|
||||
781
flowable-center-dao/src/main/resources/mapper/EventMapper.xml
Normal file
781
flowable-center-dao/src/main/resources/mapper/EventMapper.xml
Normal file
@ -0,0 +1,781 @@
|
||||
<?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">
|
||||
<mapper namespace="com.ho.flow.mapper.EventMapper">
|
||||
|
||||
<select id="selectByInfo" resultType="com.ho.flow.vo.resp.event.EventRespVO">
|
||||
select
|
||||
<include refid="Base_Column_List"/>
|
||||
from event
|
||||
<where>
|
||||
<if test="record.targetDevice != null">
|
||||
and target_device = #{record.targetDevice}
|
||||
</if>
|
||||
<if test="record.srcIdList != null and record.srcIdList.size != 0 ">
|
||||
and target_device in
|
||||
<foreach collection="record.srcIdList" open="(" close=")" separator="," item="item">
|
||||
#{item}
|
||||
</foreach>
|
||||
</if>
|
||||
<if test="record.eventColReqList != null and record.eventColReqList.size != 0 ">
|
||||
and
|
||||
<foreach collection="record.eventColReqList" open="(" close=")" separator=" or " item="item">
|
||||
( target_device = #{item.srcId}
|
||||
<if test="item.colList != null">
|
||||
and `signal` in
|
||||
<foreach collection="item.colList" open="(" close=")" separator="," item="st">
|
||||
#{st}
|
||||
</foreach>
|
||||
</if>
|
||||
)
|
||||
</foreach>
|
||||
|
||||
</if>
|
||||
<if test="record.description != null and record.description != ''">
|
||||
and description LIKE concat('%',#{record.description},'%')
|
||||
</if>
|
||||
<if test="record.stationIds != null and record.stationIds.size != 0">
|
||||
and station_id in
|
||||
<foreach collection="record.stationIds" open="(" close=")" separator="," item="item">
|
||||
#{item}
|
||||
</foreach>
|
||||
</if>
|
||||
<if test="record.deviceTypeList != null and record.deviceTypeList.size != 0">
|
||||
and device_type in
|
||||
<foreach collection="record.deviceTypeList" open="(" close=")" separator="," item="deviceType">
|
||||
#{deviceType.deviceType}
|
||||
</foreach>
|
||||
</if>
|
||||
<if test="record.startTime != null">
|
||||
and time_stamp >= #{record.startTime}
|
||||
</if>
|
||||
<if test="record.endTime != null">
|
||||
and time_stamp <= #{record.endTime}
|
||||
</if>
|
||||
<if test="depts != null and depts.size != 0">
|
||||
and dept_id in
|
||||
<foreach collection="depts" open="(" close=")" separator="," item="item">
|
||||
#{item}
|
||||
</foreach>
|
||||
</if>
|
||||
<if test="record.status != null">
|
||||
and status = #{record.status}
|
||||
</if>
|
||||
<trim prefix="and (" suffix=")">
|
||||
<if test="record.eventTypes != null and record.eventTypes.size != 0">
|
||||
event_type in
|
||||
<foreach collection="record.eventTypes" open="(" close=")" separator="," item="type">
|
||||
#{type}
|
||||
</foreach>
|
||||
</if>
|
||||
<if test="record.eventTypes != null and record.eventTypes.size != 0
|
||||
and record.eventLevels != null and record.eventLevels.size != 0">
|
||||
or
|
||||
</if>
|
||||
<if test="record.eventLevels != null and record.eventLevels.size != 0">
|
||||
event_level in
|
||||
<foreach collection="record.eventLevels" open="(" close=")" separator="," item="level">
|
||||
#{level}
|
||||
</foreach>
|
||||
</if>
|
||||
</trim>
|
||||
<if test="record.userLevel != null and record.userLevel>0">
|
||||
and (`signal` = 'polymerization' or device_type ='accesspoint')
|
||||
</if>
|
||||
<if test="record.userLevel == null or record.userLevel==0">
|
||||
and `signal` != 'polymerization'
|
||||
</if>
|
||||
order by time_stamp desc
|
||||
<!--限制的查询记录数,防止记录集过大-->
|
||||
<if test="record.limitCount!=null">
|
||||
limit #{record.limitCount}
|
||||
</if>
|
||||
</where>
|
||||
|
||||
</select>
|
||||
|
||||
<select id="selectCountStatusByInfo" resultType="java.lang.Integer">
|
||||
select count(1)
|
||||
from event
|
||||
where status = 0
|
||||
<if test="record.targetDevice != null">
|
||||
and target_device = #{record.targetDevice}
|
||||
</if>
|
||||
<if test="record.description != null and record.description != ''">
|
||||
and description LIKE concat('%',#{record.description},'%')
|
||||
</if>
|
||||
<if test="record.stationIds != null and record.stationIds.size != 0">
|
||||
and station_id in
|
||||
<foreach collection="record.stationIds" open="(" close=")" separator="," item="item">
|
||||
#{item}
|
||||
</foreach>
|
||||
</if>
|
||||
<if test="record.deviceTypeList != null and record.deviceTypeList.size != 0">
|
||||
and device_type in
|
||||
<foreach collection="record.deviceTypeList" open="(" close=")" separator="," item="deviceType">
|
||||
#{deviceType.deviceType}
|
||||
</foreach>
|
||||
</if>
|
||||
<if test="record.startTime != null">
|
||||
and time_stamp >= #{record.startTime}
|
||||
</if>
|
||||
<if test="record.endTime != null">
|
||||
and time_stamp <= #{record.endTime}
|
||||
</if>
|
||||
<trim prefix="and (" suffix=")">
|
||||
<if test="record.eventTypes != null and record.eventTypes.size != 0">
|
||||
event_type in
|
||||
<foreach collection="record.eventTypes" open="(" close=")" separator="," item="type">
|
||||
#{type}
|
||||
</foreach>
|
||||
</if>
|
||||
<if test="record.eventTypes != null and record.eventTypes.size != 0
|
||||
and record.eventLevels != null and record.eventLevels.size != 0">
|
||||
or
|
||||
</if>
|
||||
<if test="record.eventLevels != null and record.eventLevels.size != 0">
|
||||
event_level in
|
||||
<foreach collection="record.eventLevels" open="(" close=")" separator="," item="level">
|
||||
#{level}
|
||||
</foreach>
|
||||
</if>
|
||||
</trim>
|
||||
<if test="record.userLevel != null and record.userLevel>0">
|
||||
and (`signal` = 'polymerization' or device_type ='accesspoint')
|
||||
</if>
|
||||
<if test="record.userLevel == null or record.userLevel==0">
|
||||
and `signal` != 'polymerization'
|
||||
</if>
|
||||
</select>
|
||||
|
||||
<sql id="Base_Column_List">
|
||||
id
|
||||
,station_id,dept_id,group_id,
|
||||
event_type,event_level,time_stamp,
|
||||
target_device,device_type, device_type_id, `signal`,`status`,
|
||||
value,description,confirm_status,
|
||||
confirm_man,confirm_time,remark,
|
||||
suggestion,create_time,update_time,
|
||||
category,type,sub_type,sens_type,is_recovery,before_event_id
|
||||
</sql>
|
||||
|
||||
|
||||
<select id="selectByPrimaryKey" resultType="com.ho.flow.vo.Event">
|
||||
select
|
||||
<include refid="Base_Column_List"/>
|
||||
from event
|
||||
where id = #{id}
|
||||
</select>
|
||||
|
||||
<select id="selectByBeforeEventId" resultType="com.ho.flow.vo.Event">
|
||||
select
|
||||
<include refid="Base_Column_List"/>
|
||||
from event
|
||||
where before_event_id = #{id}
|
||||
</select>
|
||||
|
||||
<select id="selectNumByType" resultType="com.ho.flow.vo.resp.event.EventTypeNum">
|
||||
SELECT event_type,COUNT(event_type) AS COUNT
|
||||
FROM event
|
||||
where
|
||||
event_type IS NOT NULL
|
||||
<if test="record.startTime != null">
|
||||
and time_stamp >= #{record.startTime}
|
||||
</if>
|
||||
<if test="record.endTime != null">
|
||||
and time_stamp <= #{record.endTime}
|
||||
</if>
|
||||
<if test="record.status != null">
|
||||
and status = #{record.status}
|
||||
</if>
|
||||
<if test="record.srcIdList != null and record.srcIdList.size !=0 ">
|
||||
and target_device in
|
||||
<foreach collection="record.srcIdList" open="(" close=")" separator="," item="item">
|
||||
#{item}
|
||||
</foreach>
|
||||
</if>
|
||||
<if test="record.eventColReqList != null and record.eventColReqList.size != 0 ">
|
||||
and
|
||||
<foreach collection="record.eventColReqList" open="(" close=")" separator=" or " item="item">
|
||||
( target_device = #{item.srcId}
|
||||
<if test="item.colList != null">
|
||||
and `signal` in
|
||||
<foreach collection="item.colList" open="(" close=")" separator="," item="st">
|
||||
#{st}
|
||||
</foreach>
|
||||
</if>
|
||||
)
|
||||
</foreach>
|
||||
|
||||
</if>
|
||||
<if test="record.description != null">
|
||||
and description like concat('%',#{record.description},'%')
|
||||
</if>
|
||||
<if test="record.stationIds != null and record.stationIds.size != 0">
|
||||
and station_id in
|
||||
<foreach collection="record.stationIds" open="(" close=")" separator="," item="item">
|
||||
#{item}
|
||||
</foreach>
|
||||
</if>
|
||||
<if test="depts != null and depts.size != 0">
|
||||
and dept_id in
|
||||
<foreach collection="depts" open="(" close=")" separator="," item="item">
|
||||
#{item}
|
||||
</foreach>
|
||||
</if>
|
||||
<!--选中的deviceTypeIds-->
|
||||
<if test="record.deviceTypeList != null and record.deviceTypeList.size != 0">
|
||||
and device_type in
|
||||
<foreach collection="record.deviceTypeList" open="(" close=")" separator="," item="deviceType">
|
||||
#{deviceType.deviceType}
|
||||
</foreach>
|
||||
</if>
|
||||
<if test="record.userLevel != null and record.userLevel>0">
|
||||
and (`signal` = 'polymerization' or device_type ='accesspoint')
|
||||
</if>
|
||||
<if test="record.userLevel == null or record.userLevel==0">
|
||||
and `signal` != 'polymerization'
|
||||
</if>
|
||||
GROUP BY event_type
|
||||
</select>
|
||||
<select id="selectNumByLevel" resultType="com.ho.flow.vo.resp.event.EventLevelNum">
|
||||
SELECT event_level,COUNT(event_level) AS COUNT
|
||||
FROM `event`
|
||||
where
|
||||
event_level IS NOT NULL
|
||||
<if test="record.startTime != null">
|
||||
and time_stamp >= #{record.startTime}
|
||||
</if>
|
||||
<if test="record.endTime != null">
|
||||
and time_stamp <= #{record.endTime}
|
||||
</if>
|
||||
<if test="record.status != null">
|
||||
and status = #{record.status}
|
||||
</if>
|
||||
<if test="record.srcIdList != null and record.srcIdList.size !=0 ">
|
||||
and target_device in
|
||||
<foreach collection="record.srcIdList" open="(" close=")" separator="," item="item">
|
||||
#{item}
|
||||
</foreach>
|
||||
</if>
|
||||
<if test="record.eventColReqList != null and record.eventColReqList.size != 0 ">
|
||||
and
|
||||
<foreach collection="record.eventColReqList" open="(" close=")" separator=" or " item="item">
|
||||
( target_device = #{item.srcId}
|
||||
<if test="item.colList != null">
|
||||
and `signal` in
|
||||
<foreach collection="item.colList" open="(" close=")" separator="," item="st">
|
||||
#{st}
|
||||
</foreach>
|
||||
</if>
|
||||
)
|
||||
</foreach>
|
||||
|
||||
</if>
|
||||
<if test="record.description != null">
|
||||
and description like concat('%',#{record.description},'%')
|
||||
</if>
|
||||
<if test="record.stationIds != null and record.stationIds.size != 0">
|
||||
and station_id in
|
||||
<foreach collection="record.stationIds" open="(" close=")" separator="," item="item">
|
||||
#{item}
|
||||
</foreach>
|
||||
</if>
|
||||
<if test="depts != null and depts.size != 0">
|
||||
and dept_id in
|
||||
<foreach collection="depts" open="(" close=")" separator="," item="item">
|
||||
#{item}
|
||||
</foreach>
|
||||
</if>
|
||||
<!--选中的deviceTypeIds-->
|
||||
<if test="record.deviceTypeList != null and record.deviceTypeList.size != 0">
|
||||
and device_type in
|
||||
<foreach collection="record.deviceTypeList" open="(" close=")" separator="," item="deviceType">
|
||||
#{deviceType.deviceType}
|
||||
</foreach>
|
||||
</if>
|
||||
<if test="record.userLevel != null and record.userLevel>0">
|
||||
and (`signal` = 'polymerization' or device_type ='accesspoint')
|
||||
</if>
|
||||
<if test="record.userLevel == null or record.userLevel==0">
|
||||
and `signal` != 'polymerization'
|
||||
</if>
|
||||
GROUP BY event_level
|
||||
</select>
|
||||
|
||||
<select id="selectByIds" resultType="com.ho.flow.vo.Event">
|
||||
SELECT
|
||||
<include refid="Base_Column_List"/>
|
||||
FROM `event`
|
||||
where id in
|
||||
<foreach collection="list" open="(" close=")" separator="," item="item">
|
||||
#{item}
|
||||
</foreach>
|
||||
order by time_stamp desc
|
||||
</select>
|
||||
|
||||
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
|
||||
delete
|
||||
from event
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</delete>
|
||||
<insert id="insert" parameterType="com.ho.flow.vo.Event">
|
||||
insert into event (
|
||||
id,station_id,dept_id,group_id,
|
||||
event_type,event_level,time_stamp,
|
||||
target_device,device_type, device_type_id,`signal`,status,
|
||||
`value`,`description`,confirm_status,
|
||||
confirm_man,confirm_time,remark,
|
||||
suggestion,category,type,sub_type,sens_type,is_recovery,before_event_id
|
||||
) values(
|
||||
#{id},#{stationId},#{deptId},#{groupId},
|
||||
#{eventType},#{eventLevel},#{timeStamp},
|
||||
#{targetDevice},#{deviceType}, #{deviceTypeId},#{signal},#{status},
|
||||
#{value},#{description},#{confirmStatus},
|
||||
#{confirmMan},#{confirmTime},#{remark},
|
||||
#{suggestion},#{category},#{type},#{subType},#{sensType},#{isRecovery},#{beforeEventId}
|
||||
)
|
||||
</insert>
|
||||
<insert id="insertSelective" keyColumn="id" keyProperty="id" parameterType="com.ho.flow.vo.Event"
|
||||
useGeneratedKeys="true">
|
||||
insert into event
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="id != null">id,</if>
|
||||
<if test="deptId != null">dept_id,</if>
|
||||
<if test="groupId != null">group_id,</if>
|
||||
<if test="eventType != null">event_type,</if>
|
||||
<if test="eventLevel!= null">event_level,</if>
|
||||
<if test="timeStamp != null">time_stamp,</if>
|
||||
<if test="targetDevice != null">target_device,</if>
|
||||
<if test="deviceType != null">device_type,</if>
|
||||
<if test="deviceTypeId != null">device_type_id,</if>
|
||||
<if test="signal != null">signal,</if>
|
||||
<if test="status != null">status,</if>
|
||||
<if test="value != null">value,</if>
|
||||
<if test="description != null">description,</if>
|
||||
<if test="confirmStatus != null">confirm_status,</if>
|
||||
<if test="confirmMan != null">confirm_man,</if>
|
||||
<if test="confirmTime != null">confirm_time,</if>
|
||||
<if test="remark != null">remark,</if>
|
||||
<if test="suggestion != null">suggestion,</if>
|
||||
<if test="createTime != null">create_time,</if>
|
||||
<if test="updateTime != null">update_time,</if>
|
||||
<if test="stationId != null">station_id,</if>
|
||||
<if test="category != null">category,</if>
|
||||
<if test="type != null">type,</if>
|
||||
<if test="subType != null">sub_type,</if>
|
||||
<if test="isRecovery != null">is_recovery,</if>
|
||||
<if test="beforeEventId != null">before_event_id,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="id != null">#{id,jdbcType=BIGINT},</if>
|
||||
<if test="deptId != null">#{deptId,jdbcType=BIGINT},</if>
|
||||
<if test="groupId != null">#{groupId,jdbcType=BIGINT},</if>
|
||||
<if test="eventType != null">#{eventType,jdbcType=TINYINT},</if>
|
||||
<if test="eventLevel!= null">#{eventLevel,jdbcType=TINYINT},</if>
|
||||
<if test="timeStamp != null">#{timeStamp,jdbcType=TIMESTAMP},</if>
|
||||
<if test="targetDevice != null">#{targetDevice},</if>
|
||||
<if test="deviceType != null">#{deviceType},</if>
|
||||
<if test="deviceTypeId != null">#{deviceTypeId},</if>
|
||||
<if test="signal != null">#{signal,jdbcType=VARCHAR},</if>
|
||||
<if test="status != null">#{status,jdbcType=INTEGER},</if>
|
||||
<if test="value != null">#{value,jdbcType=DECIMAL},</if>
|
||||
<if test="description != null">#{description,jdbcType=VARCHAR},</if>
|
||||
<if test="confirmStatus != null">#{confirmStatus,jdbcType=TINYINT},</if>
|
||||
<if test="confirmMan != null">#{confirmMan,jdbcType=VARCHAR},</if>
|
||||
<if test="confirmTime != null">#{confirmTime,jdbcType=TIMESTAMP},</if>
|
||||
<if test="remark != null">#{remark,jdbcType=VARCHAR},</if>
|
||||
<if test="suggestion != null">#{suggestion,jdbcType=VARCHAR},</if>
|
||||
<if test="createTime != null">#{createTime,jdbcType=TIMESTAMP},</if>
|
||||
<if test="updateTime != null">#{updateTime,jdbcType=TIMESTAMP},</if>
|
||||
<if test="stationId != null">#{stationId,jdbcType=INTEGER},</if>
|
||||
<if test="category != null">#{category,jdbcType=INTEGER},</if>
|
||||
<if test="type != null">#{type,jdbcType=INTEGER},</if>
|
||||
<if test="subType != null">#{subType,jdbcType=INTEGER},</if>
|
||||
<if test="isRecovery != null">#{isRecovery},</if>
|
||||
<if test="beforeEventId != null">#{beforeEventId},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<insert id="insertBatch">
|
||||
INSERT INTO event (
|
||||
id,station_id,dept_id,group_id,
|
||||
event_type,event_level,time_stamp,
|
||||
target_device,device_type, device_type_id,`signal`,status,
|
||||
`value`,`description`,confirm_status,
|
||||
confirm_man,confirm_time,remark,
|
||||
suggestion,category,type,sub_type,sens_type,is_recovery,before_event_id
|
||||
)
|
||||
VALUES
|
||||
<foreach item="item" collection="list" index="index" separator=",">
|
||||
(
|
||||
#{item.id},#{item.stationId},#{item.deptId},#{item.groupId},
|
||||
#{item.eventType},#{item.eventLevel},#{item.timeStamp},
|
||||
#{item.targetDevice},#{item.deviceType}, #{item.deviceTypeId},#{item.signal},#{item.status},
|
||||
#{item.value},#{item.description},#{item.confirmStatus},
|
||||
#{item.confirmMan},#{item.confirmTime},#{item.remark},
|
||||
#{item.suggestion},#{item.category},#{item.type},#{item.subType},#{item.sensType},#{item.isRecovery},#{item.beforeEventId}
|
||||
)
|
||||
</foreach>
|
||||
</insert>
|
||||
<update id="updateBatchById">
|
||||
update `event`
|
||||
<set>
|
||||
<if test="event.timeStamp != null">
|
||||
time_stamp = #{event.timeStamp,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
<if test="event.value != null">
|
||||
`value` = #{event.value,jdbcType=DECIMAL},
|
||||
</if>
|
||||
<if test="event.description != null">
|
||||
description = #{event.description,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="event.updateTime != null">
|
||||
update_time = #{event.updateTime,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
</set>
|
||||
WHERE id = #{event.id,jdbcType=BIGINT}
|
||||
</update>
|
||||
<update id="updateByPrimaryKey" parameterType="com.ho.flow.vo.Event">
|
||||
update event
|
||||
set dept_id = #{deptId,jdbcType=INTEGER},
|
||||
group_id = #{groupId,jdbcType=INTEGER},
|
||||
event_type = #{eventType,jdbcType=TINYINT},
|
||||
event_level = #{ eventLevel,jdbcType=TINYINT} time_stamp = #{timeStamp,jdbcType=TIMESTAMP},
|
||||
target_device = #{targetDevice,jdbcType=INTEGER},
|
||||
signal = #{signal,jdbcType=VARCHAR},
|
||||
status = #{status,jdbcType=INTEGER},
|
||||
value = #{value,jdbcType=DECIMAL},
|
||||
description = #{description,jdbcType=VARCHAR},
|
||||
confirm_status = #{confirmStatus,jdbcType=TINYINT},
|
||||
confirm_man = #{confirmMan,jdbcType=VARCHAR},
|
||||
confirm_time = #{confirmTime,jdbcType=TIMESTAMP},
|
||||
remark = #{remark,jdbcType=VARCHAR},
|
||||
suggestion = #{suggestion,jdbcType=VARCHAR},
|
||||
create_time = #{createTime,jdbcType=TIMESTAMP},
|
||||
update_time = #{updateTime,jdbcType=TIMESTAMP},
|
||||
station_id = #{stationId,jdbcType=INTEGER},
|
||||
category = #{category,jdbcType=INTEGER},
|
||||
type = #{type,jdbcType=INTEGER},
|
||||
sub_type = #{subType,jdbcType=INTEGER}
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</update>
|
||||
<update id="updateByPrimaryKeySelective">
|
||||
update event
|
||||
<set>
|
||||
<if test="deptId != null">
|
||||
dept_id = #{deptId,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="groupId != null">
|
||||
group_id = #{groupId,jdbcType=INTEGER},
|
||||
</if>
|
||||
|
||||
<if test="eventType != null">
|
||||
event_type = #{eventType,jdbcType=TINYINT},
|
||||
</if>
|
||||
<if test="eventLevel!= null">
|
||||
event_level = #{eventLevel,jdbcType=TINYINT}
|
||||
</if>
|
||||
<if test="timeStamp != null">
|
||||
time_stamp = #{timeStamp,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
<if test="targetDevice != null">
|
||||
target_device = #{targetDevice,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="signal != null">
|
||||
signal = #{signal,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="status != null">
|
||||
status = #{status,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="value != null">
|
||||
value = #{value,jdbcType=DECIMAL},
|
||||
</if>
|
||||
<if test="description != null">
|
||||
description = #{description,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="confirmStatus != null">
|
||||
confirm_status = #{confirmStatus,jdbcType=TINYINT},
|
||||
</if>
|
||||
<if test="confirmMan != null">
|
||||
confirm_man = #{confirmMan,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="confirmTime != null">
|
||||
confirm_time = #{confirmTime,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
<if test="remark != null">
|
||||
remark = #{remark,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="suggestion != null">
|
||||
suggestion = #{suggestion,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="createTime != null">
|
||||
create_time = #{createTime,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
<if test="updateTime != null">
|
||||
update_time = #{updateTime,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
<if test="stationId != null">
|
||||
station_id = #{stationId,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="category != null">
|
||||
category = #{category,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="type != null">
|
||||
type = #{type,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="subType != null">
|
||||
sub_type = #{subType,jdbcType=INTEGER},
|
||||
</if>
|
||||
</set>
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</update>
|
||||
|
||||
<update id="updateByIds">
|
||||
update event
|
||||
set
|
||||
status = 1,
|
||||
confirm_time = NOW(),
|
||||
confirm_man=#{userDetail.username}
|
||||
where id in
|
||||
<if test="ids != null and ids.size() != 0">
|
||||
<foreach collection="ids" open="(" close=")" separator="," item="item">
|
||||
#{item}
|
||||
</foreach>
|
||||
</if>
|
||||
|
||||
</update>
|
||||
<update id="updateConfirm">
|
||||
update event
|
||||
set
|
||||
confirm_status = 1,
|
||||
confirm_time = NOW(),
|
||||
confirm_man = #{name,jdbcType=VARCHAR}
|
||||
where id in
|
||||
<if test="ids != null and ids.size() != 0">
|
||||
<foreach collection="ids" open="(" close=")" separator="," item="item">
|
||||
#{item}
|
||||
</foreach>
|
||||
</if>
|
||||
</update>
|
||||
<update id="setRemarkByIds">
|
||||
update event
|
||||
set
|
||||
remark = "已转工单"
|
||||
<where>
|
||||
<if test="ids != null and ids.size() != 0">
|
||||
and id in
|
||||
<foreach collection="ids" open="(" close=")" separator="," item="item">
|
||||
#{item}
|
||||
</foreach>
|
||||
</if>
|
||||
</where>
|
||||
</update>
|
||||
<!-- List<Event> selectByParams(@Param("stationId") Integer stationId,@Param("targetDevice") Integer targetDevice,@Param("signal") String signal,@Param("isRecovery") Integer isRecovery);-->
|
||||
<select id="selectByParams" resultType="com.ho.flow.vo.Event">
|
||||
SELECT
|
||||
<include refid="Base_Column_List"/>
|
||||
FROM `event`
|
||||
<where>
|
||||
<if test="stationId != null">
|
||||
and station_id = #{stationId,jdbcType=INTEGER}
|
||||
</if>
|
||||
<if test="targetDevice != null">
|
||||
and target_device = #{targetDevice,jdbcType=INTEGER}
|
||||
</if>
|
||||
<if test="signal != null">
|
||||
and `signal` = #{signal,jdbcType=VARCHAR}
|
||||
</if>
|
||||
<if test="isRecovery != null">
|
||||
and is_recovery = #{isRecovery,jdbcType=INTEGER}
|
||||
</if>
|
||||
order by time_stamp desc limit 1
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectByParam" resultType="com.ho.flow.vo.Event">
|
||||
SELECT
|
||||
<include refid="Base_Column_List"/>
|
||||
FROM `event`
|
||||
<where>
|
||||
<if test="vo.stationId != null">
|
||||
and station_id = #{vo.stationId,jdbcType=INTEGER}
|
||||
</if>
|
||||
<if test="vo.timeStamp != null">
|
||||
and time_stamp <= #{vo.timeStamp}
|
||||
</if>
|
||||
<if test="vo.targetDevice != null">
|
||||
and target_device = #{vo.targetDevice,jdbcType=INTEGER}
|
||||
</if>
|
||||
<if test="vo.signal != null">
|
||||
and `signal` = #{vo.signal,jdbcType=VARCHAR}
|
||||
</if>
|
||||
<if test="vo.isRecovery != null">
|
||||
and is_recovery = #{vo.isRecovery,jdbcType=INTEGER}
|
||||
</if>
|
||||
<if test="vo.eventLevel != null">
|
||||
and event_level = #{vo.eventLevel,jdbcType=INTEGER}
|
||||
</if>
|
||||
order by time_stamp desc limit 1
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectByTargetDevice" resultType="com.ho.flow.vo.Event">
|
||||
SELECT
|
||||
<include refid="Base_Column_List"/>
|
||||
FROM `event`
|
||||
<where>
|
||||
<if test="alarmConfigQueryVo.groupId != null">
|
||||
and group_id = #{alarmConfigQueryVo.groupId}
|
||||
</if>
|
||||
<if test="alarmConfigQueryVo.stationId != null">
|
||||
and station_id = #{alarmConfigQueryVo.stationId}
|
||||
</if>
|
||||
<if test="alarmConfigQueryVo.deviceType != null">
|
||||
and device_type = #{alarmConfigQueryVo.deviceType}
|
||||
</if>
|
||||
<if test="alarmConfigQueryVo.srcId != null">
|
||||
and target_device = #{alarmConfigQueryVo.srcId}
|
||||
</if>
|
||||
<if test="alarmConfigQueryVo.startTime != null">
|
||||
and time_stamp >= #{alarmConfigQueryVo.startTime}
|
||||
</if>
|
||||
<if test="alarmConfigQueryVo.endTime != null">
|
||||
and time_stamp < #{alarmConfigQueryVo.endTime}
|
||||
</if>
|
||||
<if test="alarmConfigQueryVo.signal != null">
|
||||
and `signal` = #{alarmConfigQueryVo.signal}
|
||||
</if>
|
||||
<if test="alarmConfigQueryVo.isRecovery != null">
|
||||
and is_recovery = #{alarmConfigQueryVo.isRecovery}
|
||||
</if>
|
||||
<if test="alarmConfigQueryVo.eventLevelList != null and alarmConfigQueryVo.eventLevelList.size !=0 ">
|
||||
and event_level in
|
||||
<foreach collection="alarmConfigQueryVo.eventLevelList" open="(" close=")" separator="," item="item">
|
||||
#{item}
|
||||
</foreach>
|
||||
</if>
|
||||
</where>
|
||||
order by time_stamp desc
|
||||
</select>
|
||||
|
||||
<select id="selectByTargetDeviceAsc" resultType="com.ho.flow.vo.Event">
|
||||
SELECT
|
||||
<include refid="Base_Column_List"/>
|
||||
FROM `event`
|
||||
<where>
|
||||
<if test="alarmConfigQueryVo.groupId != null">
|
||||
and group_id = #{alarmConfigQueryVo.groupId}
|
||||
</if>
|
||||
<if test="alarmConfigQueryVo.stationId != null">
|
||||
and station_id = #{alarmConfigQueryVo.stationId}
|
||||
</if>
|
||||
<if test="alarmConfigQueryVo.deviceType != null">
|
||||
and device_type = #{alarmConfigQueryVo.deviceType}
|
||||
</if>
|
||||
<if test="alarmConfigQueryVo.srcId != null">
|
||||
and target_device = #{alarmConfigQueryVo.srcId}
|
||||
</if>
|
||||
<if test="alarmConfigQueryVo.eventLevelList != null and alarmConfigQueryVo.eventLevelList.size !=0 ">
|
||||
and event_level in
|
||||
<foreach collection="alarmConfigQueryVo.eventLevelList" open="(" close=")" separator="," item="item">
|
||||
#{item}
|
||||
</foreach>
|
||||
</if>
|
||||
<if test="alarmConfigQueryVo.startTime != null">
|
||||
and time_stamp >= #{alarmConfigQueryVo.startTime}
|
||||
</if>
|
||||
<if test="alarmConfigQueryVo.endTime != null">
|
||||
and time_stamp < #{alarmConfigQueryVo.endTime}
|
||||
</if>
|
||||
and `signal` != "polymerization"
|
||||
</where>
|
||||
order by time_stamp DESC
|
||||
</select>
|
||||
|
||||
<select id="selectLastTime" resultType="com.ho.flow.vo.Event">
|
||||
SELECT
|
||||
<include refid="Base_Column_List"/>
|
||||
FROM `event`
|
||||
<where>
|
||||
<if test="alarmConfigQueryVo.groupId != null">
|
||||
and group_id = #{alarmConfigQueryVo.groupId}
|
||||
</if>
|
||||
<if test="alarmConfigQueryVo.stationId != null">
|
||||
and station_id = #{alarmConfigQueryVo.stationId}
|
||||
</if>
|
||||
<if test="alarmConfigQueryVo.deviceType != null">
|
||||
and device_type = #{alarmConfigQueryVo.deviceType}
|
||||
</if>
|
||||
<if test="alarmConfigQueryVo.srcId != null">
|
||||
and target_device = #{alarmConfigQueryVo.srcId}
|
||||
</if>
|
||||
<if test="alarmConfigQueryVo.startTime != null">
|
||||
and time_stamp >= #{alarmConfigQueryVo.startTime}
|
||||
</if>
|
||||
<if test="alarmConfigQueryVo.endTime != null">
|
||||
and time_stamp < #{alarmConfigQueryVo.endTime}
|
||||
</if>
|
||||
</where>
|
||||
order by time_stamp desc LIMIT 1
|
||||
</select>
|
||||
|
||||
<select id="countEventByDay" resultType="com.ho.flow.vo.resp.event.EventDayNum">
|
||||
SELECT DATE_FORMAT(time_stamp,'%Y-%m-%d') as day,COUNT(event_type) AS COUNT
|
||||
FROM event
|
||||
where event_type IS NOT NULL
|
||||
<if test="record.startTime != null">
|
||||
and time_stamp >= #{record.startTime}
|
||||
</if>
|
||||
<if test="record.endTime != null">
|
||||
and time_stamp <= #{record.endTime}
|
||||
</if>
|
||||
<if test="record.stationIds != null and record.stationIds.size != 0">
|
||||
and station_id in
|
||||
<foreach collection="record.stationIds" open="(" close=")" separator="," item="item">
|
||||
#{item}
|
||||
</foreach>
|
||||
</if>
|
||||
<if test="record.userLevel != null and record.userLevel>0">
|
||||
and (`signal` = 'polymerization' or device_type ='accesspoint')
|
||||
</if>
|
||||
<if test="record.userLevel == null or record.userLevel==0">
|
||||
and `signal` != 'polymerization'
|
||||
</if>
|
||||
group by day
|
||||
</select>
|
||||
|
||||
<delete id="deleteByParam" parameterType="java.lang.Long">
|
||||
delete
|
||||
FROM `event`
|
||||
<where>
|
||||
and status = 0
|
||||
<if test="vo.stationId != null">
|
||||
and station_id = #{vo.stationId,jdbcType=INTEGER}
|
||||
</if>
|
||||
<if test="vo.timeStamp != null">
|
||||
and time_stamp <= #{vo.timeStamp}
|
||||
</if>
|
||||
<if test="vo.targetDevice != null">
|
||||
and target_device = #{vo.targetDevice,jdbcType=INTEGER}
|
||||
</if>
|
||||
<if test="vo.signal != null">
|
||||
and `signal` = #{vo.signal,jdbcType=VARCHAR}
|
||||
</if>
|
||||
<if test="vo.isRecovery != null">
|
||||
and is_recovery = #{vo.isRecovery,jdbcType=INTEGER}
|
||||
</if>
|
||||
<if test="vo.eventLevel != null">
|
||||
and event_level = #{vo.eventLevel,jdbcType=INTEGER}
|
||||
</if>
|
||||
<if test="vo.excludeId != null">
|
||||
and id != #{vo.excludeId}
|
||||
</if>
|
||||
</where>
|
||||
</delete>
|
||||
|
||||
<select id="eventDeviceNum" resultType="java.lang.Integer">
|
||||
SELECT count(0) faultDevice FROM event where status = 0 and station_id = #{vo.stationId} group by target_device
|
||||
</select>
|
||||
</mapper>
|
||||
@ -0,0 +1,188 @@
|
||||
<?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">
|
||||
<mapper namespace="com.ho.flow.mapper.OrderFormMapper">
|
||||
|
||||
<resultMap type="com.ho.common.tools.entity.OrderForm" id="OrderForm">
|
||||
<id property="id" column="id"/>
|
||||
<result property="orderNum" column="order_num"/>
|
||||
<result property="stationId" column="station_id"/>
|
||||
<result property="userId" column="user_id"/>
|
||||
<result property="eventId" column="event_id"/>
|
||||
<result property="deviceId" column="device_id"/>
|
||||
<result property="title" column="title"/>
|
||||
<result property="remark" column="remark"/>
|
||||
<result property="plannedTime" column="planned_time"/>
|
||||
<result property="createTime" column="create_time"/>
|
||||
<result property="priority" column="priority"/>
|
||||
<result property="orderType" column="order_type"/>
|
||||
<result property="status" column="status"/>
|
||||
<result property="suggestion" column="suggestion"/>
|
||||
<result property="processInstanceId" column="processInstance_id"/>
|
||||
<result property="processInstanceKey" column="processInstance_key"/>
|
||||
<collection property="orderFiles" javaType="java.util.List" resultMap="orderFile"/>
|
||||
</resultMap>
|
||||
|
||||
|
||||
<resultMap type="com.ho.common.tools.entity.file.OrderFile" id="orderFile">
|
||||
<id property="url" column="url"/>
|
||||
<result property="fileName" column="file_name"/>
|
||||
<result property="orderFormId" column="order_form_id"/>
|
||||
<result property="sort" column="sort"/>
|
||||
</resultMap>
|
||||
|
||||
<insert id="insertOrderFormOne" useGeneratedKeys="true" keyProperty="id">
|
||||
insert into order_form
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="orderNum != null ">order_num,</if>
|
||||
<if test="stationId != null ">station_id,</if>
|
||||
<if test="userId != null ">user_id,</if>
|
||||
<if test="eventId != null ">event_id,</if>
|
||||
<if test="deviceId != null ">device_id,</if>
|
||||
<if test="title != null ">title,</if>
|
||||
<if test="remark != null ">remark,</if>
|
||||
<if test="plannedTime != null ">planned_time,</if>
|
||||
<if test="createTime != null ">create_time,</if>
|
||||
<if test="priority != null ">priority,</if>
|
||||
<if test="orderType != null ">order_type,</if>
|
||||
<if test="processInstanceId != null ">processInstance_id,</if>
|
||||
<if test="processInstanceKey != null ">processInstance_key,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="orderNum != null ">#{orderNum},</if>
|
||||
<if test="stationId != null ">#{stationId},</if>
|
||||
<if test="userId != null ">#{userId},</if>
|
||||
<if test="eventId != null ">#{eventId},</if>
|
||||
<if test="deviceId != null ">#{deviceId},</if>
|
||||
<if test="title != null ">#{title},</if>
|
||||
<if test="remark != null ">#{remark},</if>
|
||||
<if test="plannedTime != null ">#{plannedTime},</if>
|
||||
<if test="createTime != null ">#{createTime},</if>
|
||||
<if test="priority != null ">#{priority},</if>
|
||||
<if test="orderType != null ">#{orderType},</if>
|
||||
<if test="processInstanceId != null ">#{processInstanceId},</if>
|
||||
<if test="processInstanceKey != null ">#{processInstanceKey},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
<insert id="insertOrderFileOne">
|
||||
insert into order_file
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="url != null ">url,</if>
|
||||
<if test="fileName != null ">file_name,</if>
|
||||
<if test="orderFormId != null ">order_form_id,</if>
|
||||
<if test="sort != null ">sort,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="url != null ">#{url},</if>
|
||||
<if test="fileName != null ">#{fileName},</if>
|
||||
<if test="orderFormId != null ">#{orderFormId},</if>
|
||||
<if test="sort != null ">#{sort},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<delete id="deleteFile">
|
||||
delete
|
||||
from order_file
|
||||
where order_form_id = #{orderFormId}
|
||||
</delete>
|
||||
<update id="update">
|
||||
update order_form
|
||||
<set>
|
||||
<if test="orderNum != null ">order_num = #{orderNum},</if>
|
||||
<if test="stationId != null ">station_id = #{stationId},</if>
|
||||
<if test="userId != null ">user_id = #{userId},</if>
|
||||
<if test="eventId != null ">event_id = #{eventId},</if>
|
||||
<if test="deviceId != null ">device_id = #{deviceId},</if>
|
||||
<if test="title != null ">title = #{title},</if>
|
||||
<if test="remark != null ">remark = #{remark},</if>
|
||||
<if test="priority != null ">priority = #{priority},</if>
|
||||
<if test="plannedTime != null ">planned_time = #{plannedTime},</if>
|
||||
<if test="createTime != null ">create_time = #{createTime},</if>
|
||||
<if test="orderType != null ">order_type = #{orderType},</if>
|
||||
<if test="processInstanceId != null ">processInstance_id = #{processInstanceId},</if>
|
||||
<if test="processInstanceKey != null ">processInstance_key = #{processInstanceKey},</if>
|
||||
</set>
|
||||
where id = #{id}
|
||||
</update>
|
||||
<update id="updateStatus">
|
||||
update order_form
|
||||
<set>
|
||||
<if test="id != null">
|
||||
status = 1,
|
||||
</if>
|
||||
<if test="suggestion != null and suggestion != ''">
|
||||
suggestion = #{suggestion},
|
||||
</if>
|
||||
</set>
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
|
||||
<select id="selectByProcessInstanceId" resultMap="OrderForm">
|
||||
select form.*,file.url url ,file.file_name file_name,file.order_form_id order_form_id,file.sort sort
|
||||
from order_form form
|
||||
left join order_file file on form.id = file.order_form_id
|
||||
<where>
|
||||
<if test="processInstanceId != null and processInstanceId != ''">
|
||||
form.processInstance_id = #{processInstanceId}
|
||||
</if>
|
||||
</where>
|
||||
</select>
|
||||
<select id="selectByUserId" resultMap="OrderForm">
|
||||
select form.*,file.url url ,file.file_name file_name,file.order_form_id order_form_id,file.sort sort
|
||||
from order_form form
|
||||
left join order_file file on form.id = file.order_form_id
|
||||
<where>
|
||||
<if test="userId != null and userId != ''">
|
||||
and form.user_id = #{userId}
|
||||
</if>
|
||||
<if test="userId != null and userId != ''">
|
||||
and form.status = 0
|
||||
</if>
|
||||
</where>
|
||||
limit 1
|
||||
</select>
|
||||
|
||||
<select id="selectByOrderId" resultMap="OrderForm">
|
||||
select form.*,file.url url ,file.file_name file_name,file.order_form_id order_form_id,file.sort sort
|
||||
from order_form form
|
||||
left join order_file file on form.id = file.order_form_id
|
||||
where form.id = #{orderFormId}
|
||||
</select>
|
||||
|
||||
<select id="selectFinishByUserId" resultMap="OrderForm">
|
||||
select form.*,file.url url ,file.file_name file_name,file.order_form_id order_form_id,file.sort sort
|
||||
from order_form form
|
||||
left join order_file file on form.id = file.order_form_id
|
||||
<where>
|
||||
<if test="userId != null and userId != ''">
|
||||
and form.user_id = #{userId}
|
||||
</if>
|
||||
<if test="userId != null and userId != ''">
|
||||
and form.status = 1
|
||||
</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="getInspectionOrders" resultType="com.ho.common.tools.entity.OrderForm">
|
||||
select form.* from order_form form where id in (
|
||||
select distinct a.order_id from business_db.inspection_fault a , business_db.inspection_report b
|
||||
where a.report_id = b.id and a.order_id is not null and b.station_id =#{stationId})
|
||||
</select>
|
||||
|
||||
<select id="selectOrderFormList" resultType="com.ho.common.tools.entity.OrderForm">
|
||||
select form.*,file.url url ,file.file_name file_name,file.order_form_id order_form_id,file.sort sort
|
||||
from order_form form
|
||||
left join order_file file on form.id = file.order_form_id
|
||||
<where>
|
||||
<if test="userId != null and userId != ''">
|
||||
and form.user_id = #{userId}
|
||||
</if>
|
||||
<if test="userId != null and userId != ''">
|
||||
and form.status = 0
|
||||
</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
@ -0,0 +1,91 @@
|
||||
<?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">
|
||||
<mapper namespace="com.ho.flow.mapper.ProcessManagementMapper">
|
||||
|
||||
<resultMap id="BaseResultMap" type="com.ho.flow.entity.ProcessTemplate">
|
||||
<id property="id" column="id" jdbcType="INTEGER"/>
|
||||
<result property="serialNum" column="serial_num" jdbcType="BIGINT"/>
|
||||
<result property="name" column="name" jdbcType="VARCHAR"/>
|
||||
<result property="type" column="type" jdbcType="INTEGER"/>
|
||||
<result property="remark" column="remark" jdbcType="VARCHAR"/>
|
||||
<result property="createTime" column="create_time" jdbcType="TIMESTAMP"/>
|
||||
<result property="status" column="status" jdbcType="TINYINT"/>
|
||||
</resultMap>
|
||||
|
||||
<sql id="Base_Column_List">
|
||||
id
|
||||
,serial_num,name,
|
||||
type,remark,create_time,
|
||||
status
|
||||
</sql>
|
||||
<insert id="insert" keyColumn="id" keyProperty="id" parameterType="com.ho.flow.entity.ProcessTemplate"
|
||||
useGeneratedKeys="true">
|
||||
insert into process_management
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="serialNum != null">serial_num,</if>
|
||||
<if test="name != null and name != ''">name,</if>
|
||||
<if test="type != null">type,</if>
|
||||
<if test="remark != null and remark != ''">remark,</if>
|
||||
<if test="createTime != null">create_time,</if>
|
||||
<if test="status != null ">status,</if>
|
||||
<if test="processBpmn != null ">process_bpmn,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="serialNum != null">#{serialNum},</if>
|
||||
<if test="name != null and name != ''">#{name},</if>
|
||||
<if test="type != null">#{type},</if>
|
||||
<if test="remark != null and remark != ''">#{remark},</if>
|
||||
<if test="createTime != null">#{createTime},</if>
|
||||
<if test="status != null ">#{status},</if>
|
||||
<if test="processBpmn != null ">#{processBpmn},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
<update id="update">
|
||||
update process_management
|
||||
<set>
|
||||
<if test="serialNum != null ">serial_num = #{serialNum},</if>
|
||||
<if test="name != null and name != ''">name = #{name},</if>
|
||||
<if test="type != null">type = #{type},</if>
|
||||
<if test="remark != null and remark != ''">remark = #{remark},</if>
|
||||
<if test="createTime != null">create_time = #{createTime},</if>
|
||||
<if test="status != null ">status = #{status},</if>
|
||||
<if test="processBpmn != null ">process_bpmn = #{processBpmn},</if>
|
||||
</set>
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
<delete id="delete">
|
||||
delete
|
||||
from process_management
|
||||
where id = #{id,jdbcType=INTEGER}
|
||||
</delete>
|
||||
|
||||
<select id="selectList" resultType="com.ho.flow.entity.ProcessTemplate">
|
||||
select
|
||||
<include refid="Base_Column_List"/>
|
||||
from process_management
|
||||
<where>
|
||||
<if test="serialNum != null">and serial_num = LIKE CONCAT('%',#{serialNum},'%'),</if>
|
||||
<if test="name != null and name != ''">and name = LIKE CONCAT('%',#{name},'%'),</if>
|
||||
<if test="type != null">and type = #{type},</if>
|
||||
<if test="remark != null and remark != ''">and remark = #{remark},</if>
|
||||
<if test="createTime != null">and create_time = #{createTime},</if>
|
||||
<if test="status != null ">and status = #{status},</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectById" resultType="com.ho.flow.entity.ProcessTemplate">
|
||||
select
|
||||
<include refid="Base_Column_List"/>
|
||||
from process_management
|
||||
where id = #{id}
|
||||
</select>
|
||||
<select id="selectBpmnById" resultType="java.lang.String">
|
||||
select
|
||||
process_bpmn
|
||||
from process_management
|
||||
where id = #{id}
|
||||
</select>
|
||||
</mapper>
|
||||
@ -0,0 +1,91 @@
|
||||
<?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">
|
||||
<mapper namespace="com.ho.flow.mapper.ProcessTemplateMapper">
|
||||
|
||||
<resultMap id="BaseResultMap" type="com.ho.flow.entity.ProcessTemplate">
|
||||
<id property="id" column="id" jdbcType="INTEGER"/>
|
||||
<result property="serialNum" column="serial_num" jdbcType="VARCHAR"/>
|
||||
<result property="name" column="name" jdbcType="VARCHAR"/>
|
||||
<result property="type" column="type" jdbcType="INTEGER"/>
|
||||
<result property="remark" column="remark" jdbcType="VARCHAR"/>
|
||||
<result property="createTime" column="create_time" jdbcType="TIMESTAMP"/>
|
||||
<result property="status" column="status" jdbcType="TINYINT"/>
|
||||
</resultMap>
|
||||
|
||||
<sql id="Base_Column_List">
|
||||
id
|
||||
,serial_num,name,
|
||||
type,remark,create_time,
|
||||
status
|
||||
</sql>
|
||||
<insert id="insert" keyColumn="id" keyProperty="id" parameterType="com.ho.flow.entity.ProcessTemplate"
|
||||
useGeneratedKeys="true">
|
||||
insert into process_template
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="serialNum != null and serialNum != ''">serial_num,</if>
|
||||
<if test="name != null and name != ''">name,</if>
|
||||
<if test="type != null">type,</if>
|
||||
<if test="remark != null and remark != ''">remark,</if>
|
||||
<if test="createTime != null">create_time,</if>
|
||||
<if test="status != null ">status,</if>
|
||||
<if test="processBpmn != null ">process_bpmn,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="serialNum != null and serialNum != ''">#{serialNum},</if>
|
||||
<if test="name != null and name != ''">#{name},</if>
|
||||
<if test="type != null">#{type},</if>
|
||||
<if test="remark != null and remark != ''">#{remark},</if>
|
||||
<if test="createTime != null">#{createTime},</if>
|
||||
<if test="status != null ">#{status},</if>
|
||||
<if test="processBpmn != null ">#{processBpmn},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
<update id="update">
|
||||
update process_template
|
||||
<set>
|
||||
<if test="serialNum != null and serialNum != ''">serial_num = #{serialNum},</if>
|
||||
<if test="name != null and name != ''">name = #{name},</if>
|
||||
<if test="type != null">type = #{type},</if>
|
||||
<if test="remark != null and remark != ''">remark = #{remark},</if>
|
||||
<if test="createTime != null">create_time = #{createTime},</if>
|
||||
<if test="status != null ">status = #{status},</if>
|
||||
<if test="processBpmn != null ">process_bpmn = #{processBpmn},</if>
|
||||
</set>
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
<delete id="delete">
|
||||
delete
|
||||
from process_template
|
||||
where id = #{id,jdbcType=INTEGER}
|
||||
</delete>
|
||||
|
||||
<select id="selectList" resultType="com.ho.flow.entity.ProcessTemplate">
|
||||
select
|
||||
<include refid="Base_Column_List"/>
|
||||
from process_template
|
||||
<where>
|
||||
<if test="serialNum != null">and serial_num LIKE concat('%',#{serialNum},'%')</if>
|
||||
<if test="name != null and name != ''">and `name` LIKE concat('%',#{name},'%')</if>
|
||||
<if test="type != null">and type = #{type}</if>
|
||||
<if test="remark != null and remark != ''">and remark = #{remark}</if>
|
||||
<if test="createTime != null">and create_time = #{createTime}</if>
|
||||
<if test="status != null ">and status = #{status}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectById" resultType="com.ho.flow.entity.ProcessTemplate">
|
||||
select
|
||||
<include refid="Base_Column_List"/>
|
||||
from process_template
|
||||
where id = #{id}
|
||||
</select>
|
||||
<select id="selectBpmnById" resultType="java.lang.String">
|
||||
select
|
||||
process_bpmn
|
||||
from process_template
|
||||
where id = #{id}
|
||||
</select>
|
||||
</mapper>
|
||||
@ -0,0 +1,124 @@
|
||||
<?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">
|
||||
<mapper namespace="com.ho.flow.mapper.SendSmsConfigMapper">
|
||||
|
||||
<sql id="Base_Column_List">
|
||||
id
|
||||
,station_id,user_id,username,phone,real_name,dept_name,email,
|
||||
sms_type,alarm_level,create_id,update_id,create_time,update_time,is_send_now,delay_data
|
||||
</sql>
|
||||
|
||||
<sql id="Insert_Batch_Column_List">
|
||||
station_id
|
||||
,user_id,username,phone,real_name,dept_name,email,
|
||||
sms_type,alarm_level,create_id,create_time,is_send_now,delay_data
|
||||
</sql>
|
||||
|
||||
<select id="selectList" resultType="com.ho.flow.vo.resp.SendSmsConfig.SendSmsConfigRsp">
|
||||
select
|
||||
<include refid="Base_Column_List"/>
|
||||
from send_sms_config
|
||||
<where>
|
||||
<if test="vo.stationId != null">
|
||||
and station_id = #{vo.stationId}
|
||||
</if>
|
||||
<if test="vo.isSendNow != null">
|
||||
and is_send_now = #{vo.isSendNow}
|
||||
</if>
|
||||
<if test="vo.username != null">
|
||||
and username like concat('%',#{vo.username},'%')
|
||||
</if>
|
||||
<if test="vo.phone != null">
|
||||
and phone like concat('%',#{vo.phone},'%')
|
||||
</if>
|
||||
<if test="vo.smsType != null">
|
||||
and sms_type like concat('%',#{vo.smsType},'%')
|
||||
</if>
|
||||
<if test="vo.alarmLevel != null">
|
||||
and alarm_level like concat('%',#{vo.alarmLevel},'%')
|
||||
</if>
|
||||
<if test="vo.userIds != null and vo.userIds.size > 0">
|
||||
and user_id in
|
||||
<foreach collection="vo.userIds" item="item" open="(" close=")" separator=",">
|
||||
#{item}
|
||||
</foreach>
|
||||
</if>
|
||||
</where>
|
||||
order by create_time desc
|
||||
</select>
|
||||
|
||||
<insert id="insertList">
|
||||
insert into send_sms_config (<include refid="Insert_Batch_Column_List"/>)
|
||||
values
|
||||
<foreach item="item" collection="list" index="index" separator=",">
|
||||
(
|
||||
#{item.stationId},#{item.userId},#{item.username},#{item.phone},#{item.realName},
|
||||
#{item.deptName},#{item.email},#{item.smsType},#{item.alarmLevel},#{item.createId},now(),#{item.isSendNow},#{item.delayData}
|
||||
)
|
||||
</foreach>
|
||||
</insert>
|
||||
|
||||
<update id="updateById">
|
||||
update send_sms_config
|
||||
<set>
|
||||
<if test="vo.smsType != null">
|
||||
sms_type = #{vo.smsType},
|
||||
</if>
|
||||
<if test="vo.alarmLevel != null">
|
||||
alarm_level = #{vo.alarmLevel},
|
||||
</if>
|
||||
<if test="vo.updateId != null">
|
||||
update_id = #{vo.updateId},
|
||||
</if>
|
||||
<if test="vo.updateTime != null">
|
||||
update_time = #{vo.updateTime},
|
||||
</if>
|
||||
<if test="vo.isSendNow != null">
|
||||
is_send_now = #{vo.isSendNow},
|
||||
</if>
|
||||
<if test="vo.delayData != null">
|
||||
delay_data = #{vo.delayData},
|
||||
</if>
|
||||
</set>
|
||||
where id = #{vo.id}
|
||||
</update>
|
||||
|
||||
<update id="updateByUserId">
|
||||
update send_sms_config
|
||||
<set>
|
||||
<if test="vo.username != null">
|
||||
username = #{vo.username},
|
||||
</if>
|
||||
<if test="vo.phone != null">
|
||||
phone = #{vo.phone},
|
||||
</if>
|
||||
<if test="vo.realName != null">
|
||||
real_name = #{vo.realName},
|
||||
</if>
|
||||
<if test="vo.deptName != null">
|
||||
dept_name = #{vo.deptName},
|
||||
</if>
|
||||
<if test="vo.email != null">
|
||||
email = #{vo.email},
|
||||
</if>
|
||||
<if test="vo.updateTime != null">
|
||||
update_time = #{vo.updateTime},
|
||||
</if>
|
||||
</set>
|
||||
where user_id = #{vo.userId}
|
||||
</update>
|
||||
|
||||
<delete id="deleteBatch">
|
||||
delete
|
||||
from send_sms_config
|
||||
<where>
|
||||
and id in
|
||||
<foreach collection="ids" open="(" close=")" separator="," item="item">
|
||||
#{item}
|
||||
</foreach>
|
||||
</where>
|
||||
</delete>
|
||||
|
||||
</mapper>
|
||||
@ -0,0 +1,73 @@
|
||||
<?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">
|
||||
<mapper namespace="com.ho.flow.mapper.WorkOrderCirculationMapper">
|
||||
|
||||
|
||||
<sql id="Base_Column_List">
|
||||
id
|
||||
,order_id,from_id,
|
||||
to_id,create_time,work_order_action,`desc`
|
||||
</sql>
|
||||
|
||||
<select id="selectByPrimaryKey" parameterType="java.lang.Long"
|
||||
resultType="com.ho.flow.vo.WorkOrderCirculation">
|
||||
select
|
||||
<include refid="Base_Column_List"/>
|
||||
from work_order_circulation
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</select>
|
||||
<select id="selectByOrderId" resultType="com.ho.flow.vo.resp.workorder.WorkOrderCirculationRespVO">
|
||||
select
|
||||
<include refid="Base_Column_List"/>
|
||||
from work_order_circulation
|
||||
where order_id LIKE concat('%',#{orderId},'%')
|
||||
</select>
|
||||
|
||||
<insert id="insert" keyColumn="id" keyProperty="id" parameterType="com.ho.flow.vo.WorkOrderCirculation"
|
||||
useGeneratedKeys="true">
|
||||
insert into work_order_circulation
|
||||
(id, order_id, from_id,
|
||||
to_id, `desc`, work_order_action)
|
||||
values ( #{id,jdbcType=BIGINT}, #{orderId,jdbcType=VARCHAR}, #{fromId,jdbcType=VARCHAR}
|
||||
, #{toId,jdbcType=VARCHAR}, #{desc,jdbcType=VARCHAR}
|
||||
, #{workOrderAction,jdbcType=INTEGER})
|
||||
</insert>
|
||||
<insert id="insertSelective" keyColumn="id" keyProperty="id"
|
||||
parameterType="com.ho.flow.vo.WorkOrderCirculation" useGeneratedKeys="true">
|
||||
insert into work_order_circulation
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="id != null">id,</if>
|
||||
<if test="orderId != null">order_id,</if>
|
||||
<if test="fromId != null">from_id,</if>
|
||||
<if test="toId != null">to_id,</if>
|
||||
<if test="createTime != null">create_time,</if>
|
||||
<if test="desc != null">`desc`,</if>
|
||||
<if test="workOrderAction">work_order_action,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="id != null">#{id,jdbcType=BIGINT},</if>
|
||||
<if test="orderId != null">#{orderId,jdbcType=VARCHAR},</if>
|
||||
<if test="fromId != null">#{fromId,jdbcType=INTEGER},</if>
|
||||
<if test="toId != null">#{toId,jdbcType=VARCHAR},</if>
|
||||
<if test="createTime != null">#{createTime,jdbcType=TIMESTAMP},</if>
|
||||
<if test="desc != null">#{desc,jdbcType=VARCHAR},</if>
|
||||
<if test="workOrderAction">#{workOrderAction,jdbcType=INTEGER}</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<insert id="insertBatch">
|
||||
insert into work_order_circulation
|
||||
( id,order_id, from_id,
|
||||
to_id, `desc`, work_order_action)
|
||||
values
|
||||
<foreach item="item" collection="list" index="index" separator=",">
|
||||
(
|
||||
#{item.id},#{item.orderId},
|
||||
#{item.fromId},#{item.toId},#{item.desc},
|
||||
#{item.workOrderAction}
|
||||
)
|
||||
</foreach>
|
||||
</insert>
|
||||
</mapper>
|
||||
@ -0,0 +1,321 @@
|
||||
<?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">
|
||||
<mapper namespace="com.ho.flow.mapper.WorkOrderHisMapper">
|
||||
|
||||
|
||||
<sql id="Base_Column_List">
|
||||
`id`
|
||||
, `order_id`, `group_id`, `dept_id`, `station_id`,
|
||||
`from_id`, `phone`, `to_id`, `event_id`, `event_level`, `desc`, `create_time`,
|
||||
`receive_time`, `complete_time`, `work_order_status`, `work_order_type`
|
||||
</sql>
|
||||
|
||||
<select id="selectByPrimaryKey" parameterType="java.lang.Long" resultType="com.ho.flow.vo.WorkOrderOld">
|
||||
select
|
||||
<include refid="Base_Column_List"/>
|
||||
from work_order
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</select>
|
||||
|
||||
<select id="selectByOrderId" resultType="com.ho.flow.vo.WorkOrderOld">
|
||||
select
|
||||
<include refid="Base_Column_List"/>
|
||||
from work_order
|
||||
where order_id = #{orderId}
|
||||
</select>
|
||||
|
||||
<select id="selectByStatus" resultType="com.ho.flow.vo.WorkOrderOld">
|
||||
select
|
||||
<include refid="Base_Column_List"/>
|
||||
from work_order
|
||||
where order_id = #{orderId}
|
||||
</select>
|
||||
|
||||
<select id="selectByPageInfo" resultType="com.ho.flow.vo.resp.workorder.WorkOrderOldPageRespVO">
|
||||
select
|
||||
<include refid="Base_Column_List"/>
|
||||
from work_order
|
||||
<where>
|
||||
and work_order_status != 4
|
||||
<if test="orderId != null and orderId != ''">
|
||||
and order_id LIKE concat('%',#{orderId},'%')
|
||||
</if>
|
||||
<if test="groupId != null">
|
||||
and group_id = #{groupId}
|
||||
</if>
|
||||
<if test="stationId != null">
|
||||
and station_id = #{stationId}
|
||||
</if>
|
||||
<if test="stationIds != null and stationIds.size() !=0">
|
||||
and station_id in
|
||||
<foreach collection="stationIds" item="item" open="(" close=")" separator=",">
|
||||
#{item}
|
||||
</foreach>
|
||||
</if>
|
||||
<if test="orderIds != null and orderIds.size() !=0">
|
||||
and order_id in
|
||||
<foreach collection="orderIds" item="item" open="(" close=")" separator=",">
|
||||
#{item}
|
||||
</foreach>
|
||||
</if>
|
||||
<if test="eventLevel != null">
|
||||
and event_level = #{eventLevel}
|
||||
</if>
|
||||
<if test="workOrderStatus != null">
|
||||
and work_order_status = #{workOrderStatus}
|
||||
</if>
|
||||
<if test="workOrderType != null">
|
||||
and work_order_type = #{workOrderType}
|
||||
</if>
|
||||
<if test="beginTime != null and endTime != null">
|
||||
and create_time between #{beginTime} and #{endTime}
|
||||
</if>
|
||||
<if test="toIds != null and toIds.size() != 0">
|
||||
and to_id in
|
||||
<foreach collection="toIds" open="(" close=")" separator="," item="item">
|
||||
#{item}
|
||||
</foreach>
|
||||
</if>
|
||||
<if test="roleLeader != null and roleLeader != ''">
|
||||
and (to_id = #{toId}
|
||||
or from_id = #{fromId})
|
||||
</if>
|
||||
<if test="roleWorker != null and roleWorker != ''">
|
||||
and (to_id = #{toId}
|
||||
or from_id = #{fromId})
|
||||
</if>
|
||||
<if test="roleOther != null and roleOther != ''">
|
||||
and (to_id = #{toId}
|
||||
or from_id = #{fromId})
|
||||
</if>
|
||||
|
||||
order by create_time desc,receive_time desc
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectByHisPageInfo" resultType="com.ho.flow.vo.resp.workorder.WorkOrderOldPageRespVO">
|
||||
select
|
||||
<include refid="Base_Column_List"/>
|
||||
from work_order
|
||||
<where>
|
||||
work_order_status = 4
|
||||
<if test="orderId != null and orderId != ''">
|
||||
and order_id LIKE concat('%',#{orderId},'%')
|
||||
</if>
|
||||
<if test="stationId != null">
|
||||
and station_id = #{stationId}
|
||||
</if>
|
||||
<if test="stationIds != null and stationIds.size() !=0">
|
||||
and station_id in
|
||||
<foreach collection="stationIds" item="item" open="(" close=")" separator=",">
|
||||
#{item}
|
||||
</foreach>
|
||||
</if>
|
||||
<if test="eventLevel != null">
|
||||
and event_level = #{eventLevel}
|
||||
</if>
|
||||
<if test="workOrderStatus != null">
|
||||
and work_order_status = #{workOrderStatus}
|
||||
</if>
|
||||
<if test="workOrderType != null">
|
||||
and work_order_type = #{workOrderType}
|
||||
</if>
|
||||
<if test="beginTime != null and endTime != null">
|
||||
and create_time between #{beginTime} and #{endTime}
|
||||
</if>
|
||||
order by create_time desc,receive_time desc
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectByEventId" resultType="com.ho.flow.vo.WorkOrderOld">
|
||||
select
|
||||
<include refid="Base_Column_List"/>
|
||||
from work_order
|
||||
where event_id = #{eventId,jdbcType=BIGINT}
|
||||
</select>
|
||||
<select id="selectByEventIds" resultType="com.ho.flow.vo.WorkOrderOld">
|
||||
select
|
||||
<include refid="Base_Column_List"/>
|
||||
from work_order
|
||||
where event_id in
|
||||
<foreach collection="eventIds" item="eventId" open="(" separator="," close=")">
|
||||
#{eventId}
|
||||
</foreach>
|
||||
</select>
|
||||
|
||||
<select id="selectByOrderIds" resultType="com.ho.flow.vo.resp.workorder.WorkOrderOldPageRespVO">
|
||||
select
|
||||
<include refid="Base_Column_List"/>
|
||||
from work_order
|
||||
where order_id in
|
||||
<foreach collection="orderIds" item="item" open="(" separator="," close=")">
|
||||
#{item}
|
||||
</foreach>
|
||||
</select>
|
||||
|
||||
|
||||
<delete id="deleteByPrimaryKey">
|
||||
Delete
|
||||
from work_order
|
||||
where order_id in
|
||||
<foreach collection="orderIds" item="orderId" open="(" separator="," close=")">
|
||||
#{orderId}
|
||||
</foreach>
|
||||
</delete>
|
||||
|
||||
<delete id="delete">
|
||||
Delete
|
||||
from work_order
|
||||
where order_id = #{orderId}
|
||||
</delete>
|
||||
|
||||
<insert id="insertSelective" keyColumn="id" keyProperty="id" parameterType="com.ho.flow.vo.WorkOrderOld"
|
||||
useGeneratedKeys="true">
|
||||
insert into work_order
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="id != null">id,</if>
|
||||
<if test="orderId != null">order_id,</if>
|
||||
<if test="groupId != null">group_id,</if>
|
||||
<if test="deptId != null">dept_id,</if>
|
||||
<if test="stationId != null">station_id,</if>
|
||||
<if test="fromId != null">from_id,</if>
|
||||
<if test="phone != null">phone,</if>
|
||||
<if test="toId != null">to_id,</if>
|
||||
<if test="eventId != null">event_id,</if>
|
||||
<if test="eventLevel != null">event_level,</if>
|
||||
<if test="desc != null">`desc`,</if>
|
||||
<if test="createTime != null">create_time,</if>
|
||||
<if test="receiveTime != null">receive_time,</if>
|
||||
<if test="completeTime != null">complete_time,</if>
|
||||
<if test="workOrderStatus != null">work_order_status,</if>
|
||||
<if test="workOrderType != null">work_order_type</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="id != null">#{id,jdbcType=BIGINT},</if>
|
||||
<if test="orderId != null">#{orderId,jdbcType=VARCHAR},</if>
|
||||
<if test="groupId != null">#{groupId,jdbcType=INTEGER},</if>
|
||||
<if test="deptId != null">#{deptId,jdbcType=INTEGER},</if>
|
||||
<if test="stationId != null">#{stationId,jdbcType=INTEGER},</if>
|
||||
<if test="fromId != null">#{fromId,jdbcType=VARCHAR},</if>
|
||||
<if test="phone != null">#{phone,jdbcType=VARCHAR},</if>
|
||||
<if test="toId != null">#{toId,jdbcType=VARCHAR},</if>
|
||||
<if test="eventId != null">#{eventId,jdbcType=BIGINT},</if>
|
||||
<if test="eventLevel != null">#{eventLevel,jdbcType=INTEGER},</if>
|
||||
<if test="desc != null">#{desc,jdbcType=VARCHAR},</if>
|
||||
<if test="createTime != null">#{createTime,jdbcType=TIMESTAMP},</if>
|
||||
<if test="receiveTime != null">#{receiveTime,jdbcType=TIMESTAMP},</if>
|
||||
<if test="completeTime != null">#{completeTime,jdbcType=TIMESTAMP},</if>
|
||||
<if test="workOrderStatus != null">#{workOrderStatus,jdbcType=INTEGER},</if>
|
||||
<if test="workOrderType != null">#{workOrderType,jdbcType=INTEGER},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<insert id="insertBatch">
|
||||
insert into work_order
|
||||
( id,order_id, group_id,
|
||||
dept_id, station_id, from_id,
|
||||
phone, to_id, event_id, event_level,
|
||||
`desc`, receive_time, complete_time,
|
||||
work_order_status, work_order_type)
|
||||
values
|
||||
<foreach item="item" collection="list" index="index" separator=",">
|
||||
(
|
||||
#{item.id},
|
||||
#{item.orderId},#{item.stationId},#{item.deptId},#{item.groupId},
|
||||
#{item.fromId},#{item.phone},#{item.toId},
|
||||
#{item.eventId},#{item.eventLevel},#{item.desc},
|
||||
#{item.receiveTime},#{item.completeTime},
|
||||
#{item.workOrderStatus},#{item.workOrderType}
|
||||
)
|
||||
</foreach>
|
||||
</insert>
|
||||
|
||||
<update id="updateReturnWorkOrder">
|
||||
update work_order
|
||||
<set>
|
||||
<if test="workOrderStatus != null">
|
||||
work_order_status = #{workOrderStatus,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="phone != null">
|
||||
phone = null,
|
||||
</if>
|
||||
<if test="toId != null">
|
||||
to_id = null,
|
||||
</if>
|
||||
<if test="receiveTime != null">
|
||||
receive_time = null,
|
||||
</if>
|
||||
</set>
|
||||
where order_id = #{orderId}
|
||||
</update>
|
||||
|
||||
<update id="updateByPrimaryKeySelective">
|
||||
update work_order
|
||||
<set>
|
||||
<if test="groupId != null">
|
||||
group_id = #{groupId,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="deptId != null">
|
||||
dept_id = #{deptId,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="stationId != null">
|
||||
station_id = #{stationId,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="fromId != null">
|
||||
from_id = #{fromId,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="phone != null">
|
||||
phone = #{phone,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="toId != null">
|
||||
to_id = #{toId,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="eventId != null">
|
||||
event_id = #{eventId,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="eventLevel != null">
|
||||
event_level = #{eventLevel,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="desc != null">
|
||||
`desc` = #{desc,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="createTime != null">
|
||||
create_time = #{createTime,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
<if test="receiveTime != null">
|
||||
receive_time = #{receiveTime,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
<if test="completeTime != null">
|
||||
complete_time = #{completeTime,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
<if test="workOrderStatus != null">
|
||||
work_order_status = #{workOrderStatus,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="workOrderType != null">
|
||||
work_order_type = #{workOrderType,jdbcType=INTEGER}
|
||||
</if>
|
||||
</set>
|
||||
where order_id = #{orderId}
|
||||
</update>
|
||||
|
||||
<update id="updateByPrimaryKey" parameterType="com.ho.flow.vo.WorkOrderOld">
|
||||
update work_order
|
||||
set group_id = #{groupId,jdbcType=INTEGER},
|
||||
dept_id = #{deptId,jdbcType=INTEGER},
|
||||
station_id = #{stationId,jdbcType=INTEGER},
|
||||
from_id = #{fromId,jdbcType=VARCHAR},
|
||||
phone = #{phone,jdbcType=VARCHAR},
|
||||
to_id = #{toId,jdbcType=VARCHAR},
|
||||
event_id = #{eventId,jdbcType=BIGINT},
|
||||
event_level = #{eventLevel,jdbcType=INTEGER},
|
||||
`desc` = #{desc,jdbcType=VARCHAR},
|
||||
create_time = #{createTime,jdbcType=TIMESTAMP},
|
||||
receive_time = #{receiveTime,jdbcType=TIMESTAMP},
|
||||
complete_time = #{completeTime,jdbcType=TIMESTAMP},
|
||||
work_order_status = #{workOrderStatus,jdbcType=INTEGER},
|
||||
work_order_order = #{workOrderType,jdbcType=INTEGER}
|
||||
where order_id = #{orderId,jdbcType=VARCHAR}
|
||||
</update>
|
||||
</mapper>
|
||||
@ -0,0 +1,240 @@
|
||||
<?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">
|
||||
<mapper namespace="com.ho.flow.mapper.WorkOrderMapper">
|
||||
|
||||
|
||||
<sql id="Base_Column_List">
|
||||
id
|
||||
,plan_title,title,
|
||||
planned_time,create_time,update_time,
|
||||
priority,phone,device_id,
|
||||
station_id,user_id,`desc`,order_id,
|
||||
process_id,group_id,event_id,order_type,deleted
|
||||
</sql>
|
||||
|
||||
<select id="selectByPrimaryKey" resultType="com.ho.flow.entity.WorkOrder">
|
||||
select
|
||||
<include refid="Base_Column_List"/>
|
||||
from work_order
|
||||
where id = #{id}
|
||||
</select>
|
||||
|
||||
<select id="selectByOrderId" resultType="com.ho.flow.vo.resp.workorder.WorkOrderRespVO">
|
||||
select
|
||||
<include refid="Base_Column_List"/>
|
||||
from work_order
|
||||
where order_id = #{orderId}
|
||||
</select>
|
||||
|
||||
<select id="selectByOrderIdAndTitle" resultType="com.ho.flow.vo.resp.workorder.WorkOrderRespVO">
|
||||
select
|
||||
<include refid="Base_Column_List"/>
|
||||
from work_order
|
||||
where order_id = #{orderId}
|
||||
<if test="title != null and title != ''">
|
||||
and title LIKE CONCAT('%',#{title},'%')
|
||||
</if>
|
||||
</select>
|
||||
|
||||
<select id="selectByProcessInstId" resultType="com.ho.flow.vo.resp.workorder.WorkOrderRespVO">
|
||||
select
|
||||
<include refid="Base_Column_List"/>
|
||||
from work_order
|
||||
where process_id = #{processInstId}
|
||||
</select>
|
||||
|
||||
<select id="selectByProcessInstIdAndTitle" resultType="com.ho.flow.vo.resp.workorder.WorkOrderRespVO">
|
||||
select
|
||||
<include refid="Base_Column_List"/>
|
||||
from work_order
|
||||
where process_id = #{processInstanceId}
|
||||
<if test="title != null and title != ''">
|
||||
and title LIKE CONCAT('%',#{title},'%')
|
||||
</if>
|
||||
</select>
|
||||
|
||||
<select id="selectByInfo" resultType="com.ho.flow.vo.resp.workorder.WorkOrderRespVO">
|
||||
select
|
||||
<include refid="Base_Column_List"/>
|
||||
from work_order
|
||||
<where>
|
||||
<if test="stationId !=null">
|
||||
and station_id = #{stationId}
|
||||
</if>
|
||||
<if test="processId !=null and processId != ''">
|
||||
and process_id = #{processId}
|
||||
</if>
|
||||
<if test="orderType !=null ">
|
||||
and order_type = #{orderType}
|
||||
</if>
|
||||
<if test="orderId !=null and orderId != ''">
|
||||
and order_id LIKE CONCAT('%',#{orderId},'%')
|
||||
</if>
|
||||
|
||||
<if test="orderIds != null and orderIds.size() !=0">
|
||||
and order_id in
|
||||
<foreach collection="orderIds" item="item" open="(" close=")" separator=",">
|
||||
#{item}
|
||||
</foreach>
|
||||
</if>
|
||||
</where>
|
||||
</select>
|
||||
<select id="selectByStationId" resultType="java.lang.Integer">
|
||||
select count(1)
|
||||
from work_order
|
||||
where station_id = #{stationId}
|
||||
and deleted = 1
|
||||
</select>
|
||||
|
||||
|
||||
<delete id="deleteByPrimaryKey">
|
||||
delete
|
||||
from work_order
|
||||
where id = #{id,jdbcType=INTEGER}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteByIds">
|
||||
delete
|
||||
from work_order
|
||||
where id in
|
||||
<foreach collection="ids" item="item" open="(" close=")" separator=",">
|
||||
#{item}
|
||||
</foreach>
|
||||
</delete>
|
||||
<insert id="insert" keyColumn="id" keyProperty="id" parameterType="com.ho.flow.entity.WorkOrder"
|
||||
useGeneratedKeys="true">
|
||||
insert into work_order
|
||||
( id, plan_title, title
|
||||
, planned_time, create_time, update_time
|
||||
, priority, phone, device_id
|
||||
, station_id, `desc`, order_id
|
||||
, process_id, group_id, event_id, order_type)
|
||||
values ( #{id}, #{planTitle,jdbcType=VARCHAR}, #{title,jdbcType=VARCHAR}
|
||||
, #{plannedTime,jdbcType=TIMESTAMP}, #{createTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP}
|
||||
, #{priority,jdbcType=INTEGER}, #{phone}, #{deviceId,jdbcType=INTEGER}
|
||||
, #{stationId,jdbcType=INTEGER}, #{desc,jdbcType=VARCHAR}, #{orderId,jdbcType=VARCHAR}
|
||||
, #{processId,jdbcType=VARCHAR}, #{groupId,jdbcType=INTEGER}, #{eventId}, #{orderType,jdbcType=INTEGER})
|
||||
</insert>
|
||||
<insert id="insertSelective" parameterType="com.ho.flow.entity.WorkOrder">
|
||||
insert into work_order
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="id != null">id,</if>
|
||||
<if test="planTitle != null">plan_title,</if>
|
||||
<if test="title != null">title,</if>
|
||||
<if test="plannedTime != null">planned_time,</if>
|
||||
<if test="createTime != null">create_time,</if>
|
||||
<if test="updateTime != null">update_time,</if>
|
||||
<if test="priority != null">priority,</if>
|
||||
<if test="phone != null">phone,</if>
|
||||
<if test="deviceId != null">device_id,</if>
|
||||
<if test="stationId != null">station_id,</if>
|
||||
<if test="userId != null">user_id,</if>
|
||||
<if test="desc != null">`desc`,</if>
|
||||
<if test="orderId != null">order_id,</if>
|
||||
<if test="processId != null">process_id,</if>
|
||||
<if test="groupId != null">group_id,</if>
|
||||
<if test="eventId != null">event_id,</if>
|
||||
<if test="orderType != null">order_type,</if>
|
||||
<if test="deleted != null">deleted,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="id != null">#{id},</if>
|
||||
<if test="planTitle != null">#{planTitle,jdbcType=VARCHAR},</if>
|
||||
<if test="title != null">#{title,jdbcType=VARCHAR},</if>
|
||||
<if test="plannedTime != null">#{plannedTime,jdbcType=TIMESTAMP},</if>
|
||||
<if test="createTime != null">#{createTime,jdbcType=TIMESTAMP},</if>
|
||||
<if test="updateTime != null">#{updateTime,jdbcType=TIMESTAMP},</if>
|
||||
<if test="priority != null">#{priority,jdbcType=INTEGER},</if>
|
||||
<if test="phone != null">#{phone},</if>
|
||||
<if test="deviceId != null">#{deviceId,jdbcType=INTEGER},</if>
|
||||
<if test="stationId != null">#{stationId,jdbcType=INTEGER},</if>
|
||||
<if test="userId != null">#{userId},</if>
|
||||
<if test="desc != null">#{desc,jdbcType=VARCHAR},</if>
|
||||
<if test="orderId != null">#{orderId,jdbcType=VARCHAR},</if>
|
||||
<if test="processId != null">#{processId,jdbcType=VARCHAR},</if>
|
||||
<if test="groupId != null">#{groupId,jdbcType=INTEGER},</if>
|
||||
<if test="eventId != null">#{eventId},</if>
|
||||
<if test="orderType != null">#{orderType,jdbcType=INTEGER},</if>
|
||||
<if test="deleted != null">#{deleted},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
<update id="updateByPrimaryKeySelective" parameterType="com.ho.flow.entity.WorkOrder">
|
||||
update work_order
|
||||
<set>
|
||||
<if test="planTitle != null">
|
||||
plan_title = #{planTitle,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="title != null">
|
||||
title = #{title,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="plannedTime != null">
|
||||
planned_time = #{plannedTime,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
<if test="createTime != null">
|
||||
create_time = #{createTime,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
<if test="updateTime != null">
|
||||
update_time = #{updateTime,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
<if test="priority != null">
|
||||
priority = #{priority,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="phone != null">
|
||||
phone = #{phone},
|
||||
</if>
|
||||
<if test="deviceId != null">
|
||||
device_id = #{deviceId,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="stationId != null">
|
||||
station_id = #{stationId,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="desc != null">
|
||||
`desc` = #{desc,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="orderId != null">
|
||||
order_id = #{orderId,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="processId != null">
|
||||
process_id = #{processId,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="groupId != null">
|
||||
group_id = #{groupId,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="eventId != null">
|
||||
event_id = #{eventId},
|
||||
</if>
|
||||
<if test="orderType != null">
|
||||
order_type = #{orderType,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="deleted != null">
|
||||
deleted = #{deleted},
|
||||
</if>
|
||||
</set>
|
||||
|
||||
where id = #{id}
|
||||
</update>
|
||||
<update id="updateByPrimaryKey" parameterType="com.ho.flow.entity.WorkOrder">
|
||||
update work_order
|
||||
set plan_title = #{planTitle,jdbcType=VARCHAR},
|
||||
title = #{title,jdbcType=VARCHAR},
|
||||
planned_time = #{plannedTime,jdbcType=TIMESTAMP},
|
||||
create_time = #{createTime,jdbcType=TIMESTAMP},
|
||||
update_time = #{updateTime,jdbcType=TIMESTAMP},
|
||||
priority = #{priority,jdbcType=INTEGER},
|
||||
phone = #{phone,jdbcType=INTEGER},
|
||||
device_id = #{deviceId,jdbcType=INTEGER},
|
||||
station_id = #{stationId,jdbcType=INTEGER},
|
||||
`desc` = #{desc,jdbcType=VARCHAR},
|
||||
order_id = #{orderId,jdbcType=VARCHAR},
|
||||
process_id = #{processId,jdbcType=VARCHAR} group_id = #{groupId,jdbcType=INTEGER}
|
||||
event_id = #{eventId}
|
||||
order_type = #{orderType,jdbcType=INTEGER}
|
||||
where id = #{id}
|
||||
</update>
|
||||
<update id="setEventNull">
|
||||
update work_order
|
||||
set event_id = null
|
||||
</update>
|
||||
</mapper>
|
||||
@ -0,0 +1,133 @@
|
||||
<?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">
|
||||
<mapper namespace="com.ho.flow.mapper.WorkOrderPictureMapper">
|
||||
|
||||
<resultMap id="BaseResultMap" type="com.ho.common.tools.entity.WorkOrderPicture">
|
||||
<id property="id" column="id" jdbcType="INTEGER"/>
|
||||
<result property="workOrderId" column="work_order_id" jdbcType="INTEGER"/>
|
||||
<result property="fileName" column="file_name" jdbcType="VARCHAR"/>
|
||||
<result property="url" column="url" jdbcType="VARCHAR"/>
|
||||
<result property="type" column="type" jdbcType="INTEGER"/>
|
||||
<result property="createTime" column="create_time" jdbcType="TIMESTAMP"/>
|
||||
</resultMap>
|
||||
|
||||
<sql id="Base_Column_List">
|
||||
id
|
||||
,work_order_id,file_name,
|
||||
url,type,create_time
|
||||
</sql>
|
||||
|
||||
<select id="selectByPrimaryKey" resultMap="BaseResultMap">
|
||||
select
|
||||
<include refid="Base_Column_List"/>
|
||||
from work_order_picture
|
||||
where id = #{id,jdbcType=INTEGER}
|
||||
</select>
|
||||
|
||||
<select id="selectByWorkOrderIdAndType" resultType="com.ho.common.tools.entity.WorkOrderPicture">
|
||||
select
|
||||
<include refid="Base_Column_List"/>
|
||||
from work_order_picture
|
||||
where work_order_id = #{workOrderId}
|
||||
and type = #{type}
|
||||
</select>
|
||||
<select id="selectAll" resultType="com.ho.common.tools.entity.WorkOrderPicture">
|
||||
select
|
||||
<include refid="Base_Column_List"/>
|
||||
from work_order_picture
|
||||
</select>
|
||||
|
||||
<delete id="deleteByPrimaryKey">
|
||||
delete
|
||||
from work_order_picture
|
||||
where id = #{id,jdbcType=INTEGER}
|
||||
</delete>
|
||||
|
||||
<delete id="deletedBySrcIdsAndType">
|
||||
delete from work_order_picture
|
||||
<where>
|
||||
<if test="ids != null and ids.size() != 0">
|
||||
and id in
|
||||
<foreach collection="ids" open="(" close=")" separator="," item="item">
|
||||
#{item}
|
||||
</foreach>
|
||||
</if>
|
||||
<if test="type != null">
|
||||
and type = #{type}
|
||||
</if>
|
||||
</where>
|
||||
</delete>
|
||||
|
||||
<insert id="insert" keyColumn="id" keyProperty="id" parameterType="com.ho.common.tools.entity.WorkOrderPicture"
|
||||
useGeneratedKeys="true">
|
||||
insert into work_order_picture
|
||||
( id, work_order_id, file_name
|
||||
, url, type, create_time)
|
||||
values ( #{id,jdbcType=INTEGER}, #{workOrderId,jdbcType=INTEGER}, #{fileName,jdbcType=VARCHAR}
|
||||
, #{url,jdbcType=VARCHAR}, #{type,jdbcType=INTEGER}, #{createTime,jdbcType=TIMESTAMP})
|
||||
</insert>
|
||||
<insert id="insertSelective" keyColumn="id" keyProperty="id"
|
||||
parameterType="com.ho.common.tools.entity.WorkOrderPicture" useGeneratedKeys="true">
|
||||
insert into work_order_picture
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="id != null">id,</if>
|
||||
<if test="workOrderId != null">work_order_id,</if>
|
||||
<if test="fileName != null">file_name,</if>
|
||||
<if test="url != null">url,</if>
|
||||
<if test="type != null">type,</if>
|
||||
<if test="createTime != null">create_time,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="id != null">#{id,jdbcType=INTEGER},</if>
|
||||
<if test="workOrderId != null">#{workOrderId,jdbcType=INTEGER},</if>
|
||||
<if test="fileName != null">#{fileName,jdbcType=VARCHAR},</if>
|
||||
<if test="url != null">#{url,jdbcType=VARCHAR},</if>
|
||||
<if test="type != null">#{type,jdbcType=INTEGER},</if>
|
||||
<if test="createTime != null">now(),</if>
|
||||
</trim>
|
||||
</insert>
|
||||
<update id="updateByPrimaryKeySelective" parameterType="com.ho.common.tools.entity.WorkOrderPicture">
|
||||
update work_order_picture
|
||||
<set>
|
||||
<if test="workOrderId != null">
|
||||
work_order_id = #{workOrderId,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="fileName != null">
|
||||
file_name = #{fileName,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="url != null">
|
||||
url = #{url,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="type != null">
|
||||
type = #{type,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="createTime != null">
|
||||
create_time = #{createTime,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
</set>
|
||||
where id = #{id,jdbcType=INTEGER}
|
||||
</update>
|
||||
<update id="updateByPrimaryKey" parameterType="com.ho.common.tools.entity.WorkOrderPicture">
|
||||
update work_order_picture
|
||||
set work_order_id = #{workOrderId,jdbcType=INTEGER},
|
||||
file_name = #{fileName,jdbcType=VARCHAR},
|
||||
url = #{url,jdbcType=VARCHAR},
|
||||
type = #{type,jdbcType=INTEGER},
|
||||
create_time = #{createTime,jdbcType=TIMESTAMP}
|
||||
where id = #{id,jdbcType=INTEGER}
|
||||
</update>
|
||||
<update id="setUpWorkOrderIdIdNUll">
|
||||
update work_order_picture
|
||||
set work_order_id = null
|
||||
<where>
|
||||
<if test="pictureIds != null and pictureIds.size() != 0">
|
||||
and id in
|
||||
<foreach collection="pictureIds" open="(" close=")" separator="," item="item">
|
||||
#{item}
|
||||
</foreach>
|
||||
</if>
|
||||
</where>
|
||||
</update>
|
||||
</mapper>
|
||||
@ -0,0 +1,136 @@
|
||||
<?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">
|
||||
<mapper namespace="com.ho.flow.mapper.WorkOrderPlanMapper">
|
||||
|
||||
<sql id="Base_Column_List">
|
||||
id
|
||||
,user_id,group_id,
|
||||
date_type,`day`,exec_day,effect_date,
|
||||
expire_date,order_type,plan_title,
|
||||
`desc`
|
||||
</sql>
|
||||
|
||||
<select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultType="com.ho.flow.entity.WorkOrderPlan">
|
||||
select
|
||||
<include refid="Base_Column_List"/>
|
||||
from work_order_plan
|
||||
where id = #{id,jdbcType=INTEGER}
|
||||
</select>
|
||||
|
||||
<select id="selectAll" resultType="com.ho.flow.entity.WorkOrderPlan">
|
||||
select
|
||||
<include refid="Base_Column_List"/>
|
||||
from work_order_plan
|
||||
order by effect_date desc
|
||||
</select>
|
||||
<select id="selectByGroupId" resultType="com.ho.flow.entity.WorkOrderPlan">
|
||||
select
|
||||
<include refid="Base_Column_List"/>
|
||||
from work_order_plan
|
||||
<where>
|
||||
<if test="groupId != null">
|
||||
group_id = #{groupId}
|
||||
</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
|
||||
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
|
||||
delete
|
||||
from work_order_plan
|
||||
where id = #{id,jdbcType=INTEGER}
|
||||
</delete>
|
||||
<insert id="insert" keyColumn="id" keyProperty="id" parameterType="com.ho.flow.entity.WorkOrderPlan"
|
||||
useGeneratedKeys="true">
|
||||
insert into work_order_plan
|
||||
( user_id, group_id
|
||||
, date_type, `day`, exec_day, effect_date
|
||||
, expire_date, order_type, plan_title
|
||||
, `desc`)
|
||||
values ( #{jdbcType=INTEGER}, #{userId,jdbcType=VARCHAR}, #{groupId,jdbcType=INTEGER}
|
||||
, #{dateType,jdbcType=VARCHAR}, #{day,jdbcType=INTEGER}, #{execDay,jdbcType=INTEGER}
|
||||
, #{effectDate,jdbcType=TIMESTAMP}
|
||||
, #{expireDate,jdbcType=TIMESTAMP}, #{orderType,jdbcType=INTEGER}, #{planTitle,jdbcType=VARCHAR}
|
||||
, #{desc,jdbcType=VARCHAR})
|
||||
</insert>
|
||||
<insert id="insertSelective" keyColumn="id" keyProperty="id" parameterType="com.ho.flow.entity.WorkOrderPlan"
|
||||
useGeneratedKeys="true">
|
||||
insert into work_order_plan
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="userId != null">user_id,</if>
|
||||
<if test="groupId != null">group_id,</if>
|
||||
<if test="dateType != null">date_type,</if>
|
||||
<if test="day != null">`day`,</if>
|
||||
<if test="execDay != null">exec_day,</if>
|
||||
<if test="effectDate != null">effect_date,</if>
|
||||
<if test="expireDate != null">expire_date,</if>
|
||||
<if test="orderType != null">order_type,</if>
|
||||
<if test="planTitle != null">plan_title,</if>
|
||||
<if test="desc != null">`desc`,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="userId != null">#{userId,jdbcType=VARCHAR},</if>
|
||||
<if test="groupId != null">#{groupId,jdbcType=INTEGER},</if>
|
||||
<if test="dateType != null">#{dateType,jdbcType=VARCHAR},</if>
|
||||
<if test="day != null">#{day,jdbcType=INTEGER},</if>
|
||||
<if test="execDay != null">#{execDay,jdbcType=INTEGER},</if>
|
||||
<if test="effectDate != null">#{effectDate,jdbcType=TIMESTAMP},</if>
|
||||
<if test="expireDate != null">#{expireDate,jdbcType=TIMESTAMP},</if>
|
||||
<if test="orderType != null">#{orderType,jdbcType=INTEGER},</if>
|
||||
<if test="planTitle != null">#{planTitle,jdbcType=VARCHAR},</if>
|
||||
<if test="desc != null">#{desc,jdbcType=VARCHAR},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
<update id="updateByPrimaryKeySelective" parameterType="com.ho.flow.entity.WorkOrderPlan">
|
||||
update work_order_plan
|
||||
<set>
|
||||
<if test="userId != null">
|
||||
user_id = #{userId,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="groupId != null">
|
||||
group_id = #{groupId,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="dateType != null">
|
||||
date_type = #{dateType,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="day != null">
|
||||
`day` = #{day,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="execDay != null">
|
||||
exec_day = #{execDay,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="effectDate != null">
|
||||
effect_date = #{effectDate,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
<if test="expireDate != null">
|
||||
expire_date = #{expireDate,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
<if test="orderType != null">
|
||||
order_type = #{orderType,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="planTitle != null">
|
||||
plan_title = #{planTitle,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="desc != null">
|
||||
`desc` = #{desc,jdbcType=VARCHAR},
|
||||
</if>
|
||||
</set>
|
||||
where id = #{id,jdbcType=INTEGER}
|
||||
</update>
|
||||
<update id="updateByPrimaryKey" parameterType="com.ho.flow.entity.WorkOrderPlan">
|
||||
update work_order_plan
|
||||
set user_id = #{userId,jdbcType=VARCHAR},
|
||||
group_id = #{groupId,jdbcType=INTEGER},
|
||||
date_type = #{dateType,jdbcType=VARCHAR},
|
||||
`day` = #{day,jdbcType=INTEGER},
|
||||
exec_day = #{execDay,jdbcType=INTEGER},
|
||||
effect_date = #{effectDate,jdbcType=TIMESTAMP},
|
||||
expire_date = #{expireDate,jdbcType=TIMESTAMP},
|
||||
order_type = #{orderType,jdbcType=INTEGER},
|
||||
plan_title = #{planTitle,jdbcType=VARCHAR},
|
||||
`desc` = #{desc,jdbcType=VARCHAR}
|
||||
where id = #{id,jdbcType=INTEGER}
|
||||
</update>
|
||||
</mapper>
|
||||
@ -0,0 +1,106 @@
|
||||
<?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">
|
||||
<mapper namespace="com.ho.flow.mapper.WorkOrderPlanSubMapper">
|
||||
|
||||
<resultMap id="BaseResultMap" type="com.ho.flow.entity.WorkOrderPlanSub">
|
||||
<id property="id" column="id" jdbcType="INTEGER"/>
|
||||
<result property="pid" column="pid" jdbcType="INTEGER"/>
|
||||
<result property="type" column="type" jdbcType="VARCHAR"/>
|
||||
<result property="srcId" column="src_id" jdbcType="INTEGER"/>
|
||||
</resultMap>
|
||||
|
||||
<sql id="Base_Column_List">
|
||||
id,pid,type,
|
||||
src_id,user_id
|
||||
</sql>
|
||||
|
||||
<select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
|
||||
select
|
||||
<include refid="Base_Column_List" />
|
||||
from work_order_plan_sub
|
||||
where id = #{id,jdbcType=INTEGER}
|
||||
</select>
|
||||
|
||||
<select id="selectByPid" resultType="com.ho.flow.entity.WorkOrderPlanSub">
|
||||
select
|
||||
<include refid="Base_Column_List" />
|
||||
from work_order_plan_sub
|
||||
where pid = #{pid}
|
||||
</select>
|
||||
|
||||
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
|
||||
delete from work_order_plan_sub
|
||||
where id = #{id,jdbcType=INTEGER}
|
||||
</delete>
|
||||
<delete id="deleteByPid">
|
||||
delete from work_order_plan_sub
|
||||
where pid = #{pid}
|
||||
</delete>
|
||||
<insert id="insert" keyColumn="id" keyProperty="id" parameterType="com.ho.flow.entity.WorkOrderPlanSub" useGeneratedKeys="true">
|
||||
insert into work_order_plan_sub
|
||||
( id,pid,type
|
||||
,src_id)
|
||||
values (#{id,jdbcType=INTEGER},#{pid,jdbcType=INTEGER},#{type,jdbcType=VARCHAR}
|
||||
,#{srcId,jdbcType=INTEGER})
|
||||
</insert>
|
||||
<insert id="insertSelective" keyColumn="id" keyProperty="id" parameterType="com.ho.flow.entity.WorkOrderPlanSub" useGeneratedKeys="true">
|
||||
insert into work_order_plan_sub
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="id != null">id,</if>
|
||||
<if test="pid != null">pid,</if>
|
||||
<if test="type != null">type,</if>
|
||||
<if test="srcId != null">src_id,</if>
|
||||
<if test="userId != null">user_id,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="id != null">#{id,jdbcType=INTEGER},</if>
|
||||
<if test="pid != null">#{pid,jdbcType=INTEGER},</if>
|
||||
<if test="type != null">#{type,jdbcType=VARCHAR},</if>
|
||||
<if test="srcId != null">#{srcId,jdbcType=INTEGER},</if>
|
||||
<if test="userId != null">#{userId,jdbcType=VARCHAR},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
<insert id="insertBatch">
|
||||
insert into work_order_plan_sub
|
||||
( pid,type
|
||||
,src_id)
|
||||
values
|
||||
<foreach item="item" collection="list" index="index" separator=",">
|
||||
(#{item.pid},#{item.type},#{item.srcId})
|
||||
</foreach>
|
||||
</insert>
|
||||
<insert id="insertUserBatch">
|
||||
insert into work_order_plan_sub
|
||||
( pid,type
|
||||
,user_id)
|
||||
values
|
||||
<foreach item="item" collection="list" index="index" separator=",">
|
||||
(#{item.pid},#{item.type},#{item.userId})
|
||||
</foreach>
|
||||
</insert>
|
||||
<update id="updateByPrimaryKeySelective" parameterType="com.ho.flow.entity.WorkOrderPlanSub">
|
||||
update work_order_plan_sub
|
||||
<set>
|
||||
<if test="pid != null">
|
||||
pid = #{pid,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="type != null">
|
||||
type = #{type,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="srcId != null">
|
||||
src_id = #{srcId,jdbcType=INTEGER},
|
||||
</if>
|
||||
</set>
|
||||
where id = #{id,jdbcType=INTEGER}
|
||||
</update>
|
||||
<update id="updateByPrimaryKey" parameterType="com.ho.flow.entity.WorkOrderPlanSub">
|
||||
update work_order_plan_sub
|
||||
set
|
||||
pid = #{pid,jdbcType=INTEGER},
|
||||
type = #{type,jdbcType=VARCHAR},
|
||||
src_id = #{srcId,jdbcType=INTEGER}
|
||||
where id = #{id,jdbcType=INTEGER}
|
||||
</update>
|
||||
</mapper>
|
||||
@ -0,0 +1,93 @@
|
||||
<?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">
|
||||
<mapper namespace="com.ho.flow.mapper.WorkOrderSubMapper">
|
||||
|
||||
|
||||
|
||||
<sql id="Base_Column_List">
|
||||
id,pid,type,
|
||||
src_id
|
||||
</sql>
|
||||
|
||||
<select id="selectByPrimaryKey" resultType="com.ho.flow.entity.WorkOrderSub">
|
||||
select
|
||||
<include refid="Base_Column_List" />
|
||||
from work_order_sub
|
||||
where id = #{id,jdbcType=INTEGER}
|
||||
</select>
|
||||
<select id="selectByPid" resultType="com.ho.flow.entity.WorkOrderSub">
|
||||
select
|
||||
<include refid="Base_Column_List" />
|
||||
from work_order_sub
|
||||
where pid = #{pId,jdbcType=INTEGER}
|
||||
</select>
|
||||
|
||||
<delete id="deleteByPrimaryKey">
|
||||
delete from work_order_sub
|
||||
where id = #{id,jdbcType=INTEGER}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteByPid">
|
||||
delete from work_order_sub
|
||||
where pid = #{pid}
|
||||
</delete>
|
||||
|
||||
<insert id="insert" keyColumn="id" keyProperty="id" parameterType="com.ho.flow.entity.WorkOrderSub" useGeneratedKeys="true">
|
||||
insert into work_order_sub
|
||||
( id,pid,type
|
||||
,src_id)
|
||||
values (#{id,jdbcType=INTEGER},#{pid,jdbcType=BIGINT},#{type,jdbcType=INTEGER}
|
||||
,#{srcId,jdbcType=INTEGER})
|
||||
</insert>
|
||||
<insert id="insertSelective" keyColumn="id" keyProperty="id" parameterType="com.ho.flow.entity.WorkOrderSub" useGeneratedKeys="true">
|
||||
insert into work_order_sub
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="id != null">id,</if>
|
||||
<if test="pid != null">pid,</if>
|
||||
<if test="type != null">type,</if>
|
||||
<if test="srcId != null">src_id,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="id != null">#{id,jdbcType=INTEGER},</if>
|
||||
<if test="pid != null">#{pid,jdbcType=BIGINT},</if>
|
||||
<if test="type != null">#{type,jdbcType=INTEGER},</if>
|
||||
<if test="srcId != null">#{srcId,jdbcType=INTEGER},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<insert id="insertBatch">
|
||||
insert into work_order_sub
|
||||
( pid,`type`
|
||||
,src_id)
|
||||
values
|
||||
<foreach item="item" collection="list" index="index" separator=",">
|
||||
(#{item.pid},#{item.type},#{item.srcId})
|
||||
</foreach>
|
||||
</insert>
|
||||
|
||||
<update id="updateByPrimaryKeySelective" parameterType="com.ho.flow.entity.WorkOrderSub">
|
||||
update work_order_sub
|
||||
<set>
|
||||
<if test="pid != null">
|
||||
pid = #{pid,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="type != null">
|
||||
type = #{type,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="srcId != null">
|
||||
src_id = #{srcId,jdbcType=INTEGER},
|
||||
</if>
|
||||
</set>
|
||||
where id = #{id,jdbcType=INTEGER}
|
||||
</update>
|
||||
<update id="updateByPrimaryKey" parameterType="com.ho.flow.entity.WorkOrderSub">
|
||||
update work_order_sub
|
||||
set
|
||||
pid = #{pid,jdbcType=BIGINT},
|
||||
type = #{type,jdbcType=INTEGER},
|
||||
src_id = #{srcId,jdbcType=INTEGER}
|
||||
where id = #{id,jdbcType=INTEGER}
|
||||
</update>
|
||||
</mapper>
|
||||
@ -0,0 +1,49 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<definitions xmlns="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:activiti="http://activiti.org/bpmn" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlns:omgdc="http://www.omg.org/spec/DD/20100524/DC" xmlns:omgdi="http://www.omg.org/spec/DD/20100524/DI" typeLanguage="http://www.w3.org/2001/XMLSchema" expressionLanguage="http://www.w3.org/1999/XPath" targetNamespace="http://www.activiti.org/processdef">
|
||||
<process id="order1" name="order1" isExecutable="true">
|
||||
<startEvent id="sid-c414ef16-09ea-4e16-b6f0-214b8a1976d6"/>
|
||||
<sequenceFlow id="sid-6067ee69-a01c-41cf-bc9b-c7a0312c92ce" sourceRef="sid-c414ef16-09ea-4e16-b6f0-214b8a1976d6" targetRef="d1"/>
|
||||
<endEvent id="sid-ce510ee0-17a5-458a-9eb7-08709a95871a"/>
|
||||
<userTask id="d1" name="d1">
|
||||
<extensionElements>
|
||||
<activiti:taskListener class="com.ho.flow.listener.Node1Listener" event="create"/>
|
||||
</extensionElements>
|
||||
</userTask>
|
||||
<userTask id="d2" name="d2">
|
||||
<extensionElements>
|
||||
<activiti:taskListener class="com.ho.flow.listener.Node2Listener" event="create"/>
|
||||
</extensionElements>
|
||||
</userTask>
|
||||
|
||||
<sequenceFlow id="sid-24b86efe-c13b-4245-ae83-6149d3707fba" sourceRef="d1" targetRef="d2"/>
|
||||
<sequenceFlow id="sid-7ade5d3c-a914-42ad-9535-c84ceba37aed" sourceRef="d2" targetRef="sid-ce510ee0-17a5-458a-9eb7-08709a95871a"/>
|
||||
</process>
|
||||
<bpmndi:BPMNDiagram id="BPMNDiagram_order1">
|
||||
<bpmndi:BPMNPlane bpmnElement="order1" id="BPMNPlane_order1">
|
||||
<bpmndi:BPMNShape id="shape-a0f2f19d-38c1-42b9-a1ca-fdf8036b7a21" bpmnElement="sid-c414ef16-09ea-4e16-b6f0-214b8a1976d6">
|
||||
<omgdc:Bounds x="-280.0" y="-60.0" width="30.0" height="30.0"/>
|
||||
</bpmndi:BPMNShape>
|
||||
<bpmndi:BPMNEdge id="edge-839c460e-520f-495a-9294-e1b5511c81a6" bpmnElement="sid-6067ee69-a01c-41cf-bc9b-c7a0312c92ce">
|
||||
<omgdi:waypoint x="-250.0" y="-45.0"/>
|
||||
<omgdi:waypoint x="-170.0" y="-50.0"/>
|
||||
</bpmndi:BPMNEdge>
|
||||
<bpmndi:BPMNShape id="shape-a02b9317-d62d-4153-ac7f-8d877373d069" bpmnElement="sid-ce510ee0-17a5-458a-9eb7-08709a95871a">
|
||||
<omgdc:Bounds x="100.0" y="-65.0" width="30.0" height="30.0"/>
|
||||
</bpmndi:BPMNShape>
|
||||
<bpmndi:BPMNShape id="shape-84979c24-dde1-4543-ac84-fb5c1691f971" bpmnElement="d1">
|
||||
<omgdc:Bounds x="-170.0" y="-85.0" width="70.0" height="60.0"/>
|
||||
</bpmndi:BPMNShape>
|
||||
<bpmndi:BPMNShape id="shape-f0f6aabb-0212-47ab-a370-5faf0fc6b218" bpmnElement="d2">
|
||||
<omgdc:Bounds x="-60.0" y="-90.0" width="100.0" height="80.0"/>
|
||||
</bpmndi:BPMNShape>
|
||||
<bpmndi:BPMNEdge id="edge-ee47f5c3-cc86-44b9-af2b-5ddc3ffd68c2" bpmnElement="sid-24b86efe-c13b-4245-ae83-6149d3707fba">
|
||||
<omgdi:waypoint x="-100.0" y="-70.0"/>
|
||||
<omgdi:waypoint x="-60.0" y="-70.0"/>
|
||||
</bpmndi:BPMNEdge>
|
||||
<bpmndi:BPMNEdge id="edge-72130a01-54cd-4313-b794-17dd309ff8fa" bpmnElement="sid-7ade5d3c-a914-42ad-9535-c84ceba37aed">
|
||||
<omgdi:waypoint x="40.0" y="-50.0"/>
|
||||
<omgdi:waypoint x="100.0" y="-50.0"/>
|
||||
</bpmndi:BPMNEdge>
|
||||
</bpmndi:BPMNPlane>
|
||||
</bpmndi:BPMNDiagram>
|
||||
</definitions>
|
||||
@ -0,0 +1,100 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<definitions xmlns="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:activiti="http://activiti.org/bpmn" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlns:omgdc="http://www.omg.org/spec/DD/20100524/DC" xmlns:omgdi="http://www.omg.org/spec/DD/20100524/DI" typeLanguage="http://www.w3.org/2001/XMLSchema" expressionLanguage="http://www.w3.org/1999/XPath" targetNamespace="http://www.activiti.org/processdef">
|
||||
<process id="order2" name="order2" isExecutable="true">
|
||||
<startEvent id="d-start"/>
|
||||
<userTask id="d1" name="分配工单的节点" activiti:candidateGroups="${stationId}">
|
||||
<extensionElements>
|
||||
<activiti:formProperty id="Property 1"/>
|
||||
</extensionElements>
|
||||
</userTask>
|
||||
<userTask id="d2" name="接收或驳回的节点" activiti:assignee="${orderReq.workerId}"/>
|
||||
<exclusiveGateway id="x1" name="接收或驳回的网关"/>
|
||||
<sequenceFlow id="sid-ce0abf7c-67ce-482d-9c07-e8aeacb78030" sourceRef="d2" targetRef="x1"/>
|
||||
<sequenceFlow id="sid-0ff6fea8-b044-4737-9c44-25b067c54205" sourceRef="d1" targetRef="d2"/>
|
||||
<sequenceFlow id="sid-a0440356-7166-4c7e-893f-ebf04175b0ed" sourceRef="d-start" targetRef="d1"/>
|
||||
<userTask id="d3" activiti:assignee="${orderReq.workerId}" name="处理工单的节点"/>
|
||||
<sequenceFlow id="x1-agree" sourceRef="x1" targetRef="d3" name="接收工单">
|
||||
<conditionExpression xsi:type="tFormalExpression">${orderReq.reject==0}</conditionExpression>
|
||||
</sequenceFlow>
|
||||
<sequenceFlow id="x1-reject" sourceRef="x1" targetRef="d1" name="驳回工单">
|
||||
<conditionExpression xsi:type="tFormalExpression">${orderReq.reject==1}</conditionExpression>
|
||||
</sequenceFlow>
|
||||
<endEvent id="d-end"/>
|
||||
<userTask id="d4" name="验收通过或没通过" activiti:candidateGroups="${stationId}"/>
|
||||
<sequenceFlow id="sid-66006a35-37a5-4d09-9396-5515ec83be06" sourceRef="d3" targetRef="d4"/>
|
||||
<exclusiveGateway id="x2" name="验收通过或没通过的网关"/>
|
||||
<sequenceFlow id="sid-d34a0a46-905a-4b99-b696-0bda31dd795c" sourceRef="d4" targetRef="x2"/>
|
||||
<sequenceFlow id="sid-087f20af-9034-445c-b16e-79921a28b938" sourceRef="x2" targetRef="d3" name="工单验收不通过">
|
||||
<conditionExpression xsi:type="tFormalExpression">${orderReq.complete==0}</conditionExpression>
|
||||
</sequenceFlow>
|
||||
<sequenceFlow id="sid-84b81ee3-39d1-45ea-98cb-cc41f7c3454e" sourceRef="x2" targetRef="d-end" name="工单验收通过">
|
||||
<conditionExpression xsi:type="tFormalExpression">${orderReq.complete==1}</conditionExpression>
|
||||
</sequenceFlow>
|
||||
</process>
|
||||
<bpmndi:BPMNDiagram id="BPMNDiagram_order2">
|
||||
<bpmndi:BPMNPlane bpmnElement="order2" id="BPMNPlane_order2">
|
||||
<bpmndi:BPMNShape id="shape-9d49be98-cc1a-4232-b40d-e822f3e5b183" bpmnElement="d-start">
|
||||
<omgdc:Bounds x="-490.0" y="0.0" width="30.0" height="30.0"/>
|
||||
</bpmndi:BPMNShape>
|
||||
<bpmndi:BPMNShape id="shape-13475417-9e0a-4059-92f5-7753ae17748d" bpmnElement="d1">
|
||||
<omgdc:Bounds x="-400.0" y="-12.5" width="60.0" height="55.0"/>
|
||||
</bpmndi:BPMNShape>
|
||||
<bpmndi:BPMNShape id="shape-5b7a834a-6ff8-4917-a61e-295feaaa37d5" bpmnElement="d2">
|
||||
<omgdc:Bounds x="-250.0" y="-14.999998" width="70.0" height="60.0"/>
|
||||
</bpmndi:BPMNShape>
|
||||
<bpmndi:BPMNShape id="shape-84a86e19-b70f-48a9-9801-3d7e0f6d5908" bpmnElement="x1">
|
||||
<omgdc:Bounds x="-235.0" y="-110.0" width="40.0" height="40.0"/>
|
||||
</bpmndi:BPMNShape>
|
||||
<bpmndi:BPMNEdge id="edge-5a2a83ec-bd4e-48d6-90da-505942369c79" bpmnElement="sid-ce0abf7c-67ce-482d-9c07-e8aeacb78030">
|
||||
<omgdi:waypoint x="-215.0" y="-14.999998"/>
|
||||
<omgdi:waypoint x="-215.0" y="-70.0"/>
|
||||
</bpmndi:BPMNEdge>
|
||||
<bpmndi:BPMNEdge id="edge-6c797a63-9d64-4fb9-bb1d-0129311bed27" bpmnElement="sid-0ff6fea8-b044-4737-9c44-25b067c54205">
|
||||
<omgdi:waypoint x="-340.0" y="15.0"/>
|
||||
<omgdi:waypoint x="-250.0" y="15.000002"/>
|
||||
</bpmndi:BPMNEdge>
|
||||
<bpmndi:BPMNEdge id="edge-3a37999e-813d-44dd-8e63-1f28d9e5f86e" bpmnElement="sid-a0440356-7166-4c7e-893f-ebf04175b0ed">
|
||||
<omgdi:waypoint x="-460.0" y="15.0"/>
|
||||
<omgdi:waypoint x="-400.0" y="15.0"/>
|
||||
</bpmndi:BPMNEdge>
|
||||
<bpmndi:BPMNShape id="shape-935e9064-2671-4ef9-97c7-e24d347cdc8d" bpmnElement="d3">
|
||||
<omgdc:Bounds x="-120.0" y="-120.0" width="65.0" height="60.0"/>
|
||||
</bpmndi:BPMNShape>
|
||||
<bpmndi:BPMNEdge id="edge-b4a11447-d068-4f93-a358-c3dc5c1bac7c" bpmnElement="x1-agree">
|
||||
<omgdi:waypoint x="-194.99998" y="-89.99999"/>
|
||||
<omgdi:waypoint x="-180.0" y="-90.0"/>
|
||||
<omgdi:waypoint x="-162.5" y="-90.0"/>
|
||||
<omgdi:waypoint x="-120.0" y="-90.0"/>
|
||||
</bpmndi:BPMNEdge>
|
||||
<bpmndi:BPMNEdge id="edge-b43952f3-f450-4eb7-8fc0-1958ebc22b2e" bpmnElement="x1-reject">
|
||||
<omgdi:waypoint x="-235.0" y="-90.0"/>
|
||||
<omgdi:waypoint x="-340.0" y="1.25"/>
|
||||
</bpmndi:BPMNEdge>
|
||||
<bpmndi:BPMNShape id="shape-96f035a9-d956-4558-b675-0ac4fd796f2e" bpmnElement="d-end">
|
||||
<omgdc:Bounds x="-92.5" y="-20.0" width="30.0" height="30.0"/>
|
||||
</bpmndi:BPMNShape>
|
||||
<bpmndi:BPMNShape id="sid-95f15de4-2997-4128-bf53-9c50d65f4321" bpmnElement="d4">
|
||||
<omgdc:Bounds x="10.0" y="-120.0" width="65.0" height="60.0"/>
|
||||
</bpmndi:BPMNShape>
|
||||
<bpmndi:BPMNEdge id="edge-d72b1e68-3861-4d90-8f69-a58410ba7507" bpmnElement="sid-66006a35-37a5-4d09-9396-5515ec83be06">
|
||||
<omgdi:waypoint x="-55.0" y="-90.0"/>
|
||||
<omgdi:waypoint x="10.0" y="-90.0"/>
|
||||
</bpmndi:BPMNEdge>
|
||||
<bpmndi:BPMNShape id="shape-1d99afd1-0d26-473f-88ab-20544ca2a8e9" bpmnElement="x2">
|
||||
<omgdc:Bounds x="22.5" y="-25.0" width="40.0" height="40.0"/>
|
||||
</bpmndi:BPMNShape>
|
||||
<bpmndi:BPMNEdge id="edge-dbfe3748-10b8-483f-9774-a66997524812" bpmnElement="sid-d34a0a46-905a-4b99-b696-0bda31dd795c">
|
||||
<omgdi:waypoint x="42.5" y="-60.0"/>
|
||||
<omgdi:waypoint x="42.5" y="-25.0"/>
|
||||
</bpmndi:BPMNEdge>
|
||||
<bpmndi:BPMNEdge id="edge-9955319f-3484-4ecb-8a04-72ed5109bd63" bpmnElement="sid-087f20af-9034-445c-b16e-79921a28b938">
|
||||
<omgdi:waypoint x="32.5" y="-15.0"/>
|
||||
<omgdi:waypoint x="-55.0" y="-75.0"/>
|
||||
</bpmndi:BPMNEdge>
|
||||
<bpmndi:BPMNEdge id="edge-04bd5652-7fe4-493f-9d0a-9372fb0cdf92" bpmnElement="sid-84b81ee3-39d1-45ea-98cb-cc41f7c3454e">
|
||||
<omgdi:waypoint x="22.5" y="-5.0"/>
|
||||
<omgdi:waypoint x="-62.5" y="-5.0"/>
|
||||
</bpmndi:BPMNEdge>
|
||||
</bpmndi:BPMNPlane>
|
||||
</bpmndi:BPMNDiagram>
|
||||
</definitions>
|
||||
@ -0,0 +1,138 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<definitions xmlns="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:activiti="http://activiti.org/bpmn" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlns:omgdc="http://www.omg.org/spec/DD/20100524/DC" xmlns:omgdi="http://www.omg.org/spec/DD/20100524/DI" typeLanguage="http://www.w3.org/2001/XMLSchema" expressionLanguage="http://www.w3.org/1999/XPath" targetNamespace="http://www.activiti.org/processdef">
|
||||
<process id="workOrder" name="workOrder" isExecutable="true">
|
||||
<startEvent id="start-workorder"/>
|
||||
<userTask id="d1" name="创建工单" activiti:assignee="${startUser}">
|
||||
<extensionElements>
|
||||
<activiti:taskListener class="com.ho.flow.listener.Node1Listener" event="create"/>
|
||||
</extensionElements>
|
||||
</userTask>
|
||||
<userTask id="d2" name="处理工单">
|
||||
<extensionElements>
|
||||
<activiti:taskListener class="com.ho.flow.listener.Node1Listener" event="create"/>
|
||||
</extensionElements>
|
||||
</userTask>
|
||||
<userTask id="d3" name="验收工单">
|
||||
<extensionElements>
|
||||
<activiti:taskListener class="com.ho.flow.listener.Node1Listener" event="create"/>
|
||||
</extensionElements>
|
||||
</userTask>
|
||||
<userTask id="d4" name="评价工单">
|
||||
<extensionElements>
|
||||
<activiti:taskListener class="com.ho.flow.listener.Node1Listener" event="create"/>
|
||||
</extensionElements>
|
||||
</userTask>
|
||||
<endEvent id="end-workorder"/>
|
||||
<endEvent id="cancel-workorder"/>
|
||||
<sequenceFlow id="sid-4ac0805f-3d90-4a46-a592-7de4ece7b511" sourceRef="start-workorder" targetRef="d1"/>
|
||||
<sequenceFlow id="sid-f872c33d-1b0a-4c48-85bf-8d9c1e685c48" sourceRef="d1" targetRef="d2">
|
||||
<conditionExpression>${complete==0}</conditionExpression>
|
||||
</sequenceFlow>
|
||||
<sequenceFlow id="sid-563b14ed-13a1-4e1b-95a0-15a0b15fb640" sourceRef="d2" targetRef="d1">
|
||||
<conditionExpression>${complete==1}</conditionExpression>
|
||||
</sequenceFlow>
|
||||
<sequenceFlow id="sid-e0e874a3-d5bd-4c78-8867-00b9c06d9cd0" sourceRef="d2" targetRef="d3">
|
||||
<conditionExpression>${complete==0}</conditionExpression>
|
||||
</sequenceFlow>
|
||||
<sequenceFlow id="sid-f018f67f-56ab-4bb1-9351-e2a2d7a41448" sourceRef="d3" targetRef="d4">
|
||||
<conditionExpression>${complete==0}</conditionExpression>
|
||||
</sequenceFlow>
|
||||
<sequenceFlow id="sid-e9371c33-3692-4e1e-9873-b1a0cbd0c667" sourceRef="d3" targetRef="d2">
|
||||
<conditionExpression>${complete==2}</conditionExpression>
|
||||
</sequenceFlow>
|
||||
<sequenceFlow id="sid-48ec5ec3-e4d7-4a2a-8525-350a39bc8cda" sourceRef="d3" targetRef="d1">
|
||||
<conditionExpression>${complete==1}</conditionExpression>
|
||||
</sequenceFlow>
|
||||
<sequenceFlow id="sid-eb2b92f2-acf4-477a-a8b4-eb0e3e4f9e17" sourceRef="d4" targetRef="d3">
|
||||
<conditionExpression>${complete==3}</conditionExpression>
|
||||
</sequenceFlow>
|
||||
<sequenceFlow id="sid-b38c6c3a-2946-40a2-a193-721004a9817e" sourceRef="d4" targetRef="d2">
|
||||
<conditionExpression>${complete==2}</conditionExpression>
|
||||
</sequenceFlow>
|
||||
<sequenceFlow id="sid-582462db-74d0-4921-b402-6505e6d283f9" sourceRef="d4" targetRef="d1">
|
||||
<conditionExpression>${complete==1}</conditionExpression>
|
||||
</sequenceFlow>
|
||||
<sequenceFlow id="sid-026ed14c-8337-4f60-b3e5-551431e68b42" sourceRef="d1" targetRef="cancel-workorder">
|
||||
<conditionExpression>${complete==1}</conditionExpression>
|
||||
</sequenceFlow>
|
||||
<sequenceFlow id="sid-38cc02a8-1be7-4b8c-ae0b-5983beaf4c57" sourceRef="d4" targetRef="end-workorder">
|
||||
<conditionExpression>${complete==0}</conditionExpression>
|
||||
</sequenceFlow>
|
||||
</process>
|
||||
<bpmndi:BPMNDiagram id="BPMNDiagram_workOrder">
|
||||
<bpmndi:BPMNPlane bpmnElement="workOrder" id="BPMNPlane_workOrder">
|
||||
<bpmndi:BPMNShape id="shape-b4955b78-cfe4-458c-b9df-94c51c85aa44" bpmnElement="start-workorder">
|
||||
<omgdc:Bounds x="-320.0" y="-35.0" width="30.0" height="30.0"/>
|
||||
</bpmndi:BPMNShape>
|
||||
<bpmndi:BPMNShape id="shape-bc8ee721-fcbc-4a95-9ccc-814cbe9fd54b" bpmnElement="d1">
|
||||
<omgdc:Bounds x="-245.0" y="-40.0" width="45.0" height="40.0"/>
|
||||
</bpmndi:BPMNShape>
|
||||
<bpmndi:BPMNShape id="sid-9381f63a-4494-4fb0-aaa7-45e951302edd" bpmnElement="d2">
|
||||
<omgdc:Bounds x="-161.5" y="-40.0" width="45.0" height="40.0"/>
|
||||
</bpmndi:BPMNShape>
|
||||
<bpmndi:BPMNShape id="sid-e3da6fc3-5e97-4c25-a449-ea78193b9010" bpmnElement="d3">
|
||||
<omgdc:Bounds x="-66.5" y="-40.0" width="45.0" height="40.0"/>
|
||||
</bpmndi:BPMNShape>
|
||||
<bpmndi:BPMNShape id="sid-d7653211-42a4-43dc-b62a-9915c2afbe49" bpmnElement="d4">
|
||||
<omgdc:Bounds x="30.0" y="-40.0" width="45.0" height="40.0"/>
|
||||
</bpmndi:BPMNShape>
|
||||
<bpmndi:BPMNShape id="shape-31c1e224-2cde-406b-8e1c-4fff04edac65" bpmnElement="end-workorder">
|
||||
<omgdc:Bounds x="120.0" y="-35.0" width="30.0" height="30.0"/>
|
||||
</bpmndi:BPMNShape>
|
||||
<bpmndi:BPMNShape id="shape-2f26b9b5-72e6-4d42-9c2b-3911a52a3f91" bpmnElement="cancel-workorder">
|
||||
<omgdc:Bounds x="-237.5" y="-135.0" width="30.0" height="30.0"/>
|
||||
</bpmndi:BPMNShape>
|
||||
<bpmndi:BPMNEdge id="edge-f92c494f-4201-4ede-8665-0d69d5c025ce" bpmnElement="sid-4ac0805f-3d90-4a46-a592-7de4ece7b511">
|
||||
<omgdi:waypoint x="-290.0" y="-20.0"/>
|
||||
<omgdi:waypoint x="-245.0" y="-20.0"/>
|
||||
</bpmndi:BPMNEdge>
|
||||
<bpmndi:BPMNEdge id="edge-0a3098ad-5fe1-403b-86da-f1a8bc61faec" bpmnElement="sid-f872c33d-1b0a-4c48-85bf-8d9c1e685c48">
|
||||
<omgdi:waypoint x="-200.0" y="-20.0"/>
|
||||
<omgdi:waypoint x="-161.5" y="-20.0"/>
|
||||
</bpmndi:BPMNEdge>
|
||||
<bpmndi:BPMNEdge id="edge-27e356c2-4f66-4d8f-b295-1196f7195f00" bpmnElement="sid-563b14ed-13a1-4e1b-95a0-15a0b15fb640">
|
||||
<omgdi:waypoint x="-161.5" y="-30.0"/>
|
||||
<omgdi:waypoint x="-200.0" y="-30.0"/>
|
||||
</bpmndi:BPMNEdge>
|
||||
<bpmndi:BPMNEdge id="edge-f28ed170-361d-4011-aa81-6acefc623953" bpmnElement="sid-e0e874a3-d5bd-4c78-8867-00b9c06d9cd0">
|
||||
<omgdi:waypoint x="-116.5" y="-20.0"/>
|
||||
<omgdi:waypoint x="-66.5" y="-20.0"/>
|
||||
</bpmndi:BPMNEdge>
|
||||
<bpmndi:BPMNEdge id="edge-215421d9-530c-4480-be86-161227ec5d41" bpmnElement="sid-f018f67f-56ab-4bb1-9351-e2a2d7a41448">
|
||||
<omgdi:waypoint x="-21.5" y="-20.0"/>
|
||||
<omgdi:waypoint x="30.0" y="-20.0"/>
|
||||
</bpmndi:BPMNEdge>
|
||||
<bpmndi:BPMNEdge id="edge-ca594598-b24b-4541-98a3-bf9cad24d202" bpmnElement="sid-e9371c33-3692-4e1e-9873-b1a0cbd0c667">
|
||||
<omgdi:waypoint x="-66.5" y="-30.0"/>
|
||||
<omgdi:waypoint x="-116.5" y="-30.0"/>
|
||||
</bpmndi:BPMNEdge>
|
||||
<bpmndi:BPMNEdge id="edge-c8e8287f-0e6c-4777-8ed4-000560bb562c" bpmnElement="sid-48ec5ec3-e4d7-4a2a-8525-350a39bc8cda">
|
||||
<omgdi:waypoint x="-66.5" y="-10.0"/>
|
||||
<omgdi:waypoint x="-139.0" y="45.0"/>
|
||||
<omgdi:waypoint x="-200.0" y="-10.0"/>
|
||||
</bpmndi:BPMNEdge>
|
||||
<bpmndi:BPMNEdge id="edge-efa88a48-83fb-47e6-b5d9-c041a03b4dfb" bpmnElement="sid-eb2b92f2-acf4-477a-a8b4-eb0e3e4f9e17">
|
||||
<omgdi:waypoint x="30.0" y="-30.0"/>
|
||||
<omgdi:waypoint x="-21.5" y="-30.0"/>
|
||||
</bpmndi:BPMNEdge>
|
||||
<bpmndi:BPMNEdge id="edge-daa2d750-c2ba-4595-9618-695e552d5368" bpmnElement="sid-b38c6c3a-2946-40a2-a193-721004a9817e">
|
||||
<omgdi:waypoint x="30.0" y="-10.0"/>
|
||||
<omgdi:waypoint x="-44.0" y="45.0"/>
|
||||
<omgdi:waypoint x="-116.5" y="-10.0"/>
|
||||
</bpmndi:BPMNEdge>
|
||||
<bpmndi:BPMNEdge id="edge-41421199-87c7-4cfe-9a99-36fb79a21e26" bpmnElement="sid-582462db-74d0-4921-b402-6505e6d283f9">
|
||||
<omgdi:waypoint x="41.25" y="-40.0"/>
|
||||
<omgdi:waypoint x="-100.0" y="-120.0"/>
|
||||
<omgdi:waypoint x="-211.25" y="-40.0"/>
|
||||
</bpmndi:BPMNEdge>
|
||||
<bpmndi:BPMNEdge id="edge-ae6d5ae6-af51-45ab-bdbf-d6703fe23bb8" bpmnElement="sid-026ed14c-8337-4f60-b3e5-551431e68b42">
|
||||
<omgdi:waypoint x="-222.5" y="-40.0"/>
|
||||
<omgdi:waypoint x="-222.5" y="-105.0"/>
|
||||
</bpmndi:BPMNEdge>
|
||||
<bpmndi:BPMNEdge id="edge-915bf0b5-e5de-42ee-aec8-2740111658f6" bpmnElement="sid-38cc02a8-1be7-4b8c-ae0b-5983beaf4c57">
|
||||
<omgdi:waypoint x="75.0" y="-20.0"/>
|
||||
<omgdi:waypoint x="120.0" y="-20.0"/>
|
||||
</bpmndi:BPMNEdge>
|
||||
</bpmndi:BPMNPlane>
|
||||
</bpmndi:BPMNDiagram>
|
||||
</definitions>
|
||||
Reference in New Issue
Block a user