From 7ed65656296a198162b91cdf311c197aebcff0e8 Mon Sep 17 00:00:00 2001 From: shiyunteng <shiyunteng@example.com> Date: 星期三, 02 四月 2025 15:25:44 +0800 Subject: [PATCH] 台账 验收 新增名称字段对应 列表及条件搜索调整 --- platformx-device-biz/src/main/resources/mapper/DeviceMapper.xml | 59 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 files changed, 59 insertions(+), 0 deletions(-) diff --git a/platformx-device-biz/src/main/resources/mapper/DeviceMapper.xml b/platformx-device-biz/src/main/resources/mapper/DeviceMapper.xml index ec1d5c8..c3a261f 100644 --- a/platformx-device-biz/src/main/resources/mapper/DeviceMapper.xml +++ b/platformx-device-biz/src/main/resources/mapper/DeviceMapper.xml @@ -24,4 +24,63 @@ <result property="updateTime" column="update_time"/> <result property="delFlag" column="del_flag"/> </resultMap> + <select id="getDeviceSelectListByLedgerId" resultType="com.by4cloud.platformx.device.entity.Device"> + select + id, + d.name, + d.specification, + d.number + from + device d + where + d.del_flag = '0' + and exists ( + select + ci.device_id + from + contract_item ci + join contract c on + c.`id` = ci.contract_id + join device_leasing_ledger dll on + dll.contract_code = c.`number` + join device_leasing_ledger_item dlli on + dll.id = dlli.ledger_id + where + dll.id = #{ledgerId} + and d.id = ci.device_id ); + </select> + <select id="getDeviceListByContractId" resultType="com.by4cloud.platformx.device.entity.Device"> + select + * + from + device d + where + d.del_flag = '0' + and exists ( + select + ci.device_id + from + contract_item ci + where + ci.del_flag = '0' + and ci.contract_id = #{contractId} + and ci.device_id = d.id ) + </select> + <select id="getDropdownnByWinningId" resultType="com.by4cloud.platformx.device.entity.Device"> + select + * + from + device d + where + d.del_flag = '0' + and exists ( + select + pwl.device_id + from + purchase_winning_letter pwl + where + pwl.del_flag = '0' + and pwl.id = #{id} + and pwl.device_id = d.id ) + </select> </mapper> -- Gitblit v1.9.1