| | |
| | | import com.core.exception.CoolException; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import zy.cloud.wms.manager.entity.Node; |
| | | import zy.cloud.wms.manager.entity.Tag; |
| | | import zy.cloud.wms.manager.service.NodeService; |
| | | import zy.cloud.wms.manager.service.TagService; |
| | | import zy.cloud.wms.system.entity.User; |
| | | import zy.cloud.wms.system.service.UserService; |
| | | |
| | |
| | | protected HttpServletRequest request; |
| | | @Autowired |
| | | private UserService userService; |
| | | @Autowired |
| | | private TagService tagService; |
| | | @Autowired |
| | | private NodeService nodeService; |
| | | |
| | | protected Long getUserId(){ |
| | | return Long.parseLong(String.valueOf(request.getAttribute("userId"))); |
| | |
| | | return ""; |
| | | } |
| | | |
| | | protected Tag getOriginTag(){ |
| | | Tag tag = tagService.selectOne(new EntityWrapper<Tag>().eq("level", 1)); |
| | | if (tag == null) { |
| | | throw new CoolException("归类数据错误"); |
| | | } |
| | | return tag; |
| | | } |
| | | |
| | | protected Node getOriginNode(){ |
| | | Node node = nodeService.selectOne(new EntityWrapper<Node>().eq("level", 0)); |
| | | if (node == null) { |
| | | throw new CoolException("库区数据错误"); |
| | | } |
| | | return node; |
| | | } |
| | | |
| | | /** |
| | | * 分页组装 |
| | | * @param pageNumber |
| | |
| | | map.put("pageNumber", pageNumber); |
| | | map.put("pageSize", pageSize); |
| | | |
| | | // 全字段模糊搜索 todo |
| | | // 全字段模糊搜索 |
| | | if (!Cools.isEmpty(map.get("condition"))) { |
| | | Set<String> columns = new HashSet<>(); |
| | | for (Field field : Cools.getAllFields(cls)){ |