PurcInquiryInfo.java 7.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384
  1. package com.uas.ps.inquiry.model;
  2. import com.alibaba.fastjson.annotation.JSONField;
  3. import com.fasterxml.jackson.annotation.JsonIgnore;
  4. import javax.persistence.*;
  5. import java.io.Serializable;
  6. import java.util.Date;
  7. import java.util.Set;
  8. /**
  9. * 公共库新增的询价信息表中间表(查询信息)
  10. *
  11. * @author hejq
  12. * @date 2018-01-17 15:46
  13. */
  14. @Entity
  15. @Table(name = "purc$puinquiry")
  16. public class PurcInquiryInfo implements Serializable {
  17. /**
  18. * default serialVersionUID
  19. */
  20. private static final long serialVersionUID = 1L;
  21. /**
  22. * id
  23. */
  24. @Id
  25. @GeneratedValue(strategy = GenerationType.IDENTITY)
  26. @Column(name = "in_id")
  27. private Long id;
  28. /**
  29. * 询价单所属企业UU
  30. */
  31. @Column(name = "in_enuu")
  32. private Long enUU;
  33. /**
  34. * 企业名称(方便搜索过滤)
  35. */
  36. @Column(name = "in_enname")
  37. private String enName;
  38. /**
  39. * 询价企业
  40. */
  41. @OneToOne(cascade = { CascadeType.MERGE, CascadeType.REFRESH })
  42. @JoinColumn(name = "in_enuu", insertable = false, updatable = false)
  43. private Enterprise enterprise;
  44. /**
  45. * 询价单所属用户UU
  46. */
  47. @Column(name = "in_recorderuu")
  48. private Long recorderUU;
  49. /**
  50. * 流水号
  51. */
  52. @Column(name = "in_code")
  53. private String code;
  54. /**
  55. * 单据归属日期
  56. */
  57. @Column(name = "in_date")
  58. private Date date;
  59. /**
  60. * 录入人
  61. */
  62. @Column(name = "in_recorder")
  63. private String recorder;
  64. /**
  65. * 报价截止日期
  66. */
  67. @Column(name = "in_enddate")
  68. private Date endDate;
  69. /**
  70. * 备注
  71. */
  72. @Column(name = "in_remark")
  73. private String remark;
  74. /**
  75. * 环保要求
  76. */
  77. @Column(name = "in_environment")
  78. private String environment;
  79. /**
  80. * 询价明细
  81. */
  82. @OneToMany(mappedBy = "inquiry", cascade = { CascadeType.REFRESH }, fetch = FetchType.EAGER)
  83. @OrderBy("number")
  84. private Set<PurcInquiryItemInfo> inquiryItems;
  85. /**
  86. * 附件
  87. */
  88. @OneToMany(fetch = FetchType.EAGER, cascade = { CascadeType.ALL })
  89. @JoinTable(name = "purc$puinquiryattach", joinColumns = @JoinColumn(name = "in_id", referencedColumnName = "in_id") , inverseJoinColumns = @JoinColumn(name = "at_id", referencedColumnName = "at_id") )
  90. private Set<Attach> attachs;
  91. /**
  92. * 单据状态(已提交、在录入)
  93. */
  94. @Column(name = "in_enterystatus")
  95. private Integer enteryStatus;
  96. /**
  97. * 收货地址
  98. */
  99. @Column(name = "in_ship")
  100. private String ship;
  101. /**
  102. * 是否开票<br>
  103. * 1. 是<br>
  104. * 0. 否
  105. */
  106. @Column(name = "in_invoice")
  107. private Short invoice;
  108. /**
  109. * 是否含税
  110. */
  111. @Column(name = "in_iftax")
  112. private Short ifTax;
  113. /**
  114. * 币别
  115. */
  116. @Column(name = "in_currency")
  117. private String currency;
  118. /**
  119. * 询价类型
  120. */
  121. @Column(name = "in_inquirytype")
  122. private String inquirytype;
  123. /**
  124. * 应用来源
  125. */
  126. @Column(name = "in_sourceapp")
  127. private String sourceapp;
  128. /**
  129. * 如果从erp传过来的,记录id
  130. */
  131. @Column(name = "in_erpid")
  132. private Long erpid;
  133. /**
  134. * erp传过来的记录时间
  135. */
  136. @Column(name = "in_erpdate")
  137. private Date erpdate;
  138. /**
  139. * 明细总数
  140. */
  141. @Column(name = "in_amount")
  142. private Integer amount;
  143. /**
  144. * bom单规格(仅bom单求购有)
  145. */
  146. @Column(name = "in_spec", columnDefinition = "TEXT", length = 500)
  147. private String spec;
  148. /**
  149. * 采购套数(bom询价使用,普通询价默认1)
  150. */
  151. @Column(name = "in_count")
  152. private Integer count = 1;
  153. public Long getId() {
  154. return id;
  155. }
  156. public void setId(Long id) {
  157. this.id = id;
  158. }
  159. public Long getEnUU() {
  160. return enUU;
  161. }
  162. public void setEnUU(Long enUU) {
  163. this.enUU = enUU;
  164. }
  165. public String getEnName() {
  166. return enName;
  167. }
  168. public void setEnName(String enName) {
  169. this.enName = enName;
  170. }
  171. public Enterprise getEnterprise() {
  172. return enterprise;
  173. }
  174. public void setEnterprise(Enterprise enterprise) {
  175. this.enterprise = enterprise;
  176. }
  177. public Long getRecorderUU() {
  178. return recorderUU;
  179. }
  180. public void setRecorderUU(Long recorderUU) {
  181. this.recorderUU = recorderUU;
  182. }
  183. public String getCode() {
  184. return code;
  185. }
  186. public void setCode(String code) {
  187. this.code = code;
  188. }
  189. public Date getDate() {
  190. return date;
  191. }
  192. public void setDate(Date date) {
  193. this.date = date;
  194. }
  195. public String getRecorder() {
  196. return recorder;
  197. }
  198. public void setRecorder(String recorder) {
  199. this.recorder = recorder;
  200. }
  201. public Date getEndDate() {
  202. return endDate;
  203. }
  204. public void setEndDate(Date endDate) {
  205. this.endDate = endDate;
  206. }
  207. public String getRemark() {
  208. return remark;
  209. }
  210. public void setRemark(String remark) {
  211. this.remark = remark;
  212. }
  213. public String getEnvironment() {
  214. return environment;
  215. }
  216. public void setEnvironment(String environment) {
  217. this.environment = environment;
  218. }
  219. @JsonIgnore
  220. @JSONField(serialize = false)
  221. public Set<PurcInquiryItemInfo> getInquiryItems() {
  222. return inquiryItems;
  223. }
  224. public void setInquiryItems(Set<PurcInquiryItemInfo> inquiryItems) {
  225. this.inquiryItems = inquiryItems;
  226. }
  227. public Set<Attach> getAttachs() {
  228. return attachs;
  229. }
  230. public void setAttachs(Set<Attach> attachs) {
  231. this.attachs = attachs;
  232. }
  233. public Integer getEnteryStatus() {
  234. return enteryStatus;
  235. }
  236. public void setEnteryStatus(Integer enteryStatus) {
  237. this.enteryStatus = enteryStatus;
  238. }
  239. public String getShip() {
  240. return ship;
  241. }
  242. public void setShip(String ship) {
  243. this.ship = ship;
  244. }
  245. public Short getInvoice() {
  246. return invoice;
  247. }
  248. public void setInvoice(Short invoice) {
  249. this.invoice = invoice;
  250. }
  251. public Short getIfTax() {
  252. return ifTax;
  253. }
  254. public void setIfTax(Short ifTax) {
  255. this.ifTax = ifTax;
  256. }
  257. public String getCurrency() {
  258. return currency;
  259. }
  260. public void setCurrency(String currency) {
  261. this.currency = currency;
  262. }
  263. public String getInquirytype() {
  264. return inquirytype;
  265. }
  266. public void setInquirytype(String inquirytype) {
  267. this.inquirytype = inquirytype;
  268. }
  269. public String getSourceapp() {
  270. return sourceapp;
  271. }
  272. public void setSourceapp(String sourceapp) {
  273. this.sourceapp = sourceapp;
  274. }
  275. public Long getErpid() {
  276. return erpid;
  277. }
  278. public void setErpid(Long erpid) {
  279. this.erpid = erpid;
  280. }
  281. public Date getErpdate() {
  282. return erpdate;
  283. }
  284. public void setErpdate(Date erpdate) {
  285. this.erpdate = erpdate;
  286. }
  287. public Integer getAmount() {
  288. return amount;
  289. }
  290. public void setAmount(Integer amount) {
  291. this.amount = amount;
  292. }
  293. public String getSpec() {
  294. return spec;
  295. }
  296. public void setSpec(String spec) {
  297. this.spec = spec;
  298. }
  299. public Integer getCount() {
  300. return count;
  301. }
  302. public void setCount(Integer count) {
  303. this.count = count;
  304. }
  305. }