Merge branch 'refs/heads/dev' into test

This commit is contained in:
liss
2025-10-15 11:51:03 +08:00
20 changed files with 499 additions and 0 deletions

View File

@@ -0,0 +1,23 @@
package com.zt.plat.module.api;
import com.zt.plat.framework.common.pojo.CommonResult;
import com.zt.plat.module.api.dto.AccountRespDto;
import com.zt.plat.module.base.enums.ApiConstants;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import jakarta.validation.Valid;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import java.util.List;
@FeignClient(name = ApiConstants.NAME)
@Tag(name = "RPC 服务 - base")
public interface BaseApi {
String PREFIX = ApiConstants.PREFIX + "/base";
@GetMapping(PREFIX + "/getNoPage")
@Operation(summary = "数据查询")
List<AccountRespDto> getNoPage(@Valid AccountRespDto respVO);
}

View File

@@ -0,0 +1,35 @@
package com.zt.plat.module.api.dto;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import java.time.LocalDateTime;
@Schema(description = "RPC 服务 DTO")
@Data
public class AccountRespDto {
private Long id;
private String type;
private String accountName;
private String bankAccount;
private String accountNumber;
private String taxNumber;
private LocalDateTime createTime;
private String isEnable;
private String customerNumber;
private String customerName;
private String address;
private String phone;
}

View File

@@ -0,0 +1,24 @@
package com.zt.plat.module.base.enums;
import com.zt.plat.framework.common.enums.RpcConstants;
/**
* API 相关的枚举
*
* @author ZT
*/
public class ApiConstants {
/**
* 服务名
*
* 注意,需要保证和 spring.application.name 保持一致
*/
public static final String NAME = "base-server";
public static final String PREFIX = RpcConstants.RPC_API_PREFIX + "/base";
public static final String VERSION = "1.0.0";
public static final String TABLE_FIELD_SPLY_ERP_CPN_NUM = "NUM";
}

View File

@@ -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);
}
}

View File

@@ -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));
}
}

View File

@@ -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);
}

View File

@@ -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);
}
}

View File

@@ -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>

View File

@@ -23,4 +23,5 @@ public interface ErrorCodeConstants {
ErrorCode CONTRACT_STATUS_NOT_APPROVAL = new ErrorCode(1_027_000_008, "{}状态合同不允许审核");
ErrorCode CONTRACT_ERP_COMPANY_PLEASE_BIND = new ErrorCode(1_027_000_009, "请先绑定{}ERP公司信息");
ErrorCode CONTRACT_STATUS_NOT_DELETE = new ErrorCode(1_027_000_010, "{}状态合同不允许删除");
ErrorCode CONTRACT_ERP_RCV_DLVY_NOT_EXISTS = new ErrorCode(1_027_000_010, "不存在的收支类型或收支类型为空");
}

View File

@@ -20,6 +20,7 @@ public class TableFieldConstants {
public static final String BSE_CTRT_MAIN_CTRT_PPR_NUM = "CTRT_PPR_NUM";
public static final String BSE_CTRT_MAIN_CTRT_PPR_NUM_LABEL = "合同编号";
// 甲方公司编号
public static final String BSE_CTRT_MAIN_PRCH_CPN_NUM = "PRCH_CPN_NUM";
public static final String BSE_CTRT_MAIN_PRCH_CPN_NUM_LABEL = "甲方公司编号";
// 甲方公司名称
public static final String BSE_CTRT_MAIN_PRCH_CPN_NAME_LABEL = "甲方公司名称";
@@ -28,6 +29,7 @@ public class TableFieldConstants {
// 甲方法定代表人
public static final String BSE_CTRT_MAIN_PRCH_LDR_LABEL = "甲方法定代表人";
// 乙方公司编号
public static final String BSE_CTRT_MAIN_SALE_CPN_NUM = "SALE_CPN_NUM_LABEL";
public static final String BSE_CTRT_MAIN_SALE_CPN_NUM_LABEL = "乙方公司编号";
// 乙方公司名称
public static final String BSE_CTRT_MAIN_SALE_CPN_NAME_LABEL = "乙方公司名称";
@@ -135,4 +137,10 @@ public class TableFieldConstants {
/* 实例条款值表 */
// 关联实例主键
public static final String BSE_TMPL_INSC_ITM_INSC_ID = "INSC_ID";
/* 业务关联表 */
// 上游主键
public static final String BSE_SYS_REL_UP_ID = "UP_ID";
// 下游主键
public static final String BSE_SYS_REL_DOWN_ID = "DOWN_ID";
}

Some files were not shown because too many files have changed in this diff Show More