parent
79eef3e7c4
commit
01b8955fdc
@ -0,0 +1,85 @@ |
|||||||
|
package com.jianshui.web.controller.platform; |
||||||
|
|
||||||
|
import cn.hutool.core.bean.BeanUtil; |
||||||
|
import com.jianshui.common.core.controller.BaseController; |
||||||
|
import com.jianshui.common.core.domain.AjaxResult; |
||||||
|
import com.jianshui.common.core.page.TableDataInfo; |
||||||
|
import com.jianshui.invoice.domain.BillInfo; |
||||||
|
import com.jianshui.invoice.domain.Invoice; |
||||||
|
import com.jianshui.invoice.domain.dto.HXResponse; |
||||||
|
import com.jianshui.invoice.mapper.BillInfoMapper; |
||||||
|
import com.jianshui.invoice.mapper.InvoiceMapper; |
||||||
|
import com.jianshui.platform.dto.DocumentListQueryPDTO; |
||||||
|
import com.jianshui.platform.dto.InvoiceAdd.BillInfoPDTO; |
||||||
|
import com.jianshui.platform.dto.InvoiceListQueryPDTO; |
||||||
|
import com.jianshui.platform.dto.invoicered.InvoiceQueryPDTO; |
||||||
|
import com.jianshui.platform.service.InvoiceAddService; |
||||||
|
import com.jianshui.platform.vo.InvoiceListPVO; |
||||||
|
import com.jianshui.platform.vo.invoicered.InvoiceQueryPVO; |
||||||
|
import io.swagger.annotations.Api; |
||||||
|
import io.swagger.annotations.ApiOperation; |
||||||
|
import org.springframework.beans.factory.annotation.Autowired; |
||||||
|
import org.springframework.web.bind.annotation.*; |
||||||
|
|
||||||
|
import java.util.List; |
||||||
|
|
||||||
|
|
||||||
|
/** |
||||||
|
* 发票录入 |
||||||
|
* |
||||||
|
*/ |
||||||
|
@Api(tags={"单据管理"},value = "") |
||||||
|
@RestController |
||||||
|
@RequestMapping("/platForm/billInfoAdd/") |
||||||
|
public class BillInfoAddController extends BaseController { |
||||||
|
|
||||||
|
@Autowired |
||||||
|
private InvoiceAddService addService; |
||||||
|
|
||||||
|
@Autowired |
||||||
|
private BillInfoMapper billInfoMapper; |
||||||
|
|
||||||
|
@ApiOperation(value = "单据保存",notes = "单据保存请求(支持数电普票、数电专票)") |
||||||
|
@PostMapping( "invoiceSave") |
||||||
|
public AjaxResult invoiceSave(@RequestBody BillInfoPDTO billInfoPDTO) throws Exception { |
||||||
|
return toAjax(addService.invoiceSave(billInfoPDTO)); |
||||||
|
} |
||||||
|
|
||||||
|
@ApiOperation(value = "单据管理列表",notes = "发票管理") |
||||||
|
@GetMapping( "documentList") |
||||||
|
public TableDataInfo documentList(DocumentListQueryPDTO queryPDTO) throws Exception { |
||||||
|
|
||||||
|
startPage(); |
||||||
|
BillInfo billInfo = BeanUtil.copyProperties(queryPDTO,BillInfo.class); |
||||||
|
List<BillInfo> billInfoList = billInfoMapper.selectBillInfoList(billInfo); |
||||||
|
|
||||||
|
List<InvoiceListPVO> invoiceListPVOS = BeanUtil.copyToList(billInfoList,InvoiceListPVO.class); |
||||||
|
return getDataTable(invoiceListPVOS); |
||||||
|
} |
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
} |
@ -0,0 +1,32 @@ |
|||||||
|
package com.jianshui.platform.service; |
||||||
|
|
||||||
|
|
||||||
|
import com.jianshui.invoice.domain.dto.HXResponse; |
||||||
|
import com.jianshui.platform.dto.InvoiceAdd.BillInfoPDTO; |
||||||
|
|
||||||
|
/** |
||||||
|
* @Author: kk |
||||||
|
* @Description: 单据管理 |
||||||
|
* @DateTime: 2023/6/26 11:57 |
||||||
|
*/ |
||||||
|
public interface BillInfoAddService { |
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
} |
@ -0,0 +1,51 @@ |
|||||||
|
package com.jianshui.platform.service.impl; |
||||||
|
|
||||||
|
import cn.hutool.core.bean.BeanUtil; |
||||||
|
import com.jianshui.common.core.domain.entity.Companyservice; |
||||||
|
import com.jianshui.common.exception.jianshui.JianshuiServiceException; |
||||||
|
import com.jianshui.common.utils.SecurityUtils; |
||||||
|
import com.jianshui.common.utils.ValidateUtils; |
||||||
|
import com.jianshui.invoice.domain.BillInfo; |
||||||
|
import com.jianshui.invoice.domain.dto.HXResponse; |
||||||
|
import com.jianshui.invoice.enums.ChannelSource; |
||||||
|
import com.jianshui.invoice.factory.IInvoiceServiceFactory; |
||||||
|
import com.jianshui.invoice.mapper.BillInfoMapper; |
||||||
|
import com.jianshui.invoice.mapper.InvoiceMapper; |
||||||
|
import com.jianshui.invoice.service.IInvoiceApiService; |
||||||
|
import com.jianshui.platform.dto.InvoiceAdd.BillInfoPDTO; |
||||||
|
import com.jianshui.platform.dto.InvoiceAdd.species.BillInfoSDGenInvoicePDTO; |
||||||
|
import com.jianshui.platform.dto.InvoiceAdd.species.BillInfoSDSpecialInvoicePDTO; |
||||||
|
import com.jianshui.platform.service.BillInfoAddService; |
||||||
|
import com.jianshui.platform.service.InvoiceAddService; |
||||||
|
import com.jianshui.platform.utils.InvoiceAllYhdjUtils; |
||||||
|
import com.jianshui.system.domain.InvoiceAllYhdj; |
||||||
|
import com.jianshui.system.mapper.CompanyserviceMapper; |
||||||
|
import com.jianshui.system.service.IServiceManageService; |
||||||
|
import lombok.extern.slf4j.Slf4j; |
||||||
|
import org.springframework.beans.factory.annotation.Autowired; |
||||||
|
import org.springframework.stereotype.Service; |
||||||
|
|
||||||
|
import java.util.Optional; |
||||||
|
|
||||||
|
|
||||||
|
/** |
||||||
|
* @Author: kk |
||||||
|
* @Description: 单据管理 |
||||||
|
* @DateTime: 2023/6/26 11:58 |
||||||
|
*/ |
||||||
|
@Service |
||||||
|
@Slf4j |
||||||
|
public class BillInfoAddServiceImpl implements BillInfoAddService { |
||||||
|
|
||||||
|
@Autowired |
||||||
|
private static BillInfoMapper billInfoMapper; |
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
} |
Loading…
Reference in new issue