修复BUG

This commit is contained in:
刘名喜 2024-12-18 11:25:10 +08:00
parent faa93f5d7b
commit 79d23c9e99
2 changed files with 31 additions and 37 deletions

View File

@ -1,21 +1,20 @@
package com.ktg.mes.wm.service.impl;
import java.util.List;
import java.util.stream.Collectors;
import com.ktg.common.constant.UserConstants;
import com.ktg.common.utils.DateUtils;
import com.ktg.common.utils.StringUtils;
import com.ktg.mes.md.mapper.BaseKnifeMapper;
import com.ktg.mes.wm.domain.WmStorageArea;
import com.ktg.mes.wm.domain.WmStorageLocation;
import com.ktg.mes.wm.domain.vo.WmStorageLocationVo;
import com.ktg.mes.wm.mapper.WmStorageAreaMapper;
import org.apache.catalina.User;
import com.ktg.mes.wm.mapper.WmStorageLocationMapper;
import com.ktg.mes.wm.service.IWmStorageLocationService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ktg.mes.wm.mapper.WmStorageLocationMapper;
import com.ktg.mes.wm.domain.WmStorageLocation;
import com.ktg.mes.wm.service.IWmStorageLocationService;
import java.util.List;
import java.util.stream.Collectors;
/**
* 库区设置Service业务层处理
@ -24,8 +23,7 @@ import com.ktg.mes.wm.service.IWmStorageLocationService;
* @date 2022-05-07
*/
@Service
public class WmStorageLocationServiceImpl implements IWmStorageLocationService
{
public class WmStorageLocationServiceImpl implements IWmStorageLocationService {
@Autowired
private WmStorageLocationMapper wmStorageLocationMapper;
@ -42,8 +40,7 @@ public class WmStorageLocationServiceImpl implements IWmStorageLocationService
* @return 库区设置
*/
@Override
public WmStorageLocation selectWmStorageLocationByLocationId(Long locationId)
{
public WmStorageLocation selectWmStorageLocationByLocationId(Long locationId) {
return wmStorageLocationMapper.selectWmStorageLocationByLocationId(locationId);
}
@ -54,10 +51,10 @@ public class WmStorageLocationServiceImpl implements IWmStorageLocationService
* @return 库区设置
*/
@Override
public WmStorageLocationVo selectWmStorageLocationVoByLocationId(Long locationId)
{
public WmStorageLocationVo selectWmStorageLocationVoByLocationId(Long locationId) {
return wmStorageLocationMapper.selectWmStorageLocationByVoLocationId(locationId);
}
@Override
public WmStorageLocation selectWmStorageLocationByLocationCode(String locationCode) {
return wmStorageLocationMapper.selectWmStorageLocationByLocationCode(locationCode);
@ -70,8 +67,7 @@ public class WmStorageLocationServiceImpl implements IWmStorageLocationService
* @return 库区设置
*/
@Override
public List<WmStorageLocation> selectWmStorageLocationList(WmStorageLocation wmStorageLocation)
{
public List<WmStorageLocation> selectWmStorageLocationList(WmStorageLocation wmStorageLocation) {
return wmStorageLocationMapper.selectWmStorageLocationList(wmStorageLocation);
}
@ -82,8 +78,7 @@ public class WmStorageLocationServiceImpl implements IWmStorageLocationService
* @return 库区设置
*/
@Override
public List<WmStorageLocationVo> selectWmStorageLocationListVo(WmStorageLocation wmStorageLocation)
{
public List<WmStorageLocationVo> selectWmStorageLocationListVo(WmStorageLocation wmStorageLocation) {
return wmStorageLocationMapper.selectWmStorageLocationListVo(wmStorageLocation);
}
@ -114,8 +109,7 @@ public class WmStorageLocationServiceImpl implements IWmStorageLocationService
* @return 结果
*/
@Override
public int insertWmStorageLocation(WmStorageLocation wmStorageLocation)
{
public int insertWmStorageLocation(WmStorageLocation wmStorageLocation) {
wmStorageLocation.setCreateTime(DateUtils.getNowDate());
return wmStorageLocationMapper.insertWmStorageLocation(wmStorageLocation);
}
@ -127,8 +121,7 @@ public class WmStorageLocationServiceImpl implements IWmStorageLocationService
* @return 结果
*/
@Override
public int updateWmStorageLocation(WmStorageLocation wmStorageLocation)
{
public int updateWmStorageLocation(WmStorageLocation wmStorageLocation) {
wmStorageLocation.setUpdateTime(DateUtils.getNowDate());
return wmStorageLocationMapper.updateWmStorageLocation(wmStorageLocation);
}
@ -140,8 +133,7 @@ public class WmStorageLocationServiceImpl implements IWmStorageLocationService
* @return 结果
*/
@Override
public int deleteWmStorageLocationByLocationIds(Long[] locationIds)
{
public int deleteWmStorageLocationByLocationIds(Long[] locationIds) {
return wmStorageLocationMapper.deleteWmStorageLocationByLocationIds(locationIds);
}
@ -152,8 +144,7 @@ public class WmStorageLocationServiceImpl implements IWmStorageLocationService
* @return 结果
*/
@Override
public int deleteWmStorageLocationByLocationId(Long locationId)
{
public int deleteWmStorageLocationByLocationId(Long locationId) {
return wmStorageLocationMapper.deleteWmStorageLocationByLocationId(locationId);
}
@ -174,7 +165,7 @@ public class WmStorageLocationServiceImpl implements IWmStorageLocationService
// 获取库位列表
WmStorageArea wmStorageAreaQuery = new WmStorageArea();
wmStorageAreaQuery.setLocationId(wmStorageLocationByCode.getLocationId());
if (isBig) wmStorageAreaQuery.setAttr3(1L);
wmStorageAreaQuery.setAttr3(isBig ? 1L : 0L);
List<WmStorageArea> wmStorageAreaList = this.wmStorageAreaMapper.selectWmStorageAreaList(wmStorageAreaQuery).stream()
// 过滤掉全部存在物品的库位
.filter(it -> !selectNotEmptyAreaCodeList.contains(it.getAreaCode()))

View File

@ -92,6 +92,9 @@
<if test="maxLoa != null">
and max_loa = #{maxLoa}
</if>
<if test="attr3 != null">
and attr3 = #{attr3}
</if>
<if test="positionX != null and positionX != 0">
and position_x = #{positionX}
</if>