From 81bda9441c1de11d78e518dbe5ee632ba7144c90 Mon Sep 17 00:00:00 2001 From: shiyunteng <shiyunteng@example.com> Date: 星期一, 31 三月 2025 11:55:57 +0800 Subject: [PATCH] 验收明细和出租台账中可按设备单次验收或出租 所有验收明细中设备数量与合同中设备数量一致修改合同状态 所有台账明细中设备数量与合同中设备数量一致修改合同状态 --- platformx-device-biz/src/main/resources/mapper/ContractItemMapper.xml | 30 ++++++++++++++++++++++++++++++ 1 files changed, 30 insertions(+), 0 deletions(-) diff --git a/platformx-device-biz/src/main/resources/mapper/ContractItemMapper.xml b/platformx-device-biz/src/main/resources/mapper/ContractItemMapper.xml index f13d680..942d102 100644 --- a/platformx-device-biz/src/main/resources/mapper/ContractItemMapper.xml +++ b/platformx-device-biz/src/main/resources/mapper/ContractItemMapper.xml @@ -21,4 +21,34 @@ <result property="updateTime" column="update_time"/> <result property="delFlag" column="del_flag"/> </resultMap> + <select id="pageNew" resultType="com.by4cloud.platformx.device.entity.vo.ContractItemPageVo"> + select + ci.id, + ci.amount, + ci.month, + ci.name, + ci.num, + ci.price, + ci.specification, + ci.unit, + ci.contract_id, + ci.device_id, + d.name deviceName, + c.name contractName + from + contract_item ci + join contract c on ci.contract_id = c.id + join device d on d.id = ci.device_id + where + ci.del_flag = '0' + <if test="queryDTO.deviceId != null"> + and ci.device_id = #{queryDTO.deviceId} + </if> + <if test="queryDTO.contractId != null"> + and ci.contract_id = #{queryDTO.contractId} + </if> + <if test="queryDTO.contractName != null and queryDTO.contractName !=''"> + and c.name like CONCAT('%', #{queryDTO.contractName}, '%') + </if> + </select> </mapper> -- Gitblit v1.9.1