diff --git a/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/heating/controller/HeatanalysisHistoryController.java b/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/heating/controller/HeatanalysisHistoryController.java new file mode 100644 index 0000000..2b8369a --- /dev/null +++ b/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/heating/controller/HeatanalysisHistoryController.java @@ -0,0 +1,45 @@ +package org.jeecg.modules.heating.controller; + +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import lombok.extern.slf4j.Slf4j; +import org.jeecg.common.api.vo.Result; +import org.jeecg.common.system.base.controller.JeecgController; +import org.jeecg.modules.heating.entity.HeatanalysisHistory; +import org.jeecg.modules.heating.service.HeatanalysisHistoryService; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.*; +import javax.servlet.http.HttpServletRequest; +import java.util.List; + + +@Slf4j +@RestController +@RequestMapping("/heating/heatanalysishistory") +public class HeatanalysisHistoryController extends JeecgController { + @Autowired + private HeatanalysisHistoryService service; + + /** + * 分页列表查询 + * + * @param heatanalysisHistory + * @param pageNo + * @param pageSize + * @param req + * @return + */ + @GetMapping(value = "/page") + public Result queryPageList(HeatanalysisHistory heatanalysisHistory, @RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo, + @RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize, HttpServletRequest req) { + Page page = new Page(pageNo, pageSize); + IPage pageList = service.findPage(page, heatanalysisHistory); + return Result.ok(pageList); + } + + @GetMapping(value = "/queryHistoryList") + public Result queryHistoryList(HeatanalysisHistory heatanalysisHistory, HttpServletRequest req) { + return service.findHistoryList(heatanalysisHistory); + } + +} diff --git a/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/heating/controller/HeatsourceController.java b/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/heating/controller/HeatsourceController.java index 535e4b2..c3b6258 100644 --- a/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/heating/controller/HeatsourceController.java +++ b/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/heating/controller/HeatsourceController.java @@ -1,16 +1,28 @@ package org.jeecg.modules.heating.controller; +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import io.swagger.annotations.ApiOperation; import lombok.extern.slf4j.Slf4j; +import org.apache.shiro.authz.annotation.RequiresPermissions; import org.jeecg.common.api.vo.Result; +import org.jeecg.common.aspect.annotation.AutoLog; import org.jeecg.common.system.base.controller.JeecgController; +import org.jeecg.common.system.query.QueryGenerator; +import org.jeecg.common.system.query.QueryRuleEnum; import org.jeecg.modules.heating.entity.Heatsource; import org.jeecg.modules.heating.service.*; import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.web.bind.annotation.GetMapping; -import org.springframework.web.bind.annotation.RequestMapping; -import org.springframework.web.bind.annotation.RestController; +import org.springframework.web.bind.annotation.*; +import org.springframework.web.servlet.ModelAndView; + import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; +import java.util.Arrays; +import java.util.HashMap; import java.util.List; +import java.util.Map; @Slf4j @RestController @@ -33,4 +45,132 @@ public class HeatsourceController extends JeecgController list = heatsourceService.findList(heatsource); return Result.ok(list); } + + /** + * 分页列表查询 + * + * @param heatsource + * @param pageNo + * @param pageSize + * @param req + * @return + */ + //@AutoLog(value = "热力源-分页列表查询") + @ApiOperation(value="热力源-分页列表查询", notes="热力源-分页列表查询") + @GetMapping(value = "/page") + public Result> queryPageList(Heatsource heatsource, + @RequestParam(name="pageNo", defaultValue="1") Integer pageNo, + @RequestParam(name="pageSize", defaultValue="10") Integer pageSize, + HttpServletRequest req) { + // 自定义查询规则 + Map customeRuleMap = new HashMap<>(); + // 自定义多选的查询规则为:LIKE_WITH_OR + customeRuleMap.put("companyId", QueryRuleEnum.LIKE_WITH_OR); + QueryWrapper queryWrapper = QueryGenerator.initQueryWrapper(heatsource, req.getParameterMap(),customeRuleMap); + Page page = new Page(pageNo, pageSize); + IPage pageList = heatsourceService.page(page, queryWrapper); + return Result.OK(pageList); + } + + /** + * 添加 + * + * @param heatsource + * @return + */ + @AutoLog(value = "热力源-添加") + @ApiOperation(value="热力源-添加", notes="热力源-添加") + @RequiresPermissions("heating:bl_heatsource:add") + @PostMapping(value = "/add") + public Result add(@RequestBody Heatsource heatsource) { + heatsourceService.save(heatsource); + return Result.OK("添加成功!"); + } + + /** + * 编辑 + * + * @param heatsource + * @return + */ + @AutoLog(value = "热力源-编辑") + @ApiOperation(value="热力源-编辑", notes="热力源-编辑") + @RequiresPermissions("heating:bl_heatsource:edit") + @RequestMapping(value = "/edit", method = {RequestMethod.PUT,RequestMethod.POST}) + public Result edit(@RequestBody Heatsource heatsource) { + heatsourceService.updateById(heatsource); + return Result.OK("编辑成功!"); + } + + /** + * 通过id删除 + * + * @param id + * @return + */ + @AutoLog(value = "热力源-通过id删除") + @ApiOperation(value="热力源-通过id删除", notes="热力源-通过id删除") + @RequiresPermissions("heating:bl_heatsource:delete") + @DeleteMapping(value = "/delete") + public Result delete(@RequestParam(name="id",required=true) String id) { + heatsourceService.removeById(id); + return Result.OK("删除成功!"); + } + + /** + * 批量删除 + * + * @param ids + * @return + */ + @AutoLog(value = "热力源-批量删除") + @ApiOperation(value="热力源-批量删除", notes="热力源-批量删除") + @RequiresPermissions("heating:bl_heatsource:deleteBatch") + @DeleteMapping(value = "/deleteBatch") + public Result deleteBatch(@RequestParam(name="ids",required=true) String ids) { + this.heatsourceService.removeByIds(Arrays.asList(ids.split(","))); + return Result.OK("批量删除成功!"); + } + + /** + * 通过id查询 + * + * @param id + * @return + */ + //@AutoLog(value = "热力源-通过id查询") + @ApiOperation(value="热力源-通过id查询", notes="热力源-通过id查询") + @GetMapping(value = "/queryById") + public Result queryById(@RequestParam(name="id",required=true) String id) { + Heatsource heatsource = heatsourceService.getById(id); + if(heatsource==null) { + return Result.error("未找到对应数据"); + } + return Result.OK(heatsource); + } + + /** + * 导出excel + * + * @param request + * @param heatsource + */ + @RequiresPermissions("heating:bl_heatsource:exportXls") + @RequestMapping(value = "/exportXls") + public ModelAndView exportXls(HttpServletRequest request, Heatsource heatsource) { + return super.exportXls(request, heatsource, Heatsource.class, "热力源"); + } + + /** + * 通过excel导入数据 + * + * @param request + * @param response + * @return + */ + @RequiresPermissions("heating:bl_heatsource:importExcel") + @RequestMapping(value = "/importExcel", method = RequestMethod.POST) + public Result importExcel(HttpServletRequest request, HttpServletResponse response) { + return super.importExcel(request, response, Heatsource.class); + } } diff --git a/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/heating/controller/HeatsourcestationController.java b/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/heating/controller/HeatsourcestationController.java index db1e4e6..6301a8f 100644 --- a/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/heating/controller/HeatsourcestationController.java +++ b/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/heating/controller/HeatsourcestationController.java @@ -1,16 +1,29 @@ package org.jeecg.modules.heating.controller; +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import io.swagger.annotations.ApiOperation; import lombok.extern.slf4j.Slf4j; +import org.apache.shiro.authz.annotation.RequiresPermissions; import org.jeecg.common.api.vo.Result; +import org.jeecg.common.aspect.annotation.AutoLog; import org.jeecg.common.system.base.controller.JeecgController; +import org.jeecg.common.system.query.QueryGenerator; +import org.jeecg.common.system.query.QueryRuleEnum; import org.jeecg.modules.heating.entity.Heatsourcestation; import org.jeecg.modules.heating.service.*; +import org.jeecg.modules.system.entity.SysDepart; import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.web.bind.annotation.GetMapping; -import org.springframework.web.bind.annotation.RequestMapping; -import org.springframework.web.bind.annotation.RestController; +import org.springframework.web.bind.annotation.*; +import org.springframework.web.servlet.ModelAndView; + import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; +import java.util.Arrays; +import java.util.HashMap; import java.util.List; +import java.util.Map; @Slf4j @RestController @@ -33,4 +46,164 @@ public class HeatsourcestationController extends JeecgController list = heatsourcestationService.findList(heatsourcestation); return Result.ok(list); } + + /** + * 列表查询 + * + * @param heatsourcestation + * @param req + * @return + */ + @GetMapping(value = "/companyList") + public Result companyList(Heatsourcestation heatsourcestation, HttpServletRequest req) { + //所有站点 + List list = heatsourcestationService.findCompanyList(heatsourcestation); + return Result.ok(list); + } + + /** + * 列表查询 + * + * @param heatsourcestation + * @param req + * @return + */ + @GetMapping(value = "/sourceList") + public Result sourceList(Heatsourcestation heatsourcestation, HttpServletRequest req) { + //所有站点 + List list = heatsourcestationService.findSourceList(heatsourcestation); + return Result.ok(list); + } + + /** + * 分页列表查询 + * + * @param heatsourcestation + * @param pageNo + * @param pageSize + * @param req + * @return + */ + //@AutoLog(value = "热力站-分页列表查询") + @ApiOperation(value="热力站-分页列表查询", notes="热力站-分页列表查询") + @GetMapping(value = "/page") + public Result> queryPageList(Heatsourcestation heatsourcestation, + @RequestParam(name="pageNo", defaultValue="1") Integer pageNo, + @RequestParam(name="pageSize", defaultValue="10") Integer pageSize, + HttpServletRequest req) { + // 自定义查询规则 + Map customeRuleMap = new HashMap<>(); + // 自定义多选的查询规则为:LIKE_WITH_OR + customeRuleMap.put("companyId", QueryRuleEnum.EQ); + customeRuleMap.put("sourceId", QueryRuleEnum.EQ); + customeRuleMap.put("stationName", QueryRuleEnum.LIKE_WITH_OR); + QueryWrapper queryWrapper = QueryGenerator.initQueryWrapper(heatsourcestation, req.getParameterMap(),customeRuleMap); + queryWrapper.orderByAsc("company_id"); + queryWrapper.orderByAsc("source_id"); + Page page = new Page(pageNo, pageSize); + IPage pageList = heatsourcestationService.page(page, queryWrapper); + return Result.OK(pageList); + } + + /** + * 添加 + * + * @param heatsourcestation + * @return + */ + @AutoLog(value = "热力站-添加") + @ApiOperation(value="热力站-添加", notes="热力站-添加") + @RequiresPermissions("heating:bl_heatsourcestation:add") + @PostMapping(value = "/add") + public Result add(@RequestBody Heatsourcestation heatsourcestation) { + heatsourcestationService.save(heatsourcestation); + return Result.OK("添加成功!"); + } + + /** + * 编辑 + * + * @param heatsourcestation + * @return + */ + @AutoLog(value = "热力站-编辑") + @ApiOperation(value="热力站-编辑", notes="热力站-编辑") + @RequiresPermissions("heating:bl_heatsourcestation:edit") + @RequestMapping(value = "/edit", method = {RequestMethod.PUT,RequestMethod.POST}) + public Result edit(@RequestBody Heatsourcestation heatsourcestation) { + heatsourcestationService.updateById(heatsourcestation); + return Result.OK("编辑成功!"); + } + + /** + * 通过id删除 + * + * @param id + * @return + */ + @AutoLog(value = "热力站-通过id删除") + @ApiOperation(value="热力站-通过id删除", notes="热力站-通过id删除") + @RequiresPermissions("heating:bl_heatsourcestation:delete") + @DeleteMapping(value = "/delete") + public Result delete(@RequestParam(name="id",required=true) String id) { + heatsourcestationService.removeById(id); + return Result.OK("删除成功!"); + } + + /** + * 批量删除 + * + * @param ids + * @return + */ + @AutoLog(value = "热力站-批量删除") + @ApiOperation(value="热力站-批量删除", notes="热力站-批量删除") + @RequiresPermissions("heating:bl_heatsourcestation:deleteBatch") + @DeleteMapping(value = "/deleteBatch") + public Result deleteBatch(@RequestParam(name="ids",required=true) String ids) { + this.heatsourcestationService.removeByIds(Arrays.asList(ids.split(","))); + return Result.OK("批量删除成功!"); + } + + /** + * 通过id查询 + * + * @param id + * @return + */ + //@AutoLog(value = "热力站-通过id查询") + @ApiOperation(value="热力站-通过id查询", notes="热力站-通过id查询") + @GetMapping(value = "/queryById") + public Result queryById(@RequestParam(name="id",required=true) String id) { + Heatsourcestation heatsourcestation = heatsourcestationService.getById(id); + if(heatsourcestation==null) { + return Result.error("未找到对应数据"); + } + return Result.OK(heatsourcestation); + } + + /** + * 导出excel + * + * @param request + * @param heatsourcestation + */ + @RequiresPermissions("heating:bl_heatsourcestation:exportXls") + @RequestMapping(value = "/exportXls") + public ModelAndView exportXls(HttpServletRequest request, Heatsourcestation heatsourcestation) { + return super.exportXls(request, heatsourcestation, Heatsourcestation.class, "热力站"); + } + + /** + * 通过excel导入数据 + * + * @param request + * @param response + * @return + */ + @RequiresPermissions("heating:bl_heatsourcestation:importExcel") + @RequestMapping(value = "/importExcel", method = RequestMethod.POST) + public Result importExcel(HttpServletRequest request, HttpServletResponse response) { + return super.importExcel(request, response, Heatsourcestation.class); + } } diff --git a/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/heating/controller/MarkinfoController.java b/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/heating/controller/MarkinfoController.java new file mode 100644 index 0000000..3acc565 --- /dev/null +++ b/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/heating/controller/MarkinfoController.java @@ -0,0 +1,100 @@ +package org.jeecg.modules.heating.controller; + +import lombok.extern.slf4j.Slf4j; +import org.apache.shiro.authz.annotation.RequiresPermissions; +import org.jeecg.common.api.vo.Result; +import org.jeecg.common.system.base.controller.JeecgController; +import org.jeecg.modules.heating.entity.Markinfo; +import org.jeecg.modules.heating.service.MarkinfoService; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.*; +import javax.servlet.http.HttpServletRequest; +import java.util.List; +import java.util.Map; + +@Slf4j +@RestController +@RequestMapping("/heating/markinfo") +public class MarkinfoController extends JeecgController { + + @Autowired + private MarkinfoService markinfoService; + + @GetMapping(value = "/queryTree") + public Result queryTree() { + List> list = markinfoService.queryTree(); + return Result.ok(list); + } + + /** + * 列表查询 + * + * @param markinfo + * @param req + * @return + */ + @GetMapping(value = "/list") + public Result queryList(Markinfo markinfo, HttpServletRequest req) { + List list = markinfoService.findList(markinfo); + return Result.ok(list); + } + + @GetMapping(value = "/getMarkinfo") + public Result getMarkinfo(Markinfo markinfo, HttpServletRequest req) { + Markinfo entity = markinfoService.getMarkinfo(markinfo); + return Result.ok(entity); + } + + @GetMapping(value = "/getPointInfo") + public Result getPointInfo(Markinfo markinfo, HttpServletRequest req) { + return markinfoService.getPointInfo(markinfo); + } + + /** + * 添加 + * + * @param markinfo + * @return + */ + @PostMapping(value = "/add") + @RequiresPermissions("heating:bl_markinfo:add") + public Result add(@RequestBody Markinfo markinfo) { + markinfoService.save(markinfo); + return Result.OK("添加成功!"); + } + + /** + * 通过经纬度删除 + * + * @param markinfo + * @return + */ + @DeleteMapping(value = "/delete") + @RequiresPermissions("heating:bl_markinfo:delete") + public Result delete(@RequestBody Markinfo markinfo) { + markinfoService.delete(markinfo); + return Result.OK("删除成功!"); + } + + @DeleteMapping(value = "/deleteAll") + @RequiresPermissions("heating:bl_markinfo:delete") + public Result deleteAll() { + markinfoService.deleteAll(); + return Result.OK("删除成功!"); + } + + @GetMapping(value = "/sourceList") + public Result sourceList(Markinfo markinfo, HttpServletRequest req) { + //所有热源 + List list = markinfoService.sourceList(markinfo); + return Result.ok(list); + } + + @GetMapping(value = "/stationList") + public Result stationList(Markinfo markinfo, HttpServletRequest req) { + //所有站点 + List list = markinfoService.stationList(markinfo); + return Result.ok(list); + } + +} diff --git a/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/heating/controller/SimconfigController.java b/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/heating/controller/SimconfigController.java new file mode 100644 index 0000000..5362ecc --- /dev/null +++ b/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/heating/controller/SimconfigController.java @@ -0,0 +1,254 @@ +package org.jeecg.modules.heating.controller; + +import java.util.Arrays; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; +import org.jeecg.common.api.vo.Result; +import org.jeecg.common.system.query.QueryGenerator; +import org.jeecg.common.system.query.QueryRuleEnum; +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.jeecg.modules.heating.entity.Simconfig; +import org.jeecg.modules.heating.service.SimconfigService; +import org.jeecg.common.system.base.controller.JeecgController; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.*; +import org.springframework.web.servlet.ModelAndView; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import org.jeecg.common.aspect.annotation.AutoLog; +import org.apache.shiro.authz.annotation.RequiresPermissions; + + /** + * @Description: 设备信息管理 + * @Author: jeecg-boot + * @Date: 2025-04-09 + * @Version: V1.0 + */ +@Api(tags="设备信息管理") +@RestController +@RequestMapping("/heating/simconfig") +@Slf4j +public class SimconfigController extends JeecgController { + @Autowired + private SimconfigService simconfigService; + + /** + * 列表查询 + * + * @param simconfig + * @param req + * @return + */ + @GetMapping(value = "/companyList") + public Result companyList(Simconfig simconfig, HttpServletRequest req) { + //所有站点 + List list = simconfigService.findCompanyList(simconfig); + return Result.ok(list); + } + + /** + * 列表查询 + * + * @param simconfig + * @param req + * @return + */ + @GetMapping(value = "/sourceList") + public Result sourceList(Simconfig simconfig, HttpServletRequest req) { + //所有站点 + List list = simconfigService.findSourceList(simconfig); + return Result.ok(list); + } + + /** + * 列表查询 + * + * @param simconfig + * @param req + * @return + */ + @GetMapping(value = "/stationList") + public Result stationList(Simconfig simconfig, HttpServletRequest req) { + //所有站点 + List list = simconfigService.findStationList(simconfig); + return Result.ok(list); + } + + /** + * 分页列表查询 + * + * @param simconfig + * @param pageNo + * @param pageSize + * @param req + * @return + */ + //@AutoLog(value = "设备信息管理-分页列表查询") + @ApiOperation(value="设备信息管理-分页列表查询", notes="设备信息管理-分页列表查询") + @GetMapping(value = "/list") + public Result> queryPageList(Simconfig simconfig, + @RequestParam(name="pageNo", defaultValue="1") Integer pageNo, + @RequestParam(name="pageSize", defaultValue="10") Integer pageSize, + HttpServletRequest req) { + + // 自定义查询规则 + Map customeRuleMap = new HashMap<>(); + // 自定义多选的查询规则为:LIKE_WITH_OR + customeRuleMap.put("companyCompanyId", QueryRuleEnum.EQ); + customeRuleMap.put("sourceSourceId", QueryRuleEnum.EQ); + customeRuleMap.put("stationStationId", QueryRuleEnum.EQ); + customeRuleMap.put("code", QueryRuleEnum.LIKE_WITH_OR); + customeRuleMap.put("sim", QueryRuleEnum.LIKE_WITH_OR); + QueryWrapper queryWrapper = QueryGenerator.initQueryWrapper(simconfig, req.getParameterMap(),customeRuleMap); + Page page = new Page(pageNo, pageSize); + IPage pageList = simconfigService.page(page, queryWrapper); + return Result.OK(pageList); + } + + /** + * 添加 + * + * @param simconfig + * @return + */ + @AutoLog(value = "设备信息管理-添加") + @ApiOperation(value="设备信息管理-添加", notes="设备信息管理-添加") + @RequiresPermissions("heating:bl_simconfig:add") + @PostMapping(value = "/add") + public Result add(@RequestBody Simconfig simconfig) { + String sim = simconfig.getSim(); + if(sim!=null&&!sim.equals("")){ + Simconfig entity = new Simconfig(); + entity.setSim(sim); + List list = simconfigService.findSimconfig(entity); + if(list.size()>0){ + return Result.error("添加失败,电话号已存在!"); + } + } + String code = simconfig.getCode(); + if(code!=null&&!code.equals("")){ + Simconfig entity = new Simconfig(); + entity.setCode(code); + List list = simconfigService.findSimconfig(entity); + if(list.size()>0){ + return Result.error("添加失败,设备号已存在!"); + } + } + simconfigService.save(simconfig); + return Result.OK("添加成功!"); + } + + /** + * 编辑 + * + * @param simconfig + * @return + */ + @AutoLog(value = "设备信息管理-编辑") + @ApiOperation(value="设备信息管理-编辑", notes="设备信息管理-编辑") + @RequiresPermissions("heating:bl_simconfig:edit") + @RequestMapping(value = "/edit", method = {RequestMethod.PUT,RequestMethod.POST}) + public Result edit(@RequestBody Simconfig simconfig) { + String sim = simconfig.getSim(); + if(sim!=null&&!sim.equals("")){ + Simconfig entity = new Simconfig(); + entity.setSim(sim); + entity.setId(simconfig.getId()); + List list = simconfigService.findSimconfig(entity); + if(list.size()>0){ + return Result.error("添加失败,电话号已存在!"); + } + } + String code = simconfig.getCode(); + if(code!=null&&!code.equals("")){ + Simconfig entity = new Simconfig(); + entity.setCode(code); + entity.setId(simconfig.getId()); + List list = simconfigService.findSimconfig(entity); + if(list.size()>0){ + return Result.error("添加失败,设备号已存在!"); + } + } + simconfigService.updateById(simconfig); + return Result.OK("编辑成功!"); + } + + /** + * 通过id删除 + * + * @param id + * @return + */ + @AutoLog(value = "设备信息管理-通过id删除") + @ApiOperation(value="设备信息管理-通过id删除", notes="设备信息管理-通过id删除") + @RequiresPermissions("heating:bl_simconfig:delete") + @DeleteMapping(value = "/delete") + public Result delete(@RequestParam(name="id",required=true) String id) { + simconfigService.removeById(id); + return Result.OK("删除成功!"); + } + + /** + * 批量删除 + * + * @param ids + * @return + */ + @AutoLog(value = "设备信息管理-批量删除") + @ApiOperation(value="设备信息管理-批量删除", notes="设备信息管理-批量删除") + @RequiresPermissions("heating:bl_simconfig:deleteBatch") + @DeleteMapping(value = "/deleteBatch") + public Result deleteBatch(@RequestParam(name="ids",required=true) String ids) { + this.simconfigService.removeByIds(Arrays.asList(ids.split(","))); + return Result.OK("批量删除成功!"); + } + + /** + * 通过id查询 + * + * @param id + * @return + */ + //@AutoLog(value = "设备信息管理-通过id查询") + @ApiOperation(value="设备信息管理-通过id查询", notes="设备信息管理-通过id查询") + @GetMapping(value = "/queryById") + public Result queryById(@RequestParam(name="id",required=true) String id) { + Simconfig simconfig = simconfigService.getById(id); + if(simconfig==null) { + return Result.error("未找到对应数据"); + } + return Result.OK(simconfig); + } + + /** + * 导出excel + * + * @param request + * @param simconfig + */ + @RequiresPermissions("heating:bl_simconfig:exportXls") + @RequestMapping(value = "/exportXls") + public ModelAndView exportXls(HttpServletRequest request, Simconfig simconfig) { + return super.exportXls(request, simconfig, Simconfig.class, "设备信息管理"); + } + + /** + * 通过excel导入数据 + * + * @param request + * @param response + * @return + */ + @RequiresPermissions("heating:bl_simconfig:importExcel") + @RequestMapping(value = "/importExcel", method = RequestMethod.POST) + public Result importExcel(HttpServletRequest request, HttpServletResponse response) { + return super.importExcel(request, response, Simconfig.class); + } + +} diff --git a/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/heating/controller/ThermalcompanyController.java b/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/heating/controller/ThermalcompanyController.java index a2d5513..f517ed8 100644 --- a/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/heating/controller/ThermalcompanyController.java +++ b/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/heating/controller/ThermalcompanyController.java @@ -1,18 +1,28 @@ package org.jeecg.modules.heating.controller; +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import io.swagger.annotations.ApiOperation; import lombok.extern.slf4j.Slf4j; +import org.apache.shiro.authz.annotation.RequiresPermissions; import org.jeecg.common.api.vo.Result; +import org.jeecg.common.aspect.annotation.AutoLog; import org.jeecg.common.system.base.controller.JeecgController; +import org.jeecg.common.system.query.QueryGenerator; +import org.jeecg.common.system.query.QueryRuleEnum; import org.jeecg.modules.heating.entity.Heatanalysis; import org.jeecg.modules.heating.entity.Thermalcompany; import org.jeecg.modules.heating.service.*; import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.web.bind.annotation.GetMapping; -import org.springframework.web.bind.annotation.RequestMapping; -import org.springframework.web.bind.annotation.RestController; +import org.springframework.web.bind.annotation.*; import org.springframework.web.servlet.ModelAndView; import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; +import java.util.Arrays; +import java.util.HashMap; import java.util.List; +import java.util.Map; @Slf4j @RestController @@ -36,4 +46,132 @@ public class ThermalcompanyController extends JeecgController> queryPageList(Thermalcompany thermalcompany, + @RequestParam(name="pageNo", defaultValue="1") Integer pageNo, + @RequestParam(name="pageSize", defaultValue="10") Integer pageSize, + HttpServletRequest req) { + // 自定义查询规则 + Map customeRuleMap = new HashMap<>(); + // 自定义多选的查询规则为:LIKE_WITH_OR + customeRuleMap.put("companyType", QueryRuleEnum.LIKE_WITH_OR); + QueryWrapper queryWrapper = QueryGenerator.initQueryWrapper(thermalcompany, req.getParameterMap(),customeRuleMap); + Page page = new Page(pageNo, pageSize); + IPage pageList = thermalcompanyService.page(page, queryWrapper); + return Result.OK(pageList); + } + + /** + * 添加 + * + * @param thermalcompany + * @return + */ + @AutoLog(value = "热力公司-添加") + @ApiOperation(value="热力公司-添加", notes="热力公司-添加") + @RequiresPermissions("heating:bl_thermalcompany:add") + @PostMapping(value = "/add") + public Result add(@RequestBody Thermalcompany thermalcompany) { + thermalcompanyService.save(thermalcompany); + return Result.OK("添加成功!"); + } + + /** + * 编辑 + * + * @param thermalcompany + * @return + */ + @AutoLog(value = "热力公司-编辑") + @ApiOperation(value="热力公司-编辑", notes="热力公司-编辑") + @RequiresPermissions("heating:bl_thermalcompany:edit") + @RequestMapping(value = "/edit", method = {RequestMethod.PUT,RequestMethod.POST}) + public Result edit(@RequestBody Thermalcompany thermalcompany) { + thermalcompanyService.updateById(thermalcompany); + return Result.OK("编辑成功!"); + } + + /** + * 通过id删除 + * + * @param id + * @return + */ + @AutoLog(value = "热力公司-通过id删除") + @ApiOperation(value="热力公司-通过id删除", notes="热力公司-通过id删除") + @RequiresPermissions("heating:bl_thermalcompany:delete") + @DeleteMapping(value = "/delete") + public Result delete(@RequestParam(name="id",required=true) String id) { + thermalcompanyService.removeById(id); + return Result.OK("删除成功!"); + } + + /** + * 批量删除 + * + * @param ids + * @return + */ + @AutoLog(value = "热力公司-批量删除") + @ApiOperation(value="热力公司-批量删除", notes="热力公司-批量删除") + @RequiresPermissions("heating:bl_thermalcompany:deleteBatch") + @DeleteMapping(value = "/deleteBatch") + public Result deleteBatch(@RequestParam(name="ids",required=true) String ids) { + this.thermalcompanyService.removeByIds(Arrays.asList(ids.split(","))); + return Result.OK("批量删除成功!"); + } + + /** + * 通过id查询 + * + * @param id + * @return + */ + //@AutoLog(value = "热力公司-通过id查询") + @ApiOperation(value="热力公司-通过id查询", notes="热力公司-通过id查询") + @GetMapping(value = "/queryById") + public Result queryById(@RequestParam(name="id",required=true) String id) { + Thermalcompany thermalcompany = thermalcompanyService.getById(id); + if(thermalcompany==null) { + return Result.error("未找到对应数据"); + } + return Result.OK(thermalcompany); + } + + /** + * 导出excel + * + * @param request + * @param thermalcompany + */ + @RequiresPermissions("heating:bl_thermalcompany:exportXls") + @RequestMapping(value = "/exportXls") + public ModelAndView exportXls(HttpServletRequest request, Thermalcompany thermalcompany) { + return super.exportXls(request, thermalcompany, Thermalcompany.class, "热力公司"); + } + + /** + * 通过excel导入数据 + * + * @param request + * @param response + * @return + */ + @RequiresPermissions("heating:bl_thermalcompany:importExcel") + @RequestMapping(value = "/importExcel", method = RequestMethod.POST) + public Result importExcel(HttpServletRequest request, HttpServletResponse response) { + return super.importExcel(request, response, Thermalcompany.class); + } + } diff --git a/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/heating/entity/Heatanalysis.java b/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/heating/entity/Heatanalysis.java index b38284e..5e02159 100644 --- a/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/heating/entity/Heatanalysis.java +++ b/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/heating/entity/Heatanalysis.java @@ -15,7 +15,7 @@ import org.springframework.format.annotation.DateTimeFormat; *

功能描述:功能描述 */ @Data -@TableName("heatanalysis") +@TableName("bl_heatanalysis") public class Heatanalysis extends JeecgEntity { private static final long serialVersionUID = 1L; diff --git a/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/heating/entity/HeatanalysisHistory.java b/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/heating/entity/HeatanalysisHistory.java new file mode 100644 index 0000000..5071eab --- /dev/null +++ b/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/heating/entity/HeatanalysisHistory.java @@ -0,0 +1,92 @@ +package org.jeecg.modules.heating.entity; + +import com.baomidou.mybatisplus.annotation.FieldStrategy; +import com.baomidou.mybatisplus.annotation.TableField; +import com.baomidou.mybatisplus.annotation.TableName; +import lombok.Data; +import org.jeecg.common.system.base.entity.JeecgEntity; +import org.jeecgframework.poi.excel.annotation.Excel; +import org.springframework.format.annotation.DateTimeFormat; + +import java.util.Date; + +/** + *

Class :管网温压检测Entity + *

功能描述:功能描述 + */ +@Data +@TableName("bl_heatanalysis_YYMM") +public class HeatanalysisHistory extends JeecgEntity { + + private static final long serialVersionUID = 1L; + + @TableField(exist = false) + @Excel(name="热力公司", width = 15) + private String view001Name;//公司名称 + @TableField(exist = false) + @Excel(name="热源名称", width = 15) + private String view002Name;//热源名称 + @TableField(exist = false) + private String view003Name;//热源所名称 + @TableField(exist = false) + @Excel(name="换热站名称", width = 15) + private String view004Name;//热力站名称 + + private Integer view001; // 热力公司 + private Integer view002; // 热源站 + private String view003; // 热源所 + private String view004; // 换热站 + @Excel(name = "数据时间", width = 20, format = "yyyy-MM-dd HH:mm:ss") + @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") + @TableField(updateStrategy = FieldStrategy.IGNORED) + private Date datatime; // 数据时间 + private Integer caveat; // caveat + @Excel(name="一次供水温度", width = 15) + private String view005; // 一次供水温度 + @Excel(name="一次回水温度", width = 15) + private String view006; // 一次回水温度 + @Excel(name="一次供水压力", width = 15) + private String view007; // 一次供水压力 + @Excel(name="一次回水压力", width = 15) + private String view008; // 一次回水压力 + @Excel(name="二次供水温度", width = 15) + private String view009; // 二次供水温度 + @Excel(name="二次回水温度", width = 15) + private String view010; // 二次回水温度 + @Excel(name="二次供水压力", width = 15) + private String view011; // 二次供水压力 + @Excel(name="二次回水压力", width = 15) + private String view012; // 二次回水压力 + private String view013; // view013 + private String view014; // view014 + private String view015; // view015 + private String view016; // view016 + private String view017; // view017 + private String view018; // view018 + private String view019; // view019 + private String view020; // view020 + private String view021; // view021 + private String view022; // view022 + private String view023; // view023 + private String view024; // view024 + private String view025; // view025 + private String view026; // view026 + private String view027; // view027 + private String view028; // view028 + private String view029; // view029 + private String view030; // view030 + private String sim; // sim + private String code; // code + private Integer reportType;//数据采集类型 1设备自动上报 2定时模拟 + @TableField(exist = false) + private Date SDate;//开始时间 + @TableField(exist = false) + private Date EDate;//结束时间 + @TableField(exist = false) + private String tableName;//表名字 + private String delFlag; // 删除标识 + @TableField(exist = false) + private String startDate;//开始时间 + @TableField(exist = false) + private String endDate;//结束时间 +} \ No newline at end of file diff --git a/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/heating/entity/Heatsource.java b/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/heating/entity/Heatsource.java index a85bc1b..21659f7 100644 --- a/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/heating/entity/Heatsource.java +++ b/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/heating/entity/Heatsource.java @@ -1,65 +1,128 @@ package org.jeecg.modules.heating.entity; +import java.io.Serializable; import java.util.Date; -import com.baomidou.mybatisplus.annotation.TableField; -import com.baomidou.mybatisplus.annotation.TableName; + +import com.baomidou.mybatisplus.annotation.*; +import com.fasterxml.jackson.annotation.JsonFormat; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; import lombok.Data; -import org.jeecg.common.system.base.entity.JeecgEntity; +import lombok.EqualsAndHashCode; +import lombok.experimental.Accessors; +import org.jeecg.common.aspect.annotation.Dict; import org.jeecgframework.poi.excel.annotation.Excel; +import org.springframework.format.annotation.DateTimeFormat; /** *

Class :热源信息管理Entity *

功能描述:功能描述 */ @Data -@TableName("heatsource") -public class Heatsource extends JeecgEntity { - +@TableName("bl_heatsource") +@Accessors(chain = true) +@EqualsAndHashCode(callSuper = false) +@ApiModel(value="bl_heatsource对象", description="热力源") +public class Heatsource implements Serializable { private static final long serialVersionUID = 1L; - @Excel(name="锅炉规格", width = 15) - private String boilerCapacity; // 锅炉规格 - @Excel(name="锅炉类型", dicCode="h_boiler_type" ,width = 15) - private String boilerType; // 锅炉类型 - @Excel(name="联系人", width = 15) - private String dutyPeople; // 联系人 - @Excel(name="流量回下限", width = 15) - private String llcomeDown; // 流量回下限 - @Excel(name="流量回上限", width = 15) - private String llcomeUp; // 流量回上限 - @Excel(name="流量入下限", width = 15) - private String llgoDown; // 流量入下限 - @Excel(name="流量入上限", width = 15) - private String llgoUp; // 流量入上限 - @Excel(name="建设时间", width = 20, format = "yyyy-MM-dd HH:mm:ss") - private Date setupTime; // 建设时间 - @Excel(name="热源名称", width = 15) - private String sourceName; // 热源名称 - @Excel(name="联系电话", width = 15) - private String sourcePhone; // 联系电话 - @Excel(name="热源类型", width = 15) - private String sourceType; // 热源类型 - @Excel(name="热力回下限", width = 15) - private String wdcomeDown; // 热力回下限 - @Excel(name="热力回上限", width = 15) - private String wdcomeUp; // 热力回上限 - @Excel(name="热力入下限", width = 15) - private String wdgoDown; // 热力入下限 - @Excel(name="热力入上限", width = 15) - private String wdgoUp; // 热力入上限 - @Excel(name="压力回下限", width = 15) - private String ylcomeDown; // 压力回下限 - @Excel(name="压力回上限", width = 15) - private String ylcomeUp; // 压力回上限 - @Excel(name="压力入下限", width = 15) - private String ylgoDown; // 压力入下限 - @Excel(name="压力入上限", width = 15) - private String ylgoUp; // 压力入上限 - @Excel(name="所属公司", width = 15) - private String company; // 所属公司 - @Excel(name="公司名称", width = 15) - private String companyName; // 公司名称 - @Excel(name="公司ID", width = 15) - private Integer companyId; // 公司ID + + /**主键*/ + @TableId(type = IdType.AUTO) + @ApiModelProperty(value = "主键") + private Integer id; + /**锅炉规格*/ + @Excel(name = "锅炉规格", width = 15) + @ApiModelProperty(value = "锅炉规格") + private Double boilerCapacity; + /**锅炉类型*/ + @Excel(name = "锅炉类型", width = 15) + @ApiModelProperty(value = "锅炉类型") + @Dict(dicCode = "h_boiler_type") + private String boilerType; + /**联系人*/ + @Excel(name = "联系人", width = 15) + @ApiModelProperty(value = "联系人") + private String dutyPeople; + /**流量回下限*/ + @Excel(name = "流量回下限", width = 15) + @ApiModelProperty(value = "流量回下限") + private String llcomeDown; + /**流量回上限*/ + @Excel(name = "流量回上限", width = 15) + @ApiModelProperty(value = "流量回上限") + private String llcomeUp; + /**流量入下限*/ + @Excel(name = "流量入下限", width = 15) + @ApiModelProperty(value = "流量入下限") + private String llgoDown; + /**流量入上限*/ + @Excel(name = "流量入上限", width = 15) + @ApiModelProperty(value = "流量入上限") + private String llgoUp; + /**建设时间*/ + @Excel(name = "建设时间", width = 15, format = "yyyy-MM-dd") + @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd") + @DateTimeFormat(pattern="yyyy-MM-dd") + @ApiModelProperty(value = "建设时间") + private Date setupTime; + /**热源名称*/ + @Excel(name = "热源名称", width = 15) + @ApiModelProperty(value = "热源名称") + private String sourceName; + /**联系电话*/ + @Excel(name = "联系电话", width = 15) + @ApiModelProperty(value = "联系电话") + private String sourcePhone; + /**热源类型*/ + @Excel(name = "热源类型", width = 15) + @ApiModelProperty(value = "热源类型") + @Dict(dicCode = "h_source_type") + private String sourceType; + /**热力回下限*/ + @Excel(name = "热力回下限", width = 15) + @ApiModelProperty(value = "热力回下限") + private String wdcomeDown; + /**热力回上限*/ + @Excel(name = "热力回上限", width = 15) + @ApiModelProperty(value = "热力回上限") + private String wdcomeUp; + /**热力入下限*/ + @Excel(name = "热力入下限", width = 15) + @ApiModelProperty(value = "热力入下限") + private String wdgoDown; + /**热力入上限*/ + @Excel(name = "热力入上限", width = 15) + @ApiModelProperty(value = "热力入上限") + private String wdgoUp; + /**压力回下限*/ + @Excel(name = "压力回下限", width = 15) + @ApiModelProperty(value = "压力回下限") + private String ylcomeDown; + /**压力回上限*/ + @Excel(name = "压力回上限", width = 15) + @ApiModelProperty(value = "压力回上限") + private String ylcomeUp; + /**压力入下限*/ + @Excel(name = "压力入下限", width = 15) + @ApiModelProperty(value = "压力入下限") + private String ylgoDown; + /**压力入上限*/ + @Excel(name = "压力入上限", width = 15) + @ApiModelProperty(value = "压力入上限") + private String ylgoUp; + /**所属公司*/ + @Excel(name = "所属公司", width = 15) + @ApiModelProperty(value = "所属公司") + private Integer company; + /**公司名称*/ + @Excel(name = "公司名称", width = 15) + @ApiModelProperty(value = "公司名称") + private String companyName; + /**公司ID*/ + @Excel(name = "公司ID", width = 15, dictTable = "bl_thermalcompany", dicText = "company_name", dicCode = "id") + @Dict(dictTable = "bl_thermalcompany", dicText = "company_name", dicCode = "id") + @ApiModelProperty(value = "公司ID") + private String companyId; @TableField(exist = false) private String companyNameView;//公司名称 private String sourceImage;//热源图片 @@ -75,7 +138,7 @@ public class Heatsource extends JeecgEntity { private String secondarynet; //二次网 private String boilernum; //锅炉数量 private String tonnage; //吨位 - private String tonnageTwo; + private String tonnageTwo; //锅炉吨位2 @TableField(exist = false) private String stationName; @TableField(exist = false) @@ -84,7 +147,29 @@ public class Heatsource extends JeecgEntity { private String datatime; @TableField(exist = false) private String supplyBuild; - + @Excel(name = "删除标识", width = 15) + @ApiModelProperty(value = "删除标识") + @TableLogic private String delFlag; // 删除标识 + /**创建人*/ + @ApiModelProperty(value = "创建人") + private String createBy; + /**创建时间*/ + @Excel(name = "创建时间", width = 15, format = "yyyy-MM-dd") + @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd") + @DateTimeFormat(pattern="yyyy-MM-dd") + @ApiModelProperty(value = "创建时间") + private Date createDate; + /**更改人*/ + @ApiModelProperty(value = "更改人") + private String updateBy; + /**更改时间*/ + @Excel(name = "更改时间", width = 15, format = "yyyy-MM-dd") + @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd") + @DateTimeFormat(pattern="yyyy-MM-dd") + @ApiModelProperty(value = "更改时间") + private Date updateDate; + @TableField(exist = false) + private String typeFlag; // 类型标识 1热源 2换热站 } \ No newline at end of file diff --git a/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/heating/entity/Heatsourcestation.java b/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/heating/entity/Heatsourcestation.java index 2c931fb..e63b8b9 100644 --- a/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/heating/entity/Heatsourcestation.java +++ b/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/heating/entity/Heatsourcestation.java @@ -1,21 +1,40 @@ package org.jeecg.modules.heating.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 com.fasterxml.jackson.annotation.JsonFormat; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; import lombok.Data; + +import java.io.Serializable; import java.util.Date; + +import lombok.EqualsAndHashCode; +import lombok.experimental.Accessors; +import org.jeecg.common.aspect.annotation.Dict; import org.jeecg.common.system.base.entity.JeecgEntity; import org.jeecgframework.poi.excel.annotation.Excel; +import org.springframework.format.annotation.DateTimeFormat; /** *

Class :热力站点管理Entity *

功能描述:功能描述 */ @Data -@TableName("heatsourcestation") -public class Heatsourcestation extends JeecgEntity { - +@TableName("bl_heatsourcestation") +@Accessors(chain = true) +@EqualsAndHashCode(callSuper = false) +@ApiModel(value="bl_heatsourcestation对象", description="热力站") +public class Heatsourcestation implements Serializable { private static final long serialVersionUID = 1L; + + /**主键*/ + @TableId(type = IdType.AUTO) + @ApiModelProperty(value = "主键") + private java.lang.Integer id; @Excel(name="流量回下线", width = 15) private Double llcomeDown; // 流量回下线 @Excel(name="流量回上线", width = 15) @@ -42,8 +61,11 @@ public class Heatsourcestation extends JeecgEntity { private Double ylgoUp; // 压力入上线 @Excel(name="联系人", width = 15) private String dutyPeople; // 联系人 - @Excel(name="建设时间", width = 20, format = "yyyy-MM-dd HH:mm:ss") - private Date setupTime; // 建设时间 + @Excel(name = "建设时间", width = 15, format = "yyyy-MM-dd") + @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd") + @DateTimeFormat(pattern="yyyy-MM-dd") + @ApiModelProperty(value = "建设时间") + private java.util.Date setupTime; @Excel(name="换热站地址", width = 15) private String stationAddress; // 换热站地址 @Excel(name="换热站名称", width = 15) @@ -57,11 +79,13 @@ public class Heatsourcestation extends JeecgEntity { @Excel(name="热力", width = 15) private String substation; // 热力 @Excel(name="公司ID", width = 15) - private Integer companyId; // 公司ID + @Dict(dictTable = "bl_thermalcompany", dicText = "company_name", dicCode = "id") + private String companyId; // 公司ID @Excel(name="公司名称", width = 15) private String companyName; // 公司名称 @Excel(name="热源ID", width = 15) - private Integer sourceId; // 热源ID + @Dict(dictTable = "bl_heatsource", dicText = "source_name", dicCode = "id") + private String sourceId; // 热源ID @Excel(name="热源名称", width = 15) private String sourceName; // 热源名称 @Excel(name="热力ID", width = 15) @@ -76,6 +100,8 @@ public class Heatsourcestation extends JeecgEntity { private String substationNameView;//热力分所名称 private String sourcestationImage;//热力站图片 private String treeId; //树形ID - private String supplybuild; //所供楼宇 + private String supplyBuild; //所供楼宇 private String delFlag; // 删除标识 + @TableField(exist = false) + private String typeFlag; // 类型标识 1热源 2换热站 } \ No newline at end of file diff --git a/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/heating/entity/Markinfo.java b/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/heating/entity/Markinfo.java new file mode 100644 index 0000000..27404b4 --- /dev/null +++ b/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/heating/entity/Markinfo.java @@ -0,0 +1,75 @@ +package org.jeecg.modules.heating.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 com.fasterxml.jackson.annotation.JsonFormat; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.experimental.Accessors; +import org.jeecg.common.system.base.entity.JeecgEntity; +import org.jeecgframework.poi.excel.annotation.Excel; +import org.springframework.format.annotation.DateTimeFormat; + +import java.io.Serializable; +import java.util.Date; + +/** + *

Class:地图标注信息Entity + *

功能描述:功能描述 + */ +@Data +@TableName("bl_markinfo") +@Accessors(chain = true) +@EqualsAndHashCode(callSuper = false) +@ApiModel(value="bl_markinfo对象", description="地图标注信息") +public class Markinfo implements Serializable { + + private static final long serialVersionUID = 1L; + /** + * ID + */ + @TableId(type = IdType.ASSIGN_ID) + @ApiModelProperty(value = "ID") + private java.lang.String id; + private String description; // 描述 + private String latitude; // 纬度 + private String longitude; // 经度 + private String name; // 热源的名称 + @TableField(exist = false) + private String stationId; // 热源的id + private String delFlag; // 删除标识 + private String typeFlag; // 类型标识 1热源 2换热站 + /**创建人*/ + @ApiModelProperty(value = "创建人") + private String createBy; + /**创建时间*/ + @Excel(name = "创建时间", width = 15, format = "yyyy-MM-dd") + @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd") + @DateTimeFormat(pattern="yyyy-MM-dd") + @ApiModelProperty(value = "创建时间") + private Date createDate; + /**更改人*/ + @ApiModelProperty(value = "更改人") + private String updateBy; + /**更改时间*/ + @Excel(name = "更改时间", width = 15, format = "yyyy-MM-dd") + @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd") + @DateTimeFormat(pattern="yyyy-MM-dd") + @ApiModelProperty(value = "更改时间") + private Date updateDate; + + @TableField(exist = false) + private String heatSourceId; // 热源的id + @TableField(exist = false) + private String heatSourceName; // 热源的名称 + + @TableField(exist = false) + private String heatStationId; // 热站的id + @TableField(exist = false) + private String heatStationName; // 热站的名称 + +} \ No newline at end of file diff --git a/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/heating/entity/Simconfig.java b/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/heating/entity/Simconfig.java new file mode 100644 index 0000000..f48dda3 --- /dev/null +++ b/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/heating/entity/Simconfig.java @@ -0,0 +1,103 @@ +package org.jeecg.modules.heating.entity; + +import java.io.Serializable; +import java.util.Date; + +import com.baomidou.mybatisplus.annotation.*; +import lombok.Data; +import com.fasterxml.jackson.annotation.JsonFormat; +import org.jeecg.common.aspect.annotation.Dict; +import org.springframework.format.annotation.DateTimeFormat; +import org.jeecgframework.poi.excel.annotation.Excel; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.EqualsAndHashCode; +import lombok.experimental.Accessors; + +/** + * @Description: 设备信息管理 + * @Author: jeecg-boot + * @Date: 2025-04-09 + * @Version: V1.0 + */ +@Data +@TableName("bl_simconfig") +@Accessors(chain = true) +@EqualsAndHashCode(callSuper = false) +@ApiModel(value="bl_simconfig对象", description="设备信息管理") +public class Simconfig implements Serializable { + private static final long serialVersionUID = 1L; + + /**主键*/ + @TableId(type = IdType.AUTO) + @ApiModelProperty(value = "主键") + private Integer id; + /**手机号*/ + @Excel(name = "手机号", width = 15) + @ApiModelProperty(value = "手机号") + private String sim; + /**注册设备时间*/ + @Excel(name = "注册设备时间", width = 15, format = "yyyy-MM-dd") + @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd") + @DateTimeFormat(pattern="yyyy-MM-dd") + @ApiModelProperty(value = "注册设备时间") + private Date occurtime; + /**公司名称*/ + @Excel(name = "公司名称", width = 15) + @ApiModelProperty(value = "公司名称") + @Dict(dictTable = "bl_thermalcompany", dicText = "company_name", dicCode = "id") + private Integer companyCompanyId; + @TableField(exist = false) + private String companyId; + @TableField(exist = false) + private String companyName; + /**热源名称*/ + @Excel(name = "热源名称", width = 15) + @ApiModelProperty(value = "热源名称") + @Dict(dictTable = "bl_heatsource", dicText = "source_name", dicCode = "id") + private Integer sourceSourceId; + @TableField(exist = false) + private String sourceId; + @TableField(exist = false) + private String sourceName; + /**换热站名称*/ + @Excel(name = "换热站名称", width = 15) + @ApiModelProperty(value = "换热站名称") + @Dict(dictTable = "bl_heatsourcestation", dicText = "station_name", dicCode = "id") + private Integer stationStationId; + @TableField(exist = false) + private String stationId; + @TableField(exist = false) + private String stationName; + /**热力分所名称*/ + @Excel(name = "热力分所名称", width = 15) + @ApiModelProperty(value = "热力分所名称") + private Integer substationId; + /**创建者*/ + @ApiModelProperty(value = "创建者") + private String createBy; + /**创建时间*/ + @Excel(name = "创建时间", width = 15, format = "yyyy-MM-dd") + @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd") + @DateTimeFormat(pattern="yyyy-MM-dd") + @ApiModelProperty(value = "创建时间") + private Date createDate; + /**更改者*/ + @ApiModelProperty(value = "更改者") + private String updateBy; + /**更改时间*/ + @Excel(name = "更改时间", width = 15, format = "yyyy-MM-dd") + @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd") + @DateTimeFormat(pattern="yyyy-MM-dd") + @ApiModelProperty(value = "更改时间") + private Date updateDate; + /**删除标识*/ + @Excel(name = "删除标识", width = 15) + @ApiModelProperty(value = "删除标识") + @TableLogic + private String delFlag; + /**设备代码*/ + @Excel(name = "设备代码", width = 15) + @ApiModelProperty(value = "设备代码") + private String code; +} diff --git a/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/heating/entity/Substation.java b/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/heating/entity/Substation.java index 1f5f627..1371f78 100644 --- a/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/heating/entity/Substation.java +++ b/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/heating/entity/Substation.java @@ -12,7 +12,7 @@ import org.jeecgframework.poi.excel.annotation.Excel; *

功能描述:功能描述 */ @Data -@TableName("substation") +@TableName("bl_substation") public class Substation extends JeecgEntity { private static final long serialVersionUID = 1L; diff --git a/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/heating/entity/Thermalcompany.java b/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/heating/entity/Thermalcompany.java index 2b270fc..5bfad6e 100644 --- a/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/heating/entity/Thermalcompany.java +++ b/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/heating/entity/Thermalcompany.java @@ -1,59 +1,144 @@ package org.jeecg.modules.heating.entity; +import com.baomidou.mybatisplus.annotation.IdType; +import com.baomidou.mybatisplus.annotation.TableId; +import com.baomidou.mybatisplus.annotation.TableLogic; import com.baomidou.mybatisplus.annotation.TableName; +import com.fasterxml.jackson.annotation.JsonFormat; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; import lombok.Data; + +import java.io.Serializable; import java.util.Date; + +import lombok.EqualsAndHashCode; +import lombok.experimental.Accessors; +import org.jeecg.common.aspect.annotation.Dict; import org.jeecg.common.system.base.entity.JeecgEntity; import org.jeecgframework.poi.excel.annotation.Excel; +import org.springframework.format.annotation.DateTimeFormat; /** *

Class :热力公司配置Entity *

功能描述:功能描述 */ @Data -@TableName("thermalcompany") -public class Thermalcompany extends JeecgEntity { - +@TableName("bl_thermalcompany") +@Accessors(chain = true) +@EqualsAndHashCode(callSuper = false) +@ApiModel(value="bl_thermalcompany对象", description="热力公司") +public class Thermalcompany implements Serializable { private static final long serialVersionUID = 1L; - @Excel(name="换热站个数", width = 15) - private Integer barterHeat; // 换热站个数 - @Excel(name="锅炉房个数", width = 15) - private Integer boilerHouse; // 锅炉房个数 - @Excel(name="公司地址", width = 15) - private String companyAddress; // 公司地址 - @Excel(name="公司名称", width = 15) - private String companyName; // 公司名称 - @Excel(name="电话", width = 15) - private String companyPhone; // 电话 - @Excel(name="公司类型", width = 15) - private String companyType; // 公司类型 - @Excel(name="其中直供个数", width = 15) - private Integer direct; // 其中直供个数 - @Excel(name="供热总户数", width = 15) - private Integer doorsum; // 供热总户数 - @Excel(name="管线长度", width = 15) - private Double ductLength; // 管线长度 - @Excel(name="负责人", width = 15) - private String dutyPeople; // 负责人 - @Excel(name="供热区域", width = 15) - private String heatArea; // 供热区域 - @Excel(name="拥有热源", width = 15) - private Integer heatSource; // 拥有热源 - @Excel(name="供热面积", width = 15) - private Double heatingArea; // 供热面积 - @Excel(name="其中间供个数", width = 15) - private Integer indirect; // 其中间供个数 - @Excel(name="非居民热费价格", width = 15) - private Double nonresidentPrice; // 非居民热费价格 - @Excel(name="十五年以上管网", width = 15) - private Double old15Length; // 十五年以上管网 - @Excel(name="居民热费价格", width = 15) - private Double residentPrice; // 居民热费价格 - @Excel(name = "成立时间", width = 20, format = "yyyy-MM-dd HH:mm:ss") - private Date setupTime; // 成立时间 - @Excel(name="删除标识", width = 15) - private String delFlag; // 删除标识 - private String treeId; //排序ID - private String orderId; - + + /**主键*/ + @TableId(type = IdType.AUTO) + @ApiModelProperty(value = "主键") + private java.lang.Integer id; + /**换热站个数*/ + @Excel(name = "换热站个数", width = 15) + @ApiModelProperty(value = "换热站个数") + private java.lang.Integer barterHeat; + /**锅炉房个数*/ + @Excel(name = "锅炉房个数", width = 15) + @ApiModelProperty(value = "锅炉房个数") + private java.lang.Integer boilerHouse; + /**公司地址*/ + @Excel(name = "公司地址", width = 15) + @ApiModelProperty(value = "公司地址") + private java.lang.String companyAddress; + /**公司名称*/ + @Excel(name = "公司名称", width = 15) + @ApiModelProperty(value = "公司名称") + private java.lang.String companyName; + /**电话*/ + @Excel(name = "电话", width = 15) + @ApiModelProperty(value = "电话") + private java.lang.String companyPhone; + /**公司类型*/ + @Excel(name = "公司类型", width = 15, dicCode = "h_company_type") + @Dict(dicCode = "h_company_type") + @ApiModelProperty(value = "公司类型") + private java.lang.String companyType; + /**其中直供个数*/ + @Excel(name = "其中直供个数", width = 15) + @ApiModelProperty(value = "其中直供个数") + private java.lang.Integer direct; + /**供热总户数*/ + @Excel(name = "供热总户数", width = 15) + @ApiModelProperty(value = "供热总户数") + private java.lang.Integer doorsum; + /**管线长度*/ + @Excel(name = "管线长度", width = 15) + @ApiModelProperty(value = "管线长度") + private java.lang.Double ductLength; + /**负责人*/ + @Excel(name = "负责人", width = 15) + @ApiModelProperty(value = "负责人") + private java.lang.String dutyPeople; + /**供热区域*/ + @Excel(name = "供热区域", width = 15) + @ApiModelProperty(value = "供热区域") + private java.lang.String heatArea; + /**拥有热源*/ + @Excel(name = "拥有热源", width = 15) + @ApiModelProperty(value = "拥有热源") + private java.lang.Integer heatSource; + /**供热面积*/ + @Excel(name = "供热面积", width = 15) + @ApiModelProperty(value = "供热面积") + private java.lang.Double heatingArea; + /**其中间供个数*/ + @Excel(name = "其中间供个数", width = 15) + @ApiModelProperty(value = "其中间供个数") + private java.lang.Integer indirect; + /**非居民热费价格*/ + @Excel(name = "非居民热费价格", width = 15) + @ApiModelProperty(value = "非居民热费价格") + private java.lang.Double nonresidentPrice; + /**十五年以上管网*/ + @Excel(name = "十五年以上管网", width = 15) + @ApiModelProperty(value = "十五年以上管网") + private java.lang.Double old15Length; + /**居民热费价格*/ + @Excel(name = "居民热费价格", width = 15) + @ApiModelProperty(value = "居民热费价格") + private java.lang.Double residentPrice; + /**成立时间*/ + @Excel(name = "成立时间", width = 15, format = "yyyy-MM-dd") + @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd") + @DateTimeFormat(pattern="yyyy-MM-dd") + @ApiModelProperty(value = "成立时间") + private java.util.Date setupTime; + /**创建人*/ + @ApiModelProperty(value = "创建人") + private java.lang.String createBy; + /**创建时间*/ + @Excel(name = "创建时间", width = 15, format = "yyyy-MM-dd") + @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd") + @DateTimeFormat(pattern="yyyy-MM-dd") + @ApiModelProperty(value = "创建时间") + private java.util.Date createDate; + /**更改人*/ + @ApiModelProperty(value = "更改人") + private java.lang.String updateBy; + /**更改时间*/ + @Excel(name = "更改时间", width = 15, format = "yyyy-MM-dd") + @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd") + @DateTimeFormat(pattern="yyyy-MM-dd") + @ApiModelProperty(value = "更改时间") + private java.util.Date updateDate; + /**删除标识*/ + @Excel(name = "删除标识", width = 15) + @ApiModelProperty(value = "删除标识") + @TableLogic + private java.lang.String delFlag; + /**树形ID*/ + @Excel(name = "树形ID", width = 15) + @ApiModelProperty(value = "树形ID") + private java.lang.String treeId; + /**排序ID*/ + @Excel(name = "排序ID", width = 15) + @ApiModelProperty(value = "排序ID") + private java.lang.Integer orderId; } \ No newline at end of file diff --git a/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/heating/mapper/HeatanalysisHistoryMapper.java b/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/heating/mapper/HeatanalysisHistoryMapper.java new file mode 100644 index 0000000..9257980 --- /dev/null +++ b/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/heating/mapper/HeatanalysisHistoryMapper.java @@ -0,0 +1,13 @@ +package org.jeecg.modules.heating.mapper; + +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import org.apache.ibatis.annotations.Param; +import org.jeecg.modules.heating.entity.HeatanalysisHistory; + +import java.util.List; + +public interface HeatanalysisHistoryMapper extends BaseMapper { + Page findPage(Page page, @Param("params") HeatanalysisHistory heatanalysisHistory); + List findHistoryList(HeatanalysisHistory heatanalysisHistory); +} diff --git a/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/heating/mapper/HeatsourcestationMapper.java b/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/heating/mapper/HeatsourcestationMapper.java index f551c34..8c5a221 100644 --- a/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/heating/mapper/HeatsourcestationMapper.java +++ b/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/heating/mapper/HeatsourcestationMapper.java @@ -6,4 +6,6 @@ import java.util.List; public interface HeatsourcestationMapper extends BaseMapper { List findList(Heatsourcestation heatsourcestation); + List findCompanyList(Heatsourcestation heatsourcestation); + List findSourceList(Heatsourcestation heatsourcestation); } diff --git a/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/heating/mapper/MarkinfoMapper.java b/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/heating/mapper/MarkinfoMapper.java new file mode 100644 index 0000000..bb98d2a --- /dev/null +++ b/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/heating/mapper/MarkinfoMapper.java @@ -0,0 +1,13 @@ +package org.jeecg.modules.heating.mapper; + +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import org.jeecg.modules.heating.entity.Markinfo; +import java.util.List; + +public interface MarkinfoMapper extends BaseMapper { + List findList(Markinfo markinfo); + Markinfo getMarkinfo(Markinfo markinfo); + void deleteAll(); + List sourceList(Markinfo markinfo); + List stationList(Markinfo markinfo); +} diff --git a/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/heating/mapper/SimconfigMapper.java b/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/heating/mapper/SimconfigMapper.java new file mode 100644 index 0000000..0451433 --- /dev/null +++ b/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/heating/mapper/SimconfigMapper.java @@ -0,0 +1,18 @@ +package org.jeecg.modules.heating.mapper; + +import java.util.List; +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import org.jeecg.modules.heating.entity.Simconfig; + +/** + * @Description: 设备信息管理 + * @Author: jeecg-boot + * @Date: 2025-04-09 + * @Version: V1.0 + */ +public interface SimconfigMapper extends BaseMapper { + List findCompanyList(Simconfig simconfig); + List findSourceList(Simconfig simconfig); + List findStationList(Simconfig simconfig); + List findSimconfig(Simconfig simconfig); +} diff --git a/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/heating/mapper/xml/DataExtractConfigMapper.xml b/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/heating/mapper/xml/DataExtractConfigMapper.xml index b142ccf..a088898 100644 --- a/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/heating/mapper/xml/DataExtractConfigMapper.xml +++ b/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/heating/mapper/xml/DataExtractConfigMapper.xml @@ -30,10 +30,10 @@ t3.stationId as twoStationId, t3.station as twoStation FROM bl_data_extract_config a - left join simconfig b on a.sim = b.sim - left join thermalcompany tc on tc.id = b.company_company_id - left join heatsource hs on hs.id = b.source_source_id - left join heatsourcestation hss on hss.id = b.station_station_id + left join BL_simconfig b on a.sim = b.sim + left join BL_thermalcompany tc on tc.id = b.company_company_id + left join BL_heatsource hs on hs.id = b.source_source_id + left join BL_heatsourcestation hss on hss.id = b.station_station_id left join ( select b.sim, @@ -43,10 +43,10 @@ hs.source_name as source, b.station_station_id as stationId, hss.station_name as station - from simconfig b - left join thermalcompany tc on tc.id = b.company_company_id - left join heatsource hs on hs.id = b.source_source_id - left join heatsourcestation hss on hss.id = b.station_station_id + from BL_simconfig b + left join BL_thermalcompany tc on tc.id = b.company_company_id + left join BL_heatsource hs on hs.id = b.source_source_id + left join BL_heatsourcestation hss on hss.id = b.station_station_id ) t2 on a.one_pipe_sim = t2.sim left join ( select @@ -57,10 +57,10 @@ hs.source_name as source, b.station_station_id as stationId, hss.station_name as station - from simconfig b - left join thermalcompany tc on tc.id = b.company_company_id - left join heatsource hs on hs.id = b.source_source_id - left join heatsourcestation hss on hss.id = b.station_station_id + from BL_simconfig b + left join BL_thermalcompany tc on tc.id = b.company_company_id + left join BL_heatsource hs on hs.id = b.source_source_id + left join BL_heatsourcestation hss on hss.id = b.station_station_id ) t3 on a.two_pipe_sim = t3.sim diff --git a/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/heating/mapper/xml/HeatanalysisHistoryMapper.xml b/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/heating/mapper/xml/HeatanalysisHistoryMapper.xml new file mode 100644 index 0000000..b824588 --- /dev/null +++ b/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/heating/mapper/xml/HeatanalysisHistoryMapper.xml @@ -0,0 +1,155 @@ + + + + + + + + + \ No newline at end of file diff --git a/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/heating/mapper/xml/HeatanalysisMapper.xml b/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/heating/mapper/xml/HeatanalysisMapper.xml index aa904a6..a085aa4 100644 --- a/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/heating/mapper/xml/HeatanalysisMapper.xml +++ b/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/heating/mapper/xml/HeatanalysisMapper.xml @@ -10,7 +10,7 @@ VIEW007, VIEW008 FROM - HEATANALYSIS + BL_HEATANALYSIS WHERE sim = #{sim} ORDER BY @@ -64,7 +64,7 @@ a.is_extract AS "isExtract", (select count(*) from bl_data_extract_config bl where bl.one_pipe_sim = a.sim or bl.two_pipe_sim = a.sim) as isExtracted, (case when datatime > DATE_ADD(NOW(), INTERVAL -10 MINUTE) then 0 else 1 end) as isTimeout - FROM HEATANALYSIS a + FROM BL_HEATANALYSIS a a.del_flag = '0' @@ -100,6 +100,9 @@ AND a.is_extract = #{params.isExtract} + + AND a.sim = #{params.sim} + ) t @@ -116,7 +119,7 @@ - UPDATE HEATANALYSIS + UPDATE BL_HEATANALYSIS SET report_type = #{reportType} where id = #{id} @@ -138,7 +141,7 @@ a.view008 AS "view008", a.sim AS "sim", a.code - FROM HEATANALYSIS a + FROM BL_HEATANALYSIS a -- INNER JOIN thermalcompany b ON b.id=a.view001 -- INNER JOIN heatsource c ON c.id=a.view002 WHERE @@ -199,7 +202,7 @@ -- d.name AS "view003Name", -- e.station_name AS "view004Name", (select count(*) from bl_data_extract_config bl where bl.one_pipe_sim = a.sim or bl.two_pipe_sim = a.sim) as isExtracted - FROM HEATANALYSIS a + FROM BL_HEATANALYSIS a -- LEFT JOIN thermalcompany b ON b.id=a.view001 -- LEFT JOIN heatsource c ON c.id=a.view002 -- LEFT JOIN substation d ON d.id=a.view003 @@ -244,9 +247,9 @@ b.company_name AS view001Name, count(distinct a.view002) as VIEW005, count(distinct replace(e.station_name,SUBSTR(e.station_name,instr(e.station_name,'('),10),'')) as VIEW006 - FROM HEATANALYSIS a - LEFT JOIN thermalcompany b ON b.id=a.view001 - LEFT JOIN heatsourcestation e ON e.id=a.view004 and e.id != 20 + FROM BL_HEATANALYSIS a + LEFT JOIN BL_thermalcompany b ON b.id=a.view001 + LEFT JOIN BL_heatsourcestation e ON e.id=a.view004 and e.id != 20 where a.del_flag = '0' group by view001,view001Name ORDER BY A.view001 DESC @@ -254,7 +257,7 @@ @@ -271,11 +274,11 @@ ( SELECT VIEW002 SOURCE, VIEW004 STATION, VIEW005 VIEW005, VIEW006 VIEW006 - FROM HEATANALYSIS + FROM BL_HEATANALYSIS WHERE IFNULL(VIEW004, 0) = 0 UNION ALL SELECT VIEW002 SOURCE, VIEW004 STATION, VIEW009 VIEW005, VIEW010 VIEW006 - FROM HEATANALYSIS + FROM BL_HEATANALYSIS WHERE IFNULL(VIEW004, 0) > 0 ) T ORDER BY VIEW005 LIMIT 0, 1 @@ -291,11 +294,11 @@ FROM ( SELECT VIEW002 SOURCE, VIEW004 STATION, VIEW005 VIEW005, VIEW006 VIEW006 - FROM HEATANALYSIS + FROM BL_HEATANALYSIS WHERE IFNULL(VIEW004, 0) = 0 UNION ALL SELECT VIEW002 SOURCE, VIEW004 STATION, VIEW009 VIEW005, VIEW010 VIEW006 - FROM HEATANALYSIS + FROM BL_HEATANALYSIS WHERE IFNULL(VIEW004, 0) > 0 ) T ORDER BY VIEW005 LIMIT 0, 1 @@ -343,7 +346,7 @@ a.view030 AS "view004Name", a.sim AS "sim", a.report_type AS "reportType" - FROM HEATANALYSIS a + FROM BL_HEATANALYSIS a INNER JOIN bl_data_extract_config bl on a.sim = bl.one_pipe_sim and bl.sim = #{params.sim} where a.del_flag = '0' ORDER BY view001 asc ,view002 asc,view004 asc,DATATIME DESC @@ -386,7 +389,7 @@ a.view030 AS "view004Name", a.sim AS "sim", a.report_type AS "reportType" - FROM HEATANALYSIS a + FROM BL_HEATANALYSIS a INNER JOIN bl_data_extract_config bl on a.sim = bl.two_pipe_sim and bl.sim = #{params.sim} where a.del_flag = '0' ORDER BY view001 asc ,view002 asc,view004 asc,DATATIME DESC @@ -429,7 +432,7 @@ a.view030 AS "view004Name", a.sim AS "sim", a.report_type AS "reportType" - FROM HEATANALYSIS a + FROM BL_HEATANALYSIS a INNER JOIN bl_data_extract_config bl on a.sim = bl.sim and bl.one_pipe_sim = #{params.sim} where a.del_flag = '0' ORDER BY view001 asc ,view002 asc,view004 asc,DATATIME DESC @@ -472,7 +475,7 @@ a.view030 AS "view004Name", a.sim AS "sim", a.report_type AS "reportType" - FROM HEATANALYSIS a + FROM BL_HEATANALYSIS a INNER JOIN bl_data_extract_config bl on a.sim = bl.sim and bl.two_pipe_sim = #{params.sim} where a.del_flag = '0' ORDER BY view001 asc ,view002 asc,view004 asc,DATATIME DESC diff --git a/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/heating/mapper/xml/HeatsourceMapper.xml b/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/heating/mapper/xml/HeatsourceMapper.xml index 97f071f..8f810f3 100644 --- a/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/heating/mapper/xml/HeatsourceMapper.xml +++ b/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/heating/mapper/xml/HeatsourceMapper.xml @@ -51,13 +51,13 @@ - LEFT JOIN thermalcompany b ON b.id=a.company_id + LEFT JOIN BL_thermalcompany b ON b.id=a.company_id SELECT - FROM heatsourcestation a + FROM BL_heatsourcestation a a.del_flag = '0' @@ -74,4 +74,41 @@ ORDER BY a.id + + + + + \ No newline at end of file diff --git a/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/heating/mapper/xml/MarkinfoMapper.xml b/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/heating/mapper/xml/MarkinfoMapper.xml new file mode 100644 index 0000000..31f7aac --- /dev/null +++ b/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/heating/mapper/xml/MarkinfoMapper.xml @@ -0,0 +1,101 @@ + + + + + + + + + + DELETE FROM bl_markinfo + + + + + + + \ No newline at end of file diff --git a/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/heating/mapper/xml/SimconfigMapper.xml b/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/heating/mapper/xml/SimconfigMapper.xml new file mode 100644 index 0000000..eec5d5b --- /dev/null +++ b/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/heating/mapper/xml/SimconfigMapper.xml @@ -0,0 +1,58 @@ + + + + + + + + + + + + \ No newline at end of file diff --git a/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/heating/mapper/xml/SubstationMapper.xml b/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/heating/mapper/xml/SubstationMapper.xml index 0a636ff..56c0644 100644 --- a/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/heating/mapper/xml/SubstationMapper.xml +++ b/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/heating/mapper/xml/SubstationMapper.xml @@ -31,14 +31,14 @@ - LEFT JOIN heatsource b ON b.id=a.source_id - LEFT JOIN thermalcompany c ON c.id=b.company_id + LEFT JOIN BL_heatsource b ON b.id=a.source_id + LEFT JOIN BL_thermalcompany c ON c.id=b.company_id SELECT - FROM thermalcompany a + FROM BL_thermalcompany a AND del_flag = '0' diff --git a/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/heating/service/HeatanalysisHistoryService.java b/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/heating/service/HeatanalysisHistoryService.java new file mode 100644 index 0000000..4b2c792 --- /dev/null +++ b/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/heating/service/HeatanalysisHistoryService.java @@ -0,0 +1,13 @@ +package org.jeecg.modules.heating.service; + +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import org.jeecg.common.api.vo.Result; +import org.jeecg.common.system.base.service.JeecgService; +import org.jeecg.modules.heating.entity.HeatanalysisHistory; +import java.util.List; + +public interface HeatanalysisHistoryService extends JeecgService { + IPage findPage(Page page,HeatanalysisHistory heatanalysisHistory); + Result findHistoryList(HeatanalysisHistory heatanalysisHistory); +} diff --git a/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/heating/service/HeatsourceService.java b/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/heating/service/HeatsourceService.java index 14210e9..005408a 100644 --- a/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/heating/service/HeatsourceService.java +++ b/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/heating/service/HeatsourceService.java @@ -1,9 +1,9 @@ package org.jeecg.modules.heating.service; -import org.jeecg.common.system.base.service.JeecgService; +import com.baomidou.mybatisplus.extension.service.IService; import org.jeecg.modules.heating.entity.Heatsource; import java.util.List; -public interface HeatsourceService extends JeecgService { +public interface HeatsourceService extends IService { List findList(Heatsource heatsource); } diff --git a/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/heating/service/HeatsourcestationService.java b/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/heating/service/HeatsourcestationService.java index 9ef009e..b0a8168 100644 --- a/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/heating/service/HeatsourcestationService.java +++ b/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/heating/service/HeatsourcestationService.java @@ -1,9 +1,11 @@ package org.jeecg.modules.heating.service; -import org.jeecg.common.system.base.service.JeecgService; +import com.baomidou.mybatisplus.extension.service.IService; import org.jeecg.modules.heating.entity.Heatsourcestation; import java.util.List; -public interface HeatsourcestationService extends JeecgService { +public interface HeatsourcestationService extends IService { List findList(Heatsourcestation heatsourcestation); + List findCompanyList(Heatsourcestation heatsourcestation); + List findSourceList(Heatsourcestation heatsourcestation); } diff --git a/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/heating/service/MarkinfoService.java b/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/heating/service/MarkinfoService.java new file mode 100644 index 0000000..fb94f1d --- /dev/null +++ b/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/heating/service/MarkinfoService.java @@ -0,0 +1,18 @@ +package org.jeecg.modules.heating.service; + +import com.baomidou.mybatisplus.extension.service.IService; +import org.jeecg.common.api.vo.Result; +import org.jeecg.modules.heating.entity.Markinfo; +import java.util.List; +import java.util.Map; + +public interface MarkinfoService extends IService { + List> queryTree(); + List findList(Markinfo markinfo); + Markinfo getMarkinfo(Markinfo markinfo); + Result getPointInfo(Markinfo markinfo); + void delete(Markinfo markinfo); + void deleteAll(); + List sourceList(Markinfo markinfo); + List stationList(Markinfo markinfo); +} diff --git a/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/heating/service/SimconfigService.java b/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/heating/service/SimconfigService.java new file mode 100644 index 0000000..ca1876c --- /dev/null +++ b/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/heating/service/SimconfigService.java @@ -0,0 +1,19 @@ +package org.jeecg.modules.heating.service; + +import com.baomidou.mybatisplus.extension.service.IService; +import org.jeecg.modules.heating.entity.Simconfig; + +import java.util.List; + +/** + * @Description: 设备信息管理 + * @Author: jeecg-boot + * @Date: 2025-04-09 + * @Version: V1.0 + */ +public interface SimconfigService extends IService { + List findCompanyList(Simconfig simconfig); + List findSourceList(Simconfig simconfig); + List findStationList(Simconfig simconfig); + List findSimconfig(Simconfig simconfig); +} diff --git a/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/heating/service/ThermalcompanyService.java b/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/heating/service/ThermalcompanyService.java index 0ccea28..7eb968a 100644 --- a/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/heating/service/ThermalcompanyService.java +++ b/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/heating/service/ThermalcompanyService.java @@ -1,11 +1,10 @@ package org.jeecg.modules.heating.service; -import org.jeecg.common.system.base.service.JeecgService; -import org.jeecg.modules.heating.entity.Heatanalysis; +import com.baomidou.mybatisplus.extension.service.IService; import org.jeecg.modules.heating.entity.Thermalcompany; import java.util.List; -public interface ThermalcompanyService extends JeecgService { +public interface ThermalcompanyService extends IService { List findList(Thermalcompany thermalcompany); } diff --git a/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/heating/service/impl/DataExtractConfigServiceImpl.java b/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/heating/service/impl/DataExtractConfigServiceImpl.java index 1a6d334..7946e1d 100644 --- a/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/heating/service/impl/DataExtractConfigServiceImpl.java +++ b/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/heating/service/impl/DataExtractConfigServiceImpl.java @@ -1,7 +1,5 @@ package org.jeecg.modules.heating.service.impl; - -import com.baomidou.dynamic.datasource.annotation.DS; import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import org.jeecg.modules.heating.entity.DataExtractConfig; @@ -18,7 +16,6 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; * @Version: V1.0 */ @Service -@DS("multi-datasource1") public class DataExtractConfigServiceImpl extends ServiceImpl implements DataExtractConfigService { public IPage findPage(Page page, DataExtractConfig dataExtractConfig){ diff --git a/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/heating/service/impl/HeatanalysisHistoryServiceImpl.java b/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/heating/service/impl/HeatanalysisHistoryServiceImpl.java new file mode 100644 index 0000000..e4e3512 --- /dev/null +++ b/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/heating/service/impl/HeatanalysisHistoryServiceImpl.java @@ -0,0 +1,98 @@ +package org.jeecg.modules.heating.service.impl; + +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import org.jeecg.common.api.vo.Result; +import org.jeecg.common.system.base.service.impl.JeecgServiceImpl; +import org.jeecg.modules.heating.entity.HeatanalysisHistory; +import org.jeecg.modules.heating.entity.Heatsource; +import org.jeecg.modules.heating.mapper.HeatanalysisHistoryMapper; +import org.jeecg.modules.heating.mapper.HeatsourceMapper; +import org.jeecg.modules.heating.service.HeatanalysisHistoryService; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; + +import java.text.ParseException; +import java.text.SimpleDateFormat; +import java.util.Date; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +@Service +public class HeatanalysisHistoryServiceImpl extends JeecgServiceImpl implements HeatanalysisHistoryService { + + @Autowired + HeatsourceMapper heatsourceMapper; + + public IPage findPage(Page page,HeatanalysisHistory heatanalysisHistory){ + Date sDate = heatanalysisHistory.getSDate(); + String sDateStr = ""; + SimpleDateFormat sdf= new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); + if(sDate!=null){ + sDateStr = sdf.format(sDate); + }else{ + sDateStr = sdf.format(new Date()); + heatanalysisHistory.setSDate(sDate); + } + String tableName = "bl_heatanalysis_"+sDateStr.substring(2, 4)+sDateStr.substring(5, 7); + heatanalysisHistory.setTableName(tableName); + Date eDate = heatanalysisHistory.getEDate(); + if(eDate==null){ + eDate = new Date(); + heatanalysisHistory.setEDate(eDate); + } + return baseMapper.findPage(page,heatanalysisHistory); + } + + public Result findHistoryList(HeatanalysisHistory heatanalysisHistory){ + Map map = new HashMap<>(); + SimpleDateFormat dayFormat = new SimpleDateFormat("yyyy-MM-dd"); + SimpleDateFormat timeFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); + String startDate = heatanalysisHistory.getStartDate(); + if(startDate==null||startDate.equals("")) { + startDate = dayFormat.format(new Date()); + heatanalysisHistory.setStartDate(startDate); + } + if(startDate!=null&&!startDate.equals("")){ + String sDateStr = startDate+" 00:00:00"; + Date sDate = null; + try { + sDate = timeFormat.parse(sDateStr); + } catch (ParseException e) { + e.printStackTrace(); + } + heatanalysisHistory.setSDate(sDate); + } + String tableName = "bl_heatanalysis_"+startDate.substring(2, 4)+startDate.substring(5, 7); + heatanalysisHistory.setTableName(tableName); + String endDate = heatanalysisHistory.getEndDate(); + if(endDate==null||endDate.equals("")) { + endDate = dayFormat.format(new Date()); + heatanalysisHistory.setEndDate(endDate); + } + if(endDate!=null&&!endDate.equals("")){ + String eDateStr = endDate+" 23:59:59"; + Date eDate = null; + try { + eDate = timeFormat.parse(eDateStr); + } catch (ParseException e) { + e.printStackTrace(); + } + heatanalysisHistory.setEDate(eDate); + } + Integer sourceId = heatanalysisHistory.getView002(); + if(sourceId == null){ + List sourceList = heatsourceMapper.findList(null); + if(sourceList.size()>0){ + Heatsource heatsource = sourceList.get(0); + heatanalysisHistory.setView002(heatsource.getId()); + } + } + List list = baseMapper.findHistoryList(heatanalysisHistory); + map.put("data",heatanalysisHistory); + map.put("list",list); + return Result.ok(map); + } + +} diff --git a/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/heating/service/impl/HeatanalysisServiceImpl.java b/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/heating/service/impl/HeatanalysisServiceImpl.java index c0f6d92..29c8d29 100644 --- a/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/heating/service/impl/HeatanalysisServiceImpl.java +++ b/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/heating/service/impl/HeatanalysisServiceImpl.java @@ -1,6 +1,5 @@ package org.jeecg.modules.heating.service.impl; -import com.baomidou.dynamic.datasource.annotation.DS; import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import org.jeecg.common.system.base.service.impl.JeecgServiceImpl; @@ -15,7 +14,6 @@ import java.util.Date; import java.util.List; @Service -@DS("multi-datasource1") public class HeatanalysisServiceImpl extends JeecgServiceImpl implements HeatanalysisService { public Heatanalysis getHeatOne(Heatanalysis heatanalysis) { diff --git a/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/heating/service/impl/HeatsourceServiceImpl.java b/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/heating/service/impl/HeatsourceServiceImpl.java index 9c5ab73..d3dabf7 100644 --- a/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/heating/service/impl/HeatsourceServiceImpl.java +++ b/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/heating/service/impl/HeatsourceServiceImpl.java @@ -1,7 +1,6 @@ package org.jeecg.modules.heating.service.impl; -import com.baomidou.dynamic.datasource.annotation.DS; -import org.jeecg.common.system.base.service.impl.JeecgServiceImpl; +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import org.jeecg.modules.heating.entity.Heatsource; import org.jeecg.modules.heating.mapper.HeatsourceMapper; import org.jeecg.modules.heating.service.HeatsourceService; @@ -11,8 +10,7 @@ import org.springframework.stereotype.Service; import java.util.List; @Service -@DS("multi-datasource1") -public class HeatsourceServiceImpl extends JeecgServiceImpl implements HeatsourceService { +public class HeatsourceServiceImpl extends ServiceImpl implements HeatsourceService { @Autowired HeatsourceMapper mapper; diff --git a/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/heating/service/impl/HeatsourcestationServiceImpl.java b/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/heating/service/impl/HeatsourcestationServiceImpl.java index 735759b..1f26c5d 100644 --- a/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/heating/service/impl/HeatsourcestationServiceImpl.java +++ b/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/heating/service/impl/HeatsourcestationServiceImpl.java @@ -1,7 +1,6 @@ package org.jeecg.modules.heating.service.impl; -import com.baomidou.dynamic.datasource.annotation.DS; -import org.jeecg.common.system.base.service.impl.JeecgServiceImpl; +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import org.jeecg.modules.heating.entity.Heatsourcestation; import org.jeecg.modules.heating.mapper.HeatsourcestationMapper; import org.jeecg.modules.heating.service.HeatsourcestationService; @@ -10,8 +9,7 @@ import org.springframework.stereotype.Service; import java.util.List; @Service -@DS("multi-datasource1") -public class HeatsourcestationServiceImpl extends JeecgServiceImpl implements HeatsourcestationService { +public class HeatsourcestationServiceImpl extends ServiceImpl implements HeatsourcestationService { @Autowired HeatsourcestationMapper mapper; @@ -19,4 +17,12 @@ public class HeatsourcestationServiceImpl extends JeecgServiceImpl findList(Heatsourcestation heatsourcestation) { return mapper.findList(heatsourcestation); } + + public List findCompanyList(Heatsourcestation heatsourcestation) { + return mapper.findCompanyList(heatsourcestation); + } + + public List findSourceList(Heatsourcestation heatsourcestation) { + return mapper.findSourceList(heatsourcestation); + } } diff --git a/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/heating/service/impl/MarkinfoServiceImpl.java b/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/heating/service/impl/MarkinfoServiceImpl.java new file mode 100644 index 0000000..a7c6bb0 --- /dev/null +++ b/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/heating/service/impl/MarkinfoServiceImpl.java @@ -0,0 +1,137 @@ +package org.jeecg.modules.heating.service.impl; + +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import org.apache.commons.lang3.StringUtils; +import org.jeecg.common.api.vo.Result; +import org.jeecg.modules.heating.entity.Heatsource; +import org.jeecg.modules.heating.entity.Heatsourcestation; +import org.jeecg.modules.heating.entity.Markinfo; +import org.jeecg.modules.heating.entity.Thermalcompany; +import org.jeecg.modules.heating.mapper.HeatsourceMapper; +import org.jeecg.modules.heating.mapper.HeatsourcestationMapper; +import org.jeecg.modules.heating.mapper.MarkinfoMapper; +import org.jeecg.modules.heating.mapper.ThermalcompanyMapper; +import org.jeecg.modules.heating.service.MarkinfoService; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; + +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +@Service +public class MarkinfoServiceImpl extends ServiceImpl implements MarkinfoService { + + @Autowired + private ThermalcompanyMapper thermalcompanyMapper; + @Autowired + private HeatsourceMapper heatsourceMapper; + @Autowired + private HeatsourcestationMapper heatsourcestationMapper; + + @Override + public List> queryTree() { + List> mapList = new ArrayList>(); + + QueryWrapper companyWrapper = new QueryWrapper<>(); + companyWrapper.eq("del_flag","0"); + companyWrapper.orderByAsc("id"); + List companyList = thermalcompanyMapper.selectList(companyWrapper); + + QueryWrapper heatsourceWrapper = new QueryWrapper<>(); + heatsourceWrapper.eq("del_flag","0"); + heatsourceWrapper.orderByAsc("id"); + List heatsourceList = heatsourceMapper.selectList(heatsourceWrapper); + + QueryWrapper stationWrapper = new QueryWrapper<>(); + stationWrapper.eq("del_flag","0"); + stationWrapper.orderByAsc("id"); + List stationList = heatsourcestationMapper.selectList(stationWrapper); + + List> heatsourceMapList = new ArrayList>(); + for(Heatsource par : heatsourceList){ + Map heatsourceMap = new HashMap(); + List> stationMapList = new ArrayList>(); + for(Heatsourcestation heatsourcestation:stationList){ + if(StringUtils.equals(heatsourcestation.getSourceId(),par.getId().toString())){ + Map stationMap = new HashMap(); + stationMap.put("key","c_"+heatsourcestation.getId()); + stationMap.put("title",heatsourcestation.getStationName()); + stationMapList.add(stationMap); + } + } + heatsourceMap.put("key","b_"+par.getId()); + heatsourceMap.put("parentId","a_"+par.getCompanyId()); + heatsourceMap.put("title",par.getSourceName()); + heatsourceMap.put("children",stationMapList); + heatsourceMapList.add(heatsourceMap); + } + + List> infoMapList = new ArrayList>(); + for(Thermalcompany par : companyList){ + Map infoMap = new HashMap(); + List> heatsourceMap2List = new ArrayList>(); + for(Map heatsourcePar : heatsourceMapList){ + if(StringUtils.equals("a_"+par.getId(),heatsourcePar.get("parentId").toString())){ + heatsourceMap2List.add(heatsourcePar); + } + } + infoMap.put("key","a_"+par.getId()); + infoMap.put("title",par.getCompanyName()); + infoMap.put("children",heatsourceMap2List); + infoMapList.add(infoMap); + } + return infoMapList; + } + + @Override + public List findList(Markinfo markinfo) { + return baseMapper.findList(markinfo); + } + @Override + public Markinfo getMarkinfo(Markinfo markinfo) { + return baseMapper.getMarkinfo(markinfo); + } + + @Override + public Result getPointInfo(Markinfo markinfo) { + List infoList= baseMapper.findList(markinfo); + if(infoList!=null&&infoList.size()>0){ + String typeFlag = infoList.get(0).getTypeFlag(); + String id = infoList.get(0).getStationId(); + id = id.replaceAll("b_","").replaceAll("c_",""); + if(typeFlag.equals("1")){ + Heatsource heatsource = heatsourceMapper.selectById(id); + heatsource.setTypeFlag(typeFlag); + return Result.ok(heatsource); + }else{ + Heatsourcestation heatsourcestation = heatsourcestationMapper.selectById(id); + heatsourcestation.setTypeFlag(typeFlag); + return Result.ok(heatsourcestation); + } + } + return Result.error("暂无该热源信息"); + } + + @Override + public void delete(Markinfo markinfo){ + List infoList= baseMapper.findList(markinfo); + for(Markinfo info :infoList){ + baseMapper.deleteById(info.getId()); + } + } + @Override + public void deleteAll() { + baseMapper.deleteAll(); + } + + public List sourceList(Markinfo markinfo) { + return baseMapper.sourceList(markinfo); + } + + public List stationList(Markinfo markinfo) { + return baseMapper.stationList(markinfo); + } +} diff --git a/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/heating/service/impl/SimconfigServiceImpl.java b/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/heating/service/impl/SimconfigServiceImpl.java new file mode 100644 index 0000000..b0cece4 --- /dev/null +++ b/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/heating/service/impl/SimconfigServiceImpl.java @@ -0,0 +1,31 @@ +package org.jeecg.modules.heating.service.impl; + +import org.jeecg.modules.heating.entity.Simconfig; +import org.jeecg.modules.heating.mapper.SimconfigMapper; +import org.jeecg.modules.heating.service.SimconfigService; +import org.springframework.stereotype.Service; +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; + +import java.util.List; + +/** + * @Description: 设备信息管理 + * @Author: jeecg-boot + * @Date: 2025-04-09 + * @Version: V1.0 + */ +@Service +public class SimconfigServiceImpl extends ServiceImpl implements SimconfigService { + public List findCompanyList(Simconfig simconfig) { + return baseMapper.findCompanyList(simconfig); + } + public List findSourceList(Simconfig simconfig) { + return baseMapper.findSourceList(simconfig); + } + public List findStationList(Simconfig simconfig) { + return baseMapper.findStationList(simconfig); + } + public List findSimconfig(Simconfig simconfig) { + return baseMapper.findSimconfig(simconfig); + } +} diff --git a/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/heating/service/impl/SubstationServiceImpl.java b/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/heating/service/impl/SubstationServiceImpl.java index a9ca220..58a6a0a 100644 --- a/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/heating/service/impl/SubstationServiceImpl.java +++ b/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/heating/service/impl/SubstationServiceImpl.java @@ -1,6 +1,5 @@ package org.jeecg.modules.heating.service.impl; -import com.baomidou.dynamic.datasource.annotation.DS; import org.jeecg.common.system.base.service.impl.JeecgServiceImpl; import org.jeecg.modules.heating.entity.Substation; import org.jeecg.modules.heating.mapper.SubstationMapper; @@ -10,7 +9,6 @@ import org.springframework.stereotype.Service; import java.util.List; @Service -@DS("multi-datasource1") public class SubstationServiceImpl extends JeecgServiceImpl implements SubstationService { @Autowired diff --git a/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/heating/service/impl/ThermalcompanyServiceImpl.java b/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/heating/service/impl/ThermalcompanyServiceImpl.java index 02e208a..140a2f9 100644 --- a/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/heating/service/impl/ThermalcompanyServiceImpl.java +++ b/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/heating/service/impl/ThermalcompanyServiceImpl.java @@ -1,7 +1,6 @@ package org.jeecg.modules.heating.service.impl; -import com.baomidou.dynamic.datasource.annotation.DS; -import org.jeecg.common.system.base.service.impl.JeecgServiceImpl; +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import org.jeecg.modules.heating.entity.Thermalcompany; import org.jeecg.modules.heating.mapper.ThermalcompanyMapper; import org.jeecg.modules.heating.service.ThermalcompanyService; @@ -10,8 +9,7 @@ import org.springframework.stereotype.Service; import java.util.List; @Service -@DS("multi-datasource1") -public class ThermalcompanyServiceImpl extends JeecgServiceImpl implements ThermalcompanyService { +public class ThermalcompanyServiceImpl extends ServiceImpl implements ThermalcompanyService { @Autowired ThermalcompanyMapper mapper; diff --git a/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/temperature/entity/Temperature.java b/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/temperature/entity/Temperature.java index 5eae7b4..b850287 100644 --- a/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/temperature/entity/Temperature.java +++ b/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/temperature/entity/Temperature.java @@ -15,7 +15,7 @@ import java.util.Date; *

功能描述:功能描述 */ @Data -@TableName("temperature") +@TableName("bl_temperature") public class Temperature extends JeecgEntity { private static final long serialVersionUID = 1L; private String code; diff --git a/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/temperature/service/impl/TemperatureServiceImpl.java b/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/temperature/service/impl/TemperatureServiceImpl.java index 164e293..7396a92 100644 --- a/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/temperature/service/impl/TemperatureServiceImpl.java +++ b/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/temperature/service/impl/TemperatureServiceImpl.java @@ -1,6 +1,5 @@ package org.jeecg.modules.temperature.service.impl; -import com.baomidou.dynamic.datasource.annotation.DS; import org.jeecg.common.system.base.service.impl.JeecgServiceImpl; import org.jeecg.common.util.DateUtils; import org.jeecg.modules.temperature.entity.Temperature; @@ -13,7 +12,6 @@ import java.util.Date; import java.util.List; @Service -@DS("multi-datasource1") public class TemperatureServiceImpl extends JeecgServiceImpl implements TemperatureService { @Override @@ -25,7 +23,7 @@ public class TemperatureServiceImpl extends JeecgServiceImpl