32 changed files with 10034 additions and 682 deletions
-
207ICSSoft.U9ERP.WebAPI/ICSSoft.APIApproveIssue/ApproveIssue.cs
-
1113ICSSoft.U9ERP.WebAPI/ICSSoft.APIApproveIssue/ApproveIssueDoc4ExternalSrvStub.cs
-
82ICSSoft.U9ERP.WebAPI/ICSSoft.APIApproveIssue/ICSSoft.APIApproveIssue.csproj
-
37ICSSoft.U9ERP.WebAPI/ICSSoft.APIApproveIssue/Properties/AssemblyInfo.cs
-
29ICSSoft.U9ERP.WebAPI/ICSSoft.APIApproveIssue/output.config
-
219ICSSoft.U9ERP.WebAPI/ICSSoft.APIApproveRCV/ApproveRCV.cs
-
82ICSSoft.U9ERP.WebAPI/ICSSoft.APIApproveRCV/ICSSoft.APIApproveRCV.csproj
-
37ICSSoft.U9ERP.WebAPI/ICSSoft.APIApproveRCV/Properties/AssemblyInfo.cs
-
889ICSSoft.U9ERP.WebAPI/ICSSoft.APIApproveRCV/RcvApprovedSVStub.cs
-
29ICSSoft.U9ERP.WebAPI/ICSSoft.APIApproveRCV/output.config
-
1349ICSSoft.U9ERP.WebAPI/ICSSoft.APICreateIssue/CreatRecedeIssueDocSVStub.cs
-
342ICSSoft.U9ERP.WebAPI/ICSSoft.APICreateIssue/CreateIssue.cs
-
98ICSSoft.U9ERP.WebAPI/ICSSoft.APICreateIssue/ICSSoft.APICreateIssue.csproj
-
37ICSSoft.U9ERP.WebAPI/ICSSoft.APICreateIssue/Properties/AssemblyInfo.cs
-
29ICSSoft.U9ERP.WebAPI/ICSSoft.APICreateIssue/output.config
-
2585ICSSoft.U9ERP.WebAPI/ICSSoft.APICreateLotMaster/CommonCreateLotMasterSRVStub.cs
-
186ICSSoft.U9ERP.WebAPI/ICSSoft.APICreateLotMaster/CreateLotMaster.cs
-
82ICSSoft.U9ERP.WebAPI/ICSSoft.APICreateLotMaster/ICSSoft.APICreateLotMaster.csproj
-
37ICSSoft.U9ERP.WebAPI/ICSSoft.APICreateLotMaster/Properties/AssemblyInfo.cs
-
29ICSSoft.U9ERP.WebAPI/ICSSoft.APICreateLotMaster/output.config
-
159ICSSoft.U9ERP.WebAPI/ICSSoft.APIDeleteIssue/DeleteIssue.cs
-
1081ICSSoft.U9ERP.WebAPI/ICSSoft.APIDeleteIssue/DeleteIssue4ExternalStub.cs
-
82ICSSoft.U9ERP.WebAPI/ICSSoft.APIDeleteIssue/ICSSoft.APIDeleteIssue.csproj
-
37ICSSoft.U9ERP.WebAPI/ICSSoft.APIDeleteIssue/Properties/AssemblyInfo.cs
-
29ICSSoft.U9ERP.WebAPI/ICSSoft.APIDeleteIssue/output.config
-
24ICSSoft.U9ERP.WebAPI/ICSSoft.Common/DBHelper.cs
-
314ICSSoft.U9ERP.WebAPI/ICSSoft.DataProject/CreateAppVouch.cs
-
34ICSSoft.U9ERP.WebAPI/ICSSoft.ERP.WebAPI.sln
-
1405ICSSoft.U9ERP.WebAPI/ICSSoft.ERP.WebAPI/Controllers/ValuesController.cs
-
8ICSSoft.U9ERP.WebAPI/ICSSoft.ERP.WebAPI/ICSSoft.ERP.WebAPI.csproj
-
6ICSSoft.U9ERP.WebAPI/ICSSoft.ERP.WebAPI/Properties/PublishProfiles/FYN.pubxml
-
39ICSSoft.U9ERP.WebAPI/ICSSoft.ERP.WebAPI/Web.config
@ -0,0 +1,207 @@ |
|||
using ICSSoft.Common; |
|||
using System; |
|||
using System.Collections.Generic; |
|||
using System.Configuration; |
|||
using System.Data; |
|||
using System.Data.SqlClient; |
|||
using System.Linq; |
|||
using System.Text; |
|||
using System.Threading.Tasks; |
|||
using ICSSoft.Entity; |
|||
using UFSoft.UBF.Util.Context; |
|||
using System.ServiceModel; |
|||
using www.ufida.org.EntityData; |
|||
using UFSoft.UBF.Exceptions1; |
|||
|
|||
namespace ICSSoft.APIApproveIssue |
|||
{ |
|||
public class ApproveIssue |
|||
{ |
|||
private static log4net.ILog log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); |
|||
private static string connString = System.Configuration.ConfigurationManager.AppSettings["ERPConnStr"]; |
|||
private static string ERPDB = System.Configuration.ConfigurationManager.AppSettings["ERPDB"]; |
|||
/// <summary>
|
|||
/// 审核领料单(外部通过API调用)
|
|||
/// </summary>
|
|||
/// <param name="infos"></param>
|
|||
/// <returns></returns>
|
|||
public bool Approve(List<ICSRdrecord11> infos) |
|||
{ |
|||
bool ResultFlag = false; |
|||
ThreadContext context; |
|||
try |
|||
{ |
|||
StringBuilder strHead = new StringBuilder(); |
|||
string _MOCode = string.Empty; |
|||
UFIDAU9ISVMOIApproveIssueDoc4ExternalSrvClient client = new UFIDAU9ISVMOIApproveIssueDoc4ExternalSrvClient(); |
|||
MessageBase[] message = null; |
|||
List<UFIDAU9ISVMOApproveIssueDoc4ExternalDTOData> LLlist = new List<UFIDAU9ISVMOApproveIssueDoc4ExternalDTOData>(); |
|||
UFIDAU9ISVMOApproveIssueDoc4ExternalDTOData LL = new UFIDAU9ISVMOApproveIssueDoc4ExternalDTOData(); |
|||
UFIDAU9ISVMOApproveIssueDoc4ExternalDTOData[] resultList = new UFIDAU9ISVMOApproveIssueDoc4ExternalDTOData[] { }; |
|||
string OrgID = ""; |
|||
string orgsql = @"select ID from Base_Organization
|
|||
where Code='{0}'";
|
|||
orgsql = string.Format(orgsql, infos[0].WorkPoint); |
|||
DataTable orgdt = DBHelper.Query(orgsql, connString); |
|||
if (orgdt.Rows.Count != 0) |
|||
{ |
|||
OrgID = orgdt.Rows[0]["ID"].ToString(); |
|||
} |
|||
else |
|||
{ |
|||
throw new Exception("传入组织编码错误!"); |
|||
} |
|||
foreach (ICSRdrecord11 info in infos) |
|||
{ |
|||
string checksql = @"select * from MO_IssueDoc
|
|||
where DocNo='" + info.IssueCode + "' AND Org='" + OrgID + "'";
|
|||
checksql = string.Format(checksql); |
|||
DataTable dtcheck = DBHelper.Query(checksql, connString); |
|||
if (dtcheck.Rows.Count == 0) |
|||
{ |
|||
throw new Exception("领料单号:'" + info.IssueCode + "'不存在!!"); |
|||
} |
|||
else |
|||
{ |
|||
LL = new UFIDAU9ISVMOApproveIssueDoc4ExternalDTOData(); |
|||
LL.m_docNo = info.IssueCode; |
|||
LL.m_operateType = true; |
|||
LLlist.Add(LL); |
|||
} |
|||
} |
|||
context = CreateContextObj(OrgID); |
|||
resultList = client.Do(out message, context, LLlist.ToArray(), false, false); |
|||
if (resultList != null && resultList.Count() > 0) |
|||
{ |
|||
foreach (var item in resultList) |
|||
{ |
|||
if (item.m_isSucceed == false) |
|||
{ |
|||
throw new Exception(item.m_errorMsg); |
|||
} |
|||
} |
|||
ResultFlag = true; |
|||
} |
|||
else |
|||
{ |
|||
ResultFlag = true; |
|||
} |
|||
} |
|||
catch (Exception ex) |
|||
{ |
|||
log.Error(ex.Message); |
|||
throw new Exception(ex.Message); |
|||
} |
|||
return ResultFlag; |
|||
} |
|||
/// <summary>
|
|||
/// 审核领料单(接口内部调用,如:创建退料单后调用审核单据)
|
|||
/// </summary>
|
|||
/// <param name="DocNOList"></param>
|
|||
/// <param name="OrgCode"></param>
|
|||
/// <returns></returns>
|
|||
public bool Approve(List<string> DocNOList,string OrgCode) |
|||
{ |
|||
bool ResultFlag = false; |
|||
ThreadContext context; |
|||
try |
|||
{ |
|||
StringBuilder strHead = new StringBuilder(); |
|||
string _MOCode = string.Empty; |
|||
UFIDAU9ISVMOIApproveIssueDoc4ExternalSrvClient client = new UFIDAU9ISVMOIApproveIssueDoc4ExternalSrvClient(); |
|||
MessageBase[] message = null; |
|||
List<UFIDAU9ISVMOApproveIssueDoc4ExternalDTOData> LLlist = new List<UFIDAU9ISVMOApproveIssueDoc4ExternalDTOData>(); |
|||
UFIDAU9ISVMOApproveIssueDoc4ExternalDTOData LL = new UFIDAU9ISVMOApproveIssueDoc4ExternalDTOData(); |
|||
UFIDAU9ISVMOApproveIssueDoc4ExternalDTOData[] resultList = new UFIDAU9ISVMOApproveIssueDoc4ExternalDTOData[] { }; |
|||
string OrgID = ""; |
|||
string orgsql = @"select ID from Base_Organization
|
|||
where Code='{0}'";
|
|||
orgsql = string.Format(orgsql, OrgCode); |
|||
DataTable orgdt = DBHelper.Query(orgsql, connString); |
|||
if (orgdt.Rows.Count != 0) |
|||
{ |
|||
OrgID = orgdt.Rows[0]["ID"].ToString(); |
|||
} |
|||
else |
|||
{ |
|||
throw new Exception("传入组织编码错误!"); |
|||
} |
|||
foreach (string DocNO in DocNOList) |
|||
{ |
|||
string checksql = @"select * from MO_IssueDoc
|
|||
where DocNo='" + DocNO + "' AND Org='" + OrgID + "'";
|
|||
checksql = string.Format(checksql); |
|||
DataTable dtcheck = DBHelper.Query(checksql, connString); |
|||
if (dtcheck.Rows.Count == 0) |
|||
{ |
|||
throw new Exception("领料单号:'" + DocNO + "'不存在!!"); |
|||
} |
|||
else |
|||
{ |
|||
LL = new UFIDAU9ISVMOApproveIssueDoc4ExternalDTOData(); |
|||
LL.m_docNo = DocNO; |
|||
LL.m_operateType = true; |
|||
LLlist.Add(LL); |
|||
} |
|||
} |
|||
context = CreateContextObj(OrgID); |
|||
resultList = client.Do(out message, context, LLlist.ToArray(), false, false); |
|||
if (resultList != null && resultList.Count() > 0) |
|||
{ |
|||
foreach (var item in resultList) |
|||
{ |
|||
if (item.m_isSucceed == false) |
|||
{ |
|||
throw new Exception(item.m_errorMsg); |
|||
} |
|||
} |
|||
ResultFlag = true; |
|||
} |
|||
else |
|||
{ |
|||
ResultFlag = true; |
|||
} |
|||
} |
|||
catch (Exception ex) |
|||
{ |
|||
log.Error(ex.Message); |
|||
throw new Exception(ex.Message); |
|||
} |
|||
return ResultFlag; |
|||
} |
|||
#region 给上下文信息赋值
|
|||
/// <summary>
|
|||
/// 给上下文信息赋值
|
|||
/// </summary>
|
|||
/// <returns></returns>
|
|||
private static ThreadContext CreateContextObj(string OrgID) |
|||
{ |
|||
// 实例化应用上下文对象
|
|||
ThreadContext thContext = new ThreadContext(); |
|||
|
|||
|
|||
System.Collections.Generic.Dictionary<object, object> ns = new Dictionary<object, object>(); |
|||
ns.Add("OrgID", OrgID); |
|||
ns.Add("UserID", ConfigurationManager.AppSettings["userID"].ToString()); |
|||
ns.Add("UserCode", ConfigurationManager.AppSettings["userCode"].ToString()); |
|||
ns.Add("Datetime", DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss")); |
|||
ns.Add("CultureName", ConfigurationManager.AppSettings["cultureName"].ToString()); |
|||
ns.Add("EnterpriseID", ConfigurationManager.AppSettings["enterpriseID"].ToString()); |
|||
ns.Add("DefaultCultureName", ConfigurationManager.AppSettings["cultureName"].ToString()); |
|||
thContext.nameValueHas = ns; |
|||
|
|||
return thContext; |
|||
} |
|||
#endregion
|
|||
|
|||
private static DataTable GetData(string DocCode, string OrgID) |
|||
{ |
|||
string sql = @" select A.ID,A1.[Code] as [Receivement_RcvDocType_Code],A.Status
|
|||
from PM_Receivement as A |
|||
left join [PM_RcvDocType] as A1 on (A.[RcvDocType] = A1.[ID]) |
|||
left join [PM_RcvDocType_Trl] as A2 on (A2.SysMlFlag = 'zh-CN') and (A1.[ID] = A2.[ID]) |
|||
where A.DocNo='" + DocCode + "' AND A.Org='" + OrgID + "'";
|
|||
return DBHelper.Query(sql, connString); |
|||
} |
|||
} |
|||
} |
1113
ICSSoft.U9ERP.WebAPI/ICSSoft.APIApproveIssue/ApproveIssueDoc4ExternalSrvStub.cs
File diff suppressed because it is too large
View File
File diff suppressed because it is too large
View File
@ -0,0 +1,82 @@ |
|||
<?xml version="1.0" encoding="utf-8"?> |
|||
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> |
|||
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" /> |
|||
<PropertyGroup> |
|||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> |
|||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> |
|||
<ProjectGuid>{8666C3EA-95F9-4E97-A899-60ECC3FFDDAE}</ProjectGuid> |
|||
<OutputType>Library</OutputType> |
|||
<AppDesignerFolder>Properties</AppDesignerFolder> |
|||
<RootNamespace>ICSSoft.APIApproveIssue</RootNamespace> |
|||
<AssemblyName>ICSSoft.APIApproveIssue</AssemblyName> |
|||
<TargetFrameworkVersion>v4.8</TargetFrameworkVersion> |
|||
<FileAlignment>512</FileAlignment> |
|||
<Deterministic>true</Deterministic> |
|||
<SccProjectName> |
|||
</SccProjectName> |
|||
<SccLocalPath> |
|||
</SccLocalPath> |
|||
<SccAuxPath> |
|||
</SccAuxPath> |
|||
<SccProvider> |
|||
</SccProvider> |
|||
<TargetFrameworkProfile /> |
|||
</PropertyGroup> |
|||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> |
|||
<DebugSymbols>true</DebugSymbols> |
|||
<DebugType>full</DebugType> |
|||
<Optimize>false</Optimize> |
|||
<OutputPath>bin\Debug\</OutputPath> |
|||
<DefineConstants>DEBUG;TRACE</DefineConstants> |
|||
<ErrorReport>prompt</ErrorReport> |
|||
<WarningLevel>4</WarningLevel> |
|||
</PropertyGroup> |
|||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> |
|||
<DebugType>pdbonly</DebugType> |
|||
<Optimize>true</Optimize> |
|||
<OutputPath>bin\Release\</OutputPath> |
|||
<DefineConstants>TRACE</DefineConstants> |
|||
<ErrorReport>prompt</ErrorReport> |
|||
<WarningLevel>4</WarningLevel> |
|||
</PropertyGroup> |
|||
<ItemGroup> |
|||
<Reference Include="log4net, Version=2.0.8.0, Culture=neutral, PublicKeyToken=669e0ddf0bb1aa2a, processorArchitecture=MSIL"> |
|||
<SpecificVersion>False</SpecificVersion> |
|||
<HintPath>..\ICSSoft.ERP.WebAPI\bin\log4net.dll</HintPath> |
|||
</Reference> |
|||
<Reference Include="Newtonsoft.Json, Version=6.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL"> |
|||
<SpecificVersion>False</SpecificVersion> |
|||
<HintPath>bin\Debug\Newtonsoft.Json.dll</HintPath> |
|||
</Reference> |
|||
<Reference Include="System" /> |
|||
<Reference Include="System.Configuration" /> |
|||
<Reference Include="System.Core" /> |
|||
<Reference Include="System.Runtime.Serialization" /> |
|||
<Reference Include="System.ServiceModel" /> |
|||
<Reference Include="System.Xml.Linq" /> |
|||
<Reference Include="System.Data.DataSetExtensions" /> |
|||
<Reference Include="Microsoft.CSharp" /> |
|||
<Reference Include="System.Data" /> |
|||
<Reference Include="System.Net.Http" /> |
|||
<Reference Include="System.Xml" /> |
|||
</ItemGroup> |
|||
<ItemGroup> |
|||
<Compile Include="ApproveIssueDoc4ExternalSrvStub.cs" /> |
|||
<Compile Include="Properties\AssemblyInfo.cs" /> |
|||
<Compile Include="ApproveIssue.cs" /> |
|||
</ItemGroup> |
|||
<ItemGroup> |
|||
<ProjectReference Include="..\ICSSoft.Common\ICSSoft.Common.csproj"> |
|||
<Project>{ee45f7a5-17ee-4707-a617-8c00dd36fc01}</Project> |
|||
<Name>ICSSoft.Common</Name> |
|||
</ProjectReference> |
|||
<ProjectReference Include="..\ICSSoft.Entity\ICSSoft.Entity.csproj"> |
|||
<Project>{834E9A76-1D9E-4EBD-9321-0B362A06A367}</Project> |
|||
<Name>ICSSoft.Entity</Name> |
|||
</ProjectReference> |
|||
</ItemGroup> |
|||
<ItemGroup> |
|||
<None Include="output.config" /> |
|||
</ItemGroup> |
|||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> |
|||
</Project> |
@ -0,0 +1,37 @@ |
|||
using System.Reflection; |
|||
using System.Runtime.CompilerServices; |
|||
using System.Runtime.InteropServices; |
|||
|
|||
// 有关程序集的一般信息由以下
|
|||
// 控制。更改这些特性值可修改
|
|||
// 与程序集关联的信息。
|
|||
[assembly: AssemblyTitle("ICSSoft.Common")] |
|||
[assembly: AssemblyDescription("")] |
|||
[assembly: AssemblyConfiguration("")] |
|||
[assembly: AssemblyCompany("")] |
|||
[assembly: AssemblyProduct("ICSSoft.Common")] |
|||
[assembly: AssemblyCopyright("Copyright © 2019")] |
|||
[assembly: AssemblyTrademark("")] |
|||
[assembly: AssemblyCulture("")] |
|||
|
|||
// 将 ComVisible 设置为 false 会使此程序集中的类型
|
|||
//对 COM 组件不可见。如果需要从 COM 访问此程序集中的类型
|
|||
//请将此类型的 ComVisible 特性设置为 true。
|
|||
[assembly: ComVisible(false)] |
|||
|
|||
// 如果此项目向 COM 公开,则下列 GUID 用于类型库的 ID
|
|||
[assembly: Guid("ee45f7a5-17ee-4707-a617-8c00dd36fc01")] |
|||
|
|||
// 程序集的版本信息由下列四个值组成:
|
|||
//
|
|||
// 主版本
|
|||
// 次版本
|
|||
// 生成号
|
|||
// 修订号
|
|||
//
|
|||
// 可以指定所有值,也可以使用以下所示的 "*" 预置版本号和修订号
|
|||
//通过使用 "*",如下所示:
|
|||
// [assembly: AssemblyVersion("1.0.*")]
|
|||
[assembly: AssemblyVersion("1.0.0.0")] |
|||
[assembly: AssemblyFileVersion("1.0.0.0")] |
|||
[assembly: log4net.Config.XmlConfigurator(ConfigFile = "log4.xml", Watch = true)] |
@ -0,0 +1,29 @@ |
|||
<?xml version="1.0" encoding="utf-8"?> |
|||
<configuration> |
|||
<system.serviceModel> |
|||
<bindings> |
|||
<basicHttpBinding> |
|||
<binding name="BasicHttpBinding_UFIDA.U9.ISV.MO.IApproveIssueDoc4ExternalSrv" |
|||
closeTimeout="00:01:00" openTimeout="00:01:00" receiveTimeout="00:10:00" |
|||
sendTimeout="00:01:00" allowCookies="false" bypassProxyOnLocal="false" |
|||
hostNameComparisonMode="StrongWildcard" maxBufferSize="65536" |
|||
maxBufferPoolSize="524288" maxReceivedMessageSize="65536" |
|||
messageEncoding="Text" textEncoding="utf-8" transferMode="Buffered" |
|||
useDefaultWebProxy="true"> |
|||
<readerQuotas maxDepth="32" maxStringContentLength="8192" maxArrayLength="16384" |
|||
maxBytesPerRead="4096" maxNameTableCharCount="16384" /> |
|||
<security mode="None"> |
|||
<transport clientCredentialType="None" proxyCredentialType="None" |
|||
realm="" /> |
|||
<message clientCredentialType="UserName" algorithmSuite="Default" /> |
|||
</security> |
|||
</binding> |
|||
</basicHttpBinding> |
|||
</bindings> |
|||
<client> |
|||
<endpoint address="http://192.168.0.100/U9/Services/UFIDA.U9.ISV.MO.IApproveIssueDoc4ExternalSrv.svc" |
|||
binding="basicHttpBinding" bindingConfiguration="BasicHttpBinding_UFIDA.U9.ISV.MO.IApproveIssueDoc4ExternalSrv" |
|||
contract="UFIDAU9ISVMOIApproveIssueDoc4ExternalSrv" name="BasicHttpBinding_UFIDA.U9.ISV.MO.IApproveIssueDoc4ExternalSrv" /> |
|||
</client> |
|||
</system.serviceModel> |
|||
</configuration> |
@ -0,0 +1,219 @@ |
|||
using ICSSoft.Common; |
|||
using System; |
|||
using System.Collections.Generic; |
|||
using System.Configuration; |
|||
using System.Data; |
|||
using System.Data.SqlClient; |
|||
using System.Linq; |
|||
using System.Text; |
|||
using System.Threading.Tasks; |
|||
using ICSSoft.Entity; |
|||
using UFSoft.UBF.Util.Context; |
|||
using System.ServiceModel; |
|||
|
|||
namespace ICSSoft.APIApproveRCV |
|||
{ |
|||
public class ApproveRCV |
|||
{ |
|||
private static log4net.ILog log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); |
|||
private static string connString = System.Configuration.ConfigurationManager.AppSettings["ERPConnStr"]; |
|||
private static string ERPDB = System.Configuration.ConfigurationManager.AppSettings["ERPDB"]; |
|||
|
|||
public bool Approve(List<ICSPurchaseReceiveDoc> infos) |
|||
{ |
|||
bool ResultFlag = false; |
|||
if (infos.Count <= 0) |
|||
{ |
|||
throw new Exception("传送数据为空!"); |
|||
} |
|||
string res = string.Empty; |
|||
string sql = string.Empty; |
|||
|
|||
foreach (ICSPurchaseReceiveDoc Info in infos) |
|||
{ |
|||
try |
|||
{ |
|||
long DocID = 0; |
|||
string EntityType = ""; |
|||
//实例化代理类
|
|||
UFIDAU9PMRcvIRcvApprovedSVClient client = new UFIDAU9PMRcvIRcvApprovedSVClient(); |
|||
//服务返回结果
|
|||
//UFIDAU9PMPOPurchaseOrderData[] returnItems;
|
|||
//返回异常信息,目前还没有使用此属性
|
|||
UFSoft.UBF.Exceptions.MessageBase[] returnMsg; |
|||
//上下文信息
|
|||
object context; |
|||
//传入 参数
|
|||
//UFIDAU9PMDTOsOBAPurchaseOrderDTOData[] pOList;
|
|||
UFSoft.UBF.Business.BusinessEntity.EntityKey docHead = new UFSoft.UBF.Business.BusinessEntity.EntityKey(); |
|||
string OrgID = ""; |
|||
string orgsql = @"select ID from Base_Organization
|
|||
where Code='{0}'";
|
|||
orgsql = string.Format(orgsql, Info.WorkPoint); |
|||
DataTable orgdt = DBHelper.Query(orgsql, connString); |
|||
if (orgdt.Rows.Count != 0) |
|||
{ |
|||
OrgID = orgdt.Rows[0]["ID"].ToString(); |
|||
} |
|||
else |
|||
{ |
|||
throw new Exception("传入组织编码错误!"); |
|||
} |
|||
DataTable dt = GetData(Info.RCVTCode, OrgID); |
|||
if (!string.IsNullOrEmpty(dt.Rows[0][0].ToString()) || !string.IsNullOrEmpty(dt.Rows[0][1].ToString())) |
|||
{ |
|||
DocID = long.Parse(dt.Rows[0][0].ToString()); |
|||
EntityType = dt.Rows[0][1].ToString(); |
|||
} |
|||
else |
|||
{ |
|||
throw new Exception("传入的单据号不正确!"); |
|||
} |
|||
int acttype = int.Parse(ConfigurationManager.AppSettings["acttype"].ToString()); |
|||
//给上下文信息赋值
|
|||
context = CreateContextObj(OrgID); |
|||
//给传入参数赋值
|
|||
docHead.EntityType = EntityType; |
|||
docHead.ID = DocID; |
|||
|
|||
//pOList = SetPoDtos(U9Info, poInfoList);
|
|||
//服务调用
|
|||
(client.Endpoint.Binding as BasicHttpBinding).MaxReceivedMessageSize = int.MaxValue; |
|||
(client.Endpoint.Binding as BasicHttpBinding).MaxBufferSize = int.MaxValue; |
|||
|
|||
returnMsg = client.Do(context, acttype, docHead); |
|||
if (returnMsg != null) |
|||
{ |
|||
if (!string.IsNullOrWhiteSpace(returnMsg[0].localMessage)) |
|||
{ |
|||
throw new Exception(returnMsg[0].localMessage); |
|||
} |
|||
} |
|||
} |
|||
catch (Exception ex) |
|||
{ |
|||
log.Error(ex.Message); |
|||
throw new Exception(ex.Message); |
|||
} |
|||
} |
|||
ResultFlag = true; |
|||
return ResultFlag; |
|||
} |
|||
|
|||
public bool Approve(List<ICSSalesShipmentDocNegative> infos) |
|||
{ |
|||
bool ResultFlag = false; |
|||
if (infos.Count <= 0) |
|||
{ |
|||
throw new Exception("传送数据为空!"); |
|||
} |
|||
string res = string.Empty; |
|||
string sql = string.Empty; |
|||
|
|||
foreach (ICSSalesShipmentDocNegative Info in infos) |
|||
{ |
|||
try |
|||
{ |
|||
long DocID = 0; |
|||
string EntityType = ""; |
|||
//实例化代理类
|
|||
UFIDAU9PMRcvIRcvApprovedSVClient client = new UFIDAU9PMRcvIRcvApprovedSVClient(); |
|||
//服务返回结果
|
|||
//UFIDAU9PMPOPurchaseOrderData[] returnItems;
|
|||
//返回异常信息,目前还没有使用此属性
|
|||
UFSoft.UBF.Exceptions.MessageBase[] returnMsg; |
|||
//上下文信息
|
|||
object context; |
|||
//传入 参数
|
|||
//UFIDAU9PMDTOsOBAPurchaseOrderDTOData[] pOList;
|
|||
UFSoft.UBF.Business.BusinessEntity.EntityKey docHead = new UFSoft.UBF.Business.BusinessEntity.EntityKey(); |
|||
string OrgID = ""; |
|||
string orgsql = @"select ID from Base_Organization
|
|||
where Code='{0}'";
|
|||
orgsql = string.Format(orgsql, Info.WorkPoint); |
|||
DataTable orgdt = DBHelper.Query(orgsql, connString); |
|||
if (orgdt.Rows.Count != 0) |
|||
{ |
|||
OrgID = orgdt.Rows[0]["ID"].ToString(); |
|||
} |
|||
else |
|||
{ |
|||
throw new Exception("传入组织编码错误!"); |
|||
} |
|||
DataTable dt = GetData(Info.SDNNEGCode, OrgID); |
|||
if (!string.IsNullOrEmpty(dt.Rows[0][0].ToString()) || !string.IsNullOrEmpty(dt.Rows[0][1].ToString())) |
|||
{ |
|||
DocID = long.Parse(dt.Rows[0][0].ToString()); |
|||
EntityType = dt.Rows[0][1].ToString(); |
|||
} |
|||
else |
|||
{ |
|||
throw new Exception("传入的单据号不正确!"); |
|||
} |
|||
int acttype = int.Parse(ConfigurationManager.AppSettings["acttype"].ToString()); |
|||
//给上下文信息赋值
|
|||
context = CreateContextObj(OrgID); |
|||
//给传入参数赋值
|
|||
docHead.EntityType = EntityType; |
|||
docHead.ID = DocID; |
|||
|
|||
//pOList = SetPoDtos(U9Info, poInfoList);
|
|||
//服务调用
|
|||
(client.Endpoint.Binding as BasicHttpBinding).MaxReceivedMessageSize = int.MaxValue; |
|||
(client.Endpoint.Binding as BasicHttpBinding).MaxBufferSize = int.MaxValue; |
|||
|
|||
returnMsg = client.Do(context, acttype, docHead); |
|||
if (returnMsg != null) |
|||
{ |
|||
if (!string.IsNullOrWhiteSpace(returnMsg[0].localMessage)) |
|||
{ |
|||
throw new Exception(returnMsg[0].localMessage); |
|||
} |
|||
} |
|||
} |
|||
catch (Exception ex) |
|||
{ |
|||
log.Error(ex.Message); |
|||
throw new Exception(ex.Message); |
|||
} |
|||
} |
|||
ResultFlag = true; |
|||
return ResultFlag; |
|||
} |
|||
|
|||
#region 给上下文信息赋值
|
|||
/// <summary>
|
|||
/// 给上下文信息赋值
|
|||
/// </summary>
|
|||
/// <returns></returns>
|
|||
private static ThreadContext CreateContextObj(string OrgID) |
|||
{ |
|||
// 实例化应用上下文对象
|
|||
ThreadContext thContext = new ThreadContext(); |
|||
|
|||
|
|||
System.Collections.Generic.Dictionary<object, object> ns = new Dictionary<object, object>(); |
|||
ns.Add("OrgID", OrgID); |
|||
ns.Add("UserID", ConfigurationManager.AppSettings["userID"].ToString()); |
|||
ns.Add("UserCode", ConfigurationManager.AppSettings["userCode"].ToString()); |
|||
ns.Add("Datetime", DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss")); |
|||
ns.Add("CultureName", ConfigurationManager.AppSettings["cultureName"].ToString()); |
|||
ns.Add("EnterpriseID", ConfigurationManager.AppSettings["enterpriseID"].ToString()); |
|||
ns.Add("DefaultCultureName", ConfigurationManager.AppSettings["cultureName"].ToString()); |
|||
thContext.nameValueHas = ns; |
|||
|
|||
return thContext; |
|||
} |
|||
#endregion
|
|||
|
|||
private static DataTable GetData(string DocCode, string OrgID) |
|||
{ |
|||
string sql = @" select A.ID,A1.[Code] as [Receivement_RcvDocType_Code],A.Status
|
|||
from PM_Receivement as A |
|||
left join [PM_RcvDocType] as A1 on (A.[RcvDocType] = A1.[ID]) |
|||
left join [PM_RcvDocType_Trl] as A2 on (A2.SysMlFlag = 'zh-CN') and (A1.[ID] = A2.[ID]) |
|||
where A.DocNo='" + DocCode + "' AND A.Org='" + OrgID + "'";
|
|||
return DBHelper.Query(sql, connString); |
|||
} |
|||
} |
|||
} |
@ -0,0 +1,82 @@ |
|||
<?xml version="1.0" encoding="utf-8"?> |
|||
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> |
|||
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" /> |
|||
<PropertyGroup> |
|||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> |
|||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> |
|||
<ProjectGuid>{9E8EFDBA-62EC-4479-BB51-03A520EE51CD}</ProjectGuid> |
|||
<OutputType>Library</OutputType> |
|||
<AppDesignerFolder>Properties</AppDesignerFolder> |
|||
<RootNamespace>ICSSoft.APIApproveRCV</RootNamespace> |
|||
<AssemblyName>ICSSoft.APIApproveRCV</AssemblyName> |
|||
<TargetFrameworkVersion>v4.8</TargetFrameworkVersion> |
|||
<FileAlignment>512</FileAlignment> |
|||
<Deterministic>true</Deterministic> |
|||
<SccProjectName> |
|||
</SccProjectName> |
|||
<SccLocalPath> |
|||
</SccLocalPath> |
|||
<SccAuxPath> |
|||
</SccAuxPath> |
|||
<SccProvider> |
|||
</SccProvider> |
|||
<TargetFrameworkProfile /> |
|||
</PropertyGroup> |
|||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> |
|||
<DebugSymbols>true</DebugSymbols> |
|||
<DebugType>full</DebugType> |
|||
<Optimize>false</Optimize> |
|||
<OutputPath>bin\Debug\</OutputPath> |
|||
<DefineConstants>DEBUG;TRACE</DefineConstants> |
|||
<ErrorReport>prompt</ErrorReport> |
|||
<WarningLevel>4</WarningLevel> |
|||
</PropertyGroup> |
|||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> |
|||
<DebugType>pdbonly</DebugType> |
|||
<Optimize>true</Optimize> |
|||
<OutputPath>bin\Release\</OutputPath> |
|||
<DefineConstants>TRACE</DefineConstants> |
|||
<ErrorReport>prompt</ErrorReport> |
|||
<WarningLevel>4</WarningLevel> |
|||
</PropertyGroup> |
|||
<ItemGroup> |
|||
<Reference Include="log4net, Version=2.0.8.0, Culture=neutral, PublicKeyToken=669e0ddf0bb1aa2a, processorArchitecture=MSIL"> |
|||
<SpecificVersion>False</SpecificVersion> |
|||
<HintPath>..\ICSSoft.ERP.WebAPI\bin\log4net.dll</HintPath> |
|||
</Reference> |
|||
<Reference Include="Newtonsoft.Json, Version=6.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL"> |
|||
<SpecificVersion>False</SpecificVersion> |
|||
<HintPath>bin\Debug\Newtonsoft.Json.dll</HintPath> |
|||
</Reference> |
|||
<Reference Include="System" /> |
|||
<Reference Include="System.Configuration" /> |
|||
<Reference Include="System.Core" /> |
|||
<Reference Include="System.Runtime.Serialization" /> |
|||
<Reference Include="System.ServiceModel" /> |
|||
<Reference Include="System.Xml.Linq" /> |
|||
<Reference Include="System.Data.DataSetExtensions" /> |
|||
<Reference Include="Microsoft.CSharp" /> |
|||
<Reference Include="System.Data" /> |
|||
<Reference Include="System.Net.Http" /> |
|||
<Reference Include="System.Xml" /> |
|||
</ItemGroup> |
|||
<ItemGroup> |
|||
<Compile Include="Properties\AssemblyInfo.cs" /> |
|||
<Compile Include="ApproveRCV.cs" /> |
|||
<Compile Include="RcvApprovedSVStub.cs" /> |
|||
</ItemGroup> |
|||
<ItemGroup> |
|||
<ProjectReference Include="..\ICSSoft.Common\ICSSoft.Common.csproj"> |
|||
<Project>{ee45f7a5-17ee-4707-a617-8c00dd36fc01}</Project> |
|||
<Name>ICSSoft.Common</Name> |
|||
</ProjectReference> |
|||
<ProjectReference Include="..\ICSSoft.Entity\ICSSoft.Entity.csproj"> |
|||
<Project>{834E9A76-1D9E-4EBD-9321-0B362A06A367}</Project> |
|||
<Name>ICSSoft.Entity</Name> |
|||
</ProjectReference> |
|||
</ItemGroup> |
|||
<ItemGroup> |
|||
<None Include="output.config" /> |
|||
</ItemGroup> |
|||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> |
|||
</Project> |
@ -0,0 +1,37 @@ |
|||
using System.Reflection; |
|||
using System.Runtime.CompilerServices; |
|||
using System.Runtime.InteropServices; |
|||
|
|||
// 有关程序集的一般信息由以下
|
|||
// 控制。更改这些特性值可修改
|
|||
// 与程序集关联的信息。
|
|||
[assembly: AssemblyTitle("ICSSoft.Common")] |
|||
[assembly: AssemblyDescription("")] |
|||
[assembly: AssemblyConfiguration("")] |
|||
[assembly: AssemblyCompany("")] |
|||
[assembly: AssemblyProduct("ICSSoft.Common")] |
|||
[assembly: AssemblyCopyright("Copyright © 2019")] |
|||
[assembly: AssemblyTrademark("")] |
|||
[assembly: AssemblyCulture("")] |
|||
|
|||
// 将 ComVisible 设置为 false 会使此程序集中的类型
|
|||
//对 COM 组件不可见。如果需要从 COM 访问此程序集中的类型
|
|||
//请将此类型的 ComVisible 特性设置为 true。
|
|||
[assembly: ComVisible(false)] |
|||
|
|||
// 如果此项目向 COM 公开,则下列 GUID 用于类型库的 ID
|
|||
[assembly: Guid("ee45f7a5-17ee-4707-a617-8c00dd36fc01")] |
|||
|
|||
// 程序集的版本信息由下列四个值组成:
|
|||
//
|
|||
// 主版本
|
|||
// 次版本
|
|||
// 生成号
|
|||
// 修订号
|
|||
//
|
|||
// 可以指定所有值,也可以使用以下所示的 "*" 预置版本号和修订号
|
|||
//通过使用 "*",如下所示:
|
|||
// [assembly: AssemblyVersion("1.0.*")]
|
|||
[assembly: AssemblyVersion("1.0.0.0")] |
|||
[assembly: AssemblyFileVersion("1.0.0.0")] |
|||
[assembly: log4net.Config.XmlConfigurator(ConfigFile = "log4.xml", Watch = true)] |
@ -0,0 +1,889 @@ |
|||
//------------------------------------------------------------------------------
|
|||
// <auto-generated>
|
|||
// 此代码由工具生成。
|
|||
// 运行时版本:2.0.50727.9148
|
|||
//
|
|||
// 对此文件的更改可能会导致不正确的行为,并且如果
|
|||
// 重新生成代码,这些更改将会丢失。
|
|||
// </auto-generated>
|
|||
//------------------------------------------------------------------------------
|
|||
|
|||
[assembly: System.Runtime.Serialization.ContractNamespaceAttribute("UFSoft.UBF.PL", ClrNamespace="UFSoft.UBF.PL")] |
|||
[assembly: System.Runtime.Serialization.ContractNamespaceAttribute("UFSoft.UBF.Business.BusinessEntity", ClrNamespace="UFSoft.UBF.Business.BusinessEntity")] |
|||
[assembly: System.Runtime.Serialization.ContractNamespaceAttribute("UFSoft.UBF.Exceptions", ClrNamespace="UFSoft.UBF.Exceptions")] |
|||
[assembly: System.Runtime.Serialization.ContractNamespaceAttribute("http://schemas.datacontract.org/2004/07/UFSoft.UBF.Exceptions", ClrNamespace="UFSoft.UBF.Exceptions1")] |
|||
|
|||
namespace UFSoft.UBF.PL |
|||
{ |
|||
using System.Runtime.Serialization; |
|||
|
|||
|
|||
[System.Diagnostics.DebuggerStepThroughAttribute()] |
|||
[System.CodeDom.Compiler.GeneratedCodeAttribute("System.Runtime.Serialization", "3.0.0.0")] |
|||
[System.Runtime.Serialization.DataContractAttribute(Name="ObjectKeyX", Namespace="UFSoft.UBF.PL")] |
|||
[System.Runtime.Serialization.KnownTypeAttribute(typeof(UFSoft.UBF.Business.BusinessEntity.EntityKey))] |
|||
public partial class ObjectKeyX : object, System.Runtime.Serialization.IExtensibleDataObject |
|||
{ |
|||
|
|||
private System.Runtime.Serialization.ExtensionDataObject extensionDataField; |
|||
|
|||
private string EntityTypeField; |
|||
|
|||
private long IDField; |
|||
|
|||
public System.Runtime.Serialization.ExtensionDataObject ExtensionData |
|||
{ |
|||
get |
|||
{ |
|||
return this.extensionDataField; |
|||
} |
|||
set |
|||
{ |
|||
this.extensionDataField = value; |
|||
} |
|||
} |
|||
|
|||
[System.Runtime.Serialization.DataMemberAttribute()] |
|||
public string EntityType |
|||
{ |
|||
get |
|||
{ |
|||
return this.EntityTypeField; |
|||
} |
|||
set |
|||
{ |
|||
this.EntityTypeField = value; |
|||
} |
|||
} |
|||
|
|||
[System.Runtime.Serialization.DataMemberAttribute()] |
|||
public long ID |
|||
{ |
|||
get |
|||
{ |
|||
return this.IDField; |
|||
} |
|||
set |
|||
{ |
|||
this.IDField = value; |
|||
} |
|||
} |
|||
} |
|||
} |
|||
namespace UFSoft.UBF.Business.BusinessEntity |
|||
{ |
|||
using System.Runtime.Serialization; |
|||
|
|||
|
|||
[System.Diagnostics.DebuggerStepThroughAttribute()] |
|||
[System.CodeDom.Compiler.GeneratedCodeAttribute("System.Runtime.Serialization", "3.0.0.0")] |
|||
[System.Runtime.Serialization.DataContractAttribute(Name="EntityKey", Namespace="UFSoft.UBF.Business.BusinessEntity")] |
|||
public partial class EntityKey : UFSoft.UBF.PL.ObjectKeyX |
|||
{ |
|||
} |
|||
} |
|||
namespace UFSoft.UBF.Service |
|||
{ |
|||
using System.Runtime.Serialization; |
|||
using System; |
|||
|
|||
|
|||
[System.Diagnostics.DebuggerStepThroughAttribute()] |
|||
[System.CodeDom.Compiler.GeneratedCodeAttribute("System.Runtime.Serialization", "3.0.0.0")] |
|||
[System.Runtime.Serialization.DataContractAttribute(Name="ServiceExceptionDetail", Namespace="http://schemas.datacontract.org/2004/07/UFSoft.UBF.Service")] |
|||
public partial class ServiceExceptionDetail : System.ServiceModel.ExceptionDetail, System.Runtime.Serialization.IExtensibleDataObject |
|||
{ |
|||
public ServiceExceptionDetail(Exception exception) : base(exception) { } |
|||
private System.Runtime.Serialization.ExtensionDataObject extensionDataField; |
|||
|
|||
private UFSoft.UBF.ExceptionBase ExceptionField; |
|||
|
|||
public System.Runtime.Serialization.ExtensionDataObject ExtensionData |
|||
{ |
|||
get |
|||
{ |
|||
return this.extensionDataField; |
|||
} |
|||
set |
|||
{ |
|||
this.extensionDataField = value; |
|||
} |
|||
} |
|||
|
|||
[System.Runtime.Serialization.DataMemberAttribute()] |
|||
public UFSoft.UBF.ExceptionBase Exception |
|||
{ |
|||
get |
|||
{ |
|||
return this.ExceptionField; |
|||
} |
|||
set |
|||
{ |
|||
this.ExceptionField = value; |
|||
} |
|||
} |
|||
} |
|||
|
|||
[System.Diagnostics.DebuggerStepThroughAttribute()] |
|||
[System.CodeDom.Compiler.GeneratedCodeAttribute("System.Runtime.Serialization", "3.0.0.0")] |
|||
[System.SerializableAttribute()] |
|||
public partial class ServiceLostException : UFSoft.UBF.ExceptionBase |
|||
{ |
|||
|
|||
public ServiceLostException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) : |
|||
base(info, context) |
|||
{ |
|||
} |
|||
} |
|||
|
|||
[System.Diagnostics.DebuggerStepThroughAttribute()] |
|||
[System.CodeDom.Compiler.GeneratedCodeAttribute("System.Runtime.Serialization", "3.0.0.0")] |
|||
[System.SerializableAttribute()] |
|||
public partial class ServiceException : UFSoft.UBF.ExceptionBase |
|||
{ |
|||
|
|||
public ServiceException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) : |
|||
base(info, context) |
|||
{ |
|||
} |
|||
} |
|||
} |
|||
namespace UFSoft.UBF |
|||
{ |
|||
using System; |
|||
using System.Runtime.Serialization; |
|||
|
|||
|
|||
[System.Diagnostics.DebuggerStepThroughAttribute()] |
|||
[System.CodeDom.Compiler.GeneratedCodeAttribute("System.Runtime.Serialization", "3.0.0.0")] |
|||
[System.SerializableAttribute()] |
|||
[System.Runtime.Serialization.KnownTypeAttribute(typeof(UFSoft.UBF.UnknownException))] |
|||
[System.Runtime.Serialization.KnownTypeAttribute(typeof(UFSoft.UBF.Business.BusinessException))] |
|||
[System.Runtime.Serialization.KnownTypeAttribute(typeof(UFSoft.UBF.Business.AttrsContainerException))] |
|||
[System.Runtime.Serialization.KnownTypeAttribute(typeof(UFSoft.UBF.Business.AttributeInValidException))] |
|||
[System.Runtime.Serialization.KnownTypeAttribute(typeof(UFSoft.UBF.Business.EntityNotExistException))] |
|||
[System.Runtime.Serialization.KnownTypeAttribute(typeof(UFSoft.UBF.Service.ServiceLostException))] |
|||
[System.Runtime.Serialization.KnownTypeAttribute(typeof(UFSoft.UBF.Service.ServiceException))] |
|||
public partial class ExceptionBase : System.Exception |
|||
{ |
|||
|
|||
public ExceptionBase(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) : |
|||
base(info, context) |
|||
{ |
|||
} |
|||
|
|||
[System.CodeDom.Compiler.GeneratedCodeAttribute("System.Runtime.Serialization", "3.0.0.0")] |
|||
[System.Runtime.Serialization.DataContractAttribute(Name="ExceptionBase.FormatState", Namespace="http://schemas.datacontract.org/2004/07/UFSoft.UBF")] |
|||
public enum FormatState : uint |
|||
{ |
|||
|
|||
[System.Runtime.Serialization.EnumMemberAttribute()] |
|||
None = 0, |
|||
|
|||
[System.Runtime.Serialization.EnumMemberAttribute()] |
|||
Formatting = 1, |
|||
|
|||
[System.Runtime.Serialization.EnumMemberAttribute()] |
|||
Formatted = 2, |
|||
} |
|||
} |
|||
|
|||
[System.Diagnostics.DebuggerStepThroughAttribute()] |
|||
[System.CodeDom.Compiler.GeneratedCodeAttribute("System.Runtime.Serialization", "3.0.0.0")] |
|||
[System.SerializableAttribute()] |
|||
public partial class UnknownException : UFSoft.UBF.ExceptionBase |
|||
{ |
|||
|
|||
public UnknownException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) : |
|||
base(info, context) |
|||
{ |
|||
} |
|||
} |
|||
|
|||
[System.Diagnostics.DebuggerStepThroughAttribute()] |
|||
[System.CodeDom.Compiler.GeneratedCodeAttribute("System.Runtime.Serialization", "3.0.0.0")] |
|||
[System.Runtime.Serialization.DataContractAttribute(Name="ErrorMessage", Namespace="http://schemas.datacontract.org/2004/07/UFSoft.UBF")] |
|||
public partial class ErrorMessage : object, System.Runtime.Serialization.IExtensibleDataObject |
|||
{ |
|||
|
|||
private System.Runtime.Serialization.ExtensionDataObject extensionDataField; |
|||
|
|||
private UFSoft.UBF.ErrorDescriptor errDescriptorField; |
|||
|
|||
private string errorTypeField; |
|||
|
|||
private UFSoft.UBF.ErrorMessage[] innerMessagesField; |
|||
|
|||
private string messageField; |
|||
|
|||
public System.Runtime.Serialization.ExtensionDataObject ExtensionData |
|||
{ |
|||
get |
|||
{ |
|||
return this.extensionDataField; |
|||
} |
|||
set |
|||
{ |
|||
this.extensionDataField = value; |
|||
} |
|||
} |
|||
|
|||
[System.Runtime.Serialization.DataMemberAttribute(IsRequired=true)] |
|||
public UFSoft.UBF.ErrorDescriptor errDescriptor |
|||
{ |
|||
get |
|||
{ |
|||
return this.errDescriptorField; |
|||
} |
|||
set |
|||
{ |
|||
this.errDescriptorField = value; |
|||
} |
|||
} |
|||
|
|||
[System.Runtime.Serialization.DataMemberAttribute(IsRequired=true)] |
|||
public string errorType |
|||
{ |
|||
get |
|||
{ |
|||
return this.errorTypeField; |
|||
} |
|||
set |
|||
{ |
|||
this.errorTypeField = value; |
|||
} |
|||
} |
|||
|
|||
[System.Runtime.Serialization.DataMemberAttribute()] |
|||
public UFSoft.UBF.ErrorMessage[] innerMessages |
|||
{ |
|||
get |
|||
{ |
|||
return this.innerMessagesField; |
|||
} |
|||
set |
|||
{ |
|||
this.innerMessagesField = value; |
|||
} |
|||
} |
|||
|
|||
[System.Runtime.Serialization.DataMemberAttribute()] |
|||
public string message |
|||
{ |
|||
get |
|||
{ |
|||
return this.messageField; |
|||
} |
|||
set |
|||
{ |
|||
this.messageField = value; |
|||
} |
|||
} |
|||
} |
|||
|
|||
[System.Diagnostics.DebuggerStepThroughAttribute()] |
|||
[System.CodeDom.Compiler.GeneratedCodeAttribute("System.Runtime.Serialization", "3.0.0.0")] |
|||
[System.Runtime.Serialization.DataContractAttribute(Name="ErrorDescriptor", Namespace="http://schemas.datacontract.org/2004/07/UFSoft.UBF")] |
|||
public partial class ErrorDescriptor : object, System.Runtime.Serialization.IExtensibleDataObject |
|||
{ |
|||
|
|||
private System.Runtime.Serialization.ExtensionDataObject extensionDataField; |
|||
|
|||
private string categoryField; |
|||
|
|||
private string erroridField; |
|||
|
|||
private UFSoft.UBF.ErrorLevel levelField; |
|||
|
|||
private string ownerField; |
|||
|
|||
private System.DateTime timeStampField; |
|||
|
|||
public System.Runtime.Serialization.ExtensionDataObject ExtensionData |
|||
{ |
|||
get |
|||
{ |
|||
return this.extensionDataField; |
|||
} |
|||
set |
|||
{ |
|||
this.extensionDataField = value; |
|||
} |
|||
} |
|||
|
|||
[System.Runtime.Serialization.DataMemberAttribute()] |
|||
public string category |
|||
{ |
|||
get |
|||
{ |
|||
return this.categoryField; |
|||
} |
|||
set |
|||
{ |
|||
this.categoryField = value; |
|||
} |
|||
} |
|||
|
|||
[System.Runtime.Serialization.DataMemberAttribute(IsRequired=true)] |
|||
public string errorid |
|||
{ |
|||
get |
|||
{ |
|||
return this.erroridField; |
|||
} |
|||
set |
|||
{ |
|||
this.erroridField = value; |
|||
} |
|||
} |
|||
|
|||
[System.Runtime.Serialization.DataMemberAttribute()] |
|||
public UFSoft.UBF.ErrorLevel level |
|||
{ |
|||
get |
|||
{ |
|||
return this.levelField; |
|||
} |
|||
set |
|||
{ |
|||
this.levelField = value; |
|||
} |
|||
} |
|||
|
|||
[System.Runtime.Serialization.DataMemberAttribute()] |
|||
public string owner |
|||
{ |
|||
get |
|||
{ |
|||
return this.ownerField; |
|||
} |
|||
set |
|||
{ |
|||
this.ownerField = value; |
|||
} |
|||
} |
|||
|
|||
[System.Runtime.Serialization.DataMemberAttribute()] |
|||
public System.DateTime timeStamp |
|||
{ |
|||
get |
|||
{ |
|||
return this.timeStampField; |
|||
} |
|||
set |
|||
{ |
|||
this.timeStampField = value; |
|||
} |
|||
} |
|||
} |
|||
|
|||
[System.CodeDom.Compiler.GeneratedCodeAttribute("System.Runtime.Serialization", "3.0.0.0")] |
|||
[System.Runtime.Serialization.DataContractAttribute(Name="ErrorLevel", Namespace="http://schemas.datacontract.org/2004/07/UFSoft.UBF")] |
|||
public enum ErrorLevel : short |
|||
{ |
|||
|
|||
[System.Runtime.Serialization.EnumMemberAttribute()] |
|||
Debug = 0, |
|||
|
|||
[System.Runtime.Serialization.EnumMemberAttribute()] |
|||
Info = 1, |
|||
|
|||
[System.Runtime.Serialization.EnumMemberAttribute()] |
|||
Warn = 2, |
|||
|
|||
[System.Runtime.Serialization.EnumMemberAttribute()] |
|||
Error = 3, |
|||
|
|||
[System.Runtime.Serialization.EnumMemberAttribute()] |
|||
Fatal = 4, |
|||
} |
|||
} |
|||
namespace UFSoft.UBF.Business |
|||
{ |
|||
using System; |
|||
using System.Runtime.Serialization; |
|||
|
|||
|
|||
[System.Diagnostics.DebuggerStepThroughAttribute()] |
|||
[System.CodeDom.Compiler.GeneratedCodeAttribute("System.Runtime.Serialization", "3.0.0.0")] |
|||
[System.SerializableAttribute()] |
|||
[System.Runtime.Serialization.KnownTypeAttribute(typeof(UFSoft.UBF.Business.AttrsContainerException))] |
|||
[System.Runtime.Serialization.KnownTypeAttribute(typeof(UFSoft.UBF.Business.AttributeInValidException))] |
|||
[System.Runtime.Serialization.KnownTypeAttribute(typeof(UFSoft.UBF.Business.EntityNotExistException))] |
|||
public partial class BusinessException : UFSoft.UBF.ExceptionBase |
|||
{ |
|||
|
|||
public BusinessException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) : |
|||
base(info, context) |
|||
{ |
|||
} |
|||
} |
|||
|
|||
[System.Diagnostics.DebuggerStepThroughAttribute()] |
|||
[System.CodeDom.Compiler.GeneratedCodeAttribute("System.Runtime.Serialization", "3.0.0.0")] |
|||
[System.SerializableAttribute()] |
|||
public partial class AttrsContainerException : UFSoft.UBF.Business.BusinessException |
|||
{ |
|||
|
|||
public AttrsContainerException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) : |
|||
base(info, context) |
|||
{ |
|||
} |
|||
} |
|||
|
|||
[System.Diagnostics.DebuggerStepThroughAttribute()] |
|||
[System.CodeDom.Compiler.GeneratedCodeAttribute("System.Runtime.Serialization", "3.0.0.0")] |
|||
[System.SerializableAttribute()] |
|||
public partial class AttributeInValidException : UFSoft.UBF.Business.BusinessException |
|||
{ |
|||
|
|||
public AttributeInValidException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) : |
|||
base(info, context) |
|||
{ |
|||
} |
|||
} |
|||
|
|||
[System.Diagnostics.DebuggerStepThroughAttribute()] |
|||
[System.CodeDom.Compiler.GeneratedCodeAttribute("System.Runtime.Serialization", "3.0.0.0")] |
|||
[System.SerializableAttribute()] |
|||
public partial class EntityNotExistException : UFSoft.UBF.Business.BusinessException |
|||
{ |
|||
|
|||
public EntityNotExistException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) : |
|||
base(info, context) |
|||
{ |
|||
} |
|||
} |
|||
} |
|||
namespace UFSoft.UBF.Util.Context |
|||
{ |
|||
using System.Runtime.Serialization; |
|||
|
|||
|
|||
[System.Diagnostics.DebuggerStepThroughAttribute()] |
|||
[System.CodeDom.Compiler.GeneratedCodeAttribute("System.Runtime.Serialization", "3.0.0.0")] |
|||
[System.Runtime.Serialization.DataContractAttribute(Name="PlatformContext", Namespace="http://schemas.datacontract.org/2004/07/UFSoft.UBF.Util.Context")] |
|||
[System.Runtime.Serialization.KnownTypeAttribute(typeof(UFSoft.UBF.PL.ObjectKeyX))] |
|||
[System.Runtime.Serialization.KnownTypeAttribute(typeof(System.ServiceModel.ExceptionDetail))] |
|||
[System.Runtime.Serialization.KnownTypeAttribute(typeof(UFSoft.UBF.ExceptionBase))] |
|||
[System.Runtime.Serialization.KnownTypeAttribute(typeof(UFSoft.UBF.ErrorMessage))] |
|||
[System.Runtime.Serialization.KnownTypeAttribute(typeof(UFSoft.UBF.ErrorDescriptor))] |
|||
[System.Runtime.Serialization.KnownTypeAttribute(typeof(UFSoft.UBF.ErrorLevel))] |
|||
[System.Runtime.Serialization.KnownTypeAttribute(typeof(UFSoft.UBF.ErrorMessage[]))] |
|||
[System.Runtime.Serialization.KnownTypeAttribute(typeof(UFSoft.UBF.UnknownException))] |
|||
[System.Runtime.Serialization.KnownTypeAttribute(typeof(UFSoft.UBF.ExceptionBase.FormatState))] |
|||
[System.Runtime.Serialization.KnownTypeAttribute(typeof(UFSoft.UBF.Util.Context.ApplicationContext))] |
|||
[System.Runtime.Serialization.KnownTypeAttribute(typeof(UFSoft.UBF.Util.Context.ThreadContext))] |
|||
[System.Runtime.Serialization.KnownTypeAttribute(typeof(System.Collections.Generic.Dictionary<object, object>))] |
|||
[System.Runtime.Serialization.KnownTypeAttribute(typeof(UFSoft.UBF.Business.BusinessException))] |
|||
[System.Runtime.Serialization.KnownTypeAttribute(typeof(UFSoft.UBF.Business.AttrsContainerException))] |
|||
[System.Runtime.Serialization.KnownTypeAttribute(typeof(UFSoft.UBF.Business.AttributeInValidException))] |
|||
[System.Runtime.Serialization.KnownTypeAttribute(typeof(UFSoft.UBF.Business.EntityNotExistException))] |
|||
[System.Runtime.Serialization.KnownTypeAttribute(typeof(UFSoft.UBF.Service.ServiceLostException))] |
|||
[System.Runtime.Serialization.KnownTypeAttribute(typeof(UFSoft.UBF.Service.ServiceException))] |
|||
[System.Runtime.Serialization.KnownTypeAttribute(typeof(UFSoft.UBF.Service.ServiceExceptionDetail))] |
|||
[System.Runtime.Serialization.KnownTypeAttribute(typeof(System.Exception))] |
|||
[System.Runtime.Serialization.KnownTypeAttribute(typeof(System.Exception[]))] |
|||
[System.Runtime.Serialization.KnownTypeAttribute(typeof(UFSoft.UBF.Exceptions.MessageBase))] |
|||
[System.Runtime.Serialization.KnownTypeAttribute(typeof(UFSoft.UBF.Exceptions.MessageBase[]))] |
|||
[System.Runtime.Serialization.KnownTypeAttribute(typeof(UFSoft.UBF.Exceptions1.MessageBaseFormatState))] |
|||
[System.Runtime.Serialization.KnownTypeAttribute(typeof(UFSoft.UBF.Business.BusinessEntity.EntityKey))] |
|||
public partial class PlatformContext : object, System.Runtime.Serialization.IExtensibleDataObject |
|||
{ |
|||
|
|||
private System.Runtime.Serialization.ExtensionDataObject extensionDataField; |
|||
|
|||
private object ctxField; |
|||
|
|||
public System.Runtime.Serialization.ExtensionDataObject ExtensionData |
|||
{ |
|||
get |
|||
{ |
|||
return this.extensionDataField; |
|||
} |
|||
set |
|||
{ |
|||
this.extensionDataField = value; |
|||
} |
|||
} |
|||
|
|||
[System.Runtime.Serialization.DataMemberAttribute(IsRequired=true)] |
|||
public object ctx |
|||
{ |
|||
get |
|||
{ |
|||
return this.ctxField; |
|||
} |
|||
set |
|||
{ |
|||
this.ctxField = value; |
|||
} |
|||
} |
|||
} |
|||
|
|||
[System.Diagnostics.DebuggerStepThroughAttribute()] |
|||
[System.CodeDom.Compiler.GeneratedCodeAttribute("System.Runtime.Serialization", "3.0.0.0")] |
|||
[System.Runtime.Serialization.DataContractAttribute(Name="ApplicationContext", Namespace="http://schemas.datacontract.org/2004/07/UFSoft.UBF.Util.Context")] |
|||
public partial class ApplicationContext : object, System.Runtime.Serialization.IExtensibleDataObject |
|||
{ |
|||
|
|||
private System.Runtime.Serialization.ExtensionDataObject extensionDataField; |
|||
|
|||
private System.Collections.Generic.Dictionary<object, object> nameValueHasField; |
|||
|
|||
public System.Runtime.Serialization.ExtensionDataObject ExtensionData |
|||
{ |
|||
get |
|||
{ |
|||
return this.extensionDataField; |
|||
} |
|||
set |
|||
{ |
|||
this.extensionDataField = value; |
|||
} |
|||
} |
|||
|
|||
[System.Runtime.Serialization.DataMemberAttribute(IsRequired=true)] |
|||
public System.Collections.Generic.Dictionary<object, object> nameValueHas |
|||
{ |
|||
get |
|||
{ |
|||
return this.nameValueHasField; |
|||
} |
|||
set |
|||
{ |
|||
this.nameValueHasField = value; |
|||
} |
|||
} |
|||
} |
|||
|
|||
[System.Diagnostics.DebuggerStepThroughAttribute()] |
|||
[System.CodeDom.Compiler.GeneratedCodeAttribute("System.Runtime.Serialization", "3.0.0.0")] |
|||
[System.Runtime.Serialization.DataContractAttribute(Name="ThreadContext", Namespace="http://schemas.datacontract.org/2004/07/UFSoft.UBF.Util.Context")] |
|||
public partial class ThreadContext : object, System.Runtime.Serialization.IExtensibleDataObject |
|||
{ |
|||
|
|||
private System.Runtime.Serialization.ExtensionDataObject extensionDataField; |
|||
|
|||
private System.Collections.Generic.Dictionary<object, object> nameValueHasField; |
|||
|
|||
public System.Runtime.Serialization.ExtensionDataObject ExtensionData |
|||
{ |
|||
get |
|||
{ |
|||
return this.extensionDataField; |
|||
} |
|||
set |
|||
{ |
|||
this.extensionDataField = value; |
|||
} |
|||
} |
|||
|
|||
[System.Runtime.Serialization.DataMemberAttribute(IsRequired=true)] |
|||
public System.Collections.Generic.Dictionary<object, object> nameValueHas |
|||
{ |
|||
get |
|||
{ |
|||
return this.nameValueHasField; |
|||
} |
|||
set |
|||
{ |
|||
this.nameValueHasField = value; |
|||
} |
|||
} |
|||
} |
|||
} |
|||
namespace UFSoft.UBF.Exceptions |
|||
{ |
|||
using System.Runtime.Serialization; |
|||
|
|||
|
|||
[System.Diagnostics.DebuggerStepThroughAttribute()] |
|||
[System.CodeDom.Compiler.GeneratedCodeAttribute("System.Runtime.Serialization", "3.0.0.0")] |
|||
[System.Runtime.Serialization.DataContractAttribute(Name="MessageBase", Namespace="UFSoft.UBF.Exceptions")] |
|||
public partial class MessageBase : object, System.Runtime.Serialization.IExtensibleDataObject |
|||
{ |
|||
|
|||
private System.Runtime.Serialization.ExtensionDataObject extensionDataField; |
|||
|
|||
private string attributeMetadataIDField; |
|||
|
|||
private string attributeNameField; |
|||
|
|||
private string entityFullNameField; |
|||
|
|||
private long entityIDField; |
|||
|
|||
private string entityMetadataIDField; |
|||
|
|||
private short errorLevelField; |
|||
|
|||
private UFSoft.UBF.Exceptions1.MessageBaseFormatState formatedField; |
|||
|
|||
private UFSoft.UBF.Exceptions.MessageBase[] innerMessagesField; |
|||
|
|||
private bool isValidEntityIDField; |
|||
|
|||
private string localMessageField; |
|||
|
|||
private string orginalEntityFullNameField; |
|||
|
|||
public System.Runtime.Serialization.ExtensionDataObject ExtensionData |
|||
{ |
|||
get |
|||
{ |
|||
return this.extensionDataField; |
|||
} |
|||
set |
|||
{ |
|||
this.extensionDataField = value; |
|||
} |
|||
} |
|||
|
|||
[System.Runtime.Serialization.DataMemberAttribute()] |
|||
public string attributeMetadataID |
|||
{ |
|||
get |
|||
{ |
|||
return this.attributeMetadataIDField; |
|||
} |
|||
set |
|||
{ |
|||
this.attributeMetadataIDField = value; |
|||
} |
|||
} |
|||
|
|||
[System.Runtime.Serialization.DataMemberAttribute()] |
|||
public string attributeName |
|||
{ |
|||
get |
|||
{ |
|||
return this.attributeNameField; |
|||
} |
|||
set |
|||
{ |
|||
this.attributeNameField = value; |
|||
} |
|||
} |
|||
|
|||
[System.Runtime.Serialization.DataMemberAttribute()] |
|||
public string entityFullName |
|||
{ |
|||
get |
|||
{ |
|||
return this.entityFullNameField; |
|||
} |
|||
set |
|||
{ |
|||
this.entityFullNameField = value; |
|||
} |
|||
} |
|||
|
|||
[System.Runtime.Serialization.DataMemberAttribute()] |
|||
public long entityID |
|||
{ |
|||
get |
|||
{ |
|||
return this.entityIDField; |
|||
} |
|||
set |
|||
{ |
|||
this.entityIDField = value; |
|||
} |
|||
} |
|||
|
|||
[System.Runtime.Serialization.DataMemberAttribute()] |
|||
public string entityMetadataID |
|||
{ |
|||
get |
|||
{ |
|||
return this.entityMetadataIDField; |
|||
} |
|||
set |
|||
{ |
|||
this.entityMetadataIDField = value; |
|||
} |
|||
} |
|||
|
|||
[System.Runtime.Serialization.DataMemberAttribute()] |
|||
public short errorLevel |
|||
{ |
|||
get |
|||
{ |
|||
return this.errorLevelField; |
|||
} |
|||
set |
|||
{ |
|||
this.errorLevelField = value; |
|||
} |
|||
} |
|||
|
|||
[System.Runtime.Serialization.DataMemberAttribute()] |
|||
public UFSoft.UBF.Exceptions1.MessageBaseFormatState formated |
|||
{ |
|||
get |
|||
{ |
|||
return this.formatedField; |
|||
} |
|||
set |
|||
{ |
|||
this.formatedField = value; |
|||
} |
|||
} |
|||
|
|||
[System.Runtime.Serialization.DataMemberAttribute()] |
|||
public UFSoft.UBF.Exceptions.MessageBase[] innerMessages |
|||
{ |
|||
get |
|||
{ |
|||
return this.innerMessagesField; |
|||
} |
|||
set |
|||
{ |
|||
this.innerMessagesField = value; |
|||
} |
|||
} |
|||
|
|||
[System.Runtime.Serialization.DataMemberAttribute()] |
|||
public bool isValidEntityID |
|||
{ |
|||
get |
|||
{ |
|||
return this.isValidEntityIDField; |
|||
} |
|||
set |
|||
{ |
|||
this.isValidEntityIDField = value; |
|||
} |
|||
} |
|||
|
|||
[System.Runtime.Serialization.DataMemberAttribute()] |
|||
public string localMessage |
|||
{ |
|||
get |
|||
{ |
|||
return this.localMessageField; |
|||
} |
|||
set |
|||
{ |
|||
this.localMessageField = value; |
|||
} |
|||
} |
|||
|
|||
[System.Runtime.Serialization.DataMemberAttribute()] |
|||
public string orginalEntityFullName |
|||
{ |
|||
get |
|||
{ |
|||
return this.orginalEntityFullNameField; |
|||
} |
|||
set |
|||
{ |
|||
this.orginalEntityFullNameField = value; |
|||
} |
|||
} |
|||
} |
|||
} |
|||
namespace UFSoft.UBF.Exceptions1 |
|||
{ |
|||
using System.Runtime.Serialization; |
|||
|
|||
|
|||
[System.CodeDom.Compiler.GeneratedCodeAttribute("System.Runtime.Serialization", "3.0.0.0")] |
|||
[System.Runtime.Serialization.DataContractAttribute(Name="MessageBase.FormatState", Namespace="http://schemas.datacontract.org/2004/07/UFSoft.UBF.Exceptions")] |
|||
public enum MessageBaseFormatState : uint |
|||
{ |
|||
|
|||
[System.Runtime.Serialization.EnumMemberAttribute()] |
|||
None = 0, |
|||
|
|||
[System.Runtime.Serialization.EnumMemberAttribute()] |
|||
Formatting = 1, |
|||
|
|||
[System.Runtime.Serialization.EnumMemberAttribute()] |
|||
Formatted = 2, |
|||
} |
|||
} |
|||
|
|||
|
|||
[System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "3.0.0.0")] |
|||
[System.ServiceModel.ServiceContractAttribute(Name="UFIDA.U9.PM.Rcv.IRcvApprovedSV", Namespace="http://www.UFIDA.org", ConfigurationName="UFIDAU9PMRcvIRcvApprovedSV")] |
|||
public interface UFIDAU9PMRcvIRcvApprovedSV |
|||
{ |
|||
|
|||
[System.ServiceModel.OperationContractAttribute(Action="http://www.UFIDA.org/UFIDA.U9.PM.Rcv.IRcvApprovedSV/Do", ReplyAction="http://www.UFIDA.org/UFIDA.U9.PM.Rcv.IRcvApprovedSV/DoResponse")] |
|||
[System.ServiceModel.FaultContractAttribute(typeof(UFSoft.UBF.Service.ServiceLostException), Action="http://www.UFIDA.org/UFIDA.U9.PM.Rcv.IRcvApprovedSV/DoServiceLostExceptionFault", Name="ServiceLostException", Namespace="http://schemas.datacontract.org/2004/07/UFSoft.UBF.Service")] |
|||
[System.ServiceModel.FaultContractAttribute(typeof(UFSoft.UBF.Service.ServiceException), Action="http://www.UFIDA.org/UFIDA.U9.PM.Rcv.IRcvApprovedSV/DoServiceExceptionFault", Name="ServiceException", Namespace="http://schemas.datacontract.org/2004/07/UFSoft.UBF.Service")] |
|||
[System.ServiceModel.FaultContractAttribute(typeof(UFSoft.UBF.Service.ServiceExceptionDetail), Action="http://www.UFIDA.org/UFIDA.U9.PM.Rcv.IRcvApprovedSV/DoServiceExceptionDetailFault" + |
|||
"", Name="ServiceExceptionDetail", Namespace="http://schemas.datacontract.org/2004/07/UFSoft.UBF.Service")] |
|||
[System.ServiceModel.FaultContractAttribute(typeof(UFSoft.UBF.ExceptionBase), Action="http://www.UFIDA.org/UFIDA.U9.PM.Rcv.IRcvApprovedSV/DoExceptionBaseFault", Name="ExceptionBase", Namespace="http://schemas.datacontract.org/2004/07/UFSoft.UBF")] |
|||
[System.ServiceModel.FaultContractAttribute(typeof(System.Exception), Action="http://www.UFIDA.org/UFIDA.U9.PM.Rcv.IRcvApprovedSV/DoExceptionFault", Name="Exception", Namespace="http://schemas.datacontract.org/2004/07/System")] |
|||
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(UFSoft.UBF.PL.ObjectKeyX))] |
|||
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(System.ServiceModel.ExceptionDetail))] |
|||
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(UFSoft.UBF.ExceptionBase))] |
|||
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(UFSoft.UBF.ErrorMessage))] |
|||
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(UFSoft.UBF.ErrorDescriptor))] |
|||
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(UFSoft.UBF.ErrorLevel))] |
|||
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(UFSoft.UBF.ErrorMessage[]))] |
|||
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(UFSoft.UBF.UnknownException))] |
|||
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(UFSoft.UBF.ExceptionBase.FormatState))] |
|||
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(UFSoft.UBF.Util.Context.PlatformContext))] |
|||
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(UFSoft.UBF.Util.Context.ApplicationContext))] |
|||
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(UFSoft.UBF.Util.Context.ThreadContext))] |
|||
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(System.Collections.Generic.Dictionary<object, object>))] |
|||
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(UFSoft.UBF.Business.BusinessException))] |
|||
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(UFSoft.UBF.Business.AttrsContainerException))] |
|||
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(UFSoft.UBF.Business.AttributeInValidException))] |
|||
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(UFSoft.UBF.Business.EntityNotExistException))] |
|||
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(UFSoft.UBF.Service.ServiceLostException))] |
|||
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(UFSoft.UBF.Service.ServiceException))] |
|||
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(UFSoft.UBF.Service.ServiceExceptionDetail))] |
|||
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(System.Exception))] |
|||
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(System.Exception[]))] |
|||
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(UFSoft.UBF.Exceptions.MessageBase))] |
|||
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(UFSoft.UBF.Exceptions.MessageBase[]))] |
|||
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(UFSoft.UBF.Exceptions1.MessageBaseFormatState))] |
|||
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(UFSoft.UBF.Business.BusinessEntity.EntityKey))] |
|||
[return: System.ServiceModel.MessageParameterAttribute(Name="outMessages")] |
|||
UFSoft.UBF.Exceptions.MessageBase[] Do(object context, int actType, UFSoft.UBF.Business.BusinessEntity.EntityKey docHead); |
|||
} |
|||
|
|||
[System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "3.0.0.0")] |
|||
public interface UFIDAU9PMRcvIRcvApprovedSVChannel : UFIDAU9PMRcvIRcvApprovedSV, System.ServiceModel.IClientChannel |
|||
{ |
|||
} |
|||
|
|||
[System.Diagnostics.DebuggerStepThroughAttribute()] |
|||
[System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "3.0.0.0")] |
|||
public partial class UFIDAU9PMRcvIRcvApprovedSVClient : System.ServiceModel.ClientBase<UFIDAU9PMRcvIRcvApprovedSV>, UFIDAU9PMRcvIRcvApprovedSV |
|||
{ |
|||
|
|||
public UFIDAU9PMRcvIRcvApprovedSVClient() |
|||
{ |
|||
} |
|||
|
|||
public UFIDAU9PMRcvIRcvApprovedSVClient(string endpointConfigurationName) : |
|||
base(endpointConfigurationName) |
|||
{ |
|||
} |
|||
|
|||
public UFIDAU9PMRcvIRcvApprovedSVClient(string endpointConfigurationName, string remoteAddress) : |
|||
base(endpointConfigurationName, remoteAddress) |
|||
{ |
|||
} |
|||
|
|||
public UFIDAU9PMRcvIRcvApprovedSVClient(string endpointConfigurationName, System.ServiceModel.EndpointAddress remoteAddress) : |
|||
base(endpointConfigurationName, remoteAddress) |
|||
{ |
|||
} |
|||
|
|||
public UFIDAU9PMRcvIRcvApprovedSVClient(System.ServiceModel.Channels.Binding binding, System.ServiceModel.EndpointAddress remoteAddress) : |
|||
base(binding, remoteAddress) |
|||
{ |
|||
} |
|||
|
|||
public UFSoft.UBF.Exceptions.MessageBase[] Do(object context, int actType, UFSoft.UBF.Business.BusinessEntity.EntityKey docHead) |
|||
{ |
|||
return base.Channel.Do(context, actType, docHead); |
|||
} |
|||
} |
@ -0,0 +1,29 @@ |
|||
<?xml version="1.0" encoding="utf-8"?> |
|||
<configuration> |
|||
<system.serviceModel> |
|||
<bindings> |
|||
<basicHttpBinding> |
|||
<binding name="BasicHttpBinding_UFIDA.U9.PM.Rcv.IRcvApprovedSV" |
|||
closeTimeout="00:01:00" openTimeout="00:01:00" receiveTimeout="00:10:00" |
|||
sendTimeout="00:01:00" allowCookies="false" bypassProxyOnLocal="false" |
|||
hostNameComparisonMode="StrongWildcard" maxBufferSize="65536" |
|||
maxBufferPoolSize="524288" maxReceivedMessageSize="65536" |
|||
messageEncoding="Text" textEncoding="utf-8" transferMode="Buffered" |
|||
useDefaultWebProxy="true"> |
|||
<readerQuotas maxDepth="32" maxStringContentLength="8192" maxArrayLength="16384" |
|||
maxBytesPerRead="4096" maxNameTableCharCount="16384" /> |
|||
<security mode="None"> |
|||
<transport clientCredentialType="None" proxyCredentialType="None" |
|||
realm="" /> |
|||
<message clientCredentialType="UserName" algorithmSuite="Default" /> |
|||
</security> |
|||
</binding> |
|||
</basicHttpBinding> |
|||
</bindings> |
|||
<client> |
|||
<endpoint address="http://192.168.0.100/U9/Services/UFIDA.U9.PM.Rcv.IRcvApprovedSV.svc" |
|||
binding="basicHttpBinding" bindingConfiguration="BasicHttpBinding_UFIDA.U9.PM.Rcv.IRcvApprovedSV" |
|||
contract="UFIDAU9PMRcvIRcvApprovedSV" name="BasicHttpBinding_UFIDA.U9.PM.Rcv.IRcvApprovedSV" /> |
|||
</client> |
|||
</system.serviceModel> |
|||
</configuration> |
1349
ICSSoft.U9ERP.WebAPI/ICSSoft.APICreateIssue/CreatRecedeIssueDocSVStub.cs
File diff suppressed because it is too large
View File
File diff suppressed because it is too large
View File
@ -0,0 +1,342 @@ |
|||
using ICSSoft.Common; |
|||
using System; |
|||
using System.Collections.Generic; |
|||
using System.Configuration; |
|||
using System.Data; |
|||
using System.Data.SqlClient; |
|||
using System.Linq; |
|||
using System.Text; |
|||
using System.Threading.Tasks; |
|||
using ICSSoft.Entity; |
|||
using UFSoft.UBF.Util.Context; |
|||
using System.ServiceModel; |
|||
using UFSoft.UBF.Service; |
|||
using UFSoft.UBF.Exceptions; |
|||
using www.ufida.org.EntityData; |
|||
using ICSSoft.APICreateLotMaster; |
|||
using ICSSoft.APIApproveIssue; |
|||
using ICSSoft.APIDeleteIssue; |
|||
using ICSSoft.ASKDataProject; |
|||
|
|||
namespace ICSSoft.APICreateIssue |
|||
{ |
|||
public class CreateIssue |
|||
{ |
|||
private static log4net.ILog log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); |
|||
private static string connString = System.Configuration.ConfigurationManager.AppSettings["ERPConnStr"]; |
|||
private static string ERPDB = System.Configuration.ConfigurationManager.AppSettings["ERPDB"]; |
|||
|
|||
public string Create(List<ICSMOIssueDocNegative> infos) |
|||
{ |
|||
DataSet ds = null; |
|||
string msg = ""; |
|||
ThreadContext context = new ThreadContext(); |
|||
try |
|||
{ |
|||
string _MOCode = string.Empty; |
|||
UFIDAU9ISVMOICreatRecedeIssueDocSVClient client = new UFIDAU9ISVMOICreatRecedeIssueDocSVClient(); |
|||
MessageBase[] message = null; |
|||
List<UFIDAU9ISVMORecedeItemAndSnDTOData> molist = new List<UFIDAU9ISVMORecedeItemAndSnDTOData>(); |
|||
UFIDAU9ISVMORecedeItemAndSnDTOData mo = new UFIDAU9ISVMORecedeItemAndSnDTOData(); |
|||
|
|||
UFIDAU9CBOPubControllerCommonArchiveDataDTOData docType = new UFIDAU9CBOPubControllerCommonArchiveDataDTOData(); |
|||
|
|||
string OrgID = ""; |
|||
string orgsql = @"select ID from Base_Organization
|
|||
where Code='{0}'";
|
|||
orgsql = string.Format(orgsql, infos[0].WorkPoint); |
|||
DataTable orgdt = DBHelper.Query(orgsql, connString); |
|||
if (orgdt.Rows.Count != 0) |
|||
{ |
|||
OrgID = orgdt.Rows[0]["ID"].ToString(); |
|||
} |
|||
else |
|||
{ |
|||
throw new Exception("组织编码:" + infos[0].WorkPoint + "不存在!"); |
|||
} |
|||
foreach (ICSMOIssueDocNegative model in infos) |
|||
{ |
|||
if (!string.IsNullOrWhiteSpace(model.SourceCode)) |
|||
{ |
|||
string LLID = ""; |
|||
string llsql = @"select ID from MO_IssueDoc
|
|||
where DocNo='{0}' And Org='{1}'";
|
|||
llsql = string.Format(llsql, model.SourceCode, OrgID); |
|||
DataTable lldt = DBHelper.Query(llsql, connString); |
|||
if (lldt.Rows.Count > 0) |
|||
{ |
|||
LLID = lldt.Rows[0]["ID"].ToString(); |
|||
} |
|||
else |
|||
{ |
|||
throw new Exception("领料单:" + model.SourceCode + "不存在!"); |
|||
} |
|||
#region 遍历入参LL单行
|
|||
foreach (var item in model.details) |
|||
{ |
|||
mo = new UFIDAU9ISVMORecedeItemAndSnDTOData(); |
|||
long lllineID = 0; |
|||
llsql = @"select ID,IsIssued from MO_IssueDocLine
|
|||
where ID='{0}'";
|
|||
llsql = string.Format(llsql, item.SourceDetailID); |
|||
lldt = DBHelper.Query(llsql, connString); |
|||
if (lldt.Rows.Count > 0) |
|||
{ |
|||
if (lldt.Rows[0]["IsIssued"].ToString() != "True" && lldt.Rows[0]["IsIssued"].ToString() != "true") |
|||
{ |
|||
throw new Exception("领料单:'" + model.SourceCode + "'对应领料单行:'" + item.Sequence + "'未进行发料确认,不能退料!"); |
|||
} |
|||
else |
|||
{ |
|||
lllineID = long.Parse(lldt.Rows[0]["ID"].ToString()); |
|||
} |
|||
} |
|||
else |
|||
{ |
|||
throw new Exception("领料单:'" + model.SourceCode + "'对应领料单行:'" + item.Sequence + "'不存在!"); |
|||
} |
|||
|
|||
mo.m_issueDocLine = lllineID; |
|||
string strCcode = item.InvCode; //子料
|
|||
|
|||
string strWhCode = string.Empty; //仓库
|
|||
string _strWhID = string.Empty;//仓库ID
|
|||
|
|||
if (!string.IsNullOrWhiteSpace(strCcode)) |
|||
{ |
|||
string sqlWH = @"select ID,Code from CBO_Wh
|
|||
WHERE Code='" + model.WHCode + "' AND Org='" + OrgID + "'";
|
|||
sqlWH = string.Format(sqlWH); |
|||
DataTable _dtWH = DBHelper.Query(sqlWH, connString); |
|||
if (_dtWH.Rows.Count == 0) |
|||
{ |
|||
throw new Exception("没有仓库信:" + model.WHCode + "信息!"); |
|||
} |
|||
else |
|||
{ |
|||
strWhCode = _dtWH.Rows[0]["Code"].ToString(); |
|||
_strWhID = _dtWH.Rows[0]["ID"].ToString(); |
|||
mo.m_whCode = strWhCode; |
|||
mo.m_wh = long.Parse(_strWhID); |
|||
} |
|||
} |
|||
else |
|||
{ |
|||
throw new Exception("没有子料信息"); |
|||
} |
|||
string sqlINV = @"select ID,Code from CBO_ItemMaster
|
|||
WHERE Code='" + item.InvCode + "' AND Org='" + OrgID + "'";
|
|||
sqlINV = string.Format(sqlINV); |
|||
DataTable _dtINV = DBHelper.Query(sqlINV, connString); |
|||
if (_dtINV.Rows.Count == 0) |
|||
{ |
|||
throw new Exception("料品编码:" + item.InvCode + "不存在!"); |
|||
} |
|||
|
|||
mo.m_recedeQty = item.Quantity; |
|||
mo.m_itemCode = item.InvCode; |
|||
mo.m_recedeReason = 3; |
|||
#region 创建批号接口调用
|
|||
string LotID = ""; |
|||
if (item.BatchCode != "") |
|||
{ |
|||
CreateLotMaster LotMasterCreate = new CreateLotMaster(); |
|||
string lotWHCode = model.WHCode; |
|||
string lotItemCode = item.InvCode; |
|||
string LotCode = item.BatchCode; |
|||
LotMasterCreate.Create(lotWHCode, lotItemCode, LotCode, OrgID, ref LotID); |
|||
if (LotID != "") |
|||
{ |
|||
mo.m_lotMaster = long.Parse(LotID); |
|||
mo.m_lotNo = item.BatchCode; |
|||
} |
|||
} |
|||
else |
|||
{ |
|||
mo.m_lotNo = ""; |
|||
} |
|||
#endregion
|
|||
molist.Add(mo); |
|||
} |
|||
|
|||
#endregion
|
|||
} |
|||
else |
|||
{ |
|||
throw new Exception("传入领料单号为空!"); |
|||
} |
|||
docType.m_code = "2"; |
|||
} |
|||
context = CreateContextObj(OrgID); |
|||
string[] _result = null; |
|||
_result = client.Do(out message, context, molist.ToArray(), false, docType); |
|||
List<string> LLCodeList = new List<string>(); |
|||
string DocNOList = ""; |
|||
if (_result != null && _result.Count() > 0) |
|||
{ |
|||
for (int i = 0; i < _result.Count(); i++) |
|||
{ |
|||
LLCodeList.Add(_result[i].ToString()); |
|||
if (DocNOList == "") |
|||
{ |
|||
DocNOList = "'" + _result[i].ToString() + "'"; |
|||
} |
|||
else |
|||
{ |
|||
DocNOList += ",'" + _result[i].ToString() + "'"; |
|||
} |
|||
} |
|||
} |
|||
if (LLCodeList != null) |
|||
{ |
|||
ApproveIssue sh = new ApproveIssue(); |
|||
bool approveresult = sh.Approve(LLCodeList, infos[0].WorkPoint); |
|||
if (approveresult == true) |
|||
{ |
|||
#region 查询
|
|||
string sql = @"select DISTINCT a.ID as ID,a.ID as IDs,e.DocNo as SourceCode,
|
|||
a.DocNo as IssueNEGCode,f.Code AS cDepCode,g.Name AS cDepName,h.Code AS cWhCode |
|||
,i.Name AS cWhName,'' as SourceType,a.CreatedBy as CreateUser,a.CreatedOn as CreateDateTime, |
|||
a.ApproveBy as Checker,a.ApproveOn as CheckDateTime |
|||
from MO_IssueDoc a |
|||
left join MO_IssueDocLine c on c.IssueDoc=a.ID |
|||
left join MO_IssueDocLine d on d.ID=c.SourceIssueDocLine |
|||
left join MO_IssueDoc e on e.ID=d.IssueDoc |
|||
left join CBO_Department f on f.ID=c.IssueDept |
|||
left join CBO_Department_Trl g on g.ID=f.ID |
|||
left join CBO_Wh h on h.ID=c.Wh |
|||
left join CBO_Wh_Trl i on i.ID=h.ID |
|||
WHERE a.DocNo in ({0}) AND a.Org='{1}'";
|
|||
sql = string.Format(sql, DocNOList, OrgID); |
|||
DataTable mdt= DBHelper.Query(sql, connString); |
|||
|
|||
sql = @"select DISTINCT a.ID as IDs,b.ID as DetailID,b.LineNum as Sequence,c.Code as InvCode
|
|||
,b.IssuedQty as Quantity,b.SourceIssueDocLine as SourceDetailID,0 as Amount |
|||
,isnull(d.Code,'') ProjectCode,isnull(e.Code,'') cBatch,'' version ,'' brand, |
|||
'' as cFree1, |
|||
'' as cFree2, |
|||
'' as cFree3, |
|||
'' as cFree4, |
|||
'' as cFree5, |
|||
'' as cFree6, |
|||
'' as cFree7, |
|||
'' as cFree8, |
|||
'' as cFree9, |
|||
'' as cFree10 |
|||
from MO_IssueDoc a |
|||
left join MO_IssueDocLine b on b.IssueDoc=a.ID |
|||
left join CBO_ItemMaster c on c.ID=b.Item |
|||
left join CBO_Project d on d.ID=b.Project |
|||
left join Lot_LotMaster e on e.ID=b.LotMaster |
|||
WHERE a.DocNo in ({0}) AND a.Org='{1}'";
|
|||
sql = string.Format(sql, DocNOList, OrgID); |
|||
DataTable cdt = DBHelper.Query(sql, connString); |
|||
DataTable tempdt1 = mdt.Copy(); |
|||
tempdt1.TableName = "tempdt1"; |
|||
ds.Tables.Add(tempdt1); |
|||
|
|||
DataTable tempdt2 = cdt.Copy(); |
|||
tempdt2.TableName = "tempdt2"; |
|||
ds.Tables.Add(tempdt2); |
|||
|
|||
#endregion
|
|||
} |
|||
else |
|||
{ |
|||
DeleteIssue issuedel = new DeleteIssue(); |
|||
issuedel.Delete(LLCodeList, OrgID); |
|||
throw new Exception("退料单审核失败,创建的退料单已删除!"); |
|||
} |
|||
} |
|||
|
|||
} |
|||
catch (Exception ex) |
|||
{ |
|||
throw new Exception(GetExceptionMessage(ex)); |
|||
} |
|||
msg = JSON.DataSetToJson(ds, "details", "IDs"); |
|||
return msg; |
|||
} |
|||
#region 给上下文信息赋值
|
|||
/// <summary>
|
|||
/// 给上下文信息赋值
|
|||
/// </summary>
|
|||
/// <returns></returns>
|
|||
private static ThreadContext CreateContextObj(string OrgID) |
|||
{ |
|||
// 实例化应用上下文对象
|
|||
ThreadContext thContext = new ThreadContext(); |
|||
|
|||
|
|||
System.Collections.Generic.Dictionary<object, object> ns = new Dictionary<object, object>(); |
|||
ns.Add("OrgID", OrgID); |
|||
ns.Add("UserID", ConfigurationManager.AppSettings["userID"].ToString()); |
|||
ns.Add("UserCode", ConfigurationManager.AppSettings["userCode"].ToString()); |
|||
ns.Add("Datetime", DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss")); |
|||
ns.Add("CultureName", ConfigurationManager.AppSettings["cultureName"].ToString()); |
|||
ns.Add("EnterpriseID", ConfigurationManager.AppSettings["enterpriseID"].ToString()); |
|||
ns.Add("DefaultCultureName", ConfigurationManager.AppSettings["cultureName"].ToString()); |
|||
thContext.nameValueHas = ns; |
|||
|
|||
return thContext; |
|||
} |
|||
#endregion
|
|||
|
|||
private static DataTable GetData(string DocCode, string OrgID) |
|||
{ |
|||
string sql = @" select A.ID,A1.[Code] as [Receivement_RcvDocType_Code],A.Status
|
|||
from PM_Receivement as A |
|||
left join [PM_RcvDocType] as A1 on (A.[RcvDocType] = A1.[ID]) |
|||
left join [PM_RcvDocType_Trl] as A2 on (A2.SysMlFlag = 'zh-CN') and (A1.[ID] = A2.[ID]) |
|||
where A.DocNo='" + DocCode + "' AND A.Org='" + OrgID + "'";
|
|||
return DBHelper.Query(sql, connString); |
|||
} |
|||
#region 提取异常信息
|
|||
/// <summary>
|
|||
/// 提取异常信息
|
|||
/// </summary>
|
|||
/// <param name="ex"></param>
|
|||
private static string GetExceptionMessage(Exception ex) |
|||
{ |
|||
string faultMessage = "未知错误,请查看ERP日志!"; |
|||
|
|||
System.TimeoutException timeoutEx = ex as System.TimeoutException; |
|||
if (timeoutEx != null) |
|||
{ |
|||
faultMessage = "访问服务超时,请修改配置信息!"; |
|||
} |
|||
else |
|||
{ |
|||
FaultException<ServiceException> faultEx = ex as FaultException<ServiceException>; |
|||
if (faultEx == null) |
|||
{ |
|||
faultMessage = ex.Message; |
|||
} |
|||
else |
|||
{ |
|||
ServiceException serviceEx = faultEx.Detail; |
|||
if (serviceEx != null && !string.IsNullOrEmpty(serviceEx.Message) |
|||
&& !serviceEx.Message.Equals("fault", StringComparison.OrdinalIgnoreCase)) |
|||
{ |
|||
// 错误信息在faultEx.Message中,请提取,
|
|||
// 格式为"Fault:料品不能为空,请录入\n 在....."
|
|||
int startIndex = serviceEx.Message.IndexOf(":"); |
|||
int endIndex = serviceEx.Message.IndexOf("\n"); |
|||
if (endIndex == -1) |
|||
endIndex = serviceEx.Message.Length; |
|||
if (endIndex > 0 && endIndex > startIndex + 1) |
|||
{ |
|||
faultMessage = serviceEx.Message.Substring(startIndex + 1, endIndex - startIndex - 1); |
|||
} |
|||
else |
|||
{ |
|||
faultMessage = serviceEx.Message; |
|||
} |
|||
} |
|||
} |
|||
} |
|||
return faultMessage; |
|||
} |
|||
#endregion
|
|||
} |
|||
} |
@ -0,0 +1,98 @@ |
|||
<?xml version="1.0" encoding="utf-8"?> |
|||
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> |
|||
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" /> |
|||
<PropertyGroup> |
|||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> |
|||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> |
|||
<ProjectGuid>{9EEEC30C-0BC8-4875-B094-9B373CA330D3}</ProjectGuid> |
|||
<OutputType>Library</OutputType> |
|||
<AppDesignerFolder>Properties</AppDesignerFolder> |
|||
<RootNamespace>ICSSoft.APICreateIssue</RootNamespace> |
|||
<AssemblyName>ICSSoft.APICreateIssue</AssemblyName> |
|||
<TargetFrameworkVersion>v4.8</TargetFrameworkVersion> |
|||
<FileAlignment>512</FileAlignment> |
|||
<Deterministic>true</Deterministic> |
|||
<SccProjectName> |
|||
</SccProjectName> |
|||
<SccLocalPath> |
|||
</SccLocalPath> |
|||
<SccAuxPath> |
|||
</SccAuxPath> |
|||
<SccProvider> |
|||
</SccProvider> |
|||
<TargetFrameworkProfile /> |
|||
</PropertyGroup> |
|||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> |
|||
<DebugSymbols>true</DebugSymbols> |
|||
<DebugType>full</DebugType> |
|||
<Optimize>false</Optimize> |
|||
<OutputPath>bin\Debug\</OutputPath> |
|||
<DefineConstants>DEBUG;TRACE</DefineConstants> |
|||
<ErrorReport>prompt</ErrorReport> |
|||
<WarningLevel>4</WarningLevel> |
|||
</PropertyGroup> |
|||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> |
|||
<DebugType>pdbonly</DebugType> |
|||
<Optimize>true</Optimize> |
|||
<OutputPath>bin\Release\</OutputPath> |
|||
<DefineConstants>TRACE</DefineConstants> |
|||
<ErrorReport>prompt</ErrorReport> |
|||
<WarningLevel>4</WarningLevel> |
|||
</PropertyGroup> |
|||
<ItemGroup> |
|||
<Reference Include="log4net, Version=2.0.8.0, Culture=neutral, PublicKeyToken=669e0ddf0bb1aa2a, processorArchitecture=MSIL"> |
|||
<SpecificVersion>False</SpecificVersion> |
|||
<HintPath>..\ICSSoft.ERP.WebAPI\bin\log4net.dll</HintPath> |
|||
</Reference> |
|||
<Reference Include="Newtonsoft.Json, Version=6.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL"> |
|||
<SpecificVersion>False</SpecificVersion> |
|||
<HintPath>bin\Debug\Newtonsoft.Json.dll</HintPath> |
|||
</Reference> |
|||
<Reference Include="System" /> |
|||
<Reference Include="System.Configuration" /> |
|||
<Reference Include="System.Core" /> |
|||
<Reference Include="System.Runtime.Serialization" /> |
|||
<Reference Include="System.ServiceModel" /> |
|||
<Reference Include="System.Xml.Linq" /> |
|||
<Reference Include="System.Data.DataSetExtensions" /> |
|||
<Reference Include="Microsoft.CSharp" /> |
|||
<Reference Include="System.Data" /> |
|||
<Reference Include="System.Net.Http" /> |
|||
<Reference Include="System.Xml" /> |
|||
</ItemGroup> |
|||
<ItemGroup> |
|||
<Compile Include="CreatRecedeIssueDocSVStub.cs" /> |
|||
<Compile Include="Properties\AssemblyInfo.cs" /> |
|||
<Compile Include="CreateIssue.cs" /> |
|||
</ItemGroup> |
|||
<ItemGroup> |
|||
<ProjectReference Include="..\ICSSoft.APIApproveIssue\ICSSoft.APIApproveIssue.csproj"> |
|||
<Project>{8666c3ea-95f9-4e97-a899-60ecc3ffddae}</Project> |
|||
<Name>ICSSoft.APIApproveIssue</Name> |
|||
</ProjectReference> |
|||
<ProjectReference Include="..\ICSSoft.APICreateLotMaster\ICSSoft.APICreateLotMaster.csproj"> |
|||
<Project>{e043ee69-8524-4ea5-861e-44fa9a64b410}</Project> |
|||
<Name>ICSSoft.APICreateLotMaster</Name> |
|||
</ProjectReference> |
|||
<ProjectReference Include="..\ICSSoft.APIDeleteIssue\ICSSoft.APIDeleteIssue.csproj"> |
|||
<Project>{147fca78-535b-4f46-9049-19842e903e78}</Project> |
|||
<Name>ICSSoft.APIDeleteIssue</Name> |
|||
</ProjectReference> |
|||
<ProjectReference Include="..\ICSSoft.ASKDataProject\ICSSoft.ASKDataProject.csproj"> |
|||
<Project>{b7b41ddb-e04c-4b09-82c5-e458d188294f}</Project> |
|||
<Name>ICSSoft.ASKDataProject</Name> |
|||
</ProjectReference> |
|||
<ProjectReference Include="..\ICSSoft.Common\ICSSoft.Common.csproj"> |
|||
<Project>{ee45f7a5-17ee-4707-a617-8c00dd36fc01}</Project> |
|||
<Name>ICSSoft.Common</Name> |
|||
</ProjectReference> |
|||
<ProjectReference Include="..\ICSSoft.Entity\ICSSoft.Entity.csproj"> |
|||
<Project>{834E9A76-1D9E-4EBD-9321-0B362A06A367}</Project> |
|||
<Name>ICSSoft.Entity</Name> |
|||
</ProjectReference> |
|||
</ItemGroup> |
|||
<ItemGroup> |
|||
<None Include="output.config" /> |
|||
</ItemGroup> |
|||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> |
|||
</Project> |
@ -0,0 +1,37 @@ |
|||
using System.Reflection; |
|||
using System.Runtime.CompilerServices; |
|||
using System.Runtime.InteropServices; |
|||
|
|||
// 有关程序集的一般信息由以下
|
|||
// 控制。更改这些特性值可修改
|
|||
// 与程序集关联的信息。
|
|||
[assembly: AssemblyTitle("ICSSoft.Common")] |
|||
[assembly: AssemblyDescription("")] |
|||
[assembly: AssemblyConfiguration("")] |
|||
[assembly: AssemblyCompany("")] |
|||
[assembly: AssemblyProduct("ICSSoft.Common")] |
|||
[assembly: AssemblyCopyright("Copyright © 2019")] |
|||
[assembly: AssemblyTrademark("")] |
|||
[assembly: AssemblyCulture("")] |
|||
|
|||
// 将 ComVisible 设置为 false 会使此程序集中的类型
|
|||
//对 COM 组件不可见。如果需要从 COM 访问此程序集中的类型
|
|||
//请将此类型的 ComVisible 特性设置为 true。
|
|||
[assembly: ComVisible(false)] |
|||
|
|||
// 如果此项目向 COM 公开,则下列 GUID 用于类型库的 ID
|
|||
[assembly: Guid("ee45f7a5-17ee-4707-a617-8c00dd36fc01")] |
|||
|
|||
// 程序集的版本信息由下列四个值组成:
|
|||
//
|
|||
// 主版本
|
|||
// 次版本
|
|||
// 生成号
|
|||
// 修订号
|
|||
//
|
|||
// 可以指定所有值,也可以使用以下所示的 "*" 预置版本号和修订号
|
|||
//通过使用 "*",如下所示:
|
|||
// [assembly: AssemblyVersion("1.0.*")]
|
|||
[assembly: AssemblyVersion("1.0.0.0")] |
|||
[assembly: AssemblyFileVersion("1.0.0.0")] |
|||
[assembly: log4net.Config.XmlConfigurator(ConfigFile = "log4.xml", Watch = true)] |
@ -0,0 +1,29 @@ |
|||
<?xml version="1.0" encoding="utf-8"?> |
|||
<configuration> |
|||
<system.serviceModel> |
|||
<bindings> |
|||
<basicHttpBinding> |
|||
<binding name="BasicHttpBinding_UFIDA.U9.ISV.MO.ICreatRecedeIssueDocSV" |
|||
closeTimeout="00:01:00" openTimeout="00:01:00" receiveTimeout="00:10:00" |
|||
sendTimeout="00:01:00" allowCookies="false" bypassProxyOnLocal="false" |
|||
hostNameComparisonMode="StrongWildcard" maxBufferSize="65536" |
|||
maxBufferPoolSize="524288" maxReceivedMessageSize="65536" |
|||
messageEncoding="Text" textEncoding="utf-8" transferMode="Buffered" |
|||
useDefaultWebProxy="true"> |
|||
<readerQuotas maxDepth="32" maxStringContentLength="8192" maxArrayLength="16384" |
|||
maxBytesPerRead="4096" maxNameTableCharCount="16384" /> |
|||
<security mode="None"> |
|||
<transport clientCredentialType="None" proxyCredentialType="None" |
|||
realm="" /> |
|||
<message clientCredentialType="UserName" algorithmSuite="Default" /> |
|||
</security> |
|||
</binding> |
|||
</basicHttpBinding> |
|||
</bindings> |
|||
<client> |
|||
<endpoint address="http://192.168.0.100/U9/Services/UFIDA.U9.ISV.MO.ICreatRecedeIssueDocSV.svc" |
|||
binding="basicHttpBinding" bindingConfiguration="BasicHttpBinding_UFIDA.U9.ISV.MO.ICreatRecedeIssueDocSV" |
|||
contract="UFIDAU9ISVMOICreatRecedeIssueDocSV" name="BasicHttpBinding_UFIDA.U9.ISV.MO.ICreatRecedeIssueDocSV" /> |
|||
</client> |
|||
</system.serviceModel> |
|||
</configuration> |
2585
ICSSoft.U9ERP.WebAPI/ICSSoft.APICreateLotMaster/CommonCreateLotMasterSRVStub.cs
File diff suppressed because it is too large
View File
File diff suppressed because it is too large
View File
@ -0,0 +1,186 @@ |
|||
using ICSSoft.Common; |
|||
using System; |
|||
using System.Collections.Generic; |
|||
using System.Configuration; |
|||
using System.Data; |
|||
using System.Data.SqlClient; |
|||
using System.Linq; |
|||
using System.Text; |
|||
using System.Threading.Tasks; |
|||
using ICSSoft.Entity; |
|||
using UFSoft.UBF.Util.Context; |
|||
using System.ServiceModel; |
|||
using www.ufida.org.EntityData; |
|||
using UFSoft.UBF.Exceptions1; |
|||
using UFSoft.UBF.Service; |
|||
|
|||
namespace ICSSoft.APICreateLotMaster |
|||
{ |
|||
public class CreateLotMaster |
|||
{ |
|||
private static log4net.ILog log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); |
|||
private static string connString = System.Configuration.ConfigurationManager.AppSettings["ERPConnStr"]; |
|||
private static string ERPDB = System.Configuration.ConfigurationManager.AppSettings["ERPDB"]; |
|||
|
|||
public OperationResule Create(string WHCode, string ItemCode, string LotNo, string OrgID, ref string LotID) |
|||
{ |
|||
//U9.PM.PO.POShipLine.CreatePOShipLineDefault();
|
|||
#region 服务调用框架结构
|
|||
//实例化代理类 UFIDAU9ISVItemIBatchCreateItemByDTOSRVClient
|
|||
|
|||
UFIDAU9ISVCBOLotICommonCreateLotMasterSRVClient client = new UFIDAU9ISVCBOLotICommonCreateLotMasterSRVClient(); |
|||
//服务返回结果
|
|||
UFIDAU9BaseDTOsIDCodeNameDTOData[] returnItems; |
|||
//返回异常信息,目前还没有使用此属性
|
|||
UFSoft.UBF.Exceptions1.MessageBase[] returnMsg; |
|||
//上下文信息
|
|||
object context; |
|||
//传入 参数
|
|||
//;
|
|||
OperationResule result = new OperationResule(); |
|||
string[] splitBy = new string[] { }; |
|||
UFIDAU9ISVCBOLotCreateLotMasterDTOData[] createLotMasterDTOList = new UFIDAU9ISVCBOLotCreateLotMasterDTOData[] { }; |
|||
List<UFIDAU9ISVCBOLotCreateLotMasterDTOData> list = new List<UFIDAU9ISVCBOLotCreateLotMasterDTOData>(); |
|||
|
|||
UFIDAU9ISVCBOLotCreateLotMasterDTOData _model = new UFIDAU9ISVCBOLotCreateLotMasterDTOData(); |
|||
_model.m_lotCode = LotNo;//批号
|
|||
_model.m_item = new UFIDAU9CBOPubControllerCommonArchiveDataDTOData(); |
|||
_model.m_item.m_code = ItemCode;//料品
|
|||
_model.m_usedToOrg = new UFIDAU9CBOPubControllerCommonArchiveDataDTOData(); |
|||
_model.m_usedToOrg.m_iD = long.Parse(OrgID); |
|||
//_model.m_lotDisabledTime = Convert.ToDateTime("9999.12.31");
|
|||
|
|||
list.Add(_model); |
|||
createLotMasterDTOList = list.ToArray(); |
|||
|
|||
try |
|||
{ |
|||
//给上下文信息赋值
|
|||
context = CreateContextObj(OrgID); |
|||
//给传入参数赋值
|
|||
//pOList = SetrCVDtos( rCVInfoList);
|
|||
//服务调用
|
|||
|
|||
(client.Endpoint.Binding as BasicHttpBinding).MaxReceivedMessageSize = int.MaxValue; |
|||
(client.Endpoint.Binding as BasicHttpBinding).MaxBufferSize = int.MaxValue; |
|||
returnItems = client.Do(out returnMsg, context, createLotMasterDTOList); |
|||
foreach (var item in returnItems) |
|||
{ |
|||
long id = item.m_iD; |
|||
string sql = @"SELECT lotcode from Lot_LotMaster WHERE ID={0}"; |
|||
sql = string.Format(sql, id); |
|||
DataTable _dtlotcode = DBHelper.Query(sql, connString); |
|||
string lotcode = string.Empty; |
|||
if (_dtlotcode != null && _dtlotcode.Rows.Count > 0) |
|||
{ |
|||
lotcode = _dtlotcode.Rows[0][0].ToString(); |
|||
} |
|||
result.DocNo = lotcode; |
|||
result.IsSuccess = true; |
|||
LotID = id.ToString(); |
|||
result.Message = "创建库存批号成功"; |
|||
} |
|||
|
|||
return result; |
|||
} |
|||
catch (Exception ex) |
|||
{ |
|||
//异常信息捕获
|
|||
|
|||
string Message = GetExceptionMessage(ex); |
|||
result.DocNo = ""; |
|||
result.IsSuccess = false; |
|||
result.Message = Message; |
|||
return result; |
|||
} |
|||
#endregion
|
|||
} |
|||
#region 给上下文信息赋值
|
|||
/// <summary>
|
|||
/// 给上下文信息赋值
|
|||
/// </summary>
|
|||
/// <returns></returns>
|
|||
private static ThreadContext CreateContextObj(string OrgID) |
|||
{ |
|||
// 实例化应用上下文对象
|
|||
ThreadContext thContext = new ThreadContext(); |
|||
|
|||
|
|||
System.Collections.Generic.Dictionary<object, object> ns = new Dictionary<object, object>(); |
|||
ns.Add("OrgID", OrgID); |
|||
ns.Add("UserID", ConfigurationManager.AppSettings["userID"].ToString()); |
|||
ns.Add("UserCode", ConfigurationManager.AppSettings["userCode"].ToString()); |
|||
ns.Add("Datetime", DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss")); |
|||
ns.Add("CultureName", ConfigurationManager.AppSettings["cultureName"].ToString()); |
|||
ns.Add("EnterpriseID", ConfigurationManager.AppSettings["enterpriseID"].ToString()); |
|||
ns.Add("DefaultCultureName", ConfigurationManager.AppSettings["cultureName"].ToString()); |
|||
thContext.nameValueHas = ns; |
|||
|
|||
return thContext; |
|||
} |
|||
#endregion
|
|||
|
|||
private static DataTable GetData(string DocCode, string OrgID) |
|||
{ |
|||
string sql = @" select ID,DocNo
|
|||
from MO_IssueDoc |
|||
where DocNo='" + DocCode + "' AND Org='" + OrgID + "'";
|
|||
return DBHelper.Query(sql, connString); |
|||
} |
|||
|
|||
#region 提取异常信息
|
|||
/// <summary>
|
|||
/// 提取异常信息
|
|||
/// </summary>
|
|||
/// <param name="ex"></param>
|
|||
private static string GetExceptionMessage(Exception ex) |
|||
{ |
|||
string faultMessage = "未知错误,请查看ERP日志!"; |
|||
|
|||
System.TimeoutException timeoutEx = ex as System.TimeoutException; |
|||
if (timeoutEx != null) |
|||
{ |
|||
faultMessage = "访问服务超时,请修改配置信息!"; |
|||
} |
|||
else |
|||
{ |
|||
FaultException<ServiceException> faultEx = ex as FaultException<ServiceException>; |
|||
if (faultEx == null) |
|||
{ |
|||
faultMessage = ex.Message; |
|||
} |
|||
else |
|||
{ |
|||
ServiceException serviceEx = faultEx.Detail; |
|||
if (serviceEx != null && !string.IsNullOrEmpty(serviceEx.Message) |
|||
&& !serviceEx.Message.Equals("fault", StringComparison.OrdinalIgnoreCase)) |
|||
{ |
|||
// 错误信息在faultEx.Message中,请提取,
|
|||
// 格式为"Fault:料品不能为空,请录入\n 在....."
|
|||
int startIndex = serviceEx.Message.IndexOf(":"); |
|||
int endIndex = serviceEx.Message.IndexOf("\n"); |
|||
if (endIndex == -1) |
|||
endIndex = serviceEx.Message.Length; |
|||
if (endIndex > 0 && endIndex > startIndex + 1) |
|||
{ |
|||
faultMessage = serviceEx.Message.Substring(startIndex + 1, endIndex - startIndex - 1); |
|||
} |
|||
else |
|||
{ |
|||
faultMessage = serviceEx.Message; |
|||
} |
|||
} |
|||
} |
|||
} |
|||
return faultMessage; |
|||
} |
|||
#endregion
|
|||
|
|||
public class OperationResule |
|||
{ |
|||
public string DocNo { get; set; } |
|||
public bool IsSuccess { get; set; } |
|||
public string Message { get; set; } |
|||
} |
|||
} |
|||
} |
@ -0,0 +1,82 @@ |
|||
<?xml version="1.0" encoding="utf-8"?> |
|||
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> |
|||
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" /> |
|||
<PropertyGroup> |
|||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> |
|||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> |
|||
<ProjectGuid>{E043EE69-8524-4EA5-861E-44FA9A64B410}</ProjectGuid> |
|||
<OutputType>Library</OutputType> |
|||
<AppDesignerFolder>Properties</AppDesignerFolder> |
|||
<RootNamespace>ICSSoft.APICreateLotMaster</RootNamespace> |
|||
<AssemblyName>ICSSoft.APICreateLotMaster</AssemblyName> |
|||
<TargetFrameworkVersion>v4.8</TargetFrameworkVersion> |
|||
<FileAlignment>512</FileAlignment> |
|||
<Deterministic>true</Deterministic> |
|||
<SccProjectName> |
|||
</SccProjectName> |
|||
<SccLocalPath> |
|||
</SccLocalPath> |
|||
<SccAuxPath> |
|||
</SccAuxPath> |
|||
<SccProvider> |
|||
</SccProvider> |
|||
<TargetFrameworkProfile /> |
|||
</PropertyGroup> |
|||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> |
|||
<DebugSymbols>true</DebugSymbols> |
|||
<DebugType>full</DebugType> |
|||
<Optimize>false</Optimize> |
|||
<OutputPath>bin\Debug\</OutputPath> |
|||
<DefineConstants>DEBUG;TRACE</DefineConstants> |
|||
<ErrorReport>prompt</ErrorReport> |
|||
<WarningLevel>4</WarningLevel> |
|||
</PropertyGroup> |
|||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> |
|||
<DebugType>pdbonly</DebugType> |
|||
<Optimize>true</Optimize> |
|||
<OutputPath>bin\Release\</OutputPath> |
|||
<DefineConstants>TRACE</DefineConstants> |
|||
<ErrorReport>prompt</ErrorReport> |
|||
<WarningLevel>4</WarningLevel> |
|||
</PropertyGroup> |
|||
<ItemGroup> |
|||
<Reference Include="log4net, Version=2.0.8.0, Culture=neutral, PublicKeyToken=669e0ddf0bb1aa2a, processorArchitecture=MSIL"> |
|||
<SpecificVersion>False</SpecificVersion> |
|||
<HintPath>..\ICSSoft.ERP.WebAPI\bin\log4net.dll</HintPath> |
|||
</Reference> |
|||
<Reference Include="Newtonsoft.Json, Version=6.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL"> |
|||
<SpecificVersion>False</SpecificVersion> |
|||
<HintPath>bin\Debug\Newtonsoft.Json.dll</HintPath> |
|||
</Reference> |
|||
<Reference Include="System" /> |
|||
<Reference Include="System.Configuration" /> |
|||
<Reference Include="System.Core" /> |
|||
<Reference Include="System.Runtime.Serialization" /> |
|||
<Reference Include="System.ServiceModel" /> |
|||
<Reference Include="System.Xml.Linq" /> |
|||
<Reference Include="System.Data.DataSetExtensions" /> |
|||
<Reference Include="Microsoft.CSharp" /> |
|||
<Reference Include="System.Data" /> |
|||
<Reference Include="System.Net.Http" /> |
|||
<Reference Include="System.Xml" /> |
|||
</ItemGroup> |
|||
<ItemGroup> |
|||
<Compile Include="CommonCreateLotMasterSRVStub.cs" /> |
|||
<Compile Include="CreateLotMaster.cs" /> |
|||
<Compile Include="Properties\AssemblyInfo.cs" /> |
|||
</ItemGroup> |
|||
<ItemGroup> |
|||
<ProjectReference Include="..\ICSSoft.Common\ICSSoft.Common.csproj"> |
|||
<Project>{ee45f7a5-17ee-4707-a617-8c00dd36fc01}</Project> |
|||
<Name>ICSSoft.Common</Name> |
|||
</ProjectReference> |
|||
<ProjectReference Include="..\ICSSoft.Entity\ICSSoft.Entity.csproj"> |
|||
<Project>{834E9A76-1D9E-4EBD-9321-0B362A06A367}</Project> |
|||
<Name>ICSSoft.Entity</Name> |
|||
</ProjectReference> |
|||
</ItemGroup> |
|||
<ItemGroup> |
|||
<None Include="output.config" /> |
|||
</ItemGroup> |
|||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> |
|||
</Project> |
@ -0,0 +1,37 @@ |
|||
using System.Reflection; |
|||
using System.Runtime.CompilerServices; |
|||
using System.Runtime.InteropServices; |
|||
|
|||
// 有关程序集的一般信息由以下
|
|||
// 控制。更改这些特性值可修改
|
|||
// 与程序集关联的信息。
|
|||
[assembly: AssemblyTitle("ICSSoft.Common")] |
|||
[assembly: AssemblyDescription("")] |
|||
[assembly: AssemblyConfiguration("")] |
|||
[assembly: AssemblyCompany("")] |
|||
[assembly: AssemblyProduct("ICSSoft.Common")] |
|||
[assembly: AssemblyCopyright("Copyright © 2019")] |
|||
[assembly: AssemblyTrademark("")] |
|||
[assembly: AssemblyCulture("")] |
|||
|
|||
// 将 ComVisible 设置为 false 会使此程序集中的类型
|
|||
//对 COM 组件不可见。如果需要从 COM 访问此程序集中的类型
|
|||
//请将此类型的 ComVisible 特性设置为 true。
|
|||
[assembly: ComVisible(false)] |
|||
|
|||
// 如果此项目向 COM 公开,则下列 GUID 用于类型库的 ID
|
|||
[assembly: Guid("ee45f7a5-17ee-4707-a617-8c00dd36fc01")] |
|||
|
|||
// 程序集的版本信息由下列四个值组成:
|
|||
//
|
|||
// 主版本
|
|||
// 次版本
|
|||
// 生成号
|
|||
// 修订号
|
|||
//
|
|||
// 可以指定所有值,也可以使用以下所示的 "*" 预置版本号和修订号
|
|||
//通过使用 "*",如下所示:
|
|||
// [assembly: AssemblyVersion("1.0.*")]
|
|||
[assembly: AssemblyVersion("1.0.0.0")] |
|||
[assembly: AssemblyFileVersion("1.0.0.0")] |
|||
[assembly: log4net.Config.XmlConfigurator(ConfigFile = "log4.xml", Watch = true)] |
@ -0,0 +1,29 @@ |
|||
<?xml version="1.0" encoding="utf-8"?> |
|||
<configuration> |
|||
<system.serviceModel> |
|||
<bindings> |
|||
<basicHttpBinding> |
|||
<binding name="BasicHttpBinding_UFIDA.U9.ISV.CBO.Lot.ICommonCreateLotMasterSRV" |
|||
closeTimeout="00:01:00" openTimeout="00:01:00" receiveTimeout="00:10:00" |
|||
sendTimeout="00:01:00" allowCookies="false" bypassProxyOnLocal="false" |
|||
hostNameComparisonMode="StrongWildcard" maxBufferSize="65536" |
|||
maxBufferPoolSize="524288" maxReceivedMessageSize="65536" |
|||
messageEncoding="Text" textEncoding="utf-8" transferMode="Buffered" |
|||
useDefaultWebProxy="true"> |
|||
<readerQuotas maxDepth="32" maxStringContentLength="8192" maxArrayLength="16384" |
|||
maxBytesPerRead="4096" maxNameTableCharCount="16384" /> |
|||
<security mode="None"> |
|||
<transport clientCredentialType="None" proxyCredentialType="None" |
|||
realm="" /> |
|||
<message clientCredentialType="UserName" algorithmSuite="Default" /> |
|||
</security> |
|||
</binding> |
|||
</basicHttpBinding> |
|||
</bindings> |
|||
<client> |
|||
<endpoint address="http://192.168.0.100/U9/Services/UFIDA.U9.ISV.CBO.Lot.ICommonCreateLotMasterSRV.svc" |
|||
binding="basicHttpBinding" bindingConfiguration="BasicHttpBinding_UFIDA.U9.ISV.CBO.Lot.ICommonCreateLotMasterSRV" |
|||
contract="UFIDAU9ISVCBOLotICommonCreateLotMasterSRV" name="BasicHttpBinding_UFIDA.U9.ISV.CBO.Lot.ICommonCreateLotMasterSRV" /> |
|||
</client> |
|||
</system.serviceModel> |
|||
</configuration> |
@ -0,0 +1,159 @@ |
|||
using ICSSoft.Common; |
|||
using System; |
|||
using System.Collections.Generic; |
|||
using System.Configuration; |
|||
using System.Data; |
|||
using System.Data.SqlClient; |
|||
using System.Linq; |
|||
using System.Text; |
|||
using System.Threading.Tasks; |
|||
using ICSSoft.Entity; |
|||
using UFSoft.UBF.Util.Context; |
|||
using System.ServiceModel; |
|||
using www.ufida.org.EntityData; |
|||
using UFSoft.UBF.Exceptions1; |
|||
using UFSoft.UBF.Service; |
|||
|
|||
namespace ICSSoft.APIDeleteIssue |
|||
{ |
|||
public class DeleteIssue |
|||
{ |
|||
private static log4net.ILog log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); |
|||
private static string connString = System.Configuration.ConfigurationManager.AppSettings["ERPConnStr"]; |
|||
private static string ERPDB = System.Configuration.ConfigurationManager.AppSettings["ERPDB"]; |
|||
|
|||
public bool Delete(List<string> DocList, string OrgID) |
|||
{ |
|||
long DocID = 0; |
|||
#region 服务调用框架结构
|
|||
//实例化代理类
|
|||
UFIDAU9ISVMOIDeleteIssue4ExternalClient client = new UFIDAU9ISVMOIDeleteIssue4ExternalClient(); |
|||
//服务返回结果
|
|||
//UFIDAU9PMPOPurchaseOrderData[] returnItems;
|
|||
//返回异常信息,目前还没有使用此属性
|
|||
UFSoft.UBF.Exceptions1.MessageBase[] returnMsg; |
|||
//上下文信息
|
|||
object context; |
|||
bool IsSuccess = false; |
|||
//传入 参数
|
|||
//UFIDAU9PMDTOsOBAPurchaseOrderDTOData[] pOList;
|
|||
www.ufida.org.EntityData.UFIDAU9ISVMOIssueKeyDTOData[] docArray = new www.ufida.org.EntityData.UFIDAU9ISVMOIssueKeyDTOData[] { }; |
|||
List<www.ufida.org.EntityData.UFIDAU9ISVMOIssueKeyDTOData> docList = new List<www.ufida.org.EntityData.UFIDAU9ISVMOIssueKeyDTOData>(); |
|||
try |
|||
{ |
|||
StringBuilder str = new StringBuilder(); |
|||
foreach (string DocCode in DocList) |
|||
{ |
|||
DataTable dt = GetData(DocCode, OrgID); |
|||
if (!string.IsNullOrEmpty(dt.Rows[0][0].ToString()) || !string.IsNullOrEmpty(dt.Rows[0][1].ToString())) |
|||
{ |
|||
DocID = long.Parse(dt.Rows[0][0].ToString()); |
|||
} |
|||
else |
|||
{ |
|||
throw new Exception("需要删除的单据号不正确!"); |
|||
} |
|||
|
|||
www.ufida.org.EntityData.UFIDAU9ISVMOIssueKeyDTOData docinfo = new www.ufida.org.EntityData.UFIDAU9ISVMOIssueKeyDTOData(); |
|||
//给传入参数赋值
|
|||
docinfo.m_iD = DocID; |
|||
docList.Add(docinfo); |
|||
docArray = docList.ToArray(); |
|||
} |
|||
//给上下文信息赋值
|
|||
context = CreateContextObj(OrgID); |
|||
//pOList = SetPoDtos(U9Info, poInfoList);
|
|||
//服务调用
|
|||
(client.Endpoint.Binding as BasicHttpBinding).MaxReceivedMessageSize = int.MaxValue; |
|||
(client.Endpoint.Binding as BasicHttpBinding).MaxBufferSize = int.MaxValue; |
|||
IsSuccess = client.Do(out returnMsg, context, docArray); |
|||
} |
|||
catch (Exception ex) |
|||
{ |
|||
throw new Exception(GetExceptionMessage(ex)); |
|||
} |
|||
return IsSuccess; |
|||
#endregion
|
|||
} |
|||
#region 给上下文信息赋值
|
|||
/// <summary>
|
|||
/// 给上下文信息赋值
|
|||
/// </summary>
|
|||
/// <returns></returns>
|
|||
private static ThreadContext CreateContextObj(string OrgID) |
|||
{ |
|||
// 实例化应用上下文对象
|
|||
ThreadContext thContext = new ThreadContext(); |
|||
|
|||
|
|||
System.Collections.Generic.Dictionary<object, object> ns = new Dictionary<object, object>(); |
|||
ns.Add("OrgID", OrgID); |
|||
ns.Add("UserID", ConfigurationManager.AppSettings["userID"].ToString()); |
|||
ns.Add("UserCode", ConfigurationManager.AppSettings["userCode"].ToString()); |
|||
ns.Add("Datetime", DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss")); |
|||
ns.Add("CultureName", ConfigurationManager.AppSettings["cultureName"].ToString()); |
|||
ns.Add("EnterpriseID", ConfigurationManager.AppSettings["enterpriseID"].ToString()); |
|||
ns.Add("DefaultCultureName", ConfigurationManager.AppSettings["cultureName"].ToString()); |
|||
thContext.nameValueHas = ns; |
|||
|
|||
return thContext; |
|||
} |
|||
#endregion
|
|||
|
|||
private static DataTable GetData(string DocCode, string OrgID) |
|||
{ |
|||
string sql = @" select ID,DocNo
|
|||
from MO_IssueDoc |
|||
where DocNo='" + DocCode + "' AND Org='" + OrgID + "'";
|
|||
return DBHelper.Query(sql, connString); |
|||
} |
|||
|
|||
#region 提取异常信息
|
|||
/// <summary>
|
|||
/// 提取异常信息
|
|||
/// </summary>
|
|||
/// <param name="ex"></param>
|
|||
private static string GetExceptionMessage(Exception ex) |
|||
{ |
|||
string faultMessage = "未知错误,请查看ERP日志!"; |
|||
|
|||
System.TimeoutException timeoutEx = ex as System.TimeoutException; |
|||
if (timeoutEx != null) |
|||
{ |
|||
faultMessage = "访问服务超时,请修改配置信息!"; |
|||
} |
|||
else |
|||
{ |
|||
FaultException<ServiceException> faultEx = ex as FaultException<ServiceException>; |
|||
if (faultEx == null) |
|||
{ |
|||
faultMessage = ex.Message; |
|||
} |
|||
else |
|||
{ |
|||
ServiceException serviceEx = faultEx.Detail; |
|||
if (serviceEx != null && !string.IsNullOrEmpty(serviceEx.Message) |
|||
&& !serviceEx.Message.Equals("fault", StringComparison.OrdinalIgnoreCase)) |
|||
{ |
|||
// 错误信息在faultEx.Message中,请提取,
|
|||
// 格式为"Fault:料品不能为空,请录入\n 在....."
|
|||
int startIndex = serviceEx.Message.IndexOf(":"); |
|||
int endIndex = serviceEx.Message.IndexOf("\n"); |
|||
if (endIndex == -1) |
|||
endIndex = serviceEx.Message.Length; |
|||
if (endIndex > 0 && endIndex > startIndex + 1) |
|||
{ |
|||
faultMessage = serviceEx.Message.Substring(startIndex + 1, endIndex - startIndex - 1); |
|||
} |
|||
else |
|||
{ |
|||
faultMessage = serviceEx.Message; |
|||
} |
|||
} |
|||
} |
|||
} |
|||
return faultMessage; |
|||
} |
|||
#endregion
|
|||
} |
|||
} |
1081
ICSSoft.U9ERP.WebAPI/ICSSoft.APIDeleteIssue/DeleteIssue4ExternalStub.cs
File diff suppressed because it is too large
View File
File diff suppressed because it is too large
View File
@ -0,0 +1,82 @@ |
|||
<?xml version="1.0" encoding="utf-8"?> |
|||
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> |
|||
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" /> |
|||
<PropertyGroup> |
|||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> |
|||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> |
|||
<ProjectGuid>{147FCA78-535B-4F46-9049-19842E903E78}</ProjectGuid> |
|||
<OutputType>Library</OutputType> |
|||
<AppDesignerFolder>Properties</AppDesignerFolder> |
|||
<RootNamespace>ICSSoft.APIDeleteIssue</RootNamespace> |
|||
<AssemblyName>ICSSoft.APIDeleteIssue</AssemblyName> |
|||
<TargetFrameworkVersion>v4.8</TargetFrameworkVersion> |
|||
<FileAlignment>512</FileAlignment> |
|||
<Deterministic>true</Deterministic> |
|||
<SccProjectName> |
|||
</SccProjectName> |
|||
<SccLocalPath> |
|||
</SccLocalPath> |
|||
<SccAuxPath> |
|||
</SccAuxPath> |
|||
<SccProvider> |
|||
</SccProvider> |
|||
<TargetFrameworkProfile /> |
|||
</PropertyGroup> |
|||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> |
|||
<DebugSymbols>true</DebugSymbols> |
|||
<DebugType>full</DebugType> |
|||
<Optimize>false</Optimize> |
|||
<OutputPath>bin\Debug\</OutputPath> |
|||
<DefineConstants>DEBUG;TRACE</DefineConstants> |
|||
<ErrorReport>prompt</ErrorReport> |
|||
<WarningLevel>4</WarningLevel> |
|||
</PropertyGroup> |
|||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> |
|||
<DebugType>pdbonly</DebugType> |
|||
<Optimize>true</Optimize> |
|||
<OutputPath>bin\Release\</OutputPath> |
|||
<DefineConstants>TRACE</DefineConstants> |
|||
<ErrorReport>prompt</ErrorReport> |
|||
<WarningLevel>4</WarningLevel> |
|||
</PropertyGroup> |
|||
<ItemGroup> |
|||
<Reference Include="log4net, Version=2.0.8.0, Culture=neutral, PublicKeyToken=669e0ddf0bb1aa2a, processorArchitecture=MSIL"> |
|||
<SpecificVersion>False</SpecificVersion> |
|||
<HintPath>..\ICSSoft.ERP.WebAPI\bin\log4net.dll</HintPath> |
|||
</Reference> |
|||
<Reference Include="Newtonsoft.Json, Version=6.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL"> |
|||
<SpecificVersion>False</SpecificVersion> |
|||
<HintPath>bin\Debug\Newtonsoft.Json.dll</HintPath> |
|||
</Reference> |
|||
<Reference Include="System" /> |
|||
<Reference Include="System.Configuration" /> |
|||
<Reference Include="System.Core" /> |
|||
<Reference Include="System.Runtime.Serialization" /> |
|||
<Reference Include="System.ServiceModel" /> |
|||
<Reference Include="System.Xml.Linq" /> |
|||
<Reference Include="System.Data.DataSetExtensions" /> |
|||
<Reference Include="Microsoft.CSharp" /> |
|||
<Reference Include="System.Data" /> |
|||
<Reference Include="System.Net.Http" /> |
|||
<Reference Include="System.Xml" /> |
|||
</ItemGroup> |
|||
<ItemGroup> |
|||
<Compile Include="DeleteIssue4ExternalStub.cs" /> |
|||
<Compile Include="Properties\AssemblyInfo.cs" /> |
|||
<Compile Include="DeleteIssue.cs" /> |
|||
</ItemGroup> |
|||
<ItemGroup> |
|||
<ProjectReference Include="..\ICSSoft.Common\ICSSoft.Common.csproj"> |
|||
<Project>{ee45f7a5-17ee-4707-a617-8c00dd36fc01}</Project> |
|||
<Name>ICSSoft.Common</Name> |
|||
</ProjectReference> |
|||
<ProjectReference Include="..\ICSSoft.Entity\ICSSoft.Entity.csproj"> |
|||
<Project>{834E9A76-1D9E-4EBD-9321-0B362A06A367}</Project> |
|||
<Name>ICSSoft.Entity</Name> |
|||
</ProjectReference> |
|||
</ItemGroup> |
|||
<ItemGroup> |
|||
<None Include="output.config" /> |
|||
</ItemGroup> |
|||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> |
|||
</Project> |
@ -0,0 +1,37 @@ |
|||
using System.Reflection; |
|||
using System.Runtime.CompilerServices; |
|||
using System.Runtime.InteropServices; |
|||
|
|||
// 有关程序集的一般信息由以下
|
|||
// 控制。更改这些特性值可修改
|
|||
// 与程序集关联的信息。
|
|||
[assembly: AssemblyTitle("ICSSoft.Common")] |
|||
[assembly: AssemblyDescription("")] |
|||
[assembly: AssemblyConfiguration("")] |
|||
[assembly: AssemblyCompany("")] |
|||
[assembly: AssemblyProduct("ICSSoft.Common")] |
|||
[assembly: AssemblyCopyright("Copyright © 2019")] |
|||
[assembly: AssemblyTrademark("")] |
|||
[assembly: AssemblyCulture("")] |
|||
|
|||
// 将 ComVisible 设置为 false 会使此程序集中的类型
|
|||
//对 COM 组件不可见。如果需要从 COM 访问此程序集中的类型
|
|||
//请将此类型的 ComVisible 特性设置为 true。
|
|||
[assembly: ComVisible(false)] |
|||
|
|||
// 如果此项目向 COM 公开,则下列 GUID 用于类型库的 ID
|
|||
[assembly: Guid("ee45f7a5-17ee-4707-a617-8c00dd36fc01")] |
|||
|
|||
// 程序集的版本信息由下列四个值组成:
|
|||
//
|
|||
// 主版本
|
|||
// 次版本
|
|||
// 生成号
|
|||
// 修订号
|
|||
//
|
|||
// 可以指定所有值,也可以使用以下所示的 "*" 预置版本号和修订号
|
|||
//通过使用 "*",如下所示:
|
|||
// [assembly: AssemblyVersion("1.0.*")]
|
|||
[assembly: AssemblyVersion("1.0.0.0")] |
|||
[assembly: AssemblyFileVersion("1.0.0.0")] |
|||
[assembly: log4net.Config.XmlConfigurator(ConfigFile = "log4.xml", Watch = true)] |
@ -0,0 +1,29 @@ |
|||
<?xml version="1.0" encoding="utf-8"?> |
|||
<configuration> |
|||
<system.serviceModel> |
|||
<bindings> |
|||
<basicHttpBinding> |
|||
<binding name="BasicHttpBinding_UFIDA.U9.ISV.MO.IDeleteIssue4External" |
|||
closeTimeout="00:01:00" openTimeout="00:01:00" receiveTimeout="00:10:00" |
|||
sendTimeout="00:01:00" allowCookies="false" bypassProxyOnLocal="false" |
|||
hostNameComparisonMode="StrongWildcard" maxBufferSize="65536" |
|||
maxBufferPoolSize="524288" maxReceivedMessageSize="65536" |
|||
messageEncoding="Text" textEncoding="utf-8" transferMode="Buffered" |
|||
useDefaultWebProxy="true"> |
|||
<readerQuotas maxDepth="32" maxStringContentLength="8192" maxArrayLength="16384" |
|||
maxBytesPerRead="4096" maxNameTableCharCount="16384" /> |
|||
<security mode="None"> |
|||
<transport clientCredentialType="None" proxyCredentialType="None" |
|||
realm="" /> |
|||
<message clientCredentialType="UserName" algorithmSuite="Default" /> |
|||
</security> |
|||
</binding> |
|||
</basicHttpBinding> |
|||
</bindings> |
|||
<client> |
|||
<endpoint address="http://192.168.0.163/U9/Services/UFIDA.U9.ISV.MO.IDeleteIssue4External.svc" |
|||
binding="basicHttpBinding" bindingConfiguration="BasicHttpBinding_UFIDA.U9.ISV.MO.IDeleteIssue4External" |
|||
contract="UFIDAU9ISVMOIDeleteIssue4External" name="BasicHttpBinding_UFIDA.U9.ISV.MO.IDeleteIssue4External" /> |
|||
</client> |
|||
</system.serviceModel> |
|||
</configuration> |
1405
ICSSoft.U9ERP.WebAPI/ICSSoft.ERP.WebAPI/Controllers/ValuesController.cs
File diff suppressed because it is too large
View File
File diff suppressed because it is too large
View File
Reference in new issue
xxxxxxxxxx