Commit 56492875 authored by neo.wang's avatar neo.wang

Merge branch 'dev_neo' into 'dev'

Dev neo

See merge request root/atms!39
parents ba172580 068a0753
......@@ -16,24 +16,26 @@ import pwc.taxtech.atms.dto.PagingDto;
import pwc.taxtech.atms.dto.PagingResultDto;
import pwc.taxtech.atms.dto.vatdto.CustomsInvoiceDto;
import pwc.taxtech.atms.dto.vatdto.CustomsInvoiceFilter;
import pwc.taxtech.atms.dto.vatdto.JsonCustomsInvoice;
import pwc.taxtech.atms.dto.vatdto.JsonCustomsInvoiceDto;
import pwc.taxtech.atms.exception.ApplicationException;
import pwc.taxtech.atms.thirdparty.ExcelUtil;
import pwc.taxtech.atms.vat.service.CustomsInvoiceService;
import pwc.taxtech.atms.vat.service.impl.CustomsInvoiceServiceImpl;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.io.OutputStream;
import java.text.DateFormat;
import java.util.*;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.UUID;
import java.util.stream.Collectors;
@RestController
@RequestMapping(value = "api/v1/CustomsInvoice")
public class CustomsInvoiceController {
@Autowired
CustomsInvoiceService customsInvoiceService;
CustomsInvoiceServiceImpl customsInvoiceService;
@RequestMapping(value = "GetCustomsInvoiceDataForDisplay", method = RequestMethod.GET, produces = MediaType.APPLICATION_JSON_UTF8_VALUE)
public String getCustomsInvoiceDataForDisplay(@RequestParam int fromPeriod, @RequestParam int toPeriod, @RequestParam String criteria, @RequestParam String pagination) {
......@@ -58,6 +60,11 @@ public class CustomsInvoiceController {
return ResponseEntity.ok().body(customsInvoiceService.getCustomsInvoicesByPeriodId(periodId));
}
@RequestMapping(value = "getCustomsInvoicesValidates/{periodId}", method = RequestMethod.GET, produces = MediaType.APPLICATION_JSON_UTF8_VALUE)
public ResponseEntity getCustomsInvoicesValidates(@PathVariable Integer periodId) {
return ResponseEntity.ok().body(customsInvoiceService.getCustomsInvoicesValidates(periodId));
}
@RequestMapping(value = "ExportQueryData/get", method = RequestMethod.POST, produces = MediaType.APPLICATION_JSON_UTF8_VALUE)
public void exportQueryData(@RequestParam String criteria, HttpServletResponse response) {
CustomsInvoiceFilter filter = new CustomsInvoiceFilter();
......
......@@ -4,23 +4,35 @@ import org.apache.http.HttpStatus;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.MediaType;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;
import pwc.taxtech.atms.dto.PagingResultDto;
import pwc.taxtech.atms.dto.vatdto.*;
import pwc.taxtech.atms.dto.vatdto.InputInvoicePreviewQueryParam;
import pwc.taxtech.atms.dto.vatdto.InputVATInvoiceBaseDto;
import pwc.taxtech.atms.dto.vatdto.InputVATInvoiceDto;
import pwc.taxtech.atms.thirdparty.ExcelSheet;
import pwc.taxtech.atms.thirdparty.ExcelUtil;
import pwc.taxtech.atms.vat.service.InputInvoiceDataImportService;
import pwc.taxtech.atms.vat.entity.InputVATInvoiceItem;
import pwc.taxtech.atms.vat.service.impl.InputInvoiceDataImportServiceImpl;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.io.OutputStream;
import java.util.*;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.UUID;
@RestController
@RequestMapping(value = "api/v1/inputInvoiceImport")
public class InputInvoiceImportController {
@Autowired
InputInvoiceDataImportService inputInvoiceDataImportService;
InputInvoiceDataImportServiceImpl inputInvoiceDataImportService;
@RequestMapping(value = "inputInvoicePreviewList", method = RequestMethod.POST, produces = MediaType.APPLICATION_JSON_UTF8_VALUE)
public @ResponseBody
......@@ -55,6 +67,11 @@ public class InputInvoiceImportController {
return ResponseEntity.ok().body(inputInvoiceDataImportService.getInputInvoiceList(period));
}
@RequestMapping(value = "getInputInvoiceItemList/{period}", method = RequestMethod.GET, produces = MediaType.APPLICATION_JSON_UTF8_VALUE)
public ResponseEntity getInputInvoiceItemList(@PathVariable Integer period) {
return ResponseEntity.ok().body(inputInvoiceDataImportService.getInputInvoiceItemList(period));
}
private int getDownloadFilePath(InputInvoicePreviewQueryParam paras, OutputStream outputStream) {
List<InputVATInvoiceDto> list = inputInvoiceDataImportService.getInputInvoiceTreeViewData(paras).getList();
if (list.size() == 0) {
......@@ -90,12 +107,9 @@ public class InputInvoiceImportController {
excelSheetB.setHeaders(header2);
excelSheetB.setSheetName("sheetB");
List<InputVATInvoiceItemDto> inputInvoiceItemList = new ArrayList<>();
List<InputVATInvoiceItem> inputInvoiceItemList = new ArrayList<>();
for (InputVATInvoiceDto item : list) {
List<InputVATInvoiceItemDto> tempResult = inputInvoiceDataImportService.getInputInvoiceItemTreeViewData(item.getID());
for (InputVATInvoiceItemDto r : tempResult) {
inputInvoiceItemList.add(r);
}
inputInvoiceItemList.addAll(inputInvoiceDataImportService.getInputInvoiceItemTreeViewData(item.getID()));
}
excelSheetB.setDataset(inputInvoiceItemList);
List<ExcelSheet<InputVATInvoiceBaseDto>> sheets = new ArrayList<>();
......
......@@ -9,25 +9,25 @@ import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;
import pwc.taxtech.atms.dto.vatdto.QueryJeDto;
import pwc.taxtech.atms.vat.service.JournalEntryImportService;
import pwc.taxtech.atms.vat.service.impl.JournalEntryImportServiceImpl;
@RestController
@RequestMapping(value = "/api/v1/journalEntryImport")
public class JournalEntryImportController {
@Autowired
private JournalEntryImportService journalEntryDataImportService;
private JournalEntryImportServiceImpl journalEntryDataImportService;
@ApiOperation(value = "queryJournalEntryData", notes = "")
@RequestMapping(value = "/queryJournalEntryData", method = RequestMethod.POST)
public ResponseEntity queryJournalEntryData(@RequestBody QueryJeDto queryJeDto) {
return ResponseEntity.ok( journalEntryDataImportService.qeryJournalEntryData(queryJeDto));
return ResponseEntity.ok(journalEntryDataImportService.qeryJournalEntryData(queryJeDto));
}
@ApiOperation(value = "getValidationInfo", notes = "")
@RequestMapping(value = "getValidationInfo/{type}/{period}", method = RequestMethod.GET)
public ResponseEntity getValidationInfo(@PathVariable Integer type, @PathVariable Integer period) {
return ResponseEntity.ok( journalEntryDataImportService.getValidationInfoList(type,period));
return ResponseEntity.ok(journalEntryDataImportService.getValidationInfoList(type, period));
}
}
package pwc.taxtech.atms.dto.vatdto;
public class InputVATInvoiceItemDto extends InputVATInvoiceBaseDto {
}
package pwc.taxtech.atms.dto.vatdto;
import java.util.Date;
public class ValidationInfoDto {
private String ID;
private Integer importTypeId;
private String validationResult;
private String validationDetails;
private String validationTips;
private Integer number;
private String creatorId;
private Date createTime;
private Integer periodId;
private Integer erpCheckTypeId;
private Integer errorLevel;
public String getID() {
return ID;
}
public void setID(String ID) {
this.ID = ID;
}
public Integer getImportTypeId() {
return importTypeId;
}
public void setImportTypeId(Integer importTypeId) {
this.importTypeId = importTypeId;
}
public String getValidationResult() {
return validationResult;
}
public void setValidationResult(String validationResult) {
this.validationResult = validationResult;
}
public String getValidationDetails() {
return validationDetails;
}
public void setValidationDetails(String validationDetails) {
this.validationDetails = validationDetails;
}
public String getValidationTips() {
return validationTips;
}
public void setValidationTips(String validationTips) {
this.validationTips = validationTips;
}
public Integer getNumber() {
return number;
}
public void setNumber(Integer number) {
this.number = number;
}
public String getCreatorId() {
return creatorId;
}
public void setCreatorId(String creatorId) {
this.creatorId = creatorId;
}
public Date getCreateTime() {
return createTime;
}
public void setCreateTime(Date createTime) {
this.createTime = createTime;
}
public Integer getPeriodId() {
return periodId;
}
public void setPeriodId(Integer periodId) {
this.periodId = periodId;
}
public Integer getErpCheckTypeId() {
return erpCheckTypeId;
}
public void setErpCheckTypeId(Integer erpCheckTypeId) {
this.erpCheckTypeId = erpCheckTypeId;
}
public Integer getErrorLevel() {
return errorLevel;
}
public void setErrorLevel(Integer errorLevel) {
this.errorLevel = errorLevel;
}
public Integer getIsShowDetail() {
return isShowDetail;
}
public void setIsShowDetail(Integer isShowDetail) {
this.isShowDetail = isShowDetail;
}
private Integer isShowDetail;
}
package pwc.taxtech.atms.vat.service;
import org.springframework.http.ResponseEntity;
import pwc.taxtech.atms.dto.vatdto.CustomsInvoiceDto;
import java.util.List;
public interface CustomsInvoiceService {
/**
*
* @param fromPeriod
* @param toPeriod
* @return
*/
List<CustomsInvoiceDto> getCustomsInvoicesByPeriodIds(int fromPeriod, int toPeriod);
List<CustomsInvoiceDto> getCustomsInvoicesByPeriodId(Integer periodId);
}
package pwc.taxtech.atms.vat.service;
import pwc.taxtech.atms.dto.PagingResultDto;
import pwc.taxtech.atms.dto.vatdto.InputInvoicePreviewQueryParam;
import pwc.taxtech.atms.dto.vatdto.InputVATInvoiceDto;
import pwc.taxtech.atms.dto.vatdto.InputVATInvoiceItemDto;
import java.util.List;
public interface InputInvoiceDataImportService {
PagingResultDto<InputVATInvoiceDto> getInputInvoiceTreeViewData(InputInvoicePreviewQueryParam paras);
List<InputVATInvoiceItemDto> getInputInvoiceItemTreeViewData(String id);
List<InputVATInvoiceDto> getInputInvoiceList(Integer period);
}
package pwc.taxtech.atms.vat.service;
import pwc.taxtech.atms.dto.PagingResultDto;
import pwc.taxtech.atms.dto.vatdto.QueryJeDto;
import pwc.taxtech.atms.dto.vatdto.ValidationInfoDto;
import pwc.taxtech.atms.dto.vatdto.VoucherDto;
import java.util.List;
public interface JournalEntryImportService {
PagingResultDto<VoucherDto> qeryJournalEntryData(QueryJeDto queryJeDto);
List<ValidationInfoDto> getValidationInfoList(Integer type, Integer period);
}
package pwc.taxtech.atms.vat.service.impl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import pwc.taxtech.atms.common.CommonUtils;
import pwc.taxtech.atms.constant.enums.EnumValidationType;
import pwc.taxtech.atms.dto.FieldsMapper;
import pwc.taxtech.atms.dto.OperationResultDto;
import pwc.taxtech.atms.dto.vatdto.CustomsInvoiceDto;
import pwc.taxtech.atms.vat.dao.ValidationInfoMapper;
import pwc.taxtech.atms.vat.entity.CustomsInvoice;
import pwc.taxtech.atms.vat.entity.CustomsInvoiceExample;
import pwc.taxtech.atms.vat.service.CustomsInvoiceService;
import pwc.taxtech.atms.vat.entity.ValidationInfo;
import pwc.taxtech.atms.vat.entity.ValidationInfoExample;
import java.math.BigDecimal;
import java.text.DecimalFormat;
......@@ -15,8 +20,10 @@ import java.util.Comparator;
import java.util.List;
@Service
public class CustomsInvoiceServiceImpl extends VatAbstractService implements CustomsInvoiceService {
@Override
public class CustomsInvoiceServiceImpl extends VatAbstractService {
@Autowired
private ValidationInfoMapper validationInfoMapper;
public List<CustomsInvoiceDto> getCustomsInvoicesByPeriodIds(int fromPeriod, int toPeriod) {
CustomsInvoiceExample example = new CustomsInvoiceExample();
example.setOrderByClause(" PayNum");
......@@ -43,24 +50,23 @@ public class CustomsInvoiceServiceImpl extends VatAbstractService implements Cus
return result;
}
@Override
public List<CustomsInvoiceDto> getCustomsInvoicesByPeriodId(Integer periodId) {
CustomsInvoiceExample example = new CustomsInvoiceExample();
example.createCriteria().andPeriodIdEqualTo(periodId);
List<CustomsInvoice> result=customsInvoiceMapper.selectByExample(example);
List<CustomsInvoice> result = customsInvoiceMapper.selectByExample(example);
result.sort(Comparator.comparing(CustomsInvoice::getPayNum));
int seqNo = 1;
List<CustomsInvoiceDto> dtos = new ArrayList<>(result.size());
for(CustomsInvoice ci:result){
for (CustomsInvoice ci : result) {
CustomsInvoiceDto dto = new CustomsInvoiceDto();
try {
FieldsMapper.map(ci,dto);
FieldsMapper.map(ci, dto);
dto.setSeqNo(seqNo++);
dto.setInvoiceAmount(ci.getInvoiceAmount().setScale(2,BigDecimal.ROUND_HALF_UP));
dto.setInvoiceTaxAmount(ci.getInvoiceTaxAmount().setScale(2,BigDecimal.ROUND_HALF_UP));
dto.setInvoiceAmount(ci.getInvoiceAmount().setScale(2, BigDecimal.ROUND_HALF_UP));
dto.setInvoiceTaxAmount(ci.getInvoiceTaxAmount().setScale(2, BigDecimal.ROUND_HALF_UP));
} catch (ClassNotFoundException e) {
e.printStackTrace();
} catch (IllegalAccessException e) {
......@@ -71,4 +77,25 @@ public class CustomsInvoiceServiceImpl extends VatAbstractService implements Cus
return dtos;
}
public OperationResultDto<List<ValidationInfo>> getCustomsInvoicesValidates(Integer periodId) {
ValidationInfoExample example = new ValidationInfoExample();
List<ValidationInfo> result = null;
if (periodId == null) {
example.createCriteria().andImportTypeIdEqualTo(EnumValidationType.CustomInvoice.getCode());
result = validationInfoMapper.selectByExample(example);
} else {
example.createCriteria().andImportTypeIdEqualTo(EnumValidationType.CustomInvoice.getCode()).andPeriodIdEqualTo(periodId);
result.addAll(validationInfoMapper.selectByExample(example));
example.createCriteria().andImportTypeIdEqualTo(EnumValidationType.CustomInvoice.getCode()).andPeriodIdIsNull();
result.addAll(validationInfoMapper.selectByExample(example));
}
OperationResultDto<List<ValidationInfo>> resultOpt = new OperationResultDto<>();
resultOpt.setResult(true);
resultOpt.setResultMsg("");
resultOpt.setData(result);
return resultOpt;
}
}
......@@ -9,7 +9,6 @@ import pwc.taxtech.atms.constant.enums.ImageType;
import pwc.taxtech.atms.dto.FieldsMapper;
import pwc.taxtech.atms.dto.OperationResultDto;
import pwc.taxtech.atms.dto.vatdto.DataCheckDto;
import pwc.taxtech.atms.dto.vatdto.ValidationInfoDto;
import pwc.taxtech.atms.dto.vatdto.VoucherAccountMto;
import pwc.taxtech.atms.dto.vatdto.VoucherBalanceDto;
import pwc.taxtech.atms.dto.vatdto.VoucherDto;
......@@ -54,7 +53,7 @@ public class FinanceDataImportServiceImpl implements FinanceDataImportService {
List<DataCheckDto> results = new ArrayList<>();
OperationResultDto<List<DataCheckDto>> operationResult = new OperationResultDto<>();
List<ValidationInfoDto> dtos = getValidationData(ErpBasicCheck.getCode());
List<ValidationInfo> dtos = getValidationData(ErpBasicCheck.getCode());
if (dtos != null && dtos.size() > 0) {
dtos.forEach(b -> {
DataCheckDto dataCheckDto = new DataCheckDto();
......@@ -312,34 +311,17 @@ public class FinanceDataImportServiceImpl implements FinanceDataImportService {
}
//判断ValidationInfo中是否存在typeId的数据
private List<ValidationInfoDto> getValidationData(Integer typeId, Integer periodId) {
private List<ValidationInfo> getValidationData(Integer typeId, Integer periodId) {
ValidationInfoExample example = new ValidationInfoExample();
if (periodId != null && periodId > 0) {
example.createCriteria().andImportTypeIdEqualTo(typeId.intValue()).andPeriodIdEqualTo(periodId.intValue());
} else example.createCriteria().andImportTypeIdEqualTo(typeId.intValue());
List<ValidationInfo> infos = validationInfoMapper.selectByExample(example);
List<ValidationInfoDto> dots = new ArrayList<>(infos.size());
infos.forEach(m -> {
ValidationInfoDto dto = new ValidationInfoDto();
try {
FieldsMapper.map(m, dto);
} catch (ClassNotFoundException e) {
e.printStackTrace();
} catch (IllegalAccessException e) {
e.printStackTrace();
}
dots.add(dto);
});
return dots;
return validationInfoMapper.selectByExample(example);
}
private List<ValidationInfoDto> getValidationData(Integer typeId) {
private List<ValidationInfo> getValidationData(Integer typeId) {
return getValidationData(typeId, null);
}
}
......@@ -3,26 +3,21 @@ package pwc.taxtech.atms.vat.service.impl;
import org.springframework.stereotype.Service;
import pwc.taxtech.atms.common.CommonUtils;
import pwc.taxtech.atms.dto.FieldsMapper;
import pwc.taxtech.atms.dto.OperationResultDto;
import pwc.taxtech.atms.dto.PagingResultDto;
import pwc.taxtech.atms.dto.vatdto.InputInvoicePreviewQueryParam;
import pwc.taxtech.atms.dto.vatdto.InputVATInvoiceDto;
import pwc.taxtech.atms.dto.vatdto.InputVATInvoiceItemDto;
import pwc.taxtech.atms.dto.vatdto.QueryOutputDto;
import pwc.taxtech.atms.vat.entity.InputVATInvoice;
import pwc.taxtech.atms.vat.entity.InputVATInvoiceExample;
import pwc.taxtech.atms.vat.entity.InputVATInvoiceItem;
import pwc.taxtech.atms.vat.entity.InputVATInvoiceItemExample;
import pwc.taxtech.atms.vat.service.InputInvoiceDataImportService;
import java.util.ArrayList;
import java.util.Comparator;
import java.util.List;
@Service
public class InputInvoiceDataImportServiceImpl extends VatAbstractService implements InputInvoiceDataImportService {
public class InputInvoiceDataImportServiceImpl extends VatAbstractService {
@Override
public PagingResultDto<InputVATInvoiceDto> getInputInvoiceTreeViewData(InputInvoicePreviewQueryParam paras) {
PagingResultDto<InputVATInvoiceDto> qResult = new PagingResultDto<>();
qResult.setPageInfo(paras.getPageInfo());
......@@ -42,34 +37,25 @@ public class InputInvoiceDataImportServiceImpl extends VatAbstractService implem
return qResult;
}
@Override
public List<InputVATInvoiceItemDto> getInputInvoiceItemTreeViewData(String id) {
public List<InputVATInvoiceItem> getInputInvoiceItemTreeViewData(String id) {
InputVATInvoiceItemExample example = new InputVATInvoiceItemExample();
example.createCriteria().andInputVATInvoiceIDEqualTo(id);
List<InputVATInvoiceItem> list = inputVATInvoiceItemMapper.selectByExample(example);
List<InputVATInvoiceItemDto> result = new ArrayList<>();
list.forEach(a -> {
InputVATInvoiceItemDto dto = new InputVATInvoiceItemDto();
CommonUtils.copyProperties(a, dto);
result.add(dto);
});
return result;
return inputVATInvoiceItemMapper.selectByExample(example);
}
@Override
public List<InputVATInvoiceDto> getInputInvoiceList(Integer period) {
InputVATInvoiceExample inputVATInvoiceExample = new InputVATInvoiceExample();
inputVATInvoiceExample.createCriteria().andPeriodIDEqualTo(period.intValue());
List<InputVATInvoice> inputVatEntity =inputVATInvoiceMapper.selectByExample(inputVATInvoiceExample);
List<InputVATInvoice> inputVatEntity = inputVATInvoiceMapper.selectByExample(inputVATInvoiceExample);
inputVatEntity.sort(Comparator.comparing(InputVATInvoice::getInvoiceNumber));
inputVatEntity.sort(Comparator.comparing(InputVATInvoice::getCreateTime));
List<InputVATInvoiceDto> result = new ArrayList<>(inputVatEntity.size());
inputVatEntity.forEach(m->{
InputVATInvoiceDto dto=new InputVATInvoiceDto();
inputVatEntity.forEach(m -> {
InputVATInvoiceDto dto = new InputVATInvoiceDto();
try {
FieldsMapper.map(m,dto);
FieldsMapper.map(m, dto);
} catch (ClassNotFoundException e) {
e.printStackTrace();//TODO:should be fixed with exception filter (neo)
} catch (IllegalAccessException e) {
......@@ -80,4 +66,10 @@ public class InputInvoiceDataImportServiceImpl extends VatAbstractService implem
return result;
}
public List<InputVATInvoiceItem> getInputInvoiceItemList(Integer period) {
InputVATInvoiceItemExample example = new InputVATInvoiceItemExample();
example.createCriteria().andPeriodIDEqualTo(period.intValue());
return inputVATInvoiceItemMapper.selectByExample(example);
}
}
......@@ -6,14 +6,12 @@ import pwc.taxtech.atms.constant.enums.VatImportType;
import pwc.taxtech.atms.dto.FieldsMapper;
import pwc.taxtech.atms.dto.PagingResultDto;
import pwc.taxtech.atms.dto.vatdto.QueryJeDto;
import pwc.taxtech.atms.dto.vatdto.ValidationInfoDto;
import pwc.taxtech.atms.dto.vatdto.VoucherDto;
import pwc.taxtech.atms.vat.dao.JournalEntryImportMapper;
import pwc.taxtech.atms.vat.dao.ValidationInfoMapper;
import pwc.taxtech.atms.vat.entity.ValidationInfo;
import pwc.taxtech.atms.vat.entity.ValidationInfoExample;
import pwc.taxtech.atms.vat.entity.Voucher;
import pwc.taxtech.atms.vat.service.JournalEntryImportService;
import java.math.BigDecimal;
import java.util.ArrayList;
......@@ -22,14 +20,13 @@ import java.util.List;
import static pwc.taxtech.atms.constant.Constant.WholeYear;
@Service
public class JournalEntryImportServiceImpl implements JournalEntryImportService {
public class JournalEntryImportServiceImpl {
@Autowired
JournalEntryImportMapper journalEntryImportMapper;
@Autowired
ValidationInfoMapper validationInfoMapper;
@Override
public PagingResultDto<VoucherDto> qeryJournalEntryData(QueryJeDto queryJeDto) {
PagingResultDto<VoucherDto> qResult = new PagingResultDto<VoucherDto>();
qResult.setPageInfo(queryJeDto.getPageInfo());
......@@ -84,28 +81,13 @@ public class JournalEntryImportServiceImpl implements JournalEntryImportService
return qResult;
}
@Override
public List<ValidationInfoDto> getValidationInfoList(Integer type, Integer period) {
public List<ValidationInfo> getValidationInfoList(Integer type, Integer period) {
ValidationInfoExample validationInfoExample = new ValidationInfoExample();
if (period.intValue() != WholeYear)
validationInfoExample.createCriteria().andImportTypeIdEqualTo(type).andPeriodIdEqualTo(period);
else validationInfoExample.createCriteria().andImportTypeIdEqualTo(type);
List<ValidationInfo> result= validationInfoMapper.selectByExample(validationInfoExample);
List<ValidationInfoDto> validationInfoDtos = new ArrayList<>(result.size());
result.forEach(m->{
ValidationInfoDto dto = new ValidationInfoDto();
try {
FieldsMapper.map(result,dto);
} catch (ClassNotFoundException e) {
e.printStackTrace();
} catch (IllegalAccessException e) {
e.printStackTrace();
}
});
return validationInfoDtos;
return validationInfoMapper.selectByExample(validationInfoExample);
}
}
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