DAL/DAL.csproj | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
DAL/生产管理/设备管理/ClsSB_EquipICMOTechParamBill.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
DBUtility/业务单据/ClsXt_BaseBillSub.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
Model/Model.csproj | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
Model/生产管理/设备管理/ClsSB_EquipICMOTechParamBillMain.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
Model/生产管理/设备管理/ClsSB_EquipICMOTechParamBillSub.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
WebAPI/Controllers/CJGL/Sc_ProcessExchangeBillController.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
WebAPI/Controllers/SBGL/SB_EquipICMOTechParamBillController.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
WebAPI/Web.config | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
WebAPI/WebAPI.csproj | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 |
DAL/DAL.csproj
@@ -639,6 +639,7 @@ <Compile Include="ç产管ç\设å¤ç®¡ç\ClsGy_EquipTypeBill.cs" /> <Compile Include="ç产管ç\设å¤ç®¡ç\ClsGy_FixCardChangeBill.cs" /> <Compile Include="ç产管ç\设å¤ç®¡ç\ClsGy_FixCardBill.cs" /> <Compile Include="ç产管ç\设å¤ç®¡ç\ClsSB_EquipICMOTechParamBill.cs" /> <Compile Include="ç产管ç\设å¤ç®¡ç\ClsSb_EquipBeginBillMain.cs" /> <Compile Include="ç产管ç\设å¤ç®¡ç\ClsSb_EquipStopBillMain.cs" /> <Compile Include="ç产管ç\设å¤ç®¡ç\ClsSb_EquipWorkBeforeCheckBill.cs" /> DAL/Éú²ú¹ÜÀí/É豸¹ÜÀí/ClsSB_EquipICMOTechParamBill.cs
New file @@ -0,0 +1,330 @@ using System; using System.Collections.Generic; using System.Text; using System.Data; namespace DAL { public class ClsSB_EquipICMOTechParamBill:DBUtility.ClsXt_BaseBill { public Model.ClsSB_EquipICMOTechParamBillMain omodel = new Model.ClsSB_EquipICMOTechParamBillMain(); public List<Model.ClsSB_EquipICMOTechParamBillSub> DetailColl = new List<Model.ClsSB_EquipICMOTechParamBillSub>(); public ClsSB_EquipICMOTechParamBill() { base.MvarItemKeySub = "SB_EquipICMOTechParamBillSub"; base.MvarItemKeySub2 = ""; base.MvarItemKeySub3 = ""; base.MvarItemKeySub4 = ""; base.MvarItemKey="SB_EquipICMOTechParamBillMain"; base.MvarReportTitle= "设å¤å·¥èºåæ°è®¢åç¹æ£è¡¨"; base.BillType= "3919"; base.HBillSubType = "3919"; } #region åºå®ä»£ç ~ClsSB_EquipICMOTechParamBill() { DetailColl = null; } #endregion èªå®ä¹æ¹æ³ //ä¿ååæ§å¶ public bool BeforeSave(Int64 HInterID, string HBillNo, Int64 OperationType, ref string sReturn) { try { DataSet Ds = oCn.RunProcReturn("Exec h_p_SB_EquipICMOTechParamBill_BeforeSaveCtrl " + HInterID.ToString() + ",'" + HBillNo + "'," + OperationType.ToString(), "h_p_SB_EquipICMOTechParamBill_BeforeSaveCtrl"); if (Ds == null || Ds.Tables[0].Rows.Count == 0) { sReturn = "ä¿ååå¤æå¤±è´¥ï¼"; return false; } else { if (DBUtility.ClsPub.isLong(Ds.Tables[0].Rows[0]["HBack"]) == 1) { sReturn = DBUtility.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["HRemark"]); return false; } } return true; } catch (Exception e) { throw (e); } } //ä¿ååæ§å¶ public bool AfterSave(Int64 HInterID, string HBillNo, Int64 OperationType, ref string sReturn) { try { DataSet Ds = oCn.RunProcReturn("Exec h_p_SB_EquipICMOTechParamBill_AfterSaveCtrl " + HInterID.ToString() + ",'" + HBillNo + "'," + OperationType.ToString(), "h_p_SB_EquipICMOTechParamBill_AfterSaveCtrl"); if (Ds == null || Ds.Tables[0].Rows.Count == 0) { sReturn = "ä¿ååå¤æå¤±è´¥ï¼"; return false; } else { if (DBUtility.ClsPub.isLong(Ds.Tables[0].Rows[0]["HBack"]) == 1) { sReturn = DBUtility.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["HRemark"]); return false; } } return true; } catch (Exception e) { throw (e); } } //ä¿®æ¹åæ® public override bool ModifyBill(Int64 lngBillKey, ref string sReturn) { try { oCn.BeginTran(); //ä¿ååæ§å¶ if (!BeforeSave(lngBillKey, omodel.HBillNo, 2, ref sReturn)) { oCn.RollBack(); return false; } //æ´æ°ä¸»è¡¨ oCn.RunProc("UpDate SB_EquipICMOTechParamBillMain set " + " HBillNo='" + omodel.HBillNo + "'" + //åºå®èµå¼=============== ",HDate='" + omodel.HDate + "'" + ",HYear='" + omodel.HYear.ToString() + "'" + ",HPeriod='" + omodel.HPeriod.ToString() + "'" + ",HRemark='" + omodel.HRemark + "'" + ",HUpDater='" + DBUtility.ClsPub.CurUserName + "'" + ",HUpDateDate=getdate()" + //======================================== ",HICMOInterID=" + omodel.HICMOInterID.ToString() + ",HICMOEntryID=" + omodel.HICMOEntryID.ToString() + ",HICMOBillNo='" + omodel.HICMOBillNo + "'" + ",HProcExchInterID=" + omodel.HProcExchInterID.ToString() + ",HProcExchEntryID=" + omodel.HProcExchEntryID.ToString() + ",HProcExchBillNo='" + omodel.HProcExchBillNo + "'" + ",HProcNo=" + omodel.HProcNo.ToString() + ",HMaterID=" + omodel.HMaterID.ToString() + ",HProcID=" + omodel.HProcID.ToString() + ",HEmpID=" + omodel.HEmpID.ToString() + ",HSourceID=" + omodel.HSourceID.ToString() + ",HGroupID=" + omodel.HGroupID.ToString() + ",HDeptID=" + omodel.HDeptID.ToString() + ",HEquipID=" + omodel.HEquipID.ToString() + ",HStockOrgID=" + omodel.HSTOCKORGID.ToString() + " where HInterID=" + lngBillKey.ToString()); //å é¤å ³è DeleteRelation(ref sReturn, lngBillKey); //å é¤å表 DeleteBillSub(lngBillKey); //æå ¥å表 omodel.HInterID = lngBillKey; foreach (Model.ClsSB_EquipICMOTechParamBillSub oSub in DetailColl) { oCn.RunProc("Insert into SB_EquipICMOTechParamBillSub " + " (HInterID,HEntryID,HRemark,HRelationQty,HRelationMoney" + ",HSourceInterID,HSourceEntryID,HSourceBillNo,HSourceBillType,HBillNo_bak" + ",HTechParamID,HTechParamUnitID,HVaule,HStd,HMax,HMin,HResult" + ") values(" + omodel.HInterID.ToString() + "," + oSub.HEntryID.ToString() + ",'" + oSub.HRemark + "'," + oSub.HRelationQty.ToString() + "," + oSub.HRelationMoney.ToString() + "," + oSub.HSourceInterID.ToString() + "," + oSub.HSourceEntryID.ToString() + ",'" + oSub.HSourceBillNo + "','" + oSub.HSourceBillType + "','" + omodel.HBillNo + "'" + "," + oSub.HTechParamID.ToString() + "," + oSub.HTechParamUnitID.ToString() + ",'" + oSub.HVaule + "','" + oSub.HStd + "','" + oSub.HMax + "','" + oSub.HMin + "','" + oSub.HResult + "'" + ") "); } //ä¿ååæ§å¶ if (!AfterSave(lngBillKey, omodel.HBillNo, 2, ref sReturn)) { oCn.RollBack(); return false; } sReturn = "åæ®å·ï¼" + omodel.HBillNo + " ä¿®æ¹æåï¼"; oCn.Commit(); return true; } catch (Exception e) { sReturn = e.Message; oCn.RollBack(); throw (e); } } //æ°å¢åæ® public override bool AddBill(ref string sReturn) { try { //å¾å°mainid if (omodel.HInterID == 0) { omodel.HInterID = DBUtility.ClsPub.CreateBillID_Prod(BillType, ref DBUtility.ClsPub.sExeReturnInfo); } oCn.BeginTran(); //ä¿ååæ§å¶ if (!BeforeSave(omodel.HInterID, omodel.HBillNo, 1, ref sReturn)) { oCn.RollBack(); return false; } //主表 oCn.RunProc("Insert Into SB_EquipICMOTechParamBillMain " + "(HBillType,HBillSubType,HInterID,HBillNo,HDate" + ",HYear,HPeriod,HRemark,HMaker,HMakeDate" + ",HMainSourceInterID,HMainSourceEntryID,HMainSourceBillNo,HMainSourceBillType" + ",HICMOInterID,HICMOEntryID,HICMOBillNo,HProcExchInterID,HProcExchEntryID,HProcExchBillNo" + ",HProcNo,HMaterID,HProcID,HEmpID,HSourceID" + ",HGroupID,HDeptID,HEquipID,HStockOrgID" + ") " + " values('" + this.BillType + "','" + this.HBillSubType + "'," + omodel.HInterID.ToString() + ",'" + omodel.HBillNo + "','" + omodel.HDate.ToShortDateString() + "'" + ", " + omodel.HYear.ToString() + "," + omodel.HPeriod.ToString() + ",'" + omodel.HRemark + "','" + DBUtility.ClsPub.CurUserName + "',getdate()" + ", " + omodel.HMainSourceInterID.ToString() + "," + omodel.HMainSourceEntryID.ToString() + ",'" + omodel.HMainSourceBillNo + "','" + omodel.HMainSourceBillType + "'" + ", " + omodel.HICMOInterID.ToString() + "," + omodel.HICMOEntryID.ToString() + ",'" + omodel.HICMOBillNo + "'," + omodel.HProcExchInterID.ToString() + "," + omodel.HProcExchEntryID.ToString() + ",'" + omodel.HProcExchBillNo + "'" + ", " + omodel.HProcNo.ToString() + "," + omodel.HMaterID.ToString() + "," + omodel.HProcID.ToString() + "," + omodel.HEmpID.ToString() + "," + omodel.HSourceID.ToString() + ", " + omodel.HGroupID.ToString() + "," + omodel.HDeptID.ToString() + "," + omodel.HEquipID.ToString() + "," + omodel.HSTOCKORGID.ToString() + ") "); //æå ¥å表 foreach (Model.ClsSB_EquipICMOTechParamBillSub oSub in DetailColl) { oCn.RunProc("Insert into SB_EquipICMOTechParamBillSub " + " (HInterID,HEntryID,HRemark,HRelationQty,HRelationMoney" + ",HSourceInterID,HSourceEntryID,HSourceBillNo,HSourceBillType,HBillNo_bak" + ",HTechParamID,HTechParamUnitID,HVaule,HStd,HMax,HMin,HResult" + ") values(" + omodel.HInterID.ToString() + "," + oSub.HEntryID.ToString() + ",'" + oSub.HRemark + "'," + oSub.HRelationQty.ToString() + "," + oSub.HRelationMoney.ToString() + "," + oSub.HSourceInterID.ToString() + "," + oSub.HSourceEntryID.ToString() + ",'" + oSub.HSourceBillNo + "','" + oSub.HSourceBillType + "','" + omodel.HBillNo + "'" + "," + oSub.HTechParamID.ToString() + "," + oSub.HTechParamUnitID.ToString() + ",'" + oSub.HVaule + "','" + oSub.HStd + "','" + oSub.HMax + "','" + oSub.HMin + "','" + oSub.HResult + "'" + ") "); } //ä¿ååæ§å¶ if (!AfterSave(omodel.HInterID, omodel.HBillNo, 1, ref sReturn)) { oCn.RollBack(); return false; } sReturn = "åæ®å·ï¼" + omodel.HBillNo + " æ°å¢æåï¼"; oCn.Commit(); return true; } catch (Exception e) { sReturn = e.Message; oCn.RollBack(); throw (e); } } //æ¾ç¤ºåæ® public override bool ShowBill(Int64 lngBillKey, ref string sReturn) { try { //æ¥è¯¢ä¸»è¡¨ DataSet Ds ; Ds = oCn.RunProcReturn("Select * from SB_EquipICMOTechParamBillMain Where HInterID=" + lngBillKey.ToString(), "SB_EquipICMOTechParamBillMain"); if(Ds.Tables[0].Rows.Count==0) { sReturn = "åæ®æªæ¾å°ï¼"; return false; } //åºå®èµå¼=========================================== omodel.HYear = DBUtility.ClsPub.isLong(Ds.Tables[0].Rows[0]["HYear"]); omodel.HPeriod = DBUtility.ClsPub.isLong(Ds.Tables[0].Rows[0]["HPeriod"]); omodel.HBillType = DBUtility.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["HBillType"]); omodel.HBillSubType = DBUtility.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["HBillSubType"]); omodel.HInterID = DBUtility.ClsPub.isLong(Ds.Tables[0].Rows[0]["HInterID"]); omodel.HDate = DBUtility.ClsPub.isDate(Ds.Tables[0].Rows[0]["HDate"]); omodel.HBillNo = Ds.Tables[0].Rows[0]["HBillNo"].ToString().Trim(); omodel.HBillStatus = DBUtility.ClsPub.isInt(Ds.Tables[0].Rows[0]["HBillStatus"]); 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.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.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.HCloseDate = Ds.Tables[0].Rows[0]["HCloseDate"].ToString().Trim(); omodel.HCloseMan = Ds.Tables[0].Rows[0]["HCloseMan"].ToString().Trim(); omodel.HCloseType = DBUtility.ClsPub.isBool(Ds.Tables[0].Rows[0]["HCloseType"]); omodel.HDeleteDate = Ds.Tables[0].Rows[0]["HDeleteDate"].ToString().Trim(); omodel.HDeleteMan = Ds.Tables[0].Rows[0]["HDeleteMan"].ToString().Trim(); omodel.HMainSourceBillType = DBUtility.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["HMainSourceBillType"]); omodel.HMainSourceInterID = DBUtility.ClsPub.isLong(Ds.Tables[0].Rows[0]["HMainSourceInterID"]); omodel.HMainSourceEntryID = DBUtility.ClsPub.isLong(Ds.Tables[0].Rows[0]["HMainSourceEntryID"]); omodel.HMainSourceBillNo = DBUtility.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["HMainSourceBillNo"]); //======================================================== omodel.HICMOInterID = DBUtility.ClsPub.isLong(Ds.Tables[0].Rows[0]["HICMOInterID"]); omodel.HICMOEntryID = DBUtility.ClsPub.isLong(Ds.Tables[0].Rows[0]["HICMOEntryID"]); omodel.HICMOBillNo = DBUtility.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["HICMOBillNo"]); omodel.HProcExchInterID = DBUtility.ClsPub.isLong(Ds.Tables[0].Rows[0]["HProcExchInterID"]); omodel.HProcExchEntryID = DBUtility.ClsPub.isLong(Ds.Tables[0].Rows[0]["HProcExchEntryID"]); omodel.HProcExchBillNo = DBUtility.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["HProcExchBillNo"]); omodel.HProcNo = DBUtility.ClsPub.isLong(Ds.Tables[0].Rows[0]["HProcNo"]); omodel.HMaterID = DBUtility.ClsPub.isLong(Ds.Tables[0].Rows[0]["HMaterID"]); omodel.HProcID = DBUtility.ClsPub.isLong(Ds.Tables[0].Rows[0]["HProcID"]); omodel.HEmpID = DBUtility.ClsPub.isLong(Ds.Tables[0].Rows[0]["HEmpID"]); omodel.HSourceID = DBUtility.ClsPub.isLong(Ds.Tables[0].Rows[0]["HSourceID"]); omodel.HGroupID = DBUtility.ClsPub.isLong(Ds.Tables[0].Rows[0]["HGroupID"]); omodel.HDeptID = DBUtility.ClsPub.isLong(Ds.Tables[0].Rows[0]["HDeptID"]); omodel.HEquipID = DBUtility.ClsPub.isLong(Ds.Tables[0].Rows[0]["HEquipID"]); omodel.HSTOCKORGID = DBUtility.ClsPub.isLong(Ds.Tables[0].Rows[0]["HStockOrgID"]); //å¾ªç¯ DataSet DsSub ; DsSub = oCn.RunProcReturn("Select * from SB_EquipICMOTechParamBillSub Where HInterID=" + lngBillKey.ToString() + "order by HEntryID", "SB_EquipICMOTechParamBillSub"); DetailColl.Clear();//æ¸ ç©º for (int i = 0; i < DsSub.Tables[0].Rows.Count; i++) { Model.ClsSB_EquipICMOTechParamBillSub oSub = new Model.ClsSB_EquipICMOTechParamBillSub(); // åºå®èµå¼=============================================== oSub.HInterID = DBUtility.ClsPub.isLong(DsSub.Tables[0].Rows[i]["HInterID"]); 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.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(); oSub.HBillNo_bak = DBUtility.ClsPub.isStrNull(DsSub.Tables[0].Rows[i]["HBillNo_bak"]); //=================================================== oSub.HTechParamID = DBUtility.ClsPub.isLong(DsSub.Tables[0].Rows[i]["HTechParamID"]); oSub.HTechParamUnitID = DBUtility.ClsPub.isLong(DsSub.Tables[0].Rows[i]["HTechParamUnitID"]); oSub.HVaule = DBUtility.ClsPub.isStrNull(DsSub.Tables[0].Rows[i]["HVaule"]); oSub.HStd = DBUtility.ClsPub.isStrNull(DsSub.Tables[0].Rows[i]["HStd"]); oSub.HMax = DBUtility.ClsPub.isStrNull(DsSub.Tables[0].Rows[i]["HMax"]); oSub.HMin = DBUtility.ClsPub.isStrNull(DsSub.Tables[0].Rows[i]["HMin"]); oSub.HResult = DBUtility.ClsPub.isStrNull(DsSub.Tables[0].Rows[i]["HResult"]); DetailColl.Add(oSub); } sReturn = "æ¾ç¤ºåæ®æåï¼"; return true; } catch (Exception e) { sReturn = e.Message; throw (e); } } } } DBUtility/ÒµÎñµ¥¾Ý/ClsXt_BaseBillSub.cs
@@ -7,7 +7,8 @@ public class ClsXt_BaseBillSub { public Int64 HInterID; public Int64 HEntryID; public Int64 HEntryID; public string HBillNo_bak; //varchar(50) --åæ®å·ï¼å¤ä»½ï¼ä»¥å å ç ä¸¢å¤±ï¼æ¾ä¸å°å¯¹åºä¸»è¡¨ï¼ // public string HCloseMan; //è¡å ³é public bool HCloseType; //å ³éç±»å Model/Model.csproj
@@ -647,6 +647,8 @@ <Compile Include="ç产管ç\设å¤ç®¡ç\ClsGy_FixCardBillMain.cs" /> <Compile Include="ç产管ç\设å¤ç®¡ç\ClsGy_FixCardBillSub_Emp.cs" /> <Compile Include="ç产管ç\设å¤ç®¡ç\ClsSb_EquipBeginBillMain.cs" /> <Compile Include="ç产管ç\设å¤ç®¡ç\ClsSB_EquipICMOTechParamBillMain.cs" /> <Compile Include="ç产管ç\设å¤ç®¡ç\ClsSB_EquipICMOTechParamBillSub.cs" /> <Compile Include="ç产管ç\设å¤ç®¡ç\ClsSb_EquipStopBillMain.cs" /> <Compile Include="ç产管ç\设å¤ç®¡ç\ClsSb_EquipBeginBillSub.cs" /> <Compile Include="ç产管ç\设å¤ç®¡ç\ClsSb_EquipStopBillSub.cs" /> Model/Éú²ú¹ÜÀí/É豸¹ÜÀí/ClsSB_EquipICMOTechParamBillMain.cs
New file @@ -0,0 +1,25 @@ using System; using System.Collections.Generic; using System.Text; namespace Model { public class ClsSB_EquipICMOTechParamBillMain:DBUtility.ClsXt_BaseBillMain { public Int64 HICMOInterID; // int //ä»»å¡åå ç public Int64 HICMOEntryID; // int //ä»»å¡ååå ç public string HICMOBillNo; // varchar(50) //ä»»å¡åå· public Int64 HProcExchInterID; // int //å·¥åºæµè½¬å¡å ç public Int64 HProcExchEntryID; // int //å·¥åºæµè½¬å¡åå ç public string HProcExchBillNo; // varchar(50) //å·¥åºæµè½¬å¡å· public Int64 HProcNo; // int //å·¥åºæµè½¬å¡æµæ°´å· public Int64 HMaterID; // int //ç©æ(Gy_Material) public Int64 HProcID; // int //å·¥åº(Gy_Process) public Int64 HEmpID; // int //ç¹æ£äººï¼gy_employeeï¼ public Int64 HSourceID; // int //çäº§èµæº(Gy_Source) public Int64 HGroupID; // int //ç产çç»(Gy_Group) public Int64 HDeptID; // int //ç产车é´ï¼Gy_Departmentï¼ public Int64 HEquipID; // int //设å¤ï¼Gy_EquipFileBillMainï¼ } } Model/Éú²ú¹ÜÀí/É豸¹ÜÀí/ClsSB_EquipICMOTechParamBillSub.cs
New file @@ -0,0 +1,18 @@ using System; using System.Collections.Generic; using System.Text; namespace Model { public class ClsSB_EquipICMOTechParamBillSub : DBUtility.ClsXt_BaseBillSub { public Int64 HTechParamID; // int //å·¥èºåæ° public Int64 HTechParamUnitID; // int //å·¥èºåæ°åä½(Gy_TechnologyParameterUnit) public string HVaule; // varchar(20) //å·¥èºåæ°å¼ public string HStd; // varchar(200) //æ åå¼ public string HMax; // varchar(200) //ä¸é public string HMin; // varchar(200) //ä¸é public string HResult; // varchar(50) //æ£æµç»æï¼OKï¼NGï¼ } } WebAPI/Controllers/CJGL/Sc_ProcessExchangeBillController.cs
@@ -16,6 +16,15 @@ public class Sc_ProcessExchangeBillController : ApiController { public DBUtility.ClsPub.Enum_BillStatus BillStatus; public const string ModName = "3772"; //åæ®ç±»å public const string ModCaption = "å·¥åºæµè½¬å¡"; //åæ®åç§° public const string ModRightName = "Sc_ProcessExchangeBill"; public const string ModRightNameList = ModRightName + "List"; //å表 public const string ModRightNameEdit = ModRightName + "_Edit"; //ç¼è¾ public const string ModRightNameCheck = ModRightName + "_Check"; //å®¡æ ¸ public const string ModRightNameClose = ModRightName + "_Close"; //å ³é public const string ModRightNameDelete = ModRightName + "_Delete"; //ä½åº public const string ModRightNameDrop = ModRightName + "_Drop"; //å é¤ private json objJsonResult = new json(); SQLHelper.ClsCN oCN = new SQLHelper.ClsCN(); DataSet ds; @@ -1902,5 +1911,59 @@ } #endregion #region å·¥åºæµè½¬å¡å表 /// <summary> /// è·åå·¥åºæµè½¬å¡åè¡¨ä¿¡æ¯ /// </summary> /// <returns></returns> [Route("Sc_ProcessExchangeBillController/GetSc_ProcessExchangeBillList_Json")] [HttpGet] public object GetSc_ProcessExchangeBillList_Json(string sWhere, string HMaker, string OperationType, string ViewName) { try { //夿æé if (OperationType == "1") { //夿æé if (!DBUtility.ClsPub.Security_Log(ModRightNameList, 3, false, HMaker)) { objJsonResult.code = "0"; objJsonResult.count = 0; objJsonResult.Message = "æ¨æ²¡æè¯¥æ¨¡åæé,请ä¸ç®¡çåèç³»ï¼"; objJsonResult.data = null; return objJsonResult; } } //è¿ååè¡¨ä¿¡æ¯ ds = oCN.RunProcReturn("select * from " + ViewName + " where 1=1 " + sWhere + " order by hmainid desc", ViewName); List<object> columnNameList = new List<object>(); //æ·»å åå 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)); //è·åå°DataColumnå对象çåå } objJsonResult.code = "0"; objJsonResult.count = 1; objJsonResult.Message = "æåï¼"; objJsonResult.data = ds.Tables[0]; objJsonResult.list = columnNameList; return objJsonResult; } catch (Exception e) { objJsonResult.code = "0"; objJsonResult.count = 0; objJsonResult.Message = "æ¥è¯¢å表信æ¯å¤±è´¥ï¼" + e.ToString(); objJsonResult.data = null; return objJsonResult; } } #endregion } } WebAPI/Controllers/SBGL/SB_EquipICMOTechParamBillController.cs
New file @@ -0,0 +1,786 @@ using Newtonsoft.Json; using Newtonsoft.Json.Linq; using Pub_Class; using System; using System.Collections; using System.Collections.Generic; using System.Data; using System.Data.SqlClient; using System.Web.Http; using WebAPI.Models; namespace WebAPI.Controllers { public class SB_EquipICMOTechParamBillController : ApiController { public DBUtility.ClsPub.Enum_BillStatus BillStatus; public const string ModName = "3919"; //åæ®ç±»å public const string ModCaption = "设å¤å·¥èºåæ°è®¢åç¹æ£è¡¨"; //åæ®åç§° public const string ModRightName = "SB_EquipICMOTechParamBill"; public const string ModRightNameList = ModRightName + "List"; //å表 public const string ModRightNameEdit = ModRightName + "_Edit"; //ç¼è¾ public const string ModRightNameCheck = ModRightName + "_Check"; //å®¡æ ¸ public const string ModRightNameClose = ModRightName + "_Close"; //å ³é public const string ModRightNameDelete = ModRightName + "_Delete"; //ä½åº public const string ModRightNameDrop = ModRightName + "_Drop"; //å é¤ public DataSet ds = new DataSet(); private json objJsonResult = new json(); SQLHelper.ClsCN oCn = new SQLHelper.ClsCN(); public DAL.ClsSB_EquipICMOTechParamBill oBill = new DAL.ClsSB_EquipICMOTechParamBill(); #region 设å¤å·¥èºåæ°è®¢åç¹æ£è¡¨åè¡¨ä¿¡æ¯ /// <summary> /// è·å设å¤å·¥èºåæ°è®¢åç¹æ£è¡¨åè¡¨ä¿¡æ¯ /// </summary> /// <returns></returns> [Route("SB_EquipICMOTechParamBillController/GetSB_EquipICMOTechParamBillList_Json")] [HttpGet] public object GetSB_EquipICMOTechParamBillList_Json(string sWhere, string HMaker, string OperationType, string ViewName) { try { //夿æé if (OperationType == "1") { //夿æé if (!DBUtility.ClsPub.Security_Log(ModRightNameList, 3, false, HMaker)) { objJsonResult.code = "0"; objJsonResult.count = 0; objJsonResult.Message = "æ¨æ²¡æè¯¥æ¨¡åæé,请ä¸ç®¡çåèç³»ï¼"; objJsonResult.data = null; return objJsonResult; } } //è¿ååè¡¨ä¿¡æ¯ ds = oCn.RunProcReturn("select * from " + ViewName + " where 1=1 " + sWhere + " order by hmainid desc", ViewName); List<object> columnNameList = new List<object>(); //æ·»å åå 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)); //è·åå°DataColumnå对象çåå } objJsonResult.code = "0"; objJsonResult.count = 1; objJsonResult.Message = "æåï¼"; objJsonResult.data = ds.Tables[0]; objJsonResult.list = columnNameList; return objJsonResult; } catch (Exception e) { objJsonResult.code = "0"; objJsonResult.count = 0; objJsonResult.Message = "æ¥è¯¢å表信æ¯å¤±è´¥ï¼" + e.ToString(); objJsonResult.data = null; return objJsonResult; } } #endregion #region 设å¤å·¥èºåæ°è®¢åç¹æ£è¡¨å é¤ /// <summary> /// å é¤è®¾å¤å·¥èºåæ°è®¢åç¹æ£è¡¨ /// </summary> /// <returns></returns> [Route("SB_EquipICMOTechParamBillController/GetSB_EquipICMOTechParamBill_Delete_Json")] [HttpGet] public object GetSB_EquipICMOTechParamBill_Delete_Json(Int64 HInterID, string HMaker) { try { //夿æé if (!DBUtility.ClsPub.Security_Log(ModRightNameDrop, 3, false, HMaker)) { objJsonResult.code = "0"; objJsonResult.count = 0; objJsonResult.Message = "æ¨æ²¡æè¯¥æ¨¡åå é¤åè½æé,请ä¸ç®¡çåèç³»ï¼"; objJsonResult.data = null; return objJsonResult; } //夿å卿§ if (oBill.ShowBill(HInterID, ref DBUtility.ClsPub.sExeReturnInfo)) { //夿ä¼è®¡ææ¯å¦åç string s = ""; int sYear = 0; int sPeriod = 0; if (DBUtility.Xt_BaseBillFun.Fun_AllowYearPeriod(oBill.omodel.HDate, ref sYear, ref sPeriod, ref s) == false) { objJsonResult.code = "0"; objJsonResult.count = 0; objJsonResult.Message = s; objJsonResult.data = null; return objJsonResult; } //å é¤åæ§å¶ DataSet BeforeDs = oCn.RunProcReturn("Exec h_p_SB_EquipICMOTechParamBill_BeforeDelCtrl " + HInterID.ToString() + ",'" + HMaker + "'", "h_p_SB_EquipICMOTechParamBill_BeforeDelCtrl"); if (BeforeDs == null || BeforeDs.Tables[0].Rows.Count == 0) { objJsonResult.code = "0"; objJsonResult.count = 0; objJsonResult.Message = "å é¤åå¤æå¤±è´¥ï¼"; objJsonResult.data = null; return objJsonResult; } else { if (DBUtility.ClsPub.isLong(BeforeDs.Tables[0].Rows[0]["HBack"]) == 1) { objJsonResult.code = "0"; objJsonResult.count = 0; objJsonResult.Message = "å é¤å¤±è´¥ï¼" + DBUtility.ClsPub.isStrNull(BeforeDs.Tables[0].Rows[0]["HRemark"]); objJsonResult.data = null; return objJsonResult; } } //å é¤åæ®ï¼å å«å é¤åæ§å¶ãåå ¥æ¥å¿ï¼ if (!oBill.DeleteBill(oBill.omodel.HInterID, oBill.omodel.HBillNo, "h_p_SB_EquipICMOTechParamBill_AfterDelCtrl", HMaker, ref ClsPub.sExeReturnInfo)) { objJsonResult.code = "0"; objJsonResult.count = 0; objJsonResult.Message = "å é¤å¤±è´¥!åå :" + ClsPub.sExeReturnInfo; objJsonResult.data = null; return objJsonResult; } else { objJsonResult.code = "0"; objJsonResult.count = 1; objJsonResult.Message = "å é¤è®¾å¤å·¥èºåæ°è®¢åç¹æ£è¡¨æåï¼"; objJsonResult.data = null; return objJsonResult; } } else { objJsonResult.code = "0"; objJsonResult.count = 0; objJsonResult.Message = "æªæ¥è¯¢å°è¯¥è®¾å¤å·¥èºåæ°è®¢åç¹æ£è¡¨ï¼è¯·å·æ°æ°æ®åéæ°éæ©ï¼"; objJsonResult.data = null; return objJsonResult; } } catch (Exception e) { objJsonResult.code = "0"; objJsonResult.count = 0; objJsonResult.Message = "å é¤è®¾å¤å·¥èºåæ°è®¢åç¹æ£è¡¨å¤±è´¥ï¼" + e.ToString(); objJsonResult.data = null; return objJsonResult; } } #endregion #region 设å¤å·¥èºåæ°è®¢åç¹æ£è¡¨å®¡æ ¸/åå®¡æ ¸ /// <summary> /// å®¡æ ¸/åå®¡æ ¸è®¾å¤å·¥èºåæ°è®¢åç¹æ£è¡¨ /// </summary> /// <param name="HInterID">åæ®ID</param> /// <param name="Type">å®¡æ ¸(1),åå®¡æ ¸(2)</param> /// <param name="HMaker">å®¡æ ¸äºº</param> /// <returns></returns> [Route("SB_EquipICMOTechParamBillController/GetSB_EquipICMOTechParamBill_Check_Json")] [HttpGet] public object GetSB_EquipICMOTechParamBill_Check_Json(Int64 HInterID, int Type, string HMaker) { try { //夿æé if (!DBUtility.ClsPub.Security_Log(ModRightNameCheck, 3, false, HMaker)) { objJsonResult.code = "0"; objJsonResult.count = 0; objJsonResult.Message = "æ¨æ²¡æè¯¥æ¨¡åå®¡æ ¸/åå®¡æ ¸åè½æé,请ä¸ç®¡çåèç³»ï¼"; objJsonResult.data = null; return objJsonResult; } //夿å卿§ if (oBill.ShowBill(HInterID, ref DBUtility.ClsPub.sExeReturnInfo)) { //夿ä¼è®¡ææ¯å¦åç string s = ""; int sYear = 0; int sPeriod = 0; if (DBUtility.Xt_BaseBillFun.Fun_AllowYearPeriod(oBill.omodel.HDate, ref sYear, ref sPeriod, ref s) == false) { objJsonResult.code = "0"; objJsonResult.count = 0; objJsonResult.Message = s; objJsonResult.data = null; return objJsonResult; } //Type 1 å®¡æ ¸ 2 åå®¡æ ¸ if (Type == 1) { if (oBill.omodel.HChecker.Trim() != "") { objJsonResult.code = "0"; objJsonResult.count = 0; objJsonResult.Message = "åæ®å·²å®¡æ ¸ï¼ä¸è½åæ¬¡å®¡æ ¸ï¼"; objJsonResult.data = null; return objJsonResult; } if (oBill.omodel.HCloseMan.Trim() != "") { objJsonResult.code = "0"; objJsonResult.count = 0; objJsonResult.Message = "åæ®å·²å ³éï¼ä¸è½åæ¬¡å®¡æ ¸ï¼"; objJsonResult.data = null; return objJsonResult; } if (oBill.omodel.HDeleteMan.Trim() != "") { objJsonResult.code = "0"; objJsonResult.count = 0; objJsonResult.Message = "忮已ä½åºï¼ä¸è½åæ¬¡å®¡æ ¸ï¼"; objJsonResult.data = null; return objJsonResult; } //å®¡æ ¸åæ§å¶ DataSet BeforeDs = oCn.RunProcReturn("Exec h_p_SB_EquipICMOTechParamBill_BeforeCheckCtrl " + HInterID.ToString() + ",'" + HMaker + "'", "h_p_SB_EquipICMOTechParamBill_BeforeCheckCtrl"); if (BeforeDs == null || BeforeDs.Tables[0].Rows.Count == 0) { objJsonResult.code = "0"; objJsonResult.count = 0; objJsonResult.Message = "å®¡æ ¸åå¤æå¤±è´¥ï¼"; objJsonResult.data = null; return objJsonResult; } else { if (DBUtility.ClsPub.isLong(BeforeDs.Tables[0].Rows[0]["HBack"]) == 1) { objJsonResult.code = "0"; objJsonResult.count = 0; objJsonResult.Message = "å®¡æ ¸å¤±è´¥ï¼" + DBUtility.ClsPub.isStrNull(BeforeDs.Tables[0].Rows[0]["HRemark"]); objJsonResult.data = null; return objJsonResult; } } //å®¡æ ¸åæ® if (!oBill.CheckBill(HInterID, oBill.omodel.HBillNo, "h_p_SB_EquipICMOTechParamBill_AfterCheckCtrl", HMaker, ref ClsPub.sExeReturnInfo)) { objJsonResult.code = "0"; objJsonResult.count = 0; objJsonResult.Message = "å®¡æ ¸å¤±è´¥!åå :" + ClsPub.sExeReturnInfo; objJsonResult.data = null; return objJsonResult; } else { objJsonResult.code = "0"; objJsonResult.count = 1; objJsonResult.Message = "åæ®å·ï¼"+ oBill.omodel.HBillNo+ " å®¡æ ¸æåï¼"; objJsonResult.data = null; return objJsonResult; ; } } else { if (oBill.omodel.HChecker.Trim() == "") { objJsonResult.code = "0"; objJsonResult.count = 0; objJsonResult.Message = "åæ®æªå®¡æ ¸ï¼ä¸éè¦åå®¡æ ¸ï¼"; objJsonResult.data = null; return objJsonResult; } //åå®¡æ ¸åæ§å¶ DataSet BeforeDs = oCn.RunProcReturn("Exec h_p_SB_EquipICMOTechParamBill_BeforeUnCheckCtrl " + HInterID.ToString() + ",'" + HMaker + "'", "h_p_SB_EquipICMOTechParamBill_BeforeUnCheckCtrl"); if (BeforeDs == null || BeforeDs.Tables[0].Rows.Count == 0) { objJsonResult.code = "0"; objJsonResult.count = 0; objJsonResult.Message = "åå®¡æ ¸åå¤æå¤±è´¥ï¼"; objJsonResult.data = null; return objJsonResult; } else { if (DBUtility.ClsPub.isLong(BeforeDs.Tables[0].Rows[0]["HBack"]) == 1) { objJsonResult.code = "0"; objJsonResult.count = 0; objJsonResult.Message = "åå®¡æ ¸å¤±è´¥ï¼" + DBUtility.ClsPub.isStrNull(BeforeDs.Tables[0].Rows[0]["HRemark"]); objJsonResult.data = null; return objJsonResult; } } //åå®¡æ ¸åæ® if (!oBill.AbandonCheck(HInterID, oBill.omodel.HBillNo, "h_p_SB_EquipICMOTechParamBill_AfterUnCheckCtrl", HMaker, ref ClsPub.sExeReturnInfo)) { objJsonResult.code = "0"; objJsonResult.count = 0; objJsonResult.Message = "åå®¡æ ¸å¤±è´¥!åå :" + ClsPub.sExeReturnInfo; objJsonResult.data = null; return objJsonResult; } else { objJsonResult.code = "0"; objJsonResult.count = 1; objJsonResult.Message = "åæ®å·ï¼" + oBill.omodel.HBillNo + " åå®¡æ ¸æåï¼"; objJsonResult.data = null; return objJsonResult; ; } } } else { objJsonResult.code = "0"; objJsonResult.count = 0; objJsonResult.Message = "æªæ¥è¯¢å°è¯¥è®¾å¤å·¥èºåæ°è®¢åç¹æ£è¡¨ï¼è¯·å·æ°æ°æ®åéæ°éæ©ï¼"; objJsonResult.data = null; return objJsonResult; } } catch (Exception e) { objJsonResult.code = "0"; objJsonResult.count = 0; objJsonResult.Message = "å®¡æ ¸æåå®¡æ ¸è®¾å¤å·¥èºåæ°è®¢åç¹æ£è¡¨å¤±è´¥ï¼" + e.ToString(); objJsonResult.data = null; return objJsonResult; } } #endregion #region 设å¤å·¥èºåæ°è®¢åç¹æ£è¡¨å ³é/åå ³é /// <summary> /// å ³é/åå ³é设å¤å·¥èºåæ°è®¢åç¹æ£è¡¨ /// </summary> /// <param name="HInterID">åæ®ID</param> /// <param name="Type">å ³é(1),åå ³é(2)</param> /// <param name="HMaker">å ³é人</param> /// <returns></returns> [Route("SB_EquipICMOTechParamBillController/GetSB_EquipICMOTechParamBill_Close_Json")] [HttpGet] public object GetSB_EquipICMOTechParamBill_Close_Json(Int64 HInterID, int Type, string HMaker) { try { //夿æé if (!DBUtility.ClsPub.Security_Log(ModRightNameClose, 3, false, HMaker)) { objJsonResult.code = "0"; objJsonResult.count = 0; objJsonResult.Message = "æ¨æ²¡æè¯¥æ¨¡åå ³é/åå ³éåè½æé,请ä¸ç®¡çåèç³»ï¼"; objJsonResult.data = null; return objJsonResult; } //夿å卿§ if (oBill.ShowBill(HInterID, ref DBUtility.ClsPub.sExeReturnInfo)) { //夿ä¼è®¡ææ¯å¦åç string s = ""; int sYear = 0; int sPeriod = 0; if (DBUtility.Xt_BaseBillFun.Fun_AllowYearPeriod(oBill.omodel.HDate, ref sYear, ref sPeriod, ref s) == false) { objJsonResult.code = "0"; objJsonResult.count = 0; objJsonResult.Message = s; objJsonResult.data = null; return objJsonResult; } //Type 1 å ³é 2 åå ³é if (Type == 1) { if (oBill.omodel.HCloseMan.Trim() != "") { objJsonResult.code = "0"; objJsonResult.count = 0; objJsonResult.Message = "åæ®å·²å ³éï¼ä¸è½åæ¬¡å ³éï¼"; objJsonResult.data = null; return objJsonResult; } //å ³éåæ® if (!oBill.CloseBill(HInterID, oBill.omodel.HBillNo, HMaker, ref ClsPub.sExeReturnInfo)) { objJsonResult.code = "0"; objJsonResult.count = 0; objJsonResult.Message = "å ³é失败!åå :" + ClsPub.sExeReturnInfo; objJsonResult.data = null; return objJsonResult; } else { objJsonResult.code = "0"; objJsonResult.count = 1; objJsonResult.Message = "åæ®å·ï¼" + oBill.omodel.HBillNo + " å ³éæåï¼"; objJsonResult.data = null; return objJsonResult; ; } } else { if (oBill.omodel.HCloseMan.Trim() == "") { objJsonResult.code = "0"; objJsonResult.count = 0; objJsonResult.Message = "åæ®æªå ³éï¼ä¸éè¦åå ³éï¼"; objJsonResult.data = null; return objJsonResult; } //åå ³éåæ® if (!oBill.CancelClose(HInterID, oBill.omodel.HBillNo, HMaker, ref ClsPub.sExeReturnInfo)) { objJsonResult.code = "0"; objJsonResult.count = 0; objJsonResult.Message = "åå ³é失败!åå :" + ClsPub.sExeReturnInfo; objJsonResult.data = null; return objJsonResult; } else { objJsonResult.code = "0"; objJsonResult.count = 1; objJsonResult.Message = "åæ®å·ï¼" + oBill.omodel.HBillNo + " åå ³éæåï¼"; objJsonResult.data = null; return objJsonResult; ; } } } else { objJsonResult.code = "0"; objJsonResult.count = 0; objJsonResult.Message = "æªæ¥è¯¢å°è¯¥è®¾å¤å·¥èºåæ°è®¢åç¹æ£è¡¨ï¼è¯·å·æ°æ°æ®åéæ°éæ©ï¼"; objJsonResult.data = null; return objJsonResult; } } catch (Exception e) { objJsonResult.code = "0"; objJsonResult.count = 0; objJsonResult.Message = "å ³éæåå ³é设å¤å·¥èºåæ°è®¢åç¹æ£è¡¨å¤±è´¥ï¼" + e.ToString(); objJsonResult.data = null; return objJsonResult; } } #endregion #region 设å¤å·¥èºåæ°è®¢åç¹æ£è¡¨ä½åº/åä½åº /// <summary> /// ä½åº/åä½åºè®¾å¤å·¥èºåæ°è®¢åç¹æ£è¡¨ /// </summary> /// <param name="HInterID">åæ®ID</param> /// <param name="Type">ä½åº(1),åä½åº(2)</param> /// <param name="HMaker">ä½åºäºº</param> /// <returns></returns> [Route("SB_EquipICMOTechParamBillController/GetSB_EquipICMOTechParamBill_Cancelltion_Json")] [HttpGet] public object GetSB_EquipICMOTechParamBill_Cancelltion_Json(Int64 HInterID, int Type, string HMaker) { try { //夿æé if (!DBUtility.ClsPub.Security_Log(ModRightNameDelete, 3, false, HMaker)) { objJsonResult.code = "0"; objJsonResult.count = 0; objJsonResult.Message = "æ¨æ²¡æè¯¥æ¨¡åä½åº/åä½åºåè½æé,请ä¸ç®¡çåèç³»ï¼"; objJsonResult.data = null; return objJsonResult; } //夿å卿§ if (oBill.ShowBill(HInterID, ref DBUtility.ClsPub.sExeReturnInfo)) { //夿ä¼è®¡ææ¯å¦åç string s = ""; int sYear = 0; int sPeriod = 0; if (DBUtility.Xt_BaseBillFun.Fun_AllowYearPeriod(oBill.omodel.HDate, ref sYear, ref sPeriod, ref s) == false) { objJsonResult.code = "0"; objJsonResult.count = 0; objJsonResult.Message = s; objJsonResult.data = null; return objJsonResult; } //Type 1 ä½åº 2 åä½åº if (Type == 1) { if (oBill.omodel.HDeleteMan.Trim() != "") { objJsonResult.code = "0"; objJsonResult.count = 0; objJsonResult.Message = "忮已ä½åºï¼ä¸è½å次ä½åºï¼"; objJsonResult.data = null; return objJsonResult; } //ä½åºåæ® if (!oBill.Cancelltion(HInterID, oBill.omodel.HBillNo, HMaker, ref ClsPub.sExeReturnInfo)) { objJsonResult.code = "0"; objJsonResult.count = 0; objJsonResult.Message = "ä½åºå¤±è´¥!åå :" + ClsPub.sExeReturnInfo; objJsonResult.data = null; return objJsonResult; } else { objJsonResult.code = "0"; objJsonResult.count = 1; objJsonResult.Message = "åæ®å·ï¼" + oBill.omodel.HBillNo + " ä½åºæåï¼"; objJsonResult.data = null; return objJsonResult; ; } } else { if (oBill.omodel.HDeleteMan.Trim() == "") { objJsonResult.code = "0"; objJsonResult.count = 0; objJsonResult.Message = "åæ®æªä½åºï¼ä¸éè¦åä½åºï¼"; objJsonResult.data = null; return objJsonResult; } //åä½åºåæ® if (!oBill.AbandonCancelltion(HInterID, oBill.omodel.HBillNo, HMaker, ref ClsPub.sExeReturnInfo)) { objJsonResult.code = "0"; objJsonResult.count = 0; objJsonResult.Message = "åä½åºå¤±è´¥!åå :" + ClsPub.sExeReturnInfo; objJsonResult.data = null; return objJsonResult; } else { objJsonResult.code = "0"; objJsonResult.count = 1; objJsonResult.Message = "åæ®å·ï¼" + oBill.omodel.HBillNo + " åä½åºæåï¼"; objJsonResult.data = null; return objJsonResult; ; } } } else { objJsonResult.code = "0"; objJsonResult.count = 0; objJsonResult.Message = "æªæ¥è¯¢å°è¯¥è®¾å¤å·¥èºåæ°è®¢åç¹æ£è¡¨ï¼è¯·å·æ°æ°æ®åéæ°éæ©ï¼"; objJsonResult.data = null; return objJsonResult; } } catch (Exception e) { objJsonResult.code = "0"; objJsonResult.count = 0; objJsonResult.Message = "ä½åºæåä½åºè®¾å¤å·¥èºåæ°è®¢åç¹æ£è¡¨å¤±è´¥ï¼" + e.ToString(); objJsonResult.data = null; return objJsonResult; } } #endregion #region 设å¤å·¥èºåæ°è®¢åç¹æ£è¡¨æ¨¡å ä»å表é䏿å¼åæ®ï¼è¿ååæ®ä¿¡æ¯æ¶è°ç¨ /// <summary> /// 设å¤å·¥èºåæ°è®¢åç¹æ£è¡¨ç¼è¾æ¶ï¼æ ¹æ®åæ®IDè·ååæ®ä¿¡æ¯ /// </summary> /// <returns></returns> [Route("SB_EquipICMOTechParamBillController/GetSB_EquipICMOTechParamBill_Json")] [HttpGet] public object GetSB_EquipICMOTechParamBill_Json(Int64 HInterID, string HMaker) { try { //夿æé if (!DBUtility.ClsPub.Security_Log(ModRightNameEdit, 3, false, HMaker)) { objJsonResult.code = "0"; objJsonResult.count = 0; objJsonResult.Message = "æ¨æ²¡æè¯¥æ¨¡åç¼è¾æé,请ä¸ç®¡çåèç³»ï¼"; objJsonResult.data = null; return objJsonResult; } //è¿ååè¡¨ä¿¡æ¯ ds = oCn.RunProcReturn("exec h_p_SB_EquipICMOTechParamBill_EditInit " + HInterID, "h_p_SB_EquipICMOTechParamBill_EditInit"); 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 #region 设å¤å·¥èºåæ°è®¢åç¹æ£è¡¨ä¿å /// <summary> /// 设å¤å·¥èºåæ°è®¢åç¹æ£è¡¨ä¿å /// </summary> [Route("SB_EquipICMOTechParamBillController/GetSB_EquipICMOTechParamBill_Save_Json")] [HttpPost] public object GetSB_EquipICMOTechParamBill_Save_Json([FromBody] JObject sMainSub) { var _value = sMainSub["sMainSub"].ToString(); string msg1 = _value.ToString(); string[] sArray = msg1.Split(new string[] { ";" }, StringSplitOptions.RemoveEmptyEntries); string sMainStr = sArray[0].ToString(); //ä¸»è¡¨æ°æ® string sSubStr = sArray[1].ToString(); //åè¡¨æ°æ® string OperationType = sArray[2].ToString(); //æä½ç±»åï¼1æ°å¢ã2ç¼è¾ï¼ string HMaker = sArray[3].ToString(); //å¶å人 try { //夿æé if (OperationType == "1") { BillStatus = DBUtility.ClsPub.Enum_BillStatus.BillStatus_AddNew; //夿æ°å¢æé if (!DBUtility.ClsPub.Security_Log(ModRightName, 1, false, HMaker)) { objJsonResult.code = "0"; objJsonResult.count = 0; objJsonResult.Message = "æ¨æ²¡æè¯¥æ¨¡åæ°å¢æé,请ä¸ç®¡çåèç³»ï¼"; objJsonResult.data = null; return objJsonResult; } } else { BillStatus = DBUtility.ClsPub.Enum_BillStatus.BillStatus_Modify; //夿ç¼è¾æé if (!DBUtility.ClsPub.Security_Log(ModRightNameEdit, 1, false, HMaker)) { objJsonResult.code = "0"; objJsonResult.count = 0; objJsonResult.Message = "æ¨æ²¡æè¯¥æ¨¡åç¼è¾æé,请ä¸ç®¡çåèç³»ï¼"; objJsonResult.data = null; return objJsonResult; } } //表头èµå¼ sMainStr = sMainStr.Replace("\\", ""); sMainStr = sMainStr.Replace("\n", ""); sMainStr = "[" + sMainStr.ToString() + "]"; List<Model.ClsSB_EquipICMOTechParamBillMain> lsmain = Newtonsoft.Json.JsonConvert.DeserializeObject<List<Model.ClsSB_EquipICMOTechParamBillMain>>(sMainStr); foreach (Model.ClsSB_EquipICMOTechParamBillMain oItem in lsmain) { //忮巿¯å¦éå¤ if (oBill.IsExistBillNo(ref ClsPub.sExeReturnInfo, oItem.HBillNo, BillStatus, oItem.HInterID)) { objJsonResult.code = "0"; objJsonResult.count = 0; objJsonResult.Message = "åæ®å·éå¤ï¼ä¸å 许ä¿åï¼"; objJsonResult.data = null; return objJsonResult; } //夿ä¼è®¡ææ¯å¦åç string s = ""; int sYear = 0; int sPeriod = 0; if (DBUtility.Xt_BaseBillFun.Fun_AllowYearPeriod(oItem.HDate, ref sYear, ref sPeriod, ref s) == false) { objJsonResult.code = "0"; objJsonResult.count = 0; objJsonResult.Message = s; objJsonResult.data = null; return objJsonResult; } oItem.HYear = sYear; oItem.HPeriod = sPeriod; DBUtility.ClsPub.CurUserName = oItem.HMaker; oBill.omodel = oItem; } //表ä½èµå¼ //æ },{æ¥æåæ°ç» //廿ãåã sSubStr = sSubStr.Substring(1, sSubStr.Length - 2); sSubStr = sSubStr.Replace("\\", ""); sSubStr = sSubStr.Replace("\n", ""); sSubStr = "[" + sSubStr.ToString() + "]"; List<Model.ClsSB_EquipICMOTechParamBillSub> ls = Newtonsoft.Json.JsonConvert.DeserializeObject<List<Model.ClsSB_EquipICMOTechParamBillSub>>(sSubStr); int i = 0; foreach (Model.ClsSB_EquipICMOTechParamBillSub oItemSub in ls) { i++; oItemSub.HEntryID = i; oItemSub.HSourceInterID = oBill.omodel.HMainSourceInterID; oItemSub.HSourceEntryID = oBill.omodel.HMainSourceEntryID; oItemSub.HSourceBillNo = oBill.omodel.HMainSourceBillNo; oItemSub.HSourceBillType = oBill.omodel.HMainSourceBillType; 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); } if (bResult) { objJsonResult.code = "0"; objJsonResult.count = 1; objJsonResult.Message = DBUtility.ClsPub.sExeReturnInfo; //æåï¼ objJsonResult.data = null; return objJsonResult; } else { objJsonResult.code = "0"; objJsonResult.count = 0; objJsonResult.Message = "ä¿å失败ï¼" + DBUtility.ClsPub.sExeReturnInfo; objJsonResult.data = null; return objJsonResult; } } catch (Exception e) { objJsonResult.code = "0"; objJsonResult.count = 0; objJsonResult.Message = "ä¿å失败ï¼" + e.Message; objJsonResult.data = null; return objJsonResult; } } #endregion } } WebAPI/Web.config
@@ -35,7 +35,7 @@ <!--<add key="sUrl" value="http://47.96.97.237/WEBS-WMS/WebService1.asmx"/> --> <!--æµè¯æå¡å¨--> <!--<add key="surl" value="http://localhost:8082/webs/webservice1.asmx"/> æ¬å°--> <!--<add key="sUrl" value="http://192.168.110.57:81/WEBS/WebService1.asmx"/>--> <!--éé¯éæ¬å°é ç½®--> <add key="surl" value="http://localhost/webs-web/webservice1.asmx"/> <!--ç¿æ¶æ¶æ¬å°é ç½®--> <!--<add key="surl" value="http://localhost/webs-web/webservice1.asmx"/>--> <!--ç¿æ¶æ¶æ¬å°é ç½®--> <!--<add key="sUrl" value="http://192.168.1.57:8082/WEBS-WMS/WebService1.asmx"/>ä¹è±--> <add key="webpages:Version" value="3.0.0.0" /> WebAPI/WebAPI.csproj
@@ -425,6 +425,7 @@ <Compile Include="Controllers\PlateBindingController.cs" /> <Compile Include="Controllers\SBGL\Gy_FixCardChangeBillController.cs" /> <Compile Include="Controllers\SBGL\Gy_FixCardBillController.cs" /> <Compile Include="Controllers\SBGL\SB_EquipICMOTechParamBillController.cs" /> <Compile Include="Controllers\SBGL\Sb_EquipBeginBillController.cs" /> <Compile Include="Controllers\SBGL\Sb_EquipStopBillController.cs" /> <Compile Include="Controllers\SBGL\Sb_EquipConkBookBillController.cs" />