物料查询关联拓展关系
This commit is contained in:
@@ -1,11 +1,10 @@
|
|||||||
package com.zt.plat.module.api;
|
package com.zt.plat.module.api;
|
||||||
|
|
||||||
import com.zt.plat.framework.common.pojo.CommonResult;
|
import com.zt.plat.module.api.dto.AccountDTO;
|
||||||
import com.zt.plat.module.api.dto.AccountRespDto;
|
import com.zt.plat.module.api.dto.MaterialOtherDTO;
|
||||||
import com.zt.plat.module.base.enums.ApiConstants;
|
import com.zt.plat.module.base.enums.ApiConstants;
|
||||||
import io.swagger.v3.oas.annotations.Operation;
|
import io.swagger.v3.oas.annotations.Operation;
|
||||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||||
import jakarta.validation.Valid;
|
|
||||||
import org.springframework.cloud.openfeign.FeignClient;
|
import org.springframework.cloud.openfeign.FeignClient;
|
||||||
import org.springframework.web.bind.annotation.GetMapping;
|
import org.springframework.web.bind.annotation.GetMapping;
|
||||||
|
|
||||||
@@ -17,7 +16,11 @@ public interface BaseApi {
|
|||||||
|
|
||||||
String PREFIX = ApiConstants.PREFIX + "/base";
|
String PREFIX = ApiConstants.PREFIX + "/base";
|
||||||
|
|
||||||
@GetMapping(PREFIX + "/getNoPage")
|
@GetMapping(PREFIX + "/getAccountNoPage")
|
||||||
@Operation(summary = "数据查询")
|
@Operation(summary = "账户条款数据不分页查询")
|
||||||
List<AccountRespDto> getNoPage(@Valid AccountRespDto respVO);
|
List<AccountDTO> getAccountNoPage(AccountDTO respVO);
|
||||||
|
|
||||||
|
@GetMapping(PREFIX + "/getMaterialOtherNoPage")
|
||||||
|
@Operation(summary = "物料拓展关系数据不分页查询")
|
||||||
|
List<MaterialOtherDTO> getMaterialOtherNoPage(MaterialOtherDTO respVO);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ import java.time.LocalDateTime;
|
|||||||
|
|
||||||
@Schema(description = "RPC 服务 DTO")
|
@Schema(description = "RPC 服务 DTO")
|
||||||
@Data
|
@Data
|
||||||
public class AccountRespDto {
|
public class AccountDTO {
|
||||||
private Long id;
|
private Long id;
|
||||||
|
|
||||||
private String type;
|
private String type;
|
||||||
@@ -0,0 +1,53 @@
|
|||||||
|
package com.zt.plat.module.api.dto;
|
||||||
|
|
||||||
|
import com.zt.plat.framework.common.pojo.PageParam;
|
||||||
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
|
import lombok.Data;
|
||||||
|
import org.springframework.format.annotation.DateTimeFormat;
|
||||||
|
|
||||||
|
import java.time.LocalDateTime;
|
||||||
|
|
||||||
|
import static com.zt.plat.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND;
|
||||||
|
|
||||||
|
@Schema(description = "管理后台 - 物料拓展数据分页 Request VO")
|
||||||
|
@Data
|
||||||
|
public class MaterialOtherDTO extends PageParam {
|
||||||
|
|
||||||
|
@Schema(description = "物料编码")
|
||||||
|
private String materialNumber;
|
||||||
|
|
||||||
|
@Schema(description = "物料名称", example = "王五")
|
||||||
|
private String materialName;
|
||||||
|
|
||||||
|
@Schema(description = "ERP物料编码")
|
||||||
|
private String erpMaterialNumber;
|
||||||
|
|
||||||
|
@Schema(description = "ERP物料名称", example = "李四")
|
||||||
|
private String erpMaterialName;
|
||||||
|
|
||||||
|
@Schema(description = "ERP物料计量单位")
|
||||||
|
private String unit;
|
||||||
|
|
||||||
|
@Schema(description = "金属元素缩写")
|
||||||
|
private String abbreviation;
|
||||||
|
|
||||||
|
@Schema(description = "金属元素名称", example = "赵六")
|
||||||
|
private String name;
|
||||||
|
|
||||||
|
@Schema(description = "金属元素编码")
|
||||||
|
private String coding;
|
||||||
|
|
||||||
|
@Schema(description = "品位单位")
|
||||||
|
private String gradeUnit;
|
||||||
|
|
||||||
|
@Schema(description = "创建时间")
|
||||||
|
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
|
||||||
|
private LocalDateTime[] createTime;
|
||||||
|
|
||||||
|
@Schema(description = "小数位数")
|
||||||
|
private Long decimalValue;
|
||||||
|
|
||||||
|
@Schema(description = "是否启用")
|
||||||
|
private String isEnable;
|
||||||
|
|
||||||
|
}
|
||||||
@@ -1,10 +1,10 @@
|
|||||||
package com.zt.plat.module.base.api;
|
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.BaseApi;
|
||||||
import com.zt.plat.module.api.dto.AccountRespDto;
|
import com.zt.plat.module.api.dto.AccountDTO;
|
||||||
import com.zt.plat.module.base.dal.dataobject.base.AccountDO;
|
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.AccountService;
|
||||||
|
import com.zt.plat.module.base.service.base.MaterialOtherService;
|
||||||
import jakarta.annotation.Resource;
|
import jakarta.annotation.Resource;
|
||||||
import org.springframework.validation.annotation.Validated;
|
import org.springframework.validation.annotation.Validated;
|
||||||
import org.springframework.web.bind.annotation.RestController;
|
import org.springframework.web.bind.annotation.RestController;
|
||||||
@@ -24,8 +24,16 @@ public class BaseApiImpl implements BaseApi {
|
|||||||
@Resource
|
@Resource
|
||||||
private AccountService accountService;
|
private AccountService accountService;
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
private MaterialOtherService materialOtherService;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<AccountRespDto> getNoPage(AccountRespDto respVO) {
|
public List<AccountDTO> getAccountNoPage(AccountDTO respVO) {
|
||||||
return accountService.getAccountNoPage(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.common.pojo.PageResult;
|
||||||
import com.zt.plat.framework.mybatis.core.mapper.BaseMapperX;
|
import com.zt.plat.framework.mybatis.core.mapper.BaseMapperX;
|
||||||
import com.zt.plat.framework.mybatis.core.query.LambdaQueryWrapperX;
|
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.AccountPageReqVO;
|
||||||
import com.zt.plat.module.base.controller.admin.base.vo.AccountRespVO;
|
|
||||||
import com.zt.plat.module.base.dal.dataobject.base.AccountDO;
|
import com.zt.plat.module.base.dal.dataobject.base.AccountDO;
|
||||||
import org.apache.ibatis.annotations.Mapper;
|
import org.apache.ibatis.annotations.Mapper;
|
||||||
|
|
||||||
@@ -35,18 +34,18 @@ public interface AccountMapper extends BaseMapperX<AccountDO> {
|
|||||||
.orderByDesc(AccountDO::getId));
|
.orderByDesc(AccountDO::getId));
|
||||||
}
|
}
|
||||||
|
|
||||||
default List<AccountDO> selectNoPage(AccountRespDto reqVO){
|
default List<AccountDO> selectNoPage(AccountDTO dto){
|
||||||
return selectList(new LambdaQueryWrapperX<AccountDO>()
|
return selectList(new LambdaQueryWrapperX<AccountDO>()
|
||||||
.eqIfPresent(AccountDO::getType, reqVO.getType())
|
.eqIfPresent(AccountDO::getType, dto.getType())
|
||||||
.likeIfPresent(AccountDO::getAccountName, reqVO.getAccountName())
|
.likeIfPresent(AccountDO::getAccountName, dto.getAccountName())
|
||||||
.likeIfPresent(AccountDO::getAddress, reqVO.getAddress())
|
.likeIfPresent(AccountDO::getAddress, dto.getAddress())
|
||||||
.likeIfPresent(AccountDO::getPhone, reqVO.getPhone())
|
.likeIfPresent(AccountDO::getPhone, dto.getPhone())
|
||||||
.eqIfPresent(AccountDO::getBankAccount, reqVO.getBankAccount())
|
.eqIfPresent(AccountDO::getBankAccount, dto.getBankAccount())
|
||||||
.eqIfPresent(AccountDO::getCustomerName, reqVO.getCustomerName())
|
.eqIfPresent(AccountDO::getCustomerName, dto.getCustomerName())
|
||||||
.eqIfPresent(AccountDO::getCustomerNumber, reqVO.getCustomerNumber())
|
.eqIfPresent(AccountDO::getCustomerNumber, dto.getCustomerNumber())
|
||||||
.eqIfPresent(AccountDO::getIsEnable, reqVO.getIsEnable())
|
.eqIfPresent(AccountDO::getIsEnable, dto.getIsEnable())
|
||||||
.eqIfPresent(AccountDO::getAccountNumber, reqVO.getAccountNumber())
|
.eqIfPresent(AccountDO::getAccountNumber, dto.getAccountNumber())
|
||||||
.eqIfPresent(AccountDO::getTaxNumber, reqVO.getTaxNumber())
|
.eqIfPresent(AccountDO::getTaxNumber, dto.getTaxNumber())
|
||||||
.orderByDesc(AccountDO::getId));
|
.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.common.pojo.PageResult;
|
||||||
import com.zt.plat.framework.mybatis.core.mapper.BaseMapperX;
|
import com.zt.plat.framework.mybatis.core.mapper.BaseMapperX;
|
||||||
import com.zt.plat.framework.mybatis.core.query.LambdaQueryWrapperX;
|
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.controller.admin.base.vo.MaterialOtherPageReqVO;
|
||||||
import com.zt.plat.module.base.dal.dataobject.base.MaterialOtherDO;
|
import com.zt.plat.module.base.dal.dataobject.base.MaterialOtherDO;
|
||||||
import org.apache.ibatis.annotations.Mapper;
|
import org.apache.ibatis.annotations.Mapper;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 物料拓展数据 Mapper
|
* 物料拓展数据 Mapper
|
||||||
*
|
*
|
||||||
@@ -32,4 +35,20 @@ public interface MaterialOtherMapper extends BaseMapperX<MaterialOtherDO> {
|
|||||||
.orderByDesc(MaterialOtherDO::getId));
|
.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;
|
package com.zt.plat.module.base.service.base;
|
||||||
|
|
||||||
import com.zt.plat.framework.common.pojo.PageResult;
|
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.AccountPageReqVO;
|
||||||
import com.zt.plat.module.base.controller.admin.base.vo.AccountRespVO;
|
import com.zt.plat.module.base.controller.admin.base.vo.AccountRespVO;
|
||||||
import com.zt.plat.module.base.controller.admin.base.vo.AccountSaveReqVO;
|
import com.zt.plat.module.base.controller.admin.base.vo.AccountSaveReqVO;
|
||||||
@@ -69,5 +69,5 @@ public interface AccountService {
|
|||||||
*/
|
*/
|
||||||
void enableAccountList(List<AccountSaveReqVO> saveReqVOS);
|
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 cn.hutool.core.collection.CollUtil;
|
||||||
import com.zt.plat.framework.common.pojo.PageResult;
|
import com.zt.plat.framework.common.pojo.PageResult;
|
||||||
import com.zt.plat.framework.common.util.object.BeanUtils;
|
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.AccountPageReqVO;
|
||||||
import com.zt.plat.module.base.controller.admin.base.vo.AccountRespVO;
|
import com.zt.plat.module.base.controller.admin.base.vo.AccountRespVO;
|
||||||
import com.zt.plat.module.base.controller.admin.base.vo.AccountSaveReqVO;
|
import com.zt.plat.module.base.controller.admin.base.vo.AccountSaveReqVO;
|
||||||
@@ -98,8 +98,8 @@ public class AccountServiceImpl implements AccountService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<AccountRespDto> getAccountNoPage(AccountRespDto respVO) {
|
public List<AccountDTO> getAccountNoPage(AccountDTO dto) {
|
||||||
List<AccountDO> entityList = accountMapper.selectNoPage(respVO);
|
List<AccountDO> entityList = accountMapper.selectNoPage(dto);
|
||||||
return BeanUtils.toBean(entityList, AccountRespDto.class);
|
return BeanUtils.toBean(entityList, AccountDTO.class);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1,6 +1,7 @@
|
|||||||
package com.zt.plat.module.base.service.base;
|
package com.zt.plat.module.base.service.base;
|
||||||
|
|
||||||
import com.zt.plat.framework.common.pojo.PageResult;
|
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.MaterialOtherPageReqVO;
|
||||||
import com.zt.plat.module.base.controller.admin.base.vo.MaterialOtherRespVO;
|
import com.zt.plat.module.base.controller.admin.base.vo.MaterialOtherRespVO;
|
||||||
import com.zt.plat.module.base.controller.admin.base.vo.MaterialOtherSaveReqVO;
|
import com.zt.plat.module.base.controller.admin.base.vo.MaterialOtherSaveReqVO;
|
||||||
@@ -62,4 +63,6 @@ public interface MaterialOtherService {
|
|||||||
PageResult<MaterialOtherDO> getMaterialOtherPage(MaterialOtherPageReqVO pageReqVO);
|
PageResult<MaterialOtherDO> getMaterialOtherPage(MaterialOtherPageReqVO pageReqVO);
|
||||||
|
|
||||||
void enableMaterialOtherList(List<MaterialOtherRespVO> saveReqVOS);
|
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 cn.hutool.core.collection.CollUtil;
|
||||||
import com.zt.plat.framework.common.pojo.PageResult;
|
import com.zt.plat.framework.common.pojo.PageResult;
|
||||||
import com.zt.plat.framework.common.util.object.BeanUtils;
|
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.MaterialOtherPageReqVO;
|
||||||
import com.zt.plat.module.base.controller.admin.base.vo.MaterialOtherRespVO;
|
import com.zt.plat.module.base.controller.admin.base.vo.MaterialOtherRespVO;
|
||||||
import com.zt.plat.module.base.controller.admin.base.vo.MaterialOtherSaveReqVO;
|
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);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -109,4 +109,12 @@ public class ErpMaterialController {
|
|||||||
return success(true);
|
return success(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@GetMapping("/pageAndOther")
|
||||||
|
@Operation(summary = "获得ERP物料数据分页并关联拓展数据")
|
||||||
|
@PreAuthorize("@ss.hasPermission('sply:erp-material:query')")
|
||||||
|
public CommonResult<PageResult<ErpMaterialRespVO>> getErpMaterialPageAndOther(@Valid ErpMaterialPageReqVO pageReqVO) {
|
||||||
|
PageResult<ErpMaterialRespVO> pageResult = erpMaterialService.getErpMaterialPageAndOther(pageReqVO);
|
||||||
|
return success(BeanUtils.toBean(pageResult, ErpMaterialRespVO.class));
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -2,10 +2,12 @@ package com.zt.plat.module.erp.controller.admin.erp.vo;
|
|||||||
|
|
||||||
import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
|
import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
|
||||||
import com.alibaba.excel.annotation.ExcelProperty;
|
import com.alibaba.excel.annotation.ExcelProperty;
|
||||||
|
import com.zt.plat.module.api.dto.MaterialOtherDTO;
|
||||||
import io.swagger.v3.oas.annotations.media.Schema;
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
|
||||||
import java.time.LocalDateTime;
|
import java.time.LocalDateTime;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
@Schema(description = "管理后台 - ERP物料数据 Response VO")
|
@Schema(description = "管理后台 - ERP物料数据 Response VO")
|
||||||
@Data
|
@Data
|
||||||
@@ -72,4 +74,6 @@ public class ErpMaterialRespVO {
|
|||||||
@ExcelProperty("类型")
|
@ExcelProperty("类型")
|
||||||
private String type;
|
private String type;
|
||||||
|
|
||||||
|
private List<MaterialOtherDTO> materialOtherDTOS;
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -5,6 +5,8 @@ import com.zt.plat.framework.mybatis.core.dataobject.BusinessBaseDO;
|
|||||||
import lombok.*;
|
import lombok.*;
|
||||||
|
|
||||||
import java.time.LocalDateTime;
|
import java.time.LocalDateTime;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* ERP物料数据 DO
|
* ERP物料数据 DO
|
||||||
*
|
*
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ import com.zt.plat.framework.common.pojo.PageResult;
|
|||||||
import com.zt.plat.framework.common.util.object.BeanUtils;
|
import com.zt.plat.framework.common.util.object.BeanUtils;
|
||||||
import com.zt.plat.framework.mybatis.core.query.LambdaQueryWrapperX;
|
import com.zt.plat.framework.mybatis.core.query.LambdaQueryWrapperX;
|
||||||
import com.zt.plat.module.api.BaseApi;
|
import com.zt.plat.module.api.BaseApi;
|
||||||
import com.zt.plat.module.api.dto.AccountRespDto;
|
import com.zt.plat.module.api.dto.AccountDTO;
|
||||||
import com.zt.plat.module.erp.controller.admin.erp.vo.ErpCompanyPageReqVO;
|
import com.zt.plat.module.erp.controller.admin.erp.vo.ErpCompanyPageReqVO;
|
||||||
import com.zt.plat.module.erp.controller.admin.erp.vo.ErpCompanyRespVO;
|
import com.zt.plat.module.erp.controller.admin.erp.vo.ErpCompanyRespVO;
|
||||||
import com.zt.plat.module.erp.controller.admin.erp.vo.ErpCompanySaveReqVO;
|
import com.zt.plat.module.erp.controller.admin.erp.vo.ErpCompanySaveReqVO;
|
||||||
@@ -37,8 +37,6 @@ import java.util.stream.Collectors;
|
|||||||
import static com.zt.plat.framework.common.exception.util.ServiceExceptionUtil.exception;
|
import static com.zt.plat.framework.common.exception.util.ServiceExceptionUtil.exception;
|
||||||
import static com.zt.plat.module.erp.enums.ApiConstants.TABLE_FIELD_SPLY_ERP_CPN_NUM;
|
import static com.zt.plat.module.erp.enums.ApiConstants.TABLE_FIELD_SPLY_ERP_CPN_NUM;
|
||||||
import static com.zt.plat.module.erp.enums.ErrorCodeConstants.ERP_COMPANY_NOT_EXISTS;
|
import static com.zt.plat.module.erp.enums.ErrorCodeConstants.ERP_COMPANY_NOT_EXISTS;
|
||||||
import static com.zt.plat.module.erp.enums.ErrorCodeConstants.ERP_ERROR_EXISTS;
|
|
||||||
import static dm.jdbc.util.DriverUtil.log;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* ERP公司 Service 实现类
|
* ERP公司 Service 实现类
|
||||||
@@ -296,9 +294,9 @@ public class ErpCompanyServiceImpl implements ErpCompanyService {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String test2() {
|
public String test2() {
|
||||||
AccountRespDto respVO = new AccountRespDto();
|
AccountDTO respVO = new AccountDTO();
|
||||||
respVO.setCustomerNumber("50000760");
|
respVO.setCustomerNumber("50000760");
|
||||||
List<AccountRespDto> dtos = baseApi.getNoPage(respVO);
|
List<AccountDTO> dtos = baseApi.getAccountNoPage(respVO);
|
||||||
return dtos.toString();
|
return dtos.toString();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -62,4 +62,6 @@ public interface ErpMaterialService {
|
|||||||
PageResult<ErpMaterialDO> getErpMaterialPage(ErpMaterialPageReqVO pageReqVO);
|
PageResult<ErpMaterialDO> getErpMaterialPage(ErpMaterialPageReqVO pageReqVO);
|
||||||
|
|
||||||
void callErpRfcInterface();
|
void callErpRfcInterface();
|
||||||
|
|
||||||
|
PageResult<ErpMaterialRespVO> getErpMaterialPageAndOther(ErpMaterialPageReqVO pageReqVO);
|
||||||
}
|
}
|
||||||
@@ -7,6 +7,8 @@ import com.xxl.job.core.handler.annotation.XxlJob;
|
|||||||
import com.zt.plat.framework.common.pojo.PageResult;
|
import com.zt.plat.framework.common.pojo.PageResult;
|
||||||
import com.zt.plat.framework.common.util.object.BeanUtils;
|
import com.zt.plat.framework.common.util.object.BeanUtils;
|
||||||
import com.zt.plat.framework.mybatis.core.query.LambdaQueryWrapperX;
|
import com.zt.plat.framework.mybatis.core.query.LambdaQueryWrapperX;
|
||||||
|
import com.zt.plat.module.api.BaseApi;
|
||||||
|
import com.zt.plat.module.api.dto.MaterialOtherDTO;
|
||||||
import com.zt.plat.module.erp.dal.dataobject.erp.ErpWarehouseDO;
|
import com.zt.plat.module.erp.dal.dataobject.erp.ErpWarehouseDO;
|
||||||
import com.zt.plat.module.erp.utils.ErpConfig;
|
import com.zt.plat.module.erp.utils.ErpConfig;
|
||||||
import com.zt.plat.module.erp.utils.MyRedisConfig;
|
import com.zt.plat.module.erp.utils.MyRedisConfig;
|
||||||
@@ -45,6 +47,8 @@ public class ErpMaterialServiceImpl implements ErpMaterialService {
|
|||||||
@Resource
|
@Resource
|
||||||
private ErpMaterialMapper erpMaterialMapper;
|
private ErpMaterialMapper erpMaterialMapper;
|
||||||
@Resource
|
@Resource
|
||||||
|
private BaseApi baseApi;
|
||||||
|
@Resource
|
||||||
private MyRedisConfig myRedisConfig;
|
private MyRedisConfig myRedisConfig;
|
||||||
@Resource
|
@Resource
|
||||||
private ErpConfig erpConfig;
|
private ErpConfig erpConfig;
|
||||||
@@ -151,6 +155,25 @@ public class ErpMaterialServiceImpl implements ErpMaterialService {
|
|||||||
return erpMaterialMapper.selectPage(pageReqVO);
|
return erpMaterialMapper.selectPage(pageReqVO);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public PageResult<ErpMaterialRespVO> getErpMaterialPageAndOther(ErpMaterialPageReqVO pageReqVO) {
|
||||||
|
try {
|
||||||
|
PageResult<ErpMaterialDO> pageResult = erpMaterialMapper.selectPage(pageReqVO);
|
||||||
|
PageResult<ErpMaterialRespVO> pageResultRespVo = BeanUtils.toBean(pageResult, ErpMaterialRespVO.class);
|
||||||
|
for (ErpMaterialRespVO respVO : pageResultRespVo.getList()) {
|
||||||
|
MaterialOtherDTO dto = new MaterialOtherDTO();
|
||||||
|
dto.setMaterialNumber(respVO.getDownCenterNumber());
|
||||||
|
List<MaterialOtherDTO> dtos = baseApi.getMaterialOtherNoPage(dto);
|
||||||
|
if (dtos != null){
|
||||||
|
respVO.setMaterialOtherDTOS(dtos);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return pageResultRespVo;
|
||||||
|
} catch (Exception e) {
|
||||||
|
throw exception(ERP_MATERIAL_NOT_EXISTS);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@Transactional
|
@Transactional
|
||||||
@XxlJob("getErpMaterialTask")
|
@XxlJob("getErpMaterialTask")
|
||||||
|
|||||||
Reference in New Issue
Block a user