Selaa lähdekoodia

巡检相关查询修改

丁治程 1 vuosi sitten
vanhempi
commit
fd959a0ef8

+ 1 - 0
module_cmms/src/main/java/org/jeecg/modules/cmmsInspect/entity/CmmsInspect.java

@@ -71,6 +71,7 @@ public class CmmsInspect implements Serializable {
 	/**状态:0待处理、1处理中、2已完成*/
 	@Excel(name = "状态:0待处理、1处理中、2已完成", width = 15)
     @ApiModelProperty(value = "状态:0待处理、1处理中、2已完成")
+    @Dict(dicCode = "inspect_order_status")
     private java.lang.String status;
 	/**巡检细项*/
 	@Excel(name = "巡检细项", width = 15)

+ 2 - 1
module_cmms/src/main/java/org/jeecg/modules/cmmsInspectContent/mapper/xml/CmmsInspectContentMapper.xml

@@ -25,7 +25,8 @@
         from cmms_inspect_content as c
         left join tpm_equipment as e on c.equipmentid = e.id
         <where>
-            <if test="cmmsInspectContent.contentname != null  and cmmsInspectContent.contentname != ''"> and (c.contentcode like concat('%', #{cmmsInspectContent.contentname}, '%') or c.contentname like concat('%', #{cmmsInspectContent.contentname}, '%'))</if>
+            <if test="cmmsInspectContent.contentname != null  and cmmsInspectContent.contentname != ''"> and c.contentname like concat('%', #{cmmsInspectContent.contentname}, '%')</if>
+            <if test="cmmsInspectContent.contentcode != null  and cmmsInspectContent.contentcode != ''"> and c.contentcode like concat('%', #{cmmsInspectContent.contentcode}, '%')</if>
             <if test="cmmsInspectContent.equipmentid != null "> and c.equipmentid = #{cmmsInspectContent.equipmentid}</if>
             <if test="cmmsInspectContent.status != null "> and c.status = #{cmmsInspectContent.status}</if>
         </where>

+ 1 - 0
module_cmms/src/main/java/org/jeecg/modules/cmmsInspectItem/mapper/xml/CmmsInspectItemMapper.xml

@@ -34,6 +34,7 @@
         left join tpm_equipment_tree as t
         on c.equipdefid = t.id
         <where>
+            <if test="cmmsInspectItem.itemname != null  and cmmsInspectItem.itemname != ''"> and c.itemname like concat('%', #{cmmsInspectItem.itemname}, '%')</if>
             <if test="cmmsInspectItem.itemcode != null  and cmmsInspectItem.itemcode != ''"> and (c.itemcode like concat('%', #{cmmsInspectItem.itemcode}, '%') or c.itemname like concat('%', #{cmmsInspectItem.itemcode}, '%'))</if>
             <if test="cmmsInspectItem.equipdefid != null "> and c.equipdefid = #{cmmsInspectItem.equipdefid}</if>
             <if test="cmmsInspectItem.classification != null "> and c.classification = #{cmmsInspectItem.classification}</if>

+ 8 - 0
module_cmms/src/main/java/org/jeecg/modules/cmmsInspectPlan/controller/CmmsInspectPlanController.java

@@ -9,6 +9,8 @@ import java.io.UnsupportedEncodingException;
 import java.net.URLDecoder;
 import javax.servlet.http.HttpServletRequest;
 import javax.servlet.http.HttpServletResponse;
+
+import cn.hutool.core.util.ObjectUtil;
 import org.jeecg.common.api.vo.Result;
 import org.jeecg.common.system.query.QueryGenerator;
 import org.jeecg.common.util.oConvertUtils;
@@ -69,6 +71,12 @@ public class CmmsInspectPlanController extends JeecgController<CmmsInspectPlan,
 								   HttpServletRequest req) {
 		QueryWrapper<CmmsInspectPlan> queryWrapper = QueryGenerator.initQueryWrapper(cmmsInspectPlan, req.getParameterMap());
 		Page<CmmsInspectPlan> page = new Page<CmmsInspectPlan>(pageNo, pageSize);
+		if(ObjectUtil.isNotNull(cmmsInspectPlan.getPlanname())){
+			QueryWrapper<CmmsInspectPlan> query = new QueryWrapper<>();
+			query.like("planname",cmmsInspectPlan.getPlanname()).orderByDesc("create_time");
+			IPage<CmmsInspectPlan> page1 = cmmsInspectPlanService.page(page, query);
+			return Result.OK(page1);
+		}
 		IPage<CmmsInspectPlan> pageList = cmmsInspectPlanService.page(page, queryWrapper);
 		return Result.OK(pageList);
 	}

+ 2 - 1
module_cmms/src/main/java/org/jeecg/modules/cmmsInspectSpot/mapper/xml/CmmsInspectSpotMapper.xml

@@ -24,7 +24,8 @@
         left join tpm_equipment_tree as t
         on c.equipdefid = t.id
         <where>
-            <if test="cmmsInspectSpot.contentcode != null  and cmmsInspectSpot.contentcode != ''"> and (c.contentcode like concat('%', #{cmmsInspectSpot.contentcode}, '%') or c.contentname like concat('%', #{cmmsInspectSpot.contentcode}, '%'))</if>
+            <if test="cmmsInspectSpot.contentname != null  and cmmsInspectSpot.contentname != ''"> and c.contentname like concat('%', #{cmmsInspectSpot.contentname}, '%') </if>
+            <if test="cmmsInspectSpot.contentcode != null  and cmmsInspectSpot.contentcode != ''"> and c.contentcode like concat('%', #{cmmsInspectSpot.contentcode}, '%') </if>
             <if test="cmmsInspectSpot.equipdefid != null "> and c.equipdefid = #{cmmsInspectSpot.equipdefid}</if>
             <if test="cmmsInspectSpot.status != null "> and c.status = #{cmmsInspectSpot.status}</if>
         </where>

+ 1 - 0
module_cmms/src/main/java/org/jeecg/modules/cmmsOrderNode/entity/CmmsOrderNode.java

@@ -59,6 +59,7 @@ public class CmmsOrderNode implements Serializable {
 	/**操作节点名称*/
 	@Excel(name = "操作节点名称", width = 15)
     @ApiModelProperty(value = "操作节点名称")
+    @Dict(dicCode = "repair_order_status")
     private java.lang.String nodename;
 	/**工单ID*/
 	@Excel(name = "工单ID", width = 15)