Commit 7615b40d authored by 周昊's avatar 周昊

1、修改项目列表接口分页

parent 7b8072c2
...@@ -10,6 +10,7 @@ import com.ruoyi.common.core.domain.R; ...@@ -10,6 +10,7 @@ import com.ruoyi.common.core.domain.R;
import com.ruoyi.common.core.domain.entity.SysDept; import com.ruoyi.common.core.domain.entity.SysDept;
import com.ruoyi.common.core.domain.entity.SysDictData; import com.ruoyi.common.core.domain.entity.SysDictData;
import com.ruoyi.common.core.domain.entity.SysUser; import com.ruoyi.common.core.domain.entity.SysUser;
import com.ruoyi.common.core.page.TableDataInfo;
import com.ruoyi.system.service.ISysDeptService; import com.ruoyi.system.service.ISysDeptService;
import com.ruoyi.system.service.ISysDictDataService; import com.ruoyi.system.service.ISysDictDataService;
import com.ruoyi.system.service.ISysUploadFileService; import com.ruoyi.system.service.ISysUploadFileService;
...@@ -93,10 +94,11 @@ public class RiskPlanAppController extends BaseController { ...@@ -93,10 +94,11 @@ public class RiskPlanAppController extends BaseController {
* @real_return {@link R<List<LedgerProject>>} * @real_return {@link R<List<LedgerProject>>}
*/ */
@GetMapping("/project/list") @GetMapping("/project/list")
public R<List<LedgerProject>> getProjectList(LedgerProject ledgerProject) { public TableDataInfo getProjectList(LedgerProject ledgerProject) {
//添加自身及以下部门筛选 //添加自身及以下部门筛选
ledgerProject.setDeptId(getLoginUser().getDeptId()); ledgerProject.setDeptId(getLoginUser().getDeptId());
return R.ok(ledgerProjectService.getProjectListByDeptId(ledgerProject)); startPage();
return getDataTable(ledgerProjectService.getProjectListByDeptId(ledgerProject));
} }
/** /**
......
...@@ -61,7 +61,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" ...@@ -61,7 +61,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
WHERE WHERE
( lp.dept_id IN ( SELECT dept_id FROM sys_dept WHERE dept_id = #{deptId} OR find_in_set( #{deptId}, ancestors ) ) ) ( lp.dept_id IN ( SELECT dept_id FROM sys_dept WHERE dept_id = #{deptId} OR find_in_set( #{deptId}, ancestors ) ) )
AND lp.STATUS = '0' AND lp.del_flag = '0' AND lp.STATUS = '0' AND lp.del_flag = '0'
<if test="name != null and name != ''"> and lp.name like concat('%', #{name}, '%')</if>
</select> </select>
<insert id="insertLedgerProject" parameterType="com.censoft.censoftrongtong.domain.LedgerProject" useGeneratedKeys="true" keyProperty="id"> <insert id="insertLedgerProject" parameterType="com.censoft.censoftrongtong.domain.LedgerProject" useGeneratedKeys="true" keyProperty="id">
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment