|
@@ -5,8 +5,6 @@ import java.util.HashSet;
|
|
|
import java.util.List;
|
|
import java.util.List;
|
|
|
import java.util.Map;
|
|
import java.util.Map;
|
|
|
import java.util.Set;
|
|
import java.util.Set;
|
|
|
-import java.util.regex.Matcher;
|
|
|
|
|
-import java.util.regex.Pattern;
|
|
|
|
|
import javax.servlet.http.HttpServletRequest;
|
|
import javax.servlet.http.HttpServletRequest;
|
|
|
import javax.servlet.http.HttpServletResponse;
|
|
import javax.servlet.http.HttpServletResponse;
|
|
|
|
|
|
|
@@ -555,35 +553,16 @@ public class MesLineProcessController extends BaseController {
|
|
|
resp.setMessage("无法确定返修工件所属产线");
|
|
resp.setMessage("无法确定返修工件所属产线");
|
|
|
return resp;
|
|
return resp;
|
|
|
}
|
|
}
|
|
|
- String op = "";
|
|
|
|
|
- op = mesProductRepair.getOprno();
|
|
|
|
|
- if(!StringUtils.isEmpty(op)){
|
|
|
|
|
- op = op.toUpperCase();
|
|
|
|
|
- }
|
|
|
|
|
- int opval = parseOprnoValue(op);
|
|
|
|
|
- logger.info("opval:"+ opval);
|
|
|
|
|
MesLineProcess mesLineProcess = new MesLineProcess();
|
|
MesLineProcess mesLineProcess = new MesLineProcess();
|
|
|
mesLineProcess.setStatus("0");
|
|
mesLineProcess.setStatus("0");
|
|
|
mesLineProcess.setLineSn(lineSn);
|
|
mesLineProcess.setLineSn(lineSn);
|
|
|
mesLineProcess.getSqlMap().getWhere().and("a.pid",QueryType.IS_NULL,"");
|
|
mesLineProcess.getSqlMap().getWhere().and("a.pid",QueryType.IS_NULL,"");
|
|
|
List<MesLineProcess> lists = mesLineProcessService.findList(mesLineProcess);
|
|
List<MesLineProcess> lists = mesLineProcessService.findList(mesLineProcess);
|
|
|
- int level = 0;
|
|
|
|
|
List<MesLineProcess> lists2 = new ArrayList<>();
|
|
List<MesLineProcess> lists2 = new ArrayList<>();
|
|
|
Set<String> addedOprnos = new HashSet<>();
|
|
Set<String> addedOprnos = new HashSet<>();
|
|
|
for (MesLineProcess mesLineProcess1 : lists) {
|
|
for (MesLineProcess mesLineProcess1 : lists) {
|
|
|
- if(opval > 0){
|
|
|
|
|
- int opval2 = parseOprnoValue(mesLineProcess1.getOprno());
|
|
|
|
|
- logger.info("opval2:"+ opval2+"|val:"+opval);
|
|
|
|
|
- if(opval2 > opval){
|
|
|
|
|
- level++;
|
|
|
|
|
- }
|
|
|
|
|
- if(level <= 1 && addedOprnos.add(mesLineProcess1.getOprno())){
|
|
|
|
|
- lists2.add(mesLineProcess1);
|
|
|
|
|
- }
|
|
|
|
|
- }else{
|
|
|
|
|
- if(addedOprnos.add(mesLineProcess1.getOprno())){
|
|
|
|
|
- lists2.add(mesLineProcess1);
|
|
|
|
|
- }
|
|
|
|
|
|
|
+ if(addedOprnos.add(mesLineProcess1.getOprno())){
|
|
|
|
|
+ lists2.add(mesLineProcess1);
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
|
|
@@ -622,22 +601,6 @@ public class MesLineProcessController extends BaseController {
|
|
|
return null;
|
|
return null;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- private int parseOprnoValue(String oprno) {
|
|
|
|
|
- if (StringUtils.isBlank(oprno)) {
|
|
|
|
|
- return 0;
|
|
|
|
|
- }
|
|
|
|
|
- Matcher matcher = Pattern.compile("\\d+").matcher(oprno);
|
|
|
|
|
- if (!matcher.find()) {
|
|
|
|
|
- return 0;
|
|
|
|
|
- }
|
|
|
|
|
- try {
|
|
|
|
|
- return Integer.parseInt(matcher.group());
|
|
|
|
|
- } catch (NumberFormatException ex) {
|
|
|
|
|
- logger.warn("无法解析工位号: {}", oprno);
|
|
|
|
|
- return 0;
|
|
|
|
|
- }
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
@RequestMapping(value = "subProcessList")
|
|
@RequestMapping(value = "subProcessList")
|
|
|
@ResponseBody
|
|
@ResponseBody
|
|
|
public CommonResp subProcessList(HttpServletRequest req) {
|
|
public CommonResp subProcessList(HttpServletRequest req) {
|