guoyuji
2024-05-16 2f7a225c44a33c116fda47f61a4d27ed64a35356
修改抛出异常的问题
2个文件已修改
18 ■■■■ 已修改文件
north-glass-erp/northglass-erp/src/views/pp/reportingWorks/SelectReportingWorks.vue 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/src/main/java/com/example/erp/controller/pp/ReportingWorkController.java 12 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/northglass-erp/src/views/pp/reportingWorks/SelectReportingWorks.vue
@@ -23,16 +23,14 @@
    }
    case 'delete':{
      request.post(`/reportingWork/deleteWork/${row.reportingWorkId}/${row.processId}/${row.thisProcess}`).then((res) => {
        if (res.code == 200) {
        if (res.code == 200 && res.code===true) {
          ElMessage.success(t('workOrder.deleteOk'))
          router.push({path: '/main/reportingWorks/SelectReportingWorks', query: {random:Math.random()}})
        } else {
          ElMessage.warning(res.msg)
          ElMessage.warning('删除失败,检查下工序是否已报工')
        }
      }).catch((err) =>{
        ElMessage.warning('删除失败,检查下工序是否已报工')
      })
      break
    }
north-glass-erp/src/main/java/com/example/erp/controller/pp/ReportingWorkController.java
@@ -83,12 +83,14 @@
    @SaCheckPermission("SelectReportingWorks.delete")
    @PostMapping("/deleteWork/{reportingWorkId}/{processId}/{thisProcess}")
    public Result deleteWork(@PathVariable String reportingWorkId,@PathVariable String processId,@PathVariable String thisProcess){
        if(reportingWorkService.deleteWorkSv(reportingWorkId,processId,thisProcess)){
            return Result.seccess();
        }else {
            throw new ServiceException(Constants.Code_500,"删除失败,请检查是否符合删除条件");
//        if(reportingWorkService.deleteWorkSv(reportingWorkId,processId,thisProcess)){
//            return Result.seccess();
//        }else {
//            throw new ServiceException(Constants.Code_500,"删除失败,请检查是否符合删除条件");
//
//        }
        return Result.seccess(reportingWorkService.deleteWorkSv(reportingWorkId,processId,thisProcess));
        }
    }
    @ApiOperation("质检审核查询接口")