Commit 27df02ac authored by eddie.woo's avatar eddie.woo

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

parents 6912bec4 8541823a
...@@ -372,8 +372,20 @@ ...@@ -372,8 +372,20 @@
<groupId>com.grapecity.documents</groupId> <groupId>com.grapecity.documents</groupId>
<artifactId>gcexcel</artifactId> <artifactId>gcexcel</artifactId>
<version>2.0.0</version> <version>2.0.0</version>
<exclusions>
<exclusion>
<groupId>org.apache.pdfbox</groupId>
<artifactId>pdfbox</artifactId>
</exclusion>
</exclusions>
</dependency> </dependency>
<!-- https://mvnrepository.com/artifact/org.apache.pdfbox/pdfbox -->
<dependency>
<groupId>org.apache.pdfbox</groupId>
<artifactId>pdfbox</artifactId>
<version>2.0.12</version>
</dependency>
</dependencies> </dependencies>
<profiles> <profiles>
......
kill -9 `ps -ef |grep java | grep atms-api | awk '{print $2}'`
export MAVEN_OPTS="-Xdebug -Xrunjdwp:transport=dt_socket,address=5005,server=y,suspend=n"
rm -f nohup.out
nohup mvn clean tomcat7:run -Dmaven.test.skip=true -f pom.xml &
...@@ -270,108 +270,41 @@ public class ReportServiceImpl { ...@@ -270,108 +270,41 @@ public class ReportServiceImpl {
} }
List<Long> exceptTemplateIds = templateMapper.getIdsForExceptTemplate(); List<Long> exceptTemplateIds = templateMapper.getIdsForExceptTemplate();
// String strExceptTemplateIds = StringUtils.EMPTY;
// if (exceptTemplateIds != null && exceptTemplateIds.size() > 0) {
// strExceptTemplateIds = StringUtils.join(exceptTemplateIds, ",");
// } else {
// strExceptTemplateIds = "''";
// }
//todo: according to projectId get the templateGroupId
Long templateGroupId = projectMapper.getTemplateGroupIdByProject(projectId, EnumServiceType.VAT.getCode()); Long templateGroupId = projectMapper.getTemplateGroupIdByProject(projectId, EnumServiceType.VAT.getCode());
if (templateGroupId != null && templateGroupId != 0) { if (templateGroupId != null && templateGroupId != 0) {
// 先进行数据清理,包括period开头的所有报表配置表 条件Period // 先进行数据清理,包括period开头的所有报表配置表 条件Period
clearPeriodData(projectId, period, exceptTemplateIds, isMergeManualData); clearPeriodData(projectId, period, exceptTemplateIds, isMergeManualData);
// 根据templategroupid 把 template 插入到 periodTemplate copyTemplateAndConfigFromAdmin(projectId, templateGroupId, period);
TemplateExample example = new TemplateExample(); } else {
example.createCriteria().andTemplateGroupIdEqualTo(templateGroupId); result.setResult(true);
List<Template> templates = templateMapper.selectByExample(example); result.setResultMsg("there is no templateGroup");
List<PeriodTemplate> periodTemplateList = new ArrayList<>(); return result;
int i = 0;
Long startTimeOut = System.currentTimeMillis();
logger.debug("templates copy start: " + startTimeOut);
for (Template template : templates) {
i++;
Long startTime = System.currentTimeMillis();
logger.debug("template copy start: " + startTime);
PeriodTemplate periodTemplate = new PeriodTemplate();
CommonUtils.copyProperties(template, periodTemplate);
periodTemplate.setId(distributedIdService.nextId());
periodTemplate.setPeriod(period);
periodTemplate.setName(template.getName());
periodTemplate.setCode(template.getCode());
periodTemplate.setPath(template.getPath());
periodTemplate.setReportType(template.getReportType());
periodTemplate.setTemplateGroupId(template.getTemplateGroupId());
periodTemplate.setOrderIndex(template.getOrderIndex());
periodTemplate.setCreateTime(template.getCreateTime());
periodTemplate.setUpdateTime(template.getUpdateTime());
periodTemplate.setIsSystemType(template.getIsSystemType());
periodTemplate.setIsActiveAssociation(template.getIsActiveAssociation());
periodTemplate.setParentId(Utils.isEmpty(template.getParentId()) ? null : template.getParentId());
periodTemplate.setTemplateId(template.getId());
periodTemplate.setCreateBy(Utils.isEmpty(template.getCreateBy()) ? "admin" : template.getCreateBy());
periodTemplate.setUpdateBy(Utils.isEmpty(template.getUpdateBy()) ? "admin" : template.getUpdateBy());
periodTemplate.setProjectId(projectId);
periodTemplateList.add(periodTemplate);
logger.debug("template copy end,used time: " + (System.currentTimeMillis() - startTime) + " ms");
} }
logger.debug("templates copy end,used: " + (System.currentTimeMillis() - startTimeOut) + " ms, copy: " + i + " items"); result.setResult(true);
} catch (Exception ex) {
List<Long> templateIdList = periodTemplateList.stream().map(PeriodTemplate::getTemplateId).collect(Collectors.toList()); result.setResult(false);
CellTemplateExample cellTemplateExample = new CellTemplateExample(); logger.error(ex.getMessage(), ex);
cellTemplateExample.createCriteria().andReportTemplateIdIn(templateIdList); }
List<CellTemplate> cellTemplateList = cellTemplateMapper.selectByExample(cellTemplateExample); return result;
List<PeriodCellTemplate> periodCellTemplateList = new ArrayList<>();
i = 0;
startTimeOut = System.currentTimeMillis();
logger.debug("cellTemplates copy start: " + startTimeOut);
for (CellTemplate cellTemplate : cellTemplateList) {
i++;
Long startTime = System.currentTimeMillis();
//logger.debug("celltemplate copy start: " + startTime);
PeriodCellTemplate periodCellTemplate = new PeriodCellTemplate();
CommonUtils.copyProperties(cellTemplate, periodCellTemplate);
periodCellTemplate.setId(distributedIdService.nextId());
periodCellTemplate.setPeriod(period);
periodCellTemplate.setReportTemplateId(cellTemplate.getReportTemplateId());
periodCellTemplate.setRowIndex(cellTemplate.getRowIndex());
periodCellTemplate.setRowName(cellTemplate.getRowName());
periodCellTemplate.setColumnIndex(cellTemplate.getColumnIndex());
periodCellTemplate.setColumnName(cellTemplate.getColumnName());
periodCellTemplate.setComment(cellTemplate.getComment());
periodCellTemplate.setCreateTime(cellTemplate.getCreateTime());
periodCellTemplate.setUpdateTime(cellTemplate.getUpdateTime());
periodCellTemplate.setCellTemplateId(cellTemplate.getId());
periodCellTemplate.setDataType(cellTemplate.getDataType());
periodCellTemplate.setIsReadOnly(cellTemplate.getIsReadOnly() ? 1 : 0);
periodCellTemplate.setCopyFromId(cellTemplate.getCopyFromId());
periodCellTemplate.setCreateBy(Utils.isEmpty(cellTemplate.getCreateBy()) ? "admin" : cellTemplate.getCreateBy());
periodCellTemplate.setUpdateBy(Utils.isEmpty(cellTemplate.getUpdateBy()) ? "admin" : cellTemplate.getUpdateBy());
periodCellTemplate.setProjectId(projectId);
periodCellTemplateList.add(periodCellTemplate);
//logger.debug("celltemplate copy end,used time: " + (System.currentTimeMillis() - startTime) + " ms");
} }
logger.debug("templates copy end,used: " + (System.currentTimeMillis() - startTimeOut) + " ms, copy: " + i + " items");
List<Long> cellTemplateIdList = periodCellTemplateList.stream().map(PeriodCellTemplate::getCellTemplateId).collect(Collectors.toList()); private void copyPeriodConfigFromCellTemplateConfig(String projectId, Long templateId, Integer period) {
CellTemplateConfigExample cellTemplateConfigExample = new CellTemplateConfigExample(); CellTemplateConfigExample cellTemplateConfigExample = new CellTemplateConfigExample();
cellTemplateConfigExample.createCriteria().andReportTemplateIdIn(templateIdList).andCellTemplateIdIn(cellTemplateIdList); cellTemplateConfigExample.createCriteria().andReportTemplateIdEqualTo(templateId);
List<CellTemplateConfig> cellTemplateConfigList = cellTemplateConfigMapper.selectByExample(cellTemplateConfigExample); List<CellTemplateConfig> cellTemplateConfigList = cellTemplateConfigMapper.selectByExample(cellTemplateConfigExample);
if(cellTemplateConfigList.isEmpty())return;
List<PeriodCellTemplateConfig> periodCellTemplateConfigList = new ArrayList<>(); List<PeriodCellTemplateConfig> periodCellTemplateConfigList = new ArrayList<>();
i = 0;
startTimeOut = System.currentTimeMillis();
logger.debug("cellTemplateConfigs copy start:" + startTimeOut);
for (CellTemplateConfig cellTemplateConfig : cellTemplateConfigList) { for (CellTemplateConfig cellTemplateConfig : cellTemplateConfigList) {
i++;
Long startTime = System.currentTimeMillis();
//logger.debug("cellTemplateConfig copy start: " + startTime);
PeriodCellTemplateConfig periodCellTemplateConfig = new PeriodCellTemplateConfig(); PeriodCellTemplateConfig periodCellTemplateConfig = new PeriodCellTemplateConfig();
CommonUtils.copyProperties(cellTemplateConfig, periodCellTemplateConfig); CommonUtils.copyProperties(cellTemplateConfig, periodCellTemplateConfig);
periodCellTemplateConfig.setId(distributedIdService.nextId()); periodCellTemplateConfig.setId(distributedIdService.nextId());
periodCellTemplateConfig.setPeriod(period); periodCellTemplateConfig.setPeriod(period);
periodCellTemplateConfig.setCellTemplateId(cellTemplateConfig.getCellTemplateId()); periodCellTemplateConfig.setCellTemplateId(cellTemplateConfig.getCellTemplateId());
periodCellTemplateConfig.setReportTemplateId(cellTemplateConfig.getReportTemplateId()); periodCellTemplateConfig.setReportTemplateId(templateId);
periodCellTemplateConfig.setDataSourceType(cellTemplateConfig.getDataSourceType()); periodCellTemplateConfig.setDataSourceType(cellTemplateConfig.getDataSourceType());
periodCellTemplateConfig.setFormula(Utils.isEmpty(cellTemplateConfig.getFormula()) ? null : cellTemplateConfig.getFormula()); periodCellTemplateConfig.setFormula(Utils.isEmpty(cellTemplateConfig.getFormula()) ? null : cellTemplateConfig.getFormula());
periodCellTemplateConfig.setParsedFormula(null); periodCellTemplateConfig.setParsedFormula(null);
...@@ -394,11 +327,41 @@ public class ReportServiceImpl { ...@@ -394,11 +327,41 @@ public class ReportServiceImpl {
periodCellTemplateConfig.setCellTemplateConfigId(cellTemplateConfig.getId()); periodCellTemplateConfig.setCellTemplateConfigId(cellTemplateConfig.getId());
periodCellTemplateConfig.setKeyValueParsedFormula(null); periodCellTemplateConfig.setKeyValueParsedFormula(null);
periodCellTemplateConfig.setProjectId(projectId); periodCellTemplateConfig.setProjectId(projectId);
if (cellTemplateConfig.getFormula() != null && cellTemplateConfig.getFormula().contains("@")) {
fixedParsedFormula(periodCellTemplateConfig);
fixedAccountCode(periodCellTemplateConfig);
periodCellTemplateConfigList.add(periodCellTemplateConfig);
}
periodCellTemplateConfigMapper.batchInsert(periodCellTemplateConfigList);
}
private void fixedAccountCode(PeriodCellTemplateConfig pctc) {
if (StringUtils.isNotBlank(pctc.getAccountCodes())) {
String[] acctCodes = pctc.getAccountCodes().split(",");
EnterpriseAccountExample enterpriseAccountExample = new EnterpriseAccountExample();
enterpriseAccountExample.createCriteria().andStdCodeIn(Arrays.asList(acctCodes));
List<EnterpriseAccount> enterpriseAccounts = enterpriseAccountMapper.selectByExample(enterpriseAccountExample);
if (!enterpriseAccounts.isEmpty()) {
List<String> acctCodeList = enterpriseAccounts.stream().map(EnterpriseAccount::getCode).collect(Collectors.toList());
StringBuilder codes = new StringBuilder();
for (String code : acctCodeList) {
codes.append(code).append(",");
}
pctc.setAccountCodes(StringUtils.removeEnd(codes.toString(), ","));
}
}
}
private void fixedParsedFormula(PeriodCellTemplateConfig pctc) {
if (pctc.getFormula() != null && pctc.getFormula().contains("@")) {
String regex = "@[0-9A-Z.]+"; String regex = "@[0-9A-Z.]+";
Pattern pp = Pattern.compile(regex); Pattern pp = Pattern.compile(regex);
Matcher mm = pp.matcher(cellTemplateConfig.getFormula()); Matcher mm = pp.matcher(pctc.getFormula());
String replace_result = cellTemplateConfig.getFormula(); String replace_result = pctc.getFormula();
Boolean replace = true; Boolean replace = true;
while (mm.find()) { while (mm.find()) {
KeyValueConfigExample keyValueConfigExample = new KeyValueConfigExample(); KeyValueConfigExample keyValueConfigExample = new KeyValueConfigExample();
...@@ -412,55 +375,85 @@ public class ReportServiceImpl { ...@@ -412,55 +375,85 @@ public class ReportServiceImpl {
} }
if (replace) { if (replace) {
periodCellTemplateConfig.setKeyValueParsedFormula(replace_result); pctc.setKeyValueParsedFormula(replace_result);
} }
//todo: get the keyvalue from table add to keyvalue parsed formula //todo: get the keyvalue from table add to keyvalue parsed formula
// KeyValueConfigExample keyValueConfigExample = new KeyValueConfigExample(); // KeyValueConfigExample skeyValueConfigExample = new KeyValueConfigExample();
// keyValueConfigExample.createCriteria().andKeyCodeEqualTo(StringUtils.removeStart(cellTemplateConfig.getFormula(), "@")); // keyValueConfigExample.createCriteria().andKeyCodeEqualTo(StringUtils.removeStart(cellTemplateConfig.getFormula(), "@"));
// Optional<KeyValueConfig> keyValueConfig = keyValueConfigMapper.selectByExample(keyValueConfigExample).stream().findFirst(); // Optional<KeyValueConfig> keyValueConfig = keyValueConfigMapper.selectByExample(keyValueConfigExample).stream().findFirst();
// if (keyValueConfig.isPresent()) { // if (keyValueConfig.isPresent()) {
// periodCellTemplateConfig.setKeyValueParsedFormula(keyValueConfig.get().getFormula()); // periodCellTemplateConfig.setKeyValueParsedFormula(keyValueConfig.get().getFormula());
// } // }
} }
periodCellTemplateConfigList.add(periodCellTemplateConfig);
//logger.debug("cellTemplateConfig copy end,used time: " + (System.currentTimeMillis() - startTime) + " ms");
} }
logger.debug("cellTemplateConfigs copy end,used: " + (System.currentTimeMillis() - startTimeOut) + " ms, copy: " + i + " items");
if (periodCellTemplateConfigList != null) { private void copyPeriodCellTemplateFromCellTemplate(String projectId, Long templateId, Integer period) {
periodCellTemplateConfigList.forEach(a -> { CellTemplateExample cellTemplateExample = new CellTemplateExample();
if (StringUtils.isNotBlank(a.getAccountCodes())) { cellTemplateExample.createCriteria().andReportTemplateIdEqualTo(templateId);
String[] acctCodes = a.getAccountCodes().split(","); List<CellTemplate> cellTemplateList = cellTemplateMapper.selectByExample(cellTemplateExample);
EnterpriseAccountExample enterpriseAccountExample = new EnterpriseAccountExample(); List<PeriodCellTemplate> periodCellTemplateList = new ArrayList<>();
enterpriseAccountExample.createCriteria().andStdCodeIn(Arrays.asList(acctCodes));
List<EnterpriseAccount> enterpriseAccounts = enterpriseAccountMapper.selectByExample(enterpriseAccountExample); for (CellTemplate cellTemplate : cellTemplateList) {
if (!enterpriseAccounts.isEmpty()) { PeriodCellTemplate periodCellTemplate = new PeriodCellTemplate();
List<String> acctCodeList = enterpriseAccounts.stream().map(EnterpriseAccount::getCode).collect(Collectors.toList()); CommonUtils.copyProperties(cellTemplate, periodCellTemplate);
StringBuilder codes = new StringBuilder(); periodCellTemplate.setId(distributedIdService.nextId());
for (String code : acctCodeList) { periodCellTemplate.setPeriod(period);
codes.append(code).append(","); periodCellTemplate.setReportTemplateId(templateId);
} periodCellTemplate.setRowIndex(cellTemplate.getRowIndex());
a.setAccountCodes(StringUtils.removeEnd(codes.toString(), ",")); periodCellTemplate.setRowName(cellTemplate.getRowName());
} periodCellTemplate.setColumnIndex(cellTemplate.getColumnIndex());
} periodCellTemplate.setColumnName(cellTemplate.getColumnName());
}); periodCellTemplate.setComment(cellTemplate.getComment());
periodCellTemplate.setCreateTime(cellTemplate.getCreateTime());
periodCellTemplate.setUpdateTime(cellTemplate.getUpdateTime());
periodCellTemplate.setCellTemplateId(cellTemplate.getId());
periodCellTemplate.setDataType(cellTemplate.getDataType());
periodCellTemplate.setIsReadOnly(cellTemplate.getIsReadOnly() ? 1 : 0);
periodCellTemplate.setCopyFromId(cellTemplate.getCopyFromId());
periodCellTemplate.setCreateBy(Utils.isEmpty(cellTemplate.getCreateBy()) ? "admin" : cellTemplate.getCreateBy());
periodCellTemplate.setUpdateBy(Utils.isEmpty(cellTemplate.getUpdateBy()) ? "admin" : cellTemplate.getUpdateBy());
periodCellTemplate.setProjectId(projectId);
periodCellTemplateList.add(periodCellTemplate);
} }
//todo: save config data to DB
periodTemplateMapper.batchInsert(periodTemplateList);
periodCellTemplateMapper.batchInsert(periodCellTemplateList); periodCellTemplateMapper.batchInsert(periodCellTemplateList);
periodCellTemplateConfigMapper.batchInsert(periodCellTemplateConfigList);
} else {
result.setResult(true);
result.setResultMsg("there is no templateGroup");
return result;
} }
result.setResult(true);
} catch (Exception ex) { private void copyTemplateAndConfigFromAdmin(String projectId, Long templateGroupId, Integer period) {
result.setResult(false); TemplateExample example = new TemplateExample();
logger.error(ex.getMessage(), ex); example.createCriteria().andTemplateGroupIdEqualTo(templateGroupId).andIsActiveAssociationEqualTo(true);
List<Template> templates = templateMapper.selectByExample(example);
List<PeriodTemplate> periodTemplateList = new ArrayList<>();
for (Template template : templates) {
Long startTime = System.currentTimeMillis();
logger.debug("template copy start: " + startTime);
PeriodTemplate periodTemplate = new PeriodTemplate();
CommonUtils.copyProperties(template, periodTemplate);
periodTemplate.setId(distributedIdService.nextId());
periodTemplate.setPeriod(period);
periodTemplate.setName(template.getName());
periodTemplate.setCode(template.getCode());
periodTemplate.setPath(template.getPath());
periodTemplate.setReportType(template.getReportType());
periodTemplate.setTemplateGroupId(template.getTemplateGroupId());
periodTemplate.setOrderIndex(template.getOrderIndex());
periodTemplate.setCreateTime(template.getCreateTime());
periodTemplate.setUpdateTime(template.getUpdateTime());
periodTemplate.setIsSystemType(template.getIsSystemType());
periodTemplate.setIsActiveAssociation(template.getIsActiveAssociation());
periodTemplate.setParentId(Utils.isEmpty(template.getParentId()) ? null : template.getParentId());
periodTemplate.setTemplateId(template.getId());
periodTemplate.setCreateBy(Utils.isEmpty(template.getCreateBy()) ? "admin" : template.getCreateBy());
periodTemplate.setUpdateBy(Utils.isEmpty(template.getUpdateBy()) ? "admin" : template.getUpdateBy());
periodTemplate.setProjectId(projectId);
periodTemplateList.add(periodTemplate);
copyPeriodCellTemplateFromCellTemplate(projectId, template.getId(), period);
copyPeriodConfigFromCellTemplateConfig(projectId, template.getId(), period);
} }
return result;
periodTemplateMapper.batchInsert(periodTemplateList);
} }
public OperationResultDto generateData(String projectId, EnumServiceType serviceType, Boolean ifDeleteManualDataSource, public OperationResultDto generateData(String projectId, EnumServiceType serviceType, Boolean ifDeleteManualDataSource,
......
...@@ -2,10 +2,7 @@ package pwc.taxtech.atms.vat.service.impl.report.functions; ...@@ -2,10 +2,7 @@ package pwc.taxtech.atms.vat.service.impl.report.functions;
import org.apache.poi.ss.formula.OperationEvaluationContext; import org.apache.poi.ss.formula.OperationEvaluationContext;
import org.apache.poi.ss.formula.WorkbookEvaluator; import org.apache.poi.ss.formula.WorkbookEvaluator;
import org.apache.poi.ss.formula.eval.NumberEval; import org.apache.poi.ss.formula.eval.*;
import org.apache.poi.ss.formula.eval.OperandResolver;
import org.apache.poi.ss.formula.eval.StringEval;
import org.apache.poi.ss.formula.eval.ValueEval;
import org.apache.poi.ss.formula.functions.FreeRefFunction; import org.apache.poi.ss.formula.functions.FreeRefFunction;
import org.slf4j.Logger; import org.slf4j.Logger;
import org.slf4j.LoggerFactory; import org.slf4j.LoggerFactory;
...@@ -40,7 +37,7 @@ public class BB extends FunctionBase implements FreeRefFunction { ...@@ -40,7 +37,7 @@ public class BB extends FunctionBase implements FreeRefFunction {
} catch (Exception e) { } catch (Exception e) {
if (e instanceof FormulaException) if (e instanceof FormulaException)
LOGGER.warn("Formula Exception || {}", e.getMessage()); LOGGER.warn("Formula Exception || {}", e.getMessage());
else
e.printStackTrace(); e.printStackTrace();
return defaultEval; return defaultEval;
} }
...@@ -95,10 +92,18 @@ public class BB extends FunctionBase implements FreeRefFunction { ...@@ -95,10 +92,18 @@ public class BB extends FunctionBase implements FreeRefFunction {
Field evaluatorField = OperationEvaluationContext.class.getDeclaredField("_bookEvaluator"); Field evaluatorField = OperationEvaluationContext.class.getDeclaredField("_bookEvaluator");
evaluatorField.setAccessible(true); evaluatorField.setAccessible(true);
WorkbookEvaluator evaluator = (WorkbookEvaluator) evaluatorField.get(ec); WorkbookEvaluator evaluator = (WorkbookEvaluator) evaluatorField.get(ec);
ValueEval eval = evaluator.evaluate(ec.getWorkbook().getSheet(ec.getWorkbook().getSheetIndex(bo.getReportCode())) int index = ec.getWorkbook().getSheetIndex(bo.getReportCode());
if (index < 0) logger.warn("not found sheet code {}", bo.getReportCode());
ValueEval eval = evaluator.evaluate(ec.getWorkbook().getSheet(index)
.getCell(bo.getRowIndex() - 1, bo.getColumnIndex() - 1)); .getCell(bo.getRowIndex() - 1, bo.getColumnIndex() - 1));
bo.putPeriodCellTempate(formulaContext.getPeriod(), Long.parseLong(cellTemplateData.getCellTemplateId())); bo.putPeriodCellTempate(formulaContext.getPeriod(), Long.parseLong(cellTemplateData.getCellTemplateId()));
if (eval instanceof ErrorEval) {
LOGGER.warn("error eval for bb {} and error code {} and error String {}", bo.toString(),
((ErrorEval) eval).getErrorCode(), ((ErrorEval) eval).getErrorString());
}
cellValue = new BigDecimal(OperandResolver.coerceValueToDouble(eval)); cellValue = new BigDecimal(OperandResolver.coerceValueToDouble(eval));
nullCellDto.extractFromGroup(bo, formulaContext.getPeriod(), formulaContext.getYear(), cellTemplateData); nullCellDto.extractFromGroup(bo, formulaContext.getPeriod(), formulaContext.getYear(), cellTemplateData);
......
kill -9 `ps -ef |grep java | grep atms-invoice | awk '{print $2}'`
nohup mvn clean spring-boot:run &
kill -9 `ps -ef |grep java | grep atms-web | awk '{print $2}'`
nohup mvn clean tomcat7:run -Dmaven.test.skip=true -f pom.xml &
{ {
"WelcomeATMS":"欢迎使用ATMS系统管理" "WelcomeATMS-Longi":"欢迎使用Longi申报系统管理"
} }
\ No newline at end of file
...@@ -48,6 +48,7 @@ adminHomePageModule ...@@ -48,6 +48,7 @@ adminHomePageModule
return sub.isVisible; return sub.isVisible;
}); });
} }
row.isActive = false;
} }
} }
}); });
...@@ -120,17 +121,17 @@ adminHomePageModule ...@@ -120,17 +121,17 @@ adminHomePageModule
$scope.menuMouseOver = function (x) { $scope.menuMouseOver = function (x) {
if (x.isOpen) { // if (x.isActive) {
return; // return;
} // }
if ($scope.menuData && $scope.menuData.length > 0) { if ($scope.menuData && $scope.menuData.length > 0) {
for (var i = 0; i < $scope.menuData.length; i++) { for (var i = 0; i < $scope.menuData.length; i++) {
var row = $scope.menuData[i]; var row = $scope.menuData[i];
if (x.id === row.id) { if (x.ID === row.ID) {
row.isOpen = true; row.isActive = true;
} else { } else {
row.isOpen = false; row.isActive = false;
} }
} }
} }
...@@ -229,7 +230,8 @@ adminHomePageModule ...@@ -229,7 +230,8 @@ adminHomePageModule
(function initialize() { (function initialize() {
$scope.open = false; $scope.open = false;
getMenusByServiceTypeId('1'); getMenusByServiceTypeId('1');
$scope.active = false;
$scope.isActive = false;
//var glyph_opts = { //var glyph_opts = {
// map: { // map: {
// doc: "glyphicon glyphicon-file", // doc: "glyphicon glyphicon-file",
......
<div class="admin-home-page"> <div class="admin-home-page">
<div class="center-title" ng-mouseover="open=true" ng-mouseleave="open = false"> <div class="center-title" ng-mouseover="open=true" ng-mouseleave="open = false">
<span><h1 translate="WelcomeATMS"></h1></span> <span><h1 translate="WelcomeATMS-Longi"></h1></span>
<div ng-if="hasAdminPermission" class="import-title" ng-show="open"><a ng-click="showUploadModal()" href="#adminHomePage">{{'ImportBasicDataOneTime' |translate}}</a></div> <div ng-if="hasAdminPermission" class="import-title" ng-show="open"><a ng-click="showUploadModal()" href="#adminHomePage">{{'ImportBasicDataOneTime' |translate}}</a></div>
</div> </div>
...@@ -16,7 +16,7 @@ ...@@ -16,7 +16,7 @@
<a href="{{x.navigationUrl}}"><b>{{x.name}}</b></a> <a href="{{x.navigationUrl}}"><b>{{x.name}}</b></a>
</div> </div>
<!-- popover-trigger="mouseenter click" --> <!-- popover-trigger="mouseenter click" -->
<div ng-if="x.subMenus && x.subMenus.length > 0" class="{{x.firstMenuClass}}" uib-popover-template="x.templateUrl" popover-is-open="x.isOpen" popover-placement="{{x.popoverPlacement}}" ng-mouseover="menuMouseOver(x)"> <div ng-if="x.subMenus && x.subMenus.length > 0" class="{{x.firstMenuClass}}" uib-popover-template="x.templateUrl" popover-is-open="x.isActive" popover-placement="{{x.popoverPlacement}}" ng-mouseover="menuMouseOver(x)">
<img class="img" ng-src="{{x.imageUrl}}" alt="{{x.name}}" /> <img class="img" ng-src="{{x.imageUrl}}" alt="{{x.name}}" />
<br /> <br />
<b>{{x.name}}</b> <b>{{x.name}}</b>
......
...@@ -569,17 +569,17 @@ ...@@ -569,17 +569,17 @@
enableSorting: false, enableSorting: false,
enableColumnMenus: false, enableColumnMenus: false,
columnDefs: [ columnDefs: [
{ name: $translate.instant('ImportErrorPopUpNoCol'), width: '7%', cellTemplate: '<div class="ui-grid-cell-contents"><span>{{row.entity.index}}<span></div>' }, { name: $translate.instant('ImportErrorPopUpNoCol'), width: '5%', cellTemplate: '<div class="ui-grid-cell-contents"><span>{{row.entity.index}}<span></div>' },
{ name: $translate.instant('InvoiceQJ'), width: '10.5%', cellTemplate: '<div class="ui-grid-cell-contents"><span>{{row.entity.periodID}}<span></div>' }, { name: $translate.instant('InvoiceQJ'), width: '8%', cellTemplate: '<div class="ui-grid-cell-contents"><span>{{row.entity.periodID}}<span></div>' },
{ name: $translate.instant('InvoiceKPRQ'), width: '10.5%', cellTemplate: '<div class="ui-grid-cell-contents"><span>{{row.entity.kprq | date:"yyyy-MM-dd"}}<span></div>' }, { name: $translate.instant('InvoiceKPRQ'), width: '10.5%', cellTemplate: '<div class="ui-grid-cell-contents"><span>{{row.entity.kprq | date:"yyyy-MM-dd"}}<span></div>' },
{ name: $translate.instant('InvoiceFPDM'), width: '10.5%', cellTemplate: '<div class="ui-grid-cell-contents"><span title="{{row.entity.fpdm}}">{{row.entity.fpdm}}</span></div>' }, { name: $translate.instant('InvoiceFPDM'), width: '10.5%', cellTemplate: '<div class="ui-grid-cell-contents"><span title="{{row.entity.fpdm}}">{{row.entity.fpdm}}</span></div>' },
{ name: $translate.instant('InvoiceFPHM'), width: '10.5%', cellTemplate: '<div class="ui-grid-cell-contents"><span title="{{row.entity.fphm}}">{{row.entity.fphm}}</span></div>' }, { name: $translate.instant('InvoiceFPHM'), width: '10.5%', cellTemplate: '<div class="ui-grid-cell-contents"><span title="{{row.entity.fphm}}">{{row.entity.fphm}}</span></div>' },
{ name: $translate.instant('InvoiceGHFSH'), width: '12%', cellTemplate: '<div class="ui-grid-cell-contents"><span title="{{row.entity.xfsh}}">{{row.entity.xfsh}}</span></div>' }, { name: $translate.instant('InvoiceGHFSH'), width: '12%', cellTemplate: '<div class="ui-grid-cell-contents"><span title="{{row.entity.xfsh}}">{{row.entity.xfsh}}</span></div>' },
{ name: $translate.instant('InvoiceFPLX'), width: '10.5%', cellTemplate: '<div class="ui-grid-cell-contents"><span title="{{row.entity.fplx}}">{{grid.appScope.typeToString(row.entity.fplx)}}</span></div>' }, { name: $translate.instant('InvoiceFPLX'), width: '8%', cellTemplate: '<div class="ui-grid-cell-contents"><span title="{{row.entity.fplx}}">增值税专票</span></div>' },
{ name: $translate.instant('InvoiceJE'), headerCellClass: 'right', width: '10.5%', cellTemplate: '<div class="ui-grid-cell-contents right"><span style="float:right">{{row.entity.hjje}}</span></div>' }, { name: $translate.instant('InvoiceJE'), headerCellClass: 'right', width: '8%', cellTemplate: '<div class="ui-grid-cell-contents right"><span style="float:right">{{row.entity.hjje}}</span></div>' },
{ name: $translate.instant('InvoiceSE'), headerCellClass: 'right', width: '10.5%', cellTemplate: '<div class="ui-grid-cell-contents right"><span style="float:right">{{row.entity.hjse}}</span></div>' }, { name: $translate.instant('InvoiceSE'), headerCellClass: 'right', width: '8%', cellTemplate: '<div class="ui-grid-cell-contents right"><span style="float:right">{{row.entity.hjse}}</span></div>' },
{ name: $translate.instant('InvoiceRZRQ'), width: '10.5%', cellTemplate: '<div class="ui-grid-cell-contents"><span>{{row.entity.rzsj | date:"yyyy-MM-dd"}}</span></div>' }, { name: $translate.instant('InvoiceRZRQ'), width: '10.5%', cellTemplate: '<div class="ui-grid-cell-contents"><span>{{row.entity.rzsj | date:"yyyy-MM-dd"}}</span></div>' },
{ name: $translate.instant('InvoiceRZJG'), width: '10.5%', cellTemplate: '<div class="ui-grid-cell-contents"><span>{{row.entity.certificationResult}}</span></div>' } { name: $translate.instant('InvoiceRZJG'), width: '8%', cellTemplate: '<div class="ui-grid-cell-contents"><span>{{row.entity.certificationResult}}</span></div>' }
], ],
onRegisterApi: function (gridApi) { onRegisterApi: function (gridApi) {
$scope.gridApi = gridApi; $scope.gridApi = gridApi;
...@@ -595,10 +595,10 @@ ...@@ -595,10 +595,10 @@
enableColumnMenus: false, enableColumnMenus: false,
columnDefs: [ columnDefs: [
// { name: $translate.instant('ImportErrorPopUpNoCol'), width: '10%', cellTemplate: '<div class="ui-grid-cell-contents"><span>{{row.entity.index}}<span></div>' }, // { name: $translate.instant('ImportErrorPopUpNoCol'), width: '10%', cellTemplate: '<div class="ui-grid-cell-contents"><span>{{row.entity.index}}<span></div>' },
{ name: $translate.instant('InvoiceHWMC'), width: '23%', cellTemplate: '<div class="ui-grid-cell-contents"><span title="{{row.entity.spmc}}">{{row.entity.spmc}}<span></div>' }, { name: $translate.instant('InvoiceHWMC'), headerCellClass:'right', width: '20%', cellTemplate: '<div class="ui-grid-cell-contents"><span style="float:right" title="{{row.entity.spmc}}">{{row.entity.spmc}}<span></div>' },
{ name: $translate.instant('InvoiceJE'), headerCellClass:'right', width: '23%', cellTemplate: '<div class="ui-grid-cell-contents"><span style="float:right">{{row.entity.je}}<span></div>' }, { name: $translate.instant('InvoiceJE'), headerCellClass:'right', width: '13%', cellTemplate: '<div class="ui-grid-cell-contents"><span style="float:right">{{row.entity.je}}<span></div>' },
{ name: $translate.instant('InvoiceSL'), width: '23%', cellTemplate: '<div class="ui-grid-cell-contents"><span>{{row.entity.slv}}%<span></div>' }, { name: $translate.instant('InvoiceSL'), headerCellClass:'right', width: '13%', cellTemplate: '<div class="ui-grid-cell-contents"><span style="float:right">{{row.entity.slv}}%<span></div>' },
{ name: $translate.instant('InvoiceSE'), headerCellClass:'right', width: '23%', cellTemplate: '<div class="ui-grid-cell-contents"><span style="float:right">{{row.entity.se}}<span></div>' } { name: $translate.instant('InvoiceSE'), headerCellClass:'right', width: '13%', cellTemplate: '<div class="ui-grid-cell-contents"><span style="float:right">{{row.entity.se}}<span></div>' }
] ]
}; };
......
<div class="vat-preview-input-invoice" id="mainPreviewDiv"> <div class="vat-preview-input-invoice" id="mainPreviewDiv">
<div class="top-area-wrapper"> <div class="top-area-wrapper">
<button class="filter-button" <!--<button class="filter-button"
atms-popover ng-mouseenter="prepareSummary()" ng-click="showPopover()" atms-popover ng-mouseenter="prepareSummary()" ng-click="showPopover()"
popover-container="body" popover-auto-hide="true" data-overwrite="true" popover-container="body" popover-auto-hide="true" data-overwrite="true"
use-optimized-placement-algorithm="true" use-optimized-placement-algorithm="true"
data-placement="bottom" data-placement="bottom"
data-templateurl="/app/vat/preview/vat-preview-input-invoice/vat-preview-input-invoice-search.html"> data-templateurl="/app/vat/preview/vat-preview-input-invoice/vat-preview-input-invoice-search.html">
<i class="fa fa-filter" aria-hidden="true"></i> <i class="fa fa-filter" aria-hidden="true"></i>
</button> </button>-->
<span translate="IncomeInvoiceTitle" class="text-bold"></span> &nbsp;&nbsp;|&nbsp;&nbsp;<span class="text-bold" translate="InvoiceQJ"></span> <span translate="IncomeInvoiceTitle" class="text-bold"></span> &nbsp;&nbsp;|&nbsp;&nbsp;<span class="text-bold" translate="InvoiceQJ"></span>
......
<div class="vat-preview-output-invoice" id="mainPreviewDiv"> <div class="vat-preview-output-invoice" id="mainPreviewDiv">
<div class="top-area-wrapper"> <div class="top-area-wrapper">
<button class="filter-button" <!--<button class="filter-button"
atms-popover ng-mouseenter="prepareSummary()" ng-click="showPopover()" atms-popover ng-mouseenter="prepareSummary()" ng-click="showPopover()"
popover-container="body" popover-auto-hide="true" data-overwrite="true" popover-container="body" popover-auto-hide="true" data-overwrite="true"
use-optimized-placement-algorithm="true" use-optimized-placement-algorithm="true"
data-placement="bottom" data-placement="bottom"
data-templateurl="/app/vat/preview/vat-preview-output-invoice/vat-preview-output-invoice-search.html"> data-templateurl="/app/vat/preview/vat-preview-output-invoice/vat-preview-output-invoice-search.html">
<i class="fa fa-filter" aria-hidden="true"></i> <i class="fa fa-filter" aria-hidden="true"></i>
</button> </button>-->
<span translate="OutputInvoiceTitle" class="text-bold"></span> &nbsp;&nbsp;|&nbsp;&nbsp;<span class="text-bold" translate="InvoiceQJ"></span> <span translate="OutputInvoiceTitle" class="text-bold"></span> &nbsp;&nbsp;|&nbsp;&nbsp;<span class="text-bold" translate="InvoiceQJ"></span>
<input type="text" class="form-control input-width-middle" id="output-invoice-period-picker" /> <input type="text" class="form-control input-width-middle" id="output-invoice-period-picker" />
......
...@@ -47,20 +47,20 @@ ...@@ -47,20 +47,20 @@
name: 'TaxReturn', name: 'TaxReturn',
children: _.chain(result[1].data.data) children: _.chain(result[1].data.data)
.sortBy(function(x){ .sortBy(function(x){
return x.templateName; return x.templateCode;
}) })
.map(function(x){ /*.map(function(x){
var nameIndex; var nameIndex;
var tempName = x.templateName.substr(x.templateName.length - 4); var tempName = x.templateName.substr(x.templateName.length - 4);
if(tempName.search("一") != -1){ if(tempName.search("附表一") != -1){
nameIndex = 0; nameIndex = 0;
} else if(tempName.search("二") != -1){ } else if(tempName.search("附表二") != -1){
nameIndex = 1; nameIndex = 1;
} else if(tempName.search("三") != -1){ } else if(tempName.search("附表三") != -1){
nameIndex = 2; nameIndex = 2;
} else if(tempName.search("四") != -1){ } else if(tempName.search("附表四") != -1){
nameIndex = 3; nameIndex = 3;
} else if(tempName.search("五") != -1){ } else if(tempName.search("附表五") != -1){
nameIndex = 4; nameIndex = 4;
} else { } else {
nameIndex = 10; nameIndex = 10;
...@@ -75,7 +75,7 @@ ...@@ -75,7 +75,7 @@
}) })
.sortBy(function(x){ .sortBy(function(x){
return x.nameIndex; return x.nameIndex;
}) })*/
.map(function (x) { .map(function (x) {
return { return {
reportId: x.id, reportId: x.id,
......
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