From f6cbe0df3276e5b75c7814d6315b1fd02e3878d5 Mon Sep 17 00:00:00 2001 From: zds <2388969634@qq.com> Date: Tue, 22 Oct 2024 10:30:52 +0800 Subject: [PATCH] =?UTF-8?q?opt:=E4=BC=98=E5=8C=96=E4=BF=AE=E6=94=B9?= =?UTF-8?q?=E8=BD=BD=E5=85=B7=E7=AE=A1=E7=90=86=E6=9F=A5=E8=AF=A2=E9=97=AE?= =?UTF-8?q?=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../dao/mapper/ClassStandardMapper.xml | 2 +- .../dao/mapper/StoragevehicleinfoMapper.xml | 12 ++---- .../service/dto/StoragevehicleinfoDto.java | 8 ---- .../impl/StoragevehicleinfoServiceImpl.java | 26 ++++--------- .../master/storagevehicleinfo/index.vue | 37 ++++--------------- 5 files changed, 21 insertions(+), 64 deletions(-) diff --git a/lms/nladmin-system/src/main/java/org/nl/wms/basedata/master/classstandard/service/dao/mapper/ClassStandardMapper.xml b/lms/nladmin-system/src/main/java/org/nl/wms/basedata/master/classstandard/service/dao/mapper/ClassStandardMapper.xml index ba46bd4..3deda26 100644 --- a/lms/nladmin-system/src/main/java/org/nl/wms/basedata/master/classstandard/service/dao/mapper/ClassStandardMapper.xml +++ b/lms/nladmin-system/src/main/java/org/nl/wms/basedata/master/classstandard/service/dao/mapper/ClassStandardMapper.xml @@ -10,7 +10,7 @@ t1.class_id, IF(find_in_set(parent_class_id, @pids) > 0, @pids := concat(@pids, ',', class_id), 0) AS ischild FROM ( - SELECT class_id, parent_class_id FROM md_pd_classstandard t WHERE t.is_delete = '0' ORDER BY class_code + SELECT class_id, parent_class_id FROM md_pb_classstandard t WHERE t.is_delete = '0' ORDER BY class_code ) t1, (SELECT @pids := #{classId}) t2 ) t3 diff --git a/lms/nladmin-system/src/main/java/org/nl/wms/basedata/master/storagevehicleinfo/service/dao/mapper/StoragevehicleinfoMapper.xml b/lms/nladmin-system/src/main/java/org/nl/wms/basedata/master/storagevehicleinfo/service/dao/mapper/StoragevehicleinfoMapper.xml index 0ac544a..3a460aa 100644 --- a/lms/nladmin-system/src/main/java/org/nl/wms/basedata/master/storagevehicleinfo/service/dao/mapper/StoragevehicleinfoMapper.xml +++ b/lms/nladmin-system/src/main/java/org/nl/wms/basedata/master/storagevehicleinfo/service/dao/mapper/StoragevehicleinfoMapper.xml @@ -20,30 +20,26 @@ (#{item.storagevehicle_code},#{item.storagevehicle_id},#{item.storagevehicle_name},#{item.storagevehicle_type},#{item.create_name},#{item.create_id},#{item.create_time},#{item.update_optid},#{item.update_time}) - SELECT s.*, ext.pcsn, ext.qty, ext.update_time AS change_time, - point.point_code, - point.point_name, class.class_name AS storagevehicle_type_name FROM md_pb_storagevehicleinfo s - LEFT JOIN sch_base_point point ON point.vehicle_code = s.storagevehicle_code LEFT JOIN md_pb_classstandard class ON class.class_code = s.storagevehicle_type - LEFT JOIN md_pb_storagevehicleext ext ON ext.storagevehicle_code = s.storagevehicle_code + LEFT JOIN md_pb_storagevehicleext ext ON ext.storagevehicle_id = s.storagevehicle_id WHERE 1=1 + and s.is_delete = '0' - s.storagevehicle_type in + and class.class_id in #{type} - and s.is_delete = '0' AND s.storagevehicle_code >= #{whereJson.storagevehicle_code_begin} diff --git a/lms/nladmin-system/src/main/java/org/nl/wms/basedata/master/storagevehicleinfo/service/dto/StoragevehicleinfoDto.java b/lms/nladmin-system/src/main/java/org/nl/wms/basedata/master/storagevehicleinfo/service/dto/StoragevehicleinfoDto.java index 7bb6528..1d468b1 100644 --- a/lms/nladmin-system/src/main/java/org/nl/wms/basedata/master/storagevehicleinfo/service/dto/StoragevehicleinfoDto.java +++ b/lms/nladmin-system/src/main/java/org/nl/wms/basedata/master/storagevehicleinfo/service/dto/StoragevehicleinfoDto.java @@ -50,14 +50,6 @@ public class StoragevehicleinfoDto implements Serializable { private String storagevehicle_type; private String storagevehicle_type_name; - - - private BigDecimal vehicle_width; - - private BigDecimal vehicle_long; - - private BigDecimal vehicle_height; - private String overstruct_type; private BigDecimal occupystruct_qty; diff --git a/lms/nladmin-system/src/main/java/org/nl/wms/basedata/master/storagevehicleinfo/service/impl/StoragevehicleinfoServiceImpl.java b/lms/nladmin-system/src/main/java/org/nl/wms/basedata/master/storagevehicleinfo/service/impl/StoragevehicleinfoServiceImpl.java index 6815dcf..5381c40 100644 --- a/lms/nladmin-system/src/main/java/org/nl/wms/basedata/master/storagevehicleinfo/service/impl/StoragevehicleinfoServiceImpl.java +++ b/lms/nladmin-system/src/main/java/org/nl/wms/basedata/master/storagevehicleinfo/service/impl/StoragevehicleinfoServiceImpl.java @@ -2,30 +2,23 @@ package org.nl.wms.basedata.master.storagevehicleinfo.service.impl; import cn.hutool.core.date.DateUtil; -import cn.hutool.core.map.MapUtil; import cn.hutool.core.util.IdUtil; import cn.hutool.core.util.ObjectUtil; import cn.hutool.core.util.StrUtil; -import com.alibaba.fastjson.JSON; import com.alibaba.fastjson.JSONArray; import com.alibaba.fastjson.JSONObject; import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.extension.plugins.pagination.Page; -import lombok.RequiredArgsConstructor; import lombok.extern.slf4j.Slf4j; import org.nl.common.domain.query.PageQuery; import org.nl.common.utils.CodeUtil; import org.nl.common.utils.SecurityUtils; import org.nl.modules.common.exception.BadRequestException; -import org.nl.modules.wql.WQL; -import org.nl.modules.wql.core.bean.WQLObject; -import org.nl.modules.wql.util.WqlUtil; import org.nl.system.service.coderule.impl.SysCodeRuleServiceImpl; -import org.nl.wms.basedata.master.sectattr.service.dao.Sectattr; -import org.nl.wms.basedata.master.standard.service.IClassStandardService; -import org.nl.wms.basedata.master.standard.service.dao.ClassStandard; -import org.nl.wms.basedata.master.standard.service.dao.mapper.ClassStandardMapper; +import org.nl.wms.basedata.master.classstandard.service.IClassStandardService; +import org.nl.wms.basedata.master.classstandard.service.dao.ClassStandard; +import org.nl.wms.basedata.master.classstandard.service.dao.mapper.ClassStandardMapper; import org.nl.wms.basedata.master.storagevehicleinfo.service.StoragevehicleinfoService; import org.nl.wms.basedata.master.storagevehicleinfo.service.dao.Storagevehicleex; import org.nl.wms.basedata.master.storagevehicleinfo.service.dao.Storagevehicleinfo; @@ -33,10 +26,8 @@ import org.nl.wms.basedata.master.storagevehicleinfo.service.dao.mapper.Storagev import org.nl.wms.basedata.master.storagevehicleinfo.service.dao.mapper.StoragevehicleinfoMapper; import org.nl.wms.basedata.master.storagevehicleinfo.service.dto.StoragevehicleinfoDto; import org.nl.wms.basedata.master.storagevehicleinfo.service.dto.StoragevehicleinfoQuery; -import org.nl.wms.basedata.master.unit.service.dao.Unit; import org.springframework.beans.BeanUtils; import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.data.domain.Pageable; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; @@ -54,7 +45,7 @@ public class StoragevehicleinfoServiceImpl implements StoragevehicleinfoService IClassStandardService classstandardService; @Autowired - ClassStandardMapper classStandardMapper; + ClassStandardMapper classStandardMapper; @Autowired StoragevehicleinfoMapper storagevehicleinfoMapper; @@ -64,11 +55,10 @@ public class StoragevehicleinfoServiceImpl implements StoragevehicleinfoService @Override public JSONObject queryAll(StoragevehicleinfoQuery whereJson, PageQuery page) { - if (StrUtil.isNotEmpty((String) whereJson.getStoragevehicle_type())) { - ClassStandard dto = classStandardMapper.selectById(whereJson.getStoragevehicle_type()); - List storagevehicle_types = classstandardService.getAllChildrenIds(dto.getClass_id().toString()); - whereJson.setStoragevehicle_types(storagevehicle_types); - + if (StrUtil.isNotEmpty(whereJson.getStoragevehicle_type())) { + Set storagevehicle_types = classStandardMapper.selectClassIds(whereJson.getStoragevehicle_type()); + storagevehicle_types.add(whereJson.getStoragevehicle_type()); + whereJson.setStoragevehicle_types(new ArrayList<>(storagevehicle_types)); } IPage pages = new Page<>(page.getPage() + 1, page.getSize()); IPage storagevehicleinfoIPage = storagevehicleinfoMapper.selectByParam(whereJson,pages); diff --git a/lms/nladmin-ui/src/views/wms/basedata/master/storagevehicleinfo/index.vue b/lms/nladmin-ui/src/views/wms/basedata/master/storagevehicleinfo/index.vue index 0dde8cd..1ed6ccb 100644 --- a/lms/nladmin-ui/src/views/wms/basedata/master/storagevehicleinfo/index.vue +++ b/lms/nladmin-ui/src/views/wms/basedata/master/storagevehicleinfo/index.vue @@ -112,10 +112,6 @@ - - @@ -130,6 +126,8 @@ + +