From c24f7d7f146b814b27382ad28172b9bf85e241e2 Mon Sep 17 00:00:00 2001
From: wtt <1985833171@qq.com>
Date: 星期一, 23 三月 2026 20:34:01 +0800
Subject: [PATCH] 工序汇报接口修改
---
WebAPI/Controllers/CJGL/Cj_StationOutBillController.cs | 151 ++++++++++++++++++++++++++++++++++++++++++++++++++
1 files changed, 151 insertions(+), 0 deletions(-)
diff --git a/WebAPI/Controllers/CJGL/Cj_StationOutBillController.cs b/WebAPI/Controllers/CJGL/Cj_StationOutBillController.cs
index ea45580..20c015e 100644
--- a/WebAPI/Controllers/CJGL/Cj_StationOutBillController.cs
+++ b/WebAPI/Controllers/CJGL/Cj_StationOutBillController.cs
@@ -4861,6 +4861,157 @@
#endregion
+ //瀹℃牳锛屽甫缂栬緫鍔熻兘
+ [Route("Cj_StationOutBill/setOtherProperty")]
+ [HttpPost]
+ public object setOtherProperty([FromBody] JObject oMain)
+ {
+ try
+ {
+ var _value = oMain["oMain"].ToString();
+ string msg1 = _value.ToString();
+ string[] sArray = msg1.Split(new string[] { ";" }, StringSplitOptions.RemoveEmptyEntries);
+ string msg2 = "[" + sArray[0].ToString() + "]";
+ string user = sArray[1].ToString();
+ ////鍒ゆ柇鏄惁鏈夌紪杈戞潈闄�
+ if (!DBUtility.ClsPub.Security_Log("Cj_StationOutBill_Edit", 1, false, user))
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "鏃犵紪杈戞潈闄�!";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ //瀹℃牳鏉冮檺
+ if (!DBUtility.ClsPub.Security_Log("Cj_StationOutBill_Check", 1, false, user))
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "瀹℃牳澶辫触锛佹棤鏉冮檺锛�";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ List<StationBill> list1 = Newtonsoft.Json.JsonConvert.DeserializeObject<List<StationBill>>(msg2);
+ long HInterID = list1[0].HInterID;
+ double HQty = list1[0].HQty;
+ double HBadCount = list1[0].HBadCount;
+ double HWasterQty = list1[0].HWasterQty;
+ long HSourceID = list1[0].HSourceID;
+ string HSourceName = list1[0].HSourceName;
+ long HCenterID = list1[0].HCenterID;
+ long HGroupID = list1[0].HGroupID;
+ long HEmpID = list1[0].HEmpID;
+ oCN.BeginTran();
+
+ DataSet ds = oCN.RunProcReturn("select * from Sc_StationOutBillMain where HInterID=" + HInterID, "Sc_StationOutBillMain");
+
+ if (ds.Tables.Count > 0 && ds.Tables[0].Rows[0]["HChecker"].ToString() == "")
+ {
+ string HBillNo = ds.Tables[0].Rows[0]["HBillNo"].ToString();
+ //瀹℃牳鍓嶆帶鍒�================================================================================
+ string sql = "exec h_p_Sc_StationOutBill_BeforeCheckCtrl " + HInterID + ",'" + HBillNo + "','" + user + "'";
+ ds = oCN.RunProcReturn(sql, "h_p_Sc_StationOutBill_BeforeCheckCtrl");
+ 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 (HQty > 0)
+ {
+
+ oCN.RunProc($"update Sc_StationOutBillMain set HBillStatus = 2, HQty={HQty},HBadCount='{HBadCount}',HWasterQty='{HWasterQty}',HSourceID='{HSourceID}',HCenterID='{HCenterID}',HGroupID={HGroupID},HEmpID={HEmpID},HChecker='{user}',HCheckDate=getdate() where HInterID={HInterID} ");
+
+ }
+ string sReturn = "";
+ //鑾峰彇绯荤粺鍙傛暟
+ oSystemParameter.ShowBill(ref sReturn);
+ //鍒ゆ柇瀹㈡埛涓哄ぉ鎿� 鍚屾閲戣澏宸ュ簭姹囨姤鍗�
+ if (oSystemParameter.omodel.WMS_CampanyName == "澶╂搸")
+ {
+ //鍚屾鍓嶆帶鍒�=========================================
+ ds = oCN.RunProcReturn("Exec h_p_Sc_StationOutBill_BeforeSyncCtrl " + HInterID.ToString() + ", '" + HBillNo + "','" + user + "'", " 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, user, ref DBUtility.ClsPub.sErrInfo))
+ {
+ oCN.Commit();
+ objJsonResult.code = "1";
+ objJsonResult.count = 1;
+ objJsonResult.Message = "鎴愬姛";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ else
+ {
+ oCN.RollBack();
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = DBUtility.ClsPub.sErrInfo;
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+
+ }
+ oCN.Commit();
+ objJsonResult.code = "1";
+ objJsonResult.count = 1;
+ objJsonResult.Message = "瀹℃牳淇敼鎴愬姛锛�";
+ objJsonResult.data = null;
+ return objJsonResult;
+
+
+
+ }
+ else
+ {
+ oCN.Commit();
+ 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;
+ }
+ }
}
}
\ No newline at end of file
--
Gitblit v1.9.1