优化、权限变更
This commit is contained in:
parent
4725a03fcb
commit
fe73605f49
@ -7,8 +7,10 @@ import com.zhgd.annotation.OperLog;
|
||||
import com.zhgd.jeecg.common.api.vo.Result;
|
||||
import com.zhgd.jeecg.common.system.query.QueryGenerator;
|
||||
import com.zhgd.jeecg.common.util.PageUtil;
|
||||
import com.zhgd.xmgl.modules.basicdata.dto.MenuTreeDto;
|
||||
import com.zhgd.xmgl.modules.basicdata.entity.BaseModule;
|
||||
import com.zhgd.xmgl.modules.basicdata.entity.ModuleTemplate;
|
||||
import com.zhgd.xmgl.modules.basicdata.service.IBaseMenuService;
|
||||
import com.zhgd.xmgl.modules.basicdata.service.IBaseModuleService;
|
||||
import com.zhgd.xmgl.modules.basicdata.service.IModuleTemplateService;
|
||||
import com.zhgd.xmgl.valid.AddGroup;
|
||||
@ -43,6 +45,9 @@ public class BaseModuleController {
|
||||
@Autowired
|
||||
private IBaseModuleService baseModuleService;
|
||||
|
||||
@Autowired
|
||||
private IBaseMenuService baseMenuService;
|
||||
|
||||
@Autowired
|
||||
private IModuleTemplateService moduleTemplateService;
|
||||
|
||||
@ -88,6 +93,17 @@ public class BaseModuleController {
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询所有模块、菜单、按钮
|
||||
* @return
|
||||
*/
|
||||
@OperLog(operModul = "系统模块管理", operType = "列表查询", operDesc = "查询所有模块、菜单、按钮")
|
||||
@ApiOperation(value = "查询所有模块、菜单、按钮", notes = "查询所有模块、菜单、按钮", httpMethod="POST")
|
||||
@PostMapping(value = "/queryAllByType")
|
||||
public Result<List<MenuTreeDto>> queryAllByType(@RequestBody BaseModule baseModule) {
|
||||
return Result.success(baseMenuService.allMenu(baseModule));
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 添加
|
||||
|
||||
@ -2,9 +2,11 @@ package com.zhgd.xmgl.modules.basicdata.controller.admin;
|
||||
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.alibaba.fastjson.JSONArray;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||
import com.zhgd.annotation.OperLog;
|
||||
import com.zhgd.jeecg.common.api.vo.Result;
|
||||
import com.zhgd.jeecg.common.system.query.QueryGenerator;
|
||||
import com.zhgd.xmgl.modules.basicdata.entity.ModuleTemplate;
|
||||
import com.zhgd.xmgl.modules.basicdata.service.IModuleTemplateService;
|
||||
import io.swagger.annotations.Api;
|
||||
@ -41,8 +43,6 @@ public class ModuleTemplateController {
|
||||
@Autowired
|
||||
private IModuleTemplateService moduleTemplateService;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 批量添加/修改
|
||||
* @return
|
||||
@ -91,4 +91,21 @@ public class ModuleTemplateController {
|
||||
result.success("操作成功!");
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询政务下的权限模板信息
|
||||
* @param moduleTemplate
|
||||
* @return
|
||||
*/
|
||||
@OperLog(operModul = "政务模块模板管理", operType = "查询", operDesc = "查询政务下的权限模板信息")
|
||||
@ApiOperation(value = " 查询政务下的权限模板信息", notes = "查询政务下的权限模板信息", httpMethod="POST")
|
||||
@PostMapping(value = "/listByGovernment")
|
||||
public Result<List<ModuleTemplate>> listByGovernment(@RequestBody ModuleTemplate moduleTemplate) {
|
||||
Result<List<ModuleTemplate>> result = new Result<List<ModuleTemplate>>();
|
||||
QueryWrapper<ModuleTemplate> wrapper = QueryGenerator.initQueryWrapper(moduleTemplate);
|
||||
List<ModuleTemplate> moduleTemplates = moduleTemplateService.listByGovernment(wrapper);
|
||||
result.setSuccess(true);
|
||||
result.setResult(moduleTemplates);
|
||||
return result;
|
||||
}
|
||||
}
|
||||
|
||||
@ -1,7 +1,9 @@
|
||||
package com.zhgd.xmgl.modules.basicdata.controller.admin;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.core.toolkit.StringUtils;
|
||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.zhgd.annotation.OperLog;
|
||||
@ -168,11 +170,21 @@ public class SystemConfigController {
|
||||
*/
|
||||
@OperLog(operModul = "系统配置管理", operType = "查询", operDesc = "通过键名查询参数配置信息")
|
||||
@ApiOperation(value = "通过键名查询参数配置信息", notes = "通过键名查询参数配置信息" , httpMethod="POST")
|
||||
@ApiImplicitParam(name = "configKey", value = "参数健名", paramType = "body", required = true, dataType = "String")
|
||||
@ApiImplicitParams({
|
||||
@ApiImplicitParam(name = "configKey", value = "参数健名", paramType = "body", required = true, dataType = "String"),
|
||||
@ApiImplicitParam(name = "configType", value = "参数健类型", paramType = "body", required = true, dataType = "String")
|
||||
})
|
||||
@PostMapping(value = "/queryByKey")
|
||||
public Result<SystemConfig> queryByKey(@ApiIgnore @RequestBody SystemConfig systemConfigEntity) {
|
||||
Result<SystemConfig> result = new Result<SystemConfig>();
|
||||
SystemConfig systemConfig = systemConfigService.getOne(Wrappers.<SystemConfig>lambdaQuery().eq(SystemConfig::getConfigKey, systemConfigEntity.getConfigKey()));
|
||||
public Result<List<SystemConfig>> queryByKey(@ApiIgnore @RequestBody SystemConfig systemConfigEntity) {
|
||||
Result<List<SystemConfig>> result = new Result<List<SystemConfig>>();
|
||||
LambdaQueryWrapper<SystemConfig> wrapper = Wrappers.<SystemConfig>lambdaQuery();
|
||||
if (StringUtils.isNotBlank(systemConfigEntity.getConfigKey())) {
|
||||
wrapper.eq(SystemConfig::getConfigKey, systemConfigEntity.getConfigKey());
|
||||
}
|
||||
if (StringUtils.isNotBlank(systemConfigEntity.getConfigType())) {
|
||||
wrapper.eq(SystemConfig::getConfigType, systemConfigEntity.getConfigType());
|
||||
}
|
||||
List<SystemConfig> systemConfig = systemConfigService.list(wrapper);
|
||||
if(systemConfig==null) {
|
||||
result.error500("未找到对应实体");
|
||||
}else {
|
||||
|
||||
@ -1,12 +1,13 @@
|
||||
package com.zhgd.xmgl.modules.basicdata.controller.enterprise;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.zhgd.annotation.OperLog;
|
||||
import com.zhgd.jeecg.common.api.vo.Result;
|
||||
import com.zhgd.jeecg.common.system.query.QueryGenerator;
|
||||
import com.zhgd.jeecg.common.util.PageUtil;
|
||||
import com.zhgd.xmgl.modules.basicdata.service.IEngineeringService;
|
||||
import com.zhgd.xmgl.modules.wisdom.entity.AiMonitorDev;
|
||||
@ -72,6 +73,7 @@ public class EntAiMonitorDevController {
|
||||
if (StringUtils.isNotBlank(name)) {
|
||||
wrapper.like("d.name", name);
|
||||
}
|
||||
wrapper.orderByAsc("d.priority");
|
||||
return Result.success(aiMonitorDevService.pageList(page, wrapper));
|
||||
}
|
||||
|
||||
@ -85,9 +87,9 @@ public class EntAiMonitorDevController {
|
||||
@ApiImplicitParam(name = "engineeringSn", value = "工程sn", dataType = "String")
|
||||
@PostMapping(value = "/list")
|
||||
public Result<List<AiMonitorDev>> queryList(@ApiIgnore @RequestBody AiMonitorDev aiMonitorDev) {
|
||||
LambdaQueryWrapper<AiMonitorDev> wrapper = Wrappers.<AiMonitorDev>lambdaQuery();
|
||||
if (aiMonitorDev.getEngineeringSn() != null) {
|
||||
wrapper.eq(AiMonitorDev::getEngineeringSn, aiMonitorDev.getEngineeringSn());
|
||||
QueryWrapper<AiMonitorDev> wrapper = QueryGenerator.initQueryWrapper(aiMonitorDev);
|
||||
if (StringUtils.isNotBlank(aiMonitorDev.getProjectSn())) {
|
||||
wrapper.lambda().eq(AiMonitorDev::getEngineeringSn, StrUtil.EMPTY);
|
||||
}
|
||||
List<AiMonitorDev> list = aiMonitorDevService.list(wrapper);
|
||||
return Result.success(list);
|
||||
|
||||
@ -76,7 +76,7 @@ public class EntEnvironmentDevController {
|
||||
wrapper.like("d.name", name);
|
||||
}
|
||||
Page<EnvironmentDev> page = PageUtil.getPage(map);
|
||||
wrapper.orderByDesc("d.priority");
|
||||
wrapper.orderByAsc("d.priority");
|
||||
IPage<EnvironmentDev> pageList = environmentDevService.pageList(page, wrapper);
|
||||
return Result.success(pageList);
|
||||
}
|
||||
|
||||
@ -75,7 +75,7 @@ public class EntMonitorDevController {
|
||||
if (StringUtils.isNotBlank(name)) {
|
||||
wrapper.like("m.name", name);
|
||||
}
|
||||
wrapper.orderByDesc("m.priority");
|
||||
wrapper.orderByAsc("m.priority");
|
||||
return Result.success(monitorDevService.pageList(page, wrapper));
|
||||
}
|
||||
|
||||
|
||||
@ -1,12 +1,13 @@
|
||||
package com.zhgd.xmgl.modules.basicdata.controller.enterprise;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.core.toolkit.StringUtils;
|
||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.zhgd.annotation.OperLog;
|
||||
import com.zhgd.jeecg.common.api.vo.Result;
|
||||
import com.zhgd.jeecg.common.system.query.QueryGenerator;
|
||||
import com.zhgd.xmgl.modules.wisdom.dto.TeamInfoDto;
|
||||
import com.zhgd.xmgl.modules.wisdom.entity.TeamInfo;
|
||||
import com.zhgd.xmgl.modules.wisdom.service.ITeamInfoService;
|
||||
@ -69,9 +70,9 @@ public class EntTeamInfoController {
|
||||
@ApiImplicitParam(name = "engineeringSn", value = "工程sn", paramType = "body", dataType = "String")
|
||||
@PostMapping(value = "/list")
|
||||
public Result<List<TeamInfo>> queryList(@ApiIgnore @RequestBody TeamInfo teamInfo) {
|
||||
LambdaQueryWrapper<TeamInfo> wrapper = Wrappers.<TeamInfo>lambdaQuery();
|
||||
if (StringUtils.isNotBlank(teamInfo.getEngineeringSn())) {
|
||||
wrapper.eq(TeamInfo::getEngineeringSn, teamInfo.getEngineeringSn());
|
||||
QueryWrapper<TeamInfo> wrapper = QueryGenerator.initQueryWrapper(teamInfo);
|
||||
if (StringUtils.isNotBlank(teamInfo.getProjectSn())) {
|
||||
wrapper.lambda().eq(TeamInfo::getEngineeringSn, StrUtil.EMPTY);
|
||||
}
|
||||
List<TeamInfo> list = teamInfoService.list(wrapper);
|
||||
return Result.success(list);
|
||||
|
||||
@ -115,7 +115,6 @@ public class GovAcceptInspectRecordController {
|
||||
result.error500("该执法任务已提交审核");
|
||||
} else {
|
||||
acceptInspectRecordVo.setCreateBy(acceptInspectRecordEntity.getCreateBy());
|
||||
acceptInspectRecordVo.setCreateTime(new Date());
|
||||
acceptInspectRecordService.commit(acceptInspectRecordVo);
|
||||
Map<String, Object> resultMap = new HashMap<>();
|
||||
if (StringUtils.isNotBlank(acceptInspectRecordEntity.getEngineeringSn())) {
|
||||
@ -152,7 +151,7 @@ public class GovAcceptInspectRecordController {
|
||||
}
|
||||
if (acceptInspectRecordEntity.getState() == 0) {
|
||||
acceptInspectRecord.setState(1);
|
||||
acceptInspectRecord.setCreateTime(new Date());
|
||||
acceptInspectRecord.setInspectTime(new Date());
|
||||
}
|
||||
boolean ok = acceptInspectRecordService.updateById(acceptInspectRecord);
|
||||
if (ok) {
|
||||
|
||||
@ -50,8 +50,8 @@ public class GovCheckAcceptApplyController {
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@OperLog(operModul = "扬尘管理", operType = "分页查询", operDesc = "分页列表查询扬尘工程信息")
|
||||
@ApiOperation(value = " 分页列表查询扬尘工程信息", notes = "分页列表查询扬尘工程信息", httpMethod = "POST")
|
||||
@OperLog(operModul = "验收申请管理", operType = "分页查询", operDesc = "分页列表查询验收申请工程信息")
|
||||
@ApiOperation(value = " 分页列表查询验收申请工程信息", notes = "分页列表查询验收申请工程信息", httpMethod = "POST")
|
||||
@ApiImplicitParams({
|
||||
@ApiImplicitParam(name = "engineeringName", value = "工程名称", paramType = "body", dataType = "String"),
|
||||
@ApiImplicitParam(name = "pageNo", value = "页数", paramType = "body", required = true, defaultValue = "1", dataType = "Integer"),
|
||||
@ -67,8 +67,8 @@ public class GovCheckAcceptApplyController {
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@OperLog(operModul = "扬尘管理", operType = "分页查询", operDesc = "分页列表查询扬尘项目信息")
|
||||
@ApiOperation(value = " 分页列表查询扬尘项目信息", notes = "分页列表查询扬尘项目信息", httpMethod = "POST")
|
||||
@OperLog(operModul = "验收申请管理", operType = "分页查询", operDesc = "分页列表查询验收申请项目信息")
|
||||
@ApiOperation(value = " 分页列表查询验收申请项目信息", notes = "分页列表查询验收申请项目信息", httpMethod = "POST")
|
||||
@ApiImplicitParams({
|
||||
@ApiImplicitParam(name = "projectName", value = "项目名称", paramType = "body", dataType = "String"),
|
||||
@ApiImplicitParam(name = "pageNo", value = "页数", paramType = "body", required = true, defaultValue = "1", dataType = "Integer"),
|
||||
|
||||
@ -48,8 +48,8 @@ public class GovCheckAcceptPlanController {
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@OperLog(operModul = "扬尘管理", operType = "分页查询", operDesc = "分页列表查询扬尘工程信息")
|
||||
@ApiOperation(value = " 分页列表查询扬尘工程信息", notes = "分页列表查询扬尘工程信息", httpMethod = "POST")
|
||||
@OperLog(operModul = "验收计划管理", operType = "分页查询", operDesc = "分页列表查询验收计划工程信息")
|
||||
@ApiOperation(value = " 分页列表查询验收计划工程信息", notes = "分页列表查询验收计划工程信息", httpMethod = "POST")
|
||||
@ApiImplicitParams({
|
||||
@ApiImplicitParam(name = "engineeringName", value = "工程名称", paramType = "body", dataType = "String"),
|
||||
@ApiImplicitParam(name = "pageNo", value = "页数", paramType = "body", required = true, defaultValue = "1", dataType = "Integer"),
|
||||
@ -65,8 +65,8 @@ public class GovCheckAcceptPlanController {
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@OperLog(operModul = "扬尘管理", operType = "分页查询", operDesc = "分页列表查询扬尘项目信息")
|
||||
@ApiOperation(value = " 分页列表查询扬尘项目信息", notes = "分页列表查询扬尘项目信息", httpMethod = "POST")
|
||||
@OperLog(operModul = "验收计划管理", operType = "分页查询", operDesc = "分页列表查询验收计划项目信息")
|
||||
@ApiOperation(value = " 分页列表查询验收计划项目信息", notes = "分页列表查询验收计划项目信息", httpMethod = "POST")
|
||||
@ApiImplicitParams({
|
||||
@ApiImplicitParam(name = "projectName", value = "项目名称", paramType = "body", dataType = "String"),
|
||||
@ApiImplicitParam(name = "pageNo", value = "页数", paramType = "body", required = true, defaultValue = "1", dataType = "Integer"),
|
||||
|
||||
@ -3,7 +3,6 @@ package com.zhgd.xmgl.modules.basicdata.controller.project;
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.zhgd.annotation.OperLog;
|
||||
import com.zhgd.jeecg.common.api.vo.Result;
|
||||
@ -66,6 +65,7 @@ public class AiMonitorDevController {
|
||||
queryWrapper.lambda().eq(AiMonitorDev::getEngineeringSn, StrUtil.EMPTY);
|
||||
}
|
||||
Page<AiMonitorDev> page = PageUtil.getPage(map);
|
||||
queryWrapper.lambda().orderByAsc(AiMonitorDev::getPriority);
|
||||
return Result.success(aiMonitorDevService.page(page, queryWrapper));
|
||||
}
|
||||
|
||||
@ -78,11 +78,11 @@ public class AiMonitorDevController {
|
||||
@ApiOperation(value = " 列表查询AI预警设备管理信息", notes = "列表查询AI预警设备管理信息", httpMethod = "POST")
|
||||
@PostMapping(value = "/list")
|
||||
public Result<List<AiMonitorDev>> queryList(@RequestBody AiMonitorDev aiMonitorDev) {
|
||||
QueryWrapper<AiMonitorDev> wrapper = Wrappers.<AiMonitorDev>query();
|
||||
QueryWrapper<AiMonitorDev> wrapper = QueryGenerator.initQueryWrapper(aiMonitorDev);
|
||||
if (StringUtils.isNotBlank(aiMonitorDev.getProjectSn())) {
|
||||
wrapper.lambda().eq(AiMonitorDev::getEngineeringSn, StrUtil.EMPTY);
|
||||
}
|
||||
List<AiMonitorDev> list = aiMonitorDevService.list(null);
|
||||
List<AiMonitorDev> list = aiMonitorDevService.list(wrapper);
|
||||
return Result.success(list);
|
||||
}
|
||||
|
||||
|
||||
@ -69,7 +69,7 @@ public class EnvironmentDevController {
|
||||
wrapper.lambda().eq(EnvironmentDev::getEngineeringSn, StrUtil.EMPTY);
|
||||
}
|
||||
Page<EnvironmentDev> page = PageUtil.getPage(map);
|
||||
wrapper.lambda().orderByDesc(EnvironmentDev::getPriority);
|
||||
wrapper.lambda().orderByAsc(EnvironmentDev::getPriority);
|
||||
IPage<EnvironmentDev> pageList = environmentDevService.page(page, wrapper);
|
||||
return Result.success(pageList);
|
||||
}
|
||||
|
||||
@ -70,7 +70,7 @@ public class MonitorDevController {
|
||||
queryWrapper.lambda().eq(MonitorDev::getEngineeringSn, StrUtil.EMPTY);
|
||||
}
|
||||
Page<MonitorDev> page = PageUtil.getPage(map);
|
||||
queryWrapper.lambda().orderByDesc(MonitorDev::getPriority);
|
||||
queryWrapper.lambda().orderByAsc(MonitorDev::getPriority);
|
||||
IPage<MonitorDev> pageList = monitorDevService.page(page, queryWrapper);
|
||||
result.setSuccess(true);
|
||||
result.setResult(pageList);
|
||||
|
||||
@ -1,6 +1,7 @@
|
||||
package com.zhgd.xmgl.modules.basicdata.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
@ -46,4 +47,14 @@ public class ModuleTemplate implements Serializable {
|
||||
@Excel(name = "模块id", width = 15)
|
||||
@ApiModelProperty(value = "模块id")
|
||||
private Long moduleId;
|
||||
/**
|
||||
* 菜单类型,0:模块 1:菜单;2:按钮
|
||||
*/
|
||||
@Excel(name = "菜单类型,0:模块 1:菜单;2:按钮", width = 15)
|
||||
@ApiModelProperty(value = "菜单类型,0:模块 1:菜单;2:按钮")
|
||||
private Integer type;
|
||||
|
||||
@TableField(exist = false)
|
||||
@ApiModelProperty(value = "子集数量")
|
||||
private Integer children = 0;
|
||||
}
|
||||
|
||||
@ -38,12 +38,24 @@ public class SystemConfig implements Serializable {
|
||||
@Excel(name = "参数名称", width = 15)
|
||||
@ApiModelProperty(value = "参数名称")
|
||||
private String configName;
|
||||
/**
|
||||
* 参数分类
|
||||
*/
|
||||
@Excel(name = "参数分类", width = 15)
|
||||
@ApiModelProperty(value = "参数分类")
|
||||
private String configType;
|
||||
/**
|
||||
* 参数键名
|
||||
*/
|
||||
@Excel(name = "参数键名", width = 15)
|
||||
@ApiModelProperty(value = "参数键名")
|
||||
private String configKey;
|
||||
/**
|
||||
* 参数值类型(1:文字描述;2:图片)
|
||||
*/
|
||||
@Excel(name = "参数值类型(1:文字描述;2:图片)", width = 15)
|
||||
@ApiModelProperty(value = "参数值类型(1:文字描述;2:图片)")
|
||||
private Integer configValueType;
|
||||
/**
|
||||
* 参数键值
|
||||
*/
|
||||
|
||||
@ -16,6 +16,7 @@
|
||||
SELECT <include refid="userInfo"></include>, d.dept_name, ur.role_id FROM system_user u
|
||||
LEFT JOIN system_dept d ON u.department = d.dept_id
|
||||
LEFT JOIN system_user_role ur ON u.user_id = ur.user_id
|
||||
LEFT JOIN system_role r ON r.role_id = ur.role_id
|
||||
${ew.customSqlSegment}
|
||||
</select>
|
||||
</mapper>
|
||||
@ -3,7 +3,6 @@ package com.zhgd.xmgl.modules.basicdata.service;
|
||||
import com.alibaba.fastjson.JSONArray;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.zhgd.jeecg.common.mybatis.EntityMap;
|
||||
import com.zhgd.xmgl.modules.basicdata.dto.MenuHzDto;
|
||||
import com.zhgd.xmgl.modules.basicdata.dto.MenuTreeDto;
|
||||
import com.zhgd.xmgl.modules.basicdata.entity.BaseMenu;
|
||||
import com.zhgd.xmgl.modules.basicdata.entity.BaseModule;
|
||||
@ -47,6 +46,8 @@ public interface IBaseMenuService extends IService<BaseMenu> {
|
||||
|
||||
JSONArray selectGroupList(Map<String, Object> map);
|
||||
|
||||
List<MenuTreeDto> allMenu(BaseModule baseModule);
|
||||
|
||||
List<MenuTreeDto> treeMenu(Integer type);
|
||||
|
||||
List<MenuTreeDto> myTreeMenu(Long moduleId);
|
||||
|
||||
@ -1,7 +1,10 @@
|
||||
package com.zhgd.xmgl.modules.basicdata.service;
|
||||
|
||||
import com.zhgd.xmgl.modules.basicdata.entity.ModuleTemplate;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.zhgd.xmgl.modules.basicdata.entity.ModuleTemplate;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @Description: 所属政务模块模板
|
||||
@ -11,4 +14,5 @@ import com.baomidou.mybatisplus.extension.service.IService;
|
||||
*/
|
||||
public interface IModuleTemplateService extends IService<ModuleTemplate> {
|
||||
|
||||
List<ModuleTemplate> listByGovernment(QueryWrapper<ModuleTemplate> wrapper);
|
||||
}
|
||||
|
||||
@ -77,6 +77,27 @@ public class BaseMenuServiceImpl extends ServiceImpl<BaseMenuMapper, BaseMenu> i
|
||||
return result;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<MenuTreeDto> allMenu(BaseModule baseModule) {
|
||||
// 查询当前账号所属政务下的模块
|
||||
List<BaseModule> baseModules = baseModuleService.list(Wrappers.<BaseModule>lambdaQuery()
|
||||
.eq(BaseModule::getModuleType, baseModule.getModuleType())
|
||||
.eq(BaseModule::getStyleType, baseModule.getStyleType()));
|
||||
if (baseModules.size() == 0) {
|
||||
return null;
|
||||
}
|
||||
List<MenuTreeDto> menuList = TreeUtil.formatModule(baseModules);
|
||||
// 查询相对应的菜单
|
||||
List<BaseMenu> baseMenus = baseMenuMapper.selectList(Wrappers.<BaseMenu>lambdaQuery().in(BaseMenu::getModuleId,
|
||||
baseModules.stream().map(m -> m.getModuleId()).collect(Collectors.toList())).eq(BaseMenu::getStatus, 1).orderByAsc(BaseMenu::getPriority));
|
||||
menuList.addAll(TreeUtil.formatMenu(baseMenus));
|
||||
// 查询相对应的按钮权限
|
||||
List<BaseAction> baseAction = baseActionMapper.selectList(Wrappers.<BaseAction>lambdaQuery().in(BaseAction::getMenuId,
|
||||
baseMenus.stream().map(m -> m.getMenuId()).collect(Collectors.toList())).eq(BaseAction::getStatus, 1));
|
||||
menuList.addAll(TreeUtil.formatAction(baseAction));
|
||||
return TreeUtil.build(menuList, 1, 0L, 1);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<MenuTreeDto> treeMenu(Integer type) {
|
||||
// 查询当前账号所属政务下的模块
|
||||
|
||||
@ -1,11 +1,20 @@
|
||||
package com.zhgd.xmgl.modules.basicdata.service.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.zhgd.xmgl.modules.basicdata.entity.BaseAction;
|
||||
import com.zhgd.xmgl.modules.basicdata.entity.BaseMenu;
|
||||
import com.zhgd.xmgl.modules.basicdata.entity.ModuleTemplate;
|
||||
import com.zhgd.xmgl.modules.basicdata.mapper.BaseActionMapper;
|
||||
import com.zhgd.xmgl.modules.basicdata.mapper.BaseMenuMapper;
|
||||
import com.zhgd.xmgl.modules.basicdata.mapper.ModuleTemplateMapper;
|
||||
import com.zhgd.xmgl.modules.basicdata.service.IModuleTemplateService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import java.util.List;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
/**
|
||||
* @Description: 所属政务模块模板
|
||||
@ -16,4 +25,36 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
@Service
|
||||
public class ModuleTemplateServiceImpl extends ServiceImpl<ModuleTemplateMapper, ModuleTemplate> implements IModuleTemplateService {
|
||||
|
||||
@Autowired
|
||||
private BaseMenuMapper baseMenuMapper;
|
||||
@Autowired
|
||||
private BaseActionMapper baseActionMapper;
|
||||
|
||||
@Override
|
||||
public List<ModuleTemplate> listByGovernment(QueryWrapper<ModuleTemplate> wrapper) {
|
||||
// 查询角色下的菜单
|
||||
List<ModuleTemplate> moduleTemplateList = this.list(wrapper);
|
||||
List<Long> menuIds = moduleTemplateList.stream().filter(s -> s.getType() == 1).map(s -> s.getModuleId()).collect(Collectors.toList());
|
||||
if (menuIds.size() == 0) {
|
||||
menuIds.add(0L);
|
||||
}
|
||||
List<BaseMenu> baseMenuList = baseMenuMapper.selectList(Wrappers.<BaseMenu>lambdaQuery().in(BaseMenu::getMenuId, menuIds));
|
||||
List<Long> actionIds = moduleTemplateList.stream().filter(s -> s.getType() == 2).map(s -> s.getModuleId()).collect(Collectors.toList());
|
||||
if (actionIds.size() == 0) {
|
||||
actionIds.add(0L);
|
||||
}
|
||||
List<BaseAction> baseActionList = baseActionMapper.selectList(Wrappers.<BaseAction>lambdaQuery().in(BaseAction::getActionId, actionIds));
|
||||
moduleTemplateList.stream().forEach(s -> {
|
||||
if (s.getType() == 0) {
|
||||
s.setChildren(baseMenuList.stream().filter(b -> b.getModuleId().equals(s.getModuleId())).collect(Collectors.toList()).size());
|
||||
} else if (s.getType() == 1) {
|
||||
int number = baseMenuList.stream().filter(b -> b.getParentId().equals(s.getModuleId())).collect(Collectors.toList()).size();
|
||||
if (number == 0) {
|
||||
number = baseActionList.stream().filter(a -> a.getMenuId().equals(s.getModuleId())).collect(Collectors.toList()).size();
|
||||
}
|
||||
s.setChildren(number);
|
||||
}
|
||||
});
|
||||
return moduleTemplateList;
|
||||
}
|
||||
}
|
||||
|
||||
@ -9,6 +9,7 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.zhgd.jeecg.common.system.query.QueryGenerator;
|
||||
import com.zhgd.jeecg.common.util.PageUtil;
|
||||
import com.zhgd.xmgl.async.AsyncEmail;
|
||||
import com.zhgd.xmgl.modules.basicdata.dto.ProjectDto;
|
||||
import com.zhgd.xmgl.modules.basicdata.dto.ProjectPageDto;
|
||||
import com.zhgd.xmgl.modules.basicdata.entity.Project;
|
||||
@ -51,6 +52,9 @@ public class ProjectServiceImpl extends ServiceImpl<ProjectMapper, Project> impl
|
||||
@Autowired
|
||||
private IEnvironmentAlarmService environmentAlarmService;
|
||||
|
||||
@Autowired
|
||||
private AsyncEmail asyncEmail;
|
||||
|
||||
@Override
|
||||
public Page<ProjectDto> getPageList(Map<String, Object> map) {
|
||||
SecurityUser user = SecurityUtil.getUser();
|
||||
@ -115,6 +119,7 @@ public class ProjectServiceImpl extends ServiceImpl<ProjectMapper, Project> impl
|
||||
public boolean examine(Project project, Integer suggest) {
|
||||
SystemUser systemUser = systemUserMapper.selectOne(Wrappers.<SystemUser>lambdaQuery()
|
||||
.eq(SystemUser::getSn, project.getProjectSn()).eq(SystemUser::getIsManager, true));
|
||||
String content = "";
|
||||
if (suggest == 1) {
|
||||
LambdaUpdateWrapper<Project> projectWrapper = Wrappers.<Project>lambdaUpdate();
|
||||
projectWrapper.set(Project::getState, 1);
|
||||
@ -125,10 +130,13 @@ public class ProjectServiceImpl extends ServiceImpl<ProjectMapper, Project> impl
|
||||
userWrapper.set(SystemUser::getState, 1);
|
||||
userWrapper.eq(SystemUser::getUserId, systemUser.getUserId());
|
||||
systemUserMapper.update(systemUser, userWrapper);
|
||||
content = "项目审批已通过; 项目名称:"+ project.getProjectName() + ", 项目账号:" + systemUser.getAccount() + ", 密码:" + systemUser.getShowPassword();
|
||||
} else {
|
||||
systemUserMapper.deleteById(systemUser.getUserId());
|
||||
this.removeById(project.getProjectId());
|
||||
content = "项目审批已驳回; 项目名称:"+ project.getProjectName();
|
||||
}
|
||||
asyncEmail.sendEmail(project.getGovernmentSn(), systemUser.getEmail(), "项目审批结果通知", content);
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
@ -76,6 +76,7 @@ public class SystemUserServiceImpl extends ServiceImpl<SystemUserMapper, SystemU
|
||||
SecurityUser user = SecurityUtil.getUser();
|
||||
wrapper.eq("u.account_type", user.getAccountType());
|
||||
wrapper.eq("u.state", 1);
|
||||
wrapper.eq("r.state", 1);
|
||||
if (systemUser.getSn() == null) {
|
||||
wrapper.eq("u.sn", user.getSn());
|
||||
} else {
|
||||
|
||||
@ -115,14 +115,18 @@ public class AcceptInspectRecord implements Serializable {
|
||||
@Excel(name = "创建人", width = 15)
|
||||
@ApiModelProperty(value = "创建人")
|
||||
private String createBy;
|
||||
/**
|
||||
* 创建日期
|
||||
*/
|
||||
@Excel(name = "创建日期", width = 20, format = "yyyy-MM-dd HH:mm:ss")
|
||||
@ApiModelProperty(value = "创建日期")
|
||||
private Date createTime;
|
||||
/**
|
||||
* 检查日期
|
||||
*/
|
||||
@Excel(name = "检查日期", width = 20, format = "yyyy-MM-dd HH:mm:ss")
|
||||
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@ApiModelProperty(value = "检查日期")
|
||||
private Date createTime;
|
||||
private Date inspectTime;
|
||||
/**
|
||||
* 整改问题数
|
||||
*/
|
||||
|
||||
@ -34,6 +34,7 @@ import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.stream.Collectors;
|
||||
@ -168,6 +169,7 @@ public class CheckAcceptApplyServiceImpl extends ServiceImpl<CheckAcceptApplyMap
|
||||
acceptInspectRecord.setCheckAcceptId(acceptApply.getId());
|
||||
acceptInspectRecord.setInspectUser(user.getUserId());
|
||||
acceptInspectRecord.setCreateBy(user.getUserId());
|
||||
acceptInspectRecord.setCreateTime(new Date());
|
||||
acceptInspectRecord.setType(acceptApply.getType());
|
||||
acceptInspectRecord.setState(0);
|
||||
acceptInspectRecord.setProjectSn(acceptApply.getProjectSn());
|
||||
|
||||
@ -1,5 +1,6 @@
|
||||
package com.zhgd.xmgl.modules.quality.service.impl;
|
||||
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
@ -66,9 +67,13 @@ public class CheckAcceptPlanServiceImpl extends ServiceImpl<CheckAcceptPlanMappe
|
||||
public Page<CheckAcceptPlanProDto> pageListByGov(Map<String, Object> map) {
|
||||
Page<CheckAcceptPlanProDto> pageListByGov = PageUtil.copyProperties(projectService.pageListForGov(map), CheckAcceptPlanProDto.class);
|
||||
pageListByGov.getRecords().stream().forEach(e -> {
|
||||
e.setSingleProjectNum(baseMapper.selectCount(Wrappers.<CheckAcceptPlan>lambdaQuery().eq(CheckAcceptPlan::getProjectSn, e.getProjectSn())));
|
||||
e.setSingleProjectNum(baseMapper.selectCount(Wrappers.<CheckAcceptPlan>lambdaQuery()
|
||||
.eq(CheckAcceptPlan::getProjectSn, e.getProjectSn())
|
||||
.eq(CheckAcceptPlan::getEngineeringSn, StrUtil.EMPTY)));
|
||||
e.setAcceptedNum(baseMapper.selectCount(Wrappers.<CheckAcceptPlan>lambdaQuery()
|
||||
.eq(CheckAcceptPlan::getProjectSn, e.getProjectSn()).eq(CheckAcceptPlan::getState, 1)));
|
||||
.eq(CheckAcceptPlan::getProjectSn, e.getProjectSn())
|
||||
.eq(CheckAcceptPlan::getEngineeringSn, StrUtil.EMPTY)
|
||||
.eq(CheckAcceptPlan::getState, 1)));
|
||||
});
|
||||
return pageListByGov;
|
||||
}
|
||||
|
||||
@ -97,8 +97,6 @@ public class InspectRecordServiceImpl extends ServiceImpl<InspectRecordMapper, I
|
||||
if (null != joinFlag && joinFlag) {
|
||||
wrapper.lambda().ne(InspectRecord::getCreateBy, userId).apply("FIND_IN_SET({0}, inspect_user)", userId);
|
||||
wrapper.lambda().orderByAsc(InspectRecord::getState);
|
||||
} else {
|
||||
wrapper.lambda().eq(InspectRecord::getCreateBy, userId);
|
||||
}
|
||||
wrapper.lambda().orderByDesc(InspectRecord::getCreateTime);
|
||||
Page<InspectRecordDto> inspectRecordDtoPage = baseMapper.pageList(page, wrapper);
|
||||
|
||||
@ -103,7 +103,7 @@ public class ProjectSubItemServiceImpl extends ServiceImpl<ProjectSubItemMapper,
|
||||
List<ProjectSubItem> list = this.list(Wrappers.<ProjectSubItem>lambdaQuery().eq(ProjectSubItem::getParentId, projectSubItem.getParentId()));
|
||||
BigDecimal reduce = list.stream().map(l -> l.getCompleteRatio()).reduce(BigDecimal.ZERO, BigDecimal::add);
|
||||
BigDecimal total = new BigDecimal(list.size());
|
||||
parentNode.setCompleteRatio(reduce.divide(total));
|
||||
parentNode.setCompleteRatio(reduce.divide(total, 2, BigDecimal.ROUND_HALF_UP));
|
||||
this.updateById(parentNode);
|
||||
}
|
||||
return flag;
|
||||
@ -118,14 +118,14 @@ public class ProjectSubItemServiceImpl extends ServiceImpl<ProjectSubItemMapper,
|
||||
List<ProjectSubItem> list = this.list(Wrappers.<ProjectSubItem>lambdaQuery().eq(ProjectSubItem::getParentId, projectSubItem.getParentId()));
|
||||
BigDecimal reduce = list.stream().map(l -> l.getCompleteRatio()).reduce(BigDecimal.ZERO, BigDecimal::add);
|
||||
BigDecimal total = new BigDecimal(list.size());
|
||||
parentNode.setCompleteRatio(reduce.divide(total));
|
||||
parentNode.setCompleteRatio(reduce.divide(total, 2, BigDecimal.ROUND_HALF_UP));
|
||||
this.updateById(parentNode);
|
||||
} else {
|
||||
List<ProjectSubItem> list = this.list(Wrappers.<ProjectSubItem>lambdaQuery().eq(ProjectSubItem::getParentId, projectSubItem.getId()));
|
||||
if (list.size() > 0) {
|
||||
BigDecimal reduce = list.stream().map(l -> l.getCompleteRatio()).reduce(BigDecimal.ZERO, BigDecimal::add);
|
||||
BigDecimal total = new BigDecimal(list.size());
|
||||
projectSubItem.setCompleteRatio(reduce.divide(total));
|
||||
projectSubItem.setCompleteRatio(reduce.divide(total, 2, BigDecimal.ROUND_HALF_UP));
|
||||
}
|
||||
this.updateById(projectSubItem);
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user