| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721 |
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using GalaSoft.MvvmLight;
- using Muchinfo.MTPClient.Data.Enums;
- using Muchinfo.MTPClient.Data.Helper;
- using System.Windows;
- namespace Muchinfo.MTPClient.Data.Model.Delivery
- {
- /// <summary>
- /// 交割仓单查询Model
- /// </summary>
- public class DeliveryWarehouse:ViewModelBase
- {
- #region SQL字段
- //<select id="SearchDeliveryWarehouseOrder" parameterType="java.util.Map"
- // resultType="HashMap">
- // select * from (SELECT
- // gs.DeliveryGoodsName,
- // wh.warehousename,
- // WarehouseAddress
- // wr.WRID,
- // wr.WRCODE,
- // wr.WRTYPE,
- // wr.WRACCOUNTID,
- // wr.DELIVERYGOODSID,
- // wr.BRAND,
- // wr.RANK,
- // wr.WAREHOUSEID,
- // wr.QTY,
- // wr.FREEZEQTY,
- // wr.PAYQTY,
- // wr.GOODSUNITID,
- // wr.STORECHARGE,
- // wr.WRSAVER,
- // wr.WAREHOUSEPERSON,
- // wr.CONTRACTNO,
- // wr.STOREPLACE,
- // wr.STORESTART,
- // wr.STOREEND,
- // wr.STOREGOODSCODE,
- // wr.STOREGOODSNAME,
- // wr.SPEC,
- // wr.NATURE,
- // wr.PACKAGE,
- // wr.PCS,
- // wr.MARK,
- // wr.STOREAMOUNT,
- // wr.HASPOLICY,
- // wr.POLICYPERIOD,
- // wr.INSURER,
- // wr.INSURANCEPOLICY,
- // wr.CREATETIME,
- // wr.CREATORID,
- // wr.MODIFYTIME,
- // wr.MODIFIERID,
- // wr.STATUS,
- // wr.PROCSTATUS,
- // wr.STOREINCODE,
- // wr.WRREGISTERCODE,
- // wr.TELPHONE,
- // wr.PERSONNAME,
- // wr.ADDRESS,
- /// TAKETYPE
- // os.RequestTime,
- // os.AuditTime,
- // os.AuditId,
- // os.AuditStatus,
- // os.Remark
- // from DeliveryGoods gs
- // left join WarehouseReciept wr on wr.DeliveryGoodsId=gs.DeliveryGoodsId
- // left join WareHouse wh on wh.warehouseid=wr.warehouseid
- // left join (select wrr.Remark Remark,wrd.WRID WRID,wrr.AuditId AuditId,wrr.RequestTime RequestTime,wrr.AuditTime AuditTime,wrr.AuditStatus AuditStatus from WRRegister wrr left join WRRegisterDetail wrd on wrr.WRRegisterID=wrd.WRRegisterID) os on os.WRID=wr.WRID
- // left join useraccount u on u.accountid=os.AuditId
- // where wr.WRAccountId =#{accountId}
- // <if test="startDate != null">
- // AND wr.CreateTime >=to_date(#{startDate},'yyyy-MM-dd hh24:mi:ss')
- // </if>
- // <if test="endDate != null">
- // AND wr.CreateTime <=to_date(#{endDate},'yyyy-MM-dd hh24:mi:ss')
- // </if>
- // order by wr.CreateTime desc)
- // </select>
- #endregion
- #region 交割商品表DeliveryGoods
- /// <summary>
- /// 交割商品名称
- /// </summary>
- [PropertyDisc("DeliveryGoodsName")]
- public string DeliveryGoodsName { get; set; }
- /// <summary>
- /// 交割商品代碼
- /// </summary>
- [PropertyDisc("deliverygoodscode")]
- public string DeliveryGoodsCode { get; set; }
- /// <summary>
- /// 交割商品名称
- /// </summary>
- public string DeliveryGoodsCodeNameDisplay
- {
- get
- {
- return string.Format("{0}/{1}", DeliveryGoodsCode, DeliveryGoodsName);
- }
- }
- #endregion
- #region 仓单表WarehouseReciept
- /// <summary>
- /// 仓单ID
- /// </summary>
- [PropertyDisc("WRID")]
- public long WRID { get; set; }
- /// <summary>
- /// 仓单号
- /// </summary>
- [PropertyDisc("WRCode")]
- public string WRCode { get; set; }
- /// <summary>
- /// 仓单类型
- /// </summary>
- [PropertyDisc("WRType")]
- public eWRType WRType { get; set; }
- /// <summary>
- /// 仓单类型-转换字符
- /// </summary>
- public string WRTypeDisplay
- {
- get
- {
- return WRType.Discription();
- }
- }
- private string _Brand="-";
- /// <summary>
- /// 品牌
- /// </summary>
- [PropertyDisc("Brand")]
- public string Brand
- {
- get { return _Brand; }
- set { _Brand = value; }
- }
-
- private string _Rank="-";
- /// <summary>
- /// 等级
- /// </summary>
- [PropertyDisc("Rank")]
- public string Rank
- {
- get { return _Rank; }
- set { _Rank = value; }
- }
- /// <summary>
- /// 单位
- /// </summary>
- [PropertyDisc("GoodsUnitId")]
- public long GoodsUnitId { get; set; }
- /// <summary>
- /// 单位名称
- /// </summary>
- [PropertyDisc("GoodsunitName")]
- public string GoodsunitName { get; set; }
-
- private string _Spec="-";
- /// <summary>
- /// 规格
- /// </summary>
- [PropertyDisc("Spec")]
- public string Spec
- {
- get { return _Spec; }
- set { _Spec = value; }
- }
-
- private string _Nature="-";
- /// <summary>
- /// 性质(损耗标准)
- /// </summary>
- [PropertyDisc("Nature")]
- public string Nature
- {
- get { return _Nature; }
- set { _Nature = value; }
- }
-
- private string _Package="-";
- /// <summary>
- /// 包装
- /// </summary>
- [PropertyDisc("PACKAGE")]
- public string Package
- {
- get { return _Package; }
- set { _Package = value; }
- }
-
- private string _Pcs="-";
- /// <summary>
- /// 件数
- /// </summary>
- [PropertyDisc("Pcs")]
- public string Pcs
- {
- get { return _Pcs; }
- set { _Pcs = value; }
- }
- private string _Mark="-";
- /// <summary>
- /// 标记
- /// </summary>
- [PropertyDisc("Mark")]
- public string Mark
- {
- get { return _Mark; }
- set { _Mark = value; }
- }
- /// <summary>
- /// 注册数量
- /// </summary>
- [PropertyDisc("Qty")]
- public decimal Qty { get; set; }
- public string QtyDisplay
- {
- get
- {
- if (Qty != decimal.Zero)
- {
- return Qty.ToString();
- }
- else
- {
- return "-";
- }
- }
- }
- /// <summary>
- /// 可用数量
- /// </summary>
- public decimal AvailQty
- {
- get
- {
- return Qty - FreezeQty;
- }
- }
- /// <summary>
- /// 冻结数量
- /// </summary>
- [PropertyDisc("FreezeQty")]
- public decimal FreezeQty { get; set; }
- public string FreezeQtyDisplay
- {
- get
- {
- if (FreezeQty != decimal.Zero)
- {
- return FreezeQty.ToString();
- }
- else
- {
- return "-";
- }
- }
- }
- /// <summary>
- /// 兑付数量
- /// </summary>
- [PropertyDisc("PayQty")]
- public decimal PayQty { get; set; }
- public string PayQtyDisplay
- {
- get
- {
- if (PayQty != decimal.Zero)
- {
- return PayQty.ToString();
- }
- else
- {
- return "-";
- }
- }
- }
- /// <summary>
- /// 存储仓库
- /// </summary>
- [PropertyDisc("WareHouseId")]
- public string WareHouseId { get; set; }
-
- private string _StorePlace="-";
- /// <summary>
- /// 库位
- /// </summary>
- [PropertyDisc("StorePlace")]
- public string StorePlace
- {
- get { return _StorePlace; }
- set { _StorePlace = value; }
- }
- /// <summary>
- /// 仓储起始时间
- /// </summary>
- [PropertyDisc("StoreStart")]
- public DateTime StoreStart { get; set; }
- public string StoreStartDisplay
- {
- get
- {
- if (StoreStart != DateTime.MinValue && StoreStart != DateTime.MaxValue)
- {
- return StoreStart.ToString("yyyy-MM-dd");
- }
- else
- {
- return "-";
- }
- }
- }
- /// <summary>
- /// 仓储结束时间
- /// </summary>
- [PropertyDisc("StoreEnd")]
- public DateTime StoreEnd { get; set; }
- public string StoreEndDisplay
- {
- get
- {
- if (StoreEnd != DateTime.MinValue && StoreEnd != DateTime.MaxValue)
- {
- return StoreEnd.ToString("yyyy-MM-dd");
- }
- else
- {
- return "-";
- }
- }
- }
-
- private string _StoreGoodsCode="-";
- /// <summary>
- /// 物料编号
- /// </summary>
- [PropertyDisc("StoreGoodsCode")]
- public string StoreGoodsCode
- {
- get { return _StoreGoodsCode; }
- set { _StoreGoodsCode = value; }
- }
- private string _StoreGoodsName="-";
- /// <summary>
- /// 仓储物名
- /// </summary>
- [PropertyDisc("StoreGoodsName")]
- public string StoreGoodsName
- {
- get { return _StoreGoodsName; }
- set { _StoreGoodsName = value; }
- }
- /// <summary>
- /// 货值金额
- /// </summary>
- [PropertyDisc("StoreAmount")]
- public decimal StoreAmount { get; set; }
- public string StoreAmountDisplay
- {
- get
- {
- if (StoreAmount != decimal.Zero)
- {
- return StoreAmount.ToString();
- }
- else
- {
- return "-";
- }
- }
- }
- /// <summary>
- /// 是否办理保险
- /// </summary>
- [PropertyDisc("HasPolicy")]
- public int HasPolicy { get; set; }
- public string HasPolicyDisplay
- {
- get
- {
- if (HasPolicy != 0)
- {
- return "是";
- }
- else
- {
- return "否";
- }
-
- }
- }
- /// <summary>
- /// 保险期限
- /// </summary>
- [PropertyDisc("PolicyPeriod")]
- public DateTime PolicyPeriod { get; set; }
- public string PolicyPeriodDisplay
- {
- get
- {
- if (PolicyPeriod != DateTime.MinValue && PolicyPeriod != DateTime.MaxValue)
- {
- return PolicyPeriod.ToString("yyyy-MM-dd");
- }
- else
- {
- return "-";
- }
- }
- }
- private string _Insurer="-";
- /// <summary>
- /// 保险人
- /// </summary>
- [PropertyDisc("Insurer")]
- public string Insurer
- {
- get { return _Insurer; }
- set { _Insurer = value; }
- }
- private string _InsurancePolicy="-";
- /// <summary>
- /// 关联保单
- /// </summary>
- [PropertyDisc("InsurancePolicy")]
- public string InsurancePolicy
- {
- get { return _InsurancePolicy; }
- set { _InsurancePolicy = value; }
- }
- /// <summary>
- /// 仓储费
- /// </summary>
- [PropertyDisc("StoreCharge")]
- public decimal StoreCharge { get; set; }
- public string StoreChargeDisplay
- {
- get
- {
- if (StoreCharge != decimal.Zero)
- {
- return StoreCharge.ToString();
- }
- else
- {
- return "-";
- }
- }
- }
- private string _WRSAVER="-";
- /// <summary>
- /// 存货人( 显示自己的仓单)
- /// </summary>
- [PropertyDisc("accountname")]
- public string WRSAVER
- {
- get { return _WRSAVER; }
- set { _WRSAVER = value; }
- }
- private string _WareHousePerson="-";
- /// <summary>
- /// 仓管人
- /// </summary>
- [PropertyDisc("WareHousePerson")]
- public string WareHousePerson
- {
- get { return _WareHousePerson; }
- set { _WareHousePerson = value; }
- }
- private string _ContractNo;
- /// <summary>
- /// 合同号
- /// </summary>
- [PropertyDisc("ContractNo")]
- public string ContractNo
- {
- get { return _ContractNo; }
- set { _ContractNo = value; }
- }
- /// <summary>
- /// 创建时间
- /// </summary>
- [PropertyDisc("CreateTime")]
- public DateTime CreateTime { get; set; }
- /// <summary>
- /// 创建人
- /// </summary>
- [PropertyDisc("CreatorId")]
- public int CreatorId { get; set; }
- /// <summary>
- /// 存货人Id
- /// </summary>
- [PropertyDisc("WRAccountId")]
- public long WRAccountId { get; set; }
-
- /// <summary>
- /// 状态
- /// </summary>
- [PropertyDisc("Status")]
- public eWRStatus Status { get; set; }
- /// <summary>
- /// 状态-转换显示
- /// </summary>
- public string StatusDisplay
- {
- get
- {
- return Status.Discription();
- }
- }
- /// <summary>
- /// 处理状态
- /// </summary>
- [PropertyDisc("ProcStatus")]
- public string ProcStatus { get; set; }
- /// <summary>
- /// 存入单号STOREINCODE
- /// </summary>
- [PropertyDisc("STOREINCODE")]
- public string STOREINCODE { get; set; }
- /// <summary>
- /// 注册单号
- /// </summary>
- [PropertyDisc("WRREGISTERCODE")]
- public string WRREGISTERCODE { get; set; }
-
- /// <summary>
- /// 合约单位
- /// </summary>
- public string GoodsUnitIdDisplay { get; set; }
- /// <summary>
- /// 联系人
- /// </summary>
- [PropertyDisc("personname")]
- public string personname { get; set; }
- /// <summary>
- /// 联系电话
- /// </summary>
- [PropertyDisc("telphone")]
- public string telphone { get; set; }
- /// <summary>
- /// 收货地址
- /// </summary>
- [PropertyDisc("address")]
- public string address { get; set; }
- /// <summary>
- /// 證件號
- /// </summary>
- [PropertyDisc("IdCardNum")]
- public string IdCardNum { get; set; }
- #endregion
- #region 出库单表OutStoreRequest
- /// <summary>
- /// 申请时间
- /// </summary>
- [PropertyDisc("RequestTime")]
- public DateTime RequestTime { get; set; }
- /// <summary>
- /// 审核时间
- /// </summary>
- [PropertyDisc("AuditTime")]
- public DateTime AuditTime { get; set; }
- /// <summary>
- /// 审核人
- /// </summary>
- [PropertyDisc("AuditId")]
- public long AuditId { get; set; }
- /// <summary>
- /// 审核状态
- /// </summary>
- [PropertyDisc("AuditStatus")]
- public eAuditStatus AuditStatus { get; set; }
- /// <summary>
- /// 备注
- /// </summary>
- [PropertyDisc("Remark")]
- public string Remark { get; set; }
- #endregion
- #region 仓库表WareHousegion
-
- private string _WareHouseName="-";
- /// <summary>
- /// 存储仓库名称
- /// </summary>
- [PropertyDisc("WareHouseName")]
- public string WareHouseName
- {
- get { return _WareHouseName; }
- set { _WareHouseName = value; }
- }
- /// <summary>
- /// 仓库地址
- /// </summary>
- [PropertyDisc("WarehouseAddress")]
- public string WarehouseAddress { get; set; }
- /// <summary>
- /// 仓库地区
- /// </summary>
- [PropertyDisc("AreaAddress")]
- public string AreaAddress { get; set; }
- /// <summary>
- /// 仓库具体地址
- /// </summary>
- [PropertyDisc("detailAddress")]
- public string DetailAddress { get; set; }
- /// <summary>
- /// 收货方式TakeGoodsWay
- /// </summary>
- [PropertyDisc("TAKETYPE")]
- public TakeGoodsWay TakeGoodsWay { get; set; }
- #endregion
- #region 是否可提货
- /// <summary>
- /// 是否可提货-自定义字段
- /// </summary>
- private Visibility _isVisibility = Visibility.Collapsed;
- /// <summary>
- /// 是否可提货-自定义字段
- /// </summary>
- public Visibility IsVisibility
- {
- get { return _isVisibility; }
- set { _isVisibility = value; }
- }
- private bool _isSelected;
- /// <summary>
- ///是否选择仓单
- /// </summary>
- public bool IsSelected
- {
- get { return _isSelected; }
- set { Set(() => IsSelected, ref _isSelected, value); }
- }
-
- #endregion
- }
- }
|