|
@@ -29,6 +29,7 @@ import com.ruoyi.common.core.domain.BasePo;
|
|
|
import com.ruoyi.common.core.domain.entity.SysDept;
|
|
|
import com.ruoyi.common.utils.SecurityUtils;
|
|
|
import com.ruoyi.common.utils.wrapper.IWrapper;
|
|
|
+import com.ruoyi.common.utils.wrapper.SqlField;
|
|
|
import com.ruoyi.system.service.ISysDeptService;
|
|
|
import com.ruoyi.system.utils.UserUtil;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
@@ -63,6 +64,19 @@ public class CostControlServiceImpl extends ServiceImpl<CostControlMapper, CostC
|
|
|
@Override
|
|
|
public Page<CostControlVo> getPage(CostControlSelectDto dto) {
|
|
|
IWrapper<CostControl> wrapper = getWrapper();
|
|
|
+
|
|
|
+ wrapper.eq("cc", CostControl::getCostType, dto.getCostType());
|
|
|
+ wrapper.eq("cc", CostControl::getStatus, dto.getStatus());
|
|
|
+ wrapper.eq("cc", CostControl::getTradeType, dto.getTradeType());
|
|
|
+
|
|
|
+ wrapper.keyword(dto.getKeyword(),
|
|
|
+ new SqlField(CostControl::getCode),
|
|
|
+ new SqlField(CostControl::getVoucherNo)
|
|
|
+ );
|
|
|
+
|
|
|
+ //权限过滤 自己看自己
|
|
|
+ wrapper.eq("cc", CostControl::getCreateUser, SecurityUtils.getUserId());
|
|
|
+
|
|
|
wrapper.orderByDesc("cc", CostControl::getId);
|
|
|
Page<CostControlVo> page = this.baseMapper.getPage(dto.getPage(), wrapper);
|
|
|
List<CostControlVo> records = page.getRecords();
|