|
@@ -54,21 +54,51 @@
|
|
</resultMap>
|
|
</resultMap>
|
|
|
|
|
|
<sql id="selectAccountingDataVo">
|
|
<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
|
|
|
|
|
|
+ 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>
|
|
</sql>
|
|
|
|
|
|
<select id="selectAccountingDataHjList" parameterType="com.boman.web.core.domain.vo.AccountingDataVo"
|
|
<select id="selectAccountingDataHjList" parameterType="com.boman.web.core.domain.vo.AccountingDataVo"
|
|
resultMap="AccountingDataResult">
|
|
resultMap="AccountingDataResult">
|
|
SELECT
|
|
SELECT
|
|
- r.id,r.user_name as xm,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,d.cjdd,d.cjsj
|
|
|
|
|
|
+ r.id,r.user_name as xm,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,d.cjdd,d.cjsj
|
|
FROM czrk r left join `accounting_data` d on r.id_card = d.zjhm
|
|
FROM czrk r left join `accounting_data` d on r.id_card = d.zjhm
|
|
<where>
|
|
<where>
|
|
r.is_del = 'N'
|
|
r.is_del = 'N'
|
|
and r.status = '1'
|
|
and r.status = '1'
|
|
<if test="zjhm != null and zjhm != ''">and r.id_card = #{zjhm}</if>
|
|
<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="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="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="isNucleicAcid != null and isNucleicAcid != ''">and r.is_nucleicAcid = #{isNucleicAcid}</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>
|
|
@@ -82,7 +112,8 @@
|
|
<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,
|
|
- z.province as provinceXjd , z.city as cityXjd,z.region as regionXjd , z.town as villageTownsXjd, z.village as villageXjd,z.now_in,d.lxdh,d.jcsj,d.jcdd,d.cjdd,d.cjsj
|
|
|
|
|
|
+ z.province as provinceXjd , z.city as cityXjd,z.region as regionXjd , z.town as villageTownsXjd, z.village as
|
|
|
|
+ villageXjd,z.now_in,d.lxdh,d.jcsj,d.jcdd,d.cjdd,d.cjsj
|
|
from czrk r left join czrk_jzdz z on r.id =z.czrk_id
|
|
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
|
|
<where>
|
|
<where>
|
|
@@ -90,8 +121,12 @@
|
|
and r.status = '1'
|
|
and r.status = '1'
|
|
<if test="zjhm != null and zjhm != ''">and r.id_card = #{zjhm}</if>
|
|
<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="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="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="isNucleicAcid != null and isNucleicAcid != ''">and r.is_nucleicAcid = #{isNucleicAcid}</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>
|
|
@@ -129,6 +164,7 @@
|
|
</trim>
|
|
</trim>
|
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
<if test="id != null">#{id},</if>
|
|
<if test="id != null">#{id},</if>
|
|
|
|
+ <if test="jcsj != null">#{jcsj},</if>
|
|
<if test="lxdh != null">#{lxdh},</if>
|
|
<if test="lxdh != null">#{lxdh},</if>
|
|
<if test="address != null">#{address},</if>
|
|
<if test="address != null">#{address},</if>
|
|
<if test="batchNumber != null">#{batchNumber},</if>
|
|
<if test="batchNumber != null">#{batchNumber},</if>
|
|
@@ -151,47 +187,52 @@
|
|
</insert>
|
|
</insert>
|
|
|
|
|
|
<select id="selectById" parameterType="String" resultType="int">
|
|
<select id="selectById" parameterType="String" resultType="int">
|
|
- select count(1) from accounting_data where id = #{id}
|
|
|
|
|
|
+ select count(1)
|
|
|
|
+ from accounting_data
|
|
|
|
+ where id = #{id}
|
|
</select>
|
|
</select>
|
|
<select id="getExport" resultMap="AccountingDataResult">
|
|
<select id="getExport" resultMap="AccountingDataResult">
|
|
|
|
|
|
</select>
|
|
</select>
|
|
<select id="getAccountingDataOne" resultMap="AccountingDataResult">
|
|
<select id="getAccountingDataOne" resultMap="AccountingDataResult">
|
|
- select id,cjsj,lxdh,create_date,modify_date FROM accounting_data order by cjsj desc limit 1;
|
|
|
|
|
|
+ select id, cjsj, lxdh, create_date, modify_date
|
|
|
|
+ FROM accounting_data
|
|
|
|
+ order by cjsj desc limit 1;
|
|
</select>
|
|
</select>
|
|
<select id="getAllData" resultMap="AccountingDataResult">
|
|
<select id="getAllData" resultMap="AccountingDataResult">
|
|
- select id,cjsj,lxdh,create_date,zjhm,xm FROM accounting_data
|
|
|
|
|
|
+ select id, cjsj, lxdh, create_date, zjhm, xm
|
|
|
|
+ FROM accounting_data
|
|
</select>
|
|
</select>
|
|
- <select id="thirdNucleicAcid" resultType="com.boman.web.core.domain.AccountingData">
|
|
|
|
- select
|
|
|
|
- a.oid as main_key,
|
|
|
|
- a.`name` as xm,
|
|
|
|
- a.id_card as zjhm,
|
|
|
|
- a.tel as lxdh,
|
|
|
|
- a.collect_time as cjsj,
|
|
|
|
- c.dis_name_str as cjssxq,
|
|
|
|
- b.`name` as cjdd,
|
|
|
|
- a.verify_finish_time as jcsj,
|
|
|
|
- a.verify_result as jcjg,
|
|
|
|
- a.create_date as create_date,
|
|
|
|
- a.modify_date as modify_date ,
|
|
|
|
- a.source as source ,
|
|
|
|
- a.batch_number as batch_number,
|
|
|
|
- a.collector_name as collector_name,
|
|
|
|
- a.verify_point_name as jcdd,
|
|
|
|
- a.certificate_no_type as certificate_no_type ,
|
|
|
|
- a.focus_person as focus_person ,
|
|
|
|
- a.from_city as from_city,
|
|
|
|
- a.to_city as to_city ,
|
|
|
|
- a.address as address,
|
|
|
|
- a.transit as transit
|
|
|
|
- from t_sampling_dt513 a
|
|
|
|
- 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
|
|
|
|
- where use_flag = 'Y' and type = 'h'
|
|
|
|
- and (c.dis_name_str like '%潜山%'
|
|
|
|
- or left(a.id_card,6) in ('340824','340882'))
|
|
|
|
- and (`a`.`collect_time` >= '2022-5-14 6:00:00'
|
|
|
|
- AND `a`.`collect_time` <= '2022-5-14 6:30:00');
|
|
|
|
|
|
+ <select id="thirdNucleicAcid" resultMap="AccountingDataResult">
|
|
|
|
+ select a.oid as main_key,
|
|
|
|
+ a.`name` as xm,
|
|
|
|
+ a.id_card as zjhm,
|
|
|
|
+ a.tel as lxdh,
|
|
|
|
+ a.collect_time as cjsj,
|
|
|
|
+ c.dis_name_str as cjssxq,
|
|
|
|
+ b.`name` as cjdd,
|
|
|
|
+ a.verify_finish_time as jcsj,
|
|
|
|
+ a.verify_result as jcjg,
|
|
|
|
+ a.create_date as create_date,
|
|
|
|
+ a.modify_date as modify_date,
|
|
|
|
+ a.source as source,
|
|
|
|
+ a.batch_number as batch_number,
|
|
|
|
+ a.collector_name as collector_name,
|
|
|
|
+ a.verify_point_name as jcdd,
|
|
|
|
+ a.certificate_no_type as certificate_no_type,
|
|
|
|
+ a.focus_person as focus_person,
|
|
|
|
+ a.from_city as from_city,
|
|
|
|
+ a.to_city as to_city,
|
|
|
|
+ a.address as address,
|
|
|
|
+ a.transit as transit
|
|
|
|
+ from t_sampling_514 a
|
|
|
|
+ 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
|
|
|
|
+ where use_flag = 'Y'
|
|
|
|
+ and type = 'h'
|
|
|
|
+ and (c.dis_name_str like '%潜山%'
|
|
|
|
+ or left (a.id_card,6) in ('340824','340882'))
|
|
|
|
+ and (`a`.`collect_time` > #{startTime}
|
|
|
|
+ AND #{endTime} >= `a`.`collect_time`);
|
|
</select>
|
|
</select>
|
|
</mapper>
|
|
</mapper>
|