Commit 808cfb09 authored by eddie.woo's avatar eddie.woo

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

parents 0a860f1a 7fc4b237
package pwc.taxtech.atms.common.schedule;
import org.quartz.JobExecutionContext;
import org.quartz.JobExecutionException;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.scheduling.quartz.QuartzJobBean;
import pwc.taxtech.atms.common.util.DateUtils;
import pwc.taxtech.atms.constant.enums.EnumTbImportType;
import pwc.taxtech.atms.dao.OrganizationMapper;
import pwc.taxtech.atms.entity.Organization;
import pwc.taxtech.atms.entity.OrganizationExample;
import pwc.taxtech.atms.service.impl.AnalysisJobServiceImpl;
import pwc.taxtech.atms.service.impl.AnalysisServiceImpl;
import javax.annotation.Resource;
import java.util.List;
public class AnylysisJob extends QuartzJobBean {
private static final Logger logger = LoggerFactory.getLogger(AnylysisJob.class);
@Resource
private OrganizationMapper organizationMapper;
@Value("${org_sync_url}")
private String orgSyncUrl;
@Value("${org_sync_token}")
private String token;
@Autowired
private AnalysisJobServiceImpl analysisJobService;
@Override
protected void executeInternal(JobExecutionContext jobExecutionContext) throws JobExecutionException {
Integer period = DateUtils.getPeriodNow();
OrganizationExample e = new OrganizationExample();
e.createCriteria().andIsActiveEqualTo(true);
List<Organization> orgs = organizationMapper.selectByExample(e);
logger.info(String.format("开始分析%s预期返还税数据",period));
analysisJobService.analysisExpectedTax(orgs,period, EnumTbImportType.CoverImport.getCode());
logger.info(String.format("开始分析%s预期返还税数据",period));
analysisJobService.analysisFee(orgs,period, EnumTbImportType.CoverImport.getCode());
logger.info(String.format("开始分析%s预期返还税数据",period));
analysisJobService.analysisFileManagement(orgs,period, EnumTbImportType.CoverImport.getCode());
logger.info(String.format("开始分析%s预期返还税数据",period));
analysisJobService.analysisMaster(orgs,period, EnumTbImportType.CoverImport.getCode());
logger.info(String.format("开始分析%s预期返还税数据",period));
analysisJobService.analysisSales(orgs,period, EnumTbImportType.CoverImport.getCode());
logger.info(String.format("开始分析%s预期返还税数据",period));
analysisJobService.analysisTaxReturnEnd(orgs,period, EnumTbImportType.CoverImport.getCode());
}
}
package pwc.taxtech.atms.common.util;
import java.math.BigDecimal;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
public class CommonUtil {
......@@ -16,4 +18,21 @@ public class CommonUtil {
v2 = null == v2 ? BigDecimal.ZERO : v2;
return v1.add(v2);
}
public static int getNum(String str){
String regEx="[^0-9]";
Pattern p = Pattern.compile(regEx);
Matcher m = p.matcher(str);
return Integer.valueOf(m.replaceAll("").trim());
}
public static boolean hasDigit(String content) {
boolean flag = false;
Pattern p = Pattern.compile(".*\\d+.*");
Matcher m = p.matcher(content);
if (m.matches()) {
flag = true;
}
return flag;
}
}
......@@ -604,6 +604,17 @@ public class DateUtils {
return newday;
}
public static Integer getNowMonth(){
Calendar cale = Calendar.getInstance();
return cale.get(Calendar.MONTH) + 1;
}
public static Integer getNowYear(){
Calendar cale = Calendar.getInstance();
return cale.get(Calendar.YEAR);
}
/**
* 取得数据库主键 生成格式为yyyymmddhhmmss+k位随机数
*
......
......@@ -48,7 +48,7 @@ public class SpringContextUtil implements ApplicationContextAware {
public static InputInvoiceDao inputInvoiceDao;
public static InputInvoiceMapper inputInvoiceMapper;
public static InputVatInvoiceMapper inputVatInvoiceMapper;
public static AssetsListMapper assetsListMapper;
public static CitAssetsListMapper assetsListMapper;
public static ProjectMapper projectMapper;
public static CellDataSourceMapper cellDataSourceMapper;
public static PeriodCellDataSourceMapper periodCellDataSourceMapper;
......@@ -121,7 +121,7 @@ public class SpringContextUtil implements ApplicationContextAware {
inputVatInvoiceMapper = webApplicationContext.getBean(InputVatInvoiceMapper.class);
inputInvoiceDao = webApplicationContext.getBean(InputInvoiceDao.class);
inputInvoiceMapper = webApplicationContext.getBean(InputInvoiceMapper.class);
assetsListMapper = webApplicationContext.getBean(AssetsListMapper.class);
assetsListMapper = webApplicationContext.getBean(CitAssetsListMapper.class);
projectMapper = webApplicationContext.getBean(ProjectMapper.class);
cellDataSourceMapper = webApplicationContext.getBean(CellDataSourceMapper.class);
periodCellDataSourceMapper = webApplicationContext.getBean(PeriodCellDataSourceMapper.class);
......
package pwc.taxtech.atms.constant.enums;
public enum EnumAnalysisImportType {
TaxData(0,"各税种税额 _所属期间_模版"),
ReturnTaxData(1,"实际返还税额 _所属期间_模版"),
GMVSubsidy(2,"業務線_所属期间_模版"),
EmployeeNum(3,"职工人数_所属期间_模版"),
DriverNum(4,"司機人數_所属期间_模版"),
InternationalBuData(100,"国际税业务数据_国家_公司_所属期间_模版"),
InternationalTaxData(101,"国际税税务数据_国家_公司_所属期间_模版");
TaxData(0,"各税种税额"),
ReturnTaxData(1,"实际返还税额"),
GMVSubsidy(2,"业务线"),
EmployeeNum(3,"职工人数"),
DriverNum(4,"司机人数"),
InternationalBuData(100,"国际税业务数据"),
InternationalTaxData(101,"国际税税务数据");
private Integer code;
......
......@@ -12,7 +12,8 @@ public enum FormulaDataSourceDetailType {
AssetDetailDataSourceDto(5, pwc.taxtech.atms.dto.vatdto.AssetDetailDataSourceDto.class),
ReportCellDataSourceDto(6, pwc.taxtech.atms.dto.vatdto.ReportCellDataSourceDto.class),
ReportCellTableSUMIFDataSourceDto(7,ReportCellTableSUMIFDataSourceDto.class);
ReportCellTableSUMIFDataSourceDto(7,ReportCellTableSUMIFDataSourceDto.class),
TaxCellDataSourceDto(60, pwc.taxtech.atms.dto.vatdto.TaxCellDataSourceDto.class),;
private Integer code;
private Class clas;
......
package pwc.taxtech.atms;
package pwc.taxtech.atms.controller;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
......@@ -31,10 +31,10 @@ public class AnalysisController extends BaseController {
private AnalysisServiceImpl analysisServiceImpl;
@ResponseBody
@RequestMapping(value = "displayAnalysisImportData", method = RequestMethod.GET)
public ApiResultDto displayAnalysisImportData(@RequestParam Integer type, @RequestParam String period) {
@RequestMapping(value = "displayAnalysisImportData", method = RequestMethod.POST)
public ApiResultDto displayAnalysisImportData(@RequestBody AnalysisDomesticlParam param) {
try{
return ApiResultDto.success(analysisServiceImpl.displayAnalysisImportData(type,period));
return ApiResultDto.success(analysisServiceImpl.displayAnalysisImportData(param));
}catch (Exception e){
return ApiResultDto.fail();
}
......@@ -79,13 +79,13 @@ public class AnalysisController extends BaseController {
@ResponseBody
@RequestMapping(value = "DomesitcExcelFile", method = RequestMethod.POST)
public OperationResultDto importDomesitcExcelFile(@RequestParam MultipartFile file, @RequestParam String period, @RequestParam Integer type) {
public OperationResultDto importDomesitcExcelFile(@RequestParam MultipartFile file, @RequestParam String period, @RequestParam Integer type,@RequestParam String companyName) {
try {
String valMsg = valParameter(file,period,type);
if(StringUtils.isNotEmpty(valMsg)){
return OperationResultDto.error(valMsg);
}
return analysisServiceImpl.importDomesitcExcelFile(file,period, type);
return analysisServiceImpl.importDomesitcExcelFile(file,period, type,companyName);
} catch (ServiceException e) {
return OperationResultDto.error(e.getMessage());
} catch (Exception e) {
......
package pwc.taxtech.atms.controller;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.MediaType;
import org.springframework.jdbc.core.JdbcTemplate;
......@@ -8,22 +9,20 @@ import org.springframework.web.bind.annotation.*;
import pwc.taxtech.atms.dao.CitJournalEntryAdjustMapper;
import pwc.taxtech.atms.dao.CitTbamMapper;
import pwc.taxtech.atms.dao.OperationLogEntryLogMapper;
import pwc.taxtech.atms.dpo.CitTbamDto;
import pwc.taxtech.atms.dto.CitTbamDto;
import pwc.taxtech.atms.dto.OperationResultDto;
import pwc.taxtech.atms.entity.CitJournalEntryAdjust;
import pwc.taxtech.atms.entity.CitTbam;
import pwc.taxtech.atms.entity.OperationLogEntryLog;
import pwc.taxtech.atms.entity.OperationLogEntryLogExample;
import pwc.taxtech.atms.service.impl.DistributedIdService;
import pwc.taxtech.atms.vat.dao.JournalEntryMapper;
import pwc.taxtech.atms.vat.dao.PeriodFormulaBlockMapper;
import pwc.taxtech.atms.vat.entity.CellComment;
import pwc.taxtech.atms.vat.entity.PeriodCellComment;
import pwc.taxtech.atms.vat.entity.PeriodFormulaBlock;
import pwc.taxtech.atms.vat.service.impl.CellCommentServiceImpl;
import java.lang.reflect.InvocationTargetException;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import java.util.Optional;
@RestController
......@@ -40,6 +39,7 @@ public class CellCommentController {
}
return cellCommentService.getCellComments(cellDataId, projectId);
}
@Autowired
private CitTbamMapper citTbamMapper;
@Autowired
......@@ -49,26 +49,34 @@ public class CellCommentController {
private JdbcTemplate jdbcTemplate;
//通过sql获取展示表格展示数据
@RequestMapping(value = "getCellInformation")
public OperationResultDto getCellInformation(String sql){
@RequestMapping(value = "getCellInformation")
public OperationResultDto getCellInformation(String sql) {
OperationResultDto operationResultDto = new OperationResultDto();
int from = sql.indexOf("from");
sql = sql.substring(from);
operationResultDto.setData(citTbamMapper.selectBySql(sql));
List<CitTbam> citTbams = citTbamMapper.selectBySql(sql);
List<CitTbamDto> citTbamDtos = new ArrayList<>();
for (CitTbam citTbam : citTbams) {
CitTbamDto citTbamDto = new CitTbamDto();
BeanUtils.copyProperties(citTbam, citTbamDto);
citTbamDtos.add(citTbamDto);
}
operationResultDto.setData(citTbamDtos);
operationResultDto.setResultMsg("success");
return operationResultDto;
return operationResultDto;
}
//加载分录表格数据
@RequestMapping("loadEntryListDataList")
public OperationResultDto loadEntryListDataList(String code){
public OperationResultDto loadEntryListDataList(String code) {
OperationResultDto operationResultDto = new OperationResultDto();
CitJournalEntryAdjust citJournalEntryAdjust = new CitJournalEntryAdjust();
citJournalEntryAdjust.setSubjectCode(code);
List<CitJournalEntryAdjust> journalMerge = citJournalEntryAdjustMapper.getJournalMerge(citJournalEntryAdjust);
operationResultDto.setData(journalMerge);
operationResultDto.setResultMsg("success");
return operationResultDto;
return operationResultDto;
}
@Autowired
......@@ -78,21 +86,25 @@ public class CellCommentController {
private OperationLogEntryLogMapper operationLogEntryLogMapper;
@Autowired
private DistributedIdService distributedIdService;
//更新调整后金额
@RequestMapping("updateAdjust")
public OperationResultDto updateAdjust(@RequestBody CitTbam[] citTbams){
@RequestMapping(value = "updateAdjust", method = RequestMethod.POST,
produces = MediaType.APPLICATION_JSON_UTF8_VALUE)
public OperationResultDto updateAdjust(@RequestBody List<CitTbamDto> citTbams) {
OperationResultDto operationResultDto = new OperationResultDto();
CitTbam citTbam = new CitTbam();
for(CitTbam citTbam1 : citTbams){
citTbam.setId(citTbam1.getId());
citTbamMapper.updateByPrimaryKey(citTbam);
for (CitTbamDto citTbamDto : citTbams) {
BeanUtils.copyProperties(citTbamDto, citTbam);
citTbam.setId(citTbam.getId());
citTbam.setAdjustAccount(citTbam.getAdjustAccount());
citTbamMapper.updateByPrimaryKeySelective(citTbam);
}
operationResultDto.setResultMsg("success");
return operationResultDto;
}
@RequestMapping("selectEntryLog")
public OperationResultDto selectEntryLog(String code){
public OperationResultDto selectEntryLog(String code) {
OperationResultDto operationResultDto = new OperationResultDto();
OperationLogEntryLogExample operationLogEntryLogExample = new OperationLogEntryLogExample();
OperationLogEntryLogExample.Criteria criteria = operationLogEntryLogExample.createCriteria();
......@@ -105,8 +117,9 @@ public class CellCommentController {
* 添加日志
*/
@RequestMapping("addLog")
public OperationResultDto addLog(@RequestBody OperationLogEntryLog[] operationLogEntryLogs ){
for(OperationLogEntryLog operationLogEntryLog : operationLogEntryLogs){
public OperationResultDto addLog(@RequestBody List<OperationLogEntryLog> operationLogEntryLogs) {
for (OperationLogEntryLog operationLogEntryLog : operationLogEntryLogs) {
operationLogEntryLog.setMyId(distributedIdService.nextId());
operationLogEntryLogMapper.insert(operationLogEntryLog);
}
OperationResultDto<Object> objectOperationResultDto = new OperationResultDto<>();
......
......@@ -6,6 +6,7 @@ import org.springframework.util.CollectionUtils;
import org.springframework.web.bind.annotation.*;
import pwc.taxtech.atms.constant.enums.EnumApiCodeMsg;
import pwc.taxtech.atms.dto.ApiResultDto;
import pwc.taxtech.atms.dto.OperationResultDto;
import pwc.taxtech.atms.dto.ebsdto.*;
import pwc.taxtech.atms.service.EbsApiService;
......@@ -236,6 +237,12 @@ public class EbsApiController {
}
}
@RequestMapping(value = "syncOrg", method = RequestMethod.GET)
public @ResponseBody
OperationResultDto syncOrg() {
return ebsApiService.syncOrg();
}
private void setApiResult(ApiResultDto apiResultDto, EnumApiCodeMsg error) {
apiResultDto.setCode(error.getCode());
apiResultDto.setMessage(error.getMsg());
......
......@@ -91,22 +91,25 @@ public class OperationLogFileTypeController {
@RequestMapping("exportExcel")
@ResponseBody
public void exportExcelFile (HttpServletResponse response){
// public ReturnData selectListForLog(@RequestBody OperationLogFileType operationLogFileType){
try {
Map<String, String> headers = new HashMap<String, String>();
headers.put("id", "id");
headers.put("operation_content", "操作内容");
headers.put("module_name", "模块名称");
headers.put("operation_object", "操作对象");
// headers.put("operation_content", "操作内容");
// headers.put("module_name", "模块名称");
// headers.put("operation_object", "操作对象");
headers.put("operation_action", "操作action");
headers.put("original_state", "原始状态");
headers.put("update_state", "更新状态");
// headers.put("original_state", "原始状态");
// headers.put("update_state", "更新状态");
headers.put("update_state", "操作内容");
headers.put("operation_user", "操作者");
headers.put("ip", "操作ip");
headers.put("comment", "内容");
headers.put("create_time", "创建时间");
List<OperationLogFileType> fileTypes = operationLogFileTypeService.selectFileTypesList();
// List<OperationLogFileType> operationLogFileTypes = operationLogFileTypeService.selectListForLog(operationLogFileType.getFileTypeIds());
response.setContentType("multipart/form-data");
response.setHeader("Content-Disposition", "attachment;fileName=" + new String("".getBytes("GB2312"), "ISO-8859-1"));
response.setHeader("Content-Disposition", "attachment;fileName=" + new String("档案类型日志".getBytes("GB2312"), "ISO-8859-1"));
OutputStream ouputStream = response.getOutputStream();
ExcelUtil.exportExcel(headers, fileTypes, ouputStream);
}catch(Exception e){
......
......@@ -71,23 +71,26 @@ public class OperationLogTaxDocController {
@RequestMapping("exportExcel")
@ResponseBody
// public void exportExcelFile(HttpServletResponse response, @RequestBody OperationLogTaxDocument operationLogTaxDocument) {
public void exportExcelFile(HttpServletResponse response) {
try {
Map<String, String> headers = new HashMap<String, String>();
headers.put("id", "id");
headers.put("operation_content", "操作内容");
headers.put("module_name", "模块名称");
headers.put("operation_object", "操作对象");
// headers.put("operation_content", "操作内容");
// headers.put("module_name", "模块名称");
// headers.put("operation_object", "操作对象");
headers.put("operation_action", "操作action");
headers.put("original_state", "原始状态");
headers.put("update_state", "更新状态");
// headers.put("original_state", "原始状态");
// headers.put("update_state", "更新状态");
headers.put("update_state", "操作内容");
headers.put("operation_user", "操作者");
headers.put("ip", "操作ip");
headers.put("comment", "内容");
headers.put("create_time", "创建时间");
List<OperationLogTaxDocument> TaxDocuments = operationLogTaxDocService.selectTaxDocumentList();
// List<String> ids = operationLogTaxDocument.getIds() == null ? Lists.newArrayList() : operationLogTaxDocument.getIds();
response.setContentType("multipart/form-data");
response.setHeader("Content-Disposition", "attachment;fileName=" + new String("".getBytes("GB2312"), "ISO-8859-1"));
response.setHeader("Content-Disposition", "attachment;fileName=" + new String("档案列表日志".getBytes("GB2312"), "ISO-8859-1"));
OutputStream ouputStream = response.getOutputStream();
ExcelUtil.exportExcel(headers, TaxDocuments, ouputStream);
} catch (Exception e) {
......
This diff is collapsed.
......@@ -620,6 +620,8 @@ public class OrganizationExtraDto implements Serializable {
*/
private String auditRequirements;
private String architectureType;
/**
* This field was generated by MyBatis Generator.
* This field corresponds to the database table organization_extra
......@@ -1948,6 +1950,14 @@ public class OrganizationExtraDto implements Serializable {
this.auditRequirements = auditRequirements == null ? null : auditRequirements.trim();
}
public String getArchitectureType() {
return architectureType;
}
public void setArchitectureType(String architectureType) {
this.architectureType = architectureType;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table organization_extra
......
package pwc.taxtech.atms.dto.vatdto;
import pwc.taxtech.atms.constant.DataSourceName;
import pwc.taxtech.atms.constant.enums.FormulaDataSourceType;
import pwc.taxtech.atms.dpo.CellTemplatePerGroupDto;
import pwc.taxtech.atms.vat.entity.PeriodCellData;
import java.math.BigDecimal;
public class TaxCellDataSourceDto extends DataSourceDto {
private String tag = "";
private String name;
private Integer year;
private Integer period;
private Integer columnIndex;
private String columnName;
private Integer rowIndex;
private String rowName;
private String reportTemplateId;
private String reportName;
private String cellDataId;
private String cellTemplateId;
private Boolean isOnlyManualInput;
private Integer type;
private Integer resultType;
private BigDecimal amount;
public TaxCellDataSourceDto() {
this.type = FormulaDataSourceType.Report.getCode();
}
public void extractFromGroup(WPNAMEParasBo parasBo, Integer period, Integer year,
CellTemplatePerGroupDto cellTemplateData) {
this.tag = "WPNAME";
this.name = DataSourceName.ReportDataSource;
this.year = year;
this.period = period;
this.columnIndex = cellTemplateData.getColumnIndex();
this.columnName = cellTemplateData.getColumnName();
this.rowIndex = cellTemplateData.getRowIndex();
this.rowName = cellTemplateData.getRowName();
this.reportTemplateId = cellTemplateData.getReportTemplateId();
this.cellTemplateId = cellTemplateData.getCellTemplateId() + "";
this.resultType = cellTemplateData.getResultType();
this.isOnlyManualInput = false;
this.reportName = parasBo.getReportCode();
}
public void extractFromGroup(WPTYPEParasBo parasBo, Integer period, Integer year,
CellTemplatePerGroupDto cellTemplateData) {
this.tag = "WPTYPE";
this.name = DataSourceName.ReportDataSource;
this.year = year;
this.period = period;
this.columnIndex = cellTemplateData.getColumnIndex();
this.columnName = cellTemplateData.getColumnName();
this.rowIndex = cellTemplateData.getRowIndex();
this.rowName = cellTemplateData.getRowName();
this.reportTemplateId = cellTemplateData.getReportTemplateId();
this.cellTemplateId = cellTemplateData.getCellTemplateId() + "";
this.resultType = cellTemplateData.getResultType();
this.isOnlyManualInput = false;
this.reportName = parasBo.getReportCode();
}
public static TaxCellDataSourceDto nullDataSource(BBParasBo bbParasBo, CurrentPeriodBo currentPeriodBo) {
TaxCellDataSourceDto nulDataSource = new TaxCellDataSourceDto();
nulDataSource.name = DataSourceName.ReportDataSource;
nulDataSource.reportTemplateId = bbParasBo.getReportCode();
nulDataSource.year = currentPeriodBo.curYear;
nulDataSource.period = currentPeriodBo.getCurPeriod();
nulDataSource.columnIndex = bbParasBo.getColumnIndex() - 1;
nulDataSource.rowIndex = bbParasBo.getRowIndex() - 1;
nulDataSource.isOnlyManualInput = false;
nulDataSource.reportName = bbParasBo.getReportCode();
return nulDataSource;
}
public void extractFromGroup(BBParasBo bbParasBo, CurrentPeriodBo currentPeriodBo,
PeriodCellData cellData, CellTemplatePerGroupDto cellTemplateData) {
this.name = DataSourceName.ReportDataSource;
this.year = currentPeriodBo.curYear;
this.period = currentPeriodBo.curPeriod;
this.columnIndex = bbParasBo.getColumnIndex() - 1;
this.columnName = cellTemplateData.getColumnName();
this.rowIndex = bbParasBo.getRowIndex() - 1;
this.rowName = cellTemplateData.getRowName();
this.reportTemplateId = cellTemplateData.getReportTemplateId();
this.cellDataId = cellData.getId() + "";
this.cellTemplateId = cellData.getCellTemplateId() + "";
this.resultType = cellTemplateData.getResultType();
this.isOnlyManualInput = false;
this.reportName = bbParasBo.getReportCode();
}
public void extractFromGroup(BBParasBo bbParasBo, Integer period, Integer year,
CellTemplatePerGroupDto cellTemplateData) {
this.name = DataSourceName.ReportDataSource;
this.year = year;
this.period = period;
this.columnIndex = bbParasBo.getColumnIndex() - 1;
this.columnName = cellTemplateData.getColumnName();
this.rowIndex = bbParasBo.getRowIndex() - 1;
this.rowName = cellTemplateData.getRowName();
this.reportTemplateId = cellTemplateData.getReportTemplateId();
this.cellTemplateId = cellTemplateData.getCellTemplateId() + "";
this.resultType = cellTemplateData.getResultType();
this.isOnlyManualInput = false;
this.reportName = bbParasBo.getReportCode();
}
public void fixedWithGroup(CellTemplatePerGroupDto dto) {
cellTemplateId = dto.getCellTemplateId();
rowName = dto.getRowName();
columnName = dto.getColumnName();
reportTemplateId = dto.getReportTemplateId();
resultType = dto.getResultType();
}
public String getTag() {
return this.tag;
}
public void setTag(String tag) {
this.tag = tag;
}
@Override
public String getName() {
return this.name;
}
@Override
public void setName(String name) {
this.name = name;
}
@Override
public Integer getYear() {
return this.year;
}
@Override
public void setYear(Integer year) {
this.year = year;
}
@Override
public Integer getPeriod() {
return this.period;
}
@Override
public void setPeriod(Integer period) {
this.period = period;
}
@Override
public Integer getColumnIndex() {
return this.columnIndex;
}
@Override
public void setColumnIndex(Integer columnIndex) {
this.columnIndex = columnIndex;
}
@Override
public String getColumnName() {
return this.columnName;
}
@Override
public void setColumnName(String columnName) {
this.columnName = columnName;
}
@Override
public Integer getRowIndex() {
return this.rowIndex;
}
@Override
public void setRowIndex(Integer rowIndex) {
this.rowIndex = rowIndex;
}
@Override
public String getRowName() {
return this.rowName;
}
@Override
public void setRowName(String rowName) {
this.rowName = rowName;
}
@Override
public String getReportTemplateId() {
return this.reportTemplateId;
}
@Override
public void setReportTemplateId(String reportTemplateId) {
this.reportTemplateId = reportTemplateId;
}
public String getReportName() {
return this.reportName;
}
public void setReportName(String reportName) {
this.reportName = reportName;
}
@Override
public String getCellDataId() {
return this.cellDataId;
}
@Override
public void setCellDataId(String cellDataId) {
this.cellDataId = cellDataId;
}
@Override
public String getCellTemplateId() {
return this.cellTemplateId;
}
@Override
public void setCellTemplateId(String cellTemplateId) {
this.cellTemplateId = cellTemplateId;
}
public Boolean getIsOnlyManualInput() {
return this.isOnlyManualInput;
}
public void setIsOnlyManualInput(Boolean onlyManualInput) {
this.isOnlyManualInput = onlyManualInput;
}
@Override
public Integer getType() {
return this.type;
}
@Override
public void setType(Integer type) {
this.type = type;
}
@Override
public Integer getResultType() {
return this.resultType;
}
@Override
public void setResultType(Integer resultType) {
this.resultType = resultType;
}
@Override
public BigDecimal getAmount() {
return this.amount;
}
@Override
public void setAmount(BigDecimal amount) {
this.amount = amount;
}
}
package pwc.taxtech.atms.security.dd;
import org.apache.commons.codec.binary.Base64;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Value;
import pwc.taxtech.atms.exception.ServiceException;
import pwc.taxtech.atms.service.impl.ProjectServiceImpl;
import sun.misc.BASE64Decoder;
import sun.misc.BASE64Encoder;
//import org.apache.tomcat.util.codec.binary.Base64;
import javax.crypto.Cipher;
import java.security.KeyFactory;
import java.security.PublicKey;
import java.security.spec.X509EncodedKeySpec;
import java.text.DateFormat;
import java.text.SimpleDateFormat;
import java.util.Calendar;
import java.util.Date;
import java.util.TimeZone;
/**
* @Auther: Gary J Li
* @Date: 20/03/2019 20:41
* @Description:
*/
public class DtsTokenService {
private static final Logger logger = LoggerFactory.getLogger(ProjectServiceImpl.class);
private static String PUBKEY;
@Value("${dd_pubkey}")
public void setDriver(String pubkey) {
PUBKEY= pubkey;
}
public static final String KEY_ALGORITHM = "RSA";
private static final String PUBLIC_KEY = "RSAPublicKey";
private static final String PRIVATE_KEY = "RSAPrivateKey";
private static final int KEY_SIZE = 512;
/**
* 生成加密token
* @return
* @throws
*/
public String encryptInput(){
String pubKey = PUBKEY;
BASE64Encoder base64 = new BASE64Encoder();
BASE64Decoder base64Decoder = new BASE64Decoder();
byte[] encodeData;
try {
byte[] publicKey = base64Decoder.decodeBuffer(pubKey);
String nonce = generateNonce();
String sDate = generateDate();
long rNum = generateRandomNumber();
String inputStr1 = sDate + "@@" + "DTS" + "@@" + nonce+rNum;
byte[] data1 = inputStr1.getBytes();
logger.info("原文:" + inputStr1);
encodeData = encryptByPublicKey(data1, publicKey);
logger.info("公钥加密后:" + base64.encode(encodeData));
} catch (Exception ex) {
throw new ServiceException("cus" + ex);
}
return base64.encode(encodeData);
}
private String generateNonce() throws Exception {
String dateTimeString = Long.toString(System.currentTimeMillis());
byte[] nonceByte = dateTimeString.getBytes();
return Base64.encodeBase64String(nonceByte);
}
private String generateDate() throws Exception {
DateFormat dateFormatter = new SimpleDateFormat("yyyy-MM-dd");
dateFormatter.setTimeZone(TimeZone.getTimeZone("UTC"));
Date today = Calendar.getInstance().getTime();
String created = dateFormatter.format(today);
return created;
}
private long generateRandomNumber() throws Exception {
final double d = Math.random();
final long num = (int)(d*100000000000000L);
return num;
}
private byte[] encryptByPublicKey(byte[] data, byte[] key) throws Exception {
X509EncodedKeySpec x509KeySpec = new X509EncodedKeySpec(key);
KeyFactory keyFactory = KeyFactory.getInstance(KEY_ALGORITHM);
PublicKey publicKey = keyFactory.generatePublic(x509KeySpec);
Cipher cipher = Cipher.getInstance(keyFactory.getAlgorithm());
cipher.init(Cipher.ENCRYPT_MODE, publicKey);
return cipher.doFinal(data);
}
}
package pwc.taxtech.atms.service;
import pwc.taxtech.atms.dto.OperationResultDto;
import pwc.taxtech.atms.dto.ebsdto.*;
import java.util.List;
......@@ -74,4 +75,10 @@ public interface EbsApiService {
* @param ebsCallBackDto
*/
void changeCallBackStatus(EbsCallBackDto ebsCallBackDto);
/**
* ebs 触发同步机构信息
* @param
*/
OperationResultDto syncOrg();
}
......@@ -225,7 +225,7 @@ public class AssetListServiceImpl extends BaseService {
importResult.setResultMsg("行数据为空或格式错误!");
}
//目前没有进行税法分类,标注状态
citAsset.setStatus(0);
// citAsset.setStatus(0);
citAssetsLists.add(citAsset);
}
......@@ -332,11 +332,15 @@ public class AssetListServiceImpl extends BaseService {
.filter(groupResult -> groupResult.getAssetName().equals(citAsset.getAssetGroupName())).collect(Collectors.toList());
//通过判断过滤后的集合来确认是否已经对该资产类别进行过分类
if(groupResults != null && groupResults.size()>0){
//目前已经进行税法分类,标注状态
citAsset.setStatus(1);
AssetDetailGroup assetDetailGroup = selectAssetDetailGroup(groupResults.get(0).getAssetDetailGroupId());
// Integer assetGroupType = selectAssetDetailGroup(groupResults.get(0).getAssetDetailGroupId()).getAssetGroupType();
//进行税务的计算
setCitAssetTaxData(citAsset,groupResults.get(0),assetDetailGroup);
}else{
//目前没有进行税法分类,标注状态
citAsset.setStatus(0);
//没有进行过分类,放入Set集合里面
assetNameSet.add(assetName);
}
......@@ -411,6 +415,7 @@ public class AssetListServiceImpl extends BaseService {
Calendar cal = Calendar.getInstance();
//设置税法分类
citAsset.setTaxGroupName(assetDetailGroup.getDetailGroupName());
citAsset.setAssetDetailGroupId(assetDetailGroup.getId());
Integer assetGroupType = assetDetailGroup.getAssetGroupType();
//获取税务折旧期限,此值根据分类查数据库带出的值不在此进行操作
citAsset.setTaxDepreciationPeriod(assetGroupResult.getTaxDepreciationPeriod());
......
......@@ -61,7 +61,7 @@ import static pwc.taxtech.atms.dto.vatdto.WrapPeriodJobDto.*;
public class CitReportServiceImpl extends BaseService {
private final static Logger logger = LoggerFactory.getLogger(CitReportServiceImpl.class);
private final static String[] functions = {"SGSR", "FSJZ", "ND", "BB", "XXFP", "GZSD", "PC", "JXFPMX",
"JXFP", "PSUM", "DFFS", "JFFS", "WPSR", "WPNAME", "WPTYPE", "SUM2", "RSUMIF", "QMYE"};
"JXFP", "PSUM", "DFFS", "JFFS", "WPSR", "WPNAME", "WPTYPE", "SUM2", "RSUMIF", "QMYE", "ZC"};
@Autowired
private OrganizationServiceTemplateGroupMapper orgServiceTemplateGroupMapper;
......@@ -197,7 +197,7 @@ public class CitReportServiceImpl extends BaseService {
Workbook workbook = reportGenerator.createWorkBookByPeriodTemplate(resources.getPeriodTemplates(), genJob);
reportGenerator.addFunctionsAndContext(workbook, functions, reportGenerator.initContext(resources, periodParam));
reportGenerator.addCitFunctionsAndContext(workbook, functions, reportGenerator.initContext(resources, periodParam));
reportGenerator.setConfigAndDataToWorkBook(workbook, resources);
FormulaEvaluator evaluator = workbook.getCreationHelper().createFormulaEvaluator();
......
package pwc.taxtech.atms.service.impl;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONObject;
import com.google.common.collect.Lists;
import org.apache.commons.lang3.StringUtils;
import org.nutz.lang.Lang;
import org.nutz.lang.Strings;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Service;
import pwc.taxtech.atms.common.util.BeanUtil;
import pwc.taxtech.atms.common.util.HttpUtil;
import pwc.taxtech.atms.dao.*;
import pwc.taxtech.atms.dto.OperationResultDto;
import pwc.taxtech.atms.dto.ebsdto.*;
import pwc.taxtech.atms.dto.organization.DDSyncOrgInfo;
import pwc.taxtech.atms.dto.organization.OrgSyncData;
import pwc.taxtech.atms.entity.*;
import pwc.taxtech.atms.service.EbsApiService;
import pwc.taxtech.atms.vat.dao.*;
......@@ -20,10 +27,7 @@ import java.math.BigDecimal;
import java.math.RoundingMode;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.List;
import java.util.Optional;
import java.util.UUID;
import java.util.*;
@Service
public class EbsApiServiceImpl implements EbsApiService {
......@@ -64,12 +68,19 @@ public class EbsApiServiceImpl implements EbsApiService {
private OrganizationExtraMapper organizationExtraMapper;
@Resource
private DataImportLogMapper dataImportLogMapper;
@Resource
private RegionMapper regionMapper;
@Resource
private DistributedIdService distributedIdService;
@Resource
private BeanUtil beanUtil;
@Value("${org_sync_url}")
private String orgSyncUrl;
@Value("${org_sync_token}")
private String token;
private static final Logger logger = LoggerFactory.getLogger(EbsApiServiceImpl.class);
@Override
......@@ -870,6 +881,59 @@ public class EbsApiServiceImpl implements EbsApiService {
}
}
@Override
public OperationResultDto syncOrg() {
Map<String, String> headers = new HashMap<>();
headers.put("token", token);
headers.put("Content-Type", "application/x-www-form-urlencoded");
headers.put("Idap", "eddie.wu_v");
int pageSize = 1;
List<OrgSyncData> failObjs = Lists.newArrayList();
int totalCount = 0;
int success = 0;
try {
for (int i = 1; i <= pageSize; i++) {
String response = HttpUtil.get(orgSyncUrl + "?currentPage=" + i, headers);
logger.info("机构信息同步记录:" + response);
DDSyncOrgInfo ddSyncOrgInfo = JSONObject.parseObject(response, DDSyncOrgInfo.class);
pageSize = ddSyncOrgInfo.getTotalPage();
totalCount = ddSyncOrgInfo.getTotalCount();
List<OrgSyncData> orgSyncDatas = ddSyncOrgInfo.getData();
for (OrgSyncData osd : orgSyncDatas) {
OrganizationExample example = new OrganizationExample();
example.createCriteria().andNameEqualTo(osd.getNameCN());
Organization o = new Organization();
o.setClientCode(osd.getCode());
o.setCode(osd.getCode());
o.setEnterpriseAccountCode(String.valueOf(osd.getSobId()));
o.setEnterpriseAccountName(osd.getSobName());
o.setCurrencyCode(osd.getCurrencyCode());
o.setLegalEntity(osd.getLegalEntity());
o.setLegalPersonName(osd.getLegalRepresentative());
o.setAddress(osd.getAddress());
o.setCreateTime(osd.getGmtCreate());
o.setUpdateTime(osd.getGmtModified());
o.setPsCode(osd.getPsCode());
RegionExample regionExample = new RegionExample();
regionExample.createCriteria().andShortNameEqualTo(osd.getCompanyLocation());
List<Region> regions = regionMapper.selectByExample(regionExample);
if (regions.size() > 0) {
o.setRegionId(regions.get(0).getId());
}
if (organizationMapper.countByExample(example) < 1) {
failObjs.add(osd);
}
success += organizationMapper.updateByExampleSelective(o, example);
}
}
logger.info("同步未匹配的机构记录:"+ JSON.toJSONString(failObjs));
} catch (Exception e) {
logger.error(String.format("机构信息同步异常:[%s]", e.getMessage()), e);
}
String msg = String.format("主数据中共[%s]条记录;成功匹配[%s]条;未匹配内容为[%s]",totalCount,success,JSON.toJSONString(failObjs));
return OperationResultDto.success(msg);
}
/**
* 获取操作人信息
* @param id
......
......@@ -7,14 +7,14 @@ import pwc.taxtech.atms.common.OperateLogType;
import pwc.taxtech.atms.common.OperationAction;
import pwc.taxtech.atms.common.OperationModule;
import pwc.taxtech.atms.common.message.LogMessage;
import pwc.taxtech.atms.common.util.CommonUtil;
import pwc.taxtech.atms.dao.EquityInformationHistoryMapper;
import pwc.taxtech.atms.dao.EquityInformationMapper;
import pwc.taxtech.atms.dao.OrganizationMapper;
import pwc.taxtech.atms.dto.equity.EquityInfoDto;
import pwc.taxtech.atms.dto.OperationLogDto;
import pwc.taxtech.atms.dto.OperationResultDto;
import pwc.taxtech.atms.entity.EquityInformation;
import pwc.taxtech.atms.entity.EquityInformationExample;
import pwc.taxtech.atms.entity.OperationLogBasicData;
import pwc.taxtech.atms.entity.*;
import pwc.taxtech.atms.exception.ApplicationException;
import javax.annotation.Resource;
......@@ -31,9 +31,13 @@ public class EquityServiceImpl extends BaseService{
@Resource
private EquityInformationMapper equityInformationMapper;
@Resource
private EquityInformationHistoryMapper equityInformationHistoryMapper;
@Resource
private OrganizationMapper organizationMapper;
public List<EquityInfoDto> getEquityListByOrgId(String orgId) {
List<EquityInfoDto> equityInfoDtos = new ArrayList<>();
try {
......@@ -166,6 +170,9 @@ public class EquityServiceImpl extends BaseService{
// remark-1 无股权记录时,初始变更为新增
String orgId = equityInfoDtos.get(0).getOrganizationId();
Organization org = organizationMapper.selectByPrimaryKey(orgId);
List<EquityInformation> oldData = null;
if (null != oldId) {
// 1、根据id(原始)查出旧数据 equity_infomation
......@@ -187,6 +194,11 @@ public class EquityServiceImpl extends BaseService{
BeanUtils.copyProperties(equityInfoDto, newData);
newData.setId(newId);
newData.seteNum(i);
float investRadio = 0L;
if(CommonUtil.hasDigit(org.getRegistrationCapital())&&null!=newData.getInvestmentAmount()){
investRadio = (float)newData.getInvestmentAmount()/(float)CommonUtil.getNum(org.getRegistrationCapital());
}
newData.setInvestmentRadio(investRadio);
newData.setOrganizationId(orgId);
Date now = new Date();
newData.setCreateTime(now);
......
......@@ -51,6 +51,7 @@ public class FileTypesServiceImpl {
requiredFieldFormatToJson(fileTypes);
//设置当前时间 当前创建人信息
fileTypes.setCreateTime(new Date());
fileTypes.setUpdateTime(new Date());
fileTypes.setCreator(authUserHelper.getCurrentAuditor().get());
fileTypes.setCreatorId(authUserHelper.getCurrentUserId());
int num = fileTypesMapper.insert(fileTypes);
......
package pwc.taxtech.atms.service.impl;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONObject;
import com.google.common.collect.Lists;
import com.mysql.jdbc.exceptions.jdbc4.MySQLIntegrityConstraintViolationException;
import org.apache.commons.collections.CollectionUtils;
......@@ -13,6 +14,7 @@ import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.dao.DuplicateKeyException;
import org.springframework.stereotype.Service;
import org.springframework.transaction.interceptor.TransactionAspectSupport;
......@@ -28,6 +30,7 @@ import pwc.taxtech.atms.common.message.EnterpriseAccountSetOrgMessage;
import pwc.taxtech.atms.common.message.LogMessage;
import pwc.taxtech.atms.common.message.OrganizationMessage;
import pwc.taxtech.atms.common.util.BeanUtil;
import pwc.taxtech.atms.common.util.HttpUtil;
import pwc.taxtech.atms.constant.*;
import pwc.taxtech.atms.dao.*;
import pwc.taxtech.atms.dpo.*;
......
......@@ -144,13 +144,13 @@ public class OrganizationStructureServiceImpl {
OrganizationStructureExample example = new OrganizationStructureExample();
example.createCriteria().andIdNotEqualTo(organizationStructureDto.getId());
boolean nameNotExist = organizationStructureMapper.countByExample(example) < 1;
example.createCriteria().andIdNotEqualTo(organizationStructureDto.getId()).andNameEqualTo(organizationStructureDto.getName());
boolean nameExist = organizationStructureMapper.countByExample(example) > 0;
if (notChange) {
return ApiResultDto.fail(ErrorMessageCN.OrgStructureFailed);
}
if (!nameNotExist) {
if (nameExist) {
return ApiResultDto.fail(ErrorMessageCN.OrgStructureNameExist);
}
......
......@@ -282,8 +282,8 @@ public class TaxDocumentServiceImpl {
if (num > 0) {
OperationLogTaxDocument actionEntity = buildOperationLogTaxDocument();
actionEntity.setOperationAction("修改");
actionEntity.setId(taxDocument.getId().toString());
//设置更新值
actionEntity.setOriginalState(taxDocumentMapper.selectByPrimaryKey(taxDocument.getId()).toString());
actionEntity.setUpdateState(taxDocument.toString());
boolean result = operationLogTaxDocService.addTaxDocumentList(actionEntity);
if (result) {
......
......@@ -314,7 +314,7 @@ public class UserRoleServiceImpl extends AbstractService {
}
public List<UserRoleDisplayInfo> getAllUserRoleList(String serviceTypeId) {
List<UserRoleQuery> query = userRoleMapper.selectUserRoleQueryByServiceTypeId(serviceTypeId);
List<UserRoleQuery> query = userRoleMapper.selectUserRoleQueryByServiceTypeIdAll(serviceTypeId);
List<UserRoleDisplayInfo> userRoleDtoList = new ArrayList<>();
List<UserRoleQueryDto> userList = query.stream().map(u -> CommonUtils.copyProperties(u, new UserRoleQueryDto()))
.distinct().collect(Collectors.toList());
......
......@@ -23,6 +23,7 @@ import pwc.taxtech.atms.vat.entity.*;
import pwc.taxtech.atms.vat.service.impl.report.functions.FormulaContext;
import java.math.BigDecimal;
import java.util.Calendar;
import java.util.List;
import java.util.Map;
......@@ -151,7 +152,7 @@ public class FormulaAgent {
public static String buildSql(String tableName, String getField, String filter, String filterValue, Integer period, String year, FormulaContext formulaContext) {
public static String buildSql(String tableName, String getField, String filter, String filterValue, Integer period, Integer year, FormulaContext formulaContext) {
/*
if (split[0].indexOf(">=") != -1) {
......@@ -179,8 +180,10 @@ public class FormulaAgent {
}
public static String _buildSql(String getField, String tableName, String filter, String filterValue, Integer period, FormulaContext formulaContext, String year, boolean bool, boolean getSql) throws Exception {
public static String _buildSql(String getField, String tableName, String filter, String filterValue, Integer period, FormulaContext formulaContext, Integer year, boolean bool, boolean getSql) throws Exception {
String sql = "";
//统一判断年度
year = formulaContext.getYear() + year;
if(getSql){
tableName = tableName.toLowerCase();
sql = "select * from " + tableName + " where 1=1 and " + filter + filterValue;
......@@ -188,7 +191,6 @@ public class FormulaAgent {
}else{
sql = "select sum(" + getField + ") as " + getField + " from " + tableName + " where 1=1 and " + filter + filterValue;
}
String _p = insertZero(formulaContext.getPeriod() - Math.abs(period));
String _period = insertZero(formulaContext.getPeriod());
String per = insertZero((formulaContext.getPeriod() - 1));
......@@ -224,15 +226,15 @@ public class FormulaAgent {
@Autowired
JdbcTemplate jdbcTemplate;
/*
public static void main(String[] args) {
FormulaAgent formulaAgent = new FormulaAgent();
FormulaContext formulaContext = new FormulaContext();
formulaContext.setPeriod(3);
formulaAgent.getTableDataByName("CIT_TBAM", "ending_balance", "attribute", "= '销售费用-财产损耗、盘亏及毁损损失'", 0, "2018", formulaContext);
}*/
formulaAgent.getTableDataByName("CIT_TBAM", "ending_balance", "attribute", "= '销售费用-财产损耗、盘亏及毁损损失'", 0, 0, null);
}
public BigDecimal getTableDataByName(String tableName, String getField, String filter, String filterValue, Integer period, String year, FormulaContext formulaContext) {
public BigDecimal getTableDataByName(String tableName, String getField, String filter, String filterValue, Integer period, Integer year, FormulaContext formulaContext) {
Map<String, Object> stringObjectMap = jdbcTemplate.queryForMap(buildSql(TableRule.map.get(tableName), getField, filter, filterValue, period, year, formulaContext));
......
......@@ -538,16 +538,19 @@ public class ReportGeneratorImpl {
workbook.addToolPack(udfToolpack);
}
/**
* 注册所有的自定义方法到工作簿
* 为CIT复制的一份注册自定义公式,和上面的addFunctionsAndContext方法基本相同
* CIT 注册所有的自定义方法到工作簿
*
* @param workbook 工作簿
*/
public void addCitFunctionsAndContext(Workbook workbook, String[] functions, FormulaContext formulaContext) {
//**************************** 为CIT复制的一份注册自定义公式 ****************************
FreeRefFunction[] functionImpls = {new SGSR(formulaContext), new FSJZ(formulaContext), new ND(formulaContext),
new BB(formulaContext), new XXFP(formulaContext), new GZSD(formulaContext), new PC(formulaContext)
, new JXFPMX(formulaContext), new JXFP(formulaContext), new PSUM(formulaContext), new DFFS(formulaContext),
new JFFS(formulaContext), new WPSR(formulaContext), new WPNAME(formulaContext), new WPTYPE(formulaContext),
new SUM2(formulaContext), new RSUMIF(formulaContext), new QMYE(formulaContext)};
new SUM2(formulaContext), new RSUMIF(formulaContext), new QMYE(formulaContext), new ZC(formulaContext)}; //为CIT复制的一份注册自定义公式
//**************************** 为CIT复制的一份注册自定义公式 ****************************
UDFFinder udfs = new DefaultUDFFinder(functions, functionImpls);
UDFFinder udfToolpack = new AggregatingUDFFinder(udfs);
workbook.addToolPack(udfToolpack);
......
......@@ -190,7 +190,7 @@ public class DFFS extends FunctionBase implements FreeRefFunction {
dto.setPeriod(period);
dto.setIsOnlyManualInput(Boolean.FALSE);
dto.setName(Constant.DataSourceName.ReportDataSource);
dto.setType(FormulaDataSourceType.TrialBalanceSource.getCode());
dto.setType(FormulaDataSourceType.Report.getCode());
contain.add(dto);
}
return temp.stream().mapToDouble(a -> a.getPeriodCr().doubleValue()).sum();
......
......@@ -89,11 +89,23 @@ public class FunctionBase {
}
}
public Long saveDataSource(OperationEvaluationContext ec, List<Object> dataSourceList,FormulaDataSourceType sourceType,
FormulaDataSourceDetailType formulaDataSourceDetailType, BigDecimal val, int period, Long templateGroupId, String projectId) {
return saveDataSource(ec, dataSourceList, sourceType,formulaDataSourceDetailType, val, period, templateGroupId, null, null, projectId);
}
public Long saveDataSource(OperationEvaluationContext ec, List<Object> dataSourceList,
FormulaDataSourceDetailType formulaDataSourceDetailType, BigDecimal val, int period, Long templateGroupId, String projectId) {
return saveDataSource(ec, dataSourceList, formulaDataSourceDetailType, val, period, templateGroupId, null, null, projectId);
}
public Long saveDataSource(OperationEvaluationContext ec, List<Object> dataSourceList,FormulaDataSourceType sourceType,
FormulaDataSourceDetailType formulaDataSourceDetailType, BigDecimal val,
int period, Long templateGroupId, Integer colNumP, Integer rowNumP, String projectId) {
return saveDataSource(ec, dataSourceList, sourceType, formulaDataSourceDetailType, val, period,
templateGroupId, colNumP, rowNumP, projectId, null);
}
public Long saveDataSource(OperationEvaluationContext ec, List<Object> dataSourceList,
FormulaDataSourceDetailType formulaDataSourceDetailType, BigDecimal val,
int period, Long templateGroupId, Integer colNumP, Integer rowNumP, String projectId) {
......
......@@ -187,7 +187,7 @@ public class JFFS extends FunctionBase implements FreeRefFunction {
dto.setPeriod(period);
dto.setIsOnlyManualInput(Boolean.FALSE);
dto.setName(Constant.DataSourceName.ReportDataSource);
dto.setType(FormulaDataSourceType.TrialBalanceSource.getCode());
dto.setType(FormulaDataSourceType.Report.getCode());
contain.add(dto);
}
return temp.stream().mapToDouble(a -> a.getPeriodDr().doubleValue()).sum();
......
......@@ -6,12 +6,14 @@ import org.apache.poi.ss.formula.OperationEvaluationContext;
import org.apache.poi.ss.formula.eval.NumberEval;
import org.apache.poi.ss.formula.eval.ValueEval;
import org.apache.poi.ss.formula.functions.FreeRefFunction;
import pwc.taxtech.atms.common.util.DateUtils;
import pwc.taxtech.atms.common.util.SpringContextUtil;
import pwc.taxtech.atms.constant.Constant;
import pwc.taxtech.atms.constant.enums.BillDetailEnum;
import pwc.taxtech.atms.constant.enums.EnumOperationType;
import pwc.taxtech.atms.constant.enums.FormulaDataSourceDetailType;
import pwc.taxtech.atms.constant.enums.FormulaDataSourceType;
import pwc.taxtech.atms.dto.vatdto.ReportCellDataSourceDto;
import pwc.taxtech.atms.constant.enums.KeyValueConfigResultType;
import pwc.taxtech.atms.dto.vatdto.OutputInvoiceDataSourceDto;
import pwc.taxtech.atms.vat.entity.BillDetail;
import pwc.taxtech.atms.vat.entity.BillDetailExample;
import pwc.taxtech.atms.vat.entity.RevenueTypeMapping;
......@@ -40,18 +42,17 @@ public class KPSR extends FunctionBase implements FreeRefFunction {
Integer billType = getIntParam(args[1], ec);//发票类型
String formulaExpression = "KPSR(\"" + revenueTypeName + "\","+billType+")";
logger.debug(formulaExpression);
List<ReportCellDataSourceDto> dataSource = Lists.newArrayList();
List<OutputInvoiceDataSourceDto> dataSource = Lists.newArrayList();
double result = countForTrialBalance(revenueTypeName,dataSource,billType);
Long dataSoureId = saveDataSource(ec, Collections.singletonList(dataSource),
FormulaDataSourceDetailType.FormulaDataSourceDto,
new BigDecimal(result), formulaContext.getPeriod(), formulaContext.getReportTemplateGroupId(), formulaContext.getProjectId());
double result = countForTrialBalance(revenueTypeName,dataSource,billType,ec);
Long dataSoureId = saveDataSource(ec, Collections.singletonList(dataSource), FormulaDataSourceDetailType.InputInvoiceDataSourceDto, new BigDecimal(result), formulaContext.getPeriod(),
formulaContext.getReportTemplateGroupId(), formulaContext.getProjectId());
saveFormulaBlock(formulaContext.getPeriod(), ec, formulaExpression, new BigDecimal(result), dataSoureId, formulaContext.getProjectId());
return new NumberEval(result);
}
private double countForTrialBalance(String revenueTypeName, List<ReportCellDataSourceDto> contain, Integer billType) {
private double countForTrialBalance(String revenueTypeName, List<OutputInvoiceDataSourceDto> contain, Integer billType,OperationEvaluationContext ec) {
String queryDate = formulaContext.getYear()+(formulaContext.getPeriod()<10?("0"+formulaContext.getPeriod()):(formulaContext.getPeriod()+""));
RevenueTypeMappingExample typeMappingExample = new RevenueTypeMappingExample();
typeMappingExample.createCriteria().andOrgIdEqualTo(formulaContext.getOrganizationId())
......@@ -72,13 +73,22 @@ public class KPSR extends FunctionBase implements FreeRefFunction {
.andBillTypeEqualTo(BillDetailEnum.BillType.MAPPING.get(billType));
List<BillDetail> billDetails = SpringContextUtil.billDetailMapper.selectByExample(billDetailExample);
for (BillDetail billDetail : billDetails) {
ReportCellDataSourceDto dto = new ReportCellDataSourceDto();
dto.setAmount(billDetail.getBillAmount());
dto.setPeriod(formulaContext.getPeriod());
dto.setIsOnlyManualInput(Boolean.FALSE);
dto.setName(Constant.DataSourceName.ReportDataSource);
dto.setType(FormulaDataSourceType.Report.getCode());
contain.add(dto);
OutputInvoiceDataSourceDto outputInvoiceDataSourceDto = new OutputInvoiceDataSourceDto();
outputInvoiceDataSourceDto.setAmount(FormulaHelper.roundValue(billDetail.getBillAmount(),
KeyValueConfigResultType.Accounting, null, formulaContext));
outputInvoiceDataSourceDto.setResultType(KeyValueConfigResultType.Accounting.getCode());
outputInvoiceDataSourceDto.setTaxAmount(FormulaHelper.roundValue(billDetail.getTaxAmount(),
KeyValueConfigResultType.Accounting, null, formulaContext));
outputInvoiceDataSourceDto.setTaxRate(billDetail.getTaxRate());
outputInvoiceDataSourceDto.setBuyerName(billDetail.getCustomer());
outputInvoiceDataSourceDto.setInvoiceCode(billDetail.getBillCode());
outputInvoiceDataSourceDto.setInvoiceNumber(billDetail.getBillNo());
outputInvoiceDataSourceDto.setInvoiceDate(DateUtils.strToDate(billDetail.getBillDate()));
outputInvoiceDataSourceDto.setInvoiceType(billType);
outputInvoiceDataSourceDto.setPeriod(formulaContext.getPeriod());
outputInvoiceDataSourceDto.setName(Constant.DataSourceName.OutputInvoiceDataSource);
outputInvoiceDataSourceDto.setOperationType(EnumOperationType.Single.getCode());
contain.add(outputInvoiceDataSourceDto);
}
return billDetails.stream().mapToDouble(a -> a.getBillAmount().doubleValue()).sum();
}
......
......@@ -57,7 +57,7 @@ public class RSUMIF extends FunctionBase implements FreeRefFunction {
Integer argsLength;
String getField;
Integer period;
String year;
Integer year;
@Override
public ValueEval evaluate(ValueEval[] args, OperationEvaluationContext ec) {
......@@ -75,8 +75,8 @@ public class RSUMIF extends FunctionBase implements FreeRefFunction {
getField = resolverString(args, ec, 1);
filter= resolverString(args, ec, 2);
filterValue= resolverString(args, ec, 3);
period = resolverInteger(args, ec, 4);//会计期间
year = resolverString(args, ec, 5);//会计年度
year = resolverInteger(args, ec, 4);//会计年度
period = Integer.parseInt(resolverString(args, ec, 5));//会计期间
cellValue = agent.getTableDataByName(tableName, getField, filter, filterValue, period, year, formulaContext);
return new NumberEval(cellValue.doubleValue());
} catch (EvaluationException e) {
......
......@@ -9,8 +9,9 @@ import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import pwc.taxtech.atms.common.util.MyAsserts;
import pwc.taxtech.atms.constant.enums.FormulaDataSourceDetailType;
import pwc.taxtech.atms.constant.enums.FormulaDataSourceType;
import pwc.taxtech.atms.dpo.CellTemplatePerGroupDto;
import pwc.taxtech.atms.dto.vatdto.ReportCellDataSourceDto;
import pwc.taxtech.atms.dto.vatdto.TaxCellDataSourceDto;
import pwc.taxtech.atms.dto.vatdto.WPNAMEParasBo;
import pwc.taxtech.atms.exception.Exceptions;
import pwc.taxtech.atms.exception.FormulaException;
......@@ -47,7 +48,7 @@ public class WPNAME extends FunctionBase implements FreeRefFunction {
}
public BigDecimal bb(WPNAMEParasBo bo, OperationEvaluationContext ec, List<Object> dataSource) throws Exception {
ReportCellDataSourceDto nullCellDto = new ReportCellDataSourceDto();
TaxCellDataSourceDto nullCellDto = new TaxCellDataSourceDto();
dataSource.add(nullCellDto);
BigDecimal cellValue = BigDecimal.ZERO;
CellTemplatePerGroupDto cellTemplateData = null;
......@@ -69,7 +70,7 @@ public class WPNAME extends FunctionBase implements FreeRefFunction {
throw e;
} finally {
LOGGER.warn("[BB_Exception] error for bb cacls for {}", bo.toString());
Long dataSourceId = saveDataSource(ec, dataSource, FormulaDataSourceDetailType.ReportCellDataSourceDto,
Long dataSourceId = saveDataSource(ec, dataSource, FormulaDataSourceType.Other,FormulaDataSourceDetailType.TaxCellDataSourceDto,
cellValue, formulaContext.getPeriod(),
formulaContext.getReportTemplateGroupId(), cellTemplateData.getColumnIndex(), cellTemplateData.getRowIndex(),
formulaContext.getProjectId());
......
......@@ -56,6 +56,7 @@ cookie.maxAgeSeconds=${cookie.maxAgeSeconds}
api_white_list=${api_white_list}
org_sync_url=${org_sync_url}
org_sync_token=${org_sync_token}
dd_pubkey=${dd_pubkey}
ebs_call_url=${ebs_call_url}
......
......@@ -54,6 +54,7 @@ cookie.maxAgeSeconds=86400
api_white_list=/ebs/api/v1/dd;
org_sync_url=http://10.96.238.10/erp-main-data-test-v2/api/companies
org_sync_token=174af08f
dd_pubkey=MFwwDQYJKoZIhvcNAQEBBQADSwAwSAJBAKUfMPRKV6I5num1dDWcxTrgTjXf5LctsVj0CpbwHE83mmjUO5CAlvA0Fwy30ajCX5sLmsyi+Eu/4uNmM6GQF3kCAwEAAQ==
ebs_call_url=http://172.20.201.201:8020/ebs-proxy-test/dts
......
......@@ -57,6 +57,8 @@ cookie.maxAgeSeconds=18000
api_white_list=/ebs/api/v1/dd;
org_sync_url=http://10.96.238.10/erp-main-data-test-v2/api/companies
org_sync_token=174af08f
dd_pubkey=MFwwDQYJKoZIhvcNAQEBBQADSwAwSAJBAKUfMPRKV6I5num1dDWcxTrgTjXf5LctsVj0CpbwHE83mmjUO5CAlvA0Fwy30ajCX5sLmsyi+Eu/4uNmM6GQF3kCAwEAAQ==
ebs_call_url=http://172.20.201.201:8020/ebs-proxy-test/dts
......
......@@ -52,6 +52,8 @@ cookie.maxAgeSeconds=86400
api_white_list=/ebs/api/v1/dd;
org_sync_url=http://10.96.238.10/erp-main-data-test-v2/api/companies
org_sync_token=174af08f
dd_pubkey=MFwwDQYJKoZIhvcNAQEBBQADSwAwSAJBAKUfMPRKV6I5num1dDWcxTrgTjXf5LctsVj0CpbwHE83mmjUO5CAlvA0Fwy30ajCX5sLmsyi+Eu/4uNmM6GQF3kCAwEAAQ==
ebs_call_url=http://172.20.201.201:8020/ebs-proxy-test/dts
......
......@@ -79,6 +79,8 @@ public abstract class CommonIT {
@Autowired
protected OrganizationMapper organizationMapper;
@Autowired
protected OrganizationExtraMapper organizationExtraMapper;
@Autowired
protected CustomerMapper customerMapper;
@Autowired
protected UserMapper userMapper;
......
......@@ -3,7 +3,14 @@ package pwc.taxtech.atms.service.impl;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONArray;
import com.google.common.collect.Lists;
import org.apache.commons.lang3.StringUtils;
import org.junit.Test;
import pwc.taxtech.atms.CommonIT;
import pwc.taxtech.atms.common.util.StringUtil;
import pwc.taxtech.atms.entity.Organization;
import pwc.taxtech.atms.entity.OrganizationExample;
import pwc.taxtech.atms.entity.OrganizationExtra;
import pwc.taxtech.atms.entity.OrganizationExtraExample;
import java.util.List;
......@@ -12,7 +19,7 @@ import java.util.List;
* @Date: 15/03/2019 20:42
* @Description:
*/
public class GaryTest {
public class GaryTest extends CommonIT {
@Test
public void gagaga(){
......@@ -223,4 +230,20 @@ public class GaryTest {
System.out.println("enNameList"+enNameList);
}
@Test
public void syncArc(){
List<Organization> orgs = organizationMapper.selectByExample(new OrganizationExample());
orgs.forEach(o->{
if(StringUtils.isNotEmpty(o.getArchitectureType())){
OrganizationExtra oe = new OrganizationExtra();
oe.setArchitectureType(o.getArchitectureType());
OrganizationExtraExample e1 = new OrganizationExtraExample();
e1.createCriteria().andOrganizationIdEqualTo(o.getId());
if(organizationExtraMapper.updateByExampleSelective(oe,e1)>0){
System.out.println("更新"+o.getName()+"架构类型"+o.getArchitectureType()+"成功");
}
}
});
}
}
package pwc.taxtech.atms.analysis.dao;
import java.util.List;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.session.RowBounds;
import pwc.taxtech.atms.MyAnalysisMapper;
import pwc.taxtech.atms.analysis.entity.AnalysisTaxReturnEnd;
import pwc.taxtech.atms.analysis.entity.AnalysisTaxReturnEndExample;
@Mapper
public interface AnalysisTaxReturnEndMapper extends MyAnalysisMapper {
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table analysis_tax_return_end
*
* @mbg.generated
*/
long countByExample(AnalysisTaxReturnEndExample example);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table analysis_tax_return_end
*
* @mbg.generated
*/
int deleteByExample(AnalysisTaxReturnEndExample example);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table analysis_tax_return_end
*
* @mbg.generated
*/
int deleteByPrimaryKey(Long id);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table analysis_tax_return_end
*
* @mbg.generated
*/
int insert(AnalysisTaxReturnEnd record);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table analysis_tax_return_end
*
* @mbg.generated
*/
int insertSelective(AnalysisTaxReturnEnd record);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table analysis_tax_return_end
*
* @mbg.generated
*/
List<AnalysisTaxReturnEnd> selectByExampleWithRowbounds(AnalysisTaxReturnEndExample example, RowBounds rowBounds);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table analysis_tax_return_end
*
* @mbg.generated
*/
List<AnalysisTaxReturnEnd> selectByExample(AnalysisTaxReturnEndExample example);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table analysis_tax_return_end
*
* @mbg.generated
*/
AnalysisTaxReturnEnd selectByPrimaryKey(Long id);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table analysis_tax_return_end
*
* @mbg.generated
*/
int updateByExampleSelective(@Param("record") AnalysisTaxReturnEnd record, @Param("example") AnalysisTaxReturnEndExample example);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table analysis_tax_return_end
*
* @mbg.generated
*/
int updateByExample(@Param("record") AnalysisTaxReturnEnd record, @Param("example") AnalysisTaxReturnEndExample example);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table analysis_tax_return_end
*
* @mbg.generated
*/
int updateByPrimaryKeySelective(AnalysisTaxReturnEnd record);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table analysis_tax_return_end
*
* @mbg.generated
*/
int updateByPrimaryKey(AnalysisTaxReturnEnd record);
}
\ No newline at end of file
package pwc.taxtech.atms.analysis.entity;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;
import pwc.taxtech.atms.entity.BaseEntity;
......@@ -55,7 +54,7 @@ public class AnalysisFileManagement extends BaseEntity implements Serializable {
*
* @mbg.generated
*/
private BigDecimal reportingFrequency;
private String reportingFrequency;
/**
* Database Column Remarks:
......@@ -66,7 +65,7 @@ public class AnalysisFileManagement extends BaseEntity implements Serializable {
*
* @mbg.generated
*/
private BigDecimal archivingStatus;
private String archivingStatus;
/**
* Database Column Remarks:
......@@ -211,7 +210,7 @@ public class AnalysisFileManagement extends BaseEntity implements Serializable {
*
* @mbg.generated
*/
public BigDecimal getReportingFrequency() {
public String getReportingFrequency() {
return reportingFrequency;
}
......@@ -223,8 +222,8 @@ public class AnalysisFileManagement extends BaseEntity implements Serializable {
*
* @mbg.generated
*/
public void setReportingFrequency(BigDecimal reportingFrequency) {
this.reportingFrequency = reportingFrequency;
public void setReportingFrequency(String reportingFrequency) {
this.reportingFrequency = reportingFrequency == null ? null : reportingFrequency.trim();
}
/**
......@@ -235,7 +234,7 @@ public class AnalysisFileManagement extends BaseEntity implements Serializable {
*
* @mbg.generated
*/
public BigDecimal getArchivingStatus() {
public String getArchivingStatus() {
return archivingStatus;
}
......@@ -247,8 +246,8 @@ public class AnalysisFileManagement extends BaseEntity implements Serializable {
*
* @mbg.generated
*/
public void setArchivingStatus(BigDecimal archivingStatus) {
this.archivingStatus = archivingStatus;
public void setArchivingStatus(String archivingStatus) {
this.archivingStatus = archivingStatus == null ? null : archivingStatus.trim();
}
/**
......
package pwc.taxtech.atms.analysis.entity;
import java.math.BigDecimal;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
......@@ -406,52 +405,62 @@ public class AnalysisFileManagementExample {
return (Criteria) this;
}
public Criteria andReportingFrequencyEqualTo(BigDecimal value) {
public Criteria andReportingFrequencyEqualTo(String value) {
addCriterion("reporting_frequency =", value, "reportingFrequency");
return (Criteria) this;
}
public Criteria andReportingFrequencyNotEqualTo(BigDecimal value) {
public Criteria andReportingFrequencyNotEqualTo(String value) {
addCriterion("reporting_frequency <>", value, "reportingFrequency");
return (Criteria) this;
}
public Criteria andReportingFrequencyGreaterThan(BigDecimal value) {
public Criteria andReportingFrequencyGreaterThan(String value) {
addCriterion("reporting_frequency >", value, "reportingFrequency");
return (Criteria) this;
}
public Criteria andReportingFrequencyGreaterThanOrEqualTo(BigDecimal value) {
public Criteria andReportingFrequencyGreaterThanOrEqualTo(String value) {
addCriterion("reporting_frequency >=", value, "reportingFrequency");
return (Criteria) this;
}
public Criteria andReportingFrequencyLessThan(BigDecimal value) {
public Criteria andReportingFrequencyLessThan(String value) {
addCriterion("reporting_frequency <", value, "reportingFrequency");
return (Criteria) this;
}
public Criteria andReportingFrequencyLessThanOrEqualTo(BigDecimal value) {
public Criteria andReportingFrequencyLessThanOrEqualTo(String value) {
addCriterion("reporting_frequency <=", value, "reportingFrequency");
return (Criteria) this;
}
public Criteria andReportingFrequencyIn(List<BigDecimal> values) {
public Criteria andReportingFrequencyLike(String value) {
addCriterion("reporting_frequency like", value, "reportingFrequency");
return (Criteria) this;
}
public Criteria andReportingFrequencyNotLike(String value) {
addCriterion("reporting_frequency not like", value, "reportingFrequency");
return (Criteria) this;
}
public Criteria andReportingFrequencyIn(List<String> values) {
addCriterion("reporting_frequency in", values, "reportingFrequency");
return (Criteria) this;
}
public Criteria andReportingFrequencyNotIn(List<BigDecimal> values) {
public Criteria andReportingFrequencyNotIn(List<String> values) {
addCriterion("reporting_frequency not in", values, "reportingFrequency");
return (Criteria) this;
}
public Criteria andReportingFrequencyBetween(BigDecimal value1, BigDecimal value2) {
public Criteria andReportingFrequencyBetween(String value1, String value2) {
addCriterion("reporting_frequency between", value1, value2, "reportingFrequency");
return (Criteria) this;
}
public Criteria andReportingFrequencyNotBetween(BigDecimal value1, BigDecimal value2) {
public Criteria andReportingFrequencyNotBetween(String value1, String value2) {
addCriterion("reporting_frequency not between", value1, value2, "reportingFrequency");
return (Criteria) this;
}
......@@ -466,52 +475,62 @@ public class AnalysisFileManagementExample {
return (Criteria) this;
}
public Criteria andArchivingStatusEqualTo(BigDecimal value) {
public Criteria andArchivingStatusEqualTo(String value) {
addCriterion("archiving_status =", value, "archivingStatus");
return (Criteria) this;
}
public Criteria andArchivingStatusNotEqualTo(BigDecimal value) {
public Criteria andArchivingStatusNotEqualTo(String value) {
addCriterion("archiving_status <>", value, "archivingStatus");
return (Criteria) this;
}
public Criteria andArchivingStatusGreaterThan(BigDecimal value) {
public Criteria andArchivingStatusGreaterThan(String value) {
addCriterion("archiving_status >", value, "archivingStatus");
return (Criteria) this;
}
public Criteria andArchivingStatusGreaterThanOrEqualTo(BigDecimal value) {
public Criteria andArchivingStatusGreaterThanOrEqualTo(String value) {
addCriterion("archiving_status >=", value, "archivingStatus");
return (Criteria) this;
}
public Criteria andArchivingStatusLessThan(BigDecimal value) {
public Criteria andArchivingStatusLessThan(String value) {
addCriterion("archiving_status <", value, "archivingStatus");
return (Criteria) this;
}
public Criteria andArchivingStatusLessThanOrEqualTo(BigDecimal value) {
public Criteria andArchivingStatusLessThanOrEqualTo(String value) {
addCriterion("archiving_status <=", value, "archivingStatus");
return (Criteria) this;
}
public Criteria andArchivingStatusIn(List<BigDecimal> values) {
public Criteria andArchivingStatusLike(String value) {
addCriterion("archiving_status like", value, "archivingStatus");
return (Criteria) this;
}
public Criteria andArchivingStatusNotLike(String value) {
addCriterion("archiving_status not like", value, "archivingStatus");
return (Criteria) this;
}
public Criteria andArchivingStatusIn(List<String> values) {
addCriterion("archiving_status in", values, "archivingStatus");
return (Criteria) this;
}
public Criteria andArchivingStatusNotIn(List<BigDecimal> values) {
public Criteria andArchivingStatusNotIn(List<String> values) {
addCriterion("archiving_status not in", values, "archivingStatus");
return (Criteria) this;
}
public Criteria andArchivingStatusBetween(BigDecimal value1, BigDecimal value2) {
public Criteria andArchivingStatusBetween(String value1, String value2) {
addCriterion("archiving_status between", value1, value2, "archivingStatus");
return (Criteria) this;
}
public Criteria andArchivingStatusNotBetween(BigDecimal value1, BigDecimal value2) {
public Criteria andArchivingStatusNotBetween(String value1, String value2) {
addCriterion("archiving_status not between", value1, value2, "archivingStatus");
return (Criteria) this;
}
......
......@@ -5,6 +5,7 @@ import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.session.RowBounds;
import pwc.taxtech.atms.MyMapper;
import pwc.taxtech.atms.dpo.CitAssetDetailResultDto;
import pwc.taxtech.atms.dpo.CitAssetEamMappingDto;
import pwc.taxtech.atms.entity.CitAssetsList;
import pwc.taxtech.atms.entity.CitAssetsListExample;
......@@ -116,4 +117,7 @@ public interface CitAssetsListMapper extends MyMapper {
* @return Result<XxxxDO>
*/
List<CitAssetEamMappingDto> getAssetEamMapping(CitAssetsList citAsset);
List<CitAssetDetailResultDto> getCitAssetDetialResult(@Param("assetType") Integer assetType,
@Param("assetDetailType") Integer assetDetailType);
}
\ No newline at end of file
......@@ -5,7 +5,6 @@ import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.session.RowBounds;
import pwc.taxtech.atms.MyMapper;
import pwc.taxtech.atms.dpo.CitTbamDto;
import pwc.taxtech.atms.entity.CitTbam;
import pwc.taxtech.atms.entity.CitTbamExample;
......@@ -115,5 +114,5 @@ public interface CitTbamMapper extends MyMapper {
*/
int insertBatch(List<CitTbam> citTbamList);
List<CitTbamDto> selectBySql(@Param("sql") String sql);
List<CitTbam> selectBySql(@Param("sql") String sql);
}
\ No newline at end of file
......@@ -6,6 +6,7 @@ import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.session.RowBounds;
import pwc.taxtech.atms.MyMapper;
import pwc.taxtech.atms.dpo.ProjectAnaylsisDto;
import pwc.taxtech.atms.dpo.ProjectDisplayDto;
import pwc.taxtech.atms.entity.Project;
import pwc.taxtech.atms.entity.ProjectExample;
......@@ -244,4 +245,8 @@ public interface ProjectMapper extends MyMapper {
"WHERE a.id = #{projectId} " +
" AND b.service_type_id = #{serviceType}")
Long getTemplateGroupIdByProject(@Param("projectId") String projectId, @Param("serviceType") Integer serviceType);
List<ProjectAnaylsisDto> getTemlateWithServiceType(@Param("orgIds") List<String> orgIds, @Param("year") Integer year, @Param("month") Integer month,@Param("reportName")String reportName);
List<ProjectAnaylsisDto> getTemlateWithServiceType2(@Param("orgId")String orgId, @Param("year") Integer year, @Param("month") Integer month,@Param("code")String code);
}
\ No newline at end of file
......@@ -112,5 +112,7 @@ public interface UserRoleMapper extends MyMapper {
List<UserRoleQuery> selectUserRoleQueryByServiceTypeId(String serviceTypeId);
List<UserRoleQuery> selectUserRoleQueryByServiceTypeIdAll(String serviceTypeId);
List<UserOrgRoleDto> getOriginalRoleList();
}
\ No newline at end of file
package pwc.taxtech.atms.dpo;
/**
* @Auther: Gary J Li
* @Date: 20/03/2019 11:17
* @Description:
*/
public class AnalysisSalesValueDto {
private String data;
private Integer rowIndex;
private Integer columnIndex;
public String getData() {
return data;
}
public void setData(String data) {
this.data = data;
}
public Integer getRowIndex() {
return rowIndex;
}
public void setRowIndex(Integer rowIndex) {
this.rowIndex = rowIndex;
}
public Integer getColumnIndex() {
return columnIndex;
}
public void setColumnIndex(Integer columnIndex) {
this.columnIndex = columnIndex;
}
}
package pwc.taxtech.atms.dpo;
import pwc.taxtech.atms.entity.AssetDetailGroup;
import pwc.taxtech.atms.entity.CitAssetsList;
public class CitAssetDetailResultDto {
String id;
CitAssetsList assetsList;
AssetDetailGroup assetDetailGroup;
public String getId() {
return id;
}
public void setId(String id) {
this.id = id;
}
public CitAssetsList getAssetsList() {
return assetsList;
}
public void setAssetsList(CitAssetsList assetsList) {
this.assetsList = assetsList;
}
public AssetDetailGroup getAssetDetailGroup() {
return assetDetailGroup;
}
public void setAssetDetailGroup(AssetDetailGroup assetDetailGroup) {
this.assetDetailGroup = assetDetailGroup;
}
}
package pwc.taxtech.atms.dpo;
import pwc.taxtech.atms.entity.CitTbam;
/**
* @ClassName CitTbamDto
* Description TODO
* @Author pwc kevin
* @Date 3/15/2019 3:46 PM
* Version 1.0
**/
public class CitTbamDto extends CitTbam {
}
......@@ -618,6 +618,8 @@ public class OrganizationExtraDto implements Serializable {
*/
private String auditRequirements;
private String architectureType;
/**
* This field was generated by MyBatis Generator.
* This field corresponds to the database table organization_extra
......@@ -1946,6 +1948,14 @@ public class OrganizationExtraDto implements Serializable {
this.auditRequirements = auditRequirements == null ? null : auditRequirements.trim();
}
public String getArchitectureType() {
return architectureType;
}
public void setArchitectureType(String architectureType) {
this.architectureType = architectureType;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table organization_extra
......
package pwc.taxtech.atms.dpo;
/**
* @Auther: Gary J Li
* @Date: 20/03/2019 11:17
* @Description:
*/
public class ProjectAnaylsisDto {
private String reportId;
private String projectId;
private String orgId;
private String templateName;
private String serviceTypeId;
public String getReportId() {
return reportId;
}
public void setReportId(String reportId) {
this.reportId = reportId;
}
public String getProjectId() {
return projectId;
}
public void setProjectId(String projectId) {
this.projectId = projectId;
}
public String getTemplateName() {
return templateName;
}
public void setTemplateName(String templateName) {
this.templateName = templateName;
}
public String getOrgId() {
return orgId;
}
public void setOrgId(String orgId) {
this.orgId = orgId;
}
public String getServiceTypeId() {
return serviceTypeId;
}
public void setServiceTypeId(String serviceTypeId) {
this.serviceTypeId = serviceTypeId;
}
}
......@@ -22,6 +22,7 @@ public class CitTbam extends BaseEntity implements Serializable {
*
* @mbg.generated
*/
private Long id;
/**
......
......@@ -616,6 +616,35 @@ public class OrganizationExtra extends BaseEntity implements Serializable {
*/
private String auditRequirements;
/**
* Database Column Remarks:
* 架构类型
*
* This field was generated by MyBatis Generator.
* This field corresponds to the database column organization_extra.architecture_type
*
* @mbg.generated
*/
private String architectureType;
/**
*
* This field was generated by MyBatis Generator.
* This field corresponds to the database column organization_extra.create_time
*
* @mbg.generated
*/
private Date createTime;
/**
*
* This field was generated by MyBatis Generator.
* This field corresponds to the database column organization_extra.update_time
*
* @mbg.generated
*/
private Date updateTime;
/**
* This field was generated by MyBatis Generator.
* This field corresponds to the database table organization_extra
......@@ -1944,6 +1973,78 @@ public class OrganizationExtra extends BaseEntity implements Serializable {
this.auditRequirements = auditRequirements == null ? null : auditRequirements.trim();
}
/**
* This method was generated by MyBatis Generator.
* This method returns the value of the database column organization_extra.architecture_type
*
* @return the value of organization_extra.architecture_type
*
* @mbg.generated
*/
public String getArchitectureType() {
return architectureType;
}
/**
* This method was generated by MyBatis Generator.
* This method sets the value of the database column organization_extra.architecture_type
*
* @param architectureType the value for organization_extra.architecture_type
*
* @mbg.generated
*/
public void setArchitectureType(String architectureType) {
this.architectureType = architectureType == null ? null : architectureType.trim();
}
/**
* This method was generated by MyBatis Generator.
* This method returns the value of the database column organization_extra.create_time
*
* @return the value of organization_extra.create_time
*
* @mbg.generated
*/
public Date getCreateTime() {
return createTime;
}
/**
* This method was generated by MyBatis Generator.
* This method sets the value of the database column organization_extra.create_time
*
* @param createTime the value for organization_extra.create_time
*
* @mbg.generated
*/
public void setCreateTime(Date createTime) {
this.createTime = createTime;
}
/**
* This method was generated by MyBatis Generator.
* This method returns the value of the database column organization_extra.update_time
*
* @return the value of organization_extra.update_time
*
* @mbg.generated
*/
public Date getUpdateTime() {
return updateTime;
}
/**
* This method was generated by MyBatis Generator.
* This method sets the value of the database column organization_extra.update_time
*
* @param updateTime the value for organization_extra.update_time
*
* @mbg.generated
*/
public void setUpdateTime(Date updateTime) {
this.updateTime = updateTime;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table organization_extra
......@@ -2011,6 +2112,9 @@ public class OrganizationExtra extends BaseEntity implements Serializable {
sb.append(", actualBusinessAddress=").append(actualBusinessAddress);
sb.append(", taxRuleIntroduction=").append(taxRuleIntroduction);
sb.append(", auditRequirements=").append(auditRequirements);
sb.append(", architectureType=").append(architectureType);
sb.append(", createTime=").append(createTime);
sb.append(", updateTime=").append(updateTime);
sb.append("]");
return sb.toString();
}
......
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