@chevre/domain 28.0.0-alpha.10 → 28.0.0-alpha.11
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.
|
@@ -24,6 +24,11 @@ export declare class POSRepo {
|
|
|
24
24
|
$eq?: string;
|
|
25
25
|
$regex?: string;
|
|
26
26
|
};
|
|
27
|
+
}, options: {
|
|
28
|
+
/**
|
|
29
|
+
* 2026-09-18~
|
|
30
|
+
*/
|
|
31
|
+
excludePOSId: boolean;
|
|
27
32
|
}): Promise<Pick<factory.place.movieTheater.IPOS, 'branchCode' | 'name' | 'id'>[]>;
|
|
28
33
|
createByBranchCode(params: Pick<factory.place.movieTheater.IPOS, 'branchCode' | 'name'> & {
|
|
29
34
|
project: {
|
|
@@ -15,7 +15,7 @@ class POSRepo {
|
|
|
15
15
|
this.civicStructureModel = connection.model(civicStructure_1.modelName, (0, civicStructure_1.createSchema)());
|
|
16
16
|
this.operator = operater;
|
|
17
17
|
}
|
|
18
|
-
async findPOS(params) {
|
|
18
|
+
async findPOS(params, options) {
|
|
19
19
|
const matchStages = [];
|
|
20
20
|
const branchCodeEq = params.branchCode?.$eq;
|
|
21
21
|
if (typeof branchCodeEq === 'string') {
|
|
@@ -25,6 +25,7 @@ class POSRepo {
|
|
|
25
25
|
if (typeof branchCodeRegex === 'string' && branchCodeRegex.length > 0) {
|
|
26
26
|
matchStages.push({ $match: { 'hasPOS.branchCode': { $regex: new RegExp(branchCodeRegex) } } });
|
|
27
27
|
}
|
|
28
|
+
const { excludePOSId } = options;
|
|
28
29
|
const aggregate = this.civicStructureModel.aggregate([
|
|
29
30
|
// まず施設ドキュメントで絞る
|
|
30
31
|
{
|
|
@@ -43,9 +44,9 @@ class POSRepo {
|
|
|
43
44
|
{
|
|
44
45
|
$project: {
|
|
45
46
|
_id: 0,
|
|
46
|
-
id: '$hasPOS.branchCode',
|
|
47
47
|
branchCode: '$hasPOS.branchCode',
|
|
48
|
-
name: '$hasPOS.name'
|
|
48
|
+
name: '$hasPOS.name',
|
|
49
|
+
...((!excludePOSId) && { id: '$hasPOS.branchCode' })
|
|
49
50
|
}
|
|
50
51
|
}
|
|
51
52
|
]);
|
|
@@ -28,7 +28,7 @@ function createInformHasPOSTasks(params) {
|
|
|
28
28
|
repos.pos.operator.id = movieTheater.id;
|
|
29
29
|
const hasPOS = await repos.pos.findPOS({
|
|
30
30
|
projectId: params.project.id
|
|
31
|
-
});
|
|
31
|
+
}, { excludePOSId: false });
|
|
32
32
|
const movieTheaters4inform = [{
|
|
33
33
|
hasPOS: (Array.isArray(hasPOS)) ? hasPOS : [],
|
|
34
34
|
id: movieTheater.id,
|
package/package.json
CHANGED