@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.
- package/.eslintrc.json +44 -0
- package/config/ng-package.json +7 -0
- package/config/src/enums/route-names.ts +3 -0
- package/config/src/providers/create-barcode-route.provider.ts +21 -0
- package/config/src/providers/issues-for-production-route.provider.ts +21 -0
- package/config/src/providers/production-order-route.provider.ts +21 -0
- package/config/src/providers/receipt-from-production-route.provider.ts +21 -0
- package/config/src/providers/route.provider.ts +26 -0
- package/config/src/uretim-yonetimi-config.module.ts +22 -0
- package/karma.conf.js +44 -0
- package/ng-package.json +7 -0
- package/package.json +14 -42
- package/src/lib/components/hit-create-barcodes/hit-create-barcodes-component.css +10 -0
- package/src/lib/components/hit-create-barcodes/hit-create-barcodes-routing.module.ts +19 -0
- package/src/lib/components/hit-create-barcodes/hit-create-barcodes.component.html +80 -0
- package/src/lib/components/hit-create-barcodes/hit-create-barcodes.component.ts +219 -0
- package/src/lib/components/hit-create-barcodes/hit-create-barcodes.module.ts +39 -0
- package/src/lib/components/hit-issues-for-productions/hit-issues-for-productions-routing.module.ts +19 -0
- package/src/lib/components/hit-issues-for-productions/hit-issues-for-productions.componenet.css +7 -0
- package/src/lib/components/hit-issues-for-productions/hit-issues-for-productions.component.html +100 -0
- package/src/lib/components/hit-issues-for-productions/hit-issues-for-productions.component.ts +276 -0
- package/src/lib/components/hit-issues-for-productions/hit-issues-for-productions.module.ts +46 -0
- package/src/lib/components/hit-production-orders/hit-production-orders-routing.module.ts +19 -0
- package/src/lib/components/hit-production-orders/hit-production-orders.component.html +79 -0
- package/src/lib/components/hit-production-orders/hit-production-orders.component.ts +213 -0
- package/src/lib/components/hit-production-orders/hit-production-orders.module.ts +39 -0
- package/src/lib/components/hit-receipt-from-productions/hit-receipt-from-production-component.css +10 -0
- package/src/lib/components/hit-receipt-from-productions/hit-receipt-from-production-routing.module.ts +19 -0
- package/src/lib/components/hit-receipt-from-productions/hit-receipt-from-productions.component.html +106 -0
- package/src/lib/components/hit-receipt-from-productions/hit-receipt-from-productions.component.ts +259 -0
- package/src/lib/components/hit-receipt-from-productions/hit-receipt-from-productions.module.ts +38 -0
- package/src/lib/components/uretim-yonetimi.component.ts +9 -0
- package/src/lib/hit-proxy/devexpress-query-builder/devexpress-load-options.model.ts +20 -0
- package/src/lib/hit-proxy/devexpress-query-builder/devexpress-query-builder.ts +51 -0
- package/src/lib/hit-proxy/hit-create-barcodes/hit-create-barcodes.service.ts +41 -0
- package/src/lib/hit-proxy/hit-create-barcodes/models.ts +6 -0
- package/src/lib/hit-proxy/hit-issues-for-productions/hit-issues-for-productions.service.ts +39 -0
- package/src/lib/hit-proxy/hit-issues-for-productions/models.ts +42 -0
- package/src/lib/hit-proxy/hit-production-orders/hit-production-orders.service.ts +60 -0
- package/src/lib/hit-proxy/hit-production-orders/models.ts +137 -0
- package/src/lib/hit-proxy/hit-receipt-from-productions/hit-receipt-from-productions.service.ts +32 -0
- package/src/lib/hit-proxy/hit-receipt-from-productions/models.ts +44 -0
- package/src/lib/hit-proxy/models.ts +116 -0
- package/src/lib/uretim-yonetimi-routing.module.ts +30 -0
- package/src/lib/uretim-yonetimi.component.spec.ts +24 -0
- package/src/lib/uretim-yonetimi.module.ts +52 -0
- package/src/lib/uretim-yonetimi.service.spec.ts +15 -0
- package/{public-api.d.ts → src/public-api.ts} +4 -0
- package/src/test.ts +29 -0
- package/tsconfig.lib.json +20 -0
- package/tsconfig.lib.prod.json +10 -0
- package/tsconfig.spec.json +17 -0
- package/config/enums/route-names.d.ts +0 -3
- package/config/index.d.ts +0 -5
- package/config/providers/create-barcode-route.provider.d.ts +0 -9
- package/config/providers/issues-for-production-route.provider.d.ts +0 -9
- package/config/providers/production-order-route.provider.d.ts +0 -9
- package/config/providers/receipt-from-production-route.provider.d.ts +0 -9
- package/config/providers/route.provider.d.ts +0 -8
- package/config/uretim-yonetimi-config.module.d.ts +0 -8
- package/esm2020/config/enums/index.mjs +0 -2
- package/esm2020/config/enums/route-names.mjs +0 -2
- package/esm2020/config/hitsoft-uretim-yonetimi-config.mjs +0 -5
- package/esm2020/config/providers/create-barcode-route.provider.mjs +0 -19
- package/esm2020/config/providers/index.mjs +0 -2
- package/esm2020/config/providers/issues-for-production-route.provider.mjs +0 -19
- package/esm2020/config/providers/production-order-route.provider.mjs +0 -19
- package/esm2020/config/providers/receipt-from-production-route.provider.mjs +0 -19
- package/esm2020/config/providers/route.provider.mjs +0 -24
- package/esm2020/config/public-api.mjs +0 -4
- package/esm2020/config/uretim-yonetimi-config.module.mjs +0 -28
- package/esm2020/hitsoft-uretim-yonetimi.mjs +0 -5
- package/esm2020/lib/components/hit-create-barcodes/hit-create-barcodes-routing.module.mjs +0 -26
- package/esm2020/lib/components/hit-create-barcodes/hit-create-barcodes.component.mjs +0 -186
- package/esm2020/lib/components/hit-create-barcodes/hit-create-barcodes.module.mjs +0 -65
- package/esm2020/lib/components/hit-issues-for-productions/hit-issues-for-productions-routing.module.mjs +0 -26
- package/esm2020/lib/components/hit-issues-for-productions/hit-issues-for-productions.component.mjs +0 -252
- package/esm2020/lib/components/hit-issues-for-productions/hit-issues-for-productions.module.mjs +0 -68
- package/esm2020/lib/components/hit-production-orders/hit-production-orders-routing.module.mjs +0 -26
- package/esm2020/lib/components/hit-production-orders/hit-production-orders.component.mjs +0 -153
- package/esm2020/lib/components/hit-production-orders/hit-production-orders.module.mjs +0 -65
- package/esm2020/lib/components/hit-receipt-from-productions/hit-receipt-from-production-routing.module.mjs +0 -26
- package/esm2020/lib/components/hit-receipt-from-productions/hit-receipt-from-productions.component.mjs +0 -217
- package/esm2020/lib/components/hit-receipt-from-productions/hit-receipt-from-productions.module.mjs +0 -62
- package/esm2020/lib/components/uretim-yonetimi.component.mjs +0 -11
- package/esm2020/lib/hit-proxy/devexpress-query-builder/devexpress-load-options.model.mjs +0 -2
- package/esm2020/lib/hit-proxy/devexpress-query-builder/devexpress-query-builder.mjs +0 -54
- package/esm2020/lib/hit-proxy/hit-create-barcodes/hit-create-barcodes.service.mjs +0 -35
- package/esm2020/lib/hit-proxy/hit-create-barcodes/models.mjs +0 -3
- package/esm2020/lib/hit-proxy/hit-issues-for-productions/hit-issues-for-productions.service.mjs +0 -35
- package/esm2020/lib/hit-proxy/hit-issues-for-productions/models.mjs +0 -24
- package/esm2020/lib/hit-proxy/hit-production-orders/hit-production-orders.service.mjs +0 -44
- package/esm2020/lib/hit-proxy/hit-production-orders/models.mjs +0 -65
- package/esm2020/lib/hit-proxy/hit-receipt-from-productions/hit-receipt-from-productions.service.mjs +0 -30
- package/esm2020/lib/hit-proxy/hit-receipt-from-productions/models.mjs +0 -20
- package/esm2020/lib/hit-proxy/models.mjs +0 -85
- package/esm2020/lib/uretim-yonetimi-routing.module.mjs +0 -33
- package/esm2020/lib/uretim-yonetimi.module.mjs +0 -55
- package/esm2020/public-api.mjs +0 -6
- package/fesm2015/hitsoft-uretim-yonetimi-config.mjs +0 -121
- package/fesm2015/hitsoft-uretim-yonetimi-config.mjs.map +0 -1
- package/fesm2015/hitsoft-uretim-yonetimi.mjs +0 -1548
- package/fesm2015/hitsoft-uretim-yonetimi.mjs.map +0 -1
- package/fesm2020/hitsoft-uretim-yonetimi-config.mjs +0 -121
- package/fesm2020/hitsoft-uretim-yonetimi-config.mjs.map +0 -1
- package/fesm2020/hitsoft-uretim-yonetimi.mjs +0 -1526
- package/fesm2020/hitsoft-uretim-yonetimi.mjs.map +0 -1
- package/index.d.ts +0 -5
- package/lib/components/hit-create-barcodes/hit-create-barcodes-routing.module.d.ts +0 -7
- package/lib/components/hit-create-barcodes/hit-create-barcodes.component.d.ts +0 -45
- package/lib/components/hit-create-barcodes/hit-create-barcodes.module.d.ts +0 -16
- package/lib/components/hit-issues-for-productions/hit-issues-for-productions-routing.module.d.ts +0 -7
- package/lib/components/hit-issues-for-productions/hit-issues-for-productions.component.d.ts +0 -48
- package/lib/components/hit-issues-for-productions/hit-issues-for-productions.module.d.ts +0 -16
- package/lib/components/hit-production-orders/hit-production-orders-routing.module.d.ts +0 -7
- package/lib/components/hit-production-orders/hit-production-orders.component.d.ts +0 -44
- package/lib/components/hit-production-orders/hit-production-orders.module.d.ts +0 -16
- package/lib/components/hit-receipt-from-productions/hit-receipt-from-production-routing.module.d.ts +0 -7
- package/lib/components/hit-receipt-from-productions/hit-receipt-from-productions.component.d.ts +0 -57
- package/lib/components/hit-receipt-from-productions/hit-receipt-from-productions.module.d.ts +0 -16
- package/lib/components/uretim-yonetimi.component.d.ts +0 -5
- package/lib/hit-proxy/devexpress-query-builder/devexpress-load-options.model.d.ts +0 -17
- package/lib/hit-proxy/devexpress-query-builder/devexpress-query-builder.d.ts +0 -18
- package/lib/hit-proxy/hit-create-barcodes/hit-create-barcodes.service.d.ts +0 -23
- package/lib/hit-proxy/hit-create-barcodes/models.d.ts +0 -6
- package/lib/hit-proxy/hit-issues-for-productions/hit-issues-for-productions.service.d.ts +0 -17
- package/lib/hit-proxy/hit-issues-for-productions/models.d.ts +0 -30
- package/lib/hit-proxy/hit-production-orders/hit-production-orders.service.d.ts +0 -19
- package/lib/hit-proxy/hit-production-orders/models.d.ts +0 -85
- package/lib/hit-proxy/hit-receipt-from-productions/hit-receipt-from-productions.service.d.ts +0 -16
- package/lib/hit-proxy/hit-receipt-from-productions/models.d.ts +0 -39
- package/lib/hit-proxy/models.d.ts +0 -21
- package/lib/uretim-yonetimi-routing.module.d.ts +0 -7
- package/lib/uretim-yonetimi.module.d.ts +0 -17
- /package/config/{enums/index.d.ts → src/enums/index.ts} +0 -0
- /package/config/{providers/index.d.ts → src/providers/index.ts} +0 -0
- /package/config/{public-api.d.ts → src/public-api.ts} +0 -0
|
@@ -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,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
|
+
|
package/src/lib/hit-proxy/hit-receipt-from-productions/hit-receipt-from-productions.service.ts
ADDED
|
@@ -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
|
+
});
|