@hitsoft/uretim-yonetimi 1.0.15 → 1.0.17

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.
Files changed (137) hide show
  1. package/.eslintrc.json +44 -0
  2. package/config/ng-package.json +7 -0
  3. package/config/src/enums/route-names.ts +3 -0
  4. package/config/src/providers/create-barcode-route.provider.ts +21 -0
  5. package/config/src/providers/issues-for-production-route.provider.ts +21 -0
  6. package/config/src/providers/production-order-route.provider.ts +21 -0
  7. package/config/src/providers/receipt-from-production-route.provider.ts +21 -0
  8. package/config/src/providers/route.provider.ts +26 -0
  9. package/config/src/uretim-yonetimi-config.module.ts +22 -0
  10. package/karma.conf.js +44 -0
  11. package/ng-package.json +7 -0
  12. package/package.json +14 -42
  13. package/src/lib/components/hit-create-barcodes/hit-create-barcodes-component.css +10 -0
  14. package/src/lib/components/hit-create-barcodes/hit-create-barcodes-routing.module.ts +19 -0
  15. package/src/lib/components/hit-create-barcodes/hit-create-barcodes.component.html +80 -0
  16. package/src/lib/components/hit-create-barcodes/hit-create-barcodes.component.ts +219 -0
  17. package/src/lib/components/hit-create-barcodes/hit-create-barcodes.module.ts +39 -0
  18. package/src/lib/components/hit-issues-for-productions/hit-issues-for-productions-routing.module.ts +19 -0
  19. package/src/lib/components/hit-issues-for-productions/hit-issues-for-productions.componenet.css +7 -0
  20. package/src/lib/components/hit-issues-for-productions/hit-issues-for-productions.component.html +100 -0
  21. package/src/lib/components/hit-issues-for-productions/hit-issues-for-productions.component.ts +276 -0
  22. package/src/lib/components/hit-issues-for-productions/hit-issues-for-productions.module.ts +46 -0
  23. package/src/lib/components/hit-production-orders/hit-production-orders-routing.module.ts +19 -0
  24. package/src/lib/components/hit-production-orders/hit-production-orders.component.html +79 -0
  25. package/src/lib/components/hit-production-orders/hit-production-orders.component.ts +213 -0
  26. package/src/lib/components/hit-production-orders/hit-production-orders.module.ts +39 -0
  27. package/src/lib/components/hit-receipt-from-productions/hit-receipt-from-production-component.css +10 -0
  28. package/src/lib/components/hit-receipt-from-productions/hit-receipt-from-production-routing.module.ts +19 -0
  29. package/src/lib/components/hit-receipt-from-productions/hit-receipt-from-productions.component.html +106 -0
  30. package/src/lib/components/hit-receipt-from-productions/hit-receipt-from-productions.component.ts +259 -0
  31. package/src/lib/components/hit-receipt-from-productions/hit-receipt-from-productions.module.ts +38 -0
  32. package/src/lib/components/uretim-yonetimi.component.ts +9 -0
  33. package/src/lib/hit-proxy/devexpress-query-builder/devexpress-load-options.model.ts +20 -0
  34. package/src/lib/hit-proxy/devexpress-query-builder/devexpress-query-builder.ts +51 -0
  35. package/src/lib/hit-proxy/hit-create-barcodes/hit-create-barcodes.service.ts +41 -0
  36. package/src/lib/hit-proxy/hit-create-barcodes/models.ts +6 -0
  37. package/src/lib/hit-proxy/hit-issues-for-productions/hit-issues-for-productions.service.ts +39 -0
  38. package/src/lib/hit-proxy/hit-issues-for-productions/models.ts +42 -0
  39. package/src/lib/hit-proxy/hit-production-orders/hit-production-orders.service.ts +60 -0
  40. package/src/lib/hit-proxy/hit-production-orders/models.ts +137 -0
  41. package/src/lib/hit-proxy/hit-receipt-from-productions/hit-receipt-from-productions.service.ts +32 -0
  42. package/src/lib/hit-proxy/hit-receipt-from-productions/models.ts +44 -0
  43. package/src/lib/hit-proxy/models.ts +116 -0
  44. package/src/lib/uretim-yonetimi-routing.module.ts +30 -0
  45. package/src/lib/uretim-yonetimi.component.spec.ts +24 -0
  46. package/src/lib/uretim-yonetimi.module.ts +52 -0
  47. package/src/lib/uretim-yonetimi.service.spec.ts +15 -0
  48. package/{public-api.d.ts → src/public-api.ts} +4 -0
  49. package/src/test.ts +29 -0
  50. package/tsconfig.lib.json +20 -0
  51. package/tsconfig.lib.prod.json +10 -0
  52. package/tsconfig.spec.json +17 -0
  53. package/config/enums/route-names.d.ts +0 -3
  54. package/config/index.d.ts +0 -5
  55. package/config/providers/create-barcode-route.provider.d.ts +0 -9
  56. package/config/providers/issues-for-production-route.provider.d.ts +0 -9
  57. package/config/providers/production-order-route.provider.d.ts +0 -9
  58. package/config/providers/receipt-from-production-route.provider.d.ts +0 -9
  59. package/config/providers/route.provider.d.ts +0 -8
  60. package/config/uretim-yonetimi-config.module.d.ts +0 -8
  61. package/esm2020/config/enums/index.mjs +0 -2
  62. package/esm2020/config/enums/route-names.mjs +0 -2
  63. package/esm2020/config/hitsoft-uretim-yonetimi-config.mjs +0 -5
  64. package/esm2020/config/providers/create-barcode-route.provider.mjs +0 -19
  65. package/esm2020/config/providers/index.mjs +0 -2
  66. package/esm2020/config/providers/issues-for-production-route.provider.mjs +0 -19
  67. package/esm2020/config/providers/production-order-route.provider.mjs +0 -19
  68. package/esm2020/config/providers/receipt-from-production-route.provider.mjs +0 -19
  69. package/esm2020/config/providers/route.provider.mjs +0 -24
  70. package/esm2020/config/public-api.mjs +0 -4
  71. package/esm2020/config/uretim-yonetimi-config.module.mjs +0 -28
  72. package/esm2020/hitsoft-uretim-yonetimi.mjs +0 -5
  73. package/esm2020/lib/components/hit-create-barcodes/hit-create-barcodes-routing.module.mjs +0 -26
  74. package/esm2020/lib/components/hit-create-barcodes/hit-create-barcodes.component.mjs +0 -186
  75. package/esm2020/lib/components/hit-create-barcodes/hit-create-barcodes.module.mjs +0 -65
  76. package/esm2020/lib/components/hit-issues-for-productions/hit-issues-for-productions-routing.module.mjs +0 -26
  77. package/esm2020/lib/components/hit-issues-for-productions/hit-issues-for-productions.component.mjs +0 -252
  78. package/esm2020/lib/components/hit-issues-for-productions/hit-issues-for-productions.module.mjs +0 -68
  79. package/esm2020/lib/components/hit-production-orders/hit-production-orders-routing.module.mjs +0 -26
  80. package/esm2020/lib/components/hit-production-orders/hit-production-orders.component.mjs +0 -153
  81. package/esm2020/lib/components/hit-production-orders/hit-production-orders.module.mjs +0 -65
  82. package/esm2020/lib/components/hit-receipt-from-productions/hit-receipt-from-production-routing.module.mjs +0 -26
  83. package/esm2020/lib/components/hit-receipt-from-productions/hit-receipt-from-productions.component.mjs +0 -217
  84. package/esm2020/lib/components/hit-receipt-from-productions/hit-receipt-from-productions.module.mjs +0 -62
  85. package/esm2020/lib/components/uretim-yonetimi.component.mjs +0 -11
  86. package/esm2020/lib/hit-proxy/devexpress-query-builder/devexpress-load-options.model.mjs +0 -2
  87. package/esm2020/lib/hit-proxy/devexpress-query-builder/devexpress-query-builder.mjs +0 -54
  88. package/esm2020/lib/hit-proxy/hit-create-barcodes/hit-create-barcodes.service.mjs +0 -35
  89. package/esm2020/lib/hit-proxy/hit-create-barcodes/models.mjs +0 -3
  90. package/esm2020/lib/hit-proxy/hit-issues-for-productions/hit-issues-for-productions.service.mjs +0 -35
  91. package/esm2020/lib/hit-proxy/hit-issues-for-productions/models.mjs +0 -24
  92. package/esm2020/lib/hit-proxy/hit-production-orders/hit-production-orders.service.mjs +0 -44
  93. package/esm2020/lib/hit-proxy/hit-production-orders/models.mjs +0 -65
  94. package/esm2020/lib/hit-proxy/hit-receipt-from-productions/hit-receipt-from-productions.service.mjs +0 -30
  95. package/esm2020/lib/hit-proxy/hit-receipt-from-productions/models.mjs +0 -20
  96. package/esm2020/lib/hit-proxy/models.mjs +0 -85
  97. package/esm2020/lib/uretim-yonetimi-routing.module.mjs +0 -33
  98. package/esm2020/lib/uretim-yonetimi.module.mjs +0 -55
  99. package/esm2020/public-api.mjs +0 -6
  100. package/fesm2015/hitsoft-uretim-yonetimi-config.mjs +0 -121
  101. package/fesm2015/hitsoft-uretim-yonetimi-config.mjs.map +0 -1
  102. package/fesm2015/hitsoft-uretim-yonetimi.mjs +0 -1548
  103. package/fesm2015/hitsoft-uretim-yonetimi.mjs.map +0 -1
  104. package/fesm2020/hitsoft-uretim-yonetimi-config.mjs +0 -121
  105. package/fesm2020/hitsoft-uretim-yonetimi-config.mjs.map +0 -1
  106. package/fesm2020/hitsoft-uretim-yonetimi.mjs +0 -1526
  107. package/fesm2020/hitsoft-uretim-yonetimi.mjs.map +0 -1
  108. package/index.d.ts +0 -5
  109. package/lib/components/hit-create-barcodes/hit-create-barcodes-routing.module.d.ts +0 -7
  110. package/lib/components/hit-create-barcodes/hit-create-barcodes.component.d.ts +0 -45
  111. package/lib/components/hit-create-barcodes/hit-create-barcodes.module.d.ts +0 -16
  112. package/lib/components/hit-issues-for-productions/hit-issues-for-productions-routing.module.d.ts +0 -7
  113. package/lib/components/hit-issues-for-productions/hit-issues-for-productions.component.d.ts +0 -48
  114. package/lib/components/hit-issues-for-productions/hit-issues-for-productions.module.d.ts +0 -16
  115. package/lib/components/hit-production-orders/hit-production-orders-routing.module.d.ts +0 -7
  116. package/lib/components/hit-production-orders/hit-production-orders.component.d.ts +0 -44
  117. package/lib/components/hit-production-orders/hit-production-orders.module.d.ts +0 -16
  118. package/lib/components/hit-receipt-from-productions/hit-receipt-from-production-routing.module.d.ts +0 -7
  119. package/lib/components/hit-receipt-from-productions/hit-receipt-from-productions.component.d.ts +0 -57
  120. package/lib/components/hit-receipt-from-productions/hit-receipt-from-productions.module.d.ts +0 -16
  121. package/lib/components/uretim-yonetimi.component.d.ts +0 -5
  122. package/lib/hit-proxy/devexpress-query-builder/devexpress-load-options.model.d.ts +0 -17
  123. package/lib/hit-proxy/devexpress-query-builder/devexpress-query-builder.d.ts +0 -18
  124. package/lib/hit-proxy/hit-create-barcodes/hit-create-barcodes.service.d.ts +0 -23
  125. package/lib/hit-proxy/hit-create-barcodes/models.d.ts +0 -6
  126. package/lib/hit-proxy/hit-issues-for-productions/hit-issues-for-productions.service.d.ts +0 -17
  127. package/lib/hit-proxy/hit-issues-for-productions/models.d.ts +0 -30
  128. package/lib/hit-proxy/hit-production-orders/hit-production-orders.service.d.ts +0 -19
  129. package/lib/hit-proxy/hit-production-orders/models.d.ts +0 -85
  130. package/lib/hit-proxy/hit-receipt-from-productions/hit-receipt-from-productions.service.d.ts +0 -16
  131. package/lib/hit-proxy/hit-receipt-from-productions/models.d.ts +0 -39
  132. package/lib/hit-proxy/models.d.ts +0 -21
  133. package/lib/uretim-yonetimi-routing.module.d.ts +0 -7
  134. package/lib/uretim-yonetimi.module.d.ts +0 -17
  135. /package/config/{enums/index.d.ts → src/enums/index.ts} +0 -0
  136. /package/config/{providers/index.d.ts → src/providers/index.ts} +0 -0
  137. /package/config/{public-api.d.ts → src/public-api.ts} +0 -0
@@ -0,0 +1,9 @@
1
+ import {Component} from '@angular/core';
2
+
3
+ @Component({
4
+ selector: 'lib-uretim-yonetimi',
5
+ template: ` <p>uretim-yonetimi works!</p> `,
6
+ styles: [],
7
+ })
8
+ export class UretimYonetimiComponent {
9
+ }
@@ -0,0 +1,20 @@
1
+ export interface LoadOptions{
2
+ key: string,
3
+ loadUrl: string,
4
+ params?: any,
5
+ insertUrl?: string,
6
+ updateUrl?: string,
7
+ deleteUrl?:string
8
+ }
9
+
10
+ export interface AbpSessionInfo {
11
+ language: string
12
+ tenant: Tenant
13
+ }
14
+
15
+ export interface Tenant {
16
+ id: any
17
+ name: any
18
+ isAvailable: boolean
19
+ }
20
+
@@ -0,0 +1,51 @@
1
+ import { EnvironmentService, LocalizationService } from "@abp/ng.core";
2
+ import { ToasterService } from "@abp/ng.theme.shared";
3
+ import { Injectable } from "@angular/core";
4
+ import * as AspNetData from 'devextreme-aspnet-data-nojquery';
5
+ import { AbpSessionInfo,LoadOptions } from "./devexpress-load-options.model";
6
+ @Injectable({
7
+ providedIn: 'root'
8
+ })
9
+ export class DevexpressRestService {
10
+
11
+ localizationKey: any = 'tr'
12
+ createStore = (options: LoadOptions) => AspNetData.createStore({
13
+ key: options.key,
14
+ loadParams: options.params,
15
+ loadUrl: `${this.envService.getEnvironment().apis.eDonusum.url + '/' + options.loadUrl}`,
16
+ insertUrl: `${this.envService.getEnvironment().apis.eDonusum.url + '/' + options.insertUrl}`,
17
+ insertMethod: 'POST',
18
+ updateUrl: `${this.envService.getEnvironment().apis.eDonusum.url + '/' + options.updateUrl}`,
19
+ updateMethod: 'PUT',
20
+ deleteUrl: `${this.envService.getEnvironment().apis.eDonusum.url + '/' + options.deleteUrl}`,
21
+ deleteMethod: 'DELETE',
22
+ onLoading(loadOptions) {
23
+ },
24
+ onBeforeSend(operation, ajaxSettings) {
25
+
26
+ let languages={} as AbpSessionInfo
27
+ languages= JSON.parse(localStorage.getItem('abpSession')) as AbpSessionInfo
28
+
29
+ if (operation === "insert" || operation === "update" || operation === "delete") {
30
+ console.log(ajaxSettings);
31
+ if (operation == "delete") {
32
+ ajaxSettings.url = ajaxSettings.url + "/" + localStorage.getItem("appointment-deleted-id")
33
+ }
34
+ ajaxSettings.contentType = "application/json"
35
+ ajaxSettings.data = ajaxSettings.data.values
36
+ }
37
+ ajaxSettings.headers = {
38
+ Authorization: 'Bearer ' + localStorage.getItem('access_token'),
39
+ 'Accept-Language': languages.language
40
+ };
41
+ }, onAjaxError: this.onAjaxError
42
+ });
43
+ onAjaxError(e: { xhr, error }) {
44
+ let jsonObj = e.xhr.responseJSON || JSON.parse(e.xhr.responseText);
45
+ e.error = jsonObj ? ` ${jsonObj.error.message} : ${jsonObj.error.details}` : 'null text';
46
+ }
47
+ constructor(private envService: EnvironmentService, private toaster: ToasterService) {
48
+
49
+
50
+ }
51
+ }
@@ -0,0 +1,41 @@
1
+ import {RestService} from '@abp/ng.core';
2
+ import {Injectable} from '@angular/core';
3
+ import {ResultBase} from "../models";
4
+ import {ReceiptFromProductions} from "./models";
5
+ import { HttpClient } from '@angular/common/http';
6
+ import { DomSanitizer, SafeResourceUrl } from '@angular/platform-browser';
7
+
8
+ @Injectable({
9
+ providedIn: 'root',
10
+ })
11
+ export class HitCreateBarcodesService {
12
+ apiName = 'UretimYonetimi';
13
+ protected readonly resourceEndpoint: string;
14
+
15
+ constructor(private restService: RestService) {
16
+ this.resourceEndpoint = '/api/uretim-yonetimi/create-barcodes';
17
+ }
18
+
19
+ getReceiptFromProductions = (orderNo: string) =>
20
+ this.restService.request<any, ResultBase<ReceiptFromProductions[]>>({
21
+ method: 'GET',
22
+ url: `${this.resourceEndpoint}/get-receipt-from-productions?productionOrderId=${orderNo}`,
23
+ },
24
+ {apiName: this.apiName});
25
+
26
+ getBarcodeInfo = (productionOrderId, receiptId, barcodeNumber) =>
27
+ this.restService.request<any, any>({
28
+ method: 'POST',
29
+ url: `${this.resourceEndpoint}/get-barcode?productionOrderId=${productionOrderId}&receiptId=${receiptId}&barcodeNumber=${barcodeNumber}`,
30
+ },
31
+ {apiName: this.apiName});
32
+ }
33
+
34
+ export class BarcodeViewerComponent {
35
+ pdfSrc: SafeResourceUrl | null = null;
36
+ protected readonly resourceEndpoint: string;
37
+
38
+ constructor(private http: HttpClient, private sanitizer: DomSanitizer) {
39
+ this.resourceEndpoint = '/api/uretim-yonetimi/create-barcodes';
40
+ }
41
+ }
@@ -0,0 +1,6 @@
1
+ export class ReceiptFromProductions {
2
+ docEntry: number;
3
+ quantity: number;
4
+ docDate: Date;
5
+ docDateString: string;
6
+ }
@@ -0,0 +1,39 @@
1
+ import {RestService} from '@abp/ng.core';
2
+ import {Injectable} from '@angular/core';
3
+ import {DevexpressRestService} from '../devexpress-query-builder/devexpress-query-builder';
4
+ import {ResultBase} from "../models";
5
+ import {IssuesForProductionGetDto, IssuesForProductionPatchDto, IssuesForProductionPostDto} from "./models";
6
+
7
+ @Injectable({
8
+ providedIn: 'root',
9
+ })
10
+ export class HitIssuesForProductionsService {
11
+ apiName = 'UretimYonetimi';
12
+ protected readonly resourceEndpoint: string;
13
+
14
+ constructor(private restService: RestService, private devexService: DevexpressRestService) {
15
+ this.resourceEndpoint = '/api/uretim-yonetimi/issues-for-productions';
16
+ }
17
+
18
+ post = (input: IssuesForProductionPostDto) =>
19
+ this.restService.request<IssuesForProductionPostDto, ResultBase<IssuesForProductionPostDto>>({
20
+ method: 'POST',
21
+ url: `${this.resourceEndpoint}`,
22
+ body: input,
23
+ },
24
+ {apiName: this.apiName});
25
+ patch = (input: IssuesForProductionPatchDto) =>
26
+ this.restService.request<IssuesForProductionPatchDto, ResultBase<IssuesForProductionPatchDto>>({
27
+ method: 'POST',
28
+ url: `${this.resourceEndpoint}`,
29
+ body: input,
30
+ },
31
+ {apiName: this.apiName});
32
+
33
+ get = (itemCode: string, orderNo: string) =>
34
+ this.restService.request<string, ResultBase<IssuesForProductionGetDto>>({
35
+ method: 'GET',
36
+ url: `${this.resourceEndpoint}?itemCode=${itemCode}&orderNo=${orderNo}`,
37
+ },
38
+ {apiName: this.apiName});
39
+ }
@@ -0,0 +1,42 @@
1
+ export class IssuesForProductionPostDto {
2
+ DocumentLines: IssueLine[];
3
+
4
+ constructor(issueLines: IssueLine[] = []) {
5
+ this.DocumentLines = issueLines;
6
+ }
7
+ }
8
+
9
+ export class IssueLine {
10
+ ItemCode: string; // For mapping
11
+ IsQRReady: boolean = false;
12
+ WarehouseCode: string;
13
+ Quantity: number = 0;
14
+ BaseType: number = 202;
15
+ BaseEntry: number;
16
+ BaseLine: number;
17
+ BatchNumbers: BatchNumber[] = [];
18
+ }
19
+
20
+ export class BatchNumber {
21
+ BatchNumber: string;
22
+ Quantity: number;
23
+
24
+ constructor(batchNumber: string, quantity: number) {
25
+ this.BatchNumber = batchNumber;
26
+ this.Quantity = quantity;
27
+ }
28
+ }
29
+
30
+ export class IssuesForProductionPatchDto {
31
+
32
+ }
33
+
34
+ export class IssuesForProductionGetDto {
35
+ orderNo: string;
36
+ itemCode: string;
37
+ itemName: string;
38
+ warehouse: string;
39
+ lineNum: number;
40
+ plannedQty: number;
41
+ unitOfMeasurement: string;
42
+ }
@@ -0,0 +1,60 @@
1
+ import {RestService} from '@abp/ng.core';
2
+ import {Injectable} from '@angular/core';
3
+ import {HammaddeDepo, ItemInfos, ProductionOrderPatchDto, Warehouse} from "./models";
4
+ import {ResultBase} from "../models";
5
+ import {GetProductionOrderDto} from "../hit-receipt-from-productions/models";
6
+
7
+ @Injectable({
8
+ providedIn: 'root',
9
+ })
10
+ export class HitProductionOrdersService {
11
+ apiName = 'UretimYonetimi';
12
+ protected readonly resourceEndpoint: string;
13
+
14
+ constructor(private restService: RestService) {
15
+ this.resourceEndpoint = '/api/uretim-yonetimi/production-orders';
16
+ }
17
+
18
+ get = (id: number) =>
19
+ this.restService.request<string, ResultBase<GetProductionOrderDto>>({
20
+ method: 'GET',
21
+ url: `${this.resourceEndpoint}?id=${id + ''}`,
22
+ },
23
+ {apiName: this.apiName});
24
+ get2 = (id: number) =>
25
+ this.restService.request<string, GetProductionOrderDto>({
26
+ method: 'GET',
27
+ url: `${this.resourceEndpoint}?id=${id + ''}`,
28
+ },
29
+ {apiName: this.apiName});
30
+
31
+ patch = (input: ProductionOrderPatchDto) =>
32
+ this.restService.request<any, ResultBase<ProductionOrderPatchDto>>(
33
+ {
34
+ method: 'PATCH',
35
+ url: `${this.resourceEndpoint}`,
36
+ body: input
37
+ },
38
+ {apiName: this.apiName}
39
+ );
40
+ getWarehouses = () =>
41
+ this.restService.request<any, ResultBase<Warehouse[]>>({
42
+ method: 'GET',
43
+ url: `${this.resourceEndpoint}/get-warehouses`,
44
+ },
45
+ {apiName: this.apiName});
46
+
47
+ getWareHouseInfo = (itemCode: string, orderNo: string) =>
48
+ this.restService.request<any, ResultBase<HammaddeDepo>>({
49
+ method: 'GET',
50
+ url: `${this.resourceEndpoint}/get-warehouse-info?itemCode=${itemCode}&orderNo=${orderNo}`,
51
+ },
52
+ {apiName: this.apiName});
53
+
54
+ getItemInfo = (itemCode) =>
55
+ this.restService.request<any, ResultBase<ItemInfos>>({
56
+ method: 'GET',
57
+ url: `${this.resourceEndpoint}/get-item-info?itemCode=${itemCode}`,
58
+ },
59
+ {apiName: this.apiName});
60
+ }
@@ -0,0 +1,137 @@
1
+ export class ProductionOrder {
2
+ DocumentAbsoluteEntry: number;
3
+ LineNumber: number;
4
+ ItemNo: string;
5
+ BaseQuantity: number;
6
+ PlannedQuantity: number;
7
+ IssuedQuantity: number;
8
+ ProductionOrderIssueType: string;
9
+ Warehouse: string;
10
+ BatchNumbers: BatchNumber[];
11
+ }
12
+
13
+ export class Warehouse {
14
+ whsCode: string;
15
+ whsName: string;
16
+ }
17
+
18
+ export class HammaddeDepo{
19
+ orderNo: number;
20
+ itemCode: string;
21
+ selectedWarehouse: string;
22
+ }
23
+
24
+ export class ItemInfos{
25
+ itemCode: string;
26
+ itemName: string;
27
+ unitOfMeasurement: string;
28
+ }
29
+
30
+ export class Item{
31
+ itemCode: string;
32
+ itemName: string;
33
+ unitOfMeasurement: string;
34
+ }
35
+
36
+ export class ProductionOrderList {
37
+ ProductionOrderLines: ProductionOrderLineForListing[];
38
+
39
+ constructor() {
40
+ this.ProductionOrderLines = [];
41
+ }
42
+ }
43
+
44
+ export class ProductionOrderLineForListing {
45
+ ItemCode: string;
46
+ ItemName: string;
47
+ WarehouseCode: string;
48
+ Quantity: number;
49
+ PlannedQty: number;
50
+ BatchNumber: string;
51
+ BaseType: number;
52
+ BaseEntry: number;
53
+ BaseLine: number;
54
+
55
+ constructor(itemCode: string, itemName:string, warehouseCode: string, quantity: number, plannedQty: number, batchNumber: string, baseType: number = 202, baseEntry: number = -1, baseLine: number = -1) {
56
+ this.ItemCode = itemCode;
57
+ this.ItemName = itemName;
58
+ this.WarehouseCode = warehouseCode;
59
+ this.Quantity = quantity;
60
+ this.PlannedQty = plannedQty;
61
+ this.BatchNumber = batchNumber;
62
+ this.BaseType = baseType;
63
+ this.BaseEntry = baseEntry;
64
+ this.BaseLine = baseLine;
65
+ }
66
+ }
67
+
68
+ export class ProductionOrderPatchDto {
69
+ ProductionOrderLines: ProductionOrderLine[];
70
+
71
+ constructor(productionOrderLines: ProductionOrderLine[] = []) {
72
+ this.ProductionOrderLines = productionOrderLines;
73
+ }
74
+ }
75
+
76
+ export class ProductionOrderLine {
77
+ DocumentAbsoluteEntry: number;
78
+ ItemNo: string;
79
+ Warehouse: string;
80
+ BaseQuantity: number;
81
+ PlannedQuantity: number;
82
+ IssuedQuantity: number;
83
+ ProductionOrderIssueType: string;
84
+ LineNumber: number;
85
+ BatchNumbers: BatchNumber[];
86
+
87
+ constructor(itemNo: string, warehouse: string, baseQuantity: number, plannedQuantity: number, issuedQuantity: number, productionOrderIssueType: string, documentAbsoluteEntry: number, lineNumber: number, batchNumbers: BatchNumber[]) {
88
+ this.DocumentAbsoluteEntry = documentAbsoluteEntry;
89
+ this.LineNumber = lineNumber;
90
+ this.ItemNo = itemNo;
91
+ this.BaseQuantity = baseQuantity;
92
+ this.PlannedQuantity = plannedQuantity;
93
+ this.IssuedQuantity = issuedQuantity;
94
+ this.Warehouse = warehouse;
95
+ this.ProductionOrderIssueType = productionOrderIssueType;
96
+ this.BatchNumbers = batchNumbers;
97
+ }
98
+ }
99
+
100
+ export class BatchNumber {
101
+ BatchNumber: string;
102
+ Quantity: number;
103
+
104
+ constructor(batchNumber: string, quantity: number) {
105
+ this.BatchNumber = batchNumber;
106
+ this.Quantity = quantity;
107
+ }
108
+ }
109
+
110
+ export class ProductionOrdersGetDto {
111
+ orderNo: string;
112
+ itemCode: string;
113
+ itemName: string;
114
+ warehouse: string;
115
+ lineNum: number;
116
+ plannedQty: number;
117
+ unitOfMeasurement: string;
118
+ }
119
+
120
+ export class TuketilenHammadde {
121
+ chemicalCode: string;
122
+ lotNumber: string;
123
+ expirationDate: string;
124
+ weightGr: number;
125
+ weightKg: number;
126
+ terminalCode: string;
127
+
128
+ constructor(chemicalCode: string, lotNumber: string, expirationDate: string, weight: number, terminalCode: string) {
129
+ this.chemicalCode = chemicalCode;
130
+ this.lotNumber = lotNumber;
131
+ this.expirationDate = expirationDate;
132
+ this.weightGr = weight; // Gram cinsinden
133
+ this.weightKg = weight ? weight / 1000 : 0; // Kilogram cinsine dönüştürülmüş hali
134
+ this.terminalCode = terminalCode;
135
+ }
136
+ }
137
+
@@ -0,0 +1,32 @@
1
+ import {RestService} from '@abp/ng.core';
2
+ import {Injectable} from '@angular/core';
3
+ import {DevexpressRestService} from '../devexpress-query-builder/devexpress-query-builder';
4
+ import {ReceiptFromProductionsPostDto} from "./models";
5
+ import {ResultBase} from '../models';
6
+
7
+ @Injectable({
8
+ providedIn: 'root',
9
+ })
10
+ export class HitReceiptFromProductionsService {
11
+ apiName = 'UretimYonetimi';
12
+ protected readonly resourceEndpoint: string;
13
+
14
+ constructor(private restService: RestService, private devexService: DevexpressRestService) {
15
+ this.resourceEndpoint = '/api/uretim-yonetimi/receipt-from-productions';
16
+ }
17
+
18
+ create = (input: ReceiptFromProductionsPostDto) =>
19
+ this.restService.request<ReceiptFromProductionsPostDto, ResultBase<ReceiptFromProductionsPostDto>>({
20
+ method: 'POST',
21
+ url: `${this.resourceEndpoint}`,
22
+ body: input,
23
+ },
24
+ {apiName: this.apiName});
25
+
26
+ getBarcodeInfo = (productionOrderId, receiptId, barcodeNumber) =>
27
+ this.restService.request<any, any>({
28
+ method: 'POST',
29
+ url: `/api/uretim-yonetimi/create-barcodes/get-barcode?productionOrderId=${productionOrderId}&receiptId=${receiptId}&barcodeNumber=${barcodeNumber}`,
30
+ },
31
+ {apiName: this.apiName});
32
+ }
@@ -0,0 +1,44 @@
1
+ export class GetProductionOrderDto {
2
+ absoluteEntry: number; // Doc Entry PK
3
+ documentNumber: number; // DocNum Görünen Ad Bu Doküman İçin
4
+ itemNo: string; // Parça Kodu
5
+ productDescription: string; // Parça Adı
6
+ warehouse: string; // Hedef Depo
7
+ unitOfMeasurement: string; // Birim Türü
8
+ plannedQuantity: number; // Planlanan kısmına gelecek Toplanan değiştirilebilecek
9
+ completedQuantity: number; // Planlanan kısmına gelecek Toplanan değiştirilebilecek
10
+ u_trkBatch: string; // Parti Numarası
11
+ u_Kazan: string; // Kazan No
12
+ getProductionOrderLine: ProductionOrderLine[]; // Üretim Emri Satırları
13
+ }
14
+
15
+ export class ReceiptFromProductionsPostDto {
16
+ docEntry: number;
17
+ documentLines: ReceiptFromProductionsLines[] = [];
18
+ }
19
+
20
+ export class ReceiptFromProductionsLines {
21
+ warehouseCode: string;
22
+ quantity: number;
23
+ baseType: number;
24
+ baseEntry: number;
25
+ batchNumbers: ReceiptFromProductionsBatchNumbers[] = [];
26
+ }
27
+
28
+ export class ReceiptFromProductionsBatchNumbers {
29
+ batchNumber: string;
30
+ quantity: number;
31
+ }
32
+
33
+ export class ProductionOrderLine {
34
+ absoluteEntry: number; // Doc Entry PK
35
+ lineNum: number; // Satır Numarası
36
+ batchNumber: string; // Parti Numarası
37
+ itemCode: string; // Parça Kodu
38
+ itemName: string; // Parça Adı
39
+ plannedQty: number; // Miktar ve Toplanan kısmına gelecek Toplanan değiştirilebilecek
40
+ warehouse: string; // Hedef Depo
41
+ unitOfMeasurement: string; // Birim Türü
42
+ issuedQty: number; // Toplanan
43
+ quantity: number = 0;
44
+ }
@@ -0,0 +1,116 @@
1
+ export class ResultBase<T> {
2
+ items: T;
3
+ totalCount: number;
4
+ isSuccessful: boolean;
5
+ errors: string[];
6
+ }
7
+
8
+ export class HitHelper {
9
+ public static getMeasurementFormatted(suffix: string): string {
10
+ return suffix ? '#,##0.00 ' + suffix : '#,##0.00';
11
+ }
12
+
13
+ public static getMeasurementFormattedWithLocalization(value: number, unit: string): string {
14
+ const locale = navigator.language || 'tr-TR';
15
+
16
+ const formatted = new Intl.NumberFormat(locale, {
17
+ minimumFractionDigits: 2,
18
+ maximumFractionDigits: 2,
19
+ }).format(value);
20
+
21
+ return unit ? `${formatted} ${unit}` : formatted;
22
+ }
23
+
24
+ static getFormattedErrors(errors: string[]): string {
25
+ if (!errors?.length) {
26
+ return '';
27
+ }
28
+
29
+ if (errors.length === 1) {
30
+ return errors[0];
31
+ }
32
+
33
+ return errors
34
+ .map((err: string, index: number) => `${index + 1}. ${err}`)
35
+ .join('\n');
36
+ }
37
+
38
+ static parseQR(barkod: string): Hammadde | null {
39
+ debugger;
40
+
41
+ const elTerminalKoduStartIndex = barkod.lastIndexOf("KM");
42
+ const elTerminalKodu = barkod.substring(elTerminalKoduStartIndex);
43
+
44
+ const sabit21Index = elTerminalKoduStartIndex - 2;
45
+ const tartimMiktar = barkod.substring(sabit21Index - 6, sabit21Index);
46
+
47
+ const sabit3103Index = sabit21Index - 6 - 4;
48
+ const sonKullanmaTarihi = barkod.substring(sabit3103Index - 6, sabit3103Index);
49
+
50
+ const sabit17Index = sabit3103Index - 6 - 2;
51
+
52
+ const kimyasalKoduStartIndex = 3;
53
+ const kimyasalKodu = barkod.substring(kimyasalKoduStartIndex, kimyasalKoduStartIndex + 14);
54
+
55
+ const sabit10Index = kimyasalKoduStartIndex + 14;
56
+ const lotNo = barkod.substring(sabit10Index + 2, sabit17Index);
57
+
58
+ const chemicalCodeMatch = kimyasalKodu;
59
+ const lotNumberMatch = lotNo;
60
+ const expDateMatch = sonKullanmaTarihi;
61
+ const weightMatch = tartimMiktar;
62
+ const terminalCodeMatch = elTerminalKodu;
63
+
64
+ if (!chemicalCodeMatch || !lotNumberMatch || !expDateMatch || !weightMatch || !terminalCodeMatch) {
65
+ return null;
66
+ }
67
+
68
+ // var onMu = false;
69
+ // while(!onMu){
70
+ // if(lotNumberMatch[1].substring(0, 2) == "10"){
71
+ // chemicalCodeMatch[1] += "10";
72
+ // lotNumberMatch[1] = lotNumberMatch[1].substring(2);
73
+ // }
74
+ // else{
75
+ // onMu = true;
76
+ // }
77
+ // }
78
+
79
+ // var onYediMi = false;
80
+ // while(!onYediMi){
81
+ // if(expDateMatch[1].substring(0, 2) == "17"){
82
+ // lotNumberMatch[1] += "17";
83
+ // expDateMatch[1] = expDateMatch[1].substring(2);
84
+ // }
85
+ // else{
86
+ // onYediMi = true;
87
+ // }
88
+ // }
89
+
90
+ if (!chemicalCodeMatch || !lotNumberMatch || !expDateMatch || !weightMatch || !terminalCodeMatch) {
91
+ return null;
92
+ }
93
+
94
+ const expDateRaw = expDateMatch[1]; // YYMMDD
95
+ const expirationDate = `20${expDateRaw.slice(0, 2)}-${expDateRaw.slice(2, 4)}-${expDateRaw.slice(4, 6)}`;
96
+ return new Hammadde(chemicalCodeMatch, lotNumberMatch, expirationDate, parseInt(weightMatch), terminalCodeMatch);
97
+ }
98
+ }
99
+
100
+ export class Hammadde {
101
+ chemicalCode: string;
102
+ lotNumber: string;
103
+ expirationDate: string;
104
+ weightGr: number;
105
+ weightKg: number;
106
+ terminalCode: string;
107
+
108
+ constructor(chemicalCode: string, lotNumber: string, expirationDate: string, weight: number, terminalCode: string) {
109
+ this.chemicalCode = chemicalCode;
110
+ this.lotNumber = lotNumber;
111
+ this.expirationDate = expirationDate;
112
+ this.weightGr = weight; // Gram cinsinden
113
+ this.weightKg = weight ? weight / 1000 : 0; // Kilogram cinsine dönüştürülmüş hali
114
+ this.terminalCode = terminalCode;
115
+ }
116
+ }
@@ -0,0 +1,30 @@
1
+ import {NgModule} from '@angular/core';
2
+ import {RouterModule, Routes} from '@angular/router';
3
+ import {loadHitProductionOrdersAsChild} from './components/hit-production-orders/hit-production-orders.module';
4
+ import {
5
+ loadHitReceiptFromProductionsAsChild
6
+ } from './components/hit-receipt-from-productions/hit-receipt-from-productions.module';
7
+ import {
8
+ loadHitIssuesForProductionsAsChild
9
+ } from "./components/hit-issues-for-productions/hit-issues-for-productions.module";
10
+ import {loadHitCreateBarcodesAsChild} from "./components/hit-create-barcodes/hit-create-barcodes.module";
11
+ import { UretimYonetimiComponent } from './components/uretim-yonetimi.component';
12
+
13
+ const routes: Routes = [
14
+ {
15
+ path: '',
16
+ pathMatch: 'full',
17
+ component: UretimYonetimiComponent,
18
+ },
19
+ {path: 'create-barcodes', loadChildren: loadHitCreateBarcodesAsChild},
20
+ {path: 'production-orders', loadChildren: loadHitProductionOrdersAsChild},
21
+ {path: 'issues-for-productions', loadChildren: loadHitIssuesForProductionsAsChild},
22
+ {path: 'receipt-from-productions', loadChildren: loadHitReceiptFromProductionsAsChild}
23
+ ];
24
+
25
+ @NgModule({
26
+ imports: [RouterModule.forChild(routes)],
27
+ exports: [RouterModule],
28
+ })
29
+ export class UretimYonetimiRoutingModule {
30
+ }
@@ -0,0 +1,24 @@
1
+ import {ComponentFixture, TestBed, waitForAsync} from '@angular/core/testing';
2
+ import {UretimYonetimiComponent} from './components/uretim-yonetimi.component';
3
+
4
+ describe('UretimYonetimiComponent', () => {
5
+ let component: UretimYonetimiComponent;
6
+ let fixture: ComponentFixture<UretimYonetimiComponent>;
7
+
8
+ beforeEach(waitForAsync(() => {
9
+ TestBed.configureTestingModule({
10
+ declarations: [UretimYonetimiComponent]
11
+ })
12
+ .compileComponents();
13
+ }));
14
+
15
+ beforeEach(() => {
16
+ fixture = TestBed.createComponent(UretimYonetimiComponent);
17
+ component = fixture.componentInstance;
18
+ fixture.detectChanges();
19
+ });
20
+
21
+ it('should create', () => {
22
+ expect(component).toBeTruthy();
23
+ });
24
+ });