Commit 4c6af1dd authored by weizhikai's avatar weizhikai

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

parent ffc4dc52
......@@ -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 + "");
......
......@@ -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