TakaDeliveryGoodsQueryModel.cs 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414
  1. using Muchinfo.MTPClient.Data.Enums;
  2. using Muchinfo.MTPClient.Data.Helper;
  3. using System;
  4. using System.Collections.Generic;
  5. using System.Linq;
  6. using System.Text;
  7. namespace Muchinfo.MTPClient.Data.Model.Delivery
  8. {
  9. /// <summary>
  10. /// 交割提货查询
  11. /// </summary>
  12. public class TakaDeliveryGoodsQueryModel
  13. {
  14. #region SQL字段
  15. //<select id="SearchTakaDeliveryGoodsQuery" parameterType="java.util.Map"
  16. // resultType="HashMap">
  17. // SELECT
  18. // os.StoreOutId,
  19. // os.StoreOutCode,
  20. // os.WareHouseId,
  21. // os.remark,
  22. //os.RECEIVEPERSON,
  23. // os.RECEIVEADDRESS,
  24. // os.PHONENUM,
  25. // os.RequestTime,
  26. // os.AuditStatus,
  27. // os.AccountId,
  28. // hos.wrid,--仓单ID
  29. // nod.WRCodeGroup,
  30. // nod.BrandGroup,
  31. // nod.RankGroup,
  32. // nod.SpecGroup,
  33. // nod.WarehouseNameGroup,
  34. // nod.DeliveryGoodsNameGroup,
  35. // nod.StoreOutQtyGroup
  36. // from OutStoreRequest os
  37. // left join StoreOutRequestDetial srd on srd.storeoutid =os.storeoutid
  38. // left join WarehouseReciept hos on hos.wrid=srd.wrid
  39. // left join (select od.storeoutid,
  40. // listagg(to_char(od.wrcode),',') within group (order by od.wrcode) WRCodeGroup,
  41. // listagg(to_char(od.brand),',') within group (order by od.brand) BrandGroup,
  42. // listagg(to_char(od.rank),',') within group (order by od.rank) RankGroup,
  43. // listagg(to_char(od.Spec),',') within group (order by od.Spec) SpecGroup,
  44. // listagg(to_char(od.warehousename),',') within group (order by od.warehousename) WarehouseNameGroup,
  45. // listagg(to_char(od.deliverygoodsname),',') within group (order by od.deliverygoodsname) DeliveryGoodsNameGroup,
  46. // listagg(to_char(od.StoreOutQty),',') within group (order by od.StoreOutQty) StoreOutQtyGroup
  47. // from (select sor.storeoutqty,gs.deliverygoodsname,wh.warehousename,wr.Spec,wr.brand,wr.rank,wr.wrid,wr.wrcode,sor.storeoutid
  48. // from StoreOutRequestDetial sor
  49. // left join WarehouseReciept wr on wr.wrid=sor.wrid
  50. // left join WareHouse wh on wh.warehouseid=wr.warehouseid
  51. // left join DeliveryGoods gs on gs.DeliveryGoodsId=wr.DeliveryGoodsId) od
  52. // group by od.storeoutid) nod on nod.StoreOutId=os.StoreOutId
  53. // <where>
  54. // os.AccountId =#{accountId}
  55. // <if test="startDate != null">
  56. // AND os.RequestTime &gt;=to_date(#{startDate},'yyyy-MM-dd hh24:mi:ss')
  57. // </if>
  58. // <if test="endDate != null">
  59. // AND os.RequestTime &lt;=to_date(#{endDate},'yyyy-MM-dd hh24:mi:ss')
  60. // </if>
  61. // </where>
  62. // order by os.RequestTime desc
  63. //</select>
  64. #endregion
  65. #region 仓单变更流水表WRChangeFlow
  66. /// <summary>
  67. /// 提货流水
  68. /// </summary>
  69. [PropertyDisc("autoidFlowNum")]
  70. public string autoidFlowNum { get; set; }
  71. #endregion
  72. #region 出库单表OutStoreRequest
  73. /// <summary>
  74. /// 出库ID
  75. /// </summary>
  76. [PropertyDisc("StoreOutId")]
  77. public long StoreOutId { get; set; }
  78. /// <summary>
  79. /// 出库单号
  80. /// </summary>
  81. [PropertyDisc("StoreOutCode")]
  82. public long StoreOutCode { get; set; }
  83. /// <summary>
  84. /// 出库仓库ID
  85. /// </summary>
  86. [PropertyDisc("WareHouseId")]
  87. public long WareHouseId { get; set; }
  88. /// <summary>
  89. /// 备注
  90. /// </summary>
  91. [PropertyDisc("Remark")]
  92. public string Remark { get; set; }
  93. /// <summary>
  94. /// 收货人
  95. /// </summary>
  96. [PropertyDisc("RECEIVEPERSON")]
  97. public string RecievePerson { get; set; }
  98. /// <summary>
  99. /// 收货地址
  100. /// </summary>
  101. [PropertyDisc("RECEIVEADDRESS")]
  102. public string RecieveAddress { get; set; }
  103. /// <summary>
  104. /// 联系电话
  105. /// </summary>
  106. [PropertyDisc("PHONENUM")]
  107. public string PhoneNum { get; set; }
  108. /// <summary>
  109. /// 申请时间
  110. /// </summary>
  111. [PropertyDisc("RequestTime")]
  112. public DateTime RequestTime { get; set; }
  113. /// <summary>
  114. /// 审核状态
  115. /// </summary>
  116. [PropertyDisc("AuditStatus")]
  117. public eAuditStatus AuditStatus { get; set; }
  118. /// <summary>
  119. /// 申请账户
  120. /// </summary>
  121. [PropertyDisc("AccountId")]
  122. public long AccountId { get; set; }
  123. #endregion
  124. #region 出库单明细表StoreOutRequestDetial
  125. /// <summary>
  126. /// 出库数量组
  127. /// </summary>
  128. [PropertyDisc("StoreOutQtyGroup")]
  129. public string StoreOutQtyGroup { get; set; }
  130. #endregion
  131. #region 仓库表WareHouse
  132. /// <summary>
  133. /// 仓库名称组
  134. /// </summary>
  135. [PropertyDisc("WarehouseNameGroup")]
  136. public string WarehouseNameGroup { get; set; }
  137. /// <summary>
  138. /// 仓库地址
  139. /// </summary>
  140. [PropertyDisc("WareHouseAddress")]
  141. public string WareHouseAddress { get; set; }
  142. /// <summary>
  143. /// 仓库地区
  144. /// </summary>
  145. [PropertyDisc("AreaAddress")]
  146. public string AreaAddress { get; set; }
  147. /// <summary>
  148. /// 仓库具体地址
  149. /// </summary>
  150. [PropertyDisc("detailAddress")]
  151. public string DetailAddress { get; set; }
  152. #endregion
  153. #region 仓单表WarehouseReciept
  154. /// <summary>
  155. /// 仓单ID
  156. /// </summary>
  157. [PropertyDisc("WRID")]
  158. public long WRID { get; set; }
  159. /// <summary>
  160. /// 仓单号组
  161. /// </summary>
  162. [PropertyDisc("WRCodeGroup")]
  163. public string WRCodeGroup { get; set; }
  164. /// <summary>
  165. /// 品牌组
  166. /// </summary>
  167. [PropertyDisc("BrandGroup")]
  168. public string BrandGroup { get; set; }
  169. /// <summary>
  170. /// 等级组
  171. /// </summary>
  172. [PropertyDisc("RankGroup")]
  173. public string RankGroup { get; set; }
  174. /// <summary>
  175. /// 规格组
  176. /// </summary>
  177. [PropertyDisc("SpecGroup")]
  178. public string SpecGroup { get; set; }
  179. /// <summary>
  180. /// 单位
  181. /// </summary>
  182. //[PropertyDisc("GoodsUnitId")]
  183. //public long GoodsUnitId { get; set; }
  184. #endregion
  185. #region 交割商品DeliveryGoods
  186. /// <summary>
  187. /// 交割商品名称组
  188. /// </summary>
  189. [PropertyDisc("DeliveryGoodsNameGroup")]
  190. public string DeliveryGoodsNameGroup { get; set; }
  191. /// <summary>
  192. /// 交割商品代碼
  193. /// </summary>
  194. [PropertyDisc("DeliveryGoodscode")]
  195. public string DeliveryGoodsCode { get; set; }
  196. public string DisplayGoodsCodeName
  197. {
  198. get
  199. {
  200. return string.Format("{0}/{1}", DeliveryGoodsCode, DeliveryGoodsNameGroup);
  201. }
  202. }
  203. #endregion
  204. //审核状态-转换显示
  205. public string AuditStatusDisplay
  206. {
  207. get
  208. {
  209. return AuditStatus.Discription();
  210. }
  211. }
  212. /// <summary>
  213. /// 身份证号
  214. /// </summary>
  215. [PropertyDisc("cardnum")]
  216. public string IdCardNum { get; set; }
  217. /// <summary>
  218. ///
  219. /// </summary>
  220. [PropertyDisc("taketype")]
  221. public TakeGoodsWay TakeGoodsWay { get; set; }
  222. public string TakeGoodsWayDisplay
  223. {
  224. get
  225. {
  226. if (TakeGoodsWay == 0)
  227. {
  228. return "--";
  229. }
  230. return TakeGoodsWay.Discription();
  231. }
  232. }
  233. /// <summary>
  234. /// 是否显示地址
  235. /// </summary>
  236. public bool IsShowAddress
  237. {
  238. get
  239. {
  240. return TakeGoodsWay == TakeGoodsWay.Express;
  241. }
  242. }
  243. /// <summary>
  244. /// 仓库名称组-转换显示
  245. /// </summary>
  246. public string WarehouseNameGroupDisplay
  247. {
  248. get
  249. {
  250. if (WarehouseNameGroup != null && WarehouseNameGroup != "")
  251. {
  252. string[] tempWarehouseName = WarehouseNameGroup.Split(',');
  253. if (tempWarehouseName.Length > 0)
  254. {
  255. return tempWarehouseName[0];
  256. }
  257. else
  258. {
  259. return WarehouseNameGroup;
  260. }
  261. }
  262. else
  263. {
  264. return "-";
  265. }
  266. }
  267. }
  268. /// <summary>
  269. /// 仓单号组-转换显示
  270. /// </summary>
  271. public string WRCodeGroupDisplay
  272. {
  273. get
  274. {
  275. if (WRCodeGroup != null && WRCodeGroup != "")
  276. {
  277. return WRCodeGroup;
  278. }
  279. else
  280. {
  281. return "-";
  282. }
  283. }
  284. }
  285. /// <summary>
  286. /// 品牌组-转换显示
  287. /// </summary>
  288. public string BrandGroupDisplay
  289. {
  290. get
  291. {
  292. if (BrandGroup != null && BrandGroup != "")
  293. {
  294. return BrandGroup;
  295. }
  296. else
  297. {
  298. return "-";
  299. }
  300. }
  301. }
  302. /// <summary>
  303. /// 等级组-转换显示
  304. /// </summary>
  305. public string RankGroupDisplay
  306. {
  307. get
  308. {
  309. if (RankGroup != null && RankGroup != "")
  310. {
  311. return RankGroup;
  312. }
  313. else
  314. {
  315. return "-";
  316. }
  317. }
  318. }
  319. /// <summary>
  320. /// 规格组-转换显示
  321. /// </summary>
  322. public string SpecGroupDisplay
  323. {
  324. get
  325. {
  326. if (SpecGroup != null && SpecGroup != "")
  327. {
  328. return SpecGroup;
  329. }
  330. else
  331. {
  332. return "-";
  333. }
  334. }
  335. }
  336. /// <summary>
  337. /// 交割商品名称组-转换显示
  338. /// </summary>
  339. public string DeliveryGoodsNameGroupDisplay
  340. {
  341. get
  342. {
  343. if (DeliveryGoodsNameGroup != null && DeliveryGoodsNameGroup != "")
  344. {
  345. return DisplayGoodsCodeName;
  346. }
  347. else
  348. {
  349. return "-";
  350. }
  351. }
  352. }
  353. /// <summary>
  354. /// 出库数量组-转换显示
  355. /// </summary>
  356. public string StoreOutQtyGroupDisplay
  357. {
  358. get
  359. {
  360. if (StoreOutQtyGroup != null && StoreOutQtyGroup != "")
  361. {
  362. return StoreOutQtyGroup;
  363. }
  364. else
  365. {
  366. return "-";
  367. }
  368. }
  369. }
  370. }
  371. }