Commit a8ebb8bb authored by ken.q.you's avatar ken.q.you

Ken 发票导出

parent fd860975
.* .*
rebel.xml rebel.xml
!.gitignore !.gitignore
!.mvn !.mvn
/tmp /tmp
/temp /temp
/target /target
/build /build
/logs /logs
/atms-web/src/main/webapp/node_modules /atms-web/src/main/webapp/node_modules
**/*.iml **/*.iml
**/.idea/ **/.idea/
/bin/
...@@ -2,4 +2,4 @@ rem see http://www.mybatis.org/generator/running/runningFromCmdLine.html ...@@ -2,4 +2,4 @@ rem see http://www.mybatis.org/generator/running/runningFromCmdLine.html
cd /d %~dp0 cd /d %~dp0
call java -classpath .;./* org.mybatis.generator.api.ShellRunner -configfile vatGeneratorConfig.xml -overwrite -verbose call java -classpath .;./* org.mybatis.generator.api.ShellRunner -configfile vatGeneratorConfig.xml -overwrite -verbose
echo @@@@@@@@@@@ DONE @@@@@@@@@@@ echo @@@@@@@@@@@ DONE @@@@@@@@@@@
pause pause
\ No newline at end of file
package pwc.taxtech.atms; package pwc.taxtech.atms;
import pwc.taxtech.atms.dto.user.UserDto; import pwc.taxtech.atms.dto.user.UserDto;
import pwc.taxtech.atms.service.OperationLogService; import pwc.taxtech.atms.service.OperationLogService;
import java.util.HashMap; import java.util.HashMap;
import java.util.Map; import java.util.Map;
public class AppCachePool { public class AppCachePool {
private static Map<String, UserDto> CACHED_USERS = null; private static Map<String, UserDto> CACHED_USERS = null;
private static Object _locker = new Object(); private static Object _locker = new Object();
static { static {
CACHED_USERS = new HashMap<>(); CACHED_USERS = new HashMap<>();
} }
public static UserDto getCachedUser(String name) { public static UserDto getCachedUser(String name) {
String userName = name.toLowerCase(); String userName = name.toLowerCase();
synchronized (_locker) { synchronized (_locker) {
if (!CACHED_USERS.containsKey(userName)) { if (!CACHED_USERS.containsKey(userName)) {
UserDto dto = new UserDto();//TODO:should fixed to load from db (neo) UserDto dto = new UserDto();//TODO:should fixed to load from db (neo)
dto.setUserName("cach_test"); dto.setUserName("cach_test");
dto.setID("1"); dto.setID("1");
CACHED_USERS.put(userName,dto); CACHED_USERS.put(userName,dto);
} }
return CACHED_USERS.get(userName); return CACHED_USERS.get(userName);
} }
} }
} }
package pwc.taxtech.atms.controller; package pwc.taxtech.atms.controller;
import org.apache.http.HttpStatus; import org.apache.http.HttpStatus;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.MediaType; import org.springframework.http.MediaType;
import org.springframework.web.bind.annotation.*; import org.springframework.web.bind.annotation.*;
import pwc.taxtech.atms.dto.PagingResultDto; import pwc.taxtech.atms.dto.PagingResultDto;
import pwc.taxtech.atms.dto.vatdto.*; import pwc.taxtech.atms.dto.vatdto.*;
import pwc.taxtech.atms.thirdparty.ExcelSheet; import pwc.taxtech.atms.thirdparty.ExcelSheet;
import pwc.taxtech.atms.thirdparty.ExcelUtil; import pwc.taxtech.atms.thirdparty.ExcelUtil;
import pwc.taxtech.atms.vat.service.InputInvoiceDataImportService; import pwc.taxtech.atms.vat.service.InputInvoiceDataImportService;
import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpServletResponse;
import java.io.IOException; import java.io.IOException;
import java.io.OutputStream; import java.io.OutputStream;
import java.util.*; import java.util.*;
@RestController @RestController
@RequestMapping(value = "api/v1/inputInvoiceImport") @RequestMapping(value = "api/v1/inputInvoiceImport")
public class InputInvoiceImportController { public class InputInvoiceImportController {
@Autowired @Autowired
InputInvoiceDataImportService inputInvoiceDataImportService; InputInvoiceDataImportService inputInvoiceDataImportService;
@RequestMapping(value = "inputInvoicePreviewList", method = RequestMethod.POST, produces = MediaType.APPLICATION_JSON_UTF8_VALUE) @RequestMapping(value = "inputInvoicePreviewList", method = RequestMethod.POST, produces = MediaType.APPLICATION_JSON_UTF8_VALUE)
public @ResponseBody public @ResponseBody
PagingResultDto<InputVATInvoiceDto> getInputInvoiceTreeViewData(@RequestBody InputInvoicePreviewQueryParam paras) { 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) @RequestMapping(value = "exportQueryData/get", method = RequestMethod.POST, produces = MediaType.APPLICATION_JSON_UTF8_VALUE)
public void downloadInvoiceQueryData(@RequestBody InputInvoicePreviewQueryParam paras, HttpServletResponse response) { public void downloadInvoiceQueryData(@RequestBody InputInvoicePreviewQueryParam paras, HttpServletResponse response) {
response.setContentType("application/vnd.ms-excel;charset=utf-8"); response.setContentType("application/vnd.ms-excel;charset=utf-8");
response.setHeader("Content-Disposition", "attachment;filename=" + UUID.randomUUID() + ".xlsx"); response.setHeader("Content-Disposition", "attachment;filename=" + UUID.randomUUID() + ".xlsx");
response.setHeader("x-file-name", UUID.randomUUID() + ".xlsx"); response.setHeader("x-file-name", UUID.randomUUID() + ".xlsx");
OutputStream os = null; OutputStream os = null;
try { try {
os = response.getOutputStream(); os = response.getOutputStream();
int count = getDownloadFilePath(paras, os); int count = getDownloadFilePath(paras, os);
if (count == 0) { if (count == 0) {
response.setStatus(HttpStatus.SC_NO_CONTENT); response.setStatus(HttpStatus.SC_NO_CONTENT);
} else { } else {
response.setStatus(HttpStatus.SC_OK); response.setStatus(HttpStatus.SC_OK);
} }
} catch (IOException e) { } catch (IOException e) {
e.printStackTrace(); e.printStackTrace();
} }
} }
private int getDownloadFilePath(InputInvoicePreviewQueryParam paras, OutputStream outputStream) { private int getDownloadFilePath(InputInvoicePreviewQueryParam paras, OutputStream outputStream) {
List<InputVATInvoiceDto> list = inputInvoiceDataImportService.getInputInvoiceTreeViewData(paras).getList(); List<InputVATInvoiceDto> list = inputInvoiceDataImportService.getInputInvoiceTreeViewData(paras).getList();
if (list.size() == 0) { if (list.size() == 0) {
//return 0; //return 0;
} }
Map<String, String> header = new HashMap<>(); Map<String, String> header = new HashMap<>();
header.put("PeriodID", "期间"); header.put("PeriodID", "期间");
header.put("InvoiceDate", "开票日期"); header.put("InvoiceDate", "开票日期");
header.put("InvoiceCode", "发票代码"); header.put("InvoiceCode", "发票代码");
header.put("InvoiceNumber", "发票号码"); header.put("InvoiceNumber", "发票号码");
header.put("SellerTaxNumber", "供货方税号"); header.put("SellerTaxNumber", "供货方税号");
header.put("InvoiceTypeName", "发票类型"); header.put("InvoiceTypeName", "发票类型");
header.put("Amount", "金额"); header.put("Amount", "金额");
header.put("TaxAmount", "税额"); header.put("TaxAmount", "税额");
header.put("CertificationDate", "认证日期"); header.put("CertificationDate", "认证日期");
ExcelSheet excelSheetA = new ExcelSheet<>(); ExcelSheet excelSheetA = new ExcelSheet<>();
excelSheetA.setHeaders(header); excelSheetA.setHeaders(header);
excelSheetA.setDataset(list); excelSheetA.setDataset(list);
excelSheetA.setSheetName("sheetA"); excelSheetA.setSheetName("sheetA");
Map<String, String> header2 = new HashMap<>(); Map<String, String> header2 = new HashMap<>();
header2.put("PeriodID", "期间"); header2.put("PeriodID", "期间");
header2.put("InvoiceCode", "发票代码"); header2.put("InvoiceCode", "发票代码");
header2.put("InvoiceNumber", "发票号码"); header2.put("InvoiceNumber", "发票号码");
header2.put("Amount", "金额"); header2.put("Amount", "金额");
header2.put("TaxAmount", "税额"); header2.put("TaxAmount", "税额");
header2.put("TaxRate", "税率"); header2.put("TaxRate", "税率");
header2.put("ProductionName", "货物名称"); header2.put("ProductionName", "货物名称");
ExcelSheet excelSheetB = new ExcelSheet<>(); ExcelSheet excelSheetB = new ExcelSheet<>();
excelSheetB.setHeaders(header2); excelSheetB.setHeaders(header2);
excelSheetB.setSheetName("sheetB"); excelSheetB.setSheetName("sheetB");
List<InputVATInvoiceItemDto> inputInvoiceItemList = new ArrayList<>(); List<InputVATInvoiceItemDto> inputInvoiceItemList = new ArrayList<>();
for (InputVATInvoiceDto item : list) { for (InputVATInvoiceDto item : list) {
List<InputVATInvoiceItemDto> tempResult = inputInvoiceDataImportService.getInputInvoiceItemTreeViewData(item.getID()); List<InputVATInvoiceItemDto> tempResult = inputInvoiceDataImportService.getInputInvoiceItemTreeViewData(item.getID());
for (InputVATInvoiceItemDto r : tempResult) { for (InputVATInvoiceItemDto r : tempResult) {
inputInvoiceItemList.add(r); inputInvoiceItemList.add(r);
} }
} }
excelSheetB.setDataset(inputInvoiceItemList); excelSheetB.setDataset(inputInvoiceItemList);
List<ExcelSheet<InputVATInvoiceBaseDto>> sheets = new ArrayList<>(); List<ExcelSheet<InputVATInvoiceBaseDto>> sheets = new ArrayList<>();
sheets.add(excelSheetA); sheets.add(excelSheetA);
sheets.add(excelSheetB); sheets.add(excelSheetB);
ExcelUtil.exportExcel(sheets, outputStream); ExcelUtil.exportExcel(sheets, outputStream);
return list.size(); return list.size();
} }
} }
...@@ -9,6 +9,7 @@ import org.springframework.web.bind.annotation.ResponseBody; ...@@ -9,6 +9,7 @@ import org.springframework.web.bind.annotation.ResponseBody;
import com.github.pagehelper.PageHelper; import com.github.pagehelper.PageHelper;
import io.swagger.annotations.ApiOperation;
import pwc.taxtech.atms.controller.BaseController; import pwc.taxtech.atms.controller.BaseController;
import pwc.taxtech.atms.dto.OperationResultDto; import pwc.taxtech.atms.dto.OperationResultDto;
import pwc.taxtech.atms.dto.input.CamelPagingDto; import pwc.taxtech.atms.dto.input.CamelPagingDto;
...@@ -27,13 +28,14 @@ public class InvoiceManageController extends BaseController { ...@@ -27,13 +28,14 @@ public class InvoiceManageController extends BaseController {
@Autowired @Autowired
private InvoiceManageService invoiceManageService; private InvoiceManageService invoiceManageService;
@ApiOperation(value = "查询所有发票")
@ResponseBody @ResponseBody
@RequestMapping(value = "getInputInvoiceList", method = RequestMethod.POST) @RequestMapping(value = "getInputInvoiceList", method = RequestMethod.POST)
public CamelPagingResultDto<InputInvoice> getInputInvoiceList(@RequestBody InputInvoiceQueryDto inputInvoiceQueryDto) { public CamelPagingResultDto<InputInvoice> getInputInvoiceList(@RequestBody InputInvoiceQueryDto inputInvoiceQueryDto) {
CamelPagingResultDto<InputInvoice> resultDto = new CamelPagingResultDto<InputInvoice>(); CamelPagingResultDto<InputInvoice> resultDto = new CamelPagingResultDto<InputInvoice>();
try { try {
CamelPagingDto camelPagingDto=inputInvoiceQueryDto.getPagingDto()==null?new CamelPagingDto():inputInvoiceQueryDto.getPagingDto();
resultDto = invoiceManageService.getInputInvoiceList(inputInvoiceQueryDto); resultDto = invoiceManageService.getInputInvoiceList(inputInvoiceQueryDto);
//todo 业务代码 //todo 业务代码
} catch (Exception e) { } catch (Exception e) {
...@@ -41,5 +43,14 @@ public class InvoiceManageController extends BaseController { ...@@ -41,5 +43,14 @@ public class InvoiceManageController extends BaseController {
} }
return resultDto; return resultDto;
} }
@ApiOperation(value = "导出所有关联发票")
@ResponseBody
@RequestMapping(value = "exportInvoiceAllInfoList", method = RequestMethod.POST)
public String exportInvoiceAllInfoList(@RequestBody InputInvoiceQueryDto inputInvoiceQueryDto,String filename) {
String filePath=invoiceManageService.exportInvoiceAllInfoList(inputInvoiceQueryDto, inputInvoiceQueryDto.getPagingDto(), filename);
return null;
}
} }
...@@ -2,14 +2,22 @@ package pwc.taxtech.atms.dto.input; ...@@ -2,14 +2,22 @@ package pwc.taxtech.atms.dto.input;
import java.util.List; import java.util.List;
import com.alibaba.fastjson.annotation.JSONField;
public class CamelPagingResultDto<T> { public class CamelPagingResultDto<T> {
@JSONField(name="List")
private List<T> list; private List<T> list;
@JSONField(name="PageInfo")
private CamelPagingDto pageInfo; private CamelPagingDto pageInfo;
private T calculateData; private T calculateData;
public CamelPagingResultDto() {
super();
}
public List<T> getList() { public List<T> getList() {
return list; return list;
} }
......
...@@ -20,49 +20,29 @@ public class InputInvoiceQueryDto { ...@@ -20,49 +20,29 @@ public class InputInvoiceQueryDto {
//发票类型 //发票类型
private Integer invoiceType; private Integer invoiceType;
//开票日期范围 //开票日期范围
private Date invoiceDate; private Date invoiceDateForm;
private Date invoiceDateTo;
//上传日期范围 //上传日期范围
private Date uploadDate; private Date uploadDateForm;
private Date uploadDateTo;
//票面金额范围 //票面金额范围
private BigDecimal amount; private BigDecimal amountForm;
private BigDecimal amountTo;
//发票实体 //发票实体
private Integer invoiceEntityType; private Integer invoiceEntityType;
//发票来源 //发票来源
private Integer invoiceSourceType; private Integer invoiceSourceType;
//验真分类 //验真分类
private Integer verifyType;
//创建者 //创建者
private String staffId; private String createBy;
//序列号 //序列号
private String serialNo; 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 CamelPagingDto pagingDto; private CamelPagingDto pagingDto;
...@@ -122,28 +102,71 @@ public class InputInvoiceQueryDto { ...@@ -122,28 +102,71 @@ public class InputInvoiceQueryDto {
this.invoiceType = invoiceType; this.invoiceType = invoiceType;
} }
public Date getInvoiceDate() {
return invoiceDate;
public Date getInvoiceDateForm() {
return invoiceDateForm;
}
public void setInvoiceDateForm(Date invoiceDateForm) {
this.invoiceDateForm = invoiceDateForm;
}
public Date getInvoiceDateTo() {
return invoiceDateTo;
}
public void setInvoiceDateTo(Date invoiceDateTo) {
this.invoiceDateTo = invoiceDateTo;
}
public Date getUploadDateForm() {
return uploadDateForm;
}
public void setUploadDateForm(Date uploadDateForm) {
this.uploadDateForm = uploadDateForm;
}
public Date getUploadDateTo() {
return uploadDateTo;
}
public void setUploadDateTo(Date uploadDateTo) {
this.uploadDateTo = uploadDateTo;
} }
public void setInvoiceDate(Date invoiceDate) { public BigDecimal getAmountForm() {
this.invoiceDate = invoiceDate; return amountForm;
} }
public Date getUploadDate() { public void setAmountForm(BigDecimal amountForm) {
return uploadDate; this.amountForm = amountForm;
} }
public void setUploadDate(Date uploadDate) { public BigDecimal getAmountTo() {
this.uploadDate = uploadDate; return amountTo;
} }
public BigDecimal getAmount() { public void setAmountTo(BigDecimal amountTo) {
return amount; this.amountTo = amountTo;
} }
public void setAmount(BigDecimal amount) { public Integer getVerifyType() {
this.amount = amount; return verifyType;
}
public void setVerifyType(Integer verifyType) {
this.verifyType = verifyType;
}
public String getCreateBy() {
return createBy;
}
public void setCreateBy(String createBy) {
this.createBy = createBy;
} }
public Integer getInvoiceEntityType() { public Integer getInvoiceEntityType() {
...@@ -162,13 +185,7 @@ public class InputInvoiceQueryDto { ...@@ -162,13 +185,7 @@ public class InputInvoiceQueryDto {
this.invoiceSourceType = invoiceSourceType; this.invoiceSourceType = invoiceSourceType;
} }
public String getStaffId() {
return staffId;
}
public void setStaffId(String staffId) {
this.staffId = staffId;
}
public String getSerialNo() { public String getSerialNo() {
return serialNo; return serialNo;
......
package pwc.taxtech.atms.service; package pwc.taxtech.atms.service;
import pwc.taxtech.atms.dto.input.CamelPagingDto;
import pwc.taxtech.atms.dto.input.CamelPagingResultDto; import pwc.taxtech.atms.dto.input.CamelPagingResultDto;
import pwc.taxtech.atms.dto.input.InputInvoiceQueryDto; import pwc.taxtech.atms.dto.input.InputInvoiceQueryDto;
import pwc.taxtech.atms.entitiy.InputInvoice; import pwc.taxtech.atms.entitiy.InputInvoice;
...@@ -13,4 +14,14 @@ public interface InvoiceManageService { ...@@ -13,4 +14,14 @@ public interface InvoiceManageService {
* @return list * @return list
*/ */
CamelPagingResultDto<InputInvoice> getInputInvoiceList(InputInvoiceQueryDto inputInvoiceQueryDto); CamelPagingResultDto<InputInvoice> getInputInvoiceList(InputInvoiceQueryDto inputInvoiceQueryDto);
/**
* 导出所有关联发票
* @param inputInvoiceQueryDto
* @param pagingDto
* @param fileName
* @return
*/
String exportInvoiceAllInfoList(InputInvoiceQueryDto inputInvoiceQueryDto, CamelPagingDto pagingDto, String fileName);
} }
package pwc.taxtech.atms.service.impl; package pwc.taxtech.atms.service.impl;
import org.apache.commons.lang.ObjectUtils.Null; import java.util.List;
import org.aspectj.weaver.WeakClassLoaderReference;
import org.hamcrest.core.Is;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import com.github.pagehelper.Page;
import com.github.pagehelper.PageHelper; import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo; import com.github.pagehelper.PageInfo;
import net.sf.jsqlparser.statement.select.Select;
import pwc.taxtech.atms.common.CommonUtils; import pwc.taxtech.atms.common.CommonUtils;
import pwc.taxtech.atms.dao.CustomerMapper;
import pwc.taxtech.atms.dao.InputInvoiceMapper; import pwc.taxtech.atms.dao.InputInvoiceMapper;
import pwc.taxtech.atms.dto.input.CamelPagingDto; import pwc.taxtech.atms.dto.input.CamelPagingDto;
import pwc.taxtech.atms.dto.input.CamelPagingResultDto; import pwc.taxtech.atms.dto.input.CamelPagingResultDto;
...@@ -21,11 +17,6 @@ import pwc.taxtech.atms.entitiy.InputInvoice; ...@@ -21,11 +17,6 @@ import pwc.taxtech.atms.entitiy.InputInvoice;
import pwc.taxtech.atms.entitiy.InputInvoiceExample; import pwc.taxtech.atms.entitiy.InputInvoiceExample;
import pwc.taxtech.atms.service.InvoiceManageService; import pwc.taxtech.atms.service.InvoiceManageService;
import java.math.BigDecimal;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
@Service @Service
public class InvoiceManageServiceImpl extends BaseService implements InvoiceManageService { public class InvoiceManageServiceImpl extends BaseService implements InvoiceManageService {
...@@ -37,14 +28,20 @@ public class InvoiceManageServiceImpl extends BaseService implements InvoiceMana ...@@ -37,14 +28,20 @@ public class InvoiceManageServiceImpl extends BaseService implements InvoiceMana
InputInvoiceExample example=new InputInvoiceExample(); InputInvoiceExample example=new InputInvoiceExample();
InputInvoiceExample.Criteria criteria=example.createCriteria(); InputInvoiceExample.Criteria criteria=example.createCriteria();
if (inputInvoiceQueryDto.getAmount()!=null ) { if (inputInvoiceQueryDto.getAmountForm()!=null ) {
criteria.andAmountEqualTo(inputInvoiceQueryDto.getAmount()); criteria.andAmountGreaterThanOrEqualTo(inputInvoiceQueryDto.getAmountForm());
}
if (inputInvoiceQueryDto.getAmountTo()!=null ) {
criteria.andAmountLessThanOrEqualTo(inputInvoiceQueryDto.getAmountTo());
} }
if (inputInvoiceQueryDto.getBuyerBankName()!=null ) { if (inputInvoiceQueryDto.getBuyerBankName()!=null ) {
criteria.andBuyerBankNameEqualTo(inputInvoiceQueryDto.getBuyerBankName()); criteria.andBuyerBankNameEqualTo(inputInvoiceQueryDto.getBuyerBankName());
} }
if (inputInvoiceQueryDto.getInvoiceDate()!=null ) { if (inputInvoiceQueryDto.getInvoiceDateForm()!=null ) {
criteria.andInvoiceDateEqualTo(inputInvoiceQueryDto.getInvoiceDate()); criteria.andInvoiceDateGreaterThanOrEqualTo(inputInvoiceQueryDto.getInvoiceDateForm());
}
if (inputInvoiceQueryDto.getInvoiceDateTo()!=null ) {
criteria.andInvoiceDateLessThanOrEqualTo(inputInvoiceQueryDto.getInvoiceDateTo());
} }
if (inputInvoiceQueryDto.getInvoiceEntityType()!=null ) { if (inputInvoiceQueryDto.getInvoiceEntityType()!=null ) {
criteria.andInvoiceEntityTypeEqualTo(inputInvoiceQueryDto.getInvoiceEntityType()); criteria.andInvoiceEntityTypeEqualTo(inputInvoiceQueryDto.getInvoiceEntityType());
...@@ -64,18 +61,25 @@ public class InvoiceManageServiceImpl extends BaseService implements InvoiceMana ...@@ -64,18 +61,25 @@ public class InvoiceManageServiceImpl extends BaseService implements InvoiceMana
if (inputInvoiceQueryDto.getSerialNo()!=null ) { if (inputInvoiceQueryDto.getSerialNo()!=null ) {
criteria.andSerialNoEqualTo(inputInvoiceQueryDto.getSerialNo()); criteria.andSerialNoEqualTo(inputInvoiceQueryDto.getSerialNo());
} }
if (inputInvoiceQueryDto.getStaffId()!=null ) {
criteria.andStaffIdEqualTo(inputInvoiceQueryDto.getStaffId());
}
if (inputInvoiceQueryDto.getStatus()!=null ) { if (inputInvoiceQueryDto.getStatus()!=null ) {
criteria.andStatusEqualTo(inputInvoiceQueryDto.getStatus()); criteria.andStatusEqualTo(inputInvoiceQueryDto.getStatus());
} }
if (inputInvoiceQueryDto.getUploadDate()!=null ) { if (inputInvoiceQueryDto.getUploadDateForm()!=null ) {
criteria.andUploadDateEqualTo(inputInvoiceQueryDto.getUploadDate()); criteria.andUploadDateGreaterThanOrEqualTo(inputInvoiceQueryDto.getUploadDateForm());
}
if (inputInvoiceQueryDto.getUploadDateTo()!=null ) {
criteria.andUploadDateLessThanOrEqualTo(inputInvoiceQueryDto.getUploadDateTo());
} }
if (inputInvoiceQueryDto.getUploadType()!=null ) { if (inputInvoiceQueryDto.getUploadType()!=null ) {
criteria.andUploadTypeEqualTo(inputInvoiceQueryDto.getUploadType()); criteria.andUploadTypeEqualTo(inputInvoiceQueryDto.getUploadType());
} }
if (inputInvoiceQueryDto.getVerifyType()!=null ) {
criteria.andVerifyTypeEqualTo(inputInvoiceQueryDto.getVerifyType());
}
if(inputInvoiceQueryDto.getCreateBy()!=null) {
criteria.andCreateByEqualTo(inputInvoiceQueryDto.getCreateBy());
}
Integer pageIndex=inputInvoiceQueryDto.getPagingDto().getPageIndex()!=null?inputInvoiceQueryDto.getPagingDto().getPageIndex():1; Integer pageIndex=inputInvoiceQueryDto.getPagingDto().getPageIndex()!=null?inputInvoiceQueryDto.getPagingDto().getPageIndex():1;
Integer pageSize=inputInvoiceQueryDto.getPagingDto().getPageSize()!=null?inputInvoiceQueryDto.getPagingDto().getPageSize():10; Integer pageSize=inputInvoiceQueryDto.getPagingDto().getPageSize()!=null?inputInvoiceQueryDto.getPagingDto().getPageSize():10;
...@@ -94,4 +98,11 @@ public class InvoiceManageServiceImpl extends BaseService implements InvoiceMana ...@@ -94,4 +98,11 @@ public class InvoiceManageServiceImpl extends BaseService implements InvoiceMana
camelPagingResultDto.setCalculateData(inputInvoice); camelPagingResultDto.setCalculateData(inputInvoice);
return camelPagingResultDto; return camelPagingResultDto;
} }
@Override
public String exportInvoiceAllInfoList(InputInvoiceQueryDto inputInvoiceQueryDto, CamelPagingDto pagingDto,
String fileName) {
// TODO Auto-generated method stub
return null;
}
} }
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