Commit 8ad0b137 authored by eddie.woo's avatar eddie.woo

merge dev_ken

parent 5e3e54ff
package pwc.taxtech.atms.constant.enums;
public enum EnumInputInvoiceEntityType {
InvoicePaperTicket(1,"纸票"),
InvoiceElectronicTicket(2,"电子票"),
InvoiceUnKnown(99,"未知");
private int code;
private String name;
public int getCode() {
return code;
}
public String getName() {
return name;
}
EnumInputInvoiceEntityType(int code, String name) {
this.code = code;
this.name = name;
}
}
package pwc.taxtech.atms.constant.enums;
/**退票原因
*
* @author Ken Q You
*
*/
public enum EnumInputInvoiceRefundReason {
FakeInvoice(1),
InvoicePackage(2),
InvoiceStampIncorrect(3),
OtherReason (4);
private Integer code;
public Integer getCode() {
return code;
}
EnumInputInvoiceRefundReason(Integer code) {
this.code = code;
}
}
package pwc.taxtech.atms.constant.enums;
public enum EnumInputInvoiceSourceType {
InvoiceRawMaterialPurchase(1,"原料采购"),
InvoiceNonRawMaterialPurchase(2,"非原料集中采购"),
InvoiceClaim(3,"报销"),
InvoiceStampIncorrect(4,"发票章错误"),
InvoiceUnKnown(99,"未知");
private int code;
private String name;
public int getCode() {
return code;
}
public String getName() {
return name;
}
EnumInputInvoiceSourceType(int code, String name) {
this.code = code;
this.name = name;
}
}
package pwc.taxtech.atms.constant.enums;
public enum EnumInputInvoiceStatusType {
InvoiceHasUpload(1,"已上传"),
InvoiceUnrecognize(3,"无法识别"),
InvoiceHasRefund(4,"已退票"),
InvoiceVerifyFailure(6,"验真失败"),
InvoicePendingMatc(7,"待匹配"),
InvoiceHasMatch(8,"已匹配"),
InvoicePendingVerify(9,"待认证"),
InvoiceHasVerify(10,"已认证"),
InvoiceUnableVerify(11,"无法认证"),
InvoiceHasClean(13,"已清理"),
InvoiceHasExpired(14,"已失效"),
InvoicePendingRefund(16,"待退票"),
InvoiceDuplicate(18,"已重复"),
InvoiceRecognizeInProgress(100,"正在识别");
private int code;
private String name;
public int getCode() {
return code;
}
public String getName() {
return name;
}
EnumInputInvoiceStatusType(int code, String name) {
this.code = code;
this.name = name;
}
}
package pwc.taxtech.atms.constant.enums;
public enum EnumInputInvoiceType {
VatInvoiceSpecialTicket(1, "增值税专用发票"),
VatInvoiceOrdinaryTicketl(2, "增值税普通发票");
private int code;
private String name;
public int getCode() {
return code;
}
public String getName() {
return name;
}
private EnumInputInvoiceType(int code, String name) {
this.code = code;
this.name = name;
}
}
package pwc.taxtech.atms.constant.enums;
public enum EnumInputInvoiceUploadType {
InvoiceModePDF(1,"PDF上传"),
InvoiceModeScan(2,"扫描上传"),
InvoiceModeMobileDevice(3,"扫描枪上传"),
InvoiceFromAPI(4,"未认证发票来自接口");
private int code;
private String name;
public int getCode() {
return code;
}
public String getName() {
return name;
}
EnumInputInvoiceUploadType(int code, String name) {
this.code = code;
this.name = name;
}
}
package pwc.taxtech.atms.constant.enums;
import org.joda.time.Years;
/**
* 是否计入进项税额
* @author Ken Q You
*
*/
public enum EnumIsIncludedInTaxAmountType {
Year(1,"是"),
No(2,"否"),
NotRecognized(3,"未识别"),
Partial(4,"部分计入进项税额");
private int code;
private String name;
public int getCode() {
return code;
}
public String getName() {
return name;
}
EnumIsIncludedInTaxAmountType(int code, String name) {
this.code = code;
this.name = name;
}
}
package pwc.taxtech.atms.constant.enums;
/**
* 服务类型
* @author Ken Q You
*
*/
public enum EnumProductionServiceType {
AcquireIntangibleAssets(1,"取得无形资产"),
TheRightToUseTheLand(2,"受让土地使用权"),
TransportService(3,"运输服务"),
TelecommunicationsService(4,"电信服务"),
PhysicalAndCommercialLeasing(5,"有形动产租赁"),
ImmovablePropertyLeasing(6,"不动产租赁"),
BuildingInstallationService(7,"建筑安装服务"),
FinancialInsuranceService(8,"金融保险服务"),
ServiceForLife(9,"生活服务");
private int code;
private String name;
public int getCode() {
return code;
}
public String getName() {
return name;
}
EnumProductionServiceType(int code, String name) {
this.code = code;
this.name = name;
}
}
package pwc.taxtech.atms.constant.enums;
/**
* 商品类型
* @author Ken Q You
*
*/
public enum EnumProductionType {
RawMaterialForProduce(1,"用于生产的原材料"),
RawMaterialForSale(2,"用于直接销售的原材料"),
FixedAssetsMovable(3,"固定资产-动产"),
FixedAssetsNonmoveable(4,"固定资产-不动产"),
EmployeeBenefit(5,"员工福利"),
PromotionalProducts(6,"促销品"),
TaxControlSystemEquipmentAndMaintenanceCosts(7,"税控系统设备及维护费用"),
Service(8,"服务"),
GoodsAndProcessingRepairAndRepairServices(9,"货物及加工修理修配劳务"),
Other(10,"其他");
private int code;
private String name;
public int getCode() {
return code;
}
public String getName() {
return name;
}
EnumProductionType(int code, String name) {
this.code = code;
this.name = name;
}
}
......@@ -24,7 +24,7 @@ public class InputInvoiceImportController {
@RequestMapping(value = "inputInvoicePreviewList", method = RequestMethod.POST, produces = MediaType.APPLICATION_JSON_UTF8_VALUE)
public @ResponseBody
PagingResultDto<InputVATInvoiceDto> getInputInvoiceTreeViewData(@RequestBody InputInvoicePreviewQueryParam paras) {
return inputInvoiceDataImportService.getInputInvoiceTreeViewData(paras);
return inputInvoiceDataImportService.getInputInvoiceTreeViewData(paras);
}
@RequestMapping(value = "exportQueryData/get", method = RequestMethod.POST, produces = MediaType.APPLICATION_JSON_UTF8_VALUE)
......
package pwc.taxtech.atms.controller.input;
import org.apache.http.HttpStatus;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.MediaType;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
......@@ -9,16 +11,32 @@ import org.springframework.web.bind.annotation.ResponseBody;
import com.github.pagehelper.PageHelper;
import io.swagger.annotations.ApiOperation;
import pwc.taxtech.atms.controller.BaseController;
import pwc.taxtech.atms.dto.OperationResultDto;
import pwc.taxtech.atms.dto.input.CamelPagingDto;
import pwc.taxtech.atms.dto.input.CamelPagingResultDto;
import pwc.taxtech.atms.dto.input.InputInvoiceDto;
import pwc.taxtech.atms.dto.input.InputInvoiceQueryDto;
import pwc.taxtech.atms.dto.input.InvoiceFilterDto;
import pwc.taxtech.atms.dto.vatdto.CustomsInvoiceFilter;
import pwc.taxtech.atms.dto.vatdto.JsonCustomsInvoiceDto;
import pwc.taxtech.atms.dto.vatdto.OutputVATInvoiceInfoDto;
import pwc.taxtech.atms.dto.vatdto.QueryOutputDto;
import pwc.taxtech.atms.entitiy.InputInvoice;
import pwc.taxtech.atms.service.InvoiceManageService;
import pwc.taxtech.atms.thirdparty.ExcelSheet;
import pwc.taxtech.atms.thirdparty.ExcelUtil;
import java.io.IOException;
import java.io.OutputStream;
import java.math.BigDecimal;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.UUID;
import javax.servlet.http.HttpServletResponse;
@Controller
@RequestMapping(value = "api/v1/invoiceManage")
......@@ -27,19 +45,90 @@ public class InvoiceManageController extends BaseController {
@Autowired
private InvoiceManageService invoiceManageService;
@ApiOperation(value = "查询所有发票")
@ResponseBody
@RequestMapping(value = "getInputInvoiceList", method = RequestMethod.POST)
public CamelPagingResultDto<InputInvoice> getInputInvoiceList(@RequestBody InputInvoiceQueryDto inputInvoiceQueryDto) {
CamelPagingResultDto<InputInvoice> resultDto = new CamelPagingResultDto<InputInvoice>();
public CamelPagingResultDto<InputInvoiceDto> getInputInvoiceList(@RequestBody InputInvoiceQueryDto inputInvoiceQueryDto) {
CamelPagingResultDto<InputInvoiceDto> resultDto = new CamelPagingResultDto<InputInvoiceDto>();
try {
CamelPagingDto camelPagingDto=inputInvoiceQueryDto.getPagingDto()==null?new CamelPagingDto():inputInvoiceQueryDto.getPagingDto();
resultDto = invoiceManageService.getInputInvoiceList(inputInvoiceQueryDto);
resultDto = invoiceManageService.getInputInvoiceList(inputInvoiceQueryDto.getInvoiceQuery(),inputInvoiceQueryDto.getPagingDto());
//todo 业务代码
} catch (Exception e) {
logger.error("getInputInvoiceList error.",e);
}
return resultDto;
}
@RequestMapping(value = "exportInputInvoiceList", method = RequestMethod.POST, produces = MediaType.APPLICATION_JSON_UTF8_VALUE)
public void downloadInvoiceQueryData(@RequestBody InputInvoiceQueryDto inputInvoiceQueryDto, HttpServletResponse response) {
response.setContentType("application/vnd.ms-excel;charset=utf-8");
response.setHeader("Content-Disposition", "attachment;filename="
+ UUID.randomUUID() + ".xls");
response.setHeader("x-file-name",UUID.randomUUID() + ".xlsx");
OutputStream os = null;
try {
os = response.getOutputStream();
int count = getDownloadFilePath(inputInvoiceQueryDto, os);
if(count==0){
response.setStatus(HttpStatus.SC_NO_CONTENT);
}
else
{
response.setStatus(HttpStatus.SC_OK);
}
} catch (IOException e) {
e.printStackTrace();
}
}
private int getDownloadFilePath(InputInvoiceQueryDto inputInvoiceQueryDto, OutputStream outputStream) {
List<InputInvoiceDto> list = invoiceManageService.getInputInvoiceDtoList(inputInvoiceQueryDto);
if(list.size()>0) {
for(InputInvoiceDto i:list) {
System.out.println(i.getBuyerName());
}
}
if (list.size() == 0) {
return 0;
}
Map<String, String> header = new HashMap<>();
header.put("invoiceCode", "发票代码");
header.put("invoiceNumber", "发票号码");
header.put("invoiceDate", "开票日期");
header.put("buyerTaxNumber", "购方税号");
header.put("buyerName", "购方企业名称");
header.put("sellerTaxNumber", "销售方税号");
header.put("sellerName", "销售方名称");
header.put("amount", "票面金额(不含税)");
header.put("taxAmount", "税额");
//header.put(" ", "票面金额(含税)");
header.put("invoiceType", "发票类型");
header.put("uploadType", "上传方式");
header.put("UploadDate", "上传日期");
header.put("InvoiceEntityType", "发票实体");
header.put("InvoiceSourceType", "发票来源");
header.put("Status", "发票状态");
header.put("CheckCode", "校验码");
header.put("SerialNo", "序列号");
// ExcelSheet excelSheet=new ExcelSheet<>();
// excelSheet.setHeaders(header);
// excelSheet.setDataset(list);
// excelSheet.setSheetName("aa");
// ExcelUtil.exportExcel(excelSheet, outputStream);
ExcelUtil.exportExcel(header, list, outputStream);
return list.size();
}
@ResponseBody
@RequestMapping(value = "getInvoiceFilterBasicData", method = RequestMethod.GET)
public InvoiceFilterDto exportInvoiceAllInfoList() {
InvoiceFilterDto invoiceFilterDto=invoiceManageService.getInvoiceFilterBasicData();
return invoiceFilterDto;
}
}
package pwc.taxtech.atms.dto.input;
import com.alibaba.fastjson.annotation.JSONField;
public class CamelPagingDto {
private Integer totalCount;
private Integer pageIndex;
......
......@@ -2,14 +2,22 @@ package pwc.taxtech.atms.dto.input;
import java.util.List;
import com.alibaba.fastjson.annotation.JSONField;
public class CamelPagingResultDto<T> {
@JSONField(name="List")
private List<T> list;
@JSONField(name="PageInfo")
private CamelPagingDto pageInfo;
private T calculateData;
public CamelPagingResultDto() {
super();
}
public List<T> getList() {
public List<T> getList() {
return list;
}
......
package pwc.taxtech.atms.dto.input;
import java.math.BigDecimal;
import java.util.Date;
public class InputInvoiceDto {
private Long id;
//发票关联文件ID
private String invoiceFileId;
//发票代码
private String invoiceCode;
//发票号码
private String invoiceNumber;
//开票日期
private Date invoiceDate;
//发票名称
private String invoiceName;
//购货方税号
private String buyerTaxNumber;
//购货方名称
private String buyerName;
//购货方地址
private String buyerAddress;
//购货方电话
private String buyerPhone;
//购货方银行名称
private String buyerBankName;
// 购货方银行账号
private String buyerBankAccountNumber;
//销货方税号
private String sellerTaxNumber;
//销货方名称
private String sellerName;
//销货方地址
private String sellerAddress;
//销货方电话
private String sellerPhone;
//销货方银行名称
private String sellerBankName;
//销货方银行账号
private String sellerBankAccountNumber;
//金额
private BigDecimal amount;
//税额
private BigDecimal taxAmount;
//加税合计大写
private String totalPriceUppercase;
//加税合计小写
private BigDecimal totalPriceLowercase;
//发票类型
private Integer invoiceType;
//上传类别
private Integer uploadType;
//上传时间
private Date uploadDate;
//发票实体类型
private Integer invoiceEntityType;
//发票数据源类型
private Integer invoiceSourceType;
//员工ID
private String staffId;
//订单号识别号
private String orderIdentifier;
//状态
private Integer status;
//抵扣区间
private String deductiblePeriod;
//抵扣时间
private Date deductibleDate;
//是否可抵扣
private Boolean deductible;
//校验码
private String checkCode;
private Boolean hasDownFile;
//校验方式
private Integer verifyType;
//序列号
private String serialNo;
private Integer deductibleResult;
private Boolean isRedInvoice;
//备注
private String remark;
public Long getId() {
return id;
}
public void setId(Long id) {
this.id = id;
}
public String getInvoiceFileId() {
return invoiceFileId;
}
public void setInvoiceFileId(String invoiceFileId) {
this.invoiceFileId = invoiceFileId;
}
public String getInvoiceCode() {
return invoiceCode;
}
public void setInvoiceCode(String invoiceCode) {
this.invoiceCode = invoiceCode;
}
public String getInvoiceNumber() {
return invoiceNumber;
}
public void setInvoiceNumber(String invoiceNumber) {
this.invoiceNumber = invoiceNumber;
}
public Date getInvoiceDate() {
return invoiceDate;
}
public void setInvoiceDate(Date invoiceDate) {
this.invoiceDate = invoiceDate;
}
public String getInvoiceName() {
return invoiceName;
}
public void setInvoiceName(String invoiceName) {
this.invoiceName = invoiceName;
}
public String getBuyerTaxNumber() {
return buyerTaxNumber;
}
public void setBuyerTaxNumber(String buyerTaxNumber) {
this.buyerTaxNumber = buyerTaxNumber;
}
public String getBuyerName() {
return buyerName;
}
public void setBuyerName(String buyerName) {
this.buyerName = buyerName;
}
public String getBuyerAddress() {
return buyerAddress;
}
public void setBuyerAddress(String buyerAddress) {
this.buyerAddress = buyerAddress;
}
public String getBuyerPhone() {
return buyerPhone;
}
public void setBuyerPhone(String buyerPhone) {
this.buyerPhone = buyerPhone;
}
public String getBuyerBankName() {
return buyerBankName;
}
public void setBuyerBankName(String buyerBankName) {
this.buyerBankName = buyerBankName;
}
public String getBuyerBankAccountNumber() {
return buyerBankAccountNumber;
}
public void setBuyerBankAccountNumber(String buyerBankAccountNumber) {
this.buyerBankAccountNumber = buyerBankAccountNumber;
}
public String getSellerTaxNumber() {
return sellerTaxNumber;
}
public void setSellerTaxNumber(String sellerTaxNumber) {
this.sellerTaxNumber = sellerTaxNumber;
}
public String getSellerName() {
return sellerName;
}
public void setSellerName(String sellerName) {
this.sellerName = sellerName;
}
public String getSellerAddress() {
return sellerAddress;
}
public void setSellerAddress(String sellerAddress) {
this.sellerAddress = sellerAddress;
}
public String getSellerPhone() {
return sellerPhone;
}
public void setSellerPhone(String sellerPhone) {
this.sellerPhone = sellerPhone;
}
public String getSellerBankName() {
return sellerBankName;
}
public void setSellerBankName(String sellerBankName) {
this.sellerBankName = sellerBankName;
}
public String getSellerBankAccountNumber() {
return sellerBankAccountNumber;
}
public void setSellerBankAccountNumber(String sellerBankAccountNumber) {
this.sellerBankAccountNumber = sellerBankAccountNumber;
}
public BigDecimal getAmount() {
return amount;
}
public void setAmount(BigDecimal amount) {
this.amount = amount;
}
public BigDecimal getTaxAmount() {
return taxAmount;
}
public void setTaxAmount(BigDecimal taxAmount) {
this.taxAmount = taxAmount;
}
public String getTotalPriceUppercase() {
return totalPriceUppercase;
}
public void setTotalPriceUppercase(String totalPriceUppercase) {
this.totalPriceUppercase = totalPriceUppercase;
}
public BigDecimal getTotalPriceLowercase() {
return totalPriceLowercase;
}
public void setTotalPriceLowercase(BigDecimal totalPriceLowercase) {
this.totalPriceLowercase = totalPriceLowercase;
}
public Integer getInvoiceType() {
return invoiceType;
}
public void setInvoiceType(Integer invoiceType) {
this.invoiceType = invoiceType;
}
public Integer getUploadType() {
return uploadType;
}
public void setUploadType(Integer uploadType) {
this.uploadType = uploadType;
}
public Date getUploadDate() {
return uploadDate;
}
public void setUploadDate(Date uploadDate) {
this.uploadDate = uploadDate;
}
public Integer getInvoiceEntityType() {
return invoiceEntityType;
}
public void setInvoiceEntityType(Integer invoiceEntityType) {
this.invoiceEntityType = invoiceEntityType;
}
public Integer getInvoiceSourceType() {
return invoiceSourceType;
}
public void setInvoiceSourceType(Integer invoiceSourceType) {
this.invoiceSourceType = invoiceSourceType;
}
public String getStaffId() {
return staffId;
}
public void setStaffId(String staffId) {
this.staffId = staffId;
}
public String getOrderIdentifier() {
return orderIdentifier;
}
public void setOrderIdentifier(String orderIdentifier) {
this.orderIdentifier = orderIdentifier;
}
public Integer getStatus() {
return status;
}
public void setStatus(Integer status) {
this.status = status;
}
public String getDeductiblePeriod() {
return deductiblePeriod;
}
public void setDeductiblePeriod(String deductiblePeriod) {
this.deductiblePeriod = deductiblePeriod;
}
public Date getDeductibleDate() {
return deductibleDate;
}
public void setDeductibleDate(Date deductibleDate) {
this.deductibleDate = deductibleDate;
}
public Boolean getDeductible() {
return deductible;
}
public void setDeductible(Boolean deductible) {
this.deductible = deductible;
}
public String getCheckCode() {
return checkCode;
}
public void setCheckCode(String checkCode) {
this.checkCode = checkCode;
}
public Boolean getHasDownFile() {
return hasDownFile;
}
public void setHasDownFile(Boolean hasDownFile) {
this.hasDownFile = hasDownFile;
}
public Integer getVerifyType() {
return verifyType;
}
public void setVerifyType(Integer verifyType) {
this.verifyType = verifyType;
}
public String getSerialNo() {
return serialNo;
}
public void setSerialNo(String serialNo) {
this.serialNo = serialNo;
}
public Integer getDeductibleResult() {
return deductibleResult;
}
public void setDeductibleResult(Integer deductibleResult) {
this.deductibleResult = deductibleResult;
}
public Boolean getIsRedInvoice() {
return isRedInvoice;
}
public void setIsRedInvoice(Boolean isRedInvoice) {
this.isRedInvoice = isRedInvoice;
}
public String getRemark() {
return remark;
}
public void setRemark(String remark) {
this.remark = remark;
}
}
package pwc.taxtech.atms.dto.input;
import java.math.BigDecimal;
import java.util.Date;
import java.util.List;
public class InputInvoiceQuery {
public Date getInvoiceDateTo() {
return invoiceDateTo;
}
private Boolean isP2P;
private Boolean isP2PAndMailroom;
private Boolean isInvoiceNotReceivedVerify;
private Boolean isOverView;
private List<Integer> allStatus;
private List<Integer> allInvoiceSourceType;
private List<Integer> nonClaimPendingProcessStatus;
private List<Integer> allInvoiceUploadType;
private String buyerName;
private Date invoiceDateFrom;
private Date invoiceDateTo;
private String invoiceNumber;
private String invoiceCode;
private Integer status;
private Integer invoiceEntityType;
private String sellerName;
private Date uploadDateFrom;
private Date uploadDateTo;
private BigDecimal amountFrom;
private BigDecimal amountTo;
private Integer invoiceType;
private Integer invoiceSourceType;
private Integer invoiceUploadType;
private Integer verifyType;
private String createBy;
private String serialNo;
public Boolean getIsP2P() {
return isP2P;
}
public void setIsP2P(Boolean isP2P) {
this.isP2P = isP2P;
}
public Boolean getIsP2PAndMailroom() {
return isP2PAndMailroom;
}
public void setIsP2PAndMailroom(Boolean isP2PAndMailroom) {
this.isP2PAndMailroom = isP2PAndMailroom;
}
public Boolean getIsInvoiceNotReceivedVerify() {
return isInvoiceNotReceivedVerify;
}
public void setIsInvoiceNotReceivedVerify(Boolean isInvoiceNotReceivedVerify) {
this.isInvoiceNotReceivedVerify = isInvoiceNotReceivedVerify;
}
public Boolean getIsOverView() {
return isOverView;
}
public void setIsOverView(Boolean isOverView) {
this.isOverView = isOverView;
}
public List<Integer> getAllStatus() {
return allStatus;
}
public void setAllStatus(List<Integer> allStatus) {
this.allStatus = allStatus;
}
public List<Integer> getAllInvoiceSourceType() {
return allInvoiceSourceType;
}
public void setAllInvoiceSourceType(List<Integer> allInvoiceSourceType) {
this.allInvoiceSourceType = allInvoiceSourceType;
}
public List<Integer> getNonClaimPendingProcessStatus() {
return nonClaimPendingProcessStatus;
}
public void setNonClaimPendingProcessStatus(List<Integer> nonClaimPendingProcessStatus) {
this.nonClaimPendingProcessStatus = nonClaimPendingProcessStatus;
}
public List<Integer> getAllInvoiceUploadType() {
return allInvoiceUploadType;
}
public void setAllInvoiceUploadType(List<Integer> allInvoiceUploadType) {
this.allInvoiceUploadType = allInvoiceUploadType;
}
public String getBuyerName() {
return buyerName;
}
public void setBuyerName(String buyerName) {
this.buyerName = buyerName;
}
public Date getInvoiceDateFrom() {
return invoiceDateFrom;
}
public void setInvoiceDateFrom(Date invoiceDateFrom) {
this.invoiceDateFrom = invoiceDateFrom;
}
public Date UploadDateTo() {
return invoiceDateTo;
}
public void setInvoiceDateTo(Date invoiceDateTo) {
this.invoiceDateTo = invoiceDateTo;
}
public String getInvoiceNumber() {
return invoiceNumber;
}
public void setInvoiceNumber(String invoiceNumber) {
this.invoiceNumber = invoiceNumber;
}
public String getInvoiceCode() {
return invoiceCode;
}
public void setInvoiceCode(String invoiceCode) {
this.invoiceCode = invoiceCode;
}
public Integer getStatus() {
return status;
}
public void setStatus(Integer status) {
this.status = status;
}
public Integer getInvoiceEntityType() {
return invoiceEntityType;
}
public void setInvoiceEntityType(Integer invoiceEntityType) {
this.invoiceEntityType = invoiceEntityType;
}
public String getSellerName() {
return sellerName;
}
public void setSellerName(String sellerName) {
this.sellerName = sellerName;
}
public Date getUploadDateFrom() {
return uploadDateFrom;
}
public void setUploadDateFrom(Date uploadDateFrom) {
this.uploadDateFrom = uploadDateFrom;
}
public Date getUploadDateTo() {
return uploadDateTo;
}
public void setUploadDateTo(Date uploadDateTo) {
this.uploadDateTo = uploadDateTo;
}
public BigDecimal getAmountFrom() {
return amountFrom;
}
public void setAmountFrom(BigDecimal amountFrom) {
this.amountFrom = amountFrom;
}
public BigDecimal getAmountTo() {
return amountTo;
}
public void setAmountTo(BigDecimal amountTo) {
this.amountTo = amountTo;
}
public Integer getInvoiceType() {
return invoiceType;
}
public void setInvoiceType(Integer invoiceType) {
this.invoiceType = invoiceType;
}
public Integer getInvoiceSourceType() {
return invoiceSourceType;
}
public void setInvoiceSourceType(Integer invoiceSourceType) {
this.invoiceSourceType = invoiceSourceType;
}
public Integer getInvoiceUploadType() {
return invoiceUploadType;
}
public void setInvoiceUploadType(Integer invoiceUploadType) {
this.invoiceUploadType = invoiceUploadType;
}
public Integer getVerifyType() {
return verifyType;
}
public void setVerifyType(Integer verifyType) {
this.verifyType = verifyType;
}
public String getCreateBy() {
return createBy;
}
public void setCreateBy(String createBy) {
this.createBy = createBy;
}
public String getSerialNo() {
return serialNo;
}
public void setSerialNo(String serialNo) {
this.serialNo = serialNo;
}
}
package pwc.taxtech.atms.dto.input;
import java.math.BigDecimal;
import java.util.Date;
public class InputInvoiceQueryDto {
//todo 添加其他参数
//购方企业名称
private String buyerBankName;
//销方名称
private String sellerName;
//发票号码
private String invoiceNumber;
//发票状态
private Integer status;
//上传方式
private Integer uploadType;
//发票类型
private Integer invoiceType;
//开票日期范围
private Date invoiceDate;
//上传日期范围
private Date uploadDate;
//票面金额范围
private BigDecimal amount;
//发票实体
private Integer invoiceEntityType;
//发票来源
private Integer invoiceSourceType;
//验真分类
//创建者
private String staffId;
//序列号
private String serialNo;
// private String buyerAddress;
//
// private String buyerBankAccountNumber;
//
// private String buyerName;
//
// private String buyerPhone;
//
// private String buyerTaxNumber;
//
// private String checkCode;
//
// private String createBy;
//
// private Date createTime;
@Override
public String toString() {
return "InputInvoiceQueryDto [buyerBankName=" + buyerBankName + ", sellerName=" + sellerName
+ ", invoiceNumber=" + invoiceNumber + ", status=" + status + ", uploadType=" + uploadType
+ ", invoiceType=" + invoiceType + ", invoiceDate=" + invoiceDate + ", uploadDate=" + uploadDate
+ ", amount=" + amount + ", invoiceEntityType=" + invoiceEntityType + ", invoiceSourceType="
+ invoiceSourceType + ", staffId=" + staffId + ", serialNo=" + serialNo + ", pagingDto=" + pagingDto
+ "]";
}
private InputInvoiceQuery invoiceQuery;
private CamelPagingDto pagingDto;
public CamelPagingDto getPagingDto() {
......@@ -72,108 +14,15 @@ public class InputInvoiceQueryDto {
this.pagingDto = pagingDto;
}
public String getBuyerBankName() {
return buyerBankName;
}
public void setBuyerBankName(String buyerBankName) {
this.buyerBankName = buyerBankName;
}
public String getSellerName() {
return sellerName;
}
public void setSellerName(String sellerName) {
this.sellerName = sellerName;
}
public String getInvoiceNumber() {
return invoiceNumber;
}
public void setInvoiceNumber(String invoiceNumber) {
this.invoiceNumber = invoiceNumber;
}
public Integer getStatus() {
return status;
}
public void setStatus(Integer status) {
this.status = status;
}
public Integer getUploadType() {
return uploadType;
}
public void setUploadType(Integer uploadType) {
this.uploadType = uploadType;
}
public Integer getInvoiceType() {
return invoiceType;
}
public void setInvoiceType(Integer invoiceType) {
this.invoiceType = invoiceType;
}
public Date getInvoiceDate() {
return invoiceDate;
}
public void setInvoiceDate(Date invoiceDate) {
this.invoiceDate = invoiceDate;
public InputInvoiceQuery getInvoiceQuery() {
return invoiceQuery;
}
public Date getUploadDate() {
return uploadDate;
public void setInvoiceQuery(InputInvoiceQuery invoiceQuery) {
this.invoiceQuery = invoiceQuery;
}
public void setUploadDate(Date uploadDate) {
this.uploadDate = uploadDate;
}
public BigDecimal getAmount() {
return amount;
}
public void setAmount(BigDecimal amount) {
this.amount = amount;
}
public Integer getInvoiceEntityType() {
return invoiceEntityType;
}
public void setInvoiceEntityType(Integer invoiceEntityType) {
this.invoiceEntityType = invoiceEntityType;
}
public Integer getInvoiceSourceType() {
return invoiceSourceType;
}
public void setInvoiceSourceType(Integer invoiceSourceType) {
this.invoiceSourceType = invoiceSourceType;
}
public String getStaffId() {
return staffId;
}
public void setStaffId(String staffId) {
this.staffId = staffId;
}
public String getSerialNo() {
return serialNo;
}
public void setSerialNo(String serialNo) {
this.serialNo = serialNo;
}
}
package pwc.taxtech.atms.dto.input;
import java.math.BigDecimal;
import java.util.Date;
public class InputInvoiceRelevanceDisplayDto {
private String id;
private String invoiceFileID;
private String invoiceCode;
private String invoiceNumber;
private Date invoiceDate;
private String invoiceName;
private String buyerTaxNumber;
private String buyerName;
private String buyerAddress;
private String buyerPhone;
private String buyerBankName;
private String buyerBankAccountNumber;
private String sellerTaxNumber;
private String sellerName;
private String sellerAddress;
private String sellerPhone;
private String sellerBankName;
private String sellerBankAccountNumber;
private BigDecimal amount;
private BigDecimal taxAmount;
private BigDecimal totalPriceUpperCase;
private Integer invoiceType;
private String invoiceTypeString;
private Integer uploadType;
private String uploadTypeString;
private Date uploadDate;
private Integer invoiceEntityType;
private String invoiceEntityTypeString;
private Integer invoiceSourceType;
private String invoiceSourceTypeString;
private String staffID;
private String orderIdentifier;
private String remark;
private String status;
private String statusString;
private String relevanceInfoID;
private String relevanceTypeID;
private Integer productionType;
private String productionTypeString;
private Integer serviceType;
private String serviceTypeString;
private String companyCodes;
private String costCenterCodes;
private Integer isIncludedInTaxAmount;
private String voucherNO;
private String orderVendorCode;
private String orderBuyerCode;
private Date orderDate;
private String acceptNO;
private Integer orderIndex;
private BigDecimal receivedAmount;
private Boolean isMandatoryTaxable;
private String mandatoryTaxableReason;
private String orderVendorName;
private String orderBuyerName;
private String invoiceImageFilePath;
private String invoiceFileName;
private String paymentNumber;
private String createBy;
private String createByName;
private Date createTime;
private String updateByName;
private String updateBy;
private Date updateTime;
private String serialNo;
private Integer verifyType;
private String relevanceRemark;
private String deductiblePeriod;
private Date deductibleDate;
private Integer deductible;
private Integer deductibleResult;
public String getId() {
return id;
}
public void setId(String id) {
this.id = id;
}
public String getInvoiceFileID() {
return invoiceFileID;
}
public void setInvoiceFileID(String invoiceFileID) {
this.invoiceFileID = invoiceFileID;
}
public String getInvoiceCode() {
return invoiceCode;
}
public void setInvoiceCode(String invoiceCode) {
this.invoiceCode = invoiceCode;
}
public String getInvoiceNumber() {
return invoiceNumber;
}
public void setInvoiceNumber(String invoiceNumber) {
this.invoiceNumber = invoiceNumber;
}
public Date getInvoiceDate() {
return invoiceDate;
}
public void setInvoiceDate(Date invoiceDate) {
this.invoiceDate = invoiceDate;
}
public String getInvoiceName() {
return invoiceName;
}
public void setInvoiceName(String invoiceName) {
this.invoiceName = invoiceName;
}
public String getBuyerTaxNumber() {
return buyerTaxNumber;
}
public void setBuyerTaxNumber(String buyerTaxNumber) {
this.buyerTaxNumber = buyerTaxNumber;
}
public String getBuyerName() {
return buyerName;
}
public void setBuyerName(String buyerName) {
this.buyerName = buyerName;
}
public String getBuyerAddress() {
return buyerAddress;
}
public void setBuyerAddress(String buyerAddress) {
this.buyerAddress = buyerAddress;
}
public String getBuyerPhone() {
return buyerPhone;
}
public void setBuyerPhone(String buyerPhone) {
this.buyerPhone = buyerPhone;
}
public String getBuyerBankName() {
return buyerBankName;
}
public void setBuyerBankName(String buyerBankName) {
this.buyerBankName = buyerBankName;
}
public String getBuyerBankAccountNumber() {
return buyerBankAccountNumber;
}
public void setBuyerBankAccountNumber(String buyerBankAccountNumber) {
this.buyerBankAccountNumber = buyerBankAccountNumber;
}
public String getSellerTaxNumber() {
return sellerTaxNumber;
}
public void setSellerTaxNumber(String sellerTaxNumber) {
this.sellerTaxNumber = sellerTaxNumber;
}
public String getSellerName() {
return sellerName;
}
public void setSellerName(String sellerName) {
this.sellerName = sellerName;
}
public String getSellerAddress() {
return sellerAddress;
}
public void setSellerAddress(String sellerAddress) {
this.sellerAddress = sellerAddress;
}
public String getSellerPhone() {
return sellerPhone;
}
public void setSellerPhone(String sellerPhone) {
this.sellerPhone = sellerPhone;
}
public String getSellerBankName() {
return sellerBankName;
}
public void setSellerBankName(String sellerBankName) {
this.sellerBankName = sellerBankName;
}
public String getSellerBankAccountNumber() {
return sellerBankAccountNumber;
}
public void setSellerBankAccountNumber(String sellerBankAccountNumber) {
this.sellerBankAccountNumber = sellerBankAccountNumber;
}
public BigDecimal getAmount() {
return amount;
}
public void setAmount(BigDecimal amount) {
this.amount = amount;
}
public BigDecimal getTaxAmount() {
return taxAmount;
}
public void setTaxAmount(BigDecimal taxAmount) {
this.taxAmount = taxAmount;
}
public BigDecimal getTotalPriceUpperCase() {
return totalPriceUpperCase;
}
public void setTotalPriceUpperCase(BigDecimal totalPriceUpperCase) {
this.totalPriceUpperCase = totalPriceUpperCase;
}
public Integer getInvoiceType() {
return invoiceType;
}
public void setInvoiceType(Integer invoiceType) {
this.invoiceType = invoiceType;
}
public Integer getUploadType() {
return uploadType;
}
public void setUploadType(Integer uploadType) {
this.uploadType = uploadType;
}
public String getUploadTypeString() {
return uploadTypeString;
}
public void setUploadTypeString(String uploadTypeString) {
this.uploadTypeString = uploadTypeString;
}
public Date getUploadDate() {
return uploadDate;
}
public void setUploadDate(Date uploadDate) {
this.uploadDate = uploadDate;
}
public Integer getInvoiceEntityType() {
return invoiceEntityType;
}
public void setInvoiceEntityType(Integer invoiceEntityType) {
this.invoiceEntityType = invoiceEntityType;
}
public String getInvoiceEntityTypeString() {
return invoiceEntityTypeString;
}
public void setInvoiceEntityTypeString(String invoiceEntityTypeString) {
this.invoiceEntityTypeString = invoiceEntityTypeString;
}
public String getInvoiceTypeString() {
return invoiceTypeString;
}
public void setInvoiceTypeString(String invoiceTypeString) {
this.invoiceTypeString = invoiceTypeString;
}
public Integer getInvoiceSourceType() {
return invoiceSourceType;
}
public void setInvoiceSourceType(Integer invoiceSourceType) {
this.invoiceSourceType = invoiceSourceType;
}
public String getInvoiceSourceTypeString() {
return invoiceSourceTypeString;
}
public void setInvoiceSourceTypeString(String invoiceSourceTypeString) {
this.invoiceSourceTypeString = invoiceSourceTypeString;
}
public String getStaffID() {
return staffID;
}
public void setStaffID(String staffID) {
this.staffID = staffID;
}
public String getOrderIdentifier() {
return orderIdentifier;
}
public void setOrderIdentifier(String orderIdentifier) {
this.orderIdentifier = orderIdentifier;
}
public String getRemark() {
return remark;
}
public void setRemark(String remark) {
this.remark = remark;
}
public String getStatus() {
return status;
}
public void setStatus(String status) {
this.status = status;
}
public String getStatusString() {
return statusString;
}
public void setStatusString(String statusString) {
this.statusString = statusString;
}
public String getRelevanceInfoID() {
return relevanceInfoID;
}
public void setRelevanceInfoID(String relevanceInfoID) {
this.relevanceInfoID = relevanceInfoID;
}
public String getRelevanceTypeID() {
return relevanceTypeID;
}
public void setRelevanceTypeID(String relevanceTypeID) {
this.relevanceTypeID = relevanceTypeID;
}
public Integer getProductionType() {
return productionType;
}
public void setProductionType(Integer productionType) {
this.productionType = productionType;
}
public String getProductionTypeString() {
return productionTypeString;
}
public void setProductionTypeString(String productionTypeString) {
this.productionTypeString = productionTypeString;
}
public Integer getServiceType() {
return serviceType;
}
public void setServiceType(Integer serviceType) {
this.serviceType = serviceType;
}
public String getServiceTypeString() {
return serviceTypeString;
}
public void setServiceTypeString(String serviceTypeString) {
this.serviceTypeString = serviceTypeString;
}
public String getCompanyCodes() {
return companyCodes;
}
public void setCompanyCodes(String companyCodes) {
this.companyCodes = companyCodes;
}
public String getCostCenterCodes() {
return costCenterCodes;
}
public void setCostCenterCodes(String costCenterCodes) {
this.costCenterCodes = costCenterCodes;
}
public Integer getIsIncludedInTaxAmount() {
return isIncludedInTaxAmount;
}
public void setIsIncludedInTaxAmount(Integer isIncludedInTaxAmount) {
this.isIncludedInTaxAmount = isIncludedInTaxAmount;
}
public String getVoucherNO() {
return voucherNO;
}
public void setVoucherNO(String voucherNO) {
this.voucherNO = voucherNO;
}
public String getOrderVendorCode() {
return orderVendorCode;
}
public void setOrderVendorCode(String orderVendorCode) {
this.orderVendorCode = orderVendorCode;
}
public String getOrderBuyerCode() {
return orderBuyerCode;
}
public void setOrderBuyerCode(String orderBuyerCode) {
this.orderBuyerCode = orderBuyerCode;
}
public Date getOrderDate() {
return orderDate;
}
public void setOrderDate(Date orderDate) {
this.orderDate = orderDate;
}
public String getAcceptNO() {
return acceptNO;
}
public void setAcceptNO(String acceptNO) {
this.acceptNO = acceptNO;
}
public Integer getOrderIndex() {
return orderIndex;
}
public void setOrderIndex(Integer orderIndex) {
this.orderIndex = orderIndex;
}
public BigDecimal getReceivedAmount() {
return receivedAmount;
}
public void setReceivedAmount(BigDecimal receivedAmount) {
this.receivedAmount = receivedAmount;
}
public Boolean getIsMandatoryTaxable() {
return isMandatoryTaxable;
}
public void setIsMandatoryTaxable(Boolean isMandatoryTaxable) {
this.isMandatoryTaxable = isMandatoryTaxable;
}
public String getMandatoryTaxableReason() {
return mandatoryTaxableReason;
}
public void setMandatoryTaxableReason(String mandatoryTaxableReason) {
this.mandatoryTaxableReason = mandatoryTaxableReason;
}
public String getOrderVendorName() {
return orderVendorName;
}
public void setOrderVendorName(String orderVendorName) {
this.orderVendorName = orderVendorName;
}
public String getOrderBuyerName() {
return orderBuyerName;
}
public void setOrderBuyerName(String orderBuyerName) {
this.orderBuyerName = orderBuyerName;
}
public String getInvoiceImageFilePath() {
return invoiceImageFilePath;
}
public void setInvoiceImageFilePath(String invoiceImageFilePath) {
this.invoiceImageFilePath = invoiceImageFilePath;
}
public String getInvoiceFileName() {
return invoiceFileName;
}
public void setInvoiceFileName(String invoiceFileName) {
this.invoiceFileName = invoiceFileName;
}
public String getPaymentNumber() {
return paymentNumber;
}
public void setPaymentNumber(String paymentNumber) {
this.paymentNumber = paymentNumber;
}
public String getCreateBy() {
return createBy;
}
public void setCreateBy(String createBy) {
this.createBy = createBy;
}
public String getCreateByName() {
return createByName;
}
public void setCreateByName(String createByName) {
this.createByName = createByName;
}
public Date getCreateTime() {
return createTime;
}
public void setCreateTime(Date createTime) {
this.createTime = createTime;
}
public String getUpdateByName() {
return updateByName;
}
public void setUpdateByName(String updateByName) {
this.updateByName = updateByName;
}
public String getUpdateBy() {
return updateBy;
}
public void setUpdateBy(String updateBy) {
this.updateBy = updateBy;
}
public Date getUpdateTime() {
return updateTime;
}
public void setUpdateTime(Date updateTime) {
this.updateTime = updateTime;
}
public String getSerialNo() {
return serialNo;
}
public void setSerialNo(String serialNo) {
this.serialNo = serialNo;
}
public Integer getVerifyType() {
return verifyType;
}
public void setVerifyType(Integer verifyType) {
this.verifyType = verifyType;
}
public String getRelevanceRemark() {
return relevanceRemark;
}
public void setRelevanceRemark(String relevanceRemark) {
this.relevanceRemark = relevanceRemark;
}
public String getDeductiblePeriod() {
return deductiblePeriod;
}
public void setDeductiblePeriod(String deductiblePeriod) {
this.deductiblePeriod = deductiblePeriod;
}
public Date getDeductibleDate() {
return deductibleDate;
}
public void setDeductibleDate(Date deductibleDate) {
this.deductibleDate = deductibleDate;
}
public Integer getDeductible() {
return deductible;
}
public void setDeductible(Integer deductible) {
this.deductible = deductible;
}
public Integer getDeductibleResult() {
return deductibleResult;
}
public void setDeductibleResult(Integer deductibleResult) {
this.deductibleResult = deductibleResult;
}
}
package pwc.taxtech.atms.dto.input;
public class InvoiceDictionaryDto {
private Integer id;
private String value;
public Integer getId() {
return id;
}
public void setId(Integer id) {
this.id = id;
}
public String getValue() {
return value;
}
public void setValue(String value) {
this.value = value;
}
}
package pwc.taxtech.atms.dto.input;
import java.util.List;
import pwc.taxtech.atms.entitiy.User;
public class InvoiceFilterDto {
private List<InvoiceDictionaryDto> invoiceStatusList;
private List<InvoiceDictionaryDto> invoiceEntityList;
private List<InvoiceDictionaryDto> invoiceTypeList;
private List<InvoiceDictionaryDto> invoiceSourceList;
private List<InvoiceDictionaryDto> invoiceUploadTypeList;
private List<InvoiceDictionaryDto> invoiceRefundReasonList;
private List<InvoiceDictionaryDto> invoiceProductionTypeList;
private List<InvoiceDictionaryDto> invoiceServiceTypeList;
private List<InvoiceDictionaryDto> isIncludedInTaxAmountTypeList;
private List<User> allUserList;
public List<InvoiceDictionaryDto> getInvoiceStatusList() {
return invoiceStatusList;
}
public void setInvoiceStatusList(List<InvoiceDictionaryDto> invoiceStatusList) {
this.invoiceStatusList = invoiceStatusList;
}
public List<InvoiceDictionaryDto> getInvoiceEntityList() {
return invoiceEntityList;
}
public void setInvoiceEntityList(List<InvoiceDictionaryDto> invoiceEntityList) {
this.invoiceEntityList = invoiceEntityList;
}
public List<InvoiceDictionaryDto> getInvoiceTypeList() {
return invoiceTypeList;
}
public void setInvoiceTypeList(List<InvoiceDictionaryDto> invoiceTypeList) {
this.invoiceTypeList = invoiceTypeList;
}
public List<InvoiceDictionaryDto> getInvoiceSourceList() {
return invoiceSourceList;
}
public void setInvoiceSourceList(List<InvoiceDictionaryDto> invoiceSourceList) {
this.invoiceSourceList = invoiceSourceList;
}
public List<InvoiceDictionaryDto> getInvoiceUploadTypeList() {
return invoiceUploadTypeList;
}
public void setInvoiceUploadTypeList(List<InvoiceDictionaryDto> invoiceUploadTypeList) {
this.invoiceUploadTypeList = invoiceUploadTypeList;
}
public List<InvoiceDictionaryDto> getInvoiceRefundReasonList() {
return invoiceRefundReasonList;
}
public void setInvoiceRefundReasonList(List<InvoiceDictionaryDto> invoiceRefundReasonList) {
this.invoiceRefundReasonList = invoiceRefundReasonList;
}
public List<InvoiceDictionaryDto> getInvoiceProductionTypeList() {
return invoiceProductionTypeList;
}
public void setInvoiceProductionTypeList(List<InvoiceDictionaryDto> invoiceProductionTypeList) {
this.invoiceProductionTypeList = invoiceProductionTypeList;
}
public List<InvoiceDictionaryDto> getInvoiceServiceTypeList() {
return invoiceServiceTypeList;
}
public void setInvoiceServiceTypeList(List<InvoiceDictionaryDto> invoiceServiceTypeList) {
this.invoiceServiceTypeList = invoiceServiceTypeList;
}
public List<InvoiceDictionaryDto> getIsIncludedInTaxAmountTypeList() {
return isIncludedInTaxAmountTypeList;
}
public void setIsIncludedInTaxAmountTypeList(List<InvoiceDictionaryDto> isIncludedInTaxAmountTypeList) {
this.isIncludedInTaxAmountTypeList = isIncludedInTaxAmountTypeList;
}
public List<User> getAllUserList() {
return allUserList;
}
public void setAllUserList(List<User> allUserList) {
this.allUserList = allUserList;
}
}
\ No newline at end of file
package pwc.taxtech.atms.service;
import java.util.List;
import pwc.taxtech.atms.dto.input.CamelPagingDto;
import pwc.taxtech.atms.dto.input.CamelPagingResultDto;
import pwc.taxtech.atms.dto.input.InputInvoiceDto;
import pwc.taxtech.atms.dto.input.InputInvoiceQuery;
import pwc.taxtech.atms.dto.input.InputInvoiceQueryDto;
import pwc.taxtech.atms.entitiy.InputInvoice;
import java.util.List;
import pwc.taxtech.atms.dto.input.InvoiceFilterDto;
public interface InvoiceManageService {
/**
......@@ -12,5 +15,29 @@ public interface InvoiceManageService {
* @param inputInvoiceQueryDto param
* @return list
*/
CamelPagingResultDto<InputInvoice> getInputInvoiceList(InputInvoiceQueryDto inputInvoiceQueryDto);
CamelPagingResultDto<InputInvoiceDto> getInputInvoiceList(InputInvoiceQuery inputInvoiceQuery,CamelPagingDto pagingDto);
/**
* 导出所有关联发票
* @param inputInvoiceQueryDto
* @param pagingDto
* @param fileName
* @return
*/
String exportInvoiceAllInfoList(InputInvoiceQueryDto inputInvoiceQueryDto, CamelPagingDto pagingDto, String fileName);
/**
* 条件查询所有发票
* @param inputInvoiceQueryDto
* @param fileName
* @return
*/
List<InputInvoiceDto> getInputInvoiceDtoList(InputInvoiceQueryDto inputInvoiceQueryDto);
/**
* 查出所有待选状态
* @return
*/
InvoiceFilterDto getInvoiceFilterBasicData();
}
package pwc.taxtech.atms.service.impl;
import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import java.util.ArrayList;
import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import pwc.taxtech.atms.common.CommonUtils;
import pwc.taxtech.atms.constant.enums.EnumInputInvoiceEntityType;
import pwc.taxtech.atms.constant.enums.EnumInputInvoiceRefundReason;
import pwc.taxtech.atms.constant.enums.EnumInputInvoiceSourceType;
import pwc.taxtech.atms.constant.enums.EnumInputInvoiceStatusType;
import pwc.taxtech.atms.constant.enums.EnumInputInvoiceType;
import pwc.taxtech.atms.constant.enums.EnumInputInvoiceUploadType;
import pwc.taxtech.atms.constant.enums.EnumIsIncludedInTaxAmountType;
import pwc.taxtech.atms.constant.enums.EnumProductionServiceType;
import pwc.taxtech.atms.constant.enums.EnumProductionType;
import pwc.taxtech.atms.dao.InputInvoiceMapper;
import pwc.taxtech.atms.dto.input.CamelPagingDto;
import pwc.taxtech.atms.dto.input.CamelPagingResultDto;
import pwc.taxtech.atms.dto.input.InputInvoiceDto;
import pwc.taxtech.atms.dto.input.InputInvoiceQuery;
import pwc.taxtech.atms.dto.input.InputInvoiceQueryDto;
import pwc.taxtech.atms.dto.input.InvoiceDictionaryDto;
import pwc.taxtech.atms.dto.input.InvoiceFilterDto;
import pwc.taxtech.atms.entitiy.InputInvoice;
import pwc.taxtech.atms.entitiy.InputInvoiceExample;
import pwc.taxtech.atms.service.InvoiceManageService;
import java.util.List;
import pwc.taxtech.atms.service.UserService;
@Service
public class InvoiceManageServiceImpl extends BaseService implements InvoiceManageService {
@Autowired
private InputInvoiceMapper inputInvoiceMapper;
@Autowired
private UserService userService;
@Override
public CamelPagingResultDto<InputInvoice> getInputInvoiceList(InputInvoiceQueryDto inputInvoiceQueryDto) {
public CamelPagingResultDto<InputInvoiceDto> getInputInvoiceList(InputInvoiceQuery inputInvoiceQuery,CamelPagingDto pagingDto) {
// if(inputInvoiceQuery.getIsP2P()&&!inputInvoiceQuery.getIsP2PAndMailroom()) {
// //不是报销的三种待处理状态,
// List<Integer> pendingStatusList=inputInvoiceQuery.getNonClaimPendingProcessStatus();
// }
// if(inputInvoiceQuery.getIsInvoiceNotReceivedVerify()&&!inputInvoiceQuery.getIsOverView()) {
//
// List<Integer> pendingStatusList=inputInvoiceQuery.getNonClaimPendingProcessStatus();
// }
InputInvoiceExample example=new InputInvoiceExample();
InputInvoiceExample.Criteria criteria=example.createCriteria();
//条件查询
if(inputInvoiceQuery!=null) {
if(inputInvoiceQuery.getBuyerName()!=null&&!inputInvoiceQuery.getBuyerName().isEmpty()) {
criteria.andBuyerNameEqualTo(inputInvoiceQuery.getBuyerName());
}
//模糊查询
if(inputInvoiceQuery.getSellerName()!=null&&!inputInvoiceQuery.getSellerName().isEmpty()) {
System.out.println(inputInvoiceQuery.getSellerName());
criteria.andSellerNameLike("%"+inputInvoiceQuery.getSellerName()+"%");
}
//模糊查询
if(inputInvoiceQuery.getInvoiceNumber()!=null&&!inputInvoiceQuery.getInvoiceNumber().isEmpty()) {
criteria.andInvoiceNumberLike("%"+inputInvoiceQuery.getInvoiceNumber()+"%");
}
if(inputInvoiceQuery.getStatus()!=null) {
criteria.andStatusEqualTo(inputInvoiceQuery.getStatus());
}
if(inputInvoiceQuery.getInvoiceUploadType()!=null) {
criteria.andUploadTypeEqualTo(inputInvoiceQuery.getInvoiceUploadType());
}
if(inputInvoiceQuery.getInvoiceType()!=null) {
criteria.andInvoiceTypeEqualTo(inputInvoiceQuery.getInvoiceType());
}
if(inputInvoiceQuery.getInvoiceDateFrom()!=null) {
criteria.andInvoiceDateGreaterThanOrEqualTo(inputInvoiceQuery.getInvoiceDateFrom());
}
if(inputInvoiceQuery.getInvoiceDateTo()!=null) {
criteria.andInvoiceDateLessThanOrEqualTo(inputInvoiceQuery.getInvoiceDateTo());
}
if(inputInvoiceQuery.getUploadDateFrom()!=null) {
criteria.andUploadDateGreaterThanOrEqualTo(inputInvoiceQuery.getUploadDateFrom());
}
if(inputInvoiceQuery.getUploadDateTo()!=null) {
criteria.andUploadDateLessThanOrEqualTo(inputInvoiceQuery.getUploadDateTo());
}
if(inputInvoiceQuery.getAmountFrom()!=null) {
criteria.andAmountGreaterThanOrEqualTo(inputInvoiceQuery.getAmountFrom());
}
if(inputInvoiceQuery.getAmountTo()!=null) {
criteria.andAmountLessThanOrEqualTo(inputInvoiceQuery.getAmountTo());
}
if(inputInvoiceQuery.getInvoiceEntityType()!=null) {
criteria.andInvoiceEntityTypeEqualTo(inputInvoiceQuery.getInvoiceEntityType());
}
if(inputInvoiceQuery.getInvoiceSourceType()!=null) {
criteria.andInvoiceSourceTypeEqualTo(inputInvoiceQuery.getInvoiceSourceType());
}
if(inputInvoiceQuery.getVerifyType()!=null) {
criteria.andVerifyTypeEqualTo(inputInvoiceQuery.getVerifyType());
}
if(inputInvoiceQuery.getCreateBy()!=null&&!inputInvoiceQuery.getCreateBy().isEmpty()) {
criteria.andCreateByEqualTo(inputInvoiceQuery.getCreateBy());
}
if(inputInvoiceQuery.getSerialNo()!=null&&!inputInvoiceQuery.getSerialNo().isEmpty()) {
criteria.andSerialNoEqualTo(inputInvoiceQuery.getSerialNo());
}
}
//example.setOrderByClause("uploadDate ASC");
Integer pageIndex=pagingDto.getPageIndex()!=null?pagingDto.getPageIndex():1;
Integer pageSize=pagingDto.getPageSize()!=null?pagingDto.getPageSize():10;
PageHelper.startPage(pageIndex,pageSize,true);
List<InputInvoice> inputInvoiceList = inputInvoiceMapper.selectByExample(example);
PageInfo pageInfo = new PageInfo<InputInvoice>(inputInvoiceList);
List<InputInvoice> list=pageInfo.getList();
System.out.println(list.size());
List<InputInvoiceDto> inputInvoiceDtos=new ArrayList<>();
list.forEach(a->{
InputInvoiceDto inputInvoiceDto=new InputInvoiceDto();
CommonUtils.copyProperties(a, inputInvoiceDto);
inputInvoiceDtos.add(inputInvoiceDto);
});
CamelPagingResultDto<InputInvoiceDto> camelPagingResultDto=new CamelPagingResultDto<InputInvoiceDto>();
camelPagingResultDto.setList(inputInvoiceDtos);
pagingDto.setTotalCount((int) pageInfo.getTotal());
// InputInvoice inputInvoice=new InputInvoice();
// CommonUtils.copyProperties(inputInvoiceQueryDto,inputInvoice);
camelPagingResultDto.setPageInfo(pagingDto);
//camelPagingResultDto.setCalculateData(inputInvoice);
return camelPagingResultDto;
}
InputInvoiceExample.Criteria criteria=example.createCriteria();
if (inputInvoiceQueryDto.getAmount()!=null ) {
criteria.andAmountEqualTo(inputInvoiceQueryDto.getAmount());
}
if (inputInvoiceQueryDto.getBuyerBankName()!=null ) {
criteria.andBuyerBankNameEqualTo(inputInvoiceQueryDto.getBuyerBankName());
}
if (inputInvoiceQueryDto.getInvoiceDate()!=null ) {
criteria.andInvoiceDateEqualTo(inputInvoiceQueryDto.getInvoiceDate());
}
if (inputInvoiceQueryDto.getInvoiceEntityType()!=null ) {
criteria.andInvoiceEntityTypeEqualTo(inputInvoiceQueryDto.getInvoiceEntityType());
}
if (inputInvoiceQueryDto.getInvoiceNumber()!=null ) {
criteria.andInvoiceNameEqualTo(inputInvoiceQueryDto.getInvoiceNumber());
}
if (inputInvoiceQueryDto.getInvoiceSourceType()!=null ) {
criteria.andInvoiceSourceTypeEqualTo(inputInvoiceQueryDto.getInvoiceSourceType());
}
if (inputInvoiceQueryDto.getInvoiceType()!=null ) {
criteria.andInvoiceTypeEqualTo(inputInvoiceQueryDto.getInvoiceType());
}
if (inputInvoiceQueryDto.getSellerName()!=null ) {
criteria.andSellerNameEqualTo(inputInvoiceQueryDto.getSellerName());
}
if (inputInvoiceQueryDto.getSerialNo()!=null ) {
criteria.andSerialNoEqualTo(inputInvoiceQueryDto.getSerialNo());
}
if (inputInvoiceQueryDto.getStaffId()!=null ) {
criteria.andStaffIdEqualTo(inputInvoiceQueryDto.getStaffId());
}
if (inputInvoiceQueryDto.getStatus()!=null ) {
criteria.andStatusEqualTo(inputInvoiceQueryDto.getStatus());
}
if (inputInvoiceQueryDto.getUploadDate()!=null ) {
criteria.andUploadDateEqualTo(inputInvoiceQueryDto.getUploadDate());
}
if (inputInvoiceQueryDto.getUploadType()!=null ) {
criteria.andUploadTypeEqualTo(inputInvoiceQueryDto.getUploadType());
}
Integer pageIndex=inputInvoiceQueryDto.getPagingDto().getPageIndex()!=null?inputInvoiceQueryDto.getPagingDto().getPageIndex():1;
Integer pageSize=inputInvoiceQueryDto.getPagingDto().getPageSize()!=null?inputInvoiceQueryDto.getPagingDto().getPageSize():10;
PageHelper.startPage(pageIndex,pageSize);
List<InputInvoice> lists = inputInvoiceMapper.selectByExample(example);
PageInfo pageInfo = new PageInfo<InputInvoice>(lists);
CamelPagingResultDto<InputInvoice> camelPagingResultDto=new CamelPagingResultDto<InputInvoice>();
camelPagingResultDto.setList(pageInfo.getList());
inputInvoiceQueryDto.getPagingDto().setTotalCount((int) pageInfo.getTotal());
InputInvoice inputInvoice=new InputInvoice();
CommonUtils.copyProperties(inputInvoiceQueryDto,inputInvoice);
camelPagingResultDto.setPageInfo(inputInvoiceQueryDto.getPagingDto());
camelPagingResultDto.setCalculateData(inputInvoice);
return camelPagingResultDto;
public List<InputInvoiceDto> getInputInvoiceDtoList(InputInvoiceQuery inputInvoiceQuery){
return null;
}
@Override
public String exportInvoiceAllInfoList(InputInvoiceQueryDto inputInvoiceQueryDto, CamelPagingDto pagingDto,
String fileName) {
// TODO Auto-generated method stub
return null;
}
@Override
public List<InputInvoiceDto> getInputInvoiceDtoList(InputInvoiceQueryDto inputInvoiceQueryDto) {
List<InputInvoice> inputInvoiceList=getInputInvoiceList(inputInvoiceQueryDto.getInvoiceQuery());
List<InputInvoiceDto> inputInvoiceDtos=new ArrayList<>();
if(inputInvoiceList.size()>0) {
inputInvoiceList.forEach(a->{
InputInvoiceDto inputInvoiceDto=new InputInvoiceDto();
CommonUtils.copyProperties(a, inputInvoiceDto);
inputInvoiceDtos.add(inputInvoiceDto);
});
}
return inputInvoiceDtos;
}
public List<InputInvoice> getInputInvoiceList(InputInvoiceQuery inputInvoiceQuery) {
InputInvoiceExample example=new InputInvoiceExample();
InputInvoiceExample.Criteria criteria=example.createCriteria();
//条件查询
if(inputInvoiceQuery!=null) {
if(inputInvoiceQuery.getBuyerName()!=null&&!inputInvoiceQuery.getBuyerName().isEmpty()) {
criteria.andBuyerNameEqualTo(inputInvoiceQuery.getBuyerName());
}
//模糊查询
if(inputInvoiceQuery.getSellerName()!=null&&!inputInvoiceQuery.getSellerName().isEmpty()) {
System.out.println(inputInvoiceQuery.getSellerName());
criteria.andSellerNameLike("%"+inputInvoiceQuery.getSellerName()+"%");
}
//模糊查询
if(inputInvoiceQuery.getInvoiceNumber()!=null&&!inputInvoiceQuery.getInvoiceNumber().isEmpty()) {
criteria.andInvoiceNumberLike("%"+inputInvoiceQuery.getInvoiceNumber()+"%");
}
if(inputInvoiceQuery.getStatus()!=null) {
criteria.andStatusEqualTo(inputInvoiceQuery.getStatus());
}
if(inputInvoiceQuery.getInvoiceUploadType()!=null) {
criteria.andUploadTypeEqualTo(inputInvoiceQuery.getInvoiceUploadType());
}
if(inputInvoiceQuery.getInvoiceType()!=null) {
criteria.andInvoiceTypeEqualTo(inputInvoiceQuery.getInvoiceType());
}
if(inputInvoiceQuery.getInvoiceDateFrom()!=null) {
criteria.andInvoiceDateGreaterThanOrEqualTo(inputInvoiceQuery.getInvoiceDateFrom());
}
if(inputInvoiceQuery.getInvoiceDateTo()!=null) {
criteria.andInvoiceDateLessThanOrEqualTo(inputInvoiceQuery.getInvoiceDateTo());
}
if(inputInvoiceQuery.getUploadDateFrom()!=null) {
criteria.andUploadDateGreaterThanOrEqualTo(inputInvoiceQuery.getUploadDateFrom());
}
if(inputInvoiceQuery.getUploadDateTo()!=null) {
criteria.andUploadDateLessThanOrEqualTo(inputInvoiceQuery.getUploadDateTo());
}
if(inputInvoiceQuery.getAmountFrom()!=null) {
criteria.andAmountGreaterThanOrEqualTo(inputInvoiceQuery.getAmountFrom());
}
if(inputInvoiceQuery.getAmountTo()!=null) {
criteria.andAmountLessThanOrEqualTo(inputInvoiceQuery.getAmountTo());
}
if(inputInvoiceQuery.getInvoiceEntityType()!=null) {
criteria.andInvoiceEntityTypeEqualTo(inputInvoiceQuery.getInvoiceEntityType());
}
if(inputInvoiceQuery.getInvoiceSourceType()!=null) {
criteria.andInvoiceSourceTypeEqualTo(inputInvoiceQuery.getInvoiceSourceType());
}
if(inputInvoiceQuery.getVerifyType()!=null) {
criteria.andVerifyTypeEqualTo(inputInvoiceQuery.getVerifyType());
}
if(inputInvoiceQuery.getCreateBy()!=null&&!inputInvoiceQuery.getCreateBy().isEmpty()) {
criteria.andCreateByEqualTo(inputInvoiceQuery.getCreateBy());
}
if(inputInvoiceQuery.getSerialNo()!=null&&!inputInvoiceQuery.getSerialNo().isEmpty()) {
criteria.andSerialNoEqualTo(inputInvoiceQuery.getSerialNo());
}
}
List<InputInvoice> inputInvoiceList = inputInvoiceMapper.selectByExample(example);
if(inputInvoiceList.size()>0) {
for(InputInvoice i:inputInvoiceList) {
System.out.println(i.getBuyerName());
}
}
return inputInvoiceList;
}
@Override
public InvoiceFilterDto getInvoiceFilterBasicData() {
InvoiceFilterDto invoiceFilterDto=new InvoiceFilterDto();
InvoiceDictionaryDto invoiceDictionaryDto;
List<InvoiceDictionaryDto> invoiceStatusList=new ArrayList<InvoiceDictionaryDto>();
//发票状态
for (EnumInputInvoiceStatusType e : EnumInputInvoiceStatusType.values()) {
invoiceDictionaryDto=new InvoiceDictionaryDto();
invoiceDictionaryDto.setId(e.getCode());
invoiceDictionaryDto.setValue(e.name());
invoiceStatusList.add(invoiceDictionaryDto);
}
//发票实体
List<InvoiceDictionaryDto> invoiceEntityList=new ArrayList<InvoiceDictionaryDto>();
for (EnumInputInvoiceEntityType e : EnumInputInvoiceEntityType.values()) {
invoiceDictionaryDto=new InvoiceDictionaryDto();
invoiceDictionaryDto.setId(e.getCode());
invoiceDictionaryDto.setValue(e.name());
invoiceEntityList.add(invoiceDictionaryDto);
}
//发票类型
List<InvoiceDictionaryDto> invoiceTypeList=new ArrayList<InvoiceDictionaryDto>();
for (EnumInputInvoiceType e : EnumInputInvoiceType.values()) {
invoiceDictionaryDto=new InvoiceDictionaryDto();
invoiceDictionaryDto.setId(e.getCode());
invoiceDictionaryDto.setValue(e.name());
invoiceTypeList.add(invoiceDictionaryDto);
}
//发票来源
List<InvoiceDictionaryDto> invoiceSourceList=new ArrayList<InvoiceDictionaryDto>();
for (EnumInputInvoiceSourceType e : EnumInputInvoiceSourceType.values()) {
invoiceDictionaryDto=new InvoiceDictionaryDto();
invoiceDictionaryDto.setId(e.getCode());
invoiceDictionaryDto.setValue(e.name());
invoiceSourceList.add(invoiceDictionaryDto);
}
//上传方式
List<InvoiceDictionaryDto> invoiceUploadTypeList=new ArrayList<InvoiceDictionaryDto>();
for (EnumInputInvoiceUploadType e : EnumInputInvoiceUploadType.values()) {
invoiceDictionaryDto=new InvoiceDictionaryDto();
invoiceDictionaryDto.setId(e.getCode());
invoiceDictionaryDto.setValue(e.name());
invoiceUploadTypeList.add(invoiceDictionaryDto);
}
//退票原因
List<InvoiceDictionaryDto> invoiceRefundReasonList=new ArrayList<InvoiceDictionaryDto>();
for (EnumInputInvoiceRefundReason e : EnumInputInvoiceRefundReason.values()) {
invoiceDictionaryDto=new InvoiceDictionaryDto();
invoiceDictionaryDto.setId(e.getCode());
invoiceDictionaryDto.setValue(e.name());
invoiceRefundReasonList.add(invoiceDictionaryDto);
}
//商品类型
List<InvoiceDictionaryDto> invoiceProductionTypeList=new ArrayList<InvoiceDictionaryDto>();
for (EnumProductionType e : EnumProductionType.values()) {
invoiceDictionaryDto=new InvoiceDictionaryDto();
invoiceDictionaryDto.setId(e.getCode());
invoiceDictionaryDto.setValue(e.name());
invoiceProductionTypeList.add(invoiceDictionaryDto);
}
//服务类型
List<InvoiceDictionaryDto> invoiceServiceTypeList=new ArrayList<InvoiceDictionaryDto>();
for (EnumProductionServiceType e : EnumProductionServiceType.values()) {
invoiceDictionaryDto=new InvoiceDictionaryDto();
invoiceDictionaryDto.setId(e.getCode());
invoiceDictionaryDto.setValue(e.name());
invoiceServiceTypeList.add(invoiceDictionaryDto);
}
//是否计入进项税额
List<InvoiceDictionaryDto> isIncludedInTaxAmountTypeList=new ArrayList<InvoiceDictionaryDto>();
for (EnumIsIncludedInTaxAmountType e : EnumIsIncludedInTaxAmountType.values()) {
invoiceDictionaryDto=new InvoiceDictionaryDto();
invoiceDictionaryDto.setId(e.getCode());
invoiceDictionaryDto.setValue(e.name());
isIncludedInTaxAmountTypeList.add(invoiceDictionaryDto);
}
invoiceFilterDto.setInvoiceStatusList(invoiceStatusList);
invoiceFilterDto.setInvoiceEntityList(invoiceEntityList);
invoiceFilterDto.setInvoiceTypeList(invoiceTypeList);
invoiceFilterDto.setInvoiceSourceList(invoiceSourceList);
invoiceFilterDto.setInvoiceUploadTypeList(invoiceUploadTypeList);
invoiceFilterDto.setInvoiceRefundReasonList(invoiceRefundReasonList);
invoiceFilterDto.setInvoiceProductionTypeList(invoiceProductionTypeList);
invoiceFilterDto.setIsIncludedInTaxAmountTypeList(isIncludedInTaxAmountTypeList);
invoiceFilterDto.setAllUserList(userService.findAllUsers());
return invoiceFilterDto;
}
}
......@@ -2,11 +2,56 @@
PUBLIC "-//mybatis.org//DTD Config 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-config.dtd">
<configuration>
<configuration>
<!-- 全局setting配置,根据需要添加 -->
<settings>
<setting name="logImpl" value="LOG4J" />
</settings>
<!-- <mappers> <mapper class="org.apache.ibatis.submitted.basetest.Mapper" /> </mappers> -->
<!-- 配置别名 -->
<typeAliases>
<package name="pwc.taxtech.atms.entitiy"/>
</typeAliases>
<!-- <settings> <setting name="logImpl" value="LOG4J" /> </settings> -->
</configuration>
\ No newline at end of file
<!-- 插件 -->
<plugins>
<plugin interceptor="com.github.pagehelper.PageInterceptor">
<!-- 4.0.0以后版本可以不设置该参数 -->
<property name="diaect" value="mysql"/>
<!--
该参数默认为false
设置为true时,会将RowBounds第一个参数offset当成pageNum页码使用
和startPage中的pageNum效果一样
-->
<property name="offsetAsPageNum" value="true"/>
<!--
该参数默认为false
设置为true时,使用RowBounds分页会进行count查询
-->
<property name="rowBoundsWithCount" value="true"/>
<!--
设置为true时,如果pageSize=0或者RowBounds.limit=0就会查询出全部的结果
(相当于没有执行分页查询,只是返回结果仍然是Page类型)
-->
<property name="pageSizeZero" value="true"/>
<!--
3.3.0版本可用-分页参数合理化,默认false禁用
启用合理化时,如果pageNum<1会查询第一页,如果pageNum>pages会查询最后一页
禁用合理化时,如果pageNum<1或pages会返回空数据
-->
<property name="reasonable" value="true"/>
<!--
3.5.0版本可用-为了支持startPage(Object params)方法
增加了一个'params'参数来配置参数映射,用于从Map或ServletRequest中取值
可以配置pageNum,pageSize,count,pageSizeZero,reasonable,orderBy,不配置映射的用默认值
不理解该含义的前提下,不要随便复制该配置
-->
<property name="params" value="pageNum=start;pageSize=limit;"/>
<!-- 支持通过Mapper接口参数来传递分页参数 -->
<property name="supportMethodsArguments" value="true"/>
<!-- always重视返回PageInfo类型,check检查返回类型是否为PageInfo,none返回Page -->
<property name="returnPageInfo" value="check"/>
</plugin>
</plugins>
</configuration>
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment