Ver código fonte

他人修改问题强壮性处理

Tony Kang 10 meses atrás
pai
commit
c0c162f845
1 arquivos alterados com 5 adições e 2 exclusões
  1. 5 2
      app/controller/report_controller.js

+ 5 - 2
app/controller/report_controller.js

@@ -738,7 +738,8 @@ module.exports = app => {
                     }
                 }
 
-                let otherChangeList = [], otherHintName = '';
+                let otherChangeList = [],
+                    otherHintName = '';
                 switch (stage_id) {
                     case rptBusiness.BusinessStageId.change_plan:
                         otherChangeList = await ctx.service.changePlan.getListByStatus(tenderId, 0, 0, 0, 0, state);
@@ -752,6 +753,8 @@ module.exports = app => {
                         otherChangeList = await ctx.service.changeApply.getListByStatus(tenderId, 0, 0, 0, 0, state);
                         otherHintName = '变更申请';
                         break;
+                    default:
+                        break;
                 }
                 let archiveList = [];
                 const archives = await ctx.service.rptArchive.getArchiveByBzId(pid, stage_id, bglObj.BUSINESS_ID);
@@ -874,7 +877,7 @@ module.exports = app => {
                     source_type,
                     bglObj: JSON.stringify(bglObj),
                     changes: JSON.stringify(changes),
-                    otherChangeList: JSON.stringify(otherChangeList),
+                    otherChangeList: JSON.stringify(otherChangeList || []),
                     otherHintName,
                     bizId: bglObj.BUSINESS_ID,
                 };