ic_item.cs 21 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716
  1. using Business.Core.Attributes;
  2. using Microsoft.EntityFrameworkCore;
  3. using System.ComponentModel;
  4. using System.ComponentModel.DataAnnotations;
  5. namespace Business.Domain
  6. {
  7. /// <summary>
  8. /// 物料详情
  9. /// </summary>
  10. [CollectionName("dopbase", "ic_item")]
  11. [Comment("物料详情")]
  12. [Index(nameof(number), nameof(fversion), nameof(tenant_id), nameof(company_id), nameof(factory_id), IsUnique = true)]
  13. public class ic_item : BaseEntity
  14. {
  15. public ic_item(long Id) : base(Id)
  16. {
  17. }
  18. /// <summary>
  19. /// 物料编码
  20. /// </summary>
  21. [StringLength(80)]
  22. [Comment("物料编码")]
  23. public string number { get; set; }
  24. /// <summary>
  25. /// 物料名称
  26. /// </summary>
  27. [StringLength(80)]
  28. [Comment("物料名称")]
  29. public string name { get; set; }
  30. /// <summary>
  31. /// 规格型号
  32. /// </summary>
  33. [StringLength(200)]
  34. [Comment("规格型号")]
  35. public string model { get; set; }
  36. /// <summary>
  37. /// 全名
  38. /// </summary>
  39. [StringLength(255)]
  40. [Comment("全名")]
  41. public string full_name { get; set; }
  42. /// <summary>
  43. /// fms旧料号
  44. /// </summary>
  45. [StringLength(80)]
  46. [Comment("fms旧料号")]
  47. public string fms_number { get; set; }
  48. /// <summary>
  49. /// erp旧料号
  50. /// </summary>
  51. [StringLength(80)]
  52. [Comment("erp旧料号")]
  53. public string erp_oldnumber { get; set; }
  54. /// <summary>
  55. /// 图号
  56. /// </summary>
  57. [StringLength(80)]
  58. [Comment("图号")]
  59. public string chart_number { get; set; }
  60. /// <summary>
  61. /// 版本号
  62. /// </summary>
  63. [StringLength(80)]
  64. [Comment("版本号")]
  65. public string fversion { get; set; }
  66. /// <summary>
  67. /// 盒贴规格
  68. /// </summary>
  69. [StringLength(200)]
  70. [Comment("盒贴规格")]
  71. public string box_model { get; set; }
  72. /// <summary>
  73. /// 物料属性
  74. /// </summary>
  75. [Comment("物料属性")]
  76. public int? erp_cls { get; set; }
  77. /// <summary>
  78. /// 物料属性名称
  79. /// </summary>
  80. [StringLength(80)]
  81. [Comment("物料属性")]
  82. public string erp_cls_name { get; set; }
  83. /// <summary>
  84. /// 单位
  85. /// </summary>
  86. [StringLength(80)]
  87. [Comment("单位")]
  88. public string unit { get; set; }
  89. /// <summary>
  90. /// 物料等级
  91. /// </summary>
  92. [Comment("物料等级")]
  93. public long? item_level { get; set; }
  94. /// <summary>
  95. /// 单位标准工时_小时
  96. /// </summary>
  97. [Precision(23, 10)]
  98. [Comment("单位标准工时_小时")]
  99. public decimal? standard_manhour { get; set; }
  100. /// <summary>
  101. /// 单位材料定额_元
  102. /// </summary>
  103. [Precision(23, 10)]
  104. [Comment("单位材料定额_元")]
  105. public decimal? unititem_amount { get; set; }
  106. /// <summary>
  107. /// 来源
  108. /// </summary>
  109. [StringLength(200)]
  110. [Comment("来源")]
  111. public string? source { get; set; }
  112. /// <summary>
  113. /// 是否为设备
  114. /// </summary>
  115. [Comment("是否为设备")]
  116. public int? is_equipment { get; set; }
  117. /// <summary>
  118. /// 单位包装数量
  119. /// </summary>
  120. [Precision(23, 10)]
  121. [Comment("单位包装数量")]
  122. public decimal? unit_qty { get; set; }
  123. /// <summary>
  124. /// 是否关键件
  125. /// </summary>
  126. [Comment("是否关键件")]
  127. public int? iskeyitem { get; set; }
  128. /// <summary>
  129. /// 毛重
  130. /// </summary>
  131. [Precision(23, 10)]
  132. [Comment("毛重")]
  133. public decimal? gross_weight { get; set; }
  134. /// <summary>
  135. /// 净重
  136. /// </summary>
  137. [Precision(23, 10)]
  138. [Comment("净重")]
  139. public decimal? net_weight { get; set; }
  140. /// <summary>
  141. /// 重量单位
  142. /// </summary>
  143. [StringLength(80)]
  144. [Comment("重量单位")]
  145. public string maund { get; set; }
  146. /// <summary>
  147. /// 长度
  148. /// </summary>
  149. [Precision(23, 10)]
  150. [Comment("长度")]
  151. public decimal? length { get; set; }
  152. /// <summary>
  153. /// 长度单位
  154. /// </summary>
  155. [StringLength(80)]
  156. [Comment("长度单位")]
  157. public string cubic_measure { get; set; }
  158. /// <summary>
  159. /// 宽度
  160. /// </summary>
  161. [Precision(23, 10)]
  162. [Comment("宽度")]
  163. public decimal? width { get; set; }
  164. /// <summary>
  165. /// 高度
  166. /// </summary>
  167. [Precision(23, 10)]
  168. [Comment("高度")]
  169. public decimal? height { get; set; }
  170. /// <summary>
  171. /// 体积
  172. /// </summary>
  173. [Precision(23, 10)]
  174. [Comment("体积")]
  175. public decimal? size { get; set; }
  176. /// <summary>
  177. /// 允许采购
  178. /// </summary>
  179. [Comment("允许采购")]
  180. public int? allowpur { get; set; }
  181. /// <summary>
  182. /// 允许销售
  183. /// </summary>
  184. [Comment("允许销售")]
  185. public int? allowsale { get; set; }
  186. /// <summary>
  187. /// 允许生产
  188. /// </summary>
  189. [Comment("允许生产")]
  190. public int? allowmanu { get; set; }
  191. /// <summary>
  192. /// 允许委外
  193. /// </summary>
  194. [Comment("允许委外")]
  195. public int? allowout { get; set; }
  196. /// <summary>
  197. /// 批号管理
  198. /// </summary>
  199. [Comment("批号管理")]
  200. public int? allowbatch { get; set; }
  201. /// <summary>
  202. /// 序列号管理
  203. /// </summary>
  204. [Comment("序列号管理")]
  205. public int? allowserial { get; set; }
  206. /// <summary>
  207. /// 图片
  208. /// </summary>
  209. [StringLength(80)]
  210. [Comment("图片")]
  211. public string photo { get; set; }
  212. /// <summary>
  213. /// 领料类型
  214. /// </summary>
  215. [Comment("领料类型")]
  216. public long? picktype { get; set; }
  217. /// <summary>
  218. /// 出库类型
  219. /// </summary>
  220. [Comment("出库类型")]
  221. public long? output_type_id { get; set; }
  222. /// <summary>
  223. /// 启用预警
  224. /// </summary>
  225. [Comment("启用预警")]
  226. public int? enable_warning { get; set; }
  227. /// <summary>
  228. /// 生命周期状态:1-成熟品,2-新品,3-重点新品,4-退市
  229. /// </summary>
  230. [Comment("生命周期状态")]
  231. public int? life_state { get; set; }
  232. /// <summary>
  233. /// 经济生产批量
  234. /// </summary>
  235. [Comment("经济生产批量")]
  236. [Precision(23, 10)]
  237. public decimal? moq { get; set; }
  238. /// <summary>
  239. /// 最大生产批量
  240. /// </summary>
  241. [Comment("最大生产批量")]
  242. [Precision(23, 10)]
  243. public decimal? maq { get; set; }
  244. /// <summary>
  245. /// 是否备料前预处理
  246. /// </summary>
  247. [Comment("是否备料前预处理")]
  248. public int? is_clean { get; set; }
  249. /// <summary>
  250. /// 预处理提前期(天)
  251. /// </summary>
  252. [Comment("预处理提前期")]
  253. [Precision(23, 10)]
  254. public decimal? clean_leadtime { get; set; }
  255. /// <summary>
  256. /// 工序委外提前期/灭菌提前期(天)
  257. /// </summary>
  258. [Comment("工序委外提前期")]
  259. [Precision(23, 10)]
  260. public decimal? sterilize_leadtime { get; set; }
  261. /// <summary>
  262. /// 平台调拨提前期(天)
  263. /// </summary>
  264. [Comment("平台调拨提前期")]
  265. [Precision(23, 10)]
  266. public decimal? transfer_leadtime { get; set; }
  267. /// <summary>
  268. /// 标准工期(天)
  269. /// </summary>
  270. [Comment("标准工期")]
  271. [Precision(23, 10)]
  272. public decimal? standard_period { get; set; }
  273. /// <summary>
  274. /// FMR分类:F-F类,M-M类,R-R类
  275. /// </summary>
  276. [Comment("FMR分类")]
  277. [StringLength(80)]
  278. public string fmr { get; set; }
  279. /// <summary>
  280. /// ABC分类:A-A类,B-B类,C-C类
  281. /// </summary>
  282. [Comment("ABC分类")]
  283. [StringLength(80)]
  284. public string abc { get; set; }
  285. //ic_plan
  286. ///// <summary>
  287. ///// 物料id
  288. ///// </summary>
  289. //[Required]
  290. //[Comment("物料id")]
  291. //public long icitem_id { get; set; }
  292. ///// <summary>
  293. ///// 物料名称
  294. ///// </summary>
  295. //[StringLength(80)]
  296. //[Comment("物料名称")]
  297. //public string? icitem_name { get; set; }
  298. ///// <summary>
  299. ///// 计划员
  300. ///// </summary>
  301. //[StringLength(80)]
  302. //[Comment("计划员")]
  303. //public string? planner_name { get; set; }
  304. ///// <summary>
  305. ///// 计划员_工号
  306. ///// </summary>
  307. //[StringLength(80)]
  308. //[Comment("计划员_工号")]
  309. //public string? planner_num { get; set; }
  310. ///// <summary>
  311. ///// 工厂编码
  312. ///// </summary>
  313. //[StringLength(80)]
  314. //[Comment("工厂编码")]
  315. //public string? factory_code { get; set; }
  316. /// <summary>
  317. /// 固定提前期(天)
  318. /// </summary>
  319. [Precision(23, 10)]
  320. [Comment("固定提前期(天)")]
  321. public decimal? fix_leadtime { get; set; }
  322. /// <summary>
  323. /// 计划策略
  324. /// </summary>
  325. [Comment("计划策略")]
  326. public int? plan_trategy { get; set; }
  327. /// <summary>
  328. /// 订货策略
  329. /// </summary>
  330. [Comment("订货策略")]
  331. public int? order_trategy { get; set; }
  332. /// <summary>
  333. /// 订货间隔期_天
  334. /// </summary>
  335. [Precision(23, 10)]
  336. [Comment("订货间隔期_天")]
  337. public decimal? order_inter_val { get; set; }
  338. /// <summary>
  339. /// 变动提前期
  340. /// </summary>
  341. [Precision(23, 10)]
  342. [Comment("变动提前期")]
  343. public decimal? lead_time { get; set; }
  344. /// <summary>
  345. /// 变动提前期批量
  346. /// </summary>
  347. [Precision(23, 10)]
  348. [Comment("变动提前期批量")]
  349. public decimal? bat_change_economy { get; set; }
  350. /// <summary>
  351. /// 累计提前期
  352. /// </summary>
  353. [Precision(23, 10)]
  354. [Comment("累计提前期")]
  355. public decimal? total_tqq { get; set; }
  356. /// <summary>
  357. /// 再订货点
  358. /// </summary>
  359. [Precision(23, 10)]
  360. [Comment("再订货点")]
  361. public decimal? order_point { get; set; }
  362. /// <summary>
  363. /// 设置为固定再订货点
  364. /// </summary>
  365. [Comment("设置为固定再订货点")]
  366. public int? isfixedreorder { get; set; }
  367. /// <summary>
  368. /// 安全库存数量
  369. /// </summary>
  370. [Precision(23, 10)]
  371. [Comment("安全库存数量")]
  372. public decimal? secinv { get; set; }
  373. /// <summary>
  374. /// 安全库存触发采购比例
  375. /// </summary>
  376. [Precision(23, 10)]
  377. [Comment("安全库存触发采购比例")]
  378. public decimal? secinv_ratio { get; set; }
  379. /// <summary>
  380. /// 是否需要进行订补货计划的运算
  381. /// </summary>
  382. //[Comment("是否需要进行订补货计划的运算")]
  383. //public int? book_plan { get; set; }
  384. /// <summary>
  385. /// 辅助属性参与计划运算
  386. /// </summary>
  387. //[Comment("辅助属性参与计划运算")]
  388. //public int? aux_prop_plan { get; set; }
  389. /// <summary>
  390. /// 计划备注
  391. /// </summary>
  392. //[StringLength(1000)]
  393. //[Comment("计划备注")]
  394. //public string? plannote { get; set; }
  395. /// <summary>
  396. /// 计算ID
  397. /// </summary>
  398. //[Comment("计算id")]
  399. //[NotMapped]
  400. //public long? bang_id { get; set; }
  401. /// <summary>
  402. /// 自检提前期
  403. /// </summary>
  404. [Precision(23, 10)]
  405. [Comment("自检提前期")]
  406. public decimal? self_inspection_date { get; set; }
  407. /// <summary>
  408. /// 入库提前期
  409. /// </summary>
  410. [Precision(23, 10)]
  411. [Comment("入库提前期")]
  412. public decimal? Warehousing_date { get; set; }
  413. /// <summary>
  414. /// 发运提前期
  415. /// </summary>
  416. [Precision(23, 10)]
  417. [Comment("发运提前期")]
  418. public decimal? Shipping_date { get; set; }
  419. //ic_factory_details
  420. /// <summary>
  421. /// 物料id
  422. /// </summary>
  423. //[Required]
  424. //[Comment("物料id")]
  425. //public long icitem_id { get; set; }
  426. ///// <summary>
  427. ///// 物料名称
  428. ///// </summary>
  429. //[StringLength(80)]
  430. //[Comment("物料名称")]
  431. //public string? icitem_name { get; set; }
  432. /// <summary>
  433. /// 工厂编码
  434. /// </summary>
  435. //[StringLength(80)]
  436. //[Comment("工厂编码")]
  437. //public string? factory_fode { get; set; }
  438. /// <summary>
  439. /// 特殊备注
  440. /// </summary>
  441. //[StringLength(1000)]
  442. //[Comment("特殊备注")]
  443. //public string? note { get; set; }
  444. /// <summary>
  445. /// 产品线
  446. /// </summary>
  447. [StringLength(80)]
  448. [Comment("产品线")]
  449. public string product_line { get; set; }
  450. /// <summary>
  451. /// 领料类型
  452. /// </summary>
  453. //[Required]
  454. //[Comment("领料类型")]
  455. //public long pick_type { get; set; }
  456. /// <summary>
  457. /// 是否采用业务批次管理
  458. /// </summary>
  459. [Comment("是否采用业务批次管理")]
  460. public int batch_manager { get; set; }
  461. /// <summary>
  462. /// 是否需要库龄管理
  463. /// </summary>
  464. //[Comment("是否需要库龄管理")]
  465. //public int stock_time { get; set; }
  466. /// <summary>
  467. /// 盘点周期单位
  468. /// </summary>
  469. //[StringLength(80)]
  470. //[Comment("盘点周期单位")]
  471. //public string? check_cycunit { get; set; }
  472. /// <summary>
  473. /// 盘点周期
  474. /// </summary>
  475. //[Precision(23, 10)]
  476. //[Comment("盘点周期")]
  477. //public decimal? check_cycle { get; set; }
  478. /// <summary>
  479. /// 每周_月第天
  480. /// </summary>
  481. //[Comment("每周_月第天")]
  482. //public int days_per { get; set; }
  483. /// <summary>
  484. /// 上次盘点日期
  485. /// </summary>
  486. //[Comment("上次盘点日期")]
  487. //public DateTime? last_checkdate { get; set; }
  488. ///// <summary>
  489. /// 默认待检仓库
  490. /// </summary>
  491. //[Required]
  492. //[Comment("默认待检仓库")]
  493. //public long default_chkloc { get; set; }
  494. /// <summary>
  495. /// 默认待检仓位
  496. /// </summary>
  497. //[Required]
  498. //[Comment("默认待检仓位")]
  499. //public long default_chksp { get; set; }
  500. /// <summary>
  501. /// 默认仓库
  502. /// </summary>
  503. //[Required]
  504. //[Comment("默认仓库")]
  505. //public long default_loc { get; set; }
  506. /// <summary>
  507. /// 默认仓位
  508. /// </summary>
  509. //[Required]
  510. //[Comment("默认仓位")]
  511. //public long default_sp { get; set; }
  512. /// <summary>
  513. /// 货架信息
  514. /// </summary>
  515. //[StringLength(80)]
  516. //[Comment("货架信息")]
  517. //public string? item_shelve { get; set; }
  518. /// <summary>
  519. /// 默认仓管员
  520. /// </summary>
  521. //[StringLength(80)]
  522. //[Comment("默认仓管员")]
  523. //public string? default_manager { get; set; }
  524. /// <summary>
  525. /// 最低存量
  526. /// </summary>
  527. //[Precision(23, 10)]
  528. //[Comment("最低存量")]
  529. //public decimal? low_limit { get; set; }
  530. /// <summary>
  531. /// 最高存量
  532. /// </summary>
  533. //[Precision(23, 10)]
  534. //[Comment("最高存量")]
  535. //public decimal? high_limit { get; set; }
  536. /// <summary>
  537. /// 最大订货量
  538. /// </summary>
  539. //[Precision(23, 10)]
  540. //[Comment("最大订货量")]
  541. //public decimal? qty_max { get; set; }
  542. /// <summary>
  543. /// 日消耗量
  544. /// </summary>
  545. //[Precision(23, 10)]
  546. //[Comment("日消耗量")]
  547. //public decimal? daily_consume { get; set; }
  548. /// <summary>
  549. /// 库存备注
  550. /// </summary>
  551. //[StringLength(1000)]
  552. //[Comment("库存备注")]
  553. //public string? warehouse_note { get; set; }
  554. /// <summary>
  555. /// 工单发料时间/天
  556. /// </summary>
  557. [Precision(23, 10)]
  558. [Comment("工单发料时间/天")]
  559. public decimal? ordissu_days { get; set; }
  560. ///// <summary>
  561. ///// 原材料收货处理时间/天
  562. ///// </summary>
  563. //[Precision(23, 10)]
  564. //[Comment("原材料收货处理时间/天")]
  565. //public decimal? raw_matreceiv_days { get; set; }
  566. ///// <summary>
  567. ///// 成品入库时间/天
  568. ///// </summary>
  569. //[Precision(23, 10)]
  570. //[Comment("成品入库时间/天")]
  571. //public decimal? prdenter_days { get; set; }
  572. ///// <summary>
  573. ///// 原材料入库时间/天
  574. ///// </summary>
  575. //[Precision(23, 10)]
  576. //[Comment("原材料入库时间/天")]
  577. //public decimal? mat_enter_days { get; set; }
  578. ///// <summary>
  579. ///// 成品发货时间/天
  580. ///// </summary>
  581. //[Precision(23, 10)]
  582. //[Comment("成品发货时间/天")]
  583. //public decimal? prd_out_days { get; set; }
  584. /// <summary>
  585. /// 运输中提前期_天
  586. /// </summary>
  587. [Comment("运输中提前期_天")]
  588. [Required]
  589. [DefaultValue(0)]
  590. [Precision(23, 10)]
  591. public decimal? transportation_leadtime { get; set; }
  592. /// <summary>
  593. /// 仓库中提前期_天
  594. /// </summary>
  595. [Comment("仓库中提前期_天")]
  596. [Required]
  597. [DefaultValue(0)]
  598. [Precision(23, 10)]
  599. public decimal? stock_leadtime { get; set; }
  600. /// <summary>
  601. /// 生产中提前期_天
  602. /// </summary>
  603. [Comment("生产中提前期_天")]
  604. [Required]
  605. [DefaultValue(0)]
  606. [Precision(23, 10)]
  607. public decimal? production_leadtime { get; set; }
  608. /// <summary>
  609. /// 下单前置期_天
  610. /// </summary>
  611. [Comment("下单前置期_天")]
  612. [Required]
  613. [DefaultValue(0)]
  614. [Precision(23, 10)]
  615. public decimal? order_leadtime { get; set; }
  616. /// <summary>
  617. /// 最小包装量
  618. /// </summary>
  619. [Comment("最小包装量")]
  620. [Required]
  621. [DefaultValue(0)]
  622. [Precision(23, 10)]
  623. public decimal? minpackqty { get; set; }
  624. /// <summary>
  625. /// 最小订单量
  626. /// </summary>
  627. [Comment("最小订单量")]
  628. [Required]
  629. [DefaultValue(0)]
  630. [Precision(23, 10)]
  631. public decimal? minorderqty { get; set; }
  632. /// <summary>
  633. /// 是否倒冲
  634. /// </summary>
  635. [Comment("是否倒冲")]
  636. public int? isbackflush { get; set; }
  637. /// <summary>
  638. /// 生产负责人
  639. /// </summary>
  640. //[StringLength(80)]
  641. //[Comment("生产负责人")]
  642. //public string? product_principal { get; set; }
  643. /// <summary>
  644. /// 倒冲仓库
  645. /// </summary>
  646. //[StringLength(80)]
  647. //[Comment("倒冲仓库")]
  648. //public string? back_flush_stock { get; set; }
  649. /// <summary>
  650. /// 倒冲仓位
  651. /// </summary>
  652. //[StringLength(80)]
  653. //[Comment("倒冲仓位")]
  654. //public string? back_flush_sp { get; set; }
  655. /// <summary>
  656. /// 投料自动取整
  657. /// </summary>
  658. [Comment("投料自动取整")]
  659. public int? put_integer { get; set; }
  660. /// <summary>
  661. /// RS50成品 RS30 组件 RS11 原材料 RS12 零件 RS13 包装材料 RS14 辅料 RS15 低值易耗品 RS99 虚拟物料
  662. /// </summary>
  663. [StringLength(80)]
  664. [Comment("物料类型")]
  665. public string? item_type { get; set; }
  666. /// <summary>
  667. /// 供应提前期
  668. /// </summary>
  669. [Comment("供应提前期")]
  670. [Required]
  671. [DefaultValue(0)]
  672. [Precision(23, 10)]
  673. public int PurLT { get; set; }
  674. /// <summary>
  675. /// 设计时间
  676. /// </summary>
  677. [Comment("设计时间")]
  678. [DefaultValue(0)]
  679. public decimal? DesignTime { get; set; }
  680. /// <summary>
  681. /// 标准生产时间
  682. /// </summary>
  683. [Comment("标准生产时间")]
  684. [DefaultValue(0)]
  685. public decimal? ProductionTime { get; set; }
  686. }
  687. }