From eaeff1134f0e4e35ba050d0809500d05ee869cc8 Mon Sep 17 00:00:00 2001
From: wangyi <2946747746@qq.com>
Date: 星期一, 30 三月 2026 18:33:07 +0800
Subject: [PATCH] 出运单修改
---
WebAPI/Controllers/物流管理/出运单/WLYayBillController.cs | 515 +++++++++++++++++++++++++++++++++++++++++++-------------
1 files changed, 394 insertions(+), 121 deletions(-)
diff --git "a/WebAPI/Controllers/\347\211\251\346\265\201\347\256\241\347\220\206/\345\207\272\350\277\220\345\215\225/WLYayBillController.cs" "b/WebAPI/Controllers/\347\211\251\346\265\201\347\256\241\347\220\206/\345\207\272\350\277\220\345\215\225/WLYayBillController.cs"
index c851767..ca1e21c 100644
--- "a/WebAPI/Controllers/\347\211\251\346\265\201\347\256\241\347\220\206/\345\207\272\350\277\220\345\215\225/WLYayBillController.cs"
+++ "b/WebAPI/Controllers/\347\211\251\346\265\201\347\256\241\347\220\206/\345\207\272\350\277\220\345\215\225/WLYayBillController.cs"
@@ -23,7 +23,7 @@
SQLHelper.ClsCN oCN = new SQLHelper.ClsCN();
- #region 鍒嗛〉鍒楄〃
+ #region 鍑鸿繍鍗� 鍒嗛〉鍒楄〃
[Route("WLYayBillController/GetListPage")]
[HttpGet]
public object GetListPage(string sWhere, string user)
@@ -31,7 +31,7 @@
try
{
List<object> columnNameList = new List<object>();
- if (!DBUtility.ClsPub.Security_Log("Gy_QCVerificationBillMain_Query", 1, false, user))
+ if (!DBUtility.ClsPub.Security_Log("WLYayBill_Query", 1, false, user))
{
objJsonResult.code = "0";
objJsonResult.count = 0;
@@ -79,8 +79,7 @@
}
#endregion
-
- #region 鏍规嵁婧愬崟浼犵墿鏂欏垪琛�
+ #region 鍑鸿繍鍗� 鏍规嵁婧愬崟浼犵墿鏂欏垪琛�
[Route("WLYayBillController/GetMesByOrginBill")]
[HttpGet]
public object GetMesByOrginBill(string ListMaterial)
@@ -93,10 +92,10 @@
}
ListMaterial = ListMaterial.Replace(';', ',');
List<object> columnNameList = new List<object>();
-
- ds = oCN.RunProcReturn("select a.*,b.HUnitID from h_v_Gy_MaterialPackingRelationList_Edit a left JOIN Gy_Material b on a.HMaterID=b.HItemID where HDefaultSendPackFlag=1 and HMaterID in (" + ListMaterial+")", "锘縣_v_Gy_MaterialPackingRelationList");
+
+ ds = oCN.RunProcReturn("select a.*,b.HUnitID from h_v_Gy_MaterialPackingRelationList_Edit a left JOIN Gy_Material b on a.HMaterID=b.HItemID where HDefaultSendPackFlag=1 and 瀹℃牳浜�='' and HMaterID in (" + ListMaterial + ")", "锘縣_v_Gy_MaterialPackingRelationList");
//娣诲姞鍒楀悕
@@ -126,8 +125,7 @@
}
#endregion
-
- #region 淇濆瓨/缂栬緫
+ #region 鍑鸿繍鍗� 淇濆瓨/缂栬緫
[Route("WLYayBillController/SaveBill")]
[HttpPost]
@@ -144,7 +142,7 @@
ListModels oListModels = new ListModels();
try
{
- if (!DBUtility.ClsPub.Security_Log("Gy_QCVerificationBillMain_Edit", 1, false, msg4))
+ if (!DBUtility.ClsPub.Security_Log("WLYayBill_Edit", 1, false, msg4))
{
objJsonResult.code = "0";
objJsonResult.count = 0;
@@ -237,8 +235,7 @@
}
#endregion
-
- #region[缂栬緫鏃惰幏鍙栨暟鎹甝
+ #region 鍑鸿繍鍗� 缂栬緫鏃惰幏鍙栨暟鎹�
[Route("WLYayBillController/WL_YayBillDetail")]
[HttpGet]
public ApiResult<DataSet> WL_YayBillDetail(string HID)
@@ -253,8 +250,76 @@
}
#endregion
+ #region 鍑鸿繍鍗� 鍒犻櫎
+ [Route("WLYayBillController/deleteBill")]
+ [HttpGet]
+ public object deleteBill(string HItemID, string user)
+ {
+ try
+ {
+ //鍒犻櫎鏉冮檺
+ if (!DBUtility.ClsPub.Security_Log("WLYayBill_Delete", 1, false, user))
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "鏃犲垹闄ゆ潈闄愶紒";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
- #region 瀹℃牳銆佸弽瀹℃牳
+ if (string.IsNullOrWhiteSpace(HItemID))
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "鍗曟嵁ID涓虹┖锛岃瀵绘壘绯荤粺缁存姢浜哄憳杩涜澶勭悊锛�";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+
+ DataSet ds = oCN.RunProcReturn("select * from WL_YayBillMain where HInterID=" + HItemID, "WL_YayBillMain");
+ if (ds == null || ds.Tables[0].Rows.Count == 0)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "鑾峰彇鍗曟嵁淇℃伅澶辫触锛屽崟鎹笉瀛樺湪锛屽垹闄ゅけ璐ワ紒锛�";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+
+ if (DBUtility.ClsPub.isStrNull(ds.Tables[0].Rows[0]["HChecker"]) != "")
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "鍒犻櫎澶辫触銆傚崟鎹凡瀹℃牳锛屾棤娉曡繘琛屽垹闄わ紒锛�";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+
+ oCN.BeginTran();//寮�濮嬩簨鍔�
+
+ oCN.RunProc("delete from WL_YayBillMain where HInterID=" + HItemID);
+ oCN.RunProc("delete from WL_YayBillSub_Material where HInterID=" + HItemID);
+
+ oCN.Commit();//鎻愪氦浜嬪姟
+
+ objJsonResult.code = "0";
+ objJsonResult.count = 1;
+ objJsonResult.Message = "鏁版嵁鍒犻櫎鎴愬姛锛�";
+ objJsonResult.data = null;
+ return objJsonResult; ;
+ }
+ catch (Exception e)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "鍒犻櫎澶辫触锛�" + e.ToString();
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ }
+ #endregion
+
+ #region 鍑鸿繍鍗� 瀹℃牳/鍙嶅鏍�
/// <summary>
///
/// </summary>
@@ -269,7 +334,7 @@
try
{
//瀹℃牳鏉冮檺
- if (!DBUtility.ClsPub.Security_Log_second("Gy_Supplier_Check", 1, false, CurUserName))
+ if (!DBUtility.ClsPub.Security_Log_second("WLYayBill_Check", 1, false, CurUserName))
{
objJsonResult.code = "0";
objJsonResult.count = 0;
@@ -349,15 +414,45 @@
}
#endregion
+ #region 鍑鸿繍鍗� 缁存姢闆舵媴浣撶Н
+ [Route("WLYayBillController/updateBillMEs")]
+ [HttpGet]
+ public object updateBillMEs(int HInterID, int HEntryID, int ScatteredVolume, string CurUserName)
+ {
+ if (!DBUtility.ClsPub.Security_Log("WLYayBill_ScatteredVolume", 1, false, CurUserName))
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "鏃犳潈闄愶紒";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
- #region 渚涘簲鍟嗙‘璁ゆ椂闂�
- /// <summary>
- ///
- /// </summary>
- /// <param name="HInterID">鍗曟嵁ID</param>
- /// <param name="IsAudit">瀹℃牳(0),鍙嶅鏍�(1)</param>
- /// <param name="CurUserName">瀹℃牳浜�</param>
- /// <returns></returns>
+ DataSet ds = oCN.RunProcReturn("select * from WL_YayBillMain where HInterID=" +HInterID , "WL_YayBillMain");
+ if (ds != null || ds.Tables[0].Rows.Count > 0)
+ {
+ oCN.BeginTran();
+ oCN.RunProc("update WL_YayBillMain set HScatteredVolume= " + ScatteredVolume + " where HInterID=" + HInterID );
+ oCN.Commit();
+
+ 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;
+ }
+ }
+ #endregion
+
+ #region 鍑鸿繍鍗� 渚涘簲鍟嗙‘璁ゆ椂闂�
[Route("WLYayBillController/ConfrimBillNo")]
[HttpGet]
public object ConfrimBillNo(int HInterID, int IsAudit, string CurUserName)
@@ -365,28 +460,42 @@
try
{
//瀹℃牳鏉冮檺
- if (!DBUtility.ClsPub.Security_Log_second("Gy_Supplier_Check", 1, false, CurUserName))
+ if (!DBUtility.ClsPub.Security_Log_second("WLYayBill_SupConfirm", 1, false, CurUserName))
{
objJsonResult.code = "0";
objJsonResult.count = 0;
- objJsonResult.Message = "瀹℃牳澶辫触锛佹棤鏉冮檺锛�";
+ objJsonResult.Message = "纭澶辫触锛佹棤鏉冮檺锛�";
objJsonResult.data = null;
return objJsonResult;
}
- var ds = oCN.RunProcReturn("select * from WL_YayBillMain where HInterID=" + HInterID, "WL_YayBillMain");
-
- oCN.BeginTran();
-
-
- oCN.RunProc("update WL_YayBillMain set HDate_CarrierSure='" + DateTime.Now.ToString("yyyy-MM-dd") + "' where HInterID=" + HInterID);
-
- objJsonResult.code = "1";
- objJsonResult.count = 1;
- objJsonResult.Message = "鎴愬姛";
+ DataSet ds = oCN.RunProcReturn("select * from WL_YayBillMain where HInterID=" + HInterID, "WL_YayBillMain");
+ if (ds == null || ds.Tables[0].Rows.Count == 0)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "鑾峰彇鍗曟嵁淇℃伅澶辫触锛屽崟鎹笉瀛樺湪锛屾棤娉曡繘琛屾壙杩愬晢纭锛侊紒";
objJsonResult.data = null;
- oCN.Commit();
+ return objJsonResult;
+ }
+ if (DBUtility.ClsPub.isStrNull(ds.Tables[0].Rows[0]["HChecker"]) == "")
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "鍗曟嵁鏈鏍革紝鏃犳硶杩涜鎵胯繍鍟嗙‘璁わ紒锛�";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+
+ oCN.BeginTran();
+ oCN.RunProc("update WL_YayBillMain set HDate_CarrierSure='" + DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") + "' where HInterID=" + HInterID);
+
+ oCN.Commit();
+ objJsonResult.code = "1";
+ objJsonResult.count = 1;
+ objJsonResult.Message = "鎴愬姛";
+ objJsonResult.data = null;
return objJsonResult;
}
catch (Exception e)
@@ -401,8 +510,164 @@
}
#endregion
+ #region 鍑鸿繍鍗� 鍒嗛厤杞﹁締鍜屽徃鏈�
+ [Route("WLYayBillController/selectDriver")]
+ [HttpGet]
+ public object selectDriver(int HInterID, int HcheckID, int IsAudit, string CurUserName)
+ {
+ try
+ {
+ if (!DBUtility.ClsPub.Security_Log("WLYayBill_SelectDriver", 1, false, CurUserName))
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "鏃犳煡鐪嬫潈闄愶紒";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
- #region 鍏朵粬纭
+ DataSet ds = oCN.RunProcReturn("select * from WL_YayBillMain where HInterID=" + HInterID, "WL_YayBillMain");
+ if (ds == null || ds.Tables[0].Rows.Count == 0)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "鑾峰彇鍗曟嵁淇℃伅澶辫触锛屽崟鎹笉瀛樺湪锛屾棤娉曡繘琛屽垎閰嶈溅杈嗐�佸徃鏈烘搷浣滐紒锛�";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+
+ if (DBUtility.ClsPub.isStrNull(ds.Tables[0].Rows[0]["HChecker"]) == "")
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "鍗曟嵁鏈鏍革紝鏃犳硶杩涜鍒嗛厤杞﹁締銆佸徃鏈烘搷浣滐紒锛�";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+
+ if (ds.Tables[0].Rows[0]["HDate_CarrierSure"] == null)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "鍗曟嵁鏈繘琛屼緵搴斿晢纭銆傝鍏堣繘琛屼緵搴斿晢纭锛岀劧鍚庡啀杩涜鍒嗛厤杞﹁締銆佸徃鏈烘搷浣滐紒锛�";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+
+ if (IsAudit == 1)
+ {
+
+ ds = oCN.RunProcReturn("select * from gy_car where HItemID=" + HcheckID + "", "gy_car");
+ var HNumber = ds.Tables[0].Rows[0]["HNumber"].ToString();
+ var HName = ds.Tables[0].Rows[0]["HName"].ToString();
+ oCN.BeginTran();
+ oCN.RunProc("update WL_YayBillMain set HCarID='" + HcheckID + "', CarHNumber='" + HNumber + "', CarHName='" + HName + "' where HInterID=" + HInterID);
+ oCN.Commit();
+
+ objJsonResult.code = "1";
+ objJsonResult.count = 1;
+ objJsonResult.Message = "鎴愬姛";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ else
+ {
+
+ ds = oCN.RunProcReturn("select * from Gy_Driver where HItemID=" + HcheckID + "", "Gy_Driver");
+ var HName = ds.Tables[0].Rows[0]["HName"].ToString();
+ var HIDCard = ds.Tables[0].Rows[0]["HIDCard"].ToString();
+ oCN.BeginTran();
+ oCN.RunProc("update WL_YayBillMain set HDriverID='" + HcheckID + "', DriverHName='" + HName + "', DriverHIDCard='" + HIDCard + "' where HInterID=" + HInterID);
+ oCN.Commit();
+
+ objJsonResult.code = "1";
+ objJsonResult.count = 1;
+ objJsonResult.Message = "鎴愬姛";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ }
+ catch (Exception e)
+ {
+ oCN.RollBack();
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "澶辫触锛�" + e.ToString();
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ }
+ #endregion
+
+
+ #region 鍑鸿繍鍗� 缁存姢鍙告満(骞冲彴)
+ [Route("WLYayBillController/selectDriver1")]
+ [HttpGet]
+ public object selectDriver1(string CarHNumber, string CarHName,string DriverHName,string DriverHIDCard, string CurUserName, int HInterID)
+ {
+ try
+ {
+ //if (!DBUtility.ClsPub.Security_Log("WLYayBill_SelectDriver1", 1, false, CurUserName))
+ //{
+ // objJsonResult.code = "0";
+ // objJsonResult.count = 0;
+ // objJsonResult.Message = "鏃犳煡鐪嬫潈闄愶紒";
+ // objJsonResult.data = null;
+ // return objJsonResult;
+ //}
+
+ DataSet ds = oCN.RunProcReturn("select * from WL_YayBillMain where HInterID=" + HInterID, "WL_YayBillMain");
+ if (ds == null || ds.Tables[0].Rows.Count == 0)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "鑾峰彇鍗曟嵁淇℃伅澶辫触锛屽崟鎹笉瀛樺湪锛屾棤娉曡繘琛屽垎閰嶈溅杈嗐�佸徃鏈烘搷浣滐紒锛�";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+
+ if (DBUtility.ClsPub.isStrNull(ds.Tables[0].Rows[0]["HChecker"]) == "")
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "鍗曟嵁鏈鏍革紝鏃犳硶杩涜鍒嗛厤杞﹁締銆佸徃鏈烘搷浣滐紒锛�";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+
+ if (ds.Tables[0].Rows[0]["HDate_CarrierSure"] == null)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "鍗曟嵁鏈繘琛屼緵搴斿晢纭銆傝鍏堣繘琛屼緵搴斿晢纭锛岀劧鍚庡啀杩涜鍒嗛厤杞﹁締銆佸徃鏈烘搷浣滐紒锛�";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+
+ oCN.BeginTran();
+ oCN.RunProc("update WL_YayBillMain set CarHNumber='" + CarHNumber + "', CarHName='" + CarHName + "', DriverHName='" + DriverHName + "', DriverHIDCard='" + DriverHIDCard + "',HDate_AllocationDriver=getdate() where HInterID=" + HInterID);
+ oCN.Commit();
+ objJsonResult.code = "1";
+ objJsonResult.count = 1;
+ objJsonResult.Message = "鎴愬姛";
+ objJsonResult.data = null;
+ return objJsonResult;
+
+
+ }
+ catch (Exception e)
+ {
+ oCN.RollBack();
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "澶辫触锛�" + e.ToString();
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ }
+ #endregion
+
+ #region 鍑鸿繍鍗� 鍏朵粬纭(IsAudit)銆�1锛氬埌鍘傜‘璁わ紱2锛氭彁璐х‘璁わ紱3锛氬嚭鍘傜‘璁わ紱4锛氱鏀剁‘璁ゃ��
/// <summary>
///
/// </summary>
@@ -416,49 +681,127 @@
{
try
{
- //瀹℃牳鏉冮檺
- if (!DBUtility.ClsPub.Security_Log_second("Gy_Supplier_Check", 1, false, CurUserName))
+ DataSet ds = oCN.RunProcReturn("select * from WL_YayBillMain where HInterID=" + HInterID, "WL_YayBillMain");
+ if (ds == null || ds.Tables[0].Rows.Count == 0)
{
objJsonResult.code = "0";
objJsonResult.count = 0;
- objJsonResult.Message = "瀹℃牳澶辫触锛佹棤鏉冮檺锛�";
+ objJsonResult.Message = "鑾峰彇鍗曟嵁淇℃伅澶辫触锛屽崟鎹笉瀛樺湪锛屾棤娉曡繘琛屽埌鍘傜‘璁ゆ搷浣滐紒锛�";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+
+ if (DBUtility.ClsPub.isStrNull(ds.Tables[0].Rows[0]["HChecker"]) == "")
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "鍗曟嵁鏈鏍革紝鏃犳硶杩涜鍒板巶纭鎿嶄綔锛侊紒";
objJsonResult.data = null;
return objJsonResult;
}
- var ds = oCN.RunProcReturn("select * from WL_YayBillMain where HInterID=" + HInterID, "WL_YayBillMain");
-
oCN.BeginTran();
- if(IsAudit== 1)
+ if (IsAudit == 1)
{
+ if (!DBUtility.ClsPub.Security_Log_second("WLYayBill_arriveConfirm", 1, false, CurUserName))
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "鍒板巶纭澶辫触锛佹棤鏉冮檺锛�";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+
+ if (ds.Tables[0].Rows[0]["HDate_AllocationDriver"] == null || ds.Tables[0].Rows[0]["CarHName"].ToString() == "0" || ds.Tables[0].Rows[0]["DriverHName"].ToString() == "0")
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "鍑鸿繍鍗曟湭鍒嗛厤杞﹁締涓庨┚椹跺憳锛屾棤娉曡繘琛屽埌鍘傜‘璁ゆ搷浣滐紒锛�";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+
oCN.RunProc("update WL_YayBillMain set HSurer_Arrive='" + CurUserName + "',HDate_Arrive=getdate() where HInterID=" + HInterID);
}
- else if(IsAudit == 2)
+ else if (IsAudit == 2)
{
+ if (!DBUtility.ClsPub.Security_Log_second("WLYayBill_pickConfirm", 1, false, CurUserName))
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "鎻愯揣纭澶辫触锛佹棤鏉冮檺锛�";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+
+ if (DBUtility.ClsPub.isStrNull(ds.Tables[0].Rows[0]["HSurer_Arrive"]) == "")
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "鍑鸿繍鍗曡鍏堣繘琛屽埌鍘傜‘璁わ紝鐒跺悗鍐嶈繘琛屾彁璐х‘璁わ紒锛�";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+
oCN.RunProc("update WL_YayBillMain set HSurer_Pick='" + CurUserName + "',HDate_Pick=getdate() where HInterID=" + HInterID);
}
- else if(IsAudit == 3)
+ else if (IsAudit == 3)
{
+ if (!DBUtility.ClsPub.Security_Log_second("WLYayBill_tranConfirm", 1, false, CurUserName))
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "鍑哄巶杩愯緭澶辫触锛佹棤鏉冮檺锛�";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ if (DBUtility.ClsPub.isStrNull(ds.Tables[0].Rows[0]["HSurer_Pick"]) == "" )
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "褰撳墠鍑鸿繍鍗曟湭杩涜鎻愯揣纭銆傝鍏堣繘琛屾彁璐х‘璁わ紝鐒跺悗鍐嶈繘琛屽嚭鍘傜‘璁わ紒锛�";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+
oCN.RunProc("update WL_YayBillMain set HSurer_Trans='" + CurUserName + "',HDate_Trans=getdate() where HInterID=" + HInterID);
-
}
- else if(IsAudit == 4)
+ else if (IsAudit == 4)
{
- oCN.RunProc("update WL_YayBillMain set HSurer_Receive='" + CurUserName + "',HDate_Receive=getdate() where HInterID=" + HInterID);
+ if (!DBUtility.ClsPub.Security_Log_second("WLYayBill_receiveConfirm", 1, false, CurUserName))
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "绛炬敹澶辫触锛佹棤鏉冮檺锛�";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ if (DBUtility.ClsPub.isStrNull(ds.Tables[0].Rows[0]["HSurer_Trans"]) == "")
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "褰撳墠鍑鸿繍鍗曟湭杩涜鍑哄巶纭銆傝鍏堣繘琛屽嚭鍘傜‘璁わ紝鐒跺悗鍐嶈繘琛岀鏀剁‘璁わ紒锛�";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ oCN.RunProc("update WL_YayBillMain set HSurer_Receive='" + CurUserName + "',HDate_Receive=getdate() where HInterID=" + HInterID);
}
else
{
- throw new Exception();
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "鎿嶄綔澶辫触锛屽綋鍓嶆搷浣滄寚浠ゆ棤娉曡瘑鍒�傝鑱旂郴绯荤粺缁存姢浜哄憳杩涜澶勭悊锛侊紒";
+ objJsonResult.data = null;
+ return objJsonResult;
}
+ oCN.Commit();
objJsonResult.code = "1";
objJsonResult.count = 1;
objJsonResult.Message = "鎴愬姛";
objJsonResult.data = null;
- oCN.Commit();
-
return objJsonResult;
}
catch (Exception e)
@@ -473,79 +816,9 @@
}
#endregion
-
- #region 閫夋嫨杞﹁締鍜屽徃鏈�
- /// <summary>
- ///
- /// </summary>
- /// <param name="HInterID">鍗曟嵁ID</param>
- /// <param name="IsAudit">瀹℃牳(0),鍙嶅鏍�(1)</param>
- /// <param name="CurUserName">瀹℃牳浜�</param>
- /// <returns></returns>
- [Route("WLYayBillController/selectDriver")]
- [HttpGet]
- public object selectDriver(int HInterID,int HcheckID, int IsAudit, string CurUserName)
- {
- try
- {
- DataSet ds;
- if(IsAudit==1)
- {
- ds = oCN.RunProcReturn("select * from h_v_Gy_CarList where HItemID=" + HcheckID, "h_v_Gy_CarList");
- if (ds.Tables[0].Rows.Count > 0)
- {
- oCN.BeginTran();
+
- oCN.RunProc("update WL_YayBillMain set HCarID='" + HcheckID + "' where HInterID=" + HInterID);
-
- objJsonResult.code = "1";
- objJsonResult.count = 1;
- objJsonResult.Message = "鎴愬姛";
- objJsonResult.data = null;
- oCN.Commit();
- return objJsonResult;
- }
-
-
- }
- else
- {
-
- ds = oCN.RunProcReturn("select * from h_v_Gy_driver where HItemID=" + HcheckID, "h_v_Gy_driver");
- if (ds.Tables[0].Rows.Count > 0)
- {
- oCN.BeginTran();
-
-
- oCN.RunProc("update WL_YayBillMain set HDriverID='" + HcheckID + "',HDate_AllocationDriver=getdate() where HInterID=" + HInterID);
-
- objJsonResult.code = "1";
- objJsonResult.count = 1;
- objJsonResult.Message = "鎴愬姛";
- objJsonResult.data = null;
- oCN.Commit();
- return objJsonResult;
- }
- }
- oCN.RollBack();
- objJsonResult.code = "0";
- objJsonResult.count = 0;
- objJsonResult.Message = "澶辫触锛�";
- objJsonResult.data = null;
-
- return objJsonResult;
- }
- catch (Exception e)
- {
- oCN.RollBack();
- objJsonResult.code = "0";
- objJsonResult.count = 0;
- objJsonResult.Message = "澶辫触锛�" + e.ToString();
- objJsonResult.data = null;
- return objJsonResult;
- }
- }
- #endregion
+
}
}
--
Gitblit v1.9.1