wangyi
14 小时以前 1021b3f11ab804ecc34d03024246aa63bc607da3
增加了车辆轨迹表的编辑和列表
1个文件已删除
70个文件已修改
4个文件已添加
1856 ■■■■■ 已修改文件
BLL/bin/Release/BLL.pdb 补丁 | 查看 | 原始文档 | blame | 历史
BLL/bin/Release/DAL.dll 补丁 | 查看 | 原始文档 | blame | 历史
BLL/bin/Release/DAL.pdb 补丁 | 查看 | 原始文档 | blame | 历史
BLL/bin/Release/DBUtility.dll 补丁 | 查看 | 原始文档 | blame | 历史
BLL/bin/Release/DBUtility.pdb 补丁 | 查看 | 原始文档 | blame | 历史
BLL/bin/Release/Model.dll 补丁 | 查看 | 原始文档 | blame | 历史
BLL/bin/Release/Model.pdb 补丁 | 查看 | 原始文档 | blame | 历史
BLL/bin/Release/Pub_Class.dll 补丁 | 查看 | 原始文档 | blame | 历史
BLL/bin/Release/Pub_Class.pdb 补丁 | 查看 | 原始文档 | blame | 历史
BLL/bin/Release/Pub_Control.dll 补丁 | 查看 | 原始文档 | blame | 历史
BLL/bin/Release/Pub_Control.pdb 补丁 | 查看 | 原始文档 | blame | 历史
BLL/bin/Release/SQLHelper.dll 补丁 | 查看 | 原始文档 | blame | 历史
BLL/bin/Release/SQLHelper.pdb 补丁 | 查看 | 原始文档 | blame | 历史
DAL/DAL.csproj 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
DAL/WLGL/ClsCg_CarTrajectoryBill.cs 684 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
DAL/bin/Release/DAL.dll 补丁 | 查看 | 原始文档 | blame | 历史
DAL/bin/Release/DAL.pdb 补丁 | 查看 | 原始文档 | blame | 历史
DAL/bin/Release/DBUtility.dll 补丁 | 查看 | 原始文档 | blame | 历史
DAL/bin/Release/DBUtility.pdb 补丁 | 查看 | 原始文档 | blame | 历史
DAL/bin/Release/Model.dll 补丁 | 查看 | 原始文档 | blame | 历史
DAL/bin/Release/Model.pdb 补丁 | 查看 | 原始文档 | blame | 历史
DAL/bin/Release/Pub_Class.dll 补丁 | 查看 | 原始文档 | blame | 历史
DAL/bin/Release/Pub_Class.pdb 补丁 | 查看 | 原始文档 | blame | 历史
DAL/bin/Release/Pub_Control.dll 补丁 | 查看 | 原始文档 | blame | 历史
DAL/bin/Release/Pub_Control.pdb 补丁 | 查看 | 原始文档 | blame | 历史
DAL/bin/Release/SQLHelper.dll 补丁 | 查看 | 原始文档 | blame | 历史
DAL/bin/Release/SQLHelper.pdb 补丁 | 查看 | 原始文档 | blame | 历史
DBUtility/bin/Release/DBUtility.dll 补丁 | 查看 | 原始文档 | blame | 历史
DBUtility/bin/Release/DBUtility.pdb 补丁 | 查看 | 原始文档 | blame | 历史
DBUtility/bin/Release/Pub_Class.dll 补丁 | 查看 | 原始文档 | blame | 历史
DBUtility/bin/Release/Pub_Class.pdb 补丁 | 查看 | 原始文档 | blame | 历史
DBUtility/bin/Release/Pub_Control.dll 补丁 | 查看 | 原始文档 | blame | 历史
DBUtility/bin/Release/Pub_Control.pdb 补丁 | 查看 | 原始文档 | blame | 历史
DBUtility/bin/Release/SQLHelper.dll 补丁 | 查看 | 原始文档 | blame | 历史
DBUtility/bin/Release/SQLHelper.pdb 补丁 | 查看 | 原始文档 | blame | 历史
DBUtility/obj/Release/DBUtility.csproj.AssemblyReference.cache 补丁 | 查看 | 原始文档 | blame | 历史
DBUtility/obj/Release/DBUtility.csproj.GenerateResource.Cache 补丁 | 查看 | 原始文档 | blame | 历史
DBUtility/obj/Release/DBUtility.dll 补丁 | 查看 | 原始文档 | blame | 历史
DBUtility/obj/Release/DBUtility.pdb 补丁 | 查看 | 原始文档 | blame | 历史
Model/Model.csproj 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Model/bin/Release/DBUtility.dll 补丁 | 查看 | 原始文档 | blame | 历史
Model/bin/Release/DBUtility.pdb 补丁 | 查看 | 原始文档 | blame | 历史
Model/bin/Release/Model.dll 补丁 | 查看 | 原始文档 | blame | 历史
Model/bin/Release/Model.pdb 补丁 | 查看 | 原始文档 | blame | 历史
Model/bin/Release/Pub_Class.dll 补丁 | 查看 | 原始文档 | blame | 历史
Model/bin/Release/Pub_Class.pdb 补丁 | 查看 | 原始文档 | blame | 历史
Model/bin/Release/Pub_Control.dll 补丁 | 查看 | 原始文档 | blame | 历史
Model/bin/Release/Pub_Control.pdb 补丁 | 查看 | 原始文档 | blame | 历史
Model/bin/Release/SQLHelper.dll 补丁 | 查看 | 原始文档 | blame | 历史
Model/bin/Release/SQLHelper.pdb 补丁 | 查看 | 原始文档 | blame | 历史
Model/obj/Release/Model.csproj.AssemblyReference.cache 补丁 | 查看 | 原始文档 | blame | 历史
Model/obj/Release/Model.dll 补丁 | 查看 | 原始文档 | blame | 历史
Model/obj/Release/Model.pdb 补丁 | 查看 | 原始文档 | blame | 历史
Model/物流管理/ClsCg_CarTrajectoryBillMain.cs 72 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Model/物流管理/ClsCg_CarTrajectoryBillSub.cs 36 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Pub_Class/bin/Release/Pub_Class.dll 补丁 | 查看 | 原始文档 | blame | 历史
Pub_Class/bin/Release/Pub_Class.pdb 补丁 | 查看 | 原始文档 | blame | 历史
Pub_Control/bin/Release/Pub_Class.dll 补丁 | 查看 | 原始文档 | blame | 历史
Pub_Control/bin/Release/Pub_Class.pdb 补丁 | 查看 | 原始文档 | blame | 历史
Pub_Control/bin/Release/Pub_Control.dll 补丁 | 查看 | 原始文档 | blame | 历史
Pub_Control/bin/Release/Pub_Control.pdb 补丁 | 查看 | 原始文档 | blame | 历史
SQLHelper/bin/Release/Pub_Class.dll 补丁 | 查看 | 原始文档 | blame | 历史
SQLHelper/bin/Release/Pub_Class.pdb 补丁 | 查看 | 原始文档 | blame | 历史
SQLHelper/bin/Release/SQLHelper.dll 补丁 | 查看 | 原始文档 | blame | 历史
SQLHelper/bin/Release/SQLHelper.pdb 补丁 | 查看 | 原始文档 | blame | 历史
SQLHelper/obj/Release/SQLHelper.csproj.AssemblyReference.cache 补丁 | 查看 | 原始文档 | blame | 历史
SQLHelper/obj/Release/SQLHelper.dll 补丁 | 查看 | 原始文档 | blame | 历史
SQLHelper/obj/Release/SQLHelper.pdb 补丁 | 查看 | 原始文档 | blame | 历史
SyntacticSugar/obj/Debug/SyntacticSugar.csproj.AssemblyReference.cache 补丁 | 查看 | 原始文档 | blame | 历史
SyntacticSugar/obj/Debug/SyntacticSugar.csproj.FileListAbsolute.txt 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebAPI/Controllers/WLGL/Cg_CarTrajectoryBillController.cs 949 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebAPI/ListModels.cs 27 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebAPI/Properties/PublishProfiles/FolderProfile1.pubxml.user 49 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebAPI/WebAPI.csproj 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebAPI/WebAPI.csproj.user 33 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
BLL/bin/Release/BLL.pdb
Binary files differ
BLL/bin/Release/DAL.dll
Binary files differ
BLL/bin/Release/DAL.pdb
Binary files differ
BLL/bin/Release/DBUtility.dll
Binary files differ
BLL/bin/Release/DBUtility.pdb
Binary files differ
BLL/bin/Release/Model.dll
Binary files differ
BLL/bin/Release/Model.pdb
Binary files differ
BLL/bin/Release/Pub_Class.dll
Binary files differ
BLL/bin/Release/Pub_Class.pdb
Binary files differ
BLL/bin/Release/Pub_Control.dll
Binary files differ
BLL/bin/Release/Pub_Control.pdb
Binary files differ
BLL/bin/Release/SQLHelper.dll
Binary files differ
BLL/bin/Release/SQLHelper.pdb
Binary 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.dll
Binary files differ
DAL/bin/Release/DAL.pdb
Binary files differ
DAL/bin/Release/DBUtility.dll
Binary files differ
DAL/bin/Release/DBUtility.pdb
Binary files differ
DAL/bin/Release/Model.dll
Binary files differ
DAL/bin/Release/Model.pdb
Binary files differ
DAL/bin/Release/Pub_Class.dll
Binary files differ
DAL/bin/Release/Pub_Class.pdb
Binary files differ
DAL/bin/Release/Pub_Control.dll
Binary files differ
DAL/bin/Release/Pub_Control.pdb
Binary files differ
DAL/bin/Release/SQLHelper.dll
Binary files differ
DAL/bin/Release/SQLHelper.pdb
Binary files differ
DBUtility/bin/Release/DBUtility.dll
Binary files differ
DBUtility/bin/Release/DBUtility.pdb
Binary files differ
DBUtility/bin/Release/Pub_Class.dll
Binary files differ
DBUtility/bin/Release/Pub_Class.pdb
Binary files differ
DBUtility/bin/Release/Pub_Control.dll
Binary files differ
DBUtility/bin/Release/Pub_Control.pdb
Binary files differ
DBUtility/bin/Release/SQLHelper.dll
Binary files differ
DBUtility/bin/Release/SQLHelper.pdb
Binary files differ
DBUtility/obj/Release/DBUtility.csproj.AssemblyReference.cache
Binary files differ
DBUtility/obj/Release/DBUtility.csproj.GenerateResource.Cache
Binary files differ
DBUtility/obj/Release/DBUtility.dll
Binary files differ
DBUtility/obj/Release/DBUtility.pdb
Binary 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.dll
Binary files differ
Model/bin/Release/DBUtility.pdb
Binary files differ
Model/bin/Release/Model.dll
Binary files differ
Model/bin/Release/Model.pdb
Binary files differ
Model/bin/Release/Pub_Class.dll
Binary files differ
Model/bin/Release/Pub_Class.pdb
Binary files differ
Model/bin/Release/Pub_Control.dll
Binary files differ
Model/bin/Release/Pub_Control.pdb
Binary files differ
Model/bin/Release/SQLHelper.dll
Binary files differ
Model/bin/Release/SQLHelper.pdb
Binary files differ
Model/obj/Release/Model.csproj.AssemblyReference.cache
Binary files differ
Model/obj/Release/Model.dll
Binary files differ
Model/obj/Release/Model.pdb
Binary 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.dll
Binary files differ
Pub_Class/bin/Release/Pub_Class.pdb
Binary files differ
Pub_Control/bin/Release/Pub_Class.dll
Binary files differ
Pub_Control/bin/Release/Pub_Class.pdb
Binary files differ
Pub_Control/bin/Release/Pub_Control.dll
Binary files differ
Pub_Control/bin/Release/Pub_Control.pdb
Binary files differ
SQLHelper/bin/Release/Pub_Class.dll
Binary files differ
SQLHelper/bin/Release/Pub_Class.pdb
Binary files differ
SQLHelper/bin/Release/SQLHelper.dll
Binary files differ
SQLHelper/bin/Release/SQLHelper.pdb
Binary files differ
SQLHelper/obj/Release/SQLHelper.csproj.AssemblyReference.cache
Binary files differ
SQLHelper/obj/Release/SQLHelper.dll
Binary files differ
SQLHelper/obj/Release/SQLHelper.pdb
Binary files differ
SyntacticSugar/obj/Debug/SyntacticSugar.csproj.AssemblyReference.cache
Binary 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>