|
|
@ -1,9 +1,6 @@
|
|
|
|
package com.ruoyi.web.controller.nanjing;
|
|
|
|
package com.ruoyi.web.controller.nanjing;
|
|
|
|
|
|
|
|
|
|
|
|
import java.util.Date;
|
|
|
|
import java.util.*;
|
|
|
|
import java.util.HashMap;
|
|
|
|
|
|
|
|
import java.util.List;
|
|
|
|
|
|
|
|
import java.util.Map;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
import com.ruoyi.common.core.domain.Ztree;
|
|
|
|
import com.ruoyi.common.core.domain.Ztree;
|
|
|
|
import com.ruoyi.common.core.text.Convert;
|
|
|
|
import com.ruoyi.common.core.text.Convert;
|
|
|
@ -108,17 +105,36 @@ public class TBdSubstationController extends BaseController
|
|
|
|
{
|
|
|
|
{
|
|
|
|
//工位序号+
|
|
|
|
//工位序号+
|
|
|
|
List<TBdSubstation> list = tBdSubstationService.selectStationcode();
|
|
|
|
List<TBdSubstation> list = tBdSubstationService.selectStationcode();
|
|
|
|
int max = Convert.toInt(list.get(0).getStationID());
|
|
|
|
int max;
|
|
|
|
list.get(0).setStationID(max+1L);
|
|
|
|
if(list.size()==0){
|
|
|
|
|
|
|
|
max = 0;
|
|
|
|
|
|
|
|
List<TBdSubstation> lists = new ArrayList<>();
|
|
|
|
|
|
|
|
TBdSubstation tBdSubstation = new TBdSubstation();
|
|
|
|
|
|
|
|
tBdSubstation.setStationID(max+1L);
|
|
|
|
|
|
|
|
lists.add(tBdSubstation);
|
|
|
|
|
|
|
|
map.addAttribute("si",lists);
|
|
|
|
|
|
|
|
}else{
|
|
|
|
|
|
|
|
max = Convert.toInt(list.get(0).getStationID());
|
|
|
|
|
|
|
|
list.get(0).setStationID(max+1L);
|
|
|
|
|
|
|
|
map.addAttribute("si",list);
|
|
|
|
|
|
|
|
}
|
|
|
|
//排序id+
|
|
|
|
//排序id+
|
|
|
|
List<TBdSubstation> list1 = tBdSubstationService.selectOrderid();
|
|
|
|
List<TBdSubstation> list1 = tBdSubstationService.selectOrderid();
|
|
|
|
int max1 = Convert.toInt(list.get(0).getOrderID());
|
|
|
|
int max1;
|
|
|
|
list.get(0).setOrderID(max1+1L);
|
|
|
|
if(list1.size()==0){
|
|
|
|
|
|
|
|
max1 = 0;
|
|
|
|
|
|
|
|
List<TBdSubstation> list2 = new ArrayList<>();
|
|
|
|
|
|
|
|
TBdSubstation tBdSubstation = new TBdSubstation();
|
|
|
|
|
|
|
|
tBdSubstation.setOrderID(max1+1L);
|
|
|
|
|
|
|
|
list2.add(tBdSubstation);
|
|
|
|
|
|
|
|
map.addAttribute("oi",list2);
|
|
|
|
|
|
|
|
}else{
|
|
|
|
|
|
|
|
max1 = Convert.toInt(list.get(0).getOrderID());
|
|
|
|
|
|
|
|
list1.get(0).setOrderID(max1+1L);
|
|
|
|
|
|
|
|
map.addAttribute("oi",list1);
|
|
|
|
|
|
|
|
}
|
|
|
|
List<TBdLinetype> linetypes = linetypeService.selectTBdLinetypeList(new TBdLinetype());
|
|
|
|
List<TBdLinetype> linetypes = linetypeService.selectTBdLinetypeList(new TBdLinetype());
|
|
|
|
List<TBdStationtype> stationtypes = stationtypeService.selectTBdStationtypeList(new TBdStationtype());
|
|
|
|
List<TBdStationtype> stationtypes = stationtypeService.selectTBdStationtypeList(new TBdStationtype());
|
|
|
|
map.addAttribute("si",list);
|
|
|
|
|
|
|
|
map.addAttribute("oi",list);
|
|
|
|
|
|
|
|
map.addAttribute("linename",linetypes);
|
|
|
|
map.addAttribute("linename",linetypes);
|
|
|
|
map.addAttribute("stationtype",stationtypes);
|
|
|
|
map.addAttribute("stationtype",stationtypes);
|
|
|
|
return prefix + "/add";
|
|
|
|
return prefix + "/add";
|
|
|
|