From e69d3f70d1c82fdbf5cc0b39f55882a10361c0d6 Mon Sep 17 00:00:00 2001
From: yusijie <ysj@hz-kingdee.com>
Date: 星期日, 29 六月 2025 18:43:59 +0800
Subject: [PATCH] 小车锁定;排时根据产品器具清单获取模具;
---
DAL/仓库管理/小车锁定/ClsKf_TrolleyPositionBill.cs | 211 ++++++++++++++++++++++++++++++
WebAPI/ListModels.cs | 24 +++
WebAPI/Controllers/SCGL/日计划管理/JIT_DayPlanPlatFormBillController.cs | 8
Model/仓库管理/ClsKf_TrolleyPositionBillMain.cs | 15 ++
WebAPI/Controllers/条码管理/WEBSController.cs | 108 +++++++++++++++
DAL/DAL.csproj | 1
Model/仓库管理/ClsKf_TrolleyPositionBillSub.cs | 28 ++++
Model/Model.csproj | 2
WebAPI/DLL/ClsSc_ICMOReportBill.cs | 4
WebAPI/Controllers/SCGL/Sc_ICMOReportBillController.cs | 2
10 files changed, 399 insertions(+), 4 deletions(-)
diff --git a/DAL/DAL.csproj b/DAL/DAL.csproj
index 51bbccf..a9396c2 100644
--- a/DAL/DAL.csproj
+++ b/DAL/DAL.csproj
@@ -80,6 +80,7 @@
<ItemGroup>
<Compile Include="APS\ClsSc_WorkBillMonthSortBill.cs" />
<Compile Include="APS\ClsSc_ICMOChangeBill.cs" />
+ <Compile Include="浠撳簱绠$悊\灏忚溅閿佸畾\ClsKf_TrolleyPositionBill.cs" />
<Compile Include="鍩虹璧勬枡\鍏敤鍩虹璧勬枡\ClsGy_PatrolCheckItemMethod_Ctl.cs" />
<Compile Include="鍩虹璧勬枡\鍏敤鍩虹璧勬枡\ClsGy_PatrolCheckItemClass_Ctl.cs" />
<Compile Include="鍩虹璧勬枡\鍏敤鍩虹璧勬枡\ClsGy_MaintainClass_Ctl.cs" />
diff --git "a/DAL/\344\273\223\345\272\223\347\256\241\347\220\206/\345\260\217\350\275\246\351\224\201\345\256\232/ClsKf_TrolleyPositionBill.cs" "b/DAL/\344\273\223\345\272\223\347\256\241\347\220\206/\345\260\217\350\275\246\351\224\201\345\256\232/ClsKf_TrolleyPositionBill.cs"
new file mode 100644
index 0000000..d52a64b
--- /dev/null
+++ "b/DAL/\344\273\223\345\272\223\347\256\241\347\220\206/\345\260\217\350\275\246\351\224\201\345\256\232/ClsKf_TrolleyPositionBill.cs"
@@ -0,0 +1,211 @@
+锘縰sing System;
+using System.Collections.Generic;
+using System.Text;
+using System.Data;
+
+namespace DAL
+{
+ public class ClsKf_TrolleyPositionBill : DBUtility.ClsXt_BaseBill
+ {
+ public Model.ClsKf_TrolleyPositionBillMain omodel = new Model.ClsKf_TrolleyPositionBillMain();
+ public List<Model.ClsKf_TrolleyPositionBillSub> DetailColl = new List<Model.ClsKf_TrolleyPositionBillSub>();
+ Pub_Class.ClsXt_SystemParameter oSystemParameter = new Pub_Class.ClsXt_SystemParameter();
+
+ public ClsKf_TrolleyPositionBill()
+ {
+ base.MvarItemKeySub = "Kf_TrolleyPositionBillSub";
+ base.MvarItemKeySub2 = "";
+ base.MvarItemKeySub3 = "";
+ base.MvarItemKeySub4 = "";
+ base.MvarItemKey = "Kf_TrolleyPositionBillMain";
+ base.MvarReportTitle = "灏忚溅閿佸畾";
+ base.BillType = "10004";
+ base.HBillSubType = "10004";
+
+ }
+
+ #region 鍥哄畾浠g爜
+
+ ~ClsKf_TrolleyPositionBill()
+ {
+ DetailColl = null;
+ }
+
+ #endregion 鑷畾涔夋柟娉�
+
+
+ //鏂板鍗曟嵁
+ public override bool AddBill(ref string sReturn)
+ {
+ string sErr = "";
+ try
+ {
+ //寰楀埌mainid
+ if (omodel.HInterID == 0 || omodel.HInterID.ToString() == null || omodel.HInterID.ToString() == "undefined")
+ {
+ omodel.HInterID = DBUtility.ClsPub.CreateBillID(BillType, ref DBUtility.ClsPub.sExeReturnInfo);
+ }
+
+ //淇濆瓨鍓嶆帶鍒�=========================================
+ string HBillNote = "";
+ DataSet ds = oCn.RunProcReturn("Exec h_p_Kf_TrolleyPositionBill_BeforeSaveCtrl " + omodel.HInterID.ToString() + ", '" + omodel.HBillNo + "','" + HBillNote + "',1 ", "h_p_Kf_TrolleyPositionBill_BeforeSaveCtrl");
+ if (ds == null)
+ {
+ sReturn = "淇濆瓨鍓嶅垽鏂け璐ワ紒";
+ return false;
+ }
+ if (DBUtility.ClsPub.isStrNull(ds.Tables[0].Rows[0]["HBack"]) != "0")
+ {
+ sReturn = "淇濆瓨澶辫触锛�" + DBUtility.ClsPub.isStrNull(ds.Tables[0].Rows[0]["HBackRemark"]);
+ return false;
+ }
+ //=========================================================
+
+
+ oCn.BeginTran();
+ //鎻掑叆涓昏〃
+ oCn.RunProc("Insert Into Kf_TrolleyPositionBillMain " +
+ "(HInterID,HBillNo,HBillType,HBillSubType,HDate,HRemark" +
+ ",HYear,HPeriod,HMaker,HMakeDate,HStockOrgID" +
+ ",HMainSourceBillType,HMainSourceInterID,HMainSourceEntryID,HMainSourceBillNo" +
+ ",HWHID,HSPID,HSCWHID,HSCSPID" +
+ ") " +
+ " values(" + omodel.HInterID.ToString() + ",'" + omodel.HBillNo + "','" + omodel.HBillType + "','" + omodel.HBillSubType + "','" + omodel.HDate.ToShortDateString() + "','" + omodel.HRemark + "'" +
+ ", " + omodel.HYear + "," + omodel.HPeriod + ",'" + omodel.HMaker + "',getdate()," + omodel.HSTOCKORGID.ToString() +
+ ",'" + omodel.HMainSourceBillType + "'," + omodel.HMainSourceInterID.ToString() + "," + omodel.HMainSourceEntryID.ToString() + ",'" + omodel.HMainSourceBillNo + "'" +
+ ", " + omodel.HWHID.ToString() + "," + omodel.HSPID.ToString() + "," + omodel.HSCWHID.ToString() + "," + omodel.HSCSPID.ToString() +
+ ") ");
+
+
+ sErr = sErr + "1;";
+ //鎻掑叆瀛愯〃
+ foreach (Model.ClsKf_TrolleyPositionBillSub oSub in DetailColl)
+ {
+ string sql1 = string.Format(@"Insert into Kf_TrolleyPositionBillSub " +
+ " (HInterID,HEntryID,HBillNo_bak,HRemark," +
+ "HSourceInterID,HSourceEntryID,HSourceBillNo,HSourceBillType," +
+ "HRelationQty,HRelationMoney," +
+ "HMaterID,HUnitID,HWhID,HSCWHID,HSPID,HSCSPID,HCarBarCode,HEquipID,HEquipBarCode," +
+ "HICMOInterID,HICMOEntryID,HICMOBillNo,HProcessExchangeInterID,HProcessExchangeEntryID,HProcessExchangeBillNo,HStockOrgID" +
+ ") values("
+ + omodel.HInterID.ToString() + "," + oSub.HEntryID.ToString() + ",'" + omodel.HBillNo + "'" + ",'" + oSub.HRemark + "'" +
+ "," + oSub.HSourceInterID.ToString() + "," + oSub.HSourceEntryID.ToString() + ",'" + oSub.HSourceBillNo + "','" + oSub.HSourceBillType + "',"
+ + oSub.HRelationQty.ToString() + "," + oSub.HRelationMoney.ToString() + "," + oSub.HMaterID + "," + oSub.HUnitID + "," + oSub.HWhID + ","
+ + oSub.HSCWHID + "," + oSub.HSPID + "," + oSub.HSCSPID + ",'" + oSub.HCarBarCode + "'," + oSub.HEquipID + ",'" + oSub.HEquipBarCode + "'," + oSub.HICMOInterID + "," + oSub.HICMOEntryID + ",'"
+ + oSub.HICMOBillNo + "'," + oSub.HProcessExchangeInterID + "," + oSub.HProcessExchangeEntryID + ",'" + oSub.HProcessExchangeBillNo + "',"
+ + omodel.HSTOCKORGID +
+ ") ");
+ sErr = sErr + sql1 + "2;";
+ oCn.RunProc(sql1);
+
+ sErr = sErr + "3;";
+ }
+
+ //=========================淇濆瓨鍚庢帶鍒�
+ DataSet ds2 = oCn.RunProcReturn("Exec h_p_Kf_TrolleyPositionBill_AfterSaveCtrl " + omodel.HInterID.ToString() + ", '" + omodel.HBillNo + "',1 ", "h_p_Kf_TrolleyPositionBill_AfterSaveCtrl");
+ if (ds2 == null)
+ {
+ sReturn = "淇濆瓨鍚庢帶鍒跺垽鏂け璐ワ紒";
+ oCn.RollBack();
+ return false;
+ }
+ if (DBUtility.ClsPub.isStrNull(ds2.Tables[0].Rows[0]["HBack"]) != "0")
+ {
+ sReturn = "淇濆瓨澶辫触2锛�" + DBUtility.ClsPub.isStrNull(ds2.Tables[0].Rows[0]["HBackRemark"]);
+ oCn.RollBack();
+ return false;
+ }
+ //============================
+
+ sReturn = "鏂板鍗曟嵁鎴愬姛锛�";
+ oCn.Commit();
+ return true;
+ }
+ catch (Exception e)
+ {
+ sReturn = sErr + "," + e.Message;
+ oCn.RollBack();
+ throw (e);
+ }
+ }
+ //鏄剧ず鍗曟嵁
+ public override bool ShowBill(Int64 lngBillKey, ref string sReturn)
+ {
+ try
+ {
+ //鏌ヨ涓昏〃
+ DataSet Ds;
+ Ds = oCn.RunProcReturn("Select * from Kf_TrolleyPositionBillMain Where HInterID=" + lngBillKey.ToString() , "Kf_TrolleyPositionBillMain");
+ if (Ds.Tables[0].Rows.Count == 0)
+ {
+ sReturn = "鍗曟嵁鏈壘鍒帮紒";
+ return false;
+ }
+ //鍥哄畾璧嬪��===========================================
+ omodel.HInterID = DBUtility.ClsPub.isLong(Ds.Tables[0].Rows[0]["HInterID"]);
+ omodel.HBillNo = Ds.Tables[0].Rows[0]["HBillNo"].ToString().Trim();
+ omodel.HDate = DBUtility.ClsPub.isDate(Ds.Tables[0].Rows[0]["HDate"]);
+ omodel.HYear = DBUtility.ClsPub.isLong(Ds.Tables[0].Rows[0]["HYear"]);
+ omodel.HPeriod = DBUtility.ClsPub.isLong(Ds.Tables[0].Rows[0]["HPeriod"]);
+ omodel.HCheckItemNowID = DBUtility.ClsPub.isLong(Ds.Tables[0].Rows[0]["HCheckItemNowID"]);
+ omodel.HCheckItemNextID = DBUtility.ClsPub.isLong(Ds.Tables[0].Rows[0]["HCheckItemNextID"]);
+ omodel.HCheckFlowID = DBUtility.ClsPub.isLong(Ds.Tables[0].Rows[0]["HCheckFlowID"]);
+ omodel.HRemark = Ds.Tables[0].Rows[0]["HRemark"].ToString().Trim();
+ omodel.HBillStatus = DBUtility.ClsPub.isInt(Ds.Tables[0].Rows[0]["HBillStatus"]);
+ omodel.HBillType = DBUtility.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["HBillType"]);
+ omodel.HBillSubType = DBUtility.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["HBillSubType"]);
+ omodel.HMaker = Ds.Tables[0].Rows[0]["HMaker"].ToString().Trim();
+ omodel.HMakeDate = Ds.Tables[0].Rows[0]["HMakeDate"].ToString().Trim();
+ omodel.HUpDateDate = Ds.Tables[0].Rows[0]["HUpDateDate"].ToString().Trim();
+ omodel.HUpDater = Ds.Tables[0].Rows[0]["HUpDater"].ToString().Trim();
+ omodel.HBackDate = Ds.Tables[0].Rows[0]["HBackDate"].ToString().Trim();
+ omodel.HBacker = Ds.Tables[0].Rows[0]["HBacker"].ToString().Trim();
+ omodel.HCheckDate = Ds.Tables[0].Rows[0]["HCheckDate"].ToString().Trim();
+ omodel.HChecker = Ds.Tables[0].Rows[0]["HChecker"].ToString().Trim();
+ omodel.HCloseDate = Ds.Tables[0].Rows[0]["HCloseDate"].ToString().Trim();
+ omodel.HCloseMan = Ds.Tables[0].Rows[0]["HCloseMan"].ToString().Trim();
+ omodel.HDeleteDate = Ds.Tables[0].Rows[0]["HDeleteDate"].ToString().Trim();
+ omodel.HDeleteMan = Ds.Tables[0].Rows[0]["HDeleteMan"].ToString().Trim();
+ //========================================================
+
+ //
+ //寰幆
+ DataSet DsSub;
+ DsSub = oCn.RunProcReturn("Select * from Kf_TrolleyPositionBillSub Where HInterID=" + lngBillKey.ToString() , "Kf_TrolleyPositionBillSub");
+ DetailColl.Clear();//娓呯┖
+ for (int i = 0; i < DsSub.Tables[0].Rows.Count; i++)
+ {
+ Model.ClsKf_TrolleyPositionBillSub oSub = new Model.ClsKf_TrolleyPositionBillSub();
+ // 鍥哄畾璧嬪��===============================================
+ oSub.HInterID = DBUtility.ClsPub.isLong(DsSub.Tables[0].Rows[i]["HInterID"]);
+ oSub.HBillNo_bak = DsSub.Tables[0].Rows[i]["HBillNo_bak"].ToString().Trim();
+ oSub.HEntryID = DBUtility.ClsPub.isLong(DsSub.Tables[0].Rows[i]["HEntryID"]);
+ oSub.HSourceInterID = DBUtility.ClsPub.isLong(DsSub.Tables[0].Rows[i]["HSourceInterID"]);
+ oSub.HSourceEntryID = DBUtility.ClsPub.isLong(DsSub.Tables[0].Rows[i]["HSourceEntryID"]);
+ oSub.HSourceBillType = DsSub.Tables[0].Rows[i]["HSourceBillType"].ToString().Trim();
+ oSub.HSourceBillNo = DsSub.Tables[0].Rows[i]["HSourceBillNo"].ToString().Trim();
+ oSub.HRelationQty = DBUtility.ClsPub.isDoule(DsSub.Tables[0].Rows[i]["HRelationQty"]);
+ oSub.HRelationMoney = DBUtility.ClsPub.isDoule(DsSub.Tables[0].Rows[i]["HRelationMoney"]);
+ oSub.HRelationQty_In = DBUtility.ClsPub.isDoule(DsSub.Tables[0].Rows[i]["HRelationQty_In"]);
+ oSub.HRelationQty_Out = DBUtility.ClsPub.isDoule(DsSub.Tables[0].Rows[i]["HRelationQty_Out"]);
+ oSub.HRelationQty_WWOrder = DBUtility.ClsPub.isDoule(DsSub.Tables[0].Rows[i]["HRelationQty_WWOrder"]);
+ oSub.HRelationQty_Bad = DBUtility.ClsPub.isDoule(DsSub.Tables[0].Rows[i]["HRelationQty_Bad"]);
+ oSub.HCloseMan = DBUtility.ClsPub.isStrNull(DsSub.Tables[0].Rows[i]["HCloseMan"]);
+ oSub.HCloseType = DBUtility.ClsPub.isBool(DsSub.Tables[0].Rows[i]["HCloseType"]);
+ oSub.HEntryCloseDate = DBUtility.ClsPub.isDate(DsSub.Tables[0].Rows[i]["HEntryCloseDate"]);
+ oSub.HRemark = DsSub.Tables[0].Rows[i]["HRemark"].ToString().Trim();
+ //===================================================
+
+ DetailColl.Add(oSub);
+ }
+ sReturn = "鏄剧ず鍗曟嵁鎴愬姛锛�";
+ return true;
+ }
+ catch (Exception e)
+ {
+ sReturn = e.Message;
+ throw (e);
+ }
+ }
+ }
+}
diff --git a/Model/Model.csproj b/Model/Model.csproj
index e5bc186..187588c 100644
--- a/Model/Model.csproj
+++ b/Model/Model.csproj
@@ -97,6 +97,8 @@
<Compile Include="APS\ClsSc_ICMOChangeBillMain.cs" />
<Compile Include="APS\ClsSc_ICMOChangeBillSub.cs" />
<Compile Include="ClsGy_PatrolCheckItemMethod_Model.cs" />
+ <Compile Include="浠撳簱绠$悊\ClsKf_TrolleyPositionBillMain.cs" />
+ <Compile Include="浠撳簱绠$悊\ClsKf_TrolleyPositionBillSub.cs" />
<Compile Include="鍩虹璧勬枡\鍩虹璧勬枡\ClsGy_PatrolCheckItemClass_Model.cs" />
<Compile Include="浠撳簱绠$悊\ClsKf_WorkShopICStockBillMain.cs" />
<Compile Include="鍩虹璧勬枡\鍩虹璧勬枡\ClsGy_MaintainClass_Model.cs" />
diff --git "a/Model/\344\273\223\345\272\223\347\256\241\347\220\206/ClsKf_TrolleyPositionBillMain.cs" "b/Model/\344\273\223\345\272\223\347\256\241\347\220\206/ClsKf_TrolleyPositionBillMain.cs"
new file mode 100644
index 0000000..5411407
--- /dev/null
+++ "b/Model/\344\273\223\345\272\223\347\256\241\347\220\206/ClsKf_TrolleyPositionBillMain.cs"
@@ -0,0 +1,15 @@
+using System;
+using System.Collections.Generic;
+using System.Text;
+
+namespace Model
+{
+ public class ClsKf_TrolleyPositionBillMain : DBUtility.ClsXt_BaseBillMain
+ {
+ public Int64 HWHID; // int --调入仓库
+ public Int64 HSPID; // int --调入仓位
+ public Int64 HSCWHID; // int --调出仓库
+ public Int64 HSCSPID; // int --调出仓位
+
+ }
+}
diff --git "a/Model/\344\273\223\345\272\223\347\256\241\347\220\206/ClsKf_TrolleyPositionBillSub.cs" "b/Model/\344\273\223\345\272\223\347\256\241\347\220\206/ClsKf_TrolleyPositionBillSub.cs"
new file mode 100644
index 0000000..e2b9f33
--- /dev/null
+++ "b/Model/\344\273\223\345\272\223\347\256\241\347\220\206/ClsKf_TrolleyPositionBillSub.cs"
@@ -0,0 +1,28 @@
+using System;
+using System.Collections.Generic;
+using System.Text;
+
+namespace Model
+{
+ public class ClsKf_TrolleyPositionBillSub : DBUtility.ClsXt_BaseBillSub
+ {
+ public Int64 HMaterID;
+ public Int64 HUnitID;
+ public Int64 HWhID;
+ public Int64 HSCWHID;
+ public Int64 HSPID;
+ public Int64 HSCSPID;
+ public string HCarBarCode;
+ public Int64 HEquipID;
+ public string HEquipBarCode;
+ public Int64 HICMOInterID;
+ public Int64 HICMOEntryID;
+ public string HICMOBillNo;
+ public Int64 HProcessExchangeInterID;
+ public Int64 HProcessExchangeEntryID;
+ public string HProcessExchangeBillNo;
+ public Int64 HStockOrgID;
+ }
+}
+
+
diff --git a/WebAPI/Controllers/SCGL/Sc_ICMOReportBillController.cs b/WebAPI/Controllers/SCGL/Sc_ICMOReportBillController.cs
index 54694f7..274adf0 100644
--- a/WebAPI/Controllers/SCGL/Sc_ICMOReportBillController.cs
+++ b/WebAPI/Controllers/SCGL/Sc_ICMOReportBillController.cs
@@ -409,7 +409,7 @@
{
objJsonResult.code = "0";
objJsonResult.count = 0;
- objJsonResult.Message = "淇濆瓨澶辫触锛�" + e.ToString();
+ objJsonResult.Message = "淇濆瓨澶辫触err锛�" + e.ToString();
objJsonResult.data = 1;
return objJsonResult;
}
diff --git "a/WebAPI/Controllers/SCGL/\346\227\245\350\256\241\345\210\222\347\256\241\347\220\206/JIT_DayPlanPlatFormBillController.cs" "b/WebAPI/Controllers/SCGL/\346\227\245\350\256\241\345\210\222\347\256\241\347\220\206/JIT_DayPlanPlatFormBillController.cs"
index b96fbd8..cca468b 100644
--- "a/WebAPI/Controllers/SCGL/\346\227\245\350\256\241\345\210\222\347\256\241\347\220\206/JIT_DayPlanPlatFormBillController.cs"
+++ "b/WebAPI/Controllers/SCGL/\346\227\245\350\256\241\345\210\222\347\256\241\347\220\206/JIT_DayPlanPlatFormBillController.cs"
@@ -286,6 +286,7 @@
var HEmpID = list[i]["HEmpID"].ToString();
var HWorkQty = list[i]["灏忔椂浜ц兘"].ToString();
var HSourceName = list[i]["鐢熶骇璧勬簮"].ToString();
+ var HMouldID = list[i]["HMouldID"].ToString();
//var HWorkQty_ProdLine = list[i]["浜х嚎鎬讳骇鑳�"].ToString();
LogService.CustomWriteLog("2.05:" + i, DateTime.Now.ToString("yyyy-MM-dd"));
@@ -324,7 +325,7 @@
" HOrderNeedQty, HSplitQty, HDayPlanSumQty,HPlanBeginDate," +
"HSeOrderBillNo,HICMOBillType,HSourceStockInQty,HLeftPlanQty,HOrderLev,HPreparatDate," +
"HMainSourceInterID,HMainSourceEntryID,HICMOInterID_Sec,HICMOEntryID_Sec,HPlanQty" +
- ",HICMOInterID,HICMOEntryID,HPlanEndDate,HEmpID,HWorkQty,HSourceName)values" +
+ ",HICMOInterID,HICMOEntryID,HPlanEndDate,HEmpID,HWorkQty,HSourceName,HMouldID)values" +
$"({HInterID},'{HBillNo}',{DateTime.Now.Year},{DateTime.Now.Month},'{BillType}'," +
$"'{BillType}',GETDATE(),1,'{user}',getdate(),'{HICMOBillNo}','{HOrderType}'," +
$"{(HICMOEntrySEQ == "" ? 0.ToString() : HICMOEntrySEQ)},{(HWorkShopID == "" ? 0.ToString() : HWorkShopID)},{(HSourceID == "" ? 0.ToString() : HSourceID)}, {(HYX == "" ? 0.ToString() : HYX)}, {(HProdORGID == "" ? 0.ToString() : HProdORGID)}," +
@@ -332,7 +333,7 @@
$" 0, {(HSplitQty == "" ? 0.ToString() : HSplitQty)}, {(HDayPlanSumQty == "" ? 0.ToString() : HDayPlanSumQty)},'{HPlanBeginDate}'," +
$"'{HSeOrderBillNo}','{HICMOBillType}',{(HSourceStockInQty == "" ? 0.ToString() : HSourceStockInQty)},{(HLeftPlanQty == "" ? 0.ToString() : HLeftPlanQty)},'{HOrderLev}',getdate()," +
$"{HMainSourceInterID},{HMainSourceEntryID},{HMainSourceInterID},{HMainSourceEntryID},{HPlanQty}," +
- $"{HMainSourceInterID},{HMainSourceEntryID},'{HPlanEndDate}','{HEmpID}','{HWorkQty}','{HSourceName}')";
+ $"{HMainSourceInterID},{HMainSourceEntryID},'{HPlanEndDate}','{HEmpID}','{HWorkQty}','{HSourceName}','{HMouldID}')";
//LogService.Write("sql:" + sql);
//涓昏〃
@@ -378,6 +379,7 @@
var HOrderLev = list[i]["璁㈠崟绛夌骇"].ToString();
var HPlanQty = list[i]["璁″垝鏁伴噺"].ToString();
var HEmpID = list[i]["HEmpID"].ToString();
+ var HMouldID = list[i]["HMouldID"].ToString();
LogService.CustomWriteLog("2.1:"+i, DateTime.Now.ToString("yyyy-MM-dd"));
@@ -535,7 +537,7 @@
oCN.RunProc($"update Sc_WorkBillSortBillMain set HSourceID={(HSourceID == "" ? 0.ToString() : HSourceID)},HYX={HYX}" +
$",HWorkQty={HWorkQty},HProdTimes={HProdTimes},HReadyTimes={HReadyTimes},HLastBeginDate='{HLastBeginDate}'" +
- $",HLastEndDate='{HLastEndDate}',HOrderNeedQty={HOrderNeedQty},HOrderCommitDate='{HOrderCommitDate}',HPlanEndDate='{HPlanEndDate}',HSplitQty={HSplitQty},HSourceName='{HSourceName}',HWorkQty_ProdLine={HWorkQty_ProdLine}" +
+ $",HLastEndDate='{HLastEndDate}',HOrderNeedQty={HOrderNeedQty},HOrderCommitDate='{HOrderCommitDate}',HPlanEndDate='{HPlanEndDate}',HSplitQty={HSplitQty},HSourceName='{HSourceName}',HWorkQty_ProdLine={HWorkQty_ProdLine},HMouldID={HMouldID}" +
$" where HInterID={list[i]["hmainid"].ToString()} and HBillNo='{list[i]["鍗曟嵁鍙�"].ToString()}'");
}
}
diff --git "a/WebAPI/Controllers/\346\235\241\347\240\201\347\256\241\347\220\206/WEBSController.cs" "b/WebAPI/Controllers/\346\235\241\347\240\201\347\256\241\347\220\206/WEBSController.cs"
index 74778b0..92184d2 100644
--- "a/WebAPI/Controllers/\346\235\241\347\240\201\347\256\241\347\220\206/WEBSController.cs"
+++ "b/WebAPI/Controllers/\346\235\241\347\240\201\347\256\241\347\220\206/WEBSController.cs"
@@ -4403,6 +4403,114 @@
#endregion
+ #region 灏忚溅閿佸畾鍗� 涓婁紶鐢熷崟
+
+ /// <summary>
+ /// 灏忚溅閿佸畾鍗曟柊澧炰笂浼�
+ /// </summary>
+ /// <returns></returns>
+ [Route("WEBSController/set_SaveTrolleyPositionBill_Json2")]
+ [HttpPost]
+ public object set_SaveTrolleyPositionBill_Json([FromBody] JObject msg)
+ {
+ var _value = msg["msg"].ToString();
+ string msg1 = _value.ToString();
+ string[] sArray = msg1.Split(new string[] { ";" }, StringSplitOptions.RemoveEmptyEntries);
+ string msg2 = sArray[0].ToString();
+ string msg3 = sArray[1].ToString();
+ string UserName = sArray[2].ToString();
+ string OperationType = sArray[3].ToString();
+ DBUtility.ClsPub.CurUserName = UserName;
+ ListModels oListModels = new ListModels();
+ try
+ {
+ DAL.ClsKf_TrolleyPositionBill oBill = new DAL.ClsKf_TrolleyPositionBill();
+ List<Model.ClsKf_TrolleyPositionBillMain> lsmain = new List<Model.ClsKf_TrolleyPositionBillMain>();
+ msg2 = msg2.Replace("\\", "");
+ msg2 = msg2.Replace("\n", ""); //\n
+ lsmain = oListModels.getObjectByJson_Kf_TrolleyPositionBillMain(msg2);
+
+ foreach (Model.ClsKf_TrolleyPositionBillMain oItem in lsmain)
+ {
+ DBUtility.ClsPub.CurUserName = oItem.HMaker;
+ oItem.HBillType = "10004";
+ oItem.HBillSubType = "10004";
+ oItem.HBillStatus = 1; //鍗曟嵁鐘舵�侊紙1鏈锛�2瀹℃牳閫氳繃锛�3鍏抽棴锛�4浣滃簾锛�5瀹℃牳閫�鍥�,6瀹℃牳涓�,7宸查槄锛�8宸插洖澶嶏紝9缁撴锛�10楠岃瘉,11涓嬭揪锛�12寮�宸�,13鐢宠瀹℃壒,15鐢宠妫�楠岋紝16 鍒ゅ畾鍚堟牸锛�17鍒ゅ畾涓嶅悎鏍硷級
+ oItem.HYear = DBUtility.ClsPub.isLong(DateTime.Now.Year);
+ oItem.HPeriod = DBUtility.ClsPub.isLong(DateTime.Now.Month);
+ oItem.HMakeDate = DBUtility.ClsPub.isStrNull(DateTime.Now.ToString("yyyy-MM-dd"));
+ if (DBUtility.ClsPub.isStrNull(oItem.HDate) == "")
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "淇濆瓨澶辫触锛佹病鏈夊崟鎹棩鏈燂紝鏃犳硶淇濆瓨锛�";
+ objJsonResult.data = 1;
+ return objJsonResult;
+ }
+ oBill.omodel = oItem;
+ }
+
+ // 琛ㄤ綋鏁版嵁
+ //鎸� },{鏉ユ媶鍒嗘暟缁� //鍘绘帀銆愬拰銆�
+ msg3 = msg3.Substring(1, msg3.Length - 2);
+ msg3 = msg3.Replace("\\", "");
+ msg3 = msg3.Replace("\n", ""); //\n
+ List<Model.ClsKf_TrolleyPositionBillSub> ls = new List<Model.ClsKf_TrolleyPositionBillSub>();
+ ls = oListModels.getObjectByJson_Kf_TrolleyPositionBillSub(msg3);
+ int i = 0;
+ foreach (Model.ClsKf_TrolleyPositionBillSub oItemSub in ls)
+ {
+ i++;
+ oItemSub.HEntryID = i;
+ oItemSub.HEntryCloseDate = DBUtility.ClsPub.isDate(DateTime.Now);
+ oItemSub.HCloseType = false; //鍏抽棴绫诲瀷
+
+ oBill.DetailColl.Add(oItemSub);
+ }
+
+ //淇濆瓨
+ //淇濆瓨瀹屾瘯鍚庡鐞�
+ bool bResult;
+ if (OperationType == "1")
+ {
+ bResult = oBill.AddBill(ref DBUtility.ClsPub.sExeReturnInfo);
+ }
+ else
+ {
+ bResult = oBill.ModifyBill(oBill.omodel.HInterID, ref DBUtility.ClsPub.sExeReturnInfo);
+ objJsonResult.Verify = "N";
+ }
+
+ if (bResult)
+ {
+ objJsonResult.code = "1";
+ objJsonResult.count = 1;
+ objJsonResult.Message = "淇濆瓨鎴愬姛锛�";
+ objJsonResult.data = 1;
+ return objJsonResult;
+ }
+ else
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "淇濆瓨澶辫触锛�" + DBUtility.ClsPub.sExeReturnInfo;
+ objJsonResult.data = 1;
+ return objJsonResult;
+ }
+ }
+ catch (Exception e)
+ {
+ oCn.RollBack();
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "灏忚溅閿佸畾鍗曚笂浼犲け璐ワ紒" + e.ToString();
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ }
+
+ #endregion
+
#endregion
diff --git a/WebAPI/DLL/ClsSc_ICMOReportBill.cs b/WebAPI/DLL/ClsSc_ICMOReportBill.cs
index 73f4972..f148454 100644
--- a/WebAPI/DLL/ClsSc_ICMOReportBill.cs
+++ b/WebAPI/DLL/ClsSc_ICMOReportBill.cs
@@ -192,6 +192,7 @@
if (DBUtility.ClsPub.isStrNull(ds.Tables[0].Rows[0]["HBack"]) == "1")
{
+ LogService.Write("鐢熶骇姹囨姤鍗曚繚瀛樺け璐ュ師鍥狅細" + ds.Tables[0].Rows[0]["HBackRemark"]);
sReturn = DBUtility.ClsPub.isStrNull(ds.Tables[0].Rows[0]["HBackRemark"]);
oCn.RollBack();
return false;
@@ -265,6 +266,7 @@
, "h_p_Sc_ICMOReportBill_ReverseWriteQty");
if (DBUtility.ClsPub.isStrNull(ds.Tables[0].Rows[0]["HBack"]) == "1")
{
+ LogService.Write("鐢熶骇姹囨姤鍗曚繚瀛樺け璐ュ師鍥狅細" + ds.Tables[0].Rows[0]["HBackRemark"]);
sReturn = DBUtility.ClsPub.isStrNull(ds.Tables[0].Rows[0]["HBackRemark"]);
oCn.RollBack();
return false;
@@ -288,6 +290,7 @@
if (DBUtility.ClsPub.isStrNull(ds.Tables[0].Rows[0]["HBack"]) == "1")
{
+ LogService.Write("鐢熶骇姹囨姤鍗曚繚瀛樺け璐ュ師鍥狅細" + ds.Tables[0].Rows[0]["HBackRemark"]);
sReturn = DBUtility.ClsPub.isStrNull(ds.Tables[0].Rows[0]["HBackRemark"]);
oCn.RollBack();
return false;
@@ -300,6 +303,7 @@
}
catch (Exception e)
{
+ LogService.Write("鐢熶骇姹囨姤鍗曚繚瀛樺け璐ュ師鍥狅細" + e.Message);
sReturn = e.Message;
oCn.RollBack();
throw (e);
diff --git a/WebAPI/ListModels.cs b/WebAPI/ListModels.cs
index ba58962..6ca5832 100644
--- a/WebAPI/ListModels.cs
+++ b/WebAPI/ListModels.cs
@@ -3859,6 +3859,30 @@
}
/// <summary>
+ /// 杞﹂棿瀹氫綅灏忚溅閿佸畾涓昏〃json
+ /// </summary>
+ /// <param name="jsonString"></param>
+ /// <returns></returns>
+ public List<Model.ClsKf_TrolleyPositionBillMain> getObjectByJson_Kf_TrolleyPositionBillMain(string jsonString)
+ {
+ jsonString = "[" + jsonString.ToString() + "]";
+ List<Model.ClsKf_TrolleyPositionBillMain> list = Newtonsoft.Json.JsonConvert.DeserializeObject<List<Model.ClsKf_TrolleyPositionBillMain>>(jsonString);
+ return list;
+ }
+
+ /// <summary>
+ /// 杞﹂棿瀹氫綅灏忚溅閿佸畾瀛愯〃json
+ /// </summary>
+ /// <param name="jsonString"></param>
+ /// <returns></returns>
+ public List<Model.ClsKf_TrolleyPositionBillSub> getObjectByJson_Kf_TrolleyPositionBillSub(string jsonString)
+ {
+ jsonString = "[" + jsonString.ToString() + "]";
+ List<Model.ClsKf_TrolleyPositionBillSub> list = Newtonsoft.Json.JsonConvert.DeserializeObject<List<Model.ClsKf_TrolleyPositionBillSub>>(jsonString);
+ return list;
+ }
+
+ /// <summary>
/// 鎶ュ伐骞冲彴杩斿伐鍗曚富琛╦son
/// </summary>
/// <param name="jsonString"></param>
--
Gitblit v1.9.1