Commit c930eef3 authored by frank.xa.zhang's avatar frank.xa.zhang

fixed some issues

parent 5fa78c42
package pwc.taxtech.atms.controller;
import java.util.List;
import java.util.Map;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiOperation;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.*;
import pwc.taxtech.atms.dto.ProjectClientDto;
import pwc.taxtech.atms.dto.ServiceTypeDto;
import pwc.taxtech.atms.dto.taxadmin.AddProjectResult;
import pwc.taxtech.atms.dto.taxadmin.ProjectDisplayDto;
import pwc.taxtech.atms.service.ProjectService;
import java.util.List;
import java.util.Map;
@RestController
@RequestMapping("/api/v1/project")
public class ProjectController {
......@@ -61,7 +54,7 @@ public class ProjectController {
@ApiOperation(value = "getAllProjectList", notes = "Get All List")
@RequestMapping(value = "getAllProjectList", method = RequestMethod.GET)
public @ResponseBody
List<ProjectDisplayDto> getAllProjectList(String orgID, String serviceID, Integer projectYear) {
List<ProjectDisplayDto> getAllProjectList( String orgID, String serviceID,@RequestParam(required = false) Integer projectYear) {
logger.info("/api/v1/project/getAllProjectList with orgID {} serviceID {}", orgID, serviceID);
return projectService.getAllProjectList(orgID, serviceID == null ? "" : serviceID, projectYear);
}
......
......@@ -10,8 +10,8 @@
<meta charset="utf-8" http-equiv="X-UA-Compatible" content="chrome=1; IE=11; IE=10; IE=9; IE=EDGE">
<title>Apex+</title>
<link href="~/favicon.ico" rel="shortcut icon" type="image/x-icon" />
<link href="/Account/favicon.ico" rel="shortcut icon" type="image/x-icon" />
<link href="/bundles/accountLogin.css" rel="stylesheet" type="text/css" />
<!--@Styles.Render("~/Account/login")-->
<style>
html, body {
......@@ -20,6 +20,11 @@
overflow: hidden;
}
input:-webkit-autofill{
background-color: transparent !important;
background-image: initial !important;
}
*, *:before, *:after {
box-sizing: border-box;
margin: 0;
......@@ -345,7 +350,7 @@
var $ripple = $("<div class='ripple'></div>");
$ripple.css({ top: y, left: x });
elem.append($ripple);
};
}
var $inputwrapper = $('.login__row');
$inputwrapper.find('input').on('input propertychange', function () {
......@@ -382,7 +387,7 @@
// other browser
return false;
}
};
//since of the ie couldn't render svg properly, use the workaround
if (detectIE()) {
......
webservices.factory('BSPLService', ['$log', '$http', 'apiConfig',
function ($log,$http,apiConfig) {
'use strict';
$log.debug('BSPLService.ctor()...');
return {
//CIT Remove(可以直接使用vat已有的):
// citSwitchPeriod: function (templateID, period)
GetCellDetailInfo: function (keyValueDataID) {
return $http.get('/bspl/cellDetail/' + keyValueDataID, apiConfig.createVat());
},
GetCellInfo: function (templateId,col,row) {
return $http.get('/bspl/cellDetail?templateId=' + templateId + '&col=' + col + '&row=' + row, apiConfig.createVat({ignoreLoadingBar:true}));
},
SwitchPeriod: function (templateID, period) {
return $http.get('/bspl/filter', apiConfig.createVat());
},
GenerateBSPL: function (projectId, period) {
return $http.get('/bspl/generate?projectId=' + projectId + '&period=' + period, apiConfig.createVat());
},
GenerateBSPLWithoutLoading: function (projectId, period) {
return $http.get('/bspl/generate?projectId=' + projectId + '&period=' + period, apiConfig.createVat({ ignoreLoadingBar: true }));
},
getReportData: function (projectId, templateId, period, generator) {
return $http.get('/bspl/reportData?templateId=' + templateId + '&projectID=' + projectId + '&period=' + period + '&generator=' + generator, apiConfig.createVat());
},
citGetCellDetailInfo: function (keyValueDataID) {
return $http.get('/bspl/citCellDetail/' + keyValueDataID, apiConfig.createVat());
},
citGetCellInfo: function (templateId,col,row) {
return $http.get('/bspl/citCellDetail?templateId=' + templateId + '&col=' + col + '&row=' + row, apiConfig.createVat({ignoreLoadingBar:true}));
},
citGenerateBSPL: function (projectId, period) {
return $http.get('/bspl/citGenerate?projectId=' + projectId + '&period=' + period, apiConfig.createVat());
},
citGenerateBSPLWithoutLoading: function (projectId, period) {
return $http.get('/bspl/citGenerate?projectId=' + projectId + '&period=' + period, apiConfig.createVat({ ignoreLoadingBar: true }));
},
citGetReportData: function (projectId, templateId, period, generator) {
return $http.get('/bspl/citReportData?templateId=' + templateId + '&projectID=' + projectId + '&period=' + period + '&generator=' + generator, apiConfig.createVat());
}
};
}]);
\ No newline at end of file
webservices.factory('InvoiceManageService', ['$http', 'apiConfig', 'httpCacheService', 'FileSaver',
function ($http, apiConfig, httpCacheService, FileSaver) {
'use strict';
return {
getInvoiceFilterBasicData: function () {
return $http.get('/invoiceManage/getInvoiceFilterBasicData', apiConfig.create());
},
//除去已经失效的invoice,用来做重复验证
getAllValidInvoiceList: function () {
return $http.get('/invoiceManage/getAllValidInvoiceList', apiConfig.create());
},
//获取invoice的各种remarks,例如,退票,补录,验真
getInvoiceRemarks: function (listInvoice) {
return $http.post('/invoiceManage/getInvoiceRemarks', listInvoice, apiConfig.create());
},
//批量验证
checkUnique: function (invoiceList) {
return $http.post('/invoiceManage/checkUnique', invoiceList, apiConfig.create());
},
//单个重复验证
invoiceUniqueVerify: function (invoiceCode, invoiceNumber) {
return $http.get('/invoiceManage/invoiceUniqueVerify?invoiceCode=' + invoiceCode + '&invoiceNumber=' + invoiceNumber, apiConfig.create());
},
//查询invoice according on condition
getInputInvoiceList: function (queryParm) {
return $http.post('/invoiceManage/getInputInvoiceList?isUncollect=false', queryParm, apiConfig.create());
},
//未收票认证发票查询
getNotReceivedInputInvoiceList: function (queryParm) {
return $http.post('/invoiceManage/getNotReceivedInputInvoiceList', queryParm, apiConfig.create());
},
//服务器导出
exportInputInvoiceList: function (queryParm, fileName, isUncollect) {
if (isUncollect === undefined || isUncollect === null) isUncollect = false;
return $http.post('/invoiceManage/exportInputInvoiceList?isUncollect=' + isUncollect + '&fileName=' + encodeURI(fileName), queryParm, apiConfig.create({ responseType: 'arraybuffer' }));
},
//服务器导出发票关联信息
exportInvoiceAllInfo: function (queryParm, fileName, isUncollect) {
if (isUncollect === undefined || isUncollect === null) isUncollect = false;
return $http.post('/invoiceManage/exportInvoiceAllInfoList?isUncollect=' + isUncollect + '&fileName=' + encodeURI(fileName), queryParm, apiConfig.create({ responseType: 'arraybuffer' }));
},
//关联管理服务器导出
exportMappingInvoiceList: function (queryParm, fileName) {
return $http.post('/invoiceManage/exportMappingInvoiceList?fileName=' + encodeURI(fileName), queryParm, apiConfig.create({ responseType: 'arraybuffer' }));
},
addRefundRemark: function (param) {
return $http.post('/invoiceManage/addRefundRemark', param, apiConfig.create());
},
getInputInvoiceItemList: function (invoiceID) {
return $http.get('/invoiceManage/getInputInvoiceItemList?inputInvoiceId=' + invoiceID, apiConfig.create());
},
getInputInvoiceRefundList: function (queryParm) {
return $http.post('/invoiceManage/getInputInvoiceList?isUncollect=true', queryParm, apiConfig.create());
},
getVerifyFilterBasicData: function () {
return $http.get('/invoiceManage/getVerifyFilterBasicData', apiConfig.create());
},
getNotVerifyDataList: function (dto) {
return $http.post('/invoiceManage/getVerifyListData', dto, apiConfig.create());
},
verifySpecialInvoice: function (dto) {
return $http.post('/invoiceManage/verifySpecialInvoice', dto, apiConfig.create());
},
//获取发票关联管理列表
getInvoiceRelevanceDisplayList: function (queryParam) {
return $http.post('/invoiceManage/invoiceRelevanceDisplay', queryParam, apiConfig.create());
},
saveVoucherNo: function (param) {
return $http.post('/invoiceManage/saveInputInvoiceVoucherNo', param, apiConfig.create());
},
//保存发票关联信息
saveInputInoviceRelevance: function (inputInvoiceRelevanceDto, isCompleted) {
return $http.post('/invoiceManage/saveInputInvoiceRelevance/' + isCompleted, inputInvoiceRelevanceDto, apiConfig.create());
},
//根据invoiceID获取发票关联信息
getSingleInputInvoiceRelevance: function (inputInvoiceID) {
return $http.get('/invoiceManage/getSingleInvoiceRelevance/' + inputInvoiceID, apiConfig.create());
},
//完成发票关联操作
completeInputInvoiceRelevance: function (inputInvoiceID) {
return $http.get('/invoiceManage/completeInputInvoiceRelevance/' + inputInvoiceID, apiConfig.create());
},
//根据AN号获取locationCode并判断是否纳入进项税额
getIncludedInTaxAmountByAcceptNO: function (acceptNO) {
return $http.get('/invoiceManage/getIncludedInTaxAmountByAcceptNO/' + acceptNO, apiConfig.create());
},
//根据CostCenter判断是否计入进项税额
getIncludedInTaxAmountByCostCenter: function (costCenterCodes) {
return $http.get('/invoiceManage/getIncludedInTaxAmountByCostCenter/' + costCenterCodes, apiConfig.create());
},
//根据VoucherNO获取是否计入进项税额
getIncludedInTaxAmountByVoucherNO: function (voucherNO) {
return $http.get('/invoiceManage/getIncludedInTaxAmountByVoucherNO/' + voucherNO, apiConfig.create());
},
//根据发票的购方名称获取CompanyCode和CostCenter
getCompanyCodeAndCostCenter: function (buyerName) {
return $http.get('/invoiceManage/getCompanyCodeAndCostCenter/' + buyerName, apiConfig.create());
},
//手动认证
invoiceManualVerify: function (verifyList) {
return $http.post('/invoiceManage/invoiceManualVerify', verifyList, apiConfig.create());
},
//自动认证
invoiceAutoVerify: function () {
return $http.post('/invoiceManage/invoiceAutoVerify', apiConfig.create());
},
//手动识别
invoiceManualRecognize: function (invoiceIDList) {
return $http.post('/invoiceManage/invoiceManualRecognize', invoiceIDList, apiConfig.create());
},
//手动识别,只是更新状态,更新为识别中,不会去百旺拿数据
invoiceManualRecognizeBool: function (invoiceIDList) {
return $http.post('/invoiceManage/invoiceManualRecognizeBool', invoiceIDList, apiConfig.create({ ignoreLoadingBar: true }));
},
//
//自动识别
invoiceAutoRecognize: function () {
return $http.post('/invoiceManage/invoiceAutoRecognize', apiConfig.create());
},
//发票验真(系统验真,批量)
invoiceExamination: function () {
return $http.post('/invoiceManage/invoiceExamination', apiConfig.create());
},
//发票手动验真
invoiceManualExamination: function (invoiceList) {
return $http.post('/invoiceManage/invoiceManualExamination', invoiceList, apiConfig.create());
},
//退票和失效,变更发票状态
updateInvoiceStatus: function (invoiceStatusType, invoiceIDList) {
return $http.post('/invoiceManage/invoiceStatusOperate?invoiceStatusType=' + invoiceStatusType, invoiceIDList, apiConfig.create());
},
//扫描枪上传数据
invoiceUploadFromScan: function (invoiceList) {
return $http.post('/invoiceManage/invoiceUploadFromScan', invoiceList, apiConfig.create());
},
downloadTemplate: function () {
var thisConfig = apiConfig.create();
thisConfig.responseType = "arraybuffer";
return $http.post('/invoiceManage/downloadTemplate', {}, thisConfig).then(function (response) {
var data = new Blob([response.data], { type: response.headers('Content-Type') });
// var filename1 = response.headers('Content-Disposition').split(';')[1].trim().substr('filename='.length);
var filename = '发票认证模板.xlsx';
FileSaver.saveAs(data, filename);
});
},
//PDF上传数据
confirmToUpload: function (analysisInvoiceList) {
return $http.post('/invoiceManage/confirmToUpload', analysisInvoiceList, apiConfig.create());
},
//取文件信息
getInputInvoiceFile: function (fileId) {
return $http.get('/invoiceManage/getInputInvoiceFile?fileId=' + fileId, apiConfig.create());
},
//保存发票校验码
saveInvoiceCheckCode: function (dto) {
return $http.post('/invoiceManage/saveInvoiceCheckCode', dto, apiConfig.create());
},
//上传扫描仪发票列表
saveScanInvoiceList: function (invoiceList) {
return $http.post('/invoiceManage/UploadInvoiceFile', invoiceList, apiConfig.create());
},
//获取验真结果,
getInputInvoiceValid: function (invoiceID) {
return $http.get('/invoiceManage/getInputInvoiceValid?invoiceID=' + invoiceID, apiConfig.create());
}
};
}]);
\ No newline at end of file
webservices.factory('vatDashboardService', ['$log', '$http', 'apiConfig',
function ($log, $http, apiConfig) {
'use strict';
$log.debug('vatDashboardService.ctor()...');
return {
getModelNameList: function () {
return $http.get('/Dashboard/getModelNameList', apiConfig.createVat());
},
getSubModelList: function (year, period) {
return $http.get('/Dashboard/getSubModelList/' + year + '/' + period, apiConfig.createVat());
},
saveSummaryConfig: function (data) {
return $http.post('/Dashboard/saveSummaryConfig', data, apiConfig.createVat())
},
getDashboardConfigSummary: function (id) {
return $http.get('/Dashboard/getDashboardConfigSummary/' + id, apiConfig.createVat());
},
deleteChartConfig: function (id) {
return $http.post('/Dashboard/deleteChartConfig/' + id, {}, apiConfig.createVat());
},
deleteConfigById: function (id) {
return $http.post('/Dashboard/deleteConfigById/' + id, {}, apiConfig.createVat());
},
saveOrganizationConfig: function (data) {
return $http.post('/Dashboard/saveOrganizationConfig', data, apiConfig.createVat())
},
getOrganizationConfig: function (id) {
return $http.get('/Dashboard/getOrganizationConfig/' + id, apiConfig.createVat());
},
getOrganizationSubModelList: function (organizationId) {
return $http.get('/Dashboard/getOrganizationSubModelList/' + organizationId, apiConfig.createVat());
}
};
}]);
\ No newline at end of file
webservices.factory('vatExportService', ['$log', '$http', 'apiConfig', '$q', function ($log, $http, apiConfig, $q) {
'use strict';
$log.debug('vatExportService.ctor()...');
//下载服务器上的xls文件
var exportToExcel = function (data, status, headers, defaultFileName) {
$('#busy-indicator-container').show();
var defer = $q.defer();
var octetStreamMime = 'application/octet-stream';
var success = false;
// Get the headers
headers = headers();
// Get the filename from the x-filename header or default to "download.bin"
var filename = decodeURI(headers['x-file-name']) || defaultFileName;
// Determine the content type from the header or default to "application/octet-stream"
var contentType = headers['content-type'] || octetStreamMime;
try {
// Try using msSaveBlob if supported
//console.log("Trying saveBlob method ...");
var blob = new Blob([data], { type: contentType });
if (navigator.msSaveBlob)
navigator.msSaveBlob(blob, filename);
else {
// Try using other saveBlob implementations, if available
var saveBlob = navigator.webkitSaveBlob || navigator.mozSaveBlob || navigator.saveBlob;
if (saveBlob === undefined) throw "Not supported";
saveBlob(blob, filename);
}
//console.log("saveBlob succeeded");
success = true;
} catch (ex) {
$log.debug("saveBlob method failed with the following exception:");
$log.debug(ex);
}
if (!success) {
// Get the blob url creator
var urlCreator = window.URL || window.webkitURL || window.mozURL || window.msURL;
if (urlCreator) {
// Try to use a download link
var link = document.createElement('a');
if ('download' in link) {
// Try to simulate a click
try {
// Prepare a blob URL
//console.log("Trying download link method with simulated click ...");
var blobdownload = new Blob([data], { type: contentType });
var urldownload = urlCreator.createObjectURL(blobdownload);
link.setAttribute('href', urldownload);
// Set the download attribute (Supported in Chrome 14+ / Firefox 20+)
link.setAttribute("download", filename);
// Simulate clicking the download link
var event = document.createEvent('MouseEvents');
event.initMouseEvent('click', true, true, window, 1, 0, 0, 0, 0, false, false, false, false, 0, null);
link.dispatchEvent(event);
//console.log("Download link method with simulated click succeeded");
success = true;
} catch (ex) {
$log.debug("Download link method with simulated click failed with the following exception:");
$log.debug(ex);
$q.reject();
}
}
if (!success) {
// Fallback to window.location method
try {
// Prepare a blob URL
// Use application/octet-stream when using window.location to force download
//console.log("Trying download link method with window.location ...");
var blobsuccess = new Blob([data], { type: octetStreamMime });
var urlsuccess = urlCreator.createObjectURL(blobsuccess);
window.location = urlsuccess;
//console.log("Download link method with window.location succeeded");
success = true;
} catch (ex) {
//console.log("Download link method with window.location failed with the following exception:");
$log.debug(ex);
$q.reject();
}
}
}
}
if (!success) {
// Fallback to window.open method
$log.debug("No methods worked for saving the arraybuffer, using last resort window.open");
window.open(httpPath, '_blank', '');
}
//Delete the file
//deleteFile(encodeURI(filename));
defer.resolve('success');
$('#busy-indicator-container').hide();
return defer.promise;
};
//下载完成后将服务器文件删除
var deleteFile = function (filename) {
return $http.get('/inputInvoiceImport/delete/file?filename=' + filename, apiConfig.createVat());
};
return {
exportToExcel: exportToExcel,
exportReport: function (jsonData) {
return $http.post('/Report/export', { ReportData: jsonData }, apiConfig.createVat());
}
}
}]);
\ No newline at end of file
webservices.factory('vatImportService', ['$http', 'apiConfig', 'vatSessionService', function ($http, apiConfig, vatSessionService) {
'use strict';
return {
//代扣代缴
getImportWithholdingTaxList: function (param) {
return $http.post('/vatImportModule/getImportWithholdingTaxList', param, apiConfig.createVat());
},
addImportWithholdingTax: function (tax) {
return $http.post('/vatImportModule/addImportWithholdingTax', tax, apiConfig.createVat());
},
updateImportWithholdingTax: function (tax) {
return $http.post('/vatImportModule/updateImportWithholdingTax', tax, apiConfig.createVat());
},
deleteImportWithholdingTax: function (id) {
return $http.get('/vatImportModule/deleteImportWithholdingTax?id=' + id, apiConfig.createVat());
},
//海关发票
getCustomInvoiceList: function (param) {
return $http.post('/vatImportModule/getCustomInvoiceList', param, apiConfig.createVat());
},
addCustomInvoice: function (inv) {
return $http.post('/vatImportModule/addCustomInvoice', inv, apiConfig.createVat());
},
updateCustomInvoice: function (inv) {
return $http.post('/vatImportModule/updateCustomInvoice', inv, apiConfig.createVat());
},
deleteCustomInvoice: function (id) {
return $http.get('/vatImportModule/deleteCustomInvoice?id=' + id, apiConfig.createVat());
},
//通行费
getTollFeeList: function (param) {
return $http.post('/vatImportModule/getTollFeeList', param, apiConfig.createVat());
},
addTollFee: function (entity) {
return $http.post('/vatImportModule/addTollFee', entity, apiConfig.createVat());
},
updateTollFee: function (entity) {
return $http.post('/vatImportModule/updateTollFee', entity, apiConfig.createVat());
},
deleteTollFee: function (id) {
return $http.get('/vatImportModule/deleteTollFee?id=' + id, apiConfig.createVat());
},
//红字专票信息统计
getRedInvoiceList: function (param) {
return $http.post('/vatImportModule/getRedInvoiceList', param, apiConfig.createVat());
},
addRedInvoice: function (entity) {
return $http.post('/vatImportModule/addRedInvoice', entity, apiConfig.createVat());
},
updateRedInvoice: function (entity) {
return $http.post('/vatImportModule/updateRedInvoice', entity, apiConfig.createVat());
},
deleteRedInvoice: function (id) {
return $http.get('/vatImportModule/deleteRedInvoice?id=' + id, apiConfig.createVat());
},
//专票清单 getImportSpecialInvoiceInventoryList
getImportSpecialInvoiceInventoryList: function (param) {
return $http.post('/vatImportModule/getImportSpecialInvoiceInventoryList', param, apiConfig.createVat());
},
//上传模块
getImportFileList: function (param, importModuleId) {
return $http.post('/vatImportModule/getImportFile?importModuleId=' + importModuleId, param, apiConfig.createVat());
},
deleteImportFile: function (id) {
return $http.get('/vatImportModule/deleteImportFile?id=' + id, apiConfig.createVat());
},
//获取手工中方账
getImportYonYouList: function (params) {
return $http.post('/vatImportModule/getImportYonYouList', params, apiConfig.createVat());
},
//获取JdeaccountBalanceList
getImportJdeAccountBalanceList: function (params) {
return $http.post('/vatImportModule/getImportJdeAccountBalanceList', params, apiConfig.createVat());
},
//获取getImportJdeVoucherList
getImportJdeVoucherList: function (params) {
return $http.post('/vatImportModule/getImportJdeVoucherList', params, apiConfig.createVat());
},
isUnbilledInoiceUpdated: function (projectID, periodID) {
return $http.get('/ProjectInfo/isUnbilledInoiceUpdated/' + projectID + '/' + periodID, apiConfig.createVat());
},
};
}]);
\ No newline at end of file
webservices.factory('vatOperationLogService', ['$log', '$http', 'apiConfig',
function ($log, $http, apiConfig) {
'use strict';
$log.debug('vatOperationLogService.ctor()...');
return {
addOperationLog: function (operationLog) {
return $http.post('/OperationLog/addOperationLog/', operationLog, apiConfig.createVat({ ignoreLoadingBar: true }));
},
getOperationLogList: function (param) {
return $http.post('/OperationLog/getOperationLogList', {
PageInfo: param.pageInfo,
Period: param.period,
ModuleID: param.moduleID,
QueryValue: param.queryValue,
UserId: param.userId
}, apiConfig.createVat());
}
};
}]);
\ No newline at end of file
webservices.factory('vatPreviewService', ['$http', 'apiConfig', function ($http, apiConfig) {
'use strict';
return {
sample: function () {
return $http.get('url', apiConfig.createVat());
},
queryOutputInvoiceList: function (param) {
return $http.post('/outputInvoiceImport/queryOutputInvoiceList', {
PageInfo: param.pageInfo,
PeriodStart: param.periodStart,
PeriodEnd: param.periodEnd,
InvoiceType: param.invoiceType,
StartInvoiceDate: param.invoiceDateStart,
EndInvoiceDate: param.invoiceDateEnd,
ClassCode: param.classCode,
InvoiceNumber: param.invoiceNumber,
BuyerName: param.buyerName,
ProductName: param.productName,
AmountStart: param.amountStart,
AmountEnd: param.amountEnd,
TaxAmountStart: param.taxAmountStart,
TaxAmountEnd: param.taxAmountEnd,
}, apiConfig.createVat());
},
queryOutputInvoiceItemList: function (invoiceID) {
return $http.get('/outputInvoiceImport/queryOutputInvoiceItemList/' + invoiceID, apiConfig.createVat());
},
getExportOutputInvoiceList: function (param) {
return $http.post('/outputInvoiceImport/getExportOutputInvoiceList', {
PageInfo: param.pageInfo,
PeriodStart: param.periodStart,
PeriodEnd: param.periodEnd,
InvoiceType: param.invoiceType,
StartInvoiceDate: param.invoiceDateStart,
EndInvoiceDate: param.invoiceDateEnd,
ClassCode: param.classCode,
InvoiceNumber: param.invoiceNumber,
BuyerName: param.buyerName,
ProductName: param.productName,
AmountStart: param.amountStart,
AmountEnd: param.amountEnd,
TaxAmountStart: param.taxAmountStart,
TaxAmountEnd: param.taxAmountEnd,
}, apiConfig.createVat({ responseType: 'arraybuffer' }));
},
queryInputInvoiceList: function (param) {
return $http.post('/inputInvoiceImport/inputInvoicePreviewList', {
PageInfo: param.pageInfo,
PeriodStart: param.periodStart,
PeriodEnd: param.periodEnd,
CertificationDateStart: param.certificationDateStart,
CertificationDateEnd: param.certificationDateEnd,
InvoiceCode: param.invoiceCode,
InvoiceNumber: param.invoiceNumber,
SellerTaxNumber: param.sellerTaxNumber,
AmountStart: param.amountStart,
AmountEnd: param.amountEnd,
InvoiceType: param.invoiceType,
TaxAmountStart: param.taxAmountStart,
TaxAmountEnd: param.taxAmountEnd,
CertificationStatus: param.certificationStatus
}, apiConfig.createVat());
},
queryInputInvoiceItemList: function (inputInvoiceID) {
return $http.get('/inputInvoiceImport/inputInvoiceItemPreviewList/' + inputInvoiceID, apiConfig.createVat());
},
//导出进项发票数据
getExportInputInvoiceList: function (param) {
return $http.post('/inputInvoiceImport/exportQueryData/get', {
PageInfo: param.pageInfo,
PeriodStart: param.periodStart,
PeriodEnd: param.periodEnd,
CertificationDateStart: param.certificationDateStart,
CertificationDateEnd: param.certificationDateEnd,
InvoiceCode: param.invoiceCode,
InvoiceNumber: param.invoiceNumber,
SellerTaxNumber: param.sellerTaxNumber,
AmountStart: param.amountStart,
AmountEnd: param.amountEnd,
InvoiceType: param.invoiceType,
TaxAmountStart: param.taxAmountStart,
TaxAmountEnd: param.taxAmountEnd,
CertificationStatus: param.certificationStatus
}, apiConfig.createVat({ responseType: 'arraybuffer' }));
},
voucherSelectAdvancedByEntry: function (mainRelation, allJe, pagingInfo, listQueryCondition) {
return $http.post('/voucher/voucherSelectAdvancedByEntry', {
MainRelation: mainRelation,
AllJe: allJe,
PagingInfo: pagingInfo,
ListQueryCondition: listQueryCondition
}, apiConfig.create());
},
voucherSelectAdvancedByVoucher: function (mainRelation, allJe, pagingInfo, listQueryCondition) {
return $http.post('/voucher/voucherSelectAdvancedByVoucher', {
MainRelation: mainRelation,
AllJe: allJe,
PagingInfo: pagingInfo,
ListQueryCondition: listQueryCondition
}, apiConfig.create());
},
voucherSelectAdvancedCount: function (mainRelation, isEntryShow, allJe, listQueryCondition) {
return $http.post('/voucher/voucherSelectAdvancedCount', {
MainRelation: mainRelation,
AllJe: allJe,
IsEntryShow: isEntryShow,
ListQueryCondition: listQueryCondition
}, apiConfig.create());
},
getVoucherByConditon: function (mainRelation, allJe, period, vID, group, listQueryCondition) {
return $http.post('/voucher/getVoucherByConditon', {
MainRelation: mainRelation,
AllJe: allJe,
Period: period,
VID: vID,
Group: group,
ListQueryCondition: listQueryCondition
}, apiConfig.create());
},
getSelectWhereString: function (mainRelation, allJe, listQueryCondition) {
return $http.post('/voucher/getSelectWhereString', {
MainRelation: mainRelation,
AllJe: allJe,
ListQueryCondition: listQueryCondition
}, apiConfig.create());
},
getEnterpriseAccount: function () {
return $http.get('/voucher/getEnterpriseAccount', apiConfig.create());
}
};
}]);
\ No newline at end of file
webservices.factory('vatReductionService', ['$http', 'apiConfig', function ($http, apiConfig) {
'use strict';
return {
sample: function () {
return $http.get('url', apiConfig.createVat());
},
/************************************************GoodsMapping*********************************************************/
getGoodsMappingList: function () {
return $http.get('/GoodsMapping/getGoodsMappingList', apiConfig.createVat());
},
updateGoodsMapping: function (goodsList) {
return $http.post('/GoodsMapping/updateGoodsMapping', goodsList, apiConfig.createVat());
},
/************************************************UnbilledInvoice*********************************************************/
getVoucherList: function (param) {
return $http.post('/comaredata/getVoucherList', {
PageInfo: param.pageInfo,
Status: param.status,
Period:param.period
}, apiConfig.createVat());
},
getOuputInvoiceList: function (param) {
return $http.post('/comaredata/getOuputInvoiceList', {
PageInfo: param.pageInfo,
Status: param.status,
Period:param.period
}, apiConfig.createVat());
},
getVoucherHistoryList: function (param) {
return $http.post('/comaredata/getVoucherHistoryList', {
PageInfo: param.pageInfo,
Status: param.status,
Period:param.period
}, apiConfig.createVat());
},
getOuputInvoiceHistoryList: function (param) {
return $http.post('/comaredata/getOuputInvoiceHistoryList', {
PageInfo: param.pageInfo,
Status: param.status,
Period:param.period
}, apiConfig.createVat());
},
getVoucherMapInvoice: function (param) {
return $http.post('/comaredata/getVoucherMapInvoice', param, apiConfig.createVat());
},
getInvoiceMapVoucher: function (param) {
return $http.post('/comaredata/getInvoiceMapVoucher', param, apiConfig.createVat());
},
/************************************************caculationData*********************************************************/
CaculateUnbilled: function (period, project) {
return $http.post('/comaredata/unbilledtax' + '/' + period, project, apiConfig.createVat({ ignoreLoadingBar: true }));
},
CompareOutputInvoice: function (period) {
return $http.post('/comaredata/output' + '/' + period, null, apiConfig.createVat({ ignoreLoadingBar: true }));
},
test: function () {
return $http.get('/GoodsMapping/getGoodsMappingList', apiConfig.createVat({ ignoreLoadingBar: true }));
},
/********************************************vat-account-mapping**************************************************/
//获取标准科目数据
getStdAccountHierarchy: function () {
return $http.get('/AccountMapping/stdAccounts/getStdAccountHierarchy', apiConfig.createVat());
},
//获取企业科目数据
getEnterpriceAccountList: function (acctProp, isMapped, periodId) {
return $http.get('/AccountMapping/accounts/details/' + acctProp + '/' + isMapped + '/' + periodId, apiConfig.createVat());
},
//获取为对应的企业科目数据
getEnterpriseAccountNotMapped: function (periodID) {
return $http.get('/AccountMapping/accounts/getEnterpriseAccountNotMapped/' + periodID + '/', apiConfig.createVat());
},
//获取标准科目对应企业科目数据
getStdAccountLinkEtsAccount: function () {
return $http.get('/AccountMapping/todo', apiConfig.createVat());
},
//自动对应
autoMap: function (ruleId, periodId) {
return $http.get('/AccountMapping/mapping/autoMap/' + ruleId + '/' + periodId, apiConfig.createVat());
},
//取消对应
clearMap: function (periodId, etsAccountIDs) {
//return $http.post('/AccountMapping/mapping/cancelAccoutStdCode/', etsAccountIDs, apiConfig.createVat());
return $http.post('/AccountMapping/mapping/updateAcctStdCode/' + null + '/' + periodId, etsAccountIDs, apiConfig.createVat());
},
//手动对应
mapAccount: function (stdCode, periodId, enterpriseAccountCodes) {
return $http.post('/AccountMapping/mapping/updateAcctStdCode/' + stdCode + '/' + periodId, enterpriseAccountCodes, apiConfig.createVat());
},
//提交科目对应
submitAccountMapping: function(voucherRemapId, custRemapId) {
return $http.get('/AccountMapping/mapping/submit/' + voucherRemapId + '/' + custRemapId, apiConfig.createVat());
},
//提交科目对应-隐藏Loading bar
submitAccountMappingNoLoading: function (voucherRemapId, custRemapId) {
return $http.get('/AccountMapping/mapping/submit/' + voucherRemapId + '/' + custRemapId, apiConfig.createVat({ ignoreLoadingBar: true }));
},
//在获取企业科目数据前,先递归更新父科目对应的stdcode
mapStdCodeRecursiveByAccountList: function (periodId) {
return $http.get('/AccountMapping/mapping/mapStdCodeRecursiveByAccountList/' + periodId, apiConfig.createVat());
},
//获取重分类明细
getClassificationList: function (etsCode) {
return $http.get('/AccountMapping/getReMapDetail/' + etsCode, apiConfig.createVat());
},
//保存手工重对应
saveManualReclassification: function (model) {
return $http.post('/AccountMapping/remappingcust/edit',
{
Code: model.code,
StdCode: model.stdCode,
ReMapName: model.reMapName,
ReMapDebit: model.reMapDebit,
ReMapCredit: model.reMapCredit,
ReMapReason: model.reMapReason,
ReMapTypeId: model.reMapTypeId,
Period: model.period
}, apiConfig.createVat());
},
//保存凭证重对应,编辑
saveVoucherReclassification: function (model) {
return $http.post('/AccountMapping/remappingvoucher/save',
{
//ReMapId: model.reMapId,
RemapBatchId: model.remapBatchId,
Code: model.code,
StdCode: model.stdCode,
ReMapStdCode: model.reMapStdCode,
ReMapName: model.reMapName,
ReMapDebit: model.reMapDebit,
ReMapCredit: model.reMapCredit,
ReMapReason: model.reMapReason,
ReMapTypeId: model.reMapTypeId,
ReMapDateTime: model.reMapDateTime,
Period: model.period,
ReMapProcessTypeId: model.reMapProcessTypeId,
VoucherLists: model.vouchers
}, apiConfig.createVat());
},
//删除重分类记录
deleteReMappingRecords: function (model) {
return $http.post('/AccountMapping/reMapping/deleteReMap',
{
AcctCode: model.acctCode,
CustomerCode: model.customerCode,
StdCode: model.stdCode,
ReMappName: model.reMappName,
RemapDebit: model.remapDebit,
RemapCredit: model.remapCredit,
ReMappReason: model.reMappReason,
ReMappTypeId: model.reMappTypeId,
Period: model.period,
Vouchers: model.vouchers
}, apiConfig.createVat());
},
//获取标准科目重对应结果
getStdRemapResult: function (periodId) {
return $http.get('/AccountMapping/reMapping/getStdReMap/' + periodId, apiConfig.createVat());
},
//根据科目代码获取voucher
getVouchersByCode: function (code, periodId) {
return $http.get('/AccountMapping/reMapping/getVouchers/' + code + '/' + periodId, apiConfig.createVat());
},
getVouchersByConditions: function (periodId, accountCode, processTypeId, remapBatchId) {
return $http.get('/AccountMapping/reMapping/getVouchersByConditions/' + periodId + '/' + accountCode + '/' + processTypeId + '/' + remapBatchId, apiConfig.createVat());
}
};
}]);
\ No newline at end of file
webservices.factory('vatSessionService', ['$log', 'localStorageService', function ($log, localStorageService) {
'use strict';
$log.debug('vatSessionService.ctor()...');
var date = new Date();
var month = date.getMonth() <= 0 ? 1 : date.getMonth();
var projectyear = date.getFullYear();
var cacheName = 'cargill-cache';
var propList = ['month', 'year', 'project', 'projects', 'dataChanged', 'logUser', 'userPermission', 'queryDto'];
var logUser = {
ID: "66933E7B-DA75-4B2E-B7D6-AB65DCA20D50",
UserName: "Admin",
};
var queryDto = {
searchKeyword: '',
fieldId: '',
filedName: 'orgName',
checkedOrgs: {},
};
var cacheObj = {
month: month,
userPermission: {},
project: { year: projectyear },
projects: [],
dataChanged: false
};
var temp = localStorageService.get(cacheName);
if (temp) {
cacheObj = temp;
} else {
localStorageService.set(cacheName, cacheObj);
}
//设置属性值
var setProperty = function (propertyName, propertyValue) {
cacheObj[propertyName] = propertyValue;
localStorageService.set(cacheName, cacheObj);
}
//获取属性值
var getProperty = function (propertyName) {
return cacheObj[propertyName];
}
//重置项目月份
var reset = function () {
var date = new Date();
var m = date.getMonth();
if (m <= 0) {
m = 1;
}
this.month = m;
setProperty("month", m);
};
//跳转到admin或者outputinvoice management 需要清空所选择的project,不然会影响权限
var clearSelectProject = function () {
var tempProject = { year: projectyear };
setProperty('project', tempProject);
};
var result = {};
var defineProp = function (propertyName) {
Object.defineProperty(result, propertyName, {
get: function () {
var getValue = getProperty(propertyName);
var year = new Date().getFullYear();
var month = new Date().getMonth();
switch (propertyName) {
case "year":
return getValue || year;
case "month":
return getValue || month - 1;
case "project":
return getValue || { year: year };
case "projects":
return getValue || [];
case "dataChanged":
return getValue || false;
case "logUser":
return getValue || logUser;
case "userPermission":
return getValue || {};
case "queryDto":
return getValue || queryDto;
}
},
set: function (val) {
setProperty(propertyName, val);
},
});
};
propList.forEach(function (propName) {
defineProp(propName);
});
result.reset = reset;
result.setProperty = setProperty;
result.getProperty = getProperty;
result.clearSelectProject = clearSelectProject;
return result;
}]);
\ No newline at end of file
webservices.factory('vatWorkflowService', ['$http', 'apiConfig', 'enums', function ($http, apiConfig, enums) {
'use strict';
return {
sample: function () {
return $http.get('url', apiConfig.createVat());
},
setProcessLog: function (status,dbName, periodId, dictKey, isFinished) {
return $http.get('/Workflow/setProcessLog/' + status + '/' + dbName + '/' + periodId + '/' + dictKey + '/' + isFinished, apiConfig.createVat());
},
setWorkflowNodeLog: function (status, dbName, periodId, dictKey, isFinished) {
return $http.get('/Workflow/setProcessLog/' + status + '/' + dbName + '/' + periodId + '/' + dictKey + '/' + isFinished, apiConfig.createVat());
},
//添加TaxAdmin.WorkflowApproveReportLog和项目数据下的OperationLog表的数据
addApproveReportLog: function (approveLog) {
return $http.post('/Workflow/addApproveReportLog/', approveLog, apiConfig.createVat());
},
getWorkflowDetailByDb: function (dbName, periodId) {
return $http.get('/Workflow/getWorkflowDetailByDb/' + dbName + '/' + periodId, apiConfig.createVat());
},
execute: function () {
return $http.get('/WorkflowMessageJob/execute',apiConfig.createVat());
},
addExceptionMessage: function(exMsg){
return $http.post('/WorkflowMessageJob/addExceptionMessage/',exMsg, apiConfig.createVat());
},
addErpImportExceptionMessage: function (dbName, periodId, erpValidationTypeId) {
return $http.get('/WorkflowMessageJob/addErpImportExceptionMessage/' + dbName + "/" + periodId + '/' + erpValidationTypeId, apiConfig.createVat());
},
addApproveMessage: function (approveMsg) {
return $http.post('/WorkflowMessageJob/addApproveMessage/', approveMsg, apiConfig.createVat());
},
getWorkflowApproveReportLog: function (dbName, period, orderIndex,operationTypeId,templateCode){
return $http.get('/Workflow/getWorkflowApproveReportLog/' + dbName + "/" + period + '/' + orderIndex + '/' + operationTypeId + '/' + templateCode, apiConfig.createVat());
},
getWorkflowApproveReportLogNoLevel: function (dbName, period, operationTypeId, templateCode) {
return $http.get('/Workflow/getWorkflowApproveReportLogNoLevel/' + dbName + "/" + period + '/' + operationTypeId + '/' + templateCode, apiConfig.createVat());
},
isExistApproveLogSubmitItem: function (dbName, period, orderIndex, operationTypeId, templateCode) {
return $http.get('/Workflow/isExistApproveLogSubmitItem/' + dbName + "/" + period + '/' + orderIndex + '/' + operationTypeId + '/' + templateCode, apiConfig.createVat());
}
};
}]);
\ No newline at end of file
......@@ -6,11 +6,6 @@
//CIT Remove(可以直接使用vat已有的):
// citSwitchPeriod: function (templateID, period)
// citGetCellDetailInfo: function (keyValueDataID)
// citGetCellInfo: function (templateId,col,row)
// citGenerateBSPL: function (projectId, period)
// citGenerateBSPLWithoutLoading: function (projectId, period)
// citGetReportData: function (projectId, templateId, period, generator)
GetCellDetailInfo: function (keyValueDataID) {
return $http.get('/bspl/cellDetail/' + keyValueDataID, apiConfig.createVat());
......@@ -29,6 +24,21 @@
},
getReportData: function (projectId, templateId, period, generator) {
return $http.get('/bspl/reportData?templateId=' + templateId + '&projectID=' + projectId + '&period=' + period + '&generator=' + generator, apiConfig.createVat());
},
citGetCellDetailInfo: function (keyValueDataID) {
return $http.get('/bspl/citCellDetail/' + keyValueDataID, apiConfig.createVat());
},
citGetCellInfo: function (templateId,col,row) {
return $http.get('/bspl/citCellDetail?templateId=' + templateId + '&col=' + col + '&row=' + row, apiConfig.createVat({ignoreLoadingBar:true}));
},
citGenerateBSPL: function (projectId, period) {
return $http.get('/bspl/citGenerate?projectId=' + projectId + '&period=' + period, apiConfig.createVat());
},
citGenerateBSPLWithoutLoading: function (projectId, period) {
return $http.get('/bspl/citGenerate?projectId=' + projectId + '&period=' + period, apiConfig.createVat({ ignoreLoadingBar: true }));
},
citGetReportData: function (projectId, templateId, period, generator) {
return $http.get('/bspl/citReportData?templateId=' + templateId + '&projectID=' + projectId + '&period=' + period + '&generator=' + generator, apiConfig.createVat());
}
};
......
webservices.factory('InvoiceManageService', ['$http', 'apiConfig', 'httpCacheService',
function ($http, apiConfig, httpCacheService) {
webservices.factory('InvoiceManageService', ['$http', 'apiConfig', 'httpCacheService', 'FileSaver',
function ($http, apiConfig, httpCacheService, FileSaver) {
'use strict';
return {
......@@ -12,16 +12,59 @@ function ($http, apiConfig, httpCacheService) {
return $http.get('/invoiceManage/getAllValidInvoiceList', apiConfig.create());
},
//获取invoice的各种remarks,例如,退票,补录,验真
getInvoiceRemarks: function (listInvoice) {
return $http.post('/invoiceManage/getInvoiceRemarks', listInvoice, apiConfig.create());
},
//批量验证
checkUnique: function (invoiceList) {
return $http.post('/invoiceManage/checkUnique', invoiceList, apiConfig.create());
},
//单个重复验证
invoiceUniqueVerify: function (invoiceCode, invoiceNumber) {
return $http.get('/invoiceManage/invoiceUniqueVerify?invoiceCode=' + invoiceCode + '&invoiceNumber=' + invoiceNumber, apiConfig.create());
},
//查询invoice according on condition
getInputInvoiceList: function (queryParm) {
return $http.post('/invoiceManage/getInputInvoiceList?isUncollect=false', queryParm, apiConfig.create());
},
//未收票认证发票查询
getNotReceivedInputInvoiceList: function (queryParm) {
return $http.post('/invoiceManage/getNotReceivedInputInvoiceList', queryParm, apiConfig.create());
},
//服务器导出
exportInputInvoiceList: function (queryParm, fileName, isUncollect) {
if (isUncollect === undefined || isUncollect === null) isUncollect = false;
return $http.post('/invoiceManage/exportInputInvoiceList?isUncollect=' + isUncollect + '&fileName=' + encodeURI(fileName), queryParm, apiConfig.create({ responseType: 'arraybuffer' }));
},
//服务器导出发票关联信息
exportInvoiceAllInfo: function (queryParm, fileName, isUncollect) {
if (isUncollect === undefined || isUncollect === null) isUncollect = false;
return $http.post('/invoiceManage/exportInvoiceAllInfoList?isUncollect=' + isUncollect + '&fileName=' + encodeURI(fileName), queryParm, apiConfig.create({ responseType: 'arraybuffer' }));
},
//关联管理服务器导出
exportMappingInvoiceList: function (queryParm, fileName) {
return $http.post('/invoiceManage/exportMappingInvoiceList?fileName=' + encodeURI(fileName), queryParm, apiConfig.create({ responseType: 'arraybuffer' }));
},
addRefundRemark: function (param) {
return $http.post('/invoiceManage/addRefundRemark', param, apiConfig.create());
},
getInputInvoiceItemList: function (invoiceID) {
return $http.get('/invoiceManage/getInputInvoiceItemList?inputInvoiceId=' + invoiceID, apiConfig.create());
},
getInputInvoiceRefundList: function (queryParm) {
return $http.post('/invoiceManage/getInputInvoiceList?isUncollect=true', queryParm, apiConfig.create());
},
......@@ -29,21 +72,76 @@ function ($http, apiConfig, httpCacheService) {
getVerifyFilterBasicData: function () {
return $http.get('/invoiceManage/getVerifyFilterBasicData', apiConfig.create());
},
getNotVerifyDataList: function (dto) {
return $http.post('/invoiceManage/getVerifyListData', dto, apiConfig.create());
},
verifySpecialInvoice: function (dto) {
return $http.post('/invoiceManage/verifySpecialInvoice', dto, apiConfig.create());
},
//获取发票关联管理列表
getInvoiceRelevanceDisplayList: function (queryParam) {
return $http.post('/invoiceManage/invoiceRelevanceDisplay', queryParam, apiConfig.create());
},
saveVoucherNo: function (param) {
return $http.post('/invoiceManage/saveInputInvoiceVoucherNo', param, apiConfig.create());
},
//保存发票关联信息
saveInputInoviceRelevance: function (inputInvoiceRelevanceDto, isCompleted) {
return $http.post('/invoiceManage/saveInputInvoiceRelevance/' + isCompleted, inputInvoiceRelevanceDto, apiConfig.create());
},
//根据invoiceID获取发票关联信息
getSingleInputInvoiceRelevance: function (inputInvoiceID) {
return $http.get('/invoiceManage/getSingleInvoiceRelevance/' + inputInvoiceID, apiConfig.create());
},
//完成发票关联操作
completeInputInvoiceRelevance: function (inputInvoiceID) {
return $http.get('/invoiceManage/completeInputInvoiceRelevance/' + inputInvoiceID, apiConfig.create());
},
//根据AN号获取locationCode并判断是否纳入进项税额
getIncludedInTaxAmountByAcceptNO: function (acceptNO) {
return $http.get('/invoiceManage/getIncludedInTaxAmountByAcceptNO/' + acceptNO, apiConfig.create());
},
//根据CostCenter判断是否计入进项税额
getIncludedInTaxAmountByCostCenter: function (costCenterCodes) {
return $http.get('/invoiceManage/getIncludedInTaxAmountByCostCenter/' + costCenterCodes, apiConfig.create());
},
//根据VoucherNO获取是否计入进项税额
getIncludedInTaxAmountByVoucherNO: function (voucherNO) {
return $http.get('/invoiceManage/getIncludedInTaxAmountByVoucherNO/' + voucherNO, apiConfig.create());
},
//根据发票的购方名称获取CompanyCode和CostCenter
getCompanyCodeAndCostCenter: function (buyerName) {
return $http.get('/invoiceManage/getCompanyCodeAndCostCenter/' + buyerName, apiConfig.create());
},
//手动认证
invoiceManualVerify: function (verifyList) {
return $http.post('/invoiceManage/invoiceManualVerify', verifyList, apiConfig.create());
},
//自动认证
invoiceAutoVerify: function () {
return $http.post('/invoiceManage/invoiceAutoVerify', apiConfig.create());
},
//手动识别
invoiceManualRecognize: function (invoiceIDList) {
return $http.post('/invoiceManage/invoiceManualRecognize', invoiceIDList, apiConfig.create());
},
//手动识别,只是更新状态,更新为识别中,不会去百旺拿数据
invoiceManualRecognizeBool: function (invoiceIDList) {
return $http.post('/invoiceManage/invoiceManualRecognizeBool', invoiceIDList, apiConfig.create({ ignoreLoadingBar: true }));
},
//
//自动识别
invoiceAutoRecognize: function () {
return $http.post('/invoiceManage/invoiceAutoRecognize', apiConfig.create());
......@@ -53,6 +151,7 @@ function ($http, apiConfig, httpCacheService) {
invoiceExamination: function () {
return $http.post('/invoiceManage/invoiceExamination', apiConfig.create());
},
//发票手动验真
invoiceManualExamination: function (invoiceList) {
return $http.post('/invoiceManage/invoiceManualExamination', invoiceList, apiConfig.create());
......@@ -62,9 +161,46 @@ function ($http, apiConfig, httpCacheService) {
updateInvoiceStatus: function (invoiceStatusType, invoiceIDList) {
return $http.post('/invoiceManage/invoiceStatusOperate?invoiceStatusType=' + invoiceStatusType, invoiceIDList, apiConfig.create());
},
//扫描枪上传数据
invoiceUploadFromScan: function (invoiceList) {
return $http.post('/invoiceManage/invoiceUploadFromScan', invoiceList, apiConfig.create());
},
downloadTemplate: function () {
var thisConfig = apiConfig.create();
thisConfig.responseType = "arraybuffer";
return $http.post('/invoiceManage/downloadTemplate', {}, thisConfig).then(function (response) {
var data = new Blob([response.data], { type: response.headers('Content-Type') });
// var filename1 = response.headers('Content-Disposition').split(';')[1].trim().substr('filename='.length);
var filename = '发票认证模板.xlsx';
FileSaver.saveAs(data, filename);
});
},
//PDF上传数据
confirmToUpload: function (analysisInvoiceList) {
return $http.post('/invoiceManage/confirmToUpload', analysisInvoiceList, apiConfig.create());
},
//取文件信息
getInputInvoiceFile: function (fileId) {
return $http.get('/invoiceManage/getInputInvoiceFile?fileId=' + fileId, apiConfig.create());
},
//保存发票校验码
saveInvoiceCheckCode: function (dto) {
return $http.post('/invoiceManage/saveInvoiceCheckCode', dto, apiConfig.create());
},
//上传扫描仪发票列表
saveScanInvoiceList: function (invoiceList) {
return $http.post('/invoiceManage/UploadInvoiceFile', invoiceList, apiConfig.create());
},
//获取验真结果,
getInputInvoiceValid: function (invoiceID) {
return $http.get('/invoiceManage/getInputInvoiceValid?invoiceID=' + invoiceID, apiConfig.create());
}
};
}]);
\ No newline at end of file
webservices.factory('outputReconciliationConfiguration', ['$http', 'apiConfig', function ($http, apiConfig) {
'use strict';
return {
load: function () {
return $http.get('/outputReconciliationConfiguration/load', apiConfig.create());
},
add: function (dto) {
return $http.post('/outputReconciliationConfiguration/add', dto, apiConfig.create());
},
update: function (dto) {
return $http.put('/outputReconciliationConfiguration/update', dto, apiConfig.create());
},
deleteRule: function (id) {
return $http.delete('/outputReconciliationConfiguration/delete?ID=' + id, apiConfig.create());
},
getNextRuleNo: function () {
return $http.get('/outputReconciliationConfiguration/getNextRuleNo', apiConfig.create());
},
saveSort: function (dto) {
return $http.post('/outputReconciliationConfiguration/saveSort', dto, apiConfig.create());
}
};
}]);
\ No newline at end of file
webservices.factory('outputReconciliationService', ['$http', 'apiConfig', function ($http, apiConfig) {
'use strict';
return {
loadReconciliationEntityOverview: function (dto) {
return $http.post('/reconciliationValue/load', dto, apiConfig.createVat());
},
updateReconciliationEntityValue: function (dto) {
return $http.put('/reconciliationValue/updateValue', dto, apiConfig.createVat());
},
refreshForm: function (dto) {
return $http.post('/reconciliationValue/refreshForm', dto, apiConfig.createVat());
},
getIncomeAxList: function (incomeAxParams) {
return $http.post('/reconciliationEntityOverview/getIncomeAxList', incomeAxParams, apiConfig.create())
},
getTaxFaPiaoList: function (taxFapiaoParams) {
return $http.post('/reconciliationEntityOverview/getTaxFaPiaoList', taxFapiaoParams, apiConfig.create())
},
};
}]);
\ No newline at end of file
webservices.factory('outputReconciliationQueryService', ['$http', 'apiConfig', function ($http, apiConfig) {
'use strict';
return {
queryJournalList: function (model) {
return $http.post('/outputReconciliationQuery/queryJournalList', model, apiConfig.createVat());
},
getDictinctCategoryList:function(){
return $http.get('/outputReconciliationQuery/getDictinctCategoryList', apiConfig.createVat());
},
queryFapiaoList:function(model){
return $http.post('/outputReconciliationQuery/queryFapiaoList', model, apiConfig.createVat());
},
manualAdjust:function(model){
return $http.post('/outputReconciliationQuery/manualAdjust', model, apiConfig.createVat());
},
undo:function(model){
return $http.post('/outputReconciliationQuery/undo', model, apiConfig.createVat());
},
getMatchedGroupDetail:function(groupID){
return $http.get('/outputReconciliationQuery/getMatchedGroupDetail?groupID='+ groupID, apiConfig.createVat());
}
};
}]);
\ No newline at end of file
webservices.factory('vatDifferenceService', ['$log', '$http', 'apiConfig',
function ($log, $http, apiConfig) {
'use strict';
$log.debug('vatDifferenceService.ctor()...');
return {
taxDifferenceByVoucher: function (dto) {
return $http.post('/voucher/voucherSelectAdvancedByVoucher', dto, apiConfig.create());
},
getTaxDifferenceList: function (projectID,period) {
return $http.get('/taxDifference/getTaxDifferenceData/' + projectID+'/'+period, apiConfig.createVat());
}
};
}]);
\ No newline at end of file
......@@ -98,7 +98,7 @@
}
//Delete the file
deleteFile(encodeURI(filename));
//deleteFile(encodeURI(filename));
defer.resolve('success');
$('#busy-indicator-container').hide();
return defer.promise;
......
......@@ -4,7 +4,7 @@
$log.debug('vatOperationLogService.ctor()...');
return {
addOperationLog: function (operationLog) {
return $http.post('/OperationLog/addOperationLog/', operationLog, apiConfig.createVat());
return $http.post('/OperationLog/addOperationLog/', operationLog, apiConfig.createVat({ ignoreLoadingBar: true }));
},
getOperationLogList: function (param) {
......
webservices.factory('vatReconciliationCalculate', ['$http', 'apiConfig', function ($http, apiConfig) {
'use strict';
return {
calculateInvoiceJournalGroup: function (calculateDate, organizationID, isForceCalculate) {
return $http.post('/OutputReconciliation/calculateInvoiceJournalGroup/' + calculateDate + '/' + organizationID + '/' + isForceCalculate, {}, apiConfig.createVat());
},
getInputReconciliationSummary: function (dto) {
return $http.post('/inputReconciliation/InputReconciliationDetail', dto, apiConfig.createVat());
}
};
}]);
\ No newline at end of file
......@@ -50,32 +50,46 @@
saveReportCache: function (dirtyData, reportId, generator) {
var promise = $q.when();
var cache = reportCache.get('report-cache');
// 按顺序执行缓存的service
while (!_.isEmpty(cache)) {
var serviceItem = cache.shift();
(function (i) {
if (_.isFunction(vatReportService[i.serviceType])) {
promise = promise.then(function () {
return vatReportService[i.serviceType].apply(vatReportService, i.params);
var addList = _.filter(cache, function (i) { return i.serviceType == 'addCellManualData' })
if (!_.isEmpty(addList))
{
var paramList = [];
addList.forEach(function (i) {
var param = {
manualDto: i.params[0],
operationLog: i.params[1],
};
paramList.push(param);
});
}
else if (_.isFunction(modelConfigurationService[i.serviceType])) {
promise = promise.then(function () {
return modelConfigurationService[i.serviceType].apply(modelConfigurationService, i.params);
return vatReportService.addCellManualDataList(paramList);
});
}
}(serviceItem));
}
//// 按顺序执行缓存的service
//while (!_.isEmpty(cache)) {
// var serviceItem = cache.shift();
// (function (i) {
// if (_.isFunction(vatReportService[i.serviceType])) {
// promise = promise.then(function () {
// return vatReportService[i.serviceType].apply(vatReportService, i.params);
// });
// }
// else if (_.isFunction(modelConfigurationService[i.serviceType])) {
// promise = promise.then(function () {
// return modelConfigurationService[i.serviceType].apply(modelConfigurationService, i.params);
// });
// }
// }(serviceItem));
//}
if (!_.isEmpty(dirtyData)) {
promise = promise.then(function () {
return vatReportService.updateReportCellValue(dirtyData, reportId, generator);
});
}
promise = promise.then(setProjectStatus);
this.initReportCache();
return promise;
},
......
......@@ -3,19 +3,16 @@
$log.debug('vatSessionService.ctor()...');
var date = new Date();
var month = date.getMonth();
var month = date.getMonth() <= 0 ? 1 : date.getMonth();
var projectyear = date.getFullYear();
if (month <= 0) {
month = 1;
}
var logUser =
{
var cacheName = 'cargill-cache';
var propList = ['month', 'year', 'project', 'projects', 'dataChanged', 'logUser', 'userPermission', 'queryDto'];
var logUser = {
ID: "66933E7B-DA75-4B2E-B7D6-AB65DCA20D50",
UserName: "Admin",
};
var userPermission = {};
var queryDto = {
searchKeyword: '',
fieldId: '',
......@@ -23,59 +20,95 @@
checkedOrgs: {},
};
var reset = function () {
var date = new Date();
var m = date.getMonth();
if (m <= 0) {
m = 1;
}
this.month = m;
setProperty("month", m);
};
var cacheObj = {
month: month,
userPermission: {},
project: { year: 2017 },
project: { year: projectyear },
projects: [],
dataChanged: false
};
var temp = localStorageService.get('atms-cache');
var temp = localStorageService.get(cacheName);
if (temp) {
cacheObj = temp;
} else {
localStorageService.set('atms-cache', cacheObj);
localStorageService.set(cacheName, cacheObj);
}
//设置属性值
var setProperty = function (propertyName, propertyValue) {
cacheObj[propertyName] = propertyValue
//$cookieStore.put('atms-cache', JSON.stringify(apiTokenObj));
localStorageService.set('atms-cache', cacheObj);
cacheObj[propertyName] = propertyValue;
localStorageService.set(cacheName, cacheObj);
}
//获取属性值
var getProperty = function (propertyName) {
//console.log($cookieStore.get('atms-cache'));
return cacheObj[propertyName];
}
// 跳转到admin或者outputinvoice management 需要清空所选择的project,不然会影响权限
//重置项目月份
var reset = function () {
var date = new Date();
var m = date.getMonth();
if (m <= 0) {
m = 1;
}
this.month = m;
setProperty("month", m);
};
//跳转到admin或者outputinvoice management 需要清空所选择的project,不然会影响权限
var clearSelectProject = function () {
var tempProject = { year: 2017 };
var tempProject = { year: projectyear };
setProperty('project', tempProject);
};
return {
month: month,
year: projectyear,
project: { year: 2017 },
projects: [],
dataChanged: false,
logUser: logUser,
reset: reset,
userPermission: userPermission,
queryDto: queryDto,
setProperty: setProperty,
getProperty: getProperty,
clearSelectProject: clearSelectProject,
var result = {};
var defineProp = function (propertyName) {
Object.defineProperty(result, propertyName, {
get: function () {
var getValue = getProperty(propertyName);
var year = new Date().getFullYear();
var month = new Date().getMonth();
switch (propertyName) {
case "year":
return getValue || year;
case "month":
return getValue || month - 1;
case "project":
return getValue || { year: year };
case "projects":
return getValue || [];
case "dataChanged":
return getValue || false;
case "logUser":
return getValue || logUser;
case "userPermission":
return getValue || {};
case "queryDto":
return getValue || queryDto;
}
},
set: function (val) {
setProperty(propertyName, val);
},
});
};
propList.forEach(function (propName) {
defineProp(propName);
});
result.reset = reset;
result.setProperty = setProperty;
result.getProperty = getProperty;
result.clearSelectProject = clearSelectProject;
return result;
}]);
\ No newline at end of file
......@@ -7,21 +7,21 @@
setProcessLog: function (status,dbName, periodId, dictKey, isFinished) {
return $http.get('/workflow/setProcessLog/' + status + '/' + dbName + '/' + periodId + '/' + dictKey + '/' + isFinished, apiConfig.createVat());
return $http.get('/Workflow/setProcessLog/' + status + '/' + dbName + '/' + periodId + '/' + dictKey + '/' + isFinished, apiConfig.createVat());
},
setWorkflowNodeLog: function (status, dbName, periodId, dictKey, isFinished) {
return $http.get('/workflow/setProcessLog/' + status + '/' + dbName + '/' + periodId + '/' + dictKey + '/' + isFinished, apiConfig.createVat());
return $http.get('/Workflow/setProcessLog/' + status + '/' + dbName + '/' + periodId + '/' + dictKey + '/' + isFinished, apiConfig.createVat());
},
//添加TaxAdmin.WorkflowApproveReportLog和项目数据下的OperationLog表的数据
addApproveReportLog: function (approveLog) {
return $http.post('/workflow/addApproveReportLog/', approveLog, apiConfig.createVat());
return $http.post('/Workflow/addApproveReportLog/', approveLog, apiConfig.createVat());
},
getWorkflowDetailByDb: function (dbName, periodId) {
return $http.get('/workflow/getWorkflowDetailByDb/' + dbName + '/' + periodId, apiConfig.createVat());
return $http.get('/Workflow/getWorkflowDetailByDb/' + dbName + '/' + periodId, apiConfig.createVat());
},
execute: function () {
......@@ -41,15 +41,15 @@
},
getWorkflowApproveReportLog: function (dbName, period, orderIndex,operationTypeId,templateCode){
return $http.get('/workflow/getWorkflowApproveReportLog/' + dbName + "/" + period + '/' + orderIndex + '/' + operationTypeId + '/' + templateCode, apiConfig.createVat());
return $http.get('/Workflow/getWorkflowApproveReportLog/' + dbName + "/" + period + '/' + orderIndex + '/' + operationTypeId + '/' + templateCode, apiConfig.createVat());
},
getWorkflowApproveReportLogNoLevel: function (dbName, period, operationTypeId, templateCode) {
return $http.get('/workflow/getWorkflowApproveReportLogNoLevel/' + dbName + "/" + period + '/' + operationTypeId + '/' + templateCode, apiConfig.createVat());
return $http.get('/Workflow/getWorkflowApproveReportLogNoLevel/' + dbName + "/" + period + '/' + operationTypeId + '/' + templateCode, apiConfig.createVat());
},
isExistApproveLogSubmitItem: function (dbName, period, orderIndex, operationTypeId, templateCode) {
return $http.get('/workflow/isExistApproveLogSubmitItem/' + dbName + "/" + period + '/' + orderIndex + '/' + operationTypeId + '/' + templateCode, apiConfig.createVat());
return $http.get('/Workflow/isExistApproveLogSubmitItem/' + dbName + "/" + period + '/' + orderIndex + '/' + operationTypeId + '/' + templateCode, apiConfig.createVat());
}
};
}]);
\ No newline at end of file
......@@ -14,7 +14,7 @@ webservices.factory('projectService', ['$http', 'apiConfig', function ($http, ap
getAllProjectList: function (orgID, serviceID, projectYear) {
return $http.get('/project/getAllProjectList?orgID=' + orgID + '&serviceID=' + serviceID + '&projectYear=' + projectYear, apiConfig.create());
return $http.get('/project/getAllProjectList?orgID=' + orgID + '&serviceID=' + serviceID + (projectYear==null?'':'&projectYear=' + projectYear), apiConfig.create());
},
getProjectByID: function (projectID) {
return $http.get('/project/getProject?projectID=' + projectID, apiConfig.create());
......
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