From 1a3d8206fbd346b8e5d3248486b358c832bce132 Mon Sep 17 00:00:00 2001
From: duhe <226547893@qq.com>
Date: 星期三, 24 九月 2025 13:02:17 +0800
Subject: [PATCH] 斯莫尔钉钉同步:修改
---
WebAPI/Controllers/CJGL/Cj_SingleStationController.cs | 33 +++++++++++++++++++++++----------
1 files changed, 23 insertions(+), 10 deletions(-)
diff --git a/WebAPI/Controllers/CJGL/Cj_SingleStationController.cs b/WebAPI/Controllers/CJGL/Cj_SingleStationController.cs
index f92698d..6d98f0a 100644
--- a/WebAPI/Controllers/CJGL/Cj_SingleStationController.cs
+++ b/WebAPI/Controllers/CJGL/Cj_SingleStationController.cs
@@ -171,6 +171,7 @@
long HMainSourceEntryID = mainList[0].HICMOEntryID;
string HMainSourceBillNo = mainList[0].HICMOBillNo;
+ //鍒ゆ柇鐢熶骇璐ㄩ噺姹囨姤鍗曟槸鍚﹀瓨鍦�
ds = oCN.RunProcReturn("select * from Sc_QualityReportBillMain WITH(NOLOCK) where HInterID=" + HInterID + " and HBillNo='" + HBillNo + "'", "Sc_QualityReportBillMain");
if (ds.Tables[0].Rows.Count != 0) {
objJsonResult.code = "0";
@@ -370,15 +371,21 @@
{
if (oSystemParameter.omodel.WMS_CampanyName == "鏉窞鏂帿灏�")
{
+
//鍒ゆ柇褰撳墠娴佽浆鍗℃槸鍚︽槸寮�宸�
ds = oCN.RunProcReturn("select * from Sc_ICMOBillStatus_Tmp where HSourceBillNo='" + HBarCode + "' and HICMOStatus<>'0'", "Sc_ICMOBillStatus_Tmp");
if (ds.Tables[0].Rows.Count == 0)
{
- objJsonResult.code = "0";
- objJsonResult.count = 0;
- objJsonResult.Message = "[3791-2-018]鍗″彿:" + HBarCode + ",娴佽浆鍗℃湭寮�宸�!";
- objJsonResult.data = null;
- return objJsonResult;
+ //鍒ゆ柇褰撳墠娴佽浆鍗℃槸鍚﹀ⅷ瑗垮摜鐨�
+ ds = oCN.RunProcReturn("select HPRDORGID from Sc_ProcessExchangeBillMain with(nolock) where HBillNo = '" + HBarCode + "' ", "Sc_ProcessExchangeBillMain");
+ if (ds.Tables[0].Rows[0]["HPRDORGID"].ToString() != "7667152")
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "[3791-2-018]鍗″彿:" + HBarCode + ",娴佽浆鍗℃湭寮�宸�!";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
}
}
}
@@ -460,7 +467,8 @@
List<Model.Sc_AssemblyBill_BindSourceTemp> tempList = new List<Model.Sc_AssemblyBill_BindSourceTemp>();
tempList = JsonConvert.DeserializeObject<List<Model.Sc_AssemblyBill_BindSourceTemp>>(msg1);
- if (tempList.Count == 0) {
+ if (msg1 != "[]" && tempList.Count == 0)
+ {
objJsonResult.code = "0";
objJsonResult.count = 0;
objJsonResult.Message = "[3791-2-026]鏃犻厤浠舵暟鎹�!";
@@ -544,7 +552,7 @@
List<Model.ClsSc_AssemblyBillSub> sub = new List<Model.ClsSc_AssemblyBillSub>();
sub = JsonConvert.DeserializeObject<List<Model.ClsSc_AssemblyBillSub>>(sSubStr);
-
+ //鏉$爜涓婇亾宸ュ簭鏄惁杩囩珯
ds = oCN.RunProcReturn("exec h_p_Sc_SNBarcodeProcCtrl_S '" + omodel.HBarCode_P + "'," + omodel.HProcID, "h_v_Gy_QualifiedRecordsList");
if (ClsPub.isInt(ds.Tables[0].Rows.Count) == 0)
{
@@ -563,6 +571,7 @@
return objJsonResult;
}
+ //鍒ゆ柇鏉$爜鏄惁宸茬粡鍑虹珯
ds = oCN.RunProcReturn("select * from h_v_Gy_QualifiedRecordsList WITH(NOLOCK) where 浜у搧鏉$爜='" + omodel.HBarCode_P + "' and HProcExchInterID="+ omodel .HProcExchInterID+ " and HProcExchEntryID="+ omodel.HProcExchEntryID + " and HProcID="+ omodel.HProcID, "h_v_Gy_QualifiedRecordsList");
if (ds.Tables[0].Rows.Count > 0)
@@ -705,11 +714,13 @@
int HTemporaryAreaID = 0;//鏆傛斁鍖�
int HShiftsID = 0;
+ //鑾峰彇褰撳墠鐝
DataSet set = oCN.RunProcReturn("exec h_p_Gy_GetWorkShiftInfo " + HDeptID + "," + HCenterID, "h_p_Gy_GetWorkShiftInfo");
if (set.Tables[0].Rows.Count > 0)
{
HShiftsID = int.Parse(set.Tables[0].Rows[0]["HInterID"].ToString());
}
+ //鍒ゆ柇褰撳ぉ褰撳墠鐨勬祦杞崱鏄惁鏈夊嚭绔欏崟
ds = oCN.RunProcReturn("select * from Sc_StationOutBillMain a WITH(NOLOCK) left join Sc_StationOutBillSub_SN sn WITH(NOLOCK) on a.HInterID=sn.HInterID where a.HInterID=" + HInterID + " and HBillNo='" + HBillNo + "' and CONVERT(varchar(10),HDate,20) ='" + DateTime.Now.ToString("yyyy-MM-dd") + "' ", "Sc_StationOutBillMain");
if (ds.Tables[0].Rows.Count == 0)
@@ -1164,6 +1175,7 @@
ds = oCN.RunProcReturn("select * from gy_czygl WITH(NOLOCK) where czymc='" + user + "'", "gy_czygl");
string HProcID = ds.Tables[0].Rows[0]["HProcID"].ToString();
+ //鏌ヨ娴佽浆鍗℃墍鏈夊伐搴忎俊鎭�
ds = oCN.RunProcReturn(@"select * from h_v_Gy_BarCodeBillHICOMProcessExchange WITH(NOLOCK) where 鏉$爜='" + HBarCode + "' ", "h_v_Gy_BarCodeBillHICOMProcessExchange");
if (ds.Tables[0].Rows.Count == 0)
@@ -1638,7 +1650,7 @@
Model.Sc_AssemblyBill_BindSourceTemp temp = new Model.Sc_AssemblyBill_BindSourceTemp();
temp = JsonConvert.DeserializeObject<Model.Sc_AssemblyBill_BindSourceTemp>(sSubStr);
-
+ //宸ュ簭杩斾慨璁板綍鍗� 閰嶄欢琛�
ds = oCN.RunProcReturn("select * from Sc_SourceLineRepairBillSub_Mater where HInterID=" + model.HInterID+ " order by HEntryID desc", "Sc_SourceLineRepairBillSub_Mater");
oCN.RunProc($@"insert into Sc_SourceLineRepairBillSub_Mater
@@ -1652,7 +1664,7 @@
oCN.RunProc("update Sc_AssemblyBillSub set HBarCode='" + temp.HBarCode + "' where HInterID=" + temp.HInterID + " and HEntryID=" + temp.HEntryID);
//oCN.RunProc("exec h_p_AssemblyBill_Temp '" + temp.HProcExchBillNo + "'," + model.HProcess + "," + temp.HMaterID + ",'" + temp.HBatchNo + "'");
}
- else if (HResult == "NG"|| HResult == "OK") {
+ else if (HResult == "NG"|| HResult == "OK") {
Model.ClsSc_SourceLineRepairBillMain model = new Model.ClsSc_SourceLineRepairBillMain();
model = JsonConvert.DeserializeObject<Model.ClsSc_SourceLineRepairBillMain>(sMainStr);
@@ -1701,7 +1713,7 @@
if (dataSet.Tables[0].Rows.Count > 0)
{
string HOutInterID = dataSet.Tables[0].Rows[0][0].ToString();
- //鏂帿灏旂殑鎯呭喌 鍒� 宸ュ簾鏂欏簾 杩斿伐
+ //鏂帿灏旂殑鎯呭喌 鍒� 宸ュ簾 鏂欏簾 杩斿伐
//宸ュ簾
if (subLsit[0].HBadTypeID == 3)
{
@@ -2164,6 +2176,7 @@
List<object> columnNameList = new List<object>();
+ //鏌ヨ閰嶄欢娓呭崟淇℃伅
string sql = @"exec h_p_GZ_BarCodeBillList '" + HMaterNumber + "','" + HBatchNo + "','" + sWhere + "'";
ds = oCN.RunProcReturn(sql, "h_p_GZ_BarCodeBillList");
--
Gitblit v1.9.1