From c07bb60b39a9fbf5c41a724c7060f45c821f93ff Mon Sep 17 00:00:00 2001
From: zrg <z18737863051@163.com>
Date: 星期一, 04 三月 2024 17:27:41 +0800
Subject: [PATCH] Merge branch 'master' of http://101.37.171.70:10101/r/MES-WEB-API

---
 DBUtility/业务单据/ClsXt_BaseBill.cs                            |   79 +++++
 WebAPI/Controllers/SCGL/Sc_ICMOChangeBillController.cs      |    6 
 WebAPI/Properties/PublishProfiles/FolderProfile.pubxml.user |  122 ++++----
 WebAPI/Controllers/XSGL/YS_ReceiveBillController.cs         |   45 +++
 WebAPI/Controllers/XSGL/Kf_SellOutBillController.cs         |   54 +++
 WebAPI/WebAPI.csproj.user                                   |    2 
 WebAPI/Controllers/XSGL/Xs_CusBalanceReportController.cs    |  149 ++++++++++
 WebAPI/Controllers/LMESController.cs                        |   24 +
 WebAPI/Controllers/XSGL/Xs_ReceivableBillController.cs      |   80 ++--
 WebAPI/Controllers/XSGL/Xs_SeOrderBillController.cs         |  216 +++++++++++++++
 WebAPI/Controllers/BaseSet/Gy_CustomerController.cs         |   34 +
 DAL/销售管理/ClsXs_SeOrderBill.cs                               |    5 
 Model/销售管理/ClsXs_SeOrderBillMain.cs                         |    1 
 WebAPI/WebAPI.csproj                                        |    1 
 14 files changed, 699 insertions(+), 119 deletions(-)

diff --git "a/DAL/\351\224\200\345\224\256\347\256\241\347\220\206/ClsXs_SeOrderBill.cs" "b/DAL/\351\224\200\345\224\256\347\256\241\347\220\206/ClsXs_SeOrderBill.cs"
index 5337995..596454a 100644
--- "a/DAL/\351\224\200\345\224\256\347\256\241\347\220\206/ClsXs_SeOrderBill.cs"
+++ "b/DAL/\351\224\200\345\224\256\347\256\241\347\220\206/ClsXs_SeOrderBill.cs"
@@ -94,6 +94,7 @@
                 ",HEmpID=" + omodel.HEmpID.ToString() +
                 ",HCurID=" + omodel.HCurID.ToString() +
                 ",HExRate=" + omodel.HExRate.ToString() +
+                ",HEarnestRate=" + omodel.HEarnestRate.ToString() +
                 ",HManagerID=" + omodel.HManagerID.ToString() +
                 ",HSellSID=" + omodel.HSellSID.ToString() +
                 ",HSSID=" + omodel.HSSID.ToString() +
@@ -270,7 +271,7 @@
                 //鎻掑叆涓昏〃
                 string mainSql = "Insert Into Xs_SeOrderBillMain" +
                     "(HYear,HPeriod,HBillType,HBillSubType,HBillStatus,HExplanation" +
-                    ",HInterID,HBillNo,HDate,HInnerBillNo,HAddress,HDeptID,HCusID,HEmpID,HCurID,HExRate,HManagerID,HSellSID,HSSID,HSSDate,HPayCusID,HRemark,HOrgID,HMaker,HMakeDate,HLinkMan,HLinkPhone" +
+                    ",HInterID,HBillNo,HDate,HInnerBillNo,HAddress,HDeptID,HCusID,HEmpID,HCurID,HExRate,HEarnestRate,HManagerID,HSellSID,HSSID,HSSDate,HPayCusID,HRemark,HOrgID,HMaker,HMakeDate,HLinkMan,HLinkPhone" +
                     ",HERPInterID,HERPBillType,HSALEORGID,HSALEGROUPID,HRECEIVEID,HSETTLEID,HCHARGEID,HHEADLOCID,HRECCONTACTID,HCORRESPONDORGID,HBUSINESSTYPE) " +
                     "values(" +
                     "" + omodel.HYear +
@@ -290,6 +291,7 @@
                     "," + omodel.HEmpID +
                     "," + omodel.HCurID +
                     "," + omodel.HExRate +
+                    "," + omodel.HEarnestRate +
                     "," + omodel.HManagerID +
                     "," + omodel.HSellSID +
                     "," + omodel.HSSID +
@@ -460,6 +462,7 @@
                 omodel.HCusID = DBUtility.ClsPub.isLong(Ds.Tables[0].Rows[0]["HCusID"]);
                 omodel.HCurID = DBUtility.ClsPub.isLong(Ds.Tables[0].Rows[0]["HCurID"]);
                 omodel.HExRate = DBUtility.ClsPub.isSingle(Ds.Tables[0].Rows[0]["HExRate"]);
+                omodel.HEarnestRate = DBUtility.ClsPub.isDoule(Ds.Tables[0].Rows[0]["HEarnestRate"]);
                 omodel.HEmpID = DBUtility.ClsPub.isLong(Ds.Tables[0].Rows[0]["HEmpID"]);
                 omodel.HManagerID = DBUtility.ClsPub.isLong(Ds.Tables[0].Rows[0]["HManagerID"]);
                 omodel.HDeptID = DBUtility.ClsPub.isLong(Ds.Tables[0].Rows[0]["HDeptID"]);
diff --git "a/DBUtility/\344\270\232\345\212\241\345\215\225\346\215\256/ClsXt_BaseBill.cs" "b/DBUtility/\344\270\232\345\212\241\345\215\225\346\215\256/ClsXt_BaseBill.cs"
index c98eef1..f21f2eb 100644
--- "a/DBUtility/\344\270\232\345\212\241\345\215\225\346\215\256/ClsXt_BaseBill.cs"
+++ "b/DBUtility/\344\270\232\345\212\241\345\215\225\346\215\256/ClsXt_BaseBill.cs"
@@ -178,6 +178,43 @@
                 throw (e);
             }
         }
+        //琛屽弽鍏抽棴鍗曟嵁(鍖呭惈鍐欏叆鏃ュ織)    2024-01-31
+        public bool CancelRow(Int64 lngBillKey,Int64 HEntryID, string HBillNo, string sUser, ref string sReturn)
+        {
+            try
+            {
+                oCn.BeginTran();
+                string sql = "select * from " + MvarItemKeySub + " where HInterID=" + lngBillKey.ToString() + " and HEntryID = " + HEntryID;
+                DataSet ds = oCn.RunProcReturn(sql, MvarItemKeySub);
+                if(ds==null || ds.Tables[0].Rows.Count == 0)
+                {
+                    sReturn = "琛岃褰曚笉瀛樺湪锛�";
+                    return false;
+                }
+                else
+                {
+                    sql = " Update " + MvarItemKeySub + " set HCloseMan='',HEntryCloseDate='',HCloseType=0 Where HInterID=" + lngBillKey.ToString() + " and HEntryID = " + HEntryID;
+                    oCn.RunProc(sql);
+                }
+
+                //鍐欏叆鏃ュ織
+                string WorkList = "琛屽弽鍏抽棴锛屽崟鎹彿锛�" + HBillNo + "锛涘瓙琛ㄥ唴鐮侊細" + HEntryID;
+                string SystemName = "LMES-" + MvarReportTitle + "妯″潡";
+                oCn.RunProc("Insert into  System_Log(GeginDate,userid,WorkstationName,WorkList,SystemName,NetUserName,State) values " +
+                    "(getdate(),'" + sUser + "','" + ComputerName + "','" + WorkList + "','" + SystemName + "','" + IPAddress + "','琛屽弽鍏抽棴')"
+                    );
+
+                sReturn = "琛屽弽鍏抽棴鎴愬姛锛�";
+                oCn.Commit();
+                return true;
+            }
+            catch (Exception e)
+            {
+                sReturn = e.Message;
+                oCn.RollBack();
+                throw (e);
+            }
+        }
         //鍙嶅鏍�
         public bool AbandonCheck(Int64 lngBillKey, ref string sReturn)
         {
@@ -367,7 +404,7 @@
             {
                 string HCloseMan = ClsPub.CurUserName;
                 string HCloseDate = ClsPub.GetServerDate(-1); 
-                oCn.RunProc(" Update " + MvarItemKey + " set HCloseMan='" + HCloseMan + "',HCloseDate='" + HCloseDate + "',HBillStatus=3 Where HInterID=" + lngBillKey.ToString());
+                oCn.RunProc(" Update " + MvarItemKey + " set HCloseMan='" + HCloseMan + "',HCloseDate='" + HCloseDate + "',HBillStatus=3,HCloseType = 1 Where HInterID=" + lngBillKey.ToString());
                 sReturn = "";
                 return true;
             }
@@ -405,6 +442,46 @@
                 throw (e);
             }
         }
+        //琛屽叧闂崟鎹�(鍖呭惈鍐欏叆鏃ュ織)    2024-01-31
+        public bool CloseRow(Int64 lngBillKey,Int64 HEntryID, string HBillNo, string sUser, ref string sReturn)
+        {
+            DataSet ds;
+            try
+            {
+                oCn.BeginTran();
+                string HCloseMan = sUser;
+                string HEntryCloseDate = ClsPub.GetServerDate(-1);
+                //鍙樻洿琛屽叧闂姸鎬�
+                string sql = " Update " + MvarItemKeySub + " set HCloseMan='" + HCloseMan + "',HEntryCloseDate='" + HEntryCloseDate + "',HCloseType=1 Where HInterID=" + lngBillKey.ToString() + " and HEntryID = " + HEntryID;
+                oCn.RunProc(sql);
+
+                //妫�鏌ュ崟鎹瓙琛ㄦ墍鏈夎鏄惁閮藉叧闂紝鑻ラ兘鍏抽棴鍒欒嚜鍔ㄥ叧闂崟鎹�
+                //sql = "select * from " + MvarItemKeySub + " where HInterID=" + lngBillKey + " and HCloseMan=''";
+                //ds = oCn.RunProcReturn(sql, MvarItemKeySub);
+                //if(ds!=null && ds.Tables[0].Rows.Count == 0)
+                //{
+                //    sql = " Update " + MvarItemKey + " set HCloseMan='" + HCloseMan + "',HCloseDate=getdate(),HBillStatus=3,HCloseType = 0 Where HInterID=" + lngBillKey.ToString();
+                //    oCn.RunProc(sql);
+                //}
+
+                //鍐欏叆鏃ュ織
+                string WorkList = "琛屽叧闂紝鍗曟嵁鍙凤細" + HBillNo + "锛涘瓙琛ㄥ唴鐮侊細" + HEntryID;
+                string SystemName = "LMES-" + MvarReportTitle + "妯″潡";
+                oCn.RunProc("Insert into  System_Log(GeginDate,userid,WorkstationName,WorkList,SystemName,NetUserName,State) values " +
+                    "(getdate(),'" + sUser + "','" + ComputerName + "','" + WorkList + "','" + SystemName + "','" + IPAddress + "','琛屽叧闂�')"
+                    );
+
+                sReturn = "琛屽叧闂垚鍔燂紒";
+                oCn.Commit();
+                return true;
+            }
+            catch (Exception e)
+            {
+                sReturn = e.Message;
+                oCn.RollBack();
+                throw (e);
+            }
+        }
         //浣滃簾
         public bool Cancelltion(Int64 lngBillKey, ref string sReturn)
         {
diff --git "a/Model/\351\224\200\345\224\256\347\256\241\347\220\206/ClsXs_SeOrderBillMain.cs" "b/Model/\351\224\200\345\224\256\347\256\241\347\220\206/ClsXs_SeOrderBillMain.cs"
index c7d23bd..441374c 100644
--- "a/Model/\351\224\200\345\224\256\347\256\241\347\220\206/ClsXs_SeOrderBillMain.cs"
+++ "b/Model/\351\224\200\345\224\256\347\256\241\347\220\206/ClsXs_SeOrderBillMain.cs"
@@ -16,6 +16,7 @@
         public Int64 HEmpID;            //      int       		--业务员  (Gy_Employee)
         public Int64 HCurID;            //      int      		--币别 (Gy_Currency)
         public Single HExRate;          //      money      		--汇率  (选择完币别带出)
+        public double HEarnestRate;     //      money           --定金比例%
         public Int64 HManagerID;        //      int     		--主管	(Gy_Employee)
         public Int64 HSellSID;          //	    int 			--销售方式 (Gy_SellStyle)		new
         public Int64 HSSID;             //	    int				--结算方式 (Gy_SettleStyle)
diff --git a/WebAPI/Controllers/BaseSet/Gy_CustomerController.cs b/WebAPI/Controllers/BaseSet/Gy_CustomerController.cs
index 29c81c0..0d13801 100644
--- a/WebAPI/Controllers/BaseSet/Gy_CustomerController.cs
+++ b/WebAPI/Controllers/BaseSet/Gy_CustomerController.cs
@@ -747,25 +747,37 @@
                         return objJsonResult;
                     }
                     //
-                    if (oDept.DeleteByID(HItemID))
+                    try
                     {
-                        //鍐欏叆鏃ュ織
-                        ClsPub.Add_Log("", "鍒犻櫎椤圭洰锛屼唬鐮侊細" + oDeptHlp.omodel.HNumber + ",鍚嶇О锛�" + oDeptHlp.omodel.HName, ClsPub.CurUserName);
-                        //鏇存柊涓婄骇涓� 鏈骇
-                        objJsonResult.code = "1";
-                        objJsonResult.count = 1;
-                        objJsonResult.Message = "鍒犻櫎鎴愬姛";
-                        objJsonResult.data = null;
-                        return objJsonResult;
+                        if (oDept.DeleteByID(HItemID))
+                        {
+                            //鍐欏叆鏃ュ織
+                            ClsPub.Add_Log("", "鍒犻櫎椤圭洰锛屼唬鐮侊細" + oDeptHlp.omodel.HNumber + ",鍚嶇О锛�" + oDeptHlp.omodel.HName, ClsPub.CurUserName);
+                            //鏇存柊涓婄骇涓� 鏈骇
+                            objJsonResult.code = "1";
+                            objJsonResult.count = 1;
+                            objJsonResult.Message = "鍒犻櫎鎴愬姛";
+                            objJsonResult.data = null;
+                            return objJsonResult;
+                        }
+                        else
+                        {
+                            objJsonResult.code = "0";
+                            objJsonResult.count = 0;
+                            objJsonResult.Message = "鍒犻櫎澶辫触";
+                            objJsonResult.data = null;
+                            return objJsonResult;
+                        }
                     }
-                    else
+                    catch (Exception e)
                     {
                         objJsonResult.code = "0";
                         objJsonResult.count = 0;
-                        objJsonResult.Message = "鍒犻櫎澶辫触";
+                        objJsonResult.Message = "鍒犻櫎澶辫触锛岃瀹㈡埛瀛樺湪鍏宠仈鐨勯攢鍞鍗曘�侀攢鍞嚭搴撳崟銆佺敓浜ц鍗曪紝鎴栫▼搴忛敊璇��";
                         objJsonResult.data = null;
                         return objJsonResult;
                     }
+                    
                 }
                 //ds = oCN.RunProcReturn("delete from Gy_Department where HItemID =  " + HItemID, "Gy_Department");
 
diff --git a/WebAPI/Controllers/LMESController.cs b/WebAPI/Controllers/LMESController.cs
index a0f8cec..1824817 100644
--- a/WebAPI/Controllers/LMESController.cs
+++ b/WebAPI/Controllers/LMESController.cs
@@ -104,7 +104,29 @@
                 }
 
                 SQLHelper.ClsCN oCN = new SQLHelper.ClsCN();
-                ds = oCN.RunProcReturn("select * from h_v_Sc_ProcessExchangeBillQuery where 1 = 1 " + sWhere + " order by hmainid desc ", "h_v_Sc_ProcessExchangeBillQuery");
+
+                
+                //鍒ゆ柇鐢ㄦ埛鏄惁鎷ユ湁鏌ョ湅鎵�鏈夊鎴锋潈闄�
+                if (DBUtility.ClsPub.Security_Log_second("Gy_UserLookAllCus", 1, false, user))
+                {
+                    ds = oCN.RunProcReturn("select * from h_v_Sc_ProcessExchangeBillQuery where 1 = 1 " + sWhere + " order by hmainid desc ", "h_v_Sc_ProcessExchangeBillQuery");
+                }
+                else
+                {
+                    //鑾峰彇鐢ㄦ埛缂栫爜
+                    string sql = "select * from Gy_Czygl where Czymc = '" + user + "'";
+                    ds = oCN.RunProcReturn(sql, "Gy_Czygl");
+                    string userID = ds.Tables[0].Rows[0]["Czybm"].ToString();
+
+                    string sql1 = " and HCusID in (select HCusID from Gy_UserCustomerRelation Where HUserID = '" + userID + "')";
+                    string sql2 = "select * from h_v_Sc_ProcessExchangeBillQuery where 1 = 1 " + sWhere + sql1 + " order by hmainid desc ";
+                    ds = oCN.RunProcReturn(sql2, "h_v_Sc_ProcessExchangeBillQuery");
+                }
+
+
+
+
+                
 
 
                 //娣诲姞鍒楀悕
diff --git a/WebAPI/Controllers/SCGL/Sc_ICMOChangeBillController.cs b/WebAPI/Controllers/SCGL/Sc_ICMOChangeBillController.cs
index e78e6ca..44988ea 100644
--- a/WebAPI/Controllers/SCGL/Sc_ICMOChangeBillController.cs
+++ b/WebAPI/Controllers/SCGL/Sc_ICMOChangeBillController.cs
@@ -488,8 +488,10 @@
                     }
 
                     //妫�鏌ユ簮鍗曟槸鍚﹀瓨鍦�
-                    string sql = "select * from Sc_ICMOBillSub where HInterID = " + oBill.omodel.HMainSourceInterID + " and HEntryID =" + oBill.omodel.HMainSourceEntryID;
-                    ds = oCN.RunProcReturn(sql, "Sc_ICMOBillSub");
+                    string sql = "select * from Sc_ICMOBillMain as a " +
+                        " inner join Sc_ICMOBillSub as b on a.HInterID = b.HInterID " +
+                        " where b.HInterID = " + oBill.omodel.HMainSourceInterID + " and b.HEntryID =" + oBill.omodel.HMainSourceEntryID;
+                    ds = oCN.RunProcReturn(sql, "Sc_ICMOBill");
                     if(ds==null || ds.Tables[0].Rows.Count == 0)
                     {
                         objJsonResult.code = "0";
diff --git a/WebAPI/Controllers/XSGL/Kf_SellOutBillController.cs b/WebAPI/Controllers/XSGL/Kf_SellOutBillController.cs
index 58ee9ae..33bce9c 100644
--- a/WebAPI/Controllers/XSGL/Kf_SellOutBillController.cs
+++ b/WebAPI/Controllers/XSGL/Kf_SellOutBillController.cs
@@ -1029,5 +1029,59 @@
             }
         }
         #endregion
+
+        #region 閿�鍞嚭搴撳崟 妫�鏌ュ崟鎹槸鍚﹀瓨鍦�
+        /// <summary>
+        /// </summary>
+        /// <param name="HInterID">鍗曟嵁ID</param>
+        /// <returns></returns>
+        [Route("Kf_SellOutBill/CheckSellOutBill_IsExist")]
+        [HttpGet]
+        public object CheckSellOutBill_IsExist(int HInterID)
+        {
+            try
+            {
+                //HInterID鏁版嵁鍒ゆ柇
+                if (HInterID <= 0)
+                {
+                    objJsonResult.code = "0";
+                    objJsonResult.count = 0;
+                    objJsonResult.Message = "HInterID灏忎簬0锛�";
+                    objJsonResult.data = null;
+                    return objJsonResult;
+                }
+
+                Int64 lngBillKey = 0;
+                lngBillKey = DBUtility.ClsPub.isLong(HInterID);                                         //瀵笻InterID杩涜绫诲瀷鐨勮浆鎹�
+                DAL.ClsKf_SellOutBill oBill = new DAL.ClsKf_SellOutBill();                              //瀹炰緥鍖栧崟鎹搷浣滅被锛岀敤浜庤繘琛岀浉鍏虫搷浣�
+
+                //閽堝闇�瑕佽繘琛岀殑鎿嶄綔锛屾楠屽綋鍓嶅崟鎹殑鐘舵�佹槸鍚︽敮鎸侀渶瑕佽繘琛岀殑鎿嶄綔
+                if (oBill.ShowBill(lngBillKey, ref DBUtility.ClsPub.sExeReturnInfo))                    //鏍规嵁HInterID鑾峰彇璇ュ崟鎹殑鏁版嵁
+                {
+                    objJsonResult.code = "1";
+                    objJsonResult.count = 1;
+                    objJsonResult.Message = "鍗曟嵁瀛樺湪";
+                    objJsonResult.data = null;
+                    return objJsonResult;
+                }
+                else
+                {
+                    objJsonResult.code = "0";
+                    objJsonResult.count = 0;
+                    objJsonResult.Message = "鍗曟嵁涓嶅瓨鍦�!鍘熷洜:" + DBUtility.ClsPub.sExeReturnInfo;
+                    objJsonResult.data = null;
+                    return objJsonResult;
+                }
+            }
+            catch (Exception e)
+            {
+                objJsonResult.code = "0";
+                objJsonResult.count = 0;
+                objJsonResult.Message = "绋嬪簭閿欒锛�" + e.ToString();
+                objJsonResult.data = null;
+                return objJsonResult;
+            }
+        }
+        #endregion
     }
 }
\ No newline at end of file
diff --git a/WebAPI/Controllers/XSGL/Xs_CusBalanceReportController.cs b/WebAPI/Controllers/XSGL/Xs_CusBalanceReportController.cs
new file mode 100644
index 0000000..4aa172b
--- /dev/null
+++ b/WebAPI/Controllers/XSGL/Xs_CusBalanceReportController.cs
@@ -0,0 +1,149 @@
+锘縰sing Newtonsoft.Json;
+using Newtonsoft.Json.Linq;
+using Pub_Class;
+using System;
+using System.Collections;
+using System.Collections.Generic;
+using System.Data;
+using System.Data.SqlClient;
+using System.Web.Http;
+using WebAPI.Models;
+using System.IO;
+using System.Web;
+using WebAPI.Controllers.SCGL.鏃ヨ鍒掔鐞�;
+
+namespace WebAPI.Controllers
+{
+    //瀹㈡埛浣欓鏌ヨ鎶ヨ〃Controller
+    public class Xs_CusBalanceReportController : ApiController
+    {
+        //鑾峰彇绯荤粺鍙傛暟
+        Pub_Class.ClsXt_SystemParameter oSystemParameter = new Pub_Class.ClsXt_SystemParameter();
+        public DBUtility.ClsPub.Enum_BillStatus BillStatus;
+
+        private json objJsonResult = new json();
+        SQLHelper.ClsCN oCN = new SQLHelper.ClsCN();
+        DataSet ds;
+
+        #region 瀹㈡埛浣欓鏌ヨ鎶ヨ〃 鏌ヨ
+        /// <summary>
+        ///鍙傛暟锛歴tring sql銆�
+        ///杩斿洖鍊硷細object銆�
+        /// </summary>
+        [Route("Xs_CusBalanceReport/list")]
+        [HttpGet]
+        public object getXs_CusBalanceReport(string sWhere, string user, string userid)
+        {
+            try
+            {
+                List<object> columnNameList = new List<object>();
+                ////鏌ョ湅鏉冮檺
+                if (!DBUtility.ClsPub.Security_Log("Xs_CusBalanceReport_Query", 1, false, user))
+                {
+                    objJsonResult.code = "0";
+                    objJsonResult.count = 0;
+                    objJsonResult.Message = "鏃犳煡鐪嬫潈闄愶紒";
+                    objJsonResult.data = null;
+                    return objJsonResult;
+                }
+
+
+                //鏌ヨ
+                if (sWhere == null || sWhere.Equals(""))
+                {
+                    string sql = "exec h_p_Xs_CusBalanceReport_Query '','" + userid + "'";
+                    ds = oCN.RunProcReturn(sql, "h_p_Xs_CusBalanceReport_Query");
+                }
+                else
+                {
+                    string sql = "exec h_p_Xs_CusBalanceReport_Query '" + sWhere + "','" + userid + "'";
+                    ds = oCN.RunProcReturn(sql, "h_p_Xs_CusBalanceReport_Query");
+                }
+
+                //娣诲姞鍒楀悕
+                foreach (DataColumn col in ds.Tables[0].Columns)
+                {
+                    Type dataType = col.DataType;
+                    string ColmString = "{\"ColmCols\":\"" + col.ColumnName + "\",\"ColmType\":\"" + dataType.Name + "\"}";
+                    columnNameList.Add(JsonConvert.DeserializeObject(ColmString));//鑾峰彇鍒癉ataColumn鍒楀璞$殑鍒楀悕
+                }
+
+                objJsonResult.code = "1";
+                objJsonResult.count = 1;
+                objJsonResult.Message = "Sucess锛�";
+                objJsonResult.data = ds.Tables[0];
+                objJsonResult.list = columnNameList;
+                return objJsonResult;
+            }
+            catch (Exception e)
+            {
+                objJsonResult.code = "0";
+                objJsonResult.count = 0;
+                objJsonResult.Message = "Exception锛�" + e.ToString();
+                objJsonResult.data = null;
+                return objJsonResult;
+            }
+        }
+        #endregion
+
+        #region 瀹㈡埛浣欓鏌ヨ鎶ヨ〃 鍗犵敤棰濆害鏄庣粏
+        /// <summary>
+        ///鍙傛暟锛歴tring sql銆�
+        ///杩斿洖鍊硷細object銆�
+        /// </summary>
+        [Route("Xs_CusBalanceReport/getHIsUsingBalanceEntry")]
+        [HttpGet]
+        public object getHIsUsingBalanceEntry(string sWhere,Int64 HCusID, string user, string userid)
+        {
+            try
+            {
+                List<object> columnNameList = new List<object>();
+                //////鏌ョ湅鏉冮檺
+                //if (!DBUtility.ClsPub.Security_Log("Xs_CusBalanceReport_Query", 1, false, user))
+                //{
+                //    objJsonResult.code = "0";
+                //    objJsonResult.count = 0;
+                //    objJsonResult.Message = "鏃犳煡鐪嬫潈闄愶紒";
+                //    objJsonResult.data = null;
+                //    return objJsonResult;
+                //}
+
+                //鏌ヨ
+                if (sWhere == null || sWhere.Equals(""))
+                {
+                    string sql = "exec h_p_Xs_CusBalanceReport_Query '','" + userid + "'";
+                    ds = oCN.RunProcReturn(sql, "h_p_Xs_CusBalanceReport_Query");
+                }
+                else
+                {
+                    string sql = "exec h_p_Xs_CusBalanceReport_Query '" + sWhere + "','" + userid + "'";
+                    ds = oCN.RunProcReturn(sql, "h_p_Xs_CusBalanceReport_Query");
+                }
+
+                //娣诲姞鍒楀悕
+                foreach (DataColumn col in ds.Tables[0].Columns)
+                {
+                    Type dataType = col.DataType;
+                    string ColmString = "{\"ColmCols\":\"" + col.ColumnName + "\",\"ColmType\":\"" + dataType.Name + "\"}";
+                    columnNameList.Add(JsonConvert.DeserializeObject(ColmString));//鑾峰彇鍒癉ataColumn鍒楀璞$殑鍒楀悕
+                }
+
+                objJsonResult.code = "1";
+                objJsonResult.count = 1;
+                objJsonResult.Message = "Sucess锛�";
+                objJsonResult.data = ds.Tables[0];
+                objJsonResult.list = columnNameList;
+                return objJsonResult;
+            }
+            catch (Exception e)
+            {
+                objJsonResult.code = "0";
+                objJsonResult.count = 0;
+                objJsonResult.Message = "Exception锛�" + e.ToString();
+                objJsonResult.data = null;
+                return objJsonResult;
+            }
+        }
+        #endregion
+    }
+}
\ No newline at end of file
diff --git a/WebAPI/Controllers/XSGL/Xs_ReceivableBillController.cs b/WebAPI/Controllers/XSGL/Xs_ReceivableBillController.cs
index 03f0323..02e88d1 100644
--- a/WebAPI/Controllers/XSGL/Xs_ReceivableBillController.cs
+++ b/WebAPI/Controllers/XSGL/Xs_ReceivableBillController.cs
@@ -38,14 +38,14 @@
             {
                 List<object> columnNameList = new List<object>();
                 //鏌ョ湅鏉冮檺
-                //if (!DBUtility.ClsPub.Security_Log("Xs_ReceivableBill_Query", 1, false, user))
-                //{
-                //    objJsonResult.code = "0";
-                //    objJsonResult.count = 0;
-                //    objJsonResult.Message = "鏃犳煡鐪嬫潈闄愶紒";
-                //    objJsonResult.data = null;
-                //    return objJsonResult;
-                //}
+                if (!DBUtility.ClsPub.Security_Log("Xs_ReceivableBill_Query", 1, false, user))
+                {
+                    objJsonResult.code = "0";
+                    objJsonResult.count = 0;
+                    objJsonResult.Message = "鏃犳煡鐪嬫潈闄愶紒";
+                    objJsonResult.data = null;
+                    return objJsonResult;
+                }
 
                 if (sWhere == null || sWhere.Equals(""))
                 {
@@ -105,14 +105,14 @@
             try
             {
                 //缂栬緫鏉冮檺
-                //if (!DBUtility.ClsPub.Security_Log_second("Xs_ReceivableBill_Edit", 1, false, msg4))
-                //{
-                //    objJsonResult.code = "0";
-                //    objJsonResult.count = 0;
-                //    objJsonResult.Message = "鏃犱繚瀛樻潈闄愶紒";
-                //    objJsonResult.data = null;
-                //    return objJsonResult;
-                //}
+                if (!DBUtility.ClsPub.Security_Log_second("Xs_ReceivableBill_Edit", 1, false, msg4))
+                {
+                    objJsonResult.code = "0";
+                    objJsonResult.count = 0;
+                    objJsonResult.Message = "鏃犱繚瀛樻潈闄愶紒";
+                    objJsonResult.data = null;
+                    return objJsonResult;
+                }
 
                 DAL.ClsXs_ReceivableBill oBill = new DAL.ClsXs_ReceivableBill();
                 List<Model.ClsXs_ReceivableBillMain> lsmain = new List<Model.ClsXs_ReceivableBillMain>();
@@ -301,14 +301,14 @@
                 string s = "";
 
                 //鏌ョ湅鏉冮檺
-                //if (!DBUtility.ClsPub.Security_Log("Xs_ReceivableBill_Drop", 1, false, user))
-                //{
-                //    objJsonResult.code = "0";
-                //    objJsonResult.count = 0;
-                //    objJsonResult.Message = "鏃犲垹闄ゆ潈闄愶紒";
-                //    objJsonResult.data = null;
-                //    return objJsonResult;
-                //}
+                if (!DBUtility.ClsPub.Security_Log("Xs_ReceivableBill_Drop", 1, false, user))
+                {
+                    objJsonResult.code = "0";
+                    objJsonResult.count = 0;
+                    objJsonResult.Message = "鏃犲垹闄ゆ潈闄愶紒";
+                    objJsonResult.data = null;
+                    return objJsonResult;
+                }
 
                 if (HInterID == null || HInterID.Equals(""))
                 {
@@ -427,14 +427,14 @@
             try
             {
                 //瀹℃牳鏉冮檺
-                //if (!DBUtility.ClsPub.Security_Log_second(ModRightNameCheck, 1, false, CurUserName))
-                //{
-                //    objJsonResult.code = "0";
-                //    objJsonResult.count = 0;
-                //    objJsonResult.Message = "瀹℃牳澶辫触锛佹棤鏉冮檺锛�";
-                //    objJsonResult.data = null;
-                //    return objJsonResult;
-                //}
+                if (!DBUtility.ClsPub.Security_Log_second(ModRightNameCheck, 1, false, CurUserName))
+                {
+                    objJsonResult.code = "0";
+                    objJsonResult.count = 0;
+                    objJsonResult.Message = "瀹℃牳澶辫触锛佹棤鏉冮檺锛�";
+                    objJsonResult.data = null;
+                    return objJsonResult;
+                }
                 //HInterID鏁版嵁鍒ゆ柇
                 if (HInterID <= 0)
                 {
@@ -631,14 +631,14 @@
             try
             {
                 //妫�鏌ユ潈闄�
-                //if (!DBUtility.ClsPub.Security_Log_second(ModRightNameCheck, 1, false, CurUserName))
-                //{
-                //    objJsonResult.code = "0";
-                //    objJsonResult.count = 0;
-                //    objJsonResult.Message = "鍏抽棴澶辫触锛佹棤鏉冮檺锛�";
-                //    objJsonResult.data = null;
-                //    return objJsonResult;
-                //}
+                if (!DBUtility.ClsPub.Security_Log_second(ModRightNameCheck, 1, false, CurUserName))
+                {
+                    objJsonResult.code = "0";
+                    objJsonResult.count = 0;
+                    objJsonResult.Message = "鍏抽棴澶辫触锛佹棤鏉冮檺锛�";
+                    objJsonResult.data = null;
+                    return objJsonResult;
+                }
                 //HInterID鏁版嵁鍒ゆ柇
                 if (HInterID <= 0)
                 {
diff --git a/WebAPI/Controllers/XSGL/Xs_SeOrderBillController.cs b/WebAPI/Controllers/XSGL/Xs_SeOrderBillController.cs
index ce31d58..5df7cf7 100644
--- a/WebAPI/Controllers/XSGL/Xs_SeOrderBillController.cs
+++ b/WebAPI/Controllers/XSGL/Xs_SeOrderBillController.cs
@@ -1153,6 +1153,17 @@
                             objJsonResult.data = 1;
                             return objJsonResult;
                         }
+
+                        string sql = "select count(*) Xs_ExceptiveCheckRequestBillCount from Xs_ExceptiveCheckRequestBillMain where HMainSourceInterID = " + BillOld.omodel.HInterID;
+                        ds = oCN.RunProcReturn(sql, "Xs_ExceptiveCheckRequestBillMain");
+                        if (ds != null && Int64.Parse(ds.Tables[0].Rows[0]["Xs_ExceptiveCheckRequestBillCount"].ToString()) > 0)
+                        {
+                            objJsonResult.code = "0";
+                            objJsonResult.count = 0;
+                            objJsonResult.Message = "淇濆瓨澶辫触锛屽崟鎹瓨鍦ㄤ笅娓稿崟鎹甗鐗规壒鐢宠鍗昡锛�";
+                            objJsonResult.data = 1;
+                            return objJsonResult;
+                        }
                     }
                     UserName = oItem.HMaker;  //鍒跺崟浜�
                     oItem.HBillType = "1401";
@@ -1549,7 +1560,7 @@
                 if (IsAudit == 1) //鍙嶅鏍告彁浜�
                 {
                     //鍙嶅鏍稿墠鎺у埗=========================================
-                    DataSet ds = oCN.RunProcReturn("Exec h_p_Xs_SeOrderBill_BeforeAbandonCheckCtrl " + lngBillKey, "h_p_Xs_SeOrderBill_BeforeAbandonCheckCtrl");
+                    DataSet ds = oCN.RunProcReturn("Exec h_p_Xs_SeOrderBill_BeforeAbandonCheckCtrl " + oBill.omodel.HInterID + ",'" + oBill.omodel.HBillNo + "','" + CurUserName + "'", "h_p_Xs_SeOrderBill_BeforeAbandonCheckCtrl");
                     if (ds == null)
                     {
                         objJsonResult.code = "0";
@@ -1612,6 +1623,7 @@
         {
             string ModRightNameCheck = "Xs_SeOrderBill_Close";
             DBUtility.ClsPub.CurUserName = CurUserName;
+            string sql = "";
             try
             {
                 //妫�鏌ユ潈闄�
@@ -1678,6 +1690,18 @@
                             objJsonResult.data = null;
                             return objJsonResult;
                         }
+
+                        //鍒ゆ柇鍗曟嵁鏄惁涓鸿嚜鍔ㄥ叧闂�
+                        sql = "select * from Xs_SeOrderBillMain where HInterID = " + HInterID;
+                        ds = oCN.RunProcReturn(sql, "Xs_SeOrderBillMain");
+                        if (ds.Tables[0].Rows[0]["HCloseType"].ToString() == "False")
+                        {
+                            objJsonResult.code = "0";
+                            objJsonResult.count = 0;
+                            objJsonResult.Message = "鍙嶅叧闂け璐�!鍗曟嵁涓鸿嚜鍔ㄥ叧闂紝涓嶈兘杩涜鎵嬪姩鍙嶅叧闂紒";
+                            objJsonResult.data = null;
+                            return objJsonResult;
+                        }
                     }
                 }
                 else
@@ -1713,9 +1737,199 @@
                 }
                 if (IsAudit == 1) //鍙嶅叧闂彁浜�
                 {
+                    oBill.oCn.BeginTran();
                     //鍙嶅叧闂彁浜�
                     if (oBill.CancelClose(lngBillKey, ref DBUtility.ClsPub.sExeReturnInfo) == true)
                     {
+                        ds = oCN.RunProcReturn("exec h_p_Kf_CheckSeOrderBill_CrediControl " + oBill.omodel.HInterID, "h_p_Kf_CheckSeOrderBill_CrediControl");
+                        if (ds.Tables[0].Rows[0]["HBack"].ToString() == "1")
+                        {
+                            objJsonResult.code = "0";
+                            objJsonResult.count = 0;
+                            objJsonResult.Message = "瀹℃牳澶辫触!鍘熷洜:" + ds.Tables[0].Rows[0]["HRemark"].ToString();
+                            objJsonResult.data = null;
+                            oBill.oCn.RollBack();
+                            return objJsonResult;
+                        }
+
+                        oBill.oCn.Commit();
+                        objJsonResult.code = "1";
+                        objJsonResult.count = 1;
+                        objJsonResult.Message = "鍙嶅叧闂垚鍔�";
+                        objJsonResult.data = null;
+                        return objJsonResult;
+                    }
+                    else
+                    {
+                        objJsonResult.code = "0";
+                        objJsonResult.count = 0;
+                        objJsonResult.Message = "鍙嶅叧闂け璐�!鍘熷洜:" + DBUtility.ClsPub.sExeReturnInfo;
+                        objJsonResult.data = null;
+                        oBill.oCn.RollBack();
+                        return objJsonResult;
+                    }
+                }
+                return objJsonResult;
+            }
+            catch (Exception e)
+            {
+                objJsonResult.code = "0";
+                objJsonResult.count = 0;
+                objJsonResult.Message = "鍏抽棴澶辫触鎴栬�呭弽鍏抽棴澶辫触锛�" + e.ToString();
+                objJsonResult.data = null;
+                return objJsonResult;
+            }
+        }
+        #endregion
+
+        #region 閿�鍞鍗� 琛屽叧闂�/琛屽弽鍏抽棴
+        /// <summary>
+        /// </summary>
+        /// <param name="HInterID">鍗曟嵁ID</param>
+        /// <param name="IsAudit">鍏抽棴(0),鍙嶅叧闂�(1)</param>
+        /// <param name="CurUserName">鍏抽棴浜�</param>
+        /// <returns></returns>
+        [Route("Xs_SeOrderBill/CloseRowXs_SeOrderBill")]
+        [HttpGet]
+        public object CloseRowXs_SeOrderBill(int HInterID,int HEntryID, int IsAudit, string CurUserName)
+        {
+            string ModRightNameCheck = "Xs_SeOrderBill_Close";
+            string SubBillName = "Xs_SeOrderBillSub";                   //瀛愯〃琛ㄥ悕
+            DBUtility.ClsPub.CurUserName = CurUserName;
+            DataSet ds = null;
+            try
+            {
+                //妫�鏌ユ潈闄�
+                if (!DBUtility.ClsPub.Security_Log_second(ModRightNameCheck, 1, false, CurUserName))
+                {
+                    objJsonResult.code = "0";
+                    objJsonResult.count = 0;
+                    objJsonResult.Message = "琛屽叧闂け璐ワ紒鏃犳潈闄愶紒";
+                    objJsonResult.data = null;
+                    return objJsonResult;
+                }
+                //HInterID鏁版嵁鍒ゆ柇
+                if (HInterID <= 0)
+                {
+                    objJsonResult.code = "0";
+                    objJsonResult.count = 0;
+                    objJsonResult.Message = "HInterID灏忎簬0锛�";
+                    objJsonResult.data = null;
+                    return objJsonResult;
+                }
+
+                Int64 lngBillKey = 0;
+                lngBillKey = DBUtility.ClsPub.isLong(HInterID);                                         //瀵笻InterID杩涜绫诲瀷鐨勮浆鎹�
+                DAL.ClsXs_SeOrderBill oBill = new DAL.ClsXs_SeOrderBill();              //瀹炰緥鍖栧崟鎹搷浣滅被锛岀敤浜庤繘琛岀浉鍏虫搷浣�
+
+                //閽堝闇�瑕佽繘琛岀殑鎿嶄綔锛屾楠屽綋鍓嶅崟鎹殑鐘舵�佹槸鍚︽敮鎸侀渶瑕佽繘琛岀殑鎿嶄綔
+                if (oBill.ShowBill(lngBillKey, ref DBUtility.ClsPub.sExeReturnInfo))                    //鏍规嵁HInterID鑾峰彇璇ュ崟鎹殑鏁版嵁
+                {
+                    if (oBill.omodel.HDeleteMan.Trim() != "")
+                    {
+                        objJsonResult.code = "0";
+                        objJsonResult.count = 0;
+                        objJsonResult.Message = "鍗曟嵁宸蹭綔搴�!涓嶈兘杩涜琛屽叧闂紒";
+                        objJsonResult.data = null;
+                        return objJsonResult;
+                    }
+                    if (oBill.omodel.HCloseMan.Trim() != "")
+                    {
+                        objJsonResult.code = "0";
+                        objJsonResult.count = 0;
+                        objJsonResult.Message = "鍗曟嵁宸插叧闂�!涓嶈兘杩涜琛屽叧闂紒";
+                        objJsonResult.data = null;
+                        return objJsonResult;
+                    }
+                    if (oBill.omodel.HChecker.Trim() == "")
+                    {
+                        objJsonResult.code = "0";
+                        objJsonResult.count = 0;
+                        objJsonResult.Message = "鍗曟嵁鏈鏍�!涓嶈兘杩涜琛屽叧闂紒";
+                        objJsonResult.data = null;
+                        return objJsonResult;
+                    }
+
+                    string sql = "select * from " + SubBillName + " where HInterID = " + HInterID + " and HEntryID = " + HEntryID;
+                    ds = oCN.RunProcReturn(sql, "Xs_SeOrderBillSub");
+                    if (ds == null || ds.Tables[0].Rows.Count == 0)
+                    {
+                        objJsonResult.code = "0";
+                        objJsonResult.count = 0;
+                        objJsonResult.Message = "璇ヨ鏁版嵁涓嶅瓨鍦�!鍘熷洜:" + DBUtility.ClsPub.sExeReturnInfo;
+                        objJsonResult.data = null;
+                        return objJsonResult;
+                    }
+                    if (IsAudit == 0)  //琛屽叧闂垽鏂�
+                    {
+                        if (ds.Tables[0].Rows[0]["HCloseMan"].ToString().Trim() != "")
+                        {
+                            objJsonResult.code = "0";
+                            objJsonResult.count = 0;
+                            objJsonResult.Message = "琛屽凡鍏抽棴!涓嶈兘鍐嶆琛屽叧闂紒";
+                            objJsonResult.data = null;
+                            return objJsonResult;
+                        }
+                    }
+                    if (IsAudit == 1) //琛屽弽鍏抽棴鍒ゆ柇
+                    {
+                        if (ds.Tables[0].Rows[0]["HCloseMan"].ToString().Trim() == "")
+                        {
+                            objJsonResult.code = "0";
+                            objJsonResult.count = 0;
+                            objJsonResult.Message = "琛屾湭鍏抽棴!涓嶉渶瑕佸啀琛屽弽鍏抽棴锛�";
+                            objJsonResult.data = null;
+                            return objJsonResult;
+                        }
+
+                        //鍒ゆ柇琛屾槸鍚︿负鑷姩鍏抽棴
+                        string temp = ds.Tables[0].Rows[0]["HCloseType"].ToString();
+                        if (ds.Tables[0].Rows[0]["HCloseType"].ToString() == "False")
+                        {
+                            objJsonResult.code = "0";
+                            objJsonResult.count = 0;
+                            objJsonResult.Message = "琛屽弽鍏抽棴澶辫触!琛屼负鑷姩鍏抽棴锛屼笉鑳借繘琛屾墜鍔ㄥ弽鍏抽棴锛�";
+                            objJsonResult.data = null;
+                            return objJsonResult;
+                        }
+                    }
+                }
+                else
+                {
+                    objJsonResult.code = "0";
+                    objJsonResult.count = 0;
+                    objJsonResult.Message = "鍗曟嵁涓嶅瓨鍦�!鍘熷洜:" + DBUtility.ClsPub.sExeReturnInfo;
+                    objJsonResult.data = null;
+                    return objJsonResult;
+                }
+
+
+                //杩涜闇�瑕佽繘琛岀殑琛屽叧闂�/琛屽弽鍏抽棴鎿嶄綔
+                if (IsAudit == 0) //琛屽叧闂彁浜�
+                {
+                    //琛屽叧闂彁浜�
+                    if (oBill.CloseRow(lngBillKey,HEntryID,oBill.omodel.HBillNo,CurUserName, ref DBUtility.ClsPub.sExeReturnInfo) == true)
+                    {
+                        objJsonResult.code = "1";
+                        objJsonResult.count = 1;
+                        objJsonResult.Message = "琛屽叧闂垚鍔�";
+                        objJsonResult.data = null;
+                        return objJsonResult;
+                    }
+                    else
+                    {
+                        objJsonResult.code = "0";
+                        objJsonResult.count = 0;
+                        objJsonResult.Message = "琛屽叧闂け璐�!鍘熷洜:" + DBUtility.ClsPub.sExeReturnInfo;
+                        objJsonResult.data = null;
+                        return objJsonResult;
+                    }
+                }
+                if (IsAudit == 1) //琛屽弽鍏抽棴鎻愪氦
+                {
+                    //琛屽弽鍏抽棴鎻愪氦
+                    if (oBill.CancelRow(lngBillKey, HEntryID, oBill.omodel.HBillNo, CurUserName, ref DBUtility.ClsPub.sExeReturnInfo) == true)
+                    {
                         objJsonResult.code = "1";
                         objJsonResult.count = 1;
                         objJsonResult.Message = "鍙嶅叧闂垚鍔�";
diff --git a/WebAPI/Controllers/XSGL/YS_ReceiveBillController.cs b/WebAPI/Controllers/XSGL/YS_ReceiveBillController.cs
index 3eca178..eea8e80 100644
--- a/WebAPI/Controllers/XSGL/YS_ReceiveBillController.cs
+++ b/WebAPI/Controllers/XSGL/YS_ReceiveBillController.cs
@@ -1011,5 +1011,50 @@
             }
         }
         #endregion
+
+        #region 鏀舵鍗� 鏍规嵁瀹㈡埛鑾峰彇鍏宠仈鑱屽憳
+        [Route("YS_ReceiveBill/getRelationEmpByCusID")]
+        [HttpGet]
+        public object getRelationEmpByCusID(long HCusID)
+        {
+            try
+            {
+                string sql = @"select b.HEmpID HEmpID,e.HName HEmpName,b.HDeptID HDeptID,d.HName HDeptName,d.HEmpID HManagerID,e1.HName HManagerName
+                            from Gy_UserCustomerRelation as a
+                            left join Gy_Czygl as b on a.HUserID = b.Czybm
+                            left join Gy_Employee as e on b.HEmpID = e.HItemID
+                            left join Gy_Department as d on b.HDeptID = d.HItemID
+                            left join Gy_Employee as e1 on d.HEmpID = e1.HItemID
+                            where a.HCusID = " + HCusID;
+                ds = oCN.RunProcReturn(sql, "Gy_UserCustomerRelation");
+
+
+                if (ds == null || ds.Tables[0].Rows.Count == 0)
+                {
+                    objJsonResult.code = "0";
+                    objJsonResult.count = 0;
+                    objJsonResult.Message = "鏈煡璇㈠埌璇ュ鎴峰叧鑱旂殑鑱屽憳淇℃伅锛�";
+                    objJsonResult.data = null;
+                    return objJsonResult;
+                }
+                else
+                {
+                    objJsonResult.code = "1";
+                    objJsonResult.count = 1;
+                    objJsonResult.Message = "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
     }
 }
\ No newline at end of file
diff --git a/WebAPI/Properties/PublishProfiles/FolderProfile.pubxml.user b/WebAPI/Properties/PublishProfiles/FolderProfile.pubxml.user
index e6ac5aa..2ac6f8b 100644
--- a/WebAPI/Properties/PublishProfiles/FolderProfile.pubxml.user
+++ b/WebAPI/Properties/PublishProfiles/FolderProfile.pubxml.user
@@ -9,7 +9,7 @@
   </PropertyGroup>
   <ItemGroup>
     <File Include="apiapp.json">
-      <publishTime>09/25/2023 09:42:57</publishTime>
+      <publishTime>04/06/2023 15:57:02</publishTime>
     </File>
     <File Include="bin/Antlr3.Runtime.dll">
       <publishTime>02/22/2013 16:43:40</publishTime>
@@ -81,7 +81,7 @@
       <publishTime>08/25/2021 10:28:25</publishTime>
     </File>
     <File Include="bin/Kingdee.BOS.WebApi.Client.dll">
-      <publishTime>09/25/2023 09:42:56</publishTime>
+      <publishTime>04/06/2023 15:57:02</publishTime>
     </File>
     <File Include="bin/Kingdee.BOS.WebApi.FormService.dll">
       <publishTime>09/20/2018 19:23:20</publishTime>
@@ -115,7 +115,7 @@
       <publishTime>02/26/2024 09:57:25</publishTime>
     </File>
     <File Include="bin/Models/ClsSc_MouldScrapOutBillMain.cs">
-      <publishTime>09/25/2023 09:42:57</publishTime>
+      <publishTime>04/06/2023 15:57:02</publishTime>
     </File>
     <File Include="bin/Newtonsoft.Json.dll">
       <publishTime>08/04/2014 04:33:56</publishTime>
@@ -251,7 +251,7 @@
       <publishTime>11/28/2018 21:01:00</publishTime>
     </File>
     <File Include="bin/System.Web.Http.WebHost.dll">
-      <publishTime>09/25/2023 09:42:57</publishTime>
+      <publishTime>04/06/2023 15:57:02</publishTime>
     </File>
     <File Include="bin/System.Web.Mvc.dll">
       <publishTime>01/28/2015 12:02:18</publishTime>
@@ -306,58 +306,58 @@
       <publishTime>11/29/2018 21:26:30</publishTime>
     </File>
     <File Include="Config/kdapi.config">
-      <publishTime>09/25/2023 09:42:56</publishTime>
+      <publishTime>04/06/2023 15:57:01</publishTime>
     </File>
     <File Include="Content/bootstrap.css">
-      <publishTime>09/25/2023 09:42:56</publishTime>
+      <publishTime>04/06/2023 15:57:01</publishTime>
     </File>
     <File Include="Content/bootstrap.min.css">
-      <publishTime>09/25/2023 09:42:56</publishTime>
+      <publishTime>04/06/2023 15:57:01</publishTime>
     </File>
     <File Include="Content/Site.css">
-      <publishTime>09/25/2023 09:42:56</publishTime>
+      <publishTime>04/06/2023 15:57:01</publishTime>
     </File>
     <File Include="DLL/BLL.dll">
-      <publishTime>09/25/2023 09:42:56</publishTime>
+      <publishTime>04/06/2023 15:57:02</publishTime>
     </File>
     <File Include="DLL/DAL.dll">
-      <publishTime>09/25/2023 09:42:56</publishTime>
+      <publishTime>04/06/2023 15:57:02</publishTime>
     </File>
     <File Include="DLL/DBUtility.dll">
-      <publishTime>09/25/2023 09:42:56</publishTime>
+      <publishTime>04/06/2023 15:57:02</publishTime>
     </File>
     <File Include="DLL/Kingdee.BOS.WebApi.Client.dll">
-      <publishTime>09/25/2023 09:42:56</publishTime>
+      <publishTime>04/06/2023 15:57:02</publishTime>
     </File>
     <File Include="DLL/Model.dll">
-      <publishTime>09/25/2023 09:42:56</publishTime>
+      <publishTime>04/06/2023 15:57:02</publishTime>
     </File>
     <File Include="DLL/Newtonsoft.Json.Net35.dll">
-      <publishTime>09/25/2023 09:42:56</publishTime>
+      <publishTime>04/06/2023 15:57:02</publishTime>
     </File>
     <File Include="DLL/Pub_Class.dll">
-      <publishTime>09/25/2023 09:42:57</publishTime>
+      <publishTime>04/06/2023 15:57:02</publishTime>
     </File>
     <File Include="DLL/Pub_Control.dll">
-      <publishTime>09/25/2023 09:42:57</publishTime>
+      <publishTime>04/06/2023 15:57:02</publishTime>
     </File>
     <File Include="DLL/SQLHelper.dll">
-      <publishTime>09/25/2023 09:42:57</publishTime>
+      <publishTime>04/06/2023 15:57:02</publishTime>
     </File>
     <File Include="fonts/glyphicons-halflings-regular.eot">
-      <publishTime>09/25/2023 09:42:57</publishTime>
+      <publishTime>04/06/2023 15:57:02</publishTime>
     </File>
     <File Include="fonts/glyphicons-halflings-regular.svg">
-      <publishTime>09/25/2023 09:42:57</publishTime>
+      <publishTime>04/06/2023 15:57:02</publishTime>
     </File>
     <File Include="fonts/glyphicons-halflings-regular.ttf">
-      <publishTime>09/25/2023 09:42:57</publishTime>
+      <publishTime>04/06/2023 15:57:02</publishTime>
     </File>
     <File Include="fonts/glyphicons-halflings-regular.woff">
-      <publishTime>09/25/2023 09:42:57</publishTime>
+      <publishTime>04/06/2023 15:57:02</publishTime>
     </File>
     <File Include="Global.asax">
-      <publishTime>09/25/2023 09:42:57</publishTime>
+      <publishTime>04/06/2023 15:57:02</publishTime>
     </File>
     <File Include="grpc_csharp_ext.x64.dll">
       <publishTime>03/22/2022 13:17:22</publishTime>
@@ -366,7 +366,7 @@
       <publishTime>03/22/2022 13:17:22</publishTime>
     </File>
     <File Include="Index.html">
-      <publishTime>09/25/2023 09:42:57</publishTime>
+      <publishTime>04/06/2023 15:57:02</publishTime>
     </File>
     <File Include="libgrpc_csharp_ext.x64.dylib">
       <publishTime>03/19/2022 07:38:44</publishTime>
@@ -375,121 +375,121 @@
       <publishTime>03/19/2022 07:38:42</publishTime>
     </File>
     <File Include="libman.json">
-      <publishTime>09/25/2023 09:42:57</publishTime>
+      <publishTime>07/12/2023 08:14:21</publishTime>
     </File>
     <File Include="Metadata/deploymentTemplates/apiappconfig.azureresource.json">
-      <publishTime>09/25/2023 09:42:57</publishTime>
+      <publishTime>04/06/2023 15:57:02</publishTime>
     </File>
     <File Include="packages.config">
-      <publishTime>09/25/2023 09:42:57</publishTime>
+      <publishTime>04/06/2023 15:57:02</publishTime>
     </File>
     <File Include="Views/Scripts/bootstrap.js">
-      <publishTime>09/25/2023 09:42:57</publishTime>
+      <publishTime>04/06/2023 15:57:02</publishTime>
     </File>
     <File Include="Views/Scripts/bootstrap.min.js">
-      <publishTime>09/25/2023 09:42:57</publishTime>
+      <publishTime>04/06/2023 15:57:02</publishTime>
     </File>
     <File Include="Views/Scripts/jquery-1.10.2.js">
-      <publishTime>09/25/2023 09:42:57</publishTime>
+      <publishTime>04/06/2023 15:57:02</publishTime>
     </File>
     <File Include="Views/Scripts/jquery-1.10.2.min.js">
-      <publishTime>09/25/2023 09:42:57</publishTime>
+      <publishTime>04/06/2023 15:57:02</publishTime>
     </File>
     <File Include="Views/Scripts/jquery-1.10.2.min.map">
-      <publishTime>09/25/2023 09:42:57</publishTime>
+      <publishTime>04/06/2023 15:57:02</publishTime>
     </File>
     <File Include="Views/Scripts/jquery.validate.js">
-      <publishTime>09/25/2023 09:42:57</publishTime>
+      <publishTime>04/06/2023 15:57:02</publishTime>
     </File>
     <File Include="Views/Scripts/jquery.validate.min.js">
-      <publishTime>09/25/2023 09:42:57</publishTime>
+      <publishTime>04/06/2023 15:57:02</publishTime>
     </File>
     <File Include="Views/Scripts/jquery.validate.unobtrusive.js">
-      <publishTime>09/25/2023 09:42:57</publishTime>
+      <publishTime>04/06/2023 15:57:02</publishTime>
     </File>
     <File Include="Views/Scripts/jquery.validate.unobtrusive.min.js">
-      <publishTime>09/25/2023 09:42:57</publishTime>
+      <publishTime>04/06/2023 15:57:02</publishTime>
     </File>
     <File Include="Views/Scripts/modernizr-2.6.2.js">
-      <publishTime>09/25/2023 09:42:57</publishTime>
+      <publishTime>04/06/2023 15:57:02</publishTime>
     </File>
     <File Include="Views/Shared/Error.cshtml">
-      <publishTime>09/25/2023 09:42:57</publishTime>
+      <publishTime>04/06/2023 15:57:02</publishTime>
     </File>
     <File Include="Views/Shared/_Layout.cshtml">
-      <publishTime>09/25/2023 09:42:57</publishTime>
+      <publishTime>04/06/2023 15:57:02</publishTime>
     </File>
     <File Include="Views/web.config">
-      <publishTime>09/25/2023 09:42:57</publishTime>
+      <publishTime>04/06/2023 15:57:02</publishTime>
     </File>
     <File Include="Views/_ViewStart.cshtml">
-      <publishTime>09/25/2023 09:42:57</publishTime>
+      <publishTime>04/06/2023 15:57:02</publishTime>
     </File>
     <File Include="Web References/WebS/ClsCLD_Customer_Model.datasource">
-      <publishTime>09/25/2023 09:42:57</publishTime>
+      <publishTime>04/06/2023 15:57:02</publishTime>
     </File>
     <File Include="Web References/WebS/ClsCLD_Department_Model.datasource">
-      <publishTime>09/25/2023 09:42:57</publishTime>
+      <publishTime>04/06/2023 15:57:02</publishTime>
     </File>
     <File Include="Web References/WebS/ClsCLD_Employee_Model.datasource">
-      <publishTime>09/25/2023 09:42:57</publishTime>
+      <publishTime>04/06/2023 15:57:02</publishTime>
     </File>
     <File Include="Web References/WebS/ClsCLD_StockPlace_Model.datasource">
-      <publishTime>09/25/2023 09:42:57</publishTime>
+      <publishTime>04/06/2023 15:57:02</publishTime>
     </File>
     <File Include="Web References/WebS/ClsCLD_Supplier_Model.datasource">
-      <publishTime>09/25/2023 09:42:57</publishTime>
+      <publishTime>04/06/2023 15:57:02</publishTime>
     </File>
     <File Include="Web References/WebS/ClsCLD_Warehouse_Model.datasource">
-      <publishTime>09/25/2023 09:42:57</publishTime>
+      <publishTime>04/06/2023 15:57:02</publishTime>
     </File>
     <File Include="Web References/WebS/ClsGy_BadReason_Model.datasource">
-      <publishTime>09/25/2023 09:42:57</publishTime>
+      <publishTime>04/06/2023 15:57:02</publishTime>
     </File>
     <File Include="Web References/WebS/ClsGy_BarCodeBill_WMS_Model.datasource">
-      <publishTime>09/25/2023 09:42:57</publishTime>
+      <publishTime>04/06/2023 15:57:02</publishTime>
     </File>
     <File Include="Web References/WebS/ClsGy_BarCodeBill_WMS_Model_View.datasource">
-      <publishTime>09/25/2023 09:42:57</publishTime>
+      <publishTime>04/06/2023 15:57:02</publishTime>
     </File>
     <File Include="Web References/WebS/ClsGy_Customer_Model.datasource">
-      <publishTime>09/25/2023 09:42:57</publishTime>
+      <publishTime>04/06/2023 15:57:02</publishTime>
     </File>
     <File Include="Web References/WebS/ClsGy_Department_Model.datasource">
-      <publishTime>09/25/2023 09:42:57</publishTime>
+      <publishTime>04/06/2023 15:57:02</publishTime>
     </File>
     <File Include="Web References/WebS/ClsGy_Employee_Model.datasource">
-      <publishTime>09/25/2023 09:42:57</publishTime>
+      <publishTime>04/06/2023 15:57:02</publishTime>
     </File>
     <File Include="Web References/WebS/ClsGy_Group_Model.datasource">
-      <publishTime>09/25/2023 09:42:57</publishTime>
+      <publishTime>04/06/2023 15:57:02</publishTime>
     </File>
     <File Include="Web References/WebS/ClsGy_Item30JiTai_Model.datasource">
-      <publishTime>09/25/2023 09:42:57</publishTime>
+      <publishTime>04/06/2023 15:57:02</publishTime>
     </File>
     <File Include="Web References/WebS/ClsGy_Source_Model.datasource">
-      <publishTime>09/25/2023 09:42:57</publishTime>
+      <publishTime>04/06/2023 15:57:02</publishTime>
     </File>
     <File Include="Web References/WebS/ClsGy_StockPlace_Model.datasource">
-      <publishTime>09/25/2023 09:42:57</publishTime>
+      <publishTime>04/06/2023 15:57:02</publishTime>
     </File>
     <File Include="Web References/WebS/ClsGy_Supplier_Model.datasource">
-      <publishTime>09/25/2023 09:42:57</publishTime>
+      <publishTime>04/06/2023 15:57:02</publishTime>
     </File>
     <File Include="Web References/WebS/ClsGy_Warehouse_Model.datasource">
-      <publishTime>09/25/2023 09:42:57</publishTime>
+      <publishTime>04/06/2023 15:57:02</publishTime>
     </File>
     <File Include="Web References/WebS/ClsKf_ICStockBill_Mould.datasource">
-      <publishTime>09/25/2023 09:42:57</publishTime>
+      <publishTime>04/06/2023 15:57:02</publishTime>
     </File>
     <File Include="Web References/WebS/ClsKf_ICStockBill_WMS.datasource">
-      <publishTime>09/25/2023 09:42:57</publishTime>
+      <publishTime>04/06/2023 15:57:02</publishTime>
     </File>
     <File Include="Web References/WebS/Reference.cs">
       <publishTime>12/20/2021 13:19:56</publishTime>
     </File>
     <File Include="Web References/WebS/Reference.map">
-      <publishTime>11/01/2023 11:13:09</publishTime>
+      <publishTime>02/25/2024 21:39:05</publishTime>
     </File>
     <File Include="Web References/WebS/WebService1.disco">
       <publishTime>12/20/2021 13:19:56</publishTime>
diff --git a/WebAPI/WebAPI.csproj b/WebAPI/WebAPI.csproj
index 93513f7..6ab7973 100644
--- a/WebAPI/WebAPI.csproj
+++ b/WebAPI/WebAPI.csproj
@@ -469,6 +469,7 @@
     <Compile Include="Controllers\Sc_ProcessMangementController.cs" />
     <Compile Include="Controllers\Sc_ProcessReportController.cs" />
     <Compile Include="Controllers\XSGL\Kf_ICStockBackBillController.cs" />
+    <Compile Include="Controllers\XSGL\Xs_CusBalanceReportController.cs" />
     <Compile Include="Controllers\XSGL\Xs_ReceivableBillController.cs" />
     <Compile Include="Controllers\XSGL\YS_ContactBalController.cs" />
     <Compile Include="Controllers\XSGL\Xs_SeOrderChangeBillController.cs" />
diff --git a/WebAPI/WebAPI.csproj.user b/WebAPI/WebAPI.csproj.user
index 315ec51..250cea5 100644
--- a/WebAPI/WebAPI.csproj.user
+++ b/WebAPI/WebAPI.csproj.user
@@ -9,7 +9,7 @@
     <WebStackScaffolding_IsAsyncSelected>False</WebStackScaffolding_IsAsyncSelected>
     <NameOfLastUsedPublishProfile>FolderProfile</NameOfLastUsedPublishProfile>
     <NameOfLastUsedPublishProfile>D:\Git\houduan\WebAPI\Properties\PublishProfiles\FolderProfile.pubxml</NameOfLastUsedPublishProfile>
-    <NameOfLastUsedPublishProfile>D:\涔斾竴璁¢噺鍗曚綅鍒楄〃\MES-WEB-API\WebAPI\Properties\PublishProfiles\FolderProfile.pubxml</NameOfLastUsedPublishProfile>
+    <NameOfLastUsedPublishProfile>D:\缃戠珯鍙戝竷\鍚庣浠g爜\MES-WEB-API\MES-WEB-API\WebAPI\Properties\PublishProfiles\FolderProfile.pubxml</NameOfLastUsedPublishProfile>
     <LastActiveSolutionConfig>Debug|Any CPU</LastActiveSolutionConfig>
     <UseIISExpress>false</UseIISExpress>
     <Use64BitIISExpress />

--
Gitblit v1.9.1