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

Merge branch 'dev_neo2' into 'dev'

Dev neo2

See merge request root/atms!29
parents 7baee921 5b63aecb
/
jdbc.driverClass=com.mysql.jdbc.Driver
jdbc.connectionURL=jdbc:mysql://10.157.107.89:3306/a1100000?useUnicode=true&characterEncoding=utf-8&zeroDateTimeBehavior=convertToNull&allowMultiQueries=true
jdbc.userId=root
......
......@@ -8,7 +8,7 @@
<!-- <classPathEntry location="../hsqldb/hsqldb-2.3.5.jar" /> -->
<context id="contextId" targetRuntime="MyBatis3">
<!-- 考虑需要兼容DB2与ORCAL数据库, 大部份字段不需要加双引号,autoDelimitKeywords设置为false -->
<property name="autoDelimitKeywords" value="false" />
<property name="autoDelimitKeywords" value="true" />
<property name="javaFileEncoding" value="UTF-8" />
<plugin type="org.mybatis.generator.plugins.MapperAnnotationPlugin" />
<plugin type="org.mybatis.generator.plugins.RowBoundsPlugin" />
......
......@@ -23,14 +23,22 @@ public final class Constant {
public static final UUID USER_ID_FOR_UPLOAD = UUID.fromString("64D39CF7-467E-4414-B334-AA4B55A4E2B3");
public static final String UPLOAD_FOLDER_NAME="Upload";
public static final String CURRENT_USER_HOME="~";
public static final String CURRENT_USER_UPLOAD_FOLDER=CURRENT_USER_HOME+File.separator+UPLOAD_FOLDER_NAME;
public static final String UPLOAD_FOLDER_NAME = "Upload";
public static final String CURRENT_USER_HOME = "~";
public static final String CURRENT_USER_UPLOAD_FOLDER = CURRENT_USER_HOME + File.separator + UPLOAD_FOLDER_NAME;
public static final String CURRENT_IMAGE_PATH=CURRENT_USER_HOME+File.separator+"Resource"+File.separator+"Images";
public static final String IMAGE_PATH_INFORMATION=CURRENT_IMAGE_PATH+File.separator+"information.png";
public static final String IMAGE_PATH_ERROR=CURRENT_IMAGE_PATH+File.separator+"error.png";
public static final String IMAGE_PATH_SUCCESS=CURRENT_IMAGE_PATH+File.separator+"success.png";
public static final String IMAGE_PATH_WARN=CURRENT_IMAGE_PATH+File.separator+"warning1.png";
public static final boolean DEFAULT_RESULT=true;
public static final int FIRST_OR_DEFAULT=0;
public static final boolean DEFAULT_RESULT = true;
public static final int HEADER_ROW_INDEX=0;
public static final boolean DEFAULT_HAS_HEADER=true;
public static final int FIRST_OR_DEFAULT = 0;
public static final int HEADER_ROW_INDEX = 0;
public static final boolean DEFAULT_HAS_HEADER = true;
public static final String IMAGE_FORMART_ = "png";
}
\ No newline at end of file
......@@ -6,4 +6,55 @@ public class VatErpImportValidation {
public static final String BalanceTb = "Balance";
public static final String AccountRemapTb = "AccountRemap";
public static final String VoucherTbName = "Voucher";
public static final String Const_ComBalanceAcctValidate = "试算平衡表科目存在于企业科目列表中";
public static final String Const_ComBalanceAcctUnValidate = "试算平衡表中出现的科目不在科目表中";
public static final String Const_ComBalanceAcctUnValidate_Tips = "请在企业科目中补全该科目信息。";
public static final String Const_VoucherAcctValidate = "凭证表中科目存在于企业科目列表中";
public static final String Const_VoucherAcctUnValidate = "凭证表中出现的科目不在科目表中";
public static final String Const_VoucherAcctUnValidate_Tips = "请在企业科目中补全该科目信息。";
public static final String Const_VSingleDebitCreditValidate = "凭证表中凭证借贷平衡";
public static final String Const_VSingleDebitCreditUnValidate = "凭证表中凭证借贷不平衡";
public static final String Const_VSingleDebitCreditUnValidate_Tips = "凭证借贷不平衡会导致系统计算所得的试算平衡表也借贷不平衡。";
public static final String Const_VEmptyCheckValidateItemID = "凭证表中凭证分录号完整";
public static final String Const_VEmptyCheckUnValidateItemID = "凭证表中凭证分录号为空";
public static final String Const_VEmptyCheckUnValidateItemID_Tips = "凭证分录号为空 ,系统无法正确判断凭证是否重复。";
public static final String Const_VEmptyCheckValidateGroup = "凭证表中凭证类型完整";
public static final String Const_VEmptyCheckUnValidateGroup = "凭证表中凭证类型为空";
public static final String Const_VEmptyCheckUnValidateGroup_Tips = "凭证类型为空,系统无法正确判断此分录属于哪张凭证,所有类型为空的会作为同一张凭证对待。";
public static final String Const_VEmptyCheckValidateAcctCode = "凭证表中科目代码完整";
public static final String Const_VEmptyCheckUnValidateAcctCode = "凭证表中科目代码为空";
public static final String Const_VEmptyCheckUnValidateAcctCode_Tips = "凭证科目代码为空,系统会在后续的所有计算中忽略此分录。";
public static final String Const_VEmptyCheckValidateSummary = "凭证表中凭证摘要完整";
public static final String Const_VEmptyCheckUnValidateSummary = "凭证表中凭证摘要为空";
public static final String Const_VEmptyCheckUnValidateSummary_Tips = "凭证摘要为空,不符合财务准则,查看明细时,不易识别分录目的。";
public static final String Const_AcctBegBalAcctLevelValidate = "试算平衡表中期初余额上下级平衡";
public static final String Const_AcctBegBalAcctLevelUnValidate = "试算平衡表中期初余额上下级不平衡";
public static final String Const_AcctBegBalAcctLevelUnValidate_Tips = "期初余额不正确会导致后续报表或分析的不准确。";
public static final String Const_BegBalValidate = "试算平衡表中期初余额借贷平衡";
public static final String Const_BegBalUnValidate = "试算平衡表中期初余额借贷不平衡";
public static final String Const_BegBalUnValidate_Tips = "期初余额不正确会导致后续报表或分析的不准确。";
public static final String Const_CompCustEndBalValidate = "系统计算所得的试算平衡表期末余额与导入的一致";
public static final String Const_CompCustEndBalUnValidate = "系统计算所得的试算平衡表期末余额与导入的不一致";
public static final String Const_CompCustAmountValidate = "系统计算所得的试算平衡表期间发生额与导入的一致";
public static final String Const_CompCustAmountUnValidate = "系统计算所得的试算平衡表期间发生额与导入的不一致";
public static final String Const_CompCustBegBalValidate = "系统计算所得的试算平衡表期初余额与导入的一致";
public static final String Const_CompCustBegBalUnValidate = "系统计算所得的试算平衡表期初余额与导入的不一致";
public static final String Const_BegEndBalValidate = "系统计算所得的上月期末与导入的本月期初一致";
public static final String Const_BegEndBalUnValidate = "系统计算所得的上月期末与导入的本月期初不一致";
public static final String Const_JournalEntryDebitCreditUnValidate = "凭证借贷不平衡";
public static final String Const_JournalEntrySummaryEmptyUnValidate = "凭证摘要为空";
public static final String Const_AccountMapping_NotMapStd = "没有对应标准科目";
public static final String Const_AccountMapping_NotMapStd_Tips = "没有对应标准科目会导致后续报表不准确";
}
package pwc.taxtech.atms.constant.enums;
public enum ErpCheckType {
Success (0),
ComBalanceAcctUnValidate (1), //Const_ComBalanceAcctUnValidate (")试算平衡表中出现的科目不在科目表中";
VoucherAcctValidate (2), // Const_VoucherAcctUnValidate (")凭证表中出现的科目不在科目表中";
VSingleDebitCreditUnValidate (3),//Const_VSingleDebitCreditUnValidate (")凭证表中凭证借贷不平衡";
VEmptyCheckUnValidateItemID (4),//Const_VEmptyCheckUnValidateItemID (")凭证表中凭证分录号为空";
VEmptyCheckUnValidateGroup (5),//Const_VEmptyCheckUnValidateGroup (")凭证表中凭证类型为空";
VEmptyCheckUnValidateAcctCode (6),//Const_VEmptyCheckUnValidateAcctCode (")凭证表中科目代码为空";
VEmptyCheckUnValidateSummary (7),//Const_VEmptyCheckUnValidateSummary (")凭证表中凭证摘要为空";
AcctBegBalAcctLevelUnValidate (8),// Const_AcctBegBalAcctLevelUnValidate (")试算平衡表中期初余额上下级不平衡";
BegBalUnValidate (9), //Const_BegBalUnValidate (")试算平衡表中期初余额借贷不平衡";
CompCustEndBalUnValidate (10),//Const_CompCustEndBalUnValidate (")系统计算所得的试算平衡表期末余额与导入的不一致";
CompCustAmountUnValidate (11),//Const_CompCustAmountUnValidate (")系统计算所得的试算平衡表期间发生与导入的不一致";
CompCustBegBalUnValidate (12),//Const_CompCustBegBalUnValidate (")系统计算所得的试算平衡表期初余额与导入的不一致";
BegEndBalUnValidate (13),//Const_BegEndBalUnValidate (")系统计算所得的上月期末与导入的本月期初不一致";
DuplicatedVoucher (14),//Voucher重复数据检查
DuplicatedTb (15),
CustomInvoice_DuplicatePayNum (20), //海关清单:海关缴款书号码重复
Tb_NoAcctCode (30),//Tb验证 科目不在科目表中
Tb_PeriodBalance (31),//本月期初(月期末 )
Tb_BegBalDebitAndCreditBanlace (32),//期初余额借贷平衡
Tb_BegBalUpAndDownBanlace (33),//期初余额上下级平衡
Tb_CurentDebitAndCreditBanlace (34),//发生额借贷平衡
Tb_CurrentUpAndDownBanlace (35),//发生额上下级平衡
Tb_EndBalDebitAndCreditBanlace (36),//期末借贷平衡
Tb_EndBalUpAndDownBanlace (37),//期末上下级平衡
Tb_CurrentBalance (38),//期末(初)+(借-贷)*方向
Tb_DuplicatedData (39),//重复数据
Mapping_DuplicatedData (45),//重复数据
JE_AcctInvalid (50),//凭证表中的科目不在科目表中
JE_DebitAndCreditBanlace (51),//凭证借贷平衡
JE_DuplicatedData (52),//重复数据
JE_SummaryEmpty (53),//摘要为空
JE_GroupEmpty (53), //凭证类型为空
JE_ItemIdEmpty (54),//分录号为空
Invoice_DuplicatedData (60),//进项发票汇总重复
Invoice_ErrorData (61),//进项发票信息错误
Invoice_CertificationResultError (62),//进项发票认证结果错误
InvoiceItem_NotHaveTotalInvoice (65),//进项明细与进项汇总表无关联
InvoiceItem_AmountCompare (66),//进项汇总表与明细表金额,税额比对
InvoiceItem_TaxRateCompare (67),//金额与税率的乘积与导入的税额比较
Output_DuplicatedData (80),//销项发票重复
OutputItem_TaxRateCompare (81),//金额与税率的乘积与导入的税额比较
AccountMapping_NotMapStd (90), //Const_AccountMapping_NotMapStd 没有对应标准科目
Shimao_Tb (100),//世贸数据正确性验证
Shimao_OutputInvoice (101),//世贸销项正确性验证
Shimao_JournalEntry (102),//序时帐正确性验证
Shimao_InputInvoice (103);//世贸进项正确性验证
private Integer code;
ErpCheckType(Integer code) {
this.code=code;
}
public Integer getCode() {
return code;
}
}
package pwc.taxtech.atms.constant.enums;
public enum ImageType {
Success (1), //成功
Alert (2), //提示
Warning (3),//警告
Error (4); //错误
private Integer code;
ImageType(Integer code) {
this.code = code;
}
public Integer getCode() {
return code;
}
public static ImageType fromCode(Integer code){
for(ImageType type:ImageType.values()){
if(type.getCode().intValue()==code.intValue())return type;
}
throw new RuntimeException("not support image type code");
}
}
package pwc.taxtech.atms.controller;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
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;
@RestController
@RequestMapping("/api/v1/financeImportData")
public class FinanceDataImportController {
@Autowired
private FinanceDataImportService financeDataImport;
@Autowired
private IdentityService identityService;
@ApiOperation(value = "")
@RequestMapping(value = "checkData/basicCheck", method = RequestMethod.GET)
public ResponseEntity getBasicValidationResults() {
return ResponseEntity.ok().body(financeDataImport.getBasicValidationResults(identityService.getIdentityUser().getID()));
}
}
......@@ -3,12 +3,14 @@ package pwc.taxtech.atms.controller;
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.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.PagingResultDto;
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.thirdparty.ExcelUtil;
import pwc.taxtech.atms.vat.service.OutputInvoiceService;
......@@ -38,17 +40,15 @@ public class OutputInvoiceController {
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");
response.setHeader("x-file-name", UUID.randomUUID() + ".xlsx");
OutputStream os = null;
try {
os = response.getOutputStream();
int count = getDownloadFilePath(paras, os);
if(count==0){
if (count == 0) {
response.setStatus(HttpStatus.SC_NO_CONTENT);
}
else
{
} else {
response.setStatus(HttpStatus.SC_OK);
}
} catch (IOException e) {
......@@ -56,6 +56,11 @@ public class OutputInvoiceController {
}
}
@RequestMapping(value = "getEvidenceList", method = RequestMethod.POST, produces = MediaType.APPLICATION_JSON_UTF8_VALUE)
public ResponseEntity getEvidenceList(@RequestBody QueryEvidenceDto queryDto) {
return ResponseEntity.ok().body(outputInvoiceService.getEvidenceList(queryDto));
}
private int getDownloadFilePath(QueryOutputDto paras, OutputStream outputStream) {
List<OutputVATInvoiceInfoDto> list = outputInvoiceService.getExportOutputInvoiceList(paras).getData();
if (list.size() == 0) {
......
......@@ -53,6 +53,6 @@ public class ProjectInfoController {
@RequestMapping(value = "getImportType/{projectID}/{periodID}/{serviceType}", method = RequestMethod.GET)
public ResponseEntity getImportType(@PathVariable String projectID, @PathVariable Integer periodID,
@PathVariable Integer serviceType) {
return ResponseEntity.ok().body(projectInfoService.getImportType(projectID,periodID,serviceType));
return ResponseEntity.ok().body(projectInfoService.getImportType(projectID,periodID,identityService.getIdentityUser().getID(),serviceType));
}
}
\ No newline at end of file
package pwc.taxtech.atms.dto.vatdto;
public class DataCheckDto {
private String imagePic ;
private Integer imageTypeId ;
private Integer num ;
private String dataCheckType ;
private Integer errorCount ;
private Integer period ;
private String tips ;
private Integer erpCheckTypeId ;
private String validationDetails ;
public String getImagePic() {
return imagePic;
}
public void setImagePic(String imagePic) {
this.imagePic = imagePic;
}
public Integer getImageTypeId() {
return imageTypeId;
}
public void setImageTypeId(Integer imageTypeId) {
this.imageTypeId = imageTypeId;
}
public Integer getNum() {
return num;
}
public void setNum(Integer num) {
this.num = num;
}
public String getDataCheckType() {
return dataCheckType;
}
public void setDataCheckType(String dataCheckType) {
this.dataCheckType = dataCheckType;
}
public Integer getErrorCount() {
return errorCount;
}
public void setErrorCount(Integer errorCount) {
this.errorCount = errorCount;
}
public Integer getPeriod() {
return period;
}
public void setPeriod(Integer period) {
this.period = period;
}
public String getTips() {
return tips;
}
public void setTips(String tips) {
this.tips = tips;
}
public Integer getErpCheckTypeId() {
return erpCheckTypeId;
}
public void setErpCheckTypeId(Integer erpCheckTypeId) {
this.erpCheckTypeId = erpCheckTypeId;
}
public String getValidationDetails() {
return validationDetails;
}
public void setValidationDetails(String validationDetails) {
this.validationDetails = validationDetails;
}
}
package pwc.taxtech.atms.dto.vatdto;
public class QueryEvidenceDto {
private Integer queryType;
private String queryString;
private Boolean isCurrentPeriod;
private Integer periodId;
public Integer getQueryType() {
return queryType;
}
public void setQueryType(Integer queryType) {
this.queryType = queryType;
}
public String getQueryString() {
return queryString;
}
public void setQueryString(String queryString) {
this.queryString = queryString;
}
public Boolean getCurrentPeriod() {
return isCurrentPeriod;
}
public void setCurrentPeriod(Boolean currentPeriod) {
isCurrentPeriod = currentPeriod;
}
public Integer getPeriodId() {
return periodId;
}
public void setPeriodId(Integer periodId) {
this.periodId = periodId;
}
}
package pwc.taxtech.atms.dto.vatdto;
public class VoucherAccountMto {
private String accountCode;
private String accountName;
private Integer count;
public String getAccountCode() {
return accountCode;
}
public void setAccountCode(String accountCode) {
this.accountCode = accountCode;
}
public String getAccountName() {
return accountName;
}
public void setAccountName(String accountName) {
this.accountName = accountName;
}
public Integer getCount() {
return count;
}
public void setCount(Integer count) {
this.count = count;
}
}
package pwc.taxtech.atms.dto.vatdto;
import java.util.List;
public class VoucherBalanceDto {
private String acctCode;
private Float credit;
private Integer date;
private Float debit;
private String group;
private String groupNum;
private String itemID;
private Integer period;
private String summary;
private String vID;
private String customerCode;
private List<VoucherBalanceDto> children;
public String getAcctCode() {
return acctCode;
}
public void setAcctCode(String acctCode) {
this.acctCode = acctCode;
}
public Float getCredit() {
return credit;
}
public void setCredit(Float credit) {
this.credit = credit;
}
public Integer getDate() {
return date;
}
public void setDate(Integer date) {
this.date = date;
}
public Float getDebit() {
return debit;
}
public void setDebit(Float debit) {
this.debit = debit;
}
public String getGroup() {
return group;
}
public void setGroup(String group) {
this.group = group;
}
public String getGroupNum() {
return groupNum;
}
public void setGroupNum(String groupNum) {
this.groupNum = groupNum;
}
public String getItemID() {
return itemID;
}
public void setItemID(String itemID) {
this.itemID = itemID;
}
public Integer getPeriod() {
return period;
}
public void setPeriod(Integer period) {
this.period = period;
}
public String getSummary() {
return summary;
}
public void setSummary(String summary) {
this.summary = summary;
}
public String getvID() {
return vID;
}
public void setvID(String vID) {
this.vID = vID;
}
public String getCustomerCode() {
return customerCode;
}
public void setCustomerCode(String customerCode) {
this.customerCode = customerCode;
}
public List<VoucherBalanceDto> getChildren() {
return children;
}
public void setChildren(List<VoucherBalanceDto> children) {
this.children = children;
}
}
......@@ -12,5 +12,5 @@ public interface ProjectInfoService {
OperationResultDto<List<PeriodInfoDto>> getProjectImportType(String projectId, List<Integer> periods, Integer serviceTypeId, String id);
Integer getImportType(String projectID, Integer periodID, Integer serviceType);
Integer getImportType(String projectID, Integer periodID, String id, Integer serviceType);
}
......@@ -14,6 +14,7 @@ import pwc.taxtech.atms.service.ProjectInfoService;
import java.util.Date;
import java.util.List;
import java.util.UUID;
import static pwc.taxtech.atms.constant.Constant.FIRST_OR_DEFAULT;
......@@ -56,16 +57,18 @@ public class ProjectInfoServiceImpl implements ProjectInfoService {
}
@Override
public Integer getImportType(String projectID, Integer periodID, Integer serviceType) {
public Integer getImportType(String projectID, Integer periodID, String userID, Integer serviceType) {
PeriodInfoExample example = new PeriodInfoExample();
example.createCriteria().andProjectIDEqualTo(projectID).andProjectIDEqualTo(projectID).andServiceTypeEqualTo(serviceType);
List<PeriodInfo> periodInfoList =periodInfoMapper.selectByExample(example);
if(periodInfoList==null || periodInfoList.size()==0){
PeriodInfo periodInfo = new PeriodInfo();
periodInfo.setID(UUID.randomUUID().toString());
periodInfo.setProjectID(projectID);
periodInfo.setPeriod(periodID);
periodInfo.setStatus(0);
periodInfo.setCreatorID(userID);
periodInfo.setImportType(TbImportType.UnImported.getCode());
periodInfo.setServiceType(serviceType);
periodInfo.setCreateTime(new Date());
......
......@@ -3,8 +3,11 @@ package pwc.taxtech.atms.vat.dao;
import java.util.List;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.session.RowBounds;
import pwc.taxtech.atms.MyVatMapper;
import pwc.taxtech.atms.dto.vatdto.VoucherAccountMto;
import pwc.taxtech.atms.dto.vatdto.VoucherBalanceDto;
import pwc.taxtech.atms.vat.entity.ValidationInfo;
import pwc.taxtech.atms.vat.entity.ValidationInfoExample;
......@@ -105,4 +108,58 @@ public interface ValidationInfoMapper extends MyVatMapper {
* @mbg.generated
*/
int updateByPrimaryKey(ValidationInfo record);
@Select("SELECT " +
" c.AcctCode as AccountCode, COUNT(1) as Count " +
"FROM " +
" CompanyBalance c " +
" LEFT JOIN " +
" EnterpriseAccount a ON c.AcctCode = a.AcctCode " +
"WHERE " +
" a.IsDummy != 1 " +
" AND (c.AcctCode != '' AND c.AcctCode != NULL) " +
"GROUP BY c.AcctCode")
List<VoucherAccountMto> getCompanyBalanceAcctChecks();
@Select("SELECT " +
" c.AcctCode as AccountCode, COUNT(1) as Count " +
"FROM " +
" Voucher c " +
" LEFT JOIN " +
" EnterpriseAccount a ON c.AcctCode = a.AcctCode " +
"WHERE " +
" a.IsDummy != 1 " +
" AND (c.AcctCode != '' AND c.AcctCode != NULL) " +
"GROUP BY c.AcctCode")
List<VoucherAccountMto> getVoucherAccountChecks();
@Select("SELECT " +
" vv.VID, " +
" vv.Group, " +
" vv.Period, " +
" vv.CustomerCode, " +
" vv.Summary, " +
" vv.AcctCode, " +
" vv.Debit, " +
" vv.Credit, " +
" vv.ItemID " +
"FROM " +
" Voucher vv " +
" JOIN " +
" (SELECT " +
" v.VID, " +
" v.Period, " +
" v.Group, " +
" MAX(v.Date) AS `Date`, " +
" SUM(v.Debit) AS Debit, " +
" SUM(v.Credit) AS Credit " +
" FROM " +
" Voucher v " +
" GROUP BY v.VID , v.Period , v.Group " +
" HAVING Debit != Credit) q ON vv.VID = q.VID AND vv.Period = q.Period " +
" AND vv.Group = q.Group " +
"")
List<VoucherBalanceDto>getSingleVoucherCheck();
}
\ No newline at end of file
......@@ -364,132 +364,132 @@ public class VoucherExample {
}
public Criteria andDateIsNull() {
addCriterion("Date is null");
addCriterion("\"Date\" is null");
return (Criteria) this;
}
public Criteria andDateIsNotNull() {
addCriterion("Date is not null");
addCriterion("\"Date\" is not null");
return (Criteria) this;
}
public Criteria andDateEqualTo(Date value) {
addCriterionForJDBCDate("Date =", value, "date");
addCriterionForJDBCDate("\"Date\" =", value, "date");
return (Criteria) this;
}
public Criteria andDateNotEqualTo(Date value) {
addCriterionForJDBCDate("Date <>", value, "date");
addCriterionForJDBCDate("\"Date\" <>", value, "date");
return (Criteria) this;
}
public Criteria andDateGreaterThan(Date value) {
addCriterionForJDBCDate("Date >", value, "date");
addCriterionForJDBCDate("\"Date\" >", value, "date");
return (Criteria) this;
}
public Criteria andDateGreaterThanOrEqualTo(Date value) {
addCriterionForJDBCDate("Date >=", value, "date");
addCriterionForJDBCDate("\"Date\" >=", value, "date");
return (Criteria) this;
}
public Criteria andDateLessThan(Date value) {
addCriterionForJDBCDate("Date <", value, "date");
addCriterionForJDBCDate("\"Date\" <", value, "date");
return (Criteria) this;
}
public Criteria andDateLessThanOrEqualTo(Date value) {
addCriterionForJDBCDate("Date <=", value, "date");
addCriterionForJDBCDate("\"Date\" <=", value, "date");
return (Criteria) this;
}
public Criteria andDateIn(List<Date> values) {
addCriterionForJDBCDate("Date in", values, "date");
addCriterionForJDBCDate("\"Date\" in", values, "date");
return (Criteria) this;
}
public Criteria andDateNotIn(List<Date> values) {
addCriterionForJDBCDate("Date not in", values, "date");
addCriterionForJDBCDate("\"Date\" not in", values, "date");
return (Criteria) this;
}
public Criteria andDateBetween(Date value1, Date value2) {
addCriterionForJDBCDate("Date between", value1, value2, "date");
addCriterionForJDBCDate("\"Date\" between", value1, value2, "date");
return (Criteria) this;
}
public Criteria andDateNotBetween(Date value1, Date value2) {
addCriterionForJDBCDate("Date not between", value1, value2, "date");
addCriterionForJDBCDate("\"Date\" not between", value1, value2, "date");
return (Criteria) this;
}
public Criteria andGroupIsNull() {
addCriterion("Group is null");
addCriterion("\"Group\" is null");
return (Criteria) this;
}
public Criteria andGroupIsNotNull() {
addCriterion("Group is not null");
addCriterion("\"Group\" is not null");
return (Criteria) this;
}
public Criteria andGroupEqualTo(String value) {
addCriterion("Group =", value, "group");
addCriterion("\"Group\" =", value, "group");
return (Criteria) this;
}
public Criteria andGroupNotEqualTo(String value) {
addCriterion("Group <>", value, "group");
addCriterion("\"Group\" <>", value, "group");
return (Criteria) this;
}
public Criteria andGroupGreaterThan(String value) {
addCriterion("Group >", value, "group");
addCriterion("\"Group\" >", value, "group");
return (Criteria) this;
}
public Criteria andGroupGreaterThanOrEqualTo(String value) {
addCriterion("Group >=", value, "group");
addCriterion("\"Group\" >=", value, "group");
return (Criteria) this;
}
public Criteria andGroupLessThan(String value) {
addCriterion("Group <", value, "group");
addCriterion("\"Group\" <", value, "group");
return (Criteria) this;
}
public Criteria andGroupLessThanOrEqualTo(String value) {
addCriterion("Group <=", value, "group");
addCriterion("\"Group\" <=", value, "group");
return (Criteria) this;
}
public Criteria andGroupLike(String value) {
addCriterion("Group like", value, "group");
addCriterion("\"Group\" like", value, "group");
return (Criteria) this;
}
public Criteria andGroupNotLike(String value) {
addCriterion("Group not like", value, "group");
addCriterion("\"Group\" not like", value, "group");
return (Criteria) this;
}
public Criteria andGroupIn(List<String> values) {
addCriterion("Group in", values, "group");
addCriterion("\"Group\" in", values, "group");
return (Criteria) this;
}
public Criteria andGroupNotIn(List<String> values) {
addCriterion("Group not in", values, "group");
addCriterion("\"Group\" not in", values, "group");
return (Criteria) this;
}
public Criteria andGroupBetween(String value1, String value2) {
addCriterion("Group between", value1, value2, "group");
addCriterion("\"Group\" between", value1, value2, "group");
return (Criteria) this;
}
public Criteria andGroupNotBetween(String value1, String value2) {
addCriterion("Group not between", value1, value2, "group");
addCriterion("\"Group\" not between", value1, value2, "group");
return (Criteria) this;
}
......@@ -1394,62 +1394,62 @@ public class VoucherExample {
}
public Criteria andStatusIsNull() {
addCriterion("Status is null");
addCriterion("\"Status\" is null");
return (Criteria) this;
}
public Criteria andStatusIsNotNull() {
addCriterion("Status is not null");
addCriterion("\"Status\" is not null");
return (Criteria) this;
}
public Criteria andStatusEqualTo(Integer value) {
addCriterion("Status =", value, "status");
addCriterion("\"Status\" =", value, "status");
return (Criteria) this;
}
public Criteria andStatusNotEqualTo(Integer value) {
addCriterion("Status <>", value, "status");
addCriterion("\"Status\" <>", value, "status");
return (Criteria) this;
}
public Criteria andStatusGreaterThan(Integer value) {
addCriterion("Status >", value, "status");
addCriterion("\"Status\" >", value, "status");
return (Criteria) this;
}
public Criteria andStatusGreaterThanOrEqualTo(Integer value) {
addCriterion("Status >=", value, "status");
addCriterion("\"Status\" >=", value, "status");
return (Criteria) this;
}
public Criteria andStatusLessThan(Integer value) {
addCriterion("Status <", value, "status");
addCriterion("\"Status\" <", value, "status");
return (Criteria) this;
}
public Criteria andStatusLessThanOrEqualTo(Integer value) {
addCriterion("Status <=", value, "status");
addCriterion("\"Status\" <=", value, "status");
return (Criteria) this;
}
public Criteria andStatusIn(List<Integer> values) {
addCriterion("Status in", values, "status");
addCriterion("\"Status\" in", values, "status");
return (Criteria) this;
}
public Criteria andStatusNotIn(List<Integer> values) {
addCriterion("Status not in", values, "status");
addCriterion("\"Status\" not in", values, "status");
return (Criteria) this;
}
public Criteria andStatusBetween(Integer value1, Integer value2) {
addCriterion("Status between", value1, value2, "status");
addCriterion("\"Status\" between", value1, value2, "status");
return (Criteria) this;
}
public Criteria andStatusNotBetween(Integer value1, Integer value2) {
addCriterion("Status not between", value1, value2, "status");
addCriterion("\"Status\" not between", value1, value2, "status");
return (Criteria) this;
}
......
package pwc.taxtech.atms.vat.service;
import pwc.taxtech.atms.dto.OperationResultDto;
import pwc.taxtech.atms.dto.vatdto.DataCheckDto;
import java.util.List;
public interface FinanceDataImportService {
OperationResultDto<List<DataCheckDto>> getBasicValidationResults(String userId);
}
......@@ -3,7 +3,9 @@ package pwc.taxtech.atms.vat.service;
import pwc.taxtech.atms.dto.OperationResultDto;
import pwc.taxtech.atms.dto.PagingResultDto;
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.vat.entity.ImportFile;
import java.util.List;
......@@ -11,4 +13,6 @@ public interface OutputInvoiceService {
PagingResultDto<OutputVATInvoiceInfoDto> queryOutputInvoiceList(QueryOutputDto queryDto);
OperationResultDto<List<OutputVATInvoiceInfoDto>> getExportOutputInvoiceList(QueryOutputDto queryDto);
List<ImportFile> getEvidenceList(QueryEvidenceDto queryDto);
}
package pwc.taxtech.atms.vat.service.impl;
import org.apache.commons.lang3.StringUtils;
import org.reflections.util.Utils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
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.OutputVATInvoiceInfoDto;
import pwc.taxtech.atms.dto.vatdto.QueryEvidenceDto;
import pwc.taxtech.atms.dto.vatdto.QueryOutputDto;
import pwc.taxtech.atms.vat.dao.ImportFileMapper;
import pwc.taxtech.atms.vat.entity.ImportFile;
import pwc.taxtech.atms.vat.entity.ImportFileExample;
import pwc.taxtech.atms.vat.entity.OutputVATInvoiceItem;
import pwc.taxtech.atms.vat.entity.OutputVATInvoiceItemExample;
import pwc.taxtech.atms.vat.service.OutputInvoiceService;
......@@ -23,6 +29,9 @@ import java.util.stream.Stream;
@Service
public class OutputInvoiceServiceImpl extends VatAbstractService implements OutputInvoiceService {
@Autowired
private ImportFileMapper importFileMapper;
@Override
public PagingResultDto<OutputVATInvoiceInfoDto> queryOutputInvoiceList(QueryOutputDto queryDto) {
PagingResultDto<OutputVATInvoiceInfoDto> qResult = new PagingResultDto<>();
......@@ -48,6 +57,26 @@ public class OutputInvoiceServiceImpl extends VatAbstractService implements Outp
return result;
}
@Override
public List<ImportFile> getEvidenceList(QueryEvidenceDto queryDto) {
ImportFileExample example = new ImportFileExample();
if (queryDto.getCurrentPeriod()) {
if (Utils.isEmpty(queryDto.getQueryString())) {
example.createCriteria().andFileImportTypeEqualTo(2).andPeriodIDEqualTo(queryDto.getPeriodId().intValue());
} else {
example.createCriteria().andFileImportTypeEqualTo(2).andPeriodIDEqualTo(queryDto.getPeriodId().intValue()).andFileNameLike(queryDto.getQueryString());
}
} else {
if (Utils.isEmpty(queryDto.getQueryString())) {
example.createCriteria().andFileImportTypeEqualTo(2);
} else {
example.createCriteria().andFileImportTypeEqualTo(2).andFileNameLike(queryDto.getQueryString());
}
}
return importFileMapper.selectByExample(example);
}
private List<OutputVATInvoiceInfoDto> getOutputDetailInfoList(List<OutputVATInvoiceInfoDto> query) {
List<OutputVATInvoiceInfoDto> list = new ArrayList<>();
List<OutputVATInvoiceItem> outItem = outputVATInvoiceItemMapper.selectByExample(new OutputVATInvoiceItemExample());
......
......@@ -104,9 +104,9 @@
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
-->
VoucherID, VID, Date, Group, Period, CustomerCode, CustomerName, Summary, AcctCode,
VoucherID, VID, "Date", "Group", Period, CustomerCode, CustomerName, Summary, AcctCode,
Debit, Credit, Attach, ItemID, CreateTime, ImportType, CreatorID, MonthID, OriginalPeriod,
Status, PartBilledPeriod, BilledPeriod, StdCode, MappingReason, MappingUser, MappingTime,
"Status", PartBilledPeriod, BilledPeriod, StdCode, MappingReason, MappingUser, MappingTime,
RemapId
</sql>
<select id="selectByExample" parameterType="pwc.taxtech.atms.vat.entity.VoucherExample" resultMap="BaseResultMap">
......@@ -160,13 +160,13 @@
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
-->
insert into Voucher (VoucherID, VID, Date,
Group, Period, CustomerCode,
insert into Voucher (VoucherID, VID, "Date",
"Group", Period, CustomerCode,
CustomerName, Summary, AcctCode,
Debit, Credit, Attach,
ItemID, CreateTime, ImportType,
CreatorID, MonthID, OriginalPeriod,
Status, PartBilledPeriod, BilledPeriod,
"Status", PartBilledPeriod, BilledPeriod,
StdCode, MappingReason, MappingUser,
MappingTime, RemapId)
values (#{voucherID,jdbcType=VARCHAR}, #{VID,jdbcType=VARCHAR}, #{date,jdbcType=DATE},
......@@ -193,10 +193,10 @@
VID,
</if>
<if test="date != null">
Date,
"Date",
</if>
<if test="group != null">
Group,
"Group",
</if>
<if test="period != null">
Period,
......@@ -241,7 +241,7 @@
OriginalPeriod,
</if>
<if test="status != null">
Status,
"Status",
</if>
<if test="partBilledPeriod != null">
PartBilledPeriod,
......@@ -370,10 +370,10 @@
VID = #{record.VID,jdbcType=VARCHAR},
</if>
<if test="record.date != null">
Date = #{record.date,jdbcType=DATE},
"Date" = #{record.date,jdbcType=DATE},
</if>
<if test="record.group != null">
Group = #{record.group,jdbcType=VARCHAR},
"Group" = #{record.group,jdbcType=VARCHAR},
</if>
<if test="record.period != null">
Period = #{record.period,jdbcType=INTEGER},
......@@ -418,7 +418,7 @@
OriginalPeriod = #{record.originalPeriod,jdbcType=INTEGER},
</if>
<if test="record.status != null">
Status = #{record.status,jdbcType=INTEGER},
"Status" = #{record.status,jdbcType=INTEGER},
</if>
<if test="record.partBilledPeriod != null">
PartBilledPeriod = #{record.partBilledPeriod,jdbcType=INTEGER},
......@@ -454,8 +454,8 @@
update Voucher
set VoucherID = #{record.voucherID,jdbcType=VARCHAR},
VID = #{record.VID,jdbcType=VARCHAR},
Date = #{record.date,jdbcType=DATE},
Group = #{record.group,jdbcType=VARCHAR},
"Date" = #{record.date,jdbcType=DATE},
"Group" = #{record.group,jdbcType=VARCHAR},
Period = #{record.period,jdbcType=INTEGER},
CustomerCode = #{record.customerCode,jdbcType=VARCHAR},
CustomerName = #{record.customerName,jdbcType=VARCHAR},
......@@ -470,7 +470,7 @@
CreatorID = #{record.creatorID,jdbcType=VARCHAR},
MonthID = #{record.monthID,jdbcType=INTEGER},
OriginalPeriod = #{record.originalPeriod,jdbcType=INTEGER},
Status = #{record.status,jdbcType=INTEGER},
"Status" = #{record.status,jdbcType=INTEGER},
PartBilledPeriod = #{record.partBilledPeriod,jdbcType=INTEGER},
BilledPeriod = #{record.billedPeriod,jdbcType=INTEGER},
StdCode = #{record.stdCode,jdbcType=VARCHAR},
......@@ -493,10 +493,10 @@
VID = #{VID,jdbcType=VARCHAR},
</if>
<if test="date != null">
Date = #{date,jdbcType=DATE},
"Date" = #{date,jdbcType=DATE},
</if>
<if test="group != null">
Group = #{group,jdbcType=VARCHAR},
"Group" = #{group,jdbcType=VARCHAR},
</if>
<if test="period != null">
Period = #{period,jdbcType=INTEGER},
......@@ -541,7 +541,7 @@
OriginalPeriod = #{originalPeriod,jdbcType=INTEGER},
</if>
<if test="status != null">
Status = #{status,jdbcType=INTEGER},
"Status" = #{status,jdbcType=INTEGER},
</if>
<if test="partBilledPeriod != null">
PartBilledPeriod = #{partBilledPeriod,jdbcType=INTEGER},
......@@ -574,8 +574,8 @@
-->
update Voucher
set VID = #{VID,jdbcType=VARCHAR},
Date = #{date,jdbcType=DATE},
Group = #{group,jdbcType=VARCHAR},
"Date" = #{date,jdbcType=DATE},
"Group" = #{group,jdbcType=VARCHAR},
Period = #{period,jdbcType=INTEGER},
CustomerCode = #{customerCode,jdbcType=VARCHAR},
CustomerName = #{customerName,jdbcType=VARCHAR},
......@@ -590,7 +590,7 @@
CreatorID = #{creatorID,jdbcType=VARCHAR},
MonthID = #{monthID,jdbcType=INTEGER},
OriginalPeriod = #{originalPeriod,jdbcType=INTEGER},
Status = #{status,jdbcType=INTEGER},
"Status" = #{status,jdbcType=INTEGER},
PartBilledPeriod = #{partBilledPeriod,jdbcType=INTEGER},
BilledPeriod = #{billedPeriod,jdbcType=INTEGER},
StdCode = #{stdCode,jdbcType=VARCHAR},
......
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