第四轮:FlowInstance/FlowNodeLog 后端骨架 + WcsFlowLogController升级 + flowlog前端页面 + flowlog API
This commit is contained in:
125
ruoyi-admin/src/main/resources/mapper/wcs/WcsApiConfigMapper.xml
Normal file
125
ruoyi-admin/src/main/resources/mapper/wcs/WcsApiConfigMapper.xml
Normal file
@@ -0,0 +1,125 @@
|
||||
<?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.ruoyi.wcs.api.mapper.WcsApiConfigMapper">
|
||||
|
||||
<resultMap type="com.ruoyi.wcs.api.domain.WcsApiConfig" id="WcsApiConfigResult">
|
||||
<id property="apiId" column="api_id" />
|
||||
<result property="apiCode" column="api_code" />
|
||||
<result property="apiName" column="api_name" />
|
||||
<result property="apiUrl" column="api_url" />
|
||||
<result property="requestMethod" column="request_method" />
|
||||
<result property="contentType" column="content_type" />
|
||||
<result property="timeout" column="timeout" />
|
||||
<result property="retryCount" column="retry_count" />
|
||||
<result property="direction" column="direction" />
|
||||
<result property="status" column="status" />
|
||||
<result property="delFlag" column="del_flag" />
|
||||
<result property="createBy" column="create_by" />
|
||||
<result property="createTime" column="create_time" />
|
||||
<result property="updateBy" column="update_by" />
|
||||
<result property="updateTime" column="update_time" />
|
||||
<result property="remark" column="remark" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectApiConfigVo">
|
||||
select api_id, api_code, api_name, api_url, request_method, content_type,
|
||||
timeout, retry_count, direction, status, del_flag,
|
||||
create_by, create_time, update_by, update_time, remark
|
||||
from wcs_api_config
|
||||
</sql>
|
||||
|
||||
<select id="selectApiConfigList" parameterType="com.ruoyi.wcs.api.domain.WcsApiConfig" resultMap="WcsApiConfigResult">
|
||||
<include refid="selectApiConfigVo"/>
|
||||
<where>
|
||||
del_flag = '0'
|
||||
<if test="apiCode != null and apiCode != ''">
|
||||
AND api_code like concat('%', #{apiCode}, '%')
|
||||
</if>
|
||||
<if test="apiName != null and apiName != ''">
|
||||
AND api_name like concat('%', #{apiName}, '%')
|
||||
</if>
|
||||
<if test="requestMethod != null and requestMethod != ''">
|
||||
AND request_method = #{requestMethod}
|
||||
</if>
|
||||
<if test="direction != null and direction != ''">
|
||||
AND direction = #{direction}
|
||||
</if>
|
||||
<if test="status != null and status != ''">
|
||||
AND status = #{status}
|
||||
</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectApiConfigById" parameterType="Long" resultMap="WcsApiConfigResult">
|
||||
<include refid="selectApiConfigVo"/>
|
||||
where api_id = #{apiId} and del_flag = '0'
|
||||
</select>
|
||||
|
||||
<select id="checkApiCodeUnique" parameterType="String" resultMap="WcsApiConfigResult">
|
||||
<include refid="selectApiConfigVo"/>
|
||||
where api_code = #{apiCode} and del_flag = '0' limit 1
|
||||
</select>
|
||||
|
||||
<insert id="insertApiConfig" parameterType="com.ruoyi.wcs.api.domain.WcsApiConfig" useGeneratedKeys="true" keyProperty="apiId">
|
||||
insert into wcs_api_config(
|
||||
<if test="apiCode != null and apiCode != ''">api_code,</if>
|
||||
<if test="apiName != null and apiName != ''">api_name,</if>
|
||||
<if test="apiUrl != null and apiUrl != ''">api_url,</if>
|
||||
<if test="requestMethod != null and requestMethod != ''">request_method,</if>
|
||||
<if test="contentType != null and contentType != ''">content_type,</if>
|
||||
<if test="timeout != null">timeout,</if>
|
||||
<if test="retryCount != null">retry_count,</if>
|
||||
<if test="direction != null and direction != ''">direction,</if>
|
||||
<if test="status != null and status != ''">status,</if>
|
||||
<if test="remark != null and remark != ''">remark,</if>
|
||||
<if test="createBy != null and createBy != ''">create_by,</if>
|
||||
create_time
|
||||
)values(
|
||||
<if test="apiCode != null and apiCode != ''">#{apiCode},</if>
|
||||
<if test="apiName != null and apiName != ''">#{apiName},</if>
|
||||
<if test="apiUrl != null and apiUrl != ''">#{apiUrl},</if>
|
||||
<if test="requestMethod != null and requestMethod != ''">#{requestMethod},</if>
|
||||
<if test="contentType != null and contentType != ''">#{contentType},</if>
|
||||
<if test="timeout != null">#{timeout},</if>
|
||||
<if test="retryCount != null">#{retryCount},</if>
|
||||
<if test="direction != null and direction != ''">#{direction},</if>
|
||||
<if test="status != null and status != ''">#{status},</if>
|
||||
<if test="remark != null and remark != ''">#{remark},</if>
|
||||
<if test="createBy != null and createBy != ''">#{createBy},</if>
|
||||
sysdate()
|
||||
)
|
||||
</insert>
|
||||
|
||||
<update id="updateApiConfig" parameterType="com.ruoyi.wcs.api.domain.WcsApiConfig">
|
||||
update wcs_api_config
|
||||
<set>
|
||||
<if test="apiCode != null and apiCode != ''">api_code = #{apiCode},</if>
|
||||
<if test="apiName != null">api_name = #{apiName},</if>
|
||||
<if test="apiUrl != null">api_url = #{apiUrl},</if>
|
||||
<if test="requestMethod != null">request_method = #{requestMethod},</if>
|
||||
<if test="contentType != null">content_type = #{contentType},</if>
|
||||
<if test="timeout != null">timeout = #{timeout},</if>
|
||||
<if test="retryCount != null">retry_count = #{retryCount},</if>
|
||||
<if test="direction != null">direction = #{direction},</if>
|
||||
<if test="status != null and status != ''">status = #{status},</if>
|
||||
<if test="remark != null">remark = #{remark},</if>
|
||||
<if test="updateBy != null and updateBy != ''">update_by = #{updateBy},</if>
|
||||
update_time = sysdate()
|
||||
</set>
|
||||
where api_id = #{apiId}
|
||||
</update>
|
||||
|
||||
<delete id="deleteApiConfigById" parameterType="Long">
|
||||
update wcs_api_config set del_flag = '2' where api_id = #{apiId}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteApiConfigByIds" parameterType="Long">
|
||||
update wcs_api_config set del_flag = '2' where api_id in
|
||||
<foreach collection="array" item="apiId" open="(" separator="," close=")">
|
||||
#{apiId}
|
||||
</foreach>
|
||||
</delete>
|
||||
|
||||
</mapper>
|
||||
121
ruoyi-admin/src/main/resources/mapper/wcs/WcsDeviceMapper.xml
Normal file
121
ruoyi-admin/src/main/resources/mapper/wcs/WcsDeviceMapper.xml
Normal file
@@ -0,0 +1,121 @@
|
||||
<?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.ruoyi.wcs.device.mapper.WcsDeviceMapper">
|
||||
|
||||
<resultMap type="com.ruoyi.wcs.device.domain.WcsDevice" id="WcsDeviceResult">
|
||||
<id property="deviceId" column="device_id" />
|
||||
<result property="deviceCode" column="device_code" />
|
||||
<result property="deviceName" column="device_name" />
|
||||
<result property="deviceType" column="device_type" />
|
||||
<result property="areaCode" column="area_code" />
|
||||
<result property="protocolType" column="protocol_type" />
|
||||
<result property="ipAddress" column="ip_address" />
|
||||
<result property="port" column="port" />
|
||||
<result property="status" column="status" />
|
||||
<result property="delFlag" column="del_flag" />
|
||||
<result property="createBy" column="create_by" />
|
||||
<result property="createTime" column="create_time" />
|
||||
<result property="updateBy" column="update_by" />
|
||||
<result property="updateTime" column="update_time" />
|
||||
<result property="remark" column="remark" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectDeviceVo">
|
||||
select device_id, device_code, device_name, device_type, area_code,
|
||||
protocol_type, ip_address, port, status, del_flag,
|
||||
create_by, create_time, update_by, update_time, remark
|
||||
from wcs_device
|
||||
</sql>
|
||||
|
||||
<select id="selectDeviceList" parameterType="com.ruoyi.wcs.device.domain.WcsDevice" resultMap="WcsDeviceResult">
|
||||
<include refid="selectDeviceVo"/>
|
||||
<where>
|
||||
del_flag = '0'
|
||||
<if test="deviceCode != null and deviceCode != ''">
|
||||
AND device_code like concat('%', #{deviceCode}, '%')
|
||||
</if>
|
||||
<if test="deviceName != null and deviceName != ''">
|
||||
AND device_name like concat('%', #{deviceName}, '%')
|
||||
</if>
|
||||
<if test="deviceType != null and deviceType != ''">
|
||||
AND device_type = #{deviceType}
|
||||
</if>
|
||||
<if test="areaCode != null and areaCode != ''">
|
||||
AND area_code = #{areaCode}
|
||||
</if>
|
||||
<if test="status != null and status != ''">
|
||||
AND status = #{status}
|
||||
</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectDeviceById" parameterType="Long" resultMap="WcsDeviceResult">
|
||||
<include refid="selectDeviceVo"/>
|
||||
where device_id = #{deviceId} and del_flag = '0'
|
||||
</select>
|
||||
|
||||
<select id="checkDeviceCodeUnique" parameterType="String" resultMap="WcsDeviceResult">
|
||||
<include refid="selectDeviceVo"/>
|
||||
where device_code = #{deviceCode} and del_flag = '0' limit 1
|
||||
</select>
|
||||
|
||||
<insert id="insertDevice" parameterType="com.ruoyi.wcs.device.domain.WcsDevice" useGeneratedKeys="true" keyProperty="deviceId">
|
||||
insert into wcs_device(
|
||||
<if test="deviceCode != null and deviceCode != ''">device_code,</if>
|
||||
<if test="deviceName != null and deviceName != ''">device_name,</if>
|
||||
<if test="deviceType != null and deviceType != ''">device_type,</if>
|
||||
<if test="areaCode != null and areaCode != ''">area_code,</if>
|
||||
<if test="protocolType != null and protocolType != ''">protocol_type,</if>
|
||||
<if test="ipAddress != null and ipAddress != ''">ip_address,</if>
|
||||
<if test="port != null">port,</if>
|
||||
<if test="status != null and status != ''">status,</if>
|
||||
<if test="remark != null and remark != ''">remark,</if>
|
||||
<if test="createBy != null and createBy != ''">create_by,</if>
|
||||
create_time
|
||||
)values(
|
||||
<if test="deviceCode != null and deviceCode != ''">#{deviceCode},</if>
|
||||
<if test="deviceName != null and deviceName != ''">#{deviceName},</if>
|
||||
<if test="deviceType != null and deviceType != ''">#{deviceType},</if>
|
||||
<if test="areaCode != null and areaCode != ''">#{areaCode},</if>
|
||||
<if test="protocolType != null and protocolType != ''">#{protocolType},</if>
|
||||
<if test="ipAddress != null and ipAddress != ''">#{ipAddress},</if>
|
||||
<if test="port != null">#{port},</if>
|
||||
<if test="status != null and status != ''">#{status},</if>
|
||||
<if test="remark != null and remark != ''">#{remark},</if>
|
||||
<if test="createBy != null and createBy != ''">#{createBy},</if>
|
||||
sysdate()
|
||||
)
|
||||
</insert>
|
||||
|
||||
<update id="updateDevice" parameterType="com.ruoyi.wcs.device.domain.WcsDevice">
|
||||
update wcs_device
|
||||
<set>
|
||||
<if test="deviceCode != null and deviceCode != ''">device_code = #{deviceCode},</if>
|
||||
<if test="deviceName != null">device_name = #{deviceName},</if>
|
||||
<if test="deviceType != null">device_type = #{deviceType},</if>
|
||||
<if test="areaCode != null">area_code = #{areaCode},</if>
|
||||
<if test="protocolType != null">protocol_type = #{protocolType},</if>
|
||||
<if test="ipAddress != null">ip_address = #{ipAddress},</if>
|
||||
<if test="port != null">port = #{port},</if>
|
||||
<if test="status != null and status != ''">status = #{status},</if>
|
||||
<if test="remark != null">remark = #{remark},</if>
|
||||
<if test="updateBy != null and updateBy != ''">update_by = #{updateBy},</if>
|
||||
update_time = sysdate()
|
||||
</set>
|
||||
where device_id = #{deviceId}
|
||||
</update>
|
||||
|
||||
<delete id="deleteDeviceById" parameterType="Long">
|
||||
update wcs_device set del_flag = '2' where device_id = #{deviceId}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteDeviceByIds" parameterType="Long">
|
||||
update wcs_device set del_flag = '2' where device_id in
|
||||
<foreach collection="array" item="deviceId" open="(" separator="," close=")">
|
||||
#{deviceId}
|
||||
</foreach>
|
||||
</delete>
|
||||
|
||||
</mapper>
|
||||
@@ -0,0 +1,119 @@
|
||||
<?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.ruoyi.wcs.device.mapper.WcsDevicePointMapper">
|
||||
|
||||
<resultMap type="com.ruoyi.wcs.device.domain.WcsDevicePoint" id="WcsDevicePointResult">
|
||||
<id property="pointId" column="point_id" />
|
||||
<result property="deviceId" column="device_id" />
|
||||
<result property="pointCode" column="point_code" />
|
||||
<result property="pointName" column="point_name" />
|
||||
<result property="pointType" column="point_type" />
|
||||
<result property="dataType" column="data_type" />
|
||||
<result property="address" column="address" />
|
||||
<result property="unit" column="unit" />
|
||||
<result property="status" column="status" />
|
||||
<result property="delFlag" column="del_flag" />
|
||||
<result property="createBy" column="create_by" />
|
||||
<result property="createTime" column="create_time" />
|
||||
<result property="updateBy" column="update_by" />
|
||||
<result property="updateTime" column="update_time" />
|
||||
<result property="remark" column="remark" />
|
||||
<result property="deviceName" column="device_name" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectPointVo">
|
||||
select p.point_id, p.device_id, p.point_code, p.point_name, p.point_type,
|
||||
p.data_type, p.address, p.unit, p.status, p.del_flag,
|
||||
p.create_by, p.create_time, p.update_by, p.update_time, p.remark,
|
||||
d.device_name
|
||||
from wcs_device_point p
|
||||
left join wcs_device d on d.device_id = p.device_id
|
||||
</sql>
|
||||
|
||||
<select id="selectPointList" parameterType="com.ruoyi.wcs.device.domain.WcsDevicePoint" resultMap="WcsDevicePointResult">
|
||||
<include refid="selectPointVo"/>
|
||||
<where>
|
||||
p.del_flag = '0'
|
||||
<if test="deviceId != null">
|
||||
AND p.device_id = #{deviceId}
|
||||
</if>
|
||||
<if test="pointCode != null and pointCode != ''">
|
||||
AND p.point_code like concat('%', #{pointCode}, '%')
|
||||
</if>
|
||||
<if test="pointName != null and pointName != ''">
|
||||
AND p.point_name like concat('%', #{pointName}, '%')
|
||||
</if>
|
||||
<if test="pointType != null and pointType != ''">
|
||||
AND p.point_type = #{pointType}
|
||||
</if>
|
||||
<if test="status != null and status != ''">
|
||||
AND p.status = #{status}
|
||||
</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectPointById" parameterType="Long" resultMap="WcsDevicePointResult">
|
||||
<include refid="selectPointVo"/>
|
||||
where p.point_id = #{pointId} and p.del_flag = '0'
|
||||
</select>
|
||||
|
||||
<insert id="insertPoint" parameterType="com.ruoyi.wcs.device.domain.WcsDevicePoint" useGeneratedKeys="true" keyProperty="pointId">
|
||||
insert into wcs_device_point(
|
||||
<if test="deviceId != null">device_id,</if>
|
||||
<if test="pointCode != null and pointCode != ''">point_code,</if>
|
||||
<if test="pointName != null and pointName != ''">point_name,</if>
|
||||
<if test="pointType != null and pointType != ''">point_type,</if>
|
||||
<if test="dataType != null and dataType != ''">data_type,</if>
|
||||
<if test="address != null and address != ''">address,</if>
|
||||
<if test="unit != null and unit != ''">unit,</if>
|
||||
<if test="status != null and status != ''">status,</if>
|
||||
<if test="remark != null and remark != ''">remark,</if>
|
||||
<if test="createBy != null and createBy != ''">create_by,</if>
|
||||
create_time
|
||||
)values(
|
||||
<if test="deviceId != null">#{deviceId},</if>
|
||||
<if test="pointCode != null and pointCode != ''">#{pointCode},</if>
|
||||
<if test="pointName != null and pointName != ''">#{pointName},</if>
|
||||
<if test="pointType != null and pointType != ''">#{pointType},</if>
|
||||
<if test="dataType != null and dataType != ''">#{dataType},</if>
|
||||
<if test="address != null and address != ''">#{address},</if>
|
||||
<if test="unit != null and unit != ''">#{unit},</if>
|
||||
<if test="status != null and status != ''">#{status},</if>
|
||||
<if test="remark != null and remark != ''">#{remark},</if>
|
||||
<if test="createBy != null and createBy != ''">#{createBy},</if>
|
||||
sysdate()
|
||||
)
|
||||
</insert>
|
||||
|
||||
<update id="updatePoint" parameterType="com.ruoyi.wcs.device.domain.WcsDevicePoint">
|
||||
update wcs_device_point
|
||||
<set>
|
||||
<if test="deviceId != null">device_id = #{deviceId},</if>
|
||||
<if test="pointCode != null and pointCode != ''">point_code = #{pointCode},</if>
|
||||
<if test="pointName != null">point_name = #{pointName},</if>
|
||||
<if test="pointType != null">point_type = #{pointType},</if>
|
||||
<if test="dataType != null">data_type = #{dataType},</if>
|
||||
<if test="address != null">address = #{address},</if>
|
||||
<if test="unit != null">unit = #{unit},</if>
|
||||
<if test="status != null and status != ''">status = #{status},</if>
|
||||
<if test="remark != null">remark = #{remark},</if>
|
||||
<if test="updateBy != null and updateBy != ''">update_by = #{updateBy},</if>
|
||||
update_time = sysdate()
|
||||
</set>
|
||||
where point_id = #{pointId}
|
||||
</update>
|
||||
|
||||
<delete id="deletePointById" parameterType="Long">
|
||||
update wcs_device_point set del_flag = '2' where point_id = #{pointId}
|
||||
</delete>
|
||||
|
||||
<delete id="deletePointByIds" parameterType="Long">
|
||||
update wcs_device_point set del_flag = '2' where point_id in
|
||||
<foreach collection="array" item="pointId" open="(" separator="," close=")">
|
||||
#{pointId}
|
||||
</foreach>
|
||||
</delete>
|
||||
|
||||
</mapper>
|
||||
110
ruoyi-admin/src/main/resources/mapper/wcs/WcsFlowDefMapper.xml
Normal file
110
ruoyi-admin/src/main/resources/mapper/wcs/WcsFlowDefMapper.xml
Normal file
@@ -0,0 +1,110 @@
|
||||
<?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.ruoyi.wcs.flow.mapper.WcsFlowDefMapper">
|
||||
|
||||
<resultMap type="com.ruoyi.wcs.flow.domain.WcsFlowDef" id="WcsFlowDefResult">
|
||||
<id property="flowId" column="flow_id" />
|
||||
<result property="flowCode" column="flow_code" />
|
||||
<result property="flowName" column="flow_name" />
|
||||
<result property="flowType" column="flow_type" />
|
||||
<result property="version" column="version" />
|
||||
<result property="flowJson" column="flow_json" />
|
||||
<result property="status" column="status" />
|
||||
<result property="delFlag" column="del_flag" />
|
||||
<result property="createBy" column="create_by" />
|
||||
<result property="createTime" column="create_time" />
|
||||
<result property="updateBy" column="update_by" />
|
||||
<result property="updateTime" column="update_time" />
|
||||
<result property="remark" column="remark" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectFlowDefVo">
|
||||
select flow_id, flow_code, flow_name, flow_type, version, flow_json,
|
||||
status, del_flag, create_by, create_time, update_by, update_time, remark
|
||||
from wcs_flow_def
|
||||
</sql>
|
||||
|
||||
<select id="selectFlowDefList" parameterType="com.ruoyi.wcs.flow.domain.WcsFlowDef" resultMap="WcsFlowDefResult">
|
||||
<include refid="selectFlowDefVo"/>
|
||||
<where>
|
||||
del_flag = '0'
|
||||
<if test="flowCode != null and flowCode != ''">
|
||||
AND flow_code like concat('%', #{flowCode}, '%')
|
||||
</if>
|
||||
<if test="flowName != null and flowName != ''">
|
||||
AND flow_name like concat('%', #{flowName}, '%')
|
||||
</if>
|
||||
<if test="flowType != null and flowType != ''">
|
||||
AND flow_type = #{flowType}
|
||||
</if>
|
||||
<if test="status != null and status != ''">
|
||||
AND status = #{status}
|
||||
</if>
|
||||
</where>
|
||||
order by flow_id desc
|
||||
</select>
|
||||
|
||||
<select id="selectFlowDefById" parameterType="Long" resultMap="WcsFlowDefResult">
|
||||
<include refid="selectFlowDefVo"/>
|
||||
where flow_id = #{flowId} and del_flag = '0'
|
||||
</select>
|
||||
|
||||
<select id="checkFlowCodeUnique" parameterType="String" resultMap="WcsFlowDefResult">
|
||||
<include refid="selectFlowDefVo"/>
|
||||
where flow_code = #{flowCode} and del_flag = '0' limit 1
|
||||
</select>
|
||||
|
||||
<insert id="insertFlowDef" parameterType="com.ruoyi.wcs.flow.domain.WcsFlowDef" useGeneratedKeys="true" keyProperty="flowId">
|
||||
insert into wcs_flow_def(
|
||||
<if test="flowCode != null and flowCode != ''">flow_code,</if>
|
||||
<if test="flowName != null and flowName != ''">flow_name,</if>
|
||||
<if test="flowType != null and flowType != ''">flow_type,</if>
|
||||
<if test="version != null">version,</if>
|
||||
<if test="flowJson != null and flowJson != ''">flow_json,</if>
|
||||
<if test="status != null and status != ''">status,</if>
|
||||
<if test="remark != null and remark != ''">remark,</if>
|
||||
<if test="createBy != null and createBy != ''">create_by,</if>
|
||||
create_time
|
||||
)values(
|
||||
<if test="flowCode != null and flowCode != ''">#{flowCode},</if>
|
||||
<if test="flowName != null and flowName != ''">#{flowName},</if>
|
||||
<if test="flowType != null and flowType != ''">#{flowType},</if>
|
||||
<if test="version != null">#{version},</if>
|
||||
<if test="flowJson != null and flowJson != ''">#{flowJson},</if>
|
||||
<if test="status != null and status != ''">#{status},</if>
|
||||
<if test="remark != null and remark != ''">#{remark},</if>
|
||||
<if test="createBy != null and createBy != ''">#{createBy},</if>
|
||||
sysdate()
|
||||
)
|
||||
</insert>
|
||||
|
||||
<update id="updateFlowDef" parameterType="com.ruoyi.wcs.flow.domain.WcsFlowDef">
|
||||
update wcs_flow_def
|
||||
<set>
|
||||
<if test="flowCode != null and flowCode != ''">flow_code = #{flowCode},</if>
|
||||
<if test="flowName != null">flow_name = #{flowName},</if>
|
||||
<if test="flowType != null">flow_type = #{flowType},</if>
|
||||
<if test="version != null">version = #{version},</if>
|
||||
<if test="flowJson != null">flow_json = #{flowJson},</if>
|
||||
<if test="status != null and status != ''">status = #{status},</if>
|
||||
<if test="remark != null">remark = #{remark},</if>
|
||||
<if test="updateBy != null and updateBy != ''">update_by = #{updateBy},</if>
|
||||
update_time = sysdate()
|
||||
</set>
|
||||
where flow_id = #{flowId}
|
||||
</update>
|
||||
|
||||
<delete id="deleteFlowDefById" parameterType="Long">
|
||||
update wcs_flow_def set del_flag = '2' where flow_id = #{flowId}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteFlowDefByIds" parameterType="Long">
|
||||
update wcs_flow_def set del_flag = '2' where flow_id in
|
||||
<foreach collection="array" item="flowId" open="(" separator="," close=")">
|
||||
#{flowId}
|
||||
</foreach>
|
||||
</delete>
|
||||
|
||||
</mapper>
|
||||
@@ -0,0 +1,95 @@
|
||||
<?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.ruoyi.wcs.flow.mapper.WcsFlowInstanceMapper">
|
||||
|
||||
<resultMap type="com.ruoyi.wcs.flow.domain.WcsFlowInstance" id="WcsFlowInstanceResult">
|
||||
<id property="id" column="id" />
|
||||
<result property="flowDefId" column="flow_def_id" />
|
||||
<result property="status" column="status" />
|
||||
<result property="startTime" column="start_time" />
|
||||
<result property="endTime" column="end_time" />
|
||||
<result property="remark" column="remark" />
|
||||
<result property="createBy" column="create_by" />
|
||||
<result property="createTime" column="create_time" />
|
||||
<result property="updateBy" column="update_by" />
|
||||
<result property="updateTime" column="update_time" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectFlowInstanceVo">
|
||||
select id, flow_def_id, status, start_time, end_time, remark,
|
||||
create_by, create_time, update_by, update_time
|
||||
from wcs_flow_instance
|
||||
</sql>
|
||||
|
||||
<select id="selectFlowInstanceList" parameterType="com.ruoyi.wcs.flow.domain.WcsFlowInstance" resultMap="WcsFlowInstanceResult">
|
||||
<include refid="selectFlowInstanceVo"/>
|
||||
<where>
|
||||
<if test="flowDefId != null">
|
||||
AND flow_def_id = #{flowDefId}
|
||||
</if>
|
||||
<if test="status != null and status != ''">
|
||||
AND status = #{status}
|
||||
</if>
|
||||
<if test="params.beginStartTime != null and params.beginStartTime != ''">
|
||||
AND start_time >= #{params.beginStartTime}
|
||||
</if>
|
||||
<if test="params.endStartTime != null and params.endStartTime != ''">
|
||||
AND start_time <= #{params.endStartTime}
|
||||
</if>
|
||||
</where>
|
||||
order by id desc
|
||||
</select>
|
||||
|
||||
<select id="selectFlowInstanceById" parameterType="Long" resultMap="WcsFlowInstanceResult">
|
||||
<include refid="selectFlowInstanceVo"/>
|
||||
where id = #{id}
|
||||
</select>
|
||||
|
||||
<insert id="insertFlowInstance" parameterType="com.ruoyi.wcs.flow.domain.WcsFlowInstance" useGeneratedKeys="true" keyProperty="id">
|
||||
insert into wcs_flow_instance(
|
||||
<if test="flowDefId != null">flow_def_id,</if>
|
||||
<if test="status != null and status != ''">status,</if>
|
||||
<if test="startTime != null">start_time,</if>
|
||||
<if test="endTime != null">end_time,</if>
|
||||
<if test="remark != null and remark != ''">remark,</if>
|
||||
<if test="createBy != null and createBy != ''">create_by,</if>
|
||||
create_time
|
||||
)values(
|
||||
<if test="flowDefId != null">#{flowDefId},</if>
|
||||
<if test="status != null and status != ''">#{status},</if>
|
||||
<if test="startTime != null">#{startTime},</if>
|
||||
<if test="endTime != null">#{endTime},</if>
|
||||
<if test="remark != null and remark != ''">#{remark},</if>
|
||||
<if test="createBy != null and createBy != ''">#{createBy},</if>
|
||||
sysdate()
|
||||
)
|
||||
</insert>
|
||||
|
||||
<update id="updateFlowInstance" parameterType="com.ruoyi.wcs.flow.domain.WcsFlowInstance">
|
||||
update wcs_flow_instance
|
||||
<set>
|
||||
<if test="flowDefId != null">flow_def_id = #{flowDefId},</if>
|
||||
<if test="status != null and status != ''">status = #{status},</if>
|
||||
<if test="startTime != null">start_time = #{startTime},</if>
|
||||
<if test="endTime != null">end_time = #{endTime},</if>
|
||||
<if test="remark != null">remark = #{remark},</if>
|
||||
<if test="updateBy != null and updateBy != ''">update_by = #{updateBy},</if>
|
||||
update_time = sysdate()
|
||||
</set>
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
<delete id="deleteFlowInstanceById" parameterType="Long">
|
||||
delete from wcs_flow_instance where id = #{id}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteFlowInstanceByIds" parameterType="Long">
|
||||
delete from wcs_flow_instance where id in
|
||||
<foreach collection="array" item="id" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</delete>
|
||||
|
||||
</mapper>
|
||||
@@ -0,0 +1,63 @@
|
||||
<?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.ruoyi.wcs.flow.mapper.WcsFlowLineMapper">
|
||||
|
||||
<resultMap type="com.ruoyi.wcs.flow.domain.WcsFlowLine" id="WcsFlowLineResult">
|
||||
<id property="lineId" column="line_id" />
|
||||
<result property="flowId" column="flow_id" />
|
||||
<result property="sourceNodeId" column="source_node_id" />
|
||||
<result property="targetNodeId" column="target_node_id" />
|
||||
<result property="conditionExpr" column="condition_expr" />
|
||||
<result property="lineLabel" column="line_label" />
|
||||
<result property="sortOrder" column="sort_order" />
|
||||
<result property="createTime" column="create_time" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectFlowLineVo">
|
||||
select line_id, flow_id, source_node_id, target_node_id, condition_expr,
|
||||
line_label, sort_order, create_time
|
||||
from wcs_flow_line
|
||||
</sql>
|
||||
|
||||
<select id="selectFlowLineListByFlowId" parameterType="Long" resultMap="WcsFlowLineResult">
|
||||
<include refid="selectFlowLineVo"/>
|
||||
where flow_id = #{flowId}
|
||||
order by sort_order
|
||||
</select>
|
||||
|
||||
<select id="selectFlowLineById" parameterType="Long" resultMap="WcsFlowLineResult">
|
||||
<include refid="selectFlowLineVo"/>
|
||||
where line_id = #{lineId}
|
||||
</select>
|
||||
|
||||
<insert id="insertFlowLine" parameterType="com.ruoyi.wcs.flow.domain.WcsFlowLine" useGeneratedKeys="true" keyProperty="lineId">
|
||||
insert into wcs_flow_line(
|
||||
<if test="flowId != null">flow_id,</if>
|
||||
<if test="sourceNodeId != null">source_node_id,</if>
|
||||
<if test="targetNodeId != null">target_node_id,</if>
|
||||
<if test="conditionExpr != null and conditionExpr != ''">condition_expr,</if>
|
||||
<if test="lineLabel != null and lineLabel != ''">line_label,</if>
|
||||
<if test="sortOrder != null">sort_order,</if>
|
||||
create_time
|
||||
)values(
|
||||
<if test="flowId != null">#{flowId},</if>
|
||||
<if test="sourceNodeId != null">#{sourceNodeId},</if>
|
||||
<if test="targetNodeId != null">#{targetNodeId},</if>
|
||||
<if test="conditionExpr != null and conditionExpr != ''">#{conditionExpr},</if>
|
||||
<if test="lineLabel != null and lineLabel != ''">#{lineLabel},</if>
|
||||
<if test="sortOrder != null">#{sortOrder},</if>
|
||||
sysdate()
|
||||
)
|
||||
</insert>
|
||||
|
||||
<delete id="deleteFlowLineById" parameterType="Long">
|
||||
delete from wcs_flow_line where line_id = #{lineId}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteFlowLineByFlowId" parameterType="Long">
|
||||
delete from wcs_flow_line where flow_id = #{flowId}
|
||||
</delete>
|
||||
|
||||
</mapper>
|
||||
@@ -0,0 +1,114 @@
|
||||
<?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.ruoyi.wcs.flow.mapper.WcsFlowNodeLogMapper">
|
||||
|
||||
<resultMap type="com.ruoyi.wcs.flow.domain.WcsFlowNodeLog" id="WcsFlowNodeLogResult">
|
||||
<id property="id" column="id" />
|
||||
<result property="instanceId" column="instance_id" />
|
||||
<result property="nodeId" column="node_id" />
|
||||
<result property="nodeType" column="node_type" />
|
||||
<result property="status" column="status" />
|
||||
<result property="input" column="input" />
|
||||
<result property="output" column="output" />
|
||||
<result property="errorMsg" column="error_msg" />
|
||||
<result property="startTime" column="start_time" />
|
||||
<result property="endTime" column="end_time" />
|
||||
<result property="createBy" column="create_by" />
|
||||
<result property="createTime" column="create_time" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectFlowNodeLogVo">
|
||||
select id, instance_id, node_id, node_type, status, input, output,
|
||||
error_msg, start_time, end_time, create_by, create_time
|
||||
from wcs_flow_node_log
|
||||
</sql>
|
||||
|
||||
<select id="selectFlowNodeLogList" parameterType="com.ruoyi.wcs.flow.domain.WcsFlowNodeLog" resultMap="WcsFlowNodeLogResult">
|
||||
<include refid="selectFlowNodeLogVo"/>
|
||||
<where>
|
||||
<if test="instanceId != null">
|
||||
AND instance_id = #{instanceId}
|
||||
</if>
|
||||
<if test="nodeId != null and nodeId != ''">
|
||||
AND node_id = #{nodeId}
|
||||
</if>
|
||||
<if test="nodeType != null and nodeType != ''">
|
||||
AND node_type = #{nodeType}
|
||||
</if>
|
||||
<if test="status != null and status != ''">
|
||||
AND status = #{status}
|
||||
</if>
|
||||
</where>
|
||||
order by id asc
|
||||
</select>
|
||||
|
||||
<select id="selectFlowNodeLogById" parameterType="Long" resultMap="WcsFlowNodeLogResult">
|
||||
<include refid="selectFlowNodeLogVo"/>
|
||||
where id = #{id}
|
||||
</select>
|
||||
|
||||
<select id="selectFlowNodeLogByInstanceId" parameterType="Long" resultMap="WcsFlowNodeLogResult">
|
||||
<include refid="selectFlowNodeLogVo"/>
|
||||
where instance_id = #{instanceId}
|
||||
order by id asc
|
||||
</select>
|
||||
|
||||
<insert id="insertFlowNodeLog" parameterType="com.ruoyi.wcs.flow.domain.WcsFlowNodeLog" useGeneratedKeys="true" keyProperty="id">
|
||||
insert into wcs_flow_node_log(
|
||||
<if test="instanceId != null">instance_id,</if>
|
||||
<if test="nodeId != null and nodeId != ''">node_id,</if>
|
||||
<if test="nodeType != null and nodeType != ''">node_type,</if>
|
||||
<if test="status != null and status != ''">status,</if>
|
||||
<if test="input != null and input != ''">input,</if>
|
||||
<if test="output != null and output != ''">output,</if>
|
||||
<if test="errorMsg != null and errorMsg != ''">error_msg,</if>
|
||||
<if test="startTime != null">start_time,</if>
|
||||
<if test="endTime != null">end_time,</if>
|
||||
<if test="createBy != null and createBy != ''">create_by,</if>
|
||||
create_time
|
||||
)values(
|
||||
<if test="instanceId != null">#{instanceId},</if>
|
||||
<if test="nodeId != null and nodeId != ''">#{nodeId},</if>
|
||||
<if test="nodeType != null and nodeType != ''">#{nodeType},</if>
|
||||
<if test="status != null and status != ''">#{status},</if>
|
||||
<if test="input != null and input != ''">#{input},</if>
|
||||
<if test="output != null and output != ''">#{output},</if>
|
||||
<if test="errorMsg != null and errorMsg != ''">#{errorMsg},</if>
|
||||
<if test="startTime != null">#{startTime},</if>
|
||||
<if test="endTime != null">#{endTime},</if>
|
||||
<if test="createBy != null and createBy != ''">#{createBy},</if>
|
||||
sysdate()
|
||||
)
|
||||
</insert>
|
||||
|
||||
<update id="updateFlowNodeLog" parameterType="com.ruoyi.wcs.flow.domain.WcsFlowNodeLog">
|
||||
update wcs_flow_node_log
|
||||
<set>
|
||||
<if test="status != null and status != ''">status = #{status},</if>
|
||||
<if test="input != null">input = #{input},</if>
|
||||
<if test="output != null">output = #{output},</if>
|
||||
<if test="errorMsg != null">error_msg = #{errorMsg},</if>
|
||||
<if test="startTime != null">start_time = #{startTime},</if>
|
||||
<if test="endTime != null">end_time = #{endTime},</if>
|
||||
</set>
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
<delete id="deleteFlowNodeLogById" parameterType="Long">
|
||||
delete from wcs_flow_node_log where id = #{id}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteFlowNodeLogByIds" parameterType="Long">
|
||||
delete from wcs_flow_node_log where id in
|
||||
<foreach collection="array" item="id" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</delete>
|
||||
|
||||
<delete id="deleteFlowNodeLogByInstanceId" parameterType="Long">
|
||||
delete from wcs_flow_node_log where instance_id = #{instanceId}
|
||||
</delete>
|
||||
|
||||
</mapper>
|
||||
@@ -0,0 +1,89 @@
|
||||
<?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.ruoyi.wcs.flow.mapper.WcsFlowNodeMapper">
|
||||
|
||||
<resultMap type="com.ruoyi.wcs.flow.domain.WcsFlowNode" id="WcsFlowNodeResult">
|
||||
<id property="nodeId" column="node_id" />
|
||||
<result property="flowId" column="flow_id" />
|
||||
<result property="nodeCode" column="node_code" />
|
||||
<result property="nodeName" column="node_name" />
|
||||
<result property="nodeType" column="node_type" />
|
||||
<result property="handlerClass" column="handler_class" />
|
||||
<result property="configJson" column="config_json" />
|
||||
<result property="posX" column="pos_x" />
|
||||
<result property="posY" column="pos_y" />
|
||||
<result property="sortOrder" column="sort_order" />
|
||||
<result property="createTime" column="create_time" />
|
||||
<result property="updateTime" column="update_time" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectFlowNodeVo">
|
||||
select node_id, flow_id, node_code, node_name, node_type, handler_class,
|
||||
config_json, pos_x, pos_y, sort_order, create_time, update_time
|
||||
from wcs_flow_node
|
||||
</sql>
|
||||
|
||||
<select id="selectFlowNodeListByFlowId" parameterType="Long" resultMap="WcsFlowNodeResult">
|
||||
<include refid="selectFlowNodeVo"/>
|
||||
where flow_id = #{flowId}
|
||||
order by sort_order
|
||||
</select>
|
||||
|
||||
<select id="selectFlowNodeById" parameterType="Long" resultMap="WcsFlowNodeResult">
|
||||
<include refid="selectFlowNodeVo"/>
|
||||
where node_id = #{nodeId}
|
||||
</select>
|
||||
|
||||
<insert id="insertFlowNode" parameterType="com.ruoyi.wcs.flow.domain.WcsFlowNode" useGeneratedKeys="true" keyProperty="nodeId">
|
||||
insert into wcs_flow_node(
|
||||
<if test="flowId != null">flow_id,</if>
|
||||
<if test="nodeCode != null and nodeCode != ''">node_code,</if>
|
||||
<if test="nodeName != null and nodeName != ''">node_name,</if>
|
||||
<if test="nodeType != null and nodeType != ''">node_type,</if>
|
||||
<if test="handlerClass != null and handlerClass != ''">handler_class,</if>
|
||||
<if test="configJson != null and configJson != ''">config_json,</if>
|
||||
<if test="posX != null">pos_x,</if>
|
||||
<if test="posY != null">pos_y,</if>
|
||||
<if test="sortOrder != null">sort_order,</if>
|
||||
create_time
|
||||
)values(
|
||||
<if test="flowId != null">#{flowId},</if>
|
||||
<if test="nodeCode != null and nodeCode != ''">#{nodeCode},</if>
|
||||
<if test="nodeName != null and nodeName != ''">#{nodeName},</if>
|
||||
<if test="nodeType != null and nodeType != ''">#{nodeType},</if>
|
||||
<if test="handlerClass != null and handlerClass != ''">#{handlerClass},</if>
|
||||
<if test="configJson != null and configJson != ''">#{configJson},</if>
|
||||
<if test="posX != null">#{posX},</if>
|
||||
<if test="posY != null">#{posY},</if>
|
||||
<if test="sortOrder != null">#{sortOrder},</if>
|
||||
sysdate()
|
||||
)
|
||||
</insert>
|
||||
|
||||
<update id="updateFlowNode" parameterType="com.ruoyi.wcs.flow.domain.WcsFlowNode">
|
||||
update wcs_flow_node
|
||||
<set>
|
||||
<if test="nodeCode != null and nodeCode != ''">node_code = #{nodeCode},</if>
|
||||
<if test="nodeName != null">node_name = #{nodeName},</if>
|
||||
<if test="nodeType != null">node_type = #{nodeType},</if>
|
||||
<if test="handlerClass != null">handler_class = #{handlerClass},</if>
|
||||
<if test="configJson != null">config_json = #{configJson},</if>
|
||||
<if test="posX != null">pos_x = #{posX},</if>
|
||||
<if test="posY != null">pos_y = #{posY},</if>
|
||||
<if test="sortOrder != null">sort_order = #{sortOrder},</if>
|
||||
update_time = sysdate()
|
||||
</set>
|
||||
where node_id = #{nodeId}
|
||||
</update>
|
||||
|
||||
<delete id="deleteFlowNodeById" parameterType="Long">
|
||||
delete from wcs_flow_node where node_id = #{nodeId}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteFlowNodeByFlowId" parameterType="Long">
|
||||
delete from wcs_flow_node where flow_id = #{flowId}
|
||||
</delete>
|
||||
|
||||
</mapper>
|
||||
Reference in New Issue
Block a user