From 80a5123df7536f035addadf2b3fe879ee45b1317 Mon Sep 17 00:00:00 2001
From: 陈雯静 <1134865194@qq.com>
Date: 星期一, 04 三月 2024 15:20:41 +0800
Subject: [PATCH] 1
---
WebAPI/Controllers/CGGL/Cg_POOrderBillController.cs | 311 ++++++++++++++++++++++-----------------------------
1 files changed, 135 insertions(+), 176 deletions(-)
diff --git a/WebAPI/Controllers/CGGL/Cg_POOrderBillController.cs b/WebAPI/Controllers/CGGL/Cg_POOrderBillController.cs
index cf8582d..5bf55bb 100644
--- a/WebAPI/Controllers/CGGL/Cg_POOrderBillController.cs
+++ b/WebAPI/Controllers/CGGL/Cg_POOrderBillController.cs
@@ -755,8 +755,13 @@
string HBillSubType = mainList2[0].HBillSubType == null ? "''" : mainList2[0].HBillSubType;
long HBillStatus = mainList2[0].HBillStatus == null ? 0 : mainList2[0].HBillStatus;
string HChecker = mainList2[0].HChecker == null ? "''" : mainList2[0].HChecker;
+ string HUpDater = mainList2[0].HUpDater == null ? "''" : mainList2[0].HUpDater;
+ string HCloseMan = mainList2[0].HCloseMan == null ? "''" : mainList2[0].HCloseMan;
+ string HDeleteMan = mainList2[0].HDeleteMan == null ? "''" : mainList2[0].HDeleteMan;
string HCheckDate = mainList2[0].HCheckDate == null ? "''" : mainList2[0].HCheckDate;
string HMakeDate = mainList2[0].HMakeDate == null ? "''" : mainList2[0].HMakeDate;
+ string HUpDateDate = mainList2[0].HUpDateDate == null ? "''" : mainList2[0].HUpDateDate;
+ string HDeleteDate = mainList2[0].HDeleteDate == null ? "''" : mainList2[0].HDeleteDate;
long HERPInterID = mainList2[0].HERPInterID == null ? 0 : mainList2[0].HERPInterID;
string HERPBillType = mainList2[0].HERPBillType == null ? "''" : mainList2[0].HERPBillType;
long HPURCHASEORGID = mainList2[0].HPURCHASEORGID == null ? 0 : mainList2[0].HPURCHASEORGID;
@@ -808,21 +813,20 @@
(HInterID,HYear,HPeriod,HBillType,HBillSubType,HDate,HBillNo,HBillStatus
,HAddress,HSSID,HSSDate,HPSStyleID,HSupID,HCurID
,HExRate,HEmpID,HManagerID,HDeptID,HExplanation,HRemark,HInnerBillNo
- ,HChecker,HCheckDate,HMaker,HMakeDate
+ ,HMaker,HMakeDate
,HERPInterID,HERPBillType,HPURCHASEORGID
,HPURCHASERGROUPID,HPROVIDERID,HSETTLEID,HCHARGEID,HBUSINESSTYPE,HPROVIDERADDRESS,HCORRESPONDORGID,HPROVIDERCONTACTID)
values(" + HInterID + "," + DateTime.Now.Year + "," + DateTime.Now.Month + ",'" + 1102 + "','" +
HBillSubType + "','" + HDate + "','" + HBillNo + "','" + HBillStatus + "','" + HAddress +
"'," + HSSID + ",'" + HSSDate + "'," + HPSStyleID + "," + HSupID + "," + HCurID +
- "," + HExRate + "," + HEmpID + "," + HManagerID + "," + HDeptID + ",'" + HExplanation + "','" + HRemark + "','" + HInnerBillNo + "','" + HChecker + "','" + HCheckDate + "','" + HMaker + "','" +
- HMakeDate + "'," + HERPInterID + ",'" + HERPBillType + "'," + HPURCHASEORGID + "," + HPURCHASERGROUPID + ","
+ "," + HExRate + "," + HEmpID + "," + HManagerID + "," + HDeptID + ",'" + HExplanation + "','" + HRemark + "','" + HInnerBillNo + "','" + HMaker + "',getdate()" + "," + HERPInterID + ",'" + HERPBillType + "'," + HPURCHASEORGID + "," + HPURCHASERGROUPID + ","
+ HPROVIDERID + "," + HSETTLEID + "," + HCHARGEID + ",'" + HBUSINESSTYPE + "','" + HPROVIDERADDRESS + "',"
+ HCORRESPONDORGID + "," + HPROVIDERCONTACTID + ")");
}
else if (OperationType == 3 || ds.Tables[0].Rows.Count != 0)
{ //淇敼
oCN.RunProc("update Cg_POOrderBillMain set " +
- "HRemark='" + HRemark + "', HChecker='" + HMaker + "', HCheckDate=getdate()" +
+ "HRemark='" + HRemark + "', HUpDater='" + HMaker + "', HUpDateDate=getdate()" +
",HSSID=" + HSSID + ",HPSStyleID=" + HPSStyleID + ",HSupID=" + HSupID + ",HCurID=" + HCurID
+ ",HExRate=" + HExRate + ",HEmpID=" + HEmpID + ",HManagerID=" + HManagerID + ",HDeptID=" + HDeptID
+ ",HAddress='" + HAddress + "',HSSDate='" + HSSDate + "' where HInterID=" + HInterID);
@@ -882,6 +886,7 @@
string HSourceEntryID = DetailColl2[0].HSourceEntryID == null ? "''" : DetailColl2[0].HSourceEntryID;
long HSEQ = DetailColl2[0].HSEQ == null ? 0 : DetailColl2[0].HSEQ;//琛屽彿
+ long HSTOCKORGID = DetailColl2[0].HSTOCKORGID == null ? 0 : DetailColl2[0].HSTOCKORGID;//鏀舵枡缁勭粐
long HRECEIVEDEPTID = DetailColl2[0].HRECEIVEDEPTID == null ? 0 : DetailColl2[0].HRECEIVEDEPTID;//鏀舵枡閮ㄩ棬
string HSUPPLIERLOT = DetailColl2[0].HSUPPLIERLOT == null ? "''" : DetailColl2[0].HSUPPLIERLOT;//渚涘簲鍟嗘壒鍙�
long HBOMID = DetailColl2[0].HBOMID == null ? 0 : DetailColl2[0].HBOMID;//BOM鐗堟湰
@@ -970,14 +975,14 @@
,HMoney,HTaxRate,HTaxMoney,HLineTotal,HlineTotalBB,HDate,HInStockQty,HInvoiceQty,HSeOrderBillNo,HSeOrderInterID
,HSeOrderEntryID,HRemark,HSourceInterID,HSourceEntryID,HSourceBillNo
,HSourceBillType,HRelationQty,HBackRelationQty,HPropertyID,HBatChNo,HAuxPropID,HMTONo
- ,HERPInterID,HERPEntryID
+ ,HERPInterID,HERPEntryID,HSTOCKORGID
,HSEQ,HRECEIVEDEPTID,HSUPPLIERLOT,HBOMID,HSTOCKUNITID,HBASEUNITID,HBFLOWID,HGIVEAWAY,HROWTYPE,HBASEUNITQTY,HSTOCKBASEQTY
,HREQTRACENO,HTAXNETPRICE,HPRICECOEFFICIENT,HTAXCOMBINATION,HPRICEUNITID,HPRICELISTENTRY,HPAYORGID,HSETTLEMODEID,HSETTLECURRID
,HEXCHANGETYPEID,HPAYCONDITIONID,HEXCHANGERATE,HLOCALCURRID,HISINCLUDEDTAX,HISPRICEEXCLUDETAX,HTAXRATEID,HCOSTPERCENT,HCOSTAMOUNT
,HVAT,HSELLERWITHHOLDING,HBUYERWITHHOLDING,HMATERIALDESC)
values({HInterID},{NewHEntryID},{oSub.HMaterID},{oSub.HUnitID},{(oSub.HQty == null ? 0 : oSub.HQty)}
,{oSub.HPrice},{oSub.HTaxPrice},{oSub.HDiscountRate},{oSub.HRelTaxPrice},{oSub.HMoney},{oSub.HTaxRate},{oSub.HTaxMoney},{oSub.HlineTotal},{oSub.HlineTotalBB},'{oSub.HDate}',{oSub.HInStockQty},{oSub.HInvoiceQty},{HSeOrderBillNo},{oSub.HSeOrderInterID},{oSub.HSeOrderEntryID},'{HRemark}',{HSourceInterID},{HSourceEntryID},{HSourceBillNo},{HSourceBillType},{HRelationQty},{HBackRelationQty},{HPropertyID},{HBatChNo},
- {HAuxPropID},{HMTONo},{HERPInterID},{HERPEntryID},{HSEQ},{HRECEIVEDEPTID},'{HSUPPLIERLOT}',{HBOMID},{HSTOCKUNITID},{HBASEUNITID},'{HBFLOWID}',{HGIVEAWAY},{HROWTYPE},{HBASEUNITQTY},{HSTOCKBASEQTY},'{HREQTRACENO}',{HTAXNETPRICE},{HPRICECOEFFICIENT},{HTAXCOMBINATION},{HPRICEUNITID},{HPRICELISTENTRY},{HPAYORGID},{HSETTLEMODEID},{HSETTLECURRID},{HEXCHANGETYPEID},{HPAYCONDITIONID},{HEXCHANGERATE},{HLOCALCURRID},{HISINCLUDEDTAX},{HISPRICEEXCLUDETAX},{HTAXRATEID},{HCOSTPERCENT},{HCOSTAMOUNT},{HVAT},{HSELLERWITHHOLDING},{HBUYERWITHHOLDING},'{HMATERIALDESC}')");
+ {HAuxPropID},{HMTONo},{HERPInterID},{HERPEntryID},{HSTOCKORGID},{HSEQ},{HRECEIVEDEPTID},'{HSUPPLIERLOT}',{HBOMID},{HSTOCKUNITID},{HBASEUNITID},'{HBFLOWID}',{HGIVEAWAY},{HROWTYPE},{HBASEUNITQTY},{HSTOCKBASEQTY},'{HREQTRACENO}',{HTAXNETPRICE},{HPRICECOEFFICIENT},{HTAXCOMBINATION},{HPRICEUNITID},{HPRICELISTENTRY},{HPAYORGID},{HSETTLEMODEID},{HSETTLECURRID},{HEXCHANGETYPEID},{HPAYCONDITIONID},{HEXCHANGERATE},{HLOCALCURRID},{HISINCLUDEDTAX},{HISPRICEEXCLUDETAX},{HTAXRATEID},{HCOSTPERCENT},{HCOSTAMOUNT},{HVAT},{HSELLERWITHHOLDING},{HBUYERWITHHOLDING},'{HMATERIALDESC}')");
}
//淇濆瓨鍚庢帶鍒�=========================================
@@ -1052,7 +1057,7 @@
,HMoney,HTaxRate,HTaxMoney,HLineTotal,HlineTotalBB,HDate,HInStockQty,HInvoiceQty,HSeOrderBillNo,HSeOrderInterID
,HSeOrderEntryID,HRemark,HSourceInterID,HSourceEntryID,HSourceBillNo
,HSourceBillType,HRelationQty,HBackRelationQty,HPropertyID,HBatChNo,HAuxPropID,HMTONo
- ,HERPInterID,HERPEntryID
+ ,HERPInterID,HERPEntryID,HSTOCKORGID
,HSEQ,HRECEIVEDEPTID,HSUPPLIERLOT,HBOMID,HSTOCKUNITID,HBASEUNITID,HBFLOWID,HGIVEAWAY,HROWTYPE,HBASEUNITQTY,HSTOCKBASEQTY
,HREQTRACENO,HTAXNETPRICE,HPRICECOEFFICIENT,HTAXCOMBINATION,HPRICEUNITID,HPRICELISTENTRY,HPAYORGID,HSETTLEMODEID,HSETTLECURRID
,HEXCHANGETYPEID,HPAYCONDITIONID,HEXCHANGERATE,HLOCALCURRID,HISINCLUDEDTAX,HISPRICEEXCLUDETAX,HTAXRATEID,HCOSTPERCENT,HCOSTAMOUNT
@@ -1061,7 +1066,7 @@
'{oSub.HMoney}','{oSub.HTaxRate}','{oSub.HTaxMoney}','{oSub.HlineTotal}','{oSub.HlineTotalBB}','{oSub.HDate}','{oSub.HInStockQty}','{oSub.HInvoiceQty}','{oSub.HSeOrderBillNo}','{oSub.HSeOrderInterID}',
'{oSub.HSeOrderEntryID}','{oSub.HRemark}','{oSub.HSourceInterID}','{oSub.HSourceEntryID}','{oSub.HSourceBillNo}',
'{oSub.HSourceBillType}','{oSub.HRelationQty}','{oSub.HBackRelationQty}','{oSub.HPropertyID}','{oSub.HBatChNo}','{oSub.HAuxPropID}','{oSub.HMTONo}',
- '{oSub.HERPInterID}','{oSub.HERPEntryID}',
+ '{oSub.HERPInterID}','{oSub.HERPEntryID}','{oSub.HSTOCKORGID}',
'{oSub.HSEQ}','{oSub.HRECEIVEDEPTID}','{oSub.HSUPPLIERLOT}','{oSub.HBOMID}','{oSub.HSTOCKUNITID}','{oSub.HBASEUNITID}','{oSub.HBFLOWID}','{oSub.HGIVEAWAY}','{oSub.HROWTYPE}','{oSub.HBASEUNITQTY}','{oSub.HSTOCKBASEQTY}',
'{oSub.HREQTRACENO}','{oSub.HTAXNETPRICE}','{oSub.HPRICECOEFFICIENT}','{oSub.HTAXCOMBINATION}','{oSub.HPRICEUNITID}','{oSub.HPRICELISTENTRY}','{oSub.HPAYORGID}','{oSub.HSETTLEMODEID}','{oSub.HSETTLECURRID}',
'{oSub.HEXCHANGETYPEID}','{oSub.HPAYCONDITIONID}','{oSub.HEXCHANGERATE}','{oSub.HLOCALCURRID}','{oSub.HISINCLUDEDTAX}','{oSub.HISPRICEEXCLUDETAX}','{oSub.HTAXRATEID}','{oSub.HCOSTPERCENT}','{oSub.HCOSTAMOUNT}',
@@ -1236,7 +1241,6 @@
#region 閲囪喘璁㈠崟 瀹℃牳/鍙嶅鏍�
/// <summary>
- ///
/// </summary>
/// <param name="HInterID">鍗曟嵁ID</param>
/// <param name="IsAudit">瀹℃牳(0),鍙嶅鏍�(1)</param>
@@ -1244,54 +1248,95 @@
/// <returns></returns>
[Route("Cg_POOrderBill/AuditCg_POOrderBill")]
[HttpGet]
- public object AuditCg_POOrderBill(string HInterID, int Type, string user)
+ public object AuditCg_POOrderBill(int HInterID, int IsAudit, string CurUserName)
{
- string sql = "";
+ string ModRightNameCheck = "Cg_POOrderBill_Check";
+ DBUtility.ClsPub.CurUserName = CurUserName;
try
{
- //鍒ゆ柇鏄惁鏈夊鏍告潈闄�
- if (!DBUtility.ClsPub.Security_Log("Cg_POOrderBill_Check", 1, false, user))
+ //瀹℃牳鏉冮檺
+ if (!DBUtility.ClsPub.Security_Log_second(ModRightNameCheck, 1, false, CurUserName))
{
objJsonResult.code = "0";
objJsonResult.count = 0;
- objJsonResult.Message = "鏃犳潈闄愬鏍�!";
+ 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;
}
- if (string.IsNullOrWhiteSpace(HInterID))
- {
- objJsonResult.code = "0";
- objJsonResult.count = 0;
- objJsonResult.Message = "HInterID涓虹┖锛�";
- objJsonResult.data = null;
- return objJsonResult;
- }
- ClsPub.CurUserName = user;
- BillOld.MvarItemKey = "Cg_POOrderBillMain";
- ds = oCN.RunProcReturn("select * from Cg_POOrderBillMain where HInterID = " + int.Parse(HInterID), "Cg_POOrderBillMain");
- string HBillNo = "";
- oCN.BeginTran();//寮�濮嬩簨鍔�
- if (ds == null || ds.Tables[0].Rows.Count == 0)
+ Int64 lngBillKey = 0;
+ lngBillKey = DBUtility.ClsPub.isLong(HInterID); //瀵笻InterID杩涜绫诲瀷鐨勮浆鎹�
+ DAL.ClsCg_POOrderBill oBill = new DAL.ClsCg_POOrderBill(); //瀹炰緥鍖栧崟鎹搷浣滅被锛岀敤浜庤繘琛岀浉鍏虫搷浣�
+
+ //閽堝闇�瑕佽繘琛岀殑鎿嶄綔锛屾楠屽綋鍓嶅崟鎹殑鐘舵�佹槸鍚︽敮鎸侀渶瑕佽繘琛岀殑鎿嶄綔
+ if (oBill.ShowBill(lngBillKey, ref DBUtility.ClsPub.sExeReturnInfo)) //鏍规嵁HInterID鑾峰彇璇ュ崟鎹殑鏁版嵁
{
- 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.HDeleteMan.Trim() != "")
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "鍗曟嵁宸蹭綔搴�!涓嶈兘鍐嶆瀹℃牳锛�";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ if (IsAudit == 0) //瀹℃牳鍒ゆ柇
+ {
+ if (oBill.omodel.HChecker.Trim() != "")
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "鍗曟嵁宸插鏍�!涓嶈兘鍐嶆瀹℃牳锛�";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ }
+ if (IsAudit == 1) //鍙嶅鏍稿垽鏂�
+ {
+ if (oBill.omodel.HChecker.Trim() == "")
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "鍗曟嵁鏈鏍�!涓嶉渶瑕佸弽瀹℃牳!";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ }
}
else
{
- HBillNo = ds.Tables[0].Rows[0]["HBillNo"].ToString();
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "鍗曟嵁涓嶅瓨鍦�!鍘熷洜:" + DBUtility.ClsPub.sExeReturnInfo;
+ objJsonResult.data = null;
+ return objJsonResult;
}
- //Type 1 瀹℃牳 2 鍙嶅鏍�
- if (Type == 1)
- {
- //瀹℃牳鍓嶆帶鍒�
- sql = "exec h_p_Cg_POOrderBill_BeforeCheckCtrl " + int.Parse(HInterID) + ",'" + HBillNo + "','" + user + "'";
- ds = oCN.RunProcReturn(sql, "h_p_Cg_POOrderBill_BeforeCheckCtrl");
+
+ //杩涜闇�瑕佽繘琛岀殑瀹℃牳/鍙嶅鏍告搷浣�
+ if (IsAudit == 0) //瀹℃牳鎻愪氦
+ {
+
+ //瀹℃牳鍓嶆帶鍒�=========================================
+ string sql1 = "exec h_p_Cg_POOrderBill_BeforeCheckCtrl " + oBill.omodel.HInterID + ",'" + oBill.omodel.HBillNo + "','" + CurUserName + "'";
+ ds = oCN.RunProcReturn(sql1, "h_p_Cg_POOrderBill_BeforeCheckCtrl");
if (ds == null || ds.Tables.Count == 0 || ds.Tables[0].Rows.Count == 0)
{
objJsonResult.code = "0";
@@ -1299,8 +1344,8 @@
objJsonResult.Message = "瀹℃牳澶辫触!鍘熷洜:瀹℃牳鍓嶅垽鏂け璐ワ紝璇蜂笌缃戠粶绠$悊浜哄憳鑱旂郴";
objJsonResult.data = null;
return objJsonResult;
-
}
+
if (ds.Tables[0].Rows[0]["HBack"].ToString() != "0")
{
objJsonResult.code = "0";
@@ -1309,166 +1354,80 @@
objJsonResult.data = null;
return objJsonResult;
}
+ //==================================================================================
- if (!BillOld.CheckBill(int.Parse(HInterID), HBillNo, "h_p_Cg_POOrderBill_AfterCheckCtrl", user, ref ClsPub.sExeReturnInfo))
+ //瀹℃牳鎻愪氦
+ if (oBill.CheckBill(oBill.omodel.HInterID, oBill.omodel.HBillNo, "h_p_Cg_POOrderBill_AfterCheckCtrl", CurUserName, ref DBUtility.ClsPub.sExeReturnInfo) == true)
{
- objJsonResult.code = "0";
+ objJsonResult.code = "1";
objJsonResult.count = 1;
- objJsonResult.Message = "瀹℃牳澶辫触!鍘熷洜:" + ClsPub.sExeReturnInfo;
+ objJsonResult.Message = "瀹℃牳鎴愬姛";
objJsonResult.data = null;
return objJsonResult;
- }
- }
- else
- {
- //鍙嶅鏍稿墠鎺у埗
- sql = "exec h_p_Cg_POOrderBill_BeforeUnCheckCtrl " + int.Parse(HInterID) + ",'" + HBillNo + "','" + user + "'";
- ds = oCN.RunProcReturn(sql, "h_p_Cg_POOrderBill_BeforeUnCheckCtrl");
- if (ds == null || ds.Tables.Count == 0 || ds.Tables[0].Rows.Count == 0)
- {
- objJsonResult.code = "0";
- objJsonResult.count = 1;
- objJsonResult.Message = "鍙嶅鏍稿け璐�!鍘熷洜:鍙嶅鏍稿墠鍒ゆ柇澶辫触锛岃涓庣綉缁滅鐞嗕汉鍛樿仈绯�";
- objJsonResult.data = null;
- return objJsonResult;
-
- }
- if (ds.Tables[0].Rows[0]["HBack"].ToString() != "0")
- {
- objJsonResult.code = "0";
- objJsonResult.count = 1;
- objJsonResult.Message = "鍙嶅鏍稿け璐�!鍘熷洜:" + ds.Tables[0].Rows[0]["HRemark"].ToString(); ;
- objJsonResult.data = null;
- return objJsonResult;
- }
-
- if (BillOld.AbandonCheck(int.Parse(HInterID), HBillNo, "h_p_Cg_POOrderBill_AfterUnCheckCtrl", user, ref ClsPub.sExeReturnInfo))
- {
- SQLHelper.ClsCN oCn = new SQLHelper.ClsCN();
-
}
else
{
objJsonResult.code = "0";
- objJsonResult.count = 1;
- objJsonResult.Message = "瀹℃牳澶辫触!鍘熷洜:" + ClsPub.sExeReturnInfo;
+ objJsonResult.count = 0;
+ objJsonResult.Message = "瀹℃牳澶辫触!鍘熷洜:" + DBUtility.ClsPub.sExeReturnInfo;
objJsonResult.data = null;
return objJsonResult;
}
}
- ////鍒ゆ柇鍗曟嵁鏄惁宸茬粡瀹℃牳
- //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]["HCloseMan"] != null && ds.Tables[0].Rows[0]["HCloseMan"].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 (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 (!BillOld.CheckBill(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]["HCloseMan"] != null && ds.Tables[0].Rows[0]["HCloseMan"].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 (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 (!BillOld.AbandonCheck(Int64.Parse(HInterID), ref ClsPub.sExeReturnInfo))
- // {
- // objJsonResult.code = "0";
- // objJsonResult.count = 1;
- // objJsonResult.Message = "鍙嶅鏍稿け璐�!鍘熷洜:" + ClsPub.sExeReturnInfo;
- // objJsonResult.data = null;
- // return objJsonResult;
- // }
- // }
- //}
+ if (IsAudit == 1) //鍙嶅鏍告彁浜�
+ {
+ //鍙嶅鏍稿墠鎺у埗=========================================
+ DataSet ds = oCN.RunProcReturn("Exec h_p_Cg_POOrderBill_BeforeUnCheckCtrl " + lngBillKey, "h_p_Cg_POOrderBill_BeforeUnCheckCtrl");
+ if (ds == null)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "鍙嶅鏍稿け璐�!鍘熷洜:" + "鍙嶅鏍稿墠鍒ゆ柇澶辫触锛�";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ if (DBUtility.ClsPub.isStrNull(ds.Tables[0].Rows[0]["HBack"]) != "0")
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "鍙嶅鏍稿け璐�!鍘熷洜:" + DBUtility.ClsPub.isStrNull(ds.Tables[0].Rows[0]["HBackRemark"]);
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ //=========================================================
- //oCN.Commit();//鎻愪氦浜嬪姟
-
- objJsonResult.code = "0";
- objJsonResult.count = 1;
- objJsonResult.Message = "鎵ц鎴愬姛锛�";
- objJsonResult.data = null;
- return objJsonResult; ;
-
+ //鍙嶅鏍告彁浜bandonCheck
+ if (oBill.AbandonCheck(oBill.omodel.HInterID, oBill.omodel.HBillNo, "h_p_Cg_POOrderBill_AfterUnCheckCtrl", 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;
+ }
+ }
+ return objJsonResult;
}
catch (Exception e)
{
objJsonResult.code = "0";
objJsonResult.count = 0;
- objJsonResult.Message = "鎵ц澶辫触锛�" + e.ToString();
+ objJsonResult.Message = "瀹℃牳澶辫触鎴栬�呭弽瀹℃牳澶辫触锛�" + e.ToString();
objJsonResult.data = null;
return objJsonResult;
}
}
#endregion
+
#region 閲囪喘璁㈠崟 鍏抽棴/鍙嶅叧闂姛鑳�
[Route("Cg_POOrderBill/CloseCg_POOrderBill")]
[HttpGet]
--
Gitblit v1.9.1