DS7_JinGang
hanxuntao 1 year ago
commit 309fb45515

@ -1037,9 +1037,10 @@ namespace DSWeb.Areas.Account.Controllers
} }
else else
{ {
jsonRespose.Success = false; //jsonRespose.Success = false;
jsonRespose.Message = "必须选择冲红理由!"; //jsonRespose.Message = "必须选择冲红理由!";
return jsonRespose; //return jsonRespose;
head.redReason = "2";
} }
} }
} }
@ -1067,9 +1068,16 @@ namespace DSWeb.Areas.Account.Controllers
} }
else else
{ {
jsonRespose.Success = false; //jsonRespose.Success = false;
jsonRespose.Message = "必须选择冲红理由!"; //jsonRespose.Message = "必须选择冲红理由!";
return jsonRespose; //return jsonRespose;
head.redReason = "2";
head.DbOperationType = DbOperationType.DbotUpd;
head.ModelUIStatus = "E";
var modb = new ModelObjectDB();
result = modb.Save(head);
} }
} }
@ -1245,7 +1253,7 @@ namespace DSWeb.Areas.Account.Controllers
} }
else if (head.INVITERFACE == "诺诺全电发票") else if (head.INVITERFACE == "诺诺全电发票")
{ {
var hx = .getHelper(head.TAXCODE); var hx = .getHelper(head.TAXCODE,head.COMPANYID);
if (!hx.CanUse) if (!hx.CanUse)
{ {
jsonRespose.Success = false; jsonRespose.Success = false;
@ -1488,7 +1496,7 @@ namespace DSWeb.Areas.Account.Controllers
if (!checkresult.Success) return checkresult; if (!checkresult.Success) return checkresult;
var head = (ChInvoice_HangXin)checkresult.Data; var head = (ChInvoice_HangXin)checkresult.Data;
var hx = .getHelper(head.TAXCODE); var hx = .getHelper(head.TAXCODE, head.COMPANYID);
if (!hx.CanUse) if (!hx.CanUse)
{ {
jsonRespose.Success = false; jsonRespose.Success = false;
@ -1932,7 +1940,7 @@ namespace DSWeb.Areas.Account.Controllers
} }
else if (head.INVITERFACE == "诺诺全电发票") else if (head.INVITERFACE == "诺诺全电发票")
{ {
var hx = .getHelper(head.TAXCODE); var hx = .getHelper(head.TAXCODE, head.COMPANYID);
//20230529 //20230529
//1 如果ch_fee_invoice.billuuid有值的话 //1 如果ch_fee_invoice.billuuid有值的话
@ -2029,6 +2037,10 @@ namespace DSWeb.Areas.Account.Controllers
result = hx.PostRedConfirm(redhead, ref head, detailList); result = hx.PostRedConfirm(redhead, ref head, detailList);
if (result.Success == false)
{
}
} }
//诺诺全电票根据红字申请单的结果读取确认单 //诺诺全电票根据红字申请单的结果读取确认单
modb.Save(head); modb.Save(head);
@ -2055,7 +2067,7 @@ namespace DSWeb.Areas.Account.Controllers
var result = new DBResult(); var result = new DBResult();
var hx = .getHelper(head.TAXCODE); var hx = .getHelper(head.TAXCODE, head.COMPANYID);
if (!hx.CanUse) if (!hx.CanUse)
{ {
result.SetErrorInfo(hx.ERRORMSG); result.SetErrorInfo(hx.ERRORMSG);

@ -975,7 +975,15 @@ namespace DSWeb.Areas.Account.Models.Chfee_Invoice_HangXin
//若有值,则在无需确认或购销双方已确认后去自动开红票,发票的开票单号用该值 //若有值,则在无需确认或购销双方已确认后去自动开红票,发票的开票单号用该值
//public string orderNo { get { return ChInvoice_HangXin.BILLNO; } } //public string orderNo { get { return ChInvoice_HangXin.BILLNO; } }
public string phone { get { return ChInvoice_HangXin.PUSHMOBILE; } } public string phone
{
get
{
if (ChInvoice_HangXin.PUSHMOBILE == "0") return "";
else
return ChInvoice_HangXin.PUSHMOBILE;
}
}
public string email { get { return ChInvoice_HangXin.PUSHEMAIL; } } public string email { get { return ChInvoice_HangXin.PUSHEMAIL; } }
} }
@ -1511,7 +1519,7 @@ namespace DSWeb.Areas.Account.Models.Chfee_Invoice_HangXin
} }
} }
protected static HangXinRequestHelper getPortToken_(string taxnum) protected static HangXinRequestHelper getPortToken_(string taxnum,string CORPID)
{ {
try try
@ -2050,10 +2058,10 @@ namespace DSWeb.Areas.Account.Models.Chfee_Invoice_HangXin
public class : HangXinRequestHelper public class : HangXinRequestHelper
{ {
public static getHelper(string taxnum) public static getHelper(string taxnum,string CORPID)
{ {
var _token = getPortToken_(taxnum); var _token = getPortToken_(taxnum,CORPID);
result = new (); result = new ();
result.appKey = _token.appKey; result.appKey = _token.appKey;
@ -2132,8 +2140,8 @@ namespace DSWeb.Areas.Account.Models.Chfee_Invoice_HangXin
head.INVOICECODE = info.invoiceCode; head.INVOICECODE = info.invoiceCode;
head.INVOICENO = info.invoiceNo; head.INVOICENO = info.invoiceNo;
head.EINVOICESTATE = info.status; head.EINVOICESTATE = info.status;
head.INVOICEINFOURL = info.ofdUrl; head.INVOICEINFOURL = info.pdfUrl;
head.INVOICEPDFURL = info.paperPdfUrl; head.INVOICEPDFURL = info.pdfUrl;
head.INVOICEMAKETIME = BasicDataRefDAL.Timestamp2Datetime(info.invoiceTime).ToString("yyyy-MM-dd HH:mm:ss"); head.INVOICEMAKETIME = BasicDataRefDAL.Timestamp2Datetime(info.invoiceTime).ToString("yyyy-MM-dd HH:mm:ss");
//if (!string.IsNullOrWhiteSpace(info.invoiceSerialNum)) //if (!string.IsNullOrWhiteSpace(info.invoiceSerialNum))
@ -2157,7 +2165,7 @@ namespace DSWeb.Areas.Account.Models.Chfee_Invoice_HangXin
result.Message += ":" + info.failCause; result.Message += ":" + info.failCause;
//此处调用一次重推 //此处调用一次重推
var hx = getHelper(head.TAXCODE); var hx = getHelper(head.TAXCODE,head.COMPANYID);
hx.(head); hx.(head);
} }
else else
@ -2412,11 +2420,13 @@ namespace DSWeb.Areas.Account.Models.Chfee_Invoice_HangXin
if (!_r.Success) if (!_r.Success)
{ {
if (_r.Message != "红字确认单申请中")
bluehead.billUuid = "";
return _r; return _r;
} }
else else
{ {
var hx = .getHelper(head.TAXCODE); var hx = .getHelper(head.TAXCODE, head.COMPANYID);
if (!hx.CanUse) if (!hx.CanUse)
{ {
result.SetErrorInfo(hx.ERRORMSG); result.SetErrorInfo(hx.ERRORMSG);
@ -2433,6 +2443,7 @@ namespace DSWeb.Areas.Account.Models.Chfee_Invoice_HangXin
if (!result.Success) if (!result.Success)
{ {
return result; return result;
} }
@ -2572,6 +2583,7 @@ namespace DSWeb.Areas.Account.Models.Chfee_Invoice_HangXin
} }
else else
{ {
return result.SetErrorInfo(_return.()); return result.SetErrorInfo(_return.());
} }

@ -111,6 +111,7 @@ namespace DSWeb.MvcShipping.Controllers
head.CUSTSERVICE = Convert.ToString(Session["SHOWNAME"]); head.CUSTSERVICE = Convert.ToString(Session["SHOWNAME"]);
head.SALE = Convert.ToString(Session["SHOWNAME"]); head.SALE = Convert.ToString(Session["SHOWNAME"]);
head.SALEDEPT = Convert.ToString(Session["DEPTNAME"]); head.SALEDEPT = Convert.ToString(Session["DEPTNAME"]);
head.BSNO = "topseae" + Guid.NewGuid().ToString();
} }
if (handle == "copyadd") { if (handle == "copyadd") {
head.INPUTBY = Convert.ToString(Session["SHOWNAME"]); head.INPUTBY = Convert.ToString(Session["SHOWNAME"]);
@ -137,6 +138,12 @@ namespace DSWeb.MvcShipping.Controllers
public ContentResult Save(string opstatus, string data, string data2, string data3, string body) public ContentResult Save(string opstatus, string data, string data2, string data3, string body)
{ {
if (Convert.ToString(Session["COMPANYID"]).ToString().Trim() == "" || Convert.ToString(Session["USERID"]).ToString().Trim() == "" || Convert.ToString(Session["CODENAME"]).ToString().Trim() == "" || Convert.ToString(Session["SHOWNAME"]).ToString().Trim() == "" || Convert.ToString(Session["DEPTNAME"]).ToString().Trim() == "")
{
var jsonRespose2 = new JsonResponse { Success = false, Message = "登录超时,请退出系统重新登录!" };
return new ContentResult() { Content = JsonConvert.Serialize(jsonRespose2) };
}
var headData = JsonConvert.Deserialize<MsSeaeOrder>(data.Replace("}", ",") + data2.Replace("{", "").Replace("}", ",") + data3.Replace("{", "")); var headData = JsonConvert.Deserialize<MsSeaeOrder>(data.Replace("}", ",") + data2.Replace("{", "").Replace("}", ",") + data3.Replace("{", ""));
var bodyList = JsonConvert.Deserialize<List<MsSeaeOrderCtn>>(body); var bodyList = JsonConvert.Deserialize<List<MsSeaeOrderCtn>>(body);
var isPost = true; var isPost = true;
@ -153,6 +160,9 @@ namespace DSWeb.MvcShipping.Controllers
} }
} }
if (string.IsNullOrWhiteSpace(headData.BSNO)) {
headData.BSNO = "topseae" + System.Guid.NewGuid().ToString();
}
if (opstatus == "add") if (opstatus == "add")

@ -21,12 +21,19 @@ namespace DSWeb.MvcShipping.DAL.MsSysInvInterFaceSet
strSql.Append("SELECT GID,INVOICELINE,INVITERFACE,[CREATEUSER]"); strSql.Append("SELECT GID,INVOICELINE,INVITERFACE,[CREATEUSER]");
strSql.Append(",[CREATETIME],[MODIFIEDUSER],[MODIFIEDTIME],[COMPANYID],NUONUOAPPKEY,NUONUOAPPSECRET"); strSql.Append(",[CREATETIME],[MODIFIEDUSER],[MODIFIEDTIME],[COMPANYID],NUONUOAPPKEY,NUONUOAPPSECRET");
strSql.Append(",(select ShowName from [user] where GID=sys_inv_interfaceset.CREATEUSER) as CREATEUSERREF"); strSql.Append(",(select ShowName from [user] where GID=sys_inv_interfaceset.CREATEUSER) as CREATEUSERREF");
strSql.Append(",CORPID,(select Name from [company] where GID=sys_inv_interfaceset.CORPID) as COMPANYNAME");
strSql.Append(" from sys_inv_interfaceset where 1=1 "); strSql.Append(" from sys_inv_interfaceset where 1=1 ");
if (!string.IsNullOrEmpty(strCondition)) if (!string.IsNullOrEmpty(strCondition))
{ {
strSql.Append(" and " + strCondition); strSql.Append(" and " + strCondition);
} }
if (!string.IsNullOrEmpty(companyid))
{
strSql.Append($" and CORPID='{companyid}'" );
}
var sortstring = DatasetSort.Getsortstring(sort); var sortstring = DatasetSort.Getsortstring(sort);
if (!string.IsNullOrEmpty(sortstring)) if (!string.IsNullOrEmpty(sortstring))
{ {
@ -75,6 +82,8 @@ namespace DSWeb.MvcShipping.DAL.MsSysInvInterFaceSet
data.COMPANYID = Convert.ToString(reader["COMPANYID"]); data.COMPANYID = Convert.ToString(reader["COMPANYID"]);
data.NUONUOAPPKEY = Convert.ToString(reader["NUONUOAPPKEY"]); data.NUONUOAPPKEY = Convert.ToString(reader["NUONUOAPPKEY"]);
data.NUONUOAPPSECRET = Convert.ToString(reader["NUONUOAPPSECRET"]); data.NUONUOAPPSECRET = Convert.ToString(reader["NUONUOAPPSECRET"]);
data.CORPID = Convert.ToString(reader["CORPID"]);
data.COMPANYNAME = Convert.ToString(reader["COMPANYNAME"]);
#endregion #endregion
headList.Add(data); headList.Add(data);
} }
@ -100,12 +109,12 @@ namespace DSWeb.MvcShipping.DAL.MsSysInvInterFaceSet
var cmdInsert = var cmdInsert =
db.GetSqlStringCommand( db.GetSqlStringCommand(
@"insert into sys_inv_interfaceset (GID,INVOICELINE,INVITERFACE,COMPANYID,CREATEUSER,CREATETIME) @"insert into sys_inv_interfaceset (GID,INVOICELINE,INVITERFACE,COMPANYID,CREATEUSER,CREATETIME,CORPID)
values (@GID,@INVOICELINE,@INVITERFACE,@COMPANYID,@CREATEUSER,@CREATETIME,@NUONUOAPPKEY,@NUONUOAPPSECRET) "); values (@GID,@INVOICELINE,@INVITERFACE,@COMPANYID,@CREATEUSER,@CREATETIME,@NUONUOAPPKEY,@NUONUOAPPSECRET,@CORPID) ");
var cmdUpdate = var cmdUpdate =
db.GetSqlStringCommand( db.GetSqlStringCommand(
@"update sys_inv_interfaceset set INVOICELINE=@INVOICELINE,INVITERFACE=@INVITERFACE,MODIFIEDUSER=@MODIFIEDUSER,MODIFIEDTIME=@MODIFIEDTIME,NUONUOAPPKEY=@NUONUOAPPKEY,NUONUOAPPSECRET=@NUONUOAPPSECRET where GID=@GID "); @"update sys_inv_interfaceset set INVOICELINE=@INVOICELINE,INVITERFACE=@INVITERFACE,MODIFIEDUSER=@MODIFIEDUSER,MODIFIEDTIME=@MODIFIEDTIME,NUONUOAPPKEY=@NUONUOAPPKEY,NUONUOAPPSECRET=@NUONUOAPPSECRET,CORPID=@CORPID where GID=@GID ");
if (bodyList != null) if (bodyList != null)
{ {
@ -125,6 +134,7 @@ namespace DSWeb.MvcShipping.DAL.MsSysInvInterFaceSet
db.AddInParameter(cmdInsert, "@COMPANYID", DbType.String, companyid); db.AddInParameter(cmdInsert, "@COMPANYID", DbType.String, companyid);
db.AddInParameter(cmdInsert, "@NUONUOAPPKEY", DbType.String, enumValue.NUONUOAPPKEY); db.AddInParameter(cmdInsert, "@NUONUOAPPKEY", DbType.String, enumValue.NUONUOAPPKEY);
db.AddInParameter(cmdInsert, "@NUONUOAPPSECRET", DbType.String, enumValue.NUONUOAPPSECRET); db.AddInParameter(cmdInsert, "@NUONUOAPPSECRET", DbType.String, enumValue.NUONUOAPPSECRET);
db.AddInParameter(cmdInsert, "@CORPID", DbType.String, enumValue.CORPID);
db.ExecuteNonQuery(cmdInsert, tran); db.ExecuteNonQuery(cmdInsert, tran);
} }
else else
@ -138,6 +148,7 @@ namespace DSWeb.MvcShipping.DAL.MsSysInvInterFaceSet
db.AddInParameter(cmdUpdate, "@MODIFIEDUSER", DbType.String, userid); db.AddInParameter(cmdUpdate, "@MODIFIEDUSER", DbType.String, userid);
db.AddInParameter(cmdUpdate, "@NUONUOAPPKEY", DbType.String, enumValue.NUONUOAPPKEY); db.AddInParameter(cmdUpdate, "@NUONUOAPPKEY", DbType.String, enumValue.NUONUOAPPKEY);
db.AddInParameter(cmdUpdate, "@NUONUOAPPSECRET", DbType.String, enumValue.NUONUOAPPSECRET); db.AddInParameter(cmdUpdate, "@NUONUOAPPSECRET", DbType.String, enumValue.NUONUOAPPSECRET);
db.AddInParameter(cmdUpdate, "@CORPID", DbType.String, enumValue.CORPID);
db.AddInParameter(cmdUpdate, "@GID", DbType.String, enumValue.GID); db.AddInParameter(cmdUpdate, "@GID", DbType.String, enumValue.GID);
db.ExecuteNonQuery(cmdUpdate, tran); db.ExecuteNonQuery(cmdUpdate, tran);
} }

@ -91,6 +91,7 @@ namespace DSWeb.MvcShipping.DAL.MsSysParamSet
static public string GetSysParamValue(string PARAMNAME) static public string GetSysParamValue(string PARAMNAME)
{ {
var param = GetData("PARAMNAME = '" + PARAMNAME + "'"); var param = GetData("PARAMNAME = '" + PARAMNAME + "'");
if (param == null) return "";
return param.PARAMVALUE; return param.PARAMVALUE;
} }

@ -82,6 +82,11 @@ namespace DSWeb.MvcShipping.Models.SysInvInterFaceSet
[ModelDB] [ModelDB]
public string NUONUOAPPSECRET { get; set; } public string NUONUOAPPSECRET { get; set; }
[ModelDB]
public string CORPID { get; set; }
public string COMPANYNAME { get; set; }
#endregion #endregion
} }

@ -4789,11 +4789,11 @@ Ext.extend(Shipping.MsOpSeaiEdit, Ext.Panel, {
var condition = ""; var condition = "";
if (MBLNO && CUSTOMNO) { if (MBLNO && CUSTOMNO) {
condition = "(MBLNO='" + MBLNO + "' or CUSTOMNO='" + CUSTOMNO + "')"; condition = "( (isnull(MBLNO,'')<>'' and MBLNO='" + MBLNO + "') and (isnull(CUSTOMNO,'')<>'' and CUSTOMNO='" + CUSTOMNO + "'))";
} else if (CUSTOMNO) { } else if (CUSTOMNO) {
condition = "( CUSTOMNO='" + CUSTOMNO + "')"; condition = "(isnull(CUSTOMNO,'')<>'' and CUSTOMNO='" + CUSTOMNO + "'))";
} else if (MBLNO) { } else if (MBLNO) {
condition = "( MBLNO='" + MBLNO + "')"; condition = "(isnull(MBLNO,'')<>'' and MBLNO='" + MBLNO + "')";
} else return; } else return;
Ext.Ajax.request({ Ext.Ajax.request({

@ -50,6 +50,66 @@ Ext.extend(Shipping.MsSysInvInterFaceSetIndex, Ext.Panel, {
displayField: 'EnumValueName' displayField: 'EnumValueName'
}); });
Ext.define('MsCompanysEntity', {
extend: 'Ext.data.Model',
idProperty: 'GID',
fields: [
{ name: 'GID', type: 'string' }, //GID
{ name: 'CODENAME', type: 'string' }, //CODENAME
{ name: 'NAME', type: 'string' }, //NAME
{ name: 'FULLNAME', type: 'string' }, //FULLNAME
{ name: 'ENNAME', type: 'string' }, //公司英文名称
{ name: 'ADDRESS', type: 'string' }, //ADDRESS
{ name: 'ENADDRESS', type: 'string' }, //公司英文地址
{ name: 'POSTCODE', type: 'string' }, //POSTCODE
{ name: 'OFFICEPHONE', type: 'string' }, //OFFICEPHONE
{ name: 'FAX', type: 'string' }, //FAX
{ name: 'EMAIL', type: 'string' }, //EMAIL
{ name: 'WEBSITEURL', type: 'string' }, //WEBSITEURL
{ name: 'LICENSECODE', type: 'string' }, //LICENSECODE
{ name: 'TAXCODE', type: 'string' }, //TAXCODE
//{name: 'LOGO', type: 'byte[]' }, //徽标
{ name: 'CREATEUSER', type: 'string' }, //CREATEUSER
{ name: 'CREATETIME', type: 'DateTime' }, //CREATETIME
{ name: 'MODIFIEDUSER', type: 'string' }, //更新人gid
{ name: 'MODIFIEDTIME', type: 'DateTime' }, //更新时间
{ name: 'ISDELETED', type: 'bool' }, //ISDELETED
{ name: 'ISDISABLE', type: 'bool' }, //ISDISABLE
{ name: 'PARENTID', type: 'string' }, //PARENTID
{ name: 'BILLRISES', type: 'string' }, //发票抬头
{ name: 'CHEQUEPAYABLE', type: 'string' }, //支票抬头
{ name: 'PRTHEADXML1', type: 'string' }, //打印抬头1
{ name: 'PRTHEADXML2', type: 'string' }, //打印抬头2
{ name: 'PRTHEADXML3', type: 'string' }, //打印抬头3
{ name: 'PRTHEADXML4', type: 'string' }, //打印抬头4
{ name: 'PRTHEADXML5', type: 'string' }, //打印抬头5
{ name: 'BANKSHEAD', type: 'string' }, //BANKSHEAD
{ name: 'LOCALCURR', type: 'string' }, //本地货币
{ name: 'WORKFLOWMSG', type: 'string' }, //是否启用消息提示
{ name: 'GPSUSER', type: 'string' }, //GPSUser
{ name: 'GPSPASSWORD', type: 'string' }, //GPSPassWord
{ name: 'ORGANIZATIONCODE', type: 'string' },
{ name: 'MODIFIEDUSERNAME', type: 'string' },
{ name: 'DBNAME', type: 'string' },
{ name: 'LOGOURL', type: 'string' }
]
});
this.storeSaleCompany = Ext.create('DsExt.ux.RefTableStore', {
model: 'MsCompanysEntity',
proxy: { url: '/MvcShipping/MsCompanys/GetNoPicDataList' }
});
this.storeSaleCompany.load({ params: { condition: "" } });
this.comboxSaleCompany = Ext.create('DsExt.ux.RefTableCombox', {
fieldLabel: Zi.LAN.SALECOMPANY, //'委托分公司',
store: this.storeSaleCompany,
forceSelection: true,
name: 'CORPID',
valueField: 'GID',
displayField: 'NAME'
});
_this = this; _this = this;
@ -78,39 +138,50 @@ Ext.extend(Shipping.MsSysInvInterFaceSetIndex, Ext.Panel, {
hidden: true, hidden: true,
width: 120 width: 120
}, { }, {
sortable: true, sortable: true,
dataIndex: 'INVOICELINE', dataIndex: 'INVOICELINE',
header: '发票种类', header: '发票种类',
width: 160, width: 160,
editor: this.comboxINVOICELINE editor: this.comboxINVOICELINE
}, { }, {
sortable: true, sortable: true,
dataIndex: 'INVITERFACE', dataIndex: 'INVITERFACE',
header: '接口类型', header: '接口类型',
width: 160, width: 160,
editor: this.comboxINVITERFACE editor: this.comboxINVITERFACE
}, { }, {
sortable: true, sortable: true,
dataIndex: 'NUONUOAPPKEY', dataIndex: 'NUONUOAPPKEY',
header: 'AppKey', header: 'AppKey',
width: 90, width: 90,
editor: { editor: {
xtype: 'textfield' xtype: 'textfield'
} }
}, { }, {
sortable: true, sortable: true,
dataIndex: 'NUONUOAPPSECRET', dataIndex: 'NUONUOAPPSECRET',
header: 'AppSecret', header: 'AppSecret',
width: 160, width: 160,
editor: { editor: {
xtype: 'textfield' xtype: 'textfield'
} }
}, { }, {
sortable: true, sortable: true,
dataIndex: 'CREATEUSERREF', dataIndex: 'CORPID',
header: '录入人', header: '所属公司',
width: 85 width: 85,
}, { renderer: function (value, p, record) {
if (value == null || value == '') return '';
else return record.data.COMPANYNAME;
},
editor: this.comboxSaleCompany
}, {
sortable: true,
dataIndex: 'CREATEUSERREF',
header: '录入人',
width: 85
}, {
sortable: true, sortable: true,
dataIndex: 'CREATETIME', dataIndex: 'CREATETIME',
header: '录入时间', header: '录入时间',
@ -319,6 +390,17 @@ Ext.extend(Shipping.MsSysInvInterFaceSetIndex, Ext.Panel, {
gridListAfterEdit: function (editor, e, eOpts) { gridListAfterEdit: function (editor, e, eOpts) {
if (e.value == e.originalValue) return; if (e.value == e.originalValue) return;
if (e.field == 'CORPID') {
var currrecords = DsStoreQueryBy(this.storeSaleCompany, 'GID', e.value);
if (currrecords.getCount() > 0) {
var currdata = currrecords.getAt(0).data;
e.record.set('COMPANYNAME', currdata.NAME);
//e.record.set('Exchangerate', currdata.DEFRATE);
} else {
e.record.set('COMPANYNAME', '');
}
}
}, },
getCondition: function () { getCondition: function () {

@ -10,6 +10,8 @@
{ name: 'CREATETIME', type: 'string' }, { name: 'CREATETIME', type: 'string' },
{ name: 'COMPANYID', type: 'string' }, { name: 'COMPANYID', type: 'string' },
{ name: 'NUONUOAPPKEY', type: 'string' }, { name: 'NUONUOAPPKEY', type: 'string' },
{ name: 'NUONUOAPPSECRET', type: 'string' } { name: 'NUONUOAPPSECRET', type: 'string' },
{ name: 'CORPID', type: 'string' },
{ name: 'COMPANYNAME', type: 'string' }
] ]
}); });

@ -3282,16 +3282,48 @@ string swcn = "2020030084935", string swpw = "8a5889ea8e53b257e2a3ba053979ee64"
} }
MBLNO = opapplyhead.MBLNO; MBLNO = opapplyhead.MBLNO;
var updateseai = false; var updateseai = false;
var opseaiheadList = MsOpSeaiDAL.GetDataAll(" ((isnull(MBLNO,'')<>'' and MBLNO='" + MBLNO + "' ) or (isnull(CUSTOMNO,'')<>'' and CUSTOMNO='" + CUSTOMNO + "') )");
//20230606 根据系统配置值
var updopseaiType = MsSysParamSetDAL.GetSysParamValue("ApplySaveToOpseai");
//0不保存 1提单号 2报关单号 3提单号或报关单号
var opseaiheadList = new List<MsOpSeai>();
//MsOpSeaiDAL.GetDataAll(" ((isnull(MBLNO,'')<>'' and MBLNO='" + MBLNO + "' ) or (isnull(CUSTOMNO,'')<>'' and CUSTOMNO='" + CUSTOMNO + "') )");
//if (!string.IsNullOrEmpty(opseaihead.CUSTNO) && !opseaihead.BSSTATUS) updateseai = true; //if (!string.IsNullOrEmpty(opseaihead.CUSTNO) && !opseaihead.BSSTATUS) updateseai = true;
var opseaihead = new MsOpSeai(); var opseaihead = new MsOpSeai();
if (opseaiheadList == null || opseaiheadList.Count==0 ||(opseaiheadList != null && opseaiheadList.Count > 1))
if (updopseaiType != "0")
{ {
updateseai = false; var condition = "1=2";
if (updopseaiType == "1") {
condition = " ((isnull(MBLNO,'')<>'' and MBLNO='" + MBLNO + "' ) ";
}
if (updopseaiType == "2")
{
condition = " ((isnull(CUSTOMNO,'')<>'' and CUSTOMNO='" + MBLNO + "' ) ";
}
if (updopseaiType == "3")
{
condition = " ((isnull(MBLNO,'')<>'' and MBLNO='" + MBLNO + "' ) or (isnull(CUSTOMNO,'')<>'' and CUSTOMNO='" + CUSTOMNO + "') )";
}
opseaiheadList = MsOpSeaiDAL.GetDataAll(condition);
if (opseaiheadList == null || opseaiheadList.Count == 0 || (opseaiheadList != null && opseaiheadList.Count > 1))
{
updateseai = false;
}
else
{
opseaihead = opseaiheadList[0];
updateseai = true;
}
} }
else { else {
opseaihead = opseaiheadList[0]; updateseai = false;
updateseai = true;
} }

@ -59,10 +59,12 @@ namespace JobReqWebData
using (SqlTransaction trans = db.BeginTransaction()) using (SqlTransaction trans = db.BeginTransaction())
{ {
log.Debug("插入"+ row["MBLNO"].ToString()+"-"+ row["HBLNO"].ToString()); log.Debug("插入"+ row["MBLNO"].ToString()+"-"+ row["HBLNO"].ToString());
string sql = "insert into tb_order(BSNO,业务编号,提单号,分单号,客户名称,发货人,收货人,启运港,目的港,国家名称,船名,航次,箱量表示" + string sql = "insert into tb_order(BSNO,业务编号,提单号,分单号,客户名称,发货人,收货人,启运港,目的港,国家名称" +
",出口类型,运输条款,预计离港,实际离港,联系客户时间,建立时间,出号时间,操作时间,船公司,PO,品名,HS编码,件数文本,重量文本,尺码文本,保险联系人)"; ",船名,航次,箱量表示,出口类型,运输条款,预计离港,实际离港,联系客户时间,建立时间,出号时间" +
sql = sql + " values (@BSNO,@CUSTNO,@MBLNO,@HBLNO,@CUSTOMERNAME,@SHIPPER,@CONSIGNEE,@PORTLOAD,@DESTINATION,@COUNTRY,@VESSEL,@VOYNO,@CNTRTOTAL,@BLTYPE" + ",操作时间,船公司,PO,品名,HS编码,件数文本,重量文本,尺码文本,保险联系人)";
",@SERVICE,@ETD,@ATD,@LINKCUSTTIME,@CREATETIME,@MBLNOTIME,@BSDATE,@CARRIER,@PONO,@GOODSNAME,@HSCODE,@NOPKGS,@GROSSWEIGHT,@MEASUREMENT,@INSURANCEOP)"; sql = sql + " values (@BSNO,@CUSTNO,@MBLNO,@HBLNO,@CUSTOMERNAME,@SHIPPER,@CONSIGNEE,@PORTLOAD,@DESTINATION,@COUNTRY" +
",@VESSEL,@VOYNO,@CNTRTOTAL,@BLTYPE,@SERVICE,@ETD,@ATD,@LINKCUSTTIME,@CREATETIME,@MBLNOTIME" +
",@BSDATE,@CARRIER,@PONO,@GOODSNAME,@HSCODE,@NOPKGS,@GROSSWEIGHT,@MEASUREMENT,@INSURANCEOP)";
SqlCommand cmd = new SqlCommand(sql, db, trans); SqlCommand cmd = new SqlCommand(sql, db, trans);
cmd.Parameters.AddWithValue("@BSNO", row["AS_ID"].ToString()); cmd.Parameters.AddWithValue("@BSNO", row["AS_ID"].ToString());
cmd.Parameters.AddWithValue("@CUSTNO", row["CUSTNO"].ToString()); cmd.Parameters.AddWithValue("@CUSTNO", row["CUSTNO"].ToString());

Loading…
Cancel
Save