From 34767d1efb3589591db535110e72310b21f863b5 Mon Sep 17 00:00:00 2001 From: lyh <925863403@qq.com> Date: 星期四, 03 四月 2025 11:38:08 +0800 Subject: [PATCH] 修改sql --- lxzn-module-eam/src/main/java/org/jeecg/modules/eam/entity/EamMaintenanceStandard.java | 6 ++ lxzn-module-eam/src/main/java/org/jeecg/modules/eam/mapper/xml/EamMaintenanceStandardMapper.xml | 38 ++++++++++-------- lxzn-module-eam/src/main/java/org/jeecg/modules/eam/entity/EamInspectionOrderDetail.java | 25 ++++++------ 3 files changed, 38 insertions(+), 31 deletions(-) diff --git a/lxzn-module-eam/src/main/java/org/jeecg/modules/eam/entity/EamInspectionOrderDetail.java b/lxzn-module-eam/src/main/java/org/jeecg/modules/eam/entity/EamInspectionOrderDetail.java index 6b3be7f..06b9397 100644 --- a/lxzn-module-eam/src/main/java/org/jeecg/modules/eam/entity/EamInspectionOrderDetail.java +++ b/lxzn-module-eam/src/main/java/org/jeecg/modules/eam/entity/EamInspectionOrderDetail.java @@ -2,7 +2,6 @@ import com.baomidou.mybatisplus.annotation.IdType; import com.baomidou.mybatisplus.annotation.TableId; -import com.baomidou.mybatisplus.annotation.TableLogic; import com.baomidou.mybatisplus.annotation.TableName; import com.fasterxml.jackson.annotation.JsonFormat; import io.swagger.annotations.ApiModel; @@ -50,19 +49,10 @@ @DateTimeFormat(pattern="yyyy-MM-dd") @ApiModelProperty(value = "鏇存柊鏃堕棿") private Date updateTime; - /**鍒犻櫎鏍囪*/ - @Excel(name = "鍒犻櫎鏍囪", width = 15) - @ApiModelProperty(value = "鍒犻櫎鏍囪") - @TableLogic - private Integer delFlag; /**宸ュ崟ID*/ @Excel(name = "宸ュ崟ID", width = 15) @ApiModelProperty(value = "宸ュ崟ID") private String orderId; - /**鐐规椤笽D*/ - @Excel(name = "鐐规椤笽D", width = 15) - @ApiModelProperty(value = "鐐规椤笽D") - private String itemId; /**鐐规缁撴灉*/ @Excel(name = "鐐规缁撴灉", width = 15) @ApiModelProperty(value = "鐐规缁撴灉-姝e父-寮傚父") @@ -72,8 +62,17 @@ @ApiModelProperty(value = "寮傚父鎻忚堪") private String exceptionDescription; /**寮傚父鏄惁淇濅慨*/ - @Excel(name = "寮傚父鏄惁淇濅慨", width = 15) - @ApiModelProperty(value = "寮傚父鏄惁淇濅慨") - private String whetherWarranty; + @Excel(name = "寮傚父鏄惁鎶ヤ慨", width = 15) + @ApiModelProperty(value = "寮傚父鏄惁鎶ヤ慨") + private String reportFlag; + /**淇濆吇椤瑰簭鍙�*/ + @ApiModelProperty(value = "淇濆吇椤瑰簭鍙�") + private Integer itemCode; + /**淇濆吇椤�*/ + @ApiModelProperty(value = "淇濆吇椤�") + private String itemName; + /**淇濆吇瑕佹眰*/ + @ApiModelProperty(value = "淇濆吇瑕佹眰") + private String itemDemand; } diff --git a/lxzn-module-eam/src/main/java/org/jeecg/modules/eam/entity/EamMaintenanceStandard.java b/lxzn-module-eam/src/main/java/org/jeecg/modules/eam/entity/EamMaintenanceStandard.java index df1bbdb..37502c6 100644 --- a/lxzn-module-eam/src/main/java/org/jeecg/modules/eam/entity/EamMaintenanceStandard.java +++ b/lxzn-module-eam/src/main/java/org/jeecg/modules/eam/entity/EamMaintenanceStandard.java @@ -26,7 +26,7 @@ @Accessors(chain = true) @ApiModel(value="eam_maintenance_standard瀵硅薄", description="淇濆吇鏍囧噯") public class EamMaintenanceStandard implements Serializable { - + /**涓婚敭*/ @TableId(type = IdType.ASSIGN_ID) @ApiModelProperty(value = "涓婚敭") @@ -87,4 +87,8 @@ */ @ApiModelProperty(value = "鏈�鏂扮敓鎴愬伐鍗曟椂闂�") private Date lastGenerateTime; + + /**璁惧缂栧彿*/ + private transient String equipmentText; + } diff --git a/lxzn-module-eam/src/main/java/org/jeecg/modules/eam/mapper/xml/EamMaintenanceStandardMapper.xml b/lxzn-module-eam/src/main/java/org/jeecg/modules/eam/mapper/xml/EamMaintenanceStandardMapper.xml index 81f990b..d1e8ff0 100644 --- a/lxzn-module-eam/src/main/java/org/jeecg/modules/eam/mapper/xml/EamMaintenanceStandardMapper.xml +++ b/lxzn-module-eam/src/main/java/org/jeecg/modules/eam/mapper/xml/EamMaintenanceStandardMapper.xml @@ -4,27 +4,31 @@ <select id="queryListBykeywordAndCategory" resultType="org.jeecg.modules.eam.entity.EamMaintenanceStandard"> SELECT - m.* + e.equipment_code+ '[' + e.equipment_name+ ']' AS 'equipmentText', + m.id, + m.standard_code, + m.standard_name, + m.maintenance_period, + m.equipment_id FROM - eam_maintenance_standard m + eam_maintenance_standard m -- 鍏堣繃婊よ澶囪〃锛屽噺灏� JOIN 閲� + INNER JOIN ( + SELECT + id, + eam_equipment.equipment_code as equipment_code, + eam_equipment.equipment_name as equipment_name, + org_id + FROM + eam_equipment + WHERE + del_flag = 0 + AND ( equipment_code LIKE CONCAT ( #{ keyword }, '%' ) -- 鍙虫ā绯婂埄鐢ㄧ储寮� + OR equipment_name LIKE CONCAT ( #{ keyword }, '%' ) ) + ) e ON m.equipment_id = e.id WHERE m.del_flag = 0 AND m.standard_status= 'NORMAL' AND m.maintenance_category = #{maintenanceCategory} - AND EXISTS ( - SELECT 1 - FROM - eam_equipment e - INNER JOIN mdc_user_production t - ON t.user_id = #{userId} - AND t.pro_id = e.org_id -- 鍏宠仈鏉′欢绉诲埌JOIN涓� - WHERE - e.id = m.equipment_id - AND e.del_flag = 0 - AND ( - e.equipment_code LIKE CONCAT('%', #{keyword}, '%') - OR e.equipment_name LIKE CONCAT('%', #{keyword}, '%') - ) - ) + AND EXISTS ( SELECT 1 FROM mdc_user_production t WHERE t.user_id = #{ userId } AND t.pro_id = e.org_id ); </select> </mapper> -- Gitblit v1.9.3