新增库位新表的相关功能,修复合同收发货规则
This commit is contained in:
@@ -168,9 +168,8 @@ public class ErpMaterialController {
|
||||
@GetMapping("/erpMaterial-mainMaterial-code")
|
||||
@Operation(summary = "通过主物料编号查询子物料信息")
|
||||
@PreAuthorize("@ss.hasPermission('sply:erp-material:query')")
|
||||
public CommonResult<List<ErpMaterialRespVO>> getErpMaterialByMainMaterialByCOde(String code) {
|
||||
|
||||
return success(BeanUtils.toBean(List.of(new MaterialInfomationPageReqDTO()), ErpMaterialRespVO.class));
|
||||
public CommonResult<ErpMaterialRespVO> getErpMaterialByMainMaterialByCode(String code) {
|
||||
return success(BeanUtils.toBean(erpMaterialService.getErpMaterialByMainMaterialByCode(code), ErpMaterialRespVO.class));
|
||||
}
|
||||
|
||||
//查询物料
|
||||
@@ -179,6 +178,6 @@ public class ErpMaterialController {
|
||||
@PreAuthorize("@ss.hasPermission('sply:erp-material:query')")
|
||||
public CommonResult<List<ErpMaterialRespVO>> getErpMaterialByApiByCode(String code) {
|
||||
|
||||
return success(BeanUtils.toBean(List.of(new MaterialInfomationPageReqDTO()), ErpMaterialRespVO.class));
|
||||
return success(BeanUtils.toBean(erpMaterialService.getErpMaterialByApiByCode(code), ErpMaterialRespVO.class));
|
||||
}
|
||||
}
|
||||
@@ -83,8 +83,8 @@ public class ErpWarehouseController {
|
||||
@GetMapping("/page")
|
||||
@Operation(summary = "获得ERP库位分页")
|
||||
@PreAuthorize("@ss.hasPermission('sply:erp-warehouse:query')")
|
||||
public CommonResult<PageResult<ErpWarehouseRespVO>> getErpWarehousePage(@Valid ErpWarehousePageReqVO pageReqVO) {
|
||||
PageResult<ErpWarehouseRespVO> pageResult = erpWarehouseService.getErpWarehousePage(pageReqVO);
|
||||
public CommonResult<PageResult<ErpWarehouseDO> > getErpWarehousePage(@Valid ErpWarehousePageReqVO pageReqVO) {
|
||||
PageResult<ErpWarehouseDO> pageResult = erpWarehouseService.getErpWarehousePage(pageReqVO);
|
||||
return success(pageResult);
|
||||
}
|
||||
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,19 @@
|
||||
package com.zt.plat.module.erp.controller.admin.erp.internalwarehouse.vo;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import jakarta.validation.constraints.NotNull;
|
||||
import lombok.Data;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
|
||||
|
||||
import java.util.List;
|
||||
@Data
|
||||
@Schema(description = "ERP库位启用禁用 Request VO")
|
||||
@Validated
|
||||
public class InternalWarehouseEnableDisableReqVO {
|
||||
@Schema(description = "主键列表")
|
||||
@NotNull(message = "主键列表不能为空")
|
||||
private List<String> ids;
|
||||
@Schema(description = "状态")
|
||||
private String isEnable;
|
||||
}
|
||||
@@ -0,0 +1,49 @@
|
||||
package com.zt.plat.module.erp.controller.admin.erp.internalwarehouse.vo;
|
||||
|
||||
import lombok.*;
|
||||
import java.util.*;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import com.zt.plat.framework.common.pojo.PageParam;
|
||||
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 = "管理后台 - ERP库位分页 Request VO")
|
||||
@Data
|
||||
public class InternalWarehousePageReqVO extends PageParam {
|
||||
|
||||
@Schema(description = "工厂编码")
|
||||
private String factoryNumber;
|
||||
|
||||
@Schema(description = "库位名称", example = "赵六")
|
||||
private String name;
|
||||
|
||||
@Schema(description = "库位编码")
|
||||
private String number;
|
||||
|
||||
@Schema(description = "类型;数据字典(SPLY_FACT_TP)", example = "2")
|
||||
private String type;
|
||||
|
||||
@Schema(description = "绑定库位名称", example = "张三")
|
||||
private String relativityName;
|
||||
|
||||
@Schema(description = "绑定库位编码")
|
||||
private String relativityNumber;
|
||||
|
||||
@Schema(description = "是否启用")
|
||||
private String isEnable;
|
||||
|
||||
@Schema(description = "创建时间")
|
||||
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
|
||||
private LocalDateTime[] createTime;
|
||||
|
||||
@Schema(description = "erp公司编码")
|
||||
private String companyIdCustom;
|
||||
|
||||
@Schema(description = "erp公司名称")
|
||||
private String companyNameCustom;
|
||||
|
||||
@Schema(description = "工厂名称")
|
||||
private String factoryName;
|
||||
}
|
||||
@@ -0,0 +1,61 @@
|
||||
package com.zt.plat.module.erp.controller.admin.erp.internalwarehouse.vo;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.*;
|
||||
import java.util.*;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
import java.time.LocalDateTime;
|
||||
import com.alibaba.excel.annotation.*;
|
||||
|
||||
@Schema(description = "管理后台 - ERP库位 Response VO")
|
||||
@Data
|
||||
@ExcelIgnoreUnannotated
|
||||
public class InternalWarehouseRespVO {
|
||||
|
||||
@Schema(description = "主键", requiredMode = Schema.RequiredMode.REQUIRED, example = "20049")
|
||||
@ExcelProperty("主键")
|
||||
private Long id;
|
||||
|
||||
@Schema(description = "工厂编码")
|
||||
@ExcelProperty("工厂编码")
|
||||
private String factoryNumber;
|
||||
|
||||
@Schema(description = "库位名称", example = "赵六")
|
||||
@ExcelProperty("库位名称")
|
||||
private String name;
|
||||
|
||||
@Schema(description = "库位编码")
|
||||
@ExcelProperty("库位编码")
|
||||
private String number;
|
||||
|
||||
@Schema(description = "类型;数据字典(SPLY_FACT_TP)", example = "2")
|
||||
@ExcelProperty("类型;数据字典(SPLY_FACT_TP)")
|
||||
private String type;
|
||||
|
||||
@Schema(description = "绑定库位名称", example = "张三")
|
||||
@ExcelProperty("绑定库位名称")
|
||||
private String relativityName;
|
||||
|
||||
@Schema(description = "绑定库位编码")
|
||||
@ExcelProperty("绑定库位编码")
|
||||
private String relativityNumber;
|
||||
|
||||
@Schema(description = "是否启用")
|
||||
@ExcelProperty("是否启用")
|
||||
private String isEnable;
|
||||
|
||||
@Schema(description = "创建时间")
|
||||
@ExcelProperty("创建时间")
|
||||
private LocalDateTime createTime;
|
||||
|
||||
@Schema(description = "erp公司编码")
|
||||
@ExcelProperty("erp公司编码")
|
||||
private String companyIdCustom;
|
||||
|
||||
@Schema(description = "erp公司名称")
|
||||
@ExcelProperty("erp公司名称")
|
||||
private String companyNameCustom;
|
||||
@Schema(description = "工厂名称")
|
||||
@ExcelProperty("工厂名称")
|
||||
private String factoryName;
|
||||
}
|
||||
@@ -0,0 +1,44 @@
|
||||
package com.zt.plat.module.erp.controller.admin.erp.internalwarehouse.vo;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.*;
|
||||
import java.util.*;
|
||||
import jakarta.validation.constraints.*;
|
||||
|
||||
@Schema(description = "管理后台 - ERP库位新增/修改 Request VO")
|
||||
@Data
|
||||
public class InternalWarehouseSaveReqVO {
|
||||
|
||||
@Schema(description = "主键", requiredMode = Schema.RequiredMode.REQUIRED, example = "20049")
|
||||
private Long id;
|
||||
|
||||
@Schema(description = "工厂编码")
|
||||
private String factoryNumber;
|
||||
|
||||
@Schema(description = "库位名称", example = "赵六")
|
||||
private String name;
|
||||
|
||||
@Schema(description = "库位编码")
|
||||
private String number;
|
||||
|
||||
@Schema(description = "类型;数据字典(SPLY_FACT_TP)", example = "2")
|
||||
private String type;
|
||||
|
||||
@Schema(description = "绑定库位名称", example = "张三")
|
||||
private String relativityName;
|
||||
|
||||
@Schema(description = "绑定库位编码")
|
||||
private String relativityNumber;
|
||||
|
||||
@Schema(description = "是否启用")
|
||||
private String isEnable;
|
||||
|
||||
@Schema(description = "erp公司编码")
|
||||
private String companyIdCustom;
|
||||
|
||||
@Schema(description = "erp公司名称")
|
||||
private String companyNameCustom;
|
||||
@Schema(description = "工厂名称")
|
||||
private String factoryName;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,85 @@
|
||||
package com.zt.plat.module.erp.dal.dataobject.erp.internalwarehouse;
|
||||
|
||||
import lombok.*;
|
||||
import java.util.*;
|
||||
import java.time.LocalDateTime;
|
||||
import java.time.LocalDateTime;
|
||||
import com.baomidou.mybatisplus.annotation.*;
|
||||
import com.zt.plat.framework.mybatis.core.dataobject.BusinessBaseDO;
|
||||
/**
|
||||
* ERP库位 DO
|
||||
*
|
||||
* @author 后台管理-1
|
||||
*/
|
||||
@TableName("bse_intl_wrh")
|
||||
@KeySequence("bse_intl_wrh_seq") // 用于 Oracle、PostgreSQL、Kingbase、DB2、H2 数据库的主键自增。如果是 MySQL 等数据库,可不写。
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@ToString(callSuper = true)
|
||||
@Builder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
/**
|
||||
* 支持业务基类继承:isBusiness=true 时继承 BusinessBaseDO,否则继承 BaseDO
|
||||
*/
|
||||
public class InternalWarehouseDO extends BusinessBaseDO {
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 主键
|
||||
*/
|
||||
@TableId(type = IdType.ASSIGN_ID)
|
||||
private Long id;
|
||||
/**
|
||||
* 工厂编码
|
||||
*/
|
||||
@TableField("FACT_NUM")
|
||||
private String factoryNumber;
|
||||
/**
|
||||
* 库位名称
|
||||
*/
|
||||
@TableField("NAME")
|
||||
private String name;
|
||||
/**
|
||||
* 库位编码
|
||||
*/
|
||||
@TableField("NUM")
|
||||
private String number;
|
||||
/**
|
||||
* 类型;数据字典(SPLY_FACT_TP)
|
||||
*/
|
||||
@TableField("TP")
|
||||
private String type;
|
||||
/**
|
||||
* 绑定库位名称
|
||||
*/
|
||||
@TableField("REL_NAME")
|
||||
private String relativityName;
|
||||
/**
|
||||
* 绑定库位编码
|
||||
*/
|
||||
@TableField("REL_NUM")
|
||||
private String relativityNumber;
|
||||
/**
|
||||
* 是否启用
|
||||
*/
|
||||
@TableField("IS_ENB")
|
||||
private String isEnable;
|
||||
/**
|
||||
* erp公司编码
|
||||
*/
|
||||
@TableField("CPN_ID_CST")
|
||||
private String companyIdCustom;
|
||||
/**
|
||||
* erp公司名称
|
||||
*/
|
||||
@TableField("CPN_NAME_CST")
|
||||
private String companyNameCustom;
|
||||
/**
|
||||
* 工厂名称
|
||||
*/
|
||||
@TableField("FACT_NAME")
|
||||
private String factoryName;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,37 @@
|
||||
package com.zt.plat.module.erp.dal.mysql.erp.internalwarehouse;
|
||||
|
||||
import java.util.*;
|
||||
|
||||
import com.zt.plat.framework.common.pojo.PageResult;
|
||||
import com.zt.plat.framework.mybatis.core.query.LambdaQueryWrapperX;
|
||||
import com.zt.plat.framework.mybatis.core.mapper.BaseMapperX;
|
||||
|
||||
import com.zt.plat.module.erp.controller.admin.erp.internalwarehouse.vo.InternalWarehousePageReqVO;
|
||||
import com.zt.plat.module.erp.dal.dataobject.erp.internalwarehouse.InternalWarehouseDO;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
|
||||
/**
|
||||
* ERP库位 Mapper
|
||||
*
|
||||
* @author 后台管理-1
|
||||
*/
|
||||
@Mapper
|
||||
public interface InternalWarehouseMapper extends BaseMapperX<InternalWarehouseDO> {
|
||||
|
||||
default PageResult<InternalWarehouseDO> selectPage(InternalWarehousePageReqVO reqVO) {
|
||||
return selectPage(reqVO, new LambdaQueryWrapperX<InternalWarehouseDO>()
|
||||
.eqIfPresent(InternalWarehouseDO::getFactoryNumber, reqVO.getFactoryNumber())
|
||||
.likeIfPresent(InternalWarehouseDO::getName, reqVO.getName())
|
||||
.eqIfPresent(InternalWarehouseDO::getNumber, reqVO.getNumber())
|
||||
.eqIfPresent(InternalWarehouseDO::getType, reqVO.getType())
|
||||
.likeIfPresent(InternalWarehouseDO::getRelativityName, reqVO.getRelativityName())
|
||||
.eqIfPresent(InternalWarehouseDO::getRelativityNumber, reqVO.getRelativityNumber())
|
||||
.eqIfPresent(InternalWarehouseDO::getIsEnable, reqVO.getIsEnable())
|
||||
.betweenIfPresent(InternalWarehouseDO::getCreateTime, reqVO.getCreateTime())
|
||||
.eqIfPresent(InternalWarehouseDO::getCompanyIdCustom, reqVO.getCompanyIdCustom())
|
||||
.eqIfPresent(InternalWarehouseDO::getCompanyNameCustom, reqVO.getCompanyNameCustom())
|
||||
.orderByDesc(InternalWarehouseDO::getId));
|
||||
}
|
||||
|
||||
}
|
||||
@@ -80,4 +80,8 @@ public interface ErpMaterialService {
|
||||
List<ErpMaterialDO> getErpMaterialByMainMaterial(Long mainMaterialId);
|
||||
|
||||
List<ErpMaterialDO> getErpMaterialByApi( MaterialInfomationPageReqDTO material);
|
||||
|
||||
ErpMaterialDO getErpMaterialByMainMaterialByCode(String code);
|
||||
|
||||
List <ErpMaterialDO>getErpMaterialByApiByCode(String code);
|
||||
}
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user