BLL/bin/Release/BLL.pdbBinary files differ
BLL/bin/Release/DAL.dllBinary files differ
BLL/bin/Release/DAL.pdbBinary files differ
BLL/bin/Release/DBUtility.dllBinary files differ
BLL/bin/Release/DBUtility.pdbBinary files differ
BLL/bin/Release/Model.dllBinary files differ
BLL/bin/Release/Model.pdbBinary files differ
BLL/bin/Release/Pub_Class.dllBinary files differ
BLL/bin/Release/Pub_Class.pdbBinary files differ
BLL/bin/Release/Pub_Control.dllBinary files differ
BLL/bin/Release/Pub_Control.pdbBinary files differ
BLL/bin/Release/SQLHelper.dllBinary files differ
BLL/bin/Release/SQLHelper.pdbBinary files differ
DAL/DAL.csproj
@@ -82,6 +82,7 @@ <Compile Include="APS\ClsSc_ICMOChangeBill.cs" /> <Compile Include="ClsGy_MaterialPackingRelation.cs" /> <Compile Include="MES\ClsSc_MESStopRestoreWorkBill.cs" /> <Compile Include="WLGL\ClsCg_CarTrajectoryBill.cs" /> <Compile Include="ä»åºç®¡ç\å°è½¦éå®\ClsKf_TrolleyPositionBill.cs" /> <Compile Include="åºç¡èµæ\å ¬ç¨åºç¡èµæ\ClsGy_Driver_Ctl.cs" /> <Compile Include="åºç¡èµæ\å ¬ç¨åºç¡èµæ\ClsGy_Car_Ctl_2.cs" /> @@ -1296,6 +1297,7 @@ </ItemGroup> <ItemGroup> <Folder Include="A3åæ®\" /> <Folder Include="Model\" /> <Folder Include="åºç¡èµæ\A3åºç¡èµæ\" /> <Folder Include="åºç¡èµæ\CLOUDåºç¡èµæ\" /> <Folder Include="åºç¡èµæ\ç¹æ®ç³»ç»\" /> DAL/WLGL/ClsCg_CarTrajectoryBill.cs
New file @@ -0,0 +1,684 @@ using System; using System.Collections.Generic; using System.Text; using System.Data; namespace DAL { public class ClsCg_CarTrajectoryBill : DBUtility.ClsXt_BaseBill { public Model.ClsCg_CarTrajectoryBillMain omodel = new Model.ClsCg_CarTrajectoryBillMain(); public List<Model.ClsCg_CarTrajectoryBillSub> DetailColl = new List<Model.ClsCg_CarTrajectoryBillSub>(); public ClsCg_CarTrajectoryBill() { base.MvarItemKeySub = "Cg_CarTrajectoryBillSub"; base.MvarItemKeySub2 = ""; base.MvarItemKeySub3 = ""; base.MvarItemKeySub4 = ""; base.MvarItemKey = "Cg_CarTrajectoryBillMain"; base.MvarReportTitle = "车è¾è½¨è¿¹åæ®"; base.BillType = "1119"; base.HBillSubType = "1119"; } #region åºå®ä»£ç ~ClsCg_CarTrajectoryBill() { DetailColl = null; } #endregion #region èªå®ä¹æ¹æ³ // ä¿®æ¹åæ® public override bool ModifyBill(Int64 lngBillKey, ref string sReturn) { try { oCn.BeginTran(); // ä¿ååæ§å¶ - 䏿°å¢ä¿æä¸è´ string HBillNote = ""; DataSet ds = oCn.RunProcReturn("EXEC h_p_Cg_CarTrajectoryBill_BeforeSaveCtrl " + omodel.HInterID.ToString() + ", '" + omodel.HBillNo + "','" + HBillNote + "',2 ", "h_p_Cg_CarTrajectoryBill_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; } // æ´æ°ä¸»è¡¨ string updateSql = "UPDATE Cg_CarTrajectoryBillMain SET " + "HBillNo = '" + omodel.HBillNo + "', " + "HDate = '" + omodel.HDate.ToString() + "', " + "HYear = " + omodel.HYear.ToString() + ", " + "HPeriod = " + omodel.HPeriod.ToString() + ", " + "HRemark = '" + omodel.HRemark + "', " + "HUpDater = '" + DBUtility.ClsPub.CurUserName + "', " + "HUpDateDate = GETDATE(), " + // èªå®ä¹å段 "HContractTransportBillMainID = " + (omodel.HContractTransportBillMainID.HasValue ? omodel.HContractTransportBillMainID.ToString() : "NULL") + ", " + "HContractTransportBillNo = '" + (omodel.HContractTransportBillNo ?? "") + "', " + "HCarNumber = '" + omodel.HCarNumber + "', " + "HGetTime = '" + omodel.HGetTime.ToString() + "', " + "HLongitude = " + (omodel.HLongitude.HasValue ? omodel.HLongitude.ToString() : "NULL") + ", " + "HLatitude = " + (omodel.HLatitude.HasValue ? omodel.HLatitude.ToString() : "NULL") + " " + "WHERE HInterID = " + lngBillKey.ToString(); // è°è¯è¾åº LogToFile("æ§è¡æ´æ°SQL: " + updateSql); oCn.RunProc(updateSql); // å é¤å ³è DeleteRelation(ref sReturn, lngBillKey); // å é¤å表 DeleteBillSub(omodel.HInterID); // æå ¥åè¡¨æ°æ® foreach (Model.ClsCg_CarTrajectoryBillSub oSub in DetailColl) { string insertSubSql = "INSERT INTO Cg_CarTrajectoryBillSub " + "(HInterID, HBillNo_bak, HEntryID, HCloseMan, HEntryCloseDate, HCloseType, HRemark, " + "HSourceInterID, HSourceEntryID, HSourceBillNo, HSourceBillType, HRelationQty, HRelationMoney) " + "VALUES (" + omodel.HInterID.ToString() + ", '" + omodel.HBillNo + "', " + oSub.HEntryID.ToString() + ", '" + oSub.HCloseMan + "', '" + oSub.HEntryCloseDate.ToString("yyyy-MM-dd") + "', " + Convert.ToInt32(oSub.HCloseType) + ", '" + oSub.HRemark + "', " + oSub.HSourceInterID.ToString() + ", " + oSub.HSourceEntryID.ToString() + ", '" + oSub.HSourceBillNo + "', '" + oSub.HSourceBillType + "', " + oSub.HRelationQty.ToString() + ", " + oSub.HRelationMoney.ToString() + ")"; oCn.RunProc(insertSubSql); } DataSet ds2 = oCn.RunProcReturn("EXEC h_p_Cg_CarTrajectoryBill_AfterSaveCtrl " + omodel.HInterID.ToString() + ", '" + omodel.HBillNo + "',2 ", "h_p_Cg_CarTrajectoryBill_AfterSaveCtrl"); if (ds2 == null) { sReturn = "ä¿ååæ§å¶å¤æå¤±è´¥ï¼"; oCn.RollBack(); return false; } if (DBUtility.ClsPub.isStrNull(ds2.Tables[0].Rows[0]["HBack"]) != "0") { sReturn = "ä¿å失败ï¼" + DBUtility.ClsPub.isStrNull(ds2.Tables[0].Rows[0]["HBackRemark"]); oCn.RollBack(); return false; } sReturn = "ä¿®æ¹åæ®æåï¼"; oCn.Commit(); return true; } catch (Exception e) { // è®°å½è¯¦ç»çéè¯¯ä¿¡æ¯ string errorDetails = $"ç¼è¾åæ®å¤±è´¥ï¼HInterID: {omodel.HInterID}, HBillNo: {omodel.HBillNo}\n" + $"é误信æ¯: {e.Message}\n" + $"å æ è·è¸ª: {e.StackTrace}"; LogToFile(errorDetails); System.Diagnostics.Debug.WriteLine(errorDetails); sReturn = "ç¼è¾åæ®å¤±è´¥ï¼" + e.Message; oCn.RollBack(); throw; } } // æ·»å æ¥å¿æ¹æ³ private void LogToFile(string message) { string logPath = @"D:\Logs\MES-SQL.log"; try { if (!System.IO.Directory.Exists(@"D:\Logs")) System.IO.Directory.CreateDirectory(@"D:\Logs"); System.IO.File.AppendAllText(logPath, DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") + " - " + message + Environment.NewLine); } catch { } } // æ°å¢åæ® public override bool AddBill(ref string sReturn) { try { oCn.BeginTran(); // è·åæ°çHInterID if (omodel.HInterID == 0) { sReturn = "123"; return false; } // ä¿ååæ§å¶ string HBillNote = ""; DataSet ds = oCn.RunProcReturn("EXEC h_p_Cg_CarTrajectoryBill_BeforeSaveCtrl " + omodel.HInterID.ToString() + ", '" + omodel.HBillNo + "','" + HBillNote + "',1 ", "h_p_Cg_CarTrajectoryBill_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; } // æå ¥ä¸»è¡¨ string insertMainSql = "INSERT INTO Cg_CarTrajectoryBillMain " + "(HYear, HPeriod, HBillType, HBillSubType, HInterID, 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, HContractTransportBillMainID, " + "HContractTransportBillNo, HCarNumber, HGetTime, HLongitude, HLatitude) " + "VALUES (" + omodel.HYear.ToString() + ", " + omodel.HPeriod.ToString() + ", '" + this.BillType + "', '" + this.HBillSubType + "', " + omodel.HInterID.ToString() + ", '" + omodel.HDate.ToString() + "', '" + omodel.HBillNo + "', " + omodel.HBillStatus.ToString() + ", " + omodel.HCheckItemNowID.ToString() + ", " + omodel.HCheckItemNextID.ToString() + ", " + omodel.HCheckFlowID.ToString() + ", '" + omodel.HRemark + "', '" + omodel.HBacker + "', " + (omodel.HBackDate.HasValue ? "'" + omodel.HBackDate.Value.ToString("yyyy-MM-dd HH:mm:ss") + "'" : "NULL") + ", '" + omodel.HBackRemark + "', '" + omodel.HChecker + "', " + (omodel.HCheckDate.HasValue ? "'" + omodel.HCheckDate.Value.ToString("yyyy-MM-dd HH:mm:ss") + "'" : "NULL") + ", '" + omodel.HMaker + "', '" + omodel.HMakeDate.ToString() + "', '" + omodel.HUpDater + "', " + (omodel.HUpDateDate.HasValue ? "'" + omodel.HUpDateDate.Value.ToString("yyyy-MM-dd HH:mm:ss") + "'" : "NULL") + ", '" + omodel.HCloseMan + "', " + (omodel.HCloseDate.HasValue ? "'" + omodel.HCloseDate.Value.ToString("yyyy-MM-dd HH:mm:ss") + "'" : "NULL") + ", " + Convert.ToInt32(omodel.HCloseType) + ", '" + omodel.HDeleteMan + "', " + (omodel.HDeleteDate.HasValue ? "'" + omodel.HDeleteDate.Value.ToString("yyyy-MM-dd HH:mm:ss") + "'" : "NULL") + ", '" + omodel.HMainSourceBillType + "', " + (omodel.HMainSourceInterID.HasValue ? omodel.HMainSourceInterID.ToString() : "NULL") + ", " + (omodel.HMainSourceEntryID.HasValue ? omodel.HMainSourceEntryID.ToString() : "NULL") + ", '" + omodel.HMainSourceBillNo + "', " + omodel.HPrintQty.ToString() + ", " + (omodel.HContractTransportBillMainID.HasValue ? omodel.HContractTransportBillMainID.ToString() : "NULL") + ", '" + omodel.HContractTransportBillNo + "', '" + omodel.HCarNumber + "', '" + omodel.HGetTime.ToString() + "', " + (omodel.HLongitude.HasValue ? omodel.HLongitude.ToString() : "NULL") + ", " + (omodel.HLatitude.HasValue ? omodel.HLatitude.ToString() : "NULL") + ")"; oCn.RunProc(insertMainSql); // è·åèªå¨çæçHInterID //DataSet dsMainID = oCn.RunProcReturn("SELECT SCOPE_IDENTITY() AS HInterID", "GetMainID"); //if (dsMainID != null && dsMainID.Tables[0].Rows.Count > 0) //{ // omodel.HInterID = Convert.ToInt32(dsMainID.Tables[0].Rows[0]["HInterID"]); //} // æå ¥åè¡¨æ°æ® foreach (Model.ClsCg_CarTrajectoryBillSub oSub in DetailColl) { string insertSubSql = "INSERT INTO Cg_CarTrajectoryBillSub " + "(HInterID, HBillNo_bak, HEntryID, HCloseMan, HEntryCloseDate, HCloseType, HRemark, " + "HSourceInterID, HSourceEntryID, HSourceBillNo, HSourceBillType, HRelationQty, HRelationMoney) " + "VALUES (" + omodel.HInterID.ToString() + ", '" + omodel.HBillNo + "', " + oSub.HEntryID.ToString() + ", '" + oSub.HCloseMan + "', '" + oSub.HEntryCloseDate.ToString("yyyy-MM-dd") + "', " + Convert.ToInt32(oSub.HCloseType) + ", '" + oSub.HRemark + "', " + oSub.HSourceInterID.ToString() + ", " + oSub.HSourceEntryID.ToString() + ", '" + oSub.HSourceBillNo + "', '" + oSub.HSourceBillType + "', " + oSub.HRelationQty.ToString() + ", " + oSub.HRelationMoney.ToString() + ")"; oCn.RunProc(insertSubSql); } // ä¿ååæ§å¶ DataSet ds2 = oCn.RunProcReturn("EXEC h_p_Cg_CarTrajectoryBill_AfterSaveCtrl " + omodel.HInterID.ToString() + ", '" + omodel.HBillNo + "',1 ", "h_p_Cg_CarTrajectoryBill_AfterSaveCtrl"); if (ds2 == null) { sReturn = "ä¿ååæ§å¶å¤æå¤±è´¥ï¼"; oCn.RollBack(); return false; } if (DBUtility.ClsPub.isStrNull(ds2.Tables[0].Rows[0]["HBack"]) != "0") { sReturn = "ä¿å失败ï¼" + 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 ShowBill(Int64 lngBillKey, ref string sReturn) { try { // æ¥è¯¢ä¸»è¡¨ DataSet Ds = oCn.RunProcReturn("SELECT * FROM Cg_CarTrajectoryBillMain WHERE HInterID = " + lngBillKey.ToString(), "Cg_CarTrajectoryBillMain"); if (Ds.Tables[0].Rows.Count == 0) { sReturn = "åæ®æªæ¾å°ï¼"; return false; } DataRow row = Ds.Tables[0].Rows[0]; // åºæ¬å段 - 使ç¨å®å ¨è½¬æ¢ omodel.HYear = SafeConvertToInt(row["HYear"]); omodel.HPeriod = SafeConvertToInt(row["HPeriod"]); omodel.HBillType = SafeConvertToString(row["HBillType"]); omodel.HBillSubType = SafeConvertToString(row["HBillSubType"]); omodel.HInterID = SafeConvertToInt(row["HInterID"]); omodel.HDate = SafeConvertToDateTime(row["HDate"], DateTime.Now); omodel.HBillNo = SafeConvertToString(row["HBillNo"]); omodel.HBillStatus = SafeConvertToInt(row["HBillStatus"]); omodel.HCheckItemNowID = SafeConvertToInt(row["HCheckItemNowID"]); omodel.HCheckItemNextID = SafeConvertToInt(row["HCheckItemNextID"]); omodel.HCheckFlowID = SafeConvertToInt(row["HCheckFlowID"]); omodel.HRemark = SafeConvertToString(row["HRemark"]); // å¯ç©ºæ¥æå段 omodel.HBackDate = SafeConvertToNullableDateTime(row["HBackDate"]); omodel.HBacker = SafeConvertToString(row["HBacker"]); omodel.HBackRemark = SafeConvertToString(row["HBackRemark"]); omodel.HCheckDate = SafeConvertToNullableDateTime(row["HCheckDate"]); omodel.HChecker = SafeConvertToString(row["HChecker"]); omodel.HMaker = SafeConvertToString(row["HMaker"]); omodel.HMakeDate = SafeConvertToDateTime(row["HMakeDate"], DateTime.Now); omodel.HUpDateDate = SafeConvertToNullableDateTime(row["HUpDateDate"]); omodel.HUpDater = SafeConvertToString(row["HUpDater"]); omodel.HCloseDate = SafeConvertToNullableDateTime(row["HCloseDate"]); omodel.HCloseMan = SafeConvertToString(row["HCloseMan"]); omodel.HCloseType = SafeConvertToBool(row["HCloseType"]); omodel.HDeleteDate = SafeConvertToNullableDateTime(row["HDeleteDate"]); omodel.HDeleteMan = SafeConvertToString(row["HDeleteMan"]); // æºåä¿¡æ¯ omodel.HMainSourceBillType = SafeConvertToString(row["HMainSourceBillType"]); omodel.HMainSourceInterID = row["HMainSourceInterID"] == DBNull.Value ? (int?)null : SafeConvertToInt(row["HMainSourceInterID"]); omodel.HMainSourceEntryID = row["HMainSourceEntryID"] == DBNull.Value ? (int?)null : SafeConvertToInt(row["HMainSourceEntryID"]); omodel.HMainSourceBillNo = SafeConvertToString(row["HMainSourceBillNo"]); omodel.HPrintQty = SafeConvertToInt(row["HPrintQty"]); // èªå®ä¹å段 omodel.HContractTransportBillMainID = row["HContractTransportBillMainID"] == DBNull.Value ? (int?)null : SafeConvertToInt(row["HContractTransportBillMainID"]); omodel.HContractTransportBillNo = SafeConvertToString(row["HContractTransportBillNo"]); omodel.HCarNumber = SafeConvertToString(row["HCarNumber"]); omodel.HGetTime = SafeConvertToDateTime(row["HGetTime"], DateTime.Now); // ç»çº¬åº¦å段 omodel.HLongitude = row["HLongitude"] == DBNull.Value ? (decimal?)null : SafeConvertToDecimal(row["HLongitude"]); omodel.HLatitude = row["HLatitude"] == DBNull.Value ? (decimal?)null : SafeConvertToDecimal(row["HLatitude"]); omodel.HItemMainID = SafeConvertToInt(row["HItemMainID"]); // æ¥è¯¢å表 DataSet DsSub = oCn.RunProcReturn("SELECT * FROM Cg_CarTrajectoryBillSub WHERE HInterID = " + omodel.HInterID.ToString() + " ORDER BY HEntryID", "Cg_CarTrajectoryBillSub"); DetailColl.Clear(); for (int i = 0; i < DsSub.Tables[0].Rows.Count; i++) { Model.ClsCg_CarTrajectoryBillSub oSub = new Model.ClsCg_CarTrajectoryBillSub(); DataRow subRow = DsSub.Tables[0].Rows[i]; // 使ç¨å®å ¨è½¬æ¢ oSub.HInterID = SafeConvertToInt(subRow["HInterID"]); oSub.HBillNo_bak = SafeConvertToString(subRow["HBillNo_bak"]); oSub.HEntryID = SafeConvertToInt(subRow["HEntryID"]); oSub.HCloseMan = SafeConvertToString(subRow["HCloseMan"]); oSub.HEntryCloseDate = SafeConvertToDateTime(subRow["HEntryCloseDate"], DateTime.Now); // 第404è¡ä¿®å¤ oSub.HCloseType = SafeConvertToBool(subRow["HCloseType"]); oSub.HRemark = SafeConvertToString(subRow["HRemark"]); oSub.HSourceInterID = SafeConvertToInt(subRow["HSourceInterID"]); oSub.HSourceEntryID = SafeConvertToInt(subRow["HSourceEntryID"]); oSub.HSourceBillNo = SafeConvertToString(subRow["HSourceBillNo"]); oSub.HSourceBillType = SafeConvertToString(subRow["HSourceBillType"]); oSub.HRelationQty = SafeConvertToDecimal(subRow["HRelationQty"]); oSub.HRelationMoney = SafeConvertToDecimal(subRow["HRelationMoney"]); oSub.HItemSubID = SafeConvertToInt(subRow["HItemSubID"]); DetailColl.Add(oSub); } sReturn = "æ¾ç¤ºåæ®æåï¼"; return true; } catch (Exception e) { sReturn = $"æ¾ç¤ºåæ®å¤±è´¥ï¼åæ®ID: {lngBillKey}ï¼é误: {e.Message}"; throw; } } // å®å ¨è½¬æ¢è¾ 婿¹æ³ - æ·»å å° ClsCg_CarTrajectoryBill ç±»ä¸ #region å®å ¨è½¬æ¢æ¹æ³ /// <summary> /// å®å ¨è½¬æ¢ä¸ºæ´æ° /// </summary> /// <param name="value">æ°æ®åºå¼</param> /// <returns>转æ¢åçæ´æ°ï¼è½¬æ¢å¤±è´¥è¿å0</returns> private int SafeConvertToInt(object value) { if (value == null || value == DBNull.Value) return 0; try { return Convert.ToInt32(value); } catch { // å¦æè½¬æ¢å¤±è´¥ï¼å°è¯å符串解æ int result; if (int.TryParse(value.ToString(), out result)) return result; return 0; // é»è®¤å¼ } } /// <summary> /// å®å ¨è½¬æ¢ä¸ºå¯ç©ºæ´æ° /// </summary> /// <param name="value">æ°æ®åºå¼</param> /// <returns>转æ¢åçå¯ç©ºæ´æ°ï¼è½¬æ¢å¤±è´¥è¿ånull</returns> private int? SafeConvertToNullableInt(object value) { if (value == null || value == DBNull.Value) return null; try { return Convert.ToInt32(value); } catch { int result; if (int.TryParse(value.ToString(), out result)) return result; return null; // 转æ¢å¤±è´¥è¿ånull } } /// <summary> /// å®å ¨è½¬æ¢ä¸ºå符串 /// </summary> /// <param name="value">æ°æ®åºå¼</param> /// <returns>转æ¢åçå符串ï¼è½¬æ¢å¤±è´¥è¿å空å符串</returns> private string SafeConvertToString(object value) { if (value == null || value == DBNull.Value) return string.Empty; try { return value.ToString().Trim(); } catch { return string.Empty; } } /// <summary> /// å®å ¨è½¬æ¢ä¸ºå¯ç©ºæ¥ææ¶é´ /// </summary> /// <param name="value">æ°æ®åºå¼</param> /// <returns>转æ¢åçå¯ç©ºæ¥ææ¶é´ï¼è½¬æ¢å¤±è´¥è¿ånull</returns> private DateTime? SafeConvertToNullableDateTime(object value) { if (value == null || value == DBNull.Value) return null; try { return Convert.ToDateTime(value); } catch { // å°è¯å符串解æ DateTime result; if (DateTime.TryParse(value.ToString(), out result)) return result; return null; // ææå°è¯é½å¤±è´¥ } } /// <summary> /// å®å ¨è½¬æ¢ä¸ºæ¥ææ¶é´ /// </summary> /// <param name="value">æ°æ®åºå¼</param> /// <param name="defaultValue">é»è®¤å¼</param> /// <returns>转æ¢åçæ¥ææ¶é´ï¼è½¬æ¢å¤±è´¥è¿åé»è®¤å¼</returns> private DateTime SafeConvertToDateTime(object value, DateTime defaultValue) { DateTime? result = SafeConvertToNullableDateTime(value); return result ?? defaultValue; } /// <summary> /// å®å ¨è½¬æ¢ä¸ºå°æ° /// </summary> /// <param name="value">æ°æ®åºå¼</param> /// <returns>转æ¢åçå°æ°ï¼è½¬æ¢å¤±è´¥è¿å0</returns> private decimal SafeConvertToDecimal(object value) { if (value == null || value == DBNull.Value) return 0m; try { return Convert.ToDecimal(value); } catch { decimal result; if (decimal.TryParse(value.ToString(), out result)) return result; return 0m; // é»è®¤å¼ } } /// <summary> /// å®å ¨è½¬æ¢ä¸ºå¯ç©ºå°æ° /// </summary> /// <param name="value">æ°æ®åºå¼</param> /// <returns>转æ¢åçå¯ç©ºå°æ°ï¼è½¬æ¢å¤±è´¥è¿ånull</returns> private decimal? SafeConvertToNullableDecimal(object value) { if (value == null || value == DBNull.Value) return null; try { return Convert.ToDecimal(value); } catch { decimal result; if (decimal.TryParse(value.ToString(), out result)) return result; return null; // 转æ¢å¤±è´¥è¿ånull } } /// <summary> /// å®å ¨è½¬æ¢ä¸ºå¸å°å¼ /// </summary> /// <param name="value">æ°æ®åºå¼</param> /// <returns>转æ¢åçå¸å°å¼ï¼è½¬æ¢å¤±è´¥è¿åfalse</returns> private bool SafeConvertToBool(object value) { if (value == null || value == DBNull.Value) return false; try { // å¤çæ°æ®åº BIT ç±»å if (value is bool) return (bool)value; if (value is int) return ((int)value) != 0; if (value is string) { string strValue = ((string)value).ToLower().Trim(); return strValue == "1" || strValue == "true" || strValue == "t" || strValue == "æ¯"; } // æåå°è¯éç¨è½¬æ¢ return Convert.ToBoolean(value); } catch { return false; // é»è®¤å¼ } } /// <summary> /// å®å ¨è½¬æ¢ä¸ºå¯ç©ºå¸å°å¼ /// </summary> /// <param name="value">æ°æ®åºå¼</param> /// <returns>转æ¢åçå¯ç©ºå¸å°å¼ï¼è½¬æ¢å¤±è´¥è¿ånull</returns> private bool? SafeConvertToNullableBool(object value) { if (value == null || value == DBNull.Value) return null; try { if (value is bool) return (bool)value; if (value is int) { int intValue = (int)value; if (intValue == 0) return false; if (intValue == 1) return true; return null; // æ æçå¸å°å¼ } if (value is string) { string strValue = ((string)value).ToLower().Trim(); if (strValue == "0" || strValue == "false" || strValue == "f" || strValue == "å¦") return false; if (strValue == "1" || strValue == "true" || strValue == "t" || strValue == "æ¯") return true; return null; // æ æçå¸å°å¼ } bool result = Convert.ToBoolean(value); return result; } catch { return null; // 转æ¢å¤±è´¥è¿ånull } } #endregion // è·åæ°çHInterID // 夿忮巿¯å¦åå¨ public override bool IsExistBillNo(ref string sReturn, string sBillNo, DBUtility.ClsPub.Enum_BillStatus eBillStatus, Int64 lngMainID) { try { string sql = "SELECT COUNT(*) AS CNT FROM Cg_CarTrajectoryBillMain WHERE HBillNo = '" + sBillNo + "'"; if (lngMainID > 0) { sql += " AND HInterID <> " + lngMainID.ToString(); } DataSet ds = oCn.RunProcReturn(sql, "CheckBillNo"); if (ds != null && ds.Tables[0].Rows.Count > 0) { int count = Convert.ToInt32(ds.Tables[0].Rows[0]["CNT"]); return count > 0; } return false; } catch (Exception e) { sReturn = e.Message; return false; } } #endregion } } DAL/bin/Release/DAL.dllBinary files differ
DAL/bin/Release/DAL.pdbBinary files differ
DAL/bin/Release/DBUtility.dllBinary files differ
DAL/bin/Release/DBUtility.pdbBinary files differ
DAL/bin/Release/Model.dllBinary files differ
DAL/bin/Release/Model.pdbBinary files differ
DAL/bin/Release/Pub_Class.dllBinary files differ
DAL/bin/Release/Pub_Class.pdbBinary files differ
DAL/bin/Release/Pub_Control.dllBinary files differ
DAL/bin/Release/Pub_Control.pdbBinary files differ
DAL/bin/Release/SQLHelper.dllBinary files differ
DAL/bin/Release/SQLHelper.pdbBinary files differ
DBUtility/bin/Release/DBUtility.dllBinary files differ
DBUtility/bin/Release/DBUtility.pdbBinary files differ
DBUtility/bin/Release/Pub_Class.dllBinary files differ
DBUtility/bin/Release/Pub_Class.pdbBinary files differ
DBUtility/bin/Release/Pub_Control.dllBinary files differ
DBUtility/bin/Release/Pub_Control.pdbBinary files differ
DBUtility/bin/Release/SQLHelper.dllBinary files differ
DBUtility/bin/Release/SQLHelper.pdbBinary files differ
DBUtility/obj/Release/DBUtility.csproj.AssemblyReference.cacheBinary files differ
DBUtility/obj/Release/DBUtility.csproj.GenerateResource.CacheBinary files differ
DBUtility/obj/Release/DBUtility.dllBinary files differ
DBUtility/obj/Release/DBUtility.pdbBinary files differ
Model/Model.csproj
@@ -124,6 +124,8 @@ <Compile Include="åºç¡èµæ\åºç¡èµæ\ClsGy_ProjectMoneyClass_Model.cs" /> <Compile Include="åºç¡èµæ\åºç¡èµæ\ClsGy_RepairClass_Model.cs" /> <Compile Include="åºç¡èµæ\åºç¡èµæ\ClsGy_RepairCheckClass_Model.cs" /> <Compile Include="ç©æµç®¡ç\ClsCg_CarTrajectoryBillMain.cs" /> <Compile Include="ç©æµç®¡ç\ClsCg_CarTrajectoryBillSub.cs" /> <Compile Include="ç产管ç\ClsSc_ShiftsBeginInfoBillMain.cs" /> <Compile Include="ç产管ç\ClsSc_ShiftsBeginInfoBillSub.cs" /> <Compile Include="ClsHR_EmpFosterBillMain.cs" /> Model/bin/Release/DBUtility.dllBinary files differ
Model/bin/Release/DBUtility.pdbBinary files differ
Model/bin/Release/Model.dllBinary files differ
Model/bin/Release/Model.pdbBinary files differ
Model/bin/Release/Pub_Class.dllBinary files differ
Model/bin/Release/Pub_Class.pdbBinary files differ
Model/bin/Release/Pub_Control.dllBinary files differ
Model/bin/Release/Pub_Control.pdbBinary files differ
Model/bin/Release/SQLHelper.dllBinary files differ
Model/bin/Release/SQLHelper.pdbBinary files differ
Model/obj/Release/Model.csproj.AssemblyReference.cacheBinary files differ
Model/obj/Release/Model.dllBinary files differ
Model/obj/Release/Model.pdbBinary files differ
Model/ÎïÁ÷¹ÜÀí/ClsCg_CarTrajectoryBillMain.cs
New file @@ -0,0 +1,72 @@ using System; using System.Collections.Generic; using System.Text; namespace Model { public class ClsCg_CarTrajectoryBillMain { // åºæ¬åæ®ä¿¡æ¯ public int ?HYear { get; set; } // 年份 public int ?HPeriod { get; set; } // æä»½ public string HBillType { get; set; } // åæ®ç±»å public string HBillSubType { get; set; } // åæ®åç±»å public int HInterID { get; set; } // åæ®å ç ï¼ä¸»é®ï¼ public DateTime?HDate { get; set; } // æ¥æ public string HBillNo { get; set; } // åæ®å· public int HBillStatus { get; set; } // åæ®ç¶æ // å®¡æ¹æµç¨ç¸å ³ public int HCheckItemNowID { get; set; } // å½åå®¡æ ¸é¡¹ç® public int HCheckItemNextID { get; set; } // å¾ å®¡æ ¸é¡¹ç® public int HCheckFlowID { get; set; } // å®¡æ¹æµ public string HRemark { get; set; } // 夿³¨ // å®¡æ ¸éåç¸å ³ public string HBacker { get; set; } // éå人 public DateTime? HBackDate { get; set; } // é忥æ public string HBackRemark { get; set; } // éååå // å®¡æ ¸ç¸å ³ public string HChecker { get; set; } // å®¡æ ¸äºº public DateTime? HCheckDate { get; set; } // å®¡æ ¸æ¥æ // å¶åç¸å ³ public string HMaker { get; set; } // å¶å人 public DateTime? HMakeDate { get; set; } // å¶åæ¥æ // ä¿®æ¹ç¸å ³ public string HUpDater { get; set; } // ä¿®æ¹äºº public DateTime? HUpDateDate { get; set; } // ä¿®æ¹æ¥æ // å ³éç¸å ³ public string HCloseMan { get; set; } // å ³é人 public DateTime? HCloseDate { get; set; } // å ³éæ¥æ public bool HCloseType { get; set; } // å ³éç±»å // ä½åºç¸å ³ public string HDeleteMan { get; set; } // ä½åºäºº public DateTime? HDeleteDate { get; set; } // ä½åºæ¥æ // æºåä¿¡æ¯ï¼çé¢ä¸æ¾ç¤ºï¼ public string HMainSourceBillType { get; set; } // æºåç±»å public int? HMainSourceInterID { get; set; } // æºå主å ç public int? HMainSourceEntryID { get; set; } // æºååå ç public string HMainSourceBillNo { get; set; } // æºåå· // å ¶ä» public int HPrintQty { get; set; } // æå°æ¬¡æ° // èªå®ä¹å段ï¼è½¦è¾è½¨è¿¹ä¸ç¨ï¼ public int? HContractTransportBillMainID { get; set; } // è¿å主å ç public string HContractTransportBillNo { get; set; } // è¿åå· public string HCarNumber { get; set; } // 车çå· public DateTime?HGetTime { get; set; } // 轨迹è·åæ¶é´ public decimal? HLongitude { get; set; } // ç»åº¦ public decimal? HLatitude { get; set; } // 纬度 // èªå¢å public int HItemMainID { get; set; } // èªå¢å } } Model/ÎïÁ÷¹ÜÀí/ClsCg_CarTrajectoryBillSub.cs
New file @@ -0,0 +1,36 @@ using System; using System.Collections.Generic; using System.Text; namespace Model { public class ClsCg_CarTrajectoryBillSub { // å ³è主表 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; } // èªå¢å } } Pub_Class/bin/Release/Pub_Class.dllBinary files differ
Pub_Class/bin/Release/Pub_Class.pdbBinary files differ
Pub_Control/bin/Release/Pub_Class.dllBinary files differ
Pub_Control/bin/Release/Pub_Class.pdbBinary files differ
Pub_Control/bin/Release/Pub_Control.dllBinary files differ
Pub_Control/bin/Release/Pub_Control.pdbBinary files differ
SQLHelper/bin/Release/Pub_Class.dllBinary files differ
SQLHelper/bin/Release/Pub_Class.pdbBinary files differ
SQLHelper/bin/Release/SQLHelper.dllBinary files differ
SQLHelper/bin/Release/SQLHelper.pdbBinary files differ
SQLHelper/obj/Release/SQLHelper.csproj.AssemblyReference.cacheBinary files differ
SQLHelper/obj/Release/SQLHelper.dllBinary files differ
SQLHelper/obj/Release/SQLHelper.pdbBinary files differ
SyntacticSugar/obj/Debug/SyntacticSugar.csproj.AssemblyReference.cacheBinary files differ
SyntacticSugar/obj/Debug/SyntacticSugar.csproj.FileListAbsolute.txt
@@ -32,7 +32,6 @@ D:\WorkBench\MES-WEB-API\SyntacticSugar\obj\Debug\SyntacticSugar.pdb D:\gz\MES-WEB-API\MES-WEB-API\SyntacticSugar\bin\Debug\SyntacticSugar.dll D:\gz\MES-WEB-API\MES-WEB-API\SyntacticSugar\bin\Debug\SyntacticSugar.pdb D:\gz\MES-WEB-API\MES-WEB-API\SyntacticSugar\obj\Debug\SyntacticSugar.csproj.AssemblyReference.cache D:\gz\MES-WEB-API\MES-WEB-API\SyntacticSugar\obj\Debug\SyntacticSugar.csproj.CoreCompileInputs.cache D:\gz\MES-WEB-API\MES-WEB-API\SyntacticSugar\obj\Debug\SyntacticSugar.dll D:\gz\MES-WEB-API\MES-WEB-API\SyntacticSugar\obj\Debug\SyntacticSugar.pdb WebAPI/Controllers/WLGL/Cg_CarTrajectoryBillController.cs
New file @@ -0,0 +1,949 @@ 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; using SyntacticSugar.constant; namespace WebAPI.Controllers { public class Cg_CarTrajectoryBillController : ApiController { public DBUtility.ClsPub.Enum_BillStatus BillStatus; public const string ModName = "1119"; // åæ®ç±»å代ç public const string ModCaption = "车è¾è½¨è¿¹åæ®"; // åæ®åç§° public const string ModRightName = "Cg_CarTrajectoryBill"; public const string ModRightNameQuery = ModRightName + "_Query"; // æ¥è¯¢æé 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.ClsCg_CarTrajectoryBill oBill = new DAL.ClsCg_CarTrajectoryBill(); public DAL.ClsCg_CarTrajectoryBill BillNew = new DAL.ClsCg_CarTrajectoryBill(); // 对åºåæ®ç±» public DAL.ClsCg_CarTrajectoryBill BillOld = new DAL.ClsCg_CarTrajectoryBill(); // 对åºåæ®ç±» Pub_Class.ClsXt_SystemParameter oSystemParameter = new Pub_Class.ClsXt_SystemParameter(); // è·åç³»ç»åæ° #region 车è¾è½¨è¿¹åæ®å表 /// <summary> /// è·å车è¾è½¨è¿¹åæ®åè¡¨ä¿¡æ¯ /// </summary> /// <returns></returns> [Route("Cg_CarTrajectoryBill/GetCg_CarTrajectoryBillList")] [HttpGet] public object GetCg_CarTrajectoryBillList(string sWhere, string HMaker) { try { // 夿æé if (!DBUtility.ClsPub.Security_Log(ModRightNameQuery, 3, false, HMaker)) { objJsonResult.code = "0"; objJsonResult.count = 0; objJsonResult.Message = "æ¨æ²¡æè¯¥æ¨¡åæéï¼è¯·ä¸ç®¡çåèç³»ï¼"; objJsonResult.data = null; return objJsonResult; } // è¿ååè¡¨ä¿¡æ¯ ds = oCn.RunProcReturn("SELECT * FROM h_v_Cg_CarTrajectoryBillMainList WHERE 1=1 " + sWhere + " ORDER BY HInterID DESC", "h_v_Cg_CarTrajectoryBillMainList"); 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)); } objJsonResult.code = "0"; objJsonResult.count = ds.Tables[0].Rows.Count; 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("Cg_CarTrajectoryBill/DeleteCg_CarTrajectoryBill")] [HttpGet] public object DeleteCg_CarTrajectoryBill(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 sql1 = "EXEC h_p_Cg_CarTrajectoryBill_BeforeDelCtrl " + BillOld.omodel.HInterID + ",'" + BillOld.omodel.HBillNo + "','" + HMaker + "'"; ds = oCn.RunProcReturn(sql1, "h_p_Cg_CarTrajectoryBill_BeforeDelCtrl"); if (ds == null || ds.Tables.Count == 0 || ds.Tables[0].Rows.Count == 0) { objJsonResult.code = "0"; objJsonResult.count = 1; objJsonResult.Message = "å é¤å¤±è´¥ï¼åå ï¼å é¤åå¤æå¤±è´¥ï¼è¯·ä¸ç½ç»ç®¡ç人åèç³»"; objJsonResult.data = null; return objJsonResult; } if (ds.Tables[0].Rows[0]["HBack"].ToString() != "0") { objJsonResult.code = "0"; objJsonResult.count = 1; objJsonResult.Message = "å é¤å¤±è´¥ï¼åå ï¼" + ds.Tables[0].Rows[0]["HRemark"].ToString(); objJsonResult.data = null; return objJsonResult; } // å é¤åæ®ï¼å å«å é¤åæ§å¶ãåå ¥æ¥å¿ï¼ if (!oBill.DeleteBill(oBill.omodel.HInterID, oBill.omodel.HBillNo, "h_p_Cg_CarTrajectoryBill_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 车è¾è½¨è¿¹åæ®å页å表 [Route("Cg_CarTrajectoryBill/GetCg_CarTrajectoryBillList_Page")] [HttpGet] public json GetCg_CarTrajectoryBillList_Page(string sWhere, string user, int page, int size) { DataSet ds; json res = new json(); try { List<object> columnNameList = new List<object>(); //夿æé if (!DBUtility.ClsPub.Security_Log(ModRightNameQuery, 3, false, user)) { res.code = CodeConstant.FAIL; res.count = CountConstant.FAIL; res.Message = "æ¨æ²¡æè¯¥æ¨¡åæé,请ä¸ç®¡çåèç³»ï¼"; res.data = null; return res; } sWhere = sWhere.Replace("'", "''"); if (sWhere == null || sWhere.Equals("")) { ds = oCn.RunProcReturn("exec h_p_Cg_CarTrajectoryBillList " + page + "," + size + ",''", "h_p_Cg_CarTrajectoryBillList"); } else { ds = oCn.RunProcReturn("exec h_p_Cg_CarTrajectoryBillList " + page + "," + size + ",'" + sWhere + "'", "h_p_Cg_CarTrajectoryBillList"); } //æ·»å åå 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å对象çåå } res.code = CodeConstant.SUCCEED; res.count = int.Parse(ds.Tables[1].Rows[0]["count"].ToString()); res.Message = "Sucessï¼"; res.list = columnNameList; res.data = ds.Tables[0]; return res; } catch (Exception e) { res.code = CodeConstant.FAIL; res.count = CountConstant.FAIL; res.Message = "Exceptionï¼" + e.ToString(); res.data = null; return res; } } #endregion #region 车è¾è½¨è¿¹åæ®å®¡æ ¸/åå®¡æ ¸ /// <summary> /// å®¡æ ¸/åå®¡æ ¸è½¦è¾è½¨è¿¹åæ® /// </summary> /// <param name="HInterID">åæ®ID</param> /// <param name="IsAudit">å®¡æ ¸(1),åå®¡æ ¸(2)</param> /// <param name="HMaker">å®¡æ ¸äºº</param> /// <returns></returns> [Route("Cg_CarTrajectoryBill/AuditCg_CarTrajectoryBill")] [HttpGet] public object AuditCg_CarTrajectoryBill(Int64 HInterID, int IsAudit, 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; } DAL.ClsCg_CarTrajectoryBill oBill = new DAL.ClsCg_CarTrajectoryBill(); // 夿å卿§ if (oBill.ShowBill(HInterID, ref DBUtility.ClsPub.sExeReturnInfo)) { // IsAudit 1 å®¡æ ¸ 2 åå®¡æ ¸ if (IsAudit == 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; } // å®¡æ ¸åæ§å¶ string sql1 = "EXEC h_p_Cg_CarTrajectoryBill_BeforeCheckCtrl " + oBill.omodel.HInterID + ",'" + oBill.omodel.HBillNo + "','" + HMaker + "'"; ds = oCn.RunProcReturn(sql1, "h_p_Cg_CarTrajectoryBill_BeforeCheckCtrl"); if (ds == null || ds.Tables.Count == 0 || ds.Tables[0].Rows.Count == 0) { objJsonResult.code = "0"; objJsonResult.count = 1; objJsonResult.Message = "å®¡æ ¸å¤±è´¥ï¼åå ï¼å®¡æ ¸åå¤æå¤±è´¥ï¼è¯·ä¸ç½ç»ç®¡ç人åèç³»"; objJsonResult.data = null; oCn.RollBack(); return objJsonResult; } if (ds.Tables[0].Rows[0]["HBack"].ToString() != "0") { objJsonResult.code = "0"; objJsonResult.count = 1; objJsonResult.Message = "å®¡æ ¸å¤±è´¥ï¼åå ï¼" + ds.Tables[0].Rows[0]["HRemark"].ToString(); objJsonResult.data = null; oCn.RollBack(); return objJsonResult; } // å®¡æ ¸åæ® if (!oBill.CheckBill(HInterID, oBill.omodel.HBillNo, "h_p_Cg_CarTrajectoryBill_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; } // åå®¡æ ¸åæ§å¶ string sql1 = "EXEC h_p_Cg_CarTrajectoryBill_BeforeUnCheckCtrl " + oBill.omodel.HInterID + ",'" + oBill.omodel.HBillNo + "','" + HMaker + "'"; ds = oCn.RunProcReturn(sql1, "h_p_Cg_CarTrajectoryBill_BeforeUnCheckCtrl"); if (ds == null || ds.Tables.Count == 0 || ds.Tables[0].Rows.Count == 0) { objJsonResult.code = "0"; objJsonResult.count = 1; objJsonResult.Message = "åå®¡æ ¸å¤±è´¥ï¼åå ï¼åå®¡æ ¸åå¤æå¤±è´¥ï¼è¯·ä¸ç½ç»ç®¡ç人åèç³»"; objJsonResult.data = null; return objJsonResult; } if (ds.Tables[0].Rows[0]["HBack"].ToString() != "0") { objJsonResult.code = "0"; objJsonResult.count = 1; objJsonResult.Message = "åå®¡æ ¸å¤±è´¥ï¼åå ï¼" + ds.Tables[0].Rows[0]["HRemark"].ToString(); objJsonResult.data = null; return objJsonResult; } // åå®¡æ ¸åæ® if (!oBill.AbandonCheck(HInterID, 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("Cg_CarTrajectoryBill/CloseCg_CarTrajectoryBill")] [HttpGet] public object CloseCg_CarTrajectoryBill(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)) { // 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.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.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 = "å ³éæåï¼"; 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 = "åå ³éæåï¼"; 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("Cg_CarTrajectoryBill/DropCg_CarTrajectoryBill")] [HttpGet] public object DropCg_CarTrajectoryBill(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)) { // 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.HDeleteMan.Trim() != "") { objJsonResult.code = "0"; objJsonResult.count = 0; objJsonResult.Message = "忮已ä½åºï¼ä¸è½åä½åºï¼"; objJsonResult.data = null; return objJsonResult; } // ä½åºåæ§å¶ string sql1 = "EXEC h_p_Cg_CarTrajectoryBill_BeforeDropCtrl " + oBill.omodel.HInterID + ",'" + oBill.omodel.HBillNo + "','" + HMaker + "'"; ds = oCn.RunProcReturn(sql1, "h_p_Cg_CarTrajectoryBill_BeforeDropCtrl"); if (ds == null || ds.Tables.Count == 0 || ds.Tables[0].Rows.Count == 0) { objJsonResult.code = "0"; objJsonResult.count = 1; objJsonResult.Message = "ä½åºå¤±è´¥ï¼åå ï¼ä½åºåå¤æå¤±è´¥ï¼è¯·ä¸ç½ç»ç®¡ç人åèç³»"; objJsonResult.data = null; oCn.RollBack(); return objJsonResult; } if (ds.Tables[0].Rows[0]["HBack"].ToString() != "0") { objJsonResult.code = "0"; objJsonResult.count = 1; objJsonResult.Message = "ä½åºå¤±è´¥ï¼åå ï¼" + ds.Tables[0].Rows[0]["HRemark"].ToString(); objJsonResult.data = null; oCn.RollBack(); return objJsonResult; } // ä½åºåæ® if (!oBill.Cancelltion(HInterID, oBill.omodel.HBillNo, "h_p_Cg_CarTrajectoryBill_AfterDropCtrl", 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 // åä½åº { if (oBill.omodel.HDeleteMan.Trim() == "") { objJsonResult.code = "0"; objJsonResult.count = 0; objJsonResult.Message = "åæ®æªä½åºï¼ä¸éè¦åä½åºï¼"; objJsonResult.data = null; return objJsonResult; } // åä½åºåæ§å¶ string sql1 = "EXEC h_p_Cg_CarTrajectoryBill_BeforeUnDropCtrl " + oBill.omodel.HInterID + ",'" + oBill.omodel.HBillNo + "','" + HMaker + "'"; ds = oCn.RunProcReturn(sql1, "h_p_Cg_CarTrajectoryBill_BeforeUnDropCtrl"); if (ds == null || ds.Tables.Count == 0 || ds.Tables[0].Rows.Count == 0) { objJsonResult.code = "0"; objJsonResult.count = 1; objJsonResult.Message = "åä½åºå¤±è´¥ï¼åå ï¼åä½åºåå¤æå¤±è´¥ï¼è¯·ä¸ç½ç»ç®¡ç人åèç³»"; objJsonResult.data = null; oCn.RollBack(); return objJsonResult; } if (ds.Tables[0].Rows[0]["HBack"].ToString() != "0") { objJsonResult.code = "0"; objJsonResult.count = 1; objJsonResult.Message = "åä½åºå¤±è´¥ï¼åå ï¼" + ds.Tables[0].Rows[0]["HRemark"].ToString(); objJsonResult.data = null; oCn.RollBack(); return objJsonResult; } // åä½åºåæ® if (!oBill.AbandonCancelltion(HInterID, oBill.omodel.HBillNo, "h_p_Cg_CarTrajectoryBill_AfterUnDropCtrl", 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> /// 车è¾è½¨è¿¹åæ®ç¼è¾æ¶ï¼æ ¹æ®åæ®IDè·ååæ®ä¿¡æ¯ /// </summary> /// <returns></returns> [Route("Cg_CarTrajectoryBill/EditCg_CarTrajectoryBill")] [HttpGet] public object EditCg_CarTrajectoryBill(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("SELECT * FROM h_v_Cg_CarTrajectoryBillMainEdit WHERE åæ®å ç = " + HInterID, "h_v_Cg_CarTrajectoryBillMainEdit"); 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 = "1"; 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 车è¾è½¨è¿¹åæ® æ°å¢ [Route("Cg_CarTrajectoryBill/SaveCg_CarTrajectoryBill")] [HttpPost] public object SaveCg_CarTrajectoryBill([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 refSav = sArray[2].ToString(); // æä½æ¹å¼ï¼Addæ·»å Updateä¿®æ¹ string msg4 = sArray[3].ToString(); // ç¨æ·å DBUtility.ClsPub.CurUserName = msg4; string UserName = ""; string s = ""; ListModels oListModels = new ListModels(); try { // ç¼è¾æéæ£æ¥ if (!DBUtility.ClsPub.Security_Log_second(ModRightNameEdit, 3, false, msg4)) { objJsonResult.code = "0"; objJsonResult.count = 0; objJsonResult.Message = "æ ä¿åæéï¼"; objJsonResult.data = null; return objJsonResult; } DAL.ClsCg_CarTrajectoryBill oBill = new DAL.ClsCg_CarTrajectoryBill(); List<Model.ClsCg_CarTrajectoryBillMain> lsmain = new List<Model.ClsCg_CarTrajectoryBillMain>(); msg2 = msg2.Replace("\\", ""); msg2 = msg2.Replace("\n", ""); lsmain = oListModels.getObjectByJson_ClsCg_CarTrajectoryBillMain(msg2); foreach (Model.ClsCg_CarTrajectoryBillMain oItem in lsmain) { if (refSav == "Add") { // 忮巿¯å¦éå¤ if (BillNew.IsExistBillNo(ref ClsPub.sExeReturnInfo, oItem.HBillNo, BillStatus, BillOld.omodel.HInterID)) { objJsonResult.code = "0"; objJsonResult.count = 0; objJsonResult.Message = "åæ®å·éå¤ï¼ä¸å 许ä¿åï¼"; objJsonResult.data = 1; return objJsonResult; } } if (refSav == "Update") { if (BillOld.ShowBill(oItem.HInterID, ref s) == false) { objJsonResult.code = "0"; objJsonResult.count = 0; objJsonResult.Message = "æ¤åæ®æè¯¯ï¼"; objJsonResult.data = 1; return objJsonResult; } // 夿æ¯å¦å¯ç¼è¾ if (BillOld.omodel.HChecker != "" && BillOld.omodel.HChecker != null) { objJsonResult.code = "0"; objJsonResult.count = 0; objJsonResult.Message = "æ¤åæ®å·²ç»è¢«å®¡æ ¸ï¼ä¸å 许修æ¹ï¼"; objJsonResult.data = 1; return objJsonResult; } if (BillOld.omodel.HBillStatus > 1) { objJsonResult.code = "0"; objJsonResult.count = 0; objJsonResult.Message = "æ¤åæ®å¤äºä¸å¯ç¼è¾ç¶æï¼ä¸å 许修æ¹ï¼"; objJsonResult.data = 1; return objJsonResult; } if (!DBUtility.Xt_BaseBillFun.Fun_AllowEditBill(BillOld, ref s)) { objJsonResult.code = "0"; objJsonResult.count = 0; objJsonResult.Message = s + "ï¼ä¸å 许修æ¹"; objJsonResult.data = 1; return objJsonResult; } } UserName = oItem.HMaker; // å¶å人 oItem.HBillType = "CT"; oItem.HBillSubType = "CT"; oItem.HYear = DateTime.Now.Year; oItem.HPeriod = DateTime.Now.Month; oItem.HMakeDate = DateTime.Now; if (DBUtility.ClsPub.isStrNull(oItem.HDate) == "") { objJsonResult.code = "0"; objJsonResult.count = 0; objJsonResult.Message = "ä¿åå¤±è´¥ï¼æ²¡æåæ®æ¥æï¼æ æ³ä¿åï¼"; objJsonResult.data = 1; return objJsonResult; } oBill.omodel = oItem; } // è¡¨ä½æ°æ®å¤çï¼å¦æéè¦ï¼ if (!string.IsNullOrEmpty(msg3) && msg3 != "[]") { msg3 = msg3.Substring(1, msg3.Length - 2); msg3 = msg3.Replace("\\", ""); msg3 = msg3.Replace("\n", ""); List<Model.ClsCg_CarTrajectoryBillSub> ls = new List<Model.ClsCg_CarTrajectoryBillSub>(); ls = oListModels.getObjectByJson_ClsCg_CarTrajectoryBillSub(msg3); int i = 0; foreach (Model.ClsCg_CarTrajectoryBillSub oItemSub in ls) { i++; oItemSub.HEntryID = i; oItemSub.HEntryCloseDate = DBUtility.ClsPub.isDate(DateTime.Now); oItemSub.HCloseType = false; // å ³éç±»å oBill.DetailColl.Add(oItemSub); } } // ä¿ååæ® bool bResult; if (refSav == "Add") { bResult = oBill.AddBill(ref DBUtility.ClsPub.sExeReturnInfo); } else if (refSav == "Update") { bResult = oBill.ModifyBill(oBill.omodel.HInterID, ref DBUtility.ClsPub.sExeReturnInfo); } else { bResult = false; } if (bResult) { // èªå¨å®¡æ ¸è®¾ç½® if (refSav == "Add") { objJsonResult.HInterID = oBill.omodel.HInterID.ToString(); // è¿å主ID //// ç³»ç»åæ° - èªå¨å®¡æ ¸ //string sReturn = ""; //if (oSystemParameter.ShowBill(ref sReturn) == true) //{ // // è¿ééè¦æ ¹æ®å®é ç³»ç»åæ°é ç½® // if (oSystemParameter.omodel.Cg_CarTrajectoryBill_AutoCheck == "Y") // ç³»ç»åæ° èªå¨å®¡æ ¸ // { // objJsonResult.Verify = "Y"; // } // else // { // objJsonResult.Verify = "N"; // } //} } else if (refSav == "Update") { objJsonResult.HInterID = oBill.omodel.HInterID.ToString(); // è¿å主ID objJsonResult.Verify = "N"; } 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 } } WebAPI/ListModels.cs
@@ -4746,6 +4746,33 @@ } #endregion #region 车è¾è½¨è¿¹åæ® /// <summary> /// 车è¾è½¨è¿¹åæ®ä¸»è¡¨json /// </summary> /// <param name="jsonString"></param> /// <returns></returns> public List<Model.ClsCg_CarTrajectoryBillMain> getObjectByJson_ClsCg_CarTrajectoryBillMain(string jsonString) { // æç §æ¨ç模å¼ï¼æ·»å æ¹æ¬å·å è£ jsonString = "[" + jsonString.ToString() + "]"; List<Model.ClsCg_CarTrajectoryBillMain> list = Newtonsoft.Json.JsonConvert.DeserializeObject<List<Model.ClsCg_CarTrajectoryBillMain>>(jsonString); return list; } /// <summary> /// 车è¾è½¨è¿¹åæ®å表json /// </summary> /// <param name="jsonString"></param> /// <returns></returns> public List<Model.ClsCg_CarTrajectoryBillSub> getObjectByJson_ClsCg_CarTrajectoryBillSub(string jsonString) { // æç §æ¨ç模å¼ï¼æ·»å æ¹æ¬å·å è£ jsonString = "[" + jsonString.ToString() + "]"; List<Model.ClsCg_CarTrajectoryBillSub> list = Newtonsoft.Json.JsonConvert.DeserializeObject<List<Model.ClsCg_CarTrajectoryBillSub>>(jsonString); return list; } #endregion #region æäº§éå®ç³è¯·å /// <summary> /// æäº§éå®ç³è¯·å主表json WebAPI/Properties/PublishProfiles/FolderProfile1.pubxml.user
@@ -5,7 +5,7 @@ <Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> <PropertyGroup> <_PublishTargetUrl>D:\gz\ç½ç«åå¸\MES-WEB-API</_PublishTargetUrl> <History>True|2025-12-11T08:34:18.2286479Z;True|2025-12-11T16:25:03.6684824+08:00;True|2025-12-11T15:19:27.7542472+08:00;True|2025-12-11T15:09:46.6354048+08:00;True|2025-12-11T11:12:05.6798003+08:00;True|2025-12-11T10:32:15.1262803+08:00;True|2025-12-11T10:14:58.6988444+08:00;True|2025-12-11T09:46:20.5053893+08:00;True|2025-12-11T09:37:47.2905248+08:00;True|2025-12-11T09:01:44.3527409+08:00;False|2025-12-11T08:54:26.1829984+08:00;True|2025-12-11T08:44:02.1955946+08:00;True|2025-12-11T08:42:19.6321305+08:00;True|2025-12-11T08:29:21.8963360+08:00;True|2025-12-11T08:01:49.9994713+08:00;True|2025-12-11T07:54:24.8110893+08:00;True|2025-12-11T07:51:49.1569200+08:00;False|2025-12-11T07:51:35.2583285+08:00;True|2025-12-10T16:51:17.2118031+08:00;True|2025-12-10T16:38:42.2021141+08:00;True|2025-12-10T16:28:59.3351097+08:00;False|2025-12-10T16:25:39.0701282+08:00;True|2025-12-10T13:48:18.2826625+08:00;True|2025-12-10T13:13:33.8087883+08:00;False|2025-12-10T13:07:58.6662619+08:00;True|2025-12-10T13:01:57.0050047+08:00;True|2025-12-10T11:27:30.1389865+08:00;True|2025-12-10T11:18:54.9338464+08:00;True|2025-12-10T11:11:10.4500171+08:00;True|2025-12-10T11:06:30.2945401+08:00;True|2025-12-10T11:03:56.4911771+08:00;True|2025-12-10T11:01:40.0726896+08:00;True|2025-12-10T10:59:59.0524547+08:00;True|2025-12-10T10:58:36.1532569+08:00;True|2025-12-10T10:55:58.0328508+08:00;True|2025-12-10T10:55:38.9128685+08:00;False|2025-12-10T10:54:42.0747084+08:00;False|2025-12-10T10:54:32.9305200+08:00;True|2025-12-10T09:42:35.6599111+08:00;True|2025-12-10T09:39:42.3067823+08:00;True|2025-12-10T09:18:03.8247860+08:00;True|2025-12-10T09:07:40.9609222+08:00;False|2025-12-10T09:04:41.3274271+08:00;False|2025-12-10T09:04:35.4614345+08:00;False|2025-12-10T09:04:28.5108048+08:00;True|2025-12-10T08:43:42.5026624+08:00;False|2025-12-10T08:43:05.0557534+08:00;True|2025-12-10T08:03:05.3393161+08:00;False|2025-12-10T08:02:51.6498739+08:00;True|2025-12-09T15:44:41.4253971+08:00;True|2025-12-09T15:22:38.7362157+08:00;True|2025-12-09T14:44:20.3719785+08:00;True|2025-12-09T14:42:54.3480629+08:00;True|2025-12-09T14:33:45.5473815+08:00;True|2025-12-09T11:24:53.4316326+08:00;True|2025-12-09T09:12:42.1851533+08:00;True|2025-12-09T08:51:41.5250104+08:00;True|2025-12-09T08:50:16.5728922+08:00;</History> <History>True|2025-12-23T02:24:35.4754773Z;True|2025-12-23T10:17:44.1961719+08:00;True|2025-12-23T10:08:39.7701021+08:00;True|2025-12-23T09:51:53.3364693+08:00;True|2025-12-23T09:36:04.2616368+08:00;True|2025-12-23T09:06:46.1666847+08:00;True|2025-12-23T09:05:33.2687731+08:00;True|2025-12-23T08:56:18.6678340+08:00;True|2025-12-23T08:46:18.9952807+08:00;False|2025-12-23T08:39:59.0144170+08:00;True|2025-12-22T18:00:47.7249009+08:00;True|2025-12-22T17:57:38.5478545+08:00;False|2025-12-22T17:57:16.3832026+08:00;True|2025-12-22T17:00:33.5665247+08:00;True|2025-12-22T16:57:25.0555116+08:00;True|2025-12-22T16:53:44.1106242+08:00;True|2025-12-22T16:44:24.1864298+08:00;True|2025-12-22T16:33:59.7444130+08:00;True|2025-12-22T16:28:42.7442168+08:00;True|2025-12-22T16:23:53.9420059+08:00;True|2025-12-22T15:44:01.8406153+08:00;True|2025-12-22T15:36:15.8542845+08:00;True|2025-12-22T15:07:14.4064973+08:00;True|2025-12-22T13:44:39.1483456+08:00;True|2025-12-22T12:35:53.7951228+08:00;True|2025-12-22T11:25:41.6070045+08:00;True|2025-12-22T11:22:53.7625130+08:00;True|2025-12-22T11:14:59.7419708+08:00;True|2025-12-22T11:12:31.7769783+08:00;True|2025-12-22T11:10:32.3218587+08:00;True|2025-12-22T11:07:07.1189966+08:00;True|2025-12-22T10:32:09.8822738+08:00;True|2025-12-22T10:19:35.9799201+08:00;True|2025-12-22T09:58:48.7158182+08:00;False|2025-12-22T09:58:23.6500441+08:00;True|2025-12-22T09:04:46.4351793+08:00;True|2025-12-22T09:02:18.3037006+08:00;False|2025-12-22T08:48:58.6740068+08:00;True|2025-12-21T14:27:49.3790838+08:00;False|2025-12-21T14:27:31.8942961+08:00;True|2025-12-20T21:37:58.5356880+08:00;False|2025-12-20T21:37:36.4615240+08:00;True|2025-12-19T16:20:56.4661781+08:00;True|2025-12-19T15:00:28.5376490+08:00;False|2025-12-19T15:00:00.2629357+08:00;True|2025-12-11T16:34:18.2286479+08:00;True|2025-12-11T16:25:03.6684824+08:00;True|2025-12-11T15:19:27.7542472+08:00;True|2025-12-11T15:09:46.6354048+08:00;True|2025-12-11T11:12:05.6798003+08:00;True|2025-12-11T10:32:15.1262803+08:00;True|2025-12-11T10:14:58.6988444+08:00;True|2025-12-11T09:46:20.5053893+08:00;True|2025-12-11T09:37:47.2905248+08:00;True|2025-12-11T09:01:44.3527409+08:00;False|2025-12-11T08:54:26.1829984+08:00;True|2025-12-11T08:44:02.1955946+08:00;True|2025-12-11T08:42:19.6321305+08:00;True|2025-12-11T08:29:21.8963360+08:00;True|2025-12-11T08:01:49.9994713+08:00;True|2025-12-11T07:54:24.8110893+08:00;True|2025-12-11T07:51:49.1569200+08:00;False|2025-12-11T07:51:35.2583285+08:00;True|2025-12-10T16:51:17.2118031+08:00;True|2025-12-10T16:38:42.2021141+08:00;True|2025-12-10T16:28:59.3351097+08:00;False|2025-12-10T16:25:39.0701282+08:00;True|2025-12-10T13:48:18.2826625+08:00;True|2025-12-10T13:13:33.8087883+08:00;False|2025-12-10T13:07:58.6662619+08:00;True|2025-12-10T13:01:57.0050047+08:00;True|2025-12-10T11:27:30.1389865+08:00;True|2025-12-10T11:18:54.9338464+08:00;True|2025-12-10T11:11:10.4500171+08:00;True|2025-12-10T11:06:30.2945401+08:00;True|2025-12-10T11:03:56.4911771+08:00;True|2025-12-10T11:01:40.0726896+08:00;True|2025-12-10T10:59:59.0524547+08:00;True|2025-12-10T10:58:36.1532569+08:00;True|2025-12-10T10:55:58.0328508+08:00;True|2025-12-10T10:55:38.9128685+08:00;False|2025-12-10T10:54:42.0747084+08:00;False|2025-12-10T10:54:32.9305200+08:00;True|2025-12-10T09:42:35.6599111+08:00;True|2025-12-10T09:39:42.3067823+08:00;True|2025-12-10T09:18:03.8247860+08:00;True|2025-12-10T09:07:40.9609222+08:00;False|2025-12-10T09:04:41.3274271+08:00;False|2025-12-10T09:04:35.4614345+08:00;False|2025-12-10T09:04:28.5108048+08:00;True|2025-12-10T08:43:42.5026624+08:00;False|2025-12-10T08:43:05.0557534+08:00;True|2025-12-10T08:03:05.3393161+08:00;False|2025-12-10T08:02:51.6498739+08:00;True|2025-12-09T15:44:41.4253971+08:00;True|2025-12-09T15:22:38.7362157+08:00;True|2025-12-09T14:44:20.3719785+08:00;True|2025-12-09T14:42:54.3480629+08:00;True|2025-12-09T14:33:45.5473815+08:00;True|2025-12-09T11:24:53.4316326+08:00;True|2025-12-09T09:12:42.1851533+08:00;True|2025-12-09T08:51:41.5250104+08:00;True|2025-12-09T08:50:16.5728922+08:00;</History> </PropertyGroup> <ItemGroup> <File Include="apiapp.json"> @@ -45,28 +45,28 @@ <publishTime>02/22/2013 16:43:40</publishTime> </File> <File Include="bin/BLL.dll"> <publishTime>12/10/2025 13:05:26</publishTime> <publishTime>12/23/2025 10:24:27</publishTime> </File> <File Include="bin/BLL.pdb"> <publishTime>12/10/2025 13:05:26</publishTime> <publishTime>12/23/2025 10:24:27</publishTime> </File> <File Include="bin/BouncyCastle.Crypto.dll"> <publishTime>12/18/2020 05:32:28</publishTime> </File> <File Include="bin/DAL.dll"> <publishTime>12/10/2025 13:05:25</publishTime> <publishTime>12/23/2025 10:24:25</publishTime> </File> <File Include="bin/DAL.pdb"> <publishTime>12/10/2025 13:05:25</publishTime> <publishTime>12/23/2025 10:24:25</publishTime> </File> <File Include="bin/Dapper.dll"> <publishTime>07/22/2016 22:52:40</publishTime> </File> <File Include="bin/DBUtility.dll"> <publishTime>12/10/2025 13:05:22</publishTime> <publishTime>12/19/2025 15:00:10</publishTime> </File> <File Include="bin/DBUtility.pdb"> <publishTime>12/10/2025 13:05:22</publishTime> <publishTime>12/19/2025 15:00:10</publishTime> </File> <File Include="bin/Grpc.Core.Api.dll"> <publishTime>03/22/2022 13:17:26</publishTime> @@ -111,10 +111,10 @@ <publishTime>07/25/2012 19:48:56</publishTime> </File> <File Include="bin/Model.dll"> <publishTime>12/10/2025 13:05:23</publishTime> <publishTime>12/23/2025 09:35:51</publishTime> </File> <File Include="bin/Model.pdb"> <publishTime>12/10/2025 13:05:23</publishTime> <publishTime>12/23/2025 09:35:51</publishTime> </File> <File Include="bin/Models/ClsSc_MouldScrapOutBillMain.cs"> <publishTime>11/12/2025 10:43:47</publishTime> @@ -147,34 +147,34 @@ <publishTime>10/23/2021 17:07:54</publishTime> </File> <File Include="bin/Pub_Class.dll"> <publishTime>12/10/2025 13:05:21</publishTime> <publishTime>12/19/2025 15:00:07</publishTime> </File> <File Include="bin/Pub_Class.pdb"> <publishTime>12/10/2025 13:05:21</publishTime> <publishTime>12/19/2025 15:00:07</publishTime> </File> <File Include="bin/Pub_Control.dll"> <publishTime>12/10/2025 13:05:21</publishTime> <publishTime>12/19/2025 15:00:09</publishTime> </File> <File Include="bin/Pub_Control.pdb"> <publishTime>12/10/2025 13:05:21</publishTime> <publishTime>12/19/2025 15:00:09</publishTime> </File> <File Include="bin/RestSharp.dll"> <publishTime>08/31/2012 06:22:50</publishTime> </File> <File Include="bin/SQLHelper.dll"> <publishTime>12/10/2025 13:05:21</publishTime> <publishTime>12/19/2025 15:00:09</publishTime> </File> <File Include="bin/SQLHelper.pdb"> <publishTime>12/10/2025 13:05:21</publishTime> <publishTime>12/19/2025 15:00:09</publishTime> </File> <File Include="bin/Swashbuckle.Core.dll"> <publishTime>02/16/2015 01:57:08</publishTime> </File> <File Include="bin/SyntacticSugar.dll"> <publishTime>12/10/2025 13:05:19</publishTime> <publishTime>12/12/2025 08:26:25</publishTime> </File> <File Include="bin/SyntacticSugar.pdb"> <publishTime>12/10/2025 13:05:19</publishTime> <publishTime>12/12/2025 08:26:25</publishTime> </File> <File Include="bin/System.Buffers.dll"> <publishTime>07/19/2017 18:01:28</publishTime> @@ -285,22 +285,22 @@ <publishTime>05/09/2023 10:43:40</publishTime> </File> <File Include="bin/TopSdk.dll"> <publishTime>12/10/2025 13:05:22</publishTime> <publishTime>12/12/2025 08:26:28</publishTime> </File> <File Include="bin/TopSdk.pdb"> <publishTime>12/10/2025 13:05:22</publishTime> <publishTime>12/12/2025 08:26:28</publishTime> </File> <File Include="bin/WebActivatorEx.dll"> <publishTime>11/24/2014 19:18:48</publishTime> </File> <File Include="bin/WebAPI.dll"> <publishTime>12/11/2025 16:34:14</publishTime> <publishTime>12/23/2025 10:24:31</publishTime> </File> <File Include="bin/WebAPI.pdb"> <publishTime>12/11/2025 16:34:14</publishTime> <publishTime>12/23/2025 10:24:31</publishTime> </File> <File Include="bin/WebAPI.XmlSerializers.dll"> <publishTime>12/11/2025 16:34:17</publishTime> <publishTime>12/23/2025 10:24:35</publishTime> </File> <File Include="bin/WebGrease.dll"> <publishTime>07/18/2013 01:03:52</publishTime> @@ -394,6 +394,9 @@ </File> <File Include="Template/barCodeTemplateStorage.json"> <publishTime>11/12/2025 10:43:47</publishTime> </File> <File Include="Utility/Barcode.ashx"> <publishTime>12/17/2025 13:18:47</publishTime> </File> <File Include="Views/Scripts/bootstrap.js"> <publishTime>11/12/2025 10:43:47</publishTime> @@ -498,7 +501,7 @@ <publishTime>11/12/2025 10:43:47</publishTime> </File> <File Include="Web.config"> <publishTime>12/10/2025 13:13:33</publishTime> <publishTime>12/19/2025 15:00:27</publishTime> </File> </ItemGroup> </Project> WebAPI/WebAPI.csproj
@@ -474,6 +474,7 @@ <Compile Include="Controllers\SCGL\Sc_RepairCodeBindingController.cs" /> <Compile Include="Controllers\SCGL\æ¥è®¡å管ç\JIT_DayPlanPlatFormBill_TKController.cs" /> <Compile Include="Controllers\SCGL\æ¥è®¡å管ç\Xs_SendGoodsPlanBillController.cs" /> <Compile Include="Controllers\WLGL\Cg_CarTrajectoryBillController.cs" /> <Compile Include="Controllers\XSGL\Crm_ComplainVisitBillController.cs" /> <Compile Include="Controllers\XSGL\Xs_SellOutBillList_SecController.cs" /> <Compile Include="Controllers\XSGL\Xs_SeQuotationBillController.cs" /> WebAPI/WebAPI.csproj.user
@@ -2,5 +2,38 @@ <Project ToolsVersion="Current" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> <PropertyGroup> <LastActiveSolutionConfig>Debug|Any CPU</LastActiveSolutionConfig> <UseIISExpress>true</UseIISExpress> <Use64BitIISExpress /> <IISExpressSSLPort /> <IISExpressAnonymousAuthentication>enabled</IISExpressAnonymousAuthentication> <IISExpressWindowsAuthentication>disabled</IISExpressWindowsAuthentication> <IISExpressUseClassicPipelineMode>false</IISExpressUseClassicPipelineMode> <UseGlobalApplicationHostFile /> <NameOfLastUsedPublishProfile>D:\gz\MES-WEB-API\MES-WEB-API\WebAPI\Properties\PublishProfiles\FolderProfile1.pubxml</NameOfLastUsedPublishProfile> </PropertyGroup> <ProjectExtensions> <VisualStudio> <FlavorProperties GUID="{349c5851-65df-11da-9384-00065b846f21}"> <WebProjectProperties> <StartPageUrl> </StartPageUrl> <StartAction>CurrentPage</StartAction> <AspNetDebugging>True</AspNetDebugging> <SilverlightDebugging>False</SilverlightDebugging> <NativeDebugging>False</NativeDebugging> <SQLDebugging>False</SQLDebugging> <ExternalProgram> </ExternalProgram> <StartExternalURL> </StartExternalURL> <StartCmdLineArguments> </StartCmdLineArguments> <StartWorkingDirectory> </StartWorkingDirectory> <EnableENC>True</EnableENC> <AlwaysStartWebServerOnDebug>False</AlwaysStartWebServerOnDebug> </WebProjectProperties> </FlavorProperties> </VisualStudio> </ProjectExtensions> </Project>