更新内容:
①解决日期条件回传bug,
②列表序号下级菜单不参与主序号计算,下级序号以标识符隔开,标识符在配置中添加
③列表总条数按查询数据总数目计算
④菜单添加中英文
待处理:
①搜索结果页面条件查询表单重置时日期无法重置
This commit is contained in:
@@ -9,6 +9,7 @@ import com.fasterxml.jackson.annotation.JsonIgnore;
|
||||
import com.nis.domain.BaseEntity;
|
||||
import com.nis.domain.SysMenu;
|
||||
import com.nis.domain.SysUser;
|
||||
import com.nis.util.Configurations;
|
||||
/**
|
||||
* 业务辅助表-业务字典信息表
|
||||
* @author zsl
|
||||
@@ -39,6 +40,8 @@ public class ServiceDictInfo extends BaseEntity<ServiceDictInfo>{
|
||||
private Date editBeginDate; // 修改开始日期
|
||||
private Date editEndDate; // 修改结束日期
|
||||
|
||||
private String showSequence; //显示序号
|
||||
|
||||
|
||||
public Integer getServiceDictId() {
|
||||
return serviceDictId;
|
||||
@@ -150,6 +153,12 @@ public class ServiceDictInfo extends BaseEntity<ServiceDictInfo>{
|
||||
public void setEditEndDate(Date editEndDate) {
|
||||
this.editEndDate = editEndDate;
|
||||
}
|
||||
public String getShowSequence() {
|
||||
return showSequence;
|
||||
}
|
||||
public void setShowSequence(String showSequence) {
|
||||
this.showSequence = showSequence;
|
||||
}
|
||||
@JsonIgnore
|
||||
public static void sortList(List<ServiceDictInfo> list, List<ServiceDictInfo> sourcelist, Integer parentId, boolean cascade){
|
||||
for (int i=0; i<sourcelist.size(); i++){
|
||||
@@ -198,4 +207,35 @@ public class ServiceDictInfo extends BaseEntity<ServiceDictInfo>{
|
||||
return listTemp.size();
|
||||
}
|
||||
|
||||
//处理下级序号
|
||||
public static void addChildrenSeq(List<ServiceDictInfo> list,Integer parentId){
|
||||
int countNo = 1;
|
||||
for(int i=0; i<list.size(); i++){
|
||||
ServiceDictInfo serviceDictInfo = list.get(i);
|
||||
if(serviceDictInfo.getParent()!=null && serviceDictInfo.getParent().getServiceDictId()!=null
|
||||
&& serviceDictInfo.getParent().getServiceDictId().equals(parentId)){
|
||||
//找出该父类
|
||||
for(ServiceDictInfo se:list){
|
||||
if(se.getServiceDictId()==parentId){
|
||||
serviceDictInfo.setShowSequence(se.getShowSequence()+Configurations.getStringProperty("childrenMark", ".")+countNo);
|
||||
countNo++;
|
||||
}
|
||||
}
|
||||
//继续获取子节点
|
||||
for (int j=0; j<list.size(); j++){
|
||||
ServiceDictInfo child = list.get(j);
|
||||
if (child.getParent()!=null && child.getParent().getServiceDictId()!=null
|
||||
&& child.getParent().getServiceDictId().equals(serviceDictInfo.getServiceDictId())){
|
||||
addChildrenSeq(list, serviceDictInfo.getServiceDictId());
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user