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 386d3089..d0c30c91 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.framework.domain.guarantee.DgCopyFor; import com.daqing.framework.annotation.Log; import com.daqing.framework.enums.OperationType; import com.daqing.framework.enums.OperationUnit; 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); + } + }