Merge branch 'dev_New_pro' of http://114.132.189.42:9002/r/product-inventory-management-after into dev_New_pro
| | |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import java.util.Arrays; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * <p> |
| | |
| | | return R.ok(listPage); |
| | | } |
| | | |
| | | @GetMapping("/getAccountInvoiceApplicationList") |
| | | @Log(title = "根据客户id查询开票申请台账", businessType = BusinessType.OTHER) |
| | | @Operation(summary = "财务管理--开票申请台账") |
| | | public R<List<AccountInvoiceApplicationVo>> getAccountInvoiceApplicationList(@RequestParam Integer customerId){ |
| | | return R.ok(accountInvoiceApplicationService.getAccountInvoiceApplicationList(customerId)); |
| | | } |
| | | |
| | | @GetMapping("/getOutboundBatchesByCustomer") |
| | | @Log(title = "根据客户查询出库单号(开票申请)", businessType = BusinessType.OTHER) |
| | | @Operation(summary = "财务管理--根据客户查询出库单号(开票申请)") |
| | |
| | | |
| | | //判断该出库记录是否有开票申请 |
| | | boolean existsByStockOutRecordId(@Param("stockOutRecordIds") List<Long> stockOutRecordIds); |
| | | |
| | | List<AccountInvoiceApplicationVo> selectAccountInvoiceApplicationList(@Param("customerId") Integer customerId); |
| | | } |
| | |
| | | return removeBatchByIds(ids); |
| | | } |
| | | |
| | | @Override |
| | | public List<AccountInvoiceApplicationVo> getAccountInvoiceApplicationList(Integer customerId) { |
| | | return accountInvoiceApplicationMapper.selectAccountInvoiceApplicationList(customerId); |
| | | } |
| | | |
| | | private String genInvoiceApplicationNo() { |
| | | return "KP" + LocalDateTime.now().format(CODE_TIME_FORMATTER) + new Random().nextInt(10); |
| | | } |
| | |
| | | void exportAccountInvoiceApplication(HttpServletResponse response, AccountInvoiceApplicationDto accountInvoiceApplicationDto); |
| | | |
| | | boolean deleteAccountInvoiceApplication(List<Long> ids); |
| | | |
| | | List<AccountInvoiceApplicationVo> getAccountInvoiceApplicationList(Integer customerId); |
| | | } |
| | |
| | | </foreach> |
| | | ) |
| | | </select> |
| | | <select id="selectAccountInvoiceApplicationList" |
| | | resultType="com.ruoyi.account.bean.vo.sales.AccountInvoiceApplicationVo"> |
| | | select |
| | | * |
| | | from ( |
| | | select aia.*, |
| | | asi.id AS sales_invoice_id, |
| | | asi.status AS sales_invoice_status, |
| | | c.customer_name, |
| | | GROUP_CONCAT(sour.outbound_batches SEPARATOR ',') AS outboundBatches |
| | | from account_invoice_application aia |
| | | left join customer c on aia.customer_id = c.id |
| | | left join stock_out_record sour on FIND_IN_SET(sour.id, aia.stock_out_record_ids) > 0 |
| | | left join account_sales_invoice asi on aia.id = asi.account_invoice_application_id |
| | | GROUP BY aia.id |
| | | )A |
| | | WHERE A.customer_id = #{customerId} |
| | | AND (COALESCE(A.sales_invoice_id,'') = '' OR A.sales_invoice_status = 1) |
| | | AND A.status = 1 |
| | | order by A.id desc |
| | | </select> |
| | | |
| | | </mapper> |