From 20dc0ca259d13c6d712bde41c992d94365f5f090 Mon Sep 17 00:00:00 2001
From: 陈雯静 <1134865194@qq.com>
Date: 星期五, 15 三月 2024 16:24:12 +0800
Subject: [PATCH] 1
---
WebAPI/Controllers/XSGL/YS_ReceiveOtherBillController.cs | 78 +++++++++++++++++++++++++--------------
1 files changed, 50 insertions(+), 28 deletions(-)
diff --git a/WebAPI/Controllers/XSGL/YS_ReceiveOtherBillController.cs b/WebAPI/Controllers/XSGL/YS_ReceiveOtherBillController.cs
index 246eaae..8aa0c73 100644
--- a/WebAPI/Controllers/XSGL/YS_ReceiveOtherBillController.cs
+++ b/WebAPI/Controllers/XSGL/YS_ReceiveOtherBillController.cs
@@ -25,6 +25,17 @@
SQLHelper.ClsCN oCN = new SQLHelper.ClsCN();
DataSet ds;
+ public class ClsYS_ReceiveOtherBillSubs
+ {
+
+ public Int64 HProjectMoneyIDSub;// int //璐圭敤椤圭洰
+ public string HTypeSub;// varchar(20) --鍙戠エ绫诲瀷
+ public double HMoneySub;// dec(18,8) //鍗曟嵁閲戦
+ public double HTaxRateSub;// dec(18,8) //绋庣巼
+ public double HSumMoneySub;// dec(18,8) //鎬婚噾棰�
+ }
+
+
#region 鍏朵粬搴旀敹鍗曞垪琛� 鏌ヨ
/// <summary>
/// 杩斿洖椤圭洰闃舵鍒楄〃
@@ -93,9 +104,10 @@
var _value = msg["msg"].ToString();
string msg1 = _value.ToString();
string[] sArray = msg1.Split(new string[] { ";" }, StringSplitOptions.RemoveEmptyEntries);
- string msg2 = sArray[0].ToString(); //琛ㄥご鏁版嵁
- string refSav = sArray[1].ToString(); //鎿嶄綔鏂瑰紡
- string msg4 = sArray[2].ToString(); //鐢ㄦ埛
+ string msg2 = sArray[0].ToString();
+ string msg3 = sArray[1].ToString(); //瀛愯〃
+ string refSav = sArray[2].ToString();//鎿嶄綔鏂瑰紡鏁版嵁绫诲瀷 1娣诲姞 3淇敼 2 澶嶅埗
+ string msg4 = sArray[3].ToString();//鐢ㄦ埛鍚�
DBUtility.ClsPub.CurUserName = msg4;
@@ -187,6 +199,26 @@
}
oBill.omodel = oItem;
}
+ // 琛ㄤ綋鏁版嵁
+ //鎸� },{鏉ユ媶鍒嗘暟缁� //鍘绘帀銆愬拰銆�
+ msg3 = msg3.Substring(1, msg3.Length - 2);
+ msg3 = msg3.Replace("\\", "");
+ msg3 = msg3.Replace("\n", ""); //\n
+ List<Model.ClsYS_ReceiveOtherBillSub> ls = new List<Model.ClsYS_ReceiveOtherBillSub>();
+ ls = oListModels.getObjectByJson_YS_ReceiveOtherBillSub(msg3);
+ int i = 0;
+ foreach (Model.ClsYS_ReceiveOtherBillSub oItemSub in ls)
+ {
+ i++;
+ oItemSub.HEntryID = i;
+
+
+ oItemSub.HEntryCloseDate = DBUtility.ClsPub.isDate(DateTime.Now);
+ oItemSub.HCloseType = false; //鍏抽棴绫诲瀷
+
+ oBill.DetailColl.Add(oItemSub);
+
+ }
//淇濆瓨
//淇濆瓨瀹屾瘯鍚庡鐞�
@@ -239,7 +271,11 @@
{
try
{
- ds = oCN.RunProcReturn("select * from h_v_YS_ReceiveOtherBillMainList where hmainid=" + HInterID, "h_v_YS_ReceiveOtherBillMainList");
+ List<DataTable> tableList = new List<DataTable>();
+
+ ds = oCN.RunProcReturn("exec h_p_YS_ReceiveOtherBillMain_Edit " + HInterID, "h_p_YS_ReceiveOtherBillMain_Edit");
+ tableList.Add(ds.Tables[0]);
+ tableList.Add(ds.Tables[1]);
if (ds == null || ds.Tables[0].Rows.Count == 0)
{
objJsonResult.code = "0";
@@ -253,7 +289,7 @@
objJsonResult.code = "1";
objJsonResult.count = 1;
objJsonResult.Message = "Sucess锛�";
- objJsonResult.data = ds.Tables[0];
+ objJsonResult.data = tableList;
return objJsonResult;
}
}
@@ -318,7 +354,7 @@
return objJsonResult;
}
//鍒ゆ柇鏄惁鏄垱寤虹姸鎬佽繘琛屽垹闄�
- if (BillOld.omodel.HBillStatus.ToString() == "1")
+ if (int.Parse(BillOld.omodel.HBillStatus.ToString()) <= 1)
{
@@ -504,29 +540,15 @@
//璁板綍杩斿洖淇℃伅
string msg = "";
- if(oBill.omodel.HMainSourceInterID != 0)
+ string sql = "exec h_p_YS_ReceiveOtherBill_CheckCrediControl " + oBill.omodel.HInterID;
+ ds = oCN.RunProcReturn(sql, "h_p_YS_ReceiveOtherBill_CheckCrediControl");
+ if (ds.Tables[0].Rows[0]["HBack"].ToString() == "1")
{
- //妫�楠屾簮鍗曟槸鍚﹀瓨鍦ㄥ強鍗曟嵁鐘舵��
- string sql = "select * from YS_ReceiveOtherBillMain where HInterID = " + oBill.omodel.HMainSourceInterID;
- ds = oCN.RunProcReturn(sql, "YS_ReceiveOtherBillMain");
- if (ds == null || ds.Tables[0].Rows.Count == 0)
- {
- objJsonResult.code = "0";
- objJsonResult.count = 0;
- objJsonResult.Message = "瀹℃牳澶辫触!鍘熷洜:婧愬崟-鐗规壒鐢宠鍗曚笉瀛樺湪!";
- objJsonResult.data = null;
- return objJsonResult;
- }
- else if (ds.Tables[0].Rows[0]["HBillStatus"].ToString() != "2")
- {
- objJsonResult.code = "0";
- objJsonResult.count = 0;
- objJsonResult.Message = "瀹℃牳澶辫触!鍘熷洜:婧愬崟-鐗规壒鐢宠鍗曟湭澶勪簬宸插鏍哥姸鎬�!";
- objJsonResult.data = null;
- return objJsonResult;
- }
-
-
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "瀹℃牳澶辫触!鍘熷洜:" + ds.Tables[0].Rows[0]["HRemark"].ToString();
+ objJsonResult.data = null;
+ return objJsonResult;
}
//瀹℃牳鍓嶆帶鍒�=========================================
--
Gitblit v1.9.1