|
@@ -848,6 +848,28 @@ async function generateClassData(libID) {
|
|
|
errorRationIDs,
|
|
|
});
|
|
|
});
|
|
|
+ //新增无必填时的情况
|
|
|
+ if(itemClassData.length===0){
|
|
|
+ // console.log({requireRationData,optionalRationData,classGroups,IDData});
|
|
|
+ Object.values(requireRationData).forEach((dataList)=>{
|
|
|
+ dataList.forEach(data=>{
|
|
|
+ optionalRationIDs.push(...data);
|
|
|
+ })
|
|
|
+ })
|
|
|
+ const errorRationIDs = getErrorRationIDs([], optionalRationIDs, allRationIDs);
|
|
|
+ billClassData.push({
|
|
|
+ itemCharacter: '',
|
|
|
+ class: classNum++,
|
|
|
+ classCode: `${billNode.data.code}`,
|
|
|
+ compilationID: lib.compilationId,
|
|
|
+ name: billNode.data.name,
|
|
|
+ code: billNode.data.code,
|
|
|
+ requiredRationIDs: [],
|
|
|
+ optionalRationIDs:optionalRationIDs || [],
|
|
|
+ errorRationIDs,
|
|
|
+ });
|
|
|
+
|
|
|
+ }
|
|
|
}
|
|
|
console.log(`billClassData.length`);
|
|
|
console.log(billClassData.length);
|