yangle
2022-05-18 6d033fd71b507e99a1deb935847f7a0e400f13df
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
using System;
using System.Collections.Generic;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Http;
using WebAPI.Models;
using Newtonsoft.Json;
 
namespace WebAPI.Controllers.SCGL.日计划管理
{
    public class JIT_DayPlanPlatFormBillController : ApiController
    {
        private json objJsonResult = new json();
        public DataSet ds = new DataSet();
        public WebServer webserver = new WebServer();
        SQLHelper.ClsCN oCN = new SQLHelper.ClsCN();
        Sc_WorkBillSortBillMain omdelMian = new Sc_WorkBillSortBillMain();
 
        #region 生产日计划平台 查询
        [Route("JIT_DayPlanPlatFormBill/JIT_DayPlanPlatFormBillList")]
        [HttpGet]
        public object JIT_DayPlanPlatFormBillList(string sWhere,string user)
        {
            try
            {
                //查看权限
                if (!DBUtility.ClsPub.Security_Log("Sc_WorkBillSortBill_Query", 1, false, user))
                {
                    objJsonResult.code = "0";
                    objJsonResult.count = 0;
                    objJsonResult.Message = "无查看权限!";
                    objJsonResult.data = null;
                    return objJsonResult;
                }
 
                omdelMian = JsonConvert.DeserializeObject<Sc_WorkBillSortBillMain>(sWhere);
 
                ds = oCN.RunProcReturn($"exec h_p_JIT_Sc_WorkBillSortBill_Query '{omdelMian.HPlanBeginDate}',{(omdelMian.HProdORGID==null?0: omdelMian.HProdORGID)},'{omdelMian.HSeOrderBillNo}'" +
                    $",'{omdelMian.HPlanEndDate}',{omdelMian.HMaterID},'{omdelMian.HICMOBillNo}',{omdelMian.HWorkShopID}", "h_p_JIT_Sc_WorkBillSortBill_Query");
 
                objJsonResult.code = "1";
                objJsonResult.count = 1;
                objJsonResult.Message = "Sucess!";
                objJsonResult.data = ds.Tables[0];
                return objJsonResult;
            }
            catch (Exception e)
            {
                objJsonResult.code = "0";
                objJsonResult.count = 0;
                objJsonResult.Message = "Exception!" + e.ToString();
                objJsonResult.data = null;
                return objJsonResult;
            }
        }
        #endregion
    }
}