Merged PR 849: 有効なアカウント内の削除されたユーザーの割り当て履歴が集計されない
## 概要 [Task3929: 有効なアカウント内の削除されたユーザーの割り当て履歴が集計されない](https://paruru.nds-tyo.co.jp:8443/tfs/ReciproCollection/fa4924a4-d079-4fab-9fb5-a9a11eb205f0/_workitems/edit/3929) - 元PBI or タスクへのリンク(内容・目的などはそちらにあるはず) - 何をどう変更したか、追加したライブラリなど - このPull Requestでの対象/対象外 - 影響範囲(他の機能にも影響があるか) ## レビューポイント - 特にレビューしてほしい箇所 - 軽微なものや自明なものは記載不要 - 修正範囲が大きい場合などに記載 - 全体的にや仕様を満たしているか等は本当に必要な時のみ記載 ## UIの変更 - Before/Afterのスクショなど - スクショ置き場 ## 動作確認状況 - ローカルで確認、develop環境で確認など ## 補足 - 相談、参考資料などがあれば
This commit is contained in:
parent
f80912c617
commit
cab7a75ec1
@ -382,18 +382,26 @@ function compareCardLicenses(
|
|||||||
}
|
}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
const formattedActivated = getFormattedDate(
|
const formattedFileActivated = getFormattedDate(
|
||||||
filterdCardLicenses[0].activated_at,
|
cardlicensesInputFile.activated_at
|
||||||
`yyyy/MM/dd hh:mm:ss`
|
? new Date(cardlicensesInputFile.activated_at)
|
||||||
|
: null,
|
||||||
|
`yyyy/MM/dd hh:mm:ss`,
|
||||||
|
true
|
||||||
);
|
);
|
||||||
if (cardlicensesInputFile.activated_at !== formattedActivated) {
|
const formattedDbActivated = getFormattedDate(
|
||||||
|
filterdCardLicenses[0].activated_at,
|
||||||
|
`yyyy/MM/dd hh:mm:ss`,
|
||||||
|
true
|
||||||
|
);
|
||||||
|
if (formattedFileActivated !== formattedDbActivated) {
|
||||||
const VerificationResultDetailsOne: VerificationResultDetails = {
|
const VerificationResultDetailsOne: VerificationResultDetails = {
|
||||||
input: "cardLicenses",
|
input: "cardLicenses",
|
||||||
inputRow: row,
|
inputRow: row,
|
||||||
diffTargetTable: "cardLicenses",
|
diffTargetTable: "cardLicenses",
|
||||||
columnName: "activated_at",
|
columnName: "activated_at",
|
||||||
fileData: cardlicensesInputFile.activated_at,
|
fileData: formattedFileActivated,
|
||||||
databaseData: formattedActivated,
|
databaseData: formattedDbActivated,
|
||||||
reason: "内容不一致",
|
reason: "内容不一致",
|
||||||
};
|
};
|
||||||
VerificationResultDetails.push(VerificationResultDetailsOne);
|
VerificationResultDetails.push(VerificationResultDetailsOne);
|
||||||
@ -574,7 +582,13 @@ function compareLicenses(
|
|||||||
// expiry_dateについて、時はゼロパディングした値で比較する(×01~09 ○1~9)
|
// expiry_dateについて、時はゼロパディングした値で比較する(×01~09 ○1~9)
|
||||||
if (
|
if (
|
||||||
!licensesFromDatabase[i] ||
|
!licensesFromDatabase[i] ||
|
||||||
licensesFromFile[i].expired_date !==
|
getFormattedDate(
|
||||||
|
licensesFromFile[i].expired_date
|
||||||
|
? new Date(licensesFromFile[i].expired_date)
|
||||||
|
: null,
|
||||||
|
`yyyy/MM/dd hh:mm:ss`,
|
||||||
|
true
|
||||||
|
) !==
|
||||||
getFormattedDate(
|
getFormattedDate(
|
||||||
licensesFromDatabase[i].expiry_date,
|
licensesFromDatabase[i].expiry_date,
|
||||||
`yyyy/MM/dd hh:mm:ss`,
|
`yyyy/MM/dd hh:mm:ss`,
|
||||||
@ -586,7 +600,13 @@ function compareLicenses(
|
|||||||
inputRow: licensesFromFile[i].row,
|
inputRow: licensesFromFile[i].row,
|
||||||
diffTargetTable: "licenses",
|
diffTargetTable: "licenses",
|
||||||
columnName: "expired_date",
|
columnName: "expired_date",
|
||||||
fileData: licensesFromFile[i].expired_date,
|
fileData: getFormattedDate(
|
||||||
|
licensesFromFile[i].expired_date
|
||||||
|
? new Date(licensesFromFile[i].expired_date)
|
||||||
|
: null,
|
||||||
|
`yyyy/MM/dd hh:mm:ss`,
|
||||||
|
true
|
||||||
|
),
|
||||||
databaseData: licensesFromDatabase[i]
|
databaseData: licensesFromDatabase[i]
|
||||||
? getFormattedDate(
|
? getFormattedDate(
|
||||||
licensesFromDatabase[i].expiry_date,
|
licensesFromDatabase[i].expiry_date,
|
||||||
|
|||||||
@ -154,7 +154,7 @@
|
|||||||
"status": "Status",
|
"status": "Status",
|
||||||
"expiration": "Verfallsdatum",
|
"expiration": "Verfallsdatum",
|
||||||
"remaining": "Verbleibender Zeitraum",
|
"remaining": "Verbleibender Zeitraum",
|
||||||
"autoRenew": "Automatische Erneuerung",
|
"autoRenew": "Automatisch zuweisen",
|
||||||
"licenseAlert": "Lizenzalarm",
|
"licenseAlert": "Lizenzalarm",
|
||||||
"notification": "Benachrichtigung",
|
"notification": "Benachrichtigung",
|
||||||
"users": "Benutzer",
|
"users": "Benutzer",
|
||||||
@ -436,7 +436,7 @@
|
|||||||
"templateOptional": "Vorlage (Optional)",
|
"templateOptional": "Vorlage (Optional)",
|
||||||
"editRule": "Regel bearbeiten",
|
"editRule": "Regel bearbeiten",
|
||||||
"selected": "Ausgewählter transkriptionist",
|
"selected": "Ausgewählter transkriptionist",
|
||||||
"pool": "Liste der Transkriptionisten",
|
"pool": "Transkriptionsliste",
|
||||||
"selectAuthor": "Autoren-ID auswählen",
|
"selectAuthor": "Autoren-ID auswählen",
|
||||||
"selectWorktypeId": "Aufgabentypkennung auswählen",
|
"selectWorktypeId": "Aufgabentypkennung auswählen",
|
||||||
"selectTemplate": "Vorlage auswählen"
|
"selectTemplate": "Vorlage auswählen"
|
||||||
@ -456,7 +456,7 @@
|
|||||||
"addTypistGroup": "Transkriptionist Gruppe hinzufügen",
|
"addTypistGroup": "Transkriptionist Gruppe hinzufügen",
|
||||||
"transcriptionist": "Transkriptionist",
|
"transcriptionist": "Transkriptionist",
|
||||||
"selected": "Ausgewählter transkriptionist",
|
"selected": "Ausgewählter transkriptionist",
|
||||||
"pool": "Liste der Transkriptionisten",
|
"pool": "Transkriptionsliste",
|
||||||
"add": "Hinzufügen",
|
"add": "Hinzufügen",
|
||||||
"remove": "Entfernen",
|
"remove": "Entfernen",
|
||||||
"editTypistGroup": "Transkriptionistengruppe bearbeiten"
|
"editTypistGroup": "Transkriptionistengruppe bearbeiten"
|
||||||
|
|||||||
@ -154,7 +154,7 @@
|
|||||||
"status": "Status",
|
"status": "Status",
|
||||||
"expiration": "Expiration Date",
|
"expiration": "Expiration Date",
|
||||||
"remaining": "Remaining Period",
|
"remaining": "Remaining Period",
|
||||||
"autoRenew": "Auto Renew",
|
"autoRenew": "Auto Assign",
|
||||||
"licenseAlert": "License Alert",
|
"licenseAlert": "License Alert",
|
||||||
"notification": "Notification",
|
"notification": "Notification",
|
||||||
"users": "Users",
|
"users": "Users",
|
||||||
@ -436,7 +436,7 @@
|
|||||||
"templateOptional": "Template (Optional)",
|
"templateOptional": "Template (Optional)",
|
||||||
"editRule": "Edit Rule",
|
"editRule": "Edit Rule",
|
||||||
"selected": "Selected Transcriptionist",
|
"selected": "Selected Transcriptionist",
|
||||||
"pool": "Transcriptionist List",
|
"pool": "Transcription List",
|
||||||
"selectAuthor": "Select Author ID",
|
"selectAuthor": "Select Author ID",
|
||||||
"selectWorktypeId": "Select Worktype ID",
|
"selectWorktypeId": "Select Worktype ID",
|
||||||
"selectTemplate": "Select Template"
|
"selectTemplate": "Select Template"
|
||||||
@ -456,7 +456,7 @@
|
|||||||
"addTypistGroup": "Add Transcriptionist Group",
|
"addTypistGroup": "Add Transcriptionist Group",
|
||||||
"transcriptionist": "Transcriptionist",
|
"transcriptionist": "Transcriptionist",
|
||||||
"selected": "Selected Transcriptionist",
|
"selected": "Selected Transcriptionist",
|
||||||
"pool": "Transcriptionist List",
|
"pool": "Transcription List",
|
||||||
"add": "Add",
|
"add": "Add",
|
||||||
"remove": "Remove",
|
"remove": "Remove",
|
||||||
"editTypistGroup": "Edit Transcriptionist Group"
|
"editTypistGroup": "Edit Transcriptionist Group"
|
||||||
|
|||||||
@ -154,7 +154,7 @@
|
|||||||
"status": "Estado",
|
"status": "Estado",
|
||||||
"expiration": "Fecha de caducidad",
|
"expiration": "Fecha de caducidad",
|
||||||
"remaining": "Período restante",
|
"remaining": "Período restante",
|
||||||
"autoRenew": "Renovación Automática",
|
"autoRenew": "Asignación automática",
|
||||||
"licenseAlert": "Alerta de licencia",
|
"licenseAlert": "Alerta de licencia",
|
||||||
"notification": "Notificación",
|
"notification": "Notificación",
|
||||||
"users": "Usuarios",
|
"users": "Usuarios",
|
||||||
@ -436,7 +436,7 @@
|
|||||||
"templateOptional": "Plantilla (Opcional)",
|
"templateOptional": "Plantilla (Opcional)",
|
||||||
"editRule": "Editar regla",
|
"editRule": "Editar regla",
|
||||||
"selected": "Transcriptor seleccionado",
|
"selected": "Transcriptor seleccionado",
|
||||||
"pool": "Lista de transcriptores",
|
"pool": "Lista de transcriptor",
|
||||||
"selectAuthor": "Seleccionar ID de autor",
|
"selectAuthor": "Seleccionar ID de autor",
|
||||||
"selectWorktypeId": "Seleccionar ID de tipo de trabajo",
|
"selectWorktypeId": "Seleccionar ID de tipo de trabajo",
|
||||||
"selectTemplate": "Seleccionar Plantilla"
|
"selectTemplate": "Seleccionar Plantilla"
|
||||||
@ -456,7 +456,7 @@
|
|||||||
"addTypistGroup": "Agregar grupo transcriptor",
|
"addTypistGroup": "Agregar grupo transcriptor",
|
||||||
"transcriptionist": "Transcriptor",
|
"transcriptionist": "Transcriptor",
|
||||||
"selected": "Transcriptor seleccionado",
|
"selected": "Transcriptor seleccionado",
|
||||||
"pool": "Lista de transcriptores",
|
"pool": "Lista de transcriptor",
|
||||||
"add": "Añadir",
|
"add": "Añadir",
|
||||||
"remove": "Eliminar",
|
"remove": "Eliminar",
|
||||||
"editTypistGroup": "Editar grupo transcriptor"
|
"editTypistGroup": "Editar grupo transcriptor"
|
||||||
|
|||||||
@ -154,7 +154,7 @@
|
|||||||
"status": "État",
|
"status": "État",
|
||||||
"expiration": "Date d'expiration",
|
"expiration": "Date d'expiration",
|
||||||
"remaining": "Période restante",
|
"remaining": "Période restante",
|
||||||
"autoRenew": "Renouvellement automatique",
|
"autoRenew": "Assignation automatique",
|
||||||
"licenseAlert": "Alerte de licence",
|
"licenseAlert": "Alerte de licence",
|
||||||
"notification": "Notification",
|
"notification": "Notification",
|
||||||
"users": "Utilisateurs",
|
"users": "Utilisateurs",
|
||||||
@ -436,7 +436,7 @@
|
|||||||
"templateOptional": "Masque (Facultatif)",
|
"templateOptional": "Masque (Facultatif)",
|
||||||
"editRule": "Modifier la règle",
|
"editRule": "Modifier la règle",
|
||||||
"selected": "Transcriptionniste sélectionné",
|
"selected": "Transcriptionniste sélectionné",
|
||||||
"pool": "Liste des transcripteurs",
|
"pool": "Liste de transcriptionniste",
|
||||||
"selectAuthor": "Sélectionner le Identifiant Auteur",
|
"selectAuthor": "Sélectionner le Identifiant Auteur",
|
||||||
"selectWorktypeId": "Sélectionner le Identifiant du Type de travail",
|
"selectWorktypeId": "Sélectionner le Identifiant du Type de travail",
|
||||||
"selectTemplate": "Sélectionner le Masque"
|
"selectTemplate": "Sélectionner le Masque"
|
||||||
@ -456,7 +456,7 @@
|
|||||||
"addTypistGroup": "Ajouter un groupe de transcripteurs",
|
"addTypistGroup": "Ajouter un groupe de transcripteurs",
|
||||||
"transcriptionist": "Transcriptionniste",
|
"transcriptionist": "Transcriptionniste",
|
||||||
"selected": "Transcriptionniste sélectionné",
|
"selected": "Transcriptionniste sélectionné",
|
||||||
"pool": "Liste des transcripteurs",
|
"pool": "Liste de transcriptionniste",
|
||||||
"add": "Ajouter",
|
"add": "Ajouter",
|
||||||
"remove": "Supprimer",
|
"remove": "Supprimer",
|
||||||
"editTypistGroup": "Modifier le groupe de transcripteurs"
|
"editTypistGroup": "Modifier le groupe de transcripteurs"
|
||||||
|
|||||||
@ -27,6 +27,7 @@ import {
|
|||||||
} from "../constants";
|
} from "../constants";
|
||||||
import { DateWithDayEndTime } from "../common/types/types";
|
import { DateWithDayEndTime } from "../common/types/types";
|
||||||
import { initializeDataSource } from "../database/initializeDataSource";
|
import { initializeDataSource } from "../database/initializeDataSource";
|
||||||
|
import { bigintTransformer } from "../common/entity";
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* ライセンス数分析処理のメイン処理:ここから各処理を呼び出す
|
* ライセンス数分析処理のメイン処理:ここから各処理を呼び出す
|
||||||
@ -166,8 +167,11 @@ export async function getBaseData(
|
|||||||
);
|
);
|
||||||
const switchedlicensesInTargetMonth = await licenseAllocationHistory
|
const switchedlicensesInTargetMonth = await licenseAllocationHistory
|
||||||
.createQueryBuilder("licenseAllocationHistory")
|
.createQueryBuilder("licenseAllocationHistory")
|
||||||
.innerJoinAndSelect("licenseAllocationHistory.user", "user")
|
.innerJoin(
|
||||||
.innerJoin("user.account", "account")
|
"accounts",
|
||||||
|
"account",
|
||||||
|
"licenseAllocationHistory.account_id = account.id"
|
||||||
|
)
|
||||||
.where("account.tier = :tier", { tier: TIERS.TIER5 })
|
.where("account.tier = :tier", { tier: TIERS.TIER5 })
|
||||||
.andWhere("licenseAllocationHistory.switch_from_type IN (:...types)", {
|
.andWhere("licenseAllocationHistory.switch_from_type IN (:...types)", {
|
||||||
types: [SWITCH_FROM_TYPE.CARD, SWITCH_FROM_TYPE.TRIAL],
|
types: [SWITCH_FROM_TYPE.CARD, SWITCH_FROM_TYPE.TRIAL],
|
||||||
@ -408,10 +412,6 @@ export async function transferData(
|
|||||||
targetMonthYYYYMM: string
|
targetMonthYYYYMM: string
|
||||||
): Promise<outputDataAnalysisLicensesCSV> {
|
): Promise<outputDataAnalysisLicensesCSV> {
|
||||||
context.log("[IN]transferData");
|
context.log("[IN]transferData");
|
||||||
class userIdAndRoles {
|
|
||||||
id: number;
|
|
||||||
role: string;
|
|
||||||
}
|
|
||||||
const accountsAndUsersFromTier5 = baseData.accountsAndUsersFromTier5;
|
const accountsAndUsersFromTier5 = baseData.accountsAndUsersFromTier5;
|
||||||
const validLicenses = baseData.avairableLicenses;
|
const validLicenses = baseData.avairableLicenses;
|
||||||
const currentMonthIssuedLicenses = baseData.licensesIssuedInTargetMonth;
|
const currentMonthIssuedLicenses = baseData.licensesIssuedInTargetMonth;
|
||||||
@ -448,7 +448,7 @@ export async function transferData(
|
|||||||
outputDataAU.push(...header);
|
outputDataAU.push(...header);
|
||||||
|
|
||||||
// ユーザーIDとロールを格納する配列(型が違う為新たに作成する)
|
// ユーザーIDとロールを格納する配列(型が違う為新たに作成する)
|
||||||
let tier5userIdAndRoles: userIdAndRoles[] = [];
|
let tier5userIdAndRoles: { id: number; role: string }[] = [];
|
||||||
try {
|
try {
|
||||||
// 第五階層のアカウントごとにループ
|
// 第五階層のアカウントごとにループ
|
||||||
for (const account of accountsAndUsersFromTier5) {
|
for (const account of accountsAndUsersFromTier5) {
|
||||||
@ -464,13 +464,20 @@ export async function transferData(
|
|||||||
// ユーザーとユーザーアーカイブからユーザーIDとロールを取得する
|
// ユーザーとユーザーアーカイブからユーザーIDとロールを取得する
|
||||||
if (account.user) {
|
if (account.user) {
|
||||||
tier5userIdAndRoles = account.user.map((user) => {
|
tier5userIdAndRoles = account.user.map((user) => {
|
||||||
return { id: user.id, role: user.role };
|
// XXX entityを修正すべきだが、時期的に影響範囲が大きいため、ここで変換する
|
||||||
|
// 本対応は#3928で行う
|
||||||
|
return { id: bigintTransformer.from(user.id), role: user.role };
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
if (account.userArchive) {
|
if (account.userArchive) {
|
||||||
tier5userIdAndRoles = tier5userIdAndRoles.concat(
|
tier5userIdAndRoles = tier5userIdAndRoles.concat(
|
||||||
account.userArchive.map((userArchive) => {
|
account.userArchive.map((userArchive) => {
|
||||||
return { id: userArchive.id, role: userArchive.role };
|
// XXX entityを修正すべきだが、時期的に影響範囲が大きいため、ここで変換する
|
||||||
|
// 本対応は#3928で行う
|
||||||
|
return {
|
||||||
|
id: bigintTransformer.from(userArchive.id),
|
||||||
|
role: userArchive.role,
|
||||||
|
};
|
||||||
})
|
})
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
@ -735,40 +742,59 @@ export async function transferData(
|
|||||||
(license) =>
|
(license) =>
|
||||||
tier5userIdAndRoles.find(
|
tier5userIdAndRoles.find(
|
||||||
(user) =>
|
(user) =>
|
||||||
user.id === license.user_id && user.role === USER_ROLES.TYPIST
|
// XXX entityを修正すべきだが、時期的に影響範囲が大きいため、ここで変換する
|
||||||
|
// 本対応は#3928で行う
|
||||||
|
user.id === bigintTransformer.from(license.user_id) &&
|
||||||
|
user.role === USER_ROLES.TYPIST
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
const switchedTypistLicensesAuthor = switchedTrialLicenses.filter(
|
const switchedTypistLicensesAuthor = switchedTrialLicenses.filter(
|
||||||
(license) =>
|
(license) =>
|
||||||
tier5userIdAndRoles.find(
|
tier5userIdAndRoles.find(
|
||||||
(user) =>
|
(user) =>
|
||||||
user.id === license.user_id && user.role === USER_ROLES.AUTHOR
|
// XXX entityを修正すべきだが、時期的に影響範囲が大きいため、ここで変換する
|
||||||
|
// 本対応は#3928で行う
|
||||||
|
user.id === bigintTransformer.from(license.user_id) &&
|
||||||
|
user.role === USER_ROLES.AUTHOR
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
const switchedTypistLicensesNone = switchedTrialLicenses.filter(
|
const switchedTypistLicensesNone = switchedTrialLicenses.filter(
|
||||||
(license) =>
|
(license) =>
|
||||||
tier5userIdAndRoles.find(
|
tier5userIdAndRoles.find(
|
||||||
(user) =>
|
(user) =>
|
||||||
user.id === license.user_id && user.role === USER_ROLES.NONE
|
// XXX entityを修正すべきだが、時期的に影響範囲が大きいため、ここで変換する
|
||||||
|
// 本対応は#3928で行う
|
||||||
|
user.id === bigintTransformer.from(license.user_id) &&
|
||||||
|
user.role === USER_ROLES.NONE
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
const switchedCardLicensesTypist = switchedCardLicenses.filter(
|
const switchedCardLicensesTypist = switchedCardLicenses.filter(
|
||||||
(license) =>
|
(license) =>
|
||||||
tier5userIdAndRoles.find(
|
tier5userIdAndRoles.find(
|
||||||
(user) =>
|
(user) =>
|
||||||
user.id === license.user_id && user.role === USER_ROLES.TYPIST
|
// XXX entityを修正すべきだが、時期的に影響範囲が大きいため、ここで変換する
|
||||||
|
// 本対応は#3928で行う
|
||||||
|
user.id === bigintTransformer.from(license.user_id) &&
|
||||||
|
user.role === USER_ROLES.TYPIST
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
const switchedCardLicensesAuthor = switchedCardLicenses.filter(
|
const switchedCardLicensesAuthor = switchedCardLicenses.filter(
|
||||||
(license) =>
|
(license) =>
|
||||||
tier5userIdAndRoles.find(
|
tier5userIdAndRoles.find(
|
||||||
(user) =>
|
(user) =>
|
||||||
user.id === license.user_id && user.role === USER_ROLES.AUTHOR
|
// XXX entityを修正すべきだが、時期的に影響範囲が大きいため、ここで変換する
|
||||||
|
// 本対応は#3928で行う
|
||||||
|
user.id === bigintTransformer.from(license.user_id) &&
|
||||||
|
user.role === USER_ROLES.AUTHOR
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
const switchedCardLicensesNone = switchedCardLicenses.filter((license) =>
|
const switchedCardLicensesNone = switchedCardLicenses.filter((license) =>
|
||||||
tier5userIdAndRoles.find(
|
tier5userIdAndRoles.find(
|
||||||
(user) => user.id === license.user_id && user.role === USER_ROLES.NONE
|
(user) =>
|
||||||
|
// XXX entityを修正すべきだが、時期的に影響範囲が大きいため、ここで変換する
|
||||||
|
// 本対応は#3928で行う
|
||||||
|
user.id === bigintTransformer.from(license.user_id) &&
|
||||||
|
user.role === USER_ROLES.NONE
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
// 切り替えライセンスの数をカウント
|
// 切り替えライセンスの数をカウント
|
||||||
@ -920,7 +946,12 @@ export async function transferData(
|
|||||||
// アカウントに紐づくユーザーを取得
|
// アカウントに紐づくユーザーを取得
|
||||||
if (account.userArchive) {
|
if (account.userArchive) {
|
||||||
tier5userIdAndRoles = account.userArchive.map((userArchive) => {
|
tier5userIdAndRoles = account.userArchive.map((userArchive) => {
|
||||||
return { id: userArchive.id, role: userArchive.role };
|
return {
|
||||||
|
// XXX entityを修正すべきだが、時期的に影響範囲が大きいため、ここで変換する
|
||||||
|
// 本対応は#3928で行う
|
||||||
|
id: bigintTransformer.from(userArchive.id),
|
||||||
|
role: userArchive.role,
|
||||||
|
};
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
// アカウントに紐づくライセンスを取得
|
// アカウントに紐づくライセンスを取得
|
||||||
@ -1159,33 +1190,51 @@ export async function transferData(
|
|||||||
//(Typist・Author・None)
|
//(Typist・Author・None)
|
||||||
const switchedTypistLicensesTypist = switchedTrialLicenses.filter(
|
const switchedTypistLicensesTypist = switchedTrialLicenses.filter(
|
||||||
(license) =>
|
(license) =>
|
||||||
tier5userIdAndRoles?.find((user) => user.id === license.user_id)
|
// XXX entityを修正すべきだが、時期的に影響範囲が大きいため、ここで変換する
|
||||||
?.role === USER_ROLES.TYPIST
|
// 本対応は#3928で行う
|
||||||
|
tier5userIdAndRoles?.find(
|
||||||
|
(user) => user.id === bigintTransformer.from(license.user_id)
|
||||||
|
)?.role === USER_ROLES.TYPIST
|
||||||
);
|
);
|
||||||
const switchedTypistLicensesAuthor = switchedTrialLicenses.filter(
|
const switchedTypistLicensesAuthor = switchedTrialLicenses.filter(
|
||||||
(license) =>
|
(license) =>
|
||||||
tier5userIdAndRoles?.find((user) => user.id === license.user_id)
|
// XXX entityを修正すべきだが、時期的に影響範囲が大きいため、ここで変換する
|
||||||
?.role === USER_ROLES.AUTHOR
|
// 本対応は#3928で行う
|
||||||
|
tier5userIdAndRoles?.find(
|
||||||
|
(user) => user.id === bigintTransformer.from(license.user_id)
|
||||||
|
)?.role === USER_ROLES.AUTHOR
|
||||||
);
|
);
|
||||||
const switchedTypistLicensesNone = switchedTrialLicenses.filter(
|
const switchedTypistLicensesNone = switchedTrialLicenses.filter(
|
||||||
(license) =>
|
(license) =>
|
||||||
tier5userIdAndRoles?.find((user) => user.id === license.user_id)
|
// XXX entityを修正すべきだが、時期的に影響範囲が大きいため、ここで変換する
|
||||||
?.role === USER_ROLES.NONE
|
// 本対応は#3928で行う
|
||||||
|
tier5userIdAndRoles?.find(
|
||||||
|
(user) => user.id === bigintTransformer.from(license.user_id)
|
||||||
|
)?.role === USER_ROLES.NONE
|
||||||
);
|
);
|
||||||
const switchedCardLicensesTypist = switchedCardLicenses.filter(
|
const switchedCardLicensesTypist = switchedCardLicenses.filter(
|
||||||
(license) =>
|
(license) =>
|
||||||
tier5userIdAndRoles?.find((user) => user.id === license.user_id)
|
// XXX entityを修正すべきだが、時期的に影響範囲が大きいため、ここで変換する
|
||||||
?.role === USER_ROLES.TYPIST
|
// 本対応は#3928で行う
|
||||||
|
tier5userIdAndRoles?.find(
|
||||||
|
(user) => user.id === bigintTransformer.from(license.user_id)
|
||||||
|
)?.role === USER_ROLES.TYPIST
|
||||||
);
|
);
|
||||||
const switchedCardLicensesAuthor = switchedCardLicenses.filter(
|
const switchedCardLicensesAuthor = switchedCardLicenses.filter(
|
||||||
(license) =>
|
(license) =>
|
||||||
tier5userIdAndRoles?.find((user) => user.id === license.user_id)
|
// XXX entityを修正すべきだが、時期的に影響範囲が大きいため、ここで変換する
|
||||||
?.role === USER_ROLES.AUTHOR
|
// 本対応は#3928で行う
|
||||||
|
tier5userIdAndRoles?.find(
|
||||||
|
(user) => user.id === bigintTransformer.from(license.user_id)
|
||||||
|
)?.role === USER_ROLES.AUTHOR
|
||||||
);
|
);
|
||||||
const switchedCardLicensesNone = switchedCardLicenses.filter(
|
const switchedCardLicensesNone = switchedCardLicenses.filter(
|
||||||
(license) =>
|
(license) =>
|
||||||
tier5userIdAndRoles?.find((user) => user.id === license.user_id)
|
// XXX entityを修正すべきだが、時期的に影響範囲が大きいため、ここで変換する
|
||||||
?.role === USER_ROLES.NONE
|
// 本対応は#3928で行う
|
||||||
|
tier5userIdAndRoles?.find(
|
||||||
|
(user) => user.id === bigintTransformer.from(license.user_id)
|
||||||
|
)?.role === USER_ROLES.NONE
|
||||||
);
|
);
|
||||||
// 切り替えライセンスの数をカウント
|
// 切り替えライセンスの数をカウント
|
||||||
const switchedTypistLicensesTypistCount =
|
const switchedTypistLicensesTypistCount =
|
||||||
@ -1819,7 +1868,6 @@ export async function outputAnalysisLicensesData(
|
|||||||
outputFileNameUS,
|
outputFileNameUS,
|
||||||
csvContentUS
|
csvContentUS
|
||||||
);
|
);
|
||||||
context.log("resultUS: " + resultUS);
|
|
||||||
const resultEU = await blobstorageService.uploadFileAnalysisLicensesCSV(
|
const resultEU = await blobstorageService.uploadFileAnalysisLicensesCSV(
|
||||||
context,
|
context,
|
||||||
outputFileNameEU,
|
outputFileNameEU,
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
Loading…
x
Reference in New Issue
Block a user