Commit 283def83 authored by 赵啸非's avatar 赵啸非

添加大厅与窗口关联

parent d78c2d20
......@@ -6262,6 +6262,85 @@ windowId|Long|窗口ID|是|窗口id
```
### 查询大厅窗口列表
**请求URL:** window/subHalllist
**请求方式:** POST
**内容类型:** application/json;charset=utf-8
**简要描述:** 查询当前站点所有没有在大厅配置的过的窗口
**请求参数:**
参数名称|类型|备注|必填|其它
---|---|---|---|---
page|Integer|当前页|否|-
size|Integer|每页条数|否|-1全部
siteId|Integer|每页条数|否|站点id
**请求样例:**
```
{
"page":1,
"size":10,
"siteId":1
}
```
**响应参数:**
参数名称 |参数类型|备注|其它
---|---|---|---
code|Integer|结果码(-1.失败,1.成功)|-
msg|String|消息|-
data|object|数据对象|-
 per_page|Integer|每页条数|-
 total|Integer|总条数|-
 last_page|Integer|总页数|-
 current_page|Integer|当前页|-
 data|array|结果集列表|数组
  id|Long|序号,主键,自增长|-
  siteId|Long|站点ID|-
  siteName|String|站点名称|-
  deptId|Long|部门ID|-
  deptName|String|部门名称|-
  name|String|窗口名称|-
  englishName|String|英语窗口名|-
  region|String|区域|-
  englishRegion|String|英语区域|-
  fromnum|String|窗口编号|-
  hongqi|Integer|红旗窗口 (1.是,0.否)|-
  summary|String|备注|-
  building|Integer|楼栋|-
  level|Integer|楼层|-
  createTime|Date|创建时间|-
  createUserId|Long|创建用户|-
  updateTime|Date|修改时间|-
dict|object|字典对象|-
 hongqi|object|字典属性对象,详见附录|-
**响应消息样例:**
```
{
"code":1,
"data":{
"per_page":10,
"total":0,
"data":[],
"last_page":0,
"current_page":1
},
}
```
## 工作人员
### 查询工作人员列表
......
......@@ -125,9 +125,8 @@ public class AppServiceImpl extends AbstractCRUDServiceImpl<AppDao, AppEntity, L
boolean isDomain = ReUtil.isMatch("^[a-zA-Z0-9][-a-zA-Z0-9]{0,62}(\\.[a-zA-Z0-9][-a-zA-Z0-9]{0,62})*\\.[a-zA-Z]{2,}$", params.getServerName());
if (isDomain) {
domainUrl = String.format("https://", params.getServerName());
domainUrl = String.format("https://%s", params.getServerName());
} else {
domainUrl = "";
}
......@@ -153,8 +152,11 @@ public class AppServiceImpl extends AbstractCRUDServiceImpl<AppDao, AppEntity, L
}
//构建图标地址
if (!ObjectUtils.isEmpty(domainUrl)) {
String appIconUrl = String.format("%s/%s/", domainUrl, item.getAppIconPath());
item.setAppIconUrl(appIconUrl);
/*
item.setAppIconUrl(UrlBuilder.ofHttp(domainUrl)
.addPath(item.getAppIconPath()).build());
.addPath(item.getAppIconPath()).build());*/
} else {
item.setAppIconUrl(item.getAppIconPath());
}
......
package com.mortals.xhx.module.window.dao;
import com.mortals.framework.dao.ICRUDDao;
import com.mortals.framework.model.PageInfo;
import com.mortals.framework.model.Result;
import com.mortals.xhx.module.matter.model.MatterEntity;
import com.mortals.xhx.module.window.model.WindowEntity;
import java.util.List;
/**
* 站点部门窗口Dao
* 站点部门窗口 DAO接口
*
* @author zxfei
* @date 2022-01-12
*/
public interface WindowDao extends ICRUDDao<WindowEntity,Long>{
* 窗口Dao
* 窗口 DAO接口
*
* @author zxfei
* @date 2022-01-12
*/
public interface WindowDao extends ICRUDDao<WindowEntity, Long> {
String SQLID_SUB_HALL_LIST = "getSubHallList";
String SQLID_SUB_HALL_COUNT = "getSubHallListCount";
Result<WindowEntity> getSubHallList(WindowEntity windowQuery, PageInfo pageInfo);
}
package com.mortals.xhx.module.window.dao.ibatis;
import com.mortals.framework.model.PageInfo;
import com.mortals.framework.model.ParamDto;
import com.mortals.framework.model.Result;
import com.mortals.xhx.module.matter.model.MatterEntity;
import org.apache.ibatis.session.RowBounds;
import org.springframework.stereotype.Repository;
import com.mortals.xhx.module.window.dao.WindowDao;
import com.mortals.xhx.module.window.model.WindowEntity;
import java.util.ArrayList;
import java.util.Date;
import com.mortals.framework.dao.ibatis.BaseCRUDDaoMybatis;
import java.util.List;
/**
* 站点部门窗口DaoImpl DAO接口
*
* @author zxfei
* @date 2022-01-12
*/
* 站点部门窗口DaoImpl DAO接口
*
* @author zxfei
* @date 2022-01-12
*/
@Repository("windowDao")
public class WindowDaoImpl extends BaseCRUDDaoMybatis<WindowEntity,Long> implements WindowDao {
public class WindowDaoImpl extends BaseCRUDDaoMybatis<WindowEntity, Long> implements WindowDao {
/**
* @param windowQuery
* @param pageInfo
* @return
*/
@Override
public Result<WindowEntity> getSubHallList(WindowEntity windowQuery, PageInfo pageInfo) {
Result<WindowEntity> result = new Result();
ParamDto paramDto = this.getQueryParam(windowQuery);
int count = this.getSubHallListCount(paramDto);
List list = null;
if (count == 0) {
list = new ArrayList();
} else if (pageInfo.getPrePageResult() == -1) {
list = this.getSqlSession().selectList(this.getSqlId(SQLID_SUB_HALL_LIST), paramDto);
} else {
RowBounds rowBounds = new RowBounds(pageInfo.getBeginIndex(), pageInfo.getPrePageResult());
list = this.getSqlSession().selectList(this.getSqlId(SQLID_SUB_HALL_LIST), this.cpyQueryParamDto(paramDto), rowBounds);
}
pageInfo.setTotalResult(count);
result.setPageInfo(pageInfo);
result.setList(list);
return result;
}
public int getSubHallListCount(ParamDto paramDto) {
return this.getSqlSession().selectOne(this.getSqlId(SQLID_SUB_HALL_COUNT), this.cpyQueryParamDto(paramDto));
}
}
package com.mortals.xhx.module.window.service;
import com.mortals.framework.exception.AppException;
import com.mortals.framework.model.Context;
import com.mortals.framework.model.PageInfo;
import com.mortals.framework.model.Result;
import com.mortals.framework.service.ICRUDService;
import com.mortals.xhx.module.matter.model.MatterEntity;
import com.mortals.xhx.module.window.model.WindowHallEntity;
import com.mortals.xhx.module.window.dao.WindowHallDao;
/**
......@@ -13,4 +18,7 @@ import com.mortals.xhx.module.window.dao.WindowHallDao;
public interface WindowHallService extends ICRUDService<WindowHallEntity,Long>{
WindowHallDao getDao();
}
\ No newline at end of file
package com.mortals.xhx.module.window.service;
import com.mortals.framework.exception.AppException;
import com.mortals.framework.model.Context;
import com.mortals.framework.model.PageInfo;
import com.mortals.framework.model.Result;
import com.mortals.framework.service.ICRUDCacheService;
import com.mortals.framework.service.ICRUDService;
import com.mortals.xhx.module.matter.model.MatterEntity;
import com.mortals.xhx.module.window.dao.WindowDao;
import com.mortals.xhx.module.window.model.WindowEntity;
......@@ -29,4 +33,16 @@ public interface WindowService extends ICRUDCacheService<WindowEntity, Long> {
void addBusinessToWindow(String businessIds, Long windowId, Context context);
/**
* 查找窗口大厅差集子项
* @param windowQuery
* @param pageInfo
* @param context
* @return
* @throws AppException
*/
Result<WindowEntity> findSubHallList(WindowEntity windowQuery, PageInfo pageInfo, Context context) throws AppException;
}
\ No newline at end of file
......@@ -6,6 +6,7 @@ import com.mortals.framework.ap.GlobalSysInfo;
import com.mortals.framework.exception.AppException;
import com.mortals.framework.model.Context;
import com.mortals.framework.model.PageInfo;
import com.mortals.framework.model.Result;
import com.mortals.framework.service.impl.AbstractCRUDCacheServiceImpl;
import com.mortals.framework.util.HttpUtil;
import com.mortals.xhx.common.utils.BeanUtil;
......@@ -128,6 +129,18 @@ public class WindowServiceImpl extends AbstractCRUDCacheServiceImpl<WindowDao, W
windowBusinessService.save(windowBusinessEntities, context);
}
/**
* @param windowQuery
* @param pageInfo
* @param context
* @return
* @throws AppException
*/
@Override
public Result<WindowEntity> findSubHallList(WindowEntity windowQuery, PageInfo pageInfo, Context context) throws AppException {
return this.findSubHallList(windowQuery, pageInfo, context);
}
@Override
protected void removeAfter(Long[] ids, Context context, int result) throws AppException {
......@@ -136,7 +149,7 @@ public class WindowServiceImpl extends AbstractCRUDCacheServiceImpl<WindowDao, W
WindowBusinessQuery windowBusinessQuery = new WindowBusinessQuery();
windowBusinessQuery.setWindowIdList(Arrays.asList(ids));
List<WindowBusinessEntity> windowBusinessEntities = windowBusinessService.find(windowBusinessQuery);
log.info("remove windowBusinessEntities size:{}",windowBusinessEntities.size());
log.info("remove windowBusinessEntities size:{}", windowBusinessEntities.size());
if (!ObjectUtils.isEmpty(windowBusinessEntities)) {
Long[] idList = windowBusinessEntities.stream().map(item -> item.getId()).toArray(Long[]::new);
//windowBusinessService.removeList(windowBusinessEntities, context);
......@@ -146,7 +159,7 @@ public class WindowServiceImpl extends AbstractCRUDCacheServiceImpl<WindowDao, W
WindowMatterQuery windowMatterQuery = new WindowMatterQuery();
windowMatterQuery.setWindowIdList(Arrays.asList(ids));
List<WindowMatterEntity> windowMatterEntities = windowMatterService.find(windowMatterQuery);
log.info("remove windowMatterEntities size:{}",windowMatterEntities.size());
log.info("remove windowMatterEntities size:{}", windowMatterEntities.size());
if (!ObjectUtils.isEmpty(windowMatterEntities)) {
Long[] idList = windowMatterEntities.stream().map(item -> item.getId()).toArray(Long[]::new);
windowMatterService.remove(idList, context);
......@@ -184,7 +197,7 @@ public class WindowServiceImpl extends AbstractCRUDCacheServiceImpl<WindowDao, W
}
private void pushChangeMsg(Long windowId) {
// log.info("pushChangeMsg:{}", JSON.toJSONString(windowId));
// log.info("pushChangeMsg:{}", JSON.toJSONString(windowId));
String phpUrl = GlobalSysInfo.getParamValue(PARAM_SERVER_PHP_HTTP_URL, "http://172.15.28.116:8090");
phpUrl += "/api/window/winNameChange";
HashMap<String, Object> paramsMap = new HashMap<>();
......
package com.mortals.xhx.module.window.web;
import com.alibaba.fastjson.JSONObject;
import com.mortals.framework.annotation.UnAuth;
import com.mortals.framework.common.Rest;
import com.mortals.framework.exception.AppException;
import com.mortals.framework.model.Context;
import com.mortals.framework.model.PageInfo;
import com.mortals.framework.model.Result;
import com.mortals.framework.util.DataUtil;
import com.mortals.framework.web.BaseCRUDJsonBodyMappingController;
import com.mortals.framework.web.BasePhpCRUDJsonMappingController;
import com.mortals.xhx.base.system.param.service.ParamService;
import com.mortals.xhx.module.matter.model.MatterEntity;
import com.mortals.xhx.module.window.model.WindowEntity;
import com.mortals.xhx.module.window.service.WindowBusinessService;
import com.mortals.xhx.module.window.service.WindowService;
......@@ -21,6 +26,9 @@ import java.util.List;
import java.util.Map;
import java.util.stream.Collectors;
import static com.mortals.framework.ap.SysConstains.MESSAGE_INFO;
import static com.mortals.framework.ap.SysConstains.PAGEINFO_KEY;
/**
* 站点部门窗口
*
......@@ -73,4 +81,33 @@ public class WindowController extends BaseCRUDJsonBodyMappingController<WindowSe
return jsonObject.toJSONString();
}
@PostMapping(value = "subHalllist")
@UnAuth
public Rest<Object> subHalllist(@RequestBody WindowEntity query) {
Rest<Object> ret = new Rest<>();
Map<String, Object> model = new HashMap<>();
Context context = this.getContext();
String busiDesc = "查询差集" + this.getModuleDesc();
int code=VALUE_RESULT_SUCCESS;
try {
PageInfo pageInfo = buildPageInfo(query);
Result<WindowEntity> result = this.getService().findSubHallList(query, pageInfo, context);
model.put(KEY_RESULT_DATA, result.getList());
model.put(PAGEINFO_KEY, result.getPageInfo());
parsePageInfo(model, result.getPageInfo());
model.put(MESSAGE_INFO, busiDesc + "成功");
recordSysLog(request, busiDesc + " 【成功】");
} catch (Exception e) {
code = VALUE_RESULT_FAILURE;
this.doException(request, busiDesc, model, e);
}
this.init(model, context);
ret.setCode(code);
ret.setData(model);
ret.setMsg(model.get(MESSAGE_INFO) == null ? "" : model.remove(MESSAGE_INFO).toString());
return ret;
}
}
\ No newline at end of file
......@@ -46,4 +46,7 @@ public class WindowHallController extends BaseCRUDJsonBodyMappingController<Wind
}
}
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"mybatis-3-mapper.dtd">
<mapper namespace="com.mortals.xhx.module.window.dao.ibatis.WindowDaoImpl">
<select id="getSubHallListCount" parameterType="paramDto" resultType="int">
SELECT
count( 1 )
FROM
mortals_sys_window AS a
LEFT JOIN ( SELECT windowId FROM mortals_sys_window_hall
<trim suffixOverrides="where" suffix="">
<if test="condition.siteId!=null and condition.siteId!=''">
where siteId = #{condition.siteId,jdbcType=VARCHAR}
</if>
</trim>
)AS b ON a.id = b.windowId where b.hallId IS NULL
</select>
<!-- 获取事项差集列表列表 -->
<select id="getSubHallList" parameterType="paramDto" resultMap="WindowEntity-Map">
SELECT
<include refid="_columns"/>
FROM
mortals_sys_window AS a
LEFT JOIN ( SELECT windowId FROM mortals_sys_window_hall
<trim suffixOverrides="where" suffix="">
<if test="condition.siteId!=null and condition.siteId!=''">
where siteId = #{condition.siteId,jdbcType=VARCHAR}
</if>
</trim>
)AS b ON a.id = b.windowId where b.hallId IS NULL
</select>
</mapper>
\ No newline at end of file
......@@ -23,7 +23,7 @@
"baseUrl": "http://112.19.80.237:11078/base"
},
"base-yibin-web-https": {
"baseUrl": "https://ybswxxcx.zwfwhfgjjfzj.yibin.gov.cn/basics_api/base"
"baseUrl": "https://ybswxxcx.zwfwhfgjjfzj.yibin.gov.cn/base"
},
"base-yibin-php": {
......
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