| | |
| | | where id=#{inventoryId} |
| | | </update> |
| | | |
| | | <update id="updateMaterialInventoryInventoryOut"> |
| | | <update id="updateMaterialInventoryInventoryPlanQuantityOut"> |
| | | update mm.material_inventory |
| | | set inventory_quantity=inventory_quantity-#{quantity},plan_quantity=if(plan_quantity-#{quantity}>=0,plan_quantity-#{quantity},0),total_area=inventory_quantity*single_piece_area |
| | | where id=#{inventoryId} |
| | | </update> |
| | | |
| | | <update id="updateMaterialInventoryInventoryInt"> |
| | | <update id="updateMaterialInventoryInventoryPlanQuantityInt"> |
| | | update mm.material_inventory |
| | | set inventory_quantity=inventory_quantity+#{quantity},plan_quantity=plan_quantity+#{quantity},total_area=inventory_quantity*single_piece_area |
| | | where id=#{inventoryId} |
| | | </update> |
| | | |
| | | <update id="updateMaterialInventoryInventoryOut"> |
| | | update mm.material_inventory |
| | | set inventory_quantity=inventory_quantity-#{quantity},total_area=inventory_quantity*single_piece_area |
| | | where id=#{inventoryId} |
| | | </update> |
| | | |
| | | <update id="updateMaterialInventoryInventoryInt"> |
| | | update mm.material_inventory |
| | | set inventory_quantity=inventory_quantity+#{quantity},total_area=inventory_quantity*single_piece_area |
| | | where id=#{inventoryId} |
| | | </update> |
| | | |
| | | <update id="updateMaterialInventoryAvailableInventoryOut"> |
| | | update mm.material_inventory |
| | | set available_quantity=available_quantity-#{quantity},inventory_quantity=inventory_quantity-#{quantity},total_area=inventory_quantity*single_piece_area |