Commit 8e5384bb authored by kevin's avatar kevin

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

parents 948c5553 ad95c12e
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,8 @@ 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));
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);
......
......@@ -102,6 +102,8 @@ public class DataImportService extends BaseService {
private ProjectMapper projectMapper;
@Autowired
private OrganizationServiceImpl organizationService;
@Autowired
private OrganizationAccountingRateMapper organizationAccountingRateMapper;
private static String ebsCallUrl;
......@@ -2270,7 +2272,7 @@ public class DataImportService extends BaseService {
tmpOrgList.forEach(o -> {
try {
Callable callEbs = new CallEbsThread(type, o, ebsCallUrl, dataImportLogMapper, authUserHelper,
idService, dtsTokenService, period, effectiveDateFrom, effectiveDateTo, operator);
idService, dtsTokenService, period, effectiveDateFrom, effectiveDateTo, operator,organizationAccountingRateMapper);
executorService.submit(callEbs);
// resList.add(future);
} catch (RejectedExecutionException rje) {
......@@ -2391,9 +2393,12 @@ public class DataImportService extends BaseService {
private String effectiveDateTo;
private String operator;
private OrganizationAccountingRateMapper organizationAccountingRateMapper;
CallEbsThread(int type, Organization org, String ebsCallUrl, DataImportLogMapper dataImportLogMapper,
AuthUserHelper authUserHelper, DistributedIdService idService, DtsTokenService dtsTokenService,
String period, String effectiveDateFrom, String effectiveDateTo, String operator) {
String period, String effectiveDateFrom, String effectiveDateTo, String operator,
OrganizationAccountingRateMapper organizationAccountingRateMapper) {
this.type = type;
this.org = org;
this.period = period;
......@@ -2402,6 +2407,7 @@ public class DataImportService extends BaseService {
this.dtsTokenService = dtsTokenService;
this.idService = idService;
this.dataImportLogMapper = dataImportLogMapper;
this.organizationAccountingRateMapper = organizationAccountingRateMapper;
this.effectiveDateFrom = effectiveDateFrom;
this.effectiveDateTo = effectiveDateTo;
this.operator = operator;
......@@ -2503,6 +2509,16 @@ public class DataImportService extends BaseService {
} else {
if (EbsExtractTypeConstant.JE == type) {
resp.setCompanyCode(null != resp.getSegment1() ? resp.getSegment1() : "");
}else if(EbsExtractTypeConstant.RATE == type){
//只有汇率表是同步进行操作,所以在得到response之前已经进行数据插入及记录的更新,
// 在此进行记录条数的设置
logger.info("此时操作汇率表");
OrganizationAccountingRateExample example = new OrganizationAccountingRateExample();
//期间
example.createCriteria().andPeriodEqualTo(convertPeriodStr2Int(period)).andTaskIdEqualTo(String.valueOf(taskId));
List<OrganizationAccountingRate> itemList = organizationAccountingRateMapper.selectByExample(example);
logger.info("查询的汇率条数:"+itemList.size());
log.setRecordSize(itemList.size());
}
log.setId(taskId);
log.setImportResult(true);
......@@ -2518,7 +2534,16 @@ public class DataImportService extends BaseService {
}
return 1;
}
/**
* 期间格式转换为原始的int类型
* @param periodStr
* @return
*/
private Integer convertPeriodStr2Int(String periodStr){
periodStr=StringUtils.replace(periodStr, "-", "");
Integer period=Integer.parseInt(periodStr);
return period;
}
}
}
......@@ -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;
}
......
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;
}
......@@ -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"/>
......
......@@ -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"/>-->
......
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
......@@ -453,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=")">
......
......@@ -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
[English](./CHANGELOG.md) | 简体中文
#### V3.3.0 (2019-02-02)
- 【特效】新增自动合并相同日志的能力。频繁输出相同日志时不再会被刷屏。
- 【修复】修复格式化日志(如 `console.log('[foo]', 'bar')`)无法显示到 Log 面板的问题。
#### V3.2.2 (2019-01-17)
- 【特性】新增控制台输入提示。 (by @65147400)
- 【特性】支持 SessionStorage。 (by @hkc452)
- 【修复】修复 `JSON.stringify` 函数被错误地改写的问题。
- 【修复】修复清空日志时没有重置 `logNumber` 的问题。 (by @liuyuekeng)
- 【修复】修复 Network 面板中 HTML 标签未被 encode 的问题。 (by @mokang)
- 【修复】修复 Storage 面板 decode 内容时可能会导致崩溃的问题。 (by @wolfsilver)
- 【修复】修复 CSP 签名获取失败问题。 (by @scotthuang)
- 【优化】增加底部安全区域,适配 iPhone X 等全面屏。 (by @dingyi1993)
#### V3.2.0 (2018-04-10)
- 【特性】支持 `console.time()``console.timeEnd()`
- 【特性】新增 `disableLogScrolling` 配置项(`vConsole.option`),用于禁止新日志引起的自动滚动到底部。
- 【修复】修复初始化后立即调用 `setOption` 引起的错误。
- 【修复】修复 cookies 显示错误的问题。
- 【修复】修复 "Uncaught InvalidStateError" 错误。 (by @fireyy)
#### V3.1.0 (2017-12-27)
- 【特性】新增 `vConsole.showSwitch()``vConsole.hideSwitch()` 方法,请查阅[公共属性及方法](./doc/public_properties_methods_CN.md)
- 【特性】新增 `onReady``onClearLog` 回调方法,位于 `vConsole.option`
- 【特性】调用 `console.clear` 时将自动清除面板中的日志。
- 【修复】修复 Windows 下构建引起的 `\r` 转义问题。
- 【修复】修复 iOS8 或其它低版本系统中的 `Symbol` 错误。
#### V3.0.0 (2017-09-27)
基础:
- 【特性】需要手动初始化 vConsole:`var vConsole = new VConsole(option)`
- 【特性】新增 `vConsole.option` 配置项,配置项可在实例化时传入,也可通过 `vConsole.setOption(key, value)` 更新。
- 【特性】支持自定义按需加载内置插件,配置项为 `option` 里的 `defaultPlugins` 字段。
- 【优化】支持 CSP 规则 `unsafe-eval``unsafe-inline`
- 【优化】优化 `initial-scale < 1` 时的 `font-size`
Log 插件:
- 【特性】支持 `maxLogNumber` 配置项,以控制面板内展示的最多日志数量。
- 【修复】修复打印大型复杂 object 时引起的崩溃问题。
- 【优化】只有 `console.log('[system]', xxx)` 这种将 `[system]` 放在第一位参数的写法,才会输出到 System 面板。因此可以规避 `[foo] bar` 这类格式无法正确打印到 Log 面板的问题。
Network 插件:
- 【特性】新增 `Query String Parameters``Form Data` 两栏,以展示 GET 和 POST 的参数。
- 【优化】自动格式化展示 JSON 类型的回包。
- 【修复】修复 status 一直为 "Pending" 的问题。这种问题一般是引入了第三方的 HTTP 库而引起的。
插件模块:
- 【特性】在 `init` 事件触发时/之后,插件实例内可以通过 `this.vConsole` 来获取到 vConsole 的对象实例。
- 【特性】新增 `updateOption` 事件,以监测 `vConsole.option` 的更新。
- 【特性】新增 Element 面板作为默认的内置插件。
- 【特性】新增 Storage 面板作为默认的内置插件。
## V2.x.x
#### V2.5.2 (2016-12-27)
- 【修复】捕获执行自定义命令行时发生的错误。
#### V2.5.1 (2016-10-18)
- 【修复】修复一些情况下的 `scrollHeight` 错误。
- 【修复】修正 iOS 8 下的 flex 布局问题。
- 【优化】性能增强。
#### V2.5.0 (2016-09-28)
- 【特性】新增 `vConsole.removePlugin()` 方法,请查阅[公共属性及方法](./doc/public_properties_methods_CN.md)
- 【特性】新增 `remove` 插件事件,请查阅[插件:Event 事件列表](./doc/plugin_event_list_CN.md)
- 【优化】页面不会随着 vConsole 的滚动而滚动。
- 【修复】修正 `window.onerror()` 内的函数调用笔误。
#### V2.4.0 (2016-08-31)
- 【特性】新增 `addTopBar` 插件事件,请查阅[插件:Event 事件列表](./doc/plugin_event_list_CN.md)
- 【特性】新增日志类型筛选功能。
- 【优化】若 log 列表不处于最底部,当打印新 log 时,列表则不会自动滚动到最新 log 处。
- 【优化】优化了一些 UI 样式问题。
- 【修复】修正打印 object 类型 log 时的 XSS 问题。
- 【修复】在某些特殊情况中,开关按钮将不会再被定位出页面外。
#### V2.3.1 (2016-08-16)
- 【修复】删除 V2.3.0 中的 `tap` 事件,恢复为 `click` 事件(依旧支持快速响应),以避免冲突。
- 【优化】删除 System tab 中的 `now` 项目并新增 `navigationStart` 时间戳。
#### V2.3.0 (2016-08-15)
- 【特性】支持逐级展开 Object 或 Array 的子元素。
- 【特性】支持显示 Object 内的不可枚举属性。
- 【优化】支持在 vConsole 的 DOM 容器内使用 `tap` 事件以代替 `click` 事件。
#### V2.2.1 (2016-08-08)
- 【特性】在 System 面板中添加完整的 performance timing 测速点。
- 【新增】在 README 中新增第三方插件列表。
#### V2.2.0 (2016-07-13)
- 【特性】新增 `vConsole.version` 属性,以获取当前版本号。
- 【特性】新增 `XMLHttpRequest``xhr._noVConsole` 属性,以控制一个网络请求是否显示在 Network tab 中。
#### v2.1.0 (2016-06-29)
- 【特性】新增 `vConsole.tool``vConsole.$` 辅助函数,请查阅[辅助函数](./doc/helper_functions_CN.md)
- 【特性】公开部分 vConsole 的属性及方法,请查阅[公共属性及方法](./doc/public_properties_methods_CN.md)
- 【修复】修复 `window.onerror()``error` 可能为空而导致堆栈读取错误的问题。
- 【修复】修复当 `xhr.readyState < 4` 时读取 `xhr.status` 可能导致错误的问题。
#### v2.0.1 (2016-06-16)
- 【修复】修复 vConsole 可能无法运行在 X5 内核浏览器的问题。
- 【修复】修复某些设备不支持 `localStorage` 的问题。
- 【修复】修复布尔值在 Log 面板展示不正确的问题。
- 【优化】优化在 Android 设备下的 UI 表现。
#### v2.0.0 (2016-06-05)
- 【特性】完全重构,支持自定义插件,请查阅[插件:入门](./doc/plugin_getting_started_CN.md)
- 【特性】支持手动输入、执行命令行。
- 【特性】支持打印循环引用的对象。
- 【特性】支持在 Network 面板查看请求的 headers 和 response。
- 【优化】开关按钮不会再被拖出屏幕外部。
- 【优化】自动在 System 面板打印 User Agent。
- 【优化】打印 log 时会显示时间。
- 【修复】修复 getDate() 返回错误时间的问题。
- 【修复】修复同步 AJAX 变异步 AJAX 的问题。
# v1.x.x
#### v1.3.0 (2016-05-20)
- 【新增】支持拖拽右下角开关。
- 【修复】修复异步加载导致初始化失败的问题。
#### v1.2.1 (2016-05-16)
- 【修复】修复发送 POST 请求时丢失数据的问题。
#### v1.2.0 (2016-05-11)
- 【新增】新增网络面板,可展示 AJAX 请求。
- 【删减】废弃 `vConsole.ready()` 方法。
- 【优化】支持 Object/Array 结构化展示,不再以 JSON 字符串输出。
- 【优化】新增英文 README 及 CHANGELOG 文档。
- 【优化】优化 UI 体验。
#### v1.1.0 (2016-05-06)
- 【新增】支持 `window.onerror()` 的异常信息捕获。
- 【新增】支持 `[default|system|...]` 日志格式,将 log 输出到指定面板。
#### v1.0.5 (2016-04-29)
- 【修复】修复 webpack 编译失败的问题。
- 【修复】修复打印 HTML 字符串可能导致的 XSS 问题。
#### v1.0.4 (2016-04-28)
- 【修复】修复 `package.json` 的 main 路径。
- 【优化】优化 example 的 demo 页面。
#### v1.0.2 (2016-04-27)
- 初始发布。
\ No newline at end of file
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)
[English](./README.md) | 简体中文
vConsole
==============================
[![npm version](https://badge.fury.io/js/vconsole.svg)](https://badge.fury.io/js/vconsole)
一个轻量、可拓展、针对手机网页的前端开发者调试面板。
## 特性
- 查看 console 日志
- 查看网络请求
- 查看页面 element 结构
- 查看 Cookies、localStorage 和 SessionStorage
- 手动执行 JS 命令行
- 自定义插件
## 上手
下载 vConsole 的[最新版本](https://github.com/Tencent/vConsole/releases/latest)。(不要直接下载 dev 分支下的 `dist/vconsole.min.js`
或者使用 npm 安装:
```
npm install vconsole
```
引入 `dist/vconsole.min.js` 到项目中:
```html
<script src="path/to/vconsole.min.js"></script>
<script>
// 初始化
var vConsole = new VConsole();
console.log('Hello world');
</script>
```
详细使用方法请参阅[使用教程](./doc/tutorial_CN.md)
## 手机预览
![](./example/snapshot/qrcode.png)
[http://wechatfe.github.io/vconsole/demo.html](http://wechatfe.github.io/vconsole/demo.html)
![](./example/snapshot/log_panel.png)
## 文档
vConsole 本体:
- [使用教程](./doc/tutorial_CN.md)
- [公共属性及方法](./doc/public_properties_methods_CN.md)
- [辅助函数](./doc/helper_functions_CN.md)
插件:
- [插件:入门](./doc/plugin_getting_started_CN.md)
- [插件:编写插件](./doc/plugin_building_a_plugin_CN.md)
- [插件:Event 事件列表](./doc/plugin_event_list_CN.md)
## 插件列表
- [vConsole-sources](https://github.com/WechatFE/vConsole-sources)
- [vconsole-webpack-plugin](https://github.com/diamont1001/vconsole-webpack-plugin)
## 更新记录
[CHANGELOG_CN.md](./CHANGELOG_CN.md)
## 交流反馈
QQ 群:497430533
![](./example/snapshot/qq_group.png)
## License
[The MIT License](./LICENSE)
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