| | |
| | | import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.by4cloud.platformx.business.dto.BankStatementUpdateDTO; |
| | | import com.by4cloud.platformx.business.dto.BipQueryDTO; |
| | | import com.by4cloud.platformx.business.entity.BankStatement; |
| | | import com.by4cloud.platformx.business.entity.BusinessCustomer; |
| | | import com.by4cloud.platformx.common.core.util.R; |
| | | import com.by4cloud.platformx.common.log.annotation.SysLog; |
| | | import com.by4cloud.platformx.business.service.BankStatementService; |
| | | import com.by4cloud.platformx.common.security.util.SecurityUtils; |
| | | import org.springframework.beans.factory.annotation.Value; |
| | | import org.springframework.security.access.prepost.PreAuthorize; |
| | | import com.by4cloud.platformx.common.excel.annotation.ResponseExcel; |
| | | import io.swagger.v3.oas.annotations.security.SecurityRequirement; |
| | |
| | | import lombok.RequiredArgsConstructor; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import java.util.ArrayList; |
| | | import java.util.List; |
| | | import java.util.Objects; |
| | | |
| | |
| | | |
| | | private final BankStatementService bankStatementService; |
| | | |
| | | @Value("${dept.smj}") |
| | | private String smj; |
| | | |
| | | @Value("${dept.smjhw}") |
| | | private String smjhw; |
| | | |
| | | /** |
| | | * 分页查询 |
| | | * @param page 分页对象 |
| | |
| | | @GetMapping("/page" ) |
| | | @PreAuthorize("@pms.hasPermission('business_bankStatement_view')" ) |
| | | public R getBankStatementPage(@ParameterObject Page page, @ParameterObject BankStatement bankStatement) { |
| | | if (StrUtil.equals(SecurityUtils.getUser().getCompId() + "", smj) || StrUtil.equals(SecurityUtils.getUser().getCompId() + "", smjhw)) { |
| | | LambdaQueryWrapper<BankStatement> wrapper = Wrappers.lambdaQuery(); |
| | | wrapper.like(StrUtil.isNotBlank(bankStatement.getPayBankAccName()),BankStatement::getPayBankAccName,bankStatement.getPayBankAccName()); |
| | | wrapper.like(StrUtil.isNotBlank(bankStatement.getReceiveBankAccName()),BankStatement::getReceiveBankAccName,bankStatement.getReceiveBankAccName()); |
| | | wrapper.orderByDesc(BankStatement::getCreateTime); |
| | | List<String> smjList = new ArrayList<>(); |
| | | smjList.add(smj); |
| | | smjList.add(smjhw); |
| | | wrapper.in(BankStatement::getCompId, smjList); |
| | | return R.ok(bankStatementService.page(page, wrapper)); |
| | | } |
| | | LambdaQueryWrapper<BankStatement> wrapper = Wrappers.lambdaQuery(); |
| | | wrapper.like(StrUtil.isNotBlank(bankStatement.getPayBankAccName()),BankStatement::getPayBankAccName,bankStatement.getPayBankAccName()); |
| | | wrapper.like(StrUtil.isNotBlank(bankStatement.getReceiveBankAccName()),BankStatement::getReceiveBankAccName,bankStatement.getReceiveBankAccName()); |
| | |
| | | return bankStatementService.backAll(id); |
| | | } |
| | | |
| | | /** |
| | | * 生成收款单预信息并推送 |
| | | * @param updateDTO |
| | | * @return R |
| | | */ |
| | | @Operation(summary = "生成收款单预信息并推送" , description = "生成收款单预信息并推送" ) |
| | | @PostMapping("/saveAndPush" ) |
| | | public R saveAndPush(@RequestBody BankStatementUpdateDTO updateDTO) { |
| | | return bankStatementService.saveAndPush(updateDTO); |
| | | } |
| | | |
| | | /** |
| | | * 分页查询 |
| | | * @param page 分页对象 |
| | | * @param queryDTO 银行流水 |
| | | * @return |
| | | */ |
| | | @Operation(summary = "分页查询" , description = "分页查询" ) |
| | | @GetMapping("/pageBip" ) |
| | | public R pageBip(@ParameterObject Page page, @ParameterObject BipQueryDTO queryDTO) { |
| | | return R.ok(bankStatementService.pageBip(page, queryDTO)); |
| | | } |
| | | } |