报关业务相关 微调

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.Areas.MvcShipping.Models.Message.VGM;
using DSWeb.Common.DB;
using DSWeb.Areas.MvcShipping.Helper;
using DSWeb.SoftMng.BLL;
namespace DSWeb.MvcShipping.Controllers
{
@ -167,6 +169,43 @@ namespace DSWeb.MvcShipping.Controllers
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")
{
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(",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(" 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(",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 ");
if (!string.IsNullOrEmpty(condition))
@ -434,6 +439,7 @@ namespace DSWeb.MvcShipping.DAL.MsOpApplyDAL
if(reader["CDNTYPE"] != DBNull.Value)
data.CDNTYPE = Convert.ToInt32(reader["CDNTYPE"]);//
data.OPERATORCODE = Convert.ToString(reader["OPERATORCODE"]);//
data.AgentStatus = Convert.ToString(reader["AgentStatus"]);//
#endregion
headList.Add(data);

@ -1034,6 +1034,12 @@ namespace DSWeb.MvcShipping.Models.MsOpApply
}
#endregion
#region 附加字段
public string AgentStatus { get; set; } = "";
#endregion
public MsOpApply()
{
TableName = "op_apply";
@ -1270,4 +1276,11 @@ namespace DSWeb.MvcShipping.Models.MsOpApply
}
#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: '报关单类型',
hidden: true,
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;
}
}
];

@ -130,8 +130,8 @@
{ name: 'PREMIUMCURRENCY', type: 'string' },//易航线_保费币制当premiumType是[率]时,不能填保费币制
{ name: 'BillFeeStatus', type: 'string' },
{ 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();
Ext.Ajax.request({
waitMsg: '正在查询主表数据...',
url: '/MvcShipping/MsOpApply/GetData',
url: '/MvcShipping/MsOpApply/GetOpseaiData',
params: {
handle: 'edit',
condition: "MBLNO='" + MBLNO + "'"
@ -4853,6 +4853,11 @@ Ext.extend(Shipping.MsOpSeaiEdit, Ext.Panel, {
if (data.INSPECTIONDATE != '' && data.INSPECTIONDATE != null)
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,36 +2767,38 @@ namespace DSWeb.SoftMng.Controllers
if (withdoc)
{
JObject reqObj = new JObject();
JObject reqObj = new JObject
{
/*sw
md5
Ii: , E:
1:0:
string swcn = "2020030084935", string swpw = "8a5889ea8e53b257e2a3ba053979ee64"
*/
md5
Ii: , E:
1:0:
string swcn = "2020030084935", string swpw = "8a5889ea8e53b257e2a3ba053979ee64"
*/
reqObj.Add("yardid", yardid);
reqObj.Add("swcn", swcn);
reqObj.Add("swpw", swpw);
reqObj.Add("cdn", CUSTOMNO);
reqObj.Add("billno", MBLNO);
reqObj.Add("unicode", unicode);
{ "yardid", yardid },
{ "swcn", swcn },
{ "swpw", swpw },
{ "cdn", CUSTOMNO },
{ "billno", MBLNO },
{ "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 },//
reqObj.Add("etps_category", etps_category);//
{ "etps_category", etps_category }//
};
//reqObj.Add("billno", "KMTCSIN2287541");
@ -2811,7 +2813,8 @@ namespace DSWeb.SoftMng.Controllers
}
if (!withdoc) {
JObject reqObj = new JObject();
JObject reqObj = new JObject
{
/*sw
md5
@ -2821,24 +2824,25 @@ namespace DSWeb.SoftMng.Controllers
string swcn = "2020030084935", string swpw = "8a5889ea8e53b257e2a3ba053979ee64"
*/
reqObj.Add("card", swcn);
reqObj.Add("pwd", swpw);
reqObj.Add("ies", ies);
reqObj.Add("clear", clearance);//未结关
{ "card", swcn },
{ "pwd", swpw },
{ "ies", ies },
{ "clear", clearance },//未结关
reqObj.Add("cdnType", cdntype);//单据类型
{ "cdnType", cdntype },//单据类型
reqObj.Add("cdn", CUSTOMNO);
reqObj.Add("bill", MBLNO);
reqObj.Add("unicode", unicode);
{ "cdn", CUSTOMNO },
{ "bill", MBLNO },
{ "unicode", unicode },
reqObj.Add("start", starttime);//
{ "start", starttime },//
reqObj.Add("end", endtime);//
{ "end", endtime },//
reqObj.Add("startNumber", "0");//
reqObj.Add("endNumber", "1");//
reqObj.Add("etps_category", etps_category);//
{ "startNumber", "0" },//
{ "endNumber", "1" },//
{ "etps_category", etps_category }//
};
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))
opseaihead.VESSEL = preDecHeadVo.trafName;
if (!string.IsNullOrWhiteSpace(preDecHeadVo.cusVoyageNo))
opseaihead.VOYNO = preDecHeadVo.cusVoyageNo;
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))
opseaihead.PORTLOAD = preDecHeadVo.distinatePortName;
if (!string.IsNullOrWhiteSpace(preDecHeadVo.customMasterName))
@ -3070,41 +3115,22 @@ namespace DSWeb.SoftMng.Controllers
if (!string.IsNullOrWhiteSpace(preDecHeadVo.entryId))
opseaihead.CUSTOMNO = preDecHeadVo.entryId;
//opseaihead.GOODSNAME
if (!string.IsNullOrWhiteSpace(preDecHeadVo.packNo ))
if (!string.IsNullOrWhiteSpace(preDecHeadVo.packNo))
opseaihead.PKGS = Convert.ToInt32(preDecHeadVo.packNo);
if (!string.IsNullOrWhiteSpace(preDecHeadVo.wrapTypeName))
opseaihead.KINDPKGS = preDecHeadVo.wrapTypeName;
if (!string.IsNullOrWhiteSpace(preDecHeadVo.grossWt))
opseaihead.KGS = Convert.ToDecimal(preDecHeadVo.grossWt);
if (!string.IsNullOrWhiteSpace(preDecHeadVo.netWt ))
if (!string.IsNullOrWhiteSpace(preDecHeadVo.netWt))
opseaihead.NETWEIGHT = Convert.ToDecimal(preDecHeadVo.netWt);
if (!string.IsNullOrWhiteSpace(preDecHeadVo.transMode))
opseaihead.TRADETERM = preDecHeadVo.transMode;
if (!string.IsNullOrWhiteSpace(preDecHeadVo.dDate))
opseaihead.UPDATETIME = preDecHeadVo.dDate;
//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
@ -3296,6 +3322,8 @@ namespace DSWeb.SoftMng.Controllers
}
opapplyhead.CARGOVALUE = goodsvalue.ToString();
if (updateseai)
{
opseaihead.IMPORTVALUE = goodsvalue;

@ -2555,7 +2555,7 @@ namespace DSWeb.SoftMng.Model{
DecList.CodeTS = codeTs;
DecList.CiqCode = ciqCode;
DecList.CiqCode_Text = ciqName;
DecList.GName = gName;
DecList.GName = gName;//商品名称
DecList.GModel = gModel;
DecList.GQty = Convert.ToDecimal( gQty);
DecList.GUnit = gUnit;
@ -2673,13 +2673,13 @@ namespace DSWeb.SoftMng.Model{
DecHead.TradeCode = !string.IsNullOrWhiteSpace(cnsnTradeCode) ? cnsnTradeCode : rcvgdTradeCode;
//10位检验检疫编码
//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;
//境外收发货人 consigneeCode??
//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;

Loading…
Cancel
Save