|
@@ -1,55 +1,104 @@
|
|
|
<?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">
|
|
|
+ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
+ "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
|
|
<mapper namespace="com.boman.web.core.mapper.AccountingDataMapper">
|
|
|
|
|
|
<resultMap type="AccountingData" id="AccountingDataResult">
|
|
|
- <result property="id" column="id" />
|
|
|
- <result property="jcsj" column="jcsj" />
|
|
|
- <result property="lxdh" column="lxdh" />
|
|
|
- <result property="address" column="address" />
|
|
|
- <result property="batcNumber" column="batch_number" />
|
|
|
- <result property="focusPerson" column="focus_person" />
|
|
|
- <result property="jcjg" column="jcjg" />
|
|
|
- <result property="fromCity" column="from_city" />
|
|
|
- <result property="jcdd" column="jcdd" />
|
|
|
- <result property="cjdd" column="cjdd" />
|
|
|
- <result property="toCity" column="to_city" />
|
|
|
- <result property="source" column="source" />
|
|
|
- <result property="zjhm" column="zjhm" />
|
|
|
- <result property="cjsj" column="cjsj" />
|
|
|
- <result property="certificateNoType" column="certificate_no_type" />
|
|
|
- <result property="xm" column="xm" />
|
|
|
- <result property="transit" column="transit" />
|
|
|
- <result property="collectorName" column="collector_name" />
|
|
|
- <result property="cjssxq" column="cjssxq" />
|
|
|
- <result property="mainKey" column="main_key" />
|
|
|
- <result property="modifyDate" column="modify_date" />
|
|
|
- <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="isDel" column="is_del" />
|
|
|
+ <result property="id" column="id"/>
|
|
|
+ <result property="jcsj" column="jcsj"/>
|
|
|
+ <result property="lxdh" column="lxdh"/>
|
|
|
+ <result property="address" column="address"/>
|
|
|
+ <result property="batcNumber" column="batch_number"/>
|
|
|
+ <result property="focusPerson" column="focus_person"/>
|
|
|
+ <result property="jcjg" column="jcjg"/>
|
|
|
+ <result property="fromCity" column="from_city"/>
|
|
|
+ <result property="jcdd" column="jcdd"/>
|
|
|
+ <result property="cjdd" column="cjdd"/>
|
|
|
+ <result property="toCity" column="to_city"/>
|
|
|
+ <result property="source" column="source"/>
|
|
|
+ <result property="zjhm" column="zjhm"/>
|
|
|
+ <result property="cjsj" column="cjsj"/>
|
|
|
+ <result property="certificateNoType" column="certificate_no_type"/>
|
|
|
+ <result property="xm" column="xm"/>
|
|
|
+ <result property="transit" column="transit"/>
|
|
|
+ <result property="collectorName" column="collector_name"/>
|
|
|
+ <result property="cjssxq" column="cjssxq"/>
|
|
|
+ <result property="mainKey" column="main_key"/>
|
|
|
+ <result property="modifyDate" column="modify_date"/>
|
|
|
+ <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="isDel" column="is_del"/>
|
|
|
|
|
|
|
|
|
- <result property="phoneNum" column="phoneNum" />
|
|
|
- <result property="province" column="province" />
|
|
|
- <result property="city" column="city" />
|
|
|
- <result property="region" column="region" />
|
|
|
- <result property="villageTowns" column="villageTowns" />
|
|
|
- <result property="village" column="village" />
|
|
|
- <result property="nowIn" column="nowIn" />
|
|
|
- <result property="nowInSelect" column="nowInSelect" />
|
|
|
- <result property="domicileSelect" column="domicileSelect" />
|
|
|
- <result property="isNucleicAcid" column="isNucleicAcid" />
|
|
|
+ <result property="phoneNum" column="phone_num"/>
|
|
|
+ <result property="province" column="province"/>
|
|
|
+ <result property="city" column="city"/>
|
|
|
+ <result property="region" column="region"/>
|
|
|
+ <result property="villageTowns" column="village_towns"/>
|
|
|
+ <result property="village" column="village"/>
|
|
|
+ <result property="nowIn" column="now_in"/>
|
|
|
+ <result property="nowInSelect" column="nowInSelect"/>
|
|
|
+ <result property="domicileSelect" column="domicileSelect"/>
|
|
|
+ <result property="isNucleicAcid" column="isNucleicAcid"/>
|
|
|
+
|
|
|
+
|
|
|
+ <result property="provinceXjd" column="provinceXjd"/>
|
|
|
+ <result property="cityXjd" column="cityXjd"/>
|
|
|
+ <result property="regionXjd" column="regionXjd"/>
|
|
|
+ <result property="villageTownsXjd" column="villageTownsXjd"/>
|
|
|
+ <result property="villageXjd" column="villageXjd"/>
|
|
|
+ <result property="nowXjd" column="nowXjd"/>
|
|
|
</resultMap>
|
|
|
|
|
|
<sql id="selectAccountingDataVo">
|
|
|
select d.id,d.jcsj, d.lxdh ,d.address, d.batch_number,d.focus_person,d.jcjg,d.from_city,d.jcdd,d.cjdd,d.to_city,d.source,d.zjhm,d.cjsj,d.certificate_no_type,d.xm,d.transit,d.collector_name,d.cjssxq,d.main_key,d.modify_date, d.create_by, d.create_time, d.update_by, d.update_time from accounting_data d
|
|
|
</sql>
|
|
|
|
|
|
- <select id="selectAccountingDataList" parameterType="com.boman.web.core.domain.AccountingData" resultMap="AccountingDataResult">
|
|
|
+ <select id="selectAccountingDataHjList" parameterType="com.boman.web.core.domain.vo.AccountingDataVo"
|
|
|
+ resultMap="AccountingDataResult">
|
|
|
+ SELECT
|
|
|
+ r.id,r.user_name,r.id_card as zjhm,r.province,r.city,r.region,r.village_towns,r.village,r.now_in,r.phone_num,d.lxdh,d.jcsj,d.jcdd
|
|
|
+ FROM czrk r left join `accounting_data` d on r.id_card = d.zjhm
|
|
|
+ <where>
|
|
|
+ r.is_del = 'N'
|
|
|
+ and r.status = '1'
|
|
|
+ and d.is_del = 'N'
|
|
|
+ <if test="idCard != null and idCard != ''">and r.id_card = #{idCard}</if>
|
|
|
+ <if test="userName != null and userName != ''">and r.user_name like concat(#{userName}, '%')</if>
|
|
|
+ <if test="params.startTime != null and params.startTime != ''">and DATE_FORMAT(d.jcsj,'%Y-%m-%d %H:%i:%s') >= DATE_FORMAT(#{params.startTime},'%Y-%m-%d %H:%i:%s')</if>
|
|
|
+ <if test="params.endTime != null and params.endTime != ''">and DATE_FORMAT(d.jcsj,'%Y-%m-%d %H:%i:%s') <= DATE_FORMAT(#{params.endTime},'%Y-%m-%d %H:%i:%s')</if>
|
|
|
+ <if test="isNucleicAcid != null and isNucleicAcid != '' and isNucleicAcid == 'N'">and DATE_FORMAT(d.jcsj,'%Y-%m-%d %H:%i:%s') >= DATE_FORMAT('1900-01-01 00:00:00','%Y-%m-%d %H:%i:%s')</if>
|
|
|
+ <if test="provinceId != null and provinceId != ''">and r.province_id = #{provinceId}</if>
|
|
|
+ <if test="cityId != null and cityId != ''">and r.city_id = #{cityId}</if>
|
|
|
+ <if test="regionId != null and regionId != ''">and r.region_id = #{regionId}</if>
|
|
|
+ <if test="villageTownsId != null and villageTownsId != ''">and r.village_towns_id = #{villageTownsId}</if>
|
|
|
+ <if test="villageId != null and villageId != ''">and r.village_id = #{villageId}</if>
|
|
|
+ </where>
|
|
|
+ </select>
|
|
|
|
|
|
+ <select id="selectAccountingDataJzdzList" parameterType="com.boman.web.core.domain.vo.AccountingDataVo"
|
|
|
+ resultMap="AccountingDataResult">
|
|
|
+ select r.user_name, r.phone_num, r.id_card as zjhm,
|
|
|
+ z.province as provinceXjd , z.city as cityXjd,z.region as regionXjd , z.town as villageTownsXjd, z.village as villageXjd,z.now_in as nowXjd,d.lxdh,d.jcsj,d.jcdd
|
|
|
+ from czrk r left join czrk_jzdz z on r.id =z.czrk_id
|
|
|
+ left join `accounting_data` d on r.id_card = d.zjhm
|
|
|
+ <where>
|
|
|
+ r.is_del = 'N'
|
|
|
+ and r.status = '1'
|
|
|
+ and d.is_del = 'N'
|
|
|
+ <if test="idCard != null and idCard != ''">and r.id_card = #{idCard}</if>
|
|
|
+ <if test="userName != null and userName != ''">and r.user_name like concat(#{userName}, '%')</if>
|
|
|
+ <if test="params.startTime != null and params.startTime != ''">and DATE_FORMAT(d.jcsj,'%Y-%m-%d %H:%i:%s') >= DATE_FORMAT(#{params.startTime},'%Y-%m-%d %H:%i:%s')</if>
|
|
|
+ <if test="params.endTime != null and params.endTime != ''">and DATE_FORMAT(d.jcsj,'%Y-%m-%d %H:%i:%s') <= DATE_FORMAT(#{params.endTime},'%Y-%m-%d %H:%i:%s')</if>
|
|
|
+ <if test="isNucleicAcid != null and isNucleicAcid != ''">and DATE_FORMAT(d.jcsj,'%Y-%m-%d %H:%i:%s') >= DATE_FORMAT('1900-01-01 00:00:00','%Y-%m-%d %H:%i:%s')</if>
|
|
|
+ <if test="provinceIdXjd != null and provinceIdXjd != ''">and z.province_id = #{provinceIdXjd}</if>
|
|
|
+ <if test="cityIdXjd != null and cityIdXjd != ''">and z.city_id = #{cityIdXjd}</if>
|
|
|
+ <if test="regionIdXjd != null and regionIdXjd != ''">and z.region_id = #{regionIdXjd}</if>
|
|
|
+ <if test="villageTownsIdXjd != null and villageTownsIdXjd != ''">and z.town_id = #{villageTownsIdXjd}</if>
|
|
|
+ <if test="villageIdXjd != null and villageIdXjd != ''">and z.village_id = #{villageIdXjd}</if>
|
|
|
+ </where>
|
|
|
</select>
|
|
|
</mapper>
|