账户条款查询api
This commit is contained in:
@@ -0,0 +1,31 @@
|
||||
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.base.service.base.AccountService;
|
||||
import jakarta.annotation.Resource;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* ERP Api 实现类
|
||||
*
|
||||
* @author ZT
|
||||
* @author jason
|
||||
*/
|
||||
@RestController
|
||||
@Validated
|
||||
public class BaseApiImpl implements BaseApi {
|
||||
|
||||
@Resource
|
||||
private AccountService accountService;
|
||||
|
||||
@Override
|
||||
public List<AccountRespDto> getNoPage(AccountRespDto respVO) {
|
||||
return accountService.getAccountNoPage(respVO);
|
||||
}
|
||||
}
|
||||
@@ -3,10 +3,14 @@ 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.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;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 账户条款 Mapper
|
||||
*
|
||||
@@ -31,4 +35,18 @@ public interface AccountMapper extends BaseMapperX<AccountDO> {
|
||||
.orderByDesc(AccountDO::getId));
|
||||
}
|
||||
|
||||
default List<AccountDO> selectNoPage(AccountRespDto reqVO){
|
||||
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())
|
||||
.orderByDesc(AccountDO::getId));
|
||||
}
|
||||
}
|
||||
@@ -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.AccountRespDto;
|
||||
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;
|
||||
@@ -67,4 +68,6 @@ public interface AccountService {
|
||||
* @param saveReqVOS 账户条款
|
||||
*/
|
||||
void enableAccountList(List<AccountSaveReqVO> saveReqVOS);
|
||||
|
||||
List<AccountRespDto> getAccountNoPage(AccountRespDto 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.AccountRespDto;
|
||||
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;
|
||||
@@ -96,4 +97,9 @@ public class AccountServiceImpl implements AccountService {
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<AccountRespDto> getAccountNoPage(AccountRespDto respVO) {
|
||||
List<AccountDO> entityList = accountMapper.selectNoPage(respVO);
|
||||
return BeanUtils.toBean(entityList, AccountRespDto.class);
|
||||
}
|
||||
}
|
||||
@@ -30,6 +30,7 @@
|
||||
left join SPLY_ERP_CPN c on r.ERP_NUM = c.NUM
|
||||
where d.DELETED = 0
|
||||
and d.IS_COMPANY = 1
|
||||
and r.DELETED = 0
|
||||
<if test="name != null">
|
||||
and d.NAME = #{name}
|
||||
</if>
|
||||
|
||||
Reference in New Issue
Block a user