Commit 44d6c531 authored by chase's avatar chase

fix bug

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