<?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.limsMapper.LimsSxtQuyangdianMapper">
|
|
<resultMap id="quyangdianVOMap" type="jnpf.limsModel.LimsSxtQuyangdianVO">
|
<id property="id" column="f_id"/>
|
<result property="tenantId" column="f_tenant_id"/>
|
<result property="quyangdianBianhao" column="quyangdian_bianhao"/>
|
<result property="quyangDidian" column="quyang_didian"/>
|
<result property="chejianMingcheng" column="chejian_mingcheng"/>
|
<result property="lururen" column="lururen"/>
|
<result property="leiXing" column="leixing"/>
|
<result property="luruShijian" column="luru_shijian"/>
|
<result property="bizEnabled" column="biz_enabled"/>
|
<result property="fuzeGangwei" column="fuze_gangwei"/>
|
<result property="bizSign" column="biz_sign"/>
|
<result property="chejianMingchengName" column="chejian_mingcheng_name"/>
|
|
<!-- 关联字段 -->
|
<result property="lururenName" column="lururen_name"/>
|
<result property="leixingMingcheng" column="leixing_mingcheng"/>
|
<result property="leixingType" column="leixing_type"/>
|
<result property="fuzeGangweiName" column="fuze_gangwei_name"/>
|
<result property="bizSignName" column="biz_sign_name"/>
|
</resultMap>
|
|
<resultMap id="quyangdianKuaizhaoMap" type="jnpf.limsModel.LimsSxtQuyangdianKuaizhaoModel">
|
<id property="id" column="f_id"/>
|
<result property="tenantId" column="f_tenant_id"/>
|
<result property="quyangdianBianhao" column="quyangdian_bianhao"/>
|
<result property="quyangDidian" column="quyang_didian"/>
|
<result property="chejianMingcheng" column="chejian_mingcheng"/>
|
<result property="chejianMingchengName" column="chejian_mingcheng_name"/>
|
<result property="lururen" column="lururen"/>
|
<result property="leiXing" column="leixing"/>
|
<result property="luruShijian" column="luru_shijian"/>
|
<result property="bizEnabled" column="biz_enabled"/>
|
<result property="fuzeGangwei" column="fuze_gangwei"/>
|
<result property="bizSign" column="biz_sign"/>
|
</resultMap>
|
|
|
<select id="selectByLeixingAndChejian" resultMap="quyangdianVOMap">
|
SELECT
|
t.quyangdian_bianhao,
|
t.quyang_didian,
|
t.chejian_mingcheng,
|
t.lururen,
|
t.leixing,
|
t.luru_shijian,
|
t.biz_enabled,
|
t.fuze_gangwei,
|
t.biz_sign,
|
t.f_id,
|
t.f_tenant_id,
|
t.f_flow_id,
|
t.f_flow_task_id,
|
t.f_flow_state,
|
t.f_version,
|
t.f_delete_mark,
|
t.f_delete_time,
|
t.f_delete_user_id,
|
t.chejian_mingcheng_name,
|
u1.f_real_name AS lururen_name,
|
y.mingcheng AS leixing_mingcheng,
|
y.leixin AS leixing_type,
|
r.f_full_name AS fuze_gangwei_name,
|
u2.f_real_name AS biz_sign_name
|
FROM
|
lims_sxt_quyangdian t
|
LEFT JOIN
|
lims_sxt_chejian c ON t.chejian_mingcheng = c.f_id
|
LEFT JOIN
|
yangpin_guanli y ON t.leixing = y.f_id
|
LEFT JOIN
|
base_user u1 ON t.lururen = u1.f_id
|
LEFT JOIN
|
base_role r ON t.fuze_gangwei = r.f_id
|
LEFT JOIN
|
base_user u2 ON t.biz_sign = u2.f_id
|
WHERE
|
t.f_delete_mark IS NULL
|
AND t.biz_enabled = 'enabled'
|
AND t.leixing = #{leixing}
|
AND t.chejian_mingcheng IN
|
<foreach collection="chejianList" item="chejian" open="(" close=")" separator=",">
|
#{chejian}
|
</foreach>
|
ORDER BY
|
t.luru_shijian DESC
|
</select>
|
|
<select id="selectForTaskSnapshot" resultMap="quyangdianKuaizhaoMap">
|
SELECT p.f_id,
|
p.f_tenant_id,
|
p.quyangdian_bianhao,
|
p.quyang_didian,
|
p.chejian_mingcheng,
|
p.chejian_mingcheng_name,
|
p.lururen,
|
p.leixing,
|
p.luru_shijian,
|
p.biz_enabled,
|
p.fuze_gangwei,
|
p.biz_sign
|
FROM lims_sxt_quyangdian p
|
INNER JOIN lims_sxt_chejian c
|
ON c.f_id = p.chejian_mingcheng
|
AND c.f_tenant_id = #{tenantId}
|
AND (c.f_delete_mark IS NULL OR c.f_delete_mark <> 1)
|
WHERE p.f_tenant_id = #{tenantId}
|
AND p.f_id = #{quyangdianId}
|
AND p.biz_enabled = 'enabled'
|
AND (p.f_delete_mark IS NULL OR p.f_delete_mark <> 1)
|
</select>
|
|
</mapper>
|