|
@ -2,30 +2,23 @@ package org.nl.wms.basedata.master.storagevehicleinfo.service.impl; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
import cn.hutool.core.date.DateUtil; |
|
|
import cn.hutool.core.date.DateUtil; |
|
|
import cn.hutool.core.map.MapUtil; |
|
|
|
|
|
import cn.hutool.core.util.IdUtil; |
|
|
import cn.hutool.core.util.IdUtil; |
|
|
import cn.hutool.core.util.ObjectUtil; |
|
|
import cn.hutool.core.util.ObjectUtil; |
|
|
import cn.hutool.core.util.StrUtil; |
|
|
import cn.hutool.core.util.StrUtil; |
|
|
import com.alibaba.fastjson.JSON; |
|
|
|
|
|
import com.alibaba.fastjson.JSONArray; |
|
|
import com.alibaba.fastjson.JSONArray; |
|
|
import com.alibaba.fastjson.JSONObject; |
|
|
import com.alibaba.fastjson.JSONObject; |
|
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
|
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
|
|
import com.baomidou.mybatisplus.core.metadata.IPage; |
|
|
import com.baomidou.mybatisplus.core.metadata.IPage; |
|
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
|
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
|
|
import lombok.RequiredArgsConstructor; |
|
|
|
|
|
import lombok.extern.slf4j.Slf4j; |
|
|
import lombok.extern.slf4j.Slf4j; |
|
|
import org.nl.common.domain.query.PageQuery; |
|
|
import org.nl.common.domain.query.PageQuery; |
|
|
import org.nl.common.utils.CodeUtil; |
|
|
import org.nl.common.utils.CodeUtil; |
|
|
import org.nl.common.utils.SecurityUtils; |
|
|
import org.nl.common.utils.SecurityUtils; |
|
|
import org.nl.modules.common.exception.BadRequestException; |
|
|
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.system.service.coderule.impl.SysCodeRuleServiceImpl; |
|
|
import org.nl.wms.basedata.master.sectattr.service.dao.Sectattr; |
|
|
import org.nl.wms.basedata.master.classstandard.service.IClassStandardService; |
|
|
import org.nl.wms.basedata.master.standard.service.IClassStandardService; |
|
|
import org.nl.wms.basedata.master.classstandard.service.dao.ClassStandard; |
|
|
import org.nl.wms.basedata.master.standard.service.dao.ClassStandard; |
|
|
import org.nl.wms.basedata.master.classstandard.service.dao.mapper.ClassStandardMapper; |
|
|
import org.nl.wms.basedata.master.standard.service.dao.mapper.ClassStandardMapper; |
|
|
|
|
|
import org.nl.wms.basedata.master.storagevehicleinfo.service.StoragevehicleinfoService; |
|
|
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.Storagevehicleex; |
|
|
import org.nl.wms.basedata.master.storagevehicleinfo.service.dao.Storagevehicleinfo; |
|
|
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.dao.mapper.StoragevehicleinfoMapper; |
|
|
import org.nl.wms.basedata.master.storagevehicleinfo.service.dto.StoragevehicleinfoDto; |
|
|
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.storagevehicleinfo.service.dto.StoragevehicleinfoQuery; |
|
|
import org.nl.wms.basedata.master.unit.service.dao.Unit; |
|
|
|
|
|
import org.springframework.beans.BeanUtils; |
|
|
import org.springframework.beans.BeanUtils; |
|
|
import org.springframework.beans.factory.annotation.Autowired; |
|
|
import org.springframework.beans.factory.annotation.Autowired; |
|
|
import org.springframework.data.domain.Pageable; |
|
|
|
|
|
import org.springframework.stereotype.Service; |
|
|
import org.springframework.stereotype.Service; |
|
|
import org.springframework.transaction.annotation.Transactional; |
|
|
import org.springframework.transaction.annotation.Transactional; |
|
|
|
|
|
|
|
@ -64,11 +55,10 @@ public class StoragevehicleinfoServiceImpl implements StoragevehicleinfoService |
|
|
|
|
|
|
|
|
@Override |
|
|
@Override |
|
|
public JSONObject queryAll(StoragevehicleinfoQuery whereJson, PageQuery page) { |
|
|
public JSONObject queryAll(StoragevehicleinfoQuery whereJson, PageQuery page) { |
|
|
if (StrUtil.isNotEmpty((String) whereJson.getStoragevehicle_type())) { |
|
|
if (StrUtil.isNotEmpty(whereJson.getStoragevehicle_type())) { |
|
|
ClassStandard dto = classStandardMapper.selectById(whereJson.getStoragevehicle_type()); |
|
|
Set<String> storagevehicle_types = classStandardMapper.selectClassIds(whereJson.getStoragevehicle_type()); |
|
|
List<String> storagevehicle_types = classstandardService.getAllChildrenIds(dto.getClass_id().toString()); |
|
|
storagevehicle_types.add(whereJson.getStoragevehicle_type()); |
|
|
whereJson.setStoragevehicle_types(storagevehicle_types); |
|
|
whereJson.setStoragevehicle_types(new ArrayList<>(storagevehicle_types)); |
|
|
|
|
|
|
|
|
} |
|
|
} |
|
|
IPage<Storagevehicleinfo> pages = new Page<>(page.getPage() + 1, page.getSize()); |
|
|
IPage<Storagevehicleinfo> pages = new Page<>(page.getPage() + 1, page.getSize()); |
|
|
IPage<StoragevehicleinfoDto> storagevehicleinfoIPage = storagevehicleinfoMapper.selectByParam(whereJson,pages); |
|
|
IPage<StoragevehicleinfoDto> storagevehicleinfoIPage = storagevehicleinfoMapper.selectByParam(whereJson,pages); |
|
|