1
dytyqx
2026-02-26 09bef7222f28abfe5fbb308c610997dc52da5f18
1
93个文件已修改
2个文件已添加
14207 ■■■■■ 已修改文件
BLL/bin/Release/BLL.dll 补丁 | 查看 | 原始文档 | blame | 历史
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 | 历史
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/基础资料/公用基础资料/ClsGy_CostAverageType_Ctl.cs 55 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
DAL/基础资料/公用基础资料/ClsGy_CostCenter_Ctl_2.cs 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
DAL/基础资料/公用基础资料/ClsGy_CostItemAverageType_Ctl_2.cs 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
DAL/基础资料/公用基础资料/ClsGy_CostItem_Ctl_2.cs 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
DAL/成本管理/ClsCB_ItemMoneyBillMain .cs 10 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
DAL/生产管理/模具管理/ClsSc_MouldConkBookBill.cs 4 ●●●● 补丁 | 查看 | 原始文档 | 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/obj/Release/DBUtility.csproj.GenerateResource.Cache 补丁 | 查看 | 原始文档 | blame | 历史
DBUtility/obj/Release/DBUtility.dll 补丁 | 查看 | 原始文档 | blame | 历史
DBUtility/obj/Release/DBUtility.pdb 补丁 | 查看 | 原始文档 | blame | 历史
Model/Model.csproj 1 ●●●● 补丁 | 查看 | 原始文档 | 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/obj/Release/Model.csproj.AssemblyReference.cache 补丁 | 查看 | 原始文档 | blame | 历史
Model/obj/Release/Model.dll 补丁 | 查看 | 原始文档 | blame | 历史
Model/obj/Release/Model.pdb 补丁 | 查看 | 原始文档 | blame | 历史
Model/obj/x86/Release/Model.csproj.AssemblyReference.cache 补丁 | 查看 | 原始文档 | blame | 历史
Model/基础资料/基础资料/ClsGy_CostAverageTypeSub_Model.cs 13 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Model/成本管理/ClsCB_ItemMoneyBillSub_1.cs 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Model/生产管理/模具管理/ClsSc_MouldConkBookBillMain.cs 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Model/生产管理/设备管理/ClsSb_EquipConkBookBillMain.cs 3 ●●●●● 补丁 | 查看 | 原始文档 | 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 | 历史
SyntacticSugar/obj/Debug/SyntacticSugar.csproj.FileListAbsolute.txt 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebAPI/Controllers/BaseSet/Gy_ConkTypeController.cs 57 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebAPI/Controllers/BaseSet/Gy_MaterialController.cs 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebAPI/Controllers/LMESController.cs 34 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebAPI/Controllers/MJGL/Sc_MouldProdOutBillController.cs 23 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebAPI/Controllers/MJGL/Sc_MouldUpperBillController.cs 14 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebAPI/Controllers/QC_ManagementController.cs 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebAPI/Controllers/SBGL/Sb_EquipRepairSendWorkBillController.cs 20 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebAPI/Controllers/Sb_CheckEqpRepairWorkBillController.cs 14 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebAPI/Controllers/Sc_MouldRepairInBillListController.cs 12 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebAPI/Controllers/Sc_ProcessMangementController.cs 29 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebAPI/Controllers/WebAPIController.cs 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebAPI/Controllers/品质管理/巡检单/QC_PatrolProcCheckOtherBillController.cs 23 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebAPI/Controllers/品质管理/工序检验单/QC_ProcessCheckBillController.cs 21 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebAPI/Controllers/品质管理/检验取样还样单/QC_TakeSampleCheckBillController.cs 13 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebAPI/Controllers/品质管理/首件检验单/QC_FirstPieceCheckBillController.cs 22 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebAPI/Controllers/基础资料/基础资料/Gy_CostAverageTypeController.cs 23 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebAPI/Controllers/基础资料/基础资料/Gy_CostCenterController.cs 28 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebAPI/Controllers/基础资料/基础资料/Gy_CostItemAverageTypeController.cs 28 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebAPI/Controllers/基础资料/基础资料/Gy_CostItemController.cs 28 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebAPI/Controllers/成本管理/CB_ItemMoneyBillController.cs 419 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebAPI/Controllers/成本管理/CB_WipProcessTableController.cs 287 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebAPI/Controllers/条码管理/WEBSController.cs 193 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebAPI/DLL/ClsSb_EquipConkBookBill.cs 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebAPI/Properties/PublishProfiles/FolderProfile4.pubxml.user 28 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebAPI/Properties/PublishProfiles/WTTFolder.pubxml.user 85 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebAPI/Service/GeTuiService.cs 89 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebAPI/Service/WebSocketServer.cs 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebAPI/Web References/WebS/Reference.cs 8749 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebAPI/Web References/WebS/WebService1.wsdl 3822 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebAPI/WebAPI.csproj 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebAPI/WebAPI.csproj.user 16 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
sdk_dingding/TopSdk/obj/Debug/TopSdk.csproj.FileListAbsolute.txt 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
BLL/bin/Release/BLL.dll
Binary files differ
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
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/»ù´¡×ÊÁÏ/¹«Óûù´¡×ÊÁÏ/ClsGy_CostAverageType_Ctl.cs
@@ -11,6 +11,7 @@
        //原代码 ç”¨äºŽ æ›¿æ¢å­é¡¹ç›®
        public string HOldNumber;
        public Model.ClsGy_CostAverageType_Model oModel = new Model.ClsGy_CostAverageType_Model();
        public List<Model.ClsGy_CostAverageTypeSub_Model> DetailColl = new List<Model.ClsGy_CostAverageTypeSub_Model>();
        //新增
        public override bool AddNew(ref string sReturn)
        {
@@ -31,6 +32,34 @@
                ", ref sReturn);
                //修改上级为非末级代码
                oCn.RunProc("Update " + MvarItemKey + " set HEndflag=0 where HItemID=" + oModel.HParentID, ref sReturn);
                DataSet dss= oCn.RunProcReturn("select MAX(HItemID) as HInterID  from Gy_CostAverageType", "Gy_CostAverageType");
                int HInterID = Convert.ToInt32(dss.Tables[0].Rows[0]["HInterID"]);
                oCn.RunProc("Delete From " + "Gy_CostAverageTypeSub" + "  where HInterID=" + HInterID);
                //插入子表
                if (DetailColl != null && DetailColl.Count > 0)
                {
                    foreach (Model.ClsGy_CostAverageTypeSub_Model oSub in DetailColl)
                    {
                        if (oSub == null)
                            continue;
                        string subSql = "insert into Gy_CostAverageTypeSub" +
                               "(HInterID,HEntryID,HSourceInterID,HSourceEntryID,HSourceBillNo,HSourceBillType" +
                               ",HWeight,HMaterTypeID" + ")" +
                               " values(" +
                               HInterID + "," +
                               (oSub.HEntryID != null ? oSub.HEntryID.ToString() : "0") + "," +
                               (oSub.HSourceInterID != null && oSub.HSourceInterID != 0 ? oSub.HSourceInterID.ToString() : "0") + "," +
                               (oSub.HSourceEntryID != null && oSub.HSourceEntryID != 0 ? oSub.HSourceEntryID.ToString() : "0") + ",'" +
                               (oSub.HSourceBillNo ?? "") + "','" + (oSub.HSourceBillType ?? "") + "'," +
                               (oSub.HWeight != null && oSub.HWeight != 0 ? oSub.HWeight.ToString() : "0") + "," +
                               (oSub.HMaterTypeID != null && oSub.HMaterTypeID != 0 ? oSub.HMaterTypeID.ToString() : "0") +
                               ")";
                        oCn.RunProc(subSql);
                    }
                }
                oCn.Commit();
                return true;
            }
@@ -71,6 +100,32 @@
                //将上级 ä¸ºéžæœ«çº§
                oCn.RunProc("Update " + MvarItemKey + " set HEndflag=0 where HItemID=" + oModel.HParentID, ref sReturn);
                //
                oCn.RunProc("Delete From " + "Gy_CostAverageTypeSub" + "  where HInterID=" + oModel.HItemID);
                //插入子表
                if (DetailColl != null && DetailColl.Count > 0)
                {
                    foreach (Model.ClsGy_CostAverageTypeSub_Model oSub in DetailColl)
                    {
                        if (oSub == null)
                            continue;
                        string subSql = "insert into Gy_CostAverageTypeSub" +
                               "(HInterID,HEntryID,HSourceInterID,HSourceEntryID,HSourceBillNo,HSourceBillType" +
                               ",HWeight,HMaterTypeID" + ")" +
                               " values(" +
                               oModel.HItemID + "," +
                               (oSub.HEntryID != null ? oSub.HEntryID.ToString() : "0") + "," +
                               (oSub.HSourceInterID != null && oSub.HSourceInterID != 0 ? oSub.HSourceInterID.ToString() : "0") + "," +
                               (oSub.HSourceEntryID != null && oSub.HSourceEntryID != 0 ? oSub.HSourceEntryID.ToString() : "0") + ",'" +
                               (oSub.HSourceBillNo ?? "") + "','" + (oSub.HSourceBillType ?? "") + "'," +
                               (oSub.HWeight != null && oSub.HWeight != 0 ? oSub.HWeight.ToString() : "0") + "," +
                               (oSub.HMaterTypeID != null && oSub.HMaterTypeID != 0 ? oSub.HMaterTypeID.ToString() : "0") +
                               ")";
                        oCn.RunProc(subSql);
                    }
                }
                oCn.Commit();
                return true;
            }
DAL/»ù´¡×ÊÁÏ/¹«Óûù´¡×ÊÁÏ/ClsGy_CostCenter_Ctl_2.cs
@@ -101,7 +101,7 @@
        //构造函数
        public ClsGy_CostCenter_Ctl_2()
        {
            MvarItemKey = "Gy_CostCenter_1";
            MvarItemKey = "Gy_CostCenter";
            MvarReportTitle = "成本中心设置";
            oModel = new Model.ClsGy_CostCenter_Model_2();
        }
DAL/»ù´¡×ÊÁÏ/¹«Óûù´¡×ÊÁÏ/ClsGy_CostItemAverageType_Ctl_2.cs
@@ -108,7 +108,7 @@
        //构造函数
        public ClsGy_CostItemAverageType_Ctl_2()
        {
            MvarItemKey = "Gy_CostItemAverageType_1";
            MvarItemKey = "Gy_CostItemAverageType";
            MvarReportTitle = "成本项目分配标准";
            oModel = new Model.ClsGy_Gy_CostItemAverageType_Model_2();
        }
DAL/»ù´¡×ÊÁÏ/¹«Óûù´¡×ÊÁÏ/ClsGy_CostItem_Ctl_2.cs
@@ -105,7 +105,7 @@
        //构造函数
        public ClsGy_CostItem_Ctl_2()
        {
            MvarItemKey = "Gy_CostItem_1";
            MvarItemKey = "Gy_CostItem";
            MvarReportTitle = "成本项目设置";
            oModel = new Model.ClsGy_CostItem_Model_2();
        }
DAL/³É±¾¹ÜÀí/ClsCB_ItemMoneyBillMain .cs
@@ -79,7 +79,7 @@
                        string subSql = "insert into CB_ItemMoneyBillSub" +
                               "(HInterID,HEntryID,HSourceInterID,HSourceEntryID,HSourceBillNo,HSourceBillType" +
                               ",HMoney,HRemark" +
                               ",HCostItemID,HDeptID,HQty,HPrice,HMaterID,HWaster,HDate,HBeginBalance,HEndBalance,HTimes) " +
                               ",HCostItemID,HDeptID,HQty,HPrice,HMaterID,HWaster,HDate,HBeginBalance,HEndBalance,HTimes,HProcID) " +
                               " values(" +
                               lngBillKey.ToString() + "," +
                               (oSub.HEntryID != null ? oSub.HEntryID.ToString() : "0") + "," +
@@ -96,7 +96,8 @@
                               (oSub.HDate != null && oSub.HDate != DateTime.MinValue ? oSub.HDate.ToString() : DateTime.Now.ToString()) + "'," +
                               (oSub.HBeginBalance != null && oSub.HBeginBalance != 0 ? oSub.HBeginBalance.ToString() : "0") + "," +
                               (oSub.HEndBalance != null && oSub.HEndBalance != 0 ? oSub.HEndBalance.ToString() : "0") + "," +
                               (oSub.HTimes != null && oSub.HTimes != 0 ? oSub.HTimes.ToString() : "0") +
                               (oSub.HTimes != null && oSub.HTimes != 0 ? oSub.HTimes.ToString() : "0") + "," +
                               (oSub.HProcID != null && oSub.HProcID != 0 ? oSub.HProcID.ToString() : "0") +
                               ")";
                        oCn.RunProc(subSql);
@@ -155,7 +156,7 @@
                        string subSql = "insert into CB_ItemMoneyBillSub" +
                                "(HInterID,HEntryID,HSourceInterID,HSourceEntryID,HSourceBillNo,HSourceBillType" +
                                ",HMoney,HRemark" +
                                ",HCostItemID,HDeptID,HQty,HPrice,HMaterID,HWaster,HDate,HBeginBalance,HEndBalance,HTimes) " +
                                ",HCostItemID,HDeptID,HQty,HPrice,HMaterID,HWaster,HDate,HBeginBalance,HEndBalance,HTimes,HProcID) " +
                                " values(" +
                                omodel.HInterID.ToString() + "," +
                                (oSub.HEntryID != null ? oSub.HEntryID.ToString() : "0") + "," +
@@ -172,7 +173,8 @@
                                (oSub.HDate != null && oSub.HDate != DateTime.MinValue ? oSub.HDate.ToString() : DateTime.Now.ToString()) + "'," +
                                (oSub.HBeginBalance != null && oSub.HBeginBalance != 0 ? oSub.HBeginBalance.ToString() : "0") + "," +
                                (oSub.HEndBalance != null && oSub.HEndBalance != 0 ? oSub.HEndBalance.ToString() : "0") + "," +
                                (oSub.HTimes != null && oSub.HTimes != 0 ? oSub.HTimes.ToString() : "0") +
                                (oSub.HTimes != null && oSub.HTimes != 0 ? oSub.HTimes.ToString() : "0")  +","+
                                (oSub.HProcID != null && oSub.HProcID != 0 ? oSub.HProcID.ToString() : "0") +
                                ")";
                        oCn.RunProc(subSql);
DAL/Éú²ú¹ÜÀí/Ä£¾ß¹ÜÀí/ClsSc_MouldConkBookBill.cs
@@ -190,14 +190,14 @@
                ",HYear,HPeriod,HRemark" +
                ",HMouldID,HConkTypeID,HConkBeginDate,HEndDate"+
                ",HEmpID,HManagerID,HDeptID"+
                ",HInnerBillNo,HExplanation" +
                ",HInnerBillNo,HExplanation, HRepairManID" +
                ") " +
                " values('" + this.BillType + "','"  + this.HBillSubType + "'," +omodel.HInterID.ToString() + ",'" + omodel.HBillNo + "','" + omodel.HDate + "','" + DBUtility.ClsPub.CurUserName + "',getdate()" +
                "," + omodel.HYear.ToString() + "," + omodel.HPeriod.ToString() + ",'" + omodel.HRemark + "'"+
                "," + omodel.HMouldID.ToString() + "," + omodel.HConkTypeID.ToString() + ",'" + omodel.HConkBeginDate + "','" + omodel.HEndDate + "'"+
                "," + omodel.HEmpID.ToString() + "," + omodel.HManagerID.ToString() + "," + omodel.HDeptID.ToString() + 
                ",'" + omodel.HInnerBillNo + "','" + omodel.HExplanation + "'" +
                ") ");
                $",{omodel.HRepairManID}) ");
                //插入子表
                foreach (Model.ClsSc_MouldConkBookBillSub oSub in DetailColl)
                {
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/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
@@ -106,6 +106,7 @@
    <Compile Include="仓库管理\ClsKf_TrolleyPositionBillSub.cs" />
    <Compile Include="基础资料\其他基础资料\ClsGy_PurPrice_Model.cs" />
    <Compile Include="基础资料\其他基础资料\ClsGy_MatePrice_Model.cs" />
    <Compile Include="基础资料\基础资料\ClsGy_CostAverageTypeSub_Model.cs" />
    <Compile Include="基础资料\基础资料\ClsGy_Gy_CostItemAverageType_Model_2.cs" />
    <Compile Include="基础资料\基础资料\ClsGy_CostItemFixRate_Model_2.cs" />
    <Compile Include="基础资料\基础资料\ClsGy_CostCenter_Model_2.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/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/obj/x86/Release/Model.csproj.AssemblyReference.cache
Binary files differ
Model/»ù´¡×ÊÁÏ/»ù´¡×ÊÁÏ/ClsGy_CostAverageTypeSub_Model.cs
New file
@@ -0,0 +1,13 @@
using System;
using System.Collections.Generic;
using System.Text;
namespace Model
{
    public class ClsGy_CostAverageTypeSub_Model : DBUtility.ClsXt_BaseBillSub
    {
        public int HWeight;       //quanzhong
        public int HMaterTypeID;       //物料类型
    }
}
Model/³É±¾¹ÜÀí/ClsCB_ItemMoneyBillSub_1.cs
@@ -12,6 +12,7 @@
        public double HPrice;           // å•ä»·
        public double HMoney;           // é‡‘额
        public int HMaterID;            // ç‰©æ–™å†…码
        public int HProcID;            // ç‰©æ–™å†…码
        public double HWaster;          // æŸè€—
        public DateTime HDate;          // æ—¥æœŸ
        public decimal HBeginBalance;   // å¼€å§‹æ•°å€¼
Model/Éú²ú¹ÜÀí/Ä£¾ß¹ÜÀí/ClsSc_MouldConkBookBillMain.cs
@@ -18,5 +18,7 @@
        public string HExplanation;//    varchar(500)   --故障描述 
        public string HInnerBillNo;//   varchar(50)    --内部单据号 
        public long HRepairManID; // -- ç»´ä¿®äºº
    }
}
Model/Éú²ú¹ÜÀí/É豸¹ÜÀí/ClsSb_EquipConkBookBillMain.cs
@@ -19,5 +19,8 @@
        public string HLev;     // --紧急程度( ç´§æ€¥ï¼Œæ™®é€šï¼‰ 
        public string HReason;  //varchar(200) --故障原因分析及预防措施 
        public Int64 HRepairManID;
    }
}
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
SyntacticSugar/obj/Debug/SyntacticSugar.csproj.FileListAbsolute.txt
@@ -24,8 +24,16 @@
D:\工作代码\智云迈思\MES\MES-WEB-API\SyntacticSugar\obj\Debug\SyntacticSugar.csproj.CoreCompileInputs.cache
D:\工作代码\智云迈思\MES\MES-WEB-API\SyntacticSugar\obj\Debug\SyntacticSugar.dll
D:\工作代码\智云迈思\MES\MES-WEB-API\SyntacticSugar\obj\Debug\SyntacticSugar.pdb
<<<<<<< HEAD
E:\gz\MES-WEB-API\SyntacticSugar\bin\Debug\SyntacticSugar.dll
E:\gz\MES-WEB-API\SyntacticSugar\bin\Debug\SyntacticSugar.pdb
E:\gz\MES-WEB-API\SyntacticSugar\obj\Debug\SyntacticSugar.csproj.CoreCompileInputs.cache
E:\gz\MES-WEB-API\SyntacticSugar\obj\Debug\SyntacticSugar.dll
E:\gz\MES-WEB-API\SyntacticSugar\obj\Debug\SyntacticSugar.pdb
=======
<<<<<<< HEAD
C:\Users\19858\Desktop\智云迈思\MES-WEB-API\SyntacticSugar\obj\Debug\SyntacticSugar.csproj.AssemblyReference.cache
=======
D:\工作代码\智云迈思\MES\MES-WEB-API\SyntacticSugar\obj\Debug\SyntacticSugar.csproj.AssemblyReference.cache
>>>>>>> 28e8091a515d24a9cf82251f383f055a2ab0cff9
>>>>>>> ed299767c89cd657b2a5373cb3546de9950382bd
WebAPI/Controllers/BaseSet/Gy_ConkTypeController.cs
@@ -539,6 +539,63 @@
            }
        }
        [Route("Gy_ConkType/List_PDA2")]
        [HttpGet]
        public object List_PDA(string sWhere, string user, string Mode)
        {
            if (string.IsNullOrWhiteSpace(Mode))
            {
                return List_PDA(sWhere, user);
            }
            try
            {
                string errRef = "";
                List<object> columnNameList = new List<object>();
                if(oClsXt_SystemParameter.ShowBill(ref errRef))
                {
                    if(oClsXt_SystemParameter.omodel.WMS_CampanyName == "华舟")
                    {
                        if(Mode == "Module")
                        {
                            sWhere += $" and æ•…障类别代码 like 'MJ%' ";
                        }
                        else if (Mode == "Equip")
                        {
                            sWhere += $" and æ•…障类别代码 like 'SB%' ";
                        }
                    }
                }
                sWhere += $" and ç¦ç”¨æ ‡å¿—='' ";
                LogService.Write(sWhere);
                string sql1 = string.Format(@"select * from h_v_Gy_ConkTypeList where 1=1 ");
                ds = oCN.RunProcReturn(sql1 + sWhere + " order by æ•…障类别代码 ", "h_v_Gy_ConkTypeList");
                //添加列名
                foreach (DataColumn col in ds.Tables[0].Columns)
                {
                    Type dataType = col.DataType;
                    string ColmString = "{\"ColmCols\":\"" + col.ColumnName + "\",\"ColmType\":\"" + dataType.Name + "\"}";
                    columnNameList.Add(JsonConvert.DeserializeObject(ColmString));//获取到DataColumn列对象的列名
                }
                objJsonResult.code = "1";
                objJsonResult.count = 1;
                objJsonResult.Message = "Sucess!";
                objJsonResult.data = ds.Tables[0];
                objJsonResult.list = columnNameList;
                return objJsonResult;
            }
            catch (Exception e)
            {
                objJsonResult.code = "0";
                objJsonResult.count = 0;
                objJsonResult.Message = "Exception!" + e.ToString();
                objJsonResult.data = null;
                return objJsonResult;
            }
        }
WebAPI/Controllers/BaseSet/Gy_MaterialController.cs
@@ -4834,7 +4834,7 @@
                        "," + HPrintQty + ",'" + HMouldStatus + "'," + HWHID + "," + HRoutingID + "," + HCaveQty +
                        "," + HBOMID + ",'" + HVersion + "'," + HSPGroupID + "," + HSPID + ",'" + HDesignLife + "','" + HNowSupID + "','" + HNowSupTypeID + "'" +
                        ",'" + HUseLife + "','" + HLeaveLife + "','" + HProdQty + "','" + HProdWeight + "','" + HMouldOWNER + "','" + HSaveLife + "','" + HMouldDotCheckRuleInterID + "','" + HMouldMaintainRuleInterID + "','" + HBarCode + "'," + HMadeSupID +
                        ",'" + HMouldClass + "'," + HNowWHID + "," + HNowSPID + ",'" + HInitLife + " ) ");
                        ",'" + HMouldClass + "'," + HNowWHID + "," + HNowSPID + ",'" + HInitLife + "' ) ");
                    }
                    else
                    {
WebAPI/Controllers/LMESController.cs
@@ -12,6 +12,8 @@
using WebAPI.Models;
using System.Web;
using System.IO;
using WebAPI.Controllers.SCGL;
namespace WebAPI.Controllers
{
    public class LMESController : ApiController
@@ -25,7 +27,6 @@
        //自定义34进制数组
        private static char[] lNCode = new char[] { '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'J', 'K', 'L', 'M', 'N', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z' };
        string fileip = System.Configuration.ConfigurationManager.AppSettings["FileIP"];
        #region è¿”回进站扫描列表|工序进站接收单列表 
        [Route("LEMS/MES_StationInBillList_Json")]
@@ -856,11 +857,11 @@
                // ååºåˆ—化子表数据
                var detailList = Newtonsoft.Json.JsonConvert.DeserializeObject<List<Dictionary<string, string>>>(msg3);
                // 3. å¼€å§‹äº‹åŠ¡
                oCN.BeginTran();
                foreach (var row in detailList)
                {
                    // 3. å¼€å§‹äº‹åŠ¡
                    oCN.BeginTran();
                    DataSet ds2 = null;
                    // èŽ·å–å­è¡¨å­—æ®µå€¼
                    string hSourceID = row.ContainsKey("HSourceID") ? row["HSourceID"] : "0";
                    string hMoldID = row.ContainsKey("HMoldID") ? row["HMoldID"] : "0";
@@ -874,13 +875,14 @@
                    string sReturn = "";
                    if (oSystemParameter.ShowBill(ref sReturn) == true)
                    {
                        if (oSystemParameter.omodel.WMS_CampanyName == "华舟")
                        {
                         if (oSystemParameter.omodel.WMS_CampanyName == "华舟")
                         {
                            oCN.RunProc("update Sc_ProcessExchangeBillMain set HMakeDate = GETDATE(),HRemark3='已派工',HMaker='" + msg4 + "' where HInterID = " + hSourceInterID);
                            LogService.Write("自动生成工作联系单...");
                            //自动生成工作联系单
                            oCN.RunProc("exec h_p_OA_WorkLinkBill_Create " + hSourceInterID + "," + 3772);
                        }
                            ds2 = oCN.RunProcReturn("exec h_p_OA_WorkLinkBill_Create " + hSourceInterID + "," + 3772, "h_p_OA_WorkLinkBill_Create");
                         }
                    }
                    oCN.RunProc("update Sc_ProcessExchangeBillSub set HSourceID=" + hSourceID + " where HInterID=" + hSourceInterID + " and HEntryID=" + hSourceEntryID);
                    // æ’入生产状态临时表
@@ -888,11 +890,21 @@
                    oCN.RunProc(SQL);
                    //插入工序流转卡派工单
                    string SQL1 = $"exec h_p_Sc_ProcExchSendWorkBill_PG {hSourceInterID},{hSourceEntryID},{hSourceID},{hMoldID}";
                    oCN.RunProc(SQL1);
                    oCN.RunProc(SQL1);
                    // 7. æäº¤äº‹åŠ¡
                    oCN.Commit();
                    if (ds2 != null && ds2.Tables[0].Rows.Count > 0)
                    {
                        int HInterID = int.Parse(ds2.Tables[0].Rows[0]["NewHInterID"].ToString());
                        LogService.Write("执行消息推送..." + HInterID);
                        // è§¦å‘消息推送
                        Service.GeTuiService.PubishSingle(HInterID);
                    }
                }
                // 7. æäº¤äº‹åŠ¡
                oCN.Commit();
                objJsonResult.code = "1";
                objJsonResult.count = 1;
WebAPI/Controllers/MJGL/Sc_MouldProdOutBillController.cs
@@ -29,7 +29,8 @@
        private json objJsonResult = new json();
        SQLHelper.ClsCN oCn = new SQLHelper.ClsCN();
        public DAL.ClsSc_MouldProdOutBill oBill = new DAL.ClsSc_MouldProdOutBill();
        //获取系统参数
        Pub_Class.ClsXt_SystemParameter oSystemParameter = new Pub_Class.ClsXt_SystemParameter();
        #region å™¨å…·é¢†ç”¨å‡ºåº“单分页列表
        [Route("Sc_MouldProdOutBillController/page")]
@@ -813,6 +814,26 @@
                if (bResult)
                {
                    string sReturn = "";
                    // åŽèˆŸ ä¿å­˜æˆåŠŸåŽä¸‹æŽ¨å·¥ä½œè”ç³»å•
                    if (oSystemParameter.ShowBill(ref sReturn) == true)
                    {
                        if (oSystemParameter.omodel.WMS_CampanyName == "华舟")
                        {
                            //自动生成工作联系单
                            var ds2 = oCn.RunProcReturn("exec h_p_OA_WorkLinkBill_Create " + oBill.omodel.HInterID + "," + 3802, "h_p_OA_WorkLinkBill_Create");
                            if (ds2 != null && ds2.Tables[0].Rows.Count > 0)
                            {
                                int HInterID = int.Parse(ds2.Tables[0].Rows[0]["NewHInterID"].ToString());
                                LogService.Write("执行消息推送..." + HInterID);
                                // è§¦å‘消息推送
                                Service.GeTuiService.PubishSingle(HInterID);
                            }
                        }
                    }
                    objJsonResult.code = "0";
                    objJsonResult.count = 1;
                    objJsonResult.Message = DBUtility.ClsPub.sExeReturnInfo;  //成功!
WebAPI/Controllers/MJGL/Sc_MouldUpperBillController.cs
@@ -331,7 +331,7 @@
                   , HSourceID, HICMOInterID, HICMOEntryID, HICMOBillNo,HScanDate,HBarCode)
                    values("
                     + HInterID + ",'"+ HBillNo + "'," + i + "," + oSub.HMouldID.ToString() + ",'" + oSub.HQty 
                     + "'," + oSub.HSourceID.ToString() + "," + oSub.HICMOInterID.ToString() + "," + oSub.HICMOEntryID.ToString()+",'"+ oSub.HICMOBillNo.ToString() + "','getdate()','" + oSub.HBarCode.ToString() +
                     + "'," + oSub.HSourceID.ToString() + "," + oSub.HICMOInterID.ToString() + "," + oSub.HICMOEntryID.ToString()+",'"+ oSub.HICMOBillNo.ToString() + "',getdate(),'" + oSub.HBarCode.ToString() +
                     "') ");
            }
@@ -2447,7 +2447,17 @@
                    if (oSystemParameter.omodel.WMS_CampanyName == "华舟")
                    {
                        //自动生成工作联系单
                        oCN.RunProc("exec h_p_OA_WorkLinkBill_Create " + HInterID + "," + 3847);
                        var ds2 = oCN.RunProcReturn("exec h_p_OA_WorkLinkBill_Create " + BillOld.omodel.HInterID + "," + 3847, "h_p_OA_WorkLinkBill_Create");
                        if (ds2 != null && ds2.Tables[0].Rows.Count > 0)
                        {
                            int HInterID0 = int.Parse(ds2.Tables[0].Rows[0]["NewHInterID"].ToString());
                            LogService.Write("执行消息推送..." + HInterID0);
                            // è§¦å‘消息推送
                            Service.GeTuiService.PubishSingle(HInterID0);
                        }
                    }                   
                }
             
WebAPI/Controllers/QC_ManagementController.cs
@@ -297,13 +297,13 @@
                SQLHelper.ClsCN oCN = new SQLHelper.ClsCN();
                if (sqlWhere == null || sqlWhere.Equals(""))
                {
                    ds = oCN.RunProcReturn("select top 500 * from h_v_QC_PatrolProcCheckBillList where  å…³é—­äºº='' order by hmainid desc ", "h_v_QC_PatrolProcCheckBillList");
                    ds = oCN.RunProcReturn("select top 500 * from h_v_QC_PatrolProcCheckBillMainList where  å…³é—­äºº='' order by hmainid desc ", "h_v_QC_PatrolProcCheckBillMainList");
                }
                else
                {
                    string sql1 = "select * from h_v_QC_PatrolProcCheckBillList where å…³é—­äºº='' ";
                    string sql1 = "select * from h_v_QC_PatrolProcCheckBillMainList where å…³é—­äºº='' ";
                    string sql = sql1 + sqlWhere+ " order by åˆ¶å•日期 desc ";
                    ds = oCN.RunProcReturn(sql, "h_v_QC_PatrolProcCheckBillList");
                    ds = oCN.RunProcReturn(sql, "h_v_QC_PatrolProcCheckBillMainList");
                }
            }
            catch (Exception e)
WebAPI/Controllers/SBGL/Sb_EquipRepairSendWorkBillController.cs
@@ -223,15 +223,29 @@
              ",HYear,HPeriod,HRemark,HMaker,HMakeDate" +
              ",HEquipID,HExplanation,HInnerBillNo,HRepairID,HEmpID" +
              ",HManagerID,HDeptID,HRepairContent,HRepairPlanBeginDate,HRepairPlanEndDate" +
              ",HPlanTimes,HCycleUnit" +
              ",HPlanTimes,HCycleUnit,HMainSourceBillType,HMainSourceInterID,HMainSourceEntryID" +
              ") " +
              " values('" + BillType + "','" + BillType + "'," + omodel.HInterID.ToString() + ",'" + omodel.HBillNo + "','" + omodel.HDate + "'" +
              ", Year(getdate()),Month(getdate()),'" + omodel.HRemark + "','" + omodel.HMaker + "',getdate()" +
              ", " + omodel.HYear.ToString() + "," + omodel.HPeriod.ToString() + ",'" + omodel.HRemark + "','" + omodel.HMaker + "',getdate()" +
              ", " + omodel.HEquipID.ToString() + ",'" + omodel.HExplanation + "','" + omodel.HInnerBillNo + "'," + omodel.HRepairID.ToString() + "," + omodel.HEmpID.ToString() +
              "," + omodel.HManagerID.ToString() + "," + omodel.HDeptID.ToString() + ",'" + omodel.HRepairContent + "','" + omodel.HRepairPlanBeginDate + "','" + omodel.HRepairPlanEndDate + "'" +
              "," + omodel.HPlanTimes.ToString() + ",'" + omodel.HCycleUnit + "'" +
              "," + omodel.HPlanTimes.ToString() + ",'" + omodel.HCycleUnit + "','" + omodel.HMainSourceBillType + "','" + omodel.HMainSourceInterID + "','" + omodel.HMainSourceEntryID + "'" +
              ") ");
              //       "Insert Into Sb_EquipRepairSendWorkBillMain" +
              //  "(HBillType,HBillSubType,HInterID,HBillNo,HDate" +
              // ",HYear,HPeriod,HRemark,HMaker,HMakeDate" +
              // ",HEquipID,HExplanation,HInnerBillNo,HRepairID,HEmpID" +
              // ",HManagerID,HDeptID,HRepairContent,HRepairPlanBeginDate,HRepairPlanEndDate" +
              // ",HPlanTimes,HCycleUnit" +
              // ") " +
              // " values('" + BillType + "','" + BillType + "'," + omodel.HInterID.ToString() + ",'" + omodel.HBillNo + "','" + omodel.HDate + "'" +
              // ", Year(getdate()),Month(getdate()),'" + omodel.HRemark + "','" + omodel.HMaker + "',getdate()" +
              // ", " + omodel.HEquipID.ToString() + ",'" + omodel.HExplanation + "','" + omodel.HInnerBillNo + "'," + omodel.HRepairID.ToString() + "," + omodel.HEmpID.ToString() +
              // "," + omodel.HManagerID.ToString() + "," + omodel.HDeptID.ToString() + ",'" + omodel.HRepairContent + "','" + omodel.HRepairPlanBeginDate + "','" + omodel.HRepairPlanEndDate + "'" +
              // "," + omodel.HPlanTimes.ToString() + ",'" + omodel.HCycleUnit + "'" +
              // ") "
                }
                else if (OperationType == 3)
                {
WebAPI/Controllers/Sb_CheckEqpRepairWorkBillController.cs
@@ -1291,6 +1291,7 @@
            ListModels oListModels = new ListModels();
            try
            {
                string errRef = "";
                if (!DBUtility.ClsPub.Security_Log("Sb_EquipConkBookBill_Edit", 1, false, msg4))
                {
                    objJsonResult.code = "0";
@@ -1336,6 +1337,18 @@
                    //oItem.HRepairID = 0; //维修项目(Gy_Repair)
                    //oItem.HRemark = "";   //备注
                    //oItem.HMainSourceInterID = oItem.HInterID;
                    if (oSystemParameter.ShowBill(ref errRef))
                    {
                        // if (oSystemParameter.omodel.WMS_CampanyName == "华舟")
                        // {
                        //     oItem.HRepairManID = oItem.HEmpID;
                        // }
                        // else
                        // {
                            oItem.HRepairManID = 0;
                        // }
                    }
                    //oItem.HInterID = DBUtility.ClsPub.CreateBillID_SRMProd("1103", ref DBUtility.ClsPub.sExeReturnInfo);
                    if (DBUtility.ClsPub.isStrNull(oItem.HDate) == "")
@@ -1377,7 +1390,6 @@
                    //oItemSub.HManagerID = 0;   //负责人ID
                    //oItemSub.HMoney = 0;        //维修费用
                    oBill.DetailColl.Add(oItemSub);
                }
                //保存
                //保存完毕后处理
WebAPI/Controllers/Sc_MouldRepairInBillListController.cs
@@ -6058,6 +6058,7 @@
            ListModels oListModels = new ListModels();
            try
            {
                string sErrMsg = "";
                if (!DBUtility.ClsPub.Security_Log("Sc_MouldConkBookBill_Edit", 1, false, msg4))
                {
                    objJsonResult.code = "0";
@@ -6083,6 +6084,17 @@
                    //oItem.HInnerBillNo = "";  //  --内部单据号
                    oItem.HYear = DBUtility.ClsPub.isLong(DateTime.Now.Year);
                    oItem.HMakeDate = DBUtility.ClsPub.isStrNull(DateTime.Now.ToString("yyyy-MM-dd"));
                   if(oSystemParameter.ShowBill(ref sErrMsg) == true)
                   {
                        // if(oSystemParameter.omodel.WMS_CampanyName == "华舟")
                        // {
                        //     oItem.HRepairManID = oItem.HEmpID;
                        // }else
                        // {
                            oItem.HRepairManID = 0;
                        // }
                   }
                    if (DBUtility.ClsPub.isStrNull(oItem.HDate) == "")
                    {
                        objJsonResult.code = "0";
WebAPI/Controllers/Sc_ProcessMangementController.cs
@@ -1503,7 +1503,9 @@
                FentityModel.Add("FBaseUnitId", new JObject() { ["Fnumber"] = HUnitNumber.ToString() });//基本单位
                FentityModel.Add("FBaseInspectQty", HCheckQty.ToString());//基本单位检验数量
                FentityModel.Add("FSupplierId", new JObject() { ["Fnumber"] = HSupNumber.ToString() }); //  ä¾›åº”商
                                                                                                        //FentityModel.Add("FStockId", new JObject() { ["Fnumber"] = HWHNumber.ToString() }); // ä»“库
                // FentityModel.Add("FStockId", new JObject() { ["Fnumber"] = HWHID.ToString() }); // ä»“库
                FentityModel.Add("FInspectTimes", "1"); // æ£€éªŒæ¬¡æ•° 
                FentityModel.Add("FTimeUnit", "24");//时间单位
                FentityModel.Add("FSAMPLEDAMAGEBEARER", "2");//样本破坏承担方
@@ -1767,10 +1769,31 @@
                FentityModel.Add("FQCStatus", "1");//  è´¨æ£€çŠ¶æ€ 
                FentityModel.Add("FIsRelated", false);//  ä¸è‰¯å“å…³è”标志
                FentityModel.Add("FSrcBillType0", "PUR_ReceiveBill");//  æºå•类型
                if (oSystemParameter.ShowBill(ref sErr))
                {
                    if (oSystemParameter.omodel.WMS_CampanyName == "锦隆")
                    {
                        FentityModel.Add("FSrcBillNo0", HSLBillNo.ToString());    //收料通知单单号
                        FentityModel.Add("FSrcInterId0", HSLInterID.ToString());      //收料通知单主ID
                        FentityModel.Add("FSrcEntryId0", HSLEntryID.ToString());
                        FentityModel.Add("FSrcEntrySeq0", HSLSeQ.ToString());    //源单行号
                        FentityModel.Add("F_WPVT_Text_uky", HSourceBillNo.ToString());    //采购订单行号
                        FentityModel.Add("F_WPVT_Integer_fg2", HSeQ.ToString());  //订单行号
                    }
                }
                FentityModel.Add("FBaseUnitId", new JObject() { ["Fnumber"] = HUnitNumber.ToString() });//基本单位
                FentityModel.Add("FBaseInspectQty", HCheckQty.ToString());//基本单位检验数量
                FentityModel.Add("FSupplierId", new JObject() { ["Fnumber"] = HSupNumber.ToString() }); //  ä¾›åº”商
                                                                                                        //FentityModel.Add("FStockId", new JObject() { ["Fnumber"] = HWHNumber.ToString() }); // ä»“库
                if (oSystemParameter.ShowBill(ref sErr))
                {
                    if (oSystemParameter.omodel.WMS_CampanyName == "锦隆")
                    {
                        FentityModel.Add("FStockId", new JObject() { ["Fnumber"] = HWHID.ToString() }); // ä»“库
                    }
                }
                FentityModel.Add("FInspectTimes", "1"); // æ£€éªŒæ¬¡æ•° 
                FentityModel.Add("FTimeUnit", "24");//时间单位
                FentityModel.Add("FSAMPLEDAMAGEBEARER", "2");//样本破坏承担方
@@ -1789,7 +1812,7 @@
                FentityModel2.Add("FBasePolicyQty", HRightQty.ToString() == "0" ? HBadQty.ToString() : HRightQty.ToString()); //基本单位数量
                FentityModel2.Add("FUsePolicy", HUseResult.ToString());   //使用决策
                FentityModel2.Add("FIsCheck", false);   //是否抽检
                                                        // é”¦éš†å¯ç”¨ä¸è‰¯å¤„理
                // é”¦éš†å¯ç”¨ä¸è‰¯å¤„理
                if (oSystemParameter.ShowBill(ref sErr))
                {
                    if (string.Equals(oSystemParameter.omodel.WMS_CampanyName, "锦隆"))
WebAPI/Controllers/WebAPIController.cs
@@ -1518,7 +1518,7 @@
        /// <returns></returns>
        [Route("Web/GetEmployeeList_Json")]
        [HttpGet]
        public object GetEmployeeList_Json(string Employee, Int64 HGroupID)
        public object GetEmployeeList_Json2(string Employee, Int64 HGroupID)
        {
            sWhere = " Where HStopFlag=0  and HEndFlag=1";
            //sWhere = " Where HStopFlag=0  and HEndFlag=1  and HUSEORGID = " + DBUtility.ClsPub.HORGANIZATIONSID.ToString();
@@ -1576,6 +1576,7 @@
            }
        }
        /// <summary>
        /// èŽ·å–ç­æ¬¡åˆ—è¡¨
WebAPI/Controllers/Æ·ÖʹÜÀí/Ѳ¼ìµ¥/QC_PatrolProcCheckOtherBillController.cs
@@ -7,6 +7,7 @@
using System.Data;
using System.Data.SqlClient;
using System.Web.Http;
using WebAPI.Controllers.SCGL;
using WebAPI.Models;
namespace WebAPI.Controllers
@@ -340,6 +341,28 @@
                //提示
                if (bResult == true)
                {
                    string sReturn = "";
                    // åŽèˆŸ ä¿å­˜æˆåŠŸåŽä¸‹æŽ¨å·¥ä½œè”ç³»å•
                    if (oSystemParameter.ShowBill(ref sReturn) == true)
                    {
                        if (oSystemParameter.omodel.WMS_CampanyName == "华舟")
                        {
                            //自动生成工作联系单
                            var ds2 = oCN.RunProcReturn("exec h_p_OA_WorkLinkBill_Create " + BillOld.omodel.HInterID + "," + 7507, "h_p_OA_WorkLinkBill_Create");
                            if (ds2 != null && ds2.Tables[0].Rows.Count > 0)
                            {
                                int HInterID = int.Parse(ds2.Tables[0].Rows[0]["NewHInterID"].ToString());
                                LogService.Write("执行消息推送..." + HInterID);
                                // è§¦å‘消息推送
                                Service.GeTuiService.PubishSingle(HInterID);
                            }
                        }
                    }
                    objJsonResult.code = "1";
                    objJsonResult.count = 1;
                    objJsonResult.Message = ClsPub.sExeReturnInfo+"单据号:" + mainList[0].HBillNo.Trim();
WebAPI/Controllers/Æ·ÖʹÜÀí/¹¤Ðò¼ìÑéµ¥/QC_ProcessCheckBillController.cs
@@ -1049,6 +1049,27 @@
                //提示
                if (bResult == true)
                {
                    string sReturn = "";
                    // åŽèˆŸ ä¿å­˜æˆåŠŸåŽä¸‹æŽ¨å·¥ä½œè”ç³»å•
                    if (oSystemParameter.ShowBill(ref sReturn) == true)
                    {
                        if (oSystemParameter.omodel.WMS_CampanyName == "华舟")
                        {
                            //自动生成工作联系单
                            var ds2 = oCN.RunProcReturn("exec h_p_OA_WorkLinkBill_Create " + BillOld.omodel.HInterID + "," + 7520, "h_p_OA_WorkLinkBill_Create");
                            if (ds2 != null && ds2.Tables[0].Rows.Count > 0)
                            {
                                int HInterID = int.Parse(ds2.Tables[0].Rows[0]["NewHInterID"].ToString());
                                LogService.Write("执行消息推送..." + HInterID);
                                // è§¦å‘消息推送
                                Service.GeTuiService.PubishSingle(HInterID);
                            }
                        }
                    }
                    objJsonResult.code = "1";
                    objJsonResult.count = 1;
                    objJsonResult.Message = ClsPub.sExeReturnInfo+"单据号:" + mainList[0].HBillNo.Trim();
WebAPI/Controllers/Æ·ÖʹÜÀí/¼ìÑéÈ¡Ñù»¹Ñùµ¥/QC_TakeSampleCheckBillController.cs
@@ -8,6 +8,7 @@
using System.Data;
using System.Data.SqlClient;
using System.Web.Http;
using WebAPI.Controllers.SCGL;
using WebAPI.Models;
namespace WebAPI.Controllers
@@ -267,7 +268,17 @@
                        if (oSystemParameter.omodel.WMS_CampanyName == "华舟")
                        {
                            //自动生成工作联系单
                            oCN.RunProc("exec h_p_OA_WorkLinkBill_Create " + BillOld.omodel.HInterID + "," + 7521);
                            var ds2 = oCN.RunProcReturn("exec h_p_OA_WorkLinkBill_Create " + BillOld.omodel.HInterID + "," + 7521, "h_p_OA_WorkLinkBill_Create");
                            if (ds2 != null && ds2.Tables[0].Rows.Count > 0)
                            {
                                int HInterID = int.Parse(ds2.Tables[0].Rows[0]["NewHInterID"].ToString());
                                LogService.Write("执行消息推送..." + HInterID);
                                // è§¦å‘消息推送
                                Service.GeTuiService.PubishSingle(HInterID);
                            }
                        }
                    }
                }
WebAPI/Controllers/Æ·ÖʹÜÀí/Ê×¼þ¼ìÑéµ¥/QC_FirstPieceCheckBillController.cs
@@ -8,6 +8,7 @@
using System.Data;
using System.Data.SqlClient;
using System.Web.Http;
using WebAPI.Controllers.SCGL;
using WebAPI.Models;
namespace WebAPI.Controllers
@@ -409,10 +410,25 @@
                    {
                        if (oSystemParameter.omodel.WMS_CampanyName == "华舟")
                        {
                            //自动生成工作联系单
                            oCN.RunProc("exec h_p_OA_WorkLinkBill_Create " + BillNew.omodel.HInterID + "," + 7505);
                            // oCN.RunProc("exec h_p_OA_WorkLinkBill_Create " + BillNew.omodel.HInterID + "," + 7505);
                            var ds2 = oCN.RunProcReturn("exec h_p_OA_WorkLinkBill_Create " + BillNew.omodel.HInterID + "," + 7505, "h_p_OA_WorkLinkBill_Create");
                            if (ds2 != null && ds2.Tables[0].Rows.Count > 0)
                            {
                                int HInterID = int.Parse(ds2.Tables[0].Rows[0]["NewHInterID"].ToString());
                                if (oSystemParameter.ShowBill(ref sReturn) == true)
                                {
                                    if (oSystemParameter.omodel.WMS_CampanyName == "华舟")
                                    {
                                        LogService.Write("执行消息推送..." + HInterID);
                                        // è§¦å‘消息推送
                                        Service.GeTuiService.PubishSingle(HInterID);
                                    }
                                }
                            }
                        }
                    }                    
                }
WebAPI/Controllers/»ù´¡×ÊÁÏ/»ù´¡×ÊÁÏ/Gy_CostAverageTypeController.cs
@@ -171,7 +171,8 @@
            string msg3 = _value.ToString();
            string[] sArray = msg3.Split(new string[] { ";" }, StringSplitOptions.RemoveEmptyEntries);
            string msg1 = sArray[0].ToString();
            string msg2 = sArray[1].ToString();
            string msg2 = sArray[2].ToString();
            string msg4 = sArray[1].ToString();//子表
            //查看权限
            if (!DBUtility.ClsPub.Security_Log("Gy_CostAverageType_Edit", 1, false, msg2))
@@ -190,10 +191,16 @@
            {
                DAL.ClsGy_CostAverageType_Ctl oBill = new DAL.ClsGy_CostAverageType_Ctl();
                List<Model.ClsGy_CostAverageType_Model> lsmain = new List<Model.ClsGy_CostAverageType_Model>();
                List<Model.ClsGy_CostAverageTypeSub_Model> lssub = new List<Model.ClsGy_CostAverageTypeSub_Model>();
                msg1 = msg1.Replace("\\", "");
                msg1 = msg1.Replace("\n", "");  //\n
                msg1 = "[" + msg1.ToString() + "]";
                msg4 = msg4.Substring(1, msg4.Length - 2);
                msg4 = msg4.Replace("\\", "");
                msg4 = msg4.Replace("\n", "");  //\n
                msg4 = "[" + msg4.ToString() + "]";
                lsmain = Newtonsoft.Json.JsonConvert.DeserializeObject<List<Model.ClsGy_CostAverageType_Model>>(msg1);
                lssub = Newtonsoft.Json.JsonConvert.DeserializeObject<List<Model.ClsGy_CostAverageTypeSub_Model>>(msg4);
                foreach (Model.ClsGy_CostAverageType_Model oItem in lsmain)
                {
                    if (oItem.HNumber.Trim() == "")
@@ -308,7 +315,19 @@
                    oItem.HMakeEmp = msg2;//创建人
                    oBill.oModel = oItem;
                }
                int i = 0;
                foreach (Model.ClsGy_CostAverageTypeSub_Model oItemSub in lssub)
                {
                    i++;
                    oItemSub.HEntryID = i;
                    oItemSub.HEntryCloseDate = DBUtility.ClsPub.isDate(DateTime.Now);
                    oItemSub.HCloseType = false;   //关闭类型
                    oBill.DetailColl.Add(oItemSub);
                }
                //保存
                //保存完毕后处理
                bool bResult;
@@ -838,7 +857,7 @@
                    oCN.RollBack();//回滚事务
                    objJsonResult.code = "0";
                    objJsonResult.count = 0;
                    objJsonResult.Message = "数据已删除无法再次删除!";
                    objJsonResult.Message = "数据已被禁用无法再次删除!";
                    objJsonResult.data = null;
                    return objJsonResult;
                }
WebAPI/Controllers/»ù´¡×ÊÁÏ/»ù´¡×ÊÁÏ/Gy_CostCenterController.cs
@@ -45,9 +45,9 @@
                    return objJsonResult;
                }
                string sql1 = "SELECT * from h_v_Gy_CostCenter_1 where 1 = 1";
                string sql1 = "SELECT * from h_v_Gy_CostCenterList where 1 = 1";
                string sql = sql1 + sWhere + " order by æˆæœ¬ä¸­å¿ƒä»£ç  ";
                ds = oCN.RunProcReturn(sql, "h_v_Gy_CostCenter_1");
                ds = oCN.RunProcReturn(sql, "h_v_Gy_CostCenterList");
                //添加列名
                foreach (DataColumn col in ds.Tables[0].Columns)
@@ -97,7 +97,7 @@
                    return objJsonResult;
                }
                var ds = oCN.RunProcReturn("select * from Gy_CostCenter_1 where HItemID=" + HInterID, "Gy_CostCenter_1");
                var ds = oCN.RunProcReturn("select * from Gy_CostCenter where HItemID=" + HInterID, "Gy_CostCenter");
                if (ds.Tables[0].Rows.Count > 0)
                {
                    if (IsAudit == 0)  //审核判断
@@ -160,7 +160,7 @@
                    }
                    //================================================================================== 
                    oCN.RunProc("update Gy_CostCenter_1 set HCheckEmp='" + CurUserName + "',HCheckTime=getdate() where HItemID=" + HInterID);
                    oCN.RunProc("update Gy_CostCenter set HCheckEmp='" + CurUserName + "',HCheckTime=getdate() where HItemID=" + HInterID);
                    //审核后控制=========================================      
                    string sql2 = "exec h_p_Gy_CostCenter_AfterCheckCtrl " + HInterID + ",'" + CurUserName + "'";
@@ -218,7 +218,7 @@
                    }
                    //================================================================================== 
                    oCN.RunProc("update Gy_CostCenter_1 set HCheckEmp='',HCheckTime=null where HItemID=" + HInterID);
                    oCN.RunProc("update Gy_CostCenter set HCheckEmp='',HCheckTime=null where HItemID=" + HInterID);
                    //反审核后控制========================h_p_Gy_CostCenter_AfterUnCheckCtrl=================      
                    string sql2 = "exec h_p_Gy_CostCenter_AfterUnCheckCtrl " + HInterID + ",'" + CurUserName + "'";
@@ -296,7 +296,7 @@
                }
                oCN.BeginTran();//开始事务
                ds = oCN.RunProcReturn("select * from Gy_CostCenter_1  where HItemID=" + HItemID, "Gy_CostCenter_1 ");
                ds = oCN.RunProcReturn("select * from Gy_CostCenter  where HItemID=" + HItemID, "Gy_CostCenter ");
                if (ds.Tables[0].Rows.Count > 0)
                {
                    if (ds.Tables[0].Rows[0]["HCheckEmp"].ToString() != "")
@@ -351,7 +351,7 @@
                //================================================================================== 
                oCN.RunProc("delete Gy_CostCenter_1  where HItemID=" + HItemID);
                oCN.RunProc("delete Gy_CostCenter  where HItemID=" + HItemID);
                //删除后控制=========================================      
@@ -422,7 +422,7 @@
                    return objJsonResult;
                }
                var ds = oCN.RunProcReturn("select * from Gy_CostCenter_1 where HItemID=" + HInterID, "Gy_CostCenter_1");
                var ds = oCN.RunProcReturn("select * from Gy_CostCenter where HItemID=" + HInterID, "Gy_CostCenter");
                if (ds.Tables[0].Rows.Count > 0)
                {
                    if (IsStop == 0)  //禁用判断
@@ -486,7 +486,7 @@
                    }
                    //================================================================================== 
                    oCN.RunProc("update Gy_CostCenter_1 set HStopEmp='" + CurUserName + "',HStopTime=getdate(),HStopflag=1 where HItemID=" + HInterID);
                    oCN.RunProc("update Gy_CostCenter set HStopEmp='" + CurUserName + "',HStopTime=getdate(),HStopflag=1 where HItemID=" + HInterID);
                    //禁用后控制=========================================      
                    string sql2 = "exec h_p_Gy_CostCenter_AfterStopCtrl " + HInterID + ",'" + CurUserName + "'";
@@ -544,7 +544,7 @@
                    }
                    //================================================================================== 
                    oCN.RunProc("update Gy_CostCenter_1 set HStopEmp='',HStopTime=null,HStopflag=0 where HItemID=" + HInterID);
                    oCN.RunProc("update Gy_CostCenter set HStopEmp='',HStopTime=null,HStopflag=0 where HItemID=" + HInterID);
                    //反禁用后控制=========================================      
                    string sql2 = "exec h_p_Gy_CostCenter_AfterUnStopCtrl " + HInterID + ",'" + CurUserName + "'";
@@ -649,7 +649,7 @@
                    }
                    //查询数据中是否存在重复代码
                    ds = oCN.RunProcReturn("select * from  Gy_CostCenter_1 where HStopflag=0 and HNumber='" + oItem.HNumber.Trim() + "'", "Gy_CostCenter_1");
                    ds = oCN.RunProcReturn("select * from  Gy_CostCenter where HStopflag=0 and HNumber='" + oItem.HNumber.Trim() + "'", "Gy_CostCenter");
                    if (oItem.HNumber.Trim() == "")
                    {
                        objJsonResult.code = "0";
@@ -700,7 +700,7 @@
                    {
                        //已审核不允许修改
                        DataSet dss;
                        dss = oCN.RunProcReturn("select * from Gy_CostCenter_1 where HItemID=" + oItem.HItemID, "Gy_CostCenter_1");
                        dss = oCN.RunProcReturn("select * from Gy_CostCenter where HItemID=" + oItem.HItemID, "Gy_CostCenter");
                        //判断是否可编辑
                        if (dss.Tables[0].Rows[0]["HCheckEmp"].ToString() != "")
                        {
@@ -803,8 +803,8 @@
            try
            {
                List<object> columnNameList = new List<object>();
                string sql1 = $@"select * from h_v_Gy_CostCenter_1 where HItemID = {HID}";
                ds = oCN.RunProcReturn(sql1, "h_v_Gy_CostCenter_1");
                string sql1 = $@"select * from h_v_Gy_CostCenterList where HItemID = {HID}";
                ds = oCN.RunProcReturn(sql1, "h_v_Gy_CostCenterList");
                //添加列名
                foreach (DataColumn col in ds.Tables[0].Columns)
                {
WebAPI/Controllers/»ù´¡×ÊÁÏ/»ù´¡×ÊÁÏ/Gy_CostItemAverageTypeController.cs
@@ -45,9 +45,9 @@
                    return objJsonResult;
                }
                string sql1 = "SELECT * from h_v_Gy_CostItemAverageType_1 where 1 = 1";
                string sql1 = "SELECT * from h_v_Gy_CostItemAverageTypeList where 1 = 1";
                string sql = sql1 + sWhere + " order by æˆæœ¬é¡¹ç›®åˆ†é…æ ‡å‡†ä»£ç ";
                ds = oCN.RunProcReturn(sql, "h_v_Gy_CostItemAverageType_1");
                ds = oCN.RunProcReturn(sql, "h_v_Gy_CostItemAverageTypeList");
                //添加列名
                foreach (DataColumn col in ds.Tables[0].Columns)
@@ -98,7 +98,7 @@
                }
                var ds = oCN.RunProcReturn("select * from Gy_CostItemAverageType_1 where HItemID=" + HInterID, "Gy_CostItemAverageType_1");
                var ds = oCN.RunProcReturn("select * from Gy_CostItemAverageType where HItemID=" + HInterID, "Gy_CostItemAverageType");
                if (ds.Tables[0].Rows.Count > 0)
                {
                    if (IsAudit == 0)  //审核判断
@@ -161,7 +161,7 @@
                    }
                    //================================================================================== 
                    oCN.RunProc("update Gy_CostItemAverageType_1 set HCheckEmp='" + CurUserName + "',HCheckTime=getdate() where HItemID=" + HInterID);
                    oCN.RunProc("update Gy_CostItemAverageType set HCheckEmp='" + CurUserName + "',HCheckTime=getdate() where HItemID=" + HInterID);
                    //审核后控制=========================================      
                    string sql2 = "exec h_p_Gy_CostItemAverageType_AfterCheckCtrl " + HInterID + ",'" + CurUserName + "'";
@@ -219,7 +219,7 @@
                    }
                    //================================================================================== 
                    oCN.RunProc("update Gy_CostItemAverageType_1 set HCheckEmp='',HCheckTime=null where HItemID=" + HInterID);
                    oCN.RunProc("update Gy_CostItemAverageType set HCheckEmp='',HCheckTime=null where HItemID=" + HInterID);
                    //反审核后控制=========================================      
                    string sql2 = "exec h_p_Gy_CostItemAverageType_AfterUnCheckCtrl " + HInterID + ",'" + CurUserName + "'";
@@ -297,7 +297,7 @@
                }
                oCN.BeginTran();//开始事务
                ds = oCN.RunProcReturn("select * from Gy_CostItemAverageType_1  where HItemID=" + HItemID, "Gy_CostItemAverageType_1");
                ds = oCN.RunProcReturn("select * from Gy_CostItemAverageType  where HItemID=" + HItemID, "Gy_CostItemAverageType");
                if (ds.Tables[0].Rows.Count > 0)
                {
                    if (ds.Tables[0].Rows[0]["HCheckEmp"].ToString() != "")
@@ -352,7 +352,7 @@
                //================================================================================== 
                oCN.RunProc("delete Gy_CostItemAverageType_1  where HItemID=" + HItemID);
                oCN.RunProc("delete Gy_CostItemAverageType  where HItemID=" + HItemID);
                //删除后控制=========================================      
@@ -423,7 +423,7 @@
                    return objJsonResult;
                }
                var ds = oCN.RunProcReturn("select * from Gy_CostItemAverageType_1 where HItemID=" + HInterID, "Gy_CostItemAverageType_1");
                var ds = oCN.RunProcReturn("select * from Gy_CostItemAverageType where HItemID=" + HInterID, "Gy_CostItemAverageType");
                if (ds.Tables[0].Rows.Count > 0)
                {
                    if (IsStop == 0)  //禁用判断
@@ -487,7 +487,7 @@
                    }
                    //================================================================================== 
                    oCN.RunProc("update Gy_CostItemAverageType_1 set HStopEmp='" + CurUserName + "',HStopTime=getdate(),HStopflag=1 where HItemID=" + HInterID);
                    oCN.RunProc("update Gy_CostItemAverageType set HStopEmp='" + CurUserName + "',HStopTime=getdate(),HStopflag=1 where HItemID=" + HInterID);
                    //禁用后控制=========================================      
                    string sql2 = "exec h_p_Gy_CostItemAverageType_AfterStopCtrl " + HInterID + ",'" + CurUserName + "'";
@@ -545,7 +545,7 @@
                    }
                    //================================================================================== 
                    oCN.RunProc("update Gy_CostItemAverageType_1 set HStopEmp='',HStopTime=null,HStopflag=0 where HItemID=" + HInterID);
                    oCN.RunProc("update Gy_CostItemAverageType set HStopEmp='',HStopTime=null,HStopflag=0 where HItemID=" + HInterID);
                    //反禁用后控制=========================================      
                    string sql2 = "exec h_p_Gy_CostItemAverageType_AfterUnStopCtrl " + HInterID + ",'" + CurUserName + "'";
@@ -650,7 +650,7 @@
                    }
                    //查询数据中是否存在重复代码
                    ds = oCN.RunProcReturn("select * from  Gy_CostItemAverageType_1 where HStopflag=0 and HNumber='" + oItem.HNumber.Trim() + "'", "Gy_CostItemAverageType_1");
                    ds = oCN.RunProcReturn("select * from  Gy_CostItemAverageType where HStopflag=0 and HNumber='" + oItem.HNumber.Trim() + "'", "Gy_CostItemAverageType");
                    if (oItem.HNumber.Trim() == "")
                    {
                        objJsonResult.code = "0";
@@ -701,7 +701,7 @@
                    {
                        //已审核不允许修改
                        DataSet dss;
                        dss = oCN.RunProcReturn("select * from Gy_CostItemAverageType_1 where HItemID=" + oItem.HItemID, "Gy_CostItemAverageType_1");
                        dss = oCN.RunProcReturn("select * from Gy_CostItemAverageType where HItemID=" + oItem.HItemID, "Gy_CostItemAverageType");
                        //判断是否可编辑
                        if (dss.Tables[0].Rows[0]["HCheckEmp"].ToString() != "")
                        {
@@ -804,8 +804,8 @@
            try
            {
                List<object> columnNameList = new List<object>();
                string sql1 = $@"select * from h_v_Gy_CostItemAverageType_1 where HItemID = {HID}";
                ds = oCN.RunProcReturn(sql1, "h_v_Gy_CostItemAverageType_1");
                string sql1 = $@"select * from h_v_Gy_CostItemAverageTypeList where HItemID = {HID}";
                ds = oCN.RunProcReturn(sql1, "h_v_Gy_CostItemAverageTypeList");
                //添加列名
                foreach (DataColumn col in ds.Tables[0].Columns)
                {
WebAPI/Controllers/»ù´¡×ÊÁÏ/»ù´¡×ÊÁÏ/Gy_CostItemController.cs
@@ -45,9 +45,9 @@
                    return objJsonResult;
                }
                string sql1 = "SELECT * from h_v_Gy_CostItem_1 where 1 = 1";
                string sql1 = "SELECT * from h_v_Gy_CostItemList where 1 = 1";
                string sql = sql1 + sWhere + " order by æˆæœ¬é¡¹ç›®ä»£ç  ";
                ds = oCN.RunProcReturn(sql, "h_v_Gy_CostItem_1");
                ds = oCN.RunProcReturn(sql, "h_v_Gy_CostItemList");
                //添加列名
                foreach (DataColumn col in ds.Tables[0].Columns)
@@ -98,7 +98,7 @@
                }
                
             var ds = oCN.RunProcReturn("select * from Gy_CostItem_1 where HItemID=" + HInterID, "Gy_CostItem_1");
             var ds = oCN.RunProcReturn("select * from Gy_CostItem where HItemID=" + HInterID, "Gy_CostItem");
                if (ds.Tables[0].Rows.Count > 0)
                {
                    if (IsAudit == 0)  //审核判断
@@ -161,7 +161,7 @@
                    }
                    //================================================================================== 
                    oCN.RunProc("update Gy_CostItem_1 set HCheckEmp='" + CurUserName + "',HCheckTime=getdate() where HItemID=" + HInterID);
                    oCN.RunProc("update Gy_CostItem set HCheckEmp='" + CurUserName + "',HCheckTime=getdate() where HItemID=" + HInterID);
                    //审核后控制=========================================      
                    string sql2 = "exec h_p_Gy_CostItem_AfterCheckCtrl " + HInterID + ",'" + CurUserName + "'";
@@ -219,7 +219,7 @@
                    }
                    //================================================================================== 
                    oCN.RunProc("update Gy_CostItem_1 set HCheckEmp='',HCheckTime=null where HItemID=" + HInterID);
                    oCN.RunProc("update Gy_CostItem set HCheckEmp='',HCheckTime=null where HItemID=" + HInterID);
                    //反审核后控制=========================================      
                    string sql2 = "exec h_p_Gy_CostItem_AfterUnCheckCtrl " + HInterID + ",'" + CurUserName + "'";
@@ -297,7 +297,7 @@
                 }
                 oCN.BeginTran();//开始事务
                 ds = oCN.RunProcReturn("select * from Gy_CostItem_1  where HItemID=" + HItemID, "Gy_CostItem_1 ");
                 ds = oCN.RunProcReturn("select * from Gy_CostItem  where HItemID=" + HItemID, "Gy_CostItem ");
                 if (ds.Tables[0].Rows.Count > 0)
                 {
                     if (ds.Tables[0].Rows[0]["HCheckEmp"].ToString() != "")
@@ -352,7 +352,7 @@
                 //================================================================================== 
                 oCN.RunProc("delete Gy_CostItem_1  where HItemID=" + HItemID);
                 oCN.RunProc("delete Gy_CostItem  where HItemID=" + HItemID);
                 //删除后控制=========================================      
@@ -423,7 +423,7 @@
                    return objJsonResult;
                }
                var ds = oCN.RunProcReturn("select * from Gy_CostItem_1 where HItemID=" + HInterID, "Gy_CostItem_1");
                var ds = oCN.RunProcReturn("select * from Gy_CostItem where HItemID=" + HInterID, "Gy_CostItem");
                if (ds.Tables[0].Rows.Count > 0)
                {
                    if (IsStop == 0)  //禁用判断
@@ -487,7 +487,7 @@
                    }
                    //================================================================================== 
                    oCN.RunProc("update Gy_CostItem_1 set HStopEmp='" + CurUserName + "',HStopTime=getdate(),HStopflag=1 where HItemID=" + HInterID);
                    oCN.RunProc("update Gy_CostItem set HStopEmp='" + CurUserName + "',HStopTime=getdate(),HStopflag=1 where HItemID=" + HInterID);
                    //禁用后控制=========================================      
                    string sql2 = "exec h_p_Gy_CostItem_AfterStopCtrl " + HInterID + ",'" + CurUserName + "'";
@@ -545,7 +545,7 @@
                    }
                    //================================================================================== 
                    oCN.RunProc("update Gy_CostItem_1 set HStopEmp='',HStopTime=null,HStopflag=0 where HItemID=" + HInterID);
                    oCN.RunProc("update Gy_CostItem set HStopEmp='',HStopTime=null,HStopflag=0 where HItemID=" + HInterID);
                    //反禁用后控制=========================================      
                    string sql2 = "exec h_p_Gy_CostItem_AfterUnStopCtrl " + HInterID + ",'" + CurUserName + "'";
@@ -650,7 +650,7 @@
                    }
                    //查询数据中是否存在重复代码
                    ds = oCN.RunProcReturn("select * from  Gy_CostItem_1 where HStopflag=0 and HNumber='" + oItem.HNumber.Trim() + "'", "Gy_CostItem_1");
                    ds = oCN.RunProcReturn("select * from  Gy_CostItem where HStopflag=0 and HNumber='" + oItem.HNumber.Trim() + "'", "Gy_CostItem");
                    if (oItem.HNumber.Trim() == "")
                    {
                        objJsonResult.code = "0";
@@ -701,7 +701,7 @@
                    {
                        //已审核不允许修改
                        DataSet dss;
                        dss = oCN.RunProcReturn("select * from Gy_CostItem_1 where HItemID=" + oItem.HItemID, "Gy_CostItem_1");
                        dss = oCN.RunProcReturn("select * from Gy_CostItem where HItemID=" + oItem.HItemID, "Gy_CostItem");
                        //判断是否可编辑
                        if (dss.Tables[0].Rows[0]["HCheckEmp"].ToString() != "")
                        {
@@ -804,8 +804,8 @@
            try
            {
                List<object> columnNameList = new List<object>();
                string sql1 = $@"select * from h_v_Gy_CostItem_1 where HItemID = {HID}";
                ds = oCN.RunProcReturn(sql1, "h_v_Gy_CostItem_1");
                string sql1 = $@"select * from h_v_Gy_CostItemList where HItemID = {HID}";
                ds = oCN.RunProcReturn(sql1, "h_v_Gy_CostItemList");
                //添加列名
                foreach (DataColumn col in ds.Tables[0].Columns)
                {
WebAPI/Controllers/³É±¾¹ÜÀí/CB_ItemMoneyBillController.cs
@@ -6,8 +6,13 @@
using System.Collections.Generic;
using System.Data;
using System.Data.SqlClient;
using System.Web;
using System.Web.Http;
using WebAPI.Models;
using WebAPI.Controllers.SCGL.日计划管理;
using System.IO;
using System.Linq;
using System.Text;
namespace WebAPI.Controllers
{
@@ -950,5 +955,419 @@
        #endregion
        #region æ–‡ä»¶ä¸Šä¼ 
        [Route("CB_ItemMoneyBillController/CB_ItemMoneyBill_Excel")]
        [HttpPost]
        public json CB_ItemMoneyBill_Excel()
        {
            json res = new json();
            try
            {
                //获取文件名称
                var file = HttpContext.Current.Request.Files[0];
                //获取文件物理路径
                string ExcelPath = HttpContext.Current.Server.MapPath("~/" + file.FileName);
                //保存文件
                file.SaveAs(ExcelPath);
                SCGL.日计划管理.NpoiHelper np = new NpoiHelper();
                DataSet ExcelDs = np.ReadExcel(ExcelPath, 1, 1, "0");
                //删除文件
                File.Delete(ExcelPath);
                //创建临时表
                DataTable provisional = new DataTable("dt2");
                //添加列名
                for (int i = 0; i < ExcelDs.Tables[0].Columns.Count; i++)
                {
                    provisional.Columns.Add(ExcelDs.Tables[0].Rows[0][i].ToString());
                }
                provisional.Columns.Add("单据号", typeof(string));
                //添加数据
                for (int i = 1; i < ExcelDs.Tables[0].Rows.Count; i++)
                {
                    DataRow row = provisional.NewRow();
                    for (int j = 0; j < ExcelDs.Tables[0].Columns.Count; j++)
                    {
                        row[j] = ExcelDs.Tables[0].Rows[i][j].ToString();
                    }
                    provisional.Rows.Add(row);
                }
                //判断列
                string error = JudgmentColumns(provisional);
                if (error.Length > 0)
                {
                    res.code = "0";
                    res.count = 0;
                    res.Message = $"Excel模板存在错误,{error}\r\n";
                    res.data = null;
                    return res;
                }
                for (int i = 0; i <= provisional.Rows.Count - 1; i++)
                {
                    //string HBillNo= DBUtility.ClsPub.CreateBillCode("1802", ref DBUtility.ClsPub.sExeReturnInfo, true);
                    //provisional.Rows[i]["单据号"] = HBillNo;
                    string HDepNumber = DBUtility.ClsPub.isStrNull(provisional.Rows[i]["部门代码"].ToString());
                    string HDepName = DBUtility.ClsPub.isStrNull(provisional.Rows[i]["部门"].ToString());
                    string HEmpNumber = DBUtility.ClsPub.isStrNull(provisional.Rows[i]["职员代码"].ToString());
                    string HEmpName = DBUtility.ClsPub.isStrNull(provisional.Rows[i]["职员"].ToString());
                    string HICMOBillNo = DBUtility.ClsPub.isStrNull(provisional.Rows[i]["生产订单号"].ToString());
                    string HProc = DBUtility.ClsPub.isStrNull(provisional.Rows[i]["工序"].ToString());
                    string HCostItemNumber = DBUtility.ClsPub.isStrNull(provisional.Rows[i]["成本项目代码"].ToString());
                    string HCostItemName = DBUtility.ClsPub.isStrNull(provisional.Rows[i]["成本项目"].ToString());
                    //string HEntryID = DBUtility.ClsPub.isStrNull(provisional.Rows[i]["子表内码"].ToString());
                    //string HDepNumber_sub = DBUtility.ClsPub.isStrNull(provisional.Rows[i]["子部门代码"].ToString());
                    //string HDepName_sub = DBUtility.ClsPub.isStrNull(provisional.Rows[i]["子部门"].ToString());
                    string HMaterNumber = DBUtility.ClsPub.isStrNull(provisional.Rows[i]["物料编码"].ToString());
                    string HMaterName = DBUtility.ClsPub.isStrNull(provisional.Rows[i]["物料名称"].ToString());
                    string HQty = DBUtility.ClsPub.isStrNull(provisional.Rows[i]["数量"].ToString());
                    string HPrice = DBUtility.ClsPub.isStrNull(provisional.Rows[i]["单价"].ToString());
                    string HMoney = DBUtility.ClsPub.isStrNull(provisional.Rows[i]["金额"].ToString());
                    string HWaster = DBUtility.ClsPub.isStrNull(provisional.Rows[i]["损耗量"].ToString());
                    //string HRelationQty = DBUtility.ClsPub.isStrNull(provisional.Rows[i]["关联数量"].ToString());
                    //string HRelationMoney = DBUtility.ClsPub.isStrNull(provisional.Rows[i]["关联金额"].ToString());
                    string remark = DBUtility.ClsPub.isStrNull(provisional.Rows[i]["备注"].ToString());
                    //获取真实行数
                    int line = i + 1;
                }
                res.code = "1";
                res.count = 1;
                res.Message = error;
                res.data = provisional;
                return res;
            }
            catch (Exception e)
            {
                res.code = "0";
                res.count = 0;
                res.Message = "Exception!" + e.ToString();
                res.data = null;
                return res;
            }
        }
        /// <summary>
        /// åˆ¤æ–­åˆ—
        /// </summary>
        /// <param name="provisional"></param>
        /// <returns></returns>
        private static string JudgmentColumns(DataTable provisional)
        {
            var error = "";
            //查询没有的列
            //if (!provisional.Columns.Contains("子表内码"))
            //    error += "没有找到【子表内码】的标题,";
            if (!provisional.Columns.Contains("物料编码"))
                error += "没有找到【物料编码】的标题,";
            return error;
        }
        #endregion
        #region ä¸Šä¼ ä¿å­˜
        [Route("CB_ItemMoneyBillController/Excel_btnSave")]
        [HttpPost]
        public object Excel_btnSave([FromBody] JObject sMainSub)
        {
            var _value = sMainSub["sMainSub"].ToString();
            string msg1 = _value.ToString();
            string[] sArray = msg1.Split(new string[] { "&和" }, StringSplitOptions.RemoveEmptyEntries);
            string msg2 = sArray[0].ToString();
            string user = sArray[1].ToString();
            string organ = sArray[2].ToString();
            json res = new json();
            try
            {
                oCN.BeginTran();
                List<object> Excel = Newtonsoft.Json.JsonConvert.DeserializeObject<List<object>>(msg2);
                List<Dictionary<string, string>> list = new List<Dictionary<string, string>>();
                foreach (JObject item in Excel)
                {
                    Dictionary<string, string> dic = new Dictionary<string, string>();
                    foreach (var itm in item.Properties())
                    {
                        dic.Add(itm.Name, itm.Value.ToString());
                    }
                    list.Add(dic);
                }
                // 1. æ”¶é›†æ‰€æœ‰éœ€è¦æŸ¥è¯¢çš„æ•°æ®
                var HBillnos = list.Select(x => x["单据号"].ToString()).Distinct().ToList();
                var HProc = list.Select(x => x["工序"].ToString()).Distinct().ToList();
                //var HDeptNames = list.Select(x => x["部门"].ToString()).Distinct().ToList();
                //var HDeptNumbers = list.Select(x => x["部门代码"].ToString()).Distinct().ToList();
                var HDeptNames_sub = list.Select(x => x["部门"].ToString()).Distinct().ToList();
                var HDeptNumbers_sub = list.Select(x => x["部门代码"].ToString()).Distinct().ToList();
                var materialNumbers = list.Select(x => x["物料编码"].ToString()).Distinct().ToList();
                var materialNames = list.Select(x => x["物料名称"].ToString()).Distinct().ToList();
                var EmpNumbers = list.Select(x => x["职员代码"].ToString()).Distinct().ToList();
                var EmpNames = list.Select(x => x["职员"].ToString()).Distinct().ToList();
                var CostNumbers = list.Select(x => x["成本项目代码"].ToString()).Distinct().ToList();
                var CostNames = list.Select(x => x["成本项目"].ToString()).Distinct().ToList();
                var ICMONumbers = list.Select(x => x["生产订单号"].ToString()).Distinct().ToList();
                // 2. æ‰¹é‡æŸ¥è¯¢ç”Ÿäº§è®¢å•内码
                string ICMOQuery = $"SELECT HInterID,HBillNo FROM Sc_ICMOBillMain WHERE HBillNo IN ({string.Join(",", ICMONumbers.Select(s => $"'{s.Replace("'", "''")}'"))})";
                DataSet icmoData = oCN.RunProcReturn(ICMOQuery, "Sc_ICMOBillMain");
                Dictionary<string, int> ICMODict = new Dictionary<string, int>();
                foreach (DataRow row in icmoData.Tables[0].Rows)
                {
                    ICMODict[row["HBillNo"].ToString()] = (int)row["HInterID"];
                }
                //// 2. æ‰¹é‡æŸ¥è¯¢ä¸»å­è¡¨éƒ¨é—¨ä¿¡æ¯
                //string supplierQuery = $"SELECT HItemID, HName FROM Gy_Department WHERE HName IN ({string.Join(",", HDeptNames.Select(s => $"'{s.Replace("'", "''")}'"))})";
                //DataSet supData = oCN.RunProcReturn(supplierQuery, "Gy_Department");
                //Dictionary<string, int> supplierDict = new Dictionary<string, int>();
                //foreach (DataRow row in supData.Tables[0].Rows)
                //{
                //    supplierDict[row["HName"].ToString()] = (int)row["HItemID"];
                //}
                // 2.1 æ‰¹é‡æŸ¥è¯¢ä¸»å­è¡¨éƒ¨é—¨ä¿¡æ¯
                string supplierQuery_sub = $"SELECT HItemID, HName FROM Gy_Department WHERE HName IN ({string.Join(",", HDeptNames_sub.Select(s => $"'{s.Replace("'", "''")}'"))})";
                DataSet supData_sub = oCN.RunProcReturn(supplierQuery_sub, "Gy_Department");
                Dictionary<string, int> supplierDict_sub = new Dictionary<string, int>();
                foreach (DataRow row in supData_sub.Tables[0].Rows)
                {
                    supplierDict_sub[row["HName"].ToString()] = (int)row["HItemID"];
                }
                // 3. æ‰¹é‡æŸ¥è¯¢ç‰©æ–™ä¿¡æ¯
                string materialQuery =
                $"SELECT HItemID, HNumber, HName FROM Gy_Material WHERE HNumber IN ({string.Join(",", materialNumbers.Select(m => $"'{m.Replace("'", "''")}'"))}) AND HName IN ({string.Join(",", materialNames.Select(m => $"'{m.Replace("'", "''")}'"))})";
                DataSet materData = oCN.RunProcReturn(materialQuery, "Gy_Material");
                Dictionary<string, int> materialDict = new Dictionary<string, int>();
                foreach (DataRow row in materData.Tables[0].Rows)
                {
                    string key = $"{row["HNumber"]}_{row["HName"]}";
                    materialDict[key] = (int)row["HItemID"];
                }
                // 3. æ‰¹é‡æŸ¥è¯¢èŒå‘˜ä¿¡æ¯
                string EmployeeQuery =
                $"SELECT HItemID, HNumber, HName FROM Gy_Employee WHERE HNumber IN ({string.Join(",", EmpNumbers.Select(m => $"'{m.Replace("'", "''")}'"))}) AND HName IN ({string.Join(",", EmpNames.Select(m => $"'{m.Replace("'", "''")}'"))})";
                DataSet EmpData = oCN.RunProcReturn(EmployeeQuery, "Gy_Employee");
                Dictionary<string, int> EmpDict = new Dictionary<string, int>();
                foreach (DataRow row in EmpData.Tables[0].Rows)
                {
                    string key = $"{row["HName"].ToString()}";
                    EmpDict[key] = (int)row["HItemID"];
                }
                // 3. æ‰¹é‡æŸ¥è¯¢chengbenxiangmu信息
                string CostQuery = $"SELECT HItemID, HNumber, HName FROM Gy_ItemMoney_1 WHERE HNumber IN ({string.Join(",", CostNumbers.Select(m => $"'{m.Replace("'", "''")}'"))}) AND HName IN ({string.Join(",", CostNames.Select(m => $"'{m.Replace("'", "''")}'"))})";
                DataSet CostData = oCN.RunProcReturn(CostQuery, "Gy_ItemMoney_1");
                Dictionary<string, int> CostDict = new Dictionary<string, int>();
                foreach (DataRow row in CostData.Tables[0].Rows)
                {
                    string key = $"{row["HName"].ToString()}";
                    CostDict[key] = (int)row["HItemID"];
                }
                // 3.1 æ‰¹é‡æŸ¥è¯¢å·¥åºä¿¡æ¯
                string ProcessQuery = $"SELECT HItemID, HNumber, HName FROM Gy_Process WHERE  HName IN ({string.Join(",", HProc.Select(m => $"'{m.Replace("'", "''")}'"))})";
                DataSet ProcData = oCN.RunProcReturn(ProcessQuery, "Gy_Process");
                Dictionary<string, int> ProcDict = new Dictionary<string, int>();
                foreach (DataRow row in ProcData.Tables[0].Rows)
                {
                    string key = $"{row["HName"].ToString()}";
                    ProcDict[key] = (int)row["HItemID"];
                }
                // 4. æŸ¥è¯¢ç”¨æˆ·ä¿¡æ¯
                DataSet emp = oCN.RunProcReturn($"SELECT Czybm FROM Gy_Czygl WHERE Czymc = '{user.Replace("'", "''")}'", "Gy_Czygl");
                if (emp.Tables[0].Rows.Count == 0)
                {
                    res.code = "0";
                    res.count = 0;
                    res.Message = "用户不存在!";
                    res.data = null;
                    return res;
                }
                string HUserID = emp.Tables[0].Rows[0]["Czybm"].ToString();
                // 5. æ£€æŸ¥ç¼ºå¤±çš„部门和物料,并记录行号
                List<string> missingSupplierMessages = new List<string>();
                List<string> missingMaterialMessages = new List<string>();
                // éåŽ†æ¯ä¸€è¡Œæ•°æ®ï¼Œè®°å½•è¡Œå·ï¼ˆä»Ž1开始)
                for (int i = 0; i < list.Count; i++)
                {
                    var item = list[i];
                    int lineNumber = i + 1; // è¡Œå·ä»Ž1开始
                    string ICMOcheck = item["生产订单号"];
                    string supplier = item["部门"];
                    string materialNumber = item["物料编码"];
                    string materialName = item["物料名称"];
                    string materialKey = $"{materialNumber}_{materialName}";
                    // æ£€æŸ¥ä¾›åº”商
                    if (!supplierDict_sub.ContainsKey(supplier))
                    {
                        missingSupplierMessages.Add($"第{lineNumber}行的部门【{supplier}】");
                    }
                    // æ£€æŸ¥ç‰©æ–™
                    if (!materialDict.ContainsKey(materialKey))
                    {
                        missingMaterialMessages.Add($"第{lineNumber}行的物料【{materialName}(编码:{materialNumber})】");
                    }
                    // æ£€æŸ¥ç”Ÿäº§è®¢å•
                    if (!string.IsNullOrEmpty(ICMOcheck) && !ICMODict.ContainsKey(ICMOcheck))
                    {
                        missingMaterialMessages.Add($"第{lineNumber}行的生产订单【{ICMOcheck}】");
                    }
                }
                StringBuilder errorMessage = new StringBuilder();
                if (missingSupplierMessages.Any())
                {
                    errorMessage.Append("以下部门未维护:");
                    errorMessage.Append(string.Join("、", missingSupplierMessages));
                    errorMessage.Append(";");
                }
                if (missingMaterialMessages.Any())
                {
                    errorMessage.Append("以下物料未维护:");
                    errorMessage.Append(string.Join("、", missingMaterialMessages));
                    errorMessage.Append(";");
                }
                if (errorMessage.Length > 0)
                {
                    res.code = "0";
                    res.count = 0;
                    res.Message = errorMessage.ToString();
                    res.data = null;
                    return res;
                }
                // 6. æ‰¹é‡æŸ¥è¯¢å·²å­˜åœ¨çš„记录
                var materialIds = list.Select(x => materialDict[$"{x["物料编码"]}_{x["物料名称"]}"]).Distinct().ToList();
                var supplierIds = list.Select(x => supplierDict_sub[x["部门"]]).Distinct().ToList();
                string existQuery = $"select * from h_v_CB_ItemMoneyBillMain_Edit_excel WHERE HMaterID IN ({string.Join(",", materialIds)}) AND HDeptID_sub IN ({string.Join(",", supplierIds)})";
                DataSet existData = oCN.RunProcReturn(existQuery, "h_v_CB_ItemMoneyBillMain_Edit_excel");
                HashSet<string> existRecords = new HashSet<string>();
                foreach (DataRow row in existData.Tables[0].Rows)
                {
                    existRecords.Add($"{row["HMaterID"]}_{row["HDeptID_sub"]}");
                }
                // 7. æŒ‰ç…§éƒ¨é—¨ä»£ç ã€éƒ¨é—¨ã€èŒå‘˜ä»£ç ã€èŒå‘˜ã€ç”Ÿäº§è®¢å•号进行分组
                var groupedData = list.GroupBy(item => new
                {
                    éƒ¨é—¨ä»£ç  = item["部门代码"],
                    éƒ¨é—¨ = item["部门"],
                    èŒå‘˜ä»£ç  = item["职员代码"],
                    èŒå‘˜ = item["职员"],
                    ç”Ÿäº§è®¢å•号 = item["生产订单号"]
                }).ToList();
                StringBuilder insertSql = new StringBuilder();
                StringBuilder insertSql_sub = new StringBuilder();
                string currentDate = DateTime.Today.ToString("yyyy-MM-dd");
                foreach (var group in groupedData)
                {
                    var firstItem = group.First();
                    // èŽ·å–ç»„ä¿¡æ¯
                    int HSupplierID = supplierDict_sub[firstItem["部门"]];
                    int EmpID = EmpDict[firstItem["职员"]];
                    string ICMO = firstItem["生产订单号"];
                    int ICMOInterID = !string.IsNullOrEmpty(ICMO) && ICMODict.ContainsKey(ICMO) ? ICMODict[ICMO] : 0;
                    // ç”Ÿæˆä¸»è¡¨ID和单据号(每组生成一个)
                    string HBillNo = DBUtility.ClsPub.CreateBillCode("1802", ref DBUtility.ClsPub.sExeReturnInfo, true);
                    long HInterID = DBUtility.ClsPub.CreateBillID("1802", ref DBUtility.ClsPub.sExeReturnInfo);
                    // æ£€æŸ¥è¯¥ç»„是否已存在(根据部门ID和物料ID组合)
                    bool groupExists = false;
                    foreach (var item in group)
                    {
                        int HMaterID = materialDict[$"{item["物料编码"]}_{item["物料名称"]}"];
                        string recordKey = $"{HMaterID}_{HSupplierID}";
                        if (existRecords.Contains(recordKey))
                        {
                            groupExists = true;
                            break;
                        }
                    }
                    if (!groupExists)
                    {
                        // æ’入主表(每组插入一次)
                        insertSql.AppendLine($"INSERT INTO CB_ItemMoneyBillMain  ([HInterID], [HBillNo], [HDate], [HYear], [HPeriod], [HBillType], [HBillSubType], [HBillStatus], [HCheckItemNowID], [HCheckItemNextID], [HCheckFlowID], [HRemark], [HBacker], [HBackDate], [HBackRemark], [HChecker], [HCheckDate], [HMaker], [HMakeDate], [HUpDater], [HUpDateDate], [HCloseMan], [HCloseDate], [HCloseType], [HDeleteMan], [HDeleteDate], [HMainSourceBillType], [HMainSourceInterID], [HMainSourceEntryID], [HMainSourceBillNo], [HPrintQty],  [HEmpID], [HDeptID], [HICMOInterID], [HMaterID], [HICMOBillNo], [HExplanation], [HInnerBillNo], [HBeginDate], [HEndDate], [HOrgID]) VALUES (");
                        insertSql.AppendLine($"'{HInterID}', '{HBillNo}', '{DateTime.Now}', {DateTime.Now.Year}, {DateTime.Now.Month}, {"1802"}, '{"1802"}', '{"1"}',  '{"0"}', '{"0"}', '{"0"}', '{"excel导入"}', '{""}', '{DateTime.Now}', '{""}', '{""}', '{DateTime.Now}', '{""}', '{DateTime.Now}', '{""}', '{DateTime.Now}', '{""}', '{DateTime.Now}', '{"0"}', '{""}', '{DateTime.Now}', '{""}', '{"0"}', '{"0"}', '{""}', '{"0"}', '{EmpID}', '{HSupplierID}', '{ICMOInterID}','{0}','{ICMO}','{""}','{"0"}','{DateTime.Now}','{DateTime.Now}','{"100038"}');");
                        // æ’入子表(组内每个物料插入一次)
                        int HEntryID = 1;
                        foreach (var item in group)
                        {
                            int HMaterID = materialDict[$"{item["物料编码"]}_{item["物料名称"]}"];
                            int HCostID = CostDict[item["成本项目"]];
                            int HProcID = ProcDict[item["工序"]];
                            insertSql_sub.AppendLine($"INSERT INTO [CB_ItemMoneyBillSub] ([HInterID], [HEntryID], [HCloseMan], [HEntryCloseDate], [HCloseType], [HRemark],[HSourceInterID], [HSourceEntryID], [HSourceBillNo], [HSourceBillType],[HRelationQty], [HRelationMoney], [HBillNo_bak], [HCostItemID],[HDeptID], [HQty], [HPrice], [HMoney],[HMaterID], [HWaster], [HDate], [HBeginBalance], [HEndBalance], [HTimes],[HProcID]) VALUES (");
                            insertSql_sub.AppendLine($"'{HInterID}', '{HEntryID}', '{""}', '{DateTime.Now}', '{"0"}', '{"excel导入"}','{"0"}', '{"0"}',  '{"0"}', '{"0"}','{"0"}', '{"0"}', '{""}', '{HCostID}', '{HSupplierID}', '{item["数量"]}', '{item["单价"]}', '{item["金额"]}','{HMaterID}', '{item["损耗量"] ?? "0"}', '{DateTime.Now}', '{"0"}', '{"0"}', '{"0"}', '{HProcID}');");
                            HEntryID++;
                        }
                    }
                }
                // æ‰§è¡Œæ‰¹é‡æ“ä½œ
                if (insertSql.Length > 0)
                {
                    oCN.RunProc(insertSql.ToString());
                }
                if (insertSql_sub.Length > 0)
                {
                    oCN.RunProc(insertSql_sub.ToString());
                }
                oCN.Commit();
                res.code = "1";
                res.count = groupedData.Count;
                res.Message = $"导入成功! å…±å¤„理{groupedData.Count}组数据";
                res.data = null;
                return res;
            }
            catch (Exception e)
            {
                //oCN.Rollback();
                LogService.Write(e);
                res.code = "0";
                res.count = 0;
                res.Message = "Exception!" + e.ToString();
                res.data = null;
                return res;
            }
        }
        #endregion
    }
}
WebAPI/Controllers/³É±¾¹ÜÀí/CB_WipProcessTableController.cs
New file
@@ -0,0 +1,287 @@
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;
using System.Web.Http;
using WebAPI.Models;
using WebAPI.Controllers.SCGL.日计划管理;
using System.IO;
using System.Linq;
using System.Text;
namespace WebAPI.Controllers.成本管理
{
    public class CB_WipProcessTableController : ApiController
    {
        public DBUtility.ClsPub.Enum_BillStatus BillStatus;
        public DAL.ClsCB_ItemMoneyBillMain BillOld = new DAL.ClsCB_ItemMoneyBillMain();
        public DAL.ClsCB_ItemMoneyBillMain BillNew0 = new DAL.ClsCB_ItemMoneyBillMain();
        private json objJsonResult = new json();
        SQLHelper.ClsCN oCN = new SQLHelper.ClsCN();
        DataSet ds;
        #region æ–‡ä»¶ä¸Šä¼ 
        [Route("CB_WipProcessTableController/CB_WipProcessTable_Excel")]
        [HttpPost]
        public json CB_WipProcessTable_Excel()
        {
            json res = new json();
            try
            {
                //获取文件名称
                var file = HttpContext.Current.Request.Files[0];
                //获取文件物理路径
                string ExcelPath = HttpContext.Current.Server.MapPath("~/" + file.FileName);
                //保存文件
                file.SaveAs(ExcelPath);
                SCGL.日计划管理.NpoiHelper np = new NpoiHelper();
                DataSet ExcelDs = np.ReadExcel(ExcelPath, 1, 1, "0");
                //删除文件
                File.Delete(ExcelPath);
                //创建临时表
                DataTable provisional = new DataTable("dt2");
                //添加列名
                for (int i = 0; i < ExcelDs.Tables[0].Columns.Count; i++)
                {
                    provisional.Columns.Add(ExcelDs.Tables[0].Rows[0][i].ToString());
                }
                //provisional.Columns.Add("单据号", typeof(string));
                //添加数据
                for (int i = 1; i < ExcelDs.Tables[0].Rows.Count; i++)
                {
                    DataRow row = provisional.NewRow();
                    for (int j = 0; j < ExcelDs.Tables[0].Columns.Count; j++)
                    {
                        row[j] = ExcelDs.Tables[0].Rows[i][j].ToString();
                    }
                    provisional.Rows.Add(row);
                }
                //判断列
                string error = JudgmentColumns(provisional);
                if (error.Length > 0)
                {
                    res.code = "0";
                    res.count = 0;
                    res.Message = $"Excel模板存在错误,{error}\r\n";
                    res.data = null;
                    return res;
                }
                for (int i = 0; i <= provisional.Rows.Count - 1; i++)
                {
                    string HProcName = DBUtility.ClsPub.isStrNull(provisional.Rows[i]["产出工序"].ToString());
                    string HCusName = DBUtility.ClsPub.isStrNull(provisional.Rows[i]["客户"].ToString());
                    string HPartNumber = DBUtility.ClsPub.isStrNull(provisional.Rows[i]["成品料号"].ToString());
                    string HWIPQty = DBUtility.ClsPub.isStrNull(provisional.Rows[i]["WIP数量"].ToString());
                    string HInProcessWIPQty = DBUtility.ClsPub.isStrNull(provisional.Rows[i]["在制WIP数量"].ToString());
                    string HPanelQty = DBUtility.ClsPub.isStrNull(provisional.Rows[i]["拼版数"].ToString());
                    string HLot = DBUtility.ClsPub.isStrNull(provisional.Rows[i]["LOT"].ToString());
                    string HOrderTime = DBUtility.ClsPub.isStrNull(provisional.Rows[i]["下单时间"].ToString());
                    string HStartTime = DBUtility.ClsPub.isStrNull(provisional.Rows[i]["投产时间"].ToString());
                    string HOutputTime = DBUtility.ClsPub.isStrNull(provisional.Rows[i]["产出时间"].ToString());
                    string HProductionTime = DBUtility.ClsPub.isStrNull(provisional.Rows[i]["生产时间"].ToString());
                    string HStatus = DBUtility.ClsPub.isStrNull(provisional.Rows[i]["状态"].ToString());
                    string HStayTime = DBUtility.ClsPub.isStrNull(provisional.Rows[i]["停留时间(分钟)"].ToString());
                    //string remark = DBUtility.ClsPub.isStrNull(provisional.Rows[i]["备注"].ToString());
                    //获取真实行数
                    int line = i + 1;
                }
                res.code = "1";
                res.count = 1;
                res.Message = error;
                res.data = provisional;
                return res;
            }
            catch (Exception e)
            {
                res.code = "0";
                res.count = 0;
                res.Message = "Exception!" + e.ToString();
                res.data = null;
                return res;
            }
        }
        /// <summary>
        /// åˆ¤æ–­åˆ—
        /// </summary>
        /// <param name="provisional"></param>
        /// <returns></returns>
        private static string JudgmentColumns(DataTable provisional)
        {
            var error = "";
            //查询没有的列
            if (!provisional.Columns.Contains("客户"))
                error += "没有找到【客户】的标题,";
            if (!provisional.Columns.Contains("成品料号"))
                error += "没有找到【成品料号】的标题,";
            return error;
        }
        #endregion
        #region ä¸Šä¼ ä¿å­˜
        [Route("CB_WipProcessTableController/Excel_btnSave")]
        [HttpPost]
        public object Excel_btnSave([FromBody] JObject sMainSub)
        {
            var _value = sMainSub["sMainSub"].ToString();
            string msg1 = _value.ToString();
            string[] sArray = msg1.Split(new string[] { "&和" }, StringSplitOptions.RemoveEmptyEntries);
            string msg2 = sArray[0].ToString();
            string user = sArray[1].ToString();
            string organ = sArray[2].ToString();
            json res = new json();
            try
            {
                oCN.BeginTran();
                List<object> Excel = Newtonsoft.Json.JsonConvert.DeserializeObject<List<object>>(msg2);
                List<Dictionary<string, string>> list = new List<Dictionary<string, string>>();
                foreach (JObject item in Excel)
                {
                    Dictionary<string, string> dic = new Dictionary<string, string>();
                    foreach (var itm in item.Properties())
                    {
                        dic.Add(itm.Name, itm.Value.ToString());
                    }
                    list.Add(dic);
                }
                // 4. æŸ¥è¯¢ç”¨æˆ·ä¿¡æ¯
                DataSet emp = oCN.RunProcReturn($"SELECT Czybm FROM Gy_Czygl WHERE Czymc = '{user.Replace("'", "''")}'", "Gy_Czygl");
                if (emp.Tables[0].Rows.Count == 0)
                {
                    res.code = "0";
                    res.count = 0;
                    res.Message = "用户不存在!";
                    res.data = null;
                    return res;
                }
                string HUserID = emp.Tables[0].Rows[0]["Czybm"].ToString();
                StringBuilder errorMessage = new StringBuilder();
                StringBuilder insertSql = new StringBuilder();
                StringBuilder updateSql = new StringBuilder();
                string currentDate = DateTime.Today.ToString("yyyy-MM-dd");
                int HEntryID = 1;
                // éåŽ†æ•°æ®å¹¶éªŒè¯
                for (int i = 0; i < list.Count; i++)
                {
                    var item = list[i];
                    List<string> intFields = new List<string>
                    {
                        "WIP数量", "在制WIP数量", "拼版数"
                    };
                    bool hasError = false;
                    foreach (var field in intFields)
                    {
                        if (item.ContainsKey(field))
                        {
                            string value = item[field];
                            // æ£€æŸ¥æ˜¯å¦ä¸ºæ•´æ•°
                            if (!string.IsNullOrWhiteSpace(value))
                            {
                                if (!int.TryParse(value, out _))
                                {
                                    errorMessage.AppendLine($"第{i + 1}行数据错误:字段 '{field}' çš„值 '{value}' ä¸æ˜¯æœ‰æ•ˆçš„æ•´æ•°");
                                    hasError = true;
                                }
                            }
                        }
                    }
                    // å¦‚果有错误,跳过插入
                    if (hasError)
                    {
                        continue;
                    }
                    insertSql.AppendLine($"INSERT INTO CB_WipProcessTable  ([HYear], [HPeriod], [HDay], [HProcName], [HCusName], [HPartNumber], [HWIPQty], [HInProcessWIPQty], [HPanelQty], [HLot], [HOrderTime], [HStartTime], [HOutputTime], [HProductionTime], [HStatus], [HStayTime], [HChecker], [HCheckDate], [HMaker], [HMakeDate], [HUpDater], [HUpDateDate], [HCloseMan], [HCloseDate], [HCloseType], [HDeleteMan], [HDeleteDate], [HReamrk]) VALUES (");
                    insertSql.AppendLine($" {DateTime.Now.Year}, {DateTime.Now.Month}, {DateTime.Now.Day}, '{item["产出工序"]}', '{item["客户"]}',  '{item["成品料号"]}', '{item["WIP数量"]}', '{item["在制WIP数量"]}', '{item["拼版数"]}', '{item["LOT"]}', '{item["下单时间"]}', '{item["投产时间"]}', '{item["产出时间"]}', '{item["生产时间"]}', '{item["状态"]}', '{item["停留时间(分钟)"]}', '{""}', '{""}', '{user}', '{DateTime.Now}', '{""}', '{DateTime.Now}', '{""}', '{""}', '{"0"}', '{""}', '{""}', '{"excel导入"}');");
                }
                if (errorMessage.Length > 0)
                {
                    //oCN.Rollback();
                    res.code = "0";
                    res.count = 0;
                    res.Message = "数据验证失败:\n" + errorMessage.ToString();
                    res.data = null;
                    return res;
                }
                if (insertSql.Length == 0)
                {
                    // oCN.Rollback();
                    res.code = "0";
                    res.count = 0;
                    res.Message = "没有有效的整数数据可以导入";
                    res.data = null;
                    return res;
                }
                // æ‰§è¡Œæ‰¹é‡æ“ä½œ
                if (insertSql.Length > 0)
                {
                    oCN.RunProc(insertSql.ToString());
                }
                //if (updateSql.Length > 0)
                //{
                //    oCN.RunProc(updateSql.ToString());
                //    oCN.RunProc(updateSql_sub.ToString());
                //}
                oCN.Commit();
                res.code = "1";
                res.count = 1;
                res.Message = "导入成功!";
                res.data = null;
                return res;
            }
            catch (Exception e)
            {
                //oCN.Rollback();
                LogService.Write(e);
                res.code = "0";
                res.count = 0;
                res.Message = "Exception!" + e.ToString();
                res.data = null;
                return res;
            }
        }
        #endregion
    }
}
WebAPI/Controllers/ÌõÂë¹ÜÀí/WEBSController.cs
@@ -4696,6 +4696,66 @@
        #endregion
        #region ç”Ÿäº§é€€åº“    ä¸Šä¼ ç”Ÿå•
        #region ç”Ÿäº§é€€åº“    æ ¡éªŒæ¨¡å¼
        /// <summary>
        /// ç”Ÿäº§é€€åº“校验上传
        /// </summary>
        /// <returns></returns>
        [Route("WEBSController/set_SaveProductInBackBill_BillCheck_Json")]
        [HttpPost]
        public object set_SaveProductInBackBill_BillCheck_Json([FromBody] JObject oMain)
        {
            var _value = oMain["oMain"].ToString();
            string msg1 = _value.ToString();
            try
            {
                List<Model.ClsKf_ICStockBillMain> lsmain = new List<Model.ClsKf_ICStockBillMain>();
                ListModels oListModels = new ListModels();
                lsmain = oListModels.getICStockBillMainByJson(msg1);
                WebAPI.WebS.ClsKf_ICStockBillMain websLsmain = new WebS.ClsKf_ICStockBillMain();
                websLsmain.HInterID = lsmain[0].HInterID;
                websLsmain.HBillNo = lsmain[0].HBillNo;
                websLsmain.HBillType = "1245";
                websLsmain.HMaker = lsmain[0].HMaker;
                websLsmain.HSTOCKORGID = lsmain[0].HSTOCKORGID;
                if (oWebs.set_SaveProductInBackBill_BillCheck(websLsmain, ref DBUtility.ClsPub.sErrInfo))
                {
                    objJsonResult.code = "0";
                    objJsonResult.count = 1;
                    objJsonResult.Message = DBUtility.ClsPub.sErrInfo;  //成功!
                    objJsonResult.data = null;
                    return objJsonResult;
                }
                else
                {
                    objJsonResult.code = "0";
                    objJsonResult.count = 0;
                    objJsonResult.Message = DBUtility.ClsPub.sErrInfo;  //失败!
                    objJsonResult.data = null;
                    return objJsonResult;
                }
            }
            catch (Exception e)
            {
                objJsonResult.code = "0";
                objJsonResult.count = 0;
                objJsonResult.Message = "生产退库校验失败!" + e.ToString();
                objJsonResult.data = null;
                return objJsonResult;
            }
        }
        #endregion
        #endregion
        #region é‡‡è´­é€€æ–™    ä¸Šä¼ ç”Ÿå•
        #region é‡‡è´­é€€æ–™    æ–°å¢žæ¨¡å¼
@@ -4777,6 +4837,62 @@
                objJsonResult.code = "0";
                objJsonResult.count = 0;
                objJsonResult.Message = "采购退料单上传失败!" + e.ToString();
                objJsonResult.data = null;
                return objJsonResult;
            }
        }
        #endregion
        #region é‡‡è´­é€€æ–™    æ ¡éªŒæ¨¡å¼
        /// <summary>
        /// é‡‡è´­é€€æ–™æ ¡éªŒä¸Šä¼ 
        /// </summary>
        /// <returns></returns>
        [Route("WEBSController/set_SavePOStockInBackBill_BillCheck_Json")]
        [HttpPost]
        public object set_SavePOStockInBackBill_BillCheck_Json([FromBody] JObject oMain)
        {
            var _value = oMain["oMain"].ToString();
            string msg1 = _value.ToString();
            try
            {
                List<Model.ClsKf_ICStockBillMain> lsmain = new List<Model.ClsKf_ICStockBillMain>();
                ListModels oListModels = new ListModels();
                lsmain = oListModels.getICStockBillMainByJson(msg1);
                WebAPI.WebS.ClsKf_ICStockBillMain websLsmain = new WebS.ClsKf_ICStockBillMain();
                websLsmain.HInterID = lsmain[0].HInterID;
                websLsmain.HBillNo = lsmain[0].HBillNo;
                websLsmain.HBillType = "1239";
                websLsmain.HMaker = lsmain[0].HMaker;
                websLsmain.HSTOCKORGID = lsmain[0].HSTOCKORGID;
                if (oWebs.set_SavePOStockInBackBill_BillCheck(websLsmain, ref DBUtility.ClsPub.sErrInfo))
                {
                    objJsonResult.code = "0";
                    objJsonResult.count = 1;
                    objJsonResult.Message = DBUtility.ClsPub.sErrInfo;  //成功!
                    objJsonResult.data = null;
                    return objJsonResult;
                }
                else
                {
                    objJsonResult.code = "0";
                    objJsonResult.count = 0;
                    objJsonResult.Message = DBUtility.ClsPub.sErrInfo;  //失败!
                    objJsonResult.data = null;
                    return objJsonResult;
                }
            }
            catch (Exception e)
            {
                objJsonResult.code = "0";
                objJsonResult.count = 0;
                objJsonResult.Message = "采购退料校验失败!" + e.ToString();
                objJsonResult.data = null;
                return objJsonResult;
            }
@@ -5005,6 +5121,62 @@
                objJsonResult.code = "0";
                objJsonResult.count = 0;
                objJsonResult.Message = "销售退货单上传失败!" + e.ToString();
                objJsonResult.data = null;
                return objJsonResult;
            }
        }
        #endregion
        #region é”€å”®é€€è´§    æ ¡éªŒæ¨¡å¼
        /// <summary>
        /// é”€å”®é€€è´§æ ¡éªŒä¸Šä¼ 
        /// </summary>
        /// <returns></returns>
        [Route("WEBSController/set_SaveSellOutBackBill_BillCheck_Json")]
        [HttpPost]
        public object set_SaveSellOutBackBill_BillCheck_Json([FromBody] JObject oMain)
        {
            var _value = oMain["oMain"].ToString();
            string msg1 = _value.ToString();
            try
            {
                List<Model.ClsKf_ICStockBillMain> lsmain = new List<Model.ClsKf_ICStockBillMain>();
                ListModels oListModels = new ListModels();
                lsmain = oListModels.getICStockBillMainByJson(msg1);
                WebAPI.WebS.ClsKf_ICStockBillMain websLsmain = new WebS.ClsKf_ICStockBillMain();
                websLsmain.HInterID = lsmain[0].HInterID;
                websLsmain.HBillNo = lsmain[0].HBillNo;
                websLsmain.HBillType = "1247";
                websLsmain.HMaker = lsmain[0].HMaker;
                websLsmain.HSTOCKORGID = lsmain[0].HSTOCKORGID;
                if (oWebs.set_SaveSellOutBackBill_BillCheck(websLsmain, ref DBUtility.ClsPub.sErrInfo))
                {
                    objJsonResult.code = "0";
                    objJsonResult.count = 1;
                    objJsonResult.Message = DBUtility.ClsPub.sErrInfo;  //成功!
                    objJsonResult.data = null;
                    return objJsonResult;
                }
                else
                {
                    objJsonResult.code = "0";
                    objJsonResult.count = 0;
                    objJsonResult.Message = DBUtility.ClsPub.sErrInfo;  //失败!
                    objJsonResult.data = null;
                    return objJsonResult;
                }
            }
            catch (Exception e)
            {
                objJsonResult.code = "0";
                objJsonResult.count = 0;
                objJsonResult.Message = "销售退货校验失败!" + e.ToString();
                objJsonResult.data = null;
                return objJsonResult;
            }
@@ -13963,6 +14135,25 @@
                    return objJsonResult;
                }
                if (oSystemParameter.omodel.WMS_CampanyName == "华舟")
                {
                    if (HBillType == 7507) // å•据类型是末件检验单 æŸ¥æ‰¾å•据是否重复,检验是否合格,单据重复需要返回不同的状态
                    {
                        var ds2 = oCn.RunProcReturn($"select top 1 * from QC_ProcessCheckBillMain where HMainSourceBillNo = '{HBarCode}' order by HDate desc", "QC_ProcessCheckBillMain");
                        if(ds2.Tables[0].Rows.Count > 0)
                        {
                            if (ds2.Tables[0].Rows[0]["HCheckerResult"].ToString() == "true") // æ£€éªŒåˆæ ¼æç¤ºæ˜¯å¦éœ€è¦æ–°å¢ž
                            {
                                objJsonResult.code = "2"; // è¿”回Code为2表示单据重复,需要提示是否需要新增单据
                                objJsonResult.count = 1;
                                objJsonResult.Message = "success!";
                                objJsonResult.data = ds.Tables[0];
                                return objJsonResult;
                            }
                        }
                    }
                }
                objJsonResult.code = "1";
                objJsonResult.count = 1;
                objJsonResult.Message = "success!";
@@ -13974,7 +14165,7 @@
            {
                objJsonResult.code = "0";
                objJsonResult.count = 0;
                objJsonResult.Message = "扫描单据条码失败!" + e.ToString();
                objJsonResult.Message = "扫描单据条码失败!" + e.Message.ToString();
                objJsonResult.data = null;
                return objJsonResult;
            }
WebAPI/DLL/ClsSb_EquipConkBookBill.cs
@@ -174,13 +174,13 @@
                 "(HBillType,HBillSubType,HInterID,HBillNo,HDate" +
                ",HYear,HPeriod,HRemark,HMaker,HMakeDate" +
                ",HEquipID,HExplanation,HInnerBillNo,HConkTypeID,HEmpID" +
                ",HManagerID,HDeptID,HConkBeginDate,HLev,HReason" +
                ",HManagerID,HDeptID,HConkBeginDate,HLev,HReason, HRepairManID" +
                ") " +
                " values('" + this.BillType + "','" + this.HBillSubType + "'," + omodel.HInterID.ToString() + ",'" + omodel.HBillNo + "','" + omodel.HDate + "'" +
                ", " + omodel.HYear.ToString() + "," + omodel.HPeriod.ToString() + ",'" + omodel.HRemark + "','" + omodel.HMaker + "',getdate()" +
                ", " + omodel.HEquipID.ToString() + ",'" + omodel.HExplanation + "','" + omodel.HInnerBillNo + "'," + omodel.HConkTypeID.ToString() + "," + omodel.HEmpID.ToString() +
                "," + omodel.HManagerID.ToString() + "," + omodel.HDeptID.ToString() + ",'" + omodel.HConkBeginDate + "', '" + omodel.HLev + "', '" + omodel.HReason + "'" +
                 ") ");
                 $",{omodel.HRepairManID}) ");
                ////插入子表
                foreach (Model.ClsSb_EquipConkBookBillSub oSub in DetailColl)
                {
WebAPI/Properties/PublishProfiles/FolderProfile4.pubxml.user
@@ -5,7 +5,7 @@
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
  <PropertyGroup>
    <_PublishTargetUrl>D:\网站发布\智云MESWMS\API</_PublishTargetUrl>
    <History>True|2026-02-02T07:42:04.9554792Z;True|2026-02-02T15:39:28.7017318+08:00;True|2026-02-02T15:38:33.5592835+08:00;True|2026-02-02T15:34:24.8450917+08:00;True|2026-02-02T15:30:36.5990146+08:00;True|2026-02-02T15:09:46.1965065+08:00;True|2026-02-02T15:09:24.9794288+08:00;True|2026-02-02T15:05:46.0763516+08:00;True|2026-02-02T14:56:30.1210013+08:00;True|2026-02-02T14:52:50.7435709+08:00;True|2026-02-02T14:47:49.5891710+08:00;True|2026-02-02T14:43:23.0006294+08:00;True|2026-02-02T14:31:10.1220612+08:00;True|2026-02-02T14:21:15.6540317+08:00;True|2026-02-02T14:15:41.6183116+08:00;True|2026-02-02T14:11:32.1234982+08:00;True|2026-02-02T14:01:34.6298901+08:00;True|2026-02-02T13:55:03.4760402+08:00;True|2026-02-02T13:49:00.0420220+08:00;True|2026-02-02T13:17:17.0678676+08:00;False|2026-02-02T13:15:46.0360589+08:00;False|2026-02-02T13:15:27.1689505+08:00;False|2026-02-02T13:14:27.3078641+08:00;True|2026-02-02T12:55:41.9272586+08:00;True|2026-02-02T12:55:22.0826476+08:00;True|2026-02-02T12:09:21.8247404+08:00;True|2026-02-02T12:03:58.9256304+08:00;True|2026-02-02T11:56:01.5744871+08:00;True|2026-02-02T11:42:30.2218073+08:00;True|2026-02-02T10:59:29.6077968+08:00;False|2026-02-02T10:59:08.7803594+08:00;True|2026-01-29T14:40:47.4658031+08:00;True|2026-01-29T14:36:18.2141550+08:00;True|2026-01-29T14:32:52.4872179+08:00;True|2026-01-29T14:32:06.4197291+08:00;True|2026-01-29T14:09:33.9372276+08:00;True|2026-01-29T14:08:17.6503129+08:00;True|2026-01-29T14:06:27.5784162+08:00;True|2026-01-29T13:10:48.6581055+08:00;True|2026-01-29T13:07:28.5589276+08:00;True|2026-01-29T12:44:24.3707488+08:00;True|2026-01-29T12:42:34.6204068+08:00;True|2026-01-29T12:39:55.3867683+08:00;True|2026-01-29T12:29:41.8565928+08:00;True|2026-01-29T12:17:04.5932345+08:00;True|2026-01-29T10:08:23.4550691+08:00;True|2026-01-29T10:04:05.4236307+08:00;False|2026-01-29T10:03:18.4044168+08:00;True|2026-01-28T16:00:38.3698743+08:00;True|2026-01-28T14:15:04.1203132+08:00;True|2026-01-28T14:03:32.3230252+08:00;False|2026-01-28T14:02:41.6157812+08:00;True|2026-01-28T13:18:24.5590390+08:00;True|2026-01-28T13:10:49.5716734+08:00;True|2026-01-28T12:25:03.3201915+08:00;True|2026-01-28T12:24:37.6029904+08:00;True|2026-01-28T12:16:13.3862190+08:00;True|2026-01-28T11:43:57.8268938+08:00;True|2026-01-28T10:57:22.9246991+08:00;True|2026-01-28T10:49:34.6185686+08:00;True|2026-01-28T10:44:07.6308515+08:00;True|2026-01-28T10:36:00.0391721+08:00;True|2026-01-28T10:27:26.1658915+08:00;False|2026-01-28T10:27:00.5898601+08:00;True|2026-01-27T15:02:41.1819512+08:00;True|2026-01-27T14:55:32.3962262+08:00;True|2026-01-27T14:31:09.0105130+08:00;True|2026-01-27T13:19:08.8705541+08:00;True|2026-01-27T11:43:17.0109305+08:00;True|2026-01-27T10:53:13.5941761+08:00;True|2026-01-27T10:49:18.5740094+08:00;True|2026-01-27T10:43:29.4337654+08:00;True|2026-01-27T10:00:49.1779297+08:00;False|2026-01-27T10:00:34.2083888+08:00;True|2026-01-26T16:29:09.5100352+08:00;False|2026-01-26T16:29:04.6554601+08:00;False|2026-01-26T14:39:05.7640208+08:00;True|2026-01-26T09:57:23.8775907+08:00;False|2026-01-26T09:56:43.8599383+08:00;True|2026-01-26T09:37:16.8828589+08:00;False|2026-01-26T09:36:35.9597492+08:00;True|2026-01-25T15:20:11.0096169+08:00;True|2026-01-25T14:52:25.7167654+08:00;True|2026-01-25T14:28:16.6779637+08:00;False|2026-01-25T14:27:32.6753765+08:00;True|2026-01-23T16:17:17.9227805+08:00;True|2026-01-23T14:37:25.7929932+08:00;True|2026-01-23T14:32:25.7611106+08:00;False|2026-01-23T14:31:28.4811198+08:00;True|2026-01-22T09:55:07.0908298+08:00;True|2026-01-22T09:38:49.9102490+08:00;False|2026-01-22T09:37:53.0384929+08:00;True|2026-01-21T16:50:27.5625267+08:00;True|2026-01-21T10:50:18.7634322+08:00;True|2026-01-21T10:47:56.7913811+08:00;True|2026-01-21T10:41:46.5883817+08:00;True|2026-01-21T09:29:22.5824101+08:00;False|2026-01-21T09:28:13.4362586+08:00;True|2026-01-20T14:26:36.7806712+08:00;True|2026-01-20T13:13:01.3064754+08:00;False|2026-01-20T13:12:08.1800841+08:00;True|2026-01-20T10:28:19.5250951+08:00;True|2026-01-20T10:27:41.5947282+08:00;True|2026-01-20T10:23:10.6474490+08:00;True|2026-01-20T10:07:24.8412652+08:00;True|2026-01-20T09:53:19.8583529+08:00;True|2026-01-20T08:21:20.5302494+08:00;False|2026-01-20T08:20:24.6093320+08:00;True|2026-01-19T15:58:34.1439056+08:00;True|2026-01-19T15:56:47.6488483+08:00;True|2026-01-19T15:12:36.9286562+08:00;True|2026-01-19T14:55:17.2807312+08:00;True|2026-01-19T14:47:03.8892836+08:00;True|2026-01-19T14:36:15.0507410+08:00;True|2026-01-19T14:26:05.5060287+08:00;True|2026-01-19T13:50:54.8654304+08:00;True|2026-01-19T13:37:47.2294303+08:00;True|2026-01-19T13:20:13.3781676+08:00;True|2026-01-19T13:07:18.8111360+08:00;True|2026-01-19T13:01:15.1432453+08:00;True|2026-01-19T11:54:26.6582081+08:00;True|2026-01-19T11:23:28.6100843+08:00;True|2026-01-19T08:41:23.8724527+08:00;True|2026-01-19T08:34:06.3247836+08:00;True|2026-01-19T07:48:11.5052413+08:00;False|2026-01-19T07:47:21.4586297+08:00;True|2026-01-18T14:27:24.9640228+08:00;True|2026-01-18T13:21:44.9690334+08:00;False|2026-01-18T13:20:08.6314025+08:00;False|2026-01-16T16:53:24.3290896+08:00;True|2026-01-16T09:03:14.4122067+08:00;True|2026-01-16T08:44:23.0342932+08:00;False|2026-01-16T08:43:34.3488415+08:00;True|2026-01-15T16:27:10.8480719+08:00;False|2026-01-15T16:26:06.6002625+08:00;True|2026-01-15T13:04:43.0602637+08:00;</History>
    <History>True|2026-02-25T07:14:31.7665279Z;True|2026-02-25T15:06:38.2831461+08:00;True|2026-02-25T14:53:16.9553043+08:00;True|2026-02-25T14:18:12.0055193+08:00;True|2026-02-25T14:11:45.2316738+08:00;True|2026-02-25T14:02:16.3161429+08:00;True|2026-02-25T13:47:25.4930099+08:00;False|2026-02-25T13:46:34.1837894+08:00;True|2026-02-24T10:25:01.2146652+08:00;True|2026-02-24T10:16:06.3505078+08:00;True|2026-02-24T10:08:41.7064926+08:00;False|2026-02-24T10:07:25.4868308+08:00;True|2026-02-21T14:56:37.2206752+08:00;True|2026-02-21T14:53:44.6277903+08:00;True|2026-02-21T14:40:10.4687091+08:00;False|2026-02-21T14:39:13.1736140+08:00;True|2026-02-11T11:45:25.6746436+08:00;True|2026-02-11T11:44:47.3185555+08:00;True|2026-02-11T10:54:59.0679758+08:00;True|2026-02-11T10:43:35.2341241+08:00;True|2026-02-11T10:36:26.6768242+08:00;True|2026-02-11T10:26:54.7470684+08:00;True|2026-02-11T10:26:14.5696000+08:00;True|2026-02-11T10:19:17.3267746+08:00;True|2026-02-11T10:03:08.9096446+08:00;True|2026-02-11T10:00:03.1731421+08:00;False|2026-02-11T09:58:47.2916714+08:00;True|2026-02-10T15:11:02.0203382+08:00;True|2026-02-10T15:07:21.6761915+08:00;True|2026-02-10T14:56:44.3660951+08:00;True|2026-02-10T14:42:24.1573010+08:00;True|2026-02-10T14:17:49.6012996+08:00;True|2026-02-10T10:54:27.8849732+08:00;True|2026-02-10T10:37:09.4615737+08:00;True|2026-02-10T10:32:50.2882198+08:00;True|2026-02-10T10:16:38.5004114+08:00;True|2026-02-10T10:04:58.3653257+08:00;False|2026-02-10T10:04:05.6938724+08:00;True|2026-02-09T11:58:12.9122757+08:00;True|2026-02-09T11:52:51.2402774+08:00;True|2026-02-09T11:47:15.5230979+08:00;True|2026-02-09T10:53:15.6587025+08:00;False|2026-02-09T10:52:01.4586729+08:00;True|2026-02-05T12:04:14.1139398+08:00;True|2026-02-05T10:00:41.8883921+08:00;False|2026-02-05T09:59:49.2086159+08:00;True|2026-02-04T13:30:53.8564398+08:00;True|2026-02-04T13:30:06.5486103+08:00;True|2026-02-04T13:21:44.7322601+08:00;True|2026-02-04T13:15:45.0093895+08:00;True|2026-02-04T13:06:30.4891537+08:00;False|2026-02-04T13:05:35.5287589+08:00;True|2026-02-04T12:39:42.2682329+08:00;True|2026-02-04T12:21:52.9722100+08:00;True|2026-02-04T12:16:07.8303016+08:00;True|2026-02-04T12:08:43.8268899+08:00;True|2026-02-04T12:03:26.1174616+08:00;True|2026-02-04T10:33:15.5394044+08:00;False|2026-02-04T10:32:30.7038502+08:00;True|2026-02-02T15:42:04.9554792+08:00;True|2026-02-02T15:39:28.7017318+08:00;True|2026-02-02T15:38:33.5592835+08:00;True|2026-02-02T15:34:24.8450917+08:00;True|2026-02-02T15:30:36.5990146+08:00;True|2026-02-02T15:09:46.1965065+08:00;True|2026-02-02T15:09:24.9794288+08:00;True|2026-02-02T15:05:46.0763516+08:00;True|2026-02-02T14:56:30.1210013+08:00;True|2026-02-02T14:52:50.7435709+08:00;True|2026-02-02T14:47:49.5891710+08:00;True|2026-02-02T14:43:23.0006294+08:00;True|2026-02-02T14:31:10.1220612+08:00;True|2026-02-02T14:21:15.6540317+08:00;True|2026-02-02T14:15:41.6183116+08:00;True|2026-02-02T14:11:32.1234982+08:00;True|2026-02-02T14:01:34.6298901+08:00;True|2026-02-02T13:55:03.4760402+08:00;True|2026-02-02T13:49:00.0420220+08:00;True|2026-02-02T13:17:17.0678676+08:00;False|2026-02-02T13:15:46.0360589+08:00;False|2026-02-02T13:15:27.1689505+08:00;False|2026-02-02T13:14:27.3078641+08:00;True|2026-02-02T12:55:41.9272586+08:00;True|2026-02-02T12:55:22.0826476+08:00;True|2026-02-02T12:09:21.8247404+08:00;True|2026-02-02T12:03:58.9256304+08:00;True|2026-02-02T11:56:01.5744871+08:00;True|2026-02-02T11:42:30.2218073+08:00;True|2026-02-02T10:59:29.6077968+08:00;False|2026-02-02T10:59:08.7803594+08:00;True|2026-01-29T14:40:47.4658031+08:00;True|2026-01-29T14:36:18.2141550+08:00;True|2026-01-29T14:32:52.4872179+08:00;True|2026-01-29T14:32:06.4197291+08:00;True|2026-01-29T14:09:33.9372276+08:00;True|2026-01-29T14:08:17.6503129+08:00;True|2026-01-29T14:06:27.5784162+08:00;True|2026-01-29T13:10:48.6581055+08:00;True|2026-01-29T13:07:28.5589276+08:00;True|2026-01-29T12:44:24.3707488+08:00;True|2026-01-29T12:42:34.6204068+08:00;True|2026-01-29T12:39:55.3867683+08:00;True|2026-01-29T12:29:41.8565928+08:00;True|2026-01-29T12:17:04.5932345+08:00;True|2026-01-29T10:08:23.4550691+08:00;True|2026-01-29T10:04:05.4236307+08:00;False|2026-01-29T10:03:18.4044168+08:00;True|2026-01-28T16:00:38.3698743+08:00;True|2026-01-28T14:15:04.1203132+08:00;True|2026-01-28T14:03:32.3230252+08:00;False|2026-01-28T14:02:41.6157812+08:00;True|2026-01-28T13:18:24.5590390+08:00;True|2026-01-28T13:10:49.5716734+08:00;True|2026-01-28T12:25:03.3201915+08:00;True|2026-01-28T12:24:37.6029904+08:00;True|2026-01-28T12:16:13.3862190+08:00;True|2026-01-28T11:43:57.8268938+08:00;True|2026-01-28T10:57:22.9246991+08:00;True|2026-01-28T10:49:34.6185686+08:00;True|2026-01-28T10:44:07.6308515+08:00;True|2026-01-28T10:36:00.0391721+08:00;True|2026-01-28T10:27:26.1658915+08:00;False|2026-01-28T10:27:00.5898601+08:00;True|2026-01-27T15:02:41.1819512+08:00;True|2026-01-27T14:55:32.3962262+08:00;True|2026-01-27T14:31:09.0105130+08:00;True|2026-01-27T13:19:08.8705541+08:00;True|2026-01-27T11:43:17.0109305+08:00;True|2026-01-27T10:53:13.5941761+08:00;True|2026-01-27T10:49:18.5740094+08:00;True|2026-01-27T10:43:29.4337654+08:00;True|2026-01-27T10:00:49.1779297+08:00;False|2026-01-27T10:00:34.2083888+08:00;True|2026-01-26T16:29:09.5100352+08:00;False|2026-01-26T16:29:04.6554601+08:00;False|2026-01-26T14:39:05.7640208+08:00;True|2026-01-26T09:57:23.8775907+08:00;False|2026-01-26T09:56:43.8599383+08:00;True|2026-01-26T09:37:16.8828589+08:00;False|2026-01-26T09:36:35.9597492+08:00;True|2026-01-25T15:20:11.0096169+08:00;True|2026-01-25T14:52:25.7167654+08:00;True|2026-01-25T14:28:16.6779637+08:00;False|2026-01-25T14:27:32.6753765+08:00;True|2026-01-23T16:17:17.9227805+08:00;True|2026-01-23T14:37:25.7929932+08:00;True|2026-01-23T14:32:25.7611106+08:00;False|2026-01-23T14:31:28.4811198+08:00;True|2026-01-22T09:55:07.0908298+08:00;True|2026-01-22T09:38:49.9102490+08:00;False|2026-01-22T09:37:53.0384929+08:00;True|2026-01-21T16:50:27.5625267+08:00;True|2026-01-21T10:50:18.7634322+08:00;True|2026-01-21T10:47:56.7913811+08:00;True|2026-01-21T10:41:46.5883817+08:00;True|2026-01-21T09:29:22.5824101+08:00;False|2026-01-21T09:28:13.4362586+08:00;True|2026-01-20T14:26:36.7806712+08:00;True|2026-01-20T13:13:01.3064754+08:00;False|2026-01-20T13:12:08.1800841+08:00;True|2026-01-20T10:28:19.5250951+08:00;True|2026-01-20T10:27:41.5947282+08:00;True|2026-01-20T10:23:10.6474490+08:00;True|2026-01-20T10:07:24.8412652+08:00;True|2026-01-20T09:53:19.8583529+08:00;True|2026-01-20T08:21:20.5302494+08:00;False|2026-01-20T08:20:24.6093320+08:00;True|2026-01-19T15:58:34.1439056+08:00;True|2026-01-19T15:56:47.6488483+08:00;True|2026-01-19T15:12:36.9286562+08:00;True|2026-01-19T14:55:17.2807312+08:00;True|2026-01-19T14:47:03.8892836+08:00;True|2026-01-19T14:36:15.0507410+08:00;True|2026-01-19T14:26:05.5060287+08:00;True|2026-01-19T13:50:54.8654304+08:00;True|2026-01-19T13:37:47.2294303+08:00;True|2026-01-19T13:20:13.3781676+08:00;True|2026-01-19T13:07:18.8111360+08:00;True|2026-01-19T13:01:15.1432453+08:00;True|2026-01-19T11:54:26.6582081+08:00;True|2026-01-19T11:23:28.6100843+08:00;True|2026-01-19T08:41:23.8724527+08:00;True|2026-01-19T08:34:06.3247836+08:00;True|2026-01-19T07:48:11.5052413+08:00;False|2026-01-19T07:47:21.4586297+08:00;True|2026-01-18T14:27:24.9640228+08:00;True|2026-01-18T13:21:44.9690334+08:00;False|2026-01-18T13:20:08.6314025+08:00;False|2026-01-16T16:53:24.3290896+08:00;True|2026-01-16T09:03:14.4122067+08:00;True|2026-01-16T08:44:23.0342932+08:00;False|2026-01-16T08:43:34.3488415+08:00;True|2026-01-15T16:27:10.8480719+08:00;False|2026-01-15T16:26:06.6002625+08:00;True|2026-01-15T13:04:43.0602637+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>02/02/2026 15:17:59</publishTime>
      <publishTime>02/21/2026 14:39:31</publishTime>
    </File>
    <File Include="bin/BLL.pdb">
      <publishTime>02/02/2026 15:17:59</publishTime>
      <publishTime>02/21/2026 14:39:31</publishTime>
    </File>
    <File Include="bin/BouncyCastle.Crypto.dll">
      <publishTime>12/18/2020 05:32:28</publishTime>
    </File>
    <File Include="bin/DAL.dll">
      <publishTime>02/02/2026 15:17:57</publishTime>
      <publishTime>02/21/2026 14:39:28</publishTime>
    </File>
    <File Include="bin/DAL.pdb">
      <publishTime>02/02/2026 15:17:57</publishTime>
      <publishTime>02/21/2026 14:39:28</publishTime>
    </File>
    <File Include="bin/Dapper.dll">
      <publishTime>07/22/2016 22:52:40</publishTime>
    </File>
    <File Include="bin/DBUtility.dll">
      <publishTime>02/02/2026 15:17:51</publishTime>
      <publishTime>02/21/2026 14:39:23</publishTime>
    </File>
    <File Include="bin/DBUtility.pdb">
      <publishTime>02/02/2026 15:17:51</publishTime>
      <publishTime>02/21/2026 14:39:23</publishTime>
    </File>
    <File Include="bin/Fleck.dll">
      <publishTime>04/22/2021 11:48:12</publishTime>
@@ -138,10 +138,10 @@
      <publishTime>07/25/2012 19:48:56</publishTime>
    </File>
    <File Include="bin/Model.dll">
      <publishTime>02/02/2026 15:17:52</publishTime>
      <publishTime>02/21/2026 14:39:24</publishTime>
    </File>
    <File Include="bin/Model.pdb">
      <publishTime>02/02/2026 15:17:52</publishTime>
      <publishTime>02/21/2026 14:39:24</publishTime>
    </File>
    <File Include="bin/Models/ClsSc_MouldScrapOutBillMain.cs">
      <publishTime>04/21/2025 11:46:16</publishTime>
@@ -192,10 +192,10 @@
      <publishTime>08/31/2012 06:22:50</publishTime>
    </File>
    <File Include="bin/SQLHelper.dll">
      <publishTime>02/02/2026 15:17:50</publishTime>
      <publishTime>02/11/2026 16:11:54</publishTime>
    </File>
    <File Include="bin/SQLHelper.pdb">
      <publishTime>02/02/2026 15:17:50</publishTime>
      <publishTime>02/11/2026 16:11:54</publishTime>
    </File>
    <File Include="bin/Swashbuckle.Core.dll">
      <publishTime>02/16/2015 01:57:08</publishTime>
@@ -324,13 +324,13 @@
      <publishTime>11/24/2014 19:18:48</publishTime>
    </File>
    <File Include="bin/WebAPI.dll">
      <publishTime>02/02/2026 15:41:51</publishTime>
      <publishTime>02/25/2026 15:14:20</publishTime>
    </File>
    <File Include="bin/WebAPI.pdb">
      <publishTime>02/02/2026 15:41:51</publishTime>
      <publishTime>02/25/2026 15:14:20</publishTime>
    </File>
    <File Include="bin/WebAPI.XmlSerializers.dll">
      <publishTime>02/02/2026 15:42:01</publishTime>
      <publishTime>02/25/2026 15:14:29</publishTime>
    </File>
    <File Include="bin/WebGrease.dll">
      <publishTime>07/18/2013 01:03:52</publishTime>
WebAPI/Properties/PublishProfiles/WTTFolder.pubxml.user
@@ -5,7 +5,7 @@
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
  <PropertyGroup>
    <_PublishTargetUrl>D:\网站发布\API</_PublishTargetUrl>
    <History>True|2026-01-23T08:43:00.5233443Z;True|2026-01-23T15:52:34.0578166+08:00;True|2026-01-23T15:18:26.9929522+08:00;True|2026-01-23T14:54:41.7989523+08:00;True|2026-01-23T14:20:36.5052445+08:00;False|2026-01-23T13:57:17.0723425+08:00;True|2026-01-23T08:08:55.5799949+08:00;False|2026-01-23T08:08:18.0965301+08:00;True|2026-01-21T13:46:11.7257946+08:00;True|2026-01-20T09:22:33.7255529+08:00;False|2026-01-20T08:33:10.2890987+08:00;True|2026-01-19T13:53:48.2079321+08:00;False|2026-01-19T13:53:24.9464993+08:00;True|2026-01-16T15:23:46.2649561+08:00;True|2026-01-16T09:00:43.1528772+08:00;</History>
    <History>True|2026-02-24T05:26:35.7198126Z;True|2026-02-24T13:17:50.6475487+08:00;False|2026-02-24T13:17:16.4754994+08:00;True|2026-02-09T09:03:02.9552827+08:00;False|2026-02-09T09:02:19.7888361+08:00;True|2026-01-23T16:43:00.5233443+08:00;True|2026-01-23T15:52:34.0578166+08:00;True|2026-01-23T15:18:26.9929522+08:00;True|2026-01-23T14:54:41.7989523+08:00;True|2026-01-23T14:20:36.5052445+08:00;False|2026-01-23T13:57:17.0723425+08:00;True|2026-01-23T08:08:55.5799949+08:00;False|2026-01-23T08:08:18.0965301+08:00;True|2026-01-21T13:46:11.7257946+08:00;True|2026-01-20T09:22:33.7255529+08:00;False|2026-01-20T08:33:10.2890987+08:00;True|2026-01-19T13:53:48.2079321+08:00;False|2026-01-19T13:53:24.9464993+08:00;True|2026-01-16T15:23:46.2649561+08:00;True|2026-01-16T09:00:43.1528772+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>01/23/2026 15:18:20</publishTime>
      <publishTime>02/24/2026 13:26:24</publishTime>
    </File>
    <File Include="bin/BLL.pdb">
      <publishTime>01/23/2026 15:18:20</publishTime>
      <publishTime>02/24/2026 13:26:24</publishTime>
    </File>
    <File Include="bin/BouncyCastle.Crypto.dll">
      <publishTime>12/18/2020 05:32:28</publishTime>
    </File>
    <File Include="bin/DAL.dll">
      <publishTime>01/23/2026 15:18:17</publishTime>
      <publishTime>02/24/2026 13:26:17</publishTime>
    </File>
    <File Include="bin/DAL.pdb">
      <publishTime>01/23/2026 15:18:17</publishTime>
      <publishTime>02/24/2026 13:26:17</publishTime>
    </File>
    <File Include="bin/Dapper.dll">
      <publishTime>07/22/2016 22:52:40</publishTime>
    </File>
    <File Include="bin/DBUtility.dll">
      <publishTime>01/23/2026 08:08:34</publishTime>
      <publishTime>02/09/2026 09:02:43</publishTime>
    </File>
    <File Include="bin/DBUtility.pdb">
      <publishTime>01/23/2026 08:08:34</publishTime>
      <publishTime>02/09/2026 09:02:43</publishTime>
    </File>
    <File Include="bin/Fleck.dll">
      <publishTime>04/22/2021 11:48:12</publishTime>
@@ -113,20 +113,35 @@
    <File Include="bin/libgrpc_csharp_ext.x64.so">
      <publishTime>03/19/2022 07:38:42</publishTime>
    </File>
    <File Include="bin/Microsoft.AspNet.SignalR.Core.dll">
      <publishTime>05/04/2017 10:25:34</publishTime>
    </File>
    <File Include="bin/Microsoft.AspNet.SignalR.SystemWeb.dll">
      <publishTime>05/04/2017 10:25:40</publishTime>
    </File>
    <File Include="bin/Microsoft.Azure.AppService.ApiApps.Service.dll">
      <publishTime>03/19/2015 01:02:50</publishTime>
    </File>
    <File Include="bin/Microsoft.CSharp.dll">
      <publishTime>09/26/2012 03:16:08</publishTime>
    </File>
    <File Include="bin/Microsoft.Owin.dll">
      <publishTime>01/19/2019 04:50:30</publishTime>
    </File>
    <File Include="bin/Microsoft.Owin.Host.SystemWeb.dll">
      <publishTime>01/19/2019 04:50:50</publishTime>
    </File>
    <File Include="bin/Microsoft.Owin.Security.dll">
      <publishTime>01/19/2019 04:51:10</publishTime>
    </File>
    <File Include="bin/Microsoft.Web.Infrastructure.dll">
      <publishTime>07/25/2012 19:48:56</publishTime>
    </File>
    <File Include="bin/Model.dll">
      <publishTime>01/23/2026 13:57:29</publishTime>
      <publishTime>02/24/2026 13:17:31</publishTime>
    </File>
    <File Include="bin/Model.pdb">
      <publishTime>01/23/2026 13:57:29</publishTime>
      <publishTime>02/24/2026 13:17:31</publishTime>
    </File>
    <File Include="bin/Models/ClsSc_MouldScrapOutBillMain.cs">
      <publishTime>08/18/2025 16:11:18</publishTime>
@@ -158,35 +173,38 @@
    <File Include="bin/NPOI.pdb">
      <publishTime>10/23/2021 17:07:54</publishTime>
    </File>
    <File Include="bin/Owin.dll">
      <publishTime>11/13/2012 20:19:34</publishTime>
    </File>
    <File Include="bin/Pub_Class.dll">
      <publishTime>01/23/2026 08:08:32</publishTime>
      <publishTime>02/09/2026 09:02:39</publishTime>
    </File>
    <File Include="bin/Pub_Class.pdb">
      <publishTime>01/23/2026 08:08:32</publishTime>
      <publishTime>02/09/2026 09:02:39</publishTime>
    </File>
    <File Include="bin/Pub_Control.dll">
      <publishTime>01/23/2026 08:08:33</publishTime>
      <publishTime>02/09/2026 09:02:41</publishTime>
    </File>
    <File Include="bin/Pub_Control.pdb">
      <publishTime>01/23/2026 08:08:33</publishTime>
      <publishTime>02/09/2026 09:02:41</publishTime>
    </File>
    <File Include="bin/RestSharp.dll">
      <publishTime>08/31/2012 06:22:50</publishTime>
    </File>
    <File Include="bin/SQLHelper.dll">
      <publishTime>01/23/2026 08:08:33</publishTime>
      <publishTime>02/09/2026 09:02:41</publishTime>
    </File>
    <File Include="bin/SQLHelper.pdb">
      <publishTime>01/23/2026 08:08:33</publishTime>
      <publishTime>02/09/2026 09:02:41</publishTime>
    </File>
    <File Include="bin/Swashbuckle.Core.dll">
      <publishTime>02/16/2015 01:57:08</publishTime>
    </File>
    <File Include="bin/SyntacticSugar.dll">
      <publishTime>01/21/2026 13:43:10</publishTime>
      <publishTime>02/09/2026 08:59:39</publishTime>
    </File>
    <File Include="bin/SyntacticSugar.pdb">
      <publishTime>01/21/2026 13:43:10</publishTime>
      <publishTime>02/09/2026 08:59:39</publishTime>
    </File>
    <File Include="bin/System.Buffers.dll">
      <publishTime>07/19/2017 18:01:28</publishTime>
@@ -297,22 +315,37 @@
      <publishTime>05/09/2023 10:43:40</publishTime>
    </File>
    <File Include="bin/TopSdk.dll">
      <publishTime>01/21/2026 13:43:13</publishTime>
      <publishTime>02/24/2026 13:24:07</publishTime>
    </File>
    <File Include="bin/TopSdk.pdb">
      <publishTime>01/21/2026 13:43:13</publishTime>
      <publishTime>02/24/2026 13:24:07</publishTime>
    </File>
    <File Include="bin/WebActivatorEx.dll">
      <publishTime>11/24/2014 19:18:48</publishTime>
    </File>
    <File Include="bin/WebAPI.dll">
      <publishTime>01/23/2026 16:42:59</publishTime>
      <publishTime>02/24/2026 13:26:33</publishTime>
    </File>
    <File Include="bin/WebAPI.pdb">
      <publishTime>01/23/2026 16:42:59</publishTime>
      <publishTime>02/24/2026 13:26:33</publishTime>
    </File>
    <File Include="bin/WebGrease.dll">
      <publishTime>07/18/2013 01:03:52</publishTime>
    </File>
    <File Include="bin/zh-Hans/Microsoft.AspNet.SignalR.Core.resources.dll">
      <publishTime>05/04/2017 10:34:10</publishTime>
    </File>
    <File Include="bin/zh-Hans/Microsoft.AspNet.SignalR.SystemWeb.resources.dll">
      <publishTime>05/04/2017 10:34:16</publishTime>
    </File>
    <File Include="bin/zh-Hans/Microsoft.Owin.Host.SystemWeb.resources.dll">
      <publishTime>01/18/2019 20:59:56</publishTime>
    </File>
    <File Include="bin/zh-Hans/Microsoft.Owin.resources.dll">
      <publishTime>01/18/2019 20:59:58</publishTime>
    </File>
    <File Include="bin/zh-Hans/Microsoft.Owin.Security.resources.dll">
      <publishTime>01/18/2019 21:00:00</publishTime>
    </File>
    <File Include="bin/zh-Hans/System.Net.Http.Formatting.resources.dll">
      <publishTime>11/29/2018 21:26:02</publishTime>
@@ -399,10 +432,16 @@
      <publishTime>08/18/2025 16:11:18</publishTime>
    </File>
    <File Include="packages.config">
      <publishTime>01/19/2026 14:06:44</publishTime>
      <publishTime>02/06/2026 14:36:49</publishTime>
    </File>
    <File Include="Properties/PublishProfiles/JFAPI.pubxml.user">
      <publishTime>12/08/2025 10:29:30</publishTime>
    </File>
    <File Include="Scripts/jquery.signalR-2.2.2.js">
      <publishTime>02/06/2026 14:36:49</publishTime>
    </File>
    <File Include="Scripts/jquery.signalR-2.2.2.min.js">
      <publishTime>02/06/2026 14:36:49</publishTime>
    </File>
    <File Include="Template/barCodeTemplateStorage.json">
      <publishTime>09/12/2025 10:51:38</publishTime>
@@ -513,7 +552,7 @@
      <publishTime>10/27/2025 08:51:29</publishTime>
    </File>
    <File Include="Web.config">
      <publishTime>01/23/2026 08:08:47</publishTime>
      <publishTime>02/09/2026 09:03:01</publishTime>
    </File>
  </ItemGroup>
</Project>
WebAPI/Service/GeTuiService.cs
@@ -9,6 +9,7 @@
using Newtonsoft.Json;
using com.igetui.api.openservice.igetui.template;
using com.igetui.api.openservice.igetui;
using System.Collections.Concurrent;
namespace WebAPI.Service
{
@@ -28,6 +29,9 @@
        // æŽ¨é€æœåŠ¡å®žä¾‹
        private static IGtPush push = new IGtPush(HOST, APPKEY, MASTERSECRET);
        private static Pub_Class.ClsXt_SystemParameter oSystemParameter = new Pub_Class.ClsXt_SystemParameter();
        // å•条消息推送
        public static void PubishSingle(int HInterID)
        {
@@ -42,29 +46,96 @@
                    select * from Gy_UserClientIdRelation
                ", "h_v_OA_WorkLinkBillAllList");
                NotificationTemplate template = null;
                ConcurrentDictionary<string, List<string>> userClientIDDictionary = new ConcurrentDictionary<string, List<string>>();
                // å°†ç”¨æˆ·è®¾å¤‡å…³è”表 æ”¶é›†ä¸º Map
                if (ds.Tables[1].Rows.Count > 0)
                {
                    foreach (DataRow row in ds.Tables[1].Rows)
                    {
                        if (userClientIDDictionary.ContainsKey(row["HUserName"].ToString())){
                            userClientIDDictionary[row["HUserName"].ToString()].Add(row["HClientID"].ToString());
                        }
                        else
                        {
                            userClientIDDictionary.TryAdd(row["HUserName"].ToString(), new List<string>() { row["HClientID"].ToString() });
                        }
                    }
                }
                if(ds.Tables[0].Rows.Count > 0)
                {
                    string title = ds.Tables[0].Rows[0]["主题"].ToString();
                    string content = ds.Tables[0].Rows[0]["内容"].ToString();
                    template = GetNotificationTemplate(title, content, "/pages/ZLGL/OA_WorkLink/OA_WorkLinkBillQuery", "0"); // è·³è½¬åˆ°å·¥ä½œè”系单查询页面
                    bool pushSuccess = false;
                    // å¹¿æ’­
                    if(ds.Tables[0].Rows[0]["发送类型"].ToString() == "公共")
                    {
                        // éåކ å…¨æŽ¨é€
                        foreach(DataRow row in ds.Tables[1].Rows)
                        string sReturn = "";
                        if (oSystemParameter.ShowBill(ref sReturn) == true)
                        {
                            PushMessageToSingle(template, row["HClientID"].ToString());
                             if (oSystemParameter.omodel.WMS_CampanyName == "华舟")
                             {
                                 // æŽ¨é€ç»™æŽ¥æ”¶äºº å’Œ æŠ„送人
                                 foreach (DataRow row in ds.Tables[0].Rows)
                                 {
                                    List<string> clientIDList = new List<string>();
                                    if (userClientIDDictionary.ContainsKey(row["接收人"].ToString()))
                                    {
                                        clientIDList = userClientIDDictionary[row["接收人"].ToString()];
                                    }
                                    else if (userClientIDDictionary.ContainsKey(row["抄送接收人"].ToString()))
                                    {
                                        clientIDList = userClientIDDictionary[row["抄送接收人"].ToString()];
                                    }
                                    foreach(string clientID in clientIDList)
                                    {
                                        pushSuccess = PushMessageToSingle(template, clientID);
                                    }
                                 }
                             }
                             else
                             {
                                // éåކ å…¨æŽ¨é€
                                foreach (DataRow row in ds.Tables[1].Rows)
                                {
                                    pushSuccess = PushMessageToSingle(template, row["HClientID"].ToString());
                                }
                            }
                        }
                    }else // å•独推送
                    {
                        // æŽ¨é€ç»™æŽ¥æ”¶äºº å’Œ æŠ„送人
                        foreach (DataRow row in ds.Tables[1].Rows)
                        foreach (DataRow row in ds.Tables[0].Rows)
                        {
                            if(ds.Tables[0].Rows[0]["接收人"].ToString() == row["HUserName"].ToString()
                                || ds.Tables[0].Rows[0]["抄送接收人"].ToString() == row["HUserName"].ToString())
                            PushMessageToSingle(template, row["HClientID"].ToString());
                            List<string> clientIDList = new List<string>();
                            if (userClientIDDictionary.ContainsKey(row["接收人"].ToString()))
                            {
                                clientIDList = userClientIDDictionary[row["接收人"].ToString()];
                            }
                            else if (userClientIDDictionary.ContainsKey(row["抄送接收人"].ToString()))
                            {
                                clientIDList = userClientIDDictionary[row["抄送接收人"].ToString()];
                            }
                            foreach (string clientID in clientIDList)
                            {
                                pushSuccess = PushMessageToSingle(template, clientID);
                            }
                        }
                    }
                    if(!pushSuccess)
                    {
                        // ä¸ªæŽ¨ æŽ¨é€ä¸æˆåŠŸ(内网环境) ä½¿ç”¨webSocket进行推送
                        // TODO: ä½¿ç”¨ rabbitMQ å®žçŽ°æ¶ˆæ¯é˜Ÿåˆ—
                        // WebSocketServer.PushOne(HInterID);
                    }
                }
            }
@@ -76,7 +147,7 @@
        }
        // å•推 ä½¿ç”¨é€šçŸ¥æ¶ˆæ¯æ¨¡åž‹
        private static void PushMessageToSingle(NotificationTemplate template, string ClientID)
        private static bool PushMessageToSingle(NotificationTemplate template, string ClientID)
        {
            IGtPush push = new IGtPush(HOST, APPKEY, MASTERSECRET);
@@ -100,6 +171,7 @@
                LogService.Write("-----------------------------------------------");
                LogService.Write("-----------------------------------------------");
                LogService.Write("----------------服务端返回结果:" + pushResult);
                return true;
            }
            catch (RequestException e)
            {
@@ -109,6 +181,7 @@
                LogService.Write("-----------------------------------------------");
                LogService.Write("-----------------------------------------------");
                LogService.Write("----------------服务端返回结果:" + pushResult);
                return false;
            }
        }
WebAPI/Service/WebSocketServer.cs
@@ -27,14 +27,18 @@
        private static System.Timers.Timer _pushTimerBeat;
        // 300000
        private static readonly int _pushInterval = 300000; // æ¯5分钟发送一次消息
        private static Pub_Class.ClsXt_SystemParameter oSystemParameter = new Pub_Class.ClsXt_SystemParameter();
        /// <summary>
        /// å¯åЍ WebSocket æœåŠ¡ï¼ˆç›‘å¬ 8089 ç«¯å£ï¼‰
        /// </summary>
        public static void Start()
        {
            string sReturn = "";
            var wsUrl = "ws://0.0.0.0:8888/ws"; // é€šç”¨ç«¯å£
            // é…ç½® WebSocket ç›‘听地址(独立端口 8089)
            var wsUrl = "ws://0.0.0.0:8089/ws"; // 0.0.0.0 å…è®¸å¤–部访问
            _server = new Fleck.WebSocketServer(wsUrl);
            _pushTimer = new System.Timers.Timer(_pushInterval);
WebAPI/Web References/WebS/Reference.cs
Diff too large
WebAPI/Web References/WebS/WebService1.wsdl
Diff too large
WebAPI/WebAPI.csproj
@@ -706,6 +706,7 @@
    <Compile Include="Controllers\基础资料\基础资料\Gy_CostItemFixRateController.cs" />
    <Compile Include="Controllers\基础资料\基础资料\Gy_CostItemAverageTypeController.cs" />
    <Compile Include="Controllers\成本管理\CB_ItemMoneyBillController.cs" />
    <Compile Include="Controllers\成本管理\CB_WipProcessTableController.cs" />
    <Compile Include="Controllers\成本管理\成本费用调整单\CB_ChangeMoneyBillController.cs" />
    <Compile Include="Controllers\检验申请单\QC_RequestCheckBillController.cs" />
    <Compile Include="Controllers\物流管理\其他结算单\YF_PayMentOtherBillTranController.cs" />
@@ -1295,6 +1296,7 @@
    <Folder Include="bin\" />
    <Folder Include="Controllers\项目管理\基础建模\" />
    <Folder Include="obj\x86\Debug\" />
    <Folder Include="Views\CB_WipProcessTable\" />
    <Folder Include="Views\Cg_ContractTransportBillList\" />
    <Folder Include="Views\Cg_PODemandPlanBill\" />
    <Folder Include="Views\Cg_PurchaseReturn\" />
WebAPI/WebAPI.csproj.user
@@ -1,6 +1,20 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="Current" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
  <PropertyGroup>
    <LastActiveSolutionConfig>Debug|x86</LastActiveSolutionConfig>
    <LastActiveSolutionConfig>Debug|Any CPU</LastActiveSolutionConfig>
    <UseIISExpress>true</UseIISExpress>
    <Use64BitIISExpress />
    <IISExpressSSLPort />
    <IISExpressAnonymousAuthentication>enabled</IISExpressAnonymousAuthentication>
    <IISExpressWindowsAuthentication>disabled</IISExpressWindowsAuthentication>
    <IISExpressUseClassicPipelineMode>false</IISExpressUseClassicPipelineMode>
    <UseGlobalApplicationHostFile />
    <NameOfLastUsedPublishProfile>D:\WorkBench\MES-WEB-API\WebAPI\Properties\PublishProfiles\FolderProfile4.pubxml</NameOfLastUsedPublishProfile>
    <ProjectView>ShowAllFiles</ProjectView>
    <NameOfLastUsedPublishProfile>D:\gz\MES-WEB-API\MES-WEB-API\WebAPI\Properties\PublishProfiles\FolderProfile8.pubxml</NameOfLastUsedPublishProfile>
=======
    <NameOfLastUsedPublishProfile>D:\WorkBench\MES-WEB-API\WebAPI\Properties\PublishProfiles\FolderProfile4.pubxml</NameOfLastUsedPublishProfile>
>>>>>>> 8deaa1b9ce935bab8fbad806f3c13e8cb405771e
    <ProjectView>ShowAllFiles</ProjectView>
  </PropertyGroup>
</Project>
sdk_dingding/TopSdk/obj/Debug/TopSdk.csproj.FileListAbsolute.txt
@@ -27,9 +27,13 @@
D:\工作代码\智云迈思\MES\MES-WEB-API\sdk_dingding\TopSdk\obj\Debug\TopSdk.dll
D:\工作代码\智云迈思\MES\MES-WEB-API\sdk_dingding\TopSdk\obj\Debug\TopSdk.pdb
D:\WorkBench\MES-WEB-API\sdk_dingding\TopSdk\obj\Debug\TopSdk.csproj.AssemblyReference.cache
<<<<<<< HEAD
E:\gz\MES-WEB-API\sdk_dingding\TopSdk\bin\Debug\TopSdk.dll
E:\gz\MES-WEB-API\sdk_dingding\TopSdk\bin\Debug\TopSdk.pdb
E:\gz\MES-WEB-API\sdk_dingding\TopSdk\obj\Debug\TopSdk.csproj.CoreCompileInputs.cache
E:\gz\MES-WEB-API\sdk_dingding\TopSdk\obj\Debug\TopSdk.dll
E:\gz\MES-WEB-API\sdk_dingding\TopSdk\obj\Debug\TopSdk.pdb
E:\gz\MES-WEB-API\sdk_dingding\TopSdk\obj\Debug\TopSdk.csproj.AssemblyReference.cache
=======
C:\Users\19858\Desktop\智云迈思\MES-WEB-API\sdk_dingding\TopSdk\obj\Debug\TopSdk.csproj.AssemblyReference.cache
>>>>>>> ed299767c89cd657b2a5373cb3546de9950382bd