From cbee22eb13262742e2c3dd4c2746cf2f8a4cf96b Mon Sep 17 00:00:00 2001 From: zhuo <2089219845@qq.com> Date: 星期三, 12 三月 2025 13:29:25 +0800 Subject: [PATCH] 修改列表排序 --- basic-server/src/main/resources/mapper/StandardTreeMapper.xml | 2 ++ inspect-server/src/main/java/com/ruoyi/inspect/controller/InsReportController.java | 2 ++ inspect-server/src/main/resources/mapper/InsOrderRatesMapper.xml | 20 +++++++++++--------- inspect-server/src/main/resources/mapper/InsUnqualifiedHandlerMapper.xml | 1 + inspect-server/src/main/resources/mapper/InsReportMapper.xml | 2 +- inspect-server/src/main/resources/mapper/InsSampleMapper.xml | 2 +- 6 files changed, 18 insertions(+), 11 deletions(-) diff --git a/basic-server/src/main/resources/mapper/StandardTreeMapper.xml b/basic-server/src/main/resources/mapper/StandardTreeMapper.xml index 7eafed8..ded9337 100644 --- a/basic-server/src/main/resources/mapper/StandardTreeMapper.xml +++ b/basic-server/src/main/resources/mapper/StandardTreeMapper.xml @@ -322,6 +322,7 @@ <if test="ew.customSqlSegment != null and ew.customSqlSegment != ''"> ${ew.customSqlSegment} </if> + order by send_time desc </select> <select id="selectIfsPage" resultType="com.ruoyi.basic.pojo.IfsInventoryQuantity"> @@ -348,6 +349,7 @@ <if test="ew.customSqlSegment != null and ew.customSqlSegment != ''"> ${ew.customSqlSegment} </if> + order by send_time desc </select> <select id="getIfsByOverList" resultType="com.ruoyi.basic.dto.IfsInventoryQuantitySupplierDto"> select * from (<include refid="getIfsOrder"/> diff --git a/inspect-server/src/main/java/com/ruoyi/inspect/controller/InsReportController.java b/inspect-server/src/main/java/com/ruoyi/inspect/controller/InsReportController.java index 8ea68ab..d3befef 100644 --- a/inspect-server/src/main/java/com/ruoyi/inspect/controller/InsReportController.java +++ b/inspect-server/src/main/java/com/ruoyi/inspect/controller/InsReportController.java @@ -4,6 +4,7 @@ import cn.hutool.http.HttpUtil; import com.alibaba.fastjson.JSONObject; import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import com.ruoyi.common.annotation.Anonymous; import com.ruoyi.common.core.domain.Result; import com.ruoyi.framework.exception.ErrorException; import com.ruoyi.inspect.dto.ReportPageDto; @@ -108,6 +109,7 @@ return Result.success(insReportService.ratifyReport(id, isRatify, ratifyTell)); } + @Anonymous @RequestMapping("/onlyOffice/save") public void saveFile(@RequestParam String fileName, HttpServletRequest request, HttpServletResponse response) { PrintWriter writer = null; diff --git a/inspect-server/src/main/resources/mapper/InsOrderRatesMapper.xml b/inspect-server/src/main/resources/mapper/InsOrderRatesMapper.xml index 68c5a1b..f025537 100644 --- a/inspect-server/src/main/resources/mapper/InsOrderRatesMapper.xml +++ b/inspect-server/src/main/resources/mapper/InsOrderRatesMapper.xml @@ -5,15 +5,17 @@ <select id="selectInsOrderRates" resultType="com.ruoyi.inspect.dto.SampleOrderDto"> select * from (select io.*, - case - when - io.type_source = 0 - then io.sample_view - else io.sample end sampleStr, - GROUP_CONCAT(DISTINCT isa.model SEPARATOR ' ') AS sample_model - from ins_order io - LEFT JOIN ins_sample isa ON isa.ins_order_id = io.id - group by io.id) a + case + when + io.type_source = 0 + then io.sample_view + else io.sample end sampleStr, + GROUP_CONCAT(DISTINCT isa.model SEPARATOR ' ') AS sample_model + from ins_order io + LEFT JOIN ins_sample isa ON isa.ins_order_id = io.id + left join ins_order_rates ior on ior.ins_order_id = io.id + where ior.id is not null + group by io.id) a <if test="ew.customSqlSegment != null and ew.customSqlSegment != ''"> ${ew.customSqlSegment} </if> diff --git a/inspect-server/src/main/resources/mapper/InsReportMapper.xml b/inspect-server/src/main/resources/mapper/InsReportMapper.xml index 7ff92ff..f4b741e 100644 --- a/inspect-server/src/main/resources/mapper/InsReportMapper.xml +++ b/inspect-server/src/main/resources/mapper/InsReportMapper.xml @@ -54,7 +54,7 @@ <if test="ew.customSqlSegment != null and ew.customSqlSegment != ''"> ${ew.customSqlSegment} </if> - ORDER BY a.code DESC + ORDER BY a.create_time DESC </select> <select id="getLaboratoryByName" resultType="java.lang.String"> select s.address from seal s diff --git a/inspect-server/src/main/resources/mapper/InsSampleMapper.xml b/inspect-server/src/main/resources/mapper/InsSampleMapper.xml index e80e958..84af8bb 100644 --- a/inspect-server/src/main/resources/mapper/InsSampleMapper.xml +++ b/inspect-server/src/main/resources/mapper/InsSampleMapper.xml @@ -250,7 +250,7 @@ <if test="ew.customSqlSegment != null and ew.customSqlSegment != ''"> ${ew.customSqlSegment} </if> - ORDER BY A.ins_time DESC + ORDER BY send_time asc </select> <select id="inspectionOrderDetailsTaskSwitching" resultType="com.ruoyi.inspect.vo.InsOrderPlanTaskSwitchVo"> diff --git a/inspect-server/src/main/resources/mapper/InsUnqualifiedHandlerMapper.xml b/inspect-server/src/main/resources/mapper/InsUnqualifiedHandlerMapper.xml index fdeb4af..c91b2c0 100644 --- a/inspect-server/src/main/resources/mapper/InsUnqualifiedHandlerMapper.xml +++ b/inspect-server/src/main/resources/mapper/InsUnqualifiedHandlerMapper.xml @@ -40,6 +40,7 @@ <if test="ew.customSqlSegment != null and ew.customSqlSegment != ''"> ${ew.customSqlSegment} </if> + order by id desc </select> <select id="findById" resultType="com.ruoyi.inspect.vo.UnqualifiedHandlerVO"> select * from (select -- Gitblit v1.9.3