You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

368 lines
27 KiB

<?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.zdxt.dict.mapper.EveInfoMapper">
<resultMap type="EveDutyInfo" id="EveDutyInfoResult">
<result property="guid" column="guid" />
<result property="title" column="title" />
<result property="content" column="content" />
<result property="dutyType" column="duty_type" />
<result property="dataId" column="data_id" />
<result property="auditPersion" column="audit_persion" />
<result property="auditRemark" column="audit_remark" />
<result property="auditTime" column="audit_time" />
<result property="submitFlag" column="submit_flag" />
<result property="submitOrgCode" column="submit_org_code" />
<result property="submitOrgName" column="submit_org_name" />
<result property="submitPerson" column="submit_person" />
<result property="submitPersonPhone" column="submit_person_phone" />
<result property="submitTime" column="submit_time" />
<result property="sourceOrgCode" column="source_org_code" />
<result property="sourceOrgName" column="source_org_name" />
<result property="sourcePerson" column="source_person" />
<result property="sourcePersonPhone" column="source_person_phone" />
<result property="sourceTime" column="source_time" />
<result property="handleFlag" column="handle_flag" />
<result property="handleSugg" column="handle_sugg" />
<result property="handlePerson" column="handle_person" />
<result property="handlePersonPhone" column="handle_person_phone" />
<result property="handleTime" column="handle_time" />
<result property="createOrgCode" column="create_org_code" />
<result property="createOrgName" column="create_org_name" />
<result property="creator" column="creator" />
<result property="createPersonPhone" column="create_person_phone" />
<result property="createTime" column="create_time" />
<result property="status" column="status" />
<result property="updator" column="updator" />
<result property="updateTime" column="update_time" />
<result property="sassId" column="sass_id" />
<result property="expand1" column="expand1" />
<result property="expand2" column="expand2" />
<result property="expand3" column="expand3" />
<result property="statusSearch" column="status_search" />
<result property="deptId" column="dept_id"/>
<result property="userId" column="user_id"/>
</resultMap>
<sql id="selectEveDutyInfoVo">
select guid, title, content, duty_type, data_id, audit_persion, audit_remark, audit_time, submit_flag, submit_org_code, submit_org_name, submit_person, submit_person_phone, submit_time, source_org_code, source_org_name, source_person, source_person_phone, source_time, handle_flag, handle_sugg, handle_person, handle_person_phone, handle_time, create_org_code, create_org_name, creator, create_person_phone, create_time, status, updator, update_time, sass_id, expand1, expand2, expand3 ,dept_id , user_id from eve_duty_info
</sql>
<select id="selectEveDutyInfoList" parameterType="EveDutyInfo" resultMap="EveDutyInfoResult">
<include refid="selectEveDutyInfoVo"/>
<where>
<if test="title != null and title != ''"> and title like concat('%', #{title}, '%')</if>
<if test="content != null and content != ''"> and content = #{content}</if>
<if test="dutyType != null and dutyType != ''"> and duty_type = #{dutyType}</if>
<if test="dataId != null and dataId != ''"> and data_id = #{dataId}</if>
<if test="auditPersion != null and auditPersion != ''"> and audit_persion = #{auditPersion}</if>
<if test="auditRemark != null and auditRemark != ''"> and audit_remark = #{auditRemark}</if>
<if test="auditTime != null "> and audit_time = #{auditTime}</if>
<if test="submitFlag != null and submitFlag != ''"> and submit_flag = #{submitFlag}</if>
<if test="submitOrgCode != null and submitOrgCode != ''"> and submit_org_code = #{submitOrgCode}</if>
<if test="submitOrgName != null and submitOrgName != ''"> and submit_org_name like concat('%', #{submitOrgName}, '%')</if>
<if test="submitPerson != null and submitPerson != ''"> and submit_person = #{submitPerson}</if>
<if test="submitPersonPhone != null and submitPersonPhone != ''"> and submit_person_phone = #{submitPersonPhone}</if>
<if test="submitTime != null"> and submit_time = #{submitTime}</if>
<if test="sourceOrgCode != null and sourceOrgCode != ''"> and source_org_code = #{sourceOrgCode}</if>
<if test="sourceOrgName != null and sourceOrgName != ''"> and source_org_name like concat('%', #{sourceOrgName}, '%')</if>
<if test="sourcePerson != null and sourcePerson != ''"> and source_person = #{sourcePerson}</if>
<if test="sourcePersonPhone != null and sourcePersonPhone != ''"> and source_person_phone = #{sourcePersonPhone}</if>
<if test="sourceTime != null "> and source_time = #{sourceTime}</if>
<if test="handleFlag != null and handleFlag != ''"> and handle_flag = #{handleFlag}</if>
<if test="handleSugg != null and handleSugg != ''"> and handle_sugg = #{handleSugg}</if>
<if test="handlePerson != null and handlePerson != ''"> and handle_person = #{handlePerson}</if>
<if test="handlePersonPhone != null and handlePersonPhone != ''"> and handle_person_phone = #{handlePersonPhone}</if>
<if test="handleTime != null "> and handle_time = #{handleTime}</if>
<if test="createOrgCode != null and createOrgCode != ''"> and create_org_code = #{createOrgCode}</if>
<if test="createOrgName != null and createOrgName != ''"> and create_org_name like concat('%', #{createOrgName}, '%')</if>
<if test="creator != null and creator != ''"> and creator = #{creator}</if>
<if test="createTime != null"> and create_time = #{createTime}</if>
<if test="createPersonPhone != null and createPersonPhone != ''"> and create_person_phone = #{createPersonPhone}</if>
<if test="status != null and status != ''">
and status in
<foreach collection="status" item="status" index="index" open="(" close=")" separator=",">
#{status}
</foreach>
</if>
<if test="updator != null and updator != ''"> and updator = #{updator}</if>
<if test="sassId != null and sassId != ''"> and sass_id = #{sassId}</if>
<if test="expand1 != null and expand1 != ''"> and expand1 = #{expand1}</if>
<if test="expand2 != null and expand2 != ''"> and expand2 = #{expand2}</if>
<if test="expand3 != null and expand3 != ''"> and expand3 = #{expand3}</if>
<if test="statusSearch != null and statusSearch != ''"> and status = #{statusSearch}</if>
<if test="params != null">
<!-- 数据范围过滤 -->
${params.dataScope}
</if>
</where>
order by create_time DESC
</select>
<select id="selectEveDutyInfo" parameterType="EveDutyInfo" resultMap="EveDutyInfoResult">
<include refid="selectEveDutyInfoVo"/>
<where>
<if test="title != null and title != ''"> and title like concat('%', #{title}, '%')</if>
<if test="content != null and content != ''"> and content = #{content}</if>
<if test="dutyType != null and dutyType != ''"> and duty_type = #{dutyType}</if>
<if test="dataId != null and dataId != ''"> and data_id = #{dataId}</if>
<if test="auditPersion != null and auditPersion != ''"> and audit_persion = #{auditPersion}</if>
<if test="auditRemark != null and auditRemark != ''"> and audit_remark = #{auditRemark}</if>
<if test="auditTime != null "> and audit_time = #{auditTime}</if>
<if test="submitFlag != null and submitFlag != ''"> and submit_flag = #{submitFlag}</if>
<if test="submitOrgCode != null and submitOrgCode != ''"> and submit_org_code = #{submitOrgCode}</if>
<if test="submitOrgName != null and submitOrgName != ''"> and submit_org_name like concat('%', #{submitOrgName}, '%')</if>
<if test="submitPerson != null and submitPerson != ''"> and submit_person = #{submitPerson}</if>
<if test="submitPersonPhone != null and submitPersonPhone != ''"> and submit_person_phone = #{submitPersonPhone}</if>
<if test="submitTime != null "> and submit_time = #{submitTime}</if>
<if test="sourceOrgCode != null and sourceOrgCode != ''"> and source_org_code = #{sourceOrgCode}</if>
<if test="sourceOrgName != null and sourceOrgName != ''"> and source_org_name like concat('%', #{sourceOrgName}, '%')</if>
<if test="sourcePerson != null and sourcePerson != ''"> and source_person = #{sourcePerson}</if>
<if test="sourcePersonPhone != null and sourcePersonPhone != ''"> and source_person_phone = #{sourcePersonPhone}</if>
<if test="sourceTime != null "> and source_time = #{sourceTime}</if>
<if test="handleFlag != null and handleFlag != ''"> and handle_flag = #{handleFlag}</if>
<if test="handleSugg != null and handleSugg != ''"> and handle_sugg = #{handleSugg}</if>
<if test="handlePerson != null and handlePerson != ''"> and handle_person = #{handlePerson}</if>
<if test="handlePersonPhone != null and handlePersonPhone != ''"> and handle_person_phone = #{handlePersonPhone}</if>
<if test="handleTime != null "> and handle_time = #{handleTime}</if>
<if test="createOrgCode != null and createOrgCode != ''"> and create_org_code = #{createOrgCode}</if>
<if test="createOrgName != null and createOrgName != ''"> and create_org_name like concat('%', #{createOrgName}, '%')</if>
<if test="creator != null and creator != ''"> and creator = #{creator}</if>
<if test="createTime != null"> and create_time LIKE concat('%', #{createTime}, '%')</if>
<if test="createPersonPhone != null and createPersonPhone != ''"> and create_person_phone = #{createPersonPhone}</if>
<if test="status != null and status != ''">
and status in
<foreach collection="status" item="status" index="index" open="(" close=")" separator=",">
#{status}
</foreach>
</if>
<if test="updator != null and updator != ''"> and updator = #{updator}</if>
<if test="sassId != null and sassId != ''"> and sass_id = #{sassId}</if>
<if test="expand1 != null and expand1 != ''"> and expand1 = #{expand1}</if>
<if test="expand2 != null and expand2 != ''"> and expand2 = #{expand2}</if>
<if test="expand3 != null and expand3 != ''"> and expand3 = #{expand3}</if>
<if test="statusSearch != null and statusSearch != ''"> and status = #{statusSearch}</if>
<if test="params != null">
<!-- 数据范围过滤 -->
${params.dataScope}
</if>
</where>
order by create_time DESC
</select>
<select id="selectEveDutyInfoById" parameterType="String" resultMap="EveDutyInfoResult">
<include refid="selectEveDutyInfoVo"/>
where guid = #{guid}
</select>
<insert id="insertEveDutyInfo" parameterType="EveDutyInfo">
insert into eve_duty_info
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="guid != null and guid != ''">guid,</if>
<if test="title != null and title != ''">title,</if>
<if test="content != null and content != ''">content,</if>
<if test="dutyType != null and dutyType != ''">duty_type,</if>
<if test="dataId != null and dataId != ''">data_id,</if>
<if test="auditPersion != null and auditPersion != ''">audit_persion,</if>
<if test="auditRemark != null and auditRemark != ''">audit_remark,</if>
<if test="auditTime != null ">audit_time,</if>
<if test="submitFlag != null and submitFlag != ''">submit_flag,</if>
<if test="submitOrgCode != null and submitOrgCode != ''">submit_org_code,</if>
<if test="submitOrgName != null and submitOrgName != ''">submit_org_name,</if>
<if test="submitPerson != null and submitPerson != ''">submit_person,</if>
<if test="submitPersonPhone != null and submitPersonPhone != ''">submit_person_phone,</if>
<if test="submitTime != null ">submit_time,</if>
<if test="sourceOrgCode != null and sourceOrgCode != ''">source_org_code,</if>
<if test="sourceOrgName != null and sourceOrgName != ''">source_org_name,</if>
<if test="sourcePerson != null and sourcePerson != ''">source_person,</if>
<if test="sourcePersonPhone != null and sourcePersonPhone != ''">source_person_phone,</if>
<if test="sourceTime != null ">source_time,</if>
<if test="handleFlag != null and handleFlag != ''">handle_flag,</if>
<if test="handleSugg != null and handleSugg != ''">handle_sugg,</if>
<if test="handlePerson != null and handlePerson != ''">handle_person,</if>
<if test="handlePersonPhone != null and handlePersonPhone != ''">handle_person_phone,</if>
<if test="handleTime != null ">handle_time,</if>
<if test="createOrgCode != null and createOrgCode != ''">create_org_code,</if>
<if test="createOrgName != null and createOrgName != ''">create_org_name,</if>
<if test="creator != null and creator != ''">creator,</if>
<if test="createPersonPhone != null and createPersonPhone != ''">create_person_phone,</if>
<if test="createTime != null ">create_time,</if>
<if test="status != null and status != ''">status,</if>
<if test="updator != null and updator != ''">updator,</if>
<if test="updateTime != null ">update_time,</if>
<if test="sassId != null and sassId != ''">sass_id,</if>
<if test="expand1 != null and expand1 != ''">expand1,</if>
<if test="expand2 != null and expand2 != ''">expand2,</if>
<if test="expand3 != null and expand3 != ''">expand3,</if>
<if test="deptId != null and deptId != ''">dept_id,</if>
<if test="userId != null and userId != ''">user_id,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="guid != null and guid != ''">#{guid},</if>
<if test="title != null and title != ''">#{title},</if>
<if test="content != null and content != ''">#{content},</if>
<if test="dutyType != null and dutyType != ''">#{dutyType},</if>
<if test="dataId != null and dataId != ''">#{dataId},</if>
<if test="auditPersion != null and auditPersion != ''">#{auditPersion},</if>
<if test="auditRemark != null and auditRemark != ''">#{auditRemark},</if>
<if test="auditTime != null ">#{auditTime},</if>
<if test="submitFlag != null and submitFlag != ''">#{submitFlag},</if>
<if test="submitOrgCode != null and submitOrgCode != ''">#{submitOrgCode},</if>
<if test="submitOrgName != null and submitOrgName != ''">#{submitOrgName},</if>
<if test="submitPerson != null and submitPerson != ''">#{submitPerson},</if>
<if test="submitPersonPhone != null and submitPersonPhone != ''">#{submitPersonPhone},</if>
<if test="submitTime != null ">#{submitTime},</if>
<if test="sourceOrgCode != null and sourceOrgCode != ''">#{sourceOrgCode},</if>
<if test="sourceOrgName != null and sourceOrgName != ''">#{sourceOrgName},</if>
<if test="sourcePerson != null and sourcePerson != ''">#{sourcePerson},</if>
<if test="sourcePersonPhone != null and sourcePersonPhone != ''">#{sourcePersonPhone},</if>
<if test="sourceTime != null ">#{sourceTime},</if>
<if test="handleFlag != null and handleFlag != ''">#{handleFlag},</if>
<if test="handleSugg != null and handleSugg != ''">#{handleSugg},</if>
<if test="handlePerson != null and handlePerson != ''">#{handlePerson},</if>
<if test="handlePersonPhone != null and handlePersonPhone != ''">#{handlePersonPhone},</if>
<if test="handleTime != null ">#{handleTime},</if>
<if test="createOrgCode != null and createOrgCode != ''">#{createOrgCode},</if>
<if test="createOrgName != null and createOrgName != ''">#{createOrgName},</if>
<if test="creator != null and creator != ''">#{creator},</if>
<if test="createPersonPhone != null and createPersonPhone != ''">#{createPersonPhone},</if>
<if test="createTime != null ">#{createTime},</if>
<if test="status != null and status != ''">#{status},</if>
<if test="updator != null and updator != ''">#{updator},</if>
<if test="updateTime != null ">#{updateTime},</if>
<if test="sassId != null and sassId != ''">#{sassId},</if>
<if test="expand1 != null and expand1 != ''">#{expand1},</if>
<if test="expand2 != null and expand2 != ''">#{expand2},</if>
<if test="expand3 != null and expand3 != ''">#{expand3},</if>
<if test="deptId != null and deptId != ''">#{deptId},</if>
<if test="userId != null and userId != ''">#{userId},</if>
</trim>
</insert>
<update id="updateEveDutyInfo" parameterType="EveDutyInfo">
update eve_duty_info
<trim prefix="SET" suffixOverrides=",">
<if test="title != null and title != ''">title = #{title},</if>
<if test="content != null and content != ''">content = #{content},</if>
<if test="dutyType != null and dutyType != ''">duty_type = #{dutyType},</if>
<if test="dataId != null and dataId != ''">data_id = #{dataId},</if>
<if test="auditPersion != null and auditPersion != ''">audit_persion = #{auditPersion},</if>
<if test="auditRemark != null and auditRemark != ''">audit_remark = #{auditRemark},</if>
<if test="auditTime != null ">audit_time = #{auditTime,jdbcType=TIMESTAMP},</if>
<if test="submitFlag != null and submitFlag != ''">submit_flag = #{submitFlag},</if>
<if test="submitOrgCode != null and submitOrgCode != ''">submit_org_code = #{submitOrgCode},</if>
<if test="submitOrgName != null and submitOrgName != ''">submit_org_name = #{submitOrgName},</if>
<if test="submitPerson != null and submitPerson != ''">submit_person = #{submitPerson},</if>
<if test="submitPersonPhone != null and submitPersonPhone != ''">submit_person_phone = #{submitPersonPhone},</if>
<if test="submitTime != null ">submit_time = #{submitTime},</if>
<if test="sourceOrgCode != null and sourceOrgCode != ''">source_org_code = #{sourceOrgCode},</if>
<if test="sourceOrgName != null and sourceOrgName != ''">source_org_name = #{sourceOrgName},</if>
<if test="sourcePerson != null and sourcePerson != ''">source_person = #{sourcePerson},</if>
<if test="sourcePersonPhone != null and sourcePersonPhone != ''">source_person_phone = #{sourcePersonPhone},</if>
<if test="sourceTime != null ">source_time = #{sourceTime},</if>
<if test="handleFlag != null and handleFlag != ''">handle_flag = #{handleFlag},</if>
<if test="handleSugg != null and handleSugg != ''">handle_sugg = #{handleSugg},</if>
<if test="handlePerson != null and handlePerson != ''">handle_person = #{handlePerson},</if>
<if test="handlePersonPhone != null and handlePersonPhone != ''">handle_person_phone = #{handlePersonPhone},</if>
<if test="handleTime != null ">handle_time = #{handleTime},</if>
<if test="createOrgCode != null and createOrgCode != ''">create_org_code = #{createOrgCode},</if>
<if test="createOrgName != null and createOrgName != ''">create_org_name = #{createOrgName},</if>
<if test="creator != null and creator != ''">creator = #{creator},</if>
<if test="createPersonPhone != null and createPersonPhone != ''">create_person_phone = #{createPersonPhone},</if>
<if test="createTime != null ">create_time = #{createTime},</if>
<if test="status != null and status != ''">status = #{status},</if>
<if test="updator != null and updator != ''">updator = #{updator},</if>
<if test="updateTime != null ">update_time = #{updateTime},</if>
<if test="sassId != null and sassId != ''">sass_id = #{sassId},</if>
<if test="expand1 != null and expand1 != ''">expand1 = #{expand1},</if>
<if test="expand2 != null and expand2 != ''">expand2 = #{expand2},</if>
<if test="expand3 != null and expand3 != ''">expand3 = #{expand3},</if>
</trim>
where guid = #{guid}
</update>
<delete id="deleteEveDutyInfoById" parameterType="String">
delete from eve_duty_info where guid = #{guid}
</delete>
<delete id="deleteEveDutyInfoByIds" parameterType="String">
delete from eve_duty_info where guid in
<foreach item="guid" collection="array" open="(" separator="," close=")">
#{guid}
</foreach>
</delete>
<select id="selectByDataType" resultType="java.util.HashMap" >
select duty_type as type,count(duty_type) as count from eve_duty_info where status in ("6","7") GROUP BY duty_type
</select>
<!--查询要情信息填报单位-->
<select id="getDistinctOrg" resultType="java.util.HashMap">
select distinct CREATE_ORG_NAME as "createOrgName" , CREATE_ORG_CODE as "createOrgCode" from eve_duty_info where CREATE_ORG_NAME IS NOT NULL
</select>
<select id="getTodayCreateOrgName" resultType="java.util.HashMap">
select distinct CREATE_ORG_NAME as "createOrgName" , CREATE_ORG_CODE as "createOrgCode" from eve_duty_info where CREATE_ORG_NAME IS NOT NULL and to_days(create_time) = to_days(now()) and status>1
</select>
<select id="selectDutysByDepts" resultType="int">
select count(1) from eve_duty_info
where to_days(create_time) = to_days(now()) and status>1 and CREATE_ORG_CODE in
<foreach collection="depts" item="depts" index="index" open="(" close=")" separator=",">
#{depts}
</foreach>
</select>
<select id="selectDutyByToDayAndType" resultType="int">
select count(1) from eve_duty_info where duty_type = #{dutyType} and to_days(create_time) = to_days(now()) and status='7'
</select>
<select id="selectByToDay" parameterType="EveDutyInfo" resultMap="EveDutyInfoResult" >
<include refid="selectEveDutyInfoVo"/>
<where>
<if test="title != null and title != ''"> and title like concat(concat('%',#{title}),'%')</if>
<if test="content != null and content != ''"> and content = #{content}</if>
<if test="dutyType != null and dutyType != ''"> and duty_type = #{dutyType}</if>
<if test="dataId != null and dataId != ''"> and data_id = #{dataId}</if>
<if test="auditPersion != null and auditPersion != ''"> and audit_persion = #{auditPersion}</if>
<if test="auditRemark != null and auditRemark != ''"> and audit_remark = #{auditRemark}</if>
<if test="auditTime != null "> and audit_time = #{auditTime}</if>
<if test="submitFlag != null and submitFlag != ''"> and submit_flag = #{submitFlag}</if>
<if test="submitOrgCode != null and submitOrgCode != ''"> and submit_org_code = #{submitOrgCode}</if>
<if test="submitOrgName != null and submitOrgName != ''"> and submit_org_name like concat('%', #{submitOrgName}, '%')</if>
<if test="submitPerson != null and submitPerson != ''"> and submit_person = #{submitPerson}</if>
<if test="submitPersonPhone != null and submitPersonPhone != ''"> and submit_person_phone = #{submitPersonPhone}</if>
<if test="submitTime != null "> and submit_time = #{submitTime}</if>
<if test="sourceOrgCode != null and sourceOrgCode != ''"> and source_org_code = #{sourceOrgCode}</if>
<if test="sourceOrgName != null and sourceOrgName != ''"> and source_org_name like concat('%', #{sourceOrgName}, '%')</if>
<if test="sourcePerson != null and sourcePerson != ''"> and source_person = #{sourcePerson}</if>
<if test="sourcePersonPhone != null and sourcePersonPhone != ''"> and source_person_phone = #{sourcePersonPhone}</if>
<if test="sourceTime != null "> and source_time = #{sourceTime}</if>
<if test="handleFlag != null and handleFlag != ''"> and handle_flag = #{handleFlag}</if>
<if test="handleSugg != null and handleSugg != ''"> and handle_sugg = #{handleSugg}</if>
<if test="handlePerson != null and handlePerson != ''"> and handle_person = #{handlePerson}</if>
<if test="handlePersonPhone != null and handlePersonPhone != ''"> and handle_person_phone = #{handlePersonPhone}</if>
<if test="handleTime != null "> and handle_time = #{handleTime}</if>
<if test="status != null and status != ''">
and status in
<foreach collection="status" item="s" index="index" open="(" close=")" separator=",">
#{s}
</foreach>
</if>
<if test="createOrgCode != null and createOrgCode != ''"> and create_org_code = #{createOrgCode}</if>
<if test="createOrgName != null and createOrgName != ''"> and create_org_name like concat('%', #{createOrgName}, '%')</if>
<if test="creator != null and creator != ''"> and creator = #{creator}</if>
<if test="createPersonPhone != null and createPersonPhone != ''"> and create_person_phone = #{createPersonPhone}</if>
<if test="updator != null and updator != ''"> and updator = #{updator}</if>
<if test="sassId != null and sassId != ''"> and sass_id = #{sassId}</if>
<if test="expand1 != null and expand1 != ''"> and expand1 = #{expand1}</if>
<if test="expand2 != null and expand2 != ''"> and expand2 = #{expand2}</if>
<if test="expand3 != null and expand3 != ''"> and expand3 = #{expand3}</if>
<if test="deptId != null and deptId != ''">and dept_id = #{deptId}</if>
and to_char(create_time,'yyyy-MM-dd') = to_char(sysdate,'yyyy-MM-dd')
</where>
</select>
</mapper>