DS7_JinGang
hanxuntao 2 years ago
parent 754fa7e7d2
commit 6c1beced8b

@ -57,7 +57,7 @@ namespace D7MqClient
try
{
//回写数据
var feeback = JsonConvert.DeserializeAnonymousType(strBody, new { FeedbackType = string.Empty, FeedbackData = new { MBLNO = string.Empty, BSNO = string.Empty, IRCode = string.Empty, CSRCode = string.Empty, FF = string.Empty } });
var feeback = JsonConvert.DeserializeAnonymousType(strBody, new { FeedbackType = string.Empty, FeedbackData = new { MBLNO = string.Empty, BSNO = string.Empty, IRCode = string.Empty, CSRCode = string.Empty, FF = string.Empty, FR = string.Empty } });
using (SqlConnection dbcon = new SqlConnection(connStr))
{
@ -71,13 +71,24 @@ namespace D7MqClient
if (DSVER == "7")
{
var CUSTNO = "";
if (!string.IsNullOrEmpty(feeback.FeedbackData.BSNO)) CUSTNO = feeback.FeedbackData.BSNO;
var BSNO = "";
if (!string.IsNullOrEmpty(feeback.FeedbackData.BSNO)) BSNO = feeback.FeedbackData.BSNO;
if (!string.IsNullOrEmpty(feeback.FeedbackData.FF)) CUSTNO = feeback.FeedbackData.FF;
if (!string.IsNullOrEmpty(feeback.FeedbackData.FR)) CUSTNO = feeback.FeedbackData.FR;
if (!string.IsNullOrEmpty(BSNO)) {
var strSql2 = new StringBuilder();
strSql2.Append("update op_seae set IRCODE='" + IRCODE + "' where BSNO='" + BSNO + "' AND ISNULL(IRCODE,'')=''");
SqlCommand cmd2 = new SqlCommand(strSql2.ToString(), dbcon);
cmd2.ExecuteNonQuery();
}
if (!string.IsNullOrEmpty(CUSTNO))
{
var strSql = new StringBuilder();
strSql.Append("update op_seae set IRCODE='" + IRCODE + "' where CUSTNO='" + CUSTNO + "' AND ISNULL(IRCODE,'')=''");
SqlCommand cmd = new SqlCommand(strSql.ToString(), dbcon);
cmd.ExecuteNonQuery();
}
}
else
{
if (!string.IsNullOrEmpty(feeback.FeedbackData.BSNO))
@ -98,13 +109,24 @@ namespace D7MqClient
if (DSVER == "7")
{
var CUSTNO = "";
if (!string.IsNullOrEmpty(feeback.FeedbackData.BSNO)) CUSTNO = feeback.FeedbackData.BSNO;
if (!string.IsNullOrEmpty(feeback.FeedbackData.FF)) CUSTNO = feeback.FeedbackData.FF;
var BSNO = "";
if (!string.IsNullOrEmpty(feeback.FeedbackData.BSNO)) BSNO = feeback.FeedbackData.BSNO;
if (!string.IsNullOrEmpty(feeback.FeedbackData.FR)) CUSTNO = feeback.FeedbackData.FR;
if (!string.IsNullOrEmpty(BSNO))
{
var strSql2 = new StringBuilder();
strSql2.Append("update op_seae set MBLNO='" + feeback.FeedbackData.MBLNO + "' where BSNO='" + BSNO + "' AND ISNULL(MBLNO,'')=''");
SqlCommand cmd2 = new SqlCommand(strSql2.ToString(), dbcon);
cmd2.ExecuteNonQuery();
}
if (!string.IsNullOrEmpty(CUSTNO))
{
var strSql = new StringBuilder();
strSql.Append("update op_seae set MBLNO='" + feeback.FeedbackData.MBLNO + "' where CUSTNO='" + CUSTNO + "' AND ISNULL(MBLNO,'')='' ");
SqlCommand cmd = new SqlCommand(strSql.ToString(), dbcon);
cmd.ExecuteNonQuery();
}
}
else
{
var strSql = new StringBuilder();

Loading…
Cancel
Save