|
@@ -4,6 +4,7 @@ import com.baomidou.mybatisplus.core.conditions.Wrapper;
|
|
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
|
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
|
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
|
|
+import com.migao.config.constant.ExamineStatus;
|
|
|
import com.migao.config.constant.FinancesStatus;
|
|
|
import com.migao.config.response.PageBean;
|
|
|
import com.migao.config.response.ResponseBean;
|
|
@@ -19,6 +20,7 @@ import com.migao.mapper.FinancesRepository;
|
|
|
import com.migao.service.FinancesService;
|
|
|
import com.migao.util.EntityUtils;
|
|
|
import org.apache.commons.lang3.StringUtils;
|
|
|
+import org.apache.el.lang.ELArithmetic;
|
|
|
import org.springframework.data.domain.PageRequest;
|
|
|
import org.springframework.data.jpa.domain.Specification;
|
|
|
import org.springframework.stereotype.Service;
|
|
@@ -65,27 +67,22 @@ public class FinancesServiceImpl implements FinancesService {
|
|
|
}
|
|
|
|
|
|
@Override
|
|
|
- public ResponseBean<?> approve(Integer id) {
|
|
|
+ public ResponseBean<?> approve(Integer id, ExamineStatus status) {
|
|
|
Finances finances = financesMapper.selectById(id);
|
|
|
if (finances == null) {
|
|
|
return ResponseBuilder.fail("记录不存在");
|
|
|
}
|
|
|
- finances.setStatus(FinancesStatus.PASS);
|
|
|
- financesMapper.updateById(finances);
|
|
|
- return ResponseBuilder.ok();
|
|
|
- }
|
|
|
-
|
|
|
- @Override
|
|
|
- public ResponseBean<?> reject(Integer id) {
|
|
|
- Finances finances = financesMapper.selectById(id);
|
|
|
- if (finances == null) {
|
|
|
- return ResponseBuilder.fail("记录不存在");
|
|
|
+ if (status.equals(ExamineStatus.PASS)){
|
|
|
+ finances.setStatus(FinancesStatus.PASS);
|
|
|
+ financesMapper.updateById(finances);
|
|
|
+ }else {
|
|
|
+ finances.setStatus(FinancesStatus.TURN);
|
|
|
+ financesMapper.updateById(finances);
|
|
|
}
|
|
|
- finances.setStatus(FinancesStatus.TURN);
|
|
|
- financesMapper.updateById(finances);
|
|
|
return ResponseBuilder.ok();
|
|
|
}
|
|
|
|
|
|
+
|
|
|
/**
|
|
|
* 分页查
|
|
|
*
|