Commit 613ccb68 authored by chase's avatar chase

fix bug

parent 79701cd5
......@@ -37,6 +37,7 @@ public class TaxDocumentController {
taxDocumentService.selectTaxDocumentList(taxDocumentDto);
PageInfo<TaxDocument> taxDocumentPageInfo = page.toPageInfo();
List<TaxDocument> list = taxDocumentPageInfo.getList();
return PageResultVo.getPageResultVo(taxDocumentPageInfo, list);
}
......
package pwc.taxtech.atms.service.impl;
import com.github.pagehelper.PageInfo;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.collections.CollectionUtils;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
......@@ -10,16 +12,16 @@ import pwc.taxtech.atms.common.AuthUserHelper;
import pwc.taxtech.atms.constant.enums.FileUploadEnum;
import pwc.taxtech.atms.dao.TaxDocumentMapper;
import pwc.taxtech.atms.dto.TaxDocumentDto;
import pwc.taxtech.atms.dto.didiFileUpload.DidiFileIUploadParam;
import pwc.taxtech.atms.dto.didiFileUpload.DidiFileUploadDetailResult;
import pwc.taxtech.atms.entity.OperationLogTaxDocument;
import pwc.taxtech.atms.entity.TaxDocument;
import pwc.taxtech.atms.entity.TaxDocumentExample;
import pwc.taxtech.atms.vat.entity.FileUpload;
import javax.annotation.Resource;
import java.util.Calendar;
import java.util.Date;
import java.util.List;
import java.util.UUID;
import java.util.*;
import java.util.stream.Collectors;
/**
* 查询
......@@ -42,9 +44,22 @@ public class TaxDocumentServiceImpl {
DidiFileUploadService didiFileUploadService;
public List<TaxDocument> selectTaxDocumentList(TaxDocumentDto taxDocumentDto) {
return taxDocumentMapper.selectByExample(getExample(taxDocumentDto));
List<TaxDocument> dataList = taxDocumentMapper.selectByExample(getExample(taxDocumentDto));
DidiFileIUploadParam fileParam = new DidiFileIUploadParam();
fileParam.setUuids(dataList.stream()
.map(o -> o.getFileUploadId()).collect(Collectors.toList()));
PageInfo<DidiFileUploadDetailResult> uploadDetail = didiFileUploadService.queryPage(fileParam);
Map<String,String> urlMap = null;
if(CollectionUtils.isNotEmpty(uploadDetail.getList())){
urlMap = uploadDetail.getList().stream().collect(Collectors.toMap(DidiFileUploadDetailResult::getUid, didiFileUploadDetailResult -> didiFileUploadDetailResult.getViewHttpUrl()));
}
for(TaxDocument data:dataList){
data.setFilePositionUrl(urlMap.get(data.getFileUploadId()));
}
return dataList;
}
/**
* 根据条件查询
*
......
......@@ -277,6 +277,7 @@ var app = angular.module('app', ['ui.tree', 'ui.bootstrap', 'ui.bootstrap.tpls',
appPart: 'app',
vat: 'vat',
cit: 'cit',
taxDocumentList: 'taxDocumentList',
noPermissionPage: 'noPermissionPage',
/// <summary>
/// async load translation tables into application for specified part names that required for the view.
......
......@@ -265,7 +265,7 @@ var frameworkModule = angular.module('app.framework', ['app.webservices', 'app.c
'@': {
controller: ['$scope', '$stateParams', 'appTranslation',
function ($scope, $stateParams, appTranslation) {
appTranslation.load([appTranslation.vat,appTranslation.appPart]);
appTranslation.load([appTranslation.taxDocumentList,appTranslation.taxDocumentList]);
}],
template: '<tax-document-list servicetypeid="2"></tax-document-list>'
}
......
......@@ -259,6 +259,7 @@ var app = angular.module('adminApp', ['ui.tree', 'ui.bootstrap', 'ui.bootstrap.t
// AppPart is for the translation of application level, not for a module for a business logic.
appPart: 'app',
vat:'vat',
// other parts for business logic
//worklist: 'worklist',
//registration: 'registration',
......
......@@ -275,6 +275,7 @@ var app = angular.module('app', ['ui.tree', 'ui.bootstrap', 'ui.bootstrap.tpls',
appPart: 'app',
vat: 'vat',
cit: 'cit',
taxDocumentList: 'taxDocumentList',
noPermissionPage: 'noPermissionPage',
/// <summary>
/// async load translation tables into application for specified part names that required for the view.
......
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