|
|
@@ -5,6 +5,7 @@ import cn.hutool.core.date.DateUtil;
|
|
|
import cn.hutool.core.util.ObjectUtil;
|
|
|
import cn.hutool.extra.spring.SpringUtil;
|
|
|
import com.alibaba.fastjson.JSON;
|
|
|
+import com.alibaba.fastjson.TypeReference;
|
|
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
|
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
|
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
|
|
@@ -100,7 +101,7 @@ public class ReimbursementInfoService {
|
|
|
/**
|
|
|
* 列表查询
|
|
|
*/
|
|
|
- public IPage<RetureListDto> list(Page<RetureListDto> page , QueryListDto dto) throws Exception{
|
|
|
+ public IPage<RetureListDto> list(Page<RetureListDto> page , QueryListDto dto,Boolean isExport) throws Exception{
|
|
|
IUserApi userApi = SpringUtil.getBean(IUserApi.class);
|
|
|
IOfficeApi officeApi = SpringUtil.getBean(IOfficeApi.class);
|
|
|
QueryWrapper<QueryListDto> queryWrapper = QueryWrapperGenerator.buildQueryCondition(dto, QueryListDto.class);
|
|
|
@@ -235,52 +236,54 @@ public class ReimbursementInfoService {
|
|
|
|
|
|
|
|
|
IPage<RetureListDto> pageList = infoMapper.findList(page, queryWrapper);
|
|
|
- pageList.getRecords().stream().forEach(item -> {
|
|
|
- // 报销申请
|
|
|
- if (StringUtils.isNotBlank(item.getTaskId()) && StringUtils.isNotBlank(item.getType())) {
|
|
|
- if ("2".equals(item.getType())) { // “审核中”的数据要获取数据审核人
|
|
|
- item.setAuditUserIds(flowTaskService.getTaskAuditUsers(item.getTaskId())); // 获取数据审核人
|
|
|
- String currentTaskName = flowTaskService.getCurrentTaskName(item.getProcInsId());
|
|
|
- if (item.getType().equals("2") && com.jeeplus.utils.StringUtils.isNotBlank(currentTaskName) && !currentTaskName.contains("综合管理部主任") && !currentTaskName.contains("部门主任")){
|
|
|
- item.setApplyFile(true);
|
|
|
+ if (!isExport){
|
|
|
+ pageList.getRecords().stream().forEach(item -> {
|
|
|
+ // 报销申请
|
|
|
+ if (StringUtils.isNotBlank(item.getTaskId()) && StringUtils.isNotBlank(item.getType())) {
|
|
|
+ if ("2".equals(item.getType())) { // “审核中”的数据要获取数据审核人
|
|
|
+ item.setAuditUserIds(flowTaskService.getTaskAuditUsers(item.getTaskId())); // 获取数据审核人
|
|
|
+ String currentTaskName = flowTaskService.getCurrentTaskName(item.getProcInsId());
|
|
|
+ if (item.getType().equals("2") && com.jeeplus.utils.StringUtils.isNotBlank(currentTaskName) && !currentTaskName.contains("综合管理部主任") && !currentTaskName.contains("部门主任")){
|
|
|
+ item.setApplyFile(true);
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
- }
|
|
|
|
|
|
- if (StringUtils.isNotBlank(item.getSourceType()) && "1".equals(item.getSourceType())) { //项目报销
|
|
|
- if (StringUtils.isNotBlank(item.getProjectId())) {
|
|
|
- String proName = selectProjectByIds(item.getProjectId());
|
|
|
- item.setProjectName(proName);
|
|
|
- String reportNo = selectReportNoByIds(item.getProjectId());
|
|
|
- item.setReportNumber(reportNo);
|
|
|
+ if (StringUtils.isNotBlank(item.getSourceType()) && "1".equals(item.getSourceType())) { //项目报销
|
|
|
+ if (StringUtils.isNotBlank(item.getProjectId())) {
|
|
|
+ String proName = selectProjectByIds(item.getProjectId());
|
|
|
+ item.setProjectName(proName);
|
|
|
+ String reportNo = selectReportNoByIds(item.getProjectId());
|
|
|
+ item.setReportNumber(reportNo);
|
|
|
+ }
|
|
|
}
|
|
|
- }
|
|
|
- //文件补充
|
|
|
- ReimbursementFileSupplement reimbursementFileSupplement = reimbursementFileSupplementMapper.getByReimId(item.getId());
|
|
|
- if (ObjectUtils.isNotEmpty(reimbursementFileSupplement)){
|
|
|
- item.setFileStatus(reimbursementFileSupplement.getStatus());
|
|
|
- item.setFileSuppleId(reimbursementFileSupplement.getId());
|
|
|
- item.setProcInsIdFile(reimbursementFileSupplement.getProcInsId());
|
|
|
- item.setTaskIdFile(reimbursementFileSupplement.getTaskIdFile());
|
|
|
- }
|
|
|
- //文件补充
|
|
|
- if (StringUtils.isNotBlank(item.getTaskIdFile()) && StringUtils.isNotBlank(item.getFileStatus())) {
|
|
|
- if ("2".equals(item.getFileStatus()) || "4".equals(item.getFileStatus())) { // “审核中”的数据要获取数据审核人
|
|
|
- item.setAuditFileUserIds(flowTaskService.getTaskAuditUsers(item.getTaskIdFile())); // 获取数据审核人
|
|
|
+ //文件补充
|
|
|
+ ReimbursementFileSupplement reimbursementFileSupplement = reimbursementFileSupplementMapper.getByReimId(item.getId());
|
|
|
+ if (ObjectUtils.isNotEmpty(reimbursementFileSupplement)){
|
|
|
+ item.setFileStatus(reimbursementFileSupplement.getStatus());
|
|
|
+ item.setFileSuppleId(reimbursementFileSupplement.getId());
|
|
|
+ item.setProcInsIdFile(reimbursementFileSupplement.getProcInsId());
|
|
|
+ item.setTaskIdFile(reimbursementFileSupplement.getTaskIdFile());
|
|
|
+ }
|
|
|
+ //文件补充
|
|
|
+ if (StringUtils.isNotBlank(item.getTaskIdFile()) && StringUtils.isNotBlank(item.getFileStatus())) {
|
|
|
+ if ("2".equals(item.getFileStatus()) || "4".equals(item.getFileStatus())) { // “审核中”的数据要获取数据审核人
|
|
|
+ item.setAuditFileUserIds(flowTaskService.getTaskAuditUsers(item.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);
|
|
|
}
|
|
|
- }
|
|
|
- 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 pageList;
|
|
|
}
|
|
|
|
|
|
@@ -1761,7 +1764,18 @@ public class ReimbursementInfoService {
|
|
|
|
|
|
public List<ReimbursementAmountInfoDTO> getInvoiceReimbursementAmountList(List<String> idList) {
|
|
|
List<ReimbursementAmountInfoDTO> list = infoMapper.getInvoiceReimbursementAmountList(idList);
|
|
|
-
|
|
|
+ String cwReimbursementSourceTypeDatas = SpringUtil.getBean ( IDictApi.class ).getDictListMapByDict ("invoice_reimbursement_type");
|
|
|
+ for (ReimbursementAmountInfoDTO info : list) {
|
|
|
+ Map<String,Object> cwReimbursementSourceTypeValueDTOs = JSON.parseObject(cwReimbursementSourceTypeDatas, new TypeReference<Map<String,Object>>() {});
|
|
|
+ if(org.apache.commons.lang3.StringUtils.isNotBlank(info.getInvoiceType())){
|
|
|
+ for (String key : cwReimbursementSourceTypeValueDTOs.keySet()) {
|
|
|
+ if(info.getInvoiceType().equals(key)){
|
|
|
+ info.setInvoiceTypeStr(String.valueOf(cwReimbursementSourceTypeValueDTOs.get(key)));
|
|
|
+ break;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
|
|
|
return list;
|
|
|
}
|