From 6922fd630146076fd98dfb24d443762b4aed47ab Mon Sep 17 00:00:00 2001
From: duhe <226547893@qq.com>
Date: 星期四, 11 一月 2024 11:12:54 +0800
Subject: [PATCH] 1
---
WebAPI/Controllers/CJGL/Cj_SingleStationController.cs | 51 +++++-
WebAPI/Controllers/基础资料/基础资料/Xt_FastICSchemeController.cs | 157 ++++++++++++++++++++++
Model/MES/ClsSc_SourceLineRepairBillMain.cs | 1
Model/Model.csproj | 2
Model/基础资料/基础资料/ClsXt_FastICSchemeMain_Model.cs | 19 ++
DAL/基础资料/公用基础资料/ClsXt_FastICScheme_Ctl.cs | 138 +++++++++++++++++++
Model/基础资料/基础资料/ClsXt_FastICSchemeSub_Model.cs | 16 ++
WebAPI/ListModels.cs | 25 +++
DAL/质检管理/ClsQC_ProcessCheckBill.cs | 4
DAL/DAL.csproj | 1
WebAPI/WebAPI.csproj | 1
Model/质检管理/ClsQC_ProcessCheckBillMain.cs | 3
WebAPI/Controllers/品质管理/工序检验单/QC_ProcessCheckBillController.cs | 2
13 files changed, 407 insertions(+), 13 deletions(-)
diff --git a/DAL/DAL.csproj b/DAL/DAL.csproj
index ee91c8b..160c908 100644
--- a/DAL/DAL.csproj
+++ b/DAL/DAL.csproj
@@ -105,6 +105,7 @@
<Compile Include="鍩虹璧勬枡\鍏敤鍩虹璧勬枡\ClsGy_SupplierContact_Ctl.cs" />
<Compile Include="鍩虹璧勬枡\鍏敤鍩虹璧勬枡\ClsGy_StockStatus_Ctl.cs" />
<Compile Include="鍩虹璧勬枡\鍏敤鍩虹璧勬枡\ClsGy_Work_Ctl.cs" />
+ <Compile Include="鍩虹璧勬枡\鍏敤鍩虹璧勬枡\ClsXt_FastICScheme_Ctl.cs" />
<Compile Include="鍩虹璧勬枡\鍏朵粬鍩虹璧勬枡\ClsGy_MateMould_Ctl.cs" />
<Compile Include="鍩虹璧勬枡\鍏朵粬鍩虹璧勬枡\ClsGy_QCCheckProject_View.cs" />
<Compile Include="鍩虹璧勬枡\鍏朵粬鍩虹璧勬枡\ClsGy_StdWorkTimes_Ctl.cs" />
diff --git "a/DAL/\345\237\272\347\241\200\350\265\204\346\226\231/\345\205\254\347\224\250\345\237\272\347\241\200\350\265\204\346\226\231/ClsXt_FastICScheme_Ctl.cs" "b/DAL/\345\237\272\347\241\200\350\265\204\346\226\231/\345\205\254\347\224\250\345\237\272\347\241\200\350\265\204\346\226\231/ClsXt_FastICScheme_Ctl.cs"
new file mode 100644
index 0000000..158bc83
--- /dev/null
+++ "b/DAL/\345\237\272\347\241\200\350\265\204\346\226\231/\345\205\254\347\224\250\345\237\272\347\241\200\350\265\204\346\226\231/ClsXt_FastICScheme_Ctl.cs"
@@ -0,0 +1,138 @@
+锘縰sing System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Text.RegularExpressions;
+
+namespace DAL
+{
+ public class ClsXt_FastICScheme_Ctl : DBUtility.ClsXt_BaseBill
+ {
+ public Model.ClsXt_FastICSchemeMain_Model omodel = new Model.ClsXt_FastICSchemeMain_Model();
+ public List<Model.ClsXt_FastICSchemeSub_Model> DetailColl = new List<Model.ClsXt_FastICSchemeSub_Model>();
+
+ public ClsXt_FastICScheme_Ctl()
+ {
+ base.MvarItemKeySub = "Xt_FastICSchemeSub";
+ base.MvarItemKeySub2 = "";
+ base.MvarItemKeySub3 = "";
+ base.MvarItemKeySub4 = "";
+ base.MvarItemKey = "Xt_FastICSchemeMain";
+ base.MvarReportTitle = "蹇�熻繃婊ゆ柟妗�";
+ base.BillType = "3332";
+ base.HBillSubType = "3332";
+ }
+
+ #region 鍥哄畾浠g爜
+
+ #endregion 鑷畾涔夋柟娉�
+ //淇敼鍗曟嵁
+ public override bool ModifyBill(Int64 lngBillKey, ref string sReturn)
+ {
+ try
+ {
+ //
+ oCn.BeginTran();
+ //鏇存柊涓昏〃
+ //oCn.RunProc("UpDate Cg_POOrderBillMain set " +
+ //" HBillNo='" + omodel.HBillNo + "'" + //鍥哄畾璧嬪��===============
+ //",HDate='" + omodel.HDate + "'" +
+ //",HYear='" + omodel.HYear.ToString() + "'" +
+ //",HPeriod='" + omodel.HPeriod.ToString() + "'" +
+ //",HRemark='" + omodel.HRemark + "'" +
+ //",HUpDater='" + DBUtility.ClsPub.CurUserName + "'" +
+ //",HUpDateDate=getdate()" +
+ ////========================================
+ //",HSSDate='" + omodel.HSSDate + "'" +
+ //",HAddress='" + omodel.HAddress + "'" +
+ //",HSSID=" + omodel.HSSID.ToString() +
+ //",HPSStyleID=" + omodel.HPSStyleID.ToString() +
+ //",HSupID=" + omodel.HSupID.ToString() +
+ //",HCurID=" + omodel.HCurID.ToString() +
+ //",HExRate=" + omodel.HExRate.ToString() +
+ //",HEmpID=" + omodel.HEmpID.ToString() +
+ //",HManagerID=" + omodel.HManagerID.ToString() +
+ //",HDeptID=" + omodel.HDeptID.ToString() +
+ //",HExplanation='" + omodel.HExplanation + "'" +
+ //",HInnerBillNo='" + omodel.HInnerBillNo + "'" +
+ //" where HInterID=" + lngBillKey.ToString());
+ ////鍒犻櫎鍏宠仈
+ //DeleteRelation(ref sReturn, lngBillKey);
+ ////鍒犻櫎瀛愯〃
+ //DeleteBillSub(lngBillKey);
+ ////鎻掑叆瀛愯〃
+ //omodel.HInterID = lngBillKey;
+ //foreach (Model.ClsCg_POOrderBillSub oSub in DetailColl)
+ //{
+ // oCn.RunProc("Insert into Cg_POOrderBillSub " +
+ // " (HInterID,HEntryID,HCloseMan,HEntryCloseDate,HCloseType,HRemark" +
+ // ",HSourceInterID,HSourceEntryID,HSourceBillNo,HSourceBillType,HRelationQty,HRelationMoney" +
+ // ",HSeOrderInterID,HSeOrderEntryID,HSeOrderBillNo" +
+ // ",HMaterID,HUnitID,HQty,HPrice,HMoney,HTaxRate,HTaxPrice" +
+ // ",HTaxMoney,HlineTotal,HlineTotalBB,HDate,HSourceQty" +
+ // ",HDiscountRate,HRelTaxPrice,HInStockQty,HInvoiceQty" +
+ // ") values("
+ // + omodel.HInterID.ToString() + "," + oSub.HEntryID.ToString() + ",'" + oSub.HCloseMan + "','" + oSub.HEntryCloseDate.ToShortDateString() + "'," + Convert.ToString(oSub.HCloseType ? 1 : 0) + ",'" + oSub.HRemark + "'" +
+ // ",'" + oSub.HSourceInterID.ToString() + "','" + oSub.HSourceEntryID.ToString() + "','" + oSub.HSourceBillNo + "','" + oSub.HSourceBillType + "'," + oSub.HRelationQty.ToString() + "," + oSub.HRelationMoney.ToString() +
+ // ",'" + oSub.HSeOrderInterID.ToString() + "','" + oSub.HSeOrderEntryID.ToString() + "','" + oSub.HSeOrderBillNo + "'" +
+ // "," + oSub.HMaterID.ToString() + "," + oSub.HUnitID.ToString() + "," + oSub.HQty.ToString() + "," + oSub.HPrice.ToString() + "," + oSub.HMoney.ToString() + "," + oSub.HTaxRate.ToString() + "," + oSub.HTaxPrice.ToString() +
+ // "," + oSub.HTaxMoney.ToString() + "," + oSub.HlineTotal.ToString() + "," + oSub.HlineTotalBB.ToString() + ",'" + oSub.HDate.ToShortDateString() + "','" + oSub.HSourceQty + "'" +
+ // "," + oSub.HDiscountRate.ToString() + "," + oSub.HRelTaxPrice.ToString() + "," + oSub.HInStockQty.ToString() + "," + oSub.HInvoiceQty.ToString() +
+ // ") ");
+ //}
+
+ sReturn = "淇敼鍗曟嵁鎴愬姛锛�";
+ oCn.Commit();
+ return true;
+ }
+ catch (Exception e)
+ {
+ sReturn = e.Message;
+ oCn.RollBack();
+ throw (e);
+ }
+ }
+ //鏂板鍗曟嵁
+ public bool AddBill(string HFilterIdLists, string HValue, string HElement_type, ref string sReturn)
+ {
+ try
+ {
+ oCn.BeginTran();
+ //涓昏〃
+ oCn.RunProc("Insert Into Xt_FastICSchemeMain " +
+ "(HInterID,HName,HUserCode,HBillType,HBillName" +
+ ",HStopflag,HCreateDate,HUseingFlag,HRemark" +
+ ") " +
+ " values('" + omodel.HInterID.ToString() + "','" + omodel.HName + "','" + omodel.HUserCode + "'" +
+ "," + 3332 + ",'" + omodel.HBillName + "'," + omodel.HStopflag + "," + "getdate()" + "," + omodel.HUseingFlag + ",'" + omodel.HRemark +
+ "') ");
+ //鑾峰彇瀛愯〃鏁版嵁
+ string[] HFilterIdLists_arr = Regex.Split(HFilterIdLists, ",", RegexOptions.IgnoreCase);
+ string[] HValue_arr = Regex.Split(HValue, ",", RegexOptions.IgnoreCase);
+ string[] HElement_type_arr = Regex.Split(HElement_type, ",", RegexOptions.IgnoreCase);
+ //鎻掑叆瀛愯〃
+ for (var i = 0; i < HFilterIdLists_arr.Length;i++)
+ {
+ oCn.RunProc("Insert Into xt_FastICSchemeSub " +
+ "(HInterID,HKey,HValue,HDataType) " +
+ " values('" + omodel.HInterID.ToString() + "','" + HFilterIdLists_arr[i] + "','" + HValue_arr[i] + "'" +
+ ",'" + HElement_type_arr[i] +
+ "') ");
+ }
+
+
+ //
+ sReturn = "鏂板鍗曟嵁鎴愬姛锛�";
+ oCn.Commit();
+ return true;
+ }
+ catch (Exception e)
+ {
+ sReturn = e.Message;
+ oCn.RollBack();
+ throw (e);
+ }
+ }
+
+ }
+}
diff --git "a/DAL/\350\264\250\346\243\200\347\256\241\347\220\206/ClsQC_ProcessCheckBill.cs" "b/DAL/\350\264\250\346\243\200\347\256\241\347\220\206/ClsQC_ProcessCheckBill.cs"
index 0819bb6..e1f50bb 100644
--- "a/DAL/\350\264\250\346\243\200\347\256\241\347\220\206/ClsQC_ProcessCheckBill.cs"
+++ "b/DAL/\350\264\250\346\243\200\347\256\241\347\220\206/ClsQC_ProcessCheckBill.cs"
@@ -156,7 +156,7 @@
",HBarCode,HLBatchNo,HCusID,HSortBillNo,HContrctBatchNo" +
",HProdAreaID,HProdTypeID,HProdStoveNo,HRecipeID,HDiameter1" +
",HDiameter2,HRoutingInterID,HDrawingDireID,HPackTypeID" +
- ",HMainSourceInterID,HMainSourceEntryID,HMainSourceBillNo,HMainSourceBillType,HICMOEntryID,HQCSchemeID" +
+ ",HMainSourceInterID,HMainSourceEntryID,HMainSourceBillNo,HMainSourceBillType,HICMOEntryID,HQCSchemeID,HICMOQty,HProcExchQty" +
") " +
" values('" + this.BillType + "','" + this.HBillSubType + "'," + omodel.HInterID.ToString() + ",'" + omodel.HBillNo + "'," + omodel.HBillStatus.ToString() + ",'" + omodel.HDate + "','" + omodel.HMaker + "',getdate()" +
"," + omodel.HYear.ToString() + "," + omodel.HPeriod.ToString() + ",'" + omodel.HRemark + "'"+
@@ -166,7 +166,7 @@
",'" + omodel.HBarCode + "','" + omodel.HLBatchNo + "'," + omodel.HCusID.ToString() + ",'" + omodel.HSortBillNo + "','" + omodel.HContrctBatchNo + "'" +
"," + omodel.HProdAreaID.ToString() + "," + omodel.HProdTypeID.ToString() + ",'" + omodel.HProdStoveNo + "'," + omodel.HRecipeID.ToString() + "," + omodel.HDiameter1.ToString() +
"," + omodel.HDiameter2.ToString() + "," + omodel.HRoutingInterID.ToString() + ",'" + omodel.HDrawingDireID + "'," + omodel.HPackTypeID.ToString() +
- "," + omodel.HMainSourceInterID + "," + omodel.HMainSourceEntryID + ",'" + omodel.HMainSourceBillNo + "','" + omodel.HMainSourceBillType + "'," + omodel.HICMOEntryID + "," + omodel.HQCSchemeID +
+ "," + omodel.HMainSourceInterID + "," + omodel.HMainSourceEntryID + ",'" + omodel.HMainSourceBillNo + "','" + omodel.HMainSourceBillType + "'," + omodel.HICMOEntryID + "," + omodel.HQCSchemeID + "," + omodel.HICMOQty + "," + omodel.HProcExchQty +
") ");
//鎻掑叆瀛愯〃
foreach (Model.ClsQC_ProcessCheckBillSub oSub in DetailColl)
diff --git a/Model/MES/ClsSc_SourceLineRepairBillMain.cs b/Model/MES/ClsSc_SourceLineRepairBillMain.cs
index cf3e42d..a18371e 100644
--- a/Model/MES/ClsSc_SourceLineRepairBillMain.cs
+++ b/Model/MES/ClsSc_SourceLineRepairBillMain.cs
@@ -48,6 +48,7 @@
public Int64 HMaterID;
public Int64 HWorkStationID;
public Int64 HProcess;
+ public Int64 HBadProcID;
public string HIPAddr;
public string HMacAddr;
public string HProdMac;
diff --git a/Model/Model.csproj b/Model/Model.csproj
index 81d61d5..8af6423 100644
--- a/Model/Model.csproj
+++ b/Model/Model.csproj
@@ -427,6 +427,8 @@
<Compile Include="鍩虹璧勬枡\鍩虹璧勬枡\ClsGy_Item30JiTai_Model.cs" />
<Compile Include="鍩虹璧勬枡\鍩虹璧勬枡\ClsGy_User_Model.cs" />
<Compile Include="鍩虹璧勬枡\鍩虹璧勬枡\ClsGy_Work_Model.cs" />
+ <Compile Include="鍩虹璧勬枡\鍩虹璧勬枡\ClsXt_FastICSchemeMain_Model.cs" />
+ <Compile Include="鍩虹璧勬枡\鍩虹璧勬枡\ClsXt_FastICSchemeSub_Model.cs" />
<Compile Include="宸ヤ綅鐪嬫澘\ClsGy_SOPBillMain.cs" />
<Compile Include="宸ヤ綅鐪嬫澘\ClsGy_SOPBillSub.cs" />
<Compile Include="宸ヨ祫绠$悊\ClsHR_EmpDimissionBillMain.cs" />
diff --git "a/Model/\345\237\272\347\241\200\350\265\204\346\226\231/\345\237\272\347\241\200\350\265\204\346\226\231/ClsXt_FastICSchemeMain_Model.cs" "b/Model/\345\237\272\347\241\200\350\265\204\346\226\231/\345\237\272\347\241\200\350\265\204\346\226\231/ClsXt_FastICSchemeMain_Model.cs"
new file mode 100644
index 0000000..cdae69f
--- /dev/null
+++ "b/Model/\345\237\272\347\241\200\350\265\204\346\226\231/\345\237\272\347\241\200\350\265\204\346\226\231/ClsXt_FastICSchemeMain_Model.cs"
@@ -0,0 +1,19 @@
+锘縰sing System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+
+namespace Model
+{
+ public class ClsXt_FastICSchemeMain_Model : DBUtility.ClsGy_Base_Model
+ {
+ public Int64 HInterID; //涓诲唴鐮�
+ public string HName; //鏂规鍚嶇О
+ public string HUserCode; //鐢ㄦ埛缂栫爜
+ public string HBillType; //0002
+ public string HBillName; //妯″潡鍚嶇О
+ public Int64 HStopflag;//绂佺敤鏍囪
+ public DateTime HCreateDate;//鍒涘缓鏃堕棿
+ public Int64 HUseingFlag; //榛樿浣跨敤鏍囪
+ }
+}
diff --git "a/Model/\345\237\272\347\241\200\350\265\204\346\226\231/\345\237\272\347\241\200\350\265\204\346\226\231/ClsXt_FastICSchemeSub_Model.cs" "b/Model/\345\237\272\347\241\200\350\265\204\346\226\231/\345\237\272\347\241\200\350\265\204\346\226\231/ClsXt_FastICSchemeSub_Model.cs"
new file mode 100644
index 0000000..62900d3
--- /dev/null
+++ "b/Model/\345\237\272\347\241\200\350\265\204\346\226\231/\345\237\272\347\241\200\350\265\204\346\226\231/ClsXt_FastICSchemeSub_Model.cs"
@@ -0,0 +1,16 @@
+锘縰sing System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+
+namespace Model
+{
+ public class ClsXt_FastICSchemeSub_Model : DBUtility.ClsGy_Base_Model
+ {
+ public Int64 HInterID; //涓诲唴鐮�
+ public Int64 HEntryID; //瀛愬唴鐮侊紙鑷鍒楋級
+ public string HKey; //鎺т欢NAME
+ public string HDataType; //鎺т欢绫诲瀷
+ public string HValue; //鎺т欢鍊�
+ }
+}
diff --git "a/Model/\350\264\250\346\243\200\347\256\241\347\220\206/ClsQC_ProcessCheckBillMain.cs" "b/Model/\350\264\250\346\243\200\347\256\241\347\220\206/ClsQC_ProcessCheckBillMain.cs"
index 4c51a82..c42294f 100644
--- "a/Model/\350\264\250\346\243\200\347\256\241\347\220\206/ClsQC_ProcessCheckBillMain.cs"
+++ "b/Model/\350\264\250\346\243\200\347\256\241\347\220\206/ClsQC_ProcessCheckBillMain.cs"
@@ -40,5 +40,8 @@
public Int64 HICMOEntryID;
public Int64 HQCSchemeID;
public bool HLastResult;
+
+ public Int64 HICMOQty;
+ public Int64 HProcExchQty;
}
}
diff --git a/WebAPI/Controllers/CJGL/Cj_SingleStationController.cs b/WebAPI/Controllers/CJGL/Cj_SingleStationController.cs
index 0f68e35..e827810 100644
--- a/WebAPI/Controllers/CJGL/Cj_SingleStationController.cs
+++ b/WebAPI/Controllers/CJGL/Cj_SingleStationController.cs
@@ -483,6 +483,7 @@
if (ds.Tables[0].Rows.Count > 0)
{
+ oCN.RollBack();
objJsonResult.code = "0";
objJsonResult.count = 0;
objJsonResult.Message = "鏉$爜:" + omodel.HBarCode_P + ",宸插瓨鍦�!";
@@ -490,27 +491,55 @@
return objJsonResult;
}
- Int64 HInterID1 = DBUtility.ClsPub.CreateBillID("3727", ref DBUtility.ClsPub.sExeReturnInfo);
- string HBillNo1 = DBUtility.ClsPub.CreateBillCode("3727", ref DBUtility.ClsPub.sExeReturnInfo, true);
- //淇濆瓨鐢熶骇缁勮鍗曚富琛�
- string sql = $@"Insert Into Sc_AssemblyBillMain(HYear,HPeriod,HBillType,HBillSubType,HInterID,HDate
+ //澧炲姞浜х嚎缁勮杩芥函鍗�
+ DataSet ds1 = oCN.RunProcReturn("exec h_p_Gy_BarCodeBillBomList '" + omodel.HProcExchBillNo + "'," + omodel.HProcID, "h_p_Gy_BarCodeBillBomList");
+ if (ds1.Tables[0].Rows.Count > 0)
+ {
+ //鍒ら厤浠舵暟閲忔槸鍚︾瓑浜�0
+ for (int i = 0; i < ds1.Tables[0].Rows.Count; i++)
+ {
+ double SYHQty = double.Parse(ds1.Tables[0].Rows[i]["閰嶄欢鏁伴噺"].ToString());
+ string HMaterNamePJ = ds1.Tables[0].Rows[i]["閰嶄欢浠g爜"].ToString();
+ if (SYHQty == 0)
+ {
+ oCN.RollBack();
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "閰嶄欢浠g爜:" + HMaterNamePJ + ",鏁伴噺涓�0!";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ }
+
+
+ ds1 = oCN.RunProcReturn("select * from Sc_AssemblyBillMain WITH(NOLOCK) where HMainSourceInterID =" + omodel.HProcExchInterID + " and HMainSourceEntryID =" + omodel.HProcExchEntryID + " and HBarCode_P = '" + omodel.HBarCode_P + "'", "Sc_AssemblyBillMain");
+
+ if (ds1.Tables[0].Rows.Count == 0)
+ {
+ Int64 HInterID1 = DBUtility.ClsPub.CreateBillID("3727", ref DBUtility.ClsPub.sExeReturnInfo);
+ string HBillNo1 = DBUtility.ClsPub.CreateBillCode("3727", ref DBUtility.ClsPub.sExeReturnInfo, true);
+ //淇濆瓨鐢熶骇缁勮鍗曚富琛�
+ string sql = $@"Insert Into Sc_AssemblyBillMain(HYear,HPeriod,HBillType,HBillSubType,HInterID,HDate
,HBillNo,HBillStatus,HMaker,HMakeDate,HMainSourceInterID,HMainSourceEntryID,HMainSourceBillNo
,HICMOInterID,HICMOBillNo,HBarCode_P,HMaterID,HUnitID,HAssemblyStatus,HProdOrgID)
values('{DateTime.Now.Year}','{DateTime.Now.Month}','3727','3727',{HInterID1},getdate()
,'{HBillNo1}','1','{user}',getdate(),{omodel.HProcExchInterID.ToString()},{omodel.HProcExchEntryID.ToString()},'{omodel.HProcExchBillNo.ToString()}'
,{omodel.HICMOInterID.ToString()},'{omodel.HICMOBillNo.ToString()}','{omodel.HBarCode_P.ToString()}',{omodel.HMaterID},0,'姹囨姤',{omodel.HProdOrgID})";
- oCN.RunProc(sql);
+ oCN.RunProc(sql);
- for (int i = 0; i < sub.Count; i++)
- {
- //瀛愯〃瀛樺偍
- string sq2 = $@"Insert Into Sc_AssemblyBillSub(HInterID,HBillNo_bak,HEntryID,HSourceInterID,HSourceEntryID,HSourceBillNo
+ for (int i = 0; i < sub.Count; i++)
+ {
+ //瀛愯〃瀛樺偍
+ string sq2 = $@"Insert Into Sc_AssemblyBillSub(HInterID,HBillNo_bak,HEntryID,HSourceInterID,HSourceEntryID,HSourceBillNo
,HSourceBillType,HMaterID,HSourceID,HEquipID,HUnitID,HQty
,HGroupID,HWorkerID,HScanDate,HBarCode,HBarCode_P,HSNNumber)
values({HInterID1},'{HBillNo1}',{(i + 1)},0,0,''
,'',{sub[i].HMaterID},0,0,0,1
,0,0,getdate(),'{sub[i].HBarCode}','{omodel.HBarCode_P}','') ";
- oCN.RunProc(sq2);
+ oCN.RunProc(sq2);
+ }
+ }
+
}
sMainStr = "[" + sMainStr + "]";
@@ -1416,7 +1445,7 @@
(HInterID,HEntryID,HBillNo_bak,HRemark,HSourceInterID,HSourceEntryID,HSourceBillNo,HSourceBillType
,HBadReasonID,HBadTypeID,HBadResultID,HBadProcID,HRepairResult,HCreator,HCreateDate)
values({model.HInterID},1,'{model.HBillNo}','',{subLsit[0].HProcExchInterID},{subLsit[0].HProcExchEntryID},'{subLsit[0].HProcExchBillNo}',''
-,{subLsit[0].HBadReasonID},{subLsit[0].HBadTypeID},{subLsit[0].HBadResultID},{model.HProcess},'{HResult}','{subLsit[0].HCreator}',getdate())");
+,{subLsit[0].HBadReasonID},{subLsit[0].HBadTypeID},{subLsit[0].HBadResultID},{model.HBadProcID},'{HResult}','{subLsit[0].HCreator}',getdate())");
if (HResult == "OK")
{
diff --git "a/WebAPI/Controllers/\345\223\201\350\264\250\347\256\241\347\220\206/\345\267\245\345\272\217\346\243\200\351\252\214\345\215\225/QC_ProcessCheckBillController.cs" "b/WebAPI/Controllers/\345\223\201\350\264\250\347\256\241\347\220\206/\345\267\245\345\272\217\346\243\200\351\252\214\345\215\225/QC_ProcessCheckBillController.cs"
index df77d0f..e5dba4c 100644
--- "a/WebAPI/Controllers/\345\223\201\350\264\250\347\256\241\347\220\206/\345\267\245\345\272\217\346\243\200\351\252\214\345\215\225/QC_ProcessCheckBillController.cs"
+++ "b/WebAPI/Controllers/\345\223\201\350\264\250\347\256\241\347\220\206/\345\267\245\345\272\217\346\243\200\351\252\214\345\215\225/QC_ProcessCheckBillController.cs"
@@ -621,9 +621,11 @@
BillNew.omodel.HICMOInterID = ClsPub.isLong(mainList[0].HICMOInterID);
BillNew.omodel.HICMOBillNo = ClsPub.isStrNull(mainList[0].HICMOBillNo);
BillNew.omodel.HICMOEntryID = ClsPub.isLong(mainList[0].HICMOEntryID);
+ BillNew.omodel.HICMOQty = ClsPub.isLong(mainList[0].HICMOQty);
BillNew.omodel.HProcExchInterID = ClsPub.isLong(mainList[0].HProcExchInterID);
BillNew.omodel.HProcExchEntryID = ClsPub.isLong(mainList[0].HProcExchEntryID);
BillNew.omodel.HProcExchBillNo = ClsPub.isStrNull(mainList[0].HProcExchBillNo);
+ BillNew.omodel.HProcExchQty = ClsPub.isLong(mainList[0].HProcExchQty);
BillNew.omodel.HMaterID = ClsPub.isLong(mainList[0].HMaterID);
BillNew.omodel.HFirstCheckEmp = ClsPub.isLong(mainList[0].HFirstCheckEmp);
BillNew.omodel.HCheckerResult = ClsPub.isStrNull(mainList[0].HCheckerResult);
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/Xt_FastICSchemeController.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/Xt_FastICSchemeController.cs"
new file mode 100644
index 0000000..140baf8
--- /dev/null
+++ "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/Xt_FastICSchemeController.cs"
@@ -0,0 +1,157 @@
+锘縰sing DBUtility;
+using Newtonsoft.Json;
+using Newtonsoft.Json.Linq;
+using System;
+using System.Collections.Generic;
+using System.Data;
+using System.Linq;
+using System.Net;
+using System.Net.Http;
+using System.Text.RegularExpressions;
+using System.Web.Http;
+using WebAPI.Models;
+
+namespace WebAPI.Controllers
+{
+ public class Xt_FastICSchemeController : ApiController
+ {
+ private json objJsonResult = new json();
+ SQLHelper.ClsCN oCN = new SQLHelper.ClsCN();
+ DataSet ds;
+
+ /// <summary>
+ /// 杩斿洖杩囨护鏂规鍒楄〃
+ ///鍙傛暟锛歴tring sql銆�
+ ///杩斿洖鍊硷細object銆�
+ /// </summary>
+ [Route("Xt_FastICScheme/list")]
+ [HttpGet]
+ public object list(string user, string HModuleName)
+ {
+ try
+ {
+ List<object> columnNameList = new List<object>();
+
+ string sql = string.Format(@"select * from h_v_Xt_FastICSchemeList where 鐢ㄦ埛缂栫爜='" + user + "' and 妯″潡鍚嶇О = '" + HModuleName + "'");
+ ds = oCN.RunProcReturn(sql, "h_v_Xt_FastICSchemeList");
+
+
+ //娣诲姞鍒楀悕
+ foreach (DataColumn col in ds.Tables[0].Columns)
+ {
+ Type dataType = col.DataType;
+ string ColmString = "{\"ColmCols\":\"" + col.ColumnName + "\",\"ColmType\":\"" + dataType.Name + "\"}";
+ columnNameList.Add(JsonConvert.DeserializeObject(ColmString));//鑾峰彇鍒癉ataColumn鍒楀璞$殑鍒楀悕
+ }
+
+ objJsonResult.code = "1";
+ objJsonResult.count = 1;
+ objJsonResult.Message = "Sucess锛�";
+ objJsonResult.data = ds.Tables[0];
+ objJsonResult.list = columnNameList;
+ return objJsonResult;
+ }
+ catch (Exception e)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "Exception锛�" + e.ToString();
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ }
+
+ #region 蹇�熻繃婊ゆ柟妗�
+ /// <summary>
+ /// 鏂板淇敼鍗曟嵁-淇濆瓨鎸夐挳
+ ///鍙傛暟锛歴tring sql銆�
+ ///杩斿洖鍊硷細object銆�
+ /// </summary>
+ [Route("Xt_FastICScheme/Save")]
+ [HttpPost]
+ public object Save([FromBody] JObject oMain)
+ {
+
+ try
+ {
+ DAL.ClsXt_FastICScheme_Ctl oDept = new DAL.ClsXt_FastICScheme_Ctl();
+
+ var _value = oMain["oMain"].ToString();
+ string msg1 = _value.ToString();
+ string[] sArray = msg1.Split(new string[] { ";" }, StringSplitOptions.RemoveEmptyEntries);
+ string msg2 = sArray[0].ToString();//琛ㄥご
+ string msg3 = sArray[1].ToString();//杩囨护鏉′欢id
+ string msg4 = sArray[2].ToString();//杩囨护鍊�
+ string msg5 = sArray[3].ToString();//鏍囩绫诲瀷
+ string msg6 = sArray[4].ToString();//鐢ㄦ埛
+
+ DAL.ClsXt_FastICScheme_Ctl oBill = new DAL.ClsXt_FastICScheme_Ctl();
+ //鍙嶅簭鍒楀寲
+ ListModels oListModels = new ListModels();
+
+ List<Model.ClsXt_FastICSchemeMain_Model> lsmain = new List<Model.ClsXt_FastICSchemeMain_Model>();
+ msg2 = msg2.Replace("\\", "");
+ msg2 = msg2.Replace("\n", ""); //\n
+ lsmain = oListModels.getObjectByJson_Xt_FastICSchemeMain(msg2);
+
+ foreach (Model.ClsXt_FastICSchemeMain_Model oItem in lsmain)
+ {
+ oItem.HBillType = "3332";
+ oBill.omodel = oItem;
+ }
+
+ ////琛ㄤ綋鏁版嵁
+ ////鎸� },{鏉ユ媶鍒嗘暟缁� //鍘绘帀銆愬拰銆�
+ //msg3 = msg3.Substring(1, msg3.Length - 2);
+ //msg3 = msg3.Replace("\\", "");
+ //msg3 = msg3.Replace("\n", ""); //\n
+ ////msg2 = msg2.Replace("'", "鈥�");
+ //List<Model.ClsXt_FastICSchemeSub_Model> ls = new List<Model.ClsXt_FastICSchemeSub_Model>();
+ //ls = oListModels.getObjectByJson_Gy_ICMOReportBillSub(msg3);
+ //int i = 0;
+
+
+
+ //淇濆瓨
+ //淇濆瓨瀹屾瘯鍚庡鐞�
+ bool bResult;
+ if (1 == 1)
+ {
+ // bResult = oBill.AddBill(ref DBUtility.ClsPub.sExeReturnInfo);
+ bResult = oBill.AddBill(msg3, msg4, msg5, ref DBUtility.ClsPub.sExeReturnInfo);
+ }
+ else
+ {
+ bResult = oBill.ModifyBill(oBill.omodel.HInterID, ref DBUtility.ClsPub.sExeReturnInfo);
+ }
+ if (bResult)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 1;
+ objJsonResult.Message = "淇濆瓨鎴愬姛锛�";
+ //WebAPIController.Add_Log("閫佽揣鍗曚笅鎺�", UserName, "鐢熸垚閫佽揣鍗�");
+ 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 = "Exception锛�" + e.Message;
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ }
+ #endregion
+ }
+}
diff --git a/WebAPI/ListModels.cs b/WebAPI/ListModels.cs
index 1a31263..e518643 100644
--- a/WebAPI/ListModels.cs
+++ b/WebAPI/ListModels.cs
@@ -3266,5 +3266,30 @@
return list;
}
+ /// <summary>
+ /// 澶勭悊蹇�熻繃婊ゆ柟妗堜富琛ㄧ殑json
+ /// </summary>
+ /// <param name="jsonString"></param>
+ /// <returns></returns>
+ public List<Model.ClsXt_FastICSchemeMain_Model> getObjectByJson_Xt_FastICSchemeMain(string jsonString)
+ {
+ jsonString = "[" + jsonString.ToString() + "]";
+ List<Model.ClsXt_FastICSchemeMain_Model> list = Newtonsoft.Json.JsonConvert.DeserializeObject<List<Model.ClsXt_FastICSchemeMain_Model>>(jsonString);
+ return list;
+ }
+
+
+ /// <summary>
+ /// 澶勭悊鏂板蹇�熻繃婊ゆ柟妗堝瓙琛ㄧ殑json
+ /// </summary>
+ /// <param name="jsonString"></param>
+ /// <returns></returns>
+ public List<Model.ClsXt_FastICSchemeSub_Model> getObjectByJson_Xt_FastICSchemeSub(string jsonString)
+ {
+ jsonString = "[" + jsonString.ToString() + "]";
+ List<Model.ClsXt_FastICSchemeSub_Model> list = Newtonsoft.Json.JsonConvert.DeserializeObject<List<Model.ClsXt_FastICSchemeSub_Model>>(jsonString);
+ return list;
+ }
+
}
}
\ No newline at end of file
diff --git a/WebAPI/WebAPI.csproj b/WebAPI/WebAPI.csproj
index 023f3be..b88f901 100644
--- a/WebAPI/WebAPI.csproj
+++ b/WebAPI/WebAPI.csproj
@@ -527,6 +527,7 @@
<Compile Include="Controllers\鍩虹璧勬枡\鍩虹璧勬枡\Gy_WorkStationBillController.cs" />
<Compile Include="Controllers\鍩虹璧勬枡\鍩虹璧勬枡\Xt_CheckFlowBillController.cs" />
<Compile Include="Controllers\鍩虹璧勬枡\鍩虹璧勬枡\Xt_CheckItemBillController.cs" />
+ <Compile Include="Controllers\鍩虹璧勬枡\鍩虹璧勬枡\Xt_FastICSchemeController.cs" />
<Compile Include="Controllers\鍩虹璧勬枡\宸ヨ祫鍩虹璧勬枡\Gy_ProcCommPriceController.cs" />
<Compile Include="Controllers\宸ヨ祫绠$悊\Pay_OutApplyBillController.cs" />
<Compile Include="Controllers\宸ヨ祫绠$悊\Pay_OverApplyBillController.cs" />
--
Gitblit v1.9.1