|
@@ -16,6 +16,7 @@
|
|
|
*/
|
|
|
package org.springblade.manager.controller;
|
|
|
|
|
|
+import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
|
|
import com.mixsmart.utils.StringUtils;
|
|
|
import io.swagger.annotations.*;
|
|
|
import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
|
|
@@ -47,6 +48,8 @@ import org.springblade.manager.service.IContractInfoService;
|
|
|
import org.springblade.manager.service.impl.ArchiveTreeContractSyncImpl;
|
|
|
import org.springblade.manager.vo.*;
|
|
|
|
|
|
+import org.springframework.jdbc.core.BeanPropertyRowMapper;
|
|
|
+import org.springframework.jdbc.core.JdbcTemplate;
|
|
|
import org.springframework.web.bind.annotation.*;
|
|
|
import org.springframework.web.bind.annotation.RequestParam;
|
|
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
|
@@ -82,6 +85,7 @@ public class ArchiveTreeContractController extends BladeController {
|
|
|
private final ArchiveTreeContractSyncImpl archiveTreeContractSync;
|
|
|
|
|
|
private final IContractInfoService contractInfoService;
|
|
|
+ private final JdbcTemplate jdbcTemplate;
|
|
|
|
|
|
/**
|
|
|
* 详情
|
|
@@ -90,7 +94,19 @@ public class ArchiveTreeContractController extends BladeController {
|
|
|
@ApiOperationSupport(order = 1)
|
|
|
@ApiOperation(value = "详情", notes = "传入archiveTreeContract")
|
|
|
public R<ArchiveTreeContract> detail(ArchiveTreeContract archiveTreeContract) {
|
|
|
- ArchiveTreeContract detail = archiveTreeContractService.getOne(Condition.getQueryWrapper(archiveTreeContract));
|
|
|
+ ArchiveTreeContract detail = archiveTreeContractService.getOne(Wrappers.lambdaQuery(ArchiveTreeContract.class).eq(ArchiveTreeContract::getId,archiveTreeContract.getId()));
|
|
|
+ Long contractId1 = detail.getContractId();
|
|
|
+ if(contractId1==null){
|
|
|
+ contractId1=archiveTreeContract.getContractId();
|
|
|
+ }
|
|
|
+ String sql="select * from m_contract_info where id="+contractId1;
|
|
|
+ ContractInfo info = jdbcTemplate.queryForObject(sql, new BeanPropertyRowMapper<>(ContractInfo.class));
|
|
|
+ if(detail.getRollor()==null&&info!=null&&info.getFiler()!=null){
|
|
|
+ detail.setRollor(info.getFiler());
|
|
|
+ }
|
|
|
+ if(detail.getReviewer()==null&&info!=null&&info.getReviewer()!=null){
|
|
|
+ detail.setReviewer(info.getReviewer());
|
|
|
+ }
|
|
|
return R.data(detail);
|
|
|
}
|
|
|
|