签单条业务查询允许二次签出;海运进口获取报关业务信息,如对应多个报关业务的话改为报错

DS7_JinGang
ddlucky 2 years ago
parent 7c99712b3a
commit 16fb1ff074

@ -178,7 +178,14 @@ namespace DSWeb.MvcShipping.Controllers
if (handle == "edit")
{
head = AutoMapperHelper.MapTo<MsOpApply,MsOpApply_Opseai >( MsOpApplyDAL.GetData(condition));
var applylist = MsOpApplyDAL.GetDataAll(condition);
if (applylist!=null && applylist.Count > 1) {
var json0 = JsonConvert.Serialize(
new { Success = false, Message = "根据提单号和报关单号对应到多于一个报关业务,请确认填写的信息是否正确。" });
return new ContentResult() { Content = json0 };
}
head = AutoMapperHelper.MapTo<MsOpApply,MsOpApply_Opseai>(applylist[0]);
var BodyList = MsOpApplyDAL.GetBodyList(" BsNo='" + head.BSNO + "'");

@ -184,6 +184,65 @@ namespace DSWeb.MvcShipping.DAL.MsOpApplyDAL
}
static public MsOpApply GetData(string condition,string dbname = "")
{
//var strSql = new StringBuilder();
//strSql.Append("SELECT ");
//strSql.Append("BsNo,BsStatus,FeeStatus,BsDate,AccDate,OpDate,Mblno,Hblno,CustNo,BSCUSTOMNO,'' DRFEESTATUS,'' CRFEESTATUS,ISPRINTPR ");
//strSql.Append(",CustomerName,BsType,Vessel,VoyNo,ETD,ETA,PORTLOAD,PORTDISCHARGE,MASTERNO");
//strSql.Append(",INPUTBY,OP,SALE,CUSTOMSER,BSSOURCE,BSSOURCEDETAIL");
//strSql.Append(",CORPID,SALEDEPT,PKGS,KGS,NETWEIGHT,CBM,MANIFESTSTATUS");
//strSql.Append(",CUSTOMNO,CUSTOMDATE,INSPECTIONNO,INSPECTIONDATE,INVNO,CONTRACTNO,ARCOUNTRY,GOODSOURCE");
//strSql.Append(",DOCNO,TRADETYPE,REMARK,BOOKNO,BYCUSTOM,ENTERPID,ENTERP,CLEARCUSTOMDATE,ISMOREGOOD,INSPECTSERVICE,CUSTOMSNUM,TRADETERM");
//strSql.Append(",IsService1,IsService2,IsService3,IsService4,IsService5,IsService6,IsService7,IsService8");
//strSql.Append(",IsService9,IsService10,IsService11,IsService12,IsService13,IsService14,IsService15,IsService16");
//strSql.Append(",(select EnumValueName from tSysEnumValue where LangId=0 and EnumTypeID=96004 and EnumValueID=OP_APPLY.BsType) as BsTypeREF");
//strSql.Append(",(CASE BsStatus WHEN 1 THEN '锁定' else '未锁定' end) as bsstatusref ");
//strSql.Append(",(CASE FeeStatus WHEN 1 THEN '锁定' else '未锁定' end) as feestatusref ");
//strSql.Append(",(Select STATUS from op_apply_service where BSNO=OP_APPLY.BSNO AND OPField='SERVICE1') as SERVICE1 ");
//strSql.Append(",(Select STATUS from op_apply_service where BSNO=OP_APPLY.BSNO AND OPField='SERVICE2') as SERVICE2 ");
//strSql.Append(",(Select STATUS from op_apply_service where BSNO=OP_APPLY.BSNO AND OPField='SERVICE3') as SERVICE3 ");
//strSql.Append(",(Select STATUS from op_apply_service where BSNO=OP_APPLY.BSNO AND OPField='SERVICE4') as SERVICE4 ");
//strSql.Append(",(Select STATUS from op_apply_service where BSNO=OP_APPLY.BSNO AND OPField='SERVICE5') as SERVICE5 ");
//strSql.Append(",(Select STATUS from op_apply_service where BSNO=OP_APPLY.BSNO AND OPField='SERVICE6') as SERVICE6 ");
//strSql.Append(",(Select STATUS from op_apply_service where BSNO=OP_APPLY.BSNO AND OPField='SERVICE7') as SERVICE7 ");
//strSql.Append(",(Select STATUS from op_apply_service where BSNO=OP_APPLY.BSNO AND OPField='SERVICE7') as SERVICE8 ");
//strSql.Append(",(Select STATUS from op_apply_service where BSNO=OP_APPLY.BSNO AND OPField='SERVICE9') as SERVICE9 ");
//strSql.Append(",(Select STATUS from op_apply_service where BSNO=OP_APPLY.BSNO AND OPField='SERVICE10') as SERVICE10 ");
//strSql.Append(",(Select STATUS from op_apply_service where BSNO=OP_APPLY.BSNO AND OPField='SERVICE11') as SERVICE11 ");
//strSql.Append(",(Select STATUS from op_apply_service where BSNO=OP_APPLY.BSNO AND OPField='SERVICE12') as SERVICE12 ");
//strSql.Append(",(Select STATUS from op_apply_service where BSNO=OP_APPLY.BSNO AND OPField='SERVICE13') as SERVICE13 ");
//strSql.Append(",(Select STATUS from op_apply_service where BSNO=OP_APPLY.BSNO AND OPField='SERVICE14') as SERVICE14 ");
//strSql.Append(",(Select STATUS from op_apply_service where BSNO=OP_APPLY.BSNO AND OPField='SERVICE15') as SERVICE15 ");
//strSql.Append(",(Select STATUS from op_apply_service where BSNO=OP_APPLY.BSNO AND OPField='SERVICE16') as SERVICE16 ");
//strSql.Append(",(select EnumValueName from tSysEnumValue where LangId=0 and EnumTypeID=97018 and EnumValueID=OP_APPLY.MANIFESTSTATUS) as MANIFESTSTATUSREF");
//strSql.Append(",(select TOP 1 CUSTNO from v_op_bs_no where BSNO=OP_APPLY.MASTERNO) as BSCUSTNO ");
//strSql.Append(",0 TTLDR,0 TTLINVDR,0 TTLDUIDR,0 TTLCR,0 TTLINVCR,0 TTLDUICR,CUSTOMTYPE,ISCLEAR,ISCUSTOMEND,CUSTOMSLNO,WMSNO,CURRENCY,CARGOVALUE,INQUNO,ISDY");
//strSql.Append(",[ediYwlx],[recordSn],[payMent],[carriageType],[carriagePrice],[carriageCurrency],[premiumType],[premiumPrice],[premiumCurrency]");
//strSql.Append(",SALECORPID,(select [NAME] from [company] where GID=OP_APPLY.SALECORPID) as SALECORP,BillFeeStatus ");
//strSql.Append(",[DOCSTATUS],[CUSCIQNO],[TRANCUSTOMNO],[CUSTOMLOCKNO],[EXPCUSTOMTYPE],[DESPPORT],CONSIGNEE ");
//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))
//{
// strSql.Append(" where " + condition);
//}
//var list=SetData(strSql, dbname);
var list = GetDataAll(condition, dbname);
if (list.Count > 0)
return list[0];
return new MsOpApply();
}
static public List<MsOpApply> GetDataAll(string condition, string dbname = "")
{
var strSql = new StringBuilder();
strSql.Append("SELECT ");
@ -225,7 +284,7 @@ namespace DSWeb.MvcShipping.DAL.MsOpApplyDAL
strSql.Append(",(select top 1 AgentStatus from decHead where decHead.BSNO=OP_APPLY.BSNO) AgentStatus");
strSql.Append(" from OP_APPLY ");
if (!string.IsNullOrEmpty(condition))
@ -234,13 +293,14 @@ namespace DSWeb.MvcShipping.DAL.MsOpApplyDAL
}
var list=SetData(strSql, dbname);
if (list.Count > 0)
return list[0];
var list = SetData(strSql, dbname);
//if (list.Count > 0)
// return list[0];
return new MsOpApply();
//return new MsOpApply();
return list;
}
private static List<MsOpApply> SetData(StringBuilder strSql,string dbname = "")
{
var headList = new List<MsOpApply>();

@ -3109,7 +3109,7 @@ Ext.extend(Shipping.BillCheckOutEdit, Ext.Panel, {
return '';
}
var sql = " (not exists(select 1 from BillCheckOut_Detail where BSNO=b.BSNO) and exists(select 1 from op_status where bsno=b.bsno and STATUS='提单签入') )";
var sql = " (b.BLISSUESTATUS<>'提单签出' and exists(select 1 from op_status where bsno=b.bsno and STATUS='提单签入')) ";
var customNo = form.findField('CustomNo').getValue();
sql = sql + getAndConSql(sql, customNo, " (b.CUSTNO like '%" + customNo + "%' or b.MBLNO like '%" + customNo + "%' or b.HBLNO like '%" + customNo + "%' or b.CUSTOMNO like '%" + customNo + "%')");

@ -4818,6 +4818,18 @@ Ext.extend(Shipping.MsOpSeaiEdit, Ext.Panel, {
data = result.data;
if (data.MBLNO != '') {
if (data.MBLNO != '' && data.MBLNO != null) {
_mblno = this.formEdit.getForm().findField('MBLNO').getValue();
if (_mblno) {
} else {
this.formEdit.getForm().findField('MBLNO').setValue(data.MBLNO);
}
}
if (data.VESSEL != '' && data.VESSEL != null)
this.formEdit.getForm().findField('VESSEL').setValue(data.VESSEL);
if (data.VOYNO != '' && data.VOYNO != null)

Loading…
Cancel
Save