From dc186e2ca80b4ca39969145791e0a01c9e35e01e Mon Sep 17 00:00:00 2001
From: zgq <519541279@qq.com>
Date: 星期日, 16 五月 2021 16:51:41 +0800
Subject: [PATCH] 增加组织

---
 WebAPI/Models/ClsWW_EntrustWorkOrderBillSub.cs      |   26 ++
 WebAPI/ListModels.cs                                |   12 +
 WebAPI/Controllers/Sc_ProcessMangementController.cs |  162 +++++++++++++
 WebAPI/DLL/ClsWW_EntrustWorkOrderBill.cs            |  343 ++++++++++++++++++++++++++++
 WebAPI/Models/ClsWW_EntrustWorkOrderBillMain.cs     |   13 +
 WebAPI/Properties/PublishProfiles/API.pubxml.user   |  132 +++++-----
 WebAPI/WebAPI.csproj                                |    3 
 7 files changed, 625 insertions(+), 66 deletions(-)

diff --git a/WebAPI/Controllers/Sc_ProcessMangementController.cs b/WebAPI/Controllers/Sc_ProcessMangementController.cs
index 981824b..24831dd 100644
--- a/WebAPI/Controllers/Sc_ProcessMangementController.cs
+++ b/WebAPI/Controllers/Sc_ProcessMangementController.cs
@@ -2177,6 +2177,168 @@
         }
 
 
+        /// <summary>
+        /// 淇濆瓨濮斿宸ュ崟淇℃伅
+        /// </summary>
+        /// <param name="msg"></param>
+        /// <returns></returns>
+        [Route("SaveWWWorkOrder")]
+        [HttpPost]
+        public object SaveWWWorkOrder([FromBody] JObject msg)
+        {
+            var _value = msg["msg"].ToString();
+            string msg1 = _value.ToString();
+            string[] sArray = msg1.Split(new string[] { ";" }, StringSplitOptions.RemoveEmptyEntries);
+            string msg2 = sArray[0].ToString();
+            string msg3 = sArray[1].ToString();
+
+            string UserName = "";
+            ListModels oListModels = new ListModels();
+
+            try
+            {
+                WebAPI.DLL.ClsWW_EntrustWorkOrderBill WorkOrder = new WebAPI.DLL.ClsWW_EntrustWorkOrderBill();
+                List<Models.ClsWW_EntrustWorkOrderBillMain> lsmain = new List<Models.ClsWW_EntrustWorkOrderBillMain>();
+                msg2 = msg2.Replace("\\", "");
+                msg2 = msg2.Replace("\n", "");
+                lsmain = oListModels.getObjectByJson_WorkOrderMain(msg2);
+                foreach (Models.ClsWW_EntrustWorkOrderBillMain oItem in lsmain)
+                {
+                    UserName = oItem.HMaker;
+                    oItem.HMakeDate = DBUtility.ClsPub.isStrNull(DateTime.Now.ToString("yyyy-MM-dd"));
+                    oItem.HYear = DBUtility.ClsPub.isLong(DateTime.Now.Year);
+                    oItem.HDate = DateTime.Now;
+                    oItem.HMainSourceInterID = oItem.HInterID;
+                    oItem.HInterID = 0;
+
+
+
+                    WorkOrder.omodel = oItem;
+
+
+                }
+
+                //琛ㄤ綋鏁版嵁
+                //鎸� },{鏉ユ媶鍒嗘暟缁� //鍘绘帀銆愬拰銆�
+                msg3 = msg3.Substring(1, msg3.Length - 2);
+                msg3 = msg3.Replace("\\", "");
+                msg3 = msg3.Replace("\n", "");  //\n
+                List<WebAPI.Models.Sc_ProcessPlanViewModel> ls = new List<WebAPI.Models.Sc_ProcessPlanViewModel>();
+                ls = oListModels.getObjectByJson_SendWorkSub(msg3);
+                int i = 0;
+                List<Models.ClsWW_EntrustWorkOrderBillSub> lss = new List<Models.ClsWW_EntrustWorkOrderBillSub>();
+                foreach (WebAPI.Models.Sc_ProcessPlanViewModel oItemSub in ls)
+                {
+
+                    i++;
+                    Models.ClsWW_EntrustWorkOrderBillSub WorkOrdersub = new Models.ClsWW_EntrustWorkOrderBillSub();
+                    WorkOrdersub.HProcID = oItemSub.hprocid.Value;//--宸ュ簭ID
+                    WorkOrdersub.HSourceInterID = oItemSub.hmainid.Value; //--婧愬崟id
+                    WorkOrdersub.HSourceEntryID = oItemSub.hsubid.Value; //--婧愬崟瀛怚D
+                    WorkOrdersub.HSourceBillNo = oItemSub.鍗曟嵁鍙�; //--婧愬崟鍗曞彿
+                    WorkOrdersub.HSourceBillType= oItemSub.HBillType; //--婧愬崟绫诲瀷
+                    WorkOrdersub.HRelationQty = 0;  //--鍏宠仈鏁伴噺
+                    WorkOrdersub.HRelationMoney = 0; //--鍏宠仈閲戦
+                    WorkOrdersub.HOrderBillNo = ""; //--閿�鍞鍗曞彿
+                    WorkOrdersub.HMaterLenModel = ""; //--鏉愯川
+                    WorkOrdersub.HMaterQty = 0; //--鏉愯川鏁伴噺
+                    WorkOrdersub.HMaterID = oItemSub.HMaterID.Value; //--鐗╂枡
+                    WorkOrdersub.HQty = (double)oItemSub.璁″垝鏁伴噺; //--璁㈠崟鏁伴噺
+                    WorkOrdersub.HEntrustType = "3739"; //--濮斿绫诲瀷
+                    WorkOrdersub.HNextProcName = ""; //--涓嬮亾宸ュ簭
+                    WorkOrdersub.HPrice =0; //鍔犲伐璐�
+                    WorkOrdersub.HOutQty = 0;  //--鍏宠仈鍙戝嚭鏁伴噺
+                    WorkOrdersub.HInQty =0; //--鍏宠仈鎺ユ敹鏁伴噺
+                    WorkOrdersub.HBackSupDate = DateTime.Now; //--瀹為檯浜よ揣鏃ユ湡
+                    WorkOrdersub.HInDate = DateTime.Now; //--浜よ揣鏃ユ湡 
+                    WorkOrdersub.HWorkProcFlow = ""; //--宸ヨ壓娴�
+                    WorkOrdersub.HLeftMater = ""; //--浣欐枡鎯呭喌
+
+                    if (oItemSub.璁″垝鏁伴噺 <= 0)
+                    {
+                        objJsonResult.code = "0";
+                        objJsonResult.count = 0;
+                        objJsonResult.Message = "淇濆瓨澶辫触锛佺" + i.ToString() + "琛屾暟閲忎笉澶т簬0鏃犳硶淇濆瓨锛�";
+                        objJsonResult.data = 1;
+                        return objJsonResult;
+                    }
+                    if (Convert.ToInt32(WorkOrdersub.HQty) > Convert.ToInt32(oItemSub.璁″垝鏁伴噺))
+                    {
+                        objJsonResult.code = "0";
+                        objJsonResult.count = 0;
+                        objJsonResult.Message = "淇濆瓨澶辫触锛佺" + i.ToString() + "琛屾淳宸ユ暟閲忎笉鑳藉ぇ浜庤鍒掑崟鏁伴噺锛�";
+                        objJsonResult.data = 1;
+                        return objJsonResult;
+                    }
+
+                    WorkOrdersub.HEntryID = i;
+                    WorkOrdersub.HEntryCloseDate = DBUtility.ClsPub.isDate(DateTime.Now);
+                    WorkOrdersub.HRemark = "";
+                    WorkOrdersub.HCloseMan = "";
+                    WorkOrdersub.HCloseType = false;
+                    WorkOrdersub.HSourceBillType = oItemSub.HBillType;
+                    lss.Add(WorkOrdersub);//鍏堟妸鏁版嵁瀛樻斁鍒板澶栧伐鍗曞瓙琛ㄩ泦鍚堥噷
+
+
+                }
+                if (lss.Count > 0)
+                {
+                    //鐒跺悗鍐嶅惊鐜繚瀛樺埌濮斿宸ュ崟瀛愯〃鐨勯泦鍚堥噷
+                    foreach (Models.ClsWW_EntrustWorkOrderBillSub Itemsendwork in lss)
+                    {
+                        WorkOrder.DetailColl.Add(Itemsendwork);
+                    }
+                }
+                else
+                {
+                    objJsonResult.code = "0";
+                    objJsonResult.count = 0;
+                    objJsonResult.Message = "淇濆瓨澶辫触锛乴ss闆嗗悎灏忎簬0";
+                    objJsonResult.data = 1;
+                    return objJsonResult;
+                }
+                //淇濆瓨
+                //淇濆瓨瀹屾瘯鍚庡鐞�
+                bool bResult;
+                if (WorkOrder.omodel.HInterID == 0)
+                {
+                    // bResult = oBill.AddBill(ref DBUtility.ClsPub.sExeReturnInfo);
+                    bResult = WorkOrder.AddBill(ref DBUtility.ClsPub.sExeReturnInfo);
+                }
+                else
+                {
+                    bResult = WorkOrder.ModifyBill(WorkOrder.omodel.HInterID, ref DBUtility.ClsPub.sExeReturnInfo);
+                }
+                if (bResult)
+                {
+                    objJsonResult.code = "0";
+                    objJsonResult.count = 1;
+                    objJsonResult.Message = "淇濆瓨鎴愬姛锛�";
+                    //WebAPIController.Add_Log("閫佽揣鍗曚笅鎺�", UserName, "鐢熸垚閫佽揣鍗�");
+                    objJsonResult.data = 1;
+                    return objJsonResult;
+                }
+                else
+                {
+                    objJsonResult.code = "0";
+                    objJsonResult.count = 0;
+                    objJsonResult.Message = "淇濆瓨澶辫触锛�" + DBUtility.ClsPub.sExeReturnInfo;
+                    objJsonResult.data = 1;
+                    return objJsonResult;
+                }
+            }
+            catch (Exception e)
+            {
+
+                objJsonResult.code = "0";
+                objJsonResult.count = 0;
+                objJsonResult.Message = "淇濆瓨澶辫触锛�" + e.ToString();
+                objJsonResult.data = 1;
+                return objJsonResult;
+            }
+        }
+
+
 
     }
 }
\ No newline at end of file
diff --git a/WebAPI/DLL/ClsWW_EntrustWorkOrderBill.cs b/WebAPI/DLL/ClsWW_EntrustWorkOrderBill.cs
new file mode 100644
index 0000000..4ac493d
--- /dev/null
+++ b/WebAPI/DLL/ClsWW_EntrustWorkOrderBill.cs
@@ -0,0 +1,343 @@
+锘縰sing System;
+using System.Collections.Generic;
+using System.Text;
+using System.Data;
+
+namespace WebAPI.DLL
+{
+    public class ClsWW_EntrustWorkOrderBill : DBUtility.ClsXt_BaseBill
+    {
+        public WebAPI.Models.ClsWW_EntrustWorkOrderBillMain omodel = new Models.ClsWW_EntrustWorkOrderBillMain();
+        public List<Models.ClsWW_EntrustWorkOrderBillSub> DetailColl = new List<Models.ClsWW_EntrustWorkOrderBillSub>();
+
+        public ClsWW_EntrustWorkOrderBill()
+        {
+            base.MvarItemKeySub = "WW_EntrustWorkOrderBillSub";
+            base.MvarItemKeySub2 = "";
+            base.MvarItemKeySub3 = "";
+            base.MvarItemKeySub4 = "";
+            base.MvarItemKey = "WW_EntrustWorkOrderBillMain";
+            base.MvarReportTitle = "濮斿宸ュ崟";
+            base.BillType = "3739";
+            base.HBillSubType = "3739";
+
+        }
+
+        #region 鍥哄畾浠g爜
+
+        ~ClsWW_EntrustWorkOrderBill()
+        {
+            DetailColl = null;
+        }
+
+        #endregion   鑷畾涔夋柟娉�
+
+
+        //鍒犻櫎鍗曟嵁
+        public override bool DeleteBill(Int64 lngBillKey, ref string sReturn)
+        {
+            try
+            {
+                oCn.BeginTran();
+                //鍒犻櫎鍏宠仈
+                DeleteRelation(ref sReturn, lngBillKey);
+                oCn.RunProc("exec h_p_WW_EntrustWorkOrderToProcExch_Del " + lngBillKey.ToString());
+                //鍒犻櫎鏄庣粏琛�
+                DeleteBillSub(lngBillKey);
+                DeleteBillSub2(lngBillKey);
+                DeleteBillSub3(lngBillKey);
+                DeleteBillSub4(lngBillKey);
+                //鍒犻櫎涓昏〃
+                DeleteBillMain(lngBillKey);
+                sReturn = "鍒犻櫎鍗曟嵁鎴愬姛锛�";
+                oCn.Commit();
+                return true;
+            }
+            catch (Exception e)
+            {
+                sReturn = e.Message;
+                oCn.RollBack();
+                throw (e);
+            }
+        }
+
+        //淇敼鍗曟嵁
+        public override bool ModifyBill(Int64 lngBillKey, ref string sReturn)
+        {
+            try
+            {
+                //
+                oCn.BeginTran();
+                //鏇存柊涓昏〃
+                oCn.RunProc("UpDate WW_EntrustWorkOrderBillMain set  " +
+                " HBillNo='" + omodel.HBillNo + "'" +  //鍥哄畾璧嬪��===============
+                ",HDate='" + omodel.HDate + "'" +
+                ",HYear='" + omodel.HYear.ToString() + "'" +
+                ",HPeriod='" + omodel.HPeriod.ToString() + "'" +
+                ",HRemark='" + omodel.HRemark + "'" +
+                ",HUpDater='" + DBUtility.ClsPub.CurUserName + "'" +
+                ",HUpDateDate=getdate()" +
+                    //========================================
+                ",HDeptID=" + omodel.HDeptID.ToString() +
+                ",HSupID=" + omodel.HSupID.ToString() +
+                ",HOrderProcNO='" + omodel.HOrderProcNO + "'" +
+                " where HInterID=" + lngBillKey.ToString());
+                //鍒犻櫎鍏宠仈
+                DeleteRelation(ref sReturn, lngBillKey);
+                oCn.RunProc("exec h_p_WW_EntrustWorkOrderToProcExch_Del " + lngBillKey.ToString());
+
+                //鍒犻櫎瀛愯〃
+                DeleteBillSub(lngBillKey);
+                //鎻掑叆瀛愯〃
+                omodel.HInterID = lngBillKey;
+                foreach (Models.ClsWW_EntrustWorkOrderBillSub oSub in DetailColl)
+                {
+                    oCn.RunProc("Insert into WW_EntrustWorkOrderBillSub " +
+                      " (HInterID,HEntryID,HCloseMan,HEntryCloseDate,HCloseType,HRemark" +
+                      ",HSourceInterID,HSourceEntryID,HSourceBillNo,HSourceBillType,HRelationQty,HRelationMoney" +
+                      ",HOrderBillNo,HMaterLenModel,HMaterQty,HMaterID,HQty" +
+                      ",HEntrustType,HNextProcName,HPrice,HOutQty,HInQty" +
+                      ",HBackSupDate,HInDate,HWorkProcFlow,HProcID,HLeftMater" +
+                      ") values("
+                      + omodel.HInterID.ToString() + "," + oSub.HEntryID.ToString() + ",'" + oSub.HCloseMan + "','" + oSub.HEntryCloseDate.ToShortDateString() + "'," + Convert.ToString(oSub.HCloseType ? 1 : 0) + ",'" + oSub.HRemark + "'" +
+                      "," + oSub.HSourceInterID.ToString() + "," + oSub.HSourceEntryID.ToString() + ",'" + oSub.HSourceBillNo + "','" + oSub.HSourceBillType + "'," + oSub.HRelationQty.ToString() + "," + oSub.HRelationMoney.ToString() +
+                      ",'" + oSub.HOrderBillNo + "','" + oSub.HMaterLenModel + "'," + oSub.HMaterQty.ToString() + "," + oSub.HMaterID.ToString() + "," + oSub.HQty.ToString() +
+                      ",'" + oSub.HEntrustType + "','" + oSub.HNextProcName + "'," + oSub.HPrice.ToString() + "," + oSub.HOutQty.ToString() + "," + oSub.HInQty.ToString() +
+                      ",'" + oSub.HBackSupDate.ToShortDateString() + "','" + oSub.HInDate.ToShortDateString() + "','" + oSub.HWorkProcFlow + "'," + oSub.HProcID.ToString() +",'" + oSub.HLeftMater + "'" + 
+                      ") ");
+                }
+                //鏍规嵁鍐呯爜 濮斿宸ュ崟琛ㄥご渚涘簲鍟� 鍥炲~瀵瑰簲娴佽浆鍗� 渚涘簲鍟嗭紝鏈夊澶栨爣璁版墠鍥炲~
+                oCn.RunProc("exec h_p_WW_EntrustWorkOrderToProcExch " + omodel.HInterID.ToString());
+                //
+                //
+                DataSet Ds;
+                Ds = oCn.RunProcReturn("exec h_p_WW_EntrustWorkOrderToProcExch_QtyCtrl " + omodel.HInterID.ToString() + "", "h_p_WW_EntrustWorkOrderToProcExch_QtyCtrl");
+                if (Ds == null)
+                {
+                    sReturn = "鍒ゆ柇鏁伴噺澶辫触锛�";
+                    oCn.RollBack();
+                    return false;
+                }
+                if (Ds.Tables[0].Rows.Count == 0)
+                {
+                    sReturn = "鍒ゆ柇鏁伴噺澶辫触锛�";
+                    oCn.RollBack();
+                    return false;
+                }
+                if (DBUtility.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["HBack"]) == "2")
+                {
+                    sReturn = DBUtility.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["HBackRemark"]);
+                    oCn.RollBack();
+                    return false;
+                }
+                //
+
+                sReturn = "淇敼鍗曟嵁鎴愬姛锛�";
+                oCn.Commit();
+                return true;
+            }
+            catch (Exception e)
+            {
+                sReturn = e.Message;
+                oCn.RollBack();
+                throw (e);
+            }
+        }
+        //鏂板鍗曟嵁
+        public override bool AddBill(ref string sReturn)
+        {
+            try
+            {
+                //寰楀埌mainid
+                omodel.HInterID = DBUtility.ClsPub.CreateBillID(BillType, ref DBUtility.ClsPub.sExeReturnInfo);
+                //omodel.HBillNo = DBUtility.ClsPub.CreateBillCode(BillType, ref DBUtility.ClsPub.sExeReturnInfo, true);
+                //鑻AINDI閲嶅鍒欓噸鏂拌幏鍙�
+                //if (IsExistBillNo(ref DBUtility.ClsPub.sExeReturnInfo, omodel.HBillNo, Pub_Class.ClsPub.Enum_BillStatus.BillStatus_AddNew, omodel.HInterID))
+                //{
+                //    omodel.HBillNo = DBUtility.ClsPub.CreateBillCode(BillType, ref DBUtility.ClsPub.sExeReturnInfo, true);
+                //}
+                if (IsExistMainID(ref DBUtility.ClsPub.sExeReturnInfo, omodel.HInterID, Pub_Class.ClsPub.Enum_BillStatus.BillStatus_AddNew))
+                {
+                    omodel.HInterID = DBUtility.ClsPub.CreateBillID(BillType, ref DBUtility.ClsPub.sExeReturnInfo);
+                }
+                //
+                oCn.BeginTran();
+                //涓昏〃
+                oCn.RunProc("Insert Into WW_EntrustWorkOrderBillMain   " +
+                "(HBillType,HBillSubType,HInterID,HBillNo,HDate" +
+                ",HYear,HPeriod,HRemark,HMaker,HMakeDate" +
+                ",HDeptID,HSupID,HOrderProcNO" +
+                ") " +
+                " values('" + this.BillType + "','" + this.HBillSubType + "'," + omodel.HInterID.ToString() + ",'" + omodel.HBillNo + "','" + omodel.HDate + "'" +
+                ", " + omodel.HYear.ToString() + "," + omodel.HPeriod.ToString() + ",'" + omodel.HRemark + "','" + DBUtility.ClsPub.CurUserName + "',getdate()" +
+                ", " + omodel.HDeptID.ToString() + "," + omodel.HSupID.ToString() + ",'" + omodel.HOrderProcNO + "'" +
+                ") ");
+                //鎻掑叆瀛愯〃
+                foreach (Models.ClsWW_EntrustWorkOrderBillSub oSub in DetailColl)
+                {
+                    oCn.RunProc("Insert into WW_EntrustWorkOrderBillSub " +
+                      " (HInterID,HEntryID,HCloseMan,HEntryCloseDate,HCloseType,HRemark" +
+                      ",HSourceInterID,HSourceEntryID,HSourceBillNo,HSourceBillType,HRelationQty,HRelationMoney" +
+                      ",HOrderBillNo,HMaterLenModel,HMaterQty,HMaterID,HQty" +
+                      ",HEntrustType,HNextProcName,HPrice,HOutQty,HInQty" +
+                      ",HBackSupDate,HInDate,HWorkProcFlow,HProcID,HLeftMater" +
+                      ") values("
+                      + omodel.HInterID.ToString() + "," + oSub.HEntryID.ToString() + ",'" + oSub.HCloseMan + "','" + oSub.HEntryCloseDate.ToShortDateString() + "'," + Convert.ToString(oSub.HCloseType ? 1 : 0) + ",'" + oSub.HRemark + "'" +
+                      "," + oSub.HSourceInterID.ToString() + "," + oSub.HSourceEntryID.ToString() + ",'" + oSub.HSourceBillNo + "','" + oSub.HSourceBillType + "'," + oSub.HRelationQty.ToString() + "," + oSub.HRelationMoney.ToString() +
+                      ",'" + oSub.HOrderBillNo + "','" + oSub.HMaterLenModel + "'," + oSub.HMaterQty.ToString() + "," + oSub.HMaterID.ToString() + "," + oSub.HQty.ToString() +
+                      ",'" + oSub.HEntrustType + "','" + oSub.HNextProcName + "'," + oSub.HPrice.ToString() + "," + oSub.HOutQty.ToString() + "," + oSub.HInQty.ToString() +
+                      ",'" + oSub.HBackSupDate.ToShortDateString() + "','" + oSub.HInDate.ToShortDateString() + "','" + oSub.HWorkProcFlow + "'," + oSub.HProcID.ToString() + ",'" + oSub.HLeftMater +  "'"  + 
+                      ") ");
+                }
+
+                ////鏍规嵁鍐呯爜 濮斿宸ュ崟琛ㄥご渚涘簲鍟� 鍥炲~瀵瑰簲娴佽浆鍗� 渚涘簲鍟嗭紝鏈夊澶栨爣璁版墠鍥炲~..骞朵笖鍥炲~ 鍏宠仈鏁伴噺
+                //oCn.RunProc("exec h_p_WW_EntrustWorkOrderToProcExch " + omodel.HInterID.ToString());
+                ////
+                //DataSet Ds;
+                //Ds = oCn.RunProcReturn("exec h_p_WW_EntrustWorkOrderToProcExch_QtyCtrl " + omodel.HInterID.ToString() + "", "h_p_WW_EntrustWorkOrderToProcExch_QtyCtrl");
+                //if (Ds == null)
+                //{
+                //    sReturn = "鍒ゆ柇鏁伴噺澶辫触锛�";
+                //    oCn.RollBack();
+                //    return false;
+                //}
+                //if (Ds.Tables[0].Rows.Count == 0)
+                //{
+                //    sReturn = "鍒ゆ柇鏁伴噺澶辫触锛�";
+                //    oCn.RollBack();
+                //    return false;
+                //}
+                //if (DBUtility.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["HBack"]) == "2")
+                //{
+                //    sReturn = DBUtility.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["HBackRemark"]);
+                //    oCn.RollBack();
+                //    return false;
+                //}
+                //
+                sReturn = "鏂板鍗曟嵁鎴愬姛锛�";
+                oCn.Commit();
+                return true;
+            }
+            catch (Exception e)
+            {
+                sReturn = e.Message;
+                oCn.RollBack();
+                throw (e);
+            }
+        }
+        //鏄剧ず鍗曟嵁
+        public override bool ShowBill(Int64 lngBillKey, ref string sReturn)
+        {
+            try
+            {
+                //鏌ヨ涓昏〃
+                DataSet Ds;
+                Ds = oCn.RunProcReturn("Select * from WW_EntrustWorkOrderBillMain Where HInterID=" + lngBillKey.ToString(), "WW_EntrustWorkOrderBillMain");
+                if (Ds.Tables[0].Rows.Count == 0)
+                {
+                    sReturn = "鍗曟嵁鏈壘鍒帮紒";
+                    return false;
+                }
+                //鍥哄畾璧嬪��===========================================
+                omodel.HYear = DBUtility.ClsPub.isLong(Ds.Tables[0].Rows[0]["HYear"]);
+                omodel.HPeriod = DBUtility.ClsPub.isLong(Ds.Tables[0].Rows[0]["HPeriod"]);
+                omodel.HBillType = DBUtility.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["HBillType"]);
+                omodel.HBillSubType = DBUtility.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["HBillSubType"]);
+                omodel.HInterID = DBUtility.ClsPub.isLong(Ds.Tables[0].Rows[0]["HInterID"]);
+                omodel.HDate = DBUtility.ClsPub.isDate(Ds.Tables[0].Rows[0]["HDate"]);
+                omodel.HBillNo = Ds.Tables[0].Rows[0]["HBillNo"].ToString().Trim();
+                omodel.HBillStatus = DBUtility.ClsPub.isInt(Ds.Tables[0].Rows[0]["HBillStatus"]);
+                omodel.HCheckItemNowID = DBUtility.ClsPub.isLong(Ds.Tables[0].Rows[0]["HCheckItemNowID"]);
+                omodel.HCheckItemNextID = DBUtility.ClsPub.isLong(Ds.Tables[0].Rows[0]["HCheckItemNextID"]);
+                omodel.HCheckFlowID = DBUtility.ClsPub.isLong(Ds.Tables[0].Rows[0]["HCheckFlowID"]);
+                omodel.HRemark = Ds.Tables[0].Rows[0]["HRemark"].ToString().Trim();
+                omodel.HBackDate = Ds.Tables[0].Rows[0]["HBackDate"].ToString().Trim();
+                omodel.HBacker = Ds.Tables[0].Rows[0]["HBacker"].ToString().Trim();
+                omodel.HCheckDate = Ds.Tables[0].Rows[0]["HCheckDate"].ToString().Trim();
+                omodel.HChecker = Ds.Tables[0].Rows[0]["HChecker"].ToString().Trim();
+                omodel.HMaker = Ds.Tables[0].Rows[0]["HMaker"].ToString().Trim();
+                omodel.HMakeDate = Ds.Tables[0].Rows[0]["HMakeDate"].ToString().Trim();
+                omodel.HUpDateDate = Ds.Tables[0].Rows[0]["HUpDateDate"].ToString().Trim();
+                omodel.HUpDater = Ds.Tables[0].Rows[0]["HUpDater"].ToString().Trim();
+                omodel.HCloseDate = Ds.Tables[0].Rows[0]["HCloseDate"].ToString().Trim();
+                omodel.HCloseMan = Ds.Tables[0].Rows[0]["HCloseMan"].ToString().Trim();
+                omodel.HCloseType = DBUtility.ClsPub.isBool(Ds.Tables[0].Rows[0]["HCloseType"]);
+                omodel.HDeleteDate = Ds.Tables[0].Rows[0]["HDeleteDate"].ToString().Trim();
+                omodel.HDeleteMan = Ds.Tables[0].Rows[0]["HDeleteMan"].ToString().Trim();
+                //========================================================
+                omodel.HDeptID = DBUtility.ClsPub.isLong(Ds.Tables[0].Rows[0]["HDeptID"]);
+                omodel.HSupID = DBUtility.ClsPub.isLong(Ds.Tables[0].Rows[0]["HSupID"]);
+                omodel.HOrderProcNO = DBUtility.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["HOrderProcNO"]);
+                //
+
+                //寰幆
+                DataSet DsSub;
+                DsSub = oCn.RunProcReturn("Select * from WW_EntrustWorkOrderBillSub Where HInterID=" + lngBillKey.ToString(), "WW_EntrustWorkOrderBillSub");
+                DetailColl.Clear();//娓呯┖
+                for (int i = 0; i < DsSub.Tables[0].Rows.Count; i++)
+                {
+                    Models.ClsWW_EntrustWorkOrderBillSub oSub = new Models.ClsWW_EntrustWorkOrderBillSub();
+                    // 鍥哄畾璧嬪��===============================================
+                    oSub.HInterID = DBUtility.ClsPub.isLong(DsSub.Tables[0].Rows[i]["HInterID"]);
+                    oSub.HEntryID = DBUtility.ClsPub.isLong(DsSub.Tables[0].Rows[i]["HEntryID"]);
+                    oSub.HSourceInterID = DBUtility.ClsPub.isLong(DsSub.Tables[0].Rows[i]["HSourceInterID"]);
+                    oSub.HSourceEntryID = DBUtility.ClsPub.isLong(DsSub.Tables[0].Rows[i]["HSourceEntryID"]);
+                    oSub.HSourceBillType = DsSub.Tables[0].Rows[i]["HSourceBillType"].ToString().Trim();
+                    oSub.HSourceBillNo = DsSub.Tables[0].Rows[i]["HSourceBillNo"].ToString().Trim();
+                    oSub.HRelationQty = DBUtility.ClsPub.isDoule(DsSub.Tables[0].Rows[i]["HRelationQty"]);
+                    oSub.HRelationMoney = DBUtility.ClsPub.isDoule(DsSub.Tables[0].Rows[i]["HRelationMoney"]);
+                    oSub.HCloseMan = DBUtility.ClsPub.isStrNull(DsSub.Tables[0].Rows[i]["HCloseMan"]);
+                    oSub.HCloseType = DBUtility.ClsPub.isBool(DsSub.Tables[0].Rows[i]["HCloseType"]);
+                    oSub.HEntryCloseDate = DBUtility.ClsPub.isDate(DsSub.Tables[0].Rows[i]["HEntryCloseDate"]);
+                    oSub.HRemark = DsSub.Tables[0].Rows[i]["HRemark"].ToString().Trim();
+                    //===================================================
+                    oSub.HOrderBillNo = DBUtility.ClsPub.isStrNull(DsSub.Tables[0].Rows[i]["HOrderBillNo"]);
+                    oSub.HLeftMater = DBUtility.ClsPub.isStrNull(DsSub.Tables[0].Rows[i]["HLeftMater"]);
+                    oSub.HMaterLenModel = DBUtility.ClsPub.isStrNull(DsSub.Tables[0].Rows[i]["HMaterLenModel"]);
+                    oSub.HMaterQty = DBUtility.ClsPub.isDoule(DsSub.Tables[0].Rows[i]["HMaterQty"]);
+                    oSub.HMaterID = DBUtility.ClsPub.isLong(DsSub.Tables[0].Rows[i]["HMaterID"]);
+                    oSub.HProcID = DBUtility.ClsPub.isLong(DsSub.Tables[0].Rows[i]["HProcID"]);
+                    oSub.HQty = DBUtility.ClsPub.isDoule(DsSub.Tables[0].Rows[i]["HQty"]);
+                    oSub.HEntrustType = DBUtility.ClsPub.isStrNull(DsSub.Tables[0].Rows[i]["HEntrustType"]);
+                    oSub.HNextProcName = DBUtility.ClsPub.isStrNull(DsSub.Tables[0].Rows[i]["HNextProcName"]);
+                    oSub.HPrice = DBUtility.ClsPub.isDoule(DsSub.Tables[0].Rows[i]["HPrice"]);
+                    oSub.HOutQty = DBUtility.ClsPub.isDoule(DsSub.Tables[0].Rows[i]["HOutQty"]);
+                    oSub.HInQty = DBUtility.ClsPub.isDoule(DsSub.Tables[0].Rows[i]["HInQty"]);
+                    oSub.HInDate = DBUtility.ClsPub.isDate(DsSub.Tables[0].Rows[i]["HInDate"]);
+                    oSub.HBackSupDate = DBUtility.ClsPub.isDate(DsSub.Tables[0].Rows[i]["HBackSupDate"]);
+                    oSub.HWorkProcFlow = DBUtility.ClsPub.isStrNull(DsSub.Tables[0].Rows[i]["HWorkProcFlow"]);
+                    DetailColl.Add(oSub);
+                }
+                sReturn = "鏄剧ず鍗曟嵁鎴愬姛锛�";
+                return true;
+            }
+            catch (Exception e)
+            {
+                sReturn = e.Message;
+                throw (e);
+            }
+        }
+
+
+        //鏇存柊鎵撳嵃娆℃暟
+        public bool Set_PrintQty(long sInterID)
+        {
+            try
+            {
+                oCn.BeginTran();
+                //鏇存柊 鎵撳嵃娆℃暟
+                oCn.RunProc("update WW_EntrustWorkOrderBillMain set HPrintQty=isnull(HPrintQty,0)+1 where HInterID=" + sInterID.ToString(), ref DBUtility.ClsPub.sExeReturnInfo);
+                oCn.Commit();
+                return true;
+            }
+            catch (Exception e)
+            {
+                oCn.RollBack();
+                throw (e);
+            }
+        }
+
+
+    }
+
+}
diff --git a/WebAPI/ListModels.cs b/WebAPI/ListModels.cs
index c47b8d8..c2f2a22 100644
--- a/WebAPI/ListModels.cs
+++ b/WebAPI/ListModels.cs
@@ -321,5 +321,17 @@
             return list;
         }
 
+        /// <summary>
+        /// 濮斿宸ュ崟涓昏〃json澶勭悊
+        /// </summary>
+        /// <param name="jsonString"></param>
+        /// <returns></returns>
+        public List<Models.ClsWW_EntrustWorkOrderBillMain> getObjectByJson_WorkOrderMain(string jsonString)
+        {
+            jsonString = "[" + jsonString.ToString() + "]";
+            List<Models.ClsWW_EntrustWorkOrderBillMain> list = Newtonsoft.Json.JsonConvert.DeserializeObject<List<Models.ClsWW_EntrustWorkOrderBillMain>>(jsonString);
+            return list;
+        }
+
     }
 }
\ No newline at end of file
diff --git a/WebAPI/Models/ClsWW_EntrustWorkOrderBillMain.cs b/WebAPI/Models/ClsWW_EntrustWorkOrderBillMain.cs
new file mode 100644
index 0000000..ef5f5b6
--- /dev/null
+++ b/WebAPI/Models/ClsWW_EntrustWorkOrderBillMain.cs
@@ -0,0 +1,13 @@
+using System;
+using System.Collections.Generic;
+using System.Text;
+
+namespace WebAPI.Models
+{
+    public class ClsWW_EntrustWorkOrderBillMain:DBUtility.ClsXt_BaseBillMain
+    {
+        public Int64 HDeptID;//		int	//申请部门(h_v_CLD_Department)
+        public Int64 HSupID;//		int	//外协供应商(h_v_CLD_Supplier)
+        public string HOrderProcNO;//	varchar(100)	//订单跟踪号
+    }
+}
diff --git a/WebAPI/Models/ClsWW_EntrustWorkOrderBillSub.cs b/WebAPI/Models/ClsWW_EntrustWorkOrderBillSub.cs
new file mode 100644
index 0000000..e141383
--- /dev/null
+++ b/WebAPI/Models/ClsWW_EntrustWorkOrderBillSub.cs
@@ -0,0 +1,26 @@
+using System;
+using System.Collections.Generic;
+using System.Text;
+
+namespace WebAPI.Models
+{
+    public class ClsWW_EntrustWorkOrderBillSub:DBUtility.ClsXt_BaseBillSub
+    {
+        public string HOrderBillNo;//	varchar(100)	//订单号
+        public string HMaterLenModel;//	varchar(200)	//板材料件尺寸
+        public double HMaterQty;//	dec(18,8)		//板材张数
+        public Int64 HMaterID;//		int		//加工产品(h_v_CLD_Material)
+        public double HQty;//		dec(18,8)		//生产数量
+        public string HEntrustType;//	varchar(200)	//委外加工类型
+        public string HNextProcName;//	varchar(200) 	//委外下道工序
+        public double HPrice;//		dec(18,8)		//加工单价
+        public double HOutQty;//		dec(18,8)		//转出数量
+        public double HInQty;//		dec(18,8)		//接收数量
+        public DateTime HInDate;//		datetime		//回厂时间
+        public string HRemark;//		varchar(500)	//备注
+        public string HWorkProcFlow;//	varchar(500)	//产品工艺
+        public Int64 HProcID;
+        public DateTime HBackSupDate;
+        public string HLeftMater;           //余料
+    }
+}
diff --git a/WebAPI/Properties/PublishProfiles/API.pubxml.user b/WebAPI/Properties/PublishProfiles/API.pubxml.user
index f58c659..226d062 100644
--- a/WebAPI/Properties/PublishProfiles/API.pubxml.user
+++ b/WebAPI/Properties/PublishProfiles/API.pubxml.user
@@ -7,12 +7,12 @@
   <PropertyGroup>
     <TimeStampOfAssociatedLegacyPublishXmlFile />
     <_PublishTargetUrl>D:\缃戠珯鍙戝竷\鏅轰簯MESWMS\API</_PublishTargetUrl>
-    <History>True|2021-05-08T11:04:07.1084339Z;True|2021-05-08T18:04:40.2166839+08:00;True|2021-05-08T18:04:32.5635574+08:00;True|2021-05-08T18:01:24.5206432+08:00;True|2021-05-08T17:38:05.5582200+08:00;True|2021-05-08T15:26:55.2861241+08:00;True|2021-05-08T14:52:13.1682476+08:00;True|2021-05-08T14:50:30.5356438+08:00;True|2021-05-08T14:38:40.3445313+08:00;True|2021-05-08T14:38:37.9504757+08:00;True|2021-05-08T14:30:31.9762236+08:00;True|2021-05-08T14:21:37.4496495+08:00;True|2021-05-07T20:47:46.1401919+08:00;True|2021-05-07T20:31:45.7777162+08:00;True|2021-05-07T20:31:35.2882424+08:00;True|2021-05-07T20:31:21.5616729+08:00;False|2021-05-07T20:29:33.8855457+08:00;False|2021-05-07T20:28:43.1845420+08:00;False|2021-05-07T20:28:13.1335411+08:00;True|2021-05-07T20:10:01.7346568+08:00;True|2021-05-07T20:03:17.0005596+08:00;True|2021-05-07T09:05:04.3102029+08:00;True|2021-05-06T18:11:36.9078607+08:00;True|2021-05-06T18:08:40.5403791+08:00;True|2021-05-06T18:07:04.1929681+08:00;True|2021-05-06T18:06:54.5987264+08:00;True|2021-05-06T18:05:46.1791578+08:00;True|2021-05-06T17:18:58.8131464+08:00;True|2021-05-06T17:18:37.9969968+08:00;True|2021-05-06T14:47:33.5704679+08:00;True|2021-05-06T10:03:28.7226576+08:00;True|2021-04-28T10:18:54.1336497+08:00;True|2021-04-27T16:34:19.0789205+08:00;True|2021-04-27T14:48:28.8138232+08:00;True|2021-04-27T10:34:03.6370089+08:00;True|2021-04-26T16:18:32.0260755+08:00;True|2021-04-26T15:00:58.6773071+08:00;True|2021-04-26T13:23:50.3968646+08:00;True|2021-04-16T08:50:41.5499248+08:00;True|2021-04-16T08:32:59.1701708+08:00;True|2021-04-16T08:27:36.9176335+08:00;True|2021-04-15T15:56:26.8485667+08:00;True|2021-04-15T15:21:23.2875671+08:00;True|2021-04-15T14:41:16.9980034+08:00;True|2021-04-15T14:36:34.8570017+08:00;True|2021-04-13T16:15:00.7668503+08:00;</History>
+    <History>True|2021-05-12T01:19:36.0666124Z;True|2021-05-12T09:17:40.0887602+08:00;True|2021-05-12T09:06:24.5508601+08:00;True|2021-05-12T08:39:56.6657894+08:00;True|2021-05-11T17:42:28.6508833+08:00;True|2021-05-11T15:22:03.4937062+08:00;True|2021-05-10T16:45:56.1282466+08:00;True|2021-05-08T19:04:07.1084339+08:00;True|2021-05-08T18:04:40.2166839+08:00;True|2021-05-08T18:04:32.5635574+08:00;True|2021-05-08T18:01:24.5206432+08:00;True|2021-05-08T17:38:05.5582200+08:00;True|2021-05-08T15:26:55.2861241+08:00;True|2021-05-08T14:52:13.1682476+08:00;True|2021-05-08T14:50:30.5356438+08:00;True|2021-05-08T14:38:40.3445313+08:00;True|2021-05-08T14:38:37.9504757+08:00;True|2021-05-08T14:30:31.9762236+08:00;True|2021-05-08T14:21:37.4496495+08:00;True|2021-05-07T20:47:46.1401919+08:00;True|2021-05-07T20:31:45.7777162+08:00;True|2021-05-07T20:31:35.2882424+08:00;True|2021-05-07T20:31:21.5616729+08:00;False|2021-05-07T20:29:33.8855457+08:00;False|2021-05-07T20:28:43.1845420+08:00;False|2021-05-07T20:28:13.1335411+08:00;True|2021-05-07T20:10:01.7346568+08:00;True|2021-05-07T20:03:17.0005596+08:00;True|2021-05-07T09:05:04.3102029+08:00;True|2021-05-06T18:11:36.9078607+08:00;True|2021-05-06T18:08:40.5403791+08:00;True|2021-05-06T18:07:04.1929681+08:00;True|2021-05-06T18:06:54.5987264+08:00;True|2021-05-06T18:05:46.1791578+08:00;True|2021-05-06T17:18:58.8131464+08:00;True|2021-05-06T17:18:37.9969968+08:00;True|2021-05-06T14:47:33.5704679+08:00;True|2021-05-06T10:03:28.7226576+08:00;True|2021-04-28T10:18:54.1336497+08:00;True|2021-04-27T16:34:19.0789205+08:00;True|2021-04-27T14:48:28.8138232+08:00;True|2021-04-27T10:34:03.6370089+08:00;True|2021-04-26T16:18:32.0260755+08:00;True|2021-04-26T15:00:58.6773071+08:00;True|2021-04-26T13:23:50.3968646+08:00;True|2021-04-16T08:50:41.5499248+08:00;True|2021-04-16T08:32:59.1701708+08:00;True|2021-04-16T08:27:36.9176335+08:00;True|2021-04-15T15:56:26.8485667+08:00;True|2021-04-15T15:21:23.2875671+08:00;True|2021-04-15T14:41:16.9980034+08:00;True|2021-04-15T14:36:34.8570017+08:00;True|2021-04-13T16:15:00.7668503+08:00;</History>
   </PropertyGroup>
   <ItemGroup>
     <File Include="apiapp.json">
       <publishTime>04/12/2021 11:33:15</publishTime>
-      <publishTime>01/13/2021 21:47:30</publishTime>
+      <publishTime>05/06/2021 09:48:41</publishTime>
     </File>
     <File Include="bin/Antlr3.Runtime.dll">
       <publishTime>02/22/2013 08:43:40</publishTime>
@@ -27,19 +27,19 @@
       <publishTime>05/07/2021 20:31:20</publishTime>
     </File>
     <File Include="bin/BLL.dll">
-      <publishTime>01/13/2021 21:47:30</publishTime>
+      <publishTime>05/06/2021 09:48:41</publishTime>
     </File>
     <File Include="bin/DAL.dll">
-      <publishTime>01/13/2021 21:47:30</publishTime>
+      <publishTime>05/06/2021 09:48:41</publishTime>
     </File>
     <File Include="bin/Dapper.dll">
       <publishTime>07/22/2016 14:52:40</publishTime>
     </File>
     <File Include="bin/DBUtility.dll">
-      <publishTime>01/13/2021 21:47:30</publishTime>
+      <publishTime>05/06/2021 09:48:41</publishTime>
     </File>
     <File Include="bin/Kingdee.BOS.WebApi.Client.dll">
-      <publishTime>01/13/2021 21:47:30</publishTime>
+      <publishTime>05/06/2021 09:48:41</publishTime>
     </File>
     <File Include="bin/Kingdee.BOS.WebApi.FormService.dll">
       <publishTime>04/26/2020 09:57:16</publishTime>
@@ -57,7 +57,7 @@
       <publishTime>07/25/2012 11:48:56</publishTime>
     </File>
     <File Include="bin/Model.dll">
-      <publishTime>01/13/2021 21:47:30</publishTime>
+      <publishTime>05/06/2021 09:48:41</publishTime>
     </File>
     <File Include="bin/Newtonsoft.Json.dll">
       <publishTime>08/03/2014 20:33:56</publishTime>
@@ -66,13 +66,13 @@
       <publishTime>01/04/2011 13:48:18</publishTime>
     </File>
     <File Include="bin/Pub_Class.dll">
-      <publishTime>05/21/2020 10:51:50</publishTime>
+      <publishTime>05/06/2021 09:48:41</publishTime>
     </File>
     <File Include="bin/Pub_Control.dll">
-      <publishTime>01/13/2021 21:47:30</publishTime>
+      <publishTime>05/06/2021 09:48:41</publishTime>
     </File>
     <File Include="bin/SQLHelper.dll">
-      <publishTime>01/13/2021 21:47:30</publishTime>
+      <publishTime>05/06/2021 09:48:41</publishTime>
     </File>
     <File Include="bin/Swashbuckle.Core.dll">
       <publishTime>02/15/2015 17:57:08</publishTime>
@@ -138,7 +138,7 @@
       <publishTime>11/28/2018 13:01:00</publishTime>
     </File>
     <File Include="bin/System.Web.Http.WebHost.dll">
-      <publishTime>01/13/2021 21:47:30</publishTime>
+      <publishTime>05/06/2021 09:48:41</publishTime>
     </File>
     <File Include="bin/System.Web.Mvc.dll">
       <publishTime>01/28/2015 04:02:18</publishTime>
@@ -171,10 +171,10 @@
       <publishTime>11/24/2014 11:18:48</publishTime>
     </File>
     <File Include="bin/WebAPI.dll">
-      <publishTime>05/16/2021 13:44:43</publishTime>
+      <publishTime>05/12/2021 09:04:46</publishTime>
     </File>
     <File Include="bin/WebAPI.pdb">
-      <publishTime>05/16/2021 13:44:43</publishTime>
+      <publishTime>05/12/2021 09:04:46</publishTime>
     </File>
     <File Include="bin/WebAPI.XmlSerializers.dll">
       <publishTime>02/04/2021 21:35:21</publishTime>
@@ -192,166 +192,166 @@
       <publishTime>03/26/2019 14:23:20</publishTime>
     </File>
     <File Include="Content/bootstrap.css">
-      <publishTime>01/13/2021 21:47:30</publishTime>
+      <publishTime>05/06/2021 09:48:41</publishTime>
     </File>
     <File Include="Content/bootstrap.min.css">
-      <publishTime>01/13/2021 21:47:30</publishTime>
+      <publishTime>05/06/2021 09:48:41</publishTime>
     </File>
     <File Include="Content/Site.css">
-      <publishTime>01/13/2021 21:47:30</publishTime>
+      <publishTime>05/06/2021 09:48:41</publishTime>
     </File>
     <File Include="DLL/BLL.dll">
-      <publishTime>01/13/2021 21:47:30</publishTime>
+      <publishTime>05/06/2021 09:48:41</publishTime>
     </File>
     <File Include="DLL/DAL.dll">
-      <publishTime>01/13/2021 21:47:30</publishTime>
+      <publishTime>05/06/2021 09:48:41</publishTime>
     </File>
     <File Include="DLL/DBUtility.dll">
-      <publishTime>01/13/2021 21:47:30</publishTime>
+      <publishTime>05/06/2021 09:48:41</publishTime>
     </File>
     <File Include="DLL/Kingdee.BOS.WebApi.Client.dll">
-      <publishTime>01/13/2021 21:47:30</publishTime>
+      <publishTime>05/06/2021 09:48:41</publishTime>
     </File>
     <File Include="DLL/Model.dll">
-      <publishTime>01/13/2021 21:47:30</publishTime>
+      <publishTime>05/06/2021 09:48:41</publishTime>
     </File>
     <File Include="DLL/Newtonsoft.Json.Net35.dll">
-      <publishTime>01/13/2021 21:47:30</publishTime>
+      <publishTime>05/06/2021 09:48:41</publishTime>
     </File>
     <File Include="DLL/Pub_Class.dll">
-      <publishTime>05/21/2020 10:51:50</publishTime>
+      <publishTime>05/06/2021 09:48:41</publishTime>
     </File>
     <File Include="DLL/Pub_Control.dll">
-      <publishTime>01/13/2021 21:47:30</publishTime>
+      <publishTime>05/06/2021 09:48:41</publishTime>
     </File>
     <File Include="DLL/SQLHelper.dll">
-      <publishTime>01/13/2021 21:47:30</publishTime>
+      <publishTime>05/06/2021 09:48:41</publishTime>
     </File>
     <File Include="fonts/glyphicons-halflings-regular.eot">
-      <publishTime>01/13/2021 21:47:30</publishTime>
+      <publishTime>05/06/2021 09:48:41</publishTime>
     </File>
     <File Include="fonts/glyphicons-halflings-regular.svg">
-      <publishTime>01/13/2021 21:47:30</publishTime>
+      <publishTime>05/06/2021 09:48:41</publishTime>
     </File>
     <File Include="fonts/glyphicons-halflings-regular.ttf">
-      <publishTime>01/13/2021 21:47:30</publishTime>
+      <publishTime>05/06/2021 09:48:41</publishTime>
     </File>
     <File Include="fonts/glyphicons-halflings-regular.woff">
-      <publishTime>01/13/2021 21:47:30</publishTime>
+      <publishTime>05/06/2021 09:48:41</publishTime>
     </File>
     <File Include="Global.asax">
-      <publishTime>01/13/2021 21:47:30</publishTime>
+      <publishTime>05/06/2021 09:48:41</publishTime>
     </File>
     <File Include="Index.html">
-      <publishTime>01/13/2021 21:47:30</publishTime>
+      <publishTime>05/06/2021 09:48:41</publishTime>
     </File>
     <File Include="Metadata/deploymentTemplates/apiappconfig.azureresource.json">
-      <publishTime>01/13/2021 21:47:30</publishTime>
+      <publishTime>05/06/2021 09:48:41</publishTime>
     </File>
     <File Include="packages.config">
-      <publishTime>01/21/2021 13:19:40</publishTime>
+      <publishTime>05/06/2021 09:48:41</publishTime>
     </File>
     <File Include="PrecompiledApp.config">
       <publishTime>05/07/2021 20:31:19</publishTime>
     </File>
     <File Include="Views/Scripts/bootstrap.js">
-      <publishTime>01/13/2021 21:47:30</publishTime>
+      <publishTime>05/06/2021 09:48:41</publishTime>
     </File>
     <File Include="Views/Scripts/bootstrap.min.js">
-      <publishTime>01/13/2021 21:47:30</publishTime>
+      <publishTime>05/06/2021 09:48:41</publishTime>
     </File>
     <File Include="Views/Scripts/jquery-1.10.2.js">
-      <publishTime>01/13/2021 21:47:30</publishTime>
+      <publishTime>05/06/2021 09:48:41</publishTime>
     </File>
     <File Include="Views/Scripts/jquery-1.10.2.min.js">
-      <publishTime>01/13/2021 21:47:30</publishTime>
+      <publishTime>05/06/2021 09:48:41</publishTime>
     </File>
     <File Include="Views/Scripts/jquery-1.10.2.min.map">
-      <publishTime>01/13/2021 21:47:30</publishTime>
+      <publishTime>05/06/2021 09:48:41</publishTime>
     </File>
     <File Include="Views/Scripts/jquery.validate.js">
-      <publishTime>01/13/2021 21:47:30</publishTime>
+      <publishTime>05/06/2021 09:48:41</publishTime>
     </File>
     <File Include="Views/Scripts/jquery.validate.min.js">
-      <publishTime>01/13/2021 21:47:30</publishTime>
+      <publishTime>05/06/2021 09:48:41</publishTime>
     </File>
     <File Include="Views/Scripts/jquery.validate.unobtrusive.js">
-      <publishTime>01/13/2021 21:47:30</publishTime>
+      <publishTime>05/06/2021 09:48:41</publishTime>
     </File>
     <File Include="Views/Scripts/jquery.validate.unobtrusive.min.js">
-      <publishTime>01/13/2021 21:47:30</publishTime>
+      <publishTime>05/06/2021 09:48:41</publishTime>
     </File>
     <File Include="Views/Scripts/modernizr-2.6.2.js">
-      <publishTime>01/13/2021 21:47:30</publishTime>
+      <publishTime>05/06/2021 09:48:41</publishTime>
     </File>
     <File Include="Views/Shared/Error.cshtml">
-      <publishTime>01/13/2021 21:47:30</publishTime>
+      <publishTime>05/06/2021 09:48:41</publishTime>
     </File>
     <File Include="Views/Shared/_Layout.cshtml">
-      <publishTime>01/13/2021 21:47:30</publishTime>
+      <publishTime>05/06/2021 09:48:41</publishTime>
     </File>
     <File Include="Views/web.config">
-      <publishTime>01/13/2021 21:47:30</publishTime>
+      <publishTime>05/06/2021 09:48:41</publishTime>
     </File>
     <File Include="Views/_ViewStart.cshtml">
-      <publishTime>01/13/2021 21:47:30</publishTime>
+      <publishTime>05/06/2021 09:48:41</publishTime>
     </File>
     <File Include="Web References/WebS/ClsCLD_Customer_Model.datasource">
-      <publishTime>02/22/2021 09:25:20</publishTime>
+      <publishTime>05/06/2021 09:48:41</publishTime>
     </File>
     <File Include="Web References/WebS/ClsCLD_Department_Model.datasource">
-      <publishTime>02/22/2021 09:25:20</publishTime>
+      <publishTime>05/06/2021 09:48:41</publishTime>
     </File>
     <File Include="Web References/WebS/ClsCLD_Employee_Model.datasource">
-      <publishTime>02/22/2021 09:25:20</publishTime>
+      <publishTime>05/06/2021 09:48:41</publishTime>
     </File>
     <File Include="Web References/WebS/ClsCLD_StockPlace_Model.datasource">
-      <publishTime>02/22/2021 09:25:20</publishTime>
+      <publishTime>05/06/2021 09:48:41</publishTime>
     </File>
     <File Include="Web References/WebS/ClsCLD_Supplier_Model.datasource">
-      <publishTime>02/22/2021 09:25:20</publishTime>
+      <publishTime>05/06/2021 09:48:41</publishTime>
     </File>
     <File Include="Web References/WebS/ClsCLD_Warehouse_Model.datasource">
-      <publishTime>02/22/2021 09:25:20</publishTime>
+      <publishTime>05/06/2021 09:48:41</publishTime>
     </File>
     <File Include="Web References/WebS/ClsGy_BadReason_Model.datasource">
-      <publishTime>02/22/2021 09:25:20</publishTime>
+      <publishTime>05/06/2021 09:48:41</publishTime>
     </File>
     <File Include="Web References/WebS/ClsGy_BarCodeBill_WMS_Model_View.datasource">
-      <publishTime>02/22/2021 09:25:21</publishTime>
+      <publishTime>05/06/2021 09:48:41</publishTime>
     </File>
     <File Include="Web References/WebS/ClsGy_Customer_Model.datasource">
-      <publishTime>02/22/2021 09:25:20</publishTime>
+      <publishTime>05/06/2021 09:48:41</publishTime>
     </File>
     <File Include="Web References/WebS/ClsGy_Department_Model.datasource">
-      <publishTime>02/22/2021 09:25:20</publishTime>
+      <publishTime>05/06/2021 09:48:41</publishTime>
     </File>
     <File Include="Web References/WebS/ClsGy_Employee_Model.datasource">
-      <publishTime>02/22/2021 09:25:21</publishTime>
+      <publishTime>05/06/2021 09:48:41</publishTime>
     </File>
     <File Include="Web References/WebS/ClsGy_Group_Model.datasource">
-      <publishTime>02/22/2021 09:25:20</publishTime>
+      <publishTime>05/06/2021 09:48:41</publishTime>
     </File>
     <File Include="Web References/WebS/ClsGy_Item30JiTai_Model.datasource">
-      <publishTime>02/22/2021 09:25:20</publishTime>
+      <publishTime>05/06/2021 09:48:41</publishTime>
     </File>
     <File Include="Web References/WebS/ClsGy_Source_Model.datasource">
-      <publishTime>02/22/2021 09:25:21</publishTime>
+      <publishTime>05/06/2021 09:48:41</publishTime>
     </File>
     <File Include="Web References/WebS/ClsGy_StockPlace_Model.datasource">
-      <publishTime>02/22/2021 09:25:20</publishTime>
+      <publishTime>05/06/2021 09:48:41</publishTime>
     </File>
     <File Include="Web References/WebS/ClsGy_Supplier_Model.datasource">
-      <publishTime>02/22/2021 09:25:21</publishTime>
+      <publishTime>05/06/2021 09:48:41</publishTime>
     </File>
     <File Include="Web References/WebS/ClsGy_Warehouse_Model.datasource">
-      <publishTime>02/22/2021 09:25:20</publishTime>
+      <publishTime>05/06/2021 09:48:41</publishTime>
     </File>
     <File Include="Web References/WebS/ClsKf_ICStockBill_WMS.datasource">
-      <publishTime>02/22/2021 09:25:20</publishTime>
+      <publishTime>05/06/2021 09:48:41</publishTime>
     </File>
     <File Include="Web.config">
-      <publishTime>05/16/2021 13:44:49</publishTime>
+      <publishTime>05/12/2021 09:06:24</publishTime>
     </File>
   </ItemGroup>
 </Project>
\ No newline at end of file
diff --git a/WebAPI/WebAPI.csproj b/WebAPI/WebAPI.csproj
index 94a1179..dbd9b7c 100644
--- a/WebAPI/WebAPI.csproj
+++ b/WebAPI/WebAPI.csproj
@@ -362,6 +362,7 @@
     <Compile Include="DLL\ClsSc_ProcessSendWork.cs" />
     <Compile Include="DLL\ClsWW_EntrustProcessReportBill.cs" />
     <Compile Include="DLL\ClsWW_EntrustProcessSendOutBill.cs" />
+    <Compile Include="DLL\ClsWW_EntrustWorkOrderBill.cs" />
     <Compile Include="Models\ApiConfig.cs" />
     <Compile Include="Models\ApiResult.cs" />
     <Compile Include="Models\ClsSc_ProcessSendWorkMain.cs" />
@@ -369,6 +370,8 @@
     <Compile Include="Models\ClsWW_EntrustProcessReportBillSub.cs" />
     <Compile Include="Models\ClsWW_EntrustProcessSendOutBillMain.cs" />
     <Compile Include="Models\ClsWW_EntrustProcessSendOutBillSub.cs" />
+    <Compile Include="Models\ClsWW_EntrustWorkOrderBillMain.cs" />
+    <Compile Include="Models\ClsWW_EntrustWorkOrderBillSub.cs" />
     <Compile Include="Models\DocumentsView.cs" />
     <Compile Include="Models\Gy_RoutingBillSub.cs" />
     <Compile Include="Models\LookingForBill.cs" />

--
Gitblit v1.9.1