Commit 3bf7991e authored by chase's avatar chase

Merge branch 'dev_mysql' of http://code.tech.tax.asia.pwcinternal.com/root/atms into dev_mysql

parents 7e174a80 eb2d4b94
...@@ -416,6 +416,11 @@ ...@@ -416,6 +416,11 @@
<artifactId>jxls-core</artifactId> <artifactId>jxls-core</artifactId>
<version>1.0.6</version> <version>1.0.6</version>
</dependency> </dependency>
<dependency>
<groupId>javax.validation</groupId>
<artifactId>validation-api</artifactId>
<version>1.0.0.GA</version>
</dependency>
</dependencies> </dependencies>
......
...@@ -10,13 +10,18 @@ import java.io.IOException; ...@@ -10,13 +10,18 @@ import java.io.IOException;
import java.text.SimpleDateFormat; import java.text.SimpleDateFormat;
import java.util.Date; import java.util.Date;
/**
* author kevin
* target : Solve date conversion issues
* version 1.0
*/
public class CustomDateSerializer extends JsonSerializer<Date> { public class CustomDateSerializer extends JsonSerializer<Date> {
@Override @Override
public void serialize(Date value, JsonGenerator jgen, SerializerProvider arg2) public void serialize(Date value, JsonGenerator jgen, SerializerProvider arg2)
throws IOException, JsonProcessingException { throws IOException, JsonProcessingException {
// TODO Auto-generated method stub // TODO Auto-generated method stub
SimpleDateFormat formatter = new SimpleDateFormat("yyyy-MM-dd"); SimpleDateFormat formatter = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
String formattedDate = formatter.format(value); String formattedDate = formatter.format(value);
jgen.writeString(formattedDate); jgen.writeString(formattedDate);
......
...@@ -92,4 +92,7 @@ public class BeanUtil { ...@@ -92,4 +92,7 @@ public class BeanUtil {
return new String(ch); return new String(ch);
} }
} }
package pwc.taxtech.atms.common.util;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.jdbc.core.JdbcTemplate;
import org.springframework.jdbc.core.RowMapper;
import org.springframework.stereotype.Component;
import pwc.taxtech.atms.entity.Organization;
import pwc.taxtech.atms.entity.Project;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.util.Map;
/**
* author kevin
* version 1.0
* 封装一些简单的数据处理
*/
@Component
public class DataUtil {
@Autowired
private JdbcTemplate jdbcTemplate;
//通过projectId查询project信息
public Map<String, Object> getProjectById(String projectId){
return jdbcTemplate.queryForMap("select * from project where id = ?", projectId);
}
}
package pwc.taxtech.atms.common.util;
import javax.servlet.ServletOutputStream;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.util.UUID;
public class ResponseUtil {
private static HttpServletResponse response;
public static ServletOutputStream response(HttpServletResponse response, String fileName, String type){
if(type != null){
}
response.setContentType("application/vnd.ms-excel;charset=utf-8");
response.addHeader("Access-Control-Expose-Headers", "Content-Type,Content-Disposition,x-file-name");
response.setCharacterEncoding("UTF-8");
response.addHeader("Content-Disposition", "attachment;filename="
+ UUID.randomUUID() + ".xls");
response.addHeader("x-file-name", fileName);
try {
return response.getOutputStream();
} catch (IOException e) {
e.printStackTrace();
}
return null;
}
public static ServletOutputStream response(HttpServletResponse response, String fileName){
return response(response, fileName, null );
}
}
...@@ -127,4 +127,30 @@ public final class Constant { ...@@ -127,4 +127,30 @@ public final class Constant {
public static String DECIMAL_FORMAT = "#,##0.00"; public static String DECIMAL_FORMAT = "#,##0.00";
public static String ZERO_STR = "0"; public static String ZERO_STR = "0";
public static class ReportDataValidateLog{
private String segment3 = null;
private String segment5 = null;
private String segment6 = null;
private static boolean status = true;
public String getResult(boolean status){
if(status){
return "校验结果失败: 科目代码: " + segment3 + ";利润中心:" + segment5 + "; 产品编号: " + segment6;
}
return "校验结果成功: 科目代码: " + segment3 + ";利润中心:" + segment5 + "; 产品编号: " + segment6;
}
public String getResult(){
return getResult(status);
}
public ReportDataValidateLog(String segment3, String segment5, String segment6){
this.segment3 = segment3;
this.segment5 = segment5;
this.segment6 = segment6;
}
}
} }
\ No newline at end of file
package pwc.taxtech.atms.controller;
import com.alibaba.fastjson.JSON;
import com.github.pagehelper.PageInfo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.MediaType;
import org.springframework.web.bind.annotation.*;
import pwc.taxtech.atms.dto.CitJournalAdjustDto;
import pwc.taxtech.atms.dpo.CitTrialBalanceDto;
import pwc.taxtech.atms.dto.vatdto.*;
import pwc.taxtech.atms.dto.vatdto.dd.TrialBalanceDto;
import pwc.taxtech.atms.dto.vatdto.dd.*;
import pwc.taxtech.atms.service.impl.CitDataPreviewServiceImpl;
import pwc.taxtech.atms.service.impl.DataPreviewSerivceImpl;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.io.OutputStream;
import java.util.UUID;
import static javax.servlet.http.HttpServletResponse.SC_NO_CONTENT;
import static javax.servlet.http.HttpServletResponse.SC_OK;
/**
* @author zhikai.z.wei
*/
@RestController
@RequestMapping("/api/v1/citDataPreview/")
public class CitDataPreviewController extends BaseController {
@Autowired
private CitDataPreviewServiceImpl citDataPreviewService;
@PostMapping("getJournalMergeData")
public PageInfo<CitJournalAdjustDto> getJournalMergeData(@RequestBody CitJournalAdjustDto citJournalAdjustDto) {
logger.debug(String.format("CIT日记账合并预览 Condition:%s", JSON.toJSONString(citJournalAdjustDto)));
return citDataPreviewService.getJournalMergeData(citJournalAdjustDto);
}
@RequestMapping(value = "exportJournalMergeData", method = RequestMethod.POST, produces = MediaType.APPLICATION_JSON_UTF8_VALUE)
public void exportJournalMergeData(@RequestBody CitJournalAdjustDto paras, HttpServletResponse response) {
response.setContentType("application/vnd.ms-excel;charset=utf-8");
response.addHeader("Access-Control-Expose-Headers", "Content-Type,Content-Disposition,x-file-name");
String fileName = paras.getPeriodStart() + "-" + paras.getPeriodEnd();
response.setCharacterEncoding("UTF-8");
OutputStream os = null;
try {
response.addHeader("Content-Disposition", "attachment;filename="
+ UUID.randomUUID() + ".xls");
response.addHeader("x-file-name", fileName);
os = response.getOutputStream();
int count = citDataPreviewService.exportJournalMergeData(paras, os);
if (count == 0) {
response.setStatus(SC_NO_CONTENT);
} else {
response.setStatus(SC_OK);
}
} catch (IOException e) {
logger.error(String.format("下载科目余额表-生成文件异常:%s",e.getMessage()));
}
}
@PostMapping("getTbGeneVerData")
public PageInfo<CitTrialBalanceDto> getTbGeneVerData(@RequestBody CitTrialBalanceDto citTrialBalanceDto) {
logger.debug(String.format("CIT日记账合并预览 Condition:%s", JSON.toJSONString(citTrialBalanceDto)));
return citDataPreviewService.getTbGeneVerData(citTrialBalanceDto);
}
@RequestMapping(value = "exportTbGeneVerData", method = RequestMethod.POST, produces = MediaType.APPLICATION_JSON_UTF8_VALUE)
public void exportTbGeneVerData(@RequestBody CitTrialBalanceDto paras, HttpServletResponse response) {
response.setContentType("application/vnd.ms-excel;charset=utf-8");
response.addHeader("Access-Control-Expose-Headers", "Content-Type,Content-Disposition,x-file-name");
String fileName = paras.getPeriodStart() + "-" + paras.getPeriodEnd();
response.setCharacterEncoding("UTF-8");
OutputStream os = null;
try {
response.addHeader("Content-Disposition", "attachment;filename="
+ UUID.randomUUID() + ".xls");
response.addHeader("x-file-name", fileName);
os = response.getOutputStream();
int count = citDataPreviewService.exportTbGeneVerData(paras, os);
if (count == 0) {
response.setStatus(SC_NO_CONTENT);
} else {
response.setStatus(SC_OK);
}
} catch (IOException e) {
logger.error(String.format("下载试算平衡表生成版-生成文件异常:%s",e.getMessage()));
}
}
@PostMapping("getTbMappingVerData")
public PageInfo<CitTrialBalanceDto> getTbMappingVerData(@RequestBody CitTrialBalanceDto citTrialBalanceDto) {
logger.debug(String.format("CIT日记账合并预览 Condition:%s", JSON.toJSONString(citTrialBalanceDto)));
return citDataPreviewService.getTbMappingVerData(citTrialBalanceDto);
}
@RequestMapping(value = "exportTbMappingVerData", method = RequestMethod.POST, produces = MediaType.APPLICATION_JSON_UTF8_VALUE)
public void exportTbMappingVerData(@RequestBody CitTrialBalanceDto paras, HttpServletResponse response) {
response.setContentType("application/vnd.ms-excel;charset=utf-8");
response.addHeader("Access-Control-Expose-Headers", "Content-Type,Content-Disposition,x-file-name");
String fileName = paras.getPeriodStart() + "-" + paras.getPeriodEnd();
response.setCharacterEncoding("UTF-8");
OutputStream os = null;
try {
response.addHeader("Content-Disposition", "attachment;filename="
+ UUID.randomUUID() + ".xls");
response.addHeader("x-file-name", fileName);
os = response.getOutputStream();
int count = citDataPreviewService.exportTbMappingVerData(paras, os);
if (count == 0) {
response.setStatus(SC_NO_CONTENT);
} else {
response.setStatus(SC_OK);
}
} catch (IOException e) {
logger.error(String.format("下载科目余额表-生成文件异常:%s",e.getMessage()));
}
}
}
package pwc.taxtech.atms.controller;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.MediaType;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;
import pwc.taxtech.atms.common.util.ResponseUtil;
import pwc.taxtech.atms.dto.input.CamelPagingResultDto;
import pwc.taxtech.atms.dto.previewData.CitEAMAssetsDisposalDto;
import pwc.taxtech.atms.dto.previewData.CitSalaryDataDto;
import pwc.taxtech.atms.dto.vatdto.TrialBalanceParam;
import pwc.taxtech.atms.entity.CitEAMAssetsDisposal;
import pwc.taxtech.atms.entity.CitSalaryAdvance;
import pwc.taxtech.atms.service.impl.CitPreviewDataServiceImpl;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.io.OutputStream;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.UUID;
import static javax.servlet.http.HttpServletResponse.SC_NO_CONTENT;
import static javax.servlet.http.HttpServletResponse.SC_OK;
/**
* authoer kevin
* version 1.0
*/
@Controller
@RequestMapping("api/v1/citPreviewDataController")
public class CitPreviewDataController extends BaseController {
@Autowired
private CitPreviewDataServiceImpl citPreviewDataService;
@RequestMapping("getSalaryAdvaceListData")
@ResponseBody
public CamelPagingResultDto<CitSalaryAdvance> getSalaryAdvaceListData(@RequestBody CitSalaryDataDto citSalaryDataDto){
return new CamelPagingResultDto<>(citPreviewDataService.getCitSalaryAdvanceDataList(citSalaryDataDto));
}
@RequestMapping("getCitPreviewEamDisposalDataList")
@ResponseBody
public CamelPagingResultDto<CitEAMAssetsDisposal> getCitPreviewEamDisposalDataList(@RequestBody CitEAMAssetsDisposalDto citSalaryDataDto){
return new CamelPagingResultDto<>(citPreviewDataService.getCitPreviewEamDisposalDataList(citSalaryDataDto));
}
@RequestMapping(value = "exportDataEAM", method = RequestMethod.POST, produces = MediaType.APPLICATION_JSON_UTF8_VALUE)
public void exportDataEAM(@RequestBody CitEAMAssetsDisposal citEAMAssetsDisposal, HttpServletResponse response) {
SimpleDateFormat simpleDateFormat = new SimpleDateFormat( "yyyy-MM-dd hh:MM:ss");
String format = simpleDateFormat.format(new Date());
String fileName = "EAM资产处理金额记录表"+ format;
int count = citPreviewDataService.exportDataEAM(citEAMAssetsDisposal, ResponseUtil.response(response, fileName));
if (count == 0) {
response.setStatus(SC_NO_CONTENT);
} else {
response.setStatus(SC_OK);
}
}
}
...@@ -58,7 +58,7 @@ public class OperationLogController { ...@@ -58,7 +58,7 @@ public class OperationLogController {
public Boolean addOperationLog(VatOperationLog vatOperationLog) { public Boolean addOperationLog(VatOperationLog vatOperationLog) {
OperationLogDto operationLogDto = new OperationLogDto(); OperationLogDto operationLogDto = new OperationLogDto();
CommonUtils.copyProperties(vatOperationLog, operationLogDto); CommonUtils.copyProperties(vatOperationLog, operationLogDto);
// operationLogService.addOperationLog(operationLogDto); operationLogService.addOperationLog(operationLogDto);
return true; return true;
} }
} }
package pwc.taxtech.atms.controller; package pwc.taxtech.atms.controller;
import com.alibaba.fastjson.JSONObject;
import com.github.pagehelper.PageInfo;
import org.apache.commons.lang3.StringUtils; import org.apache.commons.lang3.StringUtils;
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.http.ResponseEntity; import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.*; import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile; import org.springframework.web.multipart.MultipartFile;
import pwc.taxtech.atms.common.util.DateUtils;
import pwc.taxtech.atms.constant.enums.EnumServiceType; import pwc.taxtech.atms.constant.enums.EnumServiceType;
import pwc.taxtech.atms.dpo.ReportDto; import pwc.taxtech.atms.dpo.ReportDto;
import pwc.taxtech.atms.dto.FileDto; import pwc.taxtech.atms.dto.FileDto;
......
...@@ -36,6 +36,27 @@ public class CitDataImportLogDto implements Serializable { ...@@ -36,6 +36,27 @@ public class CitDataImportLogDto implements Serializable {
* @mbg.generated * @mbg.generated
*/ */
private String organizationId; private String organizationId;
/**
* Database Column Remarks:
* 项目Id
*
* This field was generated by MyBatis Generator.
* This field corresponds to the database column cit_data_import_log.project_id
*
* @mbg.generated
*/
private String projectId;
/**
* Database Column Remarks:
* 期间
*
* This field was generated by MyBatis Generator.
* This field corresponds to the database column cit_data_import_log.period
*
* @mbg.generated
*/
private Integer period;
/** /**
* Database Column Remarks: * Database Column Remarks:
...@@ -214,6 +235,8 @@ public class CitDataImportLogDto implements Serializable { ...@@ -214,6 +235,8 @@ public class CitDataImportLogDto implements Serializable {
*/ */
private Date updateTime; private Date updateTime;
private String createTimeStr;
/** /**
* This field was generated by MyBatis Generator. * This field was generated by MyBatis Generator.
* This field corresponds to the database table data_import_log * This field corresponds to the database table data_import_log
...@@ -270,6 +293,22 @@ public class CitDataImportLogDto implements Serializable { ...@@ -270,6 +293,22 @@ public class CitDataImportLogDto implements Serializable {
this.organizationId = organizationId == null ? null : organizationId.trim(); this.organizationId = organizationId == null ? null : organizationId.trim();
} }
public String getProjectId() {
return projectId;
}
public void setProjectId(String projectId) {
this.projectId = projectId;
}
public Integer getPeriod() {
return period;
}
public void setPeriod(Integer period) {
this.period = period;
}
/** /**
* This method was generated by MyBatis Generator. * This method was generated by MyBatis Generator.
* This method returns the value of the database column data_import_log.type * This method returns the value of the database column data_import_log.type
...@@ -582,6 +621,14 @@ public class CitDataImportLogDto implements Serializable { ...@@ -582,6 +621,14 @@ public class CitDataImportLogDto implements Serializable {
this.createTime = createTime; this.createTime = createTime;
} }
public String getCreateTimeStr() {
return createTimeStr;
}
public void setCreateTimeStr(String createTimeStr) {
this.createTimeStr = createTimeStr;
}
/** /**
* This method was generated by MyBatis Generator. * This method was generated by MyBatis Generator.
* This method returns the value of the database column data_import_log.update_time * This method returns the value of the database column data_import_log.update_time
......
package pwc.taxtech.atms.dto;
import pwc.taxtech.atms.dpo.PagingDto;
import pwc.taxtech.atms.entity.CitJournalEntryAdjust;
/**
* @author zhikai.z.wei
*/
public class CitJournalAdjustDto extends CitJournalEntryAdjust {
private PagingDto pageInfo;
private Integer periodStart;
private Integer periodEnd;
public PagingDto getPageInfo() {
return pageInfo;
}
public void setPageInfo(PagingDto pageInfo) {
this.pageInfo = pageInfo;
}
public Integer getPeriodStart() {
return periodStart;
}
public void setPeriodStart(Integer periodStart) {
this.periodStart = periodStart;
}
public Integer getPeriodEnd() {
return periodEnd;
}
public void setPeriodEnd(Integer periodEnd) {
this.periodEnd = periodEnd;
}
}
package pwc.taxtech.atms.dto;
import pwc.taxtech.atms.thirdparty.ExcelCell;
import java.math.BigDecimal;
import java.util.Date;
/**
*
* This class was generated by MyBatis Generator.
* This class corresponds to the database table journal_entry
*
* @mbg.generated do_not_delete_during_merge
*/
public class CitTrialBalanceExportDto {
private Long id;
private String organizationId;
private String projectId;
@ExcelCell(index=1)
private String accountCode;
@ExcelCell(index=2)
private String accountDescription;
@ExcelCell(index=3)
private Integer accountPeriod;
@ExcelCell(index=4)
private BigDecimal debitAmount;
@ExcelCell(index=5)
private BigDecimal creditAmount;
@ExcelCell(index=5)
private BigDecimal beginningBalance;
@ExcelCell(index=6)
private BigDecimal endingBalance;
@ExcelCell(index=7)
private String attribute;
@ExcelCell(index=8)
private String createdBy;
private Date createTime;
private Date updateTime;
public Long getId() {
return id;
}
public void setId(Long id) {
this.id = id;
}
public String getOrganizationId() {
return organizationId;
}
public void setOrganizationId(String organizationId) {
this.organizationId = organizationId;
}
public String getProjectId() {
return projectId;
}
public void setProjectId(String projectId) {
this.projectId = projectId;
}
public String getAccountCode() {
return accountCode;
}
public void setAccountCode(String accountCode) {
this.accountCode = accountCode;
}
public String getAccountDescription() {
return accountDescription;
}
public void setAccountDescription(String accountDescription) {
this.accountDescription = accountDescription;
}
public Integer getAccountPeriod() {
return accountPeriod;
}
public void setAccountPeriod(Integer accountPeriod) {
this.accountPeriod = accountPeriod;
}
public BigDecimal getDebitAmount() {
return debitAmount;
}
public void setDebitAmount(BigDecimal debitAmount) {
this.debitAmount = debitAmount;
}
public BigDecimal getCreditAmount() {
return creditAmount;
}
public void setCreditAmount(BigDecimal creditAmount) {
this.creditAmount = creditAmount;
}
public BigDecimal getBeginningBalance() {
return beginningBalance;
}
public void setBeginningBalance(BigDecimal beginningBalance) {
this.beginningBalance = beginningBalance;
}
public BigDecimal getEndingBalance() {
return endingBalance;
}
public void setEndingBalance(BigDecimal endingBalance) {
this.endingBalance = endingBalance;
}
public String getAttribute() {
return attribute;
}
public void setAttribute(String attribute) {
this.attribute = attribute;
}
public String getCreatedBy() {
return createdBy;
}
public void setCreatedBy(String createdBy) {
this.createdBy = createdBy;
}
public Date getCreateTime() {
return createTime;
}
public void setCreateTime(Date createTime) {
this.createTime = createTime;
}
public Date getUpdateTime() {
return updateTime;
}
public void setUpdateTime(Date updateTime) {
this.updateTime = updateTime;
}
@Override
public String toString() {
return "CitTrialBalanceExportDto{" +
"id=" + id +
", organizationId='" + organizationId + '\'' +
", projectId='" + projectId + '\'' +
", accountCode='" + accountCode + '\'' +
", accountDescription='" + accountDescription + '\'' +
", accountPeriod=" + accountPeriod +
", debitAmount=" + debitAmount +
", creditAmount='" + creditAmount + '\'' +
", beginningBalance='" + beginningBalance + '\'' +
", endingBalance='" + endingBalance + '\'' +
", attribute='" + attribute + '\'' +
", createdBy='" + createdBy + '\'' +
", createTime=" + createTime +
", updateTime=" + updateTime +
'}';
}
}
\ No newline at end of file
package pwc.taxtech.atms.dto; package pwc.taxtech.atms.dto;
import com.fasterxml.jackson.databind.annotation.JsonSerialize; import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import org.springframework.format.annotation.DateTimeFormat;
import pwc.taxtech.atms.common.CustomDateSerializer; import pwc.taxtech.atms.common.CustomDateSerializer;
import pwc.taxtech.atms.entity.BaseEntity; import pwc.taxtech.atms.entity.BaseEntity;
......
package pwc.taxtech.atms.dto;
import pwc.taxtech.atms.thirdparty.ExcelCell;
import java.math.BigDecimal;
import java.util.Date;
/**
*
* This class was generated by MyBatis Generator.
* This class corresponds to the database table journal_entry
*
* @mbg.generated do_not_delete_during_merge
*/
public class JournalMergeExportDto {
private Long id;
private String organizationId;
private String projectId;
@ExcelCell(index=1)
private String approvalStatus;
@ExcelCell(index=2)
private String postedStatus;
@ExcelCell(index=3)
private Date accountingPeriod;
@ExcelCell(index=4)
private Date accountingDate;
@ExcelCell(index=5)
private String journalSource;
@ExcelCell(index=5)
private String category;
@ExcelCell(index=6)
private String name;
@ExcelCell(index=7)
private String voucherNum;
@ExcelCell(index=8)
private String description;
@ExcelCell(index=9)
private String OrgCode;
@ExcelCell(index=10)
private String SubjectCode;
@ExcelCell(index=11)
private String OrgName;
@ExcelCell(index=12)
private String SubjectName;
@ExcelCell(index=13)
private BigDecimal accountedDr;
@ExcelCell(index=14)
private BigDecimal accountedCr;
@ExcelCell(index=15)
private String createdBy;
@ExcelCell(index=16)
private Date createdDate;
@ExcelCell(index=17)
private String lateUpdatedBy;
@ExcelCell(index=18)
private Date lateUpdatedDate;
@ExcelCell(index=19)
private Integer period;
private Date createTime;
private Date updateTime;
public Long getId() {
return id;
}
public void setId(Long id) {
this.id = id;
}
public String getOrganizationId() {
return organizationId;
}
public void setOrganizationId(String organizationId) {
this.organizationId = organizationId;
}
public String getProjectId() {
return projectId;
}
public void setProjectId(String projectId) {
this.projectId = projectId;
}
public String getApprovalStatus() {
return approvalStatus;
}
public void setApprovalStatus(String approvalStatus) {
this.approvalStatus = approvalStatus;
}
public String getPostedStatus() {
return postedStatus;
}
public void setPostedStatus(String postedStatus) {
this.postedStatus = postedStatus;
}
public Date getAccountingPeriod() {
return accountingPeriod;
}
public void setAccountingPeriod(Date accountingPeriod) {
this.accountingPeriod = accountingPeriod;
}
public Date getAccountingDate() {
return accountingDate;
}
public void setAccountingDate(Date accountingDate) {
this.accountingDate = accountingDate;
}
public String getJournalSource() {
return journalSource;
}
public void setJournalSource(String journalSource) {
this.journalSource = journalSource;
}
public String getCategory() {
return category;
}
public void setCategory(String category) {
this.category = category;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public String getVoucherNum() {
return voucherNum;
}
public void setVoucherNum(String voucherNum) {
this.voucherNum = voucherNum;
}
public String getDescription() {
return description;
}
public void setDescription(String description) {
this.description = description;
}
public String getOrgCode() {
return OrgCode;
}
public void setOrgCode(String orgCode) {
OrgCode = orgCode;
}
public String getSubjectCode() {
return SubjectCode;
}
public void setSubjectCode(String subjectCode) {
SubjectCode = subjectCode;
}
public String getOrgName() {
return OrgName;
}
public void setOrgName(String orgName) {
OrgName = orgName;
}
public String getSubjectName() {
return SubjectName;
}
public void setSubjectName(String subjectName) {
SubjectName = subjectName;
}
public BigDecimal getAccountedDr() {
return accountedDr;
}
public void setAccountedDr(BigDecimal accountedDr) {
this.accountedDr = accountedDr;
}
public BigDecimal getAccountedCr() {
return accountedCr;
}
public void setAccountedCr(BigDecimal accountedCr) {
this.accountedCr = accountedCr;
}
public String getCreatedBy() {
return createdBy;
}
public void setCreatedBy(String createdBy) {
this.createdBy = createdBy;
}
public Date getCreatedDate() {
return createdDate;
}
public void setCreatedDate(Date createdDate) {
this.createdDate = createdDate;
}
public String getLateUpdatedBy() {
return lateUpdatedBy;
}
public void setLateUpdatedBy(String lateUpdatedBy) {
this.lateUpdatedBy = lateUpdatedBy;
}
public Date getLateUpdatedDate() {
return lateUpdatedDate;
}
public void setLateUpdatedDate(Date lateUpdatedDate) {
this.lateUpdatedDate = lateUpdatedDate;
}
public Integer getPeriod() {
return period;
}
public void setPeriod(Integer period) {
this.period = period;
}
public Date getCreateTime() {
return createTime;
}
public void setCreateTime(Date createTime) {
this.createTime = createTime;
}
public Date getUpdateTime() {
return updateTime;
}
public void setUpdateTime(Date updateTime) {
this.updateTime = updateTime;
}
@Override
public String toString() {
return "JournalMergeExportDto{" +
"id=" + id +
", organizationId='" + organizationId + '\'' +
", projectId='" + projectId + '\'' +
", approvalStatus='" + approvalStatus + '\'' +
", postedStatus='" + postedStatus + '\'' +
", accountingPeriod=" + accountingPeriod +
", accountingDate=" + accountingDate +
", journalSource='" + journalSource + '\'' +
", category='" + category + '\'' +
", name='" + name + '\'' +
", voucherNum='" + voucherNum + '\'' +
", description='" + description + '\'' +
", OrgCode='" + OrgCode + '\'' +
", SubjectCode='" + SubjectCode + '\'' +
", OrgName='" + OrgName + '\'' +
", SubjectName='" + SubjectName + '\'' +
", accountedDr=" + accountedDr +
", accountedCr=" + accountedCr +
", createdBy='" + createdBy + '\'' +
", createdDate=" + createdDate +
", lateUpdatedBy='" + lateUpdatedBy + '\'' +
", lateUpdatedDate=" + lateUpdatedDate +
", period=" + period +
", createTime=" + createTime +
", updateTime=" + updateTime +
'}';
}
}
\ No newline at end of file
...@@ -17,6 +17,33 @@ public class QueryOperateParamDto { ...@@ -17,6 +17,33 @@ public class QueryOperateParamDto {
private Integer logType; private Integer logType;
private PagingDto pageInfo; private PagingDto pageInfo;
private String QueryValue;
private String Period;
private String ModuleID;
public String getQueryValue() {
return QueryValue;
}
public void setQueryValue(String queryValue) {
QueryValue = queryValue;
}
public String getPeriod() {
return Period;
}
public void setPeriod(String period) {
Period = period;
}
public String getModuleID() {
return ModuleID;
}
public void setModuleID(String moduleID) {
ModuleID = moduleID;
}
public String getSearchText() { public String getSearchText() {
return searchText; return searchText;
......
package pwc.taxtech.atms.dto.ebsdto; package pwc.taxtech.atms.dto.ebsdto;
import java.math.BigDecimal; import java.math.BigDecimal;
import java.util.Date;
public class JournalEntryQueryDto { public class JournalEntryQueryDto {
/**
* Database Column Remarks:
* 唯一编号 系统唯一编号
* <p>
* This field was generated by MyBatis Generator.
* This field corresponds to the database column journal_entry.id
*
* @mbg.generated
*/
private Long id;
/**
* Database Column Remarks:
* 机构编号 对应机构编号
* <p>
* This field was generated by MyBatis Generator.
* This field corresponds to the database column journal_entry.organization_id
*
* @mbg.generated
*/
private String organizationId;
/**
* Database Column Remarks:
* 项目ID
* <p>
* This field was generated by MyBatis Generator.
* This field corresponds to the database column journal_entry.project_id
*
* @mbg.generated
*/
private String projectId;
/** /**
* Database Column Remarks: * Database Column Remarks:
* 数据日期 * 数据日期
...@@ -47,7 +13,7 @@ public class JournalEntryQueryDto { ...@@ -47,7 +13,7 @@ public class JournalEntryQueryDto {
* *
* @mbg.generated * @mbg.generated
*/ */
private Date date; private String date;
/** /**
* Database Column Remarks: * Database Column Remarks:
...@@ -102,7 +68,7 @@ public class JournalEntryQueryDto { ...@@ -102,7 +68,7 @@ public class JournalEntryQueryDto {
* *
* @mbg.generated * @mbg.generated
*/ */
private String status; private Boolean status;
/** /**
* Database Column Remarks: * Database Column Remarks:
...@@ -168,7 +134,7 @@ public class JournalEntryQueryDto { ...@@ -168,7 +134,7 @@ public class JournalEntryQueryDto {
* *
* @mbg.generated * @mbg.generated
*/ */
private Date accountingDate; private String accountingDate;
/** /**
* Database Column Remarks: * Database Column Remarks:
...@@ -542,7 +508,7 @@ public class JournalEntryQueryDto { ...@@ -542,7 +508,7 @@ public class JournalEntryQueryDto {
* *
* @mbg.generated * @mbg.generated
*/ */
private Date attribute2; private String attribute2;
/** /**
* Database Column Remarks: * Database Column Remarks:
...@@ -718,7 +684,7 @@ public class JournalEntryQueryDto { ...@@ -718,7 +684,7 @@ public class JournalEntryQueryDto {
* *
* @mbg.generated * @mbg.generated
*/ */
private Date createdDate; private String createdDate;
/** /**
* Database Column Remarks: * Database Column Remarks:
...@@ -740,70 +706,13 @@ public class JournalEntryQueryDto { ...@@ -740,70 +706,13 @@ public class JournalEntryQueryDto {
* *
* @mbg.generated * @mbg.generated
*/ */
private Date lateUpdatedDate; private String lateUpdatedDate;
/**
* Database Column Remarks:
* 创建时间
* <p>
* This field was generated by MyBatis Generator.
* This field corresponds to the database column journal_entry.create_time
*
* @mbg.generated
*/
private Date createTime;
/**
* Database Column Remarks:
* 更新时间
* <p>
* This field was generated by MyBatis Generator.
* This field corresponds to the database column journal_entry.update_time
*
* @mbg.generated
*/
private Date updateTime;
/**
* Database Column Remarks:
* 税务系统期间 yyyyMM
*
* This field was generated by MyBatis Generator.
* This field corresponds to the database column journal_entry.tms_period
*
* @mbg.generated
*/
private Integer tmsPeriod;
public Long getId() {
return id;
}
public void setId(Long id) {
this.id = id;
}
public String getOrganizationId() {
return organizationId;
}
public void setOrganizationId(String organizationId) { public String getDate() {
this.organizationId = organizationId;
}
public String getProjectId() {
return projectId;
}
public void setProjectId(String projectId) {
this.projectId = projectId;
}
public Date getDate() {
return date; return date;
} }
public void setDate(Date date) { public void setDate(String date) {
this.date = date; this.date = date;
} }
...@@ -839,11 +748,11 @@ public class JournalEntryQueryDto { ...@@ -839,11 +748,11 @@ public class JournalEntryQueryDto {
this.currencyCode = currencyCode; this.currencyCode = currencyCode;
} }
public String getStatus() { public Boolean getStatus() {
return status; return status;
} }
public void setStatus(String status) { public void setStatus(Boolean status) {
this.status = status; this.status = status;
} }
...@@ -887,11 +796,11 @@ public class JournalEntryQueryDto { ...@@ -887,11 +796,11 @@ public class JournalEntryQueryDto {
this.period = period; this.period = period;
} }
public Date getAccountingDate() { public String getAccountingDate() {
return accountingDate; return accountingDate;
} }
public void setAccountingDate(Date accountingDate) { public void setAccountingDate(String accountingDate) {
this.accountingDate = accountingDate; this.accountingDate = accountingDate;
} }
...@@ -1159,11 +1068,11 @@ public class JournalEntryQueryDto { ...@@ -1159,11 +1068,11 @@ public class JournalEntryQueryDto {
this.attribute1 = attribute1; this.attribute1 = attribute1;
} }
public Date getAttribute2() { public String getAttribute2() {
return attribute2; return attribute2;
} }
public void setAttribute2(Date attribute2) { public void setAttribute2(String attribute2) {
this.attribute2 = attribute2; this.attribute2 = attribute2;
} }
...@@ -1287,11 +1196,11 @@ public class JournalEntryQueryDto { ...@@ -1287,11 +1196,11 @@ public class JournalEntryQueryDto {
this.createdBy = createdBy; this.createdBy = createdBy;
} }
public Date getCreatedDate() { public String getCreatedDate() {
return createdDate; return createdDate;
} }
public void setCreatedDate(Date createdDate) { public void setCreatedDate(String createdDate) {
this.createdDate = createdDate; this.createdDate = createdDate;
} }
...@@ -1303,35 +1212,11 @@ public class JournalEntryQueryDto { ...@@ -1303,35 +1212,11 @@ public class JournalEntryQueryDto {
this.lateUpdatedBy = lateUpdatedBy; this.lateUpdatedBy = lateUpdatedBy;
} }
public Date getLateUpdatedDate() { public String getLateUpdatedDate() {
return lateUpdatedDate; return lateUpdatedDate;
} }
public void setLateUpdatedDate(Date lateUpdatedDate) { public void setLateUpdatedDate(String lateUpdatedDate) {
this.lateUpdatedDate = lateUpdatedDate; this.lateUpdatedDate = lateUpdatedDate;
} }
public Date getCreateTime() {
return createTime;
}
public void setCreateTime(Date createTime) {
this.createTime = createTime;
}
public Date getUpdateTime() {
return updateTime;
}
public void setUpdateTime(Date updateTime) {
this.updateTime = updateTime;
}
public Integer getTmsPeriod() {
return tmsPeriod;
}
public void setTmsPeriod(Integer tmsPeriod) {
this.tmsPeriod = tmsPeriod;
}
} }
package pwc.taxtech.atms.dto.ebsdto;
import javax.validation.constraints.Max;
import javax.validation.constraints.Size;
import java.io.Serializable;
/**
* @Auther: Gary J Li
* @Date: 04/03/2019 17:14
* @Description:
*/
public class OrganizationQueryDto implements Serializable {
@Size(max=50,message = "纳税人识别号超长,最长为50")
private String taxPayerNumber;
@Size(max=50,message = "机构代码超长,最长为50")
private String code;
@Size(max=50,message = "机构名称超长,最长为50")
private String name;
@Size(max=128,message = "机构名称超长,最长为128")
private String enterpriseAccountCode;
@Size(max=200,message = "法定负责人名称超长,最长为200")
private String legalPersonName;
@Size(max=500,message = "注册资本超长,最长为500")
private String registrationCapital;
@Size(max=500,message = "实缴资本超长,最长为500")
private String paidInCapital;
@Size(max=100,message = "注册负责人手机超长,最长为100")
private String legalPersonPhoneNumber;
@Size(max=100,message = "注册负责人座机超长,最长为100")
private String legalPersonLandlineNum;
@Size(max=100,message = "注册负责人邮箱超长,最长为100")
private String legalPersonEmailAddress;
@Size(max=200,message = "注册登记财务负责人姓名超长,最长为200")
private String regFinancialOfficerName;
@Size(max=200,message = "注册登记财务负责人手机超长,最长为200")
private String regFinancialOfficerPhoneNum;
@Size(max=100,message = "注册登记财务负责人座机超长,最长为100")
private String regFinancialOfficerLandlineNum;
@Size(max=100,message = "注册登记财务负责人手机超长,最长为100")
private String regFinancialOfficerEmailAddress;
@Size(max=50,message = "记账本位币超长,最长为50")
private String currencyCode;
@Size(max=500,message = "注册地址超长,最长为500")
private String registerAddress;
@Size(max=300,message = "上级公司名称超长,最长为300")
private String parentName;
@Max(value = 99999999,message = "雇员人数超过最大限制")
private int staffSize;
public String getTaxPayerNumber() {
return taxPayerNumber;
}
public void setTaxPayerNumber(String taxPayerNumber) {
this.taxPayerNumber = taxPayerNumber;
}
public String getCode() {
return code;
}
public void setCode(String code) {
this.code = code;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public String getEnterpriseAccountCode() {
return enterpriseAccountCode;
}
public void setEnterpriseAccountCode(String enterpriseAccountCode) {
this.enterpriseAccountCode = enterpriseAccountCode;
}
public String getLegalPersonName() {
return legalPersonName;
}
public void setLegalPersonName(String legalPersonName) {
this.legalPersonName = legalPersonName;
}
public String getRegistrationCapital() {
return registrationCapital;
}
public void setRegistrationCapital(String registrationCapital) {
this.registrationCapital = registrationCapital;
}
public String getPaidInCapital() {
return paidInCapital;
}
public void setPaidInCapital(String paidInCapital) {
this.paidInCapital = paidInCapital;
}
public String getLegalPersonPhoneNumber() {
return legalPersonPhoneNumber;
}
public void setLegalPersonPhoneNumber(String legalPersonPhoneNumber) {
this.legalPersonPhoneNumber = legalPersonPhoneNumber;
}
public String getLegalPersonLandlineNum() {
return legalPersonLandlineNum;
}
public void setLegalPersonLandlineNum(String legalPersonLandlineNum) {
this.legalPersonLandlineNum = legalPersonLandlineNum;
}
public String getLegalPersonEmailAddress() {
return legalPersonEmailAddress;
}
public void setLegalPersonEmailAddress(String legalPersonEmailAddress) {
this.legalPersonEmailAddress = legalPersonEmailAddress;
}
public String getRegFinancialOfficerName() {
return regFinancialOfficerName;
}
public void setRegFinancialOfficerName(String regFinancialOfficerName) {
this.regFinancialOfficerName = regFinancialOfficerName;
}
public String getRegFinancialOfficerPhoneNum() {
return regFinancialOfficerPhoneNum;
}
public void setRegFinancialOfficerPhoneNum(String regFinancialOfficerPhoneNum) {
this.regFinancialOfficerPhoneNum = regFinancialOfficerPhoneNum;
}
public String getRegFinancialOfficerLandlineNum() {
return regFinancialOfficerLandlineNum;
}
public void setRegFinancialOfficerLandlineNum(String regFinancialOfficerLandlineNum) {
this.regFinancialOfficerLandlineNum = regFinancialOfficerLandlineNum;
}
public String getRegFinancialOfficerEmailAddress() {
return regFinancialOfficerEmailAddress;
}
public void setRegFinancialOfficerEmailAddress(String regFinancialOfficerEmailAddress) {
this.regFinancialOfficerEmailAddress = regFinancialOfficerEmailAddress;
}
public String getCurrencyCode() {
return currencyCode;
}
public void setCurrencyCode(String currencyCode) {
this.currencyCode = currencyCode;
}
public String getRegisterAddress() {
return registerAddress;
}
public void setRegisterAddress(String registerAddress) {
this.registerAddress = registerAddress;
}
public String getParentName() {
return parentName;
}
public void setParentName(String parentName) {
this.parentName = parentName;
}
public int getStaffSize() {
return staffSize;
}
public void setStaffSize(int staffSize) {
this.staffSize = staffSize;
}
}
...@@ -125,6 +125,17 @@ public class OrganizationAccountingRateDto implements Serializable { ...@@ -125,6 +125,17 @@ public class OrganizationAccountingRateDto implements Serializable {
*/ */
private Float rate; private Float rate;
/**
* Database Column Remarks:
* 数据日期
*
* This field was generated by MyBatis Generator.
* This field corresponds to the database column organization_accounting_rate.date
*
* @mbg.generated
*/
private Date date;
/** /**
* Database Column Remarks: * Database Column Remarks:
* 创建时间 * 创建时间
...@@ -443,6 +454,14 @@ public class OrganizationAccountingRateDto implements Serializable { ...@@ -443,6 +454,14 @@ public class OrganizationAccountingRateDto implements Serializable {
this.updateTime = updateTime; this.updateTime = updateTime;
} }
public Date getDate() {
return date;
}
public void setDate(Date date) {
this.date = date;
}
/** /**
* This method was generated by MyBatis Generator. * This method was generated by MyBatis Generator.
* This method corresponds to the database table organization_accounting_rate * This method corresponds to the database table organization_accounting_rate
......
package pwc.taxtech.atms.dto.previewData;
import com.github.pagehelper.PageInfo;
import pwc.taxtech.atms.dto.input.CamelPagingDto;
import pwc.taxtech.atms.entity.CitEAMAssetsDisposal;
public class CitEAMAssetsDisposalDto extends CitEAMAssetsDisposal {
private CamelPagingDto pageInfo;
public CamelPagingDto getPageInfo() {
return this.pageInfo;
}
public void setPageInfo(CamelPagingDto pageInfo) {
this.pageInfo = pageInfo;
}
}
package pwc.taxtech.atms.dto.previewData;
import com.github.pagehelper.PageInfo;
import pwc.taxtech.atms.dto.input.CamelPagingDto;
import pwc.taxtech.atms.entity.CitSalaryAdvance;
public class CitSalaryDataDto extends CitSalaryAdvance {
private CamelPagingDto pageInfo;
public CamelPagingDto getPageInfo() {
return this.pageInfo;
}
public void setPageInfo(CamelPagingDto pageInfo) {
this.pageInfo = pageInfo;
}
}
...@@ -17,6 +17,7 @@ public class RevenueConfResult extends RevenueConfig { ...@@ -17,6 +17,7 @@ public class RevenueConfResult extends RevenueConfig {
} }
public String getRevenueTypeStr() { public String getRevenueTypeStr() {
return RevenueConfEnum.RevenueType.MAPPING.get(this.getRevenueType()); return RevenueConfEnum.RevenueType.MAPPING.get(this.getRevenueType());
} }
......
package pwc.taxtech.atms.service; package pwc.taxtech.atms.service;
import pwc.taxtech.atms.dto.ebsdto.*; import pwc.taxtech.atms.dto.ebsdto.*;
import java.util.List; import java.util.List;
public interface EbsApiService { public interface EbsApiService {
/** /**
* EBS 日记账同步更新 * EBS 日记账同步更新
* *
* @param items * @param items
*/ */
void queryRemoteServerThenUpdateJE(List<JournalEntryQueryDto> items); void queryRemoteServerThenUpdateJE(List<JournalEntryQueryDto> items);
/** /**
* ebs 科目余额表同步更新 * ebs 科目余额表同步更新
* *
* @param items * @param items
*/ */
void queryRemoteServerThenUpdateTB(List<TrialBalanceQueryDto> items); void queryRemoteServerThenUpdateTB(List<TrialBalanceQueryDto> items);
/** /**
* ebs 现金流量表同步更新 * ebs 现金流量表同步更新
* *
* @param items * @param items
*/ */
void queryRemoteServerThenUpdateCF(List<CashFlowQueryDto> items); void queryRemoteServerThenUpdateCF(List<CashFlowQueryDto> items);
/** /**
* ebs 资产负债表同步更新 * ebs 资产负债表同步更新
* *
* @param items * @param items
*/ */
void queryRemoteServerThenUpdateBS(List<BalanceSheetQueryDto> items); void queryRemoteServerThenUpdateBS(List<BalanceSheetQueryDto> items);
/** /**
* ebs 资产负债表PRC同步更新 * ebs 资产负债表PRC同步更新
* *
* @param items * @param items
*/ */
void queryRemoteServerThenUpdateBSprc(List<BalanceSheetPrcQueryDto> items); void queryRemoteServerThenUpdateBSprc(List<BalanceSheetPrcQueryDto> items);
/** /**
* ebs 利润表同步更新 * ebs 利润表同步更新
* *
* @param items * @param items
*/ */
void queryRemoteServerThenUpdatePL(List<ProfitLossStatementQueryDto> items); void queryRemoteServerThenUpdatePL(List<ProfitLossStatementQueryDto> items);
/** /**
* ebs 利润表PRC同步更新 * ebs 利润表PRC同步更新
* *
* @param items * @param items
*/ */
void queryRemoteServerThenUpdatePLprc(List<ProfitLossStatementPrcQueryDto> items); void queryRemoteServerThenUpdatePLprc(List<ProfitLossStatementPrcQueryDto> items);
/** /**
* ebs 汇率表同步更新 * ebs 汇率表同步更新
* *
* @param items * @param items
*/ */
void queryRemoteServerThenUpdateOAR(List<OrganizationAccountingRateQueryDto> items); void queryRemoteServerThenUpdateOAR(List<OrganizationAccountingRateQueryDto> items);
}
/**
* ebs 机构信息表同步更新
*
* @param items
*/
void queryRemoteServerThenUpdateOrg(Long id, List<OrganizationQueryDto> items);
}
package pwc.taxtech.atms.service.impl;
import com.github.pagehelper.Page;
import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import pwc.taxtech.atms.dao.CitEAMAssetsDisposalMapper;
import pwc.taxtech.atms.dao.CitSalaryAdvanceMapper;
import pwc.taxtech.atms.dto.input.CamelPagingResultDto;
import pwc.taxtech.atms.dto.previewData.CitEAMAssetsDisposalDto;
import pwc.taxtech.atms.dto.previewData.CitSalaryDataDto;
import pwc.taxtech.atms.dto.vatdto.TrialBalanceParam;
import pwc.taxtech.atms.dto.vatdto.dd.BalanceSheetDto;
import pwc.taxtech.atms.dto.vatdto.dd.TrialBalanceExportDto;
import pwc.taxtech.atms.entity.CitEAMAssetsDisposal;
import pwc.taxtech.atms.entity.CitEAMAssetsDisposalExample;
import pwc.taxtech.atms.entity.CitSalaryAdvance;
import pwc.taxtech.atms.entity.CitSalaryAdvanceExample;
import pwc.taxtech.atms.thirdparty.ExcelUtil;
import pwc.taxtech.atms.vat.dpo.TrialBalanceCondition;
import pwc.taxtech.atms.vat.entity.TrialBalance;
import javax.servlet.ServletOutputStream;
import java.util.ArrayList;
import java.util.LinkedHashMap;
import java.util.List;
import java.util.Map;
import static pwc.taxtech.atms.common.util.SpringContextUtil.trialBalanceMapper;
@Service
public class CitPreviewDataServiceImpl extends BaseService {
@Autowired
private CitSalaryAdvanceMapper citSalaryAdvanceMapper;
public PageInfo<CitSalaryAdvance> getCitSalaryAdvanceDataList(CitSalaryDataDto citSalaryDataDto ){
CitSalaryAdvanceExample example = new CitSalaryAdvanceExample();
CitSalaryAdvanceExample.Criteria criteria = example.createCriteria();
if(!"".equals(citSalaryDataDto.getPoSubjectName()) && citSalaryDataDto.getPoSubjectName() != null){//根据PO主体名称进行查询
criteria.andPoSubjectNameEqualTo(citSalaryDataDto.getPoSubjectName());
}
Page page = PageHelper.startPage(citSalaryDataDto.getPageInfo().getPageIndex(), citSalaryDataDto.getPageInfo().getPageSize());
List<CitSalaryAdvance> citSalaryAdvances = citSalaryAdvanceMapper.selectByExample(example);
PageInfo<CitSalaryAdvance> pageInfo =new PageInfo<CitSalaryAdvance>(citSalaryAdvances);
pageInfo.setTotal(page.getTotal());
return pageInfo;
}
@Autowired
private CitEAMAssetsDisposalMapper citEAMAssetsDisposalMapper;
public PageInfo<CitEAMAssetsDisposal> getCitPreviewEamDisposalDataList(CitEAMAssetsDisposalDto citEAMAssetsDisposalDto) {
CitEAMAssetsDisposalExample example = new CitEAMAssetsDisposalExample();
CitEAMAssetsDisposalExample.Criteria criteria = example.createCriteria();
Page page = PageHelper.startPage(citEAMAssetsDisposalDto.getPageInfo().getPageIndex(), citEAMAssetsDisposalDto.getPageInfo().getPageSize());
List<CitEAMAssetsDisposal> citSalaryAdvances = citEAMAssetsDisposalMapper.selectByExample(example);
PageInfo<CitEAMAssetsDisposal> pageInfo =new PageInfo<CitEAMAssetsDisposal>(citSalaryAdvances);
pageInfo.setTotal(page.getTotal());
return pageInfo;
}
private Map<String, String> generalEAMHeader() {
Map<String, String> header = new LinkedHashMap<>();
header.put("Date","数据日期");
header.put("Source","来源");
header.put("Period","期间");
header.put("LedgerId","账套ID");
header.put("OccurPeriod","发生期间");
header.put("AssetLabelNumber","资产标签号");
header.put("CompensationSaleAmount","赔偿/变卖金额");
header.put("CreatedBy","主体性质");
return header;
}
public int exportDataEAM(CitEAMAssetsDisposal citEAMAssetsDisposal, ServletOutputStream response) {
try {
CitEAMAssetsDisposalExample example = new CitEAMAssetsDisposalExample();
List<CitEAMAssetsDisposal> list = citEAMAssetsDisposalMapper.selectByCondition(citEAMAssetsDisposal);
Map<String, String> header = generalEAMHeader();
/*
TrialBalanceCondition condition = new TrialBalanceCondition();
beanUtil.copyProperties(param, condition);
List<TrialBalance> trialBalances = trialBalanceMapper.selectByCondition(condition);*/
/*
Map<String, String> header = generalTBHeader();
List<TrialBalanceExportDto> cellList = new ArrayList<>();
trialBalances.forEach(tb -> {
TrialBalanceExportDto d = new TrialBalanceExportDto();
d = beanUtil.copyProperties(tb, d);
cellList.add(d);
});*/
ExcelUtil.exportExcel(header, list, response);
return list.size();
} catch (Exception e) {
e.printStackTrace();
logger.error("EAM资产处理金额记录表: %s", e.getMessage());
return 0;
}
}
}
...@@ -12,7 +12,6 @@ import org.apache.poi.ss.usermodel.*; ...@@ -12,7 +12,6 @@ import org.apache.poi.ss.usermodel.*;
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 org.springframework.web.multipart.MultipartFile; import org.springframework.web.multipart.MultipartFile;
import pwc.taxtech.atms.common.config.SystemConfig;
import pwc.taxtech.atms.common.message.ErrorMessage; import pwc.taxtech.atms.common.message.ErrorMessage;
import pwc.taxtech.atms.common.message.ErrorMessageCN; import pwc.taxtech.atms.common.message.ErrorMessageCN;
import pwc.taxtech.atms.common.util.DateUtils; import pwc.taxtech.atms.common.util.DateUtils;
......
...@@ -104,7 +104,7 @@ public class OperationLogServiceImpl extends AbstractService { ...@@ -104,7 +104,7 @@ public class OperationLogServiceImpl extends AbstractService {
public PagingResultDto<OperationLogDto> getOperationLogList(QueryOperateParamDto queryOperateParamDto) { public PagingResultDto<OperationLogDto> getOperationLogList(QueryOperateParamDto queryOperateParamDto) {
logger.debug("OperationLogService getOperationLogList"); logger.debug("OperationLogService getOperationLogList");
// validate // validate
Assert.hasText(queryOperateParamDto.getModuleName(), "Empty moduleName"); // Assert.hasText(queryOperateParamDto.getModuleName(), "Empty moduleName");
final PagingDto pageInfo = queryOperateParamDto.getPageInfo(); final PagingDto pageInfo = queryOperateParamDto.getPageInfo();
......
...@@ -14,13 +14,12 @@ import org.apache.poi.ss.usermodel.Workbook; ...@@ -14,13 +14,12 @@ import org.apache.poi.ss.usermodel.Workbook;
import org.slf4j.Logger; import org.slf4j.Logger;
import org.slf4j.LoggerFactory; import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.jdbc.core.JdbcTemplate;
import org.springframework.stereotype.Component; import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.multipart.MultipartFile; import org.springframework.web.multipart.MultipartFile;
import pwc.taxtech.atms.common.CommonUtils; import pwc.taxtech.atms.common.CommonUtils;
import pwc.taxtech.atms.common.util.DateUtils; import pwc.taxtech.atms.common.util.*;
import pwc.taxtech.atms.common.util.FileUploadUtil;
import pwc.taxtech.atms.common.util.MyAsserts;
import pwc.taxtech.atms.common.util.SpringContextUtil;
import pwc.taxtech.atms.constant.Constant; import pwc.taxtech.atms.constant.Constant;
import pwc.taxtech.atms.constant.enums.*; import pwc.taxtech.atms.constant.enums.*;
import pwc.taxtech.atms.dao.*; import pwc.taxtech.atms.dao.*;
...@@ -37,10 +36,12 @@ import pwc.taxtech.atms.service.impl.BaseService; ...@@ -37,10 +36,12 @@ import pwc.taxtech.atms.service.impl.BaseService;
import pwc.taxtech.atms.service.impl.CellConfigTranslater; import pwc.taxtech.atms.service.impl.CellConfigTranslater;
import pwc.taxtech.atms.service.impl.DistributedIdService; import pwc.taxtech.atms.service.impl.DistributedIdService;
import pwc.taxtech.atms.vat.dao.*; import pwc.taxtech.atms.vat.dao.*;
import pwc.taxtech.atms.vat.dao.DataValidateLogMapper;
import pwc.taxtech.atms.vat.dpo.DataSourceCellDataDto; import pwc.taxtech.atms.vat.dpo.DataSourceCellDataDto;
import pwc.taxtech.atms.vat.dpo.DataSourceExtendDto; import pwc.taxtech.atms.vat.dpo.DataSourceExtendDto;
import pwc.taxtech.atms.vat.dpo.InputVATInvoiceItemExtendDto; import pwc.taxtech.atms.vat.dpo.InputVATInvoiceItemExtendDto;
import pwc.taxtech.atms.vat.entity.*; import pwc.taxtech.atms.vat.entity.*;
import pwc.taxtech.atms.vat.entity.DataValidateLog;
import pwc.taxtech.atms.vat.service.impl.report.functions.FormulaHelper; import pwc.taxtech.atms.vat.service.impl.report.functions.FormulaHelper;
import java.io.File; import java.io.File;
...@@ -553,7 +554,6 @@ public class ReportServiceImpl extends BaseService { ...@@ -553,7 +554,6 @@ public class ReportServiceImpl extends BaseService {
private JournalEntryMapper journalEntryMapper; private JournalEntryMapper journalEntryMapper;
/* @Autowired /* @Autowired
private CitJour*/ private CitJour*/
//数据校验 //数据校验
private void DataValidation(Integer periodParam, String projectId, PeriodJob genJob) { private void DataValidation(Integer periodParam, String projectId, PeriodJob genJob) {
setStatus(genJob,"DA004", STATUS_BEGIN); setStatus(genJob,"DA004", STATUS_BEGIN);
...@@ -590,20 +590,62 @@ public class ReportServiceImpl extends BaseService { ...@@ -590,20 +590,62 @@ public class ReportServiceImpl extends BaseService {
}else{ }else{
map2.put("period", "" + periodParam); map2.put("period", "" + periodParam);
} }
Map<String, Object> map = new HashMap<>();
map.put("period", periodParam);
map.put("projectId", projectId);
Map<String, Object> mapProject = new DataUtil().getProjectById(projectId);
map.put("companyCode", mapProject.get("code"));
map.put("companyName", mapProject.get("name"));
List<JournalEntry> journalEntries = journalEntryMapper.selectNowAdjustData(map2); List<JournalEntry> journalEntries = journalEntryMapper.selectNowAdjustData(map2);
for(int i =0; i< adjustmentTables.size(); i++){ for(int i =0; i< adjustmentTables.size(); i++){
for(int j =0; j< journalEntries.size(); j++){ for(int j =0; j< journalEntries.size(); j++){
if(journalEntries.get(j).getSegment3().equals(adjustmentTables.get(j).getSegment3()) && JournalEntry journalEntry = journalEntries.get(j);
journalEntries.get(j).getSegment5().equals(adjustmentTables.get(j).getSegment5())&& AdjustmentTable adjustmentTable = adjustmentTables.get(j);
journalEntries.get(j).getSegment6().equals(adjustmentTables.get(j).getSegment6()) && journalEntries.get(j).getPeriodJrMinDr() != adjustmentTables.get(j).getPeriodDrMixCr() ){ if(journalEntry.getSegment3().equals(adjustmentTable.getSegment3()) &&
journalEntry.getSegment5().equals(adjustmentTable.getSegment5())&&
journalEntry.getSegment6().equals(adjustmentTable.getSegment6()) && journalEntry.getPeriodJrMinDr() != adjustmentTable.getPeriodDrMixCr() ){
setStatus(genJob,STATUS_ERROR ); setStatus(genJob,STATUS_ERROR );
Constant.ReportDataValidateLog reportDataValidateLog = new Constant.ReportDataValidateLog(journalEntries.get(j).getSegment3(), journalEntries.get(j).getSegment5(), journalEntries.get(j).getSegment6());
//记录校验结果
//
map.put("result", reportDataValidateLog.getResult(false));
map.put("validateResult", "error");
map.put("tmsPeriod", journalEntry.getTmsPeriod());
map.put("organizationId", journalEntry.getOrganizationId());
insertDataValidateResult(map);
periodJobMapper.updateByPrimaryKey(genJob);
return;
} }
} }
} }
setStatus(genJob, STATUS_END); setStatus(genJob, STATUS_END);
map.put("validateResult", "success");
map.put("result", "");
map.put("tmsPeriod", journalEntries.get(0).getTmsPeriod());
map.put("organizationId", journalEntries.get(0).getOrganizationId());
insertDataValidateResult(map);
periodJobMapper.updateByPrimaryKey(genJob); periodJobMapper.updateByPrimaryKey(genJob);
} }
@Autowired
private DataValidateLogMapper dataValidateLogMapper;
public void insertDataValidateResult(Map map){
DataValidateLog dataValidateLog = new DataValidateLog();
dataValidateLog.setCreateTime(new Date());
dataValidateLog.setPeriod((Integer) map.get("period"));
dataValidateLog.setProjectId((String)map.get("projectId"));
dataValidateLog.setValidateResult((String)map.get("validateResult"));
dataValidateLog.setResult((String)map.get("result"));
dataValidateLog.setOrganizationId((String)map.get("organizationId"));
dataValidateLog.setCompanyCode((String)map.get("companyCode"));
dataValidateLog.setCompanyName((String)map.get("companyName"));
dataValidateLog.setTmsPeriod((Integer) map.get("tmsPeriod"));
dataValidateLogMapper.insert(dataValidateLog);
}
public List<CellTemplateReferenceDto> getTemplateReferences(int period) { public List<CellTemplateReferenceDto> getTemplateReferences(int period) {
return new ArrayList<>(); return new ArrayList<>();
......
jdbc_url=jdbc:oracle:thin:@(DESCRIPTION=(ADDRESS=(PROTOCOL = TCP)(HOST = 10.0.1.224)(PORT = 1521))(ADDRESS = (PROTOCOL = TCP)(HOST = 10.0.1.225)(PORT = 1521))(CONNECT_DATA =(SERVER = DEDICATED)(SERVICE_NAME = taxdb))) jdbc_url=jdbc:mysql://172.20.2.218:3300/fintax_test?useUnicode=true&amp;characterEncoding=utf-8&amp;zeroDateTimeBehavior=convertToNull&amp;allowMultiQueries=true&amp;useSSL=false
jdbc_user=tax_admin jdbc_user=fintax_user_test
jdbc_password=taxadmin2018 jdbc_password=Fintaxuser@123Test
#jdbc_password=111111 #jdbc_password=111111
jdbc_admin_db=tax_admin jdbc_admin_db=taxadmin2018
jdbc2_url=jdbc:oracle:thin:@(DESCRIPTION=(ADDRESS=(PROTOCOL = TCP)(HOST = 10.0.1.224)(PORT = 1521))(ADDRESS = (PROTOCOL = TCP)(HOST = 10.0.1.225)(PORT = 1521))(CONNECT_DATA =(SERVER = DEDICATED)(SERVICE_NAME = taxdb))) jdbc2_url=jdbc:oracle:thin:@(DESCRIPTION=(ADDRESS=(PROTOCOL = TCP)(HOST = 10.0.1.224)(PORT = 1521))(ADDRESS = (PROTOCOL = TCP)(HOST = 10.0.1.225)(PORT = 1521))(CONNECT_DATA =(SERVER = DEDICATED)(SERVICE_NAME = taxdb)))
jdbc2_user=pwc_invoice jdbc2_user=pwc_invoice
...@@ -15,7 +15,7 @@ mail_jdbc_url=jdbc:sqlserver://192.168.1.102:1434;DatabaseName=MAILMaster ...@@ -15,7 +15,7 @@ mail_jdbc_url=jdbc:sqlserver://192.168.1.102:1434;DatabaseName=MAILMaster
mail_jdbc_user=sa mail_jdbc_user=sa
mail_jdbc_password=atmsunittestSQL mail_jdbc_password=atmsunittestSQL
web.url=http://dts.erp.didichuxing.com:8080 web.url=http://172.20.201.164:9001
#web.url=* #web.url=*
jwt.base64Secret=TXppQjFlZFBSbnJzMHc0Tg== jwt.base64Secret=TXppQjFlZFBSbnJzMHc0Tg==
jwt.powerToken=xxxx jwt.powerToken=xxxx
...@@ -23,7 +23,7 @@ jwt.expireSecond=180000 ...@@ -23,7 +23,7 @@ jwt.expireSecond=180000
jwt.refreshSecond=600 jwt.refreshSecond=600
#File Server Config #File Server Config
file.server.url=http://etms.longi-silicon.com:9111 file.server.url=http://172.20.201.164:9001
file.server.upload=/api/v1/upload file.server.upload=/api/v1/upload
#upload #upload
...@@ -33,7 +33,7 @@ max_file_length=104857600 ...@@ -33,7 +33,7 @@ max_file_length=104857600
distributed_id_datacenter=10 distributed_id_datacenter=10
distributed_id_machine=15 distributed_id_machine=15
api.url=http://dts.erp.didichuxing.com:8180 api.url=http://172.20.201.164:8180
# Longi config # Longi config
longi_api_basic_user= longi_api_basic_user=
......
...@@ -46,7 +46,7 @@ ...@@ -46,7 +46,7 @@
<property name="ignoreQualifiersAtRuntime" value="true"/> <property name="ignoreQualifiersAtRuntime" value="true"/>
</table>--> </table>-->
<table tableName="bill_detail" domainObjectName="BillDetail"> <table tableName="data_validate_log" domainObjectName="DataValidateLog">
<property name="useActualColumnNames" value="false"/> <property name="useActualColumnNames" value="false"/>
<property name="ignoreQualifiersAtRuntime" value="true"/> <property name="ignoreQualifiersAtRuntime" value="true"/>
</table> </table>
......
...@@ -107,4 +107,6 @@ public interface CitEAMAssetsDisposalMapper extends MyMapper { ...@@ -107,4 +107,6 @@ public interface CitEAMAssetsDisposalMapper extends MyMapper {
int updateByPrimaryKey(CitEAMAssetsDisposal record); int updateByPrimaryKey(CitEAMAssetsDisposal record);
int insertBatch(List<CitEAMAssetsDisposal> citEAMAssetsDisposalList); int insertBatch(List<CitEAMAssetsDisposal> citEAMAssetsDisposalList);
List<CitEAMAssetsDisposal> selectByCondition(@Param("citEAMAssetsDisposal") CitEAMAssetsDisposal citEAMAssetsDisposal);
} }
\ No newline at end of file
package pwc.taxtech.atms.entity; package pwc.taxtech.atms.vat.entity;
import java.io.Serializable; import java.io.Serializable;
import java.util.Date; import java.util.Date;
import pwc.taxtech.atms.entity.BaseEntity;
/** /**
* *
......
This diff is collapsed.
This diff is collapsed.
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