From 3f9a5fefd3e783629cf2e9411b204c7dcf42f5e6 Mon Sep 17 00:00:00 2001 From: pengjie <17373303529@163.com> Date: Fri, 24 Mar 2023 17:33:44 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8E=A5=E5=8F=A3=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/zhgd/xmgl/async/AsyncAttendance.java | 48 +++++++++++----- .../java/com/zhgd/xmgl/config/FaceRunner.java | 26 ++++----- .../controller/admin/BaseMenuController.java | 12 ++++ .../admin/BaseModuleController.java | 25 +++++++-- .../admin/GovernmentController.java | 1 + .../admin/HardWareCallbackController.java | 2 +- .../admin/SystemConfigController.java | 6 +- .../admin/SystemDictDataController.java | 1 - .../government/GovEngineeringController.java | 11 ++-- .../government/GovEnterpriseController.java | 1 + .../project/EngineeringController.java | 5 +- .../modules/basicdata/dto/MenuTreeDto.java | 11 ++-- .../zhgd/xmgl/modules/basicdata/dto/Meta.java | 35 ++++++++++++ .../modules/basicdata/dto/MonitorTreeDto.java | 3 + .../xmgl/modules/basicdata/dto/TreeDto.java | 7 +-- .../basicdata/entity/AttendanceDev.java | 8 +-- .../modules/basicdata/entity/BaseMenu.java | 6 +- .../modules/basicdata/entity/BaseModule.java | 2 +- .../modules/basicdata/entity/Enterprise.java | 8 +++ .../basicdata/entity/EnterpriseMain.java | 8 +++ .../basicdata/mapper/AttendanceDevMapper.java | 2 +- .../basicdata/mapper/BaseModuleMapper.java | 8 +-- .../mapper/EnterpriseMainMapper.java | 3 + .../basicdata/mapper/EnterpriseMapper.java | 5 ++ .../mapper/xml/AttendanceDevMapper.xml | 4 +- .../basicdata/mapper/xml/BaseModuleMapper.xml | 3 + .../mapper/xml/EnterpriseMainMapper.xml | 6 ++ .../basicdata/mapper/xml/EnterpriseMapper.xml | 12 +++- .../basicdata/mapper/xml/ProjectMapper.xml | 2 +- .../basicdata/service/IBaseMenuService.java | 2 + .../basicdata/service/IBaseModuleService.java | 2 + .../service/IEnterpriseMainService.java | 5 +- .../impl/AiMonitorAlarmServiceImpl.java | 4 +- .../impl/AttendanceDevServiceImpl.java | 20 +------ .../service/impl/BaseMenuServiceImpl.java | 22 +++++++- .../service/impl/BaseModuleServiceImpl.java | 12 +++- .../service/impl/EngineeringServiceImpl.java | 12 ++-- .../impl/EnterpriseMainServiceImpl.java | 7 +++ .../service/impl/EnterpriseServiceImpl.java | 23 ++++++-- .../service/impl/GovernmentServiceImpl.java | 3 +- .../service/impl/MonitorDevServiceImpl.java | 16 ++++-- .../service/impl/ProjectServiceImpl.java | 7 +-- .../basicdata/statistics/EngineeringStat.java | 10 +++- .../zhgd/xmgl/security/WebSecurityConfig.java | 1 + .../java/com/zhgd/xmgl/util/HttpUtil.java | 1 + .../java/com/zhgd/xmgl/util/ParamEnum.java | 29 ++-------- .../java/com/zhgd/xmgl/util/TreeUtil.java | 37 +++++++----- src/main/resources/application-dev.properties | 22 ++++++-- .../resources/application-test.properties | 56 +++++++++++++++++++ src/main/resources/application.properties | 13 ----- 50 files changed, 394 insertions(+), 181 deletions(-) create mode 100644 src/main/java/com/zhgd/xmgl/modules/basicdata/dto/Meta.java create mode 100644 src/main/resources/application-test.properties diff --git a/src/main/java/com/zhgd/xmgl/async/AsyncAttendance.java b/src/main/java/com/zhgd/xmgl/async/AsyncAttendance.java index ef90276..b2df124 100644 --- a/src/main/java/com/zhgd/xmgl/async/AsyncAttendance.java +++ b/src/main/java/com/zhgd/xmgl/async/AsyncAttendance.java @@ -12,7 +12,9 @@ import com.zhgd.xmgl.modules.basicdata.mapper.AttendanceDevMapper; import com.zhgd.xmgl.modules.basicdata.service.IAttendanceDevSyncService; import com.zhgd.xmgl.modules.basicdata.service.ISystemDictDataService; import com.zhgd.xmgl.util.HttpUtil; +import com.zhgd.xmgl.util.ParamEnum; import lombok.extern.slf4j.Slf4j; +import org.apache.commons.lang.StringUtils; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.scheduling.annotation.Async; import org.springframework.stereotype.Component; @@ -39,16 +41,20 @@ public class AsyncAttendance { /** * 同步考勤设备信息 - * @param requestUrl + * @param type * @param attendanceDev */ @Async("countAttendanceExecutor") - public void syncAttendanceDev(String requestUrl, AttendanceDev attendanceDev) { + public void syncAttendanceDev(Integer type, AttendanceDev attendanceDev) { + String requestUrl = buildRequestUrl(type, attendanceDev.getProduceId()); + if (requestUrl == null) { + return; + } try { JSONObject jsonObject = JSONObject.parseObject(JSON.toJSONString(attendanceDev)); // 推送同步信息 String result = HttpUtil.doPost(requestUrl, jsonObject.toString()); - int state = result == null ? 0 : 1; + int state = StringUtils.isBlank(result) ? 0 : 1; // 记录推送信息 AttendanceDevSync attendanceDevSync = new AttendanceDevSync(); attendanceDevSync.setMainId(attendanceDev.getCode()); @@ -72,25 +78,19 @@ public class AsyncAttendance { public void syncAttendanceWorker(Integer type, WorkerInfo workerInfo) { try { // 查询人员项目/工程对应的设备厂商信息 - List productList = attendanceDevMapper.getProductList(workerInfo, "ignoreDataScope"); + List productIdList = attendanceDevMapper.getProductList(workerInfo, "ignoreDataScope"); List attendanceDevList = attendanceDevMapper.getList(workerInfo, "ignoreDataScope"); - for (String product : productList) { - SystemDictData data = systemDictDataService.getOne(Wrappers.lambdaQuery() - .eq(SystemDictData::getDictLabel, type).eq(SystemDictData::getDictType, product)); - if (data == null) { + for (Integer productId : productIdList) { + String requestUrl = buildRequestUrl(type, productId); + if (requestUrl == null) { continue; } - String requestUrl = data.getRemark(); JSONObject jsonObject = JSONObject.parseObject(JSON.toJSONString(workerInfo)); jsonObject.put("attendDevList", JSONArray.parseArray(JSON.toJSONString( - attendanceDevList.stream().filter(a -> a.getProduceName().equals(product)).collect(Collectors.toList())))); + attendanceDevList.stream().filter(a -> a.getProduceId().equals(productId)).collect(Collectors.toList())))); // 推送同步信息 String result = HttpUtil.doPost(requestUrl, jsonObject.toString()); - int state = 1; - if (result == null) { - //请求未成功,记录状态 - state = 0; - } + int state = StringUtils.isBlank(result) ? 0 : 1; // 记录推送信息 AttendanceDevSync attendanceDevSync = new AttendanceDevSync(); attendanceDevSync.setMainId(workerInfo.getId().toString()); @@ -106,4 +106,22 @@ public class AsyncAttendance { log.error("推送考勤人员数据出现异常"); } } + + /** + * + * @param type 请求类型 + * @param productId 厂商ID + * @return + */ + private String buildRequestUrl(Integer type, Integer productId) { + SystemDictData prefix = systemDictDataService.getOne(Wrappers.lambdaQuery() + .eq(SystemDictData::getDictLabel, productId).eq(SystemDictData::getDictType, ParamEnum.SysDictType.ATTEND_DEV_PRODUCE.getValue())); + SystemDictData suffix = systemDictDataService.getOne(Wrappers.lambdaQuery() + .eq(SystemDictData::getDictLabel, type).eq(SystemDictData::getDictType, ParamEnum.SysDictType.ATTEND_SYNC_API.getValue())); + if (prefix == null || suffix == null || prefix.getStatus() != 1 || suffix.getStatus() != 1) { + return null; + } else { + return prefix.getRemark() + suffix.getRemark(); + } + } } diff --git a/src/main/java/com/zhgd/xmgl/config/FaceRunner.java b/src/main/java/com/zhgd/xmgl/config/FaceRunner.java index 72f3315..c09e0a5 100644 --- a/src/main/java/com/zhgd/xmgl/config/FaceRunner.java +++ b/src/main/java/com/zhgd/xmgl/config/FaceRunner.java @@ -41,20 +41,20 @@ public class FaceRunner implements CommandLineRunner { String os = System.getProperty("os.name"); log.info("服务器系统" + os); //如果是Windows系统 - if (os.toLowerCase().startsWith("win") || os.toLowerCase().startsWith("linux")) { - String sdkKey = ""; - if (os.toLowerCase().startsWith("linux")) { - sdkKey = linuxSdkKey; - } else { - sdkKey = winsSdkKey; - } - //log.info(HCNetSDKPath.DLL_PATH+"dll"); - log.info(dllPath); - faceEngine = new FaceEngine(dllPath); - //激活引擎 - int errorCode = faceEngine.activeOnline(appId, sdkKey); + if (os.toLowerCase().startsWith("win") || os.toLowerCase().startsWith("linux")) { + String sdkKey = ""; + if (os.toLowerCase().startsWith("linux")) { + sdkKey = linuxSdkKey; + } else { + sdkKey = winsSdkKey; + } + //log.info(HCNetSDKPath.DLL_PATH+"dll"); + log.info(dllPath); + faceEngine = new FaceEngine(dllPath); + //激活引擎 + int errorCode = faceEngine.activeOnline(appId, sdkKey); - if (errorCode != ErrorInfo.MOK.getValue() && errorCode != ErrorInfo.MERR_ASF_ALREADY_ACTIVATED.getValue()) { + if (errorCode != ErrorInfo.MOK.getValue() && errorCode != ErrorInfo.MERR_ASF_ALREADY_ACTIVATED.getValue()) { log.info("引擎激活失败,errorCode:" + errorCode); } diff --git a/src/main/java/com/zhgd/xmgl/modules/basicdata/controller/admin/BaseMenuController.java b/src/main/java/com/zhgd/xmgl/modules/basicdata/controller/admin/BaseMenuController.java index ddf1f8f..086efbd 100644 --- a/src/main/java/com/zhgd/xmgl/modules/basicdata/controller/admin/BaseMenuController.java +++ b/src/main/java/com/zhgd/xmgl/modules/basicdata/controller/admin/BaseMenuController.java @@ -201,4 +201,16 @@ public class BaseMenuController { public Result> queryByRole(@RequestBody Map map) { return Result.success(baseMenuService.roleMenu(MapUtils.getString(map,"roleId"))); } + + + /** + * 用户查询自身路由列表 + * @return + */ + @OperLog(operModul = "系统菜单管理", operType = "查询", operDesc = "用户查询自身路由列表") + @ApiOperation(value = "用户查询自身路由列表", notes = "用户查询自身路由列表" , httpMethod="GET") + @GetMapping(value = "/queryRouter") + public Result> queryRouter() { + return Result.success(baseMenuService.queryRouter()); + } } diff --git a/src/main/java/com/zhgd/xmgl/modules/basicdata/controller/admin/BaseModuleController.java b/src/main/java/com/zhgd/xmgl/modules/basicdata/controller/admin/BaseModuleController.java index 5f76c4a..bf172f3 100644 --- a/src/main/java/com/zhgd/xmgl/modules/basicdata/controller/admin/BaseModuleController.java +++ b/src/main/java/com/zhgd/xmgl/modules/basicdata/controller/admin/BaseModuleController.java @@ -11,7 +11,6 @@ import com.zhgd.xmgl.modules.basicdata.entity.BaseModule; import com.zhgd.xmgl.modules.basicdata.entity.ModuleTemplate; import com.zhgd.xmgl.modules.basicdata.service.IBaseModuleService; import com.zhgd.xmgl.modules.basicdata.service.IModuleTemplateService; -import com.zhgd.xmgl.util.ParamEnum; import io.swagger.annotations.Api; import io.swagger.annotations.ApiImplicitParam; import io.swagger.annotations.ApiImplicitParams; @@ -200,11 +199,16 @@ public class BaseModuleController { @GetMapping(value = "/queryBySelf") public Result>> queryBySelf() { List list = baseModuleService.queryBySelf(); + if (list == null || list.size() == 0) { + return null; + } Map> map = new HashMap<>(); - map.put("important", list.stream().filter(m -> m.getIsImportantModule().equals("1")).collect(Collectors.toList())); - map.put("module1", list.stream().filter(m -> m.getLabelName().equals(ParamEnum.ModuleLabel.SAFE.getDesc())).collect(Collectors.toList())); - map.put("module2", list.stream().filter(m -> m.getLabelName().equals(ParamEnum.ModuleLabel.QUALITY.getDesc())).collect(Collectors.toList())); - map.put("module3", list.stream().filter(m -> m.getLabelName().equals(ParamEnum.ModuleLabel.WISDOM.getDesc())).collect(Collectors.toList())); + map.put("important", list.stream().filter(m -> m.getIsImportantModule().equals(1)).collect(Collectors.toList())); + List titles = baseModuleService.getTitles(); + for (String title : titles) { + map.put(title, list.stream().filter(m -> m.getLabelName().equals(title) + && m.getIsImportantModule() == 0).collect(Collectors.toList())); + } return Result.success(map); } @@ -228,4 +232,15 @@ public class BaseModuleController { result.setResult(moduleIds); return result; } + + /** + * 通过登录用户查询 + * @return + */ + @OperLog(operModul = "系统模块管理", operType = "查询", operDesc = "获取所有模块标签") + @ApiOperation(value = "获取所有模块标签", notes = "获取所有模块标签" , httpMethod="GET") + @GetMapping(value = "/queryTitle") + public Result> queryTitle() { + return Result.success(baseModuleService.getTitles()); + } } diff --git a/src/main/java/com/zhgd/xmgl/modules/basicdata/controller/admin/GovernmentController.java b/src/main/java/com/zhgd/xmgl/modules/basicdata/controller/admin/GovernmentController.java index 373d328..dae0f04 100644 --- a/src/main/java/com/zhgd/xmgl/modules/basicdata/controller/admin/GovernmentController.java +++ b/src/main/java/com/zhgd/xmgl/modules/basicdata/controller/admin/GovernmentController.java @@ -64,6 +64,7 @@ public class GovernmentController { Result> result = new Result>(); QueryWrapper queryWrapper = QueryGenerator.initPageQueryWrapper(Government.class, map); Page page = PageUtil.getPage(map); + queryWrapper.orderByDesc("create_time"); IPage pageList = governmentService.selectPage(page, queryWrapper); result.setSuccess(true); result.setResult(pageList); diff --git a/src/main/java/com/zhgd/xmgl/modules/basicdata/controller/admin/HardWareCallbackController.java b/src/main/java/com/zhgd/xmgl/modules/basicdata/controller/admin/HardWareCallbackController.java index a15324b..59fcb36 100644 --- a/src/main/java/com/zhgd/xmgl/modules/basicdata/controller/admin/HardWareCallbackController.java +++ b/src/main/java/com/zhgd/xmgl/modules/basicdata/controller/admin/HardWareCallbackController.java @@ -136,7 +136,7 @@ public class HardWareCallbackController { public Result addEnvironmentAlarm(@RequestBody AiMonitorAlarm aiMonitorAlarm) { // 查询字典类型确认报警类型 List systemDictDataList = iSystemDictDataService.getByType(ParamEnum.SysDictType.AI_ALARM_TYPE.getValue()); - List dictData = systemDictDataList.stream().filter(d -> d.getDictLabel().equals(aiMonitorAlarm.getType().toString())).collect(Collectors.toList()); + List dictData = systemDictDataList.stream().filter(d -> d.getDictLabel().equals(aiMonitorAlarm.getType())).collect(Collectors.toList()); if (dictData.size() == 0) { return Result.error("报警类型错误!"); } diff --git a/src/main/java/com/zhgd/xmgl/modules/basicdata/controller/admin/SystemConfigController.java b/src/main/java/com/zhgd/xmgl/modules/basicdata/controller/admin/SystemConfigController.java index d1da6c4..a5ac0a8 100644 --- a/src/main/java/com/zhgd/xmgl/modules/basicdata/controller/admin/SystemConfigController.java +++ b/src/main/java/com/zhgd/xmgl/modules/basicdata/controller/admin/SystemConfigController.java @@ -53,13 +53,11 @@ public class SystemConfigController { }) @PostMapping(value = "/page") public Result> queryPageList(@RequestBody Map map) { - Result> result = new Result>(); QueryWrapper queryWrapper = QueryGenerator.initPageQueryWrapper(SystemConfig.class, map); Page page = PageUtil.getPage(map); + queryWrapper.orderByDesc("config_id"); IPage pageList = systemConfigService.page(page, queryWrapper); - result.setSuccess(true); - result.setResult(pageList); - return result; + return Result.success(pageList); } /** diff --git a/src/main/java/com/zhgd/xmgl/modules/basicdata/controller/admin/SystemDictDataController.java b/src/main/java/com/zhgd/xmgl/modules/basicdata/controller/admin/SystemDictDataController.java index bf29765..d124042 100644 --- a/src/main/java/com/zhgd/xmgl/modules/basicdata/controller/admin/SystemDictDataController.java +++ b/src/main/java/com/zhgd/xmgl/modules/basicdata/controller/admin/SystemDictDataController.java @@ -149,7 +149,6 @@ public class SystemDictDataController { result.success("删除成功!"); } } - return result; } diff --git a/src/main/java/com/zhgd/xmgl/modules/basicdata/controller/government/GovEngineeringController.java b/src/main/java/com/zhgd/xmgl/modules/basicdata/controller/government/GovEngineeringController.java index c6c72c5..42d808e 100644 --- a/src/main/java/com/zhgd/xmgl/modules/basicdata/controller/government/GovEngineeringController.java +++ b/src/main/java/com/zhgd/xmgl/modules/basicdata/controller/government/GovEngineeringController.java @@ -51,9 +51,9 @@ public class GovEngineeringController { @ApiImplicitParams({ @ApiImplicitParam(name = "engineeringCode", value = "工程编码", paramType = "query", dataType = "String"), @ApiImplicitParam(name = "engineeringName", value = "工程名称", paramType = "query", dataType = "String"), - @ApiImplicitParam(name = "engineeringType", value = "工程类别", paramType = "query", dataType = "String"), - @ApiImplicitParam(name = "state", value = "工程状态(1:未开工;)", paramType = "query", dataType = "String"), - @ApiImplicitParam(name = "examineState", value = "1:待审批;2:审批驳回;3:审批通过;", paramType = "query", dataType = "String"), + @ApiImplicitParam(name = "engineeringType", value = "工程类别", paramType = "query", dataType = "Integer"), + @ApiImplicitParam(name = "state", value = "工程状态(1:未开工;)", paramType = "query", dataType = "Integer"), + @ApiImplicitParam(name = "examineState", value = "1:待审批;2:审批驳回;3:审批通过;", paramType = "query", dataType = "Integer"), @ApiImplicitParam(name = "startTime", value = "开始时间", paramType = "query", dataType = "String"), @ApiImplicitParam(name = "endTime", value = "结束时间", paramType = "query", dataType = "String"), @ApiImplicitParam(name = "pageNo", value = "页数", paramType = "query", required = true, defaultValue = "1", dataType = "Integer"), @@ -61,13 +61,10 @@ public class GovEngineeringController { }) @PostMapping(value = "/page") public Result> queryPageList(@RequestBody Map map) { - Result> result = new Result>(); QueryWrapper wrapper = QueryGenerator.initPageQueryWrapper(Engineering.class, map); Page page = PageUtil.getPage(map); IPage pageList = engineeringService.getPageList(page, wrapper); - result.setSuccess(true); - result.setResult(pageList); - return result; + return Result.success(pageList); } /** diff --git a/src/main/java/com/zhgd/xmgl/modules/basicdata/controller/government/GovEnterpriseController.java b/src/main/java/com/zhgd/xmgl/modules/basicdata/controller/government/GovEnterpriseController.java index 03996fd..bf5948c 100644 --- a/src/main/java/com/zhgd/xmgl/modules/basicdata/controller/government/GovEnterpriseController.java +++ b/src/main/java/com/zhgd/xmgl/modules/basicdata/controller/government/GovEnterpriseController.java @@ -51,6 +51,7 @@ public class GovEnterpriseController { @ApiImplicitParams({ @ApiImplicitParam(name = "creditCode", value = "社会信用代码", paramType = "query", dataType = "String"), @ApiImplicitParam(name = "enterpriseName", value = "企业名称", paramType = "query", dataType = "String"), + @ApiImplicitParam(name = "mainType", value = "企业主体类型", paramType = "query", dataType = "Integer"), @ApiImplicitParam(name = "pageNo", value = "页数", paramType = "query", required = true, defaultValue = "1", dataType = "Integer"), @ApiImplicitParam(name = "pageSize", value = "每页条数", paramType = "query", required = true, defaultValue = "10", dataType = "Integer") }) diff --git a/src/main/java/com/zhgd/xmgl/modules/basicdata/controller/project/EngineeringController.java b/src/main/java/com/zhgd/xmgl/modules/basicdata/controller/project/EngineeringController.java index 6b41840..0291168 100644 --- a/src/main/java/com/zhgd/xmgl/modules/basicdata/controller/project/EngineeringController.java +++ b/src/main/java/com/zhgd/xmgl/modules/basicdata/controller/project/EngineeringController.java @@ -49,13 +49,10 @@ public class EngineeringController { }) @PostMapping(value = "/page") public Result> queryPageList(@RequestBody Map map) { - Result> result = new Result>(); LambdaQueryWrapper wrapper = Wrappers.lambdaQuery(); Page page = PageUtil.getPage(map); IPage pageList = engineeringService.getPageList(page, wrapper); - result.setSuccess(true); - result.setResult(pageList); - return result; + return Result.success(pageList); } /** diff --git a/src/main/java/com/zhgd/xmgl/modules/basicdata/dto/MenuTreeDto.java b/src/main/java/com/zhgd/xmgl/modules/basicdata/dto/MenuTreeDto.java index 7db8b3c..4e4b5f6 100644 --- a/src/main/java/com/zhgd/xmgl/modules/basicdata/dto/MenuTreeDto.java +++ b/src/main/java/com/zhgd/xmgl/modules/basicdata/dto/MenuTreeDto.java @@ -13,11 +13,11 @@ import java.util.List; @ApiModel(value = "树形菜单信息(DTO)", description = "MenuTreeDto") public class MenuTreeDto extends TreeDto{ - @ApiModelProperty(value = "菜单图标") - private String normalIcon; + @ApiModelProperty(value = "页面路径") + private String component; - @ApiModelProperty(value = "菜单选中时图标") - private String checkIcon; + @ApiModelProperty(value = "菜单路由") + private String path; @ApiModelProperty(value = "菜单类型,0:模块 1:菜单;2:按钮") private Integer type; @@ -28,6 +28,9 @@ public class MenuTreeDto extends TreeDto{ @ApiModelProperty(value = "父级ID") private Long parentId; + @ApiModelProperty(value = "详细信息") + private Meta meta; + @ApiModelProperty(value = "子级菜单信息") private List children; diff --git a/src/main/java/com/zhgd/xmgl/modules/basicdata/dto/Meta.java b/src/main/java/com/zhgd/xmgl/modules/basicdata/dto/Meta.java new file mode 100644 index 0000000..3a762de --- /dev/null +++ b/src/main/java/com/zhgd/xmgl/modules/basicdata/dto/Meta.java @@ -0,0 +1,35 @@ +package com.zhgd.xmgl.modules.basicdata.dto; + +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +/** + * @author pengj + * @date 2023/3/22 17:18 + */ +@Data +public class Meta { + + @ApiModelProperty(value = "菜单选中状态") + private Boolean state = false; + + @ApiModelProperty(value = "菜单图标") + private String icon; + + @ApiModelProperty(value = "菜单选中时图标") + private String checkIcon; + + @ApiModelProperty(value = "菜单名称") + private String title; + + private String isLink = ""; + + private Boolean isHide = false; + + private Boolean isFull = false; + + private Boolean isAffix = true; + + private Boolean isKeepAlive = true; + +} diff --git a/src/main/java/com/zhgd/xmgl/modules/basicdata/dto/MonitorTreeDto.java b/src/main/java/com/zhgd/xmgl/modules/basicdata/dto/MonitorTreeDto.java index a7bca50..5906738 100644 --- a/src/main/java/com/zhgd/xmgl/modules/basicdata/dto/MonitorTreeDto.java +++ b/src/main/java/com/zhgd/xmgl/modules/basicdata/dto/MonitorTreeDto.java @@ -18,4 +18,7 @@ public class MonitorTreeDto extends TreeDto{ @ApiModelProperty(value = "父级ID") private String parentId; + + @ApiModelProperty(value = "详细信息") + private Meta meta; } diff --git a/src/main/java/com/zhgd/xmgl/modules/basicdata/dto/TreeDto.java b/src/main/java/com/zhgd/xmgl/modules/basicdata/dto/TreeDto.java index 7b48008..5486e02 100644 --- a/src/main/java/com/zhgd/xmgl/modules/basicdata/dto/TreeDto.java +++ b/src/main/java/com/zhgd/xmgl/modules/basicdata/dto/TreeDto.java @@ -8,9 +8,6 @@ import lombok.Data; @ApiModel(value = "树形通用数据信息(DTO)", description = "TreeDto") public class TreeDto { - @ApiModelProperty(value = "id") - private Long id; - - @ApiModelProperty(value = "名称") - private String name; + @ApiModelProperty(value = "主键") + private Long name; } diff --git a/src/main/java/com/zhgd/xmgl/modules/basicdata/entity/AttendanceDev.java b/src/main/java/com/zhgd/xmgl/modules/basicdata/entity/AttendanceDev.java index 811950e..05a06ef 100644 --- a/src/main/java/com/zhgd/xmgl/modules/basicdata/entity/AttendanceDev.java +++ b/src/main/java/com/zhgd/xmgl/modules/basicdata/entity/AttendanceDev.java @@ -72,9 +72,9 @@ public class AttendanceDev implements Serializable { private String projectSn; /** - * 厂商名称 + * 厂商ID */ - @Excel(name = "厂商名称", width = 15) - @ApiModelProperty(value = "厂商名称") - private String produceName; + @Excel(name = "厂商ID", width = 15) + @ApiModelProperty(value = "厂商ID") + private Integer produceId; } diff --git a/src/main/java/com/zhgd/xmgl/modules/basicdata/entity/BaseMenu.java b/src/main/java/com/zhgd/xmgl/modules/basicdata/entity/BaseMenu.java index ee3b27e..85a4f43 100644 --- a/src/main/java/com/zhgd/xmgl/modules/basicdata/entity/BaseMenu.java +++ b/src/main/java/com/zhgd/xmgl/modules/basicdata/entity/BaseMenu.java @@ -71,10 +71,10 @@ public class BaseMenu implements Serializable { private String appPath; /** - * 菜单标题 + * 菜单图标 */ - @Excel(name = "菜单标题", width = 15) - @ApiModelProperty(value = "菜单标题") + @Excel(name = "菜单图标", width = 15) + @ApiModelProperty(value = "菜单图标") private String icon; @ApiModelProperty(value = "打开方式:0:_self窗口内,1:_blank新窗口") diff --git a/src/main/java/com/zhgd/xmgl/modules/basicdata/entity/BaseModule.java b/src/main/java/com/zhgd/xmgl/modules/basicdata/entity/BaseModule.java index 9d2b0a0..0cfb15e 100644 --- a/src/main/java/com/zhgd/xmgl/modules/basicdata/entity/BaseModule.java +++ b/src/main/java/com/zhgd/xmgl/modules/basicdata/entity/BaseModule.java @@ -120,7 +120,7 @@ public class BaseModule implements Serializable { */ @Excel(name = "是否是重要模块(重要模块展示在最前端)", width = 15) @ApiModelProperty(value = "是否是重要模块(重要模块展示在最前端)") - private java.lang.String isImportantModule; + private java.lang.Integer isImportantModule; /** * 风格名称 :1:标准版; 2:星璇版本; 3:衢州版本 */ diff --git a/src/main/java/com/zhgd/xmgl/modules/basicdata/entity/Enterprise.java b/src/main/java/com/zhgd/xmgl/modules/basicdata/entity/Enterprise.java index 82c152c..fd1a438 100644 --- a/src/main/java/com/zhgd/xmgl/modules/basicdata/entity/Enterprise.java +++ b/src/main/java/com/zhgd/xmgl/modules/basicdata/entity/Enterprise.java @@ -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; @@ -135,4 +136,11 @@ public class Enterprise implements Serializable { */ @ApiModelProperty(value = "所属国企名称") private String authorityEnterprise; + + /** + * 企业类型 + */ + @TableField(exist = false) + @ApiModelProperty(value = "企业类型") + private String mainTypeName; } diff --git a/src/main/java/com/zhgd/xmgl/modules/basicdata/entity/EnterpriseMain.java b/src/main/java/com/zhgd/xmgl/modules/basicdata/entity/EnterpriseMain.java index 16d6f7d..2acbf16 100644 --- a/src/main/java/com/zhgd/xmgl/modules/basicdata/entity/EnterpriseMain.java +++ b/src/main/java/com/zhgd/xmgl/modules/basicdata/entity/EnterpriseMain.java @@ -48,6 +48,14 @@ public class EnterpriseMain implements Serializable { @Excel(name = "企业主体类型(1:建设;2:监理;3:施工;4:勘察;5:设计;)", width = 15) @ApiModelProperty(value = "企业主体类型(1:建设;2:监理;3:施工;4:勘察;5:设计;)") private Integer mainType; + + /** + * 企业主体类型名称 + */ + @TableField(exist = false) + @ApiModelProperty(value = "企业主体类型名称") + private String mainTypeName; + /** * 企业sn */ diff --git a/src/main/java/com/zhgd/xmgl/modules/basicdata/mapper/AttendanceDevMapper.java b/src/main/java/com/zhgd/xmgl/modules/basicdata/mapper/AttendanceDevMapper.java index 9a13ea5..1ac6655 100644 --- a/src/main/java/com/zhgd/xmgl/modules/basicdata/mapper/AttendanceDevMapper.java +++ b/src/main/java/com/zhgd/xmgl/modules/basicdata/mapper/AttendanceDevMapper.java @@ -18,7 +18,7 @@ import java.util.List; @DataScope public interface AttendanceDevMapper extends BaseMapper { - List getProductList(WorkerInfo workerInfo, String ignore); + List getProductList(WorkerInfo workerInfo, String ignore); List getList(WorkerInfo workerInfo, String ignore); } diff --git a/src/main/java/com/zhgd/xmgl/modules/basicdata/mapper/BaseModuleMapper.java b/src/main/java/com/zhgd/xmgl/modules/basicdata/mapper/BaseModuleMapper.java index 6366572..0994492 100644 --- a/src/main/java/com/zhgd/xmgl/modules/basicdata/mapper/BaseModuleMapper.java +++ b/src/main/java/com/zhgd/xmgl/modules/basicdata/mapper/BaseModuleMapper.java @@ -1,11 +1,10 @@ package com.zhgd.xmgl.modules.basicdata.mapper; -import java.util.List; - +import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.zhgd.xmgl.modules.basicdata.entity.BaseModule; import org.apache.ibatis.annotations.Mapper; -import org.apache.ibatis.annotations.Param; -import com.baomidou.mybatisplus.core.mapper.BaseMapper; + +import java.util.List; /** * @Description: 系统资源-模块表 @@ -16,4 +15,5 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper; @Mapper public interface BaseModuleMapper extends BaseMapper { + List getTitles(); } diff --git a/src/main/java/com/zhgd/xmgl/modules/basicdata/mapper/EnterpriseMainMapper.java b/src/main/java/com/zhgd/xmgl/modules/basicdata/mapper/EnterpriseMainMapper.java index 9e19a2d..c812b3f 100644 --- a/src/main/java/com/zhgd/xmgl/modules/basicdata/mapper/EnterpriseMainMapper.java +++ b/src/main/java/com/zhgd/xmgl/modules/basicdata/mapper/EnterpriseMainMapper.java @@ -4,6 +4,8 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.zhgd.xmgl.modules.basicdata.entity.EnterpriseMain; import org.apache.ibatis.annotations.Mapper; +import java.util.List; + /** * @Description: 企业主体 * @author: pds @@ -13,4 +15,5 @@ import org.apache.ibatis.annotations.Mapper; @Mapper public interface EnterpriseMainMapper extends BaseMapper { + List getList(String dictType, String enterpriseSn); } diff --git a/src/main/java/com/zhgd/xmgl/modules/basicdata/mapper/EnterpriseMapper.java b/src/main/java/com/zhgd/xmgl/modules/basicdata/mapper/EnterpriseMapper.java index 63ebaef..77d7f45 100644 --- a/src/main/java/com/zhgd/xmgl/modules/basicdata/mapper/EnterpriseMapper.java +++ b/src/main/java/com/zhgd/xmgl/modules/basicdata/mapper/EnterpriseMapper.java @@ -1,6 +1,9 @@ package com.zhgd.xmgl.modules.basicdata.mapper; +import com.baomidou.mybatisplus.core.conditions.Wrapper; import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.baomidou.mybatisplus.core.toolkit.Constants; +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.zhgd.xmgl.modules.basicdata.entity.Enterprise; import com.zhgd.xmgl.modules.basicdata.vo.EnterpriseVo; import org.apache.ibatis.annotations.Mapper; @@ -17,6 +20,8 @@ import java.util.List; @Mapper public interface EnterpriseMapper extends BaseMapper { + Page pageList(Page page, @Param(Constants.WRAPPER) Wrapper wrapper); + EnterpriseVo getDetailById(@Param("enterpriseId") Long enterpriseId); List listByMainType(@Param("mainType") Integer mainType, @Param("governmentSn") String governmentSn); diff --git a/src/main/java/com/zhgd/xmgl/modules/basicdata/mapper/xml/AttendanceDevMapper.xml b/src/main/java/com/zhgd/xmgl/modules/basicdata/mapper/xml/AttendanceDevMapper.xml index a809ed9..62ce082 100644 --- a/src/main/java/com/zhgd/xmgl/modules/basicdata/mapper/xml/AttendanceDevMapper.xml +++ b/src/main/java/com/zhgd/xmgl/modules/basicdata/mapper/xml/AttendanceDevMapper.xml @@ -1,8 +1,8 @@ - + SELECT produce_id FROM attendance_dev WHERE project_sn = #{workerInfo.projectSn} AND engineering_sn = #{workerInfo.engineeringSn} GROUP BY produce_id + SELECT label_name FROM base_module where is_important_module = 0 group by label_name order by label_sort_num + \ No newline at end of file diff --git a/src/main/java/com/zhgd/xmgl/modules/basicdata/mapper/xml/EnterpriseMainMapper.xml b/src/main/java/com/zhgd/xmgl/modules/basicdata/mapper/xml/EnterpriseMainMapper.xml index beb11e6..7c83569 100644 --- a/src/main/java/com/zhgd/xmgl/modules/basicdata/mapper/xml/EnterpriseMainMapper.xml +++ b/src/main/java/com/zhgd/xmgl/modules/basicdata/mapper/xml/EnterpriseMainMapper.xml @@ -2,4 +2,10 @@ + \ No newline at end of file diff --git a/src/main/java/com/zhgd/xmgl/modules/basicdata/mapper/xml/EnterpriseMapper.xml b/src/main/java/com/zhgd/xmgl/modules/basicdata/mapper/xml/EnterpriseMapper.xml index 32aa4e3..d871b1e 100644 --- a/src/main/java/com/zhgd/xmgl/modules/basicdata/mapper/xml/EnterpriseMapper.xml +++ b/src/main/java/com/zhgd/xmgl/modules/basicdata/mapper/xml/EnterpriseMapper.xml @@ -3,8 +3,8 @@ @@ -12,4 +12,12 @@ SELECT c.* FROM enterprise c INNER JOIN enterprise_main m ON c.enterprise_sn = m.enterprise_sn WHERE c.government_sn = #{governmentSn} AND m.main_type = #{mainType} + + \ No newline at end of file diff --git a/src/main/java/com/zhgd/xmgl/modules/basicdata/mapper/xml/ProjectMapper.xml b/src/main/java/com/zhgd/xmgl/modules/basicdata/mapper/xml/ProjectMapper.xml index c9f243e..4f8f9df 100644 --- a/src/main/java/com/zhgd/xmgl/modules/basicdata/mapper/xml/ProjectMapper.xml +++ b/src/main/java/com/zhgd/xmgl/modules/basicdata/mapper/xml/ProjectMapper.xml @@ -3,7 +3,7 @@