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

添加窗口大厅站点选项

parent 8bf7e237
...@@ -20,7 +20,6 @@ ALTER TABLE mortals_sys_workman ADD COLUMN `operatorId` varchar (128) default " ...@@ -20,7 +20,6 @@ ALTER TABLE mortals_sys_workman ADD COLUMN `operatorId` varchar (128) default "
-- ---------------------------- -- ----------------------------
2023-3-28 2023-3-28
-- ---------------------------- -- ----------------------------
...@@ -211,3 +210,11 @@ ALTER TABLE mortals_sys_app_info_field ADD COLUMN `serviceApiParams` varchar(10 ...@@ -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 `serviceApi` varchar(255) default '' COMMENT '事件服务接口请求地址';
ALTER TABLE mortals_sys_app_info_templete_field ADD COLUMN `serviceApiParams` varchar(1024) 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 { ...@@ -38,7 +38,9 @@ public class UserEntityExt extends BaseEntityLong {
private List<ModelEntity> modleList; private List<ModelEntity> modleList;
/**
* 所属区域code,多个逗号分隔
*/
private String areaCodes;
} }
\ No newline at end of file
...@@ -43,14 +43,8 @@ public class SyncTreeSiteThread implements Runnable { ...@@ -43,14 +43,8 @@ public class SyncTreeSiteThread implements Runnable {
Context contextTemp = new Context(); Context contextTemp = new Context();
contextTemp.setUser(userEntity); contextTemp.setUser(userEntity);
siteService.setSiteTree(siteTreeSelects, contextTemp); 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> { ...@@ -55,6 +55,7 @@ public interface AreaService extends ICRUDCacheService<AreaEntity,Long> {
/** /**
* 获取当前节点所有子节点 * 获取当前节点所有子节点
* @param rootId * @param rootId
......
...@@ -186,6 +186,7 @@ public class AreaServiceImpl extends AbstractCRUDCacheServiceImpl<AreaDao, AreaE ...@@ -186,6 +186,7 @@ public class AreaServiceImpl extends AbstractCRUDCacheServiceImpl<AreaDao, AreaE
return collect; return collect;
} }
@Override @Override
public List<AreaTreeSelect> getListByRootId(String rootId, Context context) { public List<AreaTreeSelect> getListByRootId(String rootId, Context context) {
if (ObjectUtils.isEmpty(rootId)) { if (ObjectUtils.isEmpty(rootId)) {
......
...@@ -15,6 +15,7 @@ import org.springframework.web.bind.annotation.PostMapping; ...@@ -15,6 +15,7 @@ import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController; import org.springframework.web.bind.annotation.RestController;
import java.util.Arrays;
import java.util.HashMap; import java.util.HashMap;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
...@@ -73,6 +74,33 @@ public class AreaController extends BaseCRUDJsonBodyMappingController<AreaServic ...@@ -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查询子信息 * 根据parentId查询子信息
*/ */
...@@ -122,5 +150,4 @@ public class AreaController extends BaseCRUDJsonBodyMappingController<AreaServic ...@@ -122,5 +150,4 @@ public class AreaController extends BaseCRUDJsonBodyMappingController<AreaServic
return ret.toJSONString(); return ret.toJSONString();
} }
} }
\ No newline at end of file
package com.mortals.xhx.module.window.model; package com.mortals.xhx.module.window.model;
import java.util.List; import java.util.List;
import java.util.ArrayList; 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.fasterxml.jackson.annotation.JsonFormat;
import com.mortals.framework.annotation.Excel; import com.mortals.framework.annotation.Excel;
import com.mortals.framework.model.BaseEntityLong; import com.mortals.framework.model.BaseEntityLong;
import com.mortals.xhx.module.window.model.vo.WindowHallVo; import com.mortals.xhx.module.window.model.vo.WindowHallVo;
import lombok.Data; import lombok.Data;
/** /**
* 大厅窗口实体对象 * 大厅窗口实体对象
* *
* @author zxfei * @author zxfei
* @date 2023-04-25 * @date 2023-10-17
*/ */
@Data @Data
public class WindowHallEntity extends WindowHallVo { public class WindowHallEntity extends WindowHallVo {
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
/**
* 站点Id
*/
private Long siteId;
/** /**
* 窗口ID * 窗口ID
*/ */
...@@ -57,17 +64,12 @@ public class WindowHallEntity extends WindowHallVo { ...@@ -57,17 +64,12 @@ public class WindowHallEntity extends WindowHallVo {
} }
public void initAttrValue(){ public void initAttrValue(){
this.siteId = null;
this.windowId = null; this.windowId = null;
this.windowName = ""; this.windowName = "";
this.hallId = null; this.hallId = null;
this.hallName = ""; this.hallName = "";
this.sort = 0; this.sort = 0;
this.remark = ""; this.remark = "";
} }
} }
\ No newline at end of file
...@@ -3,11 +3,11 @@ package com.mortals.xhx.module.window.model; ...@@ -3,11 +3,11 @@ package com.mortals.xhx.module.window.model;
import java.util.List; import java.util.List;
import com.mortals.xhx.module.window.model.WindowHallEntity; import com.mortals.xhx.module.window.model.WindowHallEntity;
/** /**
* 大厅窗口查询对象 * 大厅窗口查询对象
* *
* @author zxfei * @author zxfei
* @date 2023-04-25 * @date 2023-10-17
*/ */
public class WindowHallQuery extends WindowHallEntity { public class WindowHallQuery extends WindowHallEntity {
/** 开始 序号,主键,自增长 */ /** 开始 序号,主键,自增长 */
private Long idStart; private Long idStart;
...@@ -24,6 +24,21 @@ public class WindowHallQuery extends WindowHallEntity { ...@@ -24,6 +24,21 @@ public class WindowHallQuery extends WindowHallEntity {
/** 序号,主键,自增长排除列表 */ /** 序号,主键,自增长排除列表 */
private List <Long> idNotList; private List <Long> idNotList;
/** 开始 站点Id */
private Long siteIdStart;
/** 结束 站点Id */
private Long siteIdEnd;
/** 增加 站点Id */
private Long siteIdIncrement;
/** 站点Id列表 */
private List <Long> siteIdList;
/** 站点Id排除列表 */
private List <Long> siteIdNotList;
/** 开始 窗口ID */ /** 开始 窗口ID */
private Long windowIdStart; private Long windowIdStart;
...@@ -200,6 +215,87 @@ public class WindowHallQuery extends WindowHallEntity { ...@@ -200,6 +215,87 @@ public class WindowHallQuery extends WindowHallEntity {
} }
/**
* 获取 开始 站点Id
* @return siteIdStart
*/
public Long getSiteIdStart(){
return this.siteIdStart;
}
/**
* 设置 开始 站点Id
* @param siteIdStart
*/
public void setSiteIdStart(Long siteIdStart){
this.siteIdStart = siteIdStart;
}
/**
* 获取 结束 站点Id
* @return $siteIdEnd
*/
public Long getSiteIdEnd(){
return this.siteIdEnd;
}
/**
* 设置 结束 站点Id
* @param siteIdEnd
*/
public void setSiteIdEnd(Long siteIdEnd){
this.siteIdEnd = siteIdEnd;
}
/**
* 获取 增加 站点Id
* @return siteIdIncrement
*/
public Long getSiteIdIncrement(){
return this.siteIdIncrement;
}
/**
* 设置 增加 站点Id
* @param siteIdIncrement
*/
public void setSiteIdIncrement(Long siteIdIncrement){
this.siteIdIncrement = siteIdIncrement;
}
/**
* 获取 站点Id
* @return siteIdList
*/
public List<Long> getSiteIdList(){
return this.siteIdList;
}
/**
* 设置 站点Id
* @param siteIdList
*/
public void setSiteIdList(List<Long> siteIdList){
this.siteIdList = siteIdList;
}
/**
* 获取 站点Id
* @return siteIdNotList
*/
public List<Long> getSiteIdNotList(){
return this.siteIdNotList;
}
/**
* 设置 站点Id
* @param siteIdNotList
*/
public void setSiteIdNotList(List<Long> siteIdNotList){
this.siteIdNotList = siteIdNotList;
}
/** /**
* 获取 开始 窗口ID * 获取 开始 窗口ID
* @return windowIdStart * @return windowIdStart
...@@ -738,6 +834,60 @@ public class WindowHallQuery extends WindowHallEntity { ...@@ -738,6 +834,60 @@ public class WindowHallQuery extends WindowHallEntity {
return this; return this;
} }
/**
* 设置 站点Id
* @param siteId
*/
public WindowHallQuery siteId(Long siteId){
setSiteId(siteId);
return this;
}
/**
* 设置 开始 站点Id
* @param siteIdStart
*/
public WindowHallQuery siteIdStart(Long siteIdStart){
this.siteIdStart = siteIdStart;
return this;
}
/**
* 设置 结束 站点Id
* @param siteIdEnd
*/
public WindowHallQuery siteIdEnd(Long siteIdEnd){
this.siteIdEnd = siteIdEnd;
return this;
}
/**
* 设置 增加 站点Id
* @param siteIdIncrement
*/
public WindowHallQuery siteIdIncrement(Long siteIdIncrement){
this.siteIdIncrement = siteIdIncrement;
return this;
}
/**
* 设置 站点Id
* @param siteIdList
*/
public WindowHallQuery siteIdList(List<Long> siteIdList){
this.siteIdList = siteIdList;
return this;
}
/**
* 设置 站点Id
* @param siteIdNotList
*/
public WindowHallQuery siteIdNotList(List<Long> siteIdNotList){
this.siteIdNotList = siteIdNotList;
return this;
}
/** /**
* 设置 窗口ID * 设置 窗口ID
* @param windowId * @param windowId
......
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