yusijie
2024-09-20 8bcbae47470ecf219e5f87e46c5fba7c8ea4678c
Merge branch 'master' of http://101.37.171.70:10101/r/MES-WEB-API
1个文件已删除
167个文件已修改
3个文件已添加
4272 ■■■■■ 已修改文件
DAL/生产管理/模具管理/ClsSc_MouldMaintainRuleBill.cs 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
DAL/车间管理/ClsGy_WorkBeginDotCheckListBillMain.cs 8 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
DAL/车间管理/ClsSc_WorkBeginDotCheckBillMain.cs 34 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
LMES/DingDing_autoGetData.cs 11 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
LMES/LMES.csproj 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
LMES/Program.cs 72 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
LMES/bin/Debug.rar 补丁 | 查看 | 原始文档 | blame | 历史
Model/生产管理/模具管理/ClsSc_MouldMaintainRuleBillMain.cs 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Model/车间管理/ClsGy_WorkBeginDotCheckListBillSub.cs 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Model/车间管理/ClsSc_WorkBeginDotCheckBillSub.cs 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
PayM/bin/Debug/AxInterop.gregn6Lib.dll 补丁 | 查看 | 原始文档 | blame | 历史
PayM/bin/Debug/BLL.dll 补丁 | 查看 | 原始文档 | blame | 历史
PayM/bin/Debug/BLL.pdb 补丁 | 查看 | 原始文档 | blame | 历史
PayM/bin/Debug/DAL.dll 补丁 | 查看 | 原始文档 | blame | 历史
PayM/bin/Debug/DAL.pdb 补丁 | 查看 | 原始文档 | blame | 历史
PayM/bin/Debug/DBUtility.dll 补丁 | 查看 | 原始文档 | blame | 历史
PayM/bin/Debug/DBUtility.pdb 补丁 | 查看 | 原始文档 | blame | 历史
PayM/bin/Debug/Interop.gregn6Lib.dll 补丁 | 查看 | 原始文档 | blame | 历史
PayM/bin/Debug/Model.dll 补丁 | 查看 | 原始文档 | blame | 历史
PayM/bin/Debug/Model.pdb 补丁 | 查看 | 原始文档 | blame | 历史
PayM/bin/Debug/PayM.dll 补丁 | 查看 | 原始文档 | blame | 历史
PayM/bin/Debug/PayM.pdb 补丁 | 查看 | 原始文档 | blame | 历史
PayM/bin/Debug/Pub_Class.dll 补丁 | 查看 | 原始文档 | blame | 历史
PayM/bin/Debug/Pub_Class.pdb 补丁 | 查看 | 原始文档 | blame | 历史
PayM/bin/Debug/Pub_Control.dll 补丁 | 查看 | 原始文档 | blame | 历史
PayM/bin/Debug/Pub_Control.pdb 补丁 | 查看 | 原始文档 | blame | 历史
PayM/bin/Debug/SQLHelper.dll 补丁 | 查看 | 原始文档 | blame | 历史
PayM/bin/Debug/SQLHelper.pdb 补丁 | 查看 | 原始文档 | blame | 历史
PayM/bin/x86/Debug/BLL.dll 补丁 | 查看 | 原始文档 | blame | 历史
PayM/bin/x86/Debug/BLL.pdb 补丁 | 查看 | 原始文档 | blame | 历史
PayM/bin/x86/Debug/DAL.dll 补丁 | 查看 | 原始文档 | blame | 历史
PayM/bin/x86/Debug/DAL.pdb 补丁 | 查看 | 原始文档 | blame | 历史
PayM/bin/x86/Debug/DBUtility.dll 补丁 | 查看 | 原始文档 | blame | 历史
PayM/bin/x86/Debug/DBUtility.pdb 补丁 | 查看 | 原始文档 | blame | 历史
PayM/bin/x86/Debug/Interop.gregn6Lib.dll 补丁 | 查看 | 原始文档 | blame | 历史
PayM/bin/x86/Debug/Model.dll 补丁 | 查看 | 原始文档 | blame | 历史
PayM/bin/x86/Debug/Model.pdb 补丁 | 查看 | 原始文档 | blame | 历史
PayM/bin/x86/Debug/PayM.dll 补丁 | 查看 | 原始文档 | blame | 历史
PayM/bin/x86/Debug/PayM.pdb 补丁 | 查看 | 原始文档 | blame | 历史
PayM/bin/x86/Debug/Pub_Class.dll 补丁 | 查看 | 原始文档 | blame | 历史
PayM/bin/x86/Debug/Pub_Class.pdb 补丁 | 查看 | 原始文档 | blame | 历史
PayM/bin/x86/Debug/Pub_Control.dll 补丁 | 查看 | 原始文档 | blame | 历史
PayM/bin/x86/Debug/Pub_Control.pdb 补丁 | 查看 | 原始文档 | blame | 历史
PayM/bin/x86/Debug/SQLHelper.dll 补丁 | 查看 | 原始文档 | blame | 历史
PayM/bin/x86/Debug/SQLHelper.pdb 补丁 | 查看 | 原始文档 | blame | 历史
PayM/obj/Debug/AxInterop.gregn6Lib.dll 补丁 | 查看 | 原始文档 | blame | 历史
PayM/obj/Debug/BaseSet.Gy_DataInTmp_DuSubsidyItem.resources 补丁 | 查看 | 原始文档 | blame | 历史
PayM/obj/Debug/CostM.Pay_AccPayMentDayBillList.resources 补丁 | 查看 | 原始文档 | blame | 历史
PayM/obj/Debug/CostM.Pay_PayMentBillAutoAddnew.resources 补丁 | 查看 | 原始文档 | blame | 历史
PayM/obj/Debug/Interop.gregn6Lib.dll 补丁 | 查看 | 原始文档 | blame | 历史
PayM/obj/Debug/OAM.HR_EmpEngageRequestBill.resources 补丁 | 查看 | 原始文档 | blame | 历史
PayM/obj/Debug/OAM.HR_EmpEngageRequestBillList.resources 补丁 | 查看 | 原始文档 | blame | 历史
PayM/obj/Debug/PayM.Err_MonthExpenseEntryBill.resources 补丁 | 查看 | 原始文档 | blame | 历史
PayM/obj/Debug/PayM.HR_ContractBookBill.resources 补丁 | 查看 | 原始文档 | blame | 历史
PayM/obj/Debug/PayM.HR_ContractBookBillList.resources 补丁 | 查看 | 原始文档 | blame | 历史
PayM/obj/Debug/PayM.HR_EmpChangeBill.resources 补丁 | 查看 | 原始文档 | blame | 历史
PayM/obj/Debug/PayM.HR_EmpChangeBillList.resources 补丁 | 查看 | 原始文档 | blame | 历史
PayM/obj/Debug/PayM.HR_EmpDimissionBill.resources 补丁 | 查看 | 原始文档 | blame | 历史
PayM/obj/Debug/PayM.HR_EmpDimissionBillList.resources 补丁 | 查看 | 原始文档 | blame | 历史
PayM/obj/Debug/PayM.HR_FamilyMemberBill.resources 补丁 | 查看 | 原始文档 | blame | 历史
PayM/obj/Debug/PayM.HR_FamilyMemberBillList.resources 补丁 | 查看 | 原始文档 | blame | 历史
PayM/obj/Debug/PayM.HR_InsuranceBookBill.resources 补丁 | 查看 | 原始文档 | blame | 历史
PayM/obj/Debug/PayM.HR_InsuranceBookBillList.resources 补丁 | 查看 | 原始文档 | blame | 历史
PayM/obj/Debug/PayM.HR_LearnHistoryBill.resources 补丁 | 查看 | 原始文档 | blame | 历史
PayM/obj/Debug/PayM.HR_LearnHistoryBillList.resources 补丁 | 查看 | 原始文档 | blame | 历史
PayM/obj/Debug/PayM.HR_PaperPhotoBill.resources 补丁 | 查看 | 原始文档 | blame | 历史
PayM/obj/Debug/PayM.HR_PaperPhotoBillList.resources 补丁 | 查看 | 原始文档 | blame | 历史
PayM/obj/Debug/PayM.HR_RewardsPunishBill.resources 补丁 | 查看 | 原始文档 | blame | 历史
PayM/obj/Debug/PayM.HR_RewardsPunishBillList.resources 补丁 | 查看 | 原始文档 | blame | 历史
PayM/obj/Debug/PayM.HR_WorkInjuryBill.resources 补丁 | 查看 | 原始文档 | blame | 历史
PayM/obj/Debug/PayM.HR_WorkInjuryBillList.resources 补丁 | 查看 | 原始文档 | blame | 历史
PayM/obj/Debug/PayM.HR_WorkSkillBill.resources 补丁 | 查看 | 原始文档 | blame | 历史
PayM/obj/Debug/PayM.HR_WorkSkillBillList.resources 补丁 | 查看 | 原始文档 | blame | 历史
PayM/obj/Debug/PayM.HR_WorkStoryBill.resources 补丁 | 查看 | 原始文档 | blame | 历史
PayM/obj/Debug/PayM.HR_WorkStoryBillList.resources 补丁 | 查看 | 原始文档 | blame | 历史
PayM/obj/Debug/PayM.KQ_sourceReport.resources 补丁 | 查看 | 原始文档 | blame | 历史
PayM/obj/Debug/PayM.Pay_CarOutApplyBill.resources 补丁 | 查看 | 原始文档 | blame | 历史
PayM/obj/Debug/PayM.Pay_CarOutApplyBillList.resources 补丁 | 查看 | 原始文档 | blame | 历史
PayM/obj/Debug/PayM.Pay_DuSubsidyItemBill.resources 补丁 | 查看 | 原始文档 | blame | 历史
PayM/obj/Debug/PayM.Pay_DuSubsidyItemBillList.resources 补丁 | 查看 | 原始文档 | blame | 历史
PayM/obj/Debug/PayM.Pay_EmpPayMentSumReport.resources 补丁 | 查看 | 原始文档 | blame | 历史
PayM/obj/Debug/PayM.Pay_EmpWorkQtyEntryReport.resources 补丁 | 查看 | 原始文档 | blame | 历史
PayM/obj/Debug/PayM.Pay_ErrWorkTimesRequestBill.resources 补丁 | 查看 | 原始文档 | blame | 历史
PayM/obj/Debug/PayM.Pay_ErrWorkTimesRequestBillList.resources 补丁 | 查看 | 原始文档 | blame | 历史
PayM/obj/Debug/PayM.Pay_ErrWorkTimesSendBill.resources 补丁 | 查看 | 原始文档 | blame | 历史
PayM/obj/Debug/PayM.Pay_ErrWorkTimesSendBillList.resources 补丁 | 查看 | 原始文档 | blame | 历史
PayM/obj/Debug/PayM.Pay_GetNeedCheckErrWorkTimesSendBillList.resources 补丁 | 查看 | 原始文档 | blame | 历史
PayM/obj/Debug/PayM.Pay_GroupBalBill.resources 补丁 | 查看 | 原始文档 | blame | 历史
PayM/obj/Debug/PayM.Pay_GroupBalBillList.resources 补丁 | 查看 | 原始文档 | blame | 历史
PayM/obj/Debug/PayM.Pay_InnerScrap.resources 补丁 | 查看 | 原始文档 | blame | 历史
PayM/obj/Debug/PayM.Pay_MonthExpenseEntryBillList.resources 补丁 | 查看 | 原始文档 | blame | 历史
PayM/obj/Debug/PayM.Pay_MonthExpenseEntryBillReport.resources 补丁 | 查看 | 原始文档 | blame | 历史
PayM/obj/Debug/PayM.Pay_MonthSubsidyEntryBillReport.resources 补丁 | 查看 | 原始文档 | blame | 历史
PayM/obj/Debug/PayM.Pay_MonthSubsidyEntryBillReportMX.resources 补丁 | 查看 | 原始文档 | blame | 历史
PayM/obj/Debug/PayM.Pay_MonthSubsidyYearReport.resources 补丁 | 查看 | 原始文档 | blame | 历史
PayM/obj/Debug/PayM.Pay_MonthWriteBillReport.resources 补丁 | 查看 | 原始文档 | blame | 历史
PayM/obj/Debug/PayM.Pay_MonthWriteBillReportMX.resources 补丁 | 查看 | 原始文档 | blame | 历史
PayM/obj/Debug/PayM.Pay_MonthWriteBillReportMX2.resources 补丁 | 查看 | 原始文档 | blame | 历史
PayM/obj/Debug/PayM.Pay_NoWorkTimesReport.resources 补丁 | 查看 | 原始文档 | blame | 历史
PayM/obj/Debug/PayM.Pay_OtherBalBill.resources 补丁 | 查看 | 原始文档 | blame | 历史
PayM/obj/Debug/PayM.Pay_OtherBalBillList.resources 补丁 | 查看 | 原始文档 | blame | 历史
PayM/obj/Debug/PayM.Pay_OtherMoney_Dlg.resources 补丁 | 查看 | 原始文档 | blame | 历史
PayM/obj/Debug/PayM.Pay_OutApplyBill.resources 补丁 | 查看 | 原始文档 | blame | 历史
PayM/obj/Debug/PayM.Pay_OutApplyBillList.resources 补丁 | 查看 | 原始文档 | blame | 历史
PayM/obj/Debug/PayM.Pay_OuterScrap.resources 补丁 | 查看 | 原始文档 | blame | 历史
PayM/obj/Debug/PayM.Pay_OverApplyBill.resources 补丁 | 查看 | 原始文档 | blame | 历史
PayM/obj/Debug/PayM.Pay_OverApplyBillList.resources 补丁 | 查看 | 原始文档 | blame | 历史
PayM/obj/Debug/PayM.Pay_PayMentBill.resources 补丁 | 查看 | 原始文档 | blame | 历史
PayM/obj/Debug/PayM.Pay_PayMentBillList.resources 补丁 | 查看 | 原始文档 | blame | 历史
PayM/obj/Debug/PayM.Pay_PayMentDayBill.resources 补丁 | 查看 | 原始文档 | blame | 历史
PayM/obj/Debug/PayM.Pay_PayMentDayBillList.resources 补丁 | 查看 | 原始文档 | blame | 历史
PayM/obj/Debug/PayM.Pay_PayMentDeptSendList.resources 补丁 | 查看 | 原始文档 | blame | 历史
PayM/obj/Debug/PayM.Pay_PayMentDeptYearReport.resources 补丁 | 查看 | 原始文档 | blame | 历史
PayM/obj/Debug/PayM.Pay_PayMentPrintReport.resources 补丁 | 查看 | 原始文档 | blame | 历史
PayM/obj/Debug/PayM.Pay_PayMentSendList.resources 补丁 | 查看 | 原始文档 | blame | 历史
PayM/obj/Debug/PayM.Pay_PayMentYearReport.resources 补丁 | 查看 | 原始文档 | blame | 历史
PayM/obj/Debug/PayM.Pay_ProcPriceRequestBill.resources 补丁 | 查看 | 原始文档 | blame | 历史
PayM/obj/Debug/PayM.Pay_ProcPriceRequestBillList.resources 补丁 | 查看 | 原始文档 | blame | 历史
PayM/obj/Debug/PayM.Pay_ProdWorkQtyEntryReport.resources 补丁 | 查看 | 原始文档 | blame | 历史
PayM/obj/Debug/PayM.Pay_ProdWorkQtySumReport.resources 补丁 | 查看 | 原始文档 | blame | 历史
PayM/obj/Debug/PayM.Pay_SingleBalBill.resources 补丁 | 查看 | 原始文档 | blame | 历史
PayM/obj/Debug/PayM.Pay_SingleBalBillList.resources 补丁 | 查看 | 原始文档 | blame | 历史
PayM/obj/Debug/PayM.Pay_SingleBalBill_Enter.resources 补丁 | 查看 | 原始文档 | blame | 历史
PayM/obj/Debug/PayM.Pay_SingleBalBill_KS.resources 补丁 | 查看 | 原始文档 | blame | 历史
PayM/obj/Debug/PayM.Pay_SubsidyChangeBill.resources 补丁 | 查看 | 原始文档 | blame | 历史
PayM/obj/Debug/PayM.Pay_SubsidyChangeBillList.resources 补丁 | 查看 | 原始文档 | blame | 历史
PayM/obj/Debug/PayM.Pay_WorkTimesBill.resources 补丁 | 查看 | 原始文档 | blame | 历史
PayM/obj/Debug/PayM.Pay_WorkTimesBillList.resources 补丁 | 查看 | 原始文档 | blame | 历史
PayM/obj/Debug/PayM.Pay_WorkTimesCardBillList.resources 补丁 | 查看 | 原始文档 | blame | 历史
PayM/obj/Debug/PayM.Pay_WorkTimesList.resources 补丁 | 查看 | 原始文档 | blame | 历史
PayM/obj/Debug/PayM.Pay_YearToCashBillReport.resources 补丁 | 查看 | 原始文档 | blame | 历史
PayM/obj/Debug/PayM.csproj.GenerateResource.Cache 补丁 | 查看 | 原始文档 | blame | 历史
PayM/obj/Debug/PayM.csproj.ResolveComReference.cache 补丁 | 查看 | 原始文档 | blame | 历史
PayM/obj/Debug/PayM.dll 补丁 | 查看 | 原始文档 | blame | 历史
PayM/obj/Debug/PayM.pdb 补丁 | 查看 | 原始文档 | blame | 历史
PayM/obj/x86/Debug/PayM.csproj.AssemblyReference.cache 补丁 | 查看 | 原始文档 | blame | 历史
PayM/obj/x86/Debug/PayM.csproj.CoreCompileInputs.cache 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
PayM/obj/x86/Debug/PayM.csproj.ResolveComReference.cache 补丁 | 查看 | 原始文档 | blame | 历史
PayM/obj/x86/Debug/PayM.dll 补丁 | 查看 | 原始文档 | blame | 历史
PayM/obj/x86/Debug/PayM.pdb 补丁 | 查看 | 原始文档 | blame | 历史
SyntacticSugar/bin/Debug/SyntacticSugar.dll 补丁 | 查看 | 原始文档 | blame | 历史
SyntacticSugar/bin/Debug/SyntacticSugar.pdb 补丁 | 查看 | 原始文档 | blame | 历史
SyntacticSugar/obj/Debug/SyntacticSugar.csproj.AssemblyReference.cache 补丁 | 查看 | 原始文档 | blame | 历史
SyntacticSugar/obj/Debug/SyntacticSugar.csproj.FileListAbsolute.txt 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
SyntacticSugar/obj/Debug/SyntacticSugar.dll 补丁 | 查看 | 原始文档 | blame | 历史
SyntacticSugar/obj/Debug/SyntacticSugar.pdb 补丁 | 查看 | 原始文档 | blame | 历史
WebAPI/Controllers/BaseSet/Gy_MaterialController.cs 1033 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebAPI/Controllers/BaseSet/Gy_ModelTypeController.cs 265 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebAPI/Controllers/CJGL/Qc_PreventErrMouldCheckBillController.cs 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebAPI/Controllers/CJGL/Sc_WorkBeginDotCheckBillController.cs 54 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebAPI/Controllers/SBGL/Gy_EquipFileMainController.cs 530 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebAPI/Controllers/SBGL/Gy_EquipTypeController.cs 266 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebAPI/Controllers/SBGL/SB_EquipICMOTechParamBillController.cs 185 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebAPI/Controllers/SBGL/Sb_EquipDotCheckBillController.cs 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebAPI/Controllers/WebAPIController.cs 519 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebAPI/Controllers/基础资料/基础资料/Gy_MaterTypeBillController.cs 326 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebAPI/Controllers/数据同步/钉钉同步/DD_DataSynchronizationController.cs 774 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebAPI/Controllers/条码管理/WEBSController.cs 50 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebAPI/DLL/ClsSb_EquipMaintainRuleBill.cs 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebAPI/Models/ClsSb_EquipMaintainRuleBillMain.cs 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebAPI/Properties/PublishProfiles/FolderProfile10.pubxml.user 44 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebAPI/Properties/PublishProfiles/FolderProfile6.pubxml 16 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebAPI/Properties/PublishProfiles/FolderProfile6.pubxml.user 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebAPI/Properties/PublishProfiles/FolderProfilewtt.pubxml.user 40 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebAPI/WebAPI.csproj.user 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
sdk_dingding/TopSdk/bin/Debug/TopSdk.dll 补丁 | 查看 | 原始文档 | blame | 历史
sdk_dingding/TopSdk/bin/Debug/TopSdk.pdb 补丁 | 查看 | 原始文档 | blame | 历史
sdk_dingding/TopSdk/obj/Debug/TopSdk.csproj.AssemblyReference.cache 补丁 | 查看 | 原始文档 | 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/Éú²ú¹ÜÀí/Ä£¾ß¹ÜÀí/ClsSc_MouldMaintainRuleBill.cs
@@ -59,6 +59,7 @@
                ",HMaintainLevID=" + omodel.HMaintainLevID +
                ",HUseQtys=" + omodel.HUseQtys +
                ",HSafeDays=" + omodel.HSafeDays +
                ",HErrWarDays=" + omodel.HErrWarDays +
                " where HInterID=" + lngBillKey.ToString());                
                //删除关联
                //DeleteRelation(ref sReturn, lngBillKey);
@@ -119,11 +120,11 @@
                oCn.RunProc("Insert Into Sc_MouldMaintainRuleBillMain" +
                 "(HBillType,HBillSubType,HInterID,HBillNo,HDate" +
                ",HYear,HPeriod,HRemark,HMaker,HMakeDate" +
                ",HCycleUnit,HCheckCycle,HExplanation,HInnerBillNo,HMaintainLevID,HUseQtys,HSafeDays" +
                ",HCycleUnit,HCheckCycle,HExplanation,HInnerBillNo,HMaintainLevID,HUseQtys,HSafeDays,HErrWarDays" +
                ") " +
                " 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.HCycleUnit + "'," + omodel.HCheckCycle.ToString() + ",'" + omodel.HExplanation + "','" + omodel.HInnerBillNo + "'," + omodel.HMaintainLevID + "," + omodel.HUseQtys + "," + omodel.HSafeDays + "," + omodel.HErrWarDays +
                ") ");
                ////插入子表
                foreach (Model.ClsSc_MouldMaintainRuleBillSub oSub in DetailColl_Mater)
DAL/³µ¼ä¹ÜÀí/ClsGy_WorkBeginDotCheckListBillMain.cs
@@ -63,7 +63,7 @@
                {
                    string subSql = "insert into Gy_WorkBeginDotCheckListBillSub " +
                        "(HInterID,HEntryID,HSourceInterID,HSourceEntryID,HSourceBillNo,HSourceBillType,HRemark" +
                        ",HCheckNoteItemID,HCheckPostID) " +
                        ",HCheckNoteItemID,HCheckPostID,HDotCheckType,HRelationID) " +
                        " values(" +
                        "" + omodel.HInterID.ToString() +
                        "," + oSub.HEntryID.ToString() +
@@ -74,6 +74,8 @@
                        "','" + oSub.HRemark +
                        "','" + oSub.HCheckNoteItemID +
                        "','" + oSub.HCheckPostID +
                        "','" + oSub.HDotCheckType +
                        "','" + oSub.HRelationID +
                        "')";
                    oCn.RunProc(subSql);
                }
@@ -142,7 +144,7 @@
                {
                    string subSql = "insert into Gy_WorkBeginDotCheckListBillSub " +
                        "(HInterID,HEntryID,HSourceInterID,HSourceEntryID,HSourceBillNo,HSourceBillType,HRemark" +
                        ",HCheckNoteItemID,HCheckPostID) " +
                        ",HCheckNoteItemID,HCheckPostID,HDotCheckType,HRelationID) " +
                        " values(" +
                        "" + omodel.HInterID.ToString() +
                        "," + oSub.HEntryID.ToString() +
@@ -153,6 +155,8 @@
                        "','" + oSub.HRemark +
                        "','" + oSub.HCheckNoteItemID +
                        "','" + oSub.HCheckPostID +
                        "','" + oSub.HDotCheckType +
                        "','" + oSub.HRelationID +
                        "')";
                    oCn.RunProc(subSql);
                }
DAL/³µ¼ä¹ÜÀí/ClsSc_WorkBeginDotCheckBillMain.cs
@@ -71,20 +71,22 @@
                foreach (Model.ClsSc_WorkBeginDotCheckBillSub oSub in DetailColl)
                {
                    string subSql = "insert into Sc_WorkBeginDotCheckBillSub " +
                        "(HInterID,HEntryID,HSourceInterID,HSourceEntryID,HSourceBillNo,HSourceBillType,HRemark" +
                        ",HCheckNoteItemID,HCheckPostID,HCheckResult) " +
                        " values(" +
                        "" + omodel.HInterID.ToString() +
                        "," + oSub.HEntryID.ToString() +
                        "," + oSub.HSourceInterID +
                        "," + oSub.HSourceEntryID +
                        ",'" + oSub.HSourceBillNo +
                        "','" + oSub.HSourceBillType +
                        "','" + oSub.HRemark +
                        "','" + oSub.HCheckNoteItemID +
                        "','" + oSub.HCheckPostID +
                        "','" + oSub.HCheckResult +
                        "')";
                   "(HInterID,HEntryID,HSourceInterID,HSourceEntryID,HSourceBillNo,HSourceBillType,HRemark" +
                   ",HCheckNoteItemID,HCheckPostID,HCheckResult,HDotCheckType,HRelationID) " +
                   " values(" +
                   "" + omodel.HInterID.ToString() +
                   "," + oSub.HEntryID.ToString() +
                   "," + oSub.HSourceInterID +
                   "," + oSub.HSourceEntryID +
                   ",'" + oSub.HSourceBillNo +
                   "','" + oSub.HSourceBillType +
                   "','" + oSub.HRemark +
                   "','" + oSub.HCheckNoteItemID +
                   "','" + oSub.HCheckPostID +
                   "','" + oSub.HCheckResult +
                   "','" + oSub.HDotCheckType +
                   "','" + oSub.HRelationID +
                   "')";
                    oCn.RunProc(subSql);
                }
@@ -161,7 +163,7 @@
                {
                    string subSql = "insert into Sc_WorkBeginDotCheckBillSub " +
                        "(HInterID,HEntryID,HSourceInterID,HSourceEntryID,HSourceBillNo,HSourceBillType,HRemark" +
                        ",HCheckNoteItemID,HCheckPostID,HCheckResult) " +
                        ",HCheckNoteItemID,HCheckPostID,HCheckResult,HDotCheckType,HRelationID) " +
                        " values(" +
                        "" + omodel.HInterID.ToString() +
                        "," + oSub.HEntryID.ToString() +
@@ -173,6 +175,8 @@
                        "','" + oSub.HCheckNoteItemID +
                        "','" + oSub.HCheckPostID +
                        "','" + oSub.HCheckResult +
                        "','" + oSub.HDotCheckType +
                        "','" + oSub.HRelationID +
                        "')";
                    oCn.RunProc(subSql);
                }
LMES/DingDing_autoGetData.cs
@@ -63,6 +63,17 @@
                    return false;
                }
                //设备维修记录单
                if (obj.getData_EquipRepairWeiXiu(ref msg) == false)
                {
                    return false;
                }
                //模具维修记录单 ä¿å…»è®°å½•单
                if (obj.getData_MouldFileWeiXiuBaoYang(ref msg) == false)
                {
                    return false;
                }
                return true;
            }
            catch (Exception e)
LMES/LMES.csproj
@@ -37,7 +37,7 @@
    <DefineConstants>DEBUG;TRACE</DefineConstants>
    <ErrorReport>prompt</ErrorReport>
    <WarningLevel>4</WarningLevel>
    <Prefer32Bit>false</Prefer32Bit>
    <Prefer32Bit>true</Prefer32Bit>
  </PropertyGroup>
  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
    <PlatformTarget>AnyCPU</PlatformTarget>
LMES/Program.cs
@@ -15,44 +15,44 @@
        {
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);
            //Application.Run(new DingDing_autoGetData());
            Application.Run(new DingDing_autoGetData());
            DBUtility.ClsPub.AppPath = System.Environment.CurrentDirectory;
            Pub_Class.ClsPub.AppPath = System.Environment.CurrentDirectory;
            Pub_Class.ClsPub.SetIPAddress();
            DBUtility.ClsPub.SetIPAddress();
            DBUtility.ClsPub.VersionNum = "12.1";
            Pub_Class.ClsPub.VersionNum = "12.1";//
            //===================================================================
            try
            {
                if (DBUtility.ClsPub.CheckUpdate())
                {
                    MessageBox.Show("发现最新版本,需要更新!");
                    string strFileName = DBUtility.ClsPub.AppPath + @"\HX_Update.exe";
                    System.Diagnostics.Process.Start(strFileName);
                    Application.Exit();
                    return;
                }
                else
                {
                    //============================================
                    BLL.FrmLogin frmlg = new BLL.FrmLogin();
                    frmlg.ShowDialog();
                    if (frmlg.isOk)
                    {
                        MDIMain MainFrm = new MDIMain();
                        Application.Run(MainFrm);
                    }
                }
            }
            catch (Exception e)
            {
                MessageBox.Show(e.Message);
                Application.Exit();
                return;
            }
            //DBUtility.ClsPub.AppPath = System.Environment.CurrentDirectory;
            //Pub_Class.ClsPub.AppPath = System.Environment.CurrentDirectory;
            //Pub_Class.ClsPub.SetIPAddress();
            //DBUtility.ClsPub.SetIPAddress();
            //DBUtility.ClsPub.VersionNum = "12.1";
            //Pub_Class.ClsPub.VersionNum = "12.1";//
            ////===================================================================
            //try
            //{
            //    if (DBUtility.ClsPub.CheckUpdate())
            //    {
            //        MessageBox.Show("发现最新版本,需要更新!");
            //        string strFileName = DBUtility.ClsPub.AppPath + @"\HX_Update.exe";
            //        System.Diagnostics.Process.Start(strFileName);
            //        Application.Exit();
            //        return;
            //    }
            //    else
            //    {
            //        //============================================
            //        BLL.FrmLogin frmlg = new BLL.FrmLogin();
            //        frmlg.ShowDialog();
            //        if (frmlg.isOk)
            //        {
            //            MDIMain MainFrm = new MDIMain();
            //            Application.Run(MainFrm);
            //        }
            //    }
            //}
            //catch (Exception e)
            //{
            //    MessageBox.Show(e.Message);
            //    Application.Exit();
            //    return;
            //}
        }
    }
}
LMES/bin/Debug.rar
Binary files differ
Model/Éú²ú¹ÜÀí/Ä£¾ß¹ÜÀí/ClsSc_MouldMaintainRuleBillMain.cs
@@ -14,5 +14,6 @@
        public Int64 HMaintainLevID; //保养级别(gy_HMaintainLev)
        public Int64 HUseQtys; //保养冲刺数
        public Int64 HSafeDays; //保养安全天数
        public Int64 HErrWarDays; //保养预警天数
    }
}
Model/³µ¼ä¹ÜÀí/ClsGy_WorkBeginDotCheckListBillSub.cs
@@ -8,6 +8,8 @@
    {
        public Int64 HCheckNoteItemID;  // int --检查项目 (Gy_CheckNoteItem)
        public Int64 HCheckPostID;         //int --确认者角色(gy_Post)
        public string HDotCheckType;         //varchar(50) --点检类型
        public Int64 HRelationID;         //int --关联id
    }
}
Model/³µ¼ä¹ÜÀí/ClsSc_WorkBeginDotCheckBillSub.cs
@@ -8,6 +8,8 @@
    {
        public Int64 HCheckNoteItemID;  // int --检查项目 (Gy_CheckNoteItem)
        public Int64 HCheckPostID;         //int --确认者角色(gy_Post)
        public string HDotCheckType;         //varchar(50) --点检类型
        public Int64 HRelationID;         //int --关联id
        public string HCheckResult;     // varchar(20)  --结果(OK,X)
    }
PayM/bin/Debug/AxInterop.gregn6Lib.dll
Binary files differ
PayM/bin/Debug/BLL.dll
Binary files differ
PayM/bin/Debug/BLL.pdb
Binary files differ
PayM/bin/Debug/DAL.dll
Binary files differ
PayM/bin/Debug/DAL.pdb
Binary files differ
PayM/bin/Debug/DBUtility.dll
Binary files differ
PayM/bin/Debug/DBUtility.pdb
Binary files differ
PayM/bin/Debug/Interop.gregn6Lib.dll
Binary files differ
PayM/bin/Debug/Model.dll
Binary files differ
PayM/bin/Debug/Model.pdb
Binary files differ
PayM/bin/Debug/PayM.dll
Binary files differ
PayM/bin/Debug/PayM.pdb
Binary files differ
PayM/bin/Debug/Pub_Class.dll
Binary files differ
PayM/bin/Debug/Pub_Class.pdb
Binary files differ
PayM/bin/Debug/Pub_Control.dll
Binary files differ
PayM/bin/Debug/Pub_Control.pdb
Binary files differ
PayM/bin/Debug/SQLHelper.dll
Binary files differ
PayM/bin/Debug/SQLHelper.pdb
Binary files differ
PayM/bin/x86/Debug/BLL.dll
Binary files differ
PayM/bin/x86/Debug/BLL.pdb
Binary files differ
PayM/bin/x86/Debug/DAL.dll
Binary files differ
PayM/bin/x86/Debug/DAL.pdb
Binary files differ
PayM/bin/x86/Debug/DBUtility.dll
Binary files differ
PayM/bin/x86/Debug/DBUtility.pdb
Binary files differ
PayM/bin/x86/Debug/Interop.gregn6Lib.dll
Binary files differ
PayM/bin/x86/Debug/Model.dll
Binary files differ
PayM/bin/x86/Debug/Model.pdb
Binary files differ
PayM/bin/x86/Debug/PayM.dll
Binary files differ
PayM/bin/x86/Debug/PayM.pdb
Binary files differ
PayM/bin/x86/Debug/Pub_Class.dll
Binary files differ
PayM/bin/x86/Debug/Pub_Class.pdb
Binary files differ
PayM/bin/x86/Debug/Pub_Control.dll
Binary files differ
PayM/bin/x86/Debug/Pub_Control.pdb
Binary files differ
PayM/bin/x86/Debug/SQLHelper.dll
Binary files differ
PayM/bin/x86/Debug/SQLHelper.pdb
Binary files differ
PayM/obj/Debug/AxInterop.gregn6Lib.dll
Binary files differ
PayM/obj/Debug/BaseSet.Gy_DataInTmp_DuSubsidyItem.resources
Binary files differ
PayM/obj/Debug/CostM.Pay_AccPayMentDayBillList.resources
Binary files differ
PayM/obj/Debug/CostM.Pay_PayMentBillAutoAddnew.resources
Binary files differ
PayM/obj/Debug/Interop.gregn6Lib.dll
Binary files differ
PayM/obj/Debug/OAM.HR_EmpEngageRequestBill.resources
Binary files differ
PayM/obj/Debug/OAM.HR_EmpEngageRequestBillList.resources
Binary files differ
PayM/obj/Debug/PayM.Err_MonthExpenseEntryBill.resources
Binary files differ
PayM/obj/Debug/PayM.HR_ContractBookBill.resources
Binary files differ
PayM/obj/Debug/PayM.HR_ContractBookBillList.resources
Binary files differ
PayM/obj/Debug/PayM.HR_EmpChangeBill.resources
Binary files differ
PayM/obj/Debug/PayM.HR_EmpChangeBillList.resources
Binary files differ
PayM/obj/Debug/PayM.HR_EmpDimissionBill.resources
Binary files differ
PayM/obj/Debug/PayM.HR_EmpDimissionBillList.resources
Binary files differ
PayM/obj/Debug/PayM.HR_FamilyMemberBill.resources
Binary files differ
PayM/obj/Debug/PayM.HR_FamilyMemberBillList.resources
Binary files differ
PayM/obj/Debug/PayM.HR_InsuranceBookBill.resources
Binary files differ
PayM/obj/Debug/PayM.HR_InsuranceBookBillList.resources
Binary files differ
PayM/obj/Debug/PayM.HR_LearnHistoryBill.resources
Binary files differ
PayM/obj/Debug/PayM.HR_LearnHistoryBillList.resources
Binary files differ
PayM/obj/Debug/PayM.HR_PaperPhotoBill.resources
Binary files differ
PayM/obj/Debug/PayM.HR_PaperPhotoBillList.resources
Binary files differ
PayM/obj/Debug/PayM.HR_RewardsPunishBill.resources
Binary files differ
PayM/obj/Debug/PayM.HR_RewardsPunishBillList.resources
Binary files differ
PayM/obj/Debug/PayM.HR_WorkInjuryBill.resources
Binary files differ
PayM/obj/Debug/PayM.HR_WorkInjuryBillList.resources
Binary files differ
PayM/obj/Debug/PayM.HR_WorkSkillBill.resources
Binary files differ
PayM/obj/Debug/PayM.HR_WorkSkillBillList.resources
Binary files differ
PayM/obj/Debug/PayM.HR_WorkStoryBill.resources
Binary files differ
PayM/obj/Debug/PayM.HR_WorkStoryBillList.resources
Binary files differ
PayM/obj/Debug/PayM.KQ_sourceReport.resources
Binary files differ
PayM/obj/Debug/PayM.Pay_CarOutApplyBill.resources
Binary files differ
PayM/obj/Debug/PayM.Pay_CarOutApplyBillList.resources
Binary files differ
PayM/obj/Debug/PayM.Pay_DuSubsidyItemBill.resources
Binary files differ
PayM/obj/Debug/PayM.Pay_DuSubsidyItemBillList.resources
Binary files differ
PayM/obj/Debug/PayM.Pay_EmpPayMentSumReport.resources
Binary files differ
PayM/obj/Debug/PayM.Pay_EmpWorkQtyEntryReport.resources
Binary files differ
PayM/obj/Debug/PayM.Pay_ErrWorkTimesRequestBill.resources
Binary files differ
PayM/obj/Debug/PayM.Pay_ErrWorkTimesRequestBillList.resources
Binary files differ
PayM/obj/Debug/PayM.Pay_ErrWorkTimesSendBill.resources
Binary files differ
PayM/obj/Debug/PayM.Pay_ErrWorkTimesSendBillList.resources
Binary files differ
PayM/obj/Debug/PayM.Pay_GetNeedCheckErrWorkTimesSendBillList.resources
Binary files differ
PayM/obj/Debug/PayM.Pay_GroupBalBill.resources
Binary files differ
PayM/obj/Debug/PayM.Pay_GroupBalBillList.resources
Binary files differ
PayM/obj/Debug/PayM.Pay_InnerScrap.resources
Binary files differ
PayM/obj/Debug/PayM.Pay_MonthExpenseEntryBillList.resources
Binary files differ
PayM/obj/Debug/PayM.Pay_MonthExpenseEntryBillReport.resources
Binary files differ
PayM/obj/Debug/PayM.Pay_MonthSubsidyEntryBillReport.resources
Binary files differ
PayM/obj/Debug/PayM.Pay_MonthSubsidyEntryBillReportMX.resources
Binary files differ
PayM/obj/Debug/PayM.Pay_MonthSubsidyYearReport.resources
Binary files differ
PayM/obj/Debug/PayM.Pay_MonthWriteBillReport.resources
Binary files differ
PayM/obj/Debug/PayM.Pay_MonthWriteBillReportMX.resources
Binary files differ
PayM/obj/Debug/PayM.Pay_MonthWriteBillReportMX2.resources
Binary files differ
PayM/obj/Debug/PayM.Pay_NoWorkTimesReport.resources
Binary files differ
PayM/obj/Debug/PayM.Pay_OtherBalBill.resources
Binary files differ
PayM/obj/Debug/PayM.Pay_OtherBalBillList.resources
Binary files differ
PayM/obj/Debug/PayM.Pay_OtherMoney_Dlg.resources
Binary files differ
PayM/obj/Debug/PayM.Pay_OutApplyBill.resources
Binary files differ
PayM/obj/Debug/PayM.Pay_OutApplyBillList.resources
Binary files differ
PayM/obj/Debug/PayM.Pay_OuterScrap.resources
Binary files differ
PayM/obj/Debug/PayM.Pay_OverApplyBill.resources
Binary files differ
PayM/obj/Debug/PayM.Pay_OverApplyBillList.resources
Binary files differ
PayM/obj/Debug/PayM.Pay_PayMentBill.resources
Binary files differ
PayM/obj/Debug/PayM.Pay_PayMentBillList.resources
Binary files differ
PayM/obj/Debug/PayM.Pay_PayMentDayBill.resources
Binary files differ
PayM/obj/Debug/PayM.Pay_PayMentDayBillList.resources
Binary files differ
PayM/obj/Debug/PayM.Pay_PayMentDeptSendList.resources
Binary files differ
PayM/obj/Debug/PayM.Pay_PayMentDeptYearReport.resources
Binary files differ
PayM/obj/Debug/PayM.Pay_PayMentPrintReport.resources
Binary files differ
PayM/obj/Debug/PayM.Pay_PayMentSendList.resources
Binary files differ
PayM/obj/Debug/PayM.Pay_PayMentYearReport.resources
Binary files differ
PayM/obj/Debug/PayM.Pay_ProcPriceRequestBill.resources
Binary files differ
PayM/obj/Debug/PayM.Pay_ProcPriceRequestBillList.resources
Binary files differ
PayM/obj/Debug/PayM.Pay_ProdWorkQtyEntryReport.resources
Binary files differ
PayM/obj/Debug/PayM.Pay_ProdWorkQtySumReport.resources
Binary files differ
PayM/obj/Debug/PayM.Pay_SingleBalBill.resources
Binary files differ
PayM/obj/Debug/PayM.Pay_SingleBalBillList.resources
Binary files differ
PayM/obj/Debug/PayM.Pay_SingleBalBill_Enter.resources
Binary files differ
PayM/obj/Debug/PayM.Pay_SingleBalBill_KS.resources
Binary files differ
PayM/obj/Debug/PayM.Pay_SubsidyChangeBill.resources
Binary files differ
PayM/obj/Debug/PayM.Pay_SubsidyChangeBillList.resources
Binary files differ
PayM/obj/Debug/PayM.Pay_WorkTimesBill.resources
Binary files differ
PayM/obj/Debug/PayM.Pay_WorkTimesBillList.resources
Binary files differ
PayM/obj/Debug/PayM.Pay_WorkTimesCardBillList.resources
Binary files differ
PayM/obj/Debug/PayM.Pay_WorkTimesList.resources
Binary files differ
PayM/obj/Debug/PayM.Pay_YearToCashBillReport.resources
Binary files differ
PayM/obj/Debug/PayM.csproj.GenerateResource.Cache
Binary files differ
PayM/obj/Debug/PayM.csproj.ResolveComReference.cache
Binary files differ
PayM/obj/Debug/PayM.dll
Binary files differ
PayM/obj/Debug/PayM.pdb
Binary files differ
PayM/obj/x86/Debug/PayM.csproj.AssemblyReference.cache
Binary files differ
PayM/obj/x86/Debug/PayM.csproj.CoreCompileInputs.cache
@@ -1 +1 @@
3fadbf89317467dfe910ad93be6dc1c3a5e2a3e3
76d6e649eaf418858fb80b047dbac5a1964f90f8
PayM/obj/x86/Debug/PayM.csproj.ResolveComReference.cache
Binary files differ
PayM/obj/x86/Debug/PayM.dll
Binary files differ
PayM/obj/x86/Debug/PayM.pdb
Binary files differ
SyntacticSugar/bin/Debug/SyntacticSugar.dll
Binary files differ
SyntacticSugar/bin/Debug/SyntacticSugar.pdb
Binary files differ
SyntacticSugar/obj/Debug/SyntacticSugar.csproj.AssemblyReference.cache
Binary files differ
SyntacticSugar/obj/Debug/SyntacticSugar.csproj.FileListAbsolute.txt
@@ -10,3 +10,8 @@
C:\Users\86130\Desktop\智云迈思\MES-WEB-API\SyntacticSugar\obj\Debug\SyntacticSugar.dll
C:\Users\86130\Desktop\智云迈思\MES-WEB-API\SyntacticSugar\obj\Debug\SyntacticSugar.pdb
C:\Users\86130\Desktop\智云迈思\MES-WEB-API\SyntacticSugar\obj\Debug\SyntacticSugar.csproj.AssemblyReference.cache
E:\智云mes\mes\MES-WEB-API\SyntacticSugar\bin\Debug\SyntacticSugar.dll
E:\智云mes\mes\MES-WEB-API\SyntacticSugar\bin\Debug\SyntacticSugar.pdb
E:\智云mes\mes\MES-WEB-API\SyntacticSugar\obj\Debug\SyntacticSugar.csproj.CoreCompileInputs.cache
E:\智云mes\mes\MES-WEB-API\SyntacticSugar\obj\Debug\SyntacticSugar.dll
E:\智云mes\mes\MES-WEB-API\SyntacticSugar\obj\Debug\SyntacticSugar.pdb
SyntacticSugar/obj/Debug/SyntacticSugar.dll
Binary files differ
SyntacticSugar/obj/Debug/SyntacticSugar.pdb
Binary files differ
WebAPI/Controllers/BaseSet/Gy_MaterialController.cs
@@ -14,6 +14,8 @@
using WebAPI.Models;
using WebAPI.Service;
using System.Text.RegularExpressions;
using WebAPI.Controllers.SCGL.日计划管理;
using SyntacticSugar.constant;
namespace WebAPI.Controllers
{
@@ -656,6 +658,453 @@
            }
        }
        #region ç‰©æ–™ æ–‡ä»¶å¯¼å…¥ä¿å­˜
        #region ç‰©æ–™ æ–‡ä»¶ä¸Šä¼ 
        [Route("Gy_Material/Gy_Material_Excel")]
        [HttpPost]
        public object Gy_Material_Excel()
        {
            try
            {
                //获取文件名称
                var file = HttpContext.Current.Request.Files[0];
                //获取文件物理路径
                string ExcelPath = HttpContext.Current.Server.MapPath("~/" + file.FileName);
                //保存文件
                file.SaveAs(ExcelPath);
                NpoiHelper np = new NpoiHelper();
                DataSet ExcelDs = np.ReadExcel(ExcelPath, 1, 1, "0");
                //删除文件
                File.Delete(ExcelPath);
                //创建临时表
                DataTable tb2 = new DataTable("dt2");
                //添加列名
                for (int i = 0; i < ExcelDs.Tables[0].Columns.Count; i++)
                {
                    tb2.Columns.Add(ExcelDs.Tables[0].Rows[0][i].ToString());
                }
                //模板缺少列 ä½†éœ€è¦ä»Žæ•°æ®åº“中查询出来显示在页面的字段
                tb2.Columns.Add("HOrgID", typeof(Int32));//组织ID
                tb2.Columns.Add("HMaterClsID", typeof(Int32));//物料属性ID
                tb2.Columns.Add("HUnitGroupID", typeof(Int32));//计量单位组ID
                tb2.Columns.Add("HUnitID", typeof(Int32));//单位ID
                tb2.Columns.Add("HSecUnitID", typeof(Int32));//辅助计量单位ID
                tb2.Columns.Add("HWhID", typeof(Int32));//默认仓库ID
                //添加数据
                for (int i = 1; i < ExcelDs.Tables[0].Rows.Count; i++)
                {
                    DataRow row = tb2.NewRow();
                    for (int j = 0; j < ExcelDs.Tables[0].Columns.Count; j++)
                    {
                        row[j] = ExcelDs.Tables[0].Rows[i][j].ToString();
                    }
                    tb2.Rows.Add(row);
                }
                var error = "";
                //判断导入文件列是否完整
                if (!tb2.Columns.Contains("组织代码"))
                    error += "没有找到【组织代码】的标题,";
                if (!tb2.Columns.Contains("组织名称"))
                    error += "没有找到【组织名称】的标题,";
                if (!tb2.Columns.Contains("物料名称"))
                    error += "没有找到【物料名称】的标题,";
                if (!tb2.Columns.Contains("物料代码"))
                    error += "没有找到【物料代码】的标题,";
                if (!tb2.Columns.Contains("规格型号"))
                    error += "没有找到【规格型号】的标题,";
                if (!tb2.Columns.Contains("助记码"))
                    error += "没有找到【助记码】的标题,";
                if (!tb2.Columns.Contains("版本号"))
                    error += "没有找到【版本号】的标题,";
                if (!tb2.Columns.Contains("物料属性"))
                    error += "没有找到【物料属性】的标题,";
                if (!tb2.Columns.Contains("计量单位组"))
                    error += "没有找到【计量单位组】的标题,";
                if (!tb2.Columns.Contains("计量单位代码"))
                    error += "没有找到【计量单位代码】的标题,";
                if (!tb2.Columns.Contains("计量单位"))
                    error += "没有找到【计量单位】的标题,";
                if (!tb2.Columns.Contains("辅助计量单位"))
                    error += "没有找到【辅助计量单位】的标题,";
                if (!tb2.Columns.Contains("换算率"))
                    error += "没有找到【换算率】的标题,";
                if (!tb2.Columns.Contains("默认仓库"))
                    error += "没有找到【默认仓库】的标题,";
                if (!tb2.Columns.Contains("最高库存"))
                    error += "没有找到【最高库存】的标题,";
                if (!tb2.Columns.Contains("最低库存"))
                    error += "没有找到【最低库存】的标题,";
                if (!tb2.Columns.Contains("安全库存"))
                    error += "没有找到【安全库存】的标题,";
                if (!tb2.Columns.Contains("采购单价"))
                    error += "没有找到【采购单价】的标题,";
                if (!tb2.Columns.Contains("销售单价"))
                    error += "没有找到【销售单价】的标题,";
                if (!tb2.Columns.Contains("计划单价"))
                    error += "没有找到【计划单价】的标题,";
                if (!tb2.Columns.Contains("标准成本"))
                    error += "没有找到【标准成本】的标题,";
                if (!tb2.Columns.Contains("保质期"))
                    error += "没有找到【保质期】的标题,";
                if (!tb2.Columns.Contains("最小订货量"))
                    error += "没有找到【最小订货量】的标题,";
                if (!tb2.Columns.Contains("最大订货量"))
                    error += "没有找到【最大订货量】的标题,";
                if (!tb2.Columns.Contains("英文名称"))
                    error += "没有找到【英文名称】的标题,";
                if (!tb2.Columns.Contains("英文规格"))
                    error += "没有找到【英文规格】的标题,";
                if (error.Length > 0)
                {
                    objJsonResult.code = CodeConstant.FAIL;
                    objJsonResult.count = CountConstant.FAIL;
                    objJsonResult.Message = $"Excel模板存在错误,{error}\r\n";
                    objJsonResult.data = null;
                    return objJsonResult;
                }
                for (int i = 0; i <= tb2.Rows.Count - 1; i++)
                {
                    string HMaterName = "";
                    string HMaterNumber = "";
                    string HORGNumber = "";
                    string HORGName = "";
                    string HMaterClsName = "";
                    string HUnitGroupName = "";
                    string HUnitNumber = "";
                    string HUnitName = "";
                    string HSecUnitName = "";
                    string HWhName = "";
                    HORGNumber = DBUtility.ClsPub.isStrNull(tb2.Rows[i]["组织代码"].ToString());
                    HORGName = DBUtility.ClsPub.isStrNull(tb2.Rows[i]["组织名称"].ToString());
                    HMaterNumber = DBUtility.ClsPub.isStrNull(tb2.Rows[i]["物料代码"].ToString());
                    HMaterName = DBUtility.ClsPub.isStrNull(tb2.Rows[i]["物料名称"].ToString());
                    HMaterClsName = DBUtility.ClsPub.isStrNull(tb2.Rows[i]["物料属性"].ToString());
                    HUnitGroupName = DBUtility.ClsPub.isStrNull(tb2.Rows[i]["计量单位组"].ToString());
                    HUnitNumber = DBUtility.ClsPub.isStrNull(tb2.Rows[i]["计量单位代码"].ToString());
                    HUnitName = DBUtility.ClsPub.isStrNull(tb2.Rows[i]["计量单位"].ToString());
                    HSecUnitName = DBUtility.ClsPub.isStrNull(tb2.Rows[i]["辅助计量单位"].ToString());
                    HWhName = DBUtility.ClsPub.isStrNull(tb2.Rows[i]["默认仓库"].ToString());
                    //检查物料
                    int index = i + 1;
                    if (HORGNumber != "")
                    {
                        //查询组织
                        ds = oCN.RunProcReturn("select * from Xt_ORGANIZATIONS where  HNumber='" + HORGNumber + "' and Hname='" + HORGName + "'", "Xt_ORGANIZATIONS");
                        if (ds.Tables[0].Rows.Count == 0)
                        {
                            objJsonResult.code = CodeConstant.FAIL;
                            objJsonResult.count = CountConstant.FAIL;
                            objJsonResult.Message = "第" + index + "行,组织不存在!";
                            objJsonResult.data = null;
                            return objJsonResult;
                        }
                        else
                        {
                            tb2.Rows[i]["HOrgID"] = ds.Tables[0].Rows[0]["HItemID"].ToString();
                        }
                        string HORGid = ds.Tables[0].Rows[0]["HItemID"].ToString();
                        //查询属性
                        if (HMaterClsName == "外购")
                        {
                            tb2.Rows[i]["HMaterClsID"] = 1;
                        }
                        else if(HMaterClsName == "自制")
                        {
                            tb2.Rows[i]["HMaterClsID"] = 2;
                        }
                        else if (HMaterClsName == "委外")
                        {
                            tb2.Rows[i]["HMaterClsID"] = 3;
                        }
                        else
                        {
                            objJsonResult.code = CodeConstant.FAIL;
                            objJsonResult.count = CountConstant.FAIL;
                            objJsonResult.Message = "第" + index + "行,物料属性不存在!";
                            objJsonResult.data = null;
                            return objJsonResult;
                        }
                        //查询计量单位组
                        ds = oCN.RunProcReturn("select * from Gy_UnitGroup where  HName='" + HUnitGroupName + "'", "Gy_UnitGroup");
                        if (ds.Tables[0].Rows.Count == 0 && HUnitGroupName != "")
                        {
                            objJsonResult.code = "0";
                            objJsonResult.count = 0;
                            objJsonResult.Message = "第" + index + "行,该" +  "计量单位组:" + HUnitGroupName + ",不存在!";
                            objJsonResult.data = null;
                            return objJsonResult;
                        }
                        else if (HMaterNumber == "")
                        {
                            tb2.Rows[i]["HUnitGroupID"] = 0;
                        }
                        else
                        {
                            tb2.Rows[i]["HUnitGroupID"] = ds.Tables[0].Rows[0]["HItemID"].ToString();
                        }
                        //查询单位
                        ds = oCN.RunProcReturn("select * from Gy_Unit where  HNumber='" + HUnitNumber + "'  and HUSEORGID=" + HORGid + "", "Gy_Unit");
                        if (ds.Tables[0].Rows.Count == 0)
                        {
                            objJsonResult.code = "0";
                            objJsonResult.count = 0;
                            objJsonResult.Message = "第" + index + "行,该" + HORGName + "组织,单位:" + HUnitName + ",不存在!";
                            objJsonResult.data = null;
                            return objJsonResult;
                        }
                        else
                        {
                            tb2.Rows[i]["HUnitID"] = ds.Tables[0].Rows[0]["HItemID"].ToString();
                        }
                        //查询辅助单位
                        ds = oCN.RunProcReturn("select * from Gy_Unit where  HName='" + HSecUnitName + "'  and HUSEORGID=" + HORGid + "", "Gy_Unit");
                        if (ds.Tables[0].Rows.Count == 0 && HSecUnitName != "")
                        {
                            objJsonResult.code = "0";
                            objJsonResult.count = 0;
                            objJsonResult.Message = "第" + index + "行,该" + HORGName + "组织,单位:" + HSecUnitName + ",不存在!";
                            objJsonResult.data = null;
                            return objJsonResult;
                        }else if (HSecUnitName == "")
                        {
                            tb2.Rows[i]["HSecUnitID"] = 0;
                        }
                        else
                        {
                            tb2.Rows[i]["HSecUnitID"] = ds.Tables[0].Rows[0]["HItemID"].ToString();
                        }
                        //查询仓库
                        ds = oCN.RunProcReturn("select * from Gy_Warehouse where  HName='" + HWhName + "'  and HUSEORGID=" + HORGid + "", "Gy_Warehouse");
                        if (ds.Tables[0].Rows.Count == 0)
                        {
                            objJsonResult.code = "0";
                            objJsonResult.count = 0;
                            objJsonResult.Message = "第" + index + "行,该" + HORGName + "组织,仓库:" + HWhName + ",不存在!";
                            objJsonResult.data = null;
                            return objJsonResult;
                        }
                        else
                        {
                            tb2.Rows[i]["HWHID"] = ds.Tables[0].Rows[0]["HItemID"].ToString();
                        }
                        //物料名称
                        if (HMaterName == "")
                        {
                            objJsonResult.code = CodeConstant.FAIL;
                            objJsonResult.count = CountConstant.FAIL;
                            objJsonResult.Message = "第" + index + "行,物料名称不能为空!";
                            objJsonResult.data = null;
                            return objJsonResult;
                        }
                        //物料代码
                        if (HMaterNumber == "")
                        {
                            objJsonResult.code = CodeConstant.FAIL;
                            objJsonResult.count = CountConstant.FAIL;
                            objJsonResult.Message = "第" + index + "行,物料编号不能为空!";
                            objJsonResult.data = null;
                            return objJsonResult;
                        }
                    }
                    else
                    {
                        objJsonResult.code = CodeConstant.FAIL;
                        objJsonResult.count = CountConstant.FAIL;
                        objJsonResult.Message = "第" + index + "行,组织代码为空";
                        objJsonResult.data = null;
                        return objJsonResult;
                    }
                }
                objJsonResult.code = CodeConstant.SUCCEED;
                objJsonResult.count = CountConstant.SUCCEED;
                objJsonResult.Message = error;
                objJsonResult.data = tb2;
                return objJsonResult;
            }
            catch (Exception e)
            {
                objJsonResult.code = CodeConstant.FAIL;
                objJsonResult.count = CountConstant.FAIL;
                objJsonResult.Message = "Exception!" + e.ToString();
                objJsonResult.data = null;
                return objJsonResult;
            }
        }
        #endregion
        #region ç‰©æ–™é¡¹ç›® å¯¼å…¥(保存)
        [Route("Gy_Material/Gy_Material_btnSave")]
        [HttpPost]
        public object Gy_Material_btnSave([FromBody] JObject sMainSub)
        {
            var _value = sMainSub["sMainSub"].ToString();
            string msg1 = _value.ToString();
            string[] sArray = msg1.Split(new string[] { "&和" }, StringSplitOptions.RemoveEmptyEntries);
            string msg2 = sArray[0].ToString();
            string user = sArray[1].ToString();
            try
            {
                if (!DBUtility.ClsPub.Security_Log("Gy_Material_Edit", 1, false, user))
                {
                    objJsonResult.code = CodeConstant.FAIL;
                    objJsonResult.count = CountConstant.FAIL;
                    objJsonResult.Message = "无保存权限!";
                    objJsonResult.data = null;
                    return objJsonResult;
                }
                List<object> Excel = Newtonsoft.Json.JsonConvert.DeserializeObject<List<object>>(msg2);
                List<Dictionary<string, string>> list = new List<Dictionary<string, string>>();
                foreach (JObject item in Excel)
                {
                    Dictionary<string, string> dic = new Dictionary<string, string>();
                    foreach (var itm in item.Properties())
                    {
                        dic.Add(itm.Name, itm.Value.ToString());
                    }
                    list.Add(dic);
                }
                oCN.BeginTran();
                int i = 1;
                foreach (Dictionary<string, string> item in list)
                {
                    DLL.ClsGy_Material_Ctl oBill = new DLL.ClsGy_Material_Ctl();
                    ClsGy_Material_Model oItem = new ClsGy_Material_Model();
                    //赋值前端传入的
                    oItem.HUSEORGID = int.Parse(item["HOrgID"].ToString());
                    oItem.HNumber = item["物料代码"].ToString();
                    oItem.HName = item["物料名称"].ToString();
                    oItem.HModel = item["规格型号"].ToString();
                    oItem.HHelpCode = item["助记码"].ToString();
                    oItem.HVersion = item["版本号"].ToString();
                    oItem.HMaterClsID = int.Parse(item["HMaterClsID"].ToString());
                    oItem.HUnitGroupID = int.Parse(item["HUnitGroupID"].ToString());
                    oItem.HUnitID = int.Parse(item["HUnitID"].ToString());
                    oItem.HSecUnitID = int.Parse(item["HSecUnitID"].ToString());
                    oItem.HSecUnitRate = double.Parse(item["换算率"].ToString()==""?"0": item["换算率"].ToString());
                    oItem.HWhID = int.Parse(item["HWhID"].ToString());
                    oItem.HHighStock = int.Parse(item["最高库存"].ToString() == "" ? "0" : item["最高库存"].ToString());
                    oItem.HLowStock = int.Parse(item["最低库存"].ToString() == "" ? "0" : item["最低库存"].ToString());
                    oItem.HSafeStock = int.Parse(item["安全库存"].ToString() == "" ? "0" : item["安全库存"].ToString());
                    oItem.HOrderPrice = int.Parse(item["采购单价"].ToString() == "" ? "0" : item["采购单价"].ToString());
                    oItem.HSalePrice = int.Parse(item["销售单价"].ToString() == "" ? "0" : item["销售单价"].ToString());
                    oItem.HPlanPrice = int.Parse(item["计划单价"].ToString() == "" ? "0" : item["计划单价"].ToString());
                    oItem.HstdPrice = int.Parse(item["标准成本"].ToString() == "" ? "0" : item["标准成本"].ToString());
                    oItem.HKeepDays = int.Parse(item["保质期"].ToString() == "" ? "0" : item["保质期"].ToString());
                    oItem.HQtyMin = int.Parse(item["最小订货量"].ToString() == "" ? "0" : item["最小订货量"].ToString());
                    oItem.HQtyMin = int.Parse(item["最大订货量"].ToString() == "" ? "0" : item["最大订货量"].ToString());
                    oItem.HEngName = item["英文名称"].ToString();
                    oItem.HEngModel = item["英文规格"].ToString();
                    //常规赋值
                    string sShortNumber;
                    sShortNumber = DBUtility.ClsPub.GetShortNumber(oItem.HNumber.Trim());
                    if (sShortNumber.Trim() == "")
                    {
                        objJsonResult.code = CodeConstant.FAIL;
                        objJsonResult.count = CountConstant.FAIL;
                        objJsonResult.Message = "保存失败!短代码为空!";
                        objJsonResult.data = 1;
                        return objJsonResult;
                    }
                    oItem.HShortNumber = sShortNumber;//短代码
                    oItem.HEndFlag = true;//末级标志
                    oItem.HLevel = DBUtility.ClsPub.GetLevel(oItem.HNumber.Trim()); //等级
                    oBill.oModel = oItem;
                    if (!DBUtility.ClsPub.AllowNumber(oItem.HNumber.Trim()))
                    {
                        objJsonResult.code = CodeConstant.FAIL;
                        objJsonResult.count = CountConstant.FAIL;
                        objJsonResult.Message = "保存失败!代码中不能出现连续‘.’并且首位末位不能为‘.’!";
                        objJsonResult.data = 1;
                        return objJsonResult;
                    }
                    ds = oCN.RunProcReturn("select * from  Gy_Material where  HNumber='" + oItem.HNumber.Trim() + "'", "Gy_Material");
                    if (ds.Tables[0].Rows.Count == 0)
                    {
                        oBill.AddNew();
                    }
                    else
                    {
                        int HItemID = int.Parse(ds.Tables[0].Rows[0]["HItemID"].ToString());
                        oBill.ModifyByID(HItemID);
                    }
                    i++;
                }
                oCN.Commit();
                objJsonResult.code = CodeConstant.SUCCEED;
                objJsonResult.count = CountConstant.SUCCEED;
                objJsonResult.Message = "导入成功!";
                objJsonResult.data = null;
                return objJsonResult;
            }
            catch (Exception e)
            {
                LogService.Write(e);
                objJsonResult.code = CodeConstant.FAIL;
                objJsonResult.count = CountConstant.FAIL;
                objJsonResult.Message = "Exception!" + e.ToString();
                objJsonResult.data = null;
                return objJsonResult;
            }
        }
        #endregion
        #endregion
        /// <summary>
        /// ç‰©æ–™è®¾ç½®åˆ é™¤åŠŸèƒ½
        /// </summary>
@@ -2710,5 +3159,589 @@
        }
        #endregion
        #region å™¨å…·æ¡£æ¡ˆ æ–‡ä»¶å¯¼å…¥ä¿å­˜
        #region å™¨å…·æ¡£æ¡ˆ æ–‡ä»¶ä¸Šä¼ 
        [Route("Gy_MouldFile/Gy_MouldFile_Excel")]
        [HttpPost]
        public object Gy_Mould_Excel()
        {
            try
            {
                //获取文件名称
                var file = HttpContext.Current.Request.Files[0];
                //获取文件物理路径
                string ExcelPath = HttpContext.Current.Server.MapPath("~/" + file.FileName);
                //保存文件
                file.SaveAs(ExcelPath);
                NpoiHelper np = new NpoiHelper();
                DataSet ExcelDs = np.ReadExcel(ExcelPath, 1, 1, "0");
                //删除文件
                File.Delete(ExcelPath);
                //创建临时表
                DataTable tb2 = new DataTable("dt2");
                //添加列名
                for (int i = 0; i < ExcelDs.Tables[0].Columns.Count; i++)
                {
                    tb2.Columns.Add(ExcelDs.Tables[0].Rows[0][i].ToString());
                }
                //模板缺少列 ä½†éœ€è¦ä»Žæ•°æ®åº“中查询出来显示在页面的字段
                tb2.Columns.Add("HOrgID", typeof(Int32));//组织ID
                tb2.Columns.Add("HMaterID", typeof(Int32));//物料ID
                tb2.Columns.Add("HMouldTypeID", typeof(Int32));//分类ID
                tb2.Columns.Add("HUnitID", typeof(Int32));//单位ID
                tb2.Columns.Add("HDeptID", typeof(Int32));//部门ID
                tb2.Columns.Add("HWHID", typeof(Int32));//仓库ID
                tb2.Columns.Add("HSupID", typeof(Int32));//供应商ID
                tb2.Columns.Add("HSPID", typeof(Int32));//仓位ID
                tb2.Columns.Add("HMadeSupID", typeof(Int32));//制造商ID
                //添加数据
                for (int i = 1; i < ExcelDs.Tables[0].Rows.Count; i++)
                {
                    DataRow row = tb2.NewRow();
                    for (int j = 0; j < ExcelDs.Tables[0].Columns.Count; j++)
                    {
                        row[j] = ExcelDs.Tables[0].Rows[i][j].ToString();
                    }
                    tb2.Rows.Add(row);
                }
                var error = "";
                //判断导入文件列是否完整
                if (!tb2.Columns.Contains("组织代码"))
                    error += "没有找到【组织代码】的标题,";
                if (!tb2.Columns.Contains("组织名称"))
                    error += "没有找到【组织名称】的标题,";
                if (!tb2.Columns.Contains("器具名称"))
                    error += "没有找到【器具名称】的标题,";
                if (!tb2.Columns.Contains("器具编号"))
                    error += "没有找到【器具编号】的标题,";
                if (!tb2.Columns.Contains("器具分类"))
                    error += "没有找到【器具分类】的标题,";
                if (!tb2.Columns.Contains("器具规格"))
                    error += "没有找到【器具规格】的标题,";
                if (!tb2.Columns.Contains("器具型号"))
                    error += "没有找到【器具型号】的标题,";
                if (!tb2.Columns.Contains("穴数"))
                    error += "没有找到【穴数】的标题,";
                if (!tb2.Columns.Contains("辅助属性1"))
                    error += "没有找到【辅助属性1】的标题,";
                if (!tb2.Columns.Contains("辅助属性2"))
                    error += "没有找到【辅助属性2】的标题,";
                if (!tb2.Columns.Contains("图号"))
                    error += "没有找到【图号】的标题,";
                if (!tb2.Columns.Contains("对应ERP物料代码"))
                    error += "没有找到【对应ERP物料代码】的标题,";
                if (!tb2.Columns.Contains("对应ERP物料"))
                    error += "没有找到【对应ERP物料】的标题,";
                if (!tb2.Columns.Contains("计量单位"))
                    error += "没有找到【计量单位】的标题,";
                if (!tb2.Columns.Contains("器具出厂编号"))
                    error += "没有找到【器具出厂编号】的标题,";
                if (!tb2.Columns.Contains("使用部门"))
                    error += "没有找到【使用部门】的标题,";
                if (!tb2.Columns.Contains("状态"))
                    error += "没有找到【状态】的标题,";
                if (!tb2.Columns.Contains("默认仓库"))
                    error += "没有找到【默认仓库】的标题,";
                if (!tb2.Columns.Contains("默认仓位"))
                    error += "没有找到【默认仓位】的标题,";
                if (!tb2.Columns.Contains("版本号"))
                    error += "没有找到【版本号】的标题,";
                if (!tb2.Columns.Contains("设计寿命"))
                    error += "没有找到【设计寿命】的标题,";
                if (!tb2.Columns.Contains("使用寿命"))
                    error += "没有找到【使用寿命】的标题,";
                if (!tb2.Columns.Contains("条形码"))
                    error += "没有找到【条形码】的标题,";
                if (!tb2.Columns.Contains("供应商代码"))
                    error += "没有找到【供应商代码】的标题,";
                if (!tb2.Columns.Contains("供应商"))
                    error += "没有找到【供应商】的标题,";
                if (!tb2.Columns.Contains("制造商"))
                    error += "没有找到【制造商】的标题,";
                if (!tb2.Columns.Contains("备注"))
                    error += "没有找到【备注】的标题,";
                if (error.Length > 0)
                {
                    objJsonResult.code = CodeConstant.FAIL;
                    objJsonResult.count = CountConstant.FAIL;
                    objJsonResult.Message = $"Excel模板存在错误,{error}\r\n";
                    objJsonResult.data = null;
                    return objJsonResult;
                }
                for (int i = 0; i <= tb2.Rows.Count - 1; i++)
                {
                    string HMouldName = "";
                    string HMouldNum = "";
                    string HORGNumber = "";
                    string HORGName = "";
                    string HMaterNumber = "";
                    string HMaterName = "";
                    string HUnitName = "";
                    string HDeptName = "";
                    string HWHName = "";
                    string HSPName = "";
                    string HSupName = "";
                    string HSupNumber = "";
                    string HMadeSupName = "";
                    string HMouldTypeName = "";
                    HMouldName = DBUtility.ClsPub.isStrNull(tb2.Rows[i]["器具名称"].ToString());
                    HMouldNum = DBUtility.ClsPub.isStrNull(tb2.Rows[i]["器具编号"].ToString());
                    HORGNumber = DBUtility.ClsPub.isStrNull(tb2.Rows[i]["组织代码"].ToString());
                    HORGName = DBUtility.ClsPub.isStrNull(tb2.Rows[i]["组织名称"].ToString());
                    HMaterNumber = DBUtility.ClsPub.isStrNull(tb2.Rows[i]["对应ERP物料代码"].ToString());
                    HMaterName = DBUtility.ClsPub.isStrNull(tb2.Rows[i]["对应ERP物料"].ToString());
                    HUnitName = DBUtility.ClsPub.isStrNull(tb2.Rows[i]["计量单位"].ToString());
                    HDeptName = DBUtility.ClsPub.isStrNull(tb2.Rows[i]["使用部门"].ToString());
                    HWHName = DBUtility.ClsPub.isStrNull(tb2.Rows[i]["默认仓库"].ToString());
                    HSPName = DBUtility.ClsPub.isStrNull(tb2.Rows[i]["默认仓位"].ToString());
                    HSupName = DBUtility.ClsPub.isStrNull(tb2.Rows[i]["供应商"].ToString());
                    HSupNumber = DBUtility.ClsPub.isStrNull(tb2.Rows[i]["供应商代码"].ToString());
                    HMadeSupName = DBUtility.ClsPub.isStrNull(tb2.Rows[i]["制造商"].ToString());
                    HMouldTypeName = DBUtility.ClsPub.isStrNull(tb2.Rows[i]["器具分类"].ToString());
                    //检查物料
                    int index = i + 1;
                    if (HORGNumber != "")
                    {
                        //查询组织
                        ds = oCN.RunProcReturn("select * from Xt_ORGANIZATIONS where  HNumber='" + HORGNumber + "' and Hname='" + HORGName + "'", "Xt_ORGANIZATIONS");
                        if (ds.Tables[0].Rows.Count == 0)
                        {
                            objJsonResult.code = CodeConstant.FAIL;
                            objJsonResult.count = CountConstant.FAIL;
                            objJsonResult.Message = "第" + index + "行,组织不存在!";
                            objJsonResult.data = null;
                            return objJsonResult;
                        }
                        else
                        {
                            tb2.Rows[i]["HOrgID"] = ds.Tables[0].Rows[0]["HItemID"].ToString();
                        }
                        string HORGid = ds.Tables[0].Rows[0]["HItemID"].ToString();
                        //查询分类
                        ds = oCN.RunProcReturn("select * from Gy_MouldType where  HName='" + HMouldTypeName + "' ", "Gy_MouldType");
                        if (ds.Tables[0].Rows.Count == 0)
                        {
                            objJsonResult.code = "0";
                            objJsonResult.count = 0;
                            objJsonResult.Message = "第" + index + "行,分类:" + HMouldTypeName + ",不存在!";
                            objJsonResult.data = null;
                            return objJsonResult;
                        }
                        else
                        {
                            tb2.Rows[i]["HMouldTypeID"] = ds.Tables[0].Rows[0]["HItemID"].ToString();
                        }
                        //查询物料
                        ds = oCN.RunProcReturn("select * from Gy_Material where  HNumber='" + HMaterNumber + "'  and HUSEORGID=" + HORGid + "", "Gy_Department");
                        if (ds.Tables[0].Rows.Count == 0 && HMaterNumber != "")
                        {
                            objJsonResult.code = "0";
                            objJsonResult.count = 0;
                            objJsonResult.Message = "第" + index + "行,该" + HORGName + "组织,物料:" + HMaterName + ",不存在!";
                            objJsonResult.data = null;
                            return objJsonResult;
                        }
                        else if (HMaterNumber == "")
                        {
                            tb2.Rows[i]["HMaterID"] = 0;
                        }
                        else
                        {
                            tb2.Rows[i]["HMaterID"] = ds.Tables[0].Rows[0]["HItemID"].ToString();
                        }
                        //查询单位
                        ds = oCN.RunProcReturn("select * from Gy_Unit where  HName='" + HUnitName + "'  and HUSEORGID=" + HORGid + "", "Gy_Unit");
                        if (ds.Tables[0].Rows.Count == 0)
                        {
                            objJsonResult.code = "0";
                            objJsonResult.count = 0;
                            objJsonResult.Message = "第" + index + "行,该" + HORGName + "组织,单位:" + HUnitName + ",不存在!";
                            objJsonResult.data = null;
                            return objJsonResult;
                        }
                        else
                        {
                            tb2.Rows[i]["HUnitID"] = ds.Tables[0].Rows[0]["HItemID"].ToString();
                        }
                        //查询部门
                        ds = oCN.RunProcReturn("select * from Gy_Department where  HName='" + HDeptName + "'  and HUSEORGID=" + HORGid + "", "Gy_Department");
                        if (ds.Tables[0].Rows.Count == 0)
                        {
                            objJsonResult.code = "0";
                            objJsonResult.count = 0;
                            objJsonResult.Message = "第" + index + "行,该" + HORGName + "组织,部门:" + HDeptName + ",不存在!";
                            objJsonResult.data = null;
                            return objJsonResult;
                        }
                        else
                        {
                            tb2.Rows[i]["HDeptID"] = ds.Tables[0].Rows[0]["HItemID"].ToString();
                        }
                        //查询仓库
                        ds = oCN.RunProcReturn("select * from Gy_Warehouse where  HName='" + HWHName + "'  and HUSEORGID=" + HORGid + "", "Gy_Warehouse");
                        if (ds.Tables[0].Rows.Count == 0)
                        {
                            objJsonResult.code = "0";
                            objJsonResult.count = 0;
                            objJsonResult.Message = "第" + index + "行,该" + HORGName + "组织,仓库:" + HWHName + ",不存在!";
                            objJsonResult.data = null;
                            return objJsonResult;
                        }
                        else
                        {
                            tb2.Rows[i]["HWHID"] = ds.Tables[0].Rows[0]["HItemID"].ToString();
                        }
                        string HWHID = tb2.Rows[i]["HWHID"].ToString();
                        //查询仓位
                        ds = oCN.RunProcReturn("select * from Gy_StockPlace where  HName='" + HSPName + "'and HSPGroupID=" + HWHID+ "  and HUSEORGID=" + HORGid + "", "Gy_Warehouse");
                        if (ds.Tables[0].Rows.Count == 0)
                        {
                            objJsonResult.code = "0";
                            objJsonResult.count = 0;
                            objJsonResult.Message = "第" + index + "行,该" + HORGName + "组织,仓位:" + HSPName + ",不存在!";
                            objJsonResult.data = null;
                            return objJsonResult;
                        }
                        else
                        {
                            tb2.Rows[i]["HSPID"] = ds.Tables[0].Rows[0]["HItemID"].ToString();
                        }
                        //查询供应商
                        ds = oCN.RunProcReturn("select * from Gy_Supplier where  HNumber='" + HSupNumber + "'  and HUSEORGID=" + HORGid + "", "Gy_Supplier");
                        if (ds.Tables[0].Rows.Count == 0)
                        {
                            objJsonResult.code = "0";
                            objJsonResult.count = 0;
                            objJsonResult.Message = "第" + index + "行,该" + HORGName + "组织,供应商:" + HSupName + ",不存在!";
                            objJsonResult.data = null;
                            return objJsonResult;
                        }
                        else
                        {
                            tb2.Rows[i]["HSupID"] = ds.Tables[0].Rows[0]["HItemID"].ToString();
                        }
                        //查询制造商
                        ds = oCN.RunProcReturn("select * from Gy_Supplier where  HName='" + HMadeSupName + "'  and HUSEORGID=" + HORGid + "", "Gy_Supplier");
                        if (ds.Tables[0].Rows.Count == 0)
                        {
                            objJsonResult.code = "0";
                            objJsonResult.count = 0;
                            objJsonResult.Message = "第" + index + "行,该" + HORGName + "组织,制造商:" + HMadeSupName + ",不存在!";
                            objJsonResult.data = null;
                            return objJsonResult;
                        }
                        else
                        {
                            tb2.Rows[i]["HMadeSupID"] = ds.Tables[0].Rows[0]["HItemID"].ToString();
                        }
                        //器具档案名称
                        if (HMouldName == "")
                        {
                            objJsonResult.code = CodeConstant.FAIL;
                            objJsonResult.count = CountConstant.FAIL;
                            objJsonResult.Message = "第" + index + "行,器具档案名称不能为空!";
                            objJsonResult.data = null;
                            return objJsonResult;
                        }
                        //器具档案代码
                        if (HMouldNum == "")
                        {
                            objJsonResult.code = CodeConstant.FAIL;
                            objJsonResult.count = CountConstant.FAIL;
                            objJsonResult.Message = "第" + index + "行,器具档案代码不能为空!";
                            objJsonResult.data = null;
                            return objJsonResult;
                        }
                    }
                    else
                    {
                        objJsonResult.code = CodeConstant.FAIL;
                        objJsonResult.count = CountConstant.FAIL;
                        objJsonResult.Message = "第" + index + "行,组织代码为空";
                        objJsonResult.data = null;
                        return objJsonResult;
                    }
                }
                objJsonResult.code = CodeConstant.SUCCEED;
                objJsonResult.count = CountConstant.SUCCEED;
                objJsonResult.Message = error;
                objJsonResult.data = tb2;
                return objJsonResult;
            }
            catch (Exception e)
            {
                objJsonResult.code = CodeConstant.FAIL;
                objJsonResult.count = CountConstant.FAIL;
                objJsonResult.Message = "Exception!" + e.ToString();
                objJsonResult.data = null;
                return objJsonResult;
            }
        }
        #endregion
        #region å™¨å…·æ¡£æ¡ˆé¡¹ç›® å¯¼å…¥(保存)
        [Route("Gy_MouldFile/Gy_MouldFile_btnSave")]
        [HttpPost]
        public object Gy_Mould_btnSave([FromBody] JObject sMainSub)
        {
            var _value = sMainSub["sMainSub"].ToString();
            string msg1 = _value.ToString();
            string[] sArray = msg1.Split(new string[] { "&和" }, StringSplitOptions.RemoveEmptyEntries);
            string msg2 = sArray[0].ToString();
            string user = sArray[1].ToString();
            try
            {
                if (!DBUtility.ClsPub.Security_Log("Gy_MouldFile_Edit", 1, false, user))
                {
                    objJsonResult.code = CodeConstant.FAIL;
                    objJsonResult.count = CountConstant.FAIL;
                    objJsonResult.Message = "无保存权限!";
                    objJsonResult.data = null;
                    return objJsonResult;
                }
                List<object> Excel = Newtonsoft.Json.JsonConvert.DeserializeObject<List<object>>(msg2);
                List<Dictionary<string, string>> list = new List<Dictionary<string, string>>();
                foreach (JObject item in Excel)
                {
                    Dictionary<string, string> dic = new Dictionary<string, string>();
                    foreach (var itm in item.Properties())
                    {
                        dic.Add(itm.Name, itm.Value.ToString());
                    }
                    list.Add(dic);
                }
                oCN.BeginTran();
                int i = 1;
                foreach (Dictionary<string, string> item in list)
                {
                    string HOrgID = item["HOrgID"].ToString();//组织ID
                    string BillType = "3899";
                    //得到mainid
                    long HInterID = DBUtility.ClsPub.CreateBillID(BillType, ref DBUtility.ClsPub.sExeReturnInfo);
                    string HBillNo = DBUtility.ClsPub.CreateBillCode(BillType, ref DBUtility.ClsPub.sExeReturnInfo, true); ;//递入type得到的单据号
                    DateTime HDate = DateTime.Now;//日期
                    int HYear = DBUtility.ClsPub.isInt(DateTime.Now.Year);
                    double HPeriod = DBUtility.ClsPub.isLong(DateTime.Now.Month);
                    string HMouldNo = item["器具编号"].ToString();
                    string HBarCode = item["条形码"].ToString();
                    string HName = item["器具名称"].ToString();
                    string HModel = item["器具规格"].ToString();
                    string HModel2 = item["器具型号"].ToString();
                    string HDiameter = "";//直径
                    string HSubjoin = item["辅助属性1"].ToString();
                    string HSubjoin2 = item["辅助属性2"].ToString();
                    string HPICNo = item["图号"].ToString();
                    string HWorkMaterModel = "";//生产产品型号
                    long HMaterID = int.Parse(item["HMaterID"].ToString());
                    long HMouleTypeID = int.Parse(item["HMouldTypeID"].ToString());
                    long HUnitID = int.Parse(item["HUnitID"].ToString());
                    DateTime HOutComDate = DateTime.Now;
                    string HOutComNo = item["器具出厂编号"].ToString();
                    long HDeptID = int.Parse(item["HDeptID"].ToString());
                    long HSupID = int.Parse(item["HSupID"].ToString());
                    string HMouldStatus = item["状态"].ToString();
                    long HWHID = int.Parse(item["HWHID"].ToString());
                    long HRoutingID = 0;//工艺路线id
                    long HBOMID = 0;
                    string HVersion = "";//版本
                    long HSPGroupID = 0;//默认仓位组
                    long HSPID = int.Parse(item["HSPID"].ToString());//仓位id
                    Double HDesignLife = item["设计寿命"].ToString()=="" ? 0: double.Parse(item["设计寿命"].ToString());
                    Double HUseLife = item["使用寿命"].ToString() == "" ? 0 : double.Parse(item["使用寿命"].ToString());
                    Double HInitLife = 0;//上线初始化寿命
                    Double HLeaveLife = 0;//剩余寿命
                    Double HProdQty = 0;//已生产数量
                    Double HProdWeight = 0;//已生产重量
                    string HRemark = item["备注"].ToString();
                    string HMaker = user;
                    string HMaterNumber = item["对应ERP物料代码"].ToString();
                    string HSupNumber = item["供应商代码"].ToString();
                    long HPrintQty = 0;//已生产数量
                    string HMouldOWNER = "自费";//货主类型
                    string HSaveLife = "";//安全寿命
                    int HCaveQty = item["穴数"].ToString() == "" ? 0 : int.Parse(item["穴数"].ToString());
                    int HMouldDotCheckRuleInterID = 0;
                    int HMouldMaintainRuleInterID = 0;
                    int HNowSupID = 0;//虚拟仓
                    int HNowSupTypeID = 0;
                    int HMadeSupID = 0;
                    string HMouldClass = "模具";//器具类型
                    int HNowWHID = 0;
                    int HNowSPID = 0;
                    if (!DBUtility.ClsPub.AllowNumber(HMouldNo.Trim()))
                    {
                        objJsonResult.code = CodeConstant.FAIL;
                        objJsonResult.count = CountConstant.FAIL;
                        objJsonResult.Message = "保存失败!代码中不能出现连续‘.’并且首位末位不能为‘.’!";
                        objJsonResult.data = 1;
                        return objJsonResult;
                    }
                    ds = oCN.RunProcReturn("select * from Gy_MouldFileMain where HMouldNo='" + HMouldNo + "'", "Gy_MouldFileMain");
                    if (ds.Tables[0].Rows.Count == 0)
                    {
                        oCN.RunProc("Insert Into Gy_MouldFileMain   " +
                        "(HBillType,HBillSubType,HInterID,HBillNo,HDate" +
                        ",HYear,HPeriod,HRemark,HMaker,HMakeDate" +
                        ",HMouldNo,HName,HModel,HModel2,HDiameter" +
                        ",HSubjoin,HSubjoin2,HPICNo,HWorkMaterModel" +
                        ",HMaterID,HMaterNumber,HMouldType,HUnitID" +
                        ",HOutComDate,HOutComNo,HDeptID,HSupID,HSupNumber" +
                        ",HPrintQty,HMouldStatus,HWhID,HRoutingID,HCaveQty" +
                        ",HBomID,HVersion,HSPGroupID,HSPID,HDesignLife,HNowSupID,HNowSupTypeID" +
                        ",HUseLife,HLeaveLife,HProdQty,HProdWeight,HMouldOWNER,HSaveLife,HMouldDotCheckRuleInterID,HMouldMaintainRuleInterID,HBarCode,HMadeSupID" +
                        ",HMouldClass,HNowWHID,HNowSPID,HInitLife) " +
                        " values('" + BillType + "','" + BillType + "'," + HInterID + ",'" + HBillNo + "','" + HDate + "'" +
                        "," + HYear + "," + HPeriod + ",'" + HRemark + "','" + HMaker + "',getdate()" +
                        ",'" + HMouldNo + "','" + HName + "','" + HModel + "','" + HModel2 + "','" + HDiameter + "'" +
                        ",'" + HSubjoin + "','" + HSubjoin2 + "','" + HPICNo + "','" + HWorkMaterModel + "'" +
                        "," + HMaterID + ",'" + HMaterNumber + "'," + HMouleTypeID + "," + HUnitID +
                        ",'" + HOutComDate + "','" + HOutComNo + "'," + HDeptID + "," + HSupID + ",'" + HSupNumber + "'" +
                        "," + HPrintQty + ",'" + HMouldStatus + "'," + HWHID + "," + HRoutingID + "," + HCaveQty +
                        "," + HBOMID + ",'" + HVersion + "'," + HSPGroupID + "," + HSPID + ",'" + HDesignLife + "','" + HNowSupID + "','" + HNowSupTypeID + "'" +
                        ",'" + HUseLife + "','" + HLeaveLife + "','" + HProdQty + "','" + HProdWeight + "','" + HMouldOWNER + "','" + HSaveLife + "','" + HMouldDotCheckRuleInterID + "','" + HMouldMaintainRuleInterID + "','" + HBarCode + "'," + HMadeSupID +
                        ",'" + HMouldClass + "'," + HNowWHID + "," + HNowSPID + ",'" + HInitLife + "') ");
                    }
                    else
                    {
                        oCN.RunProc("UpDate Gy_MouldFileMain set  " +
                //" HBillNo='" + HBillNo + "'" +  //固定赋值===============
                //",HDate='" + HDate + "'" +
                //",HYear='" + HYear.ToString() + "'" +
                //",HPeriod='" + HPeriod.ToString() + "'" +
                "HRemark='" + HRemark + "'" +
                ",HUpDater='" + user + "'" +
                ",HUpDateDate=getdate()" +
                //========================================
                //",HMouldNo='" + HMouldNo + "'" +
                ",HName='" + HName + "'" +
                ",HModel='" + HModel + "'" +
                ",HModel2='" + HModel2 + "'" +
                ",HDiameter='" + HDiameter + "'" +
                ",HSubjoin='" + HSubjoin + "'" +
                ",HSubjoin2='" + HSubjoin2 + "'" +
                ",HPICNo='" + HPICNo + "'" +
                ",HWorkMaterModel='" + HWorkMaterModel + "'" +
                ",HMaterID=" + HMaterID.ToString() +
                ",HMaterNumber='" + HMaterNumber + "'" +
                ",HMouldClass='" + HMouldClass + "'" +
                ",HMouldType=" + HMouleTypeID.ToString() +
                ",HUnitID=" + HUnitID.ToString() +
                ",HOutComDate='" + HOutComDate + "'" +
                ",HOutComNo='" + HOutComNo + "'" +
                ",HDeptID=" + HDeptID.ToString() +
                ",HSupID=" + HSupID.ToString() +
                ",HSupNumber='" + HSupNumber + "'" +
                ",HPrintQty=" + HPrintQty.ToString() +
                ",HMouldStatus='" + HMouldStatus + "'" +
                ",HSaveLife='" + HSaveLife + "'" +
                ",HWhID=" + HWHID.ToString() +
                ",HRoutingID=" + HRoutingID.ToString() +
                ",HBomID=" + HBOMID.ToString() +
                ",HVersion='" + HVersion + "'" +
                ",HSPGroupID=" + HSPGroupID.ToString() +
                ",HSPID=" + HSPID.ToString() +
                ",HDesignLife=" + HDesignLife.ToString() +
                ",HCaveQty=" + HCaveQty.ToString() +
                ",HUseLife=" + HUseLife.ToString() +
                ",HLeaveLife=" + HLeaveLife.ToString() +
                ",HProdQty=" + HProdQty.ToString() +
                ",HMouldDotCheckRuleInterID=" + HMouldDotCheckRuleInterID.ToString() +
                ",HMouldMaintainRuleInterID=" + HMouldMaintainRuleInterID.ToString() +
                ",HMouldOWNER='" + HMouldOWNER + "'" +
                ",HNowSupID=" + HNowSupID.ToString() +
                ",HNowSupTypeID=" + HNowSupTypeID.ToString() +
                ",HProdWeight=" + HProdWeight.ToString() +
                ",HBarCode='" + HBarCode.ToString() + "'" +
                ",HMadeSupID=" + HMadeSupID +
                ",HNowWHID=" + HNowWHID +
                ",HNowSPID=" + HNowSPID +
                ",HInitLife='" + HInitLife +
                "' where HMouldNo='" + HMouldNo.ToString()+"'");
                    }
                    i++;
                }
                oCN.Commit();
                objJsonResult.code = CodeConstant.SUCCEED;
                objJsonResult.count = CountConstant.SUCCEED;
                objJsonResult.Message = "导入成功!";
                objJsonResult.data = null;
                return objJsonResult;
            }
            catch (Exception e)
            {
                LogService.Write(e);
                objJsonResult.code = CodeConstant.FAIL;
                objJsonResult.count = CountConstant.FAIL;
                objJsonResult.Message = "Exception!" + e.ToString();
                objJsonResult.data = null;
                return objJsonResult;
            }
        }
        #endregion
        #endregion
    }
}
WebAPI/Controllers/BaseSet/Gy_ModelTypeController.cs
@@ -9,7 +9,10 @@
using System.Net.Http;
using System.Web.Http;
using WebAPI.Models;
using System.Web;
using WebAPI.Controllers.SCGL.日计划管理;
using System.IO;
using SyntacticSugar.constant;
namespace WebAPI.Controllers.BaseSet
{
    public class Gy_ModelTypeController : ApiController
@@ -553,5 +556,265 @@
        }
        #endregion
        #region å™¨å…·åˆ†ç±» æ–‡ä»¶å¯¼å…¥ä¿å­˜
        #region å™¨å…·åˆ†ç±» æ–‡ä»¶ä¸Šä¼ 
        [Route("Gy_MouldType/Gy_MouldType_Excel")]
        [HttpPost]
        public object Gy_MouldType_Excel()
        {
            try
            {
                //获取文件名称
                var file = HttpContext.Current.Request.Files[0];
                //获取文件物理路径
                string ExcelPath = HttpContext.Current.Server.MapPath("~/" + file.FileName);
                //保存文件
                file.SaveAs(ExcelPath);
                NpoiHelper np = new NpoiHelper();
                DataSet ExcelDs = np.ReadExcel(ExcelPath, 1, 1, "0");
                //删除文件
                File.Delete(ExcelPath);
                //创建临时表
                DataTable tb2 = new DataTable("dt2");
                //添加列名
                for (int i = 0; i < ExcelDs.Tables[0].Columns.Count; i++)
                {
                    tb2.Columns.Add(ExcelDs.Tables[0].Rows[0][i].ToString());
                }
                //模板缺少列 ä½†éœ€è¦ä»Žæ•°æ®åº“中查询出来显示在页面的字段
                tb2.Columns.Add("HOrgID", typeof(Int32));//组织ID
                //添加数据
                for (int i = 1; i < ExcelDs.Tables[0].Rows.Count; i++)
                {
                    DataRow row = tb2.NewRow();
                    for (int j = 0; j < ExcelDs.Tables[0].Columns.Count; j++)
                    {
                        row[j] = ExcelDs.Tables[0].Rows[i][j].ToString();
                    }
                    tb2.Rows.Add(row);
                }
                var error = "";
                //查询没有的列
                if (!tb2.Columns.Contains("组织代码"))
                    error += "没有找到【组织代码】的标题,";
                if (!tb2.Columns.Contains("组织名称"))
                    error += "没有找到【组织名称】的标题,";
                if (!tb2.Columns.Contains("器具分类"))
                    error += "没有找到【器具分类名称】的标题,";
                if (!tb2.Columns.Contains("器具分类代码"))
                    error += "没有找到【器具分类代码】的标题,";
                if (!tb2.Columns.Contains("备注"))
                    error += "没有找到【备注】的标题,";
                if (!tb2.Columns.Contains("助记码"))
                    error += "没有找到【助记码】的标题,";
                if (error.Length > 0)
                {
                    objJsonResult.code = CodeConstant.FAIL;
                    objJsonResult.count = CountConstant.FAIL;
                    objJsonResult.Message = $"Excel模板存在错误,{error}\r\n";
                    objJsonResult.data = null;
                    return objJsonResult;
                }
                for (int i = 0; i <= tb2.Rows.Count - 1; i++)
                {
                    string HProcessName = "";
                    string HProcessNum = "";
                    string HORGNumber = "";
                    string HORGName = "";
                    HProcessName = DBUtility.ClsPub.isStrNull(tb2.Rows[i]["器具分类"].ToString());
                    HProcessNum = DBUtility.ClsPub.isStrNull(tb2.Rows[i]["器具分类代码"].ToString());
                    HORGNumber = DBUtility.ClsPub.isStrNull(tb2.Rows[i]["组织代码"].ToString());
                    HORGName = DBUtility.ClsPub.isStrNull(tb2.Rows[i]["组织名称"].ToString());
                    //检查物料
                    int index = i + 1;
                    if (HORGNumber != "")
                    {
                        //查询组织
                        ds = oCN.RunProcReturn("select * from Xt_ORGANIZATIONS where  HNumber='" + HORGNumber + "' and Hname='" + HORGName + "'", "Xt_ORGANIZATIONS");
                        if (ds.Tables[0].Rows.Count == 0)
                        {
                            objJsonResult.code = CodeConstant.FAIL;
                            objJsonResult.count = CountConstant.FAIL;
                            objJsonResult.Message = "第" + index + "行,组织不存在!";
                            objJsonResult.data = null;
                            return objJsonResult;
                        }
                        else
                        {
                            tb2.Rows[i]["HOrgID"] = ds.Tables[0].Rows[0]["HItemID"].ToString();
                        }
                        string HORGid = ds.Tables[0].Rows[0]["HItemID"].ToString();
                        //器具分类名称
                        if (HProcessName == "")
                        {
                            objJsonResult.code = CodeConstant.FAIL;
                            objJsonResult.count = CountConstant.FAIL;
                            objJsonResult.Message = "第" + index + "行,器具分类名称不能为空!";
                            objJsonResult.data = null;
                            return objJsonResult;
                        }
                        //器具分类代码
                        if (HProcessNum == "")
                        {
                            objJsonResult.code = CodeConstant.FAIL;
                            objJsonResult.count = CountConstant.FAIL;
                            objJsonResult.Message = "第" + index + "行,器具分类代码不能为空!";
                            objJsonResult.data = null;
                            return objJsonResult;
                        }
                    }
                    else
                    {
                        objJsonResult.code = CodeConstant.FAIL;
                        objJsonResult.count = CountConstant.FAIL;
                        objJsonResult.Message = "第" + index + "行,组织代码为空";
                        objJsonResult.data = null;
                        return objJsonResult;
                    }
                }
                objJsonResult.code = CodeConstant.SUCCEED;
                objJsonResult.count = CountConstant.SUCCEED;
                objJsonResult.Message = error;
                objJsonResult.data = tb2;
                return objJsonResult;
            }
            catch (Exception e)
            {
                objJsonResult.code = CodeConstant.FAIL;
                objJsonResult.count = CountConstant.FAIL;
                objJsonResult.Message = "Exception!" + e.ToString();
                objJsonResult.data = null;
                return objJsonResult;
            }
        }
        #endregion
        #region å™¨å…·åˆ†ç±»é¡¹ç›® å¯¼å…¥(保存)
        [Route("Gy_MouldType/Gy_MouldType_btnSave")]
        [HttpPost]
        public object Gy_MouldType_btnSave([FromBody] JObject sMainSub)
        {
            var _value = sMainSub["sMainSub"].ToString();
            string msg1 = _value.ToString();
            string[] sArray = msg1.Split(new string[] { "&和" }, StringSplitOptions.RemoveEmptyEntries);
            string msg2 = sArray[0].ToString();
            string user = sArray[1].ToString();
            try
            {
                if (!DBUtility.ClsPub.Security_Log("Gy_ErrType_Edit", 1, false, user))
                {
                    objJsonResult.code = CodeConstant.FAIL;
                    objJsonResult.count = CountConstant.FAIL;
                    objJsonResult.Message = "无保存权限!";
                    objJsonResult.data = null;
                    return objJsonResult;
                }
                List<object> Excel = Newtonsoft.Json.JsonConvert.DeserializeObject<List<object>>(msg2);
                List<Dictionary<string, string>> list = new List<Dictionary<string, string>>();
                foreach (JObject item in Excel)
                {
                    Dictionary<string, string> dic = new Dictionary<string, string>();
                    foreach (var itm in item.Properties())
                    {
                        dic.Add(itm.Name, itm.Value.ToString());
                    }
                    list.Add(dic);
                }
                oCN.BeginTran();
                int i = 1;
                foreach (Dictionary<string, string> item in list)
                {
                    string HOrgID = item["HOrgID"].ToString();//组织ID
                    string HName = item["器具分类"].ToString();
                    string HNumber = item["器具分类代码"].ToString();
                    string HRemark = item["备注"].ToString();
                    string HHelpCode = item["助记码"].ToString();
                    string sShortNumber;
                    sShortNumber = DBUtility.ClsPub.GetShortNumber(HNumber);//短代码
                    if (sShortNumber.Trim() == "")
                    {
                        objJsonResult.code = CodeConstant.FAIL;
                        objJsonResult.count = CountConstant.FAIL;
                        objJsonResult.Message = "保存失败!短代码为空!";
                        objJsonResult.data = 1;
                        return objJsonResult;
                    }
                    int HEndFlag = 1;//末级标志
                    int HLevel = DBUtility.ClsPub.GetLevel(HNumber); //等级
                    if (!DBUtility.ClsPub.AllowNumber(HNumber.Trim()))
                    {
                        objJsonResult.code = CodeConstant.FAIL;
                        objJsonResult.count = CountConstant.FAIL;
                        objJsonResult.Message = "保存失败!代码中不能出现连续‘.’并且首位末位不能为‘.’!";
                        objJsonResult.data = 1;
                        return objJsonResult;
                    }
                    ds = oCN.RunProcReturn("select * from Gy_MouldType where HNumber='" + HNumber + "'", "Gy_MouldType");
                    if (ds.Tables[0].Rows.Count == 0)
                    {
                        oCN.RunProc("Insert into Gy_MouldType " +
                    " (HNumber,HName,HHelpCode,HShortNumber,HParentID" +
                    ",HLevel,HEndFlag,HStopflag,HRemark,HMakeTime) " +
                    " Values('" + HNumber + "','" + HName + "','" + HHelpCode + "','" + sShortNumber + "'," + 0 +
                        "," + HLevel + "," + HEndFlag + "," + 0 + ",'" + HRemark + "',getdate())");
                    }
                    else
                    {
                        oCN.RunProc("update  Gy_MouldType set HUSEORGID=" + HOrgID + ",HHelpCode = '"+ HHelpCode + "',HRemark='" + HRemark + "'  where HNumber='" + HNumber + "'");
                    }
                    i++;
                }
                oCN.Commit();
                objJsonResult.code = CodeConstant.SUCCEED;
                objJsonResult.count = CountConstant.SUCCEED;
                objJsonResult.Message = "导入成功!";
                objJsonResult.data = null;
                return objJsonResult;
            }
            catch (Exception e)
            {
                LogService.Write(e);
                objJsonResult.code = CodeConstant.FAIL;
                objJsonResult.count = CountConstant.FAIL;
                objJsonResult.Message = "Exception!" + e.ToString();
                objJsonResult.data = null;
                return objJsonResult;
            }
        }
        #endregion
        #endregion
    }
}
WebAPI/Controllers/CJGL/Qc_PreventErrMouldCheckBillController.cs
@@ -211,7 +211,7 @@
                    oItem.HYear = DBUtility.ClsPub.isLong(DateTime.Now.Year);
                    oItem.HPeriod = DBUtility.ClsPub.isLong(DateTime.Now.Month);
                    oItem.HMakeDate = DBUtility.ClsPub.isStrNull(DateTime.Now.ToString("yyyy-MM-dd"));
                    oItem.HMakeDate = DBUtility.ClsPub.isStrNull(DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"));
                    if (DBUtility.ClsPub.isStrNull(oItem.HDate) == "")
                    {
WebAPI/Controllers/CJGL/Sc_WorkBeginDotCheckBillController.cs
@@ -213,7 +213,7 @@
                    oItem.HYear = DBUtility.ClsPub.isLong(DateTime.Now.Year);
                    oItem.HPeriod = DBUtility.ClsPub.isLong(DateTime.Now.Month);
                    oItem.HMakeDate = DBUtility.ClsPub.isStrNull(DateTime.Now.ToString("yyyy-MM-dd"));
                    oItem.HMakeDate = DBUtility.ClsPub.isStrNull(DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"));
                    if (DBUtility.ClsPub.isStrNull(oItem.HDate) == "")
                    {
@@ -966,7 +966,7 @@
                    if (refSav == "Add")
                    {
                        //单据号是否重复
                        if (OBill.IsExistBillNo(ref ClsPub.sExeReturnInfo, oItem.HBillNo, BillStatus, OBill.omodel.HInterID))
                        if (OBill1.IsExistBillNo(ref ClsPub.sExeReturnInfo, oItem.HBillNo, BillStatus, OBill1.omodel.HInterID))
                        {
                            objJsonResult.code = "0";
                            objJsonResult.count = 0;
@@ -977,7 +977,7 @@
                    }
                    if (refSav == "Update")
                    {
                        if (OBill.ShowBill(oItem.HInterID, ref s) == false)
                        if (OBill1.ShowBill(oItem.HInterID, ref s) == false)
                        {
                            objJsonResult.code = "0";
                            objJsonResult.count = 0;
@@ -986,7 +986,7 @@
                            return objJsonResult;
                        }
                        //判断是否可编辑
                        if (OBill.omodel.HChecker != "" && OBill.omodel.HChecker != null)
                        if (OBill1.omodel.HChecker != "" && OBill1.omodel.HChecker != null)
                        {
                            objJsonResult.code = "0";
                            objJsonResult.count = 0;
@@ -994,7 +994,7 @@
                            objJsonResult.data = 1;
                            return objJsonResult;
                        }
                        if (OBill.omodel.HBillStatus > 1)
                        if (OBill1.omodel.HBillStatus > 1)
                        {
                            objJsonResult.code = "0";
                            objJsonResult.count = 0;
@@ -1012,7 +1012,7 @@
                    oItem.HYear = DBUtility.ClsPub.isLong(DateTime.Now.Year);
                    oItem.HPeriod = DBUtility.ClsPub.isLong(DateTime.Now.Month);
                    oItem.HMakeDate = DBUtility.ClsPub.isStrNull(DateTime.Now.ToString("yyyy-MM-dd"));
                    oItem.HMakeDate = DBUtility.ClsPub.isStrNull(DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"));
                    if (DBUtility.ClsPub.isStrNull(oItem.HDate) == "")
                    {
@@ -1560,5 +1560,47 @@
        }
        #endregion
        #region å¯åŠ¨ç‚¹æ£€å­è¡¨æ ¹æ®ç±»åž‹ æŸ¥è¯¢  æ—¥å¸¸ç‚¹æ£€
        [Route("Sc_WorkBeginDotCheckBill/getSc_WorkDotCheckList_Day")]
        [HttpGet]
        public object getSc_WorkDotCheckList_Day(string sWhere, string user)
        {
            try
            {
                List<object> columnNameList = new List<object>();
                Dictionary<object, object> dic = Newtonsoft.Json.JsonConvert.DeserializeObject<Dictionary<object, object>>(sWhere);
                string Type = dic["Type"].ToString();
                string HInterId = dic["HInterId"].ToString();
                ds = oCN.RunProcReturn("exec h_p_DotCheckDayList '" + Type + "','" + HInterId + "'", "h_p_DotCheckDayList");
                //添加列名
                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/SBGL/Gy_EquipFileMainController.cs
@@ -9,7 +9,10 @@
using System.Net.Http;
using System.Web.Http;
using WebAPI.Models;
using System.Web;
using WebAPI.Controllers.SCGL.日计划管理;
using System.IO;
using SyntacticSugar.constant;
namespace WebAPI.Controllers.SBGL
{
    public class Gy_EquipFileMainController : ApiController
@@ -1315,5 +1318,530 @@
        #endregion
        #region è®¾å¤‡æ¡£æ¡ˆ æ–‡ä»¶å¯¼å…¥ä¿å­˜
        #region è®¾å¤‡æ¡£æ¡ˆ æ–‡ä»¶ä¸Šä¼ 
        [Route("Gy_EquipFileMain/Gy_EquipFileMain_Excel")]
        [HttpPost]
        public object Gy_EquipFile_Excel()
        {
            try
            {
                //获取文件名称
                var file = HttpContext.Current.Request.Files[0];
                //获取文件物理路径
                string ExcelPath = HttpContext.Current.Server.MapPath("~/" + file.FileName);
                //保存文件
                file.SaveAs(ExcelPath);
                NpoiHelper np = new NpoiHelper();
                DataSet ExcelDs = np.ReadExcel(ExcelPath, 1, 1, "0");
                //删除文件
                File.Delete(ExcelPath);
                //创建临时表
                DataTable tb2 = new DataTable("dt2");
                //添加列名
                for (int i = 0; i < ExcelDs.Tables[0].Columns.Count; i++)
                {
                    tb2.Columns.Add(ExcelDs.Tables[0].Rows[0][i].ToString());
                }
                //模板缺少列 ä½†éœ€è¦ä»Žæ•°æ®åº“中查询出来显示在页面的字段
                tb2.Columns.Add("HOrgID", typeof(Int32));//组织ID
                tb2.Columns.Add("HMaterID", typeof(Int32));//物料ID
                tb2.Columns.Add("HEquipTypeID", typeof(Int32));//分类ID
                tb2.Columns.Add("HUnitID", typeof(Int32));//单位ID
                tb2.Columns.Add("HDeptID", typeof(Int32));//部门ID
                tb2.Columns.Add("HUseEmpID", typeof(Int32));//使用负责人ID
                tb2.Columns.Add("HRepairEmpID", typeof(Int32));//维护负责人ID
                tb2.Columns.Add("HSupID", typeof(Int32));//供应商ID
                tb2.Columns.Add("HMadeSupID", typeof(Int32));//制造商ID
                //添加数据
                for (int i = 1; i < ExcelDs.Tables[0].Rows.Count; i++)
                {
                    DataRow row = tb2.NewRow();
                    for (int j = 0; j < ExcelDs.Tables[0].Columns.Count; j++)
                    {
                        row[j] = ExcelDs.Tables[0].Rows[i][j].ToString();
                    }
                    tb2.Rows.Add(row);
                }
                var error = "";
                //判断导入文件列是否完整
                if (!tb2.Columns.Contains("组织代码"))
                    error += "没有找到【组织代码】的标题,";
                if (!tb2.Columns.Contains("组织名称"))
                    error += "没有找到【组织名称】的标题,";
                if (!tb2.Columns.Contains("设备名称"))
                    error += "没有找到【设备名称】的标题,";
                if (!tb2.Columns.Contains("设备编号"))
                    error += "没有找到【设备编号】的标题,";
                if (!tb2.Columns.Contains("设备分类"))
                    error += "没有找到【设备分类】的标题,";
                if (!tb2.Columns.Contains("设备规格"))
                    error += "没有找到【设备规格】的标题,";
                if (!tb2.Columns.Contains("设备型号"))
                    error += "没有找到【设备型号】的标题,";
                if (!tb2.Columns.Contains("对应ERP物料代码"))
                    error += "没有找到【对应ERP物料代码】的标题,";
                if (!tb2.Columns.Contains("对应ERP物料"))
                    error += "没有找到【对应ERP物料】的标题,";
                if (!tb2.Columns.Contains("计量单位"))
                    error += "没有找到【计量单位】的标题,";
                if (!tb2.Columns.Contains("设备出厂日期"))
                    error += "没有找到【设备出厂日期】的标题,";
                if (!tb2.Columns.Contains("设备出厂编号"))
                    error += "没有找到【设备出厂编号】的标题,";
                if (!tb2.Columns.Contains("使用部门"))
                    error += "没有找到【使用部门】的标题,";
                if (!tb2.Columns.Contains("使用负责人"))
                    error += "没有找到【使用负责人】的标题,";
                if (!tb2.Columns.Contains("维护负责人"))
                    error += "没有找到【维护负责人】的标题,";
                if (!tb2.Columns.Contains("安装地点"))
                    error += "没有找到【安装地点】的标题,";
                if (!tb2.Columns.Contains("安装日期"))
                    error += "没有找到【安装日期】的标题,";
                if (!tb2.Columns.Contains("运行开始日期"))
                    error += "没有找到【运行开始日期】的标题,";
                if (!tb2.Columns.Contains("工程编码"))
                    error += "没有找到【工程编码】的标题,";
                if (!tb2.Columns.Contains("条形码"))
                    error += "没有找到【条形码】的标题,";
                if (!tb2.Columns.Contains("产地"))
                    error += "没有找到【产地】的标题,";
                if (!tb2.Columns.Contains("品牌"))
                    error += "没有找到【品牌】的标题,";
                if (!tb2.Columns.Contains("供应商"))
                    error += "没有找到【供应商】的标题,";
                if (!tb2.Columns.Contains("制造商"))
                    error += "没有找到【制造商】的标题,";
                if (!tb2.Columns.Contains("备注"))
                    error += "没有找到【备注】的标题,";
                if (error.Length > 0)
                {
                    objJsonResult.code = CodeConstant.FAIL;
                    objJsonResult.count = CountConstant.FAIL;
                    objJsonResult.Message = $"Excel模板存在错误,{error}\r\n";
                    objJsonResult.data = null;
                    return objJsonResult;
                }
                for (int i = 0; i <= tb2.Rows.Count - 1; i++)
                {
                    string HEquipName = "";
                    string HEquipNo = "";
                    string HORGNumber = "";
                    string HORGName = "";
                    string HMaterNumber = "";
                    string HMaterName = "";
                    string HUnitName = "";
                    string HDeptName = "";
                    string HUseEmpName = "";
                    string HRepairEmpName = "";
                    string HSupName = "";
                    string HMadeSupName = "";
                    string HEquipTypeName = "";
                    HEquipName = DBUtility.ClsPub.isStrNull(tb2.Rows[i]["设备名称"].ToString());
                    HEquipNo = DBUtility.ClsPub.isStrNull(tb2.Rows[i]["设备编号"].ToString());
                    HORGNumber = DBUtility.ClsPub.isStrNull(tb2.Rows[i]["组织代码"].ToString());
                    HORGName = DBUtility.ClsPub.isStrNull(tb2.Rows[i]["组织名称"].ToString());
                    HMaterNumber = DBUtility.ClsPub.isStrNull(tb2.Rows[i]["对应ERP物料代码"].ToString());
                    HMaterName = DBUtility.ClsPub.isStrNull(tb2.Rows[i]["对应ERP物料"].ToString());
                    HUnitName = DBUtility.ClsPub.isStrNull(tb2.Rows[i]["计量单位"].ToString());
                    HDeptName = DBUtility.ClsPub.isStrNull(tb2.Rows[i]["使用部门"].ToString());
                    HUseEmpName = DBUtility.ClsPub.isStrNull(tb2.Rows[i]["使用负责人"].ToString());
                    HRepairEmpName = DBUtility.ClsPub.isStrNull(tb2.Rows[i]["维护负责人"].ToString());
                    HSupName = DBUtility.ClsPub.isStrNull(tb2.Rows[i]["供应商"].ToString());;
                    HMadeSupName = DBUtility.ClsPub.isStrNull(tb2.Rows[i]["制造商"].ToString());
                    HEquipTypeName = DBUtility.ClsPub.isStrNull(tb2.Rows[i]["设备分类"].ToString());
                    //检查物料
                    int index = i + 1;
                    if (HORGNumber != "")
                    {
                        //查询组织
                        ds = oCN.RunProcReturn("select * from Xt_ORGANIZATIONS where  HNumber='" + HORGNumber + "' and Hname='" + HORGName + "'", "Xt_ORGANIZATIONS");
                        if (ds.Tables[0].Rows.Count == 0)
                        {
                            objJsonResult.code = CodeConstant.FAIL;
                            objJsonResult.count = CountConstant.FAIL;
                            objJsonResult.Message = "第" + index + "行,组织不存在!";
                            objJsonResult.data = null;
                            return objJsonResult;
                        }
                        else
                        {
                            tb2.Rows[i]["HOrgID"] = ds.Tables[0].Rows[0]["HItemID"].ToString();
                        }
                        string HORGid = ds.Tables[0].Rows[0]["HItemID"].ToString();
                        //查询分类
                        ds = oCN.RunProcReturn("select * from Gy_EquipFileType  where  HName='" + HEquipTypeName + "' ", "EquipFileType");
                        if (ds.Tables[0].Rows.Count == 0)
                        {
                            objJsonResult.code = "0";
                            objJsonResult.count = 0;
                            objJsonResult.Message = "第" + index + "行,分类:" + HEquipTypeName + ",不存在!";
                            objJsonResult.data = null;
                            return objJsonResult;
                        }
                        else
                        {
                            tb2.Rows[i]["HEquipTypeID"] = ds.Tables[0].Rows[0]["HItemID"].ToString();
                        }
                        //查询物料
                        ds = oCN.RunProcReturn("select * from Gy_Material where  HNumber='" + HMaterNumber + "'  and HUSEORGID=" + HORGid + "", "Gy_Department");
                        if (ds.Tables[0].Rows.Count == 0 && HMaterNumber != "")
                        {
                            objJsonResult.code = "0";
                            objJsonResult.count = 0;
                            objJsonResult.Message = "第" + index + "行,该" + HORGName + "组织,物料:" + HMaterName + ",不存在!";
                            objJsonResult.data = null;
                            return objJsonResult;
                        }
                        else if (HMaterNumber == "")
                        {
                            tb2.Rows[i]["HMaterID"] = 0;
                        }
                        else
                        {
                            tb2.Rows[i]["HMaterID"] = ds.Tables[0].Rows[0]["HItemID"].ToString();
                        }
                        //查询单位
                        ds = oCN.RunProcReturn("select * from Gy_Unit where  HName='" + HUnitName + "'  and HUSEORGID=" + HORGid + "", "Gy_Unit");
                        if (ds.Tables[0].Rows.Count == 0)
                        {
                            objJsonResult.code = "0";
                            objJsonResult.count = 0;
                            objJsonResult.Message = "第" + index + "行,该" + HORGName + "组织,单位:" + HUnitName + ",不存在!";
                            objJsonResult.data = null;
                            return objJsonResult;
                        }
                        else
                        {
                            tb2.Rows[i]["HUnitID"] = ds.Tables[0].Rows[0]["HItemID"].ToString();
                        }
                        //查询部门
                        ds = oCN.RunProcReturn("select * from Gy_Department where  HName='" + HDeptName + "'  and HUSEORGID=" + HORGid + "", "Gy_Department");
                        if (ds.Tables[0].Rows.Count == 0)
                        {
                            objJsonResult.code = "0";
                            objJsonResult.count = 0;
                            objJsonResult.Message = "第" + index + "行,该" + HORGName + "组织,部门:" + HDeptName + ",不存在!";
                            objJsonResult.data = null;
                            return objJsonResult;
                        }
                        else
                        {
                            tb2.Rows[i]["HDeptID"] = ds.Tables[0].Rows[0]["HItemID"].ToString();
                        }
                        //查询使用负责人
                        ds = oCN.RunProcReturn("select * from Gy_Employee where  HName='" + HUseEmpName + "'  and HUSEORGID=" + HORGid + "", "Gy_Employee");
                        if (ds.Tables[0].Rows.Count == 0)
                        {
                            objJsonResult.code = "0";
                            objJsonResult.count = 0;
                            objJsonResult.Message = "第" + index + "行,该" + HORGName + "组织,使用负责人:" + HUseEmpName + ",不存在!";
                            objJsonResult.data = null;
                            return objJsonResult;
                        }
                        else
                        {
                            tb2.Rows[i]["HUseEmpID"] = ds.Tables[0].Rows[0]["HItemID"].ToString();
                        }
                        //查询维护负责人
                        ds = oCN.RunProcReturn("select * from Gy_Employee where  HName='" + HRepairEmpName + "'  and HUSEORGID=" + HORGid + "", "Gy_Employee");
                        if (ds.Tables[0].Rows.Count == 0)
                        {
                            objJsonResult.code = "0";
                            objJsonResult.count = 0;
                            objJsonResult.Message = "第" + index + "行,该" + HORGName + "组织,维护负责人人:" + HRepairEmpName + ",不存在!";
                            objJsonResult.data = null;
                            return objJsonResult;
                        }
                        else
                        {
                            tb2.Rows[i]["HRepairEmpID"] = ds.Tables[0].Rows[0]["HItemID"].ToString();
                        }
                        //查询供应商
                        ds = oCN.RunProcReturn("select * from Gy_Supplier where  HName='" + HSupName + "'  and HUSEORGID=" + HORGid + "", "Gy_Supplier");
                        if (ds.Tables[0].Rows.Count == 0)
                        {
                            objJsonResult.code = "0";
                            objJsonResult.count = 0;
                            objJsonResult.Message = "第" + index + "行,该" + HORGName + "组织,供应商:" + HSupName + ",不存在!";
                            objJsonResult.data = null;
                            return objJsonResult;
                        }
                        else
                        {
                            tb2.Rows[i]["HSupID"] = ds.Tables[0].Rows[0]["HItemID"].ToString();
                        }
                        //查询制造商
                        ds = oCN.RunProcReturn("select * from Gy_Supplier where  HName='" + HMadeSupName + "'  and HUSEORGID=" + HORGid + "", "Gy_Supplier");
                        if (ds.Tables[0].Rows.Count == 0)
                        {
                            objJsonResult.code = "0";
                            objJsonResult.count = 0;
                            objJsonResult.Message = "第" + index + "行,该" + HORGName + "组织,制造商:" + HMadeSupName + ",不存在!";
                            objJsonResult.data = null;
                            return objJsonResult;
                        }
                        else
                        {
                            tb2.Rows[i]["HMadeSupID"] = ds.Tables[0].Rows[0]["HItemID"].ToString();
                        }
                        //设备档案名称
                        if (HEquipName == "")
                        {
                            objJsonResult.code = CodeConstant.FAIL;
                            objJsonResult.count = CountConstant.FAIL;
                            objJsonResult.Message = "第" + index + "行,设备档案名称不能为空!";
                            objJsonResult.data = null;
                            return objJsonResult;
                        }
                        //设备档案代码
                        if (HEquipNo == "")
                        {
                            objJsonResult.code = CodeConstant.FAIL;
                            objJsonResult.count = CountConstant.FAIL;
                            objJsonResult.Message = "第" + index + "行,设备档案编号不能为空!";
                            objJsonResult.data = null;
                            return objJsonResult;
                        }
                    }
                    else
                    {
                        objJsonResult.code = CodeConstant.FAIL;
                        objJsonResult.count = CountConstant.FAIL;
                        objJsonResult.Message = "第" + index + "行,组织代码为空";
                        objJsonResult.data = null;
                        return objJsonResult;
                    }
                }
                objJsonResult.code = CodeConstant.SUCCEED;
                objJsonResult.count = CountConstant.SUCCEED;
                objJsonResult.Message = error;
                objJsonResult.data = tb2;
                return objJsonResult;
            }
            catch (Exception e)
            {
                objJsonResult.code = CodeConstant.FAIL;
                objJsonResult.count = CountConstant.FAIL;
                objJsonResult.Message = "Exception!" + e.ToString();
                objJsonResult.data = null;
                return objJsonResult;
            }
        }
        #endregion
        #region è®¾å¤‡æ¡£æ¡ˆé¡¹ç›® å¯¼å…¥(保存)
        [Route("Gy_EquipFileMain/Gy_EquipFileMain_btnSave")]
        [HttpPost]
        public object Gy_EquipFile_btnSave([FromBody] JObject sMainSub)
        {
            var _value = sMainSub["sMainSub"].ToString();
            string msg1 = _value.ToString();
            string[] sArray = msg1.Split(new string[] { "&和" }, StringSplitOptions.RemoveEmptyEntries);
            string msg2 = sArray[0].ToString();
            string user = sArray[1].ToString();
            try
            {
                if (!DBUtility.ClsPub.Security_Log("Gy_EquipFile_Edit", 1, false, user))
                {
                    objJsonResult.code = CodeConstant.FAIL;
                    objJsonResult.count = CountConstant.FAIL;
                    objJsonResult.Message = "无保存权限!";
                    objJsonResult.data = null;
                    return objJsonResult;
                }
                List<object> Excel = Newtonsoft.Json.JsonConvert.DeserializeObject<List<object>>(msg2);
                List<Dictionary<string, string>> list = new List<Dictionary<string, string>>();
                foreach (JObject item in Excel)
                {
                    Dictionary<string, string> dic = new Dictionary<string, string>();
                    foreach (var itm in item.Properties())
                    {
                        dic.Add(itm.Name, itm.Value.ToString());
                    }
                    list.Add(dic);
                }
                oCN.BeginTran();
                int i = 1;
                foreach (Dictionary<string, string> item in list)
                {
                    string HOrgID = item["HOrgID"].ToString();//组织ID
                    string BillType = "3308";
                    //得到mainid
                    long HInterID = DBUtility.ClsPub.CreateBillID(BillType, ref DBUtility.ClsPub.sExeReturnInfo);
                    string HBillNo = DBUtility.ClsPub.CreateBillCode(BillType, ref DBUtility.ClsPub.sExeReturnInfo, true); ;//递入type得到的单据号
                    DateTime HDate = DateTime.Now;//日期
                    string HYear = DateTime.Now.Year.ToString();
                    string HEquipFileNumber = "";
                    string HEquipFileNo = item["设备编号"].ToString();         //    varchar(50)    //设备编码(唯一)
                    string HName = item["设备名称"].ToString();                //    âˆš    varchar(100)         //设备名称
                    string HModel = item["设备规格"].ToString();               //   âˆš     varchar(100)         //设备规格
                    string HModel2 = item["设备型号"].ToString();              //    âˆš    varchar(100)        //设备型号
                    int HMaterID = int.Parse(item["HMaterID"].ToString());                //   âˆš    int            //对应物料
                    int HUnitID = int.Parse(item["HUnitID"].ToString());                 //    âˆš    int            //单位
                    string HOutComDate = item["设备出厂日期"].ToString() == "" ? DateTime.Now.ToString() : item["设备出厂日期"].ToString();        // âˆš     datetime       //设备出厂日期
                    string HOutComNo = item["设备出厂编号"].ToString();            //  âˆš     varchar(100)       //设备出厂编号
                    int HDeptID = int.Parse(item["HDeptID"].ToString());                 //    âˆš    int            //使用部门(gy_Department)
                    int HUseEmpID = int.Parse(item["HUseEmpID"].ToString());               //√    int        //使用负责人(gy_Employee)
                    int HRepairEmpID = int.Parse(item["HRepairEmpID"].ToString());            //√    int        //维护负责人(gy_Employee)
                    string HAddress = item["安装地点"].ToString();             // âˆš     varchar(500)          //安装地点
                    string HSetupDate = item["安装日期"].ToString() == "" ? DateTime.Now.ToString() : item["安装日期"].ToString();         //√    datetime        //安装日期
                    string HStartupDate = item["运行开始日期"].ToString() == "" ? DateTime.Now.ToString() : item["运行开始日期"].ToString();         //√    datetime        //运行开始日期
                    string HStatus = "空闲";              //    âˆš    varchar(20)    //当前状态(空闲、占用、加工、关机、异常停机)
                    int HEquipFileTypeID = int.Parse(item["HEquipTypeID"].ToString());        //√    int        //设备类别(Gy_EquipFileType)
                    string HProNum = item["工程编码"].ToString();              //    âˆš    varchar(100)    //工程编码
                    string HBarCode = item["条形码"].ToString();             //√    varchar(100)    //条形码(暂时保存此字段)
                    string HWorkArea = item["产地"].ToString();            //√    varchar(50)    //产地
                    string HLogo = item["品牌"].ToString();                //√        varchar(50)    //品牌
                    int HSellSupID = int.Parse(item["HSupID"].ToString());                // âˆš    int        //供应商(Gy_Supplier)
                    int HMakeSupID = int.Parse(item["HMadeSupID"].ToString());             // int        //制造商 (Gy_Supplier)
                    string HMainSourceFlag = "否";             //varchar(10) //是否主生产设备(否,是)
                    string HMacAddress = "";   // varchar(50) //数采物理地址
                    int HMainSourceID = 0;  //int //所属主生产设备(Gy_EquipFileBillMain)
                    string HMaker = user;
                    string HMakeDate = DateTime.Now.Date.ToString();
                    int HEquipDotCheckRuleInterID = 0;
                    int HEquipMaintainRuleInterID = 0;
                    int HSourceID = 0;
                    if (!DBUtility.ClsPub.AllowNumber(HEquipFileNo.Trim()))
                    {
                        objJsonResult.code = CodeConstant.FAIL;
                        objJsonResult.count = CountConstant.FAIL;
                        objJsonResult.Message = "保存失败!代码中不能出现连续‘.’并且首位末位不能为‘.’!";
                        objJsonResult.data = 1;
                        return objJsonResult;
                    }
                    ds = oCN.RunProcReturn("select * from Gy_EquipFileBillMain where HEquipFileNo='" + HEquipFileNo + "'", "Gy_EquipFileBillMain");
                    if (ds.Tables[0].Rows.Count == 0)
                    {
                        oCN.RunProc("Insert into Gy_EquipFileBillMain " +
                   " (HInterID,hbillno,HEquipFileNumber,HEquipFileNo,HName,HModel,HModel2,HMaterID,HUnitID,HOutComDate" +
                   ",HOutComNo,HDeptID,HUseEmpID,HRepairEmpID,HAddress,HSetupDate,HStartupDate,HStatus," +
"HEquipFileTypeID,HProNum,HBarCode,HWorkArea,HLogo,HSellSupID,HMakeSupID,hbilltype,HDate,HYear,HMaker,HMakeDate,HEquipMaintainRuleInterID,HEquipDotCheckRuleInterID,HSourceID,HMainSourceFlag,HMacAddress,HMainSourceID) " +
                   " Values(" + HInterID + ",'" + HBillNo + "','" + HEquipFileNumber + "','" + HEquipFileNo + "','" + HName + "','" + HModel + "','" + HModel2 + "'," + HMaterID + "," + HUnitID +
                   ",'" + HOutComDate + "','" + HOutComNo + "'," + HDeptID + "," + HUseEmpID + "," + HRepairEmpID + ",'" + HAddress +
                   "','" + HSetupDate + "','" + HStartupDate + "','" + HStatus + "'," + HEquipFileTypeID + ",'" + HProNum +
                   "','" + HBarCode + "','" + HWorkArea + "','" + HLogo + "'," + HSellSupID + "," + HMakeSupID + ",'3308','" + HDate + "','" + HYear + "','" + HMaker + "','" + HMakeDate + "','" + HEquipMaintainRuleInterID + "','" + HEquipDotCheckRuleInterID + "'," + HSourceID + ",'" + HMainSourceFlag + "','" + HMacAddress + "','" + HMainSourceID + "')");
                    }
                    else
                    {
                        oCN.RunProc("Update Gy_EquipFileBillMain set " +
                    " HEquipFileNumber='" + HEquipFileNumber + "'" +
                    //",HEquipFileNo='" + HEquipFileNo + "'" +
                    ",HName='" + HName + "'" +
                    ",HModel='" + HModel + "'" +
                    ",HModel2='" + HModel2 + "'" +
                    ",HMaterID=" + HMaterID +
                    ",HUnitID=" + HUnitID +
                    ",HOutComDate='" + HOutComDate + "'" +
                    ",HOutComNo='" + HOutComNo + "'" +
                    ",HDeptID=" + HDeptID +
                    ",HUseEmpID=" + HUseEmpID +
                    ",HRepairEmpID=" + HRepairEmpID +
                    ",HAddress='" + HAddress + "'" +
                    ",HSetupDate='" + HSetupDate + "'" +
                    ",HStartupDate='" + HStartupDate + "'" +
                    ",HStatus='" + HStatus + "'" +
                    ",HEquipFileTypeID=" + HEquipFileTypeID +
                    ",HProNum='" + HProNum + "'" +
                    ",HBarCode='" + HBarCode + "'" +
                    ",HWorkArea='" + HWorkArea + "'" +
                    ",HLogo='" + HLogo + "'" +
                    ",HSellSupID=" + HSellSupID +
                    ",HMakeSupID= " + HMakeSupID +
                    ",HUpDater= '" + user + "'" +
                    ",HUpDateDate= getdate()" + "" +
                    ",HEquipDotCheckRuleInterID='" + HEquipDotCheckRuleInterID + "'" +
                    ",HEquipMaintainRuleInterID='" + HEquipMaintainRuleInterID + "'" +
                    ",HSourceID='" + HSourceID + "'" +
                    ",HMainSourceFlag= '" + HMainSourceFlag + "'" +
                    ",HMacAddress= '" + HMacAddress + "'" +
                    ",HMainSourceID = '" + HMainSourceID + "'" +
                    " Where HEquipFileNo='" + HEquipFileNo + "'");
                    }
                    i++;
                }
                oCN.Commit();
                objJsonResult.code = CodeConstant.SUCCEED;
                objJsonResult.count = CountConstant.SUCCEED;
                objJsonResult.Message = "导入成功!";
                objJsonResult.data = null;
                return objJsonResult;
            }
            catch (Exception e)
            {
                LogService.Write(e);
                objJsonResult.code = CodeConstant.FAIL;
                objJsonResult.count = CountConstant.FAIL;
                objJsonResult.Message = "Exception!" + e.ToString();
                objJsonResult.data = null;
                return objJsonResult;
            }
        }
        #endregion
        #endregion
    }
}
WebAPI/Controllers/SBGL/Gy_EquipTypeController.cs
@@ -8,7 +8,10 @@
using System.Net.Http;
using System.Web.Http;
using WebAPI.Models;
using System.Web;
using WebAPI.Controllers.SCGL.日计划管理;
using System.IO;
using SyntacticSugar.constant;
namespace WebAPI.Controllers.SBGL
{
    public class Gy_EquipTypeController : ApiController
@@ -569,5 +572,266 @@
        }
        #endregion
        #region è®¾å¤‡åˆ†ç±» æ–‡ä»¶å¯¼å…¥ä¿å­˜
        #region è®¾å¤‡åˆ†ç±» æ–‡ä»¶ä¸Šä¼ 
        [Route("Gy_EquipType/Gy_EquipType_Excel")]
        [HttpPost]
        public object Gy_EquipType_Excel()
        {
            try
            {
                //获取文件名称
                var file = HttpContext.Current.Request.Files[0];
                //获取文件物理路径
                string ExcelPath = HttpContext.Current.Server.MapPath("~/" + file.FileName);
                //保存文件
                file.SaveAs(ExcelPath);
                NpoiHelper np = new NpoiHelper();
                DataSet ExcelDs = np.ReadExcel(ExcelPath, 1, 1, "0");
                //删除文件
                File.Delete(ExcelPath);
                //创建临时表
                DataTable tb2 = new DataTable("dt2");
                //添加列名
                for (int i = 0; i < ExcelDs.Tables[0].Columns.Count; i++)
                {
                    tb2.Columns.Add(ExcelDs.Tables[0].Rows[0][i].ToString());
                }
                //模板缺少列 ä½†éœ€è¦ä»Žæ•°æ®åº“中查询出来显示在页面的字段
                tb2.Columns.Add("HOrgID", typeof(Int32));//组织ID
                //添加数据
                for (int i = 1; i < ExcelDs.Tables[0].Rows.Count; i++)
                {
                    DataRow row = tb2.NewRow();
                    for (int j = 0; j < ExcelDs.Tables[0].Columns.Count; j++)
                    {
                        row[j] = ExcelDs.Tables[0].Rows[i][j].ToString();
                    }
                    tb2.Rows.Add(row);
                }
                var error = "";
                //查询没有的列
                if (!tb2.Columns.Contains("组织代码"))
                    error += "没有找到【组织代码】的标题,";
                if (!tb2.Columns.Contains("组织名称"))
                    error += "没有找到【组织名称】的标题,";
                if (!tb2.Columns.Contains("设备分类"))
                    error += "没有找到【设备分类名称】的标题,";
                if (!tb2.Columns.Contains("设备分类代码"))
                    error += "没有找到【设备分类代码】的标题,";
                if (!tb2.Columns.Contains("备注"))
                    error += "没有找到【备注】的标题,";
                if (!tb2.Columns.Contains("助记码"))
                    error += "没有找到【助记码】的标题,";
                if (error.Length > 0)
                {
                    objJsonResult.code = CodeConstant.FAIL;
                    objJsonResult.count = CountConstant.FAIL;
                    objJsonResult.Message = $"Excel模板存在错误,{error}\r\n";
                    objJsonResult.data = null;
                    return objJsonResult;
                }
                for (int i = 0; i <= tb2.Rows.Count - 1; i++)
                {
                    string HProcessName = "";
                    string HProcessNum = "";
                    string HORGNumber = "";
                    string HORGName = "";
                    HProcessName = DBUtility.ClsPub.isStrNull(tb2.Rows[i]["设备分类"].ToString());
                    HProcessNum = DBUtility.ClsPub.isStrNull(tb2.Rows[i]["设备分类代码"].ToString());
                    HORGNumber = DBUtility.ClsPub.isStrNull(tb2.Rows[i]["组织代码"].ToString());
                    HORGName = DBUtility.ClsPub.isStrNull(tb2.Rows[i]["组织名称"].ToString());
                    //检查物料
                    int index = i + 1;
                    if (HORGNumber != "")
                    {
                        //查询组织
                        ds = oCN.RunProcReturn("select * from Xt_ORGANIZATIONS where  HNumber='" + HORGNumber + "' and Hname='" + HORGName + "'", "Xt_ORGANIZATIONS");
                        if (ds.Tables[0].Rows.Count == 0)
                        {
                            objJsonResult.code = CodeConstant.FAIL;
                            objJsonResult.count = CountConstant.FAIL;
                            objJsonResult.Message = "第" + index + "行,组织不存在!";
                            objJsonResult.data = null;
                            return objJsonResult;
                        }
                        else
                        {
                            tb2.Rows[i]["HOrgID"] = ds.Tables[0].Rows[0]["HItemID"].ToString();
                        }
                        string HORGid = ds.Tables[0].Rows[0]["HItemID"].ToString();
                        //设备分类名称
                        if (HProcessName == "")
                        {
                            objJsonResult.code = CodeConstant.FAIL;
                            objJsonResult.count = CountConstant.FAIL;
                            objJsonResult.Message = "第" + index + "行,设备分类名称不能为空!";
                            objJsonResult.data = null;
                            return objJsonResult;
                        }
                        //设备分类代码
                        if (HProcessNum == "")
                        {
                            objJsonResult.code = CodeConstant.FAIL;
                            objJsonResult.count = CountConstant.FAIL;
                            objJsonResult.Message = "第" + index + "行,设备分类代码不能为空!";
                            objJsonResult.data = null;
                            return objJsonResult;
                        }
                    }
                    else
                    {
                        objJsonResult.code = CodeConstant.FAIL;
                        objJsonResult.count = CountConstant.FAIL;
                        objJsonResult.Message = "第" + index + "行,组织代码为空";
                        objJsonResult.data = null;
                        return objJsonResult;
                    }
                }
                objJsonResult.code = CodeConstant.SUCCEED;
                objJsonResult.count = CountConstant.SUCCEED;
                objJsonResult.Message = error;
                objJsonResult.data = tb2;
                return objJsonResult;
            }
            catch (Exception e)
            {
                objJsonResult.code = CodeConstant.FAIL;
                objJsonResult.count = CountConstant.FAIL;
                objJsonResult.Message = "Exception!" + e.ToString();
                objJsonResult.data = null;
                return objJsonResult;
            }
        }
        #endregion
        #region è®¾å¤‡åˆ†ç±»é¡¹ç›® å¯¼å…¥(保存)
        [Route("Gy_EquipType/Gy_EquipType_btnSave")]
        [HttpPost]
        public object Gy_EquipType_btnSave([FromBody] JObject sMainSub)
        {
            var _value = sMainSub["sMainSub"].ToString();
            string msg1 = _value.ToString();
            string[] sArray = msg1.Split(new string[] { "&和" }, StringSplitOptions.RemoveEmptyEntries);
            string msg2 = sArray[0].ToString();
            string user = sArray[1].ToString();
            try
            {
                if (!DBUtility.ClsPub.Security_Log("Gy_ErrType_Edit", 1, false, user))
                {
                    objJsonResult.code = CodeConstant.FAIL;
                    objJsonResult.count = CountConstant.FAIL;
                    objJsonResult.Message = "无保存权限!";
                    objJsonResult.data = null;
                    return objJsonResult;
                }
                List<object> Excel = Newtonsoft.Json.JsonConvert.DeserializeObject<List<object>>(msg2);
                List<Dictionary<string, string>> list = new List<Dictionary<string, string>>();
                foreach (JObject item in Excel)
                {
                    Dictionary<string, string> dic = new Dictionary<string, string>();
                    foreach (var itm in item.Properties())
                    {
                        dic.Add(itm.Name, itm.Value.ToString());
                    }
                    list.Add(dic);
                }
                oCN.BeginTran();
                int i = 1;
                foreach (Dictionary<string, string> item in list)
                {
                    string HOrgID = item["HOrgID"].ToString();//组织ID
                    string HName = item["设备分类"].ToString();
                    string HNumber = item["设备分类代码"].ToString();
                    string HRemark = item["备注"].ToString();
                    string HHelpCode = item["助记码"].ToString();
                    string sShortNumber;
                    sShortNumber = DBUtility.ClsPub.GetShortNumber(HNumber);//短代码
                    if (sShortNumber.Trim() == "")
                    {
                        objJsonResult.code = CodeConstant.FAIL;
                        objJsonResult.count = CountConstant.FAIL;
                        objJsonResult.Message = "保存失败!短代码为空!";
                        objJsonResult.data = 1;
                        return objJsonResult;
                    }
                    int HEndFlag = 1;//末级标志
                    int HLevel = DBUtility.ClsPub.GetLevel(HNumber); //等级
                    if (!DBUtility.ClsPub.AllowNumber(HNumber.Trim()))
                    {
                        objJsonResult.code = CodeConstant.FAIL;
                        objJsonResult.count = CountConstant.FAIL;
                        objJsonResult.Message = "保存失败!代码中不能出现连续‘.’并且首位末位不能为‘.’!";
                        objJsonResult.data = 1;
                        return objJsonResult;
                    }
                    ds = oCN.RunProcReturn("select * from Gy_EquipFileType where HNumber='" + HNumber + "'", "Gy_EquipType");
                    if (ds.Tables[0].Rows.Count == 0)
                    {
                        oCN.RunProc("Insert into Gy_EquipFileType " +
                   " (HNumber,HName,HHelpCode,HShortNumber,HParentID" +
                   ",HLevel,HEndFlag,HStopflag,HRemark,HMakeTime,HMakeEmp) " +
                   " Values('" + HNumber + "','" + HName + "','" + HHelpCode + "','" + sShortNumber + "'," + 0 +
                   "," + HLevel + "," + HEndFlag + "," + 0 + ",'" + HRemark + "',getdate(),'" + user + "')");
                    }
                    else
                    {
                        oCN.RunProc("update  Gy_EquipFileType set HHelpCode='" + HHelpCode + "',HRemark='" + HRemark + "'  where HNumber='" + HNumber + "'");
                    }
                    i++;
                }
                oCN.Commit();
                objJsonResult.code = CodeConstant.SUCCEED;
                objJsonResult.count = CountConstant.SUCCEED;
                objJsonResult.Message = "导入成功!";
                objJsonResult.data = null;
                return objJsonResult;
            }
            catch (Exception e)
            {
                LogService.Write(e);
                objJsonResult.code = CodeConstant.FAIL;
                objJsonResult.count = CountConstant.FAIL;
                objJsonResult.Message = "Exception!" + e.ToString();
                objJsonResult.data = null;
                return objJsonResult;
            }
        }
        #endregion
        #endregion
    }
}
WebAPI/Controllers/SBGL/SB_EquipICMOTechParamBillController.cs
@@ -6,6 +6,8 @@
using System.Collections.Generic;
using System.Data;
using System.Data.SqlClient;
using System.IO;
using System.Web;
using System.Web.Http;
using WebAPI.Models;
@@ -29,7 +31,7 @@
        private json objJsonResult = new json();
        SQLHelper.ClsCN oCn = new SQLHelper.ClsCN();
        public DAL.ClsSB_EquipICMOTechParamBill oBill = new DAL.ClsSB_EquipICMOTechParamBill();
        string fileip = System.Configuration.ConfigurationManager.AppSettings["FileIP"];
        #region è®¾å¤‡å·¥è‰ºå‚数订单点检表列表信息
        /// <summary>
@@ -798,7 +800,6 @@
        #endregion
        #region å¼‚常工艺参数预警列表信息
        /// <summary>
        /// å¼‚常工艺参数预警列表信息
@@ -848,6 +849,186 @@
        }
        #endregion
        #region è®¾å¤‡ç‚¹æ£€è®°å½•拍照上传
        [Route("SB_EquipICMOTechParamBillController/UploadFile")]
        [HttpPost]
        public object UploadFile()
        {
            string HBillNo = HttpContext.Current.Request.Params["HBillNo"];  //单据号
            string HRemark = HttpContext.Current.Request.Params["HRemark"];  //备注
            string HUserName = HttpContext.Current.Request.Params["HUserName"];  //创建人
            HttpPostedFile files = HttpContext.Current.Request.Files["file"];
            string path = HttpContext.Current.Server.MapPath("~/../Files/EquipTechParamFolder/" + HBillNo);
            //string path = @"D:\\Files\\"+ HBillNo;
            dynamic dyResult = UpLoadFile(files, path, HBillNo, HRemark, HUserName);
            if (dyResult != null && dyResult.result == 1)
            {
                objJsonResult.code = "1";
                objJsonResult.count = 1;
                objJsonResult.Message = "上传成功!";
                objJsonResult.data = null;
                return objJsonResult;
            }
            else
            {
                objJsonResult.code = "0";
                objJsonResult.count = 0;
                objJsonResult.Message = dyResult.returnval;
                objJsonResult.data = null;
                return objJsonResult;
            }
        }
        public dynamic UpLoadFile(HttpPostedFile files, string path, string HBillNo, string HRemark, string HUserName)
        {
            dynamic Result_Ob = new { result = 1, returnval = "上传成功!" };
            string filePath = Path.GetFullPath(files.FileName);//文件上传路径
            string fileExtension = Path.GetExtension(files.FileName);// æ–‡ä»¶æ‰©å±•名
            string filename = files.FileName;//文件名
            string fileSavePath = path;// ä¸Šä¼ ä¿å­˜è·¯å¾„
            int filesize = files.ContentLength;//获取上传文件的大小单位为字节byte
            int Maxsize = 40000 * 1024;//定义上传文件的最大空间大小为40M
            try
            {
                if (files == null || files.ContentLength <= 0)
                {
                    Result_Ob = new { result = 0, returnval = "文件不能为空!" };
                    return Result_Ob;
                }
                if (filesize >= Maxsize)
                {
                    Result_Ob = new { result = 0, returnval = "上传文件超过40M,不能上传!" };
                    return Result_Ob;
                }
                string fileurl = Path.Combine(fileSavePath, filename);
                if (Directory.Exists(fileurl) == true)  //如果存在重名文件就提示
                {
                    Result_Ob = new { result = 0, returnval = "存在同名文件!" };
                    return Result_Ob;
                }
                //删除数据表数据
                ds = oCn.RunProcReturn("delete from MES_AccessoriesList where HSourceBillNo ='" + HBillNo + "' and HFileName='" + filename + "'", "MES_AccessoriesList");
                if (Directory.Exists(path))
                {
                    File.Delete(fileurl);      //删除指定文件
                    files.SaveAs(fileurl);
                    string StrPath = "/files/EquipTechParamFolder/" + HBillNo + "/" + filename;
                    if (File.Exists(fileurl))
                    {
                        //这里可以执行一些其它的操作,比如更新数据库
                        //写入数据表
                        oCn.RunProc("Insert into MES_AccessoriesList (HFileName,HFilePath,HFilePath_Cus,HFileType" +
                                    ",HLoadMan,HLoadDate,HRemark,HVerNum,HFileSize" +
                                    ",HFileClsID,HSourceBillNo" +
                                   ") values('"
                                    + filename.ToString() + "','" + StrPath.ToString() + "','" + filePath.ToString() + "','" + fileExtension.ToString() + "'" +
                                    ",'" + HUserName + "',getdate(),'" + HRemark + "','V1','" + filesize +
                                    "','" + 0 + "','" + HBillNo +
                                   "') ");
                    }
                    else
                    {
                        Result_Ob = new { result = 0, returnval = "上传失败!此文件为恶意文件" };
                    }
                }
                else
                {
                    Directory.CreateDirectory(fileSavePath); //添加文件夹
                    files.SaveAs(fileurl);
                    string StrPath = "/files/EquipTechParamFolder/" + HBillNo + "/" + filename;
                    if (File.Exists(fileurl))
                    {
                        //这里可以执行一些其它的操作,比如更新数据库
                        //写入数据表
                        oCn.RunProc("Insert into MES_AccessoriesList (HFileName,HFilePath,HFilePath_Cus,HFileType" +
                                    ",HLoadMan,HLoadDate,HRemark,HVerNum,HFileSize" +
                                    ",HFileClsID,HSourceBillNo" +
                                   ") values('"
                                    + filename.ToString() + "','" + StrPath.ToString() + "','" + filePath.ToString() + "','" + fileExtension.ToString() + "'" +
                                    ",'" + HUserName + "',getdate(),'" + HRemark + "','V1','" + filesize +
                                    "','" + 0 + "','" + HBillNo +
                                   "') ");
                    }
                    else
                    {
                        Result_Ob = new { result = 0, returnval = "上传失败!此文件为恶意文件" };
                    }
                }
            }
            catch (Exception e)
            {
                Result_Ob = new { result = 0, returnval = e.Message };
            }
            return Result_Ob;
        }
        /// <summary>
        /// æ ¹æ®å•据号查找上传文件列表
        /// </summary>
        /// <param name="sWhere"></param>
        /// <returns></returns>
        [Route("SB_EquipICMOTechParamBillController/Filelist")]
        [HttpGet]
        public object Filelist(string HBillNo)
        {
            var url = fileip + "/files/EquipTechParamFolder/" + HBillNo + "/";
            //@"C:\\files\\"
            try
            {
                ds = oCn.RunProcReturn("select *,'" + url + "'+CAST(HFileName as varchar(200))as url  from MES_AccessoriesList where HSourceBillNo='" + HBillNo + "'", "MES_AccessoriesList");
                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;
            }
        }
        /// <summary>
        /// æ ¹æ®ID,单据号,文件名 åˆ é™¤æ–‡ä»¶
        /// </summary>
        /// <param name="sWhere"></param>
        /// <returns></returns>
        [Route("SB_EquipICMOTechParamBillController/DeleteFilelist")]
        [HttpGet]
        public object DeleteFilelist(string HItemID, string HSourceBillNo, string HFileName)
        {
            try
            {
                oCn.RunProc("delete from MES_AccessoriesList where HItemID =" + HItemID);
                string fileurl = Path.Combine(HttpContext.Current.Server.MapPath("~/../Files/EquipTechParamFolder/" + HSourceBillNo), HFileName);
                File.Delete(fileurl);      //删除指定文件
                objJsonResult.code = "1";
                objJsonResult.count = 1;
                objJsonResult.Message = "删除成功!";
                objJsonResult.data = null;
                return objJsonResult;
            }
            catch (Exception e)
            {
                objJsonResult.code = "0";
                objJsonResult.count = 0;
                objJsonResult.Message = "Exception!" + e.ToString();
                objJsonResult.data = null;
                return objJsonResult;
            }
        }
        #endregion
    }
WebAPI/Controllers/SBGL/Sb_EquipDotCheckBillController.cs
@@ -163,6 +163,7 @@
                    //oItem.HBillNo = "";
                    oItem.HDate = DBUtility.ClsPub.isDate(DateTime.Now.ToString("yyyy-MM-dd"));//  --日期
                    oItem.HYear = DBUtility.ClsPub.isLong(DateTime.Now.Year);
                    oItem.HPeriod = DBUtility.ClsPub.isLong(DateTime.Now.Month);
                    //oItem.HMakeDate = "";
                    //oItem.HYear = "";
                    //oItem.HPeriod = "";
WebAPI/Controllers/WebAPIController.cs
@@ -18,6 +18,10 @@
using WebAPI.Controllers.SCGL.日计划管理;
using WebAPI.Models;
using WebAPI.Service;
using System.Web;
using WebAPI.Controllers.SCGL.日计划管理;
using System.IO;
using SyntacticSugar.constant;
namespace WebAPI.Controllers
{
@@ -3094,6 +3098,263 @@
                return objJsonResult;
            }
        }
        #endregion
        #region å¼‚常类型 æ–‡ä»¶å¯¼å…¥ä¿å­˜
        #region å¼‚常类型 æ–‡ä»¶ä¸Šä¼ 
        [Route("Gy_ErrType/Gy_ErrType_Excel")]
        [HttpPost]
        public object Gy_ErrType_Excel()
        {
            try
            {
                //获取文件名称
                var file = HttpContext.Current.Request.Files[0];
                //获取文件物理路径
                string ExcelPath = HttpContext.Current.Server.MapPath("~/" + file.FileName);
                //保存文件
                file.SaveAs(ExcelPath);
                NpoiHelper np = new NpoiHelper();
                DataSet ExcelDs = np.ReadExcel(ExcelPath, 1, 1, "0");
                //删除文件
                File.Delete(ExcelPath);
                //创建临时表
                DataTable tb2 = new DataTable("dt2");
                //添加列名
                for (int i = 0; i < ExcelDs.Tables[0].Columns.Count; i++)
                {
                    tb2.Columns.Add(ExcelDs.Tables[0].Rows[0][i].ToString());
                }
                //模板缺少列 ä½†éœ€è¦ä»Žæ•°æ®åº“中查询出来显示在页面的字段
                tb2.Columns.Add("HOrgID", typeof(Int32));//组织ID
                //添加数据
                for (int i = 1; i < ExcelDs.Tables[0].Rows.Count; i++)
                {
                    DataRow row = tb2.NewRow();
                    for (int j = 0; j < ExcelDs.Tables[0].Columns.Count; j++)
                    {
                        row[j] = ExcelDs.Tables[0].Rows[i][j].ToString();
                    }
                    tb2.Rows.Add(row);
                }
                var error = "";
                //查询工艺路线没有的列
                if (!tb2.Columns.Contains("组织代码"))
                    error += "没有找到【组织代码】的标题,";
                if (!tb2.Columns.Contains("组织名称"))
                    error += "没有找到【组织名称】的标题,";
                if (!tb2.Columns.Contains("异常类型"))
                    error += "没有找到【异常类型名称】的标题,";
                if (!tb2.Columns.Contains("异常类型代码"))
                    error += "没有找到【异常类型代码】的标题,";
                if (error.Length > 0)
                {
                    objJsonResult.code = CodeConstant.FAIL;
                    objJsonResult.count = CountConstant.FAIL;
                    objJsonResult.Message = $"Excel模板存在错误,{error}\r\n";
                    objJsonResult.data = null;
                    return objJsonResult;
                }
                for (int i = 0; i <= tb2.Rows.Count - 1; i++)
                {
                    string HProcessName = "";
                    string HProcessNum = "";
                    string HORGNumber = "";
                    string HORGName = "";
                    HProcessName = DBUtility.ClsPub.isStrNull(tb2.Rows[i]["异常类型"].ToString());
                    HProcessNum = DBUtility.ClsPub.isStrNull(tb2.Rows[i]["异常类型代码"].ToString());
                    HORGNumber = DBUtility.ClsPub.isStrNull(tb2.Rows[i]["组织代码"].ToString());
                    HORGName = DBUtility.ClsPub.isStrNull(tb2.Rows[i]["组织名称"].ToString());
                    //检查物料
                    int index = i + 1;
                    if (HORGNumber != "")
                    {
                        //查询组织
                        ds = oCN.RunProcReturn("select * from Xt_ORGANIZATIONS where  HNumber='" + HORGNumber + "' and Hname='" + HORGName + "'", "Xt_ORGANIZATIONS");
                        if (ds.Tables[0].Rows.Count == 0)
                        {
                            objJsonResult.code = CodeConstant.FAIL;
                            objJsonResult.count = CountConstant.FAIL;
                            objJsonResult.Message = "第" + index + "行,组织不存在!";
                            objJsonResult.data = null;
                            return objJsonResult;
                        }
                        else
                        {
                            tb2.Rows[i]["HOrgID"] = ds.Tables[0].Rows[0]["HItemID"].ToString();
                        }
                        string HORGid = ds.Tables[0].Rows[0]["HItemID"].ToString();
                        //异常类型名称
                        if (HProcessName == "")
                        {
                            objJsonResult.code = CodeConstant.FAIL;
                            objJsonResult.count = CountConstant.FAIL;
                            objJsonResult.Message = "第" + index + "行,异常类型名称不能为空!";
                            objJsonResult.data = null;
                            return objJsonResult;
                        }
                        //异常类型代码
                        if (HProcessNum == "")
                        {
                            objJsonResult.code = CodeConstant.FAIL;
                            objJsonResult.count = CountConstant.FAIL;
                            objJsonResult.Message = "第" + index + "行,异常类型代码不能为空!";
                            objJsonResult.data = null;
                            return objJsonResult;
                        }
                    }
                    else
                    {
                        objJsonResult.code = CodeConstant.FAIL;
                        objJsonResult.count = CountConstant.FAIL;
                        objJsonResult.Message = "第" + index + "行,组织代码为空";
                        objJsonResult.data = null;
                        return objJsonResult;
                    }
                }
                objJsonResult.code = CodeConstant.SUCCEED;
                objJsonResult.count = CountConstant.SUCCEED;
                objJsonResult.Message = error;
                objJsonResult.data = tb2;
                return objJsonResult;
            }
            catch (Exception e)
            {
                objJsonResult.code = CodeConstant.FAIL;
                objJsonResult.count = CountConstant.FAIL;
                objJsonResult.Message = "Exception!" + e.ToString();
                objJsonResult.data = null;
                return objJsonResult;
            }
        }
        #endregion
        #region å¼‚常类型项目 å¯¼å…¥(保存)
        [Route("Gy_ErrType/Gy_ErrType_btnSave")]
        [HttpPost]
        public object Gy_ErrType_btnSave([FromBody] JObject sMainSub)
        {
            var _value = sMainSub["sMainSub"].ToString();
            string msg1 = _value.ToString();
            string[] sArray = msg1.Split(new string[] { "&和" }, StringSplitOptions.RemoveEmptyEntries);
            string msg2 = sArray[0].ToString();
            string user = sArray[1].ToString();
            try
            {
                if (!DBUtility.ClsPub.Security_Log("Gy_ErrType_Edit", 1, false, user))
                {
                    objJsonResult.code = CodeConstant.FAIL;
                    objJsonResult.count = CountConstant.FAIL;
                    objJsonResult.Message = "无保存权限!";
                    objJsonResult.data = null;
                    return objJsonResult;
                }
                List<object> Excel = Newtonsoft.Json.JsonConvert.DeserializeObject<List<object>>(msg2);
                List<Dictionary<string, string>> list = new List<Dictionary<string, string>>();
                foreach (JObject item in Excel)
                {
                    Dictionary<string, string> dic = new Dictionary<string, string>();
                    foreach (var itm in item.Properties())
                    {
                        dic.Add(itm.Name, itm.Value.ToString());
                    }
                    list.Add(dic);
                }
                oCN.BeginTran();
                int i = 1;
                foreach (Dictionary<string, string> item in list)
                {
                    string HOrgID = item["HOrgID"].ToString();//组织ID
                    string HProcessName = item["异常类型"].ToString();
                    string HProcessNum = item["异常类型代码"].ToString();
                    string HRemark = item["备注"].ToString();
                    string sShortNumber;
                    sShortNumber = DBUtility.ClsPub.GetShortNumber(HProcessNum);//短代码
                    if (sShortNumber.Trim() == "")
                    {
                        objJsonResult.code = CodeConstant.FAIL;
                        objJsonResult.count = CountConstant.FAIL;
                        objJsonResult.Message = "保存失败!短代码为空!";
                        objJsonResult.data = 1;
                        return objJsonResult;
                    }
                    int HEndFlag = 1;//末级标志
                    int HLevel = DBUtility.ClsPub.GetLevel(HProcessNum); //等级
                    if (!DBUtility.ClsPub.AllowNumber(HProcessNum.Trim()))
                    {
                        objJsonResult.code = CodeConstant.FAIL;
                        objJsonResult.count = CountConstant.FAIL;
                        objJsonResult.Message = "保存失败!代码中不能出现连续‘.’并且首位末位不能为‘.’!";
                        objJsonResult.data = 1;
                        return objJsonResult;
                    }
                    ds = oCN.RunProcReturn("select * from Gy_ErrType where HNumber='" + HProcessNum + "'", "Gy_ErrType");
                    if (ds.Tables[0].Rows.Count == 0)
                    {
                        oCN.RunProc("Insert into " + "Gy_ErrType" +
                        " (HNumber,HName,HHelpCode,HShortNumber,HParentID" +
                        ",HLevel,HEndFlag,HStopflag,HRemark,HBarCode,HUSEORGID,HCREATEORGID,HUseFlag) " +
                        " Values('" + HProcessNum + "','" + HProcessName + "','" + "','" + sShortNumber + "'," + 0 +
                        "," + HLevel + "," + HEndFlag + "," + 0 + ",'" + HRemark + "','" + "'," + HOrgID + "," + HOrgID + ",'" + "未检测" + "')");
                    }
                    else
                    {
                        oCN.RunProc("update  Gy_ErrType set HUSEORGID=" + HOrgID + ",HRemark='" + HRemark + "'  where HNumber='" + HProcessNum + "'");
                    }
                    i++;
                }
                oCN.Commit();
                objJsonResult.code = CodeConstant.SUCCEED;
                objJsonResult.count = CountConstant.SUCCEED;
                objJsonResult.Message = "导入成功!";
                objJsonResult.data = null;
                return objJsonResult;
            }
            catch (Exception e)
            {
                LogService.Write(e);
                objJsonResult.code = CodeConstant.FAIL;
                objJsonResult.count = CountConstant.FAIL;
                objJsonResult.Message = "Exception!" + e.ToString();
                objJsonResult.data = null;
                return objJsonResult;
            }
        }
        #endregion
        #endregion
        /// <summary>
@@ -9170,6 +9431,262 @@
        }
        #endregion
        #region å¼‚常反馈类型 æ–‡ä»¶å¯¼å…¥ä¿å­˜
        #region å¼‚常反馈类型 æ–‡ä»¶ä¸Šä¼ 
        [Route("Gy_ErrMsgBackType/Gy_ErrMsgBackType_Excel")]
        [HttpPost]
        public object Gy_ErrMsgBackType_Excel()
        {
            try
            {
                //获取文件名称
                var file = HttpContext.Current.Request.Files[0];
                //获取文件物理路径
                string ExcelPath = HttpContext.Current.Server.MapPath("~/" + file.FileName);
                //保存文件
                file.SaveAs(ExcelPath);
                NpoiHelper np = new NpoiHelper();
                DataSet ExcelDs = np.ReadExcel(ExcelPath, 1, 1, "0");
                //删除文件
                File.Delete(ExcelPath);
                //创建临时表
                DataTable tb2 = new DataTable("dt2");
                //添加列名
                for (int i = 0; i < ExcelDs.Tables[0].Columns.Count; i++)
                {
                    tb2.Columns.Add(ExcelDs.Tables[0].Rows[0][i].ToString());
                }
                //模板缺少列 ä½†éœ€è¦ä»Žæ•°æ®åº“中查询出来显示在页面的字段
                tb2.Columns.Add("HOrgID", typeof(Int32));//组织ID
                //添加数据
                for (int i = 1; i < ExcelDs.Tables[0].Rows.Count; i++)
                {
                    DataRow row = tb2.NewRow();
                    for (int j = 0; j < ExcelDs.Tables[0].Columns.Count; j++)
                    {
                        row[j] = ExcelDs.Tables[0].Rows[i][j].ToString();
                    }
                    tb2.Rows.Add(row);
                }
                var error = "";
                //查询工艺路线没有的列
                if (!tb2.Columns.Contains("组织代码"))
                    error += "没有找到【组织代码】的标题,";
                if (!tb2.Columns.Contains("组织名称"))
                    error += "没有找到【组织名称】的标题,";
                if (!tb2.Columns.Contains("异常反馈类型"))
                    error += "没有找到【异常反馈类型名称】的标题,";
                if (!tb2.Columns.Contains("异常反馈类型代码"))
                    error += "没有找到【异常反馈类型代码】的标题,";
                if (error.Length > 0)
                {
                    objJsonResult.code = CodeConstant.FAIL;
                    objJsonResult.count = CountConstant.FAIL;
                    objJsonResult.Message = $"Excel模板存在错误,{error}\r\n";
                    objJsonResult.data = null;
                    return objJsonResult;
                }
                for (int i = 0; i <= tb2.Rows.Count - 1; i++)
                {
                    string HProcessName = "";
                    string HProcessNum = "";
                    string HORGNumber = "";
                    string HORGName = "";
                    HProcessName = DBUtility.ClsPub.isStrNull(tb2.Rows[i]["异常反馈类型"].ToString());
                    HProcessNum = DBUtility.ClsPub.isStrNull(tb2.Rows[i]["异常反馈类型代码"].ToString());
                    HORGNumber = DBUtility.ClsPub.isStrNull(tb2.Rows[i]["组织代码"].ToString());
                    HORGName = DBUtility.ClsPub.isStrNull(tb2.Rows[i]["组织名称"].ToString());
                    //检查物料
                    int index = i + 1;
                    if (HORGNumber != "")
                    {
                        //查询组织
                        ds = oCN.RunProcReturn("select * from Xt_ORGANIZATIONS where  HNumber='" + HORGNumber + "' and Hname='" + HORGName + "'", "Xt_ORGANIZATIONS");
                        if (ds.Tables[0].Rows.Count == 0)
                        {
                            objJsonResult.code = CodeConstant.FAIL;
                            objJsonResult.count = CountConstant.FAIL;
                            objJsonResult.Message = "第" + index + "行,组织不存在!";
                            objJsonResult.data = null;
                            return objJsonResult;
                        }
                        else
                        {
                            tb2.Rows[i]["HOrgID"] = ds.Tables[0].Rows[0]["HItemID"].ToString();
                        }
                        string HORGid = ds.Tables[0].Rows[0]["HItemID"].ToString();
                        //异常类型名称
                        if (HProcessName == "")
                        {
                            objJsonResult.code = CodeConstant.FAIL;
                            objJsonResult.count = CountConstant.FAIL;
                            objJsonResult.Message = "第" + index + "行,异常反馈类型名称不能为空!";
                            objJsonResult.data = null;
                            return objJsonResult;
                        }
                        //异常类型代码
                        if (HProcessNum == "")
                        {
                            objJsonResult.code = CodeConstant.FAIL;
                            objJsonResult.count = CountConstant.FAIL;
                            objJsonResult.Message = "第" + index + "行,异常反馈类型代码不能为空!";
                            objJsonResult.data = null;
                            return objJsonResult;
                        }
                    }
                    else
                    {
                        objJsonResult.code = CodeConstant.FAIL;
                        objJsonResult.count = CountConstant.FAIL;
                        objJsonResult.Message = "第" + index + "行,组织代码为空";
                        objJsonResult.data = null;
                        return objJsonResult;
                    }
                }
                objJsonResult.code = CodeConstant.SUCCEED;
                objJsonResult.count = CountConstant.SUCCEED;
                objJsonResult.Message = error;
                objJsonResult.data = tb2;
                return objJsonResult;
            }
            catch (Exception e)
            {
                objJsonResult.code = CodeConstant.FAIL;
                objJsonResult.count = CountConstant.FAIL;
                objJsonResult.Message = "Exception!" + e.ToString();
                objJsonResult.data = null;
                return objJsonResult;
            }
        }
        #endregion
        #region å¼‚常反馈项目 å¯¼å…¥(保存)
        [Route("Gy_ErrMsgBackType/Gy_ErrMsgBackType_btnSave")]
        [HttpPost]
        public object Gy_ErrMsgBackType_btnSave([FromBody] JObject sMainSub)
        {
            var _value = sMainSub["sMainSub"].ToString();
            string msg1 = _value.ToString();
            string[] sArray = msg1.Split(new string[] { "&和" }, StringSplitOptions.RemoveEmptyEntries);
            string msg2 = sArray[0].ToString();
            string user = sArray[1].ToString();
            try
            {
                if (!DBUtility.ClsPub.Security_Log("Gy_ErrType_Edit", 1, false, user))
                {
                    objJsonResult.code = CodeConstant.FAIL;
                    objJsonResult.count = CountConstant.FAIL;
                    objJsonResult.Message = "无保存权限!";
                    objJsonResult.data = null;
                    return objJsonResult;
                }
                List<object> Excel = Newtonsoft.Json.JsonConvert.DeserializeObject<List<object>>(msg2);
                List<Dictionary<string, string>> list = new List<Dictionary<string, string>>();
                foreach (JObject item in Excel)
                {
                    Dictionary<string, string> dic = new Dictionary<string, string>();
                    foreach (var itm in item.Properties())
                    {
                        dic.Add(itm.Name, itm.Value.ToString());
                    }
                    list.Add(dic);
                }
                oCN.BeginTran();
                int i = 1;
                foreach (Dictionary<string, string> item in list)
                {
                    string HOrgID = item["HOrgID"].ToString();//组织ID
                    string HProcessName = item["异常反馈类型"].ToString();
                    string HProcessNum = item["异常反馈类型代码"].ToString();
                    string HRemark = item["备注"].ToString();
                    string sShortNumber;
                    sShortNumber = DBUtility.ClsPub.GetShortNumber(HProcessNum);//短代码
                    if (sShortNumber.Trim() == "")
                    {
                        objJsonResult.code = CodeConstant.FAIL;
                        objJsonResult.count = CountConstant.FAIL;
                        objJsonResult.Message = "保存失败!短代码为空!";
                        objJsonResult.data = 1;
                        return objJsonResult;
                    }
                    int HEndFlag = 1;//末级标志
                    int HLevel = DBUtility.ClsPub.GetLevel(HProcessNum); //等级
                    if (!DBUtility.ClsPub.AllowNumber(HProcessNum.Trim()))
                    {
                        objJsonResult.code = CodeConstant.FAIL;
                        objJsonResult.count = CountConstant.FAIL;
                        objJsonResult.Message = "保存失败!代码中不能出现连续‘.’并且首位末位不能为‘.’!";
                        objJsonResult.data = 1;
                        return objJsonResult;
                    }
                    ds = oCN.RunProcReturn("select * from Gy_ErrMsgBackType where HNumber='" + HProcessNum + "'", "Gy_ErrMsgBackType");
                    if (ds.Tables[0].Rows.Count == 0)
                    {
                        oCN.RunProc("Insert into "  + "Gy_ErrMsgBackType " +
                    " (HNumber,HName,HHelpCode,HShortNumber,HParentID" +
                    ",HLevel,HEndFlag,HStopflag,HRemark,HMakeTime,HUSEORGID,HUseFlag,HMakeEmp,HCREATEORGID) " +
                    " Values('" + HProcessNum + "','" + HProcessName + "','" +  "','" + sShortNumber + "'," + 0 +
                    "," + HLevel + "," + HEndFlag + "," + 0 + ",'" + HRemark + "','" + DateTime.Now + "','" + HOrgID + "','" + "未检测" + "','" + user + "','" + HOrgID + "')");
                    }
                    else
                    {
                        oCN.RunProc("update  Gy_ErrMsgBackType set HUSEORGID=" + HOrgID + ",HRemark='" + HRemark + "'  where HNumber='" + HProcessNum + "'");
                    }
                    i++;
                }
                oCN.Commit();
                objJsonResult.code = CodeConstant.SUCCEED;
                objJsonResult.count = CountConstant.SUCCEED;
                objJsonResult.Message = "导入成功!";
                objJsonResult.data = null;
                return objJsonResult;
            }
            catch (Exception e)
            {
                LogService.Write(e);
                objJsonResult.code = CodeConstant.FAIL;
                objJsonResult.count = CountConstant.FAIL;
                objJsonResult.Message = "Exception!" + e.ToString();
                objJsonResult.data = null;
                return objJsonResult;
            }
        }
        #endregion
        #endregion
        #region  ä¸è‰¯çŽ°è±¡  è®¾ç½®åˆ—表/保存/编辑/删除方法
        /// <summary>
        ///  ä¸è‰¯çŽ°è±¡ ä¿å­˜
@@ -13177,7 +13694,7 @@
                {
                    objjson.code = "0";
                    objjson.count = 1;
                    objjson.Message = "该设备有多个计划单,手动选着" ;
                    objjson.Message = "该设备有多个计划单或点检规程,手动选着" ;
                    objjson.data = null;
                    return objjson;
                }
WebAPI/Controllers/»ù´¡×ÊÁÏ/»ù´¡×ÊÁÏ/Gy_MaterTypeBillController.cs
@@ -7,7 +7,10 @@
using System.Web;
using System.Web.Http;
using WebAPI.Models;
using System.Web;
using WebAPI.Controllers.SCGL.日计划管理;
using System.IO;
using SyntacticSugar.constant;
namespace WebAPI.Controllers.基础资料.基础资料
{
    public class Gy_MaterTypeBillController : ApiController
@@ -201,6 +204,327 @@
        }
        #endregion
        #region ç‰©æ–™åˆ†ç±» æ–‡ä»¶å¯¼å…¥ä¿å­˜
        #region ç‰©æ–™åˆ†ç±» æ–‡ä»¶ä¸Šä¼ 
        [Route("Gy_MaterType/Gy_MaterType_Excel")]
        [HttpPost]
        public object Gy_MaterType_Excel()
        {
            try
            {
                //获取文件名称
                var file = HttpContext.Current.Request.Files[0];
                //获取文件物理路径
                string ExcelPath = HttpContext.Current.Server.MapPath("~/" + file.FileName);
                //保存文件
                file.SaveAs(ExcelPath);
                NpoiHelper np = new NpoiHelper();
                DataSet ExcelDs = np.ReadExcel(ExcelPath, 1, 1, "0");
                //删除文件
                File.Delete(ExcelPath);
                //创建临时表
                DataTable tb2 = new DataTable("dt2");
                //添加列名
                for (int i = 0; i < ExcelDs.Tables[0].Columns.Count; i++)
                {
                    tb2.Columns.Add(ExcelDs.Tables[0].Rows[0][i].ToString());
                }
                //模板缺少列 ä½†éœ€è¦ä»Žæ•°æ®åº“中查询出来显示在页面的字段
                tb2.Columns.Add("HOrgID", typeof(Int32));//组织ID
                tb2.Columns.Add("HParentID", typeof(Int32));//父类ID
                //添加数据
                for (int i = 1; i < ExcelDs.Tables[0].Rows.Count; i++)
                {
                    DataRow row = tb2.NewRow();
                    for (int j = 0; j < ExcelDs.Tables[0].Columns.Count; j++)
                    {
                        row[j] = ExcelDs.Tables[0].Rows[i][j].ToString();
                    }
                    tb2.Rows.Add(row);
                }
                var error = "";
                //查询没有的列
                if (!tb2.Columns.Contains("组织代码"))
                    error += "没有找到【组织代码】的标题,";
                if (!tb2.Columns.Contains("组织名称"))
                    error += "没有找到【组织名称】的标题,";
                if (!tb2.Columns.Contains("物料分类"))
                    error += "没有找到【物料分类名称】的标题,";
                if (!tb2.Columns.Contains("物料分类代码"))
                    error += "没有找到【物料分类代码】的标题,";
                if (!tb2.Columns.Contains("父类名称"))
                    error += "没有找到【父类名称】的标题,";
                if (!tb2.Columns.Contains("父类代码"))
                    error += "没有找到【父类代码】的标题,";
                if (!tb2.Columns.Contains("备注"))
                    error += "没有找到【备注】的标题,";
                if (!tb2.Columns.Contains("助记码"))
                    error += "没有找到【助记码】的标题,";
                if (error.Length > 0)
                {
                    objJsonResult.code = CodeConstant.FAIL;
                    objJsonResult.count = CountConstant.FAIL;
                    objJsonResult.Message = $"Excel模板存在错误,{error}\r\n";
                    objJsonResult.data = null;
                    return objJsonResult;
                }
                for (int i = 0; i <= tb2.Rows.Count - 1; i++)
                {
                    string HMaterTypeName = "";
                    string HMaterTypeNum = "";
                    string HORGNumber = "";
                    string HORGName = "";
                    string HParentNumber = "";
                    string HParentName = "";
                    HMaterTypeName = DBUtility.ClsPub.isStrNull(tb2.Rows[i]["物料分类"].ToString());
                    HMaterTypeNum = DBUtility.ClsPub.isStrNull(tb2.Rows[i]["物料分类代码"].ToString());
                    HParentName = DBUtility.ClsPub.isStrNull(tb2.Rows[i]["父类名称"].ToString());
                    HParentNumber = DBUtility.ClsPub.isStrNull(tb2.Rows[i]["父类代码"].ToString());
                    HORGNumber = DBUtility.ClsPub.isStrNull(tb2.Rows[i]["组织代码"].ToString());
                    HORGName = DBUtility.ClsPub.isStrNull(tb2.Rows[i]["组织名称"].ToString());
                    //检查物料
                    int index = i + 1;
                    if (HORGNumber != "")
                    {
                        //查询组织
                        ds = oCN.RunProcReturn("select * from Xt_ORGANIZATIONS where  HNumber='" + HORGNumber + "' and Hname='" + HORGName + "'", "Xt_ORGANIZATIONS");
                        if (ds.Tables[0].Rows.Count == 0)
                        {
                            objJsonResult.code = CodeConstant.FAIL;
                            objJsonResult.count = CountConstant.FAIL;
                            objJsonResult.Message = "第" + index + "行,组织不存在!";
                            objJsonResult.data = null;
                            return objJsonResult;
                        }
                        else
                        {
                            tb2.Rows[i]["HOrgID"] = ds.Tables[0].Rows[0]["HItemID"].ToString();
                        }
                        string HORGid = ds.Tables[0].Rows[0]["HItemID"].ToString();
                        if(HParentNumber!="" && HParentName != "")
                        {
                            //查询父类id
                            ds = oCN.RunProcReturn("select * from Gy_MaterType where  HNumber='" + HParentNumber + "' and Hname='" + HParentName + "'", "Gy_MaterType");
                            if (ds.Tables[0].Rows.Count == 0)
                            {
                                objJsonResult.code = CodeConstant.FAIL;
                                objJsonResult.count = CountConstant.FAIL;
                                objJsonResult.Message = "第" + index + "行,父类不存在!";
                                objJsonResult.data = null;
                                return objJsonResult;
                            }
                            else
                            {
                                tb2.Rows[i]["HParentID"] = ds.Tables[0].Rows[0]["HItemID"].ToString();
                            }
                            string HParentID = ds.Tables[0].Rows[0]["HItemID"].ToString();
                        }
                        else {
                            tb2.Rows[i]["HParentID"] = "0";
                        }
                        //物料分类名称
                        if (HMaterTypeName == "")
                        {
                            objJsonResult.code = CodeConstant.FAIL;
                            objJsonResult.count = CountConstant.FAIL;
                            objJsonResult.Message = "第" + index + "行,物料分类名称不能为空!";
                            objJsonResult.data = null;
                            return objJsonResult;
                        }
                        //物料分类名称
                        if (HMaterTypeNum == HParentNumber)
                        {
                            objJsonResult.code = CodeConstant.FAIL;
                            objJsonResult.count = CountConstant.FAIL;
                            objJsonResult.Message = "第" + index + "行,物料类型父类不能是自己!";
                            objJsonResult.data = null;
                            return objJsonResult;
                        }
                        //物料分类代码
                        if (HMaterTypeNum == "")
                        {
                            objJsonResult.code = CodeConstant.FAIL;
                            objJsonResult.count = CountConstant.FAIL;
                            objJsonResult.Message = "第" + index + "行,物料分类代码不能为空!";
                            objJsonResult.data = null;
                            return objJsonResult;
                        }
                    }
                    else
                    {
                        objJsonResult.code = CodeConstant.FAIL;
                        objJsonResult.count = CountConstant.FAIL;
                        objJsonResult.Message = "第" + index + "行,组织代码为空";
                        objJsonResult.data = null;
                        return objJsonResult;
                    }
                }
                objJsonResult.code = CodeConstant.SUCCEED;
                objJsonResult.count = CountConstant.SUCCEED;
                objJsonResult.Message = error;
                objJsonResult.data = tb2;
                return objJsonResult;
            }
            catch (Exception e)
            {
                objJsonResult.code = CodeConstant.FAIL;
                objJsonResult.count = CountConstant.FAIL;
                objJsonResult.Message = "Exception!" + e.ToString();
                objJsonResult.data = null;
                return objJsonResult;
            }
        }
        #endregion
        #region ç‰©æ–™åˆ†ç±»é¡¹ç›® å¯¼å…¥(保存)
        [Route("Gy_MaterType/Gy_MaterType_btnSave")]
        [HttpPost]
        public object Gy_MaterType_btnSave([FromBody] JObject sMainSub)
        {
            var _value = sMainSub["sMainSub"].ToString();
            string msg1 = _value.ToString();
            string[] sArray = msg1.Split(new string[] { "&和" }, StringSplitOptions.RemoveEmptyEntries);
            string msg2 = sArray[0].ToString();
            string user = sArray[1].ToString();
            try
            {
                if (!DBUtility.ClsPub.Security_Log("Gy_ErrType_Edit", 1, false, user))
                {
                    objJsonResult.code = CodeConstant.FAIL;
                    objJsonResult.count = CountConstant.FAIL;
                    objJsonResult.Message = "无保存权限!";
                    objJsonResult.data = null;
                    return objJsonResult;
                }
                List<object> Excel = Newtonsoft.Json.JsonConvert.DeserializeObject<List<object>>(msg2);
                List<Dictionary<string, string>> list = new List<Dictionary<string, string>>();
                foreach (JObject item in Excel)
                {
                    Dictionary<string, string> dic = new Dictionary<string, string>();
                    foreach (var itm in item.Properties())
                    {
                        dic.Add(itm.Name, itm.Value.ToString());
                    }
                    list.Add(dic);
                }
                oCN.BeginTran();
                int i = 1;
                foreach (Dictionary<string, string> item in list)
                {
                    string HOrgID = item["HOrgID"].ToString();//组织ID
                    string HName = item["物料分类"].ToString();
                    string HNumber = item["物料分类代码"].ToString();
                    string HRemark = item["备注"].ToString();
                    string HHelpCode = item["助记码"].ToString();
                    string HParentID = item["HParentID"].ToString();
                    string sShortNumber;
                    sShortNumber = DBUtility.ClsPub.GetShortNumber(HNumber);//短代码
                    if (sShortNumber.Trim() == "")
                    {
                        objJsonResult.code = CodeConstant.FAIL;
                        objJsonResult.count = CountConstant.FAIL;
                        objJsonResult.Message = "保存失败!短代码为空!";
                        objJsonResult.data = 1;
                        return objJsonResult;
                    }
                    int HEndFlag = 1;//末级标志
                    int HLevel = 1; //等级
                    DataSet ds2 = oCN.RunProcReturn("select HLevel from  Gy_MaterType where HItemID =" + HParentID, "Gy_MaterType");//搜索父类等级
                    //oItem.HLevel = DBUtility.ClsPub.GetLevel(oItem.HNumber); //等级
                    if (ds2.Tables[0].Rows.Count > 0)
                    {
                        HLevel = (int)ds2.Tables[0].Rows[0]["HLevel"] + 1;
                    }
                    else
                    {
                        HLevel = 1;
                    }
                    if (!DBUtility.ClsPub.AllowNumber(HNumber.Trim()))
                    {
                        objJsonResult.code = CodeConstant.FAIL;
                        objJsonResult.count = CountConstant.FAIL;
                        objJsonResult.Message = "保存失败!代码中不能出现连续‘.’并且首位末位不能为‘.’!";
                        objJsonResult.data = 1;
                        return objJsonResult;
                    }
                    ds = oCN.RunProcReturn("select * from Gy_MaterType where HNumber='" + HNumber + "'", "Gy_MaterType");
                    if (ds.Tables[0].Rows.Count == 0)
                    {
                            oCN.RunProc("Insert into "  + "Gy_MaterType" +
                        " (HNumber,HName,HHelpCode,HShortNumber,HParentID" +
                        ",HLevel,HEndFlag,HStopflag,HRemark,HMakeEmp,HMakeTime,HStopEmp,HStopTime,HUSEORGID,HCREATEORGID,HUseFlag) " +
                        " Values('" + HNumber + "','" + HName + "','" + HHelpCode + "','" + sShortNumber + "'," + HParentID.ToString() +
                        "," + HLevel + "," + HEndFlag + "," +  0 + ",'" + HRemark + "','" + user + "',getdate(),'" + "" + "','" +  "" + "'," + HOrgID + "," + HOrgID + ",'" + "未检测" + "')");
                        //修改上级为非末级代码
                        oCN.RunProc("Update Gy_MaterType" + " set HEndflag=0 where HItemID=" + HParentID);
                    }
                    else
                    {
                        oCN.RunProc("update  Gy_MaterType set HUSEORGID=" + HOrgID + ",HParentID = " + HParentID + ",HHelpCode = '" + HHelpCode + "',HRemark='" + HRemark + "'  where HNumber='" + HNumber + "'");
                        //修改上级为非末级代码
                        oCN.RunProc("Update Gy_MaterType" + " set HEndflag=0 where HItemID=" + HParentID);
                    }
                    i++;
                }
                oCN.Commit();
                objJsonResult.code = CodeConstant.SUCCEED;
                objJsonResult.count = CountConstant.SUCCEED;
                objJsonResult.Message = "导入成功!";
                objJsonResult.data = null;
                return objJsonResult;
            }
            catch (Exception e)
            {
                LogService.Write(e);
                objJsonResult.code = CodeConstant.FAIL;
                objJsonResult.count = CountConstant.FAIL;
                objJsonResult.Message = "Exception!" + e.ToString();
                objJsonResult.data = null;
                return objJsonResult;
            }
        }
        #endregion
        #endregion
        #region ç‰©æ–™åˆ†ç±»  åˆ é™¤
        [Route("Gy_MaterType/DeleteMaterType")]
WebAPI/Controllers/Êý¾Ýͬ²½/¶¤¶¤Í¬²½/DD_DataSynchronizationController.cs
@@ -239,6 +239,111 @@
        }
        #endregion
        #region æ¨¡å…·ä¿å…»ç»´ä¿®è¡¨
        public class MouldFileWeiXiuBaoYang
        {
            //ClsSb_MouldRepairWorkBillSub
            //单据信息
            public string HMakerID;                             //创建人ID
            public string HMaker;                               //创建人名称
            public string HMakeDate;                            //创建日期
            public string HUpdaterID;                           //修改人ID
            public string HUpdater;                             //修改人名称
            public string HUpdateDate;                          //修改日期
            public string HInstanceID;                          //单据实例ID
            public string HOriginator;                          //发起人
            public string HTitle;                               //单据标题
            public Int64 HEquipID;//              --设备ID(Gy_EquipMent)
            public Int64 HRepairID;//    --维修项目(Gy_Repair)
            public DateTime HRepairBeginDate;//  --维修开始日期
            public DateTime HRepairEndDate;//  --维修结束日期
            public string HRepairContent;//   --维修内容
            public string HCycleUnit;//   varchar(10)    --时间单位(小时,天)
            public double HPlanTimes;//  money         --计划维修工时
            public double HTimes;//      money       --实际维修工时
            public Int64 HEmpID;//    int    --维修人(Gy_Employee)
            public Int64 HManagerID;//   int       --负责人(Gy_Employee)
            public Int64 HDeptID;//    int    --维修部门(Gy_Department)
            public string HExplanation;//   varchar(500)    --维修要求
            public string HInnerBillNo;//   varchar(50)   --内部单据号
            public Int64 HMouldID;
            public Int64 HSupID;//        int    --供应商(Gy_Supplier)                    addnew
            public string HRepairType;//    varchar(10)        --维修类型(内部维修,委外维修)       addnew
            public string HNewModel;//    varchar(100)        --维修后新规格                addnew
            public Single HNewDesignLife;//    money            --新设计寿命
            public string HRemark;
            //单据内容
            public string HDate;                                //日期
            public string HCheckLevel;                          //审核等级
            public string HArea;                                //区域
            public string HEmployeeID;                          //成员ID
            public string HEmplpyee;                            //成员名称
            public List<Sc_MouldRepairWorkBillSub> DetailColMouldRepair = new List<Sc_MouldRepairWorkBillSub>();
            public List<Sc_MouldMaintainBillSub> DetailColMouldMaintain = new List<Sc_MouldMaintainBillSub>();
        }
        //维修子表
        public class Sc_MouldRepairWorkBillSub
        {
            public string HRepairExplanation;
            public string HRemark;
        }
        //保养子表
        public class Sc_MouldMaintainBillSub
        {
            public string HClaim;
            public string HMaintainResult;
        }
        #endregion
        #region è®¾å¤‡ç»´ä¿®è®°å½•表
        public class EquipRepairWeiXiu
        {
            //单据信息
            public string HMakerID;                             //创建人ID
            public string HMaker;                               //创建人名称
            public string HMakeDate;                            //创建日期
            public string HUpdaterID;                           //修改人ID
            public string HUpdater;                             //修改人名称
            public string HUpdateDate;                          //修改日期
            public string HInstanceID;                          //单据实例ID
            public string HOriginator;                          //发起人
            public string HTitle;                               //单据标题
            public Int64 HEmpID;//    int                --维修人
            public Int64 HManagerID;//   int            --负责人
            public Int64 HSecManagerID;//  int           --验收
            public Int64 HDeptID;//     int             --维修部门
            public string HExplanation;//   varchar(200)        --维修要求
            public string HInnerBillNo;//  varchar(50)         --内部单据号
            public string HRemark; //加工要求
            public Int64 HEquipID;//     int       --设备ID(Gy_EquipMent)
            public Int64 HRepairID;//int  --维修项目(Gy_Repair)
            public DateTime HRepairBeginDate;// datetime --维修开始日期
            public DateTime HRepairEndDate;//datetime --维修结束日期
            public string HRepairContent;//varchar(500) --维修内容
            public string HCycleUnit;//varchar(10)    --时间单位(小时,天)
            public Single HPlanTimes;// money         --计划维修工时
            public Single HTimes;// money       --实际维修工时
            public string HRemark2;//备注
            //单据内容
            public string HDate;                                //日期
            public string HCheckLevel;                          //审核等级
            public string HArea;                                //区域
            public string HEmployeeID;                          //成员ID
            public string HEmplpyee;                            //成员名称
            public List<Sc_MouldRepairWorkBillSub> DetailColMouldRepair = new List<Sc_MouldRepairWorkBillSub>();
        }
        #endregion
        #endregion
        #region é’‰é’‰ é€šç”¨æ“ä½œæ–¹æ³•
@@ -405,8 +510,10 @@
                //OriginatorId = "12",                                                                                          //根据流程发起人工号查询。
                //TaskId = "12",                                                                                                //任务ID。
                CreateFromTimeGMT = DateTime.Now.ToString("dd") == "01" ? "2022-01-01" : DateTime.Now.AddDays(-7).ToString("yyyy-MM-dd"),                                          //创建时间起始值。
                CreateToTimeGMT = DateTime.Now.ToString("yyyy-MM-dd hh:mm:ss"),                                               //创建时间终止值。
                //CreateFromTimeGMT = DateTime.Now.ToString("dd") == "01" ? "2022-01-01" : DateTime.Now.AddDays(-7).ToString("yyyy-MM-dd"),                                          //创建时间起始值。
                //CreateToTimeGMT = DateTime.Now.ToString("yyyy-MM-dd hh:mm:ss"),                                               //创建时间终止值。
                ModifiedFromTimeGMT = DateTime.Now.AddDays(-1).ToString("yyyy-MM-dd"),                                          //修改时间起始值。
                ModifiedToTimeGMT = DateTime.Now.ToString("yyyy-MM-dd hh:mm:ss"),                                               //修改时间终止值。
                PageSize = pageSize,                                                  //分页大小。
                PageNumber = pageNumber,                                                 //分页页码
@@ -1895,6 +2002,669 @@
        }
        #endregion
        #endregion
        #region æ•°æ®åŒæ­¥-模具维修保养单
        #region èŽ·å– å®œæ­-模具维修保养单 å®žä¾‹ID列表对应的实例详情
        public bool getInstanceDetailList___MouldFileWeiXiuBaoYang_YiDa(string appType, string systemToken, string userID, string formUuid, List<string> IDList, ref List<MouldFileWeiXiuBaoYang> lsmain, ref string msg, int size = 500)
        {
            try
            {
                int startIndex = 0;
                int endIndex = startIndex + size;
                if (endIndex > IDList.Count)
                {
                    endIndex = IDList.Count;
                }
                while (startIndex < endIndex && endIndex <= IDList.Count)
                {
                    List<string> IDList_temp = new List<string>();
                    for (int i = startIndex; i < endIndex; i++)
                    {
                        IDList_temp.Add(IDList[i]);
                    }
                    BatchGetFormDataByIdListResponse response = new BatchGetFormDataByIdListResponse();
                    if (getInstanceDetailListByInstanceIDList_YiDa(appType, systemToken, formUuid, userID, IDList_temp, ref response, ref msg) == false)
                    {
                        return false;
                    }
                    for (int i = 0; i < response.Body.Result.Count; i++)
                    {
                        try
                        {
                            List<string> keys = new List<string>(response.Body.Result[i].FormData.Keys);
                            MouldFileWeiXiuBaoYang oItem = new MouldFileWeiXiuBaoYang();
                            oItem.HMakerID = response.Body.Result[i].CreatorUserId.Replace("'", "");
                            oItem.HMaker = response.Body.Result[i].CreatorUserId.Replace("'", "");
                            oItem.HMakeDate = response.Body.Result[i].CreateTimeGMT.Replace("T", " ").Replace("Z", "").Replace("'", "");
                            oItem.HUpdaterID = response.Body.Result[i].ModifyUser.UserId.Replace("'", "");
                            oItem.HUpdater = response.Body.Result[i].ModifyUser.Name.NameInChinese.Replace("'", "");
                            oItem.HUpdateDate = response.Body.Result[i].ModifiedTimeGMT.Replace("T", " ").Replace("Z", "").Replace("'", "");
                            oItem.HInstanceID = response.Body.Result[i].FormInstanceId.Replace("'", "");
                            oItem.HOriginator = response.Body.Result[i].Originator.Name.NameInChinese.Replace("'", "");
                            GetInstanceByIdResponse getInstanceByIdResponse = new GetInstanceByIdResponse(); ;
                            if (!getInstanceStatusByInstanceID__YiDa(appType, systemToken, userID, oItem.HInstanceID, ref getInstanceByIdResponse, ref msg))
                            {
                                continue;
                            }
                            if (getInstanceByIdResponse.Body.InstanceStatus != "COMPLETED")
                            {
                                continue;
                            }
                            //修模开始时间
                            if (keys.Contains("dateField_lq4gf2ih"))
                            {
                                double HDate_Temp = double.Parse(response.Body.Result[i].FormData["dateField_lq4gf2ih"].ToString());
                                oItem.HRepairBeginDate = DateTime.Parse(convertFromMillisecondsToDateString(HDate_Temp, "yyyy-MM-dd HH:mm"));
                            }
                            //修模结束时间
                            if (keys.Contains("dateField_lq4gf2ii"))
                            {
                                double HDate_Temp = double.Parse(response.Body.Result[i].FormData["dateField_lq4gf2ii"].ToString());
                                oItem.HRepairEndDate = DateTime.Parse(convertFromMillisecondsToDateString(HDate_Temp, "yyyy-MM-dd HH:mm"));
                            }
                            //模具批次号
                            if (keys.Contains("serialNumberField_lqaak4ts"))
                            {
                                string HDate_Temp = response.Body.Result[i].FormData["serialNumberField_lqaak4ts"].ToString();
                                oItem.HRemark = HDate_Temp;
                            }
                            //模具编码
                            if (keys.Contains("dateField_lq4gf2ii"))
                            {
                                string HDate_Temp = response.Body.Result[i].FormData["dateField_lq4gf2ii"].ToString();
                                DataSet ds = oCN.RunProcReturn("select * from Gy_MouldFileMain with(nolock)  where HNumber='" + HDate_Temp + "'", "Gy_MouldFileMain");
                                string HMouldID = "0";
                                if (ds.Tables[0].Rows.Count > 0)
                                {
                                    HMouldID = ds.Tables[0].Rows[0]["HInterID"].ToString();
                                }
                                oItem.HMouldID = long.Parse(HMouldID);
                            }
                            //维修部门
                            if (keys.Contains("selectField_lq3idkva"))
                            {
                                string HDate_Temp = response.Body.Result[i].FormData["selectField_lq3idkva"].ToString();
                                DataSet ds = oCN.RunProcReturn("select * from Gy_Department with(nolock)  where HName='" + HDate_Temp + "'", "Gy_Department");
                                string HDeptID = "0";
                                if (ds.Tables[0].Rows.Count > 0)
                                {
                                    HDeptID = ds.Tables[0].Rows[0]["HItemID"].ToString();
                                }
                                oItem.HDeptID = long.Parse(HDeptID);
                            }
                            //新设计寿命
                            oItem.HNewDesignLife = 30000;
                            //维修人
                            if (keys.Contains("employeeField_lq3idkvh"))
                            {
                                string[] HDate_Temp = JsonConvert.DeserializeObject<string[]>(JsonConvert.SerializeObject(response.Body.Result[i].FormData["employeeField_lq3idkvh"]));
                                DataSet ds = oCN.RunProcReturn("select * from Gy_Employee with(nolock)  where HNumber='" + HDate_Temp[0] + "'", "Gy_Employee");
                                string HEmpID = "0";
                                if (ds.Tables[0].Rows.Count > 0)
                                {
                                    HEmpID = ds.Tables[0].Rows[0]["HItemID"].ToString();
                                }
                                oItem.HEmpID = long.Parse(HEmpID);
                            }
                            //维修时间
                            if (keys.Contains("numberField_lq3ixr9j"))
                            {
                                string HDate_Temp = response.Body.Result[i].FormData["numberField_lq3ixr9j"].ToString();
                                oItem.HTimes = long.Parse(HDate_Temp);
                                oItem.HPlanTimes = long.Parse(HDate_Temp);
                            }
                            //子表 ç»´ä¿®è¦æ±‚ ç»´ä¿®å¤‡æ³¨(问题描述)
                            if (keys.Contains("tableField_lq3ixr9b"))
                            {
                                List<Dictionary<string, object>> dic = JsonConvert.DeserializeObject<List<Dictionary<string, object>>>(JsonConvert.SerializeObject(response.Body.Result[i].FormData["tableField_lq3ixr9b"]));
                                for (int ij = 0; ij < dic.Count; ij++)
                                {
                                    Sc_MouldRepairWorkBillSub oItemSub = new Sc_MouldRepairWorkBillSub();
                                    List<string> keys_Sub = new List<string>(dic[ij].Keys);
                                    //维修要求
                                    if (keys_Sub.Contains("textareaField_lq3ixr9e"))
                                    {
                                        oItemSub.HRepairExplanation = dic[ij]["textareaField_lq3ixr9e"].ToString();
                                    }
                                    //备注
                                    if (keys_Sub.Contains("textField_lq3ixr9d"))
                                    {
                                        oItemSub.HRemark = dic[ij]["textField_lq3ixr9d"].ToString();
                                    }
                                    oItem.DetailColMouldRepair.Add(oItemSub);
                                }
                            }
                            string HRemark = "";
                            //子表 ä¿å…»å¤‡æ³¨(问题描述)
                            if (keys.Contains("textareaField_ltpf2wiw"))
                            {
                                HRemark = response.Body.Result[i].FormData["textareaField_ltpf2wiw"].ToString();
                            }
                            //子表 å…·ä½“要求 ä¿å…»é¡¹ç›®
                            if (keys.Contains("checkboxField_ltpf2wif"))
                            {
                                string[] HDate_Temp = JsonConvert.DeserializeObject<string[]>(JsonConvert.SerializeObject(response.Body.Result[i].FormData["checkboxField_ltpf2wif"]));
                                for (int ij = 0; ij < HDate_Temp.Length; ij++)
                                {
                                    Sc_MouldMaintainBillSub oItemSub = new Sc_MouldMaintainBillSub();
                                    oItemSub.HClaim = HDate_Temp[ij];
                                    oItemSub.HMaintainResult = HRemark;
                                    oItem.DetailColMouldMaintain.Add(oItemSub);
                                }
                            }
                            int startindex = response.Body.Result[i].Title.IndexOf("zh_CN") + 8;
                            oItem.HTitle = startIndex + response.Body.Result[i].Title.Substring(startindex).Replace("\"}", "").Replace("'", "");
                            if (keys.Contains("dateField_lo6w37hk"))
                            {
                                double HDate_Temp = double.Parse(response.Body.Result[i].FormData["dateField_lo6w37hk"].ToString());
                                oItem.HDate = convertFromMillisecondsToDateString(HDate_Temp, "yyyy-MM-dd");
                            }
                            if (keys.Contains("selectField_lockncvh_id"))
                            {
                                oItem.HArea = response.Body.Result[i].FormData["selectField_lockncvh_id"].ToString().Replace("'", "");
                            }
                            if (keys.Contains("selectField_lockncvg_id"))
                            {
                                oItem.HCheckLevel = response.Body.Result[i].FormData["selectField_lockncvg_id"].ToString().Replace("'", "");
                            }
                            if (keys.Contains("employeeField_lo6w37hf"))
                            {
                                oItem.HEmplpyee = ((List<object>)response.Body.Result[i].FormData["employeeField_lo6w37hf"])[0].ToString().Replace("'", "");
                            }
                            if (keys.Contains("employeeField_lo6w37hf_id"))
                            {
                                oItem.HEmployeeID = ((List<object>)response.Body.Result[i].FormData["employeeField_lo6w37hf_id"])[0].ToString().Replace("'", "");
                            }
                            lsmain.Add(oItem);
                        }
                        catch (Exception e)
                        {
                            continue;
                        }
                    }
                    startIndex = endIndex;
                    endIndex += size;
                    if (endIndex > IDList.Count)
                    {
                        endIndex = IDList.Count;
                    }
                }
                return true;
            }
            catch (Exception e)
            {
                msg = e.Message;
                return false;
            }
        }
        #endregion
        #region æ•°æ®åŒæ­¥
        public bool getData_MouldFileWeiXiuBaoYang(ref string msg)
        {
            //获取 åˆ†å±‚审核表 å®žä¾‹ID列表
            string appType = "APP_CSD7RLFJ3CTU330N3SCV";
            string systemToken = "9T566BD1NWMGH17C93CKA9M4AS0D233TNU0QL82";
            string userID = "011113050243860353";
            string formUuid = "FORM-30C78F46E77E46A9AA8778214CEFE6B5J0AN";
            int pageNumber = 1;
            int pageSize = 100;
            //获取模具维修保养表的实例ID列表
            List<string> IDList = new List<string>();
            if (getInstanceIDList_YiDa(appType, systemToken, userID, formUuid, pageNumber, pageSize, ref IDList, ref msg) == false)
            {
                return false;
            }
            //获取详细信息并附加到列表lsmain中
            List<MouldFileWeiXiuBaoYang> lsmain = new List<MouldFileWeiXiuBaoYang>();
            if (getInstanceDetailList___MouldFileWeiXiuBaoYang_YiDa(appType, systemToken, userID, formUuid, IDList, ref lsmain, ref msg) == false)
            {
                return false;
            }
            try
            {
                oCN.BeginTran();
                foreach (MouldFileWeiXiuBaoYang oItem in lsmain)
                {
                    //保养记录
                    if (oItem.DetailColMouldMaintain.Count != 0)
                    {
                        string BillType = "3819";
                        string sql = $@"select HInnerBillNo from Sc_MouldMaintainBillMain
                            where HInnerBillNo = '{oItem.HInstanceID}'";
                        DataSet ds = oCN.RunProcReturn(sql, "Sc_MouldMaintainBillMain");
                        if (ds.Tables[0].Rows.Count == 0)
                        {
                            long HInterID = DBUtility.ClsPub.CreateBillID(BillType, ref DBUtility.ClsPub.sExeReturnInfo);
                            string HBillNo = DBUtility.ClsPub.CreateBillCode_Prod(BillType, ref DBUtility.ClsPub.sExeReturnInfo, true);
                            //long HInterID = 0;
                            //string HBillNo = "";
                            string sql_main = "Insert Into Sc_MouldMaintainBillMain " +
                "(HBillType,HBillSubType,HInterID,HBillNo,HDate,HMaker,HMakeDate" +
                ",HYear,HPeriod,HRemark,HUpDateDate" +
                ",HPlanNo,HPlanInterID,HMouldID,HBeginDate" +
                ",HEndDate" +
                ",HInnerBillNo,HExplanation,HMouldMaintainRuleInterID,HMaintainLevID,HLastResult" +
                ")values('" + BillType + "','" + BillType + "'," + HInterID + ",'" + HBillNo + "',getdate(),'" + oItem.HOriginator + "','" + oItem.HMakeDate + "'" +
                      ",'" + DateTime.Now.Year + "','" + DateTime.Now.Month + "','"+ oItem.HRemark + "','" + oItem.HUpdateDate + "'" +
                      ",'','0','" + oItem.HMouldID + "','" + oItem.HRepairBeginDate + "'" +
                      ",'" + oItem.HRepairEndDate + "'" +
                      ",'" + oItem.HInstanceID + "','',0,0,'OK')";
                            LogService.Write(sql_main);
                            oCN.RunProc(sql_main);
                            int i = 1;
                            foreach (Sc_MouldMaintainBillSub oItem_Detail in oItem.DetailColMouldMaintain)
                            {
                                string sql_sub = "Insert into Sc_MouldMaintainBillSub_Item" +
                          " (HInterID,HEntryID,HMaintainItemID,HMaintainItem" +
                          ",HMaintainPart,HClaim" +
                          ",HManagerID" +
                          ",HCloseMan,HCloseType,HRemark" +
                          ",HSourceInterID,HSourceEntryID,HSourceBillNo,HSourceBillType,HRelationQty,HRelationMoney,HMaintainResult" +
                          ") values('" + HInterID + "'," + i + ",0,'" + oItem_Detail.HClaim + "'" +
                     ",'','" + oItem_Detail.HClaim + "'" +
                     ",'" + oItem.HEmpID + "'" +
                     ",'','','" + oItem_Detail.HMaintainResult + "'" +
                     ",'0','0','','',0,0,'')";
                                LogService.Write(sql_sub);
                                oCN.RunProc(sql_sub);
                                i += 1;
                            }
                        }
                    }
                    //维修记录
                    if (oItem.DetailColMouldRepair.Count != 0)
                    {
                        string BillType = "3807";
                        string sql = $@"select HInnerBillNo from Sc_MouldRepairWorkBillMain
                            where HInnerBillNo = '{oItem.HInstanceID}'";
                        DataSet ds = oCN.RunProcReturn(sql, "Sc_MouldRepairWorkBillMain");
                        if (ds.Tables[0].Rows.Count == 0)
                        {
                            long HInterID = DBUtility.ClsPub.CreateBillID(BillType, ref DBUtility.ClsPub.sExeReturnInfo);
                            string HBillNo = DBUtility.ClsPub.CreateBillCode_Prod(BillType, ref DBUtility.ClsPub.sExeReturnInfo, true);
                            //long HInterID = 0;
                            //string HBillNo = "";
                            string sql_main = "Insert Into Sc_MouldRepairWorkBillMain " +
                "(HBillType,HBillSubType,HInterID,HBillNo,HDate" +
                ",HYear,HPeriod,HRemark,HMaker,HMakeDate" +
                ",HEquipID,HRepairID,HRepairBeginDate,HRepairEndDate,HRepairContent" +
                ",HCycleUnit,HPlanTimes,HTimes,HEmpID,HManagerID" +
                ",HDeptID,HExplanation,HInnerBillNo,HMouldID" +
                ",HSupID,HRepairType,HNewModel,HNewDesignLife,HMainSourceBillType,HMainSourceInterID,HMainSourceEntryID" +
                ")values('" + BillType + "','" + BillType + "'," + HInterID + ",'" + HBillNo + "',getdate()" +
                ",'" + DateTime.Now.Year + "','" + DateTime.Now.Month + "','','" + oItem.HOriginator + "','" + oItem.HMakeDate + "'" +
                      ",'0','0','" + oItem.HRepairBeginDate + "','" + oItem.HUpdateDate + "',''" +
                      ",'小时','" + oItem.HPlanTimes + "','" + oItem.HTimes + "','" + oItem.HEmpID + "',0" +
                      ",'" + oItem.HDeptID + "','','" + oItem.HInstanceID + "','" + oItem.HMouldID + "'" +
                      ",'0','内部维修','','" + oItem.HNewDesignLife + "','',0,0)";
                            LogService.Write(sql_main);
                            oCN.RunProc(sql_main);
                            int i = 1;
                            foreach (Sc_MouldRepairWorkBillSub oItem_Detail in oItem.DetailColMouldRepair)
                            {
                                string sql_sub = "Insert into Sc_MouldRepairWorkBillSub " +
                       " (HInterID,HEntryID,HCloseMan,HEntryCloseDate,HCloseType,HRemark" +
                       ",HSourceInterID,HSourceEntryID,HSourceBillNo,HSourceBillType,HRelationQty,HRelationMoney" +
                       ",HRepairID,HRepairExplanation,HManagerID,HMoney) values" +
                       "('" + HInterID + "'," + i + ",'','','','" + oItem_Detail.HRemark + "'" +
                          ",0,0,'','',0,0" +
                          ",0,'" + oItem_Detail.HRepairExplanation + "','" + oItem.HEmpID + "',0)";
                                LogService.Write(sql_sub);
                                oCN.RunProc(sql_sub);
                                i += 1;
                            }
                        }
                    }
                }
                oCN.Commit();
                return true;
            }
            catch (Exception e)
            {
                msg = e.Message;
                oCN.RollBack();
                return false;
            }
        }
        #endregion
        #endregion
        #region æ•°æ®åŒæ­¥-设备维修记录单
        #region èŽ·å– å®œæ­-设备维修记录单 å®žä¾‹ID列表对应的实例详情
        public bool getInstanceDetailList___EquipRepairWeiXiu_YiDa(string appType, string systemToken, string userID, string formUuid, List<string> IDList, ref List<EquipRepairWeiXiu> lsmain, ref string msg, int size = 500)
        {
            try
            {
                int startIndex = 0;
                int endIndex = startIndex + size;
                if (endIndex > IDList.Count)
                {
                    endIndex = IDList.Count;
                }
                while (startIndex < endIndex && endIndex <= IDList.Count)
                {
                    List<string> IDList_temp = new List<string>();
                    for (int i = startIndex; i < endIndex; i++)
                    {
                        IDList_temp.Add(IDList[i]);
                    }
                    BatchGetFormDataByIdListResponse response = new BatchGetFormDataByIdListResponse();
                    if (getInstanceDetailListByInstanceIDList_YiDa(appType, systemToken, formUuid, userID, IDList_temp, ref response, ref msg) == false)
                    {
                        return false;
                    }
                    for (int i = 0; i < response.Body.Result.Count; i++)
                    {
                        try
                        {
                            List<string> keys = new List<string>(response.Body.Result[i].FormData.Keys);
                            EquipRepairWeiXiu oItem = new EquipRepairWeiXiu();
                            oItem.HMakerID = response.Body.Result[i].CreatorUserId.Replace("'", "");
                            oItem.HMaker = response.Body.Result[i].CreatorUserId.Replace("'", "");
                            oItem.HMakeDate = response.Body.Result[i].CreateTimeGMT.Replace("T", " ").Replace("Z", "").Replace("'", "");
                            oItem.HUpdaterID = response.Body.Result[i].ModifyUser.UserId.Replace("'", "");
                            oItem.HUpdater = response.Body.Result[i].ModifyUser.Name.NameInChinese.Replace("'", "");
                            oItem.HUpdateDate = response.Body.Result[i].ModifiedTimeGMT.Replace("T", " ").Replace("Z", "").Replace("'", "");
                            oItem.HInstanceID = response.Body.Result[i].FormInstanceId.Replace("'", "");
                            oItem.HOriginator = response.Body.Result[i].Originator.Name.NameInChinese.Replace("'", "");
                            GetInstanceByIdResponse getInstanceByIdResponse = new GetInstanceByIdResponse(); ;
                            if (!getInstanceStatusByInstanceID__YiDa(appType, systemToken, userID, oItem.HInstanceID, ref getInstanceByIdResponse, ref msg))
                            {
                                continue;
                            }
                            if (getInstanceByIdResponse.Body.InstanceStatus != "COMPLETED")
                            {
                                continue;
                            }
                            //设备编码
                            if (keys.Contains("textField_lfg9hgys"))
                            {
                                string HDate_Temp = response.Body.Result[i].FormData["textField_lfg9hgys"].ToString();
                                DataSet ds = oCN.RunProcReturn("select * from Gy_MouldFileMain with(nolock)  where HNumber='" + HDate_Temp + "'", "Gy_MouldFileMain");
                                string HEquipID = "0";
                                if (ds.Tables[0].Rows.Count > 0)
                                {
                                    HEquipID = ds.Tables[0].Rows[0]["HInterID"].ToString();
                                }
                                oItem.HEquipID = long.Parse(HEquipID);
                                oItem.HRemark2 = HDate_Temp;
                            }
                            //维修部门
                            if (keys.Contains("selectField_kzgkw10a"))
                            {
                                string HDate_Temp = response.Body.Result[i].FormData["selectField_kzgkw10a"].ToString();
                                DataSet ds = oCN.RunProcReturn("select * from Gy_Department with(nolock)  where HName='" + HDate_Temp + "'", "Gy_Department");
                                string HDeptID = "0";
                                if (ds.Tables[0].Rows.Count > 0)
                                {
                                    HDeptID = ds.Tables[0].Rows[0]["HItemID"].ToString();
                                }
                                oItem.HDeptID = long.Parse(HDeptID);
                            }
                            //维修人
                            if (keys.Contains("employeeField_lthwkdh2"))
                            {
                                string[] HDate_Temp = JsonConvert.DeserializeObject<string[]>(JsonConvert.SerializeObject(response.Body.Result[i].FormData["employeeField_lthwkdh2"]));
                                DataSet ds = oCN.RunProcReturn("select * from Gy_Employee with(nolock)  where HNumber='" + HDate_Temp[0] + "'", "Gy_Employee");
                                string HEmpID = "0";
                                if (ds.Tables[0].Rows.Count > 0)
                                {
                                    HEmpID = ds.Tables[0].Rows[0]["HItemID"].ToString();
                                }
                                oItem.HEmpID = long.Parse(HEmpID);
                            }
                            //维修时间
                            if (keys.Contains("textField_l2r95oo2"))
                            {
                                string HDate_Temp = response.Body.Result[i].FormData["textField_l2r95oo2"].ToString();
                                oItem.HTimes = long.Parse(HDate_Temp);
                                oItem.HPlanTimes = long.Parse(HDate_Temp);
                            }
                            //维修内容
                            if (keys.Contains("textField_l2r9bvwk"))
                            {
                                string HDate_Temp = response.Body.Result[i].FormData["textField_l2r9bvwk"].ToString();
                                oItem.HRepairContent = HDate_Temp;
                            }
                            //子表 ç»´ä¿®è¦æ±‚ ç»´ä¿®å¤‡æ³¨(问题描述)
                            Sc_MouldRepairWorkBillSub sub = new Sc_MouldRepairWorkBillSub();
                            //维修要求
                            if (keys.Contains("textareaField_lthwo99r"))
                            {
                                string HDate_Temp = response.Body.Result[i].FormData["textareaField_lthwo99r"].ToString();
                                sub.HRepairExplanation = HDate_Temp;
                            }
                            //备注
                            if (keys.Contains("textField_l2r95oo0"))
                            {
                                string HDate_Temp = response.Body.Result[i].FormData["textField_l2r95oo0"].ToString();
                                sub.HRemark = HDate_Temp;
                            }
                            oItem.DetailColMouldRepair.Add(sub);
                            int startindex = response.Body.Result[i].Title.IndexOf("zh_CN") + 8;
                            oItem.HTitle = startIndex + response.Body.Result[i].Title.Substring(startindex).Replace("\"}", "").Replace("'", "");
                            if (keys.Contains("dateField_lo6w37hk"))
                            {
                                double HDate_Temp = double.Parse(response.Body.Result[i].FormData["dateField_lo6w37hk"].ToString());
                                oItem.HDate = convertFromMillisecondsToDateString(HDate_Temp, "yyyy-MM-dd");
                            }
                            if (keys.Contains("selectField_lockncvh_id"))
                            {
                                oItem.HArea = response.Body.Result[i].FormData["selectField_lockncvh_id"].ToString().Replace("'", "");
                            }
                            if (keys.Contains("selectField_lockncvg_id"))
                            {
                                oItem.HCheckLevel = response.Body.Result[i].FormData["selectField_lockncvg_id"].ToString().Replace("'", "");
                            }
                            if (keys.Contains("employeeField_lo6w37hf"))
                            {
                                oItem.HEmplpyee = ((List<object>)response.Body.Result[i].FormData["employeeField_lo6w37hf"])[0].ToString().Replace("'", "");
                            }
                            if (keys.Contains("employeeField_lo6w37hf_id"))
                            {
                                oItem.HEmployeeID = ((List<object>)response.Body.Result[i].FormData["employeeField_lo6w37hf_id"])[0].ToString().Replace("'", "");
                            }
                            lsmain.Add(oItem);
                        }
                        catch (Exception e)
                        {
                            continue;
                        }
                    }
                    startIndex = endIndex;
                    endIndex += size;
                    if (endIndex > IDList.Count)
                    {
                        endIndex = IDList.Count;
                    }
                }
                return true;
            }
            catch (Exception e)
            {
                msg = e.Message;
                return false;
            }
        }
        #endregion
        #region æ•°æ®åŒæ­¥
        public bool getData_EquipRepairWeiXiu(ref string msg)
        {
            //获取 åˆ†å±‚审核表 å®žä¾‹ID列表
            string appType = "APP_E2A54CQBDX3TZN51JGBI";
            string systemToken = "YKB660C1ZPNW58JDZKAP318W5VQE2RRMQL2YKZK";
            string userID = "011113050243860353";
            string formUuid = "FORM-OM566O7177LW0ARJ5IMFF63NTFKA34G9RL2YKN1";
            int pageNumber = 1;
            int pageSize = 100;
            //获取模具维修保养表的实例ID列表
            List<string> IDList = new List<string>();
            if (getInstanceIDList_YiDa(appType, systemToken, userID, formUuid, pageNumber, pageSize, ref IDList, ref msg) == false)
            {
                return false;
            }
            //获取详细信息并附加到列表lsmain中
            List<EquipRepairWeiXiu> lsmain = new List<EquipRepairWeiXiu>();
            if (getInstanceDetailList___EquipRepairWeiXiu_YiDa(appType, systemToken, userID, formUuid, IDList, ref lsmain, ref msg) == false)
            {
                return false;
            }
            try
            {
                oCN.BeginTran();
                foreach (EquipRepairWeiXiu oItem in lsmain)
                {
                    //维修记录
                    if (oItem.DetailColMouldRepair.Count != 0)
                    {
                        string BillType = "3910";
                        string sql = $@"select HInnerBillNo from Sb_EquipRepairWorkBillMain
                            where HInnerBillNo = '{oItem.HInstanceID}'";
                        DataSet ds = oCN.RunProcReturn(sql, "Sb_EquipRepairWorkBillMain");
                        if (ds.Tables[0].Rows.Count == 0)
                        {
                            long HInterID = DBUtility.ClsPub.CreateBillID(BillType, ref DBUtility.ClsPub.sExeReturnInfo);
                            string HBillNo = DBUtility.ClsPub.CreateBillCode_Prod(BillType, ref DBUtility.ClsPub.sExeReturnInfo, true);
                            //long HInterID = 0;
                            //string HBillNo = "";
                            string sql_main = "Insert Into Sb_EquipRepairWorkBillMain " +
                "(HBillType,HBillSubType,HInterID,HBillNo,HDate" +
                ",HYear,HPeriod,HRemark,HMaker,HMakeDate" +
                ",HEquipID,HRepairID,HPlanTimes,HEmpID,HManagerID,HTimes" +
                ",HDeptID,HExplanation,HInnerBillNo,HRepairBeginDate,HRepairEndDate" +
                ",HRepairContent,HCycleUnit,HMainSourceBillType,HMainSourceInterID,HMainSourceEntryID" +
                ")values('" + BillType + "','" + BillType + "'," + HInterID + ",'" + HBillNo + "',getdate()" +
                ",'" + DateTime.Now.Year + "','" + DateTime.Now.Month + "','"+ oItem.HRemark2 + "','" + oItem.HOriginator + "','" + oItem.HMakeDate + "'" +
                      ",'" + oItem.HEquipID + "','0','" + oItem.HTimes + "','" + oItem.HEmpID + "','" + oItem.HEmpID + "','" + oItem.HTimes + "'" +
                      ",'" + oItem.HDeptID + "','" + oItem.HExplanation + "','" + oItem.HInstanceID + "','',''" +
                      ",'" + oItem.HRepairContent + "','小时','','0',0)";
                            LogService.Write(sql_main);
                            oCN.RunProc(sql_main);
                            int i = 1;
                            foreach (Sc_MouldRepairWorkBillSub oItem_Detail in oItem.DetailColMouldRepair)
                            {
                                string sql_sub = "Insert into Sb_EquipRepairWorkBillSub " +
                       " (HInterID,HEntryID,HCloseMan,HEntryCloseDate,HCloseType,HRemark" +
                       ",HSourceInterID,HSourceEntryID,HSourceBillNo,HSourceBillType,HRelationQty,HRelationMoney" +
                       ",HRepairID,HManagerID,HRepairExplanation,HEmpID)" +
                       "values('" + HInterID + "'," + i + ",'','','','" + oItem_Detail.HRemark + "'" +
                          ",0,0,'','',0,0" +
                          ",0,'" + oItem.HEmpID + "','" + oItem_Detail.HRepairExplanation + "','" + oItem.HEmpID + "')";
                                LogService.Write(sql_sub);
                                oCN.RunProc(sql_sub);
                                i += 1;
                            }
                        }
                    }
                }
                oCN.Commit();
                return true;
            }
            catch (Exception e)
            {
                msg = e.Message;
                oCN.RollBack();
                return false;
            }
        }
        #endregion
        #endregion
        #endregion
WebAPI/Controllers/ÌõÂë¹ÜÀí/WEBSController.cs
@@ -1201,6 +1201,56 @@
        #endregion
        #region æ‰«ç æ¨¡å—    è¿”回源单列表信息
        /// <summary>
        /// æºå•列表信息,根据单据类型、源单类型、组织ID返回源单列表信息
        /// </summary>
        /// <returns></returns>
        [Route("WEBSController/GetSourceBillList_Json")]
        [HttpGet]
        public object GetSourceBillList_Json(string HBillType, string HSourceBillType, Int64 HStockOrgID, string HSourceBillNo, string HMater)
        {
            try
            {
                ds = oCn.RunProcReturn("exec h_p_WMS_GetSourceBillList '" + HBillType + "','" + HSourceBillType + "'," + HStockOrgID.ToString() + ",'" + HSourceBillNo + "', '" + HMater + "'", "h_p_WMS_GetSourceBillList");
                if (ds == null || ds.Tables[0].Rows.Count == 0)
                {
                    objJsonResult.code = "0";
                    objJsonResult.count = 0;
                    objJsonResult.Message = "没有返回任何源单信息!";
                    objJsonResult.data = null;
                    return objJsonResult;
                }
                else
                {
                    List<object> columnNameList = new List<object>();
                    //添加列名
                    foreach (DataColumn col in ds.Tables[0].Columns)
                    {
                        Type dataType = col.DataType;
                        string ColmString = "{\"ColmCols\":\"" + col.ColumnName + "\",\"ColmType\":\"" + dataType.Name + "\"}";
                        columnNameList.Add(JsonConvert.DeserializeObject(ColmString));  //获取到DataColumn列对象的列名
                    }
                    objJsonResult.code = "0";
                    objJsonResult.count = 1;
                    objJsonResult.Message = "获取源单单据信息成功!";
                    objJsonResult.data = ds.Tables[0];
                    objJsonResult.list = columnNameList;
                    return objJsonResult;
                }
            }
            catch (Exception e)
            {
                objJsonResult.code = "0";
                objJsonResult.count = 0;
                objJsonResult.Message = "获取源单单据信息失败!" + e.ToString();
                objJsonResult.data = null;
                return objJsonResult;
            }
        }
        #endregion
        #region æ‰«ç æ¨¡å—    æ ¹æ®æ¡ç åˆ é™¤ç¼“存列表中对应条码记录
        /// <summary>
WebAPI/DLL/ClsSb_EquipMaintainRuleBill.cs
@@ -56,7 +56,8 @@
                ",HExplanation='" + omodel.HExplanation + "'" +
                ",HInnerBillNo='" + omodel.HInnerBillNo + "'" +
                ",HMaintainLevID=" + omodel.HMaintainLevID +
                ",HSafeDays=" + omodel.HSafeDays +
                ",HSafeDays=" + omodel.HSafeDays +
                ",HErrWarDays=" + omodel.HErrWarDays +
                " where HInterID=" + lngBillKey.ToString());
                //删除关联
                DeleteRelation(ref sReturn, lngBillKey);
@@ -122,11 +123,11 @@
                oCn.RunProc("Insert Into Sb_EquipMaintainRuleBillMain   " +
                "(HBillType,HBillSubType,HInterID,HBillNo,HDate,HMaker,HMakeDate" +
                ",HYear,HPeriod,HRemark" +
                ",HCheckCycle,HCycleUnit,HExplanation,HInnerBillNo,HMaintainLevID,HSafeDays" +
                ",HCheckCycle,HCycleUnit,HExplanation,HInnerBillNo,HMaintainLevID,HSafeDays,HErrWarDays" +
                ") " +
                " values('" + this.BillType + "','" + this.HBillSubType + "'," + omodel.HInterID.ToString() + ",'" + omodel.HBillNo + "','" + omodel.HDate + "','" + omodel.HMaker + "',getdate()" +
                "," + omodel.HYear.ToString() + "," + omodel.HPeriod.ToString() + ",'" + omodel.HRemark + 
                "',"+ omodel.HCheckCycle.ToString() + ",'" + omodel.HCycleUnit + "','" + omodel.HExplanation + "','" + omodel.HInnerBillNo + "'," + omodel.HMaintainLevID + "," + omodel.HSafeDays +
                "',"+ omodel.HCheckCycle.ToString() + ",'" + omodel.HCycleUnit + "','" + omodel.HExplanation + "','" + omodel.HInnerBillNo + "'," + omodel.HMaintainLevID + "," + omodel.HSafeDays +", " + omodel.HErrWarDays +
                ") ");
                //插入保养项子表
WebAPI/Models/ClsSb_EquipMaintainRuleBillMain.cs
@@ -15,5 +15,6 @@
        public Int64 HMaintainLevID; //保养级别(gy_HMaintainLev)
        public Int64 HSafeDays;//保养安全天数
        public Int64 HErrWarDays;//保养预警天数
    }
}
WebAPI/Properties/PublishProfiles/FolderProfile10.pubxml.user
@@ -4,7 +4,7 @@
-->
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
  <PropertyGroup>
    <History>True|2024-09-13T02:20:53.2644847Z;False|2024-09-13T10:19:33.7686753+08:00;True|2024-09-12T19:15:21.9135805+08:00;False|2024-09-12T19:15:07.2717017+08:00;True|2024-09-12T17:25:26.5527019+08:00;True|2024-09-12T17:20:42.2498355+08:00;True|2024-09-12T17:16:44.8817635+08:00;True|2024-09-12T17:16:02.4132675+08:00;True|2024-09-12T17:08:14.2819047+08:00;True|2024-09-12T16:07:15.3675281+08:00;True|2024-09-12T16:06:23.8568906+08:00;True|2024-09-12T15:48:45.1455315+08:00;True|2024-09-12T14:59:30.0679595+08:00;True|2024-09-12T14:18:21.9534092+08:00;True|2024-09-12T14:07:35.2885035+08:00;False|2024-09-12T14:06:30.5732168+08:00;False|2024-09-12T14:06:17.1404767+08:00;True|2024-09-12T14:03:12.8150228+08:00;True|2024-09-12T13:53:20.7537798+08:00;True|2024-09-12T13:48:43.2408012+08:00;False|2024-09-12T13:48:36.5217018+08:00;True|2024-09-11T20:20:57.7845361+08:00;False|2024-09-11T20:20:38.9732855+08:00;True|2024-09-10T15:15:04.6204983+08:00;True|2024-09-10T11:33:55.3963324+08:00;True|2024-09-10T11:10:10.3836571+08:00;True|2024-09-10T10:39:06.5850395+08:00;True|2024-09-10T10:27:33.2463582+08:00;False|2024-09-10T10:26:05.4608008+08:00;True|2024-09-09T19:14:08.0718627+08:00;True|2024-09-09T19:08:42.5709780+08:00;False|2024-09-09T19:08:33.7817129+08:00;True|2024-09-06T17:00:13.2484828+08:00;False|2024-09-06T17:00:06.1281061+08:00;True|2024-09-05T11:39:53.4537518+08:00;False|2024-09-05T11:39:04.6111418+08:00;True|2024-09-04T12:39:24.8111127+08:00;True|2024-09-04T12:12:57.9411095+08:00;False|2024-09-04T12:12:28.6748628+08:00;True|2024-09-03T14:45:30.8259459+08:00;False|2024-09-03T14:45:19.1997455+08:00;True|2024-08-30T16:08:31.2415230+08:00;True|2024-08-30T15:18:36.6727666+08:00;True|2024-08-28T09:49:18.1543721+08:00;False|2024-08-28T09:49:11.7260337+08:00;True|2024-08-27T13:18:40.6234335+08:00;False|2024-08-27T13:18:33.9730040+08:00;True|2024-08-26T17:40:29.9158973+08:00;True|2024-08-26T17:21:30.8800173+08:00;True|2024-08-26T17:19:23.9260010+08:00;True|2024-08-26T14:27:20.8154004+08:00;True|2024-08-26T14:16:14.4482284+08:00;True|2024-08-26T13:12:42.9574127+08:00;True|2024-08-26T12:48:31.2107630+08:00;True|2024-08-26T11:07:15.1181342+08:00;False|2024-08-26T11:07:09.9429791+08:00;True|2024-08-26T10:49:20.8494484+08:00;True|2024-08-26T10:13:11.5222607+08:00;False|2024-08-26T10:12:59.1146882+08:00;True|2024-08-23T15:39:39.9842990+08:00;False|2024-08-23T15:39:33.9824708+08:00;True|2024-08-22T16:55:46.4689463+08:00;True|2024-08-22T16:44:25.0981764+08:00;True|2024-08-22T16:19:29.9801909+08:00;True|2024-08-22T14:25:13.5120259+08:00;True|2024-08-22T09:48:50.0760398+08:00;True|2024-08-21T16:09:41.0487181+08:00;True|2024-08-21T15:42:13.7474317+08:00;True|2024-08-21T15:10:24.6912112+08:00;True|2024-08-21T14:56:51.3255866+08:00;True|2024-08-21T14:50:12.3359730+08:00;True|2024-08-19T15:43:16.1549663+08:00;True|2024-08-19T15:27:26.4219971+08:00;True|2024-08-19T09:41:45.7449029+08:00;True|2024-06-08T12:38:30.4153773+08:00;True|2024-06-07T21:22:19.4545597+08:00;True|2024-06-07T21:05:53.1963741+08:00;True|2024-06-07T21:00:57.2568708+08:00;True|2024-06-07T14:39:19.6618679+08:00;True|2024-06-07T14:21:51.5169962+08:00;True|2024-06-07T11:29:08.0690999+08:00;True|2024-06-07T11:26:29.1494329+08:00;True|2024-06-07T11:20:41.2024309+08:00;True|2024-06-07T10:12:26.5905597+08:00;False|2024-06-07T10:11:35.3679434+08:00;</History>
    <History>True|2024-09-18T08:52:00.1148169Z;True|2024-09-18T15:38:57.9090829+08:00;True|2024-09-18T14:31:35.3097924+08:00;True|2024-09-18T14:14:45.1332631+08:00;True|2024-09-18T10:03:32.4149929+08:00;True|2024-09-18T09:59:34.6584259+08:00;False|2024-09-18T09:59:28.1320018+08:00;True|2024-09-16T09:25:02.1321635+08:00;False|2024-09-16T09:24:52.9179557+08:00;True|2024-09-14T16:00:39.9413222+08:00;True|2024-09-14T15:57:04.7663346+08:00;True|2024-09-14T15:53:17.2804503+08:00;False|2024-09-14T15:53:10.3529010+08:00;True|2024-09-14T11:12:47.6871531+08:00;True|2024-09-14T11:09:14.5541471+08:00;True|2024-09-14T11:04:01.8286675+08:00;False|2024-09-14T11:03:52.5770773+08:00;True|2024-09-13T14:33:50.5043085+08:00;False|2024-09-13T14:33:44.9903004+08:00;True|2024-09-13T13:37:51.1937510+08:00;True|2024-09-13T10:20:53.2644847+08:00;False|2024-09-13T10:19:33.7686753+08:00;True|2024-09-12T19:15:21.9135805+08:00;False|2024-09-12T19:15:07.2717017+08:00;True|2024-09-12T17:25:26.5527019+08:00;True|2024-09-12T17:20:42.2498355+08:00;True|2024-09-12T17:16:44.8817635+08:00;True|2024-09-12T17:16:02.4132675+08:00;True|2024-09-12T17:08:14.2819047+08:00;True|2024-09-12T16:07:15.3675281+08:00;True|2024-09-12T16:06:23.8568906+08:00;True|2024-09-12T15:48:45.1455315+08:00;True|2024-09-12T14:59:30.0679595+08:00;True|2024-09-12T14:18:21.9534092+08:00;True|2024-09-12T14:07:35.2885035+08:00;False|2024-09-12T14:06:30.5732168+08:00;False|2024-09-12T14:06:17.1404767+08:00;True|2024-09-12T14:03:12.8150228+08:00;True|2024-09-12T13:53:20.7537798+08:00;True|2024-09-12T13:48:43.2408012+08:00;False|2024-09-12T13:48:36.5217018+08:00;True|2024-09-11T20:20:57.7845361+08:00;False|2024-09-11T20:20:38.9732855+08:00;True|2024-09-10T15:15:04.6204983+08:00;True|2024-09-10T11:33:55.3963324+08:00;True|2024-09-10T11:10:10.3836571+08:00;True|2024-09-10T10:39:06.5850395+08:00;True|2024-09-10T10:27:33.2463582+08:00;False|2024-09-10T10:26:05.4608008+08:00;True|2024-09-09T19:14:08.0718627+08:00;True|2024-09-09T19:08:42.5709780+08:00;False|2024-09-09T19:08:33.7817129+08:00;True|2024-09-06T17:00:13.2484828+08:00;False|2024-09-06T17:00:06.1281061+08:00;True|2024-09-05T11:39:53.4537518+08:00;False|2024-09-05T11:39:04.6111418+08:00;True|2024-09-04T12:39:24.8111127+08:00;True|2024-09-04T12:12:57.9411095+08:00;False|2024-09-04T12:12:28.6748628+08:00;True|2024-09-03T14:45:30.8259459+08:00;False|2024-09-03T14:45:19.1997455+08:00;True|2024-08-30T16:08:31.2415230+08:00;True|2024-08-30T15:18:36.6727666+08:00;True|2024-08-28T09:49:18.1543721+08:00;False|2024-08-28T09:49:11.7260337+08:00;True|2024-08-27T13:18:40.6234335+08:00;False|2024-08-27T13:18:33.9730040+08:00;True|2024-08-26T17:40:29.9158973+08:00;True|2024-08-26T17:21:30.8800173+08:00;True|2024-08-26T17:19:23.9260010+08:00;True|2024-08-26T14:27:20.8154004+08:00;True|2024-08-26T14:16:14.4482284+08:00;True|2024-08-26T13:12:42.9574127+08:00;True|2024-08-26T12:48:31.2107630+08:00;True|2024-08-26T11:07:15.1181342+08:00;False|2024-08-26T11:07:09.9429791+08:00;True|2024-08-26T10:49:20.8494484+08:00;True|2024-08-26T10:13:11.5222607+08:00;False|2024-08-26T10:12:59.1146882+08:00;True|2024-08-23T15:39:39.9842990+08:00;False|2024-08-23T15:39:33.9824708+08:00;True|2024-08-22T16:55:46.4689463+08:00;True|2024-08-22T16:44:25.0981764+08:00;True|2024-08-22T16:19:29.9801909+08:00;True|2024-08-22T14:25:13.5120259+08:00;True|2024-08-22T09:48:50.0760398+08:00;True|2024-08-21T16:09:41.0487181+08:00;True|2024-08-21T15:42:13.7474317+08:00;True|2024-08-21T15:10:24.6912112+08:00;True|2024-08-21T14:56:51.3255866+08:00;True|2024-08-21T14:50:12.3359730+08:00;True|2024-08-19T15:43:16.1549663+08:00;True|2024-08-19T15:27:26.4219971+08:00;True|2024-08-19T09:41:45.7449029+08:00;True|2024-06-08T12:38:30.4153773+08:00;True|2024-06-07T21:22:19.4545597+08:00;True|2024-06-07T21:05:53.1963741+08:00;True|2024-06-07T21:00:57.2568708+08:00;True|2024-06-07T14:39:19.6618679+08:00;True|2024-06-07T14:21:51.5169962+08:00;True|2024-06-07T11:29:08.0690999+08:00;True|2024-06-07T11:26:29.1494329+08:00;True|2024-06-07T11:20:41.2024309+08:00;True|2024-06-07T10:12:26.5905597+08:00;False|2024-06-07T10:11:35.3679434+08:00;</History>
    <_PublishTargetUrl>D:\网站发布\智云MESWMS\API</_PublishTargetUrl>
  </PropertyGroup>
  <ItemGroup>
@@ -45,28 +45,28 @@
      <publishTime>02/22/2013 16:43:40</publishTime>
    </File>
    <File Include="bin/BLL.dll">
      <publishTime>09/13/2024 10:18:38</publishTime>
      <publishTime>09/18/2024 16:51:19</publishTime>
    </File>
    <File Include="bin/BLL.pdb">
      <publishTime>09/13/2024 10:18:38</publishTime>
      <publishTime>09/18/2024 16:51:19</publishTime>
    </File>
    <File Include="bin/BouncyCastle.Crypto.dll">
      <publishTime>12/18/2020 05:32:28</publishTime>
    </File>
    <File Include="bin/DAL.dll">
      <publishTime>09/13/2024 10:18:37</publishTime>
      <publishTime>09/18/2024 16:51:17</publishTime>
    </File>
    <File Include="bin/DAL.pdb">
      <publishTime>09/13/2024 10:18:37</publishTime>
      <publishTime>09/18/2024 16:51:17</publishTime>
    </File>
    <File Include="bin/Dapper.dll">
      <publishTime>07/22/2016 22:52:40</publishTime>
    </File>
    <File Include="bin/DBUtility.dll">
      <publishTime>09/13/2024 10:18:34</publishTime>
      <publishTime>09/18/2024 16:51:15</publishTime>
    </File>
    <File Include="bin/DBUtility.pdb">
      <publishTime>09/13/2024 10:18:34</publishTime>
      <publishTime>09/18/2024 16:51:15</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>09/13/2024 10:18:35</publishTime>
      <publishTime>09/18/2024 16:51:16</publishTime>
    </File>
    <File Include="bin/Model.pdb">
      <publishTime>09/13/2024 10:18:35</publishTime>
      <publishTime>09/18/2024 16:51:16</publishTime>
    </File>
    <File Include="bin/Models/ClsSc_MouldScrapOutBillMain.cs">
      <publishTime>04/06/2023 15:57:02</publishTime>
@@ -147,34 +147,34 @@
      <publishTime>10/23/2021 17:07:54</publishTime>
    </File>
    <File Include="bin/Pub_Class.dll">
      <publishTime>09/13/2024 10:18:31</publishTime>
      <publishTime>09/18/2024 16:51:14</publishTime>
    </File>
    <File Include="bin/Pub_Class.pdb">
      <publishTime>09/13/2024 10:18:31</publishTime>
      <publishTime>09/18/2024 16:51:14</publishTime>
    </File>
    <File Include="bin/Pub_Control.dll">
      <publishTime>09/13/2024 10:18:32</publishTime>
      <publishTime>09/18/2024 16:51:15</publishTime>
    </File>
    <File Include="bin/Pub_Control.pdb">
      <publishTime>09/13/2024 10:18:32</publishTime>
      <publishTime>09/18/2024 16:51:15</publishTime>
    </File>
    <File Include="bin/RestSharp.dll">
      <publishTime>08/31/2012 06:22:50</publishTime>
    </File>
    <File Include="bin/SQLHelper.dll">
      <publishTime>09/13/2024 10:18:34</publishTime>
      <publishTime>09/18/2024 16:51:14</publishTime>
    </File>
    <File Include="bin/SQLHelper.pdb">
      <publishTime>09/13/2024 10:18:34</publishTime>
      <publishTime>09/18/2024 16:51:14</publishTime>
    </File>
    <File Include="bin/Swashbuckle.Core.dll">
      <publishTime>02/16/2015 01:57:08</publishTime>
    </File>
    <File Include="bin/SyntacticSugar.dll">
      <publishTime>09/13/2024 10:15:38</publishTime>
      <publishTime>09/18/2024 16:51:13</publishTime>
    </File>
    <File Include="bin/SyntacticSugar.pdb">
      <publishTime>09/13/2024 10:15:38</publishTime>
      <publishTime>09/18/2024 16:51:13</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>09/13/2024 10:18:34</publishTime>
      <publishTime>09/16/2024 09:23:15</publishTime>
    </File>
    <File Include="bin/TopSdk.pdb">
      <publishTime>09/13/2024 10:18:34</publishTime>
      <publishTime>09/16/2024 09:23:15</publishTime>
    </File>
    <File Include="bin/WebActivatorEx.dll">
      <publishTime>11/24/2014 19:18:48</publishTime>
    </File>
    <File Include="bin/WebAPI.dll">
      <publishTime>09/13/2024 10:18:58</publishTime>
      <publishTime>09/18/2024 16:51:38</publishTime>
    </File>
    <File Include="bin/WebAPI.pdb">
      <publishTime>09/13/2024 10:18:58</publishTime>
      <publishTime>09/18/2024 16:51:38</publishTime>
    </File>
    <File Include="bin/WebGrease.dll">
      <publishTime>07/18/2013 01:03:52</publishTime>
@@ -492,7 +492,7 @@
      <publishTime>05/06/2024 13:47:57</publishTime>
    </File>
    <File Include="Web.config">
      <publishTime>09/13/2024 10:20:52</publishTime>
      <publishTime>09/18/2024 16:51:59</publishTime>
    </File>
  </ItemGroup>
</Project>
WebAPI/Properties/PublishProfiles/FolderProfile6.pubxml
New file
@@ -0,0 +1,16 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
https://go.microsoft.com/fwlink/?LinkID=208121.
-->
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
  <PropertyGroup>
    <DeleteExistingFiles>False</DeleteExistingFiles>
    <ExcludeApp_Data>False</ExcludeApp_Data>
    <LaunchSiteAfterPublish>True</LaunchSiteAfterPublish>
    <LastUsedBuildConfiguration>Release</LastUsedBuildConfiguration>
    <LastUsedPlatform>Any CPU</LastUsedPlatform>
    <PublishProvider>FileSystem</PublishProvider>
    <PublishUrl>D:\网站发布\智云MESWMS\API</PublishUrl>
    <WebPublishMethod>FileSystem</WebPublishMethod>
  </PropertyGroup>
</Project>
WebAPI/Properties/PublishProfiles/FolderProfile6.pubxml.user
New file
@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
https://go.microsoft.com/fwlink/?LinkID=208121.
-->
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
</Project>
WebAPI/Properties/PublishProfiles/FolderProfilewtt.pubxml.user
@@ -45,28 +45,28 @@
      <publishTime>02/22/2013 16:43:40</publishTime>
    </File>
    <File Include="bin/BLL.dll">
      <publishTime>09/13/2024 15:10:57</publishTime>
      <publishTime>09/20/2024 08:59:29</publishTime>
    </File>
    <File Include="bin/BLL.pdb">
      <publishTime>09/13/2024 15:10:57</publishTime>
      <publishTime>09/20/2024 08:59:29</publishTime>
    </File>
    <File Include="bin/BouncyCastle.Crypto.dll">
      <publishTime>12/18/2020 05:32:28</publishTime>
    </File>
    <File Include="bin/DAL.dll">
      <publishTime>09/13/2024 15:10:55</publishTime>
      <publishTime>09/20/2024 08:59:27</publishTime>
    </File>
    <File Include="bin/DAL.pdb">
      <publishTime>09/13/2024 15:10:55</publishTime>
      <publishTime>09/20/2024 08:59:27</publishTime>
    </File>
    <File Include="bin/Dapper.dll">
      <publishTime>07/22/2016 22:52:40</publishTime>
    </File>
    <File Include="bin/DBUtility.dll">
      <publishTime>09/13/2024 15:10:49</publishTime>
      <publishTime>09/20/2024 08:59:19</publishTime>
    </File>
    <File Include="bin/DBUtility.pdb">
      <publishTime>09/13/2024 15:10:49</publishTime>
      <publishTime>09/20/2024 08:59:19</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>09/13/2024 15:10:50</publishTime>
      <publishTime>09/20/2024 08:59:20</publishTime>
    </File>
    <File Include="bin/Model.pdb">
      <publishTime>09/13/2024 15:10:50</publishTime>
      <publishTime>09/20/2024 08:59:20</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>09/13/2024 15:10:47</publishTime>
      <publishTime>09/20/2024 08:59:17</publishTime>
    </File>
    <File Include="bin/Pub_Class.pdb">
      <publishTime>09/13/2024 15:10:47</publishTime>
      <publishTime>09/20/2024 08:59:17</publishTime>
    </File>
    <File Include="bin/Pub_Control.dll">
      <publishTime>09/13/2024 15:10:48</publishTime>
      <publishTime>09/20/2024 08:59:18</publishTime>
    </File>
    <File Include="bin/Pub_Control.pdb">
      <publishTime>09/13/2024 15:10:48</publishTime>
      <publishTime>09/20/2024 08:59:18</publishTime>
    </File>
    <File Include="bin/RestSharp.dll">
      <publishTime>08/31/2012 06:22:50</publishTime>
    </File>
    <File Include="bin/SQLHelper.dll">
      <publishTime>09/13/2024 15:10:48</publishTime>
      <publishTime>09/20/2024 08:59:18</publishTime>
    </File>
    <File Include="bin/SQLHelper.pdb">
      <publishTime>09/13/2024 15:10:48</publishTime>
      <publishTime>09/20/2024 08:59:18</publishTime>
    </File>
    <File Include="bin/Swashbuckle.Core.dll">
      <publishTime>02/16/2015 01:57:08</publishTime>
    </File>
    <File Include="bin/SyntacticSugar.dll">
      <publishTime>09/13/2024 15:08:19</publishTime>
      <publishTime>09/20/2024 08:56:16</publishTime>
    </File>
    <File Include="bin/SyntacticSugar.pdb">
      <publishTime>09/13/2024 15:08:19</publishTime>
      <publishTime>09/20/2024 08:56:16</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>09/11/2024 21:15:43</publishTime>
      <publishTime>09/20/2024 08:56:23</publishTime>
    </File>
    <File Include="bin/TopSdk.pdb">
      <publishTime>09/11/2024 21:15:51</publishTime>
      <publishTime>09/20/2024 08:56:23</publishTime>
    </File>
    <File Include="bin/WebActivatorEx.dll">
      <publishTime>11/24/2014 19:18:48</publishTime>
    </File>
    <File Include="bin/WebAPI.dll">
      <publishTime>09/13/2024 15:11:26</publishTime>
      <publishTime>09/20/2024 08:59:57</publishTime>
    </File>
    <File Include="bin/WebAPI.pdb">
      <publishTime>09/13/2024 15:11:26</publishTime>
      <publishTime>09/20/2024 08:59:57</publishTime>
    </File>
    <File Include="bin/WebAPI.XmlSerializers.dll">
      <publishTime>08/16/2024 16:55:28</publishTime>
WebAPI/WebAPI.csproj.user
@@ -9,8 +9,7 @@
    <WebStackScaffolding_IsAsyncSelected>False</WebStackScaffolding_IsAsyncSelected>
    <NameOfLastUsedPublishProfile>FolderProfile</NameOfLastUsedPublishProfile>
    <NameOfLastUsedPublishProfile>D:\Git\houduan\WebAPI\Properties\PublishProfiles\FolderProfile.pubxml</NameOfLastUsedPublishProfile>
    <NameOfLastUsedPublishProfile>C:\Users\86130\Desktop\智云迈思\MES-WEB-API\WebAPI\Properties\PublishProfiles\FolderProfilewtt.pubxml</NameOfLastUsedPublishProfile>
    <NameOfLastUsedPublishProfile>D:\网站发布\后端代码\MES-WEB-API\MES-WEB-API\WebAPI\Properties\PublishProfiles\FolderProfile10.pubxml</NameOfLastUsedPublishProfile>
    <NameOfLastUsedPublishProfile>D:\智云迈思\MES\MES-WEB-API\WebAPI\Properties\PublishProfiles\FolderProfile10.pubxml</NameOfLastUsedPublishProfile>
    <LastActiveSolutionConfig>Debug|Any CPU</LastActiveSolutionConfig>
    <UseIISExpress>true</UseIISExpress>
    <Use64BitIISExpress />
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.AssemblyReference.cache
Binary files differ
sdk_dingding/TopSdk/obj/Debug/TopSdk.csproj.FileListAbsolute.txt
@@ -4,3 +4,9 @@
D:\网站发布\后端代码\MES-WEB-API\MES-WEB-API\sdk_dingding\TopSdk\obj\Debug\TopSdk.dll
D:\网站发布\后端代码\MES-WEB-API\MES-WEB-API\sdk_dingding\TopSdk\obj\Debug\TopSdk.pdb
D:\网站发布\后端代码\MES-WEB-API\MES-WEB-API\sdk_dingding\TopSdk\obj\Debug\TopSdk.csproj.AssemblyReference.cache
C:\Users\86130\Desktop\智云迈思\MES-WEB-API\sdk_dingding\TopSdk\bin\Debug\TopSdk.dll
C:\Users\86130\Desktop\智云迈思\MES-WEB-API\sdk_dingding\TopSdk\bin\Debug\TopSdk.pdb
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
C:\Users\86130\Desktop\智云迈思\MES-WEB-API\sdk_dingding\TopSdk\obj\Debug\TopSdk.csproj.AssemblyReference.cache
sdk_dingding/TopSdk/obj/Debug/TopSdk.dll
Binary files differ
sdk_dingding/TopSdk/obj/Debug/TopSdk.pdb
Binary files differ