Commit 44d6c531 authored by chase's avatar chase

fix bug

parent 201ba46b
...@@ -12,6 +12,7 @@ import pwc.taxtech.atms.common.AuthUserHelper; ...@@ -12,6 +12,7 @@ import pwc.taxtech.atms.common.AuthUserHelper;
import pwc.taxtech.atms.constant.enums.FileUploadEnum; import pwc.taxtech.atms.constant.enums.FileUploadEnum;
import pwc.taxtech.atms.constant.enums.ReportFileUploadEnum; import pwc.taxtech.atms.constant.enums.ReportFileUploadEnum;
import pwc.taxtech.atms.dao.TaxDocumentMapper; import pwc.taxtech.atms.dao.TaxDocumentMapper;
import pwc.taxtech.atms.dpo.OrgSelectDto;
import pwc.taxtech.atms.dto.TaxDocumentDto; import pwc.taxtech.atms.dto.TaxDocumentDto;
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;
...@@ -59,8 +60,14 @@ public class TaxDocumentServiceImpl { ...@@ -59,8 +60,14 @@ public class TaxDocumentServiceImpl {
@Autowired @Autowired
private OrganizationServiceImpl organizationService; private OrganizationServiceImpl organizationService;
public List<TaxDocument> selectTaxDocumentList(TaxDocumentDto taxDocumentDto) { public List<TaxDocument> selectTaxDocumentList(TaxDocumentDto taxDocumentDto) {
List<TaxDocument> dataList = taxDocumentMapper.selectByExample(getExample(taxDocumentDto)); List<OrgSelectDto> orgList = organizationService.getMyOrgList();
if(CollectionUtils.isEmpty(orgList)){
return new ArrayList<>();
}
List<TaxDocument> dataList = taxDocumentMapper.selectByExample(getExample(taxDocumentDto,orgList.stream()
.map(o -> o.getId()).collect(Collectors.toList())));
DidiFileIUploadParam fileParam = new DidiFileIUploadParam(); DidiFileIUploadParam fileParam = new DidiFileIUploadParam();
fileParam.setUuids(dataList.stream() fileParam.setUuids(dataList.stream()
.map(o -> o.getFileUploadId()).collect(Collectors.toList())); .map(o -> o.getFileUploadId()).collect(Collectors.toList()));
...@@ -86,9 +93,10 @@ public class TaxDocumentServiceImpl { ...@@ -86,9 +93,10 @@ public class TaxDocumentServiceImpl {
* @param taxDocumentDto * @param taxDocumentDto
* @return * @return
*/ */
private TaxDocumentExample getExample(TaxDocumentDto taxDocumentDto) { private TaxDocumentExample getExample(TaxDocumentDto taxDocumentDto,List<String> orgIds) {
TaxDocumentExample example = new TaxDocumentExample(); TaxDocumentExample example = new TaxDocumentExample();
TaxDocumentExample.Criteria criteria = example.createCriteria(); TaxDocumentExample.Criteria criteria = example.createCriteria();
criteria.andCompanyIdIn(orgIds);
//档案属性 fileAttr //档案属性 fileAttr
if (StringUtils.isNotBlank(taxDocumentDto.getFileAttr())) { if (StringUtils.isNotBlank(taxDocumentDto.getFileAttr())) {
criteria.andFileAttrEqualTo(taxDocumentDto.getFileAttr()); criteria.andFileAttrEqualTo(taxDocumentDto.getFileAttr());
......
...@@ -133,11 +133,11 @@ public interface OrganizationMapper extends MyMapper { ...@@ -133,11 +133,11 @@ public interface OrganizationMapper extends MyMapper {
List<OrgGeneralInfoMiddleDto> selectJoinToOrgGeneralInfo(); List<OrgGeneralInfoMiddleDto> selectJoinToOrgGeneralInfo();
@Select("select tb.id,tb.name from organization tb left join user_organization ta on ta.organization_id = tb.id " + @Select("select tb.id,tb.name,tb.abbreviation from organization tb left join user_organization ta on ta.organization_id = tb.id " +
"where ta.user_id = #{uid}") "where ta.user_id = #{uid}")
List<OrgSelectDto> getMyOrgSelectList(String uid); List<OrgSelectDto> getMyOrgSelectList(String uid);
@Select("select id, name from organization;") @Select("select id, name,abbreviation from organization;")
List<OrgSelectDto> getAllOrgSelectList(); List<OrgSelectDto> getAllOrgSelectList();
@Select("select tb.id,tb.code from organization tb left join user_organization ta on ta.organization_id = tb.id " + @Select("select tb.id,tb.code from organization tb left join user_organization ta on ta.organization_id = tb.id " +
......
...@@ -3,6 +3,15 @@ package pwc.taxtech.atms.dpo; ...@@ -3,6 +3,15 @@ package pwc.taxtech.atms.dpo;
public class OrgSelectDto { public class OrgSelectDto {
private String id; private String id;
private String name; private String name;
private String abbreviation;
public String getAbbreviation() {
return abbreviation;
}
public void setAbbreviation(String abbreviation) {
this.abbreviation = abbreviation;
}
public String getId() { public String getId() {
return this.id; return this.id;
......
...@@ -1724,7 +1724,7 @@ taxDocumentManageModule.directive('tempModule', function () { ...@@ -1724,7 +1724,7 @@ taxDocumentManageModule.directive('tempModule', function () {
taxDocumentListService.getCompanyNameOptions().then(function(res){ taxDocumentListService.getCompanyNameOptions().then(function(res){
if (res && 0 === res.code) { if (res && 0 === res.code) {
angular.forEach(res.data, function (item) { angular.forEach(res.data, function (item) {
$scope.companyNameOptionsMap[item.id]=item.name; $scope.companyNameOptionsMap[item.id]=item.abbreviation;
}); });
} else { } else {
SweetAlert.error($translate.instant('RevenueGetOrgError')); SweetAlert.error($translate.instant('RevenueGetOrgError'));
...@@ -1774,7 +1774,7 @@ taxDocumentManageModule.directive('tempModule', function () { ...@@ -1774,7 +1774,7 @@ taxDocumentManageModule.directive('tempModule', function () {
taxDocumentListService.getCompanyNameOptions().then(function(res){ taxDocumentListService.getCompanyNameOptions().then(function(res){
if (res && 0 === res.code) { if (res && 0 === res.code) {
angular.forEach(res.data, function (item) { angular.forEach(res.data, function (item) {
$scope.companyNameOptionsMap[item.id]=item.name; $scope.companyNameOptionsMap[item.id]=item.abbreviation;
}); });
} else { } else {
SweetAlert.error($translate.instant('RevenueGetOrgError')); SweetAlert.error($translate.instant('RevenueGetOrgError'));
......
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