Commit fb2e3aab authored by Memorydoc's avatar Memorydoc

Merge remote-tracking branch 'origin/dev_mysql' into dev_mysql

parents 2ac8011b 0a2494a2
......@@ -443,30 +443,20 @@
<profiles>
<profile>
<id>dev</id>
<build>
<filters>
<filter>src/main/resources/conf/conf_profile_dev.properties</filter>
</filters>
</build>
<properties>
<env>dev</env>
</properties>
</profile>
<profile>
<id>local</id>
<activation>
<activeByDefault>true</activeByDefault>
</activation>
<build>
<filters>
<filter>src/main/resources/conf/conf_profile_dev_local.properties</filter>
<filter>src/main/resources/conf/conf_profile_dev.properties</filter>
</filters>
</build>
<properties>
<env>dev</env>
</properties>
</profile>
<profile>
<id>staging</id>
<build>
......@@ -627,7 +617,7 @@
</dependencies>
</plugin>
<!-- See: https://docs.sonarqube.org/display/SCAN/Analyzing+with+SonarQube+Scanner+for+Maven -->
<plugin>ll
<plugin>
<groupId>org.sonarsource.scanner.maven</groupId>
<artifactId>sonar-maven-plugin</artifactId>
<version>3.4.0.905</version>
......
......@@ -86,7 +86,7 @@ public class TableauController extends BaseController {
@ResponseBody
@GetMapping("dashboard")
public ApiResultDto getDashboard() {
return ApiResultDto.success(tableauService.getBrazilianTax().orElse(StringUtils.EMPTY));
return ApiResultDto.success(tableauService.getDashboard().orElse(StringUtils.EMPTY));
}
}
......@@ -36,6 +36,7 @@ import pwc.taxtech.atms.vat.entity.FileUpload;
import javax.servlet.http.HttpServletResponse;
import java.io.File;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.text.SimpleDateFormat;
......@@ -122,44 +123,76 @@ public class TaxDocumentController {
*/
@PostMapping("/previewPDF")
@ResponseBody
public void previewPDF(HttpServletResponse response ,@RequestBody TaxDocumentDto taxDocumentDto) {
// return taxDocumentService.previewPDF2(response,taxDocumentDto.getPath());
taxDocumentService.previewPDF(response,taxDocumentDto.getPath());
/*InputStream is = null;
ByteArrayOutputStream os = null;
public String previewPDF(HttpServletResponse response ,@RequestBody TaxDocumentDto taxDocumentDto) {
return taxDocumentService.previewPDF2(response,taxDocumentDto.getPath());
}
// /**
// * 读取PDF 转换为图片
// *
// */
// @PostMapping("/previewPDF3")
// @ResponseBody
// public void previewPDF3(HttpServletResponse response ,@RequestBody TaxDocumentDto taxDocumentDto) {
// OutputStream outputStream = null;
// InputStream in = null;
// try {
// in = taxDocumentService.getInputStreamByUrl(taxDocumentDto.getPath());
// response.setHeader("Content-Disposition", "attachment;fileName=test.pdf");
// response.setContentType("multipart/form-data");
// outputStream = response.getOutputStream();
// IOUtils.write(IOUtils.toByteArray(in), outputStream);
// } catch (IOException e) {
// e.printStackTrace();
// throw new RuntimeException("PDF转换失败");
// } finally {
// try {
// in.close();
// } catch (IOException e) {
// throw new RuntimeException("PDF转换失败");
// }
// try {
// outputStream.close();
// } catch (IOException e) {
// throw new RuntimeException("PDF转换失败");
// }
// }
// }
/**
* 读取PDF 转换为图片
*
*/
@PostMapping("/previewPDF2")
@ResponseBody
public void previewPDF2(HttpServletResponse response ,@RequestBody TaxDocumentDto taxDocumentDto) {
OutputStream outputStream = null;
InputStream is = null;
try {
//根据url地址 获取文件输入流
is = getInputStreamByUrl(taxDocumentDto.getPath());
os = new ByteArrayOutputStream();
outputStream = response.getOutputStream();
byte[] buff = new byte[1024];
int len = 0;
String dUrlData="";
int len;
is = taxDocumentService.getInputStreamByUrl(taxDocumentDto.getPath());
while ((len = is.read(buff)) != -1) {
os.write(buff, 0, len);
outputStream.write(buff, 0, len);
}
//刷新此输出流并强制写出所有缓冲的输出字节,必须这行代码,否则有可能有问题
os.flush();
os.toByteArray();
dUrlData= Base64.encode(os.toByteArray());
return dUrlData;
} catch (Exception e) {
e.printStackTrace();
return null;
}finally {
outputStream.flush();
} catch (IOException e) {
throw new RuntimeException("PDF转换失败");
} finally {
try {
is.close();
} catch (IOException e) {
e.printStackTrace();
throw new RuntimeException("PDF转换失败");
}
try {
os.close();
outputStream.close();
} catch (IOException e) {
e.printStackTrace();
throw new RuntimeException("PDF转换失败");
}
}*/
}
}
}
@RequestMapping("exportExcel")
@ResponseBody
public void exportExcelFile(HttpServletResponse response, @RequestBody TaxDocumentDto taxDocumentDto) {
......
package pwc.taxtech.atms.controller;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import pwc.taxtech.atms.service.impl.WorkflowService;
@RestController
@RequestMapping("/api/v1/workflow/")
public class WorkflowController extends BaseController {
@Autowired
private WorkflowService workflowService;
}
......@@ -362,7 +362,7 @@ public class AssetListServiceImpl extends BaseService {
//获取财务原值---计算方法:原值+原值调整值,暂时不考虑调整值
citAsset.setAccountAcquisitionValue(acquisitionValue);
//获取财务每月折旧额----(原值-残值额)/折旧期限
citAsset.setAccountMonthDepreciationAmount(acquisitionValue.subtract(residualRate).divide(new BigDecimal(depreciationPeriod), 2));
citAsset.setAccountMonthDepreciationAmount((acquisitionValue.subtract(residualRate)).divide(new BigDecimal(depreciationPeriod), 2));
//获取财务累计折旧额,接下来计算需要用到,所以赋给一个对象
value = CitCommonUtil.getValue(rowData.getCell(25));
......@@ -480,7 +480,7 @@ public class AssetListServiceImpl extends BaseService {
switch(enumCitAssetType){
case FixedAssets:
//获取税务折旧期限
citAsset.setTaxDepreciationPeriod(Math.max(citAsset.getDepreciationPeriod(),assetDetailGroup.getGroupYear()));
citAsset.setTaxDepreciationPeriod(Math.max(citAsset.getDepreciationPeriod(),assetGroupResult.getTaxDepreciationPeriod()));
//把购入日期放入到Calendar
cal.setTime(citAsset.getBuyDate());
......@@ -524,7 +524,7 @@ public class AssetListServiceImpl extends BaseService {
case InvisibleAssets:
//获取税务折旧期限
citAsset.setTaxDepreciationPeriod(Math.max(citAsset.getDepreciationPeriod(),assetDetailGroup.getGroupYear()));
citAsset.setTaxDepreciationPeriod(Math.max(citAsset.getDepreciationPeriod(),assetGroupResult.getTaxDepreciationPeriod()));
//把购入日期放入到Calendar
cal.setTime(citAsset.getBuyDate());
......@@ -546,7 +546,7 @@ public class AssetListServiceImpl extends BaseService {
//获取本年折旧期间 ,截至本年累计折旧期间-截至去年累计折旧期间
citAsset.setTaxYearDepreciationPeriod(citAsset.getTaxToCurrentYearDepreciationPeriod()-citAsset.getTaxToLastYearDepreciationPeriod());
//获取税务每月折旧额,(原值-残值)/税法折旧期间
citAsset.setTaxMonthDepreciationAmount(citAsset.getAcquisitionValue().subtract(citAsset.getResidualRate()).divide(new BigDecimal(assetGroupResult.getTaxDepreciationPeriod()), 2));
citAsset.setTaxMonthDepreciationAmount((citAsset.getAcquisitionValue().subtract(citAsset.getResidualRate())).divide(new BigDecimal(citAsset.getTaxDepreciationPeriod()), 2));
//获取税务截止本年累计折旧额, 本年折旧期间* 每月折旧额
citAsset.setTaxToCurrentYearDepreciationAmount(citAsset.getTaxMonthDepreciationAmount().multiply(new BigDecimal(citAsset.getTaxToCurrentYearDepreciationPeriod())));
//获取税务本年折旧额, 截至本年累计折旧期间*每月折旧额
......@@ -569,6 +569,16 @@ public class AssetListServiceImpl extends BaseService {
public ApiResultDto updateAssetResultList(List<CitAssetsList> assetsLists, String projectId){
for(CitAssetsList citAsset:assetsLists){
//获取税务每月折旧额,(原值-残值)/税法折旧期间
citAsset.setTaxMonthDepreciationAmount((citAsset.getAcquisitionValue().subtract(citAsset.getResidualRate())).divide(new BigDecimal(citAsset.getTaxDepreciationPeriod()), 2));
//获取税务截止本年累计折旧额, 本年折旧期间* 每月折旧额
citAsset.setTaxToCurrentYearDepreciationAmount(citAsset.getTaxMonthDepreciationAmount().multiply(new BigDecimal(citAsset.getTaxToCurrentYearDepreciationPeriod())));
//获取税务本年折旧额, 截至本年累计折旧期间*每月折旧额
citAsset.setTaxCurrentYearDepreciationAmount(citAsset.getTaxMonthDepreciationAmount().multiply(new BigDecimal(citAsset.getTaxYearDepreciationPeriod())));
//获取累计差异, 截止本年累计折旧额(税务)- 截止本年累计折旧额(财务)
citAsset.setTotalDifferenceAmount(citAsset.getTaxToCurrentYearDepreciationAmount().subtract(citAsset.getAccountTotalDepreciationAmount()));
//获取当年差异
citAsset.setYearDifferenceAmount(citAsset.getTaxCurrentYearDepreciationAmount().subtract(citAsset.getAccountYearDepreciationAmount()));
assetListMapper.updateByPrimaryKeySelective(citAsset);
}
return null;
......
......@@ -201,6 +201,7 @@ public class CitImportExcelServiceImpl extends BaseService {
if(rowData == null){
citDataImportLogError.setErrorMsg("数据错误,第"+(rowNum+1)+"整行为空");
citDataImportLogList.add(citDataImportLogError);
continue;
}
//拼接日记账调整版的实体
CitJournalEntryAdjust citJournal = new CitJournalEntryAdjust();
......
......@@ -1495,7 +1495,7 @@ public class CitReportServiceImpl extends BaseService {
}
/**
* 生成总分机构分配表
* 生成总分机构分配表,从生成的报表中取数
*/
public CitDistributionDto generateTotalBranchOrgDisTable(String projectId) {
......@@ -1694,6 +1694,146 @@ public class CitReportServiceImpl extends BaseService {
return citDistributionDto;
}
/**
* 生成总分机构分配表,从根源上取数
*/
public CitDistributionDto geneTotalBranchOrgDT(String projectId) {
CitDistributionDto citDistributionDto = new CitDistributionDto();
Project project = projectMapper.selectByPrimaryKey(projectId);
//判断是不是总机构,若机构的parentId为空则代表为父机构
Organization organization = organizationMapper.selectByPrimaryKey(project.getOrganizationId());
if(organization.getParentId() == null){
//此时代表该机构为总机构,需要生成总分机构分配表,
// 1、生成之前先删除之前生成的数据
CitDistributionExample citDistributionExample = new CitDistributionExample();
citDistributionExample.createCriteria().andProjectIdEqualTo(projectId);
citDistributionMapper.deleteByExample(citDistributionExample);
//获取当前卡片所在期间(就是年数)
Integer period = project.getYear();
//2生成总分机构分配表 start
//2.1 查出所有所有分支机构
OrganizationExample example = new OrganizationExample();
example.createCriteria().andCodeLike(project.getCode().substring(0, project.getCode().length() - 2)+"%");
List<Organization> organizations = organizationMapper.selectByExample(example);
//2、取出各个分支机构的三项因素,并算出各个三项因素的合计
//比较变量,其余值和该值进行比较,判断其余变量是否为0
BigDecimal compareVariable = new BigDecimal(0.000000);
//营业收入合计变量
BigDecimal totalBusinessIncome = new BigDecimal(0.000000);
//职工薪酬合计变量
BigDecimal totalEmployeeRemuneration = new BigDecimal(0.000000);
//资产总额合计变量
BigDecimal totalTotalAssets = new BigDecimal(0.000000);
//分配所得税额合计变量
BigDecimal totalDistributionAmount = new BigDecimal(0.000000);
//第六行G列的值
BigDecimal sixRowGCouValue = new BigDecimal(0.000000);
List<CitDistribution> citDistributionList = new ArrayList<>();
for (Organization org : organizations) {
//2.1 查出该机构该期间对应的卡片
ProjectExample projectExample = new ProjectExample();
projectExample.createCriteria().andOrganizationIdEqualTo(org.getId()).andYearEqualTo(period);
List<Project> projects = projectMapper.selectByExample(projectExample);
if (projects == null || projects.size() == 0) {
continue;
}
CitDistribution citDistribution = new CitDistribution();
citDistribution.setId(idService.nextId());
citDistribution.setOrganizationId(org.getId());
citDistribution.setPeriod(period);
citDistribution.setProjectId(project.getId());
citDistribution.setOrgName(org.getName());
citDistribution.setTaxPayerNumber(org.getTaxPayerNumber());
citDistribution.setCode(org.getCode());
//2.2 获取该机构该期间的营业收入--A101010《一版企业收入明细表》的营业收入金额C4抓取
// TODO 获取该机构该期间的营业收入
CitTbamExample citTbamExample = new CitTbamExample();
citTbamExample.createCriteria().andAttributeIn(Arrays.asList(attributeArr)).andProjectIdEqualTo(projects.get(0).getId());
List<CitTbam> citTbams = citTbamMapper.selectByExample(citTbamExample);
BigDecimal businessIncome = new BigDecimal(0.000000);
for (CitTbam citTbam : citTbams) {
businessIncome.add(citTbam.getEndingBalance());
}
totalBusinessIncome.add(businessIncome);
citDistribution.setBusinessIncome(businessIncome);
//2.3 获取该机构该期间的职工薪酬--WP008职工薪酬表的“职工薪酬”的小计项D20抓取,系统原有的方法
BigDecimal wp008CellValue = reportAnalysisService.getCellValue(projects.get(0).getId(), 0, "CIT.WP008", 20, 4);
citDistribution.setEmployeeRemuneration(wp008CellValue);
totalEmployeeRemuneration.add(wp008CellValue);
//判断当前循环的机构是不是总机构,若是总机构要查找出A200000的15栏
if (org.getCode().equals(project.getCode())){
BigDecimal a200000CellValue = reportAnalysisService.getCellValue(projects.get(0).getId(), 0, "CIT.A200000", 25, 3);
sixRowGCouValue.add(a200000CellValue);
}
CitBalanceSheetPrcAdjustExample citBsExample = new CitBalanceSheetPrcAdjustExample();
citBsExample.createCriteria().andProjectIdEqualTo(projects.get(0).getId()).andItemNameEqualTo("非流动资产合计");
List<CitBalanceSheetPrcAdjust> citBalanceSheetPrcAdjusts = citBsPrcAdjustMapper.selectByExample(citBsExample);
citDistribution.setTotalAssets(citBalanceSheetPrcAdjusts == null||citBalanceSheetPrcAdjusts.size()==0 ? new BigDecimal(0.000000):citBalanceSheetPrcAdjusts.get(0).getBegBal());
totalTotalAssets.add(citDistribution.getTotalAssets());
citDistributionList.add(citDistribution);
}
//计算各个机构的分配比例及分配税额
for (CitDistribution citDistribution : citDistributionList) {
//计算分配比例
citDistribution.setDistributionRatio(citDistribution.getBusinessIncome().
divide(totalBusinessIncome.compareTo(compareVariable)==0?new BigDecimal(1):totalBusinessIncome).multiply(new BigDecimal("0.35")).
add(citDistribution.getEmployeeRemuneration().divide(totalEmployeeRemuneration.compareTo(compareVariable)==0?new BigDecimal(1):totalEmployeeRemuneration).
multiply(new BigDecimal("0.35"))).
add(citDistribution.getTotalAssets().divide(totalTotalAssets.compareTo(compareVariable)==0?new BigDecimal(1):totalTotalAssets).multiply(new BigDecimal("0.30"))));
//拼写分配比例的公式
StringBuilder sb = new StringBuilder();
sb.append(citDistribution.getBusinessIncome());
sb.append("/");
sb.append(totalBusinessIncome);
sb.append("*0.35");
sb.append("+");
sb.append(citDistribution.getEmployeeRemuneration());
sb.append("/");
sb.append(totalEmployeeRemuneration);
sb.append("*0.35");
sb.append("+");
sb.append(citDistribution.getTotalAssets());
sb.append("/");
sb.append(totalTotalAssets);
sb.append("*0.30");
citDistribution.setDistributionRatioFormula(citDistribution.getBusinessIncome().toString());
//计算分配税额
citDistribution.setDistributionAmount(sixRowGCouValue.multiply(citDistribution.getDistributionRatio()));
totalDistributionAmount.add(citDistribution.getDistributionAmount());
// TODO 拼写分配税额的计算公式
}
citDistributionList.stream().forEach(citDistribution -> {
int insert = citDistributionMapper.insertSelective(citDistribution);
});
citDistributionDto.setTotalBusinessIncome(totalBusinessIncome);
citDistributionDto.setTotalEmployeeRemuneration(totalEmployeeRemuneration);
citDistributionDto.setTotalTotalAssets(totalTotalAssets);
}
return citDistributionDto;
}
/**
* 报表导出及上传保存所用
* @param reportIds
* @param projectId
* @param period
* @return
*/
public Workbook generateReportData(List<Long> reportIds, String projectId, Integer period) {
PeriodReportExample reportExample = new PeriodReportExample();
reportExample.createCriteria().andIdIn(reportIds);
......
......@@ -261,7 +261,7 @@ public class DidiFileUploadService extends BaseService {
String[] params = tmpPost.getURI().getQuery().split("&");
Long time = new Long(params[0].replace("expire=", ""));
Date useFullDate = new Date();
useFullDate.setTime(new Date().getTime() + time - 7200);
useFullDate.setTime(new Date().getTime() + time - (3600*1000*24*2));
fileUpload.setUsefulEndTime(useFullDate);
return fileUpload;
}
......
......@@ -812,7 +812,7 @@ public class EbsApiServiceImpl implements EbsApiService {
public void changeCallBackStatus(EbsCallBackDto ebsCallBackDto) {
DataImportLog dataImportLog = new DataImportLog();
dataImportLog.setId(ebsCallBackDto.getTaskId());
dataImportLog.setImportResult(ebsCallBackDto.getTaskStatus().equals("S")?true:false);
dataImportLog.setImportResult("S".equals(ebsCallBackDto.getTaskStatus())?true:false);
dataImportLog.setErrorMsg(ebsCallBackDto.getTaskDesc());
dataImportLog.setUpdateTime(new Date());
int res = dataImportLogMapper.updateByPrimaryKeySelective(dataImportLog);
......
......@@ -1231,10 +1231,9 @@ public class TaxDocumentServiceImpl {
while ((len = is.read(buff)) != -1) {
os.write(buff, 0, len);
}
os.flush();
os.toByteArray();
dUrlData = Base64.getEncoder().encodeToString(os.toByteArray());
os.flush();
} catch (IOException e) {
log.error(e.getMessage());
throw new RuntimeException("pdf转换错误");
......
package pwc.taxtech.atms.service.impl;
import org.springframework.stereotype.Service;
import pwc.taxtech.atms.dao.WfRecordDetailMapper;
import pwc.taxtech.atms.dao.WfRecordMapper;
import javax.annotation.Resource;
@Service
public class WorkflowService extends BaseService {
@Resource
private WfRecordMapper wfRecordMapper;
@Resource
private WfRecordDetailMapper wfRecordDetailMapper;
}
......@@ -57,7 +57,6 @@ import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.*;
import java.math.BigDecimal;
import java.text.NumberFormat;
import java.util.*;
import java.util.concurrent.BlockingQueue;
import java.util.concurrent.LinkedBlockingQueue;
......@@ -358,27 +357,24 @@ public class ReportServiceImpl extends BaseService {
invoiceRecordMapper.clearRevenueCof(true, true, delExample);
}
Map<String, Long> map = new HashMap<>();
// Map<String, Long> map = new HashMap<>();
for (RevenueTypeMapping mapping : mappingList) {
if (!map.containsKey(mapping.getContent())) {
RevenueConfigExample configExample = new RevenueConfigExample();
configExample.createCriteria().andNameEqualTo(mapping.getRevenueTypeName()).
andStatusEqualTo(0).andOrgIdEqualTo(mapping.getOrgId()).
andStartDateLessThanOrEqualTo(queryDate).andEndDateGreaterThanOrEqualTo(queryDate);
List<RevenueConfig> configs = revenueConfigMapper.selectByExample(configExample);
if (CollectionUtils.isNotEmpty(configs)) {
map.put(mapping.getContent(), configs.get(0).getId());
if(CollectionUtils.isNotEmpty(configs)){
InvoiceRecord destRecord = new InvoiceRecord();
destRecord.setRevenueCofId(configs.get(0).getId());
InvoiceRecordExample recordExample = new InvoiceRecordExample();
recordExample.createCriteria().andProjectIdEqualTo(projectId)
.andOrganizationIdEqualTo(mapping.getOrgId()).andBillingContentEqualTo(mapping.getContent())
.andTaxRateEqualTo(mapping.getTaxRate())
.andDepartmentEqualTo(mapping.getOuName())
.andPeriodEqualTo(Integer.valueOf(queryDate.replace("-", "")));
invoiceRecordMapper.updateByExampleSelective(destRecord, recordExample);
}
}
if (map.containsKey(mapping.getContent())) {
InvoiceRecord destRecord = new InvoiceRecord();
destRecord.setRevenueCofId(map.get(mapping.getContent()));
InvoiceRecordExample recordExample = new InvoiceRecordExample();
recordExample.createCriteria().andProjectIdEqualTo(projectId)
.andOrganizationIdEqualTo(mapping.getOrgId()).andBillingContentEqualTo(mapping.getContent()).
andPeriodEqualTo(Integer.valueOf(queryDate.replace("-", "")));
invoiceRecordMapper.updateByExampleSelective(destRecord, recordExample);
}
}
}
......@@ -877,8 +873,8 @@ public class ReportServiceImpl extends BaseService {
row.getCell(TaxesCalculateReportEnum.Column.Column_4.getIndex()).setCellValue(0.00);
} else if (1 == config.getAccountType()) {//科目
row.getCell(TaxesCalculateReportEnum.Column.Column_4.getIndex()).setCellValue(
"DFFS(\"" + config.getTbSegment3() + "\"," + project.getYear() + "," + period + ",1,\"" + config.getTbSegment5() + "\",\"" + config.getTbSegment6() + "\")-"
+ "JFFS(\"" + config.getTbSegment3() + "\"," + project.getYear() + "," + period + ",1,\"" + config.getTbSegment5() + "\",\"" + config.getTbSegment6() + "\")");
"DFFS(\"" + config.getTbSegment3() + "\"," + project.getYear() + "," + period + ",3,\"" + config.getTbSegment5() + "\",\"" + config.getTbSegment6() + "\")-"
+ "JFFS(\"" + config.getTbSegment3() + "\"," + project.getYear() + "," + period + ",3,\"" + config.getTbSegment5() + "\",\"" + config.getTbSegment6() + "\")");
} else if (2 == config.getAccountType()) {//手工输入
} else {
......@@ -896,9 +892,9 @@ public class ReportServiceImpl extends BaseService {
} else if (3 == config.getTaxBase()) {//手工录入
} else if (4 == config.getTaxBase()) {//借方发生额
row.getCell(TaxesCalculateReportEnum.Column.Column_9.getIndex()).setCellValue("JFFS(\"" + config.getBaseDrCode() + "\"," + project.getYear() + "," + period + ",1,,)");
row.getCell(TaxesCalculateReportEnum.Column.Column_9.getIndex()).setCellValue("JFFS(\"" + config.getBaseDrCode() + "\"," + project.getYear() + "," + period + ",3,,)");
} else if (5 == config.getTaxBase()) {//贷方发生额
row.getCell(TaxesCalculateReportEnum.Column.Column_9.getIndex()).setCellValue("DFFS(\"" + config.getBaseCrCode() + "\"," + project.getYear() + "," + period + ",1,,)");
row.getCell(TaxesCalculateReportEnum.Column.Column_9.getIndex()).setCellValue("DFFS(\"" + config.getBaseCrCode() + "\"," + project.getYear() + "," + period + ",3,,)");
} else {
row.getCell(TaxesCalculateReportEnum.Column.Column_9.getIndex()).setCellValue("");
}
......@@ -934,7 +930,7 @@ public class ReportServiceImpl extends BaseService {
sumStr += cellNum + ",";
}
sumStr += "\")";
sumStr = sumStr.replace(",\")", "\")");
// sumStr = sumStr.replace(",\")", "\")");
sumRow.getCell(entry.getKey()).setCellValue(sumStr);
}
......@@ -2091,16 +2087,17 @@ public class ReportServiceImpl extends BaseService {
PeriodDataSource dataSourceModel = null;
if (dataSourceExtendDtos.size() > 0) {
dataSourceModel = dataSourceExtendDtos.get(0).getDataSource();
dataSourceModel= periodDataSourceMapper.selectByPrimaryKey(dataSourceModel.getId());
if (StringUtils.isBlank(data.getKeyinData()))
updateCellValueForDataSourceChange(dataSourceModel, data.getAmount());
originalAmount = dataSourceModel.getAmount() != null ? dataSourceModel.getAmount() : new BigDecimal("0");
dataSourceModel.setName(data.getName());
dataSourceModel.setDescription(data.getDescription());
dataSourceModel.setAmount(data.getAmount());
dataSourceModel.setAmount(data.getAmount()==null?new BigDecimal(0):data.getAmount());
dataSourceModel.setUpdateBy("Admin");
dataSourceModel.setKeyinData(data.getKeyinData());
dataSourceModel.setUpdateTime(new Date());
periodDataSourceMapper.updateByPrimaryKeySelective(dataSourceModel);
periodDataSourceMapper.updateByPrimaryKey(dataSourceModel);
} else {
dataSourceModel = new PeriodDataSource();
Long cellDataSourceId = distributedIdService.nextId();
......
......@@ -51,8 +51,8 @@ public class KPSR extends FunctionBase implements FreeRefFunction {
private double assembleData(String revenueTypeName, List<OutputInvoiceDataSourceDto> contain, Integer billType, Integer amountType, OperationEvaluationContext ec) {
String queryDate = formulaContext.getYear() + (formulaContext.getPeriod() < 10 ? ("0" + formulaContext.getPeriod()) : (formulaContext.getPeriod() + ""));
String queryPeriod = formulaContext.getYear() + (formulaContext.getPeriod() < 10 ? ("0" + formulaContext.getPeriod()) : (formulaContext.getPeriod() + ""));
String queryDate = formulaContext.getYear() + "-"+(formulaContext.getPeriod() < 10 ? ("0" + formulaContext.getPeriod()) : (formulaContext.getPeriod() + ""));
// List<String> revenueTypes = typeMappingList.stream()
// .map(o -> o.getRevenueTypeName()).collect(Collectors.toList());
RevenueConfigExample configExample = new RevenueConfigExample();
......@@ -78,7 +78,7 @@ public class KPSR extends FunctionBase implements FreeRefFunction {
invoiceRecordExample = new InvoiceRecordExample();
invoiceRecordExample.createCriteria().andRevenueCofIdIn(revenueTypeIds)
.andProjectIdEqualTo(formulaContext.getProjectId())
.andPeriodEqualTo(Integer.valueOf(queryDate))
.andPeriodEqualTo(Integer.valueOf(queryPeriod))
.andTaxRateEqualTo(typeMapping.getTaxRate())
.andDepartmentEqualTo(typeMapping.getOuName())
.andInvoiceTypeEqualTo(InvoiceRecordEnum.InvoiceType.MAPPING.get(billType));
......@@ -95,7 +95,7 @@ public class KPSR extends FunctionBase implements FreeRefFunction {
invoiceRecordExample = new InvoiceRecordExample();
invoiceRecordExample.createCriteria().andModifyRevenueCofIdIn(revenueTypeIds)
.andProjectIdEqualTo(formulaContext.getProjectId())
.andPeriodEqualTo(Integer.valueOf(queryDate))
.andPeriodEqualTo(Integer.valueOf(queryPeriod))
.andTaxRateEqualTo(typeMapping.getTaxRate())
.andDepartmentEqualTo(typeMapping.getOuName())
.andInvoiceTypeEqualTo(InvoiceRecordEnum.InvoiceType.MAPPING.get(billType));
......
......@@ -106,7 +106,7 @@ public class TBM extends FunctionBase implements FreeRefFunction {
dto.setAmount(balance.getEndBalBeq().multiply(new BigDecimal(-1)));
}
}
amount = amount.add(dto.getAmount());
amount = amount.add(dto.getAmount()==null?(new BigDecimal(0)):dto.getAmount());
dto.setPeriod(period);
dto.setIsOnlyManualInput(Boolean.FALSE);
dto.setName(Constant.DataSourceName.ReportDataSource);
......@@ -182,7 +182,7 @@ public class TBM extends FunctionBase implements FreeRefFunction {
dto.setAmount(balance.getEndBalBeq().multiply(new BigDecimal(-1)));
}
}
amount = amount.add(dto.getAmount());
amount = amount.add(dto.getAmount()==null?(new BigDecimal(0)):dto.getAmount());
dto.setPeriod(period);
dto.setIsOnlyManualInput(Boolean.FALSE);
dto.setName(Constant.DataSourceName.ReportDataSource);
......
......@@ -2,7 +2,7 @@
<definitions xmlns="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:activiti="http://activiti.org/bpmn" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlns:dc="http://www.omg.org/spec/DD/20100524/DC" xmlns:di="http://www.omg.org/spec/DD/20100524/DI" xmlns:tns="http://www.activiti.org/testm1539848247913" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" expressionLanguage="http://www.w3.org/1999/XPath" id="m1539848247913" name="" targetNamespace="http://www.activiti.org/testm1539848247913" typeLanguage="http://www.w3.org/2001/XMLSchema">
<process id="approvalProcess" isClosed="false" isExecutable="true" name="ApprovalProcess" processType="None">
<startEvent id="_2" name="StartEvent"/>
<userTask activiti:assignee="accountant" activiti:exclusive="true" id="_3" name="税务会计"/>
<userTask activiti:assignee="accountant" activiti:candidateGroups="role1,role2,role3" activiti:exclusive="true" id="_3" name="税务会计"/>
<sequenceFlow id="_4" sourceRef="_2" targetRef="_3"/>
<userTask activiti:assignee="manager" activiti:exclusive="true" id="_5" name="税务经理"/>
<endEvent id="_7" name="EndEvent"/>
......@@ -23,6 +23,7 @@
<sequenceFlow id="_16" name="已提交" sourceRef="_11" targetRef="_9">
<conditionExpression xsi:type="tFormalExpression"><![CDATA[${committed==1}]]></conditionExpression>
</sequenceFlow>
<serviceTask activiti:exclusive="true" id="_6" name="ServiceTask"/>
</process>
<bpmndi:BPMNDiagram documentation="background=#FFFFFF;count=1;horizontalcount=1;orientation=0;width=842.4;height=1195.2;imageableWidth=832.4;imageableHeight=1185.2;imageableX=5.0;imageableY=5.0" id="Diagram-_1" name="New Diagram">
<bpmndi:BPMNPlane bpmnElement="approvalProcess">
......@@ -68,50 +69,56 @@
<dc:Bounds height="32.0" width="32.0" x="0.0" y="0.0"/>
</bpmndi:BPMNLabel>
</bpmndi:BPMNShape>
<bpmndi:BPMNShape bpmnElement="_6" id="Shape-_6">
<dc:Bounds height="55.0" width="85.0" x="255.0" y="145.0"/>
<bpmndi:BPMNLabel>
<dc:Bounds height="55.0" width="85.0" x="0.0" y="0.0"/>
</bpmndi:BPMNLabel>
</bpmndi:BPMNShape>
<bpmndi:BPMNEdge bpmnElement="_13" id="BPMNEdge__13" sourceElement="_5" targetElement="_12">
<di:waypoint x="510.0" y="192.5"/>
<di:waypoint x="495.0" y="192.5"/>
<di:waypoint x="640.0" y="191.0"/>
<bpmndi:BPMNLabel>
<dc:Bounds height="0.0" width="0.0" x="0.0" y="0.0"/>
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge bpmnElement="_15" id="BPMNEdge__15" sourceElement="_11" targetElement="_5">
<di:waypoint x="456.0" y="365.0"/>
<di:waypoint x="456.0" y="380.0"/>
<di:waypoint x="456.0" y="220.0"/>
<bpmndi:BPMNLabel>
<dc:Bounds height="0.0" width="0.0" x="0.0" y="0.0"/>
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge bpmnElement="_14" id="BPMNEdge__14" sourceElement="_3" targetElement="_11">
<di:waypoint x="290.0" y="397.5"/>
<di:waypoint x="275.0" y="397.5"/>
<di:waypoint x="440.0" y="396.0"/>
<bpmndi:BPMNLabel>
<dc:Bounds height="0.0" width="0.0" x="0.0" y="0.0"/>
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge bpmnElement="_16" id="BPMNEdge__16" sourceElement="_11" targetElement="_9">
<di:waypoint x="487.0" y="396.0"/>
<di:waypoint x="472.0" y="396.0"/>
<di:waypoint x="760.0" y="396.0"/>
<bpmndi:BPMNLabel>
<dc:Bounds height="0.0" width="0.0" x="0.0" y="0.0"/>
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge bpmnElement="_4" id="BPMNEdge__4" sourceElement="_2" targetElement="_3">
<di:waypoint x="97.0" y="396.0"/>
<di:waypoint x="82.0" y="396.0"/>
<di:waypoint x="190.0" y="397.5"/>
<bpmndi:BPMNLabel>
<dc:Bounds height="0.0" width="0.0" x="0.0" y="0.0"/>
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge bpmnElement="_8" id="BPMNEdge__8" sourceElement="_12" targetElement="_7">
<di:waypoint x="687.0" y="191.0"/>
<di:waypoint x="672.0" y="191.0"/>
<di:waypoint x="765.0" y="121.0"/>
<bpmndi:BPMNLabel>
<dc:Bounds height="0.0" width="0.0" x="0.0" y="0.0"/>
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge bpmnElement="_10" id="BPMNEdge__10" sourceElement="_12" targetElement="_9">
<di:waypoint x="687.0" y="191.0"/>
<di:waypoint x="672.0" y="191.0"/>
<di:waypoint x="760.0" y="396.0"/>
<bpmndi:BPMNLabel>
<dc:Bounds height="0.0" width="0.0" x="0.0" y="0.0"/>
......
......@@ -62,17 +62,16 @@ dd_pubkey=MFwwDQYJKoZIhvcNAQEBBQADSwAwSAJBAKUfMPRKV6I5num1dDWcxTrgTjXf5LctsVj0Cp
ebs_call_url=http://172.20.3.109:8010/ebs-proxy-test/dts
#tableau config
tableau_get_ticket=http://47.94.233.173:16010/trusted?username=%s
tableau_unreturned_tax=http://10.158.230.16:8890/trusted/%s/views/Didi_Tax_20190307/sheet8?iframeSizedToWindow=true&:embed=y&:showAppBanner=false&:display_count=no&:showVizHome=no&:toolbar=no
tableau_tax_comparison=http://10.158.230.16:8890/trusted/%s/views/Didi_Tax_20190307/sheet14?iframeSizedToWindow=true&:embed=y&:showAppBanner=false&:display_count=no&:showVizHome=no&:toolbar=no
tableau_other_countries=http://10.158.230.16:8890/trusted/%s/views/Didi_Tax_20190307/Others?iframeSizedToWindow=true&:embed=y&:showAppBanner=false&:display_count=no&:showVizHome=no&:toolbar=no
tableau_cost_analysis=http://10.158.230.16:8890/trusted/%s/views/Didi_Tax_20190307/sheet19?iframeSizedToWindow=true&:embed=y&:showAppBanner=false&:display_count=no&:showVizHome=no&:toolbar=no
tableau_profit_and_loss=http://10.158.230.16:8890/trusted/%s/views/Didi_Tax_20190307/sheet26?iframeSizedToWindow=true&:embed=y&:showAppBanner=false&:display_count=no&:showVizHome=no&:toolbar=no
tableau_other_domestic_data=http://10.158.230.16:8890/trusted/%s/views/Didi_Tax_20190307/sheet32?iframeSizedToWindow=true&:embed=y&:showAppBanner=false&:display_count=no&:showVizHome=no&:toolbar=no
tableau_doc_situation=http://10.158.230.16:8890/trusted/%s/views/Didi_Tax_20190307/sheet40?iframeSizedToWindow=true&:embed=y&:showAppBanner=false&:display_count=no&:showVizHome=no&:toolbar=no
tableau_global_overview=http://10.158.230.16:8890/trusted/%s/views/Didi_Tax_20190307/InternationalOverview?iframeSizedToWindow=true&:embed=y&:showAppBanner=false&:display_count=no&:showVizHome=no&:toolbar=no
tableau_mexican_tax=http://10.158.230.16:8890/trusted/%s/views/Didi_Tax_20190307/Mexico?iframeSizedToWindow=true&:embed=y&:showAppBanner=false&:display_count=no&:showVizHome=no&:toolbar=no
tableau_australian_tax=http://10.158.230.16:8890/trusted/%s/views/Didi_Tax_20190307/Australia?iframeSizedToWindow=true&:embed=y&:showAppBanner=false&:display_count=no&:showVizHome=no&:toolbar=no
tableau_brazilian_tax=http://10.158.230.16:8890/trusted/%s/views/Didi_Tax_20190307/Brazil?iframeSizedToWindow=true&:embed=y&:showAppBanner=false&:display_count=no&:showVizHome=no&:toolbar=no
tableau_get_ticket=http://172.20.2.220:8080/trusted?username=%s
tableau_unreturned_tax=http://172.20.201.98:8090/trusted/%s/views/UAT_20190409/sheet0?iframeSizedToWindow=true&:embed=y&:showAppBanner=false&:display_count=no&:showVizHome=no&:toolbar=no
tableau_tax_comparison=http://172.20.201.98:8090/trusted/%s/views/UAT_20190409/sheet3?iframeSizedToWindow=true&:embed=y&:showAppBanner=false&:display_count=no&:showVizHome=no&:toolbar=no
tableau_other_countries=http://172.20.201.98:8090/trusted/%s/views/UAT_20190409/Others?iframeSizedToWindow=true&:embed=y&:showAppBanner=false&:display_count=no&:showVizHome=no&:toolbar=no
tableau_cost_analysis=http://172.20.201.98:8090/trusted/%s/views/UAT_20190409/sheet4?iframeSizedToWindow=true&:embed=y&:showAppBanner=false&:display_count=no&:showVizHome=no&:toolbar=no
tableau_profit_and_loss=http://172.20.201.98:8090/trusted/%s/views/UAT_20190409/sheet5?iframeSizedToWindow=true&:embed=y&:showAppBanner=false&:display_count=no&:showVizHome=no&:toolbar=no
tableau_other_domestic_data=http://172.20.201.98:8090/trusted/%s/views/UAT_20190409/sheet7?iframeSizedToWindow=true&:embed=y&:showAppBanner=false&:display_count=no&:showVizHome=no&:toolbar=no
tableau_doc_situation=http://172.20.201.98:8090/trusted/%s/views/UAT_20190409/sheet9?iframeSizedToWindow=true&:embed=y&:showAppBanner=false&:display_count=no&:showVizHome=no&:toolbar=no
tableau_global_overview=http://172.20.201.98:8090/trusted/%s/views/UAT_20190409/InternationalOverview?iframeSizedToWindow=true&:embed=y&:showAppBanner=false&:display_count=no&:showVizHome=no&:toolbar=no
tableau_mexican_tax=http://172.20.201.98:8090/trusted/%s/views/UAT_20190409/Mexico?iframeSizedToWindow=true&:embed=y&:showAppBanner=false&:display_count=no&:showVizHome=no&:toolbar=no
tableau_australian_tax=http://172.20.201.98:8090/trusted/%s/views/UAT_20190409/Australia?iframeSizedToWindow=true&:embed=y&:showAppBanner=false&:display_count=no&:showVizHome=no&:toolbar=no
tableau_brazilian_tax=http://172.20.201.98:8090/trusted/%s/views/UAT_20190409/Brazil?iframeSizedToWindow=true&:embed=y&:showAppBanner=false&:display_count=no&:showVizHome=no&:toolbar=no
tableau_dashboard=http://10.158.230.16:8890/trusted/%s/views/Didi_Tax_20190307/Brazil?iframeSizedToWindow=true&:embed=y&:showAppBanner=false&:display_count=no&:showVizHome=no&:toolbar=no
......@@ -63,16 +63,16 @@ ebs_call_url=http://172.20.201.98:8020/ebs-proxy-test/dts
#tableau config
tableau_get_ticket=http://172.20.201.98:8090/trusted?username=%s
tableau_unreturned_tax=http://172.20.201.98:8090/trusted/%s/views/UAT_20190409/sheet0?iframeSizedToWindow=true&:embed=y&:showAppBanner=false&:display_count=no&:showVizHome=no&:toolbar=no
tableau_tax_comparison=http://172.20.201.98:8090/trusted/%s/views/UAT_20190409/sheet3?iframeSizedToWindow=true&:embed=y&:showAppBanner=false&:display_count=no&:showVizHome=no&:toolbar=no
tableau_unreturned_tax=http://172.20.201.98:8090/trusted/%s/views/UAT_20190409/sheet11?iframeSizedToWindow=true&:embed=y&:showAppBanner=false&:display_count=no&:showVizHome=no&:toolbar=no
tableau_tax_comparison=http://172.20.201.98:8090/trusted/%s/views/UAT_20190409/sheet19?iframeSizedToWindow=true&:embed=y&:showAppBanner=false&:display_count=no&:showVizHome=no&:toolbar=no
tableau_other_countries=http://172.20.201.98:8090/trusted/%s/views/UAT_20190409/Others?iframeSizedToWindow=true&:embed=y&:showAppBanner=false&:display_count=no&:showVizHome=no&:toolbar=no
tableau_cost_analysis=http://172.20.201.98:8090/trusted/%s/views/UAT_20190409/sheet4?iframeSizedToWindow=true&:embed=y&:showAppBanner=false&:display_count=no&:showVizHome=no&:toolbar=no
tableau_profit_and_loss=http://172.20.201.98:8090/trusted/%s/views/UAT_20190409/sheet5?iframeSizedToWindow=true&:embed=y&:showAppBanner=false&:display_count=no&:showVizHome=no&:toolbar=no
tableau_other_domestic_data=http://172.20.201.98:8090/trusted/%s/views/UAT_20190409/sheet7?iframeSizedToWindow=true&:embed=y&:showAppBanner=false&:display_count=no&:showVizHome=no&:toolbar=no
tableau_doc_situation=http://172.20.201.98:8090/trusted/%s/views/UAT_20190409/sheet9?iframeSizedToWindow=true&:embed=y&:showAppBanner=false&:display_count=no&:showVizHome=no&:toolbar=no
tableau_cost_analysis=http://172.20.201.98:8090/trusted/%s/views/UAT_20190409/sheet24?iframeSizedToWindow=true&:embed=y&:showAppBanner=false&:display_count=no&:showVizHome=no&:toolbar=no
tableau_profit_and_loss=http://172.20.201.98:8090/trusted/%s/views/UAT_20190409/sheet31?iframeSizedToWindow=true&:embed=y&:showAppBanner=false&:display_count=no&:showVizHome=no&:toolbar=no
tableau_other_domestic_data=http://172.20.201.98:8090/trusted/%s/views/UAT_20190409/sheet39?iframeSizedToWindow=true&:embed=y&:showAppBanner=false&:display_count=no&:showVizHome=no&:toolbar=no
tableau_doc_situation=http://172.20.201.98:8090/trusted/%s/views/UAT_20190409/sheet42?iframeSizedToWindow=true&:embed=y&:showAppBanner=false&:display_count=no&:showVizHome=no&:toolbar=no
tableau_global_overview=http://172.20.201.98:8090/trusted/%s/views/UAT_20190409/InternationalOverview?iframeSizedToWindow=true&:embed=y&:showAppBanner=false&:display_count=no&:showVizHome=no&:toolbar=no
tableau_mexican_tax=http://172.20.201.98:8090/trusted/%s/views/UAT_20190409/Mexico?iframeSizedToWindow=true&:embed=y&:showAppBanner=false&:display_count=no&:showVizHome=no&:toolbar=no
tableau_australian_tax=http://172.20.201.98:8090/trusted/%s/views/UAT_20190409/Australia?iframeSizedToWindow=true&:embed=y&:showAppBanner=false&:display_count=no&:showVizHome=no&:toolbar=no
tableau_brazilian_tax=http://172.20.201.98:8090/trusted/%s/views/UAT_20190409/Brazil?iframeSizedToWindow=true&:embed=y&:showAppBanner=false&:display_count=no&:showVizHome=no&:toolbar=no
tableau_dashboard=http://10.158.230.16:8890/trusted/%s/views/Didi_Tax_20190307/Brazil?iframeSizedToWindow=true&:embed=y&:showAppBanner=false&:display_count=no&:showVizHome=no&:toolbar=no
tableau_dashboard=http://172.20.201.98:8090/trusted/%s/views/UAT_20190409_MonthlyReport/Dashboard?iframeSizedToWindow=true&:embed=y&:showAppBanner=false&:display_count=no&:showVizHome=no&:toolbar=no
......@@ -8,13 +8,13 @@
<!-- <classPathEntry location="../hsqldb/hsqldb-2.3.5.jar" /> -->
<context id="contextId" targetRuntime="MyBatis3">
<!-- 考虑需要兼容DB2与ORCAL数据库, 大部份字段不需要加双引号,autoDelimitKeywords设置为false -->
<property name="autoDelimitKeywords" value="false"/>
<property name="autoDelimitKeywords" value="true"/>
<property name="javaFileEncoding" value="UTF-8"/>
<!-- beginningDelimiter和endingDelimiter:指明数据库的用于标记数据库对象名的符号,比如ORACLE就是双引号,MYSQL默认是`反引号; -->
<property name="beginningDelimiter" value="`"/>
<property name="endingDelimiter" value="`"/>
<plugin type="org.mybatis.generator.plugins.MapperAnnotationPlugin"/>
<plugin type="org.mybatis.generator.plugins.RowBoundsPlugin"/>
<!-- <plugin type="org.mybatis.generator.plugins.RowBoundsPlugin"/>-->
<plugin type="org.mybatis.generator.plugins.ToStringPlugin"/>
<plugin type="org.mybatis.generator.plugins.SerializablePlugin"/>
<commentGenerator>
......@@ -41,13 +41,26 @@
<property name="rootInterface" value="pwc.taxtech.atms.MyMapper"/>
</javaClientGenerator>
<table tableName="data_import_log" domainObjectName="DataImportLog">
<table tableName="wf_record" domainObjectName="WfRecord">
<property name="useActualColumnNames" value="false"/>
<property name="ignoreQualifiersAtRuntime" value="true"/>
<columnOverride column="period" javaType="java.lang.Integer" jdbcType="TINYINT"/>
<columnOverride column="type" javaType="java.lang.Integer" jdbcType="TINYINT"/>
<columnOverride column="tms_period_month" javaType="java.lang.Integer" jdbcType="TINYINT"/>
<columnOverride column="period_month" javaType="java.lang.Integer" jdbcType="TINYINT"/>
<columnOverride column="status" javaType="java.lang.Integer" jdbcType="TINYINT"/>
</table>
<table tableName="wf_record_detail" domainObjectName="WfRecordDetail">
<property name="useActualColumnNames" value="false"/>
<property name="ignoreQualifiersAtRuntime" value="true"/>
<columnOverride column="status" javaType="java.lang.Integer" jdbcType="TINYINT"/>
</table>
<!-- <table tableName="data_import_log" domainObjectName="DataImportLog">-->
<!-- <property name="useActualColumnNames" value="false"/>-->
<!-- <property name="ignoreQualifiersAtRuntime" value="true"/>-->
<!-- <columnOverride column="type" javaType="java.lang.Integer" jdbcType="TINYINT"/>-->
<!-- <columnOverride column="tms_period_month" javaType="java.lang.Integer" jdbcType="TINYINT"/>-->
<!-- <columnOverride column="period_month" javaType="java.lang.Integer" jdbcType="TINYINT"/>-->
<!-- </table>-->
<!--<table tableName="analysis_expected_tax_return" domainObjectName="AnalysisExpectedTaxReturn">-->
<!--<property name="useActualColumnNames" value="false"/>-->
......
......@@ -119,7 +119,7 @@ public interface CitAssetsListMapper extends MyMapper {
*/
List<CitAssetEamMapping> getAssetEamMapping(CitAssetsList citAsset);
List<CitAssetDetailResultDto> getCitAssetDetialResult(@Param("assetType") Integer assetType,
CitAssetDetailResultDto getCitAssetDetialResult(@Param("assetType") Integer assetType,
@Param("assetDetailType") Integer assetDetailType,
@Param("projectId") String projectId);
......
package pwc.taxtech.atms.dao;
import java.util.List;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import pwc.taxtech.atms.MyMapper;
import pwc.taxtech.atms.entity.WfRecordDetail;
import pwc.taxtech.atms.entity.WfRecordDetailExample;
@Mapper
public interface WfRecordDetailMapper extends MyMapper {
long countByExample(WfRecordDetailExample example);
int deleteByExample(WfRecordDetailExample example);
int deleteByPrimaryKey(Long id);
int insert(WfRecordDetail record);
int insertSelective(WfRecordDetail record);
List<WfRecordDetail> selectByExample(WfRecordDetailExample example);
WfRecordDetail selectByPrimaryKey(Long id);
int updateByExampleSelective(@Param("record") WfRecordDetail record, @Param("example") WfRecordDetailExample example);
int updateByExample(@Param("record") WfRecordDetail record, @Param("example") WfRecordDetailExample example);
int updateByPrimaryKeySelective(WfRecordDetail record);
int updateByPrimaryKey(WfRecordDetail record);
}
\ No newline at end of file
package pwc.taxtech.atms.dao;
import java.util.List;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import pwc.taxtech.atms.MyMapper;
import pwc.taxtech.atms.entity.WfRecord;
import pwc.taxtech.atms.entity.WfRecordExample;
@Mapper
public interface WfRecordMapper extends MyMapper {
long countByExample(WfRecordExample example);
int deleteByExample(WfRecordExample example);
int deleteByPrimaryKey(Long id);
int insert(WfRecord record);
int insertSelective(WfRecord record);
List<WfRecord> selectByExample(WfRecordExample example);
WfRecord selectByPrimaryKey(Long id);
int updateByExampleSelective(@Param("record") WfRecord record, @Param("example") WfRecordExample example);
int updateByExample(@Param("record") WfRecord record, @Param("example") WfRecordExample example);
int updateByPrimaryKeySelective(WfRecord record);
int updateByPrimaryKey(WfRecord record);
}
\ No newline at end of file
package pwc.taxtech.atms.entity;
import java.io.Serializable;
public class WfRecord extends BaseEntity implements Serializable {
/**
*
*/
private Long id;
/**
* 机构ID
*/
private String orgId;
/**
* 项目ID
*/
private Long projectId;
/**
* 年
*/
private Integer year;
/**
* 期间
*/
private Integer period;
/**
* 类型 0:通用 1:VAT 2:CIT 3:税金计算表
*/
private Integer type;
/**
* ACT实例ID
*/
private String actInstId;
/**
* 状态 0:审批中 1:通过 2:驳回
*/
private Integer status;
/**
* 流程发起人ID
*/
private String uid;
/**
* 备注
*/
private String comment;
/**
* wf_record
*/
private static final long serialVersionUID = 1L;
/**
* @return id
*/
public Long getId() {
return id;
}
/**
* @param id
*/
public void setId(Long id) {
this.id = id;
}
/**
* @return org_id 机构ID
*/
public String getOrgId() {
return orgId;
}
/**
* @param orgId 机构ID
*/
public void setOrgId(String orgId) {
this.orgId = orgId == null ? null : orgId.trim();
}
/**
* @return project_id 项目ID
*/
public Long getProjectId() {
return projectId;
}
/**
* @param projectId 项目ID
*/
public void setProjectId(Long projectId) {
this.projectId = projectId;
}
/**
* @return year 年
*/
public Integer getYear() {
return year;
}
/**
* @param year 年
*/
public void setYear(Integer year) {
this.year = year;
}
/**
* @return period 期间
*/
public Integer getPeriod() {
return period;
}
/**
* @param period 期间
*/
public void setPeriod(Integer period) {
this.period = period;
}
/**
* @return type 类型 0:通用 1:VAT 2:CIT 3:税金计算表
*/
public Integer getType() {
return type;
}
/**
* @param type 类型 0:通用 1:VAT 2:CIT 3:税金计算表
*/
public void setType(Integer type) {
this.type = type;
}
/**
* @return act_inst_id ACT实例ID
*/
public String getActInstId() {
return actInstId;
}
/**
* @param actInstId ACT实例ID
*/
public void setActInstId(String actInstId) {
this.actInstId = actInstId == null ? null : actInstId.trim();
}
/**
* @return status 状态 0:审批中 1:通过 2:驳回
*/
public Integer getStatus() {
return status;
}
/**
* @param status 状态 0:审批中 1:通过 2:驳回
*/
public void setStatus(Integer status) {
this.status = status;
}
/**
* @return uid 流程发起人ID
*/
public String getUid() {
return uid;
}
/**
* @param uid 流程发起人ID
*/
public void setUid(String uid) {
this.uid = uid == null ? null : uid.trim();
}
/**
* @return comment 备注
*/
public String getComment() {
return comment;
}
/**
* @param comment 备注
*/
public void setComment(String comment) {
this.comment = comment == null ? null : comment.trim();
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append(getClass().getSimpleName());
sb.append(" [");
sb.append("Hash = ").append(hashCode());
sb.append(", id=").append(id);
sb.append(", orgId=").append(orgId);
sb.append(", projectId=").append(projectId);
sb.append(", year=").append(year);
sb.append(", period=").append(period);
sb.append(", type=").append(type);
sb.append(", actInstId=").append(actInstId);
sb.append(", status=").append(status);
sb.append(", uid=").append(uid);
sb.append(", comment=").append(comment);
sb.append("]");
return sb.toString();
}
}
\ No newline at end of file
package pwc.taxtech.atms.entity;
import java.io.Serializable;
public class WfRecordDetail extends BaseEntity implements Serializable {
/**
*
*/
private Long id;
/**
* 工作流主表ID
*/
private Long recordId;
/**
* ACT实例ID
*/
private String actInstId;
/**
* ACT任务ID
*/
private String actTaskId;
/**
* UID
*/
private String uid;
/**
* 状态 0:审批中 1:通过 2:驳回
*/
private Integer status;
/**
* 备注
*/
private String comment;
/**
* wf_record_detail
*/
private static final long serialVersionUID = 1L;
/**
* @return id
*/
public Long getId() {
return id;
}
/**
* @param id
*/
public void setId(Long id) {
this.id = id;
}
/**
* @return record_id 工作流主表ID
*/
public Long getRecordId() {
return recordId;
}
/**
* @param recordId 工作流主表ID
*/
public void setRecordId(Long recordId) {
this.recordId = recordId;
}
/**
* @return act_inst_id ACT实例ID
*/
public String getActInstId() {
return actInstId;
}
/**
* @param actInstId ACT实例ID
*/
public void setActInstId(String actInstId) {
this.actInstId = actInstId == null ? null : actInstId.trim();
}
/**
* @return act_task_id ACT任务ID
*/
public String getActTaskId() {
return actTaskId;
}
/**
* @param actTaskId ACT任务ID
*/
public void setActTaskId(String actTaskId) {
this.actTaskId = actTaskId == null ? null : actTaskId.trim();
}
/**
* @return uid UID
*/
public String getUid() {
return uid;
}
/**
* @param uid UID
*/
public void setUid(String uid) {
this.uid = uid == null ? null : uid.trim();
}
/**
* @return status 状态 0:审批中 1:通过 2:驳回
*/
public Integer getStatus() {
return status;
}
/**
* @param status 状态 0:审批中 1:通过 2:驳回
*/
public void setStatus(Integer status) {
this.status = status;
}
/**
* @return comment 备注
*/
public String getComment() {
return comment;
}
/**
* @param comment 备注
*/
public void setComment(String comment) {
this.comment = comment == null ? null : comment.trim();
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append(getClass().getSimpleName());
sb.append(" [");
sb.append("Hash = ").append(hashCode());
sb.append(", id=").append(id);
sb.append(", recordId=").append(recordId);
sb.append(", actInstId=").append(actInstId);
sb.append(", actTaskId=").append(actTaskId);
sb.append(", uid=").append(uid);
sb.append(", status=").append(status);
sb.append(", comment=").append(comment);
sb.append("]");
return sb.toString();
}
}
\ No newline at end of file
......@@ -434,6 +434,9 @@
<if test="record.description != null and record.description != ''">
and description LIKE CONCAT('%' ,#{record.description},'%')
</if>
<if test="record.source != null and record.source != ''">
and source LIKE CONCAT('%' ,#{record.source},'%')
</if>
<if test="record.periodStart!=null">
AND account_period >= #{record.periodStart,jdbcType=INTEGER}
</if>
......@@ -450,7 +453,7 @@
accounted_dr, accounted_cr, entered_dr, entered_cr, cf_item, attribute1, attribute2, attribute3, attribute4, attribute5,
attribute6, attribute7, attribute8, attribute9, attribute10, attribute11, attribute12, attribute13, attribute14, attribute15,
attribute16, created_by, created_date, late_updated_by, late_updated_date, create_time, update_time, is_select
from journal_entry where tms_period like CONCAT('%' ,#{record.period},'%')
from journal_entry where tms_period like CONCAT(#{record.period},'%')
<if test="orgList != null and orgList.size > 0">
AND organization_id in
<foreach item="item" index="index" collection="orgList" open="(" separator="," close=")">
......@@ -466,6 +469,10 @@
<if test="record.description != null and record.description != ''">
and description LIKE CONCAT('%' ,#{record.description},'%')
</if>
<if test="record.source != null and record.source != ''">
and source LIKE CONCAT('%' ,#{record.source},'%')
</if>
<if test="record.periodStart!=null">
AND period &gt;= #{record.periodStart,jdbcType=INTEGER}
</if>
......
......@@ -34,6 +34,7 @@
from cash_flow
where
<include refid="QueryCondition"/>
order by id desc
</select>
<select id="selectCountByCondition" parameterType="pwc.taxtech.atms.vat.dpo.CashFlowCondition" resultType="Integer">
select
......
......@@ -23,7 +23,8 @@
when tbf.segment3 like '4001%' and rc.id is null then 1
when tbf.segment3 like '4002%' and rc.id is null then 1
when tbf.segment3 like '4010%' and rc.id is null then 1
when tbf.segment3 like '8002%' and rc.id is null then 1
when tbf.segment3 like '800201%' and rc.id is null then 1
when tbf.segment3 like '800209%' and rc.id is null then 1
<![CDATA[WHEN rc.id IS NOT NULL and (rc.start_date > #{queryDate} or rc.end_date < #{queryDate}) then 1]]>
<![CDATA[WHEN rc.id IS NOT NULL and rc.start_date <= #{queryDate} and rc.end_date >= #{queryDate} THEN 2]]>
else 3 end as emptyCode
......
......@@ -16,7 +16,7 @@ public class MyBatisGeneratorTest {
List<String> warnings = new ArrayList<>();
boolean overwrite = true;
//配置文件
// File configFile = new File(MyBatisGeneratorTest.class.getClassLoader().getResource("generatorConfig.xml").getPath());
// File configFile = new File(MyBatisGeneratorTest.class.getClassLoader().getResource("vatGeneratorConfig.xml").getPath());
File configFile = new File(MyBatisGeneratorTest.class.getClassLoader().getResource("generatorConfig.xml").getPath());
ConfigurationParser cp = new ConfigurationParser(warnings);
Configuration config = cp.parseConfiguration(configFile);
......
package pwc.taxtech.atms.gen;
import org.mybatis.generator.api.CommentGenerator;
import org.mybatis.generator.api.IntrospectedColumn;
import org.mybatis.generator.api.IntrospectedTable;
import org.mybatis.generator.api.dom.java.*;
import org.mybatis.generator.api.dom.xml.XmlElement;
import org.mybatis.generator.config.MergeConstants;
import org.mybatis.generator.config.PropertyRegistry;
import org.mybatis.generator.internal.util.StringUtility;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.Properties;
import java.util.Set;
public class SimpleCommentGenerator implements CommentGenerator {
private Properties properties;
// private Properties systemPro;
private boolean suppressDate;
private boolean suppressAllComments;
private String currentDateStr;
public SimpleCommentGenerator() {
super();
properties = new Properties();
// systemPro = System.getProperties();
suppressDate = false;
suppressAllComments = false;
currentDateStr = (new SimpleDateFormat("yyyy-MM-dd")).format(new Date());
}
public void addJavaFileComment(CompilationUnit compilationUnit) {
// add no file level comments by default
}
/**
* Adds a suitable comment to warn users that the element was generated, and
* when it was generated.
*/
public void addComment(XmlElement xmlElement) {
}
public void addRootComment(XmlElement rootElement) {
// add no document level comments by default
}
@Override
public void addGeneralMethodAnnotation(Method method, IntrospectedTable introspectedTable, Set<FullyQualifiedJavaType> imports) {
}
@Override
public void addGeneralMethodAnnotation(Method method, IntrospectedTable introspectedTable, IntrospectedColumn introspectedColumn, Set<FullyQualifiedJavaType> imports) {
}
@Override
public void addFieldAnnotation(Field field, IntrospectedTable introspectedTable, Set<FullyQualifiedJavaType> imports) {
}
@Override
public void addFieldAnnotation(Field field, IntrospectedTable introspectedTable, IntrospectedColumn introspectedColumn, Set<FullyQualifiedJavaType> imports) {
}
@Override
public void addClassAnnotation(InnerClass innerClass, IntrospectedTable introspectedTable, Set<FullyQualifiedJavaType> imports) {
}
public void addConfigurationProperties(Properties properties) {
this.properties.putAll(properties);
suppressDate = StringUtility.isTrue(properties.getProperty(PropertyRegistry.COMMENT_GENERATOR_SUPPRESS_DATE));
suppressAllComments = StringUtility.isTrue(properties.getProperty(PropertyRegistry.COMMENT_GENERATOR_SUPPRESS_ALL_COMMENTS));
}
/**
* This method adds the custom javadoc tag for. You may do nothing if you do
* not wish to include the Javadoc tag - however, if you do not include the
* Javadoc tag then the Java merge capability of the eclipse plugin will
* break.
*
* @param javaElement the java element
*/
protected void addJavadocTag(JavaElement javaElement, boolean markAsDoNotDelete) {
javaElement.addJavaDocLine(" *");
StringBuilder sb = new StringBuilder();
sb.append(" * ");
sb.append(MergeConstants.NEW_ELEMENT_TAG);
if (markAsDoNotDelete) {
sb.append(" do_not_delete_during_merge");
}
String s = getDateString();
if (s != null) {
sb.append(' ');
sb.append(s);
}
javaElement.addJavaDocLine(sb.toString());
}
/**
* This method returns a formated date string to include in the Javadoc tag
* and XML comments. You may return null if you do not want the date in
* these documentation elements.
*
* @return a string representing the current timestamp, or null
*/
protected String getDateString() {
String result = null;
if (!suppressDate) {
result = currentDateStr;
}
return result;
}
public void addClassComment(InnerClass innerClass, IntrospectedTable introspectedTable) {
if (suppressAllComments) {
return;
}
StringBuilder sb = new StringBuilder();
innerClass.addJavaDocLine("/**");
sb.append(" * ");
sb.append(introspectedTable.getFullyQualifiedTable());
sb.append(" ");
sb.append(getDateString());
innerClass.addJavaDocLine(sb.toString());
innerClass.addJavaDocLine(" */");
}
public void addEnumComment(InnerEnum innerEnum, IntrospectedTable introspectedTable) {
if (suppressAllComments) {
return;
}
StringBuilder sb = new StringBuilder();
innerEnum.addJavaDocLine("/**");
// addJavadocTag(innerEnum, false);
sb.append(" * ");
sb.append(introspectedTable.getFullyQualifiedTable());
innerEnum.addJavaDocLine(sb.toString());
innerEnum.addJavaDocLine(" */");
}
public void addFieldComment(Field field, IntrospectedTable introspectedTable,
IntrospectedColumn introspectedColumn) {
if (suppressAllComments) {
return;
}
StringBuilder sb = new StringBuilder();
field.addJavaDocLine("/**");
sb.append(" * ");
sb.append(introspectedColumn.getRemarks());
field.addJavaDocLine(sb.toString());
// addJavadocTag(field, false);
field.addJavaDocLine(" */");
}
public void addFieldComment(Field field, IntrospectedTable introspectedTable) {
if (suppressAllComments) {
return;
}
StringBuilder sb = new StringBuilder();
field.addJavaDocLine("/**");
sb.append(" * ");
sb.append(introspectedTable.getFullyQualifiedTable());
field.addJavaDocLine(sb.toString());
field.addJavaDocLine(" */");
}
public void addModelClassComment(TopLevelClass topLevelClass, IntrospectedTable introspectedTable) {
}
public void addGeneralMethodComment(Method method, IntrospectedTable introspectedTable) {
if (suppressAllComments) {
return;
}
// method.addJavaDocLine("/**");
// addJavadocTag(method, false);
// method.addJavaDocLine(" */");
}
public void addGetterComment(Method method, IntrospectedTable introspectedTable,
IntrospectedColumn introspectedColumn) {
if (suppressAllComments) {
return;
}
method.addJavaDocLine("/**");
StringBuilder sb = new StringBuilder();
// sb.append(" * ");
// sb.append(introspectedColumn.getRemarks());
// method.addJavaDocLine(sb.toString());
sb.setLength(0);
sb.append(" * @return ");
sb.append(introspectedColumn.getActualColumnName());
sb.append(" ");
sb.append(introspectedColumn.getRemarks());
method.addJavaDocLine(sb.toString());
// addJavadocTag(method, false);
method.addJavaDocLine(" */");
}
public void addSetterComment(Method method, IntrospectedTable introspectedTable,
IntrospectedColumn introspectedColumn) {
if (suppressAllComments) {
return;
}
method.addJavaDocLine("/**");
StringBuilder sb = new StringBuilder();
// sb.append(" * ");
// sb.append(introspectedColumn.getRemarks());
// method.addJavaDocLine(sb.toString());
Parameter parm = method.getParameters().get(0);
sb.setLength(0);
sb.append(" * @param ");
sb.append(parm.getName());
sb.append(" ");
sb.append(introspectedColumn.getRemarks());
method.addJavaDocLine(sb.toString());
// addJavadocTag(method, false);
method.addJavaDocLine(" */");
}
public void addClassComment(InnerClass innerClass, IntrospectedTable introspectedTable, boolean markAsDoNotDelete) {
// if (suppressAllComments) {
// return;
// }
// StringBuilder sb = new StringBuilder();
//
// innerClass.addJavaDocLine("/**");
// sb.append(" * ");
// sb.append(introspectedTable.getFullyQualifiedTable());
// innerClass.addJavaDocLine(sb.toString());
//
// sb.setLength(0);
// sb.append(" * @author ");
// sb.append(systemPro.getProperty("user.name"));
// sb.append(" ");
// sb.append(currentDateStr);
//
// // addJavadocTag(innerClass, markAsDoNotDelete);
//
// innerClass.addJavaDocLine(" */");
}
}
\ No newline at end of file
jdbc.driverClass=com.mysql.jdbc.Driver
jdbc.connectionURL=jdbc:mysql://10.158.230.16:3306/tax_admin_didi?useUnicode=true&amp;characterEncoding=utf-8&amp;zeroDateTimeBehavior=convertToNull&amp;allowMultiQueries=true&amp;useSSL=false
jdbc.userId=root
jdbc.password=taxadmin2018
This diff is collapsed.
......@@ -4,12 +4,8 @@
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width,initial-scale=1.0">
<script src="vConsole-3.3.0/dist/vconsole.min.js"></script>
<script>
//获取地址栏参数,name:参数名称
var vConsole = new VConsole();
console.log('Hello world');
window.str="";
var z =function getUrlParms(name){
var reg = new RegExp("(^|&)"+ name +"=([^&]*)(&|$)");
var r = window.location.search.substr(1).match(reg);
......@@ -36,28 +32,7 @@
if(ddTicket==undefined || ddTicket=="" || ddTicket == null){
document.location=ReUrl;
}
/* else {
//创建核心对象
xmlhttp = null;
if (window.XMLHttpRequest) {// code for Firefox, Opera, IE7, etc.
xmlhttp = new XMLHttpRequest();
} else if (window.ActiveXObject) {// code for IE6, IE5
xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
}
//编写回调函数
xmlhttp.onreadystatechange = function() {
if (xmlhttp.readyState == 4 && xmlhttp.status == 200) {
//
}
}
//這個 url 測試的
var getUserUrl="http://dts-test.erp.didichuxing.com/sso/getUser?ticket=";
//open设置请求方式和请求路径
xmlhttp.open("get", getUserUrl+ddTicket);
//send 发送
xmlhttp.send();
}*/
</script>
<link rel="icon" href="<%= BASE_URL %>favicon.ico">
......
English | [简体中文](./CHANGELOG_CN.md)
#### V3.3.0 (2019-02-02)
- [FEATURE] Add the ability to collapse the same log.
- [FIX] Fix issue which formatted log (like `console.log('[foo]', 'bar')`) will not display in Log tab.
#### V3.2.2 (2019-01-17)
- [FEATURE] Add console command prompt. (by @65147400)
- [FEATURE] Add SessionStorage support in Storage tab. (by @hkc452)
- [FIX] Fix `JSON.stringify` function which was incorrectly rewritten.
- [FIX] Fix `logNumber` bug which was not reset when clear logs. (by @liuyuekeng)
- [FIX] Fix unencoded HTML tag in Network tab. (by @mokang)
- [FIX] Fix possible crash when decode content in Storage tab. (by @wolfsilver)
- [FIX] Fix CSP buy cause by `nonce` attribute. (by @scotthuang)
- [IMPROVE] Add bottom safe area to adapt to full screen such as iPhone X. (by @dingyi1993)
#### V3.2.0 (2018-04-10)
- [FEATURE] Support `console.time()` and `console.timeEnd()`.
- [FEATRUE] Add `disableLogScrolling` (in `vConsole.option`).
- [FIX] Fix `setOption()` error.
- [FIX] Fix cookies' value wrong display.
- [FIX] Fix "Uncaught InvalidStateError". (by @fireyy)
#### V3.1.0 (2017-12-27)
- [FEATURE] Add `vConsole.showSwitch()` and `vConsole.hideSwitch()` methods, see [Public Properties & Methods](./doc/public_properties_methods.md).
- [FEATURE] Add `onReady` and `onClearLog` callback function to `vConsole.option`.
- [FEATURE] Auto clear logs when `console.clear()` is called.
- [FIX] Fix `\r` error when build in Windows.
- [FIX] Fix `Symbol` error in iOS8 or other old OS.
#### V3.0.0 (2017-09-27)
Basic:
- [FEATRUE] Require manual init vConsole `var vConsole = new VConsole(option)`.
- [FEATRUE] Add configuaration `vConsole.option`, which can be set when `new VConsole` or `setOption(key, value)`.
- [FEATURE] Support for custom loading of default built-in plugins by using `defaultPlugins` in the above option.
- [FEATURE] Add `setOption(key, value)` method.
- [IMPROVE] Support CSP rule `unsafe-eval` and `unsafe-inline`.
- [IMPROVE] Optimize `font-size` when `initial-scale < 1`.
Log plugin:
- [FEATURE] Support `maxLogNumber` option to limit maximum log number.
- [FIX] Fix the crash caused by printing large objects.
- [IMPROVE] Only the logs written as `console.log('[system]', xxx)` will be shown in System tab, so `console.log('[system] xxx')` will be shown in default log tab.
Network plugin:
- [FEATURE] Support `Query String Parameters` and `Form Data`.
- [IMPROVE] Auto format JSON response.
- [FIX] Fix bug that XHR status is always "Pending" when using 3rd HTTP libraries.
Plugins:
- [FEATURE] Plugins can get vConsole instance by `this.vConsole` on/after `init` event is called.
- [FEATURE] Add `updateOption` event to detect `vConsole.option` changes.
- [FEATURE] Add Element tab as a built-in plugin.
- [FEATURE] Add Storage tab as a built-in plugin.
## V2.x.x
#### V2.5.2 (2016-12-27)
- [FIX] Catch errors when eval custom commands in Log tab.
#### V2.5.1 (2016-10-18)
- [FIX] Fix `scrollHeight` error in some cases.
- [FIX] Fix flex layout in iOS 8 devices.
- [IMPROVE] Performance enhancement.
#### V2.5.0 (2016-09-28)
- [FEATURE] Add `vConsole.removePlugin()` method, see [Public Properties & Methods](./doc/public_properties_methods.md).
- [FEATURE] Add `remove` plugin event, see [Plugin: Event List](./doc/plugin_event_list.md).
- [IMPROVE] Disable page scrolling while vConsole is scrolling.
- [FIX] Fix `window.onerror()` typo.
#### V2.4.0 (2016-08-31)
- [FEATURE] Add `addTopBar` plugin event, see [Plugin: Event List](./doc/plugin_event_list.md).
- [FEATURE] Add log type filter to Log & System tab.
- [IMPROVE] Log list will not automatically scroll to bottom while printing new logs if the viewport is not at the end of list.
- [IMPROVE] Fix UI bugs.
- [FIX] Fix XSS issue when print object logs.
- [FIX] Switch button will not be positioned out of edges in some special cases.
#### V2.3.1 (2016-08-16)
- [FIX] Replace custom `tap` event (in V2.3.0) with `click` event (still support fast response) to prevent conflicts.
- [IMPROVE] Remove `now` item and add `navigationStart` time in System tab.
#### V2.3.0 (2016-08-15)
- [FEATURE] Objects or Arrays can be expended layer by layer.
- [FEATURE] All object's properties, including private properties, can be enumerable now.
- [IMPROVE] Support `tap` event within vConsole's DOM container to speed up `click` event.
#### V2.2.1 (2016-08-08)
- [IMPROVE] Add complete performance timing log to System tab.
- [ADD] Add third-party plugin list to README.
#### V2.2.0 (2016-07-13)
- [FEATURE] Add `vConsole.version` property.
- [FEATURE] Add `xhr._noVConsole` property to `XMLHttpRequest` objects to customize whether a XHR should display in Network tab.
#### V2.1.0 (2016-06-29)
- [FEATURE] Add `vConsole.tool` & `vConsole.$` helper functions, see [Helper Functions](./doc/helper_functions.md).
- [FEATURE] Public properties & methods of vConsole are available, see [Public Properties & Methods](./doc/public_properties_methods.md).
- [FIX] Fix issue that `error` in `window.onerror()` may be undefined.
- [FIX] Fix error that `xhr.status` may be unavailable when `xhr.readyState < 4`.
#### v2.0.1 (2016-06-16)
- [FIX] Fix error that vConsole may not work at X5 browser engine.
- [FIX] Fix error that `localStorage` is null in some kind of devices.
- [FIX] Fix boolean display error in Log tab.
- [IMPROVE] Improve UI in Android.
#### v2.0.0 (2016-06-05)
- [FEATURE] Rebuild completely, support custom plugin, see [Plugin: Getting Started](./doc/plugin_getting_started.md).
- [FEATURE] Support execute JS command line in Log tab.
- [FEATURE] Support circular structure object in Log and System tab.
- [FEATURE] Support viewing request headers and response in Network tab.
- [IMPROVE] Switch button will not be dragged out of screen.
- [IMPROVE] Auto print User Agent in System tab.
- [IMPROVE] Show log's time in Log and System tab.
- [FIX] Fix issue that getDate() returns a wrong date.
- [FIX] Fix issue that sync AJAX becomes async AJAX.
# v1.x.x
#### v1.3.0 (2016-05-20)
- [ADD] Support Drag and Drop switch button.
- [FIX] Fix initialization failure when loaded asynchronously.
#### v1.2.1 (2016-05-16)
- [FIX] Fix data lost when sending a POST request.
#### v1.2.0 (2016-05-11)
- [ADD] Add network panel.
- [DELELE] Deprecate `vConsole.ready()` method.
- [IMPROVE] Display formatted Object & Array variable.
- [IMPROVE] Add English README and CHANGELOG.
- [IMPROVE] Improve UI.
#### v1.1.0 (2016-05-06)
- [ADD] Support `window.onerror()` to catch exceptions and errors.
- [ADD] Support `[default|system|...]` string to print logs to specific panel.
#### v1.0.5 (2016-04-29)
- [FIX] Fix webpack compilation.
- [FIX] Fix XSS when printing HTML string.
#### v1.0.4 (2016-04-28)
- [FIX] Fix the `main` path in `package.json`.
- [IMPROVE] Update demo pages.
#### v1.0.2 (2016-04-27)
- Initial release.
\ No newline at end of file
This diff is collapsed.
Tencent is pleased to support the open source community by making vConsole available.
Copyright (C) 2017 THL A29 Limited, a Tencent company. All rights reserved.
If you have downloaded a copy of the vConsole binary from Tencent, please note that the vConsole binary is licensed under the MIT License.
If you have downloaded a copy of the vConsole source code from Tencent, please note that vConsole source code is licensed under the MIT License, except for the third-party components listed below which are subject to different license terms. Your integration of vConsole into your own projects may require compliance with the MIT License, as well as the other licenses applicable to the third-party components included within vConsole.
A copy of the MIT License is included in this file.
\ No newline at end of file
English | [简体中文](./README_CN.md)
vConsole
==============================
[![npm version](https://badge.fury.io/js/vconsole.svg)](https://badge.fury.io/js/vconsole)
A lightweight, extendable front-end developer tool for mobile web page.
## Features
- View console logs
- View network requests
- View document elements
- View Cookies, LocalStorage and SessionStorage
- Execute JS command manually
- Custom plugin
## Usage
Download the [latest release](https://github.com/Tencent/vConsole/releases/latest). (DO NOT copy `dist/vconsole.min.js` in the dev branch)
Or, install via npm:
```
npm install vconsole
```
Import `dist/vconsole.min.js` to your project:
```html
<script src="path/to/vconsole.min.js"></script>
<script>
// init vConsole
var vConsole = new VConsole();
console.log('Hello world');
</script>
```
See [Tutorial](./doc/tutorial.md) for more details.
## Preview
![](./example/snapshot/qrcode.png)
[http://wechatfe.github.io/vconsole/demo.html](http://wechatfe.github.io/vconsole/demo.html)
![](./example/snapshot/log_panel.png)
## Documentation
vConsole:
- [Tutorial](./doc/tutorial.md)
- [Public Properties & Methods](./doc/public_properties_methods.md)
- [Helper Functions](./doc/helper_functions.md)
Plugin:
- [Plugin: Getting Started](./doc/plugin_getting_started.md)
- [Plugin: Building a Plugin](./doc/plugin_building_a_plugin.md)
- [Plugin: Event List](./doc/plugin_event_list.md)
## Plugins
- [vConsole-sources](https://github.com/WechatFE/vConsole-sources)
- [vconsole-webpack-plugin](https://github.com/diamont1001/vconsole-webpack-plugin)
## Changelog
[CHANGELOG.md](./CHANGELOG.md)
## Feedback
QQ Group: 497430533
![](./example/snapshot/qq_group.png)
## License
[The MIT License](./LICENSE)
This diff is collapsed.
English | [简体中文](./a_doc_index_CN.md)
Documentation Index
==============================
## vConsole
- [Tutorial](./tutorial.md)
- [Public Properties & Methods](./public_properties_methods.md)
- [Helper Functions](./helper_functions.md)
## Plugin
- [Plugin: Getting Started](./plugin_getting_started.md)
- [Plugin: Building a Plugin](./plugin_building_a_plugin.md)
- [Plugin: Event List](./plugin_event_list.md)
\ No newline at end of file
[English](./a_doc_index.md) | 简体中文
文档索引
==============================
## vConsole 本体
- [使用教程](./tutorial_CN.md)
- [公共属性及方法](./public_properties_methods_CN.md)
- [辅助函数](./helper_functions_CN.md)
## Plugin 插件
- [插件:入门](./plugin_getting_started_CN.md)
- [插件:编写插件](./plugin_building_a_plugin_CN.md)
- [插件:Event 事件列表](./plugin_event_list_CN.md)
\ No newline at end of file
Plugin: Getting Started
==============================
A plugin allows you to:
- add a new tab
- add one or more tool button(s)
You can customize the functions of the tab and buttons.
## Quick Start
Two lines to create a vConsole plugin:
```javascript
var myPlugin = new VConsole.VConsolePlugin('my_plugin', 'My Plugin');
vc.addPlugin(myPlugin);
```
The above plugin has no function. See [Building a Plugin](./plugin_building_a_plugin.md) for more details.
[Back to Index](./a_doc_index.md)
\ No newline at end of file
This diff is collapsed.
<?php
header('Content-Type: application/json; charset=utf-8');
$data = array('msg' => '收到一个AJAX回包,可在[Network]中查看');
echo json_encode($data);
\ No newline at end of file
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
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