@things-factory/product-base 8.0.94 → 8.0.99

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@things-factory/product-base",
3
- "version": "8.0.94",
3
+ "version": "8.0.99",
4
4
  "main": "dist-server/index.js",
5
5
  "browser": "client/index.js",
6
6
  "things-factory": true,
@@ -24,9 +24,9 @@
24
24
  "migration:create": "node ../../node_modules/typeorm/cli.js migration:create ./server/migrations/migration"
25
25
  },
26
26
  "dependencies": {
27
- "@things-factory/biz-base": "^8.0.94",
28
- "@things-factory/env": "^8.0.88",
29
- "@things-factory/routing-base": "^8.0.94"
27
+ "@things-factory/biz-base": "^8.0.97",
28
+ "@things-factory/env": "^8.0.97",
29
+ "@things-factory/routing-base": "^8.0.97"
30
30
  },
31
- "gitHead": "8624fb1b8c9d979f1b5edf747c5ee1d08cf79a6f"
31
+ "gitHead": "ee24bba374af0ef69f9dbc126748346211bc4eca"
32
32
  }
@@ -121,6 +121,8 @@ export class ProductQuery {
121
121
  .leftJoinAndSelect('Product.routing', 'Routing')
122
122
  .leftJoinAndSelect('Product.deliverTo', 'deliverTo')
123
123
  .leftJoinAndSelect('Product.manufacturedBy', 'manufacturedBy')
124
+ .leftJoinAndSelect('Product.stockRefProduct', 'stockRefProduct')
125
+ .leftJoinAndSelect('Product.defaultContactPoint', 'defaultContactPoint')
124
126
  .getManyAndCount()
125
127
 
126
128
  items = items.map(itm => {
@@ -238,6 +238,30 @@ export class NewProduct {
238
238
 
239
239
  @Field({ nullable: true })
240
240
  defaultPrintUomUnit?: string
241
+
242
+ // 발주버튼(2F)
243
+ @Field(type => Boolean, { nullable: true })
244
+ isPurchaseOrder?: boolean
245
+
246
+ // 발주수율(2F, %)
247
+ @Field(type => Float, { nullable: true })
248
+ purchaseYield?: number
249
+
250
+ // 발주배수(2F)
251
+ @Field(type => Float, { nullable: true })
252
+ purchaseMultiple?: number
253
+
254
+ // 실발주 하위지정(2F)
255
+ @Field(type => ObjectRef, { nullable: true })
256
+ stockRefProduct?: ObjectRef
257
+
258
+ // 기본거래처(2F)
259
+ @Field(type => ObjectRef, { nullable: true })
260
+ defaultContactPoint?: ObjectRef
261
+
262
+ // 2층구분(2F)
263
+ @Field({ nullable: true })
264
+ secondFloorType?: string
241
265
  }
242
266
 
243
267
  @ObjectType()
@@ -489,6 +513,30 @@ export class ProductPatch {
489
513
  @Field({ nullable: true })
490
514
  defaultPrintUomUnit?: string
491
515
 
516
+ // 발주버튼(2F)
517
+ @Field(type => Boolean, { nullable: true })
518
+ isPurchaseOrder?: boolean
519
+
520
+ // 발주수율(2F, %)
521
+ @Field(type => Float, { nullable: true })
522
+ purchaseYield?: number
523
+
524
+ // 발주배수(2F)
525
+ @Field(type => Float, { nullable: true })
526
+ purchaseMultiple?: number
527
+
528
+ // 실발주 하위지정(2F)
529
+ @Field(type => ObjectRef, { nullable: true })
530
+ stockRefProduct?: ObjectRef
531
+
532
+ // 기본거래처(2F)
533
+ @Field(type => ObjectRef, { nullable: true })
534
+ defaultContactPoint?: ObjectRef
535
+
536
+ // 2층구분(2F)
537
+ @Field({ nullable: true })
538
+ secondFloorType?: string
539
+
492
540
  @Field({ nullable: true })
493
541
  cuFlag?: string
494
542
  }
@@ -31,6 +31,15 @@ export enum pickStrategy {
31
31
  LOCATION = 'LOCATION'
32
32
  }
33
33
 
34
+ // 2층구분 (승화 2층 발주/작업지시 시스템)
35
+ export enum SecondFloorProductType {
36
+ NORMAL = 'NORMAL', // 기본
37
+ FINISHED_2F = 'FINISHED_2F', // 2층완제품
38
+ HALB_2F = 'HALB_2F', // 2층반제품
39
+ SAUCE_2F = 'SAUCE_2F', // 2층소스
40
+ SAUCE_DIVIDE_2F = 'SAUCE_DIVIDE_2F' // 2층소스소분
41
+ }
42
+
34
43
  @Entity()
35
44
  @Index(
36
45
  'ix_product_0',
@@ -105,6 +114,49 @@ export class Product {
105
114
  @Field({ nullable: true })
106
115
  category?: string
107
116
 
117
+ // 발주버튼(2F) - 승화 2층 구매팀 발주시스템 취합 대상 여부
118
+ @Column({ nullable: true, default: false, comment: '발주버튼(2F) - 구매팀 발주시스템에 뜨는지 여부' })
119
+ @Field({ nullable: true })
120
+ isPurchaseOrder?: boolean
121
+
122
+ // 발주수율(2F, %) - 발주대비필요량 계산의 분모 (기존 auxUnit2 수율과 별개)
123
+ // 기본값 100 = 수율 손실 없음(나눗셈에 영향 없음)
124
+ @Column('float', { nullable: true, default: 100, transformer: roundTransformer, comment: '발주수율(2F, %)' })
125
+ @Field({ nullable: true })
126
+ purchaseYield?: number
127
+
128
+ // 발주배수(2F) - 배수감안량 = 발주대비필요량 x 발주배수
129
+ // 기본값 1 = 배수 미적용(곱셈에 영향 없음)
130
+ @Column('float', { nullable: true, default: 1, transformer: roundTransformer, comment: '발주배수(2F)' })
131
+ @Field({ nullable: true })
132
+ purchaseMultiple?: number
133
+
134
+ // 실발주 하위지정(2F) - 가공품에 설정하고 하위 원자재를 지정한다(예: [세척]깐양파 → 깐양파).
135
+ // 발주 화면에서 지정된 원자재 줄의 재고량에 이 제품의 재고가 합산된다
136
+ @ManyToOne(type => Product, { nullable: true })
137
+ @Field({ nullable: true })
138
+ stockRefProduct?: Product
139
+
140
+ @RelationId((product: Product) => product.stockRefProduct)
141
+ stockRefProductId?: string
142
+
143
+ // 기본거래처(2F) - 발주 시 우선 표시되는 거래처(수정 가능)
144
+ @ManyToOne(type => ContactPoint, { nullable: true })
145
+ @Field({ nullable: true })
146
+ defaultContactPoint?: ContactPoint
147
+
148
+ @RelationId((product: Product) => product.defaultContactPoint)
149
+ defaultContactPointId?: string
150
+
151
+ // 2층구분(2F) - SecondFloorProductType(NORMAL 기본/FINISHED_2F 2층완제품/HALB_2F 2층반제품/SAUCE_2F 2층소스/SAUCE_DIVIDE_2F 2층소스소분)
152
+ @Column({
153
+ nullable: true,
154
+ default: SecondFloorProductType.NORMAL,
155
+ comment: '2층구분(NORMAL/FINISHED_2F/HALB_2F/SAUCE_2F/SAUCE_DIVIDE_2F)'
156
+ })
157
+ @Field({ nullable: true })
158
+ secondFloorType?: string
159
+
108
160
  // 경매입고
109
161
  @Column({ nullable: true, default: false })
110
162
  @Field({ nullable: true })