保养工单备件逻辑变更

highway
wws 1 year ago
parent ba8dc2e8b4
commit 3dfe3f2b6c

@ -3,6 +3,7 @@ package com.op.device.mapper;
import java.math.BigDecimal; import java.math.BigDecimal;
import java.util.List; import java.util.List;
import com.op.device.domain.EquSpareApply;
import com.op.device.domain.SparePartsLedger; import com.op.device.domain.SparePartsLedger;
/** /**
@ -67,4 +68,9 @@ public interface SparePartsLedgerMapper {
*/ */
BigDecimal selectRealAmountByMaterialCode(String materialCode); BigDecimal selectRealAmountByMaterialCode(String materialCode);
/**
*
* @param apply
*/
void updateSpareNumReduce(EquSpareApply apply);
} }

@ -280,6 +280,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
where storage_id = #{storageId} where storage_id = #{storageId}
</update> </update>
<update id="updateSpareNumReduce">
update wms_ods_mate_storage_news
set amount = ( amount - #{spareQuantity} ) where material_code = #{spareCode}
</update>
<delete id="deleteSparePartsLedgerByStorageId" parameterType="String"> <delete id="deleteSparePartsLedgerByStorageId" parameterType="String">
delete from wms_ods_mate_storage_news where storage_id = #{storageId} delete from wms_ods_mate_storage_news where storage_id = #{storageId}
</delete> </delete>

Loading…
Cancel
Save