| DAL/ClsWL_YayBillMain.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
| DAL/DAL.csproj | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
| Model/Model.csproj | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
| Model/物流管理/ClsWL_YayBillMainBillMain.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
| Model/物流管理/ClsWL_YayBillMainBillSub.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
| WebAPI/Controllers/条码管理/WEBSController.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
| WebAPI/Controllers/物流管理/出运单/WLYayBillController.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
| WebAPI/ListModels.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
| WebAPI/WebAPI.csproj | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 |
DAL/ClsWL_YayBillMain.cs
New file @@ -0,0 +1,389 @@ using System; using System.Collections.Generic; using System.Text; using System.Data; namespace DAL { public class ClsWL_YayBillMain : DBUtility.ClsXt_BaseBill { public Model.ClsWL_YayBillMainBillMain omodel = new Model.ClsWL_YayBillMainBillMain(); public List<Model.ClsWL_YayBillMainBillSub> DetailColl = new List<Model.ClsWL_YayBillMainBillSub>(); string SafeString(string value, string defaultValue = "") => string.IsNullOrEmpty(value) ? defaultValue : value; // è¾ å©æ¹æ³ï¼å®å ¨è½¬æ¢ä¸ºæ´æ°ï¼å¤çnullã空å符串åéæ°å int SafeInt(string value, int defaultValue = 0) => int.TryParse(value, out int result) ? result : defaultValue; // è¾ å©æ¹æ³ï¼å®å ¨è½¬æ¢ä¸ºå°æ° decimal SafeDecimal(string value, decimal defaultValue = 0) => decimal.TryParse(value, out decimal result) ? result : defaultValue; // è¾ å©æ¹æ³ï¼å®å ¨è½¬æ¢ä¸ºæ¥æ string SafeDateTime(string dateStr, string defaultValue) { if (string.IsNullOrEmpty(dateStr) || dateStr == "\"\"") return defaultValue; if (DateTime.TryParse(dateStr, out DateTime result) && result != DateTime.MinValue) return "'" + result.ToString("yyyy-MM-dd HH:mm:ss") + "'"; return defaultValue; } public ClsWL_YayBillMain() { base.MvarItemKeySub = "WL_YayBillMain"; base.MvarItemKeySub2 = ""; base.MvarItemKeySub3 = ""; base.MvarItemKeySub4 = ""; base.MvarItemKey = "WL_YayBillMain"; base.MvarReportTitle = "åºè¿å"; base.BillType = "3321"; base.HBillSubType = "3321"; } #region åºå®ä»£ç ~ClsWL_YayBillMain() { DetailColl = null; } #endregion èªå®ä¹æ¹æ³ //ä¿®æ¹åæ® public override bool ModifyBill(Int64 lngBillKey, ref string sReturn) { try { // oCn.BeginTran(); //ä¿ååæ§å¶========================================= string HBillNote = ""; DataSet ds = oCn.RunProcReturn("Exec h_p_Gy_QCVerificationBill_BeforeSaveCtrl " + omodel.HInterID.ToString() + ", '" + omodel.HBillNo + "','" + HBillNote + "',2 ", "h_p_Gy_QCVerificationBill_BeforeSaveCtrl"); if (ds == null) { sReturn = "ä¿ååå¤æå¤±è´¥ï¼"; return false; } if (DBUtility.ClsPub.isStrNull(ds.Tables[0].Rows[0]["HBack"]) != "0") { sReturn = "ä¿å失败ï¼" + DBUtility.ClsPub.isStrNull(ds.Tables[0].Rows[0]["HBackRemark"]); return false; } //========================================================= //æ´æ°ä¸»è¡¨ oCn.RunProc("UpDate WL_YayBillMain set " + " HBillNo='" + omodel.HBillNo + "'" + //åºå®èµå¼=============== ",HDate='" + omodel.HDate + "'" + ",HYear='" + omodel.HYear.ToString() + "'" + ",HPeriod='" + omodel.HPeriod.ToString() + "'" + ",HRemark='" + omodel.HRemark + "'" + ",HUpDater='" + DBUtility.ClsPub.CurUserName + "'" + ",HUpDateDate=getdate()" + //======================================== ",HChecker='" + omodel.HChecker.ToString()+ "'" + ",HMainSourceBillType='" + omodel.HMainSourceBillType + "'" + ",HMainSourceBillNo='" + omodel.HMainSourceBillNo + "'" + ",HMainSourceInterID='" + omodel.HMainSourceInterID.ToString() + "'" + ",HMainSourceEntryID='" + omodel.HMainSourceEntryID.ToString() + "'" + ",HCusID='" + omodel.HCusID.ToString() + "'" + ",HBeginAddr='" + omodel.HBeginAddr.ToString() + "'" + ",HEndAddr='" + omodel.HEndAddr.ToString() + "'" + ",HPickAddr='" + omodel.HPickAddr.ToString() + "'" + ",HArriverAddr='" + omodel.HArriverAddr.ToString() + "'" + ",HTransType='" + omodel.HTransType.ToString() + "'" + ",HCarTypeID='" + omodel.HCarTypeID.ToString() + "'" + ",HCarTypeMaxVolume='" + omodel.HCarTypeMaxVolume.ToString() + "'" + ",HTotalVolume='" + omodel.HTotalVolume.ToString() + "'" + ",HLoadingRate='" + omodel.HLoadingRate.ToString() + "'" + ",HContractTransportInterID='" + omodel.HContractTransportInterID.ToString() + "'" + ",HContractTransportEntryID='" + omodel.HContractTransportEntryID.ToString() + "'" + ",HContractTransportBillNo='" + omodel.HContractTransportBillNo.ToString() + "'" + ",HCarrierID='" + omodel.HCarrierID.ToString() + "'" + ",HDistance='" + omodel.HDistance.ToString() + "'" + ",HTransportTimes='" + omodel.HTransportTimes.ToString() + "'" + ",HTransportTyep='" + omodel.HTransportTyep.ToString() + "'" + ",HSSID='" + omodel.HSSID.ToString() + "'" + ",HCurID='" + omodel.HCurID.ToString() + "'" + ",HMoney='" + omodel.HMoney.ToString() + "'" + ",HDateForRequestedPick='" + omodel.HDateForRequestedPick.ToString() + "'" + ",HDataForRequestedArrived='" + omodel.HDataForRequestedArrived.ToString() + "'" + ",HCarryStatus='" + omodel.HCarryStatus.ToString() + "'" + ",HDate_CarrierSure='" + omodel.HDate_CarrierSure.ToString() + "'" + ",HDate_AllocationDriver='" + omodel.HDate_AllocationDriver.ToString() + "'" + ",HCarID='" + omodel.HCarID.ToString() + "'" + ",HDriverID='" + omodel.HDriverID.ToString() + "'" + ",HSurer_Arrive='" + omodel.HSurer_Arrive.ToString() + "'" + ",HDate_Arrive='" + omodel.HDate_Arrive.ToString() + "'" + ",HSurer_Pick='" + omodel.HSurer_Pick.ToString() + "'" + ",HDate_Pick='" + omodel.HDate_Pick.ToString() + "'" + ",HSurer_Trans='" + omodel.HSurer_Trans.ToString() + "'" + ",HDate_Trans='" + omodel.HDate_Trans.ToString() + "'" + ",HSurer_Receive='" + omodel.HSurer_Receive.ToString() + "'" + ",HDate_Receive='" + omodel.HDate_Receive.ToString() + "'" + ",HSurer_Accounting='" + omodel.HSurer_Accounting.ToString() + "'" + ",HDate_Accounting='" + omodel.HDate_Accounting.ToString() + "'" + " where HInterID=" + lngBillKey.ToString()); //å é¤å ³è DeleteRelation(ref sReturn, lngBillKey); oCn.RunProc("delete from WL_YayBillSub_Material where HInterID=" + lngBillKey); //æå ¥å表 omodel.HInterID = lngBillKey; string sql = ""; foreach (Model.ClsWL_YayBillMainBillSub oSub in DetailColl) { sql = "Insert into WL_YayBillSub_Material " + "(HInterID,HBillNo_bak,HEntryID,HCloseMan,HEntryCloseDate,HCloseType,HRemark" + ",HSourceInterID,HSourceEntryID,HSourceBillNo,HSourceBillType,HRelationQty,HRelationMoney" + ",HMaterID,HUnitID,HMouldID,HMouldLength,HMouldHeight,HMouldWidth" + ",HMouldFoldHeight,HVolume,HQty,HSNP,HMouldQty) values(" + SafeInt(omodel.HInterID.ToString(), 0) + ",'" // HInterID int + SafeString(omodel.HBillNo.ToString()) + "'," // HBillNo_bak varchar(50) + (oSub.HEntryID) + ",'" // HEntryID int + SafeString(oSub.HCloseMan?.ToString()) + "','" // HCloseMan varchar(20) + (oSub.HEntryCloseDate == null ? DateTime.Now : oSub.HEntryCloseDate) + "'," // HEntryCloseDate datetime + (oSub.HCloseType ? "1" : "0") + ",'" // HCloseType bit + SafeString(oSub.HRemark?.ToString() ?? "") + "'," // HRemark varchar(200) + (oSub.HSourceInterID == null ? 0 : oSub.HSourceInterID) + "," // HSourceInterID int + (oSub.HSourceEntryID == null ? 0 : oSub.HSourceEntryID) + ",'" // HSourceEntryID int + SafeString(oSub.HSourceBillNo?.ToString(), "") + "','" // HSourceBillNo varchar(50) + SafeString(oSub.HSourceBillType?.ToString(), "") + "'," // HSourceBillType varchar(10) + (oSub.HRelationQty == null ? 0 : oSub.HRelationQty) + "," // HRelationQty dec(18,8) + (oSub.HRelationMoney) + "," // HRelationMoney dec(18,8) + (oSub.HMaterID) + "," // HMaterID int + (oSub.HUnitID.ToString() == "" ? 0 : oSub.HUnitID) + "," // HUnitID int + (oSub.HMouldID) + "," // HMouldID int + (oSub.HMouldLength.ToString() == "" ? 0 : oSub.HMouldLength) + "," // HMouldLength dec(18,8) + (oSub.HMouldHeight.ToString() == "" ? 0 : oSub.HMouldHeight) + "," // HMouldHeight dec(18,8) + (oSub.HMouldWidth.ToString() == "" ? 0 : oSub.HMouldWidth) + "," // HMouldWidth dec(18,8) + (oSub.HMouldFoldHeight.ToString() == "" ? 0 : oSub.HMouldFoldHeight) + "," // HMouldFoldHeight dec(18,8) + (oSub.HVolume.ToString() == "" ? 0 : oSub.HVolume) + "," // HVolume dec(18,8) + (oSub.HQty.ToString() == "" ? 0 : oSub.HQty) + "," // HQty dec(18,8) + (oSub.HSNP.ToString() == "" ? 0 : oSub.HSNP) + "," // HSNP dec(18,8) + (oSub.HMouldQty.ToString() == "" ? 0 : oSub.HMouldQty) + ")"; // HMouldQty dec(18,8) oCn.RunProc(sql); } //=========================ä¿ååæ§å¶ DataSet ds2 = oCn.RunProcReturn("Exec h_p_Gy_QCVerificationBill_AfterSaveCtrl " + omodel.HInterID.ToString() + ", '" + omodel.HBillNo + "',2 ", "h_p_Gy_QCVerificationBill_AfterSaveCtrl"); if (ds2 == null) { sReturn = "ä¿ååæ§å¶å¤æå¤±è´¥ï¼"; oCn.RollBack(); return false; } if (DBUtility.ClsPub.isStrNull(ds2.Tables[0].Rows[0]["HBack"]) != "0") { sReturn = "ä¿å失败2ï¼" + DBUtility.ClsPub.isStrNull(ds2.Tables[0].Rows[0]["HBackRemark"]); oCn.RollBack(); return false; } //============================ sReturn = "ä¿®æ¹åæ®æåï¼"; oCn.Commit(); return true; } catch (Exception e) { sReturn = e.Message; oCn.RollBack(); throw (e); } } //æ°å¢åæ® public override bool AddBill(ref string sReturn) { try { //å¾å°mainid omodel.HInterID = DBUtility.ClsPub.CreateBillID(BillType, ref DBUtility.ClsPub.sExeReturnInfo); //ä¿ååæ§å¶========================================= string HBillNote = ""; DataSet ds = oCn.RunProcReturn("Exec h_p_Gy_QCVerificationBill_BeforeSaveCtrl " + omodel.HInterID.ToString() + ", '" + omodel.HBillNo + "','" + HBillNote + "',1 ", "h_p_Gy_QCVerificationBill_BeforeSaveCtrl"); if (ds == null) { sReturn = "ä¿ååå¤æå¤±è´¥ï¼"; return false; } if (DBUtility.ClsPub.isStrNull(ds.Tables[0].Rows[0]["HBack"]) != "0") { sReturn = "ä¿å失败ï¼" + DBUtility.ClsPub.isStrNull(ds.Tables[0].Rows[0]["HBackRemark"]); return false; } //========================================================= oCn.BeginTran(); // è·åå½åæ¥ææ¶é´ï¼ç¨äºç©ºæ¥æå段çé»è®¤å¼ // è·åå½åæ¥ææ¶é´ string currentDateTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"); // è¾ å©æ¹æ³ï¼å®å ¨è½¬æ¢ä¸ºå符串ï¼å¤çnullå空å符串 string sql = "Insert Into WL_YayBillMain " + "(HInterID,HYear,HPeriod,HBillType,HBillSubType,HDate,HBillNo,HBillStatus," + "HCheckItemNowID,HCheckItemNextID,HCheckFlowID,HRemark,HBacker,HBackDate," + "HBackRemark,HChecker,HCheckDate,HMaker,HMakeDate,HUpDater,HUpDateDate," + "HCloseMan,HCloseDate,HCloseType,HDeleteMan,HDeleteDate," + "HMainSourceBillType,HMainSourceInterID,HMainSourceEntryID,HMainSourceBillNo," + "HPrintQty,HOrgID,HCusID,HBeginAddr,HEndAddr,HPickAddr," + "HArriverAddr,HTransType,HCarTypeID,HCarTypeMaxVolume,HTotalVolume," + "HLoadingRate,HContractTransportInterID,HContractTransportEntryID," + "HContractTransportBillNo,HCarrierID,HDistance,HTransportTimes," + "HTransportTyep,HSSID,HCurID,HMoney,HDateForRequestedPick," + "HDataForRequestedArrived,HCarryStatus,HDate_CarrierSure," + "HDate_AllocationDriver,HCarID,HDriverID,HSurer_Arrive,HDate_Arrive," + "HSurer_Pick,HDate_Pick,HSurer_Trans,HDate_Trans,HSurer_Receive," + "HDate_Receive,HSurer_Accounting,HDate_Accounting) " + "values(" + SafeInt(omodel.HInterID.ToString(), 0) + "," + // HInterID "0,0," + // HYear, HPeriod - éè¦ä»HDate计ç®ï¼è¿éå ç»0 "'" + SafeString(this.BillType) + "'," + "'" + SafeString(this.HBillSubType) + "'," + SafeDateTime(omodel.HDate.ToString(), "'" + currentDateTime + "'") + "," + "'" + SafeString(omodel.HBillNo) + "'," + SafeInt(omodel.HBillStatus.ToString(), 1) + "," + // HBillStatus SafeInt(omodel.HCheckItemNowID.ToString(), 0) + "," + // HCheckItemNowID SafeInt(omodel.HCheckItemNextID.ToString(), 0) + "," + // HCheckItemNextID SafeInt(omodel.HCheckFlowID.ToString(), 0) + "," + // HCheckFlowID "'" + SafeString(omodel.HRemark) + "'," + "'" + SafeString(omodel.HBacker) + "'," + SafeDateTime(omodel.HBackDate?.ToString(), "NULL") + "," + "'" + SafeString(omodel.HBackRemark) + "'," + "'" + SafeString(omodel.HChecker) + "'," + SafeDateTime(omodel.HCheckDate?.ToString(), "NULL") + "," + "'" + SafeString(omodel.HMaker) + "',getdate()," + // HMaker, HMakeDate "'" + SafeString(omodel.HUpDater) + "'," + SafeDateTime(omodel.HUpDateDate?.ToString(), "NULL") + "," + "'" + SafeString(omodel.HCloseMan) + "'," + SafeDateTime(omodel.HCloseDate?.ToString(), "NULL") + "," + (omodel.HCloseType.ToString() == "1" ? "1" : "0") + "," + // HCloseType "'" + SafeString(omodel.HDeleteMan) + "'," + SafeDateTime(omodel.HDeleteDate?.ToString(), "NULL") + "," + "'" + SafeString(omodel.HMainSourceBillType) + "'," + SafeInt(omodel.HMainSourceInterID.ToString(), 0) + "," + // HMainSourceInterID SafeInt(omodel.HMainSourceEntryID.ToString(), 0) + "," + // HMainSourceEntryID "'" + SafeString(omodel.HMainSourceBillNo) + "'," + SafeInt(omodel.HPrintQty.ToString(), 0) + "," + // HPrintQty SafeInt(omodel.HOrgID.ToString(), 0) + "," + // HOrgID SafeInt(omodel.HCusID?.ToString(), 0) + "," + // HCusID SafeInt(omodel.HBeginAddr?.ToString(), 0) + "," + // HBeginAddr SafeInt(omodel.HEndAddr?.ToString(), 0) + "," + // HEndAddr "'" + SafeString(omodel.HPickAddr) + "'," + "'" + SafeString(omodel.HArriverAddr) + "'," + "'" + SafeString(omodel.HTransType) + "'," + SafeInt(omodel.HCarTypeID?.ToString(), 0) + "," + // HCarTypeID SafeDecimal(omodel.HCarTypeMaxVolume?.ToString(), 0) + "," + // HCarTypeMaxVolume SafeDecimal(omodel.HTotalVolume?.ToString(), 0) + "," + // HTotalVolume SafeDecimal(omodel.HLoadingRate?.ToString(), 0) + "," + // HLoadingRate SafeInt(omodel.HContractTransportInterID?.ToString(), 0) + "," + // HContractTransportInterID SafeInt(omodel.HContractTransportEntryID?.ToString(), 0) + "," + // HContractTransportEntryID "'" + SafeString(omodel.HContractTransportBillNo) + "'," + SafeInt(omodel.HCarrierID?.ToString(), 0) + "," + // HCarrierID SafeDecimal(omodel.HDistance?.ToString(), 0) + "," + // HDistance SafeDecimal(omodel.HTransportTimes?.ToString(), 0) + "," + // HTransportTimes "'" + SafeString(omodel.HTransportTyep) + "'," + SafeInt(omodel.HSSID?.ToString(), 0) + "," + // HSSID SafeInt(omodel.HCurID?.ToString(), 0) + "," + // HCurID SafeDecimal(omodel.HMoney?.ToString(), 0) + "," + // HMoney SafeDateTime(omodel.HDateForRequestedPick?.ToString(), "'" + currentDateTime + "'") + "," + SafeDateTime(omodel.HDataForRequestedArrived?.ToString(), "'" + currentDateTime + "'") + "," + SafeInt(omodel.HCarryStatus?.ToString(), 1) + "," + // HCarryStatus SafeDateTime(omodel.HDate_CarrierSure?.ToString(), "'" + currentDateTime + "'") + "," + SafeDateTime(omodel.HDate_AllocationDriver?.ToString(), "'" + currentDateTime + "'") + "," + SafeInt(omodel.HCarID?.ToString(), 0) + "," + // HCarID SafeInt(omodel.HDriverID?.ToString(), 0) + "," + // HDriverID "'" + SafeString(omodel.HSurer_Arrive) + "'," + SafeDateTime(omodel.HDate_Arrive?.ToString(), "'" + currentDateTime + "'") + "," + "'" + SafeString(omodel.HSurer_Pick) + "'," + SafeDateTime(omodel.HDate_Pick?.ToString(), "'" + currentDateTime + "'") + "," + "'" + SafeString(omodel.HSurer_Trans) + "'," + SafeDateTime(omodel.HDate_Trans?.ToString(), "'" + currentDateTime + "'") + "," + "'" + SafeString(omodel.HSurer_Receive) + "'," + SafeDateTime(omodel.HDate_Receive?.ToString(), "'" + currentDateTime + "'") + "," + "'" + SafeString(omodel.HSurer_Accounting) + "'," + SafeDateTime(omodel.HDate_Accounting?.ToString(), "'" + currentDateTime + "'") + ")"; oCn.RunProc(sql); //主表 //æå ¥å表 foreach (Model.ClsWL_YayBillMainBillSub oSub in DetailColl) { sql = "Insert into WL_YayBillSub_Material " + "(HInterID,HBillNo_bak,HEntryID,HCloseMan,HEntryCloseDate,HCloseType,HRemark" + ",HSourceInterID,HSourceEntryID,HSourceBillNo,HSourceBillType,HRelationQty,HRelationMoney" + ",HMaterID,HUnitID,HMouldID,HMouldLength,HMouldHeight,HMouldWidth" + ",HMouldFoldHeight,HVolume,HQty,HSNP,HMouldQty) values(" + SafeInt(omodel.HInterID.ToString(), 0) + ",'" // HInterID int + SafeString(omodel.HBillNo.ToString()) + "'," // HBillNo_bak varchar(50) + (oSub.HEntryID) + ",'" // HEntryID int + SafeString(oSub.HCloseMan?.ToString()) + "','" // HCloseMan varchar(20) + (oSub.HEntryCloseDate == null ? DateTime.Now : oSub.HEntryCloseDate) + "'," // HEntryCloseDate datetime + (oSub.HCloseType ? "1" : "0") + ",'" // HCloseType bit + SafeString(oSub.HRemark?.ToString() ?? "") + "'," // HRemark varchar(200) + (oSub.HSourceInterID == null ? 0 : oSub.HSourceInterID) + "," // HSourceInterID int + (oSub.HSourceEntryID == null ? 0 : oSub.HSourceEntryID) + ",'" // HSourceEntryID int + SafeString(oSub.HSourceBillNo?.ToString(), "") + "','" // HSourceBillNo varchar(50) + SafeString(oSub.HSourceBillType?.ToString(), "") + "'," // HSourceBillType varchar(10) + (oSub.HRelationQty == null ? 0 : oSub.HRelationQty) + "," // HRelationQty dec(18,8) + (oSub.HRelationMoney) + "," // HRelationMoney dec(18,8) + (oSub.HMaterID) + "," // HMaterID int + (oSub.HUnitID.ToString() == "" ? 0 : oSub.HUnitID) + "," // HUnitID int + (oSub.HMouldID) + "," // HMouldID int + (oSub.HMouldLength.ToString() == "" ? 0 : oSub.HMouldLength) + "," // HMouldLength dec(18,8) + (oSub.HMouldHeight.ToString() == "" ? 0 : oSub.HMouldHeight) + "," // HMouldHeight dec(18,8) + (oSub.HMouldWidth.ToString() == "" ? 0 : oSub.HMouldWidth) + "," // HMouldWidth dec(18,8) + (oSub.HMouldFoldHeight.ToString() == "" ? 0 : oSub.HMouldFoldHeight) + "," // HMouldFoldHeight dec(18,8) + (oSub.HVolume.ToString() == "" ? 0 : oSub.HVolume) + "," // HVolume dec(18,8) + (oSub.HQty.ToString() == "" ? 0 : oSub.HQty) + "," // HQty dec(18,8) + (oSub.HSNP.ToString() == "" ? 0 : oSub.HSNP) + "," // HSNP dec(18,8) + (oSub.HMouldQty.ToString() == "" ? 0 : oSub.HMouldQty) + ")"; // HMouldQty dec(18,8) oCn.RunProc(sql); } //=========================ä¿ååæ§å¶ DataSet ds2 = oCn.RunProcReturn("Exec h_p_Gy_QCVerificationBill_AfterSaveCtrl " + omodel.HInterID.ToString() + ", '" + omodel.HBillNo + "',1", "h_p_Gy_QCVerificationBill_AfterSaveCtrl"); if (ds2 == null) { sReturn = "ä¿ååæ§å¶å¤æå¤±è´¥ï¼"; oCn.RollBack(); return false; } if (DBUtility.ClsPub.isStrNull(ds2.Tables[0].Rows[0]["HBack"]) != "0") { sReturn = "ä¿å失败2ï¼" + DBUtility.ClsPub.isStrNull(ds2.Tables[0].Rows[0]["HBackRemark"]); oCn.RollBack(); return false; } //============================ sReturn = "æ°å¢åæ®æåï¼"; oCn.Commit(); return true; } catch (Exception e) { sReturn = e.Message; oCn.RollBack(); throw (e); } } } } DAL/DAL.csproj
@@ -81,6 +81,7 @@ <Compile Include="APS\ClsSc_WorkBillMonthSortBill.cs" /> <Compile Include="APS\ClsSc_ICMOChangeBill.cs" /> <Compile Include="ClsGy_MaterialPackingRelation.cs" /> <Compile Include="ClsWL_YayBillMain.cs" /> <Compile Include="MES\ClsSc_MESStopRestoreWorkBill.cs" /> <Compile Include="WLGL\ClsCg_CarTrajectoryBill.cs" /> <Compile Include="ä»åºç®¡ç\å°è½¦éå®\ClsKf_TrolleyPositionBill.cs" /> Model/Model.csproj
@@ -126,6 +126,8 @@ <Compile Include="åºç¡èµæ\åºç¡èµæ\ClsGy_RepairCheckClass_Model.cs" /> <Compile Include="ç©æµç®¡ç\ClsCg_CarTrajectoryBillMain.cs" /> <Compile Include="ç©æµç®¡ç\ClsCg_CarTrajectoryBillSub.cs" /> <Compile Include="ç©æµç®¡ç\ClsWL_YayBillMainBillSub.cs" /> <Compile Include="ç©æµç®¡ç\ClsWL_YayBillMainBillMain.cs" /> <Compile Include="ç产管ç\ClsSc_ShiftsBeginInfoBillMain.cs" /> <Compile Include="ç产管ç\ClsSc_ShiftsBeginInfoBillSub.cs" /> <Compile Include="ClsHR_EmpFosterBillMain.cs" /> Model/ÎïÁ÷¹ÜÀí/ClsWL_YayBillMainBillMain.cs
New file @@ -0,0 +1,55 @@ using System; using System.Collections.Generic; using System.Text; namespace Model { public class ClsWL_YayBillMainBillMain : DBUtility.ClsXt_BaseBillMain { public Int64 HCheckEmp; public Int64 HDeptID; public Int64 HEmpID; public Int64 HOrgID; public Int64 HPrintQty; // æ°å¢å段 public int? HCusID; // 客æ·ID public int? HBeginAddr; // å§åå° public int? HEndAddr; // ç®çå° public string HPickAddr; // æè´§å°å public string HArriverAddr; // å°è´§å°å public string HTransType; // è¿è¾æ¹å¼ï¼æ´è½¦ãé¶åï¼ public int? HCarTypeID; // 车åID public decimal? HCarTypeMaxVolume; // 车åæå¤§å®¹ç§¯ public decimal? HTotalVolume; // æ»ä½ç§¯ï¼å¹³æ¹ç±³ï¼ public decimal? HLoadingRate; // è£ è½½ç public int? HContractTransportInterID; // æ¿è¿ååID public int? HContractTransportEntryID; // æ¿è¿åååID public string HContractTransportBillNo; // æ¿è¿åååæ®å· public int? HCarrierID; // æ¿è¿åID public decimal? HDistance; // è·ç¦»ï¼å ¬éï¼ public decimal? HTransportTimes; // è¿è¾æ¶æ public string HTransportTyep; // è¿è¾ç±»åï¼åç¨ï¼å¾è¿ï¼ public int? HSSID; // ç»ç®æ¹å¼ public int? HCurID; // å¸å« public decimal? HMoney; // è¿è¾è´¹ç¨ public DateTime? HDateForRequestedPick; // è¦æ±æè´§æ¶é´ public DateTime? HDataForRequestedArrived; // è¦æ±å°è´§æ¶é´ public int? HCarryStatus; // ç©æµç¶æï¼1-9ï¼ public DateTime? HDate_CarrierSure; // æ¿è¿å确认æ¶é´ public DateTime? HDate_AllocationDriver; // åé 叿ºæ¶é´ public int? HCarID; // 车è¾ID public int? HDriverID; // 叿ºID public string HSurer_Arrive; // å°å确认人 public DateTime? HDate_Arrive; // å°å确认æ¶é´ public string HSurer_Pick; // æè´§ç¡®è®¤äºº public DateTime? HDate_Pick; // æè´§ç¡®è®¤æ¶é´ public string HSurer_Trans; // åºåè¿è¾ç¡®è®¤äºº public DateTime? HDate_Trans; // åºåè¿è¾ç¡®è®¤æ¶é´ public string HSurer_Receive; // ç¾æ¶ç¡®è®¤äºº public DateTime? HDate_Receive; // ç¾æ¶ç¡®è®¤æ¶é´ public string HSurer_Accounting; // æ ¸ç®äºº public DateTime? HDate_Accounting; // æ ¸ç®æ¶é´ } } Model/ÎïÁ÷¹ÜÀí/ClsWL_YayBillMainBillSub.cs
New file @@ -0,0 +1,48 @@ using System; using System.Collections.Generic; using System.Text; namespace Model { public class ClsWL_YayBillMainBillSub : DBUtility.ClsXt_BaseBillMain { // å ³è主表 public int HInterID { get; set; } // 主å ç public string HBillNo_bak { get; set; } // åæ®å·ï¼å¤ä»½ï¼ // åè¡¨ä¿¡æ¯ public int HEntryID { get; set; } // åå ç // è¡å ³éç¸å ³ public string HCloseMan { get; set; } // è¡å ³é人 public DateTime HEntryCloseDate { get; set; } // è¡å ³éæ¥æ public bool HCloseType { get; set; } // å ³éç±»å // 夿³¨ public string HRemark { get; set; } // 表ä½å¤æ³¨ // æºåä¿¡æ¯ public int HSourceInterID { get; set; } // æºåID public int HSourceEntryID { get; set; } // æºååID public string HSourceBillNo { get; set; } // æºååå· public string HSourceBillType { get; set; } // æºåç±»å public decimal HRelationQty { get; set; } // å ³èæ°é public decimal HRelationMoney { get; set; } // å ³èéé¢ // èªå¢å public int HItemSubID { get; set; } // èªå¢å ///èªå®ä¹ public int HMaterID { get; set; } public int HUnitID { get; set; } public int HMouldID { get; set; } public decimal HMouldLength { get; set; } public decimal HMouldHeight { get; set; } public decimal HMouldWidth { get; set; } public decimal HMouldFoldHeight { get; set; } public decimal HVolume { get; set; } public decimal HQty { get; set; } public decimal HSNP { get; set; } public decimal HMouldQty { get; set; } } } WebAPI/Controllers/ÌõÂë¹ÜÀí/WEBSController.cs
@@ -13675,7 +13675,7 @@ #endregion #region æ·»åº·æ ¹æ®å°è½¦æ¡ç æ¾åºç¸åºç©æ #endregion [Route("WEBSController/GetMaterIDByCarBarCode")] [HttpGet] public object GetMaterIDByCarBarCode(string CarBarCode) @@ -13718,5 +13718,6 @@ return objJsonResult; } } #endregion } } WebAPI/Controllers/ÎïÁ÷¹ÜÀí/³öÔ˵¥/WLYayBillController.cs
New file @@ -0,0 +1,551 @@ using Newtonsoft.Json; using Newtonsoft.Json.Linq; using Pub_Class; using System; using System.Collections.Generic; using System.Data; using System.Linq; using System.Net; using System.Net.Http; using System.Web; using System.Web.Http; using WebAPI.Models; namespace WebAPI.Controllers { public class WLYayBillController : ApiController { public DBUtility.ClsPub.Enum_BillStatus BillStatus;//åæ®ç¶æï¼æ°å¢ï¼ä¿®æ¹ï¼æµè§ï¼æ´æ°åä»·ï¼åæ´ï¼ private json objJsonResult = new json(); public DataSet ds = new DataSet(); public DataSet ds1 = new DataSet(); SQLHelper.ClsCN oCN = new SQLHelper.ClsCN(); #region å页å表 [Route("WLYayBillController/GetListPage")] [HttpGet] public object GetListPage(string sWhere, string user) { try { List<object> columnNameList = new List<object>(); if (!DBUtility.ClsPub.Security_Log("Gy_QCVerificationBillMain_Query", 1, false, user)) { objJsonResult.code = "0"; objJsonResult.count = 0; objJsonResult.Message = "æ æ¥çæéï¼"; objJsonResult.data = null; return objJsonResult; } if (sWhere == null || sWhere.Equals("")) { ds = oCN.RunProcReturn("select * from h_v_WL_YayBill order by åæ®å· desc", "h_v_WL_YayBill"); } else { string sql1 = "select * from h_v_WL_YayBill where 1 = 1 "; string sql = sql1 + sWhere + " order by åæ®å· desc"; ds = oCN.RunProcReturn(sql, "h_v_WL_YayBill"); } //æ·»å åå 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 = "1"; objJsonResult.count = 1; objJsonResult.Message = "Sucessï¼"; objJsonResult.data = ds.Tables[0]; objJsonResult.list = columnNameList; return objJsonResult; } catch (Exception ex) { objJsonResult.code = "0"; objJsonResult.count = 0; objJsonResult.Message = "没æè¿åä»»ä½è®°å½ï¼" + ex.ToString(); objJsonResult.data = null; return objJsonResult; } } #endregion #region æ ¹æ®æºåä¼ ç©æå表 [Route("WLYayBillController/GetMesByOrginBill")] [HttpGet] public object GetMesByOrginBill(string ListMaterial) { try { if (ListMaterial.EndsWith(";")) { ListMaterial = ListMaterial.Remove(ListMaterial.Length - 1); } ListMaterial = ListMaterial.Replace(';', ','); List<object> columnNameList = new List<object>(); ds = oCN.RunProcReturn("select a.*,b.HUnitID from h_v_Gy_MaterialPackingRelationList_Edit a left JOIN Gy_Material b on a.HMaterID=b.HItemID where HDefaultSendPackFlag=1 and HMaterID in (" + ListMaterial+")", "h_v_Gy_MaterialPackingRelationList"); //æ·»å åå 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 = "1"; objJsonResult.count = 1; objJsonResult.Message = "Sucessï¼"; objJsonResult.data = ds.Tables[0]; objJsonResult.list = columnNameList; return objJsonResult; } catch (Exception ex) { objJsonResult.code = "0"; objJsonResult.count = 0; objJsonResult.Message = "没æè¿åä»»ä½è®°å½ï¼" + ex.ToString(); objJsonResult.data = null; return objJsonResult; } } #endregion #region ä¿å/ç¼è¾ [Route("WLYayBillController/SaveBill")] [HttpPost] public object SaveBill([FromBody] JObject msg) { var _value = msg["msg"].ToString(); string msg1 = _value.ToString(); string[] sArray = msg1.Split(new string[] { ";" }, StringSplitOptions.RemoveEmptyEntries); string msg2 = sArray[0].ToString(); string msg3 = sArray[1].ToString(); string msg4 = sArray[2].ToString(); ListModels oListModels = new ListModels(); try { if (!DBUtility.ClsPub.Security_Log("Gy_QCVerificationBillMain_Edit", 1, false, msg4)) { objJsonResult.code = "0"; objJsonResult.count = 0; objJsonResult.Message = "æ ä¿åæéï¼"; objJsonResult.data = null; return objJsonResult; } DAL.ClsWL_YayBillMain oBill = new DAL.ClsWL_YayBillMain(); List<Model.ClsWL_YayBillMainBillMain> lsmain = new List<Model.ClsWL_YayBillMainBillMain>(); msg2 = msg2.Replace("\\", ""); msg2 = msg2.Replace("\n", ""); //\n lsmain = oListModels.getObjectByJson_WL_YayBillMainMain(msg2); foreach (Model.ClsWL_YayBillMainBillMain oItem in lsmain) { oItem.HMaker = msg4; DBUtility.ClsPub.CurUserName = msg4; //å¶å人 oItem.HBillType = "3321"; oItem.HBillSubType = "3321"; oItem.HYear = DBUtility.ClsPub.isLong(DateTime.Now.Year); oItem.HPeriod = DBUtility.ClsPub.isLong(DateTime.Now.Month); oItem.HMakeDate = DBUtility.ClsPub.isStrNull(DateTime.Now.ToString("yyyy-MM-dd")); oItem.HCheckEmp = oItem.HEmpID; if (DBUtility.ClsPub.isStrNull(oItem.HDate) == "") { objJsonResult.code = "0"; objJsonResult.count = 0; objJsonResult.Message = "ä¿åå¤±è´¥ï¼æ²¡æåæ®æ¥æï¼æ æ³ä¿åï¼"; objJsonResult.data = 1; return objJsonResult; } oBill.omodel = oItem; } //è¡¨ä½æ°æ® //æ },{æ¥æåæ°ç» //廿ãåã msg3 = msg3.Substring(1, msg3.Length - 2); msg3 = msg3.Replace("\\", ""); msg3 = msg3.Replace("\n", ""); //\n //msg2 = msg2.Replace("'", "â"); List<Model.ClsWL_YayBillMainBillSub> ls = new List<Model.ClsWL_YayBillMainBillSub>(); ls = oListModels.getObjectByJson_WL_YayBillMainBillSub(msg3); int i = 0; foreach (Model.ClsWL_YayBillMainBillSub oItem in ls) { i++; oItem.HEntryID = i; oItem.HEntryCloseDate = DBUtility.ClsPub.isDate(DateTime.Now); oItem.HCloseType = false; //å ³éç±»å oBill.DetailColl.Add(oItem); } //ä¿å //ä¿å宿¯åå¤ç bool bResult; if (oBill.omodel.HInterID == 0) { 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 = "ä¿åæåï¼"; 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) { objJsonResult.code = "0"; objJsonResult.count = 0; objJsonResult.Message = "ä¿å失败ï¼" + e.ToString(); objJsonResult.data = 1; return objJsonResult; } } #endregion #region[ç¼è¾æ¶è·åæ°æ®] [Route("WLYayBillController/WL_YayBillDetail")] [HttpGet] public ApiResult<DataSet> WL_YayBillDetail(string HID) { if (string.IsNullOrEmpty(HID)) return new ApiResult<DataSet> { code = -1, msg = "IDä¸è½ä¸ºç©º" }; SQLHelper.ClsCN oCN = new SQLHelper.ClsCN(); var dataSet = oCN.RunProcReturn("select * from h_v_WL_YayBillEdit where HInterID= " + HID + " ", "h_v_WL_YayBillEdit"); if (dataSet == null || dataSet.Tables[0].Rows.Count == 0) return new ApiResult<DataSet> { code = -1, msg = "ä¸åå¨åå·" }; return new ApiResult<DataSet> { code = 1, msg = "æ¥è¯¢æå", data = dataSet }; } #endregion #region å®¡æ ¸ãåå®¡æ ¸ /// <summary> /// /// </summary> /// <param name="HInterID">åæ®ID</param> /// <param name="IsAudit">å®¡æ ¸(0),åå®¡æ ¸(1)</param> /// <param name="CurUserName">å®¡æ ¸äºº</param> /// <returns></returns> [Route("WLYayBillController/AuditWLYayBill")] [HttpGet] public object AuditWLYayBill(int HInterID, int IsAudit, string CurUserName) { try { //å®¡æ ¸æé if (!DBUtility.ClsPub.Security_Log_second("Gy_Supplier_Check", 1, false, CurUserName)) { objJsonResult.code = "0"; objJsonResult.count = 0; objJsonResult.Message = "å®¡æ ¸å¤±è´¥ï¼æ æéï¼"; objJsonResult.data = null; return objJsonResult; } var ds = oCN.RunProcReturn("select * from WL_YayBillMain where HInterID=" + HInterID, "WL_YayBillMain"); if (ds.Tables[0].Rows.Count > 0) { if (IsAudit == 0) //å®¡æ ¸å¤æ { if (ds.Tables[0].Rows[0]["HChecker"].ToString() != "") { objJsonResult.code = "0"; objJsonResult.count = 0; objJsonResult.Message = "åæ®å·²å®¡æ ¸!ä¸è½åæ¬¡å®¡æ ¸ï¼"; objJsonResult.data = null; return objJsonResult; } } if (IsAudit == 1) //åå®¡æ ¸å¤æ { if (ds.Tables[0].Rows[0]["HChecker"].ToString() == "") { objJsonResult.code = "0"; objJsonResult.count = 0; objJsonResult.Message = "åæ®æªå®¡æ ¸!ä¸éè¦åå®¡æ ¸!"; objJsonResult.data = null; return objJsonResult; } } } else { objJsonResult.code = "0"; objJsonResult.count = 0; objJsonResult.Message = "åæ®ä¸åå¨!"; objJsonResult.data = null; return objJsonResult; } oCN.BeginTran(); if (IsAudit == 0) //å®¡æ ¸å¤æ { oCN.RunProc("update WL_YayBillMain set HChecker='" + CurUserName + "',HCheckDate=getdate() ,HBillStatus=2 where HInterID=" + HInterID); objJsonResult.code = "1"; objJsonResult.count = 1; objJsonResult.Message = "å®¡æ ¸æå"; objJsonResult.data = null; } if (IsAudit == 1) //åå®¡æ ¸å¤æ { oCN.RunProc("update WL_YayBillMain set HChecker='',HCheckDate=null,HBillStatus=1 where HInterID=" + HInterID); objJsonResult.code = "1"; objJsonResult.count = 1; objJsonResult.Message = "åå®¡æ ¸æå"; objJsonResult.data = null; } oCN.Commit(); return objJsonResult; } catch (Exception e) { oCN.RollBack(); objJsonResult.code = "0"; objJsonResult.count = 0; objJsonResult.Message = "å®¡æ ¸å¤±è´¥æè åå®¡æ ¸å¤±è´¥ï¼" + e.ToString(); objJsonResult.data = null; return objJsonResult; } } #endregion #region ä¾åºå确认æ¶é´ /// <summary> /// /// </summary> /// <param name="HInterID">åæ®ID</param> /// <param name="IsAudit">å®¡æ ¸(0),åå®¡æ ¸(1)</param> /// <param name="CurUserName">å®¡æ ¸äºº</param> /// <returns></returns> [Route("WLYayBillController/ConfrimBillNo")] [HttpGet] public object ConfrimBillNo(int HInterID, int IsAudit, string CurUserName) { try { //å®¡æ ¸æé if (!DBUtility.ClsPub.Security_Log_second("Gy_Supplier_Check", 1, false, CurUserName)) { objJsonResult.code = "0"; objJsonResult.count = 0; objJsonResult.Message = "å®¡æ ¸å¤±è´¥ï¼æ æéï¼"; objJsonResult.data = null; return objJsonResult; } var ds = oCN.RunProcReturn("select * from WL_YayBillMain where HInterID=" + HInterID, "WL_YayBillMain"); oCN.BeginTran(); oCN.RunProc("update WL_YayBillMain set HDate_CarrierSure='" + DateTime.Now.ToString("yyyy-MM-dd") + "' where HInterID=" + HInterID); objJsonResult.code = "1"; objJsonResult.count = 1; objJsonResult.Message = "æå"; objJsonResult.data = null; oCN.Commit(); return objJsonResult; } catch (Exception e) { oCN.RollBack(); objJsonResult.code = "0"; objJsonResult.count = 0; objJsonResult.Message = "失败ï¼" + e.ToString(); objJsonResult.data = null; return objJsonResult; } } #endregion #region å ¶ä»ç¡®è®¤ /// <summary> /// /// </summary> /// <param name="HInterID">åæ®ID</param> /// <param name="IsAudit">å®¡æ ¸(0),åå®¡æ ¸(1)</param> /// <param name="CurUserName">å®¡æ ¸äºº</param> /// <returns></returns> [Route("WLYayBillController/ConfrimOtherBillNo")] [HttpGet] public object ConfrimOtherBillNo(int HInterID, int IsAudit, string CurUserName) { try { //å®¡æ ¸æé if (!DBUtility.ClsPub.Security_Log_second("Gy_Supplier_Check", 1, false, CurUserName)) { objJsonResult.code = "0"; objJsonResult.count = 0; objJsonResult.Message = "å®¡æ ¸å¤±è´¥ï¼æ æéï¼"; objJsonResult.data = null; return objJsonResult; } var ds = oCN.RunProcReturn("select * from WL_YayBillMain where HInterID=" + HInterID, "WL_YayBillMain"); oCN.BeginTran(); if(IsAudit== 1) { oCN.RunProc("update WL_YayBillMain set HSurer_Arrive='" + CurUserName + "',HDate_Arrive=getdate() where HInterID=" + HInterID); } else if(IsAudit == 2) { oCN.RunProc("update WL_YayBillMain set HSurer_Pick='" + CurUserName + "',HDate_Pick=getdate() where HInterID=" + HInterID); } else if(IsAudit == 3) { oCN.RunProc("update WL_YayBillMain set HSurer_Trans='" + CurUserName + "',HDate_Trans=getdate() where HInterID=" + HInterID); } else if(IsAudit == 4) { oCN.RunProc("update WL_YayBillMain set HSurer_Receive='" + CurUserName + "',HDate_Receive=getdate() where HInterID=" + HInterID); } else { throw new Exception(); } objJsonResult.code = "1"; objJsonResult.count = 1; objJsonResult.Message = "æå"; objJsonResult.data = null; oCN.Commit(); return objJsonResult; } catch (Exception e) { oCN.RollBack(); objJsonResult.code = "0"; objJsonResult.count = 0; objJsonResult.Message = "失败ï¼" + e.ToString(); objJsonResult.data = null; return objJsonResult; } } #endregion #region éæ©è½¦è¾å叿º /// <summary> /// /// </summary> /// <param name="HInterID">åæ®ID</param> /// <param name="IsAudit">å®¡æ ¸(0),åå®¡æ ¸(1)</param> /// <param name="CurUserName">å®¡æ ¸äºº</param> /// <returns></returns> [Route("WLYayBillController/selectDriver")] [HttpGet] public object selectDriver(int HInterID,int HcheckID, int IsAudit, string CurUserName) { try { DataSet ds; if(IsAudit==1) { ds = oCN.RunProcReturn("select * from h_v_Gy_CarList where HItemID=" + HcheckID, "h_v_Gy_CarList"); if (ds.Tables[0].Rows.Count > 0) { oCN.BeginTran(); oCN.RunProc("update WL_YayBillMain set HCarID='" + HcheckID + "' where HInterID=" + HInterID); objJsonResult.code = "1"; objJsonResult.count = 1; objJsonResult.Message = "æå"; objJsonResult.data = null; oCN.Commit(); return objJsonResult; } } else { ds = oCN.RunProcReturn("select * from h_v_Gy_driver where HItemID=" + HcheckID, "h_v_Gy_driver"); if (ds.Tables[0].Rows.Count > 0) { oCN.BeginTran(); oCN.RunProc("update WL_YayBillMain set HDriverID='" + HcheckID + "',HDate_AllocationDriver=getdate() where HInterID=" + HInterID); objJsonResult.code = "1"; objJsonResult.count = 1; objJsonResult.Message = "æå"; objJsonResult.data = null; oCN.Commit(); return objJsonResult; } } oCN.RollBack(); objJsonResult.code = "0"; objJsonResult.count = 0; objJsonResult.Message = "失败ï¼"; objJsonResult.data = null; return objJsonResult; } catch (Exception e) { oCN.RollBack(); objJsonResult.code = "0"; objJsonResult.count = 0; objJsonResult.Message = "失败ï¼" + e.ToString(); objJsonResult.data = null; return objJsonResult; } } #endregion } } WebAPI/ListModels.cs
@@ -711,6 +711,17 @@ return list; } /// <summary> /// å¤çè¿åjson /// </summary> /// <param name="jsonString"></param> /// <returns></returns> public List<Model.ClsWL_YayBillMainBillMain> getObjectByJson_WL_YayBillMainMain(string jsonString) { jsonString = "[" + jsonString.ToString() + "]"; List<Model.ClsWL_YayBillMainBillMain> list = Newtonsoft.Json.JsonConvert.DeserializeObject<List<Model.ClsWL_YayBillMainBillMain>>(jsonString); return list; } /// <summary> /// å¤çæ°å¢æ¨¡å ·ç»´ä¿®å表ä¿å »ä¿¡æ¯çjson /// </summary> /// <param name="jsonString"></param> @@ -745,6 +756,14 @@ return list; } public List<Model.ClsWL_YayBillMainBillSub> getObjectByJson_WL_YayBillMainBillSub(string jsonString) { jsonString = "[" + jsonString.ToString() + "]"; List<Model.ClsWL_YayBillMainBillSub> list = Newtonsoft.Json.JsonConvert.DeserializeObject<List<Model.ClsWL_YayBillMainBillSub>>(jsonString); return list; } /// <summary> /// å¤çæ°å¢æ¨¡å ·ç»´ä¿®éªæ¶å主表çjson WebAPI/WebAPI.csproj
@@ -670,6 +670,7 @@ <Compile Include="Controllers\åºç¡èµæ\åºç¡èµæ\Gy_PNLInfoTypeLevelController.cs" /> <Compile Include="Controllers\åºç¡èµæ\åºç¡èµæ\Gy_ShelfLifeNearExpiryController.cs" /> <Compile Include="Controllers\æ£éªç³è¯·å\QC_RequestCheckBillController.cs" /> <Compile Include="Controllers\ç©æµç®¡ç\åºè¿å\WLYayBillController.cs" /> <Compile Include="Controllers\项ç®ç®¡ç\å·¥ç¨é¡¹ç®\PM_ProjectBill_WorkController.cs" /> <Compile Include="DLL\ClsGy_ItemMoney_Ctl.cs" /> <Compile Include="DLL\ClsSc_MESStopRestoreWorkBill.cs" />