Commit d262068d authored by neo's avatar neo

[DEV] add all import reference controller and service interface

parent f41f2cf5
......@@ -6,6 +6,7 @@ import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.MediaType;
import org.springframework.http.ResponseEntity;
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.RequestParam;
......@@ -15,7 +16,9 @@ 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.ImportCustomsInvoiceDto;
import pwc.taxtech.atms.dto.vatdto.JsonCustomsInvoiceDto;
import pwc.taxtech.atms.service.IdentityService;
import pwc.taxtech.atms.thirdparty.ExcelUtil;
import pwc.taxtech.atms.vat.service.impl.CustomsInvoiceServiceImpl;
......@@ -38,6 +41,8 @@ import static javax.servlet.http.HttpServletResponse.SC_OK;
public class CustomsInvoiceController {
@Autowired
CustomsInvoiceServiceImpl customsInvoiceService;
@Autowired
private IdentityService identityService;
@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) {
......@@ -250,4 +255,11 @@ public class CustomsInvoiceController {
}
return balanceList;
}
@RequestMapping(value = "ImportCustomsInvoice", method = RequestMethod.POST, produces = MediaType.APPLICATION_JSON_UTF8_VALUE)
public ResponseEntity ImportBalanceList(@RequestBody ImportCustomsInvoiceDto importDto)
{
String userId = identityService.getIdentityUser().getID();
return ResponseEntity.ok(customsInvoiceService.ImportCustomsInvoice(importDto.CustomsList, importDto.ImportType,userId));
}
}
......@@ -2,11 +2,11 @@ package pwc.taxtech.atms.controller;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.MediaType;
import org.springframework.http.ResponseEntity;
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.OperationResultDto;
import pwc.taxtech.atms.service.IdentityService;
import pwc.taxtech.atms.vat.service.FinanceDataImportService;
......@@ -20,8 +20,188 @@ public class FinanceDataImportController {
private IdentityService identityService;
@ApiOperation(value = "")
@RequestMapping(value = "checkData/basicCheck", method = RequestMethod.GET)
@RequestMapping(value = "checkData/basicCheck", method = RequestMethod.GET, produces = MediaType.APPLICATION_JSON_UTF8_VALUE)
public ResponseEntity getBasicValidationResults() {
return ResponseEntity.ok().body(financeDataImport.getBasicValidationResults(identityService.getIdentityUser().getID()));
}
@RequestMapping(value = "importData/financeDataUpload", method = RequestMethod.POST, produces = MediaType.APPLICATION_JSON_UTF8_VALUE)
public ResponseEntity FinanceDataUpload() {
// string importMethod = HttpContext.Current.Request.Params["importMethod"];
// if (HttpContext.Current.Request.Files.Count == 0)
// {
// return this.Ok(new OperationResultDto() { Result = false, ResultMsg = "NoFile" });
// }
//
// if (string.IsNullOrEmpty(importMethod))
// {
// return this.Ok(new OperationResultDto() { Result = false, ResultMsg = "importMethod is empty" });
// }
//
// if (!IsSameFileExtenstion(HttpContext.Current.Request.Files))
// {
// return this.Ok(new OperationResultDto() { Result = false, ResultMsg = "file extension is not same" });
// }
//
// try
// {
// OperationResultDto<ImportDataDto> result = new OperationResultDto<ImportDataDto>();
// int uploadFileCount = 0;
// string mappedPath = "";
// string fileGuid = Guid.NewGuid().ToString().ToUpper();
// var firstUploadFile = HttpContext.Current.Request.Files[0];
// string fileExtension = firstUploadFile.FileName.Substring(firstUploadFile.FileName.LastIndexOf(".") + 1, firstUploadFile.FileName.Length - firstUploadFile.FileName.LastIndexOf(".") - 1);
//
// for (int i = 0; i < HttpContext.Current.Request.Files.Count; i++)
// {
// var file = HttpContext.Current.Request.Files[i];
// mappedPath = SetUploadFolderPath(importMethod, fileExtension);
// var fileFullPath = Path.Combine(mappedPath, fileGuid + "_" + Path.GetFileName(file.FileName));
// if (SaveFile(file, mappedPath, fileFullPath))
// {
// uploadFileCount++;
// }
// }
//
// if (uploadFileCount == HttpContext.Current.Request.Files.Count)
// {
// result.Result = true;
// result.ResultMsg = string.Empty;
// result.Data = new ImportDataDto { Guid = fileGuid, Number = uploadFileCount, FileExtension = fileExtension };
//
// }
// return Ok(result);
// }
// catch (Exception ex)
// {
// Dictionary<Guid, string> error = new Dictionary<Guid, string>();
// error.Add(System.Guid.NewGuid(), ex.StackTrace);
// OperationResultDto<ImportDataDto> errorResult = new OperationResultDto<ImportDataDto>()
// {
// Result = false,
// ResultMsg = "Upload File error",
// Errors = error,
// Data = new ImportDataDto { Guid = string.Empty, Number = 0, FileExtension = string.Empty }
// };
//
// return Ok(errorResult);
// }
return ResponseEntity.ok().build();
}
@RequestMapping(value = "importData/importFinancedata", method = RequestMethod.POST, produces = MediaType.APPLICATION_JSON_UTF8_VALUE)
public ResponseEntity FinanceImportData() {
// string userId = _identityService.IdentityUser.ID;
// string importMethod = HttpContext.Current.Request.Params["importMethod"];
// string fileName = HttpContext.Current.Request.Params["fileName"];
// string importTypeStr = HttpContext.Current.Request.Params["importType"];
// string fileGuid = HttpContext.Current.Request.Params["fileGuid"];
// string periodStr = HttpContext.Current.Request.Params["period"];
// string fileExtension = HttpContext.Current.Request.Params["fileExtension"];
// string strProjectYear = HttpContext.Current.Request.Params["projectYear"];
// #region 参数为空即返回
// if (string.IsNullOrEmpty(importMethod))
// {
// return this.Ok(new OperationResultDto() { Result = false, ResultMsg = "importMethod is empty" });
// }
//
// if (string.IsNullOrEmpty(fileName))
// {
// return this.Ok(new OperationResultDto() { Result = false, ResultMsg = "fileName is empty" });
// }
//
// if (string.IsNullOrEmpty(importTypeStr))
// {
// return this.Ok(new OperationResultDto() { Result = false, ResultMsg = "importType is empty" });
// }
//
// if (string.IsNullOrEmpty(fileGuid))
// {
// return this.Ok(new OperationResultDto() { Result = false, ResultMsg = "fileGuid is empty" });
// }
//
// if (string.IsNullOrEmpty(periodStr))
// {
// return this.Ok(new OperationResultDto() { Result = false, ResultMsg = "periodStr is empty" });
// }
//
// if (string.IsNullOrEmpty(fileExtension))
// {
// return this.Ok(new OperationResultDto() { Result = false, ResultMsg = "fileExtension is empty" });
// }
//
// #endregion
// int importType = int.Parse(importTypeStr);
// int projectYear = !string.IsNullOrEmpty(strProjectYear) ? int.Parse(strProjectYear) : -1;
// int period = int.Parse(periodStr);
// int importFileCount = 0;
// var mappedPath = SetUploadFolderPath(importMethod, fileExtension);
// OperationResultDto<List<ImportDataDto>> result = new OperationResultDto<List<ImportDataDto>>();
// List<ImportDataDto> importResults = new List<ImportDataDto>();
// List<string> fileList = fileName.Split(',').ToList();
// List<string> toDeleteFilesPath = new List<string>();
// #region 导入数据
//
// if (importType == (int)DataImport.ImportType.Override)
// {
// //如果导入文件只有voucher的话,那么就不用删除CustBalance表中当前期间的数据
// bool isClearCustTb = fileList.Count == 1 && fileList.First().ToLower().StartsWith(VatGlobal.VoucherTbName.ToLower()) ? false : true;
// //1. 删除TB相关表的数据
// _financeDataImport.ClearTable(period,isClearCustTb);
// }
// //2. 删除ValidationInfo中Erp相关的数据
// _financeDataImport.DeleteErpValidation();
//
// //3. 开始导入数据
// foreach (var f in fileList)
// {
// var fileFullPath = Path.Combine(mappedPath, fileGuid + "_" + Path.GetFileName(f));
// var schemaPath = HostingEnvironment.MapPath("~/Resource");
// toDeleteFilesPath.Add(fileFullPath);
// var importResult = _financeDataImport.ImportData(projectYear, importMethod, importType, period, fileFullPath, f, schemaPath, userId);
// if (importResult.Result)
// {
// importFileCount++;
// }
// else
// {
// importResults.Add(importResult);
// }
// }
//
// if (importFileCount == fileList.Count)
// {
// _financeDataImport.UpdateCompanyBalanceNullValue();
// result.Result = true;
// result.ResultMsg = string.Empty;
// result.Data = importResults;
// toDeleteFilesPath.ForEach(f =>
// {
// if (File.Exists(f))
// {
// File.Delete(f);
// _logger.Log(LogLevel.Info, "成功删除财务数据导入文件:" + f);
// }
// });
//
// }
// else
// {
// result.Result = false;
// result.Data = importResults;
// result.ResultMsg = "导入数据出错: " + "\r\n";
// foreach (var r in importResults)
// {
// result.ResultMsg += r.FileName + "\r\n";
// }
// }
//
// #endregion
//
// return Ok(result);
return ResponseEntity.ok().build();
}
}
......@@ -10,9 +10,12 @@ 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.ImportInputInvoiceDto;
import pwc.taxtech.atms.dto.vatdto.ImportInputInvoiceItemDto;
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.service.IdentityService;
import pwc.taxtech.atms.thirdparty.ExcelSheet;
import pwc.taxtech.atms.thirdparty.ExcelUtil;
import pwc.taxtech.atms.vat.entity.InputVATInvoiceItem;
......@@ -35,6 +38,8 @@ import static javax.servlet.http.HttpServletResponse.SC_OK;
public class InputInvoiceImportController {
@Autowired
InputInvoiceDataImportServiceImpl inputInvoiceDataImportService;
@Autowired
private IdentityService identityService;
@RequestMapping(value = "inputInvoicePreviewList", method = RequestMethod.POST, produces = MediaType.APPLICATION_JSON_UTF8_VALUE)
public @ResponseBody
......@@ -121,4 +126,18 @@ public class InputInvoiceImportController {
ExcelUtil.exportExcel(sheets, outputStream);
return list.size();
}
@RequestMapping(value = "importInputInvoice}", method = RequestMethod.POST, produces = MediaType.APPLICATION_JSON_UTF8_VALUE)
public ResponseEntity ImportInputInvoiceData(@RequestBody ImportInputInvoiceDto importParam)
{
return ResponseEntity.ok(inputInvoiceDataImportService.ImportInputInvoiceData(importParam.InputInvoiceList,
importParam.ImportType, identityService.getIdentityUser().getID()));
}
@RequestMapping(value = "importInputInvoiceItem", method = RequestMethod.POST, produces = MediaType.APPLICATION_JSON_UTF8_VALUE)
public ResponseEntity ImportInputInvoiceItemData(@RequestBody ImportInputInvoiceItemDto importParam)
{
return ResponseEntity.ok(inputInvoiceDataImportService.ImportInputInvoiceItemData(importParam.InputInvoiceItemList,
importParam.ImportType, identityService.getIdentityUser().getID()));
}
}
package pwc.taxtech.atms.controller;
import com.google.errorprone.annotations.FormatString;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.MediaType;
import org.springframework.http.ResponseEntity;
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.RestController;
import pwc.taxtech.atms.dto.vatdto.ImportVoucherDto;
import pwc.taxtech.atms.dto.vatdto.QueryJeDto;
import pwc.taxtech.atms.service.IdentityService;
import pwc.taxtech.atms.vat.service.impl.JournalEntryImportServiceImpl;
@RestController
......@@ -17,6 +21,8 @@ public class JournalEntryImportController {
@Autowired
private JournalEntryImportServiceImpl journalEntryDataImportService;
@Autowired
private IdentityService identityService;
@ApiOperation(value = "queryJournalEntryData", notes = "")
@RequestMapping(value = "/queryJournalEntryData", method = RequestMethod.POST)
......@@ -29,5 +35,30 @@ public class JournalEntryImportController {
public ResponseEntity getValidationInfo(@PathVariable Integer type, @PathVariable Integer period) {
return ResponseEntity.ok(journalEntryDataImportService.getValidationInfoList(type, period));
}
@RequestMapping(value = "/importJournalEntry", method = RequestMethod.POST, produces = MediaType.APPLICATION_JSON_UTF8_VALUE)
public ResponseEntity ImportJournalEntryData(@RequestBody ImportVoucherDto importParam) {
journalEntryDataImportService.ImportJournalEntryData(importParam.VoucherList, importParam.ImportType,
identityService.getIdentityUser().getID());
return ResponseEntity.ok().build();
}
@RequestMapping(value = "importAuditAdjust/{period:int}", method = RequestMethod.POST, produces = MediaType.APPLICATION_JSON_UTF8_VALUE)
public ResponseEntity ImportAuditAdjust(@RequestBody ImportVoucherDto importParam, int period) {
return ResponseEntity.ok().body(journalEntryDataImportService.ImportAuditAdjust(importParam.VoucherList,
period, importParam.ImportType, identityService.getIdentityUser().getID()));
}
@RequestMapping(value = "getAuditAdjust/{period}", method = RequestMethod.POST, produces = MediaType.APPLICATION_JSON_UTF8_VALUE)
public ResponseEntity GetAuditAdjust(int period) {
return ResponseEntity.ok().body(journalEntryDataImportService.GetAuditAdjust(period));
}
@RequestMapping(value = "queryAuditAdjust", method = RequestMethod.POST, produces = MediaType.APPLICATION_JSON_UTF8_VALUE)
public ResponseEntity QueryAuditAdjust(QueryJeDto queryDto) {
return ResponseEntity.ok().body(journalEntryDataImportService.QueryAuditAdjust(queryDto));
}
}
package pwc.taxtech.atms.controller;
import com.github.pagehelper.util.StringUtil;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.MediaType;
import org.springframework.http.ResponseEntity;
......@@ -8,11 +9,16 @@ 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.RestController;
import pwc.taxtech.atms.constant.enums.EnumModule;
import pwc.taxtech.atms.dto.PagingResultDto;
import pwc.taxtech.atms.dto.vatdto.ImportOutputInvoiceDto;
import pwc.taxtech.atms.dto.vatdto.OutputVATInvoiceInfoDto;
import pwc.taxtech.atms.dto.vatdto.QueryEvidenceDto;
import pwc.taxtech.atms.dto.vatdto.QueryOutputDto;
import pwc.taxtech.atms.service.IdentityService;
import pwc.taxtech.atms.thirdparty.ExcelUtil;
import pwc.taxtech.atms.vat.entity.ImportFile;
import pwc.taxtech.atms.vat.service.impl.FileUploadAdapter;
import pwc.taxtech.atms.vat.service.impl.OutputInvoiceServiceImpl;
import javax.servlet.http.HttpServletResponse;
......@@ -32,6 +38,10 @@ public class OutputInvoiceController {
@Autowired
OutputInvoiceServiceImpl outputInvoiceService;
@Autowired
private IdentityService identityService;
@Autowired
private FileUploadAdapter fileUploadAdapter;
@RequestMapping(value = "queryOutputInvoiceList", method = RequestMethod.POST, produces = MediaType.APPLICATION_JSON_UTF8_VALUE)
public PagingResultDto<OutputVATInvoiceInfoDto> queryOutputInvoiceList(@RequestBody QueryOutputDto queryDto) {
......@@ -98,5 +108,38 @@ public class OutputInvoiceController {
return list.size();
}
@RequestMapping(value = "importOutputInvoice", method = RequestMethod.POST, produces = MediaType.APPLICATION_JSON_UTF8_VALUE)
public ResponseEntity ImportInputInvoiceData(@RequestBody ImportOutputInvoiceDto importDto) {
return ResponseEntity.ok(outputInvoiceService.ImportOutputInvoiceData(importDto, identityService.getIdentityUser().getID()));
}
@RequestMapping(value = "UploadEvidenceFile", method = RequestMethod.POST, produces = MediaType.APPLICATION_JSON_UTF8_VALUE)
public ResponseEntity UploadEvidenceFile() {
String userID = identityService.getIdentityUser().getID();
String fullPath = fileUploadAdapter.uploadEvidence(this, EnumModule.Evidence, UUID.randomUUID().toString());
if (!StringUtil.isNotEmpty(fullPath)) {
// string fileName = HttpContext.Current.Request.Form["filename"];
// string _tempFileName = HttpContext.Current.Request.Form["tempFileName"];
ImportFile fileDto = new ImportFile();
// {
// FileID = _tempFileName.Substring(1, _tempFileName.Length - 5),
// FilePath = fullPath,
// FileName = fileName,
// PeriodID = Convert.ToInt32(HttpContext.Current.Request.Form["period"]),
// FileType = Path.GetExtension(fileName),
// FileImportType = (int)EnumModule.Evidence,
// CreatorID = userID,
// CreateTime = DateTime.Now
// };
return ResponseEntity.ok(outputInvoiceService.addImportFile(fileDto));
}
return ResponseEntity.ok(false);
}
@RequestMapping(value = "getOutputInvoiceList/{period:int}", method = RequestMethod.GET, produces = MediaType.APPLICATION_JSON_UTF8_VALUE)
public ResponseEntity GetOutputInvoiceList(int period) {
return ResponseEntity.ok(outputInvoiceService.GetOutputInvoiceList(period));
}
}
......@@ -42,7 +42,7 @@ public class ProjectInfoController {
@ApiOperation(value = "getProjectImportType", notes = "")
@RequestMapping(value = "getProjectImportType", method = RequestMethod.GET)
@RequestMapping(value = "getProjectImportType", method = RequestMethod.POST)
public OperationResultDto<List<PeriodInfo>> getProjectImportType(@RequestBody QueryImportType queryImportType) {
return projectInfoService.getProjectImportType(queryImportType.getProjectId(), queryImportType.getPeriods(),
queryImportType.getServiceTypeId()
......
......@@ -4,24 +4,57 @@ import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.MediaType;
import org.springframework.http.ResponseEntity;
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.RestController;
import pwc.taxtech.atms.dto.vatdto.InvoiceMappingDto;
import pwc.taxtech.atms.dto.vatdto.VoucherMappingDto;
import pwc.taxtech.atms.service.IdentityService;
import pwc.taxtech.atms.vat.service.impl.VoucherInvoiceMappingServiceImpl;
import java.util.List;
import java.util.UUID;
@RequestMapping(value = "api/v1/vimapping")
@RestController
public class VoucherInvoiceMappingController {
@Autowired
private VoucherInvoiceMappingServiceImpl voucherInvoiceMappingService;
@Autowired
private IdentityService identityService;
@RequestMapping(value = "getvmappings/{period}", method = RequestMethod.GET, produces = MediaType.APPLICATION_JSON_UTF8_VALUE)
@RequestMapping(value = "getvmappings/{period}", method = RequestMethod.GET,
produces = MediaType.APPLICATION_JSON_UTF8_VALUE)
public ResponseEntity GetInvoiceMappings(@PathVariable Integer period) {
return ResponseEntity.ok().body(voucherInvoiceMappingService.getVourcherMappings(period));
}
@RequestMapping(value = "getimappings/{period}", method = RequestMethod.GET, produces = MediaType.APPLICATION_JSON_UTF8_VALUE)
@RequestMapping(value = "getimappings/{period}", method = RequestMethod.GET,
produces = MediaType.APPLICATION_JSON_UTF8_VALUE)
public ResponseEntity ValidDBVoucherMapping(@PathVariable Integer period) {
return ResponseEntity.ok().body(voucherInvoiceMappingService.getInvoiceMappings(period));
}
@RequestMapping(value = "savevmappings/{period}/{IsAddition}", method = RequestMethod.POST,
produces = MediaType.APPLICATION_JSON_UTF8_VALUE)
public ResponseEntity SaveVourcherMappings(@RequestBody List<VoucherMappingDto> list, @PathVariable int period
, @PathVariable int isAddition) {
list.forEach(m -> {
m.ID = UUID.randomUUID().toString();
m.CreatorID = identityService.getIdentityUser().getID();
});
return ResponseEntity.ok().body(voucherInvoiceMappingService.saveVourcherMappings(list, period, isAddition == 2));
}
@RequestMapping(value = "saveimappings/{period}/{IsAddition}", method = RequestMethod.POST,
produces = MediaType.APPLICATION_JSON_UTF8_VALUE)
public ResponseEntity SaveInvoiceMappings(@RequestBody List<InvoiceMappingDto> list, @PathVariable int period
, @PathVariable int isAddition) {
list.forEach(m -> {
m.ID = UUID.randomUUID().toString();
m.CreatorID = identityService.getIdentityUser().getID();
});
return ResponseEntity.ok().body(voucherInvoiceMappingService.SaveInvoiceMappings(list, period, isAddition == 2));
}
}
package pwc.taxtech.atms.dto.vatdto;
import java.util.List;
public class ImportCustomsInvoiceDto {
public List<CustomsInvoiceDto> CustomsList;
public int ImportType;
}
package pwc.taxtech.atms.dto.vatdto;
import java.util.List;
public class ImportInputInvoiceDto {
public List<InputVATInvoiceDto> InputInvoiceList;
public int ImportType;
}
package pwc.taxtech.atms.dto.vatdto;
import java.util.List;
public class ImportInputInvoiceItemDto {
public List<InputVATInvoiceItemDto> InputInvoiceItemList;
public int ImportType ;
}
package pwc.taxtech.atms.dto.vatdto;
import java.util.List;
public class ImportOutputInvoiceDto {
public List<OutputVATInvoiceDto> OutputInvoiceList ;
public List<OutputVATInvoiceItemDto> OutputInvoiceItemList ;
public Integer ImportType ;
}
package pwc.taxtech.atms.dto.vatdto;
import java.util.List;
public class ImportVoucherDto {
public List<VoucherDtoOnlyForImport> VoucherList ;
public Integer ImportType ;
}
package pwc.taxtech.atms.dto.vatdto;
import java.math.BigDecimal;
import java.util.Date;
public class InputVATInvoiceItemDto {
public String ID ;
public String InputVATInvoiceID ;
public int PeriodID ;
public String InvoiceCode ;
public String InvoiceNumber ;
public BigDecimal Amount ;
public BigDecimal TaxAmount ;
public BigDecimal TaxRate ;
public String ProductionName ;
public String CreatorID ;
public Date CreateTime ;
}
package pwc.taxtech.atms.dto.vatdto;
import java.util.Date;
public class InvoiceMappingDto {
public String ID ;
public String TranCode ;
public String InvoiceCode ;
public String InvoiceNumber ;
public Integer Period ;
public String CreatorID ;
public Date CreateTime ;
public Boolean IsDuplicate ;
}
package pwc.taxtech.atms.dto.vatdto;
import java.math.BigDecimal;
import java.util.Date;
public class OutputVATInvoiceItemDto {
public String ItemID ;
public String InvoiceID ;
public String CodeVersion ;
public String ProductName ;
public String DocumentNum ;
public String ProductStandard ;
public String Unit ;
public Integer Quantity ;
public Double UnitPrice ;
public BigDecimal Amount ;
public BigDecimal TaxRate ;
public BigDecimal TaxAmount ;
public int SeqNo ;
public String TaxClassCode ;
public String CreatorID ;
public Date CreateTime ;
public int PeriodID ;
}
package pwc.taxtech.atms.dto.vatdto;
import java.math.BigDecimal;
import java.util.Date;
public class VoucherDtoOnlyForImport {
public String VoucherID;
public String VID;
public Date date;
public String Group;
public Integer Period;
public String CustomerCode;
public String CustomerName;
public String Summary;
public String AcctCode;
public BigDecimal Debit;
public BigDecimal Credit;
public Long Attach;
public String ItemID;
public Date CreateTime;
public Integer ImportType;
public String CreatorID;
public Integer MonthID;
public Integer OriginalPeriod;
public Integer Status;
public Integer PartBilledPeriod;
public Integer BilledPeriod;
}
package pwc.taxtech.atms.dto.vatdto;
import java.util.Date;
public class VoucherMappingDto {
public String ID;
public String TranCode;
public String VID;
public Integer Period;
public String Group;
public String ItemID;
public String CreatorID;
public Date CreateTime;
public Boolean IsDuplicate;
}
......@@ -98,4 +98,8 @@ public class CustomsInvoiceServiceImpl extends VatAbstractService {
return resultOpt;
}
public OperationResultDto ImportCustomsInvoice(List<CustomsInvoiceDto> customsList, int importType, String userId) {
return null;
}
}
......@@ -10,6 +10,7 @@ import org.springframework.stereotype.Service;
import org.springframework.web.multipart.MultipartFile;
import org.springframework.web.multipart.MultipartHttpServletRequest;
import pwc.taxtech.atms.constant.enums.EnumModule;
import pwc.taxtech.atms.controller.OutputInvoiceController;
import java.io.File;
import java.io.FileNotFoundException;
......@@ -50,6 +51,10 @@ public class FileUploadAdapter {
return null;
}
public String uploadEvidence(OutputInvoiceController outputInvoiceController, EnumModule evidence, String s) {
return null;
}
static class FileParamBean {
String fileName;
......
......@@ -3,9 +3,11 @@ 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.vat.entity.InputVATInvoice;
import pwc.taxtech.atms.vat.entity.InputVATInvoiceExample;
import pwc.taxtech.atms.vat.entity.InputVATInvoiceItem;
......@@ -72,4 +74,12 @@ public class InputInvoiceDataImportServiceImpl extends VatAbstractService {
example.createCriteria().andPeriodIDEqualTo(period.intValue());
return inputVATInvoiceItemMapper.selectByExample(example);
}
public OperationResultDto ImportInputInvoiceItemData(List<InputVATInvoiceItemDto> inputInvoiceItemList, int importType, String id) {
return null;
}
public OperationResultDto ImportInputInvoiceData(List<InputVATInvoiceDto> inputInvoiceList, int importType, String id) {
return null;
}
}
......@@ -4,9 +4,11 @@ import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import pwc.taxtech.atms.constant.enums.VatImportType;
import pwc.taxtech.atms.dto.FieldsMapper;
import pwc.taxtech.atms.dto.OperationResultDto;
import pwc.taxtech.atms.dto.PagingResultDto;
import pwc.taxtech.atms.dto.vatdto.QueryJeDto;
import pwc.taxtech.atms.dto.vatdto.VoucherDto;
import pwc.taxtech.atms.dto.vatdto.VoucherDtoOnlyForImport;
import pwc.taxtech.atms.vat.dao.JournalEntryImportMapper;
import pwc.taxtech.atms.vat.dao.ValidationInfoMapper;
import pwc.taxtech.atms.vat.entity.ValidationInfo;
......@@ -90,4 +92,21 @@ public class JournalEntryImportServiceImpl {
return validationInfoMapper.selectByExample(validationInfoExample);
}
public void ImportJournalEntryData(List<VoucherDtoOnlyForImport> voucherList, Integer importType, String id) {
}
public OperationResultDto<List<OperationResultDto<List<VoucherDtoOnlyForImport>>>> ImportAuditAdjust(List<VoucherDtoOnlyForImport> voucherList,
int period, Integer importType, String id) {
return null;
}
public List<VoucherDto> GetAuditAdjust(int period) {
return null;
}
public PagingResultDto<VoucherDto> QueryAuditAdjust(QueryJeDto queryDto) {
return null;
}
}
......@@ -8,6 +8,7 @@ import pwc.taxtech.atms.common.CommonUtils;
import pwc.taxtech.atms.common.PagingList;
import pwc.taxtech.atms.dto.OperationResultDto;
import pwc.taxtech.atms.dto.PagingResultDto;
import pwc.taxtech.atms.dto.vatdto.ImportOutputInvoiceDto;
import pwc.taxtech.atms.dto.vatdto.OutputVATInvoiceInfoDto;
import pwc.taxtech.atms.dto.vatdto.QueryEvidenceDto;
import pwc.taxtech.atms.dto.vatdto.QueryOutputDto;
......@@ -196,4 +197,16 @@ public class OutputInvoiceServiceImpl extends VatAbstractService {
}
return stream.sorted(Comparator.comparing(OutputVATInvoiceInfoDto::getInvoiceDate)).collect(Collectors.toList());
}
public OperationResultDto ImportOutputInvoiceData(ImportOutputInvoiceDto importDto, String id) {
return null;
}
public Boolean addImportFile(ImportFile fileDto) {
return null;
}
public OperationResultDto<List<OutputVATInvoiceInfoDto>> GetOutputInvoiceList(int period) {
return null;
}
}
......@@ -3,6 +3,9 @@ package pwc.taxtech.atms.vat.service.impl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import pwc.taxtech.atms.dao.AreaRegionMapper;
import pwc.taxtech.atms.dto.OperationResultDto;
import pwc.taxtech.atms.dto.vatdto.InvoiceMappingDto;
import pwc.taxtech.atms.dto.vatdto.VoucherMappingDto;
import pwc.taxtech.atms.vat.dao.InvoiceMappingMapper;
import pwc.taxtech.atms.vat.dao.VoucherMappingMapper;
import pwc.taxtech.atms.vat.entity.InvoiceMapping;
......@@ -39,4 +42,14 @@ public class VoucherInvoiceMappingServiceImpl {
return result;
}
public OperationResultDto<List<OperationResultDto<List<VoucherMappingDto>>>> saveVourcherMappings(List<VoucherMappingDto> list,
int period, boolean isAddition) {
return null;
}
public OperationResultDto<List<OperationResultDto<List<InvoiceMappingDto>>>> SaveInvoiceMappings(List<InvoiceMappingDto> list,
int period, boolean isAddition) {
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