refactor(wms): 物料入库插入库存优化

dev
wanghao 1 week ago
parent c0b80cf2c5
commit 609ba5d991

@ -1,9 +1,7 @@
package org.dromara.wms.mapper;
import java.util.List;
import com.github.yulichang.wrapper.MPJLambdaWrapper;
import com.baomidou.mybatisplus.core.toolkit.Constants;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import java.util.Date;
import org.apache.ibatis.annotations.Param;
import org.dromara.wms.domain.WmsInventoryDetails;
import org.dromara.wms.domain.vo.WmsInventoryDetailsVo;
@ -24,4 +22,9 @@ public interface WmsInventoryDetailsMapper extends BaseMapperPlus<WmsInventoryDe
int workAddUpdateInventory(WmsInventoryDetails inventoryDetails);
void updateTableById(@Param("inventoryDetailsId") Long inventoryDetailsId,
@Param("inStockAmount") Double inStockAmount,
@Param("nowDate") Date nowDate,
@Param("userId") Long userId);
}

@ -77,4 +77,6 @@ public interface IWmsInventoryDetailsService {
WmsInventoryDetails selectDetailsById(Long sampleLedgerId);
Boolean workAddUpdateInventory(WmsInventoryDetails inventoryDetails);
Boolean inStoreAddInventoryAmount(Long warehouseId, Long projectId, String batchNumber, Long materialId, Double unitPrice, String unitName, Double inStockAmount,String changeType);
}

@ -29,4 +29,13 @@
</update>
<update id="updateTableById">
update wms_inventory_details
set inventory_amount = inventory_amount + #{inStockAmount},
del_flag =0,
update_by = #{userId},
update_time = #{nowDate}
where inventory_details_id = #{inventoryDetailsId}
</update>
</mapper>

Loading…
Cancel
Save