Selaa lähdekoodia

库存仓库管理

master
yangpeilai 2 viikkoa sitten
vanhempi
commit
7df1cc524b

+ 7
- 7
gly-base-core/src/main/java/cn/com/taiji/core/repo/jpa/invw/InvwWarehouseRepo.java Näytä tiedosto

InvwWarehouse findByCodeAndStatus(String code, Integer status); InvwWarehouse findByCodeAndStatus(String code, Integer status);


//查询父级仓库 //查询父级仓库
@Query(value = "from InvwWarehouse where id = ?1 and status = ?2")
@Query(value = "from InvwWarehouse where id = ?1 and status = ?2 order by code, insertTime ")
List<InvwWarehouse> findParByParentIdAndStatus(String parentId, Integer status); List<InvwWarehouse> findParByParentIdAndStatus(String parentId, Integer status);


//查询同级仓库 //查询同级仓库
@Query(value = "from InvwWarehouse where parentId = ?1 and status = ?2")
@Query(value = "from InvwWarehouse where parentId = ?1 and status = ?2 order by code, insertTime ")
List<InvwWarehouse> findBroByParentIdAndStatus(String parentId, Integer status); List<InvwWarehouse> findBroByParentIdAndStatus(String parentId, Integer status);


//查询子级仓库 //查询子级仓库
List<InvwWarehouse> findChiByIdAndStatus(String id, Integer status); List<InvwWarehouse> findChiByIdAndStatus(String id, Integer status);


//查询父、同级仓库 //查询父、同级仓库
@Query(value = "from InvwWarehouse where parentId = ?1 or id = ?1 and status = ?2")
@Query(value = "from InvwWarehouse where parentId = ?1 or id = ?1 and status = ?2 order by code, insertTime ")
List<InvwWarehouse> findParBroByParentId(String parentId, Integer status); List<InvwWarehouse> findParBroByParentId(String parentId, Integer status);


//查询同、子级仓库 //查询同、子级仓库
@Query(value = "from InvwWarehouse where parentId = ?1 or parentId = ?2 and status = ?3")
@Query(value = "from InvwWarehouse where parentId = ?1 or parentId = ?2 and status = ?3 order by code, insertTime ")
List<InvwWarehouse> findBroChiByParentIdOrId(String parentId, String id, Integer status); List<InvwWarehouse> findBroChiByParentIdOrId(String parentId, String id, Integer status);


//查询父、子级仓库 //查询父、子级仓库
@Query(value = "from InvwWarehouse where id = ?1 or parentId = ?2 and status = ?3")
@Query(value = "from InvwWarehouse where id = ?1 or parentId = ?2 and status = ?3 order by code, insertTime ")
List<InvwWarehouse> findParChiByParentIdOrId(String parentId, String id, Integer status); List<InvwWarehouse> findParChiByParentIdOrId(String parentId, String id, Integer status);


//查询父兄子 //查询父兄子
@Query(value = "from InvwWarehouse where id = ?1 or parentId = ?2 or id = ?2 and status = ?3")
@Query(value = "from InvwWarehouse where id = ?1 or parentId = ?2 or id = ?2 and status = ?3 order by code, insertTime ")
List<InvwWarehouse> findParBroChiByParentIdOrId(String parentId, String id, Integer status); List<InvwWarehouse> findParBroChiByParentIdOrId(String parentId, String id, Integer status);


//查询所有仓库 //查询所有仓库
@Query(value = "from InvwWarehouse where status = ?1")
@Query(value = "from InvwWarehouse where status = ?1 order by code, insertTime ")
List<InvwWarehouse> findAllByStatus(Integer status); List<InvwWarehouse> findAllByStatus(Integer status);
} }

+ 0
- 1
zhywpt-app-invw/src/main/java/cn/com/taiji/invw/dto/warehouse/InvwWarehouseCheckRequestDTO.java Näytä tiedosto

package cn.com.taiji.invw.dto.warehouse; package cn.com.taiji.invw.dto.warehouse;


import cn.com.taiji.core.model.comm.protocol.constraint.IntegerConstant;
import cn.com.taiji.core.model.comm.protocol.constraint.StringConstant; import cn.com.taiji.core.model.comm.protocol.constraint.StringConstant;
import cn.com.taiji.invw.dto.AbstractBizRequestDTO; import cn.com.taiji.invw.dto.AbstractBizRequestDTO;
import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModel;

+ 3
- 0
zhywpt-app-invw/src/main/java/cn/com/taiji/invw/dto/warehouse/InvwWarehousePageResponseDTO.java Näytä tiedosto

package cn.com.taiji.invw.dto.warehouse; package cn.com.taiji.invw.dto.warehouse;


import cn.com.taiji.core.entity.invw.InvwWarehouse; import cn.com.taiji.core.entity.invw.InvwWarehouse;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data; import lombok.Data;


@Data @Data
public class InvwWarehousePageResponseDTO { public class InvwWarehousePageResponseDTO {
@ApiModelProperty(value = "仓库信息")
private InvwWarehouse warehouse; private InvwWarehouse warehouse;
@ApiModelProperty(value = "上级仓库信息")
private InvwWarehouse parentWarehouse; private InvwWarehouse parentWarehouse;
} }

+ 0
- 1
zhywpt-app-invw/src/main/java/cn/com/taiji/invw/manager/warehouse/InvwWarehouseManagerImpl.java Näytä tiedosto



import java.time.LocalDateTime; import java.time.LocalDateTime;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.Collections;
import java.util.List; import java.util.List;


@Service @Service

Loading…
Peruuta
Tallenna