PurcInquiry.java 8.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464
  1. package com.uas.ps.inquiry.model;
  2. import javax.persistence.*;
  3. import java.io.Serializable;
  4. import java.util.Date;
  5. import java.util.Set;
  6. /**
  7. * 公共库新增的询价信息表中间表
  8. *
  9. * Created by hejq on 2018-01-13.
  10. */
  11. @Entity
  12. @Table(name = "purc$puinquiry", indexes = {
  13. @Index(name = "puinquiry_enuu_code_sourceapp", columnList = "in_enuu,in_code,in_sourceapp", unique = true)
  14. })
  15. public class PurcInquiry implements Serializable {
  16. /**
  17. * default serialVersionUID
  18. */
  19. private static final long serialVersionUID = 1L;
  20. /**
  21. * id
  22. */
  23. @Id
  24. @GeneratedValue(strategy = GenerationType.IDENTITY)
  25. @Column(name = "in_id")
  26. private Long id;
  27. /**
  28. * 询价单所属企业UU
  29. */
  30. @Column(name = "in_enuu")
  31. private Long enUU;
  32. /**
  33. * 询价企业信息
  34. */
  35. @OneToOne
  36. @JoinColumn(name = "in_enuu", insertable = false, updatable = false)
  37. private Enterprise enterprise;
  38. /**
  39. * 企业名称(方便搜索过滤)
  40. */
  41. @Column(name = "in_enname")
  42. private String enName;
  43. /**
  44. * 询价单所属用户UU
  45. */
  46. @Column(name = "in_recorderuu")
  47. private Long recorderUU;
  48. /**
  49. * 流水号
  50. */
  51. @Column(name = "in_code")
  52. private String code;
  53. /**
  54. * 单据归属日期
  55. */
  56. @Column(name = "in_date")
  57. private Date date;
  58. /**
  59. * 录入人
  60. */
  61. @Column(name = "in_recorder")
  62. private String recorder;
  63. /**
  64. * 审核人
  65. */
  66. @Column(name = "in_auditor")
  67. private String auditor;
  68. /**
  69. * 报价截止日期
  70. */
  71. @Column(name = "in_enddate")
  72. private Date endDate;
  73. /**
  74. * 备注
  75. */
  76. @Column(name = "in_remark")
  77. private String remark;
  78. /**
  79. * 环保要求
  80. */
  81. @Column(name = "in_environment")
  82. private String environment;
  83. /**
  84. * 价格类型
  85. */
  86. @Column(name = "in_pricetype")
  87. private String priceType;
  88. /**
  89. * 询价明细
  90. */
  91. @OneToMany(mappedBy = "inquiry", cascade = { CascadeType.REFRESH }, fetch = FetchType.EAGER)
  92. @OrderBy("number")
  93. private Set<PurcInquiryItem> inquiryItems;
  94. /**
  95. * 附件
  96. */
  97. @OneToMany(fetch = FetchType.EAGER, cascade = { CascadeType.ALL })
  98. @JoinTable(name = "purc$puinquiryattach", joinColumns = @JoinColumn(name = "in_id", referencedColumnName = "in_id") , inverseJoinColumns = @JoinColumn(name = "at_id", referencedColumnName = "at_id") )
  99. private Set<Attach> attachs;
  100. /**
  101. * 采纳结果
  102. */
  103. @Column(name = "in_checked")
  104. private Short check;
  105. /**
  106. * 单据状态(已提交、在录入)
  107. */
  108. @Column(name = "in_enterystatus")
  109. private Integer enteryStatus;
  110. /**
  111. * 是否过期
  112. */
  113. @Column(name = "in_overdue", insertable = false, updatable = false)
  114. private Short overdue;
  115. /**
  116. * 是否公开
  117. */
  118. @Column(name = "in_isopen")
  119. private Short isOpen;
  120. /**
  121. * 收货地址
  122. */
  123. @Column(name = "in_ship")
  124. private String ship;
  125. /**
  126. * 是否开票<br>
  127. * 1. 是<br>
  128. * 0. 否
  129. */
  130. @Column(name = "in_invoice")
  131. private Short invoice;
  132. /**
  133. * 是否含税
  134. */
  135. @Column(name = "in_iftax")
  136. private Short ifTax;
  137. /**
  138. * 币别
  139. */
  140. @Column(name = "in_currency")
  141. private String currency;
  142. /**
  143. * 询价类型
  144. */
  145. @Column(name = "in_inquirytype")
  146. private String inquirytype;
  147. /**
  148. * 应用来源
  149. */
  150. @Column(name = "in_sourceapp")
  151. private String sourceapp;
  152. /**
  153. * 如果从erp传过来的,记录id
  154. */
  155. @Column(name = "in_erpid")
  156. private Long erpid;
  157. /**
  158. * erp传过来的记录时间
  159. */
  160. @Column(name = "in_erpdate")
  161. private Date erpdate;
  162. /**
  163. * 明细总数
  164. */
  165. @Column(name = "in_amount")
  166. private Integer amount;
  167. /**
  168. * 是否是标准 1、 是 0 否
  169. */
  170. @Column(name = "in_standard")
  171. private Integer standard;
  172. /**
  173. * 已报价明细数
  174. */
  175. @Transient
  176. private Integer quotedAmount;
  177. /**
  178. * 替代料报价数
  179. */
  180. @Transient
  181. private Integer replaceQuotedAmount;
  182. public Enterprise getEnterprise() {
  183. return enterprise;
  184. }
  185. public void setEnterprise(Enterprise enterprise) {
  186. this.enterprise = enterprise;
  187. }
  188. public Long getId() {
  189. return id;
  190. }
  191. public void setId(Long id) {
  192. this.id = id;
  193. }
  194. public Long getEnUU() {
  195. return enUU;
  196. }
  197. public void setEnUU(Long enUU) {
  198. this.enUU = enUU;
  199. }
  200. public String getEnName() {
  201. return enName;
  202. }
  203. public void setEnName(String enName) {
  204. this.enName = enName;
  205. }
  206. public Long getRecorderUU() {
  207. return recorderUU;
  208. }
  209. public void setRecorderUU(Long recorderUU) {
  210. this.recorderUU = recorderUU;
  211. }
  212. public String getCode() {
  213. return code;
  214. }
  215. public void setCode(String code) {
  216. this.code = code;
  217. }
  218. public Date getDate() {
  219. return date;
  220. }
  221. public void setDate(Date date) {
  222. this.date = date;
  223. }
  224. public String getRecorder() {
  225. return recorder;
  226. }
  227. public void setRecorder(String recorder) {
  228. this.recorder = recorder;
  229. }
  230. public String getAuditor() {
  231. return auditor;
  232. }
  233. public void setAuditor(String auditor) {
  234. this.auditor = auditor;
  235. }
  236. public Date getEndDate() {
  237. return endDate;
  238. }
  239. public void setEndDate(Date endDate) {
  240. this.endDate = endDate;
  241. }
  242. public String getRemark() {
  243. return remark;
  244. }
  245. public void setRemark(String remark) {
  246. this.remark = remark;
  247. }
  248. public String getEnvironment() {
  249. return environment;
  250. }
  251. public void setEnvironment(String environment) {
  252. this.environment = environment;
  253. }
  254. public String getPriceType() {
  255. return priceType;
  256. }
  257. public void setPriceType(String priceType) {
  258. this.priceType = priceType;
  259. }
  260. public Set<PurcInquiryItem> getInquiryItems() {
  261. return inquiryItems;
  262. }
  263. public void setInquiryItems(Set<PurcInquiryItem> inquiryItems) {
  264. this.inquiryItems = inquiryItems;
  265. }
  266. public Set<Attach> getAttachs() {
  267. return attachs;
  268. }
  269. public void setAttachs(Set<Attach> attachs) {
  270. this.attachs = attachs;
  271. }
  272. public Short getCheck() {
  273. return check;
  274. }
  275. public void setCheck(Short check) {
  276. this.check = check;
  277. }
  278. public Integer getEnteryStatus() {
  279. return enteryStatus;
  280. }
  281. public void setEnteryStatus(Integer enteryStatus) {
  282. this.enteryStatus = enteryStatus;
  283. }
  284. public Short getOverdue() {
  285. return overdue;
  286. }
  287. public void setOverdue(Short overdue) {
  288. this.overdue = overdue;
  289. }
  290. public Short getIsOpen() {
  291. return isOpen;
  292. }
  293. public void setIsOpen(Short isOpen) {
  294. this.isOpen = isOpen;
  295. }
  296. public String getShip() {
  297. return ship;
  298. }
  299. public void setShip(String ship) {
  300. this.ship = ship;
  301. }
  302. public Short getInvoice() {
  303. return invoice;
  304. }
  305. public void setInvoice(Short invoice) {
  306. this.invoice = invoice;
  307. }
  308. public Short getIfTax() {
  309. return ifTax;
  310. }
  311. public void setIfTax(Short ifTax) {
  312. this.ifTax = ifTax;
  313. }
  314. public String getCurrency() {
  315. return currency;
  316. }
  317. public void setCurrency(String currency) {
  318. this.currency = currency;
  319. }
  320. public String getInquirytype() {
  321. return inquirytype;
  322. }
  323. public void setInquirytype(String inquirytype) {
  324. this.inquirytype = inquirytype;
  325. }
  326. public String getSourceapp() {
  327. return sourceapp;
  328. }
  329. public void setSourceapp(String sourceapp) {
  330. this.sourceapp = sourceapp;
  331. }
  332. public Long getErpid() {
  333. return erpid;
  334. }
  335. public void setErpid(Long erpid) {
  336. this.erpid = erpid;
  337. }
  338. public Date getErpdate() {
  339. return erpdate;
  340. }
  341. public void setErpdate(Date erpdate) {
  342. this.erpdate = erpdate;
  343. }
  344. public Integer getAmount() {
  345. return amount;
  346. }
  347. public void setAmount(Integer amount) {
  348. this.amount = amount;
  349. }
  350. public Integer getStandard() {
  351. return standard;
  352. }
  353. public void setStandard(Integer standard) {
  354. this.standard = standard == null ? 0 : standard;
  355. }
  356. public Integer getQuotedAmount() {
  357. return quotedAmount;
  358. }
  359. public void setQuotedAmount(Integer quotedAmount) {
  360. this.quotedAmount = quotedAmount;
  361. }
  362. public Integer getReplaceQuotedAmount() {
  363. return replaceQuotedAmount;
  364. }
  365. public void setReplaceQuotedAmount(Integer replaceQuotedAmount) {
  366. this.replaceQuotedAmount = replaceQuotedAmount;
  367. }
  368. }