|
@@ -113,6 +113,8 @@ public class ConsultancyReimbursementInfoService {
|
|
|
* 列表查询
|
|
* 列表查询
|
|
|
*/
|
|
*/
|
|
|
public IPage<ConsultancyRetureListDto> list(Page<ConsultancyRetureListDto> page , ConsultancyQueryListDto dto) throws Exception{
|
|
public IPage<ConsultancyRetureListDto> list(Page<ConsultancyRetureListDto> page , ConsultancyQueryListDto dto) throws Exception{
|
|
|
|
|
+ IOfficeApi officeApi = SpringUtil.getBean(IOfficeApi.class);
|
|
|
|
|
+ IUserApi userApi = SpringUtil.getBean(IUserApi.class);
|
|
|
QueryWrapper<ConsultancyQueryListDto> queryWrapper = QueryWrapperGenerator.buildQueryCondition(dto, ConsultancyQueryListDto.class);
|
|
QueryWrapper<ConsultancyQueryListDto> queryWrapper = QueryWrapperGenerator.buildQueryCondition(dto, ConsultancyQueryListDto.class);
|
|
|
/**
|
|
/**
|
|
|
* a表是reimbursementInfo
|
|
* a表是reimbursementInfo
|
|
@@ -142,11 +144,12 @@ public class ConsultancyReimbursementInfoService {
|
|
|
}
|
|
}
|
|
|
// 报销人
|
|
// 报销人
|
|
|
if (StringUtils.isNotEmpty(dto.getReimBy())) {
|
|
if (StringUtils.isNotEmpty(dto.getReimBy())) {
|
|
|
- queryWrapper.apply("( b.user_id = {0} OR us.name LIKE {1} )", dto.getReimBy(), "%" + dto.getReimBy() + "%");
|
|
|
|
|
- queryWrapper.or().apply("( b2.user_id = {0} OR us2.name LIKE {1} )", dto.getReimBy(), "%" + dto.getReimBy() + "%");
|
|
|
|
|
- queryWrapper.or().apply("( b3.user_id = {0} OR us3.name LIKE {1} )", dto.getReimBy(), "%" + dto.getReimBy() + "%");
|
|
|
|
|
- queryWrapper.or().apply("( b4.user_id = {0} OR us4.name LIKE {1} )", dto.getReimBy(), "%" + dto.getReimBy() + "%");
|
|
|
|
|
- queryWrapper.or().apply("( b5.user_id = {0} OR us5.name LIKE {1} )", dto.getReimBy(), "%" + dto.getReimBy() + "%");
|
|
|
|
|
|
|
+ UserDTO userDto = userApi.getByLoginNameNoTen(dto.getReimBy());
|
|
|
|
|
+ queryWrapper.apply("( b.user_id like {0} OR us.name LIKE {1} )", "%" + userDto.getId() + "%", "%" + dto.getReimBy() + "%");
|
|
|
|
|
+ queryWrapper.or().apply("( b2.user_id like {0} OR us2.name LIKE {1} )", "%" + userDto.getId() + "%", "%" + dto.getReimBy() + "%");
|
|
|
|
|
+ queryWrapper.or().apply("( b3.user_id like {0} OR us3.name LIKE {1} )", "%" + userDto.getId() + "%", "%" + dto.getReimBy() + "%");
|
|
|
|
|
+ queryWrapper.or().apply("( b4.user_id like {0} OR us4.name LIKE {1} )", "%" + userDto.getId() + "%", "%" + dto.getReimBy() + "%");
|
|
|
|
|
+ queryWrapper.or().apply("( b5.user_id like {0} OR us5.name LIKE {1} )", "%" + userDto.getId() + "%", "%" + dto.getReimBy() + "%");
|
|
|
|
|
|
|
|
}
|
|
}
|
|
|
// 报销状态
|
|
// 报销状态
|
|
@@ -155,11 +158,12 @@ public class ConsultancyReimbursementInfoService {
|
|
|
}
|
|
}
|
|
|
// 报销部门
|
|
// 报销部门
|
|
|
if (StringUtils.isNotEmpty(dto.getDepartment())) {
|
|
if (StringUtils.isNotEmpty(dto.getDepartment())) {
|
|
|
- queryWrapper.apply("( b.dept_id = {0} OR so.name LIKE {1} )", dto.getDepartment(), "%" + dto.getDepartment() + "%");
|
|
|
|
|
- queryWrapper.or().apply("( b2.dept_id = {0} OR so2.name LIKE {1} )", dto.getDepartment(), "%" + dto.getDepartment() + "%");
|
|
|
|
|
- queryWrapper.or().apply("( b3.dept_id = {0} OR so3.name LIKE {1} )", dto.getDepartment(), "%" + dto.getDepartment() + "%");
|
|
|
|
|
- queryWrapper.or().apply("( b4.dept_id = {0} OR so4.name LIKE {1} )", dto.getDepartment(), "%" + dto.getDepartment() + "%");
|
|
|
|
|
- queryWrapper.or().apply("( b5.dept_id = {0} OR so5.name LIKE {1} )", dto.getDepartment(), "%" + dto.getDepartment() + "%");
|
|
|
|
|
|
|
+ OfficeDTO officeDto = officeApi.getOfficeByName(dto.getDepartment());
|
|
|
|
|
+ queryWrapper.apply("( b.dept_id like {0} OR so.name LIKE {1} )", "%" +officeDto.getId()+ "%", "%" + dto.getDepartment() + "%");
|
|
|
|
|
+ queryWrapper.or().apply("( b2.dept_id like {0} OR so2.name LIKE {1} )", "%" +officeDto.getId()+ "%", "%" + dto.getDepartment() + "%");
|
|
|
|
|
+ queryWrapper.or().apply("( b3.dept_id like {0} OR so3.name LIKE {1} )", "%" +officeDto.getId()+ "%", "%" + dto.getDepartment() + "%");
|
|
|
|
|
+ queryWrapper.or().apply("( b4.dept_id like {0} OR so4.name LIKE {1} )", "%" +officeDto.getId()+ "%", "%" + dto.getDepartment() + "%");
|
|
|
|
|
+ queryWrapper.or().apply("( b5.dept_id like {0} OR so5.name LIKE {1} )", "%" +officeDto.getId()+ "%", "%" + dto.getDepartment() + "%");
|
|
|
|
|
|
|
|
}
|
|
}
|
|
|
// 报销类别
|
|
// 报销类别
|
|
@@ -244,6 +248,18 @@ public class ConsultancyReimbursementInfoService {
|
|
|
item.setProcInsIdFile(reimbursementFileSupplement.getProcInsId());
|
|
item.setProcInsIdFile(reimbursementFileSupplement.getProcInsId());
|
|
|
item.setTaskIdFile(reimbursementFileSupplement.getTaskIdFile());
|
|
item.setTaskIdFile(reimbursementFileSupplement.getTaskIdFile());
|
|
|
}
|
|
}
|
|
|
|
|
+
|
|
|
|
|
+ if (StringUtils.isBlank(item.getDeptName())){
|
|
|
|
|
+ //处理部门名
|
|
|
|
|
+ String offices = getOfficeNameByIds(item.getDeptId());
|
|
|
|
|
+ item.setDeptName(offices);
|
|
|
|
|
+ }
|
|
|
|
|
+ if (StringUtils.isBlank(item.getName())){
|
|
|
|
|
+ //处理用户名
|
|
|
|
|
+ String names = userApi.getNamesByIds(item.getUserId());
|
|
|
|
|
+ item.setName(names);
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
} );
|
|
} );
|
|
|
return list;
|
|
return list;
|
|
|
}
|
|
}
|
|
@@ -1003,6 +1019,8 @@ public class ConsultancyReimbursementInfoService {
|
|
|
* 下载列表查询
|
|
* 下载列表查询
|
|
|
*/
|
|
*/
|
|
|
public List<ConsultancyRetureListDto> exportList(ConsultancyQueryListDto dto) throws Exception{
|
|
public List<ConsultancyRetureListDto> exportList(ConsultancyQueryListDto dto) throws Exception{
|
|
|
|
|
+ IOfficeApi officeApi = SpringUtil.getBean(IOfficeApi.class);
|
|
|
|
|
+ IUserApi userApi = SpringUtil.getBean(IUserApi.class);
|
|
|
QueryWrapper<ConsultancyQueryListDto> queryWrapper = QueryWrapperGenerator.buildQueryCondition(dto, ConsultancyQueryListDto.class);
|
|
QueryWrapper<ConsultancyQueryListDto> queryWrapper = QueryWrapperGenerator.buildQueryCondition(dto, ConsultancyQueryListDto.class);
|
|
|
/**
|
|
/**
|
|
|
* a表是reimbursementInfo
|
|
* a表是reimbursementInfo
|
|
@@ -1028,12 +1046,13 @@ public class ConsultancyReimbursementInfoService {
|
|
|
}
|
|
}
|
|
|
// 报销人
|
|
// 报销人
|
|
|
if (StringUtils.isNotEmpty(dto.getReimBy())) {
|
|
if (StringUtils.isNotEmpty(dto.getReimBy())) {
|
|
|
- queryWrapper.apply("( b.user_id = {0} OR us.name LIKE {1} )", dto.getReimBy(), "%" + dto.getReimBy() + "%");
|
|
|
|
|
- queryWrapper.or().apply("( b2.user_id = {0} OR us2.name LIKE {1} )", dto.getReimBy(), "%" + dto.getReimBy() + "%");
|
|
|
|
|
- queryWrapper.or().apply("( b3.user_id = {0} OR us3.name LIKE {1} )", dto.getReimBy(), "%" + dto.getReimBy() + "%");
|
|
|
|
|
- queryWrapper.or().apply("( b4.user_id = {0} OR us4.name LIKE {1} )", dto.getReimBy(), "%" + dto.getReimBy() + "%");
|
|
|
|
|
- queryWrapper.or().apply("( b5.user_id = {0} OR" +
|
|
|
|
|
- " us5.name LIKE {1} )", dto.getReimBy(), "%" + dto.getReimBy() + "%");
|
|
|
|
|
|
|
+ UserDTO userDto = userApi.getByLoginNameNoTen(dto.getReimBy());
|
|
|
|
|
+ queryWrapper.apply("( b.user_id LIKE {0} OR us.name LIKE {1} )", "%" +userDto.getId()+ "%", "%" + dto.getReimBy() + "%");
|
|
|
|
|
+ queryWrapper.or().apply("( b2.user_id LIKE {0} OR us2.name LIKE {1} )", "%" +userDto.getId()+ "%", "%" + dto.getReimBy() + "%");
|
|
|
|
|
+ queryWrapper.or().apply("( b3.user_id LIKE {0} OR us3.name LIKE {1} )", "%" +userDto.getId()+ "%", "%" + dto.getReimBy() + "%");
|
|
|
|
|
+ queryWrapper.or().apply("( b4.user_id LIKE {0} OR us4.name LIKE {1} )", "%" +userDto.getId()+ "%", "%" + dto.getReimBy() + "%");
|
|
|
|
|
+ queryWrapper.or().apply("( b5.user_id LIKE {0} OR" +
|
|
|
|
|
+ " us5.name LIKE {1} )", "%" +userDto.getId()+ "%", "%" + dto.getReimBy() + "%");
|
|
|
|
|
|
|
|
}
|
|
}
|
|
|
// 报销状态
|
|
// 报销状态
|
|
@@ -1042,11 +1061,12 @@ public class ConsultancyReimbursementInfoService {
|
|
|
}
|
|
}
|
|
|
// 报销部门
|
|
// 报销部门
|
|
|
if (StringUtils.isNotEmpty(dto.getDepartment())) {
|
|
if (StringUtils.isNotEmpty(dto.getDepartment())) {
|
|
|
- queryWrapper.apply("( b.dept_id = {0} OR so.name LIKE {1} )", dto.getDepartment(), "%" + dto.getDepartment() + "%");
|
|
|
|
|
- queryWrapper.or().apply("( b2.dept_id = {0} OR so2.name LIKE {1} )", dto.getDepartment(), "%" + dto.getDepartment() + "%");
|
|
|
|
|
- queryWrapper.or().apply("( b3.dept_id = {0} OR so3.name LIKE {1} )", dto.getDepartment(), "%" + dto.getDepartment() + "%");
|
|
|
|
|
- queryWrapper.or().apply("( b4.dept_id = {0} OR so4.name LIKE {1} )", dto.getDepartment(), "%" + dto.getDepartment() + "%");
|
|
|
|
|
- queryWrapper.or().apply("( b5.dept_id = {0} OR so5.name LIKE {1} )", dto.getDepartment(), "%" + dto.getDepartment() + "%");
|
|
|
|
|
|
|
+ OfficeDTO officeDto = officeApi.getOfficeByName(dto.getDepartment());
|
|
|
|
|
+ queryWrapper.apply("( b.dept_id like {0} OR so.name LIKE {1} )", "%" +officeDto.getId() + "%", "%" + dto.getDepartment() + "%");
|
|
|
|
|
+ queryWrapper.or().apply("( b2.dept_id like {0} OR so2.name LIKE {1} )", "%" +officeDto.getId() + "%", "%" + dto.getDepartment() + "%");
|
|
|
|
|
+ queryWrapper.or().apply("( b3.dept_id like {0} OR so3.name LIKE {1} )", "%" +officeDto.getId() + "%", "%" + dto.getDepartment() + "%");
|
|
|
|
|
+ queryWrapper.or().apply("( b4.dept_id like {0} OR so4.name LIKE {1} )", "%" +officeDto.getId() + "%", "%" + dto.getDepartment() + "%");
|
|
|
|
|
+ queryWrapper.or().apply("( b5.dept_id like {0} OR so5.name LIKE {1} )", "%" +officeDto.getId() + "%", "%" + dto.getDepartment() + "%");
|
|
|
|
|
|
|
|
}
|
|
}
|
|
|
// 报销类别
|
|
// 报销类别
|
|
@@ -1116,6 +1136,17 @@ public class ConsultancyReimbursementInfoService {
|
|
|
}
|
|
}
|
|
|
retureListDto.setSourceType(SpringUtil.getBean ( IDictApi.class ).getDictLabel(retureListDto.getSourceType(),"cw_reimbursement_source_type",""));
|
|
retureListDto.setSourceType(SpringUtil.getBean ( IDictApi.class ).getDictLabel(retureListDto.getSourceType(),"cw_reimbursement_source_type",""));
|
|
|
}
|
|
}
|
|
|
|
|
+
|
|
|
|
|
+ if (StringUtils.isBlank(retureListDto.getDeptName())){
|
|
|
|
|
+ //处理部门名
|
|
|
|
|
+ String offices = getOfficeNameByIds(retureListDto.getDeptId());
|
|
|
|
|
+ retureListDto.setDeptName(offices);
|
|
|
|
|
+ }
|
|
|
|
|
+ if (StringUtils.isBlank(retureListDto.getName())){
|
|
|
|
|
+ //处理用户名
|
|
|
|
|
+ String names = userApi.getNamesByIds(retureListDto.getUserId());
|
|
|
|
|
+ retureListDto.setName(names);
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
return exportList;
|
|
return exportList;
|