Explorar o código

联锁详细信息表

LLL hai 9 meses
pai
achega
be75a04f4e

+ 177 - 0
jeecg-module-interlock/src/main/java/org/jeecg/modules/detail/controller/InterlockDetailController.java

@@ -0,0 +1,177 @@
+package org.jeecg.modules.detail.controller;
+
+import java.util.Arrays;
+import java.util.List;
+import java.util.Map;
+import java.util.stream.Collectors;
+import java.io.IOException;
+import java.io.UnsupportedEncodingException;
+import java.net.URLDecoder;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+import org.jeecg.common.api.vo.Result;
+import org.jeecg.common.system.query.QueryGenerator;
+import org.jeecg.common.util.oConvertUtils;
+import org.jeecg.modules.detail.entity.InterlockDetail;
+import org.jeecg.modules.detail.service.IInterlockDetailService;
+
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import lombok.extern.slf4j.Slf4j;
+
+import org.jeecgframework.poi.excel.ExcelImportUtil;
+import org.jeecgframework.poi.excel.def.NormalExcelConstants;
+import org.jeecgframework.poi.excel.entity.ExportParams;
+import org.jeecgframework.poi.excel.entity.ImportParams;
+import org.jeecgframework.poi.excel.view.JeecgEntityExcelView;
+import org.jeecg.common.system.base.controller.JeecgController;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.*;
+import org.springframework.web.multipart.MultipartFile;
+import org.springframework.web.multipart.MultipartHttpServletRequest;
+import org.springframework.web.servlet.ModelAndView;
+import com.alibaba.fastjson.JSON;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import org.jeecg.common.aspect.annotation.AutoLog;
+
+ /**
+ * @Description: 联锁详细信息表
+ * @Author: jeecg-boot
+ * @Date:   2024-05-22
+ * @Version: V1.0
+ */
+@Api(tags="联锁详细信息表")
+@RestController
+@RequestMapping("/detail/interlockDetail")
+@Slf4j
+public class InterlockDetailController extends JeecgController<InterlockDetail, IInterlockDetailService> {
+	@Autowired
+	private IInterlockDetailService interlockDetailService;
+	
+	/**
+	 * 分页列表查询
+	 *
+	 * @param interlockDetail
+	 * @param pageNo
+	 * @param pageSize
+	 * @param req
+	 * @return
+	 */
+	//@AutoLog(value = "联锁详细信息表-分页列表查询")
+	@ApiOperation(value="联锁详细信息表-分页列表查询", notes="联锁详细信息表-分页列表查询")
+	@GetMapping(value = "/list")
+	public Result<IPage<InterlockDetail>> queryPageList(InterlockDetail interlockDetail,
+								   @RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
+								   @RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
+								   HttpServletRequest req) {
+		QueryWrapper<InterlockDetail> queryWrapper = QueryGenerator.initQueryWrapper(interlockDetail, req.getParameterMap());
+		Page<InterlockDetail> page = new Page<InterlockDetail>(pageNo, pageSize);
+		IPage<InterlockDetail> pageList = interlockDetailService.page(page, queryWrapper);
+		return Result.OK(pageList);
+	}
+	
+	/**
+	 *   添加
+	 *
+	 * @param interlockDetail
+	 * @return
+	 */
+	@AutoLog(value = "联锁详细信息表-添加")
+	@ApiOperation(value="联锁详细信息表-添加", notes="联锁详细信息表-添加")
+	//@RequiresPermissions("org.jeecg.modules:interlock_detail:add")
+	@PostMapping(value = "/add")
+	public Result<String> add(@RequestBody InterlockDetail interlockDetail) {
+		interlockDetailService.save(interlockDetail);
+		return Result.OK("添加成功!");
+	}
+	
+	/**
+	 *  编辑
+	 *
+	 * @param interlockDetail
+	 * @return
+	 */
+	@AutoLog(value = "联锁详细信息表-编辑")
+	@ApiOperation(value="联锁详细信息表-编辑", notes="联锁详细信息表-编辑")
+	//@RequiresPermissions("org.jeecg.modules:interlock_detail:edit")
+	@RequestMapping(value = "/edit", method = {RequestMethod.PUT,RequestMethod.POST})
+	public Result<String> edit(@RequestBody InterlockDetail interlockDetail) {
+		interlockDetailService.updateById(interlockDetail);
+		return Result.OK("编辑成功!");
+	}
+	
+	/**
+	 *   通过id删除
+	 *
+	 * @param id
+	 * @return
+	 */
+	@AutoLog(value = "联锁详细信息表-通过id删除")
+	@ApiOperation(value="联锁详细信息表-通过id删除", notes="联锁详细信息表-通过id删除")
+	//@RequiresPermissions("org.jeecg.modules:interlock_detail:delete")
+	@DeleteMapping(value = "/delete")
+	public Result<String> delete(@RequestParam(name="id",required=true) String id) {
+		interlockDetailService.removeById(id);
+		return Result.OK("删除成功!");
+	}
+	
+	/**
+	 *  批量删除
+	 *
+	 * @param ids
+	 * @return
+	 */
+	@AutoLog(value = "联锁详细信息表-批量删除")
+	@ApiOperation(value="联锁详细信息表-批量删除", notes="联锁详细信息表-批量删除")
+	//@RequiresPermissions("org.jeecg.modules:interlock_detail:deleteBatch")
+	@DeleteMapping(value = "/deleteBatch")
+	public Result<String> deleteBatch(@RequestParam(name="ids",required=true) String ids) {
+		this.interlockDetailService.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<InterlockDetail> queryById(@RequestParam(name="id",required=true) String id) {
+		InterlockDetail interlockDetail = interlockDetailService.getById(id);
+		if(interlockDetail==null) {
+			return Result.error("未找到对应数据");
+		}
+		return Result.OK(interlockDetail);
+	}
+
+    /**
+    * 导出excel
+    *
+    * @param request
+    * @param interlockDetail
+    */
+    //@RequiresPermissions("org.jeecg.modules:interlock_detail:exportXls")
+    @RequestMapping(value = "/exportXls")
+    public ModelAndView exportXls(HttpServletRequest request, InterlockDetail interlockDetail) {
+        return super.exportXls(request, interlockDetail, InterlockDetail.class, "联锁详细信息表");
+    }
+
+    /**
+      * 通过excel导入数据
+    *
+    * @param request
+    * @param response
+    * @return
+    */
+    //@RequiresPermissions("interlock_detail:importExcel")
+    @RequestMapping(value = "/importExcel", method = RequestMethod.POST)
+    public Result<?> importExcel(HttpServletRequest request, HttpServletResponse response) {
+        return super.importExcel(request, response, InterlockDetail.class);
+    }
+
+}

+ 175 - 0
jeecg-module-interlock/src/main/java/org/jeecg/modules/detail/entity/InterlockDetail.java

@@ -0,0 +1,175 @@
+package org.jeecg.modules.detail.entity;
+
+import java.io.Serializable;
+import java.io.UnsupportedEncodingException;
+import java.util.Date;
+import java.math.BigDecimal;
+import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.baomidou.mybatisplus.annotation.TableName;
+import com.baomidou.mybatisplus.annotation.TableLogic;
+import lombok.Data;
+import com.fasterxml.jackson.annotation.JsonFormat;
+import org.springframework.format.annotation.DateTimeFormat;
+import org.jeecgframework.poi.excel.annotation.Excel;
+import org.jeecg.common.aspect.annotation.Dict;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.EqualsAndHashCode;
+import lombok.experimental.Accessors;
+
+/**
+ * @Description: 联锁详细信息表
+ * @Author: jeecg-boot
+ * @Date:   2024-05-22
+ * @Version: V1.0
+ */
+@Data
+@TableName("interlock_detail")
+@Accessors(chain = true)
+@EqualsAndHashCode(callSuper = false)
+@ApiModel(value="interlock_detail对象", description="联锁详细信息表")
+public class InterlockDetail implements Serializable {
+    private static final long serialVersionUID = 1L;
+
+	/**id*/
+	@TableId(type = IdType.ASSIGN_ID)
+    @ApiModelProperty(value = "id")
+    private java.lang.String id;
+	/**联锁总表id*/
+	@Excel(name = "联锁总表id", width = 15)
+    @ApiModelProperty(value = "联锁总表id")
+    private java.lang.String summaryid;
+	/**联锁名称*/
+	@Excel(name = "联锁名称", width = 15)
+    @ApiModelProperty(value = "联锁名称")
+    private java.lang.String interlockname;
+	/**联锁条件*/
+	@Excel(name = "联锁条件", width = 15)
+    @ApiModelProperty(value = "联锁条件")
+    private java.lang.String interlockcondition;
+	/**仪表状态判断方式*/
+	@Excel(name = "仪表状态判断方式", width = 15, dicCode = "instrument_status_juge")
+	@Dict(dicCode = "instrument_status_juge")
+    @ApiModelProperty(value = "仪表状态判断方式")
+    private java.lang.String instrumentStatusJuge;
+	/**仪表状态位号*/
+	@Excel(name = "仪表状态位号", width = 15)
+    @ApiModelProperty(value = "仪表状态位号")
+    private java.lang.String instrumentStatusTag;
+	/**仪表状态位号值*/
+	@Excel(name = "仪表状态位号值", width = 15)
+    @ApiModelProperty(value = "仪表状态位号值")
+    private java.lang.String instrumentStatusTagValue;
+	/**原始模拟量位号*/
+	@Excel(name = "原始模拟量位号", width = 15)
+    @ApiModelProperty(value = "原始模拟量位号")
+    private java.lang.String ysmnlTag;
+	/**原始模拟量位号值*/
+	@Excel(name = "原始模拟量位号值", width = 15)
+    @ApiModelProperty(value = "原始模拟量位号值")
+    private java.lang.String ysmnlTagValue;
+	/**高限*/
+	@Excel(name = "高限", width = 15)
+    @ApiModelProperty(value = "高限")
+    private java.lang.String upperLimit;
+	/**低限*/
+	@Excel(name = "低限", width = 15)
+    @ApiModelProperty(value = "低限")
+    private java.lang.String lowerLimit;
+	/**阈值*/
+	@Excel(name = "阈值", width = 15)
+    @ApiModelProperty(value = "阈值")
+    private java.lang.String thresholdValue;
+	/**时间*/
+	@Excel(name = "时间", width = 15)
+    @ApiModelProperty(value = "时间")
+    private java.lang.String thresholdTime;
+	/**时间单位*/
+	@Excel(name = "时间单位", width = 15)
+    @ApiModelProperty(value = "时间单位")
+    private java.lang.String thresholdTimeUnit;
+	/**描述*/
+	@Excel(name = "描述", width = 15)
+    @ApiModelProperty(value = "描述")
+    private java.lang.String description;
+	/**逻辑关系*/
+	@Excel(name = "逻辑关系", width = 15)
+    @ApiModelProperty(value = "逻辑关系")
+    private java.lang.String ljgx;
+	/**联锁设定值*/
+	@Excel(name = "联锁设定值", width = 15)
+    @ApiModelProperty(value = "联锁设定值")
+    private java.lang.String interlocksetvalue;
+	/**当前值*/
+	@Excel(name = "当前值", width = 15)
+    @ApiModelProperty(value = "当前值")
+    private java.lang.String currentvalue;
+	/**当前值位号*/
+	@Excel(name = "当前值位号", width = 15)
+    @ApiModelProperty(value = "当前值位号")
+    private java.lang.String currentvalueTagNum;
+	/**是否旁路*/
+	@Excel(name = "是否旁路", width = 15)
+    @ApiModelProperty(value = "是否旁路")
+    private java.lang.String ifbypass;
+	/**位号*/
+	@Excel(name = "位号", width = 15)
+    @ApiModelProperty(value = "位号")
+    private java.lang.String ifbypassTagNum;
+	/**联锁输出值*/
+	@Excel(name = "联锁输出值", width = 15)
+    @ApiModelProperty(value = "联锁输出值")
+    private java.lang.String interlockoutvalue;
+	/**联锁输出值位号*/
+	@Excel(name = "联锁输出值位号", width = 15)
+    @ApiModelProperty(value = "联锁输出值位号")
+    private java.lang.String interlockoutvalueTagNum;
+	/**输入卡件状态*/
+	@Excel(name = "输入卡件状态", width = 15)
+    @ApiModelProperty(value = "输入卡件状态")
+    private java.lang.String inputstatus;
+	/**输入卡件状态位号*/
+	@Excel(name = "输入卡件状态位号", width = 15)
+    @ApiModelProperty(value = "输入卡件状态位号")
+    private java.lang.String inputstatusTagNum;
+	/**输出卡件状态*/
+	@Excel(name = "输出卡件状态", width = 15)
+    @ApiModelProperty(value = "输出卡件状态")
+    private java.lang.String outputstatus;
+	/**输出卡件状态位号*/
+	@Excel(name = "输出卡件状态位号", width = 15)
+    @ApiModelProperty(value = "输出卡件状态位号")
+    private java.lang.String outputstatusTagNum;
+	/**MP状态*/
+	@Excel(name = "MP状态", width = 15)
+    @ApiModelProperty(value = "MP状态")
+    private java.lang.String mpstatus;
+	/**状态位号*/
+	@Excel(name = "状态位号", width = 15)
+    @ApiModelProperty(value = "状态位号")
+    private java.lang.String mpstatusTagNum;
+	/**创建人*/
+    @ApiModelProperty(value = "创建人")
+    private java.lang.String createBy;
+	/**创建日期*/
+	@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd")
+    @DateTimeFormat(pattern="yyyy-MM-dd")
+    @ApiModelProperty(value = "创建日期")
+    private java.util.Date createTime;
+	/**更新人*/
+    @ApiModelProperty(value = "更新人")
+    private java.lang.String updateBy;
+	/**更新日期*/
+	@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd")
+    @DateTimeFormat(pattern="yyyy-MM-dd")
+    @ApiModelProperty(value = "更新日期")
+    private java.util.Date updateTime;
+	/**所属部门*/
+    @ApiModelProperty(value = "所属部门")
+    private java.lang.String sysOrgCode;
+	/**备注*/
+	@Excel(name = "备注", width = 15)
+    @ApiModelProperty(value = "备注")
+    private java.lang.String remark;
+}

+ 17 - 0
jeecg-module-interlock/src/main/java/org/jeecg/modules/detail/mapper/InterlockDetailMapper.java

@@ -0,0 +1,17 @@
+package org.jeecg.modules.detail.mapper;
+
+import java.util.List;
+
+import org.apache.ibatis.annotations.Param;
+import org.jeecg.modules.detail.entity.InterlockDetail;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+
+/**
+ * @Description: 联锁详细信息表
+ * @Author: jeecg-boot
+ * @Date:   2024-05-22
+ * @Version: V1.0
+ */
+public interface InterlockDetailMapper extends BaseMapper<InterlockDetail> {
+
+}

+ 5 - 0
jeecg-module-interlock/src/main/java/org/jeecg/modules/detail/mapper/xml/InterlockDetailMapper.xml

@@ -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="org.jeecg.modules.detail.mapper.InterlockDetailMapper">
+
+</mapper>

+ 14 - 0
jeecg-module-interlock/src/main/java/org/jeecg/modules/detail/service/IInterlockDetailService.java

@@ -0,0 +1,14 @@
+package org.jeecg.modules.detail.service;
+
+import org.jeecg.modules.detail.entity.InterlockDetail;
+import com.baomidou.mybatisplus.extension.service.IService;
+
+/**
+ * @Description: 联锁详细信息表
+ * @Author: jeecg-boot
+ * @Date:   2024-05-22
+ * @Version: V1.0
+ */
+public interface IInterlockDetailService extends IService<InterlockDetail> {
+
+}

+ 19 - 0
jeecg-module-interlock/src/main/java/org/jeecg/modules/detail/service/impl/InterlockDetailServiceImpl.java

@@ -0,0 +1,19 @@
+package org.jeecg.modules.detail.service.impl;
+
+import org.jeecg.modules.detail.entity.InterlockDetail;
+import org.jeecg.modules.detail.mapper.InterlockDetailMapper;
+import org.jeecg.modules.detail.service.IInterlockDetailService;
+import org.springframework.stereotype.Service;
+
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+
+/**
+ * @Description: 联锁详细信息表
+ * @Author: jeecg-boot
+ * @Date:   2024-05-22
+ * @Version: V1.0
+ */
+@Service
+public class InterlockDetailServiceImpl extends ServiceImpl<InterlockDetailMapper, InterlockDetail> implements IInterlockDetailService {
+
+}