@things-factory/integration-sftp 5.0.0-alpha.51 → 5.0.0-alpha.52
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/dist-server/controllers/herbalife/apis/create-serial-number.js +3 -2
- package/dist-server/controllers/herbalife/apis/create-serial-number.js.map +1 -1
- package/dist-server/controllers/herbalife/apis/create-shipment.js +5 -3
- package/dist-server/controllers/herbalife/apis/create-shipment.js.map +1 -1
- package/dist-server/controllers/herbalife/herbalife.js +2 -2
- package/dist-server/controllers/herbalife/herbalife.js.map +1 -1
- package/dist-server/service/sftp/sftp-mutation.js +70 -69
- package/dist-server/service/sftp/sftp-mutation.js.map +1 -1
- package/dist-server/service/sftp/sftp-query.js +1 -1
- package/dist-server/service/sftp/sftp-query.js.map +1 -1
- package/dist-server/service/sftp/sftp-type.js +8 -0
- package/dist-server/service/sftp/sftp-type.js.map +1 -1
- package/dist-server/service/sftp/sftp.js +23 -1
- package/dist-server/service/sftp/sftp.js.map +1 -1
- package/dist-server/sftp-const.js +1 -1
- package/dist-server/sftp-const.js.map +1 -1
- package/package.json +7 -7
- package/server/controllers/herbalife/apis/create-serial-number.ts +4 -3
- package/server/controllers/herbalife/apis/create-shipment.ts +7 -4
- package/server/controllers/herbalife/herbalife.ts +8 -3
- package/server/service/sftp/sftp-mutation.ts +68 -67
- package/server/service/sftp/sftp-query.ts +1 -1
- package/server/service/sftp/sftp-type.ts +7 -1
- package/server/service/sftp/sftp.ts +22 -1
- package/server/sftp-const.ts +1 -1
- package/dist-server/util/generate-file.js +0 -27
- package/dist-server/util/generate-file.js.map +0 -1
|
@@ -5,11 +5,12 @@ const sftp_const_1 = require("../../../sftp-const");
|
|
|
5
5
|
function createSerialNumber() {
|
|
6
6
|
return {
|
|
7
7
|
method: 'post',
|
|
8
|
-
path: '{folderPath}/{folderType}
|
|
8
|
+
path: '{folderPath}/{folderType}{snPath}',
|
|
9
9
|
denormalize(req) {
|
|
10
10
|
let { releaseGood, inventoryItems, sftp } = req;
|
|
11
11
|
let { folderPath, platform } = sftp;
|
|
12
12
|
const folderType = sftp.isDevelopment ? `dev` : `prd`;
|
|
13
|
+
const snPath = sftp_const_1.SNSUBMITDATAPATH;
|
|
13
14
|
const backupPath = `${sftp_const_1.BACKUPPATH}${platform}/${folderType}`;
|
|
14
15
|
let responseFilePattern = JSON.parse(sftp.responseFilePattern);
|
|
15
16
|
const { snSuffix, fileExtension, snRunningNumberDigit, snSequence } = responseFilePattern;
|
|
@@ -33,7 +34,7 @@ function createSerialNumber() {
|
|
|
33
34
|
content += orderNo + '|' + serialNumber + '\n';
|
|
34
35
|
}
|
|
35
36
|
return {
|
|
36
|
-
resource: { folderPath, folderType },
|
|
37
|
+
resource: { folderPath, folderType, snPath },
|
|
37
38
|
payload: { title, content, sftp, backupPath }
|
|
38
39
|
};
|
|
39
40
|
},
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"create-serial-number.js","sourceRoot":"","sources":["../../../../server/controllers/herbalife/apis/create-serial-number.ts"],"names":[],"mappings":";;;AAAA,
|
|
1
|
+
{"version":3,"file":"create-serial-number.js","sourceRoot":"","sources":["../../../../server/controllers/herbalife/apis/create-serial-number.ts"],"names":[],"mappings":";;;AAAA,oDAAkE;AAElE,SAAgB,kBAAkB;IAChC,OAAO;QACL,MAAM,EAAE,MAAM;QACd,IAAI,EAAE,mCAAmC;QACzC,WAAW,CAAC,GAAG;YACb,IAAI,EAAE,WAAW,EAAE,cAAc,EAAE,IAAI,EAAE,GAAG,GAAG,CAAA;YAC/C,IAAI,EAAE,UAAU,EAAE,QAAQ,EAAE,GAAG,IAAI,CAAA;YACnC,MAAM,UAAU,GAAW,IAAI,CAAC,aAAa,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,KAAK,CAAA;YAC7D,MAAM,MAAM,GAAW,6BAAgB,CAAA;YACvC,MAAM,UAAU,GAAW,GAAG,uBAAU,GAAG,QAAQ,IAAI,UAAU,EAA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AAE,CAAA;YAEjD,IAAI,OAAO,GAAW,EAAE,CAAA;YACxB,MAAM,OAAO,GAAW,WAAW,CAAC,KAAK,CAAA;YACzC,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,cAAc,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE;gBAC9C,IAAI,YAAY,GAAW,cAAc,CAAC,CAAC,CAAC,CAAC,YAAY,CAAA;gBACzD,OAAO,IAAI,OAAO,GAAG,GAAG,GAAG,YAAY,GAAG,IAAI,CAAA;aAC/C;YAED,OAAO;gBACL,QAAQ,EAAE,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,EAAE;gBAC5C,OAAO,EAAE,EAAE,KAAK,EAAE,OAAO,EAAE,IAAI,EAAE,UAAU,EAAE;aAC9C,CAAA;QACH,CAAC;QACD,SAAS,CAAC,GAAG;YACX,OAAO,GAAG,CAAA;QACZ,CAAC;KACF,CAAA;AACH,CAAC;AAhDD,gDAgDC"}
|
|
@@ -5,11 +5,12 @@ const sftp_const_1 = require("../../../sftp-const");
|
|
|
5
5
|
function createShipment() {
|
|
6
6
|
return {
|
|
7
7
|
method: 'post',
|
|
8
|
-
path: '{folderPath}/{folderType}
|
|
8
|
+
path: '{folderPath}/{folderType}{shipmentCompletePath}',
|
|
9
9
|
denormalize(req) {
|
|
10
10
|
let { releaseGood, orderInventories, sftp } = req;
|
|
11
11
|
let { folderPath, platform } = sftp;
|
|
12
12
|
const folderType = sftp.isDevelopment ? `dev` : `prd`;
|
|
13
|
+
const shipmentCompletePath = sftp_const_1.COMPLETEDATAPATH;
|
|
13
14
|
const backupPath = `${sftp_const_1.BACKUPPATH}${platform}/${folderType}`;
|
|
14
15
|
let responseFilePattern = JSON.parse(sftp.responseFilePattern);
|
|
15
16
|
const { suffix, fileExtension, runningNumberDigit, sequence } = responseFilePattern;
|
|
@@ -22,6 +23,7 @@ function createShipment() {
|
|
|
22
23
|
title += newSequence;
|
|
23
24
|
title += warehouseNumber ? `_` + warehouseNumber : ``;
|
|
24
25
|
title += fileExtension ? `.` + fileExtension : ``;
|
|
26
|
+
let backupTitle = releaseGood.refNo + '_' + title;
|
|
25
27
|
const orderNoColumn = 15;
|
|
26
28
|
const shipmentColumn = 27;
|
|
27
29
|
const trackingNoColumn = 20;
|
|
@@ -66,8 +68,8 @@ function createShipment() {
|
|
|
66
68
|
content += orderedQty + pickedQty + '\n';
|
|
67
69
|
}
|
|
68
70
|
return {
|
|
69
|
-
resource: { folderPath, folderType },
|
|
70
|
-
payload: { title, content, sftp, backupPath }
|
|
71
|
+
resource: { folderPath, folderType, shipmentCompletePath },
|
|
72
|
+
payload: { title, backupTitle, content, sftp, backupPath }
|
|
71
73
|
};
|
|
72
74
|
},
|
|
73
75
|
normalize(res) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"create-shipment.js","sourceRoot":"","sources":["../../../../server/controllers/herbalife/apis/create-shipment.ts"],"names":[],"mappings":";;;AAAA,
|
|
1
|
+
{"version":3,"file":"create-shipment.js","sourceRoot":"","sources":["../../../../server/controllers/herbalife/apis/create-shipment.ts"],"names":[],"mappings":";;;AAAA,oDAAkE;AAElE,SAAgB,cAAc;IAC5B,OAAO;QACL,MAAM,EAAE,MAAM;QACd,IAAI,EAAE,iDAAiD;QACvD,WAAW,CAAC,GAAG;YACb,IAAI,EAAE,WAAW,EAAE,gBAAgB,EAAE,IAAI,EAAE,GAAG,GAAG,CAAA;YACjD,IAAI,EAAE,UAAU,EAAE,QAAQ,EAAE,GAAG,IAAI,CAAA;YACnC,MAAM,UAAU,GAAW,IAAI,CAAC,aAAa,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,KAAK,CAAA;YAC7D,MAAM,oBAAoB,GAAW,6BAAgB,CAAA;YACrD,MAAM,UAAU,GAAW,GAAG,uBAAU,GAAG,QAAQ,IAAI,UAAU,EAAE,CAAA;YAEnE,IAAI,mBAAmB,GAAQ,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,mB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AW,EAAE,CAAC,EAAE,EAAE;oBACpC,OAAO,IAAI,GAAG,CAAA;iBACf;gBACD,MAAM,GAAG,GAAG,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,CAAC,EAAE,GAAG,CAAC,CAAA;gBAC/C,MAAM,WAAW,GAAW,GAAG,CAAC,SAAS,CAAC,CAAC,EAAE,CAAC,CAAC,CAAA;gBAC/C,OAAO,IAAI,GAAG,GAAG,QAAQ,GAAG,WAAW,CAAA;gBACvC,IAAI,sBAAsB,GAAG,CAAC,GAAG,WAAW,CAAC,MAAM,CAAA;gBACnD,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,sBAAsB,EAAE,CAAC,EAAE,EAAE;oBAC/C,OAAO,IAAI,GAAG,CAAA;iBACf;gBACD,MAAM,UAAU,GAAG,cAAc,CAAC,UAAU,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,CAAC,EAAE,GAAG,CAAC,CAAA;gBACxE,MAAM,SAAS,GAAG,cAAc,CAAC,SAAS,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,CAAC,EAAE,GAAG,CAAC,CAAA;gBACtE,OAAO,IAAI,UAAU,GAAG,SAAS,GAAG,IAAI,CAAA;aACzC;YAED,OAAO;gBACL,QAAQ,EAAE,EAAE,UAAU,EAAE,UAAU,EAAE,oBAAoB,EAAE;gBAC1D,OAAO,EAAE,EAAE,KAAK,EAAE,WAAW,EAAE,OAAO,EAAE,IAAI,EAAE,UAAU,EAAE;aAC3D,CAAA;QACH,CAAC;QACD,SAAS,CAAC,GAAG;YACX,OAAO,GAAG,CAAA;QACZ,CAAC;KACF,CAAA;AACH,CAAC;AApFD,wCAoFC"}
|
|
@@ -17,7 +17,7 @@ class Herbalife {
|
|
|
17
17
|
return result;
|
|
18
18
|
}
|
|
19
19
|
async post(path, data = {}) {
|
|
20
|
-
const { title, content, sftp, backupPath } = data;
|
|
20
|
+
const { title, backupTitle, content, sftp, backupPath } = data;
|
|
21
21
|
let params = [
|
|
22
22
|
{
|
|
23
23
|
title,
|
|
@@ -27,7 +27,7 @@ class Herbalife {
|
|
|
27
27
|
];
|
|
28
28
|
if (backupPath) {
|
|
29
29
|
params.push({
|
|
30
|
-
title,
|
|
30
|
+
title: backupTitle,
|
|
31
31
|
uploadPath: backupPath,
|
|
32
32
|
content
|
|
33
33
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"herbalife.js","sourceRoot":"","sources":["../../../server/controllers/herbalife/herbalife.ts"],"names":[],"mappings":";;;AAAA,yBAAsB;AAEtB,mCAA+B;AAG/B,iDAAkD;AAClD,8DAAyD;AAEzD,MAAM,KAAK,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC,2CAA2C,CAAC,CAAA;AAI3E,MAAa,SAAS;IACpB,gBAAe,CAAC;IAEhB,KAAK,CAAC,GAAG,CAAC,IAAY,EAAE,OAAY,EAAE;QACpC,MAAM,UAAU,GAAQ,MAAM,4BAAe,CAAC,QAAQ,CAAC,IAAI,EAAE,OAAO,CAAC,CAAA;QACrE,MAAM,IAAI,GAAQ,IAAA,eAAM,EAAC,UAAU,EAAE;YACnC,OAAO,EAAE,IAAI;SACd,CAAC,CAAA;QACF,MAAM,MAAM,qBAAa,IAAI,CAAE,CAAA;QAC/B,OAAO,MAAM,CAAA;IACf,CAAC;IAED,KAAK,CAAC,IAAI,CAAC,IAAY,EAAE,OAAY,EAAE;QACrC,MAAM,
|
|
1
|
+
{"version":3,"file":"herbalife.js","sourceRoot":"","sources":["../../../server/controllers/herbalife/herbalife.ts"],"names":[],"mappings":";;;AAAA,yBAAsB;AAEtB,mCAA+B;AAG/B,iDAAkD;AAClD,8DAAyD;AAEzD,MAAM,KAAK,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC,2CAA2C,CAAC,CAAA;AAI3E,MAAa,SAAS;IACpB,gBAAe,CAAC;IAEhB,KAAK,CAAC,GAAG,CAAC,IAAY,EAAE,OAAY,EAAE;QACpC,MAAM,UAAU,GAAQ,MAAM,4BAAe,CAAC,QAAQ,CAAC,IAAI,EAAE,OAAO,CAAC,CAAA;QACrE,MAAM,IAAI,GAAQ,IAAA,eAAM,EAAC,UAAU,EAAE;YACnC,OAAO,EAAE,IAAI;SACd,CAAC,CAAA;QACF,MAAM,MAAM,qBAAa,IAAI,CAAE,CAAA;QAC/B,OAAO,MAAM,CAAA;IACf,CAAC;IAED,KAAK,CAAC,IAAI,CAAC,IAAY,EAAE,OAAY,EAAE;QACrC,MAAM,EACJ,KAAK,EACL,WAAW,EACX,OAAO,EACP,IAAI,EACJ,UAAU,EACX,GAA4F,IAAI,CAAA;QAEjG,IAAI,MAAM,GAAU;YAClB;gBACE,KAAK;gBACL,UAAU,EAAE,IAAI;gBAChB,OAAO;aACR;SACF,CAAA;QAED,IAAI,UAAU,EAAE;YACd,MAAM,CAAC,IAAI,CAAC;gBACV,KAAK,EAAE,WAAW;gBAClB,UAAU,EAAE,UAAU;gBACtB,OAAO;aACR,CAAC,CAAA;SACH;QACD,MAAM,IAAA,8BAAa,EAAC,MAAM,CAAC,CAAA;QAE3B,OAAO,IAAI,CAAA;IACb,CAAC;CACF;AAxCD,8BAwCC"}
|
|
@@ -81,63 +81,72 @@ let SftpMutation = class SftpMutation {
|
|
|
81
81
|
return true;
|
|
82
82
|
}
|
|
83
83
|
async syncSftpOrders(customerDomainId, context) {
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
84
|
+
await (0, typeorm_1.getConnection)().transaction(async (tx) => {
|
|
85
|
+
var e_1, _a;
|
|
86
|
+
const customerDomain = await tx.getRepository(shell_1.Domain).findOne(customerDomainId);
|
|
87
|
+
const customerBizplace = await tx.getRepository(biz_base_1.Bizplace).findOne({
|
|
88
|
+
where: { domain: customerDomain }
|
|
89
|
+
});
|
|
90
|
+
const customerBizplaceId = customerBizplace.id;
|
|
91
|
+
const sftpUsers = await tx.getRepository(sftp_1.Sftp).find({
|
|
92
|
+
where: { domain: customerDomain, status: 'ACTIVE' },
|
|
93
|
+
relations: ['fulfillmentCenter']
|
|
94
|
+
});
|
|
95
|
+
for (var i = 0; i < sftpUsers.length; i++) {
|
|
96
|
+
const sftpUser = sftpUsers[i];
|
|
97
|
+
const fulfilmentCenter = sftpUser.fulfillmentCenter;
|
|
98
|
+
const isDevelopment = sftpUser.isDevelopment;
|
|
99
|
+
const folderPath = sftpUser.folderPath;
|
|
100
|
+
const folderType = isDevelopment ? 'dev' : 'prd';
|
|
101
|
+
let initialDataPath = `${sftpUser.folderPath}/${folderType}${sftp_const_1.SUBMITDATAPATH}/`;
|
|
102
|
+
const results = await (0, util_1.getPermittedDirectories)({ path: initialDataPath }, context);
|
|
103
|
+
const filesDirectories = results.filter(result => result.Size > 0);
|
|
104
|
+
try {
|
|
105
|
+
for (var filesDirectories_1 = (e_1 = void 0, __asyncValues(filesDirectories)), filesDirectories_1_1; filesDirectories_1_1 = await filesDirectories_1.next(), !filesDirectories_1_1.done;) {
|
|
106
|
+
let fileDirectory = filesDirectories_1_1.value;
|
|
107
|
+
let dataPath = `${sftpUser.folderPath}/${folderType}${sftp_const_1.SUBMITDATAPATH}/`;
|
|
108
|
+
let successPath = `${sftpUser.folderPath}/${folderType}${sftp_const_1.SUCCESSDATAPATH}/`;
|
|
109
|
+
let failedPath = `${sftpUser.folderPath}/${folderType}${sftp_const_1.FAILEDDATAPATH}/`;
|
|
110
|
+
const fileKey = fileDirectory.Key;
|
|
111
|
+
const lastSlashIdx = fileKey.lastIndexOf('/');
|
|
112
|
+
const fileString = fileKey.substring(lastSlashIdx + 1, fileKey.length);
|
|
113
|
+
try {
|
|
114
|
+
const sftp = sftpUser;
|
|
115
|
+
let result = await controllers_1.SftpAPI.getOutboundOrder(sftp, { folderPath, folderType, fileKey: fileString });
|
|
116
|
+
let isAccept = result.isAccept;
|
|
117
|
+
if (isAccept) {
|
|
118
|
+
delete result.isAccept;
|
|
119
|
+
if (result) {
|
|
120
|
+
let { items: releaseOrders } = await integration_fulfillment_1.FulfillmentAPI.getOutboundOrders(fulfilmentCenter, {
|
|
121
|
+
customerBizplaceId,
|
|
122
|
+
refNo: result.refNo
|
|
123
|
+
});
|
|
124
|
+
if (releaseOrders) {
|
|
125
|
+
result.collectionOrderNo = result.collectionOrderNo + ' - ' + (releaseOrders.length + 1);
|
|
126
|
+
}
|
|
127
|
+
result.requiredDraft = false;
|
|
128
|
+
const releaseOrder = await integration_fulfillment_1.FulfillmentAPI.createOutboundOrder(fulfilmentCenter, {
|
|
129
|
+
customerBizplaceId,
|
|
130
|
+
releaseOrder: result
|
|
131
|
+
});
|
|
132
|
+
if (releaseOrder) {
|
|
133
|
+
let movePaths = {
|
|
134
|
+
source: (dataPath += fileString),
|
|
135
|
+
destination: (successPath += fileString)
|
|
136
|
+
};
|
|
137
|
+
await sftp_const_1.SFTPFILESTORAGE.moveFile(movePaths);
|
|
138
|
+
}
|
|
137
139
|
}
|
|
138
140
|
}
|
|
141
|
+
else {
|
|
142
|
+
let movePaths = {
|
|
143
|
+
source: (dataPath += fileString),
|
|
144
|
+
destination: (failedPath += fileString)
|
|
145
|
+
};
|
|
146
|
+
await sftp_const_1.SFTPFILESTORAGE.moveFile(movePaths);
|
|
147
|
+
}
|
|
139
148
|
}
|
|
140
|
-
|
|
149
|
+
catch (e) {
|
|
141
150
|
let movePaths = {
|
|
142
151
|
source: (dataPath += fileString),
|
|
143
152
|
destination: (failedPath += fileString)
|
|
@@ -145,23 +154,16 @@ let SftpMutation = class SftpMutation {
|
|
|
145
154
|
await sftp_const_1.SFTPFILESTORAGE.moveFile(movePaths);
|
|
146
155
|
}
|
|
147
156
|
}
|
|
148
|
-
catch (e) {
|
|
149
|
-
let movePaths = {
|
|
150
|
-
source: (dataPath += fileString),
|
|
151
|
-
destination: (failedPath += fileString)
|
|
152
|
-
};
|
|
153
|
-
await sftp_const_1.SFTPFILESTORAGE.moveFile(movePaths);
|
|
154
|
-
}
|
|
155
157
|
}
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
158
|
+
catch (e_1_1) { e_1 = { error: e_1_1 }; }
|
|
159
|
+
finally {
|
|
160
|
+
try {
|
|
161
|
+
if (filesDirectories_1_1 && !filesDirectories_1_1.done && (_a = filesDirectories_1.return)) await _a.call(filesDirectories_1);
|
|
162
|
+
}
|
|
163
|
+
finally { if (e_1) throw e_1.error; }
|
|
161
164
|
}
|
|
162
|
-
finally { if (e_1) throw e_1.error; }
|
|
163
165
|
}
|
|
164
|
-
}
|
|
166
|
+
});
|
|
165
167
|
return true;
|
|
166
168
|
}
|
|
167
169
|
};
|
|
@@ -212,7 +214,6 @@ __decorate([
|
|
|
212
214
|
__metadata("design:returntype", Promise)
|
|
213
215
|
], SftpMutation.prototype, "deleteSftps", null);
|
|
214
216
|
__decorate([
|
|
215
|
-
(0, type_graphql_1.Directive)('@transaction'),
|
|
216
217
|
(0, type_graphql_1.Mutation)(returns => Boolean, { description: 'To sync all orders from sftp' }),
|
|
217
218
|
__param(0, (0, type_graphql_1.Arg)('customerDomainId', type => String)),
|
|
218
219
|
__param(1, (0, type_graphql_1.Ctx)()),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sftp-mutation.js","sourceRoot":"","sources":["../../../server/service/sftp/sftp-mutation.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;AAAA,yBAAsB;AAEtB,+CAAsE;AACtE,
|
|
1
|
+
{"version":3,"file":"sftp-mutation.js","sourceRoot":"","sources":["../../../server/service/sftp/sftp-mutation.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;AAAA,yBAAsB;AAEtB,+CAAsE;AACtE,qCAA0D;AAE1D,uDAAmD;AACnD,qFAA2F;AAC3F,iDAA8C;AAE9C,mDAA2C;AAC3C,iDAAmG;AACnG,qCAAoD;AACpD,iCAA6B;AAC7B,2CAAgD;AAGhD,IAAa,YAAY,GAAzB,MAAa,YAAY;IAGvB,KAAK,CAAC,UAAU,CAAc,IAAa,EAAS,OAAY;QAC9D,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,EAAE,EAAE,GAAG,OAAO,CAAC,KAAK,CAAA;QAE1C,OAAO,MAAM,EAAE,CAAC,aAAa,CAAC,WAAI,CAAC,CAAC,IAAI,iCACnC,IAAI,KACP,MAAM,EACN,OAAO,EAAE,IAAI,EACb,OAAO,EAAE,IAAI,IACb,CAAA;IACJ,CAAC;IAID,KAAK,CAAC,UAAU,CAAY,EAAU,EAAgB,KAAgB,EAAS,OAAY;QACzF,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,EAAE,EAAE,GAAG,OAAO,CAAC,KAAK,CAAA;QAE1C,MAAM,UAAU,GAAG,EAAE,CAAC,aAAa,CAAC,WAAI,CAAC,CAAA;QACzC,MAAM,IAAI,GAAG,MAAM,UAAU,CAAC,OAAO,CAAC;YACpC,KAAK,EAAE,EAAE,MAAM,EAAE,EAAE,EAAE;SACtB,CAAC,CAAA;QAEF,OAAO,MAAM,U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,CA4LxB;AA5LY,oCAAY"}
|
|
@@ -29,7 +29,7 @@ let SftpQuery = class SftpQuery {
|
|
|
29
29
|
}
|
|
30
30
|
async sftps(params, context) {
|
|
31
31
|
const { domain } = context.state;
|
|
32
|
-
const convertedParams = (0, shell_1.convertListParams)(params, domain
|
|
32
|
+
const convertedParams = (0, shell_1.convertListParams)(params, { domain });
|
|
33
33
|
const [items, total] = await (0, typeorm_1.getRepository)(sftp_1.Sftp).findAndCount(convertedParams);
|
|
34
34
|
return { items, total };
|
|
35
35
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sftp-query.js","sourceRoot":"","sources":["../../../server/service/sftp/sftp-query.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,+CAAmF;AACnF,qCAAuC;AAEvC,yDAAgD;AAChD,iDAA4E;AAE5E,iCAA6B;AAC7B,2CAAsC;AAGtC,IAAa,SAAS,GAAtB,MAAa,SAAS;IAEpB,KAAK,CAAC,IAAI,CAAY,EAAU,EAAS,OAAY;QACnD,MAAM,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC,KAAK,CAAA;QAEhC,OAAO,MAAM,IAAA,uBAAa,EAAC,WAAI,CAAC,CAAC,OAAO,CAAC;YACvC,KAAK,EAAE,EAAE,MAAM,EAAE,EAAE,EAAE;SACtB,CAAC,CAAA;IACJ,CAAC;IAGD,KAAK,CAAC,KAAK,CAAS,MAAiB,EAAS,OAAY;QACxD,MAAM,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC,KAAK,CAAA;QAEhC,MAAM,eAAe,GAAG,IAAA,yBAAiB,EAAC,MAAM,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"sftp-query.js","sourceRoot":"","sources":["../../../server/service/sftp/sftp-query.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,+CAAmF;AACnF,qCAAuC;AAEvC,yDAAgD;AAChD,iDAA4E;AAE5E,iCAA6B;AAC7B,2CAAsC;AAGtC,IAAa,S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,WAAA,IAAA,kBAAG,EAAC,IAAI,CAAC,CAAA;IAAc,WAAA,IAAA,kBAAG,GAAE,CAAA;;;;qCAMvC;AAGD;IADC,IAAA,oBAAK,EAAC,OAAO,CAAC,EAAE,CAAC,oBAAQ,EAAE,EAAE,WAAW,EAAE,yBAAyB,EAAE,CAAC;IAC1D,WAAA,IAAA,mBAAI,GAAE,CAAA;IAAqB,WAAA,IAAA,kBAAG,GAAE,CAAA;;yDAAjB,iBAAS,oBAAT,iBAAS;;sCAOpC;AAGD;IADC,IAAA,4BAAa,EAAC,IAAI,CAAC,EAAE,CAAC,cAAM,CAAC;IAChB,WAAA,IAAA,mBAAI,GAAE,CAAA;;qCAAO,WAAI;;uCAE9B;AAGD;IADC,IAAA,4BAAa,EAAC,IAAI,CAAC,EAAE,CAAC,gBAAI,CAAC;IACb,WAAA,IAAA,mBAAI,GAAE,CAAA;;qCAAO,WAAI;;wCAE/B;AAGD;IADC,IAAA,4BAAa,EAAC,IAAI,CAAC,EAAE,CAAC,gBAAI,CAAC;IACb,WAAA,IAAA,mBAAI,GAAE,CAAA;;qCAAO,WAAI;;wCAE/B;AAjCU,SAAS;IADrB,IAAA,uBAAQ,EAAC,WAAI,CAAC;GACF,SAAS,CAkCrB;AAlCY,8BAAS"}
|
|
@@ -22,6 +22,10 @@ __decorate([
|
|
|
22
22
|
(0, type_graphql_1.Field)({ nullable: true }),
|
|
23
23
|
__metadata("design:type", String)
|
|
24
24
|
], NewSftp.prototype, "description", void 0);
|
|
25
|
+
__decorate([
|
|
26
|
+
(0, type_graphql_1.Field)(type => sftp_1.SftpStatus, { nullable: true }),
|
|
27
|
+
__metadata("design:type", String)
|
|
28
|
+
], NewSftp.prototype, "status", void 0);
|
|
25
29
|
__decorate([
|
|
26
30
|
(0, type_graphql_1.Field)({ nullable: true }),
|
|
27
31
|
__metadata("design:type", String)
|
|
@@ -64,6 +68,10 @@ __decorate([
|
|
|
64
68
|
(0, type_graphql_1.Field)({ nullable: true }),
|
|
65
69
|
__metadata("design:type", String)
|
|
66
70
|
], SftpPatch.prototype, "description", void 0);
|
|
71
|
+
__decorate([
|
|
72
|
+
(0, type_graphql_1.Field)(type => sftp_1.SftpStatus, { nullable: true }),
|
|
73
|
+
__metadata("design:type", String)
|
|
74
|
+
], SftpPatch.prototype, "status", void 0);
|
|
67
75
|
__decorate([
|
|
68
76
|
(0, type_graphql_1.Field)({ nullable: true }),
|
|
69
77
|
__metadata("design:type", String)
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sftp-type.js","sourceRoot":"","sources":["../../../server/service/sftp/sftp-type.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,+CAAoE;AAEpE,
|
|
1
|
+
{"version":3,"file":"sftp-type.js","sourceRoot":"","sources":["../../../server/service/sftp/sftp-type.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,+CAAoE;AAEpE,iCAAyC;AAGzC,IAAa,OAAO,GAApB,MAAa,OAAO;CA2BnB,CAAA;AAzBC;IADC,IAAA,oBAAK,GAAE;;qCACI;AAGZ;IADC,IAAA,oBAAK,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;4CACN;AAGpB;IADC,IAAA,oBAAK,EAAC,IAAI,CAAC,EAAE,CAAC,iBAAU,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;uCAC3B;AAGnB;IADC,IAAA,oBAAK,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;yCACT;AAGjB;IADC,IAAA,oBAAK,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;0CACR;AAGlB;IADC,IAAA,oBAAK,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;2CACP;AAGnB;IADC,IAAA,oBAAK,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;2CACP;AAGnB;IADC,IAAA,oBAAK,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;8CACH;AAGvB;IADC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,EAAE,CAAC,CAAC,WAAI,CAAC,CAAC;;uCACT;AAGb;IADC,IAAA,oBAAK,EAAC,IAAI,CAAC,EAAE,CAAC,kBAAG,CAAC;;uCACN;AALF,QAAQ;IADpB,IAAA,yBAAU,GAAE;GACA,QAAQ,CAMpB;AANY,4BAAQ"}
|
|
@@ -10,12 +10,22 @@ var __metadata = (this && this.__metadata) || function (k, v) {
|
|
|
10
10
|
};
|
|
11
11
|
var _a, _b, _c, _d;
|
|
12
12
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
13
|
-
exports.Sftp = void 0;
|
|
13
|
+
exports.Sftp = exports.SftpStatus = void 0;
|
|
14
14
|
const type_graphql_1 = require("type-graphql");
|
|
15
15
|
const typeorm_1 = require("typeorm");
|
|
16
16
|
const auth_base_1 = require("@things-factory/auth-base");
|
|
17
17
|
const integration_fulfillment_1 = require("@things-factory/integration-fulfillment");
|
|
18
18
|
const shell_1 = require("@things-factory/shell");
|
|
19
|
+
var SftpStatus;
|
|
20
|
+
(function (SftpStatus) {
|
|
21
|
+
SftpStatus["ACTIVE"] = "ACTIVE";
|
|
22
|
+
SftpStatus["INACTIVE"] = "INACTIVE";
|
|
23
|
+
SftpStatus["TERMINATED"] = "TERMINATED";
|
|
24
|
+
})(SftpStatus = exports.SftpStatus || (exports.SftpStatus = {}));
|
|
25
|
+
(0, type_graphql_1.registerEnumType)(SftpStatus, {
|
|
26
|
+
name: 'SftpStatus',
|
|
27
|
+
description: 'state enumeration of a sftp'
|
|
28
|
+
});
|
|
19
29
|
let Sftp = class Sftp {
|
|
20
30
|
};
|
|
21
31
|
__decorate([
|
|
@@ -44,6 +54,11 @@ __decorate([
|
|
|
44
54
|
(0, type_graphql_1.Field)({ nullable: true }),
|
|
45
55
|
__metadata("design:type", String)
|
|
46
56
|
], Sftp.prototype, "description", void 0);
|
|
57
|
+
__decorate([
|
|
58
|
+
(0, typeorm_1.Column)({ nullable: true }),
|
|
59
|
+
(0, type_graphql_1.Field)({ nullable: true }),
|
|
60
|
+
__metadata("design:type", String)
|
|
61
|
+
], Sftp.prototype, "status", void 0);
|
|
47
62
|
__decorate([
|
|
48
63
|
(0, typeorm_1.Column)({
|
|
49
64
|
nullable: true
|
|
@@ -104,6 +119,13 @@ __decorate([
|
|
|
104
119
|
(0, type_graphql_1.Field)({ nullable: true }),
|
|
105
120
|
__metadata("design:type", String)
|
|
106
121
|
], Sftp.prototype, "responseFilePattern", void 0);
|
|
122
|
+
__decorate([
|
|
123
|
+
(0, typeorm_1.Column)({
|
|
124
|
+
nullable: true
|
|
125
|
+
}),
|
|
126
|
+
(0, type_graphql_1.Field)({ nullable: true }),
|
|
127
|
+
__metadata("design:type", String)
|
|
128
|
+
], Sftp.prototype, "responseFileTypes", void 0);
|
|
107
129
|
__decorate([
|
|
108
130
|
(0, typeorm_1.CreateDateColumn)(),
|
|
109
131
|
(0, type_graphql_1.Field)({ nullable: true }),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sftp.js","sourceRoot":"","sources":["../../../server/service/sftp/sftp.ts"],"names":[],"mappings":";;;;;;;;;;;;;AAAA,+
|
|
1
|
+
{"version":3,"file":"sftp.js","sourceRoot":"","sources":["../../../server/service/sftp/sftp.ts"],"names":[],"mappings":";;;;;;;;;;;;;AAAA,+CAAsE;AACtE,qCASgB;AAEhB,yDAAgD;AAChD,qFAA2E;AAC3E,iDAA8C;AAE9C,IAAY,UAIX;AAJD,WAAY,UAAU;IACpB,+BAAiB,CAAA;IACjB,mCAAqB,CAAA;IACrB,uCAAyB,CAAA;AAC3B,CAAC,EAJW,UAAU,GAAV,kBAAU,KAAV,kBAAU,QAIrB;AAED,IAAA,+BAAgB,EAAC,UAAU,EAAE;IAC3B,IAAI,EAAE,YAAY;IAClB,WAAW,EAAE,6BAA6B;CAC3C,CAAC,CAAA;AAKF,IAAa,IAAI,GAAjB,MAAa,IAAI;CA4GhB,CAAA;AAzGC;IAFC,IAAA,gCAAsB,EAAC,MAAM,CAAC;IAC9B,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A;AAGd;IADC,IAAA,oBAAU,EAAC,CAAC,IAAU,EAAE,EAAE,CAAC,IAAI,CAAC,OAAO,CAAC;;uCACvB;AAMlB;IAJC,IAAA,mBAAS,EAAC,IAAI,CAAC,EAAE,CAAC,gBAAI,EAAE;QACvB,QAAQ,EAAE,IAAI;KACf,CAAC;IACD,IAAA,oBAAK,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;kDAChB,gBAAI,oBAAJ,gBAAI;qCAAA;AAGd;IADC,IAAA,oBAAU,EAAC,CAAC,IAAU,EAAE,EAAE,CAAC,IAAI,CAAC,OAAO,CAAC;;uCACvB;AA3GP,IAAI;IAHhB,IAAA,gBAAM,GAAE;IACR,IAAA,eAAK,EAAC,WAAW,EAAE,CAAC,IAAU,EAAE,EAAE,CAAC,CAAC,IAAI,CAAC,MAAM,EAAE,IAAI,CAAC,IAAI,CAAC,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE,CAAC;IAC9E,IAAA,yBAAU,EAAC,EAAE,WAAW,EAAE,iBAAiB,EAAE,CAAC;GAClC,IAAI,CA4GhB;AA5GY,oBAAI"}
|
|
@@ -6,7 +6,7 @@ exports.SFTPFILESTORAGE = env_1.config.get('sftpFileStorage');
|
|
|
6
6
|
exports.SUBMITDATAPATH = '/sob/data';
|
|
7
7
|
exports.SUCCESSDATAPATH = '/sob/success';
|
|
8
8
|
exports.FAILEDDATAPATH = '/sob/failed';
|
|
9
|
-
exports.COMPLETEDATAPATH = '/oc/
|
|
9
|
+
exports.COMPLETEDATAPATH = '/oc/data01';
|
|
10
10
|
exports.COMPLETESUCCESSDATAPATH = '/oc/success';
|
|
11
11
|
exports.COMPLETEFAILEDDATAPATH = '/oc/failed';
|
|
12
12
|
exports.SNSUBMITDATAPATH = '/sn/data';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sftp-const.js","sourceRoot":"","sources":["../server/sftp-const.ts"],"names":[],"mappings":";;;AAAA,6CAA4C;AAEjC,QAAA,eAAe,GAAQ,YAAM,CAAC,GAAG,CAAC,iBAAiB,CAAC,CAAA;AACpD,QAAA,cAAc,GAAW,WAAW,CAAA;AACpC,QAAA,eAAe,GAAW,cAAc,CAAA;AACxC,QAAA,cAAc,GAAW,aAAa,CAAA;AACtC,QAAA,gBAAgB,GAAW,
|
|
1
|
+
{"version":3,"file":"sftp-const.js","sourceRoot":"","sources":["../server/sftp-const.ts"],"names":[],"mappings":";;;AAAA,6CAA4C;AAEjC,QAAA,eAAe,GAAQ,YAAM,CAAC,GAAG,CAAC,iBAAiB,CAAC,CAAA;AACpD,QAAA,cAAc,GAAW,WAAW,CAAA;AACpC,QAAA,eAAe,GAAW,cAAc,CAAA;AACxC,QAAA,cAAc,GAAW,aAAa,CAAA;AACtC,QAAA,gBAAgB,GAAW,YAAY,CAAA;AACvC,QAAA,uBAAuB,GAAW,aAAa,CAAA;AAC/C,QAAA,sBAAsB,GAAW,YAAY,CAAA;AAC7C,QAAA,gBAAgB,GAAW,UAAU,CAAA;AACrC,QAAA,iBAAiB,GAAW,aAAa,CAAA;AACzC,QAAA,gBAAgB,GAAW,YAAY,CAAA;AACvC,QAAA,UAAU,GAAW,WAAW,CAAA"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@things-factory/integration-sftp",
|
|
3
|
-
"version": "5.0.0-alpha.
|
|
3
|
+
"version": "5.0.0-alpha.52",
|
|
4
4
|
"main": "dist-server/index.js",
|
|
5
5
|
"browser": "client/index.js",
|
|
6
6
|
"things-factory": true,
|
|
@@ -24,13 +24,13 @@
|
|
|
24
24
|
"migration:create": "node ../../node_modules/typeorm/cli.js migration:create -d ./server/migrations"
|
|
25
25
|
},
|
|
26
26
|
"dependencies": {
|
|
27
|
-
"@things-factory/auth-base": "^5.0.0-alpha.
|
|
28
|
-
"@things-factory/biz-base": "^5.0.0-alpha.
|
|
29
|
-
"@things-factory/env": "^5.0.0-alpha.
|
|
30
|
-
"@things-factory/integration-fulfillment": "^5.0.0-alpha.
|
|
31
|
-
"@things-factory/shell": "^5.0.0-alpha.
|
|
27
|
+
"@things-factory/auth-base": "^5.0.0-alpha.52",
|
|
28
|
+
"@things-factory/biz-base": "^5.0.0-alpha.52",
|
|
29
|
+
"@things-factory/env": "^5.0.0-alpha.52",
|
|
30
|
+
"@things-factory/integration-fulfillment": "^5.0.0-alpha.52",
|
|
31
|
+
"@things-factory/shell": "^5.0.0-alpha.52",
|
|
32
32
|
"aws-sdk": "^2.960.0",
|
|
33
33
|
"xml-js": "^1.6.11"
|
|
34
34
|
},
|
|
35
|
-
"gitHead": "
|
|
35
|
+
"gitHead": "dd9c8f2e256e256e42bd9bd26db5eaa955f85620"
|
|
36
36
|
}
|
|
@@ -1,13 +1,14 @@
|
|
|
1
|
-
import { BACKUPPATH } from '../../../sftp-const'
|
|
1
|
+
import { BACKUPPATH, SNSUBMITDATAPATH } from '../../../sftp-const'
|
|
2
2
|
|
|
3
3
|
export function createSerialNumber() {
|
|
4
4
|
return {
|
|
5
5
|
method: 'post',
|
|
6
|
-
path: '{folderPath}/{folderType}
|
|
6
|
+
path: '{folderPath}/{folderType}{snPath}',
|
|
7
7
|
denormalize(req) {
|
|
8
8
|
let { releaseGood, inventoryItems, sftp } = req
|
|
9
9
|
let { folderPath, platform } = sftp
|
|
10
10
|
const folderType: string = sftp.isDevelopment ? `dev` : `prd`
|
|
11
|
+
const snPath: string = SNSUBMITDATAPATH
|
|
11
12
|
const backupPath: string = `${BACKUPPATH}${platform}/${folderType}`
|
|
12
13
|
|
|
13
14
|
let responseFilePattern: any = JSON.parse(sftp.responseFilePattern)
|
|
@@ -39,7 +40,7 @@ export function createSerialNumber() {
|
|
|
39
40
|
}
|
|
40
41
|
|
|
41
42
|
return {
|
|
42
|
-
resource: { folderPath, folderType },
|
|
43
|
+
resource: { folderPath, folderType, snPath },
|
|
43
44
|
payload: { title, content, sftp, backupPath }
|
|
44
45
|
}
|
|
45
46
|
},
|
|
@@ -1,13 +1,14 @@
|
|
|
1
|
-
import { BACKUPPATH } from '../../../sftp-const'
|
|
1
|
+
import { BACKUPPATH, COMPLETEDATAPATH } from '../../../sftp-const'
|
|
2
2
|
|
|
3
3
|
export function createShipment() {
|
|
4
4
|
return {
|
|
5
5
|
method: 'post',
|
|
6
|
-
path: '{folderPath}/{folderType}
|
|
6
|
+
path: '{folderPath}/{folderType}{shipmentCompletePath}',
|
|
7
7
|
denormalize(req) {
|
|
8
8
|
let { releaseGood, orderInventories, sftp } = req
|
|
9
9
|
let { folderPath, platform } = sftp
|
|
10
10
|
const folderType: string = sftp.isDevelopment ? `dev` : `prd`
|
|
11
|
+
const shipmentCompletePath: string = COMPLETEDATAPATH
|
|
11
12
|
const backupPath: string = `${BACKUPPATH}${platform}/${folderType}`
|
|
12
13
|
|
|
13
14
|
let responseFilePattern: any = JSON.parse(sftp.responseFilePattern)
|
|
@@ -26,6 +27,8 @@ export function createShipment() {
|
|
|
26
27
|
title += warehouseNumber ? `_` + warehouseNumber : ``
|
|
27
28
|
title += fileExtension ? `.` + fileExtension : ``
|
|
28
29
|
|
|
30
|
+
let backupTitle: string = releaseGood.refNo + '_' + title
|
|
31
|
+
|
|
29
32
|
const orderNoColumn: number = 15
|
|
30
33
|
const shipmentColumn: number = 27
|
|
31
34
|
const trackingNoColumn: number = 20
|
|
@@ -73,8 +76,8 @@ export function createShipment() {
|
|
|
73
76
|
}
|
|
74
77
|
|
|
75
78
|
return {
|
|
76
|
-
resource: { folderPath, folderType },
|
|
77
|
-
payload: { title, content, sftp, backupPath }
|
|
79
|
+
resource: { folderPath, folderType, shipmentCompletePath },
|
|
80
|
+
payload: { title, backupTitle, content, sftp, backupPath }
|
|
78
81
|
}
|
|
79
82
|
},
|
|
80
83
|
normalize(res) {
|
|
@@ -23,8 +23,13 @@ export class Herbalife {
|
|
|
23
23
|
}
|
|
24
24
|
|
|
25
25
|
async post(path: string, data: any = {}) {
|
|
26
|
-
const {
|
|
27
|
-
|
|
26
|
+
const {
|
|
27
|
+
title,
|
|
28
|
+
backupTitle,
|
|
29
|
+
content,
|
|
30
|
+
sftp,
|
|
31
|
+
backupPath
|
|
32
|
+
}: { title: string; backupTitle: string; content: string; sftp: Sftp; backupPath: string } = data
|
|
28
33
|
|
|
29
34
|
let params: any[] = [
|
|
30
35
|
{
|
|
@@ -36,7 +41,7 @@ export class Herbalife {
|
|
|
36
41
|
|
|
37
42
|
if (backupPath) {
|
|
38
43
|
params.push({
|
|
39
|
-
title,
|
|
44
|
+
title: backupTitle,
|
|
40
45
|
uploadPath: backupPath,
|
|
41
46
|
content
|
|
42
47
|
})
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import '../../sftp-s3'
|
|
2
2
|
|
|
3
3
|
import { Arg, Ctx, Directive, Mutation, Resolver } from 'type-graphql'
|
|
4
|
-
import { In } from 'typeorm'
|
|
4
|
+
import { EntityManager, getConnection, In } from 'typeorm'
|
|
5
5
|
|
|
6
6
|
import { Bizplace } from '@things-factory/biz-base'
|
|
7
7
|
import { FulfillmentAPI, FulFillmentCenter } from '@things-factory/integration-fulfillment'
|
|
@@ -113,91 +113,92 @@ export class SftpMutation {
|
|
|
113
113
|
return true
|
|
114
114
|
}
|
|
115
115
|
|
|
116
|
-
@Directive('@transaction')
|
|
117
116
|
@Mutation(returns => Boolean, { description: 'To sync all orders from sftp' })
|
|
118
117
|
async syncSftpOrders(
|
|
119
118
|
@Arg('customerDomainId', type => String) customerDomainId: string,
|
|
120
119
|
@Ctx() context: any
|
|
121
120
|
): Promise<boolean> {
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
121
|
+
await getConnection().transaction(async (tx: EntityManager) => {
|
|
122
|
+
const customerDomain: Domain = await tx.getRepository(Domain).findOne(customerDomainId)
|
|
123
|
+
|
|
124
|
+
const customerBizplace: Bizplace = await tx.getRepository(Bizplace).findOne({
|
|
125
|
+
where: { domain: customerDomain }
|
|
126
|
+
})
|
|
127
|
+
|
|
128
|
+
const customerBizplaceId: string = customerBizplace.id
|
|
129
|
+
|
|
130
|
+
const sftpUsers: Sftp[] = await tx.getRepository(Sftp).find({
|
|
131
|
+
where: { domain: customerDomain, status: 'ACTIVE' },
|
|
132
|
+
relations: ['fulfillmentCenter']
|
|
133
|
+
})
|
|
134
|
+
|
|
135
|
+
for (var i = 0; i < sftpUsers.length; i++) {
|
|
136
|
+
const sftpUser: Sftp = sftpUsers[i]
|
|
137
|
+
|
|
138
|
+
const fulfilmentCenter: FulFillmentCenter = sftpUser.fulfillmentCenter
|
|
139
|
+
const isDevelopment: boolean = sftpUser.isDevelopment
|
|
140
|
+
const folderPath: string = sftpUser.folderPath
|
|
141
|
+
const folderType: string = isDevelopment ? 'dev' : 'prd'
|
|
142
|
+
let initialDataPath: string = `${sftpUser.folderPath}/${folderType}${SUBMITDATAPATH}/`
|
|
143
|
+
const results: any[] = await getPermittedDirectories({ path: initialDataPath }, context)
|
|
144
|
+
const filesDirectories: any[] = results.filter(result => result.Size > 0)
|
|
145
|
+
|
|
146
|
+
for await (let fileDirectory of filesDirectories) {
|
|
147
|
+
let dataPath: string = `${sftpUser.folderPath}/${folderType}${SUBMITDATAPATH}/`
|
|
148
|
+
let successPath: string = `${sftpUser.folderPath}/${folderType}${SUCCESSDATAPATH}/`
|
|
149
|
+
let failedPath: string = `${sftpUser.folderPath}/${folderType}${FAILEDDATAPATH}/`
|
|
150
|
+
const fileKey: string = fileDirectory.Key
|
|
151
|
+
const lastSlashIdx = fileKey.lastIndexOf('/')
|
|
152
|
+
const fileString: string = fileKey.substring(lastSlashIdx + 1, fileKey.length)
|
|
153
|
+
try {
|
|
154
|
+
const sftp: any = sftpUser
|
|
155
|
+
let result: any = await SftpAPI.getOutboundOrder(sftp, { folderPath, folderType, fileKey: fileString })
|
|
156
|
+
let isAccept: boolean = result.isAccept
|
|
157
|
+
|
|
158
|
+
if (isAccept) {
|
|
159
|
+
delete result.isAccept
|
|
160
|
+
if (result) {
|
|
161
|
+
let { items: releaseOrders }: any = await FulfillmentAPI.getOutboundOrders(fulfilmentCenter, {
|
|
162
|
+
customerBizplaceId,
|
|
163
|
+
refNo: result.refNo
|
|
164
|
+
})
|
|
165
|
+
|
|
166
|
+
if (releaseOrders) {
|
|
167
|
+
result.collectionOrderNo = result.collectionOrderNo + ' - ' + (releaseOrders.length + 1)
|
|
168
|
+
}
|
|
136
169
|
|
|
137
|
-
|
|
138
|
-
const sftpUser: Sftp = sftpUsers[i]
|
|
139
|
-
|
|
140
|
-
const fulfilmentCenter: FulFillmentCenter = sftpUser.fulfillmentCenter
|
|
141
|
-
const isDevelopment: boolean = sftpUser.isDevelopment
|
|
142
|
-
const folderPath: string = sftpUser.folderPath
|
|
143
|
-
const folderType: string = isDevelopment ? 'dev' : 'prd'
|
|
144
|
-
let initialDataPath: string = `${sftpUser.folderPath}/${folderType}${SUBMITDATAPATH}/`
|
|
145
|
-
const results: any[] = await getPermittedDirectories({ path: initialDataPath }, context)
|
|
146
|
-
const filesDirectories: any[] = results.filter(result => result.Size > 0)
|
|
147
|
-
|
|
148
|
-
for await (let fileDirectory of filesDirectories) {
|
|
149
|
-
let dataPath: string = `${sftpUser.folderPath}/${folderType}${SUBMITDATAPATH}/`
|
|
150
|
-
let successPath: string = `${sftpUser.folderPath}/${folderType}${SUCCESSDATAPATH}/`
|
|
151
|
-
let failedPath: string = `${sftpUser.folderPath}/${folderType}${FAILEDDATAPATH}/`
|
|
152
|
-
const fileKey: string = fileDirectory.Key
|
|
153
|
-
const lastSlashIdx = fileKey.lastIndexOf('/')
|
|
154
|
-
const fileString: string = fileKey.substring(lastSlashIdx + 1, fileKey.length)
|
|
155
|
-
try {
|
|
156
|
-
const sftp: any = sftpUser
|
|
157
|
-
let result: any = await SftpAPI.getOutboundOrder(sftp, { folderPath, folderType, fileKey: fileString })
|
|
158
|
-
let isAccept: boolean = result.isAccept
|
|
159
|
-
|
|
160
|
-
if (isAccept) {
|
|
161
|
-
delete result.isAccept
|
|
162
|
-
if (result) {
|
|
163
|
-
let { items: releaseOrders }: any = await FulfillmentAPI.getOutboundOrders(fulfilmentCenter, {
|
|
164
|
-
customerBizplaceId,
|
|
165
|
-
refNo: result.refNo
|
|
166
|
-
})
|
|
167
|
-
|
|
168
|
-
if (releaseOrders) {
|
|
169
|
-
result.collectionOrderNo = result.collectionOrderNo + ' - ' + (releaseOrders.length + 1)
|
|
170
|
-
}
|
|
170
|
+
result.requiredDraft = false
|
|
171
171
|
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
172
|
+
const releaseOrder: any = await FulfillmentAPI.createOutboundOrder(fulfilmentCenter, {
|
|
173
|
+
customerBizplaceId,
|
|
174
|
+
releaseOrder: result
|
|
175
|
+
})
|
|
176
176
|
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
177
|
+
if (releaseOrder) {
|
|
178
|
+
let movePaths = {
|
|
179
|
+
source: (dataPath += fileString),
|
|
180
|
+
destination: (successPath += fileString)
|
|
181
|
+
}
|
|
182
|
+
await SFTPFILESTORAGE.moveFile(movePaths)
|
|
181
183
|
}
|
|
182
|
-
await SFTPFILESTORAGE.moveFile(movePaths)
|
|
183
184
|
}
|
|
185
|
+
} else {
|
|
186
|
+
let movePaths = {
|
|
187
|
+
source: (dataPath += fileString),
|
|
188
|
+
destination: (failedPath += fileString)
|
|
189
|
+
}
|
|
190
|
+
await SFTPFILESTORAGE.moveFile(movePaths)
|
|
184
191
|
}
|
|
185
|
-
}
|
|
192
|
+
} catch (e) {
|
|
186
193
|
let movePaths = {
|
|
187
194
|
source: (dataPath += fileString),
|
|
188
195
|
destination: (failedPath += fileString)
|
|
189
196
|
}
|
|
190
197
|
await SFTPFILESTORAGE.moveFile(movePaths)
|
|
191
198
|
}
|
|
192
|
-
} catch (e) {
|
|
193
|
-
let movePaths = {
|
|
194
|
-
source: (dataPath += fileString),
|
|
195
|
-
destination: (failedPath += fileString)
|
|
196
|
-
}
|
|
197
|
-
await SFTPFILESTORAGE.moveFile(movePaths)
|
|
198
199
|
}
|
|
199
200
|
}
|
|
200
|
-
}
|
|
201
|
+
})
|
|
201
202
|
|
|
202
203
|
return true
|
|
203
204
|
}
|
|
@@ -22,7 +22,7 @@ export class SftpQuery {
|
|
|
22
22
|
async sftps(@Args() params: ListParam, @Ctx() context: any): Promise<SftpList> {
|
|
23
23
|
const { domain } = context.state
|
|
24
24
|
|
|
25
|
-
const convertedParams = convertListParams(params, domain
|
|
25
|
+
const convertedParams = convertListParams(params, { domain })
|
|
26
26
|
const [items, total] = await getRepository(Sftp).findAndCount(convertedParams)
|
|
27
27
|
|
|
28
28
|
return { items, total }
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Field, ID, InputType, Int, ObjectType } from 'type-graphql'
|
|
2
2
|
|
|
3
|
-
import { Sftp } from './sftp'
|
|
3
|
+
import { Sftp, SftpStatus } from './sftp'
|
|
4
4
|
|
|
5
5
|
@InputType()
|
|
6
6
|
export class NewSftp {
|
|
@@ -10,6 +10,9 @@ export class NewSftp {
|
|
|
10
10
|
@Field({ nullable: true })
|
|
11
11
|
description?: string
|
|
12
12
|
|
|
13
|
+
@Field(type => SftpStatus, { nullable: true })
|
|
14
|
+
status?: SftpStatus
|
|
15
|
+
|
|
13
16
|
@Field({ nullable: true })
|
|
14
17
|
username?: string
|
|
15
18
|
|
|
@@ -40,6 +43,9 @@ export class SftpPatch {
|
|
|
40
43
|
@Field({ nullable: true })
|
|
41
44
|
description?: string
|
|
42
45
|
|
|
46
|
+
@Field(type => SftpStatus, { nullable: true })
|
|
47
|
+
status?: SftpStatus
|
|
48
|
+
|
|
43
49
|
@Field({ nullable: true })
|
|
44
50
|
username?: string
|
|
45
51
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Field, ID, ObjectType } from 'type-graphql'
|
|
1
|
+
import { Field, ID, ObjectType, registerEnumType } from 'type-graphql'
|
|
2
2
|
import {
|
|
3
3
|
Column,
|
|
4
4
|
CreateDateColumn,
|
|
@@ -14,6 +14,17 @@ import { User } from '@things-factory/auth-base'
|
|
|
14
14
|
import { FulfillmentCenter } from '@things-factory/integration-fulfillment'
|
|
15
15
|
import { Domain } from '@things-factory/shell'
|
|
16
16
|
|
|
17
|
+
export enum SftpStatus {
|
|
18
|
+
ACTIVE = 'ACTIVE',
|
|
19
|
+
INACTIVE = 'INACTIVE',
|
|
20
|
+
TERMINATED = 'TERMINATED'
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
registerEnumType(SftpStatus, {
|
|
24
|
+
name: 'SftpStatus',
|
|
25
|
+
description: 'state enumeration of a sftp'
|
|
26
|
+
})
|
|
27
|
+
|
|
17
28
|
@Entity()
|
|
18
29
|
@Index('ix_sftp_0', (sftp: Sftp) => [sftp.domain, sftp.name], { unique: true })
|
|
19
30
|
@ObjectType({ description: 'Entity for Sftp' })
|
|
@@ -39,6 +50,10 @@ export class Sftp {
|
|
|
39
50
|
@Field({ nullable: true })
|
|
40
51
|
description?: string
|
|
41
52
|
|
|
53
|
+
@Column({ nullable: true })
|
|
54
|
+
@Field({ nullable: true })
|
|
55
|
+
status?: SftpStatus
|
|
56
|
+
|
|
42
57
|
@Column({
|
|
43
58
|
nullable: true
|
|
44
59
|
})
|
|
@@ -90,6 +105,12 @@ export class Sftp {
|
|
|
90
105
|
@Field({ nullable: true })
|
|
91
106
|
responseFilePattern: string
|
|
92
107
|
|
|
108
|
+
@Column({
|
|
109
|
+
nullable: true
|
|
110
|
+
})
|
|
111
|
+
@Field({ nullable: true })
|
|
112
|
+
responseFileTypes: string
|
|
113
|
+
|
|
93
114
|
@CreateDateColumn()
|
|
94
115
|
@Field({ nullable: true })
|
|
95
116
|
createdAt?: Date
|
package/server/sftp-const.ts
CHANGED
|
@@ -4,7 +4,7 @@ export var SFTPFILESTORAGE: any = config.get('sftpFileStorage')
|
|
|
4
4
|
export var SUBMITDATAPATH: string = '/sob/data'
|
|
5
5
|
export var SUCCESSDATAPATH: string = '/sob/success'
|
|
6
6
|
export var FAILEDDATAPATH: string = '/sob/failed'
|
|
7
|
-
export var COMPLETEDATAPATH: string = '/oc/
|
|
7
|
+
export var COMPLETEDATAPATH: string = '/oc/data01'
|
|
8
8
|
export var COMPLETESUCCESSDATAPATH: string = '/oc/success'
|
|
9
9
|
export var COMPLETEFAILEDDATAPATH: string = '/oc/failed'
|
|
10
10
|
export var SNSUBMITDATAPATH: string = '/sn/data'
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.generateFile = void 0;
|
|
4
|
-
require("../sftp-s3");
|
|
5
|
-
const sftp_const_1 = require("../sftp-const");
|
|
6
|
-
const fs = require('fs');
|
|
7
|
-
async function generateFile(params) {
|
|
8
|
-
const { uploadPath, content, title } = params;
|
|
9
|
-
const fileDirectory = './uploaded-files';
|
|
10
|
-
if (!fs.existsSync(fileDirectory)) {
|
|
11
|
-
fs.mkdirSync(fileDirectory);
|
|
12
|
-
}
|
|
13
|
-
const filePath = fileDirectory + '/' + title;
|
|
14
|
-
fs.writeFile(filePath, content, function (err) {
|
|
15
|
-
if (err)
|
|
16
|
-
throw err;
|
|
17
|
-
console.log('File is created successfully.');
|
|
18
|
-
});
|
|
19
|
-
if (uploadPath) {
|
|
20
|
-
const stream = fs.createReadStream(filePath);
|
|
21
|
-
await sftp_const_1.SFTPFILESTORAGE.uploadFile({ stream, filename: title, uploadPath });
|
|
22
|
-
}
|
|
23
|
-
fs.rmdirSync(fileDirectory, { recursive: true });
|
|
24
|
-
return true;
|
|
25
|
-
}
|
|
26
|
-
exports.generateFile = generateFile;
|
|
27
|
-
//# sourceMappingURL=generate-file.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"generate-file.js","sourceRoot":"","sources":["../../server/util/generate-file.ts"],"names":[],"mappings":";;;AAAA,sBAAmB;AAEnB,8CAA+C;AAE/C,MAAM,EAAE,GAAG,OAAO,CAAC,IAAI,CAAC,CAAA;AAEjB,KAAK,UAAU,YAAY,CAAC,MAAW;IAC5C,MAAM,EAAE,UAAU,EAAE,OAAO,EAAE,KAAK,EAAE,GAAG,MAAM,CAAA;IAC7C,MAAM,aAAa,GAAG,kBAAkB,CAAA;IAExC,IAAI,CAAC,EAAE,CAAC,UAAU,CAAC,aAAa,CAAC,EAAE;QACjC,EAAE,CAAC,SAAS,CAAC,aAAa,CAAC,CAAA;KAC5B;IAED,MAAM,QAAQ,GAAG,aAAa,GAAG,GAAG,GAAG,KAAK,CAAA;IAE5C,EAAE,CAAC,SAAS,CAAC,QAAQ,EAAE,OAAO,EAAE,UAAU,GAAG;QAC3C,IAAI,GAAG;YAAE,MAAM,GAAG,CAAA;QAClB,OAAO,CAAC,GAAG,CAAC,+BAA+B,CAAC,CAAA;IAC9C,CAAC,CAAC,CAAA;IAEF,IAAI,UAAU,EAAE;QACd,MAAM,MAAM,GAAG,EAAE,CAAC,gBAAgB,CAAC,QAAQ,CAAC,CAAA;QAC5C,MAAM,4BAAe,CAAC,UAAU,CAAC,EAAE,MAAM,EAAE,QAAQ,EAAE,KAAK,EAAE,UAAU,EAAE,CAAC,CAAA;KAC1E;IAED,EAAE,CAAC,SAAS,CAAC,aAAa,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,CAAA;IAEhD,OAAO,IAAI,CAAA;AACb,CAAC;AAvBD,oCAuBC"}
|