|
|
@ -57,7 +57,7 @@ namespace D7MqClient
|
|
|
|
try
|
|
|
|
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))
|
|
|
|
using (SqlConnection dbcon = new SqlConnection(connStr))
|
|
|
|
{
|
|
|
|
{
|
|
|
@ -71,12 +71,23 @@ namespace D7MqClient
|
|
|
|
if (DSVER == "7")
|
|
|
|
if (DSVER == "7")
|
|
|
|
{
|
|
|
|
{
|
|
|
|
var CUSTNO = "";
|
|
|
|
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.FF)) CUSTNO = feeback.FeedbackData.FF;
|
|
|
|
var strSql = new StringBuilder();
|
|
|
|
if (!string.IsNullOrEmpty(feeback.FeedbackData.FR)) CUSTNO = feeback.FeedbackData.FR;
|
|
|
|
strSql.Append("update op_seae set IRCODE='" + IRCODE + "' where CUSTNO='" + CUSTNO + "' AND ISNULL(IRCODE,'')=''");
|
|
|
|
if (!string.IsNullOrEmpty(BSNO)) {
|
|
|
|
SqlCommand cmd = new SqlCommand(strSql.ToString(), dbcon);
|
|
|
|
var strSql2 = new StringBuilder();
|
|
|
|
cmd.ExecuteNonQuery();
|
|
|
|
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
|
|
|
|
else
|
|
|
|
{
|
|
|
|
{
|
|
|
@ -98,12 +109,23 @@ namespace D7MqClient
|
|
|
|
if (DSVER == "7")
|
|
|
|
if (DSVER == "7")
|
|
|
|
{
|
|
|
|
{
|
|
|
|
var CUSTNO = "";
|
|
|
|
var CUSTNO = "";
|
|
|
|
if (!string.IsNullOrEmpty(feeback.FeedbackData.BSNO)) CUSTNO = feeback.FeedbackData.BSNO;
|
|
|
|
var BSNO = "";
|
|
|
|
if (!string.IsNullOrEmpty(feeback.FeedbackData.FF)) CUSTNO = feeback.FeedbackData.FF;
|
|
|
|
if (!string.IsNullOrEmpty(feeback.FeedbackData.BSNO)) BSNO = feeback.FeedbackData.BSNO;
|
|
|
|
var strSql = new StringBuilder();
|
|
|
|
if (!string.IsNullOrEmpty(feeback.FeedbackData.FR)) CUSTNO = feeback.FeedbackData.FR;
|
|
|
|
strSql.Append("update op_seae set MBLNO='" + feeback.FeedbackData.MBLNO + "' where CUSTNO='" + CUSTNO + "' AND ISNULL(MBLNO,'')='' ");
|
|
|
|
if (!string.IsNullOrEmpty(BSNO))
|
|
|
|
SqlCommand cmd = new SqlCommand(strSql.ToString(), dbcon);
|
|
|
|
{
|
|
|
|
cmd.ExecuteNonQuery();
|
|
|
|
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
|
|
|
|
else
|
|
|
|
{
|
|
|
|
{
|
|
|
|