From 442c699c0950f15ae32980f7a187b93154b006cb Mon Sep 17 00:00:00 2001
From: llj <132905093+newwwwwwtree@users.noreply.github.com>
Date: 星期一, 12 一月 2026 11:24:17 +0800
Subject: [PATCH] 出运单修改
---
WebAPI/Controllers/物流管理/出运单/WLYayBillController.cs | 107 +++++++++++++++--
DAL/ClsWL_YayBillMain.cs | 6
Model/物流管理/ClsWL_YayBillMainBillSub.cs | 1
WebAPI/Controllers/Sc_MouldRepairInBillListController.cs | 54 +++++++++
WebAPI/Controllers/条码管理/MouldController.cs | 55 +++++++++
WebAPI/Controllers/Cg_ContractTransportBillListController.cs | 96 ++++++++++++++++
6 files changed, 302 insertions(+), 17 deletions(-)
diff --git a/DAL/ClsWL_YayBillMain.cs b/DAL/ClsWL_YayBillMain.cs
index bf3cd02..3562888 100644
--- a/DAL/ClsWL_YayBillMain.cs
+++ b/DAL/ClsWL_YayBillMain.cs
@@ -144,7 +144,7 @@
"(HInterID,HBillNo_bak,HEntryID,HCloseMan,HEntryCloseDate,HCloseType,HRemark" +
",HSourceInterID,HSourceEntryID,HSourceBillNo,HSourceBillType,HRelationQty,HRelationMoney" +
",HMaterID,HUnitID,HMouldID,HMouldLength,HMouldHeight,HMouldWidth" +
- ",HMouldFoldHeight,HVolume,HQty,HSNP,HMouldQty) values("
+ ",HMouldFoldHeight,HVolume,HQty,HSNP,HScatteredVolume,HMouldQty) values("
+ SafeInt(omodel.HInterID.ToString(), 0) + ",'" // HInterID int
+ SafeString(omodel.HBillNo.ToString()) + "'," // HBillNo_bak varchar(50)
+ (oSub.HEntryID) + ",'" // HEntryID int
@@ -168,6 +168,7 @@
+ (oSub.HVolume.ToString() == "" ? 0 : oSub.HVolume) + "," // HVolume dec(18,8)
+ (oSub.HQty.ToString() == "" ? 0 : oSub.HQty) + "," // HQty dec(18,8)
+ (oSub.HSNP.ToString() == "" ? 0 : oSub.HSNP) + "," // HSNP dec(18,8)
+ + (oSub.HScatteredVolume) + "," // HSNP dec(18,8)
+ (oSub.HMouldQty.ToString() == "" ? 0 : oSub.HMouldQty) + ")"; // HMouldQty dec(18,8)
oCn.RunProc(sql);
}
@@ -326,7 +327,7 @@
"(HInterID,HBillNo_bak,HEntryID,HCloseMan,HEntryCloseDate,HCloseType,HRemark" +
",HSourceInterID,HSourceEntryID,HSourceBillNo,HSourceBillType,HRelationQty,HRelationMoney" +
",HMaterID,HUnitID,HMouldID,HMouldLength,HMouldHeight,HMouldWidth" +
- ",HMouldFoldHeight,HVolume,HQty,HSNP,HMouldQty) values("
+ ",HMouldFoldHeight,HVolume,HQty,HSNP,HScatteredVolume,HMouldQty) values("
+ SafeInt(omodel.HInterID.ToString(), 0) + ",'" // HInterID int
+ SafeString(omodel.HBillNo.ToString()) + "'," // HBillNo_bak varchar(50)
+ (oSub.HEntryID) + ",'" // HEntryID int
@@ -350,6 +351,7 @@
+ (oSub.HVolume.ToString() == "" ? 0 : oSub.HVolume) + "," // HVolume dec(18,8)
+ (oSub.HQty.ToString() == "" ? 0 : oSub.HQty) + "," // HQty dec(18,8)
+ (oSub.HSNP.ToString() == "" ? 0 : oSub.HSNP) + "," // HSNP dec(18,8)
+ + (oSub.HScatteredVolume) + "," // HSNP dec(18,8)
+ (oSub.HMouldQty.ToString() == "" ? 0 : oSub.HMouldQty) + ")"; // HMouldQty dec(18,8)
oCn.RunProc(sql);
}
diff --git "a/Model/\347\211\251\346\265\201\347\256\241\347\220\206/ClsWL_YayBillMainBillSub.cs" "b/Model/\347\211\251\346\265\201\347\256\241\347\220\206/ClsWL_YayBillMainBillSub.cs"
index 8841cab..17ac56a 100644
--- "a/Model/\347\211\251\346\265\201\347\256\241\347\220\206/ClsWL_YayBillMainBillSub.cs"
+++ "b/Model/\347\211\251\346\265\201\347\256\241\347\220\206/ClsWL_YayBillMainBillSub.cs"
@@ -26,6 +26,7 @@
public int HSourceEntryID { get; set; } // 源单子ID
public string HSourceBillNo { get; set; } // 源单单号
public string HSourceBillType { get; set; } // 源单类型
+ public string HScatteredVolume { get; set; } // 源单类型
public decimal HRelationQty { get; set; } // 关联数量
public decimal HRelationMoney { get; set; } // 关联金额
diff --git a/WebAPI/Controllers/Cg_ContractTransportBillListController.cs b/WebAPI/Controllers/Cg_ContractTransportBillListController.cs
index 90f972d..f8bdfec 100644
--- a/WebAPI/Controllers/Cg_ContractTransportBillListController.cs
+++ b/WebAPI/Controllers/Cg_ContractTransportBillListController.cs
@@ -382,5 +382,101 @@
}
}
#endregion
+
+
+ #region 瀹℃牳銆佸弽瀹℃牳
+ /// <summary>
+ ///
+ /// </summary>
+ /// <param name="HInterID">鍗曟嵁ID</param>
+ /// <param name="IsAudit">瀹℃牳(0),鍙嶅鏍�(1)</param>
+ /// <param name="CurUserName">瀹℃牳浜�</param>
+ /// <returns></returns>
+ [Route("Cg_ContractTransportBillEdit/AuditCg_ContractTransportBillEdit")]
+ [HttpGet]
+ public object AuditCg_ContractTransportBillEdit(int HInterID, int IsAudit, string CurUserName)
+ {
+ try
+ {
+ //瀹℃牳鏉冮檺
+ if (!DBUtility.ClsPub.Security_Log_second("Gy_Supplier_Check", 1, false, CurUserName))
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "瀹℃牳澶辫触锛佹棤鏉冮檺锛�";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+
+ var ds = oCN.RunProcReturn("select * from Cg_ContractTransportBillMain where HInterID=" + HInterID, "Cg_ContractTransportBillMain");
+ if (ds.Tables[0].Rows.Count > 0)
+ {
+ if (IsAudit == 0) //瀹℃牳鍒ゆ柇
+ {
+ if (ds.Tables[0].Rows[0]["HChecker"].ToString() != "")
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "鍗曟嵁宸插鏍�!涓嶈兘鍐嶆瀹℃牳锛�";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ }
+ if (IsAudit == 1) //鍙嶅鏍稿垽鏂�
+ {
+ if (ds.Tables[0].Rows[0]["HChecker"].ToString() == "")
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "鍗曟嵁鏈鏍�!涓嶉渶瑕佸弽瀹℃牳!";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ }
+ }
+ else
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "鍗曟嵁涓嶅瓨鍦�!";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+
+ oCN.BeginTran();
+
+ if (IsAudit == 0) //瀹℃牳鍒ゆ柇
+ {
+ oCN.RunProc("update Cg_ContractTransportBillMain set HChecker='" + CurUserName + "',HCheckDate=getdate() ,HBillStatus=2 where HInterID=" + HInterID);
+
+ objJsonResult.code = "1";
+ objJsonResult.count = 1;
+ objJsonResult.Message = "瀹℃牳鎴愬姛";
+ objJsonResult.data = null;
+ }
+ if (IsAudit == 1) //鍙嶅鏍稿垽鏂�
+ {
+ oCN.RunProc("update Cg_ContractTransportBillMain set HChecker='',HCheckDate=null,HBillStatus=1 where HInterID=" + HInterID);
+
+ objJsonResult.code = "1";
+ objJsonResult.count = 1;
+ objJsonResult.Message = "鍙嶅鏍告垚鍔�";
+ objJsonResult.data = null;
+ }
+ oCN.Commit();
+
+ return objJsonResult;
+ }
+ catch (Exception e)
+ {
+ oCN.RollBack();
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "瀹℃牳澶辫触鎴栬�呭弽瀹℃牳澶辫触锛�" + e.ToString();
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ }
+ #endregion
}
}
\ No newline at end of file
diff --git a/WebAPI/Controllers/Sc_MouldRepairInBillListController.cs b/WebAPI/Controllers/Sc_MouldRepairInBillListController.cs
index 7ecb3d4..8786be2 100644
--- a/WebAPI/Controllers/Sc_MouldRepairInBillListController.cs
+++ b/WebAPI/Controllers/Sc_MouldRepairInBillListController.cs
@@ -15957,6 +15957,60 @@
#endregion
+ #region 鍣ㄥ叿澶勭悊鍑哄簱鍗� 杩斿洖婧愬崟鏁版嵁
+ /// <summary>
+ /// 杩斿洖婧愬崟鏁版嵁
+ /// </summary>
+ /// <returns></returns>
+ [Route("Sc_MouldScrapOutHouseBill/GetSourceBill_MouldScrapOutHouse_Json")]
+ [HttpGet]
+ public object GetSourceBill_MouldScrapOutHouse_Json(Int64 HInterID, Int64 HEntryID, string HBillType)
+ {
+ try
+ {
+ string sViewName = "";
+ //鍣ㄥ叿棰嗙敤鐢宠鍗�
+ if (HBillType == "3823")
+ {
+ sViewName = "h_v_Sc_MouldScrapRequestBillList";
+ }
+ if (sViewName == "")
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "涓嶆敮鎸佽婧愬崟绫诲瀷锛�";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+
+ ds = oCn.RunProcReturn("select * from h_v_Sc_MouldScrapRequestBillList where hmainid="+ HInterID.ToString()+ "and hsubid="+ HEntryID, "h_v_Sc_MouldScrapRequestBillList");
+ if (ds == null || ds.Tables[0].Rows.Count == 0)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "鏈煡璇㈠埌婧愬崟淇℃伅锛�";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ else
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 1;
+ objJsonResult.Message = "鎴愬姛锛�";
+ objJsonResult.data = ds.Tables[0];
+ 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
diff --git "a/WebAPI/Controllers/\346\235\241\347\240\201\347\256\241\347\220\206/MouldController.cs" "b/WebAPI/Controllers/\346\235\241\347\240\201\347\256\241\347\220\206/MouldController.cs"
index a85b288..2d7072d 100644
--- "a/WebAPI/Controllers/\346\235\241\347\240\201\347\256\241\347\220\206/MouldController.cs"
+++ "b/WebAPI/Controllers/\346\235\241\347\240\201\347\256\241\347\220\206/MouldController.cs"
@@ -2049,6 +2049,61 @@
}
#endregion
+ #region 鍣ㄥ叿棰嗙敤鍗� 鎵弿婧愬崟鏉$爜
+
+ /// <summary>
+ /// 鍣ㄥ叿棰嗙敤鍗� 鎵弿婧愬崟鏉$爜
+ /// </summary>
+ /// <returns></returns>
+ [Route("MouldController/Get_SourceBarCode_ScrapRequest_Json")]
+ [HttpGet]
+ public object Get_SourceBarCode_ScrapRequest_Json(Int64 HInterID, string HBillNo, string HBillType, string HSourceBillNo, string HSourceBillType, string HMaker, Int64 HStockOrgID)
+ {
+ try
+ {
+ //灏嗘簮鍗曚俊鎭瓨鍏ユ潯鐮佸嚭鍏ュ簱涓存椂琛�
+ DataSet ds1 = oCn.RunProcReturn("exec h_p_WMS_AddMouldBarCode_ScrapRequest " + HInterID.ToString() + ",'" + HBillNo + "','" + HBillType + "','" + HSourceBillNo + "','" + HSourceBillType + "'," + 0 + ",'" + HMaker + "'," + 0 + "," + HStockOrgID.ToString(), "h_p_WMS_AddMouldBarCode_ScrapRequest");
+ if (ds1 == null || ds1.Tables[0].Rows.Count == 0)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "鍗曟嵁鍙凤細" + HBillNo + "锛屽崟鎹甀D锛�" + HInterID + "锛涘皢婧愬崟淇℃伅瀛樺叆鏉$爜鍑哄叆搴撲复鏃惰〃澶辫触锛�";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ else
+ {
+ if (DBUtility.ClsPub.isLong(ds1.Tables[0].Rows[0][0]) == 0)
+ {
+
+ objJsonResult.code = "0";
+ objJsonResult.count = 1;
+ objJsonResult.Message = "鎴愬姛";
+ objJsonResult.data = ds1.Tables[0];
+ return objJsonResult;
+ }
+ else
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "鍗曟嵁鍙凤細" + HBillNo + "锛屽崟鎹甀D锛�" + HInterID + "锛�" + DBUtility.ClsPub.isStrNull(ds1.Tables[0].Rows[0]["HRemark"]);
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ }
+
+ }
+ catch (Exception e)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "鎵弿婧愬崟鏉$爜澶辫触锛�" + e.ToString();
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ }
+
+ #endregion
#endregion
diff --git "a/WebAPI/Controllers/\347\211\251\346\265\201\347\256\241\347\220\206/\345\207\272\350\277\220\345\215\225/WLYayBillController.cs" "b/WebAPI/Controllers/\347\211\251\346\265\201\347\256\241\347\220\206/\345\207\272\350\277\220\345\215\225/WLYayBillController.cs"
index c851767..74babc2 100644
--- "a/WebAPI/Controllers/\347\211\251\346\265\201\347\256\241\347\220\206/\345\207\272\350\277\220\345\215\225/WLYayBillController.cs"
+++ "b/WebAPI/Controllers/\347\211\251\346\265\201\347\256\241\347\220\206/\345\207\272\350\277\220\345\215\225/WLYayBillController.cs"
@@ -93,10 +93,10 @@
}
ListMaterial = ListMaterial.Replace(';', ',');
List<object> columnNameList = new List<object>();
-
- ds = oCN.RunProcReturn("select a.*,b.HUnitID from h_v_Gy_MaterialPackingRelationList_Edit a left JOIN Gy_Material b on a.HMaterID=b.HItemID where HDefaultSendPackFlag=1 and HMaterID in (" + ListMaterial+")", "锘縣_v_Gy_MaterialPackingRelationList");
+
+ ds = oCN.RunProcReturn("select a.*,b.HUnitID from h_v_Gy_MaterialPackingRelationList_Edit a left JOIN Gy_Material b on a.HMaterID=b.HItemID where HDefaultSendPackFlag=1 and 瀹℃牳浜�='' and HMaterID in (" + ListMaterial + ")", "锘縣_v_Gy_MaterialPackingRelationList");
//娣诲姞鍒楀悕
@@ -375,16 +375,23 @@
}
var ds = oCN.RunProcReturn("select * from WL_YayBillMain where HInterID=" + HInterID, "WL_YayBillMain");
-
+ 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;
+ }
oCN.BeginTran();
- oCN.RunProc("update WL_YayBillMain set HDate_CarrierSure='" + DateTime.Now.ToString("yyyy-MM-dd") + "' where HInterID=" + HInterID);
+ oCN.RunProc("update WL_YayBillMain set HDate_CarrierSure='" + DateTime.Now.ToString("yyyy-MM-dd") + "' where HInterID=" + HInterID);
- objJsonResult.code = "1";
- objJsonResult.count = 1;
- objJsonResult.Message = "鎴愬姛";
- objJsonResult.data = null;
+ objJsonResult.code = "1";
+ objJsonResult.count = 1;
+ objJsonResult.Message = "鎴愬姛";
+ objJsonResult.data = null;
oCN.Commit();
return objJsonResult;
@@ -429,22 +436,54 @@
var ds = oCN.RunProcReturn("select * from WL_YayBillMain where HInterID=" + HInterID, "WL_YayBillMain");
oCN.BeginTran();
- if(IsAudit== 1)
+ if (IsAudit == 1)
{
+ if (ds.Tables[0].Rows[0]["HDate_AllocationDriver"] == null || ds.Tables[0].Rows[0]["HDate_AllocationDriver"].ToString() == "")
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "璇峰厛鍒嗛厤鍙告満锛�";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
oCN.RunProc("update WL_YayBillMain set HSurer_Arrive='" + CurUserName + "',HDate_Arrive=getdate() where HInterID=" + HInterID);
}
- else if(IsAudit == 2)
+ else if (IsAudit == 2)
{
+ if (ds.Tables[0].Rows[0]["HSurer_Arrive"] == null)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "璇峰厛鍒板巶纭锛�";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
oCN.RunProc("update WL_YayBillMain set HSurer_Pick='" + CurUserName + "',HDate_Pick=getdate() where HInterID=" + HInterID);
}
- else if(IsAudit == 3)
+ else if (IsAudit == 3)
{
+ if (ds.Tables[0].Rows[0]["HSurer_Pick"] == null || ds.Tables[0].Rows[0]["HSurer_Pick"].ToString() == "")
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "璇峰厛鎻愯揣纭锛�";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
oCN.RunProc("update WL_YayBillMain set HSurer_Trans='" + CurUserName + "',HDate_Trans=getdate() where HInterID=" + HInterID);
}
- else if(IsAudit == 4)
+ else if (IsAudit == 4)
{
+ if (ds.Tables[0].Rows[0]["HSurer_Trans"] == null || ds.Tables[0].Rows[0]["HSurer_Trans"].ToString() == "")
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "璇峰厛鍑哄巶杩愯緭纭锛�";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
oCN.RunProc("update WL_YayBillMain set HSurer_Receive='" + CurUserName + "',HDate_Receive=getdate() where HInterID=" + HInterID);
}
@@ -484,14 +523,25 @@
/// <returns></returns>
[Route("WLYayBillController/selectDriver")]
[HttpGet]
- public object selectDriver(int HInterID,int HcheckID, int IsAudit, string CurUserName)
+ public object selectDriver(int HInterID, int HcheckID, int IsAudit, string CurUserName)
{
try
{
DataSet ds;
- if(IsAudit==1)
+ var dss = oCN.RunProcReturn("select * from WL_YayBillMain where HInterID=" + HInterID, "WL_YayBillMain");
+ if (dss.Tables[0].Rows[0]["HDate_CarrierSure"] == null || dss.Tables[0].Rows[0]["HDate_CarrierSure"].ToString() == "")
{
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "璇峰厛渚涘簲鍟嗙‘璁わ紒";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ if (IsAudit == 1)
+ {
+
ds = oCN.RunProcReturn("select * from h_v_Gy_CarList where HItemID=" + HcheckID, "h_v_Gy_CarList");
+
if (ds.Tables[0].Rows.Count > 0)
{
oCN.BeginTran();
@@ -507,7 +557,7 @@
return objJsonResult;
}
-
+
}
else
{
@@ -547,5 +597,32 @@
}
}
#endregion
+
+
+ [Route("WLYayBillController/updateBillMEs")]
+ [HttpGet]
+ public object updateBillMEs(int HInterID,int HEntryID, int ScatteredVolume, string CurUserName)
+ {
+ var ds = oCN.RunProcReturn("select * from WL_YayBillMain a inner join WL_YayBillSub_Material b on b.HInterID=a.HInterID where a.HInterID=" + HInterID, "WL_YayBillMain");
+ if (ds != null || ds.Tables[0].Rows.Count <= 0)
+ {
+ oCN.BeginTran();
+ oCN.RunProc("update WL_YayBillSub_Material set HScatteredVolume= " + ScatteredVolume + " where HInterID=" + HInterID+ "and HEntryID="+ HEntryID);
+ objJsonResult.code = "1";
+ objJsonResult.count = 1;
+ objJsonResult.Message = "鎴愬姛";
+ objJsonResult.data = null;
+ oCN.Commit();
+ return objJsonResult;
+ }
+ else
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "鏇存柊澶辫触锛�";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ }
}
}
--
Gitblit v1.9.1