|
|
|
@ -22,23 +22,45 @@
|
|
|
|
|
<result property="createdTime" column="created_time"/>
|
|
|
|
|
<result property="updatedBy" column="updated_by"/>
|
|
|
|
|
<result property="updatedTime" column="updated_time"/>
|
|
|
|
|
<result property="factoryCode" column="factory_code"/>
|
|
|
|
|
</resultMap>
|
|
|
|
|
|
|
|
|
|
<sql id="selectBaseDeviceLedgerVo">
|
|
|
|
|
select obj_id, device_code, device_name, device_model, device_type, device_address, device_status, used_department, cost_center, manufacturer, enable_date,product_line_code, is_flag, created_by, created_time, updated_by, updated_time from base_deviceledger
|
|
|
|
|
select obj_id,
|
|
|
|
|
device_code,
|
|
|
|
|
device_name,
|
|
|
|
|
device_model,
|
|
|
|
|
device_type,
|
|
|
|
|
device_address,
|
|
|
|
|
device_status,
|
|
|
|
|
used_department,
|
|
|
|
|
cost_center,
|
|
|
|
|
manufacturer,
|
|
|
|
|
enable_date,
|
|
|
|
|
product_line_code,
|
|
|
|
|
factory_code,
|
|
|
|
|
is_flag,
|
|
|
|
|
created_by,
|
|
|
|
|
created_time,
|
|
|
|
|
updated_by,
|
|
|
|
|
updated_time
|
|
|
|
|
from base_deviceledger
|
|
|
|
|
</sql>
|
|
|
|
|
|
|
|
|
|
<select id="selectBaseDeviceLedgerList" parameterType="BaseDeviceLedger" resultMap="BaseDeviceLedgerResult">
|
|
|
|
|
<include refid="selectBaseDeviceLedgerVo"/>
|
|
|
|
|
<where>
|
|
|
|
|
<if test="deviceCode != null and deviceCode != ''">and device_code = #{deviceCode}</if>
|
|
|
|
|
<if test="deviceName != null and deviceName != ''"> and device_name like concat(concat('%', #{deviceName}), '%')</if>
|
|
|
|
|
<if test="deviceName != null and deviceName != ''">and device_name like concat(concat('%', #{deviceName}),
|
|
|
|
|
'%')
|
|
|
|
|
</if>
|
|
|
|
|
<if test="deviceModel != null and deviceModel != ''">and device_model = #{deviceModel}</if>
|
|
|
|
|
<if test="deviceType != null ">and device_type = #{deviceType}</if>
|
|
|
|
|
<if test="deviceAddress != null and deviceAddress != ''">and device_address = #{deviceAddress}</if>
|
|
|
|
|
<if test="deviceStatus != null ">and device_status = #{deviceStatus}</if>
|
|
|
|
|
<if test="usedDepartment != null and usedDepartment != ''">and used_department = #{usedDepartment}</if>
|
|
|
|
|
<if test="productLineCode != null and productLineCode != ''"> and product_line_code = #{productLineCode}</if>
|
|
|
|
|
<if test="productLineCode != null and productLineCode != ''">and product_line_code = #{productLineCode}
|
|
|
|
|
</if>
|
|
|
|
|
<if test="isFlag != null ">and is_flag = #{isFlag}</if>
|
|
|
|
|
<if test="createdBy != null and createdBy != ''">and created_by = #{createdBy}</if>
|
|
|
|
|
<if test="createdTime != null ">and created_time = #{createdTime}</if>
|
|
|
|
@ -70,6 +92,7 @@
|
|
|
|
|
<if test="costCenter != null">cost_center,</if>
|
|
|
|
|
<if test="manufacturer != null">manufacturer,</if>
|
|
|
|
|
<if test="enableDate != null">enable_date,</if>
|
|
|
|
|
<if test="factoryCode != null">factory_code,</if>
|
|
|
|
|
<if test="isFlag != null">is_flag,</if>
|
|
|
|
|
<if test="createdBy != null">created_by,</if>
|
|
|
|
|
<if test="createdTime != null">created_time,</if>
|
|
|
|
@ -86,9 +109,10 @@
|
|
|
|
|
<if test="deviceStatus != null">#{deviceStatus},</if>
|
|
|
|
|
<if test="usedDepartment != null">#{usedDepartment},</if>
|
|
|
|
|
<if test="productLineCode != null">#{productLineCode},</if>
|
|
|
|
|
<if test="costCenter != null">cost_center,</if>
|
|
|
|
|
<if test="manufacturer != null">manufacturer,</if>
|
|
|
|
|
<if test="enableDate != null">enable_date,</if>
|
|
|
|
|
<if test="costCenter != null">#{costCenter},</if>
|
|
|
|
|
<if test="manufacturer != null">#{manufacturer},</if>
|
|
|
|
|
<if test="enableDate != null">#{enableDate},</if>
|
|
|
|
|
<if test="factoryCode != null">#{factoryCode},</if>
|
|
|
|
|
<if test="isFlag != null">#{isFlag},</if>
|
|
|
|
|
<if test="createdBy != null">#{createdBy},</if>
|
|
|
|
|
<if test="createdTime != null">#{createdTime},</if>
|
|
|
|
@ -107,10 +131,11 @@
|
|
|
|
|
<if test="deviceAddress != null">device_address = #{deviceAddress},</if>
|
|
|
|
|
<if test="deviceStatus != null">device_status = #{deviceStatus},</if>
|
|
|
|
|
<if test="usedDepartment != null">used_department = #{usedDepartment},</if>
|
|
|
|
|
<if test="costCenter != null">#{costCenter},</if>
|
|
|
|
|
<if test="manufacturer != null">#{manufacturer},</if>
|
|
|
|
|
<if test="enableDate != null">#{enableDate},</if>
|
|
|
|
|
<if test="costCenter != null">cost_center = #{costCenter},</if>
|
|
|
|
|
<if test="manufacturer != null">manufacturer = #{manufacturer},</if>
|
|
|
|
|
<if test="enableDate != null">enable_date = #{enableDate},</if>
|
|
|
|
|
<if test="productLineCode != null">product_line_code = #{productLineCode},</if>
|
|
|
|
|
<if test="factoryCode != null">factory_code = #{factoryCode},</if>
|
|
|
|
|
<if test="isFlag != null">is_flag = #{isFlag},</if>
|
|
|
|
|
<if test="createdBy != null">created_by = #{createdBy},</if>
|
|
|
|
|
<if test="createdTime != null">created_time = #{createdTime},</if>
|
|
|
|
@ -121,7 +146,9 @@
|
|
|
|
|
</update>
|
|
|
|
|
|
|
|
|
|
<delete id="deleteBaseDeviceLedgerByObjId" parameterType="Long">
|
|
|
|
|
delete from base_deviceledger where obj_id = #{objId}
|
|
|
|
|
delete
|
|
|
|
|
from base_deviceledger
|
|
|
|
|
where obj_id = #{objId}
|
|
|
|
|
</delete>
|
|
|
|
|
|
|
|
|
|
<delete id="deleteBaseDeviceLedgerByObjIds" parameterType="String">
|
|
|
|
|