From 7f3034113076f4a599ac2c6e1d14b7ddd0f57788 Mon Sep 17 00:00:00 2001 From: yusijie <ysj@hz-kingdee.com> Date: 星期四, 22 十二月 2022 16:38:27 +0800 Subject: [PATCH] Merge branch 'master' of http://101.37.171.70:10101/r/MES-WEB-API --- .gitignore | 17 ++ WebAPI/ListModels.cs | 12 + Pub_Class/CustomerCls/ClsXt_SystemParameter.cs | 128 ++++++++++++++++++ WebAPI/Controllers/BaseSet/Gy_MaterialController.cs | 17 -- Model/生产管理/模具管理/ClsSc_MouldMaintainPlanBillMain.cs | 1 Model/生产管理/模具管理/ClsSc_MouldMaintainPlanBillSub_Item.cs | 17 ++ WebAPI/Controllers/基础资料/基础资料/Gy_StockCheckItemBillController.cs | 72 ++++++--- Model/Model.csproj | 1 WebAPI/Controllers/Sc_MouldRepairInBillListController.cs | 67 ++++++-- Pub_Class/CustomerCls/ClsXt_SystemParameterMain.cs | 19 ++ WebAPI/Controllers/MJGL/Sc_MouldMaintainRuleBillController.cs | 16 +- DAL/生产管理/模具管理/ClsSc_MouldMaintainPlanBill.cs | 49 ++++++ 12 files changed, 345 insertions(+), 71 deletions(-) diff --git a/.gitignore b/.gitignore index 9c0164d..4b86fef 100644 --- a/.gitignore +++ b/.gitignore @@ -142,3 +142,20 @@ /WebAPI/Sc_MouldProdOutBill/Log /PayM/bin/Debug /PayM/obj/x86/Debug +/APSM/bin/Release +/BaseSet/bin/Release +/BLL/bin/Release +/DBUtility/obj/Release +/EAM/bin/Release +/Kanban/bin/Release +/Model/obj/Release +/PlanM/bin/Release +/ProM/bin/Release +/SCM/bin/Release +/SelM/bin/Release +/SQLHelper/obj/Release +/WorkM/bin/Release +/WarM/bin/Release +/OAM/bin/Release +/LMES/bin/Release +/PayM/bin/Release diff --git "a/DAL/\347\224\237\344\272\247\347\256\241\347\220\206/\346\250\241\345\205\267\347\256\241\347\220\206/ClsSc_MouldMaintainPlanBill.cs" "b/DAL/\347\224\237\344\272\247\347\256\241\347\220\206/\346\250\241\345\205\267\347\256\241\347\220\206/ClsSc_MouldMaintainPlanBill.cs" index f81c082..266ffc0 100644 --- "a/DAL/\347\224\237\344\272\247\347\256\241\347\220\206/\346\250\241\345\205\267\347\256\241\347\220\206/ClsSc_MouldMaintainPlanBill.cs" +++ "b/DAL/\347\224\237\344\272\247\347\256\241\347\220\206/\346\250\241\345\205\267\347\256\241\347\220\206/ClsSc_MouldMaintainPlanBill.cs" @@ -9,6 +9,7 @@ { public Model.ClsSc_MouldMaintainPlanBillMain omodel = new Model.ClsSc_MouldMaintainPlanBillMain(); public List<Model.ClsSc_MouldMaintainPlanBillSub> DetailColl = new List<Model.ClsSc_MouldMaintainPlanBillSub>(); + public List<Model.ClsSc_MouldMaintainPlanBillSub_Item> DetailCol = new List<Model.ClsSc_MouldMaintainPlanBillSub_Item>(); public ClsSc_MouldMaintainPlanBill() { @@ -56,7 +57,7 @@ //",HGroupID=" + omodel.HGroupID.ToString() + //",HWHID=" + omodel.HWHID.ToString() + //",HSCWHID=" + omodel.HSCWHID.ToString() + - + ",HEquipDotCheckRuleInterID='" + omodel.HEquipDotCheckRuleInterID + "'" + ",HCycleUnit='" + omodel.HCycleUnit + "'" + ",HCheckCycle=" + omodel.HCheckCycle.ToString() + ",HBeginDate='" + omodel.HBeginDate + "'" + @@ -69,8 +70,10 @@ DeleteRelation(ref sReturn, lngBillKey); //鍒犻櫎瀛愯〃 DeleteBillSub(lngBillKey); - //鎻掑叆瀛愯〃 + oCn.RunProc("delete from Sc_MouldMaintainPlanBillSub_Item where HInterID=" + lngBillKey); + omodel.HInterID = lngBillKey; + //鎻掑叆瀛愯〃閰嶄欢淇℃伅 foreach (Model.ClsSc_MouldMaintainPlanBillSub oSub in DetailColl) { oCn.RunProc("Insert into Sc_MouldMaintainPlanBillSub " + @@ -84,6 +87,24 @@ ",'" + oSub.HCloseMan + "'," + Convert.ToString(oSub.HCloseType ? 1 : 0) + ",'" + oSub.HRemark + "'" + "," + oSub.HSourceInterID.ToString() + "," + oSub.HSourceEntryID.ToString() + ",'" + oSub.HSourceBillNo + "','" + oSub.HSourceBillType + "'," + oSub.HRelationQty.ToString() + "," + oSub.HRelationMoney.ToString() + ") "); + } + + //鎻掑叆淇濆吇椤瑰瓙琛� + foreach (Model.ClsSc_MouldMaintainPlanBillSub_Item Item in DetailCol) + { + oCn.RunProc("Insert into Sc_MouldMaintainPlanBillSub_Item" + + " (HInterID,HEntryID,HMaintainItemID" + + ",HMaintainPart,HClaim" + + ",HManagerID" + + ",HCloseMan,HCloseType,HRemark" + + ",HSourceInterID,HSourceEntryID,HSourceBillNo,HSourceBillType,HRelationQty,HRelationMoney,HMaintainItem" + + ") values(" + + omodel.HInterID.ToString() + "," + Item.HEntryID.ToString() + "," + Item.HMaintainItemID.ToString() + + ",'" + Item.HMaintainPart.ToString() + "','" + Item.HClaim.ToString() + "'" + + "," + Item.HManagerID.ToString() + + ",'" + Item.HCloseMan + "'," + Convert.ToString(Item.HCloseType ? 1 : 0) + ",'" + Item.HRemark + "'" + + "," + Item.HSourceInterID.ToString() + "," + Item.HSourceEntryID.ToString() + ",'" + Item.HSourceBillNo + "','" + Item.HSourceBillType + "'," + Item.HRelationQty.ToString() + "," + Item.HRelationMoney.ToString() + "," + Item.HMaintainItem.ToString() + + ") "); } // //foreach (Model.ClsSc_MouldMaintainPlanBillSub oSub in DetailColl) @@ -122,14 +143,14 @@ "(HBillType,HBillSubType,HInterID,HBillNo,HDate,HMaker,HMakeDate" + ",HYear,HPeriod,HRemark" + ",HCycleUnit,HCheckCycle,HBeginDate,HEndDate"+ - ",HInnerBillNo,HExplanation" + + ",HInnerBillNo,HExplanation,HEquipDotCheckRuleInterID" + ") " + " values('" + this.BillType + "','" + this.HBillSubType + "'," +omodel.HInterID.ToString() + ",'" + omodel.HBillNo + "','" + omodel.HDate + "','" + DBUtility.ClsPub.CurUserName + "',getdate()" + "," + omodel.HYear.ToString() + "," + omodel.HPeriod.ToString() + ",'" + omodel.HRemark + "'"+ ",'" + omodel.HCycleUnit + "'," + omodel.HCheckCycle.ToString() + ",'" + omodel.HBeginDate + "','" + omodel.HEndDate + "'" + - ",'" + omodel.HInnerBillNo + "','" + omodel.HExplanation + "'" + + ",'" + omodel.HInnerBillNo + "','" + omodel.HExplanation + "'" + "','" + omodel.HEquipDotCheckRuleInterID + "'" + ") "); - //鎻掑叆瀛愯〃 + //鎻掑叆瀛愯〃閰嶄欢淇℃伅 foreach (Model.ClsSc_MouldMaintainPlanBillSub oSub in DetailColl) { oCn.RunProc("Insert into Sc_MouldMaintainPlanBillSub " + @@ -144,6 +165,24 @@ "," + oSub.HSourceInterID.ToString() + "," + oSub.HSourceEntryID.ToString() + ",'" + oSub.HSourceBillNo + "','" + oSub.HSourceBillType + "'," + oSub.HRelationQty.ToString() + "," + oSub.HRelationMoney.ToString() + ") "); } + + //鎻掑叆淇濆吇椤瑰瓙琛� + foreach (Model.ClsSc_MouldMaintainPlanBillSub_Item Item in DetailCol) + { + oCn.RunProc("Insert into Sc_MouldMaintainPlanBillSub_Item" + + " (HInterID,HEntryID,HMaintainItemID" + + ",HMaintainPart,HClaim" + + ",HManagerID" + + ",HCloseMan,HCloseType,HRemark" + + ",HSourceInterID,HSourceEntryID,HSourceBillNo,HSourceBillType,HRelationQty,HRelationMoney,HMaintainItem" + + ") values(" + + omodel.HInterID.ToString() + "," + Item.HEntryID.ToString() + "," + Item.HMaintainItemID.ToString() + + ",'" + Item.HMaintainPart.ToString() + "','" + Item.HClaim.ToString() + "'" + + "," + Item.HManagerID.ToString() + + ",'" + Item.HCloseMan + "'," + Convert.ToString(Item.HCloseType ? 1 : 0) + ",'" + Item.HRemark + "'" + + "," + Item.HSourceInterID.ToString() + "," + Item.HSourceEntryID.ToString() + ",'" + Item.HSourceBillNo + "','" + Item.HSourceBillType + "'," + Item.HRelationQty.ToString() + "," + Item.HRelationMoney.ToString() +"," + Item.HMaintainItem.ToString() + + ") "); + } // //foreach (Model.ClsSc_MouldMaintainPlanBillSub oSub in DetailColl) //{ diff --git a/Model/Model.csproj b/Model/Model.csproj index 6a0a47c..d4593ea 100644 --- a/Model/Model.csproj +++ b/Model/Model.csproj @@ -531,6 +531,7 @@ <Compile Include="鐢熶骇绠$悊\妯″叿绠$悊\ClsSc_MouldMaintainBillMain.cs" /> <Compile Include="鐢熶骇绠$悊\妯″叿绠$悊\ClsSc_MouldMaintainBillSub.cs" /> <Compile Include="鐢熶骇绠$悊\妯″叿绠$悊\ClsSc_MouldMaintainPlanBillMain.cs" /> + <Compile Include="鐢熶骇绠$悊\妯″叿绠$悊\ClsSc_MouldMaintainPlanBillSub_Item.cs" /> <Compile Include="鐢熶骇绠$悊\妯″叿绠$悊\ClsSc_MouldMaintainPlanBillSub.cs" /> <Compile Include="鐢熶骇绠$悊\妯″叿绠$悊\ClsSc_MouldMaintainRuleBillMain.cs" /> <Compile Include="鐢熶骇绠$悊\妯″叿绠$悊\ClsSc_MouldMaintainRuleBillSub.cs" /> diff --git "a/Model/\347\224\237\344\272\247\347\256\241\347\220\206/\346\250\241\345\205\267\347\256\241\347\220\206/ClsSc_MouldMaintainPlanBillMain.cs" "b/Model/\347\224\237\344\272\247\347\256\241\347\220\206/\346\250\241\345\205\267\347\256\241\347\220\206/ClsSc_MouldMaintainPlanBillMain.cs" index 47ac138..f26ed86 100644 --- "a/Model/\347\224\237\344\272\247\347\256\241\347\220\206/\346\250\241\345\205\267\347\256\241\347\220\206/ClsSc_MouldMaintainPlanBillMain.cs" +++ "b/Model/\347\224\237\344\272\247\347\256\241\347\220\206/\346\250\241\345\205\267\347\256\241\347\220\206/ClsSc_MouldMaintainPlanBillMain.cs" @@ -14,5 +14,6 @@ public string HEndDate;// datetime --计划结束日期 public string HExplanation;// varchar(500) --摘要 public string HInnerBillNo;// varchar(50) --内部单据号 + public int HEquipDotCheckRuleInterID; //器具保养规程id } } diff --git "a/Model/\347\224\237\344\272\247\347\256\241\347\220\206/\346\250\241\345\205\267\347\256\241\347\220\206/ClsSc_MouldMaintainPlanBillSub_Item.cs" "b/Model/\347\224\237\344\272\247\347\256\241\347\220\206/\346\250\241\345\205\267\347\256\241\347\220\206/ClsSc_MouldMaintainPlanBillSub_Item.cs" new file mode 100644 index 0000000..22e8182 --- /dev/null +++ "b/Model/\347\224\237\344\272\247\347\256\241\347\220\206/\346\250\241\345\205\267\347\256\241\347\220\206/ClsSc_MouldMaintainPlanBillSub_Item.cs" @@ -0,0 +1,17 @@ +using System; +using System.Collections.Generic; +using System.Text; + +namespace Model +{ + public class ClsSc_MouldMaintainPlanBillSub_Item : DBUtility.ClsXt_BaseBillSub + { + //============ + + public Int64 HMaintainItemID;// int --保养项目ID + public string HMaintainItem;// varchar(100) --保养项目 + public string HMaintainPart;// varchar(100) --保养部位 + public string HClaim;// varchar(100) --具体要求 + public Int64 HManagerID;// int --负责人id(职员表) + } +} diff --git a/Pub_Class/CustomerCls/ClsXt_SystemParameter.cs b/Pub_Class/CustomerCls/ClsXt_SystemParameter.cs index 20d8bb9..8197121 100644 --- a/Pub_Class/CustomerCls/ClsXt_SystemParameter.cs +++ b/Pub_Class/CustomerCls/ClsXt_SystemParameter.cs @@ -583,6 +583,19 @@ { omodel.Kf_EntrustOutBill_SimpleMode = ClsPub.isStrNull(DsSub.Tables[0].Rows[i]["HValue"]); } + //委外领料单 校验 + if (ClsPub.isStrNull(DsSub.Tables[0].Rows[i]["HKey"]) == "Kf_EntrustOutBillCheck_MustQtyCtl") + { + omodel.Kf_EntrustOutBillCheck_MustQtyCtl = ClsPub.isStrNull(DsSub.Tables[0].Rows[i]["HValue"]); + } + if (ClsPub.isStrNull(DsSub.Tables[0].Rows[i]["HKey"]) == "Kf_EntrustOutBillCheck_WHSPCtl") + { + omodel.Kf_EntrustOutBillCheck_WHSPCtl = ClsPub.isStrNull(DsSub.Tables[0].Rows[i]["HValue"]); + } + if (ClsPub.isStrNull(DsSub.Tables[0].Rows[i]["HKey"]) == "Kf_EntrustOutBillCheck_MultilineCtl") + { + omodel.Kf_EntrustOutBillCheck_MultilineCtl = ClsPub.isStrNull(DsSub.Tables[0].Rows[i]["HValue"]); + } //生产补料单 if (ClsPub.isStrNull(DsSub.Tables[0].Rows[i]["HKey"]) == "Kf_MateReplenishOutBill_AutoCheck") @@ -633,6 +646,57 @@ if (ClsPub.isStrNull(DsSub.Tables[0].Rows[i]["HKey"]) == "Kf_MateReplenishOutBillCheck_MultilineCtl") { omodel.Kf_MateReplenishOutBillCheck_MultilineCtl = ClsPub.isStrNull(DsSub.Tables[0].Rows[i]["HValue"]); + } + + //委外补料单 + if (ClsPub.isStrNull(DsSub.Tables[0].Rows[i]["HKey"]) == "Kf_EntrustReplenishOutBill_AutoCheck") + { + omodel.Kf_EntrustReplenishOutBill_AutoCheck = ClsPub.isStrNull(DsSub.Tables[0].Rows[i]["HValue"]); + } + if (ClsPub.isStrNull(DsSub.Tables[0].Rows[i]["HKey"]) == "Kf_EntrustReplenishOutBill_ERPMode") + { + omodel.Kf_EntrustReplenishOutBill_ERPMode = ClsPub.isStrNull(DsSub.Tables[0].Rows[i]["HValue"]); + } + if (ClsPub.isStrNull(DsSub.Tables[0].Rows[i]["HKey"]) == "Kf_EntrustReplenishOutBill_MustQtyCtl") + { + omodel.Kf_EntrustReplenishOutBill_MustQtyCtl = ClsPub.isStrNull(DsSub.Tables[0].Rows[i]["HValue"]); + } + if (ClsPub.isStrNull(DsSub.Tables[0].Rows[i]["HKey"]) == "Kf_EntrustReplenishOutBill_MulSourceBill") + { + omodel.Kf_EntrustReplenishOutBill_MulSourceBill = ClsPub.isStrNull(DsSub.Tables[0].Rows[i]["HValue"]); + } + if (ClsPub.isStrNull(DsSub.Tables[0].Rows[i]["HKey"]) == "Kf_EntrustReplenishOutBill_BillTypeOneScan") + { + omodel.Kf_EntrustReplenishOutBill_BillTypeOneScan = ClsPub.isStrNull(DsSub.Tables[0].Rows[i]["HValue"]); + } + if (ClsPub.isStrNull(DsSub.Tables[0].Rows[i]["HKey"]) == "Kf_EntrustReplenishOutBill_BatchNoCtl") + { + omodel.Kf_EntrustReplenishOutBill_BatchNoCtl = ClsPub.isStrNull(DsSub.Tables[0].Rows[i]["HValue"]); + } + if (ClsPub.isStrNull(DsSub.Tables[0].Rows[i]["HKey"]) == "Kf_EntrustReplenishOutBill_MultilineCtl") + { + omodel.Kf_EntrustReplenishOutBill_MultilineCtl = ClsPub.isStrNull(DsSub.Tables[0].Rows[i]["HValue"]); + } + if (ClsPub.isStrNull(DsSub.Tables[0].Rows[i]["HKey"]) == "Kf_EntrustReplenishOutBill_MaterWHSPCtl") + { + omodel.Kf_EntrustReplenishOutBill_MaterWHSPCtl = ClsPub.isStrNull(DsSub.Tables[0].Rows[i]["HValue"]); + } + if (ClsPub.isStrNull(DsSub.Tables[0].Rows[i]["HKey"]) == "Kf_EntrustReplenishOutBill_SourceWHSPCtl") + { + omodel.Kf_EntrustReplenishOutBill_SourceWHSPCtl = ClsPub.isStrNull(DsSub.Tables[0].Rows[i]["HValue"]); + } + //委外补料单 校验 + if (ClsPub.isStrNull(DsSub.Tables[0].Rows[i]["HKey"]) == "Kf_EntrustReplenishOutBillCheck_MustQtyCtl") + { + omodel.Kf_EntrustReplenishOutBillCheck_MustQtyCtl = ClsPub.isStrNull(DsSub.Tables[0].Rows[i]["HValue"]); + } + if (ClsPub.isStrNull(DsSub.Tables[0].Rows[i]["HKey"]) == "Kf_EntrustReplenishOutBillCheck_WHSPCtl") + { + omodel.Kf_EntrustReplenishOutBillCheck_WHSPCtl = ClsPub.isStrNull(DsSub.Tables[0].Rows[i]["HValue"]); + } + if (ClsPub.isStrNull(DsSub.Tables[0].Rows[i]["HKey"]) == "Kf_EntrustReplenishOutBillCheck_MultilineCtl") + { + omodel.Kf_EntrustReplenishOutBillCheck_MultilineCtl = ClsPub.isStrNull(DsSub.Tables[0].Rows[i]["HValue"]); } //直接调拨单 @@ -1931,6 +1995,19 @@ { omodel.Kf_EntrustOutBill_SimpleMode = ClsPub.isStrNull(DsSub.Tables[0].Rows[i]["HValue"]); } + //委外领料单 校验 + if (ClsPub.isStrNull(DsSub.Tables[0].Rows[i]["HKey"]) == "Kf_EntrustOutBillCheck_MustQtyCtl") + { + omodel.Kf_EntrustOutBillCheck_MustQtyCtl = ClsPub.isStrNull(DsSub.Tables[0].Rows[i]["HValue"]); + } + if (ClsPub.isStrNull(DsSub.Tables[0].Rows[i]["HKey"]) == "Kf_EntrustOutBillCheck_WHSPCtl") + { + omodel.Kf_EntrustOutBillCheck_WHSPCtl = ClsPub.isStrNull(DsSub.Tables[0].Rows[i]["HValue"]); + } + if (ClsPub.isStrNull(DsSub.Tables[0].Rows[i]["HKey"]) == "Kf_EntrustOutBillCheck_MultilineCtl") + { + omodel.Kf_EntrustOutBillCheck_MultilineCtl = ClsPub.isStrNull(DsSub.Tables[0].Rows[i]["HValue"]); + } //生产补料单 if (ClsPub.isStrNull(DsSub.Tables[0].Rows[i]["HKey"]) == "Kf_MateReplenishOutBill_AutoCheck") @@ -1983,6 +2060,57 @@ omodel.Kf_MateReplenishOutBillCheck_MultilineCtl = ClsPub.isStrNull(DsSub.Tables[0].Rows[i]["HValue"]); } + //委外补料单 + if (ClsPub.isStrNull(DsSub.Tables[0].Rows[i]["HKey"]) == "Kf_EntrustReplenishOutBill_AutoCheck") + { + omodel.Kf_EntrustReplenishOutBill_AutoCheck = ClsPub.isStrNull(DsSub.Tables[0].Rows[i]["HValue"]); + } + if (ClsPub.isStrNull(DsSub.Tables[0].Rows[i]["HKey"]) == "Kf_EntrustReplenishOutBill_ERPMode") + { + omodel.Kf_EntrustReplenishOutBill_ERPMode = ClsPub.isStrNull(DsSub.Tables[0].Rows[i]["HValue"]); + } + if (ClsPub.isStrNull(DsSub.Tables[0].Rows[i]["HKey"]) == "Kf_EntrustReplenishOutBill_MustQtyCtl") + { + omodel.Kf_EntrustReplenishOutBill_MustQtyCtl = ClsPub.isStrNull(DsSub.Tables[0].Rows[i]["HValue"]); + } + if (ClsPub.isStrNull(DsSub.Tables[0].Rows[i]["HKey"]) == "Kf_EntrustReplenishOutBill_MulSourceBill") + { + omodel.Kf_EntrustReplenishOutBill_MulSourceBill = ClsPub.isStrNull(DsSub.Tables[0].Rows[i]["HValue"]); + } + if (ClsPub.isStrNull(DsSub.Tables[0].Rows[i]["HKey"]) == "Kf_EntrustReplenishOutBill_BillTypeOneScan") + { + omodel.Kf_EntrustReplenishOutBill_BillTypeOneScan = ClsPub.isStrNull(DsSub.Tables[0].Rows[i]["HValue"]); + } + if (ClsPub.isStrNull(DsSub.Tables[0].Rows[i]["HKey"]) == "Kf_EntrustReplenishOutBill_BatchNoCtl") + { + omodel.Kf_EntrustReplenishOutBill_BatchNoCtl = ClsPub.isStrNull(DsSub.Tables[0].Rows[i]["HValue"]); + } + if (ClsPub.isStrNull(DsSub.Tables[0].Rows[i]["HKey"]) == "Kf_EntrustReplenishOutBill_MultilineCtl") + { + omodel.Kf_EntrustReplenishOutBill_MultilineCtl = ClsPub.isStrNull(DsSub.Tables[0].Rows[i]["HValue"]); + } + if (ClsPub.isStrNull(DsSub.Tables[0].Rows[i]["HKey"]) == "Kf_EntrustReplenishOutBill_MaterWHSPCtl") + { + omodel.Kf_EntrustReplenishOutBill_MaterWHSPCtl = ClsPub.isStrNull(DsSub.Tables[0].Rows[i]["HValue"]); + } + if (ClsPub.isStrNull(DsSub.Tables[0].Rows[i]["HKey"]) == "Kf_EntrustReplenishOutBill_SourceWHSPCtl") + { + omodel.Kf_EntrustReplenishOutBill_SourceWHSPCtl = ClsPub.isStrNull(DsSub.Tables[0].Rows[i]["HValue"]); + } + //委外补料单 校验 + if (ClsPub.isStrNull(DsSub.Tables[0].Rows[i]["HKey"]) == "Kf_EntrustReplenishOutBillCheck_MustQtyCtl") + { + omodel.Kf_EntrustReplenishOutBillCheck_MustQtyCtl = ClsPub.isStrNull(DsSub.Tables[0].Rows[i]["HValue"]); + } + if (ClsPub.isStrNull(DsSub.Tables[0].Rows[i]["HKey"]) == "Kf_EntrustReplenishOutBillCheck_WHSPCtl") + { + omodel.Kf_EntrustReplenishOutBillCheck_WHSPCtl = ClsPub.isStrNull(DsSub.Tables[0].Rows[i]["HValue"]); + } + if (ClsPub.isStrNull(DsSub.Tables[0].Rows[i]["HKey"]) == "Kf_EntrustReplenishOutBillCheck_MultilineCtl") + { + omodel.Kf_EntrustReplenishOutBillCheck_MultilineCtl = ClsPub.isStrNull(DsSub.Tables[0].Rows[i]["HValue"]); + } + //直接调拨单 if (ClsPub.isStrNull(DsSub.Tables[0].Rows[i]["HKey"]) == "Kf_MoveStockBill_AutoCheck") { diff --git a/Pub_Class/CustomerCls/ClsXt_SystemParameterMain.cs b/Pub_Class/CustomerCls/ClsXt_SystemParameterMain.cs index 1bc7ac6..a48fe1b 100644 --- a/Pub_Class/CustomerCls/ClsXt_SystemParameterMain.cs +++ b/Pub_Class/CustomerCls/ClsXt_SystemParameterMain.cs @@ -150,6 +150,10 @@ public string Kf_EntrustOutBill_FIFOList; //先进先出下架清单 public string Kf_EntrustOutBill_FIFOCtl; //先进先出控制 public string Kf_EntrustOutBill_SimpleMode; //简洁模式(不显示源单列表,只显示扫码记录,但后台仍控制) + //委外领料 校验 + public string Kf_EntrustOutBillCheck_MustQtyCtl; //校验数量控制 + public string Kf_EntrustOutBillCheck_WHSPCtl; //校验-是否校对仓库仓位 + public string Kf_EntrustOutBillCheck_MultilineCtl; //校验-多行相同物料自动拆分换行匹配 //生产补料 public string Kf_MateReplenishOutBill_AutoCheck; //是否自动审核 @@ -166,6 +170,21 @@ public string Kf_MateReplenishOutBillCheck_WHSPCtl; //校验-是否校对仓库仓位 public string Kf_MateReplenishOutBillCheck_MultilineCtl; //校验-多行相同物料自动拆分换行匹配 + //委外补料 + public string Kf_EntrustReplenishOutBill_AutoCheck; //是否自动审核 + public string Kf_EntrustReplenishOutBill_ERPMode; //WMS系统同步至ERP的类型(WISE、CLOUD) + public string Kf_EntrustReplenishOutBill_MustQtyCtl; //应收数量控制(小于等于应收、完全等于应收、不控制) + public string Kf_EntrustReplenishOutBill_MulSourceBill; //多源单模式 + public string Kf_EntrustReplenishOutBill_BillTypeOneScan; //本单据类型内只允许一次扫码(唯一码,含缓存列表) + public string Kf_EntrustReplenishOutBill_BatchNoCtl; //是否进行批号核对('Y'为核对批号) + public string Kf_EntrustReplenishOutBill_MultilineCtl; //是否存在多行相同物料时自动拆分换行('Y'为自动拆分) + public string Kf_EntrustReplenishOutBill_MaterWHSPCtl; //是否取物料默认仓库仓位('Y'为是) + public string Kf_EntrustReplenishOutBill_SourceWHSPCtl; //是否取源单中仓库仓位('Y'为是) + //委外补料 校验 + public string Kf_EntrustReplenishOutBillCheck_MustQtyCtl; //校验数量控制 + public string Kf_EntrustReplenishOutBillCheck_WHSPCtl; //校验-是否校对仓库仓位 + public string Kf_EntrustReplenishOutBillCheck_MultilineCtl; //校验-多行相同物料自动拆分换行匹配 + //直接调拨 public string Kf_MoveStockBill_AutoCheck; //是否自动审核 public string Kf_MoveStockBill_ERPMode; //WMS系统同步至ERP的类型(WISE、CLOUD) diff --git a/WebAPI/Controllers/BaseSet/Gy_MaterialController.cs b/WebAPI/Controllers/BaseSet/Gy_MaterialController.cs index 34cbc3e..e23fc22 100644 --- a/WebAPI/Controllers/BaseSet/Gy_MaterialController.cs +++ b/WebAPI/Controllers/BaseSet/Gy_MaterialController.cs @@ -483,22 +483,11 @@ ds = oCN.RunProcReturn(sql, "h_v_Gy_MouldFileList"); } - //if (ds.Tables[0].Rows.Count != 0 || ds != null) - //{ objJsonResult.code = "1"; objJsonResult.count = 1; objJsonResult.Message = "Sucess锛�"; objJsonResult.data = ds.Tables[0]; return objJsonResult; - //} - //else - //{ - //objJsonResult.code = "0"; - //objJsonResult.count = 0; - //objJsonResult.Message = "鏃犳暟鎹�"; - //objJsonResult.data = null; - //return objJsonResult; - //} } catch (Exception e) { @@ -918,7 +907,7 @@ Double HProdQty = mainList[0].HProdQty; Double HProdWeight = mainList[0].HProdWeight; string HRemark = mainList[0].HRemark; - string HMaker = mainList[0].HMaker; + string HUpDater = mainList[0].HUpDater; string HMaterNumber = mainList[0].HMaterNumber; string HSupNumber = mainList[0].HSupNumber; long HPrintQty = mainList[0].HPrintQty; @@ -939,7 +928,7 @@ ",HYear='" + HYear.ToString() + "'" + ",HPeriod='" + HPeriod.ToString() + "'" + ",HRemark='" + HRemark + "'" + - ",HUpDater='" + HMaker + "'" + + ",HUpDater='" + HUpDater + "'" + ",HUpDateDate=getdate()" + //======================================== ",HMouldNo='" + HMouldNo + "'" + @@ -980,7 +969,7 @@ ",HNowSupID=" + HNowSupID.ToString() + ",HNowSupTypeID=" + HNowSupTypeID.ToString() + ",HProdWeight=" + HProdWeight.ToString() + - ",HBarCode=" + HBarCode.ToString() + + ",HBarCode='" + HBarCode.ToString() + "'" + " where HInterID=" + HInterID.ToString()); //淇敼瀛愰」鐩唬鐮� diff --git a/WebAPI/Controllers/MJGL/Sc_MouldMaintainRuleBillController.cs b/WebAPI/Controllers/MJGL/Sc_MouldMaintainRuleBillController.cs index 3e51d5e..45858ae 100644 --- a/WebAPI/Controllers/MJGL/Sc_MouldMaintainRuleBillController.cs +++ b/WebAPI/Controllers/MJGL/Sc_MouldMaintainRuleBillController.cs @@ -192,11 +192,11 @@ } SQLHelper.ClsCN oCN = new SQLHelper.ClsCN(); //鑾峰彇淇濆吇椤圭洰缂栬緫鏁版嵁 - string sql = "select 淇濆吇椤圭洰ID,淇濆吇椤圭洰,淇濆吇閮ㄤ綅,鍏蜂綋瑕佹眰,璐熻矗浜篒D,璐熻矗浜轰唬鐮�,璐熻矗浜哄悕绉�,瀛愬娉�2 from h_v_Sc_MouldMaintainRuleBillList where 1 = 1 " + Swhere + ""; - ds = oCN.RunProcReturn(sql, "h_v_Sc_MouldMaintainRuleBillList"); + string sql = "select 淇濆吇椤圭洰ID,淇濆吇椤圭洰浠g爜,淇濆吇椤圭洰,淇濆吇閮ㄤ綅,鍏蜂綋瑕佹眰,璐熻矗浜篒D,璐熻矗浜轰唬鐮�,璐熻矗浜哄悕绉�,瀛愬娉�2 from h_v_Sc_MouldMaintainRuleBillSub_Item where 1 = 1 " + Swhere + ""; + ds = oCN.RunProcReturn(sql, "h_v_Sc_MouldMaintainRuleBillSub_Item"); //鑾峰彇閰嶄欢椤圭洰缂栬緫鏁版嵁 - string sql1 = "select 閰嶄欢ID,閰嶄欢浠g爜,閰嶄欢鍚嶇О,鍗曚綅ID,璁¢噺鍗曚綅浠g爜,璁¢噺鍗曚綅鍚嶇О,鐢ㄩ噺,鏍囧噯鐢ㄩ噺,瀛愬娉�1 from h_v_Sc_MouldMaintainRuleBillList where 1 = 1 " + Swhere + ""; - ds1 = oCN.RunProcReturn(sql1, "h_v_Sc_MouldMaintainRuleBillList"); + string sql1 = "select 閰嶄欢ID,閰嶄欢浠g爜,閰嶄欢鍚嶇О,鍗曚綅ID,璁¢噺鍗曚綅浠g爜,璁¢噺鍗曚綅鍚嶇О,鐢ㄩ噺,鏍囧噯鐢ㄩ噺,瀛愬娉�1 from h_v_Sc_MouldMaintainRuleBillSub where 1 = 1 " + Swhere + ""; + ds1 = oCN.RunProcReturn(sql1, "h_v_Sc_MouldMaintainRuleBillSub"); list.Add(ds.Tables[0]); list.Add(ds1.Tables[0]); @@ -252,11 +252,11 @@ } SQLHelper.ClsCN oCN = new SQLHelper.ClsCN(); //鑾峰彇淇濆吇椤圭洰缂栬緫鏁版嵁 - string sql = "select 淇濆吇椤圭洰ID HMaintainItemID,淇濆吇椤圭洰浠g爜 HMaintainItemNumber,淇濆吇椤圭洰 HMaintainItem,淇濆吇閮ㄤ綅 HMaintainPart,鍏蜂綋瑕佹眰 HClaim,璐熻矗浜篒D HManagerID,璐熻矗浜轰唬鐮� HManagerNumber,璐熻矗浜哄悕绉� HManagerName,瀛愬娉�2 HRemark from h_v_Sc_MouldMaintainRuleBillList where 1 = 1 " + Swhere + ""; - ds = oCN.RunProcReturn(sql, "h_v_Sc_MouldMaintainRuleBillList"); + string sql = "select 淇濆吇椤圭洰ID HMaintainItemID,淇濆吇椤圭洰浠g爜 HMaintainItemNumber,淇濆吇椤圭洰 HMaintainItem,淇濆吇閮ㄤ綅 HMaintainPart,鍏蜂綋瑕佹眰 HClaim,璐熻矗浜篒D HManagerID,璐熻矗浜轰唬鐮� HManagerNumber,璐熻矗浜哄悕绉� HManagerName,瀛愬娉�2 HRemark from h_v_Sc_MouldMaintainRuleBillSub_Item where 1 = 1 " + Swhere + ""; + ds = oCN.RunProcReturn(sql, "h_v_Sc_MouldMaintainRuleBillSub_Item"); //鑾峰彇閰嶄欢椤圭洰缂栬緫鏁版嵁 - string sql1 = "select 閰嶄欢ID HMaterID,閰嶄欢浠g爜 HMaterNumber,閰嶄欢鍚嶇О HMaterName,鍗曚綅ID HUnitID,璁¢噺鍗曚綅浠g爜 HUnitNumber,璁¢噺鍗曚綅鍚嶇О HUnitName,鐢ㄩ噺 HQty,瀛愬娉�1 HRemark from h_v_Sc_MouldMaintainRuleBillList where 1 = 1 " + Swhere + ""; - ds1 = oCN.RunProcReturn(sql1, "h_v_Sc_MouldMaintainRuleBillList"); + string sql1 = "select 閰嶄欢ID HMaterID,閰嶄欢浠g爜 HMaterNumber,閰嶄欢鍚嶇О HMaterName,鍗曚綅ID HUnitID,璁¢噺鍗曚綅浠g爜 HUnitNumber,璁¢噺鍗曚綅鍚嶇О HUnitName,鐢ㄩ噺 HQty,瀛愬娉�1 HRemark from h_v_Sc_MouldMaintainRuleBillSub where 1 = 1 " + Swhere + ""; + ds1 = oCN.RunProcReturn(sql1, "h_v_Sc_MouldMaintainRuleBillSub"); list.Add(ds.Tables[0]); list.Add(ds1.Tables[0]); diff --git a/WebAPI/Controllers/Sc_MouldRepairInBillListController.cs b/WebAPI/Controllers/Sc_MouldRepairInBillListController.cs index ad6be8f..2d63c29 100644 --- a/WebAPI/Controllers/Sc_MouldRepairInBillListController.cs +++ b/WebAPI/Controllers/Sc_MouldRepairInBillListController.cs @@ -2505,6 +2505,7 @@ string msg2 = sArray[0].ToString(); string msg3 = sArray[1].ToString(); string msg4 = sArray[2].ToString(); + string msg5 = sArray[3].ToString(); string UserName = ""; @@ -2558,6 +2559,34 @@ } oBill.omodel = oItem; } + + //淇濆吇椤硅〃浣撴暟鎹� + //鎸� },{鏉ユ媶鍒嗘暟缁� //鍘绘帀銆愬拰銆� + msg5 = msg5.Substring(1, msg5.Length - 2); + msg5 = msg5.Replace("\\", ""); + msg5 = msg5.Replace("\n", ""); //\n + //msg2 = msg2.Replace("'", "鈥�"); + List<Model.ClsSc_MouldMaintainPlanBillSub_Item> ls1 = new List<Model.ClsSc_MouldMaintainPlanBillSub_Item>(); + ls1 = oListModels.getObjectByJson_Gy_MouldMaintainPlanBillSub_Item(msg5); + int j = 0; + foreach (Model.ClsSc_MouldMaintainPlanBillSub_Item item in ls1) + { + + j++; + item.HEntryID = j; + //oItemSub.HCloseMan = ""; //琛屽叧闂� + item.HEntryCloseDate = DBUtility.ClsPub.isDate(DateTime.Now); + item.HCloseType = false; //鍏抽棴绫诲瀷 + //oItemSub.HRemark = ""; //澶囨敞 + item.HSourceInterID = 0; // 婧愬崟涓诲唴鐮� + item.HSourceEntryID = 0; //婧愬崟瀛愬唴鐮� + //oItemSub.HSourceBillNo = ""; //婧愬崟鍗曞彿 + //oItemSub.HSourceBillType = ""; //婧愬崟绫诲瀷 + item.HRelationQty = 0; //鍏宠仈鏁伴噺 + oBill.DetailCol.Add(item); + + } + //琛ㄤ綋鏁版嵁 //鎸� },{鏉ユ媶鍒嗘暟缁� //鍘绘帀銆愬拰銆� msg3 = msg3.Substring(1, msg3.Length - 2); @@ -2653,28 +2682,28 @@ [HttpGet] public object Sc_MouldMaintainPlanBillListProjectDetai(string sqlWhere) { - DataSet ds; + DataSet ds, ds1; + List<object> list = new List<object>(); + try { SQLHelper.ClsCN oCN = new SQLHelper.ClsCN(); - if (sqlWhere == null || sqlWhere.Equals("")) - { - ds = oCN.RunProcReturn("select a.HMaterID,m.HNumber HMaterNumber,m.HName HMaterName,a.HUnitID,u.HNumber HUnitNumber,u.HName HUnitName,a.HQty,a.HQtyMust,a.HRemark from Sc_MouldMaintainPlanBillSub a left join Gy_Unit u on a.HUnitID=u.HItemID left join h_v_IF_Material m on a.HMaterID=m.HItemID", "Sc_MouldMaintainPlanBillSub"); - objJsonResult.code = "0"; - objJsonResult.count = 1; - objJsonResult.Message = "鑾峰彇淇℃伅鎴愬姛锛�"; - objJsonResult.data = ds.Tables[0]; - } - else - { - string sql1 = "select a.HMaterID,m.HNumber HMaterNumber,m.HName HMaterName,a.HUnitID,u.HNumber HUnitNumber,u.HName HUnitName,a.HQty,a.HQtyMust,a.HRemark from Sc_MouldMaintainPlanBillSub a left join Gy_Unit u on a.HUnitID=u.HItemID left join h_v_IF_Material m on a.HMaterID=m.HItemID where 1 = 1 "; - string sql = sql1 + sqlWhere; - ds = oCN.RunProcReturn(sql, "Sc_MouldMaintainPlanBillSub"); - objJsonResult.code = "0"; - objJsonResult.count = 1; - objJsonResult.Message = "鑾峰彇淇℃伅鎴愬姛锛�"; - objJsonResult.data = ds.Tables[0]; - } + //鑾峰彇淇濆吇椤圭洰缂栬緫鏁版嵁 + string sql = "select 淇濆吇椤圭洰ID HMaintainItemID, 淇濆吇椤圭洰浠g爜 HMaintainItemNumber,淇濆吇椤圭洰 HMaintainItem,淇濆吇閮ㄤ綅 HMaintainPart,鍏蜂綋瑕佹眰 HClaim,璐熻矗浜篒D,璐熻矗浜轰唬鐮� HManagerNumber,璐熻矗浜哄悕绉� HManagerName,瀛愬娉�2 HRemark from h_v_Sc_MouldMaintainPlanBillSub_Item where 1 = 1 " + sqlWhere + ""; + + ds = oCN.RunProcReturn(sql, "h_v_Sc_MouldMaintainPlanBillSub_Item"); + //鑾峰彇閰嶄欢椤圭洰缂栬緫鏁版嵁 + string sql1 = "select 閰嶄欢ID HMaterID, 閰嶄欢浠g爜 HMaterNumber,閰嶄欢鍚嶇О HMaterName,鍗曚綅ID HUnitID,璁¢噺鍗曚綅浠g爜 HUnitNumber,璁¢噺鍗曚綅鍚嶇О HUnitName,鐢ㄩ噺 HQty,鏍囧噯鐢ㄩ噺 HQtyMust,瀛愬娉�1 HRemark from h_v_Sc_MouldMaintainPlanBillSub where 1 = 1 " + sqlWhere + ""; + ds1 = oCN.RunProcReturn(sql1, "h_v_Sc_MouldMaintainPlanBillSub"); + + list.Add(ds.Tables[0]); + list.Add(ds1.Tables[0]); + + objJsonResult.code = "0"; + objJsonResult.count = 1; + objJsonResult.Message = "鑾峰彇淇℃伅鎴愬姛锛�"; + objJsonResult.data = null; + objJsonResult.list = list; } catch (Exception e) { diff --git "a/WebAPI/Controllers/\345\237\272\347\241\200\350\265\204\346\226\231/\345\237\272\347\241\200\350\265\204\346\226\231/Gy_StockCheckItemBillController.cs" "b/WebAPI/Controllers/\345\237\272\347\241\200\350\265\204\346\226\231/\345\237\272\347\241\200\350\265\204\346\226\231/Gy_StockCheckItemBillController.cs" index 84248b3..239bcc1 100644 --- "a/WebAPI/Controllers/\345\237\272\347\241\200\350\265\204\346\226\231/\345\237\272\347\241\200\350\265\204\346\226\231/Gy_StockCheckItemBillController.cs" +++ "b/WebAPI/Controllers/\345\237\272\347\241\200\350\265\204\346\226\231/\345\237\272\347\241\200\350\265\204\346\226\231/Gy_StockCheckItemBillController.cs" @@ -336,20 +336,29 @@ //鍒ゆ柇鏄惁閫夋嫨鐩樼偣鏂规锛屾槸=>锛堢敤鐩樼偣鏂规瀛愯〃鍋氬姣旓級锛屽惁=>锛堢敤鍣ㄥ叿妗f鍋氬姣旓級 if (sID == null || sID == "") { - if (sWhere == "pk") - { - sql = string.Format(@"select * from h_v_Sc_MouldInventoryAnalysisPK"); - } - else - { - sql = string.Format($"exec h_p_Sc_MouldInventoryAnalysisList2 '{sWhere}'"); - } + //if (sWhere == "pk") + //{ + // sql = string.Format(@"select * from h_v_Sc_MouldInventoryAnalysisPK"); + //} + //else + //{ + // sql = string.Format($"exec h_p_Sc_MouldInventoryAnalysisList2 '{sWhere}'"); + //} + objJsonResult.code = "0"; + objJsonResult.count = 0; + objJsonResult.Message = "璇烽�夋嫨鐩樼偣鏂规!"; + objJsonResult.data = null; + return objJsonResult; } else { if (sWhere == "pk") { sql = string.Format($"exec h_p_Sc_MouldInventoryAnalysisPK '{sID}'"); + } + else if (sWhere == "py") + { + sql = string.Format($"exec h_p_Sc_MouldInventoryAnalysisPY '{sID}'"); } else { @@ -469,7 +478,7 @@ string[] sArray = msg1.Split(new string[] { ";" }, StringSplitOptions.RemoveEmptyEntries); string msg2 = sArray[0].ToString();//琛ㄦ牸鏁版嵁 string user = sArray[1].ToString();//user - string userID = sArray[2].ToString();//userID + string HOrgID = sArray[2].ToString();//HOrgID string sName = sArray[3].ToString();//鐩樼偣鏂规 //鏌ヨ鐩樼偣鏂规鍒涘缓鏃ユ湡 DataSet dd = oCn.RunProcReturn("select * from Gy_StockCheckItem where HName='" + sName+"'", "Gy_StockCheckItem"); @@ -513,7 +522,7 @@ HStockOrgID,HOWNERID,HOtherOrgID,HOWNERTYPEID) values(" + HInterID + ",1,'',getdate(),0,'" + sName.ToString() + "',0,0,'',''," + "0,0," + dr["HInterID"].ToString() + ",0," + dr["HSecUnitRate"].ToString() + ",0," + dr["HUnitID"].ToString() + ",0," + dr["HProdQty"].ToString() + "," + dr1["HQty"].ToString() + ",0," + "0," + dr["HDesignLife"].ToString() + "," + dr["HLeaveLife"].ToString() + "," + dr["HUseLife"].ToString() + "," + dr1["HCorrespondentID"].ToString() + "," + dr["HNowSupID"].ToString() + ",0,0" - + ",0,0,0," + userID + ",0,100005,'')"); + + ",0,0,0," + HOrgID + ",0,100005,'')"); //涓昏〃 oCn.BeginTran(); @@ -558,7 +567,7 @@ string[] sArray = msg1.Split(new string[] { ";" }, StringSplitOptions.RemoveEmptyEntries); string msg2 = sArray[0].ToString();//琛ㄦ牸鏁版嵁 string user = sArray[1].ToString();//user - string userID = sArray[2].ToString();//userID + string HOrgID = sArray[2].ToString();//HOrgID string sName = sArray[3].ToString();//鐩樼偣鏂规 //鏌ヨ鐩樼偣鏂规鍒涘缓鏃ユ湡 DataSet dd = oCn.RunProcReturn("select * from Gy_StockCheckItem where HName='" + sName + "'", "Gy_StockCheckItem"); @@ -582,19 +591,32 @@ ds1 = oCn.RunProcReturn("select top 1 * from Sc_MouldStockBillMain_Temp where HBarCode='" + HBarCode + "' and HItemID='" + HItemID + "'", "Sc_MouldStockBillMain_Temp"); DataRow dr = ds.Tables[0].Rows[0]; DataRow dr1 = ds1.Tables[0].Rows[0]; - HInterID = DBUtility.ClsPub.CreateBillID("3827", ref DBUtility.ClsPub.sExeReturnInfo); - HBillNo = DBUtility.ClsPub.CreateBillCode("3827", ref DBUtility.ClsPub.sExeReturnInfo, true); + string HBillType = ""; + if (item.HRealPotType == "浠撳簱" ) + { + HBillType = "3827"; + HInterID = DBUtility.ClsPub.CreateBillID("3827", ref DBUtility.ClsPub.sExeReturnInfo); + HBillNo = DBUtility.ClsPub.CreateBillCode("3827", ref DBUtility.ClsPub.sExeReturnInfo, true); + } + else if (item.HRealPotType != "浠撳簱") + { + HBillType = "3802"; + HInterID = DBUtility.ClsPub.CreateBillID("3802", ref DBUtility.ClsPub.sExeReturnInfo); + HBillNo = DBUtility.ClsPub.CreateBillCode("3802", ref DBUtility.ClsPub.sExeReturnInfo, true); + } + string sql = "Insert Into Sc_MouldStockBillMain " + "(HBillType,HBillSubType,HInterID,HBillNo,HDate" + ",HMaker,HMakeDate,HRemark" + ",HSupID,HSupTypeID,HWHID,HSCWHID,HEmpID,HManagerID,HSecManagerID" + ",HKeeperID,HDeptID,HInnerBillNo,HRedBlueFlag" + ") " + - " values('3827','3827'," + HInterID + ",'" + HBillNo + "','" + HDate + "'" + - ", '" + user + "','" +HDate + "','" + sName + "'" + + " values('"+ HBillType + "','" + HBillType + "'," + HInterID + ",'" + HBillNo + "','" + HDate + "'" + + ", '" + user + "','" + HDate + "','" + sName + "'" + ", " + dr1["HCorrespondentID"].ToString() + "," + dr1["HCorrespondentTypeID"].ToString() + ",isnull('" + dr["HNowSupID"].ToString() + "',0),0,0,0,0" + ", 0," + dr["HDeptID"].ToString() + ",'',0" + ") "; + string sql1 = string.Format(@"Insert Into Sc_MouldStockBillSub (HInterID,HEntryID,HCloseMan,HEntryCloseDate,HCloseType,HRemark,HSourceInterID, HSourceEntryID,HSourceBillNo,HSourceBillType,HRelationQty,HRelationMoney,HMaterID,HPropertyID,HSecUnitRate,HSecUnitID,HUnitID, @@ -602,7 +624,7 @@ HStockOrgID,HOWNERID,HOtherOrgID,HOWNERTYPEID) values(" + HInterID + ",1,'',getdate(),0,'" + sName.ToString() + "',0,0,'',''," + "0,0," + dr["HInterID"].ToString() + ",0," + dr["HSecUnitRate"].ToString() + ",0," + dr["HUnitID"].ToString() + ",0," + dr["HProdQty"].ToString() + "," + dr1["HQty"].ToString() + ",0," + "0," + dr["HDesignLife"].ToString() + "," + dr["HLeaveLife"].ToString() + "," + dr["HUseLife"].ToString() + "," + dr1["HCorrespondentID"].ToString() + "," + dr["HNowSupID"].ToString() + ",0,0" - + ",0,0,0," + userID + ",0,100005,'')"); + + ",0,0,0," + HOrgID + ",0,100005,'')"); //涓昏〃 oCn.BeginTran(); @@ -648,7 +670,7 @@ string[] sArray = msg1.Split(new string[] { ";" }, StringSplitOptions.RemoveEmptyEntries); string msg2 = sArray[0].ToString();//琛ㄦ牸鏁版嵁 string user = sArray[1].ToString();//user - string userID = sArray[2].ToString();//userID + string HOrgID = sArray[2].ToString();//HOrgID string sName = sArray[3].ToString();//鐩樼偣鏂规 //鏌ヨ鐩樼偣鏂规鍒涘缓鏃ユ湡 DataSet dd = oCn.RunProcReturn("select * from Gy_StockCheckItem where HName='" + sName+"'", "Gy_StockCheckItem"); @@ -692,7 +714,7 @@ HStockOrgID,HOWNERID,HOtherOrgID,HOWNERTYPEID) values(" + HInterID + ",1,'',getdate(),0,'" + sName.ToString() + "',0,0,'',''," + "0,0," + dr["HInterID"].ToString() + ",0," + dr["HSecUnitRate"].ToString() + ",0," + dr["HUnitID"].ToString() + ",0," + dr["HProdQty"].ToString() + ",0,0," + "0," + dr["HDesignLife"].ToString() + "," + dr["HLeaveLife"].ToString() + "," + dr["HUseLife"].ToString() + ",0,0,0,0" - + ",0,0,0," + userID + ",0,100005,'')"); + + ",0,0,0," + HOrgID + ",0,100005,'')"); } else { @@ -715,7 +737,7 @@ HStockOrgID,HOWNERID,HOtherOrgID,HOWNERTYPEID) values(" + HInterID + ",1,'',getdate(),0,'" + sName.ToString() + "',0,0,'',''," + "0,0," + dr["HInterID"].ToString() + ",0," + dr["HSecUnitRate"].ToString() + ",0," + dr["HUnitID"].ToString() + ",0," + dr["HProdQty"].ToString() + "," + dr1["HQty"].ToString() + ",0," + "0," + dr["HDesignLife"].ToString() + "," + dr["HLeaveLife"].ToString() + "," + dr["HUseLife"].ToString() + "," + dr1["HCorrespondentID"].ToString() + "," + dr["HNowSupID"].ToString() + ",0,0" - + ",0,0,0," + userID + ",0,100005,'')"); + + ",0,0,0," + HOrgID + ",0,100005,'')"); } //涓昏〃 @@ -761,7 +783,7 @@ string[] sArray = msg1.Split(new string[] { ";" }, StringSplitOptions.RemoveEmptyEntries); string msg2 = sArray[0].ToString();//琛ㄦ牸鏁版嵁 string user = sArray[1].ToString();//user - string userID = sArray[2].ToString();//userID + string HOrgID = sArray[2].ToString();//HOrgID string sName = sArray[3].ToString();//鐩樼偣鏂规 //鏌ヨ鐩樼偣鏂规鍒涘缓鏃ユ湡 DataSet dd = oCn.RunProcReturn("select * from Gy_StockCheckItem where HName='" + sName + "'", "Gy_StockCheckItem"); @@ -804,7 +826,7 @@ HStockOrgID,HOWNERID,HOtherOrgID,HOWNERTYPEID) values(" + HInterID + ",1,'',getdate(),0,'" + sName.ToString() + "',0,0,'',''," + "0,0," + dr["HInterID"].ToString() + ",0," + dr["HSecUnitRate"].ToString() + ",0," + dr["HUnitID"].ToString() + ",0," + dr["HProdQty"].ToString() + "," + dr1["HQty"].ToString() + ",0," + "0," + dr["HDesignLife"].ToString() + "," + dr["HLeaveLife"].ToString() + "," + dr["HUseLife"].ToString() + ",'1548785'," + dr["HNowSupID"].ToString() + ",0,0" - + ",0,0,0," + userID + ",0,100005,'')"); + + ",0,0,0," + HOrgID + ",0,100005,'')"); //涓昏〃 oCn.BeginTran(); @@ -849,7 +871,7 @@ string[] sArray = msg1.Split(new string[] { ";" }, StringSplitOptions.RemoveEmptyEntries); string msg2 = sArray[0].ToString();//琛ㄦ牸鏁版嵁 string user = sArray[1].ToString();//user - string userID = sArray[2].ToString();//userID + string HOrgID = sArray[2].ToString();//HOrgID string sName = sArray[3].ToString();//鐩樼偣鏂规 //鏌ヨ鐩樼偣鏂规鍒涘缓鏃ユ湡 DataSet dd = oCn.RunProcReturn("select * from Gy_StockCheckItem where HName='" + sName + "'", "Gy_StockCheckItem"); @@ -882,9 +904,9 @@ ",HKeeperID,HDeptID,HInnerBillNo,HRedBlueFlag" + ") " + " values('3803','3803'," + HInterID + ",'" + HBillNo + "','" + HDate + "'" + - ", '" + user + "','" +HDate + "','" + sName + "'" + + ", '" + user + "','"+ HDate + "','" + sName + "'" + ", " + dr["HNowSupID"].ToString() + "," + dr["HNowSupTypeID"].ToString() + "," + dr["HNowSupID"].ToString() + ",0,0,0,0" + - ", 0," + dr["HDeptID"].ToString() + ",' ',0" + + ", 0," + dr["HDeptID"].ToString() + ",getdate(),0" + ") "; string sql1 = string.Format(@"Insert Into Sc_MouldStockBillSub (HInterID,HEntryID,HCloseMan,HEntryCloseDate,HCloseType,HRemark,HSourceInterID, HSourceEntryID,HSourceBillNo,HSourceBillType,HRelationQty,HRelationMoney,HMaterID,HPropertyID,HSecUnitRate,HSecUnitID,HUnitID, @@ -892,7 +914,7 @@ HStockOrgID,HOWNERID,HOtherOrgID,HOWNERTYPEID) values(" + HInterID + ",1,'',getdate(),0,'" + sName.ToString() + "',0,0,'',''," + "0,0," + dr["HInterID"].ToString() + ",0," + dr["HSecUnitRate"].ToString() + ",0," + dr["HUnitID"].ToString() + ",0," + dr["HProdQty"].ToString() + "," + dr1["HQty"].ToString() + ",0," + "0," + dr["HDesignLife"].ToString() + "," + dr["HLeaveLife"].ToString() + "," + dr["HUseLife"].ToString() + "," + dr1["HCorrespondentID"].ToString() + "," + dr["HNowSupID"].ToString() + ",0,0" - + ",0,0,0," + userID + ",0,100005,'')"); + + ",0,0,0," + HOrgID + ",0,100005,'')"); //涓昏〃 oCn.BeginTran(); diff --git a/WebAPI/ListModels.cs b/WebAPI/ListModels.cs index f9efcec..1c0c735 100644 --- a/WebAPI/ListModels.cs +++ b/WebAPI/ListModels.cs @@ -605,6 +605,18 @@ } /// <summary> + /// 澶勭悊鏂板妯″叿淇濆吇璁″垝鍗曞瓙琛ㄤ繚鍏讳俊鎭殑json + /// </summary> + /// <param name="jsonString"></param> + /// <returns></returns> + public List<Model.ClsSc_MouldMaintainPlanBillSub_Item> getObjectByJson_Gy_MouldMaintainPlanBillSub_Item(string jsonString) + { + jsonString = "[" + jsonString.ToString() + "]"; + List<Model.ClsSc_MouldMaintainPlanBillSub_Item> list = Newtonsoft.Json.JsonConvert.DeserializeObject<List<Model.ClsSc_MouldMaintainPlanBillSub_Item>>(jsonString); + return list; + } + + /// <summary> /// 澶勭悊鏂板涓嶈壇鍘熷洜琛ㄧ殑json /// </summary> /// <param name="jsonString"></param> -- Gitblit v1.9.1