修正了BpmOASalaryController中获取部门详情的逻辑,并在BpmOASalaryRespVO中新增了factoryId字段。
This commit is contained in:
parent
1aa2d17b80
commit
03bddb17e8
@ -15,6 +15,7 @@ import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import javax.naming.spi.ObjectFactory;
|
||||
import javax.validation.Valid;
|
||||
|
||||
import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success;
|
||||
@ -55,9 +56,18 @@ public class BpmOASalaryController {
|
||||
public CommonResult<BpmOASalaryRespVO> getSalary(@RequestParam("id") Long id) {
|
||||
|
||||
BpmOASalaryDO salary = salaryService.getSalary(id);
|
||||
if (salary == null) {
|
||||
return success(new BpmOASalaryRespVO());
|
||||
}
|
||||
|
||||
return success(BpmOASalaryConvert.INSTANCE.convert(salary)
|
||||
.setCompanyName(getDept(salary.getCompanyDeptId()).getName()));
|
||||
// 获取部门详情
|
||||
DeptRespDTO dto = getDept(salary.getCompanyDeptId());
|
||||
|
||||
BpmOASalaryRespVO respVO = BpmOASalaryConvert.INSTANCE.convert(salary)
|
||||
.setCompanyName(dto.getName())
|
||||
.setFactoryId(dto.getFactoryId());
|
||||
|
||||
return success(respVO);
|
||||
}
|
||||
|
||||
@GetMapping("/getByProcessInstanceId")
|
||||
@ -67,8 +77,14 @@ public class BpmOASalaryController {
|
||||
|
||||
BpmOASalaryDO salary = salaryService.getByProcessInstanceId(processInstanceId);
|
||||
|
||||
return success(BpmOASalaryConvert.INSTANCE.convert(salary)
|
||||
.setCompanyName(getDept(salary.getCompanyDeptId()).getName()));
|
||||
// 获取部门详情
|
||||
DeptRespDTO dto = getDept(salary.getCompanyDeptId());
|
||||
|
||||
BpmOASalaryRespVO respVO = BpmOASalaryConvert.INSTANCE.convert(salary)
|
||||
.setCompanyName(dto.getName())
|
||||
.setFactoryId(dto.getFactoryId());
|
||||
|
||||
return success(respVO);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -33,6 +33,9 @@ public class BpmOASalaryRespVO extends BpmOABaseRespVO {
|
||||
@Schema(description = "付款公司名称")
|
||||
private String companyName;
|
||||
|
||||
@Schema(description = "付款工厂")
|
||||
private Long FactoryId;
|
||||
|
||||
@Schema(description = "付款总额")
|
||||
private BigDecimal paymentTotal;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user