Browse Source

天合需求新增

master
songguoqiang 6 months ago
parent
commit
be843c7634
  1. 3
      win-module-eam/win-module-eam-biz/src/main/java/com/win/module/eam/controller/itemaccounts/vo/ItemAccountsPageReqVO.java
  2. 13
      win-module-eam/win-module-eam-biz/src/main/java/com/win/module/eam/dal/mysql/itemaccounts/ItemAccountsMapper.java
  3. 4
      win-module-eam/win-module-eam-biz/src/main/java/com/win/module/eam/dal/mysql/iteminlocation/ItemInLocationMapper.java
  4. 4
      win-module-eam/win-module-eam-biz/src/main/java/com/win/module/eam/dal/mysql/itemoutlocation/ItemOutLocationMapper.java

3
win-module-eam/win-module-eam-biz/src/main/java/com/win/module/eam/controller/itemaccounts/vo/ItemAccountsPageReqVO.java

@ -30,4 +30,7 @@ public class ItemAccountsPageReqVO extends PageParam {
@Schema(description = "库区编号")
private String areaNumber;
@Schema(description = "项目号")
private String project;
}

13
win-module-eam/win-module-eam-biz/src/main/java/com/win/module/eam/dal/mysql/itemaccounts/ItemAccountsMapper.java

@ -1,5 +1,6 @@
package com.win.module.eam.dal.mysql.itemaccounts;
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.extension.plugins.pagination.Page;
@ -14,6 +15,7 @@ import com.win.module.eam.controller.itemaccounts.vo.ItemAccountsPageReqVO;
import com.win.module.eam.convert.itemaccounts.ItemAccountsConvert;
import com.win.module.eam.dal.dataobject.itemaccounts.ItemAccountsDO;
import com.win.module.eam.dal.dataobject.transaction.TransactionDO;
import com.win.module.eam.dal.mysql.item.ItemMapper;
import com.win.module.eam.enums.itemAccount.ItemAccountStatusEnum;
import com.win.module.eam.enums.transaction.TransactionEnum;
import com.win.module.eam.enums.transactionType.TransactionTypeEnum;
@ -37,6 +39,8 @@ import static com.win.module.eam.enums.ErrorCodeConstants.COUNT_IS_HAVA;
@Mapper
public interface ItemAccountsMapper extends BaseMapperX<ItemAccountsDO> {
/**
* 更新库存余额数量出库qty是负数
*/
@ -231,13 +235,18 @@ public interface ItemAccountsMapper extends BaseMapperX<ItemAccountsDO> {
}
default PageResult<ItemAccountsDO> selectPage(ItemAccountsPageReqVO reqVO) {
return selectPage(reqVO, new LambdaQueryWrapperX<ItemAccountsDO>()
LambdaQueryWrapper<ItemAccountsDO> itemAccountsDOLambdaQueryWrapper = new LambdaQueryWrapperX<ItemAccountsDO>()
.likeIfPresent(ItemAccountsDO::getItemNumber, reqVO.getItemNumber())
.likeIfPresent(ItemAccountsDO::getLocationNumber, reqVO.getLocationNumber())
.likeIfPresent(ItemAccountsDO::getAreaNumber, reqVO.getAreaNumber())
.eqIfPresent(ItemAccountsDO::getType, reqVO.getType())
.eqIfPresent(ItemAccountsDO::getAvailable, reqVO.getAvailable())
.orderByDesc(ItemAccountsDO::getId));
.orderByDesc(ItemAccountsDO::getId);
if(reqVO.getProject()!=null&& !reqVO.getProject().isEmpty()){
itemAccountsDOLambdaQueryWrapper.inSql(ItemAccountsDO::getItemNumber, "select number from basic_item where available = 'TRUE' and deleted = 0 and project like CONCAT('%','" + reqVO.getProject() + "','%') ");
}
return selectPage(reqVO, itemAccountsDOLambdaQueryWrapper);
}
default List<ItemAccountsDO> selectList(ItemAccountsExportReqVO reqVO) {

4
win-module-eam/win-module-eam-biz/src/main/java/com/win/module/eam/dal/mysql/iteminlocation/ItemInLocationMapper.java

@ -24,8 +24,8 @@ public interface ItemInLocationMapper extends BaseMapperX<ItemInLocationDO> {
return selectPage(reqVO, new LambdaQueryWrapperX<ItemInLocationDO>()
.eqIfPresent(ItemInLocationDO::getId, reqVO.getId())
.eqIfPresent(ItemInLocationDO::getNumber, reqVO.getNumber())
.eqIfPresent(ItemInLocationDO::getItemNumber, reqVO.getItemNumber())
.eqIfPresent(ItemInLocationDO::getLocationNumber, reqVO.getLocationNumber())
.likeIfPresent(ItemInLocationDO::getItemNumber, reqVO.getItemNumber())
.likeIfPresent(ItemInLocationDO::getLocationNumber, reqVO.getLocationNumber())
.eqIfPresent(ItemInLocationDO::getType, reqVO.getType())
.eqIfPresent(ItemInLocationDO::getQty, reqVO.getQty())
.orderByDesc(ItemInLocationDO::getId));

4
win-module-eam/win-module-eam-biz/src/main/java/com/win/module/eam/dal/mysql/itemoutlocation/ItemOutLocationMapper.java

@ -24,8 +24,8 @@ public interface ItemOutLocationMapper extends BaseMapperX<ItemOutLocationDO> {
return selectPage(reqVO, new LambdaQueryWrapperX<ItemOutLocationDO>()
.eqIfPresent(ItemOutLocationDO::getId, reqVO.getId())
.eqIfPresent(ItemOutLocationDO::getNumber, reqVO.getNumber())
.eqIfPresent(ItemOutLocationDO::getItemNumber, reqVO.getItemNumber())
.eqIfPresent(ItemOutLocationDO::getLocationNumber, reqVO.getLocationNumber())
.likeIfPresent(ItemOutLocationDO::getItemNumber, reqVO.getItemNumber())
.likeIfPresent(ItemOutLocationDO::getLocationNumber, reqVO.getLocationNumber())
.eqIfPresent(ItemOutLocationDO::getType, reqVO.getType())
.eqIfPresent(ItemOutLocationDO::getQty, reqVO.getQty())
.orderByDesc(ItemOutLocationDO::getId));

Loading…
Cancel
Save