From c16329fad94c7a783aae1fc204b9b9818dcf1d29 Mon Sep 17 00:00:00 2001
From: shiyunteng <shiyunteng@example.com>
Date: 星期一, 31 三月 2025 11:04:48 +0800
Subject: [PATCH] 合同新增添加中标单关联,根据选择的中标单赋值乙方 中标单中标厂家改成下拉 验收单来源类型根据合同类型,查询条件和结果新增合同名称
---
platformx-device-biz/src/main/resources/mapper/DeviceMapper.xml | 43 ++++++++++++++++++++++++++++++++++++++++++-
1 files changed, 42 insertions(+), 1 deletions(-)
diff --git a/platformx-device-biz/src/main/resources/mapper/DeviceMapper.xml b/platformx-device-biz/src/main/resources/mapper/DeviceMapper.xml
index 26353cc..635bf6f 100644
--- a/platformx-device-biz/src/main/resources/mapper/DeviceMapper.xml
+++ b/platformx-device-biz/src/main/resources/mapper/DeviceMapper.xml
@@ -15,7 +15,6 @@
<result property="beforeDate" column="before_date"/>
<result property="remindDate" column="remind_date"/>
<result property="num" column="num"/>
- <result property="amount" column="amount"/>
<result property="month" column="month"/>
<result property="releaseDate" column="release_date"/>
<result property="releasePerson" column="release_person"/>
@@ -25,4 +24,46 @@
<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>
</mapper>
--
Gitblit v1.9.1