136 changed files with 3143 additions and 5561 deletions
@ -1,209 +0,0 @@ |
|||||
package cc.admin.modules.dust.controller; |
|
||||
|
|
||||
import cc.admin.common.api.vo.Result; |
|
||||
import cc.admin.common.aspect.annotation.AutoLog; |
|
||||
import cc.admin.common.sys.base.controller.BaseController; |
|
||||
import cc.admin.common.sys.query.QueryGenerator; |
|
||||
import cc.admin.common.util.RedisUtil; |
|
||||
import cc.admin.modules.dust.entity.DesignPlan; |
|
||||
import cc.admin.modules.dust.entity.Pipe; |
|
||||
import cc.admin.modules.dust.service.IDesignPlanService; |
|
||||
import cc.admin.modules.dust.service.IPipeDiameterThicknessService; |
|
||||
import cc.admin.modules.dust.service.IPipeService; |
|
||||
import cn.hutool.core.util.IdUtil; |
|
||||
import cn.hutool.core.util.StrUtil; |
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage; |
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
|
||||
import io.swagger.annotations.Api; |
|
||||
import io.swagger.annotations.ApiOperation; |
|
||||
import lombok.extern.slf4j.Slf4j; |
|
||||
import org.apache.commons.collections.CollectionUtils; |
|
||||
import org.springframework.beans.factory.annotation.Autowired; |
|
||||
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.List; |
|
||||
import java.util.Map; |
|
||||
import java.util.Optional; |
|
||||
import java.util.stream.Collectors; |
|
||||
|
|
||||
/** |
|
||||
* @Description: 设计方案表 |
|
||||
* @Author: cc-admin |
|
||||
* @Date: 2024-12-06 |
|
||||
* @Version: V1.0.0 |
|
||||
*/ |
|
||||
@Slf4j |
|
||||
@Api(tags = "设计方案表") |
|
||||
@RestController |
|
||||
@RequestMapping("/design/plan") |
|
||||
public class DesignPlanController extends BaseController<DesignPlan, IDesignPlanService> { |
|
||||
@Autowired |
|
||||
private IDesignPlanService designPlanService; |
|
||||
@Autowired |
|
||||
private IPipeService pipeService; |
|
||||
|
|
||||
@Autowired |
|
||||
private RedisUtil redisUtil; |
|
||||
|
|
||||
/** |
|
||||
* 分页列表查询 |
|
||||
* |
|
||||
* @param key |
|
||||
* @param pageNo |
|
||||
* @param pageSize |
|
||||
* @param req |
|
||||
* @return |
|
||||
*/ |
|
||||
@AutoLog(value = "设计方案表-分页列表查询") |
|
||||
@ApiOperation(value = "设计方案表-分页列表查询", notes = "设计方案表-分页列表查询") |
|
||||
@GetMapping(value = "/list") |
|
||||
public Result<?> queryPageList( |
|
||||
@RequestParam(name = "key", required = false) String key, |
|
||||
@RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo, |
|
||||
@RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize, |
|
||||
HttpServletRequest req) { |
|
||||
QueryWrapper<DesignPlan> queryWrapper = new QueryWrapper<>(); |
|
||||
if (StrUtil.isNotEmpty(key)) { |
|
||||
queryWrapper.or(i -> i.like("name", key).or().like("remark", key)); |
|
||||
|
|
||||
} |
|
||||
Page<DesignPlan> page = new Page<DesignPlan>(pageNo, pageSize); |
|
||||
IPage<DesignPlan> pageList = designPlanService.page(page, queryWrapper); |
|
||||
|
|
||||
|
|
||||
|
|
||||
return Result.ok(pageList); |
|
||||
} |
|
||||
|
|
||||
/** |
|
||||
* 添加 |
|
||||
* |
|
||||
* @param designPlan |
|
||||
* @return |
|
||||
*/ |
|
||||
@AutoLog(value = "设计方案表-添加") |
|
||||
@ApiOperation(value = "设计方案表-添加", notes = "设计方案表-添加") |
|
||||
@PostMapping(value = "/add") |
|
||||
public Result<?> add(@RequestBody DesignPlan designPlan) { |
|
||||
designPlanService.save(designPlan); |
|
||||
return Result.ok("添加成功!"); |
|
||||
} |
|
||||
|
|
||||
/** |
|
||||
* 编辑 |
|
||||
* |
|
||||
* @param designPlan |
|
||||
* @return |
|
||||
*/ |
|
||||
@AutoLog(value = "设计方案表-编辑") |
|
||||
@ApiOperation(value = "设计方案表-编辑", notes = "设计方案表-编辑") |
|
||||
@PutMapping(value = "/edit") |
|
||||
public Result<?> edit(@RequestBody DesignPlan designPlan) { |
|
||||
designPlanService.updateById(designPlan); |
|
||||
|
|
||||
return Result.ok("编辑成功!"); |
|
||||
} |
|
||||
|
|
||||
|
|
||||
/** |
|
||||
* 复制 |
|
||||
* |
|
||||
* @param id |
|
||||
* @param name |
|
||||
* @return |
|
||||
*/ |
|
||||
@AutoLog(value = "设计方案表-复制") |
|
||||
@ApiOperation(value = "设计方案表-复制", notes = "设计方案表-复制") |
|
||||
@PostMapping(value = "/copy") |
|
||||
public Result<?> copy(@RequestParam(name = "id", required = true) String id, @RequestParam(name = "name", required = true) String name) { |
|
||||
DesignPlan designPlan = designPlanService.getById(id); |
|
||||
designPlanService.copy(designPlan, name); |
|
||||
return Result.ok("复制成功!"); |
|
||||
} |
|
||||
|
|
||||
/** |
|
||||
* 通过id删除 |
|
||||
* |
|
||||
* @param id |
|
||||
* @return |
|
||||
*/ |
|
||||
@AutoLog(value = "设计方案表-通过id删除") |
|
||||
@ApiOperation(value = "设计方案表-通过id删除", notes = "设计方案表-通过id删除") |
|
||||
@DeleteMapping(value = "/delete") |
|
||||
public Result<?> delete(@RequestParam(name = "id", required = true) String id) { |
|
||||
designPlanService.removeById(id); |
|
||||
pipeService.delByDesignPlanId(id); |
|
||||
redisUtil.del(id); |
|
||||
return Result.ok("删除成功!"); |
|
||||
} |
|
||||
|
|
||||
/** |
|
||||
* 批量删除 |
|
||||
* |
|
||||
* @param ids |
|
||||
* @return |
|
||||
*/ |
|
||||
@AutoLog(value = "设计方案表-批量删除") |
|
||||
@ApiOperation(value = "设计方案表-批量删除", notes = "设计方案表-批量删除") |
|
||||
@DeleteMapping(value = "/deleteBatch") |
|
||||
public Result<?> deleteBatch(@RequestParam(name = "ids", required = true) String ids) { |
|
||||
this.designPlanService.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) { |
|
||||
DesignPlan designPlan = designPlanService.getById(id); |
|
||||
QueryWrapper<Pipe> objectQueryWrapper = new QueryWrapper<>(); |
|
||||
objectQueryWrapper.eq("design_plan_id",id); |
|
||||
List<Pipe> list = pipeService.list(objectQueryWrapper); |
|
||||
if (CollectionUtils.isNotEmpty(list)) { |
|
||||
Map<String, Double> groupedByDesignPlanIdWithFlow = list.stream() |
|
||||
.collect(Collectors.groupingBy( |
|
||||
pipe -> Optional.ofNullable(pipe.getDesignPlanId()).orElse("defaultKey"), // 确保键不为null
|
|
||||
Collectors.summingDouble(pipe -> Optional.ofNullable(pipe.getFlow()).orElse(0.0)) // 确保flow不为null
|
|
||||
)); |
|
||||
Double orDefault = groupedByDesignPlanIdWithFlow.getOrDefault(designPlan.getId(), 0d); |
|
||||
designPlan.setTotalFlow(orDefault.toString()); |
|
||||
} |
|
||||
return Result.ok(designPlan); |
|
||||
} |
|
||||
|
|
||||
/** |
|
||||
* 导出excel |
|
||||
* |
|
||||
* @param request |
|
||||
* @param designPlan |
|
||||
*/ |
|
||||
@RequestMapping(value = "/exportXls") |
|
||||
public ModelAndView exportXls(HttpServletRequest request, HttpServletResponse response, DesignPlan designPlan) { |
|
||||
response.setHeader("Access-Control-Expose-Headers", "Content-Disposition"); |
|
||||
return super.exportXls(request, designPlan, DesignPlan.class, "设计方案表"); |
|
||||
} |
|
||||
|
|
||||
/** |
|
||||
* 通过excel导入数据 |
|
||||
* |
|
||||
* @param request |
|
||||
* @param response |
|
||||
* @return |
|
||||
*/ |
|
||||
@RequestMapping(value = "/importExcel", method = RequestMethod.POST) |
|
||||
public Result<?> importExcel(HttpServletRequest request, HttpServletResponse response) { |
|
||||
return super.importExcel(request, response, DesignPlan.class); |
|
||||
} |
|
||||
|
|
||||
} |
|
@ -1,174 +0,0 @@ |
|||||
package cc.admin.modules.dust.controller; |
|
||||
|
|
||||
import cc.admin.common.api.vo.Result; |
|
||||
import cc.admin.common.aspect.annotation.AutoLog; |
|
||||
import cc.admin.common.sys.base.controller.BaseController; |
|
||||
import cc.admin.common.sys.query.QueryGenerator; |
|
||||
import cc.admin.modules.dust.entity.DustAlarm; |
|
||||
import cc.admin.modules.dust.service.IDustAlarmService; |
|
||||
import cn.hutool.core.util.IdUtil; |
|
||||
import cn.hutool.core.util.StrUtil; |
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage; |
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
|
||||
import io.swagger.annotations.Api; |
|
||||
import io.swagger.annotations.ApiOperation; |
|
||||
import lombok.extern.slf4j.Slf4j; |
|
||||
import org.springframework.beans.factory.annotation.Autowired; |
|
||||
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; |
|
||||
|
|
||||
/** |
|
||||
* @Description: 警报记录表 |
|
||||
* @Author: cc-admin |
|
||||
* @Date: 2025-03-27 |
|
||||
* @Version: V1.0.0 |
|
||||
*/ |
|
||||
@Slf4j |
|
||||
@Api(tags = "警报记录表") |
|
||||
@RestController |
|
||||
@RequestMapping("/dust/alarm") |
|
||||
public class DustAlarmController extends BaseController<DustAlarm, IDustAlarmService> { |
|
||||
@Autowired |
|
||||
private IDustAlarmService dustAlarmService; |
|
||||
|
|
||||
/** |
|
||||
* 分页列表查询 |
|
||||
* |
|
||||
* @param key |
|
||||
* @param pageNo |
|
||||
* @param pageSize |
|
||||
* @param req |
|
||||
* @return |
|
||||
*/ |
|
||||
@AutoLog(value = "警报记录表-分页列表查询") |
|
||||
@ApiOperation(value = "警报记录表-分页列表查询", notes = "警报记录表-分页列表查询") |
|
||||
@GetMapping(value = "/list") |
|
||||
public Result<?> queryPageList( |
|
||||
@RequestParam(name = "systemId", required = false) String systemId, |
|
||||
@RequestParam(name = "startTime", required = false) String startTime, |
|
||||
@RequestParam(name = "endTime", required = false) String endTime, |
|
||||
@RequestParam(name = "alarmContent", required = false) String alarmContent, |
|
||||
@RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo, |
|
||||
@RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize, |
|
||||
HttpServletRequest req) { |
|
||||
QueryWrapper<DustAlarm> queryWrapper = new QueryWrapper<>(); |
|
||||
if (null != alarmContent) { |
|
||||
queryWrapper.like("alarm_content", alarmContent); // type 保持精确匹配
|
|
||||
} |
|
||||
if (StrUtil.isNotEmpty(systemId)) { |
|
||||
queryWrapper.eq("system_id", systemId); // systemId 保持精确匹配
|
|
||||
} |
|
||||
if (startTime != null) { |
|
||||
queryWrapper.ge("create_time", startTime); |
|
||||
} |
|
||||
if (endTime != null) { |
|
||||
queryWrapper.le("create_time", endTime); |
|
||||
} |
|
||||
queryWrapper.orderByAsc("sort_order") |
|
||||
.orderByDesc("create_time"); |
|
||||
Page<DustAlarm> page = new Page<DustAlarm>(pageNo, pageSize); |
|
||||
IPage<DustAlarm> pageList = dustAlarmService.page(page, queryWrapper); |
|
||||
return Result.ok(pageList); |
|
||||
} |
|
||||
|
|
||||
/** |
|
||||
* 添加 |
|
||||
* |
|
||||
* @param dustAlarm |
|
||||
* @return |
|
||||
*/ |
|
||||
@AutoLog(value = "警报记录表-添加") |
|
||||
@ApiOperation(value = "警报记录表-添加", notes = "警报记录表-添加") |
|
||||
@PostMapping(value = "/add") |
|
||||
public Result<?> add(@RequestBody DustAlarm dustAlarm) { |
|
||||
dustAlarmService.save(dustAlarm); |
|
||||
return Result.ok("添加成功!"); |
|
||||
} |
|
||||
|
|
||||
/** |
|
||||
* 编辑 |
|
||||
* |
|
||||
* @param dustAlarm |
|
||||
* @return |
|
||||
*/ |
|
||||
@AutoLog(value = "警报记录表-编辑") |
|
||||
@ApiOperation(value = "警报记录表-编辑", notes = "警报记录表-编辑") |
|
||||
@PutMapping(value = "/edit") |
|
||||
public Result<?> edit(@RequestBody DustAlarm dustAlarm) { |
|
||||
dustAlarmService.updateById(dustAlarm); |
|
||||
return Result.ok("编辑成功!"); |
|
||||
} |
|
||||
|
|
||||
|
|
||||
/** |
|
||||
* 通过id删除 |
|
||||
* |
|
||||
* @param id |
|
||||
* @return |
|
||||
*/ |
|
||||
@AutoLog(value = "警报记录表-通过id删除") |
|
||||
@ApiOperation(value = "警报记录表-通过id删除", notes = "警报记录表-通过id删除") |
|
||||
@DeleteMapping(value = "/delete") |
|
||||
public Result<?> delete(@RequestParam(name = "id", required = true) String id) { |
|
||||
dustAlarmService.removeById(id); |
|
||||
return Result.ok("删除成功!"); |
|
||||
} |
|
||||
|
|
||||
/** |
|
||||
* 批量删除 |
|
||||
* |
|
||||
* @param ids |
|
||||
* @return |
|
||||
*/ |
|
||||
@AutoLog(value = "警报记录表-批量删除") |
|
||||
@ApiOperation(value = "警报记录表-批量删除", notes = "警报记录表-批量删除") |
|
||||
@DeleteMapping(value = "/deleteBatch") |
|
||||
public Result<?> deleteBatch(@RequestParam(name = "ids", required = true) String ids) { |
|
||||
this.dustAlarmService.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) { |
|
||||
DustAlarm dustAlarm = dustAlarmService.getById(id); |
|
||||
return Result.ok(dustAlarm); |
|
||||
} |
|
||||
|
|
||||
/** |
|
||||
* 导出excel |
|
||||
* |
|
||||
* @param request |
|
||||
* @param dustAlarm |
|
||||
*/ |
|
||||
@RequestMapping(value = "/exportXls") |
|
||||
public ModelAndView exportXls(HttpServletRequest request, HttpServletResponse response, DustAlarm dustAlarm) { |
|
||||
response.setHeader("Access-Control-Expose-Headers", "Content-Disposition"); |
|
||||
return super.exportXls(request, dustAlarm, DustAlarm.class, "警报记录表"); |
|
||||
} |
|
||||
|
|
||||
/** |
|
||||
* 通过excel导入数据 |
|
||||
* |
|
||||
* @param request |
|
||||
* @param response |
|
||||
* @return |
|
||||
*/ |
|
||||
@RequestMapping(value = "/importExcel", method = RequestMethod.POST) |
|
||||
public Result<?> importExcel(HttpServletRequest request, HttpServletResponse response) { |
|
||||
return super.importExcel(request, response, DustAlarm.class); |
|
||||
} |
|
||||
|
|
||||
} |
|
@ -1,251 +0,0 @@ |
|||||
package cc.admin.modules.dust.controller; |
|
||||
|
|
||||
import cc.admin.common.api.vo.Result; |
|
||||
import cc.admin.common.aspect.annotation.AutoLog; |
|
||||
import cc.admin.common.util.RedisUtil; |
|
||||
import cc.admin.modules.dust.entity.*; |
|
||||
import cc.admin.modules.dust.po.DustQuery; |
|
||||
import cc.admin.modules.dust.service.*; |
|
||||
import cc.admin.modules.dust.utils.RecommendPlanUtils; |
|
||||
import cc.admin.modules.dust.vo.CombinationResult; |
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
|
||||
import com.baomidou.mybatisplus.core.toolkit.ObjectUtils; |
|
||||
import io.swagger.annotations.Api; |
|
||||
import io.swagger.annotations.ApiOperation; |
|
||||
import lombok.extern.slf4j.Slf4j; |
|
||||
import org.apache.commons.collections.CollectionUtils; |
|
||||
import org.apache.commons.lang3.StringUtils; |
|
||||
import org.springframework.beans.factory.annotation.Autowired; |
|
||||
import org.springframework.web.bind.annotation.*; |
|
||||
import oshi.util.StringUtil; |
|
||||
|
|
||||
import javax.annotation.Resource; |
|
||||
import java.io.IOException; |
|
||||
import java.util.*; |
|
||||
import java.util.concurrent.CompletableFuture; |
|
||||
import java.util.concurrent.CopyOnWriteArrayList; |
|
||||
import java.util.stream.Collectors; |
|
||||
import java.util.stream.IntStream; |
|
||||
|
|
||||
|
|
||||
@Slf4j |
|
||||
@Api(tags = "计算表") |
|
||||
@RestController |
|
||||
@RequestMapping("/dust/config") |
|
||||
public class DustController { |
|
||||
@Autowired |
|
||||
private IPipeDiameterThicknessService iPipeDiameterThicknessService; |
|
||||
@Autowired |
|
||||
private IPipeService pipeService; |
|
||||
@Autowired |
|
||||
private RedisUtil redisUtil; |
|
||||
@Resource |
|
||||
private IRecommendPlanService iRecommendPlanService; |
|
||||
|
|
||||
/** |
|
||||
* 初步计算 |
|
||||
* |
|
||||
* @param airVolume 风量(单位根据实际情况设定) |
|
||||
* @param airSpeed 风速(单位根据实际情况设定) |
|
||||
* @return 计算得到的 管径值 |
|
||||
* @throws IllegalArgumentException 如果 airVolume 或 airSpeed 非正 |
|
||||
*/ |
|
||||
public static double calculate(double airVolume, double airSpeed) { |
|
||||
// 检查输入是否为有效的正数
|
|
||||
if (airVolume <= 0 || airSpeed <= 0) { |
|
||||
throw new IllegalArgumentException("风量和风速必须是正数。"); |
|
||||
} |
|
||||
|
|
||||
// 计算 d 的值
|
|
||||
return 2000 * Math.sqrt(airVolume / airSpeed / 3600 / Math.PI); |
|
||||
} |
|
||||
|
|
||||
/** |
|
||||
* 初步计算 |
|
||||
* |
|
||||
* @param airVolume 风量(单位根据实际情况设定) |
|
||||
* @param diameter 管道内径(单位根据实际情况设定) |
|
||||
* @return 计算得到的 风速 |
|
||||
* @throws IllegalArgumentException 如果 airVolume 或 airSpeed 非正 |
|
||||
*/ |
|
||||
public static double calculateAirSpeed(double airVolume, double diameter) { |
|
||||
|
|
||||
double radiusMeters = diameter / 2000.0; // 2000 = 2 * 1000 (to get radius in meters)
|
|
||||
|
|
||||
double area = Math.PI * Math.pow(radiusMeters, 2); |
|
||||
|
|
||||
return airVolume / (area * 3600.0); |
|
||||
} |
|
||||
|
|
||||
|
|
||||
@AutoLog(value = "初步计算") |
|
||||
@ApiOperation(value = "初步计算", notes = "初步计算") |
|
||||
@GetMapping(value = "/designPipe") |
|
||||
public Result<?> designPipe(@RequestParam(name = "designPlanId", required = true) String designPlanId, |
|
||||
@RequestParam(name = "pipeDiameterId", required = true) String pipeDiameterId) { |
|
||||
// 创建 QueryWrapper 以获取所有匹配的 DesignPlanPipeConfig
|
|
||||
QueryWrapper<Pipe> configQueryWrapper = new QueryWrapper<>(); |
|
||||
configQueryWrapper.eq("design_plan_id", designPlanId); |
|
||||
|
|
||||
List<Pipe> configList = pipeService.list(configQueryWrapper); |
|
||||
|
|
||||
if (CollectionUtils.isEmpty(configList)) { |
|
||||
return Result.ok(null); |
|
||||
} |
|
||||
List<Pipe> design = design(designPlanId, pipeDiameterId, configList); |
|
||||
|
|
||||
return Result.ok(design); |
|
||||
} |
|
||||
|
|
||||
private List<Pipe> design(String designPlanId, String pipeDiameterId, List<Pipe> configList) { |
|
||||
Map<String, List<Pipe>> pipesGroupedByParentId = configList.stream() |
|
||||
.filter(a -> StringUtils.isNotBlank(a.getParentId()) && a.getIsLeaf().equals(1)).collect(Collectors.groupingBy(Pipe::getParentId)); |
|
||||
List<Pipe> pipesToUpdate = new ArrayList<>(); |
|
||||
|
|
||||
PipeDiameterThickness byId = iPipeDiameterThicknessService.getById(pipeDiameterId); |
|
||||
List<Double> collect = Arrays.stream(byId.getDiameter().split(",")) |
|
||||
.map(str -> str.replaceAll("[\\u00A0\\s]+", "").trim()) // 去除所有空白字符,包括非断行空格
|
|
||||
.filter(str -> !str.isEmpty()) // 过滤空字符串
|
|
||||
.map(Double::parseDouble) |
|
||||
.collect(Collectors.toList()); |
|
||||
|
|
||||
|
|
||||
for (Map.Entry<String, List<Pipe>> entry : pipesGroupedByParentId.entrySet()) { |
|
||||
List<Pipe> parentPipes = entry.getValue(); |
|
||||
parentPipes.sort(Comparator.comparingInt(Pipe::getSortOrder)); |
|
||||
// 计算累积值
|
|
||||
double cumulativeSum = 0.0; |
|
||||
|
|
||||
for (Pipe pipe : parentPipes) { |
|
||||
double valveOpening = pipe.getValveOpening(); |
|
||||
double v = valveOpening / 100.0; |
|
||||
double adjustedFlow = pipe.getFlow() * v; |
|
||||
cumulativeSum += adjustedFlow; |
|
||||
double calculate = calculate(cumulativeSum, 19d); |
|
||||
double ceil = collect.stream() |
|
||||
.filter(num -> num >= calculate) // 过滤出不小于 calculate 的数
|
|
||||
.min(Double::compareTo) |
|
||||
.orElseGet(() -> collect.stream() |
|
||||
.max(Double::compareTo) |
|
||||
.orElse(Double.NaN)); |
|
||||
// 更新当前 Pipe 对象
|
|
||||
if (null != pipe.getDiameter()) { |
|
||||
pipe.setComputeDiameter(pipe.getDiameter()); |
|
||||
} |
|
||||
pipe.setDiameter(ceil); |
|
||||
pipe.setPipeDiameter(calculate); |
|
||||
pipe.setPipeFlow(cumulativeSum); |
|
||||
pipe.setValveOpening(valveOpening); |
|
||||
pipesToUpdate.add(pipe); |
|
||||
|
|
||||
|
|
||||
} |
|
||||
} |
|
||||
redisUtil.set(designPlanId, pipesToUpdate); |
|
||||
return pipesToUpdate; |
|
||||
} |
|
||||
|
|
||||
@AutoLog(value = "平衡计算") |
|
||||
@ApiOperation(value = "平衡计算", notes = "平衡计算") |
|
||||
@PostMapping(value = "/balance") |
|
||||
public Result<?> balance(@RequestBody DustQuery query) { |
|
||||
Object object = redisUtil.get(query.getDesignPlanId()); |
|
||||
|
|
||||
if (ObjectUtils.isEmpty(object)) { |
|
||||
return Result.error("设计方案管道配置不能为空"); |
|
||||
} |
|
||||
|
|
||||
Map<String, Double> pipeIdToValveOpeningMap = query.getList().stream() |
|
||||
.collect(Collectors.toMap( |
|
||||
Pipe::getId, |
|
||||
Pipe::getValveOpening, |
|
||||
(existing, replacement) -> existing)); |
|
||||
|
|
||||
Set<String> pipeIdsSet = pipeIdToValveOpeningMap.keySet(); |
|
||||
List<Pipe> pipes = convertToList(object); |
|
||||
|
|
||||
List<Pipe> filteredPipes = pipes.stream() |
|
||||
.filter(pipe -> pipeIdsSet.contains(pipe.getId())) // 假设 Pipe 类有 getId() 方法
|
|
||||
.collect(Collectors.toList()); |
|
||||
|
|
||||
Map<String, List<Pipe>> pipesGroupedByParentId = filteredPipes.stream() |
|
||||
.filter(a -> StringUtils.isNotBlank(a.getParentId()) && a.getIsLeaf().equals(1)).collect(Collectors.groupingBy(Pipe::getParentId)); |
|
||||
|
|
||||
|
|
||||
for (Map.Entry<String, List<Pipe>> entry : pipesGroupedByParentId.entrySet()) { |
|
||||
List<Pipe> parentPipes = entry.getValue(); |
|
||||
parentPipes.sort(Comparator.comparingInt(Pipe::getSortOrder)); |
|
||||
|
|
||||
// 计算累积值
|
|
||||
double cumulativeSum = 0.0; |
|
||||
double diameter; |
|
||||
for (Pipe pipe : parentPipes) { |
|
||||
double valveOpening = pipeIdToValveOpeningMap.getOrDefault(pipe.getId(), 100.0); |
|
||||
double v = valveOpening / 100.0; |
|
||||
double adjustedFlow = pipe.getFlow() * v; |
|
||||
cumulativeSum += adjustedFlow; |
|
||||
diameter = pipe.getDiameter(); |
|
||||
if (null != pipe.getComputeDiameter()) { |
|
||||
diameter = pipe.getComputeDiameter(); |
|
||||
} |
|
||||
double windSpeed = calculateAirSpeed(cumulativeSum, diameter); |
|
||||
log.info("风量{},开度: {},管道内径{}", cumulativeSum, v, diameter); |
|
||||
pipe.setWindSpeed(windSpeed); |
|
||||
pipe.setPipeFlow(cumulativeSum); |
|
||||
pipe.setValveOpening(valveOpening); |
|
||||
} |
|
||||
} |
|
||||
|
|
||||
return Result.ok(pipes); |
|
||||
} |
|
||||
|
|
||||
public List<Pipe> convertToList(Object object) { |
|
||||
if (!(object instanceof Collection<?>)) { |
|
||||
throw new IllegalArgumentException("Object is not a Collection"); |
|
||||
} |
|
||||
|
|
||||
Collection<?> collection = (Collection<?>) object; |
|
||||
List<Pipe> list = new ArrayList<>(); |
|
||||
|
|
||||
int index = 0; |
|
||||
for (Object item : collection) { |
|
||||
if (item == null) { |
|
||||
throw new NullPointerException("Collection contains null element at index " + index); |
|
||||
} |
|
||||
if (item instanceof Pipe) { |
|
||||
list.add((Pipe) item); |
|
||||
} else { |
|
||||
String foundType = item.getClass().getName(); |
|
||||
throw new ClassCastException("Element at index " + index + " is not a DesignPlanPipeConfig. Found: " + foundType); |
|
||||
} |
|
||||
index++; |
|
||||
} |
|
||||
return list; |
|
||||
} |
|
||||
|
|
||||
@AutoLog(value = "推荐方案") |
|
||||
@ApiOperation(value = "推荐方案", notes = "推荐方案") |
|
||||
@GetMapping(value = "/recommend") |
|
||||
public Result<?> recommend(@RequestParam(name = "designPlanId", required = true) String designPlanId, |
|
||||
@RequestParam(name = "parentPipeId", required = true) String parentPipeId, |
|
||||
@RequestParam(name = "pipeDiameterId", required = true) String pipeDiameterId, |
|
||||
@RequestParam(name = "minSpeed", required = true) Double minSpeed, |
|
||||
@RequestParam(name = "minRate", required = true) Double minRate) throws IOException { |
|
||||
QueryWrapper<Pipe> configQueryWrapper = new QueryWrapper<>(); |
|
||||
configQueryWrapper.eq("design_plan_id", designPlanId); |
|
||||
configQueryWrapper.eq("parent_id", parentPipeId); |
|
||||
List<Pipe> configList = pipeService.list(configQueryWrapper); |
|
||||
if (CollectionUtils.isEmpty(configList)){ |
|
||||
return Result.error("管道为空"); |
|
||||
} |
|
||||
List<Pipe> data = design(designPlanId, pipeDiameterId, configList); |
|
||||
data.sort(Comparator.comparingInt(Pipe::getSortOrder)); |
|
||||
|
|
||||
Set<Integer> pipeIndexes = IntStream.range(0, data.size()) |
|
||||
.filter(i -> data.get(i).getValveOpening() == 100) // 满足条件的 Pipe 的下标
|
|
||||
.boxed() // 转换为 Integer 类型
|
|
||||
.collect(Collectors.toSet()); |
|
||||
List<RecommendPlan> recommendPlanList = RecommendPlanUtils.generateCombinations(data, minSpeed, minRate, pipeIndexes); |
|
||||
return Result.ok(recommendPlanList); |
|
||||
} |
|
||||
} |
|
@ -1,311 +0,0 @@ |
|||||
package cc.admin.modules.dust.controller; |
|
||||
|
|
||||
import cc.admin.common.api.vo.Result; |
|
||||
import cc.admin.common.aspect.annotation.AutoLog; |
|
||||
import cc.admin.common.sys.base.controller.BaseController; |
|
||||
import cc.admin.common.sys.query.QueryGenerator; |
|
||||
import cc.admin.modules.dust.entity.DustDataTag; |
|
||||
import cc.admin.modules.dust.entity.DustSystem; |
|
||||
import cc.admin.modules.dust.service.IDustDataTagService; |
|
||||
import cc.admin.modules.dust.service.IDustSystemService; |
|
||||
import cc.admin.modules.dust.vo.DataTagExcel; |
|
||||
import cc.admin.modules.dust.vo.DataTagPair; |
|
||||
import cn.hutool.core.util.IdUtil; |
|
||||
import cn.hutool.core.util.StrUtil; |
|
||||
import com.alibaba.excel.EasyExcelFactory; |
|
||||
import com.alibaba.excel.context.AnalysisContext; |
|
||||
import com.alibaba.excel.event.AnalysisEventListener; |
|
||||
import com.alibaba.excel.read.listener.ReadListener; |
|
||||
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.Api; |
|
||||
import io.swagger.annotations.ApiOperation; |
|
||||
import lombok.extern.slf4j.Slf4j; |
|
||||
import org.apache.commons.lang3.StringUtils; |
|
||||
import org.springframework.beans.factory.annotation.Autowired; |
|
||||
import org.springframework.web.bind.annotation.*; |
|
||||
import org.springframework.web.multipart.MultipartFile; |
|
||||
import org.springframework.web.multipart.MultipartHttpServletRequest; |
|
||||
import org.springframework.web.servlet.ModelAndView; |
|
||||
|
|
||||
import javax.servlet.http.HttpServletRequest; |
|
||||
import javax.servlet.http.HttpServletResponse; |
|
||||
import java.util.*; |
|
||||
import java.util.function.Function; |
|
||||
import java.util.stream.Collectors; |
|
||||
|
|
||||
/** |
|
||||
* @Description: 数据点位表 |
|
||||
* @Author: cc-admin |
|
||||
* @Date: 2025-03-27 |
|
||||
* @Version: V1.0.0 |
|
||||
*/ |
|
||||
@Slf4j |
|
||||
@Api(tags = "数据点位表") |
|
||||
@RestController |
|
||||
@RequestMapping("/dust/dataTag") |
|
||||
public class DustDataTagController extends BaseController<DustDataTag, IDustDataTagService> { |
|
||||
@Autowired |
|
||||
private IDustDataTagService dustDataTagService; |
|
||||
@Autowired |
|
||||
private IDustSystemService iDustSystemService; |
|
||||
|
|
||||
/** |
|
||||
* 分页列表查询 |
|
||||
* |
|
||||
* @param key |
|
||||
* @param pageNo |
|
||||
* @param pageSize |
|
||||
* @param req |
|
||||
* @return |
|
||||
*/ |
|
||||
@AutoLog(value = "数据点位表-分页列表查询") |
|
||||
@ApiOperation(value = "数据点位表-分页列表查询", notes = "数据点位表-分页列表查询") |
|
||||
@GetMapping(value = "/list") |
|
||||
public Result<?> queryPageList( |
|
||||
@RequestParam(name = "systemId", required = false) String systemId, |
|
||||
@RequestParam(name = "name", required = false) String name, |
|
||||
@RequestParam(name = "dataTag", required = false) String dataTag, |
|
||||
@RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo, |
|
||||
@RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize, |
|
||||
HttpServletRequest req) { |
|
||||
QueryWrapper<DustDataTag> queryWrapper = new QueryWrapper<>(); |
|
||||
if (StrUtil.isNotEmpty(systemId)) { |
|
||||
queryWrapper.eq("system_id", systemId); |
|
||||
} |
|
||||
if (StrUtil.isNotEmpty(name)) { |
|
||||
queryWrapper.eq("name", name); |
|
||||
} |
|
||||
if (StrUtil.isNotEmpty(dataTag)) { |
|
||||
queryWrapper.eq("data_tag", dataTag); |
|
||||
} |
|
||||
|
|
||||
queryWrapper.orderByAsc("sort_order") |
|
||||
.orderByDesc("create_time"); |
|
||||
Page<DustDataTag> page = new Page<DustDataTag>(pageNo, pageSize); |
|
||||
IPage<DustDataTag> pageList = dustDataTagService.page(page, queryWrapper); |
|
||||
return Result.ok(pageList); |
|
||||
} |
|
||||
|
|
||||
/** |
|
||||
* 添加 |
|
||||
* |
|
||||
* @param dustDataTag |
|
||||
* @return |
|
||||
*/ |
|
||||
@AutoLog(value = "数据点位表-添加") |
|
||||
@ApiOperation(value = "数据点位表-添加", notes = "数据点位表-添加") |
|
||||
@PostMapping(value = "/add") |
|
||||
public Result<?> add(@RequestBody DustDataTag dustDataTag) { |
|
||||
checkUniqueName(dustDataTag); |
|
||||
dustDataTagService.save(dustDataTag); |
|
||||
return Result.ok("添加成功!"); |
|
||||
} |
|
||||
|
|
||||
/** |
|
||||
* 编辑 |
|
||||
* |
|
||||
* @param dustDataTag |
|
||||
* @return |
|
||||
*/ |
|
||||
@AutoLog(value = "数据点位表-编辑") |
|
||||
@ApiOperation(value = "数据点位表-编辑", notes = "数据点位表-编辑") |
|
||||
@PutMapping(value = "/edit") |
|
||||
public Result<?> edit(@RequestBody DustDataTag dustDataTag) { |
|
||||
checkUniqueName(dustDataTag); |
|
||||
dustDataTagService.updateById(dustDataTag); |
|
||||
return Result.ok("编辑成功!"); |
|
||||
} |
|
||||
|
|
||||
|
|
||||
/** |
|
||||
* 复制 |
|
||||
* |
|
||||
* @param id |
|
||||
* @param name |
|
||||
* @return |
|
||||
*/ |
|
||||
@AutoLog(value = "数据点位表-复制") |
|
||||
@ApiOperation(value = "数据点位表-复制", notes = "数据点位表-复制") |
|
||||
@PostMapping(value = "/copy") |
|
||||
public Result<?> copy(@RequestParam(name = "id", required = true) String id, @RequestParam(name = "name", required = true) String name) { |
|
||||
DustDataTag dustDataTag = dustDataTagService.getById(id); |
|
||||
dustDataTag.setId(IdUtil.fastUUID()); |
|
||||
dustDataTag.setName(name); |
|
||||
dustDataTagService.save(dustDataTag); |
|
||||
return Result.ok("复制成功!"); |
|
||||
} |
|
||||
|
|
||||
/** |
|
||||
* 通过id删除 |
|
||||
* |
|
||||
* @param id |
|
||||
* @return |
|
||||
*/ |
|
||||
@AutoLog(value = "数据点位表-通过id删除") |
|
||||
@ApiOperation(value = "数据点位表-通过id删除", notes = "数据点位表-通过id删除") |
|
||||
@DeleteMapping(value = "/delete") |
|
||||
public Result<?> delete(@RequestParam(name = "id", required = true) String id) { |
|
||||
dustDataTagService.removeById(id); |
|
||||
return Result.ok("删除成功!"); |
|
||||
} |
|
||||
|
|
||||
/** |
|
||||
* 批量删除 |
|
||||
* |
|
||||
* @param ids |
|
||||
* @return |
|
||||
*/ |
|
||||
@AutoLog(value = "数据点位表-批量删除") |
|
||||
@ApiOperation(value = "数据点位表-批量删除", notes = "数据点位表-批量删除") |
|
||||
@DeleteMapping(value = "/deleteBatch") |
|
||||
public Result<?> deleteBatch(@RequestParam(name = "ids", required = true) String ids) { |
|
||||
this.dustDataTagService.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) { |
|
||||
DustDataTag dustDataTag = dustDataTagService.getById(id); |
|
||||
return Result.ok(dustDataTag); |
|
||||
} |
|
||||
|
|
||||
/** |
|
||||
* 导出excel |
|
||||
* |
|
||||
* @param request |
|
||||
* @param dustDataTag |
|
||||
*/ |
|
||||
@RequestMapping(value = "/exportXls") |
|
||||
public ModelAndView exportXls(HttpServletRequest request, HttpServletResponse response, DustDataTag dustDataTag) { |
|
||||
response.setHeader("Access-Control-Expose-Headers", "Content-Disposition"); |
|
||||
return super.exportXls(request, dustDataTag, DustDataTag.class, "数据点位表"); |
|
||||
} |
|
||||
|
|
||||
/** |
|
||||
* 通过excel导入数据 |
|
||||
* |
|
||||
* @param request |
|
||||
* @param response |
|
||||
* @return |
|
||||
*/ |
|
||||
@RequestMapping(value = "/importExcel", method = RequestMethod.POST) |
|
||||
public Result<?> importExcel(HttpServletRequest request, |
|
||||
HttpServletResponse response) { |
|
||||
try { |
|
||||
MultipartHttpServletRequest multipartRequest = (MultipartHttpServletRequest) request; |
|
||||
Map<String, MultipartFile> fileMap = multipartRequest.getFileMap(); |
|
||||
|
|
||||
if (fileMap.isEmpty()) { |
|
||||
return Result.error("请上传 Excel 文件"); |
|
||||
} |
|
||||
|
|
||||
MultipartFile file = fileMap.values().iterator().next(); |
|
||||
if (file == null || file.isEmpty()) { |
|
||||
return Result.error("上传的文件为空"); |
|
||||
} |
|
||||
List<DustDataTag> metaDataValues = new ArrayList<>(); |
|
||||
List<String> errorList = new ArrayList<>(); |
|
||||
HashSet<String> dataTagSet = new HashSet<>(); |
|
||||
HashSet<String> nameSet = new HashSet<>(); |
|
||||
|
|
||||
List<DustSystem> systemList = iDustSystemService.list(); |
|
||||
Map<String, DustSystem> systemMap = systemList.stream().collect(Collectors.toMap(DustSystem::getName, dustSystem -> dustSystem)); |
|
||||
EasyExcelFactory.read(file.getInputStream(), DataTagExcel.class, |
|
||||
new AnalysisEventListener<DataTagExcel>() { |
|
||||
@Override |
|
||||
public void invoke(DataTagExcel rowData, AnalysisContext context) { |
|
||||
if (StringUtils.isEmpty(rowData.getDataTag()) || StringUtils.isEmpty(rowData.getName())) { |
|
||||
errorList.add(String.format("第 %d 行数据不完整:名称 或 数据点位 为空", context.readRowHolder().getRowIndex() + 1)); |
|
||||
return; |
|
||||
} |
|
||||
if (StringUtils.isEmpty(rowData.getSystemName())) { |
|
||||
errorList.add(String.format("第 %d 行数据不完整:除尘系统为空", context.readRowHolder().getRowIndex() + 1)); |
|
||||
return; |
|
||||
} |
|
||||
// 检查 dataTag 是否重复
|
|
||||
String dataTag = rowData.getDataTag().trim(); |
|
||||
if (!dataTagSet.add(dataTag)) { |
|
||||
// 如果 dataTag 已存在,记录错误
|
|
||||
errorList.add(String.format("第 %d 行数据重复:数据点位 %s 已存在", context.readRowHolder().getRowIndex() + 1, dataTag)); |
|
||||
return; |
|
||||
} |
|
||||
|
|
||||
if (!nameSet.add(rowData.getName() + rowData.getSystemName())) { |
|
||||
// 如果 dataTag 已存在,记录错误
|
|
||||
errorList.add(String.format("第 %d 行数据重复:该系统下除尘点位名称 %s 已存在", context.readRowHolder().getRowIndex() + 1, rowData.getName())); |
|
||||
return; |
|
||||
} |
|
||||
DustSystem dustSystem = systemMap.get(rowData.getSystemName().trim()); |
|
||||
if (dustSystem == null) { |
|
||||
errorList.add(String.format("第 %d 行数据错误:所属系统 %s 不存在", context.readRowHolder().getRowIndex() + 1, rowData.getSystemName())); |
|
||||
return; |
|
||||
} |
|
||||
DustDataTag dustDataTag = new DustDataTag(); |
|
||||
dustDataTag.setName(rowData.getName()); |
|
||||
dustDataTag.setDataTag(rowData.getDataTag().trim()); |
|
||||
dustDataTag.setSystemId(dustSystem.getId()); |
|
||||
|
|
||||
|
|
||||
checkUniqueName(dustDataTag); |
|
||||
|
|
||||
|
|
||||
metaDataValues.add(dustDataTag); |
|
||||
} |
|
||||
|
|
||||
@Override |
|
||||
public void doAfterAllAnalysed(AnalysisContext context) { |
|
||||
log.info("所有数据读取完成,共有 " + metaDataValues.size() + " 条数据"); |
|
||||
} |
|
||||
}) |
|
||||
.sheet() |
|
||||
.doRead(); |
|
||||
|
|
||||
if (!errorList.isEmpty()) { |
|
||||
return Result.error("导入失败,存在以下错误:\n" + String.join("\n", errorList)); |
|
||||
} |
|
||||
QueryWrapper<DustDataTag> dataTagQueryWrapper = new QueryWrapper<>(); |
|
||||
dataTagQueryWrapper.in("data_tag", dataTagSet); |
|
||||
List<DustDataTag> list = dustDataTagService.list(dataTagQueryWrapper); |
|
||||
Map<String, DustDataTag> collect = list.stream().collect(Collectors.toMap(DustDataTag::getDataTag, Function.identity())); |
|
||||
for (DustDataTag metaDataValue : metaDataValues) { |
|
||||
DustDataTag dustDataTag = collect.get(metaDataValue.getDataTag()); |
|
||||
if (dustDataTag != null) { |
|
||||
metaDataValue.setId(dustDataTag.getId()); |
|
||||
} |
|
||||
} |
|
||||
dustDataTagService.saveOrUpdateBatch(metaDataValues); |
|
||||
} catch (Exception e) { |
|
||||
e.printStackTrace(); |
|
||||
return Result.error("导入失败:" + e.getMessage()); |
|
||||
} |
|
||||
return Result.ok("导入成功"); |
|
||||
} |
|
||||
|
|
||||
public void checkUniqueName(DustDataTag origin) { |
|
||||
QueryWrapper<DustDataTag> coalQueryWrapper = new QueryWrapper<>(); |
|
||||
coalQueryWrapper.eq("data_tag", origin.getDataTag()); |
|
||||
DustDataTag existing = dustDataTagService.getOne(coalQueryWrapper); |
|
||||
|
|
||||
if (existing != null) { |
|
||||
if (origin.getId() != null) { |
|
||||
// ID不同且名称已被占用才抛异常
|
|
||||
if (!existing.getId().equals(origin.getId())) { |
|
||||
throw new IllegalArgumentException("数据点位 '" + origin.getDataTag() + "' 已存在"); |
|
||||
} |
|
||||
// ID相同是更新自身,不抛异常,直接返回
|
|
||||
return; |
|
||||
} |
|
||||
throw new IllegalArgumentException("数据点位 '" + origin.getDataTag() + "' 已存在"); |
|
||||
} |
|
||||
} |
|
||||
} |
|
@ -1,242 +0,0 @@ |
|||||
package cc.admin.modules.dust.controller; |
|
||||
|
|
||||
import cc.admin.common.api.vo.Result; |
|
||||
import cc.admin.common.aspect.annotation.AutoLog; |
|
||||
import cc.admin.common.util.RedisUtil; |
|
||||
import cc.admin.influxdb.core.InfluxdbTemplate; |
|
||||
import cc.admin.influxdb.dust.DustLog; |
|
||||
import cc.admin.modules.dust.entity.*; |
|
||||
import cc.admin.modules.dust.service.*; |
|
||||
import cc.admin.modules.dust.utils.KeyUtils; |
|
||||
import cc.admin.modules.dust.vo.DataTagPair; |
|
||||
import cc.admin.modules.dust.vo.DustMonitorItemVo; |
|
||||
import cn.hutool.core.bean.BeanUtil; |
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
|
||||
import com.baomidou.mybatisplus.core.toolkit.CollectionUtils; |
|
||||
import com.baomidou.mybatisplus.core.toolkit.ObjectUtils; |
|
||||
import io.swagger.annotations.Api; |
|
||||
import io.swagger.annotations.ApiOperation; |
|
||||
import lombok.extern.slf4j.Slf4j; |
|
||||
import org.springframework.beans.factory.annotation.Autowired; |
|
||||
import org.springframework.web.bind.annotation.*; |
|
||||
|
|
||||
import javax.servlet.http.HttpServletRequest; |
|
||||
import java.time.LocalDateTime; |
|
||||
import java.time.ZoneOffset; |
|
||||
import java.time.format.DateTimeFormatter; |
|
||||
import java.util.ArrayList; |
|
||||
import java.util.HashMap; |
|
||||
import java.util.List; |
|
||||
import java.util.Map; |
|
||||
import java.util.stream.Collectors; |
|
||||
|
|
||||
/** |
|
||||
* @Description: 综合监控 |
|
||||
* @Author: cc-admin |
|
||||
* @Date: 2025-03-27 |
|
||||
* @Version: V1.0.0 |
|
||||
*/ |
|
||||
@Slf4j |
|
||||
@Api(tags = "综合监控") |
|
||||
@RestController |
|
||||
@RequestMapping("/dust/monitor") |
|
||||
public class DustMonitorController { |
|
||||
@Autowired |
|
||||
private IDustDataTagService iDustDataTagService; |
|
||||
@Autowired |
|
||||
private IDustValveService dustValveService; |
|
||||
@Autowired |
|
||||
private IDustMonitorItemService dustMonitorItemService; |
|
||||
@Autowired |
|
||||
private IDustMonitorValveService dustMonitorValveService; |
|
||||
@Autowired |
|
||||
private InfluxdbTemplate influxdbTemplate; |
|
||||
@Autowired |
|
||||
private RedisUtil redisUtil; |
|
||||
|
|
||||
@AutoLog(value = "大屏监控-监控看板") |
|
||||
@ApiOperation(value = "大屏监控-监控看板", notes = "大屏监控项表-监控看板") |
|
||||
@GetMapping(value = "/boardList") |
|
||||
public Result<?> boardList(HttpServletRequest req) { |
|
||||
|
|
||||
ArrayList<DustMonitorItemVo> monitorItemList = new ArrayList<>(); |
|
||||
|
|
||||
Map<Object, Object> hmget = redisUtil.hmget(KeyUtils.dustdataTag); |
|
||||
if (ObjectUtils.isEmpty(hmget)) { |
|
||||
return Result.ok(monitorItemList); |
|
||||
} |
|
||||
|
|
||||
List<DustMonitorItem> list = dustMonitorItemService.list(); |
|
||||
Map<String, DustMonitorItem> collect = list.stream().collect(Collectors.toMap( |
|
||||
DustMonitorItem::getSystemId, // Key mapper
|
|
||||
item -> item, // Value mapper
|
|
||||
(existing, replacement) -> existing // Merge function (keep the first item if duplicate keys)
|
|
||||
)); |
|
||||
for (String systemId : collect.keySet()) { |
|
||||
DustMonitorItem dustMonitorItem = collect.get(systemId); |
|
||||
DustMonitorItemVo vo = new DustMonitorItemVo(); |
|
||||
BeanUtil.copyProperties(dustMonitorItem, vo); |
|
||||
Double inletPressure = hmget.get(dustMonitorItem.getInletPressureDataTagId()) != null |
|
||||
? Double.valueOf(hmget.get(dustMonitorItem.getInletPressureDataTagId()).toString()) : null; |
|
||||
|
|
||||
Double outletPressure = hmget.get(dustMonitorItem.getOutletPressureDataTagId()) != null |
|
||||
? Double.valueOf(hmget.get(dustMonitorItem.getOutletPressureDataTagId()).toString()) : null; |
|
||||
|
|
||||
Double pressureDifference = hmget.get(dustMonitorItem.getPressureDifferenceId()) != null |
|
||||
? Double.valueOf(hmget.get(dustMonitorItem.getPressureDifferenceId()).toString()) : null; |
|
||||
|
|
||||
Double fanSpeed = hmget.get(dustMonitorItem.getFanSpeedDataTagId()) != null |
|
||||
? Double.valueOf(hmget.get(dustMonitorItem.getFanSpeedDataTagId()).toString()) : null; |
|
||||
|
|
||||
Double motorCurrent = hmget.get(dustMonitorItem.getMotorCurrentDataTagId()) != null |
|
||||
? Double.valueOf(hmget.get(dustMonitorItem.getMotorCurrentDataTagId()).toString()) : null; |
|
||||
|
|
||||
Double cemsAirVolume = hmget.get(dustMonitorItem.getCemsAirVolumeDataTagId()) != null |
|
||||
? Double.valueOf(hmget.get(dustMonitorItem.getCemsAirVolumeDataTagId()).toString()) : null; |
|
||||
|
|
||||
Double dustConcentration = hmget.get(dustMonitorItem.getDustConcentrationDataTagId()) != null |
|
||||
? Double.valueOf(hmget.get(dustMonitorItem.getDustConcentrationDataTagId()).toString()) : null; |
|
||||
|
|
||||
Integer fanStatus = toInteger(hmget.get(dustMonitorItem.getFanStatusDataTagId())); |
|
||||
vo.setInletPressureDataTagValue(inletPressure); |
|
||||
vo.setOutletPressureDataTagValue(outletPressure); |
|
||||
vo.setPressureDifference(pressureDifference); |
|
||||
vo.setFanSpeedDataTagValue(fanSpeed); |
|
||||
vo.setMotorCurrentDataTagValue(motorCurrent); |
|
||||
vo.setCemsAirVolumeDataTagValue(cemsAirVolume); |
|
||||
vo.setDustConcentrationDataTagValue(dustConcentration); |
|
||||
vo.setFanStatusDataTagStatus(fanStatus); |
|
||||
monitorItemList.add(vo); |
|
||||
} |
|
||||
|
|
||||
return Result.ok(monitorItemList); |
|
||||
} |
|
||||
|
|
||||
private Integer toInteger(Object value) { |
|
||||
if (value == null) return null; |
|
||||
try { |
|
||||
return Integer.valueOf(value.toString()); |
|
||||
} catch (NumberFormatException e) { |
|
||||
return null; // 或返回默认值,比如 0
|
|
||||
} |
|
||||
} |
|
||||
|
|
||||
@AutoLog(value = "大屏监控-阀门点位") |
|
||||
@ApiOperation(value = "大屏监控-阀门点位", notes = "大屏监控项表-阀门点位") |
|
||||
@GetMapping(value = "/boardValve") |
|
||||
public Result<?> boardValve(HttpServletRequest req) { |
|
||||
|
|
||||
Map<Object, Object> hmget = redisUtil.hmget(KeyUtils.dustdataTag); |
|
||||
|
|
||||
List<DustMonitorValve> list = dustMonitorValveService.valveList(); |
|
||||
|
|
||||
Map<String, DustMonitorValve> collect = list.stream().collect(Collectors.toMap( |
|
||||
DustMonitorValve::getValveId, // Key mapper
|
|
||||
item -> item, // Value mapper
|
|
||||
(existing, replacement) -> existing // Merge function (keep the first item if duplicate keys)
|
|
||||
)); |
|
||||
ArrayList<DustMonitorValve> objects = new ArrayList<>(); |
|
||||
for (String key : collect.keySet()) { |
|
||||
DustMonitorValve dustMonitorValve = collect.get(key); |
|
||||
Integer status = toInteger(hmget.get(dustMonitorValve.getDataTagId())); |
|
||||
dustMonitorValve.setStatus(status); |
|
||||
objects.add(dustMonitorValve); |
|
||||
} |
|
||||
return Result.ok(objects); |
|
||||
} |
|
||||
|
|
||||
@AutoLog(value = "大屏监控-阀门状态") |
|
||||
@ApiOperation(value = "大屏监控表-阀门状态", notes = "大屏监控项表-阀门状态") |
|
||||
@GetMapping(value = "/valveStatusList") |
|
||||
public Result<?> valveStatusList(HttpServletRequest req, |
|
||||
@RequestParam(name = "systemId", required = true) String systemId) { |
|
||||
|
|
||||
QueryWrapper<DustValve> valveQueryWrapper = new QueryWrapper<>(); |
|
||||
valveQueryWrapper.eq("system_id", systemId); |
|
||||
List<DustValve> list = dustValveService.list(valveQueryWrapper); |
|
||||
if (ObjectUtils.isEmpty(list)) { |
|
||||
return Result.ok(new ArrayList<>()); |
|
||||
} |
|
||||
Map<Object, Object> hmget = redisUtil.hmget(KeyUtils.dustdataTag); |
|
||||
for (DustValve dustValve : list) { |
|
||||
Integer status = toInteger(hmget.get(dustValve.getDataTagId())); |
|
||||
dustValve.setStatus(status); |
|
||||
} |
|
||||
return Result.ok(list); |
|
||||
} |
|
||||
|
|
||||
@AutoLog(value = "历史记录") |
|
||||
@ApiOperation(value = "历史记录", notes = "历史记录") |
|
||||
@GetMapping(value = "/historyList") |
|
||||
public Result<?> historyList(HttpServletRequest req, |
|
||||
@RequestParam(name = "systemId", required = true) String systemId, |
|
||||
@RequestParam(name = "startTime", required = true) String startTime, |
|
||||
@RequestParam(name = "endTime", required = true) String endTime) { |
|
||||
|
|
||||
QueryWrapper<DustMonitorItem> objectQueryWrapper = new QueryWrapper<>(); |
|
||||
objectQueryWrapper.eq("system_id", systemId); |
|
||||
DustMonitorItem one = dustMonitorItemService.getOne(objectQueryWrapper); |
|
||||
if (ObjectUtils.isEmpty(one)) { |
|
||||
return Result.ok(new ArrayList<>()); |
|
||||
} |
|
||||
// 从 one 中提取 dataTag 列表
|
|
||||
List<DataTagPair> dataTag = new ArrayList<>(); |
|
||||
dataTag.add(new DataTagPair(one.getInletPressureDataTagId(), "除尘器进气压力(pa)")); |
|
||||
dataTag.add(new DataTagPair(one.getOutletPressureDataTagId(), "除尘器出气压力(pa)")); |
|
||||
dataTag.add(new DataTagPair(one.getFanSpeedDataTagId(), "风机转速(r/min)")); |
|
||||
dataTag.add(new DataTagPair(one.getMotorCurrentDataTagId(), "电机电流(A)")); |
|
||||
dataTag.add(new DataTagPair(one.getDustConcentrationDataTagId(), "粉尘浓度(mg/m³)")); |
|
||||
dataTag.add(new DataTagPair(one.getCemsAirVolumeDataTagId(), "烟尘CEMS风量(m³/h)")); |
|
||||
dataTag.add(new DataTagPair(one.getPressureDifferenceId(), "除尘器进出口压差(pa)")); |
|
||||
|
|
||||
QueryWrapper<DustDataTag> dataTagQueryWrapper = new QueryWrapper<>(); |
|
||||
dataTagQueryWrapper.in("id", dataTag.stream().map(DataTagPair::getTagId).collect(Collectors.toList())); |
|
||||
List<DustDataTag> list = iDustDataTagService.list(dataTagQueryWrapper); |
|
||||
|
|
||||
HashMap<String, List<DustLog>> resultMap = new HashMap<>(); |
|
||||
if (CollectionUtils.isNotEmpty(list)) { |
|
||||
// 时间格式化和转换
|
|
||||
DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss"); |
|
||||
LocalDateTime startTimeDateTime = LocalDateTime.parse(startTime, formatter); |
|
||||
LocalDateTime endTimeDateTime = LocalDateTime.parse(endTime, formatter); |
|
||||
long startTimeEpochSeconds = startTimeDateTime.toEpochSecond(ZoneOffset.UTC); |
|
||||
long endTimeEpochSeconds = endTimeDateTime.toEpochSecond(ZoneOffset.UTC); |
|
||||
|
|
||||
|
|
||||
Map<String, DustDataTag> tagIdToDustDataTag = list.stream() |
|
||||
.collect(Collectors.toMap( |
|
||||
DustDataTag::getId, |
|
||||
dustDataTag -> dustDataTag, |
|
||||
(existing, replacement) -> existing |
|
||||
)); |
|
||||
|
|
||||
for (DataTagPair dataTagPair : dataTag) { |
|
||||
String tagId = dataTagPair.getTagId(); |
|
||||
String description = dataTagPair.getDescription(); |
|
||||
DustDataTag dustDataTag = tagIdToDustDataTag.get(tagId); |
|
||||
if (dustDataTag != null) { |
|
||||
String sqlStr = String.format( |
|
||||
"SELECT first(value) as value " + // 这里添加了空格
|
|
||||
"FROM dust_log " + |
|
||||
"WHERE time >= %ds AND time <= %ds " + |
|
||||
"AND dataTag = '%s' " + |
|
||||
"GROUP BY time(1m)", |
|
||||
startTimeEpochSeconds, endTimeEpochSeconds, dustDataTag.getId() |
|
||||
); |
|
||||
|
|
||||
String format = String.format(sqlStr, startTimeEpochSeconds, endTimeEpochSeconds); |
|
||||
List<DustLog> mqttLogs = influxdbTemplate.selectList( |
|
||||
format, |
|
||||
DustLog.class); |
|
||||
mqttLogs = mqttLogs.stream() |
|
||||
.filter(log -> log.getValue() != null) |
|
||||
.collect(Collectors.toList()); |
|
||||
resultMap.put(description, mqttLogs); |
|
||||
} else { |
|
||||
resultMap.put(description, new ArrayList<>()); |
|
||||
} |
|
||||
} |
|
||||
} |
|
||||
return Result.ok(resultMap); |
|
||||
} |
|
||||
} |
|
@ -1,328 +0,0 @@ |
|||||
package cc.admin.modules.dust.controller; |
|
||||
|
|
||||
import cc.admin.common.api.vo.Result; |
|
||||
import cc.admin.common.aspect.annotation.AutoLog; |
|
||||
import cc.admin.common.sys.base.controller.BaseController; |
|
||||
import cc.admin.common.sys.query.QueryGenerator; |
|
||||
import cc.admin.modules.dust.entity.DustDataTag; |
|
||||
import cc.admin.modules.dust.entity.DustMonitorItem; |
|
||||
import cc.admin.modules.dust.entity.DustSystem; |
|
||||
import cc.admin.modules.dust.entity.DustValve; |
|
||||
import cc.admin.modules.dust.enums.ValveType; |
|
||||
import cc.admin.modules.dust.service.IDustDataTagService; |
|
||||
import cc.admin.modules.dust.service.IDustMonitorItemService; |
|
||||
import cc.admin.modules.dust.service.IDustSystemService; |
|
||||
import cc.admin.modules.dust.vo.DataValveExcel; |
|
||||
import cc.admin.modules.dust.vo.DustMonitorItemExcel; |
|
||||
import cn.hutool.core.bean.BeanUtil; |
|
||||
import cn.hutool.core.util.IdUtil; |
|
||||
import cn.hutool.core.util.StrUtil; |
|
||||
import com.alibaba.excel.EasyExcelFactory; |
|
||||
import com.alibaba.excel.context.AnalysisContext; |
|
||||
import com.alibaba.excel.event.AnalysisEventListener; |
|
||||
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.Api; |
|
||||
import io.swagger.annotations.ApiOperation; |
|
||||
import lombok.extern.slf4j.Slf4j; |
|
||||
import org.apache.commons.lang3.StringUtils; |
|
||||
import org.springframework.beans.factory.annotation.Autowired; |
|
||||
import org.springframework.web.bind.annotation.*; |
|
||||
import org.springframework.web.multipart.MultipartFile; |
|
||||
import org.springframework.web.multipart.MultipartHttpServletRequest; |
|
||||
import org.springframework.web.servlet.ModelAndView; |
|
||||
|
|
||||
import javax.servlet.http.HttpServletRequest; |
|
||||
import javax.servlet.http.HttpServletResponse; |
|
||||
import java.util.*; |
|
||||
import java.util.function.Consumer; |
|
||||
import java.util.function.Function; |
|
||||
import java.util.stream.Collectors; |
|
||||
|
|
||||
/** |
|
||||
* @Description: 大屏监控项表 |
|
||||
* @Author: cc-admin |
|
||||
* @Date: 2025-03-27 |
|
||||
* @Version: V1.0.0 |
|
||||
*/ |
|
||||
@Slf4j |
|
||||
@Api(tags = "大屏监控项表") |
|
||||
@RestController |
|
||||
@RequestMapping("/dust/monitorItem") |
|
||||
public class DustMonitorItemController extends BaseController<DustMonitorItem, IDustMonitorItemService> { |
|
||||
@Autowired |
|
||||
private IDustMonitorItemService dustMonitorItemService; |
|
||||
@Autowired |
|
||||
private IDustSystemService dustSystemService; |
|
||||
@Autowired |
|
||||
private IDustDataTagService dustDataTagService; |
|
||||
/** |
|
||||
* 分页列表查询 |
|
||||
* |
|
||||
* @param key |
|
||||
* @param pageNo |
|
||||
* @param pageSize |
|
||||
* @param req |
|
||||
* @return |
|
||||
*/ |
|
||||
@AutoLog(value = "大屏监控项表-分页列表查询") |
|
||||
@ApiOperation(value = "大屏监控项表-分页列表查询", notes = "大屏监控项表-分页列表查询") |
|
||||
@GetMapping(value = "/list") |
|
||||
public Result<?> queryPageList( |
|
||||
@RequestParam(name = "key", required = false) String key, |
|
||||
@RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo, |
|
||||
@RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize, |
|
||||
HttpServletRequest req) { |
|
||||
QueryWrapper<DustMonitorItem> queryWrapper = QueryGenerator.initQueryWrapper(new DustMonitorItem(), req.getParameterMap()); |
|
||||
if (StrUtil.isNotEmpty(key)) { |
|
||||
|
|
||||
} |
|
||||
queryWrapper.orderByAsc("sort_order") |
|
||||
.orderByDesc("create_time"); |
|
||||
Page<DustMonitorItem> page = new Page<DustMonitorItem>(pageNo, pageSize); |
|
||||
IPage<DustMonitorItem> pageList = dustMonitorItemService.page(page, queryWrapper); |
|
||||
return Result.ok(pageList); |
|
||||
} |
|
||||
|
|
||||
/** |
|
||||
* 添加 |
|
||||
* |
|
||||
* @param dustMonitorItem |
|
||||
* @return |
|
||||
*/ |
|
||||
@AutoLog(value = "大屏监控项表-添加") |
|
||||
@ApiOperation(value = "大屏监控项表-添加", notes = "大屏监控项表-添加") |
|
||||
@PostMapping(value = "/add") |
|
||||
public Result<?> add(@RequestBody DustMonitorItem dustMonitorItem) { |
|
||||
checkUniqueName(dustMonitorItem); |
|
||||
dustMonitorItemService.save(dustMonitorItem); |
|
||||
return Result.ok("添加成功!"); |
|
||||
} |
|
||||
|
|
||||
/** |
|
||||
* 编辑 |
|
||||
* |
|
||||
* @param dustMonitorItem |
|
||||
* @return |
|
||||
*/ |
|
||||
@AutoLog(value = "大屏监控项表-编辑") |
|
||||
@ApiOperation(value = "大屏监控项表-编辑", notes = "大屏监控项表-编辑") |
|
||||
@PutMapping(value = "/edit") |
|
||||
public Result<?> edit(@RequestBody DustMonitorItem dustMonitorItem) { |
|
||||
checkUniqueName(dustMonitorItem); |
|
||||
dustMonitorItemService.updateById(dustMonitorItem); |
|
||||
return Result.ok("编辑成功!"); |
|
||||
} |
|
||||
|
|
||||
|
|
||||
/** |
|
||||
* 通过id删除 |
|
||||
* |
|
||||
* @param id |
|
||||
* @return |
|
||||
*/ |
|
||||
@AutoLog(value = "大屏监控项表-通过id删除") |
|
||||
@ApiOperation(value = "大屏监控项表-通过id删除", notes = "大屏监控项表-通过id删除") |
|
||||
@DeleteMapping(value = "/delete") |
|
||||
public Result<?> delete(@RequestParam(name = "id", required = true) String id) { |
|
||||
dustMonitorItemService.removeById(id); |
|
||||
return Result.ok("删除成功!"); |
|
||||
} |
|
||||
|
|
||||
/** |
|
||||
* 批量删除 |
|
||||
* |
|
||||
* @param ids |
|
||||
* @return |
|
||||
*/ |
|
||||
@AutoLog(value = "大屏监控项表-批量删除") |
|
||||
@ApiOperation(value = "大屏监控项表-批量删除", notes = "大屏监控项表-批量删除") |
|
||||
@DeleteMapping(value = "/deleteBatch") |
|
||||
public Result<?> deleteBatch(@RequestParam(name = "ids", required = true) String ids) { |
|
||||
this.dustMonitorItemService.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) { |
|
||||
DustMonitorItem dustMonitorItem = dustMonitorItemService.getById(id); |
|
||||
return Result.ok(dustMonitorItem); |
|
||||
} |
|
||||
|
|
||||
/** |
|
||||
* 导出excel |
|
||||
* |
|
||||
* @param request |
|
||||
* @param dustMonitorItem |
|
||||
*/ |
|
||||
@RequestMapping(value = "/exportXls") |
|
||||
public ModelAndView exportXls(HttpServletRequest request, HttpServletResponse response, DustMonitorItem dustMonitorItem) { |
|
||||
response.setHeader("Access-Control-Expose-Headers", "Content-Disposition"); |
|
||||
return super.exportXls(request, dustMonitorItem, DustMonitorItem.class, "大屏监控项表"); |
|
||||
} |
|
||||
|
|
||||
|
|
||||
@RequestMapping(value = "/importExcel", method = RequestMethod.POST) |
|
||||
public Result<?> importExcel(HttpServletRequest request, |
|
||||
HttpServletResponse response) { |
|
||||
try { |
|
||||
MultipartHttpServletRequest multipartRequest = (MultipartHttpServletRequest) request; |
|
||||
Map<String, MultipartFile> fileMap = multipartRequest.getFileMap(); |
|
||||
|
|
||||
if (fileMap.isEmpty()) { |
|
||||
return Result.error("请上传 Excel 文件"); |
|
||||
} |
|
||||
|
|
||||
MultipartFile file = fileMap.values().iterator().next(); |
|
||||
if (file == null || file.isEmpty()) { |
|
||||
return Result.error("上传的文件为空"); |
|
||||
} |
|
||||
List<DustMonitorItemExcel> metaDataValues = new ArrayList<>(); |
|
||||
List<String> errorList = new ArrayList<>(); |
|
||||
HashSet<String> idSet = new HashSet<>(); |
|
||||
HashSet<String> NameSet = new HashSet<>(); |
|
||||
|
|
||||
EasyExcelFactory.read(file.getInputStream(), DustMonitorItemExcel.class, |
|
||||
new AnalysisEventListener<DustMonitorItemExcel>() { |
|
||||
@Override |
|
||||
public void invoke(DustMonitorItemExcel rowData, AnalysisContext context) { |
|
||||
int rowIndex = context.readRowHolder().getRowIndex() + 1; |
|
||||
|
|
||||
// 将所有 dataTag 添加到 idSet 并检查重复
|
|
||||
String[] dataTags = { |
|
||||
rowData.getCemsAirVolumeDataTagName()+rowData.getSystemName(), |
|
||||
rowData.getOutletPressureDataTagName()+rowData.getSystemName(), |
|
||||
rowData.getInletPressureDataTagName()+rowData.getSystemName(), |
|
||||
rowData.getDustConcentrationDataTagName()+rowData.getSystemName(), |
|
||||
rowData.getFanStatusDataTagStatusName()+rowData.getSystemName(), |
|
||||
rowData.getFanSpeedDataTagName()+rowData.getSystemName(), |
|
||||
rowData.getMotorCurrentDataTagName()+rowData.getSystemName() |
|
||||
}; |
|
||||
NameSet.add(rowData.getCemsAirVolumeDataTagName()); |
|
||||
NameSet.add(rowData.getOutletPressureDataTagName()); |
|
||||
NameSet.add(rowData.getInletPressureDataTagName()); |
|
||||
NameSet.add(rowData.getDustConcentrationDataTagName()); |
|
||||
NameSet.add(rowData.getFanStatusDataTagStatusName()); |
|
||||
NameSet.add(rowData.getFanSpeedDataTagName()); |
|
||||
NameSet.add(rowData.getMotorCurrentDataTagName()); |
|
||||
// 检查 dataTag 是否重复
|
|
||||
for (String dataTag : dataTags) { |
|
||||
if (StringUtils.isNotEmpty(dataTag)) { // 跳过空值
|
|
||||
if (!idSet.add(dataTag)) { // 如果添加失败,说明已存在
|
|
||||
errorList.add(String.format("第 %d 行数据重复:数据点位 %s 已存在", rowIndex, dataTag)); |
|
||||
return; // 发现重复后直接返回(根据你的代码逻辑)
|
|
||||
} |
|
||||
} |
|
||||
} |
|
||||
metaDataValues.add(rowData); |
|
||||
} |
|
||||
|
|
||||
|
|
||||
@Override |
|
||||
public void doAfterAllAnalysed(AnalysisContext context) { |
|
||||
log.info("所有数据读取完成,共有 " + metaDataValues.size() + " 条数据"); |
|
||||
} |
|
||||
}) |
|
||||
.sheet() |
|
||||
.doRead(); |
|
||||
|
|
||||
if (!errorList.isEmpty()) { |
|
||||
return Result.error("导入失败,存在以下错误:\n" + String.join("\n", errorList)); |
|
||||
} |
|
||||
|
|
||||
List<DustSystem> systemList = dustSystemService.list(); |
|
||||
Map<String, DustSystem> systemMap = systemList.stream().collect(Collectors.toMap(DustSystem::getName, dustSystem -> dustSystem)); |
|
||||
|
|
||||
QueryWrapper<DustDataTag> objectQueryWrapper = new QueryWrapper<>(); |
|
||||
objectQueryWrapper.eq("name",idSet); |
|
||||
List<DustDataTag> dataTagList = dustDataTagService.list(objectQueryWrapper); |
|
||||
Map<String, DustDataTag> tagMap = dataTagList.stream().collect(Collectors.toMap( |
|
||||
dustDataTag -> dustDataTag.getDataTag() + dustDataTag.getSystemId(), |
|
||||
Function.identity())); |
|
||||
ArrayList<DustMonitorItem> objects = new ArrayList<>(); |
|
||||
|
|
||||
|
|
||||
List<DustMonitorItem> list = dustMonitorItemService.list(); |
|
||||
Map<String, DustMonitorItem> collect = list.stream().collect(Collectors.toMap(DustMonitorItem::getSystemId, Function.identity())); |
|
||||
|
|
||||
for (DustMonitorItemExcel metaDataValue : metaDataValues) { |
|
||||
DustMonitorItem dustMonitorItem = new DustMonitorItem(); |
|
||||
DustSystem dustSystem = systemMap.get(metaDataValue.getSystemName().trim()); |
|
||||
if (null != dustSystem){ |
|
||||
dustMonitorItem.setSystemId(dustSystem.getId()); |
|
||||
} |
|
||||
DustDataTag dustDataTag = tagMap.get(metaDataValue.getInletPressureDataTagName().trim()+ dustMonitorItem.getSystemId()); |
|
||||
if (dustDataTag != null){ |
|
||||
dustMonitorItem.setInletPressureDataTagId(dustDataTag.getId()); |
|
||||
} |
|
||||
DustDataTag dustDataTag1 = tagMap.get(metaDataValue.getOutletPressureDataTagName().trim() + dustMonitorItem.getSystemId()); |
|
||||
if (dustDataTag1 != null){ |
|
||||
dustMonitorItem.setOutletPressureDataTagId(dustDataTag1.getId()); |
|
||||
} |
|
||||
|
|
||||
DustDataTag dustDataTag2 = tagMap.get(metaDataValue.getDustConcentrationDataTagName().trim() + dustMonitorItem.getSystemId()); |
|
||||
if (dustDataTag2 != null){ |
|
||||
dustMonitorItem.setDustConcentrationDataTagId(dustDataTag2.getId()); |
|
||||
} |
|
||||
|
|
||||
DustDataTag dustDataTag3 = tagMap.get(metaDataValue.getCemsAirVolumeDataTagName().trim() + dustMonitorItem.getSystemId()); |
|
||||
if (dustDataTag3 != null){ |
|
||||
dustMonitorItem.setCemsAirVolumeDataTagId(dustDataTag3.getId()); |
|
||||
} |
|
||||
|
|
||||
DustDataTag dustDataTag4 = tagMap.get(metaDataValue.getMotorCurrentDataTagName().trim() + dustMonitorItem.getSystemId()); |
|
||||
if (dustDataTag4 != null){ |
|
||||
dustMonitorItem.setMotorCurrentDataTagId(dustDataTag4.getId()); |
|
||||
} |
|
||||
|
|
||||
DustDataTag dustDataTag5 = tagMap.get(metaDataValue.getFanStatusDataTagStatusName().trim() + dustMonitorItem.getSystemId()); |
|
||||
if (dustDataTag5 != null){ |
|
||||
dustMonitorItem.setFanStatusDataTagId(dustDataTag5.getId()); |
|
||||
} |
|
||||
|
|
||||
DustDataTag dustDataTag6 = tagMap.get(metaDataValue.getFanSpeedDataTagName().trim() + dustMonitorItem.getSystemId()); |
|
||||
if (dustDataTag6 != null){ |
|
||||
dustMonitorItem.setFanSpeedDataTagId(dustDataTag6.getId()); |
|
||||
} |
|
||||
|
|
||||
DustMonitorItem dustMonitorItem1 = collect.get(dustMonitorItem.getSystemId()); |
|
||||
if (null != dustMonitorItem1){ |
|
||||
dustMonitorItem.setId(dustMonitorItem1.getId()); |
|
||||
} |
|
||||
objects.add(dustMonitorItem); |
|
||||
} |
|
||||
dustMonitorItemService.saveOrUpdateBatch(objects); |
|
||||
} catch (Exception e) { |
|
||||
e.printStackTrace(); |
|
||||
return Result.error("导入失败:" + e.getMessage()); |
|
||||
} |
|
||||
return Result.ok("导入成功"); |
|
||||
} |
|
||||
|
|
||||
public void checkUniqueName(DustMonitorItem item) { |
|
||||
QueryWrapper<DustMonitorItem> coalQueryWrapper = new QueryWrapper<>(); |
|
||||
coalQueryWrapper.eq("system_id", item.getSystemId()); |
|
||||
DustMonitorItem existing = dustMonitorItemService.getOne(coalQueryWrapper); |
|
||||
|
|
||||
if (existing != null) { |
|
||||
if (item.getId() != null) { |
|
||||
// ID不同且名称已被占用才抛异常
|
|
||||
if (!existing.getId().equals(item.getId())) { |
|
||||
throw new IllegalArgumentException("系统已存在"); |
|
||||
} |
|
||||
// ID相同是更新自身,不抛异常,直接返回
|
|
||||
return; |
|
||||
} |
|
||||
throw new IllegalArgumentException("系统已存在"); |
|
||||
} |
|
||||
} |
|
||||
} |
|
@ -1,341 +0,0 @@ |
|||||
package cc.admin.modules.dust.controller; |
|
||||
|
|
||||
import cc.admin.common.api.vo.Result; |
|
||||
import cc.admin.common.aspect.annotation.AutoLog; |
|
||||
import cc.admin.common.sys.base.controller.BaseController; |
|
||||
import cc.admin.common.sys.query.QueryGenerator; |
|
||||
import cc.admin.modules.dust.entity.DustDataTag; |
|
||||
import cc.admin.modules.dust.entity.DustSystem; |
|
||||
import cc.admin.modules.dust.entity.DustValve; |
|
||||
import cc.admin.modules.dust.enums.ValveType; |
|
||||
import cc.admin.modules.dust.service.IDustDataTagService; |
|
||||
import cc.admin.modules.dust.service.IDustSystemService; |
|
||||
import cc.admin.modules.dust.service.IDustValveService; |
|
||||
import cc.admin.modules.dust.utils.BeanCopyUtil; |
|
||||
import cc.admin.modules.dust.vo.DataTagExcel; |
|
||||
import cc.admin.modules.dust.vo.DataValveExcel; |
|
||||
import cn.hutool.core.bean.BeanUtil; |
|
||||
import cn.hutool.core.util.IdUtil; |
|
||||
import cn.hutool.core.util.StrUtil; |
|
||||
import com.alibaba.excel.EasyExcelFactory; |
|
||||
import com.alibaba.excel.context.AnalysisContext; |
|
||||
import com.alibaba.excel.event.AnalysisEventListener; |
|
||||
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.Api; |
|
||||
import io.swagger.annotations.ApiOperation; |
|
||||
import lombok.extern.slf4j.Slf4j; |
|
||||
import org.apache.commons.lang3.StringUtils; |
|
||||
import org.springframework.beans.factory.annotation.Autowired; |
|
||||
import org.springframework.web.bind.annotation.*; |
|
||||
import org.springframework.web.multipart.MultipartFile; |
|
||||
import org.springframework.web.multipart.MultipartHttpServletRequest; |
|
||||
import org.springframework.web.servlet.ModelAndView; |
|
||||
|
|
||||
import javax.servlet.http.HttpServletRequest; |
|
||||
import javax.servlet.http.HttpServletResponse; |
|
||||
import java.util.*; |
|
||||
import java.util.function.Function; |
|
||||
import java.util.stream.Collectors; |
|
||||
|
|
||||
/** |
|
||||
* @Description: 阀门表 |
|
||||
* @Author: cc-admin |
|
||||
* @Date: 2025-03-27 |
|
||||
* @Version: V1.0.0 |
|
||||
*/ |
|
||||
@Slf4j |
|
||||
@Api(tags = "阀门表") |
|
||||
@RestController |
|
||||
@RequestMapping("/dust/valve") |
|
||||
public class DustValveController extends BaseController<DustValve, IDustValveService> { |
|
||||
@Autowired |
|
||||
private IDustValveService dustValveService; |
|
||||
@Autowired |
|
||||
private IDustDataTagService dustDataTagService; |
|
||||
@Autowired |
|
||||
private IDustSystemService dustSystemService; |
|
||||
|
|
||||
/** |
|
||||
* 分页列表查询 |
|
||||
* @param pageNo |
|
||||
* @param pageSize |
|
||||
* @param req |
|
||||
* @return |
|
||||
*/ |
|
||||
@AutoLog(value = "阀门表-分页列表查询") |
|
||||
@ApiOperation(value = "阀门表-分页列表查询", notes = "阀门表-分页列表查询") |
|
||||
@GetMapping(value = "/list") |
|
||||
public Result<?> queryPageList( |
|
||||
@RequestParam(name = "systemId", required = false) String systemId, |
|
||||
@RequestParam(name = "dataTagId", required = false) String dataTagId, |
|
||||
@RequestParam(name = "name", required = false) String name, |
|
||||
@RequestParam(name = "parameter", required = false) String parameter, |
|
||||
@RequestParam(name = "location", required = false) String location, |
|
||||
@RequestParam(name = "type", required = false) Integer type, |
|
||||
@RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo, |
|
||||
@RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize, |
|
||||
HttpServletRequest req) { |
|
||||
QueryWrapper<DustValve> queryWrapper = new QueryWrapper<>(); |
|
||||
if (StrUtil.isNotEmpty(parameter)) { |
|
||||
queryWrapper.like("parameter", parameter); // parameter 模糊查询
|
|
||||
} |
|
||||
if (StrUtil.isNotEmpty(location)) { |
|
||||
queryWrapper.like("location", location); // location 改为模糊查询
|
|
||||
} |
|
||||
if (StrUtil.isNotEmpty(name)) { |
|
||||
queryWrapper.like("name", name); // location 改为模糊查询
|
|
||||
} |
|
||||
if (null != type) { |
|
||||
queryWrapper.eq("type", type); // type 保持精确匹配
|
|
||||
} |
|
||||
if (StrUtil.isNotEmpty(systemId)) { |
|
||||
queryWrapper.eq("system_id", systemId); // systemId 保持精确匹配
|
|
||||
} |
|
||||
if (StrUtil.isNotEmpty(dataTagId)) { |
|
||||
queryWrapper.eq("data_tag_id", dataTagId); // systemId 保持精确匹配
|
|
||||
} |
|
||||
queryWrapper.orderByAsc("sort_order") |
|
||||
.orderByDesc("create_time"); |
|
||||
Page<DustValve> page = new Page<DustValve>(pageNo, pageSize); |
|
||||
IPage<DustValve> pageList = dustValveService.page(page, queryWrapper); |
|
||||
return Result.ok(pageList); |
|
||||
} |
|
||||
|
|
||||
/** |
|
||||
* 添加 |
|
||||
* |
|
||||
* @param dustValve |
|
||||
* @return |
|
||||
*/ |
|
||||
@AutoLog(value = "阀门表-添加") |
|
||||
@ApiOperation(value = "阀门表-添加", notes = "阀门表-添加") |
|
||||
@PostMapping(value = "/add") |
|
||||
public Result<?> add(@RequestBody DustValve dustValve) { |
|
||||
dustValveService.save(dustValve); |
|
||||
return Result.ok("添加成功!"); |
|
||||
} |
|
||||
|
|
||||
/** |
|
||||
* 编辑 |
|
||||
* |
|
||||
* @param dustValve |
|
||||
* @return |
|
||||
*/ |
|
||||
@AutoLog(value = "阀门表-编辑") |
|
||||
@ApiOperation(value = "阀门表-编辑", notes = "阀门表-编辑") |
|
||||
@PutMapping(value = "/edit") |
|
||||
public Result<?> edit(@RequestBody DustValve dustValve) { |
|
||||
dustValveService.updateById(dustValve); |
|
||||
return Result.ok("编辑成功!"); |
|
||||
} |
|
||||
|
|
||||
|
|
||||
/** |
|
||||
* 复制 |
|
||||
* |
|
||||
* @param id |
|
||||
* @param name |
|
||||
* @return |
|
||||
*/ |
|
||||
@AutoLog(value = "阀门表-复制") |
|
||||
@ApiOperation(value = "阀门表-复制", notes = "阀门表-复制") |
|
||||
@PostMapping(value = "/copy") |
|
||||
public Result<?> copy(@RequestParam(name = "id", required = true) String id, @RequestParam(name = "name", required = true) String name) { |
|
||||
DustValve dustValve = dustValveService.getById(id); |
|
||||
dustValve.setId(IdUtil.fastUUID()); |
|
||||
dustValve.setName(name); |
|
||||
dustValveService.save(dustValve); |
|
||||
return Result.ok("复制成功!"); |
|
||||
} |
|
||||
|
|
||||
/** |
|
||||
* 通过id删除 |
|
||||
* |
|
||||
* @param id |
|
||||
* @return |
|
||||
*/ |
|
||||
@AutoLog(value = "阀门表-通过id删除") |
|
||||
@ApiOperation(value = "阀门表-通过id删除", notes = "阀门表-通过id删除") |
|
||||
@DeleteMapping(value = "/delete") |
|
||||
public Result<?> delete(@RequestParam(name = "id", required = true) String id) { |
|
||||
dustValveService.removeById(id); |
|
||||
return Result.ok("删除成功!"); |
|
||||
} |
|
||||
|
|
||||
/** |
|
||||
* 批量删除 |
|
||||
* |
|
||||
* @param ids |
|
||||
* @return |
|
||||
*/ |
|
||||
@AutoLog(value = "阀门表-批量删除") |
|
||||
@ApiOperation(value = "阀门表-批量删除", notes = "阀门表-批量删除") |
|
||||
@DeleteMapping(value = "/deleteBatch") |
|
||||
public Result<?> deleteBatch(@RequestParam(name = "ids", required = true) String ids) { |
|
||||
this.dustValveService.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) { |
|
||||
DustValve dustValve = dustValveService.getById(id); |
|
||||
return Result.ok(dustValve); |
|
||||
} |
|
||||
|
|
||||
/** |
|
||||
* 导出excel |
|
||||
* |
|
||||
* @param request |
|
||||
* @param dustValve |
|
||||
*/ |
|
||||
@RequestMapping(value = "/exportXls") |
|
||||
public ModelAndView exportXls(HttpServletRequest request, HttpServletResponse response, DustValve dustValve) { |
|
||||
response.setHeader("Access-Control-Expose-Headers", "Content-Disposition"); |
|
||||
return super.exportXls(request, dustValve, DustValve.class, "阀门表"); |
|
||||
} |
|
||||
|
|
||||
/** |
|
||||
* 通过excel导入数据 |
|
||||
* |
|
||||
* @param request |
|
||||
* @param response |
|
||||
* @return |
|
||||
*/ |
|
||||
@RequestMapping(value = "/importExcel", method = RequestMethod.POST) |
|
||||
public Result<?> importExcel(HttpServletRequest request, |
|
||||
HttpServletResponse response) { |
|
||||
try { |
|
||||
MultipartHttpServletRequest multipartRequest = (MultipartHttpServletRequest) request; |
|
||||
Map<String, MultipartFile> fileMap = multipartRequest.getFileMap(); |
|
||||
|
|
||||
if (fileMap.isEmpty()) { |
|
||||
return Result.error("请上传 Excel 文件"); |
|
||||
} |
|
||||
|
|
||||
MultipartFile file = fileMap.values().iterator().next(); |
|
||||
if (file == null || file.isEmpty()) { |
|
||||
return Result.error("上传的文件为空"); |
|
||||
} |
|
||||
List<DustValve> metaDataValues = new ArrayList<>(); |
|
||||
List<String> errorList = new ArrayList<>(); |
|
||||
HashSet<String> set = new HashSet<>(); |
|
||||
HashSet<String> dataTagSet = new HashSet<>(); |
|
||||
HashSet<String> nameSet = new HashSet<>(); |
|
||||
|
|
||||
List<DustSystem> systemList = dustSystemService.list(); |
|
||||
Map<String, DustSystem> systemMap = systemList.stream().collect(Collectors.toMap(DustSystem::getName, dustSystem -> dustSystem)); |
|
||||
|
|
||||
|
|
||||
EasyExcelFactory.read(file.getInputStream(), DataValveExcel.class, |
|
||||
new AnalysisEventListener<DataValveExcel>() { |
|
||||
@Override |
|
||||
public void invoke(DataValveExcel rowData, AnalysisContext context) { |
|
||||
int rowIndex = context.readRowHolder().getRowIndex() + 1; |
|
||||
|
|
||||
if (StringUtils.isEmpty(rowData.getSystemName())) { |
|
||||
errorList.add(String.format("第 %d 行数据不完整:系统名称 为空", rowIndex)); |
|
||||
return; |
|
||||
} |
|
||||
|
|
||||
if (StringUtils.isEmpty(rowData.getName())) { |
|
||||
errorList.add(String.format("第 %d 行数据不完整:阀门名称 为空", rowIndex)); |
|
||||
return; |
|
||||
} |
|
||||
if (StringUtils.isEmpty(rowData.getTypeName())) { |
|
||||
errorList.add(String.format("第 %d 行数据不完整:类型 为空", rowIndex)); |
|
||||
return; |
|
||||
} |
|
||||
|
|
||||
if (StringUtils.isEmpty(rowData.getDataTag())) { |
|
||||
errorList.add(String.format("第 %d 行数据不完整:所属点位 为空", rowIndex)); |
|
||||
return; |
|
||||
} |
|
||||
// 检查 dataTag 是否重复
|
|
||||
String dataTag = rowData.getDataTag(); |
|
||||
if (!set.add(dataTag + rowData.getSystemName())) { |
|
||||
errorList.add(String.format("第 %d 行数据重复:数据点位 %s 已存在", rowIndex, dataTag)); |
|
||||
return; |
|
||||
} |
|
||||
|
|
||||
// 验证 typeName 是否合法
|
|
||||
Integer valveType; |
|
||||
try { |
|
||||
valveType = ValveType.getTypeByName(rowData.getTypeName()); |
|
||||
} catch (IllegalArgumentException e) { |
|
||||
errorList.add(String.format("第 %d 行数据无效:类型 %s 不合法,应为 '升关阀' 或 '调节阀'", rowIndex, rowData.getTypeName())); |
|
||||
return; |
|
||||
} |
|
||||
DustValve dustValve = new DustValve(); |
|
||||
BeanUtil.copyProperties(rowData, dustValve); |
|
||||
dustValve.setType(valveType); |
|
||||
DustSystem dustSystem = systemMap.get(rowData.getSystemName().trim()); |
|
||||
if (dustSystem == null) { |
|
||||
errorList.add(String.format("第 %d 行数据错误:所属系统 %s 不存在", context.readRowHolder().getRowIndex() + 1, rowData.getSystemName())); |
|
||||
return; |
|
||||
} |
|
||||
dataTagSet.add(dataTag); |
|
||||
nameSet.add(rowData.getName()); |
|
||||
dustValve.setSystemId(dustSystem.getId()); |
|
||||
|
|
||||
metaDataValues.add(dustValve); |
|
||||
} |
|
||||
|
|
||||
@Override |
|
||||
public void doAfterAllAnalysed(AnalysisContext context) { |
|
||||
log.info("所有数据读取完成,共有 " + metaDataValues.size() + " 条数据"); |
|
||||
} |
|
||||
}) |
|
||||
.sheet() |
|
||||
.doRead(); |
|
||||
|
|
||||
if (!errorList.isEmpty()) { |
|
||||
return Result.error("导入失败,存在以下错误:\n" + String.join("\n", errorList)); |
|
||||
} |
|
||||
QueryWrapper<DustDataTag> dataTagQueryWrapper = new QueryWrapper<>(); |
|
||||
dataTagQueryWrapper.in("name", dataTagSet); |
|
||||
List<DustDataTag> list = dustDataTagService.list(dataTagQueryWrapper); |
|
||||
|
|
||||
Map<String, DustDataTag> collect = list.stream().collect(Collectors.toMap( |
|
||||
dustDataTag -> dustDataTag.getName() + dustDataTag.getSystemId(), |
|
||||
Function.identity())); // 值:DustDataTag 对象本身
|
|
||||
|
|
||||
QueryWrapper<DustValve> dustValveQueryWrapper = new QueryWrapper<>(); |
|
||||
dustValveQueryWrapper.in("name", nameSet); |
|
||||
List<DustValve> valveList = dustValveService.list(dustValveQueryWrapper); |
|
||||
Map<String, DustValve> valveMap = valveList.stream().collect(Collectors.toMap( |
|
||||
dustDataTag -> dustDataTag.getName() + dustDataTag.getSystemId(), |
|
||||
Function.identity())); |
|
||||
|
|
||||
|
|
||||
for (DustValve metaDataValue : metaDataValues) { |
|
||||
String tag = metaDataValue.getDataTag().trim() + metaDataValue.getSystemId(); |
|
||||
DustDataTag dustDataTag = collect.get(tag); |
|
||||
if (dustDataTag != null) { |
|
||||
metaDataValue.setDataTagId(dustDataTag.getId()); |
|
||||
} |
|
||||
|
|
||||
String valve = metaDataValue.getName().trim() + metaDataValue.getSystemId(); |
|
||||
DustValve dustValve = valveMap.get(valve); |
|
||||
if (dustValve != null) { |
|
||||
metaDataValue.setId(dustValve.getId()); |
|
||||
} |
|
||||
} |
|
||||
dustValveService.saveOrUpdateBatch(metaDataValues); |
|
||||
} catch (Exception e) { |
|
||||
e.printStackTrace(); |
|
||||
return Result.error("导入失败:" + e.getMessage()); |
|
||||
} |
|
||||
return Result.ok("导入成功"); |
|
||||
} |
|
||||
|
|
||||
} |
|
@ -1,304 +0,0 @@ |
|||||
package cc.admin.modules.dust.controller; |
|
||||
|
|
||||
import cc.admin.common.api.vo.Result; |
|
||||
import cc.admin.common.aspect.annotation.AutoLog; |
|
||||
import cc.admin.common.sys.base.controller.BaseController; |
|
||||
import cc.admin.common.util.RedisUtil; |
|
||||
import cc.admin.modules.dust.entity.Pipe; |
|
||||
import cc.admin.modules.dust.service.IPipeService; |
|
||||
import cc.admin.modules.dust.service.IRecommendPlanService; |
|
||||
import cc.admin.modules.dust.vo.DustConfigVo; |
|
||||
import cc.admin.poi.util.HeaderCell; |
|
||||
import cn.hutool.core.util.StrUtil; |
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage; |
|
||||
import com.baomidou.mybatisplus.core.toolkit.CollectionUtils; |
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
|
||||
import io.swagger.annotations.Api; |
|
||||
import io.swagger.annotations.ApiOperation; |
|
||||
import lombok.extern.slf4j.Slf4j; |
|
||||
import org.apache.poi.openxml4j.exceptions.InvalidFormatException; |
|
||||
import org.apache.poi.ss.usermodel.Row; |
|
||||
import org.apache.poi.ss.usermodel.Sheet; |
|
||||
import org.apache.poi.ss.usermodel.Workbook; |
|
||||
import org.springframework.beans.factory.annotation.Autowired; |
|
||||
import org.springframework.web.bind.annotation.*; |
|
||||
import org.springframework.web.multipart.MultipartFile; |
|
||||
import org.springframework.web.multipart.MultipartHttpServletRequest; |
|
||||
import org.springframework.web.servlet.ModelAndView; |
|
||||
|
|
||||
import javax.servlet.http.HttpServletRequest; |
|
||||
import javax.servlet.http.HttpServletResponse; |
|
||||
import java.io.IOException; |
|
||||
import java.io.InputStream; |
|
||||
import java.util.*; |
|
||||
import java.util.function.Function; |
|
||||
import java.util.stream.Collectors; |
|
||||
|
|
||||
import static cc.admin.modules.dust.utils.ExcelUtil.*; |
|
||||
import static cc.admin.poi.util.ExcelUtil.*; |
|
||||
|
|
||||
|
|
||||
/** |
|
||||
* @Description: 管道表 |
|
||||
* @Author: cc-admin |
|
||||
* @Date: 2024-12-06 |
|
||||
* @Version: V1.0.0 |
|
||||
*/ |
|
||||
@Slf4j |
|
||||
@Api(tags = "管道表") |
|
||||
@RestController |
|
||||
@RequestMapping("/pipe") |
|
||||
public class PipeController extends BaseController<Pipe, IPipeService> { |
|
||||
private static final List<HeaderCell> headerCellList = Arrays.asList( |
|
||||
new HeaderCell(0, 0, "序号"), |
|
||||
new HeaderCell(0, 1, "管道名称"), |
|
||||
new HeaderCell(0, 2, "设计风量"), |
|
||||
new HeaderCell(0, 3, "阀门开度(%)"), |
|
||||
new HeaderCell(0, 4, "备注") |
|
||||
); |
|
||||
@Autowired |
|
||||
private IPipeService pipeService; |
|
||||
|
|
||||
@AutoLog(value = "管道表-分页列表查询") |
|
||||
@ApiOperation(value = "管道表-分页列表查询", notes = "管道表-分页列表查询") |
|
||||
@GetMapping(value = "/list") |
|
||||
public Result<?> queryPageList( |
|
||||
@RequestParam(name = "key", required = false) String key, |
|
||||
@RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo, |
|
||||
@RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize, |
|
||||
HttpServletRequest req) { |
|
||||
QueryWrapper<Pipe> queryWrapper = new QueryWrapper<>(); |
|
||||
if (StrUtil.isNotEmpty(key)) { |
|
||||
|
|
||||
} |
|
||||
queryWrapper.orderByAsc("sort_order"); |
|
||||
Page<Pipe> page = new Page<>(pageNo, pageSize); |
|
||||
IPage<Pipe> pageList = pipeService.page(page, queryWrapper); |
|
||||
return Result.ok(pageList); |
|
||||
} |
|
||||
|
|
||||
/** |
|
||||
* 添加 |
|
||||
* |
|
||||
* @param pipe |
|
||||
* @return |
|
||||
*/ |
|
||||
@AutoLog(value = "管道表-添加") |
|
||||
@ApiOperation(value = "管道表-添加", notes = "管道表-添加") |
|
||||
@PostMapping(value = "/add") |
|
||||
public Result<?> add(@RequestBody Pipe pipe) { |
|
||||
pipeService.savePipe(pipe); |
|
||||
return Result.ok("添加成功!"); |
|
||||
} |
|
||||
|
|
||||
/** |
|
||||
* 编辑 |
|
||||
* |
|
||||
* @param pipe |
|
||||
* @return |
|
||||
*/ |
|
||||
@AutoLog(value = "管道表-编辑") |
|
||||
@ApiOperation(value = "管道表-编辑", notes = "管道表-编辑") |
|
||||
@PutMapping(value = "/edit") |
|
||||
public Result<?> edit(@RequestBody Pipe pipe) { |
|
||||
pipeService.updatePipe(pipe); |
|
||||
return Result.ok("编辑成功!"); |
|
||||
} |
|
||||
|
|
||||
/** |
|
||||
* 编辑 |
|
||||
* |
|
||||
* @param pipe |
|
||||
* @return |
|
||||
*/ |
|
||||
@AutoLog(value = "管道表-批量编辑") |
|
||||
@ApiOperation(value = "管道表-批量编辑", notes = "管道表-批量编辑") |
|
||||
@PostMapping(value = "/updateByList") |
|
||||
public Result<?> updateById(@RequestBody Pipe pipe) { |
|
||||
List<Pipe> list = pipe.getList(); |
|
||||
|
|
||||
for (Pipe pipe1 : list) { |
|
||||
Pipe byId = pipeService.getById(pipe1.getId()); |
|
||||
if (null != byId && null != byId.getDiameter()){ |
|
||||
pipe1.setDiameter(byId.getDiameter()); |
|
||||
} |
|
||||
} |
|
||||
pipeService.updateBatchById(list); |
|
||||
return Result.ok("编辑成功!"); |
|
||||
} |
|
||||
|
|
||||
/** |
|
||||
* 批量编辑 |
|
||||
* |
|
||||
* @param ids |
|
||||
* @return |
|
||||
*/ |
|
||||
@AutoLog(value = "管道表-批量删除") |
|
||||
@ApiOperation(value = "管道表-批量删除", notes = "管道表-批量删除") |
|
||||
@DeleteMapping(value = "/deleteBatch") |
|
||||
public Result<?> deleteBatch(@RequestParam(name = "ids", required = true) String ids) { |
|
||||
this.pipeService.removeByIds(Arrays.asList(ids.split(","))); |
|
||||
return Result.ok("批量删除成功!"); |
|
||||
} |
|
||||
|
|
||||
/** |
|
||||
* 通过id删除 |
|
||||
* |
|
||||
* @param id |
|
||||
* @return |
|
||||
*/ |
|
||||
@AutoLog(value = "管道表-通过id删除") |
|
||||
@ApiOperation(value = "管道表-通过id删除", notes = "管道表-通过id删除") |
|
||||
@DeleteMapping(value = "/delete") |
|
||||
public Result<?> delete(@RequestParam(name = "id", required = true) String id) { |
|
||||
pipeService.remove(id); |
|
||||
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) { |
|
||||
Pipe pipe = pipeService.getById(id); |
|
||||
return Result.ok(pipe); |
|
||||
} |
|
||||
|
|
||||
/** |
|
||||
* 导出excel |
|
||||
* |
|
||||
* @param request |
|
||||
* @param pipe |
|
||||
*/ |
|
||||
@RequestMapping(value = "/exportXls") |
|
||||
public ModelAndView exportXls(HttpServletRequest request, HttpServletResponse response, Pipe pipe) { |
|
||||
response.setHeader("Access-Control-Expose-Headers", "Content-Disposition"); |
|
||||
return super.exportXls(request, pipe, Pipe.class, "管道表"); |
|
||||
} |
|
||||
|
|
||||
/** |
|
||||
* 通过excel导入数据 |
|
||||
* |
|
||||
* @param request |
|
||||
* @param response |
|
||||
* @return |
|
||||
*/ |
|
||||
@RequestMapping(value = "/importExcel", method = RequestMethod.POST) |
|
||||
public Result<?> importExcel(HttpServletRequest request, HttpServletResponse response, |
|
||||
@RequestParam(name = "designPlanId", required = true) String designPlanId) { |
|
||||
MultipartHttpServletRequest multipartRequest = (MultipartHttpServletRequest) request; |
|
||||
Map<String, MultipartFile> fileMap = multipartRequest.getFileMap(); |
|
||||
for (Map.Entry<String, MultipartFile> entity : fileMap.entrySet()) { |
|
||||
MultipartFile file = entity.getValue();// 获取上传文件对象
|
|
||||
try { |
|
||||
List<String> errorList = new ArrayList<>(); // 保存错误提示信息
|
|
||||
List<DustConfigVo> configVoList = readXls(file.getInputStream(), errorList,designPlanId); |
|
||||
Map<String, Long> nameCounts = configVoList.stream() |
|
||||
.map(DustConfigVo::getPipeName) |
|
||||
.filter(pipeName -> pipeName != null && !pipeName.trim().isEmpty()) |
|
||||
.collect(Collectors.groupingBy(Function.identity(), Collectors.counting())); |
|
||||
boolean hasDuplicates = nameCounts.values().stream().anyMatch(count -> count > 1); |
|
||||
if (hasDuplicates) { |
|
||||
return Result.error("导入有重复名称,请检查"); |
|
||||
} |
|
||||
DustConfigVo dustConfigVo = configVoList.get(0); |
|
||||
if (!dustConfigVo.getSerialNumber().equals("0")){ |
|
||||
return Result.error("父级管道序号必须是0"); |
|
||||
} |
|
||||
return pipeService.importList(configVoList, errorList,designPlanId); |
|
||||
} catch (Exception e) { |
|
||||
log.error(e.getMessage(), e); |
|
||||
return Result.error("文件导入失败:" + e.getMessage()); |
|
||||
} finally { |
|
||||
try { |
|
||||
file.getInputStream().close(); |
|
||||
} catch (IOException e) { |
|
||||
log.error(e.getMessage(), e); |
|
||||
} |
|
||||
} |
|
||||
} |
|
||||
return Result.error("文件导入失败!"); |
|
||||
|
|
||||
} |
|
||||
|
|
||||
private List<DustConfigVo> readXls(InputStream inputStream, List<String> errorList,String designPlanId) throws Exception { |
|
||||
long start = System.currentTimeMillis(); |
|
||||
|
|
||||
Workbook book = getWorkbook(inputStream); |
|
||||
|
|
||||
String sheetName = book.getSheetName(0); |
|
||||
Sheet sheet = book.getSheetAt(0); |
|
||||
|
|
||||
// 检查表头格式
|
|
||||
checkTableHeader(sheet, sheetName, headerCellList); |
|
||||
// 处理导入对象
|
|
||||
List<DustConfigVo> recordList = new ArrayList<>(); |
|
||||
List<String> columnNameList = headerCellList.stream().map(HeaderCell::getTitle).collect(Collectors.toList()); |
|
||||
|
|
||||
for (int j = 1; j <= sheet.getLastRowNum(); j++) { |
|
||||
try { |
|
||||
log.debug("read row {}", j); |
|
||||
Row row = sheet.getRow(j); |
|
||||
int column = 0; |
|
||||
|
|
||||
String serialNumber = readCellAsString(row.getCell(column)); |
|
||||
if (StrUtil.isEmpty(serialNumber)) { |
|
||||
errorList.add(String.format("第 %d 行%s为空", j + 1, columnNameList.get(column))); |
|
||||
continue; |
|
||||
} |
|
||||
if (serialNumber.contains(".0")) { |
|
||||
serialNumber = serialNumber.substring(0, serialNumber.indexOf(".0")); |
|
||||
} |
|
||||
String pipeName = readCellAsString(row.getCell(++column)); |
|
||||
Double flow = readCellAsDouble(row.getCell(++column)); |
|
||||
String valveOpening = readCellAsString(row.getCell(++column)); |
|
||||
String remark = readCellAsString(row.getCell(++column)); |
|
||||
DustConfigVo dustConfigVo = new DustConfigVo(); |
|
||||
dustConfigVo.setId(UUID.randomUUID().toString()); |
|
||||
dustConfigVo.setDesignPlanId(designPlanId); |
|
||||
dustConfigVo.setSerialNumber(serialNumber); |
|
||||
dustConfigVo.setPipeName(pipeName); |
|
||||
dustConfigVo.setIsCompute(1); |
|
||||
dustConfigVo.setFlow(flow != null ? flow : 0); |
|
||||
dustConfigVo.setValveOpening(parseValveOpening(valveOpening)); |
|
||||
|
|
||||
dustConfigVo.setSortOrder(j); |
|
||||
dustConfigVo.setRemark(remark); |
|
||||
recordList.add(dustConfigVo); |
|
||||
} catch (Exception e) { |
|
||||
log.error(e.getMessage(), e); |
|
||||
e.printStackTrace(); |
|
||||
errorList.add(String.format("%s第 %d 行数据异常:%s", sheetName, j + 1, e.getMessage())); |
|
||||
} |
|
||||
} |
|
||||
log.info("读excel消耗时间" + (System.currentTimeMillis() - start) + "毫秒"); |
|
||||
|
|
||||
return recordList; |
|
||||
|
|
||||
} |
|
||||
private Double parseValveOpening(String valveOpeningStr) { |
|
||||
if (valveOpeningStr == null || valveOpeningStr.trim().isEmpty()) { |
|
||||
return 10.0; // 默认值
|
|
||||
} |
|
||||
valveOpeningStr = valveOpeningStr.trim(); |
|
||||
try { |
|
||||
if (valveOpeningStr.endsWith("%")) { |
|
||||
valveOpeningStr = valveOpeningStr.substring(0, valveOpeningStr.length() - 1); |
|
||||
} |
|
||||
double v = Double.parseDouble(valveOpeningStr); |
|
||||
if (v <= 1){ |
|
||||
v = v * 100; |
|
||||
} |
|
||||
return v; |
|
||||
} catch (NumberFormatException e) { |
|
||||
log.warn("无法解析阀门开度 '{}', 使用默认值 10.0", valveOpeningStr); |
|
||||
return 10.0; // 默认值
|
|
||||
} |
|
||||
} |
|
||||
} |
|
@ -1,156 +0,0 @@ |
|||||
package cc.admin.modules.dust.controller; |
|
||||
|
|
||||
import cc.admin.common.api.vo.Result; |
|
||||
import cc.admin.common.aspect.annotation.AutoLog; |
|
||||
import cc.admin.common.sys.base.controller.BaseController; |
|
||||
import cc.admin.common.sys.query.QueryGenerator; |
|
||||
import cc.admin.modules.dust.entity.Pipe; |
|
||||
import cc.admin.modules.dust.entity.RecommendPlan; |
|
||||
import cc.admin.modules.dust.entity.RecommendPlanPipeConfig; |
|
||||
import cc.admin.modules.dust.service.IPipeService; |
|
||||
import cc.admin.modules.dust.service.IRecommendPlanService; |
|
||||
import cn.hutool.core.util.IdUtil; |
|
||||
import cn.hutool.core.util.StrUtil; |
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage; |
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
|
||||
import io.swagger.annotations.Api; |
|
||||
import io.swagger.annotations.ApiOperation; |
|
||||
import lombok.extern.slf4j.Slf4j; |
|
||||
import org.apache.commons.collections.CollectionUtils; |
|
||||
import org.springframework.beans.factory.annotation.Autowired; |
|
||||
import org.springframework.web.bind.annotation.*; |
|
||||
import org.springframework.web.servlet.ModelAndView; |
|
||||
|
|
||||
import javax.servlet.http.HttpServletRequest; |
|
||||
import javax.servlet.http.HttpServletResponse; |
|
||||
import java.sql.Array; |
|
||||
import java.util.*; |
|
||||
import java.util.stream.Collectors; |
|
||||
|
|
||||
/** |
|
||||
* @Description: 推荐方案表 |
|
||||
* @Author: cc-admin |
|
||||
* @Date: 2024-12-06 |
|
||||
* @Version: V1.0.0 |
|
||||
*/ |
|
||||
@Slf4j |
|
||||
@Api(tags = "推荐方案表") |
|
||||
@RestController |
|
||||
@RequestMapping("/recommend/plan") |
|
||||
public class RecommendPlanController extends BaseController<RecommendPlan, IRecommendPlanService> { |
|
||||
@Autowired |
|
||||
private IRecommendPlanService recommendPlanService; |
|
||||
@Autowired |
|
||||
private IPipeService iPipeService; |
|
||||
|
|
||||
/** |
|
||||
* 添加 |
|
||||
* |
|
||||
* @param recommendPlan |
|
||||
* @return |
|
||||
*/ |
|
||||
@AutoLog(value = "推荐方案表-添加") |
|
||||
@ApiOperation(value = "推荐方案表-添加", notes = "推荐方案表-添加") |
|
||||
@PostMapping(value = "/add") |
|
||||
public Result<?> add(@RequestBody RecommendPlan recommendPlan) { |
|
||||
recommendPlanService.save(recommendPlan); |
|
||||
return Result.ok("添加成功!"); |
|
||||
} |
|
||||
|
|
||||
/** |
|
||||
* 编辑 |
|
||||
* |
|
||||
* @param recommendPlan |
|
||||
* @return |
|
||||
*/ |
|
||||
@AutoLog(value = "推荐方案表-编辑") |
|
||||
@ApiOperation(value = "推荐方案表-编辑", notes = "推荐方案表-编辑") |
|
||||
@PutMapping(value = "/edit") |
|
||||
public Result<?> edit(@RequestBody RecommendPlan recommendPlan) { |
|
||||
recommendPlanService.updateById(recommendPlan); |
|
||||
return Result.ok("编辑成功!"); |
|
||||
} |
|
||||
|
|
||||
/** |
|
||||
* 批量删除 |
|
||||
* |
|
||||
* @return |
|
||||
*/ |
|
||||
@AutoLog(value = "推荐方案表-批量删除") |
|
||||
@ApiOperation(value = "推荐方案表-批量删除", notes = "推荐方案表-批量删除") |
|
||||
@DeleteMapping(value = "/deleteByDesignPlanId") |
|
||||
public Result<?> deleteByDesignPlanId(@RequestParam(name = "designPlanId", required = true) String designPlanId) { |
|
||||
QueryWrapper<RecommendPlan> objectQueryWrapper = new QueryWrapper<>(); |
|
||||
objectQueryWrapper.eq("design_plan_id", designPlanId); |
|
||||
recommendPlanService.deleteByDesignPlanId(designPlanId); |
|
||||
return Result.ok("批量删除成功!"); |
|
||||
} |
|
||||
|
|
||||
/** |
|
||||
* 通过id删除 |
|
||||
* |
|
||||
* @param id |
|
||||
* @return |
|
||||
*/ |
|
||||
@AutoLog(value = "推荐方案表-通过id删除") |
|
||||
@ApiOperation(value = "推荐方案表-通过id删除", notes = "推荐方案表-通过id删除") |
|
||||
@DeleteMapping(value = "/delete") |
|
||||
public Result<?> delete(@RequestParam(name = "id", required = true) String id) { |
|
||||
recommendPlanService.removeById(id); |
|
||||
return Result.ok("删除成功!"); |
|
||||
} |
|
||||
|
|
||||
/** |
|
||||
* 批量删除 |
|
||||
* |
|
||||
* @param ids |
|
||||
* @return |
|
||||
*/ |
|
||||
@AutoLog(value = "推荐方案表-批量删除") |
|
||||
@ApiOperation(value = "推荐方案表-批量删除", notes = "推荐方案表-批量删除") |
|
||||
@DeleteMapping(value = "/deleteBatch") |
|
||||
public Result<?> deleteBatch(@RequestParam(name = "ids", required = true) String ids) { |
|
||||
this.recommendPlanService.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) { |
|
||||
RecommendPlan recommendPlan = recommendPlanService.getById(id); |
|
||||
return Result.ok(recommendPlan); |
|
||||
} |
|
||||
|
|
||||
/** |
|
||||
* 导出excel |
|
||||
* |
|
||||
* @param request |
|
||||
* @param recommendPlan |
|
||||
*/ |
|
||||
@RequestMapping(value = "/exportXls") |
|
||||
public ModelAndView exportXls(HttpServletRequest request, HttpServletResponse response, RecommendPlan recommendPlan) { |
|
||||
response.setHeader("Access-Control-Expose-Headers", "Content-Disposition"); |
|
||||
return super.exportXls(request, recommendPlan, RecommendPlan.class, "推荐方案表"); |
|
||||
} |
|
||||
|
|
||||
/** |
|
||||
* 通过excel导入数据 |
|
||||
* |
|
||||
* @param request |
|
||||
* @param response |
|
||||
* @return |
|
||||
*/ |
|
||||
@RequestMapping(value = "/importExcel", method = RequestMethod.POST) |
|
||||
public Result<?> importExcel(HttpServletRequest request, HttpServletResponse response) { |
|
||||
return super.importExcel(request, response, RecommendPlan.class); |
|
||||
} |
|
||||
|
|
||||
} |
|
@ -0,0 +1,161 @@ |
|||||
|
package cc.admin.modules.dust.controller; |
||||
|
|
||||
|
import cc.admin.common.api.vo.Result; |
||||
|
import cc.admin.common.aspect.annotation.AutoLog; |
||||
|
import cc.admin.common.sys.base.controller.BaseController; |
||||
|
import cc.admin.common.sys.query.QueryGenerator; |
||||
|
import cc.admin.modules.dust.entity.TbDustCompanyinfo; |
||||
|
import cc.admin.modules.dust.service.ITbDustCompanyinfoService; |
||||
|
import cn.hutool.core.util.IdUtil; |
||||
|
import cn.hutool.core.util.StrUtil; |
||||
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
||||
|
import com.baomidou.mybatisplus.core.metadata.IPage; |
||||
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
||||
|
import io.swagger.annotations.Api; |
||||
|
import io.swagger.annotations.ApiOperation; |
||||
|
import lombok.extern.slf4j.Slf4j; |
||||
|
import org.springframework.beans.factory.annotation.Autowired; |
||||
|
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; |
||||
|
|
||||
|
/** |
||||
|
* @Description: 企业基础信息表 |
||||
|
* @Author: cc-admin |
||||
|
* @Date: 2025-04-27 |
||||
|
* @Version: V1.0.0 |
||||
|
*/ |
||||
|
@Slf4j |
||||
|
@Api(tags = "企业基础信息表") |
||||
|
@RestController |
||||
|
@RequestMapping("/tb/dustCompanyinfo") |
||||
|
public class TbDustCompanyinfoController extends BaseController<TbDustCompanyinfo, ITbDustCompanyinfoService> { |
||||
|
@Autowired |
||||
|
private ITbDustCompanyinfoService tbDustCompanyinfoService; |
||||
|
|
||||
|
/** |
||||
|
* 分页列表查询 |
||||
|
* |
||||
|
* @param key |
||||
|
* @param pageNo |
||||
|
* @param pageSize |
||||
|
* @param req |
||||
|
* @return |
||||
|
*/ |
||||
|
@AutoLog(value = "企业基础信息表-分页列表查询") |
||||
|
@ApiOperation(value = "企业基础信息表-分页列表查询", notes = "企业基础信息表-分页列表查询") |
||||
|
@GetMapping(value = "/list") |
||||
|
public Result<?> queryPageList( |
||||
|
@RequestParam(name = "key", required = false) String key, |
||||
|
@RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo, |
||||
|
@RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize, |
||||
|
HttpServletRequest req) { |
||||
|
QueryWrapper<TbDustCompanyinfo> queryWrapper = QueryGenerator.initQueryWrapper(new TbDustCompanyinfo(), req.getParameterMap()); |
||||
|
if (StrUtil.isNotEmpty(key)) { |
||||
|
|
||||
|
} |
||||
|
|
||||
|
Page<TbDustCompanyinfo> page = new Page<TbDustCompanyinfo>(pageNo, pageSize); |
||||
|
IPage<TbDustCompanyinfo> pageList = tbDustCompanyinfoService.page(page, queryWrapper); |
||||
|
return Result.ok(pageList); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* 添加 |
||||
|
* |
||||
|
* @param tbDustCompanyinfo |
||||
|
* @return |
||||
|
*/ |
||||
|
@AutoLog(value = "企业基础信息表-添加") |
||||
|
@ApiOperation(value = "企业基础信息表-添加", notes = "企业基础信息表-添加") |
||||
|
@PostMapping(value = "/add") |
||||
|
public Result<?> add(@RequestBody TbDustCompanyinfo tbDustCompanyinfo) { |
||||
|
tbDustCompanyinfoService.save(tbDustCompanyinfo); |
||||
|
return Result.ok("添加成功!"); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* 编辑 |
||||
|
* |
||||
|
* @param tbDustCompanyinfo |
||||
|
* @return |
||||
|
*/ |
||||
|
@AutoLog(value = "企业基础信息表-编辑") |
||||
|
@ApiOperation(value = "企业基础信息表-编辑", notes = "企业基础信息表-编辑") |
||||
|
@PutMapping(value = "/edit") |
||||
|
public Result<?> edit(@RequestBody TbDustCompanyinfo tbDustCompanyinfo) { |
||||
|
tbDustCompanyinfoService.updateById(tbDustCompanyinfo); |
||||
|
return Result.ok("编辑成功!"); |
||||
|
} |
||||
|
|
||||
|
|
||||
|
/** |
||||
|
* 通过id删除 |
||||
|
* |
||||
|
* @param id |
||||
|
* @return |
||||
|
*/ |
||||
|
@AutoLog(value = "企业基础信息表-通过id删除") |
||||
|
@ApiOperation(value = "企业基础信息表-通过id删除", notes = "企业基础信息表-通过id删除") |
||||
|
@DeleteMapping(value = "/delete") |
||||
|
public Result<?> delete(@RequestParam(name = "id", required = true) String id) { |
||||
|
tbDustCompanyinfoService.removeById(id); |
||||
|
return Result.ok("删除成功!"); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* 批量删除 |
||||
|
* |
||||
|
* @param ids |
||||
|
* @return |
||||
|
*/ |
||||
|
@AutoLog(value = "企业基础信息表-批量删除") |
||||
|
@ApiOperation(value = "企业基础信息表-批量删除", notes = "企业基础信息表-批量删除") |
||||
|
@DeleteMapping(value = "/deleteBatch") |
||||
|
public Result<?> deleteBatch(@RequestParam(name = "ids", required = true) String ids) { |
||||
|
this.tbDustCompanyinfoService.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) { |
||||
|
TbDustCompanyinfo tbDustCompanyinfo = tbDustCompanyinfoService.getById(id); |
||||
|
return Result.ok(tbDustCompanyinfo); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* 导出excel |
||||
|
* |
||||
|
* @param request |
||||
|
* @param tbDustCompanyinfo |
||||
|
*/ |
||||
|
@RequestMapping(value = "/exportXls") |
||||
|
public ModelAndView exportXls(HttpServletRequest request, HttpServletResponse response, TbDustCompanyinfo tbDustCompanyinfo) { |
||||
|
response.setHeader("Access-Control-Expose-Headers", "Content-Disposition"); |
||||
|
return super.exportXls(request, tbDustCompanyinfo, TbDustCompanyinfo.class, "企业基础信息表"); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* 通过excel导入数据 |
||||
|
* |
||||
|
* @param request |
||||
|
* @param response |
||||
|
* @return |
||||
|
*/ |
||||
|
@RequestMapping(value = "/importExcel", method = RequestMethod.POST) |
||||
|
public Result<?> importExcel(HttpServletRequest request, HttpServletResponse response) { |
||||
|
return super.importExcel(request, response, TbDustCompanyinfo.class); |
||||
|
} |
||||
|
|
||||
|
} |
@ -0,0 +1,161 @@ |
|||||
|
package cc.admin.modules.dust.controller; |
||||
|
|
||||
|
import cc.admin.common.api.vo.Result; |
||||
|
import cc.admin.common.aspect.annotation.AutoLog; |
||||
|
import cc.admin.common.sys.base.controller.BaseController; |
||||
|
import cc.admin.common.sys.query.QueryGenerator; |
||||
|
import cc.admin.modules.dust.entity.TbDustEquipinfo; |
||||
|
import cc.admin.modules.dust.service.ITbDustEquipinfoService; |
||||
|
import cn.hutool.core.util.IdUtil; |
||||
|
import cn.hutool.core.util.StrUtil; |
||||
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
||||
|
import com.baomidou.mybatisplus.core.metadata.IPage; |
||||
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
||||
|
import io.swagger.annotations.Api; |
||||
|
import io.swagger.annotations.ApiOperation; |
||||
|
import lombok.extern.slf4j.Slf4j; |
||||
|
import org.springframework.beans.factory.annotation.Autowired; |
||||
|
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; |
||||
|
|
||||
|
/** |
||||
|
* @Description: 除尘系统信息表 |
||||
|
* @Author: cc-admin |
||||
|
* @Date: 2025-04-27 |
||||
|
* @Version: V1.0.0 |
||||
|
*/ |
||||
|
@Slf4j |
||||
|
@Api(tags = "除尘系统信息表") |
||||
|
@RestController |
||||
|
@RequestMapping("/tb/dustEquipinfo") |
||||
|
public class TbDustEquipinfoController extends BaseController<TbDustEquipinfo, ITbDustEquipinfoService> { |
||||
|
@Autowired |
||||
|
private ITbDustEquipinfoService tbDustEquipinfoService; |
||||
|
|
||||
|
/** |
||||
|
* 分页列表查询 |
||||
|
* |
||||
|
* @param key |
||||
|
* @param pageNo |
||||
|
* @param pageSize |
||||
|
* @param req |
||||
|
* @return |
||||
|
*/ |
||||
|
@AutoLog(value = "除尘系统信息表-分页列表查询") |
||||
|
@ApiOperation(value = "除尘系统信息表-分页列表查询", notes = "除尘系统信息表-分页列表查询") |
||||
|
@GetMapping(value = "/list") |
||||
|
public Result<?> queryPageList( |
||||
|
@RequestParam(name = "key", required = false) String key, |
||||
|
@RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo, |
||||
|
@RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize, |
||||
|
HttpServletRequest req) { |
||||
|
QueryWrapper<TbDustEquipinfo> queryWrapper = QueryGenerator.initQueryWrapper(new TbDustEquipinfo(), req.getParameterMap()); |
||||
|
if (StrUtil.isNotEmpty(key)) { |
||||
|
|
||||
|
} |
||||
|
|
||||
|
Page<TbDustEquipinfo> page = new Page<TbDustEquipinfo>(pageNo, pageSize); |
||||
|
IPage<TbDustEquipinfo> pageList = tbDustEquipinfoService.page(page, queryWrapper); |
||||
|
return Result.ok(pageList); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* 添加 |
||||
|
* |
||||
|
* @param tbDustEquipinfo |
||||
|
* @return |
||||
|
*/ |
||||
|
@AutoLog(value = "除尘系统信息表-添加") |
||||
|
@ApiOperation(value = "除尘系统信息表-添加", notes = "除尘系统信息表-添加") |
||||
|
@PostMapping(value = "/add") |
||||
|
public Result<?> add(@RequestBody TbDustEquipinfo tbDustEquipinfo) { |
||||
|
tbDustEquipinfoService.save(tbDustEquipinfo); |
||||
|
return Result.ok("添加成功!"); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* 编辑 |
||||
|
* |
||||
|
* @param tbDustEquipinfo |
||||
|
* @return |
||||
|
*/ |
||||
|
@AutoLog(value = "除尘系统信息表-编辑") |
||||
|
@ApiOperation(value = "除尘系统信息表-编辑", notes = "除尘系统信息表-编辑") |
||||
|
@PutMapping(value = "/edit") |
||||
|
public Result<?> edit(@RequestBody TbDustEquipinfo tbDustEquipinfo) { |
||||
|
tbDustEquipinfoService.updateById(tbDustEquipinfo); |
||||
|
return Result.ok("编辑成功!"); |
||||
|
} |
||||
|
|
||||
|
|
||||
|
/** |
||||
|
* 通过id删除 |
||||
|
* |
||||
|
* @param id |
||||
|
* @return |
||||
|
*/ |
||||
|
@AutoLog(value = "除尘系统信息表-通过id删除") |
||||
|
@ApiOperation(value = "除尘系统信息表-通过id删除", notes = "除尘系统信息表-通过id删除") |
||||
|
@DeleteMapping(value = "/delete") |
||||
|
public Result<?> delete(@RequestParam(name = "id", required = true) String id) { |
||||
|
tbDustEquipinfoService.removeById(id); |
||||
|
return Result.ok("删除成功!"); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* 批量删除 |
||||
|
* |
||||
|
* @param ids |
||||
|
* @return |
||||
|
*/ |
||||
|
@AutoLog(value = "除尘系统信息表-批量删除") |
||||
|
@ApiOperation(value = "除尘系统信息表-批量删除", notes = "除尘系统信息表-批量删除") |
||||
|
@DeleteMapping(value = "/deleteBatch") |
||||
|
public Result<?> deleteBatch(@RequestParam(name = "ids", required = true) String ids) { |
||||
|
this.tbDustEquipinfoService.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) { |
||||
|
TbDustEquipinfo tbDustEquipinfo = tbDustEquipinfoService.getById(id); |
||||
|
return Result.ok(tbDustEquipinfo); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* 导出excel |
||||
|
* |
||||
|
* @param request |
||||
|
* @param tbDustEquipinfo |
||||
|
*/ |
||||
|
@RequestMapping(value = "/exportXls") |
||||
|
public ModelAndView exportXls(HttpServletRequest request, HttpServletResponse response, TbDustEquipinfo tbDustEquipinfo) { |
||||
|
response.setHeader("Access-Control-Expose-Headers", "Content-Disposition"); |
||||
|
return super.exportXls(request, tbDustEquipinfo, TbDustEquipinfo.class, "除尘系统信息表"); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* 通过excel导入数据 |
||||
|
* |
||||
|
* @param request |
||||
|
* @param response |
||||
|
* @return |
||||
|
*/ |
||||
|
@RequestMapping(value = "/importExcel", method = RequestMethod.POST) |
||||
|
public Result<?> importExcel(HttpServletRequest request, HttpServletResponse response) { |
||||
|
return super.importExcel(request, response, TbDustEquipinfo.class); |
||||
|
} |
||||
|
|
||||
|
} |
@ -0,0 +1,163 @@ |
|||||
|
package cc.admin.modules.dust.controller; |
||||
|
|
||||
|
import cc.admin.common.api.vo.Result; |
||||
|
import cc.admin.common.aspect.annotation.AutoLog; |
||||
|
import cc.admin.common.sys.base.controller.BaseController; |
||||
|
import cc.admin.common.sys.query.QueryGenerator; |
||||
|
import cc.admin.modules.dust.entity.TbDustTargetinfo; |
||||
|
import cc.admin.modules.dust.service.ITbDustTargetinfoService; |
||||
|
import cn.hutool.core.util.IdUtil; |
||||
|
import cn.hutool.core.util.StrUtil; |
||||
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
||||
|
import com.baomidou.mybatisplus.core.metadata.IPage; |
||||
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
||||
|
import io.swagger.annotations.Api; |
||||
|
import io.swagger.annotations.ApiOperation; |
||||
|
import lombok.extern.slf4j.Slf4j; |
||||
|
import org.springframework.beans.factory.annotation.Autowired; |
||||
|
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; |
||||
|
|
||||
|
/** |
||||
|
* @Description: 除尘系统监测指标信息表 |
||||
|
* @Author: cc-admin |
||||
|
* @Date: 2025-04-27 |
||||
|
* @Version: V1.0.0 |
||||
|
*/ |
||||
|
@Slf4j |
||||
|
@Api(tags = "除尘系统监测指标信息表") |
||||
|
@RestController |
||||
|
@RequestMapping("/tb/dustTargetinfo") |
||||
|
public class TbDustTargetinfoController extends BaseController<TbDustTargetinfo, ITbDustTargetinfoService> { |
||||
|
@Autowired |
||||
|
private ITbDustTargetinfoService tbDustTargetinfoService; |
||||
|
|
||||
|
/** |
||||
|
* 分页列表查询 |
||||
|
* |
||||
|
* @param key |
||||
|
* @param pageNo |
||||
|
* @param pageSize |
||||
|
* @param req |
||||
|
* @return |
||||
|
*/ |
||||
|
@AutoLog(value = "除尘系统监测指标信息表-分页列表查询") |
||||
|
@ApiOperation(value = "除尘系统监测指标信息表-分页列表查询", notes = "除尘系统监测指标信息表-分页列表查询") |
||||
|
@GetMapping(value = "/list") |
||||
|
public Result<?> queryPageList( |
||||
|
@RequestParam(name = "key", required = false) String key, |
||||
|
@RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo, |
||||
|
@RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize, |
||||
|
HttpServletRequest req) { |
||||
|
QueryWrapper<TbDustTargetinfo> queryWrapper = QueryGenerator.initQueryWrapper(new TbDustTargetinfo(), req.getParameterMap()); |
||||
|
if (StrUtil.isNotEmpty(key)) { |
||||
|
|
||||
|
} |
||||
|
|
||||
|
Page<TbDustTargetinfo> page = new Page<TbDustTargetinfo>(pageNo, pageSize); |
||||
|
IPage<TbDustTargetinfo> pageList = tbDustTargetinfoService.page(page, queryWrapper); |
||||
|
return Result.ok(pageList); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* 添加 |
||||
|
* |
||||
|
* @param tbDustTargetinfo |
||||
|
* @return |
||||
|
*/ |
||||
|
@AutoLog(value = "除尘系统监测指标信息表-添加") |
||||
|
@ApiOperation(value = "除尘系统监测指标信息表-添加", notes = "除尘系统监测指标信息表-添加") |
||||
|
@PostMapping(value = "/add") |
||||
|
public Result<?> add(@RequestBody TbDustTargetinfo tbDustTargetinfo) { |
||||
|
tbDustTargetinfoService.save(tbDustTargetinfo); |
||||
|
return Result.ok("添加成功!"); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* 编辑 |
||||
|
* |
||||
|
* @param tbDustTargetinfo |
||||
|
* @return |
||||
|
*/ |
||||
|
@AutoLog(value = "除尘系统监测指标信息表-编辑") |
||||
|
@ApiOperation(value = "除尘系统监测指标信息表-编辑", notes = "除尘系统监测指标信息表-编辑") |
||||
|
@PutMapping(value = "/edit") |
||||
|
public Result<?> edit(@RequestBody TbDustTargetinfo tbDustTargetinfo) { |
||||
|
tbDustTargetinfoService.updateById(tbDustTargetinfo); |
||||
|
return Result.ok("编辑成功!"); |
||||
|
} |
||||
|
|
||||
|
|
||||
|
|
||||
|
|
||||
|
/** |
||||
|
* 通过id删除 |
||||
|
* |
||||
|
* @param id |
||||
|
* @return |
||||
|
*/ |
||||
|
@AutoLog(value = "除尘系统监测指标信息表-通过id删除") |
||||
|
@ApiOperation(value = "除尘系统监测指标信息表-通过id删除", notes = "除尘系统监测指标信息表-通过id删除") |
||||
|
@DeleteMapping(value = "/delete") |
||||
|
public Result<?> delete(@RequestParam(name = "id", required = true) String id) { |
||||
|
tbDustTargetinfoService.removeById(id); |
||||
|
return Result.ok("删除成功!"); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* 批量删除 |
||||
|
* |
||||
|
* @param ids |
||||
|
* @return |
||||
|
*/ |
||||
|
@AutoLog(value = "除尘系统监测指标信息表-批量删除") |
||||
|
@ApiOperation(value = "除尘系统监测指标信息表-批量删除", notes = "除尘系统监测指标信息表-批量删除") |
||||
|
@DeleteMapping(value = "/deleteBatch") |
||||
|
public Result<?> deleteBatch(@RequestParam(name = "ids", required = true) String ids) { |
||||
|
this.tbDustTargetinfoService.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) { |
||||
|
TbDustTargetinfo tbDustTargetinfo = tbDustTargetinfoService.getById(id); |
||||
|
return Result.ok(tbDustTargetinfo); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* 导出excel |
||||
|
* |
||||
|
* @param request |
||||
|
* @param tbDustTargetinfo |
||||
|
*/ |
||||
|
@RequestMapping(value = "/exportXls") |
||||
|
public ModelAndView exportXls(HttpServletRequest request, HttpServletResponse response, TbDustTargetinfo tbDustTargetinfo) { |
||||
|
response.setHeader("Access-Control-Expose-Headers", "Content-Disposition"); |
||||
|
return super.exportXls(request, tbDustTargetinfo, TbDustTargetinfo.class, "除尘系统监测指标信息表"); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* 通过excel导入数据 |
||||
|
* |
||||
|
* @param request |
||||
|
* @param response |
||||
|
* @return |
||||
|
*/ |
||||
|
@RequestMapping(value = "/importExcel", method = RequestMethod.POST) |
||||
|
public Result<?> importExcel(HttpServletRequest request, HttpServletResponse response) { |
||||
|
return super.importExcel(request, response, TbDustTargetinfo.class); |
||||
|
} |
||||
|
|
||||
|
} |
@ -0,0 +1,161 @@ |
|||||
|
package cc.admin.modules.dust.controller; |
||||
|
|
||||
|
import cc.admin.common.api.vo.Result; |
||||
|
import cc.admin.common.aspect.annotation.AutoLog; |
||||
|
import cc.admin.common.sys.base.controller.BaseController; |
||||
|
import cc.admin.common.sys.query.QueryGenerator; |
||||
|
import cc.admin.modules.dust.entity.TbDustVideoinfo; |
||||
|
import cc.admin.modules.dust.service.ITbDustVideoinfoService; |
||||
|
import cn.hutool.core.util.IdUtil; |
||||
|
import cn.hutool.core.util.StrUtil; |
||||
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
||||
|
import com.baomidou.mybatisplus.core.metadata.IPage; |
||||
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
||||
|
import io.swagger.annotations.Api; |
||||
|
import io.swagger.annotations.ApiOperation; |
||||
|
import lombok.extern.slf4j.Slf4j; |
||||
|
import org.springframework.beans.factory.annotation.Autowired; |
||||
|
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; |
||||
|
|
||||
|
/** |
||||
|
* @Description: 视频设备信息中间数据表 |
||||
|
* @Author: cc-admin |
||||
|
* @Date: 2025-04-27 |
||||
|
* @Version: V1.0.0 |
||||
|
*/ |
||||
|
@Slf4j |
||||
|
@Api(tags = "视频设备信息中间数据表") |
||||
|
@RestController |
||||
|
@RequestMapping("/tb/dustVideoinfo") |
||||
|
public class TbDustVideoinfoController extends BaseController<TbDustVideoinfo, ITbDustVideoinfoService> { |
||||
|
@Autowired |
||||
|
private ITbDustVideoinfoService tbDustVideoinfoService; |
||||
|
|
||||
|
/** |
||||
|
* 分页列表查询 |
||||
|
* |
||||
|
* @param key |
||||
|
* @param pageNo |
||||
|
* @param pageSize |
||||
|
* @param req |
||||
|
* @return |
||||
|
*/ |
||||
|
@AutoLog(value = "视频设备信息中间数据表-分页列表查询") |
||||
|
@ApiOperation(value = "视频设备信息中间数据表-分页列表查询", notes = "视频设备信息中间数据表-分页列表查询") |
||||
|
@GetMapping(value = "/list") |
||||
|
public Result<?> queryPageList( |
||||
|
@RequestParam(name = "key", required = false) String key, |
||||
|
@RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo, |
||||
|
@RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize, |
||||
|
HttpServletRequest req) { |
||||
|
QueryWrapper<TbDustVideoinfo> queryWrapper = QueryGenerator.initQueryWrapper(new TbDustVideoinfo(), req.getParameterMap()); |
||||
|
if (StrUtil.isNotEmpty(key)) { |
||||
|
|
||||
|
} |
||||
|
|
||||
|
Page<TbDustVideoinfo> page = new Page<TbDustVideoinfo>(pageNo, pageSize); |
||||
|
IPage<TbDustVideoinfo> pageList = tbDustVideoinfoService.page(page, queryWrapper); |
||||
|
return Result.ok(pageList); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* 添加 |
||||
|
* |
||||
|
* @param tbDustVideoinfo |
||||
|
* @return |
||||
|
*/ |
||||
|
@AutoLog(value = "视频设备信息中间数据表-添加") |
||||
|
@ApiOperation(value = "视频设备信息中间数据表-添加", notes = "视频设备信息中间数据表-添加") |
||||
|
@PostMapping(value = "/add") |
||||
|
public Result<?> add(@RequestBody TbDustVideoinfo tbDustVideoinfo) { |
||||
|
tbDustVideoinfoService.save(tbDustVideoinfo); |
||||
|
return Result.ok("添加成功!"); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* 编辑 |
||||
|
* |
||||
|
* @param tbDustVideoinfo |
||||
|
* @return |
||||
|
*/ |
||||
|
@AutoLog(value = "视频设备信息中间数据表-编辑") |
||||
|
@ApiOperation(value = "视频设备信息中间数据表-编辑", notes = "视频设备信息中间数据表-编辑") |
||||
|
@PutMapping(value = "/edit") |
||||
|
public Result<?> edit(@RequestBody TbDustVideoinfo tbDustVideoinfo) { |
||||
|
tbDustVideoinfoService.updateById(tbDustVideoinfo); |
||||
|
return Result.ok("编辑成功!"); |
||||
|
} |
||||
|
|
||||
|
|
||||
|
/** |
||||
|
* 通过id删除 |
||||
|
* |
||||
|
* @param id |
||||
|
* @return |
||||
|
*/ |
||||
|
@AutoLog(value = "视频设备信息中间数据表-通过id删除") |
||||
|
@ApiOperation(value = "视频设备信息中间数据表-通过id删除", notes = "视频设备信息中间数据表-通过id删除") |
||||
|
@DeleteMapping(value = "/delete") |
||||
|
public Result<?> delete(@RequestParam(name = "id", required = true) String id) { |
||||
|
tbDustVideoinfoService.removeById(id); |
||||
|
return Result.ok("删除成功!"); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* 批量删除 |
||||
|
* |
||||
|
* @param ids |
||||
|
* @return |
||||
|
*/ |
||||
|
@AutoLog(value = "视频设备信息中间数据表-批量删除") |
||||
|
@ApiOperation(value = "视频设备信息中间数据表-批量删除", notes = "视频设备信息中间数据表-批量删除") |
||||
|
@DeleteMapping(value = "/deleteBatch") |
||||
|
public Result<?> deleteBatch(@RequestParam(name = "ids", required = true) String ids) { |
||||
|
this.tbDustVideoinfoService.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) { |
||||
|
TbDustVideoinfo tbDustVideoinfo = tbDustVideoinfoService.getById(id); |
||||
|
return Result.ok(tbDustVideoinfo); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* 导出excel |
||||
|
* |
||||
|
* @param request |
||||
|
* @param tbDustVideoinfo |
||||
|
*/ |
||||
|
@RequestMapping(value = "/exportXls") |
||||
|
public ModelAndView exportXls(HttpServletRequest request, HttpServletResponse response, TbDustVideoinfo tbDustVideoinfo) { |
||||
|
response.setHeader("Access-Control-Expose-Headers", "Content-Disposition"); |
||||
|
return super.exportXls(request, tbDustVideoinfo, TbDustVideoinfo.class, "视频设备信息中间数据表"); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* 通过excel导入数据 |
||||
|
* |
||||
|
* @param request |
||||
|
* @param response |
||||
|
* @return |
||||
|
*/ |
||||
|
@RequestMapping(value = "/importExcel", method = RequestMethod.POST) |
||||
|
public Result<?> importExcel(HttpServletRequest request, HttpServletResponse response) { |
||||
|
return super.importExcel(request, response, TbDustVideoinfo.class); |
||||
|
} |
||||
|
|
||||
|
} |
@ -0,0 +1,161 @@ |
|||||
|
package cc.admin.modules.dust.controller; |
||||
|
|
||||
|
import cc.admin.common.api.vo.Result; |
||||
|
import cc.admin.common.aspect.annotation.AutoLog; |
||||
|
import cc.admin.common.sys.base.controller.BaseController; |
||||
|
import cc.admin.common.sys.query.QueryGenerator; |
||||
|
import cc.admin.modules.dust.entity.TbDustWarning; |
||||
|
import cc.admin.modules.dust.service.ITbDustWarningService; |
||||
|
import cn.hutool.core.util.IdUtil; |
||||
|
import cn.hutool.core.util.StrUtil; |
||||
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
||||
|
import com.baomidou.mybatisplus.core.metadata.IPage; |
||||
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
||||
|
import io.swagger.annotations.Api; |
||||
|
import io.swagger.annotations.ApiOperation; |
||||
|
import lombok.extern.slf4j.Slf4j; |
||||
|
import org.springframework.beans.factory.annotation.Autowired; |
||||
|
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; |
||||
|
|
||||
|
/** |
||||
|
* @Description: 预警信息推送记录表 |
||||
|
* @Author: cc-admin |
||||
|
* @Date: 2025-04-27 |
||||
|
* @Version: V1.0.0 |
||||
|
*/ |
||||
|
@Slf4j |
||||
|
@Api(tags = "预警信息推送记录表") |
||||
|
@RestController |
||||
|
@RequestMapping("/tb/dustWarning") |
||||
|
public class TbDustWarningController extends BaseController<TbDustWarning, ITbDustWarningService> { |
||||
|
@Autowired |
||||
|
private ITbDustWarningService tbDustWarningService; |
||||
|
|
||||
|
/** |
||||
|
* 分页列表查询 |
||||
|
* |
||||
|
* @param key |
||||
|
* @param pageNo |
||||
|
* @param pageSize |
||||
|
* @param req |
||||
|
* @return |
||||
|
*/ |
||||
|
@AutoLog(value = "预警信息推送记录表-分页列表查询") |
||||
|
@ApiOperation(value = "预警信息推送记录表-分页列表查询", notes = "预警信息推送记录表-分页列表查询") |
||||
|
@GetMapping(value = "/list") |
||||
|
public Result<?> queryPageList( |
||||
|
@RequestParam(name = "key", required = false) String key, |
||||
|
@RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo, |
||||
|
@RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize, |
||||
|
HttpServletRequest req) { |
||||
|
QueryWrapper<TbDustWarning> queryWrapper = QueryGenerator.initQueryWrapper(new TbDustWarning(), req.getParameterMap()); |
||||
|
if (StrUtil.isNotEmpty(key)) { |
||||
|
|
||||
|
} |
||||
|
|
||||
|
Page<TbDustWarning> page = new Page<TbDustWarning>(pageNo, pageSize); |
||||
|
IPage<TbDustWarning> pageList = tbDustWarningService.page(page, queryWrapper); |
||||
|
return Result.ok(pageList); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* 添加 |
||||
|
* |
||||
|
* @param tbDustWarning |
||||
|
* @return |
||||
|
*/ |
||||
|
@AutoLog(value = "预警信息推送记录表-添加") |
||||
|
@ApiOperation(value = "预警信息推送记录表-添加", notes = "预警信息推送记录表-添加") |
||||
|
@PostMapping(value = "/add") |
||||
|
public Result<?> add(@RequestBody TbDustWarning tbDustWarning) { |
||||
|
tbDustWarningService.save(tbDustWarning); |
||||
|
return Result.ok("添加成功!"); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* 编辑 |
||||
|
* |
||||
|
* @param tbDustWarning |
||||
|
* @return |
||||
|
*/ |
||||
|
@AutoLog(value = "预警信息推送记录表-编辑") |
||||
|
@ApiOperation(value = "预警信息推送记录表-编辑", notes = "预警信息推送记录表-编辑") |
||||
|
@PutMapping(value = "/edit") |
||||
|
public Result<?> edit(@RequestBody TbDustWarning tbDustWarning) { |
||||
|
tbDustWarningService.updateById(tbDustWarning); |
||||
|
return Result.ok("编辑成功!"); |
||||
|
} |
||||
|
|
||||
|
|
||||
|
/** |
||||
|
* 通过id删除 |
||||
|
* |
||||
|
* @param id |
||||
|
* @return |
||||
|
*/ |
||||
|
@AutoLog(value = "预警信息推送记录表-通过id删除") |
||||
|
@ApiOperation(value = "预警信息推送记录表-通过id删除", notes = "预警信息推送记录表-通过id删除") |
||||
|
@DeleteMapping(value = "/delete") |
||||
|
public Result<?> delete(@RequestParam(name = "id", required = true) String id) { |
||||
|
tbDustWarningService.removeById(id); |
||||
|
return Result.ok("删除成功!"); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* 批量删除 |
||||
|
* |
||||
|
* @param ids |
||||
|
* @return |
||||
|
*/ |
||||
|
@AutoLog(value = "预警信息推送记录表-批量删除") |
||||
|
@ApiOperation(value = "预警信息推送记录表-批量删除", notes = "预警信息推送记录表-批量删除") |
||||
|
@DeleteMapping(value = "/deleteBatch") |
||||
|
public Result<?> deleteBatch(@RequestParam(name = "ids", required = true) String ids) { |
||||
|
this.tbDustWarningService.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) { |
||||
|
TbDustWarning tbDustWarning = tbDustWarningService.getById(id); |
||||
|
return Result.ok(tbDustWarning); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* 导出excel |
||||
|
* |
||||
|
* @param request |
||||
|
* @param tbDustWarning |
||||
|
*/ |
||||
|
@RequestMapping(value = "/exportXls") |
||||
|
public ModelAndView exportXls(HttpServletRequest request, HttpServletResponse response, TbDustWarning tbDustWarning) { |
||||
|
response.setHeader("Access-Control-Expose-Headers", "Content-Disposition"); |
||||
|
return super.exportXls(request, tbDustWarning, TbDustWarning.class, "预警信息推送记录表"); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* 通过excel导入数据 |
||||
|
* |
||||
|
* @param request |
||||
|
* @param response |
||||
|
* @return |
||||
|
*/ |
||||
|
@RequestMapping(value = "/importExcel", method = RequestMethod.POST) |
||||
|
public Result<?> importExcel(HttpServletRequest request, HttpServletResponse response) { |
||||
|
return super.importExcel(request, response, TbDustWarning.class); |
||||
|
} |
||||
|
|
||||
|
} |
@ -0,0 +1,161 @@ |
|||||
|
package cc.admin.modules.dust.controller; |
||||
|
|
||||
|
import cc.admin.common.api.vo.Result; |
||||
|
import cc.admin.common.aspect.annotation.AutoLog; |
||||
|
import cc.admin.common.sys.base.controller.BaseController; |
||||
|
import cc.admin.common.sys.query.QueryGenerator; |
||||
|
import cc.admin.modules.dust.entity.TbDustWarningFeedback; |
||||
|
import cc.admin.modules.dust.service.ITbDustWarningFeedbackService; |
||||
|
import cn.hutool.core.util.IdUtil; |
||||
|
import cn.hutool.core.util.StrUtil; |
||||
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
||||
|
import com.baomidou.mybatisplus.core.metadata.IPage; |
||||
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
||||
|
import io.swagger.annotations.Api; |
||||
|
import io.swagger.annotations.ApiOperation; |
||||
|
import lombok.extern.slf4j.Slf4j; |
||||
|
import org.springframework.beans.factory.annotation.Autowired; |
||||
|
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; |
||||
|
|
||||
|
/** |
||||
|
* @Description: 预警消息处置反馈表 |
||||
|
* @Author: cc-admin |
||||
|
* @Date: 2025-04-27 |
||||
|
* @Version: V1.0.0 |
||||
|
*/ |
||||
|
@Slf4j |
||||
|
@Api(tags = "预警消息处置反馈表") |
||||
|
@RestController |
||||
|
@RequestMapping("/tb/dustWarningFeedback") |
||||
|
public class TbDustWarningFeedbackController extends BaseController<TbDustWarningFeedback, ITbDustWarningFeedbackService> { |
||||
|
@Autowired |
||||
|
private ITbDustWarningFeedbackService tbDustWarningFeedbackService; |
||||
|
|
||||
|
/** |
||||
|
* 分页列表查询 |
||||
|
* |
||||
|
* @param key |
||||
|
* @param pageNo |
||||
|
* @param pageSize |
||||
|
* @param req |
||||
|
* @return |
||||
|
*/ |
||||
|
@AutoLog(value = "预警消息处置反馈表-分页列表查询") |
||||
|
@ApiOperation(value = "预警消息处置反馈表-分页列表查询", notes = "预警消息处置反馈表-分页列表查询") |
||||
|
@GetMapping(value = "/list") |
||||
|
public Result<?> queryPageList( |
||||
|
@RequestParam(name = "key", required = false) String key, |
||||
|
@RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo, |
||||
|
@RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize, |
||||
|
HttpServletRequest req) { |
||||
|
QueryWrapper<TbDustWarningFeedback> queryWrapper = QueryGenerator.initQueryWrapper(new TbDustWarningFeedback(), req.getParameterMap()); |
||||
|
if (StrUtil.isNotEmpty(key)) { |
||||
|
|
||||
|
} |
||||
|
|
||||
|
Page<TbDustWarningFeedback> page = new Page<TbDustWarningFeedback>(pageNo, pageSize); |
||||
|
IPage<TbDustWarningFeedback> pageList = tbDustWarningFeedbackService.page(page, queryWrapper); |
||||
|
return Result.ok(pageList); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* 添加 |
||||
|
* |
||||
|
* @param tbDustWarningFeedback |
||||
|
* @return |
||||
|
*/ |
||||
|
@AutoLog(value = "预警消息处置反馈表-添加") |
||||
|
@ApiOperation(value = "预警消息处置反馈表-添加", notes = "预警消息处置反馈表-添加") |
||||
|
@PostMapping(value = "/add") |
||||
|
public Result<?> add(@RequestBody TbDustWarningFeedback tbDustWarningFeedback) { |
||||
|
tbDustWarningFeedbackService.save(tbDustWarningFeedback); |
||||
|
return Result.ok("添加成功!"); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* 编辑 |
||||
|
* |
||||
|
* @param tbDustWarningFeedback |
||||
|
* @return |
||||
|
*/ |
||||
|
@AutoLog(value = "预警消息处置反馈表-编辑") |
||||
|
@ApiOperation(value = "预警消息处置反馈表-编辑", notes = "预警消息处置反馈表-编辑") |
||||
|
@PutMapping(value = "/edit") |
||||
|
public Result<?> edit(@RequestBody TbDustWarningFeedback tbDustWarningFeedback) { |
||||
|
tbDustWarningFeedbackService.updateById(tbDustWarningFeedback); |
||||
|
return Result.ok("编辑成功!"); |
||||
|
} |
||||
|
|
||||
|
|
||||
|
/** |
||||
|
* 通过id删除 |
||||
|
* |
||||
|
* @param id |
||||
|
* @return |
||||
|
*/ |
||||
|
@AutoLog(value = "预警消息处置反馈表-通过id删除") |
||||
|
@ApiOperation(value = "预警消息处置反馈表-通过id删除", notes = "预警消息处置反馈表-通过id删除") |
||||
|
@DeleteMapping(value = "/delete") |
||||
|
public Result<?> delete(@RequestParam(name = "id", required = true) String id) { |
||||
|
tbDustWarningFeedbackService.removeById(id); |
||||
|
return Result.ok("删除成功!"); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* 批量删除 |
||||
|
* |
||||
|
* @param ids |
||||
|
* @return |
||||
|
*/ |
||||
|
@AutoLog(value = "预警消息处置反馈表-批量删除") |
||||
|
@ApiOperation(value = "预警消息处置反馈表-批量删除", notes = "预警消息处置反馈表-批量删除") |
||||
|
@DeleteMapping(value = "/deleteBatch") |
||||
|
public Result<?> deleteBatch(@RequestParam(name = "ids", required = true) String ids) { |
||||
|
this.tbDustWarningFeedbackService.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) { |
||||
|
TbDustWarningFeedback tbDustWarningFeedback = tbDustWarningFeedbackService.getById(id); |
||||
|
return Result.ok(tbDustWarningFeedback); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* 导出excel |
||||
|
* |
||||
|
* @param request |
||||
|
* @param tbDustWarningFeedback |
||||
|
*/ |
||||
|
@RequestMapping(value = "/exportXls") |
||||
|
public ModelAndView exportXls(HttpServletRequest request, HttpServletResponse response, TbDustWarningFeedback tbDustWarningFeedback) { |
||||
|
response.setHeader("Access-Control-Expose-Headers", "Content-Disposition"); |
||||
|
return super.exportXls(request, tbDustWarningFeedback, TbDustWarningFeedback.class, "预警消息处置反馈表"); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* 通过excel导入数据 |
||||
|
* |
||||
|
* @param request |
||||
|
* @param response |
||||
|
* @return |
||||
|
*/ |
||||
|
@RequestMapping(value = "/importExcel", method = RequestMethod.POST) |
||||
|
public Result<?> importExcel(HttpServletRequest request, HttpServletResponse response) { |
||||
|
return super.importExcel(request, response, TbDustWarningFeedback.class); |
||||
|
} |
||||
|
|
||||
|
} |
@ -1,162 +0,0 @@ |
|||||
package cc.admin.modules.dust.controller; |
|
||||
|
|
||||
import cc.admin.common.api.vo.Result; |
|
||||
import cc.admin.common.aspect.annotation.AutoLog; |
|
||||
import cc.admin.common.sys.base.controller.BaseController; |
|
||||
import cc.admin.common.sys.query.QueryGenerator; |
|
||||
import cc.admin.modules.dust.entity.WindSpeedColor; |
|
||||
import cc.admin.modules.dust.service.IWindSpeedColorService; |
|
||||
import cn.hutool.core.util.IdUtil; |
|
||||
import cn.hutool.core.util.StrUtil; |
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage; |
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
|
||||
import io.swagger.annotations.Api; |
|
||||
import io.swagger.annotations.ApiOperation; |
|
||||
import lombok.extern.slf4j.Slf4j; |
|
||||
import org.springframework.beans.factory.annotation.Autowired; |
|
||||
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; |
|
||||
|
|
||||
/** |
|
||||
* @Description: 风速颜色表 |
|
||||
* @Author: cc-admin |
|
||||
* @Date: 2025-01-09 |
|
||||
* @Version: V1.0.0 |
|
||||
*/ |
|
||||
@Slf4j |
|
||||
@Api(tags="风速颜色表") |
|
||||
@RestController |
|
||||
@RequestMapping("/wind/speedColor") |
|
||||
public class WindSpeedColorController extends BaseController<WindSpeedColor, IWindSpeedColorService> { |
|
||||
@Autowired |
|
||||
private IWindSpeedColorService windSpeedColorService; |
|
||||
|
|
||||
/** |
|
||||
* 分页列表查询 |
|
||||
* |
|
||||
* @param key |
|
||||
* @param pageNo |
|
||||
* @param pageSize |
|
||||
* @param req |
|
||||
* @return |
|
||||
*/ |
|
||||
@AutoLog(value = "风速颜色表-分页列表查询") |
|
||||
@ApiOperation(value="风速颜色表-分页列表查询", notes="风速颜色表-分页列表查询") |
|
||||
@GetMapping(value = "/list") |
|
||||
public Result<?> queryPageList( |
|
||||
@RequestParam(name="key",required = false) String key, |
|
||||
@RequestParam(name="pageNo", defaultValue="1") Integer pageNo, |
|
||||
@RequestParam(name="pageSize", defaultValue="10") Integer pageSize, |
|
||||
HttpServletRequest req) { |
|
||||
QueryWrapper<WindSpeedColor> queryWrapper = QueryGenerator.initQueryWrapper(new WindSpeedColor(), req.getParameterMap()); |
|
||||
if (StrUtil.isNotEmpty(key)) { |
|
||||
|
|
||||
} |
|
||||
|
|
||||
Page<WindSpeedColor> page = new Page<WindSpeedColor>(pageNo, pageSize); |
|
||||
IPage<WindSpeedColor> pageList = windSpeedColorService.page(page, queryWrapper); |
|
||||
return Result.ok(pageList); |
|
||||
} |
|
||||
|
|
||||
/** |
|
||||
* 添加 |
|
||||
* |
|
||||
* @param windSpeedColor |
|
||||
* @return |
|
||||
*/ |
|
||||
@AutoLog(value = "风速颜色表-添加") |
|
||||
@ApiOperation(value="风速颜色表-添加", notes="风速颜色表-添加") |
|
||||
@PostMapping(value = "/add") |
|
||||
public Result<?> add(@RequestBody WindSpeedColor windSpeedColor) { |
|
||||
windSpeedColorService.save(windSpeedColor); |
|
||||
return Result.ok("添加成功!"); |
|
||||
} |
|
||||
|
|
||||
/** |
|
||||
* 编辑 |
|
||||
* |
|
||||
* @param windSpeedColor |
|
||||
* @return |
|
||||
*/ |
|
||||
@AutoLog(value = "风速颜色表-编辑") |
|
||||
@ApiOperation(value="风速颜色表-编辑", notes="风速颜色表-编辑") |
|
||||
@PutMapping(value = "/edit") |
|
||||
public Result<?> edit(@RequestBody WindSpeedColor windSpeedColor) { |
|
||||
windSpeedColorService.updateById(windSpeedColor); |
|
||||
return Result.ok("编辑成功!"); |
|
||||
} |
|
||||
|
|
||||
|
|
||||
|
|
||||
/** |
|
||||
* 通过id删除 |
|
||||
* |
|
||||
* @param id |
|
||||
* @return |
|
||||
*/ |
|
||||
@AutoLog(value = "风速颜色表-通过id删除") |
|
||||
@ApiOperation(value="风速颜色表-通过id删除", notes="风速颜色表-通过id删除") |
|
||||
@DeleteMapping(value = "/delete") |
|
||||
public Result<?> delete(@RequestParam(name="id",required=true) String id) { |
|
||||
windSpeedColorService.removeById(id); |
|
||||
return Result.ok("删除成功!"); |
|
||||
} |
|
||||
|
|
||||
/** |
|
||||
* 批量删除 |
|
||||
* |
|
||||
* @param ids |
|
||||
* @return |
|
||||
*/ |
|
||||
@AutoLog(value = "风速颜色表-批量删除") |
|
||||
@ApiOperation(value="风速颜色表-批量删除", notes="风速颜色表-批量删除") |
|
||||
@DeleteMapping(value = "/deleteBatch") |
|
||||
public Result<?> deleteBatch(@RequestParam(name="ids",required=true) String ids) { |
|
||||
this.windSpeedColorService.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) { |
|
||||
WindSpeedColor windSpeedColor = windSpeedColorService.getById(id); |
|
||||
return Result.ok(windSpeedColor); |
|
||||
} |
|
||||
|
|
||||
/** |
|
||||
* 导出excel |
|
||||
* |
|
||||
* @param request |
|
||||
* @param windSpeedColor |
|
||||
*/ |
|
||||
@RequestMapping(value = "/exportXls") |
|
||||
public ModelAndView exportXls(HttpServletRequest request, HttpServletResponse response, WindSpeedColor windSpeedColor) { |
|
||||
response.setHeader("Access-Control-Expose-Headers", "Content-Disposition"); |
|
||||
return super.exportXls(request, windSpeedColor, WindSpeedColor.class, "风速颜色表"); |
|
||||
} |
|
||||
|
|
||||
/** |
|
||||
* 通过excel导入数据 |
|
||||
* |
|
||||
* @param request |
|
||||
* @param response |
|
||||
* @return |
|
||||
*/ |
|
||||
@RequestMapping(value = "/importExcel", method = RequestMethod.POST) |
|
||||
public Result<?> importExcel(HttpServletRequest request, HttpServletResponse response) { |
|
||||
return super.importExcel(request, response, WindSpeedColor.class); |
|
||||
} |
|
||||
|
|
||||
} |
|
@ -1,84 +0,0 @@ |
|||||
package cc.admin.modules.dust.entity; |
|
||||
|
|
||||
import java.io.Serializable; |
|
||||
import java.util.Date; |
|
||||
import java.util.List; |
|
||||
|
|
||||
import com.baomidou.mybatisplus.annotation.*; |
|
||||
import io.swagger.annotations.ApiModel; |
|
||||
import io.swagger.annotations.ApiModelProperty; |
|
||||
import lombok.Data; |
|
||||
import lombok.EqualsAndHashCode; |
|
||||
import lombok.experimental.Accessors; |
|
||||
import com.fasterxml.jackson.annotation.JsonFormat; |
|
||||
import org.springframework.format.annotation.DateTimeFormat; |
|
||||
import cc.admin.poi.excel.annotation.Excel; |
|
||||
import cc.admin.common.aspect.annotation.Dict; |
|
||||
|
|
||||
/** |
|
||||
* @Description: 设计方案表 |
|
||||
* @Author: cc-admin |
|
||||
* @Date: 2024-12-06 |
|
||||
* @Version: V1.0.0 |
|
||||
*/ |
|
||||
@Data |
|
||||
@TableName("design_plan") |
|
||||
@EqualsAndHashCode(callSuper = false) |
|
||||
@Accessors(chain = true) |
|
||||
@ApiModel(value="design_plan对象", description="设计方案表") |
|
||||
public class DesignPlan { |
|
||||
|
|
||||
/**主键ID*/ |
|
||||
@Excel(name = "主键ID", width = 15) |
|
||||
@ApiModelProperty(value = "主键ID") |
|
||||
private String id; |
|
||||
/**主键ID*/ |
|
||||
@Excel(name = "管道配置id", width = 15) |
|
||||
@ApiModelProperty(value = "管道配置id") |
|
||||
private String pipeDiameterId; |
|
||||
@Excel(name = "方案名称", width = 15) |
|
||||
@ApiModelProperty(value = "方案名称") |
|
||||
private String name; |
|
||||
/**总管风量*/ |
|
||||
@Excel(name = "总管风量", width = 15) |
|
||||
@ApiModelProperty(value = "总管风量") |
|
||||
private String totalFlow; |
|
||||
/**排序*/ |
|
||||
@Excel(name = "排序", width = 15) |
|
||||
@ApiModelProperty(value = "排序") |
|
||||
private Integer sortOrder; |
|
||||
/**备注*/ |
|
||||
@Excel(name = "备注", width = 15) |
|
||||
@ApiModelProperty(value = "备注") |
|
||||
private String remark; |
|
||||
|
|
||||
/**删除状态(0-正常,1-已删除)*/ |
|
||||
@Excel(name = "方案标识位", width = 15) |
|
||||
@ApiModelProperty(value = "方案标识位") |
|
||||
private Integer planFlag; |
|
||||
|
|
||||
/**删除状态(0-正常,1-已删除)*/ |
|
||||
@Excel(name = "删除状态(0-正常,1-已删除)", width = 15) |
|
||||
@ApiModelProperty(value = "删除状态(0-正常,1-已删除)") |
|
||||
@TableLogic |
|
||||
private Integer delFlag; |
|
||||
/**创建人*/ |
|
||||
@Excel(name = "创建人", width = 15) |
|
||||
@ApiModelProperty(value = "创建人") |
|
||||
private String createBy; |
|
||||
/**创建时间*/ |
|
||||
@Excel(name = "创建时间", width = 15) |
|
||||
@ApiModelProperty(value = "创建时间") |
|
||||
private Date createTime; |
|
||||
/**更新人*/ |
|
||||
@Excel(name = "更新人", width = 15) |
|
||||
@ApiModelProperty(value = "更新人") |
|
||||
private String updateBy; |
|
||||
/**更新时间*/ |
|
||||
@Excel(name = "更新时间", width = 15) |
|
||||
@ApiModelProperty(value = "更新时间") |
|
||||
private Date updateTime; |
|
||||
|
|
||||
@TableField(exist = false) |
|
||||
private List<String> pipeIdList; |
|
||||
} |
|
@ -1,75 +0,0 @@ |
|||||
package cc.admin.modules.dust.entity; |
|
||||
|
|
||||
import java.io.Serializable; |
|
||||
import java.util.Date; |
|
||||
|
|
||||
import com.baomidou.mybatisplus.annotation.*; |
|
||||
import io.swagger.annotations.ApiModel; |
|
||||
import io.swagger.annotations.ApiModelProperty; |
|
||||
import lombok.Data; |
|
||||
import lombok.EqualsAndHashCode; |
|
||||
import lombok.experimental.Accessors; |
|
||||
import com.fasterxml.jackson.annotation.JsonFormat; |
|
||||
import org.springframework.format.annotation.DateTimeFormat; |
|
||||
import cc.admin.poi.excel.annotation.Excel; |
|
||||
import cc.admin.common.aspect.annotation.Dict; |
|
||||
|
|
||||
/** |
|
||||
* @Description: 警报记录表 |
|
||||
* @Author: cc-admin |
|
||||
* @Date: 2025-03-27 |
|
||||
* @Version: V1.0.0 |
|
||||
*/ |
|
||||
@Data |
|
||||
@TableName("dust_alarm") |
|
||||
@EqualsAndHashCode(callSuper = false) |
|
||||
@Accessors(chain = true) |
|
||||
@ApiModel(value="dust_alarm对象", description="警报记录表") |
|
||||
public class DustAlarm { |
|
||||
|
|
||||
/**主键ID*/ |
|
||||
@Excel(name = "主键ID", width = 15) |
|
||||
@ApiModelProperty(value = "主键ID") |
|
||||
private String id; |
|
||||
/**所属系统*/ |
|
||||
@Excel(name = "所属系统", width = 15) |
|
||||
@ApiModelProperty(value = "所属系统") |
|
||||
private String systemId; |
|
||||
/**警报时间*/ |
|
||||
@Excel(name = "警报时间", width = 15) |
|
||||
@ApiModelProperty(value = "警报时间") |
|
||||
private Date startTime; |
|
||||
/**警报结束时间*/ |
|
||||
@Excel(name = "警报结束时间", width = 15) |
|
||||
@ApiModelProperty(value = "警报结束时间") |
|
||||
private Date endTime; |
|
||||
/**警报内容*/ |
|
||||
@Excel(name = "警报内容", width = 15) |
|
||||
@ApiModelProperty(value = "警报内容") |
|
||||
private String alarmContent; |
|
||||
/**备注*/ |
|
||||
@Excel(name = "备注", width = 15) |
|
||||
@ApiModelProperty(value = "备注") |
|
||||
private String remark; |
|
||||
/**删除标志*/ |
|
||||
@Excel(name = "删除标志", width = 15) |
|
||||
@ApiModelProperty(value = "删除标志") |
|
||||
@TableLogic |
|
||||
private Integer delFlag; |
|
||||
/**创建时间*/ |
|
||||
@Excel(name = "创建时间", width = 15) |
|
||||
@ApiModelProperty(value = "创建时间") |
|
||||
private Date createTime; |
|
||||
/**创建人*/ |
|
||||
@Excel(name = "创建人", width = 15) |
|
||||
@ApiModelProperty(value = "创建人") |
|
||||
private String createBy; |
|
||||
/**更新时间*/ |
|
||||
@Excel(name = "更新时间", width = 15) |
|
||||
@ApiModelProperty(value = "更新时间") |
|
||||
private Date updateTime; |
|
||||
/**更新人*/ |
|
||||
@Excel(name = "更新人", width = 15) |
|
||||
@ApiModelProperty(value = "更新人") |
|
||||
private String updateBy; |
|
||||
} |
|
@ -1,76 +0,0 @@ |
|||||
package cc.admin.modules.dust.entity; |
|
||||
|
|
||||
import java.io.Serializable; |
|
||||
import java.util.Date; |
|
||||
|
|
||||
import com.baomidou.mybatisplus.annotation.*; |
|
||||
import io.swagger.annotations.ApiModel; |
|
||||
import io.swagger.annotations.ApiModelProperty; |
|
||||
import lombok.Data; |
|
||||
import lombok.EqualsAndHashCode; |
|
||||
import lombok.experimental.Accessors; |
|
||||
import com.fasterxml.jackson.annotation.JsonFormat; |
|
||||
import org.springframework.format.annotation.DateTimeFormat; |
|
||||
import cc.admin.poi.excel.annotation.Excel; |
|
||||
import cc.admin.common.aspect.annotation.Dict; |
|
||||
|
|
||||
/** |
|
||||
* @Description: 数据点位表 |
|
||||
* @Author: cc-admin |
|
||||
* @Date: 2025-03-27 |
|
||||
* @Version: V1.0.0 |
|
||||
*/ |
|
||||
@Data |
|
||||
@TableName("dust_data_tag") |
|
||||
@EqualsAndHashCode(callSuper = false) |
|
||||
@Accessors(chain = true) |
|
||||
@ApiModel(value="dust_data_tag对象", description="数据点位表") |
|
||||
public class DustDataTag { |
|
||||
|
|
||||
/**主键ID*/ |
|
||||
@Excel(name = "主键ID", width = 15) |
|
||||
@ApiModelProperty(value = "主键ID") |
|
||||
private String id; |
|
||||
/**名称*/ |
|
||||
@Excel(name = "除尘系统id", width = 15) |
|
||||
@ApiModelProperty(value = "除尘系统id") |
|
||||
private String systemId; |
|
||||
|
|
||||
/**名称*/ |
|
||||
@Excel(name = "名称", width = 15) |
|
||||
@ApiModelProperty(value = "名称") |
|
||||
private String name; |
|
||||
/**数据点位*/ |
|
||||
@Excel(name = "数据点位", width = 15) |
|
||||
@ApiModelProperty(value = "数据点位") |
|
||||
private String dataTag; |
|
||||
/**排序*/ |
|
||||
@Excel(name = "排序", width = 15) |
|
||||
@ApiModelProperty(value = "排序") |
|
||||
private Integer sortOrder; |
|
||||
/**备注*/ |
|
||||
@Excel(name = "备注", width = 15) |
|
||||
@ApiModelProperty(value = "备注") |
|
||||
private String remark; |
|
||||
/**删除标志*/ |
|
||||
@Excel(name = "删除标志", width = 15) |
|
||||
@ApiModelProperty(value = "删除标志") |
|
||||
@TableLogic |
|
||||
private Integer delFlag; |
|
||||
/**创建时间*/ |
|
||||
@Excel(name = "创建时间", width = 15) |
|
||||
@ApiModelProperty(value = "创建时间") |
|
||||
private Date createTime; |
|
||||
/**创建人*/ |
|
||||
@Excel(name = "创建人", width = 15) |
|
||||
@ApiModelProperty(value = "创建人") |
|
||||
private String createBy; |
|
||||
/**更新时间*/ |
|
||||
@Excel(name = "更新时间", width = 15) |
|
||||
@ApiModelProperty(value = "更新时间") |
|
||||
private Date updateTime; |
|
||||
/**更新人*/ |
|
||||
@Excel(name = "更新人", width = 15) |
|
||||
@ApiModelProperty(value = "更新人") |
|
||||
private String updateBy; |
|
||||
} |
|
@ -1,102 +0,0 @@ |
|||||
package cc.admin.modules.dust.entity; |
|
||||
|
|
||||
import java.io.Serializable; |
|
||||
import java.util.Date; |
|
||||
|
|
||||
import com.baomidou.mybatisplus.annotation.*; |
|
||||
import io.swagger.annotations.ApiModel; |
|
||||
import io.swagger.annotations.ApiModelProperty; |
|
||||
import lombok.Data; |
|
||||
import lombok.EqualsAndHashCode; |
|
||||
import lombok.experimental.Accessors; |
|
||||
import com.fasterxml.jackson.annotation.JsonFormat; |
|
||||
import org.springframework.format.annotation.DateTimeFormat; |
|
||||
import cc.admin.poi.excel.annotation.Excel; |
|
||||
import cc.admin.common.aspect.annotation.Dict; |
|
||||
|
|
||||
/** |
|
||||
* @Description: 大屏监控项表 |
|
||||
* @Author: cc-admin |
|
||||
* @Date: 2025-03-27 |
|
||||
* @Version: V1.0.0 |
|
||||
*/ |
|
||||
@Data |
|
||||
@TableName("dust_monitor_item") |
|
||||
@EqualsAndHashCode(callSuper = false) |
|
||||
@Accessors(chain = true) |
|
||||
@ApiModel(value="dust_monitor_item对象", description="大屏监控项表") |
|
||||
public class DustMonitorItem { |
|
||||
|
|
||||
/**主键ID*/ |
|
||||
@Excel(name = "主键ID", width = 15) |
|
||||
@ApiModelProperty(value = "主键ID") |
|
||||
private String id; |
|
||||
/**所属系统*/ |
|
||||
@Excel(name = "所属系统", width = 15) |
|
||||
@ApiModelProperty(value = "所属系统") |
|
||||
private String systemId; |
|
||||
/**入口压力数据点位*/ |
|
||||
@Excel(name = "除尘器进口压力", width = 15) |
|
||||
@ApiModelProperty(value = "除尘器进口压力") |
|
||||
private String inletPressureDataTagId; |
|
||||
|
|
||||
/**出口压力数据点位*/ |
|
||||
@Excel(name = "除尘器出口压力", width = 15) |
|
||||
@ApiModelProperty(value = "除尘器出口压力") |
|
||||
private String outletPressureDataTagId; |
|
||||
|
|
||||
/**除尘器进出口压差(pa)*/ |
|
||||
@Excel(name = "除尘器进出口压差(pa)", width = 15) |
|
||||
@ApiModelProperty(value = "除尘器进出口压差(pa)") |
|
||||
private String pressureDifferenceId; |
|
||||
|
|
||||
/**风机速度*/ |
|
||||
@Excel(name = "风机速度", width = 15) |
|
||||
@ApiModelProperty(value = "风机速度") |
|
||||
private String fanSpeedDataTagId; |
|
||||
/**电机电流*/ |
|
||||
@Excel(name = "电机电流", width = 15) |
|
||||
@ApiModelProperty(value = "电机电流") |
|
||||
private String motorCurrentDataTagId; |
|
||||
/**烟囱CEMS风量*/ |
|
||||
@Excel(name = "烟囱CEMS风量", width = 15) |
|
||||
@ApiModelProperty(value = "烟囱CEMS风量") |
|
||||
private String cemsAirVolumeDataTagId; |
|
||||
/**粉尘浓度*/ |
|
||||
@Excel(name = "粉尘浓度", width = 15) |
|
||||
@ApiModelProperty(value = "粉尘浓度") |
|
||||
private String dustConcentrationDataTagId; |
|
||||
/**风机运行状态*/ |
|
||||
@Excel(name = "风机运行状态", width = 15) |
|
||||
@ApiModelProperty(value = "风机运行状态") |
|
||||
private String fanStatusDataTagId; |
|
||||
/**排序*/ |
|
||||
@Excel(name = "排序", width = 15) |
|
||||
@ApiModelProperty(value = "排序") |
|
||||
private Integer sortOrder; |
|
||||
/**备注*/ |
|
||||
@Excel(name = "备注", width = 15) |
|
||||
@ApiModelProperty(value = "备注") |
|
||||
private String remark; |
|
||||
/**删除标志*/ |
|
||||
@Excel(name = "删除标志", width = 15) |
|
||||
@ApiModelProperty(value = "删除标志") |
|
||||
@TableLogic |
|
||||
private Integer delFlag; |
|
||||
/**创建时间*/ |
|
||||
@Excel(name = "创建时间", width = 15) |
|
||||
@ApiModelProperty(value = "创建时间") |
|
||||
private Date createTime; |
|
||||
/**创建人*/ |
|
||||
@Excel(name = "创建人", width = 15) |
|
||||
@ApiModelProperty(value = "创建人") |
|
||||
private String createBy; |
|
||||
/**更新时间*/ |
|
||||
@Excel(name = "更新时间", width = 15) |
|
||||
@ApiModelProperty(value = "更新时间") |
|
||||
private Date updateTime; |
|
||||
/**更新人*/ |
|
||||
@Excel(name = "更新人", width = 15) |
|
||||
@ApiModelProperty(value = "更新人") |
|
||||
private String updateBy; |
|
||||
} |
|
@ -1,99 +0,0 @@ |
|||||
package cc.admin.modules.dust.entity; |
|
||||
|
|
||||
import java.io.Serializable; |
|
||||
import java.util.Date; |
|
||||
|
|
||||
import com.baomidou.mybatisplus.annotation.*; |
|
||||
import io.swagger.annotations.ApiModel; |
|
||||
import io.swagger.annotations.ApiModelProperty; |
|
||||
import lombok.Data; |
|
||||
import lombok.EqualsAndHashCode; |
|
||||
import lombok.experimental.Accessors; |
|
||||
import com.fasterxml.jackson.annotation.JsonFormat; |
|
||||
import org.springframework.format.annotation.DateTimeFormat; |
|
||||
import cc.admin.poi.excel.annotation.Excel; |
|
||||
import cc.admin.common.aspect.annotation.Dict; |
|
||||
|
|
||||
/** |
|
||||
* @Description: 大屏阀门监控表 |
|
||||
* @Author: cc-admin |
|
||||
* @Date: 2025-03-27 |
|
||||
* @Version: V1.0.0 |
|
||||
*/ |
|
||||
@Data |
|
||||
@TableName("dust_monitor_valve") |
|
||||
@EqualsAndHashCode(callSuper = false) |
|
||||
@Accessors(chain = true) |
|
||||
@ApiModel(value = "dust_monitor_valve对象", description = "大屏阀门监控表") |
|
||||
public class DustMonitorValve { |
|
||||
|
|
||||
/** |
|
||||
* 主键ID |
|
||||
*/ |
|
||||
@Excel(name = "主键ID", width = 15) |
|
||||
@ApiModelProperty(value = "主键ID") |
|
||||
private String id; |
|
||||
/** |
|
||||
* 阀门ID |
|
||||
*/ |
|
||||
@Excel(name = "阀门ID", width = 15) |
|
||||
@ApiModelProperty(value = "阀门ID") |
|
||||
private String valveId; |
|
||||
/** |
|
||||
* 数据点位 |
|
||||
*/ |
|
||||
@Excel(name = "数据点位", width = 15) |
|
||||
@ApiModelProperty(value = "数据点位") |
|
||||
private String dataTagId; |
|
||||
/** |
|
||||
* 排序 |
|
||||
*/ |
|
||||
@Excel(name = "排序", width = 15) |
|
||||
@ApiModelProperty(value = "排序") |
|
||||
private Integer sortOrder; |
|
||||
/** |
|
||||
* 备注 |
|
||||
*/ |
|
||||
@Excel(name = "备注", width = 15) |
|
||||
@ApiModelProperty(value = "备注") |
|
||||
private String remark; |
|
||||
/** |
|
||||
* 删除标志 |
|
||||
*/ |
|
||||
@Excel(name = "删除标志", width = 15) |
|
||||
@ApiModelProperty(value = "删除标志") |
|
||||
@TableLogic |
|
||||
private Integer delFlag; |
|
||||
/** |
|
||||
* 创建时间 |
|
||||
*/ |
|
||||
@Excel(name = "创建时间", width = 15) |
|
||||
@ApiModelProperty(value = "创建时间") |
|
||||
private Date createTime; |
|
||||
/** |
|
||||
* 创建人 |
|
||||
*/ |
|
||||
@Excel(name = "创建人", width = 15) |
|
||||
@ApiModelProperty(value = "创建人") |
|
||||
private String createBy; |
|
||||
/** |
|
||||
* 更新时间 |
|
||||
*/ |
|
||||
@Excel(name = "更新时间", width = 15) |
|
||||
@ApiModelProperty(value = "更新时间") |
|
||||
private Date updateTime; |
|
||||
/** |
|
||||
* 更新人 |
|
||||
*/ |
|
||||
@Excel(name = "更新人", width = 15) |
|
||||
@ApiModelProperty(value = "更新人") |
|
||||
private String updateBy; |
|
||||
|
|
||||
@ApiModelProperty(value = "所属系统") |
|
||||
@TableField(exist = false) |
|
||||
private String systemId; |
|
||||
|
|
||||
@ApiModelProperty(value = "状态") |
|
||||
@TableField(exist = false) |
|
||||
private Integer status; |
|
||||
} |
|
@ -1,67 +0,0 @@ |
|||||
package cc.admin.modules.dust.entity; |
|
||||
|
|
||||
import java.io.Serializable; |
|
||||
import java.util.Date; |
|
||||
|
|
||||
import com.baomidou.mybatisplus.annotation.*; |
|
||||
import io.swagger.annotations.ApiModel; |
|
||||
import io.swagger.annotations.ApiModelProperty; |
|
||||
import lombok.Data; |
|
||||
import lombok.EqualsAndHashCode; |
|
||||
import lombok.experimental.Accessors; |
|
||||
import com.fasterxml.jackson.annotation.JsonFormat; |
|
||||
import org.springframework.format.annotation.DateTimeFormat; |
|
||||
import cc.admin.poi.excel.annotation.Excel; |
|
||||
import cc.admin.common.aspect.annotation.Dict; |
|
||||
|
|
||||
/** |
|
||||
* @Description: 除尘系统表 |
|
||||
* @Author: cc-admin |
|
||||
* @Date: 2025-03-27 |
|
||||
* @Version: V1.0.0 |
|
||||
*/ |
|
||||
@Data |
|
||||
@TableName("dust_system") |
|
||||
@EqualsAndHashCode(callSuper = false) |
|
||||
@Accessors(chain = true) |
|
||||
@ApiModel(value="dust_system对象", description="除尘系统表") |
|
||||
public class DustSystem { |
|
||||
|
|
||||
/**主键ID*/ |
|
||||
@Excel(name = "主键ID", width = 15) |
|
||||
@ApiModelProperty(value = "主键ID") |
|
||||
private String id; |
|
||||
/**名称*/ |
|
||||
@Excel(name = "名称", width = 15) |
|
||||
@ApiModelProperty(value = "名称") |
|
||||
private String name; |
|
||||
/**排序*/ |
|
||||
@Excel(name = "排序", width = 15) |
|
||||
@ApiModelProperty(value = "排序") |
|
||||
private Integer sortOrder; |
|
||||
/**备注*/ |
|
||||
@Excel(name = "备注", width = 15) |
|
||||
@ApiModelProperty(value = "备注") |
|
||||
private String remark; |
|
||||
/**删除标志*/ |
|
||||
@Excel(name = "删除标志", width = 15) |
|
||||
@ApiModelProperty(value = "删除标志") |
|
||||
@TableLogic |
|
||||
private Integer delFlag; |
|
||||
/**创建时间*/ |
|
||||
@Excel(name = "创建时间", width = 15) |
|
||||
@ApiModelProperty(value = "创建时间") |
|
||||
private Date createTime; |
|
||||
/**创建人*/ |
|
||||
@Excel(name = "创建人", width = 15) |
|
||||
@ApiModelProperty(value = "创建人") |
|
||||
private String createBy; |
|
||||
/**更新时间*/ |
|
||||
@Excel(name = "更新时间", width = 15) |
|
||||
@ApiModelProperty(value = "更新时间") |
|
||||
private Date updateTime; |
|
||||
/**更新人*/ |
|
||||
@Excel(name = "更新人", width = 15) |
|
||||
@ApiModelProperty(value = "更新人") |
|
||||
private String updateBy; |
|
||||
} |
|
@ -1,95 +0,0 @@ |
|||||
package cc.admin.modules.dust.entity; |
|
||||
|
|
||||
import java.io.Serializable; |
|
||||
import java.util.Date; |
|
||||
|
|
||||
import com.baomidou.mybatisplus.annotation.*; |
|
||||
import io.swagger.annotations.ApiModel; |
|
||||
import io.swagger.annotations.ApiModelProperty; |
|
||||
import lombok.Data; |
|
||||
import lombok.EqualsAndHashCode; |
|
||||
import lombok.experimental.Accessors; |
|
||||
import com.fasterxml.jackson.annotation.JsonFormat; |
|
||||
import org.springframework.format.annotation.DateTimeFormat; |
|
||||
import cc.admin.poi.excel.annotation.Excel; |
|
||||
import cc.admin.common.aspect.annotation.Dict; |
|
||||
|
|
||||
/** |
|
||||
* @Description: 阀门表 |
|
||||
* @Author: cc-admin |
|
||||
* @Date: 2025-03-27 |
|
||||
* @Version: V1.0.0 |
|
||||
*/ |
|
||||
@Data |
|
||||
@TableName("dust_valve") |
|
||||
@EqualsAndHashCode(callSuper = false) |
|
||||
@Accessors(chain = true) |
|
||||
@ApiModel(value="dust_valve对象", description="阀门表") |
|
||||
public class DustValve { |
|
||||
|
|
||||
/**主键ID*/ |
|
||||
@Excel(name = "主键ID", width = 15) |
|
||||
@ApiModelProperty(value = "主键ID") |
|
||||
private String id; |
|
||||
/**所属系统*/ |
|
||||
@Excel(name = "所属系统", width = 15) |
|
||||
@ApiModelProperty(value = "所属系统") |
|
||||
private String systemId; |
|
||||
@TableField(exist = false) |
|
||||
private String systemName; |
|
||||
/**数据点位*/ |
|
||||
@Excel(name = "数据点位", width = 15) |
|
||||
@ApiModelProperty(value = "数据点位") |
|
||||
private String dataTagId; |
|
||||
@TableField(exist = false) |
|
||||
private String dataTag; |
|
||||
/**阀门名称*/ |
|
||||
@Excel(name = "阀门", width = 15) |
|
||||
@ApiModelProperty(value = "阀门") |
|
||||
private String name; |
|
||||
/**类型 (0: 升关阀, 1: 调节阀)*/ |
|
||||
@Excel(name = "类型 (0: 升关阀, 1: 调节阀)", width = 15) |
|
||||
@ApiModelProperty(value = "类型 (0: 升关阀, 1: 调节阀)") |
|
||||
private Integer type; |
|
||||
/**阀门位置*/ |
|
||||
@Excel(name = "除尘部位", width = 15) |
|
||||
@ApiModelProperty(value = "除尘部位") |
|
||||
private String location; |
|
||||
/**阀门参数*/ |
|
||||
@Excel(name = "阀门参数", width = 15) |
|
||||
@ApiModelProperty(value = "阀门参数") |
|
||||
private String parameter; |
|
||||
/**排序*/ |
|
||||
@Excel(name = "排序", width = 15) |
|
||||
@ApiModelProperty(value = "排序") |
|
||||
private Integer sortOrder; |
|
||||
/**备注*/ |
|
||||
@Excel(name = "备注", width = 15) |
|
||||
@ApiModelProperty(value = "备注") |
|
||||
private String remark; |
|
||||
/**删除标志*/ |
|
||||
@Excel(name = "删除标志", width = 15) |
|
||||
@ApiModelProperty(value = "删除标志") |
|
||||
@TableLogic |
|
||||
private Integer delFlag; |
|
||||
/**创建时间*/ |
|
||||
@Excel(name = "创建时间", width = 15) |
|
||||
@ApiModelProperty(value = "创建时间") |
|
||||
private Date createTime; |
|
||||
/**创建人*/ |
|
||||
@Excel(name = "创建人", width = 15) |
|
||||
@ApiModelProperty(value = "创建人") |
|
||||
private String createBy; |
|
||||
/**更新时间*/ |
|
||||
@Excel(name = "更新时间", width = 15) |
|
||||
@ApiModelProperty(value = "更新时间") |
|
||||
private Date updateTime; |
|
||||
/**更新人*/ |
|
||||
@Excel(name = "更新人", width = 15) |
|
||||
@ApiModelProperty(value = "更新人") |
|
||||
private String updateBy; |
|
||||
|
|
||||
@ApiModelProperty(value = "状态") |
|
||||
@TableField(exist = false) |
|
||||
private Integer status; |
|
||||
} |
|
@ -1,190 +0,0 @@ |
|||||
package cc.admin.modules.dust.entity; |
|
||||
|
|
||||
|
|
||||
import cc.admin.poi.excel.annotation.Excel; |
|
||||
import com.baomidou.mybatisplus.annotation.FieldStrategy; |
|
||||
import com.baomidou.mybatisplus.annotation.TableField; |
|
||||
import com.baomidou.mybatisplus.annotation.TableLogic; |
|
||||
import com.baomidou.mybatisplus.annotation.TableName; |
|
||||
import com.fasterxml.jackson.annotation.JsonIgnoreProperties; |
|
||||
import io.swagger.annotations.ApiModel; |
|
||||
import io.swagger.annotations.ApiModelProperty; |
|
||||
import lombok.Data; |
|
||||
import lombok.EqualsAndHashCode; |
|
||||
import lombok.experimental.Accessors; |
|
||||
|
|
||||
import java.util.ArrayList; |
|
||||
import java.util.Date; |
|
||||
import java.util.List; |
|
||||
|
|
||||
/** |
|
||||
* @Description: 管道表 |
|
||||
* @Author: cc-admin |
|
||||
* @Date: 2024-12-06 |
|
||||
* @Version: V1.0.0 |
|
||||
*/ |
|
||||
@Data |
|
||||
@TableName("pipe") |
|
||||
@EqualsAndHashCode(callSuper = false) |
|
||||
@Accessors(chain = true) |
|
||||
@ApiModel(value = "pipe对象", description = "管道表") |
|
||||
@JsonIgnoreProperties(ignoreUnknown = true) |
|
||||
public class Pipe { |
|
||||
|
|
||||
/** |
|
||||
* 主键ID |
|
||||
*/ |
|
||||
@Excel(name = "主键ID", width = 15) |
|
||||
@ApiModelProperty(value = "主键ID") |
|
||||
private String id; |
|
||||
/** |
|
||||
* 父管道ID |
|
||||
*/ |
|
||||
@Excel(name = "父管道ID", width = 15) |
|
||||
@ApiModelProperty(value = "父管道ID") |
|
||||
private String parentId; |
|
||||
|
|
||||
/** |
|
||||
* 父管道ID |
|
||||
*/ |
|
||||
@Excel(name = "计划方案ID", width = 15) |
|
||||
@ApiModelProperty(value = "计划方案ID") |
|
||||
private String designPlanId; |
|
||||
|
|
||||
|
|
||||
/** |
|
||||
* 管道名称 |
|
||||
*/ |
|
||||
@Excel(name = "管道名称", width = 15) |
|
||||
@ApiModelProperty(value = "管道名称") |
|
||||
private String name; |
|
||||
/** |
|
||||
* 设计风量 |
|
||||
*/ |
|
||||
@Excel(name = "设计风量", width = 15) |
|
||||
@ApiModelProperty(value = "设计风量") |
|
||||
private Double flow; |
|
||||
//管道风量
|
|
||||
@TableField(exist = false) |
|
||||
private Double pipeFlow; |
|
||||
//开度
|
|
||||
@Excel(name = "节点阀门打开度", width = 15) |
|
||||
@ApiModelProperty(value = "节点阀门打开度") |
|
||||
private Double valveOpening; |
|
||||
//开度
|
|
||||
@Excel(name = "推荐方案节点阀门打开度(%)", width = 15) |
|
||||
@ApiModelProperty(value = "推荐方案节点阀门打开度(%)") |
|
||||
private Double recommendValveOpening; |
|
||||
//开度
|
|
||||
@Excel(name = "实际生产阀门打开度(%)", width = 15) |
|
||||
@ApiModelProperty(value = "实际生产阀门打开度(%)") |
|
||||
private Double productionValveOpening; |
|
||||
//开度
|
|
||||
@Excel(name = "自定义开度(%)", width = 15) |
|
||||
@ApiModelProperty(value = "自定义开度(%)") |
|
||||
private Double customValveOpening; |
|
||||
/** |
|
||||
* 所属分组 |
|
||||
*/ |
|
||||
@Excel(name = "所属分组", width = 15) |
|
||||
@ApiModelProperty(value = "所属分组") |
|
||||
private String groupName; |
|
||||
|
|
||||
@Excel(name = "选择管径", width = 15) |
|
||||
@ApiModelProperty(value = "选择管径") |
|
||||
@TableField(strategy = FieldStrategy.IGNORED) |
|
||||
private Double diameter; |
|
||||
//管道内径
|
|
||||
@TableField(exist = false) |
|
||||
private Double pipeDiameter; |
|
||||
//计算管道内径
|
|
||||
@TableField(exist = false) |
|
||||
private Double computeDiameter; |
|
||||
/** |
|
||||
* 壁厚 |
|
||||
*/ |
|
||||
@Excel(name = "壁厚", width = 15) |
|
||||
@ApiModelProperty(value = "壁厚") |
|
||||
private Double thickness; |
|
||||
/** |
|
||||
* 是否除尘节点(0-否,1-是) |
|
||||
*/ |
|
||||
@Excel(name = "是否除尘节点(0-否,1-是)", width = 15) |
|
||||
@ApiModelProperty(value = "是否除尘节点(0-否,1-是)") |
|
||||
private Integer isLeaf; |
|
||||
|
|
||||
/** |
|
||||
* 是否除尘节点(0-否,1-是) |
|
||||
*/ |
|
||||
@Excel(name = "是否加入推荐方案计算(0-否,1-是)", width = 15) |
|
||||
@ApiModelProperty(value = "是否加入推荐方案计算(0-否,1-是)") |
|
||||
private Integer isCompute; |
|
||||
|
|
||||
/** |
|
||||
* 是否除尘节点(0-否,1-是) |
|
||||
*/ |
|
||||
@Excel(name = "是否常开(0-否,1-是)", width = 15) |
|
||||
@ApiModelProperty(value = "是否常开(0-否,1-是)") |
|
||||
private Integer isNormallyOpen; |
|
||||
/** |
|
||||
* 排序 |
|
||||
*/ |
|
||||
@Excel(name = "排序", width = 15) |
|
||||
@ApiModelProperty(value = "排序") |
|
||||
private Integer sortOrder; |
|
||||
/** |
|
||||
* 备注 |
|
||||
*/ |
|
||||
@Excel(name = "备注", width = 15) |
|
||||
@ApiModelProperty(value = "备注") |
|
||||
private String remark; |
|
||||
/** |
|
||||
* 删除状态(0-正常,1-已删除) |
|
||||
*/ |
|
||||
@Excel(name = "删除状态(0-正常,1-已删除)", width = 15) |
|
||||
@ApiModelProperty(value = "删除状态(0-正常,1-已删除)") |
|
||||
@TableLogic |
|
||||
private Integer delFlag; |
|
||||
/** |
|
||||
* 创建人 |
|
||||
*/ |
|
||||
@Excel(name = "创建人", width = 15) |
|
||||
@ApiModelProperty(value = "创建人") |
|
||||
private String createBy; |
|
||||
/** |
|
||||
* 创建时间 |
|
||||
*/ |
|
||||
@Excel(name = "创建时间", width = 15) |
|
||||
@ApiModelProperty(value = "创建时间") |
|
||||
private Date createTime; |
|
||||
/** |
|
||||
* 更新人 |
|
||||
*/ |
|
||||
@Excel(name = "更新人", width = 15) |
|
||||
@ApiModelProperty(value = "更新人") |
|
||||
private String updateBy; |
|
||||
/** |
|
||||
* 更新时间 |
|
||||
*/ |
|
||||
@Excel(name = "更新时间", width = 15) |
|
||||
@ApiModelProperty(value = "更新时间") |
|
||||
private Date updateTime; |
|
||||
@Excel(name = "风速", width = 15) |
|
||||
@ApiModelProperty(value = "风速") |
|
||||
private double windSpeed; |
|
||||
|
|
||||
//---------------------
|
|
||||
|
|
||||
@TableField(exist = false) |
|
||||
private double branchPipeFlow;//支管风量
|
|
||||
@TableField(exist = false) |
|
||||
private double totalPipeFlow;//总管风量
|
|
||||
@TableField(exist = false) |
|
||||
private double totalWindSpeed;//总管风速
|
|
||||
@TableField(exist = false) |
|
||||
private List<Pipe> list; |
|
||||
@TableField(exist = false) |
|
||||
private List<Pipe> children = new ArrayList<>();// 初始化为一个空列表
|
|
||||
@TableField(exist = false) |
|
||||
private double area;//面积
|
|
||||
} |
|
@ -1,71 +0,0 @@ |
|||||
package cc.admin.modules.dust.entity; |
|
||||
|
|
||||
import java.io.Serializable; |
|
||||
import java.util.Date; |
|
||||
|
|
||||
import com.baomidou.mybatisplus.annotation.*; |
|
||||
import io.swagger.annotations.ApiModel; |
|
||||
import io.swagger.annotations.ApiModelProperty; |
|
||||
import lombok.Data; |
|
||||
import lombok.EqualsAndHashCode; |
|
||||
import lombok.experimental.Accessors; |
|
||||
import com.fasterxml.jackson.annotation.JsonFormat; |
|
||||
import org.springframework.format.annotation.DateTimeFormat; |
|
||||
import cc.admin.poi.excel.annotation.Excel; |
|
||||
import cc.admin.common.aspect.annotation.Dict; |
|
||||
|
|
||||
/** |
|
||||
* @Description: 管径壁厚对应表 |
|
||||
* @Author: cc-admin |
|
||||
* @Date: 2024-12-06 |
|
||||
* @Version: V1.0.0 |
|
||||
*/ |
|
||||
@Data |
|
||||
@TableName("pipe_diameter_thickness") |
|
||||
@EqualsAndHashCode(callSuper = false) |
|
||||
@Accessors(chain = true) |
|
||||
@ApiModel(value="pipe_diameter_thickness对象", description="管径壁厚对应表") |
|
||||
public class PipeDiameterThickness { |
|
||||
|
|
||||
/**主键ID*/ |
|
||||
@Excel(name = "主键ID", width = 15) |
|
||||
@ApiModelProperty(value = "主键ID") |
|
||||
private String id; |
|
||||
/**主键ID*/ |
|
||||
@Excel(name = "名称", width = 15) |
|
||||
@ApiModelProperty(value = "名称") |
|
||||
private String name; |
|
||||
/**管道内径*/ |
|
||||
@Excel(name = "管道内径(逗号分割)", width = 15) |
|
||||
@ApiModelProperty(value = "管道内径(逗号分割)") |
|
||||
private String diameter; |
|
||||
/**排序*/ |
|
||||
@Excel(name = "排序", width = 15) |
|
||||
@ApiModelProperty(value = "排序") |
|
||||
private Integer sortOrder; |
|
||||
/**备注*/ |
|
||||
@Excel(name = "备注", width = 15) |
|
||||
@ApiModelProperty(value = "备注") |
|
||||
private String remark; |
|
||||
/**删除状态(0-正常,1-已删除)*/ |
|
||||
@Excel(name = "删除状态(0-正常,1-已删除)", width = 15) |
|
||||
@ApiModelProperty(value = "删除状态(0-正常,1-已删除)") |
|
||||
@TableLogic |
|
||||
private Integer delFlag; |
|
||||
/**创建人*/ |
|
||||
@Excel(name = "创建人", width = 15) |
|
||||
@ApiModelProperty(value = "创建人") |
|
||||
private String createBy; |
|
||||
/**创建时间*/ |
|
||||
@Excel(name = "创建时间", width = 15) |
|
||||
@ApiModelProperty(value = "创建时间") |
|
||||
private Date createTime; |
|
||||
/**更新人*/ |
|
||||
@Excel(name = "更新人", width = 15) |
|
||||
@ApiModelProperty(value = "更新人") |
|
||||
private String updateBy; |
|
||||
/**更新时间*/ |
|
||||
@Excel(name = "更新时间", width = 15) |
|
||||
@ApiModelProperty(value = "更新时间") |
|
||||
private Date updateTime; |
|
||||
} |
|
@ -1,93 +0,0 @@ |
|||||
package cc.admin.modules.dust.entity; |
|
||||
|
|
||||
import java.io.Serializable; |
|
||||
import java.util.Date; |
|
||||
import java.util.List; |
|
||||
|
|
||||
import com.baomidou.mybatisplus.annotation.*; |
|
||||
import io.swagger.annotations.ApiModel; |
|
||||
import io.swagger.annotations.ApiModelProperty; |
|
||||
import lombok.Data; |
|
||||
import lombok.EqualsAndHashCode; |
|
||||
import lombok.experimental.Accessors; |
|
||||
import com.fasterxml.jackson.annotation.JsonFormat; |
|
||||
import org.springframework.format.annotation.DateTimeFormat; |
|
||||
import cc.admin.poi.excel.annotation.Excel; |
|
||||
import cc.admin.common.aspect.annotation.Dict; |
|
||||
|
|
||||
/** |
|
||||
* @Description: 推荐方案表 |
|
||||
* @Author: cc-admin |
|
||||
* @Date: 2024-12-06 |
|
||||
* @Version: V1.0.0 |
|
||||
*/ |
|
||||
@Data |
|
||||
@TableName("recommend_plan") |
|
||||
@EqualsAndHashCode(callSuper = false) |
|
||||
@Accessors(chain = true) |
|
||||
@ApiModel(value="recommend_plan对象", description="推荐方案表") |
|
||||
public class RecommendPlan { |
|
||||
|
|
||||
/**主键ID*/ |
|
||||
@Excel(name = "主键ID", width = 15) |
|
||||
@ApiModelProperty(value = "主键ID") |
|
||||
private String id; |
|
||||
/**关联的设计方案ID*/ |
|
||||
@Excel(name = "关联的设计方案ID", width = 15) |
|
||||
@ApiModelProperty(value = "关联的设计方案ID") |
|
||||
private String designPlanId; |
|
||||
/**推荐方案名称*/ |
|
||||
@Excel(name = "推荐方案名称", width = 15) |
|
||||
@ApiModelProperty(value = "推荐方案名称") |
|
||||
private String name; |
|
||||
/**总管风量*/ |
|
||||
@Excel(name = "总管风量", width = 15) |
|
||||
@ApiModelProperty(value = "总管风量") |
|
||||
private Double flow; |
|
||||
/**总管风量*/ |
|
||||
@Excel(name = "最小速度", width = 15) |
|
||||
@ApiModelProperty(value = "最小速度") |
|
||||
private Double minSpeed; |
|
||||
/**总管风量*/ |
|
||||
@Excel(name = "最大速度", width = 15) |
|
||||
@ApiModelProperty(value = "最大速度") |
|
||||
private Double maxSpeed; |
|
||||
/**总管风量*/ |
|
||||
@Excel(name = "管道ids", width = 15) |
|
||||
@ApiModelProperty(value = "管道ids") |
|
||||
private String pipeConfig; |
|
||||
/**排序*/ |
|
||||
@Excel(name = "排序", width = 15) |
|
||||
@ApiModelProperty(value = "排序") |
|
||||
private Integer sortOrder; |
|
||||
/**备注*/ |
|
||||
@Excel(name = "备注", width = 15) |
|
||||
@ApiModelProperty(value = "备注") |
|
||||
private String remark; |
|
||||
/**删除状态(0-正常,1-已删除)*/ |
|
||||
@Excel(name = "删除状态(0-正常,1-已删除)", width = 15) |
|
||||
@ApiModelProperty(value = "删除状态(0-正常,1-已删除)") |
|
||||
@TableLogic |
|
||||
private Integer delFlag; |
|
||||
/**创建人*/ |
|
||||
@Excel(name = "创建人", width = 15) |
|
||||
@ApiModelProperty(value = "创建人") |
|
||||
private String createBy; |
|
||||
/**创建时间*/ |
|
||||
@Excel(name = "创建时间", width = 15) |
|
||||
@ApiModelProperty(value = "创建时间") |
|
||||
private Date createTime; |
|
||||
/**更新人*/ |
|
||||
@Excel(name = "更新人", width = 15) |
|
||||
@ApiModelProperty(value = "更新人") |
|
||||
private String updateBy; |
|
||||
/**更新时间*/ |
|
||||
@Excel(name = "更新时间", width = 15) |
|
||||
@ApiModelProperty(value = "更新时间") |
|
||||
private Date updateTime; |
|
||||
|
|
||||
@TableField(exist = false) |
|
||||
private List<RecommendPlanPipeConfig> configList; |
|
||||
|
|
||||
|
|
||||
} |
|
@ -1,67 +0,0 @@ |
|||||
package cc.admin.modules.dust.entity; |
|
||||
|
|
||||
import java.io.Serializable; |
|
||||
import java.util.Date; |
|
||||
|
|
||||
import com.baomidou.mybatisplus.annotation.*; |
|
||||
import io.swagger.annotations.ApiModel; |
|
||||
import io.swagger.annotations.ApiModelProperty; |
|
||||
import lombok.Data; |
|
||||
import lombok.EqualsAndHashCode; |
|
||||
import lombok.experimental.Accessors; |
|
||||
import com.fasterxml.jackson.annotation.JsonFormat; |
|
||||
import org.springframework.format.annotation.DateTimeFormat; |
|
||||
import cc.admin.poi.excel.annotation.Excel; |
|
||||
import cc.admin.common.aspect.annotation.Dict; |
|
||||
|
|
||||
/** |
|
||||
* @Description: 推荐方案管道配置表 |
|
||||
* @Author: cc-admin |
|
||||
* @Date: 2024-12-06 |
|
||||
* @Version: V1.0.0 |
|
||||
*/ |
|
||||
@Data |
|
||||
public class RecommendPlanPipeConfig { |
|
||||
|
|
||||
|
|
||||
@Excel(name = "推荐方案ID(关联recommend_plan)", width = 15) |
|
||||
@ApiModelProperty(value = "推荐方案ID(关联recommend_plan)") |
|
||||
private String recommendPlanId; |
|
||||
/**关联的设计方案ID*/ |
|
||||
@Excel(name = "关联的设计方案ID", width = 15) |
|
||||
@ApiModelProperty(value = "关联的设计方案ID") |
|
||||
private String designPlanId; |
|
||||
/**管道ID(关联pipe)*/ |
|
||||
@Excel(name = "管道ID(关联pipe)", width = 15) |
|
||||
@ApiModelProperty(value = "管道ID(关联pipe)") |
|
||||
private String pipeId; |
|
||||
/**节点阀门打开度(%)*/ |
|
||||
@Excel(name = "节点阀门打开度(%)", width = 15) |
|
||||
@ApiModelProperty(value = "节点阀门打开度(%)") |
|
||||
private Double valveOpening; |
|
||||
/**管道风量*/ |
|
||||
@Excel(name = "管道风量", width = 15) |
|
||||
@ApiModelProperty(value = "管道风量") |
|
||||
private Double pipeFlow; |
|
||||
/**删除状态(0-正常,1-已删除)*/ |
|
||||
@Excel(name = "删除状态(0-正常,1-已删除)", width = 15) |
|
||||
@ApiModelProperty(value = "删除状态(0-正常,1-已删除)") |
|
||||
@TableLogic |
|
||||
private Integer delFlag; |
|
||||
/**创建人*/ |
|
||||
@Excel(name = "创建人", width = 15) |
|
||||
@ApiModelProperty(value = "创建人") |
|
||||
private String createBy; |
|
||||
/**创建时间*/ |
|
||||
@Excel(name = "创建时间", width = 15) |
|
||||
@ApiModelProperty(value = "创建时间") |
|
||||
private Date createTime; |
|
||||
/**更新人*/ |
|
||||
@Excel(name = "更新人", width = 15) |
|
||||
@ApiModelProperty(value = "更新人") |
|
||||
private String updateBy; |
|
||||
/**更新时间*/ |
|
||||
@Excel(name = "更新时间", width = 15) |
|
||||
@ApiModelProperty(value = "更新时间") |
|
||||
private Date updateTime; |
|
||||
} |
|
@ -0,0 +1,121 @@ |
|||||
|
package cc.admin.modules.dust.entity; |
||||
|
|
||||
|
import java.io.Serializable; |
||||
|
import java.util.Date; |
||||
|
|
||||
|
import com.baomidou.mybatisplus.annotation.*; |
||||
|
import io.swagger.annotations.ApiModel; |
||||
|
import io.swagger.annotations.ApiModelProperty; |
||||
|
import lombok.Data; |
||||
|
import lombok.EqualsAndHashCode; |
||||
|
import lombok.experimental.Accessors; |
||||
|
import com.fasterxml.jackson.annotation.JsonFormat; |
||||
|
import org.springframework.format.annotation.DateTimeFormat; |
||||
|
import cc.admin.poi.excel.annotation.Excel; |
||||
|
import cc.admin.common.aspect.annotation.Dict; |
||||
|
|
||||
|
/** |
||||
|
* @Description: 附件信息表 |
||||
|
* @Author: cc-admin |
||||
|
* @Date: 2025-04-27 |
||||
|
* @Version: V1.0.0 |
||||
|
*/ |
||||
|
@Data |
||||
|
@TableName("tb_dust_attachment") |
||||
|
@EqualsAndHashCode(callSuper = false) |
||||
|
@Accessors(chain = true) |
||||
|
@ApiModel(value = "tb_dust_attachment对象", description = "附件信息表") |
||||
|
public class TbDustAttachment { |
||||
|
|
||||
|
/** |
||||
|
* 附件主键,主键,唯一 |
||||
|
*/ |
||||
|
@Excel(name = "附件主键,主键,唯一", width = 15) |
||||
|
@ApiModelProperty(value = "附件主键,主键,唯一") |
||||
|
private String attachId; |
||||
|
/** |
||||
|
* 附件标题 |
||||
|
*/ |
||||
|
@Excel(name = "附件标题", width = 15) |
||||
|
@ApiModelProperty(value = "附件标题") |
||||
|
private String attachTitle; |
||||
|
/** |
||||
|
* 附件名称 |
||||
|
*/ |
||||
|
@Excel(name = "附件名称", width = 15) |
||||
|
@ApiModelProperty(value = "附件名称") |
||||
|
private String attachName; |
||||
|
/** |
||||
|
* 关联业务类别:1-报警处置附件;2-粉尘清扫打卡附件 |
||||
|
*/ |
||||
|
@Excel(name = "关联业务类别:1-报警处置附件;2-粉尘清扫打卡附件", width = 15) |
||||
|
@ApiModelProperty(value = "关联业务类别:1-报警处置附件;2-粉尘清扫打卡附件") |
||||
|
private String referType; |
||||
|
/** |
||||
|
* 关联业务主键,填写的是业务表的主键 |
||||
|
*/ |
||||
|
@Excel(name = "关联业务主键,填写的是业务表的主键", width = 15) |
||||
|
@ApiModelProperty(value = "关联业务主键,填写的是业务表的主键") |
||||
|
private String referId; |
||||
|
/** |
||||
|
* 存放路径,省厅前置机服务器上文件存放的相对路径 |
||||
|
*/ |
||||
|
@Excel(name = "存放路径,省厅前置机服务器上文件存放的相对路径", width = 15) |
||||
|
@ApiModelProperty(value = "存放路径,省厅前置机服务器上文件存放的相对路径") |
||||
|
private String savePath; |
||||
|
/** |
||||
|
* 文件类型:1-jpg;2-png;3-doc;4-docx;5-xls;6-xlsx;7-pdf |
||||
|
*/ |
||||
|
@Excel(name = "文件类型:1-jpg;2-png;3-doc;4-docx;5-xls;6-xlsx;7-pdf", width = 15) |
||||
|
@ApiModelProperty(value = "文件类型:1-jpg;2-png;3-doc;4-docx;5-xls;6-xlsx;7-pdf") |
||||
|
private String attachTypeCode; |
||||
|
/** |
||||
|
* 附件大小 |
||||
|
*/ |
||||
|
@Excel(name = "附件大小", width = 15) |
||||
|
@ApiModelProperty(value = "附件大小") |
||||
|
private Double attachSize; |
||||
|
/** |
||||
|
* 排序字段 |
||||
|
*/ |
||||
|
@Excel(name = "排序字段", width = 15) |
||||
|
@ApiModelProperty(value = "排序字段") |
||||
|
private Double orderIndex; |
||||
|
/** |
||||
|
* 有效标记 |
||||
|
*/ |
||||
|
@Excel(name = "有效标记", width = 15) |
||||
|
@ApiModelProperty(value = "有效标记") |
||||
|
private String actived; |
||||
|
/** |
||||
|
* 删除标记:0-未删除;1-已删除 |
||||
|
*/ |
||||
|
@Excel(name = "删除标记:0-未删除;1-已删除", width = 15) |
||||
|
@ApiModelProperty(value = "删除标记:0-未删除;1-已删除") |
||||
|
@TableLogic |
||||
|
private String delFlag; |
||||
|
/** |
||||
|
* 创建人 |
||||
|
*/ |
||||
|
@Excel(name = "创建人", width = 15) |
||||
|
@ApiModelProperty(value = "创建人") |
||||
|
private String creatorName; |
||||
|
/** |
||||
|
* 创建时间 |
||||
|
*/ |
||||
|
@Excel(name = "创建时间", width = 15) |
||||
|
@ApiModelProperty(value = "创建时间") |
||||
|
private Date createTime; |
||||
|
/** |
||||
|
* 修改人 |
||||
|
*/ |
||||
|
@Excel(name = "修改人", width = 15) |
||||
|
@ApiModelProperty(value = "修改人") |
||||
|
private String updatorName; |
||||
|
/** |
||||
|
* 修改时间 |
||||
|
*/ |
||||
|
@Excel(name = "修改时间", width = 15) |
||||
|
@ApiModelProperty(value = "修改时间") |
||||
|
private Date updateTime; |
||||
|
} |
@ -0,0 +1,103 @@ |
|||||
|
package cc.admin.modules.dust.entity; |
||||
|
|
||||
|
import java.io.Serializable; |
||||
|
import java.util.Date; |
||||
|
|
||||
|
import com.baomidou.mybatisplus.annotation.*; |
||||
|
import io.swagger.annotations.ApiModel; |
||||
|
import io.swagger.annotations.ApiModelProperty; |
||||
|
import lombok.Data; |
||||
|
import lombok.EqualsAndHashCode; |
||||
|
import lombok.experimental.Accessors; |
||||
|
import com.fasterxml.jackson.annotation.JsonFormat; |
||||
|
import org.springframework.format.annotation.DateTimeFormat; |
||||
|
import cc.admin.poi.excel.annotation.Excel; |
||||
|
import cc.admin.common.aspect.annotation.Dict; |
||||
|
|
||||
|
/** |
||||
|
* @Description: 粉尘清扫打卡记录表 |
||||
|
* @Author: cc-admin |
||||
|
* @Date: 2025-04-27 |
||||
|
* @Version: V1.0.0 |
||||
|
*/ |
||||
|
@Data |
||||
|
@TableName("tb_dust_clearrecord") |
||||
|
@EqualsAndHashCode(callSuper = false) |
||||
|
@Accessors(chain = true) |
||||
|
@ApiModel(value = "tb_dust_clearrecord对象", description = "粉尘清扫打卡记录表") |
||||
|
public class TbDustClearrecord { |
||||
|
|
||||
|
/** |
||||
|
* 主键 |
||||
|
*/ |
||||
|
@Excel(name = "主键", width = 15) |
||||
|
@ApiModelProperty(value = "主键") |
||||
|
private String id; |
||||
|
/** |
||||
|
* 数据接入标识,与粉尘企业区域图清单对应:1-粉尘企业区域图清单,2-粉尘企业(个体/小型)定期清理清单,3-风管、设备皮膜内部定期清理清单,4-干式单机等常用清理清单;多个用途逗号分隔 |
||||
|
*/ |
||||
|
@Excel(name = "数据接入标识,与粉尘企业区域图清单对应:1-粉尘企业区域图清单,2-粉尘企业(个体/小型)定期清理清单,3-风管、设备皮膜内部定期清理清单,4-干式单机等常用清理清单;多个用途逗号分隔", width = 15) |
||||
|
@ApiModelProperty(value = "数据接入标识,与粉尘企业区域图清单对应:1-粉尘企业区域图清单,2-粉尘企业(个体/小型)定期清理清单,3-风管、设备皮膜内部定期清理清单,4-干式单机等常用清理清单;多个用途逗号分隔") |
||||
|
private String dataId; |
||||
|
/** |
||||
|
* 清理项目 |
||||
|
*/ |
||||
|
@Excel(name = "清理项目", width = 15) |
||||
|
@ApiModelProperty(value = "清理项目") |
||||
|
private String clearItemName; |
||||
|
/** |
||||
|
* 完成情况:0-未完成,1-已完成 |
||||
|
*/ |
||||
|
@Excel(name = "完成情况:0-未完成,1-已完成", width = 15) |
||||
|
@ApiModelProperty(value = "完成情况:0-未完成,1-已完成") |
||||
|
private String taskProcess; |
||||
|
/** |
||||
|
* 执行人 |
||||
|
*/ |
||||
|
@Excel(name = "执行人", width = 15) |
||||
|
@ApiModelProperty(value = "执行人") |
||||
|
private String taskPerson; |
||||
|
/** |
||||
|
* 执行日期 |
||||
|
*/ |
||||
|
@Excel(name = "执行日期", width = 15) |
||||
|
@ApiModelProperty(value = "执行日期") |
||||
|
private Date taskTime; |
||||
|
/** |
||||
|
* 有效标志:0-无效,1-有效 |
||||
|
*/ |
||||
|
@Excel(name = "有效标志:0-无效,1-有效", width = 15) |
||||
|
@ApiModelProperty(value = "有效标志:0-无效,1-有效") |
||||
|
private String actived; |
||||
|
/** |
||||
|
* 创建人 |
||||
|
*/ |
||||
|
@Excel(name = "创建人", width = 15) |
||||
|
@ApiModelProperty(value = "创建人") |
||||
|
private String creatorName; |
||||
|
/** |
||||
|
* 创建时间 |
||||
|
*/ |
||||
|
@Excel(name = "创建时间", width = 15) |
||||
|
@ApiModelProperty(value = "创建时间") |
||||
|
private Date createTime; |
||||
|
/** |
||||
|
* 修改人 |
||||
|
*/ |
||||
|
@Excel(name = "修改人", width = 15) |
||||
|
@ApiModelProperty(value = "修改人") |
||||
|
private String updatorName; |
||||
|
/** |
||||
|
* 修改时间 |
||||
|
*/ |
||||
|
@Excel(name = "修改时间", width = 15) |
||||
|
@ApiModelProperty(value = "修改时间") |
||||
|
private Date updateTime; |
||||
|
/** |
||||
|
* 删除标记:0-未删除,1-已删除 |
||||
|
*/ |
||||
|
@Excel(name = "删除标记:0-未删除,1-已删除", width = 15) |
||||
|
@ApiModelProperty(value = "删除标记:0-未删除,1-已删除") |
||||
|
@TableLogic |
||||
|
private String delFlag; |
||||
|
} |
@ -0,0 +1,181 @@ |
|||||
|
package cc.admin.modules.dust.entity; |
||||
|
|
||||
|
import java.io.Serializable; |
||||
|
import java.util.Date; |
||||
|
|
||||
|
import com.baomidou.mybatisplus.annotation.*; |
||||
|
import io.swagger.annotations.ApiModel; |
||||
|
import io.swagger.annotations.ApiModelProperty; |
||||
|
import lombok.Data; |
||||
|
import lombok.EqualsAndHashCode; |
||||
|
import lombok.experimental.Accessors; |
||||
|
import com.fasterxml.jackson.annotation.JsonFormat; |
||||
|
import org.springframework.format.annotation.DateTimeFormat; |
||||
|
import cc.admin.poi.excel.annotation.Excel; |
||||
|
import cc.admin.common.aspect.annotation.Dict; |
||||
|
|
||||
|
/** |
||||
|
* @Description: 企业基础信息表 |
||||
|
* @Author: cc-admin |
||||
|
* @Date: 2025-04-27 |
||||
|
* @Version: V1.0.0 |
||||
|
*/ |
||||
|
@Data |
||||
|
@TableName("tb_dust_companyinfo") |
||||
|
@EqualsAndHashCode(callSuper = false) |
||||
|
@Accessors(chain = true) |
||||
|
@ApiModel(value = "tb_dust_companyinfo对象", description = "企业基础信息表") |
||||
|
public class TbDustCompanyinfo { |
||||
|
|
||||
|
/** |
||||
|
* 主键 |
||||
|
*/ |
||||
|
@Excel(name = "主键", width = 15) |
||||
|
@ApiModelProperty(value = "主键") |
||||
|
private String id; |
||||
|
/** |
||||
|
* 企业名称 |
||||
|
*/ |
||||
|
@Excel(name = "企业名称", width = 15) |
||||
|
@ApiModelProperty(value = "企业名称") |
||||
|
private String enterpriseName; |
||||
|
/** |
||||
|
* 统一社会信用代码 |
||||
|
*/ |
||||
|
@Excel(name = "统一社会信用代码", width = 15) |
||||
|
@ApiModelProperty(value = "统一社会信用代码") |
||||
|
private String uniscid; |
||||
|
/** |
||||
|
* 营业状态:1-营业;2-停业(歇业);3-关闭 |
||||
|
*/ |
||||
|
@Excel(name = "营业状态:1-营业;2-停业(歇业);3-关闭", width = 15) |
||||
|
@ApiModelProperty(value = "营业状态:1-营业;2-停业(歇业);3-关闭") |
||||
|
private String businessStatus; |
||||
|
/** |
||||
|
* 生产经营方式:1-生产(制造);2-批发经营;3-零售经营;4-储存;5-使用;6-其他 |
||||
|
*/ |
||||
|
@Excel(name = "生产经营方式:1-生产(制造);2-批发经营;3-零售经营;4-储存;5-使用;6-其他", width = 15) |
||||
|
@ApiModelProperty(value = "生产经营方式:1-生产(制造);2-批发经营;3-零售经营;4-储存;5-使用;6-其他") |
||||
|
private String productionMode; |
||||
|
/** |
||||
|
* 行政隶属关系:1-中央级;2-省级;3-地市级;4-区县级 |
||||
|
*/ |
||||
|
@Excel(name = "行政隶属关系:1-中央级;2-省级;3-地市级;4-区县级", width = 15) |
||||
|
@ApiModelProperty(value = "行政隶属关系:1-中央级;2-省级;3-地市级;4-区县级") |
||||
|
private String administrativeSubOrdination; |
||||
|
/** |
||||
|
* 国民经济类型:1-国有;2-集体;3-联营;4-私营;5-有限责任;6-股份有限公司;7-股份合作;8-港澳台;9-外商投资;10-分公司;11-其他 |
||||
|
*/ |
||||
|
@Excel(name = "国民经济类型:1-国有;2-集体;3-联营;4-私营;5-有限责任;6-股份有限公司;7-股份合作;8-港澳台;9-外商投资;10-分公司;11-其他", width = 15) |
||||
|
@ApiModelProperty(value = "国民经济类型:1-国有;2-集体;3-联营;4-私营;5-有限责任;6-股份有限公司;7-股份合作;8-港澳台;9-外商投资;10-分公司;11-其他") |
||||
|
private String registrationType; |
||||
|
/** |
||||
|
* 经营地址详细地址 |
||||
|
*/ |
||||
|
@Excel(name = "经营地址详细地址", width = 15) |
||||
|
@ApiModelProperty(value = "经营地址详细地址") |
||||
|
private String addressOperating; |
||||
|
/** |
||||
|
* 企业经营地址所属行政区域,必须到区县级(6位) |
||||
|
*/ |
||||
|
@Excel(name = "企业经营地址所属行政区域,必须到区县级(6位)", width = 15) |
||||
|
@ApiModelProperty(value = "企业经营地址所属行政区域,必须到区县级(6位)") |
||||
|
private String areaCode; |
||||
|
/** |
||||
|
* 法定代表人姓名 |
||||
|
*/ |
||||
|
@Excel(name = "法定代表人姓名", width = 15) |
||||
|
@ApiModelProperty(value = "法定代表人姓名") |
||||
|
private String legalRepresentative; |
||||
|
/** |
||||
|
* 法定代表人电话,短信发送使用 |
||||
|
*/ |
||||
|
@Excel(name = "法定代表人电话,短信发送使用", width = 15) |
||||
|
@ApiModelProperty(value = "法定代表人电话,短信发送使用") |
||||
|
private String contactNumber; |
||||
|
/** |
||||
|
* 安全生产管理负责人姓名 |
||||
|
*/ |
||||
|
@Excel(name = "安全生产管理负责人姓名", width = 15) |
||||
|
@ApiModelProperty(value = "安全生产管理负责人姓名") |
||||
|
private String safetyProductionManagementName; |
||||
|
/** |
||||
|
* 安全生产管理负责人电话,短信发送使用 |
||||
|
*/ |
||||
|
@Excel(name = "安全生产管理负责人电话,短信发送使用", width = 15) |
||||
|
@ApiModelProperty(value = "安全生产管理负责人电话,短信发送使用") |
||||
|
private String safetyProductionManagementNumber; |
||||
|
/** |
||||
|
* 主营业务 |
||||
|
*/ |
||||
|
@Excel(name = "主营业务", width = 15) |
||||
|
@ApiModelProperty(value = "主营业务") |
||||
|
private String opScope; |
||||
|
/** |
||||
|
* 是否规模以上:1-规上;2-规下 |
||||
|
*/ |
||||
|
@Excel(name = "是否规模以上:1-规上;2-规下", width = 15) |
||||
|
@ApiModelProperty(value = "是否规模以上:1-规上;2-规下") |
||||
|
private String companyScale; |
||||
|
/** |
||||
|
* 生产场所的中心位置处,按照应急管理一张图地址填写 |
||||
|
*/ |
||||
|
@Excel(name = "生产场所的中心位置处,按照应急管理一张图地址填写", width = 15) |
||||
|
@ApiModelProperty(value = "生产场所的中心位置处,按照应急管理一张图地址填写") |
||||
|
private Double longitude; |
||||
|
/** |
||||
|
* 生产场所的中心位置处,按照应急管理一张图地址填写 |
||||
|
*/ |
||||
|
@Excel(name = "生产场所的中心位置处,按照应急管理一张图地址填写", width = 15) |
||||
|
@ApiModelProperty(value = "生产场所的中心位置处,按照应急管理一张图地址填写") |
||||
|
private Double latitude; |
||||
|
/** |
||||
|
* 数据接入标识,区县级行政区划编码(6位)+4位数字流水号 |
||||
|
*/ |
||||
|
@Excel(name = "数据接入标识,区县级行政区划编码(6位)+4位数字流水号", width = 15) |
||||
|
@ApiModelProperty(value = "数据接入标识,区县级行政区划编码(6位)+4位数字流水号") |
||||
|
private String dataId; |
||||
|
/** |
||||
|
* 企业停工状态:0-停工;1-开工 |
||||
|
*/ |
||||
|
@Excel(name = "企业停工状态:0-停工;1-开工", width = 15) |
||||
|
@ApiModelProperty(value = "企业停工状态:0-停工;1-开工") |
||||
|
private String stopStatus; |
||||
|
/** |
||||
|
* 有效标记:0-无效;1-有效 |
||||
|
*/ |
||||
|
@Excel(name = "有效标记:0-无效;1-有效", width = 15) |
||||
|
@ApiModelProperty(value = "有效标记:0-无效;1-有效") |
||||
|
private String actived; |
||||
|
/** |
||||
|
* 删除标记:0-未删除;1-已删除 |
||||
|
*/ |
||||
|
@Excel(name = "删除标记:0-未删除;1-已删除", width = 15) |
||||
|
@ApiModelProperty(value = "删除标记:0-未删除;1-已删除") |
||||
|
@TableLogic |
||||
|
private String delFlag; |
||||
|
/** |
||||
|
* 创建人 |
||||
|
*/ |
||||
|
@Excel(name = "创建人", width = 15) |
||||
|
@ApiModelProperty(value = "创建人") |
||||
|
private String creatorName; |
||||
|
/** |
||||
|
* 创建时间 |
||||
|
*/ |
||||
|
@Excel(name = "创建时间", width = 15) |
||||
|
@ApiModelProperty(value = "创建时间") |
||||
|
private Date createTime; |
||||
|
/** |
||||
|
* 修改人 |
||||
|
*/ |
||||
|
@Excel(name = "修改人", width = 15) |
||||
|
@ApiModelProperty(value = "修改人") |
||||
|
private String updatorName; |
||||
|
/** |
||||
|
* 修改时间 |
||||
|
*/ |
||||
|
@Excel(name = "修改时间", width = 15) |
||||
|
@ApiModelProperty(value = "修改时间") |
||||
|
private Date updateTime; |
||||
|
} |
@ -0,0 +1,115 @@ |
|||||
|
package cc.admin.modules.dust.entity; |
||||
|
|
||||
|
import java.io.Serializable; |
||||
|
import java.util.Date; |
||||
|
|
||||
|
import com.baomidou.mybatisplus.annotation.*; |
||||
|
import io.swagger.annotations.ApiModel; |
||||
|
import io.swagger.annotations.ApiModelProperty; |
||||
|
import lombok.Data; |
||||
|
import lombok.EqualsAndHashCode; |
||||
|
import lombok.experimental.Accessors; |
||||
|
import com.fasterxml.jackson.annotation.JsonFormat; |
||||
|
import org.springframework.format.annotation.DateTimeFormat; |
||||
|
import cc.admin.poi.excel.annotation.Excel; |
||||
|
import cc.admin.common.aspect.annotation.Dict; |
||||
|
|
||||
|
/** |
||||
|
* @Description: 涉尘信息表 |
||||
|
* @Author: cc-admin |
||||
|
* @Date: 2025-04-27 |
||||
|
* @Version: V1.0.0 |
||||
|
*/ |
||||
|
@Data |
||||
|
@TableName("tb_dust_dustinfo") |
||||
|
@EqualsAndHashCode(callSuper = false) |
||||
|
@Accessors(chain = true) |
||||
|
@ApiModel(value = "tb_dust_dustinfo对象", description = "涉尘信息表") |
||||
|
public class TbDustDustinfo { |
||||
|
|
||||
|
/** |
||||
|
* 主键,与TB_DUST_COMPANYINFO的主键ID关联 |
||||
|
*/ |
||||
|
@Excel(name = "主键,与TB_DUST_COMPANYINFO的主键ID关联", width = 15) |
||||
|
@ApiModelProperty(value = "主键,与TB_DUST_COMPANYINFO的主键ID关联") |
||||
|
private String id; |
||||
|
/** |
||||
|
* 企业id |
||||
|
*/ |
||||
|
@Excel(name = "企业id", width = 15) |
||||
|
@ApiModelProperty(value = "企业id") |
||||
|
private String companyinfoId; |
||||
|
/** |
||||
|
* 粉尘涉爆企业行业类型:1-金属制品加工,2-农副产品加工,3-木制品加工,4-纸制品加工,5-纺织品加工,6-橡胶和塑料制品加工,7-冶金/有色/建材行业煤粉制备,8-其他 |
||||
|
*/ |
||||
|
@Excel(name = "粉尘涉爆企业行业类型:1-金属制品加工,2-农副产品加工,3-木制品加工,4-纸制品加工,5-纺织品加工,6-橡胶和塑料制品加工,7-冶金/有色/建材行业煤粉制备,8-其他", width = 15) |
||||
|
@ApiModelProperty(value = "粉尘涉爆企业行业类型:1-金属制品加工,2-农副产品加工,3-木制品加工,4-纸制品加工,5-纺织品加工,6-橡胶和塑料制品加工,7-冶金/有色/建材行业煤粉制备,8-其他") |
||||
|
private String industryType; |
||||
|
/** |
||||
|
* 企业涉及粉尘高风险工艺:1-铝镁金属打磨抛光,2-铝镁金属喷砂抛丸,3-其他金属打磨抛光,4-其他金属喷砂抛丸,5-木材砂光,6-静电喷涂,7-粉碎研磨,8-造粒,9-无;可多选,逗号分隔 |
||||
|
*/ |
||||
|
@Excel(name = "企业涉及粉尘高风险工艺:1-铝镁金属打磨抛光,2-铝镁金属喷砂抛丸,3-其他金属打磨抛光,4-其他金属喷砂抛丸,5-木材砂光,6-静电喷涂,7-粉碎研磨,8-造粒,9-无;可多选,逗号分隔", width = 15) |
||||
|
@ApiModelProperty(value = "企业涉及粉尘高风险工艺:1-铝镁金属打磨抛光,2-铝镁金属喷砂抛丸,3-其他金属打磨抛光,4-其他金属喷砂抛丸,5-木材砂光,6-静电喷涂,7-粉碎研磨,8-造粒,9-无;可多选,逗号分隔") |
||||
|
private String dustTechnology; |
||||
|
/** |
||||
|
* 主要粉尘类型,编码见附录12-1,例如镁粉为A1 |
||||
|
*/ |
||||
|
@Excel(name = "主要粉尘类型,编码见附录12-1,例如镁粉为A1", width = 15) |
||||
|
@ApiModelProperty(value = "主要粉尘类型,编码见附录12-1,例如镁粉为A1") |
||||
|
private String dustType; |
||||
|
/** |
||||
|
* 日产尘量,单位:Kg |
||||
|
*/ |
||||
|
@Excel(name = "日产尘量,单位:Kg", width = 15) |
||||
|
@ApiModelProperty(value = "日产尘量,单位:Kg") |
||||
|
private Double dailyDustOutput; |
||||
|
/** |
||||
|
* 其他涉及粉尘信息,格式:粉尘种类,日产尘量Kg;多记录分号分隔,例如A2,100;A3,300;A5,150 |
||||
|
*/ |
||||
|
@Excel(name = "其他涉及粉尘信息,格式:粉尘种类,日产尘量Kg;多记录分号分隔,例如A2,100;A3,300;A5,150", width = 15) |
||||
|
@ApiModelProperty(value = "其他涉及粉尘信息,格式:粉尘种类,日产尘量Kg;多记录分号分隔,例如A2,100;A3,300;A5,150") |
||||
|
private String otheRdust; |
||||
|
/** |
||||
|
* 每日单班最高涉粉作业人数 |
||||
|
*/ |
||||
|
@Excel(name = "每日单班最高涉粉作业人数", width = 15) |
||||
|
@ApiModelProperty(value = "每日单班最高涉粉作业人数") |
||||
|
private Integer dustInvolvedPersonNo; |
||||
|
/** |
||||
|
* 有效标记:0-无效,1-有效 |
||||
|
*/ |
||||
|
@Excel(name = "有效标记:0-无效,1-有效", width = 15) |
||||
|
@ApiModelProperty(value = "有效标记:0-无效,1-有效") |
||||
|
private String actived; |
||||
|
/** |
||||
|
* 删除标记:0-未删除,1-已删除 |
||||
|
*/ |
||||
|
@Excel(name = "删除标记:0-未删除,1-已删除", width = 15) |
||||
|
@ApiModelProperty(value = "删除标记:0-未删除,1-已删除") |
||||
|
@TableLogic |
||||
|
private String delFlag; |
||||
|
/** |
||||
|
* 创建人 |
||||
|
*/ |
||||
|
@Excel(name = "创建人", width = 15) |
||||
|
@ApiModelProperty(value = "创建人") |
||||
|
private String creatorName; |
||||
|
/** |
||||
|
* 创建时间 |
||||
|
*/ |
||||
|
@Excel(name = "创建时间", width = 15) |
||||
|
@ApiModelProperty(value = "创建时间") |
||||
|
private Date createTime; |
||||
|
/** |
||||
|
* 修改人 |
||||
|
*/ |
||||
|
@Excel(name = "修改人", width = 15) |
||||
|
@ApiModelProperty(value = "修改人") |
||||
|
private String updatorName; |
||||
|
/** |
||||
|
* 修改时间 |
||||
|
*/ |
||||
|
@Excel(name = "修改时间", width = 15) |
||||
|
@ApiModelProperty(value = "修改时间") |
||||
|
private Date updateTime; |
||||
|
} |
@ -0,0 +1,157 @@ |
|||||
|
package cc.admin.modules.dust.entity; |
||||
|
|
||||
|
import java.io.Serializable; |
||||
|
import java.util.Date; |
||||
|
|
||||
|
import com.baomidou.mybatisplus.annotation.*; |
||||
|
import io.swagger.annotations.ApiModel; |
||||
|
import io.swagger.annotations.ApiModelProperty; |
||||
|
import lombok.Data; |
||||
|
import lombok.EqualsAndHashCode; |
||||
|
import lombok.experimental.Accessors; |
||||
|
import com.fasterxml.jackson.annotation.JsonFormat; |
||||
|
import org.springframework.format.annotation.DateTimeFormat; |
||||
|
import cc.admin.poi.excel.annotation.Excel; |
||||
|
import cc.admin.common.aspect.annotation.Dict; |
||||
|
|
||||
|
/** |
||||
|
* @Description: 除尘系统信息表 |
||||
|
* @Author: cc-admin |
||||
|
* @Date: 2025-04-27 |
||||
|
* @Version: V1.0.0 |
||||
|
*/ |
||||
|
@Data |
||||
|
@TableName("tb_dust_equipinfo") |
||||
|
@EqualsAndHashCode(callSuper = false) |
||||
|
@Accessors(chain = true) |
||||
|
@ApiModel(value = "tb_dust_equipinfo对象", description = "除尘系统信息表") |
||||
|
public class TbDustEquipinfo { |
||||
|
|
||||
|
/** |
||||
|
* 主键 |
||||
|
*/ |
||||
|
@Excel(name = "主键", width = 15) |
||||
|
@ApiModelProperty(value = "主键") |
||||
|
private String id; |
||||
|
/** |
||||
|
* 设备编号,数据接入标识(10位)+3位流水编码 |
||||
|
*/ |
||||
|
@Excel(name = "设备编号,数据接入标识(10位)+3位流水编码", width = 15) |
||||
|
@ApiModelProperty(value = "设备编号,数据接入标识(10位)+3位流水编码") |
||||
|
private String equipCode; |
||||
|
/** |
||||
|
* 设备名称 |
||||
|
*/ |
||||
|
@Excel(name = "设备名称", width = 15) |
||||
|
@ApiModelProperty(value = "设备名称") |
||||
|
private String equipName; |
||||
|
/** |
||||
|
* 企业id |
||||
|
*/ |
||||
|
@Excel(name = "企业id", width = 15) |
||||
|
@ApiModelProperty(value = "企业id") |
||||
|
private String companyinfoId; |
||||
|
/** |
||||
|
* 场所编码,场所在系统中原属车间 |
||||
|
*/ |
||||
|
@Excel(name = "场所编码,场所在系统中原属车间", width = 15) |
||||
|
@ApiModelProperty(value = "场所编码,场所在系统中原属车间") |
||||
|
private String placeCode; |
||||
|
/** |
||||
|
* 设备类型:1-干式集中式除尘系统,2-湿式集中式除尘系统,3-湿式单机除系统,4-干式单机除系统,5-其它 |
||||
|
*/ |
||||
|
@Excel(name = "设备类型:1-干式集中式除尘系统,2-湿式集中式除尘系统,3-湿式单机除系统,4-干式单机除系统,5-其它", width = 15) |
||||
|
@ApiModelProperty(value = "设备类型:1-干式集中式除尘系统,2-湿式集中式除尘系统,3-湿式单机除系统,4-干式单机除系统,5-其它") |
||||
|
private String equipType; |
||||
|
/** |
||||
|
* 设备厂家 |
||||
|
*/ |
||||
|
@Excel(name = "设备厂家", width = 15) |
||||
|
@ApiModelProperty(value = "设备厂家") |
||||
|
private String equipFactory; |
||||
|
/** |
||||
|
* 安装日期 |
||||
|
*/ |
||||
|
@Excel(name = "安装日期", width = 15) |
||||
|
@ApiModelProperty(value = "安装日期") |
||||
|
private Date setDate; |
||||
|
/** |
||||
|
* 相关控制措施:1-泄爆,2-抑爆,3-隔爆,4-惰化,5-其他;下拉菜单,可多选,逗号分隔 |
||||
|
*/ |
||||
|
@Excel(name = "相关控制措施:1-泄爆,2-抑爆,3-隔爆,4-惰化,5-其他;下拉菜单,可多选,逗号分隔", width = 15) |
||||
|
@ApiModelProperty(value = "相关控制措施:1-泄爆,2-抑爆,3-隔爆,4-惰化,5-其他;下拉菜单,可多选,逗号分隔") |
||||
|
private String bombControl; |
||||
|
/** |
||||
|
* 安装区域:1-室内,2-室外 |
||||
|
*/ |
||||
|
@Excel(name = "安装区域:1-室内,2-室外", width = 15) |
||||
|
@ApiModelProperty(value = "安装区域:1-室内,2-室外") |
||||
|
private String installArea; |
||||
|
/** |
||||
|
* 除去粉尘种类,编码见附录12-1粉尘种类编码表,例如镁粉为A1 |
||||
|
*/ |
||||
|
@Excel(name = "除去粉尘种类,编码见附录12-1粉尘种类编码表,例如镁粉为A1", width = 15) |
||||
|
@ApiModelProperty(value = "除去粉尘种类,编码见附录12-1粉尘种类编码表,例如镁粉为A1") |
||||
|
private String dustType; |
||||
|
/** |
||||
|
* 除尘涉及人数,单班最高作业人数 |
||||
|
*/ |
||||
|
@Excel(name = "除尘涉及人数,单班最高作业人数", width = 15) |
||||
|
@ApiModelProperty(value = "除尘涉及人数,单班最高作业人数") |
||||
|
private Integer workersNumber; |
||||
|
/** |
||||
|
* 涉及云量工艺:1-单台金属量打磨抛光,2-单台金属量喷砂抛丸,3-其他金属打磨抛光,4-其他金属喷砂抛丸,5-木材砂光,6-静电喷涂,7-粉碎研磨,8-造粒,9-无;下拉菜单,可多选,逗号分隔 |
||||
|
*/ |
||||
|
@Excel(name = "涉及云量工艺:1-单台金属量打磨抛光,2-单台金属量喷砂抛丸,3-其他金属打磨抛光,4-其他金属喷砂抛丸,5-木材砂光,6-静电喷涂,7-粉碎研磨,8-造粒,9-无;下拉菜单,可多选,逗号分隔", width = 15) |
||||
|
@ApiModelProperty(value = "涉及云量工艺:1-单台金属量打磨抛光,2-单台金属量喷砂抛丸,3-其他金属打磨抛光,4-其他金属喷砂抛丸,5-木材砂光,6-静电喷涂,7-粉碎研磨,8-造粒,9-无;下拉菜单,可多选,逗号分隔") |
||||
|
private String dustTechnology; |
||||
|
/** |
||||
|
* 产生量单日产尘量,单位:Kg |
||||
|
*/ |
||||
|
@Excel(name = "产生量单日产尘量,单位:Kg", width = 15) |
||||
|
@ApiModelProperty(value = "产生量单日产尘量,单位:Kg") |
||||
|
private Double dailyDustOutput; |
||||
|
/** |
||||
|
* 系统状态:0-停用,1-本系统启用 |
||||
|
*/ |
||||
|
@Excel(name = "系统状态:0-停用,1-本系统启用", width = 15) |
||||
|
@ApiModelProperty(value = "系统状态:0-停用,1-本系统启用") |
||||
|
private String equipStatus; |
||||
|
/** |
||||
|
* 有效标志:0-无效,1-有效 |
||||
|
*/ |
||||
|
@Excel(name = "有效标志:0-无效,1-有效", width = 15) |
||||
|
@ApiModelProperty(value = "有效标志:0-无效,1-有效") |
||||
|
private String active; |
||||
|
/** |
||||
|
* 创建人 |
||||
|
*/ |
||||
|
@Excel(name = "创建人", width = 15) |
||||
|
@ApiModelProperty(value = "创建人") |
||||
|
private String creatorName; |
||||
|
/** |
||||
|
* 创建时间 |
||||
|
*/ |
||||
|
@Excel(name = "创建时间", width = 15) |
||||
|
@ApiModelProperty(value = "创建时间") |
||||
|
private Date createTime; |
||||
|
/** |
||||
|
* 修改人 |
||||
|
*/ |
||||
|
@Excel(name = "修改人", width = 15) |
||||
|
@ApiModelProperty(value = "修改人") |
||||
|
private String updatorName; |
||||
|
/** |
||||
|
* 修改时间 |
||||
|
*/ |
||||
|
@Excel(name = "修改时间", width = 15) |
||||
|
@ApiModelProperty(value = "修改时间") |
||||
|
private Date updateTime; |
||||
|
/** |
||||
|
* 删除标记:0-未删除,1-已删除 |
||||
|
*/ |
||||
|
@Excel(name = "删除标记:0-未删除,1-已删除", width = 15) |
||||
|
@ApiModelProperty(value = "删除标记:0-未删除,1-已删除") |
||||
|
@TableLogic |
||||
|
private String delFlag; |
||||
|
} |
@ -0,0 +1,181 @@ |
|||||
|
package cc.admin.modules.dust.entity; |
||||
|
|
||||
|
import java.io.Serializable; |
||||
|
import java.util.Date; |
||||
|
|
||||
|
import com.baomidou.mybatisplus.annotation.*; |
||||
|
import io.swagger.annotations.ApiModel; |
||||
|
import io.swagger.annotations.ApiModelProperty; |
||||
|
import lombok.Data; |
||||
|
import lombok.EqualsAndHashCode; |
||||
|
import lombok.experimental.Accessors; |
||||
|
import com.fasterxml.jackson.annotation.JsonFormat; |
||||
|
import org.springframework.format.annotation.DateTimeFormat; |
||||
|
import cc.admin.poi.excel.annotation.Excel; |
||||
|
import cc.admin.common.aspect.annotation.Dict; |
||||
|
|
||||
|
/** |
||||
|
* @Description: 除尘系统监测指标信息表 |
||||
|
* @Author: cc-admin |
||||
|
* @Date: 2025-04-27 |
||||
|
* @Version: V1.0.0 |
||||
|
*/ |
||||
|
@Data |
||||
|
@TableName("tb_dust_targetinfo") |
||||
|
@EqualsAndHashCode(callSuper = false) |
||||
|
@Accessors(chain = true) |
||||
|
@ApiModel(value = "tb_dust_targetinfo对象", description = "除尘系统监测指标信息表") |
||||
|
public class TbDustTargetinfo { |
||||
|
|
||||
|
/** |
||||
|
* 主键 |
||||
|
*/ |
||||
|
@Excel(name = "主键", width = 15) |
||||
|
@ApiModelProperty(value = "主键") |
||||
|
private String id; |
||||
|
/** |
||||
|
* 指标编码,所属设备编码(13位)+3位流水编码 |
||||
|
*/ |
||||
|
@Excel(name = "指标编码,所属设备编码(13位)+3位流水编码", width = 15) |
||||
|
@ApiModelProperty(value = "指标编码,所属设备编码(13位)+3位流水编码") |
||||
|
private String targetCode; |
||||
|
/** |
||||
|
* 所属除尘系统编码,与除尘系统信息中的设备编码一致 |
||||
|
*/ |
||||
|
@Excel(name = "所属除尘系统编码,与除尘系统信息中的设备编码一致", width = 15) |
||||
|
@ApiModelProperty(value = "所属除尘系统编码,与除尘系统信息中的设备编码一致") |
||||
|
private String equipCode; |
||||
|
/** |
||||
|
* 除尘系统id |
||||
|
*/ |
||||
|
@Excel(name = "除尘系统id", width = 15) |
||||
|
@ApiModelProperty(value = "除尘系统id") |
||||
|
private String equipId; |
||||
|
/** |
||||
|
* 指标名称 |
||||
|
*/ |
||||
|
@Excel(name = "指标名称", width = 15) |
||||
|
@ApiModelProperty(value = "指标名称") |
||||
|
private String targetName; |
||||
|
/** |
||||
|
* 指标类别:01-除尘系统启停信号;02-除尘器进出风口压差;03-锁气卸灰故障信号;04-除尘器灰斗温度;05-爆炸防控措施失效信号;06-除尘器灭火装置有效性信号;07-泄爆装置失效信号;08-隔爆阀自锁反馈信号;09-过滤器清灰气源压力;10-喷淋水流量;11-水箱水位信号;12-金属粉储存场所氢气浓度信号;13-过滤水压力;15-火花熄灭装置喷淋水压/水蒸气压力;16-火花熄灭装置动作触发信号;17-火花探测系统运行信号;18-灰斗料位信号;19-输灰装置故障信号;20-火焰探测器报警信号;21-斗提机打滑、跑偏报警信号;22-火花熄灭装置喷淋管路流量信号 |
||||
|
*/ |
||||
|
@Excel(name = "指标类别:01-除尘系统启停信号;02-除尘器进出风口压差;03-锁气卸灰故障信号;04-除尘器灰斗温度;05-爆炸防控措施失效信号;06-除尘器灭火装置有效性信号;07-泄爆装置失效信号;08-隔爆阀自锁反馈信号;09-过滤器清灰气源压力;10-喷淋水流量;11-水箱水位信号;12-金属粉储存场所氢气浓度信号;13-过滤水压力;15-火花熄灭装置喷淋水压/水蒸气压力;16-火花熄灭装置动作触发信号;17-火花探测系统运行信号;18-灰斗料位信号;19-输灰装置故障信号;20-火焰探测器报警信号;21-斗提机打滑、跑偏报警信号;22-火花熄灭装置喷淋管路流量信号", width = 15) |
||||
|
@ApiModelProperty(value = "指标类别:01-除尘系统启停信号;02-除尘器进出风口压差;03-锁气卸灰故障信号;04-除尘器灰斗温度;05-爆炸防控措施失效信号;06-除尘器灭火装置有效性信号;07-泄爆装置失效信号;08-隔爆阀自锁反馈信号;09-过滤器清灰气源压力;10-喷淋水流量;11-水箱水位信号;12-金属粉储存场所氢气浓度信号;13-过滤水压力;15-火花熄灭装置喷淋水压/水蒸气压力;16-火花熄灭装置动作触发信号;17-火花探测系统运行信号;18-灰斗料位信号;19-输灰装置故障信号;20-火焰探测器报警信号;21-斗提机打滑、跑偏报警信号;22-火花熄灭装置喷淋管路流量信号") |
||||
|
private String targetType; |
||||
|
/** |
||||
|
* 指标采集点位置 |
||||
|
*/ |
||||
|
@Excel(name = "指标采集点位置", width = 15) |
||||
|
@ApiModelProperty(value = "指标采集点位置") |
||||
|
private String targetPlace; |
||||
|
/** |
||||
|
* 计量单位,模拟量必填 |
||||
|
*/ |
||||
|
@Excel(name = "计量单位,模拟量必填", width = 15) |
||||
|
@ApiModelProperty(value = "计量单位,模拟量必填") |
||||
|
private String targetUnit; |
||||
|
/** |
||||
|
* 指标阈值上限,高报阈值 |
||||
|
*/ |
||||
|
@Excel(name = "指标阈值上限,高报阈值", width = 15) |
||||
|
@ApiModelProperty(value = "指标阈值上限,高报阈值") |
||||
|
private Double thresholdUpLimit; |
||||
|
/** |
||||
|
* 指标阈值上上限,高高报阈值 |
||||
|
*/ |
||||
|
@Excel(name = "指标阈值上上限,高高报阈值", width = 15) |
||||
|
@ApiModelProperty(value = "指标阈值上上限,高高报阈值") |
||||
|
private Double thresholdUpUpLimit; |
||||
|
/** |
||||
|
* 指标阈值下限,低报阈值 |
||||
|
*/ |
||||
|
@Excel(name = "指标阈值下限,低报阈值", width = 15) |
||||
|
@ApiModelProperty(value = "指标阈值下限,低报阈值") |
||||
|
private Double thresholdDownLimit; |
||||
|
/** |
||||
|
* 指标阈值下下限,低低报阈值 |
||||
|
*/ |
||||
|
@Excel(name = "指标阈值下下限,低低报阈值", width = 15) |
||||
|
@ApiModelProperty(value = "指标阈值下下限,低低报阈值") |
||||
|
private Double thresholdDownDownLimit; |
||||
|
/** |
||||
|
* 量程上限,模拟量指标需要填写 |
||||
|
*/ |
||||
|
@Excel(name = "量程上限,模拟量指标需要填写", width = 15) |
||||
|
@ApiModelProperty(value = "量程上限,模拟量指标需要填写") |
||||
|
private Double rangeUp; |
||||
|
/** |
||||
|
* 量程下限,模拟量指标需要填写 |
||||
|
*/ |
||||
|
@Excel(name = "量程下限,模拟量指标需要填写", width = 15) |
||||
|
@ApiModelProperty(value = "量程下限,模拟量指标需要填写") |
||||
|
private Double rangeDown; |
||||
|
/** |
||||
|
* 描述 |
||||
|
*/ |
||||
|
@Excel(name = "描述", width = 15) |
||||
|
@ApiModelProperty(value = "描述") |
||||
|
private String targetDescription; |
||||
|
/** |
||||
|
* 位号 |
||||
|
*/ |
||||
|
@Excel(name = "位号", width = 15) |
||||
|
@ApiModelProperty(value = "位号") |
||||
|
private String bitNo; |
||||
|
/** |
||||
|
* 信号类型:01-模拟量;02-开关量 |
||||
|
*/ |
||||
|
@Excel(name = "信号类型:01-模拟量;02-开关量", width = 15) |
||||
|
@ApiModelProperty(value = "信号类型:01-模拟量;02-开关量") |
||||
|
private String signalType; |
||||
|
/** |
||||
|
* 开关量报警值:1或者0 |
||||
|
*/ |
||||
|
@Excel(name = "开关量报警值:1或者0", width = 15) |
||||
|
@ApiModelProperty(value = "开关量报警值:1或者0") |
||||
|
private Double alarmValue; |
||||
|
/** |
||||
|
* 指标停用状态:0-停用;1-正常使用 |
||||
|
*/ |
||||
|
@Excel(name = "指标停用状态:0-停用;1-正常使用", width = 15) |
||||
|
@ApiModelProperty(value = "指标停用状态:0-停用;1-正常使用") |
||||
|
private String targetStatus; |
||||
|
/** |
||||
|
* 有效标记:0-无效;1-有效 |
||||
|
*/ |
||||
|
@Excel(name = "有效标记:0-无效;1-有效", width = 15) |
||||
|
@ApiModelProperty(value = "有效标记:0-无效;1-有效") |
||||
|
private String actived; |
||||
|
/** |
||||
|
* 删除标记:0-未删除;1-已删除 |
||||
|
*/ |
||||
|
@Excel(name = "删除标记:0-未删除;1-已删除", width = 15) |
||||
|
@ApiModelProperty(value = "删除标记:0-未删除;1-已删除") |
||||
|
@TableLogic |
||||
|
private String delFlag; |
||||
|
/** |
||||
|
* 创建人 |
||||
|
*/ |
||||
|
@Excel(name = "创建人", width = 15) |
||||
|
@ApiModelProperty(value = "创建人") |
||||
|
private String creatorName; |
||||
|
/** |
||||
|
* 创建时间 |
||||
|
*/ |
||||
|
@Excel(name = "创建时间", width = 15) |
||||
|
@ApiModelProperty(value = "创建时间") |
||||
|
private Date createTime; |
||||
|
/** |
||||
|
* 修改人 |
||||
|
*/ |
||||
|
@Excel(name = "修改人", width = 15) |
||||
|
@ApiModelProperty(value = "修改人") |
||||
|
private String updatorName; |
||||
|
/** |
||||
|
* 修改时间 |
||||
|
*/ |
||||
|
@Excel(name = "修改时间", width = 15) |
||||
|
@ApiModelProperty(value = "修改时间") |
||||
|
private Date updateTime; |
||||
|
} |
@ -0,0 +1,157 @@ |
|||||
|
package cc.admin.modules.dust.entity; |
||||
|
|
||||
|
import java.io.Serializable; |
||||
|
import java.util.Date; |
||||
|
|
||||
|
import com.baomidou.mybatisplus.annotation.*; |
||||
|
import io.swagger.annotations.ApiModel; |
||||
|
import io.swagger.annotations.ApiModelProperty; |
||||
|
import lombok.Data; |
||||
|
import lombok.EqualsAndHashCode; |
||||
|
import lombok.experimental.Accessors; |
||||
|
import com.fasterxml.jackson.annotation.JsonFormat; |
||||
|
import org.springframework.format.annotation.DateTimeFormat; |
||||
|
import cc.admin.poi.excel.annotation.Excel; |
||||
|
import cc.admin.common.aspect.annotation.Dict; |
||||
|
|
||||
|
/** |
||||
|
* @Description: 视频设备信息中间数据表 |
||||
|
* @Author: cc-admin |
||||
|
* @Date: 2025-04-27 |
||||
|
* @Version: V1.0.0 |
||||
|
*/ |
||||
|
@Data |
||||
|
@TableName("tb_dust_videoinfo") |
||||
|
@EqualsAndHashCode(callSuper = false) |
||||
|
@Accessors(chain = true) |
||||
|
@ApiModel(value = "tb_dust_videoinfo对象", description = "视频设备信息中间数据表") |
||||
|
public class TbDustVideoinfo { |
||||
|
|
||||
|
/** |
||||
|
* 视频唯一标识 |
||||
|
*/ |
||||
|
@Excel(name = "视频唯一标识", width = 15) |
||||
|
@ApiModelProperty(value = "视频唯一标识") |
||||
|
private String id; |
||||
|
/** |
||||
|
* 系统id |
||||
|
*/ |
||||
|
@Excel(name = "系统id", width = 15) |
||||
|
@ApiModelProperty(value = "系统id") |
||||
|
private String equipinfoId; |
||||
|
/** |
||||
|
* ip |
||||
|
*/ |
||||
|
@Excel(name = "ip", width = 15) |
||||
|
@ApiModelProperty(value = "ip") |
||||
|
private String ip; |
||||
|
/** |
||||
|
* 账号 |
||||
|
*/ |
||||
|
@Excel(name = "账号", width = 15) |
||||
|
@ApiModelProperty(value = "账号") |
||||
|
private String username; |
||||
|
/** |
||||
|
* 密码 |
||||
|
*/ |
||||
|
@Excel(name = "密码", width = 15) |
||||
|
@ApiModelProperty(value = "密码") |
||||
|
private String password; |
||||
|
/** |
||||
|
* 所属行政区划编码,全国唯一行政区划编码 |
||||
|
*/ |
||||
|
@Excel(name = "所属行政区划编码,全国唯一行政区划编码", width = 15) |
||||
|
@ApiModelProperty(value = "所属行政区划编码,全国唯一行政区划编码") |
||||
|
private String areaCode; |
||||
|
/** |
||||
|
* 所属企业 |
||||
|
*/ |
||||
|
@Excel(name = "所属企业", width = 15) |
||||
|
@ApiModelProperty(value = "所属企业") |
||||
|
private String companyCode; |
||||
|
/** |
||||
|
* 安装场所,场所编码 |
||||
|
*/ |
||||
|
@Excel(name = "安装场所,场所编码", width = 15) |
||||
|
@ApiModelProperty(value = "安装场所,场所编码") |
||||
|
private String placeName; |
||||
|
/** |
||||
|
* 设备名称,视频在省级视频平台中的唯一性标识 |
||||
|
*/ |
||||
|
@Excel(name = "设备名称,视频在省级视频平台中的唯一性标识", width = 15) |
||||
|
@ApiModelProperty(value = "设备名称,视频在省级视频平台中的唯一性标识") |
||||
|
private String equipName; |
||||
|
/** |
||||
|
* 设备型号 |
||||
|
*/ |
||||
|
@Excel(name = "设备型号", width = 15) |
||||
|
@ApiModelProperty(value = "设备型号") |
||||
|
private String equipType; |
||||
|
/** |
||||
|
* 设备品牌 |
||||
|
*/ |
||||
|
@Excel(name = "设备品牌", width = 15) |
||||
|
@ApiModelProperty(value = "设备品牌") |
||||
|
private String equipFactory; |
||||
|
/** |
||||
|
* 经度 |
||||
|
*/ |
||||
|
@Excel(name = "经度", width = 15) |
||||
|
@ApiModelProperty(value = "经度") |
||||
|
private Double longitude; |
||||
|
/** |
||||
|
* 纬度 |
||||
|
*/ |
||||
|
@Excel(name = "纬度", width = 15) |
||||
|
@ApiModelProperty(value = "纬度") |
||||
|
private Double latitude; |
||||
|
/** |
||||
|
* 是否在线:0-否;1-是 |
||||
|
*/ |
||||
|
@Excel(name = "是否在线:0-否;1-是", width = 15) |
||||
|
@ApiModelProperty(value = "是否在线:0-否;1-是") |
||||
|
private String online; |
||||
|
/** |
||||
|
* 是否有效:0-无效;1-有效 |
||||
|
*/ |
||||
|
@Excel(name = "是否有效:0-无效;1-有效", width = 15) |
||||
|
@ApiModelProperty(value = "是否有效:0-无效;1-有效") |
||||
|
private String valid; |
||||
|
/** |
||||
|
* 有效标记:0-无效;1-有效 |
||||
|
*/ |
||||
|
@Excel(name = "有效标记:0-无效;1-有效", width = 15) |
||||
|
@ApiModelProperty(value = "有效标记:0-无效;1-有效") |
||||
|
private String actived; |
||||
|
/** |
||||
|
* 删除标记:0-未删除;1-已删除 |
||||
|
*/ |
||||
|
@Excel(name = "删除标记:0-未删除;1-已删除", width = 15) |
||||
|
@ApiModelProperty(value = "删除标记:0-未删除;1-已删除") |
||||
|
@TableLogic |
||||
|
private String delFlag; |
||||
|
/** |
||||
|
* 创建人 |
||||
|
*/ |
||||
|
@Excel(name = "创建人", width = 15) |
||||
|
@ApiModelProperty(value = "创建人") |
||||
|
private String creatorName; |
||||
|
/** |
||||
|
* 创建时间 |
||||
|
*/ |
||||
|
@Excel(name = "创建时间", width = 15) |
||||
|
@ApiModelProperty(value = "创建时间") |
||||
|
private Date createTime; |
||||
|
/** |
||||
|
* 修改人 |
||||
|
*/ |
||||
|
@Excel(name = "修改人", width = 15) |
||||
|
@ApiModelProperty(value = "修改人") |
||||
|
private String updatorName; |
||||
|
/** |
||||
|
* 修改时间 |
||||
|
*/ |
||||
|
@Excel(name = "修改时间", width = 15) |
||||
|
@ApiModelProperty(value = "修改时间") |
||||
|
private Date updateTime; |
||||
|
} |
@ -0,0 +1,91 @@ |
|||||
|
package cc.admin.modules.dust.entity; |
||||
|
|
||||
|
import java.io.Serializable; |
||||
|
import java.util.Date; |
||||
|
|
||||
|
import com.baomidou.mybatisplus.annotation.*; |
||||
|
import io.swagger.annotations.ApiModel; |
||||
|
import io.swagger.annotations.ApiModelProperty; |
||||
|
import lombok.Data; |
||||
|
import lombok.EqualsAndHashCode; |
||||
|
import lombok.experimental.Accessors; |
||||
|
import com.fasterxml.jackson.annotation.JsonFormat; |
||||
|
import org.springframework.format.annotation.DateTimeFormat; |
||||
|
import cc.admin.poi.excel.annotation.Excel; |
||||
|
import cc.admin.common.aspect.annotation.Dict; |
||||
|
|
||||
|
/** |
||||
|
* @Description: 预警信息推送记录表 |
||||
|
* @Author: cc-admin |
||||
|
* @Date: 2025-04-27 |
||||
|
* @Version: V1.0.0 |
||||
|
*/ |
||||
|
@Data |
||||
|
@TableName("tb_dust_warning") |
||||
|
@EqualsAndHashCode(callSuper = false) |
||||
|
@Accessors(chain = true) |
||||
|
@ApiModel(value="tb_dust_warning对象", description="预警信息推送记录表") |
||||
|
public class TbDustWarning { |
||||
|
|
||||
|
/**预警编号,主键,唯一*/ |
||||
|
@Excel(name = "预警编号,主键,唯一", width = 15) |
||||
|
@ApiModelProperty(value = "预警编号,主键,唯一") |
||||
|
private String id; |
||||
|
/**系统id*/ |
||||
|
@Excel(name = "系统id", width = 15) |
||||
|
@ApiModelProperty(value = "系统id") |
||||
|
private String equipinfoId; |
||||
|
/**预警发布单位*/ |
||||
|
@Excel(name = "预警发布单位", width = 15) |
||||
|
@ApiModelProperty(value = "预警发布单位") |
||||
|
private String warnUnit; |
||||
|
/**预警关联企业的数据接入标识*/ |
||||
|
@Excel(name = "预警关联企业的数据接入标识", width = 15) |
||||
|
@ApiModelProperty(value = "预警关联企业的数据接入标识") |
||||
|
private String dataId; |
||||
|
/**预警等级:1-红色预警;2-橙色预警;3-黄色预警*/ |
||||
|
@Excel(name = "预警等级:1-红色预警;2-橙色预警;3-黄色预警", width = 15) |
||||
|
@ApiModelProperty(value = "预警等级:1-红色预警;2-橙色预警;3-黄色预警") |
||||
|
private String rank; |
||||
|
/**预警起始时间*/ |
||||
|
@Excel(name = "预警起始时间", width = 15) |
||||
|
@ApiModelProperty(value = "预警起始时间") |
||||
|
private Date startTime; |
||||
|
/**预警状态:0-未消警;1-已消警*/ |
||||
|
@Excel(name = "预警状态:0-未消警;1-已消警", width = 15) |
||||
|
@ApiModelProperty(value = "预警状态:0-未消警;1-已消警") |
||||
|
private String warnStatus; |
||||
|
/**预警结束时间*/ |
||||
|
@Excel(name = "预警结束时间", width = 15) |
||||
|
@ApiModelProperty(value = "预警结束时间") |
||||
|
private Date endTime; |
||||
|
/**预警描述*/ |
||||
|
@Excel(name = "预警描述", width = 15) |
||||
|
@ApiModelProperty(value = "预警描述") |
||||
|
private String message; |
||||
|
/**有效标记*/ |
||||
|
@Excel(name = "有效标记", width = 15) |
||||
|
@ApiModelProperty(value = "有效标记") |
||||
|
private String actived; |
||||
|
/**删除标记:0-未删除;1-已删除*/ |
||||
|
@Excel(name = "删除标记:0-未删除;1-已删除", width = 15) |
||||
|
@ApiModelProperty(value = "删除标记:0-未删除;1-已删除") |
||||
|
@TableLogic |
||||
|
private String delFlag; |
||||
|
/**创建人*/ |
||||
|
@Excel(name = "创建人", width = 15) |
||||
|
@ApiModelProperty(value = "创建人") |
||||
|
private String creatorName; |
||||
|
/**创建时间*/ |
||||
|
@Excel(name = "创建时间", width = 15) |
||||
|
@ApiModelProperty(value = "创建时间") |
||||
|
private Date createTime; |
||||
|
/**修改人*/ |
||||
|
@Excel(name = "修改人", width = 15) |
||||
|
@ApiModelProperty(value = "修改人") |
||||
|
private String updatorName; |
||||
|
/**修改时间*/ |
||||
|
@Excel(name = "修改时间", width = 15) |
||||
|
@ApiModelProperty(value = "修改时间") |
||||
|
private Date updateTime; |
||||
|
} |
@ -0,0 +1,83 @@ |
|||||
|
package cc.admin.modules.dust.entity; |
||||
|
|
||||
|
import java.io.Serializable; |
||||
|
import java.util.Date; |
||||
|
|
||||
|
import com.baomidou.mybatisplus.annotation.*; |
||||
|
import io.swagger.annotations.ApiModel; |
||||
|
import io.swagger.annotations.ApiModelProperty; |
||||
|
import lombok.Data; |
||||
|
import lombok.EqualsAndHashCode; |
||||
|
import lombok.experimental.Accessors; |
||||
|
import com.fasterxml.jackson.annotation.JsonFormat; |
||||
|
import org.springframework.format.annotation.DateTimeFormat; |
||||
|
import cc.admin.poi.excel.annotation.Excel; |
||||
|
import cc.admin.common.aspect.annotation.Dict; |
||||
|
|
||||
|
/** |
||||
|
* @Description: 预警消息处置反馈表 |
||||
|
* @Author: cc-admin |
||||
|
* @Date: 2025-04-27 |
||||
|
* @Version: V1.0.0 |
||||
|
*/ |
||||
|
@Data |
||||
|
@TableName("tb_dust_warning_feedback") |
||||
|
@EqualsAndHashCode(callSuper = false) |
||||
|
@Accessors(chain = true) |
||||
|
@ApiModel(value="tb_dust_warning_feedback对象", description="预警消息处置反馈表") |
||||
|
public class TbDustWarningFeedback { |
||||
|
|
||||
|
/**预警编号,主键,唯一*/ |
||||
|
@Excel(name = "预警编号,主键,唯一", width = 15) |
||||
|
@ApiModelProperty(value = "预警编号,主键,唯一") |
||||
|
private String id; |
||||
|
/**系统id*/ |
||||
|
@Excel(name = "系统id", width = 15) |
||||
|
@ApiModelProperty(value = "系统id") |
||||
|
private String equipinfoId; |
||||
|
/**预警关联企业的数据接入标识*/ |
||||
|
@Excel(name = "预警关联企业的数据接入标识", width = 15) |
||||
|
@ApiModelProperty(value = "预警关联企业的数据接入标识") |
||||
|
private String dataId; |
||||
|
/**预警等级:1-红色预警;2-橙色预警;3-黄色预警*/ |
||||
|
@Excel(name = "预警等级:1-红色预警;2-橙色预警;3-黄色预警", width = 15) |
||||
|
@ApiModelProperty(value = "预警等级:1-红色预警;2-橙色预警;3-黄色预警") |
||||
|
private String warningRank; |
||||
|
/**企业反馈信息*/ |
||||
|
@Excel(name = "企业反馈信息", width = 15) |
||||
|
@ApiModelProperty(value = "企业反馈信息") |
||||
|
private String warnFeedback; |
||||
|
/**反馈时间*/ |
||||
|
@Excel(name = "反馈时间", width = 15) |
||||
|
@ApiModelProperty(value = "反馈时间") |
||||
|
private Date realTime; |
||||
|
/**填报人*/ |
||||
|
@Excel(name = "填报人", width = 15) |
||||
|
@ApiModelProperty(value = "填报人") |
||||
|
private String fillBy; |
||||
|
/**有效标记*/ |
||||
|
@Excel(name = "有效标记", width = 15) |
||||
|
@ApiModelProperty(value = "有效标记") |
||||
|
private String actived; |
||||
|
/**删除标记:0-未删除;1-已删除*/ |
||||
|
@Excel(name = "删除标记:0-未删除;1-已删除", width = 15) |
||||
|
@ApiModelProperty(value = "删除标记:0-未删除;1-已删除") |
||||
|
@TableLogic |
||||
|
private String delFlag; |
||||
|
/**创建人*/ |
||||
|
@Excel(name = "创建人", width = 15) |
||||
|
@ApiModelProperty(value = "创建人") |
||||
|
private String creatorName; |
||||
|
/**创建时间*/ |
||||
|
@Excel(name = "创建时间", width = 15) |
||||
|
@ApiModelProperty(value = "创建时间") |
||||
|
private Date createTime; |
||||
|
/**修改人*/ |
||||
|
@Excel(name = "修改人", width = 15) |
||||
|
@ApiModelProperty(value = "修改人") |
||||
|
private String updatorName; |
||||
|
/**修改时间*/ |
||||
|
@Excel(name = "修改时间", width = 15) |
||||
|
@ApiModelProperty(value = "修改时间") |
||||
|
private Date updateTime; |
||||
|
} |
@ -1,75 +0,0 @@ |
|||||
package cc.admin.modules.dust.entity; |
|
||||
|
|
||||
import java.io.Serializable; |
|
||||
import java.util.Date; |
|
||||
|
|
||||
import com.baomidou.mybatisplus.annotation.*; |
|
||||
import io.swagger.annotations.ApiModel; |
|
||||
import io.swagger.annotations.ApiModelProperty; |
|
||||
import lombok.Data; |
|
||||
import lombok.EqualsAndHashCode; |
|
||||
import lombok.experimental.Accessors; |
|
||||
import com.fasterxml.jackson.annotation.JsonFormat; |
|
||||
import org.springframework.format.annotation.DateTimeFormat; |
|
||||
import cc.admin.poi.excel.annotation.Excel; |
|
||||
import cc.admin.common.aspect.annotation.Dict; |
|
||||
|
|
||||
/** |
|
||||
* @Description: 风速颜色表 |
|
||||
* @Author: cc-admin |
|
||||
* @Date: 2025-01-09 |
|
||||
* @Version: V1.0.0 |
|
||||
*/ |
|
||||
@Data |
|
||||
@TableName("wind_speed_color") |
|
||||
@EqualsAndHashCode(callSuper = false) |
|
||||
@Accessors(chain = true) |
|
||||
@ApiModel(value="wind_speed_color对象", description="风速颜色表") |
|
||||
public class WindSpeedColor { |
|
||||
|
|
||||
/**主键ID*/ |
|
||||
@Excel(name = "主键ID", width = 15) |
|
||||
@ApiModelProperty(value = "主键ID") |
|
||||
private String id; |
|
||||
/**风速*/ |
|
||||
@Excel(name = "风速", width = 15) |
|
||||
@ApiModelProperty(value = "风速") |
|
||||
private String windSpeed; |
|
||||
/**颜色*/ |
|
||||
@Excel(name = "颜色", width = 15) |
|
||||
@ApiModelProperty(value = "颜色") |
|
||||
private String color; |
|
||||
/**公式*/ |
|
||||
@Excel(name = "公式", width = 15) |
|
||||
@ApiModelProperty(value = "公式") |
|
||||
private String formula; |
|
||||
/**排序*/ |
|
||||
@Excel(name = "排序", width = 15) |
|
||||
@ApiModelProperty(value = "排序") |
|
||||
private Integer sortOrder; |
|
||||
/**备注*/ |
|
||||
@Excel(name = "备注", width = 15) |
|
||||
@ApiModelProperty(value = "备注") |
|
||||
private String remark; |
|
||||
/**删除标志*/ |
|
||||
@Excel(name = "删除标志", width = 15) |
|
||||
@ApiModelProperty(value = "删除标志") |
|
||||
@TableLogic |
|
||||
private Integer delFlag; |
|
||||
/**创建者*/ |
|
||||
@Excel(name = "创建者", width = 15) |
|
||||
@ApiModelProperty(value = "创建者") |
|
||||
private String createBy; |
|
||||
/**创建时间*/ |
|
||||
@Excel(name = "创建时间", width = 15) |
|
||||
@ApiModelProperty(value = "创建时间") |
|
||||
private Date createTime; |
|
||||
/**更新者*/ |
|
||||
@Excel(name = "更新者", width = 15) |
|
||||
@ApiModelProperty(value = "更新者") |
|
||||
private String updateBy; |
|
||||
/**更新时间*/ |
|
||||
@Excel(name = "更新时间", width = 15) |
|
||||
@ApiModelProperty(value = "更新时间") |
|
||||
private Date updateTime; |
|
||||
} |
|
@ -1,14 +0,0 @@ |
|||||
package cc.admin.modules.dust.mapper; |
|
||||
|
|
||||
import cc.admin.modules.dust.entity.DesignPlan; |
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
|
||||
|
|
||||
/** |
|
||||
* @Description: 设计方案表 |
|
||||
* @Author: cc-admin |
|
||||
* @Date: 2024-12-06 |
|
||||
* @Version: V1.0.0 |
|
||||
*/ |
|
||||
public interface DesignPlanMapper extends BaseMapper<DesignPlan> { |
|
||||
|
|
||||
} |
|
@ -1,18 +0,0 @@ |
|||||
package cc.admin.modules.dust.mapper; |
|
||||
|
|
||||
import java.util.List; |
|
||||
|
|
||||
import org.apache.ibatis.annotations.Param; |
|
||||
import cc.admin.modules.dust.entity.DustMonitorValve; |
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
|
||||
|
|
||||
/** |
|
||||
* @Description: 大屏阀门监控表 |
|
||||
* @Author: cc-admin |
|
||||
* @Date: 2025-03-27 |
|
||||
* @Version: V1.0.0 |
|
||||
*/ |
|
||||
public interface DustMonitorValveMapper extends BaseMapper<DustMonitorValve> { |
|
||||
|
|
||||
List<DustMonitorValve> valveList(); |
|
||||
} |
|
@ -1,17 +0,0 @@ |
|||||
package cc.admin.modules.dust.mapper; |
|
||||
|
|
||||
import java.util.List; |
|
||||
|
|
||||
import org.apache.ibatis.annotations.Param; |
|
||||
import cc.admin.modules.dust.entity.DustValve; |
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
|
||||
|
|
||||
/** |
|
||||
* @Description: 阀门表 |
|
||||
* @Author: cc-admin |
|
||||
* @Date: 2025-03-27 |
|
||||
* @Version: V1.0.0 |
|
||||
*/ |
|
||||
public interface DustValveMapper extends BaseMapper<DustValve> { |
|
||||
|
|
||||
} |
|
@ -1,17 +0,0 @@ |
|||||
package cc.admin.modules.dust.mapper; |
|
||||
|
|
||||
import java.util.List; |
|
||||
|
|
||||
import cc.admin.modules.dust.entity.PipeDiameterThickness; |
|
||||
import org.apache.ibatis.annotations.Param; |
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
|
||||
|
|
||||
/** |
|
||||
* @Description: 管径壁厚对应表 |
|
||||
* @Author: cc-admin |
|
||||
* @Date: 2024-12-06 |
|
||||
* @Version: V1.0.0 |
|
||||
*/ |
|
||||
public interface PipeDiameterThicknessMapper extends BaseMapper<PipeDiameterThickness> { |
|
||||
|
|
||||
} |
|
@ -1,21 +0,0 @@ |
|||||
package cc.admin.modules.dust.mapper; |
|
||||
|
|
||||
import java.util.List; |
|
||||
|
|
||||
import cc.admin.modules.dust.entity.Pipe; |
|
||||
import org.apache.ibatis.annotations.Param; |
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
|
||||
|
|
||||
/** |
|
||||
* @Description: 管道表 |
|
||||
* @Author: cc-admin |
|
||||
* @Date: 2024-12-06 |
|
||||
* @Version: V1.0.0 |
|
||||
*/ |
|
||||
public interface PipeMapper extends BaseMapper<Pipe> { |
|
||||
|
|
||||
void delByDesignPlanId(String id); |
|
||||
|
|
||||
|
|
||||
|
|
||||
} |
|
@ -1,21 +0,0 @@ |
|||||
package cc.admin.modules.dust.mapper; |
|
||||
|
|
||||
import java.util.List; |
|
||||
|
|
||||
import cc.admin.modules.dust.entity.RecommendPlan; |
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage; |
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
|
||||
import org.apache.ibatis.annotations.Param; |
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
|
||||
|
|
||||
/** |
|
||||
* @Description: 推荐方案表 |
|
||||
* @Author: cc-admin |
|
||||
* @Date: 2024-12-06 |
|
||||
* @Version: V1.0.0 |
|
||||
*/ |
|
||||
public interface RecommendPlanMapper extends BaseMapper<RecommendPlan> { |
|
||||
|
|
||||
void deleteByDesignPlanId(String designPlanId); |
|
||||
|
|
||||
} |
|
@ -0,0 +1,17 @@ |
|||||
|
package cc.admin.modules.dust.mapper; |
||||
|
|
||||
|
import cc.admin.modules.dust.entity.TbDustClearrecord; |
||||
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
||||
|
|
||||
|
import java.util.List; |
||||
|
|
||||
|
|
||||
|
/** |
||||
|
* @Description: 粉尘清扫打卡记录表 |
||||
|
* @Author: cc-admin |
||||
|
* @Date: 2025-04-27 |
||||
|
* @Version: V1.0.0 |
||||
|
*/ |
||||
|
public interface TbDustClearrecordMapper extends BaseMapper<TbDustClearrecord> { |
||||
|
|
||||
|
} |
@ -0,0 +1,17 @@ |
|||||
|
package cc.admin.modules.dust.mapper; |
||||
|
|
||||
|
import java.util.List; |
||||
|
|
||||
|
import cc.admin.modules.dust.entity.TbDustCompanyinfo; |
||||
|
import org.apache.ibatis.annotations.Param; |
||||
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
||||
|
|
||||
|
/** |
||||
|
* @Description: 企业基础信息表 |
||||
|
* @Author: cc-admin |
||||
|
* @Date: 2025-04-27 |
||||
|
* @Version: V1.0.0 |
||||
|
*/ |
||||
|
public interface TbDustCompanyinfoMapper extends BaseMapper<TbDustCompanyinfo> { |
||||
|
|
||||
|
} |
@ -0,0 +1,17 @@ |
|||||
|
package cc.admin.modules.dust.mapper; |
||||
|
|
||||
|
import java.util.List; |
||||
|
|
||||
|
import cc.admin.modules.dust.entity.TbDustTargetinfo; |
||||
|
import org.apache.ibatis.annotations.Param; |
||||
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
||||
|
|
||||
|
/** |
||||
|
* @Description: 除尘系统监测指标信息表 |
||||
|
* @Author: cc-admin |
||||
|
* @Date: 2025-04-27 |
||||
|
* @Version: V1.0.0 |
||||
|
*/ |
||||
|
public interface TbDustTargetinfoMapper extends BaseMapper<TbDustTargetinfo> { |
||||
|
|
||||
|
} |
@ -0,0 +1,17 @@ |
|||||
|
package cc.admin.modules.dust.mapper; |
||||
|
|
||||
|
import java.util.List; |
||||
|
|
||||
|
import cc.admin.modules.dust.entity.TbDustVideoinfo; |
||||
|
import org.apache.ibatis.annotations.Param; |
||||
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
||||
|
|
||||
|
/** |
||||
|
* @Description: 视频设备信息中间数据表 |
||||
|
* @Author: cc-admin |
||||
|
* @Date: 2025-04-27 |
||||
|
* @Version: V1.0.0 |
||||
|
*/ |
||||
|
public interface TbDustVideoinfoMapper extends BaseMapper<TbDustVideoinfo> { |
||||
|
|
||||
|
} |
@ -0,0 +1,16 @@ |
|||||
|
package cc.admin.modules.dust.mapper; |
||||
|
|
||||
|
import java.util.List; |
||||
|
|
||||
|
import cc.admin.modules.dust.entity.TbDustWarningFeedback; |
||||
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
||||
|
|
||||
|
/** |
||||
|
* @Description: 预警消息处置反馈表 |
||||
|
* @Author: cc-admin |
||||
|
* @Date: 2025-04-27 |
||||
|
* @Version: V1.0.0 |
||||
|
*/ |
||||
|
public interface TbDustWarningFeedbackMapper extends BaseMapper<TbDustWarningFeedback> { |
||||
|
|
||||
|
} |
@ -1,18 +0,0 @@ |
|||||
package cc.admin.modules.dust.mapper; |
|
||||
|
|
||||
import cc.admin.modules.dust.entity.WindSpeedColor; |
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
|
||||
|
|
||||
import java.util.List; |
|
||||
|
|
||||
|
|
||||
|
|
||||
/** |
|
||||
* @Description: 风速颜色表 |
|
||||
* @Author: cc-admin |
|
||||
* @Date: 2025-01-09 |
|
||||
* @Version: V1.0.0 |
|
||||
*/ |
|
||||
public interface WindSpeedColorMapper extends BaseMapper<WindSpeedColor> { |
|
||||
|
|
||||
} |
|
@ -1,11 +0,0 @@ |
|||||
<?xml version="1.0" encoding="UTF-8"?> |
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
|
||||
<mapper namespace="cc.admin.modules.dust.mapper.DustMonitorValveMapper"> |
|
||||
|
|
||||
<select id="valveList" resultType="cc.admin.modules.dust.entity.DustMonitorValve"> |
|
||||
select d.*,v.system_id from dust_monitor_valve d |
|
||||
left join dust_valve |
|
||||
v on d.valve_id = v.id |
|
||||
where d.del_flag = 0 |
|
||||
</select> |
|
||||
</mapper> |
|
@ -1,5 +0,0 @@ |
|||||
<?xml version="1.0" encoding="UTF-8"?> |
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
|
||||
<mapper namespace="cc.admin.modules.dust.mapper.DustValveMapper"> |
|
||||
|
|
||||
</mapper> |
|
@ -1,5 +0,0 @@ |
|||||
<?xml version="1.0" encoding="UTF-8"?> |
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
|
||||
<mapper namespace="cc.admin.modules.dust.mapper.PipeDiameterThicknessMapper"> |
|
||||
|
|
||||
</mapper> |
|
@ -1,7 +0,0 @@ |
|||||
<?xml version="1.0" encoding="UTF-8"?> |
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
|
||||
<mapper namespace="cc.admin.modules.dust.mapper.PipeMapper"> |
|
||||
<delete id="delByDesignPlanId"> |
|
||||
delete from pipe where design_plan_id = #{designPlanId} |
|
||||
</delete> |
|
||||
</mapper> |
|
@ -1,10 +0,0 @@ |
|||||
<?xml version="1.0" encoding="UTF-8"?> |
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
|
||||
<mapper namespace="cc.admin.modules.dust.mapper.RecommendPlanMapper"> |
|
||||
|
|
||||
<delete id="deleteByDesignPlanId"> |
|
||||
delete from recommend_plan |
|
||||
WHERE design_plan_id = #{designPlanId} |
|
||||
</delete> |
|
||||
|
|
||||
</mapper> |
|
@ -1,5 +1,5 @@ |
|||||
<?xml version="1.0" encoding="UTF-8"?> |
<?xml version="1.0" encoding="UTF-8"?> |
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
||||
<mapper namespace="cc.admin.modules.dust.mapper.DustAlarmMapper"> |
|
||||
|
<mapper namespace="cc.admin.modules.dust.mapper.TbDustAttachmentMapper"> |
||||
|
|
||||
</mapper> |
</mapper> |
@ -0,0 +1,5 @@ |
|||||
|
<?xml version="1.0" encoding="UTF-8"?> |
||||
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
||||
|
<mapper namespace="cc.admin.modules.dust.mapper.TbDustClearrecordMapper"> |
||||
|
|
||||
|
</mapper> |
@ -0,0 +1,5 @@ |
|||||
|
<?xml version="1.0" encoding="UTF-8"?> |
||||
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
||||
|
<mapper namespace="cc.admin.modules.dust.mapper.TbDustCompanyinfoMapper"> |
||||
|
|
||||
|
</mapper> |
@ -1,5 +1,5 @@ |
|||||
<?xml version="1.0" encoding="UTF-8"?> |
<?xml version="1.0" encoding="UTF-8"?> |
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
||||
<mapper namespace="cc.admin.modules.wind.mapper.WindSpeedColorMapper"> |
|
||||
|
<mapper namespace="cc.admin.modules.dust.mapper.TbDustDustinfoMapper"> |
||||
|
|
||||
</mapper> |
</mapper> |
@ -1,5 +1,5 @@ |
|||||
<?xml version="1.0" encoding="UTF-8"?> |
<?xml version="1.0" encoding="UTF-8"?> |
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
||||
<mapper namespace="cc.admin.modules.dust.mapper.DustMonitorItemMapper"> |
|
||||
|
<mapper namespace="cc.admin.modules.dust.mapper.TbDustEquipinfoMapper"> |
||||
|
|
||||
</mapper> |
</mapper> |
@ -1,5 +1,5 @@ |
|||||
<?xml version="1.0" encoding="UTF-8"?> |
<?xml version="1.0" encoding="UTF-8"?> |
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
||||
<mapper namespace="cc.admin.modules.dust.mapper.DustDataTagMapper"> |
|
||||
|
<mapper namespace="cc.admin.modules.dust.mapper.TbDustTargetinfoMapper"> |
||||
|
|
||||
</mapper> |
</mapper> |
@ -1,5 +1,5 @@ |
|||||
<?xml version="1.0" encoding="UTF-8"?> |
<?xml version="1.0" encoding="UTF-8"?> |
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
||||
<mapper namespace="cc.admin.modules.dust.mapper.DesignPlanMapper"> |
|
||||
|
<mapper namespace="cc.admin.modules.dust.mapper.TbDustVideoinfoMapper"> |
||||
|
|
||||
</mapper> |
</mapper> |
@ -0,0 +1,5 @@ |
|||||
|
<?xml version="1.0" encoding="UTF-8"?> |
||||
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
||||
|
<mapper namespace="cc.admin.modules.dust.mapper.TbDustWarningFeedbackMapper"> |
||||
|
|
||||
|
</mapper> |
@ -1,5 +1,5 @@ |
|||||
<?xml version="1.0" encoding="UTF-8"?> |
<?xml version="1.0" encoding="UTF-8"?> |
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
||||
<mapper namespace="cc.admin.modules.dust.mapper.DustSystemMapper"> |
|
||||
|
<mapper namespace="cc.admin.modules.dust.mapper.TbDustWarningMapper"> |
||||
|
|
||||
</mapper> |
</mapper> |
@ -1,17 +0,0 @@ |
|||||
package cc.admin.modules.dust.po; |
|
||||
|
|
||||
|
|
||||
import cc.admin.modules.dust.entity.Pipe; |
|
||||
import cc.admin.poi.excel.annotation.Excel; |
|
||||
import io.swagger.annotations.ApiModelProperty; |
|
||||
import lombok.Data; |
|
||||
|
|
||||
import java.util.List; |
|
||||
|
|
||||
@Data |
|
||||
public class DustQuery { |
|
||||
/**推荐方案id*/ |
|
||||
private String designPlanId; |
|
||||
|
|
||||
private List<Pipe> list; |
|
||||
} |
|
@ -1,16 +0,0 @@ |
|||||
package cc.admin.modules.dust.service; |
|
||||
|
|
||||
import cc.admin.modules.dust.entity.DesignPlan; |
|
||||
import com.baomidou.mybatisplus.extension.service.IService; |
|
||||
|
|
||||
/** |
|
||||
* @Description: 设计方案表 |
|
||||
* @Author: cc-admin |
|
||||
* @Date: 2024-12-06 |
|
||||
* @Version: V1.0.0 |
|
||||
*/ |
|
||||
public interface IDesignPlanService extends IService<DesignPlan> { |
|
||||
|
|
||||
void copy(DesignPlan designPlan,String name); |
|
||||
|
|
||||
} |
|
@ -1,14 +0,0 @@ |
|||||
package cc.admin.modules.dust.service; |
|
||||
|
|
||||
import cc.admin.modules.dust.entity.DustAlarm; |
|
||||
import com.baomidou.mybatisplus.extension.service.IService; |
|
||||
|
|
||||
/** |
|
||||
* @Description: 警报记录表 |
|
||||
* @Author: cc-admin |
|
||||
* @Date: 2025-03-27 |
|
||||
* @Version: V1.0.0 |
|
||||
*/ |
|
||||
public interface IDustAlarmService extends IService<DustAlarm> { |
|
||||
|
|
||||
} |
|
@ -1,14 +0,0 @@ |
|||||
package cc.admin.modules.dust.service; |
|
||||
|
|
||||
import cc.admin.modules.dust.entity.DustDataTag; |
|
||||
import com.baomidou.mybatisplus.extension.service.IService; |
|
||||
|
|
||||
/** |
|
||||
* @Description: 数据点位表 |
|
||||
* @Author: cc-admin |
|
||||
* @Date: 2025-03-27 |
|
||||
* @Version: V1.0.0 |
|
||||
*/ |
|
||||
public interface IDustDataTagService extends IService<DustDataTag> { |
|
||||
|
|
||||
} |
|
@ -1,14 +0,0 @@ |
|||||
package cc.admin.modules.dust.service; |
|
||||
|
|
||||
import cc.admin.modules.dust.entity.DustMonitorItem; |
|
||||
import com.baomidou.mybatisplus.extension.service.IService; |
|
||||
|
|
||||
/** |
|
||||
* @Description: 大屏监控项表 |
|
||||
* @Author: cc-admin |
|
||||
* @Date: 2025-03-27 |
|
||||
* @Version: V1.0.0 |
|
||||
*/ |
|
||||
public interface IDustMonitorItemService extends IService<DustMonitorItem> { |
|
||||
|
|
||||
} |
|
@ -1,18 +0,0 @@ |
|||||
package cc.admin.modules.dust.service; |
|
||||
|
|
||||
import cc.admin.modules.dust.entity.DustMonitorValve; |
|
||||
import com.baomidou.mybatisplus.extension.service.IService; |
|
||||
|
|
||||
import java.util.List; |
|
||||
|
|
||||
/** |
|
||||
* @Description: 大屏阀门监控表 |
|
||||
* @Author: cc-admin |
|
||||
* @Date: 2025-03-27 |
|
||||
* @Version: V1.0.0 |
|
||||
*/ |
|
||||
public interface IDustMonitorValveService extends IService<DustMonitorValve> { |
|
||||
|
|
||||
List<DustMonitorValve> valveList(); |
|
||||
|
|
||||
} |
|
@ -1,14 +0,0 @@ |
|||||
package cc.admin.modules.dust.service; |
|
||||
|
|
||||
import cc.admin.modules.dust.entity.DustSystem; |
|
||||
import com.baomidou.mybatisplus.extension.service.IService; |
|
||||
|
|
||||
/** |
|
||||
* @Description: 除尘系统表 |
|
||||
* @Author: cc-admin |
|
||||
* @Date: 2025-03-27 |
|
||||
* @Version: V1.0.0 |
|
||||
*/ |
|
||||
public interface IDustSystemService extends IService<DustSystem> { |
|
||||
|
|
||||
} |
|
@ -1,14 +0,0 @@ |
|||||
package cc.admin.modules.dust.service; |
|
||||
|
|
||||
import cc.admin.modules.dust.entity.DustValve; |
|
||||
import com.baomidou.mybatisplus.extension.service.IService; |
|
||||
|
|
||||
/** |
|
||||
* @Description: 阀门表 |
|
||||
* @Author: cc-admin |
|
||||
* @Date: 2025-03-27 |
|
||||
* @Version: V1.0.0 |
|
||||
*/ |
|
||||
public interface IDustValveService extends IService<DustValve> { |
|
||||
|
|
||||
} |
|
@ -1,17 +0,0 @@ |
|||||
package cc.admin.modules.dust.service; |
|
||||
|
|
||||
|
|
||||
import cc.admin.modules.dust.entity.PipeDiameterThickness; |
|
||||
import com.baomidou.mybatisplus.extension.service.IService; |
|
||||
|
|
||||
import java.math.BigDecimal; |
|
||||
|
|
||||
/** |
|
||||
* @Description: 管径壁厚对应表 |
|
||||
* @Author: cc-admin |
|
||||
* @Date: 2024-12-06 |
|
||||
* @Version: V1.0.0 |
|
||||
*/ |
|
||||
public interface IPipeDiameterThicknessService extends IService<PipeDiameterThickness> { |
|
||||
|
|
||||
} |
|
@ -1,27 +0,0 @@ |
|||||
package cc.admin.modules.dust.service; |
|
||||
|
|
||||
import cc.admin.common.api.vo.Result; |
|
||||
import cc.admin.modules.dust.entity.Pipe; |
|
||||
import cc.admin.modules.dust.vo.DustConfigVo; |
|
||||
import com.baomidou.mybatisplus.extension.service.IService; |
|
||||
|
|
||||
import java.util.List; |
|
||||
|
|
||||
/** |
|
||||
* @Description: 管道表 |
|
||||
* @Author: cc-admin |
|
||||
* @Date: 2024-12-06 |
|
||||
* @Version: V1.0.0 |
|
||||
*/ |
|
||||
public interface IPipeService extends IService<Pipe> { |
|
||||
|
|
||||
Result<?> importList(List<DustConfigVo> configVoList, List<String> errorList,String designPlanId); |
|
||||
|
|
||||
void delByDesignPlanId(String id); |
|
||||
|
|
||||
void savePipe(Pipe pipe); |
|
||||
|
|
||||
void updatePipe(Pipe pipe); |
|
||||
|
|
||||
void remove(String id); |
|
||||
} |
|
@ -1,20 +0,0 @@ |
|||||
package cc.admin.modules.dust.service; |
|
||||
|
|
||||
import cc.admin.modules.dust.entity.RecommendPlan; |
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage; |
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
|
||||
import com.baomidou.mybatisplus.extension.service.IService; |
|
||||
|
|
||||
import java.util.List; |
|
||||
|
|
||||
/** |
|
||||
* @Description: 推荐方案表 |
|
||||
* @Author: cc-admin |
|
||||
* @Date: 2024-12-06 |
|
||||
* @Version: V1.0.0 |
|
||||
*/ |
|
||||
public interface IRecommendPlanService extends IService<RecommendPlan> { |
|
||||
|
|
||||
void deleteByDesignPlanId(String designPlanId); |
|
||||
} |
|
@ -0,0 +1,15 @@ |
|||||
|
package cc.admin.modules.dust.service; |
||||
|
|
||||
|
|
||||
|
import cc.admin.modules.dust.entity.TbDustAttachment; |
||||
|
import com.baomidou.mybatisplus.extension.service.IService; |
||||
|
|
||||
|
/** |
||||
|
* @Description: 附件信息表 |
||||
|
* @Author: cc-admin |
||||
|
* @Date: 2025-04-27 |
||||
|
* @Version: V1.0.0 |
||||
|
*/ |
||||
|
public interface ITbDustAttachmentService extends IService<TbDustAttachment> { |
||||
|
|
||||
|
} |
@ -0,0 +1,14 @@ |
|||||
|
package cc.admin.modules.dust.service; |
||||
|
|
||||
|
import cc.admin.modules.dust.entity.TbDustClearrecord; |
||||
|
import com.baomidou.mybatisplus.extension.service.IService; |
||||
|
|
||||
|
/** |
||||
|
* @Description: 粉尘清扫打卡记录表 |
||||
|
* @Author: cc-admin |
||||
|
* @Date: 2025-04-27 |
||||
|
* @Version: V1.0.0 |
||||
|
*/ |
||||
|
public interface ITbDustClearrecordService extends IService<TbDustClearrecord> { |
||||
|
|
||||
|
} |
@ -0,0 +1,14 @@ |
|||||
|
package cc.admin.modules.dust.service; |
||||
|
|
||||
|
import cc.admin.modules.dust.entity.TbDustCompanyinfo; |
||||
|
import com.baomidou.mybatisplus.extension.service.IService; |
||||
|
|
||||
|
/** |
||||
|
* @Description: 企业基础信息表 |
||||
|
* @Author: cc-admin |
||||
|
* @Date: 2025-04-27 |
||||
|
* @Version: V1.0.0 |
||||
|
*/ |
||||
|
public interface ITbDustCompanyinfoService extends IService<TbDustCompanyinfo> { |
||||
|
|
||||
|
} |
@ -0,0 +1,14 @@ |
|||||
|
package cc.admin.modules.dust.service; |
||||
|
|
||||
|
import cc.admin.modules.dust.entity.TbDustDustinfo; |
||||
|
import com.baomidou.mybatisplus.extension.service.IService; |
||||
|
|
||||
|
/** |
||||
|
* @Description: 涉尘信息表 |
||||
|
* @Author: cc-admin |
||||
|
* @Date: 2025-04-27 |
||||
|
* @Version: V1.0.0 |
||||
|
*/ |
||||
|
public interface ITbDustDustinfoService extends IService<TbDustDustinfo> { |
||||
|
|
||||
|
} |
@ -0,0 +1,14 @@ |
|||||
|
package cc.admin.modules.dust.service; |
||||
|
|
||||
|
import cc.admin.modules.dust.entity.TbDustEquipinfo; |
||||
|
import com.baomidou.mybatisplus.extension.service.IService; |
||||
|
|
||||
|
/** |
||||
|
* @Description: 除尘系统信息表 |
||||
|
* @Author: cc-admin |
||||
|
* @Date: 2025-04-27 |
||||
|
* @Version: V1.0.0 |
||||
|
*/ |
||||
|
public interface ITbDustEquipinfoService extends IService<TbDustEquipinfo> { |
||||
|
|
||||
|
} |
@ -0,0 +1,14 @@ |
|||||
|
package cc.admin.modules.dust.service; |
||||
|
|
||||
|
import cc.admin.modules.dust.entity.TbDustTargetinfo; |
||||
|
import com.baomidou.mybatisplus.extension.service.IService; |
||||
|
|
||||
|
/** |
||||
|
* @Description: 除尘系统监测指标信息表 |
||||
|
* @Author: cc-admin |
||||
|
* @Date: 2025-04-27 |
||||
|
* @Version: V1.0.0 |
||||
|
*/ |
||||
|
public interface ITbDustTargetinfoService extends IService<TbDustTargetinfo> { |
||||
|
|
||||
|
} |
@ -0,0 +1,14 @@ |
|||||
|
package cc.admin.modules.dust.service; |
||||
|
|
||||
|
import cc.admin.modules.dust.entity.TbDustVideoinfo; |
||||
|
import com.baomidou.mybatisplus.extension.service.IService; |
||||
|
|
||||
|
/** |
||||
|
* @Description: 视频设备信息中间数据表 |
||||
|
* @Author: cc-admin |
||||
|
* @Date: 2025-04-27 |
||||
|
* @Version: V1.0.0 |
||||
|
*/ |
||||
|
public interface ITbDustVideoinfoService extends IService<TbDustVideoinfo> { |
||||
|
|
||||
|
} |
@ -0,0 +1,14 @@ |
|||||
|
package cc.admin.modules.dust.service; |
||||
|
|
||||
|
import cc.admin.modules.dust.entity.TbDustWarningFeedback; |
||||
|
import com.baomidou.mybatisplus.extension.service.IService; |
||||
|
|
||||
|
/** |
||||
|
* @Description: 预警消息处置反馈表 |
||||
|
* @Author: cc-admin |
||||
|
* @Date: 2025-04-27 |
||||
|
* @Version: V1.0.0 |
||||
|
*/ |
||||
|
public interface ITbDustWarningFeedbackService extends IService<TbDustWarningFeedback> { |
||||
|
|
||||
|
} |
@ -0,0 +1,14 @@ |
|||||
|
package cc.admin.modules.dust.service; |
||||
|
|
||||
|
import cc.admin.modules.dust.entity.TbDustWarning; |
||||
|
import com.baomidou.mybatisplus.extension.service.IService; |
||||
|
|
||||
|
/** |
||||
|
* @Description: 预警信息推送记录表 |
||||
|
* @Author: cc-admin |
||||
|
* @Date: 2025-04-27 |
||||
|
* @Version: V1.0.0 |
||||
|
*/ |
||||
|
public interface ITbDustWarningService extends IService<TbDustWarning> { |
||||
|
|
||||
|
} |
@ -1,15 +0,0 @@ |
|||||
package cc.admin.modules.dust.service; |
|
||||
|
|
||||
|
|
||||
import cc.admin.modules.dust.entity.WindSpeedColor; |
|
||||
import com.baomidou.mybatisplus.extension.service.IService; |
|
||||
|
|
||||
/** |
|
||||
* @Description: 风速颜色表 |
|
||||
* @Author: cc-admin |
|
||||
* @Date: 2025-01-09 |
|
||||
* @Version: V1.0.0 |
|
||||
*/ |
|
||||
public interface IWindSpeedColorService extends IService<WindSpeedColor> { |
|
||||
|
|
||||
} |
|
@ -1,114 +0,0 @@ |
|||||
package cc.admin.modules.dust.service.impl; |
|
||||
|
|
||||
|
|
||||
import cc.admin.modules.dust.entity.DesignPlan; |
|
||||
import cc.admin.modules.dust.entity.Pipe; |
|
||||
import cc.admin.modules.dust.mapper.DesignPlanMapper; |
|
||||
import cc.admin.modules.dust.service.IDesignPlanService; |
|
||||
import cc.admin.modules.dust.service.IPipeService; |
|
||||
import cn.hutool.core.util.IdUtil; |
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
|
||||
import org.apache.commons.collections.CollectionUtils; |
|
||||
import org.apache.commons.lang3.StringUtils; |
|
||||
import org.springframework.beans.factory.annotation.Autowired; |
|
||||
import org.springframework.stereotype.Service; |
|
||||
|
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
|
||||
import org.springframework.transaction.annotation.Transactional; |
|
||||
|
|
||||
import java.util.*; |
|
||||
import java.util.stream.Collectors; |
|
||||
|
|
||||
/** |
|
||||
* @Description: 设计方案表 |
|
||||
* @Author: cc-admin |
|
||||
* @Date: 2024-12-06 |
|
||||
* @Version: V1.0.0 |
|
||||
*/ |
|
||||
@Service |
|
||||
public class DesignPlanServiceImpl extends ServiceImpl<DesignPlanMapper, DesignPlan> implements IDesignPlanService { |
|
||||
@Autowired |
|
||||
private IPipeService iPipeService; |
|
||||
|
|
||||
@Override |
|
||||
@Transactional(rollbackFor = Exception.class) |
|
||||
public void copy(DesignPlan designPlan, String name) { |
|
||||
|
|
||||
QueryWrapper<Pipe> objectQueryWrapper = new QueryWrapper<>(); |
|
||||
objectQueryWrapper.eq("design_plan_id", designPlan.getId()); |
|
||||
List<Pipe> list = iPipeService.list(objectQueryWrapper); |
|
||||
String id = IdUtil.fastUUID(); |
|
||||
designPlan.setId(id); |
|
||||
designPlan.setName(name); |
|
||||
save(designPlan); |
|
||||
List<Pipe> pipeTree = buildPipeTree(list,id); |
|
||||
|
|
||||
if (CollectionUtils.isNotEmpty(pipeTree)) { |
|
||||
|
|
||||
// 递归更新所有管道
|
|
||||
updatePipeTree(pipeTree, null); // null 表示根管道没有父管道 ID
|
|
||||
List<Pipe> updatedList = new ArrayList<>(); |
|
||||
|
|
||||
flattenPipeTree(pipeTree, updatedList); |
|
||||
|
|
||||
iPipeService.saveBatch(updatedList); |
|
||||
} |
|
||||
|
|
||||
} |
|
||||
|
|
||||
private void updatePipeTree(List<Pipe> pipes, String parentId) { |
|
||||
for (Pipe pipe : pipes) { |
|
||||
// 生成新的管道 ID
|
|
||||
String newPipeId = IdUtil.fastUUID(); |
|
||||
pipe.setId(newPipeId); |
|
||||
|
|
||||
// 设置父管道的 ID
|
|
||||
pipe.setParentId(parentId); // 当前管道的父管道 ID
|
|
||||
|
|
||||
// 如果当前管道有子管道,递归处理子管道
|
|
||||
if (pipe.getChildren() != null && !pipe.getChildren().isEmpty()) { |
|
||||
updatePipeTree(pipe.getChildren(), newPipeId); // 递归更新子管道
|
|
||||
} |
|
||||
} |
|
||||
} |
|
||||
|
|
||||
private List<Pipe> buildPipeTree(List<Pipe> allPipes,String id) { |
|
||||
Map<String, Pipe> pipeMap = new HashMap<>(); |
|
||||
List<Pipe> rootPipes = new ArrayList<>(); |
|
||||
|
|
||||
// 创建一个管道 Map,用于快速查找
|
|
||||
for (Pipe pipe : allPipes) { |
|
||||
pipeMap.put(pipe.getId(), pipe); |
|
||||
} |
|
||||
|
|
||||
// 处理每个管道,构建父子关系
|
|
||||
for (Pipe pipe : allPipes) { |
|
||||
pipe.setCreateTime(new Date()); |
|
||||
pipe.setDesignPlanId(id); |
|
||||
if (StringUtils.isEmpty(pipe.getParentId())) { |
|
||||
// 如果是根管道,直接加入根管道列表
|
|
||||
rootPipes.add(pipe); |
|
||||
} else { |
|
||||
// 如果是子管道,将其加入父管道的 children 列表
|
|
||||
Pipe parentPipe = pipeMap.get(pipe.getParentId()); |
|
||||
if (parentPipe != null) { |
|
||||
if (parentPipe.getChildren() == null) { |
|
||||
parentPipe.setChildren(new ArrayList<>()); // 初始化 children
|
|
||||
} |
|
||||
parentPipe.getChildren().add(pipe); |
|
||||
} |
|
||||
} |
|
||||
} |
|
||||
|
|
||||
return rootPipes; |
|
||||
} |
|
||||
// 递归将树状结构扁平化为平铺列表
|
|
||||
private void flattenPipeTree(List<Pipe> pipeTree, List<Pipe> flatList) { |
|
||||
for (Pipe pipe : pipeTree) { |
|
||||
flatList.add(pipe); // 将当前管道添加到平铺列表
|
|
||||
if (pipe.getChildren() != null && !pipe.getChildren().isEmpty()) { |
|
||||
flattenPipeTree(pipe.getChildren(), flatList); // 递归扁平化子管道
|
|
||||
} |
|
||||
} |
|
||||
} |
|
||||
} |
|
@ -1,19 +0,0 @@ |
|||||
package cc.admin.modules.dust.service.impl; |
|
||||
|
|
||||
import cc.admin.modules.dust.entity.DustAlarm; |
|
||||
import cc.admin.modules.dust.mapper.DustAlarmMapper; |
|
||||
import cc.admin.modules.dust.service.IDustAlarmService; |
|
||||
import org.springframework.stereotype.Service; |
|
||||
|
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
|
||||
|
|
||||
/** |
|
||||
* @Description: 警报记录表 |
|
||||
* @Author: cc-admin |
|
||||
* @Date: 2025-03-27 |
|
||||
* @Version: V1.0.0 |
|
||||
*/ |
|
||||
@Service |
|
||||
public class DustAlarmServiceImpl extends ServiceImpl<DustAlarmMapper, DustAlarm> implements IDustAlarmService { |
|
||||
|
|
||||
} |
|
@ -1,19 +0,0 @@ |
|||||
package cc.admin.modules.dust.service.impl; |
|
||||
|
|
||||
import cc.admin.modules.dust.entity.DustDataTag; |
|
||||
import cc.admin.modules.dust.mapper.DustDataTagMapper; |
|
||||
import cc.admin.modules.dust.service.IDustDataTagService; |
|
||||
import org.springframework.stereotype.Service; |
|
||||
|
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
|
||||
|
|
||||
/** |
|
||||
* @Description: 数据点位表 |
|
||||
* @Author: cc-admin |
|
||||
* @Date: 2025-03-27 |
|
||||
* @Version: V1.0.0 |
|
||||
*/ |
|
||||
@Service |
|
||||
public class DustDataTagServiceImpl extends ServiceImpl<DustDataTagMapper, DustDataTag> implements IDustDataTagService { |
|
||||
|
|
||||
} |
|
@ -1,19 +0,0 @@ |
|||||
package cc.admin.modules.dust.service.impl; |
|
||||
|
|
||||
import cc.admin.modules.dust.entity.DustMonitorItem; |
|
||||
import cc.admin.modules.dust.mapper.DustMonitorItemMapper; |
|
||||
import cc.admin.modules.dust.service.IDustMonitorItemService; |
|
||||
import org.springframework.stereotype.Service; |
|
||||
|
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
|
||||
|
|
||||
/** |
|
||||
* @Description: 大屏监控项表 |
|
||||
* @Author: cc-admin |
|
||||
* @Date: 2025-03-27 |
|
||||
* @Version: V1.0.0 |
|
||||
*/ |
|
||||
@Service |
|
||||
public class DustMonitorItemServiceImpl extends ServiceImpl<DustMonitorItemMapper, DustMonitorItem> implements IDustMonitorItemService { |
|
||||
|
|
||||
} |
|
@ -1,29 +0,0 @@ |
|||||
package cc.admin.modules.dust.service.impl; |
|
||||
|
|
||||
import cc.admin.modules.dust.entity.DustMonitorValve; |
|
||||
import cc.admin.modules.dust.mapper.DustMonitorValveMapper; |
|
||||
import cc.admin.modules.dust.service.IDustMonitorValveService; |
|
||||
import org.apache.ibatis.annotations.Param; |
|
||||
import org.springframework.stereotype.Service; |
|
||||
|
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
|
||||
|
|
||||
import javax.annotation.Resource; |
|
||||
import java.util.List; |
|
||||
|
|
||||
/** |
|
||||
* @Description: 大屏阀门监控表 |
|
||||
* @Author: cc-admin |
|
||||
* @Date: 2025-03-27 |
|
||||
* @Version: V1.0.0 |
|
||||
*/ |
|
||||
@Service |
|
||||
public class DustMonitorValveServiceImpl extends ServiceImpl<DustMonitorValveMapper, DustMonitorValve> implements IDustMonitorValveService { |
|
||||
@Resource |
|
||||
private DustMonitorValveMapper dustMonitorValveMapper; |
|
||||
|
|
||||
@Override |
|
||||
public List<DustMonitorValve> valveList() { |
|
||||
return dustMonitorValveMapper.valveList(); |
|
||||
} |
|
||||
} |
|
@ -1,19 +0,0 @@ |
|||||
package cc.admin.modules.dust.service.impl; |
|
||||
|
|
||||
import cc.admin.modules.dust.entity.DustSystem; |
|
||||
import cc.admin.modules.dust.mapper.DustSystemMapper; |
|
||||
import cc.admin.modules.dust.service.IDustSystemService; |
|
||||
import org.springframework.stereotype.Service; |
|
||||
|
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
|
||||
|
|
||||
/** |
|
||||
* @Description: 除尘系统表 |
|
||||
* @Author: cc-admin |
|
||||
* @Date: 2025-03-27 |
|
||||
* @Version: V1.0.0 |
|
||||
*/ |
|
||||
@Service |
|
||||
public class DustSystemServiceImpl extends ServiceImpl<DustSystemMapper, DustSystem> implements IDustSystemService { |
|
||||
|
|
||||
} |
|
@ -1,19 +0,0 @@ |
|||||
package cc.admin.modules.dust.service.impl; |
|
||||
|
|
||||
import cc.admin.modules.dust.entity.DustValve; |
|
||||
import cc.admin.modules.dust.mapper.DustValveMapper; |
|
||||
import cc.admin.modules.dust.service.IDustValveService; |
|
||||
import org.springframework.stereotype.Service; |
|
||||
|
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
|
||||
|
|
||||
/** |
|
||||
* @Description: 阀门表 |
|
||||
* @Author: cc-admin |
|
||||
* @Date: 2025-03-27 |
|
||||
* @Version: V1.0.0 |
|
||||
*/ |
|
||||
@Service |
|
||||
public class DustValveServiceImpl extends ServiceImpl<DustValveMapper, DustValve> implements IDustValveService { |
|
||||
|
|
||||
} |
|
@ -1,25 +0,0 @@ |
|||||
package cc.admin.modules.dust.service.impl; |
|
||||
|
|
||||
|
|
||||
import cc.admin.modules.dust.entity.PipeDiameterThickness; |
|
||||
import cc.admin.modules.dust.mapper.PipeDiameterThicknessMapper; |
|
||||
import cc.admin.modules.dust.service.IPipeDiameterThicknessService; |
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
|
||||
import org.springframework.stereotype.Service; |
|
||||
|
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
|
||||
|
|
||||
import java.math.BigDecimal; |
|
||||
|
|
||||
/** |
|
||||
* @Description: 管径壁厚对应表 |
|
||||
* @Author: cc-admin |
|
||||
* @Date: 2024-12-06 |
|
||||
* @Version: V1.0.0 |
|
||||
*/ |
|
||||
@Service |
|
||||
public class PipeDiameterThicknessServiceImpl extends ServiceImpl<PipeDiameterThicknessMapper, PipeDiameterThickness> implements IPipeDiameterThicknessService { |
|
||||
|
|
||||
|
|
||||
|
|
||||
} |
|
Some files were not shown because too many files changed in this diff
Loading…
Reference in new issue