yangle
2022-04-21 8488b6537bb110165c951771cd50da337432c5a2
日计划编辑
4个文件已添加
1个文件已修改
618 ■■■■■ 已修改文件
WebAPI/Controllers/SCGL/Cg_PODemandPlanBillController.cs 181 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebAPI/Controllers/SCGL/Sc_WorkBillSortBillController.cs 330 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebAPI/Models/Sc_WorkBillSortBillMain.cs 71 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebAPI/Models/Sc_WorkBillSortBillSub.cs 30 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebAPI/WebAPI.csproj 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebAPI/Controllers/SCGL/Cg_PODemandPlanBillController.cs
New file
@@ -0,0 +1,181 @@
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 Cg_PODemandPlanBillController : ApiController
    {
        private json objJsonResult = new json();
        public DataSet ds = new DataSet();
        public WebServer webserver = new WebServer();
        SQLHelper.ClsCN oCN = new SQLHelper.ClsCN();
        #region 提料计划单 列表
        [Route("Cg_PODemandPlanBill/Cg_PODemandPlanBillList")]
        [HttpGet]
        public object Cg_PODemandPlanBillList(string sWhere, string user)
        {
            try
            {
                //查看权限
                if (!DBUtility.ClsPub.Security_Log("Cg_PODemandPlanBill_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_Cg_PODemandPlanBillList where 1=1" + sWhere+ "order by hmainid desc ", "h_v_JIT_Cg_PODemandPlanBillList");
                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("Cg_PODemandPlanBill/DelPODemandPlanBillList")]
        [HttpGet]
        public object DelPODemandPlanBillList(string HInterID, string HEntryID, string User)
        {
            try
            {
                //删除权限
                if (!DBUtility.ClsPub.Security_Log_second("Cg_PODemandPlanBill_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_Cg_PODemandPlanBillList where 1=1 and hmainid=" + HInterID, "h_v_JIT_Cg_PODemandPlanBillList");
                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 Cg_PODemandPlanBillMain where HInterID={HInterID}");
                    }
                    oCN.RunProc($"delete from Cg_PODemandPlanBillSub 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("Cg_PODemandPlanBill/ClosePODemandPlanBillList")]
        [HttpGet]
        public object ClosePODemandPlanBillList(string HInterID, string User)
        {
            try
            {
                //关闭权限
                if (!DBUtility.ClsPub.Security_Log_second("Cg_PODemandPlanBill_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_Cg_PODemandPlanBillList where 1=1 and hmainid=" + HInterID, "h_v_JIT_Cg_PODemandPlanBillList");
                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 Cg_PODemandPlanBillMain 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/Controllers/SCGL/Sc_WorkBillSortBillController.cs
New file
@@ -0,0 +1,330 @@
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_WorkBillSortBillController : 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();
        List<Sc_WorkBillSortBillSub> omodelsub = new List<Sc_WorkBillSortBillSub>();
        #region 日计划工单 列表
        [Route("Sc_WorkBillSortBill/Sc_WorkBillSortBillList")]
        [HttpGet]
        public object Sc_WorkBillSortBillList(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;
                }
                ds = oCN.RunProcReturn("select * from  h_v_JIT_Sc_WorkBillSortBillList where 1=1" + sWhere + "order by hmainid desc ", "h_v_JIT_Sc_WorkBillSortBillList");
                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_WorkBillSortBill/AddWorkBillSortBillList")]
        [HttpPost]
        public object AddWorkBillSortBillList([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("JIT_ComplementGoodBill_Edit", 1, false, user))
                {
                    objJsonResult.code = "0";
                    objJsonResult.count = 0;
                    objJsonResult.Message = "无保存权限!";
                    objJsonResult.data = null;
                    return objJsonResult;
                }
                omdelMian = Newtonsoft.Json.JsonConvert.DeserializeObject<Sc_WorkBillSortBillMain>(msg2);
                string BillType = "4610";
                if (OperationType == 1)//新增
                {
                    //主表
                    oCN.RunProc("insert into Sc_WorkBillSortBillMain(HInterID,HBillNo,HYear,HPeriod,HBillType" +
                                 ",HBillSubType,HDate,HBillStatus,HMaker,HMakeDate" +
                                 ", HRemark, HPrintQty, HDeptID, HSeOrderBillNo, HSourceQty" +
                                 ", HInStockQty, HMaterID, HMaterName, HMaterModel, HGroupID" +
                                 ", HWorkShopID, HRelationQty, HUnitID, HWorkerID, HSourceID" +
                                 ", HBeginWorkTimes, HInStockOwnerTypeID, HSplitRelationQty, HOrderLev, HWorkQty" +
                                 ", HSplitPlanQty, HOwnerTypeID, HPlanBeginDate, HPlanEndDate, HICMOBillNo" +
                                 ", HOwnerID, HBatchNo, HYX, HProdTimes, HEntrustORGID" +
                                 ", HPlanQty, HPreparatDate, HOrderNeedQty, HOrderCommitDate, HCompleteQty" +
                                 ", HSeOrderBillQty, HICMOInterID, HKTQ, HStockInORGID, HDayPlanSumQty" +
                                 ", HSourceBillNo, HICMOEntryID, HMainInterID, HProdORGID, HLeftPlanQty" +
                                 ", HEmpID, HInStockOwnerID, HICMOEntrySEQ, HICMOBillType, HCloseCount" +
                                 ", HOrderType, HSplitQty, HSourceStockInQty, HPriority, HLocked, HHangUp)" +
                                $"values({omdelMian.HInterID}, '{omdelMian.HBillNo}', {DateTime.Now.Year}, {DateTime.Now.Month}, '{BillType}'" +
                                $", '{BillType}','{omdelMian.HDate}',1, '{omdelMian.HMaker}',GETDATE()," +
                                $"'{omdelMian.HRemark}',{(omdelMian.HPrintQty==null?0: omdelMian.HPrintQty)},{omdelMian.HDeptID}, '{omdelMian.HSeOrderBillNo}', {(omdelMian.HSourceQty==null?0:omdelMian.HSourceQty)}" +
                                $",{(omdelMian.HInStockQty == null ? 0: omdelMian.HInStockQty)},{omdelMian.HMaterID}, '{omdelMian.HMaterName}', '{omdelMian.HMaterModel}', {omdelMian.HGroupID}" +
                                $", {omdelMian.HWorkShopID}, {(omdelMian.HRelationQty == null ? 0: omdelMian.HRelationQty)},{omdelMian.HUnitID},{omdelMian.HWorkerID},{omdelMian.HSourceID}" +
                                $", {(omdelMian.HBeginWorkTimes == null ? 0: omdelMian.HBeginWorkTimes)}, '{omdelMian.HInStockOwnerTypeID}', {(omdelMian.HSplitRelationQty == null ? 0:omdelMian.HSplitRelationQty)}, '{omdelMian.HOrderLev}', {(omdelMian.HWorkQty == null ? 0:omdelMian.HWorkQty)}" +
                                $", {(omdelMian.HSplitPlanQty == null ? 0: omdelMian.HSplitPlanQty)}, '{omdelMian.HOwnerTypeID}', '{omdelMian.HPlanBeginDate}','{omdelMian.HPlanEndDate}', '{omdelMian.HICMOBillNo}'" +
                                $", {omdelMian.HOwnerID}, '{omdelMian.HBatchNo}', {(omdelMian.HYX == null ? 0: omdelMian.HYX)}, {(omdelMian.HProdTimes == null ? 0: omdelMian.HProdTimes)}, {omdelMian.HEntrustORGID}" +
                                $", {(omdelMian.HPlanQty == null ? 0: omdelMian.HPlanQty)},'{omdelMian.HPreparatDate}', {(omdelMian.HOrderNeedQty == null ? 0: omdelMian.HOrderNeedQty)},'{omdelMian.HOrderCommitDate}', {(omdelMian.HCompleteQty == null ? 0: omdelMian.HCompleteQty)}" +
                                $", {(omdelMian.HSeOrderBillQty == null ? 0: omdelMian.HSeOrderBillQty)},{(omdelMian.HICMOInterID == null ? 0: omdelMian.HICMOInterID)},{(omdelMian.HKTQ == null ? 0: omdelMian.HKTQ)},{(omdelMian.HStockInORGID == null ? 0: omdelMian.HStockInORGID)},{(omdelMian.HDayPlanSumQty == null ? 0: omdelMian.HDayPlanSumQty)}," +
                                $"'{omdelMian.HSourceBillNo}', {(omdelMian.HICMOEntryID == null ? 0: omdelMian.HICMOEntryID)}, {(omdelMian.HMainInterID == null ? 0: omdelMian.HMainInterID)},{omdelMian.HProdORGID},{(omdelMian.HLeftPlanQty == null ? 0: omdelMian.HLeftPlanQty)}" +
                                $", {(omdelMian.HEmpID == null ? 0: omdelMian.HEmpID)},{omdelMian.HInStockOwnerID},{(omdelMian.HICMOEntrySEQ == null ? 0: omdelMian.HICMOEntrySEQ)}, '{omdelMian.HICMOBillType}', {(omdelMian.HCloseCount == null ? 0: omdelMian.HCloseCount)}" +
                                $", '{omdelMian.HOrderType}', {(omdelMian.HSplitQty == null ? 0: omdelMian.HSplitQty)}, {(omdelMian.HSourceStockInQty == null ? 0: omdelMian.HSourceStockInQty)}, {(omdelMian.HPriority == null ? 0: omdelMian.HPriority)}, '{(omdelMian.HLocked == true ? 1 : 0)}', '{(omdelMian.HHangUp == true ? 1 : 0)}')");
                }
                else if (OperationType == 3)
                {
                    //修改
                    oCN.RunProc("UpDate Gy_WorkWarehouseBillMain set  " +
                " HOrgId='" + omdelMian.HPRDORGID + "'" +
                ",HUpDater='" + omdelMian.HMaker + "'" +
                ",HUpDateDate='" + DateTime.Now + "'" +
                " where HInterID=" + omdelMian.HInterID.ToString());
                    //删除子表
                    oCN.RunProc("delete from Gy_WorkWarehouseBillMainSub where HInterID='" + omdelMian.HInterID.ToString() + "' and HEntryID='" + hentryid + "'");
                }
                //保存子表
                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)
        {
            omodelsub = Newtonsoft.Json.JsonConvert.DeserializeObject<List<Sc_WorkBillSortBillSub>>(msg3);
            int i = 1;
            //插入子表
            foreach (Models.Sc_WorkBillSortBillSub oSub in omodelsub)
            {
                oCN.RunProc("insert into Sc_WorkBillSortBillSub(HInterID,HEntryID,HRemark,HMasterDate,HQty" +
                            ", HRptFinishQty, HTimes, HUseTimes, HBTimes, HETimes" +
                            ", HDateSub, HCloseMan, HEntryCloseDate, HCloseTypeSub, HColumn" +
                            ", HLockedSub, HComplete, HStatusTag, HIsHandModify)" +
                            $"values({omdelMian.HInterID}, {(hentryid == -1 ? i : hentryid)}, '{oSub.HRemark}', '{oSub.HMasterDate}', {(oSub.HQty == null ? 0: oSub.HQty)}" +
                            $", {(oSub.HRptFinishQty == null ? 0: oSub.HRptFinishQty)}, {(oSub.HTimes == null ? 0: oSub.HTimes)}, {(oSub.HUseTimes == null ? 0: oSub.HUseTimes)}, '{oSub.HBTimes}', '{oSub.HETimes}'" +
                            $", '{oSub.HDateSub}', '{oSub.HCloseMan}', '{oSub.HEntryCloseDate}', {(oSub.HCloseTypeSub == true ? 1 : 0)}, '{oSub.HColumn}'" +
                            $", '{(oSub.HLockedSub == true ? 1 : 0)}', '{oSub.HComplete}', '{(oSub.HStatusTag == true ? 1 : 0)}', '{(oSub.HIsHandModify == true ? 1 : 0)}')");
                i++;
            }
            objJsonResult.code = "1";
            objJsonResult.count = 1;
            objJsonResult.Message = null;
            objJsonResult.data = null;
            return objJsonResult;
        }
        #endregion
        #region 日计划工单 删除
        [Route("Sc_WorkBillSortBill/DelWorkBillSortBillList")]
        [HttpGet]
        public object DelWorkBillSortBillList(string HInterID, string HEntryID, string User)
        {
            try
            {
                //删除权限
                if (!DBUtility.ClsPub.Security_Log_second("Sc_WorkBillSortBill_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_WorkBillSortBillList where 1=1 and hmainid=" + HInterID, "h_v_JIT_Sc_WorkBillSortBillList");
                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_WorkBillSortBillMain where HInterID={HInterID}");
                    }
                    oCN.RunProc($"delete from Sc_WorkBillSortBillSub 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_WorkBillSortBill/CloseWorkBillSortBillList")]
        [HttpGet]
        public object CloseWorkBillSortBillList(string HInterID, string User)
        {
            try
            {
                //关闭权限
                if (!DBUtility.ClsPub.Security_Log_second("Sc_WorkBillSortBill_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_WorkBillSortBillList where 1=1 and hmainid=" + HInterID, "h_v_JIT_Sc_WorkBillSortBillList");
                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_WorkBillSortBillMain 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/Sc_WorkBillSortBillMain.cs
New file
@@ -0,0 +1,71 @@
using DBUtility;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
namespace WebAPI.Models
{
    public class Sc_WorkBillSortBillMain: ClsXt_BaseBillMain
    {
        public string HDocumentStatus { get; set; }
        public bool HHangUp;
        public string HSourceBillNo { get; set; }
        public string HInStockOwnerTypeID { get; set; }
        public string HOwnerTypeID { get; set; }
        public int? HDeptID;
        public int? HMaterID;
        public int? HSourceID;
        public int? HUnitID;
        public int? HInStockOwnerID;
        public int? HOwnerID;
        public int? HYX;
        public DateTime HPlanBeginDate;
        public DateTime HPlanEndDate;
        public DateTime HOrderCommitDate;
        public DateTime HPreparatDate;
        public double? HPlanQty;
        public double? HCompleteQty;
        public double? HInStockQty;
        public double? HRelationQty;
        public double? HBeginWorkTimes;
        public double? HOrderNeedQty;
        public double? HKTQ;
        public double? HWorkQty;
        public double? HSourceQty;
        public double? HSplitPlanQty;
        public double? HLeftPlanQty;
        public double? HDayPlanSumQty;
        public double? HSeOrderBillQty;
        public string HSeOrderBillNo { get; set; }
        public int? HGroupID;
        public int? HWorkerID;
        public int? HWorkShopID;
        public int? HProdORGID;
        public int? HEntrustORGID;
        public int? HStockInORGID;
        public int? HMainInterID;
        public int? HICMOInterID;
        public int? HICMOEntryID;
        public int? HICMOEntrySEQ;
        public int? HEmpID;
        public int? HPrintQty;
        public int? HPriority;
        public double? HSplitRelationQty;
        public double? HProdTimes;
        public double? HCloseCount;
        public double? HSplitQty;
        public double? HSourceStockInQty;
        public bool HLocked;
        public string HOrderLev { get; set; }
        public string HICMOBillNo { get; set; }
        public string HBatchNo { get; set; }
        public string HMaterName { get; set; }
        public string HMaterModel { get; set; }
        public string HICMOBillType { get; set; }
        public string HICMOInterID_Sec { get; set; }
        public string HICMOEntryID_Sec { get; set; }
        public string HOrderType { get; set; }
        public string HMonthPlanFlag { get; set; }
    }
}
WebAPI/Models/Sc_WorkBillSortBillSub.cs
New file
@@ -0,0 +1,30 @@
using DBUtility;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
namespace WebAPI.Models
{
    public class Sc_WorkBillSortBillSub: ClsXt_BaseBillSub
    {
        public DateTime? HMasterDate=DateTime.Parse("1900-01-01 00:00:00.000");
        public DateTime? HDateSub = DateTime.Parse("1900-01-01 00:00:00.000");
        public DateTime? HBTimes = DateTime.Parse("1900-01-01 00:00:00.000");
        public DateTime? HETimes = DateTime.Parse("1900-01-01 00:00:00.000");
        public double? HQty;
        public double? HTimes;
        public double? HUseTimes;
        public double? HProductQty;
        public double? HUnProductQty;
        public double? HReservedCount;
        public double? HRptFinishQty;
        public string HColumn { get; set; }
        public string HComplete { get; set; }
        public string HDayPlanPPBomBillNo { get; set; }
        public bool HCloseTypeSub;
        public bool HStatusTag;
        public bool HLockedSub;
        public bool HIsHandModify;
    }
}
WebAPI/WebAPI.csproj
@@ -359,11 +359,13 @@
    <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\Sc_CallGoodsBackRequestBillController.cs" />
    <Compile Include="Controllers\SCGL\Sc_ComplementGoodBillController.cs" />
    <Compile Include="Controllers\SCGL\Sc_ComplementGoodsController.cs" />
    <Compile Include="Controllers\SCGL\Sc_ICBomBillController.cs" />
    <Compile Include="Controllers\SCGL\Sc_JIT_ComplementGoodBillController.cs" />
    <Compile Include="Controllers\SCGL\Sc_WorkBillSortBillController.cs" />
    <Compile Include="Controllers\Sc_PckSplitBillController.cs" />
    <Compile Include="Controllers\GZGL\Gy_DuSubsidyItemBillController.cs" />
    <Compile Include="Controllers\GZGL\Gy_WorkPayTypeBillController.cs" />
@@ -539,6 +541,8 @@
    <Compile Include="Models\JIT_NeedMaterPlanConfigBillSub.cs" />
    <Compile Include="Models\jsonScanline.cs" />
    <Compile Include="Models\ScanLineCode.cs" />
    <Compile Include="Models\Sc_WorkBillSortBillMain.cs" />
    <Compile Include="Models\Sc_WorkBillSortBillSub.cs" />
    <Compile Include="Models\工资管理\ClsGy_ClassTimePrj_Model.cs" />
    <Compile Include="Models\工资管理\ClsPay_GroupBalBillEmp.cs" />
    <Compile Include="Models\工资管理\ClsPay_GroupBalBillMain.cs" />
@@ -785,6 +789,7 @@
  <ItemGroup>
    <Folder Include="App_Data\" />
    <Folder Include="obj\x86\Debug\" />
    <Folder Include="Views\Cg_PODemandPlanBill\" />
    <Folder Include="Views\Cg_PurchaseReturn\" />
    <Folder Include="Views\Cj_CallGoodsBillBack\" />
    <Folder Include="Views\Cj_CallGoodsBillMain\" />
@@ -811,6 +816,7 @@
    <Folder Include="Views\Sc_MouldRepairOutBill\" />
    <Folder Include="Views\Sc_MouldRepairSendWorkBill\" />
    <Folder Include="Views\Sc_WorkBillAutoSortBillMain\" />
    <Folder Include="Views\Sc_WorkBillSortBill\" />
  </ItemGroup>
  <ItemGroup>
    <WCFMetadata Include="Service References\" />