Commit 84287c32 authored by suichenguang's avatar suichenguang

搜索框

parent 033dd202
...@@ -6,6 +6,7 @@ import org.springframework.web.bind.annotation.RequestMapping; ...@@ -6,6 +6,7 @@ import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam; import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController; import org.springframework.web.bind.annotation.RestController;
import java.util.ArrayList;
import java.util.HashMap; import java.util.HashMap;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
...@@ -27,13 +28,22 @@ public class SelectApi { ...@@ -27,13 +28,22 @@ public class SelectApi {
public Map<String,Object> selectByCard(@RequestParam("id") String id){ public Map<String,Object> selectByCard(@RequestParam("id") String id){
Map<String,Object> resultMap = new HashMap<>(); Map<String,Object> resultMap = new HashMap<>();
if (id.length() ==11){ if (id.length() == 11) {
List<Map<String, Object>> workOrderData = selectSerialNumberService.selectByWorkOrderFromYX(id); List<Map<String, Object>> workOrderData = selectSerialNumberService.selectByWorkOrderFromYX(id);
resultMap.put( "workOrderData", workOrderData); List<Map<String, Object>> ACCdata = new ArrayList<>();
}else if (id.length() ==8){
List<Map<String, Object>> workOrderData = selectSerialNumberService.selectByGroupNo(id); List<Map<String, Object>> PRODData = new ArrayList<>();
resultMap.put("workOrderData", workOrderData); resultMap.put("workOrderData", workOrderData);
resultMap.put("ACCdata", ACCdata);
resultMap.put("PRODData", PRODData);
} else if (id.length() == 8) {
List<Map<String, Object>> workOrderData = selectSerialNumberService.selectByGroupNo(id);
List<Map<String, Object>> ACCdata = new ArrayList<>();
List<Map<String, Object>> PRODData = new ArrayList<>();
resultMap.put("workOrderData", workOrderData);
resultMap.put("ACCdata", ACCdata);
resultMap.put("PRODData", PRODData);
} else if (id.length() == 10 || id.length() == 18) { } else if (id.length() == 10 || id.length() == 18) {
List<Map<String, Object>> workOrderData = selectSerialNumberService.selectByAcceptNoOrCardIdFromTaskList(id); List<Map<String, Object>> workOrderData = selectSerialNumberService.selectByAcceptNoOrCardIdFromTaskList(id);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment