From 549df1cac1529f4fc9b5d9b64e27de5d5d8b8951 Mon Sep 17 00:00:00 2001
From: chenhaozhe <cgz@hz-kingdee.com>
Date: 星期三, 22 十月 2025 13:53:41 +0800
Subject: [PATCH] Merge branch 'master' of http://101.37.171.70:10101/r/MES-WEB-API
---
WebAPI/Controllers/CJGL/Cj_StationOutBillController.cs | 381 +++++++++++++++++++++++++++++++++++++++++++++++++++---
1 files changed, 359 insertions(+), 22 deletions(-)
diff --git a/WebAPI/Controllers/CJGL/Cj_StationOutBillController.cs b/WebAPI/Controllers/CJGL/Cj_StationOutBillController.cs
index 94c868c..785ba0b 100644
--- a/WebAPI/Controllers/CJGL/Cj_StationOutBillController.cs
+++ b/WebAPI/Controllers/CJGL/Cj_StationOutBillController.cs
@@ -23,6 +23,7 @@
public DBUtility.ClsPub.Enum_BillStatus BillStatus;
Pub_Class.ClsXt_SystemParameter oSystemParameter = new Pub_Class.ClsXt_SystemParameter();
public DAL.ClsSc_ICMOBill BillOld = new DAL.ClsSc_ICMOBill();
+ public WebS.WebService1 oWebs = new WebS.WebService1();
private json objJsonResult = new json();
SQLHelper.ClsCN oCN = new SQLHelper.ClsCN();
DataSet ds;
@@ -153,6 +154,9 @@
double HBackWorkByMaterQty = list[0].HBackWorkByMaterQty;//閬楀け鏁伴噺
int HMouldID = list[0].HMouldID;//妯″叿id
double HMachineWorkTimes = list[0].HMachineWorkTimes;//璁惧宸ユ椂
+ int HIsTimeFlag = list[0].HIsTimeFlag;//鏄惁璁℃椂
+ string HRelBeginTime = list[0].HRelBeginTime;//寮�宸ユ椂闂�
+ string HRelEndTime = list[0].HRelEndTime;//瀹屽伐鏃堕棿
LogService.Write($"1.瀛楁璧嬪�硷紝鐢ㄦ椂" + sw.Elapsed );
//鍗曟嵁瀹屾暣鎬у垽鏂�
@@ -233,7 +237,7 @@
}
//鍒ゆ柇瀹㈡埛涓嶄负榫欏北姹介厤
- if (oSystemParameter.omodel.WMS_CampanyName != "榫欏北姹介厤" && oSystemParameter.omodel.WMS_CampanyName != "鐟炰笌绁�" && oSystemParameter.omodel.WMS_CampanyName != "娣诲悍绉戞妧") //绯荤粺鍙傛暟
+ if (oSystemParameter.omodel.WMS_CampanyName != "榫欏北姹介厤" && oSystemParameter.omodel.WMS_CampanyName != "鐟炰笌绁�" && oSystemParameter.omodel.WMS_CampanyName != "娣诲悍绉戞妧" && oSystemParameter.omodel.WMS_CampanyName != "娴疯瘹") //绯荤粺鍙傛暟
{
if (HSourceID == 0)
{
@@ -413,7 +417,7 @@
",HMainSourceInterID,HMainSourceBillNo,HMainSourceBillType,HLastSubProc" +
",HEmpID2,HEmpID3,HEmpID4,HEmpID5,HDSQty,HChongQty,HPriceRate,HWorkTimes,HQCCheckID,HMainInterID,HPRDOrgID" +
",HmaterOutqty,HProcPriceRate,HTemporaryAreaID,HWasterQty_Work,HWasterQty_Mater,HBackWorkQty,HShiftsID" +
- ",HToCheckQty,HLossQty,HBackWorkByMaterQty,HMouldID,HMachineWorkTimes " +
+ ",HToCheckQty,HLossQty,HBackWorkByMaterQty,HMouldID,HMachineWorkTimes,HIsTimeFlag,HRelBeginTime,HRelEndTime " +
") " +
" values('" + BillType + "','" + (OperationType == "5" ? "SUB" : HBillSubType) + "'," + HInterID + ",'" + HBillNo + "'," + HBillStatus + ",'"+ HDate + "','" + HMaker + "',getdate(),'" + HMouldNum + "'" +
"," + HYear + "," + HPeriod + ",'" + HRemark + "','" + HSourceName + "'," + HPieceQty + "," + HWasterQty + "," + HPlanPieceQty + "," + HBadPNL +
@@ -424,7 +428,7 @@
"," + HMainSourceInterID + ",'" + HMainSourceBillNo + "','" + HMainSourceBillType + "'," + Convert.ToString(HLastSubProc ? 1 : 0) +
"," + HEmpID2 + "," + HEmpID3 + "," + HEmpID4 + "," + HEmpID5 + "," + HDSQty + "," + HChongQty + "," + HPriceRate + "," + HWorkTimes + "," + HQCCheckID + "," + HMainInterID + "," + HPRDOrgID +
"," + HmaterOutqty + "," + HProcPriceRate + "," + HTemporaryAreaID + "," + HWasterQty_Work + "," + HWasterQty_Mater + "," + HBackWorkQty +
- "," + HShiftsID + "," + HToCheckQty + "," + HLossQty + ","+ HBackWorkByMaterQty + "," + HMouldID + ",'" + HMachineWorkTimes + "') ");
+ "," + HShiftsID + "," + HToCheckQty + "," + HLossQty + ","+ HBackWorkByMaterQty + "," + HMouldID + ",'" + HMachineWorkTimes + "',"+ HIsTimeFlag + ",'" + HRelBeginTime + "','" + HRelEndTime + "') ");
LogService.Write($"4.鏂板缁撴潫锛岀敤鏃�" + sw.Elapsed);
LogService.Write("鐢ㄦ埛:" + user + ",鏃ユ湡:" + DateTime.Now + ",鏂板宸ュ簭鍑虹珯鍗曟嵁:" + HBillNo);
@@ -471,7 +475,10 @@
",HBackWorkQty=" + HBackWorkQty +
",HBackWorkByMaterQty=" + HBackWorkByMaterQty +
",HMouldID=" + HMouldID +
- ",HMachineWorkTimes=" + HMachineWorkTimes +
+ ",HMachineWorkTimes=" + HMachineWorkTimes +
+ //",HIsTimeFlag=" + HIsTimeFlag +
+ //",HRelBeginTime='" + HRelBeginTime + "'" +
+ //",HRelEndTime='" + HRelEndTime + "'" +
" where HInterID=" + HInterID);
LogService.Write("鐢ㄦ埛:" + user + ",鏃ユ湡:" + DateTime.Now + ",淇敼宸ュ簭鍑虹珯鍗曟嵁:" + HBillNo);
@@ -515,7 +522,7 @@
oCN.RollBack();
objJsonResult.code = "0";
objJsonResult.count = 0;
- objJsonResult.Message = "[0000-2-015]鏁伴噺鎺у埗," + ClsPub.isStrNull(ds.Tables[0].Rows[0]["HBackRemark"]);
+ objJsonResult.Message = ClsPub.isStrNull(ds.Tables[0].Rows[0]["HBackRemark"]);
objJsonResult.data = null;
return objJsonResult;
}
@@ -623,6 +630,15 @@
else
{
objJsonResult.Verify = "N";
+ }
+ }
+ //鍒ゆ柇鏄惁鏄柊澧�
+ if ("Add".Equals(eventType))
+ {
+ //鍒ゆ柇瀹㈡埛涓烘捣璇� 鍚屾閲戣澏宸ュ簭姹囨姤鍗�
+ if (oSystemParameter.omodel.WMS_CampanyName == "娴疯瘹")
+ {
+ object objResult = set_SaveStationOutBill_CLD_Json(HInterID, HBillNo, user);
}
}
sw.Stop();//缁撴潫璁℃椂
@@ -1750,6 +1766,113 @@
}
#endregion
+ #region 杩斿洖宸ュ簭鍑虹珯姹囨姤鍗曞垪琛�
+ [Route("Cj_StationOutBill/get_Display_Eng")]
+ [HttpGet]
+ public object get_Display_Eng(string sWhere, string user, string HBillSubType)
+ {
+ try
+ {
+ List<object> columnNameList = new List<object>();
+ if (HBillSubType == "SUB")
+ {
+ //鍒ゆ柇鏄惁鏈夋煡璇㈡潈闄�
+ if (!DBUtility.ClsPub.Security_Log("Cj_StationOutBill_Sub_Query", 1, false, user))
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "[0000-1-068]瀹屽伐鍗曟棤鏌ヨ鏉冮檺!";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ }
+ else
+ {
+ //鍒ゆ柇鏄惁鏈夋煡璇㈡潈闄�
+ if (!DBUtility.ClsPub.Security_Log("Cj_StationOutBill_Query", 1, false, user))
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "[0000-1-068]鍑虹珯鍗曟棤鏌ヨ鏉冮檺!";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ }
+
+
+ //鑾峰彇绯荤粺鍙傛暟
+ string Ret = "";
+ if (oSystemParameter.ShowBill(ref Ret))
+ {
+ //鍒ゆ柇瀹㈡埛涓洪緳灞辨苯閰�
+ if (oSystemParameter.omodel.WMS_CampanyName == "榫欏北姹介厤")
+ {
+ //鑾峰彇闇�瑕佹嫾鎺ョ殑瀛楃涓�
+ string sql_splice = DBUtility.ClsPub.SpliceSQL(user, "宸ュ簭姹囨姤鍗曞垪琛�");
+
+ if (sql_splice == "娌℃湁鏌ヨ鍒扮浉鍏崇敤鎴蜂俊鎭�")
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "[0000-1-069]娌℃湁鏌ヨ鍒扮浉鍏崇敤鎴蜂俊鎭�!";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ else
+ {
+ sWhere += sql_splice;
+ }
+ }
+ }
+
+ if (sWhere == null || sWhere.Equals(""))
+ {
+ ds = oCN.RunProcReturn("select * from h_v_MES_StationOutBillList_Eng where 1 = 1" + sWhere + "order by hmainid desc", "h_v_MES_StationOutBillList");
+ }
+ else
+ {
+ string sql1 = "select * from h_v_MES_StationOutBillList_Eng where 1 = 1 ";
+ string sql = sql1 + sWhere + " order by hmainid desc";
+ ds = oCN.RunProcReturn(sql, "h_v_MES_StationOutBillList_Eng");
+ }
+
+ //娣诲姞鍒楀悕
+ 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鍒楀璞$殑鍒楀悕
+ }
+
+ //if (ds.Tables[0].Rows.Count != 0 || ds != null)
+ //{
+ objJsonResult.code = "1";
+ objJsonResult.count = 1;
+ objJsonResult.Message = "[0000-1-037]Sucess锛�";
+ objJsonResult.list = columnNameList;
+ objJsonResult.data = ds.Tables[0];
+ return objJsonResult;
+ //}
+ //else
+ //{
+ //objJsonResult.code = "0";
+ //objJsonResult.count = 0;
+ //objJsonResult.Message = "鏃犳暟鎹�";
+ //objJsonResult.data = null;
+ //return objJsonResult;
+ //}
+ }
+ catch (Exception e)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "[0000-1-038]Exception锛�" + e.ToString();
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ }
+ #endregion
+
#region 杩斿洖宸ュ簭鍑虹珯姹囨姤鍗曞垪琛�-鍒嗛〉
[Route("Cj_StationOutBill/get_Display_byPage")]
[HttpGet]
@@ -2643,6 +2766,7 @@
[HttpGet]
public object set_ShowBillJudge(string HBillNo)
{
+ string sReturn = "";
try
{
ds = oCN.RunProcReturn("exec h_p_MES_StationOutBill_DelCtrl '" + HBillNo + "'", "h_p_MES_StationOutBill_DelCtrl");
@@ -2658,7 +2782,7 @@
{
objJsonResult.code = "0";
objJsonResult.count = 0;
- objJsonResult.Message = "[0000-1-038]" + Pub_Class.ClsPub.isStrNull(ds.Tables[0].Rows[0][1]);
+ objJsonResult.Message = Pub_Class.ClsPub.isStrNull(ds.Tables[0].Rows[0][1]);
objJsonResult.data = null;
return objJsonResult;
}
@@ -2673,11 +2797,34 @@
}
catch (Exception e)
{
- objJsonResult.code = "0";
- objJsonResult.count = 0;
- objJsonResult.Message = "[0000-1-038]Exception锛�" + e.ToString();
- objJsonResult.data = null;
- return objJsonResult;
+ if (oSystemParameter.ShowBill(ref sReturn) == true)
+ {
+ if (oSystemParameter.omodel.WMS_CampanyName == "鏉窞鏂帿灏�") //绯荤粺鍙傛暟 鍒ゆ柇瀹㈡埛
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = e.ToString();
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ else
+ {
+
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "[0000-1-038]Exception锛�" + e.ToString();
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ }
+ else
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "[0000-1-038]Exception锛�" + e.ToString();
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
}
}
#endregion
@@ -2754,7 +2901,7 @@
int j = 0;
for (int i = 0; i < HInterIDs.Length; i++)
{
- //瀹℃牳鍓嶆帶鍒�
+ //瀹℃牳鍓嶆帶鍒�================================================================================
string sql = "exec h_p_Sc_StationOutBill_BeforeCheckCtrl " + HInterIDs[i] + ",'" + HBillNo[i] + "','" + CurUserName + "'";
ds = oCN.RunProcReturn(sql, "h_p_Sc_StationOutBill_BeforeCheckCtrl");
if (ds == null || ds.Tables.Count == 0 || ds.Tables[0].Rows.Count == 0)
@@ -2774,7 +2921,7 @@
objJsonResult.data = null;
return objJsonResult;
}
-
+ //================================================================================
//瀹℃牳
if (Cj_StationOutBillCheckBill(long.Parse(HInterIDs[i]), HBillNo[i], CurUserName, oBill.omodel.HLastSubProc, ref DBUtility.ClsPub.sExeReturnInfo))
@@ -2785,7 +2932,7 @@
{
objJsonResult.code = "0";
objJsonResult.count = 0;
- objJsonResult.Message = "[0000-1-025]鎴愬姛:" + j + "琛�,绗�" + (i + 1) + "琛�:瀹℃牳澶辫触!鍘熷洜:" + DBUtility.ClsPub.sExeReturnInfo;
+ objJsonResult.Message = DBUtility.ClsPub.sExeReturnInfo;
objJsonResult.data = null;
return objJsonResult;
}
@@ -2850,7 +2997,7 @@
LogService.Write("鍑虹珯鍗曟嵁瀹℃牳鏇存敼娴佽浆鍗℃暟閲�,娴佽浆鍗�:" + HProcExchBillNo + ",鍑虹珯鍗曞彿锛�" + HBillNo + ",鍘熸祦杞崱鏁伴噺:" + HProcExchQty + ",鏂版祦杞崱鏁伴噺:" + HQty);
}
- //瀹℃牳鍚庢帶鍒�
+ //瀹℃牳鍚庢帶鍒�================================================================================
string sql = "exec h_p_Sc_StationOutBill_AfterCheckCtrl " + lngBillKey + ",'" + HBillNo + "','" + CurUserName + "'";
ds = oCN.RunProcReturn(sql, "h_p_Sc_StationOutBill_AfterCheckCtrl");
if (ds == null || ds.Tables.Count == 0 || ds.Tables[0].Rows.Count == 0)
@@ -2865,7 +3012,7 @@
oCN.RollBack();
return false;
}
-
+ //================================================================================
sReturn = sReturn + " 瀹℃牳鍔熻兘锛�";
oCN.Commit();
@@ -2972,7 +3119,7 @@
int j = 0;
for (int i = 0; i < HInterIDs.Length; i++)
{
- //鍙嶅鏍稿墠鎺у埗
+ //鍙嶅鏍稿墠鎺у埗=============================================================
string sql = "exec h_p_Sc_StationOutBill_BeforeUnCheckCtrl " + HInterIDs[i] + ",'" + HBillNo[i] + "','" + CurUserName + "'";
ds = oCN.RunProcReturn(sql, "h_p_Sc_StationOutBill_BeforeUnCheckCtrl");
if (ds == null || ds.Tables.Count == 0 || ds.Tables[0].Rows.Count == 0)
@@ -2992,7 +3139,7 @@
objJsonResult.data = null;
return objJsonResult;
}
-
+ //================================================================================
//鍙嶅鏍�
if (Cj_StationOutBillAbandonCheckBill(long.Parse(HInterIDs[i]),HBillNo[i], CurUserName, oBill.omodel.HLastSubProc, ref DBUtility.ClsPub.sExeReturnInfo))
{
@@ -3086,7 +3233,7 @@
return false; ;
}
}
-
+ #endregion
#region 宸ュ簭鍑虹珯鍏抽棴/鍙嶅叧闂姛鑳�
[Route("Cj_StationOutBill/CloseCj_StationOutBill")]
@@ -3151,8 +3298,32 @@
return objJsonResult;
}
}
+ var HBillNo = ds.Tables[0].Rows[0]["HBillNo"].ToString();
+
+ //鍏抽棴鍓嶆帶鍒�=========================================
+ string sql1 = "exec h_p_Sc_StationOutBill_BeforeCloseCtrl " + HInterID + ",'" + HBillNo + "','" + user + "'";
+ ds = oCN.RunProcReturn(sql1, "h_p_Sc_StationOutBill_BeforeCloseCtrl");
+ 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.CloseBill(Int64.Parse(HInterID), ref ClsPub.sExeReturnInfo))
+ if (!BillOld.CloseBill(Int64.Parse(HInterID), HBillNo, "h_p_Sc_StationOutBill_AfterCloseCtrl", user, ref ClsPub.sExeReturnInfo))
{
objJsonResult.code = "0";
objJsonResult.count = 1;
@@ -3178,8 +3349,32 @@
return objJsonResult;
}
}
+ var HBillNo = ds.Tables[0].Rows[0]["HBillNo"].ToString();
+ //鍙嶅叧闂墠鎺у埗=========================================
+ string sql1 = "exec h_p_Sc_StationOutBill_BeforeUnCloseCtrl " + HInterID + ",'" + HBillNo + "','" + user + "'";
+ ds = oCN.RunProcReturn(sql1, "h_p_Sc_StationOutBill_BeforeUnCloseCtrl");
+ 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.CancelClose(Int64.Parse(HInterID), ref ClsPub.sExeReturnInfo))
+ if (!BillOld.CancelClose(Int64.Parse(HInterID), HBillNo, "h_p_Sc_StationOutBill_AfterUnCloseCtrl", user, ref ClsPub.sExeReturnInfo))
{
objJsonResult.code = "0";
objJsonResult.count = 1;
@@ -3209,9 +3404,88 @@
}
#endregion
+ #region 宸ュ簭姹囨姤鍗曟祦姘村彿鍥炶溅鑾峰彇宸ュ簭淇℃伅(甯﹀瓙搴忓垪)
+ [Route("Cj_StationOutBill/txtHProcNo_KeyDown")]
+ [HttpGet]
+ public object txtHProcNo_KeyDown(string sBillNo, string sProcNo,string HSEQNumber)
+ {
+ try
+ {
+ if (sBillNo.Equals("") || sProcNo.Equals(""))
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "[0000-2-019]鏉″舰鐮佷笉鑳戒负绌猴紒";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ //寰楀埌淇℃伅锛堝澶栨爣璁颁负0鏃讹紝娴佽浆鏍囪涓�1鏃讹級
+ ds = oCN.RunProcReturn("select top 1 * from h_v_Sc_ProcessExchangeBillList_Sec where 鍗曟嵁鍙�= '" + sBillNo + "' and 涓嬮亾娴佽浆宸ュ簭<>'杞�' and 濮斿鏍囪=0 and 娴佽浆鏍囪=1 and 宸ュ簭鍙�='" + sProcNo + "' and 搴忓垪鍙�='"+ HSEQNumber+"'", "h_v_Sc_ProcessExchangeBillList_Sec");
+ //Ds = oCn.RunProcReturn("select top 1 * from h_v_Sc_ProcessExchangeBillList where 鍗曟嵁鍙�= '" + sBillNo + "' and 宸ュ簭鍙�='" + sProcNo + "' and 濮斿鏍囪=0 and 娴佽浆鏍囪=1 ", "h_v_Sc_ProcessExchangeBillList");
+ //鍐欏叆淇℃伅
+ if (ds == null || ds.Tables[0].Rows.Count == 0)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "[3790-2-013]宸ュ簭鍙烽敊璇垨鑰呭綋鍓嶅伐搴忓彿涓嶅厑璁歌繘绔欙紝璇烽噸鏂拌緭鍏ワ紒";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ objJsonResult.code = "1";
+ objJsonResult.count = 1;
+ objJsonResult.Message = "[0000-1-037]Sucess锛�";
+ objJsonResult.data = ds.Tables[0];
+ return objJsonResult;
+ }
+ catch (Exception e)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "[0000-1-038]Exception锛�" + e.ToString();
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ }
+ #endregion
- //鏄惁琚叧鑱�
+ #region 宸ュ簭姹囨姤鍗曡幏鍙栧搴旀墍浠ュ簭鍒�
+ [Route("Cj_StationOutBill/getAllHSEQ")]
+ [HttpGet]
+ public object getAllHSEQ(string HInterID)
+ {
+ try
+ {
+ //寰楀埌淇℃伅锛堝澶栨爣璁颁负0鏃讹紝娴佽浆鏍囪涓�1鏃�
+ ds = oCN.RunProcReturn("select * from Sc_ProcessExchangeBillSEQ where HInterID= " + HInterID, "Sc_ProcessExchangeBillSEQ");
+
+ //鍐欏叆淇℃伅
+ if (ds == null || ds.Tables[0].Rows.Count == 0)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "瀛愬簭鍒楃己澶�";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ objJsonResult.code = "1";
+ objJsonResult.count = 1;
+ objJsonResult.Message = "[0000-1-037]Sucess锛�";
+ objJsonResult.data = ds.Tables[0];
+ return objJsonResult;
+ }
+ catch (Exception e)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "[0000-1-038]Exception锛�" + e.ToString();
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ }
+ #endregion
+
+ #region //鏄惁琚叧鑱�
public bool Cj_StationInBillisUse(Int64 lngBillKey, ref string sReturn)
{
try
@@ -4187,5 +4461,68 @@
}
}
#endregion
+
+
+ #region 宸ュ簭姹囨姤鍗曞悓姝ヨ嚦閲戣澏浜�
+
+ /// <summary>
+ /// 宸ュ簭姹囨姤鍗曞悓姝ヨ嚦閲戣澏浜�
+ /// </summary>
+ /// <returns></returns>
+ [Route("Cj_StationOutBill/set_SaveStationOutBill_CLD_Json")]
+ [HttpGet]
+ public object set_SaveStationOutBill_CLD_Json(Int64 HInterID, string HBillNo, string HMaker)
+ {
+ try
+ {
+ //鍚屾鍓嶆帶鍒�=========================================
+ ds = oCN.RunProcReturn("Exec h_p_Sc_StationOutBill_BeforeSyncCtrl " + HInterID.ToString() + ", '" + HBillNo + "','" + HMaker + "'", " h_p_Sc_StationOutBill_BeforeSyncCtrl ");
+ if (ds == null)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "[0000-2-012]淇濆瓨鍓嶅垽鏂け璐ワ紒";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ if (DBUtility.ClsPub.isStrNull(ds.Tables[0].Rows[0]["HBack"]) != "0")
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "[0000-1-051]鍚屾澶辫触锛�" + DBUtility.ClsPub.isStrNull(ds.Tables[0].Rows[0]["HRemark"]);
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ //=========================================================
+ if (oWebs.set_SaveStationOutBill_CLD(HInterID, HBillNo, HMaker, ref DBUtility.ClsPub.sErrInfo))
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 1;
+ objJsonResult.Message = "鎴愬姛";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ else
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = DBUtility.ClsPub.sErrInfo;
+ 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
--
Gitblit v1.9.1