|
@@ -9,12 +9,16 @@ import com.jsh.erp.constants.BusinessConstants;
|
|
|
import com.jsh.erp.constants.ExceptionConstants;
|
|
|
import com.jsh.erp.datasource.entities.*;
|
|
|
import com.jsh.erp.datasource.mappers.*;
|
|
|
+import com.jsh.erp.datasource.pda.dto.PDAInventoryDTO;
|
|
|
import com.jsh.erp.datasource.pda.vo.PDADepotItemVO;
|
|
|
+import com.jsh.erp.datasource.pda.vo.PDATypeTree;
|
|
|
import com.jsh.erp.datasource.vo.MaterialVoSearch;
|
|
|
import com.jsh.erp.datasource.vo.MaterialWarnListVo;
|
|
|
+import com.jsh.erp.datasource.vo.TreeNode;
|
|
|
import com.jsh.erp.exception.BusinessRunTimeException;
|
|
|
import com.jsh.erp.exception.JshException;
|
|
|
import com.jsh.erp.query.LambdaQueryWrapperX;
|
|
|
+import com.jsh.erp.query.QueryWrapperX;
|
|
|
import com.jsh.erp.service.*;
|
|
|
import com.jsh.erp.utils.*;
|
|
|
import jxl.Sheet;
|
|
@@ -1991,8 +1995,43 @@ public class MaterialServiceImpl extends ServiceImpl<MaterialMapper, Material> i
|
|
|
}
|
|
|
|
|
|
@Override
|
|
|
- public List<PDADepotItemVO> inventoryInquiry(String type, String keyword) {
|
|
|
- return materialMapperEx.inventoryInquiry();
|
|
|
+ public List<PDADepotItemVO> inventoryInquiry(PDAInventoryDTO pdaInventoryDTO) {
|
|
|
+ return materialMapperEx.inventoryInquiry(pdaInventoryDTO);
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 查询库位树
|
|
|
+ */
|
|
|
+ @Override
|
|
|
+ public List<PDATypeTree> selectPosition() {
|
|
|
+ List<String> positions = materialExtendMapper.selectPosition();
|
|
|
+ Map<String,List<String>> map = new HashMap<>();
|
|
|
+ for (String s : positions) {
|
|
|
+ String [] str = s.split("-");
|
|
|
+ if (map.get(str[0]) == null){
|
|
|
+ List<String> list = new ArrayList<>();
|
|
|
+ list.add(str[1]);
|
|
|
+ map.put(str[0],list);
|
|
|
+ }else {
|
|
|
+ map.get(str[0]).add(str[1]);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ List<PDATypeTree> typeTrees = new ArrayList<>();
|
|
|
+ map.forEach((key,value) -> {
|
|
|
+ PDATypeTree typeTree = new PDATypeTree();
|
|
|
+ typeTree.setLabel(key);
|
|
|
+ typeTree.setValue(key);
|
|
|
+ List<PDATypeTree> children = new ArrayList<>();
|
|
|
+ for (String s : value) {
|
|
|
+ PDATypeTree childrenTree = new PDATypeTree();
|
|
|
+ childrenTree.setLabel(key + "-" + s);
|
|
|
+ childrenTree.setValue(key + "-" + s);
|
|
|
+ children.add(childrenTree);
|
|
|
+ }
|
|
|
+ typeTree.setChildren(children);
|
|
|
+ typeTrees.add(typeTree);
|
|
|
+ });
|
|
|
+ return typeTrees;
|
|
|
}
|
|
|
|
|
|
/**
|