自動採番障害対応
This commit is contained in:
File diff suppressed because one or more lines are too long
@@ -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={
|
||||||
|
|||||||
Reference in New Issue
Block a user