Commit 2126796e authored by 赵啸非's avatar 赵啸非

添加窗口大厅站点选项

parent 8bf7e237
......@@ -20,7 +20,6 @@ ALTER TABLE mortals_sys_workman ADD COLUMN `operatorId` varchar (128) default "
-- ----------------------------
2023-3-28
-- ----------------------------
......@@ -211,3 +210,11 @@ ALTER TABLE mortals_sys_app_info_field ADD COLUMN `serviceApiParams` varchar(10
ALTER TABLE mortals_sys_app_info_templete_field ADD COLUMN `serviceApi` varchar(255) default '' COMMENT '事件服务接口请求地址';
ALTER TABLE mortals_sys_app_info_templete_field ADD COLUMN `serviceApiParams` varchar(1024) default '' COMMENT '事件服务接口请求参数';
-- ----------------------------
2023-10-17
-- ----------------------------
ALTER TABLE mortals_sys_window_hall ADD COLUMN `siteId` bigint(20) default '1' COMMENT '站点Id';
......@@ -38,7 +38,9 @@ public class UserEntityExt extends BaseEntityLong {
private List<ModelEntity> modleList;
/**
* 所属区域code,多个逗号分隔
*/
private String areaCodes;
}
\ No newline at end of file
......@@ -43,14 +43,8 @@ public class SyncTreeSiteThread implements Runnable {
Context contextTemp = new Context();
contextTemp.setUser(userEntity);
siteService.setSiteTree(siteTreeSelects, contextTemp);
if(userEntity.getId()==2065L){
log.info("2065===>{}",JSON.toJSONString(userEntity));
}
}
}
// log.info("刷新用户站点树=》userID:{} siteIds:{} siteTree:{}",context.getUser().getId(),context.getUser().getSiteIds(), JSON.toJSONString(siteService.getSiteTree(context)));
}
}
......@@ -55,6 +55,7 @@ public interface AreaService extends ICRUDCacheService<AreaEntity,Long> {
/**
* 获取当前节点所有子节点
* @param rootId
......
......@@ -186,6 +186,7 @@ public class AreaServiceImpl extends AbstractCRUDCacheServiceImpl<AreaDao, AreaE
return collect;
}
@Override
public List<AreaTreeSelect> getListByRootId(String rootId, Context context) {
if (ObjectUtils.isEmpty(rootId)) {
......
......@@ -15,6 +15,7 @@ import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import java.util.Arrays;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
......@@ -73,6 +74,33 @@ public class AreaController extends BaseCRUDJsonBodyMappingController<AreaServic
}
/**
* 获取站点下拉树列表
*/
@PostMapping("authAreaTree")
public String authAreaTree() {
Map<String, Object> model = new HashMap<>();
JSONObject ret = new JSONObject();
String busiDesc = "查询" + this.getModuleDesc();
int code = VALUE_RESULT_SUCCESS;
try {
List<String> areaCodeList = Arrays.asList(this.getContext().getUser().getAreaCodes().split(","));
AreaQuery areaQuery = new AreaQuery();
areaQuery.setAreaCodeList(areaCodeList);
List<AreaEntity> list = this.service.find(areaQuery);
List<AreaTreeSelect> treeSelects = this.service.buildAreaTreeSelect(list);
model.put(KEY_RESULT_DATA, treeSelects);
recordSysLog(request, busiDesc + " 【成功】");
} catch (Exception e) {
code = VALUE_RESULT_FAILURE;
this.doException(request, busiDesc, model, e);
}
ret.put(KEY_RESULT_DATA, model);
ret.put(KEY_RESULT_CODE, code);
return ret.toJSONString();
}
/**
* 根据parentId查询子信息
*/
......@@ -122,5 +150,4 @@ public class AreaController extends BaseCRUDJsonBodyMappingController<AreaServic
return ret.toJSONString();
}
}
\ No newline at end of file
package com.mortals.xhx.module.window.model;
import java.util.List;
import java.util.ArrayList;
import java.math.BigDecimal;
import cn.hutool.core.date.DateUtil;
import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.mortals.framework.annotation.Excel;
import com.mortals.framework.model.BaseEntityLong;
import com.mortals.xhx.module.window.model.vo.WindowHallVo;
import lombok.Data;
/**
* 大厅窗口实体对象
*
* @author zxfei
* @date 2023-04-25
*/
* 大厅窗口实体对象
*
* @author zxfei
* @date 2023-10-17
*/
@Data
public class WindowHallEntity extends WindowHallVo {
private static final long serialVersionUID = 1L;
/**
* 窗口ID
*/
* 站点Id
*/
private Long siteId;
/**
* 窗口ID
*/
private Long windowId;
/**
* 窗口名称
*/
* 窗口名称
*/
private String windowName;
/**
* 大厅ID
*/
* 大厅ID
*/
private Long hallId;
/**
* 大厅名称
*/
* 大厅名称
*/
private String hallName;
/**
* 排序
*/
* 排序
*/
private Integer sort;
/**
* 备注
*/
* 备注
*/
private String remark;
@Override
public int hashCode() {
return this.getId().hashCode();
return this.getId().hashCode();
}
@Override
public boolean equals(Object obj) {
......@@ -50,24 +57,19 @@ public class WindowHallEntity extends WindowHallVo {
if (obj instanceof WindowHallEntity) {
WindowHallEntity tmp = (WindowHallEntity) obj;
if (this.getId() == tmp.getId()) {
return true;
return true;
}
}
return false;
}
public void initAttrValue(){
this.windowId = null;
this.windowName = "";
this.hallId = null;
this.hallName = "";
this.sort = 0;
this.remark = "";
this.siteId = null;
this.windowId = null;
this.windowName = "";
this.hallId = null;
this.hallName = "";
this.sort = 0;
this.remark = "";
}
}
\ No newline at end of file
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