物料查询关联拓展关系
This commit is contained in:
@@ -1,10 +1,10 @@
|
||||
package com.zt.plat.module.base.api;
|
||||
|
||||
import com.zt.plat.framework.common.pojo.CommonResult;
|
||||
import com.zt.plat.module.api.BaseApi;
|
||||
import com.zt.plat.module.api.dto.AccountRespDto;
|
||||
import com.zt.plat.module.base.dal.dataobject.base.AccountDO;
|
||||
import com.zt.plat.module.api.dto.AccountDTO;
|
||||
import com.zt.plat.module.api.dto.MaterialOtherDTO;
|
||||
import com.zt.plat.module.base.service.base.AccountService;
|
||||
import com.zt.plat.module.base.service.base.MaterialOtherService;
|
||||
import jakarta.annotation.Resource;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
@@ -24,8 +24,16 @@ public class BaseApiImpl implements BaseApi {
|
||||
@Resource
|
||||
private AccountService accountService;
|
||||
|
||||
@Resource
|
||||
private MaterialOtherService materialOtherService;
|
||||
|
||||
@Override
|
||||
public List<AccountRespDto> getNoPage(AccountRespDto respVO) {
|
||||
public List<AccountDTO> getAccountNoPage(AccountDTO respVO) {
|
||||
return accountService.getAccountNoPage(respVO);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<MaterialOtherDTO> getMaterialOtherNoPage(MaterialOtherDTO respVO) {
|
||||
return materialOtherService.getMaterialOtherNoPage(respVO);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3,9 +3,8 @@ package com.zt.plat.module.base.dal.mysql.base;
|
||||
import com.zt.plat.framework.common.pojo.PageResult;
|
||||
import com.zt.plat.framework.mybatis.core.mapper.BaseMapperX;
|
||||
import com.zt.plat.framework.mybatis.core.query.LambdaQueryWrapperX;
|
||||
import com.zt.plat.module.api.dto.AccountRespDto;
|
||||
import com.zt.plat.module.api.dto.AccountDTO;
|
||||
import com.zt.plat.module.base.controller.admin.base.vo.AccountPageReqVO;
|
||||
import com.zt.plat.module.base.controller.admin.base.vo.AccountRespVO;
|
||||
import com.zt.plat.module.base.dal.dataobject.base.AccountDO;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
@@ -35,18 +34,18 @@ public interface AccountMapper extends BaseMapperX<AccountDO> {
|
||||
.orderByDesc(AccountDO::getId));
|
||||
}
|
||||
|
||||
default List<AccountDO> selectNoPage(AccountRespDto reqVO){
|
||||
default List<AccountDO> selectNoPage(AccountDTO dto){
|
||||
return selectList(new LambdaQueryWrapperX<AccountDO>()
|
||||
.eqIfPresent(AccountDO::getType, reqVO.getType())
|
||||
.likeIfPresent(AccountDO::getAccountName, reqVO.getAccountName())
|
||||
.likeIfPresent(AccountDO::getAddress, reqVO.getAddress())
|
||||
.likeIfPresent(AccountDO::getPhone, reqVO.getPhone())
|
||||
.eqIfPresent(AccountDO::getBankAccount, reqVO.getBankAccount())
|
||||
.eqIfPresent(AccountDO::getCustomerName, reqVO.getCustomerName())
|
||||
.eqIfPresent(AccountDO::getCustomerNumber, reqVO.getCustomerNumber())
|
||||
.eqIfPresent(AccountDO::getIsEnable, reqVO.getIsEnable())
|
||||
.eqIfPresent(AccountDO::getAccountNumber, reqVO.getAccountNumber())
|
||||
.eqIfPresent(AccountDO::getTaxNumber, reqVO.getTaxNumber())
|
||||
.eqIfPresent(AccountDO::getType, dto.getType())
|
||||
.likeIfPresent(AccountDO::getAccountName, dto.getAccountName())
|
||||
.likeIfPresent(AccountDO::getAddress, dto.getAddress())
|
||||
.likeIfPresent(AccountDO::getPhone, dto.getPhone())
|
||||
.eqIfPresent(AccountDO::getBankAccount, dto.getBankAccount())
|
||||
.eqIfPresent(AccountDO::getCustomerName, dto.getCustomerName())
|
||||
.eqIfPresent(AccountDO::getCustomerNumber, dto.getCustomerNumber())
|
||||
.eqIfPresent(AccountDO::getIsEnable, dto.getIsEnable())
|
||||
.eqIfPresent(AccountDO::getAccountNumber, dto.getAccountNumber())
|
||||
.eqIfPresent(AccountDO::getTaxNumber, dto.getTaxNumber())
|
||||
.orderByDesc(AccountDO::getId));
|
||||
}
|
||||
}
|
||||
@@ -3,10 +3,13 @@ package com.zt.plat.module.base.dal.mysql.base;
|
||||
import com.zt.plat.framework.common.pojo.PageResult;
|
||||
import com.zt.plat.framework.mybatis.core.mapper.BaseMapperX;
|
||||
import com.zt.plat.framework.mybatis.core.query.LambdaQueryWrapperX;
|
||||
import com.zt.plat.module.api.dto.MaterialOtherDTO;
|
||||
import com.zt.plat.module.base.controller.admin.base.vo.MaterialOtherPageReqVO;
|
||||
import com.zt.plat.module.base.dal.dataobject.base.MaterialOtherDO;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 物料拓展数据 Mapper
|
||||
*
|
||||
@@ -32,4 +35,20 @@ public interface MaterialOtherMapper extends BaseMapperX<MaterialOtherDO> {
|
||||
.orderByDesc(MaterialOtherDO::getId));
|
||||
}
|
||||
|
||||
default List<MaterialOtherDO> selectList(MaterialOtherDTO dto) {
|
||||
return selectList(new LambdaQueryWrapperX<MaterialOtherDO>()
|
||||
.eqIfPresent(MaterialOtherDO::getMaterialNumber, dto.getMaterialNumber())
|
||||
.likeIfPresent(MaterialOtherDO::getMaterialName, dto.getMaterialName())
|
||||
.eqIfPresent(MaterialOtherDO::getErpMaterialNumber, dto.getErpMaterialNumber())
|
||||
.likeIfPresent(MaterialOtherDO::getErpMaterialName, dto.getErpMaterialName())
|
||||
.eqIfPresent(MaterialOtherDO::getUnit, dto.getUnit())
|
||||
.eqIfPresent(MaterialOtherDO::getAbbreviation, dto.getAbbreviation())
|
||||
.likeIfPresent(MaterialOtherDO::getName, dto.getName())
|
||||
.eqIfPresent(MaterialOtherDO::getCoding, dto.getCoding())
|
||||
.eqIfPresent(MaterialOtherDO::getGradeUnit, dto.getGradeUnit())
|
||||
.betweenIfPresent(MaterialOtherDO::getCreateTime, dto.getCreateTime())
|
||||
.eqIfPresent(MaterialOtherDO::getDecimalValue, dto.getDecimalValue())
|
||||
.eqIfPresent(MaterialOtherDO::getIsEnable, dto.getIsEnable())
|
||||
.orderByDesc(MaterialOtherDO::getId));
|
||||
}
|
||||
}
|
||||
@@ -1,7 +1,7 @@
|
||||
package com.zt.plat.module.base.service.base;
|
||||
|
||||
import com.zt.plat.framework.common.pojo.PageResult;
|
||||
import com.zt.plat.module.api.dto.AccountRespDto;
|
||||
import com.zt.plat.module.api.dto.AccountDTO;
|
||||
import com.zt.plat.module.base.controller.admin.base.vo.AccountPageReqVO;
|
||||
import com.zt.plat.module.base.controller.admin.base.vo.AccountRespVO;
|
||||
import com.zt.plat.module.base.controller.admin.base.vo.AccountSaveReqVO;
|
||||
@@ -69,5 +69,5 @@ public interface AccountService {
|
||||
*/
|
||||
void enableAccountList(List<AccountSaveReqVO> saveReqVOS);
|
||||
|
||||
List<AccountRespDto> getAccountNoPage(AccountRespDto respVO);
|
||||
List<AccountDTO> getAccountNoPage(AccountDTO respVO);
|
||||
}
|
||||
@@ -3,7 +3,7 @@ package com.zt.plat.module.base.service.base;
|
||||
import cn.hutool.core.collection.CollUtil;
|
||||
import com.zt.plat.framework.common.pojo.PageResult;
|
||||
import com.zt.plat.framework.common.util.object.BeanUtils;
|
||||
import com.zt.plat.module.api.dto.AccountRespDto;
|
||||
import com.zt.plat.module.api.dto.AccountDTO;
|
||||
import com.zt.plat.module.base.controller.admin.base.vo.AccountPageReqVO;
|
||||
import com.zt.plat.module.base.controller.admin.base.vo.AccountRespVO;
|
||||
import com.zt.plat.module.base.controller.admin.base.vo.AccountSaveReqVO;
|
||||
@@ -98,8 +98,8 @@ public class AccountServiceImpl implements AccountService {
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<AccountRespDto> getAccountNoPage(AccountRespDto respVO) {
|
||||
List<AccountDO> entityList = accountMapper.selectNoPage(respVO);
|
||||
return BeanUtils.toBean(entityList, AccountRespDto.class);
|
||||
public List<AccountDTO> getAccountNoPage(AccountDTO dto) {
|
||||
List<AccountDO> entityList = accountMapper.selectNoPage(dto);
|
||||
return BeanUtils.toBean(entityList, AccountDTO.class);
|
||||
}
|
||||
}
|
||||
@@ -1,6 +1,7 @@
|
||||
package com.zt.plat.module.base.service.base;
|
||||
|
||||
import com.zt.plat.framework.common.pojo.PageResult;
|
||||
import com.zt.plat.module.api.dto.MaterialOtherDTO;
|
||||
import com.zt.plat.module.base.controller.admin.base.vo.MaterialOtherPageReqVO;
|
||||
import com.zt.plat.module.base.controller.admin.base.vo.MaterialOtherRespVO;
|
||||
import com.zt.plat.module.base.controller.admin.base.vo.MaterialOtherSaveReqVO;
|
||||
@@ -62,4 +63,6 @@ public interface MaterialOtherService {
|
||||
PageResult<MaterialOtherDO> getMaterialOtherPage(MaterialOtherPageReqVO pageReqVO);
|
||||
|
||||
void enableMaterialOtherList(List<MaterialOtherRespVO> saveReqVOS);
|
||||
|
||||
List<MaterialOtherDTO> getMaterialOtherNoPage(MaterialOtherDTO respVO);
|
||||
}
|
||||
@@ -3,6 +3,7 @@ package com.zt.plat.module.base.service.base;
|
||||
import cn.hutool.core.collection.CollUtil;
|
||||
import com.zt.plat.framework.common.pojo.PageResult;
|
||||
import com.zt.plat.framework.common.util.object.BeanUtils;
|
||||
import com.zt.plat.module.api.dto.MaterialOtherDTO;
|
||||
import com.zt.plat.module.base.controller.admin.base.vo.MaterialOtherPageReqVO;
|
||||
import com.zt.plat.module.base.controller.admin.base.vo.MaterialOtherRespVO;
|
||||
import com.zt.plat.module.base.controller.admin.base.vo.MaterialOtherSaveReqVO;
|
||||
@@ -96,4 +97,10 @@ public class MaterialOtherServiceImpl implements MaterialOtherService {
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<MaterialOtherDTO> getMaterialOtherNoPage(MaterialOtherDTO dto) {
|
||||
List<MaterialOtherDO> list = materialOtherMapper.selectList(dto);
|
||||
return BeanUtils.toBean(list, MaterialOtherDTO.class);
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user