diff --git a/src/main/java/com/zhgd/xmgl/modules/cost/controller/CostBudgetController.java b/src/main/java/com/zhgd/xmgl/modules/cost/controller/CostBudgetController.java index 5d1ab0a36..3daf34826 100644 --- a/src/main/java/com/zhgd/xmgl/modules/cost/controller/CostBudgetController.java +++ b/src/main/java/com/zhgd/xmgl/modules/cost/controller/CostBudgetController.java @@ -11,6 +11,7 @@ import com.zhgd.xmgl.modules.basicdata.entity.Company; import com.zhgd.xmgl.modules.basicdata.service.ICompanyService; import com.zhgd.xmgl.modules.cost.dto.CostBudgetDto; import com.zhgd.xmgl.modules.cost.dto.CostBulletinDto; +import com.zhgd.xmgl.modules.cost.dto.CostDynamicDto; import com.zhgd.xmgl.modules.cost.entity.CostSubject; import com.zhgd.xmgl.modules.cost.service.ICostSubjectService; import com.zhgd.xmgl.modules.exam.entity.ExamQuestionBank; @@ -496,4 +497,16 @@ public class CostBudgetController { public Result> costBulletin(@RequestBody Map map) { return Result.success(costSubjectService.getCostBulletin(map)); } + + /** + * 动态成本 + * @return + */ + @OperLog(operModul = "成本科目预算管理", operType = "列表查询", operDesc = "动态成本信息") + @ApiOperation(value = " 动态成本信息", notes = "动态成本信息", httpMethod = "POST") + @ApiImplicitParam(name = "projectSn", value = "项目SN", paramType = "body", dataType = "String") + @PostMapping(value = "costDynamic") + public Result> costDynamic(@RequestBody Map map) { + return Result.success(costSubjectService.getCostDynamicDto(map)); + } } diff --git a/src/main/java/com/zhgd/xmgl/modules/cost/controller/IndexController.java b/src/main/java/com/zhgd/xmgl/modules/cost/controller/IndexController.java index 8cd24304b..4b0b86966 100644 --- a/src/main/java/com/zhgd/xmgl/modules/cost/controller/IndexController.java +++ b/src/main/java/com/zhgd/xmgl/modules/cost/controller/IndexController.java @@ -78,7 +78,8 @@ public class IndexController { // 查询项目数 int projectSize = projectService.count(Wrappers.lambdaQuery().eq(Project::getNature, 1)); // 查询合同总金额 - BigDecimal contractAmount = costContractService.list().stream().map(c -> c.getHthszj()).reduce(BigDecimal.ZERO, BigDecimal::add); + BigDecimal contractAmount = costContractService.list(Wrappers.lambdaQuery() + .eq(CostContract::getXszt, "生效合同")).stream().map(c -> c.getHthszj()).reduce(BigDecimal.ZERO, BigDecimal::add); // 总投资金额(支付金额) BigDecimal payAmount = new BigDecimal(0); // 总成本预算 diff --git a/src/main/java/com/zhgd/xmgl/modules/cost/dto/CostDynamicDto.java b/src/main/java/com/zhgd/xmgl/modules/cost/dto/CostDynamicDto.java new file mode 100644 index 000000000..4a6cc4c60 --- /dev/null +++ b/src/main/java/com/zhgd/xmgl/modules/cost/dto/CostDynamicDto.java @@ -0,0 +1,34 @@ +package com.zhgd.xmgl.modules.cost.dto; + +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +@Data +@ApiModel(value = "成本简报信息(DTO)", description = "CostBulletinDto") +public class CostDynamicDto { + + @ApiModelProperty(value = "项目名称") + private String projectName; + + @ApiModelProperty(value = "项目SN") + private String projectNSn; + + @ApiModelProperty(value = "竣工日期") + private String completeWorkDate; + + @ApiModelProperty(value = "项目面积") + private String projectAcreage; + + @ApiModelProperty(value = "可售面积") + private String saleAcreage; + + @ApiModelProperty(value = "总价") + private String totalCost; + + @ApiModelProperty(value = "建筑单方造价") + private String projectCostAvg; + + @ApiModelProperty(value = "可售单方造价") + private String saleCostAvg; +} diff --git a/src/main/java/com/zhgd/xmgl/modules/cost/service/ICostSubjectService.java b/src/main/java/com/zhgd/xmgl/modules/cost/service/ICostSubjectService.java index 4434c5d25..c26cd7fc1 100644 --- a/src/main/java/com/zhgd/xmgl/modules/cost/service/ICostSubjectService.java +++ b/src/main/java/com/zhgd/xmgl/modules/cost/service/ICostSubjectService.java @@ -4,6 +4,7 @@ import com.baomidou.mybatisplus.core.conditions.Wrapper; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.zhgd.xmgl.modules.cost.dto.CostBulletinDto; +import com.zhgd.xmgl.modules.cost.dto.CostDynamicDto; import com.zhgd.xmgl.modules.cost.entity.CostSubject; import com.baomidou.mybatisplus.extension.service.IService; @@ -27,4 +28,6 @@ public interface ICostSubjectService extends IService { boolean delInfo(CostSubject costSubject); List getCostBulletin(Map map); + + List getCostDynamicDto(Map map); } diff --git a/src/main/java/com/zhgd/xmgl/modules/cost/service/impl/CostSubjectServiceImpl.java b/src/main/java/com/zhgd/xmgl/modules/cost/service/impl/CostSubjectServiceImpl.java index 49b540a27..a0256db92 100644 --- a/src/main/java/com/zhgd/xmgl/modules/cost/service/impl/CostSubjectServiceImpl.java +++ b/src/main/java/com/zhgd/xmgl/modules/cost/service/impl/CostSubjectServiceImpl.java @@ -9,6 +9,7 @@ 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.xmgl.modules.cost.dto.CostBulletinDto; +import com.zhgd.xmgl.modules.cost.dto.CostDynamicDto; import com.zhgd.xmgl.modules.cost.entity.CostContract; import com.zhgd.xmgl.modules.cost.entity.CostSubject; import com.zhgd.xmgl.modules.cost.mapper.CostSubjectMapper; @@ -119,6 +120,11 @@ public class CostSubjectServiceImpl extends ServiceImpl getCostDynamicDto(Map map) { + return null; + } + private void getChildren(List list, List allList) { for (CostSubject costSubject : list) { List childrenList = allList.stream().filter(a -> a.getParentId().toString().equals(costSubject.getId().toString())).collect(Collectors.toList()); diff --git a/src/main/java/com/zhgd/xmgl/modules/safetybelt/controller/SafetyBeltAlarmController.java b/src/main/java/com/zhgd/xmgl/modules/safetybelt/controller/SafetyBeltAlarmController.java new file mode 100644 index 000000000..9ffcbdc71 --- /dev/null +++ b/src/main/java/com/zhgd/xmgl/modules/safetybelt/controller/SafetyBeltAlarmController.java @@ -0,0 +1,182 @@ +package com.zhgd.xmgl.modules.safetybelt.controller; + +import com.zhgd.annotation.OperLog; +import com.zhgd.xmgl.util.PageUtil; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiImplicitParam; +import io.swagger.annotations.ApiImplicitParams; +import io.swagger.annotations.ApiOperation; + +import java.util.Arrays; +import java.util.List; +import java.util.Map; +import java.io.IOException; +import java.io.UnsupportedEncodingException; +import java.net.URLDecoder; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; + +import com.zhgd.jeecg.common.api.vo.Result; +import com.zhgd.jeecg.common.system.query.QueryGenerator; +import com.zhgd.jeecg.common.util.oConvertUtils; +import com.zhgd.xmgl.modules.safetybelt.entity.SafetyBeltAlarm; +import com.zhgd.xmgl.modules.safetybelt.service.ISafetyBeltAlarmService; + +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import lombok.extern.slf4j.Slf4j; + +import org.apache.commons.collections.MapUtils; +import org.jeecgframework.poi.excel.ExcelImportUtil; +import org.jeecgframework.poi.excel.def.NormalExcelConstants; +import org.jeecgframework.poi.excel.entity.ExportParams; +import org.jeecgframework.poi.excel.entity.ImportParams; +import org.jeecgframework.poi.excel.view.JeecgEntityExcelView; + +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.*; +import org.springframework.web.multipart.MultipartFile; +import org.springframework.web.multipart.MultipartHttpServletRequest; +import org.springframework.web.servlet.ModelAndView; +import com.alibaba.fastjson.JSON; +import springfox.documentation.annotations.ApiIgnore; + + +/** + * @Title: Controller + * @Description: 安全带监测预警 + * @author: pengj + * @date: 2024-08-19 + * @version: V1.0 + */ +@RestController +@RequestMapping("/xmgl/safetyBeltAlarm") +@Slf4j +@Api(tags = "安全带监测预警管理") +public class SafetyBeltAlarmController { + @Autowired + private ISafetyBeltAlarmService safetyBeltAlarmService; + + /** + * 分页列表查询 + * + * @return + */ + @OperLog(operModul = "安全带监测预警管理", operType = "分页查询", operDesc = "分页列表查询安全带监测预警信息") + @ApiOperation(value = " 分页列表查询安全带监测预警信息", notes = "分页列表查询安全带监测预警信息", httpMethod = "POST") + @ApiImplicitParams({ + @ApiImplicitParam(name = "pageNo", value = "页数", paramType = "body", required = true, defaultValue = "1", dataType = "Integer"), + @ApiImplicitParam(name = "pageSize", value = "每页条数", paramType = "body", required = true, defaultValue = "10", dataType = "Integer") + }) + @PostMapping(value = "/page") + public Result> queryPageList(@ApiIgnore @RequestBody Map map) { + QueryWrapper queryWrapper = QueryGenerator.initPageQueryWrapper(SafetyBeltAlarm.class, map); + Page page = PageUtil.getPage(map); + IPage pageList = safetyBeltAlarmService.page(page, queryWrapper); + return Result.success(pageList); + } + + /** + * 列表查询 + * + * @param safetyBeltAlarm + * @return + */ + @OperLog(operModul = "安全带监测预警管理", operType = "列表查询", operDesc = "列表查询安全带监测预警信息") + @ApiOperation(value = " 列表查询安全带监测预警信息", notes = "列表查询安全带监测预警信息", httpMethod = "POST") + @PostMapping(value = "/list") + public Result> queryList(@RequestBody SafetyBeltAlarm safetyBeltAlarm) { + QueryWrapper queryWrapper = QueryGenerator.initQueryWrapper(safetyBeltAlarm); + List list = safetyBeltAlarmService.list(queryWrapper); + return Result.success(list); + } + + + /** + * 添加 + * + * @param safetyBeltAlarm + * @return + */ + @OperLog(operModul = "安全带监测预警管理", operType = "新增", operDesc = "添加安全带监测预警信息") + @ApiOperation(value = " 添加安全带监测预警信息", notes = "添加安全带监测预警信息", httpMethod = "POST") + @PostMapping(value = "/add") + public Result add(@RequestBody SafetyBeltAlarm safetyBeltAlarm) { + safetyBeltAlarmService.save(safetyBeltAlarm); + return Result.success("添加成功!"); + } + + /** + * 编辑 + * + * @param safetyBeltAlarm + * @return + */ + @OperLog(operModul = "安全带监测预警管理", operType = "修改", operDesc = "编辑安全带监测预警信息") + @ApiOperation(value = "编辑安全带监测预警信息", notes = "编辑安全带监测预警信息", httpMethod = "POST") + @PostMapping(value = "/edit") + public Result edit(@RequestBody SafetyBeltAlarm safetyBeltAlarm) { + Result result = new Result(); + SafetyBeltAlarm safetyBeltAlarmEntity = safetyBeltAlarmService.getById(safetyBeltAlarm.getId()); + if (safetyBeltAlarmEntity == null) { + result.error500("未找到对应实体"); + } else { + boolean ok = safetyBeltAlarmService.updateById(safetyBeltAlarm); + if (ok) { + result.success("修改成功!"); + } else { + result.success("操作失败!"); + } + } + + return result; + } + + /** + * 通过id删除 + * + * @return + */ + @OperLog(operModul = "安全带监测预警管理", operType = "删除", operDesc = "删除安全带监测预警信息") + @ApiOperation(value = "删除安全带监测预警信息", notes = "删除安全带监测预警信息", httpMethod = "POST") + @ApiImplicitParam(name = "id", value = "安全带监测预警ID", paramType = "body", required = true, dataType = "Integer") + @PostMapping(value = "/delete") + public Result delete(@RequestBody SafetyBeltAlarm safetyBeltAlarm) { + Result result = new Result(); + SafetyBeltAlarm safetyBeltAlarmEntity = safetyBeltAlarmService.getById(safetyBeltAlarm.getId()); + if (safetyBeltAlarmEntity == null) { + result.error500("未找到对应实体"); + } else { + boolean ok = safetyBeltAlarmService.removeById(safetyBeltAlarm.getId()); + if (ok) { + result.success("删除成功!"); + } else { + result.success("操作失败!"); + } + } + return result; + } + + + /** + * 通过id查询 + * + * @return + */ + @OperLog(operModul = "安全带监测预警管理", operType = "查询", operDesc = "通过id查询安全带监测预警信息") + @ApiOperation(value = "通过id查询安全带监测预警信息", notes = "通过id查询安全带监测预警信息", httpMethod = "POST") + @ApiImplicitParam(name = "id", value = "安全带监测预警ID", paramType = "body", required = true, dataType = "Integer") + @PostMapping(value = "/queryById") + public Result queryById(@ApiIgnore @RequestBody Map map) { + Result result = new Result(); + SafetyBeltAlarm safetyBeltAlarm = safetyBeltAlarmService.getById(MapUtils.getString(map, "id")); + if (safetyBeltAlarm == null) { + result.error500("未找到对应实体"); + } else { + result.setResult(safetyBeltAlarm); + result.setSuccess(true); + } + return result; + } +} diff --git a/src/main/java/com/zhgd/xmgl/modules/safetybelt/controller/SafetyBeltDeviceController.java b/src/main/java/com/zhgd/xmgl/modules/safetybelt/controller/SafetyBeltDeviceController.java new file mode 100644 index 000000000..179c129bb --- /dev/null +++ b/src/main/java/com/zhgd/xmgl/modules/safetybelt/controller/SafetyBeltDeviceController.java @@ -0,0 +1,275 @@ +package com.zhgd.xmgl.modules.safetybelt.controller; + +import com.zhgd.annotation.OperLog; +import com.zhgd.xmgl.util.PageUtil; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiImplicitParam; +import io.swagger.annotations.ApiImplicitParams; +import io.swagger.annotations.ApiOperation; + +import java.util.Arrays; +import java.util.List; +import java.util.Map; +import java.io.IOException; +import java.io.UnsupportedEncodingException; +import java.net.URLDecoder; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; + +import com.zhgd.jeecg.common.api.vo.Result; +import com.zhgd.jeecg.common.system.query.QueryGenerator; +import com.zhgd.jeecg.common.util.oConvertUtils; +import com.zhgd.xmgl.modules.safetybelt.entity.SafetyBeltDevice; +import com.zhgd.xmgl.modules.safetybelt.service.ISafetyBeltDeviceService; + +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import lombok.extern.slf4j.Slf4j; + +import org.apache.commons.collections.MapUtils; +import org.jeecgframework.poi.excel.ExcelImportUtil; +import org.jeecgframework.poi.excel.def.NormalExcelConstants; +import org.jeecgframework.poi.excel.entity.ExportParams; +import org.jeecgframework.poi.excel.entity.ImportParams; +import org.jeecgframework.poi.excel.view.JeecgEntityExcelView; + +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.*; +import org.springframework.web.multipart.MultipartFile; +import org.springframework.web.multipart.MultipartHttpServletRequest; +import org.springframework.web.servlet.ModelAndView; +import com.alibaba.fastjson.JSON; +import springfox.documentation.annotations.ApiIgnore; + + +/** + * @Title: Controller + * @Description: 安全带监测设备 + * @author: pengj + * @date: 2024-08-19 + * @version: V1.0 + */ +@RestController +@RequestMapping("/xmgl/safetyBeltDevice") +@Slf4j +@Api(tags = "安全带监测设备管理") +public class SafetyBeltDeviceController { + + @Autowired + private ISafetyBeltDeviceService safetyBeltDeviceService; + + /** + * 分页列表查询 + * + * @return + */ + @OperLog(operModul = "安全带监测设备管理", operType = "分页查询", operDesc = "分页列表查询安全带监测设备信息") + @ApiOperation(value = " 分页列表查询安全带监测设备信息", notes = "分页列表查询安全带监测设备信息", httpMethod = "POST") + @ApiImplicitParams({ + @ApiImplicitParam(name = "pageNo", value = "页数", paramType = "body", required = true, defaultValue = "1", dataType = "Integer"), + @ApiImplicitParam(name = "pageSize", value = "每页条数", paramType = "body", required = true, defaultValue = "10", dataType = "Integer") + }) + @PostMapping(value = "/page") + public Result> queryPageList(@ApiIgnore @RequestBody Map map) { + QueryWrapper queryWrapper = QueryGenerator.initPageQueryWrapper(SafetyBeltDevice.class, map); + Page page = PageUtil.getPage(map); + IPage pageList = safetyBeltDeviceService.page(page, queryWrapper); + return Result.success(pageList); + } + + /** + * 列表查询 + * + * @param safetyBeltDevice + * @return + */ + @OperLog(operModul = "安全带监测设备管理", operType = "列表查询", operDesc = "列表查询安全带监测设备信息") + @ApiOperation(value = " 列表查询安全带监测设备信息", notes = "列表查询安全带监测设备信息", httpMethod = "POST") + @PostMapping(value = "/list") + public Result> queryList(@RequestBody SafetyBeltDevice safetyBeltDevice) { + QueryWrapper queryWrapper = QueryGenerator.initQueryWrapper(safetyBeltDevice); + List list = safetyBeltDeviceService.list(queryWrapper); + return Result.success(list); + } + + + /** + * 添加 + * + * @param safetyBeltDevice + * @return + */ + @OperLog(operModul = "安全带监测设备管理", operType = "新增", operDesc = "添加安全带监测设备信息") + @ApiOperation(value = " 添加安全带监测设备信息", notes = "添加安全带监测设备信息", httpMethod = "POST") + @PostMapping(value = "/add") + public Result add(@RequestBody SafetyBeltDevice safetyBeltDevice) { + safetyBeltDeviceService.save(safetyBeltDevice); + return Result.success("添加成功!"); + } + + /** + * 编辑 + * + * @param safetyBeltDevice + * @return + */ + @OperLog(operModul = "安全带监测设备管理", operType = "修改", operDesc = "编辑安全带监测设备信息") + @ApiOperation(value = "编辑安全带监测设备信息", notes = "编辑安全带监测设备信息", httpMethod = "POST") + @PostMapping(value = "/edit") + public Result edit(@RequestBody SafetyBeltDevice safetyBeltDevice) { + Result result = new Result(); + SafetyBeltDevice safetyBeltDeviceEntity = safetyBeltDeviceService.getById(safetyBeltDevice.getId()); + if (safetyBeltDeviceEntity == null) { + result.error500("未找到对应实体"); + } else { + boolean ok = safetyBeltDeviceService.updateById(safetyBeltDevice); + if (ok) { + result.success("修改成功!"); + } else { + result.success("操作失败!"); + } + } + + return result; + } + + /** + * 通过id删除 + * + * @return + */ + @OperLog(operModul = "安全带监测设备管理", operType = "删除", operDesc = "删除安全带监测设备信息") + @ApiOperation(value = "删除安全带监测设备信息", notes = "删除安全带监测设备信息", httpMethod = "POST") + @ApiImplicitParam(name = "id", value = "安全带监测设备ID", paramType = "body", required = true, dataType = "Integer") + @PostMapping(value = "/delete") + public Result delete(@RequestBody SafetyBeltDevice safetyBeltDevice) { + Result result = new Result(); + SafetyBeltDevice safetyBeltDeviceEntity = safetyBeltDeviceService.getById(safetyBeltDevice.getId()); + if (safetyBeltDeviceEntity == null) { + result.error500("未找到对应实体"); + } else { + boolean ok = safetyBeltDeviceService.removeById(safetyBeltDevice.getId()); + if (ok) { + result.success("删除成功!"); + } else { + result.success("操作失败!"); + } + } + return result; + } + + /** + * 批量删除 + * + * @return + */ + @OperLog(operModul = "安全带监测设备管理", operType = "批量删除", operDesc = "批量删除安全带监测设备信息") + @ApiOperation(value = "批量删除安全带监测设备信息", notes = "批量删除安全带监测设备信息", httpMethod = "POST") + @ApiImplicitParam(name = "ids", value = "安全带监测设备ID字符串", paramType = "body", required = true, dataType = "String") + @PostMapping(value = "/deleteBatch") + public Result deleteBatch(@ApiIgnore @RequestBody Map map) { + Result result = new Result(); + String ids = MapUtils.getString(map, "ids"); + if (ids == null || "".equals(ids.trim())) { + result.error500("参数不识别!"); + } else { + this.safetyBeltDeviceService.removeByIds(Arrays.asList(ids.split(","))); + result.success("删除成功!"); + } + return result; + } + + /** + * 通过id查询 + * + * @return + */ + @OperLog(operModul = "安全带监测设备管理", operType = "查询", operDesc = "通过id查询安全带监测设备信息") + @ApiOperation(value = "通过id查询安全带监测设备信息", notes = "通过id查询安全带监测设备信息", httpMethod = "POST") + @ApiImplicitParam(name = "id", value = "安全带监测设备ID", paramType = "body", required = true, dataType = "Integer") + @PostMapping(value = "/queryById") + public Result queryById(@ApiIgnore @RequestBody Map map) { + Result result = new Result(); + SafetyBeltDevice safetyBeltDevice = safetyBeltDeviceService.getById(MapUtils.getString(map, "id")); + if (safetyBeltDevice == null) { + result.error500("未找到对应实体"); + } else { + result.setResult(safetyBeltDevice); + result.setSuccess(true); + } + return result; + } + + /** + * 导出excel + * + * @param request + * @param response + */ + @ApiOperation(value = "导出excel安全带监测设备信息", notes = "导出excel安全带监测设备信息", httpMethod = "POST") + @RequestMapping(value = "/exportXls") + public ModelAndView exportXls(HttpServletRequest request, HttpServletResponse response) { + // Step.1 组装查询条件 + QueryWrapper queryWrapper = null; + try { + String paramsStr = request.getParameter("paramsStr"); + if (oConvertUtils.isNotEmpty(paramsStr)) { + String deString = URLDecoder.decode(paramsStr, "UTF-8"); + SafetyBeltDevice safetyBeltDevice = JSON.parseObject(deString, SafetyBeltDevice.class); + queryWrapper = QueryGenerator.initQueryWrapper(safetyBeltDevice, request.getParameterMap()); + } + } catch (UnsupportedEncodingException e) { + e.printStackTrace(); + } + + //Step.2 AutoPoi 导出Excel + ModelAndView mv = new ModelAndView(new JeecgEntityExcelView()); + List pageList = safetyBeltDeviceService.list(queryWrapper); + //导出文件名称 + mv.addObject(NormalExcelConstants.FILE_NAME, "安全带监测设备列表"); + mv.addObject(NormalExcelConstants.CLASS, SafetyBeltDevice.class); + mv.addObject(NormalExcelConstants.PARAMS, new ExportParams("安全带监测设备列表数据", "导出人:Jeecg", "导出信息")); + mv.addObject(NormalExcelConstants.DATA_LIST, pageList); + return mv; + } + + /** + * 通过excel导入数据 + * + * @param request + * @param response + * @return + */ + @ApiOperation(value = "通过excel导入安全带监测设备信息", notes = "通过excel导入安全带监测设备信息", httpMethod = "POST") + @RequestMapping(value = "/importExcel", method = RequestMethod.POST) + public Result importExcel(HttpServletRequest request, HttpServletResponse response) { + MultipartHttpServletRequest multipartRequest = (MultipartHttpServletRequest) request; + Map fileMap = multipartRequest.getFileMap(); + for (Map.Entry entity : fileMap.entrySet()) { + MultipartFile file = entity.getValue();// 获取上传文件对象 + ImportParams params = new ImportParams(); + params.setTitleRows(2); + params.setHeadRows(1); + params.setNeedSave(true); + try { + List listSafetyBeltDevices = ExcelImportUtil.importExcel(file.getInputStream(), SafetyBeltDevice.class, params); + for (SafetyBeltDevice safetyBeltDeviceExcel : listSafetyBeltDevices) { + safetyBeltDeviceService.save(safetyBeltDeviceExcel); + } + return Result.ok("文件导入成功!数据行数:" + listSafetyBeltDevices.size()); + } catch (Exception e) { + log.error(e.getMessage()); + return Result.error("文件导入失败!"); + } finally { + try { + file.getInputStream().close(); + } catch (IOException e) { + e.printStackTrace(); + } + } + } + return Result.ok("文件导入失败!"); + } + +} diff --git a/src/main/java/com/zhgd/xmgl/modules/safetybelt/controller/SafetyBeltRealDataController.java b/src/main/java/com/zhgd/xmgl/modules/safetybelt/controller/SafetyBeltRealDataController.java new file mode 100644 index 000000000..565d8bf2f --- /dev/null +++ b/src/main/java/com/zhgd/xmgl/modules/safetybelt/controller/SafetyBeltRealDataController.java @@ -0,0 +1,203 @@ +package com.zhgd.xmgl.modules.safetybelt.controller; + +import com.zhgd.annotation.OperLog; +import com.zhgd.xmgl.util.PageUtil; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiImplicitParam; +import io.swagger.annotations.ApiImplicitParams; +import io.swagger.annotations.ApiOperation; + +import java.util.Arrays; +import java.util.List; +import java.util.Map; +import java.io.IOException; +import java.io.UnsupportedEncodingException; +import java.net.URLDecoder; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; + +import com.zhgd.jeecg.common.api.vo.Result; +import com.zhgd.jeecg.common.system.query.QueryGenerator; +import com.zhgd.jeecg.common.util.oConvertUtils; +import com.zhgd.xmgl.modules.safetybelt.entity.SafetyBeltRealData; +import com.zhgd.xmgl.modules.safetybelt.service.ISafetyBeltRealDataService; + +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import lombok.extern.slf4j.Slf4j; + +import org.apache.commons.collections.MapUtils; +import org.jeecgframework.poi.excel.ExcelImportUtil; +import org.jeecgframework.poi.excel.def.NormalExcelConstants; +import org.jeecgframework.poi.excel.entity.ExportParams; +import org.jeecgframework.poi.excel.entity.ImportParams; +import org.jeecgframework.poi.excel.view.JeecgEntityExcelView; + +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.*; +import org.springframework.web.multipart.MultipartFile; +import org.springframework.web.multipart.MultipartHttpServletRequest; +import org.springframework.web.servlet.ModelAndView; +import com.alibaba.fastjson.JSON; +import springfox.documentation.annotations.ApiIgnore; + + +/** + * @Title: Controller + * @Description: 安全带监测实时数据 + * @author: pengj + * @date: 2024-08-19 + * @version: V1.0 + */ +@RestController +@RequestMapping("/xmgl/safetyBeltRealData") +@Slf4j +@Api(tags = "安全带监测实时数据管理") +public class SafetyBeltRealDataController { + @Autowired + private ISafetyBeltRealDataService safetyBeltRealDataService; + + /** + * 分页列表查询 + * + * @return + */ + @OperLog(operModul = "安全带监测实时数据管理", operType = "分页查询", operDesc = "分页列表查询安全带监测实时数据信息") + @ApiOperation(value = " 分页列表查询安全带监测实时数据信息", notes = "分页列表查询安全带监测实时数据信息", httpMethod = "POST") + @ApiImplicitParams({ + @ApiImplicitParam(name = "pageNo", value = "页数", paramType = "body", required = true, defaultValue = "1", dataType = "Integer"), + @ApiImplicitParam(name = "pageSize", value = "每页条数", paramType = "body", required = true, defaultValue = "10", dataType = "Integer") + }) + @PostMapping(value = "/page") + public Result> queryPageList(@ApiIgnore @RequestBody Map map) { + QueryWrapper queryWrapper = QueryGenerator.initPageQueryWrapper(SafetyBeltRealData.class, map); + Page page = PageUtil.getPage(map); + IPage pageList = safetyBeltRealDataService.page(page, queryWrapper); + return Result.success(pageList); + } + + /** + * 列表查询 + * + * @param safetyBeltRealData + * @return + */ + @OperLog(operModul = "安全带监测实时数据管理", operType = "列表查询", operDesc = "列表查询安全带监测实时数据信息") + @ApiOperation(value = " 列表查询安全带监测实时数据信息", notes = "列表查询安全带监测实时数据信息", httpMethod = "POST") + @PostMapping(value = "/list") + public Result> queryList(@RequestBody SafetyBeltRealData safetyBeltRealData) { + QueryWrapper queryWrapper = QueryGenerator.initQueryWrapper(safetyBeltRealData); + List list = safetyBeltRealDataService.list(queryWrapper); + return Result.success(list); + } + + + /** + * 添加 + * + * @param safetyBeltRealData + * @return + */ + @OperLog(operModul = "安全带监测实时数据管理", operType = "新增", operDesc = "添加安全带监测实时数据信息") + @ApiOperation(value = " 添加安全带监测实时数据信息", notes = "添加安全带监测实时数据信息", httpMethod = "POST") + @PostMapping(value = "/add") + public Result add(@RequestBody SafetyBeltRealData safetyBeltRealData) { + Result result = new Result(); + safetyBeltRealDataService.save(safetyBeltRealData); + return Result.success("添加成功!"); + } + + /** + * 编辑 + * + * @param safetyBeltRealData + * @return + */ + @OperLog(operModul = "安全带监测实时数据管理", operType = "修改", operDesc = "编辑安全带监测实时数据信息") + @ApiOperation(value = "编辑安全带监测实时数据信息", notes = "编辑安全带监测实时数据信息", httpMethod = "POST") + @PostMapping(value = "/edit") + public Result edit(@RequestBody SafetyBeltRealData safetyBeltRealData) { + Result result = new Result(); + SafetyBeltRealData safetyBeltRealDataEntity = safetyBeltRealDataService.getById(safetyBeltRealData.getId()); + if (safetyBeltRealDataEntity == null) { + result.error500("未找到对应实体"); + } else { + boolean ok = safetyBeltRealDataService.updateById(safetyBeltRealData); + if (ok) { + result.success("修改成功!"); + } else { + result.success("操作失败!"); + } + } + + return result; + } + + /** + * 通过id删除 + * + * @return + */ + @OperLog(operModul = "安全带监测实时数据管理", operType = "删除", operDesc = "删除安全带监测实时数据信息") + @ApiOperation(value = "删除安全带监测实时数据信息", notes = "删除安全带监测实时数据信息", httpMethod = "POST") + @ApiImplicitParam(name = "id", value = "安全带监测实时数据ID", paramType = "body", required = true, dataType = "Integer") + @PostMapping(value = "/delete") + public Result delete(@RequestBody SafetyBeltRealData safetyBeltRealData) { + Result result = new Result(); + SafetyBeltRealData safetyBeltRealDataEntity = safetyBeltRealDataService.getById(safetyBeltRealData.getId()); + if (safetyBeltRealDataEntity == null) { + result.error500("未找到对应实体"); + } else { + boolean ok = safetyBeltRealDataService.removeById(safetyBeltRealData.getId()); + if (ok) { + result.success("删除成功!"); + } else { + result.success("操作失败!"); + } + } + return result; + } + + /** + * 批量删除 + * + * @return + */ + @OperLog(operModul = "安全带监测实时数据管理", operType = "批量删除", operDesc = "批量删除安全带监测实时数据信息") + @ApiOperation(value = "批量删除安全带监测实时数据信息", notes = "批量删除安全带监测实时数据信息", httpMethod = "POST") + @ApiImplicitParam(name = "ids", value = "安全带监测实时数据ID字符串", paramType = "body", required = true, dataType = "String") + @PostMapping(value = "/deleteBatch") + public Result deleteBatch(@ApiIgnore @RequestBody Map map) { + Result result = new Result(); + String ids = MapUtils.getString(map, "ids"); + if (ids == null || "".equals(ids.trim())) { + result.error500("参数不识别!"); + } else { + this.safetyBeltRealDataService.removeByIds(Arrays.asList(ids.split(","))); + result.success("删除成功!"); + } + return result; + } + + /** + * 通过id查询 + * + * @return + */ + @OperLog(operModul = "安全带监测实时数据管理", operType = "查询", operDesc = "通过id查询安全带监测实时数据信息") + @ApiOperation(value = "通过id查询安全带监测实时数据信息", notes = "通过id查询安全带监测实时数据信息", httpMethod = "POST") + @ApiImplicitParam(name = "id", value = "安全带监测实时数据ID", paramType = "body", required = true, dataType = "Integer") + @PostMapping(value = "/queryById") + public Result queryById(@ApiIgnore @RequestBody Map map) { + Result result = new Result(); + SafetyBeltRealData safetyBeltRealData = safetyBeltRealDataService.getById(MapUtils.getString(map, "id")); + if (safetyBeltRealData == null) { + result.error500("未找到对应实体"); + } else { + result.setResult(safetyBeltRealData); + result.setSuccess(true); + } + return result; + } +} diff --git a/src/main/java/com/zhgd/xmgl/modules/safetybelt/entity/SafetyBeltAlarm.java b/src/main/java/com/zhgd/xmgl/modules/safetybelt/entity/SafetyBeltAlarm.java new file mode 100644 index 000000000..b08a83e5b --- /dev/null +++ b/src/main/java/com/zhgd/xmgl/modules/safetybelt/entity/SafetyBeltAlarm.java @@ -0,0 +1,58 @@ +package com.zhgd.xmgl.modules.safetybelt.entity; + +import java.io.Serializable; +import java.util.Date; +import com.baomidou.mybatisplus.annotation.IdType; +import com.baomidou.mybatisplus.annotation.TableId; +import com.baomidou.mybatisplus.annotation.TableName; +import lombok.Data; +import com.fasterxml.jackson.annotation.JsonFormat; +import org.springframework.format.annotation.DateTimeFormat; +import org.jeecgframework.poi.excel.annotation.Excel; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +/** + * @Description: 安全带监测预警 + * @author: pengj + * @date: 2024-08-19 + * @version: V1.0 + */ +@Data +@TableName("safety_belt_alarm") +@ApiModel(value="SafetyBeltAlarm实体类",description="SafetyBeltAlarm") +public class SafetyBeltAlarm implements Serializable { + private static final long serialVersionUID = 1L; + + /**预警ID*/ + @TableId(type = IdType.AUTO) + @ApiModelProperty(value="预警ID") + private Integer id ; + /**设备编码*/ + @Excel(name = "设备编码", width = 15) + @ApiModelProperty(value="设备编码") + private String deviceCode ; + /**操作人员名称*/ + @Excel(name = "操作人员名称", width = 15) + @ApiModelProperty(value="操作人员名称") + private String username ; + /**预警类型*/ + @Excel(name = "预警类型", width = 15) + @ApiModelProperty(value="预警类型") + private String alarmType ; + /**预警参数*/ + @Excel(name = "预警参数", width = 15) + @ApiModelProperty(value="预警参数") + private String alarmParam ; + /**预警时间*/ + @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 alarmTime ; + /**创建时间*/ + @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 ; +} diff --git a/src/main/java/com/zhgd/xmgl/modules/safetybelt/entity/SafetyBeltDevice.java b/src/main/java/com/zhgd/xmgl/modules/safetybelt/entity/SafetyBeltDevice.java new file mode 100644 index 000000000..8a3a25c08 --- /dev/null +++ b/src/main/java/com/zhgd/xmgl/modules/safetybelt/entity/SafetyBeltDevice.java @@ -0,0 +1,42 @@ +package com.zhgd.xmgl.modules.safetybelt.entity; + +import java.io.Serializable; +import java.util.Date; +import com.baomidou.mybatisplus.annotation.IdType; +import com.baomidou.mybatisplus.annotation.TableId; +import com.baomidou.mybatisplus.annotation.TableName; +import lombok.Data; +import com.fasterxml.jackson.annotation.JsonFormat; +import org.springframework.format.annotation.DateTimeFormat; +import org.jeecgframework.poi.excel.annotation.Excel; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +/** + * @Description: 安全带监测设备 + * @author: pengj + * @date: 2024-08-19 + * @version: V1.0 + */ +@Data +@TableName("safety_belt_device") +@ApiModel(value="SafetyBeltDevice实体类",description="SafetyBeltDevice") +public class SafetyBeltDevice implements Serializable { + private static final long serialVersionUID = 1L; + + /**安全带设备ID*/ + @TableId(type = IdType.AUTO) + @ApiModelProperty(value="安全带设备ID") + private Integer id ; + /**设备编码*/ + @Excel(name = "设备编码", width = 15) + @ApiModelProperty(value="设备编码") + private String code ; + /**设备名称*/ + @Excel(name = "设备名称", width = 15) + @ApiModelProperty(value="设备名称") + private String name ; + /**是否可用(0:不可用;1:可用;)*/ + @Excel(name = "是否可用(0:不可用;1:可用;)", width = 15) + @ApiModelProperty(value="是否可用(0:不可用;1:可用;)") + private Integer state ; +} diff --git a/src/main/java/com/zhgd/xmgl/modules/safetybelt/entity/SafetyBeltRealData.java b/src/main/java/com/zhgd/xmgl/modules/safetybelt/entity/SafetyBeltRealData.java new file mode 100644 index 000000000..47af7b089 --- /dev/null +++ b/src/main/java/com/zhgd/xmgl/modules/safetybelt/entity/SafetyBeltRealData.java @@ -0,0 +1,58 @@ +package com.zhgd.xmgl.modules.safetybelt.entity; + +import java.io.Serializable; +import java.util.Date; +import com.baomidou.mybatisplus.annotation.IdType; +import com.baomidou.mybatisplus.annotation.TableId; +import com.baomidou.mybatisplus.annotation.TableName; +import lombok.Data; +import com.fasterxml.jackson.annotation.JsonFormat; +import org.springframework.format.annotation.DateTimeFormat; +import org.jeecgframework.poi.excel.annotation.Excel; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +/** + * @Description: 安全带监测实时数据 + * @author: pengj + * @date: 2024-08-19 + * @version: V1.0 + */ +@Data +@TableName("safety_belt_real_data") +@ApiModel(value="SafetyBeltRealData实体类",description="SafetyBeltRealData") +public class SafetyBeltRealData implements Serializable { + private static final long serialVersionUID = 1L; + + /**实时数据ID*/ + @TableId(type = IdType.AUTO) + @ApiModelProperty(value="实时数据ID") + private Integer id ; + /**设备编码*/ + @Excel(name = "设备编码", width = 15) + @ApiModelProperty(value="设备编码") + private String deviceCode ; + /**操作人员名称*/ + @Excel(name = "操作人员名称", width = 15) + @ApiModelProperty(value="操作人员名称") + private String username ; + /**挂钩使用状态(0:异常;1:正常;)*/ + @Excel(name = "挂钩使用状态(0:异常;1:正常;)", width = 15) + @ApiModelProperty(value="挂钩使用状态(0:异常;1:正常;)") + private Integer usageState ; + /**双钩挂接距离*/ + @Excel(name = "双钩挂接距离", width = 15) + @ApiModelProperty(value="双钩挂接距离") + private String distance ; + /**上报时间*/ + @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 reportTime ; + /**创建时间*/ + @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 ; +} diff --git a/src/main/java/com/zhgd/xmgl/modules/safetybelt/mapper/SafetyBeltAlarmMapper.java b/src/main/java/com/zhgd/xmgl/modules/safetybelt/mapper/SafetyBeltAlarmMapper.java new file mode 100644 index 000000000..7b68fc8d4 --- /dev/null +++ b/src/main/java/com/zhgd/xmgl/modules/safetybelt/mapper/SafetyBeltAlarmMapper.java @@ -0,0 +1,19 @@ +package com.zhgd.xmgl.modules.safetybelt.mapper; + +import java.util.List; + +import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; +import com.zhgd.xmgl.modules.safetybelt.entity.SafetyBeltAlarm; +import com.baomidou.mybatisplus.core.mapper.BaseMapper; + +/** + * @Description: 安全带监测预警 + * @author: pengj + * @date: 2024-08-19 + * @version: V1.0 + */ +@Mapper +public interface SafetyBeltAlarmMapper extends BaseMapper { + +} diff --git a/src/main/java/com/zhgd/xmgl/modules/safetybelt/mapper/SafetyBeltDeviceMapper.java b/src/main/java/com/zhgd/xmgl/modules/safetybelt/mapper/SafetyBeltDeviceMapper.java new file mode 100644 index 000000000..c3d88a691 --- /dev/null +++ b/src/main/java/com/zhgd/xmgl/modules/safetybelt/mapper/SafetyBeltDeviceMapper.java @@ -0,0 +1,19 @@ +package com.zhgd.xmgl.modules.safetybelt.mapper; + +import java.util.List; + +import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; +import com.zhgd.xmgl.modules.safetybelt.entity.SafetyBeltDevice; +import com.baomidou.mybatisplus.core.mapper.BaseMapper; + +/** + * @Description: 安全带监测设备 + * @author: pengj + * @date: 2024-08-19 + * @version: V1.0 + */ +@Mapper +public interface SafetyBeltDeviceMapper extends BaseMapper { + +} diff --git a/src/main/java/com/zhgd/xmgl/modules/safetybelt/mapper/SafetyBeltRealDataMapper.java b/src/main/java/com/zhgd/xmgl/modules/safetybelt/mapper/SafetyBeltRealDataMapper.java new file mode 100644 index 000000000..74b171762 --- /dev/null +++ b/src/main/java/com/zhgd/xmgl/modules/safetybelt/mapper/SafetyBeltRealDataMapper.java @@ -0,0 +1,19 @@ +package com.zhgd.xmgl.modules.safetybelt.mapper; + +import java.util.List; + +import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; +import com.zhgd.xmgl.modules.safetybelt.entity.SafetyBeltRealData; +import com.baomidou.mybatisplus.core.mapper.BaseMapper; + +/** + * @Description: 安全带监测实时数据 + * @author: pengj + * @date: 2024-08-19 + * @version: V1.0 + */ +@Mapper +public interface SafetyBeltRealDataMapper extends BaseMapper { + +} diff --git a/src/main/java/com/zhgd/xmgl/modules/safetybelt/mapper/xml/SafetyBeltAlarmMapper.xml b/src/main/java/com/zhgd/xmgl/modules/safetybelt/mapper/xml/SafetyBeltAlarmMapper.xml new file mode 100644 index 000000000..3d0c846bf --- /dev/null +++ b/src/main/java/com/zhgd/xmgl/modules/safetybelt/mapper/xml/SafetyBeltAlarmMapper.xml @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/src/main/java/com/zhgd/xmgl/modules/safetybelt/mapper/xml/SafetyBeltDeviceMapper.xml b/src/main/java/com/zhgd/xmgl/modules/safetybelt/mapper/xml/SafetyBeltDeviceMapper.xml new file mode 100644 index 000000000..9937b0372 --- /dev/null +++ b/src/main/java/com/zhgd/xmgl/modules/safetybelt/mapper/xml/SafetyBeltDeviceMapper.xml @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/src/main/java/com/zhgd/xmgl/modules/safetybelt/mapper/xml/SafetyBeltRealDataMapper.xml b/src/main/java/com/zhgd/xmgl/modules/safetybelt/mapper/xml/SafetyBeltRealDataMapper.xml new file mode 100644 index 000000000..025520279 --- /dev/null +++ b/src/main/java/com/zhgd/xmgl/modules/safetybelt/mapper/xml/SafetyBeltRealDataMapper.xml @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/src/main/java/com/zhgd/xmgl/modules/safetybelt/service/ISafetyBeltAlarmService.java b/src/main/java/com/zhgd/xmgl/modules/safetybelt/service/ISafetyBeltAlarmService.java new file mode 100644 index 000000000..4b0c6fc3e --- /dev/null +++ b/src/main/java/com/zhgd/xmgl/modules/safetybelt/service/ISafetyBeltAlarmService.java @@ -0,0 +1,14 @@ +package com.zhgd.xmgl.modules.safetybelt.service; + +import com.zhgd.xmgl.modules.safetybelt.entity.SafetyBeltAlarm; +import com.baomidou.mybatisplus.extension.service.IService; + +/** + * @Description: 安全带监测预警 + * @author: pengj + * @date: 2024-08-19 + * @version: V1.0 + */ +public interface ISafetyBeltAlarmService extends IService { + +} diff --git a/src/main/java/com/zhgd/xmgl/modules/safetybelt/service/ISafetyBeltDeviceService.java b/src/main/java/com/zhgd/xmgl/modules/safetybelt/service/ISafetyBeltDeviceService.java new file mode 100644 index 000000000..034ee6fb0 --- /dev/null +++ b/src/main/java/com/zhgd/xmgl/modules/safetybelt/service/ISafetyBeltDeviceService.java @@ -0,0 +1,14 @@ +package com.zhgd.xmgl.modules.safetybelt.service; + +import com.zhgd.xmgl.modules.safetybelt.entity.SafetyBeltDevice; +import com.baomidou.mybatisplus.extension.service.IService; + +/** + * @Description: 安全带监测设备 + * @author: pengj + * @date: 2024-08-19 + * @version: V1.0 + */ +public interface ISafetyBeltDeviceService extends IService { + +} diff --git a/src/main/java/com/zhgd/xmgl/modules/safetybelt/service/ISafetyBeltRealDataService.java b/src/main/java/com/zhgd/xmgl/modules/safetybelt/service/ISafetyBeltRealDataService.java new file mode 100644 index 000000000..f2a195ea0 --- /dev/null +++ b/src/main/java/com/zhgd/xmgl/modules/safetybelt/service/ISafetyBeltRealDataService.java @@ -0,0 +1,14 @@ +package com.zhgd.xmgl.modules.safetybelt.service; + +import com.zhgd.xmgl.modules.safetybelt.entity.SafetyBeltRealData; +import com.baomidou.mybatisplus.extension.service.IService; + +/** + * @Description: 安全带监测实时数据 + * @author: pengj + * @date: 2024-08-19 + * @version: V1.0 + */ +public interface ISafetyBeltRealDataService extends IService { + +} diff --git a/src/main/java/com/zhgd/xmgl/modules/safetybelt/service/impl/SafetyBeltAlarmServiceImpl.java b/src/main/java/com/zhgd/xmgl/modules/safetybelt/service/impl/SafetyBeltAlarmServiceImpl.java new file mode 100644 index 000000000..63e93e392 --- /dev/null +++ b/src/main/java/com/zhgd/xmgl/modules/safetybelt/service/impl/SafetyBeltAlarmServiceImpl.java @@ -0,0 +1,19 @@ +package com.zhgd.xmgl.modules.safetybelt.service.impl; + +import com.zhgd.xmgl.modules.safetybelt.entity.SafetyBeltAlarm; +import com.zhgd.xmgl.modules.safetybelt.mapper.SafetyBeltAlarmMapper; +import com.zhgd.xmgl.modules.safetybelt.service.ISafetyBeltAlarmService; +import org.springframework.stereotype.Service; + +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; + +/** + * @Description: 安全带监测预警 + * @author: pengj + * @date: 2024-08-19 + * @version: V1.0 + */ +@Service +public class SafetyBeltAlarmServiceImpl extends ServiceImpl implements ISafetyBeltAlarmService { + +} diff --git a/src/main/java/com/zhgd/xmgl/modules/safetybelt/service/impl/SafetyBeltDeviceServiceImpl.java b/src/main/java/com/zhgd/xmgl/modules/safetybelt/service/impl/SafetyBeltDeviceServiceImpl.java new file mode 100644 index 000000000..b1ee7df41 --- /dev/null +++ b/src/main/java/com/zhgd/xmgl/modules/safetybelt/service/impl/SafetyBeltDeviceServiceImpl.java @@ -0,0 +1,19 @@ +package com.zhgd.xmgl.modules.safetybelt.service.impl; + +import com.zhgd.xmgl.modules.safetybelt.entity.SafetyBeltDevice; +import com.zhgd.xmgl.modules.safetybelt.mapper.SafetyBeltDeviceMapper; +import com.zhgd.xmgl.modules.safetybelt.service.ISafetyBeltDeviceService; +import org.springframework.stereotype.Service; + +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; + +/** + * @Description: 安全带监测设备 + * @author: pengj + * @date: 2024-08-19 + * @version: V1.0 + */ +@Service +public class SafetyBeltDeviceServiceImpl extends ServiceImpl implements ISafetyBeltDeviceService { + +} diff --git a/src/main/java/com/zhgd/xmgl/modules/safetybelt/service/impl/SafetyBeltRealDataServiceImpl.java b/src/main/java/com/zhgd/xmgl/modules/safetybelt/service/impl/SafetyBeltRealDataServiceImpl.java new file mode 100644 index 000000000..abffb67a1 --- /dev/null +++ b/src/main/java/com/zhgd/xmgl/modules/safetybelt/service/impl/SafetyBeltRealDataServiceImpl.java @@ -0,0 +1,19 @@ +package com.zhgd.xmgl.modules.safetybelt.service.impl; + +import com.zhgd.xmgl.modules.safetybelt.entity.SafetyBeltRealData; +import com.zhgd.xmgl.modules.safetybelt.mapper.SafetyBeltRealDataMapper; +import com.zhgd.xmgl.modules.safetybelt.service.ISafetyBeltRealDataService; +import org.springframework.stereotype.Service; + +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; + +/** + * @Description: 安全带监测实时数据 + * @author: pengj + * @date: 2024-08-19 + * @version: V1.0 + */ +@Service +public class SafetyBeltRealDataServiceImpl extends ServiceImpl implements ISafetyBeltRealDataService { + +}