Merge branch 'DS7_JingHan' of http://60.209.125.238:13080/dengyu/DS7 into DS7_JingHan

DS7_JingHan
hanxuntao 2 years ago
commit d3765606e7

@ -2144,4 +2144,17 @@ namespace DSWeb.Common.DB
public string OFFICEADDR { get; set; } public string OFFICEADDR { get; set; }
} }
/// <summary>
/// 报关业务 单一窗口
/// </summary>
[Table("LicenseDocu")]
public partial class LicenseDocu_md
{
[Key]
public string GID { get; set; }
public string DocuCode { get; set; }
public string DocuCode_Text { get; set; }
public string CertCode { get; set; }
public string PID { get; set; }
}
} }

@ -97,7 +97,7 @@ namespace DSWeb.Common.DB
public DbSet<op_task_md> op_task { get; set; } public DbSet<op_task_md> op_task { get; set; }
public DbSet<op_task_fieldvalue_md> op_task_fieldvalue { get; set; } public DbSet<op_task_fieldvalue_md> op_task_fieldvalue { get; set; }
public DbSet<code_employee_md> code_employee { get; set; } public DbSet<code_employee_md> code_employee { get; set; }
public DbSet<LicenseDocu_md> LicenseDocu { get; set; }
} }

@ -6493,6 +6493,18 @@ namespace DSWeb.Areas.CommMng.DAL
return 0M; return 0M;
} }
} }
public static int String2Int32(string str)
{
try
{
return string.IsNullOrWhiteSpace(str) ? 0 : Convert.ToInt32(str);
}
catch
{
return 0;
}
}
#endregion #endregion
public static ContentResult GetContentResult(DBResult dbresult) public static ContentResult GetContentResult(DBResult dbresult)

@ -7,11 +7,17 @@ using System.Data.Entity.Migrations;
using System.Diagnostics; using System.Diagnostics;
using System.Linq; using System.Linq;
using System.Text; using System.Text;
using System.Threading.Tasks;
using System.Web; using System.Web;
using System.Web.Mvc; using System.Web.Mvc;
using Aspose.Words.Drawing;
using Colo.Web;
using Colo.Web.admin.user; using Colo.Web.admin.user;
using com.sun.org.apache.bcel.@internal.generic; using com.sun.org.apache.bcel.@internal.generic;
using com.sun.org.apache.xerces.@internal.jaxp.validation;
using com.sun.tools.apt.util;
using DSWeb.Areas.CommMng.Models; using DSWeb.Areas.CommMng.Models;
using DSWeb.Areas.Import.DAL.ReceiptDoc;
using DSWeb.Areas.MvcShipping.Helper; using DSWeb.Areas.MvcShipping.Helper;
using DSWeb.Common.DB; using DSWeb.Common.DB;
using DSWeb.EntityDA; using DSWeb.EntityDA;
@ -21,7 +27,9 @@ using DSWeb.MvcShipping.Helper;
using DSWeb.MvcShipping.Helper.Repository; using DSWeb.MvcShipping.Helper.Repository;
using DSWeb.MvcShipping.Models.MsInfoClient; using DSWeb.MvcShipping.Models.MsInfoClient;
using DSWeb.MvcShipping.Models.MsOpApply; using DSWeb.MvcShipping.Models.MsOpApply;
using DSWeb.MvcShipping.Models.WMSNew;
using DSWeb.ParameterSet; using DSWeb.ParameterSet;
using DSWeb.SoftMng.BLL;
using DSWeb.SoftMng.Model; using DSWeb.SoftMng.Model;
using DSWeb.TruckMng.Comm.Cookie; using DSWeb.TruckMng.Comm.Cookie;
@ -29,12 +37,13 @@ using HcUtility.Comm;
using java.rmi.server; using java.rmi.server;
using Microsoft.Practices.EnterpriseLibrary.Data; using Microsoft.Practices.EnterpriseLibrary.Data;
using NPOI.SS.Formula.Functions; using NPOI.SS.Formula.Functions;
using Quartz.Util;
namespace DSWeb.Areas.CommMng.DAL namespace DSWeb.Areas.CommMng.DAL
{ {
public class PublicAPIDAL public class PublicAPIDAL
{ {
public static JsonResponse GuanMaoYun_Head_Save(GuanMaoYun_Head head,string OP) public static JsonResponse GuanMaoYun_Head_Save(GuanMaoYun_Head head,string OP,string userid)
{ {
var result = new JsonResponse(); var result = new JsonResponse();
@ -201,6 +210,14 @@ namespace DSWeb.Areas.CommMng.DAL
, ModelObjectConvert<MsOpCtn>.ToModelObjectList(delCtnList) , ModelObjectConvert<MsOpCtn>.ToModelObjectList(delCtnList)
); );
//20230308 增加对单一窗口模块的数据写入
if (_r.Success) {
var _r6= SaveDecHead(OpapplyHead.MASTERNO,userid);
if (_r6.Success == false) {
_r.OK(_r6.Message);
}
}
result = new JsonResponse { Success = _r.Success, Message = _r.Message, Data = _r.Data }; result = new JsonResponse { Success = _r.Success, Message = _r.Message, Data = _r.Data };
return result; return result;
@ -460,14 +477,6 @@ namespace DSWeb.Areas.CommMng.DAL
result.CUSTOMDATE = head.DECL_DATE.ToString("yyyy-MM-dd"); result.CUSTOMDATE = head.DECL_DATE.ToString("yyyy-MM-dd");
if (result.CUSTOMDATE == "0001-01-01") result.CUSTOMDATE = null; if (result.CUSTOMDATE == "0001-01-01") result.CUSTOMDATE = null;
result.INSPECTIONNO = head.CORRELATION_DECL_NO;
result.BOOKNO = head.HAND_BOOK_NO;//手册备案号 result.BOOKNO = head.HAND_BOOK_NO;//手册备案号
result.CONTRACTNO = head.CONTR_NO;//合同号 result.CONTRACTNO = head.CONTR_NO;//合同号
@ -503,6 +512,17 @@ namespace DSWeb.Areas.CommMng.DAL
result.OP = headinfo.BUSINESS_ORDER_INFO.PROJECT_NO;//操作 2023-1-13 result.OP = headinfo.BUSINESS_ORDER_INFO.PROJECT_NO;//操作 2023-1-13
result.CURRENCY = headinfo.DECL_HEAD.CURRENCY_CODE;//---"CURRENCY_CODE_EN": "币种",目前未处理 改为写入 报关业务编辑页:币别
result.BSCUSTOMNO = headinfo.DECL_HEAD.RELATIVE_ENTRY_ID;//---"RELATIVE_ENTRY_ID": "关联报关单",目前未处理 改为写入 报关业务编辑页:关联报关单号
result.CUSTOMSLNO = headinfo.DECL_HEAD.RELATIVE_EMS_NO;//---"RELATIVE_ENTRY_ID": "关联报关单",目前未处理 改为写入 报关业务编辑页:关联报关单号
//result.INSPECTIONNO = head.CORRELATION_DECL_NO;
result.INSPECTIONNO = headinfo.DECL_HEAD.CUS_INSPE_NO;//---"CUS_INSPE_NO": "关检关联号",目前未处理写入商检单号
result.EXPORT_CREDIT_CODE = headinfo.DECL_HEAD.EXPORT_CREDIT_CODE;
result.SHIP_CREDIT_CODE = headinfo.DECL_HEAD.SHIP_CREDIT_CODE;
result.ENTRY_VERSION = headinfo.DECL_HEAD.ENTRY_VERSION;
result.SOURCE_OP = headinfo.BUSINESS_ORDER_INFO.PROJECT_NO;
returnresult.OK("", result); returnresult.OK("", result);
return returnresult; return returnresult;
@ -536,6 +556,8 @@ namespace DSWeb.Areas.CommMng.DAL
newrec.Total = BasicDataRefDAL.String2Decimal(goodinfo.AMOUNT); newrec.Total = BasicDataRefDAL.String2Decimal(goodinfo.AMOUNT);
newrec.Currency = goodinfo.CURRENCY; newrec.Currency = goodinfo.CURRENCY;
newrec.GOODSNUM = BasicDataRefDAL.String2Decimal(goodinfo.QTY);
//newrec.GOODSSTANDARD = goodinfo.UNIT;
result.Add(newrec); result.Add(newrec);
} }
@ -622,6 +644,337 @@ namespace DSWeb.Areas.CommMng.DAL
return chfee; return chfee;
} }
public static DBResult SaveDecHead(string BSNO,string userid) {
DecHeadBLL bll = new DecHeadBLL();
ContainerBLL cbll = new ContainerBLL();
DecListBLL lbll = new DecListBLL();
var result = new DBResult();
result.OK("");
try {
var logic = BasicDataRefDAL.GetLogicInfo(BSNO, "关贸云报关");
var json = logic["JSONSTR"];
var GMYHead = JsonConvert.Deserialize<GuanMaoYun_Head>(json);
var GMYHelper = new GMYInfoHelper(GMYHead);
#region 单一窗口信息
var dealtype_detail = "edit";
var DecHead_Local = bll.GetModelList("BSNO='" + BSNO + "'").FirstOrDefault();
if (DecHead_Local == null)
{
DecHead_Local = new DecHead();
dealtype_detail = "insert";
}
//BasicDataRefDAL.SaveLog(OPAPPLY, USERID, "单一窗口批量读取", "保存3");
if (dealtype_detail == "insert")
{
DecHead_Local.GID = Guid.NewGuid().ToString();
DecHead_Local.BSNO = BSNO;
//处理数据
GMYHelper.GetJsonData(ref DecHead_Local);
bll.Add(DecHead_Local);
//BasicDataRefDAL.SaveLog(OPAPPLY, USERID, "单一窗口批量读取", "保存4.1");
}
else
{
//处理数据
GMYHelper.GetJsonData(ref DecHead_Local);
bll.Update(DecHead_Local);
//BasicDataRefDAL.SaveLog(OPAPPLY, USERID, "单一窗口批量读取", "保存4.2");
}
#endregion
#region 货物信息 项信息
var declist_List = lbll.GetModelList(0, 99, "PID='" + DecHead_Local.GID + "'", String.Format("{0}", "gNo", ""));
if (GMYHead.GOODS_LIST.Count > 0)
{
foreach (var item in GMYHead.GOODS_LIST)
{
var GMYgoods = item.DECL_GOODS;
var upd = false;
foreach (var gooditem in declist_List)
{
if (gooditem.GNo.Trim() == GMYgoods.GOODS_SEQ.Trim())
{
upd = true;
var newrec = GMYHelper.GetJsonData_goods(gooditem, GMYgoods);
lbll.Update(newrec);
}
}
if (!upd)
{
//var updcontainer = new Container();
//updcontainer = portContainer.getContainerValue(updcontainer);
//updcontainer.GID = Guid.NewGuid().ToString();
//updcontainer.PID = DecHead_Local.GID;
//cbll.Add(updcontainer);
var newrec = new DecList();
newrec = GMYHelper.GetJsonData_goods(newrec, GMYgoods);
newrec.GID = Guid.NewGuid().ToString();
newrec.PID = DecHead_Local.GID;
lbll.Add(newrec);
}
}
}
//var Declist = lbll.GetModelList(0, 99, "PID='" + DecHead_Local.GID + "'", String.Format("{0}", "gNo", ""));
//var count = lbll.GetRecordCount("PID='" + DecHead_Local.GID + "'");
#endregion
#region 集装箱信息
var containerlist = cbll.GetModelList("PID='" + DecHead_Local.GID + "'");
if (GMYHead.CONTA_LIST.Count > 0)
{
foreach (var item in GMYHead.CONTA_LIST)
{
var portContainer = item.DECL_CONTA;
var upd = false;
foreach (var container in containerlist)
{
if (container.ContainerId.Trim() == portContainer.CONTA_NO.Trim())
{
upd = true;
var newrec = GMYHelper.GetJsonData_ctn(container, portContainer);
cbll.Update(newrec);
}
}
if (!upd)
{
//var updcontainer = new Container();
//updcontainer = portContainer.getContainerValue(updcontainer);
//updcontainer.GID = Guid.NewGuid().ToString();
//updcontainer.PID = DecHead_Local.GID;
//cbll.Add(updcontainer);
var newrec = new Container();
newrec = GMYHelper.GetJsonData_ctn(newrec, portContainer);
newrec.GID = Guid.NewGuid().ToString();
newrec.PID = DecHead_Local.GID;
cbll.Add(newrec);
}
}
}
//BasicDataRefDAL.SaveLog(OPAPPLY, USERID, "单一窗口批量读取", "保存6");
containerlist = cbll.GetModelList("PID='" + DecHead_Local.GID + "'");
#endregion
#region 电子文档信息
var cdc = new CommonDataContext();
var olddocList = cdc.LicenseDocu.Where(x => x.PID == DecHead_Local.GID).ToList();
var needsave = false;
foreach (var GMYDoc in GMYHead.DOC_LIST)
{
//Receipt_Doc receipt = receiptContext.ReceiptDocs.FirstOrDefault(o => o.BSNO == bsno && o.URL == pdf.filename);
var doc = olddocList.Find(x => x.DocuCode_Text == GMYDoc.DECL_DOC.DOC_NAME);
if (doc == null || doc.PID == "")
{
var newdoc = new LicenseDocu_md();
newdoc.GID= Guid.NewGuid().ToString();
newdoc.PID= DecHead_Local.GID;
newdoc.DocuCode = GMYDoc.DECL_DOC.DOC_TYPE;
newdoc.DocuCode_Text= GMYDoc.DECL_DOC.DOC_NAME;
newdoc.CertCode = GMYDoc.DECL_DOC.DOC_NO;
cdc.LicenseDocu.Add(newdoc);
needsave = true;
}
else
{
doc.DocuCode = GMYDoc.DECL_DOC.DOC_TYPE;
doc.DocuCode_Text = GMYDoc.DECL_DOC.DOC_NAME;
doc.CertCode = GMYDoc.DECL_DOC.DOC_NO;
cdc.LicenseDocu.AddOrUpdate(doc);
needsave = true;
}
}
if(needsave)
cdc.SaveChanges();
#endregion
}catch(Exception e)
{
result.SetErrorInfo(e.Message);
}
return result;
}
public class GMYInfoHelper {
public GuanMaoYun_Head GMYHead { get; set; }
public GMYInfoHelper() { }
private EnumerableRowCollection<DataRow> emlistQuery { get; set; }
public GMYInfoHelper(GuanMaoYun_Head _GMYHead) {
GMYHead=_GMYHead;
sys_EnumerationBLL bllEM = new sys_EnumerationBLL();
var emlistdataset = bllEM.GetList("");
var emlisttable = emlistdataset.Tables[0];
emlistQuery =
from emlist in emlisttable.AsEnumerable()
select emlist;
}
private string { get; set; }
public void GetJsonData(ref DecHead dh)
{
var head = GMYHead.DECL_HEAD;
dh.EntryId = head.CUSTOMS_NO;//报关单海关编号 单一窗口编辑页:海关编号
dh.SeqNo = head.EPROT_NO;
dh.EntryType = head.DECL_TYPE;//---"DECL_TYPE": "报关单类型", 目前未处理 改为写入 单一窗口编辑页:报关单类型 dechead.EntryType
dh.IEDateStr = head.DECL_DATE == null ? "" : head.DECL_DATE.ToString("yyyy-MM-dd");//---IE_DATE 进出口日期, 目前未处理 改为写入 单一窗口编辑页:进(出)口日期 dechead.IEDateStr
dh.CustomMaster = head.DECL_PORT;//---"DECL_PORT": "申报口岸",目前未处理 改为写入 单一窗口编辑页:申报地海关 dechead.CustomMaster 同时需处理dechead.CustomMaster_Text
dh.CustomMaster_Text = GetTextByCode(emlistQuery, "关区代码", dh.CustomMaster);
dh.IEPort = head.IE_PORT;//---"IE_PORT": "进出口岸",目前未处理 改为写入 单一窗口编辑页:出(入)境关别 dechead.IEPort 同时需处理dechead.IEPort_Text
dh.IEPort_Text = GetTextByCode(emlistQuery, "关区代码", dh.IEPort);
dh.ManualNo = head.HAND_BOOK_NO;//---"HAND_BOOK_NO": "手册备案号",目前未处理 改为写入 报关业务编辑页:手册号 ,同时写入 单一窗口编辑页:备案号 dechead.ManualNo
dh.ContrNo = head.CONTR_NO;//---"CONTR_NO": "合同协议号",目前已写入 报关业务编辑页:合同号 ,同时写入 单一窗口编辑页:合同协议号 dechead.ContrNo
dh.TradeCode = head.SHIP_CODE;//---"SHIP_CODE": "收发货单位代码",目前未处理 改为写入 单一窗口编辑页:境内收发货人10位海关编码
dh.TradeName = head.SHIP_NAME;//---"SHIP_NAME": "收发货单位名称",目前未处理 改为写入 单一窗口编辑页:境内收发货人
dh.OverseasConsigneeCode = head.FC_CODE;//---"FC_CODE": "外商公司代码",目前未处理 改为写入 单一窗口编辑页:境外收发货人
dh.OverseasConsigneeEname = head.FC_NAME; //---"FC_NAME": "外商公司名称",目前未处理 改为写入 单一窗口编辑页: 境外收发货人企业名称
dh.AgentCode = head.DECL_COM_CODE; //---"DECL_COM_CODE": "申报单位代码",目前未处理 改为写入 单一窗口编辑页: 申报单位10位海关代码
dh.AgentName = head.DECL_COM_NAME; //---"DECL_COM_NAME": "申报单位名称",目前未处理 改为写入 单一窗口编辑页:申报单位企业名称
dh.TrafMode = head.TRANS_TYPE_CODE;//---"TRANS_TYPE_CODE": "运输方式代码",目前未处理 改为写入 单一窗口编辑页:运输方式
dh.TrafMode_Text = GetTextByCode(emlistQuery, "运输方式", dh.TrafMode);
dh.TrafName = head.TRANS_TOOL_NAME; //---"TRANS_TOOL_NAME": "运输工具名称",目前已写入 报关业务编辑页:船名
dh.NativeVoyageNo = head.VOYAGE_NO;//--- "VOYAGE_NO": "航次号",目前已写入 报关业务编辑页:航次号
dh.BillNo = head.CONSIGN_REMARK;//---"CONSIGN_REMARK": "委托备注" 本来计划将此字段写入主提单号,但目前做例子的报文中没有此字段
dh.TradeCountry = head.COUNTRY_CODE_EN;//---"COUNTRY_CODE_EN": "启运国、运抵国",目前已写入 报关业务编辑页:货源国别 计划同时写入 单一窗口编辑页:运抵国(启运国)
dh.DistinatePort = head.DEST_PORT_CODE_EN;//---"DEST_PORT_CODE_EN": "装货港、指运港",目前未处理 改为写入 单一窗口编辑页:抵运港(启运港)
dh.TradeMode = head.TRANS_TYPE_CODE;//---"TRADE_TYPE_CODE": "贸易方式(监管方式)",目前未处理 改为写入 单一窗口编辑页:监管方式
dh.CutMode = head.TAX_KINDS_CODE;//---"TAX_KINDS_CODE": "征免性质",目前未处理 改为写入 单一窗口编辑页:征免性质
= head.TAX_TYPE_CODE;//---"TAX_TYPE_CODE": "征免方式",目前未处理 改为写入 单一窗口编辑页-下方商品信息:征免方式
dh.TransMode= head.TRADE_TERMS_CODE;//---"TRADE_TERMS_CODE": "成交方式",目前未处理 改为写入 单一窗口编辑页:成交方式
dh.LicenseNo = head.LICENCE_NO;//---"LICENCE_NO": "许可证号",目前未处理 改为写入 单一窗口编辑页:许可证号
dh.FeeMark= head.FEE_MARK;//---"FEE_MARK": "运费标记",目前未处理 改为写入 单一窗口编辑页:运费
dh.FeeRate = BasicDataRefDAL.String2Decimal( head.FEE_RATE );
dh.FeeCurr= head.FEE_CURR;
dh.FeeCurr_Text= GetTextByCode(emlistQuery, "币别", dh.FeeCurr);
dh.InsurMark = head.INSUR_MARK; //---"INSUR_MARK": "保费标记",目前未处理 改为写入 单一窗口编辑页:保费
dh.InsurRate = BasicDataRefDAL.String2Decimal(head.INSUR_RATE);
dh.InsurCurr = head.INSUR_CURR;
dh.InsurCurr_Text = GetTextByCode(emlistQuery, "币别", dh.InsurCurr);
dh.OtherMark = head.ADDIT_EXPEN_MARK; //---"ADDIT_EXPEN_MARK": "杂费标记","ADDIT_EXPEN_CURR_EN": "杂费币制",目前未处理 改为写入 单一窗口编辑页:杂费
dh.OtherRate = BasicDataRefDAL.String2Decimal(head.ADDIT_EXPEN_RATE);
dh.OtherCurr = head.ADDIT_EXPEN_CURR;
dh.OtherCurr_Text = GetTextByCode(emlistQuery, "币别", dh.OtherCurr);
dh.WrapType = head.PACKAGE_TYPE_CODE_EN;//---"PACKAGE_TYPE_CODE_EN": "包装种类",目前未处理 改为写入 单一窗口编辑页:包装
dh.WrapType_Text = GetTextByCode(emlistQuery, "包装种类", dh.WrapType);
dh.PackNo = BasicDataRefDAL.String2Int32(head.TOTAL_PACKEGES );
dh.GrossWet = BasicDataRefDAL.String2Decimal(head.TOTAL_GROSS_WEIGHT);
dh.NetWt = BasicDataRefDAL.String2Decimal(head.TOTAL_NET_WEIGHT);
dh.AgentCodeScc = head.DECL_CREDIT_CODE;//--- "DECL_CREDIT_CODE": "申报单位信用代码",目前未处理 改为写入 单一窗口编辑页申报单位18位社会信用代码
dh.TradeAreaCode = head.TRADE_COUNTRY_CODE_EN;//---"TRADE_COUNTRY_CODE_EN": "贸易国别",目前未处理 改为写入 单一窗口编辑页:贸易国别(地区)
dh.TradeAreaCode_Text= GetTextByCode(emlistQuery, "国别地区", dh.TradeAreaCode);
dh.TradeCiqCode = head.EXPORT_ECIQ_CODE;//-- - "EXPORT_ECIQ_CODE": "境内收/发货人检疫代码",目前未处理 改为写入 单一窗口编辑页: 境内收发货人10位检验检疫编码
dh.OwnerCiqCode = head.SHIP_ECIQ_CODE;//---"SHIP_ECIQ_CODE": "消费使用单位/生产销售单位检疫代码",目前未处理 改为写入 单一窗口编辑页: 生产销售单位10位检验检疫编码
dh.DespPortCode = head.CIQ_ENTY_PORT_CODE;//---"CIQ_ENTY_PORT_CODE": "入境口岸/离境口岸",目前未处理 改为写入 单一窗口编辑页:离境口岸/入境口岸
dh.DespPortCode_Text = GetTextByCode(emlistQuery, "口岸代码", dh.DespPortCode);
dh.MarkNo = head.MARKS_NOS;//---"MARKS_NOS": "标记唛码",目前未处理 改为写入 单一窗口编辑页:标记唛码
dh.GoodsPlace = head.GOODS_PLACE;//---"GOODS_PLACE": "货物存放地点",目前未处理 改为写入 单一窗口编辑页:货物存放地点
}
public DecList GetJsonData_goods(DecList oldrec, DECL_GOODS DECL_GOODS)
{
var result = oldrec;
result.GNo = DECL_GOODS.GOODS_SEQ;//---"GOODS_SEQ": "商品序号",目前写入 报关业务编辑页-商品明细:序号
result.ContrItem = DECL_GOODS.GOODS_ITEM;//---"GOODS_ITEM": "备案序号",目前未处理 改为写入 单一窗口编辑页-商品明细:备案序号
result.CodeTS = DECL_GOODS.HSCODE_TS;//---"HSCODE_TS": "商品编码",目前未处理 改为写入 单一窗口编辑页-商品明细:商品编号
result.GName = DECL_GOODS.GOODS_NAME;//---"GOODS_NAME": "商品名称",目前写入 报关业务编辑页-商品明细:序号;计划增加写入 单一窗口编辑页-商品明细:商品名称
result.GModel = DECL_GOODS.GOODS_MODEL;//---"GOODS_MODEL": "规格型号(申报要素)",目前写入 报关业务编辑页-商品明细:型号品牌;计划增加写入 单一窗口编辑页-商品明细:规格型号
result.GQty = BasicDataRefDAL.String2Decimal(DECL_GOODS.QTY);//---"QTY": "成交数量",目前未处理 改为写入 单一窗口编辑页-商品明细:成交数量 报关业务编辑页-商品明细:规格件数、报关件数
result.GUnit = DECL_GOODS.UNIT;//---"UNIT": "成交单位",目前未处理 改为写入 单一窗口编辑页-商品明细:成交单位
result.GUnit_Text = GetTextByCode(emlistQuery, "成交计量单位", result.GUnit);
result.DeclPrice = BasicDataRefDAL.String2Decimal(DECL_GOODS.PRICE);//---"PRICE": "成交单价",目前写入 报关业务编辑页-商品明细:单价;计划增加写入 单一窗口编辑页-商品明细:成交单价
result.DeclTotal = BasicDataRefDAL.String2Decimal(DECL_GOODS.AMOUNT);//---"AMOUNT": "成交总价",目前写入 报关业务编辑页-商品明细:总价;计划增加写入 单一窗口编辑页-商品明细:总价
result.DestinationCountry = DECL_GOODS.DESTINATION_CODE;
result.DutyMode = DECL_GOODS.TAX_TYPE;//---"TAX_TYPE": "征免方式代码",目前未处理 改为写入 单一窗口编辑页-商品明细:征免方式
result.DutyMode_Text = GetTextByCode(emlistQuery, "征免方式", result.DutyMode);
result.OriginCountry = DECL_GOODS.COUNTRY_OF_ORIGIN_CODE;//---"COUNTRY_OF_ORIGIN_CODE_EN": "消费国/原产国",目前未处理 改为写入 单一窗口编辑页-商品明细:原产国(地区)
return result;
}
public Container GetJsonData_ctn(Container oldrec, DECL_CONTA DECL_CONTA)
{
var result = oldrec;
result.ContainerId = DECL_CONTA.CONTA_NO;// ---"CONTA_NO": "集装箱编号",目前未处理 改为写入 单一窗口编辑页-集装箱明细:集装箱号
result.ContainerMd = DECL_CONTA.CUS_CONTA_TYPE;// ---"CUS_CONTA_TYPE": "集装箱规格",目前未处理 不做处理 改为记入【集装箱规格】
result.ContainerMd_Text= GetTextByCode(emlistQuery, "集装箱规格", result.ContainerMd);
result.ContainerWt = BasicDataRefDAL.String2Decimal(DECL_CONTA.CONTA_GROSS_WEIGHT);//---"CONTA_GROSS_WEIGHT": "集装箱自重", 目前未处理 改为写入 单一窗口编辑页-集装箱明细:自重(KG)
result.LclFlag = "";
return result;
}
}
public static string GetTextByCode(EnumerableRowCollection<DataRow> emlistQuery, string emtype, string emcode)
{
var result = "";
var emlists =
emlistQuery.Where(p => p.Field<string>("type") == emtype && p.Field<string>("Value") == emcode);
foreach (DataRow em in emlists)
{
result = em.Field<string>("Name");
}
return result;
}
} }

@ -950,6 +950,12 @@ namespace DSWeb.Areas.CommMng.Models
/// ///
/// </summary> /// </summary>
public string VOYAGE_NO { get; set; } public string VOYAGE_NO { get; set; }
/// <summary>
/// 用于主提单号
/// </summary>
public string CONSIGN_REMARK { get; set; }
/// <summary> /// <summary>
/// ///
/// </summary> /// </summary>
@ -964,6 +970,7 @@ namespace DSWeb.Areas.CommMng.Models
/// ///
/// </summary> /// </summary>
public string DEST_PORT_CODE { get; set; } public string DEST_PORT_CODE { get; set; }
public string DEST_PORT_CODE_EN { get; set; }
/// <summary> /// <summary>
/// ///
/// </summary> /// </summary>
@ -992,6 +999,7 @@ namespace DSWeb.Areas.CommMng.Models
/// ///
/// </summary> /// </summary>
public string CURRENCY_CODE { get; set; } public string CURRENCY_CODE { get; set; }
public string CURRENCY_CODE_EN { get; set; }
/// <summary> /// <summary>
/// ///
/// </summary> /// </summary>
@ -1016,14 +1024,18 @@ namespace DSWeb.Areas.CommMng.Models
/// ///
/// </summary> /// </summary>
public string INSUR_RATE { get; set; } public string INSUR_RATE { get; set; }
public string INSUR_CURR { get; set; }
/// <summary> /// <summary>
/// ///
/// </summary> /// </summary>
public string ADDIT_EXPEN_MARK { get; set; } public string ADDIT_EXPEN_MARK { get; set; }
public string ADDIT_EXPEN_RATE { get; set; }
public string ADDIT_EXPEN_CURR { get; set; }
/// <summary> /// <summary>
/// ///
/// </summary> /// </summary>
public string PACKAGE_TYPE_CODE { get; set; } public string PACKAGE_TYPE_CODE { get; set; }
public string PACKAGE_TYPE_CODE_EN { get; set; }
/// <summary> /// <summary>
/// ///
/// </summary> /// </summary>
@ -1108,6 +1120,7 @@ namespace DSWeb.Areas.CommMng.Models
/// ///
/// </summary> /// </summary>
public string TRADE_COUNTRY_CODE { get; set; } public string TRADE_COUNTRY_CODE { get; set; }
public string TRADE_COUNTRY_CODE_EN { get; set; }
/// <summary> /// <summary>
/// ///
/// </summary> /// </summary>
@ -1216,6 +1229,11 @@ namespace DSWeb.Areas.CommMng.Models
{ {
return IE_TYPE == "E"; return IE_TYPE == "E";
} }
/// <summary>
/// "报关单版本" 0报关单1.0版本; 1关检融合版本
/// </summary>
public string ENTRY_VERSION { get; set; }
} }
public class DECL_GOODS public class DECL_GOODS
@ -1229,10 +1247,14 @@ namespace DSWeb.Areas.CommMng.Models
/// </summary> /// </summary>
public string CUSTOMS_NO { get; set; } public string CUSTOMS_NO { get; set; }
/// <summary> /// <summary>
/// /// 商品序号
/// </summary> /// </summary>
public string GOODS_SEQ { get; set; } public string GOODS_SEQ { get; set; }
/// <summary> /// <summary>
/// 备案序号
/// </summary>
public string GOODS_ITEM { get; set; }
/// <summary>
/// ///
/// </summary> /// </summary>
public string HSCODE_TS { get; set; } public string HSCODE_TS { get; set; }
@ -1298,6 +1320,7 @@ namespace DSWeb.Areas.CommMng.Models
/// ///
/// </summary> /// </summary>
public string DESTINATION_CODE { get; set; } public string DESTINATION_CODE { get; set; }
public string DESTINATION_CODE_EN { get; set; }
/// <summary> /// <summary>
/// ///
/// </summary> /// </summary>

@ -241,7 +241,7 @@ namespace DSWeb.MvcShipping.Controllers
{ {
//20230129 关贸云 报关业务导入 //20230129 关贸云 报关业务导入
result = MsOpTaskDAL.(enumValue.TASKNO, Convert.ToString(Session["SHOWNAME"]).ToString().Trim()); result = MsOpTaskDAL.(enumValue.TASKNO, Convert.ToString(Session["SHOWNAME"]).ToString().Trim(),Convert.ToString(Session["USERID"]).ToString().Trim());
} }
else else
{ {

@ -82,7 +82,7 @@ namespace DSWeb.MvcShipping.DAL.MsOpApplyDAL
strSql.Append(",[DOCSTATUS],[CUSCIQNO],[TRANCUSTOMNO],[CUSTOMLOCKNO],[EXPCUSTOMTYPE],[DESPPORT],CONSIGNEE "); 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(",(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,CUSTOMERNAME2"); strSql.Append(",ETPS_CATEGORY,CDNTYPE,CUSTSERVICE,OPERATORCODE,CUSTOMERNAME2");
strSql.Append(",EXPORT_CREDIT_CODE,SHIP_CREDIT_CODE,isnull(ENTRY_VERSION,'0') ENTRY_VERSION,SOURCE_OP");
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) ");
@ -161,7 +161,7 @@ namespace DSWeb.MvcShipping.DAL.MsOpApplyDAL
strSql.Append(",[DOCSTATUS],[CUSCIQNO],[TRANCUSTOMNO],[CUSTOMLOCKNO],[EXPCUSTOMTYPE],[DESPPORT],CONSIGNEE "); 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(",(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(",EXPORT_CREDIT_CODE,SHIP_CREDIT_CODE,isnull(ENTRY_VERSION,'0') ENTRY_VERSION");
strSql.Append(" from OP_APPLY "); strSql.Append(" from OP_APPLY ");
if (!string.IsNullOrEmpty(strCondition)) if (!string.IsNullOrEmpty(strCondition))
@ -221,7 +221,7 @@ namespace DSWeb.MvcShipping.DAL.MsOpApplyDAL
strSql.Append(",[DOCSTATUS],[CUSCIQNO],[TRANCUSTOMNO],[CUSTOMLOCKNO],[EXPCUSTOMTYPE],[DESPPORT],CONSIGNEE "); 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(",(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,CUSTOMERNAME2"); strSql.Append(",ETPS_CATEGORY,CDNTYPE,CUSTSERVICE,OPERATORCODE,CUSTOMERNAME2");
strSql.Append(",EXPORT_CREDIT_CODE,SHIP_CREDIT_CODE,isnull(ENTRY_VERSION,'0') ENTRY_VERSION,SOURCE_OP");
strSql.Append(" from OP_APPLY "); strSql.Append(" from OP_APPLY ");
if (!string.IsNullOrEmpty(condition)) if (!string.IsNullOrEmpty(condition))
@ -419,6 +419,11 @@ namespace DSWeb.MvcShipping.DAL.MsOpApplyDAL
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.CUSTOMERNAME2 = Convert.ToString(reader["CUSTOMERNAME2"]);// data.CUSTOMERNAME2 = Convert.ToString(reader["CUSTOMERNAME2"]);//
data.EXPORT_CREDIT_CODE= Convert.ToString(reader["EXPORT_CREDIT_CODE"]);//
data.SHIP_CREDIT_CODE = Convert.ToString(reader["SHIP_CREDIT_CODE"]);//
data.ENTRY_VERSION = Convert.ToString(reader["ENTRY_VERSION"]);//
data.SOURCE_OP = Convert.ToString(reader["SOURCE_OP"]);//
#endregion #endregion
headList.Add(data); headList.Add(data);
} }

@ -994,7 +994,7 @@ namespace DSWeb.Areas.MvcShipping.DAL
return result; return result;
} }
public static DBResult (string TASKNO,string OP) public static DBResult (string TASKNO,string OP,string userid)
{ {
var result = new DBResult(); var result = new DBResult();
try try
@ -1009,7 +1009,7 @@ namespace DSWeb.Areas.MvcShipping.DAL
var headinfo = JsonConvert.Deserialize<GuanMaoYun_Head>(json); var headinfo = JsonConvert.Deserialize<GuanMaoYun_Head>(json);
var j1= PublicAPIDAL.GuanMaoYun_Head_Save(headinfo, OP); var j1= PublicAPIDAL.GuanMaoYun_Head_Save(headinfo, OP,userid);
if (!j1.Success) if (!j1.Success)
{ {
result.SetErrorInfo(j1.Message); result.SetErrorInfo(j1.Message);

@ -1048,6 +1048,31 @@ namespace DSWeb.MvcShipping.Models.MsOpApply
get { return _CUSTOMERNAME2; } get { return _CUSTOMERNAME2; }
set { _CUSTOMERNAME2 = value; } set { _CUSTOMERNAME2 = value; }
} }
/// <summary>
/// 经营单位信用代码
/// </summary>
[ModelDB]
public string EXPORT_CREDIT_CODE { get; set; }
/// <summary>
/// 收发货单位信用代码
/// </summary>
[ModelDB]
public string SHIP_CREDIT_CODE { get; set; }
/// <summary>
/// 报关单版本
/// </summary>
[ModelDB]
public string ENTRY_VERSION { get; set; } = "0";
/// <summary>
/// 源操作
/// </summary>
[ModelDB]
public string SOURCE_OP { get; set; } = "";
#endregion #endregion
public MsOpApply() public MsOpApply()

@ -714,6 +714,29 @@ Ext.extend(Shipping.MsOpApplyEdit, Ext.Panel, {
displayField: 'text', displayField: 'text',
value: 0 value: 0
}); });
Ext.regModel('ENTRY_VERSION', {
fields: [{ name: 'value' }, { name: 'text' }]
})
this.storeENTRY_VERSION = new Ext.data.Store({
model: 'ENTRY_VERSION',
data: [{ 'value': '0', 'text': '报关单1.0版本' },
{ 'value': '1', 'text': '关检融合版本' }]
});
this.comboxENTRY_VERSION = Ext.create('Ext.form.ComboBox', {
store: this.storeENTRY_VERSION,
fieldLabel: '报关单版本',
queryMode: 'local',
width: 110,
id: 'ENTRY_VERSION',
name: 'ENTRY_VERSION',
forceSelection: true,
valueField: 'value',
displayField: 'text',
value: '0'
});
//#endregion //#endregion
this.formHead = Ext.widget('form', { this.formHead = Ext.widget('form', {
@ -806,9 +829,9 @@ Ext.extend(Shipping.MsOpApplyEdit, Ext.Panel, {
this.comboxcdnType, this.comboxCustservice, this.comboxInfoClientContact, this.comboxcdnType, this.comboxCustservice, this.comboxInfoClientContact,
this.comboxCUSTOMERNAME2, this.comboxCUSTOMERNAME2,
{ , {
flex: 1, fieldLabel: '源操作',
xtype: 'hiddenfield' name: 'SOURCE_OP'
} }
] ]
} }
@ -1039,6 +1062,29 @@ Ext.extend(Shipping.MsOpApplyEdit, Ext.Panel, {
} }
] ]
}, { }, {
xtype: 'container',
layout: 'hbox',
defaultType: 'textfield',
items: [{
fieldLabel: '经营单位信用代码',
labelWidth: 110,
name: 'EXPORT_CREDIT_CODE'
}, {
fieldLabel: '收发货单位信用代码',
labelWidth: 120,
name: 'SHIP_CREDIT_CODE'
},
this.comboxENTRY_VERSION
, {
xtype: 'hiddenfield',
flex: 2
}
]
}
,{
xtype: 'container', xtype: 'container',
layout: 'hbox', layout: 'hbox',
defaultType: 'textfield', defaultType: 'textfield',

@ -992,8 +992,35 @@ Ext.extend(Shipping.MsOpApplyIndex, Ext.Panel, {
header: '报关单类型', header: '报关单类型',
hidden: true, hidden: true,
width: 100 width: 100
}, {
sortable: true,
dataIndex: 'EXPORT_CREDIT_CODE',
header: '经营单位信用代码',
width: 100
}, {
sortable: true,
dataIndex: 'SHIP_CREDIT_CODE',
header: '收发货单位信用代码',
width: 100
}, {
sortable: true,
dataIndex: 'ENTRY_VERSION',
header: '报关单版本',
width: 100,
renderer: function (value, meta, record) {
if (value == '1')
return '关检融合版本';
else
return '报关单1.0版本';
}
}, {
sortable: true,
dataIndex: 'SOURCE_OP',
header: '源操作',
hidden: true,
width: 100
} }
]; ];
this.GridCheckBoxModel = Ext.create('Ext.selection.CheckboxModel'); this.GridCheckBoxModel = Ext.create('Ext.selection.CheckboxModel');
@ -1452,6 +1479,27 @@ Ext.extend(Shipping.MsOpApplyIndex, Ext.Panel, {
value: '0' value: '0'
}); });
Ext.regModel('ENTRY_VERSION', {
fields: [{ name: 'value' }, { name: 'text' }]
})
this.storeENTRY_VERSION = new Ext.data.Store({
model: 'ENTRY_VERSION',
data: [{ 'value': '0', 'text': '报关单1.0版本' },
{ 'value': '1', 'text': '关检融合版本' }]
});
this.comboxENTRY_VERSION = Ext.create('Ext.form.ComboBox', {
store: this.storeENTRY_VERSION,
queryMode: 'local',
width: 110,
id: 'ENTRY_VERSION',
name: 'ENTRY_VERSION',
forceSelection: true,
valueField: 'value',
displayField: 'text',
value: '0'
});
//查询工具条 //查询工具条
this.panelBtn = new Ext.Panel({ this.panelBtn = new Ext.Panel({

@ -131,7 +131,11 @@
{ 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: 'EXPORT_CREDIT_CODE', type: 'string' }
, { name: 'SHIP_CREDIT_CODE', type: 'string' }
, { name: 'ENTRY_VERSION', type: 'string' }
, { name: 'SOURCE_OP', type: 'string' }
] ]
}); });

@ -1496,7 +1496,7 @@ Ext.extend(Shipping.MsOp_SuperVision_TruckIndex, Ext.Panel, {
sql = sql + getAndConSql(sql, MBLNO, "MBLNO like '%" + MBLNO + "%'"); sql = sql + getAndConSql(sql, MBLNO, "MBLNO like '%" + MBLNO + "%'");
var HBLNO = form.findField('HBLNO').getValue(); var HBLNO = form.findField('HBLNO').getValue();
sql = sql + getAndConSql(sql, MBLNO, "HBLNO like '%" + MBLNO + "%'"); sql = sql + getAndConSql(sql, HBLNO, "HBLNO like '%" + MBLNO + "%'");
var CUSTNO = form.findField('CUSTNO').getValue(); var CUSTNO = form.findField('CUSTNO').getValue();
sql = sql + getAndConSql(sql, CUSTNO, "CUSTNO like '%" + CUSTNO + "%'"); sql = sql + getAndConSql(sql, CUSTNO, "CUSTNO like '%" + CUSTNO + "%'");

@ -15,10 +15,11 @@ namespace DSWeb.SoftMng.Model{
get{ return _gid; } get{ return _gid; }
set{ _gid = value; } set{ _gid = value; }
} }
private string _containerid;
/// <summary> /// <summary>
/// 集装箱号 /// 集装箱号
/// </summary> /// </summary>
private string _containerid;
public string ContainerId public string ContainerId
{ {
get{ return _containerid; } get{ return _containerid; }

@ -15,28 +15,31 @@ namespace DSWeb.SoftMng.Model{
get{ return _gid; } get{ return _gid; }
set{ _gid = value; } set{ _gid = value; }
} }
private string _gno;
/// <summary> /// <summary>
/// 项号 /// 项号
/// </summary> /// </summary>
private string _gno;
public string GNo public string GNo
{ {
get{ return _gno; } get{ return _gno; }
set{ _gno = value; } set{ _gno = value; }
} }
private string _contritem;
/// <summary> /// <summary>
/// 备案序号 /// 备案序号
/// </summary> /// </summary>
private string _contritem;
public string ContrItem public string ContrItem
{ {
get{ return _contritem; } get{ return _contritem; }
set{ _contritem = value; } set{ _contritem = value; }
} }
private string _codets;
/// <summary> /// <summary>
/// 商品编号 /// 商品编号
/// </summary> /// </summary>
private string _codets;
public string CodeTS public string CodeTS
{ {
get{ return _codets; } get{ return _codets; }

Loading…
Cancel
Save