bluejay
2025-04-09 ee5fac6d743c3e9e2ddd2b9ce0407b9731a2c3c7
调整list查询接口,进行数据字典的转义
已修改4个文件
49 ■■■■■ 文件已修改
aps-modules/aps-core/src/main/java/com/aps/core/controller/ApsGasPipingPlanController.java 14 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
aps-modules/aps-core/src/main/java/com/aps/core/controller/ApsPartPlanController.java 15 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
aps-modules/aps-core/src/main/java/com/aps/core/controller/ApsPlatePlanController.java 16 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
aps-modules/aps-core/src/main/resources/mapper/core/ApsPartPlanMapper.xml 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
aps-modules/aps-core/src/main/java/com/aps/core/controller/ApsGasPipingPlanController.java
@@ -54,6 +54,20 @@
    {
//        startPage();
        List<ApsGasPipingPlan> list = apsGasPipingPlanService.selectApsGasPipingPlanList(apsGasPipingPlan);
        List<SysDictData> suspendedDic = DictUtils.getDictCache("aps_is_suspended");
        List<SysDictData> businessTypeDic = DictUtils.getDictCache("aps_business_type");
        List<SysDictData> documentStatusDic = DictUtils.getDictCache("aps_document_status");
        List<SysDictData> accountDic = DictUtils.getDictCache("aps_account");
        list.parallelStream().forEach(plan->{
            documentStatusDic.stream().filter(x -> x.getDictValue().equals( plan.getDocumentStatus().trim()))
                    .findFirst().ifPresent(sysDictData -> plan.setDocumentStatus(sysDictData.getDictLabel()));
            accountDic.stream().filter(x -> x.getDictValue().equals( plan.getAccount().trim()))
                    .findFirst().ifPresent(sysDictData -> plan.setAccount(sysDictData.getDictLabel()));
            businessTypeDic.stream().filter(x -> x.getDictValue().equals(plan.getBusinessType().trim()))
                    .findFirst().ifPresent(sysDictData -> plan.setBusinessType(sysDictData.getDictLabel()));
            suspendedDic.stream().filter(x -> x.getDictValue().equals( plan.getIsSuspended()))
                    .findFirst().ifPresent(sysDictData -> plan.setIsSuspended(sysDictData.getDictLabel()));
        });
        return getDataTable(list);
    }
aps-modules/aps-core/src/main/java/com/aps/core/controller/ApsPartPlanController.java
@@ -45,6 +45,21 @@
    public TableDataInfo list(ApsPartPlan apsPartPlan) {
//        startPage();
        List<ApsPartPlan> list = apsPartPlanService.selectApsPartPlanList(apsPartPlan);
        List<SysDictData> suspendedDic = DictUtils.getDictCache("aps_is_suspended");
        List<SysDictData> businessTypeDic = DictUtils.getDictCache("aps_business_type");
        List<SysDictData> documentStatusDic = DictUtils.getDictCache("aps_document_status");
        List<SysDictData> accountDic = DictUtils.getDictCache("aps_account");
        list.parallelStream().forEach(plan->{
             documentStatusDic.stream().filter(x -> x.getDictValue().equals( plan.getDocumentStatus().trim()))
                     .findFirst().ifPresent(sysDictData -> plan.setDocumentStatus(sysDictData.getDictLabel()));
             accountDic.stream().filter(x -> x.getDictValue().equals( plan.getAccount().trim()))
                     .findFirst().ifPresent(sysDictData -> plan.setAccount(sysDictData.getDictLabel()));
             businessTypeDic.stream().filter(x -> x.getDictValue().equals(plan.getBusinessType().trim()))
                     .findFirst().ifPresent(sysDictData -> plan.setBusinessType(sysDictData.getDictLabel()));
             suspendedDic.stream().filter(x -> x.getDictValue().equals( plan.getIsSuspended()))
                     .findFirst().ifPresent(sysDictData -> plan.setIsSuspended(sysDictData.getDictLabel()));
        });
        return getDataTable(list);
    }
aps-modules/aps-core/src/main/java/com/aps/core/controller/ApsPlatePlanController.java
@@ -39,8 +39,22 @@
    @RequiresPermissions("ApsPlatePlan:ApsPlatePlan:list")
    @GetMapping("/list")
    public TableDataInfo list(ApsPlatePlan apsPlatePlan) {
        startPage();
        //startPage();
        List<ApsPlatePlan> list = apsPlatePlanService.selectApsPlatePlanList(apsPlatePlan);
        List<SysDictData> suspendedDic = DictUtils.getDictCache("aps_is_suspended");
        List<SysDictData> businessTypeDic = DictUtils.getDictCache("aps_business_type");
        List<SysDictData> documentStatusDic = DictUtils.getDictCache("aps_document_status");
        List<SysDictData> accountDic = DictUtils.getDictCache("aps_account");
        list.parallelStream().forEach(plan->{
            documentStatusDic.stream().filter(x -> x.getDictValue().equals( plan.getDocumentStatus().trim()))
                    .findFirst().ifPresent(sysDictData -> plan.setDocumentStatus(sysDictData.getDictLabel()));
            accountDic.stream().filter(x -> x.getDictValue().equals( plan.getAccount().trim()))
                    .findFirst().ifPresent(sysDictData -> plan.setAccount(sysDictData.getDictLabel()));
            businessTypeDic.stream().filter(x -> x.getDictValue().equals(plan.getBusinessType().trim()))
                    .findFirst().ifPresent(sysDictData -> plan.setBusinessType(sysDictData.getDictLabel()));
            suspendedDic.stream().filter(x -> x.getDictValue().equals( plan.getIsSuspended()))
                    .findFirst().ifPresent(sysDictData -> plan.setIsSuspended(sysDictData.getDictLabel()));
        });
        return getDataTable(list);
    }
aps-modules/aps-core/src/main/resources/mapper/core/ApsPartPlanMapper.xml
@@ -54,9 +54,9 @@
            <if test="weekCycle != null  and weekCycle != ''"> and week_cycle = #{weekCycle}</if>
            <if test="mainPartNumber != null  and mainPartNumber != ''"> and main_part_number = #{mainPartNumber}</if>
            <if test="mainPartDrawingNumber != null  and mainPartDrawingNumber != ''"> and main_part_drawing_number = #{mainPartDrawingNumber}</if>
            <if test="customer != null  and customer != ''"> and customer like concat('%', #{customer}, '%')</if>
            <if test="customer != null  and customer != ''">  and customer like  '%' || #{customer} || '%'  </if>
            <if test="businessType != null  and businessType != ''"> and business_type = #{businessType}</if>
            <if test="documentNumber != null  and documentNumber != ''"> and document_number = #{documentNumber}</if>
            <if test="documentNumber != null  and documentNumber != ''"> and document_number  like  '%' || #{documentNumber} || '%'</if>
            <if test="requirementType != null  and requirementType != ''"> and requirement_type = #{requirementType}</if>
            <if test="documentStatus != null  and documentStatus != ''"> and document_status = #{documentStatus}</if>
            <if test="itemNumber != null  and itemNumber != ''"> and item_number = #{itemNumber}</if>