zzr99
2022-05-06 65253da4cbb0ff0dd4a4d69b8b36360e48428398
Merge branch 'master' of http://101.37.171.70:10101/r/MES-WEB-API
1 文件已复制
2个文件已修改
3 文件已重命名
2个文件已添加
423 ■■■■■ 已修改文件
WebAPI/Controllers/SCGL/日计划管理/JIT_Cg_PODemandPlanBillController.cs 34 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebAPI/Controllers/SCGL/日计划管理/Sc_WorkBillSortBillController.cs 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebAPI/Controllers/SCGL/日计划管理/Sc_WorkDemandPlanBillController.cs 327 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebAPI/Models/JIT_Cg_PODemandPlanBillMain.cs 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebAPI/Models/JIT_Cg_PODemandPlanBillSub.cs 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebAPI/Models/Sc_WorkDemandPlanBillMain.cs 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebAPI/Models/Sc_WorkDemandPlanBillSub.cs 40 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebAPI/WebAPI.csproj 10 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebAPI/Controllers/SCGL/Èռƻ®¹ÜÀí/JIT_Cg_PODemandPlanBillController.cs
File was renamed from WebAPI/Controllers/SCGL/Èռƻ®¹ÜÀí/Cg_PODemandPlanBillController.cs
@@ -9,17 +9,17 @@
namespace WebAPI.Controllers.SCGL
{
    public class Cg_PODemandPlanBillController : ApiController
    public class JIT_Cg_PODemandPlanBillController : ApiController
    {
        private json objJsonResult = new json();
        public DataSet ds = new DataSet();
        public WebServer webserver = new WebServer();
        SQLHelper.ClsCN oCN = new SQLHelper.ClsCN();
        Cg_PODemandPlanBillMain omdelMian = new Cg_PODemandPlanBillMain();
        List<Cg_PODemandPlanBillSub> omodelsub = new List<Cg_PODemandPlanBillSub>();
        JIT_Cg_PODemandPlanBillMain omdelMian = new JIT_Cg_PODemandPlanBillMain();
        List<JIT_Cg_PODemandPlanBillSub> omodelsub = new List<JIT_Cg_PODemandPlanBillSub>();
        #region ææ–™è®¡åˆ’单 åˆ—表
        [Route("Cg_PODemandPlanBill/Cg_PODemandPlanBillList")]
        [Route("JIT_Cg_PODemandPlanBill/JIT_Cg_PODemandPlanBillList")]
        [HttpGet]
        public object Cg_PODemandPlanBillList(string sWhere, string user)
        {
@@ -55,7 +55,7 @@
        #endregion
        #region ææ–™è®¡åˆ’单  æ·»åŠ /修改
        [Route("Cg_PODemandPlanBill/AddPODemandPlanBillList")]
        [Route("JIT_Cg_PODemandPlanBill/AddPODemandPlanBillList")]
        [HttpPost]
        public object AddPODemandPlanBillList([FromBody] JObject sMainSub)
        {
@@ -101,14 +101,14 @@
                    return objJsonResult;
                }
                omdelMian = Newtonsoft.Json.JsonConvert.DeserializeObject<Cg_PODemandPlanBillMain>(msg2);
                omdelMian = Newtonsoft.Json.JsonConvert.DeserializeObject<JIT_Cg_PODemandPlanBillMain>(msg2);
                string BillType = "4608";
                if (OperationType == 1)//新增
                {
                    //主表
                    oCN.RunProc("insert into Cg_PODemandPlanBillMain(HInterID,HBillNo,HYear,HPeriod,HBillType" +
                    oCN.RunProc("insert into JIT_Cg_PODemandPlanBillMain(HInterID,HBillNo,HYear,HPeriod,HBillType" +
                                 ",HBillSubType,HDate,HBillStatus,HMaker,HMakeDate" +
                                 ",HSubORGID ,HAddress,HPURCHASEORGID,HSupplierID ,HSettleCurrId" +
                                 ",HRemark,HExplanation)" +
@@ -120,7 +120,7 @@
                else if (OperationType == 3)
                {
                    //修改
                    oCN.RunProc($"update  Cg_PODemandPlanBillMain set HUpDater='{omdelMian.HMaker}',HUpDateDate=GETDATE()" +
                    oCN.RunProc($"update  JIT_Cg_PODemandPlanBillMain set HDate='{omdelMian.HDate}',HUpDater='{omdelMian.HMaker}',HUpDateDate=GETDATE()" +
                                $",HSubORGID={omdelMian.HSubORGID},HAddress='{omdelMian.HAddress}',HPURCHASEORGID={omdelMian.HPURCHASEORGID}" +
                                $",HSupplierID={omdelMian.HSupplierID},HSettleCurrId={omdelMian.HSettleCurrId}" +
                                $",HRemark='{omdelMian.HRemark}',HExplanation='{omdelMian.HExplanation}' where HInterID={omdelMian.HInterID}");
@@ -159,16 +159,16 @@
                //获取表格数据
                ds = oCN.RunProcReturn($"select * from  h_v_JIT_Cg_PODemandPlanBillList where å•据号='{omdelMian.HBillNo}'", "h_v_JIT_Cg_PODemandPlanBillList");
                //删除子表
                oCN.RunProc("delete from Cg_PODemandPlanBillSub where HInterID='" + omdelMian.HInterID.ToString() + "' and HEntryID='" + hentryid + "'");
                oCN.RunProc("delete from JIT_Cg_PODemandPlanBillSub where HInterID='" + omdelMian.HInterID.ToString() + "' and HEntryID='" + hentryid + "'");
            }
            omodelsub = Newtonsoft.Json.JsonConvert.DeserializeObject<List<Cg_PODemandPlanBillSub>>(msg3);
            omodelsub = Newtonsoft.Json.JsonConvert.DeserializeObject<List<JIT_Cg_PODemandPlanBillSub>>(msg3);
            int i = 1;
            //插入子表
            foreach (Models.Cg_PODemandPlanBillSub oSub in omodelsub)
            foreach (Models.JIT_Cg_PODemandPlanBillSub oSub in omodelsub)
            {
                oCN.RunProc("insert into Cg_PODemandPlanBillSub(HInterID,HEntryID,HLaterReason,HMaterID,HMaterName" +
                oCN.RunProc("insert into JIT_Cg_PODemandPlanBillSub(HInterID,HEntryID,HLaterReason,HMaterID,HMaterName" +
                            ", HMaterModel, HUnitID, HErpClsID, HQty, HRemark" +
                            ", HPURCHASEORGID, HStatus, HFixleadTime, HDayPlanBillNo, HSourceInterID" +
                            ", HSourceEntryID, HSourceBillNo, HSourceBillType, HWorkShopID, HDayPlanDate" +
@@ -199,7 +199,7 @@
        #endregion
        #region ææ–™è®¡åˆ’单 åˆ é™¤
        [Route("Cg_PODemandPlanBill/DelPODemandPlanBillList")]
        [Route("JIT_Cg_PODemandPlanBill/DelPODemandPlanBillList")]
        [HttpGet]
        public object DelPODemandPlanBillList(string HInterID, string HEntryID, string User)
        {
@@ -232,9 +232,9 @@
                    if (ds.Tables[0].Rows.Count == 1)
                    {
                        oCN.RunProc($"delete from Cg_PODemandPlanBillMain where HInterID={HInterID}");
                        oCN.RunProc($"delete from JIT_Cg_PODemandPlanBillMain where HInterID={HInterID}");
                    }
                    oCN.RunProc($"delete from Cg_PODemandPlanBillSub where HInterID={HInterID} and HEntryID={HEntryID}");
                    oCN.RunProc($"delete from JIT_Cg_PODemandPlanBillSub where HInterID={HInterID} and HEntryID={HEntryID}");
                    oCN.Commit();//结束事务
@@ -264,7 +264,7 @@
        #endregion
        #region ææ–™è®¡åˆ’单 å…³é—­
        [Route("Cg_PODemandPlanBill/ClosePODemandPlanBillList")]
        [Route("JIT_Cg_PODemandPlanBill/ClosePODemandPlanBillList")]
        [HttpGet]
        public object ClosePODemandPlanBillList(string HInterID, string User)
        {
@@ -295,7 +295,7 @@
                    oCN.BeginTran();//开启事务
                    oCN.RunProc($"update Cg_PODemandPlanBillMain set HBillStatus=3,HCloseMan='{User}',HCloseDate=getdate()   where HInterID={HInterID}");
                    oCN.RunProc($"update JIT_Cg_PODemandPlanBillMain set HBillStatus=3,HCloseMan='{User}',HCloseDate=getdate()   where HInterID={HInterID}");
                    oCN.Commit();//结束事务
WebAPI/Controllers/SCGL/Èռƻ®¹ÜÀí/Sc_WorkBillSortBillController.cs
@@ -138,7 +138,7 @@
                else if (OperationType == 3)
                {
                    //修改
                    oCN.RunProc($"update Sc_WorkBillSortBillMain set HUpDater='{omdelMian.HMaker}',HUpDateDate=GETDATE()" +
                    oCN.RunProc($"update Sc_WorkBillSortBillMain set HDate='{omdelMian.HDate}',HUpDater='{omdelMian.HMaker}',HUpDateDate=GETDATE()" +
                                  $", HRemark='{omdelMian.HRemark}', HPrintQty={(omdelMian.HPrintQty == null ? 0 : omdelMian.HPrintQty)}" +
                                  $", HDeptID={omdelMian.HDeptID}, HSeOrderBillNo='{omdelMian.HSeOrderBillNo}', HSourceQty= {(omdelMian.HSourceQty == null ? 0 : omdelMian.HSourceQty)}" +
                                  $", HInStockQty={(omdelMian.HInStockQty == null ? 0 : omdelMian.HInStockQty)}, HMaterID={omdelMian.HMaterID}" +
WebAPI/Controllers/SCGL/Èռƻ®¹ÜÀí/Sc_WorkDemandPlanBillController.cs
New file
@@ -0,0 +1,327 @@
using Newtonsoft.Json.Linq;
using System;
using System.Collections.Generic;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Http;
using WebAPI.Models;
namespace WebAPI.Controllers.SCGL.日计划管理
{
    public class Sc_WorkDemandPlanBillController : ApiController
    {
        private json objJsonResult = new json();
        public DataSet ds = new DataSet();
        public WebServer webserver = new WebServer();
        SQLHelper.ClsCN oCN = new SQLHelper.ClsCN();
        Sc_WorkDemandPlanBillMain omdelMian = new Sc_WorkDemandPlanBillMain();
        List<Sc_WorkDemandPlanBillSub> omodelsub = new List<Sc_WorkDemandPlanBillSub>();
        #region è¦æ–™è®¡åˆ’单 åˆ—表
        [Route("Sc_WorkDemandPlanBill/Sc_WorkDemandPlanBillList")]
        [HttpGet]
        public object Sc_WorkDemandPlanBillList(string sWhere, string user)
        {
            try
            {
                //查看权限
                if (!DBUtility.ClsPub.Security_Log("Sc_WorkDemandPlanBill_Query", 1, false, user))
                {
                    objJsonResult.code = "0";
                    objJsonResult.count = 0;
                    objJsonResult.Message = "无查看权限!";
                    objJsonResult.data = null;
                    return objJsonResult;
                }
                ds = oCN.RunProcReturn("select * from  h_v_JIT_Sc_WorkDemandPlanBillList where 1=1" + sWhere + "order by hmainid desc ", "h_v_JIT_Sc_WorkDemandPlanBillList");
                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
        #region è¦æ–™è®¡åˆ’单  æ·»åŠ /修改
        [Route("Sc_WorkDemandPlanBill/AddWorkDemandPlanBillList")]
        [HttpPost]
        public object AddWorkDemandPlanBillList([FromBody] JObject sMainSub)
        {
            var _value = sMainSub["sMainSub"].ToString();
            string msg1 = _value.ToString();
            oCN.BeginTran();
            //保存主表
            objJsonResult = AddBillMain(msg1);
            if (objJsonResult.code == "0")
            {
                oCN.RollBack();
                objJsonResult.code = "0";
                objJsonResult.count = 0;
                objJsonResult.Message = objJsonResult.Message;
                objJsonResult.data = null;
                return objJsonResult;
            }
            oCN.Commit();
            objJsonResult.code = "1";
            objJsonResult.count = 1;
            objJsonResult.Message = "新增单据成功!";
            objJsonResult.data = null;
            return objJsonResult;
        }
        public json AddBillMain(string msg1)
        {
            string[] sArray = msg1.Split(new string[] { ";" }, StringSplitOptions.RemoveEmptyEntries);
            string msg2 = sArray[0].ToString();
            string msg3 = sArray[1].ToString();
            int hentryid = int.Parse(sArray[2].ToString());//子表的顺序id
            int OperationType = int.Parse(sArray[3].ToString());//数据类型 1添加 3修改
            string user = sArray[4].ToString();
            try
            {
                if (!DBUtility.ClsPub.Security_Log("Cg_PODemandPlanBill_Edit", 1, false, user))
                {
                    objJsonResult.code = "0";
                    objJsonResult.count = 0;
                    objJsonResult.Message = "无保存权限!";
                    objJsonResult.data = null;
                    return objJsonResult;
                }
                omdelMian = Newtonsoft.Json.JsonConvert.DeserializeObject<Sc_WorkDemandPlanBillMain>(msg2);
                string BillType = "4609";
                if (OperationType == 1)//新增
                {
                    //主表
                    oCN.RunProc("insert into Sc_WorkDemandPlanBillMain(HInterID,HBillNo,HYear,HPeriod,HBillType" +
                                ", HBillSubType, HDate, HBillStatus, HMaker, HMakeDate" +
                                ", HProdORGID, HAddress, HDeptID, HSettleCurrId" +
                                ", HRemark, HExplanation)" +
                                $" values({omdelMian.HInterID}, '{omdelMian.HBillNo}', {DateTime.Now.Year}, {DateTime.Now.Month}, '{BillType}'" +
                                $", '{BillType}','{omdelMian.HDate}', 1, '{omdelMian.HMaker}', '{omdelMian.HMakeDate}'" +
                                $", {omdelMian.HProdORGID}, '{omdelMian.HAddress}', {omdelMian.HDeptID}, {omdelMian.HSettleCurrId}" +
                                $", '{omdelMian.HRemark}', '{omdelMian.HExplanation}')");
                }
                else if (OperationType == 3)
                {
                    //修改
                    oCN.RunProc($"update  Sc_WorkDemandPlanBillMain set HDate='{omdelMian.HDate}',HUpDater='{omdelMian.HMaker}',HUpDateDate=GETDATE()" +
                                $",HProdORGID={omdelMian.HProdORGID},HAddress='{omdelMian.HAddress}',HDeptID={omdelMian.HDeptID}" +
                                $",HSettleCurrId={omdelMian.HSettleCurrId},HRemark='{omdelMian.HRemark}',HExplanation='{omdelMian.HExplanation}'" +
                                $" where HInterID={omdelMian.HInterID}");
                }
                //保存子表
                objJsonResult = AddBillSub(msg3, hentryid);
                if (objJsonResult.code == "0")
                {
                    objJsonResult.code = "0";
                    objJsonResult.count = 0;
                    objJsonResult.Message = objJsonResult.Message;
                    objJsonResult.data = null;
                    return objJsonResult;
                }
                objJsonResult.code = "1";
                objJsonResult.count = 1;
                objJsonResult.Message = null;
                objJsonResult.data = null;
                return objJsonResult;
            }
            catch (Exception e)
            {
                objJsonResult.code = "0";
                objJsonResult.count = 0;
                objJsonResult.Message = "Exception!" + e.ToString();
                objJsonResult.data = null;
                return objJsonResult;
            }
        }
        public json AddBillSub(string msg3, int hentryid)
        {
            if (hentryid != -1)
            {
                //获取表格数据
                ds = oCN.RunProcReturn($"select * from  h_v_JIT_Sc_WorkDemandPlanBillList where å•据号='{omdelMian.HBillNo}'", "h_v_JIT_Sc_WorkDemandPlanBillList");
                //删除子表
                oCN.RunProc("delete from Sc_WorkDemandPlanBillSub where HInterID='" + omdelMian.HInterID.ToString() + "' and HEntryID='" + hentryid + "'");
            }
            omodelsub = Newtonsoft.Json.JsonConvert.DeserializeObject<List<Sc_WorkDemandPlanBillSub>>(msg3);
            int i = 1;
            //插入子表
            foreach (Models.Sc_WorkDemandPlanBillSub oSub in omodelsub)
            {
                oCN.RunProc("insert into Sc_WorkDemandPlanBillSub(HInterID,HEntryID,HLaterReason,HMaterID,HMaterName" +
                            ", HMaterModel, HUnitID, HErpClsID, HQty, HRemark" +
                            ", HProdORGID, HStatus, HFixleadTime, HSourceInterID" +
                            ", HSourceEntryID, HSourceBillNo, HSourceBillType, HDayPlanDate" +
                            ", HRelationQty, HICMOInterID, HICMOEntryID, HICMOBillSEQ, HCloseMan" +
                            ", HEntryCloseDate, HCloseTypeSub, HReciveQty, HCloseStatus, HRemoveQty" +
                            ", HSeOrderBillNo, HUnReciveQty, HICMOBillDate, HICMOBillDeliveryDate, HICMOBillRemark" +
                            ", HICMOBillNote,HICMOEmpID)" +
                            $"values({omdelMian.HInterID}, '{(hentryid == -1 ? i : omodelsub.Count == 1 ? hentryid : i == 1 ? hentryid : (i + ds.Tables[0].Rows.Count - 1))}', '{oSub.HLaterReason}', {(oSub.HMaterID==null?0: oSub.HMaterID)}, '{oSub.HMaterName}'" +
                            $", '{oSub.HMaterModel}',{(oSub.HUnitID == null ? 0: oSub.HUnitID)}, '{oSub.HErpClsID}',{(oSub.HQty == null ? 0: oSub.HQty)}, '{oSub.HRemark}'" +
                            $",{(oSub.HProdORGID == null ? 0: oSub.HProdORGID)}, '{oSub.HStatus}',{(oSub.HFixleadTime == null ? 0: oSub.HFixleadTime)},{oSub.HSourceInterID}" +
                            $",{oSub.HSourceEntryID}, '{oSub.HSourceBillNo}', '{oSub.HSourceBillType}','{oSub.HDayPlanDate}'" +
                            $",{oSub.HRelationQty},{(oSub.HICMOInterID == null ? 0: oSub.HICMOInterID)},{(oSub.HICMOEntryID == null ? 0: oSub.HICMOEntryID)},{(oSub.HICMOBillSEQ == null ? 0: oSub.HICMOBillSEQ)}, '{oSub.HCloseMan}'" +
                            $", '{oSub.HEntryCloseDate}', '{(oSub.HCloseTypeSub == false ? 0 : 1)}',{(oSub.HReciveQty == null ? 0: oSub.HReciveQty)}, '{(oSub.HCloseStatus == false ? 0 : 1)}',{(oSub.HRemoveQty == null ? 0: oSub.HRemoveQty)}" +
                            $", '{oSub.HSeOrderBillNo}',{(oSub.HUnReciveQty == null ? 0: oSub.HUnReciveQty)}, '{oSub.HICMOBillDate}','{oSub.HICMOBillDeliveryDate}', '{oSub.HICMOBillRemark}', " +
                            $"'{oSub.HICMOBillNote}',{(oSub.HICMOEmpID == null ? 0 : oSub.HICMOEmpID)})");
                i++;
            }
            objJsonResult.code = "1";
            objJsonResult.count = 1;
            objJsonResult.Message = null;
            objJsonResult.data = null;
            return objJsonResult;
        }
        #endregion
        #region è¦æ–™è®¡åˆ’单 åˆ é™¤
        [Route("Sc_WorkDemandPlanBill/DelWorkDemandPlanBillList")]
        [HttpGet]
        public object DelWorkDemandPlanBillList(string HInterID, string HEntryID, string User)
        {
            try
            {
                //删除权限
                if (!DBUtility.ClsPub.Security_Log_second("Sc_WorkDemandPlanBill_Drop", 1, false, User))
                {
                    objJsonResult.code = "0";
                    objJsonResult.count = 0;
                    objJsonResult.Message = "无权限删除!";
                    objJsonResult.data = null;
                    return objJsonResult;
                }
                ds = oCN.RunProcReturn("select * from h_v_JIT_Sc_WorkDemandPlanBillList where 1=1 and hmainid=" + HInterID, "h_v_JIT_Sc_WorkDemandPlanBillList");
                if (ds.Tables[0].Rows.Count > 0)
                {
                    if (ds.Tables[0].Rows[0]["单据状态"].ToString() != "1")
                    {
                        objJsonResult.code = "0";
                        objJsonResult.count = 0;
                        objJsonResult.Message = "当前单据不能删除!";
                        objJsonResult.data = null;
                        return objJsonResult;
                    }
                    oCN.BeginTran();//开启事务
                    if (ds.Tables[0].Rows.Count == 1)
                    {
                        oCN.RunProc($"delete from Sc_WorkDemandPlanBillMain where HInterID={HInterID}");
                    }
                    oCN.RunProc($"delete from Sc_WorkDemandPlanBillSub where HInterID={HInterID} and HEntryID={HEntryID}");
                    oCN.Commit();//结束事务
                    objJsonResult.code = "1";
                    objJsonResult.count = 1;
                    objJsonResult.Message = "删除成功!";
                    objJsonResult.data = null;
                    return objJsonResult;
                }
                objJsonResult.code = "0";
                objJsonResult.count = 0;
                objJsonResult.Message = "当前单据不存在,无法删除!";
                objJsonResult.data = null;
                return objJsonResult;
            }
            catch (Exception e)
            {
                oCN.RollBack();//回滚事务
                objJsonResult.code = "0";
                objJsonResult.count = 0;
                objJsonResult.Message = e.ToString();
                objJsonResult.data = null;
                return objJsonResult;
            }
        }
        #endregion
        #region ææ–™è®¡åˆ’单 å…³é—­
        [Route("Sc_WorkDemandPlanBill/CloseWorkDemandPlanBillList")]
        [HttpGet]
        public object CloseWorkDemandPlanBillList(string HInterID, string User)
        {
            try
            {
                //关闭权限
                if (!DBUtility.ClsPub.Security_Log_second("Sc_WorkDemandPlanBill_Close", 1, false, User))
                {
                    objJsonResult.code = "0";
                    objJsonResult.count = 0;
                    objJsonResult.Message = "无权限关闭!";
                    objJsonResult.data = null;
                    return objJsonResult;
                }
                ds = oCN.RunProcReturn("select * from h_v_JIT_Sc_WorkDemandPlanBillList where 1=1 and hmainid=" + HInterID, "h_v_JIT_Sc_WorkDemandPlanBillList");
                if (ds.Tables[0].Rows.Count > 0)
                {
                    if (ds.Tables[0].Rows[0]["单据状态"].ToString() == "2")
                    {
                        objJsonResult.code = "0";
                        objJsonResult.count = 0;
                        objJsonResult.Message = "当前单据正在审核,不能关闭!";
                        objJsonResult.data = null;
                        return objJsonResult;
                    }
                    oCN.BeginTran();//开启事务
                    oCN.RunProc($"update Sc_WorkDemandPlanBillMain set HBillStatus=3,HCloseMan='{User}',HCloseDate=getdate()   where HInterID={HInterID}");
                    oCN.Commit();//结束事务
                    objJsonResult.code = "1";
                    objJsonResult.count = 1;
                    objJsonResult.Message = "关闭成功!";
                    objJsonResult.data = null;
                    return objJsonResult;
                }
                objJsonResult.code = "0";
                objJsonResult.count = 0;
                objJsonResult.Message = "当前单据不存在,无法关闭!";
                objJsonResult.data = null;
                return objJsonResult;
            }
            catch (Exception e)
            {
                oCN.RollBack();//回滚事务
                objJsonResult.code = "0";
                objJsonResult.count = 0;
                objJsonResult.Message = e.ToString();
                objJsonResult.data = null;
                return objJsonResult;
            }
        }
        #endregion
    }
}
WebAPI/Models/JIT_Cg_PODemandPlanBillMain.cs
File was renamed from WebAPI/Models/Cg_PODemandPlanBillMain.cs
@@ -6,7 +6,7 @@
namespace WebAPI.Models
{
    public class Cg_PODemandPlanBillMain: ClsXt_BaseBillMain
    public class JIT_Cg_PODemandPlanBillMain: ClsXt_BaseBillMain
    {
        public string HDocumentStatus { get; set; }
        public string HAddress { get; set; }
WebAPI/Models/JIT_Cg_PODemandPlanBillSub.cs
File was renamed from WebAPI/Models/Cg_PODemandPlanBillSub.cs
@@ -6,7 +6,7 @@
namespace WebAPI.Models
{
    public class Cg_PODemandPlanBillSub : ClsXt_BaseBillSub
    public class JIT_Cg_PODemandPlanBillSub : ClsXt_BaseBillSub
    {
        public double? HRelationQty1;
        public double? HQty;
WebAPI/Models/Sc_WorkDemandPlanBillMain.cs
copy from WebAPI/Models/Cg_PODemandPlanBillMain.cs copy to WebAPI/Models/Sc_WorkDemandPlanBillMain.cs
File was copied from WebAPI/Models/Cg_PODemandPlanBillMain.cs
@@ -6,14 +6,14 @@
namespace WebAPI.Models
{
    public class Cg_PODemandPlanBillMain: ClsXt_BaseBillMain
    public class Sc_WorkDemandPlanBillMain: ClsXt_BaseBillMain
    {
        public string HDocumentStatus { get; set; }
        public string HAddress { get; set; }
        public string HExplanation { get; set; }
        public int HSubORGID;
        public int HSupplierID;
        public int HPURCHASEORGID;
        public int HDeptID;
        public int HProdORGID;
        public int HSettleCurrId;
    }
}
WebAPI/Models/Sc_WorkDemandPlanBillSub.cs
New file
@@ -0,0 +1,40 @@
using DBUtility;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
namespace WebAPI.Models
{
    public class Sc_WorkDemandPlanBillSub: ClsXt_BaseBillSub
    {
        public double? HQty;
        public double? HReciveQty;
        public double? HRemoveQty;
        public double? HUnReciveQty;
        public int? HICMOInterID;
        public int? HICMOEntryID;
        public int? HProdORGID;
        public int? HStockInOrgID;
        public int? HInStocKOwnerID;
        public int? HUnitID;
        public int? HMaterID;
        public int? HFixleadTime;
        public int? HICMOBillSEQ;
        public int? HICMOEmpID;
        public string HICMOBillNo { get; set; }
        public string HMaterName { get; set; }
        public string HMaterModel { get; set; }
        public string HStatus { get; set; }
        public string HLaterReason { get; set; }
        public string HErpClsID { get; set; }
        public string HICMOBillRemark { get; set; }
        public string HICMOBillNote { get; set; }
        public string HSeOrderBillNo { get; set; }
        public DateTime? HDayPlanDate = DateTime.Parse("1900-01-01 00:00:00");
        public DateTime? HICMOBillDate = DateTime.Parse("1900-01-01 00:00:00");
        public DateTime? HICMOBillDeliveryDate = DateTime.Parse("1900-01-01 00:00:00");
        public bool HCloseStatus;
        public bool HCloseTypeSub;
    }
}
WebAPI/WebAPI.csproj
@@ -359,7 +359,7 @@
    <Compile Include="Controllers\CJGL\Cj_StationInBillController.cs" />
    <Compile Include="Controllers\CJGL\Cj_StationEntrustOutBillController.cs" />
    <Compile Include="Controllers\CJGL\Sc_WorkBillAutoSortBillMainController.cs" />
    <Compile Include="Controllers\SCGL\日计划管理\Cg_PODemandPlanBillController.cs" />
    <Compile Include="Controllers\SCGL\日计划管理\JIT_Cg_PODemandPlanBillController.cs" />
    <Compile Include="Controllers\SCGL\Sc_CallGoodsBackRequestBillController.cs" />
    <Compile Include="Controllers\SCGL\Sc_ComplementGoodBillController.cs" />
    <Compile Include="Controllers\SCGL\Sc_ComplementGoodsController.cs" />
@@ -367,6 +367,7 @@
    <Compile Include="Controllers\SCGL\日计划管理\Sc_JIT_ComplementGoodBillController.cs" />
    <Compile Include="Controllers\SCGL\日计划管理\JIT_CompleteController..cs" />
    <Compile Include="Controllers\SCGL\日计划管理\Sc_WorkBillSortBillController.cs" />
    <Compile Include="Controllers\SCGL\日计划管理\Sc_WorkDemandPlanBillController.cs" />
    <Compile Include="Controllers\Sc_PckSplitBillController.cs" />
    <Compile Include="Controllers\GZGL\Gy_DuSubsidyItemBillController.cs" />
    <Compile Include="Controllers\GZGL\Gy_WorkPayTypeBillController.cs" />
@@ -519,8 +520,8 @@
    <Compile Include="HttpClient.cs" />
    <Compile Include="InvokeHelper.cs" />
    <Compile Include="Log.cs" />
    <Compile Include="Models\Cg_PODemandPlanBillMain.cs" />
    <Compile Include="Models\Cg_PODemandPlanBillSub.cs" />
    <Compile Include="Models\JIT_Cg_PODemandPlanBillMain.cs" />
    <Compile Include="Models\JIT_Cg_PODemandPlanBillSub.cs" />
    <Compile Include="Models\Cg_PODemandPlanConfigBillSub.cs" />
    <Compile Include="Models\ClsGy_StockCheckItemBill.cs" />
    <Compile Include="Models\ClsQK_PackingBill.cs" />
@@ -546,6 +547,8 @@
    <Compile Include="Models\ScanLineCode.cs" />
    <Compile Include="Models\Sc_WorkBillSortBillMain.cs" />
    <Compile Include="Models\Sc_WorkBillSortBillSub.cs" />
    <Compile Include="Models\Sc_WorkDemandPlanBillMain.cs" />
    <Compile Include="Models\Sc_WorkDemandPlanBillSub.cs" />
    <Compile Include="Models\工资管理\ClsGy_ClassTimePrj_Model.cs" />
    <Compile Include="Models\工资管理\ClsPay_GroupBalBillEmp.cs" />
    <Compile Include="Models\工资管理\ClsPay_GroupBalBillMain.cs" />
@@ -820,6 +823,7 @@
    <Folder Include="Views\Sc_MouldRepairSendWorkBill\" />
    <Folder Include="Views\Sc_WorkBillAutoSortBillMain\" />
    <Folder Include="Views\Sc_WorkBillSortBill\" />
    <Folder Include="Views\Sc_WorkDemandPlanBill\" />
  </ItemGroup>
  <ItemGroup>
    <WCFMetadata Include="Service References\" />