initial commit

main
李岩峰 5 years ago
commit 981687018a

@ -0,0 +1,12 @@
[*]
# ReSharper properties
resharper_member_initializer_list_style=on_single_line
resharper_new_line_before_catch=false
resharper_new_line_before_else=false
resharper_new_line_before_while=false
resharper_simple_case_statement_style=line_break
resharper_simple_embedded_statement_style=line_break
resharper_wrap_after_expression_lbrace=false
resharper_wrap_before_expression_rbrace=false

369
.gitignore vendored

@ -0,0 +1,369 @@
# ---> C++
# Prerequisites
*.d
# Compiled Object files
*.slo
*.lo
*.o
*.obj
# Precompiled Headers
*.gch
*.pch
# Compiled Dynamic libraries
*.so
*.dylib
# Fortran module files
*.mod
*.smod
# Compiled Static libraries
*.lai
*.la
*.a
*.lib
# Executables
*.exe
*.out
*.app
## Ignore Visual Studio temporary files, build results, and
## files generated by popular Visual Studio add-ons.
##
## Get latest from https://github.com/github/gitignore/blob/master/VisualStudio.gitignore
# User-specific files
*.rsuser
*.suo
*.user
*.userosscache
*.sln.docstates
# User-specific files (MonoDevelop/Xamarin Studio)
*.userprefs
# Build results
[Dd]ebug/
[Dd]ebugPublic/
[Rr]elease/
[Rr]eleases/
x64/
x86/
bld/
[Bb]in/
[Oo]bj/
[Ll]og/
# Visual Studio 2015/2017 cache/options directory
.vs/
# Uncomment if you have tasks that create the project's static files in wwwroot
#wwwroot/
# Visual Studio 2017 auto generated files
Generated\ Files/
# MSTest test Results
[Tt]est[Rr]esult*/
[Bb]uild[Ll]og.*
# NUNIT
*.VisualState.xml
TestResult.xml
# Build Results of an ATL Project
[Dd]ebugPS/
[Rr]eleasePS/
dlldata.c
# Benchmark Results
BenchmarkDotNet.Artifacts/
# .NET Core
project.lock.json
project.fragment.lock.json
artifacts/
# StyleCop
StyleCopReport.xml
# Files built by Visual Studio
*_i.c
*_p.c
*_h.h
*.ilk
*.meta
*.obj
*.iobj
*.pch
*.pdb
*.ipdb
*.pgc
*.pgd
*.rsp
*.sbr
*.tlb
*.tli
*.tlh
*.tmp
*.tmp_proj
*_wpftmp.csproj
*.log
*.vspscc
*.vssscc
.builds
*.pidb
*.svclog
*.scc
# Chutzpah Test files
_Chutzpah*
# Visual C++ cache files
ipch/
*.aps
*.ncb
*.opendb
*.opensdf
*.sdf
*.cachefile
*.VC.db
*.VC.VC.opendb
# Visual Studio profiler
*.psess
*.vsp
*.vspx
*.sap
# Visual Studio Trace Files
*.e2e
# TFS 2012 Local Workspace
$tf/
# Guidance Automation Toolkit
*.gpState
# ReSharper is a .NET coding add-in
_ReSharper*/
*.[Rr]e[Ss]harper
*.DotSettings.user
# JustCode is a .NET coding add-in
.JustCode
# TeamCity is a build add-in
_TeamCity*
# DotCover is a Code Coverage Tool
*.dotCover
# AxoCover is a Code Coverage Tool
.axoCover/*
!.axoCover/settings.json
# Visual Studio code coverage results
*.coverage
*.coveragexml
# NCrunch
_NCrunch_*
.*crunch*.local.xml
nCrunchTemp_*
# MightyMoose
*.mm.*
AutoTest.Net/
# Web workbench (sass)
.sass-cache/
# Installshield output folder
[Ee]xpress/
# DocProject is a documentation generator add-in
DocProject/buildhelp/
DocProject/Help/*.HxT
DocProject/Help/*.HxC
DocProject/Help/*.hhc
DocProject/Help/*.hhk
DocProject/Help/*.hhp
DocProject/Help/Html2
DocProject/Help/html
# Click-Once directory
publish/
# Publish Web Output
*.[Pp]ublish.xml
*.azurePubxml
# Note: Comment the next line if you want to checkin your web deploy settings,
# but database connection strings (with potential passwords) will be unencrypted
*.pubxml
*.publishproj
# Microsoft Azure Web App publish settings. Comment the next line if you want to
# checkin your Azure Web App publish settings, but sensitive information contained
# in these scripts will be unencrypted
PublishScripts/
# NuGet Packages
*.nupkg
# The packages folder can be ignored because of Package Restore
**/[Pp]ackages/*
# except build/, which is used as an MSBuild target.
!**/[Pp]ackages/build/
# Uncomment if necessary however generally it will be regenerated when needed
#!**/[Pp]ackages/repositories.config
# NuGet v3's project.json files produces more ignorable files
*.nuget.props
*.nuget.targets
# Microsoft Azure Build Output
csx/
*.build.csdef
# Microsoft Azure Emulator
ecf/
rcf/
# Windows Store app package directories and files
AppPackages/
BundleArtifacts/
Package.StoreAssociation.xml
_pkginfo.txt
*.appx
# Visual Studio cache files
# files ending in .cache can be ignored
*.[Cc]ache
# but keep track of directories ending in .cache
!*.[Cc]ache/
# Others
ClientBin/
~$*
*~
*.dbmdl
*.dbproj.schemaview
*.jfm
*.pfx
*.publishsettings
orleans.codegen.cs
# Including strong name files can present a security risk
# (https://github.com/github/gitignore/pull/2483#issue-259490424)
#*.snk
# Since there are multiple workflows, uncomment next line to ignore bower_components
# (https://github.com/github/gitignore/pull/1529#issuecomment-104372622)
#bower_components/
# RIA/Silverlight projects
Generated_Code/
# Backup & report files from converting an old project file
# to a newer Visual Studio version. Backup files are not needed,
# because we have git ;-)
_UpgradeReport_Files/
Backup*/
UpgradeLog*.XML
UpgradeLog*.htm
ServiceFabricBackup/
*.rptproj.bak
# SQL Server files
*.mdf
*.ldf
*.ndf
# Business Intelligence projects
*.rdl.data
*.bim.layout
*.bim_*.settings
*.rptproj.rsuser
# Microsoft Fakes
FakesAssemblies/
# GhostDoc plugin setting file
*.GhostDoc.xml
# Node.js Tools for Visual Studio
.ntvs_analysis.dat
node_modules/
# Visual Studio 6 build log
*.plg
# Visual Studio 6 workspace options file
*.opt
# Visual Studio 6 auto-generated workspace file (contains which files were open etc.)
*.vbw
# Visual Studio LightSwitch build output
**/*.HTMLClient/GeneratedArtifacts
**/*.DesktopClient/GeneratedArtifacts
**/*.DesktopClient/ModelManifest.xml
**/*.Server/GeneratedArtifacts
**/*.Server/ModelManifest.xml
_Pvt_Extensions
# Paket dependency manager
.paket/paket.exe
paket-files/
# FAKE - F# Make
.fake/
# JetBrains Rider
.idea/
*.sln.iml
# CodeRush personal settings
.cr/personal
# Python Tools for Visual Studio (PTVS)
__pycache__/
*.pyc
# Cake - Uncomment if you are using it
# tools/**
# !tools/packages.config
# Tabs Studio
*.tss
# Telerik's JustMock configuration file
*.jmconfig
# BizTalk build output
*.btp.cs
*.btm.cs
*.odx.cs
*.xsd.cs
# OpenCover UI analysis results
OpenCover/
# Azure Stream Analytics local run output
ASALocalRun/
# MSBuild Binary and Structured Log
*.binlog
# NVidia Nsight GPU debugger configuration file
*.nvuser
# MFractors (Xamarin productivity tool) working folder
.mfractor/
# Local History for Visual Studio
.localhistory/
HEZON_ITK/x64/

@ -0,0 +1,21 @@
{
"configurations": [
{
"name": "Win32",
"includePath": [
"${workspaceFolder}/**"
],
"defines": [
"_DEBUG",
"UNICODE",
"_UNICODE"
],
"windowsSdkVersion": "8.1",
"compilerPath": "C:/Program Files (x86)/Microsoft Visual Studio 14.0/VC/bin/cl.exe",
"cStandard": "c11",
"cppStandard": "c++17",
"intelliSenseMode": "msvc-x64"
}
],
"version": 4
}

Binary file not shown.

@ -0,0 +1,26 @@

Microsoft Visual Studio Solution File, Format Version 11.00
# Visual Studio 2010
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "HEZON_ITK", "HEZON_ITK\HEZON_ITK.vcxproj", "{8E665218-4AC2-4DDD-A50E-4245BA64C3C3}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Win32 = Debug|Win32
Debug|x64 = Debug|x64
Release|Win32 = Release|Win32
Release|x64 = Release|x64
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{8E665218-4AC2-4DDD-A50E-4245BA64C3C3}.Debug|Win32.ActiveCfg = Debug|Win32
{8E665218-4AC2-4DDD-A50E-4245BA64C3C3}.Debug|Win32.Build.0 = Debug|Win32
{8E665218-4AC2-4DDD-A50E-4245BA64C3C3}.Debug|x64.ActiveCfg = Debug|x64
{8E665218-4AC2-4DDD-A50E-4245BA64C3C3}.Debug|x64.Build.0 = Debug|x64
{8E665218-4AC2-4DDD-A50E-4245BA64C3C3}.Release|Win32.ActiveCfg = Release|Win32
{8E665218-4AC2-4DDD-A50E-4245BA64C3C3}.Release|Win32.Build.0 = Release|Win32
{8E665218-4AC2-4DDD-A50E-4245BA64C3C3}.Release|x64.ActiveCfg = Release|x64
{8E665218-4AC2-4DDD-A50E-4245BA64C3C3}.Release|x64.Build.0 = Release|x64
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
EndGlobal

@ -0,0 +1,4 @@
<wpf:ResourceDictionary xml:space="preserve" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:s="clr-namespace:System;assembly=mscorlib" xmlns:ss="urn:shemas-jetbrains-com:settings-storage-xaml" xmlns:wpf="http://schemas.microsoft.com/winfx/2006/xaml/presentation">
<s:String x:Key="/Default/Environment/AssemblyExplorer/XmlDocument/@EntryValue">&lt;AssemblyExplorer&gt;&#xD;
&lt;Assembly Path="C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.0\mscorlib.dll" /&gt;&#xD;
&lt;/AssemblyExplorer&gt;</s:String></wpf:ResourceDictionary>

Binary file not shown.

Binary file not shown.

@ -0,0 +1,11 @@
// HEZON_ITK.cpp : 定义控制台应用程序的入口点。
//
#include "stdafx.h"
int _tmain(int argc, _TCHAR* argv[])
{
return 0;
}

@ -0,0 +1,192 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug|Win32">
<Configuration>Debug</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Debug|x64">
<Configuration>Debug</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|Win32">
<Configuration>Release</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|x64">
<Configuration>Release</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
</ItemGroup>
<PropertyGroup Label="Globals">
<ProjectGuid>{8E665218-4AC2-4DDD-A50E-4245BA64C3C3}</ProjectGuid>
<Keyword>Win32Proj</Keyword>
<RootNamespace>HEZON_ITK</RootNamespace>
<WindowsTargetPlatformVersion>8.1</WindowsTargetPlatformVersion>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<CharacterSet>Unicode</CharacterSet>
<PlatformToolset>v140</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<CharacterSet>Unicode</CharacterSet>
<PlatformToolset>v140</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>Unicode</CharacterSet>
<PlatformToolset>v140</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<WholeProgramOptimization>false</WholeProgramOptimization>
<CharacterSet>Unicode</CharacterSet>
<UseOfMfc>false</UseOfMfc>
<PlatformToolset>v140</PlatformToolset>
<CLRSupport>true</CLRSupport>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<PropertyGroup Label="UserMacros" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<LinkIncremental>true</LinkIncremental>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<LinkIncremental>true</LinkIncremental>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<LinkIncremental>false</LinkIncremental>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<LinkIncremental>false</LinkIncremental>
</PropertyGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<ClCompile>
<PrecompiledHeader>Use</PrecompiledHeader>
<WarningLevel>Level3</WarningLevel>
<Optimization>Disabled</Optimization>
<PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
</ClCompile>
<Link>
<SubSystem>Console</SubSystem>
<GenerateDebugInformation>true</GenerateDebugInformation>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<ClCompile>
<PrecompiledHeader>Use</PrecompiledHeader>
<WarningLevel>Level3</WarningLevel>
<Optimization>Disabled</Optimization>
<PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
</ClCompile>
<Link>
<SubSystem>Console</SubSystem>
<GenerateDebugInformation>true</GenerateDebugInformation>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<ClCompile>
<WarningLevel>Level3</WarningLevel>
<PrecompiledHeader>Use</PrecompiledHeader>
<Optimization>MaxSpeed</Optimization>
<FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>true</IntrinsicFunctions>
<PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
</ClCompile>
<Link>
<SubSystem>Console</SubSystem>
<GenerateDebugInformation>true</GenerateDebugInformation>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<OptimizeReferences>true</OptimizeReferences>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<ClCompile>
<WarningLevel>Level3</WarningLevel>
<PrecompiledHeader>NotUsing</PrecompiledHeader>
<Optimization>MaxSpeed</Optimization>
<FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>true</IntrinsicFunctions>
<PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;IPLIB=none;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<AdditionalIncludeDirectories>%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<CallingConvention>Cdecl</CallingConvention>
</ClCompile>
<Link>
<SubSystem>Console</SubSystem>
<GenerateDebugInformation>true</GenerateDebugInformation>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<OptimizeReferences>true</OptimizeReferences>
<AdditionalDependencies>Ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies>
<IgnoreSpecificDefaultLibraries>libuser_exits.ar.lib;%(IgnoreSpecificDefaultLibraries)</IgnoreSpecificDefaultLibraries>
<OutputFile>$(OutDir)\bs.dll</OutputFile>
<AdditionalOptions>/FORCE %(AdditionalOptions)</AdditionalOptions>
</Link>
<ProjectReference>
<UseLibraryDependencyInputs>false</UseLibraryDependencyInputs>
</ProjectReference>
</ItemDefinitionGroup>
<ItemGroup>
<None Include="..\..\..\..\..\..\Program Files\Common Files\System\ado\msado15.dll" />
<None Include="packages.config" />
<None Include="ReadMe.txt" />
</ItemGroup>
<ItemGroup>
<ClCompile Include="bs_bom_check.cpp" />
<ClCompile Include="bs_bom_save_check.cpp" />
<ClCompile Include="bs_bypass.cpp" />
<ClCompile Include="bs_file_transfer.cpp" />
<ClCompile Include="bs_sap.cpp" />
<ClCompile Include="bs_signoff.cxx" />
<ClCompile Include="bs_sign_cad.cpp" />
<ClCompile Include="bs_test_release_check.cpp" />
<ClCompile Include="bs_wl_check.cpp" />
<ClCompile Include="epm_register_handler.cxx" />
<ClCompile Include="bs_custom_main.cxx" />
<ClCompile Include="jd_add_attachments.cpp" />
<ClCompile Include="jd_batch_process.cpp" />
<ClCompile Include="jd_clear_field.cpp" />
<ClCompile Include="jd_schedule_joint.cpp" />
<ClCompile Include="jd_signoff.cpp" />
<ClCompile Include="util.cpp" />
</ItemGroup>
<ItemGroup>
<ClInclude Include="epm_handler_common.h" />
<ClInclude Include="epm_register_handler.h" />
<ClInclude Include="jd_clear_field.h" />
<ClInclude Include="util.h" />
<ClInclude Include="HTTPRequest.hpp" />
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
<Import Project="..\packages\teamcenter.12.0.0\build\teamcenter.targets" Condition="Exists('..\packages\teamcenter.12.0.0\build\teamcenter.targets')" />
<Import Project="..\packages\javasdk.8.0.0\build\javasdk.targets" Condition="Exists('..\packages\javasdk.8.0.0\build\javasdk.targets')" />
</ImportGroup>
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
<PropertyGroup>
<ErrorText>这台计算机上缺少此项目引用的 NuGet 程序包。使用“NuGet 程序包还原”可下载这些程序包。有关更多信息,请参见 http://go.microsoft.com/fwlink/?LinkID=322105。缺少的文件是 {0}。</ErrorText>
</PropertyGroup>
<Error Condition="!Exists('..\packages\teamcenter.12.0.0\build\teamcenter.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\teamcenter.12.0.0\build\teamcenter.targets'))" />
<Error Condition="!Exists('..\packages\javasdk.8.0.0\build\javasdk.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\javasdk.8.0.0\build\javasdk.targets'))" />
</Target>
</Project>

@ -0,0 +1,104 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup>
<Filter Include="源文件">
<UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
<Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
</Filter>
<Filter Include="头文件">
<UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
<Extensions>h;hpp;hxx;hm;inl;inc;xsd</Extensions>
</Filter>
<Filter Include="资源文件">
<UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier>
<Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms</Extensions>
</Filter>
<Filter Include="common">
<UniqueIdentifier>{d25e0aa0-8791-4277-b392-abc3943f925c}</UniqueIdentifier>
</Filter>
<Filter Include="epm-handler">
<UniqueIdentifier>{f8d4fa90-4363-4e0f-8f44-a2e02a224ad9}</UniqueIdentifier>
</Filter>
<Filter Include="userservice">
<UniqueIdentifier>{5f8496b0-ad7e-4c6c-b832-59575601b9f1}</UniqueIdentifier>
</Filter>
<Filter Include="bmf">
<UniqueIdentifier>{aa5fbb6b-b5ee-4f80-8b16-de99d912a542}</UniqueIdentifier>
</Filter>
</ItemGroup>
<ItemGroup>
<None Include="ReadMe.txt" />
<None Include="..\..\..\..\..\..\Program Files\Common Files\System\ado\msado15.dll" />
<None Include="packages.config" />
</ItemGroup>
<ItemGroup>
<ClCompile Include="epm_register_handler.cxx">
<Filter>epm-handler</Filter>
</ClCompile>
<ClCompile Include="bs_signoff.cxx">
<Filter>epm-handler</Filter>
</ClCompile>
<ClCompile Include="bs_custom_main.cxx">
<Filter>common</Filter>
</ClCompile>
<ClCompile Include="bs_bypass.cpp">
<Filter>epm-handler</Filter>
</ClCompile>
<ClCompile Include="bs_file_transfer.cpp">
<Filter>epm-handler</Filter>
</ClCompile>
<ClCompile Include="bs_sap.cpp">
<Filter>epm-handler</Filter>
</ClCompile>
<ClCompile Include="bs_sign_cad.cpp">
<Filter>epm-handler</Filter>
</ClCompile>
<ClCompile Include="bs_bom_check.cpp">
<Filter>epm-handler</Filter>
</ClCompile>
<ClCompile Include="bs_wl_check.cpp">
<Filter>epm-handler</Filter>
</ClCompile>
<ClCompile Include="bs_bom_save_check.cpp">
<Filter>epm-handler</Filter>
</ClCompile>
<ClCompile Include="util.cpp">
<Filter>epm-handler</Filter>
</ClCompile>
<ClCompile Include="jd_clear_field.cpp">
<Filter>epm-handler</Filter>
</ClCompile>
<ClCompile Include="jd_signoff.cpp">
<Filter>epm-handler</Filter>
</ClCompile>
<ClCompile Include="bs_test_release_check.cpp">
<Filter>epm-handler</Filter>
</ClCompile>
<ClCompile Include="jd_schedule_joint.cpp">
<Filter>epm-handler</Filter>
</ClCompile>
<ClCompile Include="jd_batch_process.cpp">
<Filter>epm-handler</Filter>
</ClCompile>
<ClCompile Include="jd_add_attachments.cpp">
<Filter>epm-handler</Filter>
</ClCompile>
</ItemGroup>
<ItemGroup>
<ClInclude Include="epm_register_handler.h">
<Filter>epm-handler</Filter>
</ClInclude>
<ClInclude Include="epm_handler_common.h">
<Filter>epm-handler</Filter>
</ClInclude>
<ClInclude Include="util.h">
<Filter>epm-handler</Filter>
</ClInclude>
<ClInclude Include="jd_clear_field.h">
<Filter>epm-handler</Filter>
</ClInclude>
<ClInclude Include="HTTPRequest.hpp">
<Filter>epm-handler</Filter>
</ClInclude>
</ItemGroup>
</Project>

@ -0,0 +1,3 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
</Project>

@ -0,0 +1,599 @@
//
// HTTPRequest
//
#ifndef HTTPREQUEST_HPP
#define HTTPREQUEST_HPP
#include <cctype>
#include <cstddef>
#include <cstdint>
#include <algorithm>
#include <functional>
#include <map>
#include <memory>
#include <stdexcept>
#include <string>
#include <system_error>
#include <type_traits>
#include <vector>
#ifdef _WIN32
# pragma push_macro("WIN32_LEAN_AND_MEAN")
# pragma push_macro("NOMINMAX")
# ifndef WIN32_LEAN_AND_MEAN
# define WIN32_LEAN_AND_MEAN
# endif
# ifndef NOMINMAX
# define NOMINMAX
# endif
# include <winsock2.h>
# if _WIN32_WINNT < _WIN32_WINNT_WINXP
char* strdup(const char* src) {
std::size_t length = 0;
while (src[length]) ++length;
char* result = static_cast<char*>(malloc(length + 1));
char* p = result;
while (*src) *p++ = *src++;
*p = '\0';
return result;
}
# include <wspiapi.h>
# endif
# include <ws2tcpip.h>
# pragma pop_macro("WIN32_LEAN_AND_MEAN")
# pragma pop_macro("NOMINMAX")
#else
#include <sys/socket.h>
#include <netinet/in.h>
# include <netdb.h>
# include <unistd.h>
# include <errno.h>
#endif
namespace http {
class RequestError : public std::logic_error {
public:
explicit RequestError(const char* str) : std::logic_error(str) { }
explicit RequestError(const std::string& str) : std::logic_error(str) { }
};
class ResponseError : public std::runtime_error {
public:
explicit ResponseError(const char* str) : std::runtime_error(str) { }
explicit ResponseError(const std::string& str) : std::runtime_error(str) { }
};
enum class InternetProtocol : std::uint8_t {
V4,
V6
};
inline namespace detail {
#ifdef _WIN32
class WinSock final {
public:
WinSock() {
WSADATA wsaData;
const int error = WSAStartup(MAKEWORD(2, 2), &wsaData);
if (error != 0)
throw std::system_error(error, std::system_category(), "WSAStartup failed");
if (LOBYTE(wsaData.wVersion) != 2 || HIBYTE(wsaData.wVersion) != 2) {
WSACleanup();
throw std::runtime_error("Invalid WinSock version");
}
started = true;
}
~WinSock() {
if (started) WSACleanup();
}
WinSock(const WinSock&) = delete;
WinSock& operator=(const WinSock&) = delete;
WinSock(WinSock&& other) noexcept:
started(other.started) {
other.started = false;
}
WinSock& operator=(WinSock&& other) noexcept {
if (&other == this) return *this;
if (started) WSACleanup();
started = other.started;
other.started = false;
return *this;
}
private:
bool started = false;
};
#endif
inline int getLastError() noexcept {
#ifdef _WIN32
return WSAGetLastError();
#else
return errno;
#endif
}
constexpr int getAddressFamily(InternetProtocol internetProtocol) {
return (internetProtocol == InternetProtocol::V4) ? AF_INET :
(internetProtocol == InternetProtocol::V6) ? AF_INET6 :
throw RequestError("Unsupported protocol");
}
#ifdef _WIN32
constexpr auto closeSocket = closesocket;
#else
constexpr auto closeSocket = close;
#endif
#if defined(__APPLE__) || defined(_WIN32)
constexpr int noSignal = 0;
#else
constexpr int noSignal = MSG_NOSIGNAL;
#endif
class Socket final {
public:
#ifdef _WIN32
using Type = SOCKET;
static constexpr Type invalid = INVALID_SOCKET;
#else
using Type = int;
static constexpr Type invalid = -1;
#endif
explicit Socket(InternetProtocol internetProtocol) :
endpoint(socket(getAddressFamily(internetProtocol), SOCK_STREAM, IPPROTO_TCP)) {
if (endpoint == invalid)
throw std::system_error(getLastError(), std::system_category(), "Failed to create socket");
#if defined(__APPLE__)
const int value = 1;
if (setsockopt(endpoint, SOL_SOCKET, SO_NOSIGPIPE, &value, sizeof(value)) == -1)
throw std::system_error(getLastError(), std::system_category(), "Failed to set socket option");
#endif
}
explicit Socket(Type s) noexcept:
endpoint(s) { }
~Socket() {
if (endpoint != invalid) closeSocket(endpoint);
}
Socket(const Socket&) = delete;
Socket& operator=(const Socket&) = delete;
Socket(Socket&& other) noexcept:
endpoint(other.endpoint) {
other.endpoint = invalid;
}
Socket& operator=(Socket&& other) noexcept {
if (&other == this) return *this;
if (endpoint != invalid) closeSocket(endpoint);
endpoint = other.endpoint;
other.endpoint = invalid;
return *this;
}
int connect(const struct sockaddr* address, socklen_t addressSize) noexcept {
return ::connect(endpoint, address, addressSize);
}
int send(const void* buffer, size_t length, int flags) noexcept {
return static_cast<int>(::send(endpoint,
reinterpret_cast<const char*>(buffer),
length, flags));
}
int recv(void* buffer, size_t length, int flags) noexcept {
return static_cast<int>(::recv(endpoint,
reinterpret_cast<char*>(buffer),
length, flags));
}
inline operator Type() const noexcept { return endpoint; }
private:
Type endpoint = invalid;
};
}
inline std::string urlEncode(const std::string& str) {
constexpr char hexChars[16] = { '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'A', 'B', 'C', 'D', 'E', 'F' };
std::string result;
for (auto i = str.begin(); i != str.end(); ++i) {
const std::uint8_t cp = *i & 0xFF;
if ((cp >= 0x30 && cp <= 0x39) || // 0-9
(cp >= 0x41 && cp <= 0x5A) || // A-Z
(cp >= 0x61 && cp <= 0x7A) || // a-z
cp == 0x2D || cp == 0x2E || cp == 0x5F) // - . _
result += static_cast<char>(cp);
else if (cp <= 0x7F) // length = 1
result += std::string("%") + hexChars[(*i & 0xF0) >> 4] + hexChars[*i & 0x0F];
else if ((cp >> 5) == 0x06) // length = 2
{
result += std::string("%") + hexChars[(*i & 0xF0) >> 4] + hexChars[*i & 0x0F];
if (++i == str.end()) break;
result += std::string("%") + hexChars[(*i & 0xF0) >> 4] + hexChars[*i & 0x0F];
} else if ((cp >> 4) == 0x0E) // length = 3
{
result += std::string("%") + hexChars[(*i & 0xF0) >> 4] + hexChars[*i & 0x0F];
if (++i == str.end()) break;
result += std::string("%") + hexChars[(*i & 0xF0) >> 4] + hexChars[*i & 0x0F];
if (++i == str.end()) break;
result += std::string("%") + hexChars[(*i & 0xF0) >> 4] + hexChars[*i & 0x0F];
} else if ((cp >> 3) == 0x1E) // length = 4
{
result += std::string("%") + hexChars[(*i & 0xF0) >> 4] + hexChars[*i & 0x0F];
if (++i == str.end()) break;
result += std::string("%") + hexChars[(*i & 0xF0) >> 4] + hexChars[*i & 0x0F];
if (++i == str.end()) break;
result += std::string("%") + hexChars[(*i & 0xF0) >> 4] + hexChars[*i & 0x0F];
if (++i == str.end()) break;
result += std::string("%") + hexChars[(*i & 0xF0) >> 4] + hexChars[*i & 0x0F];
}
}
return result;
}
struct Response final {
enum Status {
Continue = 100,
SwitchingProtocol = 101,
Processing = 102,
EarlyHints = 103,
Ok = 200,
Created = 201,
Accepted = 202,
NonAuthoritativeInformation = 203,
NoContent = 204,
ResetContent = 205,
PartialContent = 206,
MultiStatus = 207,
AlreadyReported = 208,
ImUsed = 226,
MultipleChoice = 300,
MovedPermanently = 301,
Found = 302,
SeeOther = 303,
NotModified = 304,
UseProxy = 305,
TemporaryRedirect = 307,
PermanentRedirect = 308,
BadRequest = 400,
Unauthorized = 401,
PaymentRequired = 402,
Forbidden = 403,
NotFound = 404,
MethodNotAllowed = 405,
NotAcceptable = 406,
ProxyAuthenticationRequired = 407,
RequestTimeout = 408,
Conflict = 409,
Gone = 410,
LengthRequired = 411,
PreconditionFailed = 412,
PayloadTooLarge = 413,
UriTooLong = 414,
UnsupportedMediaType = 415,
RangeNotSatisfiable = 416,
ExpectationFailed = 417,
ImaTeapot = 418,
MisdirectedRequest = 421,
UnprocessableEntity = 422,
Locked = 423,
FailedDependency = 424,
TooEarly = 425,
UpgradeRequired = 426,
PreconditionRequired = 428,
TooManyRequests = 429,
RequestHeaderFieldsTooLarge = 431,
UnavailableForLegalReasons = 451,
InternalServerError = 500,
NotImplemented = 501,
BadGateway = 502,
ServiceUnavailable = 503,
GatewayTimeout = 504,
HttpVersionNotSupported = 505,
VariantAlsoNegotiates = 506,
InsufficientStorage = 507,
LoopDetected = 508,
NotExtended = 510,
NetworkAuthenticationRequired = 511
};
int status = 0;
std::vector<std::string> headers;
std::vector<std::uint8_t> body;
};
class Request final {
public:
explicit Request(const std::string& url,
InternetProtocol protocol = InternetProtocol::V4) :
internetProtocol(protocol) {
const auto schemeEndPosition = url.find("://");
if (schemeEndPosition != std::string::npos) {
scheme = url.substr(0, schemeEndPosition);
path = url.substr(schemeEndPosition + 3);
} else {
scheme = "http";
path = url;
}
const auto fragmentPosition = path.find('#');
// remove the fragment part
if (fragmentPosition != std::string::npos)
path.resize(fragmentPosition);
const auto pathPosition = path.find('/');
if (pathPosition == std::string::npos) {
domain = path;
path = "/";
} else {
domain = path.substr(0, pathPosition);
path = path.substr(pathPosition);
}
const auto portPosition = domain.find(':');
if (portPosition != std::string::npos) {
port = domain.substr(portPosition + 1);
domain.resize(portPosition);
} else
port = "80";
}
Response send(const std::string& method,
const std::map<std::string, std::string>& parameters,
const std::vector<std::string>& headers = { }) {
std::string body;
bool first = true;
for (const auto& parameter : parameters) {
if (!first) body += "&";
first = false;
body += urlEncode(parameter.first) + "=" + urlEncode(parameter.second);
}
return send(method, body, headers);
}
Response send(const std::string& method = "GET",
const std::string& body = "",
const std::vector<std::string>& headers = { }) {
return send(method,
std::vector<uint8_t>(body.begin(), body.end()),
headers);
}
Response send(const std::string& method,
const std::vector<uint8_t>& body,
const std::vector<std::string>& headers) {
Response response;
if (scheme != "http")
throw RequestError("Only HTTP scheme is supported");
addrinfo hints = { };
hints.ai_family = getAddressFamily(internetProtocol);
hints.ai_socktype = SOCK_STREAM;
addrinfo* info;
if (getaddrinfo(domain.c_str(), port.c_str(), &hints, &info) != 0)
throw std::system_error(getLastError(), std::system_category(), "Failed to get address info of " + domain);
std::unique_ptr<addrinfo, decltype(&freeaddrinfo)> addressInfo(info, freeaddrinfo);
std::string headerData = method + " " + path + " HTTP/1.1\r\n";
for (const std::string& header : headers)
headerData += header + "\r\n";
headerData += "Host: " + domain + "\r\n";
headerData += "Content-Length: " + std::to_string(body.size()) + "\r\n";
headerData += "\r\n";
std::vector<uint8_t> requestData(headerData.begin(), headerData.end());
requestData.insert(requestData.end(), body.begin(), body.end());
Socket socket(internetProtocol);
// take the first address from the list
if (socket.connect(addressInfo->ai_addr, static_cast<socklen_t>(addressInfo->ai_addrlen)) == -1)
throw std::system_error(getLastError(), std::system_category(), "Failed to connect to " + domain + ":" + port);
auto remaining = requestData.size();
auto sendData = requestData.data();
// send the request
while (remaining > 0) {
const auto size = socket.send(sendData, remaining, noSignal);
if (size == -1)
throw std::system_error(getLastError(), std::system_category(), "Failed to send data to " + domain + ":" + port);
remaining -= static_cast<size_t>(size);
sendData += size;
}
std::uint8_t tempBuffer[4096];
constexpr std::uint8_t crlf[] = { '\r', '\n' };
std::vector<std::uint8_t> responseData;
bool firstLine = true;
bool parsedHeaders = false;
bool contentLengthReceived = false;
unsigned long contentLength = 0;
bool chunkedResponse = false;
std::size_t expectedChunkSize = 0;
bool removeCrlfAfterChunk = false;
// read the response
for (;;) {
const auto size = socket.recv(tempBuffer, sizeof(tempBuffer), noSignal);
if (size == -1)
throw std::system_error(getLastError(), std::system_category(), "Failed to read data from " + domain + ":" + port);
else if (size == 0)
break; // disconnected
responseData.insert(responseData.end(), tempBuffer, tempBuffer + size);
if (!parsedHeaders) {
for (;;) {
const auto i = std::search(responseData.begin(), responseData.end(), std::begin(crlf), std::end(crlf));
// didn't find a newline
if (i == responseData.end()) break;
const std::string line(responseData.begin(), i);
responseData.erase(responseData.begin(), i + 2);
// empty line indicates the end of the header section
if (line.empty()) {
parsedHeaders = true;
break;
} else if (firstLine) // first line
{
firstLine = false;
std::string::size_type lastPos = 0;
const auto length = line.length();
std::vector<std::string> parts;
// tokenize first line
while (lastPos < length + 1) {
auto pos = line.find(' ', lastPos);
if (pos == std::string::npos) pos = length;
if (pos != lastPos)
parts.emplace_back(line.data() + lastPos,
static_cast<std::vector<std::string>::size_type>(pos) - lastPos);
lastPos = pos + 1;
}
if (parts.size() >= 2)
response.status = std::stoi(parts[1]);
} else // headers
{
response.headers.push_back(line);
const auto pos = line.find(':');
if (pos != std::string::npos) {
std::string headerName = line.substr(0, pos);
std::string headerValue = line.substr(pos + 1);
// ltrim
headerValue.erase(headerValue.begin(),
std::find_if(headerValue.begin(), headerValue.end(),
[](int c) {return !std::isspace(c);}));
// rtrim
headerValue.erase(std::find_if(headerValue.rbegin(), headerValue.rend(),
[](int c) {return !std::isspace(c);}).base(),
headerValue.end());
if (headerName == "Content-Length") {
contentLength = std::stoul(headerValue);
contentLengthReceived = true;
response.body.reserve(contentLength);
} else if (headerName == "Transfer-Encoding") {
if (headerValue == "chunked")
chunkedResponse = true;
else
throw ResponseError("Unsupported transfer encoding: " + headerValue);
}
}
}
}
}
if (parsedHeaders) {
// Content-Length must be ignored if Transfer-Encoding is received
if (chunkedResponse) {
bool dataReceived = false;
for (;;) {
if (expectedChunkSize > 0) {
const auto toWrite = std::min(expectedChunkSize, responseData.size());
response.body.insert(response.body.end(), responseData.begin(), responseData.begin() + static_cast<ptrdiff_t>(toWrite));
responseData.erase(responseData.begin(), responseData.begin() + static_cast<ptrdiff_t>(toWrite));
expectedChunkSize -= toWrite;
if (expectedChunkSize == 0) removeCrlfAfterChunk = true;
if (responseData.empty()) break;
} else {
if (removeCrlfAfterChunk) {
if (responseData.size() >= 2) {
removeCrlfAfterChunk = false;
responseData.erase(responseData.begin(), responseData.begin() + 2);
} else break;
}
const auto i = std::search(responseData.begin(), responseData.end(), std::begin(crlf), std::end(crlf));
if (i == responseData.end()) break;
const std::string line(responseData.begin(), i);
responseData.erase(responseData.begin(), i + 2);
expectedChunkSize = std::stoul(line, nullptr, 16);
if (expectedChunkSize == 0) {
dataReceived = true;
break;
}
}
}
if (dataReceived)
break;
} else {
response.body.insert(response.body.end(), responseData.begin(), responseData.end());
responseData.clear();
// got the whole content
if (contentLengthReceived && response.body.size() >= contentLength)
break;
}
}
}
return response;
}
private:
#ifdef _WIN32
WinSock winSock;
#endif
InternetProtocol internetProtocol;
std::string scheme;
std::string domain;
std::string port;
std::string path;
};
}
#endif

@ -0,0 +1,223 @@
//
// NetworkRequest.cpp
//
// Created by duzixi.com on 15/8/25.
//
#include "NetworkRequest.h"
using namespace std;
using boost::asio::ip::tcp;
/// POST请求
string PostRequest(char* host, char* path, string form) {
long length = form.length();
// 声明Asio基础: io_service任务调度机
boost::asio::io_service io_service;
// 获取服务器终端列表
tcp::resolver resolver(io_service);
tcp::resolver::query query(host, "http");
tcp::resolver::iterator iter = resolver.resolve(query);
// 尝试连接每一个终端直到成功建立socket连接
tcp::socket socket(io_service);
boost::asio::connect(socket, iter);
// 构建网络请求头
// 指定 "Connection: close" 在获取应答后断开连接,确保获文件全部数据。
boost::asio::streambuf request;
ostream request_stream(&request);
request_stream << "POST " << path << " HTTP/1.1\r\n";
request_stream << "Host: " << host << "\r\n";
request_stream << "Accept: */*\r\n";
request_stream << "Content-Type:application/x-www-form-urlencoded\r\n";
request_stream << "Content-Length: " << length << "\r\n";
request_stream << "Connection: close\r\n\r\n"; // 注意这里是两个空行
request_stream << form; //POST 发送的数据本身不包含多于空行
// 发送请求
boost::asio::write(socket, request);
// 读取应答状态. 应答缓冲流 streambuf 会自动增长至完整的行
// 该增长可以在构造缓冲流时通过设置最大值限制
boost::asio::streambuf response;
boost::asio::read_until(socket, response, "\r\n");
// 检查应答是否OK.
istream response_stream(&response);// 应答流
string http_version;
response_stream >> http_version;
unsigned int status_code;
response_stream >> status_code;
string status_message;
getline(response_stream, status_message);
if (!response_stream || http_version.substr(0, 5) != "HTTP/") {
printf("无效响应\n");
}
if (status_code != 200) {
printf("响应返回 status code %d\n", status_code);
}
// 读取应答头部,遇到空行后停止
boost::asio::read_until(socket, response, "\r\n\r\n");
// 显示应答头部
string header;
int len = 0;
while (getline(response_stream, header) && header != "\r") {
if (header.find("Content-Length: ") == 0) {
stringstream stream;
stream << header.substr(16);
stream >> len;
}
}
long size = response.size();
if (size > 0) {
// .... do nothing
}
// 循环读取数据流,直到文件结束
boost::system::error_code error;
while (boost::asio::read(socket, response, boost::asio::transfer_at_least(1), error)) {
// 获取应答长度
size = response.size();
if (len != 0) {
cout << size << " Byte " << (size * 100) / len << "%\n";
}
}
if (error != boost::asio::error::eof) {
throw boost::system::system_error(error);
}
cout << size << " Byte 内容已下载完毕." << endl;
// 将streambuf类型转换为string类型返回
istream is(&response);
is.unsetf(ios_base::skipws);
string sz;
sz.append(istream_iterator<char>(is), istream_iterator<char>());
// 返回转换后的字符串
return sz;
}
/// GET请求
string GetRequest(char* host, char* path) {
// 声明Asio基础: io_service任务调度机
boost::asio::io_service io_service;
// 获取服务器终端列表
tcp::resolver resolver(io_service);
tcp::resolver::query query(host, "http");
tcp::resolver::iterator iter = resolver.resolve(query);
// 尝试连接每一个终端直到成功建立socket连接
tcp::socket socket(io_service);
boost::asio::connect(socket, iter);
// 构建网络请求头.
// 指定 "Connection: close" 在获取应答后断开连接,确保获文件全部数据。
boost::asio::streambuf request;
ostream request_stream(&request);
request_stream << "GET " << path << " HTTP/1.1\r\n";
request_stream << "Host: " << host << "\r\n";
request_stream << "Accept: */*\r\n";
request_stream << "Connection: close\r\n\r\n";
// 发送请求
boost::asio::write(socket, request);
// 读取应答状态. 应答缓冲流 streambuf 会自动增长至完整的行
// 该增长可以在构造缓冲流时通过设置最大值限制
boost::asio::streambuf response;
boost::asio::read_until(socket, response, "\r\n");
// 检查应答是否OK.
istream response_stream(&response);
string http_version;
response_stream >> http_version;
unsigned int status_code;
response_stream >> status_code;
string status_message;
getline(response_stream, status_message);
if (!response_stream || http_version.substr(0, 5) != "HTTP/") {
printf("响应无效\n");
}
if (status_code != 200) {
printf("响应返回 status code %d\n", status_code);
}
// 读取应答头部,遇到空行后停止
boost::asio::read_until(socket, response, "\r\n\r\n");
// 显示应答头部
string header;
int len = 0;
while (getline(response_stream, header) && header != "\r") {
if (header.find("Content-Length: ") == 0) {
stringstream stream;
stream << header.substr(16);
stream >> len;
}
}
long size = response.size();
if (size > 0) {
// ... do nothing ...
}
boost::system::error_code error; // 读取错误
// 循环读取数据流,直到文件结束
while (boost::asio::read(socket, response, boost::asio::transfer_at_least(1), error)) {
// 获取应答长度
size = response.size();
if (len != 0) {
cout << size << " Byte " << (size * 100) / len << "%" << endl;
}
}
// 如果没有读到文件尾,抛出异常
if (error != boost::asio::error::eof) {
throw boost::system::system_error(error);
}
cout << size << " Byte 内容已下载完毕." << endl;
// 将streambuf类型转换为string类型并返回
istream is(&response);
is.unsetf(ios_base::skipws);
string sz;
sz.append(istream_iterator<char>(is), istream_iterator<char>());
return sz;
}
/// GET请求(重载)
string GetRequest(string url) {
size_t index;
// 去掉url中的协议头
if (url.find("http://") != string::npos) {
url = url.substr(7);
}
printf("url:%s\n", url.c_str());
// 截取host字符串
index = url.find("/");
char* host = new char[index];
strcpy(host, url.substr(0, index).c_str());
// 截取urlPath字符串
char* urlPath = new char[url.length() - index + 1];
strcpy(urlPath, url.substr(index, url.length() - index).c_str());
return GetRequest(host, urlPath);
}

@ -0,0 +1,15 @@
//
// NetworkRequest.h
//
// Created by duzixi.com on 15/8/25.
//
#include <boost/asio.hpp>
using namespace std;
/// GETÇëÇó
string GetRequest(char* host, char* path);
string GetRequest(string url);
/// POSTÇëÇó
string PostRequest(char* host, char* path, string form);

@ -0,0 +1,36 @@
========================================================================
控制台应用程序HEZON_ITK 项目概述
========================================================================
应用程序向导已为您创建了此 HEZON_ITK 应用程序。
本文件概要介绍组成 HEZON_ITK 应用程序的每个文件的内容。
HEZON_ITK.vcxproj
这是使用应用程序向导生成的 VC++ 项目的主项目文件,
其中包含生成该文件的 Visual C++
的版本信息,以及有关使用应用程序向导选择的平台、配置和项目功能的信息。
HEZON_ITK.vcxproj.filters
这是使用“应用程序向导”生成的 VC++ 项目筛选器文件。
它包含有关项目文件与筛选器之间的关联信息。 在 IDE
中,通过这种关联,在特定节点下以分组形式显示具有相似扩展名的文件。
例如,“.cpp”文件与“源文件”筛选器关联。
HEZON_ITK.cpp
这是主应用程序源文件。
/////////////////////////////////////////////////////////////////////////////
其他标准文件:
StdAfx.hStdAfx.cpp
这些文件用于生成名为 HEZON_ITK.pch 的预编译头 (PCH) 文件和
名为 StdAfx.obj 的预编译类型文件。
/////////////////////////////////////////////////////////////////////////////
其他注释:
应用程序向导使用“TODO:”注释来指示应添加或自定义的源代码部分。
/////////////////////////////////////////////////////////////////////////////

@ -0,0 +1,88 @@
#include "util.h"
void judge(tag_t top,string &status,stringstream &ss)
{
int line_cnt;
tag_t *lines;
char *val;
BOM_line_ask_child_lines(top, &line_cnt, &lines);
for (int j = 0; j < line_cnt; j++)
{
AOM_UIF_ask_value(lines[j], "jd2_last_release_status", &val);
printf("status:%s\n", val);
string temp = val;
if (temp.length()>0&&status.find(val) != -1)
{
AOM_ask_value_string(lines[j], "bl_rev_object_string", &val);
ss << val << ',';
}
judge(lines[j], status, ss);
}
}
int bs_bom_check(EPM_rule_message_t msg)
{
int ifail = EPM_go, att_count, line_cnt;
tag_t rootTask, *attachments, win, top, *lines;
char *val;
EPM_ask_root_task(msg.task, &rootTask);
EPM_ask_attachments(rootTask, EPM_target_attachment, &att_count, &attachments);
TC_argument_list_t * arguments = msg.arguments;
int arg_cnt = TC_number_of_arguments(arguments), status = 0;
vector<string> types;
map<string, string> paras;
stringstream ss;
for (auto i = 0; i < arg_cnt; i++)
{
char *temp_key, *temp_val;
ITK_ask_argument_named_value(TC_next_argument(arguments), &temp_key, &temp_val);
paras[temp_key] = temp_val;
}
split(paras["type"].c_str(),",", &types);
printf("check status:%s\n", paras["status"].c_str());
BOM_create_window(&win);
for (int i = 0; i < att_count; i++)
{
bool pass = false;
for (int j = 0; j < types.size(); j++)
{
if (isTypeOf(attachments[i], types[j].c_str()))
{
pass = true;
break;
}
}
if (!pass)
continue;
printf("begin check \n");
char *hl;
AOM_ask_value_string(attachments[i], "jd2_ishl", &hl);
printf("hl:%s\n", hl);
if(tc_strcmp(hl,"ÊÇ")==0)
{
continue;
}
BOM_set_window_top_line(win, NULLTAG, attachments[i], NULLTAG, &top);
AOM_UIF_ask_value(top, "jd2_last_release_status", &val);
if (tc_strlen(val) && paras["status"].find(val) != -1)
{
AOM_ask_value_string(top, "bl_rev_object_string", &val);
ss << val << ',';
}
judge(top, paras["status"], ss);
printf("end check \n");
}
BOM_close_window(win);
if (ss.str().length()) {
ss<< paras["prompt"];
EMH_store_error_s1(EMH_severity_user_error, EMH_PROP_error_base, ss.str().c_str());
ifail = EPM_nogo;
}
return ifail;
}

@ -0,0 +1,86 @@
#include "util.h"
void save_judge(tag_t top, string &check, string &name, vector<string> &type_vec, vector<string> &quantity_type_vec, stringstream &ss, stringstream &status_ss)
{
int line_cnt;
tag_t *lines;
BOM_line_ask_child_lines(top, &line_cnt, &lines);
char *val;
for (int i = 0; i < line_cnt; i++)
{
AOM_ask_value_string(lines[i], "bl_item_object_type", &val);
printf("type :%s\n", val);
if (find(type_vec.begin(), type_vec.end(), val) != type_vec.end())
continue;
if (find(quantity_type_vec.begin(), quantity_type_vec.end(), val) != quantity_type_vec.end())
{
char *test;
AOM_ask_value_string(lines[i], "JD2_SFHL", &test);
printf("JD2_SFHL:%s\n", test);
if(tc_strcmp(test,"1")==0)
AOM_ask_value_string(lines[i], "JD2_sl", &val);
else
AOM_ask_value_string(lines[i], "bl_quantity", &val);
if (tc_strlen(val) == 0)
{
AOM_ask_value_string(lines[i], "bl_rev_object_string", &val);
ss << val << ",";
}
}
AOM_UIF_ask_value(lines[i], "jd2_last_release_status", &val);
string temp = val;
printf("length:%llu status:%s\n", temp.length(), val);
if (temp.length() == 0 || check.find(temp) != -1)
{
AOM_ask_value_string(lines[i], "bl_rev_object_string", &val);
status_ss << val << ",";
}
save_judge(lines[i], check, name, type_vec, quantity_type_vec, ss,status_ss);
}
}
int bs_bom_save_check(METHOD_message_t *msg, va_list args)
{
printf("bs_bom_save_check start11\n");
logical is_judge = false;
PREF_ask_logical_value("connor_bom_check", 0, &is_judge);
if (!is_judge)
return ITK_ok;
int ifail = ITK_ok, num;
//获取属性对象
tag_t win = va_arg(args, tag_t), top;
char *check_val, **type_val, **quantity_type;
string name, check;
stringstream ss,status_ss;
int type_cnt, quantity_type_cnt;
PREF_ask_char_value("connor_bom_check_value", 0, &check_val);
PREF_ask_char_values("connor_bom_check_type", &type_cnt, &type_val);
PREF_ask_char_values("connor_bom_quantity_check_type", &quantity_type_cnt, &quantity_type);
vector<string> type_vec(type_val, type_val + type_cnt), quantity_type_vec(quantity_type, quantity_type + quantity_type_cnt);
check = check_val;
BOM_ask_window_top_line(win, &top);
save_judge(top, check, name, type_vec, quantity_type_vec, ss, status_ss);
if (ss.str().length())
{
ss << "物料数量为空,请填写!\n";
ifail = 1;
}
if (status_ss.str().length()) {
ss << status_ss.str() << "对象为冻结状态或未发布不能保存BOM!\n";
ifail = 1;
}
if (ss.str().length())
EMH_store_error_s1(EMH_severity_user_error, EMH_PROP_error_base, ss.str().c_str());
printf("bs_bom_save_check end11\n");
return ifail;
}

@ -0,0 +1,44 @@
/*=============================================================================
Copyright (c) 2003-2005 UGS Corporation
Unpublished - All Rights Reserved
File :qtmc_by_pass.cpp
Module : user_exits
============================================================================================================
DATE Name Description of Change
30_OTC_2014 mengyawei creation
$HISTORY$
============================================================================================================*/
#include <tc/tc.h>
#include "epm_handler_common.h"
#include <ict/ict_userservice.h>
#include <tccore/custom.h>
#include <epm/epm_toolkit_tc_utils.h>
#include <tccore/aom.h>
#include <tccore/aom_prop.h>
#ifdef __cplusplus
extern "C" {
#endif
extern "C" int POM_AM__set_application_bypass(logical bypass);
int bs_bypass(void *retValType)
{
int ifail = ITK_ok;
logical bypass=true;
USERARG_get_logical_argument(&bypass);
POM_AM__set_application_bypass( bypass );
return ifail;
}
#ifdef __cplusplus
}
#endif

@ -0,0 +1,70 @@
/**
* @defgroup common
* @defgroup workflow
* @defgroup bmf
* @defgroup service
*/
/**
* @addtogroup common
* @{
*/
/**
* @file
* @brief
* @date 2014/4/21
* @author mengyawei
*/
#pragma warning (disable: 4819)
/**
* @headerfile tcua
*/
#include <tc/tc.h>
#include <tccore/custom.h>
#include <server_exits/user_server_exits.h>
#include "epm_register_handler.h"
#include "epm_handler_common.h"
#include "jd_clear_field.h"
#ifdef __cplusplus
extern "C" {
#endif
/**
* @fn extern "C" DLLAPI int liborigin_register_callbacks
* @return usually return ITK_ok
* @brief liborigin customization entry
*/
DLLAPI int bs_register_callbacks()
{
int ifail = ITK_ok;
ifail = CUSTOM_register_exit(
"bs",
"USERSERVICE_register_methods",
(CUSTOM_EXIT_ftn_t)USERSERVICE_custom_register_methods) ;
ifail = CUSTOM_register_exit(
"bs",
"USER_gs_shell_init_module",
(CUSTOM_EXIT_ftn_t)CUST_init_module);
Register_revise_msg();
return ifail;
}
#ifdef __cplusplus
}
#endif
/**
* @}
*/

@ -0,0 +1,108 @@
#include "epm_handler_common.h"
#include <tc\tc_macros.h>
#include <tc\emh.h>
#include <tc\preferences.h>
#include <property\propdesc.h>
#include <epm\epm.h>
#include <epm\epm_toolkit_tc_utils.h>
#include <tccore\item.h>
#include <tccore\grmtype.h>
#include <tccore\grm.h>
#include <tccore\imantype.h>
#include <sa\am.h>
#include <sa\sa.h>
#include <tccore\aom.h>
#include <tccore\aom_prop.h>
#include <property\prop_errors.h>
#include <tccore\workspaceobject.h>
#include <qry\qry.h>
#include <bom\bom_attr.h>
#include <bom\bom.h>
#include <epm\signoff.h>
#include <pom\pom\pom.h>
#include <pom\pom\pom_errors.h>
#include <fclasses\tc_date.h>
#include <epm\cr.h>
#include <cfm\cfm.h>
#include <sa\am.h>
#include "tc/envelope.h"
#include <stdio.h>
#include "ae/dataset.h"
#include <ctype.h>
#include <string.h>
#include <string>
#include <iostream>
#include <iterator>
#include <map>
#include <vector>
#include "ce/ce.h"
#include <time.h>
#include <windows.h>
#include <iostream>
#include <sql.h>
#include <sqlext.h>
#include "string"
#include "sstream"
#include <sa/tcfile.h>
#include <tccore/aom.h>
#include <sa/tcfile_cache.h>
#include "ctime"
#include "tchar.h"
using namespace std;
extern "C" int POM_AM__set_application_bypass(logical bypass);
int bs_file_transfer(EPM_action_message_t msg)
{
int ifail = ITK_ok, att_count;
tag_t rootTask, *attachments;
char *obj_type;
EPM_ask_root_task(msg.task, &rootTask);
EPM_ask_attachments(rootTask, EPM_target_attachment, &att_count, &attachments);
TC_argument_list_t * arguments = msg.arguments;
int arg_cnt = TC_number_of_arguments(arguments), status = 0;
POM_AM__set_application_bypass(true);
map<string, string> paras;
for (auto i = 0; i<arg_cnt; i++)
{
char *temp_key, *temp_val;
ITK_ask_argument_named_value(TC_next_argument(arguments), &temp_key, &temp_val);
paras[temp_key] = temp_val;
}
printf("paras:");
for(auto i=paras.begin();i!=paras.end();i++)
{
printf(" %s:%s ", i->first.c_str(), i->second.c_str());
}
printf("\n");
for(int i=0;i<att_count;i++)
{
AOM_ask_value_string(attachments[i], "object_type", &obj_type);
printf("obj_type:%s\n", obj_type);
if (paras["type"] != obj_type)
continue;
int tag_cnt;
tag_t * tags;
AOM_ask_value_tags(attachments[i], paras["relation"].c_str(), &tag_cnt, &tags);
for(int j=0;j<tag_cnt;j++)
{
int ref_cnt;
tag_t *refs;
AE_ask_dataset_named_refs(tags[j], &ref_cnt, &refs);
for(int k=0;k<ref_cnt;k++)
{
char * name;
IMF_ask_original_file_name2(refs[k], &name);
ITKCALL(IMF_export_file(refs[k], (paras["path"] + name).c_str()));
}
}
}
POM_AM__set_application_bypass(false);
return 0;
}

@ -0,0 +1,344 @@
#include "util.h"
int bs_sap_material(EPM_action_message_t msg)
{
printf("start sap material\n");
int ifail = ITK_ok, att_count;
tag_t rootTask, *attachments, relation_type;
char *obj_type;
int pref_cnt;
char **pref_vals;
EPM_ask_root_task(msg.task, &rootTask);
map<int, string> class_map;
EPM_ask_attachments(rootTask, EPM_target_attachment, &att_count, &attachments);
TC_argument_list_t * arguments = msg.arguments;
int arg_cnt = TC_number_of_arguments(arguments), status = 0;
POM_AM__set_application_bypass(true);
map<string, string> paras,rel_map;
map<string, string> prop_map;
vector<string> rel_vec;
for (auto i = 0; i < arg_cnt; i++)
{
char *temp_key, *temp_val;
ITK_ask_argument_named_value(TC_next_argument(arguments), &temp_key, &temp_val);
paras[temp_key] = temp_val;
}
string d0 = "D00", d1 = "D0";
for(int i=0;i<67;i++)
{
if(i>8)
{
class_map[1000+i] = d1 + to_string(i + 1);
}else
{
class_map[1000 + i] = d0 + to_string(i + 1);
}
}
PREF_ask_char_values("connor_sap", &pref_cnt, &pref_vals);
split(pref_vals[4], ",", &rel_vec);
for(int i=0;i<rel_vec.size();i++)
{
vector<string> temp_vec;
split(rel_vec[i], "=", &temp_vec);
if(temp_vec.size()==2)
{
rel_map[temp_vec[0]] = temp_vec[1];
}
}
vector<string> rel_vec2;
split(pref_vals[5], ",", &rel_vec2);
for (int i = 0; i<rel_vec2.size(); i++)
{
vector<string> temp_vec;
split(rel_vec2[i], "=", &temp_vec);
if (temp_vec.size() == 2)
{
prop_map[temp_vec[0]] = temp_vec[1];
}
}
GRM_find_relation_type("IMAN_master_form", &relation_type);
printf("create class\n");
Testclass ^test = gcnew Testclass();
printf("create success\n");
String^ url = convert_to_cstring(pref_vals[0]);
String^ user = convert_to_cstring(pref_vals[2]);
String^ password = convert_to_cstring(pref_vals[3]);
// prop_map["MTART"] = "jd2_wllx";
// prop_map["MATNR"] = "item_id";
// prop_map["MAKTX"] = "jd2_wlms";
// prop_map["MEINS"] = "jd2_dldw";
// prop_map["MATKL"] = "jd2_wlz";
// prop_map["PRDHA"] = "jd2_cpcc";
// prop_map["EXTWG"] = "jd2_wbwlz";
// prop_map["MSTAE"] = "release_status_list";
// prop_map["VOLUM"] = "jd2_tj";
// prop_map["VOLEH"] = "jd2_tjdw";
// prop_map["BISMT"] = "jd2_jwlh";
// prop_map["ZEINR"] = "jd2_th";
// prop_map["BRGEW"] = "jd2_mz";
// prop_map["NTGEW"] = "jd2_jz";
// prop_map["GEWEI"] = "jd2_zldw";
// prop_map["CLASS"] = "jd2_wllx";
printf("start111\n");
for (int i = 0; i < att_count; i++)
{
if (isTypeOf(attachments[i], "Form"))
{
int rel_cnt,*levels;
tag_t *rels,rev=NULLTAG,form;
char **relations;
form = attachments[i];
WSOM_where_referenced2(form, 1, &rel_cnt, &levels, &rels, &relations);
for(int j=0;j<rel_cnt;j++)
{
if(tc_strcmp(relations[j],"IMAN_master_form")==0)
{
rev = rels[j];
}
}
if(rev==NULLTAG)
{
printf("revision get error\n");
continue;
}
// GRM_list_secondary_objects_only(attachments[i], relation_type, &rel_cnt, &rels);
System::Collections::Generic::Dictionary<String^, String^> ^dic = gcnew System::Collections::Generic::Dictionary<String^, String^>();
for (auto j = prop_map.begin(); j != prop_map.end(); j++)
{
char *val="";
string temp_val;
if (j->second == "item_id")
{
AOM_ask_value_string(rev, j->second.c_str(), &val);
temp_val = val;
}
else if (j->second == "release_status_list") {
// int status_cnt;
// tag_t *rel_status;
// AOM_ask_value_tags(form, j->second.c_str(), &status_cnt, &rel_status);
// if (status_cnt)
// AOM_UIF_ask_value(rel_status[status_cnt - 1], "object_string", &val);
// temp_val = rel_map[val];
temp_val = paras["status"];
}else if(j->second=="jd2_dldw")
{
AOM_UIF_ask_value(form, j->second.c_str(), &val);
temp_val = val;
}
else
{
tag_t lov;
AOM_ask_lov(form, j->second.c_str(), &lov);
if (lov)
AOM_ask_value_string(form, j->second.c_str(), &val);
else
AOM_UIF_ask_value(form, j->second.c_str(), &val);
temp_val = val;
}
dic[convert_to_cstring(j->first.c_str())] = convert_to_cstring(temp_val.c_str());
}
tag_t class_obj;
ICS_ask_classification_object(rev, &class_obj);
if (class_obj)
{
char ***vals;
int cnt, *ids,*val_count;
ICS_ico_ask_attributes(class_obj, &cnt, &ids, &val_count, &vals);
for(int j=0;j<cnt;j++)
{
printf("id:%d\n", ids[j]);
if(class_map.find(ids[j])!=class_map.end())
{
if(val_count[j])
dic[convert_to_cstring(class_map[ids[j]].c_str())] = convert_to_cstring(vals[j][0]);
}
}
}
dic["MBRSH"] = "M";
dic["SPART"] = "00";
dic["KLART"] = "001";
string result = ConvertToString(test->send_material(url, user, password, dic));
printf("result:%s\n", result.c_str());
if(result.length()&&result[0]=='E')
{
char *val;
AOM_ask_value_string(rev, "item_id", &val);
stringstream err;
err << val << " ·¢ËÍ´íÎó:" << result;
POM_AM__set_application_bypass(false);
EMH_store_error_s1(EMH_severity_error, EMH_ATTR_error_base, err.str().c_str());
return 1;
}
}
}
POM_AM__set_application_bypass(false);
return 0;
}
void get_bom(System::Collections::Generic::List<System::Collections::Generic::Dictionary<String^, String^>^> ^a_list,tag_t line,char *werks,char *stlan,string pid, tag_t relation_type,boolean is_hl,boolean is_judge)
{
int line_cnt;
tag_t *lines;
BOM_line_ask_child_lines(line, &line_cnt, &lines);
char *id;
AOM_UIF_ask_value(line, "bl_item_item_id", &id);
if(a_list->Count==0)
{
pid = pid.length()>0?pid:id;
int index = pid.find('-');
if (index != -1)
pid = pid.substr(index + 1);
}
for (int j = 0; j < line_cnt; j++)
{
System::Collections::Generic::Dictionary<String^, String^> ^dic = gcnew System::Collections::Generic::Dictionary<String^, String^>();
dic["MATNR"] = convert_to_cstring(pid.length()>0?pid.c_str():id);
dic["WERKS"] = convert_to_cstring(werks);
dic["STLAN"] = convert_to_cstring(stlan);
dic["BMENG"] = "1";
dic["STLST"] = "1";
dic["POSTP"] = "L";
char *val;
// AOM_UIF_ask_value(lines[j], "bl_sequence_no", &val);
// dic["POSNR"] = convert_to_cstring(val);
char *child_id;
AOM_UIF_ask_value(lines[j], "bl_child_id", &child_id);
dic["IDNRK"] = convert_to_cstring(child_id);
// AOM_UIF_ask_value(lines[j], "bl_quantity", &val);
AOM_UIF_ask_value(lines[j], "bl_uom", &val);
dic["MEINS"] = convert_to_cstring(val);
dic["STLAL"] = is_hl ? convert_to_cstring("02") : convert_to_cstring("01");
char *val1, *val2,*hl,*sffs;
tag_t tag,*rels;
int rel_cnt;
AOM_ask_value_tag(lines[j], "bl_line_object", &tag);
AOM_UIF_ask_value(tag, "jd2_ishl", &hl);
boolean child_is_hl = tc_strcmp(hl, "ÊÇ") ? false : true;
GRM_list_secondary_objects_only(tag, relation_type, &rel_cnt, &rels);
AOM_ask_value_string(lines[j], "JD2_SFHL", &sffs);
printf("JD2_SFHL:%s\n", sffs);
if(tc_strcmp(sffs,"1")==0)
{
AOM_ask_value_string(lines[j], "JD2_sl", &val);
}else
{
AOM_ask_value_string(lines[j], "bl_quantity", &val);
}
dic["MENGE"] = convert_to_cstring(val);
if(is_judge){
if (rel_cnt)
{
AOM_ask_value_string(rels[0], "jd2_cglx", &val1);
AOM_ask_value_string(rels[0], "jd2_tscg", &val2);
}
if (tc_strcmp(val1, "F") == 0 && tc_strcmp(val2, "50") == 0)
{
continue;
}
if (tc_strcmp(val1, "E") == 0 && tc_strcmp(val2, "50") == 0)
{
get_bom(a_list, lines[j], werks, stlan, id, relation_type, child_is_hl, is_judge);
continue;
}
if (tc_strcmp(val1, "F") == 0 && tc_strlen(val2) == 0)
{
a_list->Add(dic);
continue;
}
}
a_list->Add(dic);
get_bom(a_list, lines[j], werks, stlan,"",relation_type, child_is_hl, is_judge);
}
}
int bs_sap_bom(EPM_action_message_t msg)
{
printf("start sap bom1\n");
int ifail = ITK_ok, att_count;
tag_t rootTask, *attachments, relation_type, win;
char *obj_type;
int pref_cnt;
char **pref_vals;
EPM_ask_root_task(msg.task, &rootTask);
EPM_ask_attachments(rootTask, EPM_target_attachment, &att_count, &attachments);
TC_argument_list_t * arguments = msg.arguments;
int arg_cnt = TC_number_of_arguments(arguments), status = 0;
POM_AM__set_application_bypass(true);
map<string, string> paras;
for (auto i = 0; i < arg_cnt; i++)
{
char *temp_key, *temp_val;
ITK_ask_argument_named_value(TC_next_argument(arguments), &temp_key, &temp_val);
paras[temp_key] = temp_val;
}
PREF_ask_char_values("connor_sap", &pref_cnt, &pref_vals);
GRM_find_relation_type("IMAN_master_form", &relation_type);
Testclass ^test = gcnew Testclass();
String^ url = convert_to_cstring(pref_vals[1]);
String^ user = convert_to_cstring(pref_vals[2]);
String^ password = convert_to_cstring(pref_vals[3]);
BOM_create_window(&win);
for (int i = 0; i < att_count; i++)
{
if (isTypeOf(attachments[i], "PSBOMViewRevision"))
{
printf("execute\n");
int rel_cnt, line_cnt;
System::Collections::Generic::List<System::Collections::Generic::Dictionary<String^, String^>^> ^a_list = gcnew System::Collections::Generic::List<System::Collections::Generic::Dictionary<String^, String^>^>();
tag_t top_line, *lines, rev, *rels;
char *id, *werks, *stlan,*hl;
BOM_set_window_top_line_bvr(win, attachments[i], &top_line);
AOM_ask_value_tag(top_line, "bl_line_object", &rev);
GRM_list_secondary_objects_only(rev, relation_type, &rel_cnt, &rels);
AOM_ask_value_string(rev, "item_id", &id);
AOM_ask_value_string(rels[0], "jd2_gc", &werks);
AOM_ask_value_string(rels[0], "jd2_BOMyt", &stlan);
AOM_UIF_ask_value(rev, "jd2_ishl", &hl);
boolean is_hl = tc_strcmp(hl,"ÊÇ")?false:true;
if (tc_strlen(werks)==0||tc_strlen(stlan)==0)
continue;
boolean is_judege = id[0] == '9'&&id[1] == '9';
get_bom(a_list, top_line, werks, stlan,"", relation_type,is_hl,is_judege);
string result = ConvertToString(test->send_bom(url, user, password, a_list));
printf("result:%s\n", result.c_str());
if(result.length()&&result[0]=='E')
{
BOM_close_window(win);
POM_AM__set_application_bypass(false);
EMH_store_error_s1(EMH_severity_error, EMH_ATTR_error_base, result.c_str());
return 1;
}
}
}
BOM_close_window(win);
POM_AM__set_application_bypass(false);
EMH_clear_errors();
return 0;
}

@ -0,0 +1,95 @@
#pragma once
#include "util.h"
static void replace_dataset_named_reference(tag_t dataset_tag, tag_t old_file,
const char *new_file_path, char *ref_name)
{
IMF_file_data_p_t file_data;
int index = 0;
ITKCALL(IMF_get_file_access(old_file, 0, &file_data));
tag_t new_file_tag = NULLTAG;
AOM_lock(old_file);
ITKCALL(IMF_replace_file_and_get_new_tag(old_file, new_file_path,
TRUE, &new_file_tag));
AOM_lock(dataset_tag);
ITKCALL(AE_replace_dataset_named_ref2(dataset_tag, old_file, ref_name,
AE_PART_OF, new_file_tag));
ITKCALL(AE_save_myself(dataset_tag));
AOM_unlock(dataset_tag);
ITKCALL(IMF_release_file_access(&file_data));
// ITKCALL2(AOM_lock_for_delete(old_file));
// ITKCALL2(AOM_delete(old_file));
}
int bs_sign_cad(EPM_action_message_t msg)
{
int ifail = ITK_ok, att_count,tag_cnt,form_cnt;
tag_t rootTask, *attachments, *tags,ref,*forms;
TC_argument_list_t * arguments = msg.arguments;
char *name,*val;
int arg_cnt = TC_number_of_arguments(arguments), status = 0;
POM_AM__set_application_bypass(true);
map<string, string> paras;
string tempdir = getenv("temp");
for (auto i = 0; i<arg_cnt; i++)
{
char *temp_key, *temp_val;
ITK_ask_argument_named_value(TC_next_argument(arguments), &temp_key, &temp_val);
paras[temp_key] = temp_val;
}
vector<string> prop_vec;
map<string, string> prop_map;
split(paras["prop"], ",", &prop_vec);
for(int i=0;i<prop_vec.size();i++)
{
vector<string> temp_vec;
split(prop_vec[i], "=", &temp_vec);
if (temp_vec.size() == 2)
prop_map[temp_vec[0]] = temp_vec[1];
}
EPM_ask_root_task(msg.task, &rootTask);
Testclass ^test = gcnew Testclass();
EPM_ask_attachments(rootTask, EPM_target_attachment, &att_count, &attachments);
AE_reference_type_t ae_ref;
POM_AM__set_application_bypass(true);
for(int i=0;i<att_count;i++)
{
if(isTypeOf(attachments[i],paras["type"].c_str()))
{
printf("get item\n");
AOM_ask_value_tags(attachments[i], "IMAN_specification", &tag_cnt, &tags);
AOM_ask_value_tags(attachments[i], "IMAN_master_form_rev", &form_cnt, &forms);
for(int j=0;j<tag_cnt;j++)
{
AE_ask_dataset_named_ref2(tags[j], "JD2_dwg", &ae_ref, &ref);
if(ref)
{
IMF_ask_original_file_name2(ref, &name);
stringstream path;
path << tempdir <<"\\"<< newGUID() << name;
printf("path:%s\n", path.str().c_str());
IMF_export_file(ref, path.str().c_str());
System::Collections::Generic::Dictionary<String^, String^> ^dic = gcnew System::Collections::Generic::Dictionary<String^, String^>();
for(auto k=prop_map.begin();k!=prop_map.end();k++)
{
AOM_UIF_ask_value(forms[0], k->second.c_str(), &val);
dic[convert_to_cstring(k->first.c_str())] = convert_to_cstring(val);
}
string result= ConvertToString(test->signCad(convert_to_cstring(path.str().c_str()), convert_to_cstring(paras["title"].c_str()), dic));
if(result.length())
{
replace_dataset_named_reference(tags[j], ref, result.c_str(), "JD2_dwg");
}
}
}
}
}
POM_AM__set_application_bypass(false);
return 0;
}

@ -0,0 +1,77 @@
#include "epm_handler_common.h"
#include <tc\tc_macros.h>
#include <tc\emh.h>
#include <tc\preferences.h>
#include <property\propdesc.h>
#include <epm\epm.h>
#include <epm\epm_toolkit_tc_utils.h>
#include <tccore\item.h>
#include <tccore\grmtype.h>
#include <tccore\grm.h>
#include <tccore\imantype.h>
#include <sa\am.h>
#include <sa\sa.h>
#include <tccore\aom.h>
#include <tccore\aom_prop.h>
#include <property\prop_errors.h>
#include <tccore\workspaceobject.h>
#include <qry\qry.h>
#include <bom\bom_attr.h>
#include <bom\bom.h>
#include <epm\signoff.h>
#include <pom\pom\pom.h>
#include <pom\pom\pom_errors.h>
#include <fclasses\tc_date.h>
#include <epm\cr.h>
#include <cfm\cfm.h>
#include <sa\am.h>
#include "tc/envelope.h"
#include <stdio.h>
#include "ae/dataset.h"
#include <ctype.h>
#include <string.h>
#include <string>
#include <iostream>
#include <iterator>
#include <map>
#include <vector>
#include "ce/ce.h"
#include <time.h>
#include <windows.h>
#include <iostream>
#include <sql.h>
#include <sqlext.h>
#include "string"
#include "sstream"
#include <sa/tcfile.h>
#include <tccore/aom.h>
#include <sa/tcfile_cache.h>
#include "ctime"
#include "tchar.h"
using namespace std;
extern "C" int POM_AM__set_application_bypass(logical bypass);
int bs_signoff(EPM_action_message_t msg)
{
int ifail = ITK_ok, att_count;
tag_t rootTask, *attachments, user_tag;
char *action_string, *user_name, *task_name;
map<string,string> map;
time_t t = time(NULL);
struct tm* local = localtime(&t);
EPM_ask_name2(msg.task, &task_name);
EPM_action_t action = msg.action;
EPM_ask_action_string2(action, &action_string);
POM_get_user(&user_name, &user_tag);
EPM_ask_root_task(msg.task, &rootTask);
EPM_ask_attachments(rootTask,EPM_target_attachment, &att_count, &attachments);
return 0;
}

@ -0,0 +1,93 @@
#include "util.h"
void judge_tag(tag_t tag,int index,vector<string> &vec,stringstream &name)
{
if(index>=vec.size()-1)
{
char *val,*type;
AOM_ask_value_string(tag, "object_type", &type);
printf("vec type:%s last type:%s\n",vec[index].c_str(), type);
if (vec[index] != type)
return;
int rel_cnt;
tag_t *rels;
AOM_ask_value_tags(tag, "release_status_list", &rel_cnt, &rels);
if (rel_cnt == 0)
{
AOM_ask_value_string(tag, "object_string", &val);
name << val << ",";
}
return;
}
if(vec[index]=="Latest")
{
tag_t rev;
ITEM_ask_latest_rev(tag, &rev);
if(rev)
judge_tag(rev, index + 1, vec, name);
return;
}
int tag_cnt;
tag_t *tags;
AOM_ask_value_tags(tag, vec[index].c_str(), &tag_cnt, &tags);
for(auto i=0;i<tag_cnt;i++)
{
judge_tag(tags[i], index + 1, vec, name);
}
}
int bs_test_release_check(EPM_action_message_t msg)
{
int ifail = ITK_ok, att_count, tag_cnt, rel_cnt;
tag_t rootTask, *attachments, win, top, *tags, tag,*rels;
char *val;
printf("begin bs_test_release_check\n");
EPM_ask_root_task(msg.task, &rootTask);
EPM_ask_attachments(rootTask, EPM_target_attachment, &att_count, &attachments);
TC_argument_list_t * arguments = msg.arguments;
int arg_cnt = TC_number_of_arguments(arguments), status = 0;
stringstream name;
// map<string, string> paras;
map<string, vector<string>> judge_map;
POM_AM__set_application_bypass(true);
for (auto i = 0; i<arg_cnt; i++)
{
char *temp_key, *temp_val;
ITK_ask_argument_named_value(TC_next_argument(arguments), &temp_key, &temp_val);
// paras[temp_key] = temp_val;
vector<string> temp;
split(temp_val, ".", &temp);
if(temp.size())
judge_map[temp[0]] = temp;
}
for (int i = 0; i<att_count; i++)
{
bool pass = true;
char *type;
AOM_ask_value_string(attachments[i], "object_type", &type);
printf("type:%s\n", type);
if(judge_map.find(type)!=judge_map.end())
{
judge_tag(attachments[i], 1, judge_map[type], name);
}
}
if (name.str().length()) {
printf("has error\n");
ifail = 1;
name <<"未发布,请先审核发布!";
EMH_store_error_s1(EMH_severity_warning, EMH_PROP_error_base, name.str().c_str());
}
POM_AM__set_application_bypass(false);
printf("end bs_test_release_check123\n");
return ifail;
}

@ -0,0 +1,121 @@
#include "util.h"
int bs_wl_check(EPM_rule_message_t msg)
{
int ifail = EPM_go, att_count, tag_cnt,form_cnt;
tag_t rootTask, *attachments, *tags,*forms;
char *val;
stringstream ss,name_ss;
EPM_ask_root_task(msg.task, &rootTask);
EPM_ask_attachments(rootTask, EPM_target_attachment, &att_count, &attachments);
TC_argument_list_t * arguments = msg.arguments;
int arg_cnt = TC_number_of_arguments(arguments), status = 0;
vector<string> wl_types, judge_types,judge_vec;
string name;
map<string, string> paras,judge_map;
for (auto i = 0; i<arg_cnt; i++)
{
char *temp_key, *temp_val;
ITK_ask_argument_named_value(TC_next_argument(arguments), &temp_key, &temp_val);
paras[temp_key] = temp_val;
}
split(paras["wlType"], ",", &wl_types);
split(paras["judgeType"], ",", &judge_types);
split(paras["judgeProps"], ",", &judge_vec);
for(int i=0;i<judge_vec.size();i++)
{
vector<string> temp;
split(judge_vec[i], "=", &temp);
if(temp.size()==2)
{
judge_map[temp[0]] = temp[1];
}
}
for (int i = 0; i<att_count; i++)
{
bool pass=false;
for(int j=0;j<wl_types.size();j++)
{
if(isTypeOf(attachments[i],wl_types[j].c_str()))
{
pass = true;
printf("wl_type:%s\n", wl_types[j].c_str());
break;
}
}
if (!pass)
{
continue;
}
AOM_ask_value_tags(attachments[i], "IMAN_master_form_rev", &form_cnt, &forms);
pass = false;
for(auto j=judge_map.begin();j!=judge_map.end();j++)
{
AOM_UIF_ask_value(forms[0], j->first.c_str(), &val);
if(j->second!=val)
{
pass = true;
break;
}
}
if(!pass)
{
continue;
}
AOM_ask_value_tags(attachments[i], paras["relation"].c_str(), &tag_cnt, &tags);
printf("relation :%s\n, length:%d\n", paras["relation"].c_str(), tag_cnt);
pass = false;
for(int j=0;j<tag_cnt;j++)
{
for(int k=0;k<judge_types.size();k++)
{
if(isTypeOf(tags[j], judge_types[k].c_str()))
{
printf("judge_type:%s\n", judge_types[k].c_str());
tag_t rev;
ITEM_ask_latest_rev(tags[j], &rev);
if(rev)
{
int rel_cnt;
tag_t *rels;
AOM_ask_value_tags(rev, "release_status_list", &rel_cnt, &rels);
if(rel_cnt==0)
{
AOM_ask_value_string(tags[j], "object_string", &val);
ss << val << ",";
}
}else
{
printf("dont have rev\n");
}
pass = true;
}
}
}
if (!pass)
{
AOM_ask_value_string(attachments[i], "object_string", &val);
name_ss << val<<",";
}
}
if(ss.str().length())
{
ss << "×îаæÎ´·¢²¼\n";
ifail = EPM_nogo;
}
if(name_ss.str().length())
{
ss << name_ss.str() << paras["prompt"];
ifail = EPM_nogo;
}
if (ifail==EPM_nogo) {
EMH_store_error_s1(EMH_severity_user_error, EMH_PROP_error_base, ss.str().c_str());
}
return ifail;
}

@ -0,0 +1,273 @@
/**
* @file common_itk_util.cpp
* @brief itk warpper utility function
* @author James
* @history
* ===================================================================================
* Date Name Description of Change
* 18-July-2008 James
*/
#pragma warning (disable: 4996)
#pragma warning (disable: 4819)
#include <epm/epm.h>
#include <epm/epm_toolkit_tc_utils.h>
#include <ict/ict_userservice.h>
#include <tccore/item.h>
#include <ae/ae.h>
#include <tc/folder.h>
#include <tccore/aom.h>
#include <sa/sa.h>
#include <tccore/aom_prop.h>
#include <property/prop_errors.h>
#include <tccore/workspaceobject.h>
#include <tc/preferences.h>
#include <tccore/imantype.h>
#include <tccore//grm.h>
#include <tccore/grmtype.h>
#include <sa/am.h>
#include <cfm/cfm.h>
#include <bom/bom.h>
#include <tccore/uom.h>
#include <ps/ps.h>
#include <epm/signoff.h>
#include <fclasses/tc_date.h>
//#include <tccore/imantype.h>
//#include <textsrv/textserver.h>
//#include <user_exits/epm_toolkit_utils.h>
//#include <ss/ss_errors.h>
#include <stdlib.h>
//#include <io.h>
#include <stdio.h>
#include <time.h>
//#include <direct.h>
//#include <unistd.h>
#include "error_handling.h"
#include "common_itk_util.h"
#ifdef WIN32
#include <io.h>
#include <direct.h>
#else
#include <unistd.h>
#endif
#define ARGS_LENGTH 200
#define ARGS_NAME_DEBUG "-debug"
#define DEBUG "-debug="
#define MAX_PRINTLINE_LENGTH 2000
#define MAX_PATH_LENGTH 2000
#define MAX_ARGUMENT_LENGTH 400
#define MAX_PARAMNAME_LENGTH 50
#define MAX_FILE_EXT_LENGTH 10
#define TRUE_FLAG 1
#define FALSE_FLAG 0
#define DETAILLOG 1
FILE* logFile = NULL;
void set_bypass(logical bypass)
{
AM__set_application_bypass(bypass);
}
/*=============================================================================*
* FUNCTION: current_time
* PURPOSE : get the current datetime
* INPUT:
* date_t* date_tag // current date time tag
*
* RETURN:
* void
*============================================================================*/
void current_time( date_t * date_tag )
{
time_t ltime;
struct tm *today ;
// Set time zone from TZ environment variable. If TZ is not set,
// the operating system is queried to obtain the default value
// for the variable.
//
//_tzset();
// Get UNIX-style time and display as number and string.
time( &ltime );
today = localtime( &ltime );
date_tag->year = today->tm_year + 1900 ;
date_tag->month = today->tm_mon ;
date_tag->day = today->tm_mday ;
date_tag->hour = today->tm_hour ;
date_tag->minute = today->tm_min ;
date_tag->second = today->tm_sec ;
}
/*=============================================================================*
* FUNCTION: CreateLogFile
* PURPOSE : create log file
* INPUT:
* char* FunctionName // the funtion which need to create log file
* FILE** logFile // out: the log file pointer
*
* RETURN:
* void
*============================================================================*/
void CreateLogFile(char* FunctionName, char **fullname)
{
int i=0, ifail = ITK_ok;
//date_t status_now;
//char* date_string = NULL;
char date_string[MAX_PATH_LENGTH];
char logFileDir[MAX_PATH_LENGTH];
char logFileName[MAX_PATH_LENGTH];
char* session_uid = NULL;
tag_t session_tag = NULLTAG;
time_t now;
struct tm *p;
time(&now);
logFile = NULL;
//current_time(&status_now);
p=localtime(&now);
memset(date_string, 0, sizeof(date_string));
sprintf(date_string,"%4d%02d%02d%02d%02d%02d",1900+p->tm_year,p->tm_mon+1 ,p->tm_mday ,p->tm_hour,p->tm_min ,p->tm_sec );
//if( DATE_date_to_string( status_now, "%Y%m%d%H%M%S", &date_string) != ITK_ok )
//ifail = ITK_date_to_string (status_now, &date_string );
//if (ifail)
//{
// printf("!*ERROR*!: Failed to get current date time\n");
// goto CLEANUP;
//}
memset(logFileDir, 0, sizeof(logFileDir));
memset(logFileName, 0, sizeof(logFileName));
//get log dir
sprintf(logFileDir, "%s", getenv("TEMP"));
printf("\n log file dir: %s\n", logFileDir);
//try to change dir to TC_USER_LOG_DIR
if(chdir(logFileDir)!=ITK_ok)
{
//not set TC_USER_LOG_DIR
//log in to default TC_LOG
memset(logFileDir, 0, sizeof(logFileDir));
sprintf(logFileDir, "%s", getenv("TC_LOG"));
printf("\n TC_USER_LOG_DIR invalide, log file dir: %s\n", logFileDir);
if(chdir(logFileDir)!=ITK_ok)
{
//still can not change to log dir
printf("!*ERROR*!: Failed to change dir to TC_USER_LOG_DIR\n");
goto CLEANUP;
}
}
//get session_uid to make sure the log file name unique
POM_ask_session(&session_tag);
ITK__convert_tag_to_uid(session_tag, &session_uid);
//get logFileName
sprintf(logFileName, "%s_%s_%s.log", FunctionName, session_uid, date_string);
printf("log file name: %s\n", logFileName);
*fullname = (char *)MEM_alloc(sizeof(char)*512);
sprintf(*fullname,"%s\\%s",logFileDir,logFileName);
//for(i = 0; _access((char *)logFileName, 4) == 0; i++)
/*{
memset(logFileName, 0, sizeof(logFileName));
sprintf(logFileName, "%s_%s_%s_%d.log", FunctionName, session_uid, date_string, i);
}
printf("final log file name: %s\n", logFileName);*/
//create log file
logFile = fopen(logFileName, "w");
CLEANUP:
//DOFREE(date_string);
DOFREE(session_uid);
}
/*=============================================================================*
* FUNCTION: WriteLog
* PURPOSE : write log, if debug log File not null, write log message to log File
* INPUT:
* const char* format // debug message string
*
* RETURN:
* void
*============================================================================*/
void WriteLog(const char* format, ...)
{
va_list arg;
char tmp[MAX_PRINTLINE_LENGTH];
if(logFile)
{
//get the message
memset(tmp, 0, sizeof(tmp));
va_start(arg, format);
vsprintf(tmp, format, arg);
va_end(arg);
//----------print to command window for trace--------//
printf("%s\n", tmp);
//print message to log file
fprintf(logFile, "%s\n", tmp);
fflush(logFile);
}
else
{
printf("*!Error!*: Log File Not Exist\n");
}
}
void CloseLog(void)
{
if(logFile)
{
fclose(logFile);
logFile = NULL;
}
}
//void getTypeinfo(char *type)
//{
// int ulen = 0,i=0,tempcount=0,asd=0;
//
// char temp[128]="";
// ulen = strlen(type);
// asd = ulen-1;
// for(i=0;i < ulen;i++)
// {
// if(type[i] == ';')
// {
// temp[tempcount] = '\0';
// strcpy(excludetypes[typecount].type,temp);
// strcpy(temp,"");
// tempcount = 0;
// typecount = typecount + 1;
// }
// else
// {
//
// temp[tempcount] = type[i];
// tempcount = tempcount + 1;
// if(i==asd)
// {
// temp[tempcount] = '\0';
// strcpy(excludetypes[typecount].type,temp);
// typecount = typecount + 1;
// }
//
// }
//
// }
//}

@ -0,0 +1,31 @@
/**
* @file common_itk_util.h
* @brief itk warpper utility function
* @author James
* @history
* ===================================================================================
* Date Name Description of Change
* 09-July-2008 James
*/
#ifndef COMMON_ITK_UTIL
#define COMMON_ITK_UTIL
#ifdef __cplusplus
extern "C" {
#endif
void CreateLogFile(char* FunctionName, char **fullname);
void WriteLog(const char* format, ...);
void CloseLog(void);
void set_bypass(logical bypass);
//int FindDatasetReferenceExt( tag_t datasettype, const char *datasettype_ref, char ext[10] );
//int CompareDate( date_t date1, date_t date2 );
//int GetRandomTempFile( char tempFile[256] );
//logical IsItemRevisionType( char object_type[WSO_name_size_c + 1] );
#ifdef __cplusplus
}
#endif
#endif

Binary file not shown.

@ -0,0 +1,69 @@
/**
* @addtogroup handler
* @{
*/
/**
* @file epm_handler_common.h
* @brief handler functions declation
* @date 2011/4/12
* @author Ray
* @history
* ===================================================================================
* Date Name Description
* 12-Apr-2011 Ray created
*/
#ifndef EPM_HANDLER_COMMON
#define EPM_HANDLER_COMMON
#include <epm/epm.h>
#include <string>
#ifdef __cplusplus
extern "C" {
#endif
using namespace std;
#define TC_specification "IMAN_specification"
//#define NX_3W_DATASET_TYPE "UGMASTER"
//#define NX_2W_DATASET_TYPE "UGPART"
//#define DATASET_REF_TYPE "UGPART"
int bs_file_transfer(EPM_action_message_t msg);
int bs_sap_material(EPM_action_message_t msg);
int bs_sap_bom(EPM_action_message_t msg);
int bs_bom_check(EPM_rule_message_t msg);
int bs_wl_check(EPM_rule_message_t msg);
int bs_bom_save_check(METHOD_message_t *msg, va_list args);
int bs_sign_cad(EPM_action_message_t msg);
int jd_signoff(EPM_action_message_t msg);
int bs_test_release_check(EPM_action_message_t msg);
int bs_bypass(void *retValType);
int jd_schedule_joint(EPM_action_message_t msg);
int jd_batch_process(EPM_action_message_t msg);
int jd_add_attachments(EPM_action_message_t msg);
////<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ϣǩ<CFA2><C7A9><EFBFBD><E6B1BE><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ȥ
//int qtmc_sign_ir(EPM_action_message_t msg);
//user service end
#ifdef __cplusplus
}
#endif
#endif
/**
* @}
*/

@ -0,0 +1,217 @@
/*===================================================================================================
Copyright(c) 2011 Siemens PLM Software Corp. All rights reserved.
Unpublished - All rights reserved
====================================================================================================
File description:
Filename : epm_register_handler.c
This file registers functions which are called when Teamcenter is being initialized
====================================================================================================
Date Name Description of Change
2011-8-21 Ray wei creation
$HISTORY$
==================================================================================================*/
#pragma warning (disable: 4819)
/**
* @headerfile tcua ͷ<EFBFBD>ļ<EFBFBD>
*/
#include <server_exits/user_server_exits.h>
#include <tccore/custom.h>
#include <epm/epm.h>
/**
* @headerfile standard c & cpp header files
*/
#include <stdio.h>
#include <stdlib.h>
#include <ctype.h>
#include <string.h>
#include <time.h>
/**
* @headerfile user's header files
*/
#include "epm_register_handler.h"
#include "epm_handler_common.h"
// Method and Workflow Handler
extern DLLAPI int CUST_init_module(int *decision, va_list args)
{
int ifail = ITK_ok, n = 0;
char date_buf[80], *expire_date;
time_t now;
struct tm *p;
*decision = ALL_CUSTOMIZATIONS;
printf("register start\n");
ifail = EPM_register_action_handler("bs_file_transfer", "bs_file_transfer",
(EPM_action_handler_t)bs_file_transfer);
if (ifail)
{
printf("register bs_file_transfer failed\n");
}
else
{
printf("register bs_file_transfer successfully\n");
}
ifail = EPM_register_action_handler("bs_sap_material", "bs_sap_material",
(EPM_action_handler_t)bs_sap_material);
if (ifail)
{
printf("register bs_sap_material failed\n");
}
else
{
printf("register bs_sap_material successfully\n");
}
ifail = EPM_register_action_handler("bs_sap_bom", "bs_sap_bom",
(EPM_action_handler_t)bs_sap_bom);
if (ifail)
{
printf("register bs_sap_bom failed\n");
}
else
{
printf("register bs_sap_bom successfully\n");
}
ifail = EPM_register_rule_handler("bs_bom_check", "bs_bom_check", (EPM_rule_handler_t)bs_bom_check);
if (ifail)
{
printf("register bs_bom_check failed\n");
}
else
{
printf("register bs_bom_check successfully\n");
}
ifail = EPM_register_rule_handler("bs_wl_check", "bs_wl_check", (EPM_rule_handler_t)bs_wl_check);
if (ifail)
{
printf("register bs_wl_check failed\n");
}
else
{
printf("register bs_wl_check successfully\n");
}
ifail = EPM_register_action_handler("bs_sign_cad", "bs_sign_cad",
(EPM_action_handler_t)bs_sign_cad);
if (ifail)
{
printf("register bs_sign_cad failed\n");
}
else
{
printf("register bs_sign_cad successfully\n");
}
ifail = EPM_register_action_handler("bs_test_release_check", "bs_test_release_check",
(EPM_action_handler_t)bs_test_release_check);
if (ifail)
{
printf("register bs_test_release_check failed\n");
}
else
{
printf("register bs_test_release_check successfully\n");
}
ifail = EPM_register_action_handler("jd_signoff", "jd_signoff",
(EPM_action_handler_t)jd_signoff);
if (ifail) {
printf("register jd_signoff failed\n");
}
else {
printf("register jd_signoff successfully\n");
}
ifail = EPM_register_action_handler("jd_schedule_joint", "jd_schedule_joint",
(EPM_action_handler_t)jd_schedule_joint);
if (ifail == ITK_ok) {
fprintf(stdout, "Registering action handler jd_schedule_joint completed!\n");
} else {
fprintf(stdout, "Registering action handler jd_schedule_joint failed %d!\n", ifail);
}
ifail = EPM_register_action_handler("jd_batch_process", "jd_batch_process",
(EPM_action_handler_t)jd_batch_process);
if (ifail) {
printf("register jd_batch_process failed\n");
} else {
printf("register jd_batch_process successfully\n");
}
ifail = EPM_register_action_handler("jd_add_attachments", "jd_add_attachments",
(EPM_action_handler_t)jd_add_attachments);
if (ifail) {
printf("register jd_add_attachments failed\n");
} else {
printf("register jd_add_attachments successfully\n");
}
//if(ifail == ITK_ok)
//{
// fprintf(stdout,"Registering action handler qtmc-sign-ir completed!\n");
//}
//else
//{
// fprintf(stdout , "Registering action handler qtmc-sign-ir failed %d!\n",ifail);
//}
return ifail;
}
//
////register service method
extern DLLAPI int USERSERVICE_custom_register_methods()
{
int status = 0;
METHOD_id_t mth_tag;
METHOD_find_method("BOMWindow", "BOMWindow_save", &mth_tag);
printf("register service\n");
if (mth_tag.id)
{
printf("register bomwindow_save\n");
status = METHOD_add_action(mth_tag, METHOD_pre_action_type, (METHOD_function_t)bs_bom_save_check, NULL);
if (status == ITK_ok)
{
printf("register bomwindow_save success\n");
}
else
{
printf("register bomwindow_save failed\n");
}
int numberOfArguments = 1,
returnValueType = USERARG_STRING_TYPE,
*argumentList = (int*)MEM_alloc(numberOfArguments * sizeof(int));
argumentList[0] = USERARG_LOGICAL_TYPE;;
USER_function_t functionPtr;
functionPtr = bs_bypass;
status = USERSERVICE_register_method("bs_bypass", functionPtr, numberOfArguments, argumentList, returnValueType);
if (status == ITK_ok) {
printf("register bs_bypass success\n");
} else {
printf("register bs_bypass failed\n");
}
}
return 0;
}

@ -0,0 +1,36 @@
/*=================================================================================
* @file epm_register_handler.h
* @brief itk user exits function declation, to register custom handlers
* @date 2009/2/13
* @author Ray Li
* @history
* ===================================================================================
* Date Name Description
* 13-Feb-2009 Ray created
*===================================================================================*/
#ifndef EPM_REGISTER_HANDLER_CUSTOM
#define EPM_REGISTER_HANDLER_CUSTOM
#include <epm/epm.h>
#ifdef __cplusplus
extern "C" {
#endif
extern DLLAPI int CUST_init_module(int *, va_list);
extern DLLAPI int USERSERVICE_custom_register_methods();
#ifdef __cplusplus
}
#endif
#endif
/**
* @}
*/

@ -0,0 +1,46 @@
/*=============================================================================
Copyright (c) 2003-2005 UGS Corporation
Unpublished - All Rights Reserved
File :qtmc_by_pass.cpp
Module : user_exits
============================================================================================================
DATE Name Description of Change
30_OTC_2014 mengyawei creation
$HISTORY$
============================================================================================================*/
#include <tc/tc.h>
#include "epm_handler_common.h"
#include <ict/ict_userservice.h>
#include <tccore/custom.h>
#include <epm/epm_toolkit_tc_utils.h>
#include <tccore/aom.h>
#include <tccore/aom_prop.h>
#ifdef __cplusplus
extern "C" {
#endif
extern "C" int POM_AM__set_application_bypass(logical bypass);
int qtmc_by_pass(void *retValType)
{
int ifail = ITK_ok;
logical bypass = FALSE;
USERARG_get_logical_argument( &bypass );
POM_AM__set_application_bypass( bypass );
return ifail;
}
#ifdef __cplusplus
}
#endif

@ -0,0 +1,119 @@
#include "epm_handler_common.h"
#include <tc\tc_macros.h>
#include <tc\emh.h>
#include <tc\preferences.h>
#include <property\propdesc.h>
#include <epm\epm.h>
#include <epm\epm_toolkit_tc_utils.h>
#include <tccore\item.h>
#include <tccore\grmtype.h>
#include <tccore\grm.h>
#include <tccore\imantype.h>
#include <sa\am.h>
#include <sa\sa.h>
#include <tccore\aom.h>
#include <tccore\aom_prop.h>
#include <property\prop_errors.h>
#include <tccore\workspaceobject.h>
#include <qry\qry.h>
#include <bom\bom_attr.h>
#include <bom\bom.h>
#include <epm\signoff.h>
#include <pom\pom\pom.h>
#include <pom\pom\pom_errors.h>
#include <fclasses\tc_date.h>
#include <epm\cr.h>
#include <cfm\cfm.h>
#include <sa\am.h>
#include "tc/envelope.h"
#include <stdio.h>
#include "ae/dataset.h"
#include <ctype.h>
#include <string.h>
#include <string>
#include <iostream>
#include <iterator>
#include <map>
#include <vector>
#include "ce/ce.h"
#include <time.h>
#include <windows.h>
#include <iostream>
#include <sql.h>
#include <sqlext.h>
#include "string"
#include "sstream"
#include <sa/tcfile.h>
#include <tccore/aom.h>
#include <sa/tcfile_cache.h>
#include <form/form.h>
#include "ctime"
#include "tchar.h"
#include <iostream>
#include <string>
#include <fstream>
using namespace std;
extern "C" int POM_AM__set_application_bypass(logical bypass);
int jd_add_attachments(EPM_action_message_t msg) {
POM_AM__set_application_bypass(true);
tag_t root_task, *attachments;
int att_cnt;
EPM_ask_root_task(msg.task, &root_task);
EPM_ask_attachments(root_task, EPM_target_attachment, &att_cnt, &attachments);
TC_argument_list_t *arguments = msg.arguments;
int arg_cnt = TC_number_of_arguments(arguments);
map<string, string> paras;
for (auto i = 0; i < arg_cnt; i++) {
char *temp_key, *temp_val;
ITK_ask_argument_named_value(TC_next_argument(arguments), &temp_key, &temp_val);
paras[temp_key] = temp_val;
}
const char *relation = paras["realtion"].c_str();
const char *item = paras["item"].c_str();
printf("relation:%s\n", relation);
printf("item:%s\n", item);
vector<tag_t> csjh_rev;
vector<int> csjh_type;
for (int i = 0;i < att_cnt;i++) {
char *att_type;
AOM_ask_value_string(attachments[i], "object_type", &att_type);
if (tc_strcmp(att_type, "ItemRevision") == 0) {
tag_t *csjh;
int csjh_cnt;
AOM_ask_value_tags(attachments[i], relation, &csjh_cnt, &csjh);
for (int ii = 0;ii < csjh_cnt;ii++) {
char *item_type;
AOM_ask_value_string(csjh[ii], "object_type", &item_type);
if (tc_strcmp(item_type, item) == 0) {
tag_t *csjh_revs;
int rev_cnt;
date_t date = NULLDATE;
AOM_ask_value_tags(csjh[i], "revision_list", &rev_cnt, &csjh_revs);
AOM_ask_value_date(csjh_revs[rev_cnt - 1], "date_released", &date);
if (DATE_IS_NULL(date)) {
char *name;
AOM_ask_value_string(csjh_revs[rev_cnt - 1], "object_string", &name);
printf("%s add success\n", name);
csjh_rev.push_back(csjh_revs[rev_cnt - 1]);
csjh_type.push_back(EPM_target_attachment);
}
MEM_free(csjh_revs);
}
}
MEM_free(csjh);
}
}
if (csjh_rev.size() > 0) {
tag_t *atts = &csjh_rev[0];
int *types = &csjh_type[0];
EPM_add_attachments(root_task, csjh_rev.size(), atts, types);
}
POM_AM__set_application_bypass(false);
return 0;
}

@ -0,0 +1,209 @@
#include "HTTPRequest.hpp"
#include "epm_handler_common.h"
#include <tc\tc_macros.h>
#include <tc\emh.h>
#include <tc\preferences.h>
#include <property\propdesc.h>
#include <epm\epm.h>
#include <epm\epm_toolkit_tc_utils.h>
#include <tccore\item.h>
#include <tccore\grmtype.h>
#include <tccore\grm.h>
#include <tccore\imantype.h>
#include <sa\am.h>
#include <sa\sa.h>
#include <tccore\aom.h>
#include <tccore\aom_prop.h>
#include <property\prop_errors.h>
#include <tccore\workspaceobject.h>
#include <qry\qry.h>
#include <bom\bom_attr.h>
#include <bom\bom.h>
#include <epm\signoff.h>
#include <pom\pom\pom.h>
#include <pom\pom\pom_errors.h>
#include <fclasses\tc_date.h>
#include <epm\cr.h>
#include <cfm\cfm.h>
#include <sa\am.h>
#include "tc/envelope.h"
#include <stdio.h>
#include "ae/dataset.h"
#include <ctype.h>
#include <string.h>
#include <string>
#include <iostream>
#include <iterator>
#include <map>
#include <vector>
#include "ce/ce.h"
#include <time.h>
#include <windows.h>
#include <iostream>
#include <sql.h>
#include <sqlext.h>
#include "string"
#include "sstream"
#include <sa/tcfile.h>
#include <tccore/aom.h>
#include <sa/tcfile_cache.h>
#include <form/form.h>
#include "ctime"
#include "tchar.h"
#include <iostream>
#include <string>
#include <fstream>
using namespace std;
DWORD WINAPI sendRequest(void *uid) {
try {
char *pref_values;
PREF_ask_char_value("jd2_server_ip", 0, &pref_values);
if (strlen(pref_values) != 0) {
stringstream ss;
ss << "http://";
ss << pref_values;
ss << ":8880/api/deleteJob?uid=";
ss << (char *)uid;
printf("request url====>%s\n", ss.str().c_str());
http::Request request(ss.str().c_str());
const http::Response response = request.send("GET");
std::cout << std::string(response.body.begin(), response.body.end()) << '\n'; // print the result
} else {
printf("jd2_server_ip error\n");
}
} catch (const std::exception& e) {
std::cerr << "Request failed, error: " << e.what() << '\n';
}
return 0;
}
int jd_batch_process(EPM_action_message_t msg) {
int ifail = EPM_go, att_count, tag_cnt, rel_cnt, type = EPM_reference_attachment;
tag_t rootTask, *attachments, win, top, *tags, tag, *rels, job, process_template, new_process;
char *val;
EPM_ask_root_task(msg.task, &rootTask);
EPM_ask_job(msg.task, &job);
EPM_ask_attachments(rootTask, EPM_target_attachment, &att_count, &attachments);
if (att_count < 2)
return 0;
printf("att_count:%d\n", att_count);
AOM_ask_value_tag(job, "process_template", &process_template);
vector<tag_t> process_vec;
for (int i = 0; i < att_count; i++) {
char *object_string, *object_type;
AOM_ask_value_string(attachments[i], "object_type", &object_type);
AOM_ask_value_string(attachments[i], "object_string", &object_string);
printf("object_type:%s object_string:%s\n", object_type, object_string);
tag_t new_process;
ITKCALL(EPM_create_process(object_string, "", process_template, 1, &attachments[i], &type, &new_process));
process_vec.push_back(new_process);
}
int sub_cnt;
tag_t *tasks;
EPM_ask_sub_tasks(rootTask, &sub_cnt, &tasks);
map<string, vector<tag_t>> task_map;
for (int i = 0;i < sub_cnt;i++) {
char *task_name, *task_type;
AOM_ask_value_string(tasks[i], "object_name", &task_name);
AOM_ask_value_string(tasks[i], "object_type", &task_type);
vector<tag_t> tags;
if (tc_strcmp("EPMDoTask", task_type) == 0) {
tag_t assignee;
AOM_ask_value_tag(tasks[i], "fnd0Assignee", &assignee);
tags.push_back(assignee);
} else {
tag_t *signoffs;
int signoff_cnt;
AOM_ask_value_tags(tasks[i], "valid_signoffs", &signoff_cnt, &signoffs);
printf("name:%s valid cnt:%d\n", task_name, signoff_cnt);
for (int j = 0;j < signoff_cnt;j++) {
tag_t member;
AOM_ask_value_tag(signoffs[j], "group_member", &member);
tags.push_back(member);
}
}
task_map[task_name] = tags;
}
for (auto i = 0;i < process_vec.size();i++) {
ITKCALL(AOM_refresh(process_vec[i], false));
tag_t root;
EPM_ask_root_task(process_vec[i], &root);
EPM_ask_sub_tasks(root, &sub_cnt, &tasks);
for (auto j = 0;j < sub_cnt;j++) {
char *task_name, *task_type;
AOM_ask_value_string(tasks[j], "object_name", &task_name);
if (task_map[task_name].size() == 0)
continue;
AOM_ask_value_string(tasks[j], "object_type", &task_type);
if (tc_strcmp("EPMDoTask", task_type) == 0) {
EPM_assign_responsible_party(tasks[j], task_map[task_name][0]);
} else {
tag_t sub_task;
int *types = (int*)MEM_alloc(task_map[task_name].size());
EPM_ask_sub_task(tasks[j], "select-signoff-team", &sub_task);
if (sub_task) {
for (int k = 0;k < task_map[task_name].size();k++) {
int temp_cnt;
tag_t *temp;
EPM_create_adhoc_signoff(sub_task, task_map[task_name][k], &temp_cnt, &temp);
}
EPM_set_adhoc_signoff_selection_done(sub_task, true);
if (j == 0) {
EPM_trigger_action(tasks[0], EPM_complete_action, "");
}
}
}
}
}
printf("¿ªÊ¼½«ÒýÓÃת»»ÎªÄ¿±ê\n");
int ref_cnt;
tag_t *refs;
tag_t root_task1;
for (int i = 0;i < att_count;i++) {
EPM_ask_root_task(process_vec[i], &root_task1);
EPM_ask_attachments(root_task1, EPM_reference_attachment, &ref_cnt, &refs);
char *name1;
AOM_ask_value_string(attachments[i], "object_string", &name1);
for (int ii = 0;ii < ref_cnt; ii++) {
char *name2;
AOM_ask_value_string(refs[ii], "object_string", &name2);
if (tc_strcmp(name1, name2) == 0) {
printf("object_string======>%s\n", name1);
tag_t *new_atts = (tag_t *)MEM_alloc(sizeof(tag_t));
new_atts[0] = attachments[i];
int types[1];
types[0] = EPM_target_attachment;
int types1[1];
types1[0] = EPM_reference_attachment;
ITKCALL(EPM_add_attachments(root_task1, 1, new_atts, types));
EPM_remove_attachments_from_att_type(root_task1, 1, new_atts, types1);
break;
}
}
}
EMH_clear_errors();
char *uid;
ITK__convert_tag_to_uid(job, &uid);
printf("start delete job_uid======>%s\n", uid);
HANDLE thread = CreateThread(NULL, 0, sendRequest, uid, 0, NULL);
CloseHandle(thread);
return 0;
}

@ -0,0 +1,568 @@
#include "jd_clear_field.h"
#include <string>
#include <vector>
#include <map>
#include <fstream>
#include <epm/epm.h>
#include <epm/epm_toolkit_tc_utils.h>
#include <ict/ict_userservice.h>
#include <tccore/item.h>
#include <ae/ae.h>
#include <tc/folder.h>
#include <tccore/aom.h>
#include <sa/sa.h>
#include <tccore/aom_prop.h>
#include <property/prop_errors.h>
#include <tccore/workspaceobject.h>
#include <tc/preferences.h>
#include <tccore/imantype.h>
#include <tccore//grm.h>
#include <tccore/grmtype.h>
#include <sa/am.h>
#include <cfm/cfm.h>
#include <bom/bom.h>
#include <iostream>
#include <tccore/uom.h>
#include <ps/ps.h>
#include <epm/signoff.h>
#include <fclasses/tc_date.h>
#include <sa/tcfile_cache.h>
#include <ics\ics2.h>
#include "sstream"
#include "atlstr.h"
#include <tc\tc_macros.h>
#include <tc\emh.h>
#include <tc\preferences.h>
#include <property\propdesc.h>
#include <epm\epm.h>
#include <epm\epm_toolkit_tc_utils.h>
#include <tccore\item.h>
#include <tccore\grmtype.h>
#include <tccore\grm.h>
#include <tccore\imantype.h>
#include <sa\am.h>
#include <sa\sa.h>
#include <tccore\aom.h>
#include <tccore\aom_prop.h>
#include <property\prop_errors.h>
#include <tccore\workspaceobject.h>
#include <qry\qry.h>
#include <bom\bom_attr.h>
#include <bom\bom.h>
#include <epm\signoff.h>
#include <pom\pom\pom.h>
#include <pom\pom\pom_errors.h>
#include <fclasses\tc_date.h>
#include <epm\cr.h>
#include <cfm\cfm.h>
#include <sa\am.h>
#include "tc/envelope.h"
#include <stdio.h>
#include "ae/dataset.h"
#include <ctype.h>
#include <string.h>
#include <string>
#include <iostream>
#include <iterator>
#include <map>
#include <vector>
#include "ce/ce.h"
#include <time.h>
#include <windows.h>
#include <iostream>
#include <sql.h>
#include <sqlext.h>
#include "string"
#include "sstream"
#include <sa/tcfile.h>
#include <tccore/aom.h>
#include <sa/tcfile_cache.h>
#include <form/form.h>
#include "ctime"
#include "tchar.h"
#include "jni.h"
#ifdef WIN32
#include <io.h>
#include <direct.h>
#else
#include <unistd.h>
#include <sys/stat.h>
#endif
#include <stdint.h>
#include <string>
#define MAX_PATH_LEN 256
#define GUID_LEN 64
#ifdef WIN32
#define ACCESS(fileName,accessMode) _access(fileName,accessMode)
#define MKDIR(path) _mkdir(path)
#else
#define ACCESS(fileName,accessMode) access(fileName,accessMode)
#define MKDIR(path) mkdir(path,S_IRWXU | S_IRWXG | S_IROTH | S_IXOTH)
#endif
#define LOCALJARPATH "D:\\Siemens\\Teamcenter12\\bin\\tc_extra_jar\\"
#define REMOTEJARPATH "D:\\app\\Siemens\\Teamcenter12\\bin\\tc_extra_jar\\"
//#include <iostream>
using namespace std;
#ifdef __cplusplus
extern "C" int POM_AM__set_application_bypass(logical bypass);
extern "C" {
#endif
int32_t createDirectory(const std::string &directoryPath) {
uint32_t dirPathLen = directoryPath.length();
if (dirPathLen > MAX_PATH_LEN) {
return -1;
}
char tmpDirPath[MAX_PATH_LEN] = { 0 };
for (uint32_t i = 0; i < dirPathLen; ++i) {
tmpDirPath[i] = directoryPath[i];
if (tmpDirPath[i] == '\\' || tmpDirPath[i] == '/') {
if (ACCESS(tmpDirPath, 0) != 0) {
int32_t ret = MKDIR(tmpDirPath);
if (ret != 0) {
return ret;
}
}
}
}
return 0;
}
static void replace_dataset_named_reference(tag_t dataset_tag, tag_t old_file,
const char *new_file_path, char *ref_name) {
IMF_file_data_p_t file_data;
int index = 0;
char *name;
IMF_get_file_access(old_file, 0, &file_data);
tag_t new_file_tag = NULLTAG;
AOM_lock(old_file);
IMF_ask_original_file_name2(old_file, &name);
IMF_replace_file_and_get_new_tag(old_file, new_file_path,
FALSE, &new_file_tag);
AOM_lock(dataset_tag);
AE_replace_dataset_named_ref2(dataset_tag, old_file, ref_name,
AE_PART_OF, new_file_tag);
AE_save_myself(dataset_tag);
IMF_set_original_file_name2(new_file_tag, name);
AOM_unlock(dataset_tag);
IMF_release_file_access(&file_data);
}
bool isTypeOf(tag_t objtag, const char * type_name) {
tag_t type = NULLTAG;
TCTYPE_ask_object_type(objtag, &type);
tag_t item_type = NULLTAG;
TCTYPE_find_type(type_name, "", &item_type);
bool is_type = false;
if (item_type != NULLTAG) {
logical isok = FALSE;
TCTYPE_is_type_of(type, item_type, &isok);
if (isok) {
is_type = true;
}
}
return is_type;
}
string GBKToUTF8(const char* strGBK) {
int len = MultiByteToWideChar(CP_ACP, 0, strGBK, -1, NULL, 0);
wchar_t* wstr = new wchar_t[len + 1];
memset(wstr, 0, len + 1);
MultiByteToWideChar(CP_ACP, 0, strGBK, -1, wstr, len);
len = WideCharToMultiByte(CP_UTF8, 0, wstr, -1, NULL, 0, NULL, NULL);
char* str = new char[len + 1];
memset(str, 0, len + 1);
WideCharToMultiByte(CP_UTF8, 0, wstr, -1, str, len, NULL, NULL);
string strTemp = str;
if (wstr) delete[] wstr;
if (str) delete[] str;
return strTemp;
}
/*
-path
-name
*/
static int sign(JNIEnv* env, jclass class_Test, const char* path, char* name, char* sign_location, char* sign_str) {
printf("signin\n");
jmethodID methodId_main = env->GetStaticMethodID(class_Test, "sign", "(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)I");
if (methodId_main == NULL) {
printf("error, check jar location\n");
return 0;
}
string path1 = GBKToUTF8(path);
string name1 = GBKToUTF8(name);
string sign_location1 = GBKToUTF8(sign_location);
string sign_str1 = GBKToUTF8(sign_str);
jstring jpath = env->NewStringUTF(path1.c_str());
jstring jname = env->NewStringUTF(name1.c_str());
jstring jsign_location = env->NewStringUTF(sign_location1.c_str());
jstring jsign_str = env->NewStringUTF(sign_str1.c_str());
printf("path:%s\nname:%s\nsign_location:%s\nsign_str:%s\n", path1.c_str(), name1.c_str(), sign_location1.c_str(), sign_str1.c_str());
jint result = 0;
result = env->CallStaticIntMethod(class_Test, methodId_main, jpath, jname, jsign_location, jsign_str);
int res = result;
printf("result:%d\n", res);
printf("signout\n");
return res;
}
void add_path(JNIEnv* env, const std::string& path) {
const std::string urlPath = "file:/" + path;
jclass classLoaderCls = env->FindClass("java/lang/ClassLoader");
printf("111\n");
jmethodID getSystemClassLoaderMethod = env->GetStaticMethodID(classLoaderCls, "getSystemClassLoader", "()Ljava/lang/ClassLoader;");
jobject classLoaderInstance = env->CallStaticObjectMethod(classLoaderCls, getSystemClassLoaderMethod);
jclass urlClassLoaderCls = env->FindClass("java/net/URLClassLoader");
jmethodID addUrlMethod = env->GetMethodID(urlClassLoaderCls, "addURL", "(Ljava/net/URL;)V");
jclass urlCls = env->FindClass("java/net/URL");
jmethodID urlConstructor = env->GetMethodID(urlCls, "<init>", "(Ljava/lang/String;)V");
jobject urlInstance = env->NewObject(urlCls, urlConstructor, env->NewStringUTF(urlPath.c_str()));
env->CallVoidMethod(classLoaderInstance, addUrlMethod, urlInstance);
std::cout << "Added " << urlPath << " to the classpath." << std::endl;
}
int JD_clear(METHOD_message_t* msg, va_list args, tag_t new_rev) {
printf("升版执行\n");
//获取数据集
const char *sign_location1, *sign_str;
char *temp_path, *attach_type,*prop,**pref_values1;
int n_attachs, pref_count1;
tag_t ref_obj, excelx_tag, excel_tag, wordx_tag, word_tag, type_tag, word_ref, excel_ref, *dataset;
stringstream sign_date;
ITEM_attached_object_t *rev_attachments;
AE_reference_type_t ae_ref;
TCTYPE_find_type("MSExcelX", "Dataset", &excelx_tag);
TCTYPE_find_type("MSExcel", "Dataset", &excel_tag);
TCTYPE_find_type("MSWord", "Dataset", &word_tag);
TCTYPE_find_type("MSWordX", "Dataset", &wordx_tag);
temp_path = getenv("temp");
printf("temp_path:%s\n", temp_path);
//创建tc_export目录
stringstream dir;
dir << temp_path;
dir << "\\tc_export\\";
createDirectory(dir.str());
printf("dir:%s\n", dir.str().c_str());
//获取guid
char buffer[GUID_LEN] = { 0 };
GUID guid;
if (CoCreateGuid(&guid)) {
fprintf(stderr, "create guid error\n");
return -1;
}
_snprintf(buffer, sizeof(buffer),
"%08X-%04X-%04x-%02X%02X-%02X%02X%02X%02X%02X%02X",
guid.Data1, guid.Data2, guid.Data3,
guid.Data4[0], guid.Data4[1], guid.Data4[2],
guid.Data4[3], guid.Data4[4], guid.Data4[5],
guid.Data4[6], guid.Data4[7]);
printf("guid: %s\n", buffer);
POM_AM__set_application_bypass(true);
//申请虚拟机
wstringstream wss;
wss << getenv("JRE_HOME") << "\\bin\\server\\jvm.dll";
printf("wxs:%s\n", wss.str().c_str());
JavaVMInitArgs vmArgs;
const int OPTION_COUNT = 1;
vmArgs.nOptions = OPTION_COUNT;
JavaVMOption options[OPTION_COUNT] = { 0 };
options[0].optionString = "-Xmx1024m";
vmArgs.options = options;
vmArgs.version = JNI_VERSION_1_8;
vmArgs.ignoreUnrecognized = JNI_TRUE;
printf("before load dll\n");
HMODULE hModule = LoadLibrary(wss.str().c_str());
if (hModule == NULL) {
printf("error load dll");
return -1;
}
printf("after load dll\n");
typedef jint(JNICALL *CreateJavaVMFuncPtr)(JavaVM **pvm, void **penv, void *args);
CreateJavaVMFuncPtr CreateJavaVM = (CreateJavaVMFuncPtr)GetProcAddress(hModule, "JNI_CreateJavaVM");
typedef jint(JNICALL * GetCreatedJavaVMs)(JavaVM**, jsize, jsize*);
GetCreatedJavaVMs jni_GetCreatedJavaVMs;
jni_GetCreatedJavaVMs = (GetCreatedJavaVMs)GetProcAddress(GetModuleHandle(
TEXT("jvm.dll")), "JNI_GetCreatedJavaVMs");
JavaVM *jvm = nullptr, *jvms;
JNIEnv *env = nullptr;
jsize size = 0;
jni_GetCreatedJavaVMs(&jvms, 0, &size);
printf("before load jvm\n");
if (size) {
JavaVM** buffer = new JavaVM*[size];
jni_GetCreatedJavaVMs(buffer, size, &size);
buffer[0]->GetEnv((void**)&env, JNI_VERSION_1_8);
jint result = buffer[0]->AttachCurrentThread((void**)&env, NULL);
} else {
jint res = (*CreateJavaVM)(&jvm, (void**)&env, &vmArgs);
if (res < 0) {
printf("error load jvm");
return -1;
}
}
printf("after load jvm\n");
stringstream s;
if (ACCESS(LOCALJARPATH, 0) != 0) {
s << REMOTEJARPATH;
s << "sign2fileRunnable.jar";
add_path(env, s.str().c_str());
} else {
s << LOCALJARPATH;
s << "sign2fileRunnable.jar";
add_path(env, s.str().c_str());
}
printf("add path\n");
jclass class_Test;
int file_type = -1;
int ifail = ITK_ok, objects_count;
tag_t *objects;
ITKCALL(AOM_ask_value_tags(new_rev, "IMAN_master_form_rev", &objects_count, &objects));
PREF_ask_char_values("jd2_signoff_list", &pref_count1, &pref_values1);
stringstream temps;
for (int i = 0;i < pref_count1;i++) {
temps << pref_values1[i];
temps << ",";
}
//表单签名
for (auto iii = 0; iii < objects_count; iii++) {
AOM_lock(objects[iii]);
for (int i = 0;i < pref_count1;i++) {
sign_date.str("");
sign_date << pref_values1[i];
sign_date << "rq";
AOM_ask_value_string(objects[iii], pref_values1[i], &prop);
if (tc_strlen(prop) != 0) {
AOM_set_value_string(objects[iii], pref_values1[i], "");
AOM_set_value_string(objects[iii], sign_date.str().c_str(), "");
}
}
printf("sign clear\n");
ITKCALL(AOM_save(objects[iii]));
AOM_unlock(objects[iii]);
}
MEM_free(objects);
printf("startSign\n");
ITKCALL(AOM_ask_value_tags(new_rev, "IMAN_specification", &n_attachs, &dataset));
for (int i = 0;i < n_attachs;i++) {
stringstream ss;
ss << dir.str().c_str();
printf(ss.str().c_str());
ITKCALL(TCTYPE_ask_object_type(dataset[i], &type_tag));
if (type_tag == wordx_tag || type_tag == word_tag) {
ITKCALL(AE_ask_dataset_named_ref2(dataset[i], "word", &ae_ref, &word_ref));
char *file_name;
ITKCALL(AOM_UIF_ask_value(word_ref, "file_name", &file_name));
ss << buffer;
ss << "_";
ss << file_name;
printf("path:%s\n", ss.str().c_str());
ITKCALL(AE_export_named_ref(dataset[i], "word", ss.str().c_str()));
file_type = 0;
} else if (type_tag == excel_tag || type_tag == excelx_tag) {
ITKCALL(AE_ask_dataset_named_ref2(dataset[i], "excel", &ae_ref, &excel_ref));
char *file_name;
ITKCALL(AOM_UIF_ask_value(excel_ref, "file_name", &file_name));
ss << buffer;
ss << "_";
ss << file_name;
printf("path:%s\n", ss.str().c_str());
ITKCALL(AE_export_named_ref(dataset[i], "excel", ss.str().c_str()));
file_type = 1;
}
printf("file_type:%d\n", file_type);
if (file_type == 0) {
class_Test = env->FindClass("sign2file/SignToWord");
int res = sign(env, class_Test, ss.str().c_str(), "", "clear", (char*)temps.str().c_str());
if (res) {
replace_dataset_named_reference(dataset[i], word_ref, ss.str().c_str(), "word");
}
} else if (file_type == 1) {
class_Test = env->FindClass("sign2file/SignToExcel");
int res = sign(env, class_Test, ss.str().c_str(), "", "clear", (char*)temps.str().c_str());
if (res) {
replace_dataset_named_reference(dataset[i], excel_ref, ss.str().c_str(), "excel");
}
}
file_type = -1;
}
MEM_free(dataset);
AOM_ask_value_tags(new_rev, "TC_Attaches", &n_attachs, &dataset);
for (int i = 0;i < n_attachs;i++) {
stringstream ss;
ss << dir.str().c_str();
ITKCALL(TCTYPE_ask_object_type(dataset[i], &type_tag));
if (type_tag == wordx_tag || type_tag == word_tag) {
ITKCALL(AE_ask_dataset_named_ref2(dataset[i], "word", &ae_ref, &word_ref));
char *file_name;
ITKCALL(AOM_UIF_ask_value(word_ref, "file_name", &file_name));
ss << buffer;
ss << "_";
ss << file_name;
printf("path:%s\n", ss.str().c_str());
ITKCALL(AE_export_named_ref(dataset[i], "word", ss.str().c_str()));
file_type = 0;
} else if (type_tag == excel_tag || type_tag == excelx_tag) {
ITKCALL(AE_ask_dataset_named_ref2(dataset[i], "excel", &ae_ref, &excel_ref));
char *file_name;
ITKCALL(AOM_UIF_ask_value(excel_ref, "file_name", &file_name));
ss << buffer;
ss << "_";
ss << file_name;
printf("path:%s\n", ss.str().c_str());
ITKCALL(AE_export_named_ref(dataset[i], "excel", ss.str().c_str()));
file_type = 1;
}
printf("file_type:%d\n", file_type);
if (file_type == 0) {
class_Test = env->FindClass("sign2file/SignToWord");
int res = sign(env, class_Test, ss.str().c_str(), "", "clear", (char*)temps.str().c_str());
if (res) {
replace_dataset_named_reference(dataset[i], word_ref, ss.str().c_str(), "word");
}
} else if (file_type == 1) {
class_Test = env->FindClass("sign2file/SignToExcel");
int res = sign(env, class_Test, ss.str().c_str(), "", "clear", (char*)temps.str().c_str());
if (res) {
replace_dataset_named_reference(dataset[i], excel_ref, ss.str().c_str(), "excel");
}
}
file_type = -1;
}
MEM_free(dataset);
printf("endSign\n");
FreeLibrary(hModule);
POM_AM__set_application_bypass(false);
return ITK_ok;
}
int JD_Revise_clear(METHOD_message_t* msg, va_list args) {
tag_t new_rev = va_arg(args, tag_t);
char *operation = va_arg(args, char*), **pref_values, *type;
int ifail = ITK_ok, pref_count;
AOM_ask_value_string(new_rev, "object_type", &type);
printf("operation======>%s\n", operation);
if (strcmp(operation, "Revise") == 0 || strcmp(operation, "SaveAs") == 0) {
if (isTypeOf(new_rev, "ItemRevision")) {
//获取首选项
PREF_ask_char_values("jd_revise_clear_revisions",&pref_count,&pref_values);
for (int i = 0;i < pref_count;i++) {
if (strcmp(pref_values[i],type)==0) {
JD_clear(msg, args, new_rev);
break;
}
}
}
}
return ifail;
}
extern int Register_revise_msg(void) {
int status = ITK_ok;
char *err_string, *err_function;
int err_line = -1;
printf("JD_Revise_clear函数开始注册\n");
METHOD_id_t mth_tag;
ITKCALL(status = METHOD_find_method("ItemRevision", ITEM_deep_copy_msg, &mth_tag));
if (mth_tag.id != 0) {
ITKCALL(METHOD_add_action(mth_tag, METHOD_post_action_type, JD_Revise_clear, NULL));
printf("JD_Revise_clear注册成功\n");
}
return status;
}
#ifdef __cplusplus
}
#endif
#include <stdarg.h>
#include <base_utils\Mem.h>
#include <tccore\grm.h>
#include <tccore\grmtype.h>
#include <tc\iman.h>
#include <user_exits\user_exits.h>
#include <tccore\method.h>
#include <property\prop.h>
#include <tccore\aom_prop.h>
#include <property\prop_msg.h>
#include <tccore\imantype.h>
#include <property\prop_errors.h>
#include <tccore\item.h>
#include <lov\lov.h>
#include <sa\sa.h>
#include <tc\emh.h>
#include <res\reservation.h>
#include <tccore\workspaceobject.h>
#include <tc\wsouif_errors.h>
#include <tccore\aom.h>
#include <form\form.h>
#include <bom\bom.h>
#include <epm\cr.h>
#include <epm\releasestatus.h>
/**
* @headerfile standard c & cpp header files
*/
#include <stdio.h>
#include <stdlib.h>
#include <time.h>
#include <string>
#include <vector>
#include <map>
#include <fstream>
#include <iostream>
using namespace std;
/**
* @headerfile user's header files
*/

@ -0,0 +1,32 @@
#ifndef W2_CLEAR_FORM_PROPVALUE
#define W2_CLEAR_FORM_PROPVALUE
#include <sa\am.h>
#include <tccore\aom.h>
#include <tccore\aom_prop.h>
#include <tccore\item.h>
#include <tccore\grm.h>
#include <tc\preferences.h>
#include<tc\tc_macros.h>
#include <user_exits\user_exits.h>
#include <tccore\method.h>
#include <tccore\tctype.h>
#include <tccore\item_msg.h>
#include <tccore\tc_msg.h>
#include <tccore\grmtype.h>
#include <tccore\grm.h>
#include <tccore\imantype.h>
#include <itk\bmf.h>
#include <bmf\libuserext_exports.h>
#ifdef __cplusplus
extern "C" {
#endif
extern USER_EXT_DLL_API int JD_Revise_clear( METHOD_message_t* msg, va_list args );
extern int Register_revise_msg(void);
#ifdef __cplusplus
}
#endif
#include <bmf\libuserext_undef.h>
#endif

@ -0,0 +1,158 @@
#include "epm_handler_common.h"
#include <tc\tc_macros.h>
#include <tc\emh.h>
#include <tc\preferences.h>
#include <property\propdesc.h>
#include <epm\epm.h>
#include <epm\epm_toolkit_tc_utils.h>
#include <tccore\item.h>
#include <tccore\grmtype.h>
#include <tccore\grm.h>
#include <tccore\imantype.h>
#include <sa\am.h>
#include <sa\sa.h>
#include <tccore\aom.h>
#include <tccore\aom_prop.h>
#include <property\prop_errors.h>
#include <tccore\workspaceobject.h>
#include <qry\qry.h>
#include <bom\bom_attr.h>
#include <bom\bom.h>
#include <epm\signoff.h>
#include <pom\pom\pom.h>
#include <pom\pom\pom_errors.h>
#include <fclasses\tc_date.h>
#include <epm\cr.h>
#include <cfm\cfm.h>
#include <sa\am.h>
#include "tc/envelope.h"
#include <stdio.h>
#include "ae/dataset.h"
#include <ctype.h>
#include <string.h>
#include <string>
#include <iostream>
#include <iterator>
#include <map>
#include <vector>
#include "ce/ce.h"
#include <time.h>
#include <windows.h>
#include <iostream>
#include <sql.h>
#include <sqlext.h>
#include "string"
#include "sstream"
#include <sa/tcfile.h>
#include <tccore/aom.h>
#include <sa/tcfile_cache.h>
#include <form/form.h>
#include "ctime"
#include "tchar.h"
using namespace std;
extern "C" int POM_AM__set_application_bypass(logical bypass);
/**
*
*/
int jd_schedule_joint(EPM_action_message_t msg) {
printf("===================================\n");
printf("设置时间表名称 开始\n");
printf("===================================\n");
printf("开超级权限\n");
POM_AM__set_application_bypass(true);
int ifail = ITK_ok;
tag_t tast_tag = NULL_TAG, job;
tast_tag = msg.task;
if (tast_tag != NULL_TAG) {
char * task_name = NULL;
int count = 0;
tag_t * schdule_task_nodes = NULL;
printf("开始获取SCHDULE任务 \n");
AOM_ask_value_tags(tast_tag, "project_task_attachments", &count, &schdule_task_nodes);
printf("获取SCHDULE任务 count =[%d] \n", count);
//printf("task_name:%s\n",task_name);
printf("task_name-------------\n");
if (count >0) {
char * schdule_task_node_type = NULL;
AOM_ask_value_string(schdule_task_nodes[0], "object_type", &schdule_task_node_type);
char * scheduleTaskName = NULL;
//char finish_date_str[300] = "";
printf("object_type:%s\n", schdule_task_node_type);
if (strcmp(schdule_task_node_type, "ScheduleTask") == 0) {
tag_t schdule = NULL_TAG;
// date_t finish_date ;
AOM_ask_value_tag(schdule_task_nodes[0], "schedule_tag", &schdule);
AOM_ask_value_string(schdule_task_nodes[0], "object_name", &scheduleTaskName);
printf("scheduleTaskName:%s\n", scheduleTaskName);
if (schdule != NULL_TAG) {
char * job_name = NULL;
EPM_ask_job(tast_tag, &job);
AOM_ask_value_string(job, "object_name", &job_name);
stringstream ss;
tag_t* project_list;
int project_cnt;
char* project_name = NULL;
char* project_id = NULL;
AOM_ask_value_tags(schdule,"project_list",&project_cnt,&project_list);
if (project_list!=NULL) {
AOM_ask_value_string(project_list[0], "project_id", &project_id);
AOM_ask_value_string(project_list[0], "object_name", &project_name);
ss << job_name;
ss << "-";
ss << project_id;
ss << "-";
ss << project_name;
printf("new job name %s\n", ss.str().c_str());
AOM_lock(job);
AOM_set_value_string(job, "object_name", ss.str().c_str());
//printf("str:%s\n", finish_date_str);
printf("设置属性\n");
AOM_save(job);
AOM_unlock(job);
}
if (job_name != NULL) {
MEM_free(job_name);
job_name = NULL;
}
if (project_id != NULL) {
MEM_free(project_id);
project_id = NULL;
}
if (project_name != NULL) {
MEM_free(project_name);
project_name = NULL;
}
}
}
if (schdule_task_node_type != NULL) {
MEM_free(schdule_task_node_type);
schdule_task_node_type = NULL;
}
}
if (task_name != NULL) {
MEM_free(task_name);
task_name = NULL;
}
if (schdule_task_nodes != NULL) {
MEM_free(schdule_task_nodes);
schdule_task_nodes = NULL;
}
}
printf("关超级权限\n");
POM_AM__set_application_bypass(false);
printf("===================================\n");
printf("设置时间表名称 结束\n");
printf("===================================\n");
return ifail;
}

@ -0,0 +1,581 @@
#include "epm_handler_common.h"
#include <tc\tc_macros.h>
#include <tc\emh.h>
#include <tc\preferences.h>
#include <property\propdesc.h>
#include <epm\epm.h>
#include <epm\epm_toolkit_tc_utils.h>
#include <tccore\item.h>
#include <tccore\grmtype.h>
#include <tccore\grm.h>
#include <tccore\imantype.h>
#include <sa\am.h>
#include <sa\sa.h>
#include <tccore\aom.h>
#include <tccore\aom_prop.h>
#include <property\prop_errors.h>
#include <tccore\workspaceobject.h>
#include <qry\qry.h>
#include <bom\bom_attr.h>
#include <bom\bom.h>
#include <epm\signoff.h>
#include <pom\pom\pom.h>
#include <pom\pom\pom_errors.h>
#include <fclasses\tc_date.h>
#include <epm\cr.h>
#include <cfm\cfm.h>
#include <sa\am.h>
#include "tc/envelope.h"
#include <stdio.h>
#include "ae/dataset.h"
#include <ctype.h>
#include <string.h>
#include <string>
#include <iostream>
#include <iterator>
#include <map>
#include <vector>
#include "ce/ce.h"
#include <time.h>
#include <windows.h>
#include <iostream>
#include <sql.h>
#include <sqlext.h>
#include "string"
#include "sstream"
#include <sa/tcfile.h>
#include <tccore/aom.h>
#include <sa/tcfile_cache.h>
#include <form/form.h>
#include "ctime"
#include "tchar.h"
#include "jni.h"
#ifdef WIN32
#include <io.h>
#include <direct.h>
#else
#include <unistd.h>
#include <sys/stat.h>
#endif
#include <stdint.h>
#include <string>
#define MAX_PATH_LEN 256
#define GUID_LEN 64
#ifdef WIN32
#define ACCESS(fileName,accessMode) _access(fileName,accessMode)
#define MKDIR(path) _mkdir(path)
#else
#define ACCESS(fileName,accessMode) access(fileName,accessMode)
#define MKDIR(path) mkdir(path,S_IRWXU | S_IRWXG | S_IROTH | S_IXOTH)
#endif
#define LOCALJARPATH "D:\\Siemens\\Teamcenter12\\bin\\tc_extra_jar\\"
#define REMOTEJARPATH "D:\\app\\Siemens\\Teamcenter12\\bin\\tc_extra_jar\\"
using namespace std;
extern "C" int POM_AM__set_application_bypass(logical bypass);
int32_t createDirectory(const std::string &directoryPath) {
uint32_t dirPathLen = directoryPath.length();
if (dirPathLen > MAX_PATH_LEN) {
return -1;
}
char tmpDirPath[MAX_PATH_LEN] = { 0 };
for (uint32_t i = 0; i < dirPathLen; ++i) {
tmpDirPath[i] = directoryPath[i];
if (tmpDirPath[i] == '\\' || tmpDirPath[i] == '/') {
if (ACCESS(tmpDirPath, 0) != 0) {
int32_t ret = MKDIR(tmpDirPath);
if (ret != 0) {
return ret;
}
}
}
}
return 0;
}
static void replace_dataset_named_reference(tag_t dataset_tag, tag_t old_file,
const char *new_file_path, char *ref_name) {
IMF_file_data_p_t file_data;
int index = 0;
char *name;
IMF_get_file_access(old_file, 0, &file_data);
tag_t new_file_tag = NULLTAG;
AOM_lock(old_file);
IMF_ask_original_file_name2(old_file, &name);
printf("old name:%s\n",name);
IMF_replace_file_and_get_new_tag(old_file, new_file_path,
FALSE, &new_file_tag);
AOM_lock(dataset_tag);
AE_replace_dataset_named_ref2(dataset_tag, old_file, ref_name,
AE_PART_OF, new_file_tag);
AE_save_myself(dataset_tag);
IMF_set_original_file_name2(new_file_tag, name);
AOM_unlock(dataset_tag);
IMF_release_file_access(&file_data);
}
bool isTypeOf(tag_t objtag, const char * type_name) {
tag_t type = NULLTAG;
TCTYPE_ask_object_type(objtag, &type);
tag_t item_type = NULLTAG;
TCTYPE_find_type(type_name, "", &item_type);
bool is_type = false;
if (item_type != NULLTAG) {
logical isok = FALSE;
TCTYPE_is_type_of(type, item_type, &isok);
if (isok) {
is_type = true;
}
}
return is_type;
}
string GBKToUTF8(const char* strGBK) {
int len = MultiByteToWideChar(CP_ACP, 0, strGBK, -1, NULL, 0);
wchar_t* wstr = new wchar_t[len + 1];
memset(wstr, 0, len + 1);
MultiByteToWideChar(CP_ACP, 0, strGBK, -1, wstr, len);
len = WideCharToMultiByte(CP_UTF8, 0, wstr, -1, NULL, 0, NULL, NULL);
char* str = new char[len + 1];
memset(str, 0, len + 1);
WideCharToMultiByte(CP_UTF8, 0, wstr, -1, str, len, NULL, NULL);
string strTemp = str;
if (wstr) delete[] wstr;
if (str) delete[] str;
return strTemp;
}
/*
-path
-name
*/
static int sign(JNIEnv* env, jclass class_Test, const char* path, char* name, char* sign_location, char* sign_str) {
stringstream ss;
printf("signin\n");
jmethodID methodId_main = env->GetStaticMethodID(class_Test, "sign", "(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)I");
if (methodId_main == NULL) {
printf("error, check jar location\n");
ss << "找不到sign2fileRunnable.jar 确认路径为:";
ss << REMOTEJARPATH;
EMH_store_error_s1(EMH_severity_error, EMH_ATTR_error_base, ss.str().c_str());
return 0;
}
string path1 = GBKToUTF8(path);
string name1 = GBKToUTF8(name);
string sign_location1 = GBKToUTF8(sign_location);
string sign_str1 = GBKToUTF8(sign_str);
jstring jpath = env->NewStringUTF(path1.c_str());
jstring jname = env->NewStringUTF(name1.c_str());
jstring jsign_location = env->NewStringUTF(sign_location1.c_str());
jstring jsign_str = env->NewStringUTF(sign_str1.c_str());
printf("path:%s\nname:%s\nsign_location:%s\nsign_str:%s\n", path1.c_str(), name1.c_str(), sign_location1.c_str(), sign_str1.c_str());
jint result = 0;
result = env->CallStaticIntMethod(class_Test, methodId_main, jpath, jname, jsign_location, jsign_str);
int res = result;
printf("result:%d\n", res);
printf("signout\n");
return res;
}
void add_path(JNIEnv* env, const std::string& path) {
const std::string urlPath = "file:/" + path;
jclass classLoaderCls = env->FindClass("java/lang/ClassLoader");
printf("111\n");
jmethodID getSystemClassLoaderMethod = env->GetStaticMethodID(classLoaderCls, "getSystemClassLoader", "()Ljava/lang/ClassLoader;");
jobject classLoaderInstance = env->CallStaticObjectMethod(classLoaderCls, getSystemClassLoaderMethod);
jclass urlClassLoaderCls = env->FindClass("java/net/URLClassLoader");
jmethodID addUrlMethod = env->GetMethodID(urlClassLoaderCls, "addURL", "(Ljava/net/URL;)V");
jclass urlCls = env->FindClass("java/net/URL");
jmethodID urlConstructor = env->GetMethodID(urlCls, "<init>", "(Ljava/lang/String;)V");
jobject urlInstance = env->NewObject(urlCls, urlConstructor, env->NewStringUTF(urlPath.c_str()));
env->CallVoidMethod(classLoaderInstance, addUrlMethod, urlInstance);
std::cout << "Added " << urlPath << " to the classpath." << std::endl;
}
bool find(int prop_cnt, char** props, char* prop) {
for (int i = 0;i < prop_cnt;i++) {
if (tc_strcmp(props[i], prop) == 0) {
return true;
}
}
return false;
}
//吉德表单签名
int jd_signoff(EPM_action_message_t msg) {
const char *sign_location, *sign_str;
int ifail = ITK_ok, att_count, objects_count, pref_count, prop_cnt;
tag_t rootTask, *attachments, user_tag, *objects;
char *user_name, **pref_values, **prop_names;
logical verdict;
bool flag;
stringstream sign_date, errorMsg;
//获取时间
time_t t;
time(&t);
tm* time = localtime(&t);
stringstream date;
date << time->tm_year + 1900 << ".";
date << time->tm_mon + 1 << ".";
date << time->tm_mday;
//获取guid
//获取guid
char buffer[GUID_LEN] = { 0 };
GUID guid;
if (CoCreateGuid(&guid)) {
fprintf(stderr, "create guid error\n");
return NULL;
}
_snprintf(buffer, sizeof(buffer),
"%08X-%04X-%04x-%02X%02X-%02X%02X%02X%02X%02X%02X",
guid.Data1, guid.Data2, guid.Data3,
guid.Data4[0], guid.Data4[1], guid.Data4[2],
guid.Data4[3], guid.Data4[4], guid.Data4[5],
guid.Data4[6], guid.Data4[7]);
printf("guid: %s\n", buffer);
//获取数据集
char *temp_path, *attach_type;
int n_attachs;
tag_t ref_obj, excelx_tag, excel_tag, wordx_tag, word_tag, type_tag, word_ref, excel_ref, *dataset;
ITEM_attached_object_t *rev_attachments;
AE_reference_type_t ae_ref;
TCTYPE_find_type("MSExcelX", "Dataset", &excelx_tag);
TCTYPE_find_type("MSExcel", "Dataset", &excel_tag);
TCTYPE_find_type("MSWord", "Dataset", &word_tag);
TCTYPE_find_type("MSWordX", "Dataset", &wordx_tag);
temp_path = getenv("temp");
POM_AM__set_application_bypass(true);
//获取当前用户
POM_get_user(&user_name, &user_tag);
//获取选中的目标对象
TC_argument_list_t * arguments = msg.arguments;
int arg_cnt = TC_number_of_arguments(arguments), status = 0;
EPM_ask_root_task(msg.task, &rootTask);
EPM_ask_attachments(rootTask, EPM_target_attachment, &att_count, &attachments);
//获取流程中配置的handler属性
map<string, string> paras;
for (auto i = 0; i < arg_cnt; i++) {
char *temp_key, *temp_val;
ITK_ask_argument_named_value(TC_next_argument(arguments), &temp_key, &temp_val);
paras[temp_key] = temp_val;
}
sign_location = paras["sign_location"].c_str();
printf("sign_location:%s\n", sign_location);
sign_date << sign_location;
sign_date << "rq";
//读取首选项
PREF_ask_char_values("jd2_signoff_list", &pref_count, &pref_values);
flag = false;
stringstream temps;
for (int i = 0;i < pref_count;i++) {
printf("signoff:%s\n", pref_values[i]);
temps << pref_values[i];
temps << ",";
if (strcmp(pref_values[i], sign_location) == 0) {
flag = true;
}
}
if (strcmp("clear", sign_location) == 0) {
flag = true;
}
if (!flag) {
errorMsg << "流程参数\"";
errorMsg << sign_location;
errorMsg << "\"不存在于首选项中,检查首选项\"jd2_signoff_list\"!";
EMH_store_error_s1(EMH_severity_error, EMH_ATTR_error_base, errorMsg.str().c_str());
return -1;
}
//创建tc_export目录
stringstream dir;
dir << temp_path;
dir << "\\tc_export\\";
createDirectory(dir.str());
LPVOID lpMsgBuf;
FormatMessage(
FORMAT_MESSAGE_ALLOCATE_BUFFER |
FORMAT_MESSAGE_FROM_SYSTEM |
FORMAT_MESSAGE_IGNORE_INSERTS,
NULL,
GetLastError(),
MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT), // Default language
(LPTSTR)&lpMsgBuf,
0,
NULL
);
//申请虚拟机
//wstringstream wss;
//wss << getenv("JRE_HOME") << "\\bin\\server\\jvm.dll";
//JavaVMInitArgs vmArgs;
//vmArgs.version = JNI_VERSION_1_8;
//const int OPTION_COUNT = 2;
//vmArgs.nOptions = OPTION_COUNT;
//JavaVMOption options[OPTION_COUNT] = { 0 };
//options[0].optionString = "-Djava.class.path=D:\\Siemens\\Teamcenter11\\bin\\tc_extra_jar\\sign2fileRunnable.jar";
//options[1].optionString = "-Xmx1024m";
//vmArgs.options = options;
//vmArgs.ignoreUnrecognized = JNI_TRUE;
//printf("before load dll\n");
//HMODULE hModule = LoadLibrary(wss.str().c_str());
//if (hModule == NULL) {
// printf("error load dll");
// return -1;
//}
//printf("after load dll\n");
//typedef jint(JNICALL *CreateJavaVMFuncPtr)(JavaVM **pvm, void **penv, void *args);
//CreateJavaVMFuncPtr CreateJavaVM = (CreateJavaVMFuncPtr)GetProcAddress(hModule, "JNI_CreateJavaVM");
//JavaVM *jvm = nullptr;
//JNIEnv *env = nullptr;
//jint res = (*CreateJavaVM)(&jvm, (void**)&env, &vmArgs);
//if (res < 0) {
// printf("error load jvm");
// return -1;
//}
//printf("after load jvm\n");
wstringstream wss;
wss << getenv("JRE_HOME") << "\\bin\\server\\jvm.dll";
JavaVMInitArgs vmArgs;
const int OPTION_COUNT = 1;
vmArgs.nOptions = OPTION_COUNT;
JavaVMOption options[OPTION_COUNT] = { 0 };
options[0].optionString = "-Xmx1024m";
vmArgs.options = options;
vmArgs.version = JNI_VERSION_1_8;
vmArgs.ignoreUnrecognized = JNI_TRUE;
printf("before load dll\n");
HMODULE hModule = LoadLibrary(wss.str().c_str());
if (hModule == NULL) {
printf("error load dll");
return -1;
}
printf("after load dll\n");
typedef jint(JNICALL *CreateJavaVMFuncPtr)(JavaVM **pvm, void **penv, void *args);
CreateJavaVMFuncPtr CreateJavaVM = (CreateJavaVMFuncPtr)GetProcAddress(hModule, "JNI_CreateJavaVM");
typedef jint(JNICALL * GetCreatedJavaVMs)(JavaVM**, jsize, jsize*);
GetCreatedJavaVMs jni_GetCreatedJavaVMs;
jni_GetCreatedJavaVMs = (GetCreatedJavaVMs)GetProcAddress(GetModuleHandle(
TEXT("jvm.dll")), "JNI_GetCreatedJavaVMs");
JavaVM *jvm = nullptr, *jvms;
JNIEnv *env = nullptr;
jsize size = 0;
jni_GetCreatedJavaVMs(&jvms, 0, &size);
printf("before load jvm\n");
if (size) {
JavaVM** buffer = new JavaVM*[size];
jni_GetCreatedJavaVMs(buffer, size, &size);
buffer[0]->GetEnv((void**)&env, JNI_VERSION_1_8);
jint result = buffer[0]->AttachCurrentThread((void**)&env, NULL);
} else {
jint res = (*CreateJavaVM)(&jvm, (void**)&env, &vmArgs);
if (res < 0) {
printf("error load jvm");
return -1;
}
}
printf("after load jvm\n");
stringstream s;
if (ACCESS(LOCALJARPATH, 0) != 0) {
s << REMOTEJARPATH;
s << "sign2fileRunnable.jar";
add_path(env, s.str().c_str());
} else {
s << LOCALJARPATH;
s << "sign2fileRunnable.jar";
add_path(env, s.str().c_str());
}
printf("add path\n");
jclass class_Test;
int file_type = -1;
printf("user_name:%s\n", user_name);
printf("date:%s\n", date.str().c_str());
for (auto ii = 0; ii < att_count; ii++) {
if (isTypeOf(attachments[ii], "ItemRevision")) {
ITKCALL(AOM_ask_value_tags(attachments[ii], "IMAN_master_form_rev", &objects_count, &objects));
//表单签名
map<char*, char*> props;
for (auto iii = 0; iii < objects_count; iii++) {
ITKCALL(AOM_ask_prop_names(objects[iii], &prop_cnt, &prop_names));
AOM_lock(objects[iii]);
if (strcmp("clear", sign_location) == 0) {
for (int i = 0;i < pref_count;i++) {
sign_date.str("");
sign_date << pref_values[i];
sign_date << "rq";
if (find(prop_cnt, prop_names, pref_values[i])) {
ITKCALL(AOM_set_value_string(objects[iii], pref_values[i], ""));
} else {
printf("属性\"%s\"不存在", pref_values[i]);
}
if (find(prop_cnt, prop_names, (char*)sign_date.str().c_str())) {
ITKCALL(AOM_set_value_string(objects[iii], sign_date.str().c_str(), ""));
} else {
printf("属性\"%s\"不存在", sign_date.str().c_str());
}
}
printf("sign clear\n");
} else {
if (find(prop_cnt, prop_names, (char*)sign_location)) {
ITKCALL(AOM_set_value_string(objects[iii], sign_location, user_name));
} else {
printf("属性\"%s\"不存在", sign_location);
}
if (find(prop_cnt, prop_names, (char*)sign_date.str().c_str())) {
ITKCALL(AOM_set_value_string(objects[iii], sign_date.str().c_str(), date.str().c_str()));
} else {
printf("属性\"%s\"不存在", sign_date.str().c_str());
}
printf("%s,%s signoff\n", sign_location, sign_date.str().c_str());
}
ITKCALL(AOM_save(objects[iii]));
AOM_unlock(objects[iii]);
}
MEM_free(objects);
printf("startSign\n");
ITKCALL(AOM_ask_value_tags(attachments[ii], "IMAN_specification", &n_attachs, &dataset));
for (int i = 0;i < n_attachs;i++) {
stringstream ss;
ss << dir.str().c_str();
printf(ss.str().c_str());
ITKCALL(TCTYPE_ask_object_type(dataset[i], &type_tag));
if (type_tag == wordx_tag || type_tag == word_tag) {
ITKCALL(AE_ask_dataset_named_ref2(dataset[i], "word", &ae_ref, &word_ref));
char *file_name;
ITKCALL(AOM_UIF_ask_value(word_ref, "file_name", &file_name));
ss << buffer;
ss << "_";
ss << file_name;
printf("path:%s\n", ss.str().c_str());
ITKCALL(AE_export_named_ref(dataset[i], "word", ss.str().c_str()));
file_type = 0;
} else if (type_tag == excel_tag || type_tag == excelx_tag) {
ITKCALL(AE_ask_dataset_named_ref2(dataset[i], "excel", &ae_ref, &excel_ref));
char *file_name;
ITKCALL(AOM_UIF_ask_value(excel_ref, "file_name", &file_name));
ss << buffer;
ss << "_";
ss << file_name;
printf("path:%s\n", ss.str().c_str());
ITKCALL(AE_export_named_ref(dataset[i], "excel", ss.str().c_str()));
file_type = 1;
}
printf("file_type:%d\n", file_type);
if (file_type == 0) {
class_Test = env->FindClass("sign2file/SignToWord");
int res = sign(env, class_Test, ss.str().c_str(), user_name, (char*)sign_location, (char*)temps.str().c_str());
if (res) {
replace_dataset_named_reference(dataset[i], word_ref, ss.str().c_str(), "word");
} else {
return -1;
}
} else if (file_type == 1) {
class_Test = env->FindClass("sign2file/SignToExcel");
int res = sign(env, class_Test, ss.str().c_str(), user_name, (char*)sign_location, (char*)temps.str().c_str());
if (res) {
replace_dataset_named_reference(dataset[i], excel_ref, ss.str().c_str(), "excel");
} else {
return -1;
}
}
file_type = -1;
}
MEM_free(dataset);
AOM_ask_value_tags(attachments[ii], "TC_Attaches", &n_attachs, &dataset);
for (int i = 0;i < n_attachs;i++) {
stringstream ss;
ss << dir.str().c_str();
ITKCALL(TCTYPE_ask_object_type(dataset[i], &type_tag));
if (type_tag == wordx_tag || type_tag == word_tag) {
ITKCALL(AE_ask_dataset_named_ref2(dataset[i], "word", &ae_ref, &word_ref));
char *file_name;
ITKCALL(AOM_UIF_ask_value(word_ref, "file_name", &file_name));
ss << buffer;
ss << "_";
ss << file_name;
printf("path:%s\n", ss.str().c_str());
ITKCALL(AE_export_named_ref(dataset[i], "word", ss.str().c_str()));
file_type = 0;
} else if (type_tag == excel_tag || type_tag == excelx_tag) {
ITKCALL(AE_ask_dataset_named_ref2(dataset[i], "excel", &ae_ref, &excel_ref));
char *file_name;
ITKCALL(AOM_UIF_ask_value(excel_ref, "file_name", &file_name));
ss << buffer;
ss << "_";
ss << file_name;
printf("path:%s\n", ss.str().c_str());
ITKCALL(AE_export_named_ref(dataset[i], "excel", ss.str().c_str()));
file_type = 1;
}
printf("file_type:%d\n", file_type);
if (file_type == 0) {
class_Test = env->FindClass("sign2file/SignToWord");
int res = sign(env, class_Test, ss.str().c_str(), user_name, (char*)sign_location, (char*)temps.str().c_str());
if (res) {
replace_dataset_named_reference(dataset[i], word_ref, ss.str().c_str(), "word");
} else {
return -1;
}
} else if (file_type == 1) {
class_Test = env->FindClass("sign2file/SignToExcel");
int res = sign(env, class_Test, ss.str().c_str(), user_name, (char*)sign_location, (char*)temps.str().c_str());
if (res) {
replace_dataset_named_reference(dataset[i], excel_ref, ss.str().c_str(), "excel");
} else {
return -1;
}
}
file_type = -1;
}
MEM_free(dataset);
printf("endSign\n");
}
}
FreeLibrary(hModule);
POM_AM__set_application_bypass(false);
return 0;
}

@ -0,0 +1,71 @@
/**
* @defgroup common
* @defgroup workflow
* @defgroup bmf
* @defgroup service
*/
/**
* @addtogroup common
* @{
*/
/**
* @file
* @brief
* @date 2014/4/21
* @author mengyawei
*/
#pragma warning (disable: 4819)
/**
* @headerfile tcua
*/
#include <tc/tc.h>
#include <tccore/custom.h>
#include <server_exits/user_server_exits.h>
#include "error_handling.h"
#include "epm_register_handler.h"
#include "epm_handler_common.h"
#ifdef __cplusplus
extern "C" {
#endif
/**
* @fn extern "C" DLLAPI int liborigin_register_callbacks
* @return usually return ITK_ok
* @brief liborigin customization entry
*/
DLLAPI int libqtmc_register_callbacks()
{
int ifail = ITK_ok;
CALL( ifail = CUSTOM_register_exit(
"libqtmc",
"USERSERVICE_register_methods",
(CUSTOM_EXIT_ftn_t)USERSERVICE_custom_register_methods) );
fprintf( stdout, "\n libqtmc registering USERSERVICE_register_methods completed!\n" );
CALL( ifail = CUSTOM_register_exit(
"libqtmc",
"USER_gs_shell_init_module",
(CUSTOM_EXIT_ftn_t)CUST_init_module));
fprintf( stdout, "\n libqtmc registering USER_gs_shell_init_module completed!\n" );
return ifail;
}
#ifdef __cplusplus
}
#endif
/**
* @}
*/

@ -0,0 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="javasdk" version="8.0.0" targetFramework="native" />
<package id="teamcenter" version="12.0.0" targetFramework="native" />
</packages>

@ -0,0 +1,8 @@
// stdafx.cpp : 只包括标准包含文件的源文件
// HEZON_ITK.pch 将作为预编译头
// stdafx.obj 将包含预编译类型信息
#include "stdafx.h"
// TODO: 在 STDAFX.H 中
// 引用任何所需的附加头文件,而不是在此文件中引用

@ -0,0 +1,15 @@
// stdafx.h : 标准系统包含文件的包含文件,
// 或是经常使用但不常更改的
// 特定于项目的包含文件
//
#pragma once
#include "targetver.h"
#include <stdio.h>
#include <tchar.h>
// TODO: 在此处引用程序需要的其他头文件

@ -0,0 +1,146 @@
/**
* @file string_helper.cpp
* @brief string utility functions' implemention
* @author James
* @history
* ===================================================================================
* Date Name Description of Change
* 09-July-2008 James
* 14-Jau-2009 James modify Split functions, add trim blank characters
*/
#pragma warning(disable:4996)
//
//#include <stdio.h>
//#include <iostream>
//#include <windows.h>
#include "string_helper.h"
string TrimString( string strArg )
{
size_t index1 = 0;
index1 = strArg.find_first_not_of( ' ');
if( index1 != string::npos )
strArg.erase( strArg.begin(), strArg.begin()+index1 );
index1 = strArg.find_last_not_of( ' ');
if( index1 != string::npos )
strArg.erase( strArg.begin() + index1 + 1 );
return strArg;
}
void Split( string strArg, char spliter, vector<string> &ans )
{
ans.clear();
size_t index0 = 0;
string one_arg;
if ( strArg.find_first_not_of(' ') == string.npos )
strArg = "";
while( strArg.size()>0 )
{
index0 = strArg.find_first_of( spliter );
if( index0 != string::npos )
{
one_arg = strArg.substr( 0,index0 );
strArg = strArg.substr( index0 + 1 );
ans.push_back( one_arg );
}
else
{
ans.push_back( strArg );
break;
}
}
}
void Split( string strArg, string spliter, vector<string> &ans )
{
ans.clear();
size_t index0;
string one_arg;
if ( strArg.find_first_not_of(" ") == string::npos )
strArg = "";
while( strArg.size()>0 )
{
index0 = strArg.find(spliter);
if( index0 != string::npos )
{
one_arg = strArg.substr( 0, index0 );
strArg = strArg.substr( index0 + spliter.size() );
ans.push_back( one_arg );
}
else
{
ans.push_back( strArg );
break;
}
}
}
void RemoveLiner( string &in, string &out )
{
char buf[BUFSIZ] = "";
for( int i=0; i<(int)in.size(); i++ )
{
if( in[i] == '\n')
continue;
else
sprintf( buf,"%s%c", buf, in[i] );
}
out.assign(buf);
}
////Converting a WChar string to a Ansi string
//std::string WChar2Ansi(LPCWSTR pwszSrc)
//{
// int nLen = WideCharToMultiByte(CP_ACP, 0, pwszSrc, -1, NULL, 0, NULL, NULL);
//
// if (nLen<= 0) return std::string("");
//
// char* pszDst = new char[nLen];
// if (NULL == pszDst) return std::string("");
//
// WideCharToMultiByte(CP_ACP, 0, pwszSrc, -1, pszDst, nLen, NULL, NULL);
// pszDst[nLen -1] = 0;
//
// std::string strTemp(pszDst);
// delete [] pszDst;
//
// return strTemp;
//}
//
//string ws2s(wstring& inputws){ return WChar2Ansi(inputws.c_str()); }
//
////Converting a Ansi string to WChar string
//std::wstring Ansi2WChar(LPCSTR pszSrc, int nLen)
//{
// int nSize = MultiByteToWideChar(CP_ACP, 0, (LPCSTR)pszSrc, nLen, 0, 0);
// if(nSize <= 0) return NULL;
//
// WCHAR *pwszDst = new WCHAR[nSize+1];
// if( NULL == pwszDst) return NULL;
//
// MultiByteToWideChar(CP_ACP, 0,(LPCSTR)pszSrc, nLen, pwszDst, nSize);
// pwszDst[nSize] = 0;
//
// if( pwszDst[0] == 0xFEFF) // skip Oxfeff
// for(int i = 0; i < nSize; i ++)
// pwszDst[i] = pwszDst[i+1];
//
// wstring wcharString(pwszDst);
// delete pwszDst;
//
// return wcharString;
//}
//
//std::wstring s2ws(const string& s){ return Ansi2WChar(s.c_str(),s.size());}

@ -0,0 +1,25 @@
/**
* @file string_helper.h
* @brief string utilities to help dealing with string
* @author James
* @history
* ===================================================================================
* Date Name Description of Change
* 09-July-2008 James
*/
#ifndef STRING_HELPER
#define STRING_HELPER
#include <string>
#include <vector>
using namespace std;
string TrimString( string strArg );
void Split( string strArg, char spliter, vector<string> &ans );
void Split( string strArg, string spliter, vector<string> &ans );
void RemoveLiner( string &in, string &out );
//string ws2s(wstring& inputws);
//wstring s2ws(const string& s);
#endif

@ -0,0 +1,8 @@
#pragma once
// 包括 SDKDDKVer.h 将定义可用的最高版本的 Windows 平台。
// 如果要为以前的 Windows 平台生成应用程序,请包括 WinSDKVer.h并将
// WIN32_WINNT 宏设置为要支持的平台,然后再包括 SDKDDKVer.h。
#include <SDKDDKVer.h>

@ -0,0 +1,61 @@
#include "util.h"
string ConvertToString(System::String^ str)
{
char* p = (char*)(void*)System::Runtime::InteropServices::Marshal::StringToHGlobalAnsi(str);
return p;
}
System::String ^ convert_to_cstring(const char *p)
{
return System::Runtime::InteropServices::Marshal::PtrToStringAnsi((System::IntPtr)(char *)p);
}
bool isTypeOf(tag_t objtag, const char * type_name) {
tag_t type = NULLTAG;
TCTYPE_ask_object_type(objtag, &type);
tag_t item_type = NULLTAG;
TCTYPE_find_type(type_name, "", &item_type);
bool is_type = false;
if (item_type != NULLTAG) {
logical isok = FALSE;
TCTYPE_is_type_of(type, item_type, &isok);
if (isok) {
is_type = true;
}
}
return is_type;
}
void split(std::string s, const char* delim, std::vector<std::string>* ret)
{
size_t last = 0;
size_t index = s.find(delim, last);
int size = strlen(delim);
while (index != std::string::npos) {
ret->push_back(s.substr(last, index - last));
last = index + size;
index = s.find(delim, last);
}
if (index - last > 0) {
ret->push_back(s.substr(last, index - last));
}
}
const char* newGUID()
{
static char buf[64] = { 0 };
GUID guid;
if (S_OK == ::CoCreateGuid(&guid))
{
_snprintf(buf, sizeof(buf)
, "%08X-%04X-%04x-%02X%02X-%02X%02X%02X%02X%02X%02X"
, guid.Data1
, guid.Data2
, guid.Data3
, guid.Data4[0], guid.Data4[1]
, guid.Data4[2], guid.Data4[3], guid.Data4[4], guid.Data4[5]
, guid.Data4[6], guid.Data4[7]
);
}
return (const char*)buf;
}

@ -0,0 +1,68 @@
#pragma once
#include "epm_handler_common.h"
#include <tc\tc_macros.h>
#include <tc\emh.h>
#include <tc\preferences.h>
#include <property\propdesc.h>
#include <epm\epm.h>
#include <epm\epm_toolkit_tc_utils.h>
#include <tccore\item.h>
#include <tccore\grmtype.h>
#include <tccore\grm.h>
#include <tccore\imantype.h>
#include <sa\am.h>
#include <sa\sa.h>
#include <tccore\aom.h>
#include <tccore\aom_prop.h>
#include <property\prop_errors.h>
#include <tccore\workspaceobject.h>
#include <qry\qry.h>
#include <bom\bom_attr.h>
#include <bom\bom.h>
#include <epm\signoff.h>
#include <pom\pom\pom.h>
#include <pom\pom\pom_errors.h>
#include <fclasses\tc_date.h>
#include <epm\cr.h>
#include <cfm\cfm.h>
#include <sa\am.h>
#include "tc/envelope.h"
#include <stdio.h>
#include "ae/dataset.h"
#include <ctype.h>
#include <string.h>
#include <string>
#include <iostream>
#include <iterator>
#include <map>
#include <vector>
#include "ce/ce.h"
#include <time.h>
#include <windows.h>
#include <iostream>
#include <sql.h>
#include <sqlext.h>
#include "string"
#include "sstream"
#include <sa/tcfile.h>
#include <tccore/aom.h>
#include <sa/tcfile_cache.h>
#include "ctime"
#include "tchar.h"
#include "ics/ics.h"
#include "ics/ics2.h"
#using "./declib.dll"
using namespace std;
using namespace Testdll;
using namespace System;
extern "C" int POM_AM__set_application_bypass(logical bypass);
string ConvertToString(System::String^ str);
System::String ^ convert_to_cstring(const char *p);
bool isTypeOf(tag_t objtag, const char * type_name);
void split(std::string s, const char* delim, std::vector<std::string>* ret);
const char* newGUID();

@ -0,0 +1,4 @@
; Listing generated by Microsoft (R) Optimizing Compiler Version 19.00.24210.0
; Generated by VC++ for Common Language Runtime
.file "C:\Users\lyf\AppData\Local\Temp\.NETFramework,Version=v4.0.AssemblyAttributes.cpp"

@ -0,0 +1,34 @@
e:\work\vs_workspace\jditk\hezon_itk\x64\release\vc140.pdb
e:\work\vs_workspace\jditk\hezon_itk\x64\release\util.obj
e:\work\vs_workspace\jditk\hezon_itk\x64\release\jd_signoff.obj
e:\work\vs_workspace\jditk\hezon_itk\x64\release\jd_schedule_joint.obj
e:\work\vs_workspace\jditk\hezon_itk\x64\release\jd_complate_first_task.obj
e:\work\vs_workspace\jditk\hezon_itk\x64\release\jd_clear_field.obj
e:\work\vs_workspace\jditk\hezon_itk\x64\release\jd_batch_process.obj
e:\work\vs_workspace\jditk\hezon_itk\x64\release\jd_add_attachments.obj
e:\work\vs_workspace\jditk\hezon_itk\x64\release\bs_custom_main.obj
e:\work\vs_workspace\jditk\hezon_itk\x64\release\epm_register_handler.obj
e:\work\vs_workspace\jditk\hezon_itk\x64\release\bs_wl_check.obj
e:\work\vs_workspace\jditk\hezon_itk\x64\release\bs_test_release_check.obj
e:\work\vs_workspace\jditk\hezon_itk\x64\release\bs_sign_cad.obj
e:\work\vs_workspace\jditk\hezon_itk\x64\release\bs_signoff.obj
e:\work\vs_workspace\jditk\hezon_itk\x64\release\bs_sap.obj
e:\work\vs_workspace\jditk\hezon_itk\x64\release\bs_file_transfer.obj
e:\work\vs_workspace\jditk\hezon_itk\x64\release\bs_bypass.obj
e:\work\vs_workspace\jditk\hezon_itk\x64\release\bs_bom_save_check.obj
e:\work\vs_workspace\jditk\hezon_itk\x64\release\bs_bom_check.obj
e:\work\vs_workspace\jditk\hezon_itk\x64\release\.netframework,version=v4.0.assemblyattributes.obj
e:\work\vs_workspace\jditk\hezon_itk\x64\release\.netframework,version=v4.0.assemblyattributes.asm
e:\work\vs_workspace\jditk\x64\release\bs.dll
e:\work\vs_workspace\jditk\x64\release\hezon_itk.pdb
e:\work\vs_workspace\jditk\hezon_itk\x64\release\hezon_itk.tlog\metagen.write.1.tlog
e:\work\vs_workspace\jditk\hezon_itk\x64\release\hezon_itk.vcxprojresolveassemblyreference.cache
e:\work\vs_workspace\jditk\hezon_itk\x64\release\hezon_itk.tlog\cl.command.1.tlog
e:\work\vs_workspace\jditk\hezon_itk\x64\release\hezon_itk.tlog\cl.read.1.tlog
e:\work\vs_workspace\jditk\hezon_itk\x64\release\hezon_itk.tlog\cl.write.1.tlog
e:\work\vs_workspace\jditk\hezon_itk\x64\release\hezon_itk.tlog\link.command.1.tlog
e:\work\vs_workspace\jditk\hezon_itk\x64\release\hezon_itk.tlog\link.read.1.tlog
e:\work\vs_workspace\jditk\hezon_itk\x64\release\hezon_itk.tlog\link.write.1.tlog
e:\work\vs_workspace\jditk\hezon_itk\x64\release\hezon_itk.tlog\metagen.read.1.tlog
e:\work\vs_workspace\jditk\hezon_itk\x64\release\hezon_itk.tlog\declib.dll.metagen
e:\work\vs_workspace\jditk\hezon_itk\x64\release\hezon_itk.tlog\tzres.dll.bi

@ -0,0 +1,2 @@
#v4.0:v110:false
Release|x64|C:\Users\Administrator\Documents\c++\HEZON_ITK\|

@ -0,0 +1,202 @@
 bs_bom_check.cpp
e:\work\vs_workspace\jditk\hezon_itk\epm_handler_common.h : warning C4819: 该文件包含不能在当前代码页(936)中表示的字符。请将该文件保存为 Unicode 格式以防止数据丢失
E:\work\include12_2\pom/pom/pom.h(806): warning C4819: 该文件包含不能在当前代码页(936)中表示的字符。请将该文件保存为 Unicode 格式以防止数据丢失
E:\work\include12_2\pom/pom/pom.h(5417): warning C4819: 该文件包含不能在当前代码页(936)中表示的字符。请将该文件保存为 Unicode 格式以防止数据丢失
bs_bom_check.cpp(27): warning C4101: “lines”: 未引用的局部变量
bs_bom_check.cpp(26): warning C4101: “line_cnt”: 未引用的局部变量
bs_bom_save_check.cpp
e:\work\vs_workspace\jditk\hezon_itk\epm_handler_common.h : warning C4819: 该文件包含不能在当前代码页(936)中表示的字符。请将该文件保存为 Unicode 格式以防止数据丢失
E:\work\include12_2\pom/pom/pom.h(806): warning C4819: 该文件包含不能在当前代码页(936)中表示的字符。请将该文件保存为 Unicode 格式以防止数据丢失
E:\work\include12_2\pom/pom/pom.h(5417): warning C4819: 该文件包含不能在当前代码页(936)中表示的字符。请将该文件保存为 Unicode 格式以防止数据丢失
bs_bom_save_check.cpp(47): warning C4101: “num”: 未引用的局部变量
bs_bypass.cpp
E:\work\include12_2\pom/pom/pom.h(806): warning C4819: 该文件包含不能在当前代码页(936)中表示的字符。请将该文件保存为 Unicode 格式以防止数据丢失
E:\work\include12_2\pom/pom/pom.h(5417): warning C4819: 该文件包含不能在当前代码页(936)中表示的字符。请将该文件保存为 Unicode 格式以防止数据丢失
e:\work\vs_workspace\jditk\hezon_itk\epm_handler_common.h : warning C4819: 该文件包含不能在当前代码页(936)中表示的字符。请将该文件保存为 Unicode 格式以防止数据丢失
bs_file_transfer.cpp
e:\work\vs_workspace\jditk\hezon_itk\epm_handler_common.h : warning C4819: 该文件包含不能在当前代码页(936)中表示的字符。请将该文件保存为 Unicode 格式以防止数据丢失
E:\work\include12_2\pom/pom/pom.h(806): warning C4819: 该文件包含不能在当前代码页(936)中表示的字符。请将该文件保存为 Unicode 格式以防止数据丢失
E:\work\include12_2\pom/pom/pom.h(5417): warning C4819: 该文件包含不能在当前代码页(936)中表示的字符。请将该文件保存为 Unicode 格式以防止数据丢失
bs_sap.cpp
e:\work\vs_workspace\jditk\hezon_itk\epm_handler_common.h : warning C4819: 该文件包含不能在当前代码页(936)中表示的字符。请将该文件保存为 Unicode 格式以防止数据丢失
E:\work\include12_2\pom/pom/pom.h(806): warning C4819: 该文件包含不能在当前代码页(936)中表示的字符。请将该文件保存为 Unicode 格式以防止数据丢失
E:\work\include12_2\pom/pom/pom.h(5417): warning C4819: 该文件包含不能在当前代码页(936)中表示的字符。请将该文件保存为 Unicode 格式以防止数据丢失
bs_sap.cpp(8): warning C4101: “obj_type”: 未引用的局部变量
bs_sap.cpp(260): warning C4101: “obj_type”: 未引用的局部变量
bs_sap.cpp(292): warning C4101: “lines”: 未引用的局部变量
bs_sap.cpp(290): warning C4101: “line_cnt”: 未引用的局部变量
bs_signoff.cxx
e:\work\vs_workspace\jditk\hezon_itk\epm_handler_common.h : warning C4819: 该文件包含不能在当前代码页(936)中表示的字符。请将该文件保存为 Unicode 格式以防止数据丢失
E:\work\include12_2\pom/pom/pom.h(806): warning C4819: 该文件包含不能在当前代码页(936)中表示的字符。请将该文件保存为 Unicode 格式以防止数据丢失
E:\work\include12_2\pom/pom/pom.h(5417): warning C4819: 该文件包含不能在当前代码页(936)中表示的字符。请将该文件保存为 Unicode 格式以防止数据丢失
bs_signoff.cxx(63): warning C4996: 'localtime': This function or variable may be unsafe. Consider using localtime_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
C:\Program Files (x86)\Windows Kits\10\Include\10.0.10240.0\ucrt\time.h(505): note: 参见“localtime”的声明
bs_sign_cad.cpp
e:\work\vs_workspace\jditk\hezon_itk\epm_handler_common.h : warning C4819: 该文件包含不能在当前代码页(936)中表示的字符。请将该文件保存为 Unicode 格式以防止数据丢失
E:\work\include12_2\pom/pom/pom.h(806): warning C4819: 该文件包含不能在当前代码页(936)中表示的字符。请将该文件保存为 Unicode 格式以防止数据丢失
E:\work\include12_2\pom/pom/pom.h(5417): warning C4819: 该文件包含不能在当前代码页(936)中表示的字符。请将该文件保存为 Unicode 格式以防止数据丢失
bs_sign_cad.cpp(36): warning C4996: 'getenv': This function or variable may be unsafe. Consider using _dupenv_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
C:\Program Files (x86)\Windows Kits\10\Include\10.0.10240.0\ucrt\stdlib.h(1183): note: 参见“getenv”的声明
bs_test_release_check.cpp
e:\work\vs_workspace\jditk\hezon_itk\epm_handler_common.h : warning C4819: 该文件包含不能在当前代码页(936)中表示的字符。请将该文件保存为 Unicode 格式以防止数据丢失
E:\work\include12_2\pom/pom/pom.h(806): warning C4819: 该文件包含不能在当前代码页(936)中表示的字符。请将该文件保存为 Unicode 格式以防止数据丢失
E:\work\include12_2\pom/pom/pom.h(5417): warning C4819: 该文件包含不能在当前代码页(936)中表示的字符。请将该文件保存为 Unicode 格式以防止数据丢失
bs_test_release_check.cpp(44): warning C4101: “rels”: 未引用的局部变量
bs_test_release_check.cpp(45): warning C4101: “val”: 未引用的局部变量
bs_test_release_check.cpp(44): warning C4101: “win”: 未引用的局部变量
bs_test_release_check.cpp(44): warning C4101: “top”: 未引用的局部变量
bs_test_release_check.cpp(44): warning C4101: “tags”: 未引用的局部变量
bs_test_release_check.cpp(44): warning C4101: “tag”: 未引用的局部变量
bs_test_release_check.cpp(43): warning C4101: “tag_cnt”: 未引用的局部变量
bs_test_release_check.cpp(43): warning C4101: “rel_cnt”: 未引用的局部变量
bs_wl_check.cpp
e:\work\vs_workspace\jditk\hezon_itk\epm_handler_common.h : warning C4819: 该文件包含不能在当前代码页(936)中表示的字符。请将该文件保存为 Unicode 格式以防止数据丢失
E:\work\include12_2\pom/pom/pom.h(806): warning C4819: 该文件包含不能在当前代码页(936)中表示的字符。请将该文件保存为 Unicode 格式以防止数据丢失
E:\work\include12_2\pom/pom/pom.h(5417): warning C4819: 该文件包含不能在当前代码页(936)中表示的字符。请将该文件保存为 Unicode 格式以防止数据丢失
epm_register_handler.cxx
epm_register_handler.cxx(50): warning C4101: “now”: 未引用的局部变量
epm_register_handler.cxx(49): warning C4101: “expire_date”: 未引用的局部变量
epm_register_handler.cxx(49): warning C4101: “date_buf”: 未引用的局部变量
epm_register_handler.cxx(51): warning C4101: “p”: 未引用的局部变量
bs_custom_main.cxx
jd_add_attachments.cpp
e:\work\vs_workspace\jditk\hezon_itk\epm_handler_common.h : warning C4819: 该文件包含不能在当前代码页(936)中表示的字符。请将该文件保存为 Unicode 格式以防止数据丢失
E:\work\include12_2\pom/pom/pom.h(806): warning C4819: 该文件包含不能在当前代码页(936)中表示的字符。请将该文件保存为 Unicode 格式以防止数据丢失
E:\work\include12_2\pom/pom/pom.h(5417): warning C4819: 该文件包含不能在当前代码页(936)中表示的字符。请将该文件保存为 Unicode 格式以防止数据丢失
jd_add_attachments.cpp(114): warning C4267: “参数”: 从“size_t”转换到“int”可能丢失数据
jd_batch_process.cpp
e:\work\vs_workspace\jditk\hezon_itk\HTTPRequest.hpp(193): warning C4267: “参数”: 从“size_t”转换到“int”可能丢失数据
e:\work\vs_workspace\jditk\hezon_itk\HTTPRequest.hpp(199): warning C4267: “参数”: 从“size_t”转换到“int”可能丢失数据
e:\work\vs_workspace\jditk\hezon_itk\epm_handler_common.h : warning C4819: 该文件包含不能在当前代码页(936)中表示的字符。请将该文件保存为 Unicode 格式以防止数据丢失
E:\work\include12_2\pom/pom/pom.h(806): warning C4819: 该文件包含不能在当前代码页(936)中表示的字符。请将该文件保存为 Unicode 格式以防止数据丢失
E:\work\include12_2\pom/pom/pom.h(5417): warning C4819: 该文件包含不能在当前代码页(936)中表示的字符。请将该文件保存为 Unicode 格式以防止数据丢失
jd_batch_process.cpp(155): warning C4267: “参数”: 从“size_t”转换到“int”可能丢失数据
jd_batch_process.cpp(85): warning C4101: “rels”: 未引用的局部变量
jd_batch_process.cpp(85): warning C4101: “new_process”: 未引用的局部变量
jd_batch_process.cpp(86): warning C4101: “val”: 未引用的局部变量
jd_batch_process.cpp(85): warning C4101: “win”: 未引用的局部变量
jd_batch_process.cpp(85): warning C4101: “top”: 未引用的局部变量
jd_batch_process.cpp(85): warning C4101: “tags”: 未引用的局部变量
jd_batch_process.cpp(85): warning C4101: “tag”: 未引用的局部变量
jd_batch_process.cpp(84): warning C4101: “tag_cnt”: 未引用的局部变量
jd_batch_process.cpp(84): warning C4101: “rel_cnt”: 未引用的局部变量
jd_clear_field.cpp
E:\work\include12_2\pom/pom/pom.h(806): warning C4819: 该文件包含不能在当前代码页(936)中表示的字符。请将该文件保存为 Unicode 格式以防止数据丢失
E:\work\include12_2\pom/pom/pom.h(5417): warning C4819: 该文件包含不能在当前代码页(936)中表示的字符。请将该文件保存为 Unicode 格式以防止数据丢失
jd_clear_field.cpp(119): warning C4267: “初始化”: 从“size_t”转换到“uint32_t”可能丢失数据
jd_clear_field.cpp(181): warning C4190: “GBKToUTF8”有指定的 C 链接,但返回了与 C 不兼容的 UDT“std::basic_string<char,std::char_traits<char>,std::allocator<char>>”
C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\include\xstring(2633): note: 参见“std::basic_string<char,std::char_traits<char>,std::allocator<char>>”的声明
jd_clear_field.cpp(255): warning C4996: 'getenv': This function or variable may be unsafe. Consider using _dupenv_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
C:\Program Files (x86)\Windows Kits\10\Include\10.0.10240.0\ucrt\stdlib.h(1183): note: 参见“getenv”的声明
jd_clear_field.cpp(275): warning C4996: '_snprintf': This function or variable may be unsafe. Consider using _snprintf_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
C:\Program Files (x86)\Windows Kits\10\Include\10.0.10240.0\ucrt\stdio.h(1952): note: 参见“_snprintf”的声明
jd_clear_field.cpp(287): warning C4996: 'getenv': This function or variable may be unsafe. Consider using _dupenv_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
C:\Program Files (x86)\Windows Kits\10\Include\10.0.10240.0\ucrt\stdlib.h(1183): note: 参见“getenv”的声明
jd_clear_field.cpp(289): warning C4477: “printf”: 格式字符串“%s”需要类型“char *”的参数,但可变参数 1 拥有了类型“const wchar_t *”
jd_clear_field.cpp(289): note: 请考虑在格式字符串中使用“%ls”
jd_clear_field.cpp(289): note: 请考虑在格式字符串中使用“%lls”
jd_clear_field.cpp(289): note: 请考虑在格式字符串中使用“%Ls”
jd_clear_field.cpp(289): note: 请考虑在格式字符串中使用“%ws”
jd_clear_field.cpp(244): warning C4101: “sign_location1”: 未引用的局部变量
jd_clear_field.cpp(249): warning C4101: “rev_attachments”: 未引用的局部变量
jd_clear_field.cpp(247): warning C4101: “ref_obj”: 未引用的局部变量
jd_clear_field.cpp(245): warning C4101: “attach_type”: 未引用的局部变量
jd_clear_field.cpp(244): warning C4101: “sign_str”: 未引用的局部变量
jd_clear_field.cpp(504): warning C4101: “err_function”: 未引用的局部变量
jd_clear_field.cpp(504): warning C4101: “err_string”: 未引用的局部变量
jd_schedule_joint.cpp
e:\work\vs_workspace\jditk\hezon_itk\epm_handler_common.h : warning C4819: 该文件包含不能在当前代码页(936)中表示的字符。请将该文件保存为 Unicode 格式以防止数据丢失
E:\work\include12_2\pom/pom/pom.h(806): warning C4819: 该文件包含不能在当前代码页(936)中表示的字符。请将该文件保存为 Unicode 格式以防止数据丢失
E:\work\include12_2\pom/pom/pom.h(5417): warning C4819: 该文件包含不能在当前代码页(936)中表示的字符。请将该文件保存为 Unicode 格式以防止数据丢失
jd_signoff.cpp
e:\work\vs_workspace\jditk\hezon_itk\epm_handler_common.h : warning C4819: 该文件包含不能在当前代码页(936)中表示的字符。请将该文件保存为 Unicode 格式以防止数据丢失
E:\work\include12_2\pom/pom/pom.h(806): warning C4819: 该文件包含不能在当前代码页(936)中表示的字符。请将该文件保存为 Unicode 格式以防止数据丢失
E:\work\include12_2\pom/pom/pom.h(5417): warning C4819: 该文件包含不能在当前代码页(936)中表示的字符。请将该文件保存为 Unicode 格式以防止数据丢失
jd_signoff.cpp(82): warning C4267: “初始化”: 从“size_t”转换到“uint32_t”可能丢失数据
jd_signoff.cpp(232): warning C4996: 'localtime': This function or variable may be unsafe. Consider using localtime_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
C:\Program Files (x86)\Windows Kits\10\Include\10.0.10240.0\ucrt\time.h(505): note: 参见“localtime”的声明
jd_signoff.cpp(247): warning C4996: '_snprintf': This function or variable may be unsafe. Consider using _snprintf_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
C:\Program Files (x86)\Windows Kits\10\Include\10.0.10240.0\ucrt\stdio.h(1952): note: 参见“_snprintf”的声明
jd_signoff.cpp(266): warning C4996: 'getenv': This function or variable may be unsafe. Consider using _dupenv_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
C:\Program Files (x86)\Windows Kits\10\Include\10.0.10240.0\ucrt\stdlib.h(1183): note: 参见“getenv”的声明
jd_signoff.cpp(369): warning C4996: 'getenv': This function or variable may be unsafe. Consider using _dupenv_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
C:\Program Files (x86)\Windows Kits\10\Include\10.0.10240.0\ucrt\stdlib.h(1183): note: 参见“getenv”的声明
jd_signoff.cpp(226): warning C4101: “verdict”: 未引用的局部变量
jd_signoff.cpp(260): warning C4101: “rev_attachments”: 未引用的局部变量
jd_signoff.cpp(259): warning C4101: “ref_obj”: 未引用的局部变量
jd_signoff.cpp(257): warning C4101: “attach_type”: 未引用的局部变量
jd_signoff.cpp(221): warning C4101: “sign_str”: 未引用的局部变量
util.cpp
e:\work\vs_workspace\jditk\hezon_itk\epm_handler_common.h : warning C4819: 该文件包含不能在当前代码页(936)中表示的字符。请将该文件保存为 Unicode 格式以防止数据丢失
E:\work\include12_2\pom/pom/pom.h(806): warning C4819: 该文件包含不能在当前代码页(936)中表示的字符。请将该文件保存为 Unicode 格式以防止数据丢失
E:\work\include12_2\pom/pom/pom.h(5417): warning C4819: 该文件包含不能在当前代码页(936)中表示的字符。请将该文件保存为 Unicode 格式以防止数据丢失
util.cpp(32): warning C4267: “初始化”: 从“size_t”转换到“int”可能丢失数据
util.cpp(49): warning C4996: '_snprintf': This function or variable may be unsafe. Consider using _snprintf_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
C:\Program Files (x86)\Windows Kits\10\Include\10.0.10240.0\ucrt\stdio.h(1952): note: 参见“_snprintf”的声明
正在生成代码...
c:\java\jdk1.8.0_231\include\jni.h(1442): warning C4793: “JNIEnv_::CallStaticIntMethod”: 编译为本机的函数:
/clr 下不支持 varargs
c:\java\jdk1.8.0_231\include\jni.h(1445): warning C4793: “JNIEnv_::CallStaticIntMethod”: 编译为本机的函数:
托管代码中发现一个不受支持的内部函数
c:\java\jdk1.8.0_231\include\jni.h(1447): warning C4793: “JNIEnv_::CallStaticIntMethod”: 编译为本机的函数:
托管代码中发现一个不受支持的内部函数
c:\java\jdk1.8.0_231\include\jni.h(1352): warning C4793: “JNIEnv_::CallStaticObjectMethod”: 编译为本机的函数:
/clr 下不支持 varargs
c:\java\jdk1.8.0_231\include\jni.h(1355): warning C4793: “JNIEnv_::CallStaticObjectMethod”: 编译为本机的函数:
托管代码中发现一个不受支持的内部函数
c:\java\jdk1.8.0_231\include\jni.h(1357): warning C4793: “JNIEnv_::CallStaticObjectMethod”: 编译为本机的函数:
托管代码中发现一个不受支持的内部函数
c:\java\jdk1.8.0_231\include\jni.h(868): warning C4793: “JNIEnv_::NewObject”: 编译为本机的函数:
/clr 下不支持 varargs
c:\java\jdk1.8.0_231\include\jni.h(871): warning C4793: “JNIEnv_::NewObject”: 编译为本机的函数:
托管代码中发现一个不受支持的内部函数
c:\java\jdk1.8.0_231\include\jni.h(873): warning C4793: “JNIEnv_::NewObject”: 编译为本机的函数:
托管代码中发现一个不受支持的内部函数
c:\java\jdk1.8.0_231\include\jni.h(1051): warning C4793: “JNIEnv_::CallVoidMethod”: 编译为本机的函数:
/clr 下不支持 varargs
c:\java\jdk1.8.0_231\include\jni.h(1053): warning C4793: “JNIEnv_::CallVoidMethod”: 编译为本机的函数:
托管代码中发现一个不受支持的内部函数
c:\java\jdk1.8.0_231\include\jni.h(1055): warning C4793: “JNIEnv_::CallVoidMethod”: 编译为本机的函数:
托管代码中发现一个不受支持的内部函数
e:\work\vs_workspace\jditk\hezon_itk\jd_clear_field.cpp(480): warning C4793: “JD_Revise_clear”: 编译为本机的函数:
托管代码中发现一个不受支持的内部函数
e:\work\vs_workspace\jditk\hezon_itk\jd_clear_field.cpp(481): warning C4793: “JD_Revise_clear”: 编译为本机的函数:
托管代码中发现一个不受支持的内部函数
c:\java\jdk1.8.0_231\include\jni.h(1442): warning C4793: “JNIEnv_::CallStaticIntMethod”: 编译为本机的函数:
/clr 下不支持 varargs
c:\java\jdk1.8.0_231\include\jni.h(1445): warning C4793: “JNIEnv_::CallStaticIntMethod”: 编译为本机的函数:
托管代码中发现一个不受支持的内部函数
c:\java\jdk1.8.0_231\include\jni.h(1447): warning C4793: “JNIEnv_::CallStaticIntMethod”: 编译为本机的函数:
托管代码中发现一个不受支持的内部函数
c:\java\jdk1.8.0_231\include\jni.h(1352): warning C4793: “JNIEnv_::CallStaticObjectMethod”: 编译为本机的函数:
/clr 下不支持 varargs
c:\java\jdk1.8.0_231\include\jni.h(1355): warning C4793: “JNIEnv_::CallStaticObjectMethod”: 编译为本机的函数:
托管代码中发现一个不受支持的内部函数
c:\java\jdk1.8.0_231\include\jni.h(1357): warning C4793: “JNIEnv_::CallStaticObjectMethod”: 编译为本机的函数:
托管代码中发现一个不受支持的内部函数
c:\java\jdk1.8.0_231\include\jni.h(868): warning C4793: “JNIEnv_::NewObject”: 编译为本机的函数:
/clr 下不支持 varargs
c:\java\jdk1.8.0_231\include\jni.h(871): warning C4793: “JNIEnv_::NewObject”: 编译为本机的函数:
托管代码中发现一个不受支持的内部函数
c:\java\jdk1.8.0_231\include\jni.h(873): warning C4793: “JNIEnv_::NewObject”: 编译为本机的函数:
托管代码中发现一个不受支持的内部函数
c:\java\jdk1.8.0_231\include\jni.h(1051): warning C4793: “JNIEnv_::CallVoidMethod”: 编译为本机的函数:
/clr 下不支持 varargs
c:\java\jdk1.8.0_231\include\jni.h(1053): warning C4793: “JNIEnv_::CallVoidMethod”: 编译为本机的函数:
托管代码中发现一个不受支持的内部函数
c:\java\jdk1.8.0_231\include\jni.h(1055): warning C4793: “JNIEnv_::CallVoidMethod”: 编译为本机的函数:
托管代码中发现一个不受支持的内部函数
e:\work\vs_workspace\jditk\hezon_itk\bs_bom_save_check.cpp(50): warning C4793: “bs_bom_save_check”: 编译为本机的函数:
托管代码中发现一个不受支持的内部函数
.NETFramework,Version=v4.0.AssemblyAttributes.cpp
C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V140\Microsoft.CppBuild.targets(1189,5): warning MSB8012: TargetPath(E:\work\vs_workspace\jditk\x64\Release\HEZON_ITK.dll) does not match the Linker's OutputFile property value (E:\work\vs_workspace\jditk\x64\Release\bs.dll). This may cause your project to build incorrectly. To correct this, please make sure that $(OutDir), $(TargetName) and $(TargetExt) property values match the value specified in %(Link.OutputFile).
C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V140\Microsoft.CppBuild.targets(1191,5): warning MSB8012: TargetName(HEZON_ITK) does not match the Linker's OutputFile property value (bs). This may cause your project to build incorrectly. To correct this, please make sure that $(OutDir), $(TargetName) and $(TargetExt) property values match the value specified in %(Link.OutputFile).
util.obj : warning LNK4006: "bool __cdecl isTypeOf(unsigned int,char const *)" (?isTypeOf@@$$FYA_NIPEBD@Z) 已在 jd_signoff.obj 中定义;已忽略第二个定义
util.obj : warning LNK4006: "bool __cdecl isTypeOf(unsigned int,char const *)" (?isTypeOf@@YA_NIPEBD@Z) 已在 jd_signoff.obj 中定义;已忽略第二个定义
MSVCRT.lib(default_local_stdio_options.obj) : warning LNK4006: __local_stdio_printf_options 已在 libassy_jt.lib(libassy_jt.dll) 中定义;已忽略第二个定义
正在创建库 E:\work\vs_workspace\jditk\x64\Release\\bs.lib 和对象 E:\work\vs_workspace\jditk\x64\Release\\bs.exp
jd_signoff.obj : warning LNK4248: 无法解析 typeref 标记(01000016)(为“_jmethodID”);映像可能无法运行
jd_clear_field.obj : warning LNK4248: 无法解析 typeref 标记(01000017)(为“_jmethodID”);映像可能无法运行
E:\work\vs_workspace\jditk\x64\Release\\bs.dll : warning LNK4088: 因 /FORCE 选项生成了映像;映像可能不能运行
HEZON_ITK.vcxproj -> E:\work\vs_workspace\jditk\x64\Release\HEZON_ITK.dll
HEZON_ITK.vcxproj -> E:\work\vs_workspace\jditk\x64\Release\HEZON_ITK.pdb (Full PDB)

@ -0,0 +1,583 @@
ImageRuntimeVersion: v4.0.30319
Assembly declib, Version=1.0.*, Culture=固定语言(固定国家/地区):
hash=SHA1, flags=PublicKey
Assembly mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089:
hash=None, flags=None
Assembly System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089:
hash=None, flags=None
Assembly System.Web.Services, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a:
hash=None, flags=None
Assembly System.Xml, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089:
hash=None, flags=None
Assembly System.Core, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089:
hash=None, flags=None
Assembly Microsoft.CSharp, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a:
hash=None, flags=None
Class SI_PLM001_PLM2ERP_SOAP2Proxy_Syn_ReqService: AutoLayout, AnsiClass, Class, Public, BeforeFieldInit
:System.Web.Services.Protocols.SoapHttpClientProtocol
Void .ctor(): PrivateScope, Public, HideBySig, SpecialName, RTSpecialName
Void .ctor(System.String): PrivateScope, Public, HideBySig, SpecialName, RTSpecialName
Events:
SI_PLM001_PLM2ERP_SOAP2Proxy_Syn_ReqCompletedEventHandler SI_PLM001_PLM2ERP_SOAP2Proxy_Syn_ReqCompleted:
Methods:
add_SI_PLM001_PLM2ERP_SOAP2Proxy_Syn_ReqCompleted(SI_PLM001_PLM2ERP_SOAP2Proxy_Syn_ReqCompletedEventHandler): PrivateScope, Public, HideBySig, SpecialName
remove_SI_PLM001_PLM2ERP_SOAP2Proxy_Syn_ReqCompleted(SI_PLM001_PLM2ERP_SOAP2Proxy_Syn_ReqCompletedEventHandler): PrivateScope, Public, HideBySig, SpecialName
SI_PLM001_PLM2ERP_SOAP2Proxy_Syn_Req(ZMMS003[]&, ZMMT004[]&): PrivateScope, Public, HideBySig
BeginSI_PLM001_PLM2ERP_SOAP2Proxy_Syn_Req(ZMMS003[], ZMMT004[], AsyncCallback, Object): PrivateScope, Public, HideBySig
EndSI_PLM001_PLM2ERP_SOAP2Proxy_Syn_Req(IAsyncResult, ZMMS003[]&(Out), ZMMT004[]&(Out)): PrivateScope, Public, HideBySig
SI_PLM001_PLM2ERP_SOAP2Proxy_Syn_ReqAsync(ZMMS003[], ZMMT004[]): PrivateScope, Public, HideBySig
SI_PLM001_PLM2ERP_SOAP2Proxy_Syn_ReqAsync(ZMMS003[], ZMMT004[], Object): PrivateScope, Public, HideBySig
CancelAsync(Object): PrivateScope, Public, HideBySig
Class ZMMS003: AutoLayout, AnsiClass, Class, Public, Serializable, BeforeFieldInit
Void .ctor(): PrivateScope, Public, HideBySig, SpecialName, RTSpecialName
Void .ctor(System.Collections.Generic.Dictionary`2[System.String,System.String]): PrivateScope, Public, HideBySig, SpecialName, RTSpecialName
Properties:
System.String MBRSH 'get set' :
System.String MTART 'get set' :
System.String MATNR 'get set' :
System.String MAKTX 'get set' :
System.String MEINS 'get set' :
System.String MATKL 'get set' :
System.String SPART 'get set' :
System.String PRDHA 'get set' :
System.String EXTWG 'get set' :
System.String MSTAE 'get set' :
System.Decimal VOLUM 'get set' :
Boolean VOLUMSpecified 'get set' :
System.String VOLEH 'get set' :
System.String BISMT 'get set' :
System.String FERTH 'get set' :
System.String WRKST 'get set' :
System.String GROES 'get set' :
System.String ZEINR 'get set' :
System.Decimal BRGEW 'get set' :
Boolean BRGEWSpecified 'get set' :
System.Decimal NTGEW 'get set' :
Boolean NTGEWSpecified 'get set' :
System.String GEWEI 'get set' :
System.String KLART 'get set' :
System.String CLASS 'get set' :
System.String D001 'get set' :
System.String D002 'get set' :
System.String D003 'get set' :
System.String D004 'get set' :
System.String D005 'get set' :
System.String D006 'get set' :
System.String D007 'get set' :
System.String D008 'get set' :
System.String D009 'get set' :
System.String D010 'get set' :
System.String D011 'get set' :
System.String D012 'get set' :
System.String D013 'get set' :
System.String D014 'get set' :
System.String D015 'get set' :
System.String D016 'get set' :
System.String D017 'get set' :
System.String D018 'get set' :
System.String D019 'get set' :
System.String D020 'get set' :
System.String D021 'get set' :
System.String D022 'get set' :
System.String D023 'get set' :
System.String D024 'get set' :
System.String D025 'get set' :
System.String D026 'get set' :
System.String D027 'get set' :
System.String D028 'get set' :
System.String D029 'get set' :
System.String D030 'get set' :
System.String D031 'get set' :
System.String D032 'get set' :
System.String D033 'get set' :
System.String D034 'get set' :
System.String D035 'get set' :
System.String D036 'get set' :
System.String D037 'get set' :
System.String D038 'get set' :
System.String D039 'get set' :
System.String D040 'get set' :
System.String D041 'get set' :
System.String D042 'get set' :
System.String D043 'get set' :
System.String D044 'get set' :
System.String D045 'get set' :
System.String D046 'get set' :
System.String D047 'get set' :
System.String D048 'get set' :
System.String D049 'get set' :
System.String D050 'get set' :
System.String D051 'get set' :
System.String D052 'get set' :
System.String D053 'get set' :
System.String D054 'get set' :
System.String D055 'get set' :
System.String D056 'get set' :
System.String D057 'get set' :
System.String D058 'get set' :
System.String D059 'get set' :
System.String D060 'get set' :
System.String D061 'get set' :
System.String D062 'get set' :
System.String D063 'get set' :
System.String D064 'get set' :
System.String D065 'get set' :
System.String D066 'get set' :
System.String D067 'get set' :
System.String D068 'get set' :
System.String D069 'get set' :
System.String D070 'get set' :
System.String D071 'get set' :
System.String D072 'get set' :
System.String STATUS 'get set' :
Methods:
get_D060(): PrivateScope, Public, HideBySig, SpecialName
set_D060(String): PrivateScope, Public, HideBySig, SpecialName
get_D061(): PrivateScope, Public, HideBySig, SpecialName
set_D061(String): PrivateScope, Public, HideBySig, SpecialName
get_D062(): PrivateScope, Public, HideBySig, SpecialName
set_D062(String): PrivateScope, Public, HideBySig, SpecialName
get_D063(): PrivateScope, Public, HideBySig, SpecialName
set_D063(String): PrivateScope, Public, HideBySig, SpecialName
get_D064(): PrivateScope, Public, HideBySig, SpecialName
set_D064(String): PrivateScope, Public, HideBySig, SpecialName
get_D065(): PrivateScope, Public, HideBySig, SpecialName
set_D065(String): PrivateScope, Public, HideBySig, SpecialName
get_D066(): PrivateScope, Public, HideBySig, SpecialName
set_D066(String): PrivateScope, Public, HideBySig, SpecialName
get_D067(): PrivateScope, Public, HideBySig, SpecialName
set_D067(String): PrivateScope, Public, HideBySig, SpecialName
get_D068(): PrivateScope, Public, HideBySig, SpecialName
set_D068(String): PrivateScope, Public, HideBySig, SpecialName
get_D069(): PrivateScope, Public, HideBySig, SpecialName
set_D069(String): PrivateScope, Public, HideBySig, SpecialName
get_D070(): PrivateScope, Public, HideBySig, SpecialName
set_D070(String): PrivateScope, Public, HideBySig, SpecialName
get_D071(): PrivateScope, Public, HideBySig, SpecialName
set_D071(String): PrivateScope, Public, HideBySig, SpecialName
get_D072(): PrivateScope, Public, HideBySig, SpecialName
set_D072(String): PrivateScope, Public, HideBySig, SpecialName
get_STATUS(): PrivateScope, Public, HideBySig, SpecialName
set_STATUS(String): PrivateScope, Public, HideBySig, SpecialName
set_D017(String): PrivateScope, Public, HideBySig, SpecialName
get_D018(): PrivateScope, Public, HideBySig, SpecialName
set_D018(String): PrivateScope, Public, HideBySig, SpecialName
get_D019(): PrivateScope, Public, HideBySig, SpecialName
set_D019(String): PrivateScope, Public, HideBySig, SpecialName
get_D020(): PrivateScope, Public, HideBySig, SpecialName
set_D020(String): PrivateScope, Public, HideBySig, SpecialName
get_D021(): PrivateScope, Public, HideBySig, SpecialName
set_D021(String): PrivateScope, Public, HideBySig, SpecialName
get_D022(): PrivateScope, Public, HideBySig, SpecialName
set_D022(String): PrivateScope, Public, HideBySig, SpecialName
get_D023(): PrivateScope, Public, HideBySig, SpecialName
set_D023(String): PrivateScope, Public, HideBySig, SpecialName
get_D024(): PrivateScope, Public, HideBySig, SpecialName
set_D024(String): PrivateScope, Public, HideBySig, SpecialName
get_D025(): PrivateScope, Public, HideBySig, SpecialName
set_D025(String): PrivateScope, Public, HideBySig, SpecialName
get_D026(): PrivateScope, Public, HideBySig, SpecialName
set_D026(String): PrivateScope, Public, HideBySig, SpecialName
get_D027(): PrivateScope, Public, HideBySig, SpecialName
set_D027(String): PrivateScope, Public, HideBySig, SpecialName
get_D028(): PrivateScope, Public, HideBySig, SpecialName
set_D028(String): PrivateScope, Public, HideBySig, SpecialName
get_D029(): PrivateScope, Public, HideBySig, SpecialName
set_D029(String): PrivateScope, Public, HideBySig, SpecialName
get_D030(): PrivateScope, Public, HideBySig, SpecialName
set_D030(String): PrivateScope, Public, HideBySig, SpecialName
get_D031(): PrivateScope, Public, HideBySig, SpecialName
set_D031(String): PrivateScope, Public, HideBySig, SpecialName
get_D032(): PrivateScope, Public, HideBySig, SpecialName
set_D032(String): PrivateScope, Public, HideBySig, SpecialName
get_D033(): PrivateScope, Public, HideBySig, SpecialName
set_D033(String): PrivateScope, Public, HideBySig, SpecialName
get_D034(): PrivateScope, Public, HideBySig, SpecialName
set_D034(String): PrivateScope, Public, HideBySig, SpecialName
get_D035(): PrivateScope, Public, HideBySig, SpecialName
set_D035(String): PrivateScope, Public, HideBySig, SpecialName
get_D036(): PrivateScope, Public, HideBySig, SpecialName
set_D036(String): PrivateScope, Public, HideBySig, SpecialName
get_D037(): PrivateScope, Public, HideBySig, SpecialName
set_D037(String): PrivateScope, Public, HideBySig, SpecialName
get_D038(): PrivateScope, Public, HideBySig, SpecialName
set_D038(String): PrivateScope, Public, HideBySig, SpecialName
get_D039(): PrivateScope, Public, HideBySig, SpecialName
set_D039(String): PrivateScope, Public, HideBySig, SpecialName
get_D040(): PrivateScope, Public, HideBySig, SpecialName
set_D040(String): PrivateScope, Public, HideBySig, SpecialName
get_D041(): PrivateScope, Public, HideBySig, SpecialName
set_D041(String): PrivateScope, Public, HideBySig, SpecialName
get_D042(): PrivateScope, Public, HideBySig, SpecialName
set_D042(String): PrivateScope, Public, HideBySig, SpecialName
get_D043(): PrivateScope, Public, HideBySig, SpecialName
set_D043(String): PrivateScope, Public, HideBySig, SpecialName
get_D044(): PrivateScope, Public, HideBySig, SpecialName
set_D044(String): PrivateScope, Public, HideBySig, SpecialName
get_D045(): PrivateScope, Public, HideBySig, SpecialName
set_D045(String): PrivateScope, Public, HideBySig, SpecialName
get_D046(): PrivateScope, Public, HideBySig, SpecialName
set_D046(String): PrivateScope, Public, HideBySig, SpecialName
get_D047(): PrivateScope, Public, HideBySig, SpecialName
set_D047(String): PrivateScope, Public, HideBySig, SpecialName
get_D048(): PrivateScope, Public, HideBySig, SpecialName
set_D048(String): PrivateScope, Public, HideBySig, SpecialName
get_D049(): PrivateScope, Public, HideBySig, SpecialName
set_D049(String): PrivateScope, Public, HideBySig, SpecialName
get_D050(): PrivateScope, Public, HideBySig, SpecialName
set_D050(String): PrivateScope, Public, HideBySig, SpecialName
get_D051(): PrivateScope, Public, HideBySig, SpecialName
set_D051(String): PrivateScope, Public, HideBySig, SpecialName
get_D052(): PrivateScope, Public, HideBySig, SpecialName
set_D052(String): PrivateScope, Public, HideBySig, SpecialName
get_D053(): PrivateScope, Public, HideBySig, SpecialName
set_D053(String): PrivateScope, Public, HideBySig, SpecialName
get_D054(): PrivateScope, Public, HideBySig, SpecialName
set_D054(String): PrivateScope, Public, HideBySig, SpecialName
get_D055(): PrivateScope, Public, HideBySig, SpecialName
set_D055(String): PrivateScope, Public, HideBySig, SpecialName
get_D056(): PrivateScope, Public, HideBySig, SpecialName
set_D056(String): PrivateScope, Public, HideBySig, SpecialName
get_D057(): PrivateScope, Public, HideBySig, SpecialName
set_D057(String): PrivateScope, Public, HideBySig, SpecialName
get_D058(): PrivateScope, Public, HideBySig, SpecialName
set_D058(String): PrivateScope, Public, HideBySig, SpecialName
get_D059(): PrivateScope, Public, HideBySig, SpecialName
set_D059(String): PrivateScope, Public, HideBySig, SpecialName
get_MBRSH(): PrivateScope, Public, HideBySig, SpecialName
set_MBRSH(String): PrivateScope, Public, HideBySig, SpecialName
get_MTART(): PrivateScope, Public, HideBySig, SpecialName
set_MTART(String): PrivateScope, Public, HideBySig, SpecialName
get_MATNR(): PrivateScope, Public, HideBySig, SpecialName
set_MATNR(String): PrivateScope, Public, HideBySig, SpecialName
get_MAKTX(): PrivateScope, Public, HideBySig, SpecialName
set_MAKTX(String): PrivateScope, Public, HideBySig, SpecialName
get_MEINS(): PrivateScope, Public, HideBySig, SpecialName
set_MEINS(String): PrivateScope, Public, HideBySig, SpecialName
get_MATKL(): PrivateScope, Public, HideBySig, SpecialName
set_MATKL(String): PrivateScope, Public, HideBySig, SpecialName
get_SPART(): PrivateScope, Public, HideBySig, SpecialName
set_SPART(String): PrivateScope, Public, HideBySig, SpecialName
get_PRDHA(): PrivateScope, Public, HideBySig, SpecialName
set_PRDHA(String): PrivateScope, Public, HideBySig, SpecialName
get_EXTWG(): PrivateScope, Public, HideBySig, SpecialName
set_EXTWG(String): PrivateScope, Public, HideBySig, SpecialName
get_MSTAE(): PrivateScope, Public, HideBySig, SpecialName
set_MSTAE(String): PrivateScope, Public, HideBySig, SpecialName
get_VOLUM(): PrivateScope, Public, HideBySig, SpecialName
set_VOLUM(Decimal): PrivateScope, Public, HideBySig, SpecialName
get_VOLUMSpecified(): PrivateScope, Public, HideBySig, SpecialName
set_VOLUMSpecified(Boolean): PrivateScope, Public, HideBySig, SpecialName
get_VOLEH(): PrivateScope, Public, HideBySig, SpecialName
set_VOLEH(String): PrivateScope, Public, HideBySig, SpecialName
get_BISMT(): PrivateScope, Public, HideBySig, SpecialName
set_BISMT(String): PrivateScope, Public, HideBySig, SpecialName
get_FERTH(): PrivateScope, Public, HideBySig, SpecialName
set_FERTH(String): PrivateScope, Public, HideBySig, SpecialName
get_WRKST(): PrivateScope, Public, HideBySig, SpecialName
set_WRKST(String): PrivateScope, Public, HideBySig, SpecialName
get_GROES(): PrivateScope, Public, HideBySig, SpecialName
set_GROES(String): PrivateScope, Public, HideBySig, SpecialName
get_ZEINR(): PrivateScope, Public, HideBySig, SpecialName
set_ZEINR(String): PrivateScope, Public, HideBySig, SpecialName
get_BRGEW(): PrivateScope, Public, HideBySig, SpecialName
set_BRGEW(Decimal): PrivateScope, Public, HideBySig, SpecialName
get_BRGEWSpecified(): PrivateScope, Public, HideBySig, SpecialName
set_BRGEWSpecified(Boolean): PrivateScope, Public, HideBySig, SpecialName
get_NTGEW(): PrivateScope, Public, HideBySig, SpecialName
set_NTGEW(Decimal): PrivateScope, Public, HideBySig, SpecialName
get_NTGEWSpecified(): PrivateScope, Public, HideBySig, SpecialName
set_NTGEWSpecified(Boolean): PrivateScope, Public, HideBySig, SpecialName
get_GEWEI(): PrivateScope, Public, HideBySig, SpecialName
set_GEWEI(String): PrivateScope, Public, HideBySig, SpecialName
get_KLART(): PrivateScope, Public, HideBySig, SpecialName
set_KLART(String): PrivateScope, Public, HideBySig, SpecialName
get_CLASS(): PrivateScope, Public, HideBySig, SpecialName
set_CLASS(String): PrivateScope, Public, HideBySig, SpecialName
get_D001(): PrivateScope, Public, HideBySig, SpecialName
set_D001(String): PrivateScope, Public, HideBySig, SpecialName
get_D002(): PrivateScope, Public, HideBySig, SpecialName
set_D002(String): PrivateScope, Public, HideBySig, SpecialName
get_D003(): PrivateScope, Public, HideBySig, SpecialName
set_D003(String): PrivateScope, Public, HideBySig, SpecialName
get_D004(): PrivateScope, Public, HideBySig, SpecialName
set_D004(String): PrivateScope, Public, HideBySig, SpecialName
get_D005(): PrivateScope, Public, HideBySig, SpecialName
set_D005(String): PrivateScope, Public, HideBySig, SpecialName
get_D006(): PrivateScope, Public, HideBySig, SpecialName
set_D006(String): PrivateScope, Public, HideBySig, SpecialName
get_D007(): PrivateScope, Public, HideBySig, SpecialName
set_D007(String): PrivateScope, Public, HideBySig, SpecialName
get_D008(): PrivateScope, Public, HideBySig, SpecialName
set_D008(String): PrivateScope, Public, HideBySig, SpecialName
get_D009(): PrivateScope, Public, HideBySig, SpecialName
set_D009(String): PrivateScope, Public, HideBySig, SpecialName
get_D010(): PrivateScope, Public, HideBySig, SpecialName
set_D010(String): PrivateScope, Public, HideBySig, SpecialName
get_D011(): PrivateScope, Public, HideBySig, SpecialName
set_D011(String): PrivateScope, Public, HideBySig, SpecialName
get_D012(): PrivateScope, Public, HideBySig, SpecialName
set_D012(String): PrivateScope, Public, HideBySig, SpecialName
get_D013(): PrivateScope, Public, HideBySig, SpecialName
set_D013(String): PrivateScope, Public, HideBySig, SpecialName
get_D014(): PrivateScope, Public, HideBySig, SpecialName
set_D014(String): PrivateScope, Public, HideBySig, SpecialName
get_D015(): PrivateScope, Public, HideBySig, SpecialName
set_D015(String): PrivateScope, Public, HideBySig, SpecialName
get_D016(): PrivateScope, Public, HideBySig, SpecialName
set_D016(String): PrivateScope, Public, HideBySig, SpecialName
get_D017(): PrivateScope, Public, HideBySig, SpecialName
Class ZMMT004: AutoLayout, AnsiClass, Class, Public, Serializable, BeforeFieldInit
Void .ctor(): PrivateScope, Public, HideBySig, SpecialName, RTSpecialName
Properties:
System.String MANDT 'get set' :
System.String MATNR 'get set' :
System.String ZSTATUS 'get set' :
System.String MESSAGE 'get set' :
Methods:
get_MANDT(): PrivateScope, Public, HideBySig, SpecialName
set_MANDT(String): PrivateScope, Public, HideBySig, SpecialName
get_MATNR(): PrivateScope, Public, HideBySig, SpecialName
set_MATNR(String): PrivateScope, Public, HideBySig, SpecialName
get_ZSTATUS(): PrivateScope, Public, HideBySig, SpecialName
set_ZSTATUS(String): PrivateScope, Public, HideBySig, SpecialName
get_MESSAGE(): PrivateScope, Public, HideBySig, SpecialName
set_MESSAGE(String): PrivateScope, Public, HideBySig, SpecialName
Class SI_PLM001_PLM2ERP_SOAP2Proxy_Syn_ReqCompletedEventHandler: AutoLayout, AnsiClass, Class, Public, Sealed
:System.MulticastDelegate
Void .ctor(System.Object, IntPtr): PrivateScope, Public, HideBySig, SpecialName, RTSpecialName
Methods:
Invoke(Object, SI_PLM001_PLM2ERP_SOAP2Proxy_Syn_ReqCompletedEventArgs): PrivateScope, Public, Virtual, HideBySig, VtableLayoutMask
BeginInvoke(Object, SI_PLM001_PLM2ERP_SOAP2Proxy_Syn_ReqCompletedEventArgs, AsyncCallback, Object): PrivateScope, Public, Virtual, HideBySig, VtableLayoutMask
EndInvoke(IAsyncResult): PrivateScope, Public, Virtual, HideBySig, VtableLayoutMask
Class SI_PLM001_PLM2ERP_SOAP2Proxy_Syn_ReqCompletedEventArgs: AutoLayout, AnsiClass, Class, Public, BeforeFieldInit
:System.ComponentModel.AsyncCompletedEventArgs
Properties:
ZMMS003[] IT_DATA 'get ' :
ZMMT004[] IT_RETURN 'get ' :
Methods:
get_IT_DATA(): PrivateScope, Public, HideBySig, SpecialName
get_IT_RETURN(): PrivateScope, Public, HideBySig, SpecialName
Class SI_PLM002_PLM2ERP_SOAP2Proxy_Syn_ReqService: AutoLayout, AnsiClass, Class, Public, BeforeFieldInit
:System.Web.Services.Protocols.SoapHttpClientProtocol
Void .ctor(): PrivateScope, Public, HideBySig, SpecialName, RTSpecialName
Void .ctor(System.String): PrivateScope, Public, HideBySig, SpecialName, RTSpecialName
Events:
SI_PLM002_PLM2ERP_SOAP2Proxy_Syn_ReqCompletedEventHandler SI_PLM002_PLM2ERP_SOAP2Proxy_Syn_ReqCompleted:
Methods:
add_SI_PLM002_PLM2ERP_SOAP2Proxy_Syn_ReqCompleted(SI_PLM002_PLM2ERP_SOAP2Proxy_Syn_ReqCompletedEventHandler): PrivateScope, Public, HideBySig, SpecialName
remove_SI_PLM002_PLM2ERP_SOAP2Proxy_Syn_ReqCompleted(SI_PLM002_PLM2ERP_SOAP2Proxy_Syn_ReqCompletedEventHandler): PrivateScope, Public, HideBySig, SpecialName
SI_PLM002_PLM2ERP_SOAP2Proxy_Syn_Req(ZPPS001[]&, ZPPT001[]&): PrivateScope, Public, HideBySig
BeginSI_PLM002_PLM2ERP_SOAP2Proxy_Syn_Req(ZPPS001[], ZPPT001[], AsyncCallback, Object): PrivateScope, Public, HideBySig
EndSI_PLM002_PLM2ERP_SOAP2Proxy_Syn_Req(IAsyncResult, ZPPS001[]&(Out), ZPPT001[]&(Out)): PrivateScope, Public, HideBySig
SI_PLM002_PLM2ERP_SOAP2Proxy_Syn_ReqAsync(ZPPS001[], ZPPT001[]): PrivateScope, Public, HideBySig
SI_PLM002_PLM2ERP_SOAP2Proxy_Syn_ReqAsync(ZPPS001[], ZPPT001[], Object): PrivateScope, Public, HideBySig
CancelAsync(Object): PrivateScope, Public, HideBySig
Class ZPPS001: AutoLayout, AnsiClass, Class, Public, Serializable, BeforeFieldInit
Void .ctor(): PrivateScope, Public, HideBySig, SpecialName, RTSpecialName
Void .ctor(System.Collections.Generic.Dictionary`2[System.String,System.String]): PrivateScope, Public, HideBySig, SpecialName, RTSpecialName
Properties:
System.String MATNR 'get set' :
System.String WERKS 'get set' :
System.String STLAN 'get set' :
System.Decimal BMENG 'get set' :
Boolean BMENGSpecified 'get set' :
System.String STLST 'get set' :
System.String POSNR 'get set' :
System.String POSTP 'get set' :
System.String IDNRK 'get set' :
System.Decimal MENGE 'get set' :
Boolean MENGESpecified 'get set' :
System.String MEINS 'get set' :
System.Decimal AUSCH 'get set' :
Boolean AUSCHSpecified 'get set' :
Methods:
get_MATNR(): PrivateScope, Public, HideBySig, SpecialName
set_MATNR(String): PrivateScope, Public, HideBySig, SpecialName
get_WERKS(): PrivateScope, Public, HideBySig, SpecialName
set_WERKS(String): PrivateScope, Public, HideBySig, SpecialName
get_STLAN(): PrivateScope, Public, HideBySig, SpecialName
set_STLAN(String): PrivateScope, Public, HideBySig, SpecialName
get_BMENG(): PrivateScope, Public, HideBySig, SpecialName
set_BMENG(Decimal): PrivateScope, Public, HideBySig, SpecialName
get_BMENGSpecified(): PrivateScope, Public, HideBySig, SpecialName
set_BMENGSpecified(Boolean): PrivateScope, Public, HideBySig, SpecialName
get_STLST(): PrivateScope, Public, HideBySig, SpecialName
set_STLST(String): PrivateScope, Public, HideBySig, SpecialName
get_POSNR(): PrivateScope, Public, HideBySig, SpecialName
set_POSNR(String): PrivateScope, Public, HideBySig, SpecialName
get_POSTP(): PrivateScope, Public, HideBySig, SpecialName
set_POSTP(String): PrivateScope, Public, HideBySig, SpecialName
get_IDNRK(): PrivateScope, Public, HideBySig, SpecialName
set_IDNRK(String): PrivateScope, Public, HideBySig, SpecialName
get_MENGE(): PrivateScope, Public, HideBySig, SpecialName
set_MENGE(Decimal): PrivateScope, Public, HideBySig, SpecialName
get_MENGESpecified(): PrivateScope, Public, HideBySig, SpecialName
set_MENGESpecified(Boolean): PrivateScope, Public, HideBySig, SpecialName
get_MEINS(): PrivateScope, Public, HideBySig, SpecialName
set_MEINS(String): PrivateScope, Public, HideBySig, SpecialName
get_AUSCH(): PrivateScope, Public, HideBySig, SpecialName
set_AUSCH(Decimal): PrivateScope, Public, HideBySig, SpecialName
get_AUSCHSpecified(): PrivateScope, Public, HideBySig, SpecialName
set_AUSCHSpecified(Boolean): PrivateScope, Public, HideBySig, SpecialName
Class ZPPT001: AutoLayout, AnsiClass, Class, Public, Serializable, BeforeFieldInit
Void .ctor(): PrivateScope, Public, HideBySig, SpecialName, RTSpecialName
Properties:
System.String MANDT 'get set' :
System.String MATNR 'get set' :
System.String TYPE 'get set' :
System.String ID 'get set' :
System.String NUMBER1 'get set' :
System.String MESSAGE 'get set' :
Methods:
get_MANDT(): PrivateScope, Public, HideBySig, SpecialName
set_MANDT(String): PrivateScope, Public, HideBySig, SpecialName
get_MATNR(): PrivateScope, Public, HideBySig, SpecialName
set_MATNR(String): PrivateScope, Public, HideBySig, SpecialName
get_TYPE(): PrivateScope, Public, HideBySig, SpecialName
set_TYPE(String): PrivateScope, Public, HideBySig, SpecialName
get_ID(): PrivateScope, Public, HideBySig, SpecialName
set_ID(String): PrivateScope, Public, HideBySig, SpecialName
get_NUMBER1(): PrivateScope, Public, HideBySig, SpecialName
set_NUMBER1(String): PrivateScope, Public, HideBySig, SpecialName
get_MESSAGE(): PrivateScope, Public, HideBySig, SpecialName
set_MESSAGE(String): PrivateScope, Public, HideBySig, SpecialName
Class SI_PLM002_PLM2ERP_SOAP2Proxy_Syn_ReqCompletedEventHandler: AutoLayout, AnsiClass, Class, Public, Sealed
:System.MulticastDelegate
Void .ctor(System.Object, IntPtr): PrivateScope, Public, HideBySig, SpecialName, RTSpecialName
Methods:
Invoke(Object, SI_PLM002_PLM2ERP_SOAP2Proxy_Syn_ReqCompletedEventArgs): PrivateScope, Public, Virtual, HideBySig, VtableLayoutMask
BeginInvoke(Object, SI_PLM002_PLM2ERP_SOAP2Proxy_Syn_ReqCompletedEventArgs, AsyncCallback, Object): PrivateScope, Public, Virtual, HideBySig, VtableLayoutMask
EndInvoke(IAsyncResult): PrivateScope, Public, Virtual, HideBySig, VtableLayoutMask
Class SI_PLM002_PLM2ERP_SOAP2Proxy_Syn_ReqCompletedEventArgs: AutoLayout, AnsiClass, Class, Public, BeforeFieldInit
:System.ComponentModel.AsyncCompletedEventArgs
Properties:
ZPPS001[] IT_DATA 'get ' :
ZPPT001[] IT_RETURN 'get ' :
Methods:
get_IT_DATA(): PrivateScope, Public, HideBySig, SpecialName
get_IT_RETURN(): PrivateScope, Public, HideBySig, SpecialName
Class Testdll.Testclass: AutoLayout, AnsiClass, Class, Public, BeforeFieldInit
Void .ctor(): PrivateScope, Public, HideBySig, SpecialName, RTSpecialName
Methods:
test(): PrivateScope, Public, Static, HideBySig
GetToken(String, String): PrivateScope, Public, HideBySig
Send(String, String, String): PrivateScope, Public, HideBySig
send_material(String, String, String, Dictionary`2): PrivateScope, Public, HideBySig
send_bom(String, String, String, List`1): PrivateScope, Public, HideBySig
signCad(String, String, Dictionary`2, String&(Out)): PrivateScope, Public, Static, HideBySig
signCad(String, String, Dictionary`2): PrivateScope, Public, Static, HideBySig
Encrypt(String, String): PrivateScope, Public, HideBySig
Decrypt(String, String): PrivateScope, Public, HideBySig
Interface Autodesk.AutoCAD.Interop.AcadApplication: AutoLayout, AnsiClass, Class, Public, ClassSemanticsMask, Abstract, Import
Interfaces:
Autodesk.AutoCAD.Interop.IAcadApplication
Autodesk.AutoCAD.Interop._DAcadApplicationEvents_Event
Interface Autodesk.AutoCAD.Interop.AcadDocument: AutoLayout, AnsiClass, Class, Public, ClassSemanticsMask, Abstract, Import
Interfaces:
Autodesk.AutoCAD.Interop.IAcadDocument
Autodesk.AutoCAD.Interop.Common.IAcadDatabase
Autodesk.AutoCAD.Interop._DAcadDocumentEvents_Event
Interface Autodesk.AutoCAD.Interop.AcadDocuments: AutoLayout, AnsiClass, Class, Public, ClassSemanticsMask, Abstract, Import
Interfaces:
Autodesk.AutoCAD.Interop.IAcadDocuments
System.Collections.IEnumerable
Interface Autodesk.AutoCAD.Interop.IAcadApplication: AutoLayout, AnsiClass, Class, Public, ClassSemanticsMask, Abstract, Import
Properties:
Boolean Visible 'get set' :
Autodesk.AutoCAD.Interop.AcadDocuments Documents 'get ' :
Methods:
get_Visible(): PrivateScope, Public, Virtual, HideBySig, VtableLayoutMask, Abstract, SpecialName
set_Visible(Boolean(In)): PrivateScope, Public, Virtual, HideBySig, VtableLayoutMask, Abstract, SpecialName
Quit(): PrivateScope, Public, Virtual, HideBySig, VtableLayoutMask, Abstract
get_Documents(): PrivateScope, Public, Virtual, HideBySig, VtableLayoutMask, Abstract, SpecialName
Interface Autodesk.AutoCAD.Interop.IAcadDocument: AutoLayout, AnsiClass, Class, Public, ClassSemanticsMask, Abstract, Import
Interfaces:
Autodesk.AutoCAD.Interop.Common.IAcadDatabase
Properties:
Autodesk.AutoCAD.Interop.Common.AcadModelSpace ModelSpace 'get ' :
Methods:
get_ModelSpace(): PrivateScope, Public, Virtual, HideBySig, VtableLayoutMask, Abstract, SpecialName
SaveAs(String(In, HasFieldMarshal), Object(In, Optional, HasFieldMarshal), Object(In, Optional, HasFieldMarshal)): PrivateScope, Public, Virtual, HideBySig, VtableLayoutMask, Abstract
Close(Object(In, Optional, HasFieldMarshal), Object(In, Optional, HasFieldMarshal)): PrivateScope, Public, Virtual, HideBySig, VtableLayoutMask, Abstract
Interface Autodesk.AutoCAD.Interop.IAcadDocuments: AutoLayout, AnsiClass, Class, Public, ClassSemanticsMask, Abstract, Import
Interfaces:
System.Collections.IEnumerable
Methods:
Item(Object(In, HasFieldMarshal)): PrivateScope, Public, Virtual, HideBySig, VtableLayoutMask, Abstract
Open(String(In, HasFieldMarshal), Object(In, Optional, HasFieldMarshal), Object(In, Optional, HasFieldMarshal)): PrivateScope, Public, Virtual, HideBySig, VtableLayoutMask, Abstract
Interface Autodesk.AutoCAD.Interop._DAcadApplicationEvents: AutoLayout, AnsiClass, Class, Public, ClassSemanticsMask, Abstract, Import
Interface Autodesk.AutoCAD.Interop._DAcadApplicationEvents_Event: AutoLayout, AnsiClass, Class, Public, ClassSemanticsMask, Abstract, Import
Interface Autodesk.AutoCAD.Interop._DAcadDocumentEvents: AutoLayout, AnsiClass, Class, Public, ClassSemanticsMask, Abstract, Import
Interface Autodesk.AutoCAD.Interop._DAcadDocumentEvents_Event: AutoLayout, AnsiClass, Class, Public, ClassSemanticsMask, Abstract, Import
Interface Autodesk.AutoCAD.Interop.Common.AcadAttributeReference: AutoLayout, AnsiClass, Class, Public, ClassSemanticsMask, Abstract, Import
Interfaces:
Autodesk.AutoCAD.Interop.Common.IAcadAttributeReference
Autodesk.AutoCAD.Interop.Common.IAcadEntity
Autodesk.AutoCAD.Interop.Common.IAcadObject
Autodesk.AutoCAD.Interop.Common.IAcadObjectEvents_Event
Interface Autodesk.AutoCAD.Interop.Common.AcadBlockReference: AutoLayout, AnsiClass, Class, Public, ClassSemanticsMask, Abstract, Import
Interfaces:
Autodesk.AutoCAD.Interop.Common.IAcadBlockReference
Autodesk.AutoCAD.Interop.Common.IAcadEntity
Autodesk.AutoCAD.Interop.Common.IAcadObject
Autodesk.AutoCAD.Interop.Common.IAcadObjectEvents_Event
Interface Autodesk.AutoCAD.Interop.Common.AcadEntity: AutoLayout, AnsiClass, Class, Public, ClassSemanticsMask, Abstract, Import
Interfaces:
Autodesk.AutoCAD.Interop.Common.IAcadEntity
Autodesk.AutoCAD.Interop.Common.IAcadObject
Autodesk.AutoCAD.Interop.Common.IAcadObjectEvents_Event
Interface Autodesk.AutoCAD.Interop.Common.AcadModelSpace: AutoLayout, AnsiClass, Class, Public, ClassSemanticsMask, Abstract, Import
Interfaces:
Autodesk.AutoCAD.Interop.Common.IAcadModelSpace
Autodesk.AutoCAD.Interop.Common.IAcadBlock
Autodesk.AutoCAD.Interop.Common.IAcadObject
System.Collections.IEnumerable
Autodesk.AutoCAD.Interop.Common.IAcadObjectEvents_Event
Interface Autodesk.AutoCAD.Interop.Common.IAcadAttributeReference: AutoLayout, AnsiClass, Class, Public, ClassSemanticsMask, Abstract, Import
Interfaces:
Autodesk.AutoCAD.Interop.Common.IAcadEntity
Autodesk.AutoCAD.Interop.Common.IAcadObject
Properties:
System.String TagString 'get set' :
System.String TextString 'get set' :
Methods:
get_TagString(): PrivateScope, Public, Virtual, HideBySig, VtableLayoutMask, Abstract, SpecialName
set_TagString(String(In, HasFieldMarshal)): PrivateScope, Public, Virtual, HideBySig, VtableLayoutMask, Abstract, SpecialName
get_TextString(): PrivateScope, Public, Virtual, HideBySig, VtableLayoutMask, Abstract, SpecialName
set_TextString(String(In, HasFieldMarshal)): PrivateScope, Public, Virtual, HideBySig, VtableLayoutMask, Abstract, SpecialName
Interface Autodesk.AutoCAD.Interop.Common.IAcadBlock: AutoLayout, AnsiClass, Class, Public, ClassSemanticsMask, Abstract, Import
Interfaces:
Autodesk.AutoCAD.Interop.Common.IAcadObject
System.Collections.IEnumerable
Methods:
Item(Object(In, HasFieldMarshal)): PrivateScope, Public, Virtual, HideBySig, VtableLayoutMask, Abstract
Interface Autodesk.AutoCAD.Interop.Common.IAcadBlockReference: AutoLayout, AnsiClass, Class, Public, ClassSemanticsMask, Abstract, Import
Interfaces:
Autodesk.AutoCAD.Interop.Common.IAcadEntity
Autodesk.AutoCAD.Interop.Common.IAcadObject
Properties:
System.String Name 'get set' :
Methods:
get_Name(): PrivateScope, Public, Virtual, HideBySig, VtableLayoutMask, Abstract, SpecialName
set_Name(String(In, HasFieldMarshal)): PrivateScope, Public, Virtual, HideBySig, VtableLayoutMask, Abstract, SpecialName
GetAttributes(): PrivateScope, Public, Virtual, HideBySig, VtableLayoutMask, Abstract
Interface Autodesk.AutoCAD.Interop.Common.IAcadDatabase: AutoLayout, AnsiClass, Class, Public, ClassSemanticsMask, Abstract, Import
Interface Autodesk.AutoCAD.Interop.Common.IAcadEntity: AutoLayout, AnsiClass, Class, Public, ClassSemanticsMask, Abstract, Import
Interfaces:
Autodesk.AutoCAD.Interop.Common.IAcadObject
Properties:
System.String EntityName 'get ' :
Methods:
get_EntityName(): PrivateScope, Public, Virtual, HideBySig, VtableLayoutMask, Abstract, SpecialName
Interface Autodesk.AutoCAD.Interop.Common.IAcadModelSpace: AutoLayout, AnsiClass, Class, Public, ClassSemanticsMask, Abstract, Import
Interfaces:
Autodesk.AutoCAD.Interop.Common.IAcadBlock
Autodesk.AutoCAD.Interop.Common.IAcadObject
System.Collections.IEnumerable
Methods:
Item(Object(In, HasFieldMarshal)): PrivateScope, Public, Virtual, HideBySig, VtableLayoutMask, Abstract
GetEnumerator(): PrivateScope, Public, Virtual, HideBySig, VtableLayoutMask, Abstract
Interface Autodesk.AutoCAD.Interop.Common.IAcadObject: AutoLayout, AnsiClass, Class, Public, ClassSemanticsMask, Abstract, Import
Interface Autodesk.AutoCAD.Interop.Common.IAcadObjectEvents: AutoLayout, AnsiClass, Class, Public, ClassSemanticsMask, Abstract, Import
Interface Autodesk.AutoCAD.Interop.Common.IAcadObjectEvents_Event: AutoLayout, AnsiClass, Class, Public, ClassSemanticsMask, Abstract, Import

@ -0,0 +1,2 @@
#TargetFrameworkVersion=v4.0:PlatformToolSet=v140:EnableManagedIncrementalBuild=true:VCToolArchitecture=Native32Bit:WindowsTargetPlatformVersion=8.1
Release|x64|E:\work\vs_workspace\jditk\|

Binary file not shown.

@ -0,0 +1,3 @@
# itk
itk

Binary file not shown.

Binary file not shown.

@ -0,0 +1,7 @@
ImageRuntimeVersion: v4.0.30319
Assembly bs, Version=0.0.*, Culture=固定语言(固定国家/地区):
hash=SHA1, flags=PublicKey
Assembly mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089:
hash=None, flags=None
Assembly declib, Version=1.0.*, Culture=固定语言(固定国家/地区):
hash=None, flags=None

Binary file not shown.

Binary file not shown.

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff
Loading…
Cancel
Save