//{"Total":1,"Freezers":[{"id":1,"name":"001号冰箱","description":"001号冰箱","access":0,"subdivisions":4,"boxes":0,"barcode_tag":"7000000001","rfid_tag":"355AB1CBC000007000000001"}]} //获取冰箱结构 public static List<Fp_Model.Freezer> GetAll(Fp_Common.UnameAndPwd up) { Dictionary<string, string> dic = new Dictionary<string, string>(); dic.Add("username", up.UserName); dic.Add("password", up.PassWord); dic.Add("method", Fp_Common.FpMethod.freezers.ToString()); FpUtility.Fp_DAL.CallApi call = new FpUtility.Fp_DAL.CallApi(dic); List<Freezer> list = call.getdata<Freezer>("Freezers"); return list; }
public static List<Fp_Model.Sample_Group> GetAll(Fp_Common.UnameAndPwd up) { Dictionary<string, string> dic = new Dictionary<string, string>(); dic.Add("username", up.UserName); dic.Add("password", up.PassWord); dic.Add("method", Fp_Common.FpMethod.sample_groups.ToString()); FpUtility.Fp_DAL.CallApi call = new FpUtility.Fp_DAL.CallApi(dic); List<Fp_Model.Sample_Group> List = call.getdata<Fp_Model.Sample_Group>("SampleGroups"); return List; }
//{"Total":4,"Subdivisions":[{"id":2,"obj_id":2,"name":"层 1","access":0,"description":"层 1 Description","subdivisions":6,"boxes":0,"barcode_tag":"7000000002","rfid_tag":"355AB1CBC000007000000002"},{"id":51,"obj_id":51,"name":"层 2","access":0,"description":"层 2 Description","subdivisions":6,"boxes":0,"barcode_tag":"7000000051","rfid_tag":"355AB1CBC000007000000033"},{"id":100,"obj_id":100,"name":"层 3","access":0,"description":"层 3 Description","subdivisions":6,"boxes":0,"barcode_tag":"7000000100","rfid_tag":"355AB1CBC000007000000064"},{"id":149,"obj_id":149,"name":"层 4","access":0,"description":"层 4 Description","subdivisions":6,"boxes":0,"barcode_tag":"7000000149","rfid_tag":"355AB1CBC000007000000095"}]} public static List<Fp_Model.Subdivision> GetAll(Fp_Common.UnameAndPwd up,string id) { Dictionary<string, string> dic = new Dictionary<string, string>(); dic.Add("username", up.UserName); dic.Add("password", up.PassWord); dic.Add("method", Fp_Common.FpMethod.subdivisions.ToString()); dic.Add("id", id); FpUtility.Fp_DAL.CallApi call = new FpUtility.Fp_DAL.CallApi(dic); List<Fp_Model.Subdivision> List = call.getdata<Fp_Model.Subdivision>("Subdivisions"); return List; }
/// <summary> /// 获取系统里里面的样本组 /// </summary> /// <param name="up"></param> /// <returns></returns> public static List <Fp_Model.Sample_Group> GetAll(Fp_Common.UnameAndPwd up) { Dictionary <string, string> dic = new Dictionary <string, string>(); dic.Add("username", up.UserName); dic.Add("password", up.PassWord); dic.Add("method", Fp_Common.FpMethod.sample_groups.ToString()); FpUtility.Fp_DAL.CallApi call = new FpUtility.Fp_DAL.CallApi(dic); List <Fp_Model.Sample_Group> List = call.getdata <Fp_Model.Sample_Group>("SampleGroups"); return(List); }
public static List<Box> GetAll(Fp_Common.UnameAndPwd up, string id) { Dictionary<string, string> dic = new Dictionary<string, string>(); dic.Add("username", up.UserName); dic.Add("password", up.PassWord); dic.Add("method", Fp_Common.FpMethod.boxes.ToString()); dic.Add("id", id); dic.Add("show_empty", "true"); FpUtility.Fp_DAL.CallApi call = new FpUtility.Fp_DAL.CallApi(dic); List<Box> boxes = call.getdata<Box>("Boxes"); return boxes; }
//{"Total":1,"Freezers":[{"id":1,"name":"001号冰箱","description":"001号冰箱","access":0,"subdivisions":4,"boxes":0,"barcode_tag":"7000000001","rfid_tag":"355AB1CBC000007000000001"}]} //获取冰箱结构 /// <summary> /// 获取冰箱列表 /// </summary> /// <param name="up"></param> /// <returns></returns> public static List <Fp_Model.Freezer> GetAll(Fp_Common.UnameAndPwd up) { Dictionary <string, string> dic = new Dictionary <string, string>(); dic.Add("username", up.UserName); dic.Add("password", up.PassWord); dic.Add("method", Fp_Common.FpMethod.freezers.ToString()); FpUtility.Fp_DAL.CallApi call = new FpUtility.Fp_DAL.CallApi(dic); List <Freezer> list = call.getdata <Freezer>("Freezers"); return(list); }
/// <summary> /// 根据ID获样本盒 /// </summary> /// <param name="up"></param> /// <param name="id"></param> /// <returns></returns> public static List <Box> GetAllBoxInfo(Fp_Common.UnameAndPwd up, string id) { Dictionary <string, string> dic = new Dictionary <string, string>(); dic.Add("username", up.UserName); dic.Add("password", up.PassWord); dic.Add("method", Fp_Common.FpMethod.box_info.ToString()); dic.Add("show_empty", "true"); FpUtility.Fp_DAL.CallApi call = new FpUtility.Fp_DAL.CallApi(dic); List <Box> Box = call.getdata <Box>("box_info"); return(Box); }
/// <summary> /// 修改盒子视图 /// </summary> /// <param name="up"></param> /// <returns></returns> public static List <Box> Get_update_box_view(Fp_Common.UnameAndPwd up) { Dictionary <string, string> dic = new Dictionary <string, string>(); dic.Add("username", up.UserName); dic.Add("password", up.PassWord); dic.Add("method", Fp_Common.FpMethod.update_box_view.ToString()); dic.Add("show_empty", "true"); FpUtility.Fp_DAL.CallApi call = new FpUtility.Fp_DAL.CallApi(dic); List <Box> BoxType = call.getdata <Box>("update_box_view"); return(BoxType); }
//{"Total":4,"Subdivisions":[{"id":2,"obj_id":2,"name":"层 1","access":0,"description":"层 1 Description","subdivisions":6,"boxes":0,"barcode_tag":"7000000002","rfid_tag":"355AB1CBC000007000000002"},{"id":51,"obj_id":51,"name":"层 2","access":0,"description":"层 2 Description","subdivisions":6,"boxes":0,"barcode_tag":"7000000051","rfid_tag":"355AB1CBC000007000000033"},{"id":100,"obj_id":100,"name":"层 3","access":0,"description":"层 3 Description","subdivisions":6,"boxes":0,"barcode_tag":"7000000100","rfid_tag":"355AB1CBC000007000000064"},{"id":149,"obj_id":149,"name":"层 4","access":0,"description":"层 4 Description","subdivisions":6,"boxes":0,"barcode_tag":"7000000149","rfid_tag":"355AB1CBC000007000000095"}]} /// <summary> /// 根据样本ID返回样本的位置信息 /// </summary> /// <param name="up"></param> /// <param name="id"></param> /// <returns></returns> public static List <Fp_Model.Subdivision> GetAll(Fp_Common.UnameAndPwd up, string id) { Dictionary <string, string> dic = new Dictionary <string, string>(); dic.Add("username", up.UserName); dic.Add("password", up.PassWord); dic.Add("method", Fp_Common.FpMethod.subdivisions.ToString()); dic.Add("id", id); FpUtility.Fp_DAL.CallApi call = new FpUtility.Fp_DAL.CallApi(dic); List <Fp_Model.Subdivision> List = call.getdata <Fp_Model.Subdivision>("Subdivisions"); return(List); }
/// <summary> /// 查询指定冰箱指定位置是否存在符合条件的盒子 /// </summary> /// <param name="up">登陆账号</param> /// <param name="space">所需空间</param> /// <param name="freezer_name">冰箱名称</param> /// <returns></returns> public static string get_perfect_box(Fp_Common.UnameAndPwd up, string space, string freezer_name) { string resultStr = string.Empty; Dictionary <string, string> dic = new Dictionary <string, string>(); dic.Add("username", up.UserName); dic.Add("password", up.PassWord); dic.Add("method", Fp_Common.FpMethod.get_perfect_box.ToString()); dic.Add("freezer_name", freezer_name); dic.Add("space", space); FpUtility.Fp_DAL.CallApi call = new FpUtility.Fp_DAL.CallApi(dic); resultStr = call.GetData(); return(resultStr); }
/// 查询指定冰箱指定位置是否存在符合条件的盒子 public static string get_perfect_box(Fp_Common.UnameAndPwd up, string space, string freezer_name) { string resultStr = string.Empty; Dictionary<string, string> dic = new Dictionary<string, string>(); dic.Add("username", up.UserName); dic.Add("password", up.PassWord); dic.Add("method", Fp_Common.FpMethod.get_perfect_box.ToString()); dic.Add("freezer_name", freezer_name); dic.Add("space", space); FpUtility.Fp_DAL.CallApi call = new FpUtility.Fp_DAL.CallApi(dic); resultStr = call.GetData(); return resultStr; //暂时如此,直接返回查询之后的结果,能不能查到得到都返回,后期需要将返回结果解析之后返回 //http://192.168.183.130/api?username=admin&password=123456&method=get_perfect_box&freezer_name=tem->admin->06&space=8 //{"success":true,"box_id":1351,"location":"tem->admin->06->02->1"} }
/// <summary> /// 查询指定冰箱指定位置是否存在符合条件的盒子 /// </summary> /// <param name="up">登陆账号</param> /// <param name="space">所需空间</param> /// <param name="freezer_name">冰箱名称</param> /// <returns></returns> public static string get_perfect_box(Fp_Common.UnameAndPwd up, string space, string freezer_name) { string resultStr = string.Empty; Dictionary <string, string> dic = new Dictionary <string, string>(); dic.Add("username", up.UserName); dic.Add("password", up.PassWord); dic.Add("method", Fp_Common.FpMethod.get_perfect_box.ToString()); dic.Add("freezer_name", freezer_name); dic.Add("space", space); FpUtility.Fp_DAL.CallApi call = new FpUtility.Fp_DAL.CallApi(dic); resultStr = call.GetData(); return(resultStr); //暂时如此,直接返回查询之后的结果,能不能查到得到都返回,后期需要将返回结果解析之后返回 //http://192.168.183.130/api?username=admin&password=123456&method=get_perfect_box&freezer_name=tem->admin->06&space=8 //{"success":true,"box_id":1351,"location":"tem->admin->06->02->1"} }
private static string ImportTestDataToFp(Fp_Common.UnameAndPwd up, Dictionary<string, string> jsonDic) { string result = string.Empty; Dictionary<string, string> dic = new Dictionary<string, string>(); dic.Add("username", up.UserName); dic.Add("password", up.PassWord); dic.Add("method", Fp_Common.FpMethod.import_tests.ToString()); if (jsonDic != null && jsonDic.Count > 0) { foreach (KeyValuePair<string, string> item in jsonDic) { dic.Add(item.Key, item.Value); } } FpUtility.Fp_DAL.CallApi call = new FpUtility.Fp_DAL.CallApi(dic); result = call.PostData(); return result; }
private static string ImportTestDataToFp(Fp_Common.UnameAndPwd up, Dictionary <string, string> jsonDic) { string result = string.Empty; Dictionary <string, string> dic = new Dictionary <string, string>(); dic.Add("username", up.UserName); dic.Add("password", up.PassWord); dic.Add("method", Fp_Common.FpMethod.import_tests.ToString()); if (jsonDic != null && jsonDic.Count > 0) { foreach (KeyValuePair <string, string> item in jsonDic) { dic.Add(item.Key, item.Value); } } FpUtility.Fp_DAL.CallApi call = new FpUtility.Fp_DAL.CallApi(dic); result = call.PostData(); return(result); }