DS7_JinGang
ddlucky 2 years ago
commit 8cbe254d67

@ -97,7 +97,7 @@ namespace D7MqClient
logger.Debug($"执行语句1{strSql.ToString()}");
if (_count == 1 && UPDATESUBCOMPANY == "1")
{
var BsNo = GetBsNo(dbcon, CUSTNO);
var BsNo = GetBsNo(dbcon,"CUSTNO='"+CUSTNO+"'");
var strSql3 = new StringBuilder();
strSql3.Append("exec ExeUpdateSubOpSeae '" + BsNo + "' ");
SqlCommand cmd3 = new SqlCommand(strSql3.ToString(), dbcon);
@ -148,24 +148,48 @@ namespace D7MqClient
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();
var _count=cmd2.ExecuteNonQuery();
logger.Debug($"执行语句1{strSql2.ToString()}");
if (_count == 1 && UPDATESUBCOMPANY == "1")
{
var strSql3 = new StringBuilder();
strSql3.Append("exec ExeUpdateSubOpSeae '" + BSNO + "' ");
SqlCommand cmd3 = new SqlCommand(strSql3.ToString(), dbcon);
cmd3.ExecuteNonQuery();
}
}
if (!string.IsNullOrEmpty(CUSTNO))
{
var strSql = new StringBuilder();
strSql.Append("update op_seae set MBLNO='" + feeback.FeedbackData.MBLNO + "' where (CUSTNO='" + CUSTNO + "' OR IRCODE='" + CUSTNO + "') AND (ISNULL(MBLNO,'')='' or MBLNO LIKE '%*') ");
SqlCommand cmd = new SqlCommand(strSql.ToString(), dbcon);
cmd.ExecuteNonQuery();
var _count=cmd.ExecuteNonQuery();
logger.Debug($"执行语句1{strSql.ToString()}");
if (_count == 1 && UPDATESUBCOMPANY == "1")
{
var BsNo = GetBsNo(dbcon, "CUSTNO='"+CUSTNO+"'");
var strSql3 = new StringBuilder();
strSql3.Append("exec ExeUpdateSubOpSeae '" + BsNo + "' ");
SqlCommand cmd3 = new SqlCommand(strSql3.ToString(), dbcon);
cmd3.ExecuteNonQuery();
}
}
if (!string.IsNullOrEmpty(IRCODE))
{
var strSql = new StringBuilder();
strSql.Append("update op_seae set MBLNO='" + feeback.FeedbackData.MBLNO + "' where IRCODE='" + IRCODE + "' AND (ISNULL(MBLNO,'')='' or MBLNO LIKE '%*') ");
SqlCommand cmd = new SqlCommand(strSql.ToString(), dbcon);
cmd.ExecuteNonQuery();
var _count=cmd.ExecuteNonQuery();
logger.Debug($"执行语句1{strSql.ToString()}");
if (_count == 1 && UPDATESUBCOMPANY == "1")
{
var BsNo = GetBsNo(dbcon, "IRCODE='" + IRCODE + "'");
var strSql3 = new StringBuilder();
strSql3.Append("exec ExeUpdateSubOpSeae '" + BsNo + "' ");
SqlCommand cmd3 = new SqlCommand(strSql3.ToString(), dbcon);
cmd3.ExecuteNonQuery();
}
}
}
else
@ -220,11 +244,11 @@ namespace D7MqClient
};
model.BasicConsume(CompanyQueueName, true, consumer);
}
static public string GetBsNo(SqlConnection dbcon, string mblno)
static public string GetBsNo(SqlConnection dbcon, string constr)
{
string bsno = "";
var strSql = new StringBuilder();
strSql.Append("select BSNO from t_op_seae where CUSTNO='" + mblno + "'");
strSql.Append("select BSNO from t_op_seae where "+ constr);
SqlDataAdapter adapter = new SqlDataAdapter(strSql.ToString(), dbcon);
DataTable table = new DataTable();
adapter.Fill(table);

@ -1495,6 +1495,7 @@ namespace DSWeb.MvcShipping.Controllers
headData.CUSTNO = "";
headData.BSNO = "topseae" + Guid.NewGuid().ToString();
headData.MASTERNO = headData.BSNO;
headData.IRCODE = "";
if (bodyList != null)
{

@ -1485,9 +1485,9 @@ namespace DSWeb.MvcShipping.DAL.MsOpApplyDAL
}
}
}
StrSerialNo = StrSerialNo + ")";
var cmdDelete = db.GetSqlStringCommand("delete from op_apply_detail where BSNO='" + headData.BSNO + "' and SerialNo not in " + StrSerialNo);
db.ExecuteNonQuery(cmdDelete, tran);
//StrSerialNo = StrSerialNo + ")";
//var cmdDelete = db.GetSqlStringCommand("delete from op_apply_detail where BSNO='" + headData.BSNO + "' and SerialNo not in " + StrSerialNo);
//db.ExecuteNonQuery(cmdDelete, tran);
if (headData.IsSERVICE1 != "1") {
var cmdDeleteService1 = db.GetSqlStringCommand("delete from op_apply_service where OPField='SERVICE1' and BSNO='" + headData.BSNO + "'");

@ -3071,7 +3071,7 @@ namespace DSWeb.MvcShipping.DAL.MsOpSeaeDAL
strCNTRTOTAL = strCNTRTOTAL.Trim().Substring(0, strCNTRTOTAL.Trim().Length - 1);
}
}
str = "update op_seae_billmanage set CNTRTOTAL='" + strCNTRTOTAL + "',CNTRSEALNO='" + strCNTRNO + "' where AS_ID='" + strBSNO + "'";
str = "update op_seae_billmanage set CNTRTOTAL='" + strCNTRTOTAL + "' where AS_ID='" + strBSNO + "'";
bool bl = T_ALL_DA.GetExecuteSqlCommand(str);
}
@ -3193,6 +3193,13 @@ namespace DSWeb.MvcShipping.DAL.MsOpSeaeDAL
var NEWBSNO = new BSNOLB();
NEWBSNO.BSNO = bsno;
BSNOLIST.Add(NEWBSNO);
var UPDATESUBDATAAFTERSI = MsSysParamSetDAL.GetData("PARAMNAME='UPDATESUBDATAAFTERSI'");
if (UPDATESUBDATAAFTERSI.PARAMVALUE == "1")
{
var cmdCancel = db.GetSqlStringCommand("exec ExeCancelSubOpSeae '" + bsno + "'");
db.ExecuteNonQuery(cmdCancel, tran);
}
}
else {
var cmdUpdate = db.GetSqlStringCommand("update op_seae set iscancel='" + type + "' where bsno='" + bsno + "'");

@ -53,7 +53,7 @@ Ext.extend(Shipping.FeeAmendEditGrid, Ext.Panel, {
this.ADDAMENDNOTFEECLOSE = 0;
this.AmendSalenotedit = 0;
this.FEELOCKNOTPR = 0;
this.ACCTAXRATESAMETAXRATE = 0;
_thisAmendfee = this;
this.StoreDrOpRange = Ext.create('DsExt.ux.RefTableStore', {
model: 'MsFeeOP',
@ -934,7 +934,21 @@ Ext.extend(Shipping.FeeAmendEditGrid, Ext.Panel, {
},
width: 150
}, {
}, {
sortable: true,
dataIndex: 'AccTax',
header: Zi.LAN.FEE.AccTax2, //'销项税率',
renderer: function (value, cellmeta, record, rowIndex, columnIndex, store) { try { var lsValue = usMoney(value, 2, '', false); if (lsValue != "NaN") { value = lsValue; if (parseFloat(lsValue) < 0) { return '<SPAN style="COLOR: red">' + lsValue + '</SPAN>'; } } else { return value; } } catch (e) { return value; } return value; },
align: 'right',
width: 80
}, {
sortable: true,
dataIndex: 'AccAmount',
header: Zi.LAN.FEE.AccAmount2, //'销项税率',
renderer: function (value, cellmeta, record, rowIndex, columnIndex, store) { try { var lsValue = usMoney(value, 2, '', false); if (lsValue != "NaN") { value = lsValue; if (parseFloat(lsValue) < 0) { return '<SPAN style="COLOR: red">' + lsValue + '</SPAN>'; } } else { return value; } } catch (e) { return value; } return value; },
align: 'right',
width: 80
}, {
sortable: true,
dataIndex: 'IsAdvancedpay',
header: Zi.LAN.FEE.IsAdvancedpay, //'是否垫付',
@ -1743,7 +1757,21 @@ Ext.extend(Shipping.FeeAmendEditGrid, Ext.Panel, {
}
},
width: 150
}, {
}, {
sortable: true,
dataIndex: 'AccTax',
header: Zi.LAN.FEE.AccTax, //'进项税率',
renderer: function (value, cellmeta, record, rowIndex, columnIndex, store) { try { var lsValue = usMoney(value, 2, '', false); if (lsValue != "NaN") { value = lsValue; if (parseFloat(lsValue) < 0) { return '<SPAN style="COLOR: red">' + lsValue + '</SPAN>'; } } else { return value; } } catch (e) { return value; } return value; },
align: 'right',
width: 80
}, {
sortable: true,
dataIndex: 'AccAmount',
header: Zi.LAN.FEE.AccAmount, //'进项金额',
renderer: function (value, cellmeta, record, rowIndex, columnIndex, store) { try { var lsValue = usMoney(value, 2, '', false); if (lsValue != "NaN") { value = lsValue; if (parseFloat(lsValue) < 0) { return '<SPAN style="COLOR: red">' + lsValue + '</SPAN>'; } } else { return value; } } catch (e) { return value; } return value; },
align: 'right',
width: 80
}, {
sortable: true,
dataIndex: 'IsAdvancedpay',
header: Zi.LAN.FEE.IsAdvancedpay, //'是否垫付',
@ -3957,7 +3985,32 @@ Ext.extend(Shipping.FeeAmendEditGrid, Ext.Panel, {
},
scope: this
});
Ext.Ajax.request({
waitMsg: '',
url: '/MvcShipping/MsSysParamSet/GetData',
params: {
condition: "PARAMNAME='ACCTAXRATESAMETAXRATE'"
},
callback: function (options, success, response) {
if (success) {
var result = Ext.JSON.decode(response.responseText);
if (result.Success != true) {
} else {
var data = result.data;
if (data.PARAMVALUE == '1') {
this.ACCTAXRATESAMETAXRATE = 1;
} else {
}
}
} else {
}
},
scope: this
});
Ext.Ajax.request({
waitMsg: '',
@ -6370,7 +6423,22 @@ Ext.extend(Shipping.FeeAmendEditGrid, Ext.Panel, {
var unitPrice = e.record.data['UnitPrice'];
var quantity = e.record.data['Quantity'];
if (_thisAmendfee.ACCTAXRATESAMETAXRATE == 1) e.record.set('AccTaxRate', taxrate);
if (_thisAmendfee.ACCTAXRATESAMETAXRATE == 1) {
e.record.set('AccTaxRate', taxrate);
var amount = e.record.data['Amount'];
if (taxrate == 0) {
e.record.set('AccTax', 0);
} else {
var taxrateb = Add(1, Div(taxrate, 100, 4), 4);
var taxb = Div(amount, taxrateb);
var tax = Div(Mul(taxb, taxrate), 100);
var accamount = Add(amount, -tax);
e.record.set('AccTax', tax);
e.record.set('AccAmount', accamount);
}
}
if (unitPrice != null) {
var taxrateb = Add(1, Div(taxrate, 100, 4), 4);
//parseFloat(1 + parseFloat(taxrate).mul(0.01));

@ -548,14 +548,44 @@ Ext.extend(Shipping.FeeTemplateAdd, Ext.Panel, {
var memberyf = this.storeBodyChFee.getAt(i);
var record = null;
var records = DsStoreQueryBy(this.StoreFeeUnit, 'UNIT', memberyf.data.Unit);
var aUNIT = memberyf.data.Unit;
var quantity = 1;
// var feeType = memberyf.data.FeeType;
if (((memberyf.data.ISCTN && (records.getCount() > 0)) || (!memberyf.data.ISCTN))) {
if (records.getCount() > 0) {
var data = records.getAt(0).data;
var quantity = data.QUANTITY;
quantity = data.QUANTITY;
} else {
var quantity = 1;
if (memberyf.data.Unit == '箱型') {
var Unitrecords = DsStoreQueryLikeBy(this.StoreFeeUnit, 'UNIT', 1, '2');
if (Unitrecords.getCount() > 0) {
var ffdata = Unitrecords.getAt(0).data;
aUNIT = ffdata.UNIT;
} else {
var Unitrecords = DsStoreQueryLikeBy(this.StoreFeeUnit, 'UNIT', 1, '4');
if (Unitrecords.getCount() > 0) {
var ffdata = Unitrecords.getAt(0).data;
aUNIT = ffdata.UNIT;
}
}
if (aUNIT!= '') {
var Unitrecords = DsStoreQueryBy(this.StoreFeeUnit, 'UNIT', aUNIT);
if (Unitrecords.getCount() > 0) {
var Unitdata = Unitrecords.getAt(0).data;
quantity = Unitdata.QUANTITY;
}
}
} else {
}
}
var taxrate = memberyf.data.TaxRate;
// var taxrate = 0;
@ -675,7 +705,7 @@ Ext.extend(Shipping.FeeTemplateAdd, Ext.Panel, {
CustomerType: custtype,
CustomerName: custname,
CustomerFullName: custfullname,
Unit: memberyf.data.Unit,
Unit: aUNIT,
UnitPrice: memberyf.data.UnitPrice,
TaxUnitPrice: TaxUnitPrice,
Quantity: quantity,

@ -6300,6 +6300,7 @@ Ext.extend(Shipping.MsOpSeaeEdit, Ext.Panel, {
this.StoreSalesRepCode.add({ "ID": "CN099", "NAME": "CN099 | HELEN ZHANG" });
this.StoreSalesRepCode.add({ "ID": "CN100", "NAME": "CN100 | LEOREN" });
this.StoreSalesRepCode.add({ "ID": "CN302", "NAME": "CN302 | MELL" });
this.comboxSalesRepCode = Ext.create('DsExt.ux.RefTableCombox', {
store: this.StoreSalesRepCode,
fieldLabel: Zi.LAN.SalesRepCode, //"太平销售Edi代码",

@ -2955,8 +2955,8 @@ string swcn = "2020030084935", string swpw = "8a5889ea8e53b257e2a3ba053979ee64"
}
MBLNO = opapplyhead.MBLNO;
var updateseai = false;
var opseaihead = MsOpSeaiDAL.GetData("MBLNO='" + MBLNO + "'");
if (opseaihead.MBLNO == MBLNO&&!opseaihead.BSSTATUS) updateseai = true;
var opseaihead = MsOpSeaiDAL.GetData("MBLNO='" + MBLNO + "' or CUSTOMNO='"+ CUSTOMNO + "'");
if (!string.IsNullOrEmpty(opseaihead.CUSTNO)&&!opseaihead.BSSTATUS) updateseai = true;
SeqNo = opapplyhead.CUSCIQNO;
@ -3056,8 +3056,18 @@ string swcn = "2020030084935", string swpw = "8a5889ea8e53b257e2a3ba053979ee64"
opapplyhead.VESSEL = preDecHeadVo.trafName;
opapplyhead.VOYNO = preDecHeadVo.cusVoyageNo;
opapplyhead.PORTDISCHARGE = preDecHeadVo.distinatePortName;
if (string.IsNullOrEmpty(opapplyhead.ENTERP.Trim()))
opapplyhead.ENTERP = preDecHeadVo.consigneeCname;
if (preDecHeadVo.cusTradeCountry == "CHN")
{
//if (string.IsNullOrEmpty(opapplyhead.ENTERP.Trim()))
opapplyhead.ENTERP = DecHead_Local.TradeName;
}
else
{
//if (string.IsNullOrEmpty(opapplyhead.ENTERP.Trim()))
opapplyhead.ENTERP = preDecHeadVo.consigneeCname;
}
if (string.IsNullOrEmpty(opapplyhead.MBLNO.Trim()))
opapplyhead.MBLNO = preDecHeadVo.billNo;
if (string.IsNullOrEmpty(opapplyhead.CUSTOMNO.Trim()))
@ -3280,6 +3290,8 @@ string swcn = "2020030084935", string swpw = "8a5889ea8e53b257e2a3ba053979ee64"
var port_decMergeListVoList = preDecHeadVo.getdecMergeListVo();
var goodstr = "";
decimal goodsvalue = 0;
var GoodsList = new List<MsOpApplyDetail>();
int goodnum = 0;
if (port_decMergeListVoList.Count > 0)
foreach (var port_decMergeListVo in port_decMergeListVoList)
{
@ -3318,6 +3330,21 @@ string swcn = "2020030084935", string swpw = "8a5889ea8e53b257e2a3ba053979ee64"
goodstr = goodstr + port_decMergeListVo.codeTs + " " + port_decMergeListVo.gModel + " " + port_decMergeListVo.gName + " " + port_decMergeListVo.hsCodeDesc;
}
goodnum = goodnum + 1;
var opapplygood = new MsOpApplyDetail();
opapplygood.BsNo = "*";
opapplygood.SerialNo = goodnum;
opapplygood.GoodsName= port_decMergeListVo.gName;
if (!string.IsNullOrWhiteSpace(port_decMergeListVo.declPrice))
opapplygood.Price= Convert.ToDecimal(port_decMergeListVo.declPrice);
if (!string.IsNullOrWhiteSpace(port_decMergeListVo.declTotal))
opapplygood.Total = Convert.ToDecimal(port_decMergeListVo.declTotal);
opapplygood.GOODSMODEL = port_decMergeListVo.gModel;
if (!string.IsNullOrWhiteSpace(port_decMergeListVo.gQty))
opapplygood.Pkgs =Convert.ToDecimal(port_decMergeListVo.gQty);
opapplygood.Currency = port_decMergeListVo.tradeCurr;
opapplygood.GoodsCode = port_decMergeListVo.codeTs;
GoodsList.Add(opapplygood);
opapplyhead.ARCOUNTRY = port_decMergeListVo.cusOriginCountryName;
}
@ -3334,7 +3361,7 @@ string swcn = "2020030084935", string swpw = "8a5889ea8e53b257e2a3ba053979ee64"
var modb3 = new ModelObjectDB();
modb3.Save(opapplyhead);
MsOpApplyDAL.SaveDetail(opapplyhead, GoodsList, Convert.ToString(Session["USERID"]));
var Declist = lbll.GetModelList(0, 99, "PID='" + DecHead_Local.GID + "'", String.Format("{0}", "gNo", ""));
var count = lbll.GetRecordCount("PID='" + DecHead_Local.GID + "'");

Loading…
Cancel
Save