From 4ba4077f93ce9b3423e1ac5f5e8a21ebfd1e3ce0 Mon Sep 17 00:00:00 2001
From: duhe <226547893@qq.com>
Date: 星期五, 26 一月 2024 10:23:12 +0800
Subject: [PATCH] 收款单 保存方法,增加 调用 保存前控制 h_p_YS_ReceiveBill_BeforeSaveCtrl 和保存后控制 h_p_YS_ReceiveBill_AfterSaveCtrl的 存储过程。 收款单 反审核 审核 方法,增加 调用 反审核 审核前控制 h_p_YS_ReceiveBill_BeforeUnCheckCtrl 、h_p_YS_ReceiveBill_BeforeCheckCtrl 和 反审核 审核后控制 h_p_YS_ReceiveBill_AfterUnCheckCtrl、h_p_YS_ReceiveBill_AfterCheckCtrl的 存储过程。 应收退款单 保存方法,增加 调用 保存前控制 h_p_YS_ReceiveBackBill_BeforeSaveCtrl 和保存后控制 h_p_YS_ReceiveBackBill_AfterSaveCtrl的 存储过程。 应收退款单 反审核 审核 方法,增加 调用 反审核 审核前控制 h_p_YS_ReceiveBackBill_BeforeUnCheckCtrl 、h_p_YS_ReceiveBackBill_BeforeCheckCtrl 和 反审核 审核后控制 h_p_YS_ReceiveBackBill_AfterUnCheckCtrl、h_p_YS_ReceiveBackBill_AfterCheckCtrl的 存储过程。
---
WebAPI/Controllers/QC_ManagementController.cs | 546 +++++++++++++++++++++++++++++++++++++++++++++++-------
1 files changed, 473 insertions(+), 73 deletions(-)
diff --git a/WebAPI/Controllers/QC_ManagementController.cs b/WebAPI/Controllers/QC_ManagementController.cs
index 4cc2c52..1ea2e83 100644
--- a/WebAPI/Controllers/QC_ManagementController.cs
+++ b/WebAPI/Controllers/QC_ManagementController.cs
@@ -8,11 +8,15 @@
using System.Collections.Generic;
using System.Data;
using Newtonsoft.Json.Linq;
+using Pub_Class;
namespace WebAPI.Controllers
{
public class QC_ManagementController : ApiController
{
+ SQLHelper.ClsCN oCN = new SQLHelper.ClsCN();
+ public DAL.ClsQC_PatrolProcCheckBill BillOld = new DAL.ClsQC_PatrolProcCheckBill();
+ DataSet ds;
#region 閿欒杩斿洖鏂规硶
// GET: QC_Management
@@ -266,6 +270,375 @@
}
return GetObjectJson(ds);
}
+
+ #region 宸℃璁板綍鍗� 瀹℃牳 鍙嶅鏍� 鍏抽棴 鍙嶅叧闂� 浣滃簾 鍙嶄綔搴�
+ /// <summary>
+ /// 宸℃璁板綍鍗� 瀹℃牳銆佸弽瀹℃牳
+ /// </summary>
+ /// <param name="HInterID">鍗曟嵁ID</param>
+ /// <param name="IsAudit">瀹℃牳(0),鍙嶅鏍�(1)</param>
+ /// <param name="CurUserName">瀹℃牳浜�</param>
+ /// <returns></returns>
+ [Route("QC_Management/QC_PatrolProcCheckBillMainValue")]
+ [HttpGet]
+ public object QC_PatrolProcCheckBillMainValue(int HInterID, int IsAudit, string CurUserName)
+ {
+ try
+ {
+ //瀹℃牳鏉冮檺
+ if (!DBUtility.ClsPub.Security_Log_second("QC_PatrolProcCheckBill_Check", 1, false, CurUserName))
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "瀹℃牳澶辫触锛佹棤鏉冮檺锛�";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+
+ var ds = oCN.RunProcReturn("select * from QC_PatrolProcCheckBillMain where HInterID=" + HInterID, "QC_PatrolProcCheckBillMain");
+ if (ds.Tables[0].Rows.Count > 0)
+ {
+ if (IsAudit == 0) //瀹℃牳鍒ゆ柇
+ {
+ if (ds.Tables[0].Rows[0]["HChecker"].ToString() != "")
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "鍗曟嵁宸插鏍�!涓嶈兘鍐嶆瀹℃牳锛�";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ }
+ if (IsAudit == 1) //鍙嶅鏍稿垽鏂�
+ {
+ if (ds.Tables[0].Rows[0]["HChecker"].ToString() == "")
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "鍗曟嵁鏈鏍�!涓嶉渶瑕佸弽瀹℃牳!";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ }
+ }
+ else
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "鍗曟嵁涓嶅瓨鍦�!";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+
+ oCN.BeginTran();
+
+ if (IsAudit == 0) //瀹℃牳鍒ゆ柇
+ {
+ oCN.RunProc("update QC_PatrolProcCheckBillMain set HChecker='" + CurUserName + "',HCheckDate=getdate() where HInterID=" + HInterID);
+
+ objJsonResult.code = "1";
+ objJsonResult.count = 1;
+ objJsonResult.Message = "瀹℃牳鎴愬姛";
+ objJsonResult.data = null;
+ }
+ if (IsAudit == 1) //鍙嶅鏍稿垽鏂�
+ {
+ oCN.RunProc("update QC_PatrolProcCheckBillMain set HChecker='',HCheckDate=null where HInterID=" + HInterID);
+
+ objJsonResult.code = "1";
+ objJsonResult.count = 1;
+ objJsonResult.Message = "鍙嶅鏍告垚鍔�";
+ objJsonResult.data = null;
+ }
+ oCN.Commit();
+
+ return objJsonResult;
+ }
+ catch (Exception e)
+ {
+ oCN.RollBack();
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "瀹℃牳澶辫触鎴栬�呭弽瀹℃牳澶辫触锛�" + e.ToString();
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ }
+
+ /// <summary>
+ /// 宸℃璁板綍鍗� 鍏抽棴 鍙嶅叧闂�
+ /// </summary>
+ /// <param name="HInterID"></param>
+ /// <param name="Type"></param>
+ /// <param name="user"></param>
+ /// <returns></returns>
+ [Route("QC_Management/CloseQC_PatrolProcCheckBillMain")]
+ [HttpGet]
+ public object CloseQC_PatrolProcCheckBillMain(string HInterID, int Type, string user)
+ {
+ try
+ {
+ //鍒ゆ柇鏄惁鏈夊垹闄ゆ潈闄�
+ if (!DBUtility.ClsPub.Security_Log("QC_PatrolProcCheckBill_Close", 1, false, user))
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "鏃犳潈闄愬叧闂�!";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+
+ if (string.IsNullOrWhiteSpace(HInterID))
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "HInterID涓虹┖锛�";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+
+ ClsPub.CurUserName = user;
+ BillOld.MvarItemKey = "QC_PatrolProcCheckBillMain";
+ oCN.BeginTran();//寮�濮嬩簨鍔�
+
+ //Type 1 鍏抽棴 2 鍙嶅叧闂�
+ if (Type == 1)
+ {
+ //鍒ゆ柇鍗曟嵁鏄惁宸茬粡鍏抽棴
+ DataSet ds;
+ string sql = "select * from " + BillOld.MvarItemKey + " where HinterID = " + HInterID;
+ ds = oCN.RunProcReturn(sql, BillOld.MvarItemKey);
+ if (ds == null || ds.Tables[0].Rows.Count == 0)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "鍗曟嵁涓嶅瓨鍦紒";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ if (ds.Tables[0] != null && ds.Tables[0].Rows.Count > 0)
+ {
+ if (ds.Tables[0].Rows[0]["HDeleteMan"] != null && ds.Tables[0].Rows[0]["HDeleteMan"].ToString() != "")
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "鍗曟嵁宸蹭綔搴�!涓嶈兘杩涜鍏抽棴!";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+
+
+ if (ds.Tables[0].Rows[0]["HCloseMan"] != null && ds.Tables[0].Rows[0]["HCloseMan"].ToString() != "")
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "鍗曟嵁宸插叧闂�!涓嶈兘鍐嶆鍏抽棴!";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ //鍏抽棴鍗曟嵁
+ if (!BillOld.CloseBill(Int64.Parse(HInterID), ref ClsPub.sExeReturnInfo))
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 1;
+ objJsonResult.Message = "鍏抽棴澶辫触!鍘熷洜:" + ClsPub.sExeReturnInfo;
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ }
+ }
+ else
+ {
+ //鍒ゆ柇鍗曟嵁鏄惁宸茬粡鍙嶅叧闂�
+ DataSet ds;
+ string sql = "select * from " + BillOld.MvarItemKey + " where HinterID = " + HInterID;
+ ds = oCN.RunProcReturn(sql, BillOld.MvarItemKey);
+ if (ds.Tables[0] != null && ds.Tables[0].Rows.Count > 0)
+ {
+ if (ds.Tables[0].Rows[0]["HDeleteMan"] != null && ds.Tables[0].Rows[0]["HDeleteMan"].ToString() != "")
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "鍗曟嵁宸蹭綔搴�!涓嶈兘杩涜鍏抽棴!";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+
+ if (ds.Tables[0].Rows[0]["HCloseMan"] == null || ds.Tables[0].Rows[0]["HCloseMan"].ToString() == "")
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "鍗曟嵁鏈叧闂�!涓嶉渶瑕佸啀鍙嶅叧闂�!";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ //鍙嶅叧闂崟鎹�
+ if (!BillOld.CancelClose(Int64.Parse(HInterID), ref ClsPub.sExeReturnInfo))
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 1;
+ objJsonResult.Message = "鍙嶅叧闂け璐�!鍘熷洜:" + ClsPub.sExeReturnInfo;
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ }
+ }
+
+ 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;
+ }
+ }
+
+
+ /// <summary>
+ /// 宸℃璁板綍鍗� 浣滃簾 鍙嶄綔搴�
+ /// </summary>
+ /// <param name="HInterID"></param>
+ /// <param name="Type"></param>
+ /// <param name="user"></param>
+ /// <returns></returns>
+ [Route("QC_Management/DropQC_PatrolProcCheckBillMain")]
+ [HttpGet]
+ public object DropQC_PatrolProcCheckBillMain(string HInterID, int Type, string user)
+ {
+ try
+ {
+ //鍒ゆ柇鏄惁鏈変綔搴熸潈闄�
+ if (!DBUtility.ClsPub.Security_Log("QC_PatrolProcCheckBill_Drop", 1, false, user))
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "鏃犳潈闄愪綔搴�!";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+
+ if (string.IsNullOrWhiteSpace(HInterID))
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "HInterID涓虹┖锛�";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+
+ ClsPub.CurUserName = user;
+ BillOld.MvarItemKey = "QC_PatrolProcCheckBillMain";
+ oCN.BeginTran();//寮�濮嬩簨鍔�
+
+ //Type 1 浣滃簾 2 鍙嶄綔搴�
+ if (Type == 1)
+ {
+ //鍒ゆ柇鍗曟嵁鏄惁宸茬粡浣滃簾
+ DataSet ds;
+ string sql = "select * from " + BillOld.MvarItemKey + " where HinterID = " + HInterID;
+ ds = oCN.RunProcReturn(sql, BillOld.MvarItemKey);
+ if (ds == null || ds.Tables[0].Rows.Count == 0)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "鍗曟嵁涓嶅瓨鍦紒";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ if (ds.Tables[0] != null && ds.Tables[0].Rows.Count > 0)
+ {
+ if (ds.Tables[0].Rows[0]["HChecker"] != null && ds.Tables[0].Rows[0]["HChecker"].ToString() != "")
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "鍗曟嵁宸插鏍�!涓嶈兘杩涜浣滃簾!";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ if (ds.Tables[0].Rows[0]["HDeleteMan"] != null && ds.Tables[0].Rows[0]["HDeleteMan"].ToString() != "")
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "鍗曟嵁宸蹭綔搴�!涓嶉渶瑕佸啀浣滃簾!";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ //浣滃簾鍗曟嵁
+ if (!BillOld.Cancelltion(Int64.Parse(HInterID), ref ClsPub.sExeReturnInfo))
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 1;
+ objJsonResult.Message = "浣滃簾澶辫触!鍘熷洜:" + ClsPub.sExeReturnInfo;
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ }
+ }
+ else
+ {
+ //鍒ゆ柇鍗曟嵁鏄惁宸茬粡鍙嶄綔搴�
+ DataSet ds;
+ string sql = "select * from " + BillOld.MvarItemKey + " where HinterID = " + HInterID;
+ ds = oCN.RunProcReturn(sql, BillOld.MvarItemKey);
+ if (ds.Tables[0] != null && ds.Tables[0].Rows.Count > 0)
+ {
+ if (ds.Tables[0].Rows[0]["HChecker"] != null && ds.Tables[0].Rows[0]["HChecker"].ToString() != "")
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "鍗曟嵁宸插鏍�!涓嶈兘杩涜浣滃簾!";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ if (ds.Tables[0].Rows[0]["HDeleteMan"] == null || ds.Tables[0].Rows[0]["HDeleteMan"].ToString() == "")
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "鍗曟嵁鏈綔搴�!涓嶉渶瑕佸啀鍙嶄綔搴�!";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ //鍙嶄綔搴熷崟鎹�
+ if (!BillOld.AbandonCancelltion(Int64.Parse(HInterID), ref ClsPub.sExeReturnInfo))
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 1;
+ objJsonResult.Message = "鍙嶄綔搴熷け璐�!鍘熷洜:" + ClsPub.sExeReturnInfo;
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ }
+ }
+
+ 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
/// <summary>
@@ -1127,80 +1500,82 @@
return objJsonResult;
}
}
+ #region [浼垹闄ゆā寮廬
+ ///// <summary>
+ ///// 棣栦欢妫�楠岄�昏緫鍒犻櫎鍔熻兘
+ ///// </summary>
+ ///// <returns></returns>
+ //[Route("DeltetQC_FirstPieceCheck")]
+ //[HttpGet]
+ //public object DeltetQC_FirstPieceCheck(string HInterID,string user)
+ //{
+ // DataSet ds;
+ // string ModRightNameCheck = "QC_FirstPieceCheckBill_Delete";
+ // try
+ // {
+ // //鍒犻櫎鏉冮檺
+ // if (!DBUtility.ClsPub.Security_Log(ModRightNameCheck, 1, false, user))
+ // {
+ // objJsonResult.code = "0";
+ // objJsonResult.count = 0;
+ // objJsonResult.Message = "瀹℃牳澶辫触锛佹棤鏉冮檺锛�";
+ // objJsonResult.data = null;
+ // return objJsonResult;
+ // }
- /// <summary>
- /// 棣栦欢妫�楠岄�昏緫鍒犻櫎鍔熻兘
- /// </summary>
- /// <returns></returns>
- [Route("DeltetQC_FirstPieceCheck")]
- [HttpGet]
- public object DeltetQC_FirstPieceCheck(string HInterID,string user)
- {
- DataSet ds;
- string ModRightNameCheck = "QC_FirstPieceCheckBill_Delete";
- try
- {
- //鍒犻櫎鏉冮檺
- if (!DBUtility.ClsPub.Security_Log(ModRightNameCheck, 1, false, user))
- {
- objJsonResult.code = "0";
- objJsonResult.count = 0;
- objJsonResult.Message = "瀹℃牳澶辫触锛佹棤鏉冮檺锛�";
- objJsonResult.data = null;
- return objJsonResult;
- }
+ // SQLHelper.ClsCN oCN = new SQLHelper.ClsCN();
+ // if (string.IsNullOrWhiteSpace(HInterID))
+ // {
+ // objJsonResult.code = "0";
+ // objJsonResult.count = 0;
+ // objJsonResult.Message = "HInterID涓虹┖锛�";
+ // objJsonResult.data = null;
+ // return objJsonResult;
+ // }
+ // oCN.BeginTran();//寮�濮嬩簨鍔�
+ // ds = oCN.RunProcReturn("select * from QC_FirstPieceCheckBillMain where HInterID=" + HInterID, "QC_FirstPieceCheckBillMain");
+ // DataSet ds2 = oCN.RunProcReturn("select * from QC_FirstPieceCheckBillSub where HInterID=" + HInterID, "QC_FirstPieceCheckBillSub");
+ // if (ds == null || ds.Tables[0].Rows.Count == 0 || ds2 == null || ds2.Tables[0].Rows.Count == 0)
+ // {
+ // objJsonResult.code = "0";
+ // objJsonResult.count = 0;
+ // objJsonResult.Message = "娌℃湁杩欎釜鍗曟嵁锛屾棤娉曞垹闄わ紒";
+ // objJsonResult.data = null;
+ // return objJsonResult; ;
+ // }
+ // var HCloseMan = Convert.ToString(ds.Tables[0].Rows[0]["HCloseMan"]);
+ // var HCloseMan2 = Convert.ToString(ds2.Tables[0].Rows[0]["HCloseMan"]);
+ // if (!string.IsNullOrWhiteSpace(HCloseMan) || !string.IsNullOrWhiteSpace(HCloseMan2))
+ // {
+ // oCN.RollBack();//鍥炴粴浜嬪姟
+ // objJsonResult.code = "0";
+ // objJsonResult.count = 0;
+ // objJsonResult.Message = "鍗曟嵁宸插垹闄ゆ棤娉曞啀娆″垹闄わ紒";
+ // objJsonResult.data = null;
+ // return objJsonResult;
+ // }
- SQLHelper.ClsCN oCN = new SQLHelper.ClsCN();
- if (string.IsNullOrWhiteSpace(HInterID))
- {
- objJsonResult.code = "0";
- objJsonResult.count = 0;
- objJsonResult.Message = "HInterID涓虹┖锛�";
- objJsonResult.data = null;
- return objJsonResult;
- }
- oCN.BeginTran();//寮�濮嬩簨鍔�
- ds = oCN.RunProcReturn("select * from QC_FirstPieceCheckBillMain where HInterID=" + HInterID, "QC_FirstPieceCheckBillMain");
- DataSet ds2 = oCN.RunProcReturn("select * from QC_FirstPieceCheckBillSub where HInterID=" + HInterID, "QC_FirstPieceCheckBillSub");
- if (ds == null || ds.Tables[0].Rows.Count == 0 || ds2 == null || ds2.Tables[0].Rows.Count == 0)
- {
- objJsonResult.code = "0";
- objJsonResult.count = 0;
- objJsonResult.Message = "娌℃湁杩欎釜鍗曟嵁锛屾棤娉曞垹闄わ紒";
- objJsonResult.data = null;
- return objJsonResult; ;
- }
- var HCloseMan = Convert.ToString(ds.Tables[0].Rows[0]["HCloseMan"]);
- var HCloseMan2 = Convert.ToString(ds2.Tables[0].Rows[0]["HCloseMan"]);
- if (!string.IsNullOrWhiteSpace(HCloseMan) || !string.IsNullOrWhiteSpace(HCloseMan2))
- {
- oCN.RollBack();//鍥炴粴浜嬪姟
- objJsonResult.code = "0";
- objJsonResult.count = 0;
- objJsonResult.Message = "鍗曟嵁宸插垹闄ゆ棤娉曞啀娆″垹闄わ紒";
- objJsonResult.data = null;
- return objJsonResult;
- }
+ // oCN.RunProc("update QC_FirstPieceCheckBillMain set HCloseMan='-1',HCloseDate=GETDATE() where HInterID=" + HInterID);
+ // oCN.RunProc("update QC_FirstPieceCheckBillSub set HCloseMan='-1',HEntryCloseDate=GETDATE() where HInterID=" + HInterID);
+ // oCN.Commit();//鎻愪氦浜嬪姟
+ // objJsonResult.code = "0";
+ // objJsonResult.count = 1;
+ // objJsonResult.Message = "* 鍗曟嵁鍒犻櫎鎴愬姛锛�";
+ // objJsonResult.data = null;
+ // return objJsonResult; ;
- oCN.RunProc("update QC_FirstPieceCheckBillMain set HCloseMan='-1',HCloseDate=GETDATE() where HInterID=" + HInterID);
- oCN.RunProc("update QC_FirstPieceCheckBillSub set HCloseMan='-1',HEntryCloseDate=GETDATE() where HInterID=" + HInterID);
- 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;
- }
- }
+ // }
+ // catch (Exception e)
+ // {
+ // objJsonResult.code = "0";
+ // objJsonResult.count = 0;
+ // objJsonResult.Message = "鍒犻櫎澶辫触锛�" + e.ToString();
+ // objJsonResult.data = null;
+ // return objJsonResult;
+ // }
+ //}
+ #endregion
+
#endregion
#region 宸℃
@@ -1219,6 +1594,7 @@
string msg2 = sArray[0].ToString();
string msg3 = sArray[1].ToString();
string user = sArray[2].ToString();
+ string badmsg = sArray[3].ToString();
string UserName = "";
@@ -1251,7 +1627,7 @@
oItem.HBillSubType = "7506";
oItem.HBillStatus = 0;
oItem.HPeriod = 0;
- oItem.HMaker = "";
+ oItem.HMaker = user;
oItem.HMainSourceInterID = oItem.HInterID;
//oItem.HInterID = DBUtility.ClsPub.CreateBillID_SRMProd("1103", ref DBUtility.ClsPub.sExeReturnInfo);
@@ -1297,10 +1673,34 @@
oItemSub.HRelationQty = 0;
oItemSub.HRelationMoney = 0;
oItemSub.HCloseMan = "";
- oItemSub.HRemark = "";
+ //oItemSub.HRemark = "";
oBill.DetailColl.Add(oItemSub);
}
+ badmsg = badmsg.Substring(1, badmsg.Length - 2);
+ badmsg = badmsg.Replace("\\", "");
+ badmsg = badmsg.Replace("\n", ""); //\n
+ List<Model.ClsQC_PatrolProcCheckBillSub_BadReason> bs = new List<Model.ClsQC_PatrolProcCheckBillSub_BadReason>();
+ bs = oListModels.getObjectByJson_ClsQC_PatrolProcCheckBillSub_BadReason(badmsg);
+ int j = 0;
+ foreach (Model.ClsQC_PatrolProcCheckBillSub_BadReason badSub in bs)
+ {
+ badSub.HBillNo_bak = oBill.omodel.HBillNo;//鍗曟嵁鍙凤紙澶囦唤锛屼互鍏嶅唴鐮佷涪澶憋紝鎵句笉鍒板搴斾富琛級
+ j++;
+ if (string.IsNullOrWhiteSpace(badSub.HBillNo_bak))
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "淇濆瓨澶辫触锛佹病澶囦唤鍗曟嵁鍙凤紝鏃犳硶淇濆瓨锛�";
+ objJsonResult.data = 1;
+ return objJsonResult;
+ }
+ badSub.HInterID = oBill.omodel.HInterID;
+ badSub.HEntryID = j;
+ badSub.HSEQ = j;
+ oBill.DetailColl_Bad.Add(badSub);
+ }
+
//淇濆瓨
//淇濆瓨瀹屾瘯鍚庡鐞�
bool bResult;
--
Gitblit v1.9.1