Browse Source

应急机构导出重复问题

develop
wangsixiang 2 days ago
parent
commit
c82a3a96bc
  1. 10
      zc-business/src/main/resources/mapper/business/DcOrganizationMapper.xml

10
zc-business/src/main/resources/mapper/business/DcOrganizationMapper.xml

@ -3,7 +3,7 @@
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.zc.business.mapper.DcOrganizationMapper">
<resultMap type="DcOrganization" id="DcOrganizationResult">
<result property="id" column="id" />
<result property="parentId" column="parent_id" />
@ -28,7 +28,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<select id="selectDcOrganizationList" parameterType="DcOrganization" resultMap="DcOrganizationResult">
<include refid="selectDcOrganizationVo"/>
<where>
<where>
<if test="parentId != null "> and parent_id = #{parentId}</if>
<if test="organizationType != null "> and organization_type = #{organizationType}</if>
<if test="organizationName != null and organizationName != ''"> and organization_name like concat('%', #{organizationName}, '%')</if>
@ -36,7 +36,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</select>
<select id="selectDcOrganizationListExport" resultType="com.zc.business.domain.DcOrganizationExport">
SELECT organization.id,organization.parent_id,mark.longitude,mark.latitude,organization.direction,
SELECT DISTINCT organization.id,organization.parent_id,mark.longitude,mark.latitude,organization.direction,
(SELECT COUNT(1) FROM dc_employees AS employees WHERE employees.organization_id=organization.id) employeesNum,
organization.organization_type, organization.organization_name,
organization.organization_address, organization.stake_mark,
@ -113,7 +113,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</delete>
<delete id="deleteDcOrganizationByIds" parameterType="String">
delete from dc_organization where id in
delete from dc_organization where id in
<foreach item="id" collection="array" open="(" separator="," close=")">
#{id}
</foreach>
@ -132,4 +132,4 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</mapper>
</mapper>

Loading…
Cancel
Save