yangle
2025-03-18 44648729417a911fc1939ea48cda9d06adbef367
Merge branch 'master' of http://101.37.171.70:10101/r/MES-WEB-API
55个文件已修改
5个文件已添加
5617 ■■■■■ 已修改文件
DAL/ClsGy_MaterialMouldBillMain.cs 16 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
DAL/DAL.csproj 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
DAL/基础资料/其他基础资料/ClsGy_QCCheckProjectMain.cs 63 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
DAL/工资管理/ClsHR_EmployeeSkillBill.cs 60 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
DAL/工资管理/ClsHR_PostSkillBill.cs 66 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
DAL/生产管理/模具管理/ClsSc_MouldMaintainRuleBill.cs 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
DAL/计划管理/ClsGy_MaterialTechParamBillMain.cs 64 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
DAL/质检管理/ClsGy_EnvironmentTestSchemeBillMain.cs 69 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
DAL/车间管理/ClsGy_MaterPreventErrMouldBillMain.cs 67 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
DAL/车间管理/ClsGy_WorkBeginDotCheckListBillMain.cs 65 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
DAL/销售管理/ClsCrm_ComplainVisitBill.cs 215 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
DAL/销售管理/ClsXs_SeQuotationBill.cs 271 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
DBUtility/业务单据/ClsXt_BaseBill.cs 112 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Model/ClsGy_MaterialMouldBillSub.cs 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Model/Model.csproj 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Model/基础资料/其他基础资料/ClsGy_QCCheckProjectMain.cs 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Model/基础资料/基础资料/ClsGy_Source_Model.cs 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Model/生产管理/模具管理/ClsSc_MouldMaintainRuleBillMain.cs 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Model/质检管理/ClsGy_EnvironmentTestSchemeBillMain.cs 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
Model/车间管理/ClsGy_MaterPreventErrMouldBillMain.cs 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
Model/车间管理/ClsGy_WorkBeginDotCheckListBillMain.cs 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Model/销售管理/ClsCrm_ComplainVisitBillMain.cs 24 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Model/销售管理/ClsCrm_ComplainVisitBillSub.cs 10 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Model/销售管理/ClsXs_SeQuotationBillMain.cs 4 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
SyntacticSugar/obj/Debug/SyntacticSugar.csproj.FileListAbsolute.txt 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebAPI/Controllers/BaseSet/Gy_ProcessController.cs 9 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebAPI/Controllers/CJGL/Gy_MaterPreventErrMouldBillController.cs 150 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebAPI/Controllers/CJGL/Sc_WorkBeginDotCheckBillController.cs 176 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebAPI/Controllers/JHGL/Gy_MaterialTechParamBillController.cs 256 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebAPI/Controllers/JHGL/Gy_RoutingBillController.cs 406 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebAPI/Controllers/LMESController.cs 111 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebAPI/Controllers/MJGL/Sc_MouldMaintainRuleBillController.cs 118 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebAPI/Controllers/MateOutController.cs 10 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebAPI/Controllers/QC_ManagementController.cs 378 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebAPI/Controllers/SCGL/Sc_MESTransFerWorkBillController.cs 56 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebAPI/Controllers/SCGL/日计划管理/JIT_Cg_PODemandPlanBillController.cs 19 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebAPI/Controllers/SCGL/日计划管理/JIT_CompleteController..cs 73 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebAPI/Controllers/SCGL/日计划管理/JIT_DayPlanPlatFormBillController.cs 291 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebAPI/Controllers/WebAPIController.cs 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebAPI/Controllers/XSGL/Crm_ComplainVisitBillController.cs 978 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebAPI/Controllers/XSGL/Xs_SeQuotationBillController.cs 1000 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebAPI/Controllers/XSGL/YS_ReceiveOtherBillController.cs 13 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebAPI/Controllers/品质管理/基础资料/Gy_BaseInformationController.cs 155 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebAPI/Controllers/基础资料/基础资料/Gy_SOPBillListController.cs 14 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebAPI/Controllers/工资管理/HR_EmployeeSkillBillController.cs 52 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebAPI/Controllers/工资管理/HR_PostSkillBillController.cs 53 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebAPI/DLL/ClsGy_Material_Ctl.cs 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebAPI/DLL/ClsGy_Source_Ctl.cs 10 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebAPI/ListModels.cs 49 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebAPI/Models/ClsGy_Material_Model.cs 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebAPI/Models/基础资料/Gy_Process.cs 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebAPI/Properties/PublishProfiles/FolderProfilewtt.pubxml.user 44 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebAPI/Properties/PublishProfiles/JFAPI.pubxml.user 42 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebAPI/WebAPI.csproj 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebAPI/WebAPI.csproj.user 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
sdk_dingding/TopSdk/bin/Debug/TopSdk.dll 补丁 | 查看 | 原始文档 | blame | 历史
sdk_dingding/TopSdk/bin/Debug/TopSdk.pdb 补丁 | 查看 | 原始文档 | blame | 历史
sdk_dingding/TopSdk/obj/Debug/TopSdk.csproj.FileListAbsolute.txt 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
sdk_dingding/TopSdk/obj/Debug/TopSdk.dll 补丁 | 查看 | 原始文档 | blame | 历史
sdk_dingding/TopSdk/obj/Debug/TopSdk.pdb 补丁 | 查看 | 原始文档 | blame | 历史
DAL/ClsGy_MaterialMouldBillMain.cs
@@ -71,7 +71,7 @@
                            "" +
                            "" +
                            "(HInterID,HEntryID,HSourceInterID,HSourceEntryID,HSourceBillNo,HSourceBillType" +
                            ",HMouldID,HQty,HMouldQty,HRate) " +
                            ",HMouldID,HQty,HMouldQty,HRate,HMouldType,HMouldPriority,HCubicleQty) " +
                            " values(" +
                            "" + omodel.HInterID.ToString() +
                            "," + oSub.HEntryID.ToString() +
@@ -82,8 +82,11 @@
                            "','" + oSub.HMouldID +
                            "'," + oSub.HQty +
                            "," + oSub.HMouldQty +
                            ",'" + oSub.HRate +
                            "')";
                            ",'" + oSub.HRate +
                            "','" + oSub.HMouldType +
                           "','" + oSub.HMouldPriority +
                           "'," + oSub.HCubicleQty +
                           ")";
                    oCn.RunProc(subSql);
                }
@@ -158,7 +161,7 @@
                           "" +
                           "" +
                           "(HInterID,HEntryID,HSourceInterID,HSourceEntryID,HSourceBillNo,HSourceBillType" +
                           ",HMouldID,HQty,HMouldQty,HRate) " +
                           ",HMouldID,HQty,HMouldQty,HRate,HMouldType,HMouldPriority,HCubicleQty) " +
                           " values(" +
                           "" + omodel.HInterID.ToString() +
                           "," + oSub.HEntryID.ToString() +
@@ -170,7 +173,10 @@
                           "'," + oSub.HQty +
                           "," + oSub.HMouldQty +
                           ",'" + oSub.HRate +
                           "')";
                           "','" + oSub.HMouldType +
                           "','" + oSub.HMouldPriority +
                           "'," + oSub.HCubicleQty +
                           ")";
                    oCn.RunProc(subSql);
                }
                sReturn = "新增单据成功!";
DAL/DAL.csproj
@@ -840,6 +840,7 @@
    <Compile Include="销售管理\ClsXs_SellPlanExecuteBill.cs" />
    <Compile Include="销售管理\ClsXs_SeOutStockBackBillForLayUI.cs" />
    <Compile Include="销售管理\ClsXs_SeProdPlanBill.cs" />
    <Compile Include="销售管理\ClsCrm_ComplainVisitBill.cs" />
    <Compile Include="销售管理\ClsXs_SeQuotationBill.cs" />
    <Compile Include="销售管理\ClsXs_SeQuotation_ccjgBill.cs" />
    <Compile Include="销售管理\ClsXs_SeSampleBill.cs" />
DAL/»ù´¡×ÊÁÏ/ÆäËû»ù´¡×ÊÁÏ/ClsGy_QCCheckProjectMain.cs
@@ -37,6 +37,20 @@
            {
                //
                oCn.BeginTran();
                //保存前控制=========================================
                string HBillNote = "";
                DataSet ds = oCn.RunProcReturn("Exec h_p_Gy_QCCheckProject_BeforeSaveCtrl " + omodel.HInterID.ToString() + ", '" + omodel.HBillNo + "','" + HBillNote + "',2 ", "h_p_Gy_QCCheckProject_BeforeSaveCtrl");
                if (ds == null)
                {
                    sReturn = "保存前判断失败!";
                    return false;
                }
                if (DBUtility.ClsPub.isStrNull(ds.Tables[0].Rows[0]["HBack"]) != "0")
                {
                    sReturn = "保存失败!" + DBUtility.ClsPub.isStrNull(ds.Tables[0].Rows[0]["HBackRemark"]);
                    return false;
                }
                //=========================================================
                //更新主表
                oCn.RunProc("UpDate Gy_QCCheckProjectMain set  " +
                " HBillNo='" + omodel.HBillNo + "'" +  //固定赋值===============
@@ -107,6 +121,21 @@
                      ","+ oSub.HControlUpperLimit + ","+ oSub.HControlLowerLimit +
                      ") ");
                }
                //=========================保存后控制
                DataSet ds2 = oCn.RunProcReturn("Exec h_p_Gy_QCCheckProject_AfterSaveCtrl " + omodel.HInterID.ToString() + ", '" + omodel.HBillNo + "',2 ", "h_p_Gy_QCCheckProject_AfterSaveCtrl");
                if (ds2 == null)
                {
                    sReturn = "保存后控制判断失败!";
                    oCn.RollBack();
                    return false;
                }
                if (DBUtility.ClsPub.isStrNull(ds2.Tables[0].Rows[0]["HBack"]) != "0")
                {
                    sReturn = "保存失败2!" + DBUtility.ClsPub.isStrNull(ds2.Tables[0].Rows[0]["HBackRemark"]);
                    oCn.RollBack();
                    return false;
                }
                //============================
                //foreach (Model.ClsGy_QCCheckProjectSub oSub in DetailColl)
                //{
@@ -139,18 +168,32 @@
                omodel.HInterID = DBUtility.ClsPub.CreateBillID(BillType, ref DBUtility.ClsPub.sExeReturnInfo);
                //若MAINDI重复则重新获取
                oCn.BeginTran();
                //保存前控制=========================================
                string HBillNote = "";
                DataSet ds = oCn.RunProcReturn("Exec h_p_Gy_QCCheckProject_BeforeSaveCtrl " + omodel.HInterID.ToString() + ", '" + omodel.HBillNo + "','" + HBillNote + "',1", "h_p_Gy_QCCheckProject_BeforeSaveCtrl");
                if (ds == null)
                {
                    sReturn = "保存前判断失败!";
                    return false;
                }
                if (DBUtility.ClsPub.isStrNull(ds.Tables[0].Rows[0]["HBack"]) != "0")
                {
                    sReturn = "保存失败!" + DBUtility.ClsPub.isStrNull(ds.Tables[0].Rows[0]["HBackRemark"]);
                    return false;
                }
                //=========================================================
                //主表
                oCn.RunProc("Insert Into Gy_QCCheckProjectMain " +
                "(HBillType,HBillSubType,HInterID,HBillNo,HBillStatus,HDate,HMaker,HMakeDate" +
                ",HYear,HPeriod,HRemark" +
                ",HMaterID,HName,HMaterNumber,HMaterTypeID,HUnitID" +
                ",HUnitNumber,HStandard,HProcID,HDeptID,HSampleSchemeID,HSourceID" +
                ",HUnitNumber,HStandard,HProcID,HDeptID,HSampleSchemeID,HSourceID,HOrgID" +
                ") " +
                " values('" + this.BillType + "','" + this.HBillSubType + "'," + omodel.HInterID.ToString() + ",'" + omodel.HBillNo + "'," + omodel.HBillStatus.ToString() + ",'" + omodel.HDate + "','" + DBUtility.ClsPub.CurUserName + "',getdate()" +
                "," + omodel.HYear.ToString() + "," + omodel.HPeriod.ToString() + ",'" + omodel.HRemark + "'"+
                "," + omodel.HMaterID.ToString() + ",'" + omodel.HName + "','" + omodel.HMaterNumber + "'," + omodel.HMaterTypeID.ToString() + "," + omodel.HUnitID.ToString() +
                ",'" + omodel.HUnitNumber + "', " + Convert.ToString(omodel.HStandard ? 1 : 0) + "," + omodel.HProcID.ToString() + "," + omodel.HDeptID.ToString() +
                "," + omodel.HSampleSchemeID + ",'" + omodel.HSourceID + "') ");
                "," + omodel.HSampleSchemeID + ",'" + omodel.HSourceID + "','" + omodel.HOrgID + "') ");
                //插入子表
                foreach (Model.ClsGy_QCCheckProjectSub oSub in DetailColl)
                {
@@ -183,7 +226,21 @@
                      ","+ oSub.HControlUpperLimit + "," +oSub.HControlLowerLimit +
                      ") ");
                }
                //=========================保存后控制
                DataSet ds2 = oCn.RunProcReturn("Exec h_p_Gy_QCCheckProject_AfterSaveCtrl " + omodel.HInterID.ToString() + ", '" + omodel.HBillNo + "',1 ", "h_p_Gy_QCCheckProject_AfterSaveCtrl");
                if (ds2 == null)
                {
                    sReturn = "保存后控制判断失败!";
                    oCn.RollBack();
                    return false;
                }
                if (DBUtility.ClsPub.isStrNull(ds2.Tables[0].Rows[0]["HBack"]) != "0")
                {
                    sReturn = "保存失败2!" + DBUtility.ClsPub.isStrNull(ds2.Tables[0].Rows[0]["HBackRemark"]);
                    oCn.RollBack();
                    return false;
                }
                //============================
                //foreach (Model.ClsGy_QCCheckProjectSub oSub in DetailColl)
                //{
                //    Ds = oCn.RunProcReturn("exec h_p_Gy_QCCheckProject_Qty " + oSub.HICMOInterID, "");
DAL/¹¤×ʹÜÀí/ClsHR_EmployeeSkillBill.cs
@@ -38,6 +38,20 @@
            {
                //
                oCn.BeginTran();
                //保存前控制=========================================
                string HBillNote = "";
                DataSet ds = oCn.RunProcReturn("Exec h_p_HR_EmployeeSkillBill_BeforeSaveCtrl " + omodel.HInterID.ToString() + ", '" + omodel.HBillNo + "','" + HBillNote + "',2 ", "h_p_HR_EmployeeSkillBill_BeforeSaveCtrl");
                if (ds == null)
                {
                    sReturn = "保存前判断失败!";
                    return false;
                }
                if (DBUtility.ClsPub.isStrNull(ds.Tables[0].Rows[0]["HBack"]) != "0")
                {
                    sReturn = "保存失败!" + DBUtility.ClsPub.isStrNull(ds.Tables[0].Rows[0]["HBackRemark"]);
                    return false;
                }
                //=========================================================
                //更新主表
                oCn.RunProc("UpDate HR_EmployeeSkillBillMain set  " +
                " HBillNo='" + omodel.HBillNo + "'" +  //固定赋值===============
@@ -77,7 +91,21 @@
                      "," + oSub.HPostSkillid.ToString() + ",'" + oSub.HSkillLev.ToString() +"','"+ oSub.HTrainDate +
                      "') ");
                }
                //=========================保存后控制
                DataSet ds2 = oCn.RunProcReturn("Exec h_p_HR_EmployeeSkillBill_AfterSaveCtrl " + omodel.HInterID.ToString() + ", '" + omodel.HBillNo + "',2 ", "h_p_HR_EmployeeSkillBill_AfterSaveCtrl");
                if (ds2 == null)
                {
                    sReturn = "保存后控制判断失败!";
                    oCn.RollBack();
                    return false;
                }
                if (DBUtility.ClsPub.isStrNull(ds2.Tables[0].Rows[0]["HBack"]) != "0")
                {
                    sReturn = "保存失败2!" + DBUtility.ClsPub.isStrNull(ds2.Tables[0].Rows[0]["HBackRemark"]);
                    oCn.RollBack();
                    return false;
                }
                //============================
                sReturn = "修改单据成功!";
                oCn.Commit();
                return true;
@@ -97,6 +125,21 @@
             
                //若MAINDI重复则重新获取
                oCn.BeginTran();
                //保存前控制=========================================
                string HBillNote = "";
                DataSet ds = oCn.RunProcReturn("Exec h_p_HR_EmployeeSkillBill_BeforeSaveCtrl " + omodel.HInterID.ToString() + ", '" + omodel.HBillNo + "','" + HBillNote + "',1 ", "h_p_HR_EmployeeSkillBill_BeforeSaveCtrl");
                if (ds == null)
                {
                    sReturn = "保存前判断失败!";
                    return false;
                }
                if (DBUtility.ClsPub.isStrNull(ds.Tables[0].Rows[0]["HBack"]) != "0")
                {
                    sReturn = "保存失败!" + DBUtility.ClsPub.isStrNull(ds.Tables[0].Rows[0]["HBackRemark"]);
                    return false;
                }
                //=========================================================
                //主表
                oCn.RunProc("Insert Into HR_EmployeeSkillBillMain   " +
                "(HBillType,HBillSubType,HInterID,HBillNo,HDate" +
@@ -125,6 +168,21 @@
                      "," + oSub.HPostSkillid.ToString() + ",'" + oSub.HSkillLev.ToString() + "','" + oSub.HTrainDate +
                      "') ");
                }
                //=========================保存后控制
                DataSet ds2 = oCn.RunProcReturn("Exec h_p_HR_EmployeeSkillBill_AfterSaveCtrl " + omodel.HInterID.ToString() + ", '" + omodel.HBillNo + "',1 ", "h_p_HR_EmployeeSkillBill_AfterSaveCtrl");
                if (ds2 == null)
                {
                    sReturn = "保存后控制判断失败!";
                    oCn.RollBack();
                    return false;
                }
                if (DBUtility.ClsPub.isStrNull(ds2.Tables[0].Rows[0]["HBack"]) != "0")
                {
                    sReturn = "保存失败2!" + DBUtility.ClsPub.isStrNull(ds2.Tables[0].Rows[0]["HBackRemark"]);
                    oCn.RollBack();
                    return false;
                }
                //============================
                sReturn = "新增单据成功!";
                oCn.Commit();
                return true;
DAL/¹¤×ʹÜÀí/ClsHR_PostSkillBill.cs
@@ -38,6 +38,20 @@
            {
                //
                oCn.BeginTran();
                //保存前控制=========================================
                string HBillNote = "";
                DataSet ds = oCn.RunProcReturn("Exec h_p_HR_PostSkillBill_BeforeSaveCtrl " + omodel.HInterID.ToString() + ", '" + omodel.HBillNo + "','" + HBillNote + "',2 ", "h_p_HR_PostSkillBill_BeforeSaveCtrl");
                if (ds == null)
                {
                    sReturn = "保存前判断失败!";
                    return false;
                }
                if (DBUtility.ClsPub.isStrNull(ds.Tables[0].Rows[0]["HBack"]) != "0")
                {
                    sReturn = "保存失败!" + DBUtility.ClsPub.isStrNull(ds.Tables[0].Rows[0]["HBackRemark"]);
                    return false;
                }
                //=========================================================
                //更新主表
                oCn.RunProc("UpDate HR_PostSkillBillMain set  " +
                " HBillNo='" + omodel.HBillNo + "'" +  //固定赋值===============
@@ -73,7 +87,23 @@
                      "," + oSub.HPostSkillid.ToString() + "," + oSub.HSkillLev.ToString() +
                      ") ");
                }
                //=========================保存后控制
                DataSet ds2 = oCn.RunProcReturn("Exec h_p_HR_PostSkillBill_AfterSaveCtrl " + omodel.HInterID.ToString() + ", '" + omodel.HBillNo + "',2 ", "h_p_HR_PostSkillBill_AfterSaveCtrl");
                if (ds2 == null)
                {
                    sReturn = "保存后控制判断失败!";
                    oCn.RollBack();
                    return false;
                }
                if (DBUtility.ClsPub.isStrNull(ds2.Tables[0].Rows[0]["HBack"]) != "0")
                {
                    sReturn = "保存失败2!" + DBUtility.ClsPub.isStrNull(ds2.Tables[0].Rows[0]["HBackRemark"]);
                    oCn.RollBack();
                    return false;
                }
                //============================
                sReturn = "修改单据成功!";
                oCn.Commit();
                return true;
@@ -92,7 +122,22 @@
            {
             
                //若MAINDI重复则重新获取
                oCn.BeginTran();
                oCn.BeginTran();
                //保存前控制=========================================
                string HBillNote = "";
                DataSet ds = oCn.RunProcReturn("Exec h_p_HR_PostSkillBill_BeforeSaveCtrl " + omodel.HInterID.ToString() + ", '" + omodel.HBillNo + "','" + HBillNote + "',1 ", "h_p_HR_PostSkillBill_BeforeSaveCtrl");
                if (ds == null)
                {
                    sReturn = "保存前判断失败!";
                    return false;
                }
                if (DBUtility.ClsPub.isStrNull(ds.Tables[0].Rows[0]["HBack"]) != "0")
                {
                    sReturn = "保存失败!" + DBUtility.ClsPub.isStrNull(ds.Tables[0].Rows[0]["HBackRemark"]);
                    return false;
                }
                //=========================================================
                //主表
                oCn.RunProc("Insert Into HR_PostSkillBillMain   " +
                "(HBillType,HBillSubType,HInterID,HBillNo,HDate" +
@@ -118,7 +163,22 @@
                      "," + oSub.HPostSkillid.ToString() + ",'" + oSub.HSkillLev.ToString() +
                      "') ");
                }
                //=========================保存后控制
                DataSet ds2 = oCn.RunProcReturn("Exec h_p_HR_PostSkillBill_AfterSaveCtrl " + omodel.HInterID.ToString() + ", '" + omodel.HBillNo + "',1 ", "h_p_HR_PostSkillBill_AfterSaveCtrl");
                if (ds2 == null)
                {
                    sReturn = "保存后控制判断失败!";
                    oCn.RollBack();
                    return false;
                }
                if (DBUtility.ClsPub.isStrNull(ds2.Tables[0].Rows[0]["HBack"]) != "0")
                {
                    sReturn = "保存失败2!" + DBUtility.ClsPub.isStrNull(ds2.Tables[0].Rows[0]["HBackRemark"]);
                    oCn.RollBack();
                    return false;
                }
                //============================
                sReturn = "新增单据成功!";
                oCn.Commit();
                return true;
DAL/Éú²ú¹ÜÀí/Ä£¾ß¹ÜÀí/ClsSc_MouldMaintainRuleBill.cs
@@ -61,6 +61,7 @@
                ",HSafeDays=" + omodel.HSafeDays +
                ",HErrWarDays=" + omodel.HErrWarDays +
                ",HErrWarQtys=" + omodel.HErrWarQtys +
                ",HUSEORGID=" + omodel.HUSEORGID +
                " where HInterID=" + lngBillKey.ToString());                
                //删除关联
                //DeleteRelation(ref sReturn, lngBillKey);
@@ -121,11 +122,11 @@
                oCn.RunProc("Insert Into Sc_MouldMaintainRuleBillMain" +
                 "(HBillType,HBillSubType,HInterID,HBillNo,HDate" +
                ",HYear,HPeriod,HRemark,HMaker,HMakeDate" +
                ",HCycleUnit,HCheckCycle,HExplanation,HInnerBillNo,HMaintainLevID,HUseQtys,HSafeDays,HErrWarDays,HErrWarQtys" +
                ",HCycleUnit,HCheckCycle,HExplanation,HInnerBillNo,HMaintainLevID,HUseQtys,HSafeDays,HErrWarDays,HErrWarQtys,HUSEORGID,HCREATEORGID" +
                ") " +
                " values('" + this.BillType + "','" + this.HBillSubType + "'," + omodel.HInterID.ToString() + ",'" + omodel.HBillNo + "','" + omodel.HDate + "'" +
                ", " + omodel.HYear.ToString() + "," + omodel.HPeriod.ToString() + ",'" + omodel.HRemark + "','" + DBUtility.ClsPub.CurUserName + "',getdate()" +
                ",'" + omodel.HCycleUnit + "'," + omodel.HCheckCycle.ToString() + ",'" + omodel.HExplanation + "','" + omodel.HInnerBillNo + "'," + omodel.HMaintainLevID + "," + omodel.HUseQtys + "," + omodel.HSafeDays + "," + omodel.HErrWarDays + "," + omodel.HErrWarQtys +
                ",'" + omodel.HCycleUnit + "'," + omodel.HCheckCycle.ToString() + ",'" + omodel.HExplanation + "','" + omodel.HInnerBillNo + "'," + omodel.HMaintainLevID + "," + omodel.HUseQtys + "," + omodel.HSafeDays + "," + omodel.HErrWarDays + "," + omodel.HErrWarQtys + "," + omodel.HUSEORGID + "," + omodel.HCREATEORGID +
                ") ");
                ////插入子表
                foreach (Model.ClsSc_MouldMaintainRuleBillSub oSub in DetailColl_Mater)
DAL/¼Æ»®¹ÜÀí/ClsGy_MaterialTechParamBillMain.cs
@@ -38,6 +38,22 @@
            try
            {
                oCn.BeginTran();
                //保存前控制=========================================
                string HBillNote = "";
                DataSet ds = oCn.RunProcReturn("Exec h_p_Gy_MaterialTechParamBill_BeforeSaveCtrl " + omodel.HInterID.ToString() + ", '" + omodel.HBillNo + "',2 ", "h_p_Gy_MaterialTechParamBill_BeforeSaveCtrl");
                if (ds == null)
                {
                    sReturn = "保存前判断失败!";
                    return false;
                }
                if (DBUtility.ClsPub.isStrNull(ds.Tables[0].Rows[0]["HBack"]) != "0")
                {
                    sReturn = "保存失败!" + DBUtility.ClsPub.isStrNull(ds.Tables[0].Rows[0]["HBackRemark"]);
                    return false;
                }
                //=========================================================
                //更新主表
                string mainSql = "update Gy_MaterialTechParamBillMain set " +
                    " HBillNo = '" + omodel.HBillNo +
@@ -95,6 +111,22 @@
                    oCn.RunProc(subSql);
                }
                //=========================保存后控制
                DataSet ds2 = oCn.RunProcReturn("Exec h_p_Gy_MaterialTechParamBill_AfterSaveCtrl " + omodel.HInterID.ToString() + ", '" + omodel.HBillNo + "',2 ", "h_p_Gy_MaterialTechParamBill_AfterSaveCtrl");
                if (ds2 == null)
                {
                    sReturn = "保存后控制判断失败!";
                    oCn.RollBack();
                    return false;
                }
                if (DBUtility.ClsPub.isStrNull(ds2.Tables[0].Rows[0]["HBack"]) != "0")
                {
                    sReturn = "保存失败2!" + DBUtility.ClsPub.isStrNull(ds2.Tables[0].Rows[0]["HBackRemark"]);
                    oCn.RollBack();
                    return false;
                }
                //============================
                sReturn = "修改单据成功!";
                oCn.Commit();
                return true;
@@ -117,6 +149,21 @@
                oCn.BeginTran();
                //保存前控制=========================================
                string HBillNote = "";
                 ds = oCn.RunProcReturn("Exec h_p_Gy_MaterialTechParamBill_BeforeSaveCtrl " + omodel.HInterID.ToString() + ", '" + omodel.HBillNo + "',1 ", "h_p_Gy_MaterialTechParamBill_BeforeSaveCtrl");
                if (ds == null)
                {
                    sReturn = "保存前判断失败!";
                    return false;
                }
                if (DBUtility.ClsPub.isStrNull(ds.Tables[0].Rows[0]["HBack"]) != "0")
                {
                    sReturn = "保存失败!" + DBUtility.ClsPub.isStrNull(ds.Tables[0].Rows[0]["HBackRemark"]);
                    return false;
                }
                //=========================================================
                //检查主表内码是否重复,若重复则重新生成并继续检查,直到不再重复
                while (true)
@@ -188,6 +235,23 @@
                           "')";
                    oCn.RunProc(subSql);
                }
                //=========================保存后控制
                DataSet ds2 = oCn.RunProcReturn("Exec h_p_Gy_MaterialTechParamBill_AfterSaveCtrl " + omodel.HInterID.ToString() + ", '" + omodel.HBillNo + "',1 ", "h_p_Gy_MaterialTechParamBill_AfterSaveCtrl");
                if (ds2 == null)
                {
                    sReturn = "保存后控制判断失败!";
                    oCn.RollBack();
                    return false;
                }
                if (DBUtility.ClsPub.isStrNull(ds2.Tables[0].Rows[0]["HBack"]) != "0")
                {
                    sReturn = "保存失败2!" + DBUtility.ClsPub.isStrNull(ds2.Tables[0].Rows[0]["HBackRemark"]);
                    oCn.RollBack();
                    return false;
                }
                //============================
                sReturn = "新增单据成功!";
                oCn.Commit();
                return true;
DAL/Öʼì¹ÜÀí/ClsGy_EnvironmentTestSchemeBillMain.cs
@@ -9,7 +9,7 @@
    {
        public Model.ClsGy_EnvironmentTestSchemeBillMain omodel = new Model.ClsGy_EnvironmentTestSchemeBillMain();
        public List<Model.ClsGy_EnvironmentTestSchemeBillSub> DetailColl = new List<Model.ClsGy_EnvironmentTestSchemeBillSub>();
        public ClsGy_EnvironmentTestSchemeBillMain()
        {
            base.MvarItemKeySub = "Gy_EnvironmentTestSchemeBillSub";
@@ -38,6 +38,20 @@
            {
                oCn.BeginTran();
                //保存前控制=========================================
                string HBillNote = "";
                DataSet ds = oCn.RunProcReturn("Exec h_p_Gy_EnvironmentTestSchemeBill_BeforeSaveCtrl " + omodel.HInterID.ToString() + ", '" + omodel.HBillNo + "','" + HBillNote + "',2 ", "h_p_Gy_EnvironmentTestSchemeBill_BeforeSaveCtrl");
                if (ds == null)
                {
                    sReturn = "保存前判断失败!";
                    return false;
                }
                if (DBUtility.ClsPub.isStrNull(ds.Tables[0].Rows[0]["HBack"]) != "0")
                {
                    sReturn = "保存失败!" + DBUtility.ClsPub.isStrNull(ds.Tables[0].Rows[0]["HBackRemark"]);
                    return false;
                }
                //=========================================================
                //更新主表
                oCn.RunProc("UpDate Gy_EnvironmentTestSchemeBillMain set  " +
                " HBillNo='" + omodel.HBillNo + "'" +  
@@ -81,6 +95,21 @@
                        "')";
                    oCn.RunProc(subSql);
                }
                //=========================保存后控制
                DataSet ds2 = oCn.RunProcReturn("Exec h_p_Gy_EnvironmentTestSchemeBill_AfterSaveCtrl " + omodel.HInterID.ToString() + ", '" + omodel.HBillNo + "',2 ", "h_p_Gy_EnvironmentTestSchemeBill_AfterSaveCtrl");
                if (ds2 == null)
                {
                    sReturn = "保存后控制判断失败!";
                    oCn.RollBack();
                    return false;
                }
                if (DBUtility.ClsPub.isStrNull(ds2.Tables[0].Rows[0]["HBack"]) != "0")
                {
                    sReturn = "保存失败2!" + DBUtility.ClsPub.isStrNull(ds2.Tables[0].Rows[0]["HBackRemark"]);
                    oCn.RollBack();
                    return false;
                }
                //============================
                sReturn = "修改单据成功!";
@@ -103,7 +132,20 @@
                DataSet ds;
                oCn.BeginTran();
                //保存前控制=========================================
                string HBillNote = "";
                ds = oCn.RunProcReturn("Exec h_p_Gy_EnvironmentTestSchemeBill_BeforeSaveCtrl " + omodel.HInterID.ToString() + ", '" + omodel.HBillNo + "','" + HBillNote + "',1 ", "h_p_Gy_EnvironmentTestSchemeBill_BeforeSaveCtrl");
                if (ds == null)
                {
                    sReturn = "保存前判断失败!";
                    return false;
                }
                if (DBUtility.ClsPub.isStrNull(ds.Tables[0].Rows[0]["HBack"]) != "0")
                {
                    sReturn = "保存失败!" + DBUtility.ClsPub.isStrNull(ds.Tables[0].Rows[0]["HBackRemark"]);
                    return false;
                }
                //=========================================================
                //检查主表内码是否重复,若重复则重新生成并继续检查,直到不再重复
                while (true)
                {
@@ -121,7 +163,7 @@
                //主表
                string mainSql = "insert into Gy_EnvironmentTestSchemeBillMain" +
                    "(HYear,HPeriod,HBillType,HBillSubType,HInterID,HDate,HBillNo,HRemark,HMaker,HMakeDate" +
                    ",HDeptID,HCenterWorkID,HProcID) " +
                    ",HDeptID,HCenterWorkID,HProcID,HOrgID) " +
                    "values(" +
                    "" + (omodel.HYear.ToString() != "0" ? omodel.HYear.ToString() : DateTime.Now.Year.ToString()) +
                    "," + omodel.HPeriod.ToString() +
@@ -132,10 +174,11 @@
                    "','" + omodel.HBillNo +
                    "','" + omodel.HRemark +
                   "','" + omodel.HMaker +
                    "','getdate()" +
                    "','" + omodel.HDeptID +
                    "',getdate()" +
                    ",'" + omodel.HDeptID +
                    "','" + omodel.HCenterWorkID +
                    "','" + omodel.HProcID +
                     "','" + omodel.HOrgID +
                    "')";
                oCn.RunProc(mainSql);
@@ -162,7 +205,21 @@
                         "')";
                    oCn.RunProc(subSql);
                }
                //=========================保存后控制
                DataSet ds2 = oCn.RunProcReturn("Exec h_p_Gy_EnvironmentTestSchemeBill_AfterSaveCtrl " + omodel.HInterID.ToString() + ", '" + omodel.HBillNo + "',1 ", "h_p_Gy_EnvironmentTestSchemeBill_AfterSaveCtrl");
                if (ds2 == null)
                {
                    sReturn = "保存后控制判断失败!";
                    oCn.RollBack();
                    return false;
                }
                if (DBUtility.ClsPub.isStrNull(ds2.Tables[0].Rows[0]["HBack"]) != "0")
                {
                    sReturn = "保存失败2!" + DBUtility.ClsPub.isStrNull(ds2.Tables[0].Rows[0]["HBackRemark"]);
                    oCn.RollBack();
                    return false;
                }
                //============================
                sReturn = "新增单据成功!";
                oCn.Commit();
                return true;
DAL/³µ¼ä¹ÜÀí/ClsGy_MaterPreventErrMouldBillMain.cs
@@ -38,6 +38,22 @@
            {
                oCn.BeginTran();
                //保存前控制=========================================
                string HBillNote = "";
                DataSet ds = oCn.RunProcReturn("Exec h_p_Gy_MaterPreventErrMouldBill_BeforeSaveCtrl " + omodel.HInterID.ToString() + ", '" + omodel.HBillNo + "','" + HBillNote + "',2 ", "h_p_Gy_MaterPreventErrMouldBill_BeforeSaveCtrl");
                if (ds == null)
                {
                    sReturn = "保存前判断失败!";
                    return false;
                }
                if (DBUtility.ClsPub.isStrNull(ds.Tables[0].Rows[0]["HBack"]) != "0")
                {
                    sReturn = "保存失败!" + DBUtility.ClsPub.isStrNull(ds.Tables[0].Rows[0]["HBackRemark"]);
                    return false;
                }
                //=========================================================
                //更新主表
                oCn.RunProc("UpDate Gy_MaterPreventErrMouldBillMain set  " +
                " HBillNo='" + omodel.HBillNo + "'" +  
@@ -79,7 +95,21 @@
                        "')";
                    oCn.RunProc(subSql);
                }
                //=========================保存后控制
                DataSet ds2 = oCn.RunProcReturn("Exec h_p_Gy_MaterPreventErrMouldBill_AfterSaveCtrl " + omodel.HInterID.ToString() + ", '" + omodel.HBillNo + "',2 ", "h_p_Gy_MaterPreventErrMouldBill_AfterSaveCtrl");
                if (ds2 == null)
                {
                    sReturn = "保存后控制判断失败!";
                    oCn.RollBack();
                    return false;
                }
                if (DBUtility.ClsPub.isStrNull(ds2.Tables[0].Rows[0]["HBack"]) != "0")
                {
                    sReturn = "保存失败2!" + DBUtility.ClsPub.isStrNull(ds2.Tables[0].Rows[0]["HBackRemark"]);
                    oCn.RollBack();
                    return false;
                }
                //============================
                sReturn = "修改单据成功!";
                oCn.Commit();
@@ -102,6 +132,22 @@
                oCn.BeginTran();
                //保存前控制=========================================
                string HBillNote = "";
                ds = oCn.RunProcReturn("Exec h_p_Gy_MaterPreventErrMouldBill_BeforeSaveCtrl " + omodel.HInterID.ToString() + ", '" + omodel.HBillNo + "','" + HBillNote + "',1 ", "h_p_Gy_MaterPreventErrMouldBill_BeforeSaveCtrl");
                if (ds == null)
                {
                    sReturn = "保存前判断失败!";
                    return false;
                }
                if (DBUtility.ClsPub.isStrNull(ds.Tables[0].Rows[0]["HBack"]) != "0")
                {
                    sReturn = "保存失败!" + DBUtility.ClsPub.isStrNull(ds.Tables[0].Rows[0]["HBackRemark"]);
                    return false;
                }
                //=========================================================
                //检查主表内码是否重复,若重复则重新生成并继续检查,直到不再重复
                while (true)
                {
@@ -119,7 +165,7 @@
                //主表
                string mainSql = "insert into Gy_MaterPreventErrMouldBillMain" +
                    "(HYear,HPeriod,HBillType,HBillSubType,HInterID,HDate,HBillNo,HRemark,HMaker,HMakeDate" +
                    ",HMaterID,HProcID) " +
                    ",HMaterID,HProcID,HOrgID) " +
                    "values(" +
                    "" + (omodel.HYear.ToString() != "0" ? omodel.HYear.ToString() : DateTime.Now.Year.ToString()) +
                    "," + omodel.HPeriod.ToString() +
@@ -133,6 +179,7 @@
                    "','" + omodel.HMakeDate +                  
                    "','" + omodel.HMaterID +
                     "','" + omodel.HProcID +
                    "','" + omodel.HOrgID +
                    "')";
                oCn.RunProc(mainSql);
@@ -159,6 +206,22 @@
                    oCn.RunProc(subSql);
                }
                //=========================保存后控制
                DataSet ds2 = oCn.RunProcReturn("Exec h_p_Gy_MaterPreventErrMouldBill_AfterSaveCtrl " + omodel.HInterID.ToString() + ", '" + omodel.HBillNo + "',1 ", "h_p_Gy_MaterPreventErrMouldBill_AfterSaveCtrl");
                if (ds2 == null)
                {
                    sReturn = "保存后控制判断失败!";
                    oCn.RollBack();
                    return false;
                }
                if (DBUtility.ClsPub.isStrNull(ds2.Tables[0].Rows[0]["HBack"]) != "0")
                {
                    sReturn = "保存失败2!" + DBUtility.ClsPub.isStrNull(ds2.Tables[0].Rows[0]["HBackRemark"]);
                    oCn.RollBack();
                    return false;
                }
                //============================
                sReturn = "新增单据成功!";
                oCn.Commit();
                return true;
DAL/³µ¼ä¹ÜÀí/ClsGy_WorkBeginDotCheckListBillMain.cs
@@ -38,6 +38,22 @@
            {
                oCn.BeginTran();
                //保存前控制=========================================
                string HBillNote = "";
                DataSet ds = oCn.RunProcReturn("Exec h_p_Gy_WorkBeginDotCheckListBill_BeforeSaveCtrl " + omodel.HInterID.ToString() + ", '" + omodel.HBillNo + "','" + HBillNote + "',2 ", "h_p_Gy_WorkBeginDotCheckListBill_BeforeSaveCtrl");
                if (ds == null)
                {
                    sReturn = "保存前判断失败!";
                    return false;
                }
                if (DBUtility.ClsPub.isStrNull(ds.Tables[0].Rows[0]["HBack"]) != "0")
                {
                    sReturn = "保存失败!" + DBUtility.ClsPub.isStrNull(ds.Tables[0].Rows[0]["HBackRemark"]);
                    return false;
                }
                //=========================================================
                //更新主表
                oCn.RunProc("UpDate Gy_WorkBeginDotCheckListBillMain set  " +
                " HBillNo='" + omodel.HBillNo + "'" +  
@@ -80,7 +96,21 @@
                    oCn.RunProc(subSql);
                }
                //=========================保存后控制
                DataSet ds2 = oCn.RunProcReturn("Exec h_p_Gy_WorkBeginDotCheckListBill_AfterSaveCtrl " + omodel.HInterID.ToString() + ", '" + omodel.HBillNo + "',2 ", "h_p_Gy_WorkBeginDotCheckListBill_AfterSaveCtrl");
                if (ds2 == null)
                {
                    sReturn = "保存后控制判断失败!";
                    oCn.RollBack();
                    return false;
                }
                if (DBUtility.ClsPub.isStrNull(ds2.Tables[0].Rows[0]["HBack"]) != "0")
                {
                    sReturn = "保存失败2!" + DBUtility.ClsPub.isStrNull(ds2.Tables[0].Rows[0]["HBackRemark"]);
                    oCn.RollBack();
                    return false;
                }
                //============================
                sReturn = "修改单据成功!";
                oCn.Commit();
                return true;
@@ -102,6 +132,20 @@
                oCn.BeginTran();
                //保存前控制=========================================
                string HBillNote = "";
                 ds = oCn.RunProcReturn("Exec h_p_Gy_WorkBeginDotCheckListBill_BeforeSaveCtrl " + omodel.HInterID.ToString() + ", '" + omodel.HBillNo + "','" + HBillNote + "',1 ", "h_p_Gy_WorkBeginDotCheckListBill_BeforeSaveCtrl");
                if (ds == null)
                {
                    sReturn = "保存前判断失败!";
                    return false;
                }
                if (DBUtility.ClsPub.isStrNull(ds.Tables[0].Rows[0]["HBack"]) != "0")
                {
                    sReturn = "保存失败!" + DBUtility.ClsPub.isStrNull(ds.Tables[0].Rows[0]["HBackRemark"]);
                    return false;
                }
                //=========================================================
                //检查主表内码是否重复,若重复则重新生成并继续检查,直到不再重复
                while (true)
                {
@@ -119,7 +163,7 @@
                //主表
                string mainSql = "insert into Gy_WorkBeginDotCheckListBillMain" +
                    "(HYear,HPeriod,HBillType,HBillSubType,HInterID,HDate,HBillNo,HRemark,HMaker,HMakeDate" +
                    ",HMaterID,HSourceID,HProcID,HNote) " +
                    ",HMaterID,HSourceID,HProcID,HNote,HOrgID) " +
                    "values(" +
                    "" + (omodel.HYear.ToString() != "0" ? omodel.HYear.ToString() : DateTime.Now.Year.ToString()) +
                    "," + omodel.HPeriod.ToString() +
@@ -135,6 +179,7 @@
                    "','" + omodel.HSourceID +
                    "','" + omodel.HProcID +                   
                    "','" + omodel.HNote +
                      "','" + omodel.HOrgID +
                    "')";
                oCn.RunProc(mainSql);
@@ -161,6 +206,22 @@
                    oCn.RunProc(subSql);
                }
                //=========================保存后控制
                DataSet ds2 = oCn.RunProcReturn("Exec h_p_Gy_WorkBeginDotCheckListBill_AfterSaveCtrl " + omodel.HInterID.ToString() + ", '" + omodel.HBillNo + "',1 ", "h_p_Gy_WorkBeginDotCheckListBill_AfterSaveCtrl");
                if (ds2 == null)
                {
                    sReturn = "保存后控制判断失败!";
                    oCn.RollBack();
                    return false;
                }
                if (DBUtility.ClsPub.isStrNull(ds2.Tables[0].Rows[0]["HBack"]) != "0")
                {
                    sReturn = "保存失败2!" + DBUtility.ClsPub.isStrNull(ds2.Tables[0].Rows[0]["HBackRemark"]);
                    oCn.RollBack();
                    return false;
                }
                //============================
                sReturn = "新增单据成功!";
                oCn.Commit();
                return true;
DAL/ÏúÊÛ¹ÜÀí/ClsCrm_ComplainVisitBill.cs
New file
@@ -0,0 +1,215 @@
using System;
using System.Collections.Generic;
using System.Text;
using System.Data;
namespace DAL
{
    public class ClsCrm_ComplainVisitBill : DBUtility.ClsXt_BaseBill
    {
        public Model.ClsCrm_ComplainVisitBillMain omodel = new Model.ClsCrm_ComplainVisitBillMain();
        public List<Model.ClsCrm_ComplainVisitBillSub> DetailColl = new List<Model.ClsCrm_ComplainVisitBillSub>();
        public ClsCrm_ComplainVisitBill()
        {
            base.MvarItemKeySub = "Crm_ComplainVisitBillSub";
            base.MvarItemKeySub2 = "";
            base.MvarItemKeySub3 = "";
            base.MvarItemKeySub4 = "";
            base.MvarItemKey = "Crm_ComplainVisitBillMain";
            base.MvarReportTitle = "客户拜访记录单";
            base.BillType = "1410";
        }
        #region å›ºå®šä»£ç 
        ~ClsCrm_ComplainVisitBill()
        {
            DetailColl = null;
        }
        #endregion   è‡ªå®šä¹‰æ–¹æ³•
        //修改单据
        public override bool ModifyBill(Int64 lngBillKey, ref string sReturn)
        {
            try
            {
                //
                oCn.BeginTran();
                //保存前控制=========================================
                DataSet ds = oCn.RunProcReturn("Exec h_p_Crm_ComplainVisitBill_BeforeSaveCtrl " + omodel.HInterID.ToString() + ", '" + omodel.HBillNo + "',2 ", "h_p_Crm_ComplainVisitBill_BeforeSaveCtrl");
                if (ds == null)
                {
                    sReturn = "保存前判断失败!";
                    return false;
                }
                if (DBUtility.ClsPub.isStrNull(ds.Tables[0].Rows[0]["HBack"]) != "0")
                {
                    sReturn = "保存失败!" + DBUtility.ClsPub.isStrNull(ds.Tables[0].Rows[0]["HBackRemark"]);
                    return false;
                }
                //=========================================================
                //更新主表
                oCn.RunProc("UpDate Crm_ComplainVisitBillMain set " +
                 " HDate = '" + omodel.HDate.ToShortDateString() + "'" +
                 ",HCusID = " + omodel.HCusID.ToString() +
                 ",HBeginTime = '" + omodel.HBeginTime+ "'" +
                 ",HEndTime = '" + omodel.HEndTime + "'" +
                 ",HCusAddr = '" + omodel.HCusAddr.ToString() + "'" +
                 ",HComplainTopic = '" + omodel.HComplainTopic.ToString() + "'" +
                 ",HComplainType = '" + omodel.HComplainType.ToString() + "'" +
                 ",HComplainEmp = '" + omodel.HComplainEmp.ToString() + "'" +
                 ",HLinkPhone = '" + omodel.HLinkPhone + "'" +
                 ",HGrade = '" + omodel.HGrade + "'" +
                 ",HVisitEmpID = '" + omodel.HVisitEmpID + "'" +
                 ",HDeptID = '" + omodel.HDeptID + "'" +
                 ",HVisitResult = '" + omodel.HVisitResult + "'" +
                 ",HCusFeedback = '" + omodel.HCusFeedback.ToString() + "'" +
                 ",HRemark = '" + omodel.HRemark + "'" +
                 ",HUpDater = '" + omodel.HUpDater + "'" +
                 ",HUpDateDate = '" + omodel.HUpDateDate + "'" +
                 " where HInterID = " + lngBillKey.ToString());
                //删除关联
                DeleteRelation(ref sReturn, lngBillKey);
                //删除子表
                DeleteBillSub(lngBillKey);
                //=========================保存后控制
                DataSet ds2 = oCn.RunProcReturn("Exec h_p_Crm_ComplainVisitBill_AfterSaveCtrl " + omodel.HInterID.ToString() + ", '" + omodel.HBillNo + "',2 ", "h_p_Crm_ComplainVisitBill_AfterSaveCtrl");
                if (ds2 == null)
                {
                    sReturn = "保存后控制判断失败!";
                    oCn.RollBack();
                    return false;
                }
                if (DBUtility.ClsPub.isStrNull(ds2.Tables[0].Rows[0]["HBack"]) != "0")
                {
                    sReturn = "保存失败2!" + DBUtility.ClsPub.isStrNull(ds2.Tables[0].Rows[0]["HBackRemark"]);
                    oCn.RollBack();
                    return false;
                }
                //============================
                sReturn = "修改单据成功!";
                oCn.Commit();
                return true;
            }
            catch (Exception e)
            {
                sReturn = e.Message;
                oCn.RollBack();
                throw (e);
            }
        }
        //新增单据
        public override bool AddBill(ref string sReturn)
        {
            try
            {
                //得到mainid
                omodel.HInterID = DBUtility.ClsPub.CreateBillID(BillType, ref DBUtility.ClsPub.sExeReturnInfo);
                //若MAINDI重复则重新获取
                oCn.BeginTran();
                //保存前控制=========================================
                DataSet ds = oCn.RunProcReturn("Exec h_p_Crm_ComplainVisitBill_BeforeSaveCtrl " + omodel.HInterID.ToString() + ", '" + omodel.HBillNo + "',1 ", "h_p_Crm_ComplainVisitBill_BeforeSaveCtrl");
                if (ds == null)
                {
                    sReturn = "保存前判断失败!";
                    return false;
                }
                if (DBUtility.ClsPub.isStrNull(ds.Tables[0].Rows[0]["HBack"]) != "0")
                {
                    sReturn = "保存失败!" + DBUtility.ClsPub.isStrNull(ds.Tables[0].Rows[0]["HBackRemark"]);
                    return false;
                }
                //=========================================================
                oCn.RunProc("INSERT INTO Crm_ComplainVisitBillMain " +
                    "(HBillType,HInterID,HBillNo,HDate," +
                    "HYear,HPeriod,HMaker,HMakeDate," +
                    "HCusID,HBeginTime,HEndTime,HCusAddr," +
                    "HVisitEmpID,HComplainTopic,HDeptID,HComplainType," +
                    "HComplainEmp,HLinkPhone,HGrade,HVisitResult,HCusFeedback,HOrgID) " +
                    "VALUES (" +
                    "'" + this.BillType + "','" + omodel.HInterID + "','" + omodel.HBillNo + "','" + omodel.HDate.ToShortDateString() + "'," +
                    "'" + omodel.HYear + "','" + omodel.HPeriod + "','" + DBUtility.ClsPub.CurUserName + "',GETDATE()," +  // HMaker使用当前用户
                    "'" + omodel.HCusID + "','" + omodel.HBeginTime + "','" + omodel.HEndTime + "','" + omodel.HCusAddr + "'," +
                    "'" + omodel.HVisitEmpID + "','" + omodel.HComplainTopic + "','" + omodel.HDeptID + "','" + omodel.HComplainType + "'," +
                    "'" + omodel.HComplainEmp + "','" + omodel.HLinkPhone + "','" + omodel.HGrade + "','" + omodel.HVisitResult + "'," +
                    "'" + omodel.HCusFeedback + "','" + omodel.HOrgID + "'" +
                    ")");
                //=========================保存后控制
                DataSet ds2 = oCn.RunProcReturn("Exec h_p_Crm_ComplainVisitBill_AfterSaveCtrl " + omodel.HInterID.ToString() + ", '" + omodel.HBillNo + "',1 ", "h_p_Crm_ComplainVisitBill_AfterSaveCtrl");
                if (ds2 == null)
                {
                    sReturn = "保存后控制判断失败!";
                    oCn.RollBack();
                    return false;
                }
                if (DBUtility.ClsPub.isStrNull(ds2.Tables[0].Rows[0]["HBack"]) != "0")
                {
                    sReturn = "保存失败2!" + DBUtility.ClsPub.isStrNull(ds2.Tables[0].Rows[0]["HBackRemark"]);
                    oCn.RollBack();
                    return false;
                }
                //============================
                sReturn = "新增单据成功!";
                oCn.Commit();
                return true;
            }
            catch (Exception e)
            {
                sReturn = e.Message;
                oCn.RollBack();
                throw (e);
            }
        }
        //显示单据
        public override bool ShowBill(Int64 lngBillKey, ref string sReturn)
        {
            try
            {
                //查询主表
                DataSet Ds;
                Ds = oCn.RunProcReturn("Select * from Crm_ComplainVisitBillMain Where HInterID=" + lngBillKey.ToString(), "Crm_ComplainVisitBillMain");
                if (Ds.Tables[0].Rows.Count == 0)
                {
                    sReturn = "单据未找到!";
                    return false;
                }
                //赋值
                omodel.HInterID = DBUtility.ClsPub.isLong(Ds.Tables[0].Rows[0]["HInterID"]);
                omodel.HBillNo = DBUtility.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["HBillNo"]);
                omodel.HDate = DBUtility.ClsPub.isDate(Ds.Tables[0].Rows[0]["HDate"]);
                omodel.HYear = DBUtility.ClsPub.isLong(Ds.Tables[0].Rows[0]["HYear"]);
                omodel.HPeriod = DBUtility.ClsPub.isLong(Ds.Tables[0].Rows[0]["HPeriod"]);
                //=================
                omodel.HRemark = DBUtility.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["HRemark"]);
                omodel.HCusID = DBUtility.ClsPub.isLong(Ds.Tables[0].Rows[0]["HCusID"]);
                omodel.HVisitEmpID = DBUtility.ClsPub.isLong(Ds.Tables[0].Rows[0]["HVisitEmpID"]);
                omodel.HDeptID = DBUtility.ClsPub.isLong(Ds.Tables[0].Rows[0]["HDeptID"]);
                //
                omodel.HMaker = Ds.Tables[0].Rows[0]["HMaker"].ToString().Trim();
                omodel.HMakeDate = Ds.Tables[0].Rows[0]["HMakeDate"].ToString().Trim();
                omodel.HUpDateDate = Ds.Tables[0].Rows[0]["HUpDateDate"].ToString().Trim();
                omodel.HUpDater = Ds.Tables[0].Rows[0]["HUpDater"].ToString().Trim();
                omodel.HBackDate = Ds.Tables[0].Rows[0]["HBackDate"].ToString().Trim();
                omodel.HBacker = Ds.Tables[0].Rows[0]["HBacker"].ToString().Trim();
                omodel.HCheckDate = Ds.Tables[0].Rows[0]["HCheckDate"].ToString().Trim();
                omodel.HChecker = Ds.Tables[0].Rows[0]["HChecker"].ToString().Trim();
                omodel.HCloseDate = Ds.Tables[0].Rows[0]["HCloseDate"].ToString().Trim();
                omodel.HCloseMan = Ds.Tables[0].Rows[0]["HCloseMan"].ToString().Trim();
                omodel.HDeleteDate = Ds.Tables[0].Rows[0]["HDeleteDate"].ToString().Trim();
                omodel.HDeleteMan = Ds.Tables[0].Rows[0]["HDeleteMan"].ToString().Trim();
                sReturn = "显示单据成功!";
                return true;
            }
            catch (Exception e)
            {
                sReturn = e.Message;
                throw (e);
            }
        }
    }
}
DAL/ÏúÊÛ¹ÜÀí/ClsXs_SeQuotationBill.cs
@@ -36,53 +36,44 @@
            {
                //
                oCn.BeginTran();
                //保存前控制=========================================
                DataSet ds = oCn.RunProcReturn("Exec h_p_Xs_SeQuotationBill_BeforeSaveCtrl " + omodel.HInterID.ToString() + ", '" + omodel.HBillNo + "',2 ", "h_p_Xs_SeQuotationBill_BeforeSaveCtrl");
                if (ds == null)
                {
                    sReturn = "保存前判断失败!";
                    return false;
                }
                if (DBUtility.ClsPub.isStrNull(ds.Tables[0].Rows[0]["HBack"]) != "0")
                {
                    sReturn = "保存失败!" + DBUtility.ClsPub.isStrNull(ds.Tables[0].Rows[0]["HBackRemark"]);
                    return false;
                }
                //=========================================================
                //更新主表
                oCn.RunProc("UpDate Xs_SeQuotationBillMain set  " +
                " HDate = '" + omodel.HDate.ToShortDateString() + "'" +
                //============================================
                ",HCusID =" + omodel.HCusID.ToString() +
                ",HCusNumber ='" + omodel.HCusNumber + "'" +
                ",HCusID =" + omodel.HCusID.ToString() +
                ",HLinkManID =" + omodel.HLinkManID.ToString() +
                ",HCurID =" + omodel.HCurID.ToString() +
                ",HCurNumber ='" + omodel.HCurNumber + "'" +
                ",HCurID =" + omodel.HCurID.ToString() +
                ",HExRate =" + omodel.HExRate.ToString() +
                ",HEmpID =" + omodel.HEmpID.ToString() +
                ",HEmpNumber ='" + omodel.HEmpNumber + "'" +
                ",HMangerID =" + omodel.HMangerID.ToString() +
                ",HMangerNumber ='" + omodel.HMangerNumber + "'" +
                ",HDeptID =" + omodel.HDeptID.ToString() +
                ",HDeptNumber ='" + omodel.HDeptNumber + "'" +
                ",HMangerID =" + omodel.HMangerID.ToString() +
                ",HDeptID =" + omodel.HDeptID.ToString() +
                ",HInnerBillNo = '" + omodel.HInnerBillNo + "'" +
                ",HContractName = '" + omodel.HContractName + "'" +
                ",HExplanation = '" + omodel.HExplanation + "'" +
                ",HQuotationDate = '" + omodel.HQuotationDate.ToShortDateString() + "'" +
                ",HCondition = '" + omodel.HCondition + "'" +
                ",HQuotationStatus = '" + omodel.HQuotationStatus + "'" +
                ",HSellSID =" + omodel.HSellSID.ToString() +
                ",HSellSNumber ='" + omodel.HSellSNumber + "'" +
                ",HSellSID =" + omodel.HSellSID.ToString() +
                ",HCarriage =" + omodel.HCarriage.ToString() +
                ",HCommision =" + omodel.HCommision.ToString() +
                ",HSellBonus =" + omodel.HSellBonus.ToString() +
                ",HOtherMoney =" + omodel.HOtherMoney.ToString() +
                ",HExportRemark1 ='" + omodel.HExportRemark1 + "'" +
                ",HExportRemark2 ='" + omodel.HExportRemark2 + "'" +
                ",HPackMoney =" + omodel.HPackMoney.ToString() +
                ",HCarryBillMoney =" + omodel.HCarryBillMoney.ToString() +
                ",HTrailerMoney =" + omodel.HTrailerMoney.ToString() +
                ",HFileMoney =" + omodel.HFileMoney.ToString() +
                ",HORC =" + omodel.HORC.ToString() +
                ",HSurrogateMoney =" + omodel.HSurrogateMoney.ToString() +
                ",HApplyMoney =" + omodel.HApplyMoney.ToString() +
                ",HBuildMoney =" + omodel.HBuildMoney.ToString() +
                ",HProduceAreaCard =" + omodel.HProduceAreaCard.ToString() +
                ",HOtherMoney =" + omodel.HOtherMoney.ToString() +
                ",HExportOtherMoney =" + omodel.HExportOtherMoney.ToString() +
                ",HSumMoney =" + omodel.HSumMoney.ToString() +
                ",HArkModel = '" + omodel.HArkModel + "'" +
                ",HArkQty =" + omodel.HArkQty.ToString() +
                ",HSumMoney =" + omodel.HSumMoney.ToString() +
                //============================================
                ",HRemark='" + omodel.HRemark + "'" +
                ",HYear=" + omodel.HYear.ToString() +
                ",HPeriod=" + omodel.HPeriod.ToString() +
                ",HRemark='" + omodel.HRemark + "'" +
                ",HUpDater='" + omodel.HUpDater + "'" +
                ",HUpDateDate='" + omodel.HUpDateDate + "'" +
                " where HInterID=" + lngBillKey.ToString());
@@ -95,19 +86,33 @@
                foreach (Model.ClsXs_SeQuotationBillSub oSub in DetailColl)
                {
                    oCn.RunProc("Insert into Xs_SeQuotationBillSub " +
                      " (HInterID,HEntryID,HMaterID,HMaterNumber" +
                      ",HUnitID,HUnitNumber,HDisposeRate,HQty" +
                      " (HInterID,HEntryID,HMaterID" +
                      ",HUnitID,HQty" +
                      ",HPrice,HRelPrice,HRate,HAllMoney" +
                      ",HMoney,HDate,HRemark,HType" +
                      ",HSourceInterID,HSourceEntryID,HSourceBillNo,HSourceBillType,HRelationQty,HRelationMoney" +
                      ",HMoney,HDate,HRemark" +
                      ") values("
                      + omodel.HInterID.ToString() + "," + oSub.HEntryID.ToString() + "," + oSub.HMaterID.ToString() + ",'" + oSub.HMaterNumber + "'" +
                      "," + oSub.HUnitID.ToString() + ",'" + oSub.HUnitNumber + "'," + oSub.HDisposeRate.ToString() + "," + oSub.HQty.ToString() +
                      + omodel.HInterID.ToString() + "," + oSub.HEntryID.ToString() + "," + oSub.HMaterID.ToString() + "" +
                      "," + oSub.HUnitID.ToString() + "," + oSub.HQty.ToString() +
                      "," + oSub.HPrice.ToString() + "," + oSub.HRelPrice.ToString() + "," + oSub.HRate.ToString() + "," + oSub.HAllMoney.ToString() +
                      "," + oSub.HMoney.ToString() + ",'" + oSub.HDate.ToShortDateString() + "','" + oSub.HRemark + "','" + oSub.HType + "'" +
                      "," + oSub.HSourceInterID.ToString() + "," + oSub.HSourceEntryID.ToString() + ",'" + oSub.HSourceBillNo + "','" + oSub.HSourceBillType + "'," + oSub.HRelationQty.ToString() + "," + oSub.HRelationMoney.ToString() +
                      "," + oSub.HMoney.ToString() + ",'" + oSub.HDate.ToShortDateString() + "','" + oSub.HRemark + "'" +
                      ") ");
                }
                //=========================保存后控制
                DataSet ds2 = oCn.RunProcReturn("Exec h_p_Xs_SeQuotationBill_AfterSaveCtrl " + omodel.HInterID.ToString() + ", '" + omodel.HBillNo + "',2 ", "h_p_Xs_SeQuotationBill_AfterSaveCtrl");
                if (ds2 == null)
                {
                    sReturn = "保存后控制判断失败!";
                    oCn.RollBack();
                    return false;
                }
                if (DBUtility.ClsPub.isStrNull(ds2.Tables[0].Rows[0]["HBack"]) != "0")
                {
                    sReturn = "保存失败2!" + DBUtility.ClsPub.isStrNull(ds2.Tables[0].Rows[0]["HBackRemark"]);
                    oCn.RollBack();
                    return false;
                }
                //============================
                sReturn = "修改单据成功!";
                oCn.Commit();
                return true;
@@ -128,51 +133,69 @@
                omodel.HInterID = DBUtility.ClsPub.CreateBillID(BillType, ref DBUtility.ClsPub.sExeReturnInfo);
                //若MAINDI重复则重新获取
                oCn.BeginTran();
                //保存前控制=========================================
                DataSet ds = oCn.RunProcReturn("Exec h_p_Xs_SeQuotationBill_BeforeSaveCtrl " + omodel.HInterID.ToString() + ", '" + omodel.HBillNo + "',1 ", "h_p_Xs_SeQuotationBill_BeforeSaveCtrl");
                if (ds == null)
                {
                    sReturn = "保存前判断失败!";
                    return false;
                }
                if (DBUtility.ClsPub.isStrNull(ds.Tables[0].Rows[0]["HBack"]) != "0")
                {
                    sReturn = "保存失败!" + DBUtility.ClsPub.isStrNull(ds.Tables[0].Rows[0]["HBackRemark"]);
                    return false;
                }
                //=========================================================
                //主表
                oCn.RunProc("Insert Into Xs_SeQuotationBillMain   " +
                "(HBillType,HInterID,HBillNo,HDate" +
                ",HYear,HPeriod,HMaker,HMakeDate" +
                ",HCusID,HCusNumber,HLinkManID,HCurID,HCurNumber" +
                ",HExRate,HEmpID,HEmpNumber,HMangerID,HMangerNumber" +
                ",HDeptID,HDeptNumber,HContractName,HQuotationDate" +
                ",HCondition,HQuotationStatus,HSellSID,HSellSNumber" +
                ",HCarriage,HCommision,HSellBonus,HOtherMoney" +
                ",HExportRemark1,HExportRemark2,HPackMoney,HCarryBillMoney" +
                ",HTrailerMoney,HFileMoney,HORC,HSurrogateMoney" +
                ",HApplyMoney,HBuildMoney,HProduceAreaCard,HExportOtherMoney" +
                ",HSumMoney,HArkModel,HArkQty" +
                ",HExplanation,HInnerBillNo,HRemark" +
                ") " +
                " values('" + this.BillType + "'," + omodel.HInterID.ToString() + ",'" + omodel.HBillNo + "','" + omodel.HDate.ToShortDateString() + "'" +
                "," + omodel.HYear.ToString() + "," + omodel.HPeriod.ToString() + ",'" + DBUtility.ClsPub.CurUserName + "',getdate()" +
                "," + omodel.HCusID.ToString() + ",'" + omodel.HCusNumber + "'," + omodel.HLinkManID.ToString() + "," + omodel.HCurID.ToString() + ",'" + omodel.HCurNumber + "'" +
                "," + omodel.HExRate.ToString() + "," + omodel.HEmpID.ToString() + ",'" + omodel.HEmpNumber + "'," + omodel.HMangerID.ToString() + ",'" + omodel.HMangerNumber + "'" +
                "," + omodel.HDeptID.ToString() + ",'" + omodel.HDeptNumber + "','" + omodel.HContractName + "','" + omodel.HQuotationDate.ToShortDateString() + "'" +
                ",'" + omodel.HCondition + "','" + omodel.HQuotationStatus + "'," + omodel.HSellSID.ToString() + ",'" + omodel.HSellSNumber + "'" +
                "," + omodel.HCarriage.ToString() + "," + omodel.HCommision.ToString() + "," + omodel.HSellBonus.ToString() + "," + omodel.HOtherMoney.ToString() +
                ",'" + omodel.HExportRemark1 + "','" + omodel.HExportRemark2 + "'," + omodel.HPackMoney.ToString() + "," + omodel.HCarryBillMoney.ToString() +
                "," + omodel.HTrailerMoney.ToString() + "," + omodel.HFileMoney.ToString() + "," + omodel.HORC.ToString() + "," + omodel.HSurrogateMoney.ToString() +
                "," + omodel.HApplyMoney.ToString() + "," + omodel.HBuildMoney.ToString() + "," + omodel.HProduceAreaCard.ToString() + "," + omodel.HExportOtherMoney.ToString() +
                "," + omodel.HSumMoney.ToString() + ",'" + omodel.HArkModel + "'," + omodel.HArkQty.ToString() +
                ",'" + omodel.HExplanation + "','" + omodel.HInnerBillNo + "','" + omodel.HRemark + "'" +
                ") ");
                oCn.RunProc("Insert Into Xs_SeQuotationBillMain " +
                   "(HBillType, HInterID, HBillNo, HDate" +
                   ", HYear, HPeriod, HMaker, HMakeDate" +
                   ", HCusID, HLinkManID, HCurID" +
                   ", HExRate, HEmpID, HMangerID" +
                   ", HDeptID, HExplanation, HInnerBillNo, HContractName" +
                   ", HQuotationDate, HCondition, HQuotationStatus, HSellSID" +
                   ", HCarriage, HCommision, HSellBonus, HOtherMoney" +
                   ", HExportOtherMoney, HSumMoney, HOrgID) " +
                   "values('" + this.BillType + "', '" + omodel.HInterID + "', '" + omodel.HBillNo + "', '" + omodel.HDate.ToShortDateString() + "'" +
                   ", '" + omodel.HYear + "', '" + omodel.HPeriod + "', '" + DBUtility.ClsPub.CurUserName + "', getdate()" +
                   ", '" + omodel.HCusID + "', '" + omodel.HLinkManID + "', '" + omodel.HCurID + "'" +
                   ", '" + omodel.HExRate + "', '" + omodel.HEmpID + "', '" + omodel.HMangerID + "'" +
                   ", '" + omodel.HDeptID + "', '" + omodel.HExplanation + "', '" + omodel.HInnerBillNo + "', '" + omodel.HContractName + "'" +
                   ", '" + omodel.HQuotationDate.ToShortDateString() + "', '" + omodel.HCondition + "', '" + omodel.HQuotationStatus + "', '" + omodel.HSellSID + "'" +
                   ", '" + omodel.HCarriage + "', '" + omodel.HCommision + "', '" + omodel.HSellBonus + "', '" + omodel.HOtherMoney + "'" +
                   ", '" + omodel.HExportOtherMoney + "', '" + omodel.HSumMoney + "', '" + omodel.HOrgID + "')");
                //插入子表
                foreach (Model.ClsXs_SeQuotationBillSub oSub in DetailColl)
                {
                    oCn.RunProc("Insert into Xs_SeQuotationBillSub " +
                      " (HInterID,HEntryID,HMaterID,HMaterNumber" +
                      ",HUnitID,HUnitNumber,HDisposeRate,HQty" +
                      ",HPrice,HRelPrice,HRate,HAllMoney" +
                      ",HMoney,HDate,HRemark,HType" +
                      ",HSourceInterID,HSourceEntryID,HSourceBillNo,HSourceBillType,HRelationQty,HRelationMoney" +
                      ") values("
                      + omodel.HInterID.ToString() + "," + oSub.HEntryID.ToString() + "," + oSub.HMaterID.ToString() + ",'" + oSub.HMaterNumber + "'" +
                      "," + oSub.HUnitID.ToString() + ",'" + oSub.HUnitNumber + "'," + oSub.HDisposeRate.ToString() + "," + oSub.HQty.ToString() +
                      "," + oSub.HPrice.ToString() + "," + oSub.HRelPrice.ToString() + "," + oSub.HRate.ToString() + "," + oSub.HAllMoney.ToString() +
                      "," + oSub.HMoney.ToString() + ",'" + oSub.HDate.ToShortDateString() + "','" + oSub.HRemark + "','" + oSub.HType + "'" +
                      ",'" + oSub.HSourceInterID + "','" + oSub.HSourceEntryID + "','" + oSub.HSourceBillNo + "','" + oSub.HSourceBillType + "'," + oSub.HRelationQty.ToString() + "," + oSub.HRelationMoney.ToString() +
                      ") ");
                       " (HInterID,HEntryID,HMaterID" +
                       ",HUnitID,HQty" +
                       ",HPrice,HRelPrice,HRate,HAllMoney" +
                       ",HMoney,HDate,HRemark" +
                       ") values("
                       + omodel.HInterID.ToString() + "," + oSub.HEntryID.ToString() + "," + oSub.HMaterID.ToString() + "" +
                       "," + oSub.HUnitID.ToString() + "," + oSub.HQty.ToString() +
                       "," + oSub.HPrice.ToString() + "," + oSub.HRelPrice.ToString() + "," + oSub.HRate.ToString() + "," + oSub.HAllMoney.ToString() +
                       "," + oSub.HMoney.ToString() + ",'" + oSub.HDate.ToShortDateString() + "','" + oSub.HRemark + "'" +
                       ") ");
                }
                //=========================保存后控制
                DataSet ds2 = oCn.RunProcReturn("Exec h_p_Xs_SeQuotationBill_AfterSaveCtrl " + omodel.HInterID.ToString() + ", '" + omodel.HBillNo + "',1 ", "h_p_Xs_SeQuotationBill_AfterSaveCtrl");
                if (ds2 == null)
                {
                    sReturn = "保存后控制判断失败!";
                    oCn.RollBack();
                    return false;
                }
                if (DBUtility.ClsPub.isStrNull(ds2.Tables[0].Rows[0]["HBack"]) != "0")
                {
                    sReturn = "保存失败2!" + DBUtility.ClsPub.isStrNull(ds2.Tables[0].Rows[0]["HBackRemark"]);
                    oCn.RollBack();
                    return false;
                }
                //============================
                sReturn = "新增单据成功!";
                oCn.Commit();
                return true;
@@ -206,44 +229,44 @@
                //=================
                omodel.HRemark = DBUtility.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["HRemark"]);
                omodel.HCusID = DBUtility.ClsPub.isLong(Ds.Tables[0].Rows[0]["HCusID"]);
                omodel.HCusNumber = DBUtility.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["HCusNumber"]);
                omodel.HLinkManID = DBUtility.ClsPub.isLong(Ds.Tables[0].Rows[0]["HLinkManID"]);
                //omodel.HCusNumber = DBUtility.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["HCusNumber"]);
                omodel.HLinkManID = DBUtility.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["HLinkManID"]);
                omodel.HCurID = DBUtility.ClsPub.isLong(Ds.Tables[0].Rows[0]["HCurID"]);
                omodel.HCurNumber = DBUtility.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["HCurNumber"]);
                //omodel.HCurNumber = DBUtility.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["HCurNumber"]);
                omodel.HExRate = DBUtility.ClsPub.isDoule(Ds.Tables[0].Rows[0]["HExRate"]);
                omodel.HEmpID = DBUtility.ClsPub.isLong(Ds.Tables[0].Rows[0]["HEmpID"]);
                omodel.HEmpNumber = DBUtility.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["HEmpNumber"]);
                //omodel.HEmpNumber = DBUtility.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["HEmpNumber"]);
                omodel.HMangerID = DBUtility.ClsPub.isLong(Ds.Tables[0].Rows[0]["HMangerID"]);
                omodel.HMangerNumber = DBUtility.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["HMangerNumber"]);
                //omodel.HMangerNumber = DBUtility.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["HMangerNumber"]);
                omodel.HDeptID = DBUtility.ClsPub.isLong(Ds.Tables[0].Rows[0]["HDeptID"]);
                omodel.HDeptNumber = DBUtility.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["HDeptNumber"]);
                //omodel.HDeptNumber = DBUtility.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["HDeptNumber"]);
                omodel.HExplanation = DBUtility.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["HExplanation"]);
                omodel.HInnerBillNo = DBUtility.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["HInnerBillNo"]);
                omodel.HInnerBillNo2 = DBUtility.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["HInnerBillNo2"]);
                omodel.HContractName = DBUtility.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["HContractName"]);
                omodel.HQuotationDate = DBUtility.ClsPub.isDate(Ds.Tables[0].Rows[0]["HQuotationDate"]);
                omodel.HCondition = DBUtility.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["HCondition"]);
                omodel.HQuotationStatus = DBUtility.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["HQuotationStatus"]);
                omodel.HSellSID = DBUtility.ClsPub.isLong(Ds.Tables[0].Rows[0]["HSellSID"]);
                omodel.HCarriage = DBUtility.ClsPub.isDoule(Ds.Tables[0].Rows[0]["HCarriage"]);
                omodel.HCommision = DBUtility.ClsPub.isDoule(Ds.Tables[0].Rows[0]["HCommision"]);
                omodel.HSellBonus = DBUtility.ClsPub.isDoule(Ds.Tables[0].Rows[0]["HSellBonus"]);
                omodel.HOtherMoney = DBUtility.ClsPub.isDoule(Ds.Tables[0].Rows[0]["HOtherMoney"]);
                omodel.HExportRemark1 = DBUtility.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["HExportRemark1"]);
                omodel.HExportRemark2 = DBUtility.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["HExportRemark2"]);
                omodel.HPackMoney = DBUtility.ClsPub.isDoule(Ds.Tables[0].Rows[0]["HPackMoney"]);
                omodel.HCarryBillMoney = DBUtility.ClsPub.isDoule(Ds.Tables[0].Rows[0]["HCarryBillMoney"]);
                omodel.HTrailerMoney = DBUtility.ClsPub.isDoule(Ds.Tables[0].Rows[0]["HTrailerMoney"]);
                omodel.HFileMoney = DBUtility.ClsPub.isDoule(Ds.Tables[0].Rows[0]["HFileMoney"]);
                omodel.HORC = DBUtility.ClsPub.isDoule(Ds.Tables[0].Rows[0]["HORC"]);
                omodel.HSurrogateMoney = DBUtility.ClsPub.isDoule(Ds.Tables[0].Rows[0]["HSurrogateMoney"]);
                omodel.HApplyMoney = DBUtility.ClsPub.isDoule(Ds.Tables[0].Rows[0]["HApplyMoney"]);
                omodel.HBuildMoney = DBUtility.ClsPub.isDoule(Ds.Tables[0].Rows[0]["HBuildMoney"]);
                omodel.HProduceAreaCard = DBUtility.ClsPub.isDoule(Ds.Tables[0].Rows[0]["HProduceAreaCard"]);
                omodel.HExportOtherMoney = DBUtility.ClsPub.isDoule(Ds.Tables[0].Rows[0]["HExportOtherMoney"]);
                omodel.HSumMoney = DBUtility.ClsPub.isDoule(Ds.Tables[0].Rows[0]["HSumMoney"]);
                omodel.HArkModel = DBUtility.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["HArkModel"]);
                omodel.HArkQty = DBUtility.ClsPub.isDoule(Ds.Tables[0].Rows[0]["HArkQty"]);
                //omodel.HInnerBillNo = DBUtility.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["HInnerBillNo"]);
                //omodel.HInnerBillNo2 = DBUtility.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["HInnerBillNo2"]);
                //omodel.HContractName = DBUtility.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["HContractName"]);
                //omodel.HQuotationDate = DBUtility.ClsPub.isDate(Ds.Tables[0].Rows[0]["HQuotationDate"]);
                //omodel.HCondition = DBUtility.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["HCondition"]);
                //omodel.HQuotationStatus = DBUtility.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["HQuotationStatus"]);
                //omodel.HSellSID = DBUtility.ClsPub.isLong(Ds.Tables[0].Rows[0]["HSellSID"]);
                //omodel.HCarriage = DBUtility.ClsPub.isDoule(Ds.Tables[0].Rows[0]["HCarriage"]);
                //omodel.HCommision = DBUtility.ClsPub.isDoule(Ds.Tables[0].Rows[0]["HCommision"]);
                //omodel.HSellBonus = DBUtility.ClsPub.isDoule(Ds.Tables[0].Rows[0]["HSellBonus"]);
                //omodel.HOtherMoney = DBUtility.ClsPub.isDoule(Ds.Tables[0].Rows[0]["HOtherMoney"]);
                //omodel.HExportRemark1 = DBUtility.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["HExportRemark1"]);
                //omodel.HExportRemark2 = DBUtility.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["HExportRemark2"]);
                //omodel.HPackMoney = DBUtility.ClsPub.isDoule(Ds.Tables[0].Rows[0]["HPackMoney"]);
                //omodel.HCarryBillMoney = DBUtility.ClsPub.isDoule(Ds.Tables[0].Rows[0]["HCarryBillMoney"]);
                //omodel.HTrailerMoney = DBUtility.ClsPub.isDoule(Ds.Tables[0].Rows[0]["HTrailerMoney"]);
                //omodel.HFileMoney = DBUtility.ClsPub.isDoule(Ds.Tables[0].Rows[0]["HFileMoney"]);
                //omodel.HORC = DBUtility.ClsPub.isDoule(Ds.Tables[0].Rows[0]["HORC"]);
                //omodel.HSurrogateMoney = DBUtility.ClsPub.isDoule(Ds.Tables[0].Rows[0]["HSurrogateMoney"]);
                //omodel.HApplyMoney = DBUtility.ClsPub.isDoule(Ds.Tables[0].Rows[0]["HApplyMoney"]);
                //omodel.HBuildMoney = DBUtility.ClsPub.isDoule(Ds.Tables[0].Rows[0]["HBuildMoney"]);
                //omodel.HProduceAreaCard = DBUtility.ClsPub.isDoule(Ds.Tables[0].Rows[0]["HProduceAreaCard"]);
                //omodel.HExportOtherMoney = DBUtility.ClsPub.isDoule(Ds.Tables[0].Rows[0]["HExportOtherMoney"]);
                //omodel.HSumMoney = DBUtility.ClsPub.isDoule(Ds.Tables[0].Rows[0]["HSumMoney"]);
                //omodel.HArkModel = DBUtility.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["HArkModel"]);
                //omodel.HArkQty = DBUtility.ClsPub.isDoule(Ds.Tables[0].Rows[0]["HArkQty"]);
                //
                omodel.HMaker = Ds.Tables[0].Rows[0]["HMaker"].ToString().Trim();
                omodel.HMakeDate = Ds.Tables[0].Rows[0]["HMakeDate"].ToString().Trim();
@@ -268,26 +291,26 @@
                    oSub.HEntryID = DBUtility.ClsPub.isLong(DsSub.Tables[0].Rows[i]["HEntryID"].ToString());
                    //
                    oSub.HMaterID = DBUtility.ClsPub.isLong(DsSub.Tables[0].Rows[i]["HMaterID"]);
                    oSub.HMaterNumber = DBUtility.ClsPub.isStrNull(DsSub.Tables[0].Rows[i]["HMaterNumber"]);
                    //oSub.HMaterNumber = DBUtility.ClsPub.isStrNull(DsSub.Tables[0].Rows[i]["HMaterNumber"]);
                    oSub.HUnitID = DBUtility.ClsPub.isLong(DsSub.Tables[0].Rows[i]["HUnitID"]);
                    oSub.HUnitNumber = DBUtility.ClsPub.isStrNull(DsSub.Tables[0].Rows[i]["HUnitNumber"]);
                    oSub.HDisposeRate = DBUtility.ClsPub.isDoule(DsSub.Tables[0].Rows[i]["HDisposeRate"]);
                    oSub.HQty = DBUtility.ClsPub.isDoule(DsSub.Tables[0].Rows[i]["HQty"]);
                    oSub.HPrice = DBUtility.ClsPub.isDoule(DsSub.Tables[0].Rows[i]["HPrice"]);
                    oSub.HRelPrice = DBUtility.ClsPub.isDoule(DsSub.Tables[0].Rows[i]["HRelPrice"]);
                    oSub.HRate = DBUtility.ClsPub.isDoule(DsSub.Tables[0].Rows[i]["HRate"]);
                    oSub.HAllMoney = DBUtility.ClsPub.isDoule(DsSub.Tables[0].Rows[i]["HAllMoney"]);
                    oSub.HMoney = DBUtility.ClsPub.isDoule(DsSub.Tables[0].Rows[i]["HMoney"]);
                    oSub.HDate = DBUtility.ClsPub.isDate(DsSub.Tables[0].Rows[i]["HDate"]);
                    oSub.HRemark = DBUtility.ClsPub.isStrNull(DsSub.Tables[0].Rows[i]["HRemark"]);
                    oSub.HType = DBUtility.ClsPub.isStrNull(DsSub.Tables[0].Rows[i]["HType"]);
                    //oSub.HUnitNumber = DBUtility.ClsPub.isStrNull(DsSub.Tables[0].Rows[i]["HUnitNumber"]);
                    //oSub.HDisposeRate = DBUtility.ClsPub.isDoule(DsSub.Tables[0].Rows[i]["HDisposeRate"]);
                    //oSub.HQty = DBUtility.ClsPub.isDoule(DsSub.Tables[0].Rows[i]["HQty"]);
                    //oSub.HPrice = DBUtility.ClsPub.isDoule(DsSub.Tables[0].Rows[i]["HPrice"]);
                    //oSub.HRelPrice = DBUtility.ClsPub.isDoule(DsSub.Tables[0].Rows[i]["HRelPrice"]);
                    //oSub.HRate = DBUtility.ClsPub.isDoule(DsSub.Tables[0].Rows[i]["HRate"]);
                    //oSub.HAllMoney = DBUtility.ClsPub.isDoule(DsSub.Tables[0].Rows[i]["HAllMoney"]);
                    //oSub.HMoney = DBUtility.ClsPub.isDoule(DsSub.Tables[0].Rows[i]["HMoney"]);
                    //oSub.HDate = DBUtility.ClsPub.isDate(DsSub.Tables[0].Rows[i]["HDate"]);
                    //oSub.HRemark = DBUtility.ClsPub.isStrNull(DsSub.Tables[0].Rows[i]["HRemark"]);
                    //oSub.HType = DBUtility.ClsPub.isStrNull(DsSub.Tables[0].Rows[i]["HType"]);
                    //
                    oSub.HSourceInterID = DBUtility.ClsPub.isStrNull(DsSub.Tables[0].Rows[i]["HSourceInterID"].ToString());
                    oSub.HSourceEntryID = DBUtility.ClsPub.isStrNull(DsSub.Tables[0].Rows[i]["HSourceEntryID"].ToString());
                    oSub.HSourceBillType = DsSub.Tables[0].Rows[i]["HSourceBillType"].ToString().Trim();
                    oSub.HSourceBillNo = DsSub.Tables[0].Rows[i]["HSourceBillNo"].ToString().Trim();
                    oSub.HRelationQty = DBUtility.ClsPub.isDoule(DsSub.Tables[0].Rows[i]["HRelationQty"].ToString());
                    oSub.HRelationMoney = DBUtility.ClsPub.isDoule(DsSub.Tables[0].Rows[i]["HRelationMoney"].ToString());
                    //oSub.HRelationQty = DBUtility.ClsPub.isDoule(DsSub.Tables[0].Rows[i]["HRelationQty"].ToString());
                    //oSub.HRelationMoney = DBUtility.ClsPub.isDoule(DsSub.Tables[0].Rows[i]["HRelationMoney"].ToString());
                    DetailColl.Add(oSub);
                }
                sReturn = "显示单据成功!";
@@ -332,7 +355,7 @@
                omodel.HRemark = DBUtility.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["HRemark"]);
                omodel.HCusID = DBUtility.ClsPub.isLong(Ds.Tables[0].Rows[0]["HCusID"]);
                omodel.HCusNumber = DBUtility.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["HCusNumber"]);
                omodel.HLinkManID = DBUtility.ClsPub.isLong(Ds.Tables[0].Rows[0]["HLinkManID"]);
                omodel.HLinkManID = DBUtility.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["HLinkManID"]);
                omodel.HCurID = DBUtility.ClsPub.isLong(Ds.Tables[0].Rows[0]["HCurID"]);
                omodel.HCurNumber = DBUtility.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["HCurNumber"]);
                omodel.HExRate = DBUtility.ClsPub.isDoule(Ds.Tables[0].Rows[0]["HExRate"]);
DBUtility/ÒµÎñµ¥¾Ý/ClsXt_BaseBill.cs
@@ -112,6 +112,67 @@
                throw (e);
            }
        }
        //反作废(包含作废后控制、写入日志)    2025-03-10
        public bool AbandonCancelltion(Int64 lngBillKey, string HBillNo, string procName, string sUser, ref string sReturn)
        {
            string sql = "";
            if (isUse(lngBillKey, ref sReturn))
            {
                return false;
            }
            try
            {
                //开启事务
                oCn.BeginTran();
                DataSet ds = oCn.RunProcReturn("select * from " + MvarItemKey + " where HInterID=" + lngBillKey.ToString(), MvarItemKey);
                if (ds.Tables[0].Rows[0]["HCloseMan"].ToString() != "")
                {
                    oCn.RunProc(" Update " + MvarItemKey + " set HDeleteMan='',HDeleteDate=null,HBillStatus=3 Where HInterID=" + lngBillKey.ToString());
                }
                else if (ds.Tables[0].Rows[0]["HChecker"].ToString() != "")
                {
                    oCn.RunProc(" Update " + MvarItemKey + " set HDeleteMan='',HDeleteDate=null,HBillStatus=2 Where HInterID=" + lngBillKey.ToString());
                }
                else
                {
                    oCn.RunProc(" Update " + MvarItemKey + " set HDeleteMan='',HDeleteDate=null,HBillStatus=1 Where HInterID=" + lngBillKey.ToString());
                }
                //作废后控制
                sql = "exec " + procName + " " + lngBillKey + ",'" + HBillNo + "','" + sUser + "'";
                ds = oCn.RunProcReturn(sql, procName);
                if (ds == null || ds.Tables.Count == 0 || ds.Tables[0].Rows.Count == 0)
                {
                    sReturn = "反作废过程中出错,请与网络管理人员联系";
                    oCn.RollBack();
                    return false;
                }
                if (ds.Tables[0].Rows[0]["HBack"].ToString() != "0")
                {
                    sReturn = ds.Tables[0].Rows[0]["HRemark"].ToString();
                    oCn.RollBack();
                    return false;
                }
                //写入日志
                string WorkList = "反作废单据,单据号:" + HBillNo;
                string SystemName = "LMES-" + MvarReportTitle + "模块";
                oCn.RunProc("Insert into  System_Log(GeginDate,userid,WorkstationName,WorkList,SystemName,NetUserName,State) values " +
                    "(getdate(),'" + sUser + "','" + ComputerName + "','" + WorkList + "','" + SystemName + "','" + IPAddress + "','反作废')"
                    );
                sReturn = "反作废单据成功!"; ;
                oCn.Commit();
                return true;
            }
            catch (Exception e)
            {
                oCn.RollBack();
                sReturn = e.Message;
                throw (e);
            }
        }
        //反关闭
        public bool CancelClose(Int64 lngBillKey, ref string sReturn)
        {
@@ -1004,6 +1065,57 @@
                throw (e);
            }
        }
        //作废(包含作废后控制、写入日志)    2025-03-10
        public bool Cancelltion(Int64 lngBillKey, string HBillNo, string procName, string sUser, ref string sReturn)
        {
            string sql = "";
            DataSet ds;
            if (isUse(lngBillKey, ref sReturn))
            {
                return false;
            }
            try
            {
                //开启事务
                oCn.BeginTran();
                string HDeleteMan = sUser;
                string HDeleteDate = ClsPub.GetServerDate(-1);
                oCn.RunProc(" Update " + MvarItemKey + " set HDeleteMan='" + HDeleteMan + "',HDeleteDate='" + HDeleteDate + "',HBillStatus=4 Where HInterID=" + lngBillKey.ToString());
                //作废后控制
                sql = "exec " + procName + " " + lngBillKey + ",'" + HBillNo + "','" + sUser + "'";
                ds = oCn.RunProcReturn(sql, procName);
                if (ds == null || ds.Tables.Count == 0 || ds.Tables[0].Rows.Count == 0)
                {
                    sReturn = "作废过程中出错,请与网络管理人员联系";
                    oCn.RollBack();
                    return false;
                }
                if (ds.Tables[0].Rows[0]["HBack"].ToString() != "0")
                {
                    sReturn = ds.Tables[0].Rows[0]["HRemark"].ToString();
                    oCn.RollBack();
                    return false;
                }
                //写入日志
                string WorkList = "作废单据,单据号:" + HBillNo;
                string SystemName = "LMES-" + MvarReportTitle + "模块";
                oCn.RunProc("Insert into  System_Log(GeginDate,userid,WorkstationName,WorkList,SystemName,NetUserName,State) values " +
                    "(getdate(),'" + sUser + "','" + ComputerName + "','" + WorkList + "','" + SystemName + "','" + IPAddress + "','作废')"
                    );
                sReturn = "作废单据成功!";
                oCn.Commit();
                return true;
            }
            catch (Exception e)
            {
                oCn.RollBack();
                sReturn = e.Message;
                throw (e);
            }
        }
        //保养计划删除子表1
        public void DeleteBillSub(Int64 lngBillKey)
        {
Model/ClsGy_MaterialMouldBillSub.cs
@@ -10,5 +10,8 @@
        public Int64 HMouldQty;
        public decimal HQty;
        public decimal HRate;
        public string HMouldType; //器具类别
        public string HMouldPriority; //器具优先级
        public Int64 HCubicleQty; //占用工位数
    }
}
Model/Model.csproj
@@ -1088,6 +1088,8 @@
    <Compile Include="销售管理\ClsXs_SellPlanExecuteBillMain.cs" />
    <Compile Include="销售管理\ClsXs_SellPlanExecuteBillSub.cs" />
    <Compile Include="销售管理\ClsXs_OutDoorCheckBillMain.cs" />
    <Compile Include="销售管理\ClsCrm_ComplainVisitBillMain.cs" />
    <Compile Include="销售管理\ClsCrm_ComplainVisitBillSub.cs" />
    <Compile Include="销售管理\ClsXs_SeQuotation_ccjgBillMain.cs" />
    <Compile Include="销售管理\ClsXs_SeQuotation_ccjgBillSub.cs" />
    <Compile Include="销售管理\ClsXs_SeDownStockBillMain.cs" />
Model/»ù´¡×ÊÁÏ/ÆäËû»ù´¡×ÊÁÏ/ClsGy_QCCheckProjectMain.cs
@@ -18,5 +18,6 @@
        public Int64 HDeptID;
        public Int64 HSampleSchemeID;
        public Int64 HSourceID;
        public Int64 HOrgID;
    }
}
Model/»ù´¡×ÊÁÏ/»ù´¡×ÊÁÏ/ClsGy_Source_Model.cs
@@ -25,5 +25,7 @@
        public int HUSEORGID;
        public int HEmpID; //负责人
        public string HMacAddr; //mac地址
        public int HCubicleQty; //工位数量
        public int HProdLinePeopleNum; //产线标准人数
    }
}
Model/Éú²ú¹ÜÀí/Ä£¾ß¹ÜÀí/ClsSc_MouldMaintainRuleBillMain.cs
@@ -16,5 +16,7 @@
        public Int64 HSafeDays; //保养安全天数
        public Int64 HErrWarDays; //保养预警天数
        public Int64 HErrWarQtys; //保养预警次数
        public Int64 HUSEORGID; //使用组织
        public Int64 HCREATEORGID; //创建组织
    }
}
Model/Öʼì¹ÜÀí/ClsGy_EnvironmentTestSchemeBillMain.cs
@@ -10,6 +10,6 @@
        public Int64 HDeptID;          //int ---生产部门(Gy_Department)
        public Int64 HCenterWorkID;          //int --工作中心(Gy_WorkCenter)
        public Int64 HProcID;          //int --工序(gy_Process)
        public int HOrgID;
    }
}
Model/³µ¼ä¹ÜÀí/ClsGy_MaterPreventErrMouldBillMain.cs
@@ -9,6 +9,6 @@
     
        public Int64 HMaterID;          //int ---物料(gy_Material)
        public Int64 HProcID;          //int --工序(gy_Process)
        public int HOrgID;
    }
}
Model/³µ¼ä¹ÜÀí/ClsGy_WorkBeginDotCheckListBillMain.cs
@@ -11,5 +11,6 @@
        public Int64 HSourceID;  // int --生产资源(gy_Source)     
        public Int64 HProcID;    //int --工序(gy_Process)
        public string HNote;        // varchar(500) --记录事项
        public int HOrgID;
    }
}
Model/ÏúÊÛ¹ÜÀí/ClsCrm_ComplainVisitBillMain.cs
New file
@@ -0,0 +1,24 @@
using System;
using System.Collections.Generic;
using System.Text;
namespace Model
{
    public class ClsCrm_ComplainVisitBillMain : DBUtility.ClsXt_BaseBillMain
    {
        public long HCusID;//    int                --客户 (Gy_Customer)
        public long HVisitEmpID;//     int                   --业务员  (Gy_Employee)
        public long HDeptID;//     int                 --部门    (Gy_Employee)
        public DateTime HBeginTime ;
        public DateTime HEndTime ;
        public string HCusAddr ;
        public string HComplainTopic ;
        public string HComplainType ;
        public string HComplainEmp ;
        public string HLinkPhone ;
        public string HGrade ;
        public string HVisitResult ;
        public string HCusFeedback ;
        public int HOrgID;
    }
}
Model/ÏúÊÛ¹ÜÀí/ClsCrm_ComplainVisitBillSub.cs
New file
@@ -0,0 +1,10 @@
using System;
using System.Collections.Generic;
using System.Text;
namespace Model
{
    public class ClsCrm_ComplainVisitBillSub : DBUtility.ClsXt_BaseBillSub
    {
    }
}
Model/ÏúÊÛ¹ÜÀí/ClsXs_SeQuotationBillMain.cs
@@ -8,7 +8,7 @@
    {
        public long HCusID;//    int                --客户 (Gy_Customer)
        public string HCusNumber;
        public long HLinkManID;//    int            --联系人(Crm_LinkManBillMain)
        public string HLinkManID;//    int            --联系人(Crm_LinkManBillMain)
        public long HCurID;//    int                  --币别 (Gy_Currency)
        public string HCurNumber;
        public double HExRate;//    money                  --汇率  (选择完币别带出)
@@ -48,5 +48,7 @@
        public double HSumMoney;//        money        --合计
        public string HArkModel;//        varchar(50)    --柜型
        public double HArkQty;//            money        --柜数
        public int HOrgID;
    }
}
SyntacticSugar/obj/Debug/SyntacticSugar.csproj.FileListAbsolute.txt
@@ -3,4 +3,10 @@
C:\Users\86130\Desktop\智云迈思\MES-WEB-API\SyntacticSugar\obj\Debug\SyntacticSugar.csproj.CoreCompileInputs.cache
C:\Users\86130\Desktop\智云迈思\MES-WEB-API\SyntacticSugar\obj\Debug\SyntacticSugar.dll
C:\Users\86130\Desktop\智云迈思\MES-WEB-API\SyntacticSugar\obj\Debug\SyntacticSugar.pdb
D:\工作代码\智云迈思\MES\MES-WEB-API\SyntacticSugar\bin\Debug\SyntacticSugar.dll
D:\工作代码\智云迈思\MES\MES-WEB-API\SyntacticSugar\bin\Debug\SyntacticSugar.pdb
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
D:\工作代码\智云迈思\MES\MES-WEB-API\SyntacticSugar\obj\Debug\SyntacticSugar.csproj.AssemblyReference.cache
C:\Users\86130\Desktop\智云迈思\MES-WEB-API\SyntacticSugar\obj\Debug\SyntacticSugar.csproj.AssemblyReference.cache
WebAPI/Controllers/BaseSet/Gy_ProcessController.cs
@@ -736,6 +736,7 @@
                long HWHID = list[0].HWHID; //良品仓库
                string HMakeEmp = user;
                string HPayMentType = list[0].HPayMentType; //计件工资类型
                decimal HStandardWages = list[0].HStandardWages; //标准工价
                //判断权限
@@ -801,14 +802,15 @@
                         ",HLevel,HEndFlag,HStopflag,HRemark,HDeptID,HBarCodeForBase,HProcessID_K3,HBillSubType,HAutoTrunFlag" +
                         ",HFixPrice,HOverFixPrice,HProcMulID,HProcCheckNote" +
                         ",HUSEORGID,HCREATEORGID,HWorkCenterID,HBadWHID,HWasterWHID,HBadCountDevelopWHID,HWWBadWHID,HWWWasterWHID,HWHID,HTProcessFlag" +
                         ",HQCSchemeID_Fst,HQCSchemeID_Proc,HQCSchemeID_Patrol,HPayMentType,HMakeTime,HMakeEmp) " +
                         ",HQCSchemeID_Fst,HQCSchemeID_Proc,HQCSchemeID_Patrol,HPayMentType,HMakeTime,HMakeEmp,HStandardWages) " +
                         " Values('" + HNumber + "','" + HName + "','" + HHelpCode + "','" + HShortNumber + "'," + HParentID.ToString() +
                         "," + Convert.ToString(HTypeFlow ? 1 : 0) + "," + Convert.ToString(HTypeCount ? 1 : 0) + ",'" + HDeptNumber + "','" + HSNo.ToString() + "','" + HUseFlag.ToString() +
                         "'," + HLevel.ToString() + "," + Convert.ToString(HEndFlag ? 1 : 0) + "," + Convert.ToString(HStopflag ? 1 : 0) + ",'" + HRemark + "'," + HDeptID +
                         ",'" + HBarCodeForBase + "'," + HProcessID_K3 + ",'" + HBillSubType + "'," + Convert.ToString(HAutoTrunFlag ? 1 : 0) +
                         ",'" + HFixPrice.ToString() + "'," + HOverFixPrice.ToString() + "," + HProcMulID.ToString() + ",'" + HProcCheckNote.ToString() + "'" +
                         "," + HUSEORGID + "," + HCREATEORGID + "," + HWorkCenterID + "," + HBadWHID + "," + HWasterWHID + "," + HBadCountDevelopWHID + "," + HWWBadWHID + "," + HWWWasterWHID + "," + HWHID + "," + Convert.ToString(HTProcessFlag ? 1 : 0) + "," + HQCSchemeID_Fst + "," + HQCSchemeID_Proc + "," + HQCSchemeID_Patrol
                         + ",'" + HPayMentType + "',getdate(),'" + HMakeEmp + "'" + ")", ref DBUtility.ClsPub.sExeReturnInfo);
                         + ",'" + HPayMentType + "',getdate(),'" + HMakeEmp + "'," + HStandardWages + ")", ref DBUtility.ClsPub.sExeReturnInfo);
                    //修改上级为非末级代码
                    oCN.RunProc("Update Gy_Process set HEndflag=0 where HItemID=" + HParentID, ref DBUtility.ClsPub.sExeReturnInfo);
@@ -878,7 +880,7 @@
                        ",HTypeCount= '" + HTypeCount + "'" +
                        ",HDeptNumber='" + HDeptNumber + "'" +
                        ",HSNo= " + HSNo +
                         ",HUseFlag= " + HUseFlag +
                        ",HUseFlag= '" + HUseFlag + "'" +
                        ",HLevel= " + HLevel +
                        ",HEndFlag= '" + HEndFlag + "'" +
                        ",HTProcessFlag= '" + HTProcessFlag + "'" +
@@ -905,6 +907,7 @@
                        ",HQCSchemeID_Proc= " + HQCSchemeID_Proc +
                        ",HQCSchemeID_Patrol= " + HQCSchemeID_Patrol +
                        ",HPayMentType= '" + HPayMentType + "'" +
                        ",HStandardWages= " + HStandardWages +
                        ",HModifyTime= getdate()" +
                        ",HModifyEmp='" + HMakeEmp + "'" +
                        ",HProcCheckNote='" + HProcCheckNote + "' Where HItemID=" + HItemID, ref DBUtility.ClsPub.sExeReturnInfo);
WebAPI/Controllers/CJGL/Gy_MaterPreventErrMouldBillController.cs
@@ -20,6 +20,7 @@
        public DBUtility.ClsPub.Enum_BillStatus BillStatus;//单据状态(新增,修改,浏览,更新单价,变更)
        private json objJsonResult = new json();
        public DataSet ds = new DataSet();
        public DataSet ds1 = new DataSet();
        SQLHelper.ClsCN oCN = new SQLHelper.ClsCN();
        public DAL.ClsGy_MaterPreventErrMouldBillMain OBill = new DAL.ClsGy_MaterPreventErrMouldBillMain();
        public DAL.ClsGy_MaterPreventErrMouldBillMain BillOld = new DAL.ClsGy_MaterPreventErrMouldBillMain();
@@ -373,9 +374,53 @@
                oCN.BeginTran();
                oCN.RunProc("delete from Gy_MaterPreventErrMouldBillMain where HInterID = " + HInterID);
                //判断存在性
                if (BillOld.ShowBill(Int64.Parse(HInterID), ref DBUtility.ClsPub.sExeReturnInfo))
                {
                    //删除前控制=========================================
                    string sql1 = "exec h_p_Gy_MaterPreventErrMouldBill_BeforeDelCtrl  " + BillOld.omodel.HInterID + ",'" + BillOld.omodel.HBillNo + "','" + user + "'";
                    ds = oCN.RunProcReturn(sql1, "h_p_Gy_MaterPreventErrMouldBill_BeforeDelCtrl");
                    if (ds == null || ds.Tables.Count == 0 || ds.Tables[0].Rows.Count == 0)
                    {
                        objJsonResult.code = "0";
                        objJsonResult.count = 1;
                        objJsonResult.Message = "删除失败!原因:删除前判断失败,请与网络管理人员联系";
                        objJsonResult.data = null;
                        return objJsonResult;
                    }
                    if (ds.Tables[0].Rows[0]["HBack"].ToString() != "0")
                    {
                        objJsonResult.code = "0";
                        objJsonResult.count = 1;
                        objJsonResult.Message = "删除失败!原因:" + ds.Tables[0].Rows[0]["HRemark"].ToString(); ;
                        objJsonResult.data = null;
                        return objJsonResult;
                    }
                    //==================================================================================
                    //删除单据(包含删除后控制、写入日志)
                    if (!BillOld.DeleteBill(BillOld.omodel.HInterID, BillOld.omodel.HBillNo, "h_p_Gy_MaterPreventErrMouldBill_AfterDelCtrl", user, ref ClsPub.sExeReturnInfo))
                    {
                        objJsonResult.code = "0";
                        objJsonResult.count = 0;
                        objJsonResult.Message = "删除失败!原因:" + ClsPub.sExeReturnInfo;
                        objJsonResult.data = null;
                        return objJsonResult;
                    }
                    else
                    {
                        objJsonResult.code = "0";
                        objJsonResult.count = 1;
                        objJsonResult.Message = "删除成功!";
                        objJsonResult.data = null;
                        return objJsonResult;
                    }
                }
                oCN.Commit();
                objJsonResult.code = "1";
                objJsonResult.count = 1;
@@ -428,7 +473,6 @@
                if (Type == 1)
                {
                    //判断单据是否已经审核
                    DataSet ds;
                    string sql = "select * from " + BillOld.MvarItemKey + " where HinterID = " + HInterID;
                    ds = oCN.RunProcReturn(sql, BillOld.MvarItemKey);
                    if (ds == null || ds.Tables[0].Rows.Count == 0)
@@ -465,8 +509,32 @@
                            objJsonResult.data = null;
                            return objJsonResult;
                        }
                        //审核前控制=========================================
                        string sql1 = "exec h_p_Gy_MaterPreventErrMouldBill_BeforeCheckCtrl " + HInterID + ",'" + ds.Tables[0].Rows[0]["HBillNo"].ToString() + "','" + user + "'";
                        ds1 = oCN.RunProcReturn(sql1, "h_p_Gy_MaterPreventErrMouldBill_BeforeCheckCtrl");
                        if (ds1 == null || ds1.Tables.Count == 0 || ds1.Tables[0].Rows.Count == 0)
                        {
                            objJsonResult.code = "0";
                            objJsonResult.count = 1;
                            objJsonResult.Message = "审核失败!原因:审核前判断失败,请与网络管理人员联系";
                            objJsonResult.data = null;
                            oCN.RollBack();
                            return objJsonResult;
                        }
                        if (ds1.Tables[0].Rows[0]["HBack"].ToString() != "0")
                        {
                            objJsonResult.code = "0";
                            objJsonResult.count = 1;
                            objJsonResult.Message = "审核失败!原因:" + ds1.Tables[0].Rows[0]["HRemark"].ToString(); ;
                            objJsonResult.data = null;
                            oCN.RollBack();
                            return objJsonResult;
                        }
                        //==================================================================================
                        //审核单据
                        if (!BillOld.CheckBill(Int64.Parse(HInterID), ref ClsPub.sExeReturnInfo))
                        if (!BillOld.CheckBill(Int64.Parse(HInterID), ds.Tables[0].Rows[0]["HBillNo"].ToString(), "h_p_Gy_MaterPreventErrMouldBill_AfterCheckCtrl", user, ref ClsPub.sExeReturnInfo))
                        {
                            objJsonResult.code = "0";
                            objJsonResult.count = 1;
@@ -479,7 +547,6 @@
                else
                {
                    //判断单据是否已经反审核
                    DataSet ds;
                    string sql = "select * from " + BillOld.MvarItemKey + " where HinterID = " + HInterID;
                    ds = oCN.RunProcReturn(sql, BillOld.MvarItemKey);
                    if (ds.Tables[0] != null && ds.Tables[0].Rows.Count > 0)
@@ -508,8 +575,29 @@
                            objJsonResult.data = null;
                            return objJsonResult;
                        }
                        //反审核前控制=========================================
                        string sql1 = "exec h_p_Gy_MaterPreventErrMouldBill_BeforeUnCheckCtrl " + HInterID + ",'" + ds.Tables[0].Rows[0]["HBillNo"].ToString() + "','" + user + "'";
                        ds1 = oCN.RunProcReturn(sql1, "h_p_Gy_MaterPreventErrMouldBill_BeforeUnCheckCtrl");
                        if (ds1 == null || ds1.Tables.Count == 0 || ds1.Tables[0].Rows.Count == 0)
                        {
                            objJsonResult.code = "0";
                            objJsonResult.count = 1;
                            objJsonResult.Message = "反审核失败!原因:反审核前判断失败,请与网络管理人员联系";
                            objJsonResult.data = null;
                            return objJsonResult;
                        }
                        if (ds1.Tables[0].Rows[0]["HBack"].ToString() != "0")
                        {
                            objJsonResult.code = "0";
                            objJsonResult.count = 1;
                            objJsonResult.Message = "反审核失败!原因:" + ds1.Tables[0].Rows[0]["HRemark"].ToString(); ;
                            objJsonResult.data = null;
                            return objJsonResult;
                        }
                        //===========================================================
                        //反审核单据
                        if (!BillOld.AbandonCheck(Int64.Parse(HInterID), ref ClsPub.sExeReturnInfo))
                        if (!BillOld.AbandonCheck(Int64.Parse(HInterID), ds.Tables[0].Rows[0]["HBillNo"].ToString(), "h_p_Gy_MaterPreventErrMouldBill_AfterUnCheckCtrl", user, ref ClsPub.sExeReturnInfo))
                        {
                            objJsonResult.code = "0";
                            objJsonResult.count = 1;
@@ -721,7 +809,6 @@
                if (Type == 1)
                {
                    //判断单据是否已经作废
                    DataSet ds;
                    string sql = "select * from " + BillOld.MvarItemKey + " where HinterID = " + HInterID;
                    ds = oCN.RunProcReturn(sql, BillOld.MvarItemKey);
                    if (ds == null || ds.Tables[0].Rows.Count == 0)
@@ -750,8 +837,31 @@
                            objJsonResult.data = null;
                            return objJsonResult;
                        }
                        //作废前控制=========================================
                        string sql1 = "exec h_p_Gy_MaterPreventErrMouldBill_BeforeDropCtrl " + HInterID + ",'" + ds.Tables[0].Rows[0]["HBillNo"].ToString() + "','" + user + "'";
                        ds1 = oCN.RunProcReturn(sql1, "h_p_Gy_MaterPreventErrMouldBill_BeforeDropCtrl");
                        if (ds1 == null || ds1.Tables.Count == 0 || ds1.Tables[0].Rows.Count == 0)
                        {
                            objJsonResult.code = "0";
                            objJsonResult.count = 1;
                            objJsonResult.Message = "审核失败!原因:审核前判断失败,请与网络管理人员联系";
                            objJsonResult.data = null;
                            oCN.RollBack();
                            return objJsonResult;
                        }
                        if (ds1.Tables[0].Rows[0]["HBack"].ToString() != "0")
                        {
                            objJsonResult.code = "0";
                            objJsonResult.count = 1;
                            objJsonResult.Message = "审核失败!原因:" + ds1.Tables[0].Rows[0]["HRemark"].ToString(); ;
                            objJsonResult.data = null;
                            oCN.RollBack();
                            return objJsonResult;
                        }
                        //==================================================================================
                        //作废单据
                        if (!BillOld.Cancelltion(Int64.Parse(HInterID), ref ClsPub.sExeReturnInfo))
                        if (!BillOld.Cancelltion(Int64.Parse(HInterID), ds.Tables[0].Rows[0]["HBillNo"].ToString(), "h_p_Gy_MaterPreventErrMouldBill_AfterDropCtrl", user, ref ClsPub.sExeReturnInfo))
                        {
                            objJsonResult.code = "0";
                            objJsonResult.count = 1;
@@ -764,7 +874,6 @@
                else
                {
                    //判断单据是否已经反作废
                    DataSet ds;
                    string sql = "select * from " + BillOld.MvarItemKey + " where HinterID = " + HInterID;
                    ds = oCN.RunProcReturn(sql, BillOld.MvarItemKey);
                    if (ds.Tables[0] != null && ds.Tables[0].Rows.Count > 0)
@@ -785,8 +894,31 @@
                            objJsonResult.data = null;
                            return objJsonResult;
                        }
                        //反作废前控制=========================================
                        string sql1 = "exec h_p_Gy_MaterPreventErrMouldBill_BeforeUnDropCtrl " + HInterID + ",'" + ds.Tables[0].Rows[0]["HBillNo"].ToString() + "','" + user + "'";
                        ds1 = oCN.RunProcReturn(sql1, "h_p_Gy_MaterPreventErrMouldBill_BeforeUnDropCtrl");
                        if (ds1 == null || ds1.Tables.Count == 0 || ds1.Tables[0].Rows.Count == 0)
                        {
                            objJsonResult.code = "0";
                            objJsonResult.count = 1;
                            objJsonResult.Message = "作废失败!原因:反作废前判断失败,请与网络管理人员联系";
                            objJsonResult.data = null;
                            oCN.RollBack();
                            return objJsonResult;
                        }
                        if (ds1.Tables[0].Rows[0]["HBack"].ToString() != "0")
                        {
                            objJsonResult.code = "0";
                            objJsonResult.count = 1;
                            objJsonResult.Message = "作废失败!原因:" + ds1.Tables[0].Rows[0]["HRemark"].ToString(); ;
                            objJsonResult.data = null;
                            oCN.RollBack();
                            return objJsonResult;
                        }
                        //==================================================================================
                        //反作废单据
                        if (!BillOld.AbandonCancelltion(Int64.Parse(HInterID), ref ClsPub.sExeReturnInfo))
                        if (!BillOld.AbandonCancelltion(Int64.Parse(HInterID), ds.Tables[0].Rows[0]["HBillNo"].ToString(), "h_p_Gy_MaterPreventErrMouldBill_AfterDropCtrl", user, ref ClsPub.sExeReturnInfo))
                        {
                            objJsonResult.code = "0";
                            objJsonResult.count = 1;
WebAPI/Controllers/CJGL/Sc_WorkBeginDotCheckBillController.cs
@@ -20,11 +20,13 @@
        public DBUtility.ClsPub.Enum_BillStatus BillStatus;//单据状态(新增,修改,浏览,更新单价,变更)
        private json objJsonResult = new json();
        public DataSet ds = new DataSet();
        public DataSet ds1 = new DataSet();
        SQLHelper.ClsCN oCN = new SQLHelper.ClsCN();
        public DAL.ClsSc_WorkBeginDotCheckBillMain OBill = new DAL.ClsSc_WorkBeginDotCheckBillMain();   //启动点检单
        public DAL.ClsSc_WorkBeginDotCheckBillMain BillOld = new DAL.ClsSc_WorkBeginDotCheckBillMain();//启动点检单
        public DAL.ClsGy_WorkBeginDotCheckListBillMain OBill1 = new DAL.ClsGy_WorkBeginDotCheckListBillMain();  //设备启动点检清单
        public DAL.ClsGy_WorkBeginDotCheckListBillMain BillOld1 = new DAL.ClsGy_WorkBeginDotCheckListBillMain(); //设备启动点检清单
        #region å¯åŠ¨ç‚¹æ£€åˆ—è¡¨ æŸ¥è¯¢       
@@ -1154,11 +1156,51 @@
                    objJsonResult.data = null;
                    return objJsonResult;
                }
                oCN.BeginTran();
                //判断存在性
                if (BillOld1.ShowBill(Int64.Parse(HInterID), ref DBUtility.ClsPub.sExeReturnInfo))
                {
                    //删除前控制=========================================
                    string sql1 = "exec h_p_Gy_WorkBeginDotCheckListBill_BeforeDelCtrl  " + BillOld1.omodel.HInterID + ",'" + BillOld1.omodel.HBillNo + "','" + user + "'";
                    ds = oCN.RunProcReturn(sql1, "h_p_Gy_WorkBeginDotCheckListBill_BeforeDelCtrl");
                    if (ds == null || ds.Tables.Count == 0 || ds.Tables[0].Rows.Count == 0)
                    {
                        objJsonResult.code = "0";
                        objJsonResult.count = 1;
                        objJsonResult.Message = "删除失败!原因:删除前判断失败,请与网络管理人员联系";
                        objJsonResult.data = null;
                        return objJsonResult;
                    }
                oCN.RunProc("delete from Gy_WorkBeginDotCheckListBillMain where HInterID = " + HInterID);
                oCN.RunProc("delete from Gy_WorkBeginDotCheckListBillSub where HInterID = " + HInterID);
                    if (ds.Tables[0].Rows[0]["HBack"].ToString() != "0")
                    {
                        objJsonResult.code = "0";
                        objJsonResult.count = 1;
                        objJsonResult.Message = "删除失败!原因:" + ds.Tables[0].Rows[0]["HRemark"].ToString(); ;
                        objJsonResult.data = null;
                        return objJsonResult;
                    }
                    //==================================================================================
                    //删除单据(包含删除后控制、写入日志)
                    if (!BillOld1.DeleteBill(BillOld1.omodel.HInterID, BillOld1.omodel.HBillNo, "h_p_Gy_WorkBeginDotCheckListBill_AfterDelCtrl", user, ref ClsPub.sExeReturnInfo))
                    {
                        objJsonResult.code = "0";
                        objJsonResult.count = 0;
                        objJsonResult.Message = "删除失败!原因:" + ClsPub.sExeReturnInfo;
                        objJsonResult.data = null;
                        return objJsonResult;
                    }
                    else
                    {
                        objJsonResult.code = "0";
                        objJsonResult.count = 1;
                        objJsonResult.Message = "删除成功!";
                        objJsonResult.data = null;
                        return objJsonResult;
                    }
                }
                oCN.Commit();
@@ -1213,7 +1255,7 @@
                if (Type == 1)
                {
                    //判断单据是否已经审核
                    DataSet ds;
                    string sql = "select * from " + BillOld.MvarItemKey + " where HinterID = " + HInterID;
                    ds = oCN.RunProcReturn(sql, BillOld.MvarItemKey);
                    if (ds == null || ds.Tables[0].Rows.Count == 0)
@@ -1250,8 +1292,32 @@
                            objJsonResult.data = null;
                            return objJsonResult;
                        }
                        //审核前控制=========================================
                        string sql1 = "exec h_p_Gy_WorkBeginDotCheckListBill_BeforeCheckCtrl " + HInterID + ",'" + ds.Tables[0].Rows[0]["HBillNo"].ToString() + "','" + user + "'";
                        ds1 = oCN.RunProcReturn(sql1, "h_p_Gy_WorkBeginDotCheckListBill_BeforeCheckCtrl");
                        if (ds1 == null || ds1.Tables.Count == 0 || ds1.Tables[0].Rows.Count == 0)
                        {
                            objJsonResult.code = "0";
                            objJsonResult.count = 1;
                            objJsonResult.Message = "审核失败!原因:审核前判断失败,请与网络管理人员联系";
                            objJsonResult.data = null;
                            oCN.RollBack();
                            return objJsonResult;
                        }
                        if (ds1.Tables[0].Rows[0]["HBack"].ToString() != "0")
                        {
                            objJsonResult.code = "0";
                            objJsonResult.count = 1;
                            objJsonResult.Message = "审核失败!原因:" + ds1.Tables[0].Rows[0]["HRemark"].ToString(); ;
                            objJsonResult.data = null;
                            oCN.RollBack();
                            return objJsonResult;
                        }
                        //==================================================================================
                        //审核单据
                        if (!BillOld.CheckBill(Int64.Parse(HInterID), ref ClsPub.sExeReturnInfo))
                        if (!BillOld.CheckBill(Int64.Parse(HInterID), ds.Tables[0].Rows[0]["HBillNo"].ToString(), "h_p_Gy_WorkBeginDotCheckListBill_AfterCheckCtrl",user, ref ClsPub.sExeReturnInfo))
                        {
                            objJsonResult.code = "0";
                            objJsonResult.count = 1;
@@ -1263,8 +1329,7 @@
                }
                else
                {
                    //判断单据是否已经反审核
                    DataSet ds;
                    //判断单据是否已经反审核
                    string sql = "select * from " + BillOld.MvarItemKey + " where HinterID = " + HInterID;
                    ds = oCN.RunProcReturn(sql, BillOld.MvarItemKey);
                    if (ds.Tables[0] != null && ds.Tables[0].Rows.Count > 0)
@@ -1293,8 +1358,29 @@
                            objJsonResult.data = null;
                            return objJsonResult;
                        }
                        //反审核单据
                        if (!BillOld.AbandonCheck(Int64.Parse(HInterID), ref ClsPub.sExeReturnInfo))
                        //反审核前控制=========================================
                        string sql1 = "exec h_p_Gy_WorkBeginDotCheckListBill_BeforeUnCheckCtrl " + HInterID + ",'" + ds.Tables[0].Rows[0]["HBillNo"].ToString() + "','" + user + "'";
                        ds1 = oCN.RunProcReturn(sql1, "h_p_Gy_WorkBeginDotCheckListBill_BeforeUnCheckCtrl");
                        if (ds1 == null || ds1.Tables.Count == 0 || ds1.Tables[0].Rows.Count == 0)
                        {
                            objJsonResult.code = "0";
                            objJsonResult.count = 1;
                            objJsonResult.Message = "反审核失败!原因:反审核前判断失败,请与网络管理人员联系";
                            objJsonResult.data = null;
                            return objJsonResult;
                        }
                        if (ds1.Tables[0].Rows[0]["HBack"].ToString() != "0")
                        {
                            objJsonResult.code = "0";
                            objJsonResult.count = 1;
                            objJsonResult.Message = "反审核失败!原因:" + ds1.Tables[0].Rows[0]["HRemark"].ToString(); ;
                            objJsonResult.data = null;
                            return objJsonResult;
                        }
                        //===========================================================
                            //反审核单据
                        if (!BillOld.AbandonCheck(Int64.Parse(HInterID), ds.Tables[0].Rows[0]["HBillNo"].ToString(), "h_p_Gy_WorkBeginDotCheckListBill_AfterUnCheckCtrl",user, ref ClsPub.sExeReturnInfo))
                        {
                            objJsonResult.code = "0";
                            objJsonResult.count = 1;
@@ -1479,6 +1565,7 @@
        {
            try
            {
                //判断是否有作废权限
                if (!DBUtility.ClsPub.Security_Log("Gy_WorkBeginDotCheckListBillMain_Drop", 1, false, user))
                {
@@ -1499,16 +1586,16 @@
                }
                ClsPub.CurUserName = user;
                BillOld.MvarItemKey = "Gy_WorkBeginDotCheckListBillMain";
                BillOld1.MvarItemKey = "Gy_WorkBeginDotCheckListBillMain";
                oCN.BeginTran();//开始事务
                //Type 1 ä½œåºŸ  2  åä½œåºŸ
                if (Type == 1)
                {
                    //判断单据是否已经作废
                    DataSet ds;
                    string sql = "select * from " + BillOld.MvarItemKey + " where HinterID = " + HInterID;
                    ds = oCN.RunProcReturn(sql, BillOld.MvarItemKey);
                    string sql = "select * from " + BillOld1.MvarItemKey + " where HinterID = " + HInterID;
                    ds = oCN.RunProcReturn(sql, BillOld1.MvarItemKey);
                    if (ds == null || ds.Tables[0].Rows.Count == 0)
                    {
                        objJsonResult.code = "0";
@@ -1535,23 +1622,45 @@
                            objJsonResult.data = null;
                            return objJsonResult;
                        }
                        //作废单据
                        if (!BillOld.Cancelltion(Int64.Parse(HInterID), ref ClsPub.sExeReturnInfo))
                        //作废前控制=========================================
                        string sql1 = "exec h_p_Gy_WorkBeginDotCheckListBill_BeforeDropCtrl " + HInterID + ",'" + ds.Tables[0].Rows[0]["HBillNo"].ToString() + "','" + user + "'";
                        ds1 = oCN.RunProcReturn(sql1, "h_p_Gy_WorkBeginDotCheckListBill_BeforeDropCtrl");
                        if (ds1 == null || ds1.Tables.Count == 0 || ds1.Tables[0].Rows.Count == 0)
                        {
                            objJsonResult.code = "0";
                            objJsonResult.count = 1;
                            objJsonResult.Message = "审核失败!原因:审核前判断失败,请与网络管理人员联系";
                            objJsonResult.data = null;
                            oCN.RollBack();
                            return objJsonResult;
                        }
                        if (ds1.Tables[0].Rows[0]["HBack"].ToString() != "0")
                        {
                            objJsonResult.code = "0";
                            objJsonResult.count = 1;
                            objJsonResult.Message = "审核失败!原因:" + ds.Tables[0].Rows[0]["HRemark"].ToString(); ;
                            objJsonResult.data = null;
                            oCN.RollBack();
                            return objJsonResult;
                        }
                        //==================================================================================
                        //作废单据
                        if (!BillOld1.Cancelltion(Int64.Parse(HInterID), ds.Tables[0].Rows[0]["HBillNo"].ToString(), "h_p_Gy_WorkBeginDotCheckListBill_AfterDropCtrl", user, ref ClsPub.sExeReturnInfo))
                        {
                            objJsonResult.code = "0";
                            objJsonResult.count = 0;
                            objJsonResult.Message = "作废失败!原因:" + ClsPub.sExeReturnInfo;
                            objJsonResult.data = null;
                            return objJsonResult;
                        }
                        }
                    }
                }
                else
                {
                    //判断单据是否已经反作废
                    DataSet ds;
                    string sql = "select * from " + BillOld.MvarItemKey + " where HinterID = " + HInterID;
                    ds = oCN.RunProcReturn(sql, BillOld.MvarItemKey);
                    string sql = "select * from " + BillOld1.MvarItemKey + " where HinterID = " + HInterID;
                    ds = oCN.RunProcReturn(sql, BillOld1.MvarItemKey);
                    if (ds.Tables[0] != null && ds.Tables[0].Rows.Count > 0)
                    {
                        if (ds.Tables[0].Rows[0]["HChecker"] != null && ds.Tables[0].Rows[0]["HChecker"].ToString() != "")
@@ -1570,15 +1679,38 @@
                            objJsonResult.data = null;
                            return objJsonResult;
                        }
                        //反作废单据
                        if (!BillOld.AbandonCancelltion(Int64.Parse(HInterID), ref ClsPub.sExeReturnInfo))
                        //反作废前控制=========================================
                        string sql1 = "exec h_p_Gy_WorkBeginDotCheckListBill_BeforeUnDropCtrl " + HInterID + ",'" + ds.Tables[0].Rows[0]["HBillNo"].ToString() + "','" + user + "'";
                        ds1 = oCN.RunProcReturn(sql1, "h_p_Gy_WorkBeginDotCheckListBill_BeforeUnDropCtrl");
                        if (ds1 == null || ds1.Tables.Count == 0 || ds1.Tables[0].Rows.Count == 0)
                        {
                            objJsonResult.code = "0";
                            objJsonResult.count = 1;
                            objJsonResult.Message = "作废失败!原因:反作废前判断失败,请与网络管理人员联系";
                            objJsonResult.data = null;
                            oCN.RollBack();
                            return objJsonResult;
                        }
                        if (ds1.Tables[0].Rows[0]["HBack"].ToString() != "0")
                        {
                            objJsonResult.code = "0";
                            objJsonResult.count = 1;
                            objJsonResult.Message = "作废失败!原因:" + ds1.Tables[0].Rows[0]["HRemark"].ToString(); ;
                            objJsonResult.data = null;
                            oCN.RollBack();
                            return objJsonResult;
                        }
                        //==================================================================================
                        //反作废单据
                        if (!BillOld1.AbandonCancelltion(Int64.Parse(HInterID), ds.Tables[0].Rows[0]["HBillNo"].ToString(), "h_p_Gy_WorkBeginDotCheckListBill_AfterDropCtrl", user, ref ClsPub.sExeReturnInfo))
                        {
                            objJsonResult.code = "0";
                            objJsonResult.count = 0;
                            objJsonResult.Message = "反作废失败!原因:" + ClsPub.sExeReturnInfo;
                            objJsonResult.data = null;
                            return objJsonResult;
                        }
                        }
                    }
                }
WebAPI/Controllers/JHGL/Gy_MaterialTechParamBillController.cs
@@ -314,6 +314,8 @@
        {
            try
            {
                string s = "";
                DAL.ClsGy_MaterialTechParamBillMain BillOld = new DAL.ClsGy_MaterialTechParamBillMain();
                //查看权限
                if (!DBUtility.ClsPub.Security_Log("Gy_MaterialTechParamBillMain_Drop", 1, false, user))
                {
@@ -333,10 +335,78 @@
                    return objJsonResult;
                }
                if (BillOld.ShowBill(long.Parse(HInterID), ref s) == false)
                {
                    objJsonResult.code = "0";
                    objJsonResult.count = 0;
                    objJsonResult.Message = "此单据有误!";
                    objJsonResult.data = 1;
                    return objJsonResult;
                }
                //判断是否可删除
                if (BillOld.omodel.HChecker != "" && BillOld.omodel.HChecker != null)
                {
                    objJsonResult.code = "0";
                    objJsonResult.count = 0;
                    objJsonResult.Message = "此单据已经被审核,不允许删除!";
                    objJsonResult.data = 1;
                    return objJsonResult;
                }
                oCN.BeginTran();
                //删除前控制=========================================
                string sql1 = "exec h_p_Gy_MaterialTechParamBill_BeforeDelCtrl " + BillOld.omodel.HInterID + ",'" + BillOld.omodel.HBillNo + "','" + user + "'";
                ds = oCN.RunProcReturn(sql1, "h_p_Gy_MaterialTechParamBill_BeforeDelCtrl");
                if (ds == null || ds.Tables.Count == 0 || ds.Tables[0].Rows.Count == 0)
                {
                    objJsonResult.code = "0";
                    objJsonResult.count = 1;
                    objJsonResult.Message = "删除失败!原因:删除前判断失败,请与网络管理人员联系";
                    objJsonResult.data = null;
                    return objJsonResult;
                }
                if (ds.Tables[0].Rows[0]["HBack"].ToString() != "0")
                {
                    objJsonResult.code = "0";
                    objJsonResult.count = 1;
                    objJsonResult.Message = "删除失败!原因:" + ds.Tables[0].Rows[0]["HRemark"].ToString(); ;
                    objJsonResult.data = null;
                    return objJsonResult;
                }
                //==================================================================================
                oCN.RunProc("delete from Gy_MaterialTechParamBillMain    where HInterID = " + HInterID);
                oCN.RunProc("delete from Gy_MaterialTechParamBillSub   where HInterID = " + HInterID);
                //删除后控制==================================================================================
                string sql2 = "exec h_p_Gy_MaterialTechParamBill_AfterDelCtrl " + BillOld.omodel.HInterID + ",'" + BillOld.omodel.HBillNo + "','" + user + "'";
                ds = oCN.RunProcReturn(sql2, "h_p_Gy_MaterialTechParamBill_AfterDelCtrl");
                if (ds == null || ds.Tables.Count == 0 || ds.Tables[0].Rows.Count == 0)
                {
                    s = "删除后判断失败,请与网络管理人员联系";
                    objJsonResult.code = "0";
                    objJsonResult.count = 1;
                    objJsonResult.Message = "删除失败!原因:" + s;
                    objJsonResult.data = null;
                    oCN.RollBack();
                    return objJsonResult;
                }
                if (ds.Tables[0].Rows[0]["HBack"].ToString() != "0")
                {
                    s = ds.Tables[0].Rows[0]["HRemark"].ToString();
                    objJsonResult.code = "0";
                    objJsonResult.count = 1;
                    objJsonResult.Message = "删除失败!原因:" + s;
                    objJsonResult.data = null;
                    oCN.RollBack();
                    return objJsonResult;
                }
                //==============================================================================================
                oCN.Commit();
@@ -646,6 +716,192 @@
        }
        #endregion
        #region å®‰ç¯é€çº§å‘¼å«è§„则  ä½œåºŸ/反作废
        /// <summary>
        /// </summary>
        /// <param name="HInterID">单据ID</param>
        /// <param name="IsAudit">作废(0),反作废(1)</param>
        /// <param name="CurUserName">作废人</param>
        /// <returns></returns>
        [Route("Gy_MaterialTechParamBill/DropGy_MaterialTechParamBill")]
        [HttpGet]
        public object DropGy_MaterialTechParamBill(int HInterID, int IsAudit, string CurUserName)
        {
            string ModRightNameCheck = "Gy_MaterialTechParamBillMain_Delete";
            DBUtility.ClsPub.CurUserName = CurUserName;
            try
            {
                //检查权限
                if (!DBUtility.ClsPub.Security_Log_second(ModRightNameCheck, 1, false, CurUserName))
                {
                    objJsonResult.code = "0";
                    objJsonResult.count = 0;
                    objJsonResult.Message = "作废失败!无权限!";
                    objJsonResult.data = null;
                    return objJsonResult;
                }
                //HInterID数据判断
                if (HInterID <= 0)
                {
                    objJsonResult.code = "0";
                    objJsonResult.count = 0;
                    objJsonResult.Message = "HInterID小于0!";
                    objJsonResult.data = null;
                    return objJsonResult;
                }
                Int64 lngBillKey = 0;
                lngBillKey = DBUtility.ClsPub.isLong(HInterID);                                         //对HInterID进行类型的转换
                DAL.ClsGy_MaterialTechParamBillMain oBill = new DAL.ClsGy_MaterialTechParamBillMain();              //实例化单据操作类,用于进行相关操作
                //针对需要进行的操作,检验当前单据的状态是否支持需要进行的操作
                if (oBill.ShowBill(lngBillKey, ref DBUtility.ClsPub.sExeReturnInfo))                    //根据HInterID获取该单据的数据
                {
                    if (oBill.omodel.HChecker.Trim() != "")
                    {
                        objJsonResult.code = "0";
                        objJsonResult.count = 0;
                        objJsonResult.Message = "单据已审核!不能进行作废!";
                        objJsonResult.data = null;
                        return objJsonResult;
                    }
                    if (IsAudit == 0)  //作废判断
                    {
                        if (oBill.omodel.HDeleteMan.Trim() != "")
                        {
                            objJsonResult.code = "0";
                            objJsonResult.count = 0;
                            objJsonResult.Message = "单据已作废!不能再作废!";
                            objJsonResult.data = null;
                            return objJsonResult;
                        }
                    }
                    if (IsAudit == 1) //反作废判断
                    {
                        if (oBill.omodel.HDeleteMan.Trim() == "")
                        {
                            objJsonResult.code = "0";
                            objJsonResult.count = 0;
                            objJsonResult.Message = "单据未作废!不需要反作废!";
                            objJsonResult.data = null;
                            return objJsonResult;
                        }
                    }
                }
                else
                {
                    objJsonResult.code = "0";
                    objJsonResult.count = 0;
                    objJsonResult.Message = "单据不存在!原因:" + DBUtility.ClsPub.sExeReturnInfo;
                    objJsonResult.data = null;
                    return objJsonResult;
                }
                //进行需要进行的作废/反作废操作
                if (IsAudit == 0) //作废提交
                {
                    //作废前控制=========================================
                    string sql1 = "exec h_p_Gy_MaterialTechParamBill_BeforeDropCtrl " + oBill.omodel.HInterID + ",'" + oBill.omodel.HBillNo + "','" + CurUserName + "'";
                    ds = oCN.RunProcReturn(sql1, "h_p_Gy_MaterialTechParamBill_BeforeDropCtrl");
                    if (ds == null || ds.Tables.Count == 0 || ds.Tables[0].Rows.Count == 0)
                    {
                        objJsonResult.code = "0";
                        objJsonResult.count = 1;
                        objJsonResult.Message = "审核失败!原因:审核前判断失败,请与网络管理人员联系";
                        objJsonResult.data = null;
                        oCN.RollBack();
                        return objJsonResult;
                    }
                    if (ds.Tables[0].Rows[0]["HBack"].ToString() != "0")
                    {
                        objJsonResult.code = "0";
                        objJsonResult.count = 1;
                        objJsonResult.Message = "审核失败!原因:" + ds.Tables[0].Rows[0]["HRemark"].ToString(); ;
                        objJsonResult.data = null;
                        oCN.RollBack();
                        return objJsonResult;
                    }
                    //==================================================================================
                    //作废提交
                    if (oBill.Cancelltion(lngBillKey, oBill.omodel.HBillNo, "h_p_Gy_MaterialTechParamBill_AfterDropCtrl", CurUserName, ref DBUtility.ClsPub.sExeReturnInfo) == true)
                    {
                        objJsonResult.code = "1";
                        objJsonResult.count = 1;
                        objJsonResult.Message = "作废成功";
                        objJsonResult.data = null;
                        return objJsonResult;
                    }
                    else
                    {
                        objJsonResult.code = "0";
                        objJsonResult.count = 0;
                        objJsonResult.Message = "作废失败!原因:" + DBUtility.ClsPub.sExeReturnInfo;
                        objJsonResult.data = null;
                        return objJsonResult;
                    }
                }
                if (IsAudit == 1) //反作废提交
                {
                    //反作废前控制=========================================
                    string sql1 = "exec h_p_Gy_MaterialTechParamBill_BeforeUnDropCtrl " + oBill.omodel.HInterID + ",'" + oBill.omodel.HBillNo + "','" + CurUserName + "'";
                    ds = oCN.RunProcReturn(sql1, "h_p_Gy_MaterialTechParamBill_BeforeUnDropCtrl");
                    if (ds == null || ds.Tables.Count == 0 || ds.Tables[0].Rows.Count == 0)
                    {
                        objJsonResult.code = "0";
                        objJsonResult.count = 1;
                        objJsonResult.Message = "作废失败!原因:反作废前判断失败,请与网络管理人员联系";
                        objJsonResult.data = null;
                        oCN.RollBack();
                        return objJsonResult;
                    }
                    if (ds.Tables[0].Rows[0]["HBack"].ToString() != "0")
                    {
                        objJsonResult.code = "0";
                        objJsonResult.count = 1;
                        objJsonResult.Message = "作废失败!原因:" + ds.Tables[0].Rows[0]["HRemark"].ToString(); ;
                        objJsonResult.data = null;
                        oCN.RollBack();
                        return objJsonResult;
                    }
                    //==================================================================================
                    //反作废提交
                    if (oBill.AbandonCancelltion(lngBillKey, oBill.omodel.HBillNo, "h_p_Gy_MaterialTechParamBill_AfterUnDropCtrl", CurUserName, ref DBUtility.ClsPub.sExeReturnInfo) == true)
                    {
                        objJsonResult.code = "1";
                        objJsonResult.count = 1;
                        objJsonResult.Message = "反作废成功";
                        objJsonResult.data = null;
                        return objJsonResult;
                    }
                    else
                    {
                        objJsonResult.code = "0";
                        objJsonResult.count = 0;
                        objJsonResult.Message = "反作废失败!原因:" + DBUtility.ClsPub.sExeReturnInfo;
                        objJsonResult.data = null;
                        return objJsonResult;
                    }
                }
                return objJsonResult;
            }
            catch (Exception e)
            {
                objJsonResult.code = "0";
                objJsonResult.count = 0;
                objJsonResult.Message = "作废失败或者反作废失败!" + e.ToString();
                objJsonResult.data = null;
                return objJsonResult;
            }
        }
        #endregion
        #region äº§å“å·¥è‰ºå‚æ•° æ–‡ä»¶å¯¼å…¥ä¿å­˜
        #region äº§å“å·¥è‰ºå‚æ•° æ–‡ä»¶ä¸Šä¼ 
WebAPI/Controllers/JHGL/Gy_RoutingBillController.cs
@@ -1,19 +1,16 @@
using Newtonsoft.Json;
using Newtonsoft.Json.Linq;
using Pub_Class;
using SQLHelper;
using SyntacticSugar.constant;
using System;
using System.Collections;
using System.Collections.Generic;
using System.Data;
using System.Data.SqlClient;
using System.IO;
using System.Web;
using System.Web.Http;
using System.Windows.Forms;
using WebAPI.Controllers.SCGL.日计划管理;
using WebAPI.Models;
using SyntacticSugar.constant;
namespace WebAPI.Controllers
{
    //工艺路线Controller
@@ -270,12 +267,34 @@
                        objJsonResult.data = null;
                        return objJsonResult;
                    }
                }
                }
                ds = oCN.RunProcReturn("select * from h_v_Gy_RoutingBillList where hmainid=" + HInterID + " and å•据号='" + HBillNo + "'", "h_v_Gy_RoutingBillList");
                if ((OperationType == 1 || OperationType == 2) && ds.Tables[0].Rows.Count == 0)//新增
                {
                    //保存前控制=========================================
                    string HBillNote = "";
                    ds = oCN.RunProcReturn("Exec  h_p_Gy_RoutingBill_BeforeSaveCtrl  " + HInterID.ToString() + ", '" + HBillNo + "','" + HBillNote + "',1 ", " h_p_Gy_RoutingBill_BeforeSaveCtrl ");
                    if (ds == null)
                    {
                        objJsonResult.code = "0";
                        objJsonResult.count = 0;
                        objJsonResult.Message = "保存前判断失败!";
                        objJsonResult.data = null;
                        return objJsonResult;
                    }
                    if (DBUtility.ClsPub.isStrNull(ds.Tables[0].Rows[0]["HBack"]) != "0")
                    {
                        objJsonResult.code = "0";
                        objJsonResult.count = 0;
                        objJsonResult.Message = "保存失败!" + DBUtility.ClsPub.isStrNull(ds.Tables[0].Rows[0]["HBackRemark"]);
                        objJsonResult.data = null;
                        return objJsonResult;
                    }
                    //=========================================================
                    //主表
                    oCN.RunProc("Insert Into Gy_RoutingBillMain   " +
                    "(HBillType,HBillSubType,HInterID,HBillNo,HDate" +
@@ -290,6 +309,30 @@
                    "," + HMainGroupID + "," + HMainProcID + "," + HMainCenterID + ",'" + HMainTimeUnit + "'," + HMainUnitTime + "," + HMainWorkQty +
                    "," + HMainPrice + "," + HStdSourceQty + "," + HAddSourceRate + "," + HPRDORGID + "," + HDelSourceRate +
                    ",'" + HPicNumVer + "','" + HPicNumAssemble + "','" + HMaterTexture + "','" + HProductNum + "','" + HVerNum + "'," + HOrgID + ",'"+ HProcPriceType + "','" + HBeginDate + "','" + HEndDate + "') ");
                    //=========================保存后控制   æ·»åŠ å®¡æ‰¹æµ
                    //DataSet ds2 = oCN.RunProcReturn("Exec h_p_Gy_RoutingBill_AfterSaveCtrl " + HInterID.ToString() + ", '" + HBillNo + "',1 ", "h_p_Gy_RoutingBill_AfterSaveCtrl");
                    //if (ds2 == null)
                    //{
                    //    oCN.RollBack();
                    //    objJsonResult.code = "0";
                    //    objJsonResult.count = 0;
                    //    objJsonResult.Message = "保存后控制判断失败!";
                    //    objJsonResult.data = null;
                    //    return objJsonResult;
                    //}
                    //if (DBUtility.ClsPub.isStrNull(ds2.Tables[0].Rows[0]["HBack"]) != "0")
                    //{
                    //    oCN.RollBack();
                    //    objJsonResult.code = "0";
                    //    objJsonResult.count = 0;
                    //    objJsonResult.Message = "保存失败2!" + DBUtility.ClsPub.isStrNull(ds2.Tables[0].Rows[0]["HBackRemark"]);
                    //    objJsonResult.data = null;
                    //    return objJsonResult;
                    //}
                    //============================
                    LogService.Write("用户:" + user + ",日期:" + DateTime.Now + ",新增工艺路线单据:" + HBillNo);
                    oCN.RunProc("Insert into System_log (GeginDate, userid, WorkstationName, WorkList, SystemName, NetuserName, State) select GETDATE(),'" + user + "','" + HComputerName + "','" + "新增工艺路线单据:" + HBillNo + "','LMES-工艺路线模块','" + DBUtility.ClsPub.IPAddress + "','新增单据'", ref DBUtility.ClsPub.sExeReturnInfo);
@@ -316,8 +359,29 @@
                            return objJsonResult;
                        }
                    }
                    //保存前控制=========================================
                    string HBillNote = "";
                    ds = oCN.RunProcReturn("Exec  h_p_Gy_RoutingBill_BeforeSaveCtrl  " + HInterID.ToString() + ", '" + HBillNo + "','" + HBillNote + "',2 ", " h_p_Gy_RoutingBill_BeforeSaveCtrl ");
                    if (ds == null)
                    {
                        objJsonResult.code = "0";
                        objJsonResult.count = 0;
                        objJsonResult.Message = "保存前判断失败!";
                        objJsonResult.data = null;
                        return objJsonResult;
                    }
                    if (DBUtility.ClsPub.isStrNull(ds.Tables[0].Rows[0]["HBack"]) != "0")
                    {
                        objJsonResult.code = "0";
                        objJsonResult.count = 0;
                        objJsonResult.Message = "保存失败!" + DBUtility.ClsPub.isStrNull(ds.Tables[0].Rows[0]["HBackRemark"]);
                        objJsonResult.data = null;
                        return objJsonResult;
                    }
                    //=========================================================
                    oCN.RunProc("update Gy_RoutingBillMain  set " +
                       "HDate='" + HDate +
                       "',HYear='" + HYear + "',HPeriod='" + HPeriod + "',HRemark='" + HRemark + "',hupdater='" + HMaker +
@@ -332,11 +396,38 @@
                    //删除子表
                    oCN.RunProc("delete from Gy_RoutingBillSub where HInterID='" + HInterID + "'");
                    //=========================保存后控制   æ·»åŠ å®¡æ‰¹æµ
                    //DataSet ds2 = oCN.RunProcReturn("Exec h_p_Gy_RoutingBill_AfterSaveCtrl " + HInterID.ToString() + ", '" + HBillNo + "',2 ", "h_p_Gy_RoutingBill_AfterSaveCtrl");
                    //if (ds2 == null)
                    //{
                    //    oCN.RollBack();
                    //    objJsonResult.code = "0";
                    //    objJsonResult.count = 0;
                    //    objJsonResult.Message = "保存后控制判断失败!";
                    //    objJsonResult.data = null;
                    //    return objJsonResult;
                    //}
                    //if (DBUtility.ClsPub.isStrNull(ds2.Tables[0].Rows[0]["HBack"]) != "0")
                    //{
                    //    oCN.RollBack();
                    //    objJsonResult.code = "0";
                    //    objJsonResult.count = 0;
                    //    objJsonResult.Message = "保存失败2!" + DBUtility.ClsPub.isStrNull(ds2.Tables[0].Rows[0]["HBackRemark"]);
                    //    objJsonResult.data = null;
                    //    return objJsonResult;
                    //}
                    //============================
                    LogService.Write("用户:" + user + ",日期:" + DateTime.Now + ",修改工艺路线单据:" + HBillNo);
                    oCN.RunProc("Insert into System_log (GeginDate, userid, WorkstationName, WorkList, SystemName, NetuserName, State) select GETDATE(),'" + user + "','" + HComputerName + "','" + "修改工艺路线单据:" + HBillNo + "','LMES-工艺路线模块','" + DBUtility.ClsPub.IPAddress + "','修改单据'", ref DBUtility.ClsPub.sExeReturnInfo);
                }
                //保存子表
                objJsonResult = AddBillSub(msg3, HInterID, OperationType);
                if (objJsonResult.code == "0")
                {
                    objJsonResult.code = "0";
@@ -544,8 +635,8 @@
                    }
                }
                //保存后控制=========================================           æ·»åŠ å®¡æ‰¹æµ
                ds = oCN.RunProcReturn("exec h_p_Gy_RoutingBill_AfterSaveCtrl " + HInterID, "h_p_Gy_RoutingBill_AfterSaveCtrl");
                ////保存后控制=========================================           æ·»åŠ å®¡æ‰¹æµ
                ds = oCN.RunProcReturn("exec h_p_Gy_RoutingBill_AfterSaveCtrl " + HInterID + ",'',"+ OperationType, "h_p_Gy_RoutingBill_AfterSaveCtrl");
                if (ds == null || ds.Tables[0].Rows.Count == 0)
                {
@@ -563,7 +654,7 @@
                    objJsonResult.data = null;
                    return objJsonResult;
                }
                //=========================================================
                ////=========================================================
            }
            objJsonResult.code = "1";
@@ -766,7 +857,7 @@
            try
            {
                ds = oCN.RunProcReturn("select a.*,m.HProcPriceType,m.HBeginDate,m.HEndDate,s.HQCProc,s.HQCFst,s.HQCPatrol,s.HMaterToSourceCtrl from h_v_Gy_RoutingBillList as a,Gy_RoutingBillMain as m,Gy_RoutingBillSub as s where m.HInterID = hmainid and s.HInterID = hmainid and s.HEntryID = hsubid and hmainid =" + HInterID, "h_v_Gy_RoutingBillList");
                ds = oCN.RunProcReturn("select a.*,m.HProcPriceType,m.HBeginDate,m.HEndDate,s.HQCProc,s.HQCFst,s.HQCPatrol,s.HMaterToSourceCtrl from h_v_Gy_RoutingBill_Edit as a,Gy_RoutingBillMain as m,Gy_RoutingBillSub as s where m.HInterID = hmainid and s.HInterID = hmainid and s.HEntryID = hsubid and hmainid =" + HInterID, "h_v_Gy_RoutingBillList");
                if (ds == null || ds.Tables[0].Rows.Count == 0)
                {
                    objJsonResult.code = "0";
@@ -1328,7 +1419,7 @@
        /// <param name="HInterID">单据ID</param>
        /// <param name="IsAudit">审核(0),反审核(1)</param>
        /// <param name="CurUserName">审核人</param>
        /// <returns></returns>
        /// <returns></returns>Gy_RoutingBill/CheckGy_RoutingBill
        [Route("Gy_RoutingBill/AuditGy_RoutingBill")]
        [HttpGet]
        public object AuditGy_RoutingBill(string HInterID, int IsAudit, string CurUserName)
@@ -1384,7 +1475,60 @@
                if (IsAudit == 0)  //审核判断
                {
                    //审核前控制=========================================
                    string sql1 = "exec h_p_Gy_RoutingBill_BeforeCheckCtrl " + HInterID + ",'" + ds.Tables[0].Rows[0]["HBillNo"].ToString() + "','" + CurUserName + "'";
                    ds = oCN.RunProcReturn(sql1, "h_p_Gy_RoutingBill_BeforeCheckCtrl");
                    if (ds == null || ds.Tables.Count == 0 || ds.Tables[0].Rows.Count == 0)
                    {
                        objJsonResult.code = "0";
                        objJsonResult.count = 1;
                        objJsonResult.Message = "审核失败!原因:审核前判断失败,请与网络管理人员联系";
                        objJsonResult.data = null;
                        oCN.RollBack();
                        return objJsonResult;
                    }
                    if (ds.Tables[0].Rows[0]["HBack"].ToString() != "0")
                    {
                        objJsonResult.code = "0";
                        objJsonResult.count = 1;
                        objJsonResult.Message = "审核失败!原因:" + ds.Tables[0].Rows[0]["HRemark"].ToString(); ;
                        objJsonResult.data = null;
                        oCN.RollBack();
                        return objJsonResult;
                    }
                    //==================================================================================
                    //审核工艺路线
                    oCN.RunProc("update Gy_RoutingBillMain set HChecker='" + CurUserName + "',HCheckDate=getdate(),HBillStatus=2 where HInterID=" + HInterID);
                    //审核后控制=========================================
                    string sql2 = "exec h_p_Gy_RoutingBill_AfterCheckCtrl " + HInterID + ",'" + ds.Tables[0].Rows[0]["HBillNo"].ToString() + "','" + CurUserName + "'";
                    ds = oCN.RunProcReturn(sql1, "h_p_Gy_RoutingBill_AfterCheckCtrl");
                    if (ds == null || ds.Tables.Count == 0 || ds.Tables[0].Rows.Count == 0)
                    {
                        objJsonResult.code = "0";
                        objJsonResult.count = 1;
                        objJsonResult.Message = "审核失败!原因:审核后判断失败,请与网络管理人员联系";
                        objJsonResult.data = null;
                        oCN.RollBack();
                        return objJsonResult;
                    }
                    if (ds.Tables[0].Rows[0]["HBack"].ToString() != "0")
                    {
                        objJsonResult.code = "0";
                        objJsonResult.count = 1;
                        objJsonResult.Message = "审核失败!原因:" + ds.Tables[0].Rows[0]["HRemark"].ToString(); ;
                        objJsonResult.data = null;
                        oCN.RollBack();
                        return objJsonResult;
                    }
                    //==================================================================================
                    //获取系统参数
                    string Ret = "";
@@ -1405,8 +1549,58 @@
                }
                if (IsAudit == 1) //反审核判断
                {
                    //反审核前控制=========================================
                    string sql1 = "exec h_p_Gy_Routing_BeforeUnCheckCtrl " + HInterID + ",'" + ds.Tables[0].Rows[0]["HBillNo"].ToString() + "','" + CurUserName + "'";
                    ds = oCN.RunProcReturn(sql1, "h_p_Gy_Routing_BeforeUnCheckCtrl");
                    if (ds == null || ds.Tables.Count == 0 || ds.Tables[0].Rows.Count == 0)
                    {
                        objJsonResult.code = "0";
                        objJsonResult.count = 1;
                        objJsonResult.Message = "审核失败!原因:反审核前判断失败,请与网络管理人员联系";
                        objJsonResult.data = null;
                        oCN.RollBack();
                        return objJsonResult;
                    }
                    if (ds.Tables[0].Rows[0]["HBack"].ToString() != "0")
                    {
                        objJsonResult.code = "0";
                        objJsonResult.count = 1;
                        objJsonResult.Message = "审核失败!原因:" + ds.Tables[0].Rows[0]["HRemark"].ToString(); ;
                        objJsonResult.data = null;
                        oCN.RollBack();
                        return objJsonResult;
                    }
                    //==================================================================================
                    //反审核工艺路线
                    oCN.RunProc("update Gy_RoutingBillMain set HChecker='',HCheckDate=null where HInterID=" + HInterID);
                    //反审核后控制=========================================
                    string sql2 = "exec h_p_Gy_RoutingBill_AfterUnCheckCtrl " + HInterID + ",'" + ds.Tables[0].Rows[0]["HBillNo"].ToString() + "','" + CurUserName + "'";
                    ds = oCN.RunProcReturn(sql1, "h_p_Gy_RoutingBill_AfterUnCheckCtrl");
                    if (ds == null || ds.Tables.Count == 0 || ds.Tables[0].Rows.Count == 0)
                    {
                        objJsonResult.code = "0";
                        objJsonResult.count = 1;
                        objJsonResult.Message = "审核失败!原因:反审核后判断失败,请与网络管理人员联系";
                        objJsonResult.data = null;
                        oCN.RollBack();
                        return objJsonResult;
                    }
                    if (ds.Tables[0].Rows[0]["HBack"].ToString() != "0")
                    {
                        objJsonResult.code = "0";
                        objJsonResult.count = 1;
                        objJsonResult.Message = "审核失败!原因:" + ds.Tables[0].Rows[0]["HRemark"].ToString(); ;
                        objJsonResult.data = null;
                        oCN.RollBack();
                        return objJsonResult;
                    }
                    //==================================================================================
                    objJsonResult.code = "1";
                    objJsonResult.count = 1;
                    objJsonResult.Message = "反审核成功";
@@ -1533,6 +1727,194 @@
        }
        #endregion
        #region å·¥è‰ºè·¯çº¿  ä½œåºŸ/反作废
        /// <summary>
        /// </summary>
        /// <param name="HInterID">单据ID</param>
        /// <param name="IsAudit">作废(0),反作废(1)</param>
        /// <param name="CurUserName">作废人</param>
        /// <returns></returns>
        [Route("Gy_RoutingBill/DeleteGy_RoutingBill")]
        [HttpGet]
        public object DeleteOA_AndengFlowRuleBill(int HInterID, int IsAudit, string CurUserName)
        {
            string ModRightNameCheck = "Gy_RoutingBill_Delete";
            DBUtility.ClsPub.CurUserName = CurUserName;
            try
            {
                //检查权限
                if (!DBUtility.ClsPub.Security_Log_second(ModRightNameCheck, 1, false, CurUserName))
                {
                    objJsonResult.code = "0";
                    objJsonResult.count = 0;
                    objJsonResult.Message = "作废失败!无权限!";
                    objJsonResult.data = null;
                    return objJsonResult;
                }
                //HInterID数据判断
                if (HInterID <= 0)
                {
                    objJsonResult.code = "0";
                    objJsonResult.count = 0;
                    objJsonResult.Message = "HInterID小于0!";
                    objJsonResult.data = null;
                    return objJsonResult;
                }
                Int64 lngBillKey = 0;
                lngBillKey = DBUtility.ClsPub.isLong(HInterID);                                         //对HInterID进行类型的转换
                DAL.ClsGy_RoutingBill oBill = new DAL.ClsGy_RoutingBill();              //实例化单据操作类,用于进行相关操作
                //针对需要进行的操作,检验当前单据的状态是否支持需要进行的操作
                if (oBill.ShowBill(lngBillKey, ref DBUtility.ClsPub.sExeReturnInfo))                    //根据HInterID获取该单据的数据
                {
                    if (oBill.omodel.HChecker.Trim() != "")
                    {
                        objJsonResult.code = "0";
                        objJsonResult.count = 0;
                        objJsonResult.Message = "单据已审核!不能进行作废!";
                        objJsonResult.data = null;
                        return objJsonResult;
                    }
                    if (IsAudit == 1)  //作废判断
                    {
                        if (oBill.omodel.HDeleteMan.Trim() != "")
                        {
                            objJsonResult.code = "0";
                            objJsonResult.count = 0;
                            objJsonResult.Message = "单据已作废!不能再作废!";
                            objJsonResult.data = null;
                            return objJsonResult;
                        }
                    }
                    if (IsAudit == 2) //反作废判断
                    {
                        if (oBill.omodel.HDeleteMan.Trim() == "")
                        {
                            objJsonResult.code = "0";
                            objJsonResult.count = 0;
                            objJsonResult.Message = "单据未作废!不需要反作废!";
                            objJsonResult.data = null;
                            return objJsonResult;
                        }
                    }
                }
                else
                {
                    objJsonResult.code = "0";
                    objJsonResult.count = 0;
                    objJsonResult.Message = "单据不存在!原因:" + DBUtility.ClsPub.sExeReturnInfo;
                    objJsonResult.data = null;
                    return objJsonResult;
                }
                //进行需要进行的作废/反作废操作
                if (IsAudit == 1) //作废提交
                {
                    //作废前控制=========================================
                    string sql1 = "exec h_p_Gy_RoutingBill_BeforeDropCtrl " + oBill.omodel.HInterID + ",'" + oBill.omodel.HBillNo + "','" + CurUserName + "'";
                    ds = oCN.RunProcReturn(sql1, "h_p_Gy_RoutingBill_BeforeDropCtrl");
                    if (ds == null || ds.Tables.Count == 0 || ds.Tables[0].Rows.Count == 0)
                    {
                        objJsonResult.code = "0";
                        objJsonResult.count = 1;
                        objJsonResult.Message = "审核失败!原因:审核前判断失败,请与网络管理人员联系";
                        objJsonResult.data = null;
                        oCN.RollBack();
                        return objJsonResult;
                    }
                    if (ds.Tables[0].Rows[0]["HBack"].ToString() != "0")
                    {
                        objJsonResult.code = "0";
                        objJsonResult.count = 1;
                        objJsonResult.Message = "审核失败!原因:" + ds.Tables[0].Rows[0]["HRemark"].ToString(); ;
                        objJsonResult.data = null;
                        oCN.RollBack();
                        return objJsonResult;
                    }
                    //==================================================================================
                    //作废提交
                    if (oBill.Cancelltion(lngBillKey, oBill.omodel.HBillNo, "h_p_Gy_RoutingBill_AfterDropCtrl", CurUserName, ref DBUtility.ClsPub.sExeReturnInfo) == true)
                    {
                        objJsonResult.code = "1";
                        objJsonResult.count = 1;
                        objJsonResult.Message = "作废成功";
                        objJsonResult.data = null;
                        return objJsonResult;
                    }
                    else
                    {
                        objJsonResult.code = "0";
                        objJsonResult.count = 0;
                        objJsonResult.Message = "作废失败!原因:" + DBUtility.ClsPub.sExeReturnInfo;
                        objJsonResult.data = null;
                        return objJsonResult;
                    }
                }
                if (IsAudit == 2) //反作废提交
                {
                    //反作废前控制=========================================
                    string sql1 = "exec h_p_Gy_RoutingBill_BeforeUnDropCtrl " + oBill.omodel.HInterID + ",'" + oBill.omodel.HBillNo + "','" + CurUserName + "'";
                    ds = oCN.RunProcReturn(sql1, "h_p_Gy_RoutingBill_BeforeUnDropCtrl");
                    if (ds == null || ds.Tables.Count == 0 || ds.Tables[0].Rows.Count == 0)
                    {
                        objJsonResult.code = "0";
                        objJsonResult.count = 1;
                        objJsonResult.Message = "作废失败!原因:反作废前判断失败,请与网络管理人员联系";
                        objJsonResult.data = null;
                        oCN.RollBack();
                        return objJsonResult;
                    }
                    if (ds.Tables[0].Rows[0]["HBack"].ToString() != "0")
                    {
                        objJsonResult.code = "0";
                        objJsonResult.count = 1;
                        objJsonResult.Message = "作废失败!原因:" + ds.Tables[0].Rows[0]["HRemark"].ToString(); ;
                        objJsonResult.data = null;
                        oCN.RollBack();
                        return objJsonResult;
                    }
                    //==================================================================================
                    //反关闭提交
                    if (oBill.AbandonCancelltion(lngBillKey, oBill.omodel.HBillNo, "h_p_Gy_RoutingBill_AfterUnDropCtrl", CurUserName, ref DBUtility.ClsPub.sExeReturnInfo) == true)
                    {
                        objJsonResult.code = "1";
                        objJsonResult.count = 1;
                        objJsonResult.Message = "反作废成功";
                        objJsonResult.data = null;
                        return objJsonResult;
                    }
                    else
                    {
                        objJsonResult.code = "0";
                        objJsonResult.count = 0;
                        objJsonResult.Message = "反作废失败!原因:" + DBUtility.ClsPub.sExeReturnInfo;
                        objJsonResult.data = null;
                        return objJsonResult;
                    }
                }
                return objJsonResult;
            }
            catch (Exception e)
            {
                objJsonResult.code = "0";
                objJsonResult.count = 0;
                objJsonResult.Message = "作废失败或者反作废失败!" + e.ToString();
                objJsonResult.data = null;
                return objJsonResult;
            }
        }
        #endregion
        #region å·¥è‰ºè·¯çº¿åˆ—表 ä¸»è¡¨
        /// <summary>
        /// è¿”回工艺路线列表
WebAPI/Controllers/LMESController.cs
@@ -1623,6 +1623,7 @@
                    objJsonResult.data = 1;
                    return objJsonResult;
                }
                var HBillNo = ds.Tables[0].Rows[0]["HBillNo"].ToString();
                //if (hdeleteman != "")
                //{
                //    objJsonResult.code = "0";
@@ -1631,11 +1632,64 @@
                //    objJsonResult.data = null;
                //    return objJsonResult;
                //}
                //删除前控制=========================================
                string sql1 = "exec h_p_Gy_RoutingBill_BeforeDelCtrl " + lngBillKey + ",'" + HBillNo + "','" + user + "'";
                ds = oCN.RunProcReturn(sql1, "h_p_Gy_RoutingBill_BeforeDelCtrl");
                if (ds == null || ds.Tables.Count == 0 || ds.Tables[0].Rows.Count == 0)
                {
                    objJsonResult.code = "0";
                    objJsonResult.count = 1;
                    objJsonResult.Message = "删除失败!原因:删除前判断失败,请与网络管理人员联系";
                    objJsonResult.data = null;
                    return objJsonResult;
                }
                if (ds.Tables[0].Rows[0]["HBack"].ToString() != "0")
                {
                    objJsonResult.code = "0";
                    objJsonResult.count = 1;
                    objJsonResult.Message = "删除失败!原因:" + ds.Tables[0].Rows[0]["HRemark"].ToString();
                    objJsonResult.data = null;
                    return objJsonResult;
                }
                //==================================================================================
                oCN.RunProc("delete from Gy_RoutingBillmain where HInterID=" + lngBillKey);
                oCN.RunProc("delete from Gy_RoutingBillSub where HInterID=" + lngBillKey);
                LogService.Write("用户:" + user + ",日期:" + DateTime.Now + ",删除工艺路线单据:" + ds.Tables[0].Rows[0]["HBillNo"].ToString());
                oCN.RunProc("Insert into System_log (GeginDate, userid, WorkstationName, WorkList, SystemName, NetuserName, State) select GETDATE(),'" + user + "','" + HComputerName + "','" + "删除工艺路线单据:" + ds.Tables[0].Rows[0]["HBillNo"].ToString() + "','LMES-工艺路线模块','" + DBUtility.ClsPub.IPAddress + "','删除单据'", ref DBUtility.ClsPub.sExeReturnInfo);
                //删除后控制==================================================================================
                string sql2 = "exec h_p_Gy_RoutingBill_AfterDelCtrl " + lngBillKey + ",'" + HBillNo + "','" + user + "'";
                ds = oCN.RunProcReturn(sql2, "h_p_Gy_RoutingBill_AfterDelCtrl");
                if (ds == null || ds.Tables.Count == 0 || ds.Tables[0].Rows.Count == 0)
                {
                    objJsonResult.code = "0";
                    objJsonResult.count = 1;
                    objJsonResult.Message = "删除失败!原因:删除后判断失败,请与网络管理人员联系";
                    objJsonResult.data = null;
                    oCN.RollBack();
                    return objJsonResult;
                }
                if (ds.Tables[0].Rows[0]["HBack"].ToString() != "0")
                {
                    objJsonResult.code = "0";
                    objJsonResult.count = 1;
                    objJsonResult.Message = "删除失败!原因:" + ds.Tables[0].Rows[0]["HRemark"].ToString();
                    objJsonResult.data = null;
                    oCN.RollBack();
                    return objJsonResult;
                }
                //==============================================================================================
                LogService.Write("用户:" + user + ",日期:" + DateTime.Now + ",删除工艺路线单据:" + HBillNo);
                oCN.RunProc("Insert into System_log (GeginDate, userid, WorkstationName, WorkList, SystemName, NetuserName, State) select GETDATE(),'" + user + "','" + HComputerName + "','" + "删除工艺路线单据:" + HBillNo + "','LMES-工艺路线模块','" + DBUtility.ClsPub.IPAddress + "','删除单据'", ref DBUtility.ClsPub.sExeReturnInfo);
                oCN.Commit();//提交事务
                objJsonResult.code = "0";
@@ -3652,8 +3706,58 @@
                        }
                    }
                    //审核前控制=========================================
                    string sql1 = "exec h_p_Gy_RoutingBill_BeforeCheckCtrl " + HInterID + ",'" + ds.Tables[0].Rows[0]["HBillNo"].ToString() + "','" + user + "'";
                    ds = oCN.RunProcReturn(sql1, "h_p_Gy_RoutingBill_BeforeCheckCtrl");
                    if (ds == null || ds.Tables.Count == 0 || ds.Tables[0].Rows.Count == 0)
                    {
                        objJsonResult.code = "0";
                        objJsonResult.count = 1;
                        objJsonResult.Message = "审核失败!原因:审核前判断失败,请与网络管理人员联系";
                        objJsonResult.data = null;
                        oCN.RollBack();
                        return objJsonResult;
                    }
                    if (ds.Tables[0].Rows[0]["HBack"].ToString() != "0")
                    {
                        objJsonResult.code = "0";
                        objJsonResult.count = 1;
                        objJsonResult.Message = "审核失败!原因:" + ds.Tables[0].Rows[0]["HRemark"].ToString(); ;
                        objJsonResult.data = null;
                        oCN.RollBack();
                        return objJsonResult;
                    }
                    //==================================================================================
                    //审核工艺路线
                    oCN.RunProc(" Update Gy_RoutingBillMain set HChecker='" + user + "',HCheckDate=getdate(),HBillStatus=2 Where HInterID=" + HInterID.ToString());
                    //审核后控制=========================================
                    string sql2 = "exec h_p_Gy_RoutingBill_AfterCheckCtrl " + HInterID + ",'" + ds.Tables[0].Rows[0]["HBillNo"].ToString() + "','" + user + "'";
                    ds = oCN.RunProcReturn(sql1, "h_p_Gy_RoutingBill_AfterCheckCtrl");
                    if (ds == null || ds.Tables.Count == 0 || ds.Tables[0].Rows.Count == 0)
                    {
                        objJsonResult.code = "0";
                        objJsonResult.count = 1;
                        objJsonResult.Message = "审核失败!原因:审核后判断失败,请与网络管理人员联系";
                        objJsonResult.data = null;
                        oCN.RollBack();
                        return objJsonResult;
                    }
                    if (ds.Tables[0].Rows[0]["HBack"].ToString() != "0")
                    {
                        objJsonResult.code = "0";
                        objJsonResult.count = 1;
                        objJsonResult.Message = "审核失败!原因:" + ds.Tables[0].Rows[0]["HRemark"].ToString(); ;
                        objJsonResult.data = null;
                        oCN.RollBack();
                        return objJsonResult;
                    }
                    //==================================================================================
                    //获取系统参数
                    string Ret = "";
@@ -3713,7 +3817,7 @@
                        }
                    }
                    //反审核单据
                    if (BillOld.AbandonCheck(Int64.Parse(HInterID), ref ClsPub.sExeReturnInfo))
                    if (BillOld.AbandonCheck(Int64.Parse(HInterID), ds.Tables[0].Rows[0]["HBillNo"].ToString(), "h_p_Gy_RoutingBill_AfterUnCheckCtrl", user, ref ClsPub.sExeReturnInfo))
                    {
                        //SQLHelper.ClsCN oCn = new SQLHelper.ClsCN();
                        //DataSet DSet = oCn.RunProcReturn("exec h_p_Sc_ICMOBill_AbandonCheckCtrl " + int.Parse(HInterID), "h_p_Sc_ICMOBill_AbandonCheckCtrl");
@@ -3922,6 +4026,7 @@
        }
        #endregion
        #region æŠ¥è¡¨æŸ¥çœ‹æƒé™æŽ§åˆ¶
        /// <summary>
WebAPI/Controllers/MJGL/Sc_MouldMaintainRuleBillController.cs
@@ -630,6 +630,124 @@
        }
        #endregion
        #region å™¨å…·ä¿å…»è§„程作废/反作废功能
        [Route("Sc_MouldMaintainRuleBill/DeleteSc_MouldMaintainRule")]
        [HttpGet]
        public object DeleteGy_Mould(string HInterID, int Type, string user)
        {
            try
            {
                //判断是否有删除权限
                if (!DBUtility.ClsPub.Security_Log("Sc_MouldMaintainRuleBill_Drop", 1, false, user))
                {
                    objJsonResult.code = "0";
                    objJsonResult.count = 0;
                    objJsonResult.Message = "无权限关闭!";
                    objJsonResult.data = null;
                    return objJsonResult;
                }
                if (string.IsNullOrWhiteSpace(HInterID))
                {
                    objJsonResult.code = "0";
                    objJsonResult.count = 0;
                    objJsonResult.Message = "HInterID为空!";
                    objJsonResult.data = null;
                    return objJsonResult;
                }
                DAL.ClsSc_MouldMaintainRuleBill oBill = new DAL.ClsSc_MouldMaintainRuleBill();
                ClsPub.CurUserName = user;
                oCN.BeginTran();//开始事务
                //Type 1 ä½œåºŸ  2  åä½œåºŸ
                if (Type == 1)
                {
                    //作废前控制
                    string HBillNo = ds.Tables[0].Rows[0]["HBillNo"].ToString();
                    string sql = "";
                    sql = "exec h_p_Sc_MouldMaintainRuleBill_BeforeCheckCtrl " + int.Parse(HInterID) + ",'" + HBillNo + "','" + user + "'";
                    ds = oCN.RunProcReturn(sql, "h_p_Sc_MouldMaintainRuleBill_BeforeCheckCtrl");
                    if (ds == null || ds.Tables.Count == 0 || ds.Tables[0].Rows.Count == 0)
                    {
                        objJsonResult.code = "0";
                        objJsonResult.count = 1;
                        objJsonResult.Message = "审核失败!原因:审核前判断失败,请与网络管理人员联系";
                        objJsonResult.data = null;
                        return objJsonResult;
                    }
                    if (ds.Tables[0].Rows[0]["HBack"].ToString() != "0")
                    {
                        objJsonResult.code = "0";
                        objJsonResult.count = 1;
                        objJsonResult.Message = "审核失败!原因:" + ds.Tables[0].Rows[0]["HRemark"].ToString(); ;
                        objJsonResult.data = null;
                        return objJsonResult;
                    }
                    if (!oBill.Cancelltion(int.Parse(HInterID), ref ClsPub.sExeReturnInfo))
                    {
                        objJsonResult.code = "0";
                        objJsonResult.count = 1;
                        objJsonResult.Message = "作废失败!原因:" + ClsPub.sExeReturnInfo;
                        objJsonResult.data = null;
                        return objJsonResult;
                    }
                    //作废后控制
                    sql = "exec h_p_Sc_MouldMaintainRuleBill_BeforeCheckCtrl " + int.Parse(HInterID) + ",'" + HBillNo + "','" + user + "'";
                    ds = oCN.RunProcReturn(sql, "h_p_Sc_MouldMaintainRuleBill_BeforeCheckCtrl");
                    if (ds == null || ds.Tables.Count == 0 || ds.Tables[0].Rows.Count == 0)
                    {
                        objJsonResult.code = "0";
                        objJsonResult.count = 1;
                        objJsonResult.Message = "审核失败!原因:审核前判断失败,请与网络管理人员联系";
                        objJsonResult.data = null;
                        return objJsonResult;
                    }
                    if (ds.Tables[0].Rows[0]["HBack"].ToString() != "0")
                    {
                        objJsonResult.code = "0";
                        objJsonResult.count = 1;
                        objJsonResult.Message = "审核失败!原因:" + ds.Tables[0].Rows[0]["HRemark"].ToString(); ;
                        objJsonResult.data = null;
                        return objJsonResult;
                    }
                }
                else
                {
                    if (!oBill.AbandonCancelltion(int.Parse(HInterID), ref ClsPub.sExeReturnInfo))
                    {
                        objJsonResult.code = "0";
                        objJsonResult.count = 1;
                        objJsonResult.Message = "反作废失败!原因:" + ClsPub.sExeReturnInfo;
                        objJsonResult.data = null;
                        return objJsonResult;
                    }
                }
                oCN.Commit();//提交事务
                objJsonResult.code = "0";
                objJsonResult.count = 1;
                objJsonResult.Message = "执行成功!";
                objJsonResult.data = null;
                return objJsonResult; ;
            }
            catch (Exception e)
            {
                objJsonResult.code = "0";
                objJsonResult.count = 0;
                objJsonResult.Message = "执行失败!" + e.ToString();
                objJsonResult.data = null;
                return objJsonResult;
            }
        }
        #endregion
        #region å™¨å…·ä¿å…»è§„程 æ–‡ä»¶å¯¼å…¥ä¿å­˜
        #region å™¨å…·ä¿å…»è§„程 æ–‡ä»¶ä¸Šä¼ 
        [Route("Sc_MouldMaintainRuleBill/Sc_MouldMaintainRuleBill_Excel")]
WebAPI/Controllers/MateOutController.cs
@@ -2609,10 +2609,18 @@
        #region  å·¥åŽ‚æ—¥åŽ†æŸ¥è¯¢
        [Route("MaterOutEntryReport/Sc_ShopCalendar")]
        [HttpGet]
        public object Sc_ShopCalendar(string sWhere)
        public object Sc_ShopCalendar(string sWhere,string user)
        {
            try
            {
                if (!DBUtility.ClsPub.Security_Log("Gy_PlanShifts_Query", 1, false, user))
                {
                    objJsonResult.code = "0";
                    objJsonResult.count = 0;
                    objJsonResult.Message = "无查询权限!";
                    objJsonResult.data = null;
                    return objJsonResult;
                }
                string sql1 = string.Format("select * from h_v_Gy_PlanShiftsList where 1=1 " + sWhere);
                ds = oCN.RunProcReturn(sql1, "h_v_Gy_PlanShiftsList");
WebAPI/Controllers/QC_ManagementController.cs
@@ -137,7 +137,7 @@
                SQLHelper.ClsCN oCN = new SQLHelper.ClsCN();
                if (sWhere == null || sWhere.Equals(""))
                {
                    ds = oCN.RunProcReturn("select  * from h_v_Gy_QCCheckProjectList_Main order by æ—¥æœŸ desc ", "h_v_Gy_QCCheckProjectList_Main");
                    ds = oCN.RunProcReturn("select  * from h_v_Gy_QCCheckProjectList_Main  order by æ—¥æœŸ desc ", "h_v_Gy_QCCheckProjectList_Main");
                }
                else
                {
@@ -1205,7 +1205,7 @@
        [HttpGet]
        public object DeltetQCCheckProject(string HInterID,string UserName)
        {
            DataSet ds;
            DBUtility.ClsPub.CurUserName = UserName;
            //编辑权限
            if (!DBUtility.ClsPub.Security_Log("Gy_QCCheckProject_Delete", 1, false, DBUtility.ClsPub.CurUserName))
@@ -1248,24 +1248,64 @@
                    return objJsonResult;
                }
                bool IsDete = oBill.DeleteBill(oBill.omodel.HInterID, ref DBUtility.ClsPub.sExeReturnInfo);
                if (IsDete)
                //删除前控制=========================================
                string sql1 = "exec h_p_Gy_QCCheckProject_BeforeDelCtrl  " + BillOld.omodel.HInterID + ",'" + BillOld.omodel.HBillNo + "','" + UserName + "'";
                ds = oCN.RunProcReturn(sql1, "h_p_Gy_QCCheckProject_BeforeDelCtrl");
                if (ds == null || ds.Tables.Count == 0 || ds.Tables[0].Rows.Count == 0)
                {
                    objJsonResult.code = "0";
                    objJsonResult.count = 1;
                    objJsonResult.Message = DBUtility.ClsPub.sExeReturnInfo;
                    objJsonResult.Message = "删除失败!原因:删除前判断失败,请与网络管理人员联系";
                    objJsonResult.data = null;
                    return objJsonResult;
                }
                if (ds.Tables[0].Rows[0]["HBack"].ToString() != "0")
                {
                    objJsonResult.code = "0";
                    objJsonResult.count = 1;
                    objJsonResult.Message = "删除失败!原因:" + ds.Tables[0].Rows[0]["HRemark"].ToString(); ;
                    objJsonResult.data = null;
                    return objJsonResult;
                }
                //==================================================================================
                //删除单据(包含删除后控制、写入日志)
                if (!oBill.DeleteBill(BillOld.omodel.HInterID, BillOld.omodel.HBillNo, "h_p_Gy_QCCheckProject_AfterDelCtrl", UserName, ref ClsPub.sExeReturnInfo))
                {
                    objJsonResult.code = "0";
                    objJsonResult.count = 0;
                    objJsonResult.Message = "删除失败!原因:" + ClsPub.sExeReturnInfo;
                    objJsonResult.data = null;
                    return objJsonResult;
                }
                else
                {
                    objJsonResult.code = "0";
                    objJsonResult.count = 0;
                    objJsonResult.Message = DBUtility.ClsPub.sExeReturnInfo;
                    objJsonResult.count = 1;
                    objJsonResult.Message = "删除成功!";
                    objJsonResult.data = null;
                    return objJsonResult;
                }
                //bool IsDete = oBill.DeleteBill(oBill.omodel.HInterID, ref DBUtility.ClsPub.sExeReturnInfo);
                //if (IsDete)
                //{
                //    objJsonResult.code = "0";
                //    objJsonResult.count = 1;
                //    objJsonResult.Message = DBUtility.ClsPub.sExeReturnInfo;
                //    objJsonResult.data = null;
                //    return objJsonResult;
                //}
                //else
                //{
                //    objJsonResult.code = "0";
                //    objJsonResult.count = 0;
                //    objJsonResult.Message = DBUtility.ClsPub.sExeReturnInfo;
                //    objJsonResult.data = null;
                //    return objJsonResult;
                //}
            }
            else
            {
@@ -1274,74 +1314,7 @@
                objJsonResult.Message = "单据未找到";
                objJsonResult.data = null;
                return objJsonResult;
            }
            DataSet ds;
            //string ModRightNameCheck = "Sc_ProcessReport_check";
            try
            {
                //删除权限
                //if (!DBUtility.ClsPub.Security_Log(ModRightNameCheck, 1, false, CurUserName))
                //{
                //    objJsonResult.code = "0";
                //    objJsonResult.count = 0;
                //    objJsonResult.Message = "审核失败!无权限!";
                //    objJsonResult.data = null;
                //    return objJsonResult;
                //}
                SQLHelper.ClsCN oCN = new SQLHelper.ClsCN();
                if (string.IsNullOrWhiteSpace(HInterID))
                {
                    objJsonResult.code = "0";
                    objJsonResult.count = 0;
                    objJsonResult.Message = "HInterID为空!";
                    objJsonResult.data = null;
                    return objJsonResult;
                }
                oCN.BeginTran();//开始事务
                ds = oCN.RunProcReturn("select * from Gy_QCCheckProjectMain where HInterID=" + HInterID, "Gy_QCCheckProjectMain");
                DataSet ds2 = oCN.RunProcReturn("select * from Gy_QCCheckProjectSub where HInterID=" + HInterID, "Gy_QCCheckProjectSub");
                if (ds == null || ds.Tables[0].Rows.Count == 0 || ds2==null || ds2.Tables[0].Rows.Count == 0)
                {
                    objJsonResult.code = "0";
                    objJsonResult.count = 0;
                    objJsonResult.Message = "没有这个单据,无法删除!";
                    objJsonResult.data = null;
                    return objJsonResult; ;
                }
                int HBillStatus = Convert.ToInt32(ds.Tables[0].Rows[0]["HBillStatus"]);
                int HPrjNo= Convert.ToInt32(ds2.Tables[0].Rows[0]["HPrjNo"]);
                if (HBillStatus < 0 || HPrjNo<0)
                {
                    oCN.RollBack();//回滚事务
                    objJsonResult.code = "0";
                    objJsonResult.count = 0;
                    objJsonResult.Message = "单据已删除无法再次删除!";
                    objJsonResult.data = null;
                    return objJsonResult;
                }
                oCN.RunProc("update Gy_QCCheckProjectMain set HBillStatus=-1 where HInterID="+HInterID);
                oCN.RunProc("update Gy_QCCheckProjectSub set HPrjNo=-1 where HInterID=" + HInterID);
                oCN.Commit();//提交事务
                objJsonResult.code = "0";
                objJsonResult.count = 1;
                objJsonResult.Message = "* å•据删除成功!";
                objJsonResult.data = null;
                return objJsonResult; ;
            }
            catch (Exception e)
            {
                objJsonResult.code = "0";
                objJsonResult.count = 0;
                objJsonResult.Message = "删除失败!" + e.ToString();
                objJsonResult.data = null;
                return objJsonResult;
            }
            }
        }
        #endregion
@@ -1389,14 +1362,46 @@
                        objJsonResult.data = null;
                        return objJsonResult;
                    }
                    //审核单据
                    if (!oBill.CheckBill(Int64.Parse(HInterID), ref ClsPub.sExeReturnInfo))
                    //审核前控制=========================================
                    string sql1 = "exec h_p_Gy_QCCheckProject_BeforeCheckCtrl " + oBill.omodel.HInterID + ",'" + oBill.omodel.HBillNo + "','" + user + "'";
                    ds = oCN.RunProcReturn(sql1, "h_p_Gy_QCCheckProject_BeforeCheckCtrl");
                    if (ds == null || ds.Tables.Count == 0 || ds.Tables[0].Rows.Count == 0)
                    {
                        objJsonResult.code = "0";
                        objJsonResult.count = 1;
                        objJsonResult.Message = "审核失败!原因:审核前判断失败,请与网络管理人员联系";
                        objJsonResult.data = null;
                        oCN.RollBack();
                        return objJsonResult;
                    }
                    if (ds.Tables[0].Rows[0]["HBack"].ToString() != "0")
                    {
                        objJsonResult.code = "0";
                        objJsonResult.count = 1;
                        objJsonResult.Message = "审核失败!原因:" + ds.Tables[0].Rows[0]["HRemark"].ToString(); ;
                        objJsonResult.data = null;
                        oCN.RollBack();
                        return objJsonResult;
                    }
                    //==================================================================================
                    //审核提交
                    if (!oBill.CheckBill(oBill.omodel.HInterID, oBill.omodel.HBillNo, "h_p_Gy_QCCheckProject_AfterCheckCtrl", user, ref DBUtility.ClsPub.sExeReturnInfo) == true)
                    {
                        objJsonResult.code = "0";
                        objJsonResult.count = 1;
                        objJsonResult.Message = "审核失败!原因:" + ClsPub.sExeReturnInfo;
                        objJsonResult.data = null;
                        return objJsonResult;
                    }
                    else
                    {
                        objJsonResult.code = "0";
                        objJsonResult.count = 1;
                        objJsonResult.Message = " å®¡æ ¸æˆåŠŸï¼";
                        objJsonResult.data = null;
                        return objJsonResult; ;
                    }
                }
@@ -1416,14 +1421,44 @@
                            objJsonResult.data = null;
                            return objJsonResult;
                        }
                        //反审核单据
                        if (!oBill.AbandonCheck(Int64.Parse(HInterID), ref ClsPub.sExeReturnInfo))
                        //反审核前控制=========================================
                        string sql1 = "exec h_p_Gy_QCCheckProject_BeforeUnCheckCtrl " + oBill.omodel.HInterID + ",'" + oBill.omodel.HBillNo + "','" + user + "'";
                        ds = oCN.RunProcReturn(sql1, "h_p_Gy_QCCheckProject_BeforeUnCheckCtrl");
                        if (ds == null || ds.Tables.Count == 0 || ds.Tables[0].Rows.Count == 0)
                        {
                            objJsonResult.code = "0";
                            objJsonResult.count = 1;
                            objJsonResult.Message = "反审核失败!原因:反审核前判断失败,请与网络管理人员联系";
                            objJsonResult.data = null;
                            return objJsonResult;
                        }
                        if (ds.Tables[0].Rows[0]["HBack"].ToString() != "0")
                        {
                            objJsonResult.code = "0";
                            objJsonResult.count = 1;
                            objJsonResult.Message = "反审核失败!原因:" + ds.Tables[0].Rows[0]["HRemark"].ToString(); ;
                            objJsonResult.data = null;
                            return objJsonResult;
                        }
                        //===========================================================
                        //反审核提交AbandonCheck
                        if (!oBill.AbandonCheck(oBill.omodel.HInterID, oBill.omodel.HBillNo, "h_p_Gy_QCCheckProject_AfterUnCheckCtrl", user, ref DBUtility.ClsPub.sExeReturnInfo) == true)
                        {
                            objJsonResult.code = "0";
                            objJsonResult.count = 1;
                            objJsonResult.Message = "反审核失败!原因:" + ClsPub.sExeReturnInfo;
                            objJsonResult.data = null;
                            return objJsonResult;
                        }
                        else
                        {
                            objJsonResult.code = "0";
                            objJsonResult.count = 1;
                            objJsonResult.Message = " åå®¡æ ¸æˆåŠŸï¼";
                            objJsonResult.data = null;
                            return objJsonResult; ;
                        }
                    }
                }
@@ -1448,6 +1483,189 @@
        }
        #endregion
        #region æ£€éªŒæ–¹æ¡ˆ  ä½œåºŸ/反作废
        /// <summary>
        /// </summary>
        /// <param name="HInterID">单据ID</param>
        /// <param name="IsAudit">作废(0),反作废(1)</param>
        /// <param name="CurUserName">作废人</param>
        /// <returns></returns>
        [Route("Sc_MESTransFerWorkBill/DeleteGy_QCCheckProject")]
        [HttpGet]
        public object DeleteGy_QCCheckProject(int HInterID, int IsAudit, string CurUserName)
        {
            string ModRightNameCheck = "Gy_QCCheckProject_Drop";
            DBUtility.ClsPub.CurUserName = CurUserName;
            try
            {
                //检查权限
                if (!DBUtility.ClsPub.Security_Log_second(ModRightNameCheck, 1, false, CurUserName))
                {
                    objJsonResult.code = "0";
                    objJsonResult.count = 0;
                    objJsonResult.Message = "作废失败!无权限!";
                    objJsonResult.data = null;
                    return objJsonResult;
                }
                //HInterID数据判断
                if (HInterID <= 0)
                {
                    objJsonResult.code = "0";
                    objJsonResult.count = 0;
                    objJsonResult.Message = "HInterID小于0!";
                    objJsonResult.data = null;
                    return objJsonResult;
                }
                Int64 lngBillKey = 0;
                lngBillKey = DBUtility.ClsPub.isLong(HInterID);                                         //对HInterID进行类型的转换
                DAL.ClsGy_QCCheckProjectMain oBill = new DAL.ClsGy_QCCheckProjectMain();              //实例化单据操作类,用于进行相关操作
                //针对需要进行的操作,检验当前单据的状态是否支持需要进行的操作
                if (oBill.ShowBill(lngBillKey, ref DBUtility.ClsPub.sExeReturnInfo))                    //根据HInterID获取该单据的数据
                {
                    if (oBill.omodel.HChecker.Trim() != "")
                    {
                        objJsonResult.code = "0";
                        objJsonResult.count = 0;
                        objJsonResult.Message = "单据已审核!不能进行作废!";
                        objJsonResult.data = null;
                        return objJsonResult;
                    }
                    if (IsAudit == 0)  //作废判断
                    {
                        if (oBill.omodel.HDeleteMan.Trim() != "")
                        {
                            objJsonResult.code = "0";
                            objJsonResult.count = 0;
                            objJsonResult.Message = "单据已作废!不能再作废!";
                            objJsonResult.data = null;
                            return objJsonResult;
                        }
                    }
                    if (IsAudit == 1) //反作废判断
                    {
                        if (oBill.omodel.HDeleteMan.Trim() == "")
                        {
                            objJsonResult.code = "0";
                            objJsonResult.count = 0;
                            objJsonResult.Message = "单据未作废!不需要反作废!";
                            objJsonResult.data = null;
                            return objJsonResult;
                        }
                    }
                }
                else
                {
                    objJsonResult.code = "0";
                    objJsonResult.count = 0;
                    objJsonResult.Message = "单据不存在!原因:" + DBUtility.ClsPub.sExeReturnInfo;
                    objJsonResult.data = null;
                    return objJsonResult;
                }
                //进行需要进行的作废/反作废操作
                if (IsAudit == 0) //作废提交
                {
                    //审核前控制=========================================
                    string sql1 = "exec h_p_Gy_QCCheckProject_BeforeDropCtrl " + oBill.omodel.HInterID + ",'" + oBill.omodel.HBillNo + "','" + CurUserName + "'";
                    ds = oCN.RunProcReturn(sql1, "h_p_Gy_QCCheckProject_BeforeDropCtrl");
                    if (ds == null || ds.Tables.Count == 0 || ds.Tables[0].Rows.Count == 0)
                    {
                        objJsonResult.code = "0";
                        objJsonResult.count = 1;
                        objJsonResult.Message = "审核失败!原因:审核前判断失败,请与网络管理人员联系";
                        objJsonResult.data = null;
                        oCN.RollBack();
                        return objJsonResult;
                    }
                    if (ds.Tables[0].Rows[0]["HBack"].ToString() != "0")
                    {
                        objJsonResult.code = "0";
                        objJsonResult.count = 1;
                        objJsonResult.Message = "审核失败!原因:" + ds.Tables[0].Rows[0]["HRemark"].ToString(); ;
                        objJsonResult.data = null;
                        oCN.RollBack();
                        return objJsonResult;
                    }
                    //==================================================================================
                    //审核提交
                    if (oBill.Cancelltion(oBill.omodel.HInterID, oBill.omodel.HBillNo, "h_p_Gy_QCCheckProject_AfterDropCtrl", CurUserName, ref DBUtility.ClsPub.sExeReturnInfo) == true)
                    {
                        objJsonResult.code = "1";
                        objJsonResult.count = 1;
                        objJsonResult.Message = "作废成功";
                        objJsonResult.data = null;
                        return objJsonResult;
                    }
                    else
                    {
                        objJsonResult.code = "0";
                        objJsonResult.count = 0;
                        objJsonResult.Message = "作废失败!原因:" + DBUtility.ClsPub.sExeReturnInfo;
                        objJsonResult.data = null;
                        return objJsonResult;
                    }
                }
                if (IsAudit == 1) //反作废提交
                {
                    //反审核前控制=========================================
                    string sql1 = "exec h_p_Gy_QCCheckProject_BeforeUnDropCtrl " + oBill.omodel.HInterID + ",'" + oBill.omodel.HBillNo + "','" + CurUserName + "'";
                    ds = oCN.RunProcReturn(sql1, "h_p_Gy_QCCheckProject_BeforeUnDropCtrl");
                    if (ds == null || ds.Tables.Count == 0 || ds.Tables[0].Rows.Count == 0)
                    {
                        objJsonResult.code = "0";
                        objJsonResult.count = 1;
                        objJsonResult.Message = "反审核失败!原因:反审核前判断失败,请与网络管理人员联系";
                        objJsonResult.data = null;
                        return objJsonResult;
                    }
                    if (ds.Tables[0].Rows[0]["HBack"].ToString() != "0")
                    {
                        objJsonResult.code = "0";
                        objJsonResult.count = 1;
                        objJsonResult.Message = "反审核失败!原因:" + ds.Tables[0].Rows[0]["HRemark"].ToString(); ;
                        objJsonResult.data = null;
                        return objJsonResult;
                    }
                    //===========================================================
                    //反作废提交
                    if (oBill.AbandonCancelltion(lngBillKey, oBill.omodel.HBillNo, "h_p_Gy_QCCheckProject_AfterUnDropCtrl", CurUserName, ref DBUtility.ClsPub.sExeReturnInfo) == true)
                    {
                        objJsonResult.code = "1";
                        objJsonResult.count = 1;
                        objJsonResult.Message = "反作废成功";
                        objJsonResult.data = null;
                        return objJsonResult;
                    }
                    else
                    {
                        objJsonResult.code = "0";
                        objJsonResult.count = 0;
                        objJsonResult.Message = "反作废失败!原因:" + DBUtility.ClsPub.sExeReturnInfo;
                        objJsonResult.data = null;
                        return objJsonResult;
                    }
                }
                return objJsonResult;
            }
            catch (Exception e)
            {
                objJsonResult.code = "0";
                objJsonResult.count = 0;
                objJsonResult.Message = "作废失败或者反作废失败!" + e.ToString();
                objJsonResult.data = null;
                return objJsonResult;
            }
        }
        #endregion
        #region æ¥æ–™æ£€éªŒ
        /// <summary>
        /// ä¿å­˜æ¥æ–™æ£€éªŒå•
WebAPI/Controllers/SCGL/Sc_MESTransFerWorkBillController.cs
@@ -5485,8 +5485,32 @@
                //进行需要进行的作废/反作废操作
                if (IsAudit == 0) //作废提交
                {
                    //作废提交
                    if (oBill.Cancelltion(lngBillKey, ref DBUtility.ClsPub.sExeReturnInfo) == true)
                    //审核前控制=========================================
                    string sql1 = "exec h_p_OA_AndengFlowRuleBill_BeforeDropCtrl " + oBill.omodel.HInterID + ",'" + oBill.omodel.HBillNo + "','" + CurUserName + "'";
                    ds = oCN.RunProcReturn(sql1, "h_p_OA_AndengFlowRuleBill_BeforeDropCtrl");
                    if (ds == null || ds.Tables.Count == 0 || ds.Tables[0].Rows.Count == 0)
                    {
                        objJsonResult.code = "0";
                        objJsonResult.count = 1;
                        objJsonResult.Message = "审核失败!原因:审核前判断失败,请与网络管理人员联系";
                        objJsonResult.data = null;
                        oCN.RollBack();
                        return objJsonResult;
                    }
                    if (ds.Tables[0].Rows[0]["HBack"].ToString() != "0")
                    {
                        objJsonResult.code = "0";
                        objJsonResult.count = 1;
                        objJsonResult.Message = "审核失败!原因:" + ds.Tables[0].Rows[0]["HRemark"].ToString(); ;
                        objJsonResult.data = null;
                        oCN.RollBack();
                        return objJsonResult;
                    }
                    //==================================================================================
                    //审核提交
                    if (oBill.Cancelltion(oBill.omodel.HInterID, oBill.omodel.HBillNo, "h_p_OA_AndengFlowRuleBill_AfterDropCtrl", CurUserName, ref DBUtility.ClsPub.sExeReturnInfo) == true)
                    {
                        objJsonResult.code = "1";
                        objJsonResult.count = 1;
@@ -5503,10 +5527,32 @@
                        return objJsonResult;
                    }
                }
                if (IsAudit == 1) //反关闭提交
                if (IsAudit == 1) //反作废提交
                {
                    //反关闭提交
                    if (oBill.AbandonCancelltion(lngBillKey, ref DBUtility.ClsPub.sExeReturnInfo) == true)
                    //反审核前控制=========================================
                    string sql1 = "exec h_p_OA_AndengFlowRuleBill_BeforeUnDropCtrl " + oBill.omodel.HInterID + ",'" + oBill.omodel.HBillNo + "','" + CurUserName + "'";
                    ds = oCN.RunProcReturn(sql1, "h_p_OA_AndengFlowRuleBill_BeforeUnDropCtrl");
                    if (ds == null || ds.Tables.Count == 0 || ds.Tables[0].Rows.Count == 0)
                    {
                        objJsonResult.code = "0";
                        objJsonResult.count = 1;
                        objJsonResult.Message = "反审核失败!原因:反审核前判断失败,请与网络管理人员联系";
                        objJsonResult.data = null;
                        return objJsonResult;
                    }
                    if (ds.Tables[0].Rows[0]["HBack"].ToString() != "0")
                    {
                        objJsonResult.code = "0";
                        objJsonResult.count = 1;
                        objJsonResult.Message = "反审核失败!原因:" + ds.Tables[0].Rows[0]["HRemark"].ToString(); ;
                        objJsonResult.data = null;
                        return objJsonResult;
                    }
                    //===========================================================
                    //反作废提交
                    if (oBill.AbandonCancelltion(lngBillKey, oBill.omodel.HBillNo, "h_p_OA_AndengFlowRuleBill_AfterUnDropCtrl", CurUserName, ref DBUtility.ClsPub.sExeReturnInfo) == true)
                    {
                        objJsonResult.code = "1";
                        objJsonResult.count = 1;
WebAPI/Controllers/SCGL/Èռƻ®¹ÜÀí/JIT_Cg_PODemandPlanBillController.cs
@@ -522,7 +522,7 @@
            {
                List<object> a = new List<object>();
                //查看权限
                if (!DBUtility.ClsPub.Security_Log("JIT_Cg_PODemandPlanBill_Query", 1, false, user))
                if (!DBUtility.ClsPub.Security_Log("JIT_ReportPODemandPlanBillList_S", 1, false, user))
                {
                    objJsonResult.code = "0";
                    objJsonResult.count = 0;
@@ -530,9 +530,15 @@
                    objJsonResult.data = null;
                    return objJsonResult;
                }
                //查看供应商权限
                if (DBUtility.ClsPub.Security_Log("JIT_ReportPODemandPlanBillList_AllSup", 1, false, user))
                {
                    user = "0";
                }
                ReportPODemandPlanBill Report = JsonConvert.DeserializeObject<ReportPODemandPlanBill>(sWhere);
                ds = oCN.RunProcReturn($"exec h_p_JIT_PODemandPlanBill_ReportList {Report.HORGID},'{Report.HBEGINDATE}','{Report.HENDDATE}',{Report.HMATERIALID},{Report.HSUPPLIERID},'{Report.HXQD}','{Report.HPURORDERNO}' ", "h_p_JIT_PODemandPlanBill_ReportList");
                ds = oCN.RunProcReturn($"exec h_p_JIT_PODemandPlanBill_ReportList {Report.HORGID},'{Report.HBEGINDATE}','{Report.HENDDATE}',{Report.HMATERIALID},{Report.HSUPPLIERID},'{Report.HXQD}','{Report.HPURORDERNO}','{user}' ", "h_p_JIT_PODemandPlanBill_ReportList");
                foreach (DataColumn col in ds.Tables[0].Columns)//遍历ds中第一个表(Tables[0])的所有列(Columns)每次循环中,col变量会持有当前列的引用
                {
@@ -567,7 +573,7 @@
            try
            {
                //查看权限
                if (!DBUtility.ClsPub.Security_Log("JIT_Cg_PODemandPlanBill_Query", 1, false, user))
                if (!DBUtility.ClsPub.Security_Log("JIT_ReportPODemandPlanBillList_S", 1, false, user))
                {
                    objJsonResult.code = "0";
                    objJsonResult.count = 0;
@@ -575,8 +581,13 @@
                    objJsonResult.data = null;
                    return objJsonResult;
                }
                //查看供应商权限
                if (DBUtility.ClsPub.Security_Log("JIT_ReportPODemandPlanBillList_AllSup", 1, false, user))
                {
                    user = "0";
                }
                ds = oCN.RunProcReturn($"exec h_p_JIT_PODemandPlanBill_S_ReportList '{sWhere.ToString()}','{HBEGINDATE}','{HENDDATE}' ", "h_p_JIT_PODemandPlanBill_S_ReportList");
                ds = oCN.RunProcReturn($"exec h_p_JIT_PODemandPlanBill_S_ReportList '{sWhere.ToString()}','{HBEGINDATE}','{HENDDATE}','{user}' ", "h_p_JIT_PODemandPlanBill_S_ReportList");
                objJsonResult.code = "1";
                objJsonResult.count = 1;
WebAPI/Controllers/SCGL/Èռƻ®¹ÜÀí/JIT_CompleteController..cs
@@ -27,10 +27,20 @@
        /// <returns></returns>
        [Route("JIT_Complete/JIT_CompleteDetailList")]
        [HttpGet]
        public object JIT_CompleteDetailList(string sWhere, string HMainICMOEntryID,string HMainICMOInterID,string HICMOInterID)
        public object JIT_CompleteDetailList(string sWhere, string HMainICMOEntryID,string HMainICMOInterID,string HICMOInterID,string user)
        {
            try
            {
                //查看权限
                if (!DBUtility.ClsPub.Security_Log("JIT_CompleteMaterlDetailList", 1, false, user))
                {
                    objJsonResult.code = "0";
                    objJsonResult.count = 0;
                    objJsonResult.Message = "无查看权限!";
                    objJsonResult.data = null;
                    return objJsonResult;
                }
                string sql = "";
                if (HMainICMOEntryID != "-1" && HMainICMOInterID != "-1" && HICMOInterID != "-1")
                {
@@ -61,7 +71,6 @@
        /// 
        /// </summary>
        /// <param name="sWhere">查询条件</param>
        /// <param name="HMainICMOEntryID">生产订单明细表id</param>
        /// <returns></returns>
        [Route("JIT_Complete/JIT_CompleteMaterlDetailList")]
        [HttpGet]
@@ -189,16 +198,23 @@
            public string HMaterAtt; //物料属性
        }
        /// <summary>
        ///
        /// é½å¥—分析报表
        /// </summary>
        /// <returns></returns>
        [Route("JIT_Complete/ReportMOMaterReadysBillList")]
        [HttpGet]
        public object ReportMOMaterReadysBillList(string sWhere)
        public object ReportMOMaterReadysBillList(string sWhere,string user)
        {
            try
            {
                if (!DBUtility.ClsPub.Security_Log("JIT_ReportMOMaterReadysBillList", 1, false, user))
                {
                    objJsonResult.code = "0";
                    objJsonResult.count = 0;
                    objJsonResult.Message = "无查询权限!";
                    objJsonResult.data = null;
                    return objJsonResult;
                }
                ReportMOMaterReadysBill Report = JsonConvert.DeserializeObject<ReportMOMaterReadysBill>(sWhere);
                ds = oCN.RunProcReturn($"exec  PR_Complete_Report '{Report.HXQD}','{Report.HMOBILLNO}',{Report.HORGID},'{Report.HDeptID}',{Report.HSCZYID},{Report.HMATERIALID},'{Report.HBeginDate}','{Report.HEndDate}','{Report.HMaterAtt}'", "PR_Complete_Report");
@@ -219,5 +235,52 @@
            }
        }
        #endregion
        #region æ¬ æ–™æŠ¥è¡¨
        /// <summary>
        ///
        /// </summary>
        /// <returns></returns>
        [Route("JIT_Complete/MaterialLevelShorReportList")]
        [HttpGet]
        public object MaterialLevelShorReportList(string sWhere,string HBEGINDATE,string HENDDATE,string user)
        {
            try
            {
                List<object> columnNameList = new List<object>();
                if (!DBUtility.ClsPub.Security_Log("JIT_MaterialLevelShorAnalysisReport", 1, false, user))
                {
                    objJsonResult.code = "0";
                    objJsonResult.count = 0;
                    objJsonResult.Message = "无查询权限!";
                    objJsonResult.data = null;
                    return objJsonResult;
                }
                ds = oCN.RunProcReturn($"exec  h_p_JIT_MaterialLevelShorReportList '{sWhere}','{HBEGINDATE}','{HENDDATE}'", "h_p_JIT_MaterialLevelShorReportList");
                //添加列名
                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 = e.ToString();
                objJsonResult.data = null;
                return objJsonResult;
            }
        }
        #endregion
    }
}
WebAPI/Controllers/SCGL/Èռƻ®¹ÜÀí/JIT_DayPlanPlatFormBillController.cs
@@ -237,6 +237,8 @@
                        var HPlanQty = list[i]["计划数量"].ToString();
                        var HEmpID = list[i]["HEmpID"].ToString();
                        var HWorkQty = list[i]["小时产能"].ToString();
                        var HSourceName = list[i]["生产资源"].ToString();
                        var HWorkQty_ProdLine = list[i]["产线总产能"].ToString();
                        LogService.CustomWriteLog("2.05:" + i, DateTime.Now.ToString("yyyy-MM-dd"));
@@ -274,7 +276,7 @@
                            " HOrderNeedQty, HSplitQty, HDayPlanSumQty,HPlanBeginDate," +
                            "HSeOrderBillNo,HICMOBillType,HSourceStockInQty,HLeftPlanQty,HOrderLev,HPreparatDate," +
                            "HMainSourceInterID,HMainSourceEntryID,HICMOInterID_Sec,HICMOEntryID_Sec,HPlanQty" +
                            ",HICMOInterID,HICMOEntryID,HPlanEndDate,HEmpID,HWorkQty)values" +
                            ",HICMOInterID,HICMOEntryID,HPlanEndDate,HEmpID,HWorkQty,HSourceName,HWorkQty_ProdLine)values" +
                            $"({HInterID},'{HBillNo}',{DateTime.Now.Year},{DateTime.Now.Month},'{BillType}'," +
                            $"'{BillType}',GETDATE(),1,'{user}',getdate(),'{HICMOBillNo}','{HOrderType}'," +
                            $"{(HICMOEntrySEQ == "" ? 0.ToString() : HICMOEntrySEQ)},{(HWorkShopID == "" ? 0.ToString() : HWorkShopID)},{(HSourceID == "" ? 0.ToString() : HSourceID)}, {(HYX == "" ? 0.ToString() : HYX)}, {(HProdORGID == "" ? 0.ToString() : HProdORGID)}," +
@@ -282,7 +284,7 @@
                            $" 0, {(HSplitQty == "" ? 0.ToString() : HSplitQty)}, {(HDayPlanSumQty == "" ? 0.ToString() : HDayPlanSumQty)},'{HPlanBeginDate}'," +
                            $"'{HSeOrderBillNo}','{HICMOBillType}',{(HSourceStockInQty == "" ? 0.ToString() : HSourceStockInQty)},{(HLeftPlanQty == "" ? 0.ToString() : HLeftPlanQty)},'{HOrderLev}',getdate()," +
                            $"{HMainSourceInterID},{HMainSourceEntryID},{HMainSourceInterID},{HMainSourceEntryID},{HPlanQty}," +
                            $"{HMainSourceInterID},{HMainSourceEntryID},'{HPlanEndDate}','{HEmpID}','{HWorkQty}')";
                            $"{HMainSourceInterID},{HMainSourceEntryID},'{HPlanEndDate}','{HEmpID}','{HWorkQty}','{HSourceName}','{HWorkQty_ProdLine}')";
                        //LogService.Write("sql:" + sql);
                        //主表
@@ -308,6 +310,26 @@
                        var HOrderCommitDate = list[i]["订单交货期"].ToString();
                        var HPlanEndDate = list[i]["计划结束日期"].ToString();
                        var HSplitQty = list[i]["拆单数量"].ToString();
                        var HSourceName = list[i]["生产资源"].ToString();
                        var HWorkQty_ProdLine = list[i]["产线总产能"].ToString();
                        var HOrderType = list[i]["订单类型"].ToString();
                        var HWorkShopID = list[i]["HWorkShopID"].ToString();
                        var HProdORGID = list[i]["HProdORGID"].ToString();
                        var HMaterID = list[i]["HMaterID"].ToString();
                        var HMaterName = list[i]["物料名称"].ToString();
                        var HMaterModel = list[i]["规格型号"].ToString().Replace("'", "''");
                        var HUnitID = list[i]["HUnitID"].ToString();
                        var HSeOrderBillQty = list[i]["销售订单数量"].ToString();
                        var HDayPlanSumQty = list[i]["日计划数量总量"].ToString();
                        var HPlanBeginDate = list[i]["计划开始日期"].ToString();
                        var HSeOrderBillNo = list[i]["销售订单号"].ToString();
                        var HICMOBillType = list[i]["生产订单单据类型"].ToString();
                        var HSourceStockInQty = list[i]["产线入库数量"].ToString();
                        var HLeftPlanQty = list[i]["未排数量"].ToString();
                        var HOrderLev = list[i]["订单等级"].ToString();
                        var HPlanQty = list[i]["计划数量"].ToString();
                        var HEmpID = list[i]["HEmpID"].ToString();
                        LogService.CustomWriteLog("2.1:"+i, DateTime.Now.ToString("yyyy-MM-dd"));
                        
@@ -333,26 +355,141 @@
                            return objJsonResult;
                        }
                        ds = oCN.RunProcReturn($"select HInterID,HICMOBillNo from Sc_WorkBillSortBillMain with(nolock) where HMainSourceInterID={HMainSourceInterID}" +
                              $" and HMainSourceEntryID={HMainSourceEntryID} and HICMOBillNo='{HICMOBillNo}' and HICMOEntrySEQ={HICMOEntrySEQ} and HSourceID={HSourceID}", "Sc_WorkBillSortBillMain");
                        if (ds.Tables[0].Rows.Count > 1)
                        if (oSystemParameter.omodel.WMS_CampanyName == "添康科技") //系统参数  å®¢æˆ·å®šåˆ¶åŒ–名称     ç©ºç™½ä¸ºé€šç”¨
                        {
                            LogService.CustomWriteLog("第" + i + 1 + "行生产资源有重复,请修改", DateTime.Now.ToString("yyyy-MM-dd"));
                            LogService.CustomWriteLog($"select * from  Sc_WorkBillSortBillMain where HMainSourceInterID={HMainSourceInterID}" +
                              $" and HMainSourceEntryID={HMainSourceEntryID} and HICMOBillNo='{HICMOBillNo}' and HICMOEntrySEQ={HICMOEntrySEQ} and HSourceID={HSourceID}", DateTime.Now.ToString("yyyy-MM-dd"));
                            objJsonResult.code = "0";
                            objJsonResult.count = 0;
                            objJsonResult.Message = $"第{i + 1}行生产资源有重复,请修改!";
                            objJsonResult.data = null;
                            return objJsonResult;
                        }
                        LogService.CustomWriteLog("2.2:" + i, DateTime.Now.ToString("yyyy-MM-dd"));
                            //看有几台生产资源协同生产
                            string[] HSourceNameArr = HSourceName.Split(new char[]{'&'});
                        oCN.RunProc($"update Sc_WorkBillSortBillMain set HSourceID={(HSourceID == "" ? 0.ToString() : HSourceID)},HYX={HYX}" +
                            $",HWorkQty={HWorkQty},HProdTimes={HProdTimes},HReadyTimes={HReadyTimes},HLastBeginDate='{HLastBeginDate}'" +
                            $",HLastEndDate='{HLastEndDate}',HOrderNeedQty={HOrderNeedQty},HOrderCommitDate='{HOrderCommitDate}',HPlanEndDate='{HPlanEndDate}',HSplitQty={HSplitQty}" +
                            $" where HInterID={list[i]["hmainid"].ToString()} and HBillNo='{list[i]["单据号"].ToString()}'");
                            if (HSourceNameArr.Length >= 2)
                            {
                                for (int s = 0; s < HSourceNameArr.Length; s++)
                                {
                                    if (s == 0)
                                    {
                                        ds = oCN.RunProcReturn("select HItemID from Gy_Source with(nolock) where HName = '" + HSourceNameArr[s] + "'", "Gy_Source");
                                        var HSourceID_Child = ds.Tables[0].Rows[0]["HItemID"];
                                        oCN.RunProc($"update Sc_WorkBillSortBillMain set HSourceID={(HSourceID_Child == "" ? 0.ToString() : HSourceID_Child)}" +
                                            $",HYX={HYX},HWorkQty={HWorkQty},HProdTimes={HProdTimes},HReadyTimes={HReadyTimes},HLastBeginDate='{HLastBeginDate}'" +
                                            $",HLastEndDate='{HLastEndDate}',HOrderNeedQty={HOrderNeedQty},HOrderCommitDate='{HOrderCommitDate}'" +
                                            $",HPlanEndDate='{HPlanEndDate}',HSplitQty={HSplitQty},HSourceName='{HSourceName}',HWorkQty_ProdLine={HWorkQty_ProdLine}" +
                                            $" where HInterID={list[i]["hmainid"].ToString()} and HBillNo='{list[i]["单据号"].ToString()}'");
                                    }
                                    else
                                    {
                                        ds = oCN.RunProcReturn("select HItemID from Gy_Source with(nolock) where HName = '" + HSourceNameArr[s] + "'", "Gy_Source");
                                        var HSourceID_Child = ds.Tables[0].Rows[0]["HItemID"];
                                        //新增协同生产资源的排产记录
                                        ds = oCN.RunProcReturn($"select HInterID,HICMOBillNo from Sc_WorkBillSortBillMain with(nolock) where HMainSourceInterID={HMainSourceInterID}" +
                           $" and HMainSourceEntryID={HMainSourceEntryID} and HICMOBillNo='{HICMOBillNo}' and HICMOEntrySEQ={HICMOEntrySEQ} and HSourceID={HSourceID_Child}", "Sc_WorkBillSortBillMain");
                                        if (ds.Tables[0].Rows.Count > 0)
                                        {
                                            objJsonResult.code = "0";
                                            objJsonResult.count = 0;
                                            objJsonResult.Message = $"第{i + 1}行生产资源有重复,请修改!";
                                            objJsonResult.data = null;
                                            return objJsonResult;
                                        }
                                        //新增单据号 id
                                        var HBillNo_New = DBUtility.ClsPub.CreateBillCode_Prod(BillType, ref DBUtility.ClsPub.sExeReturnInfo, true);//获得一个新的单据号
                                        var HInterID_New = DBUtility.ClsPub.CreateBillID_Prod(BillType, ref DBUtility.ClsPub.sExeReturnInfo);//获得一个新的id
                                        string sql = $"insert into Sc_WorkBillSortBillMain(HInterID,HBillNo,HYear,HPeriod,HBillType," +
                                            "HBillSubType,HDate,HBillStatus,HMaker,HMakeDate,HICMOBillNo,HOrderType," +
                                            "HICMOEntrySEQ,HWorkShopID,HSourceID, HYX, HProdORGID," +
                                            " HMaterID, HMaterName, HMaterModel, HUnitID, HSeOrderBillQty," +
                                            " HOrderNeedQty, HSplitQty, HDayPlanSumQty,HPlanBeginDate," +
                                            "HSeOrderBillNo,HICMOBillType,HSourceStockInQty,HLeftPlanQty,HOrderLev,HPreparatDate," +
                                            "HMainSourceInterID,HMainSourceEntryID,HICMOInterID_Sec,HICMOEntryID_Sec,HPlanQty" +
                                            ",HICMOInterID,HICMOEntryID,HPlanEndDate,HEmpID,HWorkQty,HSourceName,HWorkQty_ProdLine,HRemark)values" +
                                            $"({HInterID_New},'{HBillNo_New}',{DateTime.Now.Year},{DateTime.Now.Month},'{BillType}'," +
                                            $"'{BillType}',GETDATE(),1,'{user}',getdate(),'{HICMOBillNo}','{HOrderType}'," +
                                            $"{(HICMOEntrySEQ == "" ? 0.ToString() : HICMOEntrySEQ)},{(HWorkShopID == "" ? 0.ToString() : HWorkShopID)},{(HSourceID_Child == "" ? 0.ToString() : HSourceID_Child)}, {(HYX == "" ? 0.ToString() : HYX)}, {(HProdORGID == "" ? 0.ToString() : HProdORGID)}," +
                                            $" {(HMaterID == "" ? 0.ToString() : HMaterID)}, '{HMaterName}', '{HMaterModel}', {(HUnitID == "" ? 0.ToString() : HUnitID)}, {(HSeOrderBillQty == "" ? 0.ToString() : HSeOrderBillQty)}," +
                                            $" 0, {(HSplitQty == "" ? 0.ToString() : HSplitQty)}, {(HDayPlanSumQty == "" ? 0.ToString() : HDayPlanSumQty)},'{HPlanBeginDate}'," +
                                            $"'{HSeOrderBillNo}','{HICMOBillType}',{(HSourceStockInQty == "" ? 0.ToString() : HSourceStockInQty)},{(HLeftPlanQty == "" ? 0.ToString() : HLeftPlanQty)},'{HOrderLev}',getdate()," +
                                            $"{HMainSourceInterID},{HMainSourceEntryID},{HMainSourceInterID},{HMainSourceEntryID},{HPlanQty}," +
                                            $"{HMainSourceInterID},{HMainSourceEntryID},'{HPlanEndDate}','{HEmpID}','{HWorkQty}','{HSourceName}','{HWorkQty_ProdLine}','{"协同生产"}')";
                                        //LogService.Write("sql:" + sql);
                                        //主表
                                        oCN.RunProc(sql);
                                        //插入子表数据
                                        for (int j = 0; j < 180; j++)
                                        {
                                            //主表有数据 å­è¡¨æ— æ•°æ®
                                            //if (j == 180 - 1 && SumCount == 0 && HInterID_New != 0 && HBillNo_New != "")
                                            //{
                                            //    objJsonResult = AddBillSub(HInterID_New.ToString(), HBillNo_New, DateTime.Parse(DateTime.Now.ToString("yyyy-MM-dd").ToString()), 0, list[i]);
                                            //}
                                            if (list[i][DateTime.Now.AddDays(j).ToString("yyyy-MM-dd")].ToString() != "")
                                            {
                                                ////保存子表
                                                objJsonResult = AddBillSub(HInterID_New == 0 ? list[i]["hmainid"].ToString() : HInterID_New.ToString()
                                                    , HBillNo_New == "" ? list[i]["单据号"].ToString() : HBillNo_New
                                                     , DateTime.Parse(DateTime.Now.AddDays(j).ToString("yyyy-MM-dd").ToString())
                                                     , 0
                                                     , list[i]);
                                            }
                                        }
                                    }
                                }
                            }
                            else
                            {
                                ds = oCN.RunProcReturn($"select HInterID,HICMOBillNo from Sc_WorkBillSortBillMain with(nolock) where HMainSourceInterID={HMainSourceInterID}" +
                             $" and HMainSourceEntryID={HMainSourceEntryID} and HICMOBillNo='{HICMOBillNo}' and HICMOEntrySEQ={HICMOEntrySEQ} and HSourceID={HSourceID}", "Sc_WorkBillSortBillMain");
                                if (ds.Tables[0].Rows.Count > 1)
                                {
                                    LogService.CustomWriteLog("第" + i + 1 + "行生产资源有重复,请修改", DateTime.Now.ToString("yyyy-MM-dd"));
                                    LogService.CustomWriteLog($"select * from  Sc_WorkBillSortBillMain where HMainSourceInterID={HMainSourceInterID}" +
                                      $" and HMainSourceEntryID={HMainSourceEntryID} and HICMOBillNo='{HICMOBillNo}' and HICMOEntrySEQ={HICMOEntrySEQ} and HSourceID={HSourceID}", DateTime.Now.ToString("yyyy-MM-dd"));
                                    objJsonResult.code = "0";
                                    objJsonResult.count = 0;
                                    objJsonResult.Message = $"第{i + 1}行生产资源有重复,请修改!";
                                    objJsonResult.data = null;
                                    return objJsonResult;
                                }
                                LogService.CustomWriteLog("2.2:" + i, DateTime.Now.ToString("yyyy-MM-dd"));
                                oCN.RunProc($"update Sc_WorkBillSortBillMain set HSourceID={(HSourceID == "" ? 0.ToString() : HSourceID)},HYX={HYX}" +
                                    $",HWorkQty={HWorkQty},HProdTimes={HProdTimes},HReadyTimes={HReadyTimes},HLastBeginDate='{HLastBeginDate}'" +
                                    $",HLastEndDate='{HLastEndDate}',HOrderNeedQty={HOrderNeedQty},HOrderCommitDate='{HOrderCommitDate}',HPlanEndDate='{HPlanEndDate}',HSplitQty={HSplitQty},HSourceName='{HSourceName}',HWorkQty_ProdLine={HWorkQty_ProdLine}" +
                                    $" where HInterID={list[i]["hmainid"].ToString()} and HBillNo='{list[i]["单据号"].ToString()}'");
                            }
                        }
                        else
                        {
                            ds = oCN.RunProcReturn($"select HInterID,HICMOBillNo from Sc_WorkBillSortBillMain with(nolock) where HMainSourceInterID={HMainSourceInterID}" +
                             $" and HMainSourceEntryID={HMainSourceEntryID} and HICMOBillNo='{HICMOBillNo}' and HICMOEntrySEQ={HICMOEntrySEQ} and HSourceID={HSourceID}", "Sc_WorkBillSortBillMain");
                            if (ds.Tables[0].Rows.Count > 1)
                            {
                                LogService.CustomWriteLog("第" + i + 1 + "行生产资源有重复,请修改", DateTime.Now.ToString("yyyy-MM-dd"));
                                LogService.CustomWriteLog($"select * from  Sc_WorkBillSortBillMain where HMainSourceInterID={HMainSourceInterID}" +
                                  $" and HMainSourceEntryID={HMainSourceEntryID} and HICMOBillNo='{HICMOBillNo}' and HICMOEntrySEQ={HICMOEntrySEQ} and HSourceID={HSourceID}", DateTime.Now.ToString("yyyy-MM-dd"));
                                objJsonResult.code = "0";
                                objJsonResult.count = 0;
                                objJsonResult.Message = $"第{i + 1}行生产资源有重复,请修改!";
                                objJsonResult.data = null;
                                return objJsonResult;
                            }
                            LogService.CustomWriteLog("2.2:" + i, DateTime.Now.ToString("yyyy-MM-dd"));
                            oCN.RunProc($"update Sc_WorkBillSortBillMain set HSourceID={(HSourceID == "" ? 0.ToString() : HSourceID)},HYX={HYX}" +
                                $",HWorkQty={HWorkQty},HProdTimes={HProdTimes},HReadyTimes={HReadyTimes},HLastBeginDate='{HLastBeginDate}'" +
                                $",HLastEndDate='{HLastEndDate}',HOrderNeedQty={HOrderNeedQty},HOrderCommitDate='{HOrderCommitDate}',HPlanEndDate='{HPlanEndDate}',HSplitQty={HSplitQty},HSourceName='{HSourceName}',HWorkQty_ProdLine={HWorkQty_ProdLine}" +
                                $" where HInterID={list[i]["hmainid"].ToString()} and HBillNo='{list[i]["单据号"].ToString()}'");
                        }
                    }
                    oCN.RunProc($"update Sc_WorkBillSortBillMain set HDayPlanSumQty={list[i]["日计划数量总量"].ToString()} where HInterID={(HInterID==0?int.Parse(list[i]["hmainid"].ToString()):HInterID)} and HBillNo='{(HBillNo==""?list[i]["单据号"].ToString(): HBillNo)}'");
@@ -3058,11 +3195,11 @@
        #region é€šè¿‡ç‰©æ–™åŒ¹é…äº§å“å™¨å…·æ¸…单
        [Route("JIT_DayPlanPlatFormBill/GetMouldByMater")]
        [HttpGet]
        public object GetMouldByMater(string HMaterID,string HSourceID)
        public object GetMouldByMater(string HMaterID,string HSourceID,string HPCDate)
        {
            try
            {
                ds = oCN.RunProcReturn("exec h_p_Gy_MaterialMouldByMater " + HMaterID + "," + HSourceID, "h_p_Gy_MaterialMouldByMater");
                ds = oCN.RunProcReturn("exec h_p_Gy_MaterialMouldByMater " + HMaterID + "," + HSourceID + ",'" + HPCDate + "'", "h_p_Gy_MaterialMouldByMater");
                objJsonResult.code = "1";
                objJsonResult.count = 1;
@@ -3110,11 +3247,37 @@
        #region æŽ’产后将器具占用时间写入数据库
        [Route("JIT_DayPlanPlatFormBill/AddMouldOccupancyTime")]
        [HttpGet]
        public object AddMouldOccupancyTime(string HMouldID, string HSourceID, string HICMOInterID, string HICMOEntryID, string HMouldPCTime)
        public object AddMouldOccupancyTime(string HMouldID, string HSourceID, string HICMOInterID, string HICMOEntryID, string HICMOBillNo, string HMouldPCTime)
        {
            try
            {
                ds = oCN.RunProcReturn("exec h_p_JIT_AddMouldOccupancyTime " + HMouldID + "," + HSourceID + "," + HICMOInterID + "," + HICMOEntryID + ",'" + HMouldPCTime + "'", "h_p_JIT_AddMouldOccupancyTime");
                ds = oCN.RunProcReturn("exec h_p_JIT_AddMouldOccupancyTime " + HMouldID + "," + HSourceID + "," + HICMOInterID + "," + HICMOEntryID + ",'" + HICMOBillNo  + "','" + HMouldPCTime + "'", "h_p_JIT_AddMouldOccupancyTime");
                objJsonResult.code = "1";
                objJsonResult.count = 1;
                objJsonResult.Message = "Sucess!";
                objJsonResult.data = "";
                return objJsonResult;
            }
            catch (Exception e)
            {
                objJsonResult.code = "0";
                objJsonResult.count = 0;
                objJsonResult.Message = "Exception!" + e.ToString();
                objJsonResult.data = null;
                return objJsonResult;
            }
        }
        #endregion
        #region é€šè¿‡ä¸»èµ„源匹配子资源
        [Route("JIT_DayPlanPlatFormBill/GetChildSource")]
        [HttpGet]
        public object GetChildSource(string HSourceID)
        {
            try
            {
                ds = oCN.RunProcReturn("select HItemID å­èµ„源ID,HNumber å­èµ„源代码,HName å­èµ„源名称,HCubicleQty å­èµ„源工位数 from Gy_Source with(nolock) where HParentID = " + HSourceID + " order by HName asc", "Gy_Source");
                objJsonResult.code = "1";
                objJsonResult.count = 1;
@@ -3133,5 +3296,85 @@
        }
        #endregion
        #region åˆ¤æ–­ç‰©æ–™æ˜¯å¦å¯ä»¥æ”¾åœ¨åŒä¸€èµ„源上一起生产
        [Route("JIT_DayPlanPlatFormBill/GetSourceByMater")]
        [HttpGet]
        public object GetSourceByMater(string HMaterID)
        {
            try
            {
                ds = oCN.RunProcReturn("exec h_p_Sc_ICMOGetWorkSource_TK " + HMaterID + ",'',''", "h_p_Sc_ICMOGetWorkSource_TK");
                objJsonResult.code = "1";
                objJsonResult.count = 1;
                objJsonResult.Message = "Sucess!";
                objJsonResult.data = ds.Tables[0];
                return objJsonResult;
            }
            catch (Exception e)
            {
                objJsonResult.code = "0";
                objJsonResult.count = 0;
                objJsonResult.Message = "Exception!" + e.ToString();
                objJsonResult.data = null;
                return objJsonResult;
            }
        }
        #endregion
        #region å·¥åºè´Ÿè·åˆ†æžæ±‡æ€»æŠ¥è¡¨ æŸ¥è¯¢
        /// <summary>
        /// è¿”回项目阶段列表
        ///参数:string sql。
        ///返回值:object。
        /// </summary>
        [Route("JIT_DayPlanPlatFormBill/JIT_FuHeFenXiReport")]
        [HttpGet]
        public object JIT_FuHeFenXiReport(string sWhere, string user)
        {
            try
            {
                //查看权限
                if (!DBUtility.ClsPub.Security_Log("JIT_FuHeFenXiReport", 1, false, user))
                {
                    objJsonResult.code = "0";
                    objJsonResult.count = 0;
                    objJsonResult.Message = "无查看权限!";
                    objJsonResult.data = null;
                    return objJsonResult;
                }
                List<object> columnNameList = new List<object>();
                string sql = "exec h_p_JIT_FuHeFenXiReport   '" + sWhere + "','" + user + "'";
                ds = oCN.RunProcReturn(sql, "h_p_JIT_FuHeFenXiReport");
                //添加列名
                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;
            }
        }
        #endregion
    }
}
WebAPI/Controllers/WebAPIController.cs
@@ -18287,7 +18287,7 @@
                ds = oCN.RunProcReturn("select  top 1 * from h_v_Gy_QCCheckProjectList_Main where ç‰©æ–™åç§°='"+HName+ "' and å·¥åºåç§°='" + HProName + "' and HSourceID='" + HSourceID + "'   order by æ—¥æœŸ desc ", "h_v_Gy_QCCheckProjectList_Main");
                if (ds == null || ds.Tables[0].Rows.Count <= 0)
                {
                    ds = oCN.RunProcReturn("select  top 1 * from h_v_Gy_QCCheckProjectList_Main where ç‰©æ–™åç§°='" + HName + "' and å·¥åºåç§°='" + HProName + "'  order by æ—¥æœŸ desc ", "h_v_Gy_QCCheckProjectList_Main");
                    ds = oCN.RunProcReturn("select  top 1 * from h_v_Gy_QCCheckProjectList_Main where ç‰©æ–™åç§°='" + HName + "' and  ='" + HProName + "'  order by æ—¥æœŸ desc ", "h_v_Gy_QCCheckProjectList_Main");
                }
                if (ds == null || ds.Tables[0].Rows.Count <= 0)
                {
WebAPI/Controllers/XSGL/Crm_ComplainVisitBillController.cs
New file
@@ -0,0 +1,978 @@
using Newtonsoft.Json;
using Newtonsoft.Json.Linq;
using Pub_Class;
using System;
using System.Collections;
using System.Collections.Generic;
using System.Data;
using System.Data.SqlClient;
using System.Web.Http;
using WebAPI.Models;
namespace WebAPI.Controllers
{
    //客户拜访记录单Controller
    public class Crm_ComplainVisitBillController : ApiController
    {
        //客户拜访记录单
        //获取系统参数    Crm_ComplainVisitBillMain
        Pub_Class.ClsXt_SystemParameter oSystemParameter = new Pub_Class.ClsXt_SystemParameter();
        public DBUtility.ClsPub.Enum_BillStatus BillStatus;
        public DAL.ClsCrm_ComplainVisitBill BillOld = new DAL.ClsCrm_ComplainVisitBill();
        public DAL.ClsCrm_ComplainVisitBill BillNew0 = new DAL.ClsCrm_ComplainVisitBill();
        private json objJsonResult = new json();
        SQLHelper.ClsCN oCN = new SQLHelper.ClsCN();
        DataSet ds;
        #region å®¢æˆ·æ‹œè®¿è®°å½•单 æŸ¥è¯¢
        /// <summary>
        /// è¿”回项目阶段列表
        ///参数:string sql。
        ///返回值:object。
        /// </summary>
        [Route("Crm_ComplainVisitBill/Crm_ComplainVisitBillMainList")]
        [HttpGet]
        public object Crm_ComplainVisitBillMainList(string sWhere, string user)
        {
            try
            {
                List<object> columnNameList = new List<object>();
                //查看权限
                if (!DBUtility.ClsPub.Security_Log("Crm_ComplainVisitBill_Query", 1, false, user))
                {
                    objJsonResult.code = "0";
                    objJsonResult.count = 0;
                    objJsonResult.Message = "无查看权限!";
                    objJsonResult.data = null;
                    return objJsonResult;
                }
                if (sWhere == null || sWhere.Equals(""))
                {
                    ds = oCN.RunProcReturn("select * from h_v_Crm_ComplainVisitBillMainList order by å•据号 desc", "h_v_Crm_ComplainVisitBillMainList");
                }
                else
                {
                    string sql1 = "select * from h_v_Crm_ComplainVisitBillMainList where 1 = 1 ";
                    string sql = sql1 + sWhere + " order by å•据号 desc";
                    ds = oCN.RunProcReturn(sql, "h_v_Crm_ComplainVisitBillMainList");
                }
                //添加列名
                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;
            }
        }
        #endregion
        #region å®¢æˆ·æ‹œè®¿è®°å½•单  ä¿å­˜ æ–°å¢ž/编辑
        [Route("Crm_ComplainVisitBill/SaveCrm_ComplainVisitBillMain")]
        [HttpPost]
        public object SaveCrm_ComplainVisitBillMain([FromBody] JObject msg)
        {
            var _value = msg["msg"].ToString();
            string msg1 = _value.ToString();
            string[] sArray = msg1.Split(new string[] { ";" }, StringSplitOptions.RemoveEmptyEntries);
            string msg2 = sArray[0].ToString();
            string refSav = sArray[1].ToString();//操作方式数据类型 1添加 3修改 2 å¤åˆ¶
            string msg4 = sArray[2].ToString();//用户名
            DBUtility.ClsPub.CurUserName = msg4;
            string UserName = "";
            string s = "";
            ListModels oListModels = new ListModels();
            try
            {
                //编辑权限
                if (!DBUtility.ClsPub.Security_Log_second("Crm_ComplainVisitBill_Edit", 1, false, msg4))
                {
                    objJsonResult.code = "0";
                    objJsonResult.count = 0;
                    objJsonResult.Message = "无保存权限!";
                    objJsonResult.data = null;
                    return objJsonResult;
                }
                DAL.ClsCrm_ComplainVisitBill oBill = new DAL.ClsCrm_ComplainVisitBill();
                List<Model.ClsCrm_ComplainVisitBillMain> lsmain = new List<Model.ClsCrm_ComplainVisitBillMain>();
                msg2 = msg2.Replace("\\", "");
                msg2 = msg2.Replace("\n", "");  //\n
                lsmain = oListModels.getObjectByJson_Crm_ComplainVisitBillMain(msg2);
                foreach (Model.ClsCrm_ComplainVisitBillMain oItem in lsmain)
                {
                    if (refSav == "Add")
                    {
                        //单据号是否重复
                        if (BillNew0.IsExistBillNo(ref ClsPub.sExeReturnInfo, oItem.HBillNo, BillStatus, BillOld.omodel.HInterID))
                        {
                            objJsonResult.code = "0";
                            objJsonResult.count = 0;
                            objJsonResult.Message = "单据号重复!不允许保存!";
                            objJsonResult.data = 1;
                            return objJsonResult;
                        }
                    }
                    if (refSav == "Update")
                    {
                        if (BillOld.ShowBill(oItem.HInterID, ref s) == false)
                        {
                            objJsonResult.code = "0";
                            objJsonResult.count = 0;
                            objJsonResult.Message = "此单据有误!";
                            objJsonResult.data = 1;
                            return objJsonResult;
                        }
                        //判断是否可编辑
                        if (BillOld.omodel.HChecker != "" && BillOld.omodel.HChecker != null)
                        {
                            objJsonResult.code = "0";
                            objJsonResult.count = 0;
                            objJsonResult.Message = "此单据已经被审核,不允许修改!";
                            objJsonResult.data = 1;
                            return objJsonResult;
                        }
                        if (BillOld.omodel.HBillStatus > 1)
                        {
                            objJsonResult.code = "0";
                            objJsonResult.count = 0;
                            objJsonResult.Message = "此单据处于不可编辑状态,不允许修改!";
                            objJsonResult.data = 1;
                            return objJsonResult;
                        }
                        if (!DBUtility.Xt_BaseBillFun.Fun_AllowEditBill(BillOld, ref s))
                        {
                            objJsonResult.code = "0";
                            objJsonResult.count = 0;
                            objJsonResult.Message = s + ",不允许修改";
                            objJsonResult.data = 1;
                            return objJsonResult;
                        }
                    }
                    UserName = oItem.HMaker;  //制单人
                    oItem.HBillType = "4099";
                    oItem.HBillSubType = "4099";
                    oItem.HYear = DBUtility.ClsPub.isLong(DateTime.Now.Year);
                    oItem.HPeriod = DBUtility.ClsPub.isLong(DateTime.Now.Month);
                    oItem.HMakeDate = DBUtility.ClsPub.isStrNull(DateTime.Now.ToString("yyyy-MM-dd"));
                    if (DBUtility.ClsPub.isStrNull(oItem.HDate) == "")
                    {
                        objJsonResult.code = "0";
                        objJsonResult.count = 0;
                        objJsonResult.Message = "保存失败!没有单据日期,无法保存!";
                        objJsonResult.data = 1;
                        return objJsonResult;
                    }
                    oBill.omodel = oItem;
                }
                //进行 ä¼šè®¡æœŸé—´ ç»“è´¦ çš„判断和控制
                int sYear = 0;
                int sPeriod = 0;
                DateTime HDate = DateTime.Now;
                if (DBUtility.Xt_BaseBillFun.Fun_AllowYearPeriod(HDate, ref sYear, ref sPeriod, ref s) == false)
                {
                    objJsonResult.Message = s;
                    return objJsonResult;
                }
                //保存
                //保存完毕后处理
                bool bResult;
                if (refSav == "Add")
                {
                    bResult = oBill.AddBill(ref DBUtility.ClsPub.sExeReturnInfo);
                }
                else if (refSav == "Update")
                {
                    bResult = oBill.ModifyBill(oBill.omodel.HInterID, ref DBUtility.ClsPub.sExeReturnInfo);
                }
                else
                {
                    bResult = false;
                }
                if (bResult)
                {
                    objJsonResult.code = "0";
                    objJsonResult.count = 1;
                    objJsonResult.Message = "保存成功!";
                    objJsonResult.data = 1;
                    return objJsonResult;
                }
                else
                {
                    objJsonResult.code = "0";
                    objJsonResult.count = 0;
                    objJsonResult.Message = "保存失败!" + DBUtility.ClsPub.sExeReturnInfo;
                    objJsonResult.data = 1;
                    return objJsonResult;
                }
            }
            catch (Exception e)
            {
                objJsonResult.code = "0";
                objJsonResult.count = 0;
                objJsonResult.Message = "保存失败!" + e.ToString();
                objJsonResult.data = 1;
                return objJsonResult;
            }
        }
        #endregion
        #region å®¢æˆ·æ‹œè®¿è®°å½•单   ç¼–辑页面初始化
        [Route("Crm_ComplainVisitBill/Crm_ComplainVisitBillMainEditList")]
        [HttpGet]
        public object Crm_ComplainVisitBillMainEditList(long HInterID)
        {
            try
            {
                List<DataTable> tableList = new List<DataTable>();
                //返回列表信息
                ds = oCN.RunProcReturn("select * from h_v_Crm_ComplainVisitBillMainEdit where 1=1 and HInterID=" + HInterID , "h_v_Crm_ComplainVisitBillMainEdit");
                if (ds == null || ds.Tables[0].Rows.Count == 0)
                {
                    objJsonResult.code = "0";
                    objJsonResult.count = 0;
                    objJsonResult.Message = "未查询到信息,请刷新数据后重新选择!";
                    objJsonResult.data = null;
                    return objJsonResult;
                }
                else
                {
                    objJsonResult.code = "1";
                    objJsonResult.count = 1;
                    objJsonResult.Message = "成功!";
                    objJsonResult.data = ds.Tables[0];
                    return objJsonResult;
                }
            }
            catch (Exception e)
            {
                objJsonResult.code = "0";
                objJsonResult.count = 0;
                objJsonResult.Message = "Exception!" + e.ToString();
                objJsonResult.data = null;
                return objJsonResult;
            }
        }
        #endregion
        #region å®¢æˆ·æ‹œè®¿è®°å½•单   åˆ é™¤
        /// <summary>
        ///参数:string HInterID。
        ///返回值:object。
        /// </summary>
        [Route("Crm_ComplainVisitBill/DeleteCrm_ComplainVisitBillMain")]
        [HttpGet]
        public object DeleteCrm_ComplainVisitBillMain(string HInterID, string user)
        {
            try
            {
                string s = "";
                //查看权限
                if (!DBUtility.ClsPub.Security_Log("Crm_ComplainVisitBill_Delete", 1, false, user))
                {
                    objJsonResult.code = "0";
                    objJsonResult.count = 0;
                    objJsonResult.Message = "无删除权限!";
                    objJsonResult.data = null;
                    return objJsonResult;
                }
                if (HInterID == null || HInterID.Equals(""))
                {
                    objJsonResult.code = "0";
                    objJsonResult.count = 0;
                    objJsonResult.Message = "HInterID不能为空!";
                    objJsonResult.data = null;
                    return objJsonResult;
                }
                if (BillOld.ShowBill(long.Parse(HInterID), ref s) == false)
                {
                    objJsonResult.code = "0";
                    objJsonResult.count = 0;
                    objJsonResult.Message = "此单据有误!";
                    objJsonResult.data = 1;
                    return objJsonResult;
                }
                //判断是否可删除
                if (BillOld.omodel.HChecker != "" && BillOld.omodel.HChecker != null)
                {
                    objJsonResult.code = "0";
                    objJsonResult.count = 0;
                    objJsonResult.Message = "此单据已经被审核,不允许删除!";
                    objJsonResult.data = 1;
                    return objJsonResult;
                }
                //判断是否是创建状态进行删除
                if (int.Parse(BillOld.omodel.HBillStatus.ToString()) <= 1)
                {
                    //进行 ä¼šè®¡æœŸé—´ ç»“è´¦ çš„判断和控制
                    int sYear = 0;
                    int sPeriod = 0;
                    DateTime HDate = DateTime.Now;
                    if (DBUtility.Xt_BaseBillFun.Fun_AllowYearPeriod(HDate, ref sYear, ref sPeriod, ref s) == false)
                    {
                        objJsonResult.Message = s;
                        return objJsonResult;
                    }
                    //删除前控制=========================================
                    string sql1 = "exec h_p_Crm_ComplainVisitBill_BeforeDelCtrl " + BillOld.omodel.HInterID + ",'" + BillOld.omodel.HBillNo + "','" + user + "'";
                    ds = oCN.RunProcReturn(sql1, "h_p_Crm_ComplainVisitBill_BeforeDelCtrl");
                    if (ds == null || ds.Tables.Count == 0 || ds.Tables[0].Rows.Count == 0)
                    {
                        objJsonResult.code = "0";
                        objJsonResult.count = 1;
                        objJsonResult.Message = "删除失败!原因:删除前判断失败,请与网络管理人员联系";
                        objJsonResult.data = null;
                        return objJsonResult;
                    }
                    if (ds.Tables[0].Rows[0]["HBack"].ToString() != "0")
                    {
                        objJsonResult.code = "0";
                        objJsonResult.count = 1;
                        objJsonResult.Message = "删除失败!原因:" + ds.Tables[0].Rows[0]["HRemark"].ToString(); ;
                        objJsonResult.data = null;
                        return objJsonResult;
                    }
                    //==================================================================================
                    oCN.BeginTran();
                    oCN.RunProc("delete from Crm_ComplainVisitBillMain where HInterID = " + HInterID);
                    oCN.RunProc("delete from Crm_ComplainVisitBillSub where HInterID= " + HInterID);
                    //删除后控制==================================================================================
                    string sql2 = "exec h_p_Crm_ComplainVisitBill_AfterDelCtrl " + BillOld.omodel.HInterID + ",'" + BillOld.omodel.HBillNo + "','" + user + "'";
                    ds = oCN.RunProcReturn(sql2, "h_p_Crm_ComplainVisitBill_AfterDelCtrl");
                    if (ds == null || ds.Tables.Count == 0 || ds.Tables[0].Rows.Count == 0)
                    {
                        s = "删除后判断失败,请与网络管理人员联系";
                        objJsonResult.code = "0";
                        objJsonResult.count = 1;
                        objJsonResult.Message = "删除失败!原因:" + s;
                        objJsonResult.data = null;
                        oCN.RollBack();
                        return objJsonResult;
                    }
                    if (ds.Tables[0].Rows[0]["HBack"].ToString() != "0")
                    {
                        s = ds.Tables[0].Rows[0]["HRemark"].ToString();
                        objJsonResult.code = "0";
                        objJsonResult.count = 1;
                        objJsonResult.Message = "删除失败!原因:" + s;
                        objJsonResult.data = null;
                        oCN.RollBack();
                        return objJsonResult;
                    }
                    //==============================================================================================
                    oCN.Commit();
                    objJsonResult.code = "1";
                    objJsonResult.count = 1;
                    objJsonResult.Message = "删除成功";
                    objJsonResult.data = null;
                    return objJsonResult;
                }
                else
                {
                    objJsonResult.code = "0";
                    objJsonResult.count = 0;
                    objJsonResult.Message = "此单据不是创建状态,不允许删除!";
                    objJsonResult.data = 1;
                    return objJsonResult;
                }
            }
            catch (Exception e)
            {
                oCN.RollBack();
                objJsonResult.code = "0";
                objJsonResult.count = 0;
                objJsonResult.Message = "Exception!" + e.ToString();
                objJsonResult.data = null;
                return objJsonResult;
            }
        }
        #endregion
        #region å®¢æˆ·æ‹œè®¿è®°å½•单   å®¡æ ¸/反审核
        /// <summary>
        /// </summary>
        /// <param name="HInterID">单据ID</param>
        /// <param name="IsAudit">审核(0),反审核(1)</param>
        /// <param name="CurUserName">审核人</param>
        /// <returns></returns>
        [Route("Crm_ComplainVisitBill/AuditCrm_ComplainVisitBillMain")]
        [HttpGet]
        public object AuditCrm_ComplainVisitBillMain(int HInterID, int IsAudit, string CurUserName)
        {
            string ModRightNameCheck = "Crm_ComplainVisitBill_Check";
            DBUtility.ClsPub.CurUserName = CurUserName;
            try
            {
                //审核权限
                if (!DBUtility.ClsPub.Security_Log_second(ModRightNameCheck, 1, false, CurUserName))
                {
                    objJsonResult.code = "0";
                    objJsonResult.count = 0;
                    objJsonResult.Message = "审核失败!无权限!";
                    objJsonResult.data = null;
                    return objJsonResult;
                }
                //HInterID数据判断
                if (HInterID <= 0)
                {
                    objJsonResult.code = "0";
                    objJsonResult.count = 0;
                    objJsonResult.Message = "HInterID小于0!";
                    objJsonResult.data = null;
                    return objJsonResult;
                }
                Int64 lngBillKey = 0;
                lngBillKey = DBUtility.ClsPub.isLong(HInterID);                                         //对HInterID进行类型的转换
                DAL.ClsCrm_ComplainVisitBill oBill = new DAL.ClsCrm_ComplainVisitBill();                              //实例化单据操作类,用于进行相关操作
                //针对需要进行的操作,检验当前单据的状态是否支持需要进行的操作
                if (oBill.ShowBill(lngBillKey, ref DBUtility.ClsPub.sExeReturnInfo))                    //根据HInterID获取该单据的数据
                {
                    if (oBill.omodel.HCloseMan.Trim() != "")
                    {
                        objJsonResult.code = "0";
                        objJsonResult.count = 0;
                        objJsonResult.Message = "单据已关闭!不能再次审核!";
                        objJsonResult.data = null;
                        return objJsonResult;
                    }
                    if (oBill.omodel.HDeleteMan.Trim() != "")
                    {
                        objJsonResult.code = "0";
                        objJsonResult.count = 0;
                        objJsonResult.Message = "单据已作废!不能再次审核!";
                        objJsonResult.data = null;
                        return objJsonResult;
                    }
                    if (IsAudit == 0)  //审核判断
                    {
                        if (oBill.omodel.HChecker.Trim() != "")
                        {
                            objJsonResult.code = "0";
                            objJsonResult.count = 0;
                            objJsonResult.Message = "单据已审核!不能再次审核!";
                            objJsonResult.data = null;
                            return objJsonResult;
                        }
                    }
                    if (IsAudit == 1) //反审核判断
                    {
                        if (oBill.omodel.HChecker.Trim() == "")
                        {
                            objJsonResult.code = "0";
                            objJsonResult.count = 0;
                            objJsonResult.Message = "单据未审核!不需要反审核!";
                            objJsonResult.data = null;
                            return objJsonResult;
                        }
                    }
                }
                else
                {
                    objJsonResult.code = "0";
                    objJsonResult.count = 0;
                    objJsonResult.Message = "单据不存在!原因:" + DBUtility.ClsPub.sExeReturnInfo;
                    objJsonResult.data = null;
                    return objJsonResult;
                }
                //进行需要进行的审核/反审核操作
                if (IsAudit == 0) //审核提交
                {
                    //进行 ä¼šè®¡æœŸé—´ ç»“è´¦ çš„判断和控制
                    string s = "";
                    int sYear = 0;
                    int sPeriod = 0;
                    DateTime HDate = DateTime.Now;
                    if (DBUtility.Xt_BaseBillFun.Fun_AllowYearPeriod(HDate, ref sYear, ref sPeriod, ref s) == false)
                    {
                        objJsonResult.Message = s;
                        return objJsonResult;
                    }
                    oCN.BeginTran();
                    //审核前控制=========================================
                    string sql1 = "exec h_p_Crm_ComplainVisitBill_BeforeCheckCtrl " + oBill.omodel.HInterID + ",'" + oBill.omodel.HBillNo + "','" + CurUserName + "'";
                    ds = oCN.RunProcReturn(sql1, "h_p_Crm_ComplainVisitBill_BeforeCheckCtrl");
                    if (ds == null || ds.Tables.Count == 0 || ds.Tables[0].Rows.Count == 0)
                    {
                        objJsonResult.code = "0";
                        objJsonResult.count = 1;
                        objJsonResult.Message = "审核失败!原因:审核前判断失败,请与网络管理人员联系";
                        objJsonResult.data = null;
                        oCN.RollBack();
                        return objJsonResult;
                    }
                    if (ds.Tables[0].Rows[0]["HBack"].ToString() != "0")
                    {
                        objJsonResult.code = "0";
                        objJsonResult.count = 1;
                        objJsonResult.Message = "审核失败!原因:" + ds.Tables[0].Rows[0]["HRemark"].ToString(); ;
                        objJsonResult.data = null;
                        oCN.RollBack();
                        return objJsonResult;
                    }
                    //==================================================================================
                    //审核提交
                    if (oBill.CheckBill(oBill.omodel.HInterID,oBill.omodel.HBillNo, "h_p_Crm_ComplainVisitBill_AfterCheckCtrl", CurUserName, ref DBUtility.ClsPub.sExeReturnInfo) == true)
                    {
                        oCN.Commit();
                        objJsonResult.code = "1";
                        objJsonResult.count = 1;
                        objJsonResult.Message = "审核成功!";
                        objJsonResult.data = null;
                        return objJsonResult;
                    }
                    else
                    {
                        oCN.RollBack();
                        objJsonResult.code = "0";
                        objJsonResult.count = 0;
                        objJsonResult.Message = "审核失败!原因:" + DBUtility.ClsPub.sExeReturnInfo;
                        objJsonResult.data = null;
                        return objJsonResult;
                    }
                }
                if (IsAudit == 1) //反审核提交
                {
                    //进行 ä¼šè®¡æœŸé—´ ç»“è´¦ çš„判断和控制
                    string s = "";
                    int sYear = 0;
                    int sPeriod = 0;
                    DateTime HDate = DateTime.Now;
                    if (DBUtility.Xt_BaseBillFun.Fun_AllowYearPeriod(HDate, ref sYear, ref sPeriod, ref s) == false)
                    {
                        objJsonResult.Message = s;
                        return objJsonResult;
                    }
                    //反审核前控制=========================================
                    string sql1 = "exec h_p_Crm_ComplainVisitBill_BeforeUnCheckCtrl " + oBill.omodel.HInterID + ",'" + oBill.omodel.HBillNo + "','" + CurUserName + "'";
                    ds = oCN.RunProcReturn(sql1, "h_p_Crm_ComplainVisitBill_BeforeUnCheckCtrl");
                    if (ds == null || ds.Tables.Count == 0 || ds.Tables[0].Rows.Count == 0)
                    {
                        objJsonResult.code = "0";
                        objJsonResult.count = 1;
                        objJsonResult.Message = "反审核失败!原因:反审核前判断失败,请与网络管理人员联系";
                        objJsonResult.data = null;
                        return objJsonResult;
                    }
                    if (ds.Tables[0].Rows[0]["HBack"].ToString() != "0")
                    {
                        objJsonResult.code = "0";
                        objJsonResult.count = 1;
                        objJsonResult.Message = "反审核失败!原因:" + ds.Tables[0].Rows[0]["HRemark"].ToString(); ;
                        objJsonResult.data = null;
                        return objJsonResult;
                    }
                    //===========================================================
                    //反审核提交AbandonCheck
                    if (oBill.AbandonCheck(oBill.omodel.HInterID, oBill.omodel.HBillNo, "h_p_Crm_ComplainVisitBill_AfterUnCheckCtrl", CurUserName, ref DBUtility.ClsPub.sExeReturnInfo) == true)
                    {
                        objJsonResult.code = "1";
                        objJsonResult.count = 1;
                        objJsonResult.Message = "反审核成功";
                        objJsonResult.data = null;
                        return objJsonResult;
                    }
                    else
                    {
                        objJsonResult.code = "0";
                        objJsonResult.count = 0;
                        objJsonResult.Message = "反审核失败!原因:" + DBUtility.ClsPub.sExeReturnInfo;
                        objJsonResult.data = null;
                        return objJsonResult;
                    }
                }
                return objJsonResult;
            }
            catch (Exception e)
            {
                oCN.RollBack();
                objJsonResult.code = "0";
                objJsonResult.count = 0;
                objJsonResult.Message = "审核失败或者反审核失败!" + e.ToString();
                objJsonResult.data = null;
                return objJsonResult;
            }
        }
        #endregion
        #region å®¢æˆ·æ‹œè®¿è®°å½•单   å…³é—­/反关闭
        /// <summary>
        /// </summary>
        /// <param name="HInterID">单据ID</param>
        /// <param name="IsAudit">关闭(0),反关闭(1)</param>
        /// <param name="CurUserName">关闭人</param>
        /// <returns></returns>
        [Route("Crm_ComplainVisitBill/CloseCrm_ComplainVisitBill")]
        [HttpGet]
        public object CloseCrm_ComplainVisitBill(int HInterID, int IsAudit, string CurUserName)
        {
            string ModRightNameCheck = "Crm_ComplainVisitBill_Close";
            DBUtility.ClsPub.CurUserName = CurUserName;
            try
            {
                //检查权限
                if (!DBUtility.ClsPub.Security_Log_second(ModRightNameCheck, 1, false, CurUserName))
                {
                    objJsonResult.code = "0";
                    objJsonResult.count = 0;
                    objJsonResult.Message = "关闭失败!无权限!";
                    objJsonResult.data = null;
                    return objJsonResult;
                }
                //HInterID数据判断
                if (HInterID <= 0)
                {
                    objJsonResult.code = "0";
                    objJsonResult.count = 0;
                    objJsonResult.Message = "HInterID小于0!";
                    objJsonResult.data = null;
                    return objJsonResult;
                }
                Int64 lngBillKey = 0;
                lngBillKey = DBUtility.ClsPub.isLong(HInterID);                                         //对HInterID进行类型的转换
                DAL.ClsCrm_ComplainVisitBill oBill = new DAL.ClsCrm_ComplainVisitBill();              //实例化单据操作类,用于进行相关操作
                //针对需要进行的操作,检验当前单据的状态是否支持需要进行的操作
                if (oBill.ShowBill(lngBillKey, ref DBUtility.ClsPub.sExeReturnInfo))                    //根据HInterID获取该单据的数据
                {
                    if (oBill.omodel.HDeleteMan.Trim() != "")
                    {
                        objJsonResult.code = "0";
                        objJsonResult.count = 0;
                        objJsonResult.Message = "单据已作废!不能进行关闭!";
                        objJsonResult.data = null;
                        return objJsonResult;
                    }
                    if (oBill.omodel.HChecker.Trim() == "")
                    {
                        objJsonResult.code = "0";
                        objJsonResult.count = 0;
                        objJsonResult.Message = "单据未审核!不能进行关闭!";
                        objJsonResult.data = null;
                        return objJsonResult;
                    }
                    if (IsAudit == 0)  //关闭判断
                    {
                        if (oBill.omodel.HCloseMan.Trim() != "")
                        {
                            objJsonResult.code = "0";
                            objJsonResult.count = 0;
                            objJsonResult.Message = "单据已关闭!不能再次关闭!";
                            objJsonResult.data = null;
                            return objJsonResult;
                        }
                    }
                    if (IsAudit == 1) //反关闭判断
                    {
                        if (oBill.omodel.HCloseMan.Trim() == "")
                        {
                            objJsonResult.code = "0";
                            objJsonResult.count = 0;
                            objJsonResult.Message = "单据未关闭!不需要反关闭!";
                            objJsonResult.data = null;
                            return objJsonResult;
                        }
                    }
                }
                else
                {
                    objJsonResult.code = "0";
                    objJsonResult.count = 0;
                    objJsonResult.Message = "单据不存在!原因:" + DBUtility.ClsPub.sExeReturnInfo;
                    objJsonResult.data = null;
                    return objJsonResult;
                }
                //进行需要进行的关闭/反关闭操作
                if (IsAudit == 0) //关闭提交
                {
                    //关闭提交
                    if (oBill.CloseBill(lngBillKey, ref DBUtility.ClsPub.sExeReturnInfo) == true)
                    {
                        objJsonResult.code = "1";
                        objJsonResult.count = 1;
                        objJsonResult.Message = "关闭成功";
                        objJsonResult.data = null;
                        return objJsonResult;
                    }
                    else
                    {
                        objJsonResult.code = "0";
                        objJsonResult.count = 0;
                        objJsonResult.Message = "关闭失败!原因:" + DBUtility.ClsPub.sExeReturnInfo;
                        objJsonResult.data = null;
                        return objJsonResult;
                    }
                }
                if (IsAudit == 1) //反关闭提交
                {
                    //反关闭提交
                    if (oBill.CancelClose(lngBillKey, ref DBUtility.ClsPub.sExeReturnInfo) == true)
                    {
                        objJsonResult.code = "1";
                        objJsonResult.count = 1;
                        objJsonResult.Message = "反关闭成功";
                        objJsonResult.data = null;
                        return objJsonResult;
                    }
                    else
                    {
                        objJsonResult.code = "0";
                        objJsonResult.count = 0;
                        objJsonResult.Message = "反关闭失败!原因:" + DBUtility.ClsPub.sExeReturnInfo;
                        objJsonResult.data = null;
                        return objJsonResult;
                    }
                }
                return objJsonResult;
            }
            catch (Exception e)
            {
                objJsonResult.code = "0";
                objJsonResult.count = 0;
                objJsonResult.Message = "关闭失败或者反关闭失败!" + e.ToString();
                objJsonResult.data = null;
                return objJsonResult;
            }
        }
        #endregion
        #region å®¢æˆ·æ‹œè®¿è®°å½•单   ä½œåºŸ/反作废
        /// <summary>
        /// </summary>
        /// <param name="HInterID">单据ID</param>
        /// <param name="IsAudit">作废(0),反作废(1)</param>
        /// <param name="CurUserName">作废人</param>
        /// <returns></returns>
        [Route("Crm_ComplainVisitBill/DropCrm_ComplainVisitBill")]
        [HttpGet]
        public object DropCrm_ComplainVisitBill(int HInterID, int IsAudit, string CurUserName)
        {
            string ModRightNameCheck = "Crm_ComplainVisitBill_Drop";
            DBUtility.ClsPub.CurUserName = CurUserName;
            try
            {
                //检查权限
                if (!DBUtility.ClsPub.Security_Log_second(ModRightNameCheck, 1, false, CurUserName))
                {
                    objJsonResult.code = "0";
                    objJsonResult.count = 0;
                    objJsonResult.Message = "作废失败!无权限!";
                    objJsonResult.data = null;
                    return objJsonResult;
                }
                //HInterID数据判断
                if (HInterID <= 0)
                {
                    objJsonResult.code = "0";
                    objJsonResult.count = 0;
                    objJsonResult.Message = "HInterID小于0!";
                    objJsonResult.data = null;
                    return objJsonResult;
                }
                Int64 lngBillKey = 0;
                lngBillKey = DBUtility.ClsPub.isLong(HInterID);                                         //对HInterID进行类型的转换
                DAL.ClsCrm_ComplainVisitBill oBill = new DAL.ClsCrm_ComplainVisitBill();              //实例化单据操作类,用于进行相关操作
                //针对需要进行的操作,检验当前单据的状态是否支持需要进行的操作
                if (oBill.ShowBill(lngBillKey, ref DBUtility.ClsPub.sExeReturnInfo))                    //根据HInterID获取该单据的数据
                {
                    if (oBill.omodel.HChecker.Trim() != "")
                    {
                        objJsonResult.code = "0";
                        objJsonResult.count = 0;
                        objJsonResult.Message = "单据已审核!不能进行作废!";
                        objJsonResult.data = null;
                        return objJsonResult;
                    }
                    if (IsAudit == 0)  //作废判断
                    {
                        if (oBill.omodel.HDeleteMan.Trim() != "")
                        {
                            objJsonResult.code = "0";
                            objJsonResult.count = 0;
                            objJsonResult.Message = "单据已作废!不能再作废!";
                            objJsonResult.data = null;
                            return objJsonResult;
                        }
                    }
                    if (IsAudit == 1) //反作废判断
                    {
                        if (oBill.omodel.HDeleteMan.Trim() == "")
                        {
                            objJsonResult.code = "0";
                            objJsonResult.count = 0;
                            objJsonResult.Message = "单据未作废!不需要反作废!";
                            objJsonResult.data = null;
                            return objJsonResult;
                        }
                    }
                }
                else
                {
                    objJsonResult.code = "0";
                    objJsonResult.count = 0;
                    objJsonResult.Message = "单据不存在!原因:" + DBUtility.ClsPub.sExeReturnInfo;
                    objJsonResult.data = null;
                    return objJsonResult;
                }
                //进行需要进行的作废/反作废操作
                if (IsAudit == 0) //作废提交
                {
                    //作废前控制=========================================
                    string sql1 = "exec h_p_Crm_ComplainVisitBill_BeforeDropCtrl " + oBill.omodel.HInterID + ",'" + oBill.omodel.HBillNo + "','" + CurUserName + "'";
                    ds = oCN.RunProcReturn(sql1, "h_p_Crm_ComplainVisitBill_BeforeDropCtrl");
                    if (ds == null || ds.Tables.Count == 0 || ds.Tables[0].Rows.Count == 0)
                    {
                        objJsonResult.code = "0";
                        objJsonResult.count = 1;
                        objJsonResult.Message = "作废失败!原因:作废前判断失败,请与网络管理人员联系";
                        objJsonResult.data = null;
                        return objJsonResult;
                    }
                    if (ds.Tables[0].Rows[0]["HBack"].ToString() != "0")
                    {
                        objJsonResult.code = "0";
                        objJsonResult.count = 1;
                        objJsonResult.Message = "作废失败!原因:" + ds.Tables[0].Rows[0]["HRemark"].ToString(); ;
                        objJsonResult.data = null;
                        oCN.RollBack();
                        return objJsonResult;
                    }
                    //==================================================================================
                    //作废提交
                    if (oBill.Cancelltion(lngBillKey, oBill.omodel.HBillNo, "h_p_Crm_ComplainVisitBill_AfterDropCtrl", CurUserName, ref DBUtility.ClsPub.sExeReturnInfo) == true)
                    {
                        objJsonResult.code = "1";
                        objJsonResult.count = 1;
                        objJsonResult.Message = "作废成功";
                        objJsonResult.data = null;
                        return objJsonResult;
                    }
                    else
                    {
                        objJsonResult.code = "0";
                        objJsonResult.count = 0;
                        objJsonResult.Message = "作废失败!原因:" + DBUtility.ClsPub.sExeReturnInfo;
                        objJsonResult.data = null;
                        return objJsonResult;
                    }
                }
                if (IsAudit == 1) //反作废提交
                {
                    //反作废前控制=========================================
                    string sql1 = "exec h_p_Crm_ComplainVisitBill_BeforeUnDropCtrl " + oBill.omodel.HInterID + ",'" + oBill.omodel.HBillNo + "','" + CurUserName + "'";
                    ds = oCN.RunProcReturn(sql1, "h_p_Crm_ComplainVisitBill_BeforeUnDropCtrl");
                    if (ds == null || ds.Tables.Count == 0 || ds.Tables[0].Rows.Count == 0)
                    {
                        objJsonResult.code = "0";
                        objJsonResult.count = 1;
                        objJsonResult.Message = "作废失败!原因:反作废前判断失败,请与网络管理人员联系";
                        objJsonResult.data = null;
                        oCN.RollBack();
                        return objJsonResult;
                    }
                    if (ds.Tables[0].Rows[0]["HBack"].ToString() != "0")
                    {
                        objJsonResult.code = "0";
                        objJsonResult.count = 1;
                        objJsonResult.Message = "作废失败!原因:" + ds.Tables[0].Rows[0]["HRemark"].ToString(); ;
                        objJsonResult.data = null;
                        oCN.RollBack();
                        return objJsonResult;
                    }
                    //==================================================================================
                    //反作废提交
                    if (oBill.AbandonCancelltion(lngBillKey, oBill.omodel.HBillNo, "h_p_Crm_ComplainVisitBill_AfterDropCtrl", CurUserName,  ref DBUtility.ClsPub.sExeReturnInfo) == true)
                    {
                        objJsonResult.code = "1";
                        objJsonResult.count = 1;
                        objJsonResult.Message = "反作废成功";
                        objJsonResult.data = null;
                        return objJsonResult;
                    }
                    else
                    {
                        objJsonResult.code = "0";
                        objJsonResult.count = 0;
                        objJsonResult.Message = "反作废失败!原因:" + DBUtility.ClsPub.sExeReturnInfo;
                        objJsonResult.data = null;
                        return objJsonResult;
                    }
                }
                return objJsonResult;
            }
            catch (Exception e)
            {
                objJsonResult.code = "0";
                objJsonResult.count = 0;
                objJsonResult.Message = "作废失败或者反作废失败!" + e.ToString();
                objJsonResult.data = null;
                return objJsonResult;
            }
        }
        #endregion
    }
}
WebAPI/Controllers/XSGL/Xs_SeQuotationBillController.cs
New file
@@ -0,0 +1,1000 @@
using Newtonsoft.Json;
using Newtonsoft.Json.Linq;
using Pub_Class;
using System;
using System.Collections;
using System.Collections.Generic;
using System.Data;
using System.Data.SqlClient;
using System.Web.Http;
using WebAPI.Models;
namespace WebAPI.Controllers
{
    //销售报价单Controller
    public class Xs_SeQuotationBillController : ApiController
    {
        //销售报价单
        //获取系统参数    Xs_SeQuotationBillMain
        Pub_Class.ClsXt_SystemParameter oSystemParameter = new Pub_Class.ClsXt_SystemParameter();
        public DBUtility.ClsPub.Enum_BillStatus BillStatus;
        public DAL.ClsXs_SeQuotationBill BillOld = new DAL.ClsXs_SeQuotationBill();
        public DAL.ClsXs_SeQuotationBill BillNew0 = new DAL.ClsXs_SeQuotationBill();
        private json objJsonResult = new json();
        SQLHelper.ClsCN oCN = new SQLHelper.ClsCN();
        DataSet ds;
        #region é”€å”®æŠ¥ä»·å•列表 æŸ¥è¯¢
        /// <summary>
        /// è¿”回项目阶段列表
        ///参数:string sql。
        ///返回值:object。
        /// </summary>
        [Route("Xs_SeQuotationBill/Xs_SeQuotationBillMainList")]
        [HttpGet]
        public object Xs_SeQuotationBillMainList(string sWhere, string user)
        {
            try
            {
                List<object> columnNameList = new List<object>();
                //查看权限
                if (!DBUtility.ClsPub.Security_Log("Xs_SeQuotationBill_Query", 1, false, user))
                {
                    objJsonResult.code = "0";
                    objJsonResult.count = 0;
                    objJsonResult.Message = "无查看权限!";
                    objJsonResult.data = null;
                    return objJsonResult;
                }
                if (sWhere == null || sWhere.Equals(""))
                {
                    ds = oCN.RunProcReturn("select * from h_v_Xs_SeQuotationBillMainList order by å•据号 desc", "h_v_Xs_SeQuotationBillMainList");
                }
                else
                {
                    string sql1 = "select * from h_v_Xs_SeQuotationBillMainList where 1 = 1 ";
                    string sql = sql1 + sWhere + " order by å•据号 desc";
                    ds = oCN.RunProcReturn(sql, "h_v_Xs_SeQuotationBillMainList");
                }
                //添加列名
                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;
            }
        }
        #endregion
        #region é”€å”®æŠ¥ä»·å•保存 æ–°å¢ž/编辑
        [Route("Xs_SeQuotationBill/SaveXs_SeQuotationBillMain")]
        [HttpPost]
        public object SaveXs_SeQuotationBillMain([FromBody] JObject msg)
        {
            var _value = msg["msg"].ToString();
            string msg1 = _value.ToString();
            string[] sArray = msg1.Split(new string[] { ";" }, StringSplitOptions.RemoveEmptyEntries);
            string msg2 = sArray[0].ToString();
            string msg3 = sArray[1].ToString(); //子表
            string refSav = sArray[2].ToString();//操作方式数据类型 1添加 3修改 2 å¤åˆ¶
            string msg4 = sArray[3].ToString();//用户名
            DBUtility.ClsPub.CurUserName = msg4;
            string UserName = "";
            string s = "";
            ListModels oListModels = new ListModels();
            try
            {
                //编辑权限
                if (!DBUtility.ClsPub.Security_Log_second("Xs_SeQuotationBill_Edit", 1, false, msg4))
                {
                    objJsonResult.code = "0";
                    objJsonResult.count = 0;
                    objJsonResult.Message = "无保存权限!";
                    objJsonResult.data = null;
                    return objJsonResult;
                }
                DAL.ClsXs_SeQuotationBill oBill = new DAL.ClsXs_SeQuotationBill();
                List<Model.ClsXs_SeQuotationBillMain> lsmain = new List<Model.ClsXs_SeQuotationBillMain>();
                msg2 = msg2.Replace("\\", "");
                msg2 = msg2.Replace("\n", "");  //\n
                lsmain = oListModels.getObjectByJson_Xs_SeQuotationBillMain(msg2);
                foreach (Model.ClsXs_SeQuotationBillMain oItem in lsmain)
                {
                    if (refSav == "Add")
                    {
                        //单据号是否重复
                        if (BillNew0.IsExistBillNo(ref ClsPub.sExeReturnInfo, oItem.HBillNo, BillStatus, BillOld.omodel.HInterID))
                        {
                            objJsonResult.code = "0";
                            objJsonResult.count = 0;
                            objJsonResult.Message = "单据号重复!不允许保存!";
                            objJsonResult.data = 1;
                            return objJsonResult;
                        }
                    }
                    if (refSav == "Update")
                    {
                        if (BillOld.ShowBill(oItem.HInterID, ref s) == false)
                        {
                            objJsonResult.code = "0";
                            objJsonResult.count = 0;
                            objJsonResult.Message = "此单据有误!";
                            objJsonResult.data = 1;
                            return objJsonResult;
                        }
                        //判断是否可编辑
                        if (BillOld.omodel.HChecker != "" && BillOld.omodel.HChecker != null)
                        {
                            objJsonResult.code = "0";
                            objJsonResult.count = 0;
                            objJsonResult.Message = "此单据已经被审核,不允许修改!";
                            objJsonResult.data = 1;
                            return objJsonResult;
                        }
                        if (BillOld.omodel.HBillStatus > 1)
                        {
                            objJsonResult.code = "0";
                            objJsonResult.count = 0;
                            objJsonResult.Message = "此单据处于不可编辑状态,不允许修改!";
                            objJsonResult.data = 1;
                            return objJsonResult;
                        }
                        if (!DBUtility.Xt_BaseBillFun.Fun_AllowEditBill(BillOld, ref s))
                        {
                            objJsonResult.code = "0";
                            objJsonResult.count = 0;
                            objJsonResult.Message = s + ",不允许修改";
                            objJsonResult.data = 1;
                            return objJsonResult;
                        }
                    }
                    UserName = oItem.HMaker;  //制单人
                    oItem.HBillType = "1410";
                    oItem.HBillSubType = "1410";
                    oItem.HYear = DBUtility.ClsPub.isLong(DateTime.Now.Year);
                    oItem.HPeriod = DBUtility.ClsPub.isLong(DateTime.Now.Month);
                    oItem.HMakeDate = DBUtility.ClsPub.isStrNull(DateTime.Now.ToString("yyyy-MM-dd"));
                    if (DBUtility.ClsPub.isStrNull(oItem.HDate) == "")
                    {
                        objJsonResult.code = "0";
                        objJsonResult.count = 0;
                        objJsonResult.Message = "保存失败!没有单据日期,无法保存!";
                        objJsonResult.data = 1;
                        return objJsonResult;
                    }
                    oBill.omodel = oItem;
                }
                // è¡¨ä½“数据
                //按 },{来拆分数组 //去掉【和】
                msg3 = msg3.Substring(1, msg3.Length - 2);
                msg3 = msg3.Replace("\\", "");
                msg3 = msg3.Replace("\n", "");  //\n
                List<Model.ClsXs_SeQuotationBillSub> ls = new List<Model.ClsXs_SeQuotationBillSub>();
                ls = oListModels.getObjectByJson_Xs_SeQuotationBillSub(msg3);
                int i = 0;
                foreach (Model.ClsXs_SeQuotationBillSub oItemSub in ls)
                {
                    i++;
                    oItemSub.HEntryID = i;
                    oItemSub.HEntryCloseDate = DBUtility.ClsPub.isDate(DateTime.Now);
                    oItemSub.HCloseType = false;   //关闭类型
                    oBill.DetailColl.Add(oItemSub);
                }
                //进行 ä¼šè®¡æœŸé—´ ç»“è´¦ çš„判断和控制
                int sYear = 0;
                int sPeriod = 0;
                DateTime HDate = DateTime.Now;
                if (DBUtility.Xt_BaseBillFun.Fun_AllowYearPeriod(HDate, ref sYear, ref sPeriod, ref s) == false)
                {
                    objJsonResult.Message = s;
                    return objJsonResult;
                }
                //保存
                //保存完毕后处理
                bool bResult;
                if (refSav == "Add")
                {
                    bResult = oBill.AddBill(ref DBUtility.ClsPub.sExeReturnInfo);
                }
                else if (refSav == "Update")
                {
                    bResult = oBill.ModifyBill(oBill.omodel.HInterID, ref DBUtility.ClsPub.sExeReturnInfo);
                }
                else
                {
                    bResult = false;
                }
                if (bResult)
                {
                    objJsonResult.code = "0";
                    objJsonResult.count = 1;
                    objJsonResult.Message = "保存成功!";
                    objJsonResult.data = 1;
                    return objJsonResult;
                }
                else
                {
                    objJsonResult.code = "0";
                    objJsonResult.count = 0;
                    objJsonResult.Message = "保存失败!" + DBUtility.ClsPub.sExeReturnInfo;
                    objJsonResult.data = 1;
                    return objJsonResult;
                }
            }
            catch (Exception e)
            {
                objJsonResult.code = "0";
                objJsonResult.count = 0;
                objJsonResult.Message = "保存失败!" + e.ToString();
                objJsonResult.data = 1;
                return objJsonResult;
            }
        }
        #endregion
        #region é”€å”®æŠ¥ä»·å• ç¼–辑页面初始化
        [Route("Xs_SeQuotationBill/Xs_SeQuotationBillMainEditList")]
        [HttpGet]
        public object Xs_SeQuotationBillMainEditList(long HInterID)
        {
            try
            {
                List<DataTable> tableList = new List<DataTable>();
                //返回列表信息
                ds = oCN.RunProcReturn("select * from h_v_Xs_SeQuotationBillMainEdit where 1=1 and HInterID=" + HInterID , "h_v_Xs_SeQuotationBillMainEdit");
                if (ds == null || ds.Tables[0].Rows.Count == 0)
                {
                    objJsonResult.code = "0";
                    objJsonResult.count = 0;
                    objJsonResult.Message = "未查询到信息,请刷新数据后重新选择!";
                    objJsonResult.data = null;
                    return objJsonResult;
                }
                else
                {
                    objJsonResult.code = "1";
                    objJsonResult.count = 1;
                    objJsonResult.Message = "成功!";
                    objJsonResult.data = ds.Tables[0];
                    return objJsonResult;
                }
            }
            catch (Exception e)
            {
                objJsonResult.code = "0";
                objJsonResult.count = 0;
                objJsonResult.Message = "Exception!" + e.ToString();
                objJsonResult.data = null;
                return objJsonResult;
            }
        }
        #endregion
        #region é”€å”®æŠ¥ä»·å• åˆ é™¤
        /// <summary>
        ///参数:string HInterID。
        ///返回值:object。
        /// </summary>
        [Route("Xs_SeQuotationBill/DeleteXs_SeQuotationBillMain")]
        [HttpGet]
        public object DeleteXs_SeQuotationBillMain(string HInterID, string user)
        {
            try
            {
                string s = "";
                //查看权限
                if (!DBUtility.ClsPub.Security_Log("Xs_SeQuotationBill_Delete", 1, false, user))
                {
                    objJsonResult.code = "0";
                    objJsonResult.count = 0;
                    objJsonResult.Message = "无删除权限!";
                    objJsonResult.data = null;
                    return objJsonResult;
                }
                if (HInterID == null || HInterID.Equals(""))
                {
                    objJsonResult.code = "0";
                    objJsonResult.count = 0;
                    objJsonResult.Message = "HInterID不能为空!";
                    objJsonResult.data = null;
                    return objJsonResult;
                }
                if (BillOld.ShowBill(long.Parse(HInterID), ref s) == false)
                {
                    objJsonResult.code = "0";
                    objJsonResult.count = 0;
                    objJsonResult.Message = "此单据有误!";
                    objJsonResult.data = 1;
                    return objJsonResult;
                }
                //判断是否可删除
                if (BillOld.omodel.HChecker != "" && BillOld.omodel.HChecker != null)
                {
                    objJsonResult.code = "0";
                    objJsonResult.count = 0;
                    objJsonResult.Message = "此单据已经被审核,不允许删除!";
                    objJsonResult.data = 1;
                    return objJsonResult;
                }
                //判断是否是创建状态进行删除
                if (int.Parse(BillOld.omodel.HBillStatus.ToString()) <= 1)
                {
                    //进行 ä¼šè®¡æœŸé—´ ç»“è´¦ çš„判断和控制
                    int sYear = 0;
                    int sPeriod = 0;
                    DateTime HDate = DateTime.Now;
                    if (DBUtility.Xt_BaseBillFun.Fun_AllowYearPeriod(HDate, ref sYear, ref sPeriod, ref s) == false)
                    {
                        objJsonResult.Message = s;
                        return objJsonResult;
                    }
                    //删除前控制=========================================
                    string sql1 = "exec h_p_Xs_SeQuotationBill_BeforeDelCtrl " + BillOld.omodel.HInterID + ",'" + BillOld.omodel.HBillNo + "','" + user + "'";
                    ds = oCN.RunProcReturn(sql1, "h_p_Xs_SeQuotationBill_BeforeDelCtrl");
                    if (ds == null || ds.Tables.Count == 0 || ds.Tables[0].Rows.Count == 0)
                    {
                        objJsonResult.code = "0";
                        objJsonResult.count = 1;
                        objJsonResult.Message = "删除失败!原因:删除前判断失败,请与网络管理人员联系";
                        objJsonResult.data = null;
                        return objJsonResult;
                    }
                    if (ds.Tables[0].Rows[0]["HBack"].ToString() != "0")
                    {
                        objJsonResult.code = "0";
                        objJsonResult.count = 1;
                        objJsonResult.Message = "删除失败!原因:" + ds.Tables[0].Rows[0]["HRemark"].ToString(); ;
                        objJsonResult.data = null;
                        return objJsonResult;
                    }
                    //==================================================================================
                    oCN.BeginTran();
                    oCN.RunProc("delete from Xs_SeQuotationBillMain where HInterID = " + HInterID);
                    oCN.RunProc("delete from Xs_SeQuotationBillSub where HInterID= " + HInterID);
                    //删除后控制==================================================================================
                    string sql2 = "exec h_p_Xs_SeQuotationBill_AfterDelCtrl " + BillOld.omodel.HInterID + ",'" + BillOld.omodel.HBillNo + "','" + user + "'";
                    ds = oCN.RunProcReturn(sql2, "h_p_Xs_SeQuotationBill_AfterDelCtrl");
                    if (ds == null || ds.Tables.Count == 0 || ds.Tables[0].Rows.Count == 0)
                    {
                        s = "删除后判断失败,请与网络管理人员联系";
                        objJsonResult.code = "0";
                        objJsonResult.count = 1;
                        objJsonResult.Message = "删除失败!原因:" + s;
                        objJsonResult.data = null;
                        oCN.RollBack();
                        return objJsonResult;
                    }
                    if (ds.Tables[0].Rows[0]["HBack"].ToString() != "0")
                    {
                        s = ds.Tables[0].Rows[0]["HRemark"].ToString();
                        objJsonResult.code = "0";
                        objJsonResult.count = 1;
                        objJsonResult.Message = "删除失败!原因:" + s;
                        objJsonResult.data = null;
                        oCN.RollBack();
                        return objJsonResult;
                    }
                    //==============================================================================================
                    oCN.Commit();
                    objJsonResult.code = "1";
                    objJsonResult.count = 1;
                    objJsonResult.Message = "删除成功";
                    objJsonResult.data = null;
                    return objJsonResult;
                }
                else
                {
                    objJsonResult.code = "0";
                    objJsonResult.count = 0;
                    objJsonResult.Message = "此单据不是创建状态,不允许删除!";
                    objJsonResult.data = 1;
                    return objJsonResult;
                }
            }
            catch (Exception e)
            {
                oCN.RollBack();
                objJsonResult.code = "0";
                objJsonResult.count = 0;
                objJsonResult.Message = "Exception!" + e.ToString();
                objJsonResult.data = null;
                return objJsonResult;
            }
        }
        #endregion
        #region é”€å”®æŠ¥ä»·å• å®¡æ ¸/反审核
        /// <summary>
        /// </summary>
        /// <param name="HInterID">单据ID</param>
        /// <param name="IsAudit">审核(0),反审核(1)</param>
        /// <param name="CurUserName">审核人</param>
        /// <returns></returns>
        [Route("Xs_SeQuotationBill/AuditXs_SeQuotationBillMain")]
        [HttpGet]
        public object AuditXs_SeQuotationBillMain(int HInterID, int IsAudit, string CurUserName)
        {
            string ModRightNameCheck = "Xs_SeQuotationBill_Check";
            DBUtility.ClsPub.CurUserName = CurUserName;
            try
            {
                //审核权限
                if (!DBUtility.ClsPub.Security_Log_second(ModRightNameCheck, 1, false, CurUserName))
                {
                    objJsonResult.code = "0";
                    objJsonResult.count = 0;
                    objJsonResult.Message = "审核失败!无权限!";
                    objJsonResult.data = null;
                    return objJsonResult;
                }
                //HInterID数据判断
                if (HInterID <= 0)
                {
                    objJsonResult.code = "0";
                    objJsonResult.count = 0;
                    objJsonResult.Message = "HInterID小于0!";
                    objJsonResult.data = null;
                    return objJsonResult;
                }
                Int64 lngBillKey = 0;
                lngBillKey = DBUtility.ClsPub.isLong(HInterID);                                         //对HInterID进行类型的转换
                DAL.ClsXs_SeQuotationBill oBill = new DAL.ClsXs_SeQuotationBill();                              //实例化单据操作类,用于进行相关操作
                //针对需要进行的操作,检验当前单据的状态是否支持需要进行的操作
                if (oBill.ShowBill(lngBillKey, ref DBUtility.ClsPub.sExeReturnInfo))                    //根据HInterID获取该单据的数据
                {
                    if (oBill.omodel.HCloseMan.Trim() != "")
                    {
                        objJsonResult.code = "0";
                        objJsonResult.count = 0;
                        objJsonResult.Message = "单据已关闭!不能再次审核!";
                        objJsonResult.data = null;
                        return objJsonResult;
                    }
                    if (oBill.omodel.HDeleteMan.Trim() != "")
                    {
                        objJsonResult.code = "0";
                        objJsonResult.count = 0;
                        objJsonResult.Message = "单据已作废!不能再次审核!";
                        objJsonResult.data = null;
                        return objJsonResult;
                    }
                    if (IsAudit == 0)  //审核判断
                    {
                        if (oBill.omodel.HChecker.Trim() != "")
                        {
                            objJsonResult.code = "0";
                            objJsonResult.count = 0;
                            objJsonResult.Message = "单据已审核!不能再次审核!";
                            objJsonResult.data = null;
                            return objJsonResult;
                        }
                    }
                    if (IsAudit == 1) //反审核判断
                    {
                        if (oBill.omodel.HChecker.Trim() == "")
                        {
                            objJsonResult.code = "0";
                            objJsonResult.count = 0;
                            objJsonResult.Message = "单据未审核!不需要反审核!";
                            objJsonResult.data = null;
                            return objJsonResult;
                        }
                    }
                }
                else
                {
                    objJsonResult.code = "0";
                    objJsonResult.count = 0;
                    objJsonResult.Message = "单据不存在!原因:" + DBUtility.ClsPub.sExeReturnInfo;
                    objJsonResult.data = null;
                    return objJsonResult;
                }
                //进行需要进行的审核/反审核操作
                if (IsAudit == 0) //审核提交
                {
                    //进行 ä¼šè®¡æœŸé—´ ç»“è´¦ çš„判断和控制
                    string s = "";
                    int sYear = 0;
                    int sPeriod = 0;
                    DateTime HDate = DateTime.Now;
                    if (DBUtility.Xt_BaseBillFun.Fun_AllowYearPeriod(HDate, ref sYear, ref sPeriod, ref s) == false)
                    {
                        objJsonResult.Message = s;
                        return objJsonResult;
                    }
                    oCN.BeginTran();
                    //审核前控制=========================================
                    string sql1 = "exec h_p_Xs_SeQuotationBill_BeforeCheckCtrl " + oBill.omodel.HInterID + ",'" + oBill.omodel.HBillNo + "','" + CurUserName + "'";
                    ds = oCN.RunProcReturn(sql1, "h_p_Xs_SeQuotationBill_BeforeCheckCtrl");
                    if (ds == null || ds.Tables.Count == 0 || ds.Tables[0].Rows.Count == 0)
                    {
                        objJsonResult.code = "0";
                        objJsonResult.count = 1;
                        objJsonResult.Message = "审核失败!原因:审核前判断失败,请与网络管理人员联系";
                        objJsonResult.data = null;
                        oCN.RollBack();
                        return objJsonResult;
                    }
                    if (ds.Tables[0].Rows[0]["HBack"].ToString() != "0")
                    {
                        objJsonResult.code = "0";
                        objJsonResult.count = 1;
                        objJsonResult.Message = "审核失败!原因:" + ds.Tables[0].Rows[0]["HRemark"].ToString(); ;
                        objJsonResult.data = null;
                        oCN.RollBack();
                        return objJsonResult;
                    }
                    //==================================================================================
                    //审核提交
                    if (oBill.CheckBill(oBill.omodel.HInterID,oBill.omodel.HBillNo, "h_p_Xs_SeQuotationBill_AfterCheckCtrl", CurUserName, ref DBUtility.ClsPub.sExeReturnInfo) == true)
                    {
                        oCN.Commit();
                        objJsonResult.code = "1";
                        objJsonResult.count = 1;
                        objJsonResult.Message = "审核成功!";
                        objJsonResult.data = null;
                        return objJsonResult;
                    }
                    else
                    {
                        oCN.RollBack();
                        objJsonResult.code = "0";
                        objJsonResult.count = 0;
                        objJsonResult.Message = "审核失败!原因:" + DBUtility.ClsPub.sExeReturnInfo;
                        objJsonResult.data = null;
                        return objJsonResult;
                    }
                }
                if (IsAudit == 1) //反审核提交
                {
                    //进行 ä¼šè®¡æœŸé—´ ç»“è´¦ çš„判断和控制
                    string s = "";
                    int sYear = 0;
                    int sPeriod = 0;
                    DateTime HDate = DateTime.Now;
                    if (DBUtility.Xt_BaseBillFun.Fun_AllowYearPeriod(HDate, ref sYear, ref sPeriod, ref s) == false)
                    {
                        objJsonResult.Message = s;
                        return objJsonResult;
                    }
                    //反审核前控制=========================================
                    string sql1 = "exec h_p_Xs_SeQuotationBill_BeforeUnCheckCtrl " + oBill.omodel.HInterID + ",'" + oBill.omodel.HBillNo + "','" + CurUserName + "'";
                    ds = oCN.RunProcReturn(sql1, "h_p_Xs_SeQuotationBill_BeforeUnCheckCtrl");
                    if (ds == null || ds.Tables.Count == 0 || ds.Tables[0].Rows.Count == 0)
                    {
                        objJsonResult.code = "0";
                        objJsonResult.count = 1;
                        objJsonResult.Message = "反审核失败!原因:反审核前判断失败,请与网络管理人员联系";
                        objJsonResult.data = null;
                        return objJsonResult;
                    }
                    if (ds.Tables[0].Rows[0]["HBack"].ToString() != "0")
                    {
                        objJsonResult.code = "0";
                        objJsonResult.count = 1;
                        objJsonResult.Message = "反审核失败!原因:" + ds.Tables[0].Rows[0]["HRemark"].ToString(); ;
                        objJsonResult.data = null;
                        return objJsonResult;
                    }
                    //===========================================================
                    //反审核提交AbandonCheck
                    if (oBill.AbandonCheck(oBill.omodel.HInterID, oBill.omodel.HBillNo, "h_p_Xs_SeQuotationBill_AfterUnCheckCtrl", CurUserName, ref DBUtility.ClsPub.sExeReturnInfo) == true)
                    {
                        objJsonResult.code = "1";
                        objJsonResult.count = 1;
                        objJsonResult.Message = "反审核成功";
                        objJsonResult.data = null;
                        return objJsonResult;
                    }
                    else
                    {
                        objJsonResult.code = "0";
                        objJsonResult.count = 0;
                        objJsonResult.Message = "反审核失败!原因:" + DBUtility.ClsPub.sExeReturnInfo;
                        objJsonResult.data = null;
                        return objJsonResult;
                    }
                }
                return objJsonResult;
            }
            catch (Exception e)
            {
                oCN.RollBack();
                objJsonResult.code = "0";
                objJsonResult.count = 0;
                objJsonResult.Message = "审核失败或者反审核失败!" + e.ToString();
                objJsonResult.data = null;
                return objJsonResult;
            }
        }
        #endregion
        #region é”€å”®æŠ¥ä»·å• å…³é—­/反关闭
        /// <summary>
        /// </summary>
        /// <param name="HInterID">单据ID</param>
        /// <param name="IsAudit">关闭(0),反关闭(1)</param>
        /// <param name="CurUserName">关闭人</param>
        /// <returns></returns>
        [Route("Xs_SeQuotationBill/CloseXs_SeQuotationBill")]
        [HttpGet]
        public object CloseXs_SeQuotationBill(int HInterID, int IsAudit, string CurUserName)
        {
            string ModRightNameCheck = "Xs_SeQuotationBill_Close";
            DBUtility.ClsPub.CurUserName = CurUserName;
            try
            {
                //检查权限
                if (!DBUtility.ClsPub.Security_Log_second(ModRightNameCheck, 1, false, CurUserName))
                {
                    objJsonResult.code = "0";
                    objJsonResult.count = 0;
                    objJsonResult.Message = "关闭失败!无权限!";
                    objJsonResult.data = null;
                    return objJsonResult;
                }
                //HInterID数据判断
                if (HInterID <= 0)
                {
                    objJsonResult.code = "0";
                    objJsonResult.count = 0;
                    objJsonResult.Message = "HInterID小于0!";
                    objJsonResult.data = null;
                    return objJsonResult;
                }
                Int64 lngBillKey = 0;
                lngBillKey = DBUtility.ClsPub.isLong(HInterID);                                         //对HInterID进行类型的转换
                DAL.ClsXs_SeQuotationBill oBill = new DAL.ClsXs_SeQuotationBill();              //实例化单据操作类,用于进行相关操作
                //针对需要进行的操作,检验当前单据的状态是否支持需要进行的操作
                if (oBill.ShowBill(lngBillKey, ref DBUtility.ClsPub.sExeReturnInfo))                    //根据HInterID获取该单据的数据
                {
                    if (oBill.omodel.HDeleteMan.Trim() != "")
                    {
                        objJsonResult.code = "0";
                        objJsonResult.count = 0;
                        objJsonResult.Message = "单据已作废!不能进行关闭!";
                        objJsonResult.data = null;
                        return objJsonResult;
                    }
                    if (oBill.omodel.HChecker.Trim() == "")
                    {
                        objJsonResult.code = "0";
                        objJsonResult.count = 0;
                        objJsonResult.Message = "单据未审核!不能进行关闭!";
                        objJsonResult.data = null;
                        return objJsonResult;
                    }
                    if (IsAudit == 0)  //关闭判断
                    {
                        if (oBill.omodel.HCloseMan.Trim() != "")
                        {
                            objJsonResult.code = "0";
                            objJsonResult.count = 0;
                            objJsonResult.Message = "单据已关闭!不能再次关闭!";
                            objJsonResult.data = null;
                            return objJsonResult;
                        }
                    }
                    if (IsAudit == 1) //反关闭判断
                    {
                        if (oBill.omodel.HCloseMan.Trim() == "")
                        {
                            objJsonResult.code = "0";
                            objJsonResult.count = 0;
                            objJsonResult.Message = "单据未关闭!不需要反关闭!";
                            objJsonResult.data = null;
                            return objJsonResult;
                        }
                    }
                }
                else
                {
                    objJsonResult.code = "0";
                    objJsonResult.count = 0;
                    objJsonResult.Message = "单据不存在!原因:" + DBUtility.ClsPub.sExeReturnInfo;
                    objJsonResult.data = null;
                    return objJsonResult;
                }
                //进行需要进行的关闭/反关闭操作
                if (IsAudit == 0) //关闭提交
                {
                    //关闭提交
                    if (oBill.CloseBill(lngBillKey, ref DBUtility.ClsPub.sExeReturnInfo) == true)
                    {
                        objJsonResult.code = "1";
                        objJsonResult.count = 1;
                        objJsonResult.Message = "关闭成功";
                        objJsonResult.data = null;
                        return objJsonResult;
                    }
                    else
                    {
                        objJsonResult.code = "0";
                        objJsonResult.count = 0;
                        objJsonResult.Message = "关闭失败!原因:" + DBUtility.ClsPub.sExeReturnInfo;
                        objJsonResult.data = null;
                        return objJsonResult;
                    }
                }
                if (IsAudit == 1) //反关闭提交
                {
                    //反关闭提交
                    if (oBill.CancelClose(lngBillKey, ref DBUtility.ClsPub.sExeReturnInfo) == true)
                    {
                        objJsonResult.code = "1";
                        objJsonResult.count = 1;
                        objJsonResult.Message = "反关闭成功";
                        objJsonResult.data = null;
                        return objJsonResult;
                    }
                    else
                    {
                        objJsonResult.code = "0";
                        objJsonResult.count = 0;
                        objJsonResult.Message = "反关闭失败!原因:" + DBUtility.ClsPub.sExeReturnInfo;
                        objJsonResult.data = null;
                        return objJsonResult;
                    }
                }
                return objJsonResult;
            }
            catch (Exception e)
            {
                objJsonResult.code = "0";
                objJsonResult.count = 0;
                objJsonResult.Message = "关闭失败或者反关闭失败!" + e.ToString();
                objJsonResult.data = null;
                return objJsonResult;
            }
        }
        #endregion
        #region é”€å”®æŠ¥ä»·å• ä½œåºŸ/反作废
        /// <summary>
        /// </summary>
        /// <param name="HInterID">单据ID</param>
        /// <param name="IsAudit">作废(0),反作废(1)</param>
        /// <param name="CurUserName">作废人</param>
        /// <returns></returns>
        [Route("Xs_SeQuotationBill/DropXs_SeQuotationBill")]
        [HttpGet]
        public object DropXs_SeQuotationBill(int HInterID, int IsAudit, string CurUserName)
        {
            string ModRightNameCheck = "Xs_SeQuotationBill_Drop";
            DBUtility.ClsPub.CurUserName = CurUserName;
            try
            {
                //检查权限
                if (!DBUtility.ClsPub.Security_Log_second(ModRightNameCheck, 1, false, CurUserName))
                {
                    objJsonResult.code = "0";
                    objJsonResult.count = 0;
                    objJsonResult.Message = "作废失败!无权限!";
                    objJsonResult.data = null;
                    return objJsonResult;
                }
                //HInterID数据判断
                if (HInterID <= 0)
                {
                    objJsonResult.code = "0";
                    objJsonResult.count = 0;
                    objJsonResult.Message = "HInterID小于0!";
                    objJsonResult.data = null;
                    return objJsonResult;
                }
                Int64 lngBillKey = 0;
                lngBillKey = DBUtility.ClsPub.isLong(HInterID);                                         //对HInterID进行类型的转换
                DAL.ClsXs_SeQuotationBill oBill = new DAL.ClsXs_SeQuotationBill();              //实例化单据操作类,用于进行相关操作
                //针对需要进行的操作,检验当前单据的状态是否支持需要进行的操作
                if (oBill.ShowBill(lngBillKey, ref DBUtility.ClsPub.sExeReturnInfo))                    //根据HInterID获取该单据的数据
                {
                    if (oBill.omodel.HChecker.Trim() != "")
                    {
                        objJsonResult.code = "0";
                        objJsonResult.count = 0;
                        objJsonResult.Message = "单据已审核!不能进行作废!";
                        objJsonResult.data = null;
                        return objJsonResult;
                    }
                    if (IsAudit == 0)  //作废判断
                    {
                        if (oBill.omodel.HDeleteMan.Trim() != "")
                        {
                            objJsonResult.code = "0";
                            objJsonResult.count = 0;
                            objJsonResult.Message = "单据已作废!不能再作废!";
                            objJsonResult.data = null;
                            return objJsonResult;
                        }
                    }
                    if (IsAudit == 1) //反作废判断
                    {
                        if (oBill.omodel.HDeleteMan.Trim() == "")
                        {
                            objJsonResult.code = "0";
                            objJsonResult.count = 0;
                            objJsonResult.Message = "单据未作废!不需要反作废!";
                            objJsonResult.data = null;
                            return objJsonResult;
                        }
                    }
                }
                else
                {
                    objJsonResult.code = "0";
                    objJsonResult.count = 0;
                    objJsonResult.Message = "单据不存在!原因:" + DBUtility.ClsPub.sExeReturnInfo;
                    objJsonResult.data = null;
                    return objJsonResult;
                }
                //进行需要进行的作废/反作废操作
                if (IsAudit == 0) //作废提交
                {
                    //作废前控制=========================================
                    string sql1 = "exec h_p_Xs_SeQuotationBill_BeforeDropCtrl " + oBill.omodel.HInterID + ",'" + oBill.omodel.HBillNo + "','" + CurUserName + "'";
                    ds = oCN.RunProcReturn(sql1, "h_p_Xs_SeQuotationBill_BeforeDropCtrl");
                    if (ds == null || ds.Tables.Count == 0 || ds.Tables[0].Rows.Count == 0)
                    {
                        objJsonResult.code = "0";
                        objJsonResult.count = 1;
                        objJsonResult.Message = "作废失败!原因:作废前判断失败,请与网络管理人员联系";
                        objJsonResult.data = null;
                        return objJsonResult;
                    }
                    if (ds.Tables[0].Rows[0]["HBack"].ToString() != "0")
                    {
                        objJsonResult.code = "0";
                        objJsonResult.count = 1;
                        objJsonResult.Message = "作废失败!原因:" + ds.Tables[0].Rows[0]["HRemark"].ToString(); ;
                        objJsonResult.data = null;
                        oCN.RollBack();
                        return objJsonResult;
                    }
                    //==================================================================================
                    //作废提交
                    if (oBill.Cancelltion(lngBillKey, oBill.omodel.HBillNo, "h_p_Xs_SeQuotationBill_AfterDropCtrl", CurUserName, ref DBUtility.ClsPub.sExeReturnInfo) == true)
                    {
                        objJsonResult.code = "1";
                        objJsonResult.count = 1;
                        objJsonResult.Message = "作废成功";
                        objJsonResult.data = null;
                        return objJsonResult;
                    }
                    else
                    {
                        objJsonResult.code = "0";
                        objJsonResult.count = 0;
                        objJsonResult.Message = "作废失败!原因:" + DBUtility.ClsPub.sExeReturnInfo;
                        objJsonResult.data = null;
                        return objJsonResult;
                    }
                }
                if (IsAudit == 1) //反作废提交
                {
                    //反作废前控制=========================================
                    string sql1 = "exec h_p_Xs_SeQuotationBill_BeforeUnDropCtrl " + oBill.omodel.HInterID + ",'" + oBill.omodel.HBillNo + "','" + CurUserName + "'";
                    ds = oCN.RunProcReturn(sql1, "h_p_Xs_SeQuotationBill_BeforeUnDropCtrl");
                    if (ds == null || ds.Tables.Count == 0 || ds.Tables[0].Rows.Count == 0)
                    {
                        objJsonResult.code = "0";
                        objJsonResult.count = 1;
                        objJsonResult.Message = "作废失败!原因:反作废前判断失败,请与网络管理人员联系";
                        objJsonResult.data = null;
                        oCN.RollBack();
                        return objJsonResult;
                    }
                    if (ds.Tables[0].Rows[0]["HBack"].ToString() != "0")
                    {
                        objJsonResult.code = "0";
                        objJsonResult.count = 1;
                        objJsonResult.Message = "作废失败!原因:" + ds.Tables[0].Rows[0]["HRemark"].ToString(); ;
                        objJsonResult.data = null;
                        oCN.RollBack();
                        return objJsonResult;
                    }
                    //==================================================================================
                    //反作废提交
                    if (oBill.AbandonCancelltion(lngBillKey, oBill.omodel.HBillNo, "h_p_Xs_SeQuotationBill_AfterDropCtrl", CurUserName,  ref DBUtility.ClsPub.sExeReturnInfo) == true)
                    {
                        objJsonResult.code = "1";
                        objJsonResult.count = 1;
                        objJsonResult.Message = "反作废成功";
                        objJsonResult.data = null;
                        return objJsonResult;
                    }
                    else
                    {
                        objJsonResult.code = "0";
                        objJsonResult.count = 0;
                        objJsonResult.Message = "反作废失败!原因:" + DBUtility.ClsPub.sExeReturnInfo;
                        objJsonResult.data = null;
                        return objJsonResult;
                    }
                }
                return objJsonResult;
            }
            catch (Exception e)
            {
                objJsonResult.code = "0";
                objJsonResult.count = 0;
                objJsonResult.Message = "作废失败或者反作废失败!" + e.ToString();
                objJsonResult.data = null;
                return objJsonResult;
            }
        }
        #endregion
    }
}
WebAPI/Controllers/XSGL/YS_ReceiveOtherBillController.cs
@@ -23,18 +23,7 @@
        private json objJsonResult = new json();
        SQLHelper.ClsCN oCN = new SQLHelper.ClsCN();
        DataSet ds;
        public class ClsYS_ReceiveOtherBillSubs
        {
            public Int64 HProjectMoneyIDSub;//   int     //费用项目
            public string HTypeSub;//   varchar(20)     --发票类型
            public double HMoneySub;//  dec(18,8) //单据金额
            public double HTaxRateSub;//  dec(18,8) //税率
            public double HSumMoneySub;//  dec(18,8) //总金额
        }
        DataSet ds;
        #region å…¶ä»–应收单列表 æŸ¥è¯¢
        /// <summary>
WebAPI/Controllers/Æ·ÖʹÜÀí/»ù´¡×ÊÁÏ/Gy_BaseInformationController.cs
@@ -20,9 +20,10 @@
        public DBUtility.ClsPub.Enum_BillStatus BillStatus;//单据状态(新增,修改,浏览,更新单价,变更)
        private json objJsonResult = new json();
        public DataSet ds = new DataSet();
        public DataSet ds1 = new DataSet();
        SQLHelper.ClsCN oCN = new SQLHelper.ClsCN();
        public DAL.ClsGy_EnvironmentTestSchemeBillMain OBill = new DAL.ClsGy_EnvironmentTestSchemeBillMain();
        public DAL.ClsGy_EnvironmentTestSchemeBillMain BillOld = new DAL.ClsGy_EnvironmentTestSchemeBillMain();
        public DAL.ClsGy_EnvironmentTestSchemeBillMain OBill = new DAL.ClsGy_EnvironmentTestSchemeBillMain();       //环境检测方案
        public DAL.ClsGy_EnvironmentTestSchemeBillMain BillOld = new DAL.ClsGy_EnvironmentTestSchemeBillMain();  //环境检测方案
        #region çŽ¯å¢ƒæ£€æµ‹é¡¹ç›® æŸ¥è¯¢       
        [Route("Gy_BaseInformation/getGy_EnvironmentTestSchemeBillMainList")]
@@ -312,12 +313,55 @@
                    objJsonResult.data = null;
                    return objJsonResult;
                }
                DAL.ClsGy_EnvironmentTestSchemeBillMain BillOld = new DAL.ClsGy_EnvironmentTestSchemeBillMain();
                //判断存在性
                if (BillOld.ShowBill(Int64.Parse(HInterID), ref DBUtility.ClsPub.sExeReturnInfo))
                {
                    //删除前控制=========================================
                    string sql1 = "exec h_p_Gy_EnvironmentTestSchemeBill_BeforeDelCtrl  " + BillOld.omodel.HInterID + ",'" + BillOld.omodel.HBillNo + "','" + user + "'";
                    ds = oCN.RunProcReturn(sql1, "h_p_Gy_EnvironmentTestSchemeBill_BeforeDelCtrl");
                    if (ds == null || ds.Tables.Count == 0 || ds.Tables[0].Rows.Count == 0)
                    {
                        objJsonResult.code = "0";
                        objJsonResult.count = 1;
                        objJsonResult.Message = "删除失败!原因:删除前判断失败,请与网络管理人员联系";
                        objJsonResult.data = null;
                        return objJsonResult;
                    }
                oCN.BeginTran();
                    if (ds.Tables[0].Rows[0]["HBack"].ToString() != "0")
                    {
                        objJsonResult.code = "0";
                        objJsonResult.count = 1;
                        objJsonResult.Message = "删除失败!原因:" + ds.Tables[0].Rows[0]["HRemark"].ToString(); ;
                        objJsonResult.data = null;
                        return objJsonResult;
                    }
                    //==================================================================================
                oCN.RunProc("delete from Gy_EnvironmentTestSchemeBillMain where HInterID = " + HInterID);
                    //删除单据(包含删除后控制、写入日志)
                    if (!BillOld.DeleteBill(BillOld.omodel.HInterID, BillOld.omodel.HBillNo, "h_p_Gy_EnvironmentTestSchemeBill_AfterDelCtrl", user, ref ClsPub.sExeReturnInfo))
                    {
                        objJsonResult.code = "0";
                        objJsonResult.count = 0;
                        objJsonResult.Message = "删除失败!原因:" + ClsPub.sExeReturnInfo;
                        objJsonResult.data = null;
                        return objJsonResult;
                    }
                    else
                    {
                        objJsonResult.code = "0";
                        objJsonResult.count = 1;
                        objJsonResult.Message = "删除成功!";
                        objJsonResult.data = null;
                        return objJsonResult;
                    }
                }
                oCN.Commit();
                objJsonResult.code = "1";
                objJsonResult.count = 1;
@@ -364,13 +408,13 @@
                ClsPub.CurUserName = user;
                BillOld.MvarItemKey = "Gy_EnvironmentTestSchemeBillMain";
                oCN.BeginTran();//开始事务
                //Type 1 å®¡æ ¸  2  åå®¡æ ¸
                if (Type == 1)
                {
                    //判断单据是否已经审核
                    DataSet ds;
                    string sql = "select * from " + BillOld.MvarItemKey + " where HinterID = " + HInterID;
                    ds = oCN.RunProcReturn(sql, BillOld.MvarItemKey);
                    if (ds == null || ds.Tables[0].Rows.Count == 0)
@@ -407,8 +451,32 @@
                            objJsonResult.data = null;
                            return objJsonResult;
                        }
                        //审核前控制=========================================
                        string sql1 = "exec h_p_Gy_EnvironmentTestSchemeBill_BeforeCheckCtrl " + HInterID + ",'" + ds.Tables[0].Rows[0]["HBillNo"].ToString() + "','" + user + "'";
                        ds1 = oCN.RunProcReturn(sql1, "h_p_Gy_EnvironmentTestSchemeBill_BeforeCheckCtrl");
                        if (ds1 == null || ds1.Tables.Count == 0 || ds1.Tables[0].Rows.Count == 0)
                        {
                            objJsonResult.code = "0";
                            objJsonResult.count = 1;
                            objJsonResult.Message = "审核失败!原因:审核前判断失败,请与网络管理人员联系";
                            objJsonResult.data = null;
                            oCN.RollBack();
                            return objJsonResult;
                        }
                        if (ds1.Tables[0].Rows[0]["HBack"].ToString() != "0")
                        {
                            objJsonResult.code = "0";
                            objJsonResult.count = 1;
                            objJsonResult.Message = "审核失败!原因:" + ds1.Tables[0].Rows[0]["HRemark"].ToString(); ;
                            objJsonResult.data = null;
                            oCN.RollBack();
                            return objJsonResult;
                        }
                        //==================================================================================
                        //审核单据
                        if (!BillOld.CheckBill(Int64.Parse(HInterID), ref ClsPub.sExeReturnInfo))
                        if (!BillOld.CheckBill(Int64.Parse(HInterID), ds.Tables[0].Rows[0]["HBillNo"].ToString(), "h_p_Gy_EnvironmentTestSchemeBill_AfterCheckCtrl", user, ref ClsPub.sExeReturnInfo))
                        {
                            objJsonResult.code = "0";
                            objJsonResult.count = 1;
@@ -421,7 +489,6 @@
                else
                {
                    //判断单据是否已经反审核
                    DataSet ds;
                    string sql = "select * from " + BillOld.MvarItemKey + " where HinterID = " + HInterID;
                    ds = oCN.RunProcReturn(sql, BillOld.MvarItemKey);
                    if (ds.Tables[0] != null && ds.Tables[0].Rows.Count > 0)
@@ -450,8 +517,29 @@
                            objJsonResult.data = null;
                            return objJsonResult;
                        }
                        //反审核前控制=========================================
                        string sql1 = "exec h_p_Gy_EnvironmentTestSchemeBill_BeforeUnCheckCtrl " + HInterID + ",'" + ds.Tables[0].Rows[0]["HBillNo"].ToString() + "','" + user + "'";
                        ds1 = oCN.RunProcReturn(sql1, "h_p_Gy_EnvironmentTestSchemeBill_BeforeUnCheckCtrl");
                        if (ds1 == null || ds1.Tables.Count == 0 || ds1.Tables[0].Rows.Count == 0)
                        {
                            objJsonResult.code = "0";
                            objJsonResult.count = 1;
                            objJsonResult.Message = "反审核失败!原因:反审核前判断失败,请与网络管理人员联系";
                            objJsonResult.data = null;
                            return objJsonResult;
                        }
                        if (ds1.Tables[0].Rows[0]["HBack"].ToString() != "0")
                        {
                            objJsonResult.code = "0";
                            objJsonResult.count = 1;
                            objJsonResult.Message = "反审核失败!原因:" + ds1.Tables[0].Rows[0]["HRemark"].ToString(); ;
                            objJsonResult.data = null;
                            return objJsonResult;
                        }
                        //===========================================================
                        //反审核单据
                        if (!BillOld.AbandonCheck(Int64.Parse(HInterID), ref ClsPub.sExeReturnInfo))
                        if (!BillOld.AbandonCheck(Int64.Parse(HInterID), ds.Tables[0].Rows[0]["HBillNo"].ToString(), "h_p_Gy_EnvironmentTestSchemeBill_AfterUnCheckCtrl", user, ref ClsPub.sExeReturnInfo))
                        {
                            objJsonResult.code = "0";
                            objJsonResult.count = 1;
@@ -663,7 +751,6 @@
                if (Type == 1)
                {
                    //判断单据是否已经作废
                    DataSet ds;
                    string sql = "select * from " + BillOld.MvarItemKey + " where HinterID = " + HInterID;
                    ds = oCN.RunProcReturn(sql, BillOld.MvarItemKey);
                    if (ds == null || ds.Tables[0].Rows.Count == 0)
@@ -692,8 +779,31 @@
                            objJsonResult.data = null;
                            return objJsonResult;
                        }
                        //作废前控制=========================================
                        string sql1 = "exec h_p_Gy_EnvironmentTestSchemeBill_BeforeDropCtrl " + HInterID + ",'" + ds.Tables[0].Rows[0]["HBillNo"].ToString() + "','" + user + "'";
                        ds1 = oCN.RunProcReturn(sql1, "h_p_Gy_EnvironmentTestSchemeBill_BeforeDropCtrl");
                        if (ds1 == null || ds1.Tables.Count == 0 || ds1.Tables[0].Rows.Count == 0)
                        {
                            objJsonResult.code = "0";
                            objJsonResult.count = 1;
                            objJsonResult.Message = "审核失败!原因:审核前判断失败,请与网络管理人员联系";
                            objJsonResult.data = null;
                            oCN.RollBack();
                            return objJsonResult;
                        }
                        if (ds1.Tables[0].Rows[0]["HBack"].ToString() != "0")
                        {
                            objJsonResult.code = "0";
                            objJsonResult.count = 1;
                            objJsonResult.Message = "审核失败!原因:" + ds1.Tables[0].Rows[0]["HRemark"].ToString(); ;
                            objJsonResult.data = null;
                            oCN.RollBack();
                            return objJsonResult;
                        }
                        //==================================================================================
                        //作废单据
                        if (!BillOld.Cancelltion(Int64.Parse(HInterID), ref ClsPub.sExeReturnInfo))
                        if (!BillOld.Cancelltion(Int64.Parse(HInterID), ds.Tables[0].Rows[0]["HBillNo"].ToString(), "h_p_Gy_EnvironmentTestSchemeBill_AfterDropCtrl", user, ref ClsPub.sExeReturnInfo))
                        {
                            objJsonResult.code = "0";
                            objJsonResult.count = 1;
@@ -727,8 +837,31 @@
                            objJsonResult.data = null;
                            return objJsonResult;
                        }
                        //反作废前控制=========================================
                        string sql1 = "exec h_p_Gy_EnvironmentTestSchemeBill_BeforeUnDropCtrl " + HInterID + ",'" + ds.Tables[0].Rows[0]["HBillNo"].ToString() + "','" + user + "'";
                        ds1 = oCN.RunProcReturn(sql1, "h_p_Gy_EnvironmentTestSchemeBill_BeforeUnDropCtrl");
                        if (ds1 == null || ds1.Tables.Count == 0 || ds1.Tables[0].Rows.Count == 0)
                        {
                            objJsonResult.code = "0";
                            objJsonResult.count = 1;
                            objJsonResult.Message = "作废失败!原因:反作废前判断失败,请与网络管理人员联系";
                            objJsonResult.data = null;
                            oCN.RollBack();
                            return objJsonResult;
                        }
                        if (ds1.Tables[0].Rows[0]["HBack"].ToString() != "0")
                        {
                            objJsonResult.code = "0";
                            objJsonResult.count = 1;
                            objJsonResult.Message = "作废失败!原因:" + ds1.Tables[0].Rows[0]["HRemark"].ToString(); ;
                            objJsonResult.data = null;
                            oCN.RollBack();
                            return objJsonResult;
                        }
                        //==================================================================================
                        //反作废单据
                        if (!BillOld.AbandonCancelltion(Int64.Parse(HInterID), ref ClsPub.sExeReturnInfo))
                        if (!BillOld.AbandonCancelltion(Int64.Parse(HInterID), ds.Tables[0].Rows[0]["HBillNo"].ToString(), "h_p_Gy_EnvironmentTestSchemeBill_AfterDropCtrl", user, ref ClsPub.sExeReturnInfo))
                        {
                            objJsonResult.code = "0";
                            objJsonResult.count = 1;
WebAPI/Controllers/»ù´¡×ÊÁÏ/»ù´¡×ÊÁÏ/Gy_SOPBillListController.cs
@@ -10,6 +10,9 @@
using System.Web.Http;
using System.Windows.Forms;
using WebAPI.Models;
using Newtonsoft.Json;
using System.Collections.Generic;
//using Excel = Microsoft.Office.Interop.Excel;
@@ -315,7 +318,7 @@
            try
            {
                ds = oCN.RunProcReturn(sWhere, "WindowPrint");
                List<object> columnNameList = new List<object>();
                //客户制定
                string sErr = "";
                if (oSystemParameter.ShowBill(ref sErr))
@@ -328,12 +331,19 @@
                    }
                  
                }
                //添加列名
                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)
WebAPI/Controllers/¹¤×ʹÜÀí/HR_EmployeeSkillBillController.cs
@@ -108,7 +108,7 @@
                    //删除前控制=========================================      
                    string sql1 = "exec h_p_HR_EmployeeSkillBill_BeforeDelCtrl  " + BillOld.omodel.HInterID + ",'" + BillOld.omodel.HBillNo + "','" + HMaker + "'";
                    ds = oCn.RunProcReturn(sql1, "h_p_YS_ReceiveOtherBill_BeforeDelCtrl");
                    ds = oCn.RunProcReturn(sql1, "h_p_HR_EmployeeSkillBill_BeforeDelCtrl");
                    if (ds == null || ds.Tables.Count == 0 || ds.Tables[0].Rows.Count == 0)
                    {
                        objJsonResult.code = "0";
@@ -528,8 +528,31 @@
                            objJsonResult.data = null;
                            return objJsonResult;
                        }
                        //作废前控制=========================================
                        string sql1 = "exec h_p_HR_EmployeeSkillBill_BeforeDropCtrl " + oBill.omodel.HInterID + ",'" + oBill.omodel.HBillNo + "','" + HMaker + "'";
                        ds = oCn.RunProcReturn(sql1, "h_p_HR_EmployeeSkillBill_BeforeDropCtrl");
                        if (ds == null || ds.Tables.Count == 0 || ds.Tables[0].Rows.Count == 0)
                        {
                            objJsonResult.code = "0";
                            objJsonResult.count = 1;
                            objJsonResult.Message = "审核失败!原因:审核前判断失败,请与网络管理人员联系";
                            objJsonResult.data = null;
                            oCn.RollBack();
                            return objJsonResult;
                        }
                        if (ds.Tables[0].Rows[0]["HBack"].ToString() != "0")
                        {
                            objJsonResult.code = "0";
                            objJsonResult.count = 1;
                            objJsonResult.Message = "审核失败!原因:" + ds.Tables[0].Rows[0]["HRemark"].ToString(); ;
                            objJsonResult.data = null;
                            oCn.RollBack();
                            return objJsonResult;
                        }
                        //==================================================================================
                        //作废单据
                        if (!oBill.Cancelltion(HInterID, oBill.omodel.HBillNo, HMaker, ref ClsPub.sExeReturnInfo))
                        if (!oBill.Cancelltion(HInterID, oBill.omodel.HBillNo, "h_p_HR_EmployeeSkillBill_AfterDropCtrl", HMaker, ref ClsPub.sExeReturnInfo))
                        {
                            objJsonResult.code = "0";
                            objJsonResult.count = 0;
@@ -556,8 +579,31 @@
                            objJsonResult.data = null;
                            return objJsonResult;
                        }
                        //反作废前控制=========================================
                        string sql1 = "exec h_p_HR_EmployeeSkillBill_BeforeUnDropCtrl " + oBill.omodel.HInterID + ",'" + oBill.omodel.HBillNo + "','" + HMaker + "'";
                        ds = oCn.RunProcReturn(sql1, "h_p_HR_EmployeeSkillBill_BeforeUnDropCtrl");
                        if (ds == null || ds.Tables.Count == 0 || ds.Tables[0].Rows.Count == 0)
                        {
                            objJsonResult.code = "0";
                            objJsonResult.count = 1;
                            objJsonResult.Message = "作废失败!原因:反作废前判断失败,请与网络管理人员联系";
                            objJsonResult.data = null;
                            oCn.RollBack();
                            return objJsonResult;
                        }
                        if (ds.Tables[0].Rows[0]["HBack"].ToString() != "0")
                        {
                            objJsonResult.code = "0";
                            objJsonResult.count = 1;
                            objJsonResult.Message = "作废失败!原因:" + ds.Tables[0].Rows[0]["HRemark"].ToString(); ;
                            objJsonResult.data = null;
                            oCn.RollBack();
                            return objJsonResult;
                        }
                        //==================================================================================
                        //反作废单据
                        if (!oBill.AbandonCancelltion(HInterID, oBill.omodel.HBillNo, HMaker, ref ClsPub.sExeReturnInfo))
                        if (!oBill.AbandonCancelltion(HInterID, oBill.omodel.HBillNo, "h_p_HR_EmployeeSkillBill_AfterDropCtrl", HMaker, ref ClsPub.sExeReturnInfo))
                        {
                            objJsonResult.code = "0";
                            objJsonResult.count = 0;
WebAPI/Controllers/¹¤×ʹÜÀí/HR_PostSkillBillController.cs
@@ -528,8 +528,33 @@
                            objJsonResult.data = null;
                            return objJsonResult;
                        }
                        //作废前控制=========================================
                        string sql1 = "exec h_p_HR_PostSkillBill_BeforeDropCtrl " + oBill.omodel.HInterID + ",'" + oBill.omodel.HBillNo + "','" + HMaker + "'";
                        ds = oCn.RunProcReturn(sql1, "h_p_HR_PostSkillBill_BeforeDropCtrl");
                        if (ds == null || ds.Tables.Count == 0 || ds.Tables[0].Rows.Count == 0)
                        {
                            objJsonResult.code = "0";
                            objJsonResult.count = 1;
                            objJsonResult.Message = "作废失败!原因:作废前判断失败,请与网络管理人员联系";
                            objJsonResult.data = null;
                            oCn.RollBack();
                            return objJsonResult;
                        }
                        if (ds.Tables[0].Rows[0]["HBack"].ToString() != "0")
                        {
                            objJsonResult.code = "0";
                            objJsonResult.count = 1;
                            objJsonResult.Message = "作废失败!原因:" + ds.Tables[0].Rows[0]["HRemark"].ToString(); ;
                            objJsonResult.data = null;
                            oCn.RollBack();
                            return objJsonResult;
                        }
                        //==================================================================================
                        //作废单据
                        if (!oBill.Cancelltion(HInterID, oBill.omodel.HBillNo, HMaker, ref ClsPub.sExeReturnInfo))
                        if (!oBill.Cancelltion(HInterID, oBill.omodel.HBillNo, "h_p_HR_PostSkillBill_AfterDropCtrl", HMaker, ref ClsPub.sExeReturnInfo))
                        {
                            objJsonResult.code = "0";
                            objJsonResult.count = 0;
@@ -556,8 +581,32 @@
                            objJsonResult.data = null;
                            return objJsonResult;
                        }
                        //反作废前控制=========================================
                        string sql1 = "exec h_p_HR_PostSkillBill_BeforeUnDropCtrl " + oBill.omodel.HInterID + ",'" + oBill.omodel.HBillNo + "','" + HMaker + "'";
                        ds = oCn.RunProcReturn(sql1, "h_p_HR_PostSkillBill_BeforeUnDropCtrl");
                        if (ds == null || ds.Tables.Count == 0 || ds.Tables[0].Rows.Count == 0)
                        {
                            objJsonResult.code = "0";
                            objJsonResult.count = 1;
                            objJsonResult.Message = "作废失败!原因:反作废前判断失败,请与网络管理人员联系";
                            objJsonResult.data = null;
                            oCn.RollBack();
                            return objJsonResult;
                        }
                        if (ds.Tables[0].Rows[0]["HBack"].ToString() != "0")
                        {
                            objJsonResult.code = "0";
                            objJsonResult.count = 1;
                            objJsonResult.Message = "作废失败!原因:" + ds.Tables[0].Rows[0]["HRemark"].ToString(); ;
                            objJsonResult.data = null;
                            oCn.RollBack();
                            return objJsonResult;
                        }
                        //==================================================================================
                        //反作废单据
                        if (!oBill.AbandonCancelltion(HInterID, oBill.omodel.HBillNo, HMaker, ref ClsPub.sExeReturnInfo))
                        if (!oBill.AbandonCancelltion(HInterID, oBill.omodel.HBillNo, "h_p_HR_PostSkillBill_AfterDropCtrl", HMaker, ref ClsPub.sExeReturnInfo))
                        {
                            objJsonResult.code = "0";
                            objJsonResult.count = 0;
WebAPI/DLL/ClsGy_Material_Ctl.cs
@@ -30,7 +30,7 @@
                    ",HMaterRuleType,HColorNo,HPieceMaxQty,HCommonUseFlag,HAvgStockPrice,HFootPrice,HTaxCost,HNoTaxCost,HOnceRightRate" +
                    ",HHeight_M,HInches_M,HAl1Long_M,HDensity_M,HTela_M,HUnderTela_M,HSizing_M,HQtyDec,HPriceDec,HMoneyDec,HTaxRate,HProfitRate" +
                    ",HLotcardQty" +
                    ",HProjectBillMainID,HDivisionID" +
                    ",HProjectBillMainID,HDivisionID,HCubicleQty" +
                    ") " +
                    " Values('" + oModel.HNumber + "','" + oModel.HName + "','" + oModel.HHelpCode + "','" + oModel.HShortNumber + "'," + oModel.HParentID.ToString() +
                    ", " + oModel.HLevel.ToString() + "," + Convert.ToString(oModel.HEndFlag ? 1 : 0) + "," + Convert.ToString(oModel.HStopflag ? 1 : 0) + ",'" + oModel.HRemark + "'" +
@@ -56,6 +56,7 @@
                       "," + oModel.HLotcardQty +
                       ",'" + oModel.HProjectBillMainID +
                       "','" + oModel.HDivisionID +
                       "','" + oModel.HCubicleQty +
                       "')", ref DBUtility.ClsPub.sExeReturnInfo);
                //修改上级为非末级代码
                oCn.RunProc("Update " + MvarItemKey + " set HEndflag=0 where HItemID=" + oModel.HParentID, ref DBUtility.ClsPub.sExeReturnInfo);
@@ -226,7 +227,8 @@
                    ",HProfitRate=" + oModel.HProfitRate.ToString() +
                    ",HProjectBillMainID='" + oModel.HProjectBillMainID + "'" +
                    ",HDivisionID='" + oModel.HDivisionID + "'" +
                    ",HLotcardQty='" + oModel.HLotcardQty + "'" +
                    ",HLotcardQty='" + oModel.HLotcardQty + "'" +
                    ",HCubicleQty='" + oModel.HCubicleQty + "'" +
                    " Where HItemID=" + sItemID, ref DBUtility.ClsPub.sExeReturnInfo);
                //修改子项目代码
                oCn.RunProc("exec h_p_Gy_UpdateNumber '" + MvarItemKey + "','" + oModel.HNumber + ".','" + this.HOldNumber + ".'", ref DBUtility.ClsPub.sExeReturnInfo);
WebAPI/DLL/ClsGy_Source_Ctl.cs
@@ -37,13 +37,14 @@
                    ",HType,HRelationID,HCenterID,HEquipFileID_K3,HDeptID" +
                    ",HLevel,HEndFlag,HStopflag,HUseFlag,HRemark,HProcID,HOverTimes " +
                    ",HWorkTimes,HMaxWorkTimes,HMinAdd,HClassCount,HGroupID,HGroupK3ID," +
                    "HUSEORGID,HCREATEORGID,HMacAddr,HEmpID,HMakeEmp,HMakeTime)" +
                    "HUSEORGID,HCREATEORGID,HMacAddr,HEmpID,HMakeEmp,HMakeTime,HCubicleQty,HProdLinePeopleNum)" +
                    " Values('" + oModel.HNumber + "','" + oModel.HName + "','" + oModel.HHelpCode + "','" + oModel.HShortNumber + "'," + oModel.HParentID.ToString() +
                    ",'" + oModel.HType + "'," + oModel.HRelationID.ToString() + "," + oModel.HCenterID.ToString() + "," + oModel.HEquipFileID_K3.ToString() + "," + oModel.HDeptID.ToString() +
                    "," + oModel.HLevel.ToString() + "," + Convert.ToString(oModel.HEndFlag ? 1 : 0) + "," + Convert.ToString(oModel.HStopflag ? 1 : 0) + ",'" + oModel.HUseFlag +
                    "','" + oModel.HRemark + "'," + oModel.HProcID + "," + oModel.HOverTimes + "," + oModel.HWorkTimes + "," + oModel.HMaxWorkTimes +
                    "," + oModel.HMinAdd + "," + oModel.HClassCount + "," + oModel.HGroupID.ToString() + "," + oModel.HGroupK3ID.ToString() + "," +
                    "" + oModel.HUSEORGID + "," + oModel.HCREATEORGID + ",'" + oModel.HMacAddr + "'," + oModel.HEmpID + ",'" + oModel.HMakeEmp + "',getdate())", ref DBUtility.ClsPub.sExeReturnInfo);
                    "" + oModel.HUSEORGID + "," + oModel.HCREATEORGID + ",'" + oModel.HMacAddr + "'," + oModel.HEmpID + ",'" + oModel.HMakeEmp + "',getdate()," + oModel.HCubicleQty + "," + oModel.HProdLinePeopleNum + ")", ref DBUtility.ClsPub.sExeReturnInfo);
                //修改上级为非末级代码
                oCn.RunProc("Update " + MvarItemKey + " set HEndflag=0 where HItemID=" + oModel.HParentID, ref DBUtility.ClsPub.sExeReturnInfo);
@@ -124,8 +125,11 @@
                  ",HUSEORGID='" + oModel.HUSEORGID + "'" +
                  ",HCREATEORGID='" + oModel.HCREATEORGID + "'" +
                  ",HModifyEmp ='" + oModel.HMakeEmp + "'" +
                   ",HModifyTime=getdate()" +
                  ",HModifyTime=getdate()" +
                  ",HCubicleQty=" + oModel.HCubicleQty +
                  ",HProdLinePeopleNum=" + oModel.HProdLinePeopleNum +
                  ",HRemark= '" + oModel.HRemark + "' Where HItemID=" + sItemID, ref DBUtility.ClsPub.sExeReturnInfo);
                //修改子项目代码
                oCn.RunProc("exec h_p_Gy_UpdateNumber '" + MvarItemKey + "','" + oModel.HNumber + ".','" + this.HOldNumber + ".'", ref DBUtility.ClsPub.sExeReturnInfo);
                //将上级 ä¸ºéžæœ«çº§
WebAPI/ListModels.cs
@@ -1758,6 +1758,55 @@
        }
        /// <summary>
        /// å¤„理新增销售报价单表的json
        /// </summary>
        /// <param name="jsonString"></param>
        /// <returns></returns>
        public List<Model.ClsXs_SeQuotationBillMain> getObjectByJson_Xs_SeQuotationBillMain(string jsonString)
        {
            jsonString = "[" + jsonString.ToString() + "]";
            List<Model.ClsXs_SeQuotationBillMain> list = Newtonsoft.Json.JsonConvert.DeserializeObject<List<Model.ClsXs_SeQuotationBillMain>>(jsonString);
            return list;
        }
        /// <summary>
        /// å¤„理新增销售报价子单表的json
        /// </summary>
        /// <param name="jsonString"></param>
        /// <returns></returns>
        public List<Model.ClsXs_SeQuotationBillSub> getObjectByJson_Xs_SeQuotationBillSub(string jsonString)
        {
            jsonString = "[" + jsonString.ToString() + "]";
            List<Model.ClsXs_SeQuotationBillSub> list = Newtonsoft.Json.JsonConvert.DeserializeObject<List<Model.ClsXs_SeQuotationBillSub>>(jsonString);
            return list;
        }
        /// <summary>
        /// å¤„理新增客户拜访记录单表的json
        /// </summary>
        /// <param name="jsonString"></param>
        /// <returns></returns>
        public List<Model.ClsCrm_ComplainVisitBillMain> getObjectByJson_Crm_ComplainVisitBillMain(string jsonString)
        {
            jsonString = "[" + jsonString.ToString() + "]";
            List<Model.ClsCrm_ComplainVisitBillMain> list = Newtonsoft.Json.JsonConvert.DeserializeObject<List<Model.ClsCrm_ComplainVisitBillMain>>(jsonString);
            return list;
        }
        /// <summary>
        /// å¤„理新增客户拜访记录单子表的json
        /// </summary>
        /// <param name="jsonString"></param>
        /// <returns></returns>
        public List<Model.ClsCrm_ComplainVisitBillSub> getObjectByJson_Crm_ComplainVisitBillSub(string jsonString)
        {
            jsonString = "[" + jsonString.ToString() + "]";
            List<Model.ClsCrm_ComplainVisitBillSub> list = Newtonsoft.Json.JsonConvert.DeserializeObject<List<Model.ClsCrm_ComplainVisitBillSub>>(jsonString);
            return list;
        }
        /// <summary>
        /// å¤„理新增其他应付单表的json
        /// </summary>
        /// <param name="jsonString"></param>
WebAPI/Models/ClsGy_Material_Model.cs
@@ -108,5 +108,7 @@
        public double HLotcardQty; //单个流转卡数量
        public int HDivisionID; //事业部
        public int HCubicleQty; //工位数量
    }
}
WebAPI/Models/»ù´¡×ÊÁÏ/Gy_Process.cs
@@ -51,6 +51,7 @@
        public int HQCSchemeID_Patrol { get; set; }
        public string HPayMentType { get; set; }
        public string HMakeEmp { get; set; }
        public decimal HStandardWages { get; set; }  //标准工价
    }
}
WebAPI/Properties/PublishProfiles/FolderProfilewtt.pubxml.user
@@ -4,7 +4,7 @@
-->
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
  <PropertyGroup>
    <History>True|2025-03-05T06:35:44.7812995Z;True|2025-03-05T12:57:06.2539555+08:00;True|2025-03-05T11:19:01.3450138+08:00;True|2025-03-04T15:25:38.6174966+08:00;True|2025-03-04T14:54:41.4026832+08:00;True|2025-03-04T11:08:16.5619007+08:00;True|2025-03-04T10:01:43.5782535+08:00;True|2025-03-04T08:42:48.4526420+08:00;False|2025-03-04T08:42:42.2828130+08:00;True|2025-02-27T15:13:52.3469275+08:00;True|2025-02-27T10:59:33.6194212+08:00;False|2025-02-27T10:59:25.0394841+08:00;True|2025-02-27T10:44:18.9014583+08:00;True|2025-02-26T14:27:14.6049136+08:00;False|2025-02-26T14:27:02.9843524+08:00;True|2025-02-25T15:20:23.1640745+08:00;True|2025-02-25T14:48:55.2842125+08:00;False|2025-02-25T14:48:42.2715748+08:00;True|2025-02-11T10:10:05.6068846+08:00;True|2025-02-11T09:45:52.5312134+08:00;False|2025-02-11T09:42:54.6560039+08:00;False|2025-02-11T09:42:44.7260867+08:00;True|2025-02-10T15:18:16.8537767+08:00;True|2025-02-10T15:11:21.0436532+08:00;True|2025-02-10T13:51:35.4452640+08:00;True|2025-02-10T13:22:03.2907876+08:00;True|2025-02-10T11:04:24.1824725+08:00;True|2025-02-10T10:28:28.1308553+08:00;False|2025-02-10T10:25:56.3141700+08:00;True|2025-02-10T10:20:23.8683188+08:00;False|2025-02-10T10:20:11.3293731+08:00;True|2025-01-10T16:40:52.1666611+08:00;False|2025-01-10T16:40:46.4916510+08:00;True|2025-01-07T14:28:51.8669083+08:00;True|2025-01-07T13:07:29.9052541+08:00;True|2025-01-07T12:56:00.2870613+08:00;True|2025-01-07T12:43:45.7885867+08:00;True|2025-01-07T11:09:19.5063011+08:00;True|2025-01-07T11:00:06.9697471+08:00;True|2025-01-07T09:56:02.2879532+08:00;True|2025-01-07T09:45:19.5462835+08:00;True|2025-01-07T09:42:50.9089289+08:00;False|2025-01-07T09:42:40.4271324+08:00;True|2025-01-04T15:46:13.8527906+08:00;True|2025-01-04T15:39:45.2037219+08:00;False|2025-01-04T15:39:22.4930686+08:00;True|2025-01-04T13:31:08.6975632+08:00;True|2025-01-04T13:29:16.6440831+08:00;True|2025-01-04T13:13:10.1452466+08:00;True|2025-01-03T14:15:46.7252901+08:00;True|2025-01-03T10:09:32.6319841+08:00;False|2025-01-03T10:09:25.9409250+08:00;True|2024-12-31T15:30:13.0841451+08:00;True|2024-12-31T15:20:44.4779893+08:00;False|2024-12-31T15:20:38.3464087+08:00;True|2024-12-30T19:31:50.5186513+08:00;True|2024-12-30T19:26:51.9369903+08:00;True|2024-12-30T19:03:43.0165721+08:00;True|2024-12-30T17:03:44.6035503+08:00;True|2024-12-30T16:59:37.4694911+08:00;True|2024-12-30T15:14:16.7657186+08:00;False|2024-12-30T15:14:09.9136437+08:00;True|2024-12-28T14:22:43.5822832+08:00;True|2024-12-28T14:10:54.9885289+08:00;True|2024-12-28T13:56:42.0405943+08:00;True|2024-12-28T13:18:42.1604585+08:00;True|2024-12-28T10:48:49.0559287+08:00;False|2024-12-28T10:48:41.8813560+08:00;True|2024-12-27T16:41:50.4368711+08:00;True|2024-12-27T14:31:25.7129706+08:00;True|2024-12-27T11:24:16.6524093+08:00;False|2024-12-27T11:23:25.9617516+08:00;True|2024-12-18T08:34:56.1537647+08:00;True|2024-12-17T13:56:47.7915112+08:00;True|2024-12-17T11:13:27.2665832+08:00;True|2024-12-16T16:01:15.5110052+08:00;True|2024-12-16T15:53:18.1111331+08:00;True|2024-12-16T15:13:43.9719840+08:00;True|2024-12-16T15:08:49.2287341+08:00;True|2024-12-16T14:59:21.3003410+08:00;True|2024-12-16T10:16:34.6636364+08:00;True|2024-12-16T10:12:38.1827164+08:00;False|2024-12-16T10:12:16.1621752+08:00;True|2024-12-13T15:44:29.9921182+08:00;False|2024-12-13T15:43:36.1775569+08:00;True|2024-12-11T09:06:23.2065068+08:00;True|2024-12-11T09:02:10.9767948+08:00;True|2024-12-11T08:26:16.2292105+08:00;True|2024-12-10T16:17:47.2702447+08:00;True|2024-12-10T14:47:18.4352590+08:00;True|2024-12-10T14:10:37.0165625+08:00;True|2024-12-10T13:59:25.4712057+08:00;True|2024-12-10T13:46:02.3070111+08:00;True|2024-12-10T13:39:19.2434918+08:00;True|2024-12-10T10:42:47.3763447+08:00;True|2024-12-10T10:28:20.0524748+08:00;True|2024-12-09T11:01:35.7691980+08:00;True|2024-12-09T09:20:22.9742701+08:00;True|2024-12-09T08:47:26.0470083+08:00;True|2024-12-06T13:13:33.9776030+08:00;True|2024-12-05T14:33:41.1542437+08:00;True|2024-12-05T14:21:02.3120095+08:00;True|2024-12-05T14:13:09.2733831+08:00;True|2024-12-05T13:27:25.9831554+08:00;True|2024-12-05T13:23:25.4183580+08:00;True|2024-12-05T11:27:26.9609695+08:00;True|2024-12-05T09:20:29.4596887+08:00;True|2024-12-05T08:47:57.2553570+08:00;True|2024-12-05T08:41:06.4860297+08:00;True|2024-12-05T08:32:16.9785572+08:00;True|2024-12-04T15:54:19.4995372+08:00;True|2024-12-04T11:10:12.2273624+08:00;True|2024-12-04T10:21:44.8769236+08:00;False|2024-12-04T10:20:59.8206595+08:00;True|2024-12-04T09:52:03.8506923+08:00;True|2024-12-03T15:09:48.8710712+08:00;False|2024-12-03T15:08:46.8904626+08:00;True|2024-11-28T10:42:45.3823067+08:00;True|2024-11-28T09:58:38.0983021+08:00;True|2024-11-27T16:16:28.4276838+08:00;True|2024-11-27T16:09:08.0834912+08:00;True|2024-11-27T14:32:21.1684294+08:00;True|2024-11-27T13:24:51.2115157+08:00;True|2024-11-27T13:16:51.5888615+08:00;True|2024-11-26T10:47:18.1958719+08:00;False|2024-11-26T10:46:22.2016963+08:00;False|2024-11-25T10:22:55.3420353+08:00;True|2024-11-20T09:08:48.6293480+08:00;True|2024-11-19T17:01:27.8454996+08:00;True|2024-11-19T08:20:49.6371464+08:00;True|2024-11-18T15:27:25.3419580+08:00;True|2024-11-18T15:19:07.4691728+08:00;True|2024-11-18T14:57:25.8637252+08:00;True|2024-11-18T14:52:10.6158576+08:00;True|2024-11-18T14:46:03.5051743+08:00;True|2024-11-18T13:42:14.5146469+08:00;True|2024-11-18T13:27:53.4498275+08:00;True|2024-11-18T11:26:05.8168670+08:00;True|2024-11-18T11:04:00.4711300+08:00;True|2024-11-18T10:54:15.6267907+08:00;True|2024-11-18T10:45:29.5275370+08:00;True|2024-11-15T16:58:39.1926238+08:00;True|2024-11-15T16:45:12.0168760+08:00;True|2024-11-15T16:37:11.8513587+08:00;True|2024-11-15T16:31:13.0430714+08:00;True|2024-11-15T16:27:45.3575015+08:00;False|2024-11-15T16:26:49.5306586+08:00;True|2024-11-15T16:16:54.0542122+08:00;True|2024-11-15T15:51:41.6920560+08:00;False|2024-11-15T15:50:37.8798414+08:00;True|2024-11-06T14:13:46.3129972+08:00;False|2024-11-06T14:12:47.9022879+08:00;False|2024-11-05T20:45:28.3960353+08:00;True|2024-11-05T19:04:11.0417788+08:00;False|2024-11-05T19:03:03.9263878+08:00;True|2024-11-05T15:54:24.8374699+08:00;False|2024-11-05T15:53:24.4214141+08:00;True|2024-10-25T16:51:46.3066612+08:00;True|2024-10-25T12:16:27.8737941+08:00;True|2024-10-25T10:12:38.8056269+08:00;False|2024-10-25T10:11:44.1117608+08:00;True|2024-10-25T09:54:06.8572059+08:00;True|2024-10-25T08:21:42.6333993+08:00;True|2024-10-24T17:56:19.5319332+08:00;True|2024-10-24T17:50:10.0801119+08:00;False|2024-10-24T17:49:21.0726954+08:00;True|2024-10-24T17:40:46.0577697+08:00;False|2024-10-24T17:39:53.3743103+08:00;True|2024-10-24T14:57:00.6752320+08:00;True|2024-10-24T10:08:39.8269595+08:00;False|2024-10-24T10:07:47.3834032+08:00;True|2024-10-22T10:33:10.1961964+08:00;True|2024-10-21T08:43:54.1422810+08:00;False|2024-10-21T08:43:00.6574201+08:00;True|2024-10-18T14:56:55.6749850+08:00;True|2024-10-18T14:47:05.1073813+08:00;True|2024-10-18T11:24:23.9069952+08:00;True|2024-10-18T11:14:57.8486575+08:00;False|2024-10-18T11:14:07.5289704+08:00;True|2024-10-18T10:57:00.2425175+08:00;False|2024-10-18T10:56:04.8949960+08:00;True|2024-10-15T16:44:32.6189434+08:00;True|2024-10-15T14:38:49.8658311+08:00;True|2024-10-15T09:49:55.2197004+08:00;False|2024-10-15T09:49:14.8790668+08:00;False|2024-10-12T15:28:24.1303695+08:00;True|2024-10-10T10:59:36.7878419+08:00;False|2024-10-10T10:58:40.9900315+08:00;True|2024-10-03T10:57:02.9299524+08:00;True|2024-10-03T10:02:10.1156720+08:00;True|2024-09-30T11:07:22.5376794+08:00;True|2024-09-30T10:15:40.3990343+08:00;True|2024-09-30T10:04:38.1942221+08:00;True|2024-09-29T19:22:01.5340857+08:00;False|2024-09-29T19:21:12.2387012+08:00;True|2024-09-26T09:50:22.2637977+08:00;True|2024-09-25T20:44:33.3994634+08:00;True|2024-09-25T16:07:23.2747063+08:00;True|2024-09-25T14:55:37.9194143+08:00;True|2024-09-24T20:03:43.9841995+08:00;True|2024-09-24T19:42:48.7479102+08:00;True|2024-09-24T19:38:31.5777012+08:00;True|2024-09-24T16:26:58.5969765+08:00;True|2024-09-24T15:31:00.7140362+08:00;True|2024-09-24T10:17:46.7830753+08:00;True|2024-09-24T09:40:19.5788062+08:00;False|2024-09-24T09:39:27.4521802+08:00;True|2024-09-23T19:35:55.3572583+08:00;True|2024-09-23T18:53:15.4480118+08:00;False|2024-09-23T18:52:22.0135173+08:00;True|2024-09-20T09:59:12.9943442+08:00;False|2024-09-20T09:58:18.6945854+08:00;True|2024-09-12T20:40:58.7161451+08:00;False|2024-09-12T20:40:00.0672966+08:00;True|2024-09-12T16:47:22.7671323+08:00;True|2024-09-12T16:34:18.5850144+08:00;True|2024-09-12T16:13:32.1929032+08:00;True|2024-09-12T09:12:54.4456999+08:00;False|2024-09-12T09:12:06.1002866+08:00;False|2024-09-11T21:06:15.4423786+08:00;True|2024-09-10T15:26:48.7055081+08:00;True|2024-09-10T09:26:36.8509916+08:00;True|2024-09-09T19:51:32.6059511+08:00;True|2024-09-09T19:05:47.5349922+08:00;True|2024-09-09T09:26:23.2022383+08:00;False|2024-09-09T09:25:27.3736749+08:00;True|2024-09-06T15:32:52.1865278+08:00;True|2024-09-06T15:16:01.1405794+08:00;True|2024-09-06T14:21:05.7482343+08:00;True|2024-09-06T14:09:17.1494566+08:00;True|2024-09-06T13:49:56.4128481+08:00;True|2024-09-06T13:11:53.0863947+08:00;True|2024-09-06T09:34:54.5934463+08:00;True|2024-09-06T08:47:19.9744092+08:00;True|2024-09-05T15:01:38.6968629+08:00;True|2024-09-05T14:56:09.3505818+08:00;True|2024-09-05T14:49:56.8774757+08:00;True|2024-09-05T08:14:13.2359921+08:00;False|2024-09-05T08:13:11.8797534+08:00;True|2024-09-03T16:52:02.8227375+08:00;False|2024-09-03T16:51:32.4250926+08:00;True|2024-09-03T16:33:05.7269609+08:00;True|2024-09-03T16:00:15.0288548+08:00;True|2024-08-29T08:06:32.4732067+08:00;False|2024-08-29T08:06:02.4801886+08:00;True|2024-08-26T10:17:08.7733750+08:00;False|2024-08-26T10:11:05.1864217+08:00;False|2024-08-26T09:50:31.1539306+08:00;False|2024-08-26T09:47:37.4351309+08:00;True|2024-08-16T16:55:32.0918962+08:00;True|2024-08-16T16:53:23.3505641+08:00;False|2024-08-16T16:49:30.4579212+08:00;False|2024-08-16T16:47:01.9799743+08:00;</History>
    <History>True|2025-03-17T13:47:20.2930413Z;True|2025-03-17T19:41:02.3815065+08:00;False|2025-03-17T19:40:55.9908892+08:00;True|2025-03-17T19:19:49.8872115+08:00;True|2025-03-17T18:58:03.6903198+08:00;True|2025-03-17T14:26:34.9258043+08:00;True|2025-03-14T15:40:57.9378742+08:00;False|2025-03-14T15:40:46.0132033+08:00;False|2025-03-14T12:34:38.6551944+08:00;True|2025-03-05T14:35:44.7812995+08:00;True|2025-03-05T12:57:06.2539555+08:00;True|2025-03-05T11:19:01.3450138+08:00;True|2025-03-04T15:25:38.6174966+08:00;True|2025-03-04T14:54:41.4026832+08:00;True|2025-03-04T11:08:16.5619007+08:00;True|2025-03-04T10:01:43.5782535+08:00;True|2025-03-04T08:42:48.4526420+08:00;False|2025-03-04T08:42:42.2828130+08:00;True|2025-02-27T15:13:52.3469275+08:00;True|2025-02-27T10:59:33.6194212+08:00;False|2025-02-27T10:59:25.0394841+08:00;True|2025-02-27T10:44:18.9014583+08:00;True|2025-02-26T14:27:14.6049136+08:00;False|2025-02-26T14:27:02.9843524+08:00;True|2025-02-25T15:20:23.1640745+08:00;True|2025-02-25T14:48:55.2842125+08:00;False|2025-02-25T14:48:42.2715748+08:00;True|2025-02-11T10:10:05.6068846+08:00;True|2025-02-11T09:45:52.5312134+08:00;False|2025-02-11T09:42:54.6560039+08:00;False|2025-02-11T09:42:44.7260867+08:00;True|2025-02-10T15:18:16.8537767+08:00;True|2025-02-10T15:11:21.0436532+08:00;True|2025-02-10T13:51:35.4452640+08:00;True|2025-02-10T13:22:03.2907876+08:00;True|2025-02-10T11:04:24.1824725+08:00;True|2025-02-10T10:28:28.1308553+08:00;False|2025-02-10T10:25:56.3141700+08:00;True|2025-02-10T10:20:23.8683188+08:00;False|2025-02-10T10:20:11.3293731+08:00;True|2025-01-10T16:40:52.1666611+08:00;False|2025-01-10T16:40:46.4916510+08:00;True|2025-01-07T14:28:51.8669083+08:00;True|2025-01-07T13:07:29.9052541+08:00;True|2025-01-07T12:56:00.2870613+08:00;True|2025-01-07T12:43:45.7885867+08:00;True|2025-01-07T11:09:19.5063011+08:00;True|2025-01-07T11:00:06.9697471+08:00;True|2025-01-07T09:56:02.2879532+08:00;True|2025-01-07T09:45:19.5462835+08:00;True|2025-01-07T09:42:50.9089289+08:00;False|2025-01-07T09:42:40.4271324+08:00;True|2025-01-04T15:46:13.8527906+08:00;True|2025-01-04T15:39:45.2037219+08:00;False|2025-01-04T15:39:22.4930686+08:00;True|2025-01-04T13:31:08.6975632+08:00;True|2025-01-04T13:29:16.6440831+08:00;True|2025-01-04T13:13:10.1452466+08:00;True|2025-01-03T14:15:46.7252901+08:00;True|2025-01-03T10:09:32.6319841+08:00;False|2025-01-03T10:09:25.9409250+08:00;True|2024-12-31T15:30:13.0841451+08:00;True|2024-12-31T15:20:44.4779893+08:00;False|2024-12-31T15:20:38.3464087+08:00;True|2024-12-30T19:31:50.5186513+08:00;True|2024-12-30T19:26:51.9369903+08:00;True|2024-12-30T19:03:43.0165721+08:00;True|2024-12-30T17:03:44.6035503+08:00;True|2024-12-30T16:59:37.4694911+08:00;True|2024-12-30T15:14:16.7657186+08:00;False|2024-12-30T15:14:09.9136437+08:00;True|2024-12-28T14:22:43.5822832+08:00;True|2024-12-28T14:10:54.9885289+08:00;True|2024-12-28T13:56:42.0405943+08:00;True|2024-12-28T13:18:42.1604585+08:00;True|2024-12-28T10:48:49.0559287+08:00;False|2024-12-28T10:48:41.8813560+08:00;True|2024-12-27T16:41:50.4368711+08:00;True|2024-12-27T14:31:25.7129706+08:00;True|2024-12-27T11:24:16.6524093+08:00;False|2024-12-27T11:23:25.9617516+08:00;True|2024-12-18T08:34:56.1537647+08:00;True|2024-12-17T13:56:47.7915112+08:00;True|2024-12-17T11:13:27.2665832+08:00;True|2024-12-16T16:01:15.5110052+08:00;True|2024-12-16T15:53:18.1111331+08:00;True|2024-12-16T15:13:43.9719840+08:00;True|2024-12-16T15:08:49.2287341+08:00;True|2024-12-16T14:59:21.3003410+08:00;True|2024-12-16T10:16:34.6636364+08:00;True|2024-12-16T10:12:38.1827164+08:00;False|2024-12-16T10:12:16.1621752+08:00;True|2024-12-13T15:44:29.9921182+08:00;False|2024-12-13T15:43:36.1775569+08:00;True|2024-12-11T09:06:23.2065068+08:00;True|2024-12-11T09:02:10.9767948+08:00;True|2024-12-11T08:26:16.2292105+08:00;True|2024-12-10T16:17:47.2702447+08:00;True|2024-12-10T14:47:18.4352590+08:00;True|2024-12-10T14:10:37.0165625+08:00;True|2024-12-10T13:59:25.4712057+08:00;True|2024-12-10T13:46:02.3070111+08:00;True|2024-12-10T13:39:19.2434918+08:00;True|2024-12-10T10:42:47.3763447+08:00;True|2024-12-10T10:28:20.0524748+08:00;True|2024-12-09T11:01:35.7691980+08:00;True|2024-12-09T09:20:22.9742701+08:00;True|2024-12-09T08:47:26.0470083+08:00;True|2024-12-06T13:13:33.9776030+08:00;True|2024-12-05T14:33:41.1542437+08:00;True|2024-12-05T14:21:02.3120095+08:00;True|2024-12-05T14:13:09.2733831+08:00;True|2024-12-05T13:27:25.9831554+08:00;True|2024-12-05T13:23:25.4183580+08:00;True|2024-12-05T11:27:26.9609695+08:00;True|2024-12-05T09:20:29.4596887+08:00;True|2024-12-05T08:47:57.2553570+08:00;True|2024-12-05T08:41:06.4860297+08:00;True|2024-12-05T08:32:16.9785572+08:00;True|2024-12-04T15:54:19.4995372+08:00;True|2024-12-04T11:10:12.2273624+08:00;True|2024-12-04T10:21:44.8769236+08:00;False|2024-12-04T10:20:59.8206595+08:00;True|2024-12-04T09:52:03.8506923+08:00;True|2024-12-03T15:09:48.8710712+08:00;False|2024-12-03T15:08:46.8904626+08:00;True|2024-11-28T10:42:45.3823067+08:00;True|2024-11-28T09:58:38.0983021+08:00;True|2024-11-27T16:16:28.4276838+08:00;True|2024-11-27T16:09:08.0834912+08:00;True|2024-11-27T14:32:21.1684294+08:00;True|2024-11-27T13:24:51.2115157+08:00;True|2024-11-27T13:16:51.5888615+08:00;True|2024-11-26T10:47:18.1958719+08:00;False|2024-11-26T10:46:22.2016963+08:00;False|2024-11-25T10:22:55.3420353+08:00;True|2024-11-20T09:08:48.6293480+08:00;True|2024-11-19T17:01:27.8454996+08:00;True|2024-11-19T08:20:49.6371464+08:00;True|2024-11-18T15:27:25.3419580+08:00;True|2024-11-18T15:19:07.4691728+08:00;True|2024-11-18T14:57:25.8637252+08:00;True|2024-11-18T14:52:10.6158576+08:00;True|2024-11-18T14:46:03.5051743+08:00;True|2024-11-18T13:42:14.5146469+08:00;True|2024-11-18T13:27:53.4498275+08:00;True|2024-11-18T11:26:05.8168670+08:00;True|2024-11-18T11:04:00.4711300+08:00;True|2024-11-18T10:54:15.6267907+08:00;True|2024-11-18T10:45:29.5275370+08:00;True|2024-11-15T16:58:39.1926238+08:00;True|2024-11-15T16:45:12.0168760+08:00;True|2024-11-15T16:37:11.8513587+08:00;True|2024-11-15T16:31:13.0430714+08:00;True|2024-11-15T16:27:45.3575015+08:00;False|2024-11-15T16:26:49.5306586+08:00;True|2024-11-15T16:16:54.0542122+08:00;True|2024-11-15T15:51:41.6920560+08:00;False|2024-11-15T15:50:37.8798414+08:00;True|2024-11-06T14:13:46.3129972+08:00;False|2024-11-06T14:12:47.9022879+08:00;False|2024-11-05T20:45:28.3960353+08:00;True|2024-11-05T19:04:11.0417788+08:00;False|2024-11-05T19:03:03.9263878+08:00;True|2024-11-05T15:54:24.8374699+08:00;False|2024-11-05T15:53:24.4214141+08:00;True|2024-10-25T16:51:46.3066612+08:00;True|2024-10-25T12:16:27.8737941+08:00;True|2024-10-25T10:12:38.8056269+08:00;False|2024-10-25T10:11:44.1117608+08:00;True|2024-10-25T09:54:06.8572059+08:00;True|2024-10-25T08:21:42.6333993+08:00;True|2024-10-24T17:56:19.5319332+08:00;True|2024-10-24T17:50:10.0801119+08:00;False|2024-10-24T17:49:21.0726954+08:00;True|2024-10-24T17:40:46.0577697+08:00;False|2024-10-24T17:39:53.3743103+08:00;True|2024-10-24T14:57:00.6752320+08:00;True|2024-10-24T10:08:39.8269595+08:00;False|2024-10-24T10:07:47.3834032+08:00;True|2024-10-22T10:33:10.1961964+08:00;True|2024-10-21T08:43:54.1422810+08:00;False|2024-10-21T08:43:00.6574201+08:00;True|2024-10-18T14:56:55.6749850+08:00;True|2024-10-18T14:47:05.1073813+08:00;True|2024-10-18T11:24:23.9069952+08:00;True|2024-10-18T11:14:57.8486575+08:00;False|2024-10-18T11:14:07.5289704+08:00;True|2024-10-18T10:57:00.2425175+08:00;False|2024-10-18T10:56:04.8949960+08:00;True|2024-10-15T16:44:32.6189434+08:00;True|2024-10-15T14:38:49.8658311+08:00;True|2024-10-15T09:49:55.2197004+08:00;False|2024-10-15T09:49:14.8790668+08:00;False|2024-10-12T15:28:24.1303695+08:00;True|2024-10-10T10:59:36.7878419+08:00;False|2024-10-10T10:58:40.9900315+08:00;True|2024-10-03T10:57:02.9299524+08:00;True|2024-10-03T10:02:10.1156720+08:00;True|2024-09-30T11:07:22.5376794+08:00;True|2024-09-30T10:15:40.3990343+08:00;True|2024-09-30T10:04:38.1942221+08:00;True|2024-09-29T19:22:01.5340857+08:00;False|2024-09-29T19:21:12.2387012+08:00;True|2024-09-26T09:50:22.2637977+08:00;True|2024-09-25T20:44:33.3994634+08:00;True|2024-09-25T16:07:23.2747063+08:00;True|2024-09-25T14:55:37.9194143+08:00;True|2024-09-24T20:03:43.9841995+08:00;True|2024-09-24T19:42:48.7479102+08:00;True|2024-09-24T19:38:31.5777012+08:00;True|2024-09-24T16:26:58.5969765+08:00;True|2024-09-24T15:31:00.7140362+08:00;True|2024-09-24T10:17:46.7830753+08:00;True|2024-09-24T09:40:19.5788062+08:00;False|2024-09-24T09:39:27.4521802+08:00;True|2024-09-23T19:35:55.3572583+08:00;True|2024-09-23T18:53:15.4480118+08:00;False|2024-09-23T18:52:22.0135173+08:00;True|2024-09-20T09:59:12.9943442+08:00;False|2024-09-20T09:58:18.6945854+08:00;True|2024-09-12T20:40:58.7161451+08:00;False|2024-09-12T20:40:00.0672966+08:00;True|2024-09-12T16:47:22.7671323+08:00;True|2024-09-12T16:34:18.5850144+08:00;True|2024-09-12T16:13:32.1929032+08:00;True|2024-09-12T09:12:54.4456999+08:00;False|2024-09-12T09:12:06.1002866+08:00;False|2024-09-11T21:06:15.4423786+08:00;True|2024-09-10T15:26:48.7055081+08:00;True|2024-09-10T09:26:36.8509916+08:00;True|2024-09-09T19:51:32.6059511+08:00;True|2024-09-09T19:05:47.5349922+08:00;True|2024-09-09T09:26:23.2022383+08:00;False|2024-09-09T09:25:27.3736749+08:00;True|2024-09-06T15:32:52.1865278+08:00;True|2024-09-06T15:16:01.1405794+08:00;True|2024-09-06T14:21:05.7482343+08:00;True|2024-09-06T14:09:17.1494566+08:00;True|2024-09-06T13:49:56.4128481+08:00;True|2024-09-06T13:11:53.0863947+08:00;True|2024-09-06T09:34:54.5934463+08:00;True|2024-09-06T08:47:19.9744092+08:00;True|2024-09-05T15:01:38.6968629+08:00;True|2024-09-05T14:56:09.3505818+08:00;True|2024-09-05T14:49:56.8774757+08:00;True|2024-09-05T08:14:13.2359921+08:00;False|2024-09-05T08:13:11.8797534+08:00;True|2024-09-03T16:52:02.8227375+08:00;False|2024-09-03T16:51:32.4250926+08:00;True|2024-09-03T16:33:05.7269609+08:00;True|2024-09-03T16:00:15.0288548+08:00;True|2024-08-29T08:06:32.4732067+08:00;False|2024-08-29T08:06:02.4801886+08:00;True|2024-08-26T10:17:08.7733750+08:00;False|2024-08-26T10:11:05.1864217+08:00;False|2024-08-26T09:50:31.1539306+08:00;False|2024-08-26T09:47:37.4351309+08:00;True|2024-08-16T16:55:32.0918962+08:00;True|2024-08-16T16:53:23.3505641+08:00;False|2024-08-16T16:49:30.4579212+08:00;False|2024-08-16T16:47:01.9799743+08:00;</History>
    <_PublishTargetUrl>G:\issWeb\网站发布\API</_PublishTargetUrl>
  </PropertyGroup>
  <ItemGroup>
@@ -45,28 +45,28 @@
      <publishTime>02/22/2013 16:43:40</publishTime>
    </File>
    <File Include="bin/BLL.dll">
      <publishTime>03/05/2025 14:35:02</publishTime>
      <publishTime>03/17/2025 21:47:01</publishTime>
    </File>
    <File Include="bin/BLL.pdb">
      <publishTime>03/05/2025 14:35:02</publishTime>
      <publishTime>03/17/2025 21:47:01</publishTime>
    </File>
    <File Include="bin/BouncyCastle.Crypto.dll">
      <publishTime>12/18/2020 05:32:28</publishTime>
    </File>
    <File Include="bin/DAL.dll">
      <publishTime>03/05/2025 14:34:59</publishTime>
      <publishTime>03/17/2025 21:46:58</publishTime>
    </File>
    <File Include="bin/DAL.pdb">
      <publishTime>03/05/2025 14:34:59</publishTime>
      <publishTime>03/17/2025 21:46:58</publishTime>
    </File>
    <File Include="bin/Dapper.dll">
      <publishTime>07/22/2016 22:52:40</publishTime>
    </File>
    <File Include="bin/DBUtility.dll">
      <publishTime>03/05/2025 14:34:54</publishTime>
      <publishTime>03/17/2025 21:46:53</publishTime>
    </File>
    <File Include="bin/DBUtility.pdb">
      <publishTime>03/05/2025 14:34:54</publishTime>
      <publishTime>03/17/2025 21:46:53</publishTime>
    </File>
    <File Include="bin/Grpc.Core.Api.dll">
      <publishTime>03/22/2022 13:17:26</publishTime>
@@ -111,10 +111,10 @@
      <publishTime>07/25/2012 19:48:56</publishTime>
    </File>
    <File Include="bin/Model.dll">
      <publishTime>03/05/2025 14:34:54</publishTime>
      <publishTime>03/17/2025 21:46:54</publishTime>
    </File>
    <File Include="bin/Model.pdb">
      <publishTime>03/05/2025 14:34:54</publishTime>
      <publishTime>03/17/2025 21:46:54</publishTime>
    </File>
    <File Include="bin/Models/ClsSc_MouldScrapOutBillMain.cs">
      <publishTime>04/15/2024 12:55:45</publishTime>
@@ -147,34 +147,34 @@
      <publishTime>10/23/2021 17:07:54</publishTime>
    </File>
    <File Include="bin/Pub_Class.dll">
      <publishTime>03/05/2025 14:34:51</publishTime>
      <publishTime>03/17/2025 21:46:51</publishTime>
    </File>
    <File Include="bin/Pub_Class.pdb">
      <publishTime>03/05/2025 14:34:51</publishTime>
      <publishTime>03/17/2025 21:46:51</publishTime>
    </File>
    <File Include="bin/Pub_Control.dll">
      <publishTime>03/05/2025 14:34:53</publishTime>
      <publishTime>03/17/2025 21:46:52</publishTime>
    </File>
    <File Include="bin/Pub_Control.pdb">
      <publishTime>03/05/2025 14:34:53</publishTime>
      <publishTime>03/17/2025 21:46:52</publishTime>
    </File>
    <File Include="bin/RestSharp.dll">
      <publishTime>08/31/2012 06:22:50</publishTime>
    </File>
    <File Include="bin/SQLHelper.dll">
      <publishTime>03/05/2025 14:34:53</publishTime>
      <publishTime>03/17/2025 21:46:52</publishTime>
    </File>
    <File Include="bin/SQLHelper.pdb">
      <publishTime>03/05/2025 14:34:53</publishTime>
      <publishTime>03/17/2025 21:46:52</publishTime>
    </File>
    <File Include="bin/Swashbuckle.Core.dll">
      <publishTime>02/16/2015 01:57:08</publishTime>
    </File>
    <File Include="bin/SyntacticSugar.dll">
      <publishTime>03/05/2025 14:34:49</publishTime>
      <publishTime>03/17/2025 21:46:49</publishTime>
    </File>
    <File Include="bin/SyntacticSugar.pdb">
      <publishTime>03/05/2025 14:34:49</publishTime>
      <publishTime>03/17/2025 21:46:49</publishTime>
    </File>
    <File Include="bin/System.Buffers.dll">
      <publishTime>07/19/2017 18:01:28</publishTime>
@@ -285,19 +285,19 @@
      <publishTime>05/09/2023 10:43:40</publishTime>
    </File>
    <File Include="bin/TopSdk.dll">
      <publishTime>03/05/2025 14:34:55</publishTime>
      <publishTime>03/17/2025 21:46:54</publishTime>
    </File>
    <File Include="bin/TopSdk.pdb">
      <publishTime>03/05/2025 14:34:55</publishTime>
      <publishTime>03/17/2025 21:46:54</publishTime>
    </File>
    <File Include="bin/WebActivatorEx.dll">
      <publishTime>11/24/2014 19:18:48</publishTime>
    </File>
    <File Include="bin/WebAPI.dll">
      <publishTime>03/05/2025 14:35:10</publishTime>
      <publishTime>03/17/2025 21:47:08</publishTime>
    </File>
    <File Include="bin/WebAPI.pdb">
      <publishTime>03/05/2025 14:35:10</publishTime>
      <publishTime>03/17/2025 21:47:08</publishTime>
    </File>
    <File Include="bin/WebAPI.XmlSerializers.dll">
      <publishTime>08/16/2024 16:55:28</publishTime>
@@ -495,7 +495,7 @@
      <publishTime>04/29/2024 08:30:03</publishTime>
    </File>
    <File Include="Web.config">
      <publishTime>03/05/2025 14:35:43</publishTime>
      <publishTime>03/17/2025 21:47:19</publishTime>
    </File>
  </ItemGroup>
</Project>
WebAPI/Properties/PublishProfiles/JFAPI.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|2025-03-07T08:23:25.1589274Z;True|2025-03-07T16:18:46.0202723+08:00;True|2025-03-07T15:59:34.8313474+08:00;True|2025-03-07T15:37:59.1693363+08:00;True|2025-03-07T14:05:40.7253978+08:00;True|2025-03-07T11:21:14.9610137+08:00;False|2025-03-07T11:15:41.4171028+08:00;True|2025-03-07T10:23:24.0437379+08:00;True|2025-03-07T10:07:03.4231550+08:00;False|2025-03-07T10:04:32.6854924+08:00;True|2025-03-06T16:32:23.7096239+08:00;True|2025-03-06T15:45:46.0345284+08:00;True|2025-03-06T15:40:00.7026164+08:00;True|2025-03-06T15:20:20.3523488+08:00;True|2025-03-06T14:19:37.2403331+08:00;True|2025-03-06T13:49:03.6420821+08:00;False|2025-03-06T13:46:35.7037619+08:00;True|2025-03-06T11:03:29.5882789+08:00;True|2025-03-06T09:59:53.3080173+08:00;True|2025-03-06T09:43:48.4337079+08:00;False|2025-03-06T09:35:05.3462434+08:00;True|2025-03-05T18:25:35.2595591+08:00;True|2025-03-05T18:03:37.5687895+08:00;True|2025-03-05T17:48:08.3418269+08:00;False|2025-03-05T17:44:40.0721881+08:00;True|2025-03-05T17:23:30.5871011+08:00;True|2025-03-05T16:31:12.2285816+08:00;True|2025-03-05T16:00:25.5496303+08:00;True|2025-03-05T15:11:30.9434230+08:00;True|2025-03-05T14:22:08.4650724+08:00;True|2025-03-05T13:29:42.9306833+08:00;True|2025-03-05T11:28:17.5541196+08:00;True|2025-03-05T11:10:22.3318023+08:00;True|2025-03-05T10:55:33.6796527+08:00;True|2025-03-05T10:08:26.7761472+08:00;True|2025-03-05T10:02:32.8701262+08:00;False|2025-03-05T09:59:55.0044057+08:00;True|2025-03-04T17:48:24.6869079+08:00;True|2025-03-04T17:42:05.0276293+08:00;False|2025-03-04T17:39:53.6208557+08:00;False|2025-03-04T17:39:30.0759309+08:00;False|2025-03-04T17:05:37.2163588+08:00;True|2025-03-04T16:51:15.6884461+08:00;True|2025-03-04T16:49:03.3836181+08:00;True|2025-03-04T16:31:36.5847402+08:00;True|2025-03-04T15:52:09.1977151+08:00;True|2025-03-04T15:24:25.0194954+08:00;True|2025-03-04T15:12:44.1606138+08:00;False|2025-03-04T15:10:47.3915404+08:00;True|2025-03-04T14:31:42.7483906+08:00;True|2025-03-04T11:28:36.6001869+08:00;False|2025-02-27T19:55:43.0462466+08:00;True|2025-02-24T16:03:00.5507258+08:00;False|2025-02-24T16:00:00.9104160+08:00;True|2025-02-19T16:55:31.8966125+08:00;True|2025-02-19T14:51:19.5866770+08:00;False|2025-02-19T14:49:16.2857645+08:00;True|2025-02-19T14:11:03.8109482+08:00;False|2025-02-19T14:08:17.7243950+08:00;True|2025-02-19T11:16:48.1875981+08:00;False|2025-02-19T11:14:24.0571589+08:00;True|2025-02-19T10:17:34.3257301+08:00;False|2025-02-19T10:14:49.0730325+08:00;True|2025-02-18T09:38:54.9616937+08:00;True|2025-02-18T09:16:03.1196071+08:00;False|2025-02-18T09:13:52.5022130+08:00;True|2025-02-17T17:28:38.1103164+08:00;True|2025-02-17T17:06:19.1494960+08:00;True|2025-02-17T16:58:21.8893871+08:00;False|2025-02-17T16:56:34.0012780+08:00;True|2025-02-17T15:56:45.9560949+08:00;False|2025-02-17T15:29:32.9323141+08:00;False|2025-02-17T15:27:54.6615301+08:00;False|2025-02-17T15:25:42.7179137+08:00;True|2025-02-12T10:48:39.4029671+08:00;True|2025-02-12T10:45:09.8138793+08:00;False|2025-02-12T10:43:37.5751112+08:00;False|2025-02-12T10:43:24.8201898+08:00;False|2025-02-12T10:42:58.2736984+08:00;False|2025-02-12T10:42:46.1482594+08:00;False|2025-02-12T10:42:01.5427330+08:00;False|2025-02-12T10:41:48.3761346+08:00;False|2025-02-12T10:41:29.3367142+08:00;True|2025-02-11T15:41:34.0746843+08:00;True|2025-02-11T15:39:37.3374891+08:00;False|2025-02-11T15:39:27.0449176+08:00;False|2025-02-11T15:08:35.2970100+08:00;True|2025-02-11T14:59:59.6539416+08:00;True|2025-02-11T14:56:20.5954601+08:00;False|2025-02-11T14:55:35.6700921+08:00;True|2025-02-10T09:39:38.7399451+08:00;False|2025-02-10T09:39:10.1358642+08:00;True|2025-02-08T16:00:23.1136903+08:00;False|2025-02-08T15:59:50.0414065+08:00;True|2025-01-17T10:17:41.6850215+08:00;False|2025-01-17T10:16:20.3202054+08:00;True|2025-01-17T09:00:26.6966310+08:00;False|2025-01-17T08:59:59.9527727+08:00;True|2025-01-16T11:06:57.1014257+08:00;True|2025-01-16T10:27:57.2742426+08:00;False|2025-01-16T10:27:27.5197746+08:00;True|2025-01-15T11:05:17.5523582+08:00;True|2025-01-15T09:37:34.6118980+08:00;False|2025-01-15T09:36:27.7987949+08:00;True|2025-01-14T12:52:06.2234405+08:00;True|2025-01-14T12:50:08.8487446+08:00;False|2025-01-14T12:49:45.2743330+08:00;True|2025-01-14T10:31:18.6477403+08:00;False|2025-01-14T10:29:30.1534049+08:00;True|2025-01-13T15:27:00.4497527+08:00;True|2025-01-13T15:01:33.6142160+08:00;True|2025-01-13T10:29:49.4772980+08:00;True|2025-01-13T10:11:15.7993265+08:00;True|2025-01-13T10:08:58.9378828+08:00;False|2025-01-13T10:08:44.9869073+08:00;True|2025-01-13T10:02:17.5175561+08:00;False|2025-01-13T10:02:00.9991870+08:00;True|2025-01-08T17:50:21.7468469+08:00;True|2025-01-08T16:38:48.8592252+08:00;True|2025-01-08T10:44:42.9161086+08:00;False|2025-01-08T10:44:09.4840640+08:00;True|2025-01-08T10:34:31.5982265+08:00;False|2025-01-08T10:33:57.3576390+08:00;True|2025-01-03T17:19:09.1765100+08:00;True|2025-01-03T17:10:41.8794009+08:00;True|2025-01-03T17:10:11.4245485+08:00;True|2025-01-03T15:54:22.3387906+08:00;True|2025-01-03T15:41:44.9897120+08:00;False|2025-01-03T15:40:42.1357112+08:00;False|2025-01-03T15:39:09.0564197+08:00;True|2025-01-03T14:58:31.5701467+08:00;True|2025-01-03T14:29:13.4456304+08:00;False|2025-01-03T14:27:18.9925263+08:00;True|2025-01-02T16:08:24.1819376+08:00;True|2025-01-02T16:07:01.1636705+08:00;True|2025-01-02T16:03:02.6520904+08:00;True|2025-01-02T10:03:56.0551738+08:00;False|2025-01-02T10:03:34.8632732+08:00;True|2024-12-31T15:27:01.3180960+08:00;True|2024-12-31T11:17:12.2977529+08:00;True|2024-12-31T10:48:14.7205535+08:00;True|2024-12-31T10:18:45.6669875+08:00;False|2024-12-31T10:18:21.6706557+08:00;True|2024-12-30T09:32:44.3898729+08:00;True|2024-12-30T09:31:24.5771941+08:00;False|2024-12-30T09:30:52.4031391+08:00;True|2024-12-27T16:12:20.2836752+08:00;False|2024-12-27T16:11:04.6614343+08:00;True|2024-12-27T15:07:23.0750147+08:00;True|2024-12-27T15:04:52.7876532+08:00;True|2024-12-27T14:37:54.3154829+08:00;False|2024-12-27T14:37:26.9546174+08:00;True|2024-12-26T16:33:56.0452167+08:00;True|2024-12-26T16:29:21.4115458+08:00;True|2024-12-26T16:29:02.0242815+08:00;True|2024-12-26T15:17:24.7390981+08:00;False|2024-12-26T15:13:26.8863189+08:00;True|2024-12-26T15:06:35.4541902+08:00;True|2024-12-26T11:35:42.2760106+08:00;False|2024-12-26T11:35:08.9255789+08:00;True|2024-12-26T10:10:29.7487991+08:00;True|2024-12-26T09:27:40.2637311+08:00;False|2024-12-26T09:25:52.1339136+08:00;True|2024-12-24T15:11:48.9968778+08:00;True|2024-12-24T15:06:55.0283993+08:00;True|2024-12-24T14:36:29.6466740+08:00;True|2024-12-24T10:28:42.7489880+08:00;False|2024-12-24T10:28:08.6809715+08:00;True|2024-12-24T10:06:05.9449103+08:00;False|2024-12-24T10:05:32.8409161+08:00;True|2024-12-23T14:56:40.3416256+08:00;True|2024-12-23T14:50:50.2677378+08:00;True|2024-12-23T14:48:27.8169391+08:00;True|2024-12-23T14:45:25.5341474+08:00;True|2024-12-23T14:42:23.7825087+08:00;True|2024-12-23T14:35:53.8876449+08:00;True|2024-12-23T14:14:00.4257926+08:00;True|2024-12-23T11:10:54.5874876+08:00;True|2024-12-23T11:08:44.0250304+08:00;False|2024-12-23T11:08:18.5757850+08:00;True|2024-12-20T12:51:29.2354841+08:00;True|2024-12-20T12:46:13.7636932+08:00;False|2024-12-20T12:44:21.1473486+08:00;False|2024-12-20T12:44:06.5427106+08:00;True|2024-12-20T12:29:33.9971940+08:00;False|2024-12-20T12:29:01.0285205+08:00;True|2024-12-19T15:49:19.9906264+08:00;True|2024-12-19T14:55:54.3323405+08:00;True|2024-12-19T14:17:50.5086161+08:00;True|2024-12-19T14:08:16.0919011+08:00;True|2024-12-19T14:02:50.3092759+08:00;True|2024-12-19T13:54:41.2332165+08:00;False|2024-12-19T13:54:07.6973483+08:00;True|2024-12-19T09:34:54.5332110+08:00;True|2024-12-19T08:49:05.5690428+08:00;False|2024-12-19T08:48:51.0618113+08:00;True|2024-12-18T15:45:34.7174246+08:00;False|2024-12-18T15:45:10.3226822+08:00;True|2024-12-18T15:32:03.5983267+08:00;True|2024-12-18T15:31:20.1219502+08:00;True|2024-12-18T11:57:09.1595607+08:00;True|2024-12-18T11:13:37.4765697+08:00;True|2024-12-18T10:07:54.1294714+08:00;True|2024-12-18T10:04:16.0967342+08:00;False|2024-12-18T10:04:04.1561560+08:00;True|2024-12-16T17:07:07.3386872+08:00;True|2024-12-16T16:34:59.1101964+08:00;True|2024-12-16T16:19:07.9287470+08:00;False|2024-12-16T16:18:46.4617432+08:00;True|2024-12-13T18:06:11.0778539+08:00;True|2024-12-13T16:53:52.2283177+08:00;True|2024-12-13T16:23:15.9531944+08:00;True|2024-12-13T13:58:03.7464045+08:00;True|2024-12-13T10:40:33.9285602+08:00;True|2024-12-13T10:38:03.8494063+08:00;False|2024-12-13T10:37:52.4251132+08:00;True|2024-12-13T10:31:07.4994631+08:00;False|2024-12-13T10:30:40.8021885+08:00;True|2024-12-12T10:01:42.4944750+08:00;False|2024-12-12T10:01:15.7147977+08:00;True|2024-12-11T17:21:58.0453583+08:00;True|2024-12-11T10:59:15.3836831+08:00;True|2024-12-11T09:49:19.4060272+08:00;False|2024-12-11T09:48:51.7603525+08:00;True|2024-12-11T08:58:41.4567855+08:00;False|2024-12-11T08:58:09.2160433+08:00;True|2024-12-10T17:25:49.3068154+08:00;True|2024-12-10T17:21:30.0155027+08:00;True|2024-12-10T17:16:56.7587487+08:00;False|2024-12-10T17:16:34.7816611+08:00;True|2024-12-10T16:55:40.3777585+08:00;False|2024-12-10T16:55:13.2621448+08:00;False|2024-12-09T13:59:27.6362265+08:00;True|2024-12-06T16:55:30.6422980+08:00;True|2024-12-06T15:08:49.5834939+08:00;True|2024-12-06T14:31:56.0968616+08:00;False|2024-12-06T14:31:44.2264009+08:00;True|2024-12-06T13:59:52.8150929+08:00;False|2024-12-06T13:48:22.6073939+08:00;True|2024-12-05T17:33:27.9247467+08:00;True|2024-12-05T17:30:23.1740838+08:00;False|2024-12-05T17:30:03.9977311+08:00;True|2024-12-04T15:18:41.4963816+08:00;True|2024-12-04T15:16:45.1121101+08:00;True|2024-12-04T15:14:33.5954776+08:00;True|2024-12-04T15:12:27.2913137+08:00;True|2024-12-04T14:10:19.6190673+08:00;False|2024-12-04T14:10:02.0319713+08:00;True|2024-12-03T16:08:46.6721098+08:00;True|2024-12-03T15:16:04.1754554+08:00;True|2024-12-03T15:13:25.4927626+08:00;True|2024-12-03T14:55:09.4413291+08:00;True|2024-12-03T14:43:11.8243897+08:00;True|2024-12-03T14:29:16.1511932+08:00;True|2024-12-03T14:24:07.9561838+08:00;False|2024-12-03T14:23:55.1293602+08:00;True|2024-12-02T16:31:22.0404862+08:00;False|2024-12-02T16:28:53.1721961+08:00;True|2024-12-02T15:41:24.9462025+08:00;True|2024-12-02T14:12:12.9356193+08:00;False|2024-12-02T14:11:35.7159488+08:00;True|2024-12-02T10:59:31.5582757+08:00;True|2024-11-29T12:08:55.4868083+08:00;False|2024-11-29T12:08:37.0353185+08:00;True|2024-11-28T10:47:27.2071355+08:00;False|2024-11-28T10:47:13.6670955+08:00;True|2024-11-27T15:21:57.6747082+08:00;False|2024-11-27T15:20:07.2403056+08:00;True|2024-11-27T15:13:36.1461091+08:00;True|2024-11-27T14:34:35.5908753+08:00;False|2024-11-27T14:33:30.7118923+08:00;True|2024-11-26T15:16:44.1854927+08:00;True|2024-11-26T15:14:33.4021067+08:00;False|2024-11-26T15:14:07.9955135+08:00;True|2024-11-26T14:48:35.6408418+08:00;True|2024-11-26T14:45:00.7251556+08:00;True|2024-11-26T14:04:58.4232988+08:00;False|2024-11-26T14:04:28.1286675+08:00;True|2024-11-25T13:45:07.6935933+08:00;True|2024-11-25T13:43:59.0788650+08:00;False|2024-11-25T13:43:44.2225194+08:00;True|2024-11-25T08:54:05.5144014+08:00;False|2024-11-25T08:53:49.2284063+08:00;False|2024-11-22T09:53:13.7879664+08:00;True|2024-11-21T13:48:31.7056264+08:00;True|2024-11-21T13:46:55.0891551+08:00;True|2024-11-21T13:44:05.5221110+08:00;True|2024-11-21T13:43:39.1385899+08:00;False|2024-11-21T13:43:19.9351488+08:00;True|2024-11-20T11:33:52.0324053+08:00;True|2024-11-20T11:20:58.4917889+08:00;True|2024-11-20T11:03:46.9552623+08:00;True|2024-11-20T10:45:10.9517109+08:00;False|2024-11-20T10:44:58.3221116+08:00;False|2024-11-19T15:39:27.3889104+08:00;True|2024-11-19T14:42:32.0854561+08:00;True|2024-11-19T14:19:19.6198070+08:00;True|2024-11-19T14:13:08.2003750+08:00;False|2024-11-19T14:12:15.5442850+08:00;True|2024-11-18T13:05:41.0455534+08:00;True|2024-11-18T11:05:30.2819404+08:00;True|2024-11-18T10:51:07.1852818+08:00;False|2024-11-18T10:50:21.5098527+08:00;True|2024-11-18T10:15:38.5429366+08:00;True|2024-11-18T10:00:51.0847524+08:00;True|2024-11-18T09:34:52.1772715+08:00;True|2024-11-18T09:27:23.6013754+08:00;False|2024-11-18T09:26:00.9323551+08:00;True|2024-11-15T11:20:51.7576376+08:00;True|2024-11-15T11:11:17.5580168+08:00;True|2024-11-15T11:03:58.4142996+08:00;True|2024-11-15T10:44:50.5207827+08:00;True|2024-11-15T10:10:05.5550418+08:00;True|2024-11-15T09:49:30.6631382+08:00;False|2024-11-15T09:47:05.3973379+08:00;True|2024-11-14T18:31:54.8247681+08:00;True|2024-11-14T17:14:56.3660185+08:00;True|2024-11-14T16:49:44.7526912+08:00;True|2024-11-14T16:49:09.3427608+08:00;True|2024-11-14T15:59:00.2572264+08:00;True|2024-11-14T11:21:03.5110818+08:00;True|2024-11-14T10:51:10.7864658+08:00;False|2024-11-14T10:50:55.5384248+08:00;True|2024-11-14T10:29:13.6760158+08:00;False|2024-11-14T10:28:09.8622863+08:00;True|2024-11-13T17:48:46.4827219+08:00;True|2024-11-13T17:45:13.0659280+08:00;True|2024-11-13T16:01:55.2278671+08:00;False|2024-11-13T16:01:03.0040446+08:00;True|2024-11-12T17:24:06.3763535+08:00;True|2024-11-12T17:21:51.8459552+08:00;True|2024-11-12T17:11:57.9239909+08:00;True|2024-11-12T17:09:04.4322824+08:00;True|2024-11-12T17:07:12.1839548+08:00;True|2024-11-12T17:04:27.4579152+08:00;True|2024-11-12T17:03:59.6843282+08:00;True|2024-11-12T16:40:44.0714862+08:00;True|2024-11-12T16:36:27.7792764+08:00;True|2024-11-12T16:32:36.5262040+08:00;False|2024-11-12T16:32:23.9550194+08:00;True|2024-11-12T10:58:16.1987697+08:00;False|2024-11-12T10:58:04.8469631+08:00;True|2024-11-11T13:40:53.2582255+08:00;True|2024-11-11T13:37:45.0401833+08:00;True|2024-11-11T12:35:13.2429166+08:00;True|2024-11-11T11:27:29.0530688+08:00;False|2024-11-11T11:27:12.2765506+08:00;True|2024-11-08T15:52:17.1278870+08:00;False|2024-11-08T15:52:04.4379380+08:00;True|2024-11-07T18:27:41.8163960+08:00;False|2024-11-07T18:27:30.6037983+08:00;True|2024-11-06T15:55:27.6450488+08:00;True|2024-11-06T15:54:13.5957004+08:00;True|2024-11-06T15:25:33.3862531+08:00;True|2024-11-06T13:33:57.8502278+08:00;False|2024-11-06T13:33:39.2337086+08:00;True|2024-11-06T11:33:12.6755239+08:00;True|2024-11-05T18:34:17.7048247+08:00;True|2024-11-05T18:30:08.5724471+08:00;True|2024-11-05T18:24:35.5372980+08:00;True|2024-11-05T18:06:29.7644779+08:00;True|2024-11-05T17:53:50.9554703+08:00;True|2024-11-05T17:50:05.6376900+08:00;True|2024-11-05T11:13:46.2906508+08:00;True|2024-11-05T10:35:55.5423834+08:00;False|2024-11-05T10:35:20.4104039+08:00;True|2024-11-01T10:22:05.7636122+08:00;False|2024-11-01T10:21:33.2954398+08:00;True|2024-10-31T20:03:37.9075888+08:00;True|2024-10-31T18:35:31.6618415+08:00;True|2024-10-31T18:34:56.2479021+08:00;True|2024-10-31T09:43:29.0841188+08:00;False|2024-10-31T09:43:04.8780818+08:00;True|2024-10-30T18:42:11.0523067+08:00;True|2024-10-30T18:07:05.5603627+08:00;True|2024-10-30T18:03:15.3516621+08:00;True|2024-10-30T17:58:14.3276504+08:00;False|2024-10-30T17:57:44.5353118+08:00;True|2024-10-30T17:47:41.2889491+08:00;True|2024-10-30T17:19:36.6172721+08:00;True|2024-10-30T17:10:00.4399703+08:00;False|2024-10-30T17:08:57.6500450+08:00;True|2024-10-29T16:58:15.6006676+08:00;True|2024-10-29T16:51:56.8406649+08:00;True|2024-10-29T16:05:48.4297695+08:00;True|2024-10-29T15:12:15.1522377+08:00;True|2024-10-29T15:10:51.8431754+08:00;True|2024-10-29T11:21:01.5660940+08:00;False|2024-10-29T11:20:33.3958980+08:00;True|2024-10-28T17:51:26.7156861+08:00;False|2024-10-28T17:50:41.4388196+08:00;True|2024-10-28T13:34:14.8764262+08:00;True|2024-10-28T12:44:27.2083620+08:00;False|2024-10-28T12:43:57.5942717+08:00;True|2024-10-25T11:49:47.9817458+08:00;True|2024-10-25T11:49:34.4754546+08:00;True|2024-10-25T09:59:35.6471379+08:00;True|2024-10-25T09:47:46.8035540+08:00;True|2024-10-25T09:25:57.7872618+08:00;False|2024-10-25T09:25:30.0950732+08:00;True|2024-10-24T20:39:06.1992535+08:00;False|2024-10-24T20:38:33.1009731+08:00;True|2024-10-24T11:17:46.9974483+08:00;False|2024-10-24T11:17:17.0925356+08:00;True|2024-10-23T19:16:25.5189930+08:00;True|2024-10-23T17:10:44.4267777+08:00;False|2024-10-23T17:10:10.2947971+08:00;True|2024-10-23T14:13:22.6901287+08:00;False|2024-10-23T14:12:24.3997100+08:00;True|2024-10-22T16:25:12.9514711+08:00;False|2024-10-22T16:24:42.9025167+08:00;True|2024-10-22T10:22:33.9932601+08:00;False|2024-10-22T10:22:05.3030308+08:00;True|2024-10-21T17:53:29.9552741+08:00;True|2024-10-21T16:37:31.4159544+08:00;True|2024-10-21T16:35:43.6207036+08:00;True|2024-10-21T16:00:05.5040651+08:00;False|2024-10-21T15:59:35.9279259+08:00;True|2024-10-21T12:06:42.5768961+08:00;False|2024-10-21T12:06:16.6344662+08:00;True|2024-10-18T10:44:02.6495536+08:00;True|2024-10-18T09:55:47.9769914+08:00;True|2024-10-18T09:47:46.6365831+08:00;True|2024-10-18T09:46:40.4036657+08:00;True|2024-10-18T09:44:25.4598960+08:00;True|2024-10-18T09:30:07.6972377+08:00;False|2024-10-18T09:28:18.9251743+08:00;True|2024-10-17T12:13:34.8639685+08:00;True|2024-10-17T12:02:26.5251711+08:00;False|2024-10-17T12:01:31.3822430+08:00;True|2024-10-17T11:49:09.2395208+08:00;False|2024-10-17T11:48:38.0189241+08:00;True|2024-10-16T19:35:29.2047484+08:00;False|2024-10-16T19:32:43.0637947+08:00;True|2024-10-16T11:27:13.1263407+08:00;False|2024-10-16T11:25:49.8688677+08:00;True|2024-10-15T18:26:50.9948482+08:00;False|2024-10-15T18:26:23.6998750+08:00;True|2024-08-26T14:17:37.8502046+08:00;False|2024-08-26T14:16:09.8501361+08:00;True|2024-08-22T11:12:48.4249984+08:00;</History>
    <History>False|2025-03-17T03:09:34.0681444Z;True|2025-03-17T10:50:21.9158331+08:00;True|2025-03-17T09:42:47.9252167+08:00;False|2025-03-17T09:31:53.1872136+08:00;True|2025-03-14T17:46:56.2806627+08:00;True|2025-03-14T16:26:15.6828252+08:00;True|2025-03-14T16:14:53.0710942+08:00;True|2025-03-14T16:08:09.5365263+08:00;True|2025-03-14T15:59:01.3358337+08:00;True|2025-03-14T14:22:42.7725023+08:00;True|2025-03-14T09:54:22.0848434+08:00;False|2025-03-14T09:51:59.6649411+08:00;True|2025-03-14T09:36:17.1134782+08:00;False|2025-03-14T09:31:58.5198805+08:00;True|2025-03-13T13:08:01.9024847+08:00;False|2025-03-13T13:03:35.7160929+08:00;True|2025-03-12T15:37:13.4111189+08:00;True|2025-03-12T15:23:55.5422176+08:00;True|2025-03-12T15:16:21.2123980+08:00;True|2025-03-12T14:49:24.9895017+08:00;True|2025-03-12T14:41:41.5663090+08:00;False|2025-03-12T14:39:27.3156286+08:00;True|2025-03-12T14:10:23.4204108+08:00;False|2025-03-12T14:08:08.4985635+08:00;True|2025-03-12T13:34:39.8492928+08:00;False|2025-03-12T13:31:34.8359622+08:00;True|2025-03-12T11:39:34.2976894+08:00;False|2025-03-12T09:22:45.9334513+08:00;True|2025-03-10T15:59:42.1283263+08:00;False|2025-03-10T15:53:57.2115226+08:00;True|2025-03-07T16:23:25.1589274+08:00;True|2025-03-07T16:18:46.0202723+08:00;True|2025-03-07T15:59:34.8313474+08:00;True|2025-03-07T15:37:59.1693363+08:00;True|2025-03-07T14:05:40.7253978+08:00;True|2025-03-07T11:21:14.9610137+08:00;False|2025-03-07T11:15:41.4171028+08:00;True|2025-03-07T10:23:24.0437379+08:00;True|2025-03-07T10:07:03.4231550+08:00;False|2025-03-07T10:04:32.6854924+08:00;True|2025-03-06T16:32:23.7096239+08:00;True|2025-03-06T15:45:46.0345284+08:00;True|2025-03-06T15:40:00.7026164+08:00;True|2025-03-06T15:20:20.3523488+08:00;True|2025-03-06T14:19:37.2403331+08:00;True|2025-03-06T13:49:03.6420821+08:00;False|2025-03-06T13:46:35.7037619+08:00;True|2025-03-06T11:03:29.5882789+08:00;True|2025-03-06T09:59:53.3080173+08:00;True|2025-03-06T09:43:48.4337079+08:00;False|2025-03-06T09:35:05.3462434+08:00;True|2025-03-05T18:25:35.2595591+08:00;True|2025-03-05T18:03:37.5687895+08:00;True|2025-03-05T17:48:08.3418269+08:00;False|2025-03-05T17:44:40.0721881+08:00;True|2025-03-05T17:23:30.5871011+08:00;True|2025-03-05T16:31:12.2285816+08:00;True|2025-03-05T16:00:25.5496303+08:00;True|2025-03-05T15:11:30.9434230+08:00;True|2025-03-05T14:22:08.4650724+08:00;True|2025-03-05T13:29:42.9306833+08:00;True|2025-03-05T11:28:17.5541196+08:00;True|2025-03-05T11:10:22.3318023+08:00;True|2025-03-05T10:55:33.6796527+08:00;True|2025-03-05T10:08:26.7761472+08:00;True|2025-03-05T10:02:32.8701262+08:00;False|2025-03-05T09:59:55.0044057+08:00;True|2025-03-04T17:48:24.6869079+08:00;True|2025-03-04T17:42:05.0276293+08:00;False|2025-03-04T17:39:53.6208557+08:00;False|2025-03-04T17:39:30.0759309+08:00;False|2025-03-04T17:05:37.2163588+08:00;True|2025-03-04T16:51:15.6884461+08:00;True|2025-03-04T16:49:03.3836181+08:00;True|2025-03-04T16:31:36.5847402+08:00;True|2025-03-04T15:52:09.1977151+08:00;True|2025-03-04T15:24:25.0194954+08:00;True|2025-03-04T15:12:44.1606138+08:00;False|2025-03-04T15:10:47.3915404+08:00;True|2025-03-04T14:31:42.7483906+08:00;True|2025-03-04T11:28:36.6001869+08:00;False|2025-02-27T19:55:43.0462466+08:00;True|2025-02-24T16:03:00.5507258+08:00;False|2025-02-24T16:00:00.9104160+08:00;True|2025-02-19T16:55:31.8966125+08:00;True|2025-02-19T14:51:19.5866770+08:00;False|2025-02-19T14:49:16.2857645+08:00;True|2025-02-19T14:11:03.8109482+08:00;False|2025-02-19T14:08:17.7243950+08:00;True|2025-02-19T11:16:48.1875981+08:00;False|2025-02-19T11:14:24.0571589+08:00;True|2025-02-19T10:17:34.3257301+08:00;False|2025-02-19T10:14:49.0730325+08:00;True|2025-02-18T09:38:54.9616937+08:00;True|2025-02-18T09:16:03.1196071+08:00;False|2025-02-18T09:13:52.5022130+08:00;True|2025-02-17T17:28:38.1103164+08:00;True|2025-02-17T17:06:19.1494960+08:00;True|2025-02-17T16:58:21.8893871+08:00;False|2025-02-17T16:56:34.0012780+08:00;True|2025-02-17T15:56:45.9560949+08:00;False|2025-02-17T15:29:32.9323141+08:00;False|2025-02-17T15:27:54.6615301+08:00;False|2025-02-17T15:25:42.7179137+08:00;True|2025-02-12T10:48:39.4029671+08:00;True|2025-02-12T10:45:09.8138793+08:00;False|2025-02-12T10:43:37.5751112+08:00;False|2025-02-12T10:43:24.8201898+08:00;False|2025-02-12T10:42:58.2736984+08:00;False|2025-02-12T10:42:46.1482594+08:00;False|2025-02-12T10:42:01.5427330+08:00;False|2025-02-12T10:41:48.3761346+08:00;False|2025-02-12T10:41:29.3367142+08:00;True|2025-02-11T15:41:34.0746843+08:00;True|2025-02-11T15:39:37.3374891+08:00;False|2025-02-11T15:39:27.0449176+08:00;False|2025-02-11T15:08:35.2970100+08:00;True|2025-02-11T14:59:59.6539416+08:00;True|2025-02-11T14:56:20.5954601+08:00;False|2025-02-11T14:55:35.6700921+08:00;True|2025-02-10T09:39:38.7399451+08:00;False|2025-02-10T09:39:10.1358642+08:00;True|2025-02-08T16:00:23.1136903+08:00;False|2025-02-08T15:59:50.0414065+08:00;True|2025-01-17T10:17:41.6850215+08:00;False|2025-01-17T10:16:20.3202054+08:00;True|2025-01-17T09:00:26.6966310+08:00;False|2025-01-17T08:59:59.9527727+08:00;True|2025-01-16T11:06:57.1014257+08:00;True|2025-01-16T10:27:57.2742426+08:00;False|2025-01-16T10:27:27.5197746+08:00;True|2025-01-15T11:05:17.5523582+08:00;True|2025-01-15T09:37:34.6118980+08:00;False|2025-01-15T09:36:27.7987949+08:00;True|2025-01-14T12:52:06.2234405+08:00;True|2025-01-14T12:50:08.8487446+08:00;False|2025-01-14T12:49:45.2743330+08:00;True|2025-01-14T10:31:18.6477403+08:00;False|2025-01-14T10:29:30.1534049+08:00;True|2025-01-13T15:27:00.4497527+08:00;True|2025-01-13T15:01:33.6142160+08:00;True|2025-01-13T10:29:49.4772980+08:00;True|2025-01-13T10:11:15.7993265+08:00;True|2025-01-13T10:08:58.9378828+08:00;False|2025-01-13T10:08:44.9869073+08:00;True|2025-01-13T10:02:17.5175561+08:00;False|2025-01-13T10:02:00.9991870+08:00;True|2025-01-08T17:50:21.7468469+08:00;True|2025-01-08T16:38:48.8592252+08:00;True|2025-01-08T10:44:42.9161086+08:00;False|2025-01-08T10:44:09.4840640+08:00;True|2025-01-08T10:34:31.5982265+08:00;False|2025-01-08T10:33:57.3576390+08:00;True|2025-01-03T17:19:09.1765100+08:00;True|2025-01-03T17:10:41.8794009+08:00;True|2025-01-03T17:10:11.4245485+08:00;True|2025-01-03T15:54:22.3387906+08:00;True|2025-01-03T15:41:44.9897120+08:00;False|2025-01-03T15:40:42.1357112+08:00;False|2025-01-03T15:39:09.0564197+08:00;True|2025-01-03T14:58:31.5701467+08:00;True|2025-01-03T14:29:13.4456304+08:00;False|2025-01-03T14:27:18.9925263+08:00;True|2025-01-02T16:08:24.1819376+08:00;True|2025-01-02T16:07:01.1636705+08:00;True|2025-01-02T16:03:02.6520904+08:00;True|2025-01-02T10:03:56.0551738+08:00;False|2025-01-02T10:03:34.8632732+08:00;True|2024-12-31T15:27:01.3180960+08:00;True|2024-12-31T11:17:12.2977529+08:00;True|2024-12-31T10:48:14.7205535+08:00;True|2024-12-31T10:18:45.6669875+08:00;False|2024-12-31T10:18:21.6706557+08:00;True|2024-12-30T09:32:44.3898729+08:00;True|2024-12-30T09:31:24.5771941+08:00;False|2024-12-30T09:30:52.4031391+08:00;True|2024-12-27T16:12:20.2836752+08:00;False|2024-12-27T16:11:04.6614343+08:00;True|2024-12-27T15:07:23.0750147+08:00;True|2024-12-27T15:04:52.7876532+08:00;True|2024-12-27T14:37:54.3154829+08:00;False|2024-12-27T14:37:26.9546174+08:00;True|2024-12-26T16:33:56.0452167+08:00;True|2024-12-26T16:29:21.4115458+08:00;True|2024-12-26T16:29:02.0242815+08:00;True|2024-12-26T15:17:24.7390981+08:00;False|2024-12-26T15:13:26.8863189+08:00;True|2024-12-26T15:06:35.4541902+08:00;True|2024-12-26T11:35:42.2760106+08:00;False|2024-12-26T11:35:08.9255789+08:00;True|2024-12-26T10:10:29.7487991+08:00;True|2024-12-26T09:27:40.2637311+08:00;False|2024-12-26T09:25:52.1339136+08:00;True|2024-12-24T15:11:48.9968778+08:00;True|2024-12-24T15:06:55.0283993+08:00;True|2024-12-24T14:36:29.6466740+08:00;True|2024-12-24T10:28:42.7489880+08:00;False|2024-12-24T10:28:08.6809715+08:00;True|2024-12-24T10:06:05.9449103+08:00;False|2024-12-24T10:05:32.8409161+08:00;True|2024-12-23T14:56:40.3416256+08:00;True|2024-12-23T14:50:50.2677378+08:00;True|2024-12-23T14:48:27.8169391+08:00;True|2024-12-23T14:45:25.5341474+08:00;True|2024-12-23T14:42:23.7825087+08:00;True|2024-12-23T14:35:53.8876449+08:00;True|2024-12-23T14:14:00.4257926+08:00;True|2024-12-23T11:10:54.5874876+08:00;True|2024-12-23T11:08:44.0250304+08:00;False|2024-12-23T11:08:18.5757850+08:00;True|2024-12-20T12:51:29.2354841+08:00;True|2024-12-20T12:46:13.7636932+08:00;False|2024-12-20T12:44:21.1473486+08:00;False|2024-12-20T12:44:06.5427106+08:00;True|2024-12-20T12:29:33.9971940+08:00;False|2024-12-20T12:29:01.0285205+08:00;True|2024-12-19T15:49:19.9906264+08:00;True|2024-12-19T14:55:54.3323405+08:00;True|2024-12-19T14:17:50.5086161+08:00;True|2024-12-19T14:08:16.0919011+08:00;True|2024-12-19T14:02:50.3092759+08:00;True|2024-12-19T13:54:41.2332165+08:00;False|2024-12-19T13:54:07.6973483+08:00;True|2024-12-19T09:34:54.5332110+08:00;True|2024-12-19T08:49:05.5690428+08:00;False|2024-12-19T08:48:51.0618113+08:00;True|2024-12-18T15:45:34.7174246+08:00;False|2024-12-18T15:45:10.3226822+08:00;True|2024-12-18T15:32:03.5983267+08:00;True|2024-12-18T15:31:20.1219502+08:00;True|2024-12-18T11:57:09.1595607+08:00;True|2024-12-18T11:13:37.4765697+08:00;True|2024-12-18T10:07:54.1294714+08:00;True|2024-12-18T10:04:16.0967342+08:00;False|2024-12-18T10:04:04.1561560+08:00;True|2024-12-16T17:07:07.3386872+08:00;True|2024-12-16T16:34:59.1101964+08:00;True|2024-12-16T16:19:07.9287470+08:00;False|2024-12-16T16:18:46.4617432+08:00;True|2024-12-13T18:06:11.0778539+08:00;True|2024-12-13T16:53:52.2283177+08:00;True|2024-12-13T16:23:15.9531944+08:00;True|2024-12-13T13:58:03.7464045+08:00;True|2024-12-13T10:40:33.9285602+08:00;True|2024-12-13T10:38:03.8494063+08:00;False|2024-12-13T10:37:52.4251132+08:00;True|2024-12-13T10:31:07.4994631+08:00;False|2024-12-13T10:30:40.8021885+08:00;True|2024-12-12T10:01:42.4944750+08:00;False|2024-12-12T10:01:15.7147977+08:00;True|2024-12-11T17:21:58.0453583+08:00;True|2024-12-11T10:59:15.3836831+08:00;True|2024-12-11T09:49:19.4060272+08:00;False|2024-12-11T09:48:51.7603525+08:00;True|2024-12-11T08:58:41.4567855+08:00;False|2024-12-11T08:58:09.2160433+08:00;True|2024-12-10T17:25:49.3068154+08:00;True|2024-12-10T17:21:30.0155027+08:00;True|2024-12-10T17:16:56.7587487+08:00;False|2024-12-10T17:16:34.7816611+08:00;True|2024-12-10T16:55:40.3777585+08:00;False|2024-12-10T16:55:13.2621448+08:00;False|2024-12-09T13:59:27.6362265+08:00;True|2024-12-06T16:55:30.6422980+08:00;True|2024-12-06T15:08:49.5834939+08:00;True|2024-12-06T14:31:56.0968616+08:00;False|2024-12-06T14:31:44.2264009+08:00;True|2024-12-06T13:59:52.8150929+08:00;False|2024-12-06T13:48:22.6073939+08:00;True|2024-12-05T17:33:27.9247467+08:00;True|2024-12-05T17:30:23.1740838+08:00;False|2024-12-05T17:30:03.9977311+08:00;True|2024-12-04T15:18:41.4963816+08:00;True|2024-12-04T15:16:45.1121101+08:00;True|2024-12-04T15:14:33.5954776+08:00;True|2024-12-04T15:12:27.2913137+08:00;True|2024-12-04T14:10:19.6190673+08:00;False|2024-12-04T14:10:02.0319713+08:00;True|2024-12-03T16:08:46.6721098+08:00;True|2024-12-03T15:16:04.1754554+08:00;True|2024-12-03T15:13:25.4927626+08:00;True|2024-12-03T14:55:09.4413291+08:00;True|2024-12-03T14:43:11.8243897+08:00;True|2024-12-03T14:29:16.1511932+08:00;True|2024-12-03T14:24:07.9561838+08:00;False|2024-12-03T14:23:55.1293602+08:00;True|2024-12-02T16:31:22.0404862+08:00;False|2024-12-02T16:28:53.1721961+08:00;True|2024-12-02T15:41:24.9462025+08:00;True|2024-12-02T14:12:12.9356193+08:00;False|2024-12-02T14:11:35.7159488+08:00;True|2024-12-02T10:59:31.5582757+08:00;True|2024-11-29T12:08:55.4868083+08:00;False|2024-11-29T12:08:37.0353185+08:00;True|2024-11-28T10:47:27.2071355+08:00;False|2024-11-28T10:47:13.6670955+08:00;True|2024-11-27T15:21:57.6747082+08:00;False|2024-11-27T15:20:07.2403056+08:00;True|2024-11-27T15:13:36.1461091+08:00;True|2024-11-27T14:34:35.5908753+08:00;False|2024-11-27T14:33:30.7118923+08:00;True|2024-11-26T15:16:44.1854927+08:00;True|2024-11-26T15:14:33.4021067+08:00;False|2024-11-26T15:14:07.9955135+08:00;True|2024-11-26T14:48:35.6408418+08:00;True|2024-11-26T14:45:00.7251556+08:00;True|2024-11-26T14:04:58.4232988+08:00;False|2024-11-26T14:04:28.1286675+08:00;True|2024-11-25T13:45:07.6935933+08:00;True|2024-11-25T13:43:59.0788650+08:00;False|2024-11-25T13:43:44.2225194+08:00;True|2024-11-25T08:54:05.5144014+08:00;False|2024-11-25T08:53:49.2284063+08:00;False|2024-11-22T09:53:13.7879664+08:00;True|2024-11-21T13:48:31.7056264+08:00;True|2024-11-21T13:46:55.0891551+08:00;True|2024-11-21T13:44:05.5221110+08:00;True|2024-11-21T13:43:39.1385899+08:00;False|2024-11-21T13:43:19.9351488+08:00;True|2024-11-20T11:33:52.0324053+08:00;True|2024-11-20T11:20:58.4917889+08:00;True|2024-11-20T11:03:46.9552623+08:00;True|2024-11-20T10:45:10.9517109+08:00;False|2024-11-20T10:44:58.3221116+08:00;False|2024-11-19T15:39:27.3889104+08:00;True|2024-11-19T14:42:32.0854561+08:00;True|2024-11-19T14:19:19.6198070+08:00;True|2024-11-19T14:13:08.2003750+08:00;False|2024-11-19T14:12:15.5442850+08:00;True|2024-11-18T13:05:41.0455534+08:00;True|2024-11-18T11:05:30.2819404+08:00;True|2024-11-18T10:51:07.1852818+08:00;False|2024-11-18T10:50:21.5098527+08:00;True|2024-11-18T10:15:38.5429366+08:00;True|2024-11-18T10:00:51.0847524+08:00;True|2024-11-18T09:34:52.1772715+08:00;True|2024-11-18T09:27:23.6013754+08:00;False|2024-11-18T09:26:00.9323551+08:00;True|2024-11-15T11:20:51.7576376+08:00;True|2024-11-15T11:11:17.5580168+08:00;True|2024-11-15T11:03:58.4142996+08:00;True|2024-11-15T10:44:50.5207827+08:00;True|2024-11-15T10:10:05.5550418+08:00;True|2024-11-15T09:49:30.6631382+08:00;False|2024-11-15T09:47:05.3973379+08:00;True|2024-11-14T18:31:54.8247681+08:00;True|2024-11-14T17:14:56.3660185+08:00;True|2024-11-14T16:49:44.7526912+08:00;True|2024-11-14T16:49:09.3427608+08:00;True|2024-11-14T15:59:00.2572264+08:00;True|2024-11-14T11:21:03.5110818+08:00;True|2024-11-14T10:51:10.7864658+08:00;False|2024-11-14T10:50:55.5384248+08:00;True|2024-11-14T10:29:13.6760158+08:00;False|2024-11-14T10:28:09.8622863+08:00;True|2024-11-13T17:48:46.4827219+08:00;True|2024-11-13T17:45:13.0659280+08:00;True|2024-11-13T16:01:55.2278671+08:00;False|2024-11-13T16:01:03.0040446+08:00;True|2024-11-12T17:24:06.3763535+08:00;True|2024-11-12T17:21:51.8459552+08:00;True|2024-11-12T17:11:57.9239909+08:00;True|2024-11-12T17:09:04.4322824+08:00;True|2024-11-12T17:07:12.1839548+08:00;True|2024-11-12T17:04:27.4579152+08:00;True|2024-11-12T17:03:59.6843282+08:00;True|2024-11-12T16:40:44.0714862+08:00;True|2024-11-12T16:36:27.7792764+08:00;True|2024-11-12T16:32:36.5262040+08:00;False|2024-11-12T16:32:23.9550194+08:00;True|2024-11-12T10:58:16.1987697+08:00;False|2024-11-12T10:58:04.8469631+08:00;True|2024-11-11T13:40:53.2582255+08:00;True|2024-11-11T13:37:45.0401833+08:00;True|2024-11-11T12:35:13.2429166+08:00;True|2024-11-11T11:27:29.0530688+08:00;False|2024-11-11T11:27:12.2765506+08:00;True|2024-11-08T15:52:17.1278870+08:00;False|2024-11-08T15:52:04.4379380+08:00;True|2024-11-07T18:27:41.8163960+08:00;False|2024-11-07T18:27:30.6037983+08:00;True|2024-11-06T15:55:27.6450488+08:00;True|2024-11-06T15:54:13.5957004+08:00;True|2024-11-06T15:25:33.3862531+08:00;True|2024-11-06T13:33:57.8502278+08:00;False|2024-11-06T13:33:39.2337086+08:00;True|2024-11-06T11:33:12.6755239+08:00;True|2024-11-05T18:34:17.7048247+08:00;True|2024-11-05T18:30:08.5724471+08:00;True|2024-11-05T18:24:35.5372980+08:00;True|2024-11-05T18:06:29.7644779+08:00;True|2024-11-05T17:53:50.9554703+08:00;True|2024-11-05T17:50:05.6376900+08:00;True|2024-11-05T11:13:46.2906508+08:00;True|2024-11-05T10:35:55.5423834+08:00;False|2024-11-05T10:35:20.4104039+08:00;True|2024-11-01T10:22:05.7636122+08:00;False|2024-11-01T10:21:33.2954398+08:00;True|2024-10-31T20:03:37.9075888+08:00;True|2024-10-31T18:35:31.6618415+08:00;True|2024-10-31T18:34:56.2479021+08:00;True|2024-10-31T09:43:29.0841188+08:00;False|2024-10-31T09:43:04.8780818+08:00;True|2024-10-30T18:42:11.0523067+08:00;True|2024-10-30T18:07:05.5603627+08:00;True|2024-10-30T18:03:15.3516621+08:00;True|2024-10-30T17:58:14.3276504+08:00;False|2024-10-30T17:57:44.5353118+08:00;True|2024-10-30T17:47:41.2889491+08:00;True|2024-10-30T17:19:36.6172721+08:00;True|2024-10-30T17:10:00.4399703+08:00;False|2024-10-30T17:08:57.6500450+08:00;True|2024-10-29T16:58:15.6006676+08:00;True|2024-10-29T16:51:56.8406649+08:00;True|2024-10-29T16:05:48.4297695+08:00;True|2024-10-29T15:12:15.1522377+08:00;True|2024-10-29T15:10:51.8431754+08:00;True|2024-10-29T11:21:01.5660940+08:00;False|2024-10-29T11:20:33.3958980+08:00;True|2024-10-28T17:51:26.7156861+08:00;False|2024-10-28T17:50:41.4388196+08:00;True|2024-10-28T13:34:14.8764262+08:00;True|2024-10-28T12:44:27.2083620+08:00;False|2024-10-28T12:43:57.5942717+08:00;True|2024-10-25T11:49:47.9817458+08:00;True|2024-10-25T11:49:34.4754546+08:00;True|2024-10-25T09:59:35.6471379+08:00;True|2024-10-25T09:47:46.8035540+08:00;True|2024-10-25T09:25:57.7872618+08:00;False|2024-10-25T09:25:30.0950732+08:00;True|2024-10-24T20:39:06.1992535+08:00;False|2024-10-24T20:38:33.1009731+08:00;True|2024-10-24T11:17:46.9974483+08:00;False|2024-10-24T11:17:17.0925356+08:00;True|2024-10-23T19:16:25.5189930+08:00;True|2024-10-23T17:10:44.4267777+08:00;False|2024-10-23T17:10:10.2947971+08:00;True|2024-10-23T14:13:22.6901287+08:00;False|2024-10-23T14:12:24.3997100+08:00;True|2024-10-22T16:25:12.9514711+08:00;False|2024-10-22T16:24:42.9025167+08:00;True|2024-10-22T10:22:33.9932601+08:00;False|2024-10-22T10:22:05.3030308+08:00;True|2024-10-21T17:53:29.9552741+08:00;True|2024-10-21T16:37:31.4159544+08:00;True|2024-10-21T16:35:43.6207036+08:00;True|2024-10-21T16:00:05.5040651+08:00;False|2024-10-21T15:59:35.9279259+08:00;True|2024-10-21T12:06:42.5768961+08:00;False|2024-10-21T12:06:16.6344662+08:00;True|2024-10-18T10:44:02.6495536+08:00;True|2024-10-18T09:55:47.9769914+08:00;True|2024-10-18T09:47:46.6365831+08:00;True|2024-10-18T09:46:40.4036657+08:00;True|2024-10-18T09:44:25.4598960+08:00;True|2024-10-18T09:30:07.6972377+08:00;False|2024-10-18T09:28:18.9251743+08:00;True|2024-10-17T12:13:34.8639685+08:00;True|2024-10-17T12:02:26.5251711+08:00;False|2024-10-17T12:01:31.3822430+08:00;True|2024-10-17T11:49:09.2395208+08:00;False|2024-10-17T11:48:38.0189241+08:00;True|2024-10-16T19:35:29.2047484+08:00;False|2024-10-16T19:32:43.0637947+08:00;True|2024-10-16T11:27:13.1263407+08:00;False|2024-10-16T11:25:49.8688677+08:00;True|2024-10-15T18:26:50.9948482+08:00;False|2024-10-15T18:26:23.6998750+08:00;True|2024-08-26T14:17:37.8502046+08:00;False|2024-08-26T14:16:09.8501361+08:00;True|2024-08-22T11:12:48.4249984+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>03/07/2025 16:17:17</publishTime>
      <publishTime>03/17/2025 11:10:11</publishTime>
    </File>
    <File Include="bin/BLL.pdb">
      <publishTime>03/07/2025 16:17:17</publishTime>
      <publishTime>03/17/2025 11:10:11</publishTime>
    </File>
    <File Include="bin/BouncyCastle.Crypto.dll">
      <publishTime>12/18/2020 05:32:28</publishTime>
    </File>
    <File Include="bin/DAL.dll">
      <publishTime>03/07/2025 16:17:07</publishTime>
      <publishTime>03/17/2025 11:10:01</publishTime>
    </File>
    <File Include="bin/DAL.pdb">
      <publishTime>03/07/2025 16:17:07</publishTime>
      <publishTime>03/17/2025 11:10:01</publishTime>
    </File>
    <File Include="bin/Dapper.dll">
      <publishTime>07/22/2016 22:52:40</publishTime>
    </File>
    <File Include="bin/DBUtility.dll">
      <publishTime>03/05/2025 10:00:22</publishTime>
      <publishTime>03/17/2025 11:09:55</publishTime>
    </File>
    <File Include="bin/DBUtility.pdb">
      <publishTime>03/05/2025 10:00:22</publishTime>
      <publishTime>03/17/2025 11:09:55</publishTime>
    </File>
    <File Include="bin/Grpc.Core.Api.dll">
      <publishTime>03/22/2022 13:17:26</publishTime>
@@ -111,10 +111,10 @@
      <publishTime>07/25/2012 19:48:56</publishTime>
    </File>
    <File Include="bin/Model.dll">
      <publishTime>03/07/2025 15:57:30</publishTime>
      <publishTime>03/17/2025 11:09:58</publishTime>
    </File>
    <File Include="bin/Model.pdb">
      <publishTime>03/07/2025 15:57:30</publishTime>
      <publishTime>03/17/2025 11:09:58</publishTime>
    </File>
    <File Include="bin/Models/ClsSc_MouldScrapOutBillMain.cs">
      <publishTime>02/12/2025 09:59:05</publishTime>
@@ -147,34 +147,34 @@
      <publishTime>10/23/2021 17:07:54</publishTime>
    </File>
    <File Include="bin/Pub_Class.dll">
      <publishTime>02/28/2025 09:27:42</publishTime>
      <publishTime>03/17/2025 11:09:47</publishTime>
    </File>
    <File Include="bin/Pub_Class.pdb">
      <publishTime>02/28/2025 09:27:42</publishTime>
      <publishTime>03/17/2025 11:09:47</publishTime>
    </File>
    <File Include="bin/Pub_Control.dll">
      <publishTime>02/28/2025 09:27:46</publishTime>
      <publishTime>03/17/2025 11:09:51</publishTime>
    </File>
    <File Include="bin/Pub_Control.pdb">
      <publishTime>02/28/2025 09:27:46</publishTime>
      <publishTime>03/17/2025 11:09:51</publishTime>
    </File>
    <File Include="bin/RestSharp.dll">
      <publishTime>08/31/2012 06:22:50</publishTime>
    </File>
    <File Include="bin/SQLHelper.dll">
      <publishTime>02/28/2025 09:27:47</publishTime>
      <publishTime>03/17/2025 11:09:51</publishTime>
    </File>
    <File Include="bin/SQLHelper.pdb">
      <publishTime>02/28/2025 09:27:47</publishTime>
      <publishTime>03/17/2025 11:09:51</publishTime>
    </File>
    <File Include="bin/Swashbuckle.Core.dll">
      <publishTime>02/16/2015 01:57:08</publishTime>
    </File>
    <File Include="bin/SyntacticSugar.dll">
      <publishTime>02/28/2025 09:16:42</publishTime>
      <publishTime>03/17/2025 11:08:22</publishTime>
    </File>
    <File Include="bin/SyntacticSugar.pdb">
      <publishTime>02/28/2025 09:16:42</publishTime>
      <publishTime>03/17/2025 11:08:22</publishTime>
    </File>
    <File Include="bin/System.Buffers.dll">
      <publishTime>07/19/2017 18:01:28</publishTime>
@@ -285,19 +285,19 @@
      <publishTime>05/09/2023 10:43:40</publishTime>
    </File>
    <File Include="bin/TopSdk.dll">
      <publishTime>03/07/2025 16:15:23</publishTime>
      <publishTime>03/17/2025 11:08:24</publishTime>
    </File>
    <File Include="bin/TopSdk.pdb">
      <publishTime>03/07/2025 16:15:23</publishTime>
      <publishTime>03/17/2025 11:08:24</publishTime>
    </File>
    <File Include="bin/WebActivatorEx.dll">
      <publishTime>11/24/2014 19:18:48</publishTime>
    </File>
    <File Include="bin/WebAPI.dll">
      <publishTime>03/07/2025 16:21:47</publishTime>
      <publishTime>03/17/2025 11:16:16</publishTime>
    </File>
    <File Include="bin/WebAPI.pdb">
      <publishTime>03/07/2025 16:21:47</publishTime>
      <publishTime>03/17/2025 11:16:16</publishTime>
    </File>
    <File Include="bin/WebGrease.dll">
      <publishTime>07/18/2013 01:03:52</publishTime>
WebAPI/WebAPI.csproj
@@ -442,6 +442,8 @@
    <Compile Include="Controllers\CJGL\Sc_OEEReportController.cs" />
    <Compile Include="Controllers\CKGL\TMZD\Gy_BarCodeBillListController.cs" />
    <Compile Include="Controllers\JHGL\Gy_SourceMouldBillController.cs" />
    <Compile Include="Controllers\XSGL\Crm_ComplainVisitBillController.cs" />
    <Compile Include="Controllers\XSGL\Xs_SeQuotationBillController.cs" />
    <Compile Include="Controllers\Xt_DefineBillMainSetController.cs" />
    <Compile Include="Controllers\MJGL\Sc_MouldBatchWorkCheckBillController.cs" />
    <Compile Include="Controllers\SBGL\SBBB\Sb_EquipMentCollectionTechParamController.cs" />
WebAPI/WebAPI.csproj.user
@@ -6,7 +6,7 @@
    <LastActiveSolutionConfig>Debug|Any CPU</LastActiveSolutionConfig>
    <NameOfLastUsedPublishProfile>C:\Users\86130\Desktop\智云迈思\MES-WEB-API\WebAPI\Properties\PublishProfiles\FolderProfilewtt.pubxml</NameOfLastUsedPublishProfile>
    <NameOfLastUsedPublishProfile>C:\Users\86130\Desktop\智云迈思\MES-WEB-API\WebAPI\Properties\PublishProfiles\FolderProfilewtt.pubxml</NameOfLastUsedPublishProfile>
    <NameOfLastUsedPublishProfile>D:\工作代码\智云迈思\MES\MES-WEB-API\WebAPI\Properties\PublishProfiles\JFAPI.pubxml</NameOfLastUsedPublishProfile>
    <NameOfLastUsedPublishProfile>C:\Users\86130\Desktop\智云迈思\MES-WEB-API\WebAPI\Properties\PublishProfiles\FolderProfilewtt.pubxml</NameOfLastUsedPublishProfile>
    <UseIISExpress>true</UseIISExpress>
    <Use64BitIISExpress />
    <IISExpressSSLPort />
sdk_dingding/TopSdk/bin/Debug/TopSdk.dll
Binary files differ
sdk_dingding/TopSdk/bin/Debug/TopSdk.pdb
Binary files differ
sdk_dingding/TopSdk/obj/Debug/TopSdk.csproj.FileListAbsolute.txt
@@ -4,3 +4,9 @@
C:\Users\86130\Desktop\智云迈思\MES-WEB-API\sdk_dingding\TopSdk\obj\Debug\TopSdk.csproj.CoreCompileInputs.cache
C:\Users\86130\Desktop\智云迈思\MES-WEB-API\sdk_dingding\TopSdk\obj\Debug\TopSdk.dll
C:\Users\86130\Desktop\智云迈思\MES-WEB-API\sdk_dingding\TopSdk\obj\Debug\TopSdk.pdb
D:\工作代码\智云迈思\MES\MES-WEB-API\sdk_dingding\TopSdk\bin\Debug\TopSdk.dll
D:\工作代码\智云迈思\MES\MES-WEB-API\sdk_dingding\TopSdk\bin\Debug\TopSdk.pdb
D:\工作代码\智云迈思\MES\MES-WEB-API\sdk_dingding\TopSdk\obj\Debug\TopSdk.csproj.AssemblyReference.cache
D:\工作代码\智云迈思\MES\MES-WEB-API\sdk_dingding\TopSdk\obj\Debug\TopSdk.csproj.CoreCompileInputs.cache
D:\工作代码\智云迈思\MES\MES-WEB-API\sdk_dingding\TopSdk\obj\Debug\TopSdk.dll
D:\工作代码\智云迈思\MES\MES-WEB-API\sdk_dingding\TopSdk\obj\Debug\TopSdk.pdb
sdk_dingding/TopSdk/obj/Debug/TopSdk.dll
Binary files differ
sdk_dingding/TopSdk/obj/Debug/TopSdk.pdb
Binary files differ