|
|
|
@ -56,6 +56,7 @@
|
|
|
|
|
<result property="unitMeasurement" column="unit_measurement"/>
|
|
|
|
|
<result property="sapCode" column="sap_code"/>
|
|
|
|
|
<result property="sapName" column="sap_name"/>
|
|
|
|
|
<result property="factoryWorkshop" column="factory_workshop"/>
|
|
|
|
|
</resultMap>
|
|
|
|
|
|
|
|
|
|
<resultMap type="WmsSparePartsLedger" id="WmsSparePartsLedgerResult">
|
|
|
|
@ -178,63 +179,43 @@
|
|
|
|
|
inventory_number,
|
|
|
|
|
unit_measurement,
|
|
|
|
|
sap_code,
|
|
|
|
|
sap_name
|
|
|
|
|
sap_name,
|
|
|
|
|
factory_workshop
|
|
|
|
|
from base_equipment
|
|
|
|
|
</sql>
|
|
|
|
|
|
|
|
|
|
<select id="selectBaseEquipmentList" parameterType="BaseEquipment" resultMap="BaseEquipmentResult">
|
|
|
|
|
<include refid="selectBaseEquipmentVo"/>
|
|
|
|
|
<where>
|
|
|
|
|
<if test="equipmentCode != null and equipmentCode != ''">and equipment_code like concat('%',
|
|
|
|
|
#{equipmentCode}, '%')
|
|
|
|
|
</if>
|
|
|
|
|
<if test="equipmentName != null and equipmentName != ''">and equipment_name like concat('%',
|
|
|
|
|
#{equipmentName}, '%')
|
|
|
|
|
</if>
|
|
|
|
|
<if test="equipmentCode != null and equipmentCode != ''">and equipment_code like concat('%',#{equipmentCode}, '%')</if>
|
|
|
|
|
<if test="equipmentName != null and equipmentName != ''">and equipment_name like concat('%',#{equipmentName}, '%')</if>
|
|
|
|
|
<if test="equipmentBrand != null and equipmentBrand != ''">and equipment_brand = #{equipmentBrand}</if>
|
|
|
|
|
<if test="equipmentSpec != null and equipmentSpec != ''">and equipment_spec = #{equipmentSpec}</if>
|
|
|
|
|
<if test="equipmentTypeId != null ">and equipment_type_id = #{equipmentTypeId}</if>
|
|
|
|
|
<if test="equipmentTypeCode != null and equipmentTypeCode != ''">and equipment_type_code like concat('%',
|
|
|
|
|
#{equipmentTypeCode}, '%')
|
|
|
|
|
</if>
|
|
|
|
|
<if test="equipmentTypeName != null and equipmentTypeName != ''">and equipment_type_name like concat('%',
|
|
|
|
|
#{equipmentTypeName}, '%')
|
|
|
|
|
</if>
|
|
|
|
|
<if test="equipmentTypeCode != null and equipmentTypeCode != ''">and equipment_type_code like concat('%',#{equipmentTypeCode}, '%')</if>
|
|
|
|
|
<if test="equipmentTypeName != null and equipmentTypeName != ''">and equipment_type_name like concat('%',#{equipmentTypeName}, '%')</if>
|
|
|
|
|
<if test="workshopId != null ">and workshop_id = #{workshopId}</if>
|
|
|
|
|
<if test="workshopCode != null and workshopCode != ''">and workshop_code = #{workshopCode}</if>
|
|
|
|
|
<if test="workshopName != null and workshopName != ''">and workshop_name like concat('%', #{workshopName},
|
|
|
|
|
'%')
|
|
|
|
|
</if>
|
|
|
|
|
<if test="workshopName != null and workshopName != ''">and workshop_name like concat('%', #{workshopName},'%')</if>
|
|
|
|
|
<if test="status != null and status != ''">and status = #{status}</if>
|
|
|
|
|
<if test="attr1 != null and attr1 != ''">and attr1 = #{attr1}</if>
|
|
|
|
|
<if test="attr2 != null and attr2 != ''">and attr2 = #{attr2}</if>
|
|
|
|
|
<if test="attr3 != null ">and attr3 = #{attr3}</if>
|
|
|
|
|
<if test="attr4 != null ">and attr4 = #{attr4}</if>
|
|
|
|
|
<if test="unitWorkingHours != null and unitWorkingHours != ''">and unit_working_hours =
|
|
|
|
|
#{unitWorkingHours}
|
|
|
|
|
</if>
|
|
|
|
|
<if test="unitWorkingHours != null and unitWorkingHours != ''">and unit_working_hours = #{unitWorkingHours}</if>
|
|
|
|
|
<if test="workshopSection != null and workshopSection != ''">and workshop_section = #{workshopSection}</if>
|
|
|
|
|
<if test="equipmentLocation != null and equipmentLocation != ''">and equipment_location =
|
|
|
|
|
#{equipmentLocation}
|
|
|
|
|
</if>
|
|
|
|
|
<if test="hourlyUnitPrice != null and hourlyUnitPrice != ''">and hourly_unit_price = #{hourlyUnitPrice}
|
|
|
|
|
</if>
|
|
|
|
|
<if test="equipmentLocation != null and equipmentLocation != ''">and equipment_location = #{equipmentLocation}</if>
|
|
|
|
|
<if test="hourlyUnitPrice != null and hourlyUnitPrice != ''">and hourly_unit_price = #{hourlyUnitPrice}</if>
|
|
|
|
|
<if test="plcIp != null and plcIp != ''">and plc_ip = #{plcIp}</if>
|
|
|
|
|
<if test="plcPort != null and plcPort != ''">and plc_port = #{plcPort}</if>
|
|
|
|
|
<if test="equipmentHead != null and equipmentHead != ''">and equipment_head = #{equipmentHead}</if>
|
|
|
|
|
<if test="equipmentBarcode != null and equipmentBarcode != ''">and equipment_barcode =
|
|
|
|
|
#{equipmentBarcode}
|
|
|
|
|
</if>
|
|
|
|
|
<if test="equipmentBarcodeImage != null and equipmentBarcodeImage != ''">and equipment_barcode_image =
|
|
|
|
|
#{equipmentBarcodeImage}
|
|
|
|
|
</if>
|
|
|
|
|
<if test="equipmentBarcode != null and equipmentBarcode != ''">and equipment_barcode = #{equipmentBarcode}</if>
|
|
|
|
|
<if test="equipmentBarcodeImage != null and equipmentBarcodeImage != ''">and equipment_barcode_image = #{equipmentBarcodeImage}</if>
|
|
|
|
|
<if test="manufacturer != null and manufacturer != ''">and manufacturer = #{manufacturer}</if>
|
|
|
|
|
<if test="supplier != null and supplier != ''">and supplier = #{supplier}</if>
|
|
|
|
|
<if test="useLife != null and useLife != ''">and use_life = #{useLife}</if>
|
|
|
|
|
<if test="buyTime != null ">and buy_time = #{buyTime}</if>
|
|
|
|
|
<if test="assetOriginalValue != null and assetOriginalValue != ''">and asset_original_value =
|
|
|
|
|
#{assetOriginalValue}
|
|
|
|
|
</if>
|
|
|
|
|
<if test="assetOriginalValue != null and assetOriginalValue != ''">and asset_original_value = #{assetOriginalValue}</if>
|
|
|
|
|
<if test="netAssetValue != null and netAssetValue != ''">and net_asset_value = #{netAssetValue}</if>
|
|
|
|
|
<if test="assetHead != null and assetHead != ''">and asset_head = #{assetHead}</if>
|
|
|
|
|
<if test="fixedAssetCode != null and fixedAssetCode != ''">and fixed_asset_code = #{fixedAssetCode}</if>
|
|
|
|
@ -242,20 +223,15 @@
|
|
|
|
|
<if test="sapAsset != null and sapAsset != ''">and sap_asset = #{sapAsset}</if>
|
|
|
|
|
<if test="factoryCode != null and factoryCode != ''">and factory_code = #{factoryCode}</if>
|
|
|
|
|
<if test="equipmentStatus != null and equipmentStatus != ''">and equipment_status = #{equipmentStatus}</if>
|
|
|
|
|
<if test="equipmentCategory != null and equipmentCategory != ''">and equipment_category =
|
|
|
|
|
#{equipmentCategory}
|
|
|
|
|
</if>
|
|
|
|
|
<if test="assetClassificationName != null and assetClassificationName != ''">and asset_classification_name
|
|
|
|
|
= #{assetClassificationName}
|
|
|
|
|
</if>
|
|
|
|
|
<if test="assetDescription != null and assetDescription != ''">and asset_description =
|
|
|
|
|
#{assetDescription}
|
|
|
|
|
</if>
|
|
|
|
|
<if test="equipmentCategory != null and equipmentCategory != ''">and equipment_category = #{equipmentCategory}</if>
|
|
|
|
|
<if test="assetClassificationName != null and assetClassificationName != ''">and asset_classification_name = #{assetClassificationName}</if>
|
|
|
|
|
<if test="assetDescription != null and assetDescription != ''">and asset_description = #{assetDescription}</if>
|
|
|
|
|
<if test="equipmentNumber != null and equipmentNumber != ''">and equipment_number = #{equipmentNumber}</if>
|
|
|
|
|
<if test="inventoryNumber != null and inventoryNumber != ''">and inventory_number = #{inventoryNumber}</if>
|
|
|
|
|
<if test="unitMeasurement != null and unitMeasurement != ''">and unit_measurement = #{unitMeasurement}</if>
|
|
|
|
|
<if test="sapCode != null and sapCode != ''">and sap_code = #{sapCode}</if>
|
|
|
|
|
<if test="sapName != null and sapName != ''">and sap_name = #{sapName}</if>
|
|
|
|
|
<if test="factoryWorkshop != null and factoryWorkshop != ''">and factory_workshop like concat('%', #{factoryWorkshop},'%')</if>
|
|
|
|
|
and del_flag ='0'
|
|
|
|
|
</where>
|
|
|
|
|
</select>
|
|
|
|
@ -325,6 +301,7 @@
|
|
|
|
|
<if test="unitMeasurement != null">unit_measurement,</if>
|
|
|
|
|
<if test="sapCode != null">sap_code,</if>
|
|
|
|
|
<if test="sapName != null">sap_name,</if>
|
|
|
|
|
<if test="factoryWorkshop != null">factory_workshop,</if>
|
|
|
|
|
</trim>
|
|
|
|
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
|
|
|
<if test="equipmentCode != null and equipmentCode != ''">#{equipmentCode},</if>
|
|
|
|
@ -369,21 +346,21 @@
|
|
|
|
|
<if test="factoryCode != null">#{factoryCode},</if>
|
|
|
|
|
<if test="equipmentStatus != null">#{equipmentStatus},</if>
|
|
|
|
|
<if test="equipmentCategory != null">#{equipmentCategory},</if>
|
|
|
|
|
<if test="assetClassificationName != null and assetClassificationName != ''">#{assetClassificationName},
|
|
|
|
|
</if>
|
|
|
|
|
<if test="assetClassificationName != null and assetClassificationName != ''">#{assetClassificationName},</if>
|
|
|
|
|
<if test="assetDescription != null and assetDescription != ''">#{assetDescription},</if>
|
|
|
|
|
<if test="equipmentNumber != null and equipmentNumber != ''">#{equipmentNumber},</if>
|
|
|
|
|
<if test="inventoryNumber != null and inventoryNumber != ''">#{inventoryNumber},</if>
|
|
|
|
|
<if test="unitMeasurement != null and unitMeasurement != ''">#{unitMeasurement},</if>
|
|
|
|
|
<if test="sapCode != null and sapCode != ''">#{sapCode},</if>
|
|
|
|
|
<if test="sapName != null and sapName != ''">#{sapName},</if>
|
|
|
|
|
<if test="factoryWorkshop != null and factoryWorkshop != ''">#{factoryWorkshop},</if>
|
|
|
|
|
</trim>
|
|
|
|
|
</insert>
|
|
|
|
|
|
|
|
|
|
<update id="updateBaseEquipment" parameterType="BaseEquipment">
|
|
|
|
|
update base_equipment
|
|
|
|
|
<trim prefix="SET" suffixOverrides=",">
|
|
|
|
|
<if test="equipmentCode != null and equipmentCode != ''">equipment_code = #{equipmentCode},</if>
|
|
|
|
|
<if test="equipmentCode != null">equipment_code = #{equipmentCode},</if>
|
|
|
|
|
<if test="equipmentName != null">equipment_name = #{equipmentName},</if>
|
|
|
|
|
<if test="equipmentBrand != null">equipment_brand = #{equipmentBrand},</if>
|
|
|
|
|
<if test="equipmentSpec != null">equipment_spec = #{equipmentSpec},</if>
|
|
|
|
@ -403,15 +380,12 @@
|
|
|
|
|
<if test="createTime != null">create_time = #{createTime},</if>
|
|
|
|
|
<if test="updateBy != null">update_by = #{updateBy},</if>
|
|
|
|
|
<if test="updateTime != null">update_time = #{updateTime},</if>
|
|
|
|
|
<if test="unitWorkingHours != null and unitWorkingHours != ''">unit_working_hours = #{unitWorkingHours},
|
|
|
|
|
</if>
|
|
|
|
|
<if test="workshopSection != null and workshopSection != ''">workshop_section = #{workshopSection},</if>
|
|
|
|
|
<if test="equipmentLocation != null and equipmentLocation != ''">equipment_location =
|
|
|
|
|
#{equipmentLocation},
|
|
|
|
|
</if>
|
|
|
|
|
<if test="hourlyUnitPrice != null and hourlyUnitPrice != ''">hourly_unit_price = #{hourlyUnitPrice},</if>
|
|
|
|
|
<if test="plcIp != null and plcIp != ''">plc_ip = #{plcIp},</if>
|
|
|
|
|
<if test="plcPort != null and plcPort != ''">plc_port = #{plcPort},</if>
|
|
|
|
|
<if test="unitWorkingHours != null ">unit_working_hours = #{unitWorkingHours},</if>
|
|
|
|
|
<if test="workshopSection != null">workshop_section = #{workshopSection},</if>
|
|
|
|
|
<if test="equipmentLocation != null">equipment_location = #{equipmentLocation},</if>
|
|
|
|
|
<if test="hourlyUnitPrice != null">hourly_unit_price = #{hourlyUnitPrice},</if>
|
|
|
|
|
<if test="plcIp != null">plc_ip = #{plcIp},</if>
|
|
|
|
|
<if test="plcPort != null">plc_port = #{plcPort},</if>
|
|
|
|
|
<if test="equipmentBarcode != null">equipment_barcode = #{equipmentBarcode},</if>
|
|
|
|
|
<if test="equipmentBarcodeImage != null">equipment_barcode_image = #{equipmentBarcodeImage},</if>
|
|
|
|
|
<if test="manufacturer != null">manufacturer = #{manufacturer},</if>
|
|
|
|
@ -428,16 +402,14 @@
|
|
|
|
|
<if test="factoryCode != null">factory_code = #{factoryCode},</if>
|
|
|
|
|
<if test="equipmentStatus != null">equipment_status = #{equipmentStatus},</if>
|
|
|
|
|
<if test="equipmentCategory != null">equipment_category = #{equipmentCategory},</if>
|
|
|
|
|
<if test="assetClassificationName != null and assetClassificationName != ''">asset_classification_name =
|
|
|
|
|
#{assetClassificationName},
|
|
|
|
|
</if>
|
|
|
|
|
<if test="assetDescription != null and assetDescription != ''">asset_description = #{assetDescription},
|
|
|
|
|
</if>
|
|
|
|
|
<if test="equipmentNumber != null and equipmentNumber != ''">equipment_number = #{equipmentNumber},</if>
|
|
|
|
|
<if test="inventoryNumber != null and inventoryNumber != ''">inventory_number = #{inventoryNumber},</if>
|
|
|
|
|
<if test="unitMeasurement != null and unitMeasurement != ''">unit_measurement = #{unitMeasurement},</if>
|
|
|
|
|
<if test="sapCode != null and sapCode != ''">sap_code = #{sapCode},</if>
|
|
|
|
|
<if test="sapName != null and sapName != ''">sap_name = #{sapName},</if>
|
|
|
|
|
<if test="assetClassificationName != null">asset_classification_name = #{assetClassificationName},</if>
|
|
|
|
|
<if test="assetDescription != null">asset_description = #{assetDescription},</if>
|
|
|
|
|
<if test="equipmentNumber != null">equipment_number = #{equipmentNumber},</if>
|
|
|
|
|
<if test="inventoryNumber != null">inventory_number = #{inventoryNumber},</if>
|
|
|
|
|
<if test="unitMeasurement != null">unit_measurement = #{unitMeasurement},</if>
|
|
|
|
|
<if test="sapCode != null">sap_code = #{sapCode},</if>
|
|
|
|
|
<if test="sapName != null">sap_name = #{sapName},</if>
|
|
|
|
|
<if test="factoryWorkshop != null">factory_workshop = #{factoryWorkshop},</if>
|
|
|
|
|
</trim>
|
|
|
|
|
where equipment_id = #{equipmentId}
|
|
|
|
|
</update>
|
|
|
|
|