@chevre/domain 20.2.0-alpha.20 → 20.2.0-alpha.22
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/example/src/chevre/aggregation/aggregateSystem.ts +10 -8
- package/lib/chevre/repo/aggregation.d.ts +5 -0
- package/lib/chevre/repo/reservation.d.ts +0 -6
- package/lib/chevre/repo/reservation.js +42 -37
- package/lib/chevre/repo/task.d.ts +3 -3
- package/lib/chevre/repo/task.js +22 -27
- package/lib/chevre/repo/transaction.d.ts +2 -1
- package/lib/chevre/repo/transaction.js +9 -1
- package/lib/chevre/service/aggregation/system.d.ts +1 -0
- package/lib/chevre/service/aggregation/system.js +16 -1
- package/lib/chevre/service/assetTransaction/reserve/factory.js +4 -1
- package/lib/chevre/service/reserve/confirmReservation.js +7 -10
- package/lib/chevre/service/task.js +6 -9
- package/package.json +2 -2
|
@@ -6,6 +6,7 @@ import { chevre } from '../../../../lib/index';
|
|
|
6
6
|
// const project = { id: <string>process.env.PROJECT_ID };
|
|
7
7
|
const EXCLUDED_PROJECT_ID = process.env.EXCLUDED_PROJECT_ID;
|
|
8
8
|
const AGGREGATE_DAYS = Number(process.env.AGGREGATE_DAYS);
|
|
9
|
+
const AGGREGATE_CLIENT_IDS = (typeof process.env.AGGREGATE_CLIENT_IDS === 'string') ? process.env.AGGREGATE_CLIENT_IDS.split(',') : [];
|
|
9
10
|
|
|
10
11
|
async function main() {
|
|
11
12
|
await mongoose.connect(<string>process.env.MONGOLAB_URI, { autoIndex: false });
|
|
@@ -16,15 +17,16 @@ async function main() {
|
|
|
16
17
|
const orderRepo = new chevre.repository.Order(mongoose.connection);
|
|
17
18
|
const actionRepo = new chevre.repository.Action(mongoose.connection);
|
|
18
19
|
|
|
19
|
-
await chevre.service.aggregation.system.
|
|
20
|
+
await chevre.service.aggregation.system.aggregatePlaceOrder({
|
|
20
21
|
aggregationDays: AGGREGATE_DAYS,
|
|
21
|
-
excludedProjectId: EXCLUDED_PROJECT_ID
|
|
22
|
+
excludedProjectId: EXCLUDED_PROJECT_ID,
|
|
23
|
+
clientIds: AGGREGATE_CLIENT_IDS
|
|
22
24
|
})({
|
|
23
25
|
agregation: aggregationRepo,
|
|
24
|
-
|
|
26
|
+
transaction: transactionRepo
|
|
25
27
|
});
|
|
26
28
|
|
|
27
|
-
await chevre.service.aggregation.system.
|
|
29
|
+
await chevre.service.aggregation.system.aggregateAuthorizeOrderAction({
|
|
28
30
|
aggregationDays: AGGREGATE_DAYS,
|
|
29
31
|
excludedProjectId: EXCLUDED_PROJECT_ID
|
|
30
32
|
})({
|
|
@@ -32,7 +34,7 @@ async function main() {
|
|
|
32
34
|
action: actionRepo
|
|
33
35
|
});
|
|
34
36
|
|
|
35
|
-
await chevre.service.aggregation.system.
|
|
37
|
+
await chevre.service.aggregation.system.aggregateAuthorizeEventServiceOfferAction({
|
|
36
38
|
aggregationDays: AGGREGATE_DAYS,
|
|
37
39
|
excludedProjectId: EXCLUDED_PROJECT_ID
|
|
38
40
|
})({
|
|
@@ -40,7 +42,7 @@ async function main() {
|
|
|
40
42
|
action: actionRepo
|
|
41
43
|
});
|
|
42
44
|
|
|
43
|
-
await chevre.service.aggregation.system.
|
|
45
|
+
await chevre.service.aggregation.system.aggregateAuthorizePaymentAction({
|
|
44
46
|
aggregationDays: AGGREGATE_DAYS,
|
|
45
47
|
excludedProjectId: EXCLUDED_PROJECT_ID
|
|
46
48
|
})({
|
|
@@ -48,12 +50,12 @@ async function main() {
|
|
|
48
50
|
action: actionRepo
|
|
49
51
|
});
|
|
50
52
|
|
|
51
|
-
await chevre.service.aggregation.system.
|
|
53
|
+
await chevre.service.aggregation.system.aggregateUseAction({
|
|
52
54
|
aggregationDays: AGGREGATE_DAYS,
|
|
53
55
|
excludedProjectId: EXCLUDED_PROJECT_ID
|
|
54
56
|
})({
|
|
55
57
|
agregation: aggregationRepo,
|
|
56
|
-
|
|
58
|
+
action: actionRepo
|
|
57
59
|
});
|
|
58
60
|
|
|
59
61
|
await chevre.service.aggregation.system.aggregateOrder({
|
|
@@ -9,6 +9,10 @@ export declare enum AggregationType {
|
|
|
9
9
|
AggregateReservation = "AggregateReservation",
|
|
10
10
|
AggregateUseAction = "AggregateUseAction"
|
|
11
11
|
}
|
|
12
|
+
export interface IAggregationByClient {
|
|
13
|
+
clientId: string;
|
|
14
|
+
aggregation: any;
|
|
15
|
+
}
|
|
12
16
|
export interface IAggregation {
|
|
13
17
|
typeOf: AggregationType;
|
|
14
18
|
project: {
|
|
@@ -18,6 +22,7 @@ export interface IAggregation {
|
|
|
18
22
|
aggregateDate: Date;
|
|
19
23
|
aggregateDuration: string;
|
|
20
24
|
aggregateStart: Date;
|
|
25
|
+
aggregationByClient?: IAggregationByClient[];
|
|
21
26
|
}
|
|
22
27
|
/**
|
|
23
28
|
* 集計リポジトリ
|
|
@@ -30,12 +30,6 @@ export declare class MongoRepository {
|
|
|
30
30
|
/**
|
|
31
31
|
* 予約確定
|
|
32
32
|
*/
|
|
33
|
-
confirm<T extends factory.reservationType>(params: {
|
|
34
|
-
id: string;
|
|
35
|
-
previousReservationStatus: factory.reservationStatusType;
|
|
36
|
-
underName?: factory.reservation.IUnderName<T>;
|
|
37
|
-
reservedTicket?: factory.reservation.ITicket;
|
|
38
|
-
}): Promise<factory.reservation.IReservation<T>>;
|
|
39
33
|
confirmByReservationNumber(params: {
|
|
40
34
|
reservationNumber: string;
|
|
41
35
|
previousReservationStatus: factory.reservationStatusType;
|
|
@@ -915,49 +915,54 @@ class MongoRepository {
|
|
|
915
915
|
/**
|
|
916
916
|
* 予約確定
|
|
917
917
|
*/
|
|
918
|
-
confirm(params
|
|
919
|
-
|
|
920
|
-
|
|
921
|
-
|
|
922
|
-
|
|
923
|
-
|
|
924
|
-
|
|
925
|
-
|
|
926
|
-
|
|
927
|
-
|
|
928
|
-
|
|
929
|
-
|
|
930
|
-
|
|
931
|
-
|
|
932
|
-
|
|
933
|
-
|
|
934
|
-
|
|
935
|
-
|
|
936
|
-
|
|
937
|
-
|
|
938
|
-
|
|
939
|
-
|
|
940
|
-
|
|
941
|
-
|
|
942
|
-
|
|
943
|
-
|
|
944
|
-
|
|
945
|
-
|
|
946
|
-
|
|
947
|
-
|
|
948
|
-
|
|
949
|
-
|
|
950
|
-
|
|
951
|
-
}
|
|
918
|
+
// public async confirm<T extends factory.reservationType>(params: {
|
|
919
|
+
// id: string;
|
|
920
|
+
// previousReservationStatus: factory.reservationStatusType;
|
|
921
|
+
// underName?: factory.reservation.IUnderName<T>;
|
|
922
|
+
// }): Promise<factory.reservation.IReservation<T>> {
|
|
923
|
+
// const conditions = {
|
|
924
|
+
// _id: { $eq: String(params.id) },
|
|
925
|
+
// reservationStatus: { $eq: params.previousReservationStatus }
|
|
926
|
+
// };
|
|
927
|
+
// // 更新属性をwhitelist化(2022-06-13~)
|
|
928
|
+
// const update = {
|
|
929
|
+
// // previousReservationStatusを保管(2023-01-19~)
|
|
930
|
+
// previousReservationStatus: params.previousReservationStatus,
|
|
931
|
+
// reservationStatus: factory.reservationStatusType.ReservationConfirmed,
|
|
932
|
+
// modifiedTime: new Date(),
|
|
933
|
+
// ...(params.underName !== undefined) ? { underName: params.underName } : undefined
|
|
934
|
+
// };
|
|
935
|
+
// const doc = await this.reservationModel.findOneAndUpdate(
|
|
936
|
+
// conditions,
|
|
937
|
+
// update,
|
|
938
|
+
// { new: true }
|
|
939
|
+
// )
|
|
940
|
+
// .select({ __v: 0, createdAt: 0, updatedAt: 0 })
|
|
941
|
+
// .exec();
|
|
942
|
+
// // NotFoundであれば状態確認
|
|
943
|
+
// if (doc === null) {
|
|
944
|
+
// const reservation = await this.findById<T>({ id: String(params.id) });
|
|
945
|
+
// if (reservation.reservationStatus === factory.reservationStatusType.ReservationConfirmed) {
|
|
946
|
+
// // すでに確定済の場合
|
|
947
|
+
// return reservation;
|
|
948
|
+
// } else {
|
|
949
|
+
// throw new factory.errors.Argument(
|
|
950
|
+
// 'id',
|
|
951
|
+
// `Reservation ${reservation.id} already changed -> ${reservation.reservationStatus}`
|
|
952
|
+
// );
|
|
953
|
+
// }
|
|
954
|
+
// }
|
|
955
|
+
// return doc.toObject();
|
|
956
|
+
// }
|
|
952
957
|
confirmByReservationNumber(params) {
|
|
953
958
|
return __awaiter(this, void 0, void 0, function* () {
|
|
954
959
|
const conditions = {
|
|
955
960
|
reservationNumber: { $eq: String(params.reservationNumber) },
|
|
956
961
|
reservationStatus: { $eq: params.previousReservationStatus }
|
|
957
962
|
};
|
|
958
|
-
const update = Object.assign({
|
|
959
|
-
|
|
960
|
-
|
|
963
|
+
const update = Object.assign({
|
|
964
|
+
// previousReservationStatusを保管(2023-01-19~)
|
|
965
|
+
previousReservationStatus: params.previousReservationStatus, reservationStatus: factory.reservationStatusType.ReservationConfirmed, modifiedTime: new Date() }, (params.underName !== undefined) ? { underName: params.underName } : undefined);
|
|
961
966
|
yield this.reservationModel.updateMany(conditions, update)
|
|
962
967
|
.exec();
|
|
963
968
|
});
|
|
@@ -6,7 +6,7 @@ import * as factory from '../factory';
|
|
|
6
6
|
export declare class MongoRepository {
|
|
7
7
|
readonly taskModel: typeof Model;
|
|
8
8
|
constructor(connection: Connection);
|
|
9
|
-
static CREATE_MONGO_CONDITIONS
|
|
9
|
+
static CREATE_MONGO_CONDITIONS(params: factory.task.ISearchConditions): any[];
|
|
10
10
|
save(taskAttributes: factory.task.IAttributes<factory.taskName>): Promise<factory.task.ITask<factory.taskName>>;
|
|
11
11
|
saveMany(taskAttributes: factory.task.IAttributes<factory.taskName>[]): Promise<any[]>;
|
|
12
12
|
executeOneByName<T extends factory.taskName>(params: {
|
|
@@ -29,11 +29,11 @@ export declare class MongoRepository {
|
|
|
29
29
|
name: T;
|
|
30
30
|
id: string;
|
|
31
31
|
}): Promise<factory.task.ITask<T>>;
|
|
32
|
-
count
|
|
32
|
+
count(params: factory.task.ISearchConditions): Promise<number>;
|
|
33
33
|
/**
|
|
34
34
|
* 検索する
|
|
35
35
|
*/
|
|
36
|
-
search
|
|
36
|
+
search(params: factory.task.ISearchConditions, projection?: any): Promise<factory.task.ITask<factory.taskName>[]>;
|
|
37
37
|
deleteByProject(params: {
|
|
38
38
|
project: {
|
|
39
39
|
id: string;
|
package/lib/chevre/repo/task.js
CHANGED
|
@@ -29,29 +29,24 @@ class MongoRepository {
|
|
|
29
29
|
}
|
|
30
30
|
// tslint:disable-next-line:max-func-body-length
|
|
31
31
|
static CREATE_MONGO_CONDITIONS(params) {
|
|
32
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
|
|
33
|
-
const andConditions = [
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
/* istanbul ignore else */
|
|
38
|
-
if (params.project !== undefined) {
|
|
39
|
-
if (params.project.id !== undefined && params.project.id !== null) {
|
|
40
|
-
if (typeof params.project.id.$eq === 'string') {
|
|
41
|
-
andConditions.push({
|
|
42
|
-
'project.id': {
|
|
43
|
-
$eq: params.project.id.$eq
|
|
44
|
-
}
|
|
45
|
-
});
|
|
46
|
-
}
|
|
47
|
-
}
|
|
32
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q;
|
|
33
|
+
const andConditions = [];
|
|
34
|
+
const projectIdEq = (_b = (_a = params.project) === null || _a === void 0 ? void 0 : _a.id) === null || _b === void 0 ? void 0 : _b.$eq;
|
|
35
|
+
if (typeof projectIdEq === 'string') {
|
|
36
|
+
andConditions.push({ 'project.id': { $eq: projectIdEq } });
|
|
48
37
|
}
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
38
|
+
if (typeof params.name === 'string') {
|
|
39
|
+
andConditions.push({ name: { $eq: params.name } });
|
|
40
|
+
}
|
|
41
|
+
else {
|
|
42
|
+
const nameIn = (_c = params.name) === null || _c === void 0 ? void 0 : _c.$in;
|
|
43
|
+
if (Array.isArray(nameIn)) {
|
|
44
|
+
andConditions.push({ name: { $in: nameIn } });
|
|
45
|
+
}
|
|
46
|
+
const nameNin = (_d = params.name) === null || _d === void 0 ? void 0 : _d.$nin;
|
|
47
|
+
if (Array.isArray(nameNin)) {
|
|
48
|
+
andConditions.push({ name: { $nin: nameNin } });
|
|
49
|
+
}
|
|
55
50
|
}
|
|
56
51
|
// tslint:disable-next-line:no-single-line-block-comment
|
|
57
52
|
/* istanbul ignore else */
|
|
@@ -94,7 +89,7 @@ class MongoRepository {
|
|
|
94
89
|
}
|
|
95
90
|
});
|
|
96
91
|
}
|
|
97
|
-
const dateAbortedGte = (
|
|
92
|
+
const dateAbortedGte = (_e = params.dateAborted) === null || _e === void 0 ? void 0 : _e.$gte;
|
|
98
93
|
if (dateAbortedGte instanceof Date) {
|
|
99
94
|
andConditions.push({
|
|
100
95
|
dateAborted: {
|
|
@@ -103,7 +98,7 @@ class MongoRepository {
|
|
|
103
98
|
}
|
|
104
99
|
});
|
|
105
100
|
}
|
|
106
|
-
const dateAbortedLte = (
|
|
101
|
+
const dateAbortedLte = (_f = params.dateAborted) === null || _f === void 0 ? void 0 : _f.$lte;
|
|
107
102
|
if (dateAbortedLte instanceof Date) {
|
|
108
103
|
andConditions.push({
|
|
109
104
|
dateAborted: {
|
|
@@ -112,7 +107,7 @@ class MongoRepository {
|
|
|
112
107
|
}
|
|
113
108
|
});
|
|
114
109
|
}
|
|
115
|
-
const objectTransactionNumberEq = (
|
|
110
|
+
const objectTransactionNumberEq = (_j = (_h = (_g = params.data) === null || _g === void 0 ? void 0 : _g.object) === null || _h === void 0 ? void 0 : _h.transactionNumber) === null || _j === void 0 ? void 0 : _j.$eq;
|
|
116
111
|
if (typeof objectTransactionNumberEq === 'string') {
|
|
117
112
|
andConditions.push({
|
|
118
113
|
'data.object.transactionNumber': {
|
|
@@ -121,7 +116,7 @@ class MongoRepository {
|
|
|
121
116
|
}
|
|
122
117
|
});
|
|
123
118
|
}
|
|
124
|
-
const objectPurposeIdEq = (
|
|
119
|
+
const objectPurposeIdEq = (_m = (_l = (_k = params.data) === null || _k === void 0 ? void 0 : _k.purpose) === null || _l === void 0 ? void 0 : _l.id) === null || _m === void 0 ? void 0 : _m.$eq;
|
|
125
120
|
if (typeof objectPurposeIdEq === 'string') {
|
|
126
121
|
andConditions.push({
|
|
127
122
|
'data.purpose.id': {
|
|
@@ -130,7 +125,7 @@ class MongoRepository {
|
|
|
130
125
|
}
|
|
131
126
|
});
|
|
132
127
|
}
|
|
133
|
-
const objectPurposeOrderNumberEq = (
|
|
128
|
+
const objectPurposeOrderNumberEq = (_q = (_p = (_o = params.data) === null || _o === void 0 ? void 0 : _o.purpose) === null || _p === void 0 ? void 0 : _p.orderNumber) === null || _q === void 0 ? void 0 : _q.$eq;
|
|
134
129
|
if (typeof objectPurposeOrderNumberEq === 'string') {
|
|
135
130
|
andConditions.push({
|
|
136
131
|
'data.purpose.orderNumber': {
|
|
@@ -16,7 +16,7 @@ interface IStatus {
|
|
|
16
16
|
status: factory.transactionStatusType;
|
|
17
17
|
aggregation: IAggregationByStatus;
|
|
18
18
|
}
|
|
19
|
-
interface IAggregatePlaceOrder {
|
|
19
|
+
export interface IAggregatePlaceOrder {
|
|
20
20
|
statuses: IStatus[];
|
|
21
21
|
}
|
|
22
22
|
/**
|
|
@@ -155,6 +155,7 @@ export declare class MongoRepository {
|
|
|
155
155
|
startFrom: Date;
|
|
156
156
|
startThrough: Date;
|
|
157
157
|
typeOf: factory.transactionType;
|
|
158
|
+
clientId?: string;
|
|
158
159
|
}): Promise<IAggregatePlaceOrder>;
|
|
159
160
|
private agggregateByStatus;
|
|
160
161
|
}
|
|
@@ -608,11 +608,19 @@ class MongoRepository {
|
|
|
608
608
|
factory.transactionStatusType.Confirmed
|
|
609
609
|
].map((transactionStatus) => __awaiter(this, void 0, void 0, function* () {
|
|
610
610
|
var _a, _b;
|
|
611
|
-
const matchConditions = Object.assign({ startDate: {
|
|
611
|
+
const matchConditions = Object.assign(Object.assign({ startDate: {
|
|
612
612
|
$gte: params.startFrom,
|
|
613
613
|
$lte: params.startThrough
|
|
614
614
|
}, typeOf: { $eq: params.typeOf }, status: { $eq: transactionStatus } }, (typeof ((_b = (_a = params.project) === null || _a === void 0 ? void 0 : _a.id) === null || _b === void 0 ? void 0 : _b.$ne) === 'string')
|
|
615
615
|
? { 'project.id': { $ne: params.project.id.$ne } }
|
|
616
|
+
: undefined), (typeof params.clientId === 'string')
|
|
617
|
+
// customerIdentifierAll.push();
|
|
618
|
+
? {
|
|
619
|
+
'agent.identifier': {
|
|
620
|
+
$exists: true,
|
|
621
|
+
$all: [{ name: 'clientId', value: params.clientId }]
|
|
622
|
+
}
|
|
623
|
+
}
|
|
616
624
|
: undefined);
|
|
617
625
|
return this.agggregateByStatus({ matchConditions, status: transactionStatus });
|
|
618
626
|
})));
|
|
@@ -9,6 +9,7 @@ import { MongoRepository as TransactionRepo } from '../../repo/transaction';
|
|
|
9
9
|
declare function aggregatePlaceOrder(params: {
|
|
10
10
|
aggregationDays: number;
|
|
11
11
|
excludedProjectId?: string;
|
|
12
|
+
clientIds?: string[];
|
|
12
13
|
}): (repos: {
|
|
13
14
|
agregation: AggregationRepo;
|
|
14
15
|
transaction: TransactionRepo;
|
|
@@ -44,7 +44,22 @@ function aggregatePlaceOrder(params) {
|
|
|
44
44
|
typeOf: factory.transactionType.PlaceOrder
|
|
45
45
|
});
|
|
46
46
|
debug('aggregatePlaceOrder:result', aggregateResult, (_a = aggregateResult.statuses[0]) === null || _a === void 0 ? void 0 : _a.aggregation.percentilesDuration, startFrom);
|
|
47
|
-
|
|
47
|
+
const aggregateResultsByClientId = [];
|
|
48
|
+
if (Array.isArray(params.clientIds)) {
|
|
49
|
+
for (const clientId of params.clientIds) {
|
|
50
|
+
aggregateResultsByClientId.push({
|
|
51
|
+
clientId,
|
|
52
|
+
aggregation: yield repos.transaction.aggregatePlaceOrder({
|
|
53
|
+
project: { id: { $ne: params.excludedProjectId } },
|
|
54
|
+
startFrom,
|
|
55
|
+
startThrough,
|
|
56
|
+
typeOf: factory.transactionType.PlaceOrder,
|
|
57
|
+
clientId
|
|
58
|
+
})
|
|
59
|
+
});
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
yield repos.agregation.saveAggregation(Object.assign({ typeOf: aggregation_1.AggregationType.AggregatePlaceOrder, project: { id: '*', typeOf: factory.organizationType.Project }, aggregateDuration, aggregateStart: startFrom, aggregateDate, aggregationByClient: aggregateResultsByClientId }, aggregateResult));
|
|
48
63
|
}
|
|
49
64
|
});
|
|
50
65
|
}
|
|
@@ -468,7 +468,10 @@ function createPotentialActions(params) {
|
|
|
468
468
|
underName
|
|
469
469
|
}));
|
|
470
470
|
});
|
|
471
|
-
const reservationPackage = Object.assign({ reservationFor, reservationNumber: pendingReservations[0].reservationNumber, reservationStatus: pendingReservations[0].reservationStatus,
|
|
471
|
+
const reservationPackage = Object.assign({ reservationFor, reservationNumber: pendingReservations[0].reservationNumber, reservationStatus: pendingReservations[0].reservationStatus,
|
|
472
|
+
// 不要なので廃止(2023-01-19~)
|
|
473
|
+
// subReservation: pendingReservations,
|
|
474
|
+
typeOf: factory.reservationType.ReservationPackage }, (typeof (underName === null || underName === void 0 ? void 0 : underName.typeOf) === 'string') ? { underName } : undefined);
|
|
472
475
|
reserveActionAttributes = [{
|
|
473
476
|
project: transaction.project,
|
|
474
477
|
typeOf: factory.actionType.ReserveAction,
|
|
@@ -37,17 +37,14 @@ function confirmReservation(actionAttributesList) {
|
|
|
37
37
|
});
|
|
38
38
|
}
|
|
39
39
|
else {
|
|
40
|
+
// 廃止(2023-01-18)
|
|
41
|
+
throw new factory.errors.Forbidden(`${reservation.typeOf} not acceptable`);
|
|
40
42
|
// 予約を確定状態に変更する
|
|
41
|
-
//
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
previousReservationStatus: reservation.reservationStatus,
|
|
47
|
-
underName: reservation.underName
|
|
48
|
-
// issuedThroughは予約取引開始時に確定しているので更新不要(2022-12-21~)
|
|
49
|
-
// reservedTicket: reservation.reservedTicket
|
|
50
|
-
});
|
|
43
|
+
// await repos.reservation.confirm<factory.reservationType.EventReservation>({
|
|
44
|
+
// id: reservation.id,
|
|
45
|
+
// previousReservationStatus: reservation.reservationStatus,
|
|
46
|
+
// underName: reservation.underName
|
|
47
|
+
// });
|
|
51
48
|
// _idは不要であり、存在すると予期せぬ影響を及ぼす可能性がある
|
|
52
49
|
// delete (<any>reservation)._id;
|
|
53
50
|
// confirmedReservations.push(reservation);
|
|
@@ -113,16 +113,13 @@ function abort(params) {
|
|
|
113
113
|
exports.abort = abort;
|
|
114
114
|
function notifyAbortedTasks(params) {
|
|
115
115
|
return (repos) => __awaiter(this, void 0, void 0, function* () {
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
$gte: params.dateAbortedGte
|
|
120
|
-
}
|
|
121
|
-
});
|
|
116
|
+
const abortedTasks = yield repos.task.search(Object.assign({ statuses: [factory.taskStatus.Aborted], dateAborted: { $gte: params.dateAbortedGte } }, (settings_1.ABORTED_TASKS_WITHOUT_REPORT.length > 0)
|
|
117
|
+
? { name: { $nin: settings_1.ABORTED_TASKS_WITHOUT_REPORT } }
|
|
118
|
+
: undefined));
|
|
122
119
|
// 中止を報告しないタスク以外にフィルター
|
|
123
|
-
abortedTasks = abortedTasks.filter((task) => {
|
|
124
|
-
|
|
125
|
-
});
|
|
120
|
+
// abortedTasks = abortedTasks.filter((task) => {
|
|
121
|
+
// return !ABORTED_TASKS_WITHOUT_REPORT.includes(task.name);
|
|
122
|
+
// });
|
|
126
123
|
if (abortedTasks.length > 0) {
|
|
127
124
|
// 開発者へ報告
|
|
128
125
|
const message = (0, factory_1.tasks2lineNotify)({ tasks: abortedTasks });
|
package/package.json
CHANGED
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
}
|
|
10
10
|
],
|
|
11
11
|
"dependencies": {
|
|
12
|
-
"@chevre/factory": "4.
|
|
12
|
+
"@chevre/factory": "4.283.0",
|
|
13
13
|
"@cinerino/sdk": "3.135.0",
|
|
14
14
|
"@motionpicture/coa-service": "9.2.0",
|
|
15
15
|
"@motionpicture/gmo-service": "5.2.0",
|
|
@@ -120,5 +120,5 @@
|
|
|
120
120
|
"postversion": "git push origin --tags",
|
|
121
121
|
"prepublishOnly": "npm run clean && npm run build && npm test && npm run doc"
|
|
122
122
|
},
|
|
123
|
-
"version": "20.2.0-alpha.
|
|
123
|
+
"version": "20.2.0-alpha.22"
|
|
124
124
|
}
|