Commit f29b7fa0 authored by kevin's avatar kevin

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

parents fcde7e1d d0455ac6
......@@ -117,7 +117,7 @@ public class POIUtil {
return row;
}
public static Row createAndCloneRow(Workbook wb ,Sheet sheet, Integer destRowIndex,Row fromRow) {
public static Row createAndCloneRow(Workbook wb , Sheet sheet, Integer destRowIndex, Row fromRow) {
Row toRow = null;
if (sheet.getRow(destRowIndex) != null) {
int lastRowNo = sheet.getLastRowNum();
......@@ -136,10 +136,6 @@ public class POIUtil {
boolean copyValueFlag) {
CellStyle newstyle=wb.createCellStyle();
copyCellStyle(wb,srcCell.getCellStyle(), newstyle);
if(srcCell.getColumnIndex()==7){
newstyle.setLocked(false);
}
// distCell.setEncoding(srcCell.getEncoding());
//样式
distCell.setCellStyle(newstyle);
......
......@@ -10,15 +10,16 @@ public class TaxesCalculateReportEnum {
Column_1(0, "序号"),
Column_2(1, "收入类型名称"),
Column_3(2, "税金项目"),
Column_4(3, "账载收入-明细"),
Column_5(4, "销项开票收入数-专票"),
Column_6(5, "销项开票收入数-普票"),
Column_7(6, "计税基数(应税收入)"),
Column_8(7, "税率"),
Column_9(8, "税额(元)"),
Column_10(9, "收入类别"),
Column_11(10, "计税方式"),
Column_12(11, "备注")
Column_4(3, "期间"),
Column_5(4, "账载收入-明细"),
Column_6(5, "销项开票收入数-专票"),
Column_7(6, "销项开票收入数-普票"),
Column_8(7, "计税基数(应税收入)"),
Column_9(8, "税率"),
Column_10(9, "税额(元)"),
Column_11(10, "收入类别"),
Column_12(11, "计税方式"),
Column_13(12, "备注")
;
private Integer index;
private String name;
......
......@@ -1927,7 +1927,7 @@ public class DataImportService extends BaseService {
case EbsExtractTypeConstant.OCTB:
break;
case EbsExtractTypeConstant.RATE:
response = HttpUtil.post(ebsCallUrl + "/fsgCash"+"?dailyRates=" + period,
response = HttpUtil.post(ebsCallUrl + "/dailyRates"+"?period=" + period,
"","application/json;charset=utf-8", "UTF-8", 10000, 10000);
break;
default:
......
......@@ -162,6 +162,19 @@ public class MenuServiceImpl {
menuIds.add("12776533-9c54-4737-a28c-0cd2a3d75049");
menuIds.add("17d6cd83-f5b6-46f2-88e0-58d21957ad29");
menuIds.add("17d6cd83-f5b6-46f2-88e0-58d21957ad30");
menuIds.add("12776533-9c54-4737-a28c-0cd2a3d74046");
menuIds.add("17d6cd83-f5b6-46f2-88e0-58d21957ad30");
menuIds.add("12776533-9c54-4737-a28c-0cd2a3d74050");
menuIds.add("12776533-9c54-4737-a28c-0cd2a3d74051");
menuIds.add("12776533-9c54-4737-a28c-0cd2a3d740510");
menuIds.add("12776533-9c54-4737-a28c-0cd2a3d74052");
menuIds.add("12776533-9c54-4737-a28c-0cd2a3d74053");
menuIds.add("12776533-9c54-4737-a28c-0cd2a3d74054");
menuIds.add("12776533-9c54-4737-a28c-0cd2a3d74055");
menuIds.add("12776533-9c54-4737-a28c-0cd2a3d74056");
menuIds.add("12776533-9c54-4737-a28c-0cd2a3d74057");
menuIds.add("12776533-9c54-4737-a28c-0cd2a3d74058");
menuIds.add("12776533-9c54-4737-a28c-0cd2a3d74059");
}
// List<MenuDto> menus = getMenus(moduleId).stream().filter(x -> permissionNames.contains(x.getName())).collect(Collectors.toList());
return menuIds;
......
......@@ -190,15 +190,15 @@ public class TaxDocumentServiceImpl {
taxDocument.setCreatorId(authUserHelper.getCurrentUserId());
taxDocument.setUploadTime(new Date());
taxDocument.setYearRedundancy(Calendar.getInstance().get(Calendar.YEAR));
Long id = taxDocumentMapper.insert(taxDocument);
int num = taxDocumentMapper.insert(taxDocument);
//根据公司Id 设置业务线
String businessLine = organizationService.queryBusinessByCompanyId(taxDocument.getCompanyId());
if (StringUtils.isNotBlank(businessLine)) {
taxDocument.setBusinessLine(businessLine);
}
if (id > 0) {
if (num > 0) {
OperationLogTaxDocument actionEntity = buildOperationLogTaxDocument();
actionEntity.setId(id.toString());
actionEntity.setId(taxDocument.getId().toString());
actionEntity.setOperationAction("新增");
actionEntity.setUpdateState(taxDocument.toString());
boolean result = operationLogTaxDocService.addTaxDocumentList(actionEntity);
......
......@@ -258,7 +258,12 @@ public class TemplateGroupServiceImpl extends AbstractService {
cellTemplate.setCreateTime(now);
cellTemplate.setUpdateTime(now);
cellTemplate.setRowIndex(r);
cellTemplate.setRowName(StringUtils.EMPTY);
//税金计算表单独处理
if("VAT020".equals(template.getCode())){
cellTemplate.setRowName(POIUtil.getCellFormulaString(cell));
}else{
cellTemplate.setRowName(StringUtils.EMPTY);
}
cellTemplate.setColumnName(StringUtils.EMPTY);
cellTemplate.setComment(StringUtils.EMPTY);
cellTemplate.setCopyFromId(0L);
......@@ -406,6 +411,10 @@ public class TemplateGroupServiceImpl extends AbstractService {
continue;//todo cell == null 如何处理
}
CellTemplate cellTemplate = new CellTemplate();
//税金计算表单独处理
if("VAT020".equals(template.getCode())){
cellTemplate.setRowName(POIUtil.getCellFormulaString(cell));
}
cellTemplate.setColumnIndex(c);
cellTemplate.setCreateTime(now);
cellTemplate.setUpdateTime(now);
......
......@@ -8,18 +8,12 @@ import org.apache.poi.ss.formula.functions.FreeRefFunction;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import pwc.taxtech.atms.common.util.MyAsserts;
import pwc.taxtech.atms.constant.DataSourceName;
import pwc.taxtech.atms.constant.enums.FormulaDataSourceDetailType;
import pwc.taxtech.atms.dpo.CellTemplatePerGroupDto;
import pwc.taxtech.atms.dto.vatdto.BBParasBo;
import pwc.taxtech.atms.dto.vatdto.CurrentPeriodBo;
import pwc.taxtech.atms.dto.vatdto.ReportCellDataSourceDto;
import pwc.taxtech.atms.dto.vatdto.WPNAMEParasBo;
import pwc.taxtech.atms.entity.Project;
import pwc.taxtech.atms.exception.Exceptions;
import pwc.taxtech.atms.exception.FormulaException;
import pwc.taxtech.atms.vat.entity.PeriodCellData;
import pwc.taxtech.atms.vat.entity.PeriodDataSource;
import java.math.BigDecimal;
import java.util.ArrayList;
......@@ -65,7 +59,7 @@ public class WPNAME extends FunctionBase implements FreeRefFunction {
MyAsserts.assertNotEmpty(cellTemplateDataList, Exceptions.BB_CELL_TEMP_NULL);
cellTemplateData = cellTemplateDataList.get(0);
int index = ec.getWorkbook().getSheetIndex(bo.getReportCode());
cellValue = getCellValue(index, ec, formulaContext, agent, cellTemplateData.getRowIndex(), bo.getColumnIndex() - 1,
cellValue = getCellValue(index, ec, formulaContext, agent, cellTemplateData.getRowIndex(), "VAT020".equals(bo.getReportCode())?bo.getColumnIndex():(bo.getColumnIndex() - 1),
Long.parseLong(cellTemplateData.getCellTemplateId()));
nullCellDto.extractFromGroup(bo, formulaContext.getPeriod(), formulaContext.getYear(), cellTemplateData);
nullCellDto.setAmount(cellValue);
......
This source diff could not be displayed because it is too large. You can view the blob instead.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
......@@ -406,13 +406,15 @@ public class DataInitTest extends CommonIT {
*/
String input = "";
try {
File targetFile = new File("src/main/resources/orgImport/ddOrgJson.json");
File targetFile = new File("src/main/resources/orgImport/ddOrgJson2.json");
// File targetFile = new File("src/main/resources/orgImport/failedJson.json");
input = FileUtils.readFileToString(targetFile, "UTF-8");
} catch (Exception e) {
e.printStackTrace();
}
DDSyncOrgInfo ddSyncOrgInfo = JSONObject.parseObject(input,DDSyncOrgInfo.class);
List<OrgSyncData> orgSyncDatas = ddSyncOrgInfo.getData();
// List<OrgSyncData> orgSyncDatas = JSONArray.parseArray(input,OrgSyncData.class);
orgSyncDatas.forEach(osd -> {
OrganizationExample example = new OrganizationExample();
example.createCriteria().andNameEqualTo(osd.getNameCN());
......@@ -438,6 +440,24 @@ public class DataInitTest extends CommonIT {
});
}
@Test
public void testOrg(){
String input = "";
try {
// File targetFile = new File("src/main/resources/orgImport/ddOrgJson.json");
File targetFile = new File("src/main/resources/orgImport/failedJson.json");
input = FileUtils.readFileToString(targetFile, "UTF-8");
} catch (Exception e) {
e.printStackTrace();
}
// DDSyncOrgInfo ddSyncOrgInfo = JSONObject.parseObject(input,DDSyncOrgInfo.class);
// List<OrgSyncData> orgSyncDatas = ddSyncOrgInfo.getData();
List<OrgSyncData> orgSyncDatas = JSONArray.parseArray(input,OrgSyncData.class);
}
private void setProperty(Object obj, String propertyName, Object value) {
try{
Class c = obj.getClass();
......
......@@ -41,7 +41,7 @@ public interface TaxDocumentMapper extends MyMapper {
*
* @mbg.generated
*/
Long insert(TaxDocument record);
int insert(TaxDocument record);
/**
* This method was generated by MyBatis Generator.
......
......@@ -208,7 +208,7 @@ public class AccountController {
response.addCookie(ddTicketCookie);
response.addCookie(ddJumptoCookie);
// todo 这里写死为DD的登出地址了
response.sendRedirect(" http://mis.diditaxi.com.cn/auth/ldap/logout?app_id=2500");
response.sendRedirect("http://mis.diditaxi.com.cn/auth/ldap/logout?app_id=2500");
} catch (Exception e) {
logger.error("登出失败", e);
}
......
......@@ -215,6 +215,7 @@ grunt.initConfig({
util: {
src: ["Scripts/underscore.js",
"Scripts/arrgh.js",
"Scripts/tableau-2.2.2.min.js",
"Scripts/jquery.page.js",
"Scripts/jquery.floatThead.js",
"Scripts/jquery.dataTables.js",
......
......@@ -1682,4 +1682,23 @@ var analysisModule = angular.module('app.analysis', ['ui.grid', 'ui.router','ui.
sticky: true
});
//分析dashboard
$stateProvider.state({
name: 'unreturnedTax',
url: "/analysis/unreturnedTax",
dsr: true,
views: {
'importContent': {
controller: ['$scope', '$state','appTranslation',
function ($scope, $state, appTranslation) {
$scope.state = $state;
appTranslation.load([appTranslation.appPart]);
}],
template: '<unreturned-tax></unreturned-tax>'
}
},
resolve: scriptDependencyProvider.createDependenciesMap(scriptDependencyProvider.analysis),
sticky: true
});
}]);
\ No newline at end of file
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -893,6 +893,17 @@
"InternationalDataImport":"国际税数据",
"TBEBITForm":"TB EBIT 表格",
"ClickEnsureTip": "请点击确定按钮!",
"MenuUnreturnedTax": "未返还税金分析",
"MenuTaxComparison": "未返还/返还后税金比较",
"MenuCostAnalysis": "费用分析",
"MenuProfitAndLoss": "利润/亏损分析",
"MenuOtherDomesticData": "其他国内数据",
"MenuDocSituation": "档案归档情况",
"MenuGlobalOverview": "全球概览",
"MenuMexicanTax": "墨西哥税务分析",
"MenuAustralianTax": "澳洲税务分析",
"MenuBrazilianTax": "巴西税务分析",
"MenuOtherCountries": "其他国家税务分析",
"true": "是",
"false": "否",
......
analysisModule.controller('UnreturnedTaxController', ['$scope','$filter', '$log', '$translate', '$timeout',
function ($scope,$filter, $log, $translate, $timeout) {
'use strict';
function init() {
var placeholderDiv = document.getElementById('vizContainer');
var url = 'http://10.158.230.16:8890/trusted/b4TGi86ySyuKfWyvE8vnww==:Rel9fneoVyJ58IukJ5ve-_k1/views/Didi_Tax_20190307/sheet8?iframeSizedToWindow=true&:embed=y&:showAppBanner=false&:display_count=no&:showVizHome=no';
var options = {
hideTabs: true,
width: "90%",
height: "500px",
onFirstInteractive: function() {
// The viz is now ready and can be safely used.
console.log("Run this code when the viz has finished loading.");
}
};
$scope.viz = new tableau.Viz(placeholderDiv, url, options);
}
init();
(function initialize() {
})();
}
]);
\ No newline at end of file
<!--<script type='text/javascript' src='http://10.158.230.16:8890/javascripts/api/tableau-2.min.js'></script>-->
<div class='tableauPlaceholder' style='width: 1920px; height: 848px;'>
<!--<object class='tableauViz' width='1920' height='848' style='display:none;'>-->
<!--<param name='host_url' value='http%3A%2F%2F10.158.230.16%3A8890%2F'/>-->
<!--<param name='embed_code_version' value='3'/>-->
<!--<param name='site_root' value=''/>-->
<!--<param name='name' value='Didi_Tax_20190307&#47;sheet8'/>-->
<!--<param name='tabs' value='no'/>-->
<!--<param name='toolbar' value='yes'/>-->
<!--<param name='showAppBanner' value='false'/>-->
<!--<param name='filter' value='iframeSizedToWindow=true'/>-->
<!--<param name="ticket" value="g2-zt7USSSmP7mPfZU2P1Q==:kZimvabueyV0_38cviKedMKz"/>-->
<!--</object>-->
<div id="vizContainer" style="display: flex; justify-content: center"></div>
</div>
<!--<iframe src="http://10.158.230.16:8890/trusted/JS6C48CESm6veO9zZqFLHw==:0dKT6t0QE0OeVhKYRQ7k471k/views/Didi_Tax_20190307/sheet8?iframeSizedToWindow=true&:embed=y&:showAppBanner=false&:display_count=no&:showVizHome=no"-->
<!--width="800" height="600"></iframe>-->
\ No newline at end of file
analysisModule.directive('unreturnedTax', ['$log',
function ($log) {
'use strict';
return {
restrict: 'E',
templateUrl: '/app/analysis/dashboard/unreturned-tax/unreturned-tax.html' + '?_=' + Math.random(),
scope: {
serviceTypeId: "=?",
periodId: "=?"
},
controller: 'UnreturnedTaxController',
link: function (scope, element) {
}
};
}
]);
\ No newline at end of file
@import "~/app-resources/less/theme.less";
\ No newline at end of file
......@@ -34,7 +34,7 @@
<div class="form-group">
<label class="control-label col-sm-3"><span class="red-color">*</span><span translate="Company"></label>
<div class="col-sm-9">
<input id="orgName" type="text" name="orgName" maxlength="100" class="form-control" style="width: 300px;" ng-model="editUserModel.OrgName" readonly="readonly" required>
<input id="orgName" type="text" name="orgName" maxlength="100" class="form-control" style="width: 300px;" ng-model="editUserModel.orgName" readonly="readonly" required>
<!--<org-selector selected-org-name="editUserModel.OrgName" selected-org-id="editUserModel.OrganizationID" component-selected-org="" is-show-all="false" is-require="true"
style="width: 300px;"></org-selector>
<label class="error-label" style="font-size:12px;" ng-show="editUserModel.organizationIDError">{{editUserModel.organizationIDError}}</label>-->
......
......@@ -109,7 +109,7 @@
var periodStr = $scope.UploadPeriodTime;
dataImportService.callExtractFinancialData($scope.checkedCompanyCodeList,periodStr,$scope.checkedFileCodeList).success(function (data) {
if (data) {
getFinancialDataStatus();
}
});
};
......@@ -123,11 +123,11 @@
}
};
var loadImportATStatusInfoDatagrid = function () {
var loadExtractFinancialInfoDatagrid = function () {
$scope.importATStatusGridOptions = {
$scope.extractFinancialGridOptions = {
bindingOptions: {
dataSource: 'ImportATStatusGridSource'
dataSource: 'extractFinancialGridSource'
},
showBorders: true,
columns: [{
......@@ -221,11 +221,11 @@
};
var getFinancialDataStatus = function () {
vatImportService.displayImportLog(constant.importFileType.ExtractFinancialData).success(function (data) {
vatImportService.displayImportLog($scope.pagingOptions,constant.importFileType.ExtractFinancialData).success(function (data) {
if (data) {
$scope.ImportATStatusGridSource = data;
for (var i = 1; i <= $scope.ImportATStatusGridSource.length; i++) {
$scope.ImportATStatusGridSource[i - 1].index = i;
$scope.extractFinancialGridSource = data;
for (var i = 1; i <= $scope.extractFinancialGridSource.length; i++) {
$scope.extractFinancialGridSource[i - 1].index = i;
}
}
});
......@@ -416,7 +416,7 @@
checkUserOrganizationPermissionList();
getUserPermission();
initCompanyList();
loadImportATStatusInfoDatagrid();
loadExtractFinancialInfoDatagrid();
initDatePicker();
$timeout(function () {
......
......@@ -74,7 +74,7 @@
<div class="dt-init-wrapper">
<div class="dx-viewport grid-container">
<div id="importATStatusGridContainer" dx-data-grid="importATStatusGridOptions"
<div id="extractFinancialGridContainer" dx-data-grid="extractFinancialGridOptions"
style="margin-top: 30px;">
</div>
</div>
......
......@@ -247,7 +247,7 @@
}
}
.importATStatusGridContainer {
.extractFinancialGridContainer {
height: calc(~'100% - 30px');
overflow: hidden;
position: absolute;
......
......@@ -20,11 +20,6 @@
<span class="nav-icon-color">{{'MenuVAT' | translate}}</span>
</a>
</div>
<div class="nav-element-left">
<a ui-sref="listApproval">
<span class="nav-icon-color">{{'MenuListApproval' | translate}}</span>
</a>
</div>
<div class="nav-element-left">
<a ui-sref="overviewCit">
<span class="nav-icon-color">{{'MenuCIT' | translate}}</span>
......@@ -40,6 +35,11 @@
<span class="nav-icon-color">{{'MenuAnalysis' | translate}}</span>
</a>
</div>
<div class="nav-element-left">
<a ui-sref="listApproval">
<span class="nav-icon-color">{{'MenuListApproval' | translate}}</span>
</a>
</div>
<!--<div class="nav-element-left">-->
<!--<a ui-sref="summaryDashboard" hover-show="second">-->
<!--<span class="nav-icon-color">{{'MenuTaxAnalysisPlatform' | translate}}</span>-->
......
......@@ -67,16 +67,16 @@ taxDocumentManageModule.factory('taxDocumentListService',
return jqFetch.post(apiInterceptor.webApiHostUrl + '/fileTypes/query4SelectionBox', params);
},
getCompanyNameOptions:function(params){
return jqFetch.post(apiInterceptor.webApiHostUrl + '/org/query4SelectionBox', params);
return jqFetch.get(apiInterceptor.webApiHostUrl + '/org/getMyOrgList', params);
},
delFileRecordItems:function(params){
return jqFetch.post(apiInterceptor.webApiHostUrl + '/taxDoc/batchDelete', params);
},
getDocumentsAttrAndType:function(params){
return jqFetch.post(apiInterceptor.webApiHostUrl + '/v1/fileTypes/selectList', params);
return jqFetch.post(apiInterceptor.webApiHostUrl + '/fileTypes/selectList', params);
},
getBusinessList:function(params){
return jqFetch.get(apiInterceptor.webApiHostUrl + '/v1/businessunit/getlist', params);
return jqFetch.get(apiInterceptor.webApiHostUrl + '/businessunit/getlist', params);
},
downloadAllFile:function(params){
var xhr = new XMLHttpRequest();
......
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