Browse Source

add:增加查询物料没有取消隐藏的数据接口

fix:修复盘点的时候没有增加取消条件的限制
dist.1.3.0
pref_mail@163.com 8 months ago
parent
commit
e042391cb8
  1. 8
      blade-service/logpm-basic/src/main/java/com/logpm/basic/controller/BasicMaterialController.java
  2. 3
      blade-service/logpm-basic/src/main/java/com/logpm/basic/service/IBasicMaterialService.java
  3. 29
      blade-service/logpm-basic/src/main/java/com/logpm/basic/service/impl/BasicMaterialServiceImpl.java
  4. 2
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionStockListMapper.xml
  5. 2
      blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/mapper/TaskQuestMapper.xml

8
blade-service/logpm-basic/src/main/java/com/logpm/basic/controller/BasicMaterialController.java

@ -89,6 +89,14 @@ public class BasicMaterialController extends BladeController {
return R.data(pages);
}
@GetMapping("/materialList")
@ApiOperationSupport(order = 2)
@ApiOperation(value = "物料新查询列表", notes = "传入basicMaterial")
public R materialList(@ApiIgnore @RequestParam Map<String, Object> basicMaterial) {
List<BasicMaterialVO> pages = basicMaterialService.materialList(basicMaterial);
return R.data(pages);
}
/**
* 查询子物料

3
blade-service/logpm-basic/src/main/java/com/logpm/basic/service/IBasicMaterialService.java

@ -24,6 +24,7 @@ import com.logpm.basic.vo.BasicMaterialVO;
import org.springblade.core.mp.base.BaseService;
import java.util.List;
import java.util.Map;
/**
* 物料基础信息 服务类
@ -60,4 +61,6 @@ public interface IBasicMaterialService extends BaseService<BasicMaterialEntity>
Boolean saveOrUpdateOwn(BasicMaterialEntity basicMaterial);
BasicMaterialEntity findEntityByCodeAndName(String materialCode, String materialName);
List<BasicMaterialVO> materialList(Map<String, Object> basicMaterial);
}

29
blade-service/logpm-basic/src/main/java/com/logpm/basic/service/impl/BasicMaterialServiceImpl.java

@ -18,6 +18,7 @@ package com.logpm.basic.service.impl;
import com.alibaba.fastjson.JSON;
import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.core.toolkit.ObjectUtils;
@ -30,6 +31,7 @@ import com.logpm.basic.service.IBasicMaterialService;
import com.logpm.basic.vo.BasicMaterialVO;
import lombok.AllArgsConstructor;
import lombok.extern.log4j.Log4j2;
import org.springblade.core.log.exception.ServiceException;
import org.springblade.core.mp.base.BaseServiceImpl;
import org.springblade.core.tool.utils.BeanUtil;
import org.springframework.stereotype.Service;
@ -37,6 +39,7 @@ import org.springframework.transaction.annotation.Transactional;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import java.util.function.Function;
import java.util.stream.Collectors;
@ -128,4 +131,30 @@ public class BasicMaterialServiceImpl extends BaseServiceImpl<BasicMaterialMappe
return baseMapper.findEntityByCodeAndNameg(materialCode,materialName);
}
@Override
public List<BasicMaterialVO> materialList(Map<String, Object> basicMaterial) {
List<BasicMaterialVO> basicMaterialVOList =null;
try {
LambdaQueryWrapper<BasicMaterialEntity> queryWrapper = new LambdaQueryWrapper<>();
if(basicMaterial.get("productCode") != null){
queryWrapper.like(BasicMaterialEntity::getProductCode,basicMaterial.get("productCode"));
}
if(basicMaterial.get("name") != null){
queryWrapper.like(BasicMaterialEntity::getName,basicMaterial.get("name"));
}
queryWrapper.eq(BasicMaterialEntity::getHide,1);
queryWrapper.eq(BasicMaterialEntity::getIsDeleted,0);
queryWrapper.last("limit 30");
basicMaterialVOList = baseMapper.selectList(queryWrapper).stream().map(basicMaterialEntity -> {
BasicMaterialVO basicMaterialVO = new BasicMaterialVO();
BeanUtil.copy(basicMaterialEntity,basicMaterialVO);
return basicMaterialVO;
}).collect(Collectors.toList());
} catch (Exception e) {
log.error("查询物料列表异常",e);
throw new ServiceException("服务器异常,请联系管理员");
}
return basicMaterialVOList;
}
}

2
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionStockListMapper.xml

@ -124,7 +124,7 @@
<select id="pageOwn" resultType="com.logpm.distribution.vo.DistributionStockListVO">
<include refid="stockList"></include>
<where>
ldsi.is_deleted = 0
ldsi.is_deleted = 0 and ldsi.hide=1
<if test=" param.serviceNumber != null and param.serviceNumber != ''">and ldsi.service_number like
concat('%',#{param.serviceNumber},'%')
</if>

2
blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/mapper/TaskQuestMapper.xml

@ -474,7 +474,7 @@
select lbm.product_code materialCode,
lbm.`name` materialName
from logpm_basicdata_material lbm
where lbm.is_deleted = 0
where lbm.is_deleted = 0 and lbm.`hide` = 1
<if test="param.materialCode != null and param.materialCode != '' ">
and (lbm.product_code like concat('%',#{param.materialCode},'%') or lbm.`name` like concat('%',#{param.materialCode},'%'))
</if>

Loading…
Cancel
Save