<?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="jnpf.dmsMapper.DmsWenjianMingchengBiangengShenqingMapper">
|
|
<resultMap id="BaseResultMap" type="jnpf.dmsEntity.DmsWenjianMingchengBiangengShenqingEntity">
|
<id column="f_id" property="id"/>
|
<result column="f_tenant_id" property="tenantId"/>
|
<result column="f_flow_id" property="flowId"/>
|
<result column="f_flow_task_id" property="flowTaskId"/>
|
<result column="f_flow_state" property="flowState"/>
|
<result column="f_delete_mark" property="deleteMark"/>
|
<result column="bianhao_id" property="bianhaoId"/>
|
<result column="yuan_wenjian_mingcheng" property="yuanWenjianMingcheng"/>
|
<result column="yuan_mingcheng_banben" property="yuanMingchengBanben"/>
|
<result column="biangeng_hou_wenjian_mingcheng" property="biangengHouWenjianMingcheng"/>
|
</resultMap>
|
|
<select id="selectByFlowForUpdate" resultMap="BaseResultMap">
|
SELECT f_id, f_tenant_id, f_flow_id, f_flow_task_id, f_flow_state,
|
f_delete_mark, bianhao_id, yuan_wenjian_mingcheng,
|
yuan_mingcheng_banben, biangeng_hou_wenjian_mingcheng
|
FROM dms_wenjian_mingcheng_biangeng_shenqing
|
WHERE f_tenant_id = #{tenantId}
|
AND f_flow_id = #{flowId}
|
AND f_flow_task_id = #{taskId}
|
AND (f_delete_mark IS NULL OR f_delete_mark <> 1)
|
FOR UPDATE
|
</select>
|
|
<select id="countActiveByNumber" resultType="int">
|
SELECT COUNT(1)
|
FROM dms_wenjian_mingcheng_biangeng_shenqing
|
WHERE f_tenant_id = #{tenantId}
|
AND bianhao_id = #{numberId}
|
AND f_id <> #{excludedId}
|
AND f_flow_state IN (1, 5, 6, 8, 10)
|
AND (f_delete_mark IS NULL OR f_delete_mark <> 1)
|
</select>
|
|
</mapper>
|