Commit 4c6af1dd authored by weizhikai's avatar weizhikai

1、收入明细列宽调整;2、报表上传成功后自动消失后面的模态框;3、机构管理只展示当前用户有权限的机构;4、卡片列表展示时的序号问题

parent ffc4dc52
...@@ -369,6 +369,17 @@ public class OrganizationServiceImpl extends BaseService{ ...@@ -369,6 +369,17 @@ public class OrganizationServiceImpl extends BaseService{
orgInfoDtoList.add(orgInfoDto); 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; return orgInfoDtoList;
} }
......
...@@ -11,14 +11,15 @@ import pwc.taxtech.atms.common.AuthUserHelper; ...@@ -11,14 +11,15 @@ import pwc.taxtech.atms.common.AuthUserHelper;
import pwc.taxtech.atms.common.CommonUtils; import pwc.taxtech.atms.common.CommonUtils;
import pwc.taxtech.atms.constant.enums.EnumServiceType; import pwc.taxtech.atms.constant.enums.EnumServiceType;
import pwc.taxtech.atms.constant.enums.FileUploadEnum; 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.ProjectMapper;
import pwc.taxtech.atms.dao.UserMapper; import pwc.taxtech.atms.dao.UserMapper;
import pwc.taxtech.atms.dto.didiFileUpload.DidiFileIUploadParam; import pwc.taxtech.atms.dto.didiFileUpload.DidiFileIUploadParam;
import pwc.taxtech.atms.dto.didiFileUpload.DidiFileUploadDetailResult; import pwc.taxtech.atms.dto.didiFileUpload.DidiFileUploadDetailResult;
import pwc.taxtech.atms.dto.reportUpload.ReportUploadParam; import pwc.taxtech.atms.dto.reportUpload.ReportUploadParam;
import pwc.taxtech.atms.dto.reportUpload.ReportUploadResult; import pwc.taxtech.atms.dto.reportUpload.ReportUploadResult;
import pwc.taxtech.atms.entity.Project; import pwc.taxtech.atms.entity.*;
import pwc.taxtech.atms.entity.User;
import pwc.taxtech.atms.vat.dao.ReportUploadMapper; import pwc.taxtech.atms.vat.dao.ReportUploadMapper;
import pwc.taxtech.atms.vat.entity.FileUpload; import pwc.taxtech.atms.vat.entity.FileUpload;
import pwc.taxtech.atms.vat.entity.ReportUpload; import pwc.taxtech.atms.vat.entity.ReportUpload;
...@@ -43,10 +44,18 @@ public class ReportUploadService extends BaseService { ...@@ -43,10 +44,18 @@ public class ReportUploadService extends BaseService {
@Resource @Resource
private ProjectMapper projectMapper; private ProjectMapper projectMapper;
@Autowired @Autowired
DidiFileUploadService didiFileUploadService; DidiFileUploadService didiFileUploadService;
@Resource
private OrganizationMapper organizationMapper;
@Resource
private FileTypesMapper fileTypesMapper;
@Autowired
TaxDocumentServiceImpl taxDocumentService;
public PageInfo<ReportUploadResult> queryPage(ReportUploadParam param) { public PageInfo<ReportUploadResult> queryPage(ReportUploadParam param) {
Page page = PageHelper.startPage(param.getPageInfo().getPageIndex(), param.getPageInfo().getPageSize()); Page page = PageHelper.startPage(param.getPageInfo().getPageIndex(), param.getPageInfo().getPageSize());
ReportUploadExample example = new ReportUploadExample(); ReportUploadExample example = new ReportUploadExample();
...@@ -116,9 +125,11 @@ public class ReportUploadService extends BaseService { ...@@ -116,9 +125,11 @@ public class ReportUploadService extends BaseService {
String period = ""+project.getYear()+(data.getPeriod()>9?data.getPeriod():("0"+data.getPeriod())); String period = ""+project.getYear()+(data.getPeriod()>9?data.getPeriod():("0"+data.getPeriod()));
data.setPeriod(Integer.valueOf(period)); data.setPeriod(Integer.valueOf(period));
fileName += project.getName(); fileName += project.getName();
fileName += "-"; fileName += "_";
fileName += "增值税及附加税费计算底稿";
fileName += "_";
fileName += data.getPeriod(); fileName += data.getPeriod();
fileName += "-V"; fileName += "_V";
ReportUploadExample example = new ReportUploadExample(); ReportUploadExample example = new ReportUploadExample();
example.createCriteria().andProjectIdEqualTo(data.getProjectId()).andPeriodEqualTo(data.getPeriod()); example.createCriteria().andProjectIdEqualTo(data.getProjectId()).andPeriodEqualTo(data.getPeriod());
example.setOrderByClause("version desc"); example.setOrderByClause("version desc");
...@@ -138,5 +149,27 @@ public class ReportUploadService extends BaseService { ...@@ -138,5 +149,27 @@ public class ReportUploadService extends BaseService {
data.setCreateTime(new Date()); data.setCreateTime(new Date());
data.setServiceType(EnumServiceType.VAT.getCode()); data.setServiceType(EnumServiceType.VAT.getCode());
reportUploadMapper.insert(data); 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 @@ ...@@ -504,7 +504,6 @@
// 根据已有信息通过spreadJS计算各单元格的值 // 根据已有信息通过spreadJS计算各单元格的值
var setData = function () { var setData = function () {
debugger;
var sheet = scope.spread.sheets[0]; var sheet = scope.spread.sheets[0];
var isExportData = false; var isExportData = false;
if (angular.isArray(scope.reportSource)) { if (angular.isArray(scope.reportSource)) {
......
...@@ -980,7 +980,6 @@ ...@@ -980,7 +980,6 @@
//批量导出EXCEL //批量导出EXCEL
$scope.export = function () { $scope.export = function () {
$('#busy-indicator-container').show();
var grp = _.find($scope.$parent.$parent.groups, function (g) { var grp = _.find($scope.$parent.$parent.groups, function (g) {
return g.name == 'TaxReturnType'; return g.name == 'TaxReturnType';
}); });
...@@ -997,6 +996,7 @@ ...@@ -997,6 +996,7 @@
SweetAlert.warning($translate.instant('ExportReportRequiredCheck')); SweetAlert.warning($translate.instant('ExportReportRequiredCheck'));
return; return;
} }
$('#busy-indicator-container').show();
var reportIds = []; var reportIds = [];
angular.forEach($scope.selectedReportIds, function (reportId) { angular.forEach($scope.selectedReportIds, function (reportId) {
var node; var node;
...@@ -1029,7 +1029,6 @@ ...@@ -1029,7 +1029,6 @@
xhr.send(JSON.stringify({ xhr.send(JSON.stringify({
reportIds: reportIds reportIds: reportIds
})); }));
$('#busy-indicator-container').hide();
return; return;
} }
...@@ -1038,6 +1037,7 @@ ...@@ -1038,6 +1037,7 @@
xhr.onload = function (e) { xhr.onload = function (e) {
if(xhr.status === 200){ if(xhr.status === 200){
SweetAlert.success('', $translate.instant('FileUploadSuccess')); SweetAlert.success('', $translate.instant('FileUploadSuccess'));
$('#exportReportFilesContainerClose').click();
}else{ }else{
SweetAlert.success('', $translate.instant('FileUploadFailed')); SweetAlert.success('', $translate.instant('FileUploadFailed'));
} }
...@@ -1050,7 +1050,6 @@ ...@@ -1050,7 +1050,6 @@
xhr.send(JSON.stringify({ xhr.send(JSON.stringify({
reportIds: reportIds reportIds: reportIds
})); }));
$('#busy-indicator-container').hide();
return; return;
} }
......
...@@ -80,7 +80,7 @@ ...@@ -80,7 +80,7 @@
<script type="text/ng-template" class="content" id="exportReport.html"> <script type="text/ng-template" class="content" id="exportReport.html">
<div class="modal-header"> <div class="modal-header">
<h4 class="modal-title" style="float: left;width: 70%;">{{'SelectExportReport' | translate}}</h4> <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>
<div class="modal-body process-bar-container"> <div class="modal-body process-bar-container">
<div id="report-tree-container"> <div id="report-tree-container">
......
...@@ -1000,6 +1000,7 @@ ...@@ -1000,6 +1000,7 @@
xhr.onload = function (e) { xhr.onload = function (e) {
if(xhr.status === 200){ if(xhr.status === 200){
SweetAlert.success('', $translate.instant('FileUploadSuccess')); SweetAlert.success('', $translate.instant('FileUploadSuccess'));
$('#exportReportFilesContainerClose').click();
}else{ }else{
SweetAlert.success('', $translate.instant('FileUploadFailed')); SweetAlert.success('', $translate.instant('FileUploadFailed'));
} }
......
...@@ -77,7 +77,7 @@ ...@@ -77,7 +77,7 @@
<script type="text/ng-template" class="content" id="exportReport.html"> <script type="text/ng-template" class="content" id="exportReport.html">
<div class="modal-header"> <div class="modal-header">
<h4 class="modal-title" style="float: left;width: 70%;">{{viewTitle}}</h4> <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>
<div class="modal-body process-bar-container"> <div class="modal-body process-bar-container">
<div id="report-tree-container"> <div id="report-tree-container">
......
...@@ -581,8 +581,10 @@ ...@@ -581,8 +581,10 @@
var counter = 0; var counter = 0;
var setWarningToTrue = false; var setWarningToTrue = false;
var indexTemp = 1;
temp.forEach(function (project) { temp.forEach(function (project) {
project.index = indexTemp++;
setWarningToTrue = false; setWarningToTrue = false;
project.finalStatus = (project.serviceTypeID === enums.serviceType.VAT) ? setLayoutStatusTitle(project.projectStatusList) : setLayoutStatusTitleForCIT(project.projectStatusList); 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 + ""); project.periodDate = (project.serviceTypeID === enums.serviceType.VAT) ? ($scope.currentSelectedYear + "." + $scope.currentSelectedMonth) : ($scope.currentSelectedYear + "");
......
...@@ -6,13 +6,15 @@ ...@@ -6,13 +6,15 @@
//表格配置 //表格配置
$scope.revenueGridOptions = $.extend(true, {}, dxDataGridService.BASIC_GRID_OPTIONS, { $scope.revenueGridOptions = $.extend(true, {}, dxDataGridService.BASIC_GRID_OPTIONS, {
allowColumnResizing: true,
columns: [ columns: [
{ {
dataField: 'serialNo', dataField: 'serialNo',
caption: $translate.instant('RevDetailColSerialNo'), caption: $translate.instant('RevDetailColSerialNo'),
fixed: true, allowHeaderFiltering: true,
allowHeaderFiltering: true, cellTemplate: function (container, options) { width: '50px',
cellTemplate: function (container, options) {
try { try {
$("<span>" + (options.rowIndex + 1) + "</span>") $("<span>" + (options.rowIndex + 1) + "</span>")
.appendTo(container); .appendTo(container);
...@@ -24,63 +26,64 @@ ...@@ -24,63 +26,64 @@
{ {
dataField: 'subject', dataField: 'subject',
caption: $translate.instant('RevDetailColSubject'), caption: $translate.instant('RevDetailColSubject'),
fixed: true, allowHeaderFiltering: true,
allowHeaderFiltering: true width: '70px'
}, },
{ {
dataField: 'account', dataField: 'account',
caption: $translate.instant('RevDetailColAccount'), caption: $translate.instant('RevDetailColAccount'),
fixed: true, allowHeaderFiltering: true,
allowHeaderFiltering: true width: '100px'
}, },
{ {
dataField: 'profitCenter', dataField: 'profitCenter',
caption: $translate.instant('RevDetailColProfitCenter'), caption: $translate.instant('RevDetailColProfitCenter'),
fixed: true, allowHeaderFiltering: true,
allowHeaderFiltering: true width: '75px',
}, },
{ {
dataField: 'product', dataField: 'product',
caption: $translate.instant('RevDetailProduct'), caption: $translate.instant('RevDetailProduct'),
fixed: true, allowHeaderFiltering: true,
allowHeaderFiltering: true width: '60px',
}, },
{ {
dataField: 'subjectExplain', dataField: 'subjectExplain',
caption: $translate.instant('RevDetailColSubjectExp'), caption: $translate.instant('RevDetailColSubjectExp'),
fixed: true, allowHeaderFiltering: true,
allowHeaderFiltering: true width: '270px',
}, },
{ {
dataField: 'accountExplain', dataField: 'accountExplain',
caption: $translate.instant('RevDetailColAccountExp'), caption: $translate.instant('RevDetailColAccountExp'),
fixed: true, allowHeaderFiltering: true,
allowHeaderFiltering: true width: '200px',
}, },
{ {
dataField: 'profitCenterExplain', dataField: 'profitCenterExplain',
caption: $translate.instant('RevDetailColProfitCenterExp'), caption: $translate.instant('RevDetailColProfitCenterExp'),
fixed: true, allowHeaderFiltering: true,
allowHeaderFiltering: true width: '108px',
}, },
{ {
dataField: 'productExplain', dataField: 'productExplain',
caption: $translate.instant('RevDetailProductExp'), caption: $translate.instant('RevDetailProductExp'),
fixed: true, allowHeaderFiltering: true,
allowHeaderFiltering: true width: '75px',
}, },
{ {
dataField: 'amount', dataField: 'amount',
caption: $translate.instant('RevDetailAmount'), caption: $translate.instant('RevDetailAmount'),
fixed: true,
format: {type: 'fixedPoint', precision: 2}, format: {type: 'fixedPoint', precision: 2},
allowHeaderFiltering: true allowHeaderFiltering: true,
width: '100px',
}, },
{ {
dataField: 'type', dataField: 'type',
caption: $translate.instant('RevDetailType'), caption: $translate.instant('RevDetailType'),
fixed: true, allowHeaderFiltering: true,
allowHeaderFiltering: true, cellTemplate: function (container, options) { width: '100px',
cellTemplate: function (container, options) {
try { try {
if (options.data.emptyCode == 1 || options.data.type == null) { 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;') $('<i class="fa fa-exclamation-circle fa-1x" style="color: yellow" aria-hidden="true "></i>&nbsp;&nbsp;')
...@@ -99,8 +102,8 @@ ...@@ -99,8 +102,8 @@
{ {
dataField: 'category', dataField: 'category',
caption: $translate.instant('RevDetailCategory'), caption: $translate.instant('RevDetailCategory'),
fixed: true,
allowHeaderFiltering: true, allowHeaderFiltering: true,
width: '160px',
cellTemplate: function (container, options) { cellTemplate: function (container, options) {
try { try {
if (options.data.emptyCode == 1 || options.data.category == null) { if (options.data.emptyCode == 1 || options.data.category == null) {
...@@ -127,8 +130,8 @@ ...@@ -127,8 +130,8 @@
{ {
dataField: 'taxOn', dataField: 'taxOn',
caption: $translate.instant('RevDetailTaxOn'), caption: $translate.instant('RevDetailTaxOn'),
fixed: true,
allowHeaderFiltering: true, allowHeaderFiltering: true,
width: '100px',
cellTemplate: function (container, options) { cellTemplate: function (container, options) {
try { try {
if (options.data.emptyCode == 1 || options.data.taxOn == null) { 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