fix(system):修改单位返回值逻辑
This commit is contained in:
+18
-9
@@ -30,11 +30,7 @@ import lombok.extern.slf4j.Slf4j;
|
|||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.*;
|
||||||
import java.util.Date;
|
|
||||||
import java.util.List;
|
|
||||||
import java.util.Objects;
|
|
||||||
import java.util.Set;
|
|
||||||
import java.util.stream.Collectors;
|
import java.util.stream.Collectors;
|
||||||
import java.util.stream.Stream;
|
import java.util.stream.Stream;
|
||||||
|
|
||||||
@@ -591,11 +587,24 @@ public class ExpenseAccountApplicationService {
|
|||||||
throw new ServiceException("组织ID不能为空");
|
throw new ServiceException("组织ID不能为空");
|
||||||
}
|
}
|
||||||
ExpenseAccountPO expenseAccountPO = expenseAccountDomainService.getInfoByOrgAndCode(subjectCode, organizationId);
|
ExpenseAccountPO expenseAccountPO = expenseAccountDomainService.getInfoByOrgAndCode(subjectCode, organizationId);
|
||||||
// 组装计费单位列表:单位-单位英文
|
// // 组装计费单位列表:单位-单位英文
|
||||||
List<String> unit = new ArrayList<>();
|
// List<String> unit = new ArrayList<>();
|
||||||
|
// if (expenseAccountPO != null) {
|
||||||
|
// unit.add(expenseAccountPO.getBillingUnit() + "-" + expenseAccountPO.getBillingUnitEn());
|
||||||
|
// unit.add(expenseAccountPO.getBillingUnit2() + "-" + expenseAccountPO.getBillingUnitEn2());
|
||||||
|
// expenseAccountPO.setUnit(unit);
|
||||||
|
// }
|
||||||
|
// 组装计费单位列表(数组)
|
||||||
|
List<Map<String, String>> unit = new ArrayList<>();
|
||||||
if (expenseAccountPO != null) {
|
if (expenseAccountPO != null) {
|
||||||
unit.add(expenseAccountPO.getBillingUnit() + "-" + expenseAccountPO.getBillingUnitEn());
|
Map<String, String> unit1 = new HashMap<>();
|
||||||
unit.add(expenseAccountPO.getBillingUnit2() + "-" + expenseAccountPO.getBillingUnitEn2());
|
unit1.put("unit", expenseAccountPO.getBillingUnit() + "-" + expenseAccountPO.getBillingUnitEn());
|
||||||
|
unit.add(unit1);
|
||||||
|
|
||||||
|
Map<String, String> unit2 = new HashMap<>();
|
||||||
|
unit2.put("unit", expenseAccountPO.getBillingUnit2() + "-" + expenseAccountPO.getBillingUnitEn2());
|
||||||
|
unit.add(unit2);
|
||||||
|
|
||||||
expenseAccountPO.setUnit(unit);
|
expenseAccountPO.setUnit(unit);
|
||||||
}
|
}
|
||||||
return expenseAccountPO;
|
return expenseAccountPO;
|
||||||
|
|||||||
+2
-1
@@ -9,6 +9,7 @@ import io.swagger.annotations.ApiModel;
|
|||||||
import io.swagger.annotations.ApiModelProperty;
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
import java.math.BigDecimal;
|
import java.math.BigDecimal;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
import com.mhd.common.core.web.domain.BaseVOEntity;
|
import com.mhd.common.core.web.domain.BaseVOEntity;
|
||||||
|
|
||||||
@@ -161,6 +162,6 @@ public class ExpenseAccountPO extends BaseVOEntity{
|
|||||||
private String ncSubjectCode;
|
private String ncSubjectCode;
|
||||||
|
|
||||||
@ApiModelProperty("计费单位列表(单位-单位英文)")
|
@ApiModelProperty("计费单位列表(单位-单位英文)")
|
||||||
private List<String> unit;
|
private List<Map<String, String>> unit;
|
||||||
|
|
||||||
}
|
}
|
||||||
+1
-1
@@ -333,7 +333,7 @@ public class ExpenseAccountApi extends BaseController{
|
|||||||
public AjaxResult getInfoByOrgAndCode(@RequestParam("subjectCode") String subjectCode,@RequestParam("organizationId") Long organizationId)
|
public AjaxResult getInfoByOrgAndCode(@RequestParam("subjectCode") String subjectCode,@RequestParam("organizationId") Long organizationId)
|
||||||
{
|
{
|
||||||
ExpenseAccountPO expenseAccountPO = expenseAccountApplicationService.getInfoByOrgAndCode(subjectCode, organizationId);
|
ExpenseAccountPO expenseAccountPO = expenseAccountApplicationService.getInfoByOrgAndCode(subjectCode, organizationId);
|
||||||
return AjaxResult.success(expenseAccountPO);
|
return AjaxResult.success(expenseAccountPO.getUnit());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user