fix(wql): 管制卷移库6改6 限制。管制卷移库页面查询条件优化
This commit is contained in:
@@ -1,10 +1,10 @@
|
||||
package org.nl.wms.st.levelchange.service;
|
||||
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import org.nl.b_lms.pdm.bi.slittingproductionplan.service.dao.PdmBiSlittingproductionplan;
|
||||
import org.nl.common.domain.query.PageQuery;
|
||||
import org.nl.wms.st.levelchange.dao.StIvtLevelchangedtl;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
|
||||
@@ -19,7 +19,7 @@ public interface IStIvtLevelchangedtlService {
|
||||
/**
|
||||
* 分页查询
|
||||
*/
|
||||
List<StIvtLevelchangedtl> queryAll(Map whereJson, PageQuery page);
|
||||
IPage<StIvtLevelchangedtl> queryAll(Map whereJson, PageQuery page);
|
||||
|
||||
/**
|
||||
* 新增
|
||||
|
||||
@@ -1,7 +1,9 @@
|
||||
package org.nl.wms.st.levelchange.service.impl;
|
||||
|
||||
import cn.hutool.core.date.DateUtil;
|
||||
import cn.hutool.core.map.MapUtil;
|
||||
import cn.hutool.core.util.ObjectUtil;
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
@@ -11,6 +13,7 @@ import lombok.extern.slf4j.Slf4j;
|
||||
import org.nl.common.domain.query.PageQuery;
|
||||
import org.nl.common.utils.SecurityUtils;
|
||||
import org.nl.modules.common.exception.BadRequestException;
|
||||
import org.nl.modules.common.utils.StringUtils;
|
||||
import org.nl.modules.wql.core.bean.WQLObject;
|
||||
import org.nl.wms.st.instor.service.HandMoveStorService;
|
||||
import org.nl.wms.st.levelchange.dao.StIvtLevelchangedtl;
|
||||
@@ -45,15 +48,36 @@ public class StIvtLevelchangedtlServiceImpl implements IStIvtLevelchangedtlServi
|
||||
|
||||
|
||||
@Override
|
||||
public List<StIvtLevelchangedtl> queryAll(Map whereJson, PageQuery page) {
|
||||
public IPage<StIvtLevelchangedtl> queryAll(Map whereJson, PageQuery page) {
|
||||
LambdaQueryWrapper<StIvtLevelchangedtl> wrapper = new LambdaQueryWrapper<>();
|
||||
// 根据 whereJson 动态添加查询条件,可按需扩展
|
||||
wrapper.eq(StIvtLevelchangedtl::getIs_delete, "0");
|
||||
String move_bill_code = MapUtil.getStr(whereJson, "move_bill_code");
|
||||
String status = MapUtil.getStr(whereJson, "status");
|
||||
String container_name = MapUtil.getStr(whereJson, "container_name");
|
||||
String begin_time = MapUtil.getStr(whereJson, "begin_time");
|
||||
String end_time = MapUtil.getStr(whereJson, "end_time");
|
||||
if(StrUtil.isNotBlank(move_bill_code)){
|
||||
wrapper.eq(StIvtLevelchangedtl::getMove_bill_code, move_bill_code);
|
||||
}
|
||||
if(StrUtil.isNotBlank(status)){
|
||||
wrapper.eq(StIvtLevelchangedtl::getStatus, status);
|
||||
}
|
||||
if(StrUtil.isNotBlank(container_name)){
|
||||
wrapper.like(StIvtLevelchangedtl::getContainer_name, container_name);
|
||||
}
|
||||
if(StrUtil.isNotBlank(begin_time)){
|
||||
wrapper.ge(StIvtLevelchangedtl::getCreate_time, begin_time);
|
||||
}
|
||||
if(StrUtil.isNotBlank(end_time)){
|
||||
wrapper.le(StIvtLevelchangedtl::getCreate_time, end_time);
|
||||
}
|
||||
|
||||
wrapper.orderByDesc(StIvtLevelchangedtl::getCreate_time);
|
||||
|
||||
IPage<StIvtLevelchangedtl> iPage = new Page<>(page.getPage(), page.getSize());
|
||||
IPage<StIvtLevelchangedtl> iPage = new Page<>(page.getPage()+1, page.getSize());
|
||||
levelchangedtlMapper.selectPage(iPage, wrapper);
|
||||
return iPage.getRecords();
|
||||
return iPage;
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -119,8 +143,15 @@ public class StIvtLevelchangedtlServiceImpl implements IStIvtLevelchangedtlServi
|
||||
try{
|
||||
//判断卷原来的级别是不是管制卷,如果不是,不走移库操作。
|
||||
if(!"6".equals(oldLevel)){
|
||||
log.info("非管制卷改级,不需要进行实物移库!");
|
||||
throw new BadRequestException("非管制卷改级,不需要进行实物移库!!");
|
||||
log.info("非管制卷改级,不需要进行实物移库!containerName={}, newLevel={}, oldLevel={}, newResult={}, oldResult={}",
|
||||
containerName, newLevel, oldLevel, newResult, oldResult);
|
||||
return;
|
||||
}
|
||||
//判断新的级别是否是 A- A A+ 3 2 1
|
||||
if(!"3".equals(newLevel) && !"2".equals(newLevel) && !"1".equals(newLevel)){
|
||||
log.info("非A-/A/A+改级,不需要进行实物移库!containerName={}, newLevel={}, oldLevel={}, newResult={}, oldResult={}",
|
||||
containerName, newLevel, oldLevel, newResult, oldResult);
|
||||
return;
|
||||
}
|
||||
List<Map<String,Object>> packages = levelchangedtlMapper.selectPackageInfoByContainerName(containerName);
|
||||
if(ObjectUtil.isEmpty(packages)){
|
||||
|
||||
Reference in New Issue
Block a user