|
@@ -59,6 +59,63 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
select id, code, name, number, image_url, category_number, specifications_model, abc_category, manage_status, user_department, department, responsible_person, location_number, property, purchase_date, commissioning_date, original_value, durable_years, net_value, residual_value, accumulated_depreciation, last_depreciation_date, depreciation_method, contract_number, factory_number, manufacturer, supplier, purpose, maintenance_date, maintenance_tel, maintenance_user, corporation, record_status, remark, create_by, create_time, update_by, update_time, is_whitelist, quantity, units, payment_receiving_time, reserved_column_e, reserved_column_f, reserved_column_g, reserved_column_h, reserved_column_i, reserved_column_j from tb_asset_information
|
|
|
</sql>
|
|
|
|
|
|
+ <sql id="selectTbAssetInformation">
|
|
|
+ SELECT
|
|
|
+ a.id, a.code, a.name, a.number,
|
|
|
+ a.image_url imageUrl,
|
|
|
+ a.category_number categoryNumber,
|
|
|
+ a.specifications_model specificationsModel,
|
|
|
+ a.abc_category abcCategory,
|
|
|
+ a.manage_status manageStatus,
|
|
|
+ a.user_department userDepartment,
|
|
|
+ a.department,
|
|
|
+ a.responsible_person responsiblePerson,
|
|
|
+ a.location_number locationNumber,
|
|
|
+ a.property,
|
|
|
+ a.purchase_date purchaseDate,
|
|
|
+ a.commissioning_date commissioningDate,
|
|
|
+ a.original_value originalValue,
|
|
|
+ a.durable_years durableYears,
|
|
|
+ a.net_value netValue,
|
|
|
+ a.residual_value residualValue,
|
|
|
+ a.accumulated_depreciation accumulatedDepreciation,
|
|
|
+ a.last_depreciation_date lastDepreciationDate,
|
|
|
+ a.depreciation_method depreciationMethod,
|
|
|
+ a.contract_number contractNumber,
|
|
|
+ a.factory_number factoryNumber,
|
|
|
+ a.manufacturer,
|
|
|
+ a.supplier,
|
|
|
+ a.purpose,
|
|
|
+ a.maintenance_tel maintenanceTel,
|
|
|
+ a.maintenance_date maintenanceDate,
|
|
|
+ a.maintenance_user maintenanceUser,
|
|
|
+ a.corporation,
|
|
|
+ a.record_status recordStatus,
|
|
|
+ a.remark,
|
|
|
+ a.create_by createBy,
|
|
|
+ a.create_time createTime,
|
|
|
+ a.update_by updateBy,
|
|
|
+ a.update_time updateTime,
|
|
|
+ a.is_whitelist isWhitelist,
|
|
|
+ a.quantity,
|
|
|
+ a.units,
|
|
|
+ a.payment_receiving_time paymentReceivingTime,
|
|
|
+ b.id locationId,
|
|
|
+ b.name locationName,
|
|
|
+ b.label locationLabel,
|
|
|
+ c.id categoryId,
|
|
|
+ c.name categoryName,
|
|
|
+ d.dept_name userDepartmentName,
|
|
|
+ e.dept_name departmentName,
|
|
|
+ f.dept_name corporationName
|
|
|
+ FROM `tb_asset_information` a
|
|
|
+ LEFT JOIN tb_location b ON a.location_number = b.number
|
|
|
+ LEFT JOIN tb_asset_category c ON a.category_number = c.number
|
|
|
+ LEFT JOIN sys_dept d ON a.user_department = d.dept_id
|
|
|
+ LEFT JOIN sys_dept e ON a.department = e.dept_id
|
|
|
+ LEFT JOIN sys_dept f ON a.corporation = f.dept_id
|
|
|
+ </sql>
|
|
|
+
|
|
|
<select id="selectInfoList" parameterType="TbAssetInformation" resultType="TbAssetInformation">
|
|
|
SELECT a.id,
|
|
|
a.code,
|
|
@@ -114,57 +171,108 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
</where>
|
|
|
</select>
|
|
|
|
|
|
- <select id="selectTbAssetInformationList" parameterType="TbAssetInformation" resultMap="TbAssetInformationResult">
|
|
|
- <include refid="selectTbAssetInformationVo"/>
|
|
|
- <where>
|
|
|
- <if test="code != null and code != ''"> and code = #{code}</if>
|
|
|
- <if test="name != null and name != ''"> and name like concat('%', #{name}, '%')</if>
|
|
|
- <if test="number != null and number != ''"> and number = #{number}</if>
|
|
|
- <if test="imageUrl != null and imageUrl != ''"> and image_url = #{imageUrl}</if>
|
|
|
- <if test="categoryNumber != null and categoryNumber != ''"> and category_number = #{categoryNumber}</if>
|
|
|
- <if test="specificationsModel != null and specificationsModel != ''"> and specifications_model = #{specificationsModel}</if>
|
|
|
- <if test="abcCategory != null and abcCategory != ''"> and abc_category = #{abcCategory}</if>
|
|
|
- <if test="manageStatus != null "> and manage_status = #{manageStatus}</if>
|
|
|
- <if test="userDepartment != null and userDepartment != ''"> and user_department = #{userDepartment}</if>
|
|
|
- <if test="department != null and department != ''"> and department = #{department}</if>
|
|
|
- <if test="responsiblePerson != null and responsiblePerson != ''"> and responsible_person = #{responsiblePerson}</if>
|
|
|
- <if test="locationNumber != null and locationNumber != ''"> and location_number in
|
|
|
- <foreach collection="nlist" item="item" open="(" separator="," close=")">
|
|
|
- #{item}
|
|
|
- </foreach> </if>
|
|
|
- <if test="property != null and property != ''"> and property = #{property}</if>
|
|
|
- <if test="purchaseDate != null "> and purchase_date = #{purchaseDate}</if>
|
|
|
- <if test="commissioningDate != null "> and commissioning_date = #{commissioningDate}</if>
|
|
|
- <if test="originalValue != null and originalValue != ''"> and original_value = #{originalValue}</if>
|
|
|
- <if test="durableYears != null "> and durable_years = #{durableYears}</if>
|
|
|
- <if test="netValue != null and netValue != ''"> and net_value = #{netValue}</if>
|
|
|
- <if test="residualValue != null and residualValue != ''"> and residual_value = #{residualValue}</if>
|
|
|
+<!-- <select id="selectTbAssetInformationList" parameterType="TbAssetInformation" resultMap="TbAssetInformationResult">-->
|
|
|
+<!-- <include refid="selectTbAssetInformationVo"/>-->
|
|
|
+<!-- <where> -->
|
|
|
+<!-- <if test="code != null and code != ''"> and code = #{code}</if>-->
|
|
|
+<!-- <if test="name != null and name != ''"> and name like concat('%', #{name}, '%')</if>-->
|
|
|
+<!-- <if test="number != null and number != ''"> and number = #{number}</if>-->
|
|
|
+<!-- <if test="imageUrl != null and imageUrl != ''"> and image_url = #{imageUrl}</if>-->
|
|
|
+<!-- <if test="categoryNumber != null and categoryNumber != ''"> and category_number = #{categoryNumber}</if>-->
|
|
|
+<!-- <if test="specificationsModel != null and specificationsModel != ''"> and specifications_model = #{specificationsModel}</if>-->
|
|
|
+<!-- <if test="abcCategory != null and abcCategory != ''"> and abc_category = #{abcCategory}</if>-->
|
|
|
+<!-- <if test="manageStatus != null "> and manage_status = #{manageStatus}</if>-->
|
|
|
+<!-- <if test="userDepartment != null and userDepartment != ''"> and user_department = #{userDepartment}</if>-->
|
|
|
+<!-- <if test="department != null and department != ''"> and department = #{department}</if>-->
|
|
|
+<!-- <if test="responsiblePerson != null and responsiblePerson != ''"> and responsible_person = #{responsiblePerson}</if>-->
|
|
|
+<!-- <if test="locationNumber != null and locationNumber != ''"> and location_number in-->
|
|
|
+<!-- <foreach collection="nlist" item="item" open="(" separator="," close=")">-->
|
|
|
+<!-- #{item}-->
|
|
|
+<!-- </foreach> </if>-->
|
|
|
+<!-- <if test="property != null and property != ''"> and property = #{property}</if>-->
|
|
|
+<!-- <if test="purchaseDate != null "> and purchase_date = #{purchaseDate}</if>-->
|
|
|
+<!-- <if test="commissioningDate != null "> and commissioning_date = #{commissioningDate}</if>-->
|
|
|
+<!-- <if test="originalValue != null and originalValue != ''"> and original_value = #{originalValue}</if>-->
|
|
|
+<!-- <if test="durableYears != null "> and durable_years = #{durableYears}</if>-->
|
|
|
+<!-- <if test="netValue != null and netValue != ''"> and net_value = #{netValue}</if>-->
|
|
|
+<!-- <if test="residualValue != null and residualValue != ''"> and residual_value = #{residualValue}</if>-->
|
|
|
+<!-- <if test="accumulatedDepreciation != null and accumulatedDepreciation != ''"> and accumulated_depreciation = #{accumulatedDepreciation}</if>-->
|
|
|
+<!-- <if test="lastDepreciationDate != null "> and last_depreciation_date = #{lastDepreciationDate}</if>-->
|
|
|
+<!-- <if test="depreciationMethod != null "> and depreciation_method = #{depreciationMethod}</if>-->
|
|
|
+<!-- <if test="contractNumber != null and contractNumber != ''"> and contract_number = #{contractNumber}</if>-->
|
|
|
+<!-- <if test="factoryNumber != null and factoryNumber != ''"> and factory_number = #{factoryNumber}</if>-->
|
|
|
+<!-- <if test="manufacturer != null and manufacturer != ''"> and manufacturer = #{manufacturer}</if>-->
|
|
|
+<!-- <if test="supplier != null and supplier != ''"> and supplier = #{supplier}</if>-->
|
|
|
+<!-- <if test="purpose != null and purpose != ''"> and purpose = #{purpose}</if>-->
|
|
|
+<!-- <if test="maintenanceDate != null "> and maintenance_date = #{maintenanceDate}</if>-->
|
|
|
+<!-- <if test="maintenanceTel != null and maintenanceTel != ''"> and maintenance_tel = #{maintenanceTel}</if>-->
|
|
|
+<!-- <if test="maintenanceUser != null and maintenanceUser != ''"> and maintenance_user = #{maintenanceUser}</if>-->
|
|
|
+<!-- <if test="corporation != null and corporation != ''"> and corporation = #{corporation}</if>-->
|
|
|
+<!-- <if test="recordStatus != null "> and record_status = #{recordStatus}</if>-->
|
|
|
+<!-- <if test="isWhitelist != null and isWhitelist != ''"> and is_whitelist = #{isWhitelist}</if>-->
|
|
|
+<!-- <if test="quantity != null and quantity != ''"> and quantity = #{quantity}</if>-->
|
|
|
+<!-- <if test="units != null and units != ''"> and units = #{units}</if>-->
|
|
|
+<!-- <if test="paymentReceivingTime != null"> and payment_receiving_time = #{paymentReceivingTime}</if>-->
|
|
|
+<!-- <if test="reservedColumnE != null and reservedColumnE != ''"> and reserved_column_e = #{reservedColumnE}</if>-->
|
|
|
+<!-- <if test="reservedColumnF != null and reservedColumnF != ''"> and reserved_column_f = #{reservedColumnF}</if>-->
|
|
|
+<!-- <if test="reservedColumnG != null and reservedColumnG != ''"> and reserved_column_g = #{reservedColumnG}</if>-->
|
|
|
+<!-- <if test="reservedColumnH != null and reservedColumnH != ''"> and reserved_column_h = #{reservedColumnH}</if>-->
|
|
|
+<!-- <if test="reservedColumnI != null and reservedColumnI != ''"> and reserved_column_i = #{reservedColumnI}</if>-->
|
|
|
+<!-- <if test="reservedColumnJ != null and reservedColumnJ != ''"> and reserved_column_j = #{reservedColumnJ}</if>-->
|
|
|
+<!-- </where>-->
|
|
|
+<!-- </select>-->
|
|
|
+
|
|
|
+ <select id="selectTbAssetInformationList" parameterType="TbAssetInformation" resultType="TbAssetInformation">
|
|
|
+ <include refid="selectTbAssetInformation"/>
|
|
|
+ <where>
|
|
|
+ <if test="code != null and code != ''"> and a.code = #{code}</if>
|
|
|
+ <if test="name != null and name != ''"> and a.name like concat('%', #{name}, '%')</if>
|
|
|
+ <if test="number != null and number != ''"> and a.number = #{number}</if>
|
|
|
+ <if test="imageUrl != null and imageUrl != ''"> and a.image_url = #{imageUrl}</if>
|
|
|
+ <if test="categoryNumber != null and categoryNumber != ''"> and a.category_number = #{categoryNumber}</if>
|
|
|
+ <if test="specificationsModel != null and specificationsModel != ''"> and a.specifications_model = #{specificationsModel}</if>
|
|
|
+ <if test="abcCategory != null and abcCategory != ''"> and a.abc_category = #{abcCategory}</if>
|
|
|
+ <if test="manageStatus != null "> and a.manage_status = #{manageStatus}</if>
|
|
|
+ <if test="userDepartment != null and userDepartment != ''"> and a.user_department = #{userDepartment}</if>
|
|
|
+ <if test="department != null and department != ''"> and a.department = #{department}</if>
|
|
|
+ <if test="responsiblePerson != null and responsiblePerson != ''"> and a.responsible_person = #{responsiblePerson}</if>
|
|
|
+ <if test="locationNumber != null and locationNumber != ''"> and a.location_number in
|
|
|
+ <foreach collection="nlist" item="item" open="(" separator="," close=")">
|
|
|
+ #{item}
|
|
|
+ </foreach> </if>
|
|
|
+ <if test="property != null and property != ''"> and a.property = #{property}</if>
|
|
|
+ <if test="purchaseDate != null "> and a.purchase_date = #{purchaseDate}</if>
|
|
|
+ <if test="commissioningDate != null "> and a.commissioning_date = #{commissioningDate}</if>
|
|
|
+ <if test="originalValue != null and originalValue != ''"> and a.original_value = #{originalValue}</if>
|
|
|
+ <if test="durableYears != null "> and a.durable_years = #{durableYears}</if>
|
|
|
+ <if test="netValue != null and netValue != ''"> and a.net_value = #{netValue}</if>
|
|
|
+ <if test="residualValue != null and residualValue != ''"> and a.residual_value = #{residualValue}</if>
|
|
|
<if test="accumulatedDepreciation != null and accumulatedDepreciation != ''"> and accumulated_depreciation = #{accumulatedDepreciation}</if>
|
|
|
- <if test="lastDepreciationDate != null "> and last_depreciation_date = #{lastDepreciationDate}</if>
|
|
|
- <if test="depreciationMethod != null "> and depreciation_method = #{depreciationMethod}</if>
|
|
|
- <if test="contractNumber != null and contractNumber != ''"> and contract_number = #{contractNumber}</if>
|
|
|
- <if test="factoryNumber != null and factoryNumber != ''"> and factory_number = #{factoryNumber}</if>
|
|
|
- <if test="manufacturer != null and manufacturer != ''"> and manufacturer = #{manufacturer}</if>
|
|
|
- <if test="supplier != null and supplier != ''"> and supplier = #{supplier}</if>
|
|
|
- <if test="purpose != null and purpose != ''"> and purpose = #{purpose}</if>
|
|
|
- <if test="maintenanceDate != null "> and maintenance_date = #{maintenanceDate}</if>
|
|
|
- <if test="maintenanceTel != null and maintenanceTel != ''"> and maintenance_tel = #{maintenanceTel}</if>
|
|
|
- <if test="maintenanceUser != null and maintenanceUser != ''"> and maintenance_user = #{maintenanceUser}</if>
|
|
|
- <if test="corporation != null and corporation != ''"> and corporation = #{corporation}</if>
|
|
|
- <if test="recordStatus != null "> and record_status = #{recordStatus}</if>
|
|
|
- <if test="isWhitelist != null and isWhitelist != ''"> and is_whitelist = #{isWhitelist}</if>
|
|
|
- <if test="quantity != null and quantity != ''"> and quantity = #{quantity}</if>
|
|
|
- <if test="units != null and units != ''"> and units = #{units}</if>
|
|
|
- <if test="paymentReceivingTime != null"> and payment_receiving_time = #{paymentReceivingTime}</if>
|
|
|
- <if test="reservedColumnE != null and reservedColumnE != ''"> and reserved_column_e = #{reservedColumnE}</if>
|
|
|
- <if test="reservedColumnF != null and reservedColumnF != ''"> and reserved_column_f = #{reservedColumnF}</if>
|
|
|
- <if test="reservedColumnG != null and reservedColumnG != ''"> and reserved_column_g = #{reservedColumnG}</if>
|
|
|
- <if test="reservedColumnH != null and reservedColumnH != ''"> and reserved_column_h = #{reservedColumnH}</if>
|
|
|
- <if test="reservedColumnI != null and reservedColumnI != ''"> and reserved_column_i = #{reservedColumnI}</if>
|
|
|
- <if test="reservedColumnJ != null and reservedColumnJ != ''"> and reserved_column_j = #{reservedColumnJ}</if>
|
|
|
+ <if test="lastDepreciationDate != null "> and a.last_depreciation_date = #{lastDepreciationDate}</if>
|
|
|
+ <if test="depreciationMethod != null "> and a.depreciation_method = #{depreciationMethod}</if>
|
|
|
+ <if test="contractNumber != null and contractNumber != ''"> and a.contract_number = #{contractNumber}</if>
|
|
|
+ <if test="factoryNumber != null and factoryNumber != ''"> and a.factory_number = #{factoryNumber}</if>
|
|
|
+ <if test="manufacturer != null and manufacturer != ''"> and a.manufacturer = #{manufacturer}</if>
|
|
|
+ <if test="supplier != null and supplier != ''"> and a.supplier = #{supplier}</if>
|
|
|
+ <if test="purpose != null and purpose != ''"> and a.purpose = #{purpose}</if>
|
|
|
+ <if test="maintenanceDate != null "> and a.maintenance_date = #{maintenanceDate}</if>
|
|
|
+ <if test="maintenanceTel != null and maintenanceTel != ''"> and a.maintenance_tel = #{maintenanceTel}</if>
|
|
|
+ <if test="maintenanceUser != null and maintenanceUser != ''"> and a.maintenance_user = #{maintenanceUser}</if>
|
|
|
+ <if test="corporation != null and corporation != ''"> and a.corporation = #{corporation}</if>
|
|
|
+ <if test="recordStatus != null "> and a.record_status = #{recordStatus}</if>
|
|
|
+ <if test="isWhitelist != null and isWhitelist != ''"> and a.is_whitelist = #{isWhitelist}</if>
|
|
|
+ <if test="quantity != null and quantity != ''"> and a.quantity = #{quantity}</if>
|
|
|
+ <if test="units != null and units != ''"> and a.units = #{units}</if>
|
|
|
+ <if test="paymentReceivingTime != null"> and a.payment_receiving_time = #{paymentReceivingTime}</if>
|
|
|
+ <if test="reservedColumnE != null and reservedColumnE != ''"> and a.reserved_column_e = #{reservedColumnE}</if>
|
|
|
+ <if test="reservedColumnF != null and reservedColumnF != ''"> and a.reserved_column_f = #{reservedColumnF}</if>
|
|
|
+ <if test="reservedColumnG != null and reservedColumnG != ''"> and a.reserved_column_g = #{reservedColumnG}</if>
|
|
|
+ <if test="reservedColumnH != null and reservedColumnH != ''"> and a.reserved_column_h = #{reservedColumnH}</if>
|
|
|
+ <if test="reservedColumnI != null and reservedColumnI != ''"> and a.reserved_column_i = #{reservedColumnI}</if>
|
|
|
+ <if test="reservedColumnJ != null and reservedColumnJ != ''"> and a.reserved_column_j = #{reservedColumnJ}</if>
|
|
|
</where>
|
|
|
</select>
|
|
|
-
|
|
|
+
|
|
|
<select id="selectNumberByLocations" parameterType="String" resultType="String">
|
|
|
select a.number from tb_asset_information a
|
|
|
where a.location_number in
|
|
@@ -173,23 +281,41 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
</foreach>
|
|
|
</select>
|
|
|
|
|
|
- <select id="selectTbAssetInformationById" parameterType="Long" resultMap="TbAssetInformationResult">
|
|
|
- <include refid="selectTbAssetInformationVo"/>
|
|
|
- where id = #{id}
|
|
|
+<!-- <select id="selectTbAssetInformationById" parameterType="Long" resultMap="TbAssetInformationResult">-->
|
|
|
+<!-- <include refid="selectTbAssetInformationVo"/>-->
|
|
|
+<!-- where id = #{id}-->
|
|
|
+<!-- </select>-->
|
|
|
+
|
|
|
+ <select id="selectTbAssetInformationById" parameterType="Long" resultType="TbAssetInformation">
|
|
|
+ <include refid="selectTbAssetInformation"/>
|
|
|
+ where a.id = #{id}
|
|
|
</select>
|
|
|
|
|
|
<!--List<TbAssetInformation> selectTbAssetInformationByIds(Long[] ids);-->
|
|
|
- <select id="selectTbAssetInformationByIds" parameterType="String" resultMap="TbAssetInformationResult">
|
|
|
- <include refid="selectTbAssetInformationVo"/>
|
|
|
- where id in
|
|
|
+<!-- <select id="selectTbAssetInformationByIds" parameterType="String" resultMap="TbAssetInformationResult">-->
|
|
|
+<!-- <include refid="selectTbAssetInformationVo"/>-->
|
|
|
+<!-- where id in-->
|
|
|
+<!-- <foreach item="id" collection="list" open="(" separator="," close=")">-->
|
|
|
+<!-- #{id}-->
|
|
|
+<!-- </foreach>-->
|
|
|
+<!-- </select>-->
|
|
|
+
|
|
|
+ <select id="selectTbAssetInformationByIds" parameterType="String" resultType="TbAssetInformation">
|
|
|
+ <include refid="selectTbAssetInformation"/>
|
|
|
+ where a.id in
|
|
|
<foreach item="id" collection="list" open="(" separator="," close=")">
|
|
|
#{id}
|
|
|
</foreach>
|
|
|
</select>
|
|
|
|
|
|
- <select id="selectTbAssetInformationByAssetNumber" parameterType="String" resultMap="TbAssetInformationResult">
|
|
|
- <include refid="selectTbAssetInformationVo"></include>
|
|
|
- where number = #{assetNumber}
|
|
|
+<!-- <select id="selectTbAssetInformationByAssetNumber" parameterType="String" resultMap="TbAssetInformationResult">-->
|
|
|
+<!-- <include refid="selectTbAssetInformationVo"></include>-->
|
|
|
+<!-- where number = #{assetNumber}-->
|
|
|
+<!-- </select>-->
|
|
|
+
|
|
|
+ <select id="selectTbAssetInformationByAssetNumber" parameterType="String" resultType="TbAssetInformation">
|
|
|
+ <include refid="selectTbAssetInformation"></include>
|
|
|
+ where a.number = #{assetNumber}
|
|
|
</select>
|
|
|
|
|
|
<insert id="insertTbAssetInformation" parameterType="TbAssetInformation" useGeneratedKeys="true" keyProperty="id">
|