|
@@ -101,7 +101,6 @@
|
|
<if test="params.endTime != null and params.endTime != '' and params.endTime != 'null'">and
|
|
<if test="params.endTime != null and params.endTime != '' and params.endTime != 'null'">and
|
|
DATE_FORMAT(d.cjsj,'%Y-%m-%d %H:%i:%s') <= DATE_FORMAT(#{params.endTime},'%Y-%m-%d %H:%i:%s')
|
|
DATE_FORMAT(d.cjsj,'%Y-%m-%d %H:%i:%s') <= DATE_FORMAT(#{params.endTime},'%Y-%m-%d %H:%i:%s')
|
|
</if>
|
|
</if>
|
|
- <if test="isNucleicAcid != null and isNucleicAcid != ''">and r.is_nucleicAcid = #{isNucleicAcid}</if>
|
|
|
|
<if test="provinceId != null and provinceId != ''">and r.province_id = #{provinceId}</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="cityId != null and cityId != ''">and r.city_id = #{cityId}</if>
|
|
<if test="regionId != null and regionId != ''">and r.region_id = #{regionId}</if>
|
|
<if test="regionId != null and regionId != ''">and r.region_id = #{regionId}</if>
|
|
@@ -111,6 +110,45 @@
|
|
order by d.cjsj DESC,r.create_time DESC
|
|
order by d.cjsj DESC,r.create_time DESC
|
|
</select>
|
|
</select>
|
|
|
|
|
|
|
|
+ <select id="selectNoAccountingDataHjList" parameterType="com.boman.web.core.domain.vo.AccountingDataVo"
|
|
|
|
+ resultMap="AccountingDataResult">
|
|
|
|
+ select cz.id,cz.user_name as xm,cz.id_card as
|
|
|
|
+ zjhm,cz.province,cz.city,cz.region,cz.village_towns,cz.village,cz.now_in,cz.phone_num from czrk cz
|
|
|
|
+ where id_card not in (
|
|
|
|
+ SELECT
|
|
|
|
+ r.id_card
|
|
|
|
+ FROM czrk r left join `accounting_data` d on r.id_card = d.zjhm
|
|
|
|
+ <where>
|
|
|
|
+ r.is_del = 'N'
|
|
|
|
+ and r.status = '1'
|
|
|
|
+ <if test="zjhm != null and zjhm != ''">and r.id_card = #{zjhm}</if>
|
|
|
|
+ <if test="xm != null and xm != ''">and r.user_name like concat(#{xm}, '%')</if>
|
|
|
|
+ <if test="params.startTime != null and params.startTime != '' and params.startTime != 'null'">and
|
|
|
|
+ DATE_FORMAT(d.cjsj,'%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 params.endTime != 'null'">and
|
|
|
|
+ DATE_FORMAT(d.cjsj,'%Y-%m-%d %H:%i:%s') <= DATE_FORMAT(#{params.endTime},'%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>
|
|
|
|
+ )
|
|
|
|
+ and cz.is_del = 'N'
|
|
|
|
+ and cz.status = '1'
|
|
|
|
+ <if test="zjhm != null and zjhm != ''">and cz.id_card = #{zjhm}</if>
|
|
|
|
+ <if test="xm != null and xm != ''">and cz.user_name like concat(#{xm}, '%')</if>
|
|
|
|
+ <if test="provinceId != null and provinceId != ''">and cz.province_id = #{provinceId}</if>
|
|
|
|
+ <if test="cityId != null and cityId != ''">and cz.city_id = #{cityId}</if>
|
|
|
|
+ <if test="regionId != null and regionId != ''">and cz.region_id = #{regionId}</if>
|
|
|
|
+ <if test="villageTownsId != null and villageTownsId != ''">and cz.village_towns_id = #{villageTownsId}</if>
|
|
|
|
+ <if test="villageId != null and villageId != ''">and cz.village_id = #{villageId}</if>
|
|
|
|
+ order by cz.create_time DESC
|
|
|
|
+ </select>
|
|
|
|
+
|
|
|
|
+
|
|
<select id="selectAccountingDataJzdzList" parameterType="com.boman.web.core.domain.vo.AccountingDataVo"
|
|
<select id="selectAccountingDataJzdzList" parameterType="com.boman.web.core.domain.vo.AccountingDataVo"
|
|
resultMap="AccountingDataResult">
|
|
resultMap="AccountingDataResult">
|
|
select r.user_name as xm, r.phone_num, r.id_card as zjhm,
|
|
select r.user_name as xm, r.phone_num, r.id_card as zjhm,
|
|
@@ -129,7 +167,6 @@
|
|
<if test="params.endTime != null and params.endTime != '' and params.endTime != 'null'">and
|
|
<if test="params.endTime != null and params.endTime != '' and params.endTime != 'null'">and
|
|
DATE_FORMAT(d.cjsj,'%Y-%m-%d %H:%i:%s') <= DATE_FORMAT(#{params.endTime},'%Y-%m-%d %H:%i:%s')
|
|
DATE_FORMAT(d.cjsj,'%Y-%m-%d %H:%i:%s') <= DATE_FORMAT(#{params.endTime},'%Y-%m-%d %H:%i:%s')
|
|
</if>
|
|
</if>
|
|
- <if test="isNucleicAcid != null and isNucleicAcid != ''">and r.is_nucleicAcid = #{isNucleicAcid}</if>
|
|
|
|
<if test="provinceIdXjd != null and provinceIdXjd != ''">and z.province_id = #{provinceIdXjd}</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="cityIdXjd != null and cityIdXjd != ''">and z.city_id = #{cityIdXjd}</if>
|
|
<if test="regionIdXjd != null and regionIdXjd != ''">and z.region_id = #{regionIdXjd}</if>
|
|
<if test="regionIdXjd != null and regionIdXjd != ''">and z.region_id = #{regionIdXjd}</if>
|
|
@@ -140,6 +177,68 @@
|
|
</select>
|
|
</select>
|
|
|
|
|
|
|
|
|
|
|
|
+ <select id="selectNoAccountingDataJzdzList" parameterType="com.boman.web.core.domain.vo.AccountingDataVo"
|
|
|
|
+ resultMap="AccountingDataResult">
|
|
|
|
+ select rz.user_name as xm, rz.phone_num, rz.id_card as zjhm,
|
|
|
|
+ zj.province as provinceXjd , zj.city as cityXjd,zj.region as regionXjd , zj.town as villageTownsXjd, zj.village
|
|
|
|
+ as
|
|
|
|
+ villageXjd,zj.now_in
|
|
|
|
+ from czrk rz left join czrk_jzdz zj on rz.id =zj.czrk_id
|
|
|
|
+ where rz.id_card not in (
|
|
|
|
+ select r.id_card
|
|
|
|
+ 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'
|
|
|
|
+ <if test="zjhm != null and zjhm != ''">and r.id_card = #{zjhm}</if>
|
|
|
|
+ <if test="xm != null and xm != ''">and r.user_name like concat(#{xm}, '%')</if>
|
|
|
|
+ <if test="params.startTime != null and params.startTime != '' and params.startTime != 'null'">and
|
|
|
|
+ DATE_FORMAT(d.cjsj,'%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 params.endTime != 'null'">and
|
|
|
|
+ DATE_FORMAT(d.cjsj,'%Y-%m-%d %H:%i:%s') <= DATE_FORMAT(#{params.endTime},'%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>
|
|
|
|
+ )
|
|
|
|
+ and rz.is_del = 'N'
|
|
|
|
+ and rz.status = '1'
|
|
|
|
+ <if test="zjhm != null and zjhm != ''">and rz.id_card = #{zjhm}</if>
|
|
|
|
+ <if test="xm != null and xm != ''">and rz.user_name like concat(#{xm}, '%')</if>
|
|
|
|
+ <if test="provinceIdXjd != null and provinceIdXjd != ''">and zj.province_id = #{provinceIdXjd}</if>
|
|
|
|
+ <if test="cityIdXjd != null and cityIdXjd != ''">and zj.city_id = #{cityIdXjd}</if>
|
|
|
|
+ <if test="regionIdXjd != null and regionIdXjd != ''">and zj.region_id = #{regionIdXjd}</if>
|
|
|
|
+ <if test="villageTownsIdXjd != null and villageTownsIdXjd != ''">and zj.town_id = #{villageTownsIdXjd}</if>
|
|
|
|
+ <if test="villageIdXjd != null and villageIdXjd != ''">and zj.village_id = #{villageIdXjd}</if>
|
|
|
|
+ order by rz.create_time DESC
|
|
|
|
+
|
|
|
|
+ </select>
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+ <select id="detailedInfoByIdCard" resultMap="AccountingDataResult">
|
|
|
|
+ select r.user_name as xm, 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,d.cjdd,d.cjsj,
|
|
|
|
+ r.province,r.city,r.region,r.village_towns,r.village,r.now_in
|
|
|
|
+ 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'
|
|
|
|
+ <if test="zjhm != null and zjhm != ''">and r.id_card = #{zjhm}</if>
|
|
|
|
+ <if test="cjsj != null and cjsj != ''">and
|
|
|
|
+ and r.cjsj = #{cjsj}
|
|
|
|
+ </if>
|
|
|
|
+ </where>
|
|
|
|
+ limit 1
|
|
|
|
+ </select>
|
|
|
|
+
|
|
|
|
+
|
|
<insert id="insertAccountingData" useGeneratedKeys="true" keyProperty="id">
|
|
<insert id="insertAccountingData" useGeneratedKeys="true" keyProperty="id">
|
|
insert into accounting_data
|
|
insert into accounting_data
|
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
|
@@ -202,8 +301,8 @@
|
|
z.province as provinceXjd , z.city as cityXjd,z.region as regionXjd , z.town as villageTownsXjd, z.village as
|
|
z.province as provinceXjd , z.city as cityXjd,z.region as regionXjd , z.town as villageTownsXjd, z.village as
|
|
villageXjd,z.now_in
|
|
villageXjd,z.now_in
|
|
FROM czrk r
|
|
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
|
|
left join `accounting_data` d on r.id_card = d.zjhm
|
|
|
|
+ left join czrk_jzdz z on r.id =z.czrk_id
|
|
<where>
|
|
<where>
|
|
r.is_del = 'N'
|
|
r.is_del = 'N'
|
|
and r.status = '1'
|
|
and r.status = '1'
|
|
@@ -215,7 +314,6 @@
|
|
<if test="params.endTime != null and params.endTime != '' and params.endTime != 'null'">and
|
|
<if test="params.endTime != null and params.endTime != '' and params.endTime != 'null'">and
|
|
DATE_FORMAT(d.cjsj,'%Y-%m-%d %H:%i:%s') <= DATE_FORMAT(#{params.endTime},'%Y-%m-%d %H:%i:%s')
|
|
DATE_FORMAT(d.cjsj,'%Y-%m-%d %H:%i:%s') <= DATE_FORMAT(#{params.endTime},'%Y-%m-%d %H:%i:%s')
|
|
</if>
|
|
</if>
|
|
- <if test="isNucleicAcid != null and isNucleicAcid != ''">and r.is_nucleicAcid = #{isNucleicAcid}</if>
|
|
|
|
<if test="provinceId != null and provinceId != ''">and r.province_id = #{provinceId}</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="cityId != null and cityId != ''">and r.city_id = #{cityId}</if>
|
|
<if test="regionId != null and regionId != ''">and r.region_id = #{regionId}</if>
|
|
<if test="regionId != null and regionId != ''">and r.region_id = #{regionId}</if>
|
|
@@ -226,6 +324,54 @@
|
|
</select>
|
|
</select>
|
|
|
|
|
|
|
|
|
|
|
|
+ <select id="getExportHjNo" resultMap="AccountingDataResult">
|
|
|
|
+
|
|
|
|
+ SELECT
|
|
|
|
+ zr.id,zr.user_name as xm,zr.id_card as zjhm,zr.code as hjh,zr.is_nucleicAcid as isNucleicAcid,
|
|
|
|
+ zr.province,zr.city,zr.region,zr.village_towns,zr.village,zr.now_in,zr.phone_num,
|
|
|
|
+ zj.province as provinceXjd , zj.city as cityXjd,zj.region as regionXjd , zj.town as villageTownsXjd, zj.village
|
|
|
|
+ as
|
|
|
|
+ villageXjd,zj.now_in
|
|
|
|
+ FROM czrk zr
|
|
|
|
+ left join czrk_jzdz zj on zr.id =zj.czrk_id
|
|
|
|
+ where zr.id_card not in (
|
|
|
|
+ SELECT
|
|
|
|
+ r.id_card
|
|
|
|
+ FROM czrk r
|
|
|
|
+ left join `accounting_data` d on r.id_card = d.zjhm
|
|
|
|
+ <where>
|
|
|
|
+ r.is_del = 'N'
|
|
|
|
+ and r.status = '1'
|
|
|
|
+ <if test="zjhm != null and zjhm != ''">and r.id_card = #{zjhm}</if>
|
|
|
|
+ <if test="xm != null and xm != ''">and r.user_name like concat(#{xm}, '%')</if>
|
|
|
|
+ <if test="params.startTime != null and params.startTime != '' and params.startTime != 'null'">and
|
|
|
|
+ DATE_FORMAT(d.cjsj,'%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 params.endTime != 'null'">and
|
|
|
|
+ DATE_FORMAT(d.cjsj,'%Y-%m-%d %H:%i:%s') <= DATE_FORMAT(#{params.endTime},'%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>
|
|
|
|
+ )
|
|
|
|
+
|
|
|
|
+ and zr.is_del = 'N'
|
|
|
|
+ and zr.status = '1'
|
|
|
|
+ <if test="zjhm != null and zjhm != ''">and zr.id_card = #{zjhm}</if>
|
|
|
|
+ <if test="xm != null and xm != ''">and zr.user_name like concat(#{xm}, '%')</if>
|
|
|
|
+ <if test="provinceId != null and provinceId != ''">and zr.province_id = #{provinceId}</if>
|
|
|
|
+ <if test="cityId != null and cityId != ''">and zr.city_id = #{cityId}</if>
|
|
|
|
+ <if test="regionId != null and regionId != ''">and zr.region_id = #{regionId}</if>
|
|
|
|
+ <if test="villageTownsId != null and villageTownsId != ''">and zr.village_towns_id = #{villageTownsId}</if>
|
|
|
|
+ <if test="villageId != null and villageId != ''">and zr.village_id = #{villageId}</if>
|
|
|
|
+
|
|
|
|
+ order by zr.create_time DESC
|
|
|
|
+ </select>
|
|
|
|
+
|
|
|
|
+
|
|
<select id="exportCz" resultMap="AccountingDataResult">
|
|
<select id="exportCz" resultMap="AccountingDataResult">
|
|
select
|
|
select
|
|
r.id,r.user_name as xm,r.id_card as zjhm,r.code as hjh,r.is_nucleicAcid as isNucleicAcid,
|
|
r.id,r.user_name as xm,r.id_card as zjhm,r.code as hjh,r.is_nucleicAcid as isNucleicAcid,
|
|
@@ -247,7 +393,6 @@
|
|
<if test="params.endTime != null and params.endTime != '' and params.endTime != 'null'">and
|
|
<if test="params.endTime != null and params.endTime != '' and params.endTime != 'null'">and
|
|
DATE_FORMAT(d.cjsj,'%Y-%m-%d %H:%i:%s') <= DATE_FORMAT(#{params.endTime},'%Y-%m-%d %H:%i:%s')
|
|
DATE_FORMAT(d.cjsj,'%Y-%m-%d %H:%i:%s') <= DATE_FORMAT(#{params.endTime},'%Y-%m-%d %H:%i:%s')
|
|
</if>
|
|
</if>
|
|
- <if test="isNucleicAcid != null and isNucleicAcid != ''">and r.is_nucleicAcid = #{isNucleicAcid}</if>
|
|
|
|
<if test="provinceIdXjd != null and provinceIdXjd != ''">and z.province_id = #{provinceIdXjd}</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="cityIdXjd != null and cityIdXjd != ''">and z.city_id = #{cityIdXjd}</if>
|
|
<if test="regionIdXjd != null and regionIdXjd != ''">and z.region_id = #{regionIdXjd}</if>
|
|
<if test="regionIdXjd != null and regionIdXjd != ''">and z.region_id = #{regionIdXjd}</if>
|
|
@@ -257,6 +402,54 @@
|
|
order by d.cjsj DESC,r.create_time DESC
|
|
order by d.cjsj DESC,r.create_time DESC
|
|
</select>
|
|
</select>
|
|
|
|
|
|
|
|
+
|
|
|
|
+ <select id="exportCzjNo" resultMap="AccountingDataResult">
|
|
|
|
+ select
|
|
|
|
+ zr.id,zr.user_name as xm,zr.id_card as zjhm,zr.code as hjh,zr.is_nucleicAcid as isNucleicAcid,
|
|
|
|
+ zr.province,zr.city,zr.region,zr.village_towns,zr.village,zr.now_in,zr.phone_num,
|
|
|
|
+ zj.province as provinceXjd , zj.city as cityXjd,zj.region as regionXjd , zj.town as villageTownsXjd, zj.village
|
|
|
|
+ as
|
|
|
|
+ villageXjd,zj.now_in
|
|
|
|
+ from czrk zr
|
|
|
|
+ left join czrk_jzdz zj on zr.id =zj.czrk_id
|
|
|
|
+ where zr.id_card not in (
|
|
|
|
+ select
|
|
|
|
+ r.id_card
|
|
|
|
+ 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'
|
|
|
|
+ <if test="zjhm != null and zjhm != ''">and r.id_card = #{zjhm}</if>
|
|
|
|
+ <if test="xm != null and xm != ''">and r.user_name like concat(#{xm}, '%')</if>
|
|
|
|
+ <if test="params.startTime != null and params.startTime != '' and params.startTime != 'null'">and
|
|
|
|
+ DATE_FORMAT(d.cjsj,'%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 params.endTime != 'null'">and
|
|
|
|
+ DATE_FORMAT(d.cjsj,'%Y-%m-%d %H:%i:%s') <= DATE_FORMAT(#{params.endTime},'%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>
|
|
|
|
+ )
|
|
|
|
+
|
|
|
|
+ and zr.is_del = 'N'
|
|
|
|
+ and zr.status = '1'
|
|
|
|
+ <if test="zjhm != null and zjhm != ''">and zr.id_card = #{zjhm}</if>
|
|
|
|
+ <if test="xm != null and xm != ''">and zr.user_name like concat(#{xm}, '%')</if>
|
|
|
|
+ <if test="provinceIdXjd != null and provinceIdXjd != ''">and zj.province_id = #{provinceIdXjd}</if>
|
|
|
|
+ <if test="cityIdXjd != null and cityIdXjd != ''">and zj.city_id = #{cityIdXjd}</if>
|
|
|
|
+ <if test="regionIdXjd != null and regionIdXjd != ''">and zj.region_id = #{regionIdXjd}</if>
|
|
|
|
+ <if test="villageTownsIdXjd != null and villageTownsIdXjd != ''">and zj.town_id = #{villageTownsIdXjd}</if>
|
|
|
|
+ <if test="villageIdXjd != null and villageIdXjd != ''">and zj.village_id = #{villageIdXjd}</if>
|
|
|
|
+ order by zr.create_time DESC
|
|
|
|
+ </select>
|
|
|
|
+
|
|
|
|
+
|
|
<select id="getAccountingDataOne" resultMap="AccountingDataResult">
|
|
<select id="getAccountingDataOne" resultMap="AccountingDataResult">
|
|
select id, cjsj, lxdh, create_date, modify_date
|
|
select id, cjsj, lxdh, create_date, modify_date
|
|
FROM accounting_data
|
|
FROM accounting_data
|
|
@@ -288,7 +481,7 @@
|
|
a.to_city as to_city,
|
|
a.to_city as to_city,
|
|
a.address as address,
|
|
a.address as address,
|
|
a.transit as transit
|
|
a.transit as transit
|
|
- from t_sampling_514 a
|
|
|
|
|
|
+ from t_sampling_822 a
|
|
left join t_collect_verify_point b on a.collect_oid = b.oid
|
|
left join t_collect_verify_point b on a.collect_oid = b.oid
|
|
left join t_sys_district c on b.district_oid = c.oid
|
|
left join t_sys_district c on b.district_oid = c.oid
|
|
where use_flag = 'Y'
|
|
where use_flag = 'Y'
|
|
@@ -298,4 +491,60 @@
|
|
and (`a`.`collect_time` > #{startTime}
|
|
and (`a`.`collect_time` > #{startTime}
|
|
AND #{endTime} >= `a`.`collect_time`);
|
|
AND #{endTime} >= `a`.`collect_time`);
|
|
</select>
|
|
</select>
|
|
|
|
+
|
|
|
|
+ <select id="tongjiHjZ" resultType="java.lang.Integer">
|
|
|
|
+ SELECT count(1)
|
|
|
|
+ from (
|
|
|
|
+ SELECT ANY_VALUE(concat(r.id_card, '\t'))
|
|
|
|
+ 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.cjsj > #{startTime}
|
|
|
|
+ and #{endTime} >= d.cjsj
|
|
|
|
+ and r.village_towns_id = #{areaId}
|
|
|
|
+ GROUP BY zjhm) a;
|
|
|
|
+ </select>
|
|
|
|
+ <select id="tongjiCzZ" resultType="java.lang.Integer">
|
|
|
|
+ SELECT count(1)
|
|
|
|
+ from (select ANY_VALUE(r.id_card)
|
|
|
|
+ from czrk_jzdz z
|
|
|
|
+ left join czrk r 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.cjsj > #{startTime}
|
|
|
|
+ and #{endTime} >= d.cjsj
|
|
|
|
+ and z.town_id = #{areaId}
|
|
|
|
+ GROUP BY zjhm) a;
|
|
|
|
+ </select>
|
|
|
|
+ <select id="tongjiHjC" resultType="java.lang.Integer">
|
|
|
|
+ SELECT count(1)
|
|
|
|
+ from (
|
|
|
|
+ SELECT ANY_VALUE(concat(r.id_card, '\t'))
|
|
|
|
+ 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.cjsj > #{startTime}
|
|
|
|
+ and #{endTime} >= d.cjsj
|
|
|
|
+ and r.village_id = #{areaId}
|
|
|
|
+ GROUP BY zjhm) a;
|
|
|
|
+ </select>
|
|
|
|
+ <select id="tongjiCzC" resultType="java.lang.Integer">
|
|
|
|
+ SELECT count(1)
|
|
|
|
+ from (select ANY_VALUE(r.id_card)
|
|
|
|
+ from czrk_jzdz z
|
|
|
|
+ left join czrk r 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.cjsj > #{startTime}
|
|
|
|
+ and #{endTime} >= d.cjsj
|
|
|
|
+ and z.village_id = #{areaId}
|
|
|
|
+ GROUP BY zjhm) a;
|
|
|
|
+ </select>
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+
|
|
</mapper>
|
|
</mapper>
|