ch
2021-03-25 aae6a1a9df5b1860513f6caadc8cfd7d854c2862
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
using Newtonsoft.Json.Linq;
using System;
using System.Collections.Generic;
using System.Data;
using System.Web.Http;
using WebAPI.Models;
namespace WebAPI.Controllers
{
    /**
     * 找货单单
     */
    public class Sc_CheckToolsRepairWorkBillController : ApiController
    {
        private json objJsonResult = new json();
        public DataSet ds = new DataSet();
        public WebServer webserver = new WebServer();
 
        /// <summary>
        /// 根据包装单 返回此包装单内的相关信息
        /// </summary>
        /// <returns></returns>
 
        /// <summary>
        /// 上下架单列表
        /// </summary>
        /// <returns></returns>
        [Route("Sc_CheckToolsRepair/GetCheckToolsRepairWorkBillList")]
        [HttpGet]
        public object GetCheckToolsRepairWorkBillList(string sWhere)
        {
            try
            {
                
                    ds = Sc_CheckToolsRepairWorkBillList_s(sWhere);
                if (ds == null || ds.Tables[0].Rows.Count <= 0)
                {
                    objJsonResult.code = "0";
                    objJsonResult.count = 0;
                    objJsonResult.Message = "没有返回任何记录!";
                    objJsonResult.data = null;
                    return objJsonResult;
                }
                else
                {
                    objJsonResult.code = "1";
                    objJsonResult.count = 1;
                    objJsonResult.Message = "返回记录成功!";
                    objJsonResult.data = ds.Tables[0];
                    return objJsonResult;
                }
            }
            catch (Exception ex)
            {
                objJsonResult.code = "0";
                objJsonResult.count = 0;
                objJsonResult.Message = "没有返回任何记录!" + ex.ToString();
                objJsonResult.data = null;
                return objJsonResult;
            }
        }
 
        #region sql语句
 
      
        //上架归还单列表
        public static DataSet Sc_CheckToolsRepairWorkBillList_s(string sWhere)
        {
            return new SQLHelper.ClsCN().RunProcReturn("select * from h_v_Sc_CheckToolsRepairWorkBillList ", "h_v_Sc_CheckToolsRepairWorkBillList");
        }
 
        //测试专用接口
        [Route("LookingFor/Test")]
        [HttpGet]
        public object Test(string HbillNo)//h_p_Xs_SellOutFindSP
        {
            DataSet ds;
            ds = new SQLHelper.ClsCN().RunProcReturn("EXEC h_p_Xs_SellOutFindSP '" + HbillNo + "'", "h_p_Xs_SellOutFindSP");
 
            if (Pub_Class.ClsPub.isLong(ds.Tables[0].Rows.Count) >= 0 )
            {
                objJsonResult.code = "1";
                objJsonResult.count = 1;
                objJsonResult.Message = "true!";
                objJsonResult.data = ds.Tables[0];//ds.Tables[0].Rows[1][0]
                return objJsonResult;
            }
            else
            {
                objJsonResult.code = "0";
                objJsonResult.count = 0;
                objJsonResult.Message = "false!";
                objJsonResult.data = null;
                return objJsonResult;
            }
        }
 
 
 
        #endregion
 
    }
}