|
|
@@ -1,7 +1,7 @@
|
|
|
<?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.goldenwater.slaj.hidd.mapper.ObjHiddMapper">
|
|
|
- <resultMap type="com.goldenwater.slaj.hidd.domain.ObjHidd" id="ObjHiddResult">
|
|
|
+ <resultMap type="com.goldenwater.slaj.hidd.domain.ObjHiddVo" id="ObjHiddResult">
|
|
|
<result property="guid" column="guid"/>
|
|
|
<result property="hiddName" column="hidd_name"/>
|
|
|
<result property="engGuid" column="eng_guid"/>
|
|
|
@@ -32,28 +32,40 @@
|
|
|
<result property="temp" column="temp"/>
|
|
|
<result property="toDate" column="to_date"/>
|
|
|
<result property="dictGuid" column="dict_guid"/>
|
|
|
+ <result property="hiddSort" column="hidd_sort"/>
|
|
|
+ <result property="hazGuid" column="haz_guid"/>
|
|
|
+ <result property="engName" column="eng_name"/>
|
|
|
+ <result property="orgName" column="org_name"/>
|
|
|
</resultMap>
|
|
|
<sql id="selectObjHiddVo">
|
|
|
- select guid, hidd_name, eng_guid, tend_guid, se_guid, org_guid, hidd_sour, hidd_grad, hidd_clas, if_found, pro_part, part_long, part_lat, otlcol_qiff_fnvu, insp_rec_guid, se_check_item_guid, hidd_stat, hidd_merg_guid, rec_org_guid, note, coll_time, upd_time, rec_pers, hidds_guid, occu_num, sins_sche_guid, group_guid, temp, to_date, dict_guid
|
|
|
- from obj_hidd
|
|
|
+ select h.guid, h.hidd_name, h.eng_guid, h.tend_guid, h.se_guid, h.org_guid, h.hidd_sour, h.hidd_grad, h.hidd_clas, h.if_found, h.pro_part, h.part_long, h.part_lat, h.otlcol_qiff_fnvu, h.insp_rec_guid, h.se_check_item_guid, h.hidd_stat, h.hidd_merg_guid, h.rec_org_guid, h.note, h.coll_time, h.upd_time, h.rec_pers, h.hidds_guid, h.occu_num, h.sins_sche_guid, h.group_guid, h.temp, h.to_date, h.dict_guid, h.hidd_sort, h.haz_guid,
|
|
|
+ e.eng_name,
|
|
|
+ o.org_name
|
|
|
+ from obj_hidd h
|
|
|
+ left join att_eng_base e on h.eng_guid = e.guid
|
|
|
+ left join att_org_base o on h.org_guid = o.guid
|
|
|
</sql>
|
|
|
<select id="selectObjHiddByGuid" parameterType="String" resultMap="ObjHiddResult">
|
|
|
<include refid="selectObjHiddVo"/>
|
|
|
- where guid = #{guid}
|
|
|
+ where h.guid = #{guid}
|
|
|
</select>
|
|
|
<select id="selectObjHiddList" parameterType="com.goldenwater.slaj.hidd.domain.ObjHidd" resultMap="ObjHiddResult">
|
|
|
<include refid="selectObjHiddVo"/>
|
|
|
<where>
|
|
|
- <if test="hiddName != null and hiddName != ''">AND hidd_name like '%' || #{hiddName} || '%'</if>
|
|
|
- <if test="hiddGrad != null and hiddGrad != ''">AND hidd_grad = #{hiddGrad}</if>
|
|
|
- <if test="hiddStat != null and hiddStat != ''">AND hidd_stat = #{hiddStat}</if>
|
|
|
- <if test="orgGuid != null and orgGuid != ''">AND org_guid = #{orgGuid}</if>
|
|
|
- <if test="guid != null and guid != ''">AND guid = #{guid}</if>
|
|
|
+ <if test="hiddName != null and hiddName != ''">AND h.hidd_name like concat('%', #{hiddName}, '%')</if>
|
|
|
+ <if test="hiddGrad != null and hiddGrad != ''">AND h.hidd_grad = #{hiddGrad}</if>
|
|
|
+ <if test="hiddStat != null and hiddStat != ''">AND h.hidd_stat = #{hiddStat}</if>
|
|
|
+ <if test="orgGuid != null and orgGuid != ''">AND h.org_guid = #{orgGuid}</if>
|
|
|
+ <if test="engGuid != null and engGuid != ''">AND h.eng_guid = #{engGuid}</if>
|
|
|
+ <if test="hazGuid != null and hazGuid != ''">AND h.haz_guid = #{hazGuid}</if>
|
|
|
+ <if test="guid != null and guid != ''">AND h.guid = #{guid}</if>
|
|
|
+ <if test="hiddSort != null and hiddSort != ''">AND h.hidd_sort = #{hiddSort}</if>
|
|
|
+ <if test="hiddSour != null and hiddSour != ''">AND h.hidd_sour = #{hiddSour}</if>
|
|
|
</where>
|
|
|
</select>
|
|
|
<insert id="insertObjHidd" parameterType="com.goldenwater.slaj.hidd.domain.ObjHidd">
|
|
|
- insert into obj_hidd (guid, hidd_name, eng_guid, tend_guid, se_guid, org_guid, hidd_sour, hidd_grad, hidd_clas, if_found, pro_part, part_long, part_lat, otlcol_qiff_fnvu, insp_rec_guid, se_check_item_guid, hidd_stat, hidd_merg_guid, rec_org_guid, note, coll_time, upd_time, rec_pers, hidds_guid, occu_num, sins_sche_guid, group_guid, temp, to_date, dict_guid)
|
|
|
- values (#{guid}, #{hiddName}, #{engGuid}, #{tendGuid}, #{seGuid}, #{orgGuid}, #{hiddSour}, #{hiddGrad}, #{hiddClas}, #{ifFound}, #{proPart}, #{partLong}, #{partLat}, #{otlcolQiffFnvu}, #{inspRecGuid}, #{seCheckItemGuid}, #{hiddStat}, #{hiddMergGuid}, #{recOrgGuid}, #{note}, #{collTime}, #{updTime}, #{recPers}, #{hiddsGuid}, #{occuNum}, #{sinsScheGuid}, #{groupGuid}, #{temp}, #{toDate}, #{dictGuid})
|
|
|
+ insert into obj_hidd (guid, hidd_name, eng_guid, tend_guid, se_guid, org_guid, hidd_sour, hidd_grad, hidd_clas, if_found, pro_part, part_long, part_lat, otlcol_qiff_fnvu, insp_rec_guid, se_check_item_guid, hidd_stat, hidd_merg_guid, rec_org_guid, note, coll_time, upd_time, rec_pers, hidds_guid, occu_num, sins_sche_guid, group_guid, temp, to_date, dict_guid, hidd_sort, haz_guid)
|
|
|
+ values (#{guid}, #{hiddName}, #{engGuid}, #{tendGuid}, #{seGuid}, #{orgGuid}, #{hiddSour}, #{hiddGrad}, #{hiddClas}, #{ifFound}, #{proPart}, #{partLong}, #{partLat}, #{otlcolQiffFnvu}, #{inspRecGuid}, #{seCheckItemGuid}, #{hiddStat}, #{hiddMergGuid}, #{recOrgGuid}, #{note}, #{collTime}, #{updTime}, #{recPers}, #{hiddsGuid}, #{occuNum}, #{sinsScheGuid}, #{groupGuid}, #{temp}, #{toDate}, #{dictGuid}, #{hiddSort}, #{hazGuid})
|
|
|
</insert>
|
|
|
<update id="updateObjHidd" parameterType="com.goldenwater.slaj.hidd.domain.ObjHidd">
|
|
|
update obj_hidd
|
|
|
@@ -87,6 +99,8 @@
|
|
|
<if test="temp != null">temp = #{temp},</if>
|
|
|
<if test="toDate != null">to_date = #{toDate},</if>
|
|
|
<if test="dictGuid != null">dict_guid = #{dictGuid},</if>
|
|
|
+ <if test="hiddSort != null">hidd_sort = #{hiddSort},</if>
|
|
|
+ <if test="hazGuid != null">haz_guid = #{hazGuid},</if>
|
|
|
</set>
|
|
|
where guid = #{guid}
|
|
|
</update>
|
|
|
@@ -103,10 +117,12 @@
|
|
|
<select id="selectObjHiddListByName" parameterType="com.goldenwater.slaj.hidd.domain.ObjHidd" resultMap="ObjHiddResult">
|
|
|
<include refid="selectObjHiddVo"/>
|
|
|
<where>
|
|
|
- <if test="hiddName != null and hiddName != ''">AND hidd_name like '%' || #{hiddName} || '%'</if>
|
|
|
+ <if test="hiddName != null and hiddName != ''">AND hidd_name like concat('%', #{hiddName}, '%')</if>
|
|
|
<if test="hiddGrad != null and hiddGrad != ''">AND hidd_grad = #{hiddGrad}</if>
|
|
|
<if test="hiddStat != null and hiddStat != ''">AND hidd_stat = #{hiddStat}</if>
|
|
|
<if test="orgGuid != null and orgGuid != ''">AND org_guid = #{orgGuid}</if>
|
|
|
+ <if test="engGuid != null and engGuid != ''">AND eng_guid = #{engGuid}</if>
|
|
|
+ <if test="hiddSort != null and hiddSort != ''">AND hidd_sort = #{hiddSort}</if>
|
|
|
</where>
|
|
|
order by coll_time desc
|
|
|
</select>
|
|
|
@@ -115,15 +131,16 @@
|
|
|
<include refid="selectObjHiddVo"/>
|
|
|
<where>
|
|
|
<if test="orgGuid != null and orgGuid != ''">AND org_guid in (select guid from att_org_base where parent_org_guid = #{orgGuid})</if>
|
|
|
- <if test="hiddName != null and hiddName != ''">AND hidd_name like '%' || #{hiddName} || '%'</if>
|
|
|
+ <if test="hiddName != null and hiddName != ''">AND hidd_name like concat('%', #{hiddName}, '%')</if>
|
|
|
<if test="hiddGrad != null and hiddGrad != ''">AND hidd_grad = #{hiddGrad}</if>
|
|
|
<if test="hiddStat != null and hiddStat != ''">AND hidd_stat = #{hiddStat}</if>
|
|
|
+ <if test="hiddSort != null and hiddSort != ''">AND hidd_sort = #{hiddSort}</if>
|
|
|
</where>
|
|
|
order by coll_time desc
|
|
|
</select>
|
|
|
|
|
|
<insert id="insertNextHidd" parameterType="com.goldenwater.slaj.hidd.domain.ObjHidd">
|
|
|
- insert into obj_hidd (guid, hidd_name, eng_guid, tend_guid, se_guid, org_guid, hidd_sour, hidd_grad, hidd_clas, if_found, pro_part, part_long, part_lat, otlcol_qiff_fnvu, insp_rec_guid, se_check_item_guid, hidd_stat, hidd_merg_guid, rec_org_guid, note, coll_time, upd_time, rec_pers, hidds_guid, occu_num, sins_sche_guid, group_guid, temp, to_date, dict_guid)
|
|
|
- values (#{guid}, #{hiddName}, #{engGuid}, #{tendGuid}, #{seGuid}, #{orgGuid}, #{hiddSour}, #{hiddGrad}, #{hiddClas}, #{ifFound}, #{proPart}, #{partLong}, #{partLat}, #{otlcolQiffFnvu}, #{inspRecGuid}, #{seCheckItemGuid}, #{hiddStat}, #{hiddMergGuid}, #{recOrgGuid}, #{note}, #{collTime}, #{updTime}, #{recPers}, #{hiddsGuid}, #{occuNum}, #{sinsScheGuid}, #{groupGuid}, #{temp}, #{toDate}, #{dictGuid})
|
|
|
+ insert into obj_hidd (guid, hidd_name, eng_guid, tend_guid, se_guid, org_guid, hidd_sour, hidd_grad, hidd_clas, if_found, pro_part, part_long, part_lat, otlcol_qiff_fnvu, insp_rec_guid, se_check_item_guid, hidd_stat, hidd_merg_guid, rec_org_guid, note, coll_time, upd_time, rec_pers, hidds_guid, occu_num, sins_sche_guid, group_guid, temp, to_date, dict_guid, hidd_sort, haz_guid)
|
|
|
+ values (#{guid}, #{hiddName}, #{engGuid}, #{tendGuid}, #{seGuid}, #{orgGuid}, #{hiddSour}, #{hiddGrad}, #{hiddClas}, #{ifFound}, #{proPart}, #{partLong}, #{partLat}, #{otlcolQiffFnvu}, #{inspRecGuid}, #{seCheckItemGuid}, #{hiddStat}, #{hiddMergGuid}, #{recOrgGuid}, #{note}, #{collTime}, #{updTime}, #{recPers}, #{hiddsGuid}, #{occuNum}, #{sinsScheGuid}, #{groupGuid}, #{temp}, #{toDate}, #{dictGuid}, #{hiddSort}, #{hazGuid})
|
|
|
</insert>
|
|
|
</mapper>
|