Commit 93a631d5 authored by eddie.woo's avatar eddie.woo

modify

parent ad76c766
package pwc.taxtech.atms.controller;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import pwc.taxtech.atms.dpo.PagingDto;
import pwc.taxtech.atms.dto.PagingResultDto;
import pwc.taxtech.atms.dto.vatdto.TrialBalanceDto;
import pwc.taxtech.atms.dto.vatdto.TrialBalanceParam;
import pwc.taxtech.atms.service.impl.DataImportService;
import javax.annotation.Resource;
import java.util.Collections;
@RestController
@RequestMapping("/api/v1/DataImport/")
public class DataImportController extends BaseController{
@Resource
private DataImportService dataImportService;
@PostMapping("GetBalanceDataForDisplay")
public PagingResultDto<TrialBalanceDto> getBalanceDataForDisplay(@RequestBody TrialBalanceParam param){
PagingResultDto<TrialBalanceDto> resultDto = new PagingResultDto<>();
PagingDto pagingDto = new PagingDto();
pagingDto.setPageIndex(1);
pagingDto.setPageSize(10);
pagingDto.setTotalCount(0);
resultDto.setPageInfo(pagingDto);
resultDto.setList(Collections.emptyList());
return resultDto;
}
}
package pwc.taxtech.atms.dto.vatdto;
public class TrialBalanceParam {
private String category;
private String criteria;
private String orgId;
private Integer fromPeriod;
private Integer toPeriod;
public String getCategory() {
return this.category;
}
public void setCategory(String category) {
this.category = category;
}
public String getCriteria() {
return this.criteria;
}
public void setCriteria(String criteria) {
this.criteria = criteria;
}
public Integer getFromPeriod() {
return this.fromPeriod;
}
public void setFromPeriod(Integer fromPeriod) {
this.fromPeriod = fromPeriod;
}
public Integer getToPeriod() {
return this.toPeriod;
}
public void setToPeriod(Integer toPeriod) {
this.toPeriod = toPeriod;
}
public String getOrgId() {
return this.orgId;
}
public void setOrgId(String orgId) {
this.orgId = orgId;
}
}
package pwc.taxtech.atms.service.impl;
import org.springframework.stereotype.Service;
@Service
public class DataImportService extends BaseService{
}
commonModule.controller('previewTrialBalanceController', ['$scope', '$log', '$translate', '$timeout', 'apiInterceptor', 'Upload', 'dataImportService', 'SweetAlert', '$q', 'uiGridConstants', 'projectService', 'uiGridGroupingConstants', 'vatImportService', 'i18nService', 'browserService', '$interval', 'region', 'citSessionService', 'enums',
function ($scope, $log, $translate, $timeout, apiInterceptor, Upload, dataImportService, SweetAlert, $q, uiGridConstants, projectService, uiGridGroupingConstants, vatImportService, i18nService, browserService, $interval, region, citSessionService, enums) {
commonModule.controller('previewTrialBalanceController', ['$scope', '$log', '$translate', '$timeout', 'apiInterceptor', 'Upload', 'dataImportService', 'SweetAlert', '$q', 'uiGridConstants', 'projectService', 'uiGridGroupingConstants', 'vatImportService', 'i18nService', 'browserService', '$interval', 'region', 'citSessionService', 'enums', 'vatSessionService',
function ($scope, $log, $translate, $timeout, apiInterceptor, Upload, dataImportService, SweetAlert, $q, uiGridConstants, projectService, uiGridGroupingConstants, vatImportService, i18nService, browserService, $interval, region, citSessionService, enums, vatSessionService) {
'use strict';
$scope.serviceType = $scope.project.serviceTypeID;
......@@ -128,8 +128,8 @@
// function to get data from Backend
$scope.getDataFromDatabase = function (category, from, to, criteria, isExportOnly) {
vatImportService.getBalanceDataForDisplay(category, from, to, criteria).success(function (trialBalance) {
var treeData = JSON.parse(trialBalance);
vatImportService.getBalanceDataForDisplay(category, from, to, criteria, vatSessionService.project.organizationID).success(function (trialBalance) {
var treeData = trialBalance;
writeoutNode(treeData.list, 0, newTree);
//check to see if user switch to STD subject:
......
......@@ -238,12 +238,13 @@
/****************************************************************************************************/
/* Tony's Beatup services */
getBalanceDataForDisplay: function (category, fromPeriod, toPeriod, criteria) {
getBalanceDataForDisplay: function (category, fromPeriod, toPeriod, criteria, orgId) {
return $http.post('/DataImport/GetBalanceDataForDisplay', {
category: category,
fromPeriod: fromPeriod,
toPeriod: toPeriod,
criteria: criteria
criteria: criteria,
orgId: orgId
}, apiConfig.createVat());
// return $http.get('/DataImport/GetBalanceDataForDisplay?category=' + category + '&fromPeriod=' + fromPeriod + '&toPeriod=' + toPeriod + '&criteria=' + criteria, apiConfig.createVat());
},
......
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