以大代小出库插入记录
This commit is contained in:
parent
40b6fa35b9
commit
6c5a14c811
|
|
@ -167,4 +167,4 @@ public class LeaseOutDetails implements Serializable {
|
||||||
private int preStoreNum;
|
private int preStoreNum;
|
||||||
/** 操作后库存 */
|
/** 操作后库存 */
|
||||||
private int postStoreNum;
|
private int postStoreNum;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -8,6 +8,7 @@ import lombok.Data;
|
||||||
import org.springframework.format.annotation.DateTimeFormat;
|
import org.springframework.format.annotation.DateTimeFormat;
|
||||||
|
|
||||||
import java.io.Serializable;
|
import java.io.Serializable;
|
||||||
|
import java.math.BigDecimal;
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
|
|
@ -173,4 +174,10 @@ public class LeaseApplyDetails implements Serializable {
|
||||||
private String maStatus;
|
private String maStatus;
|
||||||
@ApiModelProperty(value="预领数量-已领数量的差值")
|
@ApiModelProperty(value="预领数量-已领数量的差值")
|
||||||
private Integer nums;
|
private Integer nums;
|
||||||
}
|
|
||||||
|
@ApiModelProperty(value="租赁单价")
|
||||||
|
private BigDecimal leasePrice;
|
||||||
|
|
||||||
|
@ApiModelProperty(value="代替规格id")
|
||||||
|
private Integer replaceTypeId;
|
||||||
|
}
|
||||||
|
|
|
||||||
|
|
@ -36,6 +36,8 @@ public class TreeNode {
|
||||||
|
|
||||||
private String manageType;
|
private String manageType;
|
||||||
|
|
||||||
|
private String isReplace;
|
||||||
|
|
||||||
@JsonInclude(JsonInclude.Include.NON_EMPTY)
|
@JsonInclude(JsonInclude.Include.NON_EMPTY)
|
||||||
private List<TreeNode> children = new ArrayList<>();
|
private List<TreeNode> children = new ArrayList<>();
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -19,12 +19,12 @@
|
||||||
</resultMap>
|
</resultMap>
|
||||||
<sql id="Base_Column_List">
|
<sql id="Base_Column_List">
|
||||||
<!--@mbg.generated-->
|
<!--@mbg.generated-->
|
||||||
id, parennt_id, type_id, pre_num, al_num, `status`, create_by, create_time, update_by,
|
id, parennt_id, type_id, pre_num, al_num, `status`, create_by, create_time, update_by,
|
||||||
update_time, remark, company_id
|
update_time, remark, company_id
|
||||||
</sql>
|
</sql>
|
||||||
<select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
|
<select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
|
||||||
<!--@mbg.generated-->
|
<!--@mbg.generated-->
|
||||||
select
|
select
|
||||||
<include refid="Base_Column_List" />
|
<include refid="Base_Column_List" />
|
||||||
from lease_apply_details
|
from lease_apply_details
|
||||||
where id = #{id,jdbcType=INTEGER}
|
where id = #{id,jdbcType=INTEGER}
|
||||||
|
|
@ -117,14 +117,14 @@
|
||||||
|
|
||||||
<insert id="insert" keyColumn="id" keyProperty="id" parameterType="com.bonus.sgzb.app.domain.LeaseApplyDetails" useGeneratedKeys="true">
|
<insert id="insert" keyColumn="id" keyProperty="id" parameterType="com.bonus.sgzb.app.domain.LeaseApplyDetails" useGeneratedKeys="true">
|
||||||
<!--@mbg.generated-->
|
<!--@mbg.generated-->
|
||||||
insert into lease_apply_details (parennt_id, type_id, pre_num,
|
insert into lease_apply_details (parennt_id, type_id, pre_num,
|
||||||
al_num, `status`, create_by,
|
al_num, `status`, create_by,
|
||||||
create_time, update_by, update_time,
|
create_time, update_by, update_time,
|
||||||
remark, company_id)
|
remark, company_id,type_name,model_name,lease_price,replace_type_id)
|
||||||
values (#{parenntId,jdbcType=INTEGER}, #{typeId,jdbcType=INTEGER}, #{preNum,jdbcType=FLOAT},
|
values (#{parenntId,jdbcType=INTEGER}, #{typeId,jdbcType=INTEGER}, #{preNum,jdbcType=FLOAT},
|
||||||
#{alNum,jdbcType=FLOAT}, #{status,jdbcType=VARCHAR}, #{createBy,jdbcType=VARCHAR},
|
#{alNum,jdbcType=FLOAT}, #{status,jdbcType=VARCHAR}, #{createBy,jdbcType=VARCHAR},
|
||||||
NOW(), #{updateBy,jdbcType=VARCHAR}, NOW(),
|
NOW(), #{updateBy,jdbcType=VARCHAR}, NOW(),
|
||||||
#{remark,jdbcType=VARCHAR}, #{companyId,jdbcType=INTEGER})
|
#{remark,jdbcType=VARCHAR}, #{companyId,jdbcType=INTEGER},#{typeName},#{typeModelName},#{leasePrice},#{replaceTypeId})
|
||||||
</insert>
|
</insert>
|
||||||
<insert id="insertSelective" keyColumn="id" keyProperty="id" parameterType="com.bonus.sgzb.app.domain.LeaseApplyDetails" useGeneratedKeys="true">
|
<insert id="insertSelective" keyColumn="id" keyProperty="id" parameterType="com.bonus.sgzb.app.domain.LeaseApplyDetails" useGeneratedKeys="true">
|
||||||
<!--@mbg.generated-->
|
<!--@mbg.generated-->
|
||||||
|
|
@ -400,7 +400,7 @@
|
||||||
<insert id="batchInsert" keyColumn="id" keyProperty="id" parameterType="map" useGeneratedKeys="true">
|
<insert id="batchInsert" keyColumn="id" keyProperty="id" parameterType="map" useGeneratedKeys="true">
|
||||||
<!--@mbg.generated-->
|
<!--@mbg.generated-->
|
||||||
insert into lease_apply_details
|
insert into lease_apply_details
|
||||||
(parennt_id, type_id, pre_num, al_num, `status`, create_by, create_time, update_by,
|
(parennt_id, type_id, pre_num, al_num, `status`, create_by, create_time, update_by,
|
||||||
update_time, remark, company_id)
|
update_time, remark, company_id)
|
||||||
values
|
values
|
||||||
<foreach collection="list" item="item" separator=",">
|
<foreach collection="list" item="item" separator=",">
|
||||||
|
|
@ -447,7 +447,7 @@
|
||||||
#{remark,jdbcType=VARCHAR},
|
#{remark,jdbcType=VARCHAR},
|
||||||
#{companyId,jdbcType=INTEGER},
|
#{companyId,jdbcType=INTEGER},
|
||||||
</trim>
|
</trim>
|
||||||
on duplicate key update
|
on duplicate key update
|
||||||
<trim suffixOverrides=",">
|
<trim suffixOverrides=",">
|
||||||
<if test="id != null">
|
<if test="id != null">
|
||||||
id = #{id,jdbcType=INTEGER},
|
id = #{id,jdbcType=INTEGER},
|
||||||
|
|
@ -545,7 +545,7 @@
|
||||||
#{companyId,jdbcType=INTEGER},
|
#{companyId,jdbcType=INTEGER},
|
||||||
</if>
|
</if>
|
||||||
</trim>
|
</trim>
|
||||||
on duplicate key update
|
on duplicate key update
|
||||||
<trim suffixOverrides=",">
|
<trim suffixOverrides=",">
|
||||||
<if test="id != null">
|
<if test="id != null">
|
||||||
id = #{id,jdbcType=INTEGER},
|
id = #{id,jdbcType=INTEGER},
|
||||||
|
|
@ -595,4 +595,4 @@
|
||||||
where tta.agreement_id = #{agreementId} and lad.`status` = '2'
|
where tta.agreement_id = #{agreementId} and lad.`status` = '2'
|
||||||
group by lad.type_id
|
group by lad.type_id
|
||||||
</select>
|
</select>
|
||||||
</mapper>
|
</mapper>
|
||||||
|
|
|
||||||
|
|
@ -242,6 +242,18 @@
|
||||||
<if test="carCode!= null">
|
<if test="carCode!= null">
|
||||||
car_code,
|
car_code,
|
||||||
</if>
|
</if>
|
||||||
|
<if test="typeName!= null">
|
||||||
|
type_name,
|
||||||
|
</if>
|
||||||
|
<if test="modelName!= null">
|
||||||
|
model_name,
|
||||||
|
</if>
|
||||||
|
<if test="leasePrice!= null">
|
||||||
|
lease_price,
|
||||||
|
</if>
|
||||||
|
<if test="replaceTypeId!= null">
|
||||||
|
replace_type_id,
|
||||||
|
</if>
|
||||||
create_time,
|
create_time,
|
||||||
update_time
|
update_time
|
||||||
</trim>
|
</trim>
|
||||||
|
|
@ -276,6 +288,18 @@
|
||||||
<if test="carCode!= null">
|
<if test="carCode!= null">
|
||||||
#{carCode},
|
#{carCode},
|
||||||
</if>
|
</if>
|
||||||
|
<if test="typeName!= null">
|
||||||
|
#{typeName},
|
||||||
|
</if>
|
||||||
|
<if test="model_name!= null">
|
||||||
|
#{model_name},
|
||||||
|
</if>
|
||||||
|
<if test="leasePrice!= null">
|
||||||
|
#{leasePrice},
|
||||||
|
</if>
|
||||||
|
<if test="replaceTypeId!= null">
|
||||||
|
#{replaceTypeId},
|
||||||
|
</if>
|
||||||
NOW(),
|
NOW(),
|
||||||
NOW()
|
NOW()
|
||||||
</trim>
|
</trim>
|
||||||
|
|
@ -483,4 +507,4 @@
|
||||||
parennt_id = #{record.parentId}
|
parennt_id = #{record.parentId}
|
||||||
AND type_id = #{record.typeId}
|
AND type_id = #{record.typeId}
|
||||||
</select>
|
</select>
|
||||||
</mapper>
|
</mapper>
|
||||||
|
|
|
||||||
|
|
@ -111,7 +111,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
IFNULL(mt.num, 0)
|
IFNULL(mt.num, 0)
|
||||||
END as num,
|
END as num,
|
||||||
mt.model_code AS modelCode,
|
mt.model_code AS modelCode,
|
||||||
mt.manage_type AS manageType
|
mt.manage_type AS manageType,
|
||||||
|
mt.is_replace as isReplace
|
||||||
FROM ma_type mt
|
FROM ma_type mt
|
||||||
left join (SELECT mt.type_id,
|
left join (SELECT mt.type_id,
|
||||||
mt2.type_name AS typeName,
|
mt2.type_name AS typeName,
|
||||||
|
|
@ -228,4 +229,4 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
left join bm_unit_info bui on slc.unit_id = bui.unit_id
|
left join bm_unit_info bui on slc.unit_id = bui.unit_id
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
</mapper>
|
</mapper>
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue