SynZhjInfoMapper.xml 4.22 KB
<?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.pashanhoo.zhj.mapper.SynZhjInfoMapper">

    <select id="selectAllInfo" resultType="com.pashanhoo.zhj.entity.SynZhjInfoDo">
        select * from syn_zhjinfo where ZD_STATE='0' and H_STATE='0' and HQS_STATE='0' and del_flag='0'
    </select>

    <update id="updatezdzt">
        update syn_zhjinfo set ZD_STATE='1' where ywh=#{ywh}
    </update>
    <update id="updateHzt">
        update syn_zhjinfo set H_STATE='1' where ywh=#{ywh}
    </update>
    <update id="updateHqszt">
        update syn_zhjinfo set HQS_STATE='1' where ywh=#{ywh}
    </update>
    <select id="getQyBdcxx" resultType="java.util.Map">
        select b.qlrmc,
               b.zjh as QLRZJH,
               a.bdcqzh as BDCQZSH,
               a.bdcdyh,
               a.dbsj as djsj,
               a.yt,
               a.zl,
               a.mj,
               a.syqx,
               '汉中市不动产登记局' as djjg
        from reg_bus_bdcqzsdjxx a, reg_bus_qlr b
        where (a.djlx = '302' or a.djlx = '305')
          and a.del_flag = '0'
          and a.islogout = '0'
          and b.del_flag = '0'
          and b.zjzl in ('7', '10')
          and b.qszt = '1'
          and a.ywh = b.ywh
          and instr(a.ywh, 'LS') = 0

    </select>
    <select id="getQymxfcdyxx" resultType="java.util.Map">
        select dyqr, DYQRZJH, bdcqzh as BDCDJZMH, bdcdyh, QLLX, DYR, DYDJSJ
        from (select b.dyqr,
                     b.DYQRZJH,
                     a.bdcqzh,
                     a.bdcdyh,
                     (select label
                      from sys_dict
                      where value = a.qllx
                        and del_flag = '0'
                        and type = 'reg_bus_qllx') as QLLX,
                     b.DYR,
                     a.dbsj as DYDJSJ
              from reg_bus_bdcqzsdjxx a,
                   (select a.ywh,
                           a.qlrmc as dyqr,
                           a.zjh   as DYQRZJH,
                           b.qlrmc as DYR
                    from reg_bus_qlr a, reg_bus_ywr b
                    where a.del_flag = '0'
                      and a.qszt = '1'
                      and b.del_flag = '0'
                      and b.zjzl in ('7', '10')
                      and b.qszt = '1'
                      and a.ywh = b.ywh) b
              where a.djlx in ('214', '215', '804')
                and a.del_flag = '0'
                and a.islogout = '0'
                and a.ywh = b.ywh
            )
        group by dyqr, DYQRZJH, bdcqzh, bdcdyh, QLLX, DYR, DYDJSJ
    </select>


    <select id="getYCFBdcxx" resultType="java.util.Map">
        SELECT DISTINCT
        q.qlrMc qlrny,
        q.ZJH qlrsfzh,
        a.BDCQZH bdcqzsh,
        to_char(c.CFQSSJ,'yyyy-MM-dd HH24:mi:ss') cfrq,
        c.CFJG cfjg,
        c.CFWH,
        c.BDCDYH ,to_char(c.JFDJSJ,'yyyy-MM-dd HH24:mi:ss') CHAFENGTIME,
        h.ISCHAFENG ISCHAFENG
        FROM
        REG_BUS_BDCQZSDJXX a,
        reg_bus_cfdj c,
        reg_bus_qlr q,
        reg_base_H h
        WHERE
        a.ywh = c.ywh
        AND a.BDCDYH = c.BDCDYH
        AND a.ywh = q.ywh
        AND a.djlx = '907'
        AND a.DEL_FLAG = '0'
        AND a.ISLOGOUT = '1'
        and h.BDCDYH=a.BDCDYH
        and  to_char(c.UPDATE_DATE,'yyyy-MM-dd')= to_char(SYSDATE,'yyyy-MM-dd')
        ORDER BY
        cfrq ASC
    </select>


    <select id="getCFBdcxx" resultType="java.util.Map">
        SELECT DISTINCT
        q.qlrMc qlrny,
        q.ZJH qlrsfzh,
        a.BDCQZH bdcqzsh,
        to_char(c.CFQSSJ,'yyyy-MM-dd HH24:mi:ss') cfrq,
        c.CFJG cfjg,
        c.CFWH,
        c.BDCDYH ,to_char(c.JFDJSJ,'yyyy-MM-dd HH24:mi:ss') CHAFENGTIME,
        h.ISCHAFENG ISCHAFENG
        FROM
        REG_BUS_BDCQZSDJXX a,
        reg_bus_cfdj c,
        reg_bus_qlr q,
        reg_base_H h
        WHERE
        a.ywh = c.ywh
        AND a.BDCDYH = c.BDCDYH
        AND a.ywh = q.ywh
        AND a.djlx = '905'
        AND a.DEL_FLAG = '0'
        AND a.ISLOGOUT = '1'
        and h.BDCDYH=a.BDCDYH
        and  to_char(c.UPDATE_DATE,'yyyy-MM-dd')= to_char(SYSDATE,'yyyy-MM-dd')
        ORDER BY
        cfrq ASC
    </select>
</mapper>