Commit 44bda2bb authored by Eddie.Wu's avatar Eddie.Wu

Merge branch 'dev_wzk_phase1' into 'dev_mysql'

1、卡片展示排序;2、已认证发票清单模板下载;3、手工导入的VAT数据页面展示问题;4、导入的发票资料公式计算;5、导入的现金流量表期间的set 	6、收入明细列宽调整;7、报表上传成功后自动消失后面的模态框;8、机构管理只展示当前用户有权限的机构;9、卡片列表展示时的序号问题

See merge request root/atms!402
parents 0c2c9956 e48dc441
......@@ -668,6 +668,7 @@ public class DataImportService extends BaseService {
cf.setEntityCode(companyCode);
cf.setEntityName(companyName);
cf.setPeriod(period);
cf.setTmsPeriod(tmsPeriod);
Row row = sheet.getRow(j);
Cell cell1 = row.getCell(0);
......@@ -839,16 +840,16 @@ public class DataImportService extends BaseService {
iData.setCompanyName(getCellStringValue(cell1));
Cell cell2 = sheet.getRow(2).getCell(j);
iData.setSpecialInvoiceAmount1(getCellLongDecimalValue(cell2));
iData.setSpecialInvoiceAmount1(getCellBigDecimalValue(cell2,evaluator).longValue());
Cell cell3 = sheet.getRow(3).getCell(j);
iData.setSpecialInvoiceAmount2(getCellLongDecimalValue(cell3));
iData.setSpecialInvoiceAmount2(getCellBigDecimalValue(cell3,evaluator).longValue());
Cell cell4 = sheet.getRow(4).getCell(j);
iData.setSpecialInvoiceAmount3(getCellLongDecimalValue(cell4));
iData.setSpecialInvoiceAmount3(getCellBigDecimalValue(cell4,evaluator).longValue());
Cell cell5 = sheet.getRow(5).getCell(j);
iData.setSpecialInvoiceAmount4(getCellLongDecimalValue(cell5));
iData.setSpecialInvoiceAmount4(getCellBigDecimalValue(cell5,evaluator).longValue());
Cell cell6 = sheet.getRow(6).getCell(j);
iData.setSpecialInvoiceSalesAmount1(getCellBigDecimalValue(cell6,evaluator));
......@@ -881,16 +882,16 @@ public class DataImportService extends BaseService {
iData.setSpecialInvoiceTaxAmount5(getCellBigDecimalValue(cell15,evaluator));
Cell cell16 = sheet.getRow(16).getCell(j);
iData.setInvoiceAmount1(getCellLongDecimalValue(cell16));
iData.setInvoiceAmount1(getCellBigDecimalValue(cell16,evaluator).longValue());
Cell cell17 = sheet.getRow(17).getCell(j);
iData.setInvoiceAmount2(getCellLongDecimalValue(cell17));
iData.setInvoiceAmount2(getCellBigDecimalValue(cell17,evaluator).longValue());
Cell cell18 = sheet.getRow(18).getCell(j);
iData.setInvoiceAmount3(getCellLongDecimalValue(cell18));
iData.setInvoiceAmount3(getCellBigDecimalValue(cell18,evaluator).longValue());
Cell cell19 = sheet.getRow(19).getCell(j);
iData.setInvoiceAmount4(getCellLongDecimalValue(cell19));
iData.setInvoiceAmount4(getCellBigDecimalValue(cell19,evaluator).longValue());
Cell cell20 = sheet.getRow(20).getCell(j);
iData.setInvoiceSalesAmount1(getCellBigDecimalValue(cell20,evaluator));
......
......@@ -369,6 +369,17 @@ public class OrganizationServiceImpl extends BaseService{
orgInfoDtoList.add(orgInfoDto);
}
}
//判断用户是否是admin用户,不是则进行机构权限判断
String uid = authUserHelper.getCurrentUserId();
User user = userMapper.selectByPrimaryKey(uid);
if (!user.getIsSuperAdmin()) {
UserOrganizationExample userOrganizationExample = new UserOrganizationExample();
userOrganizationExample.createCriteria().andUserIdEqualTo(user.getId());
List<UserOrganization> userOrganizations = userOrganizationMapper.selectByExample(userOrganizationExample);
List<String> userOrgIds = userOrganizations.stream().map(e -> e.getOrganizationId()).collect(toList());
List<OrgInfoDto> orgInfoDtoFilterList = orgInfoDtoList.stream().filter(orgInfoDto -> userOrgIds.contains(orgInfoDto.getId())).collect(toList());
return orgInfoDtoFilterList;
}
return orgInfoDtoList;
}
......
......@@ -11,14 +11,15 @@ import pwc.taxtech.atms.common.AuthUserHelper;
import pwc.taxtech.atms.common.CommonUtils;
import pwc.taxtech.atms.constant.enums.EnumServiceType;
import pwc.taxtech.atms.constant.enums.FileUploadEnum;
import pwc.taxtech.atms.dao.FileTypesMapper;
import pwc.taxtech.atms.dao.OrganizationMapper;
import pwc.taxtech.atms.dao.ProjectMapper;
import pwc.taxtech.atms.dao.UserMapper;
import pwc.taxtech.atms.dto.didiFileUpload.DidiFileIUploadParam;
import pwc.taxtech.atms.dto.didiFileUpload.DidiFileUploadDetailResult;
import pwc.taxtech.atms.dto.reportUpload.ReportUploadParam;
import pwc.taxtech.atms.dto.reportUpload.ReportUploadResult;
import pwc.taxtech.atms.entity.Project;
import pwc.taxtech.atms.entity.User;
import pwc.taxtech.atms.entity.*;
import pwc.taxtech.atms.vat.dao.ReportUploadMapper;
import pwc.taxtech.atms.vat.entity.FileUpload;
import pwc.taxtech.atms.vat.entity.ReportUpload;
......@@ -43,10 +44,18 @@ public class ReportUploadService extends BaseService {
@Resource
private ProjectMapper projectMapper;
@Autowired
DidiFileUploadService didiFileUploadService;
@Resource
private OrganizationMapper organizationMapper;
@Resource
private FileTypesMapper fileTypesMapper;
@Autowired
TaxDocumentServiceImpl taxDocumentService;
public PageInfo<ReportUploadResult> queryPage(ReportUploadParam param) {
Page page = PageHelper.startPage(param.getPageInfo().getPageIndex(), param.getPageInfo().getPageSize());
ReportUploadExample example = new ReportUploadExample();
......@@ -116,9 +125,11 @@ public class ReportUploadService extends BaseService {
String period = ""+project.getYear()+(data.getPeriod()>9?data.getPeriod():("0"+data.getPeriod()));
data.setPeriod(Integer.valueOf(period));
fileName += project.getName();
fileName += "-";
fileName += "_";
fileName += "增值税及附加税费计算底稿";
fileName += "_";
fileName += data.getPeriod();
fileName += "-V";
fileName += "_V";
ReportUploadExample example = new ReportUploadExample();
example.createCriteria().andProjectIdEqualTo(data.getProjectId()).andPeriodEqualTo(data.getPeriod());
example.setOrderByClause("version desc");
......@@ -138,5 +149,27 @@ public class ReportUploadService extends BaseService {
data.setCreateTime(new Date());
data.setServiceType(EnumServiceType.VAT.getCode());
reportUploadMapper.insert(data);
data.setOrgId(project.getOrganizationId());
TaxDocument taxDocument = new TaxDocument();
taxDocument.setCompanyId(project.getOrganizationId());
Organization organization = organizationMapper.selectByPrimaryKey(project.getOrganizationId());
taxDocument.setCompanyName(organization.getName());
taxDocument.setFileUploadId(data.getFileUploadId());
taxDocument.setEnable("T");
taxDocument.setOwnTime(data.getPeriod());
taxDocument.setFileType("增值税及附加税费计算底稿");
taxDocument.setTaxType("增值税");
FileTypesExample fileTypesExample = new FileTypesExample();
fileTypesExample.createCriteria().andFileTypeEqualTo("增值税及附加税费计算底稿");
List<FileTypes> fileTypesList = fileTypesMapper.selectByExample(fileTypesExample);
if(CollectionUtils.isNotEmpty(dataList)){
taxDocument.setFileAttr(fileTypesList.get(0).getFileAttr());
taxDocument.setFileTypeId(fileTypesList.get(0).getId());
}
taxDocument.setFileName(fileName);
taxDocumentService.addTaxDocumentList(null,taxDocument);
}
}
......@@ -504,7 +504,6 @@
// 根据已有信息通过spreadJS计算各单元格的值
var setData = function () {
debugger;
var sheet = scope.spread.sheets[0];
var isExportData = false;
if (angular.isArray(scope.reportSource)) {
......
......@@ -980,7 +980,6 @@
//批量导出EXCEL
$scope.export = function () {
$('#busy-indicator-container').show();
var grp = _.find($scope.$parent.$parent.groups, function (g) {
return g.name == 'TaxReturnType';
});
......@@ -997,6 +996,7 @@
SweetAlert.warning($translate.instant('ExportReportRequiredCheck'));
return;
}
$('#busy-indicator-container').show();
var reportIds = [];
angular.forEach($scope.selectedReportIds, function (reportId) {
var node;
......@@ -1029,7 +1029,6 @@
xhr.send(JSON.stringify({
reportIds: reportIds
}));
$('#busy-indicator-container').hide();
return;
}
......@@ -1038,6 +1037,7 @@
xhr.onload = function (e) {
if(xhr.status === 200){
SweetAlert.success('', $translate.instant('FileUploadSuccess'));
$('#exportReportFilesContainerClose').click();
}else{
SweetAlert.success('', $translate.instant('FileUploadFailed'));
}
......@@ -1050,7 +1050,6 @@
xhr.send(JSON.stringify({
reportIds: reportIds
}));
$('#busy-indicator-container').hide();
return;
}
......
......@@ -80,7 +80,7 @@
<script type="text/ng-template" class="content" id="exportReport.html">
<div class="modal-header">
<h4 class="modal-title" style="float: left;width: 70%;">{{'SelectExportReport' | translate}}</h4>
<span ng-click="$dismiss();" style="width: 20px; float: right; cursor: pointer;">x</span>
<span ng-click="$dismiss();" style="width: 20px; float: right; cursor: pointer;" id="exportReportFilesContainerClose" >x</span>
</div>
<div class="modal-body process-bar-container">
<div id="report-tree-container">
......
......@@ -1000,6 +1000,7 @@
xhr.onload = function (e) {
if(xhr.status === 200){
SweetAlert.success('', $translate.instant('FileUploadSuccess'));
$('#exportReportFilesContainerClose').click();
}else{
SweetAlert.success('', $translate.instant('FileUploadFailed'));
}
......
......@@ -77,7 +77,7 @@
<script type="text/ng-template" class="content" id="exportReport.html">
<div class="modal-header">
<h4 class="modal-title" style="float: left;width: 70%;">{{viewTitle}}</h4>
<span ng-click="$dismiss();" style="width: 20px; float: right; cursor: pointer;">x</span>
<span ng-click="$dismiss();" style="width: 20px; float: right; cursor: pointer;" id="exportReportFilesContainerClose">x</span>
</div>
<div class="modal-body process-bar-container">
<div id="report-tree-container">
......
......@@ -581,8 +581,10 @@
var counter = 0;
var setWarningToTrue = false;
var indexTemp = 1;
temp.forEach(function (project) {
project.index = indexTemp++;
setWarningToTrue = false;
project.finalStatus = (project.serviceTypeID === enums.serviceType.VAT) ? setLayoutStatusTitle(project.projectStatusList) : setLayoutStatusTitleForCIT(project.projectStatusList);
project.periodDate = (project.serviceTypeID === enums.serviceType.VAT) ? ($scope.currentSelectedYear + "." + $scope.currentSelectedMonth) : ($scope.currentSelectedYear + "");
......@@ -741,11 +743,11 @@
if (sortstr == 'status') {
if ($scope.orderStatus) {
$scope.orderStatus = false;
var list = _.sortBy($scope.queryResults, 'haveCreateProject');
var list = $scope.queryResults.sort(sortByProjectStatus('projectStatusList'));
$scope.queryResults = list;
} else {
$scope.orderStatus = true;
var list = _.sortBy($scope.queryResults, 'haveCreateProject');
var list = $scope.queryResults.sort(sortByProjectStatus('projectStatusList'));
$scope.queryResults = list.reverse();
}
}
......@@ -761,7 +763,23 @@
}
}
}
}
};
function sortByProjectStatus(projectStatusList){
var currentMonth = vatSessionService.month;
return function(a,b){
a = a.projectStatusList;
b = b.projectStatusList;
var statusId;
if (a === null || (a !== null && a[currentMonth] === undefined)){
return -1;
} else if (b === null || (b !== null && b[currentMonth] === undefined)) {
return 1;
} else {
return a[currentMonth]-b[currentMonth];
}
}
};
$scope.goToService = function (project) {
if (!project.clicked) {
......
......@@ -84,11 +84,11 @@
{{ 'OrderBy' | translate }}<span class="glyphicon glyphicon-sort"></span>
</button>
<ul class="dropdown-menu">
<li ng-click="fileSort('year')">
&nbsp;&nbsp;{{ 'OrderyByYear' | translate }}&nbsp;&nbsp;
<i class="fa fa-sort-amount-asc" ng-if="orderYear" aria-hidden="true"></i>
<i class="fa fa-sort-amount-desc" ng-if="!orderYear" aria-hidden="true"></i>
</li>
<!--<li ng-click="fileSort('year')">-->
<!--&nbsp;&nbsp;{{ 'OrderyByYear' | translate }}&nbsp;&nbsp;-->
<!--<i class="fa fa-sort-amount-asc" ng-if="orderYear" aria-hidden="true"></i>-->
<!--<i class="fa fa-sort-amount-desc" ng-if="!orderYear" aria-hidden="true"></i>-->
<!--</li>-->
<li ng-click="fileSort('name')">
&nbsp;&nbsp;{{ 'OrderyByName' | translate }}&nbsp;&nbsp;
<i class="fa fa-sort-amount-asc" ng-if="orderName" aria-hidden="true"></i>
......@@ -99,11 +99,11 @@
<i class="fa fa-sort-amount-asc" ng-if="orderStatus" aria-hidden="true"></i>
<i class="fa fa-sort-amount-desc" ng-if="!orderStatus" aria-hidden="true"></i>
</li>
<li ng-click="fileSort('type')">
&nbsp;&nbsp;{{ 'OrderyByServiceType' | translate }}&nbsp;&nbsp;
<i class="fa fa-sort-amount-asc" ng-if="orderType" aria-hidden="true"></i>
<i class="fa fa-sort-amount-desc" ng-if="!orderType" aria-hidden="true"></i>
</li>
<!--<li ng-click="fileSort('type')">-->
<!--&nbsp;&nbsp;{{ 'OrderyByServiceType' | translate }}&nbsp;&nbsp;-->
<!--<i class="fa fa-sort-amount-asc" ng-if="orderType" aria-hidden="true"></i>-->
<!--<i class="fa fa-sort-amount-desc" ng-if="!orderType" aria-hidden="true"></i>-->
<!--</li>-->
</ul>
</div>
<div class="button-sort" ng-if="currentView == 'workflowView'">
......
......@@ -82,7 +82,7 @@
$scope.ledgerCurrencyCodeFirst = itemFirst.ledgerCurrencyCode;
$scope.ledgerStatusFirst = itemFirst.status;
//TODO
$scope.importDate = $filter('date')(data.list[0].date, "yyyy-MM-dd hh:mm:ss");
$scope.importDate = $filter('date')(data.list[0].updateTime, "yyyy-MM-dd hh:mm:ss");
}
$scope.gridOptions.data = data.list;
$scope.queryIncomeInvoiceItemResult.pageInfo = data;
......
......@@ -10,7 +10,7 @@
<div style="margin-bottom: 10px;margin-left: 20px;margin-top: 10px;">
<!-- {{'EnterpriseAccountSetName' | translate }}:<span class="numAmount">{{ledgerNameFirst}}</span>&nbsp;&nbsp;&nbsp;-->
{{'ImportTime' | translate }}:<span class="numAmount">{{importDate| date:'yyyy-MM-dd hh:mm:ss'}}</span>
{{'ImportTime' | translate }}:<span class="numAmount">{{importDate| date:'yyyy-MM-dd HH:mm:ss'}}</span>
<!-- {{'ImportTime' | translate }}:<span class="numAmount">{{ importDate| date:'yyyy-MM'}}</span>-->
</div>
......
......@@ -106,7 +106,7 @@
if(data.size>0){
$scope.currencyCode = data.list[0].ledgerCurrencyCode;
$scope.status = data.list[0].status;
$scope.importDate = $filter('date')(data.list[0].date, "yyyy-MM-dd hh:mm:ss");
$scope.importDate = $filter('date')(data.list[0].updateTime, "yyyy-MM-dd HH:mm:ss");
}
}
});
......
......@@ -16,8 +16,8 @@
<div style="margin-bottom: 8px;margin-left: 30px">
{{'EnterpriseAccountSetCurrency' | translate}}<span class="numAmount">{{currencyCode}}</span>&nbsp;&nbsp;&nbsp;
{{'IsCloseAccount' | translate}}<span class="numAmount">{{status}}</span>
{{'ImportTime' | translate}}<span class="numAmount">{{importDate| date:'yyyy-MM-dd hh:mm:ss'}}</span>
<!--{{'IsCloseAccount' | translate}}<span class="numAmount">{{status}}</span>-->
{{'ImportTime' | translate}}<span class="numAmount">{{importDate| date:'yyyy-MM-dd HH:mm:ss'}}</span>
</div>
<div id="filterCriteriaDiv" style="max-width:98%;margin-bottom:2px;" ng-show="criteriaList.length>0">
......
......@@ -105,7 +105,7 @@
if(data.size>0){
$scope.currencyCode = data.list[0].ledgerCurrencyCode;
$scope.status = data.list[0].status;
$scope.importDate = $filter('date')(data.list[0].date, "yyyy-MM-dd hh:mm:ss");
$scope.importDate = $filter('date')(data.list[0].updateTime, "yyyy-MM-dd hh:mm:ss");
}
}
});
......
......@@ -16,7 +16,7 @@
<div style="margin-bottom: 8px;margin-left: 30px">
{{'EnterpriseAccountSetCurrency' | translate}}<span class="numAmount">{{currencyCode}}</span>&nbsp;&nbsp;&nbsp;
{{'IsCloseAccount' | translate}}<span class="numAmount">{{status}}</span>
<!--{{'IsCloseAccount' | translate}}<span class="numAmount">{{status}}</span>-->
{{'ImportTime' | translate}}<span class="numAmount">{{importDate| date:'yyyy-MM-dd hh:mm:ss'}}</span>
</div>
......
......@@ -6,13 +6,15 @@
//表格配置
$scope.revenueGridOptions = $.extend(true, {}, dxDataGridService.BASIC_GRID_OPTIONS, {
allowColumnResizing: true,
columns: [
{
dataField: 'serialNo',
caption: $translate.instant('RevDetailColSerialNo'),
fixed: true,
allowHeaderFiltering: true, cellTemplate: function (container, options) {
allowHeaderFiltering: true,
width: '50px',
cellTemplate: function (container, options) {
try {
$("<span>" + (options.rowIndex + 1) + "</span>")
.appendTo(container);
......@@ -24,63 +26,64 @@
{
dataField: 'subject',
caption: $translate.instant('RevDetailColSubject'),
fixed: true,
allowHeaderFiltering: true
allowHeaderFiltering: true,
width: '70px'
},
{
dataField: 'account',
caption: $translate.instant('RevDetailColAccount'),
fixed: true,
allowHeaderFiltering: true
allowHeaderFiltering: true,
width: '100px'
},
{
dataField: 'profitCenter',
caption: $translate.instant('RevDetailColProfitCenter'),
fixed: true,
allowHeaderFiltering: true
allowHeaderFiltering: true,
width: '75px',
},
{
dataField: 'product',
caption: $translate.instant('RevDetailProduct'),
fixed: true,
allowHeaderFiltering: true
allowHeaderFiltering: true,
width: '60px',
},
{
dataField: 'subjectExplain',
caption: $translate.instant('RevDetailColSubjectExp'),
fixed: true,
allowHeaderFiltering: true
allowHeaderFiltering: true,
width: '270px',
},
{
dataField: 'accountExplain',
caption: $translate.instant('RevDetailColAccountExp'),
fixed: true,
allowHeaderFiltering: true
allowHeaderFiltering: true,
width: '200px',
},
{
dataField: 'profitCenterExplain',
caption: $translate.instant('RevDetailColProfitCenterExp'),
fixed: true,
allowHeaderFiltering: true
allowHeaderFiltering: true,
width: '108px',
},
{
dataField: 'productExplain',
caption: $translate.instant('RevDetailProductExp'),
fixed: true,
allowHeaderFiltering: true
allowHeaderFiltering: true,
width: '75px',
},
{
dataField: 'amount',
caption: $translate.instant('RevDetailAmount'),
fixed: true,
format: {type: 'fixedPoint', precision: 2},
allowHeaderFiltering: true
allowHeaderFiltering: true,
width: '100px',
},
{
dataField: 'type',
caption: $translate.instant('RevDetailType'),
fixed: true,
allowHeaderFiltering: true, cellTemplate: function (container, options) {
allowHeaderFiltering: true,
width: '100px',
cellTemplate: function (container, options) {
try {
if (options.data.emptyCode == 1 || options.data.type == null) {
$('<i class="fa fa-exclamation-circle fa-1x" style="color: yellow" aria-hidden="true "></i>&nbsp;&nbsp;')
......@@ -99,8 +102,8 @@
{
dataField: 'category',
caption: $translate.instant('RevDetailCategory'),
fixed: true,
allowHeaderFiltering: true,
width: '160px',
cellTemplate: function (container, options) {
try {
if (options.data.emptyCode == 1 || options.data.category == null) {
......@@ -127,8 +130,8 @@
{
dataField: 'taxOn',
caption: $translate.instant('RevDetailTaxOn'),
fixed: true,
allowHeaderFiltering: true,
width: '100px',
cellTemplate: function (container, options) {
try {
if (options.data.emptyCode == 1 || options.data.taxOn == null) {
......
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