自動採番障害対応

This commit is contained in:
2023-11-01 22:59:23 +09:00
parent cfc416fd14
commit a782e92bd6
2 changed files with 10 additions and 5 deletions

File diff suppressed because one or more lines are too long

View File

@@ -86,8 +86,12 @@ export class AutoNumbering implements IAction{
let number :string=''; let number :string='';
let prefix:string=''; let prefix:string='';
let suffix:string=''; let suffix:string='';
let no=1;
let no = await this.fetchNo(); try{
no = await this.fetchNo();
}catch(error){
console.log(error);
}
if(props.format!==undefined && props.format!==''){ if(props.format!==undefined && props.format!==''){
number=Formatter.numberFormat(no, props.format); number=Formatter.numberFormat(no, props.format);
}else{ }else{
@@ -106,6 +110,7 @@ export class AutoNumbering implements IAction{
async fetchNo():Promise<number>{ async fetchNo():Promise<number>{
let recNo=1; let recNo=1;
return await new kintone.Promise<number>((resolve,reject)=>{ return await new kintone.Promise<number>((resolve,reject)=>{
const appurl = kintone.api.url('/k/v1/records',true); const appurl = kintone.api.url('/k/v1/records',true);
const params={ const params={