Commit c200a06a by 崔彦峰

feat(vcp-api): 添加行驶证住址OCR识别功能和财务台账管理模块

- 在CarLicenseOcrResDTO、EvalCarBase实体类和EvalCarBaseReqDTO中新增licenseAddress字段用于存储OCR识别的行驶证住址
- 新增FinancialLedgerDTO用于财务台账查询结果的数据传输
- 创建FinancialLedgerExcelDTO实现财务台账Excel导出功能
- 添加FinancialLedgerPageRequest支持财务台账分页查询请求
- 实现FinancialLedgerRemote远程调用接口提供财务台账相关服务
- 修改AliyunOcrService将OCR识别的地址信息映射到licenseAddress字段
- 更新EvalCarBaseMapper.xml添加licenseAddress等字段的数据库映射配置
- 在CarLicenseOcrVO中增加licenseAddress字段定义
- 创建FinancialLedgerController提供财务台账管理Web接口
- 实现FinancialLedgerService处理财务台账业务逻辑
2 parents 2819721c 9bf11ef5
package com.gsc4cloud.gsc.facade.vpcweb.controller.financialledger;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.gsc4cloud.gsc.common.core.util.R;
import com.gsc4cloud.gsc.facade.vpcweb.anotation.RopSession;
import com.gsc4cloud.gsc.facade.vpcweb.service.financialledger.FinancialLedgerService;
import com.gsc4cloud.gsc.vpc.api.dto.web.resdto.financialledger.FinancialLedgerDTO;
import com.gsc4cloud.gsc.vpc.api.req.PageRequest;
import com.gsc4cloud.gsc.vpc.api.req.web.financialledger.FinancialLedgerPageRequest;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import jakarta.annotation.Resource;
import lombok.extern.slf4j.Slf4j;
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;
/**
* 财务台账管理(Web 端)
*/
@Slf4j
@RestController
@RequestMapping("/financialLedger")
@Tag(name = "财务台账管理")
public class FinancialLedgerController {
@Resource
private FinancialLedgerService financialLedgerService;
/**
* 财务台账分页列表
*/
@RopSession
@Operation(summary = "财务台账分页列表")
@PostMapping("/pageList")
public R<Page<FinancialLedgerDTO>> pageList(@RequestBody PageRequest<FinancialLedgerPageRequest> request) {
log.info("财务台账分页查询,请求参数: {}", request);
try {
return financialLedgerService.pageList(request);
} catch (Exception e) {
log.error("财务台账分页查询异常", e);
return R.failed(e.getMessage());
}
}
/**
* 异步导出财务台账
*/
@RopSession
@Operation(summary = "异步导出财务台账")
@PostMapping("/exportAsync")
public R<String> exportAsync(@RequestBody FinancialLedgerPageRequest request) {
log.info("财务台账异步导出,请求参数: {}", request);
try {
return financialLedgerService.exportAsync(request);
} catch (Exception e) {
log.error("财务台账异步导出异常", e);
return R.failed(e.getMessage());
}
}
}
package com.gsc4cloud.gsc.facade.vpcweb.service.financialledger;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.gsc4cloud.gsc.common.core.util.R;
import com.gsc4cloud.gsc.facade.vpcweb.utils.ThreadLocalCache;
import com.gsc4cloud.gsc.vpc.api.dto.web.resdto.financialledger.FinancialLedgerDTO;
import com.gsc4cloud.gsc.vpc.api.feign.web.financialledger.FinancialLedgerRemote;
import com.gsc4cloud.gsc.vpc.api.req.PageRequest;
import com.gsc4cloud.gsc.vpc.api.req.web.financialledger.FinancialLedgerPageRequest;
import jakarta.annotation.Resource;
import lombok.extern.slf4j.Slf4j;
import org.springframework.core.env.Environment;
import org.springframework.stereotype.Service;
/**
* 财务台账服务(Web Facade 层)
*/
@Slf4j
@Service
public class FinancialLedgerService {
@Resource
private FinancialLedgerRemote financialLedgerRemote;
@Resource
private Environment env;
/**
* 财务台账分页列表
*/
public R<Page<FinancialLedgerDTO>> pageList(PageRequest<FinancialLedgerPageRequest> request) {
return financialLedgerRemote.pageList(request);
}
/**
* 异步导出财务台账
*/
public R<String> exportAsync(FinancialLedgerPageRequest request) {
PageRequest<FinancialLedgerPageRequest> param = new PageRequest<>(1,
env.getProperty("gsc.vpc.web.export.max.page.size.financialLedger", Integer.class, 1000));
request.setUpdatedBy(ThreadLocalCache.getLoginAccountInfo().getLoginAccout());
param.setT(request);
return financialLedgerRemote.exportAsync(param);
}
}
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!