/// <summary> /// /// </summary> /// <param name="yydh"></param> /// <param name="qymc"></param> /// <param name="xsy_krly_xydw"></param>一级分析字段,如三个值分析到底是销售员xsy;客人来源krly;协议单位xydw,从common_bb获取,一定要字段的名称(也允许分析其他字段如片区、省份) /// <param name="xsy_krly_xydw_value"></param>是否有具体要分析哪一家,主要是用来处理一级字段如果有限定,就用来对一级字段的模糊查询 /// <param name="is_second"></param>分析二级情况,例如有两种情况,一种是销售员下面带协议单位,一种是客人来源还协议单位 /// <param name="second_value"></param>要分析的二级字段的名称 /// <param name="other_cond"></param>是否有包含其他的查询条件(例如要查省份时一定要绑定国家是中国) /// <param name="czy"></param> /// <param name="cssj"></param> /// <param name="jssj"></param> /// <param name="czsj"></param> /// <param name="xxzs"></param> /// public string bbfx_add_app(string yydh, string qymc, string xsy_krly_xydw, string xsy_krly_xydw_value, bool is_second, string second_value, string other_cond, string czy, string cssj, string jssj, DateTime czsj, string xxzs) { string get_result = common_file.common_app.get_failure; string sel_cond = " yydh='" + yydh + "' and czy_temp='" + czy + "' and xfdr!='" + Szwgl.common_zw.dr_ds + "' and (xfsj between '" + cssj + "' and '" + jssj + "')" + other_cond; if (xsy_krly_xydw_value != "") { sel_cond = sel_cond + " and " + xsy_krly_xydw + " like '%" + xsy_krly_xydw_value + "%'"; } string sub_sel_con = ""; float zfs = 1; string fxdr = ""; string fxrb = ""; float zyye = 0; float zfh = 0; float czfs = 0; float xd_czzfs = 1; float xd_czzfs_out = 1; float pjczl = 0; float xd_pjczl = 0; float pjfj = 0; float jcb = 0; float pjbl = 0; float xd_pjbl = 0; float ljzfh = 0; float ljczfs = 0; float ljzyye = 0; BLL.Common B_Common = new Hotel_app.BLL.Common(); string sql_s = "delete from BQ_syxffx where czy_temp='" + czy + "' and type='" + xsy_krly_xydw + "'"; B_Common.ExecuteSql(sql_s); DataSet DS_temp; DataSet DS_temp_0; //获取总房数 DS_temp_0 = B_Common.GetList("select sum(zfs) as zfs from BSzhrbbfl", " yydh='" + yydh + "' and bbrq between '" + cssj + "' and '" + jssj + "'"); if (DS_temp_0 != null && DS_temp_0.Tables[0].Rows.Count > 0) { if (DS_temp_0.Tables[0].Rows[0]["zfs"].ToString() != "") { zfs = float.Parse(DS_temp_0.Tables[0].Rows[0]["zfs"].ToString()); } } //获取营业额 string sel_cond_0 = " yydh='" + yydh + "' and xfdr!='" + Szwgl.common_zw.dr_ds + "' and (xfsj between '" + cssj + "' and '" + jssj + "')"; float zyye_z = 1; DS_temp_0 = B_Common.GetList("select sum(sjxfje) as sjxfje from Ssyxfmx", sel_cond_0); if (DS_temp_0 != null && DS_temp_0.Tables[0].Rows.Count > 0) { if (DS_temp_0.Tables[0].Rows[0]["sjxfje"].ToString() != "") { zyye_z = float.Parse(DS_temp_0.Tables[0].Rows[0]["sjxfje"].ToString()); } } xd_czzfs_out = 1; DS_temp_0 = B_Common.GetList("select sum(xfsl) as xfsl from BQ_syxfmx_ls", sel_cond + " and xfdr='" + Szwgl.common_zw.dr_ff + "'"); if (DS_temp_0 != null && DS_temp_0.Tables[0].Rows.Count > 0) { if (DS_temp_0.Tables[0].Rows[0]["xfsl"].ToString() != "") { xd_czzfs_out = float.Parse(DS_temp_0.Tables[0].Rows[0]["xfsl"].ToString()); } } B_syxfmx_ls_add B_syxfmx_ls_add_new = new B_syxfmx_ls_add(); B_syxfmx_ls_add_new.Ssyxfmx_ls_add_app(yydh, qymc, czy, cssj, jssj, xsy_krly_xydw, xxzs); int i_0 = 0; DS_temp = B_Common.GetList("select " + xsy_krly_xydw + ",sum(sjxfje) as sjxfje from BQ_syxfmx_ls", sel_cond + " group by " + xsy_krly_xydw + " order by sjxfje desc"); if (DS_temp != null && DS_temp.Tables[0].Rows.Count > 0) { for (i_0 = 0; i_0 < DS_temp.Tables[0].Rows.Count; i_0++) { clear_cs(ref fxdr, ref fxrb, ref zyye, ref zfh, ref czfs, ref pjczl, ref xd_pjczl, ref pjfj, ref jcb, ref pjbl, ref xd_pjbl); if (DS_temp.Tables[0].Rows[i_0][xsy_krly_xydw].ToString() != "") { fxdr = DS_temp.Tables[0].Rows[i_0][xsy_krly_xydw].ToString(); fxrb = fxdr; } else { fxdr = "其他"; fxrb = fxdr; } if (DS_temp.Tables[0].Rows[i_0]["sjxfje"].ToString() != "") { zyye = float.Parse(DS_temp.Tables[0].Rows[i_0]["sjxfje"].ToString()); } DS_temp_0 = B_Common.GetList("select sum(sjxfje) as sjxfje from BQ_syxfmx_ls", sel_cond + " and xfdr='" + Szwgl.common_zw.dr_ff + "' and " + xsy_krly_xydw + "='" + DS_temp.Tables[0].Rows[i_0][xsy_krly_xydw].ToString() + "'"); if (DS_temp_0 != null && DS_temp_0.Tables[0].Rows.Count > 0) { if (DS_temp_0.Tables[0].Rows[0]["sjxfje"].ToString() != "") { zfh = float.Parse(DS_temp_0.Tables[0].Rows[0]["sjxfje"].ToString()); } } DS_temp_0 = B_Common.GetList("select sum(xfsl) as xfsl from BQ_syxfmx_ls", sel_cond + " and xfdr='" + Szwgl.common_zw.dr_ff + "' and " + xsy_krly_xydw + "='" + DS_temp.Tables[0].Rows[i_0][xsy_krly_xydw].ToString() + "' "); if (DS_temp_0 != null && DS_temp_0.Tables[0].Rows.Count > 0) { if (DS_temp_0.Tables[0].Rows[0]["xfsl"].ToString() != "") { czfs = float.Parse(DS_temp_0.Tables[0].Rows[0]["xfsl"].ToString()); } } if (zfh <= 0 || czfs <= 0) { pjfj = 0; } else { pjfj = float.Parse(Convert.ToString(Math.Floor(zfh / czfs * 100) / 100)); } ljzfh = ljzfh + zfh; ljczfs = ljczfs + czfs; ljzyye = ljzyye + zyye; pjczl = float.Parse(Convert.ToString(Math.Floor(czfs / zfs * 10000) / 10000)); xd_pjczl = float.Parse(Convert.ToString(Math.Floor(czfs / xd_czzfs_out * 10000) / 10000)); pjbl = float.Parse(Convert.ToString(Math.Floor(zyye / zyye_z * 10000) / 10000)); xd_pjbl = float.Parse(Convert.ToString(Math.Floor(zyye / zyye_z * 10000) / 10000)); jcb = float.Parse(Convert.ToString(Math.Floor(pjczl * pjfj * 100) / 100)); insert_s(B_Common, yydh, qymc, xsy_krly_xydw, s_space + fxdr, s_space + fxrb, zyye, zfh, czfs, Convert.ToString(pjczl * 100) + "%", Convert.ToString(xd_pjczl * 100) + "%", pjfj, jcb, Convert.ToString(pjbl * 100) + "%", Convert.ToString(xd_pjbl * 100) + "%", czy, cssj, jssj); //如果要分析二级情况 if (is_second == true) { sub_sel_con = sel_cond + "and " + xsy_krly_xydw + "='" + DS_temp.Tables[0].Rows[i_0][xsy_krly_xydw].ToString() + "' "; bbfx_add_sub(B_Common, DS_temp_0, yydh, qymc, xsy_krly_xydw, fxdr, second_value, sub_sel_con, czfs, zyye, zfs, zyye_z, czy, cssj, jssj, czsj, xxzs); } } pjczl = float.Parse(Convert.ToString(Math.Floor(ljczfs / zfs * 10000) / 10000)); if (ljczfs <= 0) { pjfj = 0; } else { pjfj = float.Parse(Convert.ToString(Math.Floor(ljzfh / ljczfs * 100) / 100)); } xd_pjczl = float.Parse(Convert.ToString(Math.Floor(ljczfs / xd_czzfs_out * 10000) / 10000)); pjbl = float.Parse(Convert.ToString(Math.Floor(ljzyye / zyye_z * 10000) / 10000)); xd_pjbl = float.Parse(Convert.ToString(Math.Floor(ljzyye / zyye_z * 10000) / 10000)); jcb = float.Parse(Convert.ToString(Math.Floor(pjczl * pjfj * 100) / 100)); insert_s(B_Common, yydh, qymc, xsy_krly_xydw, s_space + "合计", s_space + "合计", ljzyye, ljzfh, ljczfs, Convert.ToString(pjczl * 100) + "%", Convert.ToString(xd_pjczl * 100) + "%", pjfj, jcb, Convert.ToString(pjbl * 100) + "%", Convert.ToString(xd_pjbl * 100) + "%", czy, cssj, jssj); } DS_temp_0.Clear(); DS_temp_0.Dispose(); DS_temp.Clear(); DS_temp.Dispose(); get_result = common_file.common_app.get_suc; return(get_result); }
public void set_ftfx_7day_ky(string yydh, string qymc, BLL.Common B_Common, string czy, DateTime rq, DateTime czsj, string colu_name, string colu_name_yd, string Table_name, String sel_cond_bhwx) { common_file.common_app.get_czsj(); DataSet DS_temp = B_Common.GetList("select fjrb,count(id) as fs from Ffjzt", "id>=0 group by fjrb"); int j_0 = 0; if (DS_temp != null && DS_temp.Tables[0].Rows.Count > 0) { string[] args_fjrb = new string[DS_temp.Tables[0].Rows.Count + 1]; float[] args_fs = new float[DS_temp.Tables[0].Rows.Count + 1]; float[] args_fs_yl = new float[DS_temp.Tables[0].Rows.Count + 1]; float hj_fs = 0; float hj_fs_yl = 0; for (j_0 = 0; j_0 < DS_temp.Tables[0].Rows.Count; j_0++) { common_file.common_app.get_czsj(); args_fjrb[j_0] = DS_temp.Tables[0].Rows[j_0]["fjrb"].ToString(); args_fs_yl[j_0] = 0; args_fs[j_0] = 0; //int.Parse(Math.Math.Floor(float.Parse(DS_temp.Tables[0].Rows[j_0]["fs"].ToString()))); //总房数、可用房数,维修房数,预订在住房数,预订在住人数, float zfs_0 = 1; float kyfs = 0; float yd_zz_zy = 0; float yd_zz_rs = 0; float wx_other_zy = 0; //为了能实现下面的维修其他的再次分析,在以下的分析里先把common_file.common_app.is_contain_wx直接为False common_file.common_used_fjzt.get_zyfs_fx(DS_temp.Tables[0].Rows[j_0]["fjrb"].ToString(), rq, false, ref yd_zz_zy, false, ref yd_zz_rs, ref wx_other_zy, ref zfs_0, ref kyfs); DataSet DS_temp_0; wx_other_zy = 0; if (sel_cond_bhwx == common_Ffjzt.fsfx_zh_yd) { DS_temp_0 = B_Common.GetList("select count(id) as zyfs from Fwx_other", "id>=0 and (lksj>='" + rq.ToShortDateString() + "' and ddsj<'" + rq.ToShortDateString() + " 23:59:59" + "')" + "and fjrb='" + DS_temp.Tables[0].Rows[j_0]["fjrb"].ToString() + "'"); if (DS_temp_0 != null && DS_temp_0.Tables[0].Rows.Count > 0) { wx_other_zy = float.Parse(DS_temp_0.Tables[0].Rows[0]["zyfs"].ToString()); } } args_fs[j_0] = kyfs + wx_other_zy; hj_fs = hj_fs + kyfs; //预计到店DS_temp = B_Common.GetList("select sum(lzfs) as lzfs from Qskyd_fjrb", "fjrb='" + DS_temp.Tables[0].Rows[j_0]["fjrb"].ToString() + "' and lksj between '" + rq.ToShortDateString() + "' and '" + rq.ToShortDateString() + " 23:59:59" + "'"); DS_temp_0 = B_Common.GetList("select sum(lzfs) as lzfs from Qskyd_fjrb", "fjrb='" + DS_temp.Tables[0].Rows[j_0]["fjrb"].ToString() + "' and fjrb<>'' and lzfs>0 and lksj between '" + rq.ToShortDateString() + "' and '" + rq.ToShortDateString() + " 23:59:59" + "'"); if (DS_temp_0 != null && DS_temp_0.Tables[0].Rows.Count > 0) { if (DS_temp_0.Tables[0].Rows[0]["lzfs"].ToString() != "") { string temp_0 = DS_temp_0.Tables[0].Rows[0]["lzfs"].ToString(); args_fs_yl[j_0] = float.Parse(temp_0); hj_fs_yl = hj_fs_yl + float.Parse(temp_0); } } //表示要包含维修和其他为可用 hj_fs = hj_fs + wx_other_zy; DS_temp_0.Clear(); DS_temp_0.Dispose(); } args_fjrb[j_0] = hj_value; args_fs[j_0] = hj_fs; args_fs_yl[j_0] = hj_fs_yl; DS_temp.Clear(); DS_temp.Dispose(); common_file.common_app.get_czsj(); for (int i_0 = 0; i_0 < j_0 + 1; i_0++) { update_record(B_Common, yydh, qymc, czy, colu_name, args_fs[i_0].ToString(), colu_name_yd, args_fs_yl[i_0].ToString(), " and zyzt='" + args_fjrb[i_0] + "'", Table_name); } } Cursor.Current = Cursors.Default; }
public int F_ftxsfx(string yydh, string qymc, DateTime fxrq, string czy) { //返回多少个房型涉及到多少个字段 common_file.common_app.get_czsj(); int get_result = 0; string sql_s = ""; string table_name = "VS_syxfmx_cz"; DateTime cssj_year = Convert.ToDateTime(fxrq.Year.ToString() + "-01-01"); BLL.Common B_Common = new Hotel_app.BLL.Common(); B_Common.ExecuteSql("delete from F_kfxsfx where czy_temp='" + czy + "'"); DataSet DS_temp; int ybtqts = 0; DS_temp = B_Common.GetList("select ybtqts from Qcounter", " id>=0"); if (DS_temp != null && DS_temp.Tables[0].Rows.Count > 0) { if (DS_temp.Tables[0].Rows[0]["ybtqts"].ToString() != "") { ybtqts = int.Parse(DS_temp.Tables[0].Rows[0]["ybtqts"].ToString()); } } DateTime cssj_yf = BBfx.common_bb.judge_yfcssj(fxrq, ybtqts); DateTime cssj = Convert.ToDateTime(fxrq.ToShortDateString()); DateTime jssj = Convert.ToDateTime(fxrq.ToShortDateString() + " 23:59:59"); DataSet DS_temp_0; //获取总房数 float zfs = 1; DS_temp_0 = B_Common.GetList("select sum(zfs) as zfs from BSzhrbbfl", " yydh='" + yydh + "' and bbrq between '" + cssj + "' and '" + jssj + "'"); if (DS_temp_0 != null && DS_temp_0.Tables[0].Rows.Count > 0) { if (DS_temp_0.Tables[0].Rows[0]["zfs"].ToString() != "") { zfs = float.Parse(DS_temp_0.Tables[0].Rows[0]["zfs"].ToString()); } } //获取营业额 string sel_cond_0 = " yydh='" + yydh + "' and xfdr!='" + Szwgl.common_zw.dr_ds + "' and (xfsj between '" + cssj + "' and '" + jssj + "')"; float zyye = 1; DS_temp = B_Common.GetList("select sum(sjxfje) as sjxfje from Ssyxfmx", sel_cond_0); if (DS_temp != null && DS_temp.Tables[0].Rows.Count > 0) { if (DS_temp.Tables[0].Rows[0]["sjxfje"].ToString() != "") { zyye = float.Parse(DS_temp.Tables[0].Rows[0]["sjxfje"].ToString()); } } DS_temp_0 = B_Common.GetList("select fjrb from Ffjrb", "id>=0 order by id"); DataSet DS_temp_1 = B_Common.GetList("select distinct fjrb from VS_syxfmx_cz", "id>=0 and fjrb!='' and xfsj>='" + cssj_year.ToString() + "' and fjrb not in (select distinct fjrb from Ffjrb) order by fjrb"); int fjrb_arg_sl = 0; if (DS_temp_0 != null && DS_temp_0.Tables[0].Rows.Count > 0) { fjrb_arg_sl = fjrb_arg_sl + DS_temp_0.Tables[0].Rows.Count; } if (DS_temp_1 != null && DS_temp_1.Tables[0].Rows.Count > 0) { fjrb_arg_sl = fjrb_arg_sl + DS_temp_1.Tables[0].Rows.Count; } if (fjrb_arg_sl > 0) { int i_0 = 0; string[] fjrb_arg = new string[fjrb_arg_sl]; if (DS_temp_0 != null && DS_temp_0.Tables[0].Rows.Count > 0) { for (i_0 = 0; i_0 < DS_temp_0.Tables[0].Rows.Count; i_0++) { fjrb_arg[i_0] = DS_temp_0.Tables[0].Rows[i_0]["fjrb"].ToString(); } } if (DS_temp_1 != null && DS_temp_1.Tables[0].Rows.Count > 0) { for (int j_0 = 1; j_0 < DS_temp_1.Tables[0].Rows.Count; j_0++) { fjrb_arg[j_0 + i_0] = DS_temp_1.Tables[0].Rows[j_0]["fjrb"].ToString(); } } sql_s = ""; //获得房类数量 get_result = fjrb_arg_sl; //string sql_s_0 = "insert into Fkfxsfx ("; string insert_cs = "yydh,qymc,krly"; string insert_value = "'" + yydh + "','" + qymc + "',''"; for (i_0 = 1; i_0 < fjrb_arg_sl + 1; i_0++) { insert_cs = insert_cs + ",fjrb_fs_" + i_0.ToString() + ",fjrb_fy_" + i_0.ToString(); insert_value = insert_value + ",'" + fjrb_arg[i_0 - 1] + "','" + fjrb_arg[i_0 - 1] + "'"; } insert_cs = insert_cs + ",hj_r_fs,hj_r_fy,hj_y_fs,hj_y_fy,hj_n_fs,hj_n_fy,pjczl,pjfj,pjbl,jcb,czy_temp"; insert_value = insert_value + ",'本日合计','本日合计','本月累计','本月累计','本年累计','本年累计','出租率','平均房价','占比','交叉比','" + czy + "'"; sql_s = "insert into F_kfxsfx (" + insert_cs + ") values (" + insert_value + ")"; B_Common.ExecuteSql(sql_s); DS_temp_0 = B_Common.GetList("select krly from Xkrly", "id>=0 order by order_asc,krly"); DS_temp_1 = B_Common.GetList("select distinct krly from VS_syxfmx_cz", "id>=0 and xfsj>='" + cssj_year.ToString() + "' and krly not in (select distinct krly from Xkrly) order by krly"); if (DS_temp_0 != null && DS_temp_0.Tables[0].Rows.Count > 0) { for (i_0 = 0; i_0 < DS_temp_0.Tables[0].Rows.Count; i_0++) { insert_value = "'" + yydh + "','" + qymc + "','" + DS_temp_0.Tables[0].Rows[i_0]["krly"].ToString() + "'"; for (int k_0 = 0; k_0 < fjrb_arg_sl * 2; k_0++) { insert_value = insert_value + ",'0'"; } insert_value = insert_value + ",'0','0','0','0','0','0','0%','0','0%','0','" + czy + "'"; sql_s = "insert into F_kfxsfx (" + insert_cs + ") values (" + insert_value + ")"; B_Common.ExecuteSql(sql_s); } } if (DS_temp_1 != null && DS_temp_1.Tables[0].Rows.Count > 0) { for (i_0 = 0; i_0 < DS_temp_1.Tables[0].Rows.Count; i_0++) { insert_value = "'" + yydh + "','" + qymc + "','" + DS_temp_1.Tables[0].Rows[i_0]["krly"].ToString() + "'"; for (int k_0 = 0; k_0 < fjrb_arg_sl * 2; k_0++) { insert_value = insert_value + ",'0'"; } insert_value = insert_value + ",'0','0','0','0','0','0','0%','0','0%','0','" + czy + "'"; sql_s = "insert into F_kfxsfx (" + insert_cs + ") values (" + insert_value + ")"; B_Common.ExecuteSql(sql_s); } } insert_value = "'" + yydh + "','" + qymc + "','" + "逾时" + "'"; for (int k_0 = 0; k_0 < fjrb_arg_sl * 2; k_0++) { insert_value = insert_value + ",'0'"; } insert_value = insert_value + ",'0','0','0','0','0','0','0%','0','0%','0','" + czy + "'"; sql_s = "insert into F_kfxsfx (" + insert_cs + ") values (" + insert_value + ")"; B_Common.ExecuteSql(sql_s); insert_value = "'" + yydh + "','" + qymc + "','" + "加床" + "'"; for (int k_0 = 0; k_0 < fjrb_arg_sl * 2; k_0++) { insert_value = insert_value + ",'0'"; } insert_value = insert_value + ",'0','0','0','0','0','0','0%','0','0%','0','" + czy + "'"; sql_s = "insert into F_kfxsfx (" + insert_cs + ") values (" + insert_value + ")"; B_Common.ExecuteSql(sql_s); insert_value = "'" + yydh + "','" + qymc + "','" + "本日合计" + "'"; for (int k_0 = 0; k_0 < fjrb_arg_sl * 2; k_0++) { insert_value = insert_value + ",'0'"; } insert_value = insert_value + ",'0','0','0','0','0','0','0%','0','0%','0','" + czy + "'"; sql_s = "insert into F_kfxsfx (" + insert_cs + ") values (" + insert_value + ")"; B_Common.ExecuteSql(sql_s); insert_value = "'" + yydh + "','" + qymc + "','" + "本月累计" + "'"; for (int k_0 = 0; k_0 < fjrb_arg_sl * 2; k_0++) { insert_value = insert_value + ",'0'"; } insert_value = insert_value + ",'0','0','0','0','0','0','0%','0','0%','0','" + czy + "'"; sql_s = "insert into F_kfxsfx (" + insert_cs + ") values (" + insert_value + ")"; B_Common.ExecuteSql(sql_s); insert_value = "'" + yydh + "','" + qymc + "','" + "本年累计" + "'"; for (int k_0 = 0; k_0 < fjrb_arg_sl * 2; k_0++) { insert_value = insert_value + ",'0'"; } insert_value = insert_value + ",'0','0','0','0','0','0','0%','0','0%','0','" + czy + "'"; sql_s = "insert into F_kfxsfx (" + insert_cs + ") values (" + insert_value + ")"; B_Common.ExecuteSql(sql_s); //修改数据 //能找到客人来源的. DS_temp = B_Common.GetList("select id,krly,hj_r_fs from F_kfxsfx", " yydh='" + yydh + "' and czy_temp='" + czy + "'"); if (DS_temp != null && DS_temp.Tables[0].Rows.Count > 0) { for (i_0 = 0; i_0 < DS_temp.Tables[0].Rows.Count; i_0++) { //排除选到设置进去的表头. if (DS_temp.Tables[0].Rows[i_0]["hj_r_fs"].ToString() != "本日合计" && DS_temp.Tables[0].Rows[i_0]["krly"].ToString() != "逾时" && DS_temp.Tables[0].Rows[i_0]["krly"].ToString() != "加床" && DS_temp.Tables[0].Rows[i_0]["krly"].ToString() != "本日合计" && DS_temp.Tables[0].Rows[i_0]["krly"].ToString() != "本月累计" && DS_temp.Tables[0].Rows[i_0]["krly"].ToString() != "本年累计") { update_contain(yydh, qymc, DS_temp, i_0, B_Common, DS_temp_0, table_name, cssj, jssj, fjrb_arg_sl, fjrb_arg, zfs, zyye, cssj_yf, cssj_year, "and (xfxm not in('" + Szwgl.common_zw.ff_jsbtfy + "','" + Szwgl.common_zw.ff_jsqtfy + "','" + Szwgl.common_zw.ff_jcfy + "')) and krly='" + DS_temp.Tables[0].Rows[i_0]["krly"].ToString() + "'"); //如果要分出单审的房费把这个启用,其余关闭 //update_contain(yydh, qymc, DS_temp, i_0, B_Common, DS_temp_0, table_name, cssj, jssj, fjrb_arg_sl, fjrb_arg, zfs, zyye, cssj_yf, cssj_year, "and (xfxm not in('" + Szwgl.common_zw.ff_jsbtfy + "','" + Szwgl.common_zw.ff_jsqtfy + "','" + Szwgl.common_zw.ff_sqff + "','" + Szwgl.common_zw.ff_jcfy + "')) and krly='" + DS_temp.Tables[0].Rows[i_0]["krly"].ToString() + "'"); } } } //逾时的 DS_temp = B_Common.GetList("select id,krly from F_kfxsfx", " yydh='" + yydh + "' and czy_temp='" + czy + "' and krly='" + "逾时" + "'"); if (DS_temp != null && DS_temp.Tables[0].Rows.Count > 0) { for (i_0 = 0; i_0 < DS_temp.Tables[0].Rows.Count; i_0++) { update_contain(yydh, qymc, DS_temp, i_0, B_Common, DS_temp_0, table_name, cssj, jssj, fjrb_arg_sl, fjrb_arg, zfs, zyye, cssj_yf, cssj_year, "and (xfxm in('" + Szwgl.common_zw.ff_jsbtfy + "','" + Szwgl.common_zw.ff_jsqtfy + "')) "); //如果要分出单审的房费把这个启用,其余关闭 //update_contain(yydh, qymc, DS_temp, i_0, B_Common, DS_temp_0, table_name, cssj, jssj, fjrb_arg_sl, fjrb_arg, zfs, zyye, cssj_yf, cssj_year, "and (xfxm in('" + Szwgl.common_zw.ff_jsbtfy + "','" + Szwgl.common_zw.ff_jsqtfy + "','" + Szwgl.common_zw.ff_sqff + "')) "); } } //加床的 DS_temp = B_Common.GetList("select id,krly from F_kfxsfx", " yydh='" + yydh + "' and czy_temp='" + czy + "' and krly='" + "加床" + "'"); if (DS_temp != null && DS_temp.Tables[0].Rows.Count > 0) { for (i_0 = 0; i_0 < DS_temp.Tables[0].Rows.Count; i_0++) { update_contain(yydh, qymc, DS_temp, i_0, B_Common, DS_temp_0, table_name, cssj, jssj, fjrb_arg_sl, fjrb_arg, zfs, zyye, cssj_yf, cssj_year, "and (xfxm in('" + Szwgl.common_zw.ff_jcfy + "')) "); } } //本日的 DS_temp = B_Common.GetList("select id,krly from F_kfxsfx", " yydh='" + yydh + "' and czy_temp='" + czy + "' and krly='" + "本日合计" + "'"); if (DS_temp != null && DS_temp.Tables[0].Rows.Count > 0) { for (i_0 = 0; i_0 < DS_temp.Tables[0].Rows.Count; i_0++) { update_contain(yydh, qymc, DS_temp, i_0, B_Common, DS_temp_0, table_name, cssj, jssj, fjrb_arg_sl, fjrb_arg, zfs, zyye, cssj_yf, cssj_year, " "); } } //update_contain_y_n //本月的 DS_temp = B_Common.GetList("select id,krly from F_kfxsfx", " yydh='" + yydh + "' and czy_temp='" + czy + "' and krly='" + "本月累计" + "'"); if (DS_temp != null && DS_temp.Tables[0].Rows.Count > 0) { for (i_0 = 0; i_0 < DS_temp.Tables[0].Rows.Count; i_0++) { update_contain_y_n(yydh, qymc, DS_temp, i_0, B_Common, DS_temp_0, table_name, cssj, jssj, fjrb_arg_sl, fjrb_arg, zfs, zyye, cssj_yf, cssj_year, " and (xfsj between '" + cssj_yf.ToString() + "' and '" + jssj.ToString() + "')"); } } //本年的 DS_temp = B_Common.GetList("select id,krly from F_kfxsfx", " yydh='" + yydh + "' and czy_temp='" + czy + "' and krly='" + "本年累计" + "'"); if (DS_temp != null && DS_temp.Tables[0].Rows.Count > 0) { for (i_0 = 0; i_0 < DS_temp.Tables[0].Rows.Count; i_0++) { update_contain_y_n(yydh, qymc, DS_temp, i_0, B_Common, DS_temp_0, table_name, cssj, jssj, fjrb_arg_sl, fjrb_arg, zfs, zyye, cssj_yf, cssj_year, " and (xfsj between '" + cssj_year.ToString() + "' and '" + jssj.ToString() + "')"); } } B_Common.ExecuteSql("update F_kfxsfx set krly='" + "其他未分类" + "' where krly='' and hj_r_fs<>'本日合计'");//DS_temp.Tables[0].Rows[i_0]["hj_r_fs"].ToString() != "本日合计" } DS_temp.Clear(); DS_temp.Dispose(); DS_temp_0.Clear(); DS_temp_0.Dispose(); DS_temp_1.Clear(); DS_temp_1.Dispose(); return(get_result); }