退料申请表数据问题修改

This commit is contained in:
liang.chao 2024-03-12 15:14:02 +08:00
parent d0d13039d6
commit b9edcaf673
2 changed files with 90 additions and 6 deletions

View File

@ -20,11 +20,6 @@ public class SltAgreementInfo {
*编码
*/
private String maCode;
/**
*直转数量
*/
private Integer rotationNum;
/**
*当前在用量
*/

View File

@ -90,7 +90,7 @@
)
</insert>
<insert id="saveDirectApplyDetails" parameterType="com.bonus.sgzb.base.api.domain.DirectApplyDetails">
insert into direct_apply_info(direct_id,type_id,ma_id,direct_num)
insert into direct_apply_details(direct_id,type_id,ma_id,direct_num)
values (#{directId},#{typeId},#{maId}, #{directNum})
</insert>
<insert id="insertSelective" keyColumn="id" keyProperty="id" parameterType="com.bonus.sgzb.material.domain.LeaseApplyInfo" useGeneratedKeys="true">
@ -216,9 +216,93 @@
#{item.remark,jdbcType=VARCHAR}, #{item.companyId,jdbcType=INTEGER})
</foreach>
</insert>
<insert id="insertLeaseOutDetails">
insert into lease_out_details
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="parentId!= null">
parent_id,
</if>
<if test="typeId!= null">
type_id,
</if>
<if test="maId!= null">
ma_id,
</if>
<if test="outNum!= null">
out_num,
</if>
<if test="outType!= null">
out_type,
</if>
<if test="createBy!= null">
create_by,
</if>
<if test="updateBy!= null">
update_by,
</if>
<if test="remark!= null">
remark,
</if>
<if test="companyId!= null">
company_id,
</if>
<if test="carCode!= null">
car_code,
</if>
create_time,
update_time
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="parentId!= null">
#{parentId},
</if>
<if test="typeId!= null">
#{typeId},
</if>
<if test="maId!= null">
#{maId},
</if>
<if test="outNum!= null">
#{outNum},
</if>
<if test="outType!= null">
#{outType},
</if>
<if test="createBy!= null">
#{createBy},
</if>
<if test="updateBy!= null">
#{updateBy},
</if>
<if test="remark!= null">
#{remark},
</if>
<if test="companyId!= null">
#{companyId},
</if>
<if test="carCode!= null">
#{carCode},
</if>
NOW(),
NOW()
</trim>
</insert>
<update id="refuseDirectApplyInfo">
update direct_apply_info set status = #{status} where id = #{id}
</update>
<update id="updateLeaseApplyDetailsOutNum">
UPDATE
lease_apply_details
SET
al_num = IF(al_num IS NULL, #{record.outNum}, al_num + #{record.outNum}),
<if test="record.updateBy != null and record.updateBy!= '' ">
update_by = #{record.updateBy},
</if>
update_time = now(),
status = '2'
WHERE
parennt_id = #{record.parentId} and type_id = #{record.typeId}
</update>
<delete id="batchDel">
delete
from lease_user_book
@ -250,4 +334,9 @@
<select id="getDirectApplyInfoById" resultType="com.bonus.sgzb.base.api.domain.DirectApplyInfo">
select * from direct_apply_info where id = #{id}
</select>
<select id="getMachineStatus" resultType="java.lang.String">
select ma_status
from ma_machine
where ma_id = #{maId}
</select>
</mapper>