Browse Source

提交

master
学 赵 4 years ago
parent
commit
dd272187a2
  1. 48
      Controller/UniApiController.cs

48
Controller/UniApiController.cs

@ -15,53 +15,7 @@ namespace CK.SCP.Controller
{ {
public static class UniApiController public static class UniApiController
{ {
public static DataTable FindUniapi(string p_type, string p_billNum, string p_domain)
{
string sql = string.Empty;
switch (p_type)
{
case "xxqad_pod_det":
sql =
"SELECT * FROM[xxqad_pod_det] a inner join xxqad_ctrl b on a.xxqad_pod_seq = b.xxqad_seq where xxqad_domain = '{1}' and xxqad_pod_nbr in ({0}) order by xxqad_pod_nbr, b.xxqad_seq ";
break;
case "xxqad_prh_det":
sql = "SELECT * FROM[xxqad_prh_det] a inner join xxqad_ctrl b on a.xxqad_prh_seq = b.xxqad_seq where xxqad_domain = '{1}' and xxqad_prh_psnbr in ({0}) order by xxqad_prh_psnbr, b.xxqad_seq ";
break;
case "xxwms_rc1_det":
sql = "select * from xxwms_rc1_det a inner join xxwms_ctrl b on a.xxwms_rc_seq = b.xxwms_seq where xxwms_domain = '{1}' and xxwms_rc_nbr in ({0}) order by xxwms_rc_nbr, b.xxwms_seq";
break;
case "xxscm_tx_mstr":
sql = "select * from xxscm_tx_mstr a inner join xxscm_ctrl b on a.xxscm_tx_seq = b.xxscm_seq where xxscm_domain = '{1}' and xxscm_tx_nbr in ({0}) order by xxscm_tx_nbr, b.xxscm_seq";
break;
case "xxscm_inv_det":
sql = "select * from xxscm_inv_det a inner join xxscm_ctrl b on a.xxscm_inv_seq = b.xxscm_seq where xxscm_domain = '{1}' and xxscm_inv_nbr IN({0}) order by xxscm_inv_nbr,b.xxscm_seq";
break;
}
DataTable _dt = new DataTable();
var dbSetting = GlobalConfig.UniApiDatabase;
try
{
var strConn = EntitiesFactory.GetEfConnectionString(dbSetting);
SqlConnection conn = new System.Data.SqlClient.SqlConnection();
conn.ConnectionString = strConn;
if (conn.State != ConnectionState.Open)
{
conn.Open();
}
SqlCommand cmd = new SqlCommand();
cmd.Connection = conn;
cmd.CommandText = string.Format(sql, p_billNum, p_domain);
SqlDataAdapter adapter = new SqlDataAdapter(cmd);
adapter.Fill(_dt);
}
catch (Exception e)
{
}
return _dt;
}
public static void Get_TS_UNI_API_List(TS_UNI_API p_entity, Action<ResultObject<IQueryable<TS_UNI_API>>> p_action) public static void Get_TS_UNI_API_List(TS_UNI_API p_entity, Action<ResultObject<IQueryable<TS_UNI_API>>> p_action)
{ {
ResultObject<IQueryable<TS_UNI_API>> _ret = new ResultObject<IQueryable<TS_UNI_API>>(); ResultObject<IQueryable<TS_UNI_API>> _ret = new ResultObject<IQueryable<TS_UNI_API>>();

Loading…
Cancel
Save