package com.steering.common;

import java.sql.Connection;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.sql.SQLException;

import CoreFS.SA06.CoreReturnObject;
import CoreFS.SA08.CoreXmlSqlParsersFactory;

/**
 * 财务系统出入库记录
 * @author Administrator
 *
 */
public class FmisTool {

	/**
	 * 增加管坯出库记录
	 * @param connection
	 * @param core
	 * @param JudgeStoveNo
	 * @param outStockDoc
	 * @return
	 * @throws SQLException
	 */
	public static CoreReturnObject addGpOutList(Connection connection,
			 CoreReturnObject core, String ResultNo) throws SQLException {
		String updateOff = CoreXmlSqlParsersFactory
				.getSql("FmisTool.addGpOutList");
		PreparedStatement pstaupdateOff = connection  
				.prepareStatement(updateOff);
		pstaupdateOff.setString(1, ResultNo);
		pstaupdateOff.addBatch();
		pstaupdateOff.executeBatch();
		return core;
	}
	
	/**
	 * 删除管坯出库记录
	 * @param connection
	 * @param core
	 * @param JudgeStoveNo
	 * @param outStockDoc
	 * @return
	 * @throws SQLException
	 */
	public static CoreReturnObject deleteGpOutList(Connection connection,
			 CoreReturnObject core, String ResultNo) throws SQLException {
		String updateOff = CoreXmlSqlParsersFactory
				.getSql("FmisTool.deleteGpOutList");
		PreparedStatement pstaupdateOff = connection  
				.prepareStatement(updateOff);
		pstaupdateOff.setString(1, ResultNo);
		pstaupdateOff.addBatch();
		pstaupdateOff.executeBatch();
		return core;
	}
	
}
