package com.steering.rpt.scls;

import java.sql.SQLException;

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

import com.steering.comm.db.DBCommon;
//import com.steering.comm.tools.SqlBuilder;
import com.steering.comm.tools.StringTool;

public class SCLS extends DBCommon{
	/***
	 * 生产流速
	 * @param today
	 * @return
	 */

	
	
	
	/*public CoreReturnObject getSCLS_KF()
	{
		String sql= CoreXmlSqlParsersFactory.getSql("FrmrptSCLS.get_KF");
	    return this.getData(sql);
   
	}*/
	
	public CoreReturnObject getSCLS_DC(String today)
	{
		String sql= CoreXmlSqlParsersFactory.getSql("FrmrptSCLS.get_DC");
		sql = StringTool.ReplaceAll(sql, "#today#", today);
	    return this.getData(sql);
   
	}
	
	public CoreReturnObject getSCLS_QX(String today)
	{
		String sql= CoreXmlSqlParsersFactory.getSql("FrmrptSCLS.get_QX");
		sql = StringTool.ReplaceAll(sql, "#today#", today);
	    return this.getData(sql);
   
	}
	
	public CoreReturnObject getSCLS_LXWT(String today)
	{
		String sql= CoreXmlSqlParsersFactory.getSql("FrmrptSCLS.get_LXWT");
		sql = StringTool.ReplaceAll(sql, "#today#", today);
	    return this.getData(sql);
   
	}
	
	public CoreReturnObject getSCLS_LXFX(String today)
	{
		String sql= CoreXmlSqlParsersFactory.getSql("FrmrptSCLS.get_LXFX");
		sql = StringTool.ReplaceAll(sql, "#today#", today);
	    return this.getData(sql);
   
	}
	
	public CoreReturnObject getSCLS_DPSP(String today)
	{
		String sql= CoreXmlSqlParsersFactory.getSql("FrmrptSCLS.get_DPSP");
		sql = StringTool.ReplaceAll(sql, "#today#", today);
	    return this.getData(sql);
   
	}
	
	public CoreReturnObject getSCLS_DPPD(String today)
	{
		String sql= CoreXmlSqlParsersFactory.getSql("FrmrptSCLS.get_DPPD");
		sql = StringTool.ReplaceAll(sql, "#today#", today);
	    return this.getData(sql);
   
	}

	public CoreReturnObject getSCLS_FP(String today)
	{
		String sql= CoreXmlSqlParsersFactory.getSql("FrmrptSCLS.get_FP");
		sql = StringTool.ReplaceAll(sql, "#today#", today);
	    return this.getData(sql);
   
	}
	
	public CoreReturnObject getSCLS_DC_QJ(String fromday,String today)
	{
		String sql= CoreXmlSqlParsersFactory.getSql("FrmrptSCLS.get_DC_QJ");
		sql = StringTool.ReplaceAll(sql, "#fromday#", fromday);
		sql = StringTool.ReplaceAll(sql, "#today#", today);
	    return this.getData(sql);
   
	}
	
	public CoreReturnObject getSCLS_QX_QJ(String fromday,String today)
	{
		String sql= CoreXmlSqlParsersFactory.getSql("FrmrptSCLS.get_QX_QJ");
		sql = StringTool.ReplaceAll(sql, "#fromday#", fromday);
		sql = StringTool.ReplaceAll(sql, "#today#", today);
	    return this.getData(sql);
   
	}
	
	public CoreReturnObject getSCLS_LXWT_QJ(String fromday,String today)
	{
		String sql= CoreXmlSqlParsersFactory.getSql("FrmrptSCLS.get_LXWT_QJ");
		sql = StringTool.ReplaceAll(sql, "#fromday#", fromday);
		sql = StringTool.ReplaceAll(sql, "#today#", today);
	    return this.getData(sql);
   
	}
	
	public CoreReturnObject getSCLS_LXFX_QJ(String fromday,String today)
	{
		String sql= CoreXmlSqlParsersFactory.getSql("FrmrptSCLS.get_LXFX_QJ");
		sql = StringTool.ReplaceAll(sql, "#fromday#", fromday);
		sql = StringTool.ReplaceAll(sql, "#today#", today);
	    return this.getData(sql);
   
	}
	
	public CoreReturnObject getSCLS_DPSP_QJ(String fromday,String today)
	{
		String sql= CoreXmlSqlParsersFactory.getSql("FrmrptSCLS.get_DPSP_QJ");
		sql = StringTool.ReplaceAll(sql, "#fromday#", fromday);
		sql = StringTool.ReplaceAll(sql, "#today#", today);
	    return this.getData(sql);
   
	}
	
	public CoreReturnObject getSCLS_DPPD_QJ(String fromday,String today)
	{
		String sql= CoreXmlSqlParsersFactory.getSql("FrmrptSCLS.get_DPPD_QJ");
		sql = StringTool.ReplaceAll(sql, "#fromday#", fromday);
		sql = StringTool.ReplaceAll(sql, "#today#", today);
	    return this.getData(sql);
   
	}

	public CoreReturnObject getSCLS_FP_QJ(String fromday,String today)
	{
		String sql= CoreXmlSqlParsersFactory.getSql("FrmrptSCLS.get_FP_QJ");
		sql = StringTool.ReplaceAll(sql, "#fromday#", fromday);
		sql = StringTool.ReplaceAll(sql, "#today#", today);
	    return this.getData(sql);
   
	}
	
	public CoreReturnObject getSCLS_DC_KF(String fromday,String today)
	{
		String sql= CoreXmlSqlParsersFactory.getSql("FrmrptSCLS.get_DC_KF");
		sql = StringTool.ReplaceAll(sql, "#fromday#", fromday);
		sql = StringTool.ReplaceAll(sql, "#today#", today);
	    return this.getData(sql);
   
	}
	
	public CoreReturnObject getSCLS_QX_KF(String fromday,String today)
	{
		String sql= CoreXmlSqlParsersFactory.getSql("FrmrptSCLS.get_QX_KF");
		sql = StringTool.ReplaceAll(sql, "#fromday#", fromday);
		sql = StringTool.ReplaceAll(sql, "#today#", today);
	    return this.getData(sql);
   
	}
	
	public CoreReturnObject getSCLS_LXWT_KF(String fromday,String today)
	{
		String sql= CoreXmlSqlParsersFactory.getSql("FrmrptSCLS.get_LXWT_KF");
		sql = StringTool.ReplaceAll(sql, "#fromday#", fromday);
		sql = StringTool.ReplaceAll(sql, "#today#", today);
	    return this.getData(sql);
   
	}
	
	public CoreReturnObject getSCLS_LXFX_KF(String fromday,String today)
	{
		String sql= CoreXmlSqlParsersFactory.getSql("FrmrptSCLS.get_LXFX_KF");
		sql = StringTool.ReplaceAll(sql, "#fromday#", fromday);
		sql = StringTool.ReplaceAll(sql, "#today#", today);
	    return this.getData(sql);
   
	}
	
	public CoreReturnObject getSCLS_DPSP_KF(String fromday,String today)
	{
		String sql= CoreXmlSqlParsersFactory.getSql("FrmrptSCLS.get_DPSP_KF");
		sql = StringTool.ReplaceAll(sql, "#fromday#", fromday);
		sql = StringTool.ReplaceAll(sql, "#today#", today);
	    return this.getData(sql);
   
	}
	
	public CoreReturnObject getSCLS_DPPD_KF(String fromday,String today)
	{
		String sql= CoreXmlSqlParsersFactory.getSql("FrmrptSCLS.get_DPPD_KF");
		sql = StringTool.ReplaceAll(sql, "#fromday#", fromday);
		sql = StringTool.ReplaceAll(sql, "#today#", today);
	    return this.getData(sql);
   
	}

	public CoreReturnObject getSCLS_FP_KF(String fromday,String today)
	{
		String sql= CoreXmlSqlParsersFactory.getSql("FrmrptSCLS.get_FP_KF");
		sql = StringTool.ReplaceAll(sql, "#fromday#", fromday);
		sql = StringTool.ReplaceAll(sql, "#today#", today);
	    return this.getData(sql);
   
	}
	
	public CoreReturnObject getSCLS_TotalKF(String fromday,String today)
	{
		String sql= CoreXmlSqlParsersFactory.getSql("FrmrptSCLS.get_TotalKF");
		sql = StringTool.ReplaceAll(sql, "#fromday#", fromday);
		sql = StringTool.ReplaceAll(sql, "#today#", today);
	    return this.getData(sql);
   
	}
	
	public CoreReturnObject getSCLS_SCLS_PZ(String fromday,String today)
	{
		String sql= CoreXmlSqlParsersFactory.getSql("FrmrptSCLS.get_SCZQ_PZ");
		sql = StringTool.ReplaceAll(sql, "#fromday#", fromday);
		sql = StringTool.ReplaceAll(sql, "#today#", today);
	    return this.getData(sql);
	}
	
	public CoreReturnObject getSCLS_SCLS_WL(String fromday,String today)
	{
		String sql= CoreXmlSqlParsersFactory.getSql("FrmrptSCLS.get_SCZQ_WL");
		sql = StringTool.ReplaceAll(sql, "#fromday#", fromday);
		sql = StringTool.ReplaceAll(sql, "#today#", today);
	    return this.getData(sql);
	}
	public CoreReturnObject getSCLS_SCLS_L(String fromday,String today,String material_no)
	{
		String sql= CoreXmlSqlParsersFactory.getSql("FrmrptSCLS.get_SCZQ_L");
		sql = StringTool.ReplaceAll(sql, "#fromday#", fromday);
		sql = StringTool.ReplaceAll(sql, "#today#", today);
		sql = StringTool.ReplaceAll(sql, "#material_no#", material_no);
	    return this.getData(sql);
	}
	
	public CoreReturnObject getSCLS_KF(String kftype)
	{
		String sql= CoreXmlSqlParsersFactory.getSql("FrmrptSCLS.get_SCLS_kf");
		sql = StringTool.ReplaceAll(sql, "#kftype#", kftype)+"	order by id";
	    return this.getData(sql);
	}
	
	public CoreReturnObject update_SCLS_KF(String id, String kftype,String processcode,
			String min_range, String max_range, String kf,String kftype_name,String startime) 
	throws SQLException {
		CoreReturnObject mydata=new CoreReturnObject();
		try {
			String sql = CoreXmlSqlParsersFactory.getSql("FrmrptSCLS.update_SCLS_kf");
			sql = sql.replaceAll("#id#", id);
			sql = sql.replaceAll("#kftype#", kftype);
			sql = sql.replaceAll("#startime#", startime);
			sql = sql.replaceAll("#processcode#", processcode);
			sql = sql.replaceAll("#min_range#", min_range);
			sql = sql.replaceAll("#max_range#", max_range);
			sql = sql.replaceAll("#kf#", kf);
			sql = sql.replaceAll("#kftype_name#", kftype_name);
			this.getDao(CoreConstantData.sysbeanstr).ExcuteNonQuery(sql, new Object[] {});
	
			String sqlSelect = CoreXmlSqlParsersFactory.getSql("FrmrptSCLS.get_SCLS_kf");
			sqlSelect = StringTool.ReplaceAll(sqlSelect, "#kftype#", kftype)+ " and id='"+id+"'";
			mydata=this.getData(sqlSelect);
		} 
		catch (SQLException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		} 
		return mydata;		
	}
	
	public CoreReturnObject insert_SCLS_KF(String id, String kftype,String processcode,
			String min_range, String max_range, String kf,String kftype_name,String startime) 
	throws SQLException {
		CoreReturnObject mydata=new CoreReturnObject();
		try {
			String sql = CoreXmlSqlParsersFactory.getSql("FrmrptSCLS.insert_SCLS_kf");
			sql = sql.replaceAll("#id#", id);
			sql = sql.replaceAll("#kftype#", kftype);
			sql = sql.replaceAll("#startime#", startime);
			sql = sql.replaceAll("#processcode#", processcode);
			sql = sql.replaceAll("#min_range#", min_range);
			sql = sql.replaceAll("#max_range#", max_range);
			sql = sql.replaceAll("#kf#", kf);
			sql = sql.replaceAll("#kftype_name#", kftype_name);
			this.getDao(CoreConstantData.sysbeanstr).ExcuteNonQuery(sql, new Object[] {});
			
			String sqlSelect = CoreXmlSqlParsersFactory.getSql("FrmrptSCLS.get_SCLS_kf");
			sqlSelect = StringTool.ReplaceAll(sqlSelect, "#kftype#", kftype)+ " and id='"+id+"'";
			mydata=this.getData(sqlSelect);
		} 
		catch (SQLException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		} 
		return mydata;		
	}
	
	public CoreReturnObject delete_KF(String id)
	throws SQLException {
		CoreReturnObject mydata=new CoreReturnObject();
		try {
			String sql = CoreXmlSqlParsersFactory.getSql("FrmrptSCLS.delete_SCLS_kf");
			sql = sql.replaceAll("#id#", id);
			this.getDao(CoreConstantData.sysbeanstr).ExcuteNonQuery(sql, new Object[] {});
			
			String sqlSelect = CoreXmlSqlParsersFactory.getSql("FrmrptSCLS.get_SCLS_kf");
			sqlSelect = StringTool.ReplaceAll(sqlSelect, "#kftype#", "1")+ " and id='"+id+"'";
			mydata=this.getData(sqlSelect);
		} 
		catch (SQLException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		} 
		return mydata;		
	}
	
	
	public CoreReturnObject isvalid_KF(String id, String kftype,
		 String newisvalid,String oldisvalid)
	throws SQLException {
		CoreReturnObject mydata=new CoreReturnObject();
		try {
			String sql = CoreXmlSqlParsersFactory.getSql("FrmrptSCLS.isvalid_SCLS_kf");
			sql = sql.replaceAll("#id#", id);
			sql = sql.replaceAll("#kftype#", kftype);
			sql = sql.replaceAll("#newisvalid#", newisvalid);
			sql = sql.replaceAll("#oldisvalid#", oldisvalid);
			this.getDao(CoreConstantData.sysbeanstr).ExcuteNonQuery(sql, new Object[] {});
			
			String sqlSelect = CoreXmlSqlParsersFactory.getSql("FrmrptSCLS.get_SCLS_kf");
			sqlSelect = StringTool.ReplaceAll(sqlSelect, "#kftype#", "1")+ " and id='"+id+"'";
			mydata=this.getData(sqlSelect);
		} 
		catch (SQLException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		} 
		return mydata;		
	}
	
	public CoreReturnObject getSCLS_KFFJX1(String kftype)
	{
		String sql= CoreXmlSqlParsersFactory.getSql("FrmrptSCLS.get_SCLS_kffjx1");
		sql = StringTool.ReplaceAll(sql, "#kftype#", kftype)+"	order by id";
	    return this.getData(sql);
	}
	
	public CoreReturnObject update_SCLS_KFFJX1(String id,String kftype,String fjtype, String fjtype_name, String processcode, 
			String fj_value, String startime) 
	throws SQLException {
		CoreReturnObject mydata=new CoreReturnObject();
		try {
			String sql = CoreXmlSqlParsersFactory.getSql("FrmrptSCLS.update_SCLS_kffjx1");
			sql = sql.replaceAll("#id#", id);
			sql = sql.replaceAll("#kftype#", kftype);
			sql = sql.replaceAll("#fjtype#", fjtype);
			sql = sql.replaceAll("#fjtype_name#", fjtype_name);
			sql = sql.replaceAll("#processcode#", processcode);
			sql = sql.replaceAll("#fj_value#", fj_value);
			sql = sql.replaceAll("#startime#", startime);
			this.getDao(CoreConstantData.sysbeanstr).ExcuteNonQuery(sql, new Object[] {});

			String sqlSelect = CoreXmlSqlParsersFactory.getSql("FrmrptSCLS.get_SCLS_kffjx1");
			sqlSelect = StringTool.ReplaceAll(sqlSelect, "#kftype#", kftype)+ " and id='"+id+"'";
			mydata=this.getData(sqlSelect);
		} 
		catch (SQLException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		} 
		return mydata;		
	}
	
	public CoreReturnObject insert_SCLS_KFFJX1(String id,String kftype,String fjtype, String fjtype_name, String processcode, 
			String fj_value, String startime) 
	throws SQLException {
		CoreReturnObject mydata=new CoreReturnObject();
		try {
			String sql = CoreXmlSqlParsersFactory
				.getSql("FrmrptSCLS.insert_SCLS_kffjx1");
			sql = sql.replaceAll("#id#", id);
			sql = sql.replaceAll("#kftype#", kftype);
			sql = sql.replaceAll("#fjtype#", fjtype);
			sql = sql.replaceAll("#fjtype_name#", fjtype_name);
			sql = sql.replaceAll("#processcode#", processcode);
			sql = sql.replaceAll("#fj_value#", fj_value);
			sql = sql.replaceAll("#startime#", startime);
			this.getDao(CoreConstantData.sysbeanstr).ExcuteNonQuery(sql, new Object[] {});
			
			String sqlSelect = CoreXmlSqlParsersFactory.getSql("FrmrptSCLS.get_SCLS_kffjx1");
			sqlSelect = StringTool.ReplaceAll(sqlSelect, "#kftype#", kftype)+ " and id='"+id+"'";
			mydata=this.getData(sqlSelect);
		} 
		catch (SQLException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		} 
		return mydata;		
	}
	
	public CoreReturnObject delete_KFFJX1(String id)
	throws SQLException {
		CoreReturnObject mydata=new CoreReturnObject();
		try {
			String sql = CoreXmlSqlParsersFactory
			.getSql("FrmrptSCLS.delete_SCLS_kffjx1");
			sql = sql.replaceAll("#id#", id);
			this.getDao(CoreConstantData.sysbeanstr).ExcuteNonQuery(sql, new Object[] {});
			
			String sqlSelect = CoreXmlSqlParsersFactory.getSql("FrmrptSCLS.get_SCLS_kffjx1");
			sqlSelect = StringTool.ReplaceAll(sqlSelect, "#kftype#", "1")+ " and id='"+id+"'";
			mydata=this.getData(sqlSelect);
		} 
		catch (SQLException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		} 
		return mydata;		
	}	
	
	public CoreReturnObject isvalid_KFFJX1(String id, String kftype,String fjtype,
		 String newisvalid,String oldisvalid)
	throws SQLException {
		CoreReturnObject mydata=new CoreReturnObject();
		try {
			String sql = CoreXmlSqlParsersFactory
			.getSql("FrmrptSCLS.isvalid_SCLS_kffjx1");
			sql = sql.replaceAll("#id#", id);
			sql = sql.replaceAll("#kftype#", kftype);
			sql = sql.replaceAll("#fjtype#",fjtype);
			sql = sql.replaceAll("#newisvalid#", newisvalid);
			sql = sql.replaceAll("#oldisvalid#", oldisvalid);
			this.getDao(CoreConstantData.sysbeanstr).ExcuteNonQuery(sql, new Object[] {});
		
			String sqlSelect = CoreXmlSqlParsersFactory.getSql("FrmrptSCLS.get_SCLS_kffjx1");
			sqlSelect = StringTool.ReplaceAll(sqlSelect, "#kftype#", kftype)+ " and id='"+id+"'";
			mydata=this.getData(sqlSelect);
		} 
		catch (SQLException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		} 
		return mydata;		
	}
	
	
	public CoreReturnObject getSCLS_KFFJX2(String kftype)
	{
		String sql= CoreXmlSqlParsersFactory.getSql("FrmrptSCLS.get_SCLS_kffjx2");
		sql = StringTool.ReplaceAll(sql, "#kftype#", kftype)+"	order by id";
	    return this.getData(sql);
	}
	
	public CoreReturnObject update_SCLS_KFFJX2(String id,String kftype, String noworktime_desc, String processcode, 
			String pline_code,String pline_name,String nowork_days,String nowork_times,String startime) 
	throws SQLException {
		CoreReturnObject mydata=new CoreReturnObject();
		try {
			String sql = CoreXmlSqlParsersFactory
				.getSql("FrmrptSCLS.update_SCLS_kffjx2");
			sql = sql.replaceAll("#id#", id);
			sql = sql.replaceAll("#kftype#", kftype);
			sql = sql.replaceAll("#noworktime_desc#", noworktime_desc);
			sql = sql.replaceAll("#processcode#", processcode);
			sql = sql.replaceAll("#pline_code#", pline_code);
			sql = sql.replaceAll("#pline_name#", pline_name);
			sql = sql.replaceAll("#nowork_days#", nowork_days);
			sql = sql.replaceAll("#nowork_times#", nowork_times);
			sql = sql.replaceAll("#startime#", startime);
			this.getDao(CoreConstantData.sysbeanstr).ExcuteNonQuery(sql, new Object[] {});
			
			String sqlSelect = CoreXmlSqlParsersFactory.getSql("FrmrptSCLS.get_SCLS_kffjx2");
			sqlSelect = StringTool.ReplaceAll(sqlSelect, "#kftype#", kftype)+ " and id='"+id+"'";
			mydata=this.getData(sqlSelect);
		} 
		catch (SQLException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		} 
		return mydata;		
	}
	
	public CoreReturnObject insert_SCLS_KFFJX2(String id,String kftype, String noworktime_desc, String processcode, 
			String pline_code,String pline_name,String nowork_days,String nowork_times,String startime) 
	throws SQLException {
		CoreReturnObject mydata=new CoreReturnObject();
		try {
			String sql = CoreXmlSqlParsersFactory
				.getSql("FrmrptSCLS.insert_SCLS_kffjx2");
			sql = sql.replaceAll("#id#", id);
			sql = sql.replaceAll("#kftype#", kftype);
			sql = sql.replaceAll("#noworktime_desc#", noworktime_desc);
			sql = sql.replaceAll("#processcode#", processcode);
			sql = sql.replaceAll("#pline_code#", pline_code);
			sql = sql.replaceAll("#pline_name#", pline_name);
			sql = sql.replaceAll("#nowork_days#", nowork_days);
			sql = sql.replaceAll("#nowork_times#", nowork_times);
			sql = sql.replaceAll("#startime#", startime);
			this.getDao(CoreConstantData.sysbeanstr).ExcuteNonQuery(sql, new Object[] {});
			
			String sqlSelect = CoreXmlSqlParsersFactory.getSql("FrmrptSCLS.get_SCLS_kffjx2");
			sqlSelect = StringTool.ReplaceAll(sqlSelect, "#kftype#", kftype)+ " and id='"+id+"'";
			mydata=this.getData(sqlSelect);
		} 
		catch (SQLException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		} 
		return mydata;		
	}
	public CoreReturnObject delete_KFFJX2(String id)
	throws SQLException {
		CoreReturnObject mydata=new CoreReturnObject();
		try {
			String sql = CoreXmlSqlParsersFactory
			.getSql("FrmrptSCLS.delete_SCLS_kffjx2");
			sql = sql.replaceAll("#id#", id);
			this.getDao(CoreConstantData.sysbeanstr).ExcuteNonQuery(sql, new Object[] {});
			
			String sqlSelect = CoreXmlSqlParsersFactory.getSql("FrmrptSCLS.get_SCLS_kffjx2");
			sqlSelect = StringTool.ReplaceAll(sqlSelect, "#kftype#", "1")+ " and id='"+id+"'";
			mydata=this.getData(sqlSelect);
		} 
		catch (SQLException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		} 
		return mydata;		
	}	
	
	public CoreReturnObject isvalid_KFFJX2(String id, String kftype,String pline_code,
		 String newisvalid,String oldisvalid)
	throws SQLException {
		CoreReturnObject mydata=new CoreReturnObject();
		try {
			String sql = CoreXmlSqlParsersFactory
			.getSql("FrmrptSCLS.isvalid_SCLS_kffjx2");
			sql = sql.replaceAll("#id#", id);
			sql = sql.replaceAll("#kftype#", kftype);
			sql = sql.replaceAll("#pline_code#",pline_code);
			sql = sql.replaceAll("#newisvalid#", newisvalid);
			sql = sql.replaceAll("#oldisvalid#", oldisvalid);
			this.getDao(CoreConstantData.sysbeanstr).ExcuteNonQuery(sql, new Object[] {});
			
			String sqlSelect = CoreXmlSqlParsersFactory.getSql("FrmrptSCLS.get_SCLS_kffjx2");
			sqlSelect = StringTool.ReplaceAll(sqlSelect, "#kftype#", kftype)+ " and id='"+id+"'";
			mydata=this.getData(sqlSelect);
		} 
		catch (SQLException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		} 
		return mydata;		
	}
	
	
	
	public CoreReturnObject getSCLS_KFQZ()
	{
		String sql= CoreXmlSqlParsersFactory.getSql("FrmrptSCLS.get_SCLS_kfqz")+"	order by id";
	    return this.getData(sql);
	}
	
	public CoreReturnObject update_KFQZ(String id,String qztype,
			 String qz,String qztype_name, String startime) 
	throws SQLException {
		CoreReturnObject mydata=new CoreReturnObject();
		try {
			String sql = CoreXmlSqlParsersFactory
					.getSql("FrmrptSCLS.update_SCLS_kfqz");
			sql = sql.replaceAll("#id#", id);
			sql = sql.replaceAll("#startime#", startime);
			sql = sql.replaceAll("#qztype#", qztype);
			sql = sql.replaceAll("#qz#", qz);
			sql = sql.replaceAll("#qztype_name#", qztype_name);
			this.getDao(CoreConstantData.sysbeanstr).ExcuteNonQuery(sql, new Object[] {});
			
			String sqlSelect = CoreXmlSqlParsersFactory.getSql("FrmrptSCLS.get_SCLS_kfqz");
			sqlSelect = sqlSelect+ " where id='"+id+"'";
			mydata=this.getData(sqlSelect);
		} 
		catch (SQLException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		} 
		return mydata;		
	}
	
	public CoreReturnObject insert_KFQZ(String id,String qztype,
			 String qz,String qztype_name, String startime)
	throws SQLException {
		CoreReturnObject mydata=new CoreReturnObject();
		try {
			String sql = CoreXmlSqlParsersFactory
				.getSql("FrmrptSCLS.insert_SCLS_kfqz");
			sql = sql.replaceAll("#id#", id);
			sql = sql.replaceAll("#startime#", startime);
			sql = sql.replaceAll("#qztype#", qztype);
			sql = sql.replaceAll("#qz#", qz);
			sql = sql.replaceAll("#qztype_name#", qztype_name);
			this.getDao(CoreConstantData.sysbeanstr).ExcuteNonQuery(sql, new Object[] {});
			
			String sqlSelect = CoreXmlSqlParsersFactory.getSql("FrmrptSCLS.get_SCLS_kfqz");
			sqlSelect = sqlSelect+ " where id='"+id+"'";
			mydata=this.getData(sqlSelect);
		} 
		catch (SQLException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		} 
		return mydata;		
	}
	
	public CoreReturnObject delete_KFQZ(String id)
	throws SQLException {
		CoreReturnObject mydata=new CoreReturnObject();
		try {
			String sql = CoreXmlSqlParsersFactory
					.getSql("FrmrptSCLS.delete_SCLS_kfqz");
			sql = sql.replaceAll("#id#", id);
			this.getDao(CoreConstantData.sysbeanstr).ExcuteNonQuery(sql, new Object[] {});
			
			String sqlSelect = CoreXmlSqlParsersFactory.getSql("FrmrptSCLS.get_SCLS_kfqz");
			sqlSelect = sqlSelect+ " where id='"+id+"'";
			mydata=this.getData(sqlSelect);
		} 
		catch (SQLException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		} 
		return mydata;		
	}
	
	public CoreReturnObject isvalid_KFQZ(String id, String qztype,
		 String newisvalid,String oldisvalid)
	throws SQLException {
		CoreReturnObject mydata=new CoreReturnObject();
		try {
			String sql = CoreXmlSqlParsersFactory
			.getSql("FrmrptSCLS.isvalid_SCLS_kfqz");
			sql = sql.replaceAll("#id#", id);
			sql = sql.replaceAll("#qztype#", qztype);
			sql = sql.replaceAll("#newisvalid#", newisvalid);
			sql = sql.replaceAll("#oldisvalid#", oldisvalid);
			this.getDao(CoreConstantData.sysbeanstr).ExcuteNonQuery(sql, new Object[] {});
			
			String sqlSelect = CoreXmlSqlParsersFactory.getSql("FrmrptSCLS.get_SCLS_kfqz");
			sqlSelect = sqlSelect+ " where id='"+id+"'";
			mydata=this.getData(sqlSelect);
		} 
		catch (SQLException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		} 
		return mydata;		
	}
	
	public CoreReturnObject get_pline()
	{
		String sql= CoreXmlSqlParsersFactory.getSql("FrmrptSCLS.get_pline");
	    return this.getData(sql);
	}

	
	public CoreReturnObject ImportDC()	throws SQLException {
		CoreReturnObject mydata=new CoreReturnObject();
		try {
			String sql = CoreXmlSqlParsersFactory
			.getSql("FrmrptSCLS.importDC");
			this.getDao(CoreConstantData.sysbeanstr).ExcuteNonQuery(sql, new Object[] {});
			
			String sqlSelect = CoreXmlSqlParsersFactory.getSql("FrmrptSCLS.selectDC");
			mydata=this.getData(sqlSelect);
		} 
		catch (SQLException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		} 
		return mydata;		
	}
	
	public CoreReturnObject ImportQX()	throws SQLException {
			CoreReturnObject mydata=new CoreReturnObject();
			try {
				String sql = CoreXmlSqlParsersFactory
				.getSql("FrmrptSCLS.importQX");
				this.getDao(CoreConstantData.sysbeanstr).ExcuteNonQuery(sql, new Object[] {});
				
				String sqlSelect = CoreXmlSqlParsersFactory.getSql("FrmrptSCLS.selectQX");
				mydata=this.getData(sqlSelect);
			} 
			catch (SQLException e) {
				// TODO Auto-generated catch block
				e.printStackTrace();
			} 
			return mydata;		
		}
	
	public CoreReturnObject ImportLXWT()	throws SQLException {
		CoreReturnObject mydata=new CoreReturnObject();
		try {
			String sql = CoreXmlSqlParsersFactory
			.getSql("FrmrptSCLS.importLXWT");
			this.getDao(CoreConstantData.sysbeanstr).ExcuteNonQuery(sql, new Object[] {});
			
			String sqlSelect = CoreXmlSqlParsersFactory.getSql("FrmrptSCLS.selectLXWT");
			mydata=this.getData(sqlSelect);
		} 
		catch (SQLException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		} 
		return mydata;		
	}

	public CoreReturnObject ImportLXFX()	throws SQLException {
		CoreReturnObject mydata=new CoreReturnObject();
		try {
			String sql = CoreXmlSqlParsersFactory
			.getSql("FrmrptSCLS.importLXFX");
			this.getDao(CoreConstantData.sysbeanstr).ExcuteNonQuery(sql, new Object[] {});
			
			String sqlSelect = CoreXmlSqlParsersFactory.getSql("FrmrptSCLS.selectLXFX");
			mydata=this.getData(sqlSelect);
		} 
		catch (SQLException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		} 
		return mydata;		
	}
	
	public CoreReturnObject ImportDPDSP()	throws SQLException {
		CoreReturnObject mydata=new CoreReturnObject();
		try {
			String sql = CoreXmlSqlParsersFactory
			.getSql("FrmrptSCLS.importDPDSP");
			this.getDao(CoreConstantData.sysbeanstr).ExcuteNonQuery(sql, new Object[] {});
			
			String sqlSelect = CoreXmlSqlParsersFactory.getSql("FrmrptSCLS.selectDPDSP");
			mydata=this.getData(sqlSelect);
		} 
		catch (SQLException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		} 
		return mydata;		
	}

	public CoreReturnObject ImportDPDPD()	throws SQLException {
		CoreReturnObject mydata=new CoreReturnObject();
		try {
			String sql = CoreXmlSqlParsersFactory
			.getSql("FrmrptSCLS.importDPDPD");
			this.getDao(CoreConstantData.sysbeanstr).ExcuteNonQuery(sql, new Object[] {});
			
			String sqlSelect = CoreXmlSqlParsersFactory.getSql("FrmrptSCLS.selectDPDPD");
			mydata=this.getData(sqlSelect);
		} 
		catch (SQLException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		} 
		return mydata;		
	}
	
	public CoreReturnObject ImportFP()	throws SQLException {
		
		CoreReturnObject mydata=new CoreReturnObject();
		try {
			String sql = CoreXmlSqlParsersFactory
			.getSql("FrmrptSCLS.importFP");
			this.getDao(CoreConstantData.sysbeanstr).ExcuteNonQuery(sql, new Object[] {});
			
			String sqlSelect = CoreXmlSqlParsersFactory.getSql("FrmrptSCLS.selectFP");
			mydata=this.getData(sqlSelect);
		} 
		catch (SQLException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		} 
		return mydata;		
	}

	public CoreReturnObject getUpdateDC(String today)	throws SQLException {
		
		CoreReturnObject mydata=new CoreReturnObject();
		try {
			String sql = CoreXmlSqlParsersFactory
			.getSql("FrmrptSCLS.UpdateDC");
			this.getDao(CoreConstantData.sysbeanstr).ExcuteNonQuery(sql, new Object[] {});
			
			String sqlSelect = CoreXmlSqlParsersFactory.getSql("FrmrptSCLS.get_DC");
			sqlSelect = StringTool.ReplaceAll(sqlSelect, "#today#", today);
			mydata=this.getData(sqlSelect);
		} 
		catch (SQLException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		} 
		return mydata;		
	}
		
	public CoreReturnObject getUpdateQX(String today)	throws SQLException {
		
		CoreReturnObject mydata=new CoreReturnObject();
		try {
			String sql = CoreXmlSqlParsersFactory
			.getSql("FrmrptSCLS.UpdateQX");
			this.getDao(CoreConstantData.sysbeanstr).ExcuteNonQuery(sql, new Object[] {});
			
			String sqlSelect = CoreXmlSqlParsersFactory.getSql("FrmrptSCLS.get_QX");
			sqlSelect = StringTool.ReplaceAll(sqlSelect, "#today#", today);
			mydata=this.getData(sqlSelect);
		} 
		catch (SQLException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		} 
		return mydata;		
	}
	
	public CoreReturnObject getUpdateDPSP(String today)	throws SQLException {
		
		CoreReturnObject mydata=new CoreReturnObject();
		try {
			String sql = CoreXmlSqlParsersFactory
			.getSql("FrmrptSCLS.UpdateDPDSP");
			this.getDao(CoreConstantData.sysbeanstr).ExcuteNonQuery(sql, new Object[] {});
			
			String sqlSelect = CoreXmlSqlParsersFactory.getSql("FrmrptSCLS.get_DPSP");
			sqlSelect = StringTool.ReplaceAll(sqlSelect, "#today#", today);
			mydata=this.getData(sqlSelect);
		} 
		catch (SQLException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		} 
		return mydata;		
	}
	
	public CoreReturnObject getUpdateDPPD(String today)	throws SQLException {
		
		CoreReturnObject mydata=new CoreReturnObject();
		try {
			String sql = CoreXmlSqlParsersFactory
			.getSql("FrmrptSCLS.UpdateDPDPD");
			this.getDao(CoreConstantData.sysbeanstr).ExcuteNonQuery(sql, new Object[] {});
			
			String sqlSelect = CoreXmlSqlParsersFactory.getSql("FrmrptSCLS.get_DPPD");
			sqlSelect = StringTool.ReplaceAll(sqlSelect, "#today#", today);
			mydata=this.getData(sqlSelect);
		} 
		catch (SQLException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		} 
		return mydata;		
	}
	
	public CoreReturnObject getUpdateLXWT(String today)	throws SQLException {
	
		CoreReturnObject mydata=new CoreReturnObject();
		try {
			String sql = CoreXmlSqlParsersFactory
			.getSql("FrmrptSCLS.UpdateLXWT");
			this.getDao(CoreConstantData.sysbeanstr).ExcuteNonQuery(sql, new Object[] {});
			
			String sqlSelect = CoreXmlSqlParsersFactory.getSql("FrmrptSCLS.get_LXWT");
			sqlSelect = StringTool.ReplaceAll(sqlSelect, "#today#", today);
			mydata=this.getData(sqlSelect);
		} 
		catch (SQLException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		} 
		return mydata;		
	}
	
	public CoreReturnObject getUpdateLXFX(String today)	throws SQLException {
		
		CoreReturnObject mydata=new CoreReturnObject();
		try {
			String sql = CoreXmlSqlParsersFactory
			.getSql("FrmrptSCLS.UpdateLXFX");
			this.getDao(CoreConstantData.sysbeanstr).ExcuteNonQuery(sql, new Object[] {});
			
			String sqlSelect = CoreXmlSqlParsersFactory.getSql("FrmrptSCLS.get_LXFX");
			sqlSelect = StringTool.ReplaceAll(sqlSelect, "#today#", today);
			mydata=this.getData(sqlSelect);
		} 
		catch (SQLException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		} 
		return mydata;		
	}
	
	public CoreReturnObject getUpdateFP(String today)	throws SQLException {
		
		CoreReturnObject mydata=new CoreReturnObject();
		try {
			String sql = CoreXmlSqlParsersFactory
			.getSql("FrmrptSCLS.UpdateFP");
			this.getDao(CoreConstantData.sysbeanstr).ExcuteNonQuery(sql, new Object[] {});
			
			String sqlSelect = CoreXmlSqlParsersFactory.getSql("FrmrptSCLS.get_FP");
			sqlSelect = StringTool.ReplaceAll(sqlSelect, "#today#", today);
			mydata=this.getData(sqlSelect);
		} 
		catch (SQLException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		} 
		return mydata;		
	}
	
	public CoreReturnObject getHTZQ(String days)
	{
		String sqlSelect = CoreXmlSqlParsersFactory.getSql("FrmrptSCLS.getHTZQ");
		sqlSelect = StringTool.ReplaceAll(sqlSelect, "#days#", days);
		return this.getData(sqlSelect);
	}

}