|
@@ -205,15 +205,28 @@ public class ExMaTwoController extends BladeController {
|
|
|
@ApiOperationSupport(order = 7)
|
|
|
@ApiOperation(value = "获取合同段发票信息", notes = "传入项目id")
|
|
|
public R<ContractInvoiceInfoVO> getContractInvoiceInfo(@RequestParam String projectId) {
|
|
|
- List<ControlContractInfo> query = jdbcTemplate.query("select * from c_control_contract_info where project_id = " + projectId, new BeanPropertyRowMapper<>(ControlContractInfo.class));
|
|
|
- if (query.size() == 1) {
|
|
|
- ControlContractInfo controlContractInfo = query.get(0);
|
|
|
- if (controlContractInfo != null) {
|
|
|
- ContractInvoiceInfoVO vo = BeanUtil.copyProperties(controlContractInfo, ContractInvoiceInfoVO.class);
|
|
|
- return R.data(vo);
|
|
|
+ if (StringUtils.isNotEmpty(projectId)) {
|
|
|
+ List<ControlContractInfo> query = jdbcTemplate.query("select * from c_control_contract_info where project_id = " + projectId, new BeanPropertyRowMapper<>(ControlContractInfo.class));
|
|
|
+ if (query.size() == 1) {
|
|
|
+ ControlContractInfo controlContractInfo = query.get(0);
|
|
|
+ if (controlContractInfo != null) {
|
|
|
+ ContractInvoiceInfoVO vo = BeanUtil.copyProperties(controlContractInfo, ContractInvoiceInfoVO.class);
|
|
|
+ return R.data(vo);
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
return R.data(null);
|
|
|
}
|
|
|
|
|
|
+ @GetMapping("/getInvoiceContentList")
|
|
|
+ @ApiOperationSupport(order = 8)
|
|
|
+ @ApiOperation(value = "获取发票内容列表")
|
|
|
+ public R<List<String>> getInvoiceContentList() {
|
|
|
+ List<DictInfo> query = jdbcTemplate.query("select dict_name from c_dict_info where type = 7", new BeanPropertyRowMapper<>(DictInfo.class));
|
|
|
+ if (query.size() > 0) {
|
|
|
+ return R.data(query.stream().map(DictInfo::getDictName).collect(Collectors.toList()));
|
|
|
+ }
|
|
|
+ return R.data(null);
|
|
|
+ }
|
|
|
+
|
|
|
}
|