|
|
using System;
|
|
|
using HcUtility.Core;
|
|
|
using Newtonsoft.Json;
|
|
|
|
|
|
using DSWeb.Areas.CommMng.DAL;
|
|
|
using System.Web.Mvc;
|
|
|
using System.IO;
|
|
|
using DSWeb.TruckMng.Helper;
|
|
|
using System.Collections.Generic;
|
|
|
using DSWeb.MvcShipping.DAL.MsSysParamSet;
|
|
|
using DSWeb.MvcShipping.DAL.MsChFeeDAL;
|
|
|
using HcUtility.Comm;
|
|
|
using static DSWeb.Areas.Dispatch.Controllers.InterfaceController;
|
|
|
using System.Net;
|
|
|
using DSWeb.Areas.MvcShipping.Helper;
|
|
|
using DSWeb.Areas.SysMng.DB;
|
|
|
|
|
|
namespace DSWeb.Areas.CommMng.Models
|
|
|
{
|
|
|
[JsonObject]
|
|
|
//用于解析要向表中保存的url地址的相关信息
|
|
|
public class FileUrlModel
|
|
|
{
|
|
|
#region
|
|
|
private string _TableName = string.Empty;
|
|
|
private string _KeyName = string.Empty;
|
|
|
private string _KeyValue = string.Empty;
|
|
|
private string _UrlName = string.Empty;
|
|
|
private string _UrlValue = string.Empty;
|
|
|
|
|
|
private string _ImgName = string.Empty;
|
|
|
private string _INDATABASE = string.Empty;
|
|
|
|
|
|
private string _FilePath = string.Empty;
|
|
|
|
|
|
private string ModelName = "";
|
|
|
private string ChildName = "";
|
|
|
private string ExName = "";//扩展名 在savefile时获取
|
|
|
#endregion
|
|
|
|
|
|
#region
|
|
|
public string TableName
|
|
|
{
|
|
|
get { return _TableName; }
|
|
|
set { _TableName = value; }
|
|
|
}
|
|
|
public string KeyName
|
|
|
{
|
|
|
get { return _KeyName; }
|
|
|
set { _KeyName = value; }
|
|
|
}
|
|
|
public string KeyValue
|
|
|
{
|
|
|
get { return _KeyValue; }
|
|
|
set { _KeyValue = value; }
|
|
|
}
|
|
|
public string UrlName
|
|
|
{
|
|
|
get { return _UrlName; }
|
|
|
set { _UrlName = value; }
|
|
|
}
|
|
|
public string UrlValue
|
|
|
{
|
|
|
get { return _UrlValue; }
|
|
|
set { _UrlValue = value; }
|
|
|
}
|
|
|
public string ImgName
|
|
|
{
|
|
|
get { return _ImgName; }
|
|
|
set { _ImgName = value; }
|
|
|
}
|
|
|
public string INDATABASE
|
|
|
{
|
|
|
get { return _INDATABASE; }
|
|
|
set { _INDATABASE = value; }
|
|
|
}
|
|
|
public bool needintoDatabase {
|
|
|
get {
|
|
|
if (_INDATABASE == "True" || _INDATABASE == "true") {
|
|
|
return true;
|
|
|
}return false;
|
|
|
}
|
|
|
}
|
|
|
|
|
|
|
|
|
public string FilePath
|
|
|
{
|
|
|
get { return _FilePath; }
|
|
|
set { _FilePath = value; }
|
|
|
}
|
|
|
|
|
|
public string Savefilename
|
|
|
{
|
|
|
get {
|
|
|
var _r = Savefilename_head;
|
|
|
_r += ExName;
|
|
|
return _r;
|
|
|
}
|
|
|
}
|
|
|
public string Savefilename_head
|
|
|
{
|
|
|
get
|
|
|
{
|
|
|
var _r = KeyValue;
|
|
|
if (!String.IsNullOrEmpty(ChildName))
|
|
|
{
|
|
|
_r += "_" + ChildName;
|
|
|
}
|
|
|
return _r;
|
|
|
}
|
|
|
}
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
public static string _urlbase= "../../UploadFiles";
|
|
|
|
|
|
private string getSQL() {
|
|
|
var sql = String.Format("update {0} set {1}='{2}' where {3}='{4}'", TableName, UrlName, UrlValue, KeyName, KeyValue);
|
|
|
return sql;
|
|
|
}
|
|
|
|
|
|
public int DoUpdate() {
|
|
|
var _r = BasicDataRefDAL.ExecSql(getSQL());
|
|
|
|
|
|
return _r;
|
|
|
}
|
|
|
|
|
|
|
|
|
private string getInsert_info_files_SQL()
|
|
|
{
|
|
|
var sql = String.Format($"insert into info_files (GID,PID,FILENAME,FILEPATH) values ('{Guid.NewGuid().ToString()}','{KeyValue}','{Savefilename}','{getFileName()}')");
|
|
|
return sql;
|
|
|
}
|
|
|
public int DoInsert_info_files()
|
|
|
{
|
|
|
var _r = BasicDataRefDAL.ExecSql(getInsert_info_files_SQL());
|
|
|
|
|
|
return _r;
|
|
|
}
|
|
|
|
|
|
|
|
|
public FileUrlModel() {
|
|
|
|
|
|
}
|
|
|
|
|
|
public FileUrlModel(string ModelName)
|
|
|
{
|
|
|
var path = System.Web.HttpContext.Current.Server.MapPath(FileUrlModel._urlbase);
|
|
|
|
|
|
setModelValue(ModelName, path);
|
|
|
}
|
|
|
|
|
|
public FileUrlModel(string head,string ModelName,string ChildName="") {
|
|
|
|
|
|
var _Info = DSWeb.TruckMng.Helper.JsonConvert.Deserialize<FileUrlModel>(head);
|
|
|
|
|
|
var path = System.Web.HttpContext.Current.Server.MapPath(FileUrlModel._urlbase);
|
|
|
|
|
|
setModelValue(ModelName, path, ChildName);
|
|
|
//ChildName用于表示在某一模块下的多种类型文件 如info_client(往来单位)下添加电子章 或其他种类图片
|
|
|
|
|
|
this.SetValue(_Info);
|
|
|
}
|
|
|
|
|
|
private void setModelValue(string ModelName,string path, string ChildName = "") {
|
|
|
|
|
|
if (ModelName == "FactoryCargoname_TAGPIC")
|
|
|
{//进口贸易-厂号商品名称管理
|
|
|
TableName = "Import_Cargoname";
|
|
|
KeyName = "GID";
|
|
|
UrlName = "TAGPICURL";
|
|
|
|
|
|
FilePath = path + "\\" + ModelName;
|
|
|
this.ModelName = ModelName;
|
|
|
this.ChildName = ChildName;
|
|
|
}
|
|
|
|
|
|
if (ModelName == "InfoClient_Img")
|
|
|
{//往来单位-图片管理
|
|
|
//需要写入数据库
|
|
|
TableName = "Info_Client_IMG";
|
|
|
KeyName = "GID";
|
|
|
UrlName = "IMGURL";
|
|
|
ImgName = "IMG";
|
|
|
|
|
|
FilePath = path + "\\" + ModelName;
|
|
|
this.ModelName = ModelName;
|
|
|
this.ChildName = ChildName;
|
|
|
|
|
|
//INDATABASE = true;
|
|
|
}
|
|
|
|
|
|
if (ModelName == "SysUser_Head")
|
|
|
{
|
|
|
//系统用户 头像
|
|
|
TableName = "USER_BASEINFO";
|
|
|
KeyName = "USERID";
|
|
|
UrlName = "IMAGEURL";
|
|
|
|
|
|
FilePath = path + "\\" + ModelName;
|
|
|
this.ModelName = ModelName;
|
|
|
this.ChildName = ChildName;
|
|
|
|
|
|
//INDATABASE = true;
|
|
|
}
|
|
|
if (ModelName == "SysUser_Sign")
|
|
|
{
|
|
|
//系统用户 签名 需写入数据库
|
|
|
TableName = "USER_BASEINFO";
|
|
|
KeyName = "USERID";
|
|
|
UrlName = "SIGNATUREURL";
|
|
|
ImgName = "SIGNATUREPIC";
|
|
|
|
|
|
FilePath = path + "\\" + ModelName;
|
|
|
this.ModelName = ModelName;
|
|
|
this.ChildName = ChildName;
|
|
|
|
|
|
INDATABASE ="True";
|
|
|
}
|
|
|
if (ModelName == "Price_Quotation")
|
|
|
{
|
|
|
//系统用户 签名 需写入数据库
|
|
|
TableName = "Op_SeaPrice_Quotation";
|
|
|
KeyName = "BSNO";
|
|
|
UrlName = "PDFURL";
|
|
|
|
|
|
FilePath = path + "\\" + ModelName;
|
|
|
this.ModelName = ModelName;
|
|
|
this.ChildName = ChildName;
|
|
|
|
|
|
//INDATABASE = true;
|
|
|
}
|
|
|
}
|
|
|
|
|
|
|
|
|
public void SetValue(FileUrlModel info)
|
|
|
{
|
|
|
if (!string.IsNullOrEmpty(info.TableName))
|
|
|
{
|
|
|
TableName = info.TableName;
|
|
|
}
|
|
|
if (!string.IsNullOrEmpty(info.KeyName))
|
|
|
{
|
|
|
KeyName = info.KeyName;
|
|
|
}
|
|
|
if (!string.IsNullOrEmpty(info.UrlName))
|
|
|
{
|
|
|
UrlName = info.UrlName;
|
|
|
}
|
|
|
if (!string.IsNullOrEmpty(info.KeyValue))
|
|
|
{
|
|
|
KeyValue = info.KeyValue;
|
|
|
}
|
|
|
if (!string.IsNullOrEmpty(info.UrlValue))
|
|
|
{
|
|
|
UrlValue = info.UrlValue;
|
|
|
}
|
|
|
if (!string.IsNullOrEmpty(info.INDATABASE))
|
|
|
{
|
|
|
INDATABASE = info.INDATABASE;
|
|
|
}
|
|
|
}
|
|
|
|
|
|
private static string getexname(System.Web.HttpPostedFileBase file) {
|
|
|
return Path.GetExtension(file.FileName);
|
|
|
}
|
|
|
|
|
|
private string getFileName() {
|
|
|
var _r = FilePath + "\\" + Savefilename;
|
|
|
return _r;
|
|
|
}
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
/// 保存方法 返回值为文件url
|
|
|
/// </summary>
|
|
|
/// <param name="file"></param>
|
|
|
/// <returns></returns>
|
|
|
public string SaveFile(System.Web.HttpPostedFileBase file,string savetype="")
|
|
|
{
|
|
|
//获得文件扩展名
|
|
|
ExName = getexname(file);
|
|
|
|
|
|
//首先 如没有目录则建立目录
|
|
|
if (!Directory.Exists(FilePath))
|
|
|
{
|
|
|
Directory.CreateDirectory(FilePath);
|
|
|
}
|
|
|
string filename = getFileName();
|
|
|
|
|
|
//如存在同名文件则删除
|
|
|
|
|
|
string[] fileNames = Directory.GetFiles(FilePath);
|
|
|
|
|
|
foreach (string _file in fileNames)
|
|
|
{
|
|
|
if (_file.IndexOf(Savefilename_head, StringComparison.OrdinalIgnoreCase) >= 0) {
|
|
|
File.Delete(_file);
|
|
|
}
|
|
|
}
|
|
|
|
|
|
//if (File.Exists(filename))
|
|
|
//{
|
|
|
// File.Delete(filename);
|
|
|
//}
|
|
|
//保存文件
|
|
|
file.SaveAs(filename);
|
|
|
|
|
|
|
|
|
if (File.Exists(filename))
|
|
|
{
|
|
|
//向数据库写入url
|
|
|
UrlValue = _urlbase + "/" + ModelName + "/" + Savefilename;
|
|
|
|
|
|
if (savetype == "")
|
|
|
{//通常保存方法
|
|
|
DoUpdate();
|
|
|
|
|
|
//调取升级数据库内图片字段的方法
|
|
|
if (needintoDatabase)
|
|
|
{
|
|
|
BasicDataRefDAL.SaveFileIntoDB(this, UrlValue);
|
|
|
}
|
|
|
}
|
|
|
else {
|
|
|
if (savetype == "info_files") {
|
|
|
//文件信息写入info_files表内
|
|
|
DoInsert_info_files();
|
|
|
}
|
|
|
}
|
|
|
|
|
|
//返回是否存在此文件
|
|
|
return UrlValue;
|
|
|
}
|
|
|
else return "";
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
[JsonObject]
|
|
|
public class PrintSql
|
|
|
{
|
|
|
public string sql1 { get; set; }
|
|
|
public string sql2 { get; set; }
|
|
|
public string sql3 { get; set; }
|
|
|
public string sql4 { get; set; }
|
|
|
public string sql5 { get; set; }
|
|
|
public string sql6 { get; set; }
|
|
|
public string sql7 { get; set; }
|
|
|
public string sql8 { get; set; }
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
/// 用于传递session等control层数据
|
|
|
/// </summary>
|
|
|
public class USERINFO
|
|
|
{
|
|
|
public string USERID { get; set; }
|
|
|
public string BLSTATUSSTR { get; set; }
|
|
|
public string ISENABLECUSTRANGE { get; set; }
|
|
|
|
|
|
public USERINFO()
|
|
|
{
|
|
|
|
|
|
}
|
|
|
public USERINFO(string USERID, string BLSTATUSSTR = "", string ISENABLECUSTRANGE = "")
|
|
|
{
|
|
|
this.USERID = USERID;
|
|
|
this.BLSTATUSSTR = BLSTATUSSTR;
|
|
|
this.ISENABLECUSTRANGE = ISENABLECUSTRANGE;
|
|
|
}
|
|
|
}
|
|
|
|
|
|
[JsonObject]
|
|
|
public class StoreModifyResultStatus
|
|
|
{
|
|
|
public string GID { get; set; }
|
|
|
public string STORENAME { get; set; }
|
|
|
public string TABLENAME { get; set; }
|
|
|
public string MODIFIEDTIME { get; set; }
|
|
|
}
|
|
|
|
|
|
[JsonObject]
|
|
|
public class StoreModifyStatusMb: ModelObjectBillHead
|
|
|
{
|
|
|
public static List<StoreModifyStatusMb> StoreModifyStatusList {
|
|
|
get {
|
|
|
return (List<StoreModifyStatusMb>)BasicDataRefDAL.GetStoreModifyStatusCache();
|
|
|
}
|
|
|
}
|
|
|
|
|
|
public static List<StoreModifyResultStatus> getstatus()
|
|
|
{
|
|
|
try
|
|
|
{
|
|
|
var result = new List<StoreModifyResultStatus>();
|
|
|
|
|
|
var StoreModifyStatusList = (List<StoreModifyStatusMb>) BasicDataRefDAL.GetStoreModifyStatusCache();
|
|
|
foreach (var item in StoreModifyStatusList)
|
|
|
{
|
|
|
var status = new StoreModifyResultStatus();
|
|
|
status.GID = item.GID;
|
|
|
status.STORENAME = item.STORENAME;
|
|
|
status.TABLENAME = item.TABLENAME;
|
|
|
//status.DISPLAYFIELD = item.GID;
|
|
|
//status.VALUEFIELD = item.GID;
|
|
|
//status.DISPLAYFIELD2 = item.GID;
|
|
|
//status.CONDITION = item.GID;
|
|
|
status.MODIFIEDTIME = item.MODIFIEDTIME;
|
|
|
result.Add(status);
|
|
|
}
|
|
|
return result;
|
|
|
}
|
|
|
catch (Exception e) {
|
|
|
|
|
|
BasicDataRefDAL.ResetStoreModifyStatus();
|
|
|
|
|
|
return getstatus();
|
|
|
}
|
|
|
}
|
|
|
|
|
|
#region private Fields
|
|
|
|
|
|
private string _GID = string.Empty;
|
|
|
private string _STORENAME = string.Empty;
|
|
|
private string _TABLENAME = string.Empty;
|
|
|
private string _DISPLAYFIELD = string.Empty;
|
|
|
private string _VALUEFIELD = string.Empty;
|
|
|
private string _DISPLAYFIELD2 = "''";
|
|
|
private string _CONDITION = string.Empty;
|
|
|
private string _MODIFIEDTIME = string.Empty;
|
|
|
|
|
|
|
|
|
public List<PubStore> PubStoreList = new List<PubStore>();
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
/// 刷新指定的store
|
|
|
/// 目前只有USERID="EVERYONE"的能调用到这个方法
|
|
|
/// </summary>
|
|
|
/// <param name="STORENAME"></param>
|
|
|
/// <param name="USERID"></param>
|
|
|
public static DBResult RefreshStore(string STORENAME, USERINFO USERINFO)
|
|
|
{
|
|
|
|
|
|
var sqlstr = "";
|
|
|
DBResult result = new DBResult();
|
|
|
|
|
|
//sqlstr = getSqlStr(STORENAME, USERINFO);
|
|
|
|
|
|
var evList = getDBStore(STORENAME, USERINFO);
|
|
|
|
|
|
if (StoreModifyStatusList.Exists(x => x.STORENAME == STORENAME))
|
|
|
{
|
|
|
var _t = StoreModifyStatusList.Find(t => t.STORENAME == STORENAME);
|
|
|
if (_t.PubStoreList.Exists(x => x.STOREUSERID == USERINFO.USERID))
|
|
|
{
|
|
|
|
|
|
_t.PubStoreList.Find(x => x.STOREUSERID == USERINFO.USERID).storelist = evList;
|
|
|
result.setMessage(true, "");
|
|
|
}
|
|
|
else {
|
|
|
var newpubstore = new PubStore();
|
|
|
newpubstore.STOREUSERID = USERINFO.USERID;
|
|
|
newpubstore.storelist = evList;
|
|
|
_t.PubStoreList.Add(newpubstore);
|
|
|
result.setMessage(true, "");
|
|
|
}
|
|
|
}
|
|
|
return result;
|
|
|
//if (evList.Count == 0)
|
|
|
//{
|
|
|
// return Json(new { success = false });
|
|
|
//}
|
|
|
//else
|
|
|
//{
|
|
|
// var blank = new GeneralModel();
|
|
|
// blank.GID = "";
|
|
|
// blank.GVALUE = "";
|
|
|
// blank.GVALUE2 = "";
|
|
|
// evList.Add(blank);
|
|
|
// return Json(new { success = true, data = evList.ToList() });
|
|
|
//}
|
|
|
|
|
|
return result;
|
|
|
|
|
|
}
|
|
|
|
|
|
/// <summary>
|
|
|
/// 从数据库取store内容
|
|
|
/// </summary>
|
|
|
/// <param name="STORENAME"></param>
|
|
|
/// <param name="USERINFO"></param>
|
|
|
/// <returns></returns>
|
|
|
private static List<PubStoremb> getDBStore(string STORENAME, USERINFO USERINFO)
|
|
|
{
|
|
|
var sqlstr = getSqlStr(STORENAME, USERINFO);
|
|
|
|
|
|
var evList = BasicDataRefDAL.getPubExtendStore(sqlstr);
|
|
|
|
|
|
return evList;
|
|
|
}
|
|
|
|
|
|
public static List<PubStoremb> getStore(string STORENAME, USERINFO USERINFO) {
|
|
|
|
|
|
//如果是那种区分userid的 就不写入内存 直接从数据库取值
|
|
|
|
|
|
/*
|
|
|
if (USERINFO.USERID != "EVERYONE")
|
|
|
{
|
|
|
return getDBStore(STORENAME, USERINFO);
|
|
|
}
|
|
|
|
|
|
var result = new List<PubStoremb>();
|
|
|
if (StoreModifyStatusList.Exists(x => x.STORENAME == STORENAME)) {
|
|
|
var _t = StoreModifyStatusList.Find(t => t.STORENAME == STORENAME);
|
|
|
if (_t.PubStoreList.Exists(x => x.STOREUSERID == USERINFO.USERID)) {
|
|
|
result = _t.PubStoreList.Find(x => x.STOREUSERID == USERINFO.USERID).storelist;
|
|
|
return result;
|
|
|
}
|
|
|
}
|
|
|
|
|
|
var _r = RefreshStore(STORENAME, USERINFO);
|
|
|
if (_r.Success) {
|
|
|
result = getStore(STORENAME, USERINFO);
|
|
|
}
|
|
|
return result;*/
|
|
|
|
|
|
//20200407 取消内存缓存的逻辑 改为完全从数据库读取
|
|
|
return getDBStore(STORENAME, USERINFO);
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
//public static void setList(List<StoreModifyStatusMb> currentlist) {
|
|
|
// StoreModifyStatusList.Clear();
|
|
|
// foreach (var sms in currentlist) {
|
|
|
// var newitem = new StoreModifyStatusMb();
|
|
|
// newitem.GID = sms.GID;
|
|
|
// newitem.STORENAME = sms.STORENAME;
|
|
|
// newitem.TABLENAME = sms.TABLENAME;
|
|
|
// newitem.DISPLAYFIELD = sms.DISPLAYFIELD;
|
|
|
// newitem.VALUEFIELD = sms.VALUEFIELD;
|
|
|
// newitem.DISPLAYFIELD2 = sms.DISPLAYFIELD2;
|
|
|
// newitem.CONDITION = sms.CONDITION;
|
|
|
|
|
|
// newitem.MODIFIEDTIME = sms.MODIFIEDTIME;
|
|
|
// StoreModifyStatusList.Add(newitem);
|
|
|
// }
|
|
|
//}
|
|
|
|
|
|
public static string getSql() {
|
|
|
return " select GID,STORENAME,TABLENAME,dbo.trimtime(MODIFIEDTIME) MODIFIEDTIME,DISPLAYFIELD,DISPLAYFIELD2,VALUEFIELD,CONDITION from t_sys_StoreModifyStatus ";
|
|
|
}
|
|
|
|
|
|
/// <summary>
|
|
|
/// 根据storename分配相应的现存查询方法
|
|
|
/// </summary>
|
|
|
/// <param name="STORENAME"></param>
|
|
|
/// <param name="USERINFO"></param>
|
|
|
/// <returns></returns>
|
|
|
public static string getSqlStr(string STORENAME, USERINFO USERINFO) {
|
|
|
string result = "";
|
|
|
|
|
|
var modcondition = "";
|
|
|
|
|
|
if (STORENAME == "INFOCLIENT_ISCONTROLLER" || STORENAME == "INFOCLIENT_INV" || STORENAME == "INFOCLIENT_ALL")
|
|
|
{
|
|
|
if (!string.IsNullOrWhiteSpace(USERINFO.BLSTATUSSTR))
|
|
|
{
|
|
|
modcondition = USERINFO.BLSTATUSSTR;
|
|
|
}
|
|
|
|
|
|
if (USERINFO.ISENABLECUSTRANGE == "1")
|
|
|
{
|
|
|
if (!string.IsNullOrWhiteSpace(modcondition)) modcondition += " and ";
|
|
|
modcondition += " (SHORTNAME in (SELECT SHORTNAME from info_client_range where USERID='" + USERINFO.USERID + "' ) or SHORTNAME not in (SELECT SHORTNAME from info_client_range )) ";
|
|
|
}
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
if (StoreModifyStatusList.Exists(x => x.STORENAME == STORENAME))
|
|
|
{
|
|
|
|
|
|
var _t = StoreModifyStatusList.Find(t => t.STORENAME == STORENAME);
|
|
|
|
|
|
if (!string.IsNullOrWhiteSpace(_t.VALUEFIELD))
|
|
|
{//有VALUEFIELD的使用通用查询方法
|
|
|
if (string.IsNullOrWhiteSpace(_t.DISPLAYFIELD2)) _t.DISPLAYFIELD2 = "''";
|
|
|
|
|
|
result = "select " + _t.VALUEFIELD + " as GID," + _t.DISPLAYFIELD + " as GVALUE , " + _t.DISPLAYFIELD2 + " as GVALUE2 from " + _t.TABLENAME;
|
|
|
|
|
|
var _condition = _t.CONDITION;
|
|
|
|
|
|
|
|
|
if (!string.IsNullOrWhiteSpace(modcondition))
|
|
|
{
|
|
|
if (!string.IsNullOrWhiteSpace(_condition))
|
|
|
{
|
|
|
_condition += " and " + modcondition;
|
|
|
}
|
|
|
else
|
|
|
{
|
|
|
_condition = modcondition;
|
|
|
}
|
|
|
}
|
|
|
|
|
|
|
|
|
if (!string.IsNullOrWhiteSpace(_condition))
|
|
|
{
|
|
|
result += " where " + _condition.Replace("[[USERID]]", "'" + USERINFO.USERID + "'");
|
|
|
}
|
|
|
|
|
|
result += " order by " + _t.DISPLAYFIELD;
|
|
|
}
|
|
|
else {
|
|
|
//没有valuefield的使用独立方法
|
|
|
if (_t.STORENAME == "IMPORT_SELLER") {
|
|
|
//进口贸易 贸易商 isagent=1
|
|
|
|
|
|
result = BasicDataRefDAL.GetTrader_Getsqlstr(" isagent=1 ").ToString();
|
|
|
}
|
|
|
if (_t.STORENAME == "IMPORT_BUYER")
|
|
|
{
|
|
|
//进口贸易 客户 isagentcn=1
|
|
|
|
|
|
result = BasicDataRefDAL.GetTrader_Getsqlstr(" isagentcn=1 ").ToString();
|
|
|
}
|
|
|
|
|
|
if (_t.STORENAME == "HSCODE")
|
|
|
{
|
|
|
|
|
|
result = BasicDataRefDAL.GetCargoTax_Sqlstr("").ToString();
|
|
|
}
|
|
|
if (_t.STORENAME == "CIQCODE")
|
|
|
{
|
|
|
|
|
|
result = BasicDataRefDAL.GetCargociqRefList_Sqlstr("").ToString();
|
|
|
}
|
|
|
//往来单位开票信息
|
|
|
if (_t.STORENAME == "INFOCLIENT_INV")
|
|
|
{
|
|
|
result = BasicDataRefDAL.GetCustomInvRefList_SqlStr("", USERINFO.ISENABLECUSTRANGE, USERINFO.USERID).ToString();
|
|
|
}
|
|
|
|
|
|
//国内港口信息
|
|
|
if (_t.STORENAME == "CODE_PORTLOAD")
|
|
|
{
|
|
|
result = BasicDataRefDAL.GetCodeLoadportList_Sqlstr("").ToString();
|
|
|
}
|
|
|
|
|
|
//国际港口信息
|
|
|
if (_t.STORENAME == "CODE_PORTDISCHARGE")
|
|
|
{
|
|
|
result = BasicDataRefDAL.GetCodeDisportList_DisplayWithCNAME_Sqlstr("").ToString();
|
|
|
}
|
|
|
|
|
|
|
|
|
//场站信息
|
|
|
if (_t.STORENAME == "OPSEAE_YARD")
|
|
|
{
|
|
|
result = BasicDataRefDAL.GetCustomInvRefList_SqlStr(" ISYARD=1 ").ToString();
|
|
|
}
|
|
|
|
|
|
|
|
|
if (_t.STORENAME == "CODE_FEE")
|
|
|
{
|
|
|
result = MsChFeeDAL.GetFeeTypeRefList_Sqlstr("").ToString();
|
|
|
}
|
|
|
|
|
|
|
|
|
if (_t.STORENAME == "INFOCLIENT_ALL")
|
|
|
{
|
|
|
result = BasicDataRefDAL.GetCustomInvRefList_SqlStr("", USERINFO.ISENABLECUSTRANGE, USERINFO.USERID).ToString();
|
|
|
}
|
|
|
|
|
|
if (_t.STORENAME == "INFOCLIENT_CARRIER")
|
|
|
{
|
|
|
result = BasicDataRefDAL.GetCustomInvRefList_SqlStr(" ISCARRIER=1 ", USERINFO.ISENABLECUSTRANGE, USERINFO.USERID).ToString();
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
|
|
|
|
|
|
return result;
|
|
|
}
|
|
|
|
|
|
[ModelDB(MDBType = ModelDBOprationType.All, IsPrimary = true)]
|
|
|
public string GID
|
|
|
{
|
|
|
get { return _GID; }
|
|
|
set { _GID = value; }
|
|
|
}
|
|
|
/// <summary>
|
|
|
/// store的名字 如 INFOCLIENT_CARRIER 等,用于表示这个数据集的内容
|
|
|
/// </summary>
|
|
|
public string STORENAME
|
|
|
{
|
|
|
get { return _STORENAME.ToUpper(); }
|
|
|
set { _STORENAME = value; }
|
|
|
}
|
|
|
public string TABLENAME
|
|
|
{
|
|
|
get { return _TABLENAME.ToUpper(); }
|
|
|
set { _TABLENAME = value; }
|
|
|
}
|
|
|
[ModelDB]
|
|
|
public string MODIFIEDTIME
|
|
|
{
|
|
|
get { return _MODIFIEDTIME; }
|
|
|
set { _MODIFIEDTIME = value; }
|
|
|
}
|
|
|
|
|
|
|
|
|
public string DISPLAYFIELD
|
|
|
{
|
|
|
get { return _DISPLAYFIELD; }
|
|
|
set { _DISPLAYFIELD = value; }
|
|
|
}
|
|
|
public string VALUEFIELD
|
|
|
{
|
|
|
get { return _VALUEFIELD; }
|
|
|
set { _VALUEFIELD = value; }
|
|
|
}
|
|
|
public string DISPLAYFIELD2
|
|
|
{
|
|
|
get { return _DISPLAYFIELD2; }
|
|
|
set { _DISPLAYFIELD2 = value; }
|
|
|
}
|
|
|
public string CONDITION
|
|
|
{
|
|
|
get { return _CONDITION; }
|
|
|
set { _CONDITION = value; }
|
|
|
}
|
|
|
#endregion
|
|
|
|
|
|
public StoreModifyStatusMb()
|
|
|
{
|
|
|
// TableName = "tMsWlPcHead";
|
|
|
TableName = "t_sys_StoreModifyStatus";
|
|
|
}
|
|
|
|
|
|
public string getrangstr(string USERID) {
|
|
|
var result = "";
|
|
|
|
|
|
|
|
|
|
|
|
return result;
|
|
|
}
|
|
|
|
|
|
public override string GetBillNoFieldName()
|
|
|
{
|
|
|
return "GID";
|
|
|
}
|
|
|
|
|
|
public override string GetTimeMarkFieldName()
|
|
|
{
|
|
|
return "";
|
|
|
}
|
|
|
}
|
|
|
|
|
|
/// <summary>
|
|
|
///
|
|
|
/// </summary>
|
|
|
public class PubStore
|
|
|
{
|
|
|
|
|
|
public string STOREUSERID { get; set; }
|
|
|
|
|
|
public List<PubStoremb> storelist { get; set; }
|
|
|
|
|
|
}
|
|
|
|
|
|
[JsonObject]//通用store数据集
|
|
|
public class PubStoremb : ModelObjectBillHead
|
|
|
{
|
|
|
public override Dictionary<string, ModelDBOprationType> GetPKey()
|
|
|
{//用于给扩展的动态数据提供主键字段名
|
|
|
var d = new Dictionary<string, ModelDBOprationType>() { { "GID", ModelDBOprationType.All } };
|
|
|
|
|
|
return d;
|
|
|
}
|
|
|
|
|
|
public Dictionary<string, string> SaveDic = new Dictionary<string, string>();
|
|
|
|
|
|
public PubStoremb()
|
|
|
{
|
|
|
//TableName = "Op_INTERNALTRADE";
|
|
|
}
|
|
|
|
|
|
public override string GetBillNoFieldName()
|
|
|
{
|
|
|
return "GID";
|
|
|
}
|
|
|
|
|
|
public override string GetTimeMarkFieldName()
|
|
|
{
|
|
|
return "";
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
[JsonObject]//用于费用历史引入的v_op_bs数据集
|
|
|
public class VOPBSmb : ModelObjectBillHead
|
|
|
{
|
|
|
public override Dictionary<string, ModelDBOprationType> GetPKey()
|
|
|
{//用于给扩展的动态数据提供主键字段名
|
|
|
var d = new Dictionary<string, ModelDBOprationType>() { { "BSNO", ModelDBOprationType.All } };
|
|
|
|
|
|
return d;
|
|
|
}
|
|
|
|
|
|
public VOPBSmb()
|
|
|
{
|
|
|
//TableName = "Op_INTERNALTRADE";
|
|
|
}
|
|
|
|
|
|
public override string GetBillNoFieldName()
|
|
|
{
|
|
|
return "BSNO";
|
|
|
}
|
|
|
|
|
|
public override string GetTimeMarkFieldName()
|
|
|
{
|
|
|
return "";
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
#region 关贸云 数据解析用
|
|
|
|
|
|
|
|
|
public class DECL_HEAD
|
|
|
{
|
|
|
/// <summary>
|
|
|
///
|
|
|
/// </summary>
|
|
|
public string DECL_NO { get; set; }
|
|
|
/// <summary>
|
|
|
///
|
|
|
/// </summary>
|
|
|
public string PRE_CUSTOMS_NO { get; set; }
|
|
|
/// <summary>
|
|
|
///
|
|
|
/// </summary>
|
|
|
public string CUSTOMS_NO { get; set; }
|
|
|
/// <summary>
|
|
|
///
|
|
|
/// </summary>
|
|
|
public string EPROT_NO { get; set; }
|
|
|
|
|
|
/// <summary>
|
|
|
/// 转关单号
|
|
|
/// </summary>
|
|
|
public string TRN_PRE_ID { get; set; }
|
|
|
/// <summary>
|
|
|
///
|
|
|
/// </summary>
|
|
|
public string IE_TYPE { get; set; }
|
|
|
/// <summary>
|
|
|
///
|
|
|
/// </summary>
|
|
|
public string DECL_TYPE { get; set; }
|
|
|
/// <summary>
|
|
|
///
|
|
|
/// </summary>
|
|
|
public DateTime IE_DATE { get; set; }
|
|
|
/// <summary>
|
|
|
///
|
|
|
/// </summary>
|
|
|
public DateTime DECL_DATE { get; set; }
|
|
|
/// <summary>
|
|
|
///
|
|
|
/// </summary>
|
|
|
public string DECL_PORT { get; set; }
|
|
|
/// <summary>
|
|
|
///
|
|
|
/// </summary>
|
|
|
public string IE_PORT { get; set; }
|
|
|
|
|
|
public string IE_PORT_NAME { get; set; }
|
|
|
/// <summary>
|
|
|
///
|
|
|
/// </summary>
|
|
|
public string HAND_BOOK_NO { get; set; }
|
|
|
/// <summary>
|
|
|
///
|
|
|
/// </summary>
|
|
|
public string CONTR_NO { get; set; }
|
|
|
/// <summary>
|
|
|
///
|
|
|
/// </summary>
|
|
|
public string SHIP_NO { get; set; }
|
|
|
/// <summary>
|
|
|
///
|
|
|
/// </summary>
|
|
|
public string EXPORT_CODE { get; set; }
|
|
|
/// <summary>
|
|
|
///
|
|
|
/// </summary>
|
|
|
public string EXPORT_NAME { get; set; }
|
|
|
/// <summary>
|
|
|
///
|
|
|
/// </summary>
|
|
|
public string SHIP_CODE { get; set; }
|
|
|
/// <summary>
|
|
|
///
|
|
|
/// </summary>
|
|
|
public string SHIP_NAME { get; set; }
|
|
|
/// <summary>
|
|
|
///
|
|
|
/// </summary>
|
|
|
public string FC_CODE { get; set; }
|
|
|
/// <summary>
|
|
|
///
|
|
|
/// </summary>
|
|
|
public string FC_NAME { get; set; }
|
|
|
/// <summary>
|
|
|
///
|
|
|
/// </summary>
|
|
|
public string RCV_CODE { get; set; }
|
|
|
/// <summary>
|
|
|
///
|
|
|
/// </summary>
|
|
|
public string RCV_TYPE { get; set; }
|
|
|
/// <summary>
|
|
|
///
|
|
|
/// </summary>
|
|
|
public string DECL_COM_CODE { get; set; }
|
|
|
/// <summary>
|
|
|
///
|
|
|
/// </summary>
|
|
|
public string DECL_COM_NAME { get; set; }
|
|
|
/// <summary>
|
|
|
///
|
|
|
/// </summary>
|
|
|
public string TRANS_TYPE_CODE { get; set; }
|
|
|
/// <summary>
|
|
|
///
|
|
|
/// </summary>
|
|
|
public string TRANS_TOOL_NAME { get; set; }
|
|
|
/// <summary>
|
|
|
///
|
|
|
/// </summary>
|
|
|
public string VOYAGE_NO { get; set; }
|
|
|
/// <summary>
|
|
|
///
|
|
|
/// </summary>
|
|
|
public string BILL_NO { get; set; }
|
|
|
/// <summary>
|
|
|
///
|
|
|
/// </summary>
|
|
|
public string COUNTRY_CODE { get; set; }
|
|
|
|
|
|
public string COUNTRY_CODE_EN { get; set; }
|
|
|
/// <summary>
|
|
|
///
|
|
|
/// </summary>
|
|
|
public string DEST_PORT_CODE { get; set; }
|
|
|
/// <summary>
|
|
|
///
|
|
|
/// </summary>
|
|
|
public string TRADE_TYPE_CODE { get; set; }
|
|
|
/// <summary>
|
|
|
///
|
|
|
/// </summary>
|
|
|
public string TAX_KINDS_CODE { get; set; }
|
|
|
/// <summary>
|
|
|
///
|
|
|
/// </summary>
|
|
|
public string TAX_RATIO { get; set; }
|
|
|
/// <summary>
|
|
|
///
|
|
|
/// </summary>
|
|
|
public string TAX_UNIT_NAME { get; set; }
|
|
|
/// <summary>
|
|
|
///
|
|
|
/// </summary>
|
|
|
public string TAX_TYPE_CODE { get; set; }
|
|
|
/// <summary>
|
|
|
///
|
|
|
/// </summary>
|
|
|
public string TRADE_TERMS_CODE { get; set; }
|
|
|
/// <summary>
|
|
|
///
|
|
|
/// </summary>
|
|
|
public string CURRENCY_CODE { get; set; }
|
|
|
/// <summary>
|
|
|
///
|
|
|
/// </summary>
|
|
|
public string LICENCE_NO { get; set; }
|
|
|
/// <summary>
|
|
|
///
|
|
|
/// </summary>
|
|
|
public string FEE_MARK { get; set; }
|
|
|
/// <summary>
|
|
|
///
|
|
|
/// </summary>
|
|
|
public string FEE_CURR { get; set; }
|
|
|
/// <summary>
|
|
|
///
|
|
|
/// </summary>
|
|
|
public string FEE_RATE { get; set; }
|
|
|
/// <summary>
|
|
|
///
|
|
|
/// </summary>
|
|
|
public string INSUR_MARK { get; set; }
|
|
|
/// <summary>
|
|
|
///
|
|
|
/// </summary>
|
|
|
public string INSUR_RATE { get; set; }
|
|
|
/// <summary>
|
|
|
///
|
|
|
/// </summary>
|
|
|
public string ADDIT_EXPEN_MARK { get; set; }
|
|
|
/// <summary>
|
|
|
///
|
|
|
/// </summary>
|
|
|
public string PACKAGE_TYPE_CODE { get; set; }
|
|
|
/// <summary>
|
|
|
///
|
|
|
/// </summary>
|
|
|
public string TOTAL_AMOUNT { get; set; }
|
|
|
/// <summary>
|
|
|
///
|
|
|
/// </summary>
|
|
|
public string TOTAL_PACKEGES { get; set; }
|
|
|
/// <summary>
|
|
|
///
|
|
|
/// </summary>
|
|
|
public string TOTAL_GROSS_WEIGHT { get; set; }
|
|
|
/// <summary>
|
|
|
///
|
|
|
/// </summary>
|
|
|
public string TOTAL_NET_WEIGHT { get; set; }
|
|
|
/// <summary>
|
|
|
///
|
|
|
/// </summary>
|
|
|
public string RELATIVE_ENTRY_ID { get; set; }
|
|
|
/// <summary>
|
|
|
///
|
|
|
/// </summary>
|
|
|
public string RELATIVE_EMS_NO { get; set; }
|
|
|
/// <summary>
|
|
|
///
|
|
|
/// </summary>
|
|
|
public string BONDED_NO { get; set; }
|
|
|
/// <summary>
|
|
|
///
|
|
|
/// </summary>
|
|
|
public string YARD_NO { get; set; }
|
|
|
/// <summary>
|
|
|
///
|
|
|
/// </summary>
|
|
|
public string PRODUCT_FLAG { get; set; }
|
|
|
/// <summary>
|
|
|
///
|
|
|
/// </summary>
|
|
|
public string REMARK { get; set; }
|
|
|
/// <summary>
|
|
|
///
|
|
|
/// </summary>
|
|
|
public string SOURCES { get; set; }
|
|
|
/// <summary>
|
|
|
///
|
|
|
/// </summary>
|
|
|
public string WS_LINK_NO { get; set; }
|
|
|
/// <summary>
|
|
|
///
|
|
|
/// </summary>
|
|
|
public string CUS_INSPE_NO { get; set; }
|
|
|
/// <summary>
|
|
|
///
|
|
|
/// </summary>
|
|
|
public string GOODS_NUM { get; set; }
|
|
|
/// <summary>
|
|
|
///
|
|
|
/// </summary>
|
|
|
public string EXPORT_CREDIT_CODE { get; set; }
|
|
|
/// <summary>
|
|
|
///
|
|
|
/// </summary>
|
|
|
public string SHIP_CREDIT_CODE { get; set; }
|
|
|
/// <summary>
|
|
|
///
|
|
|
/// </summary>
|
|
|
public string DECL_CREDIT_CODE { get; set; }
|
|
|
/// <summary>
|
|
|
///
|
|
|
/// </summary>
|
|
|
public string PRICE_IMPACT { get; set; }
|
|
|
/// <summary>
|
|
|
///
|
|
|
/// </summary>
|
|
|
public string PAY_FRANCHISE { get; set; }
|
|
|
/// <summary>
|
|
|
///
|
|
|
/// </summary>
|
|
|
public string SPECIAL_RELATION { get; set; }
|
|
|
/// <summary>
|
|
|
///
|
|
|
/// </summary>
|
|
|
public string TRADE_COUNTRY_CODE { get; set; }
|
|
|
/// <summary>
|
|
|
///
|
|
|
/// </summary>
|
|
|
public string IS_TRANSIT { get; set; }
|
|
|
/// <summary>
|
|
|
///
|
|
|
/// </summary>
|
|
|
public string BUS_TYPE { get; set; }
|
|
|
/// <summary>
|
|
|
///
|
|
|
/// </summary>
|
|
|
public string PRE_INPUT_NO { get; set; }
|
|
|
/// <summary>
|
|
|
///
|
|
|
/// </summary>
|
|
|
public string DEST_COUNTRY_CODE { get; set; }
|
|
|
/// <summary>
|
|
|
///
|
|
|
/// </summary>
|
|
|
public string USE_TO { get; set; }
|
|
|
/// <summary>
|
|
|
///
|
|
|
/// </summary>
|
|
|
public string USE_DESC { get; set; }
|
|
|
/// <summary>
|
|
|
///
|
|
|
/// </summary>
|
|
|
public string EXPORT_ECIQ_CODE { get; set; }
|
|
|
/// <summary>
|
|
|
///
|
|
|
/// </summary>
|
|
|
public string SHIP_ECIQ_CODE { get; set; }
|
|
|
/// <summary>
|
|
|
///
|
|
|
/// </summary>
|
|
|
public string DECL_ECIQ_CODE { get; set; }
|
|
|
/// <summary>
|
|
|
///
|
|
|
/// </summary>
|
|
|
public string DESP_PORT_CODE { get; set; }
|
|
|
/// <summary>
|
|
|
///
|
|
|
/// </summary>
|
|
|
public string CIQ_ENTY_PORT_CODE { get; set; }
|
|
|
/// <summary>
|
|
|
///
|
|
|
/// </summary>
|
|
|
public string MARKS_NOS { get; set; }
|
|
|
/// <summary>
|
|
|
///
|
|
|
/// </summary>
|
|
|
public string GOODS_PLACE { get; set; }
|
|
|
/// <summary>
|
|
|
///
|
|
|
/// </summary>
|
|
|
public string ORG_CODE { get; set; }
|
|
|
/// <summary>
|
|
|
///
|
|
|
/// </summary>
|
|
|
public string INSP_ORG_CODE { get; set; }
|
|
|
/// <summary>
|
|
|
///
|
|
|
/// </summary>
|
|
|
public string VSA_ORG_CODE { get; set; }
|
|
|
/// <summary>
|
|
|
///
|
|
|
/// </summary>
|
|
|
public string PURP_ORG_CODE { get; set; }
|
|
|
/// <summary>
|
|
|
///
|
|
|
/// </summary>
|
|
|
public DateTime DESP_DATE { get; set; }
|
|
|
/// <summary>
|
|
|
///
|
|
|
/// </summary>
|
|
|
public string CIQ_BILL_NO { get; set; }
|
|
|
/// <summary>
|
|
|
///
|
|
|
/// </summary>
|
|
|
public string CORRELATION_DECL_NO { get; set; }
|
|
|
/// <summary>
|
|
|
///
|
|
|
/// </summary>
|
|
|
public string CORRELATION_REASON_FLAG { get; set; }
|
|
|
/// <summary>
|
|
|
///
|
|
|
/// </summary>
|
|
|
public string CMPL_DSCHRG_DT { get; set; }
|
|
|
/// <summary>
|
|
|
///
|
|
|
/// </summary>
|
|
|
public string SPEC_DECL_FLAG { get; set; }
|
|
|
/// <summary>
|
|
|
///
|
|
|
/// </summary>
|
|
|
public string SPEC_PASS_FLAG { get; set; }
|
|
|
/// <summary>
|
|
|
///
|
|
|
/// </summary>
|
|
|
public string ORIG_BOX_FLAG { get; set; }
|
|
|
|
|
|
|
|
|
public bool 是进口() {
|
|
|
return IE_TYPE == "I";
|
|
|
}
|
|
|
public bool 是出口()
|
|
|
{
|
|
|
return IE_TYPE == "E";
|
|
|
}
|
|
|
}
|
|
|
|
|
|
public class DECL_GOODS
|
|
|
{
|
|
|
/// <summary>
|
|
|
///
|
|
|
/// </summary>
|
|
|
public string DECL_NO { get; set; }
|
|
|
/// <summary>
|
|
|
///
|
|
|
/// </summary>
|
|
|
public string CUSTOMS_NO { get; set; }
|
|
|
/// <summary>
|
|
|
///
|
|
|
/// </summary>
|
|
|
public string GOODS_SEQ { get; set; }
|
|
|
/// <summary>
|
|
|
///
|
|
|
/// </summary>
|
|
|
public string HSCODE_TS { get; set; }
|
|
|
/// <summary>
|
|
|
///
|
|
|
/// </summary>
|
|
|
public string HSCODE_T { get; set; }
|
|
|
/// <summary>
|
|
|
///
|
|
|
/// </summary>
|
|
|
public string HSCODE_S { get; set; }
|
|
|
/// <summary>
|
|
|
///
|
|
|
/// </summary>
|
|
|
public string GOODS_NAME { get; set; }
|
|
|
/// <summary>
|
|
|
///
|
|
|
/// </summary>
|
|
|
public string GOODS_MODEL { get; set; }
|
|
|
|
|
|
/// <summary>
|
|
|
/// 件数 文档中有而报文例子中没有
|
|
|
/// </summary>
|
|
|
public string PACKEGES { get; set; }
|
|
|
|
|
|
/// <summary>
|
|
|
///
|
|
|
/// </summary>
|
|
|
public string QTY { get; set; }
|
|
|
/// <summary>
|
|
|
///
|
|
|
/// </summary>
|
|
|
public string UNIT { get; set; }
|
|
|
/// <summary>
|
|
|
///
|
|
|
/// </summary>
|
|
|
public string PRICE { get; set; }
|
|
|
/// <summary>
|
|
|
///
|
|
|
/// </summary>
|
|
|
public string AMOUNT { get; set; }
|
|
|
/// <summary>
|
|
|
///
|
|
|
/// </summary>
|
|
|
public string CURRENCY { get; set; }
|
|
|
/// <summary>
|
|
|
///
|
|
|
/// </summary>
|
|
|
public string QTY_1 { get; set; }
|
|
|
/// <summary>
|
|
|
///
|
|
|
/// </summary>
|
|
|
public string UNIT_1 { get; set; }
|
|
|
/// <summary>
|
|
|
///
|
|
|
/// </summary>
|
|
|
public string QTY_2 { get; set; }
|
|
|
/// <summary>
|
|
|
///
|
|
|
/// </summary>
|
|
|
public string UNIT_2 { get; set; }
|
|
|
/// <summary>
|
|
|
///
|
|
|
/// </summary>
|
|
|
public string DESTINATION_CODE { get; set; }
|
|
|
/// <summary>
|
|
|
///
|
|
|
/// </summary>
|
|
|
public string TAX_TYPE { get; set; }
|
|
|
/// <summary>
|
|
|
///
|
|
|
/// </summary>
|
|
|
public string USE_TO { get; set; }
|
|
|
/// <summary>
|
|
|
///
|
|
|
/// </summary>
|
|
|
public string USE_DESC { get; set; }
|
|
|
/// <summary>
|
|
|
///
|
|
|
/// </summary>
|
|
|
public string COUNTRY_OF_ORIGIN_CODE { get; set; }
|
|
|
}
|
|
|
|
|
|
public class GOODS_LIST
|
|
|
{
|
|
|
|
|
|
/// <summary>
|
|
|
///
|
|
|
/// </summary>
|
|
|
public DECL_GOODS DECL_GOODS { get; set; }
|
|
|
}
|
|
|
|
|
|
public class DECL_DOC
|
|
|
{
|
|
|
/// <summary>
|
|
|
///
|
|
|
/// </summary>
|
|
|
public string DECL_NO { get; set; }
|
|
|
/// <summary>
|
|
|
///
|
|
|
/// </summary>
|
|
|
public string DOC_FRM { get; set; }
|
|
|
/// <summary>
|
|
|
///
|
|
|
/// </summary>
|
|
|
public string DOC_TYPE { get; set; }
|
|
|
/// <summary>
|
|
|
/// <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ί<EFBFBD><CEAF>Э<EFBFBD>飨<EFBFBD><E9A3A8><EFBFBD>ӣ<EFBFBD>
|
|
|
/// </summary>
|
|
|
public string DOC_NAME { get; set; }
|
|
|
/// <summary>
|
|
|
///
|
|
|
/// </summary>
|
|
|
public string DOC_NO { get; set; }
|
|
|
/// <summary>
|
|
|
///
|
|
|
/// </summary>
|
|
|
public string EXPORT_CODE { get; set; }
|
|
|
/// <summary>
|
|
|
///
|
|
|
/// </summary>
|
|
|
public string EXPORT_NAME { get; set; }
|
|
|
}
|
|
|
|
|
|
public class DOC_LIST
|
|
|
{
|
|
|
/// <summary>
|
|
|
///
|
|
|
/// </summary>
|
|
|
public DECL_DOC DECL_DOC { get; set; }
|
|
|
}
|
|
|
|
|
|
public class BUSINESS_ORDER_INFO
|
|
|
{
|
|
|
/// <summary>
|
|
|
///
|
|
|
/// </summary>
|
|
|
public string BUS_NO { get; set; }
|
|
|
/// <summary>
|
|
|
///
|
|
|
/// </summary>
|
|
|
public string WORK_NO { get; set; }
|
|
|
/// <summary>
|
|
|
///
|
|
|
/// </summary>
|
|
|
public string OPS_DEPT { get; set; }
|
|
|
/// <summary>
|
|
|
///
|
|
|
/// </summary>
|
|
|
public string EXPORT_CODE { get; set; }
|
|
|
/// <summary>
|
|
|
///
|
|
|
/// </summary>
|
|
|
public string EXPORT_NAME { get; set; }
|
|
|
}
|
|
|
|
|
|
public class DECL_USER
|
|
|
{
|
|
|
/// <summary>
|
|
|
///
|
|
|
/// </summary>
|
|
|
public string USE_ORG_PERSON_CODE { get; set; }
|
|
|
/// <summary>
|
|
|
///
|
|
|
/// </summary>
|
|
|
public string USE_ORG_PERSON_TEL { get; set; }
|
|
|
}
|
|
|
|
|
|
public class DECL_USER_LIST
|
|
|
{
|
|
|
/// <summary>
|
|
|
///
|
|
|
/// </summary>
|
|
|
public DECL_USER DECL_USER { get; set; }
|
|
|
}
|
|
|
|
|
|
public class GuanMaoYun_Head
|
|
|
{
|
|
|
/// <summary>
|
|
|
///
|
|
|
/// </summary>
|
|
|
public DECL_HEAD DECL_HEAD { get; set; }
|
|
|
/// <summary>
|
|
|
///
|
|
|
/// </summary>
|
|
|
public List<GOODS_LIST> GOODS_LIST { get; set; }
|
|
|
/// <summary>
|
|
|
///
|
|
|
/// </summary>
|
|
|
public List<DOC_LIST> DOC_LIST { get; set; }
|
|
|
/// <summary>
|
|
|
///
|
|
|
/// </summary>
|
|
|
public BUSINESS_ORDER_INFO BUSINESS_ORDER_INFO { get; set; }
|
|
|
/// <summary>
|
|
|
///
|
|
|
/// </summary>
|
|
|
public string DECL_TRN_HEAD { get; set; }
|
|
|
/// <summary>
|
|
|
///
|
|
|
/// </summary>
|
|
|
public string DECL_TRN_LIST { get; set; }
|
|
|
/// <summary>
|
|
|
///
|
|
|
/// </summary>
|
|
|
public string DECL_TRN_CONTAINER_LIST { get; set; }
|
|
|
/// <summary>
|
|
|
///
|
|
|
/// </summary>
|
|
|
public string DECL_TRN_CONTA_GOODS_LIST { get; set; }
|
|
|
/// <summary>
|
|
|
///
|
|
|
/// </summary>
|
|
|
public List<string> CSM_WHS_LINK_LIST { get; set; }
|
|
|
/// <summary>
|
|
|
///
|
|
|
/// </summary>
|
|
|
public List<string> APPLY_CERT_LIST { get; set; }
|
|
|
/// <summary>
|
|
|
///
|
|
|
/// </summary>
|
|
|
public string OTHER_PACK_LIST { get; set; }
|
|
|
/// <summary>
|
|
|
///
|
|
|
/// </summary>
|
|
|
public List<string> ENT_QUALIF_LIST { get; set; }
|
|
|
/// <summary>
|
|
|
///
|
|
|
/// </summary>
|
|
|
public List<DECL_USER_LIST> DECL_USER_LIST { get; set; }
|
|
|
|
|
|
|
|
|
public string GetBSNO() {
|
|
|
return BUSINESS_ORDER_INFO.WORK_NO;
|
|
|
}
|
|
|
}
|
|
|
|
|
|
////////////////////////
|
|
|
///
|
|
|
|
|
|
public class COSTS
|
|
|
{
|
|
|
/// <summary>
|
|
|
///
|
|
|
/// </summary>
|
|
|
public string BALANCE_DIRECTION_ID { get; set; }
|
|
|
/// <summary>
|
|
|
///
|
|
|
/// </summary>
|
|
|
public string COAGENT_ID { get; set; }
|
|
|
/// <summary>
|
|
|
///
|
|
|
/// </summary>
|
|
|
public string FEE_TYPE_ID { get; set; }
|
|
|
/// <summary>
|
|
|
///
|
|
|
/// </summary>
|
|
|
public string FEE_TYPE_CODE { get; set; }
|
|
|
/// <summary>
|
|
|
/// 舱单费
|
|
|
/// </summary>
|
|
|
public string FEE_TYPE_NAME { get; set; }
|
|
|
/// <summary>
|
|
|
///
|
|
|
/// </summary>
|
|
|
public string MONEY_TYPE_ID { get; set; }
|
|
|
/// <summary>
|
|
|
///
|
|
|
/// </summary>
|
|
|
public decimal? UNIT_PRICE { get; set; }
|
|
|
/// <summary>
|
|
|
///
|
|
|
/// </summary>
|
|
|
public decimal? UNIT_NUMBER { get; set; }
|
|
|
/// <summary>
|
|
|
///
|
|
|
/// </summary>
|
|
|
public decimal? AMOUNT { get; set; }
|
|
|
/// <summary>
|
|
|
///
|
|
|
/// </summary>
|
|
|
public decimal? EXCHANGE_RATE { get; set; }
|
|
|
/// <summary>
|
|
|
///
|
|
|
/// </summary>
|
|
|
public int IS_AUDITING { get; set; }
|
|
|
/// <summary>
|
|
|
///
|
|
|
/// </summary>
|
|
|
public string AUDITING_HANDLER { get; set; }
|
|
|
/// <summary>
|
|
|
///
|
|
|
/// </summary>
|
|
|
public int AUDITING_DATE { get; set; }
|
|
|
/// <summary>
|
|
|
///
|
|
|
/// </summary>
|
|
|
public string BRANCH_ID { get; set; }
|
|
|
/// <summary>
|
|
|
///
|
|
|
/// </summary>
|
|
|
public string CREATE_ID { get; set; }
|
|
|
/// <summary>
|
|
|
///
|
|
|
/// </summary>
|
|
|
public int CREATE_TIME { get; set; }
|
|
|
/// <summary>
|
|
|
///
|
|
|
/// </summary>
|
|
|
public string UPDATE_ID { get; set; }
|
|
|
/// <summary>
|
|
|
///
|
|
|
/// </summary>
|
|
|
public int UPDATE_TIME { get; set; }
|
|
|
/// <summary>
|
|
|
///
|
|
|
/// </summary>
|
|
|
public string JOB_CATALOG_ID { get; set; }
|
|
|
/// <summary>
|
|
|
///
|
|
|
/// </summary>
|
|
|
public string SOURCE_JOB_BALANCE_ID { get; set; }
|
|
|
/// <summary>
|
|
|
///
|
|
|
/// </summary>
|
|
|
public string CONTAINER_INFO { get; set; }
|
|
|
/// <summary>
|
|
|
/// 舱单费
|
|
|
/// </summary>
|
|
|
public string MEMO { get; set; }
|
|
|
}
|
|
|
|
|
|
public class GuanMaoYun_Fee
|
|
|
{
|
|
|
/// <summary>
|
|
|
///
|
|
|
/// </summary>
|
|
|
public string JOB_ID { get; set; }
|
|
|
/// <summary>
|
|
|
///
|
|
|
/// </summary>
|
|
|
public string COMPANY { get; set; }
|
|
|
/// <summary>
|
|
|
///
|
|
|
/// </summary>
|
|
|
public string OPS_TEAM { get; set; }
|
|
|
/// <summary>
|
|
|
///
|
|
|
/// </summary>
|
|
|
public int SETTLE_DATE { get; set; }
|
|
|
/// <summary>
|
|
|
///
|
|
|
/// </summary>
|
|
|
public string CUSTOMER { get; set; }
|
|
|
/// <summary>
|
|
|
///
|
|
|
/// </summary>
|
|
|
public string CUSTOMER_ORDER_NO { get; set; }
|
|
|
/// <summary>
|
|
|
///
|
|
|
/// </summary>
|
|
|
public double GOODS_VALUE { get; set; }
|
|
|
/// <summary>
|
|
|
///
|
|
|
/// </summary>
|
|
|
public string MEMO { get; set; }
|
|
|
/// <summary>
|
|
|
///
|
|
|
/// </summary>
|
|
|
public int CREATE_TIME { get; set; }
|
|
|
/// <summary>
|
|
|
///
|
|
|
/// </summary>
|
|
|
public List<COSTS> COSTS { get; set; }
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
public struct CurrenctCode
|
|
|
{
|
|
|
|
|
|
public const int RMB = 142;
|
|
|
public const int HKD = 110;
|
|
|
public const int USD = 502;
|
|
|
public const int EUR = 300;
|
|
|
public const int JPY = 116;
|
|
|
/*110 HKD 港币 113 IRR 伊朗里亚尔
|
|
|
116 JPY 日本元 118 KWD 科威特第纳尔
|
|
|
121 MOP 澳门元 122 MYR 马来西亚林吉特
|
|
|
127 PKR 巴基斯坦卢比 129 PHP 菲律宾比索
|
|
|
132 SGD 新加坡元 136 THB 泰国铢
|
|
|
142 CNY 人民币 143 TWD 台币
|
|
|
201 DZD 阿尔及利亚第纳尔 300 EUR 欧元
|
|
|
302 DKK 丹麦克朗 303 GBP 英镑
|
|
|
326 NOK 挪威克朗 330 SEK 瑞典克朗
|
|
|
331 CHF 瑞士法郎 332 SUR 苏联卢布
|
|
|
398 ASF 清算瑞士法郎 501 CAD 加拿大元
|
|
|
502 USD 美元 601 AUD 澳大利亚元
|
|
|
609 NZD 新西兰元*/
|
|
|
}
|
|
|
|
|
|
public static class CURRENCYCODE {
|
|
|
public static string GetName(int code) {
|
|
|
if (code == CurrenctCode.RMB) return "RMB";
|
|
|
if (code == CurrenctCode.HKD) return "HKD";
|
|
|
if (code == CurrenctCode.USD) return "USD";
|
|
|
if (code == CurrenctCode.EUR) return "EUR";
|
|
|
if (code == CurrenctCode.JPY) return "JPY";
|
|
|
return "";
|
|
|
}
|
|
|
}
|
|
|
|
|
|
public class Condition
|
|
|
{
|
|
|
public string GID { get; set; } = "";
|
|
|
public string BSNO { get; set; } = "";
|
|
|
public string CODENAME { get; set; } = "";
|
|
|
public string REMARK { get; set; } = "";
|
|
|
public string DESCRIPTION { get; set; } = "";
|
|
|
public string SHORTNAME { get; set; } = "";
|
|
|
public string CUSTOMERNAME { get; set; } = "";
|
|
|
public DateTime ETD { get; set; }
|
|
|
|
|
|
public string USERID { get; set; } = "";
|
|
|
|
|
|
public string CORPID { get; set; } = "";
|
|
|
|
|
|
public QueryCollection GetQueries_Base(QueryCollection queries)
|
|
|
{
|
|
|
if (string.IsNullOrWhiteSpace(GID))
|
|
|
{
|
|
|
queries.Add(new Query { Name = "GID", Operator = Query.Operators.Equal, Value = GID });
|
|
|
}
|
|
|
if (string.IsNullOrWhiteSpace(BSNO))
|
|
|
{
|
|
|
queries.Add(new Query { Name = "BSNO", Operator = Query.Operators.Contains, Value = BSNO });
|
|
|
}
|
|
|
if (string.IsNullOrWhiteSpace(REMARK))
|
|
|
{
|
|
|
queries.Add(new Query { Name = "REMARK", Operator = Query.Operators.Contains, Value = REMARK });
|
|
|
}
|
|
|
if (string.IsNullOrWhiteSpace(CUSTOMERNAME))
|
|
|
{
|
|
|
queries.Add(new Query { Name = "CUSTOMERNAME", Operator = Query.Operators.Contains, Value = CUSTOMERNAME });
|
|
|
}
|
|
|
return queries;
|
|
|
}
|
|
|
|
|
|
virtual public QueryCollection GetQueries(QueryCollection queries) {
|
|
|
return queries;
|
|
|
}
|
|
|
}
|
|
|
|
|
|
public class Condition_SuperVisionTruck : Condition
|
|
|
{
|
|
|
public string TRUCKNO { get; set; }
|
|
|
public string CONTACTSHOWNAME { get; set; } = "";
|
|
|
|
|
|
override public QueryCollection GetQueries(QueryCollection queries)
|
|
|
{
|
|
|
|
|
|
//if()
|
|
|
|
|
|
//SetWorkStatus();
|
|
|
|
|
|
//var BoxCode = VW_OP_YARD_CTNMNG_DJZRepository.Instance.FindAsIQueryable(x => x.GID == workdetail.BSNO).Select(n => n.BoxCode).First();
|
|
|
//OP_YARD_CTNMNG_STOREAREAINFOService.Instance.DoIn(workdetail.BSNO, AREACODE, BoxCode, null);
|
|
|
|
|
|
//return _webResponse.OK();
|
|
|
|
|
|
return queries;
|
|
|
}
|
|
|
}
|
|
|
}
|