DS7Zhanhao
hanxuntao 2 years ago
parent 55cef2da8c
commit 080b2cc383

@ -2,8 +2,6 @@
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<LastActiveSolutionConfig>Debug|Any CPU</LastActiveSolutionConfig>
<<<<<<< HEAD
=======
<UseIISExpress>true</UseIISExpress>
<Use64BitIISExpress />
<IISExpressSSLPort />
@ -11,7 +9,6 @@
<IISExpressWindowsAuthentication />
<IISExpressUseClassicPipelineMode />
<UseGlobalApplicationHostFile />
>>>>>>> 72416046becdff9e01f9d9f1647013f565f2a968
</PropertyGroup>
<ProjectExtensions>
<VisualStudio>

@ -576,6 +576,41 @@ namespace MailAnalyzeTools
}
}
public static int ExecuteOrgSql(string orgCode, string SQLString)
{
var connectionString = ConfigurationManager.AppSettings["DJYUSERID:" + orgCode];
using (SqlConnection connection = new SqlConnection(connectionString))
{
using (SqlCommand cmd = new SqlCommand(SQLString, connection))
{
try
{
connection.Open();
cmd.CommandTimeout = 120000; //要加这一句
cmd.Transaction = connection.BeginTransaction();
int rows = cmd.ExecuteNonQuery();
cmd.Transaction.Commit();
return rows;
}
catch (System.Data.SqlClient.SqlException ex)
{
if (cmd.Transaction != null && connection.State == ConnectionState.Open)
{
cmd.Transaction.Rollback();
}
connection.Close();
LogHelper.Debug(typeof(DbHelperSQL), ex);
LogHelper.Debug("错误语句:" + SQLString);
throw new Exception(ex.Message);
}
}
}
}
/// <summary>
/// 构建 SqlCommand 对象(用来返回一个结果集,而不是一个整数值)
@ -805,7 +840,7 @@ namespace MailAnalyzeTools
public static DateTime GetDateTime(string timeStamp)
{
DateTime dtStart = TimeZone.CurrentTimeZone.ToLocalTime(new DateTime(1970, 1, 1));
long lTime = long.Parse(timeStamp + "0000000");
long lTime = long.Parse(timeStamp + "0000");
TimeSpan toNow = new TimeSpan(lTime);
return dtStart.Add(toNow);
}
@ -821,7 +856,7 @@ namespace MailAnalyzeTools
try
{
DateTime dtStart = TimeZone.CurrentTimeZone.ToLocalTime(new DateTime(1970, 1, 1));
long lTime = long.Parse(timeStamp + "0000000");
long lTime = long.Parse(timeStamp + "0000");
TimeSpan toNow = new TimeSpan(lTime);
time = dtStart.Add(toNow);
}

@ -3,18 +3,11 @@ using RabbitMQ.Client;
using RabbitMQ.Client.Events;
using System;
using Newtonsoft.Json;
using Newtonsoft.Json.Linq;
using System.Collections.Generic;
using System.Configuration;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Data;
using System.Data.SqlClient;
using System.IO;
using System.Net;
using MailAnalyzeTools.Common;
using System.Collections.Specialized;
using DSWeb.Common.DB;
using MailAnalyzeTools;
@ -381,6 +374,11 @@ namespace D7MqClient
cdc.ch_fee_do.AddRange(feedoList);
cdc.SaveChanges();
foreach (var feedo in feedoList) {
DbHelperSQL.ExecuteOrgSql(InvRoot.companyId.Replace(" ", ""), "update ch_fee set INVOICE=isnull(INVOICE,0)+"+feedo.ORIGAMOUNT+" where GID='"+feedo.FEEID+"' ");
}
}
}
}
@ -439,6 +437,10 @@ namespace D7MqClient
result.SETRED = false;
result.CREATEUSER = clerk.USERID;
result.CREATETIME= TimestampHelper.GetDateTime(inv.apiSendTime);
result.PUSHEMAIL = inv.email;
result.INVOICESERIALNUM = inv.serialNo;
result.INVOICEINFOURL = inv.pictureUrl;
result.INVOICEPDFURL = inv.pdfUrl;
}
return result;

@ -58,8 +58,6 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "DSWeb.Interface", "DSWeb.In
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "D7MqClient", "D7MqClient\D7MqClient\D7MqClient.csproj", "{F3096387-37A2-403B-B147-64A8B4FC1077}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "DSWeb.Service.DjyInv", "DSWeb.Service.DjyInv\DSWeb.Service.DjyInv.csproj", "{35BD3D3E-D701-4E0D-B44B-FDED7A43C46D}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "JobSendAgentMail", "JobSendAgentMail\JobSendAgentMail.csproj", "{A6656568-5C05-4E6C-856B-3FBE6367EA62}"
EndProject
Global
@ -442,22 +440,6 @@ Global
{F3096387-37A2-403B-B147-64A8B4FC1077}.Release|x64.Build.0 = Release|Any CPU
{F3096387-37A2-403B-B147-64A8B4FC1077}.Release|x86.ActiveCfg = Release|Any CPU
{F3096387-37A2-403B-B147-64A8B4FC1077}.Release|x86.Build.0 = Release|Any CPU
{35BD3D3E-D701-4E0D-B44B-FDED7A43C46D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{35BD3D3E-D701-4E0D-B44B-FDED7A43C46D}.Debug|Any CPU.Build.0 = Debug|Any CPU
{35BD3D3E-D701-4E0D-B44B-FDED7A43C46D}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
{35BD3D3E-D701-4E0D-B44B-FDED7A43C46D}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
{35BD3D3E-D701-4E0D-B44B-FDED7A43C46D}.Debug|x64.ActiveCfg = Debug|Any CPU
{35BD3D3E-D701-4E0D-B44B-FDED7A43C46D}.Debug|x64.Build.0 = Debug|Any CPU
{35BD3D3E-D701-4E0D-B44B-FDED7A43C46D}.Debug|x86.ActiveCfg = Debug|Any CPU
{35BD3D3E-D701-4E0D-B44B-FDED7A43C46D}.Debug|x86.Build.0 = Debug|Any CPU
{35BD3D3E-D701-4E0D-B44B-FDED7A43C46D}.Release|Any CPU.ActiveCfg = Release|Any CPU
{35BD3D3E-D701-4E0D-B44B-FDED7A43C46D}.Release|Any CPU.Build.0 = Release|Any CPU
{35BD3D3E-D701-4E0D-B44B-FDED7A43C46D}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
{35BD3D3E-D701-4E0D-B44B-FDED7A43C46D}.Release|Mixed Platforms.Build.0 = Release|Any CPU
{35BD3D3E-D701-4E0D-B44B-FDED7A43C46D}.Release|x64.ActiveCfg = Release|Any CPU
{35BD3D3E-D701-4E0D-B44B-FDED7A43C46D}.Release|x64.Build.0 = Release|Any CPU
{35BD3D3E-D701-4E0D-B44B-FDED7A43C46D}.Release|x86.ActiveCfg = Release|Any CPU
{35BD3D3E-D701-4E0D-B44B-FDED7A43C46D}.Release|x86.Build.0 = Release|Any CPU
{A6656568-5C05-4E6C-856B-3FBE6367EA62}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{A6656568-5C05-4E6C-856B-3FBE6367EA62}.Debug|Any CPU.Build.0 = Debug|Any CPU
{A6656568-5C05-4E6C-856B-3FBE6367EA62}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU

@ -42,7 +42,7 @@
<PackageAsSingleFile>false</PackageAsSingleFile>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<Prefer32Bit>false</Prefer32Bit>
<PlatformTarget>x64</PlatformTarget>
<PlatformTarget>AnyCPU</PlatformTarget>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>

@ -187,7 +187,13 @@ namespace JobCreateFee
if (BSTYPE == "分单")
{
dbcon.Open();
var cmdInsertCtnSQL = "insert into t_op_ctn_fendan (AS_ID,代码,尺寸,箱型,数量,TEU,表现形式,箱号,封号,件数,包装,重量,尺码) values ("
var cmdDeleteCtnSQL = "delete from t_op_ctn_fendan where AS_ID='"+BSNO+"' ";
SqlCommand cmdDeleteCtn = new SqlCommand(cmdDeleteCtnSQL, dbcon);
cmdDeleteCtn.ExecuteNonQuery();
var cmdInsertCtnSQL = "insert into t_op_ctn_fendan (AS_ID,代码,尺寸,箱型,数量,TEU,表现形式,箱号,封号,件数,包装,重量,尺码) values ("
+ "'" + BSNO + "','" + CtnCode.CTNCODE + "','" + CtnCode.CTNSIZE + "','" + CtnCode.CTNTYPE + "',1," + TEU.ToString() + ",'" + CtnCode.CTNALL.Replace("'", "''") + "','" + ContainerNumber + "','" + SealNumber + "','" + Convert.ToString(rowmhdata["Quantity"]) + "','" + PackageType + "'," + Convert.ToString(rowmhdata["Weight"]) + "," + Convert.ToString(rowmhdata["Measurement"]) + " )";
SqlCommand cmdInsertCtn = new SqlCommand(cmdInsertCtnSQL, dbcon);
@ -199,7 +205,12 @@ namespace JobCreateFee
{
dbcon.Open();
var cmdInsertCtnSQL = "insert into t_op_ctn (编号,代码,尺寸,箱型,数量,TEU,表现形式,箱号,封号,件数,包装,重量,尺码) values ("
var cmdDeleteCtnSQL = "delete from t_op_ctn where 编号='" + BSNO + "' ";
SqlCommand cmdDeleteCtn = new SqlCommand(cmdDeleteCtnSQL, dbcon);
cmdDeleteCtn.ExecuteNonQuery();
var cmdInsertCtnSQL = "insert into t_op_ctn (编号,代码,尺寸,箱型,数量,TEU,表现形式,箱号,封号,件数,包装,重量,尺码) values ("
+ "'" + BSNO + "','" + CtnCode.CTNCODE + "','" + CtnCode.CTNSIZE + "','" + CtnCode.CTNTYPE + "',1," + TEU.ToString() + ",'" + CtnCode.CTNALL.Replace("'", "''") + "','" + ContainerNumber + "','" + SealNumber + "','" + Convert.ToString(rowmhdata["Quantity"]) + "','" + PackageType + "'," + Convert.ToString(rowmhdata["Weight"]) + "," + Convert.ToString(rowmhdata["Measurement"]) + " )";
SqlCommand cmdInsertCtn = new SqlCommand(cmdInsertCtnSQL, dbcon);

@ -130,15 +130,9 @@
<WCFMetadata Include="Connected Services\" />
</ItemGroup>
<ItemGroup>
<<<<<<< HEAD
<ProjectReference Include="..\JobAutoCreateFee\JobAutoCreateFee.csproj">
<Project>{e0a766b8-34f9-4273-9509-544c691fb290}</Project>
<Name>JobAutoCreateFee</Name>
=======
<ProjectReference Include="..\JobPingTaiWork\JobPingTaiWork.csproj">
<Project>{4e1cc49b-4981-4b0b-8702-39a426243674}</Project>
<Name>JobPingTaiWork</Name>
>>>>>>> 72416046becdff9e01f9d9f1647013f565f2a968
</ProjectReference>
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />

Loading…
Cancel
Save