Browse Source

v1.0模糊化查询

车车 5 months ago
parent
commit
91067c08a6
16 changed files with 88 additions and 4 deletions
  1. 3 0
      yudao-module-iscs/src/main/java/cn/iocoder/yudao/module/iscs/controller/admin/exceptionmisplace/vo/ExceptionMisplacePageReqVO.java
  2. 3 0
      yudao-module-iscs/src/main/java/cn/iocoder/yudao/module/iscs/controller/admin/hardware/vo/HardwarePageReqVO.java
  3. 3 0
      yudao-module-iscs/src/main/java/cn/iocoder/yudao/module/iscs/controller/admin/isolationpoint/vo/IsolationPointPageReqVO.java
  4. 3 0
      yudao-module-iscs/src/main/java/cn/iocoder/yudao/module/iscs/controller/admin/materials/vo/MaterialsPageReqVO.java
  5. 3 0
      yudao-module-iscs/src/main/java/cn/iocoder/yudao/module/iscs/controller/admin/materialschangerecord/vo/MaterialsChangeRecordPageReqVO.java
  6. 3 0
      yudao-module-iscs/src/main/java/cn/iocoder/yudao/module/iscs/controller/admin/materialscheckplan/vo/MaterialsCheckPlanPageReqVO.java
  7. 3 0
      yudao-module-iscs/src/main/java/cn/iocoder/yudao/module/iscs/controller/admin/materialscheckrecord/vo/MaterialsCheckRecordPageReqVO.java
  8. 2 0
      yudao-module-iscs/src/main/java/cn/iocoder/yudao/module/iscs/controller/admin/materialsloan/vo/MaterialsLoanPageReqVO.java
  9. 6 1
      yudao-module-iscs/src/main/java/cn/iocoder/yudao/module/iscs/dal/mysql/hardware/HardwareMapper.java
  10. 8 1
      yudao-module-iscs/src/main/resources/mapper/ExceptionMisplaceMapper.xml
  11. 8 0
      yudao-module-iscs/src/main/resources/mapper/IsolationPointMapper.xml
  12. 11 0
      yudao-module-iscs/src/main/resources/mapper/MaterialsChangeRecordMapper.xml
  13. 5 0
      yudao-module-iscs/src/main/resources/mapper/MaterialsCheckPlanMapper.xml
  14. 11 2
      yudao-module-iscs/src/main/resources/mapper/MaterialsCheckRecordMapper.xml
  15. 9 0
      yudao-module-iscs/src/main/resources/mapper/MaterialsLoanMapper.xml
  16. 7 0
      yudao-module-iscs/src/main/resources/mapper/MaterialsMapper.xml

+ 3 - 0
yudao-module-iscs/src/main/java/cn/iocoder/yudao/module/iscs/controller/admin/exceptionmisplace/vo/ExceptionMisplacePageReqVO.java

@@ -96,4 +96,7 @@ public class ExceptionMisplacePageReqVO extends PageParam {
     @Schema(description = "物资类型缩略图")
     private String materialsTypePicture;
 
+    @Schema(description = "key")
+    private String key;
+
 }

+ 3 - 0
yudao-module-iscs/src/main/java/cn/iocoder/yudao/module/iscs/controller/admin/hardware/vo/HardwarePageReqVO.java

@@ -79,4 +79,7 @@ public class HardwarePageReqVO extends PageParam {
     @Schema(description = "结束时间")
     private String endTime;
 
+    @Schema(description = "key")
+    private String key;
+
 }

+ 3 - 0
yudao-module-iscs/src/main/java/cn/iocoder/yudao/module/iscs/controller/admin/isolationpoint/vo/IsolationPointPageReqVO.java

@@ -79,4 +79,7 @@ public class IsolationPointPageReqVO extends PageParam {
     @Schema(description = "工艺id")
     private Long machineryId;
 
+    @Schema(description = "模糊查询")
+    private String key;
+
 }

+ 3 - 0
yudao-module-iscs/src/main/java/cn/iocoder/yudao/module/iscs/controller/admin/materials/vo/MaterialsPageReqVO.java

@@ -80,4 +80,7 @@ public class MaterialsPageReqVO extends PageParam {
     @Schema(description = "规格值")
     private String recordId;
 
+    @Schema(description = "key")
+    private String key;
+
 }

+ 3 - 0
yudao-module-iscs/src/main/java/cn/iocoder/yudao/module/iscs/controller/admin/materialschangerecord/vo/MaterialsChangeRecordPageReqVO.java

@@ -66,4 +66,7 @@ public class MaterialsChangeRecordPageReqVO extends PageParam {
     @Schema(description = "检查记录id")
     private Long recordId;
 
+    @Schema(description = "key")
+    private String key;
+
 }

+ 3 - 0
yudao-module-iscs/src/main/java/cn/iocoder/yudao/module/iscs/controller/admin/materialscheckplan/vo/MaterialsCheckPlanPageReqVO.java

@@ -49,4 +49,7 @@ public class MaterialsCheckPlanPageReqVO extends PageParam {
     @Schema(description = "状态")
     private String status;
 
+    @Schema(description = "key")
+    private String key;
+
 }

+ 3 - 0
yudao-module-iscs/src/main/java/cn/iocoder/yudao/module/iscs/controller/admin/materialscheckrecord/vo/MaterialsCheckRecordPageReqVO.java

@@ -66,4 +66,7 @@ public class MaterialsCheckRecordPageReqVO extends PageParam {
     @Schema(description = "endTime")
     private String endTime;
 
+    @Schema(description = "key")
+    private String key;
+
 }

+ 2 - 0
yudao-module-iscs/src/main/java/cn/iocoder/yudao/module/iscs/controller/admin/materialsloan/vo/MaterialsLoanPageReqVO.java

@@ -82,5 +82,7 @@ public class MaterialsLoanPageReqVO extends PageParam {
     @Schema(description = "归还结束时间")
     private String restitutionTimeEnd;
 
+    @Schema(description = "key")
+    private String key;
 
 }

+ 6 - 1
yudao-module-iscs/src/main/java/cn/iocoder/yudao/module/iscs/dal/mysql/hardware/HardwareMapper.java

@@ -38,7 +38,12 @@ public interface HardwareMapper extends BaseMapperX<HardwareDO> {
                 .eqIfPresent(HardwareDO::getRemark, reqVO.getRemark())
                 .ge(StringUtils.isNotBlank(reqVO.getStartTime()), HardwareDO::getCreateTime, reqVO.getStartTime())
                 .le(StringUtils.isNotBlank(reqVO.getEndTime()), HardwareDO::getCreateTime, reqVO.getEndTime())
-                // .betweenIfPresent(HardwareDO::getCreateTime, reqVO.getCreateTime())
+                .and(StringUtils.isNotBlank(reqVO.getKey()), o -> o.like(HardwareDO::getHardwareName, reqVO.getKey())
+                        .or().like(HardwareDO::getHardwareSpec, reqVO.getKey())
+                        .or().like(HardwareDO::getHardwareTypeName, reqVO.getKey())
+                        .or().like(HardwareDO::getAvailableTimes, reqVO.getAvailableTimes())
+                        .or().like(HardwareDO::getUsedTimes, reqVO.getUsedTimes())
+                        .or().like(HardwareDO::getSerialNumber, reqVO.getSerialNumber()))
                 .orderByDesc(HardwareDO::getId));
     }
 

+ 8 - 1
yudao-module-iscs/src/main/resources/mapper/ExceptionMisplaceMapper.xml

@@ -52,10 +52,17 @@
             <if test="vo.exceptionType != null and vo.exceptionType.trim != ''">
                 and e.exception_type = #{vo.exceptionType}
             </if>
+            <if test="vo.key != null and vo.key.trim != ''">
+                and (
+                m.materials_name like concat('%',#{vo.key},'%') or
+                c1.cabinet_name like concat('%',#{vo.key},'%') or
+                c2.cabinet_name like concat('%',#{vo.key},'%') or
+                u.nickname like concat('%',#{vo.key},'%')
+                )
+            </if>
         </where>
         order by e.id desc
 
 
-
     </select>
 </mapper>

+ 8 - 0
yudao-module-iscs/src/main/resources/mapper/IsolationPointMapper.xml

@@ -85,6 +85,14 @@
             <if test="vo.lotoId != null and vo.lotoId == 0">
                 and p.loto_id is null
             </if>
+            <if test="vo.key != null and vo.key.trim != ''">
+                and (p.point_code like concat('%',#{vo.key},'%') or
+                p.point_name like concat('%',#{vo.key},'%') or
+                w.workstation_name like concat('%',#{vo.key},'%') or
+                s.loto_name like concat('%',#{vo.key},'%') or
+                l.lock_type_name like concat('%',#{vo.key},'%')
+                )
+            </if>
         </where>
         group by p.id
         order by p.id desc

+ 11 - 0
yudao-module-iscs/src/main/resources/mapper/MaterialsChangeRecordMapper.xml

@@ -63,6 +63,17 @@
             <if test="vo.newMaterialsRfid != null and vo.newMaterialsRfid.trim != ''">
                 and c.new_materials_rfid like concat('%',#{vo.newMaterialsRfid},'%')
             </if>
+            <if test="vo.key != null and vo.key.trim != ''">
+                and (
+                c.old_materials_rfid like concat('%',#{vo.newMaterialsRfid},'%') or
+                c.new_materials_rfid like concat('%',#{vo.newMaterialsRfid},'%') or
+                t.materials_type_name like concat('%',#{vo.newMaterialsRfid},'%') or
+                u.nickname like concat('%',#{vo.newMaterialsRfid},'%') or
+                mc.cabinet_name like concat('%',#{vo.newMaterialsRfid},'%') or
+                m.materials_name like concat('%',#{vo.newMaterialsRfid},'%') or
+                m2.materials_name like concat('%',#{vo.newMaterialsRfid},'%')
+                )
+            </if>
         </where>
         order by c.id desc
     </select>

+ 5 - 0
yudao-module-iscs/src/main/resources/mapper/MaterialsCheckPlanMapper.xml

@@ -37,6 +37,11 @@
             <if test="vo.planName != null and vo.planName.trim != ''">
                 and p.plan_name like concat('%',#{vo.planName},'%')
             </if>
+            <if test="vo.key != null and vo.key.trim != ''">
+                and (p.plan_name like concat('%',#{vo.key},'%') or
+                u.nickname like concat('%',#{vo.key},'%')
+                )
+            </if>
         </where>
         group by p.id
         order by p.id desc

+ 11 - 2
yudao-module-iscs/src/main/resources/mapper/MaterialsCheckRecordMapper.xml

@@ -60,11 +60,20 @@
             <if test="vo.reason != null and vo.reason.trim != ''">
                 and r.reason = #{vo.reason}
             </if>
+            <if test="vo.key != null and vo.key.trim != ''">
+                and (
+                p.plan_name like concat('%',#{vo.key},'%') or
+                m.materials_name like concat('%',#{vo.key},'%') or
+                t.materials_type_name like concat('%',#{vo.key},'%') or
+                m.materials_rfid like concat('%',#{vo.key},'%') or
+                mc.cabinet_name like concat('%',#{vo.key},'%') or
+                u.nickname like concat('%',#{vo.key},'%') or
+                r.reason like concat('%',#{vo.key},'%')
+                )
+            </if>
         </where>
         order by r.id desc
 
-
-
     </select>
     <select id="getCheckMaterialsByCabinetCode"
             resultType="cn.iocoder.yudao.module.iscs.dal.dataobject.materialscheckrecord.MaterialsCheckRecordDO">

+ 9 - 0
yudao-module-iscs/src/main/resources/mapper/MaterialsLoanMapper.xml

@@ -81,6 +81,15 @@
             <if test="vo.status != null and vo.status.trim != ''">
                 and l.status = #{vo.status}
             </if>
+            <if test="vo.key != null and vo.key.trim != ''">
+                and (c1.cabinet_name like concat('%',#{vo.loanUserName},'%') or
+                c2.cabinet_name like concat('%',#{vo.loanUserName},'%') or
+                m.materials_name like concat('%',#{vo.loanUserName},'%') or
+                mt.materials_type_name like concat('%',#{vo.loanUserName},'%') or
+                u.username like concat('%',#{vo.loanUserName},'%') or
+                u1.username like concat('%',#{vo.loanUserName},'%')
+                )
+            </if>
         </where>
         ORDER BY l.id DESC
     </select>

+ 7 - 0
yudao-module-iscs/src/main/resources/mapper/MaterialsMapper.xml

@@ -68,6 +68,13 @@
             <if test="vo.recordId != null and vo.recordId.trim != ''">
                 and m.properties like concat('%',#{vo.recordId},'%')
             </if>
+            <if test="vo.key != null and vo.key.trim != ''">
+                and (c.cabinet_name like concat('%',#{vo.key},'%') or
+                m.materials_name like concat('%',#{vo.key},'%') or
+                m.properties like concat('%',#{vo.key},'%') or
+                m.materials_rfid like concat('%',#{vo.key},'%') or
+                m.supplier like concat('%',#{vo.key},'%'))
+            </if>
         </where>
         ORDER BY m.id DESC
     </select>