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.

643 lines
39 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.ruoyi.programManagement.mapper.SzEntBasicInfoMapper">
<resultMap type="SzEntBasicInfo" id="SzEntBasicInfoResult">
<result property="dmsTimestamp" column="dms_timestamp"/>
<result property="ID" column="ID"/>
<result property="entprId" column="ENTPR_ID"/>
<result property="entprName" column="ENTPR_NAME"/>
<result property="uscCode" column="USC_CODE"/>
<result property="REGION" column="REGION"/>
<result property="PROVINCE" column="PROVINCE"/>
<result property="CITY" column="CITY"/>
<result property="COUNTY" column="COUNTY"/>
<result property="SUBDISTRICT" column="SUBDISTRICT"/>
<result property="VILLAGE" column="VILLAGE"/>
<result property="PARK" column="PARK"/>
<result property="regAddr" column="REG_ADDR"/>
<result property="bizAddr" column="BIZ_ADDR"/>
<result property="POSTCODE" column="POSTCODE"/>
<result property="setupDate" column="SETUP_DATE"/>
<result property="legalPerson" column="LEGAL_PERSON"/>
<result property="contactTel" column="CONTACT_TEL"/>
<result property="contactEmail" column="CONTACT_EMAIL"/>
<result property="contactQq" column="CONTACT_QQ"/>
<result property="WEBSITE" column="WEBSITE"/>
<result property="FAX" column="FAX"/>
<result property="BOSS" column="BOSS"/>
<result property="bossTel" column="BOSS_TEL"/>
<result property="bossMobtel" column="BOSS_MOBTEL"/>
<result property="bossEmail" column="BOSS_EMAIL"/>
<result property="safetyManager" column="SAFETY_MANAGER"/>
<result property="safetyTel" column="SAFETY_TEL"/>
<result property="safetyMobtel" column="SAFETY_MOBTEL"/>
<result property="safetyEmail" column="SAFETY_EMAIL"/>
<result property="ecoTypeLarge" column="ECO_TYPE_LARGE"/>
<result property="ecoTypeSmall" column="ECO_TYPE_SMALL"/>
<result property="indusTypeClass" column="INDUS_TYPE_CLASS"/>
<result property="indusTypeLagre" column="INDUS_TYPE_LAGRE"/>
<result property="indusTypeMiddle" column="INDUS_TYPE_MIDDLE"/>
<result property="indusTypeSmall" column="INDUS_TYPE_SMALL"/>
<result property="supervisionLarge" column="SUPERVISION_LARGE"/>
<result property="supervisionSmall" column="SUPERVISION_SMALL"/>
<result property="specialGovernance" column="SPECIAL_GOVERNANCE"/>
<result property="stateOwed" column="STATE_OWED"/>
<result property="AFFILIATION" column="AFFILIATION"/>
<result property="businessScope" column="BUSINESS_SCOPE"/>
<result property="operatingStatus" column="OPERATING_STATUS"/>
<result property="regCapi" column="REG_CAPI"/>
<result property="floorArea" column="FLOOR_AREA"/>
<result property="employeeNum" column="EMPLOYEE_NUM"/>
<result property="speclalOperationNum" column="SPECLAL_OPERATION_NUM"/>
<result property="fullSafetyNum" column="FULL_SAFETY_NUM"/>
<result property="partSafetyNum" column="PART_SAFETY_NUM"/>
<result property="fullEmegNum" column="FULL_EMEG_NUM"/>
<result property="safetyDepart" column="SAFETY_DEPART"/>
<result property="safetyDepartName" column="SAFETY_DEPART_NAME"/>
<result property="safetyDepartDuty" column="SAFETY_DEPART_DUTY"/>
<result property="safetyDepartNum" column="SAFETY_DEPART_NUM"/>
<result property="cseNum" column="CSE_NUM"/>
<result property="fullSafety" column="FULL_SAFETY"/>
<result property="SCALE" column="SCALE"/>
<result property="parentCompName" column="PARENT_COMP_NAME"/>
<result property="groupCompName" column="GROUP_COMP_NAME"/>
<result property="standLevel" column="STAND_LEVEL"/>
<result property="safetySupervisionLevel" column="SAFETY_SUPERVISION_LEVEL"/>
<result property="localSafetyAdmin" column="LOCAL_SAFETY_ADMIN"/>
<result property="majorHazardInstallations" column="MAJOR_HAZARD_INSTALLATIONS"/>
<result property="majorHazardLevel" column="MAJOR_HAZARD_LEVEL"/>
<result property="entprPlaneGragh" column="ENTPR_PLANE_GRAGH"/>
<result property="longitudeGps" column="LONGITUDE_GPS"/>
<result property="latitudeGps" column="LATITUDE_GPS"/>
<result property="LONGITUDE" column="LONGITUDE"/>
<result property="LATITUDE" column="LATITUDE"/>
<result property="entprNotes" column="ENTPR_NOTES"/>
<result property="CREATER" column="CREATER"/>
<result property="CREATETIME" column="CREATETIME"/>
<result property="UPDATER" column="UPDATER"/>
<result property="UPDATETIME" column="UPDATETIME"/>
<result property="mainProduct" column="MAIN_PRODUCT"/>
<result property="industryRefer" column="INDUSTRY_REFER"/>
<result property="gridCode" column="GRID_CODE"/>
<result property="gridEntprStatus" column="GRID_ENTPR_STATUS"/>
<result property="infoYear" column="INFO_YEAR"/>
<result property="doublePreven" column="DOUBLE_PREVEN"/>
<result property="enterColorChart" column="ENTER_COLOR_CHART"/>
<result property="ENTPRCOLOR" column="ENTPRCOLOR"/>
<result property="ISBUYSAFETYINSURANCE" column="ISBUYSAFETYINSURANCE"/>
<result property="TURNOVER" column="TURNOVER"/>
<result property="sourceData" column="SOURCE_DATA"/>
</resultMap>
<sql id="selectSzEntBasicInfoVo">
select dms_timestamp,
ID,
ENTPR_ID,
ENTPR_NAME,
USC_CODE,
REGION,
PROVINCE,
CITY,
COUNTY,
SUBDISTRICT,
VILLAGE,
PARK,
REG_ADDR,
BIZ_ADDR,
POSTCODE,
SETUP_DATE,
LEGAL_PERSON,
CONTACT_TEL,
CONTACT_EMAIL,
CONTACT_QQ,
WEBSITE,
FAX,
BOSS,
BOSS_TEL,
BOSS_MOBTEL,
BOSS_EMAIL,
SAFETY_MANAGER,
SAFETY_TEL,
SAFETY_MOBTEL,
SAFETY_EMAIL,
ECO_TYPE_LARGE,
ECO_TYPE_SMALL,
INDUS_TYPE_CLASS,
INDUS_TYPE_LAGRE,
INDUS_TYPE_MIDDLE,
INDUS_TYPE_SMALL,
SUPERVISION_LARGE,
SUPERVISION_SMALL,
SPECIAL_GOVERNANCE,
STATE_OWED,
AFFILIATION,
BUSINESS_SCOPE,
OPERATING_STATUS,
REG_CAPI,
FLOOR_AREA,
EMPLOYEE_NUM,
SPECLAL_OPERATION_NUM,
FULL_SAFETY_NUM,
PART_SAFETY_NUM,
FULL_EMEG_NUM,
SAFETY_DEPART,
SAFETY_DEPART_NAME,
SAFETY_DEPART_DUTY,
SAFETY_DEPART_NUM,
CSE_NUM,
FULL_SAFETY,
SCALE,
PARENT_COMP_NAME,
GROUP_COMP_NAME,
STAND_LEVEL,
SAFETY_SUPERVISION_LEVEL,
LOCAL_SAFETY_ADMIN,
MAJOR_HAZARD_INSTALLATIONS,
MAJOR_HAZARD_LEVEL,
ENTPR_PLANE_GRAGH,
LONGITUDE_GPS,
LATITUDE_GPS,
LONGITUDE,
LATITUDE,
ENTPR_NOTES,
CREATER,
CREATETIME,
UPDATER,
UPDATETIME,
MAIN_PRODUCT,
INDUSTRY_REFER,
GRID_CODE,
GRID_ENTPR_STATUS,
INFO_YEAR,
DOUBLE_PREVEN,
ENTER_COLOR_CHART,
ENTPRCOLOR,
ISBUYSAFETYINSURANCE,
TURNOVER,
SOURCE_DATA
from sz_ent_basic_info
</sql>
<select id="selectSzEntBasicInfoList" parameterType="SzEntBasicInfo" resultMap="SzEntBasicInfoResult">
<include refid="selectSzEntBasicInfoVo"/>
<where>
<if test="dmsTimestamp != null ">and dms_timestamp = #{dmsTimestamp}</if>
<if test="entprId != null and entprId != ''">and ENTPR_ID = #{entprId}</if>
<if test="entprName != null and entprName != ''">and ENTPR_NAME like concat('%', #{entprName}, '%')</if>
<if test="uscCode != null and uscCode != ''">and USC_CODE = #{uscCode}</if>
<if test="REGION != null and REGION != ''">and REGION = #{REGION}</if>
<if test="PROVINCE != null and PROVINCE != ''">and PROVINCE = #{PROVINCE}</if>
<if test="CITY != null and CITY != ''">and CITY = #{CITY}</if>
<if test="COUNTY != null and COUNTY != ''">and COUNTY = #{COUNTY}</if>
<if test="SUBDISTRICT != null and SUBDISTRICT != ''">and SUBDISTRICT = #{SUBDISTRICT}</if>
<if test="VILLAGE != null and VILLAGE != ''">and VILLAGE = #{VILLAGE}</if>
<if test="PARK != null and PARK != ''">and PARK = #{PARK}</if>
<if test="regAddr != null and regAddr != ''">and REG_ADDR = #{regAddr}</if>
<if test="bizAddr != null and bizAddr != ''">and BIZ_ADDR = #{bizAddr}</if>
<if test="POSTCODE != null and POSTCODE != ''">and POSTCODE = #{POSTCODE}</if>
<if test="setupDate != null ">and SETUP_DATE = #{setupDate}</if>
<if test="legalPerson != null and legalPerson != ''">and LEGAL_PERSON = #{legalPerson}</if>
<if test="contactTel != null and contactTel != ''">and CONTACT_TEL = #{contactTel}</if>
<if test="contactEmail != null and contactEmail != ''">and CONTACT_EMAIL = #{contactEmail}</if>
<if test="contactQq != null and contactQq != ''">and CONTACT_QQ = #{contactQq}</if>
<if test="WEBSITE != null and WEBSITE != ''">and WEBSITE = #{WEBSITE}</if>
<if test="FAX != null and FAX != ''">and FAX = #{FAX}</if>
<if test="BOSS != null and BOSS != ''">and BOSS = #{BOSS}</if>
<if test="bossTel != null and bossTel != ''">and BOSS_TEL = #{bossTel}</if>
<if test="bossMobtel != null and bossMobtel != ''">and BOSS_MOBTEL = #{bossMobtel}</if>
<if test="bossEmail != null and bossEmail != ''">and BOSS_EMAIL = #{bossEmail}</if>
<if test="safetyManager != null and safetyManager != ''">and SAFETY_MANAGER = #{safetyManager}</if>
<if test="safetyTel != null and safetyTel != ''">and SAFETY_TEL = #{safetyTel}</if>
<if test="safetyMobtel != null and safetyMobtel != ''">and SAFETY_MOBTEL = #{safetyMobtel}</if>
<if test="safetyEmail != null and safetyEmail != ''">and SAFETY_EMAIL = #{safetyEmail}</if>
<if test="ecoTypeLarge != null and ecoTypeLarge != ''">and ECO_TYPE_LARGE = #{ecoTypeLarge}</if>
<if test="ecoTypeSmall != null and ecoTypeSmall != ''">and ECO_TYPE_SMALL = #{ecoTypeSmall}</if>
<if test="indusTypeClass != null and indusTypeClass != ''">and INDUS_TYPE_CLASS = #{indusTypeClass}</if>
<if test="indusTypeLagre != null and indusTypeLagre != ''">and INDUS_TYPE_LAGRE = #{indusTypeLagre}</if>
<if test="indusTypeMiddle != null and indusTypeMiddle != ''">and INDUS_TYPE_MIDDLE = #{indusTypeMiddle}
</if>
<if test="indusTypeSmall != null and indusTypeSmall != ''">and INDUS_TYPE_SMALL = #{indusTypeSmall}</if>
<if test="supervisionLarge != null and supervisionLarge != ''">and SUPERVISION_LARGE =
#{supervisionLarge}
</if>
<if test="supervisionSmall != null and supervisionSmall != ''">and SUPERVISION_SMALL =
#{supervisionSmall}
</if>
<if test="specialGovernance != null and specialGovernance != ''">and SPECIAL_GOVERNANCE =
#{specialGovernance}
</if>
<if test="stateOwed != null and stateOwed != ''">and STATE_OWED = #{stateOwed}</if>
<if test="AFFILIATION != null and AFFILIATION != ''">and AFFILIATION = #{AFFILIATION}</if>
<if test="businessScope != null and businessScope != ''">and BUSINESS_SCOPE = #{businessScope}</if>
<if test="operatingStatus != null and operatingStatus != ''">and OPERATING_STATUS = #{operatingStatus}</if>
<if test="regCapi != null ">and REG_CAPI = #{regCapi}</if>
<if test="floorArea != null ">and FLOOR_AREA = #{floorArea}</if>
<if test="employeeNum != null ">and EMPLOYEE_NUM = #{employeeNum}</if>
<if test="speclalOperationNum != null ">and SPECLAL_OPERATION_NUM = #{speclalOperationNum}</if>
<if test="fullSafetyNum != null ">and FULL_SAFETY_NUM = #{fullSafetyNum}</if>
<if test="partSafetyNum != null ">and PART_SAFETY_NUM = #{partSafetyNum}</if>
<if test="fullEmegNum != null ">and FULL_EMEG_NUM = #{fullEmegNum}</if>
<if test="safetyDepart != null and safetyDepart != ''">and SAFETY_DEPART = #{safetyDepart}</if>
<if test="safetyDepartName != null and safetyDepartName != ''">and SAFETY_DEPART_NAME like concat('%',
#{safetyDepartName}, '%')
</if>
<if test="safetyDepartDuty != null and safetyDepartDuty != ''">and SAFETY_DEPART_DUTY =
#{safetyDepartDuty}
</if>
<if test="safetyDepartNum != null ">and SAFETY_DEPART_NUM = #{safetyDepartNum}</if>
<if test="cseNum != null ">and CSE_NUM = #{cseNum}</if>
<if test="fullSafety != null and fullSafety != ''">and FULL_SAFETY = #{fullSafety}</if>
<if test="SCALE != null and SCALE != ''">and SCALE = #{SCALE}</if>
<if test="parentCompName != null and parentCompName != ''">and PARENT_COMP_NAME like concat('%',
#{parentCompName}, '%')
</if>
<if test="groupCompName != null and groupCompName != ''">and GROUP_COMP_NAME like concat('%',
#{groupCompName}, '%')
</if>
<if test="standLevel != null and standLevel != ''">and STAND_LEVEL = #{standLevel}</if>
<if test="safetySupervisionLevel != null and safetySupervisionLevel != ''">and SAFETY_SUPERVISION_LEVEL =
#{safetySupervisionLevel}
</if>
<if test="localSafetyAdmin != null and localSafetyAdmin != ''">and LOCAL_SAFETY_ADMIN =
#{localSafetyAdmin}
</if>
<if test="majorHazardInstallations != null and majorHazardInstallations != ''">and
MAJOR_HAZARD_INSTALLATIONS = #{majorHazardInstallations}
</if>
<if test="majorHazardLevel != null and majorHazardLevel != ''">and MAJOR_HAZARD_LEVEL =
#{majorHazardLevel}
</if>
<if test="entprPlaneGragh != null and entprPlaneGragh != ''">and ENTPR_PLANE_GRAGH = #{entprPlaneGragh}
</if>
<if test="longitudeGps != null ">and LONGITUDE_GPS = #{longitudeGps}</if>
<if test="latitudeGps != null ">and LATITUDE_GPS = #{latitudeGps}</if>
<if test="LONGITUDE != null ">and LONGITUDE = #{LONGITUDE}</if>
<if test="LATITUDE != null ">and LATITUDE = #{LATITUDE}</if>
<if test="entprNotes != null and entprNotes != ''">and ENTPR_NOTES = #{entprNotes}</if>
<if test="CREATER != null and CREATER != ''">and CREATER = #{CREATER}</if>
<if test="CREATETIME != null ">and CREATETIME = #{CREATETIME}</if>
<if test="UPDATER != null and UPDATER != ''">and UPDATER = #{UPDATER}</if>
<if test="UPDATETIME != null ">and UPDATETIME = #{UPDATETIME}</if>
<if test="mainProduct != null and mainProduct != ''">and MAIN_PRODUCT = #{mainProduct}</if>
<if test="industryRefer != null and industryRefer != ''">and INDUSTRY_REFER = #{industryRefer}</if>
<if test="gridCode != null and gridCode != ''">and GRID_CODE = #{gridCode}</if>
<if test="gridEntprStatus != null and gridEntprStatus != ''">and GRID_ENTPR_STATUS = #{gridEntprStatus}
</if>
<if test="infoYear != null and infoYear != ''">and INFO_YEAR = #{infoYear}</if>
<if test="doublePreven != null and doublePreven != ''">and DOUBLE_PREVEN = #{doublePreven}</if>
<if test="enterColorChart != null and enterColorChart != ''">and ENTER_COLOR_CHART = #{enterColorChart}
</if>
<if test="ENTPRCOLOR != null and ENTPRCOLOR != ''">and ENTPRCOLOR = #{ENTPRCOLOR}</if>
<if test="ISBUYSAFETYINSURANCE != null and ISBUYSAFETYINSURANCE != ''">and ISBUYSAFETYINSURANCE =
#{ISBUYSAFETYINSURANCE}
</if>
<if test="TURNOVER != null ">and TURNOVER = #{TURNOVER}</if>
<if test="sourceData != null and sourceData != ''">and SOURCE_DATA = #{sourceData}</if>
</where>
</select>
<select id="selectSzEntBasicInfoByID" parameterType="String" resultMap="SzEntBasicInfoResult">
<include refid="selectSzEntBasicInfoVo"/>
where ID = #{ID}
</select>
<select id="countIspoint" resultType="java.lang.Integer">
SELECT count(*) as count
FROM (
SELECT
a.*, CASE WHEN b.ent_code IS NOT NULL THEN 1 ELSE 0 END AS is_point
FROM
sz_ent_basic_info a
LEFT JOIN
b_key_enterprise b ON a.USC_CODE = b.ent_code
) AS s
WHERE s.is_point = 1
</select>
<select id="page" resultType="com.ruoyi.programManagement.entity.SzEntBasicInfo">
select s.* from(
SELECT
a.*,
CASE WHEN b.ent_code IS NOT NULL THEN 1 ELSE 2 END AS is_point
FROM
sz_ent_basic_info_new a
LEFT JOIN
b_key_enterprise b ON a.USC_CODE = b.ent_code )s
<where>
<if test="req.uscCode != null and req.uscCode != ''">and s.USC_CODE=#{req.uscCode}</if>
<if test="req.entprColor != null and req.entprColor != ''">and s.ENTPRCOLOR=#{req.entprColor}</if>
<if test="req.majorHazardLevel != null and req.majorHazardLevel != ''">and
s.MAJOR_HAZARD_LEVEL=#{req.majorHazardLevel}
</if>
<if test="req.isPoint != null and req.isPoint != ''">and s.is_point=#{req.isPoint}</if>
<if test="req.subdistrict != null and req.subdistrict != ''">
and s.subdistrict like concat('%',#{req.subdistrict},'%')
</if>
<if test="req.ecoTypeLarge != null and req.ecoTypeLarge != ''">and s.eco_type_large=#{req.ecoTypeLarge}
</if>
<if test="req.indusTypeClass != null and req.indusTypeClass != ''">and
s.indus_type_class=#{req.indusTypeClass}
</if>
</where>
order by is_point asc
</select>
<select id="getDistrict" resultType="java.lang.String">
SELECT SUBDISTRICT
FROM sz_ent_basic_info_new
where USC_CODE = #{entCode}
</select>
<insert id="insertSzEntBasicInfo" parameterType="SzEntBasicInfo">
insert into sz_ent_basic_info
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="dmsTimestamp != null">dms_timestamp,</if>
<if test="ID != null">ID,</if>
<if test="entprId != null and entprId != ''">ENTPR_ID,</if>
<if test="entprName != null and entprName != ''">ENTPR_NAME,</if>
<if test="uscCode != null and uscCode != ''">USC_CODE,</if>
<if test="REGION != null and REGION != ''">REGION,</if>
<if test="PROVINCE != null and PROVINCE != ''">PROVINCE,</if>
<if test="CITY != null and CITY != ''">CITY,</if>
<if test="COUNTY != null and COUNTY != ''">COUNTY,</if>
<if test="SUBDISTRICT != null and SUBDISTRICT != ''">SUBDISTRICT,</if>
<if test="VILLAGE != null">VILLAGE,</if>
<if test="PARK != null">PARK,</if>
<if test="regAddr != null and regAddr != ''">REG_ADDR,</if>
<if test="bizAddr != null and bizAddr != ''">BIZ_ADDR,</if>
<if test="POSTCODE != null and POSTCODE != ''">POSTCODE,</if>
<if test="setupDate != null">SETUP_DATE,</if>
<if test="legalPerson != null and legalPerson != ''">LEGAL_PERSON,</if>
<if test="contactTel != null and contactTel != ''">CONTACT_TEL,</if>
<if test="contactEmail != null and contactEmail != ''">CONTACT_EMAIL,</if>
<if test="contactQq != null">CONTACT_QQ,</if>
<if test="WEBSITE != null">WEBSITE,</if>
<if test="FAX != null and FAX != ''">FAX,</if>
<if test="BOSS != null and BOSS != ''">BOSS,</if>
<if test="bossTel != null">BOSS_TEL,</if>
<if test="bossMobtel != null">BOSS_MOBTEL,</if>
<if test="bossEmail != null">BOSS_EMAIL,</if>
<if test="safetyManager != null">SAFETY_MANAGER,</if>
<if test="safetyTel != null">SAFETY_TEL,</if>
<if test="safetyMobtel != null">SAFETY_MOBTEL,</if>
<if test="safetyEmail != null">SAFETY_EMAIL,</if>
<if test="ecoTypeLarge != null and ecoTypeLarge != ''">ECO_TYPE_LARGE,</if>
<if test="ecoTypeSmall != null and ecoTypeSmall != ''">ECO_TYPE_SMALL,</if>
<if test="indusTypeClass != null and indusTypeClass != ''">INDUS_TYPE_CLASS,</if>
<if test="indusTypeLagre != null and indusTypeLagre != ''">INDUS_TYPE_LAGRE,</if>
<if test="indusTypeMiddle != null and indusTypeMiddle != ''">INDUS_TYPE_MIDDLE,</if>
<if test="indusTypeSmall != null and indusTypeSmall != ''">INDUS_TYPE_SMALL,</if>
<if test="supervisionLarge != null and supervisionLarge != ''">SUPERVISION_LARGE,</if>
<if test="supervisionSmall != null and supervisionSmall != ''">SUPERVISION_SMALL,</if>
<if test="specialGovernance != null">SPECIAL_GOVERNANCE,</if>
<if test="stateOwed != null">STATE_OWED,</if>
<if test="AFFILIATION != null">AFFILIATION,</if>
<if test="businessScope != null">BUSINESS_SCOPE,</if>
<if test="operatingStatus != null and operatingStatus != ''">OPERATING_STATUS,</if>
<if test="regCapi != null">REG_CAPI,</if>
<if test="floorArea != null">FLOOR_AREA,</if>
<if test="employeeNum != null">EMPLOYEE_NUM,</if>
<if test="speclalOperationNum != null">SPECLAL_OPERATION_NUM,</if>
<if test="fullSafetyNum != null">FULL_SAFETY_NUM,</if>
<if test="partSafetyNum != null">PART_SAFETY_NUM,</if>
<if test="fullEmegNum != null">FULL_EMEG_NUM,</if>
<if test="safetyDepart != null and safetyDepart != ''">SAFETY_DEPART,</if>
<if test="safetyDepartName != null">SAFETY_DEPART_NAME,</if>
<if test="safetyDepartDuty != null">SAFETY_DEPART_DUTY,</if>
<if test="safetyDepartNum != null">SAFETY_DEPART_NUM,</if>
<if test="cseNum != null">CSE_NUM,</if>
<if test="fullSafety != null">FULL_SAFETY,</if>
<if test="SCALE != null and SCALE != ''">SCALE,</if>
<if test="parentCompName != null">PARENT_COMP_NAME,</if>
<if test="groupCompName != null">GROUP_COMP_NAME,</if>
<if test="standLevel != null and standLevel != ''">STAND_LEVEL,</if>
<if test="safetySupervisionLevel != null and safetySupervisionLevel != ''">SAFETY_SUPERVISION_LEVEL,</if>
<if test="localSafetyAdmin != null and localSafetyAdmin != ''">LOCAL_SAFETY_ADMIN,</if>
<if test="majorHazardInstallations != null and majorHazardInstallations != ''">MAJOR_HAZARD_INSTALLATIONS,
</if>
<if test="majorHazardLevel != null and majorHazardLevel != ''">MAJOR_HAZARD_LEVEL,</if>
<if test="entprPlaneGragh != null">ENTPR_PLANE_GRAGH,</if>
<if test="longitudeGps != null">LONGITUDE_GPS,</if>
<if test="latitudeGps != null">LATITUDE_GPS,</if>
<if test="LONGITUDE != null">LONGITUDE,</if>
<if test="LATITUDE != null">LATITUDE,</if>
<if test="entprNotes != null">ENTPR_NOTES,</if>
<if test="CREATER != null">CREATER,</if>
<if test="CREATETIME != null">CREATETIME,</if>
<if test="UPDATER != null">UPDATER,</if>
<if test="UPDATETIME != null">UPDATETIME,</if>
<if test="mainProduct != null">MAIN_PRODUCT,</if>
<if test="industryRefer != null">INDUSTRY_REFER,</if>
<if test="gridCode != null">GRID_CODE,</if>
<if test="gridEntprStatus != null">GRID_ENTPR_STATUS,</if>
<if test="infoYear != null">INFO_YEAR,</if>
<if test="doublePreven != null">DOUBLE_PREVEN,</if>
<if test="enterColorChart != null">ENTER_COLOR_CHART,</if>
<if test="ENTPRCOLOR != null">ENTPRCOLOR,</if>
<if test="ISBUYSAFETYINSURANCE != null">ISBUYSAFETYINSURANCE,</if>
<if test="TURNOVER != null">TURNOVER,</if>
<if test="sourceData != null">SOURCE_DATA,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="dmsTimestamp != null">#{dmsTimestamp},</if>
<if test="ID != null">#{ID},</if>
<if test="entprId != null and entprId != ''">#{entprId},</if>
<if test="entprName != null and entprName != ''">#{entprName},</if>
<if test="uscCode != null and uscCode != ''">#{uscCode},</if>
<if test="REGION != null and REGION != ''">#{REGION},</if>
<if test="PROVINCE != null and PROVINCE != ''">#{PROVINCE},</if>
<if test="CITY != null and CITY != ''">#{CITY},</if>
<if test="COUNTY != null and COUNTY != ''">#{COUNTY},</if>
<if test="SUBDISTRICT != null and SUBDISTRICT != ''">#{SUBDISTRICT},</if>
<if test="VILLAGE != null">#{VILLAGE},</if>
<if test="PARK != null">#{PARK},</if>
<if test="regAddr != null and regAddr != ''">#{regAddr},</if>
<if test="bizAddr != null and bizAddr != ''">#{bizAddr},</if>
<if test="POSTCODE != null and POSTCODE != ''">#{POSTCODE},</if>
<if test="setupDate != null">#{setupDate},</if>
<if test="legalPerson != null and legalPerson != ''">#{legalPerson},</if>
<if test="contactTel != null and contactTel != ''">#{contactTel},</if>
<if test="contactEmail != null and contactEmail != ''">#{contactEmail},</if>
<if test="contactQq != null">#{contactQq},</if>
<if test="WEBSITE != null">#{WEBSITE},</if>
<if test="FAX != null and FAX != ''">#{FAX},</if>
<if test="BOSS != null and BOSS != ''">#{BOSS},</if>
<if test="bossTel != null">#{bossTel},</if>
<if test="bossMobtel != null">#{bossMobtel},</if>
<if test="bossEmail != null">#{bossEmail},</if>
<if test="safetyManager != null">#{safetyManager},</if>
<if test="safetyTel != null">#{safetyTel},</if>
<if test="safetyMobtel != null">#{safetyMobtel},</if>
<if test="safetyEmail != null">#{safetyEmail},</if>
<if test="ecoTypeLarge != null and ecoTypeLarge != ''">#{ecoTypeLarge},</if>
<if test="ecoTypeSmall != null and ecoTypeSmall != ''">#{ecoTypeSmall},</if>
<if test="indusTypeClass != null and indusTypeClass != ''">#{indusTypeClass},</if>
<if test="indusTypeLagre != null and indusTypeLagre != ''">#{indusTypeLagre},</if>
<if test="indusTypeMiddle != null and indusTypeMiddle != ''">#{indusTypeMiddle},</if>
<if test="indusTypeSmall != null and indusTypeSmall != ''">#{indusTypeSmall},</if>
<if test="supervisionLarge != null and supervisionLarge != ''">#{supervisionLarge},</if>
<if test="supervisionSmall != null and supervisionSmall != ''">#{supervisionSmall},</if>
<if test="specialGovernance != null">#{specialGovernance},</if>
<if test="stateOwed != null">#{stateOwed},</if>
<if test="AFFILIATION != null">#{AFFILIATION},</if>
<if test="businessScope != null">#{businessScope},</if>
<if test="operatingStatus != null and operatingStatus != ''">#{operatingStatus},</if>
<if test="regCapi != null">#{regCapi},</if>
<if test="floorArea != null">#{floorArea},</if>
<if test="employeeNum != null">#{employeeNum},</if>
<if test="speclalOperationNum != null">#{speclalOperationNum},</if>
<if test="fullSafetyNum != null">#{fullSafetyNum},</if>
<if test="partSafetyNum != null">#{partSafetyNum},</if>
<if test="fullEmegNum != null">#{fullEmegNum},</if>
<if test="safetyDepart != null and safetyDepart != ''">#{safetyDepart},</if>
<if test="safetyDepartName != null">#{safetyDepartName},</if>
<if test="safetyDepartDuty != null">#{safetyDepartDuty},</if>
<if test="safetyDepartNum != null">#{safetyDepartNum},</if>
<if test="cseNum != null">#{cseNum},</if>
<if test="fullSafety != null">#{fullSafety},</if>
<if test="SCALE != null and SCALE != ''">#{SCALE},</if>
<if test="parentCompName != null">#{parentCompName},</if>
<if test="groupCompName != null">#{groupCompName},</if>
<if test="standLevel != null and standLevel != ''">#{standLevel},</if>
<if test="safetySupervisionLevel != null and safetySupervisionLevel != ''">#{safetySupervisionLevel},</if>
<if test="localSafetyAdmin != null and localSafetyAdmin != ''">#{localSafetyAdmin},</if>
<if test="majorHazardInstallations != null and majorHazardInstallations != ''">
#{majorHazardInstallations},
</if>
<if test="majorHazardLevel != null and majorHazardLevel != ''">#{majorHazardLevel},</if>
<if test="entprPlaneGragh != null">#{entprPlaneGragh},</if>
<if test="longitudeGps != null">#{longitudeGps},</if>
<if test="latitudeGps != null">#{latitudeGps},</if>
<if test="LONGITUDE != null">#{LONGITUDE},</if>
<if test="LATITUDE != null">#{LATITUDE},</if>
<if test="entprNotes != null">#{entprNotes},</if>
<if test="CREATER != null">#{CREATER},</if>
<if test="CREATETIME != null">#{CREATETIME},</if>
<if test="UPDATER != null">#{UPDATER},</if>
<if test="UPDATETIME != null">#{UPDATETIME},</if>
<if test="mainProduct != null">#{mainProduct},</if>
<if test="industryRefer != null">#{industryRefer},</if>
<if test="gridCode != null">#{gridCode},</if>
<if test="gridEntprStatus != null">#{gridEntprStatus},</if>
<if test="infoYear != null">#{infoYear},</if>
<if test="doublePreven != null">#{doublePreven},</if>
<if test="enterColorChart != null">#{enterColorChart},</if>
<if test="ENTPRCOLOR != null">#{ENTPRCOLOR},</if>
<if test="ISBUYSAFETYINSURANCE != null">#{ISBUYSAFETYINSURANCE},</if>
<if test="TURNOVER != null">#{TURNOVER},</if>
<if test="sourceData != null">#{sourceData},</if>
</trim>
</insert>
<update id="updateSzEntBasicInfo" parameterType="SzEntBasicInfo">
update sz_ent_basic_info
<trim prefix="SET" suffixOverrides=",">
<if test="dmsTimestamp != null">dms_timestamp = #{dmsTimestamp},</if>
<if test="entprId != null and entprId != ''">ENTPR_ID = #{entprId},</if>
<if test="entprName != null and entprName != ''">ENTPR_NAME = #{entprName},</if>
<if test="uscCode != null and uscCode != ''">USC_CODE = #{uscCode},</if>
<if test="REGION != null and REGION != ''">REGION = #{REGION},</if>
<if test="PROVINCE != null and PROVINCE != ''">PROVINCE = #{PROVINCE},</if>
<if test="CITY != null and CITY != ''">CITY = #{CITY},</if>
<if test="COUNTY != null and COUNTY != ''">COUNTY = #{COUNTY},</if>
<if test="SUBDISTRICT != null and SUBDISTRICT != ''">SUBDISTRICT = #{SUBDISTRICT},</if>
<if test="VILLAGE != null">VILLAGE = #{VILLAGE},</if>
<if test="PARK != null">PARK = #{PARK},</if>
<if test="regAddr != null and regAddr != ''">REG_ADDR = #{regAddr},</if>
<if test="bizAddr != null and bizAddr != ''">BIZ_ADDR = #{bizAddr},</if>
<if test="POSTCODE != null and POSTCODE != ''">POSTCODE = #{POSTCODE},</if>
<if test="setupDate != null">SETUP_DATE = #{setupDate},</if>
<if test="legalPerson != null and legalPerson != ''">LEGAL_PERSON = #{legalPerson},</if>
<if test="contactTel != null and contactTel != ''">CONTACT_TEL = #{contactTel},</if>
<if test="contactEmail != null and contactEmail != ''">CONTACT_EMAIL = #{contactEmail},</if>
<if test="contactQq != null">CONTACT_QQ = #{contactQq},</if>
<if test="WEBSITE != null">WEBSITE = #{WEBSITE},</if>
<if test="FAX != null and FAX != ''">FAX = #{FAX},</if>
<if test="BOSS != null and BOSS != ''">BOSS = #{BOSS},</if>
<if test="bossTel != null">BOSS_TEL = #{bossTel},</if>
<if test="bossMobtel != null">BOSS_MOBTEL = #{bossMobtel},</if>
<if test="bossEmail != null">BOSS_EMAIL = #{bossEmail},</if>
<if test="safetyManager != null">SAFETY_MANAGER = #{safetyManager},</if>
<if test="safetyTel != null">SAFETY_TEL = #{safetyTel},</if>
<if test="safetyMobtel != null">SAFETY_MOBTEL = #{safetyMobtel},</if>
<if test="safetyEmail != null">SAFETY_EMAIL = #{safetyEmail},</if>
<if test="ecoTypeLarge != null and ecoTypeLarge != ''">ECO_TYPE_LARGE = #{ecoTypeLarge},</if>
<if test="ecoTypeSmall != null and ecoTypeSmall != ''">ECO_TYPE_SMALL = #{ecoTypeSmall},</if>
<if test="indusTypeClass != null and indusTypeClass != ''">INDUS_TYPE_CLASS = #{indusTypeClass},</if>
<if test="indusTypeLagre != null and indusTypeLagre != ''">INDUS_TYPE_LAGRE = #{indusTypeLagre},</if>
<if test="indusTypeMiddle != null and indusTypeMiddle != ''">INDUS_TYPE_MIDDLE = #{indusTypeMiddle},</if>
<if test="indusTypeSmall != null and indusTypeSmall != ''">INDUS_TYPE_SMALL = #{indusTypeSmall},</if>
<if test="supervisionLarge != null and supervisionLarge != ''">SUPERVISION_LARGE = #{supervisionLarge},</if>
<if test="supervisionSmall != null and supervisionSmall != ''">SUPERVISION_SMALL = #{supervisionSmall},</if>
<if test="specialGovernance != null">SPECIAL_GOVERNANCE = #{specialGovernance},</if>
<if test="stateOwed != null">STATE_OWED = #{stateOwed},</if>
<if test="AFFILIATION != null">AFFILIATION = #{AFFILIATION},</if>
<if test="businessScope != null">BUSINESS_SCOPE = #{businessScope},</if>
<if test="operatingStatus != null and operatingStatus != ''">OPERATING_STATUS = #{operatingStatus},</if>
<if test="regCapi != null">REG_CAPI = #{regCapi},</if>
<if test="floorArea != null">FLOOR_AREA = #{floorArea},</if>
<if test="employeeNum != null">EMPLOYEE_NUM = #{employeeNum},</if>
<if test="speclalOperationNum != null">SPECLAL_OPERATION_NUM = #{speclalOperationNum},</if>
<if test="fullSafetyNum != null">FULL_SAFETY_NUM = #{fullSafetyNum},</if>
<if test="partSafetyNum != null">PART_SAFETY_NUM = #{partSafetyNum},</if>
<if test="fullEmegNum != null">FULL_EMEG_NUM = #{fullEmegNum},</if>
<if test="safetyDepart != null and safetyDepart != ''">SAFETY_DEPART = #{safetyDepart},</if>
<if test="safetyDepartName != null">SAFETY_DEPART_NAME = #{safetyDepartName},</if>
<if test="safetyDepartDuty != null">SAFETY_DEPART_DUTY = #{safetyDepartDuty},</if>
<if test="safetyDepartNum != null">SAFETY_DEPART_NUM = #{safetyDepartNum},</if>
<if test="cseNum != null">CSE_NUM = #{cseNum},</if>
<if test="fullSafety != null">FULL_SAFETY = #{fullSafety},</if>
<if test="SCALE != null and SCALE != ''">SCALE = #{SCALE},</if>
<if test="parentCompName != null">PARENT_COMP_NAME = #{parentCompName},</if>
<if test="groupCompName != null">GROUP_COMP_NAME = #{groupCompName},</if>
<if test="standLevel != null and standLevel != ''">STAND_LEVEL = #{standLevel},</if>
<if test="safetySupervisionLevel != null and safetySupervisionLevel != ''">SAFETY_SUPERVISION_LEVEL =
#{safetySupervisionLevel},
</if>
<if test="localSafetyAdmin != null and localSafetyAdmin != ''">LOCAL_SAFETY_ADMIN = #{localSafetyAdmin},
</if>
<if test="majorHazardInstallations != null and majorHazardInstallations != ''">MAJOR_HAZARD_INSTALLATIONS =
#{majorHazardInstallations},
</if>
<if test="majorHazardLevel != null and majorHazardLevel != ''">MAJOR_HAZARD_LEVEL = #{majorHazardLevel},
</if>
<if test="entprPlaneGragh != null">ENTPR_PLANE_GRAGH = #{entprPlaneGragh},</if>
<if test="longitudeGps != null">LONGITUDE_GPS = #{longitudeGps},</if>
<if test="latitudeGps != null">LATITUDE_GPS = #{latitudeGps},</if>
<if test="LONGITUDE != null">LONGITUDE = #{LONGITUDE},</if>
<if test="LATITUDE != null">LATITUDE = #{LATITUDE},</if>
<if test="entprNotes != null">ENTPR_NOTES = #{entprNotes},</if>
<if test="CREATER != null">CREATER = #{CREATER},</if>
<if test="CREATETIME != null">CREATETIME = #{CREATETIME},</if>
<if test="UPDATER != null">UPDATER = #{UPDATER},</if>
<if test="UPDATETIME != null">UPDATETIME = #{UPDATETIME},</if>
<if test="mainProduct != null">MAIN_PRODUCT = #{mainProduct},</if>
<if test="industryRefer != null">INDUSTRY_REFER = #{industryRefer},</if>
<if test="gridCode != null">GRID_CODE = #{gridCode},</if>
<if test="gridEntprStatus != null">GRID_ENTPR_STATUS = #{gridEntprStatus},</if>
<if test="infoYear != null">INFO_YEAR = #{infoYear},</if>
<if test="doublePreven != null">DOUBLE_PREVEN = #{doublePreven},</if>
<if test="enterColorChart != null">ENTER_COLOR_CHART = #{enterColorChart},</if>
<if test="ENTPRCOLOR != null">ENTPRCOLOR = #{ENTPRCOLOR},</if>
<if test="ISBUYSAFETYINSURANCE != null">ISBUYSAFETYINSURANCE = #{ISBUYSAFETYINSURANCE},</if>
<if test="TURNOVER != null">TURNOVER = #{TURNOVER},</if>
<if test="sourceData != null">SOURCE_DATA = #{sourceData},</if>
</trim>
where ID = #{ID}
</update>
<delete id="deleteSzEntBasicInfoByID" parameterType="String">
delete
from sz_ent_basic_info
where ID = #{ID}
</delete>
<delete id="deleteSzEntBasicInfoByIDs" parameterType="String">
delete from sz_ent_basic_info where ID in
<foreach item="ID" collection="array" open="(" separator="," close=")">
#{ID}
</foreach>
</delete>
</mapper>