以大代小下拉增加租赁单价

This commit is contained in:
bonus 2025-03-08 11:43:18 +08:00
parent 279fc309b3
commit 1052d7edb0
5 changed files with 28 additions and 6 deletions

View File

@ -68,6 +68,12 @@ public class LeaseOutDetails implements Serializable {
@ApiModelProperty(value = "规格名称") @ApiModelProperty(value = "规格名称")
private String typeName; private String typeName;
/**
* 规格名称
*/
@ApiModelProperty(value = "以大代小规格id")
private Integer replaceTypeId;
/** /**
* maId * maId
*/ */

View File

@ -34,6 +34,15 @@ public class MaType extends BaseEntity {
@Excel(name = "名称") @Excel(name = "名称")
private String typeName; private String typeName;
/** 规格名称 */
@ApiModelProperty(value = "规格名称")
@Excel(name = "名称")
private String modelName;
/** 替换类型ID */
@ApiModelProperty(value = "以大代小类型ID")
private Long replaceTypeId;
/** 类型ID */ /** 类型ID */
@ApiModelProperty(value = "类型ID,用作组织树筛选") @ApiModelProperty(value = "类型ID,用作组织树筛选")
private Long id; private Long id;

View File

@ -2,6 +2,8 @@ package com.bonus.sgzb.material.domain;
import lombok.Data; import lombok.Data;
import java.math.BigDecimal;
/** /**
* @author 10488 * @author 10488
*/ */
@ -15,4 +17,7 @@ public class SelectVo {
private String name; private String name;
private String unit; private String unit;
/** 单价*/
private BigDecimal leasePrice;
} }

View File

@ -291,8 +291,8 @@
<if test="typeName!= null"> <if test="typeName!= null">
#{typeName}, #{typeName},
</if> </if>
<if test="model_name!= null"> <if test="modelName!= null">
#{model_name}, #{modelName},
</if> </if>
<if test="leasePrice!= null"> <if test="leasePrice!= null">
#{leasePrice}, #{leasePrice},
@ -410,8 +410,8 @@
</trim> </trim>
</insert> </insert>
<insert id="insSltInfo"> <insert id="insSltInfo">
insert into slt_agreement_info (agreement_id,type_id,ma_id,num,start_time,status,lease_id,lease_price,buy_price,is_slt,company_id,lease_type,create_time,ck_remark) insert into slt_agreement_info (agreement_id,type_id,ma_id,num,start_time,status,lease_id,lease_price,buy_price, type_name,model_name,replace_type_id, is_slt,company_id,lease_type,create_time,ck_remark)
values (#{agreementId},#{record.typeId},#{record.maId},#{record.outNum},now(),0,#{record.parentId},#{ma.finalPrice},#{ma.buyPrice},'0',#{record.companyId},#{record.leaseType},now(),#{record.remark}); values (#{agreementId},#{record.typeId},#{record.maId},#{record.outNum},now(),0,#{record.parentId},#{ma.finalPrice},#{ma.buyPrice},#{ma.typeName},#{ma.modelName},,#{ma.replaceTypeId},'0',#{record.companyId},#{record.leaseType},now(),#{record.remark});
</insert> </insert>
<select id="leaseOutRecordList" resultType="com.bonus.sgzb.base.api.domain.LeaseOutDetails"> <select id="leaseOutRecordList" resultType="com.bonus.sgzb.base.api.domain.LeaseOutDetails">

View File

@ -45,7 +45,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<!--机具类型--> <!--机具类型-->
<select id="getMaTypeData" resultType="com.bonus.sgzb.material.domain.SelectVo"> <select id="getMaTypeData" resultType="com.bonus.sgzb.material.domain.SelectVo">
SELECT type_id AS id, SELECT type_id AS id,
type_name AS `name` type_name AS `name`,
lease_price AS leasePrice
FROM ma_type FROM ma_type
WHERE `level` = #{type} AND del_flag = '0' WHERE `level` = #{type} AND del_flag = '0'
</select> </select>
@ -53,7 +54,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<select id="getMaTypeDataById" resultType="com.bonus.sgzb.material.domain.SelectVo"> <select id="getMaTypeDataById" resultType="com.bonus.sgzb.material.domain.SelectVo">
SELECT type_id AS id, SELECT type_id AS id,
type_name AS `name`, type_name AS `name`,
unit_name as unit unit_name as unit,
lease_price AS leasePrice
FROM ma_type FROM ma_type
WHERE del_flag = '0' WHERE del_flag = '0'
AND parent_id = #{id} AND parent_id = #{id}