9c278b3a 张雷

Merge remote-tracking branch 'origin/master' into master

2 个父辈 bdceec32 d2bc4490
...@@ -181,6 +181,10 @@ public class EquipmentInController { ...@@ -181,6 +181,10 @@ public class EquipmentInController {
181 if (StringUtils.isNotEmpty(equipmentInDTO.getEndTime())) { 181 if (StringUtils.isNotEmpty(equipmentInDTO.getEndTime())) {
182 queryWrapper.le("in_date", equipmentInDTO.getEndTime() + " 23:59:59"); 182 queryWrapper.le("in_date", equipmentInDTO.getEndTime() + " 23:59:59");
183 } 183 }
184 if (StringUtils.isNotEmpty(equipmentInDTO.getSparepartId())) {
185 String sparepartId = equipmentInDTO.getSparepartId();
186 queryWrapper.inSql("id", "select in_id from equipment_in_child where sparepart_id = '" + sparepartId + "'");
187 }
184 queryWrapper.orderByDesc("in_date"); 188 queryWrapper.orderByDesc("in_date");
185 Map<String, String> sysUserVal2KeyMap = key2ValueService.dictKey2Val("sysUser", false); 189 Map<String, String> sysUserVal2KeyMap = key2ValueService.dictKey2Val("sysUser", false);
186 Map<String, String> sysDepartVal2KeyMap = key2ValueService.dictKey2Val("sysDepart", false); 190 Map<String, String> sysDepartVal2KeyMap = key2ValueService.dictKey2Val("sysDepart", false);
...@@ -475,7 +479,7 @@ public class EquipmentInController { ...@@ -475,7 +479,7 @@ public class EquipmentInController {
475 //导出文件名称 479 //导出文件名称
476 mv.addObject(NormalExcelConstants.FILE_NAME, "入库管理列表"); 480 mv.addObject(NormalExcelConstants.FILE_NAME, "入库管理列表");
477 mv.addObject(NormalExcelConstants.CLASS, EquipmentInExcel.class); 481 mv.addObject(NormalExcelConstants.CLASS, EquipmentInExcel.class);
478 mv.addObject(NormalExcelConstants.PARAMS, new ExportParams("入库管理数据", "导出人:"+sysUser.getRealname(), "导出信息")); 482 mv.addObject(NormalExcelConstants.PARAMS, new ExportParams("入库管理数据", "导出人:" + sysUser.getRealname(), "导出信息"));
479 mv.addObject(NormalExcelConstants.DATA_LIST, dataList); 483 mv.addObject(NormalExcelConstants.DATA_LIST, dataList);
480 return mv; 484 return mv;
481 } 485 }
......
...@@ -164,7 +164,10 @@ public class EquipmentOutController { ...@@ -164,7 +164,10 @@ public class EquipmentOutController {
164 if (StringUtils.isNotEmpty(equipmentOutDTO.getEndTime())) { 164 if (StringUtils.isNotEmpty(equipmentOutDTO.getEndTime())) {
165 queryWrapper.le("out_date", equipmentOutDTO.getEndTime() + " 23:59:59"); 165 queryWrapper.le("out_date", equipmentOutDTO.getEndTime() + " 23:59:59");
166 } 166 }
167 167 if (StringUtils.isNotEmpty(equipmentOutDTO.getSparepartId())) {
168 String sparepartId = equipmentOutDTO.getSparepartId();
169 queryWrapper.inSql("id", "select out_id from equipment_out_child where sparepart_id = '" + sparepartId + "'");
170 }
168 // 按照库存更新时间倒序 171 // 按照库存更新时间倒序
169 queryWrapper.orderByDesc("out_date"); 172 queryWrapper.orderByDesc("out_date");
170 Map<String, String> sysUserVal2KeyMap = key2ValueService.dictKey2Val("sysUser", false); 173 Map<String, String> sysUserVal2KeyMap = key2ValueService.dictKey2Val("sysUser", false);
......
...@@ -23,4 +23,6 @@ public class EquipmentInDTO extends EquipmentIn { ...@@ -23,4 +23,6 @@ public class EquipmentInDTO extends EquipmentIn {
23 23
24 private String sparepartName; 24 private String sparepartName;
25 25
26 private String sparepartId;
27
26 } 28 }
......
...@@ -27,5 +27,7 @@ public class EquipmentOutDTO extends EquipmentOut { ...@@ -27,5 +27,7 @@ public class EquipmentOutDTO extends EquipmentOut {
27 27
28 private String sparepartName; 28 private String sparepartName;
29 29
30 private String sparepartId;
31
30 32
31 } 33 }
......
...@@ -3,10 +3,7 @@ package com.skua.modules.equipment.service.impl; ...@@ -3,10 +3,7 @@ package com.skua.modules.equipment.service.impl;
3 import java.io.FileInputStream; 3 import java.io.FileInputStream;
4 import java.io.IOException; 4 import java.io.IOException;
5 import java.io.InputStream; 5 import java.io.InputStream;
6 import java.util.ArrayList; 6 import java.util.*;
7 import java.util.HashMap;
8 import java.util.List;
9 import java.util.Map;
10 import java.util.stream.Collectors; 7 import java.util.stream.Collectors;
11 8
12 import org.apache.commons.lang3.StringUtils; 9 import org.apache.commons.lang3.StringUtils;
...@@ -46,6 +43,12 @@ public class EquipmentCategoryServiceImpl extends ServiceImpl<EquipmentCategoryM ...@@ -46,6 +43,12 @@ public class EquipmentCategoryServiceImpl extends ServiceImpl<EquipmentCategoryM
46 public List<TreeData> tree(int tag) { 43 public List<TreeData> tree(int tag) {
47 //获取数据列表 44 //获取数据列表
48 List<EquipmentCategory> list=queryList(); 45 List<EquipmentCategory> list=queryList();
46 list.forEach(item -> {
47 if (item.getSort() == null) {
48 item.setSort(10000);
49 }
50 });
51 Collections.sort(list, Comparator.comparing(EquipmentCategory::getSort));
49 //将业务数据转换为构造树所需的数据结构 52 //将业务数据转换为构造树所需的数据结构
50 List<TransTreeModel> transTreeModels = list.stream().map(bo -> convertToTreeModel(bo)).collect(Collectors.toList()); 53 List<TransTreeModel> transTreeModels = list.stream().map(bo -> convertToTreeModel(bo)).collect(Collectors.toList());
51 List<TreeData> treeList=TreeUtils.buildTreeForParentId(transTreeModels, "root"); 54 List<TreeData> treeList=TreeUtils.buildTreeForParentId(transTreeModels, "root");
......
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!