|
@ -1,16 +1,12 @@ |
|
|
package org.nl.wms.pdm.ivt.hotpoint.service.impl; |
|
|
package org.nl.wms.pdm.ivt.hotpoint.service.impl; |
|
|
|
|
|
|
|
|
import cn.hutool.core.bean.BeanUtil; |
|
|
import cn.hutool.core.bean.BeanUtil; |
|
|
import cn.hutool.core.collection.CollUtil; |
|
|
|
|
|
import cn.hutool.core.collection.CollectionUtil; |
|
|
|
|
|
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 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.core.toolkit.CollectionUtils; |
|
|
|
|
|
import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
|
|
import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
|
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
|
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
|
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
|
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
|
@ -20,14 +16,12 @@ import org.nl.common.domain.query.PageQuery; |
|
|
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.common.utils.RedisUtils; |
|
|
import org.nl.modules.common.utils.RedisUtils; |
|
|
import org.nl.modules.wql.WQL; |
|
|
|
|
|
import org.nl.modules.wql.core.bean.WQLObject; |
|
|
import org.nl.modules.wql.core.bean.WQLObject; |
|
|
import org.nl.modules.wql.util.SpringContextHolder; |
|
|
import org.nl.modules.wql.util.SpringContextHolder; |
|
|
import org.nl.modules.wql.util.WqlUtil; |
|
|
|
|
|
import org.nl.system.service.param.impl.SysParamServiceImpl; |
|
|
import org.nl.system.service.param.impl.SysParamServiceImpl; |
|
|
import org.nl.wms.basedata.master.interfaceback.service.dao.InterfaceBack; |
|
|
import org.nl.wms.basedata.master.interfaceback.service.dao.InterfaceBack; |
|
|
import org.nl.wms.basedata.master.interfaceback.service.dao.mapper.InterfaceBackMapper; |
|
|
import org.nl.wms.basedata.master.interfaceback.service.dao.mapper.InterfaceBackMapper; |
|
|
import org.nl.wms.basedata.st.areapermissions.service.IUserAreaPermissionService; |
|
|
import org.nl.wms.basedata.st.userarea.service.IUserAreaPermissionService; |
|
|
import org.nl.wms.ext.mes.service.LmsToMesService; |
|
|
import org.nl.wms.ext.mes.service.LmsToMesService; |
|
|
import org.nl.wms.pdm.ivt.hotpoint.service.HotPointIvtService; |
|
|
import org.nl.wms.pdm.ivt.hotpoint.service.HotPointIvtService; |
|
|
import org.nl.wms.pdm.ivt.hotpoint.service.dao.HotPointIvt; |
|
|
import org.nl.wms.pdm.ivt.hotpoint.service.dao.HotPointIvt; |
|
@ -42,7 +36,6 @@ import org.springframework.transaction.annotation.Transactional; |
|
|
|
|
|
|
|
|
import java.math.BigDecimal; |
|
|
import java.math.BigDecimal; |
|
|
import java.util.*; |
|
|
import java.util.*; |
|
|
import java.util.stream.Collectors; |
|
|
|
|
|
|
|
|
|
|
|
@Service |
|
|
@Service |
|
|
@RequiredArgsConstructor |
|
|
@RequiredArgsConstructor |
|
@ -61,16 +54,15 @@ public class HotPointIvtServiceImpl extends ServiceImpl<HotPointIvtMappper, HotP |
|
|
@Override |
|
|
@Override |
|
|
public Map<String, Object> queryAll(Map whereJson, Pageable page) { |
|
|
public Map<String, Object> queryAll(Map whereJson, Pageable page) { |
|
|
//获取人员对应的区域
|
|
|
//获取人员对应的区域
|
|
|
String in_area_id = userAreaPermissionService.getInArea(); |
|
|
String currentUserId = SecurityUtils.getCurrentUserId(); |
|
|
String area_id = in_area_id.substring(1, in_area_id.length() - 1).replace("'", ""); |
|
|
List<String> in_area_id = userAreaPermissionService.getCurrentUserAreas(currentUserId); |
|
|
String[] split = area_id.split(","); |
|
|
|
|
|
LambdaQueryWrapper<HotPointIvt> wrapper = Wrappers.lambdaQuery(HotPointIvt.class) |
|
|
LambdaQueryWrapper<HotPointIvt> wrapper = Wrappers.lambdaQuery(HotPointIvt.class) |
|
|
.like(ObjectUtil.isNotEmpty(whereJson.get("point_code")), HotPointIvt::getPoint_code, whereJson.get("point_code")) |
|
|
.like(ObjectUtil.isNotEmpty(whereJson.get("point_code")), HotPointIvt::getPoint_code, whereJson.get("point_code")) |
|
|
.eq(ObjectUtil.isNotEmpty(whereJson.get("point_status")), HotPointIvt::getPoint_status, whereJson.get("point_status")) |
|
|
.eq(ObjectUtil.isNotEmpty(whereJson.get("point_status")), HotPointIvt::getPoint_status, whereJson.get("point_status")) |
|
|
.eq(ObjectUtil.isNotEmpty(whereJson.get("product_area")), HotPointIvt::getProduct_area, whereJson.get("product_area")) |
|
|
.eq(ObjectUtil.isNotEmpty(whereJson.get("product_area")), HotPointIvt::getProduct_area, whereJson.get("product_area")) |
|
|
.eq(ObjectUtil.isNotEmpty(whereJson.get("is_used")), HotPointIvt::getIs_used, whereJson.get("is_used")) |
|
|
.eq(ObjectUtil.isNotEmpty(whereJson.get("is_used")), HotPointIvt::getIs_used, whereJson.get("is_used")) |
|
|
.eq(ObjectUtil.isNotEmpty(whereJson.get("point_location")), HotPointIvt::getPoint_location, whereJson.get("point_location")) |
|
|
.eq(ObjectUtil.isNotEmpty(whereJson.get("point_location")), HotPointIvt::getPoint_location, whereJson.get("point_location")) |
|
|
.in(ObjectUtil.isNotEmpty(split), HotPointIvt::getProduct_area, split) |
|
|
.in(ObjectUtil.isNotEmpty(in_area_id), HotPointIvt::getProduct_area, in_area_id) |
|
|
.eq(ObjectUtil.isNotEmpty(whereJson.get("begin_time")), HotPointIvt::getInstorage_time, whereJson.get("begin_time")) |
|
|
.eq(ObjectUtil.isNotEmpty(whereJson.get("begin_time")), HotPointIvt::getInstorage_time, whereJson.get("begin_time")) |
|
|
.eq(ObjectUtil.isNotEmpty(whereJson.get("end_time")), HotPointIvt::getInstorage_time, whereJson.get("end_time")); |
|
|
.eq(ObjectUtil.isNotEmpty(whereJson.get("end_time")), HotPointIvt::getInstorage_time, whereJson.get("end_time")); |
|
|
|
|
|
|
|
|