parent
							
								
									04b7eeb447
								
							
						
					
					
						commit
						ef56b63bf1
					
				@ -0,0 +1,265 @@
 | 
				
			||||
<?xml version="1.0" encoding="UTF-8" ?>    
 | 
				
			||||
<!DOCTYPE mapper    
 | 
				
			||||
PUBLIC "-//ibatis.apache.org//DTD Mapper 3.0//EN"    
 | 
				
			||||
"http://ibatis.apache.org/dtd/ibatis-3-mapper.dtd">
 | 
				
			||||
 | 
				
			||||
<mapper namespace="com.platform.dao.PreDataInfoDao">
 | 
				
			||||
	<resultMap id="getEntityByText" type="com.platform.entities.PreDataInfo">
 | 
				
			||||
		<id property="id" column="id" javaType="int" jdbcType="INTEGER" />
 | 
				
			||||
		<result property="areaCode" column="area_code"
 | 
				
			||||
			javaType="string" jdbcType="VARCHAR" />
 | 
				
			||||
		<result property="cityName" column="city_name" javaType="string"
 | 
				
			||||
			jdbcType="VARCHAR" />
 | 
				
			||||
		<result property="districtName" column="district_name"
 | 
				
			||||
			javaType="string" jdbcType="VARCHAR" />
 | 
				
			||||
			<!-- 
 | 
				
			||||
		<result property="systemCode" column="system_code" javaType="int"
 | 
				
			||||
			jdbcType="INTEGER" />
 | 
				
			||||
			 -->
 | 
				
			||||
		<result property="sysName" column="system_name" javaType="string"
 | 
				
			||||
			jdbcType="VARCHAR" />
 | 
				
			||||
		<result property="areaLevel" column="area_level"
 | 
				
			||||
			javaType="string" jdbcType="VARCHAR" />
 | 
				
			||||
		<result property="dataVersion" column="data_version" javaType="string"
 | 
				
			||||
			jdbcType="VARCHAR" />
 | 
				
			||||
		<result property="beginUseTime" column="begin_in_use"
 | 
				
			||||
			javaType="string" jdbcType="VARCHAR" />
 | 
				
			||||
		<result property="functionDetails" column="function_details" javaType="string"
 | 
				
			||||
			jdbcType="VARCHAR" />
 | 
				
			||||
		<result property="departmentManager" column="department_manager" javaType="string"
 | 
				
			||||
			jdbcType="VARCHAR" />
 | 
				
			||||
		<result property="managerContacts" column="manager_contacts"
 | 
				
			||||
			javaType="string" jdbcType="VARCHAR" />
 | 
				
			||||
		<result property="developerFullName" column="sys_developer_full_name"
 | 
				
			||||
			javaType="string" jdbcType="VARCHAR" />
 | 
				
			||||
			
 | 
				
			||||
		<result property="dataBaseType" column="data_base_type"
 | 
				
			||||
			javaType="string" jdbcType="VARCHAR" />
 | 
				
			||||
		<result property="dataBaseVersion" column="data_base_version" javaType="string"
 | 
				
			||||
			jdbcType="VARCHAR" />
 | 
				
			||||
		<result property="budgetExecManage" column="is_budget_exec" javaType="string"
 | 
				
			||||
			jdbcType="VARCHAR" />
 | 
				
			||||
			
 | 
				
			||||
		<result property="budgetQuotaManage" column="is_budget_quota" javaType="string"
 | 
				
			||||
			jdbcType="VARCHAR" />
 | 
				
			||||
		<result property="collection" column="is_collection" javaType="string"
 | 
				
			||||
			jdbcType="VARCHAR" />
 | 
				
			||||
		<result property="departmentBudgetManage" column="is_department_budget" javaType="string"
 | 
				
			||||
			jdbcType="VARCHAR" />
 | 
				
			||||
		<result property="totalBudgetAccount" column="total_budget_account" javaType="string"
 | 
				
			||||
			jdbcType="VARCHAR" />
 | 
				
			||||
		<result property="finalAccountManage" column="final_account_manage" javaType="string"
 | 
				
			||||
			jdbcType="VARCHAR" />
 | 
				
			||||
		<result property="reportFormManage" column="report_form_manage" javaType="string"
 | 
				
			||||
			jdbcType="VARCHAR" />
 | 
				
			||||
		<result property="nonTaxManage" column="non_tax_revenue_manage" javaType="string"
 | 
				
			||||
			jdbcType="VARCHAR" />
 | 
				
			||||
		<result property="wageSystem" column="wage_system" javaType="string"
 | 
				
			||||
			jdbcType="VARCHAR" />
 | 
				
			||||
		<result property="analysisOfFinancialEconomicProsperity" column="analysis_of_financial_economic_prosperity" javaType="string"
 | 
				
			||||
		jdbcType="VARCHAR" />
 | 
				
			||||
		<result property="governmentDebtManage" column="government_debt" javaType="string"
 | 
				
			||||
		jdbcType="VARCHAR" />
 | 
				
			||||
	</resultMap>
 | 
				
			||||
	<sql id="conditionsFilters">
 | 
				
			||||
		<if test="cityName!=null">
 | 
				
			||||
			AND pre_data_details.city_name=#{cityName}
 | 
				
			||||
		</if>
 | 
				
			||||
		<if test="districtName!=null">
 | 
				
			||||
			AND
 | 
				
			||||
			pre_data_details.district_name=#{districtName}
 | 
				
			||||
		</if>
 | 
				
			||||
		<if test="dataVersion !=null">
 | 
				
			||||
			AND pre_data_details.data_version=#{dataVersion}
 | 
				
			||||
		</if>
 | 
				
			||||
		<if test="systemName !=null">
 | 
				
			||||
			AND pre_data_details.system_name=#{systemName}
 | 
				
			||||
		</if>
 | 
				
			||||
		<if test="array !=null and array.length > 0">
 | 
				
			||||
			<foreach collection="array" item="item" index="index">
 | 
				
			||||
			AND CONCAT(area_code,city_name,district_name,system_name) LIKE CONCAT('%',CONCAT(#{item},'%'))
 | 
				
			||||
			</foreach>
 | 
				
			||||
		</if>
 | 
				
			||||
	</sql>
 | 
				
			||||
	
 | 
				
			||||
	<!-- sql txt  Base_Column_List -->
 | 
				
			||||
	<sql id="Base_Column_List">
 | 
				
			||||
		area_code,city_name,district_name,system_name,area_level,data_version,begin_in_use,function_details,
 | 
				
			||||
		department_manager,manager_contacts,sys_developer_full_name,data_base_type,data_base_version,
 | 
				
			||||
		is_budget_exec,is_budget_quota,is_collection,is_department_budget,total_budget_account,
 | 
				
			||||
		final_account_manage,report_form_manage,non_tax_revenue_manage,wage_system,
 | 
				
			||||
		analysis_of_financial_economic_prosperity,government_debt
 | 
				
			||||
	</sql>
 | 
				
			||||
 | 
				
			||||
	<!-- 获取数据符合筛选条件的全部记录信息 -->
 | 
				
			||||
	<select id="getLimitedDataInfoEntities" parameterType="com.platform.entities.PagerOptions"
 | 
				
			||||
		resultMap="getEntityByText">
 | 
				
			||||
		SELECT
 | 
				
			||||
		<include refid="Base_Column_List" />
 | 
				
			||||
		FROM pre_data_details
 | 
				
			||||
			<where>
 | 
				
			||||
				<include refid="conditionsFilters" />
 | 
				
			||||
				<choose>
 | 
				
			||||
					<when test="offset > 0">
 | 
				
			||||
						and pre_data_details.id>= #{offset}
 | 
				
			||||
					</when>
 | 
				
			||||
					<otherwise>
 | 
				
			||||
						and pre_data_details.id>=0
 | 
				
			||||
					</otherwise>
 | 
				
			||||
				</choose>
 | 
				
			||||
			</where>
 | 
				
			||||
			
 | 
				
			||||
			ORDER BY pre_data_details.area_code,pre_data_details.sys_code
 | 
				
			||||
			<if test="limit > 0">
 | 
				
			||||
				LIMIT #{limit}
 | 
				
			||||
			</if>
 | 
				
			||||
	</select>
 | 
				
			||||
	
 | 
				
			||||
	<!-- 获取数据符合筛选条件的全部记录信息 -->
 | 
				
			||||
	
 | 
				
			||||
 | 
				
			||||
	<!-- 获取数据符合筛选条件的总记录条数 -->
 | 
				
			||||
	<select id="getLimitedDataCount" resultType="java.lang.Integer"
 | 
				
			||||
		parameterType="com.platform.entities.PagerOptions">
 | 
				
			||||
		SELECT COUNT(id) FROM pre_data_details
 | 
				
			||||
			<where>
 | 
				
			||||
				<include refid="conditionsFilters" />
 | 
				
			||||
			</where>
 | 
				
			||||
 | 
				
			||||
	</select>
 | 
				
			||||
 | 
				
			||||
	<!-- 获取数据查询的起始di -->
 | 
				
			||||
	<select id="getLimitedBeginId" resultType="java.lang.Integer"
 | 
				
			||||
		parameterType="com.platform.entities.PagerOptions">
 | 
				
			||||
		SELECT MAX(idx) FROM (SELECT id idx FROM pre_data_details 
 | 
				
			||||
		ORDER BY id LIMIT 0,#{totalLimit}) AS TEMP
 | 
				
			||||
	</select>
 | 
				
			||||
	<select id="getIdIsExist" parameterType="java.util.List" resultType="java.lang.String">
 | 
				
			||||
		select data_path
 | 
				
			||||
		from pre_data_details
 | 
				
			||||
		where id in 
 | 
				
			||||
		<foreach item="item" index="index" collection="list" open="(" separator="," close=")">
 | 
				
			||||
			#{item}
 | 
				
			||||
		</foreach>
 | 
				
			||||
	</select>
 | 
				
			||||
	
 | 
				
			||||
	<sql id="Batch_Column_List">
 | 
				
			||||
		area_code,sys_code,area_level,data_version,begin_in_use,function_details,
 | 
				
			||||
		department_manager,manager_contacts,sys_developer_full_name,data_base_type,data_base_version,
 | 
				
			||||
		is_budget_exec,is_budget_quota,is_collection,is_department_budget,total_budget_account,
 | 
				
			||||
		final_account_manage,report_form_manage,non_tax_revenue_manage,wage_system,
 | 
				
			||||
		analysis_of_financial_economic_prosperity,government_debt,update_time
 | 
				
			||||
	</sql>
 | 
				
			||||
	
 | 
				
			||||
	<!-- 查询所有 -->
 | 
				
			||||
	<select id="findAll" resultMap="getEntityByText">
 | 
				
			||||
		SELECT
 | 
				
			||||
		<include refid="Base_Column_List" />
 | 
				
			||||
		FROM pre_data_details
 | 
				
			||||
		ORDER BY pre_data_details.area_code,pre_data_details.sys_code
 | 
				
			||||
	</select>
 | 
				
			||||
	
 | 
				
			||||
	<!-- 批量插入 -->
 | 
				
			||||
	<select id="insertBatch" parameterType="java.util.List">
 | 
				
			||||
	    INSERT INTO pre_data_info ( <include refid="Batch_Column_List" /> ) 
 | 
				
			||||
	    VALUES 
 | 
				
			||||
	    <foreach collection="list" item="item" index="index" separator=",">
 | 
				
			||||
	        (#{item.areaCode,jdbcType=VARCHAR},#{item.sysCode,jdbcType=INTEGER},#{item.areaLevel,jdbcType=VARCHAR},#{item.dataVersion,jdbcType=VARCHAR},#{item.beginUseTime},#{item.functionDetails},
 | 
				
			||||
	        #{item.departmentManager},#{item.managerContacts,jdbcType=VARCHAR},#{item.developerFullName,jdbcType=VARCHAR},#{item.dataBaseType,jdbcType=VARCHAR},#{item.dataBaseVersion,jdbcType=VARCHAR},
 | 
				
			||||
	        #{item.budgetExecManage},#{item.budgetQuotaManage,jdbcType=VARCHAR},#{item.collection,jdbcType=VARCHAR},#{item.departmentBudgetManage,jdbcType=VARCHAR},#{item.totalBudgetAccount,jdbcType=VARCHAR},
 | 
				
			||||
	        #{item.finalAccountManage},#{item.reportFormManage,jdbcType=VARCHAR},#{item.nonTaxManage,jdbcType=VARCHAR},#{item.wageSystem,jdbcType=VARCHAR},
 | 
				
			||||
	        #{item.analysisOfFinancialEconomicProsperity},#{item.governmentDebtManage},#{item.updateTime})
 | 
				
			||||
	    </foreach>
 | 
				
			||||
	</select> 
 | 
				
			||||
	
 | 
				
			||||
	<!-- 更新字段 -->
 | 
				
			||||
	<update id="update" parameterType="com.platform.entities.PreDataInfoFull">
 | 
				
			||||
		UPDATE
 | 
				
			||||
		pre_data_info
 | 
				
			||||
		<set>
 | 
				
			||||
			<trim suffixOverrides=",">
 | 
				
			||||
				<if test="collection != null and collection != ''">
 | 
				
			||||
					is_collect= #{collection},
 | 
				
			||||
				</if>
 | 
				
			||||
				<if test="areaLevel != null and areaLevel != ''">
 | 
				
			||||
					area_level= #{areaLevel},
 | 
				
			||||
				</if>
 | 
				
			||||
				<if test="dataVersion != null and dataVersion != ''">
 | 
				
			||||
					data_version= #{dataVersion},
 | 
				
			||||
				</if>
 | 
				
			||||
				<if test="beginUseTime != null and beginUseTime != ''">
 | 
				
			||||
					begin_in_use= #{beginUseTime},
 | 
				
			||||
				</if>
 | 
				
			||||
				<if test="functionDetails != null and functionDetails != ''">
 | 
				
			||||
					function_details= #{functionDetails},
 | 
				
			||||
				</if>
 | 
				
			||||
				<if test="departmentManager != null and departmentManager != ''">
 | 
				
			||||
					department_manager= #{departmentManager},
 | 
				
			||||
				</if>
 | 
				
			||||
				<if test="managerContacts != null and managerContacts != ''">
 | 
				
			||||
					manager_contacts= #{managerContacts},
 | 
				
			||||
				</if>
 | 
				
			||||
				<if test="developerFullName != null and developerFullName != ''">
 | 
				
			||||
					sys_developer_full_name= #{developerFullName},
 | 
				
			||||
				</if>
 | 
				
			||||
				<if test="dataBaseType != null and dataBaseType != ''">
 | 
				
			||||
					data_base_type= #{dataBaseType},
 | 
				
			||||
				</if>
 | 
				
			||||
				<if test="dataBaseVersion != null and dataBaseVersion != ''">
 | 
				
			||||
					data_base_version= #{dataBaseVersion},
 | 
				
			||||
				</if>
 | 
				
			||||
				<if test="departmentBudgetManage != null and departmentBudgetManage != ''">
 | 
				
			||||
					is_department_budget= #{departmentBudgetManage},
 | 
				
			||||
				</if>
 | 
				
			||||
				<if test="budgetQuotaManage != null and budgetQuotaManage != ''">
 | 
				
			||||
					is_budget_quota= #{budgetQuotaManage},
 | 
				
			||||
				</if>
 | 
				
			||||
				<if test="budgetExecManage != null and budgetExecManage != ''">
 | 
				
			||||
					is_budget_exec= #{budgetExecManage},
 | 
				
			||||
				</if>
 | 
				
			||||
				<if test="totalBudgetAccount != null and totalBudgetAccount != ''">
 | 
				
			||||
					total_budget_account= #{totalBudgetAccount},
 | 
				
			||||
				</if>
 | 
				
			||||
				<if test="finalAccountManage != null and finalAccountManage != ''">
 | 
				
			||||
					final_account_manage= #{finalAccountManage},
 | 
				
			||||
				</if>
 | 
				
			||||
				<if test="reportFormManage != null and reportFormManage != ''">
 | 
				
			||||
					report_form_manage= #{reportFormManage},
 | 
				
			||||
				</if>
 | 
				
			||||
				<if test="nonTaxManage != null and nonTaxManage != ''">
 | 
				
			||||
					non_tax_revenue_manage= #{nonTaxManage},
 | 
				
			||||
				</if>
 | 
				
			||||
				<if test="wageSystem != null and wageSystem != ''">
 | 
				
			||||
					wage_system= #{wageSystem},
 | 
				
			||||
				</if>
 | 
				
			||||
				<if test="analysisOfFinancialEconomicProsperity != null and analysisOfFinancialEconomicProsperity != ''">
 | 
				
			||||
					analysis_of_financial_economic_prosperity= #{analysisOfFinancialEconomicProsperity},
 | 
				
			||||
				</if>
 | 
				
			||||
				<if test="governmentDebtManage != null and governmentDebtManage != ''">
 | 
				
			||||
					government_debt= #{governmentDebtManage},
 | 
				
			||||
				</if>
 | 
				
			||||
				<if test="updateTime != null and updateTime != ''">
 | 
				
			||||
					update_time= #{updateTime},
 | 
				
			||||
				</if>
 | 
				
			||||
			</trim>
 | 
				
			||||
		</set>
 | 
				
			||||
		<where>
 | 
				
			||||
			area_code = #{areaCode}
 | 
				
			||||
			AND sys_code = #{sysCode}
 | 
				
			||||
			AND remove ='0'
 | 
				
			||||
		</where> 
 | 
				
			||||
	</update>
 | 
				
			||||
	
 | 
				
			||||
	<select id="getAreaSysNameExistByAreaSysName" parameterType="java.util.List" resultType="java.lang.String">
 | 
				
			||||
		SELECT
 | 
				
			||||
		CONCAT(area_code,',',system_name)
 | 
				
			||||
		FROM pre_data_details
 | 
				
			||||
		where
 | 
				
			||||
			CONCAT(area_code,',',system_name) IN 
 | 
				
			||||
		<foreach item="item" index="index" collection="list" open="(" separator="," close=")">
 | 
				
			||||
			#{item}
 | 
				
			||||
		</foreach>
 | 
				
			||||
	</select>
 | 
				
			||||
	
 | 
				
			||||
 | 
				
			||||
</mapper>  
 | 
				
			||||
					Loading…
					
					
				
		Reference in new issue