抄送按钮显示

master
chen 4 years ago
parent 427838b11e
commit 89cc3a8726
  1. 31
      dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/controller/DgCopyForController.java

@ -1,18 +1,19 @@
package com.daqing.financial.guarantee.controller; 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.model.request.CopySendRequest;
import com.daqing.financial.guarantee.service.IDgCopyForService; import com.daqing.financial.guarantee.service.IDgCopyForService;
import com.daqing.financial.guarantee.util.R; import com.daqing.financial.guarantee.util.R;
import com.daqing.financial.hrauth.annotation.Log; import com.daqing.financial.hrauth.annotation.Log;
import com.daqing.financial.hrauth.enums.OperationType; import com.daqing.financial.hrauth.enums.OperationType;
import com.daqing.financial.hrauth.enums.OperationUnit; import com.daqing.financial.hrauth.enums.OperationUnit;
import com.daqing.framework.domain.guarantee.DgCopyFor;
import io.swagger.annotations.Api; import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation; import io.swagger.annotations.ApiOperation;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.*;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import java.io.IOException; 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<DgCopyFor>().
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);
}
} }

Loading…
Cancel
Save