liusheng
5 天以前 fa2a9332b048f48be972efe02ef8b3e3334da591
分页处理
已修改5个文件
53 ■■■■■ 文件已修改
ruoyi-admin/src/main/java/com/ruoyi/web/controller/smartor/PatArchiveController.java 24 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-admin/src/main/resources/application-ls.yml 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
smartor/src/main/java/com/smartor/domain/PatArchiveReq.java 12 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
smartor/src/main/java/com/smartor/service/impl/PatArchiveServiceImpl.java 7 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
smartor/src/main/resources/mapper/smartor/PatArchiveMapper.xml 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-admin/src/main/java/com/ruoyi/web/controller/smartor/PatArchiveController.java
@@ -78,16 +78,16 @@
        return success(patArchiveService.selectPatArchiveByPatid(patid));
    }
//    /**
//     * 新增患者档案
//     */
//    @ApiOperation("新增患者档案")
//    //@PreAuthorize("@ss.hasPermi('smartor:patarchive:add')")
//    @Log(title = "患者档案", businessType = BusinessType.INSERT)
//    @PostMapping("/add")
//    public AjaxResult add(@RequestBody PatArchive patArchive) {
//        return toAjax(patArchiveService.insertPatArchive(patArchive));
//    }
    /**
     * 新增患者档案
     */
    @ApiOperation("新增患者档案")
    //@PreAuthorize("@ss.hasPermi('smartor:patarchive:add')")
    @Log(title = "患者档案", businessType = BusinessType.INSERT)
    @PostMapping("/add")
    public AjaxResult add(@RequestBody PatArchive patArchive) {
        return toAjax(patArchiveService.insertPatArchive(patArchive));
    }
    /**
     * 新增患者档案
@@ -189,8 +189,8 @@
        long count = PageUtils.count(new ISelect() {
            @Override
            public void doSelect() {
                patArchive.setPageNum(null);
                patArchive.setPageSize(null);
                patArchive.setPn(null);
                patArchive.setPs(null);
                patArchiveService.patInfoByContion(patArchive);
            }
        });
ruoyi-admin/src/main/resources/application-ls.yml
@@ -11,7 +11,7 @@
        #        username: smartor
        #        password: Smartor.2023
        #        driverClassName: com.mysql.cj.jdbc.Driver
        url: jdbc:mysql://9.208.7.13:2883/smartor-lisui?useUnicode=true&characterEncoding=utf8&serverTimezone=Asia/Shanghai
        url: jdbc:mysql://9.208.7.13:2883/smartor-lisui?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
        username: root@sfxx#other_cluster
        password: Y5oapyS8
        driverClassName: com.mysql.cj.jdbc.Driver
@@ -111,7 +111,7 @@
pagehelper:
  helperDialect: mysql
  supportMethodsArguments: true
  params: count=countSql
#  params: countSql;pageSizeZero=true
magic-api:
  web: /magic/web
smartor/src/main/java/com/smartor/domain/PatArchiveReq.java
@@ -164,16 +164,16 @@
    /**
     * pageNum
     */
    @ApiModelProperty(value = "pageNum")
    @Excel(name = "pageNum")
    private Integer pageNum;
    @ApiModelProperty(value = "pn")
    @Excel(name = "pn")
    private Integer pn;
    /**
     * pageSize
     */
    @ApiModelProperty(value = "pageSize")
    @Excel(name = "pageSize")
    private Integer pageSize;
    @ApiModelProperty(value = "ps")
    @Excel(name = "ps")
    private Integer ps;
    /**
smartor/src/main/java/com/smartor/service/impl/PatArchiveServiceImpl.java
@@ -565,8 +565,11 @@
    @Override
    public List<PatArchive> patInfoByContion(PatArchiveReq patArchive) {
        List<PatArchive> patArchives = new ArrayList<>();
        if(ObjectUtils.isNotEmpty(patArchive.getPageNum())){
            patArchive.setPageNum(patArchive.getPageNum()*patArchive.getPageSize()-patArchive.getPageNum());
        if (ObjectUtils.isNotEmpty(patArchive.getPageNum()) && ObjectUtils.isNotEmpty(patArchive.getPageSize())) {
            patArchive.setPn(patArchive.getPageNum() * patArchive.getPageSize() - patArchive.getPageNum());
            patArchive.setPs(patArchive.getPageSize());
            patArchive.setPageNum(null);
            patArchive.setPageSize(null);
        }
        //根据条件获取患者信息
//        List<PatArchive> patArchiveList = patArchiveMapper.patInfoByContion(patArchive);
smartor/src/main/resources/mapper/smartor/PatArchiveMapper.xml
@@ -519,7 +519,7 @@
            </if>
        </where>
        order by a.update_time desc
        <if test="pageSize != null  and pageSize != ''"> limit ${pageNum},${pageSize} </if>
        <if test="pn != null  and ps != null"> limit ${pn},${ps} </if>
    </select>
@@ -661,6 +661,7 @@
            </if>
        </where>
        order by a.update_time desc
        <if test="pn != null  and ps != null"> limit ${pn},${ps} </if>
    </select>
    <select id="selectPatArchiveInfoByOuthosp" parameterType="com.smartor.domain.PatArchiveReq"
@@ -751,6 +752,7 @@
            </if>
        </where>
        order by a.update_time desc
        <if test="pn != null  and ps != null"> limit ${pn},${ps} </if>
    </select>
    <select id="selectPatArchiveInfoByPhysical" parameterType="com.smartor.domain.PatArchiveReq"
@@ -843,6 +845,7 @@
            </if>
        </where>
        order by a.update_time desc
        <if test="pn != null  and ps != null"> limit ${pn},${ps} </if>
    </select>
    <select id="selectPatArchiveInfoByInhospQC" parameterType="com.smartor.domain.PatArchiveReq"
@@ -987,6 +990,7 @@
            </if>
        </where>
        order by a.id,a.update_time desc ) as tmp order by endtime desc
        <if test="pn != null  and ps != null"> limit ${pn},${ps} </if>
    </select>
    <select id="selectPatArchiveInfoByOuthospQC" parameterType="com.smartor.domain.PatArchiveReq"