报关业务相关 微调

DS7_JinGang
ddlucky 2 years ago
parent b6d94b3cae
commit 9a5eaec679

@ -31,6 +31,8 @@ using DSWeb.MvcShipping.DAL.MsCodeOpTemplate;
using DSWeb.MvcShipping.DAL.MsChFeeDAL; using DSWeb.MvcShipping.DAL.MsChFeeDAL;
using DSWeb.Areas.MvcShipping.Models.Message.VGM; using DSWeb.Areas.MvcShipping.Models.Message.VGM;
using DSWeb.Common.DB; using DSWeb.Common.DB;
using DSWeb.Areas.MvcShipping.Helper;
using DSWeb.SoftMng.BLL;
namespace DSWeb.MvcShipping.Controllers namespace DSWeb.MvcShipping.Controllers
{ {
@ -167,6 +169,43 @@ namespace DSWeb.MvcShipping.Controllers
return new ContentResult() { Content = json }; return new ContentResult() { Content = json };
} }
private readonly DecListBLL lbll = new DecListBLL();
private readonly DecHeadBLL hbll = new DecHeadBLL();
public ContentResult GetOpseaiData(string handle, string condition)
{
MsOpApply_Opseai head = null;
if (handle == "edit")
{
head = AutoMapperHelper.MapTo<MsOpApply,MsOpApply_Opseai >( MsOpApplyDAL.GetData(condition));
var decheadList = hbll.GetModelList(" BSNO='" + head.BSNO + "'");
if (decheadList != null && decheadList.Count > 0) {
var dechead = decheadList[0];
var Declist = lbll.GetModelList(0, 99, "PID='" + dechead.GID + "'", String.Format("{0}", "gNo", ""));
head. = Declist[0].GName;
head. = Declist[0].DeclPrice.ToString();
}
}
if (head == null)
{
head = new MsOpApply_Opseai();
head.OP = Convert.ToString(Session["SHOWNAME"]);
head.BSTYPE = "2";
head.ETPS_CATEGORY = "A";
head.CDNTYPE = 0;
}
var json = JsonConvert.Serialize(
new { Success = true, Message = "查询成功", data = head });
return new ContentResult() { Content = json };
}
public ContentResult GetCopyData(string handle, string condition, string copyfee = "false") public ContentResult GetCopyData(string handle, string condition, string copyfee = "false")
{ {
MsOpApply head = null; MsOpApply head = null;

@ -82,6 +82,8 @@ namespace DSWeb.MvcShipping.DAL.MsOpApplyDAL
strSql.Append(",(SELECT TOP 1 STATUS FROM OP_STATUS WITH (NOLOCK) WHERE BSNO=OP_APPLY.BSNO ORDER BY COMPTIME DESC,INPUTTIME DESC) as OPSTATUS"); strSql.Append(",(SELECT TOP 1 STATUS FROM OP_STATUS WITH (NOLOCK) WHERE BSNO=OP_APPLY.BSNO ORDER BY COMPTIME DESC,INPUTTIME DESC) as OPSTATUS");
strSql.Append(",ETPS_CATEGORY,CDNTYPE,CUSTSERVICE,OPERATORCODE"); strSql.Append(",ETPS_CATEGORY,CDNTYPE,CUSTSERVICE,OPERATORCODE");
strSql.Append(",(select top 1 AgentStatus from decHead where decHead.BSNO=OP_APPLY.BSNO) AgentStatus");
strSql.Append(" from OP_APPLY "); strSql.Append(" from OP_APPLY ");
strSql.Append(" LEFT JOIN v_op_gain_dr_INV I ON (I.BSNO=OP_APPLY.BSNO) "); strSql.Append(" LEFT JOIN v_op_gain_dr_INV I ON (I.BSNO=OP_APPLY.BSNO) ");
@ -221,6 +223,9 @@ namespace DSWeb.MvcShipping.DAL.MsOpApplyDAL
strSql.Append(",(SELECT TOP 1 STATUS FROM OP_STATUS WITH (NOLOCK) WHERE BSNO=OP_APPLY.BSNO ORDER BY COMPTIME DESC,INPUTTIME DESC) as OPSTATUS"); strSql.Append(",(SELECT TOP 1 STATUS FROM OP_STATUS WITH (NOLOCK) WHERE BSNO=OP_APPLY.BSNO ORDER BY COMPTIME DESC,INPUTTIME DESC) as OPSTATUS");
strSql.Append(",ETPS_CATEGORY,CDNTYPE,CUSTSERVICE,OPERATORCODE"); strSql.Append(",ETPS_CATEGORY,CDNTYPE,CUSTSERVICE,OPERATORCODE");
strSql.Append(",(select top 1 AgentStatus from decHead where decHead.BSNO=OP_APPLY.BSNO) AgentStatus");
strSql.Append(" from OP_APPLY "); strSql.Append(" from OP_APPLY ");
if (!string.IsNullOrEmpty(condition)) if (!string.IsNullOrEmpty(condition))
@ -434,6 +439,7 @@ namespace DSWeb.MvcShipping.DAL.MsOpApplyDAL
if(reader["CDNTYPE"] != DBNull.Value) if(reader["CDNTYPE"] != DBNull.Value)
data.CDNTYPE = Convert.ToInt32(reader["CDNTYPE"]);// data.CDNTYPE = Convert.ToInt32(reader["CDNTYPE"]);//
data.OPERATORCODE = Convert.ToString(reader["OPERATORCODE"]);// data.OPERATORCODE = Convert.ToString(reader["OPERATORCODE"]);//
data.AgentStatus = Convert.ToString(reader["AgentStatus"]);//
#endregion #endregion
headList.Add(data); headList.Add(data);

@ -1034,6 +1034,12 @@ namespace DSWeb.MvcShipping.Models.MsOpApply
} }
#endregion #endregion
#region 附加字段
public string AgentStatus { get; set; } = "";
#endregion
public MsOpApply() public MsOpApply()
{ {
TableName = "op_apply"; TableName = "op_apply";
@ -1270,4 +1276,11 @@ namespace DSWeb.MvcShipping.Models.MsOpApply
} }
#endregion #endregion
} }
[JsonObject]
public class MsOpApply_Opseai : MsOpApply {
public string { get; set; }
public string { get; set; }
}
} }

@ -1011,6 +1011,28 @@ Ext.extend(Shipping.MsOpApplyIndex, Ext.Panel, {
header: '报关单类型', header: '报关单类型',
hidden: true, hidden: true,
width: 100 width: 100
}, {
sortable: true,
dataIndex: 'AgentStatus',
header: '单一窗口业务状态',
width: 120,
renderer: function (value, cellmeta, record, rowIndex, columnIndex, store) {
try {
if (value == "查验通知") {
return '<SPAN style="COLOR: red">查验通知</SPAN>';
}
else {
return value;
}
}
catch (e) {
return value;
}
return value;
}
} }
]; ];

@ -2,13 +2,13 @@
extend: 'Ext.data.Model', extend: 'Ext.data.Model',
idProperty: 'BSNO', idProperty: 'BSNO',
fields: [ fields: [
{ name: 'BSNO', type: 'string' }, { name: 'BSNO', type: 'string' },
{ name: 'BSSTATUS', type: 'boolean' }, { name: 'BSSTATUS', type: 'boolean' },
{ name: 'FEESTATUS', type: 'boolean' }, { name: 'FEESTATUS', type: 'boolean' },
{ name: 'BSSTATUSREF', type: 'string' }, { name: 'BSSTATUSREF', type: 'string' },
{ name: 'FEESTATUSREF', type: 'string' }, { name: 'FEESTATUSREF', type: 'string' },
{ name: 'DRFEESTATUS', type: 'string' }, { name: 'DRFEESTATUS', type: 'string' },
{ name: 'CRFEESTATUS', type: 'string' }, { name: 'CRFEESTATUS', type: 'string' },
{ name: 'DRINVSTATUS', type: 'string' }, { name: 'DRINVSTATUS', type: 'string' },
{ name: 'DRDUISTATUS', type: 'string' }, { name: 'DRDUISTATUS', type: 'string' },
{ name: 'CRINVSTATUS', type: 'string' }, { name: 'CRINVSTATUS', type: 'string' },
@ -130,8 +130,8 @@
{ name: 'PREMIUMCURRENCY', type: 'string' },//易航线_保费币制当premiumType是[率]时,不能填保费币制 { name: 'PREMIUMCURRENCY', type: 'string' },//易航线_保费币制当premiumType是[率]时,不能填保费币制
{ name: 'BillFeeStatus', type: 'string' }, { name: 'BillFeeStatus', type: 'string' },
{ name: 'ETPS_CATEGORY', type: 'string' },//报关企业类别 用于保存 ACD { name: 'ETPS_CATEGORY', type: 'string' },//报关企业类别 用于保存 ACD
{ name: 'CDNTYPE', type: 'decimal' }//报关单类型 0-4共5种 { name: 'CDNTYPE', type: 'decimal' },//报关单类型 0-4共5种
{ name: 'AgentStatus', type: 'string' }
] ]
}); });

@ -4786,7 +4786,7 @@ Ext.extend(Shipping.MsOpSeaiEdit, Ext.Panel, {
var MBLNO = this.formHead.getForm().findField('MBLNO').getValue(); var MBLNO = this.formHead.getForm().findField('MBLNO').getValue();
Ext.Ajax.request({ Ext.Ajax.request({
waitMsg: '正在查询主表数据...', waitMsg: '正在查询主表数据...',
url: '/MvcShipping/MsOpApply/GetData', url: '/MvcShipping/MsOpApply/GetOpseaiData',
params: { params: {
handle: 'edit', handle: 'edit',
condition: "MBLNO='" + MBLNO + "'" condition: "MBLNO='" + MBLNO + "'"
@ -4852,7 +4852,12 @@ Ext.extend(Shipping.MsOpSeaiEdit, Ext.Panel, {
this.formEdit.getForm().findField('INSPECTIONNO').setValue(data.INSPECTIONNO); this.formEdit.getForm().findField('INSPECTIONNO').setValue(data.INSPECTIONNO);
if (data.INSPECTIONDATE != '' && data.INSPECTIONDATE != null) if (data.INSPECTIONDATE != '' && data.INSPECTIONDATE != null)
this.formEdit.getForm().findField('INSPECTIONDATE').setValue(data.INSPECTIONDATE); this.formEdit.getForm().findField('INSPECTIONDATE').setValue(data.INSPECTIONDATE);
if (data.商品名称 != '' && data.商品名称 != null)
this.formEdit.getForm().findField('GOODSNAME').setValue(data.商品名称);
if (data.单价 != '' && data.单价 != null)
this.formEdit.getForm().findField('UNITPRICE').setValue(data.单价);
} }

@ -2767,37 +2767,39 @@ namespace DSWeb.SoftMng.Controllers
if (withdoc) if (withdoc)
{ {
JObject reqObj = new JObject(); JObject reqObj = new JObject
/*sw {
/*sw
md5
md5
Ii: , E:
1:0: Ii: , E:
string swcn = "2020030084935", string swpw = "8a5889ea8e53b257e2a3ba053979ee64" 1:0:
*/ string swcn = "2020030084935", string swpw = "8a5889ea8e53b257e2a3ba053979ee64"
*/
reqObj.Add("yardid", yardid); { "yardid", yardid },
reqObj.Add("swcn", swcn); { "swcn", swcn },
reqObj.Add("swpw", swpw); { "swpw", swpw },
reqObj.Add("cdn", CUSTOMNO); { "cdn", CUSTOMNO },
reqObj.Add("billno", MBLNO); { "billno", MBLNO },
reqObj.Add("unicode", unicode); { "unicode", unicode },
reqObj.Add("ies", ies); { "ies", ies },
reqObj.Add("clearance", clearance);//未结关 { "clearance", clearance },//未结关
reqObj.Add("cdnType", cdntype);//单据类型 { "cdnType", cdntype },//单据类型
reqObj.Add("starttime", starttime);// { "starttime", starttime },//
reqObj.Add("endtime", endtime);// { "endtime", endtime },//
{ "etps_category", etps_category }//
};
reqObj.Add("etps_category", etps_category);//
//reqObj.Add("billno", "KMTCSIN2287541"); //reqObj.Add("billno", "KMTCSIN2287541");
//reqObj.Add("ies", "I"); //reqObj.Add("ies", "I");
@ -2811,34 +2813,36 @@ namespace DSWeb.SoftMng.Controllers
} }
if (!withdoc) { if (!withdoc) {
JObject reqObj = new JObject(); JObject reqObj = new JObject
/*sw {
/*sw
md5
md5
Ii: , E:
1:0: Ii: , E:
string swcn = "2020030084935", string swpw = "8a5889ea8e53b257e2a3ba053979ee64" 1:0:
*/ string swcn = "2020030084935", string swpw = "8a5889ea8e53b257e2a3ba053979ee64"
*/
reqObj.Add("card", swcn); { "card", swcn },
reqObj.Add("pwd", swpw); { "pwd", swpw },
reqObj.Add("ies", ies); { "ies", ies },
reqObj.Add("clear", clearance);//未结关 { "clear", clearance },//未结关
reqObj.Add("cdnType", cdntype);//单据类型 { "cdnType", cdntype },//单据类型
reqObj.Add("cdn", CUSTOMNO); { "cdn", CUSTOMNO },
reqObj.Add("bill", MBLNO); { "bill", MBLNO },
reqObj.Add("unicode", unicode); { "unicode", unicode },
reqObj.Add("start", starttime);// { "start", starttime },//
reqObj.Add("end", endtime);// { "end", endtime },//
reqObj.Add("startNumber", "0");// { "startNumber", "0" },//
reqObj.Add("endNumber", "1");// { "endNumber", "1" },//
reqObj.Add("etps_category", etps_category);// { "etps_category", etps_category }//
};
reqObj.ToString(Newtonsoft.Json.Formatting.None); reqObj.ToString(Newtonsoft.Json.Formatting.None);
@ -3048,13 +3052,54 @@ namespace DSWeb.SoftMng.Controllers
//} //}
if (updateseai) {
opapplyhead.VESSEL = preDecHeadVo.trafName;
opapplyhead.VOYNO = preDecHeadVo.cusVoyageNo;
opapplyhead.PORTDISCHARGE = preDecHeadVo.distinatePortName;
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()))
opapplyhead.CUSTOMNO = preDecHeadVo.entryId;
//opseaihead.GOODSNAME
opapplyhead.PKGS = Convert.ToInt32(preDecHeadVo.packNo);
opapplyhead.KGS = Convert.ToDecimal(preDecHeadVo.grossWt);
opapplyhead.NETWEIGHT = Convert.ToDecimal(preDecHeadVo.netWt);
opapplyhead.CONTRACTNO = DecHead_Local.ContrNo;
if (!string.IsNullOrWhiteSpace(preDecHeadVo.transMode))
opapplyhead.TRADETERM = preDecHeadVo.transMode;
if (opapplyhead.ENTERP == null || string.IsNullOrEmpty(opapplyhead.ENTERP.Trim()))
opapplyhead.ENTERP = DecHead_Local.TradeName;
if (!string.IsNullOrWhiteSpace(preDecHeadVo.iEDate)) {
if (ies == "E") {
if (string.IsNullOrWhiteSpace(opapplyhead.ETD)) {
opapplyhead.ETD= DateTime.ParseExact(preDecHeadVo.iEDate, "yyyyMMdd", System.Globalization.CultureInfo.CurrentCulture).ToString("yyyy-MM-dd");
}
}
if (ies == "I")
{
if (string.IsNullOrWhiteSpace(opapplyhead.ETA))
{
opapplyhead.ETA = DateTime.ParseExact(preDecHeadVo.iEDate, "yyyyMMdd", System.Globalization.CultureInfo.CurrentCulture).ToString("yyyy-MM-dd");
}
}
}
if (updateseai)
{
if (!string.IsNullOrWhiteSpace(preDecHeadVo.trafName)) if (!string.IsNullOrWhiteSpace(preDecHeadVo.trafName))
opseaihead.VESSEL = preDecHeadVo.trafName; opseaihead.VESSEL = preDecHeadVo.trafName;
if (!string.IsNullOrWhiteSpace(preDecHeadVo.cusVoyageNo)) if (!string.IsNullOrWhiteSpace(preDecHeadVo.cusVoyageNo))
opseaihead.VOYNO = preDecHeadVo.cusVoyageNo; opseaihead.VOYNO = preDecHeadVo.cusVoyageNo;
if (!string.IsNullOrWhiteSpace(preDecHeadVo.iEDate)) if (!string.IsNullOrWhiteSpace(preDecHeadVo.iEDate))
opseaihead.ETD = DateTime.ParseExact(preDecHeadVo.iEDate, "yyyyMMdd", System.Globalization.CultureInfo.CurrentCulture).ToString("yyyy-MM-dd") ; opseaihead.ETD = DateTime.ParseExact(preDecHeadVo.iEDate, "yyyyMMdd", System.Globalization.CultureInfo.CurrentCulture).ToString("yyyy-MM-dd");
if (!string.IsNullOrWhiteSpace(preDecHeadVo.distinatePortName)) if (!string.IsNullOrWhiteSpace(preDecHeadVo.distinatePortName))
opseaihead.PORTLOAD = preDecHeadVo.distinatePortName; opseaihead.PORTLOAD = preDecHeadVo.distinatePortName;
if (!string.IsNullOrWhiteSpace(preDecHeadVo.customMasterName)) if (!string.IsNullOrWhiteSpace(preDecHeadVo.customMasterName))
@ -3070,42 +3115,23 @@ namespace DSWeb.SoftMng.Controllers
if (!string.IsNullOrWhiteSpace(preDecHeadVo.entryId)) if (!string.IsNullOrWhiteSpace(preDecHeadVo.entryId))
opseaihead.CUSTOMNO = preDecHeadVo.entryId; opseaihead.CUSTOMNO = preDecHeadVo.entryId;
//opseaihead.GOODSNAME //opseaihead.GOODSNAME
if (!string.IsNullOrWhiteSpace(preDecHeadVo.packNo )) if (!string.IsNullOrWhiteSpace(preDecHeadVo.packNo))
opseaihead.PKGS = Convert.ToInt32(preDecHeadVo.packNo); opseaihead.PKGS = Convert.ToInt32(preDecHeadVo.packNo);
if (!string.IsNullOrWhiteSpace(preDecHeadVo.wrapTypeName)) if (!string.IsNullOrWhiteSpace(preDecHeadVo.wrapTypeName))
opseaihead.KINDPKGS = preDecHeadVo.wrapTypeName; opseaihead.KINDPKGS = preDecHeadVo.wrapTypeName;
if (!string.IsNullOrWhiteSpace(preDecHeadVo.grossWt)) if (!string.IsNullOrWhiteSpace(preDecHeadVo.grossWt))
opseaihead.KGS = Convert.ToDecimal(preDecHeadVo.grossWt); opseaihead.KGS = Convert.ToDecimal(preDecHeadVo.grossWt);
if (!string.IsNullOrWhiteSpace(preDecHeadVo.netWt )) if (!string.IsNullOrWhiteSpace(preDecHeadVo.netWt))
opseaihead.NETWEIGHT = Convert.ToDecimal(preDecHeadVo.netWt); opseaihead.NETWEIGHT = Convert.ToDecimal(preDecHeadVo.netWt);
if (!string.IsNullOrWhiteSpace(preDecHeadVo.transMode)) if (!string.IsNullOrWhiteSpace(preDecHeadVo.transMode))
opseaihead.TRADETERM = preDecHeadVo.transMode; opseaihead.TRADETERM = preDecHeadVo.transMode;
if (!string.IsNullOrWhiteSpace(preDecHeadVo.dDate)) if (!string.IsNullOrWhiteSpace(preDecHeadVo.dDate))
opseaihead.UPDATETIME = preDecHeadVo.dDate; opseaihead.UPDATETIME = preDecHeadVo.dDate;
//opseaihead.CUSTOMDATE= //opseaihead.CUSTOMDATE=
} }
opapplyhead.VESSEL = preDecHeadVo.trafName;
opapplyhead.VOYNO = preDecHeadVo.cusVoyageNo;
opapplyhead.PORTDISCHARGE = preDecHeadVo.distinatePortName;
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()))
opapplyhead.CUSTOMNO = preDecHeadVo.entryId;
//opseaihead.GOODSNAME
opapplyhead.PKGS = Convert.ToInt32(preDecHeadVo.packNo);
opapplyhead.KGS = Convert.ToDecimal(preDecHeadVo.grossWt);
opapplyhead.NETWEIGHT = Convert.ToDecimal(preDecHeadVo.netWt);
opapplyhead.CONTRACTNO = DecHead_Local.ContrNo;
if (opapplyhead.ENTERP == null || string.IsNullOrEmpty(opapplyhead.ENTERP.Trim()))
opapplyhead.ENTERP = DecHead_Local.TradeName;
//opapplyhead.RelId //opapplyhead.RelId
if (trueinfo) if (trueinfo)
@ -3296,6 +3322,8 @@ namespace DSWeb.SoftMng.Controllers
} }
opapplyhead.CARGOVALUE = goodsvalue.ToString();
if (updateseai) if (updateseai)
{ {
opseaihead.IMPORTVALUE = goodsvalue; opseaihead.IMPORTVALUE = goodsvalue;

@ -2555,7 +2555,7 @@ namespace DSWeb.SoftMng.Model{
DecList.CodeTS = codeTs; DecList.CodeTS = codeTs;
DecList.CiqCode = ciqCode; DecList.CiqCode = ciqCode;
DecList.CiqCode_Text = ciqName; DecList.CiqCode_Text = ciqName;
DecList.GName = gName; DecList.GName = gName;//商品名称
DecList.GModel = gModel; DecList.GModel = gModel;
DecList.GQty = Convert.ToDecimal( gQty); DecList.GQty = Convert.ToDecimal( gQty);
DecList.GUnit = gUnit; DecList.GUnit = gUnit;
@ -2673,13 +2673,13 @@ namespace DSWeb.SoftMng.Model{
DecHead.TradeCode = !string.IsNullOrWhiteSpace(cnsnTradeCode) ? cnsnTradeCode : rcvgdTradeCode; DecHead.TradeCode = !string.IsNullOrWhiteSpace(cnsnTradeCode) ? cnsnTradeCode : rcvgdTradeCode;
//10位检验检疫编码 //10位检验检疫编码
//DecHead.TradeCiqCode = !string.IsNullOrWhiteSpace(consignorCode) ? consignorCode:consigneeCode; //DecHead.TradeCiqCode = !string.IsNullOrWhiteSpace(consignorCode) ? consignorCode:consigneeCode;
DecHead.TradeCiqCode = !string.IsNullOrWhiteSpace(consigneeCode) ? consigneeCode : consignorCode; DecHead.TradeCiqCode = !string.IsNullOrWhiteSpace(consignorCode) ? consignorCode : consignorCode;
//企业名称(中文) //企业名称(中文)
DecHead.TradeName = !string.IsNullOrWhiteSpace(consignorCname)? consignorCname:consigneeCname; DecHead.TradeName = !string.IsNullOrWhiteSpace(consignorCname)? consignorCname:consigneeCname;
//境外收发货人 consigneeCode?? //境外收发货人 consigneeCode??
//DecHead.OverseasConsigneeCode = !string.IsNullOrWhiteSpace(consigneeCode)? consigneeCode: consignorCode; //DecHead.OverseasConsigneeCode = !string.IsNullOrWhiteSpace(consigneeCode)? consigneeCode: consignorCode;
DecHead.OverseasConsigneeCode = !string.IsNullOrWhiteSpace(consignorCode) ? consignorCode : consigneeCode; DecHead.OverseasConsigneeCode = !string.IsNullOrWhiteSpace(consigneeCode) ? consigneeCode : consigneeCode;
//企业名称(外文) //企业名称(外文)
DecHead.OverseasConsigneeEname = !string.IsNullOrWhiteSpace(consigneeEname)? consigneeEname:consignorEname; DecHead.OverseasConsigneeEname = !string.IsNullOrWhiteSpace(consigneeEname)? consigneeEname:consignorEname;

Loading…
Cancel
Save