From 89cc3a87261715c8ff7739e5504784e1e672ed09 Mon Sep 17 00:00:00 2001 From: chen <1251790704@qq.com> Date: Thu, 25 Mar 2021 11:41:05 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8A=84=E9=80=81=E6=8C=89=E9=92=AE=E6=98=BE?= =?UTF-8?q?=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../controller/DgCopyForController.java | 31 ++++++++++++++++--- 1 file changed, 27 insertions(+), 4 deletions(-) diff --git a/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/controller/DgCopyForController.java b/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/controller/DgCopyForController.java index 50bad371..7c0d1055 100644 --- a/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/controller/DgCopyForController.java +++ b/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/controller/DgCopyForController.java @@ -1,18 +1,19 @@ package com.daqing.financial.guarantee.controller; +import cn.hutool.core.util.ObjectUtil; +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.daqing.financial.guarantee.model.request.CopySendRequest; import com.daqing.financial.guarantee.service.IDgCopyForService; import com.daqing.financial.guarantee.util.R; import com.daqing.financial.hrauth.annotation.Log; import com.daqing.financial.hrauth.enums.OperationType; import com.daqing.financial.hrauth.enums.OperationUnit; +import com.daqing.framework.domain.guarantee.DgCopyFor; import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; +import org.apache.commons.lang3.StringUtils; import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.web.bind.annotation.PostMapping; -import org.springframework.web.bind.annotation.RequestBody; -import org.springframework.web.bind.annotation.RequestMapping; -import org.springframework.web.bind.annotation.RestController; +import org.springframework.web.bind.annotation.*; import java.io.IOException; @@ -48,4 +49,26 @@ public class DgCopyForController { } } + @Log(detail = "抄送",level = 4,operationUnit = OperationUnit.COPYFOR,operationType = OperationType.SELECT) + @ApiOperation("查询抄送详情") + @GetMapping("/queryCopySendDetail") + public R queryCopySendDetail(Integer businessId, Integer processId, Integer status){ + //审批状态已审核显示抄送按钮 + if (status==2){ + DgCopyFor one = copyForService.getOne(new QueryWrapper(). + eq("business_id", businessId).eq("process_id", processId)); + //对象不存在,直接返回,不显示 + if (ObjectUtil.isNull(one)) { + return R.ok().success(false); + } + String picUrl = one.getPicUrl(); + //详情不存在,返回true,显示按钮 + boolean exsit = StringUtils.isEmpty(picUrl); + + return exsit ? R.ok() : R.ok().success(false); + } + //其他情况不显示抄送按钮 + return R.ok().success(false); + } + }