From 8cdf2c4d1edba2cfa7d63c7b071f170354bdf691 Mon Sep 17 00:00:00 2001
From: wangyi <2946747746@qq.com>
Date: 星期一, 30 三月 2026 18:33:42 +0800
Subject: [PATCH] 1
---
WebAPI/Controllers/CJGL/Cj_StationEntrustInBillController.cs | 77 +++++++++++++++++++++++++-------------
1 files changed, 51 insertions(+), 26 deletions(-)
diff --git a/WebAPI/Controllers/CJGL/Cj_StationEntrustInBillController.cs b/WebAPI/Controllers/CJGL/Cj_StationEntrustInBillController.cs
index 77f8f2d..524c315 100644
--- a/WebAPI/Controllers/CJGL/Cj_StationEntrustInBillController.cs
+++ b/WebAPI/Controllers/CJGL/Cj_StationEntrustInBillController.cs
@@ -219,6 +219,15 @@
sBillBarCode = NewBarCode[0];
}
string sBillNo = sBillBarCode;
+ //鎴彇鏉$爜绫诲瀷 鍓嶄袱浣�
+ string BillNoType1 = sBillNo.Substring(0, Math.Min(2, sBillNo.Length));
+ switch (BillNoType1)
+ {
+ case "OP"://娴佽浆鍗�
+ //鍚屾宸ュ簭娴佽浆鍗�
+ oCN.RunProc("exec h_p_IFCLD_ERPSourceBillToLocal_ProcExchAndRouting '" + sBillNo + "'");
+ break;
+ }
//寰楀埌淇℃伅
ds = oCN.RunProcReturn("select top 1 * from h_v_Sc_ProcessExchangeBillList where 鍗曟嵁鍙�= '" + sBillNo + "'", "h_v_Sc_ProcessExchangeBillList");
//鍐欏叆淇℃伅
@@ -2346,7 +2355,7 @@
string sReturn = "";
if (oSystemParameter.ShowBill(ref sReturn) == true)
{
- if (oSystemParameter.omodel.MES_StationEntrustInBill_SaveAutoAddnew == "Y") //绯荤粺鍙傛暟 鑷姩瀹℃牳
+ if (oSystemParameter.omodel.MES_StationEntrustInBill_AutoCheck == "Y") //绯荤粺鍙傛暟 鑷姩瀹℃牳
{
objJsonResult.Verify = "Y";
}
@@ -2689,9 +2698,11 @@
oCN.RunProc(" Update Sc_StationInBillMain set HChecker='" + HChecker + "',HCheckDate='" + HCheckDate + "' Where HInterID=" + lngBillKey.ToString());
oCN.RunProc("exec h_p_Mes_ProcessExchangeRelationQty_Check_In " + lngBillKey.ToString() + ",1");
-
-
-
+ //鍚屾閲戣澏浜戝弬鏁�
+ int HProcExchInterID = int.Parse(ds.Tables[0].Rows[0]["HProcExchInterID"].ToString());
+ int HProcExchEntryID = int.Parse(ds.Tables[0].Rows[0]["HProcExchEntryID"].ToString());
+ int HProcNo = int.Parse(ds.Tables[0].Rows[0]["HProcNo"].ToString());
+ double HQty = double.Parse(ds.Tables[0].Rows[0]["HQty"].ToString());
//瀹℃牳鍚庢帶鍒�================================================================================
string sql = "exec h_p_Sc_StationInBill_WW_AfterCheckCtrl " + lngBillKey + ",'" + HBillNo + "','" + CurUserName + "'";
ds = oCN.RunProcReturn(sql, "h_p_Sc_StationInBill_WW_AfterCheckCtrl");
@@ -2706,6 +2717,20 @@
sReturn = ds.Tables[0].Rows[0]["HRemark"].ToString();
oCN.RollBack();
return false;
+ }
+ //鑾峰彇绯荤粺鍙傛暟
+ oSystemParameter.ShowBill(ref sReturn);
+ //鍒ゆ柇瀹㈡埛涓哄ぉ鎿� 鍚屾閲戣澏宸ュ簭姹囨姤鍗�
+ if (oSystemParameter.omodel.WMS_CampanyName == "澶╂搸")
+ {
+
+ if (!set_SaveStationEntrustInBill_CLD(HBillNo, HProcExchInterID, HProcExchEntryID, HProcNo, HQty, CurUserName, ref DBUtility.ClsPub.sErrInfo))
+ {
+ oCN.RollBack();
+ sReturn = sReturn + DBUtility.ClsPub.sErrInfo;
+ return false;
+ }
+
}
//================================================================================
@@ -3373,7 +3398,7 @@
sRemark = sRemark + " 锛涗繚瀛樺悗鎺у埗" + DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss:ffff");
//杩斿洖API閫掑叆鎵�闇�鏁版嵁
- DataSet Ds = oCn.RunProcReturn("exec h_p_MES_StationEntrustInBill_ProdMateRequest_CLD " + oMain.HProcExchInterID.ToString() + "," + oMain.HProcExchEntryID.ToString() + "," + oMain.HProcNo.ToString() + "," + oMain.HQty.ToString(), "h_p_MES_StationEntrustInBill_ProdMateRequest_CLD");
+ DataSet Ds = oCn.RunProcReturn("exec h_p_MES_StationEntrustInBill_ProdMateRequest_CLD '" + oMain.HBillNo + "'," + oMain.HProcExchInterID.ToString() + "," + oMain.HProcExchEntryID.ToString() + "," + oMain.HProcNo.ToString() + "," + oMain.HQty.ToString(), "h_p_MES_StationEntrustInBill_ProdMateRequest_CLD");
if (Ds == null || Ds.Tables[0].Rows.Count == 0)
{
sErrMsg = "鏈幏鍙栧埌API鎵�闇�閫掑叆鏁版嵁锛�";
@@ -3460,10 +3485,10 @@
"\"FOutProcessId\":{ \"FNumber\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["FOutProcessId"]) + "\" }," +
//"FOutEmpId": {"FSTAFFNUMBER": ""},
"\"FOutOperDescr\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["FOutOperDescr"]) + "\"," +
- //"FOutPurOrgId": {"FNumber": ""},
+ "\"FOutPurOrgId\":{ \"FNumber\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["FOutPurOrgId"]) + "\" }," +
"\"FInProOrgId\":{ \"FNumber\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["FInProOrgId"]) + "\" }," +
"\"FInOPBillNo\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["FInOPBillNo"]) + "\"," +
- //"FOutSupplier": {"FNUMBER": ""},
+ "\"FOutSupplier\":{ \"FNAME\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["FOutSupplier"]) + "\" }," +
"\"FOutOperId\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["FOutOperId"]) + "\"," +
"\"FInProcessId\":{ \"FNumber\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["FInProcessId"]) + "\" }," +
"\"FInDeptId\":{ \"FNumber\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["FInDeptId"]) + "\" }," +
@@ -3501,12 +3526,12 @@
"\"FIsInspect\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["FIsInspect"]) + "\"," +
"\"FQCSchemeId\":{ \"FNumber\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["FQCSchemeId"]) + "\" }," +
"\"FSendProFailPrice\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["FSendProFailPrice"]) + "\"," +
- //"FReceiveCurrency": {"FNUMBER": ""},
- //"FReceiveQualifiedPrice": 0,
- //"FReceiveProFailPrice": 0,
- //"FReceiveMatFailPrice": 0,
+ "\"FReceiveCurrency\":{ \"FNumber\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["FReceiveCurrency"]) + "\" }," +
+ "\"FReceiveQualifiedPrice\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["FReceiveQualifiedPrice"]) + "\"," +
+ "\"FReceiveProFailPrice\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["FReceiveProFailPrice"]) + "\"," +
+ "\"FReceiveMatFailPrice\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["FReceiveMatFailPrice"]) + "\"," +
"\"FReceiveValuationUnitId\":{ \"FNumber\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["FReceiveValuationUnitId"]) + "\" }," +
- //"FReceiveTaxRate": 0,
+ "\"FReceiveTaxRate\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["FReceiveTaxRate"]) + "\"," +
"\"FSendMatFailPrice\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["FSendMatFailPrice"]) + "\"," +
//"FOperInspectSelectQty": 0,
"\"FSendValuationUnitId\":{ \"FNumber\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["FSendValuationUnitId"]) + "\" }," +
@@ -3564,9 +3589,9 @@
"\"FDemandBillEntryId\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["FDemandBillEntryId"]) + "\"," +
//"FInspectEntryId": 0,
"\"FConvertType\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["FConvertType"]) + "\"," +
- //"FReceiveQualifiedTaxPrice": 0,
- //"FReceiveProFailTaxPrice": 0,
- //"FReceiveMatFailTaxPrice": 0,
+ "\"FReceiveQualifiedTaxPrice\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["FReceiveQualifiedTaxPrice"]) + "\"," +
+ "\"FReceiveProFailTaxPrice\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["FReceiveProFailTaxPrice"]) + "\"," +
+ "\"FReceiveMatFailTaxPrice\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["FReceiveMatFailTaxPrice"]) + "\"," +
"\"FSendQualifiedTaxPrice\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["FSendQualifiedTaxPrice"]) + "\"," +
"\"FSendProFailTaxPrice\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["FSendProFailTaxPrice"]) + "\"," +
"\"FSendMatFailTaxPrice\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["FSendMatFailTaxPrice"]) + "\"," +
@@ -3746,7 +3771,7 @@
try
{
//杩斿洖API閫掑叆鎵�闇�鏁版嵁
- DataSet Ds = oCn.RunProcReturn("exec h_p_MES_StationEntrustInBill_ProdMateRequest_CLD " + HProcExchInterID.ToString() + "," + HProcExchEntryID.ToString() + "," + HProcNo.ToString() + "," + HQty.ToString(), "h_p_MES_StationEntrustInBill_ProdMateRequest_CLD");
+ DataSet Ds = oCn.RunProcReturn("exec h_p_MES_StationEntrustInBill_ProdMateRequest_CLD '" + HBillNo + "'," + HProcExchInterID.ToString() + "," + HProcExchEntryID.ToString() + "," + HProcNo.ToString() + "," + HQty.ToString(), "h_p_MES_StationEntrustInBill_ProdMateRequest_CLD");
if (Ds == null || Ds.Tables[0].Rows.Count == 0)
{
sErrMsg = "鏈幏鍙栧埌API鎵�闇�閫掑叆鏁版嵁锛�";
@@ -3833,10 +3858,10 @@
"\"FOutProcessId\":{ \"FNumber\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["FOutProcessId"]) + "\" }," +
//"FOutEmpId": {"FSTAFFNUMBER": ""},
"\"FOutOperDescr\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["FOutOperDescr"]) + "\"," +
- //"FOutPurOrgId": {"FNumber": ""},
+ "\"FOutPurOrgId\":{ \"FNumber\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["FOutPurOrgId"]) + "\" }," +
"\"FInProOrgId\":{ \"FNumber\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["FInProOrgId"]) + "\" }," +
"\"FInOPBillNo\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["FInOPBillNo"]) + "\"," +
- //"FOutSupplier": {"FNUMBER": ""},
+ "\"FOutSupplier\":{ \"FNAME\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["FOutSupplier"]) + "\" }," +
"\"FOutOperId\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["FOutOperId"]) + "\"," +
"\"FInProcessId\":{ \"FNumber\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["FInProcessId"]) + "\" }," +
"\"FInDeptId\":{ \"FNumber\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["FInDeptId"]) + "\" }," +
@@ -3874,12 +3899,12 @@
"\"FIsInspect\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["FIsInspect"]) + "\"," +
"\"FQCSchemeId\":{ \"FNumber\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["FQCSchemeId"]) + "\" }," +
"\"FSendProFailPrice\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["FSendProFailPrice"]) + "\"," +
- //"FReceiveCurrency": {"FNUMBER": ""},
- //"FReceiveQualifiedPrice": 0,
- //"FReceiveProFailPrice": 0,
- //"FReceiveMatFailPrice": 0,
+ "\"FReceiveCurrency\":{ \"FNumber\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["FReceiveCurrency"]) + "\" }," +
+ "\"FReceiveQualifiedPrice\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["FReceiveQualifiedPrice"]) + "\"," +
+ "\"FReceiveProFailPrice\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["FReceiveProFailPrice"]) + "\"," +
+ "\"FReceiveMatFailPrice\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["FReceiveMatFailPrice"]) + "\"," +
"\"FReceiveValuationUnitId\":{ \"FNumber\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["FReceiveValuationUnitId"]) + "\" }," +
- //"FReceiveTaxRate": 0,
+ "\"FReceiveTaxRate\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["FReceiveTaxRate"]) + "\"," +
"\"FSendMatFailPrice\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["FSendMatFailPrice"]) + "\"," +
//"FOperInspectSelectQty": 0,
"\"FSendValuationUnitId\":{ \"FNumber\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["FSendValuationUnitId"]) + "\" }," +
@@ -3937,9 +3962,9 @@
"\"FDemandBillEntryId\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["FDemandBillEntryId"]) + "\"," +
//"FInspectEntryId": 0,
"\"FConvertType\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["FConvertType"]) + "\"," +
- //"FReceiveQualifiedTaxPrice": 0,
- //"FReceiveProFailTaxPrice": 0,
- //"FReceiveMatFailTaxPrice": 0,
+ "\"FReceiveQualifiedTaxPrice\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["FReceiveQualifiedTaxPrice"]) + "\"," +
+ "\"FReceiveProFailTaxPrice\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["FReceiveProFailTaxPrice"]) + "\"," +
+ "\"FReceiveMatFailTaxPrice\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["FReceiveMatFailTaxPrice"]) + "\"," +
"\"FSendQualifiedTaxPrice\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["FSendQualifiedTaxPrice"]) + "\"," +
"\"FSendProFailTaxPrice\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["FSendProFailTaxPrice"]) + "\"," +
"\"FSendMatFailTaxPrice\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["FSendMatFailTaxPrice"]) + "\"," +
--
Gitblit v1.9.1